diff --git a/webroot/js/node_modules/mermaid/dist/Diagram.d.ts b/webroot/js/node_modules/mermaid/dist/Diagram.d.ts new file mode 100644 index 0000000..b9b3014 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/Diagram.d.ts @@ -0,0 +1,33 @@ +import type { DetailedError } from './utils.js'; +import type { DiagramDefinition, DiagramMetadata } from './diagram-api/types.js'; +export type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void; +/** + * An object representing a parsed mermaid diagram definition. + * @privateRemarks This is exported as part of the public mermaidAPI. + */ +export declare class Diagram { + text: string; + metadata: Pick; + type: string; + parser: DiagramDefinition['parser']; + renderer: DiagramDefinition['renderer']; + db: DiagramDefinition['db']; + private init?; + private detectError?; + constructor(text: string, metadata?: Pick); + parse(): void; + render(id: string, version: string): Promise; + getParser(): import("./diagram-api/types.js").ParserDefinition; + getType(): string; +} +/** + * Parse the text asynchronously and generate a Diagram object asynchronously. + * **Warning:** This function may be changed in the future. + * @alpha + * @param text - The mermaid diagram definition. + * @param metadata - Diagram metadata, defined in YAML. + * @returns A the Promise of a Diagram object. + * @throws {@link UnknownDiagramError} if the diagram type can not be found. + * @privateRemarks This is exported as part of the public mermaidAPI. + */ +export declare const getDiagramFromText: (text: string, metadata?: Pick) => Promise; diff --git a/webroot/js/node_modules/mermaid/dist/__mocks__/mermaidAPI.d.ts b/webroot/js/node_modules/mermaid/dist/__mocks__/mermaidAPI.d.ts new file mode 100644 index 0000000..52e7c9a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/__mocks__/mermaidAPI.d.ts @@ -0,0 +1,13 @@ +export declare const mermaidAPI: { + render: import("@vitest/spy").Mock; + parse: (text: string, parseOptions?: import("../mermaidAPI.js").ParseOptions | undefined) => Promise; + initialize: import("@vitest/spy").Mock; + getConfig: () => import("../config.type.js").MermaidConfig; + setConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig; + getSiteConfig: () => import("../config.type.js").MermaidConfig; + updateSiteConfig: (conf: import("../config.type.js").MermaidConfig) => import("../config.type.js").MermaidConfig; + reset: () => void; + globalReset: () => void; + defaultConfig: import("../config.type.js").MermaidConfig; +}; +export default mermaidAPI; diff --git a/webroot/js/node_modules/mermaid/dist/accessibility.d.ts b/webroot/js/node_modules/mermaid/dist/accessibility.d.ts new file mode 100644 index 0000000..7e9703e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/accessibility.d.ts @@ -0,0 +1,27 @@ +/** + * Accessibility (a11y) functions, types, helpers. + * + * @see https://www.w3.org/WAI/ + * @see https://www.w3.org/TR/wai-aria-1.1/ + * @see https://www.w3.org/TR/svg-aam-1.0/ + */ +import type { D3Element } from './mermaidAPI.js'; +/** + * Add role and aria-roledescription to the svg element. + * + * @param svg - d3 object that contains the SVG HTML element + * @param diagramType - diagram name for to the aria-roledescription + */ +export declare function setA11yDiagramInfo(svg: D3Element, diagramType: string): void; +/** + * Add an accessible title and/or description element to a chart. + * The title is usually not displayed and the description is never displayed. + * + * The following charts display their title as a visual and accessibility element: gantt. + * + * @param svg - d3 node to insert the a11y title and desc info + * @param a11yTitle - a11y title. undefined or empty strings mean to skip them + * @param a11yDesc - a11y description. undefined or empty strings mean to skip them + * @param baseId - id used to construct the a11y title and description id + */ +export declare function addSVGa11yTitleDescription(svg: D3Element, a11yTitle: string | undefined, a11yDesc: string | undefined, baseId: string): void; diff --git a/webroot/js/node_modules/mermaid/dist/accessibility.spec.d.ts b/webroot/js/node_modules/mermaid/dist/accessibility.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/accessibility.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/arc-947d8396.js b/webroot/js/node_modules/mermaid/dist/arc-947d8396.js new file mode 100644 index 0000000..5162586 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/arc-947d8396.js @@ -0,0 +1,144 @@ +import { c as constant, p as path } from "./constant-b644328d.js"; +import { aW as pi, aX as cos, aY as sin, aZ as halfPi, a_ as epsilon, W as tau, a$ as sqrt, b0 as min, b1 as abs, b2 as atan2, b3 as asin, b4 as acos, b5 as max } from "./mermaid-491db2d9.js"; +function arcInnerRadius(d) { + return d.innerRadius; +} +function arcOuterRadius(d) { + return d.outerRadius; +} +function arcStartAngle(d) { + return d.startAngle; +} +function arcEndAngle(d) { + return d.endAngle; +} +function arcPadAngle(d) { + return d && d.padAngle; +} +function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { + var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10; + if (t * t < epsilon) + return; + t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; + return [x0 + t * x10, y0 + t * y10]; +} +function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { + var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00; + if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) + cx0 = cx1, cy0 = cy1; + return { + cx: cx0, + cy: cy0, + x01: -ox, + y01: -oy, + x11: cx0 * (r1 / r - 1), + y11: cy0 * (r1 / r - 1) + }; +} +function d3arc() { + var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null; + function arc() { + var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs(a1 - a0), cw = a1 > a0; + if (!context) + context = buffer = path(); + if (r1 < r0) + r = r1, r1 = r0, r0 = r; + if (!(r1 > epsilon)) + context.moveTo(0, 0); + else if (da > tau - epsilon) { + context.moveTo(r1 * cos(a0), r1 * sin(a0)); + context.arc(0, 0, r1, a0, a1, !cw); + if (r0 > epsilon) { + context.moveTo(r0 * cos(a1), r0 * sin(a1)); + context.arc(0, 0, r0, a1, a0, cw); + } + } else { + var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1; + if (rp > epsilon) { + var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap)); + if ((da0 -= p0 * 2) > epsilon) + p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0; + else + da0 = 0, a00 = a10 = (a0 + a1) / 2; + if ((da1 -= p1 * 2) > epsilon) + p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1; + else + da1 = 0, a01 = a11 = (a0 + a1) / 2; + } + var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10); + if (rc > epsilon) { + var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc; + if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { + var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]); + rc0 = min(rc, (r0 - lc) / (kc - 1)); + rc1 = min(rc, (r1 - lc) / (kc + 1)); + } + } + if (!(da1 > epsilon)) + context.moveTo(x01, y01); + else if (rc1 > epsilon) { + t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); + t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); + context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); + if (rc1 < rc) + context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); + else { + context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); + context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw); + context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); + } + } else + context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); + if (!(r0 > epsilon) || !(da0 > epsilon)) + context.lineTo(x10, y10); + else if (rc0 > epsilon) { + t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); + t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); + context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); + if (rc0 < rc) + context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); + else { + context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); + context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw); + context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); + } + } else + context.arc(0, 0, r0, a10, a00, cw); + } + context.closePath(); + if (buffer) + return context = null, buffer + "" || null; + } + arc.centroid = function() { + var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2; + return [cos(a) * r, sin(a) * r]; + }; + arc.innerRadius = function(_) { + return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius; + }; + arc.outerRadius = function(_) { + return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius; + }; + arc.cornerRadius = function(_) { + return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius; + }; + arc.padRadius = function(_) { + return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius; + }; + arc.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle; + }; + arc.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle; + }; + arc.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle; + }; + arc.context = function(_) { + return arguments.length ? (context = _ == null ? null : _, arc) : context; + }; + return arc; +} +export { + d3arc as d +}; diff --git a/webroot/js/node_modules/mermaid/dist/arc-dcf06dea.js b/webroot/js/node_modules/mermaid/dist/arc-dcf06dea.js new file mode 100644 index 0000000..845a955 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/arc-dcf06dea.js @@ -0,0 +1,84 @@ +import { c as X, p as sn } from "./constant-2fe7eae5.js"; +import { aW as en, aX as j, aY as P, aZ as an, a_ as y, W as ln, a$ as C, b0 as k, b1 as rn, b2 as t, b3 as un, b4 as on, b5 as tn } from "./mermaid-e4a58915.js"; +function fn(l) { + return l.innerRadius; +} +function cn(l) { + return l.outerRadius; +} +function yn(l) { + return l.startAngle; +} +function gn(l) { + return l.endAngle; +} +function mn(l) { + return l && l.padAngle; +} +function pn(l, x, w, W, h, v, Y, a) { + var s = w - l, n = W - x, m = Y - h, i = a - v, r = i * s - m * n; + if (!(r * r < y)) + return r = (m * (x - v) - i * (l - h)) / r, [l + r * s, x + r * n]; +} +function K(l, x, w, W, h, v, Y) { + var a = l - w, s = x - W, n = (Y ? v : -v) / C(a * a + s * s), m = n * s, i = -n * a, r = l + m, f = x + i, c = w + m, D = W + i, o = (r + c) / 2, E = (f + D) / 2, p = c - r, g = D - f, A = p * p + g * g, I = h - v, b = r * D - c * f, O = (g < 0 ? -1 : 1) * C(tn(0, I * I * A - b * b)), S = (b * g - p * O) / A, d = (-b * p - g * O) / A, R = (b * g + p * O) / A, T = (-b * p + g * O) / A, e = S - o, u = d - E, Z = R - o, $ = T - E; + return e * e + u * u > Z * Z + $ * $ && (S = R, d = T), { + cx: S, + cy: d, + x01: -m, + y01: -i, + x11: S * (h / I - 1), + y11: d * (h / I - 1) + }; +} +function hn() { + var l = fn, x = cn, w = X(0), W = null, h = yn, v = gn, Y = mn, a = null; + function s() { + var n, m, i = +l.apply(this, arguments), r = +x.apply(this, arguments), f = h.apply(this, arguments) - an, c = v.apply(this, arguments) - an, D = rn(c - f), o = c > f; + if (a || (a = n = sn()), r < i && (m = r, r = i, i = m), !(r > y)) + a.moveTo(0, 0); + else if (D > ln - y) + a.moveTo(r * j(f), r * P(f)), a.arc(0, 0, r, f, c, !o), i > y && (a.moveTo(i * j(c), i * P(c)), a.arc(0, 0, i, c, f, o)); + else { + var E = f, p = c, g = f, A = c, I = D, b = D, O = Y.apply(this, arguments) / 2, S = O > y && (W ? +W.apply(this, arguments) : C(i * i + r * r)), d = k(rn(r - i) / 2, +w.apply(this, arguments)), R = d, T = d, e, u; + if (S > y) { + var Z = un(S / i * P(O)), $ = un(S / r * P(O)); + (I -= Z * 2) > y ? (Z *= o ? 1 : -1, g += Z, A -= Z) : (I = 0, g = A = (f + c) / 2), (b -= $ * 2) > y ? ($ *= o ? 1 : -1, E += $, p -= $) : (b = 0, E = p = (f + c) / 2); + } + var z = r * j(E), B = r * P(E), F = i * j(A), G = i * P(A); + if (d > y) { + var H = r * j(p), J = r * P(p), L = i * j(g), M = i * P(g), q; + if (D < en && (q = pn(z, B, L, M, H, J, F, G))) { + var N = z - q[0], Q = B - q[1], U = H - q[0], V = J - q[1], _ = 1 / P(on((N * U + Q * V) / (C(N * N + Q * Q) * C(U * U + V * V))) / 2), nn = C(q[0] * q[0] + q[1] * q[1]); + R = k(d, (i - nn) / (_ - 1)), T = k(d, (r - nn) / (_ + 1)); + } + } + b > y ? T > y ? (e = K(L, M, z, B, r, T, o), u = K(H, J, F, G, r, T, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), T < d ? a.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, T, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, r, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), a.arc(u.cx, u.cy, T, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (a.moveTo(z, B), a.arc(0, 0, r, E, p, !o)) : a.moveTo(z, B), !(i > y) || !(I > y) ? a.lineTo(F, G) : R > y ? (e = K(F, G, H, J, i, -R, o), u = K(z, B, L, M, i, -R, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), R < d ? a.arc(e.cx, e.cy, R, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, R, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, i, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), a.arc(u.cx, u.cy, R, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : a.arc(0, 0, i, A, g, o); + } + if (a.closePath(), n) + return a = null, n + "" || null; + } + return s.centroid = function() { + var n = (+l.apply(this, arguments) + +x.apply(this, arguments)) / 2, m = (+h.apply(this, arguments) + +v.apply(this, arguments)) / 2 - en / 2; + return [j(m) * n, P(m) * n]; + }, s.innerRadius = function(n) { + return arguments.length ? (l = typeof n == "function" ? n : X(+n), s) : l; + }, s.outerRadius = function(n) { + return arguments.length ? (x = typeof n == "function" ? n : X(+n), s) : x; + }, s.cornerRadius = function(n) { + return arguments.length ? (w = typeof n == "function" ? n : X(+n), s) : w; + }, s.padRadius = function(n) { + return arguments.length ? (W = n == null ? null : typeof n == "function" ? n : X(+n), s) : W; + }, s.startAngle = function(n) { + return arguments.length ? (h = typeof n == "function" ? n : X(+n), s) : h; + }, s.endAngle = function(n) { + return arguments.length ? (v = typeof n == "function" ? n : X(+n), s) : v; + }, s.padAngle = function(n) { + return arguments.length ? (Y = typeof n == "function" ? n : X(+n), s) : Y; + }, s.context = function(n) { + return arguments.length ? (a = n ?? null, s) : a; + }, s; +} +export { + hn as d +}; diff --git a/webroot/js/node_modules/mermaid/dist/array-2ff2c7a6.js b/webroot/js/node_modules/mermaid/dist/array-2ff2c7a6.js new file mode 100644 index 0000000..66ab952 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/array-2ff2c7a6.js @@ -0,0 +1,6 @@ +function t(r) { + return typeof r == "object" && "length" in r ? r : Array.from(r); +} +export { + t as a +}; diff --git a/webroot/js/node_modules/mermaid/dist/array-b7dcf730.js b/webroot/js/node_modules/mermaid/dist/array-b7dcf730.js new file mode 100644 index 0000000..0a4e26a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/array-b7dcf730.js @@ -0,0 +1,6 @@ +function array(x) { + return typeof x === "object" && "length" in x ? x : Array.from(x); +} +export { + array as a +}; diff --git a/webroot/js/node_modules/mermaid/dist/assignWithDepth.d.ts b/webroot/js/node_modules/mermaid/dist/assignWithDepth.d.ts new file mode 100644 index 0000000..4e3c1d0 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/assignWithDepth.d.ts @@ -0,0 +1,30 @@ +/** + * assignWithDepth Extends the functionality of {@link Object.assign} with the + * ability to merge arbitrary-depth objects For each key in src with path `k` (recursively) + * performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of + * undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to `{}` and + * effectively merged with src[`k`]

Additionally, dissimilar types will not clobber unless the + * config.clobber parameter === true. Example: + * + * ``` + * const config_0 = { foo: { bar: 'bar' }, bar: 'foo' }; + * const config_1 = { foo: 'foo', bar: 'bar' }; + * const result = assignWithDepth(config_0, config_1); + * console.log(result); + * //-> result: { foo: { bar: 'bar' }, bar: 'bar' } + * ``` + * + * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a + * destructured array of objects and dst is not an array, assignWithDepth will apply each element + * of src to dst in order. + * @param dst - The destination of the merge + * @param src - The source object(s) to merge into destination + * @param config - + * * depth: depth to traverse within src and dst for merging + * * clobber: should dissimilar types clobber + */ +declare const assignWithDepth: (dst: any, src: any, { depth, clobber }?: { + depth?: number | undefined; + clobber?: boolean | undefined; +}) => any; +export default assignWithDepth; diff --git a/webroot/js/node_modules/mermaid/dist/c4Diagram-7ff6304f.js b/webroot/js/node_modules/mermaid/dist/c4Diagram-7ff6304f.js new file mode 100644 index 0000000..ae5e9c0 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/c4Diagram-7ff6304f.js @@ -0,0 +1,2471 @@ +import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, e as common, f as assignWithDepth, h as calculateTextWidth, l as log, i as configureSvgSize, w as wrapLabel, j as calculateTextHeight } from "./mermaid-0d192ec3.js"; +import { select } from "d3"; +import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-057d45d0.js"; +import { sanitizeUrl } from "@braintree/sanitize-url"; +import "ts-dedent"; +import "dayjs"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" }, + productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setDirection("TB"); + break; + case 4: + yy.setDirection("BT"); + break; + case 5: + yy.setDirection("RL"); + break; + case 6: + yy.setDirection("LR"); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + yy.setC4Type($$[$0 - 3]); + break; + case 19: + yy.setTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 20: + yy.setAccDescription($$[$0].substring(15)); + this.$ = $$[$0].substring(15); + break; + case 21: + this.$ = $$[$0].trim(); + yy.setTitle(this.$); + break; + case 22: + case 23: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + case 29: + $$[$0].splice(2, 0, "ENTERPRISE"); + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 30: + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 31: + $$[$0].splice(2, 0, "CONTAINER"); + yy.addContainerBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 32: + yy.addDeploymentNode("node", ...$$[$0]); + this.$ = $$[$0]; + break; + case 33: + yy.addDeploymentNode("nodeL", ...$$[$0]); + this.$ = $$[$0]; + break; + case 34: + yy.addDeploymentNode("nodeR", ...$$[$0]); + this.$ = $$[$0]; + break; + case 35: + yy.popBoundaryParseStack(); + break; + case 39: + yy.addPersonOrSystem("person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 40: + yy.addPersonOrSystem("external_person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 41: + yy.addPersonOrSystem("system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 42: + yy.addPersonOrSystem("system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 43: + yy.addPersonOrSystem("system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 44: + yy.addPersonOrSystem("external_system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 45: + yy.addPersonOrSystem("external_system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 46: + yy.addPersonOrSystem("external_system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 47: + yy.addContainer("container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 48: + yy.addContainer("container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 49: + yy.addContainer("container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 50: + yy.addContainer("external_container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 51: + yy.addContainer("external_container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 52: + yy.addContainer("external_container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 53: + yy.addComponent("component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 54: + yy.addComponent("component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 55: + yy.addComponent("component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 56: + yy.addComponent("external_component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 57: + yy.addComponent("external_component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 58: + yy.addComponent("external_component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 60: + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 61: + yy.addRel("birel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 62: + yy.addRel("rel_u", ...$$[$0]); + this.$ = $$[$0]; + break; + case 63: + yy.addRel("rel_d", ...$$[$0]); + this.$ = $$[$0]; + break; + case 64: + yy.addRel("rel_l", ...$$[$0]); + this.$ = $$[$0]; + break; + case 65: + yy.addRel("rel_r", ...$$[$0]); + this.$ = $$[$0]; + break; + case 66: + yy.addRel("rel_b", ...$$[$0]); + this.$ = $$[$0]; + break; + case 67: + $$[$0].splice(0, 1); + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 68: + yy.updateElStyle("update_el_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 69: + yy.updateRelStyle("update_rel_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 70: + yy.updateLayoutConfig("update_layout_config", ...$$[$0]); + this.$ = $$[$0]; + break; + case 71: + this.$ = [$$[$0]]; + break; + case 72: + $$[$0].unshift($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 73: + case 75: + this.$ = $$[$0].trim(); + break; + case 74: + let kv = {}; + kv[$$[$0 - 1].trim()] = $$[$0].trim(); + this.$ = kv; + break; + case 76: + this.$ = ""; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 6; + case 1: + return 7; + case 2: + return 8; + case 3: + return 9; + case 4: + return 22; + case 5: + return 23; + case 6: + this.begin("acc_title"); + return 24; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 26; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + break; + case 14: + c; + break; + case 15: + return 12; + case 16: + break; + case 17: + return 11; + case 18: + return 15; + case 19: + return 16; + case 20: + return 17; + case 21: + return 18; + case 22: + this.begin("person_ext"); + return 45; + case 23: + this.begin("person"); + return 44; + case 24: + this.begin("system_ext_queue"); + return 51; + case 25: + this.begin("system_ext_db"); + return 50; + case 26: + this.begin("system_ext"); + return 49; + case 27: + this.begin("system_queue"); + return 48; + case 28: + this.begin("system_db"); + return 47; + case 29: + this.begin("system"); + return 46; + case 30: + this.begin("boundary"); + return 37; + case 31: + this.begin("enterprise_boundary"); + return 34; + case 32: + this.begin("system_boundary"); + return 36; + case 33: + this.begin("container_ext_queue"); + return 57; + case 34: + this.begin("container_ext_db"); + return 56; + case 35: + this.begin("container_ext"); + return 55; + case 36: + this.begin("container_queue"); + return 54; + case 37: + this.begin("container_db"); + return 53; + case 38: + this.begin("container"); + return 52; + case 39: + this.begin("container_boundary"); + return 38; + case 40: + this.begin("component_ext_queue"); + return 63; + case 41: + this.begin("component_ext_db"); + return 62; + case 42: + this.begin("component_ext"); + return 61; + case 43: + this.begin("component_queue"); + return 60; + case 44: + this.begin("component_db"); + return 59; + case 45: + this.begin("component"); + return 58; + case 46: + this.begin("node"); + return 39; + case 47: + this.begin("node"); + return 39; + case 48: + this.begin("node_l"); + return 40; + case 49: + this.begin("node_r"); + return 41; + case 50: + this.begin("rel"); + return 64; + case 51: + this.begin("birel"); + return 65; + case 52: + this.begin("rel_u"); + return 66; + case 53: + this.begin("rel_u"); + return 66; + case 54: + this.begin("rel_d"); + return 67; + case 55: + this.begin("rel_d"); + return 67; + case 56: + this.begin("rel_l"); + return 68; + case 57: + this.begin("rel_l"); + return 68; + case 58: + this.begin("rel_r"); + return 69; + case 59: + this.begin("rel_r"); + return 69; + case 60: + this.begin("rel_b"); + return 70; + case 61: + this.begin("rel_index"); + return 71; + case 62: + this.begin("update_el_style"); + return 72; + case 63: + this.begin("update_rel_style"); + return 73; + case 64: + this.begin("update_layout_config"); + return 74; + case 65: + return "EOF_IN_STRUCT"; + case 66: + this.begin("attribute"); + return "ATTRIBUTE_EMPTY"; + case 67: + this.begin("attribute"); + break; + case 68: + this.popState(); + this.popState(); + break; + case 69: + return 80; + case 70: + break; + case 71: + return 80; + case 72: + this.begin("string"); + break; + case 73: + this.popState(); + break; + case 74: + return "STR"; + case 75: + this.begin("string_kv"); + break; + case 76: + this.begin("string_kv_key"); + return "STR_KEY"; + case 77: + this.popState(); + this.begin("string_kv_value"); + break; + case 78: + return "STR_VALUE"; + case 79: + this.popState(); + this.popState(); + break; + case 80: + return "STR"; + case 81: + return "LBRACE"; + case 82: + return "RBRACE"; + case 83: + return "SPACE"; + case 84: + return "EOL"; + case 85: + return 14; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/], + conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let c4ShapeArray = []; +let boundaryParseStack = [""]; +let currentBoundaryParse = "global"; +let parentBoundaryParse = ""; +let boundarys = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } +]; +let rels = []; +let title = ""; +let wrapEnabled = false; +let c4ShapeInRow$1 = 4; +let c4BoundaryInRow$1 = 2; +var c4Type; +const getC4Type = function() { + return c4Type; +}; +const setC4Type = function(c4TypeParam) { + let sanitizedText = sanitizeText(c4TypeParam, getConfig()); + c4Type = sanitizedText; +}; +const addRel = function(type, from, to, label, techn, descr, sprite, tags, link) { + if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) { + return; + } + let rel = {}; + const old = rels.find((rel2) => rel2.from === from && rel2.to === to); + if (old) { + rel = old; + } else { + rels.push(rel); + } + rel.type = type; + rel.from = from; + rel.to = to; + rel.label = { text: label }; + if (techn === void 0 || techn === null) { + rel.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + rel[key] = { text: value }; + } else { + rel.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + rel.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + rel[key] = { text: value }; + } else { + rel.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + rel[key] = value; + } else { + rel.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + rel[key] = value; + } else { + rel.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + rel[key] = value; + } else { + rel.link = link; + } + rel.wrap = autoWrap(); +}; +const addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let personOrSystem = {}; + const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias); + if (old && alias === old.alias) { + personOrSystem = old; + } else { + personOrSystem.alias = alias; + c4ShapeArray.push(personOrSystem); + } + if (label === void 0 || label === null) { + personOrSystem.label = { text: "" }; + } else { + personOrSystem.label = { text: label }; + } + if (descr === void 0 || descr === null) { + personOrSystem.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + personOrSystem[key] = { text: value }; + } else { + personOrSystem.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.link = link; + } + personOrSystem.typeC4Shape = { text: typeC4Shape }; + personOrSystem.parentBoundary = currentBoundaryParse; + personOrSystem.wrap = autoWrap(); +}; +const addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let container = {}; + const old = c4ShapeArray.find((container2) => container2.alias === alias); + if (old && alias === old.alias) { + container = old; + } else { + container.alias = alias; + c4ShapeArray.push(container); + } + if (label === void 0 || label === null) { + container.label = { text: "" }; + } else { + container.label = { text: label }; + } + if (techn === void 0 || techn === null) { + container.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + container[key] = { text: value }; + } else { + container.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + container.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + container[key] = { text: value }; + } else { + container.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + container[key] = value; + } else { + container.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + container[key] = value; + } else { + container.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + container[key] = value; + } else { + container.link = link; + } + container.wrap = autoWrap(); + container.typeC4Shape = { text: typeC4Shape }; + container.parentBoundary = currentBoundaryParse; +}; +const addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let component = {}; + const old = c4ShapeArray.find((component2) => component2.alias === alias); + if (old && alias === old.alias) { + component = old; + } else { + component.alias = alias; + c4ShapeArray.push(component); + } + if (label === void 0 || label === null) { + component.label = { text: "" }; + } else { + component.label = { text: label }; + } + if (techn === void 0 || techn === null) { + component.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + component[key] = { text: value }; + } else { + component.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + component.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + component[key] = { text: value }; + } else { + component.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + component[key] = value; + } else { + component.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + component[key] = value; + } else { + component.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + component[key] = value; + } else { + component.link = link; + } + component.wrap = autoWrap(); + component.typeC4Shape = { text: typeC4Shape }; + component.parentBoundary = currentBoundaryParse; +}; +const addPersonOrSystemBoundary = function(alias, label, type, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "system" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const addContainerBoundary = function(alias, label, type, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "container" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const addDeploymentNode = function(nodeType, alias, label, type, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "node" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (descr === void 0 || descr === null) { + boundary.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + boundary[key] = { text: value }; + } else { + boundary.descr = { text: descr }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.nodeType = nodeType; + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const popBoundaryParseStack = function() { + currentBoundaryParse = parentBoundaryParse; + boundaryParseStack.pop(); + parentBoundaryParse = boundaryParseStack.pop(); + boundaryParseStack.push(parentBoundaryParse); +}; +const updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) { + let old = c4ShapeArray.find((element) => element.alias === elementName); + if (old === void 0) { + old = boundarys.find((element) => element.alias === elementName); + if (old === void 0) { + return; + } + } + if (bgColor !== void 0 && bgColor !== null) { + if (typeof bgColor === "object") { + let [key, value] = Object.entries(bgColor)[0]; + old[key] = value; + } else { + old.bgColor = bgColor; + } + } + if (fontColor !== void 0 && fontColor !== null) { + if (typeof fontColor === "object") { + let [key, value] = Object.entries(fontColor)[0]; + old[key] = value; + } else { + old.fontColor = fontColor; + } + } + if (borderColor !== void 0 && borderColor !== null) { + if (typeof borderColor === "object") { + let [key, value] = Object.entries(borderColor)[0]; + old[key] = value; + } else { + old.borderColor = borderColor; + } + } + if (shadowing !== void 0 && shadowing !== null) { + if (typeof shadowing === "object") { + let [key, value] = Object.entries(shadowing)[0]; + old[key] = value; + } else { + old.shadowing = shadowing; + } + } + if (shape !== void 0 && shape !== null) { + if (typeof shape === "object") { + let [key, value] = Object.entries(shape)[0]; + old[key] = value; + } else { + old.shape = shape; + } + } + if (sprite !== void 0 && sprite !== null) { + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + old[key] = value; + } else { + old.sprite = sprite; + } + } + if (techn !== void 0 && techn !== null) { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + old[key] = value; + } else { + old.techn = techn; + } + } + if (legendText !== void 0 && legendText !== null) { + if (typeof legendText === "object") { + let [key, value] = Object.entries(legendText)[0]; + old[key] = value; + } else { + old.legendText = legendText; + } + } + if (legendSprite !== void 0 && legendSprite !== null) { + if (typeof legendSprite === "object") { + let [key, value] = Object.entries(legendSprite)[0]; + old[key] = value; + } else { + old.legendSprite = legendSprite; + } + } +}; +const updateRelStyle = function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) { + const old = rels.find((rel) => rel.from === from && rel.to === to); + if (old === void 0) { + return; + } + if (textColor !== void 0 && textColor !== null) { + if (typeof textColor === "object") { + let [key, value] = Object.entries(textColor)[0]; + old[key] = value; + } else { + old.textColor = textColor; + } + } + if (lineColor !== void 0 && lineColor !== null) { + if (typeof lineColor === "object") { + let [key, value] = Object.entries(lineColor)[0]; + old[key] = value; + } else { + old.lineColor = lineColor; + } + } + if (offsetX !== void 0 && offsetX !== null) { + if (typeof offsetX === "object") { + let [key, value] = Object.entries(offsetX)[0]; + old[key] = parseInt(value); + } else { + old.offsetX = parseInt(offsetX); + } + } + if (offsetY !== void 0 && offsetY !== null) { + if (typeof offsetY === "object") { + let [key, value] = Object.entries(offsetY)[0]; + old[key] = parseInt(value); + } else { + old.offsetY = parseInt(offsetY); + } + } +}; +const updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) { + let c4ShapeInRowValue = c4ShapeInRow$1; + let c4BoundaryInRowValue = c4BoundaryInRow$1; + if (typeof c4ShapeInRowParam === "object") { + const value = Object.values(c4ShapeInRowParam)[0]; + c4ShapeInRowValue = parseInt(value); + } else { + c4ShapeInRowValue = parseInt(c4ShapeInRowParam); + } + if (typeof c4BoundaryInRowParam === "object") { + const value = Object.values(c4BoundaryInRowParam)[0]; + c4BoundaryInRowValue = parseInt(value); + } else { + c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); + } + if (c4ShapeInRowValue >= 1) { + c4ShapeInRow$1 = c4ShapeInRowValue; + } + if (c4BoundaryInRowValue >= 1) { + c4BoundaryInRow$1 = c4BoundaryInRowValue; + } +}; +const getC4ShapeInRow = function() { + return c4ShapeInRow$1; +}; +const getC4BoundaryInRow = function() { + return c4BoundaryInRow$1; +}; +const getCurrentBoundaryParse = function() { + return currentBoundaryParse; +}; +const getParentBoundaryParse = function() { + return parentBoundaryParse; +}; +const getC4ShapeArray = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return c4ShapeArray; + } else { + return c4ShapeArray.filter((personOrSystem) => { + return personOrSystem.parentBoundary === parentBoundary; + }); + } +}; +const getC4Shape = function(alias) { + return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias); +}; +const getC4ShapeKeys = function(parentBoundary) { + return Object.keys(getC4ShapeArray(parentBoundary)); +}; +const getBoundarys = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return boundarys; + } else { + return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary); + } +}; +const getRels = function() { + return rels; +}; +const getTitle = function() { + return title; +}; +const setWrap = function(wrapSetting) { + wrapEnabled = wrapSetting; +}; +const autoWrap = function() { + return wrapEnabled; +}; +const clear = function() { + c4ShapeArray = []; + boundarys = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } + ]; + parentBoundaryParse = ""; + currentBoundaryParse = "global"; + boundaryParseStack = [""]; + rels = []; + boundaryParseStack = [""]; + title = ""; + wrapEnabled = false; + c4ShapeInRow$1 = 4; + c4BoundaryInRow$1 = 2; +}; +const LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25 +}; +const ARROWTYPE = { + FILLED: 0, + OPEN: 1 +}; +const PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}; +const setTitle = function(txt) { + let sanitizedText = sanitizeText(txt, getConfig()); + title = sanitizedText; +}; +const db = { + addPersonOrSystem, + addPersonOrSystemBoundary, + addContainer, + addContainerBoundary, + addComponent, + addDeploymentNode, + popBoundaryParseStack, + addRel, + updateElStyle, + updateRelStyle, + updateLayoutConfig, + autoWrap, + setWrap, + getC4ShapeArray, + getC4Shape, + getC4ShapeKeys, + getBoundarys, + getCurrentBoundaryParse, + getParentBoundaryParse, + getRels, + getTitle, + getC4Type, + getC4ShapeInRow, + getC4BoundaryInRow, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + getConfig: () => getConfig().c4, + clear, + LINETYPE, + ARROWTYPE, + PLACEMENT, + setTitle, + setC4Type + // apply, +}; +const drawRect = function(elem, rectData) { + return drawRect$1(elem, rectData); +}; +const drawImage = function(elem, width, height, x, y, link) { + const imageElem = elem.append("image"); + imageElem.attr("width", width); + imageElem.attr("height", height); + imageElem.attr("x", x); + imageElem.attr("y", y); + let sanitizedLink = link.startsWith("data:image/png;base64") ? link : sanitizeUrl(link); + imageElem.attr("xlink:href", sanitizedLink); +}; +const drawRels$1 = (elem, rels2, conf2) => { + const relsElem = elem.append("g"); + let i = 0; + for (let rel of rels2) { + let textColor = rel.textColor ? rel.textColor : "#444444"; + let strokeColor = rel.lineColor ? rel.lineColor : "#444444"; + let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0; + let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0; + let url = ""; + if (i === 0) { + let line = relsElem.append("line"); + line.attr("x1", rel.startPoint.x); + line.attr("y1", rel.startPoint.y); + line.attr("x2", rel.endPoint.x); + line.attr("y2", rel.endPoint.y); + line.attr("stroke-width", "1"); + line.attr("stroke", strokeColor); + line.style("fill", "none"); + if (rel.type !== "rel_b") { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line.attr("marker-start", "url(" + url + "#arrowend)"); + } + i = -1; + } else { + let line = relsElem.append("path"); + line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr( + "d", + "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll( + "controlx", + rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4 + ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y) + ); + if (rel.type !== "rel_b") { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line.attr("marker-start", "url(" + url + "#arrowend)"); + } + } + let messageConf = conf2.messageFont(); + _drawTextCandidateFunc(conf2)( + rel.label.text, + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY, + rel.label.width, + rel.label.height, + { fill: textColor }, + messageConf + ); + if (rel.techn && rel.techn.text !== "") { + messageConf = conf2.messageFont(); + _drawTextCandidateFunc(conf2)( + "[" + rel.techn.text + "]", + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY, + Math.max(rel.label.width, rel.techn.width), + rel.techn.height, + { fill: textColor, "font-style": "italic" }, + messageConf + ); + } + } +}; +const drawBoundary$1 = function(elem, boundary, conf2) { + const boundaryElem = elem.append("g"); + let fillColor = boundary.bgColor ? boundary.bgColor : "none"; + let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444"; + let fontColor = boundary.fontColor ? boundary.fontColor : "black"; + let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" }; + if (boundary.nodeType) { + attrsValue = { "stroke-width": 1 }; + } + let rectData = { + x: boundary.x, + y: boundary.y, + fill: fillColor, + stroke: strokeColor, + width: boundary.width, + height: boundary.height, + rx: 2.5, + ry: 2.5, + attrs: attrsValue + }; + drawRect(boundaryElem, rectData); + let boundaryConf = conf2.boundaryFont(); + boundaryConf.fontWeight = "bold"; + boundaryConf.fontSize = boundaryConf.fontSize + 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.label.text, + boundaryElem, + boundary.x, + boundary.y + boundary.label.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + if (boundary.type && boundary.type.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.type.text, + boundaryElem, + boundary.x, + boundary.y + boundary.type.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } + if (boundary.descr && boundary.descr.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontSize = boundaryConf.fontSize - 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.descr.text, + boundaryElem, + boundary.x, + boundary.y + boundary.descr.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } +}; +const drawC4Shape = function(elem, c4Shape, conf2) { + var _a; + let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"]; + let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"]; + let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF"; + let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + switch (c4Shape.typeC4Shape.text) { + case "person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + break; + case "external_person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="; + break; + } + const c4ShapeElem = elem.append("g"); + c4ShapeElem.attr("class", "person-man"); + const rect = getNoteRect(); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + case "system": + case "external_system": + case "container": + case "external_container": + case "component": + case "external_component": + rect.x = c4Shape.x; + rect.y = c4Shape.y; + rect.fill = fillColor; + rect.width = c4Shape.width; + rect.height = c4Shape.height; + rect.stroke = strokeColor; + rect.rx = 2.5; + rect.ry = 2.5; + rect.attrs = { "stroke-width": 0.5 }; + drawRect(c4ShapeElem, rect); + break; + case "system_db": + case "external_system_db": + case "container_db": + case "external_container_db": + case "component_db": + case "external_component_db": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2) + ); + break; + case "system_queue": + case "external_system_queue": + case "container_queue": + case "external_container_queue": + case "component_queue": + case "external_component_queue": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2) + ); + break; + } + let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text); + c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>"); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + drawImage( + c4ShapeElem, + 48, + 48, + c4Shape.x + c4Shape.width / 2 - 24, + c4Shape.y + c4Shape.image.Y, + personImg + ); + break; + } + let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontWeight = "bold"; + textFontConf.fontSize = textFontConf.fontSize + 2; + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + c4Shape.label.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.label.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontColor = fontColor; + if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== "") { + _drawTextCandidateFunc(conf2)( + c4Shape.techn.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.techn.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } else if (c4Shape.type && c4Shape.type.text !== "") { + _drawTextCandidateFunc(conf2)( + c4Shape.type.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.type.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } + if (c4Shape.descr && c4Shape.descr.text !== "") { + textFontConf = conf2.personFont(); + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + c4Shape.descr.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.descr.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + } + return c4Shape.height; +}; +const insertDatabaseIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}; +const insertComputerIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}; +const insertClockIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}; +const insertArrowHead = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); +}; +const insertArrowEnd = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z"); +}; +const insertArrowFilledHead = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const insertDynamicNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}; +const insertArrowCrossHead = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4); + marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7"); +}; +const getC4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { fontSize, fontFamily, fontWeight } = conf2; + const lines = content.split(common.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * fontSize - fontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily); + text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const svgDraw = { + drawRect, + drawBoundary: drawBoundary$1, + drawC4Shape, + drawRels: drawRels$1, + drawImage, + insertArrowHead, + insertArrowEnd, + insertArrowFilledHead, + insertDynamicNumber, + insertArrowCrossHead, + insertDatabaseIcon, + insertComputerIcon, + insertClockIcon +}; +let globalBoundaryMaxX = 0, globalBoundaryMaxY = 0; +let c4ShapeInRow = 4; +let c4BoundaryInRow = 2; +parser.yy = db; +let conf = {}; +class Bounds { + constructor(diagObj) { + 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; + setConf(diagObj.db.getConfig()); + } + setData(startx, stopx, starty, stopy) { + this.nextData.startx = this.data.startx = startx; + this.nextData.stopx = this.data.stopx = stopx; + this.nextData.starty = this.data.starty = starty; + this.nextData.stopy = this.data.stopy = stopy; + } + updateVal(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + } + insert(c4Shape) { + this.nextData.cnt = this.nextData.cnt + 1; + let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2; + let _stopx = _startx + c4Shape.width; + let _starty = this.nextData.starty + c4Shape.margin * 2; + let _stopy = _starty + c4Shape.height; + if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) { + _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX; + _starty = this.nextData.stopy + c4Shape.margin * 2; + this.nextData.stopx = _stopx = _startx + c4Shape.width; + this.nextData.starty = this.nextData.stopy; + this.nextData.stopy = _stopy = _starty + c4Shape.height; + this.nextData.cnt = 1; + } + c4Shape.x = _startx; + c4Shape.y = _starty; + this.updateVal(this.data, "startx", _startx, Math.min); + this.updateVal(this.data, "starty", _starty, Math.min); + this.updateVal(this.data, "stopx", _stopx, Math.max); + this.updateVal(this.data, "stopy", _stopy, Math.max); + this.updateVal(this.nextData, "startx", _startx, Math.min); + this.updateVal(this.nextData, "starty", _starty, Math.min); + this.updateVal(this.nextData, "stopx", _stopx, Math.max); + this.updateVal(this.nextData, "stopy", _stopy, Math.max); + } + init(diagObj) { + 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 + }; + setConf(diagObj.db.getConfig()); + } + bumpLastMargin(margin) { + this.data.stopx += margin; + this.data.stopy += margin; + } +} +const setConf = function(cnf) { + assignWithDepth(conf, cnf); + if (cnf.fontFamily) { + conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight; + } +}; +const c4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; +}; +const boundaryFont = (cnf) => { + return { + fontFamily: cnf.boundaryFontFamily, + fontSize: cnf.boundaryFontSize, + fontWeight: cnf.boundaryFontWeight + }; +}; +const messageFont = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; +}; +function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) { + if (!c4Shape[textType].width) { + if (c4ShapeTextWrap) { + c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf); + c4Shape[textType].textLines = c4Shape[textType].text.split(common.lineBreakRegex).length; + c4Shape[textType].width = textLimitWidth; + c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf); + } else { + let lines = c4Shape[textType].text.split(common.lineBreakRegex); + c4Shape[textType].textLines = lines.length; + let lineHeight = 0; + c4Shape[textType].height = 0; + c4Shape[textType].width = 0; + for (const line of lines) { + c4Shape[textType].width = Math.max( + calculateTextWidth(line, textConf), + c4Shape[textType].width + ); + lineHeight = calculateTextHeight(line, textConf); + c4Shape[textType].height = c4Shape[textType].height + lineHeight; + } + } + } +} +const drawBoundary = function(diagram2, boundary, bounds) { + boundary.x = bounds.data.startx; + boundary.y = bounds.data.starty; + boundary.width = bounds.data.stopx - bounds.data.startx; + boundary.height = bounds.data.stopy - bounds.data.starty; + boundary.label.y = conf.c4ShapeMargin - 35; + let boundaryTextWrap = boundary.wrap && conf.wrap; + let boundaryLabelConf = boundaryFont(conf); + boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2; + boundaryLabelConf.fontWeight = "bold"; + let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf); + calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth); + svgDraw.drawBoundary(diagram2, boundary, conf); +}; +const drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) { + let Y = 0; + for (const c4ShapeKey of c4ShapeKeys) { + Y = 0; + const c4Shape = c4ShapeArray2[c4ShapeKey]; + let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2; + c4Shape.typeC4Shape.width = calculateTextWidth( + "«" + c4Shape.typeC4Shape.text + "»", + c4ShapeTypeConf + ); + c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2; + c4Shape.typeC4Shape.Y = conf.c4ShapePadding; + Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4; + c4Shape.image = { width: 0, height: 0, Y: 0 }; + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + break; + } + if (c4Shape.sprite) { + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + } + let c4ShapeTextWrap = c4Shape.wrap && conf.wrap; + let textLimitWidth = conf.width - conf.c4ShapePadding * 2; + let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2; + c4ShapeLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth); + c4Shape["label"].Y = Y + 8; + Y = c4Shape["label"].Y + c4Shape["label"].height; + if (c4Shape.type && c4Shape.type.text !== "") { + c4Shape.type.text = "[" + c4Shape.type.text + "]"; + let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth); + c4Shape["type"].Y = Y + 5; + Y = c4Shape["type"].Y + c4Shape["type"].height; + } else if (c4Shape.techn && c4Shape.techn.text !== "") { + c4Shape.techn.text = "[" + c4Shape.techn.text + "]"; + let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text); + calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth); + c4Shape["techn"].Y = Y + 5; + Y = c4Shape["techn"].Y + c4Shape["techn"].height; + } + let rectHeight = Y; + let rectWidth = c4Shape.label.width; + if (c4Shape.descr && c4Shape.descr.text !== "") { + let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth); + c4Shape["descr"].Y = Y + 20; + Y = c4Shape["descr"].Y + c4Shape["descr"].height; + rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width); + rectHeight = Y - c4Shape["descr"].textLines * 5; + } + rectWidth = rectWidth + conf.c4ShapePadding; + c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width); + c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height); + c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin; + currentBounds.insert(c4Shape); + svgDraw.drawC4Shape(diagram2, c4Shape, conf); + } + currentBounds.bumpLastMargin(conf.c4ShapeMargin); +}; +class Point { + constructor(x, y) { + this.x = x; + this.y = y; + } +} +let getIntersectPoint = function(fromNode, endPoint) { + let x1 = fromNode.x; + let y1 = fromNode.y; + let x2 = endPoint.x; + let y2 = endPoint.y; + let fromCenterX = x1 + fromNode.width / 2; + let fromCenterY = y1 + fromNode.height / 2; + let dx = Math.abs(x1 - x2); + let dy = Math.abs(y1 - y2); + let tanDYX = dy / dx; + let fromDYX = fromNode.height / fromNode.width; + let returnPoint = null; + if (y1 == y2 && x1 < x2) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY); + } else if (y1 == y2 && x1 > x2) { + returnPoint = new Point(x1, fromCenterY); + } else if (x1 == x2 && y1 < y2) { + returnPoint = new Point(fromCenterX, y1 + fromNode.height); + } else if (x1 == x2 && y1 > y2) { + returnPoint = new Point(fromCenterX, y1); + } + if (x1 > x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point( + fromCenterX - dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point( + fromCenterX + dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1); + } + } else if (x1 > x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX); + } else { + returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1); + } + } + return returnPoint; +}; +let getIntersectPoints = function(fromNode, endNode) { + let endIntersectPoint = { x: 0, y: 0 }; + endIntersectPoint.x = endNode.x + endNode.width / 2; + endIntersectPoint.y = endNode.y + endNode.height / 2; + let startPoint = getIntersectPoint(fromNode, endIntersectPoint); + endIntersectPoint.x = fromNode.x + fromNode.width / 2; + endIntersectPoint.y = fromNode.y + fromNode.height / 2; + let endPoint = getIntersectPoint(endNode, endIntersectPoint); + return { startPoint, endPoint }; +}; +const drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) { + let i = 0; + for (let rel of rels2) { + i = i + 1; + let relTextWrap = rel.wrap && conf.wrap; + let relConf = messageFont(conf); + let diagramType = diagObj.db.getC4Type(); + if (diagramType === "C4Dynamic") { + rel.label.text = i + ": " + rel.label.text; + } + let textLimitWidth = calculateTextWidth(rel.label.text, relConf); + calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth); + if (rel.techn && rel.techn.text !== "") { + textLimitWidth = calculateTextWidth(rel.techn.text, relConf); + calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth); + } + if (rel.descr && rel.descr.text !== "") { + textLimitWidth = calculateTextWidth(rel.descr.text, relConf); + calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth); + } + let fromNode = getC4ShapeObj(rel.from); + let endNode = getC4ShapeObj(rel.to); + let points = getIntersectPoints(fromNode, endNode); + rel.startPoint = points.startPoint; + rel.endPoint = points.endPoint; + } + svgDraw.drawRels(diagram2, rels2, conf); +}; +function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) { + let currentBounds = new Bounds(diagObj); + currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length); + for (let [i, currentBoundary] of currentBoundaries.entries()) { + let Y = 0; + currentBoundary.image = { width: 0, height: 0, Y: 0 }; + if (currentBoundary.sprite) { + currentBoundary.image.width = 48; + currentBoundary.image.height = 48; + currentBoundary.image.Y = Y; + Y = currentBoundary.image.Y + currentBoundary.image.height; + } + let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap; + let currentBoundaryLabelConf = boundaryFont(conf); + currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2; + currentBoundaryLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH( + "label", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryLabelConf, + currentBounds.data.widthLimit + ); + currentBoundary["label"].Y = Y + 8; + Y = currentBoundary["label"].Y + currentBoundary["label"].height; + if (currentBoundary.type && currentBoundary.type.text !== "") { + currentBoundary.type.text = "[" + currentBoundary.type.text + "]"; + let currentBoundaryTypeConf = boundaryFont(conf); + calcC4ShapeTextWH( + "type", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryTypeConf, + currentBounds.data.widthLimit + ); + currentBoundary["type"].Y = Y + 5; + Y = currentBoundary["type"].Y + currentBoundary["type"].height; + } + if (currentBoundary.descr && currentBoundary.descr.text !== "") { + let currentBoundaryDescrConf = boundaryFont(conf); + currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2; + calcC4ShapeTextWH( + "descr", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryDescrConf, + currentBounds.data.widthLimit + ); + currentBoundary["descr"].Y = Y + 20; + Y = currentBoundary["descr"].Y + currentBoundary["descr"].height; + } + if (i == 0 || i % c4BoundaryInRow === 0) { + let _x = parentBounds.data.startx + conf.diagramMarginX; + let _y = parentBounds.data.stopy + conf.diagramMarginY + Y; + currentBounds.setData(_x, _x, _y, _y); + } else { + let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx; + let _y = currentBounds.data.starty; + currentBounds.setData(_x, _x, _y, _y); + } + currentBounds.name = currentBoundary.alias; + let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias); + let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias); + if (currentPersonOrSystemKeys.length > 0) { + drawC4ShapeArray( + currentBounds, + diagram2, + currentPersonOrSystemArray, + currentPersonOrSystemKeys + ); + } + parentBoundaryAlias = currentBoundary.alias; + let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias); + if (nextCurrentBoundarys.length > 0) { + drawInsideBoundary( + diagram2, + parentBoundaryAlias, + currentBounds, + nextCurrentBoundarys, + diagObj + ); + } + if (currentBoundary.alias !== "global") { + drawBoundary(diagram2, currentBoundary, currentBounds); + } + parentBounds.data.stopy = Math.max( + currentBounds.data.stopy + conf.c4ShapeMargin, + parentBounds.data.stopy + ); + parentBounds.data.stopx = Math.max( + currentBounds.data.stopx + conf.c4ShapeMargin, + parentBounds.data.stopx + ); + globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx); + globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy); + } +} +const draw = function(_text, id, _version, diagObj) { + conf = getConfig().c4; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + let db2 = diagObj.db; + diagObj.db.setWrap(conf.wrap); + c4ShapeInRow = db2.getC4ShapeInRow(); + c4BoundaryInRow = db2.getC4BoundaryInRow(); + log.debug(`C:${JSON.stringify(conf, null, 2)}`); + const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select(`[id="${id}"]`); + svgDraw.insertComputerIcon(diagram2); + svgDraw.insertDatabaseIcon(diagram2); + svgDraw.insertClockIcon(diagram2); + let screenBounds = new Bounds(diagObj); + screenBounds.setData( + conf.diagramMarginX, + conf.diagramMarginX, + conf.diagramMarginY, + conf.diagramMarginY + ); + screenBounds.data.widthLimit = screen.availWidth; + globalBoundaryMaxX = conf.diagramMarginX; + globalBoundaryMaxY = conf.diagramMarginY; + const title2 = diagObj.db.getTitle(); + let currentBoundaries = diagObj.db.getBoundarys(""); + drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj); + svgDraw.insertArrowHead(diagram2); + svgDraw.insertArrowEnd(diagram2); + svgDraw.insertArrowCrossHead(diagram2); + svgDraw.insertArrowFilledHead(diagram2); + drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj); + screenBounds.data.stopx = globalBoundaryMaxX; + screenBounds.data.stopy = globalBoundaryMaxY; + const box = screenBounds.data; + let boxHeight = box.stopy - box.starty; + let height = boxHeight + 2 * conf.diagramMarginY; + let boxWidth = box.stopx - box.startx; + const width = boxWidth + 2 * conf.diagramMarginX; + if (title2) { + diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY); + } + configureSvgSize(diagram2, height, width, conf.useMaxWidth); + const extraVertForTitle = title2 ? 60 : 0; + diagram2.attr( + "viewBox", + box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); + log.debug(`models:`, box); +}; +const renderer = { + drawPersonOrSystemArray: drawC4ShapeArray, + drawBoundary, + setConf, + draw +}; +const getStyles = (options) => `.person { + stroke: ${options.personBorder}; + fill: ${options.personBkg}; + } +`; +const styles = getStyles; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: ({ c4, wrap }) => { + renderer.setConf(c4); + db.setWrap(wrap); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/c4Diagram-be6d31b5.js b/webroot/js/node_modules/mermaid/dist/c4Diagram-be6d31b5.js new file mode 100644 index 0000000..c31114a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/c4Diagram-be6d31b5.js @@ -0,0 +1,1578 @@ +import { s as ve, g as we, a as Oe, b as Te, c as Dt, d as ue, e as Re, f as Kt, h as De, i as wt, j as Nt, l as le, k as Se, w as Pe, m as oe } from "./mermaid-e4a58915.js"; +import { d as Me, g as Le } from "./svgDrawCommon-1021982e.js"; +var Yt = function() { + var e = function(bt, _, x, m) { + for (x = x || {}, m = bt.length; m--; x[bt[m]] = _) + ; + return x; + }, t = [1, 24], r = [1, 25], o = [1, 26], l = [1, 27], n = [1, 28], a = [1, 63], s = [1, 64], i = [1, 65], u = [1, 66], d = [1, 67], f = [1, 68], p = [1, 69], E = [1, 29], O = [1, 30], R = [1, 31], S = [1, 32], L = [1, 33], Y = [1, 34], Q = [1, 35], H = [1, 36], q = [1, 37], G = [1, 38], K = [1, 39], J = [1, 40], Z = [1, 41], $ = [1, 42], tt = [1, 43], et = [1, 44], nt = [1, 45], it = [1, 46], st = [1, 47], at = [1, 48], rt = [1, 50], lt = [1, 51], ot = [1, 52], ct = [1, 53], ht = [1, 54], ut = [1, 55], dt = [1, 56], ft = [1, 57], pt = [1, 58], yt = [1, 59], gt = [1, 60], Ct = [14, 42], Vt = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], Ot = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], k = [1, 82], A = [1, 83], C = [1, 84], v = [1, 85], w = [12, 14, 42], ie = [12, 14, 33, 42], Pt = [12, 14, 33, 42, 76, 77, 79, 80], mt = [12, 33], zt = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], Xt = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, mermaidDoc: 4, direction: 5, direction_tb: 6, direction_bt: 7, direction_rl: 8, direction_lr: 9, graphConfig: 10, C4_CONTEXT: 11, NEWLINE: 12, statements: 13, EOF: 14, C4_CONTAINER: 15, C4_COMPONENT: 16, C4_DYNAMIC: 17, C4_DEPLOYMENT: 18, otherStatements: 19, diagramStatements: 20, otherStatement: 21, title: 22, accDescription: 23, acc_title: 24, acc_title_value: 25, acc_descr: 26, acc_descr_value: 27, acc_descr_multiline_value: 28, boundaryStatement: 29, boundaryStartStatement: 30, boundaryStopStatement: 31, boundaryStart: 32, LBRACE: 33, ENTERPRISE_BOUNDARY: 34, attributes: 35, SYSTEM_BOUNDARY: 36, BOUNDARY: 37, CONTAINER_BOUNDARY: 38, NODE: 39, NODE_L: 40, NODE_R: 41, RBRACE: 42, diagramStatement: 43, PERSON: 44, PERSON_EXT: 45, SYSTEM: 46, SYSTEM_DB: 47, SYSTEM_QUEUE: 48, SYSTEM_EXT: 49, SYSTEM_EXT_DB: 50, SYSTEM_EXT_QUEUE: 51, CONTAINER: 52, CONTAINER_DB: 53, CONTAINER_QUEUE: 54, CONTAINER_EXT: 55, CONTAINER_EXT_DB: 56, CONTAINER_EXT_QUEUE: 57, COMPONENT: 58, COMPONENT_DB: 59, COMPONENT_QUEUE: 60, COMPONENT_EXT: 61, COMPONENT_EXT_DB: 62, COMPONENT_EXT_QUEUE: 63, REL: 64, BIREL: 65, REL_U: 66, REL_D: 67, REL_L: 68, REL_R: 69, REL_B: 70, REL_INDEX: 71, UPDATE_EL_STYLE: 72, UPDATE_REL_STYLE: 73, UPDATE_LAYOUT_CONFIG: 74, attribute: 75, STR: 76, STR_KEY: 77, STR_VALUE: 78, ATTRIBUTE: 79, ATTRIBUTE_EMPTY: 80, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" }, + productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]], + performAction: function(_, x, m, g, T, h, Tt) { + var y = h.length - 1; + switch (T) { + case 3: + g.setDirection("TB"); + break; + case 4: + g.setDirection("BT"); + break; + case 5: + g.setDirection("RL"); + break; + case 6: + g.setDirection("LR"); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + g.setC4Type(h[y - 3]); + break; + case 19: + g.setTitle(h[y].substring(6)), this.$ = h[y].substring(6); + break; + case 20: + g.setAccDescription(h[y].substring(15)), this.$ = h[y].substring(15); + break; + case 21: + this.$ = h[y].trim(), g.setTitle(this.$); + break; + case 22: + case 23: + this.$ = h[y].trim(), g.setAccDescription(this.$); + break; + case 28: + case 29: + h[y].splice(2, 0, "ENTERPRISE"), g.addPersonOrSystemBoundary(...h[y]), this.$ = h[y]; + break; + case 30: + g.addPersonOrSystemBoundary(...h[y]), this.$ = h[y]; + break; + case 31: + h[y].splice(2, 0, "CONTAINER"), g.addContainerBoundary(...h[y]), this.$ = h[y]; + break; + case 32: + g.addDeploymentNode("node", ...h[y]), this.$ = h[y]; + break; + case 33: + g.addDeploymentNode("nodeL", ...h[y]), this.$ = h[y]; + break; + case 34: + g.addDeploymentNode("nodeR", ...h[y]), this.$ = h[y]; + break; + case 35: + g.popBoundaryParseStack(); + break; + case 39: + g.addPersonOrSystem("person", ...h[y]), this.$ = h[y]; + break; + case 40: + g.addPersonOrSystem("external_person", ...h[y]), this.$ = h[y]; + break; + case 41: + g.addPersonOrSystem("system", ...h[y]), this.$ = h[y]; + break; + case 42: + g.addPersonOrSystem("system_db", ...h[y]), this.$ = h[y]; + break; + case 43: + g.addPersonOrSystem("system_queue", ...h[y]), this.$ = h[y]; + break; + case 44: + g.addPersonOrSystem("external_system", ...h[y]), this.$ = h[y]; + break; + case 45: + g.addPersonOrSystem("external_system_db", ...h[y]), this.$ = h[y]; + break; + case 46: + g.addPersonOrSystem("external_system_queue", ...h[y]), this.$ = h[y]; + break; + case 47: + g.addContainer("container", ...h[y]), this.$ = h[y]; + break; + case 48: + g.addContainer("container_db", ...h[y]), this.$ = h[y]; + break; + case 49: + g.addContainer("container_queue", ...h[y]), this.$ = h[y]; + break; + case 50: + g.addContainer("external_container", ...h[y]), this.$ = h[y]; + break; + case 51: + g.addContainer("external_container_db", ...h[y]), this.$ = h[y]; + break; + case 52: + g.addContainer("external_container_queue", ...h[y]), this.$ = h[y]; + break; + case 53: + g.addComponent("component", ...h[y]), this.$ = h[y]; + break; + case 54: + g.addComponent("component_db", ...h[y]), this.$ = h[y]; + break; + case 55: + g.addComponent("component_queue", ...h[y]), this.$ = h[y]; + break; + case 56: + g.addComponent("external_component", ...h[y]), this.$ = h[y]; + break; + case 57: + g.addComponent("external_component_db", ...h[y]), this.$ = h[y]; + break; + case 58: + g.addComponent("external_component_queue", ...h[y]), this.$ = h[y]; + break; + case 60: + g.addRel("rel", ...h[y]), this.$ = h[y]; + break; + case 61: + g.addRel("birel", ...h[y]), this.$ = h[y]; + break; + case 62: + g.addRel("rel_u", ...h[y]), this.$ = h[y]; + break; + case 63: + g.addRel("rel_d", ...h[y]), this.$ = h[y]; + break; + case 64: + g.addRel("rel_l", ...h[y]), this.$ = h[y]; + break; + case 65: + g.addRel("rel_r", ...h[y]), this.$ = h[y]; + break; + case 66: + g.addRel("rel_b", ...h[y]), this.$ = h[y]; + break; + case 67: + h[y].splice(0, 1), g.addRel("rel", ...h[y]), this.$ = h[y]; + break; + case 68: + g.updateElStyle("update_el_style", ...h[y]), this.$ = h[y]; + break; + case 69: + g.updateRelStyle("update_rel_style", ...h[y]), this.$ = h[y]; + break; + case 70: + g.updateLayoutConfig("update_layout_config", ...h[y]), this.$ = h[y]; + break; + case 71: + this.$ = [h[y]]; + break; + case 72: + h[y].unshift(h[y - 1]), this.$ = h[y]; + break; + case 73: + case 75: + this.$ = h[y].trim(); + break; + case 74: + let Et = {}; + Et[h[y - 1].trim()] = h[y].trim(), this.$ = Et; + break; + case 76: + this.$ = ""; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 43: 23, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 43: 23, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 43: 23, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 43: 23, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 43: 23, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 14: [1, 74] }, e(Ct, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }), e(Ct, [2, 14]), e(Vt, [2, 16], { 12: [1, 76] }), e(Ct, [2, 36], { 12: [1, 77] }), e(Ot, [2, 19]), e(Ot, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, e(Ot, [2, 23]), { 35: 80, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 86, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 87, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 88, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 89, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 90, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 91, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 92, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 93, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 94, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 95, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 96, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 97, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 98, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 99, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 100, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 101, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 102, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 103, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 104, 75: 81, 76: k, 77: A, 79: C, 80: v }, e(w, [2, 59]), { 35: 105, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 106, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 107, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 108, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 109, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 110, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 111, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 112, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 113, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 114, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 115, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 43: 23, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 120, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 121, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 122, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 123, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 124, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 35: 125, 75: 81, 76: k, 77: A, 79: C, 80: v }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, e(Ct, [2, 15]), e(Vt, [2, 17], { 21: 22, 19: 130, 22: t, 23: r, 24: o, 26: l, 28: n }), e(Ct, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: t, 23: r, 24: o, 26: l, 28: n, 34: a, 36: s, 37: i, 38: u, 39: d, 40: f, 41: p, 44: E, 45: O, 46: R, 47: S, 48: L, 49: Y, 50: Q, 51: H, 52: q, 53: G, 54: K, 55: J, 56: Z, 57: $, 58: tt, 59: et, 60: nt, 61: it, 62: st, 63: at, 64: rt, 65: lt, 66: ot, 67: ct, 68: ht, 69: ut, 70: dt, 71: ft, 72: pt, 73: yt, 74: gt }), e(Ot, [2, 21]), e(Ot, [2, 22]), e(w, [2, 39]), e(ie, [2, 71], { 75: 81, 35: 132, 76: k, 77: A, 79: C, 80: v }), e(Pt, [2, 73]), { 78: [1, 133] }, e(Pt, [2, 75]), e(Pt, [2, 76]), e(w, [2, 40]), e(w, [2, 41]), e(w, [2, 42]), e(w, [2, 43]), e(w, [2, 44]), e(w, [2, 45]), e(w, [2, 46]), e(w, [2, 47]), e(w, [2, 48]), e(w, [2, 49]), e(w, [2, 50]), e(w, [2, 51]), e(w, [2, 52]), e(w, [2, 53]), e(w, [2, 54]), e(w, [2, 55]), e(w, [2, 56]), e(w, [2, 57]), e(w, [2, 58]), e(w, [2, 60]), e(w, [2, 61]), e(w, [2, 62]), e(w, [2, 63]), e(w, [2, 64]), e(w, [2, 65]), e(w, [2, 66]), e(w, [2, 67]), e(w, [2, 68]), e(w, [2, 69]), e(w, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, e(mt, [2, 28]), e(mt, [2, 29]), e(mt, [2, 30]), e(mt, [2, 31]), e(mt, [2, 32]), e(mt, [2, 33]), e(mt, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, e(Vt, [2, 18]), e(Ct, [2, 38]), e(ie, [2, 72]), e(Pt, [2, 74]), e(w, [2, 24]), e(w, [2, 35]), e(zt, [2, 25]), e(zt, [2, 26], { 12: [1, 138] }), e(zt, [2, 27])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] }, + parseError: function(_, x) { + if (x.recoverable) + this.trace(_); + else { + var m = new Error(_); + throw m.hash = x, m; + } + }, + parse: function(_) { + var x = this, m = [0], g = [], T = [null], h = [], Tt = this.table, y = "", Et = 0, se = 0, Ee = 2, ae = 1, ke = h.slice.call(arguments, 1), D = Object.create(this.lexer), kt = { yy: {} }; + for (var Qt in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, Qt) && (kt.yy[Qt] = this.yy[Qt]); + D.setInput(_, kt.yy), kt.yy.lexer = D, kt.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {}); + var Ht = D.yylloc; + h.push(Ht); + var Ae = D.options && D.options.ranges; + typeof kt.yy.parseError == "function" ? this.parseError = kt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function Ce() { + var X; + return X = g.pop() || D.lex() || ae, typeof X != "number" && (X instanceof Array && (g = X, X = g.pop()), X = x.symbols_[X] || X), X; + } + for (var M, At, N, qt, vt = {}, Mt, z, re, Lt; ; ) { + if (At = m[m.length - 1], this.defaultActions[At] ? N = this.defaultActions[At] : ((M === null || typeof M > "u") && (M = Ce()), N = Tt[At] && Tt[At][M]), typeof N > "u" || !N.length || !N[0]) { + var Gt = ""; + Lt = []; + for (Mt in Tt[At]) + this.terminals_[Mt] && Mt > Ee && Lt.push("'" + this.terminals_[Mt] + "'"); + D.showPosition ? Gt = "Parse error on line " + (Et + 1) + `: +` + D.showPosition() + ` +Expecting ` + Lt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : Gt = "Parse error on line " + (Et + 1) + ": Unexpected " + (M == ae ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(Gt, { + text: D.match, + token: this.terminals_[M] || M, + line: D.yylineno, + loc: Ht, + expected: Lt + }); + } + if (N[0] instanceof Array && N.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + At + ", token: " + M); + switch (N[0]) { + case 1: + m.push(M), T.push(D.yytext), h.push(D.yylloc), m.push(N[1]), M = null, se = D.yyleng, y = D.yytext, Et = D.yylineno, Ht = D.yylloc; + break; + case 2: + if (z = this.productions_[N[1]][1], vt.$ = T[T.length - z], vt._$ = { + first_line: h[h.length - (z || 1)].first_line, + last_line: h[h.length - 1].last_line, + first_column: h[h.length - (z || 1)].first_column, + last_column: h[h.length - 1].last_column + }, Ae && (vt._$.range = [ + h[h.length - (z || 1)].range[0], + h[h.length - 1].range[1] + ]), qt = this.performAction.apply(vt, [ + y, + se, + Et, + kt.yy, + N[1], + T, + h + ].concat(ke)), typeof qt < "u") + return qt; + z && (m = m.slice(0, -1 * z * 2), T = T.slice(0, -1 * z), h = h.slice(0, -1 * z)), m.push(this.productions_[N[1]][0]), T.push(vt.$), h.push(vt._$), re = Tt[m[m.length - 2]][m[m.length - 1]], m.push(re); + break; + case 3: + return !0; + } + } + return !0; + } + }, me = function() { + var bt = { + EOF: 1, + parseError: function(x, m) { + if (this.yy.parser) + this.yy.parser.parseError(x, m); + else + throw new Error(x); + }, + // resets the lexer, sets new input + setInput: function(_, x) { + return this.yy = x || this.yy || {}, this._input = _, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var _ = this._input[0]; + this.yytext += _, this.yyleng++, this.offset++, this.match += _, this.matched += _; + var x = _.match(/(?:\r\n?|\n).*/g); + return x ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), _; + }, + // unshifts one char (or a string) into the input + unput: function(_) { + var x = _.length, m = _.split(/(?:\r\n?|\n)/g); + this._input = _ + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - x), this.offset -= x; + var g = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), m.length - 1 && (this.yylineno -= m.length - 1); + var T = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: m ? (m.length === g.length ? this.yylloc.first_column : 0) + g[g.length - m.length].length - m[0].length : this.yylloc.first_column - x + }, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - x]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(_) { + this.unput(this.match.slice(_)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var _ = this.matched.substr(0, this.matched.length - this.match.length); + return (_.length > 20 ? "..." : "") + _.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var _ = this.match; + return _.length < 20 && (_ += this._input.substr(0, 20 - _.length)), (_.substr(0, 20) + (_.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var _ = this.pastInput(), x = new Array(_.length + 1).join("-"); + return _ + this.upcomingInput() + ` +` + x + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(_, x) { + var m, g, T; + if (this.options.backtrack_lexer && (T = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), g = _[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + _[0].length + }, this.yytext += _[0], this.match += _[0], this.matches = _, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(_[0].length), this.matched += _[0], m = this.performAction.call(this, this.yy, this, x, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), m) + return m; + if (this._backtrack) { + for (var h in T) + this[h] = T[h]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var _, x, m, g; + this._more || (this.yytext = "", this.match = ""); + for (var T = this._currentRules(), h = 0; h < T.length; h++) + if (m = this._input.match(this.rules[T[h]]), m && (!x || m[0].length > x[0].length)) { + if (x = m, g = h, this.options.backtrack_lexer) { + if (_ = this.test_match(m, T[h]), _ !== !1) + return _; + if (this._backtrack) { + x = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return x ? (_ = this.test_match(x, T[g]), _ !== !1 ? _ : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var x = this.next(); + return x || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(x) { + this.conditionStack.push(x); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var x = this.conditionStack.length - 1; + return x > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(x) { + return x = this.conditionStack.length - 1 - Math.abs(x || 0), x >= 0 ? this.conditionStack[x] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(x) { + this.begin(x); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: {}, + performAction: function(x, m, g, T) { + switch (g) { + case 0: + return 6; + case 1: + return 7; + case 2: + return 8; + case 3: + return 9; + case 4: + return 22; + case 5: + return 23; + case 6: + return this.begin("acc_title"), 24; + case 7: + return this.popState(), "acc_title_value"; + case 8: + return this.begin("acc_descr"), 26; + case 9: + return this.popState(), "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + break; + case 14: + c; + break; + case 15: + return 12; + case 16: + break; + case 17: + return 11; + case 18: + return 15; + case 19: + return 16; + case 20: + return 17; + case 21: + return 18; + case 22: + return this.begin("person_ext"), 45; + case 23: + return this.begin("person"), 44; + case 24: + return this.begin("system_ext_queue"), 51; + case 25: + return this.begin("system_ext_db"), 50; + case 26: + return this.begin("system_ext"), 49; + case 27: + return this.begin("system_queue"), 48; + case 28: + return this.begin("system_db"), 47; + case 29: + return this.begin("system"), 46; + case 30: + return this.begin("boundary"), 37; + case 31: + return this.begin("enterprise_boundary"), 34; + case 32: + return this.begin("system_boundary"), 36; + case 33: + return this.begin("container_ext_queue"), 57; + case 34: + return this.begin("container_ext_db"), 56; + case 35: + return this.begin("container_ext"), 55; + case 36: + return this.begin("container_queue"), 54; + case 37: + return this.begin("container_db"), 53; + case 38: + return this.begin("container"), 52; + case 39: + return this.begin("container_boundary"), 38; + case 40: + return this.begin("component_ext_queue"), 63; + case 41: + return this.begin("component_ext_db"), 62; + case 42: + return this.begin("component_ext"), 61; + case 43: + return this.begin("component_queue"), 60; + case 44: + return this.begin("component_db"), 59; + case 45: + return this.begin("component"), 58; + case 46: + return this.begin("node"), 39; + case 47: + return this.begin("node"), 39; + case 48: + return this.begin("node_l"), 40; + case 49: + return this.begin("node_r"), 41; + case 50: + return this.begin("rel"), 64; + case 51: + return this.begin("birel"), 65; + case 52: + return this.begin("rel_u"), 66; + case 53: + return this.begin("rel_u"), 66; + case 54: + return this.begin("rel_d"), 67; + case 55: + return this.begin("rel_d"), 67; + case 56: + return this.begin("rel_l"), 68; + case 57: + return this.begin("rel_l"), 68; + case 58: + return this.begin("rel_r"), 69; + case 59: + return this.begin("rel_r"), 69; + case 60: + return this.begin("rel_b"), 70; + case 61: + return this.begin("rel_index"), 71; + case 62: + return this.begin("update_el_style"), 72; + case 63: + return this.begin("update_rel_style"), 73; + case 64: + return this.begin("update_layout_config"), 74; + case 65: + return "EOF_IN_STRUCT"; + case 66: + return this.begin("attribute"), "ATTRIBUTE_EMPTY"; + case 67: + this.begin("attribute"); + break; + case 68: + this.popState(), this.popState(); + break; + case 69: + return 80; + case 70: + break; + case 71: + return 80; + case 72: + this.begin("string"); + break; + case 73: + this.popState(); + break; + case 74: + return "STR"; + case 75: + this.begin("string_kv"); + break; + case 76: + return this.begin("string_kv_key"), "STR_KEY"; + case 77: + this.popState(), this.begin("string_kv_value"); + break; + case 78: + return "STR_VALUE"; + case 79: + this.popState(), this.popState(); + break; + case 80: + return "STR"; + case 81: + return "LBRACE"; + case 82: + return "RBRACE"; + case 83: + return "SPACE"; + case 84: + return "EOL"; + case 85: + return 14; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/], + conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, string_kv_value: { rules: [78, 79], inclusive: !1 }, string_kv_key: { rules: [77], inclusive: !1 }, string_kv: { rules: [76], inclusive: !1 }, string: { rules: [73, 74], inclusive: !1 }, attribute: { rules: [68, 69, 70, 71, 72, 75, 80], inclusive: !1 }, update_layout_config: { rules: [65, 66, 67, 68], inclusive: !1 }, update_rel_style: { rules: [65, 66, 67, 68], inclusive: !1 }, update_el_style: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_b: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_r: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_l: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_d: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_u: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [65, 66, 67, 68], inclusive: !1 }, node_r: { rules: [65, 66, 67, 68], inclusive: !1 }, node_l: { rules: [65, 66, 67, 68], inclusive: !1 }, node: { rules: [65, 66, 67, 68], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, component_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, component_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component: { rules: [65, 66, 67, 68], inclusive: !1 }, container_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, container_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container: { rules: [65, 66, 67, 68], inclusive: !1 }, birel: { rules: [65, 66, 67, 68], inclusive: !1 }, system_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, enterprise_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, system_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system: { rules: [65, 66, 67, 68], inclusive: !1 }, person_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, person: { rules: [65, 66, 67, 68], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], inclusive: !0 } } + }; + return bt; + }(); + Xt.lexer = me; + function Wt() { + this.yy = {}; + } + return Wt.prototype = Xt, Xt.Parser = Wt, new Wt(); +}(); +Yt.parser = Yt; +const Ne = Yt; +let U = [], _t = [""], P = "global", j = "", V = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } +], St = [], te = "", ee = !1, It = 4, jt = 2; +var de; +const Be = function() { + return de; +}, Ye = function(e) { + de = ue(e, Dt()); +}, Ie = function(e, t, r, o, l, n, a, s, i) { + if (e == null || t === void 0 || t === null || r === void 0 || r === null || o === void 0 || o === null) + return; + let u = {}; + const d = St.find((f) => f.from === t && f.to === r); + if (d ? u = d : St.push(u), u.type = e, u.from = t, u.to = r, u.label = { text: o }, l == null) + u.techn = { text: "" }; + else if (typeof l == "object") { + let [f, p] = Object.entries(l)[0]; + u[f] = { text: p }; + } else + u.techn = { text: l }; + if (n == null) + u.descr = { text: "" }; + else if (typeof n == "object") { + let [f, p] = Object.entries(n)[0]; + u[f] = { text: p }; + } else + u.descr = { text: n }; + if (typeof a == "object") { + let [f, p] = Object.entries(a)[0]; + u[f] = p; + } else + u.sprite = a; + if (typeof s == "object") { + let [f, p] = Object.entries(s)[0]; + u[f] = p; + } else + u.tags = s; + if (typeof i == "object") { + let [f, p] = Object.entries(i)[0]; + u[f] = p; + } else + u.link = i; + u.wrap = xt(); +}, je = function(e, t, r, o, l, n, a) { + if (t === null || r === null) + return; + let s = {}; + const i = U.find((u) => u.alias === t); + if (i && t === i.alias ? s = i : (s.alias = t, U.push(s)), r == null ? s.label = { text: "" } : s.label = { text: r }, o == null) + s.descr = { text: "" }; + else if (typeof o == "object") { + let [u, d] = Object.entries(o)[0]; + s[u] = { text: d }; + } else + s.descr = { text: o }; + if (typeof l == "object") { + let [u, d] = Object.entries(l)[0]; + s[u] = d; + } else + s.sprite = l; + if (typeof n == "object") { + let [u, d] = Object.entries(n)[0]; + s[u] = d; + } else + s.tags = n; + if (typeof a == "object") { + let [u, d] = Object.entries(a)[0]; + s[u] = d; + } else + s.link = a; + s.typeC4Shape = { text: e }, s.parentBoundary = P, s.wrap = xt(); +}, Ue = function(e, t, r, o, l, n, a, s) { + if (t === null || r === null) + return; + let i = {}; + const u = U.find((d) => d.alias === t); + if (u && t === u.alias ? i = u : (i.alias = t, U.push(i)), r == null ? i.label = { text: "" } : i.label = { text: r }, o == null) + i.techn = { text: "" }; + else if (typeof o == "object") { + let [d, f] = Object.entries(o)[0]; + i[d] = { text: f }; + } else + i.techn = { text: o }; + if (l == null) + i.descr = { text: "" }; + else if (typeof l == "object") { + let [d, f] = Object.entries(l)[0]; + i[d] = { text: f }; + } else + i.descr = { text: l }; + if (typeof n == "object") { + let [d, f] = Object.entries(n)[0]; + i[d] = f; + } else + i.sprite = n; + if (typeof a == "object") { + let [d, f] = Object.entries(a)[0]; + i[d] = f; + } else + i.tags = a; + if (typeof s == "object") { + let [d, f] = Object.entries(s)[0]; + i[d] = f; + } else + i.link = s; + i.wrap = xt(), i.typeC4Shape = { text: e }, i.parentBoundary = P; +}, Fe = function(e, t, r, o, l, n, a, s) { + if (t === null || r === null) + return; + let i = {}; + const u = U.find((d) => d.alias === t); + if (u && t === u.alias ? i = u : (i.alias = t, U.push(i)), r == null ? i.label = { text: "" } : i.label = { text: r }, o == null) + i.techn = { text: "" }; + else if (typeof o == "object") { + let [d, f] = Object.entries(o)[0]; + i[d] = { text: f }; + } else + i.techn = { text: o }; + if (l == null) + i.descr = { text: "" }; + else if (typeof l == "object") { + let [d, f] = Object.entries(l)[0]; + i[d] = { text: f }; + } else + i.descr = { text: l }; + if (typeof n == "object") { + let [d, f] = Object.entries(n)[0]; + i[d] = f; + } else + i.sprite = n; + if (typeof a == "object") { + let [d, f] = Object.entries(a)[0]; + i[d] = f; + } else + i.tags = a; + if (typeof s == "object") { + let [d, f] = Object.entries(s)[0]; + i[d] = f; + } else + i.link = s; + i.wrap = xt(), i.typeC4Shape = { text: e }, i.parentBoundary = P; +}, Ve = function(e, t, r, o, l) { + if (e === null || t === null) + return; + let n = {}; + const a = V.find((s) => s.alias === e); + if (a && e === a.alias ? n = a : (n.alias = e, V.push(n)), t == null ? n.label = { text: "" } : n.label = { text: t }, r == null) + n.type = { text: "system" }; + else if (typeof r == "object") { + let [s, i] = Object.entries(r)[0]; + n[s] = { text: i }; + } else + n.type = { text: r }; + if (typeof o == "object") { + let [s, i] = Object.entries(o)[0]; + n[s] = i; + } else + n.tags = o; + if (typeof l == "object") { + let [s, i] = Object.entries(l)[0]; + n[s] = i; + } else + n.link = l; + n.parentBoundary = P, n.wrap = xt(), j = P, P = e, _t.push(j); +}, ze = function(e, t, r, o, l) { + if (e === null || t === null) + return; + let n = {}; + const a = V.find((s) => s.alias === e); + if (a && e === a.alias ? n = a : (n.alias = e, V.push(n)), t == null ? n.label = { text: "" } : n.label = { text: t }, r == null) + n.type = { text: "container" }; + else if (typeof r == "object") { + let [s, i] = Object.entries(r)[0]; + n[s] = { text: i }; + } else + n.type = { text: r }; + if (typeof o == "object") { + let [s, i] = Object.entries(o)[0]; + n[s] = i; + } else + n.tags = o; + if (typeof l == "object") { + let [s, i] = Object.entries(l)[0]; + n[s] = i; + } else + n.link = l; + n.parentBoundary = P, n.wrap = xt(), j = P, P = e, _t.push(j); +}, Xe = function(e, t, r, o, l, n, a, s) { + if (t === null || r === null) + return; + let i = {}; + const u = V.find((d) => d.alias === t); + if (u && t === u.alias ? i = u : (i.alias = t, V.push(i)), r == null ? i.label = { text: "" } : i.label = { text: r }, o == null) + i.type = { text: "node" }; + else if (typeof o == "object") { + let [d, f] = Object.entries(o)[0]; + i[d] = { text: f }; + } else + i.type = { text: o }; + if (l == null) + i.descr = { text: "" }; + else if (typeof l == "object") { + let [d, f] = Object.entries(l)[0]; + i[d] = { text: f }; + } else + i.descr = { text: l }; + if (typeof a == "object") { + let [d, f] = Object.entries(a)[0]; + i[d] = f; + } else + i.tags = a; + if (typeof s == "object") { + let [d, f] = Object.entries(s)[0]; + i[d] = f; + } else + i.link = s; + i.nodeType = e, i.parentBoundary = P, i.wrap = xt(), j = P, P = t, _t.push(j); +}, We = function() { + P = j, _t.pop(), j = _t.pop(), _t.push(j); +}, Qe = function(e, t, r, o, l, n, a, s, i, u, d) { + let f = U.find((p) => p.alias === t); + if (!(f === void 0 && (f = V.find((p) => p.alias === t), f === void 0))) { + if (r != null) + if (typeof r == "object") { + let [p, E] = Object.entries(r)[0]; + f[p] = E; + } else + f.bgColor = r; + if (o != null) + if (typeof o == "object") { + let [p, E] = Object.entries(o)[0]; + f[p] = E; + } else + f.fontColor = o; + if (l != null) + if (typeof l == "object") { + let [p, E] = Object.entries(l)[0]; + f[p] = E; + } else + f.borderColor = l; + if (n != null) + if (typeof n == "object") { + let [p, E] = Object.entries(n)[0]; + f[p] = E; + } else + f.shadowing = n; + if (a != null) + if (typeof a == "object") { + let [p, E] = Object.entries(a)[0]; + f[p] = E; + } else + f.shape = a; + if (s != null) + if (typeof s == "object") { + let [p, E] = Object.entries(s)[0]; + f[p] = E; + } else + f.sprite = s; + if (i != null) + if (typeof i == "object") { + let [p, E] = Object.entries(i)[0]; + f[p] = E; + } else + f.techn = i; + if (u != null) + if (typeof u == "object") { + let [p, E] = Object.entries(u)[0]; + f[p] = E; + } else + f.legendText = u; + if (d != null) + if (typeof d == "object") { + let [p, E] = Object.entries(d)[0]; + f[p] = E; + } else + f.legendSprite = d; + } +}, He = function(e, t, r, o, l, n, a) { + const s = St.find((i) => i.from === t && i.to === r); + if (s !== void 0) { + if (o != null) + if (typeof o == "object") { + let [i, u] = Object.entries(o)[0]; + s[i] = u; + } else + s.textColor = o; + if (l != null) + if (typeof l == "object") { + let [i, u] = Object.entries(l)[0]; + s[i] = u; + } else + s.lineColor = l; + if (n != null) + if (typeof n == "object") { + let [i, u] = Object.entries(n)[0]; + s[i] = parseInt(u); + } else + s.offsetX = parseInt(n); + if (a != null) + if (typeof a == "object") { + let [i, u] = Object.entries(a)[0]; + s[i] = parseInt(u); + } else + s.offsetY = parseInt(a); + } +}, qe = function(e, t, r) { + let o = It, l = jt; + if (typeof t == "object") { + const n = Object.values(t)[0]; + o = parseInt(n); + } else + o = parseInt(t); + if (typeof r == "object") { + const n = Object.values(r)[0]; + l = parseInt(n); + } else + l = parseInt(r); + o >= 1 && (It = o), l >= 1 && (jt = l); +}, Ge = function() { + return It; +}, Ke = function() { + return jt; +}, Je = function() { + return P; +}, Ze = function() { + return j; +}, fe = function(e) { + return e == null ? U : U.filter((t) => t.parentBoundary === e); +}, $e = function(e) { + return U.find((t) => t.alias === e); +}, t0 = function(e) { + return Object.keys(fe(e)); +}, e0 = function(e) { + return e == null ? V : V.filter((t) => t.parentBoundary === e); +}, n0 = function() { + return St; +}, i0 = function() { + return te; +}, s0 = function(e) { + ee = e; +}, xt = function() { + return ee; +}, a0 = function() { + U = [], V = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } + ], j = "", P = "global", _t = [""], St = [], _t = [""], te = "", ee = !1, It = 4, jt = 2; +}, r0 = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25 +}, l0 = { + FILLED: 0, + OPEN: 1 +}, o0 = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}, c0 = function(e) { + te = ue(e, Dt()); +}, Jt = { + addPersonOrSystem: je, + addPersonOrSystemBoundary: Ve, + addContainer: Ue, + addContainerBoundary: ze, + addComponent: Fe, + addDeploymentNode: Xe, + popBoundaryParseStack: We, + addRel: Ie, + updateElStyle: Qe, + updateRelStyle: He, + updateLayoutConfig: qe, + autoWrap: xt, + setWrap: s0, + getC4ShapeArray: fe, + getC4Shape: $e, + getC4ShapeKeys: t0, + getBoundarys: e0, + getCurrentBoundaryParse: Je, + getParentBoundaryParse: Ze, + getRels: n0, + getTitle: i0, + getC4Type: Be, + getC4ShapeInRow: Ge, + getC4BoundaryInRow: Ke, + setAccTitle: ve, + getAccTitle: we, + getAccDescription: Oe, + setAccDescription: Te, + getConfig: () => Dt().c4, + clear: a0, + LINETYPE: r0, + ARROWTYPE: l0, + PLACEMENT: o0, + setTitle: c0, + setC4Type: Ye + // apply, +}, ne = function(e, t) { + return Me(e, t); +}, pe = function(e, t, r, o, l, n) { + const a = e.append("image"); + a.attr("width", t), a.attr("height", r), a.attr("x", o), a.attr("y", l); + let s = n.startsWith("data:image/png;base64") ? n : Re(n); + a.attr("xlink:href", s); +}, h0 = (e, t, r) => { + const o = e.append("g"); + let l = 0; + for (let n of t) { + let a = n.textColor ? n.textColor : "#444444", s = n.lineColor ? n.lineColor : "#444444", i = n.offsetX ? parseInt(n.offsetX) : 0, u = n.offsetY ? parseInt(n.offsetY) : 0, d = ""; + if (l === 0) { + let p = o.append("line"); + p.attr("x1", n.startPoint.x), p.attr("y1", n.startPoint.y), p.attr("x2", n.endPoint.x), p.attr("y2", n.endPoint.y), p.attr("stroke-width", "1"), p.attr("stroke", s), p.style("fill", "none"), n.type !== "rel_b" && p.attr("marker-end", "url(" + d + "#arrowhead)"), (n.type === "birel" || n.type === "rel_b") && p.attr("marker-start", "url(" + d + "#arrowend)"), l = -1; + } else { + let p = o.append("path"); + p.attr("fill", "none").attr("stroke-width", "1").attr("stroke", s).attr( + "d", + "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", n.startPoint.x).replaceAll("starty", n.startPoint.y).replaceAll( + "controlx", + n.startPoint.x + (n.endPoint.x - n.startPoint.x) / 2 - (n.endPoint.x - n.startPoint.x) / 4 + ).replaceAll("controly", n.startPoint.y + (n.endPoint.y - n.startPoint.y) / 2).replaceAll("stopx", n.endPoint.x).replaceAll("stopy", n.endPoint.y) + ), n.type !== "rel_b" && p.attr("marker-end", "url(" + d + "#arrowhead)"), (n.type === "birel" || n.type === "rel_b") && p.attr("marker-start", "url(" + d + "#arrowend)"); + } + let f = r.messageFont(); + W(r)( + n.label.text, + o, + Math.min(n.startPoint.x, n.endPoint.x) + Math.abs(n.endPoint.x - n.startPoint.x) / 2 + i, + Math.min(n.startPoint.y, n.endPoint.y) + Math.abs(n.endPoint.y - n.startPoint.y) / 2 + u, + n.label.width, + n.label.height, + { fill: a }, + f + ), n.techn && n.techn.text !== "" && (f = r.messageFont(), W(r)( + "[" + n.techn.text + "]", + o, + Math.min(n.startPoint.x, n.endPoint.x) + Math.abs(n.endPoint.x - n.startPoint.x) / 2 + i, + Math.min(n.startPoint.y, n.endPoint.y) + Math.abs(n.endPoint.y - n.startPoint.y) / 2 + r.messageFontSize + 5 + u, + Math.max(n.label.width, n.techn.width), + n.techn.height, + { fill: a, "font-style": "italic" }, + f + )); + } +}, u0 = function(e, t, r) { + const o = e.append("g"); + let l = t.bgColor ? t.bgColor : "none", n = t.borderColor ? t.borderColor : "#444444", a = t.fontColor ? t.fontColor : "black", s = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" }; + t.nodeType && (s = { "stroke-width": 1 }); + let i = { + x: t.x, + y: t.y, + fill: l, + stroke: n, + width: t.width, + height: t.height, + rx: 2.5, + ry: 2.5, + attrs: s + }; + ne(o, i); + let u = r.boundaryFont(); + u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = a, W(r)( + t.label.text, + o, + t.x, + t.y + t.label.Y, + t.width, + t.height, + { fill: "#444444" }, + u + ), t.type && t.type.text !== "" && (u = r.boundaryFont(), u.fontColor = a, W(r)( + t.type.text, + o, + t.x, + t.y + t.type.Y, + t.width, + t.height, + { fill: "#444444" }, + u + )), t.descr && t.descr.text !== "" && (u = r.boundaryFont(), u.fontSize = u.fontSize - 2, u.fontColor = a, W(r)( + t.descr.text, + o, + t.x, + t.y + t.descr.Y, + t.width, + t.height, + { fill: "#444444" }, + u + )); +}, d0 = function(e, t, r) { + var f; + let o = t.bgColor ? t.bgColor : r[t.typeC4Shape.text + "_bg_color"], l = t.borderColor ? t.borderColor : r[t.typeC4Shape.text + "_border_color"], n = t.fontColor ? t.fontColor : "#FFFFFF", a = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + switch (t.typeC4Shape.text) { + case "person": + a = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + break; + case "external_person": + a = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="; + break; + } + const s = e.append("g"); + s.attr("class", "person-man"); + const i = Le(); + switch (t.typeC4Shape.text) { + case "person": + case "external_person": + case "system": + case "external_system": + case "container": + case "external_container": + case "component": + case "external_component": + i.x = t.x, i.y = t.y, i.fill = o, i.width = t.width, i.height = t.height, i.stroke = l, i.rx = 2.5, i.ry = 2.5, i.attrs = { "stroke-width": 0.5 }, ne(s, i); + break; + case "system_db": + case "external_system_db": + case "container_db": + case "external_container_db": + case "component_db": + case "external_component_db": + s.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr( + "d", + "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2).replaceAll("height", t.height) + ), s.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr( + "d", + "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2) + ); + break; + case "system_queue": + case "external_system_queue": + case "container_queue": + case "external_container_queue": + case "component_queue": + case "external_component_queue": + s.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr( + "d", + "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("width", t.width).replaceAll("half", t.height / 2) + ), s.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr( + "d", + "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", t.x + t.width).replaceAll("starty", t.y).replaceAll("half", t.height / 2) + ); + break; + } + let u = E0(r, t.typeC4Shape.text); + switch (s.append("text").attr("fill", n).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", t.typeC4Shape.width).attr("x", t.x + t.width / 2 - t.typeC4Shape.width / 2).attr("y", t.y + t.typeC4Shape.Y).text("<<" + t.typeC4Shape.text + ">>"), t.typeC4Shape.text) { + case "person": + case "external_person": + pe( + s, + 48, + 48, + t.x + t.width / 2 - 24, + t.y + t.image.Y, + a + ); + break; + } + let d = r[t.typeC4Shape.text + "Font"](); + return d.fontWeight = "bold", d.fontSize = d.fontSize + 2, d.fontColor = n, W(r)( + t.label.text, + s, + t.x, + t.y + t.label.Y, + t.width, + t.height, + { fill: n }, + d + ), d = r[t.typeC4Shape.text + "Font"](), d.fontColor = n, t.techn && ((f = t.techn) == null ? void 0 : f.text) !== "" ? W(r)( + t.techn.text, + s, + t.x, + t.y + t.techn.Y, + t.width, + t.height, + { fill: n, "font-style": "italic" }, + d + ) : t.type && t.type.text !== "" && W(r)( + t.type.text, + s, + t.x, + t.y + t.type.Y, + t.width, + t.height, + { fill: n, "font-style": "italic" }, + d + ), t.descr && t.descr.text !== "" && (d = r.personFont(), d.fontColor = n, W(r)( + t.descr.text, + s, + t.x, + t.y + t.descr.Y, + t.width, + t.height, + { fill: n }, + d + )), t.height; +}, f0 = function(e) { + e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}, p0 = function(e) { + e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}, y0 = function(e) { + e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}, g0 = function(e) { + e.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); +}, b0 = function(e) { + e.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z"); +}, _0 = function(e) { + e.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}, x0 = function(e) { + e.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}, m0 = function(e) { + const r = e.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4); + r.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), r.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7"); +}, E0 = (e, t) => ({ + fontFamily: e[t + "FontFamily"], + fontSize: e[t + "FontSize"], + fontWeight: e[t + "FontWeight"] +}), W = function() { + function e(l, n, a, s, i, u, d) { + const f = n.append("text").attr("x", a + i / 2).attr("y", s + u / 2 + 5).style("text-anchor", "middle").text(l); + o(f, d); + } + function t(l, n, a, s, i, u, d, f) { + const { fontSize: p, fontFamily: E, fontWeight: O } = f, R = l.split(Kt.lineBreakRegex); + for (let S = 0; S < R.length; S++) { + const L = S * p - p * (R.length - 1) / 2, Y = n.append("text").attr("x", a + i / 2).attr("y", s).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", p).style("font-weight", O).style("font-family", E); + Y.append("tspan").attr("dy", L).text(R[S]).attr("alignment-baseline", "mathematical"), o(Y, d); + } + } + function r(l, n, a, s, i, u, d, f) { + const p = n.append("switch"), O = p.append("foreignObject").attr("x", a).attr("y", s).attr("width", i).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + O.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(l), t(l, p, a, s, i, u, d, f), o(O, d); + } + function o(l, n) { + for (const a in n) + n.hasOwnProperty(a) && l.attr(a, n[a]); + } + return function(l) { + return l.textPlacement === "fo" ? r : l.textPlacement === "old" ? e : t; + }; +}(), F = { + drawRect: ne, + drawBoundary: u0, + drawC4Shape: d0, + drawRels: h0, + drawImage: pe, + insertArrowHead: g0, + insertArrowEnd: b0, + insertArrowFilledHead: _0, + insertDynamicNumber: x0, + insertArrowCrossHead: m0, + insertDatabaseIcon: f0, + insertComputerIcon: p0, + insertClockIcon: y0 +}; +let Ut = 0, Ft = 0, ye = 4, Zt = 2; +Yt.yy = Jt; +let b = {}; +class ge { + constructor(t) { + 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, $t(t.db.getConfig()); + } + setData(t, r, o, l) { + this.nextData.startx = this.data.startx = t, this.nextData.stopx = this.data.stopx = r, this.nextData.starty = this.data.starty = o, this.nextData.stopy = this.data.stopy = l; + } + updateVal(t, r, o, l) { + t[r] === void 0 ? t[r] = o : t[r] = l(o, t[r]); + } + insert(t) { + this.nextData.cnt = this.nextData.cnt + 1; + let r = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + t.margin : this.nextData.stopx + t.margin * 2, o = r + t.width, l = this.nextData.starty + t.margin * 2, n = l + t.height; + (r >= this.data.widthLimit || o >= this.data.widthLimit || this.nextData.cnt > ye) && (r = this.nextData.startx + t.margin + b.nextLinePaddingX, l = this.nextData.stopy + t.margin * 2, this.nextData.stopx = o = r + t.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = n = l + t.height, this.nextData.cnt = 1), t.x = r, t.y = l, this.updateVal(this.data, "startx", r, Math.min), this.updateVal(this.data, "starty", l, Math.min), this.updateVal(this.data, "stopx", o, Math.max), this.updateVal(this.data, "stopy", n, Math.max), this.updateVal(this.nextData, "startx", r, Math.min), this.updateVal(this.nextData, "starty", l, Math.min), this.updateVal(this.nextData, "stopx", o, Math.max), this.updateVal(this.nextData, "stopy", n, Math.max); + } + init(t) { + 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 + }, $t(t.db.getConfig()); + } + bumpLastMargin(t) { + this.data.stopx += t, this.data.stopy += t; + } +} +const $t = function(e) { + De(b, e), e.fontFamily && (b.personFontFamily = b.systemFontFamily = b.messageFontFamily = e.fontFamily), e.fontSize && (b.personFontSize = b.systemFontSize = b.messageFontSize = e.fontSize), e.fontWeight && (b.personFontWeight = b.systemFontWeight = b.messageFontWeight = e.fontWeight); +}, Rt = (e, t) => ({ + fontFamily: e[t + "FontFamily"], + fontSize: e[t + "FontSize"], + fontWeight: e[t + "FontWeight"] +}), Bt = (e) => ({ + fontFamily: e.boundaryFontFamily, + fontSize: e.boundaryFontSize, + fontWeight: e.boundaryFontWeight +}), k0 = (e) => ({ + fontFamily: e.messageFontFamily, + fontSize: e.messageFontSize, + fontWeight: e.messageFontWeight +}); +function I(e, t, r, o, l) { + if (!t[e].width) + if (r) + t[e].text = Pe(t[e].text, l, o), t[e].textLines = t[e].text.split(Kt.lineBreakRegex).length, t[e].width = l, t[e].height = oe(t[e].text, o); + else { + let n = t[e].text.split(Kt.lineBreakRegex); + t[e].textLines = n.length; + let a = 0; + t[e].height = 0, t[e].width = 0; + for (const s of n) + t[e].width = Math.max( + wt(s, o), + t[e].width + ), a = oe(s, o), t[e].height = t[e].height + a; + } +} +const be = function(e, t, r) { + t.x = r.data.startx, t.y = r.data.starty, t.width = r.data.stopx - r.data.startx, t.height = r.data.stopy - r.data.starty, t.label.y = b.c4ShapeMargin - 35; + let o = t.wrap && b.wrap, l = Bt(b); + l.fontSize = l.fontSize + 2, l.fontWeight = "bold"; + let n = wt(t.label.text, l); + I("label", t, o, l, n), F.drawBoundary(e, t, b); +}, _e = function(e, t, r, o) { + let l = 0; + for (const n of o) { + l = 0; + const a = r[n]; + let s = Rt(b, a.typeC4Shape.text); + switch (s.fontSize = s.fontSize - 2, a.typeC4Shape.width = wt( + "«" + a.typeC4Shape.text + "»", + s + ), a.typeC4Shape.height = s.fontSize + 2, a.typeC4Shape.Y = b.c4ShapePadding, l = a.typeC4Shape.Y + a.typeC4Shape.height - 4, a.image = { width: 0, height: 0, Y: 0 }, a.typeC4Shape.text) { + case "person": + case "external_person": + a.image.width = 48, a.image.height = 48, a.image.Y = l, l = a.image.Y + a.image.height; + break; + } + a.sprite && (a.image.width = 48, a.image.height = 48, a.image.Y = l, l = a.image.Y + a.image.height); + let i = a.wrap && b.wrap, u = b.width - b.c4ShapePadding * 2, d = Rt(b, a.typeC4Shape.text); + if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", I("label", a, i, d, u), a.label.Y = l + 8, l = a.label.Y + a.label.height, a.type && a.type.text !== "") { + a.type.text = "[" + a.type.text + "]"; + let E = Rt(b, a.typeC4Shape.text); + I("type", a, i, E, u), a.type.Y = l + 5, l = a.type.Y + a.type.height; + } else if (a.techn && a.techn.text !== "") { + a.techn.text = "[" + a.techn.text + "]"; + let E = Rt(b, a.techn.text); + I("techn", a, i, E, u), a.techn.Y = l + 5, l = a.techn.Y + a.techn.height; + } + let f = l, p = a.label.width; + if (a.descr && a.descr.text !== "") { + let E = Rt(b, a.typeC4Shape.text); + I("descr", a, i, E, u), a.descr.Y = l + 20, l = a.descr.Y + a.descr.height, p = Math.max(a.label.width, a.descr.width), f = l - a.descr.textLines * 5; + } + p = p + b.c4ShapePadding, a.width = Math.max(a.width || b.width, p, b.width), a.height = Math.max(a.height || b.height, f, b.height), a.margin = a.margin || b.c4ShapeMargin, e.insert(a), F.drawC4Shape(t, a, b); + } + e.bumpLastMargin(b.c4ShapeMargin); +}; +class B { + constructor(t, r) { + this.x = t, this.y = r; + } +} +let ce = function(e, t) { + let r = e.x, o = e.y, l = t.x, n = t.y, a = r + e.width / 2, s = o + e.height / 2, i = Math.abs(r - l), u = Math.abs(o - n), d = u / i, f = e.height / e.width, p = null; + return o == n && r < l ? p = new B(r + e.width, s) : o == n && r > l ? p = new B(r, s) : r == l && o < n ? p = new B(a, o + e.height) : r == l && o > n && (p = new B(a, o)), r > l && o < n ? f >= d ? p = new B(r, s + d * e.width / 2) : p = new B( + a - i / u * e.height / 2, + o + e.height + ) : r < l && o < n ? f >= d ? p = new B(r + e.width, s + d * e.width / 2) : p = new B( + a + i / u * e.height / 2, + o + e.height + ) : r < l && o > n ? f >= d ? p = new B(r + e.width, s - d * e.width / 2) : p = new B(a + e.height / 2 * i / u, o) : r > l && o > n && (f >= d ? p = new B(r, s - e.width / 2 * d) : p = new B(a - e.height / 2 * i / u, o)), p; +}, A0 = function(e, t) { + let r = { x: 0, y: 0 }; + r.x = t.x + t.width / 2, r.y = t.y + t.height / 2; + let o = ce(e, r); + r.x = e.x + e.width / 2, r.y = e.y + e.height / 2; + let l = ce(t, r); + return { startPoint: o, endPoint: l }; +}; +const C0 = function(e, t, r, o) { + let l = 0; + for (let n of t) { + l = l + 1; + let a = n.wrap && b.wrap, s = k0(b); + o.db.getC4Type() === "C4Dynamic" && (n.label.text = l + ": " + n.label.text); + let u = wt(n.label.text, s); + I("label", n, a, s, u), n.techn && n.techn.text !== "" && (u = wt(n.techn.text, s), I("techn", n, a, s, u)), n.descr && n.descr.text !== "" && (u = wt(n.descr.text, s), I("descr", n, a, s, u)); + let d = r(n.from), f = r(n.to), p = A0(d, f); + n.startPoint = p.startPoint, n.endPoint = p.endPoint; + } + F.drawRels(e, t, b); +}; +function xe(e, t, r, o, l) { + let n = new ge(l); + n.data.widthLimit = r.data.widthLimit / Math.min(Zt, o.length); + for (let [a, s] of o.entries()) { + let i = 0; + s.image = { width: 0, height: 0, Y: 0 }, 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 && b.wrap, d = Bt(b); + if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", I( + "label", + s, + u, + d, + n.data.widthLimit + ), s.label.Y = i + 8, i = s.label.Y + s.label.height, s.type && s.type.text !== "") { + s.type.text = "[" + s.type.text + "]"; + let O = Bt(b); + I( + "type", + s, + u, + O, + n.data.widthLimit + ), s.type.Y = i + 5, i = s.type.Y + s.type.height; + } + if (s.descr && s.descr.text !== "") { + let O = Bt(b); + O.fontSize = O.fontSize - 2, I( + "descr", + s, + u, + O, + n.data.widthLimit + ), s.descr.Y = i + 20, i = s.descr.Y + s.descr.height; + } + if (a == 0 || a % Zt === 0) { + let O = r.data.startx + b.diagramMarginX, R = r.data.stopy + b.diagramMarginY + i; + n.setData(O, O, R, R); + } else { + let O = n.data.stopx !== n.data.startx ? n.data.stopx + b.diagramMarginX : n.data.startx, R = n.data.starty; + n.setData(O, O, R, R); + } + n.name = s.alias; + let f = l.db.getC4ShapeArray(s.alias), p = l.db.getC4ShapeKeys(s.alias); + p.length > 0 && _e( + n, + e, + f, + p + ), t = s.alias; + let E = l.db.getBoundarys(t); + E.length > 0 && xe( + e, + t, + n, + E, + l + ), s.alias !== "global" && be(e, s, n), r.data.stopy = Math.max( + n.data.stopy + b.c4ShapeMargin, + r.data.stopy + ), r.data.stopx = Math.max( + n.data.stopx + b.c4ShapeMargin, + r.data.stopx + ), Ut = Math.max(Ut, r.data.stopx), Ft = Math.max(Ft, r.data.stopy); + } +} +const v0 = function(e, t, r, o) { + b = Dt().c4; + const l = Dt().securityLevel; + let n; + l === "sandbox" && (n = Nt("#i" + t)); + const a = l === "sandbox" ? Nt(n.nodes()[0].contentDocument.body) : Nt("body"); + let s = o.db; + o.db.setWrap(b.wrap), ye = s.getC4ShapeInRow(), Zt = s.getC4BoundaryInRow(), le.debug(`C:${JSON.stringify(b, null, 2)}`); + const i = l === "sandbox" ? a.select(`[id="${t}"]`) : Nt(`[id="${t}"]`); + F.insertComputerIcon(i), F.insertDatabaseIcon(i), F.insertClockIcon(i); + let u = new ge(o); + u.setData( + b.diagramMarginX, + b.diagramMarginX, + b.diagramMarginY, + b.diagramMarginY + ), u.data.widthLimit = screen.availWidth, Ut = b.diagramMarginX, Ft = b.diagramMarginY; + const d = o.db.getTitle(); + let f = o.db.getBoundarys(""); + xe(i, "", u, f, o), F.insertArrowHead(i), F.insertArrowEnd(i), F.insertArrowCrossHead(i), F.insertArrowFilledHead(i), C0(i, o.db.getRels(), o.db.getC4Shape, o), u.data.stopx = Ut, u.data.stopy = Ft; + const p = u.data; + let O = p.stopy - p.starty + 2 * b.diagramMarginY; + const S = p.stopx - p.startx + 2 * b.diagramMarginX; + d && i.append("text").text(d).attr("x", (p.stopx - p.startx) / 2 - 4 * b.diagramMarginX).attr("y", p.starty + b.diagramMarginY), Se(i, O, S, b.useMaxWidth); + const L = d ? 60 : 0; + i.attr( + "viewBox", + p.startx - b.diagramMarginX + " -" + (b.diagramMarginY + L) + " " + S + " " + (O + L) + ), le.debug("models:", p); +}, he = { + drawPersonOrSystemArray: _e, + drawBoundary: be, + setConf: $t, + draw: v0 +}, w0 = (e) => `.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`, O0 = w0, D0 = { + parser: Ne, + db: Jt, + renderer: he, + styles: O0, + init: ({ c4: e, wrap: t }) => { + he.setConf(e), Jt.setWrap(t); + } +}; +export { + D0 as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/c4Diagram-ef5e9216.js b/webroot/js/node_modules/mermaid/dist/c4Diagram-ef5e9216.js new file mode 100644 index 0000000..4e6d633 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/c4Diagram-ef5e9216.js @@ -0,0 +1,2461 @@ +import { s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, c as getConfig, d as sanitizeText, e as sanitizeUrl_1, f as common, h as assignWithDepth, i as calculateTextWidth, j as d3select, l as log, k as configureSvgSize, w as wrapLabel, m as calculateTextHeight } from "./mermaid-491db2d9.js"; +import { d as drawRect$1, g as getNoteRect } from "./svgDrawCommon-6f1271c3.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" }, + productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setDirection("TB"); + break; + case 4: + yy.setDirection("BT"); + break; + case 5: + yy.setDirection("RL"); + break; + case 6: + yy.setDirection("LR"); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + yy.setC4Type($$[$0 - 3]); + break; + case 19: + yy.setTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 20: + yy.setAccDescription($$[$0].substring(15)); + this.$ = $$[$0].substring(15); + break; + case 21: + this.$ = $$[$0].trim(); + yy.setTitle(this.$); + break; + case 22: + case 23: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + case 29: + $$[$0].splice(2, 0, "ENTERPRISE"); + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 30: + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 31: + $$[$0].splice(2, 0, "CONTAINER"); + yy.addContainerBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 32: + yy.addDeploymentNode("node", ...$$[$0]); + this.$ = $$[$0]; + break; + case 33: + yy.addDeploymentNode("nodeL", ...$$[$0]); + this.$ = $$[$0]; + break; + case 34: + yy.addDeploymentNode("nodeR", ...$$[$0]); + this.$ = $$[$0]; + break; + case 35: + yy.popBoundaryParseStack(); + break; + case 39: + yy.addPersonOrSystem("person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 40: + yy.addPersonOrSystem("external_person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 41: + yy.addPersonOrSystem("system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 42: + yy.addPersonOrSystem("system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 43: + yy.addPersonOrSystem("system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 44: + yy.addPersonOrSystem("external_system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 45: + yy.addPersonOrSystem("external_system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 46: + yy.addPersonOrSystem("external_system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 47: + yy.addContainer("container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 48: + yy.addContainer("container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 49: + yy.addContainer("container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 50: + yy.addContainer("external_container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 51: + yy.addContainer("external_container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 52: + yy.addContainer("external_container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 53: + yy.addComponent("component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 54: + yy.addComponent("component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 55: + yy.addComponent("component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 56: + yy.addComponent("external_component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 57: + yy.addComponent("external_component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 58: + yy.addComponent("external_component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 60: + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 61: + yy.addRel("birel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 62: + yy.addRel("rel_u", ...$$[$0]); + this.$ = $$[$0]; + break; + case 63: + yy.addRel("rel_d", ...$$[$0]); + this.$ = $$[$0]; + break; + case 64: + yy.addRel("rel_l", ...$$[$0]); + this.$ = $$[$0]; + break; + case 65: + yy.addRel("rel_r", ...$$[$0]); + this.$ = $$[$0]; + break; + case 66: + yy.addRel("rel_b", ...$$[$0]); + this.$ = $$[$0]; + break; + case 67: + $$[$0].splice(0, 1); + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 68: + yy.updateElStyle("update_el_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 69: + yy.updateRelStyle("update_rel_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 70: + yy.updateLayoutConfig("update_layout_config", ...$$[$0]); + this.$ = $$[$0]; + break; + case 71: + this.$ = [$$[$0]]; + break; + case 72: + $$[$0].unshift($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 73: + case 75: + this.$ = $$[$0].trim(); + break; + case 74: + let kv = {}; + kv[$$[$0 - 1].trim()] = $$[$0].trim(); + this.$ = kv; + break; + case 76: + this.$ = ""; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 6; + case 1: + return 7; + case 2: + return 8; + case 3: + return 9; + case 4: + return 22; + case 5: + return 23; + case 6: + this.begin("acc_title"); + return 24; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 26; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + break; + case 14: + c; + break; + case 15: + return 12; + case 16: + break; + case 17: + return 11; + case 18: + return 15; + case 19: + return 16; + case 20: + return 17; + case 21: + return 18; + case 22: + this.begin("person_ext"); + return 45; + case 23: + this.begin("person"); + return 44; + case 24: + this.begin("system_ext_queue"); + return 51; + case 25: + this.begin("system_ext_db"); + return 50; + case 26: + this.begin("system_ext"); + return 49; + case 27: + this.begin("system_queue"); + return 48; + case 28: + this.begin("system_db"); + return 47; + case 29: + this.begin("system"); + return 46; + case 30: + this.begin("boundary"); + return 37; + case 31: + this.begin("enterprise_boundary"); + return 34; + case 32: + this.begin("system_boundary"); + return 36; + case 33: + this.begin("container_ext_queue"); + return 57; + case 34: + this.begin("container_ext_db"); + return 56; + case 35: + this.begin("container_ext"); + return 55; + case 36: + this.begin("container_queue"); + return 54; + case 37: + this.begin("container_db"); + return 53; + case 38: + this.begin("container"); + return 52; + case 39: + this.begin("container_boundary"); + return 38; + case 40: + this.begin("component_ext_queue"); + return 63; + case 41: + this.begin("component_ext_db"); + return 62; + case 42: + this.begin("component_ext"); + return 61; + case 43: + this.begin("component_queue"); + return 60; + case 44: + this.begin("component_db"); + return 59; + case 45: + this.begin("component"); + return 58; + case 46: + this.begin("node"); + return 39; + case 47: + this.begin("node"); + return 39; + case 48: + this.begin("node_l"); + return 40; + case 49: + this.begin("node_r"); + return 41; + case 50: + this.begin("rel"); + return 64; + case 51: + this.begin("birel"); + return 65; + case 52: + this.begin("rel_u"); + return 66; + case 53: + this.begin("rel_u"); + return 66; + case 54: + this.begin("rel_d"); + return 67; + case 55: + this.begin("rel_d"); + return 67; + case 56: + this.begin("rel_l"); + return 68; + case 57: + this.begin("rel_l"); + return 68; + case 58: + this.begin("rel_r"); + return 69; + case 59: + this.begin("rel_r"); + return 69; + case 60: + this.begin("rel_b"); + return 70; + case 61: + this.begin("rel_index"); + return 71; + case 62: + this.begin("update_el_style"); + return 72; + case 63: + this.begin("update_rel_style"); + return 73; + case 64: + this.begin("update_layout_config"); + return 74; + case 65: + return "EOF_IN_STRUCT"; + case 66: + this.begin("attribute"); + return "ATTRIBUTE_EMPTY"; + case 67: + this.begin("attribute"); + break; + case 68: + this.popState(); + this.popState(); + break; + case 69: + return 80; + case 70: + break; + case 71: + return 80; + case 72: + this.begin("string"); + break; + case 73: + this.popState(); + break; + case 74: + return "STR"; + case 75: + this.begin("string_kv"); + break; + case 76: + this.begin("string_kv_key"); + return "STR_KEY"; + case 77: + this.popState(); + this.begin("string_kv_value"); + break; + case 78: + return "STR_VALUE"; + case 79: + this.popState(); + this.popState(); + break; + case 80: + return "STR"; + case 81: + return "LBRACE"; + case 82: + return "RBRACE"; + case 83: + return "SPACE"; + case 84: + return "EOL"; + case 85: + return 14; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/], + conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let c4ShapeArray = []; +let boundaryParseStack = [""]; +let currentBoundaryParse = "global"; +let parentBoundaryParse = ""; +let boundarys = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } +]; +let rels = []; +let title = ""; +let wrapEnabled = false; +let c4ShapeInRow$1 = 4; +let c4BoundaryInRow$1 = 2; +var c4Type; +const getC4Type = function() { + return c4Type; +}; +const setC4Type = function(c4TypeParam) { + let sanitizedText = sanitizeText(c4TypeParam, getConfig()); + c4Type = sanitizedText; +}; +const addRel = function(type, from, to, label, techn, descr, sprite, tags, link) { + if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) { + return; + } + let rel = {}; + const old = rels.find((rel2) => rel2.from === from && rel2.to === to); + if (old) { + rel = old; + } else { + rels.push(rel); + } + rel.type = type; + rel.from = from; + rel.to = to; + rel.label = { text: label }; + if (techn === void 0 || techn === null) { + rel.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + rel[key] = { text: value }; + } else { + rel.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + rel.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + rel[key] = { text: value }; + } else { + rel.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + rel[key] = value; + } else { + rel.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + rel[key] = value; + } else { + rel.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + rel[key] = value; + } else { + rel.link = link; + } + rel.wrap = autoWrap(); +}; +const addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let personOrSystem = {}; + const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias); + if (old && alias === old.alias) { + personOrSystem = old; + } else { + personOrSystem.alias = alias; + c4ShapeArray.push(personOrSystem); + } + if (label === void 0 || label === null) { + personOrSystem.label = { text: "" }; + } else { + personOrSystem.label = { text: label }; + } + if (descr === void 0 || descr === null) { + personOrSystem.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + personOrSystem[key] = { text: value }; + } else { + personOrSystem.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.link = link; + } + personOrSystem.typeC4Shape = { text: typeC4Shape }; + personOrSystem.parentBoundary = currentBoundaryParse; + personOrSystem.wrap = autoWrap(); +}; +const addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let container = {}; + const old = c4ShapeArray.find((container2) => container2.alias === alias); + if (old && alias === old.alias) { + container = old; + } else { + container.alias = alias; + c4ShapeArray.push(container); + } + if (label === void 0 || label === null) { + container.label = { text: "" }; + } else { + container.label = { text: label }; + } + if (techn === void 0 || techn === null) { + container.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + container[key] = { text: value }; + } else { + container.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + container.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + container[key] = { text: value }; + } else { + container.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + container[key] = value; + } else { + container.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + container[key] = value; + } else { + container.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + container[key] = value; + } else { + container.link = link; + } + container.wrap = autoWrap(); + container.typeC4Shape = { text: typeC4Shape }; + container.parentBoundary = currentBoundaryParse; +}; +const addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let component = {}; + const old = c4ShapeArray.find((component2) => component2.alias === alias); + if (old && alias === old.alias) { + component = old; + } else { + component.alias = alias; + c4ShapeArray.push(component); + } + if (label === void 0 || label === null) { + component.label = { text: "" }; + } else { + component.label = { text: label }; + } + if (techn === void 0 || techn === null) { + component.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + component[key] = { text: value }; + } else { + component.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + component.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + component[key] = { text: value }; + } else { + component.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + component[key] = value; + } else { + component.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + component[key] = value; + } else { + component.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + component[key] = value; + } else { + component.link = link; + } + component.wrap = autoWrap(); + component.typeC4Shape = { text: typeC4Shape }; + component.parentBoundary = currentBoundaryParse; +}; +const addPersonOrSystemBoundary = function(alias, label, type, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "system" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const addContainerBoundary = function(alias, label, type, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "container" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const addDeploymentNode = function(nodeType, alias, label, type, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "node" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (descr === void 0 || descr === null) { + boundary.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + boundary[key] = { text: value }; + } else { + boundary.descr = { text: descr }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.nodeType = nodeType; + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const popBoundaryParseStack = function() { + currentBoundaryParse = parentBoundaryParse; + boundaryParseStack.pop(); + parentBoundaryParse = boundaryParseStack.pop(); + boundaryParseStack.push(parentBoundaryParse); +}; +const updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) { + let old = c4ShapeArray.find((element) => element.alias === elementName); + if (old === void 0) { + old = boundarys.find((element) => element.alias === elementName); + if (old === void 0) { + return; + } + } + if (bgColor !== void 0 && bgColor !== null) { + if (typeof bgColor === "object") { + let [key, value] = Object.entries(bgColor)[0]; + old[key] = value; + } else { + old.bgColor = bgColor; + } + } + if (fontColor !== void 0 && fontColor !== null) { + if (typeof fontColor === "object") { + let [key, value] = Object.entries(fontColor)[0]; + old[key] = value; + } else { + old.fontColor = fontColor; + } + } + if (borderColor !== void 0 && borderColor !== null) { + if (typeof borderColor === "object") { + let [key, value] = Object.entries(borderColor)[0]; + old[key] = value; + } else { + old.borderColor = borderColor; + } + } + if (shadowing !== void 0 && shadowing !== null) { + if (typeof shadowing === "object") { + let [key, value] = Object.entries(shadowing)[0]; + old[key] = value; + } else { + old.shadowing = shadowing; + } + } + if (shape !== void 0 && shape !== null) { + if (typeof shape === "object") { + let [key, value] = Object.entries(shape)[0]; + old[key] = value; + } else { + old.shape = shape; + } + } + if (sprite !== void 0 && sprite !== null) { + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + old[key] = value; + } else { + old.sprite = sprite; + } + } + if (techn !== void 0 && techn !== null) { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + old[key] = value; + } else { + old.techn = techn; + } + } + if (legendText !== void 0 && legendText !== null) { + if (typeof legendText === "object") { + let [key, value] = Object.entries(legendText)[0]; + old[key] = value; + } else { + old.legendText = legendText; + } + } + if (legendSprite !== void 0 && legendSprite !== null) { + if (typeof legendSprite === "object") { + let [key, value] = Object.entries(legendSprite)[0]; + old[key] = value; + } else { + old.legendSprite = legendSprite; + } + } +}; +const updateRelStyle = function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) { + const old = rels.find((rel) => rel.from === from && rel.to === to); + if (old === void 0) { + return; + } + if (textColor !== void 0 && textColor !== null) { + if (typeof textColor === "object") { + let [key, value] = Object.entries(textColor)[0]; + old[key] = value; + } else { + old.textColor = textColor; + } + } + if (lineColor !== void 0 && lineColor !== null) { + if (typeof lineColor === "object") { + let [key, value] = Object.entries(lineColor)[0]; + old[key] = value; + } else { + old.lineColor = lineColor; + } + } + if (offsetX !== void 0 && offsetX !== null) { + if (typeof offsetX === "object") { + let [key, value] = Object.entries(offsetX)[0]; + old[key] = parseInt(value); + } else { + old.offsetX = parseInt(offsetX); + } + } + if (offsetY !== void 0 && offsetY !== null) { + if (typeof offsetY === "object") { + let [key, value] = Object.entries(offsetY)[0]; + old[key] = parseInt(value); + } else { + old.offsetY = parseInt(offsetY); + } + } +}; +const updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) { + let c4ShapeInRowValue = c4ShapeInRow$1; + let c4BoundaryInRowValue = c4BoundaryInRow$1; + if (typeof c4ShapeInRowParam === "object") { + const value = Object.values(c4ShapeInRowParam)[0]; + c4ShapeInRowValue = parseInt(value); + } else { + c4ShapeInRowValue = parseInt(c4ShapeInRowParam); + } + if (typeof c4BoundaryInRowParam === "object") { + const value = Object.values(c4BoundaryInRowParam)[0]; + c4BoundaryInRowValue = parseInt(value); + } else { + c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); + } + if (c4ShapeInRowValue >= 1) { + c4ShapeInRow$1 = c4ShapeInRowValue; + } + if (c4BoundaryInRowValue >= 1) { + c4BoundaryInRow$1 = c4BoundaryInRowValue; + } +}; +const getC4ShapeInRow = function() { + return c4ShapeInRow$1; +}; +const getC4BoundaryInRow = function() { + return c4BoundaryInRow$1; +}; +const getCurrentBoundaryParse = function() { + return currentBoundaryParse; +}; +const getParentBoundaryParse = function() { + return parentBoundaryParse; +}; +const getC4ShapeArray = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return c4ShapeArray; + } else { + return c4ShapeArray.filter((personOrSystem) => { + return personOrSystem.parentBoundary === parentBoundary; + }); + } +}; +const getC4Shape = function(alias) { + return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias); +}; +const getC4ShapeKeys = function(parentBoundary) { + return Object.keys(getC4ShapeArray(parentBoundary)); +}; +const getBoundarys = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return boundarys; + } else { + return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary); + } +}; +const getRels = function() { + return rels; +}; +const getTitle = function() { + return title; +}; +const setWrap = function(wrapSetting) { + wrapEnabled = wrapSetting; +}; +const autoWrap = function() { + return wrapEnabled; +}; +const clear = function() { + c4ShapeArray = []; + boundarys = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } + ]; + parentBoundaryParse = ""; + currentBoundaryParse = "global"; + boundaryParseStack = [""]; + rels = []; + boundaryParseStack = [""]; + title = ""; + wrapEnabled = false; + c4ShapeInRow$1 = 4; + c4BoundaryInRow$1 = 2; +}; +const LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25 +}; +const ARROWTYPE = { + FILLED: 0, + OPEN: 1 +}; +const PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}; +const setTitle = function(txt) { + let sanitizedText = sanitizeText(txt, getConfig()); + title = sanitizedText; +}; +const db = { + addPersonOrSystem, + addPersonOrSystemBoundary, + addContainer, + addContainerBoundary, + addComponent, + addDeploymentNode, + popBoundaryParseStack, + addRel, + updateElStyle, + updateRelStyle, + updateLayoutConfig, + autoWrap, + setWrap, + getC4ShapeArray, + getC4Shape, + getC4ShapeKeys, + getBoundarys, + getCurrentBoundaryParse, + getParentBoundaryParse, + getRels, + getTitle, + getC4Type, + getC4ShapeInRow, + getC4BoundaryInRow, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + getConfig: () => getConfig().c4, + clear, + LINETYPE, + ARROWTYPE, + PLACEMENT, + setTitle, + setC4Type + // apply, +}; +const drawRect = function(elem, rectData) { + return drawRect$1(elem, rectData); +}; +const drawImage = function(elem, width, height, x, y, link) { + const imageElem = elem.append("image"); + imageElem.attr("width", width); + imageElem.attr("height", height); + imageElem.attr("x", x); + imageElem.attr("y", y); + let sanitizedLink = link.startsWith("data:image/png;base64") ? link : sanitizeUrl_1(link); + imageElem.attr("xlink:href", sanitizedLink); +}; +const drawRels$1 = (elem, rels2, conf2) => { + const relsElem = elem.append("g"); + let i = 0; + for (let rel of rels2) { + let textColor = rel.textColor ? rel.textColor : "#444444"; + let strokeColor = rel.lineColor ? rel.lineColor : "#444444"; + let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0; + let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0; + let url = ""; + if (i === 0) { + let line = relsElem.append("line"); + line.attr("x1", rel.startPoint.x); + line.attr("y1", rel.startPoint.y); + line.attr("x2", rel.endPoint.x); + line.attr("y2", rel.endPoint.y); + line.attr("stroke-width", "1"); + line.attr("stroke", strokeColor); + line.style("fill", "none"); + if (rel.type !== "rel_b") { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line.attr("marker-start", "url(" + url + "#arrowend)"); + } + i = -1; + } else { + let line = relsElem.append("path"); + line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr( + "d", + "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll( + "controlx", + rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4 + ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y) + ); + if (rel.type !== "rel_b") { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line.attr("marker-start", "url(" + url + "#arrowend)"); + } + } + let messageConf = conf2.messageFont(); + _drawTextCandidateFunc(conf2)( + rel.label.text, + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY, + rel.label.width, + rel.label.height, + { fill: textColor }, + messageConf + ); + if (rel.techn && rel.techn.text !== "") { + messageConf = conf2.messageFont(); + _drawTextCandidateFunc(conf2)( + "[" + rel.techn.text + "]", + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY, + Math.max(rel.label.width, rel.techn.width), + rel.techn.height, + { fill: textColor, "font-style": "italic" }, + messageConf + ); + } + } +}; +const drawBoundary$1 = function(elem, boundary, conf2) { + const boundaryElem = elem.append("g"); + let fillColor = boundary.bgColor ? boundary.bgColor : "none"; + let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444"; + let fontColor = boundary.fontColor ? boundary.fontColor : "black"; + let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" }; + if (boundary.nodeType) { + attrsValue = { "stroke-width": 1 }; + } + let rectData = { + x: boundary.x, + y: boundary.y, + fill: fillColor, + stroke: strokeColor, + width: boundary.width, + height: boundary.height, + rx: 2.5, + ry: 2.5, + attrs: attrsValue + }; + drawRect(boundaryElem, rectData); + let boundaryConf = conf2.boundaryFont(); + boundaryConf.fontWeight = "bold"; + boundaryConf.fontSize = boundaryConf.fontSize + 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.label.text, + boundaryElem, + boundary.x, + boundary.y + boundary.label.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + if (boundary.type && boundary.type.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.type.text, + boundaryElem, + boundary.x, + boundary.y + boundary.type.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } + if (boundary.descr && boundary.descr.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontSize = boundaryConf.fontSize - 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.descr.text, + boundaryElem, + boundary.x, + boundary.y + boundary.descr.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } +}; +const drawC4Shape = function(elem, c4Shape, conf2) { + var _a; + let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"]; + let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"]; + let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF"; + let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + switch (c4Shape.typeC4Shape.text) { + case "person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + break; + case "external_person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="; + break; + } + const c4ShapeElem = elem.append("g"); + c4ShapeElem.attr("class", "person-man"); + const rect = getNoteRect(); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + case "system": + case "external_system": + case "container": + case "external_container": + case "component": + case "external_component": + rect.x = c4Shape.x; + rect.y = c4Shape.y; + rect.fill = fillColor; + rect.width = c4Shape.width; + rect.height = c4Shape.height; + rect.stroke = strokeColor; + rect.rx = 2.5; + rect.ry = 2.5; + rect.attrs = { "stroke-width": 0.5 }; + drawRect(c4ShapeElem, rect); + break; + case "system_db": + case "external_system_db": + case "container_db": + case "external_container_db": + case "component_db": + case "external_component_db": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2) + ); + break; + case "system_queue": + case "external_system_queue": + case "container_queue": + case "external_container_queue": + case "component_queue": + case "external_component_queue": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2) + ); + break; + } + let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text); + c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>"); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + drawImage( + c4ShapeElem, + 48, + 48, + c4Shape.x + c4Shape.width / 2 - 24, + c4Shape.y + c4Shape.image.Y, + personImg + ); + break; + } + let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontWeight = "bold"; + textFontConf.fontSize = textFontConf.fontSize + 2; + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + c4Shape.label.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.label.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontColor = fontColor; + if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== "") { + _drawTextCandidateFunc(conf2)( + c4Shape.techn.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.techn.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } else if (c4Shape.type && c4Shape.type.text !== "") { + _drawTextCandidateFunc(conf2)( + c4Shape.type.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.type.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } + if (c4Shape.descr && c4Shape.descr.text !== "") { + textFontConf = conf2.personFont(); + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + c4Shape.descr.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.descr.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + } + return c4Shape.height; +}; +const insertDatabaseIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}; +const insertComputerIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}; +const insertClockIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}; +const insertArrowHead = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); +}; +const insertArrowEnd = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z"); +}; +const insertArrowFilledHead = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const insertDynamicNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}; +const insertArrowCrossHead = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4); + marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7"); +}; +const getC4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { fontSize, fontFamily, fontWeight } = conf2; + const lines = content.split(common.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * fontSize - fontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily); + text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const svgDraw = { + drawRect, + drawBoundary: drawBoundary$1, + drawC4Shape, + drawRels: drawRels$1, + drawImage, + insertArrowHead, + insertArrowEnd, + insertArrowFilledHead, + insertDynamicNumber, + insertArrowCrossHead, + insertDatabaseIcon, + insertComputerIcon, + insertClockIcon +}; +let globalBoundaryMaxX = 0, globalBoundaryMaxY = 0; +let c4ShapeInRow = 4; +let c4BoundaryInRow = 2; +parser.yy = db; +let conf = {}; +class Bounds { + constructor(diagObj) { + 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; + setConf(diagObj.db.getConfig()); + } + setData(startx, stopx, starty, stopy) { + this.nextData.startx = this.data.startx = startx; + this.nextData.stopx = this.data.stopx = stopx; + this.nextData.starty = this.data.starty = starty; + this.nextData.stopy = this.data.stopy = stopy; + } + updateVal(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + } + insert(c4Shape) { + this.nextData.cnt = this.nextData.cnt + 1; + let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2; + let _stopx = _startx + c4Shape.width; + let _starty = this.nextData.starty + c4Shape.margin * 2; + let _stopy = _starty + c4Shape.height; + if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) { + _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX; + _starty = this.nextData.stopy + c4Shape.margin * 2; + this.nextData.stopx = _stopx = _startx + c4Shape.width; + this.nextData.starty = this.nextData.stopy; + this.nextData.stopy = _stopy = _starty + c4Shape.height; + this.nextData.cnt = 1; + } + c4Shape.x = _startx; + c4Shape.y = _starty; + this.updateVal(this.data, "startx", _startx, Math.min); + this.updateVal(this.data, "starty", _starty, Math.min); + this.updateVal(this.data, "stopx", _stopx, Math.max); + this.updateVal(this.data, "stopy", _stopy, Math.max); + this.updateVal(this.nextData, "startx", _startx, Math.min); + this.updateVal(this.nextData, "starty", _starty, Math.min); + this.updateVal(this.nextData, "stopx", _stopx, Math.max); + this.updateVal(this.nextData, "stopy", _stopy, Math.max); + } + init(diagObj) { + 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 + }; + setConf(diagObj.db.getConfig()); + } + bumpLastMargin(margin) { + this.data.stopx += margin; + this.data.stopy += margin; + } +} +const setConf = function(cnf) { + assignWithDepth(conf, cnf); + if (cnf.fontFamily) { + conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight; + } +}; +const c4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; +}; +const boundaryFont = (cnf) => { + return { + fontFamily: cnf.boundaryFontFamily, + fontSize: cnf.boundaryFontSize, + fontWeight: cnf.boundaryFontWeight + }; +}; +const messageFont = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; +}; +function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) { + if (!c4Shape[textType].width) { + if (c4ShapeTextWrap) { + c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf); + c4Shape[textType].textLines = c4Shape[textType].text.split(common.lineBreakRegex).length; + c4Shape[textType].width = textLimitWidth; + c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf); + } else { + let lines = c4Shape[textType].text.split(common.lineBreakRegex); + c4Shape[textType].textLines = lines.length; + let lineHeight = 0; + c4Shape[textType].height = 0; + c4Shape[textType].width = 0; + for (const line of lines) { + c4Shape[textType].width = Math.max( + calculateTextWidth(line, textConf), + c4Shape[textType].width + ); + lineHeight = calculateTextHeight(line, textConf); + c4Shape[textType].height = c4Shape[textType].height + lineHeight; + } + } + } +} +const drawBoundary = function(diagram2, boundary, bounds) { + boundary.x = bounds.data.startx; + boundary.y = bounds.data.starty; + boundary.width = bounds.data.stopx - bounds.data.startx; + boundary.height = bounds.data.stopy - bounds.data.starty; + boundary.label.y = conf.c4ShapeMargin - 35; + let boundaryTextWrap = boundary.wrap && conf.wrap; + let boundaryLabelConf = boundaryFont(conf); + boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2; + boundaryLabelConf.fontWeight = "bold"; + let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf); + calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth); + svgDraw.drawBoundary(diagram2, boundary, conf); +}; +const drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) { + let Y = 0; + for (const c4ShapeKey of c4ShapeKeys) { + Y = 0; + const c4Shape = c4ShapeArray2[c4ShapeKey]; + let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2; + c4Shape.typeC4Shape.width = calculateTextWidth( + "«" + c4Shape.typeC4Shape.text + "»", + c4ShapeTypeConf + ); + c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2; + c4Shape.typeC4Shape.Y = conf.c4ShapePadding; + Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4; + c4Shape.image = { width: 0, height: 0, Y: 0 }; + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + break; + } + if (c4Shape.sprite) { + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + } + let c4ShapeTextWrap = c4Shape.wrap && conf.wrap; + let textLimitWidth = conf.width - conf.c4ShapePadding * 2; + let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2; + c4ShapeLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth); + c4Shape["label"].Y = Y + 8; + Y = c4Shape["label"].Y + c4Shape["label"].height; + if (c4Shape.type && c4Shape.type.text !== "") { + c4Shape.type.text = "[" + c4Shape.type.text + "]"; + let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth); + c4Shape["type"].Y = Y + 5; + Y = c4Shape["type"].Y + c4Shape["type"].height; + } else if (c4Shape.techn && c4Shape.techn.text !== "") { + c4Shape.techn.text = "[" + c4Shape.techn.text + "]"; + let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text); + calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth); + c4Shape["techn"].Y = Y + 5; + Y = c4Shape["techn"].Y + c4Shape["techn"].height; + } + let rectHeight = Y; + let rectWidth = c4Shape.label.width; + if (c4Shape.descr && c4Shape.descr.text !== "") { + let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth); + c4Shape["descr"].Y = Y + 20; + Y = c4Shape["descr"].Y + c4Shape["descr"].height; + rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width); + rectHeight = Y - c4Shape["descr"].textLines * 5; + } + rectWidth = rectWidth + conf.c4ShapePadding; + c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width); + c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height); + c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin; + currentBounds.insert(c4Shape); + svgDraw.drawC4Shape(diagram2, c4Shape, conf); + } + currentBounds.bumpLastMargin(conf.c4ShapeMargin); +}; +class Point { + constructor(x, y) { + this.x = x; + this.y = y; + } +} +let getIntersectPoint = function(fromNode, endPoint) { + let x1 = fromNode.x; + let y1 = fromNode.y; + let x2 = endPoint.x; + let y2 = endPoint.y; + let fromCenterX = x1 + fromNode.width / 2; + let fromCenterY = y1 + fromNode.height / 2; + let dx = Math.abs(x1 - x2); + let dy = Math.abs(y1 - y2); + let tanDYX = dy / dx; + let fromDYX = fromNode.height / fromNode.width; + let returnPoint = null; + if (y1 == y2 && x1 < x2) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY); + } else if (y1 == y2 && x1 > x2) { + returnPoint = new Point(x1, fromCenterY); + } else if (x1 == x2 && y1 < y2) { + returnPoint = new Point(fromCenterX, y1 + fromNode.height); + } else if (x1 == x2 && y1 > y2) { + returnPoint = new Point(fromCenterX, y1); + } + if (x1 > x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point( + fromCenterX - dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point( + fromCenterX + dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1); + } + } else if (x1 > x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX); + } else { + returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1); + } + } + return returnPoint; +}; +let getIntersectPoints = function(fromNode, endNode) { + let endIntersectPoint = { x: 0, y: 0 }; + endIntersectPoint.x = endNode.x + endNode.width / 2; + endIntersectPoint.y = endNode.y + endNode.height / 2; + let startPoint = getIntersectPoint(fromNode, endIntersectPoint); + endIntersectPoint.x = fromNode.x + fromNode.width / 2; + endIntersectPoint.y = fromNode.y + fromNode.height / 2; + let endPoint = getIntersectPoint(endNode, endIntersectPoint); + return { startPoint, endPoint }; +}; +const drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) { + let i = 0; + for (let rel of rels2) { + i = i + 1; + let relTextWrap = rel.wrap && conf.wrap; + let relConf = messageFont(conf); + let diagramType = diagObj.db.getC4Type(); + if (diagramType === "C4Dynamic") { + rel.label.text = i + ": " + rel.label.text; + } + let textLimitWidth = calculateTextWidth(rel.label.text, relConf); + calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth); + if (rel.techn && rel.techn.text !== "") { + textLimitWidth = calculateTextWidth(rel.techn.text, relConf); + calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth); + } + if (rel.descr && rel.descr.text !== "") { + textLimitWidth = calculateTextWidth(rel.descr.text, relConf); + calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth); + } + let fromNode = getC4ShapeObj(rel.from); + let endNode = getC4ShapeObj(rel.to); + let points = getIntersectPoints(fromNode, endNode); + rel.startPoint = points.startPoint; + rel.endPoint = points.endPoint; + } + svgDraw.drawRels(diagram2, rels2, conf); +}; +function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) { + let currentBounds = new Bounds(diagObj); + currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length); + for (let [i, currentBoundary] of currentBoundaries.entries()) { + let Y = 0; + currentBoundary.image = { width: 0, height: 0, Y: 0 }; + if (currentBoundary.sprite) { + currentBoundary.image.width = 48; + currentBoundary.image.height = 48; + currentBoundary.image.Y = Y; + Y = currentBoundary.image.Y + currentBoundary.image.height; + } + let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap; + let currentBoundaryLabelConf = boundaryFont(conf); + currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2; + currentBoundaryLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH( + "label", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryLabelConf, + currentBounds.data.widthLimit + ); + currentBoundary["label"].Y = Y + 8; + Y = currentBoundary["label"].Y + currentBoundary["label"].height; + if (currentBoundary.type && currentBoundary.type.text !== "") { + currentBoundary.type.text = "[" + currentBoundary.type.text + "]"; + let currentBoundaryTypeConf = boundaryFont(conf); + calcC4ShapeTextWH( + "type", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryTypeConf, + currentBounds.data.widthLimit + ); + currentBoundary["type"].Y = Y + 5; + Y = currentBoundary["type"].Y + currentBoundary["type"].height; + } + if (currentBoundary.descr && currentBoundary.descr.text !== "") { + let currentBoundaryDescrConf = boundaryFont(conf); + currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2; + calcC4ShapeTextWH( + "descr", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryDescrConf, + currentBounds.data.widthLimit + ); + currentBoundary["descr"].Y = Y + 20; + Y = currentBoundary["descr"].Y + currentBoundary["descr"].height; + } + if (i == 0 || i % c4BoundaryInRow === 0) { + let _x = parentBounds.data.startx + conf.diagramMarginX; + let _y = parentBounds.data.stopy + conf.diagramMarginY + Y; + currentBounds.setData(_x, _x, _y, _y); + } else { + let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx; + let _y = currentBounds.data.starty; + currentBounds.setData(_x, _x, _y, _y); + } + currentBounds.name = currentBoundary.alias; + let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias); + let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias); + if (currentPersonOrSystemKeys.length > 0) { + drawC4ShapeArray( + currentBounds, + diagram2, + currentPersonOrSystemArray, + currentPersonOrSystemKeys + ); + } + parentBoundaryAlias = currentBoundary.alias; + let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias); + if (nextCurrentBoundarys.length > 0) { + drawInsideBoundary( + diagram2, + parentBoundaryAlias, + currentBounds, + nextCurrentBoundarys, + diagObj + ); + } + if (currentBoundary.alias !== "global") { + drawBoundary(diagram2, currentBoundary, currentBounds); + } + parentBounds.data.stopy = Math.max( + currentBounds.data.stopy + conf.c4ShapeMargin, + parentBounds.data.stopy + ); + parentBounds.data.stopx = Math.max( + currentBounds.data.stopx + conf.c4ShapeMargin, + parentBounds.data.stopx + ); + globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx); + globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy); + } +} +const draw = function(_text, id, _version, diagObj) { + conf = getConfig().c4; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + let db2 = diagObj.db; + diagObj.db.setWrap(conf.wrap); + c4ShapeInRow = db2.getC4ShapeInRow(); + c4BoundaryInRow = db2.getC4BoundaryInRow(); + log.debug(`C:${JSON.stringify(conf, null, 2)}`); + const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : d3select(`[id="${id}"]`); + svgDraw.insertComputerIcon(diagram2); + svgDraw.insertDatabaseIcon(diagram2); + svgDraw.insertClockIcon(diagram2); + let screenBounds = new Bounds(diagObj); + screenBounds.setData( + conf.diagramMarginX, + conf.diagramMarginX, + conf.diagramMarginY, + conf.diagramMarginY + ); + screenBounds.data.widthLimit = screen.availWidth; + globalBoundaryMaxX = conf.diagramMarginX; + globalBoundaryMaxY = conf.diagramMarginY; + const title2 = diagObj.db.getTitle(); + let currentBoundaries = diagObj.db.getBoundarys(""); + drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj); + svgDraw.insertArrowHead(diagram2); + svgDraw.insertArrowEnd(diagram2); + svgDraw.insertArrowCrossHead(diagram2); + svgDraw.insertArrowFilledHead(diagram2); + drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj); + screenBounds.data.stopx = globalBoundaryMaxX; + screenBounds.data.stopy = globalBoundaryMaxY; + const box = screenBounds.data; + let boxHeight = box.stopy - box.starty; + let height = boxHeight + 2 * conf.diagramMarginY; + let boxWidth = box.stopx - box.startx; + const width = boxWidth + 2 * conf.diagramMarginX; + if (title2) { + diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY); + } + configureSvgSize(diagram2, height, width, conf.useMaxWidth); + const extraVertForTitle = title2 ? 60 : 0; + diagram2.attr( + "viewBox", + box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); + log.debug(`models:`, box); +}; +const renderer = { + drawPersonOrSystemArray: drawC4ShapeArray, + drawBoundary, + setConf, + draw +}; +const getStyles = (options) => `.person { + stroke: ${options.personBorder}; + fill: ${options.personBkg}; + } +`; +const styles = getStyles; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: ({ c4, wrap }) => { + renderer.setConf(c4); + db.setWrap(wrap); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/classDiagram-04f04946.js b/webroot/js/node_modules/mermaid/dist/classDiagram-04f04946.js new file mode 100644 index 0000000..bb9143d --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/classDiagram-04f04946.js @@ -0,0 +1,362 @@ +import { p as parser, d as db, s as styles } from "./styles-8b67d7cb.js"; +import { line, curveBasis, select } from "d3"; +import { layout } from "dagre-d3-es/src/dagre/index.js"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { u as utils, l as log, v as parseGenericTypes, c as getConfig, i as configureSvgSize } from "./mermaid-0d192ec3.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +let edgeCount = 0; +const drawEdge = function(elem, path, relation, conf, diagObj) { + const getRelationType = function(type) { + switch (type) { + case diagObj.db.relationType.AGGREGATION: + return "aggregation"; + case diagObj.db.relationType.EXTENSION: + return "extension"; + case diagObj.db.relationType.COMPOSITION: + return "composition"; + case diagObj.db.relationType.DEPENDENCY: + return "dependency"; + case diagObj.db.relationType.LOLLIPOP: + return "lollipop"; + } + }; + path.points = path.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path.points; + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation"); + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + if (relation.relation.lineType == 1) { + svgPath.attr("class", "relation dashed-line"); + } + if (relation.relation.lineType == 10) { + svgPath.attr("class", "relation dotted-line"); + } + if (relation.relation.type1 !== "none") { + svgPath.attr( + "marker-start", + "url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)" + ); + } + if (relation.relation.type2 !== "none") { + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(relation.relation.type2) + "End)" + ); + } + let x, y; + const l = path.points.length; + let labelPosition = utils.calcLabelPosition(path.points); + x = labelPosition.x; + y = labelPosition.y; + let p1_card_x, p1_card_y; + let p2_card_x, p2_card_y; + if (l % 2 !== 0 && l > 1) { + let cardinality_1_point = utils.calcCardinalityPosition( + relation.relation.type1 !== "none", + path.points, + path.points[0] + ); + let cardinality_2_point = utils.calcCardinalityPosition( + relation.relation.type2 !== "none", + path.points, + path.points[l - 1] + ); + log.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point)); + log.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point)); + p1_card_x = cardinality_1_point.x; + p1_card_y = cardinality_1_point.y; + p2_card_x = cardinality_2_point.x; + p2_card_y = cardinality_2_point.y; + } + if (relation.title !== void 0) { + const g = elem.append("g").attr("class", "classLabel"); + const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title); + window.label = label; + const bounds = label.node().getBBox(); + g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding); + } + log.info("Rendering relation " + JSON.stringify(relation)); + if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1); + } + if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2); + } + edgeCount++; +}; +const drawClass = function(elem, classDef, conf, diagObj) { + log.debug("Rendering class ", classDef, conf); + const id = classDef.id; + const classInfo = { + id, + label: classDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup"); + let title; + if (classDef.link) { + title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + } else { + title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + } + let isFirst = true; + classDef.annotations.forEach(function(member) { + const titleText2 = title.append("tspan").text("«" + member + "»"); + if (!isFirst) { + titleText2.attr("dy", conf.textHeight); + } + isFirst = false; + }); + let classTitleString = getClassTitleString(classDef); + const classTitle = title.append("tspan").text(classTitleString).attr("class", "title"); + if (!isFirst) { + classTitle.attr("dy", conf.textHeight); + } + const titleHeight = title.node().getBBox().height; + let membersLine; + let membersBox; + let methodsLine; + if (classDef.members.length > 0) { + membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2); + const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.members.forEach(function(member) { + addTspan(members, member, isFirst, conf); + isFirst = false; + }); + membersBox = members.node().getBBox(); + } + if (classDef.methods.length > 0) { + methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height); + const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.methods.forEach(function(method) { + addTspan(methods, method, isFirst, conf); + isFirst = false; + }); + } + const classBox = g.node().getBBox(); + var cssClassStr = " "; + if (classDef.cssClasses.length > 0) { + cssClassStr = cssClassStr + classDef.cssClasses.join(" "); + } + const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr); + const rectWidth = rect.node().getBBox().width; + title.node().childNodes.forEach(function(x) { + x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); + }); + if (classDef.tooltip) { + title.insert("title").text(classDef.tooltip); + } + if (membersLine) { + membersLine.attr("x2", rectWidth); + } + if (methodsLine) { + methodsLine.attr("x2", rectWidth); + } + classInfo.width = rectWidth; + classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin; + return classInfo; +}; +const getClassTitleString = function(classDef) { + let classTitleString = classDef.id; + if (classDef.type) { + classTitleString += "<" + parseGenericTypes(classDef.type) + ">"; + } + return classTitleString; +}; +const drawNote = function(elem, note, conf, diagObj) { + log.debug("Rendering note ", note, conf); + const id = note.id; + const noteInfo = { + id, + text: note.text, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id).attr("class", "classGroup"); + let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + const lines = JSON.parse(`"${note.text}"`).split("\n"); + lines.forEach(function(line2) { + log.debug(`Adding line: ${line2}`); + text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight); + }); + const noteBox = g.node().getBBox(); + const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr( + "height", + noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin + ); + const rectWidth = rect.node().getBBox().width; + text.node().childNodes.forEach(function(x) { + x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); + }); + noteInfo.width = rectWidth; + noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin; + return noteInfo; +}; +const addTspan = function(textEl, member, isFirst, conf) { + const { displayText, cssStyle } = member.getDisplayDetails(); + const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText); + if (cssStyle !== "") { + tSpan.attr("style", member.cssStyle); + } + if (!isFirst) { + tSpan.attr("dy", conf.textHeight); + } +}; +const svgDraw = { + getClassTitleString, + drawClass, + drawEdge, + drawNote +}; +let idCache = {}; +const padding = 20; +const getGraphId = function(label) { + const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label); + if (foundEntry) { + return foundEntry[0]; + } +}; +const insertMarkers = function(elem) { + elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); + elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); + elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const draw = function(text, id, _version, diagObj) { + const conf = getConfig().class; + idCache = {}; + log.info("Rendering diagram " + text); + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const diagram2 = root.select(`[id='${id}']`); + insertMarkers(diagram2); + const g = new graphlib.Graph({ + multigraph: true + }); + g.setGraph({ + isMultiGraph: true + }); + g.setDefaultEdgeLabel(function() { + return {}; + }); + const classes = diagObj.db.getClasses(); + const keys = Object.keys(classes); + for (const key of keys) { + const classDef = classes[key]; + const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj); + idCache[node.id] = node; + g.setNode(node.id, node); + log.info("Org height: " + node.height); + } + const relations = diagObj.db.getRelations(); + relations.forEach(function(relation) { + log.info( + "tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation) + ); + g.setEdge( + getGraphId(relation.id1), + getGraphId(relation.id2), + { + relation + }, + relation.title || "DEFAULT" + ); + }); + const notes = diagObj.db.getNotes(); + notes.forEach(function(note) { + log.debug(`Adding note: ${JSON.stringify(note)}`); + const node = svgDraw.drawNote(diagram2, note, conf, diagObj); + idCache[node.id] = node; + g.setNode(node.id, node); + if (note.class && note.class in classes) { + g.setEdge( + note.id, + getGraphId(note.class), + { + relation: { + id1: note.id, + id2: note.class, + relation: { + type1: "none", + type2: "none", + lineType: 10 + } + } + }, + "DEFAULT" + ); + } + }); + layout(g); + g.nodes().forEach(function(v) { + if (v !== void 0 && g.node(v) !== void 0) { + log.debug("Node " + v + ": " + JSON.stringify(g.node(v))); + root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr( + "transform", + "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )" + ); + } + }); + g.edges().forEach(function(e) { + if (e !== void 0 && g.edge(e) !== void 0) { + log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e))); + svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj); + } + }); + const svgBounds = diagram2.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + configureSvgSize(diagram2, height, width, conf.useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; + log.debug(`viewBox ${vBox}`); + diagram2.attr("viewBox", vBox); +}; +const renderer = { + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/classDiagram-4226ab0c.js b/webroot/js/node_modules/mermaid/dist/classDiagram-4226ab0c.js new file mode 100644 index 0000000..e2023e5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/classDiagram-4226ab0c.js @@ -0,0 +1,354 @@ +import { p as parser, d as db, s as styles } from "./styles-6e7f2b1b.js"; +import { F as curveBasis, z as utils, l as log, G as parseGenericTypes, c as getConfig, j as d3select, k as configureSvgSize } from "./mermaid-491db2d9.js"; +import { G as Graph, l as layout } from "./layout-a7b9ff07.js"; +import { l as line } from "./line-8fd2bd69.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +let edgeCount = 0; +const drawEdge = function(elem, path, relation, conf, diagObj) { + const getRelationType = function(type) { + switch (type) { + case diagObj.db.relationType.AGGREGATION: + return "aggregation"; + case diagObj.db.relationType.EXTENSION: + return "extension"; + case diagObj.db.relationType.COMPOSITION: + return "composition"; + case diagObj.db.relationType.DEPENDENCY: + return "dependency"; + case diagObj.db.relationType.LOLLIPOP: + return "lollipop"; + } + }; + path.points = path.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path.points; + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation"); + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + if (relation.relation.lineType == 1) { + svgPath.attr("class", "relation dashed-line"); + } + if (relation.relation.lineType == 10) { + svgPath.attr("class", "relation dotted-line"); + } + if (relation.relation.type1 !== "none") { + svgPath.attr( + "marker-start", + "url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)" + ); + } + if (relation.relation.type2 !== "none") { + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(relation.relation.type2) + "End)" + ); + } + let x, y; + const l = path.points.length; + let labelPosition = utils.calcLabelPosition(path.points); + x = labelPosition.x; + y = labelPosition.y; + let p1_card_x, p1_card_y; + let p2_card_x, p2_card_y; + if (l % 2 !== 0 && l > 1) { + let cardinality_1_point = utils.calcCardinalityPosition( + relation.relation.type1 !== "none", + path.points, + path.points[0] + ); + let cardinality_2_point = utils.calcCardinalityPosition( + relation.relation.type2 !== "none", + path.points, + path.points[l - 1] + ); + log.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point)); + log.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point)); + p1_card_x = cardinality_1_point.x; + p1_card_y = cardinality_1_point.y; + p2_card_x = cardinality_2_point.x; + p2_card_y = cardinality_2_point.y; + } + if (relation.title !== void 0) { + const g = elem.append("g").attr("class", "classLabel"); + const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title); + window.label = label; + const bounds = label.node().getBBox(); + g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding); + } + log.info("Rendering relation " + JSON.stringify(relation)); + if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1); + } + if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2); + } + edgeCount++; +}; +const drawClass = function(elem, classDef, conf, diagObj) { + log.debug("Rendering class ", classDef, conf); + const id = classDef.id; + const classInfo = { + id, + label: classDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup"); + let title; + if (classDef.link) { + title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + } else { + title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + } + let isFirst = true; + classDef.annotations.forEach(function(member) { + const titleText2 = title.append("tspan").text("«" + member + "»"); + if (!isFirst) { + titleText2.attr("dy", conf.textHeight); + } + isFirst = false; + }); + let classTitleString = getClassTitleString(classDef); + const classTitle = title.append("tspan").text(classTitleString).attr("class", "title"); + if (!isFirst) { + classTitle.attr("dy", conf.textHeight); + } + const titleHeight = title.node().getBBox().height; + let membersLine; + let membersBox; + let methodsLine; + if (classDef.members.length > 0) { + membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2); + const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.members.forEach(function(member) { + addTspan(members, member, isFirst, conf); + isFirst = false; + }); + membersBox = members.node().getBBox(); + } + if (classDef.methods.length > 0) { + methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height); + const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.methods.forEach(function(method) { + addTspan(methods, method, isFirst, conf); + isFirst = false; + }); + } + const classBox = g.node().getBBox(); + var cssClassStr = " "; + if (classDef.cssClasses.length > 0) { + cssClassStr = cssClassStr + classDef.cssClasses.join(" "); + } + const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr); + const rectWidth = rect.node().getBBox().width; + title.node().childNodes.forEach(function(x) { + x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); + }); + if (classDef.tooltip) { + title.insert("title").text(classDef.tooltip); + } + if (membersLine) { + membersLine.attr("x2", rectWidth); + } + if (methodsLine) { + methodsLine.attr("x2", rectWidth); + } + classInfo.width = rectWidth; + classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin; + return classInfo; +}; +const getClassTitleString = function(classDef) { + let classTitleString = classDef.id; + if (classDef.type) { + classTitleString += "<" + parseGenericTypes(classDef.type) + ">"; + } + return classTitleString; +}; +const drawNote = function(elem, note, conf, diagObj) { + log.debug("Rendering note ", note, conf); + const id = note.id; + const noteInfo = { + id, + text: note.text, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id).attr("class", "classGroup"); + let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + const lines = JSON.parse(`"${note.text}"`).split("\n"); + lines.forEach(function(line2) { + log.debug(`Adding line: ${line2}`); + text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight); + }); + const noteBox = g.node().getBBox(); + const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr( + "height", + noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin + ); + const rectWidth = rect.node().getBBox().width; + text.node().childNodes.forEach(function(x) { + x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); + }); + noteInfo.width = rectWidth; + noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin; + return noteInfo; +}; +const addTspan = function(textEl, member, isFirst, conf) { + const { displayText, cssStyle } = member.getDisplayDetails(); + const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText); + if (cssStyle !== "") { + tSpan.attr("style", member.cssStyle); + } + if (!isFirst) { + tSpan.attr("dy", conf.textHeight); + } +}; +const svgDraw = { + getClassTitleString, + drawClass, + drawEdge, + drawNote +}; +let idCache = {}; +const padding = 20; +const getGraphId = function(label) { + const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label); + if (foundEntry) { + return foundEntry[0]; + } +}; +const insertMarkers = function(elem) { + elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); + elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); + elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const draw = function(text, id, _version, diagObj) { + const conf = getConfig().class; + idCache = {}; + log.info("Rendering diagram " + text); + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const diagram2 = root.select(`[id='${id}']`); + insertMarkers(diagram2); + const g = new Graph({ + multigraph: true + }); + g.setGraph({ + isMultiGraph: true + }); + g.setDefaultEdgeLabel(function() { + return {}; + }); + const classes = diagObj.db.getClasses(); + const keys = Object.keys(classes); + for (const key of keys) { + const classDef = classes[key]; + const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj); + idCache[node.id] = node; + g.setNode(node.id, node); + log.info("Org height: " + node.height); + } + const relations = diagObj.db.getRelations(); + relations.forEach(function(relation) { + log.info( + "tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation) + ); + g.setEdge( + getGraphId(relation.id1), + getGraphId(relation.id2), + { + relation + }, + relation.title || "DEFAULT" + ); + }); + const notes = diagObj.db.getNotes(); + notes.forEach(function(note) { + log.debug(`Adding note: ${JSON.stringify(note)}`); + const node = svgDraw.drawNote(diagram2, note, conf, diagObj); + idCache[node.id] = node; + g.setNode(node.id, node); + if (note.class && note.class in classes) { + g.setEdge( + note.id, + getGraphId(note.class), + { + relation: { + id1: note.id, + id2: note.class, + relation: { + type1: "none", + type2: "none", + lineType: 10 + } + } + }, + "DEFAULT" + ); + } + }); + layout(g); + g.nodes().forEach(function(v) { + if (v !== void 0 && g.node(v) !== void 0) { + log.debug("Node " + v + ": " + JSON.stringify(g.node(v))); + root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr( + "transform", + "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )" + ); + } + }); + g.edges().forEach(function(e) { + if (e !== void 0 && g.edge(e) !== void 0) { + log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e))); + svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj); + } + }); + const svgBounds = diagram2.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + configureSvgSize(diagram2, height, width, conf.useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; + log.debug(`viewBox ${vBox}`); + diagram2.attr("viewBox", vBox); +}; +const renderer = { + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/classDiagram-ad76bf5a.js b/webroot/js/node_modules/mermaid/dist/classDiagram-ad76bf5a.js new file mode 100644 index 0000000..86b2433 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/classDiagram-ad76bf5a.js @@ -0,0 +1,218 @@ +import { p as G, d as S, s as A } from "./styles-483f8ae9.js"; +import { F as W, z as B, l as u, G as I, c as H, j as M, k as O } from "./mermaid-e4a58915.js"; +import { G as P, l as X } from "./layout-545b2d5b.js"; +import { l as Y } from "./line-4ba3c4fa.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +let _ = 0; +const $ = function(i, a, t, o, p) { + const g = function(e) { + switch (e) { + case p.db.relationType.AGGREGATION: + return "aggregation"; + case p.db.relationType.EXTENSION: + return "extension"; + case p.db.relationType.COMPOSITION: + return "composition"; + case p.db.relationType.DEPENDENCY: + return "dependency"; + case p.db.relationType.LOLLIPOP: + return "lollipop"; + } + }; + a.points = a.points.filter((e) => !Number.isNaN(e.y)); + const s = a.points, c = Y().x(function(e) { + return e.x; + }).y(function(e) { + return e.y; + }).curve(W), n = i.append("path").attr("d", c(s)).attr("id", "edge" + _).attr("class", "relation"); + let r = ""; + o.arrowMarkerAbsolute && (r = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, r = r.replace(/\(/g, "\\("), r = r.replace(/\)/g, "\\)")), t.relation.lineType == 1 && n.attr("class", "relation dashed-line"), t.relation.lineType == 10 && n.attr("class", "relation dotted-line"), t.relation.type1 !== "none" && n.attr( + "marker-start", + "url(" + r + "#" + g(t.relation.type1) + "Start)" + ), t.relation.type2 !== "none" && n.attr( + "marker-end", + "url(" + r + "#" + g(t.relation.type2) + "End)" + ); + let f, h; + const x = a.points.length; + let k = B.calcLabelPosition(a.points); + f = k.x, h = k.y; + let y, m, w, b; + if (x % 2 !== 0 && x > 1) { + let e = B.calcCardinalityPosition( + t.relation.type1 !== "none", + a.points, + a.points[0] + ), d = B.calcCardinalityPosition( + t.relation.type2 !== "none", + a.points, + a.points[x - 1] + ); + u.debug("cardinality_1_point " + JSON.stringify(e)), u.debug("cardinality_2_point " + JSON.stringify(d)), y = e.x, m = e.y, w = d.x, b = d.y; + } + if (t.title !== void 0) { + const e = i.append("g").attr("class", "classLabel"), d = e.append("text").attr("class", "label").attr("x", f).attr("y", h).attr("fill", "red").attr("text-anchor", "middle").text(t.title); + window.label = d; + const l = d.node().getBBox(); + e.insert("rect", ":first-child").attr("class", "box").attr("x", l.x - o.padding / 2).attr("y", l.y - o.padding / 2).attr("width", l.width + o.padding).attr("height", l.height + o.padding); + } + u.info("Rendering relation " + JSON.stringify(t)), t.relationTitle1 !== void 0 && t.relationTitle1 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", y).attr("y", m).attr("fill", "black").attr("font-size", "6").text(t.relationTitle1), t.relationTitle2 !== void 0 && t.relationTitle2 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", w).attr("y", b).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), _++; +}, J = function(i, a, t, o) { + u.debug("Rendering class ", a, t); + const p = a.id, g = { + id: p, + label: a.id, + width: 0, + height: 0 + }, s = i.append("g").attr("id", o.db.lookUpDomId(p)).attr("class", "classGroup"); + let c; + a.link ? c = s.append("svg:a").attr("xlink:href", a.link).attr("target", a.linkTarget).append("text").attr("y", t.textHeight + t.padding).attr("x", 0) : c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0); + let n = !0; + a.annotations.forEach(function(d) { + const l = c.append("tspan").text("«" + d + "»"); + n || l.attr("dy", t.textHeight), n = !1; + }); + let r = C(a); + const f = c.append("tspan").text(r).attr("class", "title"); + n || f.attr("dy", t.textHeight); + const h = c.node().getBBox().height; + let x, k, y; + if (a.members.length > 0) { + x = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin / 2).attr("y2", t.padding + h + t.dividerMargin / 2); + const d = s.append("text").attr("x", t.padding).attr("y", h + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText"); + n = !0, a.members.forEach(function(l) { + v(d, l, n, t), n = !1; + }), k = d.node().getBBox(); + } + if (a.methods.length > 0) { + y = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin + k.height).attr("y2", t.padding + h + t.dividerMargin + k.height); + const d = s.append("text").attr("x", t.padding).attr("y", h + 2 * t.dividerMargin + k.height + t.textHeight).attr("fill", "white").attr("class", "classText"); + n = !0, a.methods.forEach(function(l) { + v(d, l, n, t), n = !1; + }); + } + const m = s.node().getBBox(); + var w = " "; + a.cssClasses.length > 0 && (w = w + a.cssClasses.join(" ")); + const e = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", m.width + 2 * t.padding).attr("height", m.height + t.padding + 0.5 * t.dividerMargin).attr("class", w).node().getBBox().width; + return c.node().childNodes.forEach(function(d) { + d.setAttribute("x", (e - d.getBBox().width) / 2); + }), a.tooltip && c.insert("title").text(a.tooltip), x && x.attr("x2", e), y && y.attr("x2", e), g.width = e, g.height = m.height + t.padding + 0.5 * t.dividerMargin, g; +}, C = function(i) { + let a = i.id; + return i.type && (a += "<" + I(i.type) + ">"), a; +}, Z = function(i, a, t, o) { + u.debug("Rendering note ", a, t); + const p = a.id, g = { + id: p, + text: a.text, + width: 0, + height: 0 + }, s = i.append("g").attr("id", p).attr("class", "classGroup"); + let c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0); + const n = JSON.parse(`"${a.text}"`).split(` +`); + n.forEach(function(x) { + u.debug(`Adding line: ${x}`), c.append("tspan").text(x).attr("class", "title").attr("dy", t.textHeight); + }); + const r = s.node().getBBox(), h = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", r.width + 2 * t.padding).attr( + "height", + r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin + ).node().getBBox().width; + return c.node().childNodes.forEach(function(x) { + x.setAttribute("x", (h - x.getBBox().width) / 2); + }), g.width = h, g.height = r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, g; +}, v = function(i, a, t, o) { + const { displayText: p, cssStyle: g } = a.getDisplayDetails(), s = i.append("tspan").attr("x", o.padding).text(p); + g !== "" && s.attr("style", a.cssStyle), t || s.attr("dy", o.textHeight); +}, N = { + getClassTitleString: C, + drawClass: J, + drawEdge: $, + drawNote: Z +}; +let T = {}; +const E = 20, L = function(i) { + const a = Object.entries(T).find((t) => t[1].label === i); + if (a) + return a[0]; +}, R = function(i) { + i.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), i.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), i.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), i.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}, F = function(i, a, t, o) { + const p = H().class; + T = {}, u.info("Rendering diagram " + i); + const g = H().securityLevel; + let s; + g === "sandbox" && (s = M("#i" + a)); + const c = g === "sandbox" ? M(s.nodes()[0].contentDocument.body) : M("body"), n = c.select(`[id='${a}']`); + R(n); + const r = new P({ + multigraph: !0 + }); + r.setGraph({ + isMultiGraph: !0 + }), r.setDefaultEdgeLabel(function() { + return {}; + }); + const f = o.db.getClasses(), h = Object.keys(f); + for (const e of h) { + const d = f[e], l = N.drawClass(n, d, p, o); + T[l.id] = l, r.setNode(l.id, l), u.info("Org height: " + l.height); + } + o.db.getRelations().forEach(function(e) { + u.info( + "tjoho" + L(e.id1) + L(e.id2) + JSON.stringify(e) + ), r.setEdge( + L(e.id1), + L(e.id2), + { + relation: e + }, + e.title || "DEFAULT" + ); + }), o.db.getNotes().forEach(function(e) { + u.debug(`Adding note: ${JSON.stringify(e)}`); + const d = N.drawNote(n, e, p, o); + T[d.id] = d, r.setNode(d.id, d), e.class && e.class in f && r.setEdge( + e.id, + L(e.class), + { + relation: { + id1: e.id, + id2: e.class, + relation: { + type1: "none", + type2: "none", + lineType: 10 + } + } + }, + "DEFAULT" + ); + }), X(r), r.nodes().forEach(function(e) { + e !== void 0 && r.node(e) !== void 0 && (u.debug("Node " + e + ": " + JSON.stringify(r.node(e))), c.select("#" + (o.db.lookUpDomId(e) || e)).attr( + "transform", + "translate(" + (r.node(e).x - r.node(e).width / 2) + "," + (r.node(e).y - r.node(e).height / 2) + " )" + )); + }), r.edges().forEach(function(e) { + e !== void 0 && r.edge(e) !== void 0 && (u.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(r.edge(e))), N.drawEdge(n, r.edge(e), r.edge(e).relation, p, o)); + }); + const y = n.node().getBBox(), m = y.width + E * 2, w = y.height + E * 2; + O(n, w, m, p.useMaxWidth); + const b = `${y.x - E} ${y.y - E} ${m} ${w}`; + u.debug(`viewBox ${b}`), n.attr("viewBox", b); +}, z = { + draw: F +}, D = { + parser: G, + db: S, + renderer: z, + styles: A, + init: (i) => { + i.class || (i.class = {}), i.class.arrowMarkerAbsolute = i.arrowMarkerAbsolute, S.clear(); + } +}; +export { + D as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/classDiagram-v2-481a852c.js b/webroot/js/node_modules/mermaid/dist/classDiagram-v2-481a852c.js new file mode 100644 index 0000000..899d7e3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/classDiagram-v2-481a852c.js @@ -0,0 +1,288 @@ +import { p as parser, d as db, s as styles } from "./styles-6e7f2b1b.js"; +import { l as log, c as getConfig, j as d3select, z as utils, r as setupGraphViewbox, q as interpolateToCurve, n as curveLinear, o as getStylesFromArray, f as common } from "./mermaid-491db2d9.js"; +import { G as Graph } from "./layout-a7b9ff07.js"; +import { r as render } from "./index-cc269c15.js"; +import "./edges-9bf94b2d.js"; +import "./createText-2660bae1.js"; +import "./line-8fd2bd69.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +const sanitizeText = (txt) => common.sanitizeText(txt, getConfig()); +let conf = { + dividerMargin: 10, + padding: 5, + textHeight: 10, + curve: void 0 +}; +const addNamespaces = function(namespaces, g, _id, diagObj) { + const keys = Object.keys(namespaces); + log.info("keys:", keys); + log.info(namespaces); + keys.forEach(function(id) { + var _a, _b; + const vertex = namespaces[id]; + const shape = "rect"; + const node = { + shape, + id: vertex.id, + domId: vertex.domId, + labelText: sanitizeText(vertex.id), + labelStyle: "", + style: "fill: none; stroke: black", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + addClasses(vertex.classes, g, _id, diagObj, vertex.id); + log.info("setNode", node); + }); +}; +const addClasses = function(classes, g, _id, diagObj, parent) { + const keys = Object.keys(classes); + log.info("keys:", keys); + log.info(classes); + keys.filter((id) => classes[id].parent == parent).forEach(function(id) { + var _a, _b; + const vertex = classes[id]; + const cssClassStr = vertex.cssClasses.join(" "); + const styles2 = { labelStyle: "", style: "" }; + const vertexText = vertex.label ?? vertex.id; + const radius = 0; + const shape = "class_box"; + const node = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText(vertexText), + classData: vertex, + rx: radius, + ry: radius, + class: cssClassStr, + style: styles2.style, + id: vertex.id, + domId: vertex.domId, + tooltip: diagObj.db.getTooltip(vertex.id, parent) || "", + haveCallback: vertex.haveCallback, + link: vertex.link, + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + if (parent) { + g.setParent(vertex.id, parent); + } + log.info("setNode", node); + }); +}; +const addNotes = function(notes, g, startEdgeId, classes) { + log.info(notes); + notes.forEach(function(note, i) { + var _a, _b; + const vertex = note; + const cssNoteStr = ""; + const styles2 = { labelStyle: "", style: "" }; + const vertexText = vertex.text; + const radius = 0; + const shape = "note"; + const node = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText(vertexText), + noteData: vertex, + rx: radius, + ry: radius, + class: cssNoteStr, + style: styles2.style, + id: vertex.id, + domId: vertex.id, + tooltip: "", + type: "note", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + log.info("setNode", node); + if (!vertex.class || !(vertex.class in classes)) { + return; + } + const edgeId = startEdgeId + i; + const edgeData = { + id: `edgeNote${edgeId}`, + //Set relationship style and line type + classes: "relation", + pattern: "dotted", + // Set link type for rendering + arrowhead: "none", + //Set edge extra labels + startLabelRight: "", + endLabelLeft: "", + //Set relation arrow types + arrowTypeStart: "none", + arrowTypeEnd: "none", + style: "fill:none", + labelStyle: "", + curve: interpolateToCurve(conf.curve, curveLinear) + }; + g.setEdge(vertex.id, vertex.class, edgeData, edgeId); + }); +}; +const addRelations = function(relations, g) { + const conf2 = getConfig().flowchart; + let cnt = 0; + relations.forEach(function(edge) { + var _a; + cnt++; + const edgeData = { + //Set relationship style and line type + classes: "relation", + pattern: edge.relation.lineType == 1 ? "dashed" : "solid", + id: "id" + cnt, + // Set link type for rendering + arrowhead: edge.type === "arrow_open" ? "none" : "normal", + //Set edge extra labels + startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1, + endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2, + //Set relation arrow types + arrowTypeStart: getArrowMarker(edge.relation.type1), + arrowTypeEnd: getArrowMarker(edge.relation.type2), + style: "fill:none", + labelStyle: "", + curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear) + }; + log.info(edgeData, edge); + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + edgeData.style = styles2.style; + edgeData.labelStyle = styles2.labelStyle; + } + edge.text = edge.title; + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) { + edgeData.labelType = "html"; + edgeData.label = '' + edge.text + ""; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + g.setEdge(edge.id1, edge.id2, edgeData, cnt); + }); +}; +const setConf = function(cnf) { + conf = { + ...conf, + ...cnf + }; +}; +const draw = async function(text, id, _version, diagObj) { + log.info("Drawing class - ", id); + const conf2 = getConfig().flowchart ?? getConfig().class; + const securityLevel = getConfig().securityLevel; + log.info("config:", conf2); + const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50; + const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50; + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: diagObj.db.getDirection(), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const namespaces = diagObj.db.getNamespaces(); + const classes = diagObj.db.getClasses(); + const relations = diagObj.db.getRelations(); + const notes = diagObj.db.getNotes(); + log.info(relations); + addNamespaces(namespaces, g, id, diagObj); + addClasses(classes, g, id, diagObj); + addRelations(relations, g); + addNotes(notes, g, relations.length + 1, classes); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await render( + element, + g, + ["aggregation", "extension", "composition", "dependency", "lollipop"], + "classDiagram", + id + ); + utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle()); + setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth); + if (!(conf2 == null ? void 0 : conf2.htmlLabels)) { + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } +}; +function getArrowMarker(type) { + let marker; + switch (type) { + case 0: + marker = "aggregation"; + break; + case 1: + marker = "extension"; + break; + case 2: + marker = "composition"; + break; + case 3: + marker = "dependency"; + break; + case 4: + marker = "lollipop"; + break; + default: + marker = "none"; + } + return marker; +} +const renderer = { + setConf, + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/classDiagram-v2-6e58f5b0.js b/webroot/js/node_modules/mermaid/dist/classDiagram-v2-6e58f5b0.js new file mode 100644 index 0000000..045fda5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/classDiagram-v2-6e58f5b0.js @@ -0,0 +1,204 @@ +import { p as R, d as N, s as B } from "./styles-483f8ae9.js"; +import { l as c, c as r, j as k, z as G, r as _, q as E, n as C, o as z, f as A } from "./mermaid-e4a58915.js"; +import { G as q } from "./layout-545b2d5b.js"; +import { r as P } from "./index-5f5016a9.js"; +import "./edges-020bfa8c.js"; +import "./createText-4be7776a.js"; +import "./line-4ba3c4fa.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +const S = (o) => A.sanitizeText(o, r()); +let v = { + dividerMargin: 10, + padding: 5, + textHeight: 10, + curve: void 0 +}; +const $ = function(o, t, p, n) { + const e = Object.keys(o); + c.info("keys:", e), c.info(o), e.forEach(function(s) { + var y, d; + const l = o[s], i = { + shape: "rect", + id: l.id, + domId: l.domId, + labelText: S(l.id), + labelStyle: "", + style: "fill: none; stroke: black", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((y = r().flowchart) == null ? void 0 : y.padding) ?? ((d = r().class) == null ? void 0 : d.padding) + }; + t.setNode(l.id, i), I(l.classes, t, p, n, l.id), c.info("setNode", i); + }); +}, I = function(o, t, p, n, e) { + const s = Object.keys(o); + c.info("keys:", s), c.info(o), s.filter((l) => o[l].parent == e).forEach(function(l) { + var h, u; + const a = o[l], i = a.cssClasses.join(" "), y = { labelStyle: "", style: "" }, d = a.label ?? a.id, f = 0, m = "class_box", b = { + labelStyle: y.labelStyle, + shape: m, + labelText: S(d), + classData: a, + rx: f, + ry: f, + class: i, + style: y.style, + id: a.id, + domId: a.domId, + tooltip: n.db.getTooltip(a.id, e) || "", + haveCallback: a.haveCallback, + link: a.link, + width: a.type === "group" ? 500 : void 0, + type: a.type, + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((h = r().flowchart) == null ? void 0 : h.padding) ?? ((u = r().class) == null ? void 0 : u.padding) + }; + t.setNode(a.id, b), e && t.setParent(a.id, e), c.info("setNode", b); + }); +}, F = function(o, t, p, n) { + c.info(o), o.forEach(function(e, s) { + var u, x; + const l = e, a = "", i = { labelStyle: "", style: "" }, y = l.text, d = 0, f = "note", m = { + labelStyle: i.labelStyle, + shape: f, + labelText: S(y), + noteData: l, + rx: d, + ry: d, + class: a, + style: i.style, + id: l.id, + domId: l.id, + tooltip: "", + type: "note", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((u = r().flowchart) == null ? void 0 : u.padding) ?? ((x = r().class) == null ? void 0 : x.padding) + }; + if (t.setNode(l.id, m), c.info("setNode", m), !l.class || !(l.class in n)) + return; + const b = p + s, h = { + id: `edgeNote${b}`, + //Set relationship style and line type + classes: "relation", + pattern: "dotted", + // Set link type for rendering + arrowhead: "none", + //Set edge extra labels + startLabelRight: "", + endLabelLeft: "", + //Set relation arrow types + arrowTypeStart: "none", + arrowTypeEnd: "none", + style: "fill:none", + labelStyle: "", + curve: E(v.curve, C) + }; + t.setEdge(l.id, l.class, h, b); + }); +}, H = function(o, t) { + const p = r().flowchart; + let n = 0; + o.forEach(function(e) { + var l; + n++; + const s = { + //Set relationship style and line type + classes: "relation", + pattern: e.relation.lineType == 1 ? "dashed" : "solid", + id: "id" + n, + // Set link type for rendering + arrowhead: e.type === "arrow_open" ? "none" : "normal", + //Set edge extra labels + startLabelRight: e.relationTitle1 === "none" ? "" : e.relationTitle1, + endLabelLeft: e.relationTitle2 === "none" ? "" : e.relationTitle2, + //Set relation arrow types + arrowTypeStart: D(e.relation.type1), + arrowTypeEnd: D(e.relation.type2), + style: "fill:none", + labelStyle: "", + curve: E(p == null ? void 0 : p.curve, C) + }; + if (c.info(s, e), e.style !== void 0) { + const a = z(e.style); + s.style = a.style, s.labelStyle = a.labelStyle; + } + e.text = e.title, e.text === void 0 ? e.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((l = r().flowchart) == null ? void 0 : l.htmlLabels) ?? r().htmlLabels ? (s.labelType = "html", s.label = '' + e.text + "") : (s.labelType = "text", s.label = e.text.replace(A.lineBreakRegex, ` +`), e.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), t.setEdge(e.id1, e.id2, s, n); + }); +}, V = function(o) { + v = { + ...v, + ...o + }; +}, W = async function(o, t, p, n) { + c.info("Drawing class - ", t); + const e = r().flowchart ?? r().class, s = r().securityLevel; + c.info("config:", e); + const l = (e == null ? void 0 : e.nodeSpacing) ?? 50, a = (e == null ? void 0 : e.rankSpacing) ?? 50, i = new q({ + multigraph: !0, + compound: !0 + }).setGraph({ + rankdir: n.db.getDirection(), + nodesep: l, + ranksep: a, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }), y = n.db.getNamespaces(), d = n.db.getClasses(), f = n.db.getRelations(), m = n.db.getNotes(); + c.info(f), $(y, i, t, n), I(d, i, t, n), H(f, i), F(m, i, f.length + 1, d); + let b; + s === "sandbox" && (b = k("#i" + t)); + const h = s === "sandbox" ? k(b.nodes()[0].contentDocument.body) : k("body"), u = h.select(`[id="${t}"]`), x = h.select("#" + t + " g"); + if (await P( + x, + i, + ["aggregation", "extension", "composition", "dependency", "lollipop"], + "classDiagram", + t + ), G.insertTitle(u, "classTitleText", (e == null ? void 0 : e.titleTopMargin) ?? 5, n.db.getDiagramTitle()), _(i, u, e == null ? void 0 : e.diagramPadding, e == null ? void 0 : e.useMaxWidth), !(e != null && e.htmlLabels)) { + const T = s === "sandbox" ? b.nodes()[0].contentDocument : document, M = T.querySelectorAll('[id="' + t + '"] .edgeLabel .label'); + for (const w of M) { + const L = w.getBBox(), g = T.createElementNS("http://www.w3.org/2000/svg", "rect"); + g.setAttribute("rx", 0), g.setAttribute("ry", 0), g.setAttribute("width", L.width), g.setAttribute("height", L.height), w.insertBefore(g, w.firstChild); + } + } +}; +function D(o) { + let t; + switch (o) { + case 0: + t = "aggregation"; + break; + case 1: + t = "extension"; + break; + case 2: + t = "composition"; + break; + case 3: + t = "dependency"; + break; + case 4: + t = "lollipop"; + break; + default: + t = "none"; + } + return t; +} +const J = { + setConf: V, + draw: W +}, te = { + parser: R, + db: N, + renderer: J, + styles: B, + init: (o) => { + o.class || (o.class = {}), o.class.arrowMarkerAbsolute = o.arrowMarkerAbsolute, N.clear(); + } +}; +export { + te as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/classDiagram-v2-d4efdcc3.js b/webroot/js/node_modules/mermaid/dist/classDiagram-v2-d4efdcc3.js new file mode 100644 index 0000000..c18df10 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/classDiagram-v2-d4efdcc3.js @@ -0,0 +1,298 @@ +import { p as parser, d as db, s as styles } from "./styles-8b67d7cb.js"; +import { select, curveLinear } from "d3"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { l as log, c as getConfig, u as utils, o as setupGraphViewbox, n as interpolateToCurve, k as getStylesFromArray, e as common } from "./mermaid-0d192ec3.js"; +import { r as render } from "./index-f9462f3f.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +import "dagre-d3-es/src/dagre/index.js"; +import "dagre-d3-es/src/graphlib/json.js"; +import "./edges-f15a7e05.js"; +import "./createText-80c3befb.js"; +import "mdast-util-from-markdown"; +const sanitizeText = (txt) => common.sanitizeText(txt, getConfig()); +let conf = { + dividerMargin: 10, + padding: 5, + textHeight: 10, + curve: void 0 +}; +const addNamespaces = function(namespaces, g, _id, diagObj) { + const keys = Object.keys(namespaces); + log.info("keys:", keys); + log.info(namespaces); + keys.forEach(function(id) { + var _a, _b; + const vertex = namespaces[id]; + const shape = "rect"; + const node = { + shape, + id: vertex.id, + domId: vertex.domId, + labelText: sanitizeText(vertex.id), + labelStyle: "", + style: "fill: none; stroke: black", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + addClasses(vertex.classes, g, _id, diagObj, vertex.id); + log.info("setNode", node); + }); +}; +const addClasses = function(classes, g, _id, diagObj, parent) { + const keys = Object.keys(classes); + log.info("keys:", keys); + log.info(classes); + keys.filter((id) => classes[id].parent == parent).forEach(function(id) { + var _a, _b; + const vertex = classes[id]; + const cssClassStr = vertex.cssClasses.join(" "); + const styles2 = { labelStyle: "", style: "" }; + const vertexText = vertex.label ?? vertex.id; + const radius = 0; + const shape = "class_box"; + const node = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText(vertexText), + classData: vertex, + rx: radius, + ry: radius, + class: cssClassStr, + style: styles2.style, + id: vertex.id, + domId: vertex.domId, + tooltip: diagObj.db.getTooltip(vertex.id, parent) || "", + haveCallback: vertex.haveCallback, + link: vertex.link, + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + if (parent) { + g.setParent(vertex.id, parent); + } + log.info("setNode", node); + }); +}; +const addNotes = function(notes, g, startEdgeId, classes) { + log.info(notes); + notes.forEach(function(note, i) { + var _a, _b; + const vertex = note; + const cssNoteStr = ""; + const styles2 = { labelStyle: "", style: "" }; + const vertexText = vertex.text; + const radius = 0; + const shape = "note"; + const node = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText(vertexText), + noteData: vertex, + rx: radius, + ry: radius, + class: cssNoteStr, + style: styles2.style, + id: vertex.id, + domId: vertex.id, + tooltip: "", + type: "note", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + log.info("setNode", node); + if (!vertex.class || !(vertex.class in classes)) { + return; + } + const edgeId = startEdgeId + i; + const edgeData = { + id: `edgeNote${edgeId}`, + //Set relationship style and line type + classes: "relation", + pattern: "dotted", + // Set link type for rendering + arrowhead: "none", + //Set edge extra labels + startLabelRight: "", + endLabelLeft: "", + //Set relation arrow types + arrowTypeStart: "none", + arrowTypeEnd: "none", + style: "fill:none", + labelStyle: "", + curve: interpolateToCurve(conf.curve, curveLinear) + }; + g.setEdge(vertex.id, vertex.class, edgeData, edgeId); + }); +}; +const addRelations = function(relations, g) { + const conf2 = getConfig().flowchart; + let cnt = 0; + relations.forEach(function(edge) { + var _a; + cnt++; + const edgeData = { + //Set relationship style and line type + classes: "relation", + pattern: edge.relation.lineType == 1 ? "dashed" : "solid", + id: "id" + cnt, + // Set link type for rendering + arrowhead: edge.type === "arrow_open" ? "none" : "normal", + //Set edge extra labels + startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1, + endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2, + //Set relation arrow types + arrowTypeStart: getArrowMarker(edge.relation.type1), + arrowTypeEnd: getArrowMarker(edge.relation.type2), + style: "fill:none", + labelStyle: "", + curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear) + }; + log.info(edgeData, edge); + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + edgeData.style = styles2.style; + edgeData.labelStyle = styles2.labelStyle; + } + edge.text = edge.title; + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if (((_a = getConfig().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig().htmlLabels) { + edgeData.labelType = "html"; + edgeData.label = '' + edge.text + ""; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + g.setEdge(edge.id1, edge.id2, edgeData, cnt); + }); +}; +const setConf = function(cnf) { + conf = { + ...conf, + ...cnf + }; +}; +const draw = async function(text, id, _version, diagObj) { + log.info("Drawing class - ", id); + const conf2 = getConfig().flowchart ?? getConfig().class; + const securityLevel = getConfig().securityLevel; + log.info("config:", conf2); + const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50; + const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50; + const g = new graphlib.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: diagObj.db.getDirection(), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const namespaces = diagObj.db.getNamespaces(); + const classes = diagObj.db.getClasses(); + const relations = diagObj.db.getRelations(); + const notes = diagObj.db.getNotes(); + log.info(relations); + addNamespaces(namespaces, g, id, diagObj); + addClasses(classes, g, id, diagObj); + addRelations(relations, g); + addNotes(notes, g, relations.length + 1, classes); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await render( + element, + g, + ["aggregation", "extension", "composition", "dependency", "lollipop"], + "classDiagram", + id + ); + utils.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle()); + setupGraphViewbox(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth); + if (!(conf2 == null ? void 0 : conf2.htmlLabels)) { + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } +}; +function getArrowMarker(type) { + let marker; + switch (type) { + case 0: + marker = "aggregation"; + break; + case 1: + marker = "extension"; + break; + case 2: + marker = "composition"; + break; + case 3: + marker = "dependency"; + break; + case 4: + marker = "lollipop"; + break; + default: + marker = "none"; + } + return marker; +} +const renderer = { + setConf, + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/config.d.ts b/webroot/js/node_modules/mermaid/dist/config.d.ts new file mode 100644 index 0000000..6733319 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/config.d.ts @@ -0,0 +1,98 @@ +import type { MermaidConfig } from './config.type.js'; +export declare const defaultConfig: MermaidConfig; +export declare const updateCurrentConfig: (siteCfg: MermaidConfig, _directives: MermaidConfig[]) => MermaidConfig; +/** + * ## setSiteConfig + * + * | Function | Description | Type | Values | + * | ------------- | ------------------------------------- | ----------- | --------------------------------------- | + * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array | + * + * **Notes:** Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls + * to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) + * will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this + * function _Default value: At default, will mirror Global Config_ + * + * @param conf - The base currentConfig to use as siteConfig + * @returns The new siteConfig + */ +export declare const setSiteConfig: (conf: MermaidConfig) => MermaidConfig; +export declare const saveConfigFromInitialize: (conf: MermaidConfig) => void; +export declare const updateSiteConfig: (conf: MermaidConfig) => MermaidConfig; +/** + * ## getSiteConfig + * + * | Function | Description | Type | Values | + * | ------------- | ------------------------------------------------- | ----------- | -------------------------------- | + * | setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig | + * + * **Notes**: Returns **any** values in siteConfig. + * + * @returns The siteConfig + */ +export declare const getSiteConfig: () => MermaidConfig; +/** + * ## setConfig + * + * | Function | Description | Type | Values | + * | ------------- | ------------------------------------- | ----------- | --------------------------------------- | + * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array | + * + * **Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure + * keys. Any values found in conf with key found in siteConfig.secure will be replaced with the + * corresponding siteConfig value. + * + * @param conf - The potential currentConfig + * @returns The currentConfig merged with the sanitized conf + */ +export declare const setConfig: (conf: MermaidConfig) => MermaidConfig; +/** + * ## getConfig + * + * | Function | Description | Type | Return Values | + * | --------- | ------------------------- | ----------- | ------------------------------ | + * | getConfig | Obtains the currentConfig | Get Request | Any Values from current Config | + * + * **Notes**: Returns **any** the currentConfig + * + * @returns The currentConfig + */ +export declare const getConfig: () => MermaidConfig; +/** + * ## sanitize + * + * | Function | Description | Type | Values | + * | -------- | -------------------------------------- | ----------- | ------ | + * | sanitize | Sets the siteConfig to desired values. | Put Request | None | + * + * Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies + * options in-place + * + * @param options - The potential setConfig parameter + */ +export declare const sanitize: (options: any) => void; +/** + * Pushes in a directive to the configuration + * + * @param directive - The directive to push in + */ +export declare const addDirective: (directive: MermaidConfig) => void; +/** + * ## reset + * + * | Function | Description | Type | Required | Values | + * | -------- | ---------------------------- | ----------- | -------- | ------ | + * | reset | Resets currentConfig to conf | Put Request | Required | None | + * + * ## conf + * + * | Parameter | Description | Type | Required | Values | + * | --------- | -------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- | + * | conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array | + * + * **Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`) + * + * @param config - base set of values, which currentConfig could be **reset** to. + * Defaults to the current siteConfig (e.g returned by {@link getSiteConfig}). + */ +export declare const reset: (config?: MermaidConfig) => void; diff --git a/webroot/js/node_modules/mermaid/dist/config.spec.d.ts b/webroot/js/node_modules/mermaid/dist/config.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/config.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/config.type.d.ts b/webroot/js/node_modules/mermaid/dist/config.type.d.ts new file mode 100644 index 0000000..acddfa4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/config.type.d.ts @@ -0,0 +1,1313 @@ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ +/** + * Configuration options to pass to the `dompurify` library. + */ +export type DOMPurifyConfiguration = import('dompurify').Config; +/** + * JavaScript function that returns a `FontConfig`. + * + * By default, these return the appropriate `*FontSize`, `*FontFamily`, `*FontWeight` + * values. + * + * For example, the font calculator called `boundaryFont` might be defined as: + * + * ```javascript + * boundaryFont: function () { + * return { + * fontFamily: this.boundaryFontFamily, + * fontSize: this.boundaryFontSize, + * fontWeight: this.boundaryFontWeight, + * }; + * } + * ``` + * + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "FontCalculator". + */ +export type FontCalculator = () => Partial; +/** + * Picks the color of the sankey diagram links, using the colors of the source and/or target of the links. + * + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "SankeyLinkColor". + */ +export type SankeyLinkColor = 'source' | 'target' | 'gradient'; +/** + * Controls the alignment of the Sankey diagrams. + * + * See . + * + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "SankeyNodeAlignment". + */ +export type SankeyNodeAlignment = 'left' | 'right' | 'center' | 'justify'; +/** + * The font size to use + */ +export type CSSFontSize = string | number; +export interface MermaidConfig { + /** + * Theme, the CSS style sheet. + * You may also use `themeCSS` to override this value. + * + */ + theme?: string | 'default' | 'forest' | 'dark' | 'neutral' | 'null'; + themeVariables?: any; + themeCSS?: string; + /** + * The maximum allowed size of the users text diagram + */ + maxTextSize?: number; + darkMode?: boolean; + htmlLabels?: boolean; + /** + * Specifies the font to be used in the rendered diagrams. + * Can be any possible CSS `font-family`. + * See https://developer.mozilla.org/en-US/docs/Web/CSS/font-family + * + */ + fontFamily?: string; + altFontFamily?: string; + /** + * This option decides the amount of logging to be used by mermaid. + * + */ + logLevel?: number | string | 0 | 2 | 1 | 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | 3 | 4 | 5 | undefined; + /** + * Level of trust for parsed diagram + */ + securityLevel?: string | 'strict' | 'loose' | 'antiscript' | 'sandbox' | undefined; + /** + * Dictates whether mermaid starts on Page load + */ + startOnLoad?: boolean; + /** + * Controls whether or arrow markers in html code are absolute paths or anchors. + * This matters if you are using base tag settings. + * + */ + arrowMarkerAbsolute?: boolean; + /** + * This option controls which `currentConfig` keys are considered secure and + * can only be changed via call to `mermaidAPI.initialize`. + * Calls to `mermaidAPI.reinitialize` cannot make changes to the secure keys + * in the current `currentConfig`. + * + * This prevents malicious graph directives from overriding a site's default security. + * + */ + secure?: string[]; + /** + * This option controls if the generated ids of nodes in the SVG are + * generated randomly or based on a seed. + * If set to `false`, the IDs are generated based on the current date and + * thus are not deterministic. This is the default behavior. + * + * This matters if your files are checked into source control e.g. git and + * should not change unless content is changed. + * + */ + deterministicIds?: boolean; + /** + * This option is the optional seed for deterministic ids. + * If set to `undefined` but deterministicIds is `true`, a simple number iterator is used. + * You can set this attribute to base the seed on a static string. + * + */ + deterministicIDSeed?: string; + flowchart?: FlowchartDiagramConfig; + sequence?: SequenceDiagramConfig; + gantt?: GanttDiagramConfig; + journey?: JourneyDiagramConfig; + timeline?: TimelineDiagramConfig; + class?: ClassDiagramConfig; + state?: StateDiagramConfig; + er?: ErDiagramConfig; + pie?: PieDiagramConfig; + quadrantChart?: QuadrantChartConfig; + requirement?: RequirementDiagramConfig; + mindmap?: MindmapDiagramConfig; + gitGraph?: GitGraphDiagramConfig; + c4?: C4DiagramConfig; + sankey?: SankeyDiagramConfig; + dompurifyConfig?: DOMPurifyConfiguration; + wrap?: boolean; + fontSize?: number; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "BaseDiagramConfig". + */ +export interface BaseDiagramConfig { + useWidth?: number; + /** + * When this flag is set to `true`, the height and width is set to 100% + * and is then scaled with the available space. + * If set to `false`, the absolute space required is used. + * + */ + useMaxWidth?: boolean; +} +/** + * The object containing configurations specific for c4 diagrams + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "C4DiagramConfig". + */ +export interface C4DiagramConfig extends BaseDiagramConfig { + /** + * Margin to the right and left of the c4 diagram, must be a positive value. + * + */ + diagramMarginX?: number; + /** + * Margin to the over and under the c4 diagram, must be a positive value. + * + */ + diagramMarginY?: number; + /** + * Margin between shapes + */ + c4ShapeMargin?: number; + /** + * Padding between shapes + */ + c4ShapePadding?: number; + /** + * Width of person boxes + */ + width?: number; + /** + * Height of person boxes + */ + height?: number; + /** + * Margin around boxes + */ + boxMargin?: number; + /** + * How many shapes to place in each row. + */ + c4ShapeInRow?: number; + nextLinePaddingX?: number; + /** + * How many boundaries to place in each row. + */ + c4BoundaryInRow?: number; + /** + * This sets the font size of Person shape for the diagram + */ + personFontSize?: string | number; + /** + * This sets the font weight of Person shape for the diagram + */ + personFontFamily?: string; + /** + * This sets the font weight of Person shape for the diagram + */ + personFontWeight?: string | number; + /** + * This sets the font size of External Person shape for the diagram + */ + external_personFontSize?: string | number; + /** + * This sets the font family of External Person shape for the diagram + */ + external_personFontFamily?: string; + /** + * This sets the font weight of External Person shape for the diagram + */ + external_personFontWeight?: string | number; + /** + * This sets the font size of System shape for the diagram + */ + systemFontSize?: string | number; + /** + * This sets the font family of System shape for the diagram + */ + systemFontFamily?: string; + /** + * This sets the font weight of System shape for the diagram + */ + systemFontWeight?: string | number; + /** + * This sets the font size of External System shape for the diagram + */ + external_systemFontSize?: string | number; + /** + * This sets the font family of External System shape for the diagram + */ + external_systemFontFamily?: string; + /** + * This sets the font weight of External System shape for the diagram + */ + external_systemFontWeight?: string | number; + /** + * This sets the font size of System DB shape for the diagram + */ + system_dbFontSize?: string | number; + /** + * This sets the font family of System DB shape for the diagram + */ + system_dbFontFamily?: string; + /** + * This sets the font weight of System DB shape for the diagram + */ + system_dbFontWeight?: string | number; + /** + * This sets the font size of External System DB shape for the diagram + */ + external_system_dbFontSize?: string | number; + /** + * This sets the font family of External System DB shape for the diagram + */ + external_system_dbFontFamily?: string; + /** + * This sets the font weight of External System DB shape for the diagram + */ + external_system_dbFontWeight?: string | number; + /** + * This sets the font size of System Queue shape for the diagram + */ + system_queueFontSize?: string | number; + /** + * This sets the font family of System Queue shape for the diagram + */ + system_queueFontFamily?: string; + /** + * This sets the font weight of System Queue shape for the diagram + */ + system_queueFontWeight?: string | number; + /** + * This sets the font size of External System Queue shape for the diagram + */ + external_system_queueFontSize?: string | number; + /** + * This sets the font family of External System Queue shape for the diagram + */ + external_system_queueFontFamily?: string; + /** + * This sets the font weight of External System Queue shape for the diagram + */ + external_system_queueFontWeight?: string | number; + /** + * This sets the font size of Boundary shape for the diagram + */ + boundaryFontSize?: string | number; + /** + * This sets the font family of Boundary shape for the diagram + */ + boundaryFontFamily?: string; + /** + * This sets the font weight of Boundary shape for the diagram + */ + boundaryFontWeight?: string | number; + /** + * This sets the font size of Message shape for the diagram + */ + messageFontSize?: string | number; + /** + * This sets the font family of Message shape for the diagram + */ + messageFontFamily?: string; + /** + * This sets the font weight of Message shape for the diagram + */ + messageFontWeight?: string | number; + /** + * This sets the font size of Container shape for the diagram + */ + containerFontSize?: string | number; + /** + * This sets the font family of Container shape for the diagram + */ + containerFontFamily?: string; + /** + * This sets the font weight of Container shape for the diagram + */ + containerFontWeight?: string | number; + /** + * This sets the font size of External Container shape for the diagram + */ + external_containerFontSize?: string | number; + /** + * This sets the font family of External Container shape for the diagram + */ + external_containerFontFamily?: string; + /** + * This sets the font weight of External Container shape for the diagram + */ + external_containerFontWeight?: string | number; + /** + * This sets the font size of Container DB shape for the diagram + */ + container_dbFontSize?: string | number; + /** + * This sets the font family of Container DB shape for the diagram + */ + container_dbFontFamily?: string; + /** + * This sets the font weight of Container DB shape for the diagram + */ + container_dbFontWeight?: string | number; + /** + * This sets the font size of External Container DB shape for the diagram + */ + external_container_dbFontSize?: string | number; + /** + * This sets the font family of External Container DB shape for the diagram + */ + external_container_dbFontFamily?: string; + /** + * This sets the font weight of External Container DB shape for the diagram + */ + external_container_dbFontWeight?: string | number; + /** + * This sets the font size of Container Queue shape for the diagram + */ + container_queueFontSize?: string | number; + /** + * This sets the font family of Container Queue shape for the diagram + */ + container_queueFontFamily?: string; + /** + * This sets the font weight of Container Queue shape for the diagram + */ + container_queueFontWeight?: string | number; + /** + * This sets the font size of External Container Queue shape for the diagram + */ + external_container_queueFontSize?: string | number; + /** + * This sets the font family of External Container Queue shape for the diagram + */ + external_container_queueFontFamily?: string; + /** + * This sets the font weight of External Container Queue shape for the diagram + */ + external_container_queueFontWeight?: string | number; + /** + * This sets the font size of Component shape for the diagram + */ + componentFontSize?: string | number; + /** + * This sets the font family of Component shape for the diagram + */ + componentFontFamily?: string; + /** + * This sets the font weight of Component shape for the diagram + */ + componentFontWeight?: string | number; + /** + * This sets the font size of External Component shape for the diagram + */ + external_componentFontSize?: string | number; + /** + * This sets the font family of External Component shape for the diagram + */ + external_componentFontFamily?: string; + /** + * This sets the font weight of External Component shape for the diagram + */ + external_componentFontWeight?: string | number; + /** + * This sets the font size of Component DB shape for the diagram + */ + component_dbFontSize?: string | number; + /** + * This sets the font family of Component DB shape for the diagram + */ + component_dbFontFamily?: string; + /** + * This sets the font weight of Component DB shape for the diagram + */ + component_dbFontWeight?: string | number; + /** + * This sets the font size of External Component DB shape for the diagram + */ + external_component_dbFontSize?: string | number; + /** + * This sets the font family of External Component DB shape for the diagram + */ + external_component_dbFontFamily?: string; + /** + * This sets the font weight of External Component DB shape for the diagram + */ + external_component_dbFontWeight?: string | number; + /** + * This sets the font size of Component Queue shape for the diagram + */ + component_queueFontSize?: string | number; + /** + * This sets the font family of Component Queue shape for the diagram + */ + component_queueFontFamily?: string; + /** + * This sets the font weight of Component Queue shape for the diagram + */ + component_queueFontWeight?: string | number; + /** + * This sets the font size of External Component Queue shape for the diagram + */ + external_component_queueFontSize?: string | number; + /** + * This sets the font family of External Component Queue shape for the diagram + */ + external_component_queueFontFamily?: string; + /** + * This sets the font weight of External Component Queue shape for the diagram + */ + external_component_queueFontWeight?: string | number; + /** + * This sets the auto-wrap state for the diagram + */ + wrap?: boolean; + /** + * This sets the auto-wrap padding for the diagram (sides only) + */ + wrapPadding?: number; + person_bg_color?: string; + person_border_color?: string; + external_person_bg_color?: string; + external_person_border_color?: string; + system_bg_color?: string; + system_border_color?: string; + system_db_bg_color?: string; + system_db_border_color?: string; + system_queue_bg_color?: string; + system_queue_border_color?: string; + external_system_bg_color?: string; + external_system_border_color?: string; + external_system_db_bg_color?: string; + external_system_db_border_color?: string; + external_system_queue_bg_color?: string; + external_system_queue_border_color?: string; + container_bg_color?: string; + container_border_color?: string; + container_db_bg_color?: string; + container_db_border_color?: string; + container_queue_bg_color?: string; + container_queue_border_color?: string; + external_container_bg_color?: string; + external_container_border_color?: string; + external_container_db_bg_color?: string; + external_container_db_border_color?: string; + external_container_queue_bg_color?: string; + external_container_queue_border_color?: string; + component_bg_color?: string; + component_border_color?: string; + component_db_bg_color?: string; + component_db_border_color?: string; + component_queue_bg_color?: string; + component_queue_border_color?: string; + external_component_bg_color?: string; + external_component_border_color?: string; + external_component_db_bg_color?: string; + external_component_db_border_color?: string; + external_component_queue_bg_color?: string; + external_component_queue_border_color?: string; + personFont?: FontCalculator; + external_personFont?: FontCalculator; + systemFont?: FontCalculator; + external_systemFont?: FontCalculator; + system_dbFont?: FontCalculator; + external_system_dbFont?: FontCalculator; + system_queueFont?: FontCalculator; + external_system_queueFont?: FontCalculator; + containerFont?: FontCalculator; + external_containerFont?: FontCalculator; + container_dbFont?: FontCalculator; + external_container_dbFont?: FontCalculator; + container_queueFont?: FontCalculator; + external_container_queueFont?: FontCalculator; + componentFont?: FontCalculator; + external_componentFont?: FontCalculator; + component_dbFont?: FontCalculator; + external_component_dbFont?: FontCalculator; + component_queueFont?: FontCalculator; + external_component_queueFont?: FontCalculator; + boundaryFont?: FontCalculator; + messageFont?: FontCalculator; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "GitGraphDiagramConfig". + */ +export interface GitGraphDiagramConfig extends BaseDiagramConfig { + /** + * Margin top for the text over the diagram + */ + titleTopMargin?: number; + diagramPadding?: number; + nodeLabel?: NodeLabel; + mainBranchName?: string; + mainBranchOrder?: number; + showCommitLabel?: boolean; + showBranches?: boolean; + rotateCommitLabel?: boolean; + /** + * Controls whether or arrow markers in html code are absolute paths or anchors. + * This matters if you are using base tag settings. + * + */ + arrowMarkerAbsolute?: boolean; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "NodeLabel". + */ +export interface NodeLabel { + width?: number; + height?: number; + x?: number; + y?: number; +} +/** + * The object containing configurations specific for req diagrams + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "RequirementDiagramConfig". + */ +export interface RequirementDiagramConfig extends BaseDiagramConfig { + rect_fill?: string; + text_color?: string; + rect_border_size?: string; + rect_border_color?: string; + rect_min_width?: number; + rect_min_height?: number; + fontSize?: number; + rect_padding?: number; + line_height?: number; +} +/** + * The object containing configurations specific for mindmap diagrams + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "MindmapDiagramConfig". + */ +export interface MindmapDiagramConfig extends BaseDiagramConfig { + padding?: number; + maxNodeWidth?: number; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "PieDiagramConfig". + */ +export interface PieDiagramConfig extends BaseDiagramConfig { + /** + * Axial position of slice's label from zero at the center to 1 at the outside edges. + * + */ + textPosition?: number; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "QuadrantChartConfig". + */ +export interface QuadrantChartConfig extends BaseDiagramConfig { + /** + * Width of the chart + */ + chartWidth?: number; + /** + * Height of the chart + */ + chartHeight?: number; + /** + * Chart title top and bottom padding + */ + titleFontSize?: number; + /** + * Padding around the quadrant square + */ + titlePadding?: number; + /** + * quadrant title padding from top if the quadrant is rendered on top + */ + quadrantPadding?: number; + /** + * Padding around x-axis labels + */ + xAxisLabelPadding?: number; + /** + * Padding around y-axis labels + */ + yAxisLabelPadding?: number; + /** + * x-axis label font size + */ + xAxisLabelFontSize?: number; + /** + * y-axis label font size + */ + yAxisLabelFontSize?: number; + /** + * quadrant title font size + */ + quadrantLabelFontSize?: number; + /** + * quadrant title padding from top if the quadrant is rendered on top + */ + quadrantTextTopPadding?: number; + /** + * padding between point and point label + */ + pointTextPadding?: number; + /** + * point title font size + */ + pointLabelFontSize?: number; + /** + * radius of the point to be drawn + */ + pointRadius?: number; + /** + * position of x-axis labels + */ + xAxisPosition?: 'top' | 'bottom'; + /** + * position of y-axis labels + */ + yAxisPosition?: 'left' | 'right'; + /** + * stroke width of edges of the box that are inside the quadrant + */ + quadrantInternalBorderStrokeWidth?: number; + /** + * stroke width of edges of the box that are outside the quadrant + */ + quadrantExternalBorderStrokeWidth?: number; +} +/** + * The object containing configurations specific for entity relationship diagrams + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "ErDiagramConfig". + */ +export interface ErDiagramConfig extends BaseDiagramConfig { + /** + * Margin top for the text over the diagram + */ + titleTopMargin?: number; + /** + * The amount of padding around the diagram as a whole so that embedded + * diagrams have margins, expressed in pixels. + * + */ + diagramPadding?: number; + /** + * Directional bias for layout of entities + */ + layoutDirection?: string | 'TB' | 'BT' | 'LR' | 'RL'; + /** + * The minimum width of an entity box. Expressed in pixels. + */ + minEntityWidth?: number; + /** + * The minimum height of an entity box. Expressed in pixels. + */ + minEntityHeight?: number; + /** + * The minimum internal padding between text in an entity box and the enclosing box borders. + * Expressed in pixels. + * + */ + entityPadding?: number; + /** + * Stroke color of box edges and lines. + */ + stroke?: string; + /** + * Fill color of entity boxes + */ + fill?: string; + /** + * Font size (expressed as an integer representing a number of pixels) + */ + fontSize?: number; +} +/** + * The object containing configurations specific for entity relationship diagrams + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "StateDiagramConfig". + */ +export interface StateDiagramConfig extends BaseDiagramConfig { + /** + * Margin top for the text over the diagram + */ + titleTopMargin?: number; + arrowMarkerAbsolute?: boolean; + dividerMargin?: number; + sizeUnit?: number; + padding?: number; + textHeight?: number; + titleShift?: number; + noteMargin?: number; + forkWidth?: number; + forkHeight?: number; + miniPadding?: number; + /** + * Font size factor, this is used to guess the width of the edges labels + * before rendering by dagre layout. + * This might need updating if/when switching font + * + */ + fontSizeFactor?: number; + fontSize?: number; + labelHeight?: number; + edgeLengthFactor?: string; + compositTitleSize?: number; + radius?: number; + /** + * Decides which rendering engine that is to be used for the rendering. + * + */ + defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk'; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "ClassDiagramConfig". + */ +export interface ClassDiagramConfig extends BaseDiagramConfig { + /** + * Margin top for the text over the diagram + */ + titleTopMargin?: number; + /** + * Controls whether or arrow markers in html code are absolute paths or anchors. + * This matters if you are using base tag settings. + * + */ + arrowMarkerAbsolute?: boolean; + dividerMargin?: number; + padding?: number; + textHeight?: number; + /** + * Decides which rendering engine that is to be used for the rendering. + * + */ + defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk'; + nodeSpacing?: number; + rankSpacing?: number; + /** + * The amount of padding around the diagram as a whole so that embedded + * diagrams have margins, expressed in pixels. + * + */ + diagramPadding?: number; + htmlLabels?: boolean; +} +/** + * The object containing configurations specific for journey diagrams + * + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "JourneyDiagramConfig". + */ +export interface JourneyDiagramConfig extends BaseDiagramConfig { + /** + * Margin to the right and left of the c4 diagram, must be a positive value. + * + */ + diagramMarginX?: number; + /** + * Margin to the over and under the c4 diagram, must be a positive value. + * + */ + diagramMarginY?: number; + /** + * Margin between actors + */ + leftMargin?: number; + /** + * Width of actor boxes + */ + width?: number; + /** + * Height of actor boxes + */ + height?: number; + /** + * Margin around loop boxes + */ + boxMargin?: number; + /** + * Margin around the text in loop/alt/opt boxes + */ + boxTextMargin?: number; + /** + * Margin around notes + */ + noteMargin?: number; + /** + * Space between messages. + */ + messageMargin?: number; + /** + * Multiline message alignment + */ + messageAlign?: string | 'left' | 'center' | 'right'; + /** + * Prolongs the edge of the diagram downwards. + * + * Depending on css styling this might need adjustment. + * + */ + bottomMarginAdj?: number; + /** + * Curved Arrows become Right Angles + * + * This will display arrows that start and begin at the same node as + * right angles, rather than as curves. + * + */ + rightAngles?: boolean; + taskFontSize?: string | number; + taskFontFamily?: string; + taskMargin?: number; + /** + * Width of activation box + */ + activationWidth?: number; + /** + * text placement as: tspan | fo | old only text as before + * + */ + textPlacement?: string; + actorColours?: string[]; + sectionFills?: string[]; + sectionColours?: string[]; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "TimelineDiagramConfig". + */ +export interface TimelineDiagramConfig extends BaseDiagramConfig { + /** + * Margin to the right and left of the c4 diagram, must be a positive value. + * + */ + diagramMarginX?: number; + /** + * Margin to the over and under the c4 diagram, must be a positive value. + * + */ + diagramMarginY?: number; + /** + * Margin between actors + */ + leftMargin?: number; + /** + * Width of actor boxes + */ + width?: number; + /** + * Height of actor boxes + */ + height?: number; + padding?: number; + /** + * Margin around loop boxes + */ + boxMargin?: number; + /** + * Margin around the text in loop/alt/opt boxes + */ + boxTextMargin?: number; + /** + * Margin around notes + */ + noteMargin?: number; + /** + * Space between messages. + */ + messageMargin?: number; + /** + * Multiline message alignment + */ + messageAlign?: string | 'left' | 'center' | 'right'; + /** + * Prolongs the edge of the diagram downwards. + * + * Depending on css styling this might need adjustment. + * + */ + bottomMarginAdj?: number; + /** + * Curved Arrows become Right Angles + * + * This will display arrows that start and begin at the same node as + * right angles, rather than as curves. + * + */ + rightAngles?: boolean; + taskFontSize?: string | number; + taskFontFamily?: string; + taskMargin?: number; + /** + * Width of activation box + */ + activationWidth?: number; + /** + * text placement as: tspan | fo | old only text as before + * + */ + textPlacement?: string; + actorColours?: string[]; + sectionFills?: string[]; + sectionColours?: string[]; + disableMulticolor?: boolean; +} +/** + * The object containing configurations specific for gantt diagrams + * + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "GanttDiagramConfig". + */ +export interface GanttDiagramConfig extends BaseDiagramConfig { + /** + * Margin top for the text over the diagram + */ + titleTopMargin?: number; + /** + * The height of the bars in the graph + */ + barHeight?: number; + /** + * The margin between the different activities in the gantt diagram + */ + barGap?: number; + /** + * Margin between title and gantt diagram and between axis and gantt diagram. + * + */ + topPadding?: number; + /** + * The space allocated for the section name to the right of the activities + * + */ + rightPadding?: number; + /** + * The space allocated for the section name to the left of the activities + * + */ + leftPadding?: number; + /** + * Vertical starting position of the grid lines + */ + gridLineStartPadding?: number; + /** + * Font size + */ + fontSize?: number; + /** + * Font size for sections + */ + sectionFontSize?: string | number; + /** + * The number of alternating section styles + */ + numberSectionStyles?: number; + /** + * Date/time format of the axis + * + * This might need adjustment to match your locale and preferences. + * + */ + axisFormat?: string; + /** + * axis ticks + * + * Pattern is: + * + * ```javascript + * /^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/ + * ``` + * + */ + tickInterval?: string; + /** + * When this flag is set, date labels will be added to the top of the chart + * + */ + topAxis?: boolean; + /** + * Controls the display mode. + * + */ + displayMode?: string | 'compact'; + /** + * On which day a week-based interval should start + * + */ + weekday?: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday'; +} +/** + * The object containing configurations specific for sequence diagrams + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "SequenceDiagramConfig". + */ +export interface SequenceDiagramConfig extends BaseDiagramConfig { + arrowMarkerAbsolute?: boolean; + hideUnusedParticipants?: boolean; + /** + * Width of the activation rect + */ + activationWidth?: number; + /** + * Margin to the right and left of the sequence diagram + */ + diagramMarginX?: number; + /** + * Margin to the over and under the sequence diagram + */ + diagramMarginY?: number; + /** + * Margin between actors + */ + actorMargin?: number; + /** + * Width of actor boxes + */ + width?: number; + /** + * Height of actor boxes + */ + height?: number; + /** + * Margin around loop boxes + */ + boxMargin?: number; + /** + * Margin around the text in loop/alt/opt boxes + */ + boxTextMargin?: number; + /** + * Margin around notes + */ + noteMargin?: number; + /** + * Space between messages. + */ + messageMargin?: number; + /** + * Multiline message alignment + */ + messageAlign?: string | 'left' | 'center' | 'right'; + /** + * Mirror actors under diagram + * + */ + mirrorActors?: boolean; + /** + * forces actor popup menus to always be visible (to support E2E testing). + * + */ + forceMenus?: boolean; + /** + * Prolongs the edge of the diagram downwards. + * + * Depending on css styling this might need adjustment. + * + */ + bottomMarginAdj?: number; + /** + * Curved Arrows become Right Angles + * + * This will display arrows that start and begin at the same node as + * right angles, rather than as curves. + * + */ + rightAngles?: boolean; + /** + * This will show the node numbers + */ + showSequenceNumbers?: boolean; + /** + * This sets the font size of the actor's description + */ + actorFontSize?: string | number; + /** + * This sets the font family of the actor's description + */ + actorFontFamily?: string; + /** + * This sets the font weight of the actor's description + */ + actorFontWeight?: string | number; + /** + * This sets the font size of actor-attached notes + */ + noteFontSize?: string | number; + /** + * This sets the font family of actor-attached notes + */ + noteFontFamily?: string; + /** + * This sets the font weight of actor-attached notes + */ + noteFontWeight?: string | number; + /** + * This sets the text alignment of actor-attached notes + */ + noteAlign?: string | 'left' | 'center' | 'right'; + /** + * This sets the font size of actor messages + */ + messageFontSize?: string | number; + /** + * This sets the font family of actor messages + */ + messageFontFamily?: string; + /** + * This sets the font weight of actor messages + */ + messageFontWeight?: string | number; + /** + * This sets the auto-wrap state for the diagram + */ + wrap?: boolean; + /** + * This sets the auto-wrap padding for the diagram (sides only) + */ + wrapPadding?: number; + /** + * This sets the width of the loop-box (loop, alt, opt, par) + */ + labelBoxWidth?: number; + /** + * This sets the height of the loop-box (loop, alt, opt, par) + */ + labelBoxHeight?: number; + messageFont?: FontCalculator; + noteFont?: FontCalculator; + actorFont?: FontCalculator; +} +/** + * The object containing configurations specific for flowcharts + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "FlowchartDiagramConfig". + */ +export interface FlowchartDiagramConfig extends BaseDiagramConfig { + /** + * Margin top for the text over the diagram + */ + titleTopMargin?: number; + arrowMarkerAbsolute?: boolean; + /** + * The amount of padding around the diagram as a whole so that embedded + * diagrams have margins, expressed in pixels. + * + */ + diagramPadding?: number; + /** + * Flag for setting whether or not a html tag should be used for rendering labels on the edges. + * + */ + htmlLabels?: boolean; + /** + * Defines the spacing between nodes on the same level + * + * Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, + * and the vertical spacing for LR as well as RL graphs. + * + */ + nodeSpacing?: number; + /** + * Defines the spacing between nodes on different levels + * + * Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, + * and the vertical spacing for LR as well as RL graphs. + * + */ + rankSpacing?: number; + /** + * Defines how mermaid renders curves for flowcharts. + * + */ + curve?: string | 'basis' | 'linear' | 'cardinal'; + /** + * Represents the padding between the labels and the shape + * + * **Only used in new experimental rendering.** + * + */ + padding?: number; + /** + * Decides which rendering engine that is to be used for the rendering. + * + */ + defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk'; + /** + * Width of nodes where text is wrapped. + * + * When using markdown strings the text ius wrapped automatically, this + * value sets the max width of a text before it continues on a new line. + * + */ + wrappingWidth?: number; +} +/** + * The object containing configurations specific for sankey diagrams. + * + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "SankeyDiagramConfig". + */ +export interface SankeyDiagramConfig extends BaseDiagramConfig { + width?: number; + height?: number; + /** + * The color of the links in the sankey diagram. + * + */ + linkColor?: SankeyLinkColor | string; + /** + * Controls the alignment of the Sankey diagrams. + * + * See . + * + */ + nodeAlignment?: 'left' | 'right' | 'center' | 'justify'; + useMaxWidth?: boolean; + /** + * Toggle to display or hide values along with title. + * + */ + showValues?: boolean; + /** + * The prefix to use for values + * + */ + prefix?: string; + /** + * The suffix to use for values + * + */ + suffix?: string; +} +/** + * This interface was referenced by `MermaidConfig`'s JSON-Schema + * via the `definition` "FontConfig". + */ +export interface FontConfig { + fontSize?: CSSFontSize; + /** + * The CSS [`font-family`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) to use. + */ + fontFamily?: string; + /** + * The font weight to use. + */ + fontWeight?: string | number; +} diff --git a/webroot/js/node_modules/mermaid/dist/constant-2fe7eae5.js b/webroot/js/node_modules/mermaid/dist/constant-2fe7eae5.js new file mode 100644 index 0000000..67d0b9b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/constant-2fe7eae5.js @@ -0,0 +1,63 @@ +const p = Math.PI, v = 2 * p, c = 1e-6, q = v - c; +function y() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null, this._ = ""; +} +function C() { + return new y(); +} +y.prototype = C.prototype = { + constructor: y, + moveTo: function(i, s) { + this._ += "M" + (this._x0 = this._x1 = +i) + "," + (this._y0 = this._y1 = +s); + }, + closePath: function() { + this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z"); + }, + lineTo: function(i, s) { + this._ += "L" + (this._x1 = +i) + "," + (this._y1 = +s); + }, + quadraticCurveTo: function(i, s, t, h) { + this._ += "Q" + +i + "," + +s + "," + (this._x1 = +t) + "," + (this._y1 = +h); + }, + bezierCurveTo: function(i, s, t, h, _, e) { + this._ += "C" + +i + "," + +s + "," + +t + "," + +h + "," + (this._x1 = +_) + "," + (this._y1 = +e); + }, + arcTo: function(i, s, t, h, _) { + i = +i, s = +s, t = +t, h = +h, _ = +_; + var e = this._x1, r = this._y1, f = t - i, a = h - s, n = e - i, u = r - s, o = n * n + u * u; + if (_ < 0) + throw new Error("negative radius: " + _); + if (this._x1 === null) + this._ += "M" + (this._x1 = i) + "," + (this._y1 = s); + else if (o > c) + if (!(Math.abs(u * f - a * n) > c) || !_) + this._ += "L" + (this._x1 = i) + "," + (this._y1 = s); + else { + var M = t - e, l = h - r, d = f * f + a * a, g = M * M + l * l, b = Math.sqrt(d), T = Math.sqrt(o), A = _ * Math.tan((p - Math.acos((d + o - g) / (2 * b * T))) / 2), x = A / T, L = A / b; + Math.abs(x - 1) > c && (this._ += "L" + (i + x * n) + "," + (s + x * u)), this._ += "A" + _ + "," + _ + ",0,0," + +(u * M > n * l) + "," + (this._x1 = i + L * f) + "," + (this._y1 = s + L * a); + } + }, + arc: function(i, s, t, h, _, e) { + i = +i, s = +s, t = +t, e = !!e; + var r = t * Math.cos(h), f = t * Math.sin(h), a = i + r, n = s + f, u = 1 ^ e, o = e ? h - _ : _ - h; + if (t < 0) + throw new Error("negative radius: " + t); + this._x1 === null ? this._ += "M" + a + "," + n : (Math.abs(this._x1 - a) > c || Math.abs(this._y1 - n) > c) && (this._ += "L" + a + "," + n), t && (o < 0 && (o = o % v + v), o > q ? this._ += "A" + t + "," + t + ",0,1," + u + "," + (i - r) + "," + (s - f) + "A" + t + "," + t + ",0,1," + u + "," + (this._x1 = a) + "," + (this._y1 = n) : o > c && (this._ += "A" + t + "," + t + ",0," + +(o >= p) + "," + u + "," + (this._x1 = i + t * Math.cos(_)) + "," + (this._y1 = s + t * Math.sin(_)))); + }, + rect: function(i, s, t, h) { + this._ += "M" + (this._x0 = this._x1 = +i) + "," + (this._y0 = this._y1 = +s) + "h" + +t + "v" + +h + "h" + -t + "Z"; + }, + toString: function() { + return this._; + } +}; +function E(i) { + return function() { + return i; + }; +} +export { + E as c, + C as p +}; diff --git a/webroot/js/node_modules/mermaid/dist/constant-b644328d.js b/webroot/js/node_modules/mermaid/dist/constant-b644328d.js new file mode 100644 index 0000000..fe25e68 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/constant-b644328d.js @@ -0,0 +1,84 @@ +const pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon; +function Path() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; + this._ = ""; +} +function path() { + return new Path(); +} +Path.prototype = path.prototype = { + constructor: Path, + moveTo: function(x, y) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x, y) { + this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); + }, + quadraticCurveTo: function(x1, y1, x, y) { + this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { + this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } else if (!(l01_2 > epsilon)) + ; + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } else { + var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21; + if (Math.abs(t01 - 1) > epsilon) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); + } + this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x, y, r, a0, a1, ccw) { + x = +x, y = +y, r = +r, ccw = !!ccw; + var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x + dx, y0 = y + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._ += "L" + x0 + "," + y0; + } + if (!r) + return; + if (da < 0) + da = da % tau + tau; + if (da > tauEpsilon) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } else if (da > epsilon) { + this._ += "A" + r + "," + r + ",0," + +(da >= pi) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); + } + }, + rect: function(x, y, w, h) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + +w + "v" + +h + "h" + -w + "Z"; + }, + toString: function() { + return this._; + } +}; +function constant(x) { + return function constant2() { + return x; + }; +} +export { + constant as c, + path as p +}; diff --git a/webroot/js/node_modules/mermaid/dist/createText-2660bae1.js b/webroot/js/node_modules/mermaid/dist/createText-2660bae1.js new file mode 100644 index 0000000..73aa9b3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/createText-2660bae1.js @@ -0,0 +1,4798 @@ +import { b6 as dedent, l as log, aR as decodeEntities } from "./mermaid-491db2d9.js"; +function toString(node, options) { + var { includeImageAlt = true } = options || {}; + return one(node, includeImageAlt); +} +function one(node, includeImageAlt) { + return node && typeof node === "object" && // @ts-ignore looks like a literal. + (node.value || // @ts-ignore looks like an image. + (includeImageAlt ? node.alt : "") || // @ts-ignore looks like a parent. + "children" in node && all(node.children, includeImageAlt) || Array.isArray(node) && all(node, includeImageAlt)) || ""; +} +function all(values, includeImageAlt) { + var result = []; + var index2 = -1; + while (++index2 < values.length) { + result[index2] = one(values[index2], includeImageAlt); + } + return result.join(""); +} +function splice(list2, start, remove, items) { + const end = list2.length; + let chunkStart = 0; + let parameters; + if (start < 0) { + start = -start > end ? 0 : end + start; + } else { + start = start > end ? end : start; + } + remove = remove > 0 ? remove : 0; + if (items.length < 1e4) { + parameters = Array.from(items); + parameters.unshift(start, remove); + [].splice.apply(list2, parameters); + } else { + if (remove) + [].splice.apply(list2, [start, remove]); + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 1e4); + parameters.unshift(start, 0); + [].splice.apply(list2, parameters); + chunkStart += 1e4; + start += 1e4; + } + } +} +function push(list2, items) { + if (list2.length > 0) { + splice(list2, list2.length, 0, items); + return list2; + } + return items; +} +const hasOwnProperty = {}.hasOwnProperty; +function combineExtensions(extensions) { + const all2 = {}; + let index2 = -1; + while (++index2 < extensions.length) { + syntaxExtension(all2, extensions[index2]); + } + return all2; +} +function syntaxExtension(all2, extension2) { + let hook; + for (hook in extension2) { + const maybe = hasOwnProperty.call(all2, hook) ? all2[hook] : void 0; + const left = maybe || (all2[hook] = {}); + const right = extension2[hook]; + let code; + for (code in right) { + if (!hasOwnProperty.call(left, code)) + left[code] = []; + const value = right[code]; + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ); + } + } +} +function constructs(existing, list2) { + let index2 = -1; + const before = []; + while (++index2 < list2.length) { + (list2[index2].add === "after" ? existing : before).push(list2[index2]); + } + splice(existing, 0, 0, before); +} +const unicodePunctuationRegex = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/; +const asciiAlpha = regexCheck(/[A-Za-z]/); +const asciiDigit = regexCheck(/\d/); +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/); +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/); +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/); +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/); +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ); +} +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32); +} +function markdownLineEnding(code) { + return code !== null && code < -2; +} +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32; +} +const unicodeWhitespace = regexCheck(/\s/); +const unicodePunctuation = regexCheck(unicodePunctuationRegex); +function regexCheck(regex) { + return check; + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)); + } +} +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY; + let size = 0; + return start; + function start(code) { + if (markdownSpace(code)) { + effects.enter(type); + return prefix(code); + } + return ok(code); + } + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code); + return prefix; + } + effects.exit(type); + return ok(code); + } +} +const content$1 = { + tokenize: initializeContent +}; +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ); + let previous2; + return contentStart; + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, contentStart, "linePrefix"); + } + function paragraphInitial(code) { + effects.enter("paragraph"); + return lineStart(code); + } + function lineStart(code) { + const token = effects.enter("chunkText", { + contentType: "text", + previous: previous2 + }); + if (previous2) { + previous2.next = token; + } + previous2 = token; + return data(code); + } + function data(code) { + if (code === null) { + effects.exit("chunkText"); + effects.exit("paragraph"); + effects.consume(code); + return; + } + if (markdownLineEnding(code)) { + effects.consume(code); + effects.exit("chunkText"); + return lineStart; + } + effects.consume(code); + return data; + } +} +const document$2 = { + tokenize: initializeDocument +}; +const containerConstruct = { + tokenize: tokenizeContainer +}; +function initializeDocument(effects) { + const self = this; + const stack = []; + let continued = 0; + let childFlow; + let childToken; + let lineStartOffset; + return start; + function start(code) { + if (continued < stack.length) { + const item = stack[continued]; + self.containerState = item[1]; + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code); + } + return checkNewContainers(code); + } + function documentContinue(code) { + continued++; + if (self.containerState._closeFlow) { + self.containerState._closeFlow = void 0; + if (childFlow) { + closeFlow(); + } + const indexBeforeExits = self.events.length; + let indexBeforeFlow = indexBeforeExits; + let point2; + while (indexBeforeFlow--) { + if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") { + point2 = self.events[indexBeforeFlow][1].end; + break; + } + } + exitContainers(continued); + let index2 = indexBeforeExits; + while (index2 < self.events.length) { + self.events[index2][1].end = Object.assign({}, point2); + index2++; + } + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ); + self.events.length = index2; + return checkNewContainers(code); + } + return start(code); + } + function checkNewContainers(code) { + if (continued === stack.length) { + if (!childFlow) { + return documentContinued(code); + } + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code); + } + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ); + } + self.containerState = {}; + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code); + } + function thereIsANewContainer(code) { + if (childFlow) + closeFlow(); + exitContainers(continued); + return documentContinued(code); + } + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length; + lineStartOffset = self.now().offset; + return flowStart(code); + } + function documentContinued(code) { + self.containerState = {}; + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code); + } + function containerContinue(code) { + continued++; + stack.push([self.currentConstruct, self.containerState]); + return documentContinued(code); + } + function flowStart(code) { + if (code === null) { + if (childFlow) + closeFlow(); + exitContainers(0); + effects.consume(code); + return; + } + childFlow = childFlow || self.parser.flow(self.now()); + effects.enter("chunkFlow", { + contentType: "flow", + previous: childToken, + _tokenizer: childFlow + }); + return flowContinue(code); + } + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit("chunkFlow"), true); + exitContainers(0); + effects.consume(code); + return; + } + if (markdownLineEnding(code)) { + effects.consume(code); + writeToChild(effects.exit("chunkFlow")); + continued = 0; + self.interrupt = void 0; + return start; + } + effects.consume(code); + return flowContinue; + } + function writeToChild(token, eof) { + const stream = self.sliceStream(token); + if (eof) + stream.push(null); + token.previous = childToken; + if (childToken) + childToken.next = token; + childToken = token; + childFlow.defineSkip(token.start); + childFlow.write(stream); + if (self.parser.lazy[token.start.line]) { + let index2 = childFlow.events.length; + while (index2--) { + if ( + // The token starts before the line ending… + childFlow.events[index2][1].start.offset < lineStartOffset && // …and either is not ended yet… + (!childFlow.events[index2][1].end || // …or ends after it. + childFlow.events[index2][1].end.offset > lineStartOffset) + ) { + return; + } + } + const indexBeforeExits = self.events.length; + let indexBeforeFlow = indexBeforeExits; + let seen; + let point2; + while (indexBeforeFlow--) { + if (self.events[indexBeforeFlow][0] === "exit" && self.events[indexBeforeFlow][1].type === "chunkFlow") { + if (seen) { + point2 = self.events[indexBeforeFlow][1].end; + break; + } + seen = true; + } + } + exitContainers(continued); + index2 = indexBeforeExits; + while (index2 < self.events.length) { + self.events[index2][1].end = Object.assign({}, point2); + index2++; + } + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ); + self.events.length = index2; + } + } + function exitContainers(size) { + let index2 = stack.length; + while (index2-- > size) { + const entry = stack[index2]; + self.containerState = entry[1]; + entry[0].exit.call(self, effects); + } + stack.length = size; + } + function closeFlow() { + childFlow.write([null]); + childToken = void 0; + childFlow = void 0; + self.containerState._closeFlow = void 0; + } +} +function tokenizeContainer(effects, ok, nok) { + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); +} +function classifyCharacter(code) { + if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) { + return 1; + } + if (unicodePunctuation(code)) { + return 2; + } +} +function resolveAll(constructs2, events, context) { + const called = []; + let index2 = -1; + while (++index2 < constructs2.length) { + const resolve = constructs2[index2].resolveAll; + if (resolve && !called.includes(resolve)) { + events = resolve(events, context); + called.push(resolve); + } + } + return events; +} +const attention = { + name: "attention", + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +}; +function resolveAllAttention(events, context) { + let index2 = -1; + let open; + let group; + let text2; + let openingSequence; + let closingSequence; + let use; + let nextEvents; + let offset; + while (++index2 < events.length) { + if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) { + open = index2; + while (open--) { + if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) { + if ((events[open][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) { + continue; + } + use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1; + const start = Object.assign({}, events[open][1].end); + const end = Object.assign({}, events[index2][1].start); + movePoint(start, -use); + movePoint(end, use); + openingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start, + end: Object.assign({}, events[open][1].end) + }; + closingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start: Object.assign({}, events[index2][1].start), + end + }; + text2 = { + type: use > 1 ? "strongText" : "emphasisText", + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index2][1].start) + }; + group = { + type: use > 1 ? "strong" : "emphasis", + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + }; + events[open][1].end = Object.assign({}, openingSequence.start); + events[index2][1].start = Object.assign({}, closingSequence.end); + nextEvents = []; + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ["enter", events[open][1], context], + ["exit", events[open][1], context] + ]); + } + nextEvents = push(nextEvents, [ + ["enter", group, context], + ["enter", openingSequence, context], + ["exit", openingSequence, context], + ["enter", text2, context] + ]); + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index2), + context + ) + ); + nextEvents = push(nextEvents, [ + ["exit", text2, context], + ["enter", closingSequence, context], + ["exit", closingSequence, context], + ["exit", group, context] + ]); + if (events[index2][1].end.offset - events[index2][1].start.offset) { + offset = 2; + nextEvents = push(nextEvents, [ + ["enter", events[index2][1], context], + ["exit", events[index2][1], context] + ]); + } else { + offset = 0; + } + splice(events, open - 1, index2 - open + 3, nextEvents); + index2 = open + nextEvents.length - offset - 2; + break; + } + } + } + } + index2 = -1; + while (++index2 < events.length) { + if (events[index2][1].type === "attentionSequence") { + events[index2][1].type = "data"; + } + } + return events; +} +function tokenizeAttention(effects, ok) { + const attentionMarkers2 = this.parser.constructs.attentionMarkers.null; + const previous2 = this.previous; + const before = classifyCharacter(previous2); + let marker; + return start; + function start(code) { + effects.enter("attentionSequence"); + marker = code; + return sequence(code); + } + function sequence(code) { + if (code === marker) { + effects.consume(code); + return sequence; + } + const token = effects.exit("attentionSequence"); + const after = classifyCharacter(code); + const open = !after || after === 2 && before || attentionMarkers2.includes(code); + const close = !before || before === 2 && after || attentionMarkers2.includes(previous2); + token._open = Boolean(marker === 42 ? open : open && (before || !close)); + token._close = Boolean(marker === 42 ? close : close && (after || !open)); + return ok(code); + } +} +function movePoint(point2, offset) { + point2.column += offset; + point2.offset += offset; + point2._bufferIndex += offset; +} +const autolink = { + name: "autolink", + tokenize: tokenizeAutolink +}; +function tokenizeAutolink(effects, ok, nok) { + let size = 1; + return start; + function start(code) { + effects.enter("autolink"); + effects.enter("autolinkMarker"); + effects.consume(code); + effects.exit("autolinkMarker"); + effects.enter("autolinkProtocol"); + return open; + } + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code); + return schemeOrEmailAtext; + } + return asciiAtext(code) ? emailAtext(code) : nok(code); + } + function schemeOrEmailAtext(code) { + return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code) ? schemeInsideOrEmailAtext(code) : emailAtext(code); + } + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code); + return urlInside; + } + if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) { + effects.consume(code); + return schemeInsideOrEmailAtext; + } + return emailAtext(code); + } + function urlInside(code) { + if (code === 62) { + effects.exit("autolinkProtocol"); + return end(code); + } + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code); + } + effects.consume(code); + return urlInside; + } + function emailAtext(code) { + if (code === 64) { + effects.consume(code); + size = 0; + return emailAtSignOrDot; + } + if (asciiAtext(code)) { + effects.consume(code); + return emailAtext; + } + return nok(code); + } + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code); + } + function emailLabel(code) { + if (code === 46) { + effects.consume(code); + size = 0; + return emailAtSignOrDot; + } + if (code === 62) { + effects.exit("autolinkProtocol").type = "autolinkEmail"; + return end(code); + } + return emailValue(code); + } + function emailValue(code) { + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + effects.consume(code); + return code === 45 ? emailValue : emailLabel; + } + return nok(code); + } + function end(code) { + effects.enter("autolinkMarker"); + effects.consume(code); + effects.exit("autolinkMarker"); + effects.exit("autolink"); + return ok; + } +} +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +}; +function tokenizeBlankLine(effects, ok, nok) { + return factorySpace(effects, afterWhitespace, "linePrefix"); + function afterWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code); + } +} +const blockQuote = { + name: "blockQuote", + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +}; +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this; + return start; + function start(code) { + if (code === 62) { + const state = self.containerState; + if (!state.open) { + effects.enter("blockQuote", { + _container: true + }); + state.open = true; + } + effects.enter("blockQuotePrefix"); + effects.enter("blockQuoteMarker"); + effects.consume(code); + effects.exit("blockQuoteMarker"); + return after; + } + return nok(code); + } + function after(code) { + if (markdownSpace(code)) { + effects.enter("blockQuotePrefixWhitespace"); + effects.consume(code); + effects.exit("blockQuotePrefixWhitespace"); + effects.exit("blockQuotePrefix"); + return ok; + } + effects.exit("blockQuotePrefix"); + return ok(code); + } +} +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + return factorySpace( + effects, + effects.attempt(blockQuote, ok, nok), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); +} +function exit(effects) { + effects.exit("blockQuote"); +} +const characterEscape = { + name: "characterEscape", + tokenize: tokenizeCharacterEscape +}; +function tokenizeCharacterEscape(effects, ok, nok) { + return start; + function start(code) { + effects.enter("characterEscape"); + effects.enter("escapeMarker"); + effects.consume(code); + effects.exit("escapeMarker"); + return open; + } + function open(code) { + if (asciiPunctuation(code)) { + effects.enter("characterEscapeValue"); + effects.consume(code); + effects.exit("characterEscapeValue"); + effects.exit("characterEscape"); + return ok; + } + return nok(code); + } +} +const element = document.createElement("i"); +function decodeNamedCharacterReference(value) { + const characterReference2 = "&" + value + ";"; + element.innerHTML = characterReference2; + const char = element.textContent; + if (char.charCodeAt(char.length - 1) === 59 && value !== "semi") { + return false; + } + return char === characterReference2 ? false : char; +} +const characterReference = { + name: "characterReference", + tokenize: tokenizeCharacterReference +}; +function tokenizeCharacterReference(effects, ok, nok) { + const self = this; + let size = 0; + let max; + let test; + return start; + function start(code) { + effects.enter("characterReference"); + effects.enter("characterReferenceMarker"); + effects.consume(code); + effects.exit("characterReferenceMarker"); + return open; + } + function open(code) { + if (code === 35) { + effects.enter("characterReferenceMarkerNumeric"); + effects.consume(code); + effects.exit("characterReferenceMarkerNumeric"); + return numeric; + } + effects.enter("characterReferenceValue"); + max = 31; + test = asciiAlphanumeric; + return value(code); + } + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter("characterReferenceMarkerHexadecimal"); + effects.consume(code); + effects.exit("characterReferenceMarkerHexadecimal"); + effects.enter("characterReferenceValue"); + max = 6; + test = asciiHexDigit; + return value; + } + effects.enter("characterReferenceValue"); + max = 7; + test = asciiDigit; + return value(code); + } + function value(code) { + let token; + if (code === 59 && size) { + token = effects.exit("characterReferenceValue"); + if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) { + return nok(code); + } + effects.enter("characterReferenceMarker"); + effects.consume(code); + effects.exit("characterReferenceMarker"); + effects.exit("characterReference"); + return ok; + } + if (test(code) && size++ < max) { + effects.consume(code); + return value; + } + return nok(code); + } +} +const codeFenced = { + name: "codeFenced", + tokenize: tokenizeCodeFenced, + concrete: true +}; +function tokenizeCodeFenced(effects, ok, nok) { + const self = this; + const closingFenceConstruct = { + tokenize: tokenizeClosingFence, + partial: true + }; + const nonLazyLine = { + tokenize: tokenizeNonLazyLine, + partial: true + }; + const tail = this.events[this.events.length - 1]; + const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0; + let sizeOpen = 0; + let marker; + return start; + function start(code) { + effects.enter("codeFenced"); + effects.enter("codeFencedFence"); + effects.enter("codeFencedFenceSequence"); + marker = code; + return sequenceOpen(code); + } + function sequenceOpen(code) { + if (code === marker) { + effects.consume(code); + sizeOpen++; + return sequenceOpen; + } + effects.exit("codeFencedFenceSequence"); + return sizeOpen < 3 ? nok(code) : factorySpace(effects, infoOpen, "whitespace")(code); + } + function infoOpen(code) { + if (code === null || markdownLineEnding(code)) { + return openAfter(code); + } + effects.enter("codeFencedFenceInfo"); + effects.enter("chunkString", { + contentType: "string" + }); + return info(code); + } + function info(code) { + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit("chunkString"); + effects.exit("codeFencedFenceInfo"); + return factorySpace(effects, infoAfter, "whitespace")(code); + } + if (code === 96 && code === marker) + return nok(code); + effects.consume(code); + return info; + } + function infoAfter(code) { + if (code === null || markdownLineEnding(code)) { + return openAfter(code); + } + effects.enter("codeFencedFenceMeta"); + effects.enter("chunkString", { + contentType: "string" + }); + return meta(code); + } + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("chunkString"); + effects.exit("codeFencedFenceMeta"); + return openAfter(code); + } + if (code === 96 && code === marker) + return nok(code); + effects.consume(code); + return meta; + } + function openAfter(code) { + effects.exit("codeFencedFence"); + return self.interrupt ? ok(code) : contentStart(code); + } + function contentStart(code) { + if (code === null) { + return after(code); + } + if (markdownLineEnding(code)) { + return effects.attempt( + nonLazyLine, + effects.attempt( + closingFenceConstruct, + after, + initialPrefix ? factorySpace( + effects, + contentStart, + "linePrefix", + initialPrefix + 1 + ) : contentStart + ), + after + )(code); + } + effects.enter("codeFlowValue"); + return contentContinue(code); + } + function contentContinue(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("codeFlowValue"); + return contentStart(code); + } + effects.consume(code); + return contentContinue; + } + function after(code) { + effects.exit("codeFenced"); + return ok(code); + } + function tokenizeNonLazyLine(effects2, ok2, nok2) { + const self2 = this; + return start2; + function start2(code) { + effects2.enter("lineEnding"); + effects2.consume(code); + effects2.exit("lineEnding"); + return lineStart; + } + function lineStart(code) { + return self2.parser.lazy[self2.now().line] ? nok2(code) : ok2(code); + } + } + function tokenizeClosingFence(effects2, ok2, nok2) { + let size = 0; + return factorySpace( + effects2, + closingSequenceStart, + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + function closingSequenceStart(code) { + effects2.enter("codeFencedFence"); + effects2.enter("codeFencedFenceSequence"); + return closingSequence(code); + } + function closingSequence(code) { + if (code === marker) { + effects2.consume(code); + size++; + return closingSequence; + } + if (size < sizeOpen) + return nok2(code); + effects2.exit("codeFencedFenceSequence"); + return factorySpace(effects2, closingSequenceEnd, "whitespace")(code); + } + function closingSequenceEnd(code) { + if (code === null || markdownLineEnding(code)) { + effects2.exit("codeFencedFence"); + return ok2(code); + } + return nok2(code); + } + } +} +const codeIndented = { + name: "codeIndented", + tokenize: tokenizeCodeIndented +}; +const indentedContent = { + tokenize: tokenizeIndentedContent, + partial: true +}; +function tokenizeCodeIndented(effects, ok, nok) { + const self = this; + return start; + function start(code) { + effects.enter("codeIndented"); + return factorySpace(effects, afterStartPrefix, "linePrefix", 4 + 1)(code); + } + function afterStartPrefix(code) { + const tail = self.events[self.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? afterPrefix(code) : nok(code); + } + function afterPrefix(code) { + if (code === null) { + return after(code); + } + if (markdownLineEnding(code)) { + return effects.attempt(indentedContent, afterPrefix, after)(code); + } + effects.enter("codeFlowValue"); + return content2(code); + } + function content2(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("codeFlowValue"); + return afterPrefix(code); + } + effects.consume(code); + return content2; + } + function after(code) { + effects.exit("codeIndented"); + return ok(code); + } +} +function tokenizeIndentedContent(effects, ok, nok) { + const self = this; + return start; + function start(code) { + if (self.parser.lazy[self.now().line]) { + return nok(code); + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return start; + } + return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code); + } + function afterPrefix(code) { + const tail = self.events[self.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code) : markdownLineEnding(code) ? start(code) : nok(code); + } +} +const codeText = { + name: "codeText", + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +}; +function resolveCodeText(events) { + let tailExitIndex = events.length - 4; + let headEnterIndex = 3; + let index2; + let enter; + if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) { + index2 = headEnterIndex; + while (++index2 < tailExitIndex) { + if (events[index2][1].type === "codeTextData") { + events[headEnterIndex][1].type = "codeTextPadding"; + events[tailExitIndex][1].type = "codeTextPadding"; + headEnterIndex += 2; + tailExitIndex -= 2; + break; + } + } + } + index2 = headEnterIndex - 1; + tailExitIndex++; + while (++index2 <= tailExitIndex) { + if (enter === void 0) { + if (index2 !== tailExitIndex && events[index2][1].type !== "lineEnding") { + enter = index2; + } + } else if (index2 === tailExitIndex || events[index2][1].type === "lineEnding") { + events[enter][1].type = "codeTextData"; + if (index2 !== enter + 2) { + events[enter][1].end = events[index2 - 1][1].end; + events.splice(enter + 2, index2 - enter - 2); + tailExitIndex -= index2 - enter - 2; + index2 = enter + 2; + } + enter = void 0; + } + } + return events; +} +function previous(code) { + return code !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; +} +function tokenizeCodeText(effects, ok, nok) { + let sizeOpen = 0; + let size; + let token; + return start; + function start(code) { + effects.enter("codeText"); + effects.enter("codeTextSequence"); + return openingSequence(code); + } + function openingSequence(code) { + if (code === 96) { + effects.consume(code); + sizeOpen++; + return openingSequence; + } + effects.exit("codeTextSequence"); + return gap(code); + } + function gap(code) { + if (code === null) { + return nok(code); + } + if (code === 96) { + token = effects.enter("codeTextSequence"); + size = 0; + return closingSequence(code); + } + if (code === 32) { + effects.enter("space"); + effects.consume(code); + effects.exit("space"); + return gap; + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return gap; + } + effects.enter("codeTextData"); + return data(code); + } + function data(code) { + if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) { + effects.exit("codeTextData"); + return gap(code); + } + effects.consume(code); + return data; + } + function closingSequence(code) { + if (code === 96) { + effects.consume(code); + size++; + return closingSequence; + } + if (size === sizeOpen) { + effects.exit("codeTextSequence"); + effects.exit("codeText"); + return ok(code); + } + token.type = "codeTextData"; + return data(code); + } +} +function subtokenize(events) { + const jumps = {}; + let index2 = -1; + let event; + let lineIndex; + let otherIndex; + let otherEvent; + let parameters; + let subevents; + let more; + while (++index2 < events.length) { + while (index2 in jumps) { + index2 = jumps[index2]; + } + event = events[index2]; + if (index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix") { + subevents = event[1]._tokenizer.events; + otherIndex = 0; + if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") { + otherIndex += 2; + } + if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === "content") { + break; + } + if (subevents[otherIndex][1].type === "chunkText") { + subevents[otherIndex][1]._isInFirstContentOfListItem = true; + otherIndex++; + } + } + } + } + if (event[0] === "enter") { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index2)); + index2 = jumps[index2]; + more = true; + } + } else if (event[1]._container) { + otherIndex = index2; + lineIndex = void 0; + while (otherIndex--) { + otherEvent = events[otherIndex]; + if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") { + if (otherEvent[0] === "enter") { + if (lineIndex) { + events[lineIndex][1].type = "lineEndingBlank"; + } + otherEvent[1].type = "lineEnding"; + lineIndex = otherIndex; + } + } else { + break; + } + } + if (lineIndex) { + event[1].end = Object.assign({}, events[lineIndex][1].start); + parameters = events.slice(lineIndex, index2); + parameters.unshift(event); + splice(events, lineIndex, index2 - lineIndex + 1, parameters); + } + } + } + return !more; +} +function subcontent(events, eventIndex) { + const token = events[eventIndex][1]; + const context = events[eventIndex][2]; + let startPosition = eventIndex - 1; + const startPositions = []; + const tokenizer = token._tokenizer || context.parser[token.contentType](token.start); + const childEvents = tokenizer.events; + const jumps = []; + const gaps = {}; + let stream; + let previous2; + let index2 = -1; + let current = token; + let adjust = 0; + let start = 0; + const breaks = [start]; + while (current) { + while (events[++startPosition][1] !== current) { + } + startPositions.push(startPosition); + if (!current._tokenizer) { + stream = context.sliceStream(current); + if (!current.next) { + stream.push(null); + } + if (previous2) { + tokenizer.defineSkip(current.start); + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true; + } + tokenizer.write(stream); + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = void 0; + } + } + previous2 = current; + current = current.next; + } + current = token; + while (++index2 < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line + ) { + start = index2 + 1; + breaks.push(start); + current._tokenizer = void 0; + current.previous = void 0; + current = current.next; + } + } + tokenizer.events = []; + if (current) { + current._tokenizer = void 0; + current.previous = void 0; + } else { + breaks.pop(); + } + index2 = breaks.length; + while (index2--) { + const slice = childEvents.slice(breaks[index2], breaks[index2 + 1]); + const start2 = startPositions.pop(); + jumps.unshift([start2, start2 + slice.length - 1]); + splice(events, start2, 2, slice); + } + index2 = -1; + while (++index2 < jumps.length) { + gaps[adjust + jumps[index2][0]] = adjust + jumps[index2][1]; + adjust += jumps[index2][1] - jumps[index2][0] - 1; + } + return gaps; +} +const content = { + tokenize: tokenizeContent, + resolve: resolveContent +}; +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +}; +function resolveContent(events) { + subtokenize(events); + return events; +} +function tokenizeContent(effects, ok) { + let previous2; + return start; + function start(code) { + effects.enter("content"); + previous2 = effects.enter("chunkContent", { + contentType: "content" + }); + return data(code); + } + function data(code) { + if (code === null) { + return contentEnd(code); + } + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code); + } + effects.consume(code); + return data; + } + function contentEnd(code) { + effects.exit("chunkContent"); + effects.exit("content"); + return ok(code); + } + function contentContinue(code) { + effects.consume(code); + effects.exit("chunkContent"); + previous2.next = effects.enter("chunkContent", { + contentType: "content", + previous: previous2 + }); + previous2 = previous2.next; + return data; + } +} +function tokenizeContinuation(effects, ok, nok) { + const self = this; + return startLookahead; + function startLookahead(code) { + effects.exit("chunkContent"); + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, prefixed, "linePrefix"); + } + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code); + } + const tail = self.events[self.events.length - 1]; + if (!self.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) { + return ok(code); + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code); + } +} +function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) { + const limit = max || Number.POSITIVE_INFINITY; + let balance = 0; + return start; + function start(code) { + if (code === 60) { + effects.enter(type); + effects.enter(literalType); + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + return destinationEnclosedBefore; + } + if (code === null || code === 41 || asciiControl(code)) { + return nok(code); + } + effects.enter(type); + effects.enter(rawType); + effects.enter(stringType); + effects.enter("chunkString", { + contentType: "string" + }); + return destinationRaw(code); + } + function destinationEnclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + effects.exit(literalType); + effects.exit(type); + return ok; + } + effects.enter(stringType); + effects.enter("chunkString", { + contentType: "string" + }); + return destinationEnclosed(code); + } + function destinationEnclosed(code) { + if (code === 62) { + effects.exit("chunkString"); + effects.exit(stringType); + return destinationEnclosedBefore(code); + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code); + } + effects.consume(code); + return code === 92 ? destinationEnclosedEscape : destinationEnclosed; + } + function destinationEnclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code); + return destinationEnclosed; + } + return destinationEnclosed(code); + } + function destinationRaw(code) { + if (code === 40) { + if (++balance > limit) + return nok(code); + effects.consume(code); + return destinationRaw; + } + if (code === 41) { + if (!balance--) { + effects.exit("chunkString"); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type); + return ok(code); + } + effects.consume(code); + return destinationRaw; + } + if (code === null || markdownLineEndingOrSpace(code)) { + if (balance) + return nok(code); + effects.exit("chunkString"); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type); + return ok(code); + } + if (asciiControl(code)) + return nok(code); + effects.consume(code); + return code === 92 ? destinationRawEscape : destinationRaw; + } + function destinationRawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code); + return destinationRaw; + } + return destinationRaw(code); + } +} +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this; + let size = 0; + let data; + return start; + function start(code) { + effects.enter(type); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.enter(stringType); + return atBreak; + } + function atBreak(code) { + if (code === null || code === 91 || code === 93 && !data || /* To do: remove in the future once we’ve switched from + * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + * which doesn’t need this */ + /* Hidden footnotes hook */ + /* c8 ignore next 3 */ + code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs || size > 999) { + return nok(code); + } + if (code === 93) { + effects.exit(stringType); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type); + return ok; + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return atBreak; + } + effects.enter("chunkString", { + contentType: "string" + }); + return label(code); + } + function label(code) { + if (code === null || code === 91 || code === 93 || markdownLineEnding(code) || size++ > 999) { + effects.exit("chunkString"); + return atBreak(code); + } + effects.consume(code); + data = data || !markdownSpace(code); + return code === 92 ? labelEscape : label; + } + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code); + size++; + return label; + } + return label(code); + } +} +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + let marker; + return start; + function start(code) { + effects.enter(type); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + marker = code === 40 ? 41 : code; + return atFirstTitleBreak; + } + function atFirstTitleBreak(code) { + if (code === marker) { + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type); + return ok; + } + effects.enter(stringType); + return atTitleBreak(code); + } + function atTitleBreak(code) { + if (code === marker) { + effects.exit(stringType); + return atFirstTitleBreak(marker); + } + if (code === null) { + return nok(code); + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, atTitleBreak, "linePrefix"); + } + effects.enter("chunkString", { + contentType: "string" + }); + return title(code); + } + function title(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit("chunkString"); + return atTitleBreak(code); + } + effects.consume(code); + return code === 92 ? titleEscape : title; + } + function titleEscape(code) { + if (code === marker || code === 92) { + effects.consume(code); + return title; + } + return title(code); + } +} +function factoryWhitespace(effects, ok) { + let seen; + return start; + function start(code) { + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + seen = true; + return start; + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? "linePrefix" : "lineSuffix" + )(code); + } + return ok(code); + } +} +function normalizeIdentifier(value) { + return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); +} +const definition = { + name: "definition", + tokenize: tokenizeDefinition +}; +const titleConstruct = { + tokenize: tokenizeTitle, + partial: true +}; +function tokenizeDefinition(effects, ok, nok) { + const self = this; + let identifier; + return start; + function start(code) { + effects.enter("definition"); + return factoryLabel.call( + self, + effects, + labelAfter, + nok, + "definitionLabel", + "definitionLabelMarker", + "definitionLabelString" + )(code); + } + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ); + if (code === 58) { + effects.enter("definitionMarker"); + effects.consume(code); + effects.exit("definitionMarker"); + return factoryWhitespace( + effects, + factoryDestination( + effects, + effects.attempt( + titleConstruct, + factorySpace(effects, after, "whitespace"), + factorySpace(effects, after, "whitespace") + ), + nok, + "definitionDestination", + "definitionDestinationLiteral", + "definitionDestinationLiteralMarker", + "definitionDestinationRaw", + "definitionDestinationString" + ) + ); + } + return nok(code); + } + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("definition"); + if (!self.parser.defined.includes(identifier)) { + self.parser.defined.push(identifier); + } + return ok(code); + } + return nok(code); + } +} +function tokenizeTitle(effects, ok, nok) { + return start; + function start(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, before)(code) : nok(code); + } + function before(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + factorySpace(effects, after, "whitespace"), + nok, + "definitionTitle", + "definitionTitleMarker", + "definitionTitleString" + )(code); + } + return nok(code); + } + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code); + } +} +const hardBreakEscape = { + name: "hardBreakEscape", + tokenize: tokenizeHardBreakEscape +}; +function tokenizeHardBreakEscape(effects, ok, nok) { + return start; + function start(code) { + effects.enter("hardBreakEscape"); + effects.enter("escapeMarker"); + effects.consume(code); + return open; + } + function open(code) { + if (markdownLineEnding(code)) { + effects.exit("escapeMarker"); + effects.exit("hardBreakEscape"); + return ok(code); + } + return nok(code); + } +} +const headingAtx = { + name: "headingAtx", + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +}; +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2; + let contentStart = 3; + let content2; + let text2; + if (events[contentStart][1].type === "whitespace") { + contentStart += 2; + } + if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") { + contentEnd -= 2; + } + if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4; + } + if (contentEnd > contentStart) { + content2 = { + type: "atxHeadingText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end + }; + text2 = { + type: "chunkText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + // @ts-expect-error Constants are fine to assign. + contentType: "text" + }; + splice(events, contentStart, contentEnd - contentStart + 1, [ + ["enter", content2, context], + ["enter", text2, context], + ["exit", text2, context], + ["exit", content2, context] + ]); + } + return events; +} +function tokenizeHeadingAtx(effects, ok, nok) { + const self = this; + let size = 0; + return start; + function start(code) { + effects.enter("atxHeading"); + effects.enter("atxHeadingSequence"); + return fenceOpenInside(code); + } + function fenceOpenInside(code) { + if (code === 35 && size++ < 6) { + effects.consume(code); + return fenceOpenInside; + } + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit("atxHeadingSequence"); + return self.interrupt ? ok(code) : headingBreak(code); + } + return nok(code); + } + function headingBreak(code) { + if (code === 35) { + effects.enter("atxHeadingSequence"); + return sequence(code); + } + if (code === null || markdownLineEnding(code)) { + effects.exit("atxHeading"); + return ok(code); + } + if (markdownSpace(code)) { + return factorySpace(effects, headingBreak, "whitespace")(code); + } + effects.enter("atxHeadingText"); + return data(code); + } + function sequence(code) { + if (code === 35) { + effects.consume(code); + return sequence; + } + effects.exit("atxHeadingSequence"); + return headingBreak(code); + } + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit("atxHeadingText"); + return headingBreak(code); + } + effects.consume(code); + return data; + } +} +const htmlBlockNames = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" +]; +const htmlRawNames = ["pre", "script", "style", "textarea"]; +const htmlFlow = { + name: "htmlFlow", + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +}; +const nextBlankConstruct = { + tokenize: tokenizeNextBlank, + partial: true +}; +function resolveToHtmlFlow(events) { + let index2 = events.length; + while (index2--) { + if (events[index2][0] === "enter" && events[index2][1].type === "htmlFlow") { + break; + } + } + if (index2 > 1 && events[index2 - 2][1].type === "linePrefix") { + events[index2][1].start = events[index2 - 2][1].start; + events[index2 + 1][1].start = events[index2 - 2][1].start; + events.splice(index2 - 2, 2); + } + return events; +} +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this; + let kind; + let startTag; + let buffer; + let index2; + let marker; + return start; + function start(code) { + effects.enter("htmlFlow"); + effects.enter("htmlFlowData"); + effects.consume(code); + return open; + } + function open(code) { + if (code === 33) { + effects.consume(code); + return declarationStart; + } + if (code === 47) { + effects.consume(code); + return tagCloseStart; + } + if (code === 63) { + effects.consume(code); + kind = 3; + return self.interrupt ? ok : continuationDeclarationInside; + } + if (asciiAlpha(code)) { + effects.consume(code); + buffer = String.fromCharCode(code); + startTag = true; + return tagName; + } + return nok(code); + } + function declarationStart(code) { + if (code === 45) { + effects.consume(code); + kind = 2; + return commentOpenInside; + } + if (code === 91) { + effects.consume(code); + kind = 5; + buffer = "CDATA["; + index2 = 0; + return cdataOpenInside; + } + if (asciiAlpha(code)) { + effects.consume(code); + kind = 4; + return self.interrupt ? ok : continuationDeclarationInside; + } + return nok(code); + } + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code); + return self.interrupt ? ok : continuationDeclarationInside; + } + return nok(code); + } + function cdataOpenInside(code) { + if (code === buffer.charCodeAt(index2++)) { + effects.consume(code); + return index2 === buffer.length ? self.interrupt ? ok : continuation : cdataOpenInside; + } + return nok(code); + } + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code); + buffer = String.fromCharCode(code); + return tagName; + } + return nok(code); + } + function tagName(code) { + if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + if (code !== 47 && startTag && htmlRawNames.includes(buffer.toLowerCase())) { + kind = 1; + return self.interrupt ? ok(code) : continuation(code); + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + kind = 6; + if (code === 47) { + effects.consume(code); + return basicSelfClosing; + } + return self.interrupt ? ok(code) : continuation(code); + } + kind = 7; + return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : startTag ? completeAttributeNameBefore(code) : completeClosingTagAfter(code); + } + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + buffer += String.fromCharCode(code); + return tagName; + } + return nok(code); + } + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code); + return self.interrupt ? ok : continuation; + } + return nok(code); + } + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code); + return completeClosingTagAfter; + } + return completeEnd(code); + } + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code); + return completeEnd; + } + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code); + return completeAttributeName; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeNameBefore; + } + return completeEnd(code); + } + function completeAttributeName(code) { + if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) { + effects.consume(code); + return completeAttributeName; + } + return completeAttributeNameAfter(code); + } + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code); + return completeAttributeValueBefore; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeNameAfter; + } + return completeAttributeNameBefore(code); + } + function completeAttributeValueBefore(code) { + if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { + return nok(code); + } + if (code === 34 || code === 39) { + effects.consume(code); + marker = code; + return completeAttributeValueQuoted; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeValueBefore; + } + marker = null; + return completeAttributeValueUnquoted(code); + } + function completeAttributeValueQuoted(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code); + } + if (code === marker) { + effects.consume(code); + return completeAttributeValueQuotedAfter; + } + effects.consume(code); + return completeAttributeValueQuoted; + } + function completeAttributeValueUnquoted(code) { + if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code)) { + return completeAttributeNameAfter(code); + } + effects.consume(code); + return completeAttributeValueUnquoted; + } + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code); + } + return nok(code); + } + function completeEnd(code) { + if (code === 62) { + effects.consume(code); + return completeAfter; + } + return nok(code); + } + function completeAfter(code) { + if (markdownSpace(code)) { + effects.consume(code); + return completeAfter; + } + return code === null || markdownLineEnding(code) ? continuation(code) : nok(code); + } + function continuation(code) { + if (code === 45 && kind === 2) { + effects.consume(code); + return continuationCommentInside; + } + if (code === 60 && kind === 1) { + effects.consume(code); + return continuationRawTagOpen; + } + if (code === 62 && kind === 4) { + effects.consume(code); + return continuationClose; + } + if (code === 63 && kind === 3) { + effects.consume(code); + return continuationDeclarationInside; + } + if (code === 93 && kind === 5) { + effects.consume(code); + return continuationCharacterDataInside; + } + if (markdownLineEnding(code) && (kind === 6 || kind === 7)) { + return effects.check( + nextBlankConstruct, + continuationClose, + continuationAtLineEnding + )(code); + } + if (code === null || markdownLineEnding(code)) { + return continuationAtLineEnding(code); + } + effects.consume(code); + return continuation; + } + function continuationAtLineEnding(code) { + effects.exit("htmlFlowData"); + return htmlContinueStart(code); + } + function htmlContinueStart(code) { + if (code === null) { + return done(code); + } + if (markdownLineEnding(code)) { + return effects.attempt( + { + tokenize: htmlLineEnd, + partial: true + }, + htmlContinueStart, + done + )(code); + } + effects.enter("htmlFlowData"); + return continuation(code); + } + function htmlLineEnd(effects2, ok2, nok2) { + return start2; + function start2(code) { + effects2.enter("lineEnding"); + effects2.consume(code); + effects2.exit("lineEnding"); + return lineStart; + } + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok2(code) : ok2(code); + } + } + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code); + buffer = ""; + return continuationRawEndTag; + } + return continuation(code); + } + function continuationRawEndTag(code) { + if (code === 62 && htmlRawNames.includes(buffer.toLowerCase())) { + effects.consume(code); + return continuationClose; + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code); + buffer += String.fromCharCode(code); + return continuationRawEndTag; + } + return continuation(code); + } + function continuationCharacterDataInside(code) { + if (code === 93) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code); + return continuationClose; + } + if (code === 45 && kind === 2) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("htmlFlowData"); + return done(code); + } + effects.consume(code); + return continuationClose; + } + function done(code) { + effects.exit("htmlFlow"); + return ok(code); + } +} +function tokenizeNextBlank(effects, ok, nok) { + return start; + function start(code) { + effects.exit("htmlFlowData"); + effects.enter("lineEndingBlank"); + effects.consume(code); + effects.exit("lineEndingBlank"); + return effects.attempt(blankLine, ok, nok); + } +} +const htmlText = { + name: "htmlText", + tokenize: tokenizeHtmlText +}; +function tokenizeHtmlText(effects, ok, nok) { + const self = this; + let marker; + let buffer; + let index2; + let returnState; + return start; + function start(code) { + effects.enter("htmlText"); + effects.enter("htmlTextData"); + effects.consume(code); + return open; + } + function open(code) { + if (code === 33) { + effects.consume(code); + return declarationOpen; + } + if (code === 47) { + effects.consume(code); + return tagCloseStart; + } + if (code === 63) { + effects.consume(code); + return instruction; + } + if (asciiAlpha(code)) { + effects.consume(code); + return tagOpen; + } + return nok(code); + } + function declarationOpen(code) { + if (code === 45) { + effects.consume(code); + return commentOpen; + } + if (code === 91) { + effects.consume(code); + buffer = "CDATA["; + index2 = 0; + return cdataOpen; + } + if (asciiAlpha(code)) { + effects.consume(code); + return declaration; + } + return nok(code); + } + function commentOpen(code) { + if (code === 45) { + effects.consume(code); + return commentStart; + } + return nok(code); + } + function commentStart(code) { + if (code === null || code === 62) { + return nok(code); + } + if (code === 45) { + effects.consume(code); + return commentStartDash; + } + return comment(code); + } + function commentStartDash(code) { + if (code === null || code === 62) { + return nok(code); + } + return comment(code); + } + function comment(code) { + if (code === null) { + return nok(code); + } + if (code === 45) { + effects.consume(code); + return commentClose; + } + if (markdownLineEnding(code)) { + returnState = comment; + return atLineEnding(code); + } + effects.consume(code); + return comment; + } + function commentClose(code) { + if (code === 45) { + effects.consume(code); + return end; + } + return comment(code); + } + function cdataOpen(code) { + if (code === buffer.charCodeAt(index2++)) { + effects.consume(code); + return index2 === buffer.length ? cdata : cdataOpen; + } + return nok(code); + } + function cdata(code) { + if (code === null) { + return nok(code); + } + if (code === 93) { + effects.consume(code); + return cdataClose; + } + if (markdownLineEnding(code)) { + returnState = cdata; + return atLineEnding(code); + } + effects.consume(code); + return cdata; + } + function cdataClose(code) { + if (code === 93) { + effects.consume(code); + return cdataEnd; + } + return cdata(code); + } + function cdataEnd(code) { + if (code === 62) { + return end(code); + } + if (code === 93) { + effects.consume(code); + return cdataEnd; + } + return cdata(code); + } + function declaration(code) { + if (code === null || code === 62) { + return end(code); + } + if (markdownLineEnding(code)) { + returnState = declaration; + return atLineEnding(code); + } + effects.consume(code); + return declaration; + } + function instruction(code) { + if (code === null) { + return nok(code); + } + if (code === 63) { + effects.consume(code); + return instructionClose; + } + if (markdownLineEnding(code)) { + returnState = instruction; + return atLineEnding(code); + } + effects.consume(code); + return instruction; + } + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code); + } + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code); + return tagClose; + } + return nok(code); + } + function tagClose(code) { + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagClose; + } + return tagCloseBetween(code); + } + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagCloseBetween; + } + return end(code); + } + function tagOpen(code) { + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagOpen; + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + return nok(code); + } + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code); + return end; + } + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code); + return tagOpenAttributeName; + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenBetween; + } + return end(code); + } + function tagOpenAttributeName(code) { + if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagOpenAttributeName; + } + return tagOpenAttributeNameAfter(code); + } + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code); + return tagOpenAttributeValueBefore; + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenAttributeNameAfter; + } + return tagOpenBetween(code); + } + function tagOpenAttributeValueBefore(code) { + if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { + return nok(code); + } + if (code === 34 || code === 39) { + effects.consume(code); + marker = code; + return tagOpenAttributeValueQuoted; + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenAttributeValueBefore; + } + effects.consume(code); + marker = void 0; + return tagOpenAttributeValueUnquoted; + } + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code); + return tagOpenAttributeValueQuotedAfter; + } + if (code === null) { + return nok(code); + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted; + return atLineEnding(code); + } + effects.consume(code); + return tagOpenAttributeValueQuoted; + } + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 62 || code === 47 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + return nok(code); + } + function tagOpenAttributeValueUnquoted(code) { + if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) { + return nok(code); + } + if (code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + effects.consume(code); + return tagOpenAttributeValueUnquoted; + } + function atLineEnding(code) { + effects.exit("htmlTextData"); + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace( + effects, + afterPrefix, + "linePrefix", + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + } + function afterPrefix(code) { + effects.enter("htmlTextData"); + return returnState(code); + } + function end(code) { + if (code === 62) { + effects.consume(code); + effects.exit("htmlTextData"); + effects.exit("htmlText"); + return ok; + } + return nok(code); + } +} +const labelEnd = { + name: "labelEnd", + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +}; +const resourceConstruct = { + tokenize: tokenizeResource +}; +const fullReferenceConstruct = { + tokenize: tokenizeFullReference +}; +const collapsedReferenceConstruct = { + tokenize: tokenizeCollapsedReference +}; +function resolveAllLabelEnd(events) { + let index2 = -1; + let token; + while (++index2 < events.length) { + token = events[index2][1]; + if (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd") { + events.splice(index2 + 1, token.type === "labelImage" ? 4 : 2); + token.type = "data"; + index2++; + } + } + return events; +} +function resolveToLabelEnd(events, context) { + let index2 = events.length; + let offset = 0; + let token; + let open; + let close; + let media; + while (index2--) { + token = events[index2][1]; + if (open) { + if (token.type === "link" || token.type === "labelLink" && token._inactive) { + break; + } + if (events[index2][0] === "enter" && token.type === "labelLink") { + token._inactive = true; + } + } else if (close) { + if (events[index2][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) { + open = index2; + if (token.type !== "labelLink") { + offset = 2; + break; + } + } + } else if (token.type === "labelEnd") { + close = index2; + } + } + const group = { + type: events[open][1].type === "labelLink" ? "link" : "image", + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + const label = { + type: "label", + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + }; + const text2 = { + type: "labelText", + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + }; + media = [ + ["enter", group, context], + ["enter", label, context] + ]; + media = push(media, events.slice(open + 1, open + offset + 3)); + media = push(media, [["enter", text2, context]]); + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ); + media = push(media, [ + ["exit", text2, context], + events[close - 2], + events[close - 1], + ["exit", label, context] + ]); + media = push(media, events.slice(close + 1)); + media = push(media, [["exit", group, context]]); + splice(events, open, events.length, media); + return events; +} +function tokenizeLabelEnd(effects, ok, nok) { + const self = this; + let index2 = self.events.length; + let labelStart; + let defined; + while (index2--) { + if ((self.events[index2][1].type === "labelImage" || self.events[index2][1].type === "labelLink") && !self.events[index2][1]._balanced) { + labelStart = self.events[index2][1]; + break; + } + } + return start; + function start(code) { + if (!labelStart) { + return nok(code); + } + if (labelStart._inactive) + return balanced(code); + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ); + effects.enter("labelEnd"); + effects.enter("labelMarker"); + effects.consume(code); + effects.exit("labelMarker"); + effects.exit("labelEnd"); + return afterLabelEnd; + } + function afterLabelEnd(code) { + if (code === 40) { + return effects.attempt( + resourceConstruct, + ok, + defined ? ok : balanced + )(code); + } + if (code === 91) { + return effects.attempt( + fullReferenceConstruct, + ok, + defined ? effects.attempt(collapsedReferenceConstruct, ok, balanced) : balanced + )(code); + } + return defined ? ok(code) : balanced(code); + } + function balanced(code) { + labelStart._balanced = true; + return nok(code); + } +} +function tokenizeResource(effects, ok, nok) { + return start; + function start(code) { + effects.enter("resource"); + effects.enter("resourceMarker"); + effects.consume(code); + effects.exit("resourceMarker"); + return factoryWhitespace(effects, open); + } + function open(code) { + if (code === 41) { + return end(code); + } + return factoryDestination( + effects, + destinationAfter, + nok, + "resourceDestination", + "resourceDestinationLiteral", + "resourceDestinationLiteralMarker", + "resourceDestinationRaw", + "resourceDestinationString", + 32 + )(code); + } + function destinationAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, between)(code) : end(code); + } + function between(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + factoryWhitespace(effects, end), + nok, + "resourceTitle", + "resourceTitleMarker", + "resourceTitleString" + )(code); + } + return end(code); + } + function end(code) { + if (code === 41) { + effects.enter("resourceMarker"); + effects.consume(code); + effects.exit("resourceMarker"); + effects.exit("resource"); + return ok; + } + return nok(code); + } +} +function tokenizeFullReference(effects, ok, nok) { + const self = this; + return start; + function start(code) { + return factoryLabel.call( + self, + effects, + afterLabel, + nok, + "reference", + "referenceMarker", + "referenceString" + )(code); + } + function afterLabel(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) ? ok(code) : nok(code); + } +} +function tokenizeCollapsedReference(effects, ok, nok) { + return start; + function start(code) { + effects.enter("reference"); + effects.enter("referenceMarker"); + effects.consume(code); + effects.exit("referenceMarker"); + return open; + } + function open(code) { + if (code === 93) { + effects.enter("referenceMarker"); + effects.consume(code); + effects.exit("referenceMarker"); + effects.exit("reference"); + return ok; + } + return nok(code); + } +} +const labelStartImage = { + name: "labelStartImage", + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +}; +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this; + return start; + function start(code) { + effects.enter("labelImage"); + effects.enter("labelImageMarker"); + effects.consume(code); + effects.exit("labelImageMarker"); + return open; + } + function open(code) { + if (code === 91) { + effects.enter("labelMarker"); + effects.consume(code); + effects.exit("labelMarker"); + effects.exit("labelImage"); + return after; + } + return nok(code); + } + function after(code) { + return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code); + } +} +const labelStartLink = { + name: "labelStartLink", + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +}; +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this; + return start; + function start(code) { + effects.enter("labelLink"); + effects.enter("labelMarker"); + effects.consume(code); + effects.exit("labelMarker"); + effects.exit("labelLink"); + return after; + } + function after(code) { + return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code); + } +} +const lineEnding = { + name: "lineEnding", + tokenize: tokenizeLineEnding +}; +function tokenizeLineEnding(effects, ok) { + return start; + function start(code) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, ok, "linePrefix"); + } +} +const thematicBreak = { + name: "thematicBreak", + tokenize: tokenizeThematicBreak +}; +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0; + let marker; + return start; + function start(code) { + effects.enter("thematicBreak"); + marker = code; + return atBreak(code); + } + function atBreak(code) { + if (code === marker) { + effects.enter("thematicBreakSequence"); + return sequence(code); + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, "whitespace")(code); + } + if (size < 3 || code !== null && !markdownLineEnding(code)) { + return nok(code); + } + effects.exit("thematicBreak"); + return ok(code); + } + function sequence(code) { + if (code === marker) { + effects.consume(code); + size++; + return sequence; + } + effects.exit("thematicBreakSequence"); + return atBreak(code); + } +} +const list = { + name: "list", + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +}; +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +}; +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +}; +function tokenizeListStart(effects, ok, nok) { + const self = this; + const tail = self.events[self.events.length - 1]; + let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0; + let size = 0; + return start; + function start(code) { + const kind = self.containerState.type || (code === 42 || code === 43 || code === 45 ? "listUnordered" : "listOrdered"); + if (kind === "listUnordered" ? !self.containerState.marker || code === self.containerState.marker : asciiDigit(code)) { + if (!self.containerState.type) { + self.containerState.type = kind; + effects.enter(kind, { + _container: true + }); + } + if (kind === "listUnordered") { + effects.enter("listItemPrefix"); + return code === 42 || code === 45 ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code); + } + if (!self.interrupt || code === 49) { + effects.enter("listItemPrefix"); + effects.enter("listItemValue"); + return inside(code); + } + } + return nok(code); + } + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code); + return inside; + } + if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === 41 || code === 46)) { + effects.exit("listItemValue"); + return atMarker(code); + } + return nok(code); + } + function atMarker(code) { + effects.enter("listItemMarker"); + effects.consume(code); + effects.exit("listItemMarker"); + self.containerState.marker = self.containerState.marker || code; + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ); + } + function onBlank(code) { + self.containerState.initialBlankLine = true; + initialSize++; + return endOfPrefix(code); + } + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter("listItemPrefixWhitespace"); + effects.consume(code); + effects.exit("listItemPrefixWhitespace"); + return endOfPrefix; + } + return nok(code); + } + function endOfPrefix(code) { + self.containerState.size = initialSize + self.sliceSerialize(effects.exit("listItemPrefix"), true).length; + return ok(code); + } +} +function tokenizeListContinuation(effects, ok, nok) { + const self = this; + self.containerState._closeFlow = void 0; + return effects.check(blankLine, onBlank, notBlank); + function onBlank(code) { + self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine; + return factorySpace( + effects, + ok, + "listItemIndent", + self.containerState.size + 1 + )(code); + } + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = void 0; + self.containerState.initialBlankLine = void 0; + return notInCurrentItem(code); + } + self.containerState.furtherBlankLines = void 0; + self.containerState.initialBlankLine = void 0; + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code); + } + function notInCurrentItem(code) { + self.containerState._closeFlow = true; + self.interrupt = void 0; + return factorySpace( + effects, + effects.attempt(list, ok, nok), + "linePrefix", + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code); + } +} +function tokenizeIndent(effects, ok, nok) { + const self = this; + return factorySpace( + effects, + afterPrefix, + "listItemIndent", + self.containerState.size + 1 + ); + function afterPrefix(code) { + const tail = self.events[self.events.length - 1]; + return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self.containerState.size ? ok(code) : nok(code); + } +} +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type); +} +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this; + return factorySpace( + effects, + afterPrefix, + "listItemPrefixWhitespace", + self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1 + ); + function afterPrefix(code) { + const tail = self.events[self.events.length - 1]; + return !markdownSpace(code) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok(code) : nok(code); + } +} +const setextUnderline = { + name: "setextUnderline", + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +}; +function resolveToSetextUnderline(events, context) { + let index2 = events.length; + let content2; + let text2; + let definition2; + while (index2--) { + if (events[index2][0] === "enter") { + if (events[index2][1].type === "content") { + content2 = index2; + break; + } + if (events[index2][1].type === "paragraph") { + text2 = index2; + } + } else { + if (events[index2][1].type === "content") { + events.splice(index2, 1); + } + if (!definition2 && events[index2][1].type === "definition") { + definition2 = index2; + } + } + } + const heading = { + type: "setextHeading", + start: Object.assign({}, events[text2][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + events[text2][1].type = "setextHeadingText"; + if (definition2) { + events.splice(text2, 0, ["enter", heading, context]); + events.splice(definition2 + 1, 0, ["exit", events[content2][1], context]); + events[content2][1].end = Object.assign({}, events[definition2][1].end); + } else { + events[content2][1] = heading; + } + events.push(["exit", heading, context]); + return events; +} +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this; + let index2 = self.events.length; + let marker; + let paragraph; + while (index2--) { + if (self.events[index2][1].type !== "lineEnding" && self.events[index2][1].type !== "linePrefix" && self.events[index2][1].type !== "content") { + paragraph = self.events[index2][1].type === "paragraph"; + break; + } + } + return start; + function start(code) { + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter("setextHeadingLine"); + effects.enter("setextHeadingLineSequence"); + marker = code; + return closingSequence(code); + } + return nok(code); + } + function closingSequence(code) { + if (code === marker) { + effects.consume(code); + return closingSequence; + } + effects.exit("setextHeadingLineSequence"); + return factorySpace(effects, closingSequenceEnd, "lineSuffix")(code); + } + function closingSequenceEnd(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("setextHeadingLine"); + return ok(code); + } + return nok(code); + } +} +const flow$1 = { + tokenize: initializeFlow +}; +function initializeFlow(effects) { + const self = this; + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content, afterConstruct) + ), + "linePrefix" + ) + ) + ); + return initial; + function atBlankEnding(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("lineEndingBlank"); + effects.consume(code); + effects.exit("lineEndingBlank"); + self.currentConstruct = void 0; + return initial; + } + function afterConstruct(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + self.currentConstruct = void 0; + return initial; + } +} +const resolver = { + resolveAll: createResolver() +}; +const string$1 = initializeFactory("string"); +const text$1 = initializeFactory("text"); +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === "text" ? resolveAllLineSuffixes : void 0 + ) + }; + function initializeText(effects) { + const self = this; + const constructs2 = this.parser.constructs[field]; + const text2 = effects.attempt(constructs2, start, notText); + return start; + function start(code) { + return atBreak(code) ? text2(code) : notText(code); + } + function notText(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("data"); + effects.consume(code); + return data; + } + function data(code) { + if (atBreak(code)) { + effects.exit("data"); + return text2(code); + } + effects.consume(code); + return data; + } + function atBreak(code) { + if (code === null) { + return true; + } + const list2 = constructs2[code]; + let index2 = -1; + if (list2) { + while (++index2 < list2.length) { + const item = list2[index2]; + if (!item.previous || item.previous.call(self, self.previous)) { + return true; + } + } + } + return false; + } + } +} +function createResolver(extraResolver) { + return resolveAllText; + function resolveAllText(events, context) { + let index2 = -1; + let enter; + while (++index2 <= events.length) { + if (enter === void 0) { + if (events[index2] && events[index2][1].type === "data") { + enter = index2; + index2++; + } + } else if (!events[index2] || events[index2][1].type !== "data") { + if (index2 !== enter + 2) { + events[enter][1].end = events[index2 - 1][1].end; + events.splice(enter + 2, index2 - enter - 2); + index2 = enter + 2; + } + enter = void 0; + } + } + return extraResolver ? extraResolver(events, context) : events; + } +} +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0; + while (++eventIndex <= events.length) { + if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") { + const data = events[eventIndex - 1][1]; + const chunks = context.sliceStream(data); + let index2 = chunks.length; + let bufferIndex = -1; + let size = 0; + let tabs; + while (index2--) { + const chunk = chunks[index2]; + if (typeof chunk === "string") { + bufferIndex = chunk.length; + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++; + bufferIndex--; + } + if (bufferIndex) + break; + bufferIndex = -1; + } else if (chunk === -2) { + tabs = true; + size++; + } else if (chunk === -1) + ; + else { + index2++; + break; + } + } + if (size) { + const token = { + type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing", + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index2, + _bufferIndex: index2 ? bufferIndex : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + }; + data.end = Object.assign({}, token.start); + if (data.start.offset === data.end.offset) { + Object.assign(data, token); + } else { + events.splice( + eventIndex, + 0, + ["enter", token, context], + ["exit", token, context] + ); + eventIndex += 2; + } + } + eventIndex++; + } + } + return events; +} +function createTokenizer(parser, initialize, from) { + let point2 = Object.assign( + from ? Object.assign({}, from) : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ); + const columnStart = {}; + const resolveAllConstructs = []; + let chunks = []; + let stack = []; + const effects = { + consume, + enter, + exit: exit2, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + }; + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + }; + let state = initialize.tokenize.call(context, effects); + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize); + } + return context; + function write(slice) { + chunks = push(chunks, slice); + main(); + if (chunks[chunks.length - 1] !== null) { + return []; + } + addResult(initialize, 0); + context.events = resolveAll(resolveAllConstructs, context.events, context); + return context.events; + } + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs); + } + function sliceStream(token) { + return sliceChunks(chunks, token); + } + function now() { + return Object.assign({}, point2); + } + function defineSkip(value) { + columnStart[value.line] = value.column; + accountForPotentialSkip(); + } + function main() { + let chunkIndex; + while (point2._index < chunks.length) { + const chunk = chunks[point2._index]; + if (typeof chunk === "string") { + chunkIndex = point2._index; + if (point2._bufferIndex < 0) { + point2._bufferIndex = 0; + } + while (point2._index === chunkIndex && point2._bufferIndex < chunk.length) { + go(chunk.charCodeAt(point2._bufferIndex)); + } + } else { + go(chunk); + } + } + } + function go(code) { + state = state(code); + } + function consume(code) { + if (markdownLineEnding(code)) { + point2.line++; + point2.column = 1; + point2.offset += code === -3 ? 2 : 1; + accountForPotentialSkip(); + } else if (code !== -1) { + point2.column++; + point2.offset++; + } + if (point2._bufferIndex < 0) { + point2._index++; + } else { + point2._bufferIndex++; + if (point2._bufferIndex === chunks[point2._index].length) { + point2._bufferIndex = -1; + point2._index++; + } + } + context.previous = code; + } + function enter(type, fields) { + const token = fields || {}; + token.type = type; + token.start = now(); + context.events.push(["enter", token, context]); + stack.push(token); + return token; + } + function exit2(type) { + const token = stack.pop(); + token.end = now(); + context.events.push(["exit", token, context]); + return token; + } + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from); + } + function onsuccessfulcheck(_, info) { + info.restore(); + } + function constructFactory(onreturn, fields) { + return hook; + function hook(constructs2, returnState, bogusState) { + let listOfConstructs; + let constructIndex; + let currentConstruct; + let info; + return Array.isArray(constructs2) ? ( + /* c8 ignore next 1 */ + handleListOfConstructs(constructs2) + ) : "tokenize" in constructs2 ? handleListOfConstructs([constructs2]) : handleMapOfConstructs(constructs2); + function handleMapOfConstructs(map) { + return start; + function start(code) { + const def = code !== null && map[code]; + const all2 = code !== null && map.null; + const list2 = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...Array.isArray(def) ? def : def ? [def] : [], + ...Array.isArray(all2) ? all2 : all2 ? [all2] : [] + ]; + return handleListOfConstructs(list2)(code); + } + } + function handleListOfConstructs(list2) { + listOfConstructs = list2; + constructIndex = 0; + if (list2.length === 0) { + return bogusState; + } + return handleConstruct(list2[constructIndex]); + } + function handleConstruct(construct) { + return start; + function start(code) { + info = store(); + currentConstruct = construct; + if (!construct.partial) { + context.currentConstruct = construct; + } + if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) { + return nok(); + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code); + } + } + function ok(code) { + onreturn(currentConstruct, info); + return returnState; + } + function nok(code) { + info.restore(); + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]); + } + return bogusState; + } + } + } + function addResult(construct, from2) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct); + } + if (construct.resolve) { + splice( + context.events, + from2, + context.events.length - from2, + construct.resolve(context.events.slice(from2), context) + ); + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context); + } + } + function store() { + const startPoint = now(); + const startPrevious = context.previous; + const startCurrentConstruct = context.currentConstruct; + const startEventsIndex = context.events.length; + const startStack = Array.from(stack); + return { + restore, + from: startEventsIndex + }; + function restore() { + point2 = startPoint; + context.previous = startPrevious; + context.currentConstruct = startCurrentConstruct; + context.events.length = startEventsIndex; + stack = startStack; + accountForPotentialSkip(); + } + } + function accountForPotentialSkip() { + if (point2.line in columnStart && point2.column < 2) { + point2.column = columnStart[point2.line]; + point2.offset += columnStart[point2.line] - 1; + } + } +} +function sliceChunks(chunks, token) { + const startIndex = token.start._index; + const startBufferIndex = token.start._bufferIndex; + const endIndex = token.end._index; + const endBufferIndex = token.end._bufferIndex; + let view; + if (startIndex === endIndex) { + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]; + } else { + view = chunks.slice(startIndex, endIndex); + if (startBufferIndex > -1) { + view[0] = view[0].slice(startBufferIndex); + } + if (endBufferIndex > 0) { + view.push(chunks[endIndex].slice(0, endBufferIndex)); + } + } + return view; +} +function serializeChunks(chunks, expandTabs) { + let index2 = -1; + const result = []; + let atTab; + while (++index2 < chunks.length) { + const chunk = chunks[index2]; + let value; + if (typeof chunk === "string") { + value = chunk; + } else + switch (chunk) { + case -5: { + value = "\r"; + break; + } + case -4: { + value = "\n"; + break; + } + case -3: { + value = "\r\n"; + break; + } + case -2: { + value = expandTabs ? " " : " "; + break; + } + case -1: { + if (!expandTabs && atTab) + continue; + value = " "; + break; + } + default: { + value = String.fromCharCode(chunk); + } + } + atTab = chunk === -2; + result.push(value); + } + return result.join(""); +} +const document$1 = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +}; +const contentInitial = { + [91]: definition +}; +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +}; +const flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +}; +const string = { + [38]: characterReference, + [92]: characterEscape +}; +const text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +}; +const insideSpan = { + null: [attention, resolver] +}; +const attentionMarkers = { + null: [42, 95] +}; +const disable = { + null: [] +}; +const defaultConstructs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + attentionMarkers, + contentInitial, + disable, + document: document$1, + flow, + flowInitial, + insideSpan, + string, + text +}, Symbol.toStringTag, { value: "Module" })); +function parse(options = {}) { + const constructs2 = combineExtensions( + // @ts-expect-error Same as above. + [defaultConstructs].concat(options.extensions || []) + ); + const parser = { + defined: [], + lazy: {}, + constructs: constructs2, + content: create(content$1), + document: create(document$2), + flow: create(flow$1), + string: create(string$1), + text: create(text$1) + }; + return parser; + function create(initial) { + return creator; + function creator(from) { + return createTokenizer(parser, initial, from); + } + } +} +const search = /[\0\t\n\r]/g; +function preprocess() { + let column = 1; + let buffer = ""; + let start = true; + let atCarriageReturn; + return preprocessor; + function preprocessor(value, encoding, end) { + const chunks = []; + let match; + let next; + let startPosition; + let endPosition; + let code; + value = buffer + value.toString(encoding); + startPosition = 0; + buffer = ""; + if (start) { + if (value.charCodeAt(0) === 65279) { + startPosition++; + } + start = void 0; + } + while (startPosition < value.length) { + search.lastIndex = startPosition; + match = search.exec(value); + endPosition = match && match.index !== void 0 ? match.index : value.length; + code = value.charCodeAt(endPosition); + if (!match) { + buffer = value.slice(startPosition); + break; + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3); + atCarriageReturn = void 0; + } else { + if (atCarriageReturn) { + chunks.push(-5); + atCarriageReturn = void 0; + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)); + column += endPosition - startPosition; + } + switch (code) { + case 0: { + chunks.push(65533); + column++; + break; + } + case 9: { + next = Math.ceil(column / 4) * 4; + chunks.push(-2); + while (column++ < next) + chunks.push(-1); + break; + } + case 10: { + chunks.push(-4); + column = 1; + break; + } + default: { + atCarriageReturn = true; + column = 1; + } + } + } + startPosition = endPosition + 1; + } + if (end) { + if (atCarriageReturn) + chunks.push(-5); + if (buffer) + chunks.push(buffer); + chunks.push(null); + } + return chunks; + } +} +function postprocess(events) { + while (!subtokenize(events)) { + } + return events; +} +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base); + if ( + // C0 except for HT, LF, FF, CR, space + code < 9 || code === 11 || code > 13 && code < 32 || // Control character (DEL) of the basic block and C1 controls. + code > 126 && code < 160 || // Lone high surrogates and low surrogates. + code > 55295 && code < 57344 || // Noncharacters. + code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || // Out of range + code > 1114111 + ) { + return "�"; + } + return String.fromCharCode(code); +} +const characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode); +} +function decode($0, $1, $2) { + if ($1) { + return $1; + } + const head = $2.charCodeAt(0); + if (head === 35) { + const head2 = $2.charCodeAt(1); + const hex = head2 === 120 || head2 === 88; + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10); + } + return decodeNamedCharacterReference($2) || $0; +} +function stringifyPosition(value) { + if (!value || typeof value !== "object") { + return ""; + } + if ("position" in value || "type" in value) { + return position(value.position); + } + if ("start" in value || "end" in value) { + return position(value); + } + if ("line" in value || "column" in value) { + return point$1(value); + } + return ""; +} +function point$1(point2) { + return index(point2 && point2.line) + ":" + index(point2 && point2.column); +} +function position(pos) { + return point$1(pos && pos.start) + "-" + point$1(pos && pos.end); +} +function index(value) { + return value && typeof value === "number" ? value : 1; +} +const own = {}.hasOwnProperty; +const fromMarkdown = ( + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function(value, encoding, options) { + if (typeof encoding !== "string") { + options = encoding; + encoding = void 0; + } + return compiler(options)( + postprocess( + // @ts-expect-error: micromark types need to accept `null`. + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ); + } +); +function compiler(options) { + const config = { + transforms: [], + canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote2), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText2, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition2), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list2, onenterlistordered), + listUnordered: opener(list2), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak2) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + }; + configure(config, (options || {}).mdastExtensions || []); + const data = {}; + return compile; + function compile(events) { + let tree = { + type: "root", + children: [] + }; + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit: exit2, + buffer, + resume, + setData, + getData + }; + const listStack = []; + let index2 = -1; + while (++index2 < events.length) { + if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") { + if (events[index2][0] === "enter") { + listStack.push(index2); + } else { + const tail = listStack.pop(); + index2 = prepareList(events, tail, index2); + } + } + } + index2 = -1; + while (++index2 < events.length) { + const handler = config[events[index2][0]]; + if (own.call(handler, events[index2][1].type)) { + handler[events[index2][1].type].call( + Object.assign( + { + sliceSerialize: events[index2][2].sliceSerialize + }, + context + ), + events[index2][1] + ); + } + } + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1]; + const handler = tail[1] || defaultOnError; + handler.call(context, void 0, tail[0]); + } + tree.position = { + start: point( + events.length > 0 ? events[0][1].start : { + line: 1, + column: 1, + offset: 0 + } + ), + end: point( + events.length > 0 ? events[events.length - 2][1].end : { + line: 1, + column: 1, + offset: 0 + } + ) + }; + index2 = -1; + while (++index2 < config.transforms.length) { + tree = config.transforms[index2](tree) || tree; + } + return tree; + } + function prepareList(events, start, length) { + let index2 = start - 1; + let containerBalance = -1; + let listSpread = false; + let listItem2; + let lineIndex; + let firstBlankLineIndex; + let atMarker; + while (++index2 <= length) { + const event = events[index2]; + if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") { + if (event[0] === "enter") { + containerBalance++; + } else { + containerBalance--; + } + atMarker = void 0; + } else if (event[1].type === "lineEndingBlank") { + if (event[0] === "enter") { + if (listItem2 && !atMarker && !containerBalance && !firstBlankLineIndex) { + firstBlankLineIndex = index2; + } + atMarker = void 0; + } + } else if (event[1].type === "linePrefix" || event[1].type === "listItemValue" || event[1].type === "listItemMarker" || event[1].type === "listItemPrefix" || event[1].type === "listItemPrefixWhitespace") + ; + else { + atMarker = void 0; + } + if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) { + if (listItem2) { + let tailIndex = index2; + lineIndex = void 0; + while (tailIndex--) { + const tailEvent = events[tailIndex]; + if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") { + if (tailEvent[0] === "exit") + continue; + if (lineIndex) { + events[lineIndex][1].type = "lineEndingBlank"; + listSpread = true; + } + tailEvent[1].type = "lineEnding"; + lineIndex = tailIndex; + } else if (tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent") + ; + else { + break; + } + } + if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) { + listItem2._spread = true; + } + listItem2.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ); + events.splice(lineIndex || index2, 0, ["exit", listItem2, event[2]]); + index2++; + length++; + } + if (event[1].type === "listItemPrefix") { + listItem2 = { + type: "listItem", + // @ts-expect-error Patched + _spread: false, + start: Object.assign({}, event[1].start) + }; + events.splice(index2, 0, ["enter", listItem2, event[2]]); + index2++; + length++; + firstBlankLineIndex = void 0; + atMarker = true; + } + } + } + events[start][1]._spread = listSpread; + return length; + } + function setData(key, value) { + data[key] = value; + } + function getData(key) { + return data[key]; + } + function opener(create, and) { + return open; + function open(token) { + enter.call(this, create(token), token); + if (and) + and.call(this, token); + } + } + function buffer() { + this.stack.push({ + type: "fragment", + children: [] + }); + } + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1]; + parent.children.push(node); + this.stack.push(node); + this.tokenStack.push([token, errorHandler]); + node.position = { + start: point(token.start) + }; + return node; + } + function closer(and) { + return close; + function close(token) { + if (and) + and.call(this, token); + exit2.call(this, token); + } + } + function exit2(token, onExitError) { + const node = this.stack.pop(); + const open = this.tokenStack.pop(); + if (!open) { + throw new Error( + "Cannot close `" + token.type + "` (" + stringifyPosition({ + start: token.start, + end: token.end + }) + "): it’s not open" + ); + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]); + } else { + const handler = open[1] || defaultOnError; + handler.call(this, token, open[0]); + } + } + node.position.end = point(token.end); + return node; + } + function resume() { + return toString(this.stack.pop()); + } + function onenterlistordered() { + setData("expectingFirstListItemValue", true); + } + function onenterlistitemvalue(token) { + if (getData("expectingFirstListItemValue")) { + const ancestor = this.stack[this.stack.length - 2]; + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10); + setData("expectingFirstListItemValue"); + } + } + function onexitcodefencedfenceinfo() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.lang = data2; + } + function onexitcodefencedfencemeta() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.meta = data2; + } + function onexitcodefencedfence() { + if (getData("flowCodeInside")) + return; + this.buffer(); + setData("flowCodeInside", true); + } + function onexitcodefenced() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.value = data2.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""); + setData("flowCodeInside"); + } + function onexitcodeindented() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.value = data2.replace(/(\r?\n|\r)$/g, ""); + } + function onexitdefinitionlabelstring(token) { + const label = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.label = label; + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase(); + } + function onexitdefinitiontitlestring() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.title = data2; + } + function onexitdefinitiondestinationstring() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.url = data2; + } + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1]; + if (!node.depth) { + const depth = this.sliceSerialize(token).length; + node.depth = depth; + } + } + function onexitsetextheadingtext() { + setData("setextHeadingSlurpLineEnding", true); + } + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1]; + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2; + } + function onexitsetextheading() { + setData("setextHeadingSlurpLineEnding"); + } + function onenterdata(token) { + const node = this.stack[this.stack.length - 1]; + let tail = node.children[node.children.length - 1]; + if (!tail || tail.type !== "text") { + tail = text2(); + tail.position = { + start: point(token.start) + }; + node.children.push(tail); + } + this.stack.push(tail); + } + function onexitdata(token) { + const tail = this.stack.pop(); + tail.value += this.sliceSerialize(token); + tail.position.end = point(token.end); + } + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1]; + if (getData("atHardBreak")) { + const tail = context.children[context.children.length - 1]; + tail.position.end = point(token.end); + setData("atHardBreak"); + return; + } + if (!getData("setextHeadingSlurpLineEnding") && config.canContainEols.includes(context.type)) { + onenterdata.call(this, token); + onexitdata.call(this, token); + } + } + function onexithardbreak() { + setData("atHardBreak", true); + } + function onexithtmlflow() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.value = data2; + } + function onexithtmltext() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.value = data2; + } + function onexitcodetext() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.value = data2; + } + function onexitlink() { + const node = this.stack[this.stack.length - 1]; + if (getData("inReference")) { + const referenceType = getData("referenceType") || "shortcut"; + node.type += "Reference"; + node.referenceType = referenceType; + delete node.url; + delete node.title; + } else { + delete node.identifier; + delete node.label; + } + setData("referenceType"); + } + function onexitimage() { + const node = this.stack[this.stack.length - 1]; + if (getData("inReference")) { + const referenceType = getData("referenceType") || "shortcut"; + node.type += "Reference"; + node.referenceType = referenceType; + delete node.url; + delete node.title; + } else { + delete node.identifier; + delete node.label; + } + setData("referenceType"); + } + function onexitlabeltext(token) { + const string2 = this.sliceSerialize(token); + const ancestor = this.stack[this.stack.length - 2]; + ancestor.label = decodeString(string2); + ancestor.identifier = normalizeIdentifier(string2).toLowerCase(); + } + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1]; + const value = this.resume(); + const node = this.stack[this.stack.length - 1]; + setData("inReference", true); + if (node.type === "link") { + const children = fragment.children; + node.children = children; + } else { + node.alt = value; + } + } + function onexitresourcedestinationstring() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.url = data2; + } + function onexitresourcetitlestring() { + const data2 = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.title = data2; + } + function onexitresource() { + setData("inReference"); + } + function onenterreference() { + setData("referenceType", "collapsed"); + } + function onexitreferencestring(token) { + const label = this.resume(); + const node = this.stack[this.stack.length - 1]; + node.label = label; + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase(); + setData("referenceType", "full"); + } + function onexitcharacterreferencemarker(token) { + setData("characterReferenceType", token.type); + } + function onexitcharacterreferencevalue(token) { + const data2 = this.sliceSerialize(token); + const type = getData("characterReferenceType"); + let value; + if (type) { + value = decodeNumericCharacterReference( + data2, + type === "characterReferenceMarkerNumeric" ? 10 : 16 + ); + setData("characterReferenceType"); + } else { + const result = decodeNamedCharacterReference(data2); + value = result; + } + const tail = this.stack.pop(); + tail.value += value; + tail.position.end = point(token.end); + } + function onexitautolinkprotocol(token) { + onexitdata.call(this, token); + const node = this.stack[this.stack.length - 1]; + node.url = this.sliceSerialize(token); + } + function onexitautolinkemail(token) { + onexitdata.call(this, token); + const node = this.stack[this.stack.length - 1]; + node.url = "mailto:" + this.sliceSerialize(token); + } + function blockQuote2() { + return { + type: "blockquote", + children: [] + }; + } + function codeFlow() { + return { + type: "code", + lang: null, + meta: null, + value: "" + }; + } + function codeText2() { + return { + type: "inlineCode", + value: "" + }; + } + function definition2() { + return { + type: "definition", + identifier: "", + label: null, + title: null, + url: "" + }; + } + function emphasis() { + return { + type: "emphasis", + children: [] + }; + } + function heading() { + return { + type: "heading", + depth: void 0, + children: [] + }; + } + function hardBreak() { + return { + type: "break" + }; + } + function html() { + return { + type: "html", + value: "" + }; + } + function image() { + return { + type: "image", + title: null, + url: "", + alt: null + }; + } + function link() { + return { + type: "link", + title: null, + url: "", + children: [] + }; + } + function list2(token) { + return { + type: "list", + ordered: token.type === "listOrdered", + start: null, + // @ts-expect-error Patched. + spread: token._spread, + children: [] + }; + } + function listItem(token) { + return { + type: "listItem", + // @ts-expect-error Patched. + spread: token._spread, + checked: null, + children: [] + }; + } + function paragraph() { + return { + type: "paragraph", + children: [] + }; + } + function strong() { + return { + type: "strong", + children: [] + }; + } + function text2() { + return { + type: "text", + value: "" + }; + } + function thematicBreak2() { + return { + type: "thematicBreak" + }; + } +} +function point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + }; +} +function configure(combined, extensions) { + let index2 = -1; + while (++index2 < extensions.length) { + const value = extensions[index2]; + if (Array.isArray(value)) { + configure(combined, value); + } else { + extension(combined, value); + } + } +} +function extension(combined, extension2) { + let key; + for (key in extension2) { + if (own.call(extension2, key)) { + if (key === "canContainEols") { + const right = extension2[key]; + if (right) { + combined[key].push(...right); + } + } else if (key === "transforms") { + const right = extension2[key]; + if (right) { + combined[key].push(...right); + } + } else if (key === "enter" || key === "exit") { + const right = extension2[key]; + if (right) { + Object.assign(combined[key], right); + } + } + } + } +} +function defaultOnError(left, right) { + if (left) { + throw new Error( + "Cannot close `" + left.type + "` (" + stringifyPosition({ + start: left.start, + end: left.end + }) + "): a different token (`" + right.type + "`, " + stringifyPosition({ + start: right.start, + end: right.end + }) + ") is open" + ); + } else { + throw new Error( + "Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({ + start: right.start, + end: right.end + }) + ") is still open" + ); + } +} +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = dedent(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index2) => { + if (index2 !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "
"); + } else if (node.type === "strong") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "emphasis") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "paragraph") { + return `

${node.children.map(output).join("")}

`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text2) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text2)].map((s) => s.segment); + } + return [...text2]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content: content2 }) => content2.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element2, node, width, classes, addBackground = false) { + const fo = element2.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + " + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index2) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index2 === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text2 = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + log.info("createText", text2, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText2 = markdownToHTML(text2); + const node = { + isNode, + label: decodeEntities(htmlText2).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text2); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; +export { + createText as c +}; diff --git a/webroot/js/node_modules/mermaid/dist/createText-4be7776a.js b/webroot/js/node_modules/mermaid/dist/createText-4be7776a.js new file mode 100644 index 0000000..1a2479c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/createText-4be7776a.js @@ -0,0 +1,2845 @@ +import { b6 as At, l as zt, aR as It } from "./mermaid-e4a58915.js"; +function Tt(n, r) { + var { includeImageAlt: t = !0 } = r || {}; + return nt(n, t); +} +function nt(n, r) { + return n && typeof n == "object" && // @ts-ignore looks like a literal. + (n.value || // @ts-ignore looks like an image. + (r ? n.alt : "") || // @ts-ignore looks like a parent. + "children" in n && Hn(n.children, r) || Array.isArray(n) && Hn(n, r)) || ""; +} +function Hn(n, r) { + for (var t = [], e = -1; ++e < n.length; ) + t[e] = nt(n[e], r); + return t.join(""); +} +function en(n, r, t, e) { + const u = n.length; + let l = 0, i; + if (r < 0 ? r = -r > u ? 0 : u + r : r = r > u ? u : r, t = t > 0 ? t : 0, e.length < 1e4) + i = Array.from(e), i.unshift(r, t), [].splice.apply(n, i); + else + for (t && [].splice.apply(n, [r, t]); l < e.length; ) + i = e.slice(l, l + 1e4), i.unshift(r, 0), [].splice.apply(n, i), l += 1e4, r += 1e4; +} +function Z(n, r) { + return n.length > 0 ? (en(n, n.length, 0, r), n) : r; +} +const Nn = {}.hasOwnProperty; +function Bt(n) { + const r = {}; + let t = -1; + for (; ++t < n.length; ) + Lt(r, n[t]); + return r; +} +function Lt(n, r) { + let t; + for (t in r) { + const u = (Nn.call(n, t) ? n[t] : void 0) || (n[t] = {}), l = r[t]; + let i; + for (i in l) { + Nn.call(u, i) || (u[i] = []); + const a = l[i]; + Ot( + // @ts-expect-error Looks like a list. + u[i], + Array.isArray(a) ? a : a ? [a] : [] + ); + } + } +} +function Ot(n, r) { + let t = -1; + const e = []; + for (; ++t < r.length; ) + (r[t].add === "after" ? n : e).push(r[t]); + en(n, 0, 0, e); +} +const Dt = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, tn = sn(/[A-Za-z]/), An = sn(/\d/), Pt = sn(/[\dA-Fa-f]/), v = sn(/[\dA-Za-z]/), _t = sn(/[!-/:-@[-`{-~]/), Vn = sn(/[#-'*+\--9=?A-Z^-~]/); +function zn(n) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + n !== null && (n < 32 || n === 127) + ); +} +function Y(n) { + return n !== null && (n < 0 || n === 32); +} +function C(n) { + return n !== null && n < -2; +} +function q(n) { + return n === -2 || n === -1 || n === 32; +} +const Mt = sn(/\s/), Rt = sn(Dt); +function sn(n) { + return r; + function r(t) { + return t !== null && n.test(String.fromCharCode(t)); + } +} +function T(n, r, t, e) { + const u = e ? e - 1 : Number.POSITIVE_INFINITY; + let l = 0; + return i; + function i(c) { + return q(c) ? (n.enter(t), a(c)) : r(c); + } + function a(c) { + return q(c) && l++ < u ? (n.consume(c), a) : (n.exit(t), r(c)); + } +} +const jt = { + tokenize: qt +}; +function qt(n) { + const r = n.attempt( + this.parser.constructs.contentInitial, + e, + u + ); + let t; + return r; + function e(a) { + if (a === null) { + n.consume(a); + return; + } + return n.enter("lineEnding"), n.consume(a), n.exit("lineEnding"), T(n, r, "linePrefix"); + } + function u(a) { + return n.enter("paragraph"), l(a); + } + function l(a) { + const c = n.enter("chunkText", { + contentType: "text", + previous: t + }); + return t && (t.next = c), t = c, i(a); + } + function i(a) { + if (a === null) { + n.exit("chunkText"), n.exit("paragraph"), n.consume(a); + return; + } + return C(a) ? (n.consume(a), n.exit("chunkText"), l) : (n.consume(a), i); + } +} +const Ht = { + tokenize: Nt +}, Wn = { + tokenize: Vt +}; +function Nt(n) { + const r = this, t = []; + let e = 0, u, l, i; + return a; + function a(F) { + if (e < t.length) { + const L = t[e]; + return r.containerState = L[1], n.attempt( + L[0].continuation, + c, + p + )(F); + } + return p(F); + } + function c(F) { + if (e++, r.containerState._closeFlow) { + r.containerState._closeFlow = void 0, u && _(); + const L = r.events.length; + let O = L, d; + for (; O--; ) + if (r.events[O][0] === "exit" && r.events[O][1].type === "chunkFlow") { + d = r.events[O][1].end; + break; + } + y(e); + let P = L; + for (; P < r.events.length; ) + r.events[P][1].end = Object.assign({}, d), P++; + return en( + r.events, + O + 1, + 0, + r.events.slice(L) + ), r.events.length = P, p(F); + } + return a(F); + } + function p(F) { + if (e === t.length) { + if (!u) + return g(F); + if (u.currentConstruct && u.currentConstruct.concrete) + return k(F); + r.interrupt = !!(u.currentConstruct && !u._gfmTableDynamicInterruptHack); + } + return r.containerState = {}, n.check( + Wn, + h, + x + )(F); + } + function h(F) { + return u && _(), y(e), g(F); + } + function x(F) { + return r.parser.lazy[r.now().line] = e !== t.length, i = r.now().offset, k(F); + } + function g(F) { + return r.containerState = {}, n.attempt( + Wn, + f, + k + )(F); + } + function f(F) { + return e++, t.push([r.currentConstruct, r.containerState]), g(F); + } + function k(F) { + if (F === null) { + u && _(), y(0), n.consume(F); + return; + } + return u = u || r.parser.flow(r.now()), n.enter("chunkFlow", { + contentType: "flow", + previous: l, + _tokenizer: u + }), B(F); + } + function B(F) { + if (F === null) { + D(n.exit("chunkFlow"), !0), y(0), n.consume(F); + return; + } + return C(F) ? (n.consume(F), D(n.exit("chunkFlow")), e = 0, r.interrupt = void 0, a) : (n.consume(F), B); + } + function D(F, L) { + const O = r.sliceStream(F); + if (L && O.push(null), F.previous = l, l && (l.next = F), l = F, u.defineSkip(F.start), u.write(O), r.parser.lazy[F.start.line]) { + let d = u.events.length; + for (; d--; ) + if ( + // The token starts before the line ending… + u.events[d][1].start.offset < i && // …and either is not ended yet… + (!u.events[d][1].end || // …or ends after it. + u.events[d][1].end.offset > i) + ) + return; + const P = r.events.length; + let R = P, j, V; + for (; R--; ) + if (r.events[R][0] === "exit" && r.events[R][1].type === "chunkFlow") { + if (j) { + V = r.events[R][1].end; + break; + } + j = !0; + } + for (y(e), d = P; d < r.events.length; ) + r.events[d][1].end = Object.assign({}, V), d++; + en( + r.events, + R + 1, + 0, + r.events.slice(P) + ), r.events.length = d; + } + } + function y(F) { + let L = t.length; + for (; L-- > F; ) { + const O = t[L]; + r.containerState = O[1], O[0].exit.call(r, n); + } + t.length = F; + } + function _() { + u.write([null]), l = void 0, u = void 0, r.containerState._closeFlow = void 0; + } +} +function Vt(n, r, t) { + return T( + n, + n.attempt(this.parser.constructs.document, r, t), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); +} +function Qn(n) { + if (n === null || Y(n) || Mt(n)) + return 1; + if (Rt(n)) + return 2; +} +function Ln(n, r, t) { + const e = []; + let u = -1; + for (; ++u < n.length; ) { + const l = n[u].resolveAll; + l && !e.includes(l) && (r = l(r, t), e.push(l)); + } + return r; +} +const In = { + name: "attention", + tokenize: Qt, + resolveAll: Wt +}; +function Wt(n, r) { + let t = -1, e, u, l, i, a, c, p, h; + for (; ++t < n.length; ) + if (n[t][0] === "enter" && n[t][1].type === "attentionSequence" && n[t][1]._close) { + for (e = t; e--; ) + if (n[e][0] === "exit" && n[e][1].type === "attentionSequence" && n[e][1]._open && // If the markers are the same: + r.sliceSerialize(n[e][1]).charCodeAt(0) === r.sliceSerialize(n[t][1]).charCodeAt(0)) { + if ((n[e][1]._close || n[t][1]._open) && (n[t][1].end.offset - n[t][1].start.offset) % 3 && !((n[e][1].end.offset - n[e][1].start.offset + n[t][1].end.offset - n[t][1].start.offset) % 3)) + continue; + c = n[e][1].end.offset - n[e][1].start.offset > 1 && n[t][1].end.offset - n[t][1].start.offset > 1 ? 2 : 1; + const x = Object.assign({}, n[e][1].end), g = Object.assign({}, n[t][1].start); + Un(x, -c), Un(g, c), i = { + type: c > 1 ? "strongSequence" : "emphasisSequence", + start: x, + end: Object.assign({}, n[e][1].end) + }, a = { + type: c > 1 ? "strongSequence" : "emphasisSequence", + start: Object.assign({}, n[t][1].start), + end: g + }, l = { + type: c > 1 ? "strongText" : "emphasisText", + start: Object.assign({}, n[e][1].end), + end: Object.assign({}, n[t][1].start) + }, u = { + type: c > 1 ? "strong" : "emphasis", + start: Object.assign({}, i.start), + end: Object.assign({}, a.end) + }, n[e][1].end = Object.assign({}, i.start), n[t][1].start = Object.assign({}, a.end), p = [], n[e][1].end.offset - n[e][1].start.offset && (p = Z(p, [ + ["enter", n[e][1], r], + ["exit", n[e][1], r] + ])), p = Z(p, [ + ["enter", u, r], + ["enter", i, r], + ["exit", i, r], + ["enter", l, r] + ]), p = Z( + p, + Ln( + r.parser.constructs.insideSpan.null, + n.slice(e + 1, t), + r + ) + ), p = Z(p, [ + ["exit", l, r], + ["enter", a, r], + ["exit", a, r], + ["exit", u, r] + ]), n[t][1].end.offset - n[t][1].start.offset ? (h = 2, p = Z(p, [ + ["enter", n[t][1], r], + ["exit", n[t][1], r] + ])) : h = 0, en(n, e - 1, t - e + 3, p), t = e + p.length - h - 2; + break; + } + } + for (t = -1; ++t < n.length; ) + n[t][1].type === "attentionSequence" && (n[t][1].type = "data"); + return n; +} +function Qt(n, r) { + const t = this.parser.constructs.attentionMarkers.null, e = this.previous, u = Qn(e); + let l; + return i; + function i(c) { + return n.enter("attentionSequence"), l = c, a(c); + } + function a(c) { + if (c === l) + return n.consume(c), a; + const p = n.exit("attentionSequence"), h = Qn(c), x = !h || h === 2 && u || t.includes(c), g = !u || u === 2 && h || t.includes(e); + return p._open = !!(l === 42 ? x : x && (u || !g)), p._close = !!(l === 42 ? g : g && (h || !x)), r(c); + } +} +function Un(n, r) { + n.column += r, n.offset += r, n._bufferIndex += r; +} +const Ut = { + name: "autolink", + tokenize: $t +}; +function $t(n, r, t) { + let e = 1; + return u; + function u(k) { + return n.enter("autolink"), n.enter("autolinkMarker"), n.consume(k), n.exit("autolinkMarker"), n.enter("autolinkProtocol"), l; + } + function l(k) { + return tn(k) ? (n.consume(k), i) : Vn(k) ? p(k) : t(k); + } + function i(k) { + return k === 43 || k === 45 || k === 46 || v(k) ? a(k) : p(k); + } + function a(k) { + return k === 58 ? (n.consume(k), c) : (k === 43 || k === 45 || k === 46 || v(k)) && e++ < 32 ? (n.consume(k), a) : p(k); + } + function c(k) { + return k === 62 ? (n.exit("autolinkProtocol"), f(k)) : k === null || k === 32 || k === 60 || zn(k) ? t(k) : (n.consume(k), c); + } + function p(k) { + return k === 64 ? (n.consume(k), e = 0, h) : Vn(k) ? (n.consume(k), p) : t(k); + } + function h(k) { + return v(k) ? x(k) : t(k); + } + function x(k) { + return k === 46 ? (n.consume(k), e = 0, h) : k === 62 ? (n.exit("autolinkProtocol").type = "autolinkEmail", f(k)) : g(k); + } + function g(k) { + return (k === 45 || v(k)) && e++ < 63 ? (n.consume(k), k === 45 ? g : x) : t(k); + } + function f(k) { + return n.enter("autolinkMarker"), n.consume(k), n.exit("autolinkMarker"), n.exit("autolink"), r; + } +} +const Sn = { + tokenize: Zt, + partial: !0 +}; +function Zt(n, r, t) { + return T(n, e, "linePrefix"); + function e(u) { + return u === null || C(u) ? r(u) : t(u); + } +} +const tt = { + name: "blockQuote", + tokenize: Yt, + continuation: { + tokenize: Gt + }, + exit: Jt +}; +function Yt(n, r, t) { + const e = this; + return u; + function u(i) { + if (i === 62) { + const a = e.containerState; + return a.open || (n.enter("blockQuote", { + _container: !0 + }), a.open = !0), n.enter("blockQuotePrefix"), n.enter("blockQuoteMarker"), n.consume(i), n.exit("blockQuoteMarker"), l; + } + return t(i); + } + function l(i) { + return q(i) ? (n.enter("blockQuotePrefixWhitespace"), n.consume(i), n.exit("blockQuotePrefixWhitespace"), n.exit("blockQuotePrefix"), r) : (n.exit("blockQuotePrefix"), r(i)); + } +} +function Gt(n, r, t) { + return T( + n, + n.attempt(tt, r, t), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); +} +function Jt(n) { + n.exit("blockQuote"); +} +const et = { + name: "characterEscape", + tokenize: Kt +}; +function Kt(n, r, t) { + return e; + function e(l) { + return n.enter("characterEscape"), n.enter("escapeMarker"), n.consume(l), n.exit("escapeMarker"), u; + } + function u(l) { + return _t(l) ? (n.enter("characterEscapeValue"), n.consume(l), n.exit("characterEscapeValue"), n.exit("characterEscape"), r) : t(l); + } +} +const $n = document.createElement("i"); +function On(n) { + const r = "&" + n + ";"; + $n.innerHTML = r; + const t = $n.textContent; + return t.charCodeAt(t.length - 1) === 59 && n !== "semi" || t === r ? !1 : t; +} +const rt = { + name: "characterReference", + tokenize: Xt +}; +function Xt(n, r, t) { + const e = this; + let u = 0, l, i; + return a; + function a(x) { + return n.enter("characterReference"), n.enter("characterReferenceMarker"), n.consume(x), n.exit("characterReferenceMarker"), c; + } + function c(x) { + return x === 35 ? (n.enter("characterReferenceMarkerNumeric"), n.consume(x), n.exit("characterReferenceMarkerNumeric"), p) : (n.enter("characterReferenceValue"), l = 31, i = v, h(x)); + } + function p(x) { + return x === 88 || x === 120 ? (n.enter("characterReferenceMarkerHexadecimal"), n.consume(x), n.exit("characterReferenceMarkerHexadecimal"), n.enter("characterReferenceValue"), l = 6, i = Pt, h) : (n.enter("characterReferenceValue"), l = 7, i = An, h(x)); + } + function h(x) { + let g; + return x === 59 && u ? (g = n.exit("characterReferenceValue"), i === v && !On(e.sliceSerialize(g)) ? t(x) : (n.enter("characterReferenceMarker"), n.consume(x), n.exit("characterReferenceMarker"), n.exit("characterReference"), r)) : i(x) && u++ < l ? (n.consume(x), h) : t(x); + } +} +const Zn = { + name: "codeFenced", + tokenize: vt, + concrete: !0 +}; +function vt(n, r, t) { + const e = this, u = { + tokenize: O, + partial: !0 + }, l = { + tokenize: L, + partial: !0 + }, i = this.events[this.events.length - 1], a = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0; + let c = 0, p; + return h; + function h(d) { + return n.enter("codeFenced"), n.enter("codeFencedFence"), n.enter("codeFencedFenceSequence"), p = d, x(d); + } + function x(d) { + return d === p ? (n.consume(d), c++, x) : (n.exit("codeFencedFenceSequence"), c < 3 ? t(d) : T(n, g, "whitespace")(d)); + } + function g(d) { + return d === null || C(d) ? D(d) : (n.enter("codeFencedFenceInfo"), n.enter("chunkString", { + contentType: "string" + }), f(d)); + } + function f(d) { + return d === null || Y(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), T(n, k, "whitespace")(d)) : d === 96 && d === p ? t(d) : (n.consume(d), f); + } + function k(d) { + return d === null || C(d) ? D(d) : (n.enter("codeFencedFenceMeta"), n.enter("chunkString", { + contentType: "string" + }), B(d)); + } + function B(d) { + return d === null || C(d) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"), D(d)) : d === 96 && d === p ? t(d) : (n.consume(d), B); + } + function D(d) { + return n.exit("codeFencedFence"), e.interrupt ? r(d) : y(d); + } + function y(d) { + return d === null ? F(d) : C(d) ? n.attempt( + l, + n.attempt( + u, + F, + a ? T( + n, + y, + "linePrefix", + a + 1 + ) : y + ), + F + )(d) : (n.enter("codeFlowValue"), _(d)); + } + function _(d) { + return d === null || C(d) ? (n.exit("codeFlowValue"), y(d)) : (n.consume(d), _); + } + function F(d) { + return n.exit("codeFenced"), r(d); + } + function L(d, P, R) { + const j = this; + return V; + function V(E) { + return d.enter("lineEnding"), d.consume(E), d.exit("lineEnding"), S; + } + function S(E) { + return j.parser.lazy[j.now().line] ? R(E) : P(E); + } + } + function O(d, P, R) { + let j = 0; + return T( + d, + V, + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + function V(A) { + return d.enter("codeFencedFence"), d.enter("codeFencedFenceSequence"), S(A); + } + function S(A) { + return A === p ? (d.consume(A), j++, S) : j < c ? R(A) : (d.exit("codeFencedFenceSequence"), T(d, E, "whitespace")(A)); + } + function E(A) { + return A === null || C(A) ? (d.exit("codeFencedFence"), P(A)) : R(A); + } + } +} +const wn = { + name: "codeIndented", + tokenize: te +}, ne = { + tokenize: ee, + partial: !0 +}; +function te(n, r, t) { + const e = this; + return u; + function u(p) { + return n.enter("codeIndented"), T(n, l, "linePrefix", 4 + 1)(p); + } + function l(p) { + const h = e.events[e.events.length - 1]; + return h && h[1].type === "linePrefix" && h[2].sliceSerialize(h[1], !0).length >= 4 ? i(p) : t(p); + } + function i(p) { + return p === null ? c(p) : C(p) ? n.attempt(ne, i, c)(p) : (n.enter("codeFlowValue"), a(p)); + } + function a(p) { + return p === null || C(p) ? (n.exit("codeFlowValue"), i(p)) : (n.consume(p), a); + } + function c(p) { + return n.exit("codeIndented"), r(p); + } +} +function ee(n, r, t) { + const e = this; + return u; + function u(i) { + return e.parser.lazy[e.now().line] ? t(i) : C(i) ? (n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), u) : T(n, l, "linePrefix", 4 + 1)(i); + } + function l(i) { + const a = e.events[e.events.length - 1]; + return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(i) : C(i) ? u(i) : t(i); + } +} +const re = { + name: "codeText", + tokenize: le, + resolve: ie, + previous: ue +}; +function ie(n) { + let r = n.length - 4, t = 3, e, u; + if ((n[t][1].type === "lineEnding" || n[t][1].type === "space") && (n[r][1].type === "lineEnding" || n[r][1].type === "space")) { + for (e = t; ++e < r; ) + if (n[e][1].type === "codeTextData") { + n[t][1].type = "codeTextPadding", n[r][1].type = "codeTextPadding", t += 2, r -= 2; + break; + } + } + for (e = t - 1, r++; ++e <= r; ) + u === void 0 ? e !== r && n[e][1].type !== "lineEnding" && (u = e) : (e === r || n[e][1].type === "lineEnding") && (n[u][1].type = "codeTextData", e !== u + 2 && (n[u][1].end = n[e - 1][1].end, n.splice(u + 2, e - u - 2), r -= e - u - 2, e = u + 2), u = void 0); + return n; +} +function ue(n) { + return n !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; +} +function le(n, r, t) { + let e = 0, u, l; + return i; + function i(x) { + return n.enter("codeText"), n.enter("codeTextSequence"), a(x); + } + function a(x) { + return x === 96 ? (n.consume(x), e++, a) : (n.exit("codeTextSequence"), c(x)); + } + function c(x) { + return x === null ? t(x) : x === 96 ? (l = n.enter("codeTextSequence"), u = 0, h(x)) : x === 32 ? (n.enter("space"), n.consume(x), n.exit("space"), c) : C(x) ? (n.enter("lineEnding"), n.consume(x), n.exit("lineEnding"), c) : (n.enter("codeTextData"), p(x)); + } + function p(x) { + return x === null || x === 32 || x === 96 || C(x) ? (n.exit("codeTextData"), c(x)) : (n.consume(x), p); + } + function h(x) { + return x === 96 ? (n.consume(x), u++, h) : u === e ? (n.exit("codeTextSequence"), n.exit("codeText"), r(x)) : (l.type = "codeTextData", p(x)); + } +} +function it(n) { + const r = {}; + let t = -1, e, u, l, i, a, c, p; + for (; ++t < n.length; ) { + for (; t in r; ) + t = r[t]; + if (e = n[t], t && e[1].type === "chunkFlow" && n[t - 1][1].type === "listItemPrefix" && (c = e[1]._tokenizer.events, l = 0, l < c.length && c[l][1].type === "lineEndingBlank" && (l += 2), l < c.length && c[l][1].type === "content")) + for (; ++l < c.length && c[l][1].type !== "content"; ) + c[l][1].type === "chunkText" && (c[l][1]._isInFirstContentOfListItem = !0, l++); + if (e[0] === "enter") + e[1].contentType && (Object.assign(r, ae(n, t)), t = r[t], p = !0); + else if (e[1]._container) { + for (l = t, u = void 0; l-- && (i = n[l], i[1].type === "lineEnding" || i[1].type === "lineEndingBlank"); ) + i[0] === "enter" && (u && (n[u][1].type = "lineEndingBlank"), i[1].type = "lineEnding", u = l); + u && (e[1].end = Object.assign({}, n[u][1].start), a = n.slice(u, t), a.unshift(e), en(n, u, t - u + 1, a)); + } + } + return !p; +} +function ae(n, r) { + const t = n[r][1], e = n[r][2]; + let u = r - 1; + const l = [], i = t._tokenizer || e.parser[t.contentType](t.start), a = i.events, c = [], p = {}; + let h, x, g = -1, f = t, k = 0, B = 0; + const D = [B]; + for (; f; ) { + for (; n[++u][1] !== f; ) + ; + l.push(u), f._tokenizer || (h = e.sliceStream(f), f.next || h.push(null), x && i.defineSkip(f.start), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = !0), i.write(h), f._isInFirstContentOfListItem && (i._gfmTasklistFirstContentOfListItem = void 0)), x = f, f = f.next; + } + for (f = t; ++g < a.length; ) + // Find a void token that includes a break. + a[g][0] === "exit" && a[g - 1][0] === "enter" && a[g][1].type === a[g - 1][1].type && a[g][1].start.line !== a[g][1].end.line && (B = g + 1, D.push(B), f._tokenizer = void 0, f.previous = void 0, f = f.next); + for (i.events = [], f ? (f._tokenizer = void 0, f.previous = void 0) : D.pop(), g = D.length; g--; ) { + const y = a.slice(D[g], D[g + 1]), _ = l.pop(); + c.unshift([_, _ + y.length - 1]), en(n, _, 2, y); + } + for (g = -1; ++g < c.length; ) + p[k + c[g][0]] = k + c[g][1], k += c[g][1] - c[g][0] - 1; + return p; +} +const oe = { + tokenize: he, + resolve: ce +}, se = { + tokenize: pe, + partial: !0 +}; +function ce(n) { + return it(n), n; +} +function he(n, r) { + let t; + return e; + function e(a) { + return n.enter("content"), t = n.enter("chunkContent", { + contentType: "content" + }), u(a); + } + function u(a) { + return a === null ? l(a) : C(a) ? n.check( + se, + i, + l + )(a) : (n.consume(a), u); + } + function l(a) { + return n.exit("chunkContent"), n.exit("content"), r(a); + } + function i(a) { + return n.consume(a), n.exit("chunkContent"), t.next = n.enter("chunkContent", { + contentType: "content", + previous: t + }), t = t.next, u; + } +} +function pe(n, r, t) { + const e = this; + return u; + function u(i) { + return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), T(n, l, "linePrefix"); + } + function l(i) { + if (i === null || C(i)) + return t(i); + const a = e.events[e.events.length - 1]; + return !e.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? r(i) : n.interrupt(e.parser.constructs.flow, t, r)(i); + } +} +function ut(n, r, t, e, u, l, i, a, c) { + const p = c || Number.POSITIVE_INFINITY; + let h = 0; + return x; + function x(y) { + return y === 60 ? (n.enter(e), n.enter(u), n.enter(l), n.consume(y), n.exit(l), g) : y === null || y === 41 || zn(y) ? t(y) : (n.enter(e), n.enter(i), n.enter(a), n.enter("chunkString", { + contentType: "string" + }), B(y)); + } + function g(y) { + return y === 62 ? (n.enter(l), n.consume(y), n.exit(l), n.exit(u), n.exit(e), r) : (n.enter(a), n.enter("chunkString", { + contentType: "string" + }), f(y)); + } + function f(y) { + return y === 62 ? (n.exit("chunkString"), n.exit(a), g(y)) : y === null || y === 60 || C(y) ? t(y) : (n.consume(y), y === 92 ? k : f); + } + function k(y) { + return y === 60 || y === 62 || y === 92 ? (n.consume(y), f) : f(y); + } + function B(y) { + return y === 40 ? ++h > p ? t(y) : (n.consume(y), B) : y === 41 ? h-- ? (n.consume(y), B) : (n.exit("chunkString"), n.exit(a), n.exit(i), n.exit(e), r(y)) : y === null || Y(y) ? h ? t(y) : (n.exit("chunkString"), n.exit(a), n.exit(i), n.exit(e), r(y)) : zn(y) ? t(y) : (n.consume(y), y === 92 ? D : B); + } + function D(y) { + return y === 40 || y === 41 || y === 92 ? (n.consume(y), B) : B(y); + } +} +function lt(n, r, t, e, u, l) { + const i = this; + let a = 0, c; + return p; + function p(f) { + return n.enter(e), n.enter(u), n.consume(f), n.exit(u), n.enter(l), h; + } + function h(f) { + return f === null || f === 91 || f === 93 && !c || /* To do: remove in the future once we’ve switched from + * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + * which doesn’t need this */ + /* Hidden footnotes hook */ + /* c8 ignore next 3 */ + f === 94 && !a && "_hiddenFootnoteSupport" in i.parser.constructs || a > 999 ? t(f) : f === 93 ? (n.exit(l), n.enter(u), n.consume(f), n.exit(u), n.exit(e), r) : C(f) ? (n.enter("lineEnding"), n.consume(f), n.exit("lineEnding"), h) : (n.enter("chunkString", { + contentType: "string" + }), x(f)); + } + function x(f) { + return f === null || f === 91 || f === 93 || C(f) || a++ > 999 ? (n.exit("chunkString"), h(f)) : (n.consume(f), c = c || !q(f), f === 92 ? g : x); + } + function g(f) { + return f === 91 || f === 92 || f === 93 ? (n.consume(f), a++, x) : x(f); + } +} +function at(n, r, t, e, u, l) { + let i; + return a; + function a(g) { + return n.enter(e), n.enter(u), n.consume(g), n.exit(u), i = g === 40 ? 41 : g, c; + } + function c(g) { + return g === i ? (n.enter(u), n.consume(g), n.exit(u), n.exit(e), r) : (n.enter(l), p(g)); + } + function p(g) { + return g === i ? (n.exit(l), c(i)) : g === null ? t(g) : C(g) ? (n.enter("lineEnding"), n.consume(g), n.exit("lineEnding"), T(n, p, "linePrefix")) : (n.enter("chunkString", { + contentType: "string" + }), h(g)); + } + function h(g) { + return g === i || g === null || C(g) ? (n.exit("chunkString"), p(g)) : (n.consume(g), g === 92 ? x : h); + } + function x(g) { + return g === i || g === 92 ? (n.consume(g), h) : h(g); + } +} +function dn(n, r) { + let t; + return e; + function e(u) { + return C(u) ? (n.enter("lineEnding"), n.consume(u), n.exit("lineEnding"), t = !0, e) : q(u) ? T( + n, + e, + t ? "linePrefix" : "lineSuffix" + )(u) : r(u); + } +} +function fn(n) { + return n.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); +} +const me = { + name: "definition", + tokenize: xe +}, fe = { + tokenize: ge, + partial: !0 +}; +function xe(n, r, t) { + const e = this; + let u; + return l; + function l(c) { + return n.enter("definition"), lt.call( + e, + n, + i, + t, + "definitionLabel", + "definitionLabelMarker", + "definitionLabelString" + )(c); + } + function i(c) { + return u = fn( + e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1) + ), c === 58 ? (n.enter("definitionMarker"), n.consume(c), n.exit("definitionMarker"), dn( + n, + ut( + n, + n.attempt( + fe, + T(n, a, "whitespace"), + T(n, a, "whitespace") + ), + t, + "definitionDestination", + "definitionDestinationLiteral", + "definitionDestinationLiteralMarker", + "definitionDestinationRaw", + "definitionDestinationString" + ) + )) : t(c); + } + function a(c) { + return c === null || C(c) ? (n.exit("definition"), e.parser.defined.includes(u) || e.parser.defined.push(u), r(c)) : t(c); + } +} +function ge(n, r, t) { + return e; + function e(i) { + return Y(i) ? dn(n, u)(i) : t(i); + } + function u(i) { + return i === 34 || i === 39 || i === 40 ? at( + n, + T(n, l, "whitespace"), + t, + "definitionTitle", + "definitionTitleMarker", + "definitionTitleString" + )(i) : t(i); + } + function l(i) { + return i === null || C(i) ? r(i) : t(i); + } +} +const ke = { + name: "hardBreakEscape", + tokenize: de +}; +function de(n, r, t) { + return e; + function e(l) { + return n.enter("hardBreakEscape"), n.enter("escapeMarker"), n.consume(l), u; + } + function u(l) { + return C(l) ? (n.exit("escapeMarker"), n.exit("hardBreakEscape"), r(l)) : t(l); + } +} +const be = { + name: "headingAtx", + tokenize: Se, + resolve: ye +}; +function ye(n, r) { + let t = n.length - 2, e = 3, u, l; + return n[e][1].type === "whitespace" && (e += 2), t - 2 > e && n[t][1].type === "whitespace" && (t -= 2), n[t][1].type === "atxHeadingSequence" && (e === t - 1 || t - 4 > e && n[t - 2][1].type === "whitespace") && (t -= e + 1 === t ? 2 : 4), t > e && (u = { + type: "atxHeadingText", + start: n[e][1].start, + end: n[t][1].end + }, l = { + type: "chunkText", + start: n[e][1].start, + end: n[t][1].end, + // @ts-expect-error Constants are fine to assign. + contentType: "text" + }, en(n, e, t - e + 1, [ + ["enter", u, r], + ["enter", l, r], + ["exit", l, r], + ["exit", u, r] + ])), n; +} +function Se(n, r, t) { + const e = this; + let u = 0; + return l; + function l(h) { + return n.enter("atxHeading"), n.enter("atxHeadingSequence"), i(h); + } + function i(h) { + return h === 35 && u++ < 6 ? (n.consume(h), i) : h === null || Y(h) ? (n.exit("atxHeadingSequence"), e.interrupt ? r(h) : a(h)) : t(h); + } + function a(h) { + return h === 35 ? (n.enter("atxHeadingSequence"), c(h)) : h === null || C(h) ? (n.exit("atxHeading"), r(h)) : q(h) ? T(n, a, "whitespace")(h) : (n.enter("atxHeadingText"), p(h)); + } + function c(h) { + return h === 35 ? (n.consume(h), c) : (n.exit("atxHeadingSequence"), a(h)); + } + function p(h) { + return h === null || h === 35 || Y(h) ? (n.exit("atxHeadingText"), a(h)) : (n.consume(h), p); + } +} +const Fe = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" +], Yn = ["pre", "script", "style", "textarea"], Ee = { + name: "htmlFlow", + tokenize: Ae, + resolveTo: Ce, + concrete: !0 +}, we = { + tokenize: ze, + partial: !0 +}; +function Ce(n) { + let r = n.length; + for (; r-- && !(n[r][0] === "enter" && n[r][1].type === "htmlFlow"); ) + ; + return r > 1 && n[r - 2][1].type === "linePrefix" && (n[r][1].start = n[r - 2][1].start, n[r + 1][1].start = n[r - 2][1].start, n.splice(r - 2, 2)), n; +} +function Ae(n, r, t) { + const e = this; + let u, l, i, a, c; + return p; + function p(o) { + return n.enter("htmlFlow"), n.enter("htmlFlowData"), n.consume(o), h; + } + function h(o) { + return o === 33 ? (n.consume(o), x) : o === 47 ? (n.consume(o), k) : o === 63 ? (n.consume(o), u = 3, e.interrupt ? r : U) : tn(o) ? (n.consume(o), i = String.fromCharCode(o), l = !0, B) : t(o); + } + function x(o) { + return o === 45 ? (n.consume(o), u = 2, g) : o === 91 ? (n.consume(o), u = 5, i = "CDATA[", a = 0, f) : tn(o) ? (n.consume(o), u = 4, e.interrupt ? r : U) : t(o); + } + function g(o) { + return o === 45 ? (n.consume(o), e.interrupt ? r : U) : t(o); + } + function f(o) { + return o === i.charCodeAt(a++) ? (n.consume(o), a === i.length ? e.interrupt ? r : S : f) : t(o); + } + function k(o) { + return tn(o) ? (n.consume(o), i = String.fromCharCode(o), B) : t(o); + } + function B(o) { + return o === null || o === 47 || o === 62 || Y(o) ? o !== 47 && l && Yn.includes(i.toLowerCase()) ? (u = 1, e.interrupt ? r(o) : S(o)) : Fe.includes(i.toLowerCase()) ? (u = 6, o === 47 ? (n.consume(o), D) : e.interrupt ? r(o) : S(o)) : (u = 7, e.interrupt && !e.parser.lazy[e.now().line] ? t(o) : l ? _(o) : y(o)) : o === 45 || v(o) ? (n.consume(o), i += String.fromCharCode(o), B) : t(o); + } + function D(o) { + return o === 62 ? (n.consume(o), e.interrupt ? r : S) : t(o); + } + function y(o) { + return q(o) ? (n.consume(o), y) : j(o); + } + function _(o) { + return o === 47 ? (n.consume(o), j) : o === 58 || o === 95 || tn(o) ? (n.consume(o), F) : q(o) ? (n.consume(o), _) : j(o); + } + function F(o) { + return o === 45 || o === 46 || o === 58 || o === 95 || v(o) ? (n.consume(o), F) : L(o); + } + function L(o) { + return o === 61 ? (n.consume(o), O) : q(o) ? (n.consume(o), L) : _(o); + } + function O(o) { + return o === null || o === 60 || o === 61 || o === 62 || o === 96 ? t(o) : o === 34 || o === 39 ? (n.consume(o), c = o, d) : q(o) ? (n.consume(o), O) : (c = null, P(o)); + } + function d(o) { + return o === null || C(o) ? t(o) : o === c ? (n.consume(o), R) : (n.consume(o), d); + } + function P(o) { + return o === null || o === 34 || o === 39 || o === 60 || o === 61 || o === 62 || o === 96 || Y(o) ? L(o) : (n.consume(o), P); + } + function R(o) { + return o === 47 || o === 62 || q(o) ? _(o) : t(o); + } + function j(o) { + return o === 62 ? (n.consume(o), V) : t(o); + } + function V(o) { + return q(o) ? (n.consume(o), V) : o === null || C(o) ? S(o) : t(o); + } + function S(o) { + return o === 45 && u === 2 ? (n.consume(o), G) : o === 60 && u === 1 ? (n.consume(o), nn) : o === 62 && u === 4 ? (n.consume(o), H) : o === 63 && u === 3 ? (n.consume(o), U) : o === 93 && u === 5 ? (n.consume(o), W) : C(o) && (u === 6 || u === 7) ? n.check( + we, + H, + E + )(o) : o === null || C(o) ? E(o) : (n.consume(o), S); + } + function E(o) { + return n.exit("htmlFlowData"), A(o); + } + function A(o) { + return o === null ? s(o) : C(o) ? n.attempt( + { + tokenize: Q, + partial: !0 + }, + A, + s + )(o) : (n.enter("htmlFlowData"), S(o)); + } + function Q(o, cn, xn) { + return hn; + function hn(K) { + return o.enter("lineEnding"), o.consume(K), o.exit("lineEnding"), N; + } + function N(K) { + return e.parser.lazy[e.now().line] ? xn(K) : cn(K); + } + } + function G(o) { + return o === 45 ? (n.consume(o), U) : S(o); + } + function nn(o) { + return o === 47 ? (n.consume(o), i = "", J) : S(o); + } + function J(o) { + return o === 62 && Yn.includes(i.toLowerCase()) ? (n.consume(o), H) : tn(o) && i.length < 8 ? (n.consume(o), i += String.fromCharCode(o), J) : S(o); + } + function W(o) { + return o === 93 ? (n.consume(o), U) : S(o); + } + function U(o) { + return o === 62 ? (n.consume(o), H) : o === 45 && u === 2 ? (n.consume(o), U) : S(o); + } + function H(o) { + return o === null || C(o) ? (n.exit("htmlFlowData"), s(o)) : (n.consume(o), H); + } + function s(o) { + return n.exit("htmlFlow"), r(o); + } +} +function ze(n, r, t) { + return e; + function e(u) { + return n.exit("htmlFlowData"), n.enter("lineEndingBlank"), n.consume(u), n.exit("lineEndingBlank"), n.attempt(Sn, r, t); + } +} +const Ie = { + name: "htmlText", + tokenize: Te +}; +function Te(n, r, t) { + const e = this; + let u, l, i, a; + return c; + function c(s) { + return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(s), p; + } + function p(s) { + return s === 33 ? (n.consume(s), h) : s === 47 ? (n.consume(s), P) : s === 63 ? (n.consume(s), O) : tn(s) ? (n.consume(s), V) : t(s); + } + function h(s) { + return s === 45 ? (n.consume(s), x) : s === 91 ? (n.consume(s), l = "CDATA[", i = 0, D) : tn(s) ? (n.consume(s), L) : t(s); + } + function x(s) { + return s === 45 ? (n.consume(s), g) : t(s); + } + function g(s) { + return s === null || s === 62 ? t(s) : s === 45 ? (n.consume(s), f) : k(s); + } + function f(s) { + return s === null || s === 62 ? t(s) : k(s); + } + function k(s) { + return s === null ? t(s) : s === 45 ? (n.consume(s), B) : C(s) ? (a = k, W(s)) : (n.consume(s), k); + } + function B(s) { + return s === 45 ? (n.consume(s), H) : k(s); + } + function D(s) { + return s === l.charCodeAt(i++) ? (n.consume(s), i === l.length ? y : D) : t(s); + } + function y(s) { + return s === null ? t(s) : s === 93 ? (n.consume(s), _) : C(s) ? (a = y, W(s)) : (n.consume(s), y); + } + function _(s) { + return s === 93 ? (n.consume(s), F) : y(s); + } + function F(s) { + return s === 62 ? H(s) : s === 93 ? (n.consume(s), F) : y(s); + } + function L(s) { + return s === null || s === 62 ? H(s) : C(s) ? (a = L, W(s)) : (n.consume(s), L); + } + function O(s) { + return s === null ? t(s) : s === 63 ? (n.consume(s), d) : C(s) ? (a = O, W(s)) : (n.consume(s), O); + } + function d(s) { + return s === 62 ? H(s) : O(s); + } + function P(s) { + return tn(s) ? (n.consume(s), R) : t(s); + } + function R(s) { + return s === 45 || v(s) ? (n.consume(s), R) : j(s); + } + function j(s) { + return C(s) ? (a = j, W(s)) : q(s) ? (n.consume(s), j) : H(s); + } + function V(s) { + return s === 45 || v(s) ? (n.consume(s), V) : s === 47 || s === 62 || Y(s) ? S(s) : t(s); + } + function S(s) { + return s === 47 ? (n.consume(s), H) : s === 58 || s === 95 || tn(s) ? (n.consume(s), E) : C(s) ? (a = S, W(s)) : q(s) ? (n.consume(s), S) : H(s); + } + function E(s) { + return s === 45 || s === 46 || s === 58 || s === 95 || v(s) ? (n.consume(s), E) : A(s); + } + function A(s) { + return s === 61 ? (n.consume(s), Q) : C(s) ? (a = A, W(s)) : q(s) ? (n.consume(s), A) : S(s); + } + function Q(s) { + return s === null || s === 60 || s === 61 || s === 62 || s === 96 ? t(s) : s === 34 || s === 39 ? (n.consume(s), u = s, G) : C(s) ? (a = Q, W(s)) : q(s) ? (n.consume(s), Q) : (n.consume(s), u = void 0, J); + } + function G(s) { + return s === u ? (n.consume(s), nn) : s === null ? t(s) : C(s) ? (a = G, W(s)) : (n.consume(s), G); + } + function nn(s) { + return s === 62 || s === 47 || Y(s) ? S(s) : t(s); + } + function J(s) { + return s === null || s === 34 || s === 39 || s === 60 || s === 61 || s === 96 ? t(s) : s === 62 || Y(s) ? S(s) : (n.consume(s), J); + } + function W(s) { + return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(s), n.exit("lineEnding"), T( + n, + U, + "linePrefix", + e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + } + function U(s) { + return n.enter("htmlTextData"), a(s); + } + function H(s) { + return s === 62 ? (n.consume(s), n.exit("htmlTextData"), n.exit("htmlText"), r) : t(s); + } +} +const Dn = { + name: "labelEnd", + tokenize: _e, + resolveTo: Pe, + resolveAll: De +}, Be = { + tokenize: Me +}, Le = { + tokenize: Re +}, Oe = { + tokenize: je +}; +function De(n) { + let r = -1, t; + for (; ++r < n.length; ) + t = n[r][1], (t.type === "labelImage" || t.type === "labelLink" || t.type === "labelEnd") && (n.splice(r + 1, t.type === "labelImage" ? 4 : 2), t.type = "data", r++); + return n; +} +function Pe(n, r) { + let t = n.length, e = 0, u, l, i, a; + for (; t--; ) + if (u = n[t][1], l) { + if (u.type === "link" || u.type === "labelLink" && u._inactive) + break; + n[t][0] === "enter" && u.type === "labelLink" && (u._inactive = !0); + } else if (i) { + if (n[t][0] === "enter" && (u.type === "labelImage" || u.type === "labelLink") && !u._balanced && (l = t, u.type !== "labelLink")) { + e = 2; + break; + } + } else + u.type === "labelEnd" && (i = t); + const c = { + type: n[l][1].type === "labelLink" ? "link" : "image", + start: Object.assign({}, n[l][1].start), + end: Object.assign({}, n[n.length - 1][1].end) + }, p = { + type: "label", + start: Object.assign({}, n[l][1].start), + end: Object.assign({}, n[i][1].end) + }, h = { + type: "labelText", + start: Object.assign({}, n[l + e + 2][1].end), + end: Object.assign({}, n[i - 2][1].start) + }; + return a = [ + ["enter", c, r], + ["enter", p, r] + ], a = Z(a, n.slice(l + 1, l + e + 3)), a = Z(a, [["enter", h, r]]), a = Z( + a, + Ln( + r.parser.constructs.insideSpan.null, + n.slice(l + e + 4, i - 3), + r + ) + ), a = Z(a, [ + ["exit", h, r], + n[i - 2], + n[i - 1], + ["exit", p, r] + ]), a = Z(a, n.slice(i + 1)), a = Z(a, [["exit", c, r]]), en(n, l, n.length, a), n; +} +function _e(n, r, t) { + const e = this; + let u = e.events.length, l, i; + for (; u--; ) + if ((e.events[u][1].type === "labelImage" || e.events[u][1].type === "labelLink") && !e.events[u][1]._balanced) { + l = e.events[u][1]; + break; + } + return a; + function a(h) { + return l ? l._inactive ? p(h) : (i = e.parser.defined.includes( + fn( + e.sliceSerialize({ + start: l.end, + end: e.now() + }) + ) + ), n.enter("labelEnd"), n.enter("labelMarker"), n.consume(h), n.exit("labelMarker"), n.exit("labelEnd"), c) : t(h); + } + function c(h) { + return h === 40 ? n.attempt( + Be, + r, + i ? r : p + )(h) : h === 91 ? n.attempt( + Le, + r, + i ? n.attempt(Oe, r, p) : p + )(h) : i ? r(h) : p(h); + } + function p(h) { + return l._balanced = !0, t(h); + } +} +function Me(n, r, t) { + return e; + function e(c) { + return n.enter("resource"), n.enter("resourceMarker"), n.consume(c), n.exit("resourceMarker"), dn(n, u); + } + function u(c) { + return c === 41 ? a(c) : ut( + n, + l, + t, + "resourceDestination", + "resourceDestinationLiteral", + "resourceDestinationLiteralMarker", + "resourceDestinationRaw", + "resourceDestinationString", + 32 + )(c); + } + function l(c) { + return Y(c) ? dn(n, i)(c) : a(c); + } + function i(c) { + return c === 34 || c === 39 || c === 40 ? at( + n, + dn(n, a), + t, + "resourceTitle", + "resourceTitleMarker", + "resourceTitleString" + )(c) : a(c); + } + function a(c) { + return c === 41 ? (n.enter("resourceMarker"), n.consume(c), n.exit("resourceMarker"), n.exit("resource"), r) : t(c); + } +} +function Re(n, r, t) { + const e = this; + return u; + function u(i) { + return lt.call( + e, + n, + l, + t, + "reference", + "referenceMarker", + "referenceString" + )(i); + } + function l(i) { + return e.parser.defined.includes( + fn( + e.sliceSerialize(e.events[e.events.length - 1][1]).slice(1, -1) + ) + ) ? r(i) : t(i); + } +} +function je(n, r, t) { + return e; + function e(l) { + return n.enter("reference"), n.enter("referenceMarker"), n.consume(l), n.exit("referenceMarker"), u; + } + function u(l) { + return l === 93 ? (n.enter("referenceMarker"), n.consume(l), n.exit("referenceMarker"), n.exit("reference"), r) : t(l); + } +} +const qe = { + name: "labelStartImage", + tokenize: He, + resolveAll: Dn.resolveAll +}; +function He(n, r, t) { + const e = this; + return u; + function u(a) { + return n.enter("labelImage"), n.enter("labelImageMarker"), n.consume(a), n.exit("labelImageMarker"), l; + } + function l(a) { + return a === 91 ? (n.enter("labelMarker"), n.consume(a), n.exit("labelMarker"), n.exit("labelImage"), i) : t(a); + } + function i(a) { + return a === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(a) : r(a); + } +} +const Ne = { + name: "labelStartLink", + tokenize: Ve, + resolveAll: Dn.resolveAll +}; +function Ve(n, r, t) { + const e = this; + return u; + function u(i) { + return n.enter("labelLink"), n.enter("labelMarker"), n.consume(i), n.exit("labelMarker"), n.exit("labelLink"), l; + } + function l(i) { + return i === 94 && "_hiddenFootnoteSupport" in e.parser.constructs ? t(i) : r(i); + } +} +const Cn = { + name: "lineEnding", + tokenize: We +}; +function We(n, r) { + return t; + function t(e) { + return n.enter("lineEnding"), n.consume(e), n.exit("lineEnding"), T(n, r, "linePrefix"); + } +} +const bn = { + name: "thematicBreak", + tokenize: Qe +}; +function Qe(n, r, t) { + let e = 0, u; + return l; + function l(c) { + return n.enter("thematicBreak"), u = c, i(c); + } + function i(c) { + return c === u ? (n.enter("thematicBreakSequence"), a(c)) : q(c) ? T(n, i, "whitespace")(c) : e < 3 || c !== null && !C(c) ? t(c) : (n.exit("thematicBreak"), r(c)); + } + function a(c) { + return c === u ? (n.consume(c), e++, a) : (n.exit("thematicBreakSequence"), i(c)); + } +} +const $ = { + name: "list", + tokenize: Ze, + continuation: { + tokenize: Ye + }, + exit: Je +}, Ue = { + tokenize: Ke, + partial: !0 +}, $e = { + tokenize: Ge, + partial: !0 +}; +function Ze(n, r, t) { + const e = this, u = e.events[e.events.length - 1]; + let l = u && u[1].type === "linePrefix" ? u[2].sliceSerialize(u[1], !0).length : 0, i = 0; + return a; + function a(f) { + const k = e.containerState.type || (f === 42 || f === 43 || f === 45 ? "listUnordered" : "listOrdered"); + if (k === "listUnordered" ? !e.containerState.marker || f === e.containerState.marker : An(f)) { + if (e.containerState.type || (e.containerState.type = k, n.enter(k, { + _container: !0 + })), k === "listUnordered") + return n.enter("listItemPrefix"), f === 42 || f === 45 ? n.check(bn, t, p)(f) : p(f); + if (!e.interrupt || f === 49) + return n.enter("listItemPrefix"), n.enter("listItemValue"), c(f); + } + return t(f); + } + function c(f) { + return An(f) && ++i < 10 ? (n.consume(f), c) : (!e.interrupt || i < 2) && (e.containerState.marker ? f === e.containerState.marker : f === 41 || f === 46) ? (n.exit("listItemValue"), p(f)) : t(f); + } + function p(f) { + return n.enter("listItemMarker"), n.consume(f), n.exit("listItemMarker"), e.containerState.marker = e.containerState.marker || f, n.check( + Sn, + // Can’t be empty when interrupting. + e.interrupt ? t : h, + n.attempt( + Ue, + g, + x + ) + ); + } + function h(f) { + return e.containerState.initialBlankLine = !0, l++, g(f); + } + function x(f) { + return q(f) ? (n.enter("listItemPrefixWhitespace"), n.consume(f), n.exit("listItemPrefixWhitespace"), g) : t(f); + } + function g(f) { + return e.containerState.size = l + e.sliceSerialize(n.exit("listItemPrefix"), !0).length, r(f); + } +} +function Ye(n, r, t) { + const e = this; + return e.containerState._closeFlow = void 0, n.check(Sn, u, l); + function u(a) { + return e.containerState.furtherBlankLines = e.containerState.furtherBlankLines || e.containerState.initialBlankLine, T( + n, + r, + "listItemIndent", + e.containerState.size + 1 + )(a); + } + function l(a) { + return e.containerState.furtherBlankLines || !q(a) ? (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, i(a)) : (e.containerState.furtherBlankLines = void 0, e.containerState.initialBlankLine = void 0, n.attempt($e, r, i)(a)); + } + function i(a) { + return e.containerState._closeFlow = !0, e.interrupt = void 0, T( + n, + n.attempt($, r, t), + "linePrefix", + e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(a); + } +} +function Ge(n, r, t) { + const e = this; + return T( + n, + u, + "listItemIndent", + e.containerState.size + 1 + ); + function u(l) { + const i = e.events[e.events.length - 1]; + return i && i[1].type === "listItemIndent" && i[2].sliceSerialize(i[1], !0).length === e.containerState.size ? r(l) : t(l); + } +} +function Je(n) { + n.exit(this.containerState.type); +} +function Ke(n, r, t) { + const e = this; + return T( + n, + u, + "listItemPrefixWhitespace", + e.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1 + ); + function u(l) { + const i = e.events[e.events.length - 1]; + return !q(l) && i && i[1].type === "listItemPrefixWhitespace" ? r(l) : t(l); + } +} +const Gn = { + name: "setextUnderline", + tokenize: ve, + resolveTo: Xe +}; +function Xe(n, r) { + let t = n.length, e, u, l; + for (; t--; ) + if (n[t][0] === "enter") { + if (n[t][1].type === "content") { + e = t; + break; + } + n[t][1].type === "paragraph" && (u = t); + } else + n[t][1].type === "content" && n.splice(t, 1), !l && n[t][1].type === "definition" && (l = t); + const i = { + type: "setextHeading", + start: Object.assign({}, n[u][1].start), + end: Object.assign({}, n[n.length - 1][1].end) + }; + return n[u][1].type = "setextHeadingText", l ? (n.splice(u, 0, ["enter", i, r]), n.splice(l + 1, 0, ["exit", n[e][1], r]), n[e][1].end = Object.assign({}, n[l][1].end)) : n[e][1] = i, n.push(["exit", i, r]), n; +} +function ve(n, r, t) { + const e = this; + let u = e.events.length, l, i; + for (; u--; ) + if (e.events[u][1].type !== "lineEnding" && e.events[u][1].type !== "linePrefix" && e.events[u][1].type !== "content") { + i = e.events[u][1].type === "paragraph"; + break; + } + return a; + function a(h) { + return !e.parser.lazy[e.now().line] && (e.interrupt || i) ? (n.enter("setextHeadingLine"), n.enter("setextHeadingLineSequence"), l = h, c(h)) : t(h); + } + function c(h) { + return h === l ? (n.consume(h), c) : (n.exit("setextHeadingLineSequence"), T(n, p, "lineSuffix")(h)); + } + function p(h) { + return h === null || C(h) ? (n.exit("setextHeadingLine"), r(h)) : t(h); + } +} +const nr = { + tokenize: tr +}; +function tr(n) { + const r = this, t = n.attempt( + // Try to parse a blank line. + Sn, + e, + // Try to parse initial flow (essentially, only code). + n.attempt( + this.parser.constructs.flowInitial, + u, + T( + n, + n.attempt( + this.parser.constructs.flow, + u, + n.attempt(oe, u) + ), + "linePrefix" + ) + ) + ); + return t; + function e(l) { + if (l === null) { + n.consume(l); + return; + } + return n.enter("lineEndingBlank"), n.consume(l), n.exit("lineEndingBlank"), r.currentConstruct = void 0, t; + } + function u(l) { + if (l === null) { + n.consume(l); + return; + } + return n.enter("lineEnding"), n.consume(l), n.exit("lineEnding"), r.currentConstruct = void 0, t; + } +} +const er = { + resolveAll: st() +}, rr = ot("string"), ir = ot("text"); +function ot(n) { + return { + tokenize: r, + resolveAll: st( + n === "text" ? ur : void 0 + ) + }; + function r(t) { + const e = this, u = this.parser.constructs[n], l = t.attempt(u, i, a); + return i; + function i(h) { + return p(h) ? l(h) : a(h); + } + function a(h) { + if (h === null) { + t.consume(h); + return; + } + return t.enter("data"), t.consume(h), c; + } + function c(h) { + return p(h) ? (t.exit("data"), l(h)) : (t.consume(h), c); + } + function p(h) { + if (h === null) + return !0; + const x = u[h]; + let g = -1; + if (x) + for (; ++g < x.length; ) { + const f = x[g]; + if (!f.previous || f.previous.call(e, e.previous)) + return !0; + } + return !1; + } + } +} +function st(n) { + return r; + function r(t, e) { + let u = -1, l; + for (; ++u <= t.length; ) + l === void 0 ? t[u] && t[u][1].type === "data" && (l = u, u++) : (!t[u] || t[u][1].type !== "data") && (u !== l + 2 && (t[l][1].end = t[u - 1][1].end, t.splice(l + 2, u - l - 2), u = l + 2), l = void 0); + return n ? n(t, e) : t; + } +} +function ur(n, r) { + let t = 0; + for (; ++t <= n.length; ) + if ((t === n.length || n[t][1].type === "lineEnding") && n[t - 1][1].type === "data") { + const e = n[t - 1][1], u = r.sliceStream(e); + let l = u.length, i = -1, a = 0, c; + for (; l--; ) { + const p = u[l]; + if (typeof p == "string") { + for (i = p.length; p.charCodeAt(i - 1) === 32; ) + a++, i--; + if (i) + break; + i = -1; + } else if (p === -2) + c = !0, a++; + else if (p !== -1) { + l++; + break; + } + } + if (a) { + const p = { + type: t === n.length || c || a < 2 ? "lineSuffix" : "hardBreakTrailing", + start: { + line: e.end.line, + column: e.end.column - a, + offset: e.end.offset - a, + _index: e.start._index + l, + _bufferIndex: l ? i : e.start._bufferIndex + i + }, + end: Object.assign({}, e.end) + }; + e.end = Object.assign({}, p.start), e.start.offset === e.end.offset ? Object.assign(e, p) : (n.splice( + t, + 0, + ["enter", p, r], + ["exit", p, r] + ), t += 2); + } + t++; + } + return n; +} +function lr(n, r, t) { + let e = Object.assign( + t ? Object.assign({}, t) : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ); + const u = {}, l = []; + let i = [], a = []; + const c = { + consume: _, + enter: F, + exit: L, + attempt: P(O), + check: P(d), + interrupt: P(d, { + interrupt: !0 + }) + }, p = { + previous: null, + code: null, + containerState: {}, + events: [], + parser: n, + sliceStream: f, + sliceSerialize: g, + now: k, + defineSkip: B, + write: x + }; + let h = r.tokenize.call(p, c); + return r.resolveAll && l.push(r), p; + function x(S) { + return i = Z(i, S), D(), i[i.length - 1] !== null ? [] : (R(r, 0), p.events = Ln(l, p.events, p), p.events); + } + function g(S, E) { + return or(f(S), E); + } + function f(S) { + return ar(i, S); + } + function k() { + return Object.assign({}, e); + } + function B(S) { + u[S.line] = S.column, V(); + } + function D() { + let S; + for (; e._index < i.length; ) { + const E = i[e._index]; + if (typeof E == "string") + for (S = e._index, e._bufferIndex < 0 && (e._bufferIndex = 0); e._index === S && e._bufferIndex < E.length; ) + y(E.charCodeAt(e._bufferIndex)); + else + y(E); + } + } + function y(S) { + h = h(S); + } + function _(S) { + C(S) ? (e.line++, e.column = 1, e.offset += S === -3 ? 2 : 1, V()) : S !== -1 && (e.column++, e.offset++), e._bufferIndex < 0 ? e._index++ : (e._bufferIndex++, e._bufferIndex === i[e._index].length && (e._bufferIndex = -1, e._index++)), p.previous = S; + } + function F(S, E) { + const A = E || {}; + return A.type = S, A.start = k(), p.events.push(["enter", A, p]), a.push(A), A; + } + function L(S) { + const E = a.pop(); + return E.end = k(), p.events.push(["exit", E, p]), E; + } + function O(S, E) { + R(S, E.from); + } + function d(S, E) { + E.restore(); + } + function P(S, E) { + return A; + function A(Q, G, nn) { + let J, W, U, H; + return Array.isArray(Q) ? ( + /* c8 ignore next 1 */ + o(Q) + ) : "tokenize" in Q ? o([Q]) : s(Q); + function s(N) { + return K; + function K(ln) { + const pn = ln !== null && N[ln], mn = ln !== null && N.null, Fn = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...Array.isArray(pn) ? pn : pn ? [pn] : [], + ...Array.isArray(mn) ? mn : mn ? [mn] : [] + ]; + return o(Fn)(ln); + } + } + function o(N) { + return J = N, W = 0, N.length === 0 ? nn : cn(N[W]); + } + function cn(N) { + return K; + function K(ln) { + return H = j(), U = N, N.partial || (p.currentConstruct = N), N.name && p.parser.constructs.disable.null.includes(N.name) ? hn() : N.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + E ? Object.assign(Object.create(p), E) : p, + c, + xn, + hn + )(ln); + } + } + function xn(N) { + return S(U, H), G; + } + function hn(N) { + return H.restore(), ++W < J.length ? cn(J[W]) : nn; + } + } + } + function R(S, E) { + S.resolveAll && !l.includes(S) && l.push(S), S.resolve && en( + p.events, + E, + p.events.length - E, + S.resolve(p.events.slice(E), p) + ), S.resolveTo && (p.events = S.resolveTo(p.events, p)); + } + function j() { + const S = k(), E = p.previous, A = p.currentConstruct, Q = p.events.length, G = Array.from(a); + return { + restore: nn, + from: Q + }; + function nn() { + e = S, p.previous = E, p.currentConstruct = A, p.events.length = Q, a = G, V(); + } + } + function V() { + e.line in u && e.column < 2 && (e.column = u[e.line], e.offset += u[e.line] - 1); + } +} +function ar(n, r) { + const t = r.start._index, e = r.start._bufferIndex, u = r.end._index, l = r.end._bufferIndex; + let i; + return t === u ? i = [n[t].slice(e, l)] : (i = n.slice(t, u), e > -1 && (i[0] = i[0].slice(e)), l > 0 && i.push(n[u].slice(0, l))), i; +} +function or(n, r) { + let t = -1; + const e = []; + let u; + for (; ++t < n.length; ) { + const l = n[t]; + let i; + if (typeof l == "string") + i = l; + else + switch (l) { + case -5: { + i = "\r"; + break; + } + case -4: { + i = ` +`; + break; + } + case -3: { + i = `\r +`; + break; + } + case -2: { + i = r ? " " : " "; + break; + } + case -1: { + if (!r && u) + continue; + i = " "; + break; + } + default: + i = String.fromCharCode(l); + } + u = l === -2, e.push(i); + } + return e.join(""); +} +const sr = { + [42]: $, + [43]: $, + [45]: $, + [48]: $, + [49]: $, + [50]: $, + [51]: $, + [52]: $, + [53]: $, + [54]: $, + [55]: $, + [56]: $, + [57]: $, + [62]: tt +}, cr = { + [91]: me +}, hr = { + [-2]: wn, + [-1]: wn, + [32]: wn +}, pr = { + [35]: be, + [42]: bn, + [45]: [Gn, bn], + [60]: Ee, + [61]: Gn, + [95]: bn, + [96]: Zn, + [126]: Zn +}, mr = { + [38]: rt, + [92]: et +}, fr = { + [-5]: Cn, + [-4]: Cn, + [-3]: Cn, + [33]: qe, + [38]: rt, + [42]: In, + [60]: [Ut, Ie], + [91]: Ne, + [92]: [ke, et], + [93]: Dn, + [95]: In, + [96]: re +}, xr = { + null: [In, er] +}, gr = { + null: [42, 95] +}, kr = { + null: [] +}, dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + attentionMarkers: gr, + contentInitial: cr, + disable: kr, + document: sr, + flow: pr, + flowInitial: hr, + insideSpan: xr, + string: mr, + text: fr +}, Symbol.toStringTag, { value: "Module" })); +function br(n = {}) { + const r = Bt( + // @ts-expect-error Same as above. + [dr].concat(n.extensions || []) + ), t = { + defined: [], + lazy: {}, + constructs: r, + content: e(jt), + document: e(Ht), + flow: e(nr), + string: e(rr), + text: e(ir) + }; + return t; + function e(u) { + return l; + function l(i) { + return lr(t, u, i); + } + } +} +const Jn = /[\0\t\n\r]/g; +function yr() { + let n = 1, r = "", t = !0, e; + return u; + function u(l, i, a) { + const c = []; + let p, h, x, g, f; + for (l = r + l.toString(i), x = 0, r = "", t && (l.charCodeAt(0) === 65279 && x++, t = void 0); x < l.length; ) { + if (Jn.lastIndex = x, p = Jn.exec(l), g = p && p.index !== void 0 ? p.index : l.length, f = l.charCodeAt(g), !p) { + r = l.slice(x); + break; + } + if (f === 10 && x === g && e) + c.push(-3), e = void 0; + else + switch (e && (c.push(-5), e = void 0), x < g && (c.push(l.slice(x, g)), n += g - x), f) { + case 0: { + c.push(65533), n++; + break; + } + case 9: { + for (h = Math.ceil(n / 4) * 4, c.push(-2); n++ < h; ) + c.push(-1); + break; + } + case 10: { + c.push(-4), n = 1; + break; + } + default: + e = !0, n = 1; + } + x = g + 1; + } + return a && (e && c.push(-5), r && c.push(r), c.push(null)), c; + } +} +function Sr(n) { + for (; !it(n); ) + ; + return n; +} +function ct(n, r) { + const t = Number.parseInt(n, r); + return ( + // C0 except for HT, LF, FF, CR, space + t < 9 || t === 11 || t > 13 && t < 32 || // Control character (DEL) of the basic block and C1 controls. + t > 126 && t < 160 || // Lone high surrogates and low surrogates. + t > 55295 && t < 57344 || // Noncharacters. + t > 64975 && t < 65008 || (t & 65535) === 65535 || (t & 65535) === 65534 || // Out of range + t > 1114111 ? "�" : String.fromCharCode(t) + ); +} +const Fr = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; +function Er(n) { + return n.replace(Fr, wr); +} +function wr(n, r, t) { + if (r) + return r; + if (t.charCodeAt(0) === 35) { + const u = t.charCodeAt(1), l = u === 120 || u === 88; + return ct(t.slice(l ? 2 : 1), l ? 16 : 10); + } + return On(t) || n; +} +function yn(n) { + return !n || typeof n != "object" ? "" : "position" in n || "type" in n ? Kn(n.position) : "start" in n || "end" in n ? Kn(n) : "line" in n || "column" in n ? Tn(n) : ""; +} +function Tn(n) { + return Xn(n && n.line) + ":" + Xn(n && n.column); +} +function Kn(n) { + return Tn(n && n.start) + "-" + Tn(n && n.end); +} +function Xn(n) { + return n && typeof n == "number" ? n : 1; +} +const ht = {}.hasOwnProperty, pt = ( + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function(n, r, t) { + return typeof r != "string" && (t = r, r = void 0), Cr(t)( + Sr( + // @ts-expect-error: micromark types need to accept `null`. + br(t).document().write(yr()(n, r, !0)) + ) + ); + } +); +function Cr(n) { + const r = { + transforms: [], + canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], + enter: { + autolink: a(jn), + autolinkProtocol: S, + autolinkEmail: S, + atxHeading: a(_n), + blockQuote: a(Fn), + characterEscape: S, + characterReference: S, + codeFenced: a(Pn), + codeFencedFenceInfo: c, + codeFencedFenceMeta: c, + codeIndented: a(Pn, c), + codeText: a(kt, c), + codeTextData: S, + data: S, + codeFlowValue: S, + definition: a(dt), + definitionDestinationString: c, + definitionLabelString: c, + definitionTitleString: c, + emphasis: a(bt), + hardBreakEscape: a(Mn), + hardBreakTrailing: a(Mn), + htmlFlow: a(Rn, c), + htmlFlowData: S, + htmlText: a(Rn, c), + htmlTextData: S, + image: a(yt), + label: c, + link: a(jn), + listItem: a(St), + listItemValue: k, + listOrdered: a(qn, f), + listUnordered: a(qn), + paragraph: a(Ft), + reference: hn, + referenceString: c, + resourceDestinationString: c, + resourceTitleString: c, + setextHeading: a(_n), + strong: a(Et), + thematicBreak: a(Ct) + }, + exit: { + atxHeading: h(), + atxHeadingSequence: P, + autolink: h(), + autolinkEmail: mn, + autolinkProtocol: pn, + blockQuote: h(), + characterEscapeValue: E, + characterReferenceMarkerHexadecimal: K, + characterReferenceMarkerNumeric: K, + characterReferenceValue: ln, + codeFenced: h(_), + codeFencedFence: y, + codeFencedFenceInfo: B, + codeFencedFenceMeta: D, + codeFlowValue: E, + codeIndented: h(F), + codeText: h(J), + codeTextData: E, + data: E, + definition: h(), + definitionDestinationString: d, + definitionLabelString: L, + definitionTitleString: O, + emphasis: h(), + hardBreakEscape: h(Q), + hardBreakTrailing: h(Q), + htmlFlow: h(G), + htmlFlowData: E, + htmlText: h(nn), + htmlTextData: E, + image: h(U), + label: s, + labelText: H, + lineEnding: A, + link: h(W), + listItem: h(), + listOrdered: h(), + listUnordered: h(), + paragraph: h(), + referenceString: N, + resourceDestinationString: o, + resourceTitleString: cn, + resource: xn, + setextHeading: h(V), + setextHeadingLineSequence: j, + setextHeadingText: R, + strong: h(), + thematicBreak: h() + } + }; + mt(r, (n || {}).mdastExtensions || []); + const t = {}; + return e; + function e(m) { + let b = { + type: "root", + children: [] + }; + const w = { + stack: [b], + tokenStack: [], + config: r, + enter: p, + exit: x, + buffer: c, + resume: g, + setData: l, + getData: i + }, z = []; + let I = -1; + for (; ++I < m.length; ) + if (m[I][1].type === "listOrdered" || m[I][1].type === "listUnordered") + if (m[I][0] === "enter") + z.push(I); + else { + const X = z.pop(); + I = u(m, X, I); + } + for (I = -1; ++I < m.length; ) { + const X = r[m[I][0]]; + ht.call(X, m[I][1].type) && X[m[I][1].type].call( + Object.assign( + { + sliceSerialize: m[I][2].sliceSerialize + }, + w + ), + m[I][1] + ); + } + if (w.tokenStack.length > 0) { + const X = w.tokenStack[w.tokenStack.length - 1]; + (X[1] || vn).call(w, void 0, X[0]); + } + for (b.position = { + start: on( + m.length > 0 ? m[0][1].start : { + line: 1, + column: 1, + offset: 0 + } + ), + end: on( + m.length > 0 ? m[m.length - 2][1].end : { + line: 1, + column: 1, + offset: 0 + } + ) + }, I = -1; ++I < r.transforms.length; ) + b = r.transforms[I](b) || b; + return b; + } + function u(m, b, w) { + let z = b - 1, I = -1, X = !1, an, rn, gn, kn; + for (; ++z <= w; ) { + const M = m[z]; + if (M[1].type === "listUnordered" || M[1].type === "listOrdered" || M[1].type === "blockQuote" ? (M[0] === "enter" ? I++ : I--, kn = void 0) : M[1].type === "lineEndingBlank" ? M[0] === "enter" && (an && !kn && !I && !gn && (gn = z), kn = void 0) : M[1].type === "linePrefix" || M[1].type === "listItemValue" || M[1].type === "listItemMarker" || M[1].type === "listItemPrefix" || M[1].type === "listItemPrefixWhitespace" || (kn = void 0), !I && M[0] === "enter" && M[1].type === "listItemPrefix" || I === -1 && M[0] === "exit" && (M[1].type === "listUnordered" || M[1].type === "listOrdered")) { + if (an) { + let En = z; + for (rn = void 0; En--; ) { + const un = m[En]; + if (un[1].type === "lineEnding" || un[1].type === "lineEndingBlank") { + if (un[0] === "exit") + continue; + rn && (m[rn][1].type = "lineEndingBlank", X = !0), un[1].type = "lineEnding", rn = En; + } else if (!(un[1].type === "linePrefix" || un[1].type === "blockQuotePrefix" || un[1].type === "blockQuotePrefixWhitespace" || un[1].type === "blockQuoteMarker" || un[1].type === "listItemIndent")) + break; + } + gn && (!rn || gn < rn) && (an._spread = !0), an.end = Object.assign( + {}, + rn ? m[rn][1].start : M[1].end + ), m.splice(rn || z, 0, ["exit", an, M[2]]), z++, w++; + } + M[1].type === "listItemPrefix" && (an = { + type: "listItem", + // @ts-expect-error Patched + _spread: !1, + start: Object.assign({}, M[1].start) + }, m.splice(z, 0, ["enter", an, M[2]]), z++, w++, gn = void 0, kn = !0); + } + } + return m[b][1]._spread = X, w; + } + function l(m, b) { + t[m] = b; + } + function i(m) { + return t[m]; + } + function a(m, b) { + return w; + function w(z) { + p.call(this, m(z), z), b && b.call(this, z); + } + } + function c() { + this.stack.push({ + type: "fragment", + children: [] + }); + } + function p(m, b, w) { + return this.stack[this.stack.length - 1].children.push(m), this.stack.push(m), this.tokenStack.push([b, w]), m.position = { + start: on(b.start) + }, m; + } + function h(m) { + return b; + function b(w) { + m && m.call(this, w), x.call(this, w); + } + } + function x(m, b) { + const w = this.stack.pop(), z = this.tokenStack.pop(); + if (z) + z[0].type !== m.type && (b ? b.call(this, m, z[0]) : (z[1] || vn).call(this, m, z[0])); + else + throw new Error( + "Cannot close `" + m.type + "` (" + yn({ + start: m.start, + end: m.end + }) + "): it’s not open" + ); + return w.position.end = on(m.end), w; + } + function g() { + return Tt(this.stack.pop()); + } + function f() { + l("expectingFirstListItemValue", !0); + } + function k(m) { + if (i("expectingFirstListItemValue")) { + const b = this.stack[this.stack.length - 2]; + b.start = Number.parseInt(this.sliceSerialize(m), 10), l("expectingFirstListItemValue"); + } + } + function B() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.lang = m; + } + function D() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.meta = m; + } + function y() { + i("flowCodeInside") || (this.buffer(), l("flowCodeInside", !0)); + } + function _() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.value = m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), l("flowCodeInside"); + } + function F() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.value = m.replace(/(\r?\n|\r)$/g, ""); + } + function L(m) { + const b = this.resume(), w = this.stack[this.stack.length - 1]; + w.label = b, w.identifier = fn( + this.sliceSerialize(m) + ).toLowerCase(); + } + function O() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.title = m; + } + function d() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.url = m; + } + function P(m) { + const b = this.stack[this.stack.length - 1]; + if (!b.depth) { + const w = this.sliceSerialize(m).length; + b.depth = w; + } + } + function R() { + l("setextHeadingSlurpLineEnding", !0); + } + function j(m) { + const b = this.stack[this.stack.length - 1]; + b.depth = this.sliceSerialize(m).charCodeAt(0) === 61 ? 1 : 2; + } + function V() { + l("setextHeadingSlurpLineEnding"); + } + function S(m) { + const b = this.stack[this.stack.length - 1]; + let w = b.children[b.children.length - 1]; + (!w || w.type !== "text") && (w = wt(), w.position = { + start: on(m.start) + }, b.children.push(w)), this.stack.push(w); + } + function E(m) { + const b = this.stack.pop(); + b.value += this.sliceSerialize(m), b.position.end = on(m.end); + } + function A(m) { + const b = this.stack[this.stack.length - 1]; + if (i("atHardBreak")) { + const w = b.children[b.children.length - 1]; + w.position.end = on(m.end), l("atHardBreak"); + return; + } + !i("setextHeadingSlurpLineEnding") && r.canContainEols.includes(b.type) && (S.call(this, m), E.call(this, m)); + } + function Q() { + l("atHardBreak", !0); + } + function G() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.value = m; + } + function nn() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.value = m; + } + function J() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.value = m; + } + function W() { + const m = this.stack[this.stack.length - 1]; + if (i("inReference")) { + const b = i("referenceType") || "shortcut"; + m.type += "Reference", m.referenceType = b, delete m.url, delete m.title; + } else + delete m.identifier, delete m.label; + l("referenceType"); + } + function U() { + const m = this.stack[this.stack.length - 1]; + if (i("inReference")) { + const b = i("referenceType") || "shortcut"; + m.type += "Reference", m.referenceType = b, delete m.url, delete m.title; + } else + delete m.identifier, delete m.label; + l("referenceType"); + } + function H(m) { + const b = this.sliceSerialize(m), w = this.stack[this.stack.length - 2]; + w.label = Er(b), w.identifier = fn(b).toLowerCase(); + } + function s() { + const m = this.stack[this.stack.length - 1], b = this.resume(), w = this.stack[this.stack.length - 1]; + if (l("inReference", !0), w.type === "link") { + const z = m.children; + w.children = z; + } else + w.alt = b; + } + function o() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.url = m; + } + function cn() { + const m = this.resume(), b = this.stack[this.stack.length - 1]; + b.title = m; + } + function xn() { + l("inReference"); + } + function hn() { + l("referenceType", "collapsed"); + } + function N(m) { + const b = this.resume(), w = this.stack[this.stack.length - 1]; + w.label = b, w.identifier = fn( + this.sliceSerialize(m) + ).toLowerCase(), l("referenceType", "full"); + } + function K(m) { + l("characterReferenceType", m.type); + } + function ln(m) { + const b = this.sliceSerialize(m), w = i("characterReferenceType"); + let z; + w ? (z = ct( + b, + w === "characterReferenceMarkerNumeric" ? 10 : 16 + ), l("characterReferenceType")) : z = On(b); + const I = this.stack.pop(); + I.value += z, I.position.end = on(m.end); + } + function pn(m) { + E.call(this, m); + const b = this.stack[this.stack.length - 1]; + b.url = this.sliceSerialize(m); + } + function mn(m) { + E.call(this, m); + const b = this.stack[this.stack.length - 1]; + b.url = "mailto:" + this.sliceSerialize(m); + } + function Fn() { + return { + type: "blockquote", + children: [] + }; + } + function Pn() { + return { + type: "code", + lang: null, + meta: null, + value: "" + }; + } + function kt() { + return { + type: "inlineCode", + value: "" + }; + } + function dt() { + return { + type: "definition", + identifier: "", + label: null, + title: null, + url: "" + }; + } + function bt() { + return { + type: "emphasis", + children: [] + }; + } + function _n() { + return { + type: "heading", + depth: void 0, + children: [] + }; + } + function Mn() { + return { + type: "break" + }; + } + function Rn() { + return { + type: "html", + value: "" + }; + } + function yt() { + return { + type: "image", + title: null, + url: "", + alt: null + }; + } + function jn() { + return { + type: "link", + title: null, + url: "", + children: [] + }; + } + function qn(m) { + return { + type: "list", + ordered: m.type === "listOrdered", + start: null, + // @ts-expect-error Patched. + spread: m._spread, + children: [] + }; + } + function St(m) { + return { + type: "listItem", + // @ts-expect-error Patched. + spread: m._spread, + checked: null, + children: [] + }; + } + function Ft() { + return { + type: "paragraph", + children: [] + }; + } + function Et() { + return { + type: "strong", + children: [] + }; + } + function wt() { + return { + type: "text", + value: "" + }; + } + function Ct() { + return { + type: "thematicBreak" + }; + } +} +function on(n) { + return { + line: n.line, + column: n.column, + offset: n.offset + }; +} +function mt(n, r) { + let t = -1; + for (; ++t < r.length; ) { + const e = r[t]; + Array.isArray(e) ? mt(n, e) : Ar(n, e); + } +} +function Ar(n, r) { + let t; + for (t in r) + if (ht.call(r, t)) { + if (t === "canContainEols") { + const e = r[t]; + e && n[t].push(...e); + } else if (t === "transforms") { + const e = r[t]; + e && n[t].push(...e); + } else if (t === "enter" || t === "exit") { + const e = r[t]; + e && Object.assign(n[t], e); + } + } +} +function vn(n, r) { + throw n ? new Error( + "Cannot close `" + n.type + "` (" + yn({ + start: n.start, + end: n.end + }) + "): a different token (`" + r.type + "`, " + yn({ + start: r.start, + end: r.end + }) + ") is open" + ) : new Error( + "Cannot close document, a token (`" + r.type + "`, " + yn({ + start: r.start, + end: r.end + }) + ") is still open" + ); +} +function zr(n) { + const r = n.replace(/\n{2,}/g, ` +`); + return At(r); +} +function Ir(n) { + const r = zr(n), { children: t } = pt(r), e = [[]]; + let u = 0; + function l(i, a = "normal") { + i.type === "text" ? i.value.split(` +`).forEach((p, h) => { + h !== 0 && (u++, e.push([])), p.split(" ").forEach((x) => { + x && e[u].push({ content: x, type: a }); + }); + }) : (i.type === "strong" || i.type === "emphasis") && i.children.forEach((c) => { + l(c, i.type); + }); + } + return t.forEach((i) => { + i.type === "paragraph" && i.children.forEach((a) => { + l(a); + }); + }), e; +} +function Tr(n) { + const { children: r } = pt(n); + function t(e) { + return e.type === "text" ? e.value.replace(/\n/g, "
") : e.type === "strong" ? `${e.children.map(t).join("")}` : e.type === "emphasis" ? `${e.children.map(t).join("")}` : e.type === "paragraph" ? `

${e.children.map(t).join("")}

` : `Unsupported markdown: ${e.type}`; + } + return r.map(t).join(""); +} +function Br(n) { + return Intl.Segmenter ? [...new Intl.Segmenter().segment(n)].map((r) => r.segment) : [...n]; +} +function Lr(n, r) { + const t = Br(r.content); + return ft(n, [], t, r.type); +} +function ft(n, r, t, e) { + if (t.length === 0) + return [ + { content: r.join(""), type: e }, + { content: "", type: e } + ]; + const [u, ...l] = t, i = [...r, u]; + return n([{ content: i.join(""), type: e }]) ? ft(n, i, l, e) : (r.length === 0 && u && (r.push(u), t.shift()), [ + { content: r.join(""), type: e }, + { content: t.join(""), type: e } + ]); +} +function Or(n, r) { + if (n.some(({ content: t }) => t.includes(` +`))) + throw new Error("splitLineToFitWidth does not support newlines in the line"); + return Bn(n, r); +} +function Bn(n, r, t = [], e = []) { + if (n.length === 0) + return e.length > 0 && t.push(e), t.length > 0 ? t : []; + let u = ""; + n[0].content === " " && (u = " ", n.shift()); + const l = n.shift() ?? { content: " ", type: "normal" }, i = [...e]; + if (u !== "" && i.push({ content: u, type: "normal" }), i.push(l), r(i)) + return Bn(n, r, t, i); + if (e.length > 0) + t.push(e), n.unshift(l); + else if (l.content) { + const [a, c] = Lr(r, l); + t.push([a]), c.content && n.unshift(c); + } + return Bn(n, r, t); +} +function Dr(n, r) { + r && n.attr("style", r); +} +function Pr(n, r, t, e, u = !1) { + const l = n.append("foreignObject"), i = l.append("xhtml:div"), a = r.label, c = r.isNode ? "nodeLabel" : "edgeLabel"; + i.html( + ` + " + a + "" + ), Dr(i, r.labelStyle), i.style("display", "table-cell"), i.style("white-space", "nowrap"), i.style("max-width", t + "px"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), u && i.attr("class", "labelBkg"); + let p = i.node().getBoundingClientRect(); + return p.width === t && (i.style("display", "table"), i.style("white-space", "break-spaces"), i.style("width", t + "px"), p = i.node().getBoundingClientRect()), l.style("width", p.width), l.style("height", p.height), l.node(); +} +function xt(n, r, t) { + return n.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", r * t - 0.1 + "em").attr("dy", t + "em"); +} +function _r(n, r, t) { + const e = n.append("text"), u = xt(e, 1, r); + gt(u, t); + const l = u.node().getComputedTextLength(); + return e.remove(), l; +} +function Mr(n, r, t, e = !1) { + const l = r.append("g"), i = l.insert("rect").attr("class", "background"), a = l.append("text").attr("y", "-10.1"); + let c = 0; + for (const p of t) { + const h = (g) => _r(l, 1.1, g) <= n, x = h(p) ? [p] : Or(p, h); + for (const g of x) { + const f = xt(a, c, 1.1); + gt(f, g), c++; + } + } + if (e) { + const p = a.node().getBBox(), h = 2; + return i.attr("x", -h).attr("y", -h).attr("width", p.width + 2 * h).attr("height", p.height + 2 * h), l.node(); + } else + return a.node(); +} +function gt(n, r) { + n.text(""), r.forEach((t, e) => { + const u = n.append("tspan").attr("font-style", t.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", t.type === "strong" ? "bold" : "normal"); + e === 0 ? u.text(t.content) : u.text(" " + t.content); + }); +} +const jr = (n, r = "", { + style: t = "", + isTitle: e = !1, + classes: u = "", + useHtmlLabels: l = !0, + isNode: i = !0, + width: a = 200, + addSvgBackground: c = !1 +} = {}) => { + if (zt.info("createText", r, t, e, u, l, i, c), l) { + const p = Tr(r), h = { + isNode: i, + label: It(p).replace( + /fa[blrs]?:fa-[\w-]+/g, + (g) => `` + ), + labelStyle: t.replace("fill:", "color:") + }; + return Pr(n, h, a, u, c); + } else { + const p = Ir(r); + return Mr(a, n, p, c); + } +}; +export { + jr as c +}; diff --git a/webroot/js/node_modules/mermaid/dist/createText-80c3befb.js b/webroot/js/node_modules/mermaid/dist/createText-80c3befb.js new file mode 100644 index 0000000..a9672f2 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/createText-80c3befb.js @@ -0,0 +1,238 @@ +import { l as log, J as decodeEntities } from "./mermaid-0d192ec3.js"; +import { fromMarkdown } from "mdast-util-from-markdown"; +import { dedent } from "ts-dedent"; +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = dedent(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "
"); + } else if (node.type === "strong") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "emphasis") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "paragraph") { + return `

${node.children.map(output).join("")}

`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + " + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + log.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: decodeEntities(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; +export { + createText as c +}; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/clusters.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/clusters.d.ts new file mode 100644 index 0000000..164f69d --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/clusters.d.ts @@ -0,0 +1,4 @@ +export function insertCluster(elem: any, node: any): void; +export function getClusterTitleWidth(elem: any, node: any): number; +export function clear(): void; +export function positionCluster(node: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/createLabel.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/createLabel.d.ts new file mode 100644 index 0000000..fd85ad6 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/createLabel.d.ts @@ -0,0 +1,9 @@ +export default createLabel; +/** + * @param _vertexText + * @param style + * @param isTitle + * @param isNode + * @deprecated svg-util/createText instead + */ +declare function createLabel(_vertexText: any, style: any, isTitle: any, isNode: any): SVGTextElement | SVGForeignObjectElement; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/edges.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/edges.d.ts new file mode 100644 index 0000000..fb7a6f6 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/edges.d.ts @@ -0,0 +1,14 @@ +export function clear(): void; +export function insertEdgeLabel(elem: any, edge: any): any; +export function positionEdgeLabel(edge: any, paths: any): void; +export function intersection(node: any, outsidePoint: any, insidePoint: any): { + x: any; + y: number; +} | { + x: number; + y: any; +}; +export function insertEdge(elem: any, e: any, edge: any, clusterDb: any, diagramType: any, graph: any, id: any): { + updatedPath: any; + originalPath: any; +}; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/index.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/index.d.ts new file mode 100644 index 0000000..3fee789 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/index.d.ts @@ -0,0 +1 @@ +export function render(elem: any, graph: any, markers: any, diagramtype: any, id: any): Promise; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/index.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/index.d.ts new file mode 100644 index 0000000..759b5ce --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/index.d.ts @@ -0,0 +1,13 @@ +declare namespace _default { + export { node }; + export { circle }; + export { ellipse }; + export { polygon }; + export { rect }; +} +export default _default; +import node from './intersect-node.js'; +import circle from './intersect-circle.js'; +import ellipse from './intersect-ellipse.js'; +import polygon from './intersect-polygon.js'; +import rect from './intersect-rect.js'; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-circle.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-circle.d.ts new file mode 100644 index 0000000..4702778 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-circle.d.ts @@ -0,0 +1,10 @@ +export default intersectCircle; +/** + * @param node + * @param rx + * @param point + */ +declare function intersectCircle(node: any, rx: any, point: any): { + x: any; + y: any; +}; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-ellipse.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-ellipse.d.ts new file mode 100644 index 0000000..2237c37 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-ellipse.d.ts @@ -0,0 +1,11 @@ +export default intersectEllipse; +/** + * @param node + * @param rx + * @param ry + * @param point + */ +declare function intersectEllipse(node: any, rx: any, ry: any, point: any): { + x: any; + y: any; +}; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-line.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-line.d.ts new file mode 100644 index 0000000..5b0a1d0 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-line.d.ts @@ -0,0 +1,13 @@ +export default intersectLine; +/** + * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect. + * + * @param p1 + * @param p2 + * @param q1 + * @param q2 + */ +declare function intersectLine(p1: any, p2: any, q1: any, q2: any): { + x: number; + y: number; +} | undefined; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-node.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-node.d.ts new file mode 100644 index 0000000..82501d3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-node.d.ts @@ -0,0 +1,6 @@ +export default intersectNode; +/** + * @param node + * @param point + */ +declare function intersectNode(node: any, point: any): any; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-polygon.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-polygon.d.ts new file mode 100644 index 0000000..3cddb21 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-polygon.d.ts @@ -0,0 +1,10 @@ +export default intersectPolygon; +/** + * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming + * that it has the shape specified by polygon. + * + * @param node + * @param polyPoints + * @param point + */ +declare function intersectPolygon(node: any, polyPoints: any, point: any): any; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-rect.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-rect.d.ts new file mode 100644 index 0000000..53913d4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/intersect/intersect-rect.d.ts @@ -0,0 +1,5 @@ +export default intersectRect; +declare function intersectRect(node: any, point: any): { + x: any; + y: any; +}; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/markers.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/markers.d.ts new file mode 100644 index 0000000..253e8f2 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/markers.d.ts @@ -0,0 +1,2 @@ +export default insertMarkers; +declare function insertMarkers(elem: any, markerArray: any, type: any, id: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/mermaid-graphlib.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/mermaid-graphlib.d.ts new file mode 100644 index 0000000..7328581 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/mermaid-graphlib.d.ts @@ -0,0 +1,8 @@ +export let clusterDb: {}; +export function clear(): void; +export function extractDescendants(id: any, graph: any): any[]; +export function validate(graph: any): boolean; +export function findNonClusterChild(id: any, graph: any): any; +export function adjustClustersAndEdges(graph: any, depth: any): void; +export function extractor(graph: any, depth: any): void; +export function sortNodesByHierarchy(graph: any): any; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/nodes.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/nodes.d.ts new file mode 100644 index 0000000..ee89a22 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/nodes.d.ts @@ -0,0 +1,4 @@ +export function insertNode(elem: any, node: any, dir: any): Promise; +export function setNodeElem(elem: any, node: any): void; +export function clear(): void; +export function positionNode(node: any): any; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/shapes/note.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/shapes/note.d.ts new file mode 100644 index 0000000..7fc20dc --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/shapes/note.d.ts @@ -0,0 +1,2 @@ +export default note; +declare function note(parent: any, node: any): Promise; diff --git a/webroot/js/node_modules/mermaid/dist/dagre-wrapper/shapes/util.d.ts b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/shapes/util.d.ts new file mode 100644 index 0000000..c34d929 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/dagre-wrapper/shapes/util.d.ts @@ -0,0 +1,14 @@ +/** + * @param parent + * @param w + * @param h + * @param points + */ +export function insertPolygonShape(parent: any, w: any, h: any, points: any): any; +export function labelHelper(parent: any, node: any, _classes: any, isNode: any): Promise<{ + shapeSvg: any; + bbox: any; + halfPadding: number; + label: any; +}>; +export function updateNodeBounds(node: any, element: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/defaultConfig.d.ts b/webroot/js/node_modules/mermaid/dist/defaultConfig.d.ts new file mode 100644 index 0000000..7dd5262 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/defaultConfig.d.ts @@ -0,0 +1,12 @@ +import type { RequiredDeep } from 'type-fest'; +import type { MermaidConfig } from './config.type.js'; +/** + * Default mermaid configuration options. + * + * Please see the Mermaid config JSON Schema for the default JSON values. + * Non-JSON JS default values are listed in this file, e.g. functions, or + * `undefined` (explicitly set so that `configKeys` finds them). + */ +declare const config: RequiredDeep; +export declare const configKeys: Set; +export default config; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/comments.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/comments.d.ts new file mode 100644 index 0000000..6fe5494 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/comments.d.ts @@ -0,0 +1,6 @@ +/** + * Remove all lines starting with `%%` from the text that don't contain a `%%{` + * @param text - The text to remove comments from + * @returns cleaned text + */ +export declare const cleanupComments: (text: string) => string; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/comments.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/comments.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/comments.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/detectType.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/detectType.d.ts new file mode 100644 index 0000000..1de2d93 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/detectType.d.ts @@ -0,0 +1,42 @@ +import type { MermaidConfig } from '../config.type.js'; +import type { DetectorRecord, DiagramDetector, DiagramLoader, ExternalDiagramDefinition } from './types.js'; +export declare const detectors: Record; +/** + * Detects the type of the graph text. + * + * Takes into consideration the possible existence of an `%%init` directive + * + * @param text - The text defining the graph. For example: + * + * ```mermaid + * %%{initialize: {"startOnLoad": true, logLevel: "fatal" }}%% + * graph LR + * a-->b + * b-->c + * c-->d + * d-->e + * e-->f + * f-->g + * g-->h + * ``` + * + * @param config - The mermaid config. + * @returns A graph definition key + */ +export declare const detectType: (text: string, config?: MermaidConfig) => string; +/** + * Registers lazy-loaded diagrams to Mermaid. + * + * The diagram function is loaded asynchronously, so that diagrams are only loaded + * if the diagram is detected. + * + * @remarks + * Please note that the order of diagram detectors is important. + * The first detector to return `true` is the diagram that will be loaded + * and used, so put more specific detectors at the beginning! + * + * @param diagrams - Diagrams to lazy load, and their detectors, in order of importance. + */ +export declare const registerLazyLoadedDiagrams: (...diagrams: ExternalDiagramDefinition[]) => void; +export declare const addDetector: (key: string, detector: DiagramDetector, loader?: DiagramLoader) => void; +export declare const getDiagramLoader: (key: string) => DiagramLoader | undefined; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/diagram-orchestration.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/diagram-orchestration.d.ts new file mode 100644 index 0000000..a30cf02 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/diagram-orchestration.d.ts @@ -0,0 +1 @@ +export declare const addDiagrams: () => void; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/diagram-orchestration.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/diagram-orchestration.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/diagram-orchestration.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/diagramAPI.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/diagramAPI.d.ts new file mode 100644 index 0000000..f9bfc11 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/diagramAPI.d.ts @@ -0,0 +1,28 @@ +import type { DiagramDefinition, DiagramDetector } from './types.js'; +import * as _commonDb from '../diagrams/common/commonDb.js'; +export declare const log: Record; +export declare const setLogLevel: (level?: string | number) => void; +export declare const getConfig: () => import("../config.type.js").MermaidConfig; +export declare const sanitizeText: (text: string) => string; +export declare const setupGraphViewbox: (graph: any, svgElem: any, padding: any, useMaxWidth: any) => void; +export declare const getCommonDb: () => typeof _commonDb; +export interface Detectors { + [key: string]: DiagramDetector; +} +/** + * Registers the given diagram with Mermaid. + * + * Can be used for third-party custom diagrams. + * + * @param id - A unique ID for the given diagram. + * @param diagram - The diagram definition. + * @param detector - Function that returns `true` if a given mermaid text is this diagram definition. + */ +export declare const registerDiagram: (id: string, diagram: DiagramDefinition, detector?: DiagramDetector) => void; +export declare const getDiagram: (name: string) => DiagramDefinition; +export declare class DiagramNotFoundError extends Error { + constructor(name: string); +} diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/diagramAPI.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/diagramAPI.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/diagramAPI.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/frontmatter.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/frontmatter.d.ts new file mode 100644 index 0000000..e62a4ba --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/frontmatter.d.ts @@ -0,0 +1,18 @@ +import type { MermaidConfig } from '../config.type.js'; +interface FrontMatterMetadata { + title?: string; + displayMode?: string; + config?: MermaidConfig; +} +export interface FrontMatterResult { + text: string; + metadata: FrontMatterMetadata; +} +/** + * Extract and parse frontmatter from text, if present, and sets appropriate + * properties in the provided db. + * @param text - The text that may have a YAML frontmatter. + * @returns text with frontmatter stripped out + */ +export declare function extractFrontMatter(text: string): FrontMatterResult; +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/frontmatter.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/frontmatter.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/frontmatter.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/loadDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/loadDiagram.d.ts new file mode 100644 index 0000000..dc1cd3d --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/loadDiagram.d.ts @@ -0,0 +1 @@ +export declare const loadRegisteredDiagrams: () => Promise; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/regexes.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/regexes.d.ts new file mode 100644 index 0000000..5672014 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/regexes.d.ts @@ -0,0 +1,3 @@ +export declare const frontMatterRegex: RegExp; +export declare const directiveRegex: RegExp; +export declare const anyCommentRegex: RegExp; diff --git a/webroot/js/node_modules/mermaid/dist/diagram-api/types.d.ts b/webroot/js/node_modules/mermaid/dist/diagram-api/types.d.ts new file mode 100644 index 0000000..129667c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram-api/types.d.ts @@ -0,0 +1,84 @@ +import type { Diagram } from '../Diagram.js'; +import type { BaseDiagramConfig, MermaidConfig } from '../config.type.js'; +import type * as d3 from 'd3'; +export interface DiagramMetadata { + title?: string; + config?: MermaidConfig; +} +export interface InjectUtils { + _log: any; + _setLogLevel: any; + _getConfig: any; + _sanitizeText: any; + _setupGraphViewbox: any; + _commonDb: any; + /** @deprecated as directives will be pre-processed since https://github.com/mermaid-js/mermaid/pull/4759 */ + _parseDirective: any; +} +/** + * Generic Diagram DB that may apply to any diagram type. + */ +export interface DiagramDB { + getConfig?: () => BaseDiagramConfig | undefined; + clear?: () => void; + setDiagramTitle?: (title: string) => void; + getDiagramTitle?: () => string; + setAccTitle?: (title: string) => void; + getAccTitle?: () => string; + setAccDescription?: (describetion: string) => void; + getAccDescription?: () => string; + setDisplayMode?: (title: string) => void; + bindFunctions?: (element: Element) => void; +} +export interface DiagramStyleClassDef { + id: string; + styles?: string[]; + textStyles?: string[]; +} +export interface DiagramRenderer { + draw: DrawDefinition; + getClasses?: (text: string, diagram: Pick) => Record; +} +export interface DiagramDefinition { + db: DiagramDB; + renderer: DiagramRenderer; + parser: ParserDefinition; + styles?: any; + init?: (config: MermaidConfig) => void; + injectUtils?: (_log: InjectUtils['_log'], _setLogLevel: InjectUtils['_setLogLevel'], _getConfig: InjectUtils['_getConfig'], _sanitizeText: InjectUtils['_sanitizeText'], _setupGraphViewbox: InjectUtils['_setupGraphViewbox'], _commonDb: InjectUtils['_commonDb'], + /** @deprecated as directives will be pre-processed since https://github.com/mermaid-js/mermaid/pull/4759 */ + _parseDirective: InjectUtils['_parseDirective']) => void; +} +export interface DetectorRecord { + detector: DiagramDetector; + loader?: DiagramLoader; +} +export interface ExternalDiagramDefinition { + id: string; + detector: DiagramDetector; + loader: DiagramLoader; +} +export type DiagramDetector = (text: string, config?: MermaidConfig) => boolean; +export type DiagramLoader = () => Promise<{ + id: string; + diagram: DiagramDefinition; +}>; +/** + * Type for function draws diagram in the tag with id: id based on the graph definition in text. + * + * @param text - The text of the diagram. + * @param id - The id of the diagram which will be used as a DOM element id. + * @param version - MermaidJS version from package.json. + * @param diagramObject - A standard diagram containing the DB and the text and type etc of the diagram. + */ +export type DrawDefinition = (text: string, id: string, version: string, diagramObject: Diagram) => void | Promise; +export interface ParserDefinition { + parse: (text: string) => void; + parser: { + yy: DiagramDB; + }; +} +export type HTML = d3.Selection; +export type SVG = d3.Selection; +export type Group = d3.Selection; +export type DiagramStylesProvider = (options?: any) => string; diff --git a/webroot/js/node_modules/mermaid/dist/diagram.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagram.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagram.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Db.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Db.d.ts new file mode 100644 index 0000000..85ef8fb --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Db.d.ts @@ -0,0 +1,114 @@ +export function getC4Type(): any; +export function setC4Type(c4TypeParam: any): void; +export function addRel(type: any, from: any, to: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void; +export function addPersonOrSystem(typeC4Shape: any, alias: any, label: any, descr: any, sprite: any, tags: any, link: any): void; +export function addContainer(typeC4Shape: any, alias: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void; +export function addComponent(typeC4Shape: any, alias: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void; +export function addPersonOrSystemBoundary(alias: any, label: any, type: any, tags: any, link: any): void; +export function addContainerBoundary(alias: any, label: any, type: any, tags: any, link: any): void; +export function addDeploymentNode(nodeType: any, alias: any, label: any, type: any, descr: any, sprite: any, tags: any, link: any): void; +export function popBoundaryParseStack(): void; +export function updateElStyle(typeC4Shape: any, elementName: any, bgColor: any, fontColor: any, borderColor: any, shadowing: any, shape: any, sprite: any, techn: any, legendText: any, legendSprite: any): void; +export function updateRelStyle(typeC4Shape: any, from: any, to: any, textColor: any, lineColor: any, offsetX: any, offsetY: any): void; +export function updateLayoutConfig(typeC4Shape: any, c4ShapeInRowParam: any, c4BoundaryInRowParam: any): void; +export function getC4ShapeInRow(): number; +export function getC4BoundaryInRow(): number; +export function getCurrentBoundaryParse(): string; +export function getParentBoundaryParse(): string; +export function getC4ShapeArray(parentBoundary: any): any[]; +export function getC4Shape(alias: any): any; +export function getC4ShapeKeys(parentBoundary: any): string[]; +export function getBoundarys(parentBoundary: any): { + alias: string; + label: { + text: string; + }; + type: { + text: string; + }; + tags: null; + link: null; + parentBoundary: string; +}[]; +export function getRels(): any[]; +export function getTitle(): string; +export function setWrap(wrapSetting: any): void; +export function autoWrap(): boolean; +export function clear(): void; +export namespace LINETYPE { + let SOLID: number; + let DOTTED: number; + let NOTE: number; + let SOLID_CROSS: number; + let DOTTED_CROSS: number; + let SOLID_OPEN: number; + let DOTTED_OPEN: number; + let LOOP_START: number; + let LOOP_END: number; + let ALT_START: number; + let ALT_ELSE: number; + let ALT_END: number; + let OPT_START: number; + let OPT_END: number; + let ACTIVE_START: number; + let ACTIVE_END: number; + let PAR_START: number; + let PAR_AND: number; + let PAR_END: number; + let RECT_START: number; + let RECT_END: number; + let SOLID_POINT: number; + let DOTTED_POINT: number; +} +export namespace ARROWTYPE { + let FILLED: number; + let OPEN: number; +} +export namespace PLACEMENT { + let LEFTOF: number; + let RIGHTOF: number; + let OVER: number; +} +export function setTitle(txt: any): void; +declare namespace _default { + export { addPersonOrSystem }; + export { addPersonOrSystemBoundary }; + export { addContainer }; + export { addContainerBoundary }; + export { addComponent }; + export { addDeploymentNode }; + export { popBoundaryParseStack }; + export { addRel }; + export { updateElStyle }; + export { updateRelStyle }; + export { updateLayoutConfig }; + export { autoWrap }; + export { setWrap }; + export { getC4ShapeArray }; + export { getC4Shape }; + export { getC4ShapeKeys }; + export { getBoundarys }; + export { getCurrentBoundaryParse }; + export { getParentBoundaryParse }; + export { getRels }; + export { getTitle }; + export { getC4Type }; + export { getC4ShapeInRow }; + export { getC4BoundaryInRow }; + export { setAccTitle }; + export { getAccTitle }; + export { getAccDescription }; + export { setAccDescription }; + export function getConfig(): import("../../config.type.js").C4DiagramConfig | undefined; + export { clear }; + export { LINETYPE }; + export { ARROWTYPE }; + export { PLACEMENT }; + export { setTitle }; + export { setC4Type }; +} +export default _default; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccTitle } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Detector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Detector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Detector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Diagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Diagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Diagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Renderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Renderer.d.ts new file mode 100644 index 0000000..5101d04 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/c4/c4Renderer.d.ts @@ -0,0 +1,12 @@ +export function setConf(cnf: any): void; +export function drawBoundary(diagram: any, boundary: any, bounds: any): void; +export function drawC4ShapeArray(currentBounds: any, diagram: any, c4ShapeArray: any, c4ShapeKeys: any): void; +export function drawRels(diagram: any, rels: any, getC4ShapeObj: any, diagObj: any): void; +export function draw(_text: any, id: any, _version: any, diagObj: any): void; +declare namespace _default { + export { drawC4ShapeArray as drawPersonOrSystemArray }; + export { drawBoundary }; + export { setConf }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/c4/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/c4/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/c4/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/c4/svgDraw.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/c4/svgDraw.d.ts new file mode 100644 index 0000000..ab7e85f --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/c4/svgDraw.d.ts @@ -0,0 +1,36 @@ +export function drawRect(elem: any, rectData: any): import("../common/commonTypes.js").D3RectElement; +export function drawImage(elem: any, width: any, height: any, x: any, y: any, link: any): void; +export function drawRels(elem: any, rels: any, conf: any): void; +export function drawC4Shape(elem: any, c4Shape: any, conf: any): any; +export function insertDatabaseIcon(elem: any): void; +export function insertComputerIcon(elem: any): void; +export function insertClockIcon(elem: any): void; +export function insertArrowHead(elem: any): void; +export function insertArrowEnd(elem: any): void; +export function insertArrowFilledHead(elem: any): void; +export function insertDynamicNumber(elem: any): void; +export function insertArrowCrossHead(elem: any): void; +declare namespace _default { + export { drawRect }; + export { drawBoundary }; + export { drawC4Shape }; + export { drawRels }; + export { drawImage }; + export { insertArrowHead }; + export { insertArrowEnd }; + export { insertArrowFilledHead }; + export { insertDynamicNumber }; + export { insertArrowCrossHead }; + export { insertDatabaseIcon }; + export { insertComputerIcon }; + export { insertClockIcon }; +} +export default _default; +/** + * Draws an boundary in the diagram + * + * @param {any} elem - The diagram we'll draw to. + * @param {any} boundary - The boundary to draw. + * @param {any} conf - DrawText implementation discriminator object + */ +declare function drawBoundary(elem: any, boundary: any, conf: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDb.d.ts new file mode 100644 index 0000000..10f10f6 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDb.d.ts @@ -0,0 +1,142 @@ +import type { ClassRelation, ClassNode, ClassNote, ClassMap, NamespaceMap, NamespaceNode } from './classTypes.js'; +export declare const setClassLabel: (_id: string, label: string) => void; +/** + * Function called by parser when a node definition has been found. + * + * @param id - Id of the class to add + * @public + */ +export declare const addClass: (_id: string) => void; +/** + * Function to lookup domId from id in the graph definition. + * + * @param id - class ID to lookup + * @public + */ +export declare const lookUpDomId: (_id: string) => string; +export declare const clear: () => void; +export declare const getClass: (id: string) => ClassNode; +export declare const getClasses: () => ClassMap; +export declare const getRelations: () => ClassRelation[]; +export declare const getNotes: () => ClassNote[]; +export declare const addRelation: (relation: ClassRelation) => void; +/** + * Adds an annotation to the specified class Annotations mark special properties of the given type + * (like 'interface' or 'service') + * + * @param className - The class name + * @param annotation - The name of the annotation without any brackets + * @public + */ +export declare const addAnnotation: (className: string, annotation: string) => void; +/** + * Adds a member to the specified class + * + * @param className - The class name + * @param member - The full name of the member. If the member is enclosed in `<>` it is + * treated as an annotation If the member is ending with a closing bracket ) it is treated as a + * method Otherwise the member will be treated as a normal property + * @public + */ +export declare const addMember: (className: string, member: string) => void; +export declare const addMembers: (className: string, members: string[]) => void; +export declare const addNote: (text: string, className: string) => void; +export declare const cleanupLabel: (label: string) => string; +/** + * Called by parser when a special node is found, e.g. a clickable element. + * + * @param ids - Comma separated list of ids + * @param className - Class to add + */ +export declare const setCssClass: (ids: string, className: string) => void; +export declare const getTooltip: (id: string, namespace?: string) => string | undefined; +/** + * Called by parser when a link is found. Adds the URL to the vertex data. + * + * @param ids - Comma separated list of ids + * @param linkStr - URL to create a link for + * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file + */ +export declare const setLink: (ids: string, linkStr: string, target: string) => void; +/** + * Called by parser when a click definition is found. Registers an event handler. + * + * @param ids - Comma separated list of ids + * @param functionName - Function to be called on click + * @param functionArgs - Function args the function should be called with + */ +export declare const setClickEvent: (ids: string, functionName: string, functionArgs: string) => void; +export declare const bindFunctions: (element: Element) => void; +export declare const lineType: { + LINE: number; + DOTTED_LINE: number; +}; +export declare const relationType: { + AGGREGATION: number; + EXTENSION: number; + COMPOSITION: number; + DEPENDENCY: number; + LOLLIPOP: number; +}; +/** + * Function called by parser when a namespace definition has been found. + * + * @param id - Id of the namespace to add + * @public + */ +export declare const addNamespace: (id: string) => void; +/** + * Function called by parser when a namespace definition has been found. + * + * @param id - Id of the namespace to add + * @param classNames - Ids of the class to add + * @public + */ +export declare const addClassesToNamespace: (id: string, classNames: string[]) => void; +declare const _default: { + setAccTitle: (txt: string) => void; + getAccTitle: () => string; + getAccDescription: () => string; + setAccDescription: (txt: string) => void; + getConfig: () => import("../../config.type.js").ClassDiagramConfig | undefined; + addClass: (_id: string) => void; + bindFunctions: (element: Element) => void; + clear: () => void; + getClass: (id: string) => ClassNode; + getClasses: () => ClassMap; + getNotes: () => ClassNote[]; + addAnnotation: (className: string, annotation: string) => void; + addNote: (text: string, className: string) => void; + getRelations: () => ClassRelation[]; + addRelation: (relation: ClassRelation) => void; + getDirection: () => string; + setDirection: (dir: string) => void; + addMember: (className: string, member: string) => void; + addMembers: (className: string, members: string[]) => void; + cleanupLabel: (label: string) => string; + lineType: { + LINE: number; + DOTTED_LINE: number; + }; + relationType: { + AGGREGATION: number; + EXTENSION: number; + COMPOSITION: number; + DEPENDENCY: number; + LOLLIPOP: number; + }; + setClickEvent: (ids: string, functionName: string, functionArgs: string) => void; + setCssClass: (ids: string, className: string) => void; + setLink: (ids: string, linkStr: string, target: string) => void; + getTooltip: (id: string, namespace?: string | undefined) => string | undefined; + setTooltip: (ids: string, tooltip?: string | undefined) => void; + lookUpDomId: (_id: string) => string; + setDiagramTitle: (txt: string) => void; + getDiagramTitle: () => string; + setClassLabel: (_id: string, label: string) => void; + addNamespace: (id: string) => void; + addClassesToNamespace: (id: string, classNames: string[]) => void; + getNamespace: (name: string) => NamespaceNode; + getNamespaces: () => NamespaceMap; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classDetector-V2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDetector-V2.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDetector-V2.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram-v2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram-v2.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram-v2.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classDiagram.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classRenderer-v2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classRenderer-v2.d.ts new file mode 100644 index 0000000..ff137bc --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classRenderer-v2.d.ts @@ -0,0 +1,57 @@ +import * as graphlib from 'dagre-d3-es/src/graphlib/index.js'; +import type { ClassRelation, ClassNote, ClassMap, NamespaceMap } from './classTypes.js'; +/** + * Function that adds the vertices found during parsing to the graph to be rendered. + * + * @param namespaces - Object containing the vertices. + * @param g - The graph that is to be drawn. + * @param _id - id of the graph + * @param diagObj - The diagram object + */ +export declare const addNamespaces: (namespaces: NamespaceMap, g: graphlib.Graph, _id: string, diagObj: any) => void; +/** + * Function that adds the vertices found during parsing to the graph to be rendered. + * + * @param classes - Object containing the vertices. + * @param g - The graph that is to be drawn. + * @param _id - id of the graph + * @param diagObj - The diagram object + * @param parent - id of the parent namespace, if it exists + */ +export declare const addClasses: (classes: ClassMap, g: graphlib.Graph, _id: string, diagObj: any, parent?: string) => void; +/** + * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered. + * + * @param notes - Object containing the additional vertices (notes). + * @param g - The graph that is to be drawn. + * @param startEdgeId - starting index for note edge + * @param classes - Classes + */ +export declare const addNotes: (notes: ClassNote[], g: graphlib.Graph, startEdgeId: number, classes: ClassMap) => void; +/** + * Add edges to graph based on parsed graph definition + * + * @param relations - + * @param g - The graph object + */ +export declare const addRelations: (relations: ClassRelation[], g: graphlib.Graph) => void; +/** + * Merges the value of `conf` with the passed `cnf` + * + * @param cnf - Config to merge + */ +export declare const setConf: (cnf: any) => void; +/** + * Draws a class diagram in the tag with id: id based on the definition in text. + * + * @param text - + * @param id - + * @param _version - + * @param diagObj - + */ +export declare const draw: (text: string, id: string, _version: string, diagObj: any) => Promise; +declare const _default: { + setConf: (cnf: any) => void; + draw: (text: string, id: string, _version: string, diagObj: any) => Promise; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classRenderer.d.ts new file mode 100644 index 0000000..b6532d5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classRenderer.d.ts @@ -0,0 +1,5 @@ +export function draw(text: string, id: string, _version: any, diagObj: any): void; +declare namespace _default { + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classTypes.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classTypes.d.ts new file mode 100644 index 0000000..dda091b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classTypes.d.ts @@ -0,0 +1,77 @@ +export interface ClassNode { + id: string; + type: string; + label: string; + cssClasses: string[]; + methods: ClassMember[]; + members: ClassMember[]; + annotations: string[]; + domId: string; + parent?: string; + link?: string; + linkTarget?: string; + haveCallback?: boolean; + tooltip?: string; +} +export type Visibility = '#' | '+' | '~' | '-' | ''; +export declare const visibilityValues: string[]; +/** + * Parses and stores class diagram member variables/methods. + * + */ +export declare class ClassMember { + id: string; + cssStyle: string; + memberType: 'method' | 'attribute'; + visibility: Visibility; + /** + * denote if static or to determine which css class to apply to the node + * @defaultValue '' + */ + classifier: string; + /** + * parameters for method + * @defaultValue '' + */ + parameters: string; + /** + * return type for method + * @defaultValue '' + */ + returnType: string; + constructor(input: string, memberType: 'method' | 'attribute'); + getDisplayDetails(): { + displayText: string; + cssStyle: string; + }; + parseMember(input: string): void; + parseClassifier(): "" | "font-style:italic;" | "text-decoration:underline;"; +} +export interface ClassNote { + id: string; + class: string; + text: string; +} +export type ClassRelation = { + id1: string; + id2: string; + relationTitle1: string; + relationTitle2: string; + type: string; + title: string; + text: string; + style: string[]; + relation: { + type1: number; + type2: number; + lineType: number; + }; +}; +export interface NamespaceNode { + id: string; + domId: string; + classes: ClassMap; + children: NamespaceMap; +} +export type ClassMap = Record; +export type NamespaceMap = Record; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/classTypes.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/classTypes.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/classTypes.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/class/svgDraw.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/class/svgDraw.d.ts new file mode 100644 index 0000000..661cdf3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/class/svgDraw.d.ts @@ -0,0 +1,25 @@ +export function drawEdge(elem: any, path: any, relation: any, conf: any, diagObj: any): void; +export function drawClass(elem: SVGSVGElement, classDef: any, conf: any, diagObj: any): { + id: any; + label: any; + width: number; + height: number; +}; +export function getClassTitleString(classDef: any): any; +export function drawNote(elem: SVGSVGElement, note: { + id: string; + text: string; + class: string; +}, conf: any, diagObj: any): { + id: string; + text: string; + width: number; + height: number; +}; +declare namespace _default { + export { getClassTitleString }; + export { drawClass }; + export { drawEdge }; + export { drawNote }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/common/common.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/common/common.d.ts new file mode 100644 index 0000000..6c93e41 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/common/common.d.ts @@ -0,0 +1,82 @@ +import type { MermaidConfig } from '../../config.type.js'; +export declare const lineBreakRegex: RegExp; +/** + * Gets the rows of lines in a string + * + * @param s - The string to check the lines for + * @returns The rows in that string + */ +export declare const getRows: (s?: string) => string[]; +/** + * Removes script tags from a text + * + * @param txt - The text to sanitize + * @returns The safer text + */ +export declare const removeScript: (txt: string) => string; +export declare const sanitizeText: (text: string, config: MermaidConfig) => string; +export declare const sanitizeTextOrArray: (a: string | string[] | string[][], config: MermaidConfig) => string | string[]; +/** + * Whether or not a text has any line breaks + * + * @param text - The text to test + * @returns Whether or not the text has breaks + */ +export declare const hasBreaks: (text: string) => boolean; +/** + * Splits on
tags + * + * @param text - Text to split + * @returns List of lines as strings + */ +export declare const splitBreaks: (text: string) => string[]; +/** + * Converts a string/boolean into a boolean + * + * @param val - String or boolean to convert + * @returns The result from the input + */ +export declare const evaluate: (val?: string | boolean) => boolean; +/** + * Wrapper around Math.max which removes non-numeric values + * Returns the larger of a set of supplied numeric expressions. + * @param values - Numeric expressions to be evaluated + * @returns The smaller value + */ +export declare const getMax: (...values: number[]) => number; +/** + * Wrapper around Math.min which removes non-numeric values + * Returns the smaller of a set of supplied numeric expressions. + * @param values - Numeric expressions to be evaluated + * @returns The smaller value + */ +export declare const getMin: (...values: number[]) => number; +/** + * Makes generics in typescript syntax + * + * @example + * Array of array of strings in typescript syntax + * + * ```js + * // returns "Array>" + * parseGenericTypes('Array~Array~string~~'); + * ``` + * @param text - The text to convert + * @returns The converted string + */ +export declare const parseGenericTypes: (input: string) => string; +export declare const countOccurrence: (string: string, substring: string) => number; +declare const _default: { + getRows: (s?: string | undefined) => string[]; + sanitizeText: (text: string, config: MermaidConfig) => string; + sanitizeTextOrArray: (a: string | string[] | string[][], config: MermaidConfig) => string | string[]; + hasBreaks: (text: string) => boolean; + splitBreaks: (text: string) => string[]; + lineBreakRegex: RegExp; + removeScript: (txt: string) => string; + getUrl: (useAbsolute: boolean) => string; + evaluate: (val?: string | boolean | undefined) => boolean; + getMax: (...values: number[]) => number; + getMin: (...values: number[]) => number; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/common/common.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/common/common.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/common/common.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/common/commonDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/common/commonDb.d.ts new file mode 100644 index 0000000..143f5ee --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/common/commonDb.d.ts @@ -0,0 +1,7 @@ +export declare const clear: () => void; +export declare const setAccTitle: (txt: string) => void; +export declare const getAccTitle: () => string; +export declare const setAccDescription: (txt: string) => void; +export declare const getAccDescription: () => string; +export declare const setDiagramTitle: (txt: string) => void; +export declare const getDiagramTitle: () => string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/common/commonTypes.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/common/commonTypes.d.ts new file mode 100644 index 0000000..99d977f --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/common/commonTypes.d.ts @@ -0,0 +1,50 @@ +export interface RectData { + x: number; + y: number; + fill: string; + width: number; + height: number; + stroke: string; + class?: string; + color?: string; + rx?: number; + ry?: number; + attrs?: Record; + anchor?: string; +} +export interface Bound { + startx: number; + stopx: number; + starty: number; + stopy: number; + fill: string; + stroke: string; +} +export interface TextData { + x: number; + y: number; + anchor: string; + text: string; + textMargin: number; + class?: string; +} +export interface TextObject { + x: number; + y: number; + width: number; + height: number; + fill?: string; + anchor?: string; + 'text-anchor': string; + style: string; + textMargin: number; + rx: number; + ry: number; + tspan: boolean; + valign?: string; +} +export type D3RectElement = d3.Selection; +export type D3UseElement = d3.Selection; +export type D3ImageElement = d3.Selection; +export type D3TextElement = d3.Selection; +export type D3TSpanElement = d3.Selection; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/common/svgDrawCommon.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/common/svgDrawCommon.d.ts new file mode 100644 index 0000000..3d864ab --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/common/svgDrawCommon.d.ts @@ -0,0 +1,15 @@ +import type { Group, SVG } from '../../diagram-api/types.js'; +import type { Bound, D3RectElement, D3TextElement, RectData, TextData, TextObject } from './commonTypes.js'; +export declare const drawRect: (element: SVG | Group, rectData: RectData) => D3RectElement; +/** + * Draws a background rectangle + * + * @param element - Diagram (reference for bounds) + * @param bounds - Shape of the rectangle + */ +export declare const drawBackgroundRect: (element: SVG | Group, bounds: Bound) => void; +export declare const drawText: (element: SVG | Group, textData: TextData) => D3TextElement; +export declare const drawImage: (elem: SVG | Group, x: number, y: number, link: string) => void; +export declare const drawEmbeddedImage: (element: SVG | Group, x: number, y: number, link: string) => void; +export declare const getNoteRect: () => RectData; +export declare const getTextObj: () => TextObject; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/er/erDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/er/erDb.d.ts new file mode 100644 index 0000000..ffeca06 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/er/erDb.d.ts @@ -0,0 +1,49 @@ +declare namespace _default { + export { Cardinality }; + export { Identification }; + export function getConfig(): import("../../config.type.js").ErDiagramConfig | undefined; + export { addEntity }; + export { addAttributes }; + export { getEntities }; + export { addRelationship }; + export { getRelationships }; + export { clear }; + export { setAccTitle }; + export { getAccTitle }; + export { setAccDescription }; + export { getAccDescription }; + export { setDiagramTitle }; + export { getDiagramTitle }; +} +export default _default; +declare namespace Cardinality { + let ZERO_OR_ONE: string; + let ZERO_OR_MORE: string; + let ONE_OR_MORE: string; + let ONLY_ONE: string; + let MD_PARENT: string; +} +declare namespace Identification { + let NON_IDENTIFYING: string; + let IDENTIFYING: string; +} +declare function addEntity(name: any, alias?: undefined): any; +declare function addAttributes(entityName: any, attribs: any): void; +declare function getEntities(): {}; +/** + * Add a relationship + * + * @param entA The first entity in the relationship + * @param rolA The role played by the first entity in relation to the second + * @param entB The second entity in the relationship + * @param rSpec The details of the relationship between the two entities + */ +declare function addRelationship(entA: any, rolA: any, entB: any, rSpec: any): void; +declare function getRelationships(): any[]; +declare function clear(): void; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccTitle } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +import { setDiagramTitle } from '../common/commonDb.js'; +import { getDiagramTitle } from '../common/commonDb.js'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/er/erDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/er/erDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/er/erDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/er/erDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/er/erDiagram.d.ts new file mode 100644 index 0000000..716fa3c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/er/erDiagram.d.ts @@ -0,0 +1,34 @@ +export declare const diagram: { + parser: any; + db: { + Cardinality: { + ZERO_OR_ONE: string; + ZERO_OR_MORE: string; + ONE_OR_MORE: string; + ONLY_ONE: string; + MD_PARENT: string; + }; + Identification: { + NON_IDENTIFYING: string; + IDENTIFYING: string; + }; + getConfig: () => import("../../config.type.js").ErDiagramConfig | undefined; + addEntity: (name: any, alias?: undefined) => any; + addAttributes: (entityName: any, attribs: any) => void; + getEntities: () => {}; + addRelationship: (entA: any, rolA: any, entB: any, rSpec: any) => void; + getRelationships: () => any[]; + clear: () => void; + setAccTitle: (txt: string) => void; + getAccTitle: () => string; + setAccDescription: (txt: string) => void; + getAccDescription: () => string; + setDiagramTitle: (txt: string) => void; + getDiagramTitle: () => string; + }; + renderer: { + setConf: (cnf: any) => void; + draw: (text: any, id: any, _version: any, diagObj: any) => void; + }; + styles: (options: any) => string; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/er/erMarkers.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/er/erMarkers.d.ts new file mode 100644 index 0000000..fb88be2 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/er/erMarkers.d.ts @@ -0,0 +1,24 @@ +declare namespace _default { + export { ERMarkers }; + export { insertMarkers }; +} +export default _default; +declare namespace ERMarkers { + let ONLY_ONE_START: string; + let ONLY_ONE_END: string; + let ZERO_OR_ONE_START: string; + let ZERO_OR_ONE_END: string; + let ONE_OR_MORE_START: string; + let ONE_OR_MORE_END: string; + let ZERO_OR_MORE_START: string; + let ZERO_OR_MORE_END: string; + let MD_PARENT_END: string; + let MD_PARENT_START: string; +} +/** + * Put the markers into the svg DOM for later use with edge paths + * + * @param elem + * @param conf + */ +declare function insertMarkers(elem: any, conf: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/er/erRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/er/erRenderer.d.ts new file mode 100644 index 0000000..247bfde --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/er/erRenderer.d.ts @@ -0,0 +1,19 @@ +/** + * Return a unique id based on the given string. Start with the prefix, then a hyphen, then the + * simplified str, then a hyphen, then a unique uuid based on the str. (Hyphens are only included if needed.) + * Although the official XML standard for ids says that many more characters are valid in the id, + * this keeps things simple by accepting only A-Za-z0-9. + * + * @param {string} str Given string to use as the basis for the id. Default is `''` + * @param {string} prefix String to put at the start, followed by '-'. Default is `''` + * @returns {string} + * @see https://www.w3.org/TR/xml/#NT-Name + */ +export function generateId(str?: string, prefix?: string): string; +export function setConf(cnf: any): void; +export function draw(text: any, id: any, _version: any, diagObj: any): void; +declare namespace _default { + export { setConf }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/er/erRenderer.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/er/erRenderer.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/er/erRenderer.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/er/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/er/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/er/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/error/errorDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/error/errorDiagram.d.ts new file mode 100644 index 0000000..4c733f1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/error/errorDiagram.d.ts @@ -0,0 +1,3 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +declare const diagram: DiagramDefinition; +export default diagram; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/error/errorRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/error/errorRenderer.d.ts new file mode 100644 index 0000000..ca452d3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/error/errorRenderer.d.ts @@ -0,0 +1,12 @@ +/** + * Draws a an info picture in the tag with id: id based on the graph definition in text. + * + * @param _text - Mermaid graph definition. + * @param id - The text for the error + * @param version - The version + */ +export declare const draw: (_text: string, id: string, version: string) => void; +export declare const renderer: { + draw: (_text: string, id: string, version: string) => void; +}; +export default renderer; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/detector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/detector.d.ts new file mode 100644 index 0000000..487b548 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/detector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/detector.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/detector.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/detector.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/flowRenderer-elk.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/flowRenderer-elk.d.ts new file mode 100644 index 0000000..153b508 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/flowRenderer-elk.d.ts @@ -0,0 +1,10 @@ +export function setConf(cnf: any): void; +export function addVertices(vert: any, svgId: any, root: any, doc: any, diagObj: any, parentLookupDb: any, graph: any): Promise; +export function addEdges(edges: object, diagObj: any, graph: any, svg: any): any; +export function getClasses(text: any, diagObj: any): Record; +export function draw(text: any, id: any, _version: any, diagObj: any): Promise; +declare namespace _default { + export { getClasses }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/flowchart-elk-definition.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/flowchart-elk-definition.d.ts new file mode 100644 index 0000000..a3fc657 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/flowchart-elk-definition.d.ts @@ -0,0 +1,10 @@ +import * as db from '../flowDb.js'; +export declare const diagram: { + db: typeof db; + renderer: { + getClasses: (text: any, diagObj: any) => Record; + draw: (text: any, id: any, _version: any, diagObj: any) => Promise; + }; + parser: any; + styles: (options: import("./styles.js").FlowChartStyleOptions) => string; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/render-utils.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/render-utils.d.ts new file mode 100644 index 0000000..b122751 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/render-utils.d.ts @@ -0,0 +1,5 @@ +export interface TreeData { + parentById: Record; + childrenById: Record; +} +export declare const findCommonAncestor: (id1: string, id2: string, treeData: TreeData) => string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/render-utils.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/render-utils.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/render-utils.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/styles.d.ts new file mode 100644 index 0000000..651501c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/elk/styles.d.ts @@ -0,0 +1,19 @@ +/** Returns the styles given options */ +export interface FlowChartStyleOptions { + arrowheadColor: string; + border2: string; + clusterBkg: string; + clusterBorder: string; + edgeLabelBackground: string; + fontFamily: string; + lineColor: string; + mainBkg: string; + nodeBorder: string; + nodeTextColor: string; + tertiaryColor: string; + textColor: string; + titleColor: string; + [key: string]: string; +} +declare const getStyles: (options: FlowChartStyleOptions) => string; +export default getStyles; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowChartShapes.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowChartShapes.d.ts new file mode 100644 index 0000000..70c9d04 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowChartShapes.d.ts @@ -0,0 +1,9 @@ +/** @param render */ +export function addToRender(render: any): void; +/** @param addShape */ +export function addToRenderV2(addShape: any): void; +declare namespace _default { + export { addToRender }; + export { addToRenderV2 }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDb.d.ts new file mode 100644 index 0000000..ae72e1d --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDb.d.ts @@ -0,0 +1,87 @@ +export function lookUpDomId(id: any): any; +export function addVertex(_id: any, textObj: any, type: any, style: any, classes: any, dir: any, props?: {}): void; +export function addSingleLink(_start: any, _end: any, type: any): void; +export function addLink(_start: any, _end: any, type: any): void; +export function updateLinkInterpolate(positions: any, interp: any): void; +export function updateLink(positions: any, style: any): void; +export function addClass(ids: any, style: any): void; +export function setDirection(dir: any): void; +export function setClass(ids: any, className: any): void; +export function setLink(ids: any, linkStr: any, target: any): void; +export function getTooltip(id: any): any; +export function setClickEvent(ids: any, functionName: any, functionArgs: any): void; +export function bindFunctions(element: any): void; +export function getDirection(): any; +export function getVertices(): {} | any | any; +export function getEdges(): {} | any | any[]; +export function getClasses(): {} | any | any; +export function clear(ver?: string): void; +export function setGen(ver: any): void; +export function defaultStyle(): string; +export function addSubGraph(_id: any, list: any, _title: any): any; +export function getDepthFirstPos(pos: any): any; +export function indexNodes(): void; +export function getSubGraphs(): any[]; +export function firstGraph(): boolean; +export function destructLink(_str: any, _startStr: any): { + type: string; + stroke: string; +}; +export namespace lex { + export { firstGraph }; +} +declare namespace _default { + export function defaultConfig(): import("../../config.type.js").FlowchartDiagramConfig | undefined; + export { setAccTitle }; + export { getAccTitle }; + export { getAccDescription }; + export { setAccDescription }; + export { addVertex }; + export { lookUpDomId }; + export { addLink }; + export { updateLinkInterpolate }; + export { updateLink }; + export { addClass }; + export { setDirection }; + export { setClass }; + export { setTooltip }; + export { getTooltip }; + export { setClickEvent }; + export { setLink }; + export { bindFunctions }; + export { getDirection }; + export { getVertices }; + export { getEdges }; + export { getClasses }; + export { clear }; + export { setGen }; + export { defaultStyle }; + export { addSubGraph }; + export { getDepthFirstPos }; + export { indexNodes }; + export { getSubGraphs }; + export { destructLink }; + export { lex }; + export { exists }; + export { makeUniq }; + export { setDiagramTitle }; + export { getDiagramTitle }; +} +export default _default; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccTitle } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +declare function setTooltip(ids: any, tooltip: any): void; +declare function exists(allSgs: any, _id: any): boolean; +/** + * Deletes an id from all subgraphs + * + * @param sg + * @param allSubgraphs + */ +declare function makeUniq(sg: any, allSubgraphs: any): { + nodes: any[]; +}; +import { setDiagramTitle } from '../common/commonDb.js'; +import { getDiagramTitle } from '../common/commonDb.js'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDetector-v2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDetector-v2.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDetector-v2.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDiagram-v2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDiagram-v2.d.ts new file mode 100644 index 0000000..7857fad --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDiagram-v2.d.ts @@ -0,0 +1,57 @@ +import type { MermaidConfig } from '../../config.type.js'; +export declare const diagram: { + parser: any; + db: { + defaultConfig: () => import("../../config.type.js").FlowchartDiagramConfig | undefined; + setAccTitle: (txt: string) => void; + getAccTitle: () => string; + getAccDescription: () => string; + setAccDescription: (txt: string) => void; + addVertex: (_id: any, textObj: any, type: any, style: any, classes: any, dir: any, props?: {}) => void; + lookUpDomId: (id: any) => any; + addLink: (_start: any, _end: any, type: any) => void; + updateLinkInterpolate: (positions: any, interp: any) => void; + updateLink: (positions: any, style: any) => void; + addClass: (ids: any, style: any) => void; + setDirection: (dir: any) => void; + setClass: (ids: any, className: any) => void; + setTooltip: (ids: any, tooltip: any) => void; + getTooltip: (id: any) => any; + setClickEvent: (ids: any, functionName: any, functionArgs: any) => void; + setLink: (ids: any, linkStr: any, target: any) => void; + bindFunctions: (element: any) => void; + getDirection: () => any; + getVertices: () => any; + getEdges: () => any; + getClasses: () => any; + clear: (ver?: string) => void; + setGen: (ver: any) => void; + defaultStyle: () => string; + addSubGraph: (_id: any, list: any, _title: any) => any; + getDepthFirstPos: (pos: any) => any; + indexNodes: () => void; + getSubGraphs: () => any[]; + destructLink: (_str: any, _startStr: any) => { + type: string; + stroke: string; + }; + lex: { + firstGraph: () => boolean; + }; + exists: (allSgs: any, _id: any) => boolean; + makeUniq: (sg: any, allSubgraphs: any) => { + nodes: any[]; + }; + setDiagramTitle: (txt: string) => void; + getDiagramTitle: () => string; + }; + renderer: { + setConf: (cnf: any) => void; + addVertices: (vert: any, g: any, svgId: any, root: any, doc: any, diagObj: any) => void; + addEdges: (edges: object, g: object, diagObj: any) => void; + getClasses: (text: any, diagObj: any) => Record; + draw: (text: any, id: any, _version: any, diagObj: any) => Promise; + }; + styles: (options: import("./styles.js").FlowChartStyleOptions) => string; + init: (cnf: MermaidConfig) => void; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDiagram.d.ts new file mode 100644 index 0000000..7857fad --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowDiagram.d.ts @@ -0,0 +1,57 @@ +import type { MermaidConfig } from '../../config.type.js'; +export declare const diagram: { + parser: any; + db: { + defaultConfig: () => import("../../config.type.js").FlowchartDiagramConfig | undefined; + setAccTitle: (txt: string) => void; + getAccTitle: () => string; + getAccDescription: () => string; + setAccDescription: (txt: string) => void; + addVertex: (_id: any, textObj: any, type: any, style: any, classes: any, dir: any, props?: {}) => void; + lookUpDomId: (id: any) => any; + addLink: (_start: any, _end: any, type: any) => void; + updateLinkInterpolate: (positions: any, interp: any) => void; + updateLink: (positions: any, style: any) => void; + addClass: (ids: any, style: any) => void; + setDirection: (dir: any) => void; + setClass: (ids: any, className: any) => void; + setTooltip: (ids: any, tooltip: any) => void; + getTooltip: (id: any) => any; + setClickEvent: (ids: any, functionName: any, functionArgs: any) => void; + setLink: (ids: any, linkStr: any, target: any) => void; + bindFunctions: (element: any) => void; + getDirection: () => any; + getVertices: () => any; + getEdges: () => any; + getClasses: () => any; + clear: (ver?: string) => void; + setGen: (ver: any) => void; + defaultStyle: () => string; + addSubGraph: (_id: any, list: any, _title: any) => any; + getDepthFirstPos: (pos: any) => any; + indexNodes: () => void; + getSubGraphs: () => any[]; + destructLink: (_str: any, _startStr: any) => { + type: string; + stroke: string; + }; + lex: { + firstGraph: () => boolean; + }; + exists: (allSgs: any, _id: any) => boolean; + makeUniq: (sg: any, allSubgraphs: any) => { + nodes: any[]; + }; + setDiagramTitle: (txt: string) => void; + getDiagramTitle: () => string; + }; + renderer: { + setConf: (cnf: any) => void; + addVertices: (vert: any, g: any, svgId: any, root: any, doc: any, diagObj: any) => void; + addEdges: (edges: object, g: object, diagObj: any) => void; + getClasses: (text: any, diagObj: any) => Record; + draw: (text: any, id: any, _version: any, diagObj: any) => Promise; + }; + styles: (options: import("./styles.js").FlowChartStyleOptions) => string; + init: (cnf: MermaidConfig) => void; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowRenderer-v2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowRenderer-v2.d.ts new file mode 100644 index 0000000..6925962 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowRenderer-v2.d.ts @@ -0,0 +1,13 @@ +export function setConf(cnf: any): void; +export function addVertices(vert: any, g: any, svgId: any, root: any, doc: any, diagObj: any): void; +export function addEdges(edges: object, g: object, diagObj: any): void; +export function getClasses(text: any, diagObj: any): Record; +export function draw(text: any, id: any, _version: any, diagObj: any): Promise; +declare namespace _default { + export { setConf }; + export { addVertices }; + export { addEdges }; + export { getClasses }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowRenderer.d.ts new file mode 100644 index 0000000..deea32f --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/flowRenderer.d.ts @@ -0,0 +1,13 @@ +export function setConf(cnf: any): void; +export function addVertices(vert: any, g: any, svgId: any, root: any, _doc: any, diagObj: any): void; +export function addEdges(edges: object, g: object, diagObj: any): void; +export function getClasses(text: any, diagObj: any): Record; +export function draw(text: any, id: any, _version: any, diagObj: any): void; +declare namespace _default { + export { setConf }; + export { addVertices }; + export { addEdges }; + export { getClasses }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/styles.d.ts new file mode 100644 index 0000000..73918ae --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/flowchart/styles.d.ts @@ -0,0 +1,18 @@ +/** Returns the styles given options */ +export interface FlowChartStyleOptions { + arrowheadColor: string; + border2: string; + clusterBkg: string; + clusterBorder: string; + edgeLabelBackground: string; + fontFamily: string; + lineColor: string; + mainBkg: string; + nodeBorder: string; + nodeTextColor: string; + tertiaryColor: string; + textColor: string; + titleColor: string; +} +declare const getStyles: (options: FlowChartStyleOptions) => string; +export default getStyles; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDb.d.ts new file mode 100644 index 0000000..fd13183 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDb.d.ts @@ -0,0 +1,106 @@ +export function clear(): void; +export function setAxisFormat(txt: any): void; +export function getAxisFormat(): string; +export function setTickInterval(txt: any): void; +export function getTickInterval(): any; +export function setTodayMarker(txt: any): void; +export function getTodayMarker(): string; +export function setDateFormat(txt: any): void; +export function enableInclusiveEndDates(): void; +export function endDatesAreInclusive(): boolean; +export function enableTopAxis(): void; +export function topAxisEnabled(): boolean; +export function setDisplayMode(txt: any): void; +export function getDisplayMode(): string; +export function getDateFormat(): string; +export function setIncludes(txt: any): void; +export function getIncludes(): any[]; +export function setExcludes(txt: any): void; +export function getExcludes(): any[]; +export function getLinks(): {}; +export function addSection(txt: any): void; +export function getSections(): any[]; +export function getTasks(): any[]; +export function isInvalidDate(date: any, dateFormat: any, excludes: any, includes: any): any; +export function setWeekday(txt: any): void; +export function getWeekday(): string; +export function addTask(descr: any, data: any): void; +export function findTaskById(id: any): any; +export function addTaskOrg(descr: any, data: any): void; +export function setLink(ids: any, _linkStr: any): void; +export function setClass(ids: any, className: any): void; +export function setClickEvent(ids: any, functionName: any, functionArgs: any): void; +export function bindFunctions(element: any): void; +declare namespace _default { + export function getConfig(): import("../../config.type.js").GanttDiagramConfig | undefined; + export { clear }; + export { setDateFormat }; + export { getDateFormat }; + export { enableInclusiveEndDates }; + export { endDatesAreInclusive }; + export { enableTopAxis }; + export { topAxisEnabled }; + export { setAxisFormat }; + export { getAxisFormat }; + export { setTickInterval }; + export { getTickInterval }; + export { setTodayMarker }; + export { getTodayMarker }; + export { setAccTitle }; + export { getAccTitle }; + export { setDiagramTitle }; + export { getDiagramTitle }; + export { setDisplayMode }; + export { getDisplayMode }; + export { setAccDescription }; + export { getAccDescription }; + export { addSection }; + export { getSections }; + export { getTasks }; + export { addTask }; + export { findTaskById }; + export { addTaskOrg }; + export { setIncludes }; + export { getIncludes }; + export { setExcludes }; + export { getExcludes }; + export { setClickEvent }; + export { setLink }; + export { getLinks }; + export { bindFunctions }; + export { parseDuration }; + export { isInvalidDate }; + export { setWeekday }; + export { getWeekday }; +} +export default _default; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccTitle } from '../common/commonDb.js'; +import { setDiagramTitle } from '../common/commonDb.js'; +import { getDiagramTitle } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +/** + * Parse a string into the args for `dayjs.add()`. + * + * The string have to be compound by a value and a shorthand duration unit. For example `5d` + * represents 5 days. + * + * Please be aware that 1 day may be 23 or 25 hours, if the user lives in an area + * that has daylight savings time (or even 23.5/24.5 hours in Lord Howe Island!) + * + * Shorthand unit supported are: + * + * - `y` for years + * - `M` for months + * - `w` for weeks + * - `d` for days + * - `h` for hours + * - `s` for seconds + * - `ms` for milliseconds + * + * @param {string} str - A string representing the duration. + * @returns {[value: number, unit: dayjs.ManipulateType]} Arguments to pass to `dayjs.add()` + */ +declare function parseDuration(str: string): [value: number, unit: dayjs.ManipulateType]; +import dayjs from 'dayjs'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDb.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDb.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDb.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttRenderer.d.ts new file mode 100644 index 0000000..27307d8 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/ganttRenderer.d.ts @@ -0,0 +1,7 @@ +export function setConf(): void; +export function draw(text: any, id: any, version: any, diagObj: any): void; +declare namespace _default { + export { setConf }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/gantt/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/gantt/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphAst.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphAst.d.ts new file mode 100644 index 0000000..b3116bf --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphAst.d.ts @@ -0,0 +1,61 @@ +export function setDirection(dir: any): void; +export function setOptions(rawOptString: any): void; +export function getOptions(): {}; +export function commit(msg: any, id: any, type: any, tag: any): void; +export function branch(name: any, order: any): void; +export function merge(otherBranch: any, custom_id: any, override_type: any, custom_tag: any): void; +export function cherryPick(sourceId: any, targetId: any, tag: any): void; +export function checkout(branch: any): void; +export function prettyPrint(): void; +export function clear(): void; +export function getBranchesAsObjArray(): { + name: any; +}[]; +export function getBranches(): typeof branches; +export function getCommits(): {}; +export function getCommitsArray(): any[]; +export function getCurrentBranch(): string | undefined; +export function getDirection(): string; +export function getHead(): any; +export namespace commitType { + let NORMAL: number; + let REVERSE: number; + let HIGHLIGHT: number; + let MERGE: number; + let CHERRY_PICK: number; +} +declare namespace _default { + export function getConfig(): import("../../config.type.js").GitGraphDiagramConfig | undefined; + export { setDirection }; + export { setOptions }; + export { getOptions }; + export { commit }; + export { branch }; + export { merge }; + export { cherryPick }; + export { checkout }; + export { prettyPrint }; + export { clear }; + export { getBranchesAsObjArray }; + export { getBranches }; + export { getCommits }; + export { getCommitsArray }; + export { getCurrentBranch }; + export { getDirection }; + export { getHead }; + export { setAccTitle }; + export { getAccTitle }; + export { getAccDescription }; + export { setAccDescription }; + export { setDiagramTitle }; + export { getDiagramTitle }; + export { commitType }; +} +export default _default; +declare let branches: typeof branches; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccTitle } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +import { setDiagramTitle } from '../common/commonDb.js'; +import { getDiagramTitle } from '../common/commonDb.js'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphRenderer.d.ts new file mode 100644 index 0000000..19cf558 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/git/gitGraphRenderer.d.ts @@ -0,0 +1,5 @@ +export function draw(txt: any, id: any, ver: any, diagObj: any): void; +declare namespace _default { + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/git/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/git/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/git/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/info/info.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/info/info.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/info/info.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDb.d.ts new file mode 100644 index 0000000..203b877 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDb.d.ts @@ -0,0 +1,5 @@ +import type { InfoFields, InfoDB } from './infoTypes.js'; +export declare const DEFAULT_INFO_DB: InfoFields; +export declare const setInfo: (toggle: boolean) => void; +export declare const getInfo: () => boolean; +export declare const db: InfoDB; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDetector.d.ts new file mode 100644 index 0000000..a7b9ac7 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDetector.d.ts @@ -0,0 +1,2 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +export declare const info: ExternalDiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/info/infoRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoRenderer.d.ts new file mode 100644 index 0000000..cf6d2ab --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoRenderer.d.ts @@ -0,0 +1,4 @@ +import type { DrawDefinition } from '../../diagram-api/types.js'; +export declare const renderer: { + draw: DrawDefinition; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/info/infoTypes.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoTypes.d.ts new file mode 100644 index 0000000..46e0651 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/info/infoTypes.d.ts @@ -0,0 +1,9 @@ +import type { DiagramDB } from '../../diagram-api/types.js'; +export interface InfoFields { + info: boolean; +} +export interface InfoDB extends DiagramDB { + clear: () => void; + setInfo: (info: boolean) => void; + getInfo: () => boolean; +} diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/detector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/detector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/detector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmap-definition.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmap-definition.d.ts new file mode 100644 index 0000000..fc5d081 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmap-definition.d.ts @@ -0,0 +1,9 @@ +import * as mindmapDb from './mindmapDb.js'; +export declare const diagram: { + db: typeof mindmapDb; + renderer: { + draw: (text: any, id: any, version: any, diagObj: any) => Promise; + }; + parser: any; + styles: (options: any) => string; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmapDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmapDb.d.ts new file mode 100644 index 0000000..47c21b1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmapDb.d.ts @@ -0,0 +1,26 @@ +export function sanitizeText(text: any): string; +export function clear(): void; +export function getMindmap(): any; +export function addNode(level: any, id: any, descr: any, type: any): void; +export namespace nodeType { + let DEFAULT: number; + let NO_BORDER: number; + let ROUNDED_RECT: number; + let RECT: number; + let CIRCLE: number; + let CLOUD: number; + let BANG: number; + let HEXAGON: number; +} +export function getType(startStr: any, endStr: any): number; +export function setElementForId(id: any, element: any): void; +export function decorateNode(decoration: any): void; +export function type2Str(type: any): "rect" | "circle" | "no-border" | "rounded-rect" | "cloud" | "bang" | "hexgon"; +export let parseError: any; +export function setErrorHandler(handler: any): void; +export function getLogger(): Record; +export function getNodeById(id: any): any; +export function getElementById(id: any): any; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmapRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmapRenderer.d.ts new file mode 100644 index 0000000..f33cccd --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/mindmapRenderer.d.ts @@ -0,0 +1,5 @@ +export function draw(text: any, id: any, version: any, diagObj: any): Promise; +declare namespace _default { + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/svgDraw.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/svgDraw.d.ts new file mode 100644 index 0000000..e74c51b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/mindmap/svgDraw.d.ts @@ -0,0 +1,9 @@ +export function drawNode(elem: object, node: object, fullSection: any, conf: object): number; +export function drawEdge(edgesElem: any, mindmap: any, parent: any, depth: any, fullSection: any): void; +export function positionNode(node: any): void; +declare namespace _default { + export { drawNode }; + export { positionNode }; + export { drawEdge }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/pie/pie.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pie.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pie.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDb.d.ts new file mode 100644 index 0000000..c06dbbc --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDb.d.ts @@ -0,0 +1,6 @@ +import type { PieFields, PieDB } from './pieTypes.js'; +import type { RequiredDeep } from 'type-fest'; +import type { PieDiagramConfig } from '../../config.type.js'; +export declare const DEFAULT_PIE_CONFIG: Required; +export declare const DEFAULT_PIE_DB: RequiredDeep; +export declare const db: PieDB; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDetector.d.ts new file mode 100644 index 0000000..0b9a849 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDetector.d.ts @@ -0,0 +1,2 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +export declare const pie: ExternalDiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieRenderer.d.ts new file mode 100644 index 0000000..396d8de --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieRenderer.d.ts @@ -0,0 +1,13 @@ +import type { DrawDefinition } from '../../diagram-api/types.js'; +/** + * Draws a Pie Chart with the data given in text. + * + * @param text - pie chart code + * @param id - diagram id + * @param _version - MermaidJS version from package.json. + * @param diagObj - A standard diagram containing the DB and the text and type etc of the diagram. + */ +export declare const draw: DrawDefinition; +export declare const renderer: { + draw: DrawDefinition; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieStyles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieStyles.d.ts new file mode 100644 index 0000000..e0377ad --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieStyles.d.ts @@ -0,0 +1,3 @@ +import type { DiagramStylesProvider } from '../../diagram-api/types.js'; +declare const getStyles: DiagramStylesProvider; +export default getStyles; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieTypes.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieTypes.d.ts new file mode 100644 index 0000000..d39c1a3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/pie/pieTypes.d.ts @@ -0,0 +1,53 @@ +import type { PieDiagramConfig } from '../../config.type.js'; +import type { DiagramDB } from '../../diagram-api/types.js'; +export interface PieFields { + sections: Sections; + showData: boolean; + config: PieDiagramConfig; +} +export interface PieStyleOptions { + fontFamily: string; + pie1: string; + pie2: string; + pie3: string; + pie4: string; + pie5: string; + pie6: string; + pie7: string; + pie8: string; + pie9: string; + pie10: string; + pie11: string; + pie12: string; + pieTitleTextSize: string; + pieTitleTextColor: string; + pieSectionTextSize: string; + pieSectionTextColor: string; + pieLegendTextSize: string; + pieLegendTextColor: string; + pieStrokeColor: string; + pieStrokeWidth: string; + pieOuterStrokeWidth: string; + pieOuterStrokeColor: string; + pieOpacity: string; +} +export type Sections = Record; +export interface D3Sections { + label: string; + value: number; +} +export interface PieDB extends DiagramDB { + getConfig: () => Required; + clear: () => void; + setDiagramTitle: (title: string) => void; + getDiagramTitle: () => string; + setAccTitle: (title: string) => void; + getAccTitle: () => string; + setAccDescription: (describetion: string) => void; + getAccDescription: () => string; + addSection: (label: string, value: number) => void; + getSections: () => Sections; + cleanupValue: (value: string) => number; + setShowData: (toggle: boolean) => void; + getShowData: () => boolean; +} diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantBuilder.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantBuilder.d.ts new file mode 100644 index 0000000..21a94d6 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantBuilder.d.ts @@ -0,0 +1,118 @@ +import type { BaseDiagramConfig, QuadrantChartConfig } from '../../config.type.js'; +import type { Point } from '../../types.js'; +export type TextVerticalPos = 'left' | 'center' | 'right'; +export type TextHorizontalPos = 'top' | 'middle' | 'bottom'; +export interface QuadrantPointInputType extends Point { + text: string; +} +export interface QuadrantTextType extends Point { + text: string; + fill: string; + verticalPos: TextVerticalPos; + horizontalPos: TextHorizontalPos; + fontSize: number; + rotation: number; +} +export interface QuadrantPointType extends Point { + fill: string; + radius: number; + text: QuadrantTextType; +} +export interface QuadrantQuadrantsType extends Point { + text: QuadrantTextType; + width: number; + height: number; + fill: string; +} +export interface QuadrantLineType { + strokeWidth: number; + strokeFill: string; + x1: number; + y1: number; + x2: number; + y2: number; +} +export interface QuadrantBuildType { + points: QuadrantPointType[]; + quadrants: QuadrantQuadrantsType[]; + axisLabels: QuadrantTextType[]; + title?: QuadrantTextType; + borderLines?: QuadrantLineType[]; +} +export interface quadrantBuilderData { + titleText: string; + quadrant1Text: string; + quadrant2Text: string; + quadrant3Text: string; + quadrant4Text: string; + xAxisLeftText: string; + xAxisRightText: string; + yAxisBottomText: string; + yAxisTopText: string; + points: QuadrantPointInputType[]; +} +export interface QuadrantBuilderConfig extends Required> { + showXAxis: boolean; + showYAxis: boolean; + showTitle: boolean; +} +export interface QuadrantBuilderThemeConfig { + quadrantTitleFill: string; + quadrant1Fill: string; + quadrant2Fill: string; + quadrant3Fill: string; + quadrant4Fill: string; + quadrant1TextFill: string; + quadrant2TextFill: string; + quadrant3TextFill: string; + quadrant4TextFill: string; + quadrantPointFill: string; + quadrantPointTextFill: string; + quadrantXAxisTextFill: string; + quadrantYAxisTextFill: string; + quadrantInternalBorderStrokeFill: string; + quadrantExternalBorderStrokeFill: string; +} +interface CalculateSpaceData { + xAxisSpace: { + top: number; + bottom: number; + }; + yAxisSpace: { + left: number; + right: number; + }; + titleSpace: { + top: number; + }; + quadrantSpace: { + quadrantLeft: number; + quadrantTop: number; + quadrantWidth: number; + quadrantHalfWidth: number; + quadrantHeight: number; + quadrantHalfHeight: number; + }; +} +export declare class QuadrantBuilder { + private config; + private themeConfig; + private data; + constructor(); + getDefaultData(): quadrantBuilderData; + getDefaultConfig(): QuadrantBuilderConfig; + getDefaultThemeConfig(): QuadrantBuilderThemeConfig; + clear(): void; + setData(data: Partial): void; + addPoints(points: QuadrantPointInputType[]): void; + setConfig(config: Partial): void; + setThemeConfig(themeConfig: Partial): void; + calculateSpace(xAxisPosition: typeof this.config.xAxisPosition, showXAxis: boolean, showYAxis: boolean, showTitle: boolean): CalculateSpaceData; + getAxisLabels(xAxisPosition: typeof this.config.xAxisPosition, showXAxis: boolean, showYAxis: boolean, spaceData: CalculateSpaceData): QuadrantTextType[]; + getQuadrants(spaceData: CalculateSpaceData): QuadrantQuadrantsType[]; + getQuadrantPoints(spaceData: CalculateSpaceData): QuadrantPointType[]; + getBorders(spaceData: CalculateSpaceData): QuadrantLineType[]; + getTitle(showTitle: boolean): QuadrantTextType | undefined; + build(): QuadrantBuildType; +} +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDb.d.ts new file mode 100644 index 0000000..9f3c9bb --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDb.d.ts @@ -0,0 +1,38 @@ +type LexTextObj = { + text: string; + type: 'text' | 'markdown'; +}; +declare function setQuadrant1Text(textObj: LexTextObj): void; +declare function setQuadrant2Text(textObj: LexTextObj): void; +declare function setQuadrant3Text(textObj: LexTextObj): void; +declare function setQuadrant4Text(textObj: LexTextObj): void; +declare function setXAxisLeftText(textObj: LexTextObj): void; +declare function setXAxisRightText(textObj: LexTextObj): void; +declare function setYAxisTopText(textObj: LexTextObj): void; +declare function setYAxisBottomText(textObj: LexTextObj): void; +declare function addPoint(textObj: LexTextObj, x: number, y: number): void; +declare function setWidth(width: number): void; +declare function setHeight(height: number): void; +declare function getQuadrantData(): import("./quadrantBuilder.js").QuadrantBuildType; +declare const _default: { + setWidth: typeof setWidth; + setHeight: typeof setHeight; + setQuadrant1Text: typeof setQuadrant1Text; + setQuadrant2Text: typeof setQuadrant2Text; + setQuadrant3Text: typeof setQuadrant3Text; + setQuadrant4Text: typeof setQuadrant4Text; + setXAxisLeftText: typeof setXAxisLeftText; + setXAxisRightText: typeof setXAxisRightText; + setYAxisTopText: typeof setYAxisTopText; + setYAxisBottomText: typeof setYAxisBottomText; + addPoint: typeof addPoint; + getQuadrantData: typeof getQuadrantData; + clear: () => void; + setAccTitle: (txt: string) => void; + getAccTitle: () => string; + setDiagramTitle: (txt: string) => void; + getDiagramTitle: () => string; + getAccDescription: () => string; + setAccDescription: (txt: string) => void; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantRenderer.d.ts new file mode 100644 index 0000000..b91b530 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/quadrant-chart/quadrantRenderer.d.ts @@ -0,0 +1,6 @@ +import type { Diagram } from '../../Diagram.js'; +export declare const draw: (txt: string, id: string, _version: string, diagObj: Diagram) => void; +declare const _default: { + draw: (txt: string, id: string, _version: string, diagObj: Diagram) => void; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDb.d.ts new file mode 100644 index 0000000..d68412c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDb.d.ts @@ -0,0 +1,70 @@ +declare namespace _default { + export { RequirementType }; + export { RiskLevel }; + export { VerifyType }; + export { Relationships }; + export function getConfig(): any; + export { addRequirement }; + export { getRequirements }; + export { setNewReqId }; + export { setNewReqText }; + export { setNewReqRisk }; + export { setNewReqVerifyMethod }; + export { setAccTitle }; + export { getAccTitle }; + export { setAccDescription }; + export { getAccDescription }; + export { addElement }; + export { getElements }; + export { setNewElementType }; + export { setNewElementDocRef }; + export { addRelationship }; + export { getRelationships }; + export { clear }; +} +export default _default; +declare namespace RequirementType { + let REQUIREMENT: string; + let FUNCTIONAL_REQUIREMENT: string; + let INTERFACE_REQUIREMENT: string; + let PERFORMANCE_REQUIREMENT: string; + let PHYSICAL_REQUIREMENT: string; + let DESIGN_CONSTRAINT: string; +} +declare namespace RiskLevel { + let LOW_RISK: string; + let MED_RISK: string; + let HIGH_RISK: string; +} +declare namespace VerifyType { + let VERIFY_ANALYSIS: string; + let VERIFY_DEMONSTRATION: string; + let VERIFY_INSPECTION: string; + let VERIFY_TEST: string; +} +declare namespace Relationships { + let CONTAINS: string; + let COPIES: string; + let DERIVES: string; + let SATISFIES: string; + let VERIFIES: string; + let REFINES: string; + let TRACES: string; +} +declare function addRequirement(name: any, type: any): any; +declare function getRequirements(): {}; +declare function setNewReqId(id: any): void; +declare function setNewReqText(text: any): void; +declare function setNewReqRisk(risk: any): void; +declare function setNewReqVerifyMethod(verifyMethod: any): void; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccTitle } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +declare function addElement(name: any): any; +declare function getElements(): {}; +declare function setNewElementType(type: any): void; +declare function setNewElementDocRef(docRef: any): void; +declare function addRelationship(type: any, src: any, dst: any): void; +declare function getRelationships(): any[]; +declare function clear(): void; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementMarkers.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementMarkers.d.ts new file mode 100644 index 0000000..fed5f94 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementMarkers.d.ts @@ -0,0 +1,10 @@ +declare namespace _default { + export { ReqMarkers }; + export { insertLineEndings }; +} +export default _default; +declare namespace ReqMarkers { + let CONTAINS: string; + let ARROW: string; +} +declare function insertLineEndings(parentNode: any, conf: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementRenderer.d.ts new file mode 100644 index 0000000..698fcc6 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/requirementRenderer.d.ts @@ -0,0 +1,7 @@ +export function drawReqs(reqs: any, graph: any, svgNode: any): void; +export function drawElements(els: any, graph: any, svgNode: any): void; +export function draw(text: any, id: any, _version: any, diagObj: any): void; +declare namespace _default { + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/requirement/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/requirement/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sankey/parser/sankey.spec.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/parser/sankey.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/parser/sankey.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDB.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDB.d.ts new file mode 100644 index 0000000..1eaf4b0 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDB.d.ts @@ -0,0 +1,36 @@ +declare class SankeyLink { + source: SankeyNode; + target: SankeyNode; + value: number; + constructor(source: SankeyNode, target: SankeyNode, value?: number); +} +declare class SankeyNode { + ID: string; + constructor(ID: string); +} +declare const _default: { + nodesMap: Record; + getConfig: () => import("../../config.type.js").SankeyDiagramConfig | undefined; + getNodes: () => SankeyNode[]; + getLinks: () => SankeyLink[]; + getGraph: () => { + nodes: { + id: string; + }[]; + links: { + source: string; + target: string; + value: number; + }[]; + }; + addLink: (source: SankeyNode, target: SankeyNode, value: number) => void; + findOrCreateNode: (ID: string) => SankeyNode; + getAccTitle: () => string; + setAccTitle: (txt: string) => void; + getAccDescription: () => string; + setAccDescription: (txt: string) => void; + getDiagramTitle: () => string; + setDiagramTitle: (txt: string) => void; + clear: () => void; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyRenderer.d.ts new file mode 100644 index 0000000..556d317 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyRenderer.d.ts @@ -0,0 +1,14 @@ +import type { Diagram } from '../../Diagram.js'; +/** + * Draws Sankey diagram. + * + * @param text - The text of the diagram + * @param id - The id of the diagram which will be used as a DOM element id¨ + * @param _version - Mermaid version from package.json + * @param diagObj - A standard diagram containing the db and the text and type etc of the diagram + */ +export declare const draw: (text: string, id: string, _version: string, diagObj: Diagram) => void; +declare const _default: { + draw: (text: string, id: string, _version: string, diagObj: Diagram) => void; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyUtils.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyUtils.d.ts new file mode 100644 index 0000000..e9448d4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sankey/sankeyUtils.d.ts @@ -0,0 +1 @@ +export declare const prepareTextForParsing: (text: string) => string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDb.d.ts new file mode 100644 index 0000000..be6b0bb --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDb.d.ts @@ -0,0 +1,153 @@ +export function addBox(data: any): void; +export function addActor(id: any, name: any, description: any, type: any): void; +export function addMessage(idFrom: any, idTo: any, message: any, answer: any): void; +export function addSignal(idFrom: any, idTo: any, message: { + text: undefined; + wrap: undefined; +} | undefined, messageType: any, activate?: boolean): boolean; +export function hasAtLeastOneBox(): boolean; +export function hasAtLeastOneBoxWithTitle(): boolean; +export function getMessages(): any[]; +export function getBoxes(): any[]; +export function getActors(): {}; +export function getCreatedActors(): {}; +export function getDestroyedActors(): {}; +export function getActor(id: any): any; +export function getActorKeys(): string[]; +export function enableSequenceNumbers(): void; +export function disableSequenceNumbers(): void; +export function showSequenceNumbers(): boolean; +export function setWrap(wrapSetting: any): void; +export function autoWrap(): any; +export function clear(): void; +export function parseMessage(str: any): { + text: any; + wrap: boolean | undefined; +}; +export function parseBoxData(str: any): { + color: any; + text: string | undefined; + wrap: boolean | undefined; +}; +export namespace LINETYPE { + let SOLID: number; + let DOTTED: number; + let NOTE: number; + let SOLID_CROSS: number; + let DOTTED_CROSS: number; + let SOLID_OPEN: number; + let DOTTED_OPEN: number; + let LOOP_START: number; + let LOOP_END: number; + let ALT_START: number; + let ALT_ELSE: number; + let ALT_END: number; + let OPT_START: number; + let OPT_END: number; + let ACTIVE_START: number; + let ACTIVE_END: number; + let PAR_START: number; + let PAR_AND: number; + let PAR_END: number; + let RECT_START: number; + let RECT_END: number; + let SOLID_POINT: number; + let DOTTED_POINT: number; + let AUTONUMBER: number; + let CRITICAL_START: number; + let CRITICAL_OPTION: number; + let CRITICAL_END: number; + let BREAK_START: number; + let BREAK_END: number; + let PAR_OVER_START: number; +} +export namespace ARROWTYPE { + let FILLED: number; + let OPEN: number; +} +export namespace PLACEMENT { + let LEFTOF: number; + let RIGHTOF: number; + let OVER: number; +} +export function addNote(actor: any, placement: any, message: any): void; +export function addLinks(actorId: any, text: any): void; +export function addALink(actorId: any, text: any): void; +export function addProperties(actorId: any, text: any): void; +export function addDetails(actorId: any, text: any): void; +export function getActorProperty(actor: any, key: any): any; +export function apply(param: object | object[] | AddMessageParams): void; +declare namespace _default { + export { addActor }; + export { addMessage }; + export { addSignal }; + export { addLinks }; + export { addDetails }; + export { addProperties }; + export { autoWrap }; + export { setWrap }; + export { enableSequenceNumbers }; + export { disableSequenceNumbers }; + export { showSequenceNumbers }; + export { getMessages }; + export { getActors }; + export { getCreatedActors }; + export { getDestroyedActors }; + export { getActor }; + export { getActorKeys }; + export { getActorProperty }; + export { getAccTitle }; + export { getBoxes }; + export { getDiagramTitle }; + export { setDiagramTitle }; + export function getConfig(): import("../../config.type.js").SequenceDiagramConfig | undefined; + export { clear }; + export { parseMessage }; + export { parseBoxData }; + export { LINETYPE }; + export { ARROWTYPE }; + export { PLACEMENT }; + export { addNote }; + export { setAccTitle }; + export { apply }; + export { setAccDescription }; + export { getAccDescription }; + export { hasAtLeastOneBox }; + export { hasAtLeastOneBoxWithTitle }; +} +export default _default; +/** + * A message from one actor to another. + */ +export type AddMessageParams = { + /** + * - The id of the actor sending the message. + */ + from: string; + /** + * - The id of the actor receiving the message. + */ + to: string; + /** + * - The message text. + */ + msg: string; + /** + * - The type of signal. + */ + signalType: number; + /** + * - Set to `"addMessage"` if this is an `AddMessageParams`. + */ + type: "addMessage"; + /** + * - If `true`, this signal starts an activation. + */ + activate?: boolean | undefined; +}; +import { getAccTitle } from '../common/commonDb.js'; +import { getDiagramTitle } from '../common/commonDb.js'; +import { setDiagramTitle } from '../common/commonDb.js'; +import { setAccTitle } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceRenderer.d.ts new file mode 100644 index 0000000..56a1c69 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/sequenceRenderer.d.ts @@ -0,0 +1,202 @@ +import type { Diagram } from '../../Diagram.js'; +export declare const bounds: { + data: { + startx: undefined; + stopx: undefined; + starty: undefined; + stopy: undefined; + }; + verticalPos: number; + sequenceItems: never[]; + activations: never[]; + models: { + getHeight: () => any; + clear: () => void; + addBox: (boxModel: any) => void; + addActor: (actorModel: any) => void; + addLoop: (loopModel: any) => void; + addMessage: (msgModel: any) => void; + addNote: (noteModel: any) => void; + lastActor: () => never; + lastLoop: () => never; + lastMessage: () => never; + lastNote: () => never; + actors: never[]; + boxes: never[]; + loops: never[]; + messages: never[]; + notes: never[]; + }; + init: () => void; + updateVal: (obj: any, key: any, val: any, fun: any) => void; + updateBounds: (startx: any, starty: any, stopx: any, stopy: any) => void; + insert: (startx: any, starty: any, stopx: any, stopy: any) => void; + newActivation: (message: any, diagram: any, actors: any) => void; + endActivation: (message: any) => never; + createLoop: (title: { + message: undefined; + wrap: boolean; + width: undefined; + } | undefined, fill: any) => { + startx: undefined; + starty: number; + stopx: undefined; + stopy: undefined; + title: undefined; + wrap: boolean; + width: undefined; + height: number; + fill: any; + }; + newLoop: (title: { + message: undefined; + wrap: boolean; + width: undefined; + } | undefined, fill: any) => void; + endLoop: () => undefined; + isLoopOverlap: () => any; + addSectionToLoop: (message: any) => void; + saveVerticalPos: () => void; + resetVerticalPos: () => void; + bumpVerticalPos: (bump: any) => void; + getVerticalPos: () => number; + getBounds: () => { + bounds: { + startx: undefined; + stopx: undefined; + starty: undefined; + stopy: undefined; + }; + models: { + getHeight: () => any; + clear: () => void; + addBox: (boxModel: any) => void; + addActor: (actorModel: any) => void; + addLoop: (loopModel: any) => void; + addMessage: (msgModel: any) => void; + addNote: (noteModel: any) => void; + lastActor: () => never; + lastLoop: () => never; + lastMessage: () => never; + lastNote: () => never; + actors: never[]; + boxes: never[]; + loops: never[]; + messages: never[]; + notes: never[]; + }; + }; +}; +export declare const drawActors: (diagram: any, actors: any, actorKeys: any, isFooter: any) => void; +export declare const drawActorsPopup: (diagram: any, actors: any, actorKeys: any, doc: any) => { + maxHeight: number; + maxWidth: number; +}; +export declare const setConf: (cnf: any) => void; +/** + * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text. + * + * @param _text - The text of the diagram + * @param id - The id of the diagram which will be used as a DOM element id¨ + * @param _version - Mermaid version from package.json + * @param diagObj - A standard diagram containing the db and the text and type etc of the diagram + */ +export declare const draw: (_text: string, id: string, _version: string, diagObj: Diagram) => void; +declare const _default: { + bounds: { + data: { + startx: undefined; + stopx: undefined; + starty: undefined; + stopy: undefined; + }; + verticalPos: number; + sequenceItems: never[]; + activations: never[]; + models: { + getHeight: () => any; + clear: () => void; + addBox: (boxModel: any) => void; + addActor: (actorModel: any) => void; + addLoop: (loopModel: any) => void; + addMessage: (msgModel: any) => void; + addNote: (noteModel: any) => void; + lastActor: () => never; + lastLoop: () => never; + lastMessage: () => never; + lastNote: () => never; + actors: never[]; + boxes: never[]; + loops: never[]; + messages: never[]; + notes: never[]; + }; + init: () => void; + updateVal: (obj: any, key: any, val: any, fun: any) => void; + updateBounds: (startx: any, starty: any, stopx: any, stopy: any) => void; + insert: (startx: any, starty: any, stopx: any, stopy: any) => void; + newActivation: (message: any, diagram: any, actors: any) => void; + endActivation: (message: any) => never; + createLoop: (title: { + message: undefined; + wrap: boolean; + width: undefined; + } | undefined, fill: any) => { + startx: undefined; + starty: number; + stopx: undefined; + stopy: undefined; + title: undefined; + wrap: boolean; + width: undefined; + height: number; + fill: any; + }; + newLoop: (title: { + message: undefined; + wrap: boolean; + width: undefined; + } | undefined, fill: any) => void; + endLoop: () => undefined; + isLoopOverlap: () => any; + addSectionToLoop: (message: any) => void; + saveVerticalPos: () => void; + resetVerticalPos: () => void; + bumpVerticalPos: (bump: any) => void; + getVerticalPos: () => number; + getBounds: () => { + bounds: { + startx: undefined; + stopx: undefined; + starty: undefined; + stopy: undefined; + }; + models: { + getHeight: () => any; + clear: () => void; + addBox: (boxModel: any) => void; + addActor: (actorModel: any) => void; + addLoop: (loopModel: any) => void; + addMessage: (msgModel: any) => void; + addNote: (noteModel: any) => void; + lastActor: () => never; + lastLoop: () => never; + lastMessage: () => never; + lastNote: () => never; + actors: never[]; + boxes: never[]; + loops: never[]; + messages: never[]; + notes: never[]; + }; + }; + }; + drawActors: (diagram: any, actors: any, actorKeys: any, isFooter: any) => void; + drawActorsPopup: (diagram: any, actors: any, actorKeys: any, doc: any) => { + maxHeight: number; + maxWidth: number; + }; + setConf: (cnf: any) => void; + draw: (_text: string, id: string, _version: string, diagObj: Diagram) => void; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sequence/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/sequence/svgDraw.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/svgDraw.d.ts new file mode 100644 index 0000000..c78289b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/sequence/svgDraw.d.ts @@ -0,0 +1,76 @@ +export const ACTOR_TYPE_WIDTH: number; +export function drawRect(elem: any, rectData: any): import("../common/commonTypes.js").D3RectElement; +export function drawPopup(elem: any, actor: any, minMenuWidth: any, textAttrs: any, forceMenus: any): { + height: any; + width: any; +}; +export function popupMenu(popid: any): string; +export function popdownMenu(popid: any): string; +export function drawText(elem: any, textData: any): any[]; +export function drawLabel(elem: any, txtObject: any): any; +export function fixLifeLineHeights(diagram: any, actors: any, actorKeys: any, conf: any): void; +export function drawActor(elem: any, actor: any, conf: any, isFooter: any): any; +export function drawBox(elem: any, box: any, conf: any): void; +export function anchorElement(elem: any): any; +export function drawActivation(elem: any, bounds: any, verticalPos: any, conf: any, actorActivations: any): void; +export function drawLoop(elem: any, loopModel: any, labelText: any, conf: any): any; +export function drawBackgroundRect(elem: any, bounds: any): void; +export function insertDatabaseIcon(elem: any): void; +export function insertComputerIcon(elem: any): void; +export function insertClockIcon(elem: any): void; +export function insertArrowHead(elem: any): void; +export function insertArrowFilledHead(elem: any): void; +export function insertSequenceNumber(elem: any): void; +export function insertArrowCrossHead(elem: any): void; +export function getTextObj(): { + x: number; + y: number; + fill: undefined; + anchor: undefined; + style: string; + width: undefined; + height: undefined; + textMargin: number; + rx: number; + ry: number; + tspan: boolean; + valign: undefined; +}; +export function getNoteRect(): { + x: number; + y: number; + fill: string; + stroke: string; + width: number; + anchor: string; + height: number; + rx: number; + ry: number; +}; +declare namespace _default { + export { drawRect }; + export { drawText }; + export { drawLabel }; + export { drawActor }; + export { drawBox }; + export { drawPopup }; + export { anchorElement }; + export { drawActivation }; + export { drawLoop }; + export { drawBackgroundRect }; + export { insertArrowHead }; + export { insertArrowFilledHead }; + export { insertSequenceNumber }; + export { insertArrowCrossHead }; + export { insertDatabaseIcon }; + export { insertComputerIcon }; + export { insertClockIcon }; + export { getTextObj }; + export { getNoteRect }; + export { popupMenu }; + export { popdownMenu }; + export { fixLifeLineHeights }; + export { sanitizeUrl }; +} +export default _default; +import { sanitizeUrl } from '@braintree/sanitize-url'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/id-cache.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/id-cache.d.ts new file mode 100644 index 0000000..e906bf4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/id-cache.d.ts @@ -0,0 +1,11 @@ +export function set(key: any, val: any): void; +export function get(k: any): any; +export function keys(): string[]; +export function size(): number; +declare namespace _default { + export { get }; + export { set }; + export { keys }; + export { size }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/shapes.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/shapes.d.ts new file mode 100644 index 0000000..c4f4439 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/shapes.d.ts @@ -0,0 +1,14 @@ +export function drawStartState(g: any): any; +export function drawDivider(g: any): any; +export function drawSimpleState(g: any, stateDef: any): any; +export function drawDescrState(g: any, stateDef: any): any; +export function addTitleAndBox(g: any, stateDef: any, altBkg: any): any; +export function drawText(elem: any, textData: any): any; +export function drawNote(text: any, g: any): any; +export function drawState(elem: any, stateDef: any): { + id: any; + label: any; + width: number; + height: number; +}; +export function drawEdge(elem: any, path: any, relation: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateCommon.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateCommon.d.ts new file mode 100644 index 0000000..2a3a1ce --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateCommon.d.ts @@ -0,0 +1,22 @@ +/** + * Constants common to all State Diagram code + */ +export declare const DEFAULT_DIAGRAM_DIRECTION = "LR"; +export declare const DEFAULT_NESTED_DOC_DIR = "TB"; +export declare const STMT_STATE = "state"; +export declare const STMT_RELATION = "relation"; +export declare const STMT_CLASSDEF = "classDef"; +export declare const STMT_APPLYCLASS = "applyClass"; +export declare const DEFAULT_STATE_TYPE = "default"; +export declare const DIVIDER_TYPE = "divider"; +declare const _default: { + DEFAULT_DIAGRAM_DIRECTION: string; + DEFAULT_NESTED_DOC_DIR: string; + STMT_STATE: string; + STMT_RELATION: string; + STMT_CLASSDEF: string; + STMT_APPLYCLASS: string; + DEFAULT_STATE_TYPE: string; + DIVIDER_TYPE: string; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDb.d.ts new file mode 100644 index 0000000..47ce24c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDb.d.ts @@ -0,0 +1,91 @@ +/** + * + * @param item1 + * @param item2 + * @param relationTitle + */ +export function addRelationObjs(item1: any, item2: any, relationTitle: any): void; +export namespace lineType { + let LINE: number; + let DOTTED_LINE: number; +} +export namespace relationType { + let AGGREGATION: number; + let EXTENSION: number; + let COMPOSITION: number; + let DEPENDENCY: number; +} +export function addState(id: null | string, type?: null | string, doc?: null | string, descr?: null | string | string[], note?: null | string, classes?: null | string | string[], styles?: null | string | string[], textStyles?: null | string | string[]): void; +export function clear(saveCommon: any): void; +export function getState(id: any): any; +export function getStates(): {}; +export function logDocuments(): void; +export function getRelations(): never[]; +export function addRelation(item1: string | object, item2: string | object, title: string): void; +export function addDescription(id: any, descr: any): void; +export function cleanupLabel(label: any): any; +export function addStyleClass(id: string, styleAttributes?: string | null): void; +export function getClasses(): {} | any | {}; +export function setCssClass(itemIds: string | string[], cssClassName: string): void; +export function setStyle(itemId: any, styleText: any): void; +export function setTextStyle(itemId: any, cssClassName: any): void; +declare namespace _default { + export function getConfig(): import("../../config.type.js").StateDiagramConfig | undefined; + export { addState }; + export { clear }; + export { getState }; + export { getStates }; + export { getRelations }; + export { getClasses }; + export { getDirection }; + export { addRelation }; + export { getDividerId }; + export { setDirection }; + export { cleanupLabel }; + export { lineType }; + export { relationType }; + export { logDocuments }; + export { getRootDoc }; + export { setRootDoc }; + export { getRootDocV2 }; + export { extract }; + export { trimColon }; + export { getAccTitle }; + export { setAccTitle }; + export { getAccDescription }; + export { setAccDescription }; + export { addStyleClass }; + export { setCssClass }; + export { addDescription }; + export { setDiagramTitle }; + export { getDiagramTitle }; +} +export default _default; +declare function getDirection(): string; +declare function getDividerId(): string; +declare function setDirection(dir: any): void; +declare function getRootDoc(): any[]; +declare function setRootDoc(o: any): void; +declare function getRootDocV2(): { + id: string; + doc: any[]; +}; +/** + * Convert all of the statements (stmts) that were parsed into states and relationships. + * This is done because a state diagram may have nested sections, + * where each section is a 'document' and has its own set of statements. + * Ex: the section within a fork has its own statements, and incoming and outgoing statements + * refer to the fork as a whole (document). + * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement. + * This will push the statement into the the list of statements for the current document. + * + * @param _doc + */ +declare function extract(_doc: any): void; +declare function trimColon(str: any): any; +import { getAccTitle } from '../common/commonDb.js'; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +import { setDiagramTitle } from '../common/commonDb.js'; +import { getDiagramTitle } from '../common/commonDb.js'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDetector-V2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDetector-V2.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDetector-V2.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDiagram-v2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDiagram-v2.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDiagram-v2.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateRenderer-v2.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateRenderer-v2.d.ts new file mode 100644 index 0000000..b6be866 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateRenderer-v2.d.ts @@ -0,0 +1,20 @@ +/** + * Create a standard string for the dom ID of an item. + * If a type is given, insert that before the counter, preceded by the type spacer + * + * @param itemId + * @param counter + * @param {string | null} type + * @param typeSpacer + * @returns {string} + */ +export function stateDomId(itemId?: string, counter?: number, type?: string | null, typeSpacer?: string): string; +export function setConf(cnf: any): void; +export function getClasses(text: string, diagramObj: any): Record; +export function draw(text: any, id: any, _version: any, diag: any): Promise; +declare namespace _default { + export { setConf }; + export { getClasses }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/stateRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateRenderer.d.ts new file mode 100644 index 0000000..43eebd3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/stateRenderer.d.ts @@ -0,0 +1,7 @@ +export function setConf(): void; +export function draw(text: any, id: any, _version: any, diagObj: any): void; +declare namespace _default { + export { setConf }; + export { draw }; +} +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/state/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/state/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/state/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/timeline/detector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/detector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/detector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/timeline/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/timeline/svgDraw.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/svgDraw.d.ts new file mode 100644 index 0000000..4c49f97 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/svgDraw.d.ts @@ -0,0 +1,46 @@ +export function drawRect(elem: any, rectData: any): any; +export function drawFace(element: any, faceData: any): any; +export function drawCircle(element: any, circleData: any): any; +export function drawText(elem: any, textData: any): any; +export function drawLabel(elem: any, txtObject: any): void; +export function drawSection(elem: any, section: any, conf: any): void; +export function drawTask(elem: any, task: any, conf: any): void; +export function drawBackgroundRect(elem: any, bounds: any): void; +export function getTextObj(): { + x: number; + y: number; + fill: undefined; + 'text-anchor': string; + width: number; + height: number; + textMargin: number; + rx: number; + ry: number; +}; +export function getNoteRect(): { + x: number; + y: number; + width: number; + anchor: string; + height: number; + rx: number; + ry: number; +}; +export function drawNode(elem: any, node: any, fullSection: any, conf: any): any; +export function getVirtualNodeHeight(elem: any, node: any, conf: any): any; +declare namespace _default { + export { drawRect }; + export { drawCircle }; + export { drawSection }; + export { drawText }; + export { drawLabel }; + export { drawTask }; + export { drawBackgroundRect }; + export { getTextObj }; + export { getNoteRect }; + export { initGraphics }; + export { drawNode }; + export { getVirtualNodeHeight }; +} +export default _default; +declare function initGraphics(graphics: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timeline-definition.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timeline-definition.d.ts new file mode 100644 index 0000000..006d393 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timeline-definition.d.ts @@ -0,0 +1,10 @@ +import * as db from './timelineDb.js'; +export declare const diagram: { + db: typeof db; + renderer: { + setConf: () => void; + draw: (text: string, id: string, version: string, diagObj: import("../../Diagram.js").Diagram) => void; + }; + parser: any; + styles: (options: any) => string; +}; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timelineDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timelineDb.d.ts new file mode 100644 index 0000000..aa55f8b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timelineDb.d.ts @@ -0,0 +1,20 @@ +export function getCommonDb(): typeof commonDb; +export function clear(): void; +export function addSection(txt: any): void; +export function getSections(): any[]; +export function getTasks(): any[]; +export function addTask(period: any, length: any, event: any): void; +export function addEvent(event: any): void; +export function addTaskOrg(descr: any): void; +declare namespace _default { + export { clear }; + export { getCommonDb }; + export { addSection }; + export { getSections }; + export { getTasks }; + export { addTask }; + export { addTaskOrg }; + export { addEvent }; +} +export default _default; +import * as commonDb from '../common/commonDb.js'; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timelineRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timelineRenderer.d.ts new file mode 100644 index 0000000..ac06256 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/timeline/timelineRenderer.d.ts @@ -0,0 +1,19 @@ +import type { Selection } from 'd3'; +import type { Diagram } from '../../Diagram.js'; +import type { MermaidConfig } from '../../config.type.js'; +interface TimelineTask { + id: number; + section: string; + type: string; + task: string; + score: number; + events: string[]; +} +export declare const draw: (text: string, id: string, version: string, diagObj: Diagram) => void; +export declare const drawTasks: (diagram: Selection, tasks: TimelineTask[], sectionColor: number, masterX: number, masterY: number, maxTaskHeight: number, conf: MermaidConfig, maxEventCount: number, maxEventLineLength: number, maxSectionHeight: number, isWithoutSections: boolean) => void; +export declare const drawEvents: (diagram: Selection, events: string[], sectionColor: number, masterX: number, masterY: number, conf: MermaidConfig) => number; +declare const _default: { + setConf: () => void; + draw: (text: string, id: string, version: string, diagObj: Diagram) => void; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDb.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDb.d.ts new file mode 100644 index 0000000..ef7a694 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDb.d.ts @@ -0,0 +1,30 @@ +export function clear(): void; +export function addSection(txt: any): void; +export function getSections(): any[]; +export function getTasks(): any[]; +export function addTask(descr: any, taskData: any): void; +export function addTaskOrg(descr: any): void; +declare namespace _default { + export function getConfig(): import("../../config.type.js").JourneyDiagramConfig | undefined; + export { clear }; + export { setDiagramTitle }; + export { getDiagramTitle }; + export { setAccTitle }; + export { getAccTitle }; + export { setAccDescription }; + export { getAccDescription }; + export { addSection }; + export { getSections }; + export { getTasks }; + export { addTask }; + export { addTaskOrg }; + export { getActors }; +} +export default _default; +import { setDiagramTitle } from '../common/commonDb.js'; +import { getDiagramTitle } from '../common/commonDb.js'; +import { setAccTitle } from '../common/commonDb.js'; +import { getAccTitle } from '../common/commonDb.js'; +import { setAccDescription } from '../common/commonDb.js'; +import { getAccDescription } from '../common/commonDb.js'; +declare function getActors(): any[]; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDetector.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDetector.d.ts new file mode 100644 index 0000000..46efe84 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDetector.d.ts @@ -0,0 +1,3 @@ +import type { ExternalDiagramDefinition } from '../../diagram-api/types.js'; +declare const plugin: ExternalDiagramDefinition; +export default plugin; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDiagram.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDiagram.d.ts new file mode 100644 index 0000000..f7aaea1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyDiagram.d.ts @@ -0,0 +1,2 @@ +import type { DiagramDefinition } from '../../diagram-api/types.js'; +export declare const diagram: DiagramDefinition; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyRenderer.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyRenderer.d.ts new file mode 100644 index 0000000..34a36fc --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/journeyRenderer.d.ts @@ -0,0 +1,30 @@ +export declare const setConf: (cnf: any) => void; +export declare const draw: (text: any, id: any, version: any, diagObj: any) => void; +export declare const bounds: { + data: { + startx: undefined; + stopx: undefined; + starty: undefined; + stopy: undefined; + }; + verticalPos: number; + sequenceItems: never[]; + init: () => void; + updateVal: (obj: any, key: any, val: any, fun: any) => void; + updateBounds: (startx: any, starty: any, stopx: any, stopy: any) => void; + insert: (startx: any, starty: any, stopx: any, stopy: any) => void; + bumpVerticalPos: (bump: any) => void; + getVerticalPos: () => number; + getBounds: () => { + startx: undefined; + stopx: undefined; + starty: undefined; + stopy: undefined; + }; +}; +export declare const drawTasks: (diagram: any, tasks: any, verticalPos: any) => void; +declare const _default: { + setConf: (cnf: any) => void; + draw: (text: any, id: any, version: any, diagObj: any) => void; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/styles.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/styles.d.ts new file mode 100644 index 0000000..1d8e7c5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/styles.d.ts @@ -0,0 +1,2 @@ +export default getStyles; +declare function getStyles(options: any): string; diff --git a/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/svgDraw.d.ts b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/svgDraw.d.ts new file mode 100644 index 0000000..569a5f1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/diagrams/user-journey/svgDraw.d.ts @@ -0,0 +1,20 @@ +export function drawRect(elem: any, rectData: any): import("../common/commonTypes.js").D3RectElement; +export function drawFace(element: any, faceData: any): any; +export function drawCircle(element: any, circleData: any): any; +export function drawText(elem: any, textData: any): import("../common/commonTypes.js").D3TextElement; +export function drawLabel(elem: any, txtObject: any): void; +export function drawSection(elem: any, section: any, conf: any): void; +export function drawTask(elem: any, task: any, conf: any): void; +export function drawBackgroundRect(elem: any, bounds: any): void; +declare namespace _default { + export { drawRect }; + export { drawCircle }; + export { drawSection }; + export { drawText }; + export { drawLabel }; + export { drawTask }; + export { drawBackgroundRect }; + export { initGraphics }; +} +export default _default; +declare function initGraphics(graphics: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/docs/vite.config.d.ts b/webroot/js/node_modules/mermaid/dist/docs/vite.config.d.ts new file mode 100644 index 0000000..9d12dd4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/docs/vite.config.d.ts @@ -0,0 +1,2 @@ +declare const _default: import("vite").UserConfigExport; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/edges-020bfa8c.js b/webroot/js/node_modules/mermaid/dist/edges-020bfa8c.js new file mode 100644 index 0000000..2fae6e8 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/edges-020bfa8c.js @@ -0,0 +1,982 @@ +import { l as u, p as H, c as w, aR as Q, j as _, d as J, z as D, F as nt } from "./mermaid-e4a58915.js"; +import { c as at } from "./createText-4be7776a.js"; +import { l as lt } from "./line-4ba3c4fa.js"; +const ct = (a, t, r, n) => { + t.forEach((e) => { + bt[e](a, r, n); + }); +}, ht = (a, t, r) => { + u.trace("Making markers for ", r), a.append("defs").append("marker").attr("id", r + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), a.append("defs").append("marker").attr("id", r + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); +}, ot = (a, t, r) => { + a.append("defs").append("marker").attr("id", r + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), a.append("defs").append("marker").attr("id", r + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); +}, ft = (a, t, r) => { + a.append("defs").append("marker").attr("id", r + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), a.append("defs").append("marker").attr("id", r + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); +}, pt = (a, t, r) => { + a.append("defs").append("marker").attr("id", r + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), a.append("defs").append("marker").attr("id", r + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}, dt = (a, t, r) => { + a.append("defs").append("marker").attr("id", r + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), a.append("defs").append("marker").attr("id", r + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); +}, yt = (a, t, r) => { + a.append("marker").attr("id", r + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), a.append("marker").attr("id", r + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); +}, ut = (a, t, r) => { + a.append("marker").attr("id", r + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), a.append("marker").attr("id", r + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); +}, xt = (a, t, r) => { + a.append("marker").attr("id", r + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), a.append("marker").attr("id", r + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); +}, gt = (a, t, r) => { + a.append("defs").append("marker").attr("id", r + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); +}, bt = { + extension: ht, + composition: ot, + aggregation: ft, + dependency: pt, + lollipop: dt, + point: yt, + circle: ut, + cross: xt, + barb: gt +}, rr = ct; +function wt(a, t) { + t && a.attr("style", t); +} +function mt(a) { + const t = _(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), r = t.append("xhtml:div"), n = a.label, e = a.isNode ? "nodeLabel" : "edgeLabel"; + return r.html( + '" + n + "" + ), wt(r, a.labelStyle), r.style("display", "inline-block"), r.style("white-space", "nowrap"), r.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node(); +} +const kt = (a, t, r, n) => { + let e = a || ""; + if (typeof e == "object" && (e = e[0]), H(w().flowchart.htmlLabels)) { + e = e.replace(/\\n|\n/g, "
"), u.info("vertexText" + e); + const i = { + isNode: n, + label: Q(e).replace( + /fa[blrs]?:fa-[\w-]+/g, + (l) => `` + ), + labelStyle: t.replace("fill:", "color:") + }; + return mt(i); + } else { + const i = document.createElementNS("http://www.w3.org/2000/svg", "text"); + i.setAttribute("style", t.replace("color:", "fill:")); + let s = []; + typeof e == "string" ? s = e.split(/\\n|\n|/gi) : Array.isArray(e) ? s = e : s = []; + for (const l of s) { + const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), r ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), i.appendChild(c); + } + return i; + } +}, I = kt, B = async (a, t, r, n) => { + let e; + const i = t.useHtmlLabels || H(w().flowchart.htmlLabels); + r ? e = r : e = "node default"; + const s = a.insert("g").attr("class", e).attr("id", t.domId || t.id), l = s.insert("g").attr("class", "label").attr("style", t.labelStyle); + let c; + t.labelText === void 0 ? c = "" : c = typeof t.labelText == "string" ? t.labelText : t.labelText[0]; + const o = l.node(); + let h; + t.labelType === "markdown" ? h = at(l, J(Q(c), w()), { + useHtmlLabels: i, + width: t.width || w().flowchart.wrappingWidth, + classes: "markdown-node-label" + }) : h = o.appendChild( + I( + J(Q(c), w()), + t.labelStyle, + !1, + n + ) + ); + let f = h.getBBox(); + const d = t.padding / 2; + if (H(w().flowchart.htmlLabels)) { + const p = h.children[0], b = _(h), k = p.getElementsByTagName("img"); + if (k) { + const g = c.replace(/]*>/g, "").trim() === ""; + await Promise.all( + [...k].map( + (y) => new Promise((x) => { + function M() { + if (y.style.display = "flex", y.style.flexDirection = "column", g) { + const C = w().fontSize ? w().fontSize : window.getComputedStyle(document.body).fontSize, X = 5; + y.style.width = parseInt(C, 10) * X + "px"; + } else + y.style.width = "100%"; + x(y); + } + setTimeout(() => { + y.complete && M(); + }), y.addEventListener("error", M), y.addEventListener("load", M); + }) + ) + ); + } + f = p.getBoundingClientRect(), b.attr("width", f.width), b.attr("height", f.height); + } + return i ? l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")") : l.attr("transform", "translate(0, " + -f.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), l.insert("rect", ":first-child"), { shapeSvg: s, bbox: f, halfPadding: d, label: l }; +}, S = (a, t) => { + const r = t.node().getBBox(); + a.width = r.width, a.height = r.height; +}; +function $(a, t, r, n) { + return a.insert("polygon", ":first-child").attr( + "points", + n.map(function(e) { + return e.x + "," + e.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + r / 2 + ")"); +} +function Lt(a, t) { + return a.intersect(t); +} +function et(a, t, r, n) { + var e = a.x, i = a.y, s = e - n.x, l = i - n.y, c = Math.sqrt(t * t * l * l + r * r * s * s), o = Math.abs(t * r * s / c); + n.x < e && (o = -o); + var h = Math.abs(t * r * l / c); + return n.y < i && (h = -h), { x: e + o, y: i + h }; +} +function vt(a, t, r) { + return et(a, t, t, r); +} +function St(a, t, r, n) { + var e, i, s, l, c, o, h, f, d, p, b, k, g, y, x; + if (e = t.y - a.y, s = a.x - t.x, c = t.x * a.y - a.x * t.y, d = e * r.x + s * r.y + c, p = e * n.x + s * n.y + c, !(d !== 0 && p !== 0 && q(d, p)) && (i = n.y - r.y, l = r.x - n.x, o = n.x * r.y - r.x * n.y, h = i * a.x + l * a.y + o, f = i * t.x + l * t.y + o, !(h !== 0 && f !== 0 && q(h, f)) && (b = e * l - i * s, b !== 0))) + return k = Math.abs(b / 2), g = s * o - l * c, y = g < 0 ? (g - k) / b : (g + k) / b, g = i * c - e * o, x = g < 0 ? (g - k) / b : (g + k) / b, { x: y, y: x }; +} +function q(a, t) { + return a * t > 0; +} +function Et(a, t, r) { + var n = a.x, e = a.y, i = [], s = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY; + typeof t.forEach == "function" ? t.forEach(function(b) { + s = Math.min(s, b.x), l = Math.min(l, b.y); + }) : (s = Math.min(s, t.x), l = Math.min(l, t.y)); + for (var c = n - a.width / 2 - s, o = e - a.height / 2 - l, h = 0; h < t.length; h++) { + var f = t[h], d = t[h < t.length - 1 ? h + 1 : 0], p = St( + a, + r, + { x: c + f.x, y: o + f.y }, + { x: c + d.x, y: o + d.y } + ); + p && i.push(p); + } + return i.length ? (i.length > 1 && i.sort(function(b, k) { + var g = b.x - r.x, y = b.y - r.y, x = Math.sqrt(g * g + y * y), M = k.x - r.x, C = k.y - r.y, X = Math.sqrt(M * M + C * C); + return x < X ? -1 : x === X ? 0 : 1; + }), i[0]) : a; +} +const Mt = (a, t) => { + var r = a.x, n = a.y, e = t.x - r, i = t.y - n, s = a.width / 2, l = a.height / 2, c, o; + return Math.abs(i) * s > Math.abs(e) * l ? (i < 0 && (l = -l), c = i === 0 ? 0 : l * e / i, o = l) : (e < 0 && (s = -s), c = s, o = e === 0 ? 0 : s * i / e), { x: r + c, y: n + o }; +}, _t = Mt, m = { + node: Lt, + circle: vt, + ellipse: et, + polygon: Et, + rect: _t +}, Bt = async (a, t) => { + t.useHtmlLabels || w().flowchart.htmlLabels || (t.centerLabel = !0); + const { shapeSvg: n, bbox: e, halfPadding: i } = await B( + a, + t, + "node " + t.classes, + !0 + ); + u.info("Classes = ", t.classes); + const s = n.insert("rect", ":first-child"); + return s.attr("rx", t.rx).attr("ry", t.ry).attr("x", -e.width / 2 - i).attr("y", -e.height / 2 - i).attr("width", e.width + t.padding).attr("height", e.height + t.padding), S(t, s), t.intersect = function(l) { + return m.rect(t, l); + }, n; +}, Ct = Bt, K = (a) => a ? " " + a : "", R = (a, t) => `${t || "node default"}${K(a.classes)} ${K( + a.class +)}`, G = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = n.height + t.padding, s = e + i, l = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + u.info("Question main (Circle)"); + const c = $(r, s, s, l); + return c.attr("style", t.style), S(t, c), t.intersect = function(o) { + return u.warn("Intersect called"), m.polygon(t, l, o); + }, r; +}, Tt = (a, t) => { + const r = a.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, e = [ + { x: 0, y: n / 2 }, + { x: n / 2, y: 0 }, + { x: 0, y: -n / 2 }, + { x: -n / 2, y: 0 } + ]; + return r.insert("polygon", ":first-child").attr( + "points", + e.map(function(s) { + return s.x + "," + s.y; + }).join(" ") + ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(s) { + return m.circle(t, 14, s); + }, r; +}, Rt = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = 4, i = n.height + t.padding, s = i / e, l = n.width + 2 * s + t.padding, c = [ + { x: s, y: 0 }, + { x: l - s, y: 0 }, + { x: l, y: -i / 2 }, + { x: l - s, y: -i }, + { x: s, y: -i }, + { x: 0, y: -i / 2 } + ], o = $(r, l, i, c); + return o.attr("style", t.style), S(t, o), t.intersect = function(h) { + return m.polygon(t, c, h); + }, r; +}, It = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = n.height + t.padding, s = [ + { x: -i / 2, y: 0 }, + { x: e, y: 0 }, + { x: e, y: -i }, + { x: -i / 2, y: -i }, + { x: 0, y: -i / 2 } + ]; + return $(r, e, i, s).attr("style", t.style), t.width = e + i, t.height = i, t.intersect = function(c) { + return m.polygon(t, s, c); + }, r; +}, Ht = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B(a, t, R(t), !0), e = n.width + t.padding, i = n.height + t.padding, s = [ + { x: -2 * i / 6, y: 0 }, + { x: e - i / 6, y: 0 }, + { x: e + 2 * i / 6, y: -i }, + { x: i / 6, y: -i } + ], l = $(r, e, i, s); + return l.attr("style", t.style), S(t, l), t.intersect = function(c) { + return m.polygon(t, s, c); + }, r; +}, Nt = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = n.height + t.padding, s = [ + { x: 2 * i / 6, y: 0 }, + { x: e + i / 6, y: 0 }, + { x: e - 2 * i / 6, y: -i }, + { x: -i / 6, y: -i } + ], l = $(r, e, i, s); + return l.attr("style", t.style), S(t, l), t.intersect = function(c) { + return m.polygon(t, s, c); + }, r; +}, $t = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = n.height + t.padding, s = [ + { x: -2 * i / 6, y: 0 }, + { x: e + 2 * i / 6, y: 0 }, + { x: e - i / 6, y: -i }, + { x: i / 6, y: -i } + ], l = $(r, e, i, s); + return l.attr("style", t.style), S(t, l), t.intersect = function(c) { + return m.polygon(t, s, c); + }, r; +}, Ot = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = n.height + t.padding, s = [ + { x: i / 6, y: 0 }, + { x: e - i / 6, y: 0 }, + { x: e + 2 * i / 6, y: -i }, + { x: -2 * i / 6, y: -i } + ], l = $(r, e, i, s); + return l.attr("style", t.style), S(t, l), t.intersect = function(c) { + return m.polygon(t, s, c); + }, r; +}, Xt = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = n.height + t.padding, s = [ + { x: 0, y: 0 }, + { x: e + i / 2, y: 0 }, + { x: e, y: -i / 2 }, + { x: e + i / 2, y: -i }, + { x: 0, y: -i } + ], l = $(r, e, i, s); + return l.attr("style", t.style), S(t, l), t.intersect = function(c) { + return m.polygon(t, s, c); + }, r; +}, Yt = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = e / 2, s = i / (2.5 + e / 50), l = n.height + s + t.padding, c = "M 0," + s + " a " + i + "," + s + " 0,0,0 " + e + " 0 a " + i + "," + s + " 0,0,0 " + -e + " 0 l 0," + l + " a " + i + "," + s + " 0,0,0 " + e + " 0 l 0," + -l, o = r.attr("label-offset-y", s).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -e / 2 + "," + -(l / 2 + s) + ")"); + return S(t, o), t.intersect = function(h) { + const f = m.rect(t, h), d = f.x - t.x; + if (i != 0 && (Math.abs(d) < t.width / 2 || Math.abs(d) == t.width / 2 && Math.abs(f.y - t.y) > t.height / 2 - s)) { + let p = s * s * (1 - d * d / (i * i)); + p != 0 && (p = Math.sqrt(p)), p = s - p, h.y - t.y > 0 && (p = -p), f.y += p; + } + return f; + }, r; +}, Wt = async (a, t) => { + const { shapeSvg: r, bbox: n, halfPadding: e } = await B( + a, + t, + "node " + t.classes + " " + t.class, + !0 + ), i = r.insert("rect", ":first-child"), s = n.width + t.padding, l = n.height + t.padding; + if (i.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - e).attr("y", -n.height / 2 - e).attr("width", s).attr("height", l), t.props) { + const c = new Set(Object.keys(t.props)); + t.props.borders && (st(i, t.props.borders, s, l), c.delete("borders")), c.forEach((o) => { + u.warn(`Unknown node property ${o}`); + }); + } + return S(t, i), t.intersect = function(c) { + return m.rect(t, c); + }, r; +}, jt = async (a, t) => { + const { shapeSvg: r } = await B(a, t, "label", !0); + u.trace("Classes = ", t.class); + const n = r.insert("rect", ":first-child"), e = 0, i = 0; + if (n.attr("width", e).attr("height", i), r.attr("class", "label edgeLabel"), t.props) { + const s = new Set(Object.keys(t.props)); + t.props.borders && (st(n, t.props.borders, e, i), s.delete("borders")), s.forEach((l) => { + u.warn(`Unknown node property ${l}`); + }); + } + return S(t, n), t.intersect = function(s) { + return m.rect(t, s); + }, r; +}; +function st(a, t, r, n) { + const e = [], i = (l) => { + e.push(l, 0); + }, s = (l) => { + e.push(0, l); + }; + t.includes("t") ? (u.debug("add top border"), i(r)) : s(r), t.includes("r") ? (u.debug("add right border"), i(n)) : s(n), t.includes("b") ? (u.debug("add bottom border"), i(r)) : s(r), t.includes("l") ? (u.debug("add left border"), i(n)) : s(n), a.attr("stroke-dasharray", e.join(" ")); +} +const Dt = (a, t) => { + let r; + t.classes ? r = "node " + t.classes : r = "node default"; + const n = a.insert("g").attr("class", r).attr("id", t.domId || t.id), e = n.insert("rect", ":first-child"), i = n.insert("line"), s = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText; + let c = ""; + typeof l == "object" ? c = l[0] : c = l, u.info("Label text abc79", c, l, typeof l == "object"); + const o = s.node().appendChild(I(c, t.labelStyle, !0, !0)); + let h = { width: 0, height: 0 }; + if (H(w().flowchart.htmlLabels)) { + const k = o.children[0], g = _(o); + h = k.getBoundingClientRect(), g.attr("width", h.width), g.attr("height", h.height); + } + u.info("Text 2", l); + const f = l.slice(1, l.length); + let d = o.getBBox(); + const p = s.node().appendChild( + I(f.join ? f.join("
") : f, t.labelStyle, !0, !0) + ); + if (H(w().flowchart.htmlLabels)) { + const k = p.children[0], g = _(p); + h = k.getBoundingClientRect(), g.attr("width", h.width), g.attr("height", h.height); + } + const b = t.padding / 2; + return _(p).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (h.width > d.width ? 0 : (d.width - h.width) / 2) + ", " + (d.height + b + 5) + ")" + ), _(o).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (h.width < d.width ? 0 : -(d.width - h.width) / 2) + ", 0)" + ), h = s.node().getBBox(), s.attr( + "transform", + "translate(" + -h.width / 2 + ", " + (-h.height / 2 - b + 3) + ")" + ), e.attr("class", "outer title-state").attr("x", -h.width / 2 - b).attr("y", -h.height / 2 - b).attr("width", h.width + t.padding).attr("height", h.height + t.padding), i.attr("class", "divider").attr("x1", -h.width / 2 - b).attr("x2", h.width / 2 + b).attr("y1", -h.height / 2 - b + d.height + b).attr("y2", -h.height / 2 - b + d.height + b), S(t, e), t.intersect = function(k) { + return m.rect(t, k); + }, n; +}, At = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.height + t.padding, i = n.width + e / 4 + t.padding, s = r.insert("rect", ":first-child").attr("style", t.style).attr("rx", e / 2).attr("ry", e / 2).attr("x", -i / 2).attr("y", -e / 2).attr("width", i).attr("height", e); + return S(t, s), t.intersect = function(l) { + return m.rect(t, l); + }, r; +}, Ut = async (a, t) => { + const { shapeSvg: r, bbox: n, halfPadding: e } = await B( + a, + t, + R(t, void 0), + !0 + ), i = r.insert("circle", ":first-child"); + return i.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + e).attr("width", n.width + t.padding).attr("height", n.height + t.padding), u.info("Circle main"), S(t, i), t.intersect = function(s) { + return u.info("Circle intersect", t, n.width / 2 + e, s), m.circle(t, n.width / 2 + e, s); + }, r; +}, zt = async (a, t) => { + const { shapeSvg: r, bbox: n, halfPadding: e } = await B( + a, + t, + R(t, void 0), + !0 + ), i = 5, s = r.insert("g", ":first-child"), l = s.insert("circle"), c = s.insert("circle"); + return s.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + e + i).attr("width", n.width + t.padding + i * 2).attr("height", n.height + t.padding + i * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + e).attr("width", n.width + t.padding).attr("height", n.height + t.padding), u.info("DoubleCircle main"), S(t, l), t.intersect = function(o) { + return u.info("DoubleCircle intersect", t, n.width / 2 + e + i, o), m.circle(t, n.width / 2 + e + i, o); + }, r; +}, Zt = async (a, t) => { + const { shapeSvg: r, bbox: n } = await B( + a, + t, + R(t, void 0), + !0 + ), e = n.width + t.padding, i = n.height + t.padding, s = [ + { x: 0, y: 0 }, + { x: e, y: 0 }, + { x: e, y: -i }, + { x: 0, y: -i }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: e + 8, y: 0 }, + { x: e + 8, y: -i }, + { x: -8, y: -i }, + { x: -8, y: 0 } + ], l = $(r, e, i, s); + return l.attr("style", t.style), S(t, l), t.intersect = function(c) { + return m.polygon(t, s, c); + }, r; +}, Ft = (a, t) => { + const r = a.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = r.insert("circle", ":first-child"); + return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), S(t, n), t.intersect = function(e) { + return m.circle(t, 7, e); + }, r; +}, P = (a, t, r) => { + const n = a.insert("g").attr("class", "node default").attr("id", t.domId || t.id); + let e = 70, i = 10; + r === "LR" && (e = 10, i = 70); + const s = n.append("rect").attr("x", -1 * e / 2).attr("y", -1 * i / 2).attr("width", e).attr("height", i).attr("class", "fork-join"); + return S(t, s), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(l) { + return m.rect(t, l); + }, n; +}, Qt = (a, t) => { + const r = a.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = r.insert("circle", ":first-child"), e = r.insert("circle", ":first-child"); + return e.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), S(t, e), t.intersect = function(i) { + return m.circle(t, 7, i); + }, r; +}, Vt = (a, t) => { + const r = t.padding / 2, n = 4, e = 8; + let i; + t.classes ? i = "node " + t.classes : i = "node default"; + const s = a.insert("g").attr("class", i).attr("id", t.domId || t.id), l = s.insert("rect", ":first-child"), c = s.insert("line"), o = s.insert("line"); + let h = 0, f = n; + const d = s.insert("g").attr("class", "label"); + let p = 0; + const b = t.classData.annotations && t.classData.annotations[0], k = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", g = d.node().appendChild(I(k, t.labelStyle, !0, !0)); + let y = g.getBBox(); + if (H(w().flowchart.htmlLabels)) { + const L = g.children[0], v = _(g); + y = L.getBoundingClientRect(), v.attr("width", y.width), v.attr("height", y.height); + } + t.classData.annotations[0] && (f += y.height + n, h += y.width); + let x = t.classData.label; + t.classData.type !== void 0 && t.classData.type !== "" && (w().flowchart.htmlLabels ? x += "<" + t.classData.type + ">" : x += "<" + t.classData.type + ">"); + const M = d.node().appendChild(I(x, t.labelStyle, !0, !0)); + _(M).attr("class", "classTitle"); + let C = M.getBBox(); + if (H(w().flowchart.htmlLabels)) { + const L = M.children[0], v = _(M); + C = L.getBoundingClientRect(), v.attr("width", C.width), v.attr("height", C.height); + } + f += C.height + n, C.width > h && (h = C.width); + const X = []; + t.classData.members.forEach((L) => { + const v = L.getDisplayDetails(); + let Y = v.displayText; + w().flowchart.htmlLabels && (Y = Y.replace(//g, ">")); + const N = d.node().appendChild( + I( + Y, + v.cssStyle ? v.cssStyle : t.labelStyle, + !0, + !0 + ) + ); + let T = N.getBBox(); + if (H(w().flowchart.htmlLabels)) { + const F = N.children[0], j = _(N); + T = F.getBoundingClientRect(), j.attr("width", T.width), j.attr("height", T.height); + } + T.width > h && (h = T.width), f += T.height + n, X.push(N); + }), f += e; + const V = []; + if (t.classData.methods.forEach((L) => { + const v = L.getDisplayDetails(); + let Y = v.displayText; + w().flowchart.htmlLabels && (Y = Y.replace(//g, ">")); + const N = d.node().appendChild( + I( + Y, + v.cssStyle ? v.cssStyle : t.labelStyle, + !0, + !0 + ) + ); + let T = N.getBBox(); + if (H(w().flowchart.htmlLabels)) { + const F = N.children[0], j = _(N); + T = F.getBoundingClientRect(), j.attr("width", T.width), j.attr("height", T.height); + } + T.width > h && (h = T.width), f += T.height + n, V.push(N); + }), f += e, b) { + let L = (h - y.width) / 2; + _(g).attr( + "transform", + "translate( " + (-1 * h / 2 + L) + ", " + -1 * f / 2 + ")" + ), p = y.height + n; + } + let it = (h - C.width) / 2; + return _(M).attr( + "transform", + "translate( " + (-1 * h / 2 + it) + ", " + (-1 * f / 2 + p) + ")" + ), p += C.height + n, c.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -f / 2 - r + e + p).attr("y2", -f / 2 - r + e + p), p += e, X.forEach((L) => { + _(L).attr( + "transform", + "translate( " + -h / 2 + ", " + (-1 * f / 2 + p + e / 2) + ")" + ); + const v = L == null ? void 0 : L.getBBox(); + p += ((v == null ? void 0 : v.height) ?? 0) + n; + }), p += e, o.attr("class", "divider").attr("x1", -h / 2 - r).attr("x2", h / 2 + r).attr("y1", -f / 2 - r + e + p).attr("y2", -f / 2 - r + e + p), p += e, V.forEach((L) => { + _(L).attr( + "transform", + "translate( " + -h / 2 + ", " + (-1 * f / 2 + p) + ")" + ); + const v = L == null ? void 0 : L.getBBox(); + p += ((v == null ? void 0 : v.height) ?? 0) + n; + }), l.attr("class", "outer title-state").attr("x", -h / 2 - r).attr("y", -(f / 2) - r).attr("width", h + t.padding).attr("height", f + t.padding), S(t, l), t.intersect = function(L) { + return m.rect(t, L); + }, s; +}, tt = { + rhombus: G, + question: G, + rect: Wt, + labelRect: jt, + rectWithTitle: Dt, + choice: Tt, + circle: Ut, + doublecircle: zt, + stadium: At, + hexagon: Rt, + rect_left_inv_arrow: It, + lean_right: Ht, + lean_left: Nt, + trapezoid: $t, + inv_trapezoid: Ot, + rect_right_inv_arrow: Xt, + cylinder: Yt, + start: Ft, + end: Qt, + note: Ct, + subroutine: Zt, + fork: P, + join: P, + class_box: Vt +}; +let W = {}; +const ar = async (a, t, r) => { + let n, e; + if (t.link) { + let i; + w().securityLevel === "sandbox" ? i = "_top" : t.linkTarget && (i = t.linkTarget || "_blank"), n = a.insert("svg:a").attr("xlink:href", t.link).attr("target", i), e = await tt[t.shape](n, t, r); + } else + e = await tt[t.shape](a, t, r), n = e; + return t.tooltip && e.attr("title", t.tooltip), t.class && e.attr("class", "node default " + t.class), W[t.id] = n, t.haveCallback && W[t.id].attr("class", W[t.id].attr("class") + " clickable"), n; +}, er = (a, t) => { + W[t.id] = a; +}, sr = () => { + W = {}; +}, ir = (a) => { + const t = W[a.id]; + u.trace( + "Transforming node", + a.diff, + a, + "translate(" + (a.x - a.width / 2 - 5) + ", " + a.width / 2 + ")" + ); + const r = 8, n = a.diff || 0; + return a.clusterNode ? t.attr( + "transform", + "translate(" + (a.x + n - a.width / 2) + ", " + (a.y - a.height / 2 - r) + ")" + ) : t.attr("transform", "translate(" + a.x + ", " + a.y + ")"), n; +}, O = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function A(a, t) { + a = z(a), t = z(t); + const [r, n] = [a.x, a.y], [e, i] = [t.x, t.y], s = e - r, l = i - n; + return { angle: Math.atan(l / s), deltaX: s, deltaY: l }; +} +const z = (a) => Array.isArray(a) ? { x: a[0], y: a[1] } : a, Jt = (a) => ({ + x: function(t, r, n) { + let e = 0; + if (r === 0 && Object.hasOwn(O, a.arrowTypeStart)) { + const { angle: i, deltaX: s } = A(n[0], n[1]); + e = O[a.arrowTypeStart] * Math.cos(i) * (s >= 0 ? 1 : -1); + } else if (r === n.length - 1 && Object.hasOwn(O, a.arrowTypeEnd)) { + const { angle: i, deltaX: s } = A( + n[n.length - 1], + n[n.length - 2] + ); + e = O[a.arrowTypeEnd] * Math.cos(i) * (s >= 0 ? 1 : -1); + } + return z(t).x + e; + }, + y: function(t, r, n) { + let e = 0; + if (r === 0 && Object.hasOwn(O, a.arrowTypeStart)) { + const { angle: i, deltaY: s } = A(n[0], n[1]); + e = O[a.arrowTypeStart] * Math.abs(Math.sin(i)) * (s >= 0 ? 1 : -1); + } else if (r === n.length - 1 && Object.hasOwn(O, a.arrowTypeEnd)) { + const { angle: i, deltaY: s } = A( + n[n.length - 1], + n[n.length - 2] + ); + e = O[a.arrowTypeEnd] * Math.abs(Math.sin(i)) * (s >= 0 ? 1 : -1); + } + return z(t).y + e; + } +}); +let Z = {}, E = {}; +const nr = () => { + Z = {}, E = {}; +}, lr = (a, t) => { + const r = H(w().flowchart.htmlLabels), n = t.labelType === "markdown" ? at(a, t.label, { + style: t.labelStyle, + useHtmlLabels: r, + addSvgBackground: !0 + }) : I(t.label, t.labelStyle); + u.info("abc82", t, t.labelType); + const e = a.insert("g").attr("class", "edgeLabel"), i = e.insert("g").attr("class", "label"); + i.node().appendChild(n); + let s = n.getBBox(); + if (r) { + const c = n.children[0], o = _(n); + s = c.getBoundingClientRect(), o.attr("width", s.width), o.attr("height", s.height); + } + i.attr("transform", "translate(" + -s.width / 2 + ", " + -s.height / 2 + ")"), Z[t.id] = e, t.width = s.width, t.height = s.height; + let l; + if (t.startLabelLeft) { + const c = I(t.startLabelLeft, t.labelStyle), o = a.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner"); + l = h.node().appendChild(c); + const f = c.getBBox(); + h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), E[t.id] || (E[t.id] = {}), E[t.id].startLeft = o, U(l, t.startLabelLeft); + } + if (t.startLabelRight) { + const c = I(t.startLabelRight, t.labelStyle), o = a.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner"); + l = o.node().appendChild(c), h.node().appendChild(c); + const f = c.getBBox(); + h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), E[t.id] || (E[t.id] = {}), E[t.id].startRight = o, U(l, t.startLabelRight); + } + if (t.endLabelLeft) { + const c = I(t.endLabelLeft, t.labelStyle), o = a.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner"); + l = h.node().appendChild(c); + const f = c.getBBox(); + h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), o.node().appendChild(c), E[t.id] || (E[t.id] = {}), E[t.id].endLeft = o, U(l, t.endLabelLeft); + } + if (t.endLabelRight) { + const c = I(t.endLabelRight, t.labelStyle), o = a.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner"); + l = h.node().appendChild(c); + const f = c.getBBox(); + h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), o.node().appendChild(c), E[t.id] || (E[t.id] = {}), E[t.id].endRight = o, U(l, t.endLabelRight); + } + return n; +}; +function U(a, t) { + w().flowchart.htmlLabels && a && (a.style.width = t.length * 9 + "px", a.style.height = "12px"); +} +const cr = (a, t) => { + u.info("Moving label abc78 ", a.id, a.label, Z[a.id]); + let r = t.updatedPath ? t.updatedPath : t.originalPath; + if (a.label) { + const n = Z[a.id]; + let e = a.x, i = a.y; + if (r) { + const s = D.calcLabelPosition(r); + u.info( + "Moving label " + a.label + " from (", + e, + ",", + i, + ") to (", + s.x, + ",", + s.y, + ") abc78" + ), t.updatedPath && (e = s.x, i = s.y); + } + n.attr("transform", "translate(" + e + ", " + i + ")"); + } + if (a.startLabelLeft) { + const n = E[a.id].startLeft; + let e = a.x, i = a.y; + if (r) { + const s = D.calcTerminalLabelPosition(a.arrowTypeStart ? 10 : 0, "start_left", r); + e = s.x, i = s.y; + } + n.attr("transform", "translate(" + e + ", " + i + ")"); + } + if (a.startLabelRight) { + const n = E[a.id].startRight; + let e = a.x, i = a.y; + if (r) { + const s = D.calcTerminalLabelPosition( + a.arrowTypeStart ? 10 : 0, + "start_right", + r + ); + e = s.x, i = s.y; + } + n.attr("transform", "translate(" + e + ", " + i + ")"); + } + if (a.endLabelLeft) { + const n = E[a.id].endLeft; + let e = a.x, i = a.y; + if (r) { + const s = D.calcTerminalLabelPosition(a.arrowTypeEnd ? 10 : 0, "end_left", r); + e = s.x, i = s.y; + } + n.attr("transform", "translate(" + e + ", " + i + ")"); + } + if (a.endLabelRight) { + const n = E[a.id].endRight; + let e = a.x, i = a.y; + if (r) { + const s = D.calcTerminalLabelPosition(a.arrowTypeEnd ? 10 : 0, "end_right", r); + e = s.x, i = s.y; + } + n.attr("transform", "translate(" + e + ", " + i + ")"); + } +}, qt = (a, t) => { + const r = a.x, n = a.y, e = Math.abs(t.x - r), i = Math.abs(t.y - n), s = a.width / 2, l = a.height / 2; + return e >= s || i >= l; +}, Kt = (a, t, r) => { + u.warn(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`); + const n = a.x, e = a.y, i = Math.abs(n - r.x), s = a.width / 2; + let l = r.x < t.x ? s - i : s + i; + const c = a.height / 2, o = Math.abs(t.y - r.y), h = Math.abs(t.x - r.x); + if (Math.abs(e - t.y) * s > Math.abs(n - t.x) * c) { + let f = r.y < t.y ? t.y - c - e : e - c - t.y; + l = h * f / o; + const d = { + x: r.x < t.x ? r.x + l : r.x - h + l, + y: r.y < t.y ? r.y + o - f : r.y - o + f + }; + return l === 0 && (d.x = t.x, d.y = t.y), h === 0 && (d.x = t.x), o === 0 && (d.y = t.y), u.warn(`abc89 topp/bott calc, Q ${o}, q ${f}, R ${h}, r ${l}`, d), d; + } else { + r.x < t.x ? l = t.x - s - n : l = n - s - t.x; + let f = o * l / h, d = r.x < t.x ? r.x + h - l : r.x - h + l, p = r.y < t.y ? r.y + f : r.y - f; + return u.warn(`sides calc abc89, Q ${o}, q ${f}, R ${h}, r ${l}`, { _x: d, _y: p }), l === 0 && (d = t.x, p = t.y), h === 0 && (d = t.x), o === 0 && (p = t.y), { x: d, y: p }; + } +}, rt = (a, t) => { + u.warn("abc88 cutPathAtIntersect", a, t); + let r = [], n = a[0], e = !1; + return a.forEach((i) => { + if (u.info("abc88 checking point", i, t), !qt(t, i) && !e) { + const s = Kt(t, n, i); + u.warn("abc88 inside", i, n, s), u.warn("abc88 intersection", s); + let l = !1; + r.forEach((c) => { + l = l || c.x === s.x && c.y === s.y; + }), r.some((c) => c.x === s.x && c.y === s.y) ? u.warn("abc88 no intersect", s, r) : r.push(s), e = !0; + } else + u.warn("abc88 outside", i, n), n = i, e || r.push(i); + }), u.warn("abc88 returning points", r), r; +}, hr = function(a, t, r, n, e, i, s) { + let l = r.points, c = !1; + const o = i.node(t.v); + var h = i.node(t.w); + u.info("abc88 InsertEdge: ", r), h.intersect && o.intersect && (l = l.slice(1, r.points.length - 1), l.unshift(o.intersect(l[0])), u.info( + "Last point", + l[l.length - 1], + h, + h.intersect(l[l.length - 1]) + ), l.push(h.intersect(l[l.length - 1]))), r.toCluster && (u.info("to cluster abc88", n[r.toCluster]), l = rt(r.points, n[r.toCluster].node), c = !0), r.fromCluster && (u.info("from cluster abc88", n[r.fromCluster]), l = rt(l.reverse(), n[r.fromCluster].node).reverse(), c = !0); + const f = l.filter((C) => !Number.isNaN(C.y)); + let d = nt; + r.curve && (e === "graph" || e === "flowchart") && (d = r.curve); + const { x: p, y: b } = Jt(r), k = lt().x(p).y(b).curve(d); + let g; + switch (r.thickness) { + case "normal": + g = "edge-thickness-normal"; + break; + case "thick": + g = "edge-thickness-thick"; + break; + case "invisible": + g = "edge-thickness-thick"; + break; + default: + g = ""; + } + switch (r.pattern) { + case "solid": + g += " edge-pattern-solid"; + break; + case "dotted": + g += " edge-pattern-dotted"; + break; + case "dashed": + g += " edge-pattern-dashed"; + break; + } + const y = a.append("path").attr("d", k(f)).attr("id", r.id).attr("class", " " + g + (r.classes ? " " + r.classes : "")).attr("style", r.style); + let x = ""; + switch ((w().flowchart.arrowMarkerAbsolute || w().state.arrowMarkerAbsolute) && (x = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, x = x.replace(/\(/g, "\\("), x = x.replace(/\)/g, "\\)")), u.info("arrowTypeStart", r.arrowTypeStart), u.info("arrowTypeEnd", r.arrowTypeEnd), r.arrowTypeStart) { + case "arrow_cross": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-crossStart)" + ); + break; + case "arrow_point": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-pointStart)" + ); + break; + case "arrow_barb": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-barbStart)" + ); + break; + case "arrow_circle": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-circleStart)" + ); + break; + case "aggregation": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-aggregationStart)" + ); + break; + case "extension": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-extensionStart)" + ); + break; + case "composition": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-compositionStart)" + ); + break; + case "dependency": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-dependencyStart)" + ); + break; + case "lollipop": + y.attr( + "marker-start", + "url(" + x + "#" + s + "_" + e + "-lollipopStart)" + ); + break; + } + switch (r.arrowTypeEnd) { + case "arrow_cross": + y.attr("marker-end", "url(" + x + "#" + s + "_" + e + "-crossEnd)"); + break; + case "arrow_point": + y.attr("marker-end", "url(" + x + "#" + s + "_" + e + "-pointEnd)"); + break; + case "arrow_barb": + y.attr("marker-end", "url(" + x + "#" + s + "_" + e + "-barbEnd)"); + break; + case "arrow_circle": + y.attr("marker-end", "url(" + x + "#" + s + "_" + e + "-circleEnd)"); + break; + case "aggregation": + y.attr( + "marker-end", + "url(" + x + "#" + s + "_" + e + "-aggregationEnd)" + ); + break; + case "extension": + y.attr( + "marker-end", + "url(" + x + "#" + s + "_" + e + "-extensionEnd)" + ); + break; + case "composition": + y.attr( + "marker-end", + "url(" + x + "#" + s + "_" + e + "-compositionEnd)" + ); + break; + case "dependency": + y.attr( + "marker-end", + "url(" + x + "#" + s + "_" + e + "-dependencyEnd)" + ); + break; + case "lollipop": + y.attr( + "marker-end", + "url(" + x + "#" + s + "_" + e + "-lollipopEnd)" + ); + break; + } + let M = {}; + return c && (M.updatedPath = l), M.originalPath = r.points, M; +}; +export { + rr as a, + sr as b, + I as c, + nr as d, + ar as e, + lr as f, + hr as g, + cr as h, + _t as i, + Jt as j, + B as l, + ir as p, + er as s, + S as u +}; diff --git a/webroot/js/node_modules/mermaid/dist/edges-9bf94b2d.js b/webroot/js/node_modules/mermaid/dist/edges-9bf94b2d.js new file mode 100644 index 0000000..62a8fce --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/edges-9bf94b2d.js @@ -0,0 +1,1652 @@ +import { l as log, p as evaluate, c as getConfig, aR as decodeEntities, j as d3select, d as sanitizeText, z as utils, F as curveBasis } from "./mermaid-491db2d9.js"; +import { c as createText } from "./createText-2660bae1.js"; +import { l as line } from "./line-8fd2bd69.js"; +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + log.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = d3select(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '" + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if (evaluate(getConfig().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "
"); + log.info("vertexText" + vertexText); + const node = { + isNode, + label: decodeEntities(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = createText(label, sanitizeText(decodeEntities(labelText), getConfig()), { + useHtmlLabels, + width: node.width || getConfig().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + sanitizeText(decodeEntities(labelText), getConfig()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = d3select(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = getConfig().fontSize ? getConfig().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + img.style.width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + log.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + log.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + log.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = bbox.width + node.padding; + const totalHeight = bbox.height + node.padding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + log.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + log.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + log.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + log.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + log.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + log.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + log.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + log.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = d3select(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + log.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true) + ); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = d3select(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + d3select(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + d3select(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + log.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + log.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + log.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + log.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = d3select(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if (getConfig().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + d3select(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = d3select(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if (getConfig().flowchart.htmlLabels) { + parsedText = parsedText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = d3select(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if (getConfig().flowchart.htmlLabels) { + displayText = displayText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = d3select(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + d3select(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + d3select(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + d3select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + d3select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if (getConfig().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + log.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? createText(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + log.info("abc82", edge, edge.labelType); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = d3select(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if (getConfig().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + log.info("Moving label abc78 ", edge.id, edge.label, edgeLabels[edge.id]); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcLabelPosition(path); + log.info( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc78" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + log.warn(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + log.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + log.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundryNode) => { + log.warn("abc88 cutPathAtIntersect", _points, boundryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + log.info("abc88 checking point", point2, boundryNode); + if (!outsideNode(boundryNode, point2) && !isInside) { + const inter = intersection(boundryNode, lastPointOutside, point2); + log.warn("abc88 inside", point2, lastPointOutside, inter); + log.warn("abc88 intersection", inter); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } else { + log.warn("abc88 no intersect", inter, points); + } + isInside = true; + } else { + log.warn("abc88 outside", point2, lastPointOutside); + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + log.warn("abc88 returning points", points); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + log.info("abc88 InsertEdge: ", edge); + if (head.intersect && tail.intersect) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + log.info( + "Last point", + points[points.length - 1], + head, + head.intersect(points[points.length - 1]) + ); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + log.info("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + log.info("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = curveBasis; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = line().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + log.info("arrowTypeStart", edge.arrowTypeStart); + log.info("arrowTypeEnd", edge.arrowTypeEnd); + switch (edge.arrowTypeStart) { + case "arrow_cross": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-crossStart)" + ); + break; + case "arrow_point": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-pointStart)" + ); + break; + case "arrow_barb": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-barbStart)" + ); + break; + case "arrow_circle": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-circleStart)" + ); + break; + case "aggregation": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationStart)" + ); + break; + case "extension": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-extensionStart)" + ); + break; + case "composition": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-compositionStart)" + ); + break; + case "dependency": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyStart)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopStart)" + ); + break; + } + switch (edge.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationEnd)" + ); + break; + case "extension": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-extensionEnd)" + ); + break; + case "composition": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-compositionEnd)" + ); + break; + case "dependency": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyEnd)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopEnd)" + ); + break; + } + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; +export { + insertMarkers$1 as a, + clear$1 as b, + createLabel$1 as c, + clear as d, + insertNode as e, + insertEdgeLabel as f, + insertEdge as g, + positionEdgeLabel as h, + intersectRect$1 as i, + getLineFunctionsWithOffset as j, + labelHelper as l, + positionNode as p, + setNodeElem as s, + updateNodeBounds as u +}; diff --git a/webroot/js/node_modules/mermaid/dist/edges-f15a7e05.js b/webroot/js/node_modules/mermaid/dist/edges-f15a7e05.js new file mode 100644 index 0000000..3e36684 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/edges-f15a7e05.js @@ -0,0 +1,1652 @@ +import { l as log, m as evaluate, c as getConfig, J as decodeEntities, d as sanitizeText, u as utils } from "./mermaid-0d192ec3.js"; +import { select, line, curveBasis } from "d3"; +import { c as createText } from "./createText-80c3befb.js"; +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + log.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = select(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '" + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if (evaluate(getConfig().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "
"); + log.info("vertexText" + vertexText); + const node = { + isNode, + label: decodeEntities(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = createText(label, sanitizeText(decodeEntities(labelText), getConfig()), { + useHtmlLabels, + width: node.width || getConfig().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + sanitizeText(decodeEntities(labelText), getConfig()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = select(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = getConfig().fontSize ? getConfig().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + img.style.width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + log.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + log.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + log.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = bbox.width + node.padding; + const totalHeight = bbox.height + node.padding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + log.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + log.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + log.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + log.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + log.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + log.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + log.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + log.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = select(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + log.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true) + ); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = select(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + select(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + select(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + log.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + log.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + log.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + log.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = select(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if (getConfig().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + select(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = select(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if (getConfig().flowchart.htmlLabels) { + parsedText = parsedText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = select(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if (getConfig().flowchart.htmlLabels) { + displayText = displayText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = select(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + select(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + select(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if (getConfig().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + log.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? createText(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + log.info("abc82", edge, edge.labelType); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = select(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if (getConfig().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + log.info("Moving label abc78 ", edge.id, edge.label, edgeLabels[edge.id]); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcLabelPosition(path); + log.info( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc78" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", "translate(" + x + ", " + y + ")"); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + log.warn(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + log.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + log.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundryNode) => { + log.warn("abc88 cutPathAtIntersect", _points, boundryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + log.info("abc88 checking point", point2, boundryNode); + if (!outsideNode(boundryNode, point2) && !isInside) { + const inter = intersection(boundryNode, lastPointOutside, point2); + log.warn("abc88 inside", point2, lastPointOutside, inter); + log.warn("abc88 intersection", inter); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } else { + log.warn("abc88 no intersect", inter, points); + } + isInside = true; + } else { + log.warn("abc88 outside", point2, lastPointOutside); + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + log.warn("abc88 returning points", points); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + log.info("abc88 InsertEdge: ", edge); + if (head.intersect && tail.intersect) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + log.info( + "Last point", + points[points.length - 1], + head, + head.intersect(points[points.length - 1]) + ); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + log.info("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + log.info("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = curveBasis; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = line().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + log.info("arrowTypeStart", edge.arrowTypeStart); + log.info("arrowTypeEnd", edge.arrowTypeEnd); + switch (edge.arrowTypeStart) { + case "arrow_cross": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-crossStart)" + ); + break; + case "arrow_point": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-pointStart)" + ); + break; + case "arrow_barb": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-barbStart)" + ); + break; + case "arrow_circle": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-circleStart)" + ); + break; + case "aggregation": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationStart)" + ); + break; + case "extension": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-extensionStart)" + ); + break; + case "composition": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-compositionStart)" + ); + break; + case "dependency": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyStart)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopStart)" + ); + break; + } + switch (edge.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationEnd)" + ); + break; + case "extension": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-extensionEnd)" + ); + break; + case "composition": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-compositionEnd)" + ); + break; + case "dependency": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyEnd)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopEnd)" + ); + break; + } + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; +export { + insertMarkers$1 as a, + clear$1 as b, + createLabel$1 as c, + clear as d, + insertNode as e, + insertEdgeLabel as f, + insertEdge as g, + positionEdgeLabel as h, + intersectRect$1 as i, + getLineFunctionsWithOffset as j, + labelHelper as l, + positionNode as p, + setNodeElem as s, + updateNodeBounds as u +}; diff --git a/webroot/js/node_modules/mermaid/dist/erDiagram-4c5cab4a.js b/webroot/js/node_modules/mermaid/dist/erDiagram-4c5cab4a.js new file mode 100644 index 0000000..f5bf12c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/erDiagram-4c5cab4a.js @@ -0,0 +1,1320 @@ +import { c as getConfig, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, B as setDiagramTitle, D as getDiagramTitle, l as log, E as clear$1, j as d3select, z as utils, k as configureSvgSize, F as curveBasis, G as parseGenericTypes } from "./mermaid-491db2d9.js"; +import { G as Graph, l as layout } from "./layout-a7b9ff07.js"; +import { l as line } from "./line-8fd2bd69.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 20, 22, 24, 26, 27, 28], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 14], $V6 = [1, 15], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 24], $Vb = [1, 25], $Vc = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], $Vd = [1, 34], $Ve = [27, 28, 46, 47], $Vf = [41, 42, 43, 44, 45], $Vg = [17, 34], $Vh = [1, 54], $Vi = [1, 53], $Vj = [17, 34, 36, 38]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "entityName": 11, "relSpec": 12, ":": 13, "role": 14, "BLOCK_START": 15, "attributes": 16, "BLOCK_STOP": 17, "SQS": 18, "SQE": 19, "title": 20, "title_value": 21, "acc_title": 22, "acc_title_value": 23, "acc_descr": 24, "acc_descr_value": 25, "acc_descr_multiline_value": 26, "ALPHANUM": 27, "ENTITY_NAME": 28, "attribute": 29, "attributeType": 30, "attributeName": 31, "attributeKeyTypeList": 32, "attributeComment": 33, "ATTRIBUTE_WORD": 34, "attributeKeyType": 35, "COMMA": 36, "ATTRIBUTE_KEY": 37, "COMMENT": 38, "cardinality": 39, "relType": 40, "ZERO_OR_ONE": 41, "ZERO_OR_MORE": 42, "ONE_OR_MORE": 43, "ONLY_ONE": 44, "MD_PARENT": 45, "NON_IDENTIFYING": 46, "IDENTIFYING": 47, "WORD": 48, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + break; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.addEntity($$[$0 - 4]); + yy.addEntity($$[$0 - 2]); + yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]); + break; + case 9: + yy.addEntity($$[$0 - 3]); + yy.addAttributes($$[$0 - 3], $$[$0 - 1]); + break; + case 10: + yy.addEntity($$[$0 - 2]); + break; + case 11: + yy.addEntity($$[$0]); + break; + case 12: + yy.addEntity($$[$0 - 6], $$[$0 - 4]); + yy.addAttributes($$[$0 - 6], $$[$0 - 1]); + break; + case 13: + yy.addEntity($$[$0 - 5], $$[$0 - 3]); + break; + case 14: + yy.addEntity($$[$0 - 3], $$[$0 - 1]); + break; + case 15: + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + case 43: + this.$ = $$[$0]; + break; + case 20: + case 41: + case 42: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 21: + case 29: + this.$ = [$$[$0]]; + break; + case 22: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 23: + this.$ = { attributeType: $$[$0 - 1], attributeName: $$[$0] }; + break; + case 24: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeKeyTypeList: $$[$0] }; + break; + case 25: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 26: + this.$ = { attributeType: $$[$0 - 3], attributeName: $$[$0 - 2], attributeKeyTypeList: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 27: + case 28: + case 31: + this.$ = $$[$0]; + break; + case 30: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 32: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 33: + this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] }; + break; + case 34: + this.$ = yy.Cardinality.ZERO_OR_ONE; + break; + case 35: + this.$ = yy.Cardinality.ZERO_OR_MORE; + break; + case 36: + this.$ = yy.Cardinality.ONE_OR_MORE; + break; + case 37: + this.$ = yy.Cardinality.ONLY_ONE; + break; + case 38: + this.$ = yy.Cardinality.MD_PARENT; + break; + case 39: + this.$ = yy.Identification.NON_IDENTIFYING; + break; + case 40: + this.$ = yy.Identification.IDENTIFYING; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 16, 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, o($V0, [2, 18]), o($Vc, [2, 19]), o($Vc, [2, 20]), o($V0, [2, 4]), { 11: 29, 27: $V5, 28: $V6 }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: $Vd }, { 11: 35, 27: $V5, 28: $V6 }, { 40: 36, 46: [1, 37], 47: [1, 38] }, o($Ve, [2, 34]), o($Ve, [2, 35]), o($Ve, [2, 36]), o($Ve, [2, 37]), o($Ve, [2, 38]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, o($V0, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: $Vd }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }, o($Vf, [2, 39]), o($Vf, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, o($V0, [2, 9]), { 17: [2, 22] }, o($Vg, [2, 23], { 32: 50, 33: 51, 35: 52, 37: $Vh, 38: $Vi }), o([17, 34, 37, 38], [2, 28]), o($V0, [2, 14], { 15: [1, 55] }), o([27, 28], [2, 33]), o($V0, [2, 8]), o($V0, [2, 41]), o($V0, [2, 42]), o($V0, [2, 43]), o($Vg, [2, 24], { 33: 56, 36: [1, 57], 38: $Vi }), o($Vg, [2, 25]), o($Vj, [2, 29]), o($Vg, [2, 32]), o($Vj, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: $Vd }, o($Vg, [2, 26]), { 35: 60, 37: $Vh }, { 17: [1, 61] }, o($V0, [2, 13]), o($Vj, [2, 30]), o($V0, [2, 12])], + defaultActions: { 34: [2, 27], 41: [2, 22] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 22; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 24; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 10; + case 8: + break; + case 9: + return 8; + case 10: + return 28; + case 11: + return 48; + case 12: + return 4; + case 13: + this.begin("block"); + return 15; + case 14: + return 36; + case 15: + break; + case 16: + return 37; + case 17: + return 34; + case 18: + return 34; + case 19: + return 38; + case 20: + break; + case 21: + this.popState(); + return 17; + case 22: + return yy_.yytext[0]; + case 23: + return 18; + case 24: + return 19; + case 25: + return 41; + case 26: + return 43; + case 27: + return 43; + case 28: + return 43; + case 29: + return 41; + case 30: + return 41; + case 31: + return 42; + case 32: + return 42; + case 33: + return 42; + case 34: + return 42; + case 35: + return 42; + case 36: + return 43; + case 37: + return 42; + case 38: + return 43; + case 39: + return 44; + case 40: + return 44; + case 41: + return 44; + case 42: + return 44; + case 43: + return 41; + case 44: + return 42; + case 45: + return 43; + case 46: + return 45; + case 47: + return 46; + case 48: + return 47; + case 49: + return 47; + case 50: + return 46; + case 51: + return 46; + case 52: + return 46; + case 53: + return 27; + case 54: + return yy_.yytext[0]; + case 55: + return 6; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i], + conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [14, 15, 16, 17, 18, 19, 20, 21, 22], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const erParser = parser; +let entities = {}; +let relationships = []; +const Cardinality = { + ZERO_OR_ONE: "ZERO_OR_ONE", + ZERO_OR_MORE: "ZERO_OR_MORE", + ONE_OR_MORE: "ONE_OR_MORE", + ONLY_ONE: "ONLY_ONE", + MD_PARENT: "MD_PARENT" +}; +const Identification = { + NON_IDENTIFYING: "NON_IDENTIFYING", + IDENTIFYING: "IDENTIFYING" +}; +const addEntity = function(name, alias = void 0) { + if (entities[name] === void 0) { + entities[name] = { attributes: [], alias }; + log.info("Added new entity :", name); + } else if (entities[name] && !entities[name].alias && alias) { + entities[name].alias = alias; + log.info(`Add alias '${alias}' to entity '${name}'`); + } + return entities[name]; +}; +const getEntities = () => entities; +const addAttributes = function(entityName, attribs) { + let entity = addEntity(entityName); + let i; + for (i = attribs.length - 1; i >= 0; i--) { + entity.attributes.push(attribs[i]); + log.debug("Added attribute ", attribs[i].attributeName); + } +}; +const addRelationship = function(entA, rolA, entB, rSpec) { + let rel = { + entityA: entA, + roleA: rolA, + entityB: entB, + relSpec: rSpec + }; + relationships.push(rel); + log.debug("Added new relationship :", rel); +}; +const getRelationships = () => relationships; +const clear = function() { + entities = {}; + relationships = []; + clear$1(); +}; +const erDb = { + Cardinality, + Identification, + getConfig: () => getConfig().er, + addEntity, + addAttributes, + getEntities, + addRelationship, + getRelationships, + clear, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + setDiagramTitle, + getDiagramTitle +}; +const ERMarkers = { + ONLY_ONE_START: "ONLY_ONE_START", + ONLY_ONE_END: "ONLY_ONE_END", + ZERO_OR_ONE_START: "ZERO_OR_ONE_START", + ZERO_OR_ONE_END: "ZERO_OR_ONE_END", + ONE_OR_MORE_START: "ONE_OR_MORE_START", + ONE_OR_MORE_END: "ONE_OR_MORE_END", + ZERO_OR_MORE_START: "ZERO_OR_MORE_START", + ZERO_OR_MORE_END: "ZERO_OR_MORE_END", + MD_PARENT_END: "MD_PARENT_END", + MD_PARENT_START: "MD_PARENT_START" +}; +const insertMarkers = function(elem, conf2) { + let marker; + elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_START).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_END).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18"); + return; +}; +const erMarkers = { + ERMarkers, + insertMarkers +}; +const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +function validate(uuid) { + return typeof uuid === "string" && REGEX.test(uuid); +} +const byteToHex = []; +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).slice(1)); +} +function unsafeStringify(arr, offset = 0) { + return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); +} +function parse(uuid) { + if (!validate(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; +const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse(namespace); + } + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return unsafeStringify(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} +function f(s, x, y, z) { + switch (s) { + case 0: + return x & y ^ ~x & z; + case 1: + return x ^ y ^ z; + case 2: + return x & y ^ x & z ^ y & z; + case 3: + return x ^ y ^ z; + } +} +function ROTL(x, n) { + return x << n | x >>> 32 - n; +} +function sha1(bytes) { + const K = [1518500249, 1859775393, 2400959708, 3395469782]; + const H = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + if (typeof bytes === "string") { + const msg = unescape(encodeURIComponent(bytes)); + bytes = []; + for (let i = 0; i < msg.length; ++i) { + bytes.push(msg.charCodeAt(i)); + } + } else if (!Array.isArray(bytes)) { + bytes = Array.prototype.slice.call(bytes); + } + bytes.push(128); + const l = bytes.length / 4 + 2; + const N = Math.ceil(l / 16); + const M = new Array(N); + for (let i = 0; i < N; ++i) { + const arr = new Uint32Array(16); + for (let j = 0; j < 16; ++j) { + arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; + } + M[i] = arr; + } + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 4294967295; + for (let i = 0; i < N; ++i) { + const W = new Uint32Array(80); + for (let t = 0; t < 16; ++t) { + W[t] = M[i][t]; + } + for (let t = 16; t < 80; ++t) { + W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); + } + let a = H[0]; + let b = H[1]; + let c = H[2]; + let d = H[3]; + let e = H[4]; + for (let t = 0; t < 80; ++t) { + const s = Math.floor(t / 20); + const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + return [H[0] >> 24 & 255, H[0] >> 16 & 255, H[0] >> 8 & 255, H[0] & 255, H[1] >> 24 & 255, H[1] >> 16 & 255, H[1] >> 8 & 255, H[1] & 255, H[2] >> 24 & 255, H[2] >> 16 & 255, H[2] >> 8 & 255, H[2] & 255, H[3] >> 24 & 255, H[3] >> 16 & 255, H[3] >> 8 & 255, H[3] & 255, H[4] >> 24 & 255, H[4] >> 16 & 255, H[4] >> 8 & 255, H[4] & 255]; +} +const v5 = v35("v5", 80, sha1); +const uuid5 = v5; +const BAD_ID_CHARS_REGEXP = /[^\dA-Za-z](\W)*/g; +let conf = {}; +let entityNameIds = /* @__PURE__ */ new Map(); +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const drawAttributes = (groupNode, entityTextNode, attributes) => { + const heightPadding = conf.entityPadding / 3; + const widthPadding = conf.entityPadding / 3; + const attrFontSize = conf.fontSize * 0.85; + const labelBBox = entityTextNode.node().getBBox(); + const attributeNodes = []; + let hasKeyType = false; + let hasComment = false; + let maxTypeWidth = 0; + let maxNameWidth = 0; + let maxKeyWidth = 0; + let maxCommentWidth = 0; + let cumulativeHeight = labelBBox.height + heightPadding * 2; + let attrNum = 1; + attributes.forEach((item) => { + if (item.attributeKeyTypeList !== void 0 && item.attributeKeyTypeList.length > 0) { + hasKeyType = true; + } + if (item.attributeComment !== void 0) { + hasComment = true; + } + }); + attributes.forEach((item) => { + const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`; + let nodeHeight = 0; + const attributeType = parseGenericTypes(item.attributeType); + const typeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(attributeType); + const nameNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeName); + const attributeNode = {}; + attributeNode.tn = typeNode; + attributeNode.nn = nameNode; + const typeBBox = typeNode.node().getBBox(); + const nameBBox = nameNode.node().getBBox(); + maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width); + maxNameWidth = Math.max(maxNameWidth, nameBBox.width); + nodeHeight = Math.max(typeBBox.height, nameBBox.height); + if (hasKeyType) { + const keyTypeNodeText = item.attributeKeyTypeList !== void 0 ? item.attributeKeyTypeList.join(",") : ""; + const keyTypeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(keyTypeNodeText); + attributeNode.kn = keyTypeNode; + const keyTypeBBox = keyTypeNode.node().getBBox(); + maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width); + nodeHeight = Math.max(nodeHeight, keyTypeBBox.height); + } + if (hasComment) { + const commentNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeComment || ""); + attributeNode.cn = commentNode; + const commentNodeBBox = commentNode.node().getBBox(); + maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width); + nodeHeight = Math.max(nodeHeight, commentNodeBBox.height); + } + attributeNode.height = nodeHeight; + attributeNodes.push(attributeNode); + cumulativeHeight += nodeHeight + heightPadding * 2; + attrNum += 1; + }); + let widthPaddingFactor = 4; + if (hasKeyType) { + widthPaddingFactor += 2; + } + if (hasComment) { + widthPaddingFactor += 2; + } + const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth; + const bBox = { + width: Math.max( + conf.minEntityWidth, + Math.max( + labelBBox.width + conf.entityPadding * 2, + maxWidth + widthPadding * widthPaddingFactor + ) + ), + height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2) + }; + if (attributes.length > 0) { + const spareColumnWidth = Math.max( + 0, + (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2) + ); + entityTextNode.attr( + "transform", + "translate(" + bBox.width / 2 + "," + (heightPadding + labelBBox.height / 2) + ")" + ); + let heightOffset = labelBBox.height + heightPadding * 2; + let attribStyle = "attributeBoxOdd"; + attributeNodes.forEach((attributeNode) => { + const alignY = heightOffset + heightPadding + attributeNode.height / 2; + attributeNode.tn.attr("transform", "translate(" + widthPadding + "," + alignY + ")"); + const typeRect = groupNode.insert("rect", "#" + attributeNode.tn.node().id).classed(`er ${attribStyle}`, true).attr("x", 0).attr("y", heightOffset).attr("width", maxTypeWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + const nameXOffset = parseFloat(typeRect.attr("x")) + parseFloat(typeRect.attr("width")); + attributeNode.nn.attr( + "transform", + "translate(" + (nameXOffset + widthPadding) + "," + alignY + ")" + ); + const nameRect = groupNode.insert("rect", "#" + attributeNode.nn.node().id).classed(`er ${attribStyle}`, true).attr("x", nameXOffset).attr("y", heightOffset).attr("width", maxNameWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + let keyTypeAndCommentXOffset = parseFloat(nameRect.attr("x")) + parseFloat(nameRect.attr("width")); + if (hasKeyType) { + attributeNode.kn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + const keyTypeRect = groupNode.insert("rect", "#" + attributeNode.kn.node().id).classed(`er ${attribStyle}`, true).attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxKeyWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + keyTypeAndCommentXOffset = parseFloat(keyTypeRect.attr("x")) + parseFloat(keyTypeRect.attr("width")); + } + if (hasComment) { + attributeNode.cn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + groupNode.insert("rect", "#" + attributeNode.cn.node().id).classed(`er ${attribStyle}`, "true").attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxCommentWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + } + heightOffset += attributeNode.height + heightPadding * 2; + attribStyle = attribStyle === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd"; + }); + } else { + bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); + entityTextNode.attr("transform", "translate(" + bBox.width / 2 + "," + bBox.height / 2 + ")"); + } + return bBox; +}; +const drawEntities = function(svgNode, entities2, graph) { + const keys = Object.keys(entities2); + let firstOne; + keys.forEach(function(entityName) { + const entityId = generateId(entityName, "entity"); + entityNameIds.set(entityName, entityId); + const groupNode = svgNode.append("g").attr("id", entityId); + firstOne = firstOne === void 0 ? entityId : firstOne; + const textId = "text-" + entityId; + const textNode = groupNode.append("text").classed("er entityLabel", true).attr("id", textId).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", getConfig().fontFamily).style("font-size", conf.fontSize + "px").text(entities2[entityName].alias ?? entityName); + const { width: entityWidth, height: entityHeight } = drawAttributes( + groupNode, + textNode, + entities2[entityName].attributes + ); + const rectNode = groupNode.insert("rect", "#" + textId).classed("er entityBox", true).attr("x", 0).attr("y", 0).attr("width", entityWidth).attr("height", entityHeight); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(entityId, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: entityId + }); + }); + return firstOne; +}; +const adjustEntities = function(svgNode, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); +}; +const getEdgeName = function(rel) { + return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, ""); +}; +const addRelationships = function(relationships2, g) { + relationships2.forEach(function(r) { + g.setEdge( + entityNameIds.get(r.entityA), + entityNameIds.get(r.entityB), + { relationship: r }, + getEdgeName(r) + ); + }); + return relationships2; +}; +let relCnt = 0; +const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { + relCnt++; + const edge = g.edge( + entityNameIds.get(rel.entityA), + entityNameIds.get(rel.entityB), + getEdgeName(rel) + ); + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = svg.insert("path", "#" + insert).classed("er relationshipLine", true).attr("d", lineFunction(edge.points)).style("stroke", conf.stroke).style("fill", "none"); + if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) { + svgPath.attr("stroke-dasharray", "8,8"); + } + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (rel.relSpec.cardA) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_END + ")"); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_END + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_END + ")"); + break; + } + switch (rel.relSpec.cardB) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_START + ")" + ); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_START + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_START + ")"); + break; + } + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt; + const labelNode = svg.append("text").classed("er relationshipLabel", true).attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", getConfig().fontFamily).style("font-size", conf.fontSize + "px").text(rel.roleA); + const labelBBox = labelNode.node().getBBox(); + svg.insert("rect", "#" + labelId).classed("er relationshipLabelBox", true).attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height); +}; +const draw = function(text, id, _version, diagObj) { + conf = getConfig().er; + log.info("Drawing ER diagram"); + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = root.select(`[id='${id}']`); + erMarkers.insertMarkers(svg, conf); + let g; + g = new Graph({ + multigraph: true, + directed: true, + compound: false + }).setGraph({ + rankdir: conf.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g); + const relationships2 = addRelationships(diagObj.db.getRelationships(), g); + layout(g); + adjustEntities(svg, g); + relationships2.forEach(function(rel) { + drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj); + }); + const padding = conf.diagramPadding; + utils.insertTitle(svg, "entityTitleText", conf.titleTopMargin, diagObj.db.getDiagramTitle()); + const svgBounds = svg.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + configureSvgSize(svg, height, width, conf.useMaxWidth); + svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); +}; +const MERMAID_ERDIAGRAM_UUID = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c"; +function generateId(str = "", prefix = "") { + const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, ""); + return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${uuid5( + str, + MERMAID_ERDIAGRAM_UUID + )}`; +} +function strWithHyphen(str = "") { + return str.length > 0 ? `${str}-` : ""; +} +const erRenderer = { + setConf, + draw +}; +const getStyles = (options) => ` + .entityBox { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${options.attributeBackgroundColorOdd}; + stroke: ${options.nodeBorder}; + } + + .attributeBoxEven { + fill: ${options.attributeBackgroundColorEven}; + stroke: ${options.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${options.tertiaryColor}; + opacity: 0.7; + background-color: ${options.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${options.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; + } + +`; +const erStyles = getStyles; +const diagram = { + parser: erParser, + db: erDb, + renderer: erRenderer, + styles: erStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/erDiagram-5298a456.js b/webroot/js/node_modules/mermaid/dist/erDiagram-5298a456.js new file mode 100644 index 0000000..521d71e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/erDiagram-5298a456.js @@ -0,0 +1,930 @@ +import { c as Z, s as Et, g as mt, b as gt, a as kt, B as xt, D as Rt, l as V, E as Ot, j as rt, z as bt, k as Nt, F as Tt, G as At } from "./mermaid-e4a58915.js"; +import { G as Mt, l as wt } from "./layout-545b2d5b.js"; +import { l as St } from "./line-4ba3c4fa.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +var at = function() { + var t = function(w, a, n, c) { + for (n = n || {}, c = w.length; c--; n[w[c]] = a) + ; + return n; + }, e = [6, 8, 10, 20, 22, 24, 26, 27, 28], r = [1, 10], u = [1, 11], l = [1, 12], p = [1, 13], f = [1, 14], o = [1, 15], h = [1, 21], _ = [1, 22], m = [1, 23], g = [1, 24], x = [1, 25], y = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], N = [1, 34], I = [27, 28, 46, 47], F = [41, 42, 43, 44, 45], W = [17, 34], C = [1, 54], T = [1, 53], M = [17, 34, 36, 38], R = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, entityName: 11, relSpec: 12, ":": 13, role: 14, BLOCK_START: 15, attributes: 16, BLOCK_STOP: 17, SQS: 18, SQE: 19, title: 20, title_value: 21, acc_title: 22, acc_title_value: 23, acc_descr: 24, acc_descr_value: 25, acc_descr_multiline_value: 26, ALPHANUM: 27, ENTITY_NAME: 28, attribute: 29, attributeType: 30, attributeName: 31, attributeKeyTypeList: 32, attributeComment: 33, ATTRIBUTE_WORD: 34, attributeKeyType: 35, COMMA: 36, ATTRIBUTE_KEY: 37, COMMENT: 38, cardinality: 39, relType: 40, ZERO_OR_ONE: 41, ZERO_OR_MORE: 42, ONE_OR_MORE: 43, ONLY_ONE: 44, MD_PARENT: 45, NON_IDENTIFYING: 46, IDENTIFYING: 47, WORD: 48, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]], + performAction: function(a, n, c, d, E, i, K) { + var s = i.length - 1; + switch (E) { + case 1: + break; + case 2: + this.$ = []; + break; + case 3: + i[s - 1].push(i[s]), this.$ = i[s - 1]; + break; + case 4: + case 5: + this.$ = i[s]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + d.addEntity(i[s - 4]), d.addEntity(i[s - 2]), d.addRelationship(i[s - 4], i[s], i[s - 2], i[s - 3]); + break; + case 9: + d.addEntity(i[s - 3]), d.addAttributes(i[s - 3], i[s - 1]); + break; + case 10: + d.addEntity(i[s - 2]); + break; + case 11: + d.addEntity(i[s]); + break; + case 12: + d.addEntity(i[s - 6], i[s - 4]), d.addAttributes(i[s - 6], i[s - 1]); + break; + case 13: + d.addEntity(i[s - 5], i[s - 3]); + break; + case 14: + d.addEntity(i[s - 3], i[s - 1]); + break; + case 15: + case 16: + this.$ = i[s].trim(), d.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = i[s].trim(), d.setAccDescription(this.$); + break; + case 19: + case 43: + this.$ = i[s]; + break; + case 20: + case 41: + case 42: + this.$ = i[s].replace(/"/g, ""); + break; + case 21: + case 29: + this.$ = [i[s]]; + break; + case 22: + i[s].push(i[s - 1]), this.$ = i[s]; + break; + case 23: + this.$ = { attributeType: i[s - 1], attributeName: i[s] }; + break; + case 24: + this.$ = { attributeType: i[s - 2], attributeName: i[s - 1], attributeKeyTypeList: i[s] }; + break; + case 25: + this.$ = { attributeType: i[s - 2], attributeName: i[s - 1], attributeComment: i[s] }; + break; + case 26: + this.$ = { attributeType: i[s - 3], attributeName: i[s - 2], attributeKeyTypeList: i[s - 1], attributeComment: i[s] }; + break; + case 27: + case 28: + case 31: + this.$ = i[s]; + break; + case 30: + i[s - 2].push(i[s]), this.$ = i[s - 2]; + break; + case 32: + this.$ = i[s].replace(/"/g, ""); + break; + case 33: + this.$ = { cardA: i[s], relType: i[s - 1], cardB: i[s - 2] }; + break; + case 34: + this.$ = d.Cardinality.ZERO_OR_ONE; + break; + case 35: + this.$ = d.Cardinality.ZERO_OR_MORE; + break; + case 36: + this.$ = d.Cardinality.ONE_OR_MORE; + break; + case 37: + this.$ = d.Cardinality.ONLY_ONE; + break; + case 38: + this.$ = d.Cardinality.MD_PARENT; + break; + case 39: + this.$ = d.Identification.NON_IDENTIFYING; + break; + case 40: + this.$ = d.Identification.IDENTIFYING; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: r, 22: u, 24: l, 26: p, 27: f, 28: o }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 16, 11: 9, 20: r, 22: u, 24: l, 26: p, 27: f, 28: o }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: h, 42: _, 43: m, 44: g, 45: x }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, t(e, [2, 18]), t(y, [2, 19]), t(y, [2, 20]), t(e, [2, 4]), { 11: 29, 27: f, 28: o }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: N }, { 11: 35, 27: f, 28: o }, { 40: 36, 46: [1, 37], 47: [1, 38] }, t(I, [2, 34]), t(I, [2, 35]), t(I, [2, 36]), t(I, [2, 37]), t(I, [2, 38]), t(e, [2, 15]), t(e, [2, 16]), t(e, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, t(e, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: N }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: h, 42: _, 43: m, 44: g, 45: x }, t(F, [2, 39]), t(F, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, t(e, [2, 9]), { 17: [2, 22] }, t(W, [2, 23], { 32: 50, 33: 51, 35: 52, 37: C, 38: T }), t([17, 34, 37, 38], [2, 28]), t(e, [2, 14], { 15: [1, 55] }), t([27, 28], [2, 33]), t(e, [2, 8]), t(e, [2, 41]), t(e, [2, 42]), t(e, [2, 43]), t(W, [2, 24], { 33: 56, 36: [1, 57], 38: T }), t(W, [2, 25]), t(M, [2, 29]), t(W, [2, 32]), t(M, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: N }, t(W, [2, 26]), { 35: 60, 37: C }, { 17: [1, 61] }, t(e, [2, 13]), t(M, [2, 30]), t(e, [2, 12])], + defaultActions: { 34: [2, 27], 41: [2, 22] }, + parseError: function(a, n) { + if (n.recoverable) + this.trace(a); + else { + var c = new Error(a); + throw c.hash = n, c; + } + }, + parse: function(a) { + var n = this, c = [0], d = [], E = [null], i = [], K = this.table, s = "", Q = 0, st = 0, ft = 2, ot = 1, yt = i.slice.call(arguments, 1), b = Object.create(this.lexer), z = { yy: {} }; + for (var J in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, J) && (z.yy[J] = this.yy[J]); + b.setInput(a, z.yy), z.yy.lexer = b, z.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {}); + var $ = b.yylloc; + i.push($); + var pt = b.options && b.options.ranges; + typeof z.yy.parseError == "function" ? this.parseError = z.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function _t() { + var Y; + return Y = d.pop() || b.lex() || ot, typeof Y != "number" && (Y instanceof Array && (d = Y, Y = d.pop()), Y = n.symbols_[Y] || Y), Y; + } + for (var S, G, D, tt, H = {}, j, P, lt, q; ; ) { + if (G = c[c.length - 1], this.defaultActions[G] ? D = this.defaultActions[G] : ((S === null || typeof S > "u") && (S = _t()), D = K[G] && K[G][S]), typeof D > "u" || !D.length || !D[0]) { + var et = ""; + q = []; + for (j in K[G]) + this.terminals_[j] && j > ft && q.push("'" + this.terminals_[j] + "'"); + b.showPosition ? et = "Parse error on line " + (Q + 1) + `: +` + b.showPosition() + ` +Expecting ` + q.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : et = "Parse error on line " + (Q + 1) + ": Unexpected " + (S == ot ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(et, { + text: b.match, + token: this.terminals_[S] || S, + line: b.yylineno, + loc: $, + expected: q + }); + } + if (D[0] instanceof Array && D.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + G + ", token: " + S); + switch (D[0]) { + case 1: + c.push(S), E.push(b.yytext), i.push(b.yylloc), c.push(D[1]), S = null, st = b.yyleng, s = b.yytext, Q = b.yylineno, $ = b.yylloc; + break; + case 2: + if (P = this.productions_[D[1]][1], H.$ = E[E.length - P], H._$ = { + first_line: i[i.length - (P || 1)].first_line, + last_line: i[i.length - 1].last_line, + first_column: i[i.length - (P || 1)].first_column, + last_column: i[i.length - 1].last_column + }, pt && (H._$.range = [ + i[i.length - (P || 1)].range[0], + i[i.length - 1].range[1] + ]), tt = this.performAction.apply(H, [ + s, + st, + Q, + z.yy, + D[1], + E, + i + ].concat(yt)), typeof tt < "u") + return tt; + P && (c = c.slice(0, -1 * P * 2), E = E.slice(0, -1 * P), i = i.slice(0, -1 * P)), c.push(this.productions_[D[1]][0]), E.push(H.$), i.push(H._$), lt = K[c[c.length - 2]][c[c.length - 1]], c.push(lt); + break; + case 3: + return !0; + } + } + return !0; + } + }, O = function() { + var w = { + EOF: 1, + parseError: function(n, c) { + if (this.yy.parser) + this.yy.parser.parseError(n, c); + else + throw new Error(n); + }, + // resets the lexer, sets new input + setInput: function(a, n) { + return this.yy = n || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var a = this._input[0]; + this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a; + var n = a.match(/(?:\r\n?|\n).*/g); + return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a; + }, + // unshifts one char (or a string) into the input + unput: function(a) { + var n = a.length, c = a.split(/(?:\r\n?|\n)/g); + this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n; + var d = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1); + var E = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: c ? (c.length === d.length ? this.yylloc.first_column : 0) + d[d.length - c.length].length - c[0].length : this.yylloc.first_column - n + }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(a) { + this.unput(this.match.slice(a)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var a = this.matched.substr(0, this.matched.length - this.match.length); + return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var a = this.match; + return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var a = this.pastInput(), n = new Array(a.length + 1).join("-"); + return a + this.upcomingInput() + ` +` + n + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(a, n) { + var c, d, E; + if (this.options.backtrack_lexer && (E = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), d = a[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length + }, this.yytext += a[0], this.match += a[0], this.matches = a, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(a[0].length), this.matched += a[0], c = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c) + return c; + if (this._backtrack) { + for (var i in E) + this[i] = E[i]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var a, n, c, d; + this._more || (this.yytext = "", this.match = ""); + for (var E = this._currentRules(), i = 0; i < E.length; i++) + if (c = this._input.match(this.rules[E[i]]), c && (!n || c[0].length > n[0].length)) { + if (n = c, d = i, this.options.backtrack_lexer) { + if (a = this.test_match(c, E[i]), a !== !1) + return a; + if (this._backtrack) { + n = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return n ? (a = this.test_match(n, E[d]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var n = this.next(); + return n || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(n) { + this.conditionStack.push(n); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var n = this.conditionStack.length - 1; + return n > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(n) { + return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(n) { + this.begin(n); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(n, c, d, E) { + switch (d) { + case 0: + return this.begin("acc_title"), 22; + case 1: + return this.popState(), "acc_title_value"; + case 2: + return this.begin("acc_descr"), 24; + case 3: + return this.popState(), "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 10; + case 8: + break; + case 9: + return 8; + case 10: + return 28; + case 11: + return 48; + case 12: + return 4; + case 13: + return this.begin("block"), 15; + case 14: + return 36; + case 15: + break; + case 16: + return 37; + case 17: + return 34; + case 18: + return 34; + case 19: + return 38; + case 20: + break; + case 21: + return this.popState(), 17; + case 22: + return c.yytext[0]; + case 23: + return 18; + case 24: + return 19; + case 25: + return 41; + case 26: + return 43; + case 27: + return 43; + case 28: + return 43; + case 29: + return 41; + case 30: + return 41; + case 31: + return 42; + case 32: + return 42; + case 33: + return 42; + case 34: + return 42; + case 35: + return 42; + case 36: + return 43; + case 37: + return 42; + case 38: + return 43; + case 39: + return 44; + case 40: + return 44; + case 41: + return 44; + case 42: + return 44; + case 43: + return 41; + case 44: + return 42; + case 45: + return 43; + case 46: + return 45; + case 47: + return 46; + case 48: + return 47; + case 49: + return 47; + case 50: + return 46; + case 51: + return 46; + case 52: + return 46; + case 53: + return 27; + case 54: + return c.yytext[0]; + case 55: + return 6; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i], + conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block: { rules: [14, 15, 16, 17, 18, 19, 20, 21, 22], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], inclusive: !0 } } + }; + return w; + }(); + R.lexer = O; + function L() { + this.yy = {}; + } + return L.prototype = R, R.Parser = L, new L(); +}(); +at.parser = at; +const It = at; +let U = {}, nt = []; +const Dt = { + ZERO_OR_ONE: "ZERO_OR_ONE", + ZERO_OR_MORE: "ZERO_OR_MORE", + ONE_OR_MORE: "ONE_OR_MORE", + ONLY_ONE: "ONLY_ONE", + MD_PARENT: "MD_PARENT" +}, Lt = { + NON_IDENTIFYING: "NON_IDENTIFYING", + IDENTIFYING: "IDENTIFYING" +}, dt = function(t, e = void 0) { + return U[t] === void 0 ? (U[t] = { attributes: [], alias: e }, V.info("Added new entity :", t)) : U[t] && !U[t].alias && e && (U[t].alias = e, V.info(`Add alias '${e}' to entity '${t}'`)), U[t]; +}, vt = () => U, Bt = function(t, e) { + let r = dt(t), u; + for (u = e.length - 1; u >= 0; u--) + r.attributes.push(e[u]), V.debug("Added attribute ", e[u].attributeName); +}, Ct = function(t, e, r, u) { + let l = { + entityA: t, + roleA: e, + entityB: r, + relSpec: u + }; + nt.push(l), V.debug("Added new relationship :", l); +}, Pt = () => nt, Yt = function() { + U = {}, nt = [], Ot(); +}, Zt = { + Cardinality: Dt, + Identification: Lt, + getConfig: () => Z().er, + addEntity: dt, + addAttributes: Bt, + getEntities: vt, + addRelationship: Ct, + getRelationships: Pt, + clear: Yt, + setAccTitle: Et, + getAccTitle: mt, + setAccDescription: gt, + getAccDescription: kt, + setDiagramTitle: xt, + getDiagramTitle: Rt +}, v = { + ONLY_ONE_START: "ONLY_ONE_START", + ONLY_ONE_END: "ONLY_ONE_END", + ZERO_OR_ONE_START: "ZERO_OR_ONE_START", + ZERO_OR_ONE_END: "ZERO_OR_ONE_END", + ONE_OR_MORE_START: "ONE_OR_MORE_START", + ONE_OR_MORE_END: "ONE_OR_MORE_END", + ZERO_OR_MORE_START: "ZERO_OR_MORE_START", + ZERO_OR_MORE_END: "ZERO_OR_MORE_END", + MD_PARENT_END: "MD_PARENT_END", + MD_PARENT_START: "MD_PARENT_START" +}, Ft = function(t, e) { + let r; + t.append("defs").append("marker").attr("id", v.MD_PARENT_START).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", v.MD_PARENT_END).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", v.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"), t.append("defs").append("marker").attr("id", v.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", v.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", v.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"), t.append("defs").append("marker").attr("id", v.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), t.append("defs").append("marker").attr("id", v.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"), r = t.append("defs").append("marker").attr("id", v.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"), r = t.append("defs").append("marker").attr("id", v.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18"); +}, B = { + ERMarkers: v, + insertMarkers: Ft +}, Wt = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +function Ut(t) { + return typeof t == "string" && Wt.test(t); +} +const A = []; +for (let t = 0; t < 256; ++t) + A.push((t + 256).toString(16).slice(1)); +function zt(t, e = 0) { + return (A[t[e + 0]] + A[t[e + 1]] + A[t[e + 2]] + A[t[e + 3]] + "-" + A[t[e + 4]] + A[t[e + 5]] + "-" + A[t[e + 6]] + A[t[e + 7]] + "-" + A[t[e + 8]] + A[t[e + 9]] + "-" + A[t[e + 10]] + A[t[e + 11]] + A[t[e + 12]] + A[t[e + 13]] + A[t[e + 14]] + A[t[e + 15]]).toLowerCase(); +} +function Gt(t) { + if (!Ut(t)) + throw TypeError("Invalid UUID"); + let e; + const r = new Uint8Array(16); + return r[0] = (e = parseInt(t.slice(0, 8), 16)) >>> 24, r[1] = e >>> 16 & 255, r[2] = e >>> 8 & 255, r[3] = e & 255, r[4] = (e = parseInt(t.slice(9, 13), 16)) >>> 8, r[5] = e & 255, r[6] = (e = parseInt(t.slice(14, 18), 16)) >>> 8, r[7] = e & 255, r[8] = (e = parseInt(t.slice(19, 23), 16)) >>> 8, r[9] = e & 255, r[10] = (e = parseInt(t.slice(24, 36), 16)) / 1099511627776 & 255, r[11] = e / 4294967296 & 255, r[12] = e >>> 24 & 255, r[13] = e >>> 16 & 255, r[14] = e >>> 8 & 255, r[15] = e & 255, r; +} +function Ht(t) { + t = unescape(encodeURIComponent(t)); + const e = []; + for (let r = 0; r < t.length; ++r) + e.push(t.charCodeAt(r)); + return e; +} +const Kt = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Vt = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; +function Xt(t, e, r) { + function u(l, p, f, o) { + var h; + if (typeof l == "string" && (l = Ht(l)), typeof p == "string" && (p = Gt(p)), ((h = p) === null || h === void 0 ? void 0 : h.length) !== 16) + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + let _ = new Uint8Array(16 + l.length); + if (_.set(p), _.set(l, p.length), _ = r(_), _[6] = _[6] & 15 | e, _[8] = _[8] & 63 | 128, f) { + o = o || 0; + for (let m = 0; m < 16; ++m) + f[o + m] = _[m]; + return f; + } + return zt(_); + } + try { + u.name = t; + } catch { + } + return u.DNS = Kt, u.URL = Vt, u; +} +function Qt(t, e, r, u) { + switch (t) { + case 0: + return e & r ^ ~e & u; + case 1: + return e ^ r ^ u; + case 2: + return e & r ^ e & u ^ r & u; + case 3: + return e ^ r ^ u; + } +} +function it(t, e) { + return t << e | t >>> 32 - e; +} +function jt(t) { + const e = [1518500249, 1859775393, 2400959708, 3395469782], r = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + if (typeof t == "string") { + const f = unescape(encodeURIComponent(t)); + t = []; + for (let o = 0; o < f.length; ++o) + t.push(f.charCodeAt(o)); + } else + Array.isArray(t) || (t = Array.prototype.slice.call(t)); + t.push(128); + const u = t.length / 4 + 2, l = Math.ceil(u / 16), p = new Array(l); + for (let f = 0; f < l; ++f) { + const o = new Uint32Array(16); + for (let h = 0; h < 16; ++h) + o[h] = t[f * 64 + h * 4] << 24 | t[f * 64 + h * 4 + 1] << 16 | t[f * 64 + h * 4 + 2] << 8 | t[f * 64 + h * 4 + 3]; + p[f] = o; + } + p[l - 1][14] = (t.length - 1) * 8 / Math.pow(2, 32), p[l - 1][14] = Math.floor(p[l - 1][14]), p[l - 1][15] = (t.length - 1) * 8 & 4294967295; + for (let f = 0; f < l; ++f) { + const o = new Uint32Array(80); + for (let y = 0; y < 16; ++y) + o[y] = p[f][y]; + for (let y = 16; y < 80; ++y) + o[y] = it(o[y - 3] ^ o[y - 8] ^ o[y - 14] ^ o[y - 16], 1); + let h = r[0], _ = r[1], m = r[2], g = r[3], x = r[4]; + for (let y = 0; y < 80; ++y) { + const N = Math.floor(y / 20), I = it(h, 5) + Qt(N, _, m, g) + x + e[N] + o[y] >>> 0; + x = g, g = m, m = it(_, 30) >>> 0, _ = h, h = I; + } + r[0] = r[0] + h >>> 0, r[1] = r[1] + _ >>> 0, r[2] = r[2] + m >>> 0, r[3] = r[3] + g >>> 0, r[4] = r[4] + x >>> 0; + } + return [r[0] >> 24 & 255, r[0] >> 16 & 255, r[0] >> 8 & 255, r[0] & 255, r[1] >> 24 & 255, r[1] >> 16 & 255, r[1] >> 8 & 255, r[1] & 255, r[2] >> 24 & 255, r[2] >> 16 & 255, r[2] >> 8 & 255, r[2] & 255, r[3] >> 24 & 255, r[3] >> 16 & 255, r[3] >> 8 & 255, r[3] & 255, r[4] >> 24 & 255, r[4] >> 16 & 255, r[4] >> 8 & 255, r[4] & 255]; +} +const qt = Xt("v5", 80, jt), Jt = qt, $t = /[^\dA-Za-z](\W)*/g; +let k = {}, X = /* @__PURE__ */ new Map(); +const te = function(t) { + const e = Object.keys(t); + for (const r of e) + k[r] = t[r]; +}, ee = (t, e, r) => { + const u = k.entityPadding / 3, l = k.entityPadding / 3, p = k.fontSize * 0.85, f = e.node().getBBox(), o = []; + let h = !1, _ = !1, m = 0, g = 0, x = 0, y = 0, N = f.height + u * 2, I = 1; + r.forEach((T) => { + T.attributeKeyTypeList !== void 0 && T.attributeKeyTypeList.length > 0 && (h = !0), T.attributeComment !== void 0 && (_ = !0); + }), r.forEach((T) => { + const M = `${e.node().id}-attr-${I}`; + let R = 0; + const O = At(T.attributeType), L = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(O), w = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(T.attributeName), a = {}; + a.tn = L, a.nn = w; + const n = L.node().getBBox(), c = w.node().getBBox(); + if (m = Math.max(m, n.width), g = Math.max(g, c.width), R = Math.max(n.height, c.height), h) { + const d = T.attributeKeyTypeList !== void 0 ? T.attributeKeyTypeList.join(",") : "", E = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(d); + a.kn = E; + const i = E.node().getBBox(); + x = Math.max(x, i.width), R = Math.max(R, i.height); + } + if (_) { + const d = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(T.attributeComment || ""); + a.cn = d; + const E = d.node().getBBox(); + y = Math.max(y, E.width), R = Math.max(R, E.height); + } + a.height = R, o.push(a), N += R + u * 2, I += 1; + }); + let F = 4; + h && (F += 2), _ && (F += 2); + const W = m + g + x + y, C = { + width: Math.max( + k.minEntityWidth, + Math.max( + f.width + k.entityPadding * 2, + W + l * F + ) + ), + height: r.length > 0 ? N : Math.max(k.minEntityHeight, f.height + k.entityPadding * 2) + }; + if (r.length > 0) { + const T = Math.max( + 0, + (C.width - W - l * F) / (F / 2) + ); + e.attr( + "transform", + "translate(" + C.width / 2 + "," + (u + f.height / 2) + ")" + ); + let M = f.height + u * 2, R = "attributeBoxOdd"; + o.forEach((O) => { + const L = M + u + O.height / 2; + O.tn.attr("transform", "translate(" + l + "," + L + ")"); + const w = t.insert("rect", "#" + O.tn.node().id).classed(`er ${R}`, !0).attr("x", 0).attr("y", M).attr("width", m + l * 2 + T).attr("height", O.height + u * 2), a = parseFloat(w.attr("x")) + parseFloat(w.attr("width")); + O.nn.attr( + "transform", + "translate(" + (a + l) + "," + L + ")" + ); + const n = t.insert("rect", "#" + O.nn.node().id).classed(`er ${R}`, !0).attr("x", a).attr("y", M).attr("width", g + l * 2 + T).attr("height", O.height + u * 2); + let c = parseFloat(n.attr("x")) + parseFloat(n.attr("width")); + if (h) { + O.kn.attr( + "transform", + "translate(" + (c + l) + "," + L + ")" + ); + const d = t.insert("rect", "#" + O.kn.node().id).classed(`er ${R}`, !0).attr("x", c).attr("y", M).attr("width", x + l * 2 + T).attr("height", O.height + u * 2); + c = parseFloat(d.attr("x")) + parseFloat(d.attr("width")); + } + _ && (O.cn.attr( + "transform", + "translate(" + (c + l) + "," + L + ")" + ), t.insert("rect", "#" + O.cn.node().id).classed(`er ${R}`, "true").attr("x", c).attr("y", M).attr("width", y + l * 2 + T).attr("height", O.height + u * 2)), M += O.height + u * 2, R = R === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd"; + }); + } else + C.height = Math.max(k.minEntityHeight, N), e.attr("transform", "translate(" + C.width / 2 + "," + C.height / 2 + ")"); + return C; +}, re = function(t, e, r) { + const u = Object.keys(e); + let l; + return u.forEach(function(p) { + const f = le(p, "entity"); + X.set(p, f); + const o = t.append("g").attr("id", f); + l = l === void 0 ? f : l; + const h = "text-" + f, _ = o.append("text").classed("er entityLabel", !0).attr("id", h).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", Z().fontFamily).style("font-size", k.fontSize + "px").text(e[p].alias ?? p), { width: m, height: g } = ee( + o, + _, + e[p].attributes + ), y = o.insert("rect", "#" + h).classed("er entityBox", !0).attr("x", 0).attr("y", 0).attr("width", m).attr("height", g).node().getBBox(); + r.setNode(f, { + width: y.width, + height: y.height, + shape: "rect", + id: f + }); + }), l; +}, ie = function(t, e) { + e.nodes().forEach(function(r) { + r !== void 0 && e.node(r) !== void 0 && t.select("#" + r).attr( + "transform", + "translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )" + ); + }); +}, ut = function(t) { + return (t.entityA + t.roleA + t.entityB).replace(/\s/g, ""); +}, ae = function(t, e) { + return t.forEach(function(r) { + e.setEdge( + X.get(r.entityA), + X.get(r.entityB), + { relationship: r }, + ut(r) + ); + }), t; +}; +let ct = 0; +const ne = function(t, e, r, u, l) { + ct++; + const p = r.edge( + X.get(e.entityA), + X.get(e.entityB), + ut(e) + ), f = St().x(function(N) { + return N.x; + }).y(function(N) { + return N.y; + }).curve(Tt), o = t.insert("path", "#" + u).classed("er relationshipLine", !0).attr("d", f(p.points)).style("stroke", k.stroke).style("fill", "none"); + e.relSpec.relType === l.db.Identification.NON_IDENTIFYING && o.attr("stroke-dasharray", "8,8"); + let h = ""; + switch (k.arrowMarkerAbsolute && (h = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, h = h.replace(/\(/g, "\\("), h = h.replace(/\)/g, "\\)")), e.relSpec.cardA) { + case l.db.Cardinality.ZERO_OR_ONE: + o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ZERO_OR_ONE_END + ")"); + break; + case l.db.Cardinality.ZERO_OR_MORE: + o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ZERO_OR_MORE_END + ")"); + break; + case l.db.Cardinality.ONE_OR_MORE: + o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ONE_OR_MORE_END + ")"); + break; + case l.db.Cardinality.ONLY_ONE: + o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ONLY_ONE_END + ")"); + break; + case l.db.Cardinality.MD_PARENT: + o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.MD_PARENT_END + ")"); + break; + } + switch (e.relSpec.cardB) { + case l.db.Cardinality.ZERO_OR_ONE: + o.attr( + "marker-start", + "url(" + h + "#" + B.ERMarkers.ZERO_OR_ONE_START + ")" + ); + break; + case l.db.Cardinality.ZERO_OR_MORE: + o.attr( + "marker-start", + "url(" + h + "#" + B.ERMarkers.ZERO_OR_MORE_START + ")" + ); + break; + case l.db.Cardinality.ONE_OR_MORE: + o.attr( + "marker-start", + "url(" + h + "#" + B.ERMarkers.ONE_OR_MORE_START + ")" + ); + break; + case l.db.Cardinality.ONLY_ONE: + o.attr("marker-start", "url(" + h + "#" + B.ERMarkers.ONLY_ONE_START + ")"); + break; + case l.db.Cardinality.MD_PARENT: + o.attr("marker-start", "url(" + h + "#" + B.ERMarkers.MD_PARENT_START + ")"); + break; + } + const _ = o.node().getTotalLength(), m = o.node().getPointAtLength(_ * 0.5), g = "rel" + ct, y = t.append("text").classed("er relationshipLabel", !0).attr("id", g).attr("x", m.x).attr("y", m.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", Z().fontFamily).style("font-size", k.fontSize + "px").text(e.roleA).node().getBBox(); + t.insert("rect", "#" + g).classed("er relationshipLabelBox", !0).attr("x", m.x - y.width / 2).attr("y", m.y - y.height / 2).attr("width", y.width).attr("height", y.height); +}, se = function(t, e, r, u) { + k = Z().er, V.info("Drawing ER diagram"); + const l = Z().securityLevel; + let p; + l === "sandbox" && (p = rt("#i" + e)); + const o = (l === "sandbox" ? rt(p.nodes()[0].contentDocument.body) : rt("body")).select(`[id='${e}']`); + B.insertMarkers(o, k); + let h; + h = new Mt({ + multigraph: !0, + directed: !0, + compound: !1 + }).setGraph({ + rankdir: k.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const _ = re(o, u.db.getEntities(), h), m = ae(u.db.getRelationships(), h); + wt(h), ie(o, h), m.forEach(function(I) { + ne(o, I, h, _, u); + }); + const g = k.diagramPadding; + bt.insertTitle(o, "entityTitleText", k.titleTopMargin, u.db.getDiagramTitle()); + const x = o.node().getBBox(), y = x.width + g * 2, N = x.height + g * 2; + Nt(o, N, y, k.useMaxWidth), o.attr("viewBox", `${x.x - g} ${x.y - g} ${y} ${N}`); +}, oe = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c"; +function le(t = "", e = "") { + const r = t.replace($t, ""); + return `${ht(e)}${ht(r)}${Jt( + t, + oe + )}`; +} +function ht(t = "") { + return t.length > 0 ? `${t}-` : ""; +} +const ce = { + setConf: te, + draw: se +}, he = (t) => ` + .entityBox { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${t.attributeBackgroundColorOdd}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxEven { + fill: ${t.attributeBackgroundColorEven}; + stroke: ${t.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${t.tertiaryColor}; + opacity: 0.7; + background-color: ${t.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${t.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + +`, de = he, Ee = { + parser: It, + db: Zt, + renderer: ce, + styles: de +}; +export { + Ee as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/erDiagram-a995d1fe.js b/webroot/js/node_modules/mermaid/dist/erDiagram-a995d1fe.js new file mode 100644 index 0000000..ab93fd0 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/erDiagram-a995d1fe.js @@ -0,0 +1,1176 @@ +import { c as getConfig, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, q as setDiagramTitle, r as getDiagramTitle, l as log, t as clear$1, u as utils, i as configureSvgSize, v as parseGenericTypes } from "./mermaid-0d192ec3.js"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { select, line, curveBasis } from "d3"; +import { layout } from "dagre-d3-es/src/dagre/index.js"; +import { v5 } from "uuid"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 20, 22, 24, 26, 27, 28], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 14], $V6 = [1, 15], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 24], $Vb = [1, 25], $Vc = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], $Vd = [1, 34], $Ve = [27, 28, 46, 47], $Vf = [41, 42, 43, 44, 45], $Vg = [17, 34], $Vh = [1, 54], $Vi = [1, 53], $Vj = [17, 34, 36, 38]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "entityName": 11, "relSpec": 12, ":": 13, "role": 14, "BLOCK_START": 15, "attributes": 16, "BLOCK_STOP": 17, "SQS": 18, "SQE": 19, "title": 20, "title_value": 21, "acc_title": 22, "acc_title_value": 23, "acc_descr": 24, "acc_descr_value": 25, "acc_descr_multiline_value": 26, "ALPHANUM": 27, "ENTITY_NAME": 28, "attribute": 29, "attributeType": 30, "attributeName": 31, "attributeKeyTypeList": 32, "attributeComment": 33, "ATTRIBUTE_WORD": 34, "attributeKeyType": 35, "COMMA": 36, "ATTRIBUTE_KEY": 37, "COMMENT": 38, "cardinality": 39, "relType": 40, "ZERO_OR_ONE": 41, "ZERO_OR_MORE": 42, "ONE_OR_MORE": 43, "ONLY_ONE": 44, "MD_PARENT": 45, "NON_IDENTIFYING": 46, "IDENTIFYING": 47, "WORD": 48, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + break; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.addEntity($$[$0 - 4]); + yy.addEntity($$[$0 - 2]); + yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]); + break; + case 9: + yy.addEntity($$[$0 - 3]); + yy.addAttributes($$[$0 - 3], $$[$0 - 1]); + break; + case 10: + yy.addEntity($$[$0 - 2]); + break; + case 11: + yy.addEntity($$[$0]); + break; + case 12: + yy.addEntity($$[$0 - 6], $$[$0 - 4]); + yy.addAttributes($$[$0 - 6], $$[$0 - 1]); + break; + case 13: + yy.addEntity($$[$0 - 5], $$[$0 - 3]); + break; + case 14: + yy.addEntity($$[$0 - 3], $$[$0 - 1]); + break; + case 15: + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + case 43: + this.$ = $$[$0]; + break; + case 20: + case 41: + case 42: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 21: + case 29: + this.$ = [$$[$0]]; + break; + case 22: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 23: + this.$ = { attributeType: $$[$0 - 1], attributeName: $$[$0] }; + break; + case 24: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeKeyTypeList: $$[$0] }; + break; + case 25: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 26: + this.$ = { attributeType: $$[$0 - 3], attributeName: $$[$0 - 2], attributeKeyTypeList: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 27: + case 28: + case 31: + this.$ = $$[$0]; + break; + case 30: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 32: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 33: + this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] }; + break; + case 34: + this.$ = yy.Cardinality.ZERO_OR_ONE; + break; + case 35: + this.$ = yy.Cardinality.ZERO_OR_MORE; + break; + case 36: + this.$ = yy.Cardinality.ONE_OR_MORE; + break; + case 37: + this.$ = yy.Cardinality.ONLY_ONE; + break; + case 38: + this.$ = yy.Cardinality.MD_PARENT; + break; + case 39: + this.$ = yy.Identification.NON_IDENTIFYING; + break; + case 40: + this.$ = yy.Identification.IDENTIFYING; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 16, 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, o($V0, [2, 18]), o($Vc, [2, 19]), o($Vc, [2, 20]), o($V0, [2, 4]), { 11: 29, 27: $V5, 28: $V6 }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: $Vd }, { 11: 35, 27: $V5, 28: $V6 }, { 40: 36, 46: [1, 37], 47: [1, 38] }, o($Ve, [2, 34]), o($Ve, [2, 35]), o($Ve, [2, 36]), o($Ve, [2, 37]), o($Ve, [2, 38]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, o($V0, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: $Vd }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }, o($Vf, [2, 39]), o($Vf, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, o($V0, [2, 9]), { 17: [2, 22] }, o($Vg, [2, 23], { 32: 50, 33: 51, 35: 52, 37: $Vh, 38: $Vi }), o([17, 34, 37, 38], [2, 28]), o($V0, [2, 14], { 15: [1, 55] }), o([27, 28], [2, 33]), o($V0, [2, 8]), o($V0, [2, 41]), o($V0, [2, 42]), o($V0, [2, 43]), o($Vg, [2, 24], { 33: 56, 36: [1, 57], 38: $Vi }), o($Vg, [2, 25]), o($Vj, [2, 29]), o($Vg, [2, 32]), o($Vj, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: $Vd }, o($Vg, [2, 26]), { 35: 60, 37: $Vh }, { 17: [1, 61] }, o($V0, [2, 13]), o($Vj, [2, 30]), o($V0, [2, 12])], + defaultActions: { 34: [2, 27], 41: [2, 22] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 22; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 24; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 10; + case 8: + break; + case 9: + return 8; + case 10: + return 28; + case 11: + return 48; + case 12: + return 4; + case 13: + this.begin("block"); + return 15; + case 14: + return 36; + case 15: + break; + case 16: + return 37; + case 17: + return 34; + case 18: + return 34; + case 19: + return 38; + case 20: + break; + case 21: + this.popState(); + return 17; + case 22: + return yy_.yytext[0]; + case 23: + return 18; + case 24: + return 19; + case 25: + return 41; + case 26: + return 43; + case 27: + return 43; + case 28: + return 43; + case 29: + return 41; + case 30: + return 41; + case 31: + return 42; + case 32: + return 42; + case 33: + return 42; + case 34: + return 42; + case 35: + return 42; + case 36: + return 43; + case 37: + return 42; + case 38: + return 43; + case 39: + return 44; + case 40: + return 44; + case 41: + return 44; + case 42: + return 44; + case 43: + return 41; + case 44: + return 42; + case 45: + return 43; + case 46: + return 45; + case 47: + return 46; + case 48: + return 47; + case 49: + return 47; + case 50: + return 46; + case 51: + return 46; + case 52: + return 46; + case 53: + return 27; + case 54: + return yy_.yytext[0]; + case 55: + return 6; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i], + conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [14, 15, 16, 17, 18, 19, 20, 21, 22], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const erParser = parser; +let entities = {}; +let relationships = []; +const Cardinality = { + ZERO_OR_ONE: "ZERO_OR_ONE", + ZERO_OR_MORE: "ZERO_OR_MORE", + ONE_OR_MORE: "ONE_OR_MORE", + ONLY_ONE: "ONLY_ONE", + MD_PARENT: "MD_PARENT" +}; +const Identification = { + NON_IDENTIFYING: "NON_IDENTIFYING", + IDENTIFYING: "IDENTIFYING" +}; +const addEntity = function(name, alias = void 0) { + if (entities[name] === void 0) { + entities[name] = { attributes: [], alias }; + log.info("Added new entity :", name); + } else if (entities[name] && !entities[name].alias && alias) { + entities[name].alias = alias; + log.info(`Add alias '${alias}' to entity '${name}'`); + } + return entities[name]; +}; +const getEntities = () => entities; +const addAttributes = function(entityName, attribs) { + let entity = addEntity(entityName); + let i; + for (i = attribs.length - 1; i >= 0; i--) { + entity.attributes.push(attribs[i]); + log.debug("Added attribute ", attribs[i].attributeName); + } +}; +const addRelationship = function(entA, rolA, entB, rSpec) { + let rel = { + entityA: entA, + roleA: rolA, + entityB: entB, + relSpec: rSpec + }; + relationships.push(rel); + log.debug("Added new relationship :", rel); +}; +const getRelationships = () => relationships; +const clear = function() { + entities = {}; + relationships = []; + clear$1(); +}; +const erDb = { + Cardinality, + Identification, + getConfig: () => getConfig().er, + addEntity, + addAttributes, + getEntities, + addRelationship, + getRelationships, + clear, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + setDiagramTitle, + getDiagramTitle +}; +const ERMarkers = { + ONLY_ONE_START: "ONLY_ONE_START", + ONLY_ONE_END: "ONLY_ONE_END", + ZERO_OR_ONE_START: "ZERO_OR_ONE_START", + ZERO_OR_ONE_END: "ZERO_OR_ONE_END", + ONE_OR_MORE_START: "ONE_OR_MORE_START", + ONE_OR_MORE_END: "ONE_OR_MORE_END", + ZERO_OR_MORE_START: "ZERO_OR_MORE_START", + ZERO_OR_MORE_END: "ZERO_OR_MORE_END", + MD_PARENT_END: "MD_PARENT_END", + MD_PARENT_START: "MD_PARENT_START" +}; +const insertMarkers = function(elem, conf2) { + let marker; + elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_START).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_END).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18"); + return; +}; +const erMarkers = { + ERMarkers, + insertMarkers +}; +const BAD_ID_CHARS_REGEXP = /[^\dA-Za-z](\W)*/g; +let conf = {}; +let entityNameIds = /* @__PURE__ */ new Map(); +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const drawAttributes = (groupNode, entityTextNode, attributes) => { + const heightPadding = conf.entityPadding / 3; + const widthPadding = conf.entityPadding / 3; + const attrFontSize = conf.fontSize * 0.85; + const labelBBox = entityTextNode.node().getBBox(); + const attributeNodes = []; + let hasKeyType = false; + let hasComment = false; + let maxTypeWidth = 0; + let maxNameWidth = 0; + let maxKeyWidth = 0; + let maxCommentWidth = 0; + let cumulativeHeight = labelBBox.height + heightPadding * 2; + let attrNum = 1; + attributes.forEach((item) => { + if (item.attributeKeyTypeList !== void 0 && item.attributeKeyTypeList.length > 0) { + hasKeyType = true; + } + if (item.attributeComment !== void 0) { + hasComment = true; + } + }); + attributes.forEach((item) => { + const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`; + let nodeHeight = 0; + const attributeType = parseGenericTypes(item.attributeType); + const typeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(attributeType); + const nameNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeName); + const attributeNode = {}; + attributeNode.tn = typeNode; + attributeNode.nn = nameNode; + const typeBBox = typeNode.node().getBBox(); + const nameBBox = nameNode.node().getBBox(); + maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width); + maxNameWidth = Math.max(maxNameWidth, nameBBox.width); + nodeHeight = Math.max(typeBBox.height, nameBBox.height); + if (hasKeyType) { + const keyTypeNodeText = item.attributeKeyTypeList !== void 0 ? item.attributeKeyTypeList.join(",") : ""; + const keyTypeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(keyTypeNodeText); + attributeNode.kn = keyTypeNode; + const keyTypeBBox = keyTypeNode.node().getBBox(); + maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width); + nodeHeight = Math.max(nodeHeight, keyTypeBBox.height); + } + if (hasComment) { + const commentNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeComment || ""); + attributeNode.cn = commentNode; + const commentNodeBBox = commentNode.node().getBBox(); + maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width); + nodeHeight = Math.max(nodeHeight, commentNodeBBox.height); + } + attributeNode.height = nodeHeight; + attributeNodes.push(attributeNode); + cumulativeHeight += nodeHeight + heightPadding * 2; + attrNum += 1; + }); + let widthPaddingFactor = 4; + if (hasKeyType) { + widthPaddingFactor += 2; + } + if (hasComment) { + widthPaddingFactor += 2; + } + const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth; + const bBox = { + width: Math.max( + conf.minEntityWidth, + Math.max( + labelBBox.width + conf.entityPadding * 2, + maxWidth + widthPadding * widthPaddingFactor + ) + ), + height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2) + }; + if (attributes.length > 0) { + const spareColumnWidth = Math.max( + 0, + (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2) + ); + entityTextNode.attr( + "transform", + "translate(" + bBox.width / 2 + "," + (heightPadding + labelBBox.height / 2) + ")" + ); + let heightOffset = labelBBox.height + heightPadding * 2; + let attribStyle = "attributeBoxOdd"; + attributeNodes.forEach((attributeNode) => { + const alignY = heightOffset + heightPadding + attributeNode.height / 2; + attributeNode.tn.attr("transform", "translate(" + widthPadding + "," + alignY + ")"); + const typeRect = groupNode.insert("rect", "#" + attributeNode.tn.node().id).classed(`er ${attribStyle}`, true).attr("x", 0).attr("y", heightOffset).attr("width", maxTypeWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + const nameXOffset = parseFloat(typeRect.attr("x")) + parseFloat(typeRect.attr("width")); + attributeNode.nn.attr( + "transform", + "translate(" + (nameXOffset + widthPadding) + "," + alignY + ")" + ); + const nameRect = groupNode.insert("rect", "#" + attributeNode.nn.node().id).classed(`er ${attribStyle}`, true).attr("x", nameXOffset).attr("y", heightOffset).attr("width", maxNameWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + let keyTypeAndCommentXOffset = parseFloat(nameRect.attr("x")) + parseFloat(nameRect.attr("width")); + if (hasKeyType) { + attributeNode.kn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + const keyTypeRect = groupNode.insert("rect", "#" + attributeNode.kn.node().id).classed(`er ${attribStyle}`, true).attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxKeyWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + keyTypeAndCommentXOffset = parseFloat(keyTypeRect.attr("x")) + parseFloat(keyTypeRect.attr("width")); + } + if (hasComment) { + attributeNode.cn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + groupNode.insert("rect", "#" + attributeNode.cn.node().id).classed(`er ${attribStyle}`, "true").attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxCommentWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + } + heightOffset += attributeNode.height + heightPadding * 2; + attribStyle = attribStyle === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd"; + }); + } else { + bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); + entityTextNode.attr("transform", "translate(" + bBox.width / 2 + "," + bBox.height / 2 + ")"); + } + return bBox; +}; +const drawEntities = function(svgNode, entities2, graph) { + const keys = Object.keys(entities2); + let firstOne; + keys.forEach(function(entityName) { + const entityId = generateId(entityName, "entity"); + entityNameIds.set(entityName, entityId); + const groupNode = svgNode.append("g").attr("id", entityId); + firstOne = firstOne === void 0 ? entityId : firstOne; + const textId = "text-" + entityId; + const textNode = groupNode.append("text").classed("er entityLabel", true).attr("id", textId).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", getConfig().fontFamily).style("font-size", conf.fontSize + "px").text(entities2[entityName].alias ?? entityName); + const { width: entityWidth, height: entityHeight } = drawAttributes( + groupNode, + textNode, + entities2[entityName].attributes + ); + const rectNode = groupNode.insert("rect", "#" + textId).classed("er entityBox", true).attr("x", 0).attr("y", 0).attr("width", entityWidth).attr("height", entityHeight); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(entityId, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: entityId + }); + }); + return firstOne; +}; +const adjustEntities = function(svgNode, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); +}; +const getEdgeName = function(rel) { + return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, ""); +}; +const addRelationships = function(relationships2, g) { + relationships2.forEach(function(r) { + g.setEdge( + entityNameIds.get(r.entityA), + entityNameIds.get(r.entityB), + { relationship: r }, + getEdgeName(r) + ); + }); + return relationships2; +}; +let relCnt = 0; +const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { + relCnt++; + const edge = g.edge( + entityNameIds.get(rel.entityA), + entityNameIds.get(rel.entityB), + getEdgeName(rel) + ); + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = svg.insert("path", "#" + insert).classed("er relationshipLine", true).attr("d", lineFunction(edge.points)).style("stroke", conf.stroke).style("fill", "none"); + if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) { + svgPath.attr("stroke-dasharray", "8,8"); + } + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (rel.relSpec.cardA) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_END + ")"); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_END + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_END + ")"); + break; + } + switch (rel.relSpec.cardB) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_START + ")" + ); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_START + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_START + ")"); + break; + } + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt; + const labelNode = svg.append("text").classed("er relationshipLabel", true).attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", getConfig().fontFamily).style("font-size", conf.fontSize + "px").text(rel.roleA); + const labelBBox = labelNode.node().getBBox(); + svg.insert("rect", "#" + labelId).classed("er relationshipLabelBox", true).attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height); +}; +const draw = function(text, id, _version, diagObj) { + conf = getConfig().er; + log.info("Drawing ER diagram"); + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = root.select(`[id='${id}']`); + erMarkers.insertMarkers(svg, conf); + let g; + g = new graphlib.Graph({ + multigraph: true, + directed: true, + compound: false + }).setGraph({ + rankdir: conf.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g); + const relationships2 = addRelationships(diagObj.db.getRelationships(), g); + layout(g); + adjustEntities(svg, g); + relationships2.forEach(function(rel) { + drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj); + }); + const padding = conf.diagramPadding; + utils.insertTitle(svg, "entityTitleText", conf.titleTopMargin, diagObj.db.getDiagramTitle()); + const svgBounds = svg.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + configureSvgSize(svg, height, width, conf.useMaxWidth); + svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); +}; +const MERMAID_ERDIAGRAM_UUID = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c"; +function generateId(str = "", prefix = "") { + const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, ""); + return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${v5( + str, + MERMAID_ERDIAGRAM_UUID + )}`; +} +function strWithHyphen(str = "") { + return str.length > 0 ? `${str}-` : ""; +} +const erRenderer = { + setConf, + draw +}; +const getStyles = (options) => ` + .entityBox { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${options.attributeBackgroundColorOdd}; + stroke: ${options.nodeBorder}; + } + + .attributeBoxEven { + fill: ${options.attributeBackgroundColorEven}; + stroke: ${options.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${options.tertiaryColor}; + opacity: 0.7; + background-color: ${options.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${options.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; + } + +`; +const erStyles = getStyles; +const diagram = { + parser: erParser, + db: erDb, + renderer: erRenderer, + styles: erStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/errors.d.ts b/webroot/js/node_modules/mermaid/dist/errors.d.ts new file mode 100644 index 0000000..90e14e7 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/errors.d.ts @@ -0,0 +1,3 @@ +export declare class UnknownDiagramError extends Error { + constructor(message: string); +} diff --git a/webroot/js/node_modules/mermaid/dist/flowDb-af7c12e0.js b/webroot/js/node_modules/mermaid/dist/flowDb-af7c12e0.js new file mode 100644 index 0000000..38396f3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDb-af7c12e0.js @@ -0,0 +1,1693 @@ +import { aQ as defaultConfig, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, B as setDiagramTitle, D as getDiagramTitle, c as getConfig, l as log, z as utils, E as clear$1, f as common, j as d3select } from "./mermaid-491db2d9.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeperator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "verticeStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" }, + productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + this.$ = []; + break; + case 3: + if (!Array.isArray($$[$0]) || $$[$0].length > 0) { + $$[$0 - 1].push($$[$0]); + } + this.$ = $$[$0 - 1]; + break; + case 4: + case 176: + this.$ = $$[$0]; + break; + case 11: + yy.setDirection("TB"); + this.$ = "TB"; + break; + case 12: + yy.setDirection($$[$0 - 1]); + this.$ = $$[$0 - 1]; + break; + case 27: + this.$ = $$[$0 - 1].nodes; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + this.$ = []; + break; + case 33: + this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); + break; + case 34: + this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); + break; + case 35: + this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); + break; + case 37: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 38: + case 39: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 43: + yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); + this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; + break; + case 44: + yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; + break; + case 45: + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; + break; + case 46: + this.$ = { stmt: $$[$0], nodes: $$[$0] }; + break; + case 47: + this.$ = [$$[$0]]; + break; + case 48: + this.$ = $$[$0 - 4].concat($$[$0]); + break; + case 49: + this.$ = $$[$0]; + break; + case 50: + this.$ = $$[$0 - 2]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 51: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); + break; + case 52: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); + break; + case 53: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); + break; + case 54: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); + break; + case 55: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); + break; + case 56: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); + break; + case 57: + this.$ = $$[$0 - 7]; + yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); + break; + case 58: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); + break; + case 59: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); + break; + case 60: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); + break; + case 61: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); + break; + case 62: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); + break; + case 63: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); + break; + case 64: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); + break; + case 65: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); + break; + case 66: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); + break; + case 67: + this.$ = $$[$0]; + yy.addVertex($$[$0]); + break; + case 68: + $$[$0 - 1].text = $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 69: + case 70: + $$[$0 - 2].text = $$[$0 - 1]; + this.$ = $$[$0 - 2]; + break; + case 71: + this.$ = $$[$0]; + break; + case 72: + var inf = yy.destructLink($$[$0], $$[$0 - 2]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; + break; + case 73: + this.$ = { text: $$[$0], type: "text" }; + break; + case 74: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 75: + this.$ = { text: $$[$0], type: "string" }; + break; + case 76: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 77: + var inf = yy.destructLink($$[$0]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; + break; + case 78: + this.$ = $$[$0 - 1]; + break; + case 79: + this.$ = { text: $$[$0], type: "text" }; + break; + case 80: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 81: + this.$ = { text: $$[$0], type: "string" }; + break; + case 82: + case 97: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 94: + this.$ = { text: $$[$0], type: "text" }; + break; + case 95: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 96: + this.$ = { text: $$[$0], type: "text" }; + break; + case 98: + this.$ = $$[$0 - 4]; + yy.addClass($$[$0 - 2], $$[$0]); + break; + case 99: + this.$ = $$[$0 - 4]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 100: + case 108: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 101: + case 109: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 102: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 103: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 104: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 105: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 106: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 107: + this.$ = $$[$0 - 6]; + yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 111: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 112: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + break; + case 113: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 5], $$[$0 - 2]); + break; + case 114: + this.$ = $$[$0 - 4]; + yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); + break; + case 115: + this.$ = $$[$0 - 4]; + yy.updateLink([$$[$0 - 2]], $$[$0]); + break; + case 116: + this.$ = $$[$0 - 4]; + yy.updateLink($$[$0 - 2], $$[$0]); + break; + case 117: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); + yy.updateLink([$$[$0 - 6]], $$[$0]); + break; + case 118: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); + yy.updateLink($$[$0 - 6], $$[$0]); + break; + case 119: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); + break; + case 120: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); + break; + case 121: + case 123: + this.$ = [$$[$0]]; + break; + case 122: + case 124: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 126: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 174: + this.$ = $$[$0]; + break; + case 175: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 177: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 178: + this.$ = { stmt: "dir", value: "TB" }; + break; + case 179: + this.$ = { stmt: "dir", value: "BT" }; + break; + case 180: + this.$ = { stmt: "dir", value: "RL" }; + break; + case 181: + this.$ = { stmt: "dir", value: "LR" }; + break; + } + }, + table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 34; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 36; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + this.begin("callbackname"); + break; + case 8: + this.popState(); + break; + case 9: + this.popState(); + this.begin("callbackargs"); + break; + case 10: + return 92; + case 11: + this.popState(); + break; + case 12: + return 93; + case 13: + return "MD_STR"; + case 14: + this.popState(); + break; + case 15: + this.begin("md_string"); + break; + case 16: + return "STR"; + case 17: + this.popState(); + break; + case 18: + this.pushState("string"); + break; + case 19: + return 81; + case 20: + return 99; + case 21: + return 82; + case 22: + return 101; + case 23: + return 83; + case 24: + return 84; + case 25: + return 94; + case 26: + this.begin("click"); + break; + case 27: + this.popState(); + break; + case 28: + return 85; + case 29: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 30: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 31: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 32: + return 27; + case 33: + return 32; + case 34: + return 95; + case 35: + return 95; + case 36: + return 95; + case 37: + return 95; + case 38: + this.popState(); + return 13; + case 39: + this.popState(); + return 14; + case 40: + this.popState(); + return 14; + case 41: + this.popState(); + return 14; + case 42: + this.popState(); + return 14; + case 43: + this.popState(); + return 14; + case 44: + this.popState(); + return 14; + case 45: + this.popState(); + return 14; + case 46: + this.popState(); + return 14; + case 47: + this.popState(); + return 14; + case 48: + this.popState(); + return 14; + case 49: + return 118; + case 50: + return 119; + case 51: + return 120; + case 52: + return 121; + case 53: + return 102; + case 54: + return 108; + case 55: + return 44; + case 56: + return 58; + case 57: + return 42; + case 58: + return 8; + case 59: + return 103; + case 60: + return 112; + case 61: + this.popState(); + return 75; + case 62: + this.pushState("edgeText"); + return 73; + case 63: + return 116; + case 64: + this.popState(); + return 75; + case 65: + this.pushState("thickEdgeText"); + return 73; + case 66: + return 116; + case 67: + this.popState(); + return 75; + case 68: + this.pushState("dottedEdgeText"); + return 73; + case 69: + return 116; + case 70: + return 75; + case 71: + this.popState(); + return 51; + case 72: + return "TEXT"; + case 73: + this.pushState("ellipseText"); + return 50; + case 74: + this.popState(); + return 53; + case 75: + this.pushState("text"); + return 52; + case 76: + this.popState(); + return 55; + case 77: + this.pushState("text"); + return 54; + case 78: + return 56; + case 79: + this.pushState("text"); + return 65; + case 80: + this.popState(); + return 62; + case 81: + this.pushState("text"); + return 61; + case 82: + this.popState(); + return 47; + case 83: + this.pushState("text"); + return 46; + case 84: + this.popState(); + return 67; + case 85: + this.popState(); + return 69; + case 86: + return 114; + case 87: + this.pushState("trapText"); + return 66; + case 88: + this.pushState("trapText"); + return 68; + case 89: + return 115; + case 90: + return 65; + case 91: + return 87; + case 92: + return "SEP"; + case 93: + return 86; + case 94: + return 112; + case 95: + return 108; + case 96: + return 42; + case 97: + return 106; + case 98: + return 111; + case 99: + return 113; + case 100: + this.popState(); + return 60; + case 101: + this.pushState("text"); + return 60; + case 102: + this.popState(); + return 49; + case 103: + this.pushState("text"); + return 48; + case 104: + this.popState(); + return 31; + case 105: + this.pushState("text"); + return 29; + case 106: + this.popState(); + return 64; + case 107: + this.pushState("text"); + return 63; + case 108: + return "TEXT"; + case 109: + return "QUOTE"; + case 110: + return 9; + case 111: + return 10; + case 112: + return 11; + } + }, + rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|(?!\)+))/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/], + conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const MERMAID_DOM_ID_PREFIX = "flowchart-"; +let vertexCounter = 0; +let config = getConfig(); +let vertices = {}; +let edges = []; +let classes = {}; +let subGraphs = []; +let subGraphLookup = {}; +let tooltips = {}; +let subCount = 0; +let firstGraphFlag = true; +let direction; +let version; +let funs = []; +const sanitizeText = (txt) => common.sanitizeText(txt, config); +const lookUpDomId = function(id) { + const veritceKeys = Object.keys(vertices); + for (const veritceKey of veritceKeys) { + if (vertices[veritceKey].id === id) { + return vertices[veritceKey].domId; + } + } + return id; +}; +const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { + let txt; + let id = _id; + if (id === void 0) { + return; + } + if (id.trim().length === 0) { + return; + } + if (vertices[id] === void 0) { + vertices[id] = { + id, + labelType: "text", + domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, + styles: [], + classes: [] + }; + } + vertexCounter++; + if (textObj !== void 0) { + config = getConfig(); + txt = sanitizeText(textObj.text.trim()); + vertices[id].labelType = textObj.type; + if (txt[0] === '"' && txt[txt.length - 1] === '"') { + txt = txt.substring(1, txt.length - 1); + } + vertices[id].text = txt; + } else { + if (vertices[id].text === void 0) { + vertices[id].text = _id; + } + } + if (type !== void 0) { + vertices[id].type = type; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + vertices[id].styles.push(s); + }); + } + if (classes2 !== void 0 && classes2 !== null) { + classes2.forEach(function(s) { + vertices[id].classes.push(s); + }); + } + if (dir !== void 0) { + vertices[id].dir = dir; + } + if (vertices[id].props === void 0) { + vertices[id].props = props; + } else if (props !== void 0) { + Object.assign(vertices[id].props, props); + } +}; +const addSingleLink = function(_start, _end, type) { + let start = _start; + let end = _end; + const edge = { start, end, type: void 0, text: "", labelType: "text" }; + log.info("abc78 Got edge...", edge); + const linkTextObj = type.text; + if (linkTextObj !== void 0) { + edge.text = sanitizeText(linkTextObj.text.trim()); + if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { + edge.text = edge.text.substring(1, edge.text.length - 1); + } + edge.labelType = linkTextObj.type; + } + if (type !== void 0) { + edge.type = type.type; + edge.stroke = type.stroke; + edge.length = type.length; + } + edges.push(edge); +}; +const addLink = function(_start, _end, type) { + log.info("addLink (abc78)", _start, _end, type); + let i, j; + for (i = 0; i < _start.length; i++) { + for (j = 0; j < _end.length; j++) { + addSingleLink(_start[i], _end[j], type); + } + } +}; +const updateLinkInterpolate = function(positions, interp) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultInterpolate = interp; + } else { + edges[pos].interpolate = interp; + } + }); +}; +const updateLink = function(positions, style) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultStyle = style; + } else { + if (utils.isSubstringInArray("fill", style) === -1) { + style.push("fill:none"); + } + edges[pos].style = style; + } + }); +}; +const addClass = function(ids, style) { + ids.split(",").forEach(function(id) { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + if (s.match("color")) { + const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); + classes[id].textStyles.push(newStyle); + } + classes[id].styles.push(s); + }); + } + }); +}; +const setDirection = function(dir) { + direction = dir; + if (direction.match(/.*/)) { + direction = "LR"; + } + if (direction.match(/.*v/)) { + direction = "TB"; + } + if (direction === "TD") { + direction = "TB"; + } +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (vertices[id] !== void 0) { + vertices[id].classes.push(className); + } + if (subGraphLookup[id] !== void 0) { + subGraphLookup[id].classes.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + let domId = lookUpDomId(id); + if (getConfig().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + if (vertices[id] !== void 0) { + vertices[id].haveCallback = true; + funs.push(function() { + const elem = document.querySelector(`[id="${domId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const setLink = function(ids, linkStr, target) { + ids.split(",").forEach(function(id) { + if (vertices[id] !== void 0) { + vertices[id].link = utils.formatUrl(linkStr, config); + vertices[id].linkTarget = target; + } + }); + setClass(ids, "clickable"); +}; +const getTooltip = function(id) { + if (tooltips.hasOwnProperty(id)) { + return tooltips[id]; + } + return void 0; +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const getDirection = function() { + return direction.trim(); +}; +const getVertices = function() { + return vertices; +}; +const getEdges = function() { + return edges; +}; +const getClasses = function() { + return classes; +}; +const setupToolTips = function(element) { + let tooltipElem = d3select(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = d3select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = d3select(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = d3select(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = d3select(this); + el.classed("hover", false); + }); +}; +funs.push(setupToolTips); +const clear = function(ver = "gen-1") { + vertices = {}; + classes = {}; + edges = []; + funs = [setupToolTips]; + subGraphs = []; + subGraphLookup = {}; + subCount = 0; + tooltips = {}; + firstGraphFlag = true; + version = ver; + clear$1(); +}; +const setGen = (ver) => { + version = ver || "gen-2"; +}; +const defaultStyle = function() { + return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; +}; +const addSubGraph = function(_id, list, _title) { + let id = _id.text.trim(); + let title = _title.text; + if (_id === _title && _title.text.match(/\s/)) { + id = void 0; + } + function uniq(a) { + const prims = { boolean: {}, number: {}, string: {} }; + const objs = []; + let dir2; + const nodeList2 = a.filter(function(item) { + const type = typeof item; + if (item.stmt && item.stmt === "dir") { + dir2 = item.value; + return false; + } + if (item.trim() === "") { + return false; + } + if (type in prims) { + return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; + } else { + return objs.includes(item) ? false : objs.push(item); + } + }); + return { nodeList: nodeList2, dir: dir2 }; + } + let nodeList = []; + const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); + nodeList = nl; + if (version === "gen-1") { + for (let i = 0; i < nodeList.length; i++) { + nodeList[i] = lookUpDomId(nodeList[i]); + } + } + id = id || "subGraph" + subCount; + title = title || ""; + title = sanitizeText(title); + subCount = subCount + 1; + const subGraph = { + id, + nodes: nodeList, + title: title.trim(), + classes: [], + dir, + labelType: _title.type + }; + log.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); + subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; + subGraphs.push(subGraph); + subGraphLookup[id] = subGraph; + return id; +}; +const getPosForId = function(id) { + for (const [i, subGraph] of subGraphs.entries()) { + if (subGraph.id === id) { + return i; + } + } + return -1; +}; +let secCount = -1; +const posCrossRef = []; +const indexNodes2 = function(id, pos) { + const nodes = subGraphs[pos].nodes; + secCount = secCount + 1; + if (secCount > 2e3) { + return; + } + posCrossRef[secCount] = pos; + if (subGraphs[pos].id === id) { + return { + result: true, + count: 0 + }; + } + let count = 0; + let posCount = 1; + while (count < nodes.length) { + const childPos = getPosForId(nodes[count]); + if (childPos >= 0) { + const res = indexNodes2(id, childPos); + if (res.result) { + return { + result: true, + count: posCount + res.count + }; + } else { + posCount = posCount + res.count; + } + } + count = count + 1; + } + return { + result: false, + count: posCount + }; +}; +const getDepthFirstPos = function(pos) { + return posCrossRef[pos]; +}; +const indexNodes = function() { + secCount = -1; + if (subGraphs.length > 0) { + indexNodes2("none", subGraphs.length - 1); + } +}; +const getSubGraphs = function() { + return subGraphs; +}; +const firstGraph = () => { + if (firstGraphFlag) { + firstGraphFlag = false; + return true; + } + return false; +}; +const destructStartLink = (_str) => { + let str = _str.trim(); + let type = "arrow_open"; + switch (str[0]) { + case "<": + type = "arrow_point"; + str = str.slice(1); + break; + case "x": + type = "arrow_cross"; + str = str.slice(1); + break; + case "o": + type = "arrow_circle"; + str = str.slice(1); + break; + } + let stroke = "normal"; + if (str.includes("=")) { + stroke = "thick"; + } + if (str.includes(".")) { + stroke = "dotted"; + } + return { type, stroke }; +}; +const countChar = (char, str) => { + const length = str.length; + let count = 0; + for (let i = 0; i < length; ++i) { + if (str[i] === char) { + ++count; + } + } + return count; +}; +const destructEndLink = (_str) => { + const str = _str.trim(); + let line = str.slice(0, -1); + let type = "arrow_open"; + switch (str.slice(-1)) { + case "x": + type = "arrow_cross"; + if (str[0] === "x") { + type = "double_" + type; + line = line.slice(1); + } + break; + case ">": + type = "arrow_point"; + if (str[0] === "<") { + type = "double_" + type; + line = line.slice(1); + } + break; + case "o": + type = "arrow_circle"; + if (str[0] === "o") { + type = "double_" + type; + line = line.slice(1); + } + break; + } + let stroke = "normal"; + let length = line.length - 1; + if (line[0] === "=") { + stroke = "thick"; + } + if (line[0] === "~") { + stroke = "invisible"; + } + let dots = countChar(".", line); + if (dots) { + stroke = "dotted"; + length = dots; + } + return { type, stroke, length }; +}; +const destructLink = (_str, _startStr) => { + const info = destructEndLink(_str); + let startInfo; + if (_startStr) { + startInfo = destructStartLink(_startStr); + if (startInfo.stroke !== info.stroke) { + return { type: "INVALID", stroke: "INVALID" }; + } + if (startInfo.type === "arrow_open") { + startInfo.type = info.type; + } else { + if (startInfo.type !== info.type) { + return { type: "INVALID", stroke: "INVALID" }; + } + startInfo.type = "double_" + startInfo.type; + } + if (startInfo.type === "double_arrow") { + startInfo.type = "double_arrow_point"; + } + startInfo.length = info.length; + return startInfo; + } + return info; +}; +const exists = (allSgs, _id) => { + let res = false; + allSgs.forEach((sg) => { + const pos = sg.nodes.indexOf(_id); + if (pos >= 0) { + res = true; + } + }); + return res; +}; +const makeUniq = (sg, allSubgraphs) => { + const res = []; + sg.nodes.forEach((_id, pos) => { + if (!exists(allSubgraphs, _id)) { + res.push(sg.nodes[pos]); + } + }); + return { nodes: res }; +}; +const lex = { + firstGraph +}; +const flowDb = { + defaultConfig: () => defaultConfig.flowchart, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + addVertex, + lookUpDomId, + addLink, + updateLinkInterpolate, + updateLink, + addClass, + setDirection, + setClass, + setTooltip, + getTooltip, + setClickEvent, + setLink, + bindFunctions, + getDirection, + getVertices, + getEdges, + getClasses, + clear, + setGen, + defaultStyle, + addSubGraph, + getDepthFirstPos, + indexNodes, + getSubGraphs, + destructLink, + lex, + exists, + makeUniq, + setDiagramTitle, + getDiagramTitle +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addClass, + addLink, + addSingleLink, + addSubGraph, + addVertex, + bindFunctions, + clear, + default: flowDb, + defaultStyle, + destructLink, + firstGraph, + getClasses, + getDepthFirstPos, + getDirection, + getEdges, + getSubGraphs, + getTooltip, + getVertices, + indexNodes, + lex, + lookUpDomId, + setClass, + setClickEvent, + setDirection, + setGen, + setLink, + updateLink, + updateLinkInterpolate +}, Symbol.toStringTag, { value: "Module" })); +export { + db as d, + flowDb as f, + parser$1 as p +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDb-b820d5dc.js b/webroot/js/node_modules/mermaid/dist/flowDb-b820d5dc.js new file mode 100644 index 0000000..51bb59b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDb-b820d5dc.js @@ -0,0 +1,1113 @@ +import { aQ as ye, s as me, g as Ve, a as Le, b as ve, B as Ie, D as Re, c as ft, l as pt, z as dt, E as Ne, f as Oe, j as N1 } from "./mermaid-e4a58915.js"; +var ot = function() { + var e = function(h1, a, l, h) { + for (l = l || {}, h = h1.length; h--; l[h1[h]] = a) + ; + return l; + }, u = [1, 4], n = [1, 3], r = [1, 5], c = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], f = [2, 2], o = [1, 13], U = [1, 14], F = [1, 15], O = [1, 16], z = [1, 23], c1 = [1, 25], f1 = [1, 26], p1 = [1, 27], S = [1, 49], k = [1, 48], l1 = [1, 29], w1 = [1, 30], U1 = [1, 31], G1 = [1, 32], M1 = [1, 33], B = [1, 44], x = [1, 46], y = [1, 42], m = [1, 47], V = [1, 43], L = [1, 50], v = [1, 45], I = [1, 51], R = [1, 52], K1 = [1, 34], j1 = [1, 35], Y1 = [1, 36], X1 = [1, 37], v1 = [1, 57], b = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], Q = [1, 61], W = [1, 60], q = [1, 62], z1 = [8, 9, 11, 73, 75], k1 = [1, 88], b1 = [1, 93], g1 = [1, 92], D1 = [1, 89], F1 = [1, 85], T1 = [1, 91], C1 = [1, 87], S1 = [1, 94], _1 = [1, 90], B1 = [1, 95], x1 = [1, 86], H1 = [8, 9, 10, 11, 73, 75], N = [8, 9, 10, 11, 44, 73, 75], M = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], Et = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], I1 = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], kt = [1, 121], bt = [1, 120], gt = [1, 128], Dt = [1, 142], Ft = [1, 143], Tt = [1, 144], Ct = [1, 145], St = [1, 130], _t = [1, 132], Bt = [1, 136], xt = [1, 137], yt = [1, 138], mt = [1, 139], Vt = [1, 140], Lt = [1, 141], vt = [1, 146], It = [1, 147], Rt = [1, 126], Nt = [1, 127], Ot = [1, 134], Pt = [1, 129], wt = [1, 133], Ut = [1, 131], ut = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], Gt = [1, 149], T = [8, 9, 11], K = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], p = [1, 169], P = [1, 165], w = [1, 166], d = [1, 170], A = [1, 167], E = [1, 168], y1 = [75, 113, 116], g = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], Mt = [10, 103], o1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], Z = [1, 235], J = [1, 233], $ = [1, 237], t1 = [1, 231], e1 = [1, 232], s1 = [1, 234], u1 = [1, 236], n1 = [1, 238], m1 = [1, 255], Kt = [8, 9, 11, 103], H = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109], nt = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, graphConfig: 4, document: 5, line: 6, statement: 7, SEMI: 8, NEWLINE: 9, SPACE: 10, EOF: 11, GRAPH: 12, NODIR: 13, DIR: 14, FirstStmtSeperator: 15, ending: 16, endToken: 17, spaceList: 18, spaceListNewline: 19, verticeStatement: 20, separator: 21, styleStatement: 22, linkStyleStatement: 23, classDefStatement: 24, classStatement: 25, clickStatement: 26, subgraph: 27, textNoTags: 28, SQS: 29, text: 30, SQE: 31, end: 32, direction: 33, acc_title: 34, acc_title_value: 35, acc_descr: 36, acc_descr_value: 37, acc_descr_multiline_value: 38, link: 39, node: 40, styledVertex: 41, AMP: 42, vertex: 43, STYLE_SEPARATOR: 44, idString: 45, DOUBLECIRCLESTART: 46, DOUBLECIRCLEEND: 47, PS: 48, PE: 49, "(-": 50, "-)": 51, STADIUMSTART: 52, STADIUMEND: 53, SUBROUTINESTART: 54, SUBROUTINEEND: 55, VERTEX_WITH_PROPS_START: 56, "NODE_STRING[field]": 57, COLON: 58, "NODE_STRING[value]": 59, PIPE: 60, CYLINDERSTART: 61, CYLINDEREND: 62, DIAMOND_START: 63, DIAMOND_STOP: 64, TAGEND: 65, TRAPSTART: 66, TRAPEND: 67, INVTRAPSTART: 68, INVTRAPEND: 69, linkStatement: 70, arrowText: 71, TESTSTR: 72, START_LINK: 73, edgeText: 74, LINK: 75, edgeTextToken: 76, STR: 77, MD_STR: 78, textToken: 79, keywords: 80, STYLE: 81, LINKSTYLE: 82, CLASSDEF: 83, CLASS: 84, CLICK: 85, DOWN: 86, UP: 87, textNoTagsToken: 88, stylesOpt: 89, "idString[vertex]": 90, "idString[class]": 91, CALLBACKNAME: 92, CALLBACKARGS: 93, HREF: 94, LINK_TARGET: 95, "STR[link]": 96, "STR[tooltip]": 97, alphaNum: 98, DEFAULT: 99, numList: 100, INTERPOLATE: 101, NUM: 102, COMMA: 103, style: 104, styleComponent: 105, NODE_STRING: 106, UNIT: 107, BRKT: 108, PCT: 109, idStringToken: 110, MINUS: 111, MULT: 112, UNICODE_TEXT: 113, TEXT: 114, TAGSTART: 115, EDGE_TEXT: 116, alphaNumToken: 117, direction_tb: 118, direction_bt: 119, direction_rl: 120, direction_lr: 121, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" }, + productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]], + performAction: function(a, l, h, i, C, t, R1) { + var s = t.length - 1; + switch (C) { + case 2: + this.$ = []; + break; + case 3: + (!Array.isArray(t[s]) || t[s].length > 0) && t[s - 1].push(t[s]), this.$ = t[s - 1]; + break; + case 4: + case 176: + this.$ = t[s]; + break; + case 11: + i.setDirection("TB"), this.$ = "TB"; + break; + case 12: + i.setDirection(t[s - 1]), this.$ = t[s - 1]; + break; + case 27: + this.$ = t[s - 1].nodes; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + this.$ = []; + break; + case 33: + this.$ = i.addSubGraph(t[s - 6], t[s - 1], t[s - 4]); + break; + case 34: + this.$ = i.addSubGraph(t[s - 3], t[s - 1], t[s - 3]); + break; + case 35: + this.$ = i.addSubGraph(void 0, t[s - 1], void 0); + break; + case 37: + this.$ = t[s].trim(), i.setAccTitle(this.$); + break; + case 38: + case 39: + this.$ = t[s].trim(), i.setAccDescription(this.$); + break; + case 43: + i.addLink(t[s - 2].stmt, t[s], t[s - 1]), this.$ = { stmt: t[s], nodes: t[s].concat(t[s - 2].nodes) }; + break; + case 44: + i.addLink(t[s - 3].stmt, t[s - 1], t[s - 2]), this.$ = { stmt: t[s - 1], nodes: t[s - 1].concat(t[s - 3].nodes) }; + break; + case 45: + this.$ = { stmt: t[s - 1], nodes: t[s - 1] }; + break; + case 46: + this.$ = { stmt: t[s], nodes: t[s] }; + break; + case 47: + this.$ = [t[s]]; + break; + case 48: + this.$ = t[s - 4].concat(t[s]); + break; + case 49: + this.$ = t[s]; + break; + case 50: + this.$ = t[s - 2], i.setClass(t[s - 2], t[s]); + break; + case 51: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "square"); + break; + case 52: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "doublecircle"); + break; + case 53: + this.$ = t[s - 5], i.addVertex(t[s - 5], t[s - 2], "circle"); + break; + case 54: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "ellipse"); + break; + case 55: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "stadium"); + break; + case 56: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "subroutine"); + break; + case 57: + this.$ = t[s - 7], i.addVertex(t[s - 7], t[s - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[t[s - 5], t[s - 3]]])); + break; + case 58: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "cylinder"); + break; + case 59: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "round"); + break; + case 60: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "diamond"); + break; + case 61: + this.$ = t[s - 5], i.addVertex(t[s - 5], t[s - 2], "hexagon"); + break; + case 62: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "odd"); + break; + case 63: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "trapezoid"); + break; + case 64: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "inv_trapezoid"); + break; + case 65: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "lean_right"); + break; + case 66: + this.$ = t[s - 3], i.addVertex(t[s - 3], t[s - 1], "lean_left"); + break; + case 67: + this.$ = t[s], i.addVertex(t[s]); + break; + case 68: + t[s - 1].text = t[s], this.$ = t[s - 1]; + break; + case 69: + case 70: + t[s - 2].text = t[s - 1], this.$ = t[s - 2]; + break; + case 71: + this.$ = t[s]; + break; + case 72: + var j = i.destructLink(t[s], t[s - 2]); + this.$ = { type: j.type, stroke: j.stroke, length: j.length, text: t[s - 1] }; + break; + case 73: + this.$ = { text: t[s], type: "text" }; + break; + case 74: + this.$ = { text: t[s - 1].text + "" + t[s], type: t[s - 1].type }; + break; + case 75: + this.$ = { text: t[s], type: "string" }; + break; + case 76: + this.$ = { text: t[s], type: "markdown" }; + break; + case 77: + var j = i.destructLink(t[s]); + this.$ = { type: j.type, stroke: j.stroke, length: j.length }; + break; + case 78: + this.$ = t[s - 1]; + break; + case 79: + this.$ = { text: t[s], type: "text" }; + break; + case 80: + this.$ = { text: t[s - 1].text + "" + t[s], type: t[s - 1].type }; + break; + case 81: + this.$ = { text: t[s], type: "string" }; + break; + case 82: + case 97: + this.$ = { text: t[s], type: "markdown" }; + break; + case 94: + this.$ = { text: t[s], type: "text" }; + break; + case 95: + this.$ = { text: t[s - 1].text + "" + t[s], type: t[s - 1].type }; + break; + case 96: + this.$ = { text: t[s], type: "text" }; + break; + case 98: + this.$ = t[s - 4], i.addClass(t[s - 2], t[s]); + break; + case 99: + this.$ = t[s - 4], i.setClass(t[s - 2], t[s]); + break; + case 100: + case 108: + this.$ = t[s - 1], i.setClickEvent(t[s - 1], t[s]); + break; + case 101: + case 109: + this.$ = t[s - 3], i.setClickEvent(t[s - 3], t[s - 2]), i.setTooltip(t[s - 3], t[s]); + break; + case 102: + this.$ = t[s - 2], i.setClickEvent(t[s - 2], t[s - 1], t[s]); + break; + case 103: + this.$ = t[s - 4], i.setClickEvent(t[s - 4], t[s - 3], t[s - 2]), i.setTooltip(t[s - 4], t[s]); + break; + case 104: + this.$ = t[s - 2], i.setLink(t[s - 2], t[s]); + break; + case 105: + this.$ = t[s - 4], i.setLink(t[s - 4], t[s - 2]), i.setTooltip(t[s - 4], t[s]); + break; + case 106: + this.$ = t[s - 4], i.setLink(t[s - 4], t[s - 2], t[s]); + break; + case 107: + this.$ = t[s - 6], i.setLink(t[s - 6], t[s - 4], t[s]), i.setTooltip(t[s - 6], t[s - 2]); + break; + case 110: + this.$ = t[s - 1], i.setLink(t[s - 1], t[s]); + break; + case 111: + this.$ = t[s - 3], i.setLink(t[s - 3], t[s - 2]), i.setTooltip(t[s - 3], t[s]); + break; + case 112: + this.$ = t[s - 3], i.setLink(t[s - 3], t[s - 2], t[s]); + break; + case 113: + this.$ = t[s - 5], i.setLink(t[s - 5], t[s - 4], t[s]), i.setTooltip(t[s - 5], t[s - 2]); + break; + case 114: + this.$ = t[s - 4], i.addVertex(t[s - 2], void 0, void 0, t[s]); + break; + case 115: + this.$ = t[s - 4], i.updateLink([t[s - 2]], t[s]); + break; + case 116: + this.$ = t[s - 4], i.updateLink(t[s - 2], t[s]); + break; + case 117: + this.$ = t[s - 8], i.updateLinkInterpolate([t[s - 6]], t[s - 2]), i.updateLink([t[s - 6]], t[s]); + break; + case 118: + this.$ = t[s - 8], i.updateLinkInterpolate(t[s - 6], t[s - 2]), i.updateLink(t[s - 6], t[s]); + break; + case 119: + this.$ = t[s - 6], i.updateLinkInterpolate([t[s - 4]], t[s]); + break; + case 120: + this.$ = t[s - 6], i.updateLinkInterpolate(t[s - 4], t[s]); + break; + case 121: + case 123: + this.$ = [t[s]]; + break; + case 122: + case 124: + t[s - 2].push(t[s]), this.$ = t[s - 2]; + break; + case 126: + this.$ = t[s - 1] + t[s]; + break; + case 174: + this.$ = t[s]; + break; + case 175: + this.$ = t[s - 1] + "" + t[s]; + break; + case 177: + this.$ = t[s - 1] + "" + t[s]; + break; + case 178: + this.$ = { stmt: "dir", value: "TB" }; + break; + case 179: + this.$ = { stmt: "dir", value: "BT" }; + break; + case 180: + this.$ = { stmt: "dir", value: "RL" }; + break; + case 181: + this.$ = { stmt: "dir", value: "LR" }; + break; + } + }, + table: [{ 3: 1, 4: 2, 9: u, 10: n, 12: r }, { 1: [3] }, e(c, f, { 5: 6 }), { 4: 7, 9: u, 10: n, 12: r }, { 4: 8, 9: u, 10: n, 12: r }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: o, 9: U, 10: F, 11: O, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: z, 33: 24, 34: c1, 36: f1, 38: p1, 40: 28, 41: 38, 42: S, 43: 39, 45: 40, 58: k, 81: l1, 82: w1, 83: U1, 84: G1, 85: M1, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R, 118: K1, 119: j1, 120: Y1, 121: X1 }, e(c, [2, 9]), e(c, [2, 10]), e(c, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: v1, 15: 53, 18: 56 }, e(b, [2, 3]), e(b, [2, 4]), e(b, [2, 5]), e(b, [2, 6]), e(b, [2, 7]), e(b, [2, 8]), { 8: Q, 9: W, 11: q, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: Q, 9: W, 11: q, 21: 66 }, { 8: Q, 9: W, 11: q, 21: 67 }, { 8: Q, 9: W, 11: q, 21: 68 }, { 8: Q, 9: W, 11: q, 21: 69 }, { 8: Q, 9: W, 11: q, 21: 70 }, { 8: Q, 9: W, 10: [1, 71], 11: q, 21: 72 }, e(b, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, e(b, [2, 39]), e(z1, [2, 46], { 18: 75, 10: v1 }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: k1, 42: b1, 58: g1, 77: [1, 83], 86: D1, 92: [1, 80], 94: [1, 81], 98: 82, 102: F1, 103: T1, 106: C1, 108: S1, 111: _1, 112: B1, 113: x1, 117: 84 }, e(b, [2, 178]), e(b, [2, 179]), e(b, [2, 180]), e(b, [2, 181]), e(H1, [2, 47]), e(H1, [2, 49], { 44: [1, 96] }), e(N, [2, 67], { 110: 109, 29: [1, 97], 42: S, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: k, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 111: v, 112: I, 113: R }), e(M, [2, 174]), e(M, [2, 135]), e(M, [2, 136]), e(M, [2, 137]), e(M, [2, 138]), e(M, [2, 139]), e(M, [2, 140]), e(M, [2, 141]), e(M, [2, 142]), e(M, [2, 143]), e(M, [2, 144]), e(M, [2, 145]), e(c, [2, 12]), e(c, [2, 18]), e(c, [2, 19]), { 9: [1, 110] }, e(Et, [2, 26], { 18: 111, 10: v1 }), e(b, [2, 27]), { 40: 112, 41: 38, 42: S, 43: 39, 45: 40, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R }, e(b, [2, 40]), e(b, [2, 41]), e(b, [2, 42]), e(I1, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: kt, 116: bt }, e([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), e(b, [2, 28]), e(b, [2, 29]), e(b, [2, 30]), e(b, [2, 31]), e(b, [2, 32]), { 10: gt, 12: Dt, 14: Ft, 27: Tt, 28: 122, 32: Ct, 42: St, 58: _t, 73: Bt, 77: [1, 124], 78: [1, 125], 80: 135, 81: xt, 82: yt, 83: mt, 84: Vt, 85: Lt, 86: vt, 87: It, 88: 123, 102: Rt, 106: Nt, 108: Ot, 111: Pt, 112: wt, 113: Ut }, e(ut, f, { 5: 148 }), e(b, [2, 37]), e(b, [2, 38]), e(z1, [2, 45], { 42: Gt }), { 42: S, 45: 150, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: S, 45: 154, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R }, { 42: S, 45: 155, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R }, e(T, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, e(T, [2, 108], { 117: 160, 10: [1, 159], 14: k1, 42: b1, 58: g1, 86: D1, 102: F1, 103: T1, 106: C1, 108: S1, 111: _1, 112: B1, 113: x1 }), e(T, [2, 110], { 10: [1, 161] }), e(K, [2, 176]), e(K, [2, 163]), e(K, [2, 164]), e(K, [2, 165]), e(K, [2, 166]), e(K, [2, 167]), e(K, [2, 168]), e(K, [2, 169]), e(K, [2, 170]), e(K, [2, 171]), e(K, [2, 172]), e(K, [2, 173]), { 42: S, 45: 162, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R }, { 30: 163, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 171, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 173, 48: [1, 172], 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 174, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 175, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 176, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 106: [1, 177] }, { 30: 178, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 179, 63: [1, 180], 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 181, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 182, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 30: 183, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, e(M, [2, 175]), e(c, [2, 20]), e(Et, [2, 25]), e(z1, [2, 43], { 18: 184, 10: v1 }), e(I1, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 75: [1, 188], 76: 189, 113: kt, 116: bt }, e(y1, [2, 73]), e(y1, [2, 75]), e(y1, [2, 76]), e(y1, [2, 161]), e(y1, [2, 162]), { 8: Q, 9: W, 10: gt, 11: q, 12: Dt, 14: Ft, 21: 191, 27: Tt, 29: [1, 190], 32: Ct, 42: St, 58: _t, 73: Bt, 80: 135, 81: xt, 82: yt, 83: mt, 84: Vt, 85: Lt, 86: vt, 87: It, 88: 192, 102: Rt, 106: Nt, 108: Ot, 111: Pt, 112: wt, 113: Ut }, e(g, [2, 94]), e(g, [2, 96]), e(g, [2, 97]), e(g, [2, 150]), e(g, [2, 151]), e(g, [2, 152]), e(g, [2, 153]), e(g, [2, 154]), e(g, [2, 155]), e(g, [2, 156]), e(g, [2, 157]), e(g, [2, 158]), e(g, [2, 159]), e(g, [2, 160]), e(g, [2, 83]), e(g, [2, 84]), e(g, [2, 85]), e(g, [2, 86]), e(g, [2, 87]), e(g, [2, 88]), e(g, [2, 89]), e(g, [2, 90]), e(g, [2, 91]), e(g, [2, 92]), e(g, [2, 93]), { 6: 11, 7: 12, 8: o, 9: U, 10: F, 11: O, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: z, 32: [1, 193], 33: 24, 34: c1, 36: f1, 38: p1, 40: 28, 41: 38, 42: S, 43: 39, 45: 40, 58: k, 81: l1, 82: w1, 83: U1, 84: G1, 85: M1, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R, 118: K1, 119: j1, 120: Y1, 121: X1 }, { 10: v1, 18: 194 }, { 10: [1, 195], 42: S, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 109, 111: v, 112: I, 113: R }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, e(Mt, [2, 121]), { 10: [1, 199], 42: S, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 109, 111: v, 112: I, 113: R }, { 10: [1, 200], 42: S, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 109, 111: v, 112: I, 113: R }, { 77: [1, 201] }, e(T, [2, 102], { 10: [1, 202] }), e(T, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, e(K, [2, 177]), { 77: [1, 205], 95: [1, 206] }, e(H1, [2, 50], { 110: 109, 42: S, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 111: v, 112: I, 113: R }), { 31: [1, 207], 65: p, 79: 208, 113: d, 114: A, 115: E }, e(o1, [2, 79]), e(o1, [2, 81]), e(o1, [2, 82]), e(o1, [2, 146]), e(o1, [2, 147]), e(o1, [2, 148]), e(o1, [2, 149]), { 47: [1, 209], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 30: 210, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 49: [1, 211], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 51: [1, 212], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 53: [1, 213], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 55: [1, 214], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 58: [1, 215] }, { 62: [1, 216], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 64: [1, 217], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 30: 218, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, { 31: [1, 219], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 65: p, 67: [1, 220], 69: [1, 221], 79: 208, 113: d, 114: A, 115: E }, { 65: p, 67: [1, 223], 69: [1, 222], 79: 208, 113: d, 114: A, 115: E }, e(z1, [2, 44], { 42: Gt }), e(I1, [2, 70]), e(I1, [2, 69]), { 60: [1, 224], 65: p, 79: 208, 113: d, 114: A, 115: E }, e(I1, [2, 72]), e(y1, [2, 74]), { 30: 225, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, e(ut, f, { 5: 226 }), e(g, [2, 95]), e(b, [2, 35]), { 41: 227, 42: S, 43: 39, 45: 40, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R }, { 10: Z, 58: J, 81: $, 89: 228, 102: t1, 104: 229, 105: 230, 106: e1, 107: s1, 108: u1, 109: n1 }, { 10: Z, 58: J, 81: $, 89: 239, 101: [1, 240], 102: t1, 104: 229, 105: 230, 106: e1, 107: s1, 108: u1, 109: n1 }, { 10: Z, 58: J, 81: $, 89: 241, 101: [1, 242], 102: t1, 104: 229, 105: 230, 106: e1, 107: s1, 108: u1, 109: n1 }, { 102: [1, 243] }, { 10: Z, 58: J, 81: $, 89: 244, 102: t1, 104: 229, 105: 230, 106: e1, 107: s1, 108: u1, 109: n1 }, { 42: S, 45: 245, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R }, e(T, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, e(T, [2, 109]), e(T, [2, 111], { 10: [1, 249] }), e(T, [2, 112]), e(N, [2, 51]), e(o1, [2, 80]), e(N, [2, 52]), { 49: [1, 250], 65: p, 79: 208, 113: d, 114: A, 115: E }, e(N, [2, 59]), e(N, [2, 54]), e(N, [2, 55]), e(N, [2, 56]), { 106: [1, 251] }, e(N, [2, 58]), e(N, [2, 60]), { 64: [1, 252], 65: p, 79: 208, 113: d, 114: A, 115: E }, e(N, [2, 62]), e(N, [2, 63]), e(N, [2, 65]), e(N, [2, 64]), e(N, [2, 66]), e([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 6: 11, 7: 12, 8: o, 9: U, 10: F, 11: O, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: z, 32: [1, 254], 33: 24, 34: c1, 36: f1, 38: p1, 40: 28, 41: 38, 42: S, 43: 39, 45: 40, 58: k, 81: l1, 82: w1, 83: U1, 84: G1, 85: M1, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R, 118: K1, 119: j1, 120: Y1, 121: X1 }, e(H1, [2, 48]), e(T, [2, 114], { 103: m1 }), e(Kt, [2, 123], { 105: 256, 10: Z, 58: J, 81: $, 102: t1, 106: e1, 107: s1, 108: u1, 109: n1 }), e(H, [2, 125]), e(H, [2, 127]), e(H, [2, 128]), e(H, [2, 129]), e(H, [2, 130]), e(H, [2, 131]), e(H, [2, 132]), e(H, [2, 133]), e(H, [2, 134]), e(T, [2, 115], { 103: m1 }), { 10: [1, 257] }, e(T, [2, 116], { 103: m1 }), { 10: [1, 258] }, e(Mt, [2, 122]), e(T, [2, 98], { 103: m1 }), e(T, [2, 99], { 110: 109, 42: S, 58: k, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 111: v, 112: I, 113: R }), e(T, [2, 103]), e(T, [2, 105], { 10: [1, 259] }), e(T, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: Q, 9: W, 11: q, 21: 264 }, e(b, [2, 34]), { 10: Z, 58: J, 81: $, 102: t1, 104: 265, 105: 230, 106: e1, 107: s1, 108: u1, 109: n1 }, e(H, [2, 126]), { 14: k1, 42: b1, 58: g1, 86: D1, 98: 266, 102: F1, 103: T1, 106: C1, 108: S1, 111: _1, 112: B1, 113: x1, 117: 84 }, { 14: k1, 42: b1, 58: g1, 86: D1, 98: 267, 102: F1, 103: T1, 106: C1, 108: S1, 111: _1, 112: B1, 113: x1, 117: 84 }, { 95: [1, 268] }, e(T, [2, 113]), e(N, [2, 53]), { 30: 269, 65: p, 77: P, 78: w, 79: 164, 113: d, 114: A, 115: E }, e(N, [2, 61]), e(ut, f, { 5: 270 }), e(Kt, [2, 124], { 105: 256, 10: Z, 58: J, 81: $, 102: t1, 106: e1, 107: s1, 108: u1, 109: n1 }), e(T, [2, 119], { 117: 160, 10: [1, 271], 14: k1, 42: b1, 58: g1, 86: D1, 102: F1, 103: T1, 106: C1, 108: S1, 111: _1, 112: B1, 113: x1 }), e(T, [2, 120], { 117: 160, 10: [1, 272], 14: k1, 42: b1, 58: g1, 86: D1, 102: F1, 103: T1, 106: C1, 108: S1, 111: _1, 112: B1, 113: x1 }), e(T, [2, 107]), { 31: [1, 273], 65: p, 79: 208, 113: d, 114: A, 115: E }, { 6: 11, 7: 12, 8: o, 9: U, 10: F, 11: O, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: z, 32: [1, 274], 33: 24, 34: c1, 36: f1, 38: p1, 40: 28, 41: 38, 42: S, 43: 39, 45: 40, 58: k, 81: l1, 82: w1, 83: U1, 84: G1, 85: M1, 86: B, 99: x, 102: y, 103: m, 106: V, 108: L, 110: 41, 111: v, 112: I, 113: R, 118: K1, 119: j1, 120: Y1, 121: X1 }, { 10: Z, 58: J, 81: $, 89: 275, 102: t1, 104: 229, 105: 230, 106: e1, 107: s1, 108: u1, 109: n1 }, { 10: Z, 58: J, 81: $, 89: 276, 102: t1, 104: 229, 105: 230, 106: e1, 107: s1, 108: u1, 109: n1 }, e(N, [2, 57]), e(b, [2, 33]), e(T, [2, 117], { 103: m1 }), e(T, [2, 118], { 103: m1 })], + defaultActions: {}, + parseError: function(a, l) { + if (l.recoverable) + this.trace(a); + else { + var h = new Error(a); + throw h.hash = l, h; + } + }, + parse: function(a) { + var l = this, h = [0], i = [], C = [null], t = [], R1 = this.table, s = "", j = 0, jt = 0, Se = 2, Yt = 1, _e = t.slice.call(arguments, 1), _ = Object.create(this.lexer), d1 = { yy: {} }; + for (var rt in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, rt) && (d1.yy[rt] = this.yy[rt]); + _.setInput(a, d1.yy), d1.yy.lexer = _, d1.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {}); + var at = _.yylloc; + t.push(at); + var Be = _.options && _.options.ranges; + typeof d1.yy.parseError == "function" ? this.parseError = d1.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function xe() { + var r1; + return r1 = i.pop() || _.lex() || Yt, typeof r1 != "number" && (r1 instanceof Array && (i = r1, r1 = i.pop()), r1 = l.symbols_[r1] || r1), r1; + } + for (var G, A1, Y, ct, V1 = {}, Q1, i1, Xt, W1; ; ) { + if (A1 = h[h.length - 1], this.defaultActions[A1] ? Y = this.defaultActions[A1] : ((G === null || typeof G > "u") && (G = xe()), Y = R1[A1] && R1[A1][G]), typeof Y > "u" || !Y.length || !Y[0]) { + var lt = ""; + W1 = []; + for (Q1 in R1[A1]) + this.terminals_[Q1] && Q1 > Se && W1.push("'" + this.terminals_[Q1] + "'"); + _.showPosition ? lt = "Parse error on line " + (j + 1) + `: +` + _.showPosition() + ` +Expecting ` + W1.join(", ") + ", got '" + (this.terminals_[G] || G) + "'" : lt = "Parse error on line " + (j + 1) + ": Unexpected " + (G == Yt ? "end of input" : "'" + (this.terminals_[G] || G) + "'"), this.parseError(lt, { + text: _.match, + token: this.terminals_[G] || G, + line: _.yylineno, + loc: at, + expected: W1 + }); + } + if (Y[0] instanceof Array && Y.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + A1 + ", token: " + G); + switch (Y[0]) { + case 1: + h.push(G), C.push(_.yytext), t.push(_.yylloc), h.push(Y[1]), G = null, jt = _.yyleng, s = _.yytext, j = _.yylineno, at = _.yylloc; + break; + case 2: + if (i1 = this.productions_[Y[1]][1], V1.$ = C[C.length - i1], V1._$ = { + first_line: t[t.length - (i1 || 1)].first_line, + last_line: t[t.length - 1].last_line, + first_column: t[t.length - (i1 || 1)].first_column, + last_column: t[t.length - 1].last_column + }, Be && (V1._$.range = [ + t[t.length - (i1 || 1)].range[0], + t[t.length - 1].range[1] + ]), ct = this.performAction.apply(V1, [ + s, + jt, + j, + d1.yy, + Y[1], + C, + t + ].concat(_e)), typeof ct < "u") + return ct; + i1 && (h = h.slice(0, -1 * i1 * 2), C = C.slice(0, -1 * i1), t = t.slice(0, -1 * i1)), h.push(this.productions_[Y[1]][0]), C.push(V1.$), t.push(V1._$), Xt = R1[h[h.length - 2]][h[h.length - 1]], h.push(Xt); + break; + case 3: + return !0; + } + } + return !0; + } + }, Ce = function() { + var h1 = { + EOF: 1, + parseError: function(l, h) { + if (this.yy.parser) + this.yy.parser.parseError(l, h); + else + throw new Error(l); + }, + // resets the lexer, sets new input + setInput: function(a, l) { + return this.yy = l || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var a = this._input[0]; + this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a; + var l = a.match(/(?:\r\n?|\n).*/g); + return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a; + }, + // unshifts one char (or a string) into the input + unput: function(a) { + var l = a.length, h = a.split(/(?:\r\n?|\n)/g); + this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l; + var i = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1); + var C = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: h ? (h.length === i.length ? this.yylloc.first_column : 0) + i[i.length - h.length].length - h[0].length : this.yylloc.first_column - l + }, this.options.ranges && (this.yylloc.range = [C[0], C[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(a) { + this.unput(this.match.slice(a)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var a = this.matched.substr(0, this.matched.length - this.match.length); + return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var a = this.match; + return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var a = this.pastInput(), l = new Array(a.length + 1).join("-"); + return a + this.upcomingInput() + ` +` + l + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(a, l) { + var h, i, C; + if (this.options.backtrack_lexer && (C = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (C.yylloc.range = this.yylloc.range.slice(0))), i = a[0].match(/(?:\r\n?|\n).*/g), i && (this.yylineno += i.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: i ? i[i.length - 1].length - i[i.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length + }, this.yytext += a[0], this.match += a[0], this.matches = a, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(a[0].length), this.matched += a[0], h = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h) + return h; + if (this._backtrack) { + for (var t in C) + this[t] = C[t]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var a, l, h, i; + this._more || (this.yytext = "", this.match = ""); + for (var C = this._currentRules(), t = 0; t < C.length; t++) + if (h = this._input.match(this.rules[C[t]]), h && (!l || h[0].length > l[0].length)) { + if (l = h, i = t, this.options.backtrack_lexer) { + if (a = this.test_match(h, C[t]), a !== !1) + return a; + if (this._backtrack) { + l = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return l ? (a = this.test_match(l, C[i]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var l = this.next(); + return l || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(l) { + this.conditionStack.push(l); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var l = this.conditionStack.length - 1; + return l > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(l) { + return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(l) { + this.begin(l); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: {}, + performAction: function(l, h, i, C) { + switch (i) { + case 0: + return this.begin("acc_title"), 34; + case 1: + return this.popState(), "acc_title_value"; + case 2: + return this.begin("acc_descr"), 36; + case 3: + return this.popState(), "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + this.begin("callbackname"); + break; + case 8: + this.popState(); + break; + case 9: + this.popState(), this.begin("callbackargs"); + break; + case 10: + return 92; + case 11: + this.popState(); + break; + case 12: + return 93; + case 13: + return "MD_STR"; + case 14: + this.popState(); + break; + case 15: + this.begin("md_string"); + break; + case 16: + return "STR"; + case 17: + this.popState(); + break; + case 18: + this.pushState("string"); + break; + case 19: + return 81; + case 20: + return 99; + case 21: + return 82; + case 22: + return 101; + case 23: + return 83; + case 24: + return 84; + case 25: + return 94; + case 26: + this.begin("click"); + break; + case 27: + this.popState(); + break; + case 28: + return 85; + case 29: + return l.lex.firstGraph() && this.begin("dir"), 12; + case 30: + return l.lex.firstGraph() && this.begin("dir"), 12; + case 31: + return l.lex.firstGraph() && this.begin("dir"), 12; + case 32: + return 27; + case 33: + return 32; + case 34: + return 95; + case 35: + return 95; + case 36: + return 95; + case 37: + return 95; + case 38: + return this.popState(), 13; + case 39: + return this.popState(), 14; + case 40: + return this.popState(), 14; + case 41: + return this.popState(), 14; + case 42: + return this.popState(), 14; + case 43: + return this.popState(), 14; + case 44: + return this.popState(), 14; + case 45: + return this.popState(), 14; + case 46: + return this.popState(), 14; + case 47: + return this.popState(), 14; + case 48: + return this.popState(), 14; + case 49: + return 118; + case 50: + return 119; + case 51: + return 120; + case 52: + return 121; + case 53: + return 102; + case 54: + return 108; + case 55: + return 44; + case 56: + return 58; + case 57: + return 42; + case 58: + return 8; + case 59: + return 103; + case 60: + return 112; + case 61: + return this.popState(), 75; + case 62: + return this.pushState("edgeText"), 73; + case 63: + return 116; + case 64: + return this.popState(), 75; + case 65: + return this.pushState("thickEdgeText"), 73; + case 66: + return 116; + case 67: + return this.popState(), 75; + case 68: + return this.pushState("dottedEdgeText"), 73; + case 69: + return 116; + case 70: + return 75; + case 71: + return this.popState(), 51; + case 72: + return "TEXT"; + case 73: + return this.pushState("ellipseText"), 50; + case 74: + return this.popState(), 53; + case 75: + return this.pushState("text"), 52; + case 76: + return this.popState(), 55; + case 77: + return this.pushState("text"), 54; + case 78: + return 56; + case 79: + return this.pushState("text"), 65; + case 80: + return this.popState(), 62; + case 81: + return this.pushState("text"), 61; + case 82: + return this.popState(), 47; + case 83: + return this.pushState("text"), 46; + case 84: + return this.popState(), 67; + case 85: + return this.popState(), 69; + case 86: + return 114; + case 87: + return this.pushState("trapText"), 66; + case 88: + return this.pushState("trapText"), 68; + case 89: + return 115; + case 90: + return 65; + case 91: + return 87; + case 92: + return "SEP"; + case 93: + return 86; + case 94: + return 112; + case 95: + return 108; + case 96: + return 42; + case 97: + return 106; + case 98: + return 111; + case 99: + return 113; + case 100: + return this.popState(), 60; + case 101: + return this.pushState("text"), 60; + case 102: + return this.popState(), 49; + case 103: + return this.pushState("text"), 48; + case 104: + return this.popState(), 31; + case 105: + return this.pushState("text"), 29; + case 106: + return this.popState(), 64; + case 107: + return this.pushState("text"), 63; + case 108: + return "TEXT"; + case 109: + return "QUOTE"; + case 110: + return 9; + case 111: + return 10; + case 112: + return 11; + } + }, + rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|(?!\)+))/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/], + conditions: { callbackargs: { rules: [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, callbackname: { rules: [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, href: { rules: [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, click: { rules: [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, dottedEdgeText: { rules: [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, thickEdgeText: { rules: [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, edgeText: { rules: [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, trapText: { rules: [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], inclusive: !1 }, ellipseText: { rules: [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, text: { rules: [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], inclusive: !1 }, vertex: { rules: [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, dir: { rules: [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, acc_descr: { rules: [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, acc_title: { rules: [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, md_string: { rules: [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, string: { rules: [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], inclusive: !0 } } + }; + return h1; + }(); + nt.lexer = Ce; + function it() { + this.yy = {}; + } + return it.prototype = nt, nt.Parser = it, new it(); +}(); +ot.parser = ot; +const ze = ot, Pe = "flowchart-"; +let zt = 0, At = ft(), D = {}, E1 = [], L1 = {}, a1 = [], Z1 = {}, J1 = {}, q1 = 0, ht = !0, X, $1, tt = []; +const et = (e) => Oe.sanitizeText(e, At), P1 = function(e) { + const u = Object.keys(D); + for (const n of u) + if (D[n].id === e) + return D[n].domId; + return e; +}, Ht = function(e, u, n, r, c, f, o = {}) { + let U, F = e; + F !== void 0 && F.trim().length !== 0 && (D[F] === void 0 && (D[F] = { + id: F, + labelType: "text", + domId: Pe + F + "-" + zt, + styles: [], + classes: [] + }), zt++, u !== void 0 ? (At = ft(), U = et(u.text.trim()), D[F].labelType = u.type, U[0] === '"' && U[U.length - 1] === '"' && (U = U.substring(1, U.length - 1)), D[F].text = U) : D[F].text === void 0 && (D[F].text = e), n !== void 0 && (D[F].type = n), r != null && r.forEach(function(O) { + D[F].styles.push(O); + }), c != null && c.forEach(function(O) { + D[F].classes.push(O); + }), f !== void 0 && (D[F].dir = f), D[F].props === void 0 ? D[F].props = o : o !== void 0 && Object.assign(D[F].props, o)); +}, Qt = function(e, u, n) { + const f = { start: e, end: u, type: void 0, text: "", labelType: "text" }; + pt.info("abc78 Got edge...", f); + const o = n.text; + o !== void 0 && (f.text = et(o.text.trim()), f.text[0] === '"' && f.text[f.text.length - 1] === '"' && (f.text = f.text.substring(1, f.text.length - 1)), f.labelType = o.type), n !== void 0 && (f.type = n.type, f.stroke = n.stroke, f.length = n.length), E1.push(f); +}, Wt = function(e, u, n) { + pt.info("addLink (abc78)", e, u, n); + let r, c; + for (r = 0; r < e.length; r++) + for (c = 0; c < u.length; c++) + Qt(e[r], u[c], n); +}, qt = function(e, u) { + e.forEach(function(n) { + n === "default" ? E1.defaultInterpolate = u : E1[n].interpolate = u; + }); +}, Zt = function(e, u) { + e.forEach(function(n) { + n === "default" ? E1.defaultStyle = u : (dt.isSubstringInArray("fill", u) === -1 && u.push("fill:none"), E1[n].style = u); + }); +}, Jt = function(e, u) { + e.split(",").forEach(function(n) { + L1[n] === void 0 && (L1[n] = { id: n, styles: [], textStyles: [] }), u != null && u.forEach(function(r) { + if (r.match("color")) { + const c = r.replace("fill", "bgFill").replace("color", "fill"); + L1[n].textStyles.push(c); + } + L1[n].styles.push(r); + }); + }); +}, $t = function(e) { + X = e, X.match(/.*/) && (X = "LR"), X.match(/.*v/) && (X = "TB"), X === "TD" && (X = "TB"); +}, st = function(e, u) { + e.split(",").forEach(function(n) { + let r = n; + D[r] !== void 0 && D[r].classes.push(u), Z1[r] !== void 0 && Z1[r].classes.push(u); + }); +}, we = function(e, u) { + e.split(",").forEach(function(n) { + u !== void 0 && (J1[$1 === "gen-1" ? P1(n) : n] = et(u)); + }); +}, Ue = function(e, u, n) { + let r = P1(e); + if (ft().securityLevel !== "loose" || u === void 0) + return; + let c = []; + if (typeof n == "string") { + c = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let f = 0; f < c.length; f++) { + let o = c[f].trim(); + o.charAt(0) === '"' && o.charAt(o.length - 1) === '"' && (o = o.substr(1, o.length - 2)), c[f] = o; + } + } + c.length === 0 && c.push(e), D[e] !== void 0 && (D[e].haveCallback = !0, tt.push(function() { + const f = document.querySelector(`[id="${r}"]`); + f !== null && f.addEventListener( + "click", + function() { + dt.runFunc(u, ...c); + }, + !1 + ); + })); +}, te = function(e, u, n) { + e.split(",").forEach(function(r) { + D[r] !== void 0 && (D[r].link = dt.formatUrl(u, At), D[r].linkTarget = n); + }), st(e, "clickable"); +}, ee = function(e) { + if (J1.hasOwnProperty(e)) + return J1[e]; +}, se = function(e, u, n) { + e.split(",").forEach(function(r) { + Ue(r, u, n); + }), st(e, "clickable"); +}, ue = function(e) { + tt.forEach(function(u) { + u(e); + }); +}, ne = function() { + return X.trim(); +}, ie = function() { + return D; +}, re = function() { + return E1; +}, ae = function() { + return L1; +}, ce = function(e) { + let u = N1(".mermaidTooltip"); + (u._groups || u)[0][0] === null && (u = N1("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), N1(e).select("svg").selectAll("g.node").on("mouseover", function() { + const c = N1(this); + if (c.attr("title") === null) + return; + const o = this.getBoundingClientRect(); + u.transition().duration(200).style("opacity", ".9"), u.text(c.attr("title")).style("left", window.scrollX + o.left + (o.right - o.left) / 2 + "px").style("top", window.scrollY + o.top - 14 + document.body.scrollTop + "px"), u.html(u.html().replace(/<br\/>/g, "
")), c.classed("hover", !0); + }).on("mouseout", function() { + u.transition().duration(500).style("opacity", 0), N1(this).classed("hover", !1); + }); +}; +tt.push(ce); +const le = function(e = "gen-1") { + D = {}, L1 = {}, E1 = [], tt = [ce], a1 = [], Z1 = {}, q1 = 0, J1 = {}, ht = !0, $1 = e, Ne(); +}, oe = (e) => { + $1 = e || "gen-2"; +}, he = function() { + return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; +}, fe = function(e, u, n) { + let r = e.text.trim(), c = n.text; + e === n && n.text.match(/\s/) && (r = void 0); + function f(z) { + const c1 = { boolean: {}, number: {}, string: {} }, f1 = []; + let p1; + return { nodeList: z.filter(function(k) { + const l1 = typeof k; + return k.stmt && k.stmt === "dir" ? (p1 = k.value, !1) : k.trim() === "" ? !1 : l1 in c1 ? c1[l1].hasOwnProperty(k) ? !1 : c1[l1][k] = !0 : f1.includes(k) ? !1 : f1.push(k); + }), dir: p1 }; + } + let o = []; + const { nodeList: U, dir: F } = f(o.concat.apply(o, u)); + if (o = U, $1 === "gen-1") + for (let z = 0; z < o.length; z++) + o[z] = P1(o[z]); + r = r || "subGraph" + q1, c = c || "", c = et(c), q1 = q1 + 1; + const O = { + id: r, + nodes: o, + title: c.trim(), + classes: [], + dir: F, + labelType: n.type + }; + return pt.info("Adding", O.id, O.nodes, O.dir), O.nodes = Fe(O, a1).nodes, a1.push(O), Z1[r] = O, r; +}, Ge = function(e) { + for (const [u, n] of a1.entries()) + if (n.id === e) + return u; + return -1; +}; +let O1 = -1; +const pe = [], de = function(e, u) { + const n = a1[u].nodes; + if (O1 = O1 + 1, O1 > 2e3) + return; + if (pe[O1] = u, a1[u].id === e) + return { + result: !0, + count: 0 + }; + let r = 0, c = 1; + for (; r < n.length; ) { + const f = Ge(n[r]); + if (f >= 0) { + const o = de(e, f); + if (o.result) + return { + result: !0, + count: c + o.count + }; + c = c + o.count; + } + r = r + 1; + } + return { + result: !1, + count: c + }; +}, Ae = function(e) { + return pe[e]; +}, Ee = function() { + O1 = -1, a1.length > 0 && de("none", a1.length - 1); +}, ke = function() { + return a1; +}, be = () => ht ? (ht = !1, !0) : !1, Me = (e) => { + let u = e.trim(), n = "arrow_open"; + switch (u[0]) { + case "<": + n = "arrow_point", u = u.slice(1); + break; + case "x": + n = "arrow_cross", u = u.slice(1); + break; + case "o": + n = "arrow_circle", u = u.slice(1); + break; + } + let r = "normal"; + return u.includes("=") && (r = "thick"), u.includes(".") && (r = "dotted"), { type: n, stroke: r }; +}, Ke = (e, u) => { + const n = u.length; + let r = 0; + for (let c = 0; c < n; ++c) + u[c] === e && ++r; + return r; +}, je = (e) => { + const u = e.trim(); + let n = u.slice(0, -1), r = "arrow_open"; + switch (u.slice(-1)) { + case "x": + r = "arrow_cross", u[0] === "x" && (r = "double_" + r, n = n.slice(1)); + break; + case ">": + r = "arrow_point", u[0] === "<" && (r = "double_" + r, n = n.slice(1)); + break; + case "o": + r = "arrow_circle", u[0] === "o" && (r = "double_" + r, n = n.slice(1)); + break; + } + let c = "normal", f = n.length - 1; + n[0] === "=" && (c = "thick"), n[0] === "~" && (c = "invisible"); + let o = Ke(".", n); + return o && (c = "dotted", f = o), { type: r, stroke: c, length: f }; +}, ge = (e, u) => { + const n = je(e); + let r; + if (u) { + if (r = Me(u), r.stroke !== n.stroke) + return { type: "INVALID", stroke: "INVALID" }; + if (r.type === "arrow_open") + r.type = n.type; + else { + if (r.type !== n.type) + return { type: "INVALID", stroke: "INVALID" }; + r.type = "double_" + r.type; + } + return r.type === "double_arrow" && (r.type = "double_arrow_point"), r.length = n.length, r; + } + return n; +}, De = (e, u) => { + let n = !1; + return e.forEach((r) => { + r.nodes.indexOf(u) >= 0 && (n = !0); + }), n; +}, Fe = (e, u) => { + const n = []; + return e.nodes.forEach((r, c) => { + De(u, r) || n.push(e.nodes[c]); + }), { nodes: n }; +}, Te = { + firstGraph: be +}, Ye = { + defaultConfig: () => ye.flowchart, + setAccTitle: me, + getAccTitle: Ve, + getAccDescription: Le, + setAccDescription: ve, + addVertex: Ht, + lookUpDomId: P1, + addLink: Wt, + updateLinkInterpolate: qt, + updateLink: Zt, + addClass: Jt, + setDirection: $t, + setClass: st, + setTooltip: we, + getTooltip: ee, + setClickEvent: se, + setLink: te, + bindFunctions: ue, + getDirection: ne, + getVertices: ie, + getEdges: re, + getClasses: ae, + clear: le, + setGen: oe, + defaultStyle: he, + addSubGraph: fe, + getDepthFirstPos: Ae, + indexNodes: Ee, + getSubGraphs: ke, + destructLink: ge, + lex: Te, + exists: De, + makeUniq: Fe, + setDiagramTitle: Ie, + getDiagramTitle: Re +}, He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addClass: Jt, + addLink: Wt, + addSingleLink: Qt, + addSubGraph: fe, + addVertex: Ht, + bindFunctions: ue, + clear: le, + default: Ye, + defaultStyle: he, + destructLink: ge, + firstGraph: be, + getClasses: ae, + getDepthFirstPos: Ae, + getDirection: ne, + getEdges: re, + getSubGraphs: ke, + getTooltip: ee, + getVertices: ie, + indexNodes: Ee, + lex: Te, + lookUpDomId: P1, + setClass: st, + setClickEvent: se, + setDirection: $t, + setGen: oe, + setLink: te, + updateLink: Zt, + updateLinkInterpolate: qt +}, Symbol.toStringTag, { value: "Module" })); +export { + He as d, + Ye as f, + ze as p +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDb-fa1288b0.js b/webroot/js/node_modules/mermaid/dist/flowDb-fa1288b0.js new file mode 100644 index 0000000..dfef3f1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDb-fa1288b0.js @@ -0,0 +1,1694 @@ +import { select } from "d3"; +import { I as defaultConfig, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, q as setDiagramTitle, r as getDiagramTitle, c as getConfig, l as log, u as utils, t as clear$1, e as common } from "./mermaid-0d192ec3.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeperator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "verticeStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" }, + productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + this.$ = []; + break; + case 3: + if (!Array.isArray($$[$0]) || $$[$0].length > 0) { + $$[$0 - 1].push($$[$0]); + } + this.$ = $$[$0 - 1]; + break; + case 4: + case 176: + this.$ = $$[$0]; + break; + case 11: + yy.setDirection("TB"); + this.$ = "TB"; + break; + case 12: + yy.setDirection($$[$0 - 1]); + this.$ = $$[$0 - 1]; + break; + case 27: + this.$ = $$[$0 - 1].nodes; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + this.$ = []; + break; + case 33: + this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); + break; + case 34: + this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); + break; + case 35: + this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); + break; + case 37: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 38: + case 39: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 43: + yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); + this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; + break; + case 44: + yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; + break; + case 45: + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; + break; + case 46: + this.$ = { stmt: $$[$0], nodes: $$[$0] }; + break; + case 47: + this.$ = [$$[$0]]; + break; + case 48: + this.$ = $$[$0 - 4].concat($$[$0]); + break; + case 49: + this.$ = $$[$0]; + break; + case 50: + this.$ = $$[$0 - 2]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 51: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); + break; + case 52: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); + break; + case 53: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); + break; + case 54: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); + break; + case 55: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); + break; + case 56: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); + break; + case 57: + this.$ = $$[$0 - 7]; + yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); + break; + case 58: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); + break; + case 59: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); + break; + case 60: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); + break; + case 61: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); + break; + case 62: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); + break; + case 63: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); + break; + case 64: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); + break; + case 65: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); + break; + case 66: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); + break; + case 67: + this.$ = $$[$0]; + yy.addVertex($$[$0]); + break; + case 68: + $$[$0 - 1].text = $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 69: + case 70: + $$[$0 - 2].text = $$[$0 - 1]; + this.$ = $$[$0 - 2]; + break; + case 71: + this.$ = $$[$0]; + break; + case 72: + var inf = yy.destructLink($$[$0], $$[$0 - 2]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; + break; + case 73: + this.$ = { text: $$[$0], type: "text" }; + break; + case 74: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 75: + this.$ = { text: $$[$0], type: "string" }; + break; + case 76: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 77: + var inf = yy.destructLink($$[$0]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; + break; + case 78: + this.$ = $$[$0 - 1]; + break; + case 79: + this.$ = { text: $$[$0], type: "text" }; + break; + case 80: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 81: + this.$ = { text: $$[$0], type: "string" }; + break; + case 82: + case 97: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 94: + this.$ = { text: $$[$0], type: "text" }; + break; + case 95: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 96: + this.$ = { text: $$[$0], type: "text" }; + break; + case 98: + this.$ = $$[$0 - 4]; + yy.addClass($$[$0 - 2], $$[$0]); + break; + case 99: + this.$ = $$[$0 - 4]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 100: + case 108: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 101: + case 109: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 102: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 103: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 104: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 105: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 106: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 107: + this.$ = $$[$0 - 6]; + yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 111: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 112: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + break; + case 113: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 5], $$[$0 - 2]); + break; + case 114: + this.$ = $$[$0 - 4]; + yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); + break; + case 115: + this.$ = $$[$0 - 4]; + yy.updateLink([$$[$0 - 2]], $$[$0]); + break; + case 116: + this.$ = $$[$0 - 4]; + yy.updateLink($$[$0 - 2], $$[$0]); + break; + case 117: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); + yy.updateLink([$$[$0 - 6]], $$[$0]); + break; + case 118: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); + yy.updateLink($$[$0 - 6], $$[$0]); + break; + case 119: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); + break; + case 120: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); + break; + case 121: + case 123: + this.$ = [$$[$0]]; + break; + case 122: + case 124: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 126: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 174: + this.$ = $$[$0]; + break; + case 175: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 177: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 178: + this.$ = { stmt: "dir", value: "TB" }; + break; + case 179: + this.$ = { stmt: "dir", value: "BT" }; + break; + case 180: + this.$ = { stmt: "dir", value: "RL" }; + break; + case 181: + this.$ = { stmt: "dir", value: "LR" }; + break; + } + }, + table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 34; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 36; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + this.begin("callbackname"); + break; + case 8: + this.popState(); + break; + case 9: + this.popState(); + this.begin("callbackargs"); + break; + case 10: + return 92; + case 11: + this.popState(); + break; + case 12: + return 93; + case 13: + return "MD_STR"; + case 14: + this.popState(); + break; + case 15: + this.begin("md_string"); + break; + case 16: + return "STR"; + case 17: + this.popState(); + break; + case 18: + this.pushState("string"); + break; + case 19: + return 81; + case 20: + return 99; + case 21: + return 82; + case 22: + return 101; + case 23: + return 83; + case 24: + return 84; + case 25: + return 94; + case 26: + this.begin("click"); + break; + case 27: + this.popState(); + break; + case 28: + return 85; + case 29: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 30: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 31: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 32: + return 27; + case 33: + return 32; + case 34: + return 95; + case 35: + return 95; + case 36: + return 95; + case 37: + return 95; + case 38: + this.popState(); + return 13; + case 39: + this.popState(); + return 14; + case 40: + this.popState(); + return 14; + case 41: + this.popState(); + return 14; + case 42: + this.popState(); + return 14; + case 43: + this.popState(); + return 14; + case 44: + this.popState(); + return 14; + case 45: + this.popState(); + return 14; + case 46: + this.popState(); + return 14; + case 47: + this.popState(); + return 14; + case 48: + this.popState(); + return 14; + case 49: + return 118; + case 50: + return 119; + case 51: + return 120; + case 52: + return 121; + case 53: + return 102; + case 54: + return 108; + case 55: + return 44; + case 56: + return 58; + case 57: + return 42; + case 58: + return 8; + case 59: + return 103; + case 60: + return 112; + case 61: + this.popState(); + return 75; + case 62: + this.pushState("edgeText"); + return 73; + case 63: + return 116; + case 64: + this.popState(); + return 75; + case 65: + this.pushState("thickEdgeText"); + return 73; + case 66: + return 116; + case 67: + this.popState(); + return 75; + case 68: + this.pushState("dottedEdgeText"); + return 73; + case 69: + return 116; + case 70: + return 75; + case 71: + this.popState(); + return 51; + case 72: + return "TEXT"; + case 73: + this.pushState("ellipseText"); + return 50; + case 74: + this.popState(); + return 53; + case 75: + this.pushState("text"); + return 52; + case 76: + this.popState(); + return 55; + case 77: + this.pushState("text"); + return 54; + case 78: + return 56; + case 79: + this.pushState("text"); + return 65; + case 80: + this.popState(); + return 62; + case 81: + this.pushState("text"); + return 61; + case 82: + this.popState(); + return 47; + case 83: + this.pushState("text"); + return 46; + case 84: + this.popState(); + return 67; + case 85: + this.popState(); + return 69; + case 86: + return 114; + case 87: + this.pushState("trapText"); + return 66; + case 88: + this.pushState("trapText"); + return 68; + case 89: + return 115; + case 90: + return 65; + case 91: + return 87; + case 92: + return "SEP"; + case 93: + return 86; + case 94: + return 112; + case 95: + return 108; + case 96: + return 42; + case 97: + return 106; + case 98: + return 111; + case 99: + return 113; + case 100: + this.popState(); + return 60; + case 101: + this.pushState("text"); + return 60; + case 102: + this.popState(); + return 49; + case 103: + this.pushState("text"); + return 48; + case 104: + this.popState(); + return 31; + case 105: + this.pushState("text"); + return 29; + case 106: + this.popState(); + return 64; + case 107: + this.pushState("text"); + return 63; + case 108: + return "TEXT"; + case 109: + return "QUOTE"; + case 110: + return 9; + case 111: + return 10; + case 112: + return 11; + } + }, + rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|(?!\)+))/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/], + conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const MERMAID_DOM_ID_PREFIX = "flowchart-"; +let vertexCounter = 0; +let config = getConfig(); +let vertices = {}; +let edges = []; +let classes = {}; +let subGraphs = []; +let subGraphLookup = {}; +let tooltips = {}; +let subCount = 0; +let firstGraphFlag = true; +let direction; +let version; +let funs = []; +const sanitizeText = (txt) => common.sanitizeText(txt, config); +const lookUpDomId = function(id) { + const veritceKeys = Object.keys(vertices); + for (const veritceKey of veritceKeys) { + if (vertices[veritceKey].id === id) { + return vertices[veritceKey].domId; + } + } + return id; +}; +const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { + let txt; + let id = _id; + if (id === void 0) { + return; + } + if (id.trim().length === 0) { + return; + } + if (vertices[id] === void 0) { + vertices[id] = { + id, + labelType: "text", + domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, + styles: [], + classes: [] + }; + } + vertexCounter++; + if (textObj !== void 0) { + config = getConfig(); + txt = sanitizeText(textObj.text.trim()); + vertices[id].labelType = textObj.type; + if (txt[0] === '"' && txt[txt.length - 1] === '"') { + txt = txt.substring(1, txt.length - 1); + } + vertices[id].text = txt; + } else { + if (vertices[id].text === void 0) { + vertices[id].text = _id; + } + } + if (type !== void 0) { + vertices[id].type = type; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + vertices[id].styles.push(s); + }); + } + if (classes2 !== void 0 && classes2 !== null) { + classes2.forEach(function(s) { + vertices[id].classes.push(s); + }); + } + if (dir !== void 0) { + vertices[id].dir = dir; + } + if (vertices[id].props === void 0) { + vertices[id].props = props; + } else if (props !== void 0) { + Object.assign(vertices[id].props, props); + } +}; +const addSingleLink = function(_start, _end, type) { + let start = _start; + let end = _end; + const edge = { start, end, type: void 0, text: "", labelType: "text" }; + log.info("abc78 Got edge...", edge); + const linkTextObj = type.text; + if (linkTextObj !== void 0) { + edge.text = sanitizeText(linkTextObj.text.trim()); + if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { + edge.text = edge.text.substring(1, edge.text.length - 1); + } + edge.labelType = linkTextObj.type; + } + if (type !== void 0) { + edge.type = type.type; + edge.stroke = type.stroke; + edge.length = type.length; + } + edges.push(edge); +}; +const addLink = function(_start, _end, type) { + log.info("addLink (abc78)", _start, _end, type); + let i, j; + for (i = 0; i < _start.length; i++) { + for (j = 0; j < _end.length; j++) { + addSingleLink(_start[i], _end[j], type); + } + } +}; +const updateLinkInterpolate = function(positions, interp) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultInterpolate = interp; + } else { + edges[pos].interpolate = interp; + } + }); +}; +const updateLink = function(positions, style) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultStyle = style; + } else { + if (utils.isSubstringInArray("fill", style) === -1) { + style.push("fill:none"); + } + edges[pos].style = style; + } + }); +}; +const addClass = function(ids, style) { + ids.split(",").forEach(function(id) { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + if (s.match("color")) { + const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); + classes[id].textStyles.push(newStyle); + } + classes[id].styles.push(s); + }); + } + }); +}; +const setDirection = function(dir) { + direction = dir; + if (direction.match(/.*/)) { + direction = "LR"; + } + if (direction.match(/.*v/)) { + direction = "TB"; + } + if (direction === "TD") { + direction = "TB"; + } +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (vertices[id] !== void 0) { + vertices[id].classes.push(className); + } + if (subGraphLookup[id] !== void 0) { + subGraphLookup[id].classes.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + let domId = lookUpDomId(id); + if (getConfig().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + if (vertices[id] !== void 0) { + vertices[id].haveCallback = true; + funs.push(function() { + const elem = document.querySelector(`[id="${domId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const setLink = function(ids, linkStr, target) { + ids.split(",").forEach(function(id) { + if (vertices[id] !== void 0) { + vertices[id].link = utils.formatUrl(linkStr, config); + vertices[id].linkTarget = target; + } + }); + setClass(ids, "clickable"); +}; +const getTooltip = function(id) { + if (tooltips.hasOwnProperty(id)) { + return tooltips[id]; + } + return void 0; +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const getDirection = function() { + return direction.trim(); +}; +const getVertices = function() { + return vertices; +}; +const getEdges = function() { + return edges; +}; +const getClasses = function() { + return classes; +}; +const setupToolTips = function(element) { + let tooltipElem = select(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = select(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = select(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = select(this); + el.classed("hover", false); + }); +}; +funs.push(setupToolTips); +const clear = function(ver = "gen-1") { + vertices = {}; + classes = {}; + edges = []; + funs = [setupToolTips]; + subGraphs = []; + subGraphLookup = {}; + subCount = 0; + tooltips = {}; + firstGraphFlag = true; + version = ver; + clear$1(); +}; +const setGen = (ver) => { + version = ver || "gen-2"; +}; +const defaultStyle = function() { + return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; +}; +const addSubGraph = function(_id, list, _title) { + let id = _id.text.trim(); + let title = _title.text; + if (_id === _title && _title.text.match(/\s/)) { + id = void 0; + } + function uniq(a) { + const prims = { boolean: {}, number: {}, string: {} }; + const objs = []; + let dir2; + const nodeList2 = a.filter(function(item) { + const type = typeof item; + if (item.stmt && item.stmt === "dir") { + dir2 = item.value; + return false; + } + if (item.trim() === "") { + return false; + } + if (type in prims) { + return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; + } else { + return objs.includes(item) ? false : objs.push(item); + } + }); + return { nodeList: nodeList2, dir: dir2 }; + } + let nodeList = []; + const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); + nodeList = nl; + if (version === "gen-1") { + for (let i = 0; i < nodeList.length; i++) { + nodeList[i] = lookUpDomId(nodeList[i]); + } + } + id = id || "subGraph" + subCount; + title = title || ""; + title = sanitizeText(title); + subCount = subCount + 1; + const subGraph = { + id, + nodes: nodeList, + title: title.trim(), + classes: [], + dir, + labelType: _title.type + }; + log.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); + subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; + subGraphs.push(subGraph); + subGraphLookup[id] = subGraph; + return id; +}; +const getPosForId = function(id) { + for (const [i, subGraph] of subGraphs.entries()) { + if (subGraph.id === id) { + return i; + } + } + return -1; +}; +let secCount = -1; +const posCrossRef = []; +const indexNodes2 = function(id, pos) { + const nodes = subGraphs[pos].nodes; + secCount = secCount + 1; + if (secCount > 2e3) { + return; + } + posCrossRef[secCount] = pos; + if (subGraphs[pos].id === id) { + return { + result: true, + count: 0 + }; + } + let count = 0; + let posCount = 1; + while (count < nodes.length) { + const childPos = getPosForId(nodes[count]); + if (childPos >= 0) { + const res = indexNodes2(id, childPos); + if (res.result) { + return { + result: true, + count: posCount + res.count + }; + } else { + posCount = posCount + res.count; + } + } + count = count + 1; + } + return { + result: false, + count: posCount + }; +}; +const getDepthFirstPos = function(pos) { + return posCrossRef[pos]; +}; +const indexNodes = function() { + secCount = -1; + if (subGraphs.length > 0) { + indexNodes2("none", subGraphs.length - 1); + } +}; +const getSubGraphs = function() { + return subGraphs; +}; +const firstGraph = () => { + if (firstGraphFlag) { + firstGraphFlag = false; + return true; + } + return false; +}; +const destructStartLink = (_str) => { + let str = _str.trim(); + let type = "arrow_open"; + switch (str[0]) { + case "<": + type = "arrow_point"; + str = str.slice(1); + break; + case "x": + type = "arrow_cross"; + str = str.slice(1); + break; + case "o": + type = "arrow_circle"; + str = str.slice(1); + break; + } + let stroke = "normal"; + if (str.includes("=")) { + stroke = "thick"; + } + if (str.includes(".")) { + stroke = "dotted"; + } + return { type, stroke }; +}; +const countChar = (char, str) => { + const length = str.length; + let count = 0; + for (let i = 0; i < length; ++i) { + if (str[i] === char) { + ++count; + } + } + return count; +}; +const destructEndLink = (_str) => { + const str = _str.trim(); + let line = str.slice(0, -1); + let type = "arrow_open"; + switch (str.slice(-1)) { + case "x": + type = "arrow_cross"; + if (str[0] === "x") { + type = "double_" + type; + line = line.slice(1); + } + break; + case ">": + type = "arrow_point"; + if (str[0] === "<") { + type = "double_" + type; + line = line.slice(1); + } + break; + case "o": + type = "arrow_circle"; + if (str[0] === "o") { + type = "double_" + type; + line = line.slice(1); + } + break; + } + let stroke = "normal"; + let length = line.length - 1; + if (line[0] === "=") { + stroke = "thick"; + } + if (line[0] === "~") { + stroke = "invisible"; + } + let dots = countChar(".", line); + if (dots) { + stroke = "dotted"; + length = dots; + } + return { type, stroke, length }; +}; +const destructLink = (_str, _startStr) => { + const info = destructEndLink(_str); + let startInfo; + if (_startStr) { + startInfo = destructStartLink(_startStr); + if (startInfo.stroke !== info.stroke) { + return { type: "INVALID", stroke: "INVALID" }; + } + if (startInfo.type === "arrow_open") { + startInfo.type = info.type; + } else { + if (startInfo.type !== info.type) { + return { type: "INVALID", stroke: "INVALID" }; + } + startInfo.type = "double_" + startInfo.type; + } + if (startInfo.type === "double_arrow") { + startInfo.type = "double_arrow_point"; + } + startInfo.length = info.length; + return startInfo; + } + return info; +}; +const exists = (allSgs, _id) => { + let res = false; + allSgs.forEach((sg) => { + const pos = sg.nodes.indexOf(_id); + if (pos >= 0) { + res = true; + } + }); + return res; +}; +const makeUniq = (sg, allSubgraphs) => { + const res = []; + sg.nodes.forEach((_id, pos) => { + if (!exists(allSubgraphs, _id)) { + res.push(sg.nodes[pos]); + } + }); + return { nodes: res }; +}; +const lex = { + firstGraph +}; +const flowDb = { + defaultConfig: () => defaultConfig.flowchart, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + addVertex, + lookUpDomId, + addLink, + updateLinkInterpolate, + updateLink, + addClass, + setDirection, + setClass, + setTooltip, + getTooltip, + setClickEvent, + setLink, + bindFunctions, + getDirection, + getVertices, + getEdges, + getClasses, + clear, + setGen, + defaultStyle, + addSubGraph, + getDepthFirstPos, + indexNodes, + getSubGraphs, + destructLink, + lex, + exists, + makeUniq, + setDiagramTitle, + getDiagramTitle +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addClass, + addLink, + addSingleLink, + addSubGraph, + addVertex, + bindFunctions, + clear, + default: flowDb, + defaultStyle, + destructLink, + firstGraph, + getClasses, + getDepthFirstPos, + getDirection, + getEdges, + getSubGraphs, + getTooltip, + getVertices, + indexNodes, + lex, + lookUpDomId, + setClass, + setClickEvent, + setDirection, + setGen, + setLink, + updateLink, + updateLinkInterpolate +}, Symbol.toStringTag, { value: "Module" })); +export { + db as d, + flowDb as f, + parser$1 as p +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDiagram-2527b41f.js b/webroot/js/node_modules/mermaid/dist/flowDiagram-2527b41f.js new file mode 100644 index 0000000..7a618e3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDiagram-2527b41f.js @@ -0,0 +1,786 @@ +import { p as St, f as $ } from "./flowDb-b820d5dc.js"; +import { h as S, u as Lt, r as Et, p as _t, l as Tt, d as M, f as tt, G as Nt } from "./layout-545b2d5b.js"; +import { j as m, n as P, o as z, p as et, c as J, f as rt, l as R, q as V, r as At } from "./mermaid-e4a58915.js"; +import { a as N, b as at, i as nt, c as _, e as st, d as it, s as Ct, f as It, g as Bt } from "./styles-1a7a9ff9.js"; +import { l as Mt } from "./line-4ba3c4fa.js"; +import "./index-5f5016a9.js"; +import "./edges-020bfa8c.js"; +import "./createText-4be7776a.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +function Dt(r) { + if (!r.ok) + throw new Error(r.status + " " + r.statusText); + return r.text(); +} +function Rt(r, e) { + return fetch(r, e).then(Dt); +} +function Gt(r) { + return (e, t) => Rt(e, t).then((n) => new DOMParser().parseFromString(n, r)); +} +var Pt = Gt("image/svg+xml"), Y = { + normal: Wt, + vee: $t, + undirected: Vt +}; +function Ut(r) { + Y = r; +} +function Wt(r, e, t, n) { + var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]); +} +function $t(r, e, t, n) { + var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]); +} +function Vt(r, e, t, n) { + var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]); +} +function zt(r, e) { + var t = r; + return t.node().appendChild(e.label), N(t, e.labelStyle), t; +} +function Yt(r, e) { + for (var t = r.append("text"), n = Ht(e.label).split(` +`), a = 0; a < n.length; a++) + t.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(n[a]); + return N(t, e.labelStyle), t; +} +function Ht(r) { + for (var e = "", t = !1, n, a = 0; a < r.length; ++a) + if (n = r[a], t) { + switch (n) { + case "n": + e += ` +`; + break; + default: + e += n; + } + t = !1; + } else + n === "\\" ? t = !0 : e += n; + return e; +} +function K(r, e, t) { + var n = e.label, a = r.append("g"); + e.labelType === "svg" ? zt(a, e) : typeof n != "string" || e.labelType === "html" ? at(a, e) : Yt(a, e); + var s = a.node().getBBox(), i; + switch (t) { + case "top": + i = -e.height / 2; + break; + case "bottom": + i = e.height / 2 - s.height; + break; + default: + i = -s.height / 2; + } + return a.attr("transform", "translate(" + -s.width / 2 + "," + i + ")"), a; +} +var H = function(r, e) { + var t = e.nodes().filter(function(s) { + return nt(e, s); + }), n = r.selectAll("g.cluster").data(t, function(s) { + return s; + }); + _(n.exit(), e).style("opacity", 0).remove(); + var a = n.enter().append("g").attr("class", "cluster").attr("id", function(s) { + var i = e.node(s); + return i.id; + }).style("opacity", 0).each(function(s) { + var i = e.node(s), o = m(this); + m(this).append("rect"); + var c = o.append("g").attr("class", "label"); + K(c, i, i.clusterLabelPos); + }); + return n = n.merge(a), n = _(n, e).style("opacity", 1), n.selectAll("rect").each(function(s) { + var i = e.node(s), o = m(this); + N(o, i.style); + }), n; +}; +function Xt(r) { + H = r; +} +let X = function(r, e) { + var t = r.selectAll("g.edgeLabel").data(e.edges(), function(a) { + return st(a); + }).classed("update", !0); + t.exit().remove(), t.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), t = r.selectAll("g.edgeLabel"), t.each(function(a) { + var s = m(this); + s.select(".label").remove(); + var i = e.edge(a), o = K(s, e.edge(a), 0).classed("label", !0), c = o.node().getBBox(); + i.labelId && o.attr("id", i.labelId), S(i, "width") || (i.width = c.width), S(i, "height") || (i.height = c.height); + }); + var n; + return t.exit ? n = t.exit() : n = t.selectAll(null), _(n, e).style("opacity", 0).remove(), t; +}; +function Ft(r) { + X = r; +} +function O(r, e) { + return r.intersect(e); +} +var F = function(r, e, t) { + var n = r.selectAll("g.edgePath").data(e.edges(), function(i) { + return st(i); + }).classed("update", !0), a = Zt(n, e); + Ot(n, e); + var s = n.merge !== void 0 ? n.merge(a) : n; + return _(s, e).style("opacity", 1), s.each(function(i) { + var o = m(this), c = e.edge(i); + c.elem = this, c.id && o.attr("id", c.id), it( + o, + c.class, + (o.classed("update") ? "update " : "") + "edgePath" + ); + }), s.selectAll("path.path").each(function(i) { + var o = e.edge(i); + o.arrowheadId = Lt("arrowhead"); + var c = m(this).attr("marker-end", function() { + return "url(" + Qt(location.href, o.arrowheadId) + ")"; + }).style("fill", "none"); + _(c, e).attr("d", function(d) { + return Jt(e, d); + }), N(c, o.style); + }), s.selectAll("defs *").remove(), s.selectAll("defs").each(function(i) { + var o = e.edge(i), c = t[o.arrowhead]; + c(m(this), o.arrowheadId, o, "arrowhead"); + }), s; +}; +function qt(r) { + F = r; +} +function Qt(r, e) { + var t = r.split("#")[0]; + return t + "#" + e; +} +function Jt(r, e) { + var t = r.edge(e), n = r.node(e.v), a = r.node(e.w), s = t.points.slice(1, t.points.length - 1); + return s.unshift(O(n, s[0])), s.push(O(a, s[s.length - 1])), ot(t, s); +} +function ot(r, e) { + var t = (Mt || Pt.line)().x(function(n) { + return n.x; + }).y(function(n) { + return n.y; + }); + return (t.curve || t.interpolate)(r.curve), t(e); +} +function Kt(r) { + var e = r.getBBox(), t = r.ownerSVGElement.getScreenCTM().inverse().multiply(r.getScreenCTM()).translate(e.width / 2, e.height / 2); + return { x: t.e, y: t.f }; +} +function Zt(r, e) { + var t = r.enter().append("g").attr("class", "edgePath").style("opacity", 0); + return t.append("path").attr("class", "path").attr("d", function(n) { + var a = e.edge(n), s = e.node(n.v).elem, i = Et(a.points.length).map(function() { + return Kt(s); + }); + return ot(a, i); + }), t.append("defs"), t; +} +function Ot(r, e) { + var t = r.exit(); + _(t, e).style("opacity", 0).remove(); +} +var q = function(r, e, t) { + var n = e.nodes().filter(function(i) { + return !nt(e, i); + }), a = r.selectAll("g.node").data(n, function(i) { + return i; + }).classed("update", !0); + a.exit().remove(), a.enter().append("g").attr("class", "node").style("opacity", 0), a = r.selectAll("g.node"), a.each(function(i) { + var o = e.node(i), c = m(this); + it( + c, + o.class, + (c.classed("update") ? "update " : "") + "node" + ), c.select("g.label").remove(); + var d = c.append("g").attr("class", "label"), l = K(d, o), v = t[o.shape], h = _t(l.node().getBBox(), "width", "height"); + o.elem = this, o.id && c.attr("id", o.id), o.labelId && d.attr("id", o.labelId), S(o, "width") && (h.width = o.width), S(o, "height") && (h.height = o.height), h.width += o.paddingLeft + o.paddingRight, h.height += o.paddingTop + o.paddingBottom, d.attr( + "transform", + "translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")" + ); + var u = m(this); + u.select(".label-container").remove(); + var p = v(u, h, o).classed("label-container", !0); + N(p, o.style); + var g = p.node().getBBox(); + o.width = g.width, o.height = g.height; + }); + var s; + return a.exit ? s = a.exit() : s = a.selectAll(null), _(s, e).style("opacity", 0).remove(), a; +}; +function jt(r) { + q = r; +} +function te(r, e) { + var t = r.filter(function() { + return !m(this).classed("update"); + }); + function n(a) { + var s = e.node(a); + return "translate(" + s.x + "," + s.y + ")"; + } + t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n), _(t.selectAll("rect"), e).attr("width", function(a) { + return e.node(a).width; + }).attr("height", function(a) { + return e.node(a).height; + }).attr("x", function(a) { + var s = e.node(a); + return -s.width / 2; + }).attr("y", function(a) { + var s = e.node(a); + return -s.height / 2; + }); +} +function ee(r, e) { + var t = r.filter(function() { + return !m(this).classed("update"); + }); + function n(a) { + var s = e.edge(a); + return S(s, "x") ? "translate(" + s.x + "," + s.y + ")" : ""; + } + t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n); +} +function re(r, e) { + var t = r.filter(function() { + return !m(this).classed("update"); + }); + function n(a) { + var s = e.node(a); + return "translate(" + s.x + "," + s.y + ")"; + } + t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n); +} +function lt(r, e, t, n) { + var a = r.x, s = r.y, i = a - n.x, o = s - n.y, c = Math.sqrt(e * e * o * o + t * t * i * i), d = Math.abs(e * t * i / c); + n.x < a && (d = -d); + var l = Math.abs(e * t * o / c); + return n.y < s && (l = -l), { x: a + d, y: s + l }; +} +function ae(r, e, t) { + return lt(r, e, e, t); +} +function ne(r, e, t, n) { + var a, s, i, o, c, d, l, v, h, u, p, g, f, y, k; + if (a = e.y - r.y, i = r.x - e.x, c = e.x * r.y - r.x * e.y, h = a * t.x + i * t.y + c, u = a * n.x + i * n.y + c, !(h !== 0 && u !== 0 && j(h, u)) && (s = n.y - t.y, o = t.x - n.x, d = n.x * t.y - t.x * n.y, l = s * r.x + o * r.y + d, v = s * e.x + o * e.y + d, !(l !== 0 && v !== 0 && j(l, v)) && (p = a * o - s * i, p !== 0))) + return g = Math.abs(p / 2), f = i * d - o * c, y = f < 0 ? (f - g) / p : (f + g) / p, f = s * c - a * d, k = f < 0 ? (f - g) / p : (f + g) / p, { x: y, y: k }; +} +function j(r, e) { + return r * e > 0; +} +function T(r, e, t) { + var n = r.x, a = r.y, s = [], i = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY; + e.forEach(function(p) { + i = Math.min(i, p.x), o = Math.min(o, p.y); + }); + for (var c = n - r.width / 2 - i, d = a - r.height / 2 - o, l = 0; l < e.length; l++) { + var v = e[l], h = e[l < e.length - 1 ? l + 1 : 0], u = ne( + r, + t, + { x: c + v.x, y: d + v.y }, + { x: c + h.x, y: d + h.y } + ); + u && s.push(u); + } + return s.length ? (s.length > 1 && s.sort(function(p, g) { + var f = p.x - t.x, y = p.y - t.y, k = Math.sqrt(f * f + y * y), I = g.x - t.x, E = g.y - t.y, U = Math.sqrt(I * I + E * E); + return k < U ? -1 : k === U ? 0 : 1; + }), s[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", r), r); +} +function Z(r, e) { + var t = r.x, n = r.y, a = e.x - t, s = e.y - n, i = r.width / 2, o = r.height / 2, c, d; + return Math.abs(s) * i > Math.abs(a) * o ? (s < 0 && (o = -o), c = s === 0 ? 0 : o * a / s, d = o) : (a < 0 && (i = -i), c = i, d = a === 0 ? 0 : i * s / a), { x: t + c, y: n + d }; +} +var Q = { + rect: ie, + ellipse: oe, + circle: le, + diamond: ce +}; +function se(r) { + Q = r; +} +function ie(r, e, t) { + var n = r.insert("rect", ":first-child").attr("rx", t.rx).attr("ry", t.ry).attr("x", -e.width / 2).attr("y", -e.height / 2).attr("width", e.width).attr("height", e.height); + return t.intersect = function(a) { + return Z(t, a); + }, n; +} +function oe(r, e, t) { + var n = e.width / 2, a = e.height / 2, s = r.insert("ellipse", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("rx", n).attr("ry", a); + return t.intersect = function(i) { + return lt(t, n, a, i); + }, s; +} +function le(r, e, t) { + var n = Math.max(e.width, e.height) / 2, a = r.insert("circle", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("r", n); + return t.intersect = function(s) { + return ae(t, n, s); + }, a; +} +function ce(r, e, t) { + var n = e.width * Math.SQRT2 / 2, a = e.height * Math.SQRT2 / 2, s = [ + { x: 0, y: -a }, + { x: -n, y: 0 }, + { x: 0, y: a }, + { x: n, y: 0 } + ], i = r.insert("polygon", ":first-child").attr( + "points", + s.map(function(o) { + return o.x + "," + o.y; + }).join(" ") + ); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function de() { + var r = function(e, t) { + fe(t); + var n = D(e, "output"), a = D(n, "clusters"), s = D(n, "edgePaths"), i = X(D(n, "edgeLabels"), t), o = q(D(n, "nodes"), t, Q); + Tt(t), re(o, t), ee(i, t), F(s, t, Y); + var c = H(a, t); + te(c, t), pe(t); + }; + return r.createNodes = function(e) { + return arguments.length ? (jt(e), r) : q; + }, r.createClusters = function(e) { + return arguments.length ? (Xt(e), r) : H; + }, r.createEdgeLabels = function(e) { + return arguments.length ? (Ft(e), r) : X; + }, r.createEdgePaths = function(e) { + return arguments.length ? (qt(e), r) : F; + }, r.shapes = function(e) { + return arguments.length ? (se(e), r) : Q; + }, r.arrows = function(e) { + return arguments.length ? (Ut(e), r) : Y; + }, r; +} +var he = { + paddingLeft: 10, + paddingRight: 10, + paddingTop: 10, + paddingBottom: 10, + rx: 0, + ry: 0, + shape: "rect" +}, ue = { + arrowhead: "normal", + curve: P +}; +function fe(r) { + r.nodes().forEach(function(e) { + var t = r.node(e); + !S(t, "label") && !r.children(e).length && (t.label = e), S(t, "paddingX") && M(t, { + paddingLeft: t.paddingX, + paddingRight: t.paddingX + }), S(t, "paddingY") && M(t, { + paddingTop: t.paddingY, + paddingBottom: t.paddingY + }), S(t, "padding") && M(t, { + paddingLeft: t.padding, + paddingRight: t.padding, + paddingTop: t.padding, + paddingBottom: t.padding + }), M(t, he), tt(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(n) { + t[n] = Number(t[n]); + }), S(t, "width") && (t._prevWidth = t.width), S(t, "height") && (t._prevHeight = t.height); + }), r.edges().forEach(function(e) { + var t = r.edge(e); + S(t, "label") || (t.label = ""), M(t, ue); + }); +} +function pe(r) { + tt(r.nodes(), function(e) { + var t = r.node(e); + S(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, S(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight; + }); +} +function D(r, e) { + var t = r.select("g." + e); + return t.empty() && (t = r.append("g").attr("class", e)), t; +} +function ct(r, e, t) { + const n = e.width, a = e.height, s = (n + a) * 0.9, i = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ], o = A(r, s, s, i); + return t.intersect = function(c) { + return T(t, i, c); + }, o; +} +function dt(r, e, t) { + const a = e.height, s = a / 4, i = e.width + 2 * s, o = [ + { x: s, y: 0 }, + { x: i - s, y: 0 }, + { x: i, y: -a / 2 }, + { x: i - s, y: -a }, + { x: s, y: -a }, + { x: 0, y: -a / 2 } + ], c = A(r, i, a, o); + return t.intersect = function(d) { + return T(t, o, d); + }, c; +} +function ht(r, e, t) { + const n = e.width, a = e.height, s = [ + { x: -a / 2, y: 0 }, + { x: n, y: 0 }, + { x: n, y: -a }, + { x: -a / 2, y: -a }, + { x: 0, y: -a / 2 } + ], i = A(r, n, a, s); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function ut(r, e, t) { + const n = e.width, a = e.height, s = [ + { x: -2 * a / 6, y: 0 }, + { x: n - a / 6, y: 0 }, + { x: n + 2 * a / 6, y: -a }, + { x: a / 6, y: -a } + ], i = A(r, n, a, s); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function ft(r, e, t) { + const n = e.width, a = e.height, s = [ + { x: 2 * a / 6, y: 0 }, + { x: n + a / 6, y: 0 }, + { x: n - 2 * a / 6, y: -a }, + { x: -a / 6, y: -a } + ], i = A(r, n, a, s); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function pt(r, e, t) { + const n = e.width, a = e.height, s = [ + { x: -2 * a / 6, y: 0 }, + { x: n + 2 * a / 6, y: 0 }, + { x: n - a / 6, y: -a }, + { x: a / 6, y: -a } + ], i = A(r, n, a, s); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function vt(r, e, t) { + const n = e.width, a = e.height, s = [ + { x: a / 6, y: 0 }, + { x: n - a / 6, y: 0 }, + { x: n + 2 * a / 6, y: -a }, + { x: -2 * a / 6, y: -a } + ], i = A(r, n, a, s); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function yt(r, e, t) { + const n = e.width, a = e.height, s = [ + { x: 0, y: 0 }, + { x: n + a / 2, y: 0 }, + { x: n, y: -a / 2 }, + { x: n + a / 2, y: -a }, + { x: 0, y: -a } + ], i = A(r, n, a, s); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function gt(r, e, t) { + const n = e.height, a = e.width + n / 4, s = r.insert("rect", ":first-child").attr("rx", n / 2).attr("ry", n / 2).attr("x", -a / 2).attr("y", -n / 2).attr("width", a).attr("height", n); + return t.intersect = function(i) { + return Z(t, i); + }, s; +} +function wt(r, e, t) { + const n = e.width, a = e.height, s = [ + { x: 0, y: 0 }, + { x: n, y: 0 }, + { x: n, y: -a }, + { x: 0, y: -a }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: n + 8, y: 0 }, + { x: n + 8, y: -a }, + { x: -8, y: -a }, + { x: -8, y: 0 } + ], i = A(r, n, a, s); + return t.intersect = function(o) { + return T(t, s, o); + }, i; +} +function xt(r, e, t) { + const n = e.width, a = n / 2, s = a / (2.5 + n / 50), i = e.height + s, o = "M 0," + s + " a " + a + "," + s + " 0,0,0 " + n + " 0 a " + a + "," + s + " 0,0,0 " + -n + " 0 l 0," + i + " a " + a + "," + s + " 0,0,0 " + n + " 0 l 0," + -i, c = r.attr("label-offset-y", s).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -n / 2 + "," + -(i / 2 + s) + ")"); + return t.intersect = function(d) { + const l = Z(t, d), v = l.x - t.x; + if (a != 0 && (Math.abs(v) < t.width / 2 || Math.abs(v) == t.width / 2 && Math.abs(l.y - t.y) > t.height / 2 - s)) { + let h = s * s * (1 - v * v / (a * a)); + h != 0 && (h = Math.sqrt(h)), h = s - h, d.y - t.y > 0 && (h = -h), l.y += h; + } + return l; + }, c; +} +function ve(r) { + r.shapes().question = ct, r.shapes().hexagon = dt, r.shapes().stadium = gt, r.shapes().subroutine = wt, r.shapes().cylinder = xt, r.shapes().rect_left_inv_arrow = ht, r.shapes().lean_right = ut, r.shapes().lean_left = ft, r.shapes().trapezoid = pt, r.shapes().inv_trapezoid = vt, r.shapes().rect_right_inv_arrow = yt; +} +function ye(r) { + r({ question: ct }), r({ hexagon: dt }), r({ stadium: gt }), r({ subroutine: wt }), r({ cylinder: xt }), r({ rect_left_inv_arrow: ht }), r({ lean_right: ut }), r({ lean_left: ft }), r({ trapezoid: pt }), r({ inv_trapezoid: vt }), r({ rect_right_inv_arrow: yt }); +} +function A(r, e, t, n) { + return r.insert("polygon", ":first-child").attr( + "points", + n.map(function(a) { + return a.x + "," + a.y; + }).join(" ") + ).attr("transform", "translate(" + -e / 2 + "," + t / 2 + ")"); +} +const ge = { + addToRender: ve, + addToRenderV2: ye +}, mt = {}, we = function(r) { + const e = Object.keys(r); + for (const t of e) + mt[t] = r[t]; +}, bt = function(r, e, t, n, a, s) { + const i = n ? n.select(`[id="${t}"]`) : m(`[id="${t}"]`), o = a || document; + Object.keys(r).forEach(function(d) { + const l = r[d]; + let v = "default"; + l.classes.length > 0 && (v = l.classes.join(" ")); + const h = z(l.styles); + let u = l.text !== void 0 ? l.text : l.id, p; + if (et(J().flowchart.htmlLabels)) { + const y = { + label: u.replace( + /fa[blrs]?:fa-[\w-]+/g, + (k) => `` + ) + }; + p = at(i, y).node(), p.parentNode.removeChild(p); + } else { + const y = o.createElementNS("http://www.w3.org/2000/svg", "text"); + y.setAttribute("style", h.labelStyle.replace("color:", "fill:")); + const k = u.split(rt.lineBreakRegex); + for (const I of k) { + const E = o.createElementNS("http://www.w3.org/2000/svg", "tspan"); + E.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), E.setAttribute("dy", "1em"), E.setAttribute("x", "1"), E.textContent = I, y.appendChild(E); + } + p = y; + } + let g = 0, f = ""; + switch (l.type) { + case "round": + g = 5, f = "rect"; + break; + case "square": + f = "rect"; + break; + case "diamond": + f = "question"; + break; + case "hexagon": + f = "hexagon"; + break; + case "odd": + f = "rect_left_inv_arrow"; + break; + case "lean_right": + f = "lean_right"; + break; + case "lean_left": + f = "lean_left"; + break; + case "trapezoid": + f = "trapezoid"; + break; + case "inv_trapezoid": + f = "inv_trapezoid"; + break; + case "odd_right": + f = "rect_left_inv_arrow"; + break; + case "circle": + f = "circle"; + break; + case "ellipse": + f = "ellipse"; + break; + case "stadium": + f = "stadium"; + break; + case "subroutine": + f = "subroutine"; + break; + case "cylinder": + f = "cylinder"; + break; + case "group": + f = "rect"; + break; + default: + f = "rect"; + } + R.warn("Adding node", l.id, l.domId), e.setNode(s.db.lookUpDomId(l.id), { + labelType: "svg", + labelStyle: h.labelStyle, + shape: f, + label: p, + rx: g, + ry: g, + class: v, + style: h.style, + id: s.db.lookUpDomId(l.id) + }); + }); +}, kt = function(r, e, t) { + let n = 0, a, s; + if (r.defaultStyle !== void 0) { + const i = z(r.defaultStyle); + a = i.style, s = i.labelStyle; + } + r.forEach(function(i) { + n++; + const o = "L-" + i.start + "-" + i.end, c = "LS-" + i.start, d = "LE-" + i.end, l = {}; + i.type === "arrow_open" ? l.arrowhead = "none" : l.arrowhead = "normal"; + let v = "", h = ""; + if (i.style !== void 0) { + const u = z(i.style); + v = u.style, h = u.labelStyle; + } else + switch (i.stroke) { + case "normal": + v = "fill:none", a !== void 0 && (v = a), s !== void 0 && (h = s); + break; + case "dotted": + v = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + v = " stroke-width: 3.5px;fill:none"; + break; + } + l.style = v, l.labelStyle = h, i.interpolate !== void 0 ? l.curve = V(i.interpolate, P) : r.defaultInterpolate !== void 0 ? l.curve = V(r.defaultInterpolate, P) : l.curve = V(mt.curve, P), i.text === void 0 ? i.style !== void 0 && (l.arrowheadStyle = "fill: #333") : (l.arrowheadStyle = "fill: #333", l.labelpos = "c", et(J().flowchart.htmlLabels) ? (l.labelType = "html", l.label = `${i.text.replace( + /fa[blrs]?:fa-[\w-]+/g, + (u) => `` + )}`) : (l.labelType = "text", l.label = i.text.replace(rt.lineBreakRegex, ` +`), i.style === void 0 && (l.style = l.style || "stroke: #333; stroke-width: 1.5px;fill:none"), l.labelStyle = l.labelStyle.replace("color:", "fill:"))), l.id = o, l.class = c + " " + d, l.minlen = i.length || 1, e.setEdge(t.db.lookUpDomId(i.start), t.db.lookUpDomId(i.end), l, n); + }); +}, xe = function(r, e) { + return R.info("Extracting classes"), e.db.getClasses(); +}, me = function(r, e, t, n) { + R.info("Drawing flowchart"); + const { securityLevel: a, flowchart: s } = J(); + let i; + a === "sandbox" && (i = m("#i" + e)); + const o = a === "sandbox" ? m(i.nodes()[0].contentDocument.body) : m("body"), c = a === "sandbox" ? i.nodes()[0].contentDocument : document; + let d = n.db.getDirection(); + d === void 0 && (d = "TD"); + const l = s.nodeSpacing || 50, v = s.rankSpacing || 50, h = new Nt({ + multigraph: !0, + compound: !0 + }).setGraph({ + rankdir: d, + nodesep: l, + ranksep: v, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let u; + const p = n.db.getSubGraphs(); + for (let w = p.length - 1; w >= 0; w--) + u = p[w], n.db.addVertex(u.id, u.title, "group", void 0, u.classes); + const g = n.db.getVertices(); + R.warn("Get vertices", g); + const f = n.db.getEdges(); + let y = 0; + for (y = p.length - 1; y >= 0; y--) { + u = p[y], Ct("cluster").append("text"); + for (let w = 0; w < u.nodes.length; w++) + R.warn( + "Setting subgraph", + u.nodes[w], + n.db.lookUpDomId(u.nodes[w]), + n.db.lookUpDomId(u.id) + ), h.setParent(n.db.lookUpDomId(u.nodes[w]), n.db.lookUpDomId(u.id)); + } + bt(g, h, e, o, c, n), kt(f, h, n); + const k = new de(); + ge.addToRender(k), k.arrows().none = function(b, L, x, B) { + const C = b.append("marker").attr("id", L).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z"); + N(C, x[B + "Style"]); + }, k.arrows().normal = function(b, L) { + b.append("marker").attr("id", L).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + }; + const I = o.select(`[id="${e}"]`), E = o.select("#" + e + " g"); + for (k(E, h), E.selectAll("g.node").attr("title", function() { + return n.db.getTooltip(this.id); + }), n.db.indexNodes("subGraph" + y), y = 0; y < p.length; y++) + if (u = p[y], u.title !== "undefined") { + const w = c.querySelectorAll( + "#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"] rect' + ), b = c.querySelectorAll( + "#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"]' + ), L = w[0].x.baseVal.value, x = w[0].y.baseVal.value, B = w[0].width.baseVal.value, C = m(b[0]).select(".label"); + C.attr("transform", `translate(${L + B / 2}, ${x + 14})`), C.attr("id", e + "Text"); + for (let W = 0; W < u.classes.length; W++) + b[0].classList.add(u.classes[W]); + } + if (!s.htmlLabels) { + const w = c.querySelectorAll('[id="' + e + '"] .edgeLabel .label'); + for (const b of w) { + const L = b.getBBox(), x = c.createElementNS("http://www.w3.org/2000/svg", "rect"); + x.setAttribute("rx", 0), x.setAttribute("ry", 0), x.setAttribute("width", L.width), x.setAttribute("height", L.height), b.insertBefore(x, b.firstChild); + } + } + At(h, I, s.diagramPadding, s.useMaxWidth), Object.keys(g).forEach(function(w) { + const b = g[w]; + if (b.link) { + const L = o.select("#" + e + ' [id="' + n.db.lookUpDomId(w) + '"]'); + if (L) { + const x = c.createElementNS("http://www.w3.org/2000/svg", "a"); + x.setAttributeNS("http://www.w3.org/2000/svg", "class", b.classes.join(" ")), x.setAttributeNS("http://www.w3.org/2000/svg", "href", b.link), x.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), a === "sandbox" ? x.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : b.linkTarget && x.setAttributeNS("http://www.w3.org/2000/svg", "target", b.linkTarget); + const B = L.insert(function() { + return x; + }, ":first-child"), G = L.select(".label-container"); + G && B.append(function() { + return G.node(); + }); + const C = L.select(".label"); + C && B.append(function() { + return C.node(); + }); + } + } + }); +}, be = { + setConf: we, + addVertices: bt, + addEdges: kt, + getClasses: xe, + draw: me +}, Be = { + parser: St, + db: $, + renderer: It, + styles: Bt, + init: (r) => { + r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, be.setConf(r.flowchart), $.clear(), $.setGen("gen-1"); + } +}; +export { + Be as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDiagram-70296b2d.js b/webroot/js/node_modules/mermaid/dist/flowDiagram-70296b2d.js new file mode 100644 index 0000000..83dc10e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDiagram-70296b2d.js @@ -0,0 +1,1267 @@ +import { p as parser$1, f as flowDb } from "./flowDb-af7c12e0.js"; +import { h as has, u as uniqueId, r as range, p as pick, l as layout, d as defaults, f as forEach, G as Graph } from "./layout-a7b9ff07.js"; +import { j as d3select, n as curveLinear, o as getStylesFromArray, p as evaluate, c as getConfig, f as common, l as log, q as interpolateToCurve, r as setupGraphViewbox } from "./mermaid-491db2d9.js"; +import { a as applyStyle, b as addHtmlLabel, i as isSubgraph, c as applyTransition, e as edgeToId, d as applyClass, s as selectAll, f as flowRendererV2, g as flowStyles } from "./styles-f40f6c66.js"; +import { l as line } from "./line-8fd2bd69.js"; +import "./index-cc269c15.js"; +import "./edges-9bf94b2d.js"; +import "./createText-2660bae1.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +function responseText(response) { + if (!response.ok) + throw new Error(response.status + " " + response.statusText); + return response.text(); +} +function text(input, init) { + return fetch(input, init).then(responseText); +} +function parser(type) { + return (input, init) => text(input, init).then((text2) => new DOMParser().parseFromString(text2, type)); +} +var svg = parser("image/svg+xml"); +var arrows = { + normal, + vee, + undirected +}; +function setArrows(value) { + arrows = value; +} +function normal(parent, id, edge, type) { + var marker = parent.append("marker").attr("id", id).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + var path = marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + applyStyle(path, edge[type + "Style"]); + if (edge[type + "Class"]) { + path.attr("class", edge[type + "Class"]); + } +} +function vee(parent, id, edge, type) { + var marker = parent.append("marker").attr("id", id).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + var path = marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + applyStyle(path, edge[type + "Style"]); + if (edge[type + "Class"]) { + path.attr("class", edge[type + "Class"]); + } +} +function undirected(parent, id, edge, type) { + var marker = parent.append("marker").attr("id", id).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + var path = marker.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + applyStyle(path, edge[type + "Style"]); + if (edge[type + "Class"]) { + path.attr("class", edge[type + "Class"]); + } +} +function addSVGLabel(root, node) { + var domNode = root; + domNode.node().appendChild(node.label); + applyStyle(domNode, node.labelStyle); + return domNode; +} +function addTextLabel(root, node) { + var domNode = root.append("text"); + var lines = processEscapeSequences(node.label).split("\n"); + for (var i = 0; i < lines.length; i++) { + domNode.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(lines[i]); + } + applyStyle(domNode, node.labelStyle); + return domNode; +} +function processEscapeSequences(text2) { + var newText = ""; + var escaped = false; + var ch; + for (var i = 0; i < text2.length; ++i) { + ch = text2[i]; + if (escaped) { + switch (ch) { + case "n": + newText += "\n"; + break; + default: + newText += ch; + } + escaped = false; + } else if (ch === "\\") { + escaped = true; + } else { + newText += ch; + } + } + return newText; +} +function addLabel(root, node, location2) { + var label = node.label; + var labelSvg = root.append("g"); + if (node.labelType === "svg") { + addSVGLabel(labelSvg, node); + } else if (typeof label !== "string" || node.labelType === "html") { + addHtmlLabel(labelSvg, node); + } else { + addTextLabel(labelSvg, node); + } + var labelBBox = labelSvg.node().getBBox(); + var y; + switch (location2) { + case "top": + y = -node.height / 2; + break; + case "bottom": + y = node.height / 2 - labelBBox.height; + break; + default: + y = -labelBBox.height / 2; + } + labelSvg.attr("transform", "translate(" + -labelBBox.width / 2 + "," + y + ")"); + return labelSvg; +} +var createClusters = function(selection, g) { + var clusters = g.nodes().filter(function(v) { + return isSubgraph(g, v); + }); + var svgClusters = selection.selectAll("g.cluster").data(clusters, function(v) { + return v; + }); + applyTransition(svgClusters.exit(), g).style("opacity", 0).remove(); + var enterSelection = svgClusters.enter().append("g").attr("class", "cluster").attr("id", function(v) { + var node = g.node(v); + return node.id; + }).style("opacity", 0).each(function(v) { + var node = g.node(v); + var thisGroup = d3select(this); + d3select(this).append("rect"); + var labelGroup = thisGroup.append("g").attr("class", "label"); + addLabel(labelGroup, node, node.clusterLabelPos); + }); + svgClusters = svgClusters.merge(enterSelection); + svgClusters = applyTransition(svgClusters, g).style("opacity", 1); + svgClusters.selectAll("rect").each(function(c) { + var node = g.node(c); + var domCluster = d3select(this); + applyStyle(domCluster, node.style); + }); + return svgClusters; +}; +function setCreateClusters(value) { + createClusters = value; +} +let createEdgeLabels = function(selection, g) { + var svgEdgeLabels = selection.selectAll("g.edgeLabel").data(g.edges(), function(e) { + return edgeToId(e); + }).classed("update", true); + svgEdgeLabels.exit().remove(); + svgEdgeLabels.enter().append("g").classed("edgeLabel", true).style("opacity", 0); + svgEdgeLabels = selection.selectAll("g.edgeLabel"); + svgEdgeLabels.each(function(e) { + var root = d3select(this); + root.select(".label").remove(); + var edge = g.edge(e); + var label = addLabel(root, g.edge(e), 0).classed("label", true); + var bbox = label.node().getBBox(); + if (edge.labelId) { + label.attr("id", edge.labelId); + } + if (!has(edge, "width")) { + edge.width = bbox.width; + } + if (!has(edge, "height")) { + edge.height = bbox.height; + } + }); + var exitSelection; + if (svgEdgeLabels.exit) { + exitSelection = svgEdgeLabels.exit(); + } else { + exitSelection = svgEdgeLabels.selectAll(null); + } + applyTransition(exitSelection, g).style("opacity", 0).remove(); + return svgEdgeLabels; +}; +function setCreateEdgeLabels(value) { + createEdgeLabels = value; +} +function intersectNode(node, point) { + return node.intersect(point); +} +var createEdgePaths = function(selection, g, arrows2) { + var previousPaths = selection.selectAll("g.edgePath").data(g.edges(), function(e) { + return edgeToId(e); + }).classed("update", true); + var newPaths = enter(previousPaths, g); + exit(previousPaths, g); + var svgPaths = previousPaths.merge !== void 0 ? previousPaths.merge(newPaths) : previousPaths; + applyTransition(svgPaths, g).style("opacity", 1); + svgPaths.each(function(e) { + var domEdge = d3select(this); + var edge = g.edge(e); + edge.elem = this; + if (edge.id) { + domEdge.attr("id", edge.id); + } + applyClass( + domEdge, + edge["class"], + (domEdge.classed("update") ? "update " : "") + "edgePath" + ); + }); + svgPaths.selectAll("path.path").each(function(e) { + var edge = g.edge(e); + edge.arrowheadId = uniqueId("arrowhead"); + var domEdge = d3select(this).attr("marker-end", function() { + return "url(" + makeFragmentRef(location.href, edge.arrowheadId) + ")"; + }).style("fill", "none"); + applyTransition(domEdge, g).attr("d", function(e2) { + return calcPoints(g, e2); + }); + applyStyle(domEdge, edge.style); + }); + svgPaths.selectAll("defs *").remove(); + svgPaths.selectAll("defs").each(function(e) { + var edge = g.edge(e); + var arrowhead = arrows2[edge.arrowhead]; + arrowhead(d3select(this), edge.arrowheadId, edge, "arrowhead"); + }); + return svgPaths; +}; +function setCreateEdgePaths(value) { + createEdgePaths = value; +} +function makeFragmentRef(url, fragmentId) { + var baseUrl = url.split("#")[0]; + return baseUrl + "#" + fragmentId; +} +function calcPoints(g, e) { + var edge = g.edge(e); + var tail = g.node(e.v); + var head = g.node(e.w); + var points = edge.points.slice(1, edge.points.length - 1); + points.unshift(intersectNode(tail, points[0])); + points.push(intersectNode(head, points[points.length - 1])); + return createLine(edge, points); +} +function createLine(edge, points) { + var line$1 = (line || svg.line)().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }); + (line$1.curve || line$1.interpolate)(edge.curve); + return line$1(points); +} +function getCoords(elem) { + var bbox = elem.getBBox(); + var matrix = elem.ownerSVGElement.getScreenCTM().inverse().multiply(elem.getScreenCTM()).translate(bbox.width / 2, bbox.height / 2); + return { x: matrix.e, y: matrix.f }; +} +function enter(svgPaths, g) { + var svgPathsEnter = svgPaths.enter().append("g").attr("class", "edgePath").style("opacity", 0); + svgPathsEnter.append("path").attr("class", "path").attr("d", function(e) { + var edge = g.edge(e); + var sourceElem = g.node(e.v).elem; + var points = range(edge.points.length).map(function() { + return getCoords(sourceElem); + }); + return createLine(edge, points); + }); + svgPathsEnter.append("defs"); + return svgPathsEnter; +} +function exit(svgPaths, g) { + var svgPathExit = svgPaths.exit(); + applyTransition(svgPathExit, g).style("opacity", 0).remove(); +} +var createNodes = function(selection, g, shapes2) { + var simpleNodes = g.nodes().filter(function(v) { + return !isSubgraph(g, v); + }); + var svgNodes = selection.selectAll("g.node").data(simpleNodes, function(v) { + return v; + }).classed("update", true); + svgNodes.exit().remove(); + svgNodes.enter().append("g").attr("class", "node").style("opacity", 0); + svgNodes = selection.selectAll("g.node"); + svgNodes.each(function(v) { + var node = g.node(v); + var thisGroup = d3select(this); + applyClass( + thisGroup, + node["class"], + (thisGroup.classed("update") ? "update " : "") + "node" + ); + thisGroup.select("g.label").remove(); + var labelGroup = thisGroup.append("g").attr("class", "label"); + var labelDom = addLabel(labelGroup, node); + var shape = shapes2[node.shape]; + var bbox = pick(labelDom.node().getBBox(), "width", "height"); + node.elem = this; + if (node.id) { + thisGroup.attr("id", node.id); + } + if (node.labelId) { + labelGroup.attr("id", node.labelId); + } + if (has(node, "width")) { + bbox.width = node.width; + } + if (has(node, "height")) { + bbox.height = node.height; + } + bbox.width += node.paddingLeft + node.paddingRight; + bbox.height += node.paddingTop + node.paddingBottom; + labelGroup.attr( + "transform", + "translate(" + (node.paddingLeft - node.paddingRight) / 2 + "," + (node.paddingTop - node.paddingBottom) / 2 + ")" + ); + var root = d3select(this); + root.select(".label-container").remove(); + var shapeSvg = shape(root, bbox, node).classed("label-container", true); + applyStyle(shapeSvg, node.style); + var shapeBBox = shapeSvg.node().getBBox(); + node.width = shapeBBox.width; + node.height = shapeBBox.height; + }); + var exitSelection; + if (svgNodes.exit) { + exitSelection = svgNodes.exit(); + } else { + exitSelection = svgNodes.selectAll(null); + } + applyTransition(exitSelection, g).style("opacity", 0).remove(); + return svgNodes; +}; +function setCreateNodes(value) { + createNodes = value; +} +function positionClusters(selection, g) { + var created = selection.filter(function() { + return !d3select(this).classed("update"); + }); + function translate(v) { + var node = g.node(v); + return "translate(" + node.x + "," + node.y + ")"; + } + created.attr("transform", translate); + applyTransition(selection, g).style("opacity", 1).attr("transform", translate); + applyTransition(created.selectAll("rect"), g).attr("width", function(v) { + return g.node(v).width; + }).attr("height", function(v) { + return g.node(v).height; + }).attr("x", function(v) { + var node = g.node(v); + return -node.width / 2; + }).attr("y", function(v) { + var node = g.node(v); + return -node.height / 2; + }); +} +function positionEdgeLabels(selection, g) { + var created = selection.filter(function() { + return !d3select(this).classed("update"); + }); + function translate(e) { + var edge = g.edge(e); + return has(edge, "x") ? "translate(" + edge.x + "," + edge.y + ")" : ""; + } + created.attr("transform", translate); + applyTransition(selection, g).style("opacity", 1).attr("transform", translate); +} +function positionNodes(selection, g) { + var created = selection.filter(function() { + return !d3select(this).classed("update"); + }); + function translate(v) { + var node = g.node(v); + return "translate(" + node.x + "," + node.y + ")"; + } + created.attr("transform", translate); + applyTransition(selection, g).style("opacity", 1).attr("transform", translate); +} +function intersectEllipse(node, rx, ry, point) { + var cx = node.x; + var cy = node.y; + var px = cx - point.x; + var py = cy - point.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point) { + return intersectEllipse(node, rx, rx, point); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect = intersectLine( + node, + point, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect) { + intersections.push(intersect); + } + } + if (!intersections.length) { + console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", node); + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point.x; + var pdy = p.y - point.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point.x; + var qdy = q.y - point.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +function intersectRect(node, point) { + var x = node.x; + var y = node.y; + var dx = point.x - x; + var dy = point.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +} +var shapes = { + rect, + ellipse, + circle, + diamond +}; +function setShapes(value) { + shapes = value; +} +function rect(parent, bbox, node) { + var shapeSvg = parent.insert("rect", ":first-child").attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2).attr("y", -bbox.height / 2).attr("width", bbox.width).attr("height", bbox.height); + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +} +function ellipse(parent, bbox, node) { + var rx = bbox.width / 2; + var ry = bbox.height / 2; + var shapeSvg = parent.insert("ellipse", ":first-child").attr("x", -bbox.width / 2).attr("y", -bbox.height / 2).attr("rx", rx).attr("ry", ry); + node.intersect = function(point) { + return intersectEllipse(node, rx, ry, point); + }; + return shapeSvg; +} +function circle(parent, bbox, node) { + var r = Math.max(bbox.width, bbox.height) / 2; + var shapeSvg = parent.insert("circle", ":first-child").attr("x", -bbox.width / 2).attr("y", -bbox.height / 2).attr("r", r); + node.intersect = function(point) { + return intersectCircle(node, r, point); + }; + return shapeSvg; +} +function diamond(parent, bbox, node) { + var w = bbox.width * Math.SQRT2 / 2; + var h = bbox.height * Math.SQRT2 / 2; + var points = [ + { x: 0, y: -h }, + { x: -w, y: 0 }, + { x: 0, y: h }, + { x: w, y: 0 } + ]; + var shapeSvg = parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(p) { + return p.x + "," + p.y; + }).join(" ") + ); + node.intersect = function(p) { + return intersectPolygon(node, points, p); + }; + return shapeSvg; +} +function render() { + var fn = function(svg2, g) { + preProcessGraph(g); + var outputGroup = createOrSelectGroup(svg2, "output"); + var clustersGroup = createOrSelectGroup(outputGroup, "clusters"); + var edgePathsGroup = createOrSelectGroup(outputGroup, "edgePaths"); + var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, "edgeLabels"), g); + var nodes = createNodes(createOrSelectGroup(outputGroup, "nodes"), g, shapes); + layout(g); + positionNodes(nodes, g); + positionEdgeLabels(edgeLabels, g); + createEdgePaths(edgePathsGroup, g, arrows); + var clusters = createClusters(clustersGroup, g); + positionClusters(clusters, g); + postProcessGraph(g); + }; + fn.createNodes = function(value) { + if (!arguments.length) + return createNodes; + setCreateNodes(value); + return fn; + }; + fn.createClusters = function(value) { + if (!arguments.length) + return createClusters; + setCreateClusters(value); + return fn; + }; + fn.createEdgeLabels = function(value) { + if (!arguments.length) + return createEdgeLabels; + setCreateEdgeLabels(value); + return fn; + }; + fn.createEdgePaths = function(value) { + if (!arguments.length) + return createEdgePaths; + setCreateEdgePaths(value); + return fn; + }; + fn.shapes = function(value) { + if (!arguments.length) + return shapes; + setShapes(value); + return fn; + }; + fn.arrows = function(value) { + if (!arguments.length) + return arrows; + setArrows(value); + return fn; + }; + return fn; +} +var NODE_DEFAULT_ATTRS = { + paddingLeft: 10, + paddingRight: 10, + paddingTop: 10, + paddingBottom: 10, + rx: 0, + ry: 0, + shape: "rect" +}; +var EDGE_DEFAULT_ATTRS = { + arrowhead: "normal", + curve: curveLinear +}; +function preProcessGraph(g) { + g.nodes().forEach(function(v) { + var node = g.node(v); + if (!has(node, "label") && !g.children(v).length) { + node.label = v; + } + if (has(node, "paddingX")) { + defaults(node, { + paddingLeft: node.paddingX, + paddingRight: node.paddingX + }); + } + if (has(node, "paddingY")) { + defaults(node, { + paddingTop: node.paddingY, + paddingBottom: node.paddingY + }); + } + if (has(node, "padding")) { + defaults(node, { + paddingLeft: node.padding, + paddingRight: node.padding, + paddingTop: node.padding, + paddingBottom: node.padding + }); + } + defaults(node, NODE_DEFAULT_ATTRS); + forEach(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(k) { + node[k] = Number(node[k]); + }); + if (has(node, "width")) { + node._prevWidth = node.width; + } + if (has(node, "height")) { + node._prevHeight = node.height; + } + }); + g.edges().forEach(function(e) { + var edge = g.edge(e); + if (!has(edge, "label")) { + edge.label = ""; + } + defaults(edge, EDGE_DEFAULT_ATTRS); + }); +} +function postProcessGraph(g) { + forEach(g.nodes(), function(v) { + var node = g.node(v); + if (has(node, "_prevWidth")) { + node.width = node._prevWidth; + } else { + delete node.width; + } + if (has(node, "_prevHeight")) { + node.height = node._prevHeight; + } else { + delete node.height; + } + delete node._prevWidth; + delete node._prevHeight; + }); +} +function createOrSelectGroup(root, name) { + var selection = root.select("g." + name); + if (selection.empty()) { + selection = root.append("g").attr("class", name); + } + return selection; +} +function question(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const s = (w + h) * 0.9; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, s, s, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function hexagon(parent, bbox, node) { + const f = 4; + const h = bbox.height; + const m = h / f; + const w = bbox.width + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function rect_left_inv_arrow(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function lean_right(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function lean_left(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function trapezoid(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function inv_trapezoid(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function rect_right_inv_arrow(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function stadium(parent, bbox, node) { + const h = bbox.height; + const w = bbox.width + h / 4; + const shapeSvg = parent.insert("rect", ":first-child").attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +} +function subroutine(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function cylinder(parent, bbox, node) { + const w = bbox.width; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const shapeSvg = parent.attr("label-offset-y", ry).insert("path", ":first-child").attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + node.intersect = function(point) { + const pos = intersectRect(node, point); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +} +function addToRender(render2) { + render2.shapes().question = question; + render2.shapes().hexagon = hexagon; + render2.shapes().stadium = stadium; + render2.shapes().subroutine = subroutine; + render2.shapes().cylinder = cylinder; + render2.shapes().rect_left_inv_arrow = rect_left_inv_arrow; + render2.shapes().lean_right = lean_right; + render2.shapes().lean_left = lean_left; + render2.shapes().trapezoid = trapezoid; + render2.shapes().inv_trapezoid = inv_trapezoid; + render2.shapes().rect_right_inv_arrow = rect_right_inv_arrow; +} +function addToRenderV2(addShape) { + addShape({ question }); + addShape({ hexagon }); + addShape({ stadium }); + addShape({ subroutine }); + addShape({ cylinder }); + addShape({ rect_left_inv_arrow }); + addShape({ lean_right }); + addShape({ lean_left }); + addShape({ trapezoid }); + addShape({ inv_trapezoid }); + addShape({ rect_right_inv_arrow }); +} +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +const flowChartShapes = { + addToRender, + addToRenderV2 +}; +const conf = {}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const addVertices = function(vert, g, svgId, root, _doc, diagObj) { + const svg2 = !root ? d3select(`[id="${svgId}"]`) : root.select(`[id="${svgId}"]`); + const doc = !_doc ? document : _doc; + const keys = Object.keys(vert); + keys.forEach(function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + const styles = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + if (evaluate(getConfig().flowchart.htmlLabels)) { + const node = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = addHtmlLabel(svg2, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(common.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + let radious = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + default: + _shape = "rect"; + } + log.warn("Adding node", vertex.id, vertex.domId); + g.setNode(diagObj.db.lookUpDomId(vertex.id), { + labelType: "svg", + labelStyle: styles.labelStyle, + shape: _shape, + label: vertexNode, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: diagObj.db.lookUpDomId(vertex.id) + }); + }); +}; +const addEdges = function(edges, g, diagObj) { + let cnt = 0; + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + cnt++; + const linkId = "L-" + edge.start + "-" + edge.end; + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = {}; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + let style = ""; + let labelStyle = ""; + if (edge.style !== void 0) { + const styles = getStylesFromArray(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } else { + switch (edge.stroke) { + case "normal": + style = "fill:none"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + break; + case "dotted": + style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + style = " stroke-width: 3.5px;fill:none"; + break; + } + } + edgeData.style = style; + edgeData.labelStyle = labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if (evaluate(getConfig().flowchart.htmlLabels)) { + edgeData.labelType = "html"; + edgeData.label = `${edge.text.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + )}`; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + edgeData.id = linkId; + edgeData.class = linkNameStart + " " + linkNameEnd; + edgeData.minlen = edge.length || 1; + g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt); + }); +}; +const getClasses = function(text2, diagObj) { + log.info("Extracting classes"); + return diagObj.db.getClasses(); +}; +const draw = function(text2, id, _version, diagObj) { + log.info("Drawing flowchart"); + const { securityLevel, flowchart: conf2 } = getConfig(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + let dir = diagObj.db.getDirection(); + if (dir === void 0) { + dir = "TD"; + } + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { + subG = subGraphs[i2]; + diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes); + } + const vert = diagObj.db.getVertices(); + log.warn("Get vertices", vert); + const edges = diagObj.db.getEdges(); + let i = 0; + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + selectAll("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + log.warn( + "Setting subgraph", + subG.nodes[j], + diagObj.db.lookUpDomId(subG.nodes[j]), + diagObj.db.lookUpDomId(subG.id) + ); + g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id)); + } + } + addVertices(vert, g, id, root, doc, diagObj); + addEdges(edges, g, diagObj); + const render$1 = new render(); + flowChartShapes.addToRender(render$1); + render$1.arrows().none = function normal2(parent, id2, edge, type) { + const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + const path = marker.append("path").attr("d", "M 0 0 L 0 0 L 0 0 z"); + applyStyle(path, edge[type + "Style"]); + }; + render$1.arrows().normal = function normal2(parent, id2) { + const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + }; + const svg2 = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + render$1(element, g); + element.selectAll("g.node").attr("title", function() { + return diagObj.db.getTooltip(this.id); + }); + diagObj.db.indexNodes("subGraph" + i); + for (i = 0; i < subGraphs.length; i++) { + subG = subGraphs[i]; + if (subG.title !== "undefined") { + const clusterRects = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect' + ); + const clusterEl = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]' + ); + const xPos = clusterRects[0].x.baseVal.value; + const yPos = clusterRects[0].y.baseVal.value; + const _width = clusterRects[0].width.baseVal.value; + const cluster = d3select(clusterEl[0]); + const te = cluster.select(".label"); + te.attr("transform", `translate(${xPos + _width / 2}, ${yPos + 14})`); + te.attr("id", id + "Text"); + for (let j = 0; j < subG.classes.length; j++) { + clusterEl[0].classList.add(subG.classes[j]); + } + } + } + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect2 = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect2.setAttribute("rx", 0); + rect2.setAttribute("ry", 0); + rect2.setAttribute("width", dim.width); + rect2.setAttribute("height", dim.height); + label.insertBefore(rect2, label.firstChild); + } + } + setupGraphViewbox(g, svg2, conf2.diagramPadding, conf2.useMaxWidth); + const keys = Object.keys(vert); + keys.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node = root.select("#" + id + ' [id="' + diagObj.db.lookUpDomId(key) + '"]'); + if (node) { + const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node.insert(function() { + return link; + }, ":first-child"); + const shape = node.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); +}; +const flowRenderer = { + setConf, + addVertices, + addEdges, + getClasses, + draw +}; +const diagram = { + parser: parser$1, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + flowRenderer.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen("gen-1"); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDiagram-f303bdd6.js b/webroot/js/node_modules/mermaid/dist/flowDiagram-f303bdd6.js new file mode 100644 index 0000000..6d763b7 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDiagram-f303bdd6.js @@ -0,0 +1,606 @@ +import { p as parser, f as flowDb } from "./flowDb-fa1288b0.js"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { select, curveLinear, selectAll } from "d3"; +import { k as getStylesFromArray, m as evaluate, c as getConfig, e as common, l as log, n as interpolateToCurve, o as setupGraphViewbox } from "./mermaid-0d192ec3.js"; +import { render } from "dagre-d3-es"; +import { applyStyle } from "dagre-d3-es/src/dagre-js/util.js"; +import { addHtmlLabel } from "dagre-d3-es/src/dagre-js/label/add-html-label.js"; +import { intersectPolygon } from "dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js"; +import { intersectRect } from "dagre-d3-es/src/dagre-js/intersect/intersect-rect.js"; +import { f as flowRendererV2, a as flowStyles } from "./styles-0671a096.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +import "./index-f9462f3f.js"; +import "dagre-d3-es/src/dagre/index.js"; +import "dagre-d3-es/src/graphlib/json.js"; +import "./edges-f15a7e05.js"; +import "./createText-80c3befb.js"; +import "mdast-util-from-markdown"; +function question(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const s = (w + h) * 0.9; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, s, s, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function hexagon(parent, bbox, node) { + const f = 4; + const h = bbox.height; + const m = h / f; + const w = bbox.width + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function rect_left_inv_arrow(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function lean_right(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function lean_left(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function trapezoid(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function inv_trapezoid(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function rect_right_inv_arrow(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function stadium(parent, bbox, node) { + const h = bbox.height; + const w = bbox.width + h / 4; + const shapeSvg = parent.insert("rect", ":first-child").attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +} +function subroutine(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function cylinder(parent, bbox, node) { + const w = bbox.width; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const shapeSvg = parent.attr("label-offset-y", ry).insert("path", ":first-child").attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + node.intersect = function(point) { + const pos = intersectRect(node, point); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +} +function addToRender(render2) { + render2.shapes().question = question; + render2.shapes().hexagon = hexagon; + render2.shapes().stadium = stadium; + render2.shapes().subroutine = subroutine; + render2.shapes().cylinder = cylinder; + render2.shapes().rect_left_inv_arrow = rect_left_inv_arrow; + render2.shapes().lean_right = lean_right; + render2.shapes().lean_left = lean_left; + render2.shapes().trapezoid = trapezoid; + render2.shapes().inv_trapezoid = inv_trapezoid; + render2.shapes().rect_right_inv_arrow = rect_right_inv_arrow; +} +function addToRenderV2(addShape) { + addShape({ question }); + addShape({ hexagon }); + addShape({ stadium }); + addShape({ subroutine }); + addShape({ cylinder }); + addShape({ rect_left_inv_arrow }); + addShape({ lean_right }); + addShape({ lean_left }); + addShape({ trapezoid }); + addShape({ inv_trapezoid }); + addShape({ rect_right_inv_arrow }); +} +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +const flowChartShapes = { + addToRender, + addToRenderV2 +}; +const conf = {}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const addVertices = function(vert, g, svgId, root, _doc, diagObj) { + const svg = !root ? select(`[id="${svgId}"]`) : root.select(`[id="${svgId}"]`); + const doc = !_doc ? document : _doc; + const keys = Object.keys(vert); + keys.forEach(function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + const styles = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + if (evaluate(getConfig().flowchart.htmlLabels)) { + const node = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = addHtmlLabel(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(common.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + let radious = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + default: + _shape = "rect"; + } + log.warn("Adding node", vertex.id, vertex.domId); + g.setNode(diagObj.db.lookUpDomId(vertex.id), { + labelType: "svg", + labelStyle: styles.labelStyle, + shape: _shape, + label: vertexNode, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: diagObj.db.lookUpDomId(vertex.id) + }); + }); +}; +const addEdges = function(edges, g, diagObj) { + let cnt = 0; + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + cnt++; + const linkId = "L-" + edge.start + "-" + edge.end; + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = {}; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + let style = ""; + let labelStyle = ""; + if (edge.style !== void 0) { + const styles = getStylesFromArray(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } else { + switch (edge.stroke) { + case "normal": + style = "fill:none"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + break; + case "dotted": + style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + style = " stroke-width: 3.5px;fill:none"; + break; + } + } + edgeData.style = style; + edgeData.labelStyle = labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if (evaluate(getConfig().flowchart.htmlLabels)) { + edgeData.labelType = "html"; + edgeData.label = `${edge.text.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + )}`; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + edgeData.id = linkId; + edgeData.class = linkNameStart + " " + linkNameEnd; + edgeData.minlen = edge.length || 1; + g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt); + }); +}; +const getClasses = function(text, diagObj) { + log.info("Extracting classes"); + return diagObj.db.getClasses(); +}; +const draw = function(text, id, _version, diagObj) { + log.info("Drawing flowchart"); + const { securityLevel, flowchart: conf2 } = getConfig(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + let dir = diagObj.db.getDirection(); + if (dir === void 0) { + dir = "TD"; + } + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + const g = new graphlib.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { + subG = subGraphs[i2]; + diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes); + } + const vert = diagObj.db.getVertices(); + log.warn("Get vertices", vert); + const edges = diagObj.db.getEdges(); + let i = 0; + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + selectAll("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + log.warn( + "Setting subgraph", + subG.nodes[j], + diagObj.db.lookUpDomId(subG.nodes[j]), + diagObj.db.lookUpDomId(subG.id) + ); + g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id)); + } + } + addVertices(vert, g, id, root, doc, diagObj); + addEdges(edges, g, diagObj); + const render$1 = new render(); + flowChartShapes.addToRender(render$1); + render$1.arrows().none = function normal(parent, id2, edge, type) { + const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + const path = marker.append("path").attr("d", "M 0 0 L 0 0 L 0 0 z"); + applyStyle(path, edge[type + "Style"]); + }; + render$1.arrows().normal = function normal(parent, id2) { + const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + }; + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + render$1(element, g); + element.selectAll("g.node").attr("title", function() { + return diagObj.db.getTooltip(this.id); + }); + diagObj.db.indexNodes("subGraph" + i); + for (i = 0; i < subGraphs.length; i++) { + subG = subGraphs[i]; + if (subG.title !== "undefined") { + const clusterRects = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect' + ); + const clusterEl = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]' + ); + const xPos = clusterRects[0].x.baseVal.value; + const yPos = clusterRects[0].y.baseVal.value; + const _width = clusterRects[0].width.baseVal.value; + const cluster = select(clusterEl[0]); + const te = cluster.select(".label"); + te.attr("transform", `translate(${xPos + _width / 2}, ${yPos + 14})`); + te.attr("id", id + "Text"); + for (let j = 0; j < subG.classes.length; j++) { + clusterEl[0].classList.add(subG.classes[j]); + } + } + } + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } + setupGraphViewbox(g, svg, conf2.diagramPadding, conf2.useMaxWidth); + const keys = Object.keys(vert); + keys.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node = root.select("#" + id + ' [id="' + diagObj.db.lookUpDomId(key) + '"]'); + if (node) { + const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node.insert(function() { + return link; + }, ":first-child"); + const shape = node.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); +}; +const flowRenderer = { + setConf, + addVertices, + addEdges, + getClasses, + draw +}; +const diagram = { + parser, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + flowRenderer.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen("gen-1"); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-34644886.js b/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-34644886.js new file mode 100644 index 0000000..0915db9 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-34644886.js @@ -0,0 +1,40 @@ +import { p as parser, f as flowDb } from "./flowDb-fa1288b0.js"; +import { f as flowRendererV2, a as flowStyles } from "./styles-0671a096.js"; +import { p as setConfig } from "./mermaid-0d192ec3.js"; +import "d3"; +import "dagre-d3-es/src/graphlib/index.js"; +import "./index-f9462f3f.js"; +import "dagre-d3-es/src/dagre/index.js"; +import "dagre-d3-es/src/graphlib/json.js"; +import "./edges-f15a7e05.js"; +import "./createText-80c3befb.js"; +import "mdast-util-from-markdown"; +import "ts-dedent"; +import "dagre-d3-es/src/dagre-js/label/add-html-label.js"; +import "khroma"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +const diagram = { + parser, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } }); + flowRendererV2.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen("gen-2"); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-596664fa.js b/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-596664fa.js new file mode 100644 index 0000000..85174ad --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-596664fa.js @@ -0,0 +1,22 @@ +import { p as e, f as o } from "./flowDb-b820d5dc.js"; +import { f as t, g as a } from "./styles-1a7a9ff9.js"; +import { t as s } from "./mermaid-e4a58915.js"; +import "./layout-545b2d5b.js"; +import "./index-5f5016a9.js"; +import "./edges-020bfa8c.js"; +import "./createText-4be7776a.js"; +import "./line-4ba3c4fa.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +const k = { + parser: e, + db: o, + renderer: t, + styles: a, + init: (r) => { + r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, s({ flowchart: { arrowMarkerAbsolute: r.arrowMarkerAbsolute } }), t.setConf(r.flowchart), o.clear(), o.setGen("gen-2"); + } +}; +export { + k as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-7f59114e.js b/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-7f59114e.js new file mode 100644 index 0000000..a0baabf --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowDiagram-v2-7f59114e.js @@ -0,0 +1,29 @@ +import { p as parser, f as flowDb } from "./flowDb-af7c12e0.js"; +import { f as flowRendererV2, g as flowStyles } from "./styles-f40f6c66.js"; +import { t as setConfig } from "./mermaid-491db2d9.js"; +import "./layout-a7b9ff07.js"; +import "./index-cc269c15.js"; +import "./edges-9bf94b2d.js"; +import "./createText-2660bae1.js"; +import "./line-8fd2bd69.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +const diagram = { + parser, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } }); + flowRendererV2.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen("gen-2"); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-8cd0f1e2.js b/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-8cd0f1e2.js new file mode 100644 index 0000000..e820dc7 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-8cd0f1e2.js @@ -0,0 +1,46703 @@ +import { d as bMe, p as wMe } from "./flowDb-b820d5dc.js"; +import { Q as Hee, T as gMe, l as H1, j as lI, c as OH, r as pMe, o as V1n, q as X1n, n as IH, f as vMe } from "./mermaid-e4a58915.js"; +import { a as mMe, e as kMe, l as yMe, f as jMe, j as EMe } from "./edges-020bfa8c.js"; +import { l as CMe } from "./line-4ba3c4fa.js"; +import "./createText-4be7776a.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +const TMe = (Ae, At, ft) => { + const { parentById: gt } = ft, Jt = /* @__PURE__ */ new Set(); + let lt = Ae; + for (; lt; ) { + if (Jt.add(lt), lt === At) + return lt; + lt = gt[lt]; + } + for (lt = At; lt; ) { + if (Jt.has(lt)) + return lt; + lt = gt[lt]; + } + return "root"; +}; +function PH(Ae) { + throw new Error('Could not dynamically require "' + Ae + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} +var Uee = { exports: {} }; +(function(Ae, At) { + (function(ft) { + Ae.exports = ft(); + })(function() { + return function() { + function ft(gt, Jt, lt) { + function j($t, qt) { + if (!Jt[$t]) { + if (!gt[$t]) { + var Ue = typeof PH == "function" && PH; + if (!qt && Ue) + return Ue($t, !0); + if (Dt) + return Dt($t, !0); + var ki = new Error("Cannot find module '" + $t + "'"); + throw ki.code = "MODULE_NOT_FOUND", ki; + } + var ur = Jt[$t] = { exports: {} }; + gt[$t][0].call(ur.exports, function(Mn) { + var fc = gt[$t][1][Mn]; + return j(fc || Mn); + }, ur, ur.exports, ft, gt, Jt, lt); + } + return Jt[$t].exports; + } + for (var Dt = typeof PH == "function" && PH, zc = 0; zc < lt.length; zc++) + j(lt[zc]); + return j; + } + return ft; + }()({ 1: [function(ft, gt, Jt) { + Object.defineProperty(Jt, "__esModule", { + value: !0 + }); + var lt = function() { + function $t(qt, Ue) { + for (var ki = 0; ki < Ue.length; ki++) { + var ur = Ue[ki]; + ur.enumerable = ur.enumerable || !1, ur.configurable = !0, "value" in ur && (ur.writable = !0), Object.defineProperty(qt, ur.key, ur); + } + } + return function(qt, Ue, ki) { + return Ue && $t(qt.prototype, Ue), ki && $t(qt, ki), qt; + }; + }(); + function j($t, qt) { + if (!($t instanceof qt)) + throw new TypeError("Cannot call a class as a function"); + } + var Dt = function() { + function $t() { + var qt = this, Ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, ki = Ue.defaultLayoutOptions, ur = ki === void 0 ? {} : ki, Mn = Ue.algorithms, fc = Mn === void 0 ? ["layered", "stress", "mrtree", "radial", "force", "disco", "sporeOverlap", "sporeCompaction", "rectpacking"] : Mn, yu = Ue.workerFactory, Ku = Ue.workerUrl; + if (j(this, $t), this.defaultLayoutOptions = ur, this.initialized = !1, typeof Ku > "u" && typeof yu > "u") + throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'."); + var nr = yu; + typeof Ku < "u" && typeof yu > "u" && (nr = function(t1) { + return new Worker(t1); + }); + var Ch = nr(Ku); + if (typeof Ch.postMessage != "function") + throw new TypeError("Created worker does not provide the required 'postMessage' function."); + this.worker = new zc(Ch), this.worker.postMessage({ + cmd: "register", + algorithms: fc + }).then(function(q1) { + return qt.initialized = !0; + }).catch(console.err); + } + return lt($t, [{ + key: "layout", + value: function(Ue) { + var ki = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, ur = ki.layoutOptions, Mn = ur === void 0 ? this.defaultLayoutOptions : ur, fc = ki.logging, yu = fc === void 0 ? !1 : fc, Ku = ki.measureExecutionTime, nr = Ku === void 0 ? !1 : Ku; + return Ue ? this.worker.postMessage({ + cmd: "layout", + graph: Ue, + layoutOptions: Mn, + options: { + logging: yu, + measureExecutionTime: nr + } + }) : Promise.reject(new Error("Missing mandatory parameter 'graph'.")); + } + }, { + key: "knownLayoutAlgorithms", + value: function() { + return this.worker.postMessage({ cmd: "algorithms" }); + } + }, { + key: "knownLayoutOptions", + value: function() { + return this.worker.postMessage({ cmd: "options" }); + } + }, { + key: "knownLayoutCategories", + value: function() { + return this.worker.postMessage({ cmd: "categories" }); + } + }, { + key: "terminateWorker", + value: function() { + this.worker.terminate(); + } + }]), $t; + }(); + Jt.default = Dt; + var zc = function() { + function $t(qt) { + var Ue = this; + if (j(this, $t), qt === void 0) + throw new Error("Missing mandatory parameter 'worker'."); + this.resolvers = {}, this.worker = qt, this.worker.onmessage = function(ki) { + setTimeout(function() { + Ue.receive(Ue, ki); + }, 0); + }; + } + return lt($t, [{ + key: "postMessage", + value: function(Ue) { + var ki = this.id || 0; + this.id = ki + 1, Ue.id = ki; + var ur = this; + return new Promise(function(Mn, fc) { + ur.resolvers[ki] = function(yu, Ku) { + yu ? (ur.convertGwtStyleError(yu), fc(yu)) : Mn(Ku); + }, ur.worker.postMessage(Ue); + }); + } + }, { + key: "receive", + value: function(Ue, ki) { + var ur = ki.data, Mn = Ue.resolvers[ur.id]; + Mn && (delete Ue.resolvers[ur.id], ur.error ? Mn(ur.error) : Mn(null, ur.data)); + } + }, { + key: "terminate", + value: function() { + this.worker.terminate && this.worker.terminate(); + } + }, { + key: "convertGwtStyleError", + value: function(Ue) { + if (Ue) { + var ki = Ue.__java$exception; + ki && (ki.cause && ki.cause.backingJsObject && (Ue.cause = ki.cause.backingJsObject, this.convertGwtStyleError(Ue.cause)), delete Ue.__java$exception); + } + } + }]), $t; + }(); + }, {}], 2: [function(ft, gt, Jt) { + (function(lt) { + (function() { + var j; + typeof window < "u" ? j = window : typeof lt < "u" ? j = lt : typeof self < "u" && (j = self); + var Dt; + function zc() { + } + function $t() { + } + function qt() { + } + function Ue() { + } + function ki() { + } + function ur() { + } + function Mn() { + } + function fc() { + } + function yu() { + } + function Ku() { + } + function nr() { + } + function Ch() { + } + function q1() { + } + function t1() { + } + function Zl() { + } + function Dv() { + } + function G1() { + } + function Th() { + } + function Q1n() { + } + function J1n() { + } + function zy() { + } + function Y1n() { + } + function Z1n() { + } + function nln() { + } + function eln() { + } + function Xg() { + } + function N() { + } + function tln() { + } + function aI() { + } + function iln() { + } + function rln() { + } + function cln() { + } + function uln() { + } + function DH() { + } + function sln() { + } + function oln() { + } + function fln() { + } + function z1() { + } + function U1() { + } + function dI() { + } + function hln() { + } + function lln() { + } + function aln() { + } + function $H() { + } + function dln() { + } + function bln() { + } + function Vg() { + } + function Qg() { + } + function wln() { + } + function gln() { + } + function pln() { + } + function vln() { + } + function FH() { + } + function W1() { + } + function Jg() { + } + function Yg() { + } + function mln() { + } + function Vee() { + } + function bI() { + } + function kln() { + } + function yln() { + } + function jln() { + } + function Eln() { + } + function Cln() { + } + function Tln() { + } + function Mln() { + } + function Aln() { + } + function Sln() { + } + function Pln() { + } + function Iln() { + } + function Oln() { + } + function Dln() { + } + function $ln() { + } + function Fln() { + } + function xln() { + } + function Lln() { + } + function Nln() { + } + function Bln() { + } + function Rln() { + } + function _ln() { + } + function Kln() { + } + function Hln() { + } + function qln() { + } + function Gln() { + } + function zln() { + } + function Uln() { + } + function Wln() { + } + function Xln() { + } + function Vln() { + } + function Qln() { + } + function Jln() { + } + function Yln() { + } + function xH() { + } + function Zln() { + } + function nan() { + } + function ean() { + } + function tan() { + } + function wI() { + } + function gI() { + } + function Uy() { + } + function ian() { + } + function ran() { + } + function pI() { + } + function can() { + } + function uan() { + } + function san() { + } + function Wy() { + } + function oan() { + } + function fan() { + } + function han() { + } + function lan() { + } + function aan() { + } + function dan() { + } + function ban() { + } + function wan() { + } + function gan() { + } + function LH() { + } + function pan() { + } + function van() { + } + function man() { + } + function kan() { + } + function yan() { + } + function NH() { + } + function jan() { + } + function Ean() { + } + function Can() { + } + function Tan() { + } + function Man() { + } + function Aan() { + } + function San() { + } + function Pan() { + } + function Ian() { + } + function Oan() { + } + function Dan() { + } + function $an() { + } + function Fan() { + } + function xan() { + } + function vI() { + } + function Lan() { + } + function Nan() { + } + function Ban() { + } + function Ran() { + } + function _an() { + } + function BH() { + } + function Kan() { + } + function Han() { + } + function qan() { + } + function Gan() { + } + function zan() { + } + function Uan() { + } + function Wan() { + } + function Xan() { + } + function Van() { + } + function Qan() { + } + function Jan() { + } + function Yan() { + } + function Zan() { + } + function ndn() { + } + function edn() { + } + function tdn() { + } + function idn() { + } + function rdn() { + } + function cdn() { + } + function udn() { + } + function sdn() { + } + function odn() { + } + function fdn() { + } + function hdn() { + } + function ldn() { + } + function adn() { + } + function ddn() { + } + function bdn() { + } + function wdn() { + } + function gdn() { + } + function pdn() { + } + function vdn() { + } + function mdn() { + } + function kdn() { + } + function ydn() { + } + function jdn() { + } + function Edn() { + } + function Cdn() { + } + function Tdn() { + } + function Mdn() { + } + function Adn() { + } + function Sdn() { + } + function Pdn() { + } + function Idn() { + } + function Odn() { + } + function Ddn() { + } + function $dn() { + } + function Fdn() { + } + function xdn() { + } + function Ldn() { + } + function Ndn() { + } + function Bdn() { + } + function Rdn() { + } + function _dn() { + } + function Kdn() { + } + function Hdn() { + } + function qdn() { + } + function Gdn() { + } + function zdn() { + } + function Udn() { + } + function Wdn() { + } + function Xdn() { + } + function Vdn() { + } + function Qdn() { + } + function Jdn() { + } + function Ydn() { + } + function Zdn() { + } + function n0n() { + } + function e0n() { + } + function t0n() { + } + function i0n() { + } + function r0n() { + } + function c0n() { + } + function u0n() { + } + function s0n() { + } + function o0n() { + } + function f0n() { + } + function h0n() { + } + function l0n() { + } + function a0n() { + } + function d0n() { + } + function b0n() { + } + function w0n() { + } + function g0n() { + } + function p0n() { + } + function v0n() { + } + function m0n() { + } + function k0n() { + } + function y0n() { + } + function j0n() { + } + function E0n() { + } + function C0n() { + } + function T0n() { + } + function M0n() { + } + function A0n() { + } + function S0n() { + } + function P0n() { + } + function I0n() { + } + function O0n() { + } + function D0n() { + } + function RH() { + } + function $0n() { + } + function F0n() { + } + function x0n() { + } + function L0n() { + } + function N0n() { + } + function B0n() { + } + function R0n() { + } + function _0n() { + } + function K0n() { + } + function H0n() { + } + function q0n() { + } + function G0n() { + } + function z0n() { + } + function U0n() { + } + function W0n() { + } + function X0n() { + } + function V0n() { + } + function Q0n() { + } + function J0n() { + } + function Y0n() { + } + function Z0n() { + } + function nbn() { + } + function ebn() { + } + function tbn() { + } + function ibn() { + } + function rbn() { + } + function cbn() { + } + function ubn() { + } + function sbn() { + } + function obn() { + } + function fbn() { + } + function hbn() { + } + function lbn() { + } + function abn() { + } + function dbn() { + } + function bbn() { + } + function wbn() { + } + function gbn() { + } + function pbn() { + } + function vbn() { + } + function mbn() { + } + function kbn() { + } + function ybn() { + } + function jbn() { + } + function Ebn() { + } + function Cbn() { + } + function Tbn() { + } + function Mbn() { + } + function Abn() { + } + function Sbn() { + } + function Pbn() { + } + function Ibn() { + } + function Obn() { + } + function Dbn() { + } + function $bn() { + } + function Fbn() { + } + function xbn() { + } + function Lbn() { + } + function Nbn() { + } + function Bbn() { + } + function Rbn() { + } + function _bn() { + } + function Kbn() { + } + function Hbn() { + } + function qbn() { + } + function Gbn() { + } + function zbn() { + } + function _H() { + } + function Ubn() { + } + function Wbn() { + } + function Xbn() { + } + function Vbn() { + } + function Qbn() { + } + function Jbn() { + } + function Ybn() { + } + function Zbn() { + } + function nwn() { + } + function ewn() { + } + function twn() { + } + function iwn() { + } + function rwn() { + } + function cwn() { + } + function uwn() { + } + function swn() { + } + function own() { + } + function fwn() { + } + function hwn() { + } + function lwn() { + } + function KH() { + } + function awn() { + } + function dwn() { + } + function bwn() { + } + function wwn() { + } + function gwn() { + } + function pwn() { + } + function HH() { + } + function qH() { + } + function vwn() { + } + function GH() { + } + function zH() { + } + function mwn() { + } + function kwn() { + } + function ywn() { + } + function jwn() { + } + function Ewn() { + } + function Cwn() { + } + function Twn() { + } + function Mwn() { + } + function Awn() { + } + function UH() { + } + function Swn() { + } + function Pwn() { + } + function Iwn() { + } + function Own() { + } + function Dwn() { + } + function $wn() { + } + function Fwn() { + } + function xwn() { + } + function Lwn() { + } + function Nwn() { + } + function Bwn() { + } + function Rwn() { + } + function _wn() { + } + function Kwn() { + } + function Hwn() { + } + function qwn() { + } + function Gwn() { + } + function zwn() { + } + function Uwn() { + } + function Wwn() { + } + function Xwn() { + } + function Vwn() { + } + function Qwn() { + } + function Jwn() { + } + function Ywn() { + } + function Zwn() { + } + function ngn() { + } + function egn() { + } + function tgn() { + } + function ign() { + } + function rgn() { + } + function cgn() { + } + function ugn() { + } + function sgn() { + } + function ogn() { + } + function fgn() { + } + function hgn() { + } + function lgn() { + } + function agn() { + } + function dgn() { + } + function bgn() { + } + function wgn() { + } + function ggn() { + } + function pgn() { + } + function vgn() { + } + function mgn() { + } + function kgn() { + } + function ygn() { + } + function jgn() { + } + function Egn() { + } + function Cgn() { + } + function Tgn() { + } + function Mgn() { + } + function Agn() { + } + function Sgn() { + } + function Pgn() { + } + function Ign() { + } + function Ogn() { + } + function Dgn() { + } + function $gn() { + } + function Fgn() { + } + function xgn() { + } + function Lgn() { + } + function Ngn() { + } + function Bgn() { + } + function Rgn() { + } + function _gn() { + } + function Kgn() { + } + function mI() { + } + function kI() { + } + function yI() { + } + function Hgn() { + } + function qgn() { + } + function Ggn() { + } + function zgn() { + } + function Ugn() { + } + function WH() { + } + function Wgn() { + } + function Xgn() { + } + function Qee() { + } + function Vgn() { + } + function Qgn() { + } + function Jgn() { + } + function Ygn() { + } + function Zgn() { + } + function n2n() { + } + function e2n() { + } + function na() { + } + function t2n() { + } + function Zg() { + } + function XH() { + } + function i2n() { + } + function r2n() { + } + function c2n() { + } + function u2n() { + } + function s2n() { + } + function o2n() { + } + function f2n() { + } + function h2n() { + } + function l2n() { + } + function a2n() { + } + function d2n() { + } + function b2n() { + } + function w2n() { + } + function g2n() { + } + function p2n() { + } + function v2n() { + } + function m2n() { + } + function k2n() { + } + function y2n() { + } + function j2n() { + } + function E2n() { + } + function dn() { + } + function C2n() { + } + function T2n() { + } + function M2n() { + } + function A2n() { + } + function S2n() { + } + function P2n() { + } + function I2n() { + } + function O2n() { + } + function D2n() { + } + function $2n() { + } + function jI() { + } + function F2n() { + } + function x2n() { + } + function L2n() { + } + function N2n() { + } + function B2n() { + } + function VH() { + } + function Xy() { + } + function Vy() { + } + function R2n() { + } + function QH() { + } + function Qy() { + } + function _2n() { + } + function K2n() { + } + function H2n() { + } + function q2n() { + } + function G2n() { + } + function z2n() { + } + function Jy() { + } + function U2n() { + } + function W2n() { + } + function X2n() { + } + function Yy() { + } + function V2n() { + } + function JH() { + } + function Q2n() { + } + function EI() { + } + function YH() { + } + function J2n() { + } + function Y2n() { + } + function Z2n() { + } + function npn() { + } + function Jee() { + } + function epn() { + } + function tpn() { + } + function ipn() { + } + function rpn() { + } + function cpn() { + } + function upn() { + } + function spn() { + } + function opn() { + } + function fpn() { + } + function hpn() { + } + function Np() { + } + function CI() { + } + function lpn() { + } + function apn() { + } + function dpn() { + } + function bpn() { + } + function wpn() { + } + function gpn() { + } + function ppn() { + } + function vpn() { + } + function mpn() { + } + function kpn() { + } + function ypn() { + } + function jpn() { + } + function Epn() { + } + function Cpn() { + } + function Tpn() { + } + function Mpn() { + } + function Apn() { + } + function Spn() { + } + function Ppn() { + } + function Ipn() { + } + function Opn() { + } + function Dpn() { + } + function $pn() { + } + function Fpn() { + } + function xpn() { + } + function Lpn() { + } + function Npn() { + } + function Bpn() { + } + function Rpn() { + } + function _pn() { + } + function Kpn() { + } + function Hpn() { + } + function qpn() { + } + function Gpn() { + } + function zpn() { + } + function Upn() { + } + function Wpn() { + } + function Xpn() { + } + function Vpn() { + } + function Qpn() { + } + function Jpn() { + } + function Ypn() { + } + function Zpn() { + } + function n3n() { + } + function e3n() { + } + function t3n() { + } + function i3n() { + } + function r3n() { + } + function c3n() { + } + function u3n() { + } + function s3n() { + } + function o3n() { + } + function f3n() { + } + function h3n() { + } + function l3n() { + } + function a3n() { + } + function d3n() { + } + function b3n() { + } + function w3n() { + } + function g3n() { + } + function p3n() { + } + function v3n() { + } + function m3n() { + } + function k3n() { + } + function y3n() { + } + function j3n() { + } + function E3n() { + } + function C3n() { + } + function T3n() { + } + function M3n() { + } + function A3n() { + } + function S3n() { + } + function P3n() { + } + function I3n() { + } + function O3n() { + } + function D3n() { + } + function $3n() { + } + function F3n() { + } + function x3n() { + } + function L3n() { + } + function N3n() { + } + function B3n() { + } + function R3n() { + } + function _3n() { + } + function K3n() { + } + function H3n() { + } + function q3n() { + } + function G3n() { + } + function z3n() { + } + function U3n() { + } + function W3n() { + } + function X3n() { + } + function V3n() { + } + function Q3n() { + } + function J3n() { + } + function Y3n() { + } + function Z3n() { + } + function n4n() { + } + function e4n() { + } + function t4n() { + } + function i4n() { + } + function ZH() { + } + function r4n() { + } + function c4n() { + } + function TI() { + Rv(); + } + function u4n() { + pF(); + } + function s4n() { + a6(); + } + function o4n() { + WT(); + } + function f4n() { + YJ(); + } + function h4n() { + Go(); + } + function l4n() { + fJ(); + } + function a4n() { + C7(); + } + function d4n() { + q9(); + } + function b4n() { + H9(); + } + function w4n() { + w8(); + } + function g4n() { + v7n(); + } + function p4n() { + x2(); + } + function v4n() { + Sj(); + } + function m4n() { + PSn(); + } + function k4n() { + HIn(); + } + function y4n() { + sPn(); + } + function j4n() { + CMn(); + } + function E4n() { + X3(); + } + function C4n() { + yl(); + } + function T4n() { + qIn(); + } + function M4n() { + pAn(); + } + function A4n() { + zZ(); + } + function S4n() { + IFn(); + } + function P4n() { + TMn(); + } + function I4n() { + nn(); + } + function O4n() { + EMn(); + } + function D4n() { + GIn(); + } + function $4n() { + WOn(); + } + function F4n() { + AMn(); + } + function x4n() { + aPn(); + } + function L4n() { + m7n(); + } + function N4n() { + $Y(); + } + function B4n() { + pb(); + } + function R4n() { + pOn(); + } + function _4n() { + S7(); + } + function K4n() { + Ux(); + } + function H4n() { + ZF(); + } + function q4n() { + n0(); + } + function G4n() { + PV(); + } + function z4n() { + MMn(); + } + function U4n() { + BBn(); + } + function W4n() { + IY(); + } + function X4n() { + Bx(); + } + function V4n() { + DC(); + } + function Q4n() { + nM(); + } + function nq() { + Xe(); + } + function J4n() { + wT(); + } + function Y4n() { + NQ(); + } + function eq() { + mM(); + } + function Fo() { + dEn(); + } + function tq() { + eF(); + } + function Z4n() { + pZ(); + } + function iq(n) { + _n(n); + } + function nvn(n) { + this.a = n; + } + function Zy(n) { + this.a = n; + } + function evn(n) { + this.a = n; + } + function tvn(n) { + this.a = n; + } + function ivn(n) { + this.a = n; + } + function rvn(n) { + this.a = n; + } + function cvn(n) { + this.a = n; + } + function uvn(n) { + this.a = n; + } + function rq(n) { + this.a = n; + } + function cq(n) { + this.a = n; + } + function svn(n) { + this.a = n; + } + function MI(n) { + this.a = n; + } + function ovn(n) { + this.a = n; + } + function AI(n) { + this.a = n; + } + function fvn(n) { + this.a = n; + } + function SI(n) { + this.a = n; + } + function hvn(n) { + this.a = n; + } + function PI(n) { + this.a = n; + } + function lvn(n) { + this.a = n; + } + function avn(n) { + this.a = n; + } + function dvn(n) { + this.a = n; + } + function uq(n) { + this.b = n; + } + function bvn(n) { + this.c = n; + } + function wvn(n) { + this.a = n; + } + function gvn(n) { + this.a = n; + } + function pvn(n) { + this.a = n; + } + function vvn(n) { + this.a = n; + } + function mvn(n) { + this.a = n; + } + function kvn(n) { + this.a = n; + } + function yvn(n) { + this.a = n; + } + function jvn(n) { + this.a = n; + } + function Evn(n) { + this.a = n; + } + function Cvn(n) { + this.a = n; + } + function Tvn(n) { + this.a = n; + } + function Mvn(n) { + this.a = n; + } + function Avn(n) { + this.a = n; + } + function sq(n) { + this.a = n; + } + function oq(n) { + this.a = n; + } + function nj(n) { + this.a = n; + } + function M9(n) { + this.a = n; + } + function ea() { + this.a = []; + } + function Svn(n, e) { + n.a = e; + } + function Yee(n, e) { + n.a = e; + } + function Zee(n, e) { + n.b = e; + } + function nte(n, e) { + n.b = e; + } + function ete(n, e) { + n.b = e; + } + function fq(n, e) { + n.j = e; + } + function tte(n, e) { + n.g = e; + } + function ite(n, e) { + n.i = e; + } + function rte(n, e) { + n.c = e; + } + function cte(n, e) { + n.d = e; + } + function ute(n, e) { + n.d = e; + } + function ste(n, e) { + n.c = e; + } + function ta(n, e) { + n.k = e; + } + function ote(n, e) { + n.c = e; + } + function hq(n, e) { + n.c = e; + } + function lq(n, e) { + n.a = e; + } + function fte(n, e) { + n.a = e; + } + function hte(n, e) { + n.f = e; + } + function lte(n, e) { + n.a = e; + } + function ate(n, e) { + n.b = e; + } + function II(n, e) { + n.d = e; + } + function ej(n, e) { + n.i = e; + } + function aq(n, e) { + n.o = e; + } + function dte(n, e) { + n.r = e; + } + function bte(n, e) { + n.a = e; + } + function wte(n, e) { + n.b = e; + } + function Pvn(n, e) { + n.e = e; + } + function gte(n, e) { + n.f = e; + } + function dq(n, e) { + n.g = e; + } + function pte(n, e) { + n.e = e; + } + function vte(n, e) { + n.f = e; + } + function mte(n, e) { + n.f = e; + } + function kte(n, e) { + n.n = e; + } + function yte(n, e) { + n.a = e; + } + function jte(n, e) { + n.a = e; + } + function Ete(n, e) { + n.c = e; + } + function Cte(n, e) { + n.c = e; + } + function Tte(n, e) { + n.d = e; + } + function Mte(n, e) { + n.e = e; + } + function Ate(n, e) { + n.g = e; + } + function Ste(n, e) { + n.a = e; + } + function Pte(n, e) { + n.c = e; + } + function Ite(n, e) { + n.d = e; + } + function Ote(n, e) { + n.e = e; + } + function Dte(n, e) { + n.f = e; + } + function $te(n, e) { + n.j = e; + } + function Fte(n, e) { + n.a = e; + } + function xte(n, e) { + n.b = e; + } + function Lte(n, e) { + n.a = e; + } + function Ivn(n) { + n.b = n.a; + } + function Ovn(n) { + n.c = n.d.d; + } + function $v(n) { + this.d = n; + } + function ia(n) { + this.a = n; + } + function Bp(n) { + this.a = n; + } + function bq(n) { + this.a = n; + } + function Mh(n) { + this.a = n; + } + function A9(n) { + this.a = n; + } + function Dvn(n) { + this.a = n; + } + function wq(n) { + this.a = n; + } + function S9(n) { + this.a = n; + } + function gq(n) { + this.a = n; + } + function pq(n) { + this.a = n; + } + function vq(n) { + this.a = n; + } + function N0(n) { + this.a = n; + } + function P9(n) { + this.a = n; + } + function I9(n) { + this.a = n; + } + function mq(n) { + this.b = n; + } + function Rp(n) { + this.b = n; + } + function _p(n) { + this.b = n; + } + function OI(n) { + this.a = n; + } + function $vn(n) { + this.a = n; + } + function kq(n) { + this.a = n; + } + function DI(n) { + this.c = n; + } + function E(n) { + this.c = n; + } + function Fvn(n) { + this.c = n; + } + function yq(n) { + this.a = n; + } + function jq(n) { + this.a = n; + } + function Eq(n) { + this.a = n; + } + function Cq(n) { + this.a = n; + } + function ut(n) { + this.a = n; + } + function xvn(n) { + this.a = n; + } + function Tq(n) { + this.a = n; + } + function Mq(n) { + this.a = n; + } + function Lvn(n) { + this.a = n; + } + function Nvn(n) { + this.a = n; + } + function Fv(n) { + this.a = n; + } + function Bvn(n) { + this.a = n; + } + function Rvn(n) { + this.a = n; + } + function _vn(n) { + this.a = n; + } + function Kvn(n) { + this.a = n; + } + function Hvn(n) { + this.a = n; + } + function qvn(n) { + this.a = n; + } + function Gvn(n) { + this.a = n; + } + function zvn(n) { + this.a = n; + } + function Uvn(n) { + this.a = n; + } + function Wvn(n) { + this.a = n; + } + function Xvn(n) { + this.a = n; + } + function Vvn(n) { + this.a = n; + } + function Qvn(n) { + this.a = n; + } + function Jvn(n) { + this.a = n; + } + function Yvn(n) { + this.a = n; + } + function Zvn(n) { + this.a = n; + } + function n5n(n) { + this.a = n; + } + function O9(n) { + this.a = n; + } + function e5n(n) { + this.a = n; + } + function t5n(n) { + this.a = n; + } + function tj(n) { + this.a = n; + } + function i5n(n) { + this.a = n; + } + function r5n(n) { + this.a = n; + } + function Kp(n) { + this.a = n; + } + function Aq(n) { + this.a = n; + } + function c5n(n) { + this.a = n; + } + function u5n(n) { + this.a = n; + } + function s5n(n) { + this.a = n; + } + function o5n(n) { + this.a = n; + } + function f5n(n) { + this.a = n; + } + function Sq(n) { + this.a = n; + } + function Pq(n) { + this.a = n; + } + function Iq(n) { + this.a = n; + } + function ij(n) { + this.a = n; + } + function rj(n) { + this.e = n; + } + function Hp(n) { + this.a = n; + } + function h5n(n) { + this.a = n; + } + function n2(n) { + this.a = n; + } + function Oq(n) { + this.a = n; + } + function l5n(n) { + this.a = n; + } + function a5n(n) { + this.a = n; + } + function d5n(n) { + this.a = n; + } + function b5n(n) { + this.a = n; + } + function w5n(n) { + this.a = n; + } + function g5n(n) { + this.a = n; + } + function p5n(n) { + this.a = n; + } + function v5n(n) { + this.a = n; + } + function m5n(n) { + this.a = n; + } + function k5n(n) { + this.a = n; + } + function y5n(n) { + this.a = n; + } + function Dq(n) { + this.a = n; + } + function j5n(n) { + this.a = n; + } + function E5n(n) { + this.a = n; + } + function C5n(n) { + this.a = n; + } + function T5n(n) { + this.a = n; + } + function M5n(n) { + this.a = n; + } + function A5n(n) { + this.a = n; + } + function S5n(n) { + this.a = n; + } + function P5n(n) { + this.a = n; + } + function I5n(n) { + this.a = n; + } + function O5n(n) { + this.a = n; + } + function D5n(n) { + this.a = n; + } + function $5n(n) { + this.a = n; + } + function F5n(n) { + this.a = n; + } + function x5n(n) { + this.a = n; + } + function L5n(n) { + this.a = n; + } + function N5n(n) { + this.a = n; + } + function B5n(n) { + this.a = n; + } + function R5n(n) { + this.a = n; + } + function _5n(n) { + this.a = n; + } + function K5n(n) { + this.a = n; + } + function H5n(n) { + this.a = n; + } + function q5n(n) { + this.a = n; + } + function G5n(n) { + this.a = n; + } + function z5n(n) { + this.a = n; + } + function U5n(n) { + this.a = n; + } + function W5n(n) { + this.a = n; + } + function X5n(n) { + this.a = n; + } + function V5n(n) { + this.a = n; + } + function Q5n(n) { + this.a = n; + } + function J5n(n) { + this.a = n; + } + function Y5n(n) { + this.a = n; + } + function Z5n(n) { + this.a = n; + } + function n6n(n) { + this.a = n; + } + function e6n(n) { + this.a = n; + } + function t6n(n) { + this.a = n; + } + function i6n(n) { + this.a = n; + } + function r6n(n) { + this.a = n; + } + function c6n(n) { + this.c = n; + } + function u6n(n) { + this.b = n; + } + function s6n(n) { + this.a = n; + } + function o6n(n) { + this.a = n; + } + function f6n(n) { + this.a = n; + } + function h6n(n) { + this.a = n; + } + function l6n(n) { + this.a = n; + } + function a6n(n) { + this.a = n; + } + function d6n(n) { + this.a = n; + } + function b6n(n) { + this.a = n; + } + function w6n(n) { + this.a = n; + } + function g6n(n) { + this.a = n; + } + function p6n(n) { + this.a = n; + } + function v6n(n) { + this.a = n; + } + function m6n(n) { + this.a = n; + } + function k6n(n) { + this.a = n; + } + function y6n(n) { + this.a = n; + } + function j6n(n) { + this.a = n; + } + function E6n(n) { + this.a = n; + } + function C6n(n) { + this.a = n; + } + function T6n(n) { + this.a = n; + } + function M6n(n) { + this.a = n; + } + function A6n(n) { + this.a = n; + } + function S6n(n) { + this.a = n; + } + function P6n(n) { + this.a = n; + } + function I6n(n) { + this.a = n; + } + function X1(n) { + this.a = n; + } + function e2(n) { + this.a = n; + } + function O6n(n) { + this.a = n; + } + function D6n(n) { + this.a = n; + } + function $6n(n) { + this.a = n; + } + function F6n(n) { + this.a = n; + } + function x6n(n) { + this.a = n; + } + function L6n(n) { + this.a = n; + } + function N6n(n) { + this.a = n; + } + function B6n(n) { + this.a = n; + } + function R6n(n) { + this.a = n; + } + function _6n(n) { + this.a = n; + } + function K6n(n) { + this.a = n; + } + function H6n(n) { + this.a = n; + } + function q6n(n) { + this.a = n; + } + function G6n(n) { + this.a = n; + } + function z6n(n) { + this.a = n; + } + function U6n(n) { + this.a = n; + } + function cj(n) { + this.a = n; + } + function W6n(n) { + this.a = n; + } + function X6n(n) { + this.a = n; + } + function V6n(n) { + this.a = n; + } + function Q6n(n) { + this.a = n; + } + function J6n(n) { + this.a = n; + } + function Y6n(n) { + this.a = n; + } + function Z6n(n) { + this.a = n; + } + function nmn(n) { + this.a = n; + } + function emn(n) { + this.a = n; + } + function tmn(n) { + this.a = n; + } + function imn(n) { + this.a = n; + } + function rmn(n) { + this.a = n; + } + function cmn(n) { + this.a = n; + } + function umn(n) { + this.a = n; + } + function smn(n) { + this.a = n; + } + function omn(n) { + this.a = n; + } + function fmn(n) { + this.a = n; + } + function hmn(n) { + this.a = n; + } + function lmn(n) { + this.a = n; + } + function amn(n) { + this.a = n; + } + function dmn(n) { + this.a = n; + } + function bmn(n) { + this.a = n; + } + function wmn(n) { + this.a = n; + } + function gmn(n) { + this.a = n; + } + function pmn(n) { + this.a = n; + } + function vmn(n) { + this.a = n; + } + function mmn(n) { + this.a = n; + } + function kmn(n) { + this.a = n; + } + function $q(n) { + this.a = n; + } + function yt(n) { + this.b = n; + } + function ymn(n) { + this.f = n; + } + function Fq(n) { + this.a = n; + } + function jmn(n) { + this.a = n; + } + function Emn(n) { + this.a = n; + } + function Cmn(n) { + this.a = n; + } + function Tmn(n) { + this.a = n; + } + function Mmn(n) { + this.a = n; + } + function Amn(n) { + this.a = n; + } + function Smn(n) { + this.a = n; + } + function Pmn(n) { + this.a = n; + } + function D9(n) { + this.a = n; + } + function Imn(n) { + this.a = n; + } + function Omn(n) { + this.b = n; + } + function xq(n) { + this.c = n; + } + function uj(n) { + this.e = n; + } + function Dmn(n) { + this.a = n; + } + function sj(n) { + this.a = n; + } + function oj(n) { + this.a = n; + } + function $I(n) { + this.a = n; + } + function $mn(n) { + this.a = n; + } + function Fmn(n) { + this.d = n; + } + function Lq(n) { + this.a = n; + } + function Nq(n) { + this.a = n; + } + function ud(n) { + this.e = n; + } + function Nte() { + this.a = 0; + } + function gw() { + dyn(this); + } + function X() { + RO(this); + } + function we() { + Eu(this); + } + function FI() { + pTn(this); + } + function xmn() { + } + function sd() { + this.c = p1n; + } + function Bte(n, e) { + e.Wb(n); + } + function Lmn(n, e) { + n.b += e; + } + function Nmn(n) { + n.b = new JI(); + } + function T(n) { + return n.e; + } + function Rte(n) { + return n.a; + } + function _te(n) { + return n.a; + } + function Kte(n) { + return n.a; + } + function Hte(n) { + return n.a; + } + function qte(n) { + return n.a; + } + function Gte() { + return null; + } + function zte() { + return null; + } + function Ute() { + EG(), iTe(); + } + function Wte(n) { + n.b.tf(n.e); + } + function xv(n, e) { + n.b = e - n.b; + } + function Lv(n, e) { + n.a = e - n.a; + } + function Bmn(n, e) { + e.ad(n.a); + } + function Xte(n, e) { + si(e, n); + } + function Vte(n, e, t) { + n.Od(t, e); + } + function $9(n, e) { + n.e = e, e.b = n; + } + function Bq(n) { + Df(), this.a = n; + } + function Rmn(n) { + Df(), this.a = n; + } + function _mn(n) { + Df(), this.a = n; + } + function Rq(n) { + eb(), this.a = n; + } + function Kmn(n) { + m3(), aR.be(n); + } + function ra() { + Qyn.call(this); + } + function _q() { + Qyn.call(this); + } + function Kq() { + ra.call(this); + } + function xI() { + ra.call(this); + } + function Hmn() { + ra.call(this); + } + function F9() { + ra.call(this); + } + function ou() { + ra.call(this); + } + function Nv() { + ra.call(this); + } + function ye() { + ra.call(this); + } + function vs() { + ra.call(this); + } + function qmn() { + ra.call(this); + } + function ic() { + ra.call(this); + } + function Gmn() { + ra.call(this); + } + function zmn() { + this.a = this; + } + function fj() { + this.Bb |= 256; + } + function Umn() { + this.b = new Xkn(); + } + function Hq() { + Hq = N, new we(); + } + function qq() { + Kq.call(this); + } + function Wmn(n, e) { + n.length = e; + } + function hj(n, e) { + W(n.a, e); + } + function Qte(n, e) { + nY(n.c, e); + } + function Jte(n, e) { + ci(n.b, e); + } + function Yte(n, e) { + KT(n.a, e); + } + function Zte(n, e) { + MF(n.a, e); + } + function qp(n, e) { + et(n.e, e); + } + function t2(n) { + iM(n.c, n.b); + } + function nie(n, e) { + n.kc().Nb(e); + } + function Gq(n) { + this.a = Yge(n); + } + function hi() { + this.a = new we(); + } + function Xmn() { + this.a = new we(); + } + function lj() { + this.a = new X(); + } + function LI() { + this.a = new X(); + } + function zq() { + this.a = new X(); + } + function Ns() { + this.a = new Oln(); + } + function ca() { + this.a = new TSn(); + } + function Uq() { + this.a = new LH(); + } + function Wq() { + this.a = new h7n(); + } + function Vmn() { + this.a = new YMn(); + } + function Xq() { + this.a = new bMn(); + } + function Vq() { + this.a = new Bjn(); + } + function Qmn() { + this.a = new X(); + } + function Qq() { + this.a = new X(); + } + function Jmn() { + this.a = new X(); + } + function Ymn() { + this.a = new X(); + } + function Zmn() { + this.d = new X(); + } + function n9n() { + this.a = new hi(); + } + function e9n() { + this.a = new we(); + } + function t9n() { + this.b = new we(); + } + function i9n() { + this.b = new X(); + } + function Jq() { + this.e = new X(); + } + function r9n() { + this.d = new X(); + } + function c9n() { + this.a = new C4n(); + } + function u9n() { + X.call(this); + } + function Yq() { + lj.call(this); + } + function s9n() { + kE.call(this); + } + function o9n() { + Qq.call(this); + } + function NI() { + Bv.call(this); + } + function Bv() { + xmn.call(this); + } + function i2() { + xmn.call(this); + } + function Zq() { + i2.call(this); + } + function f9n() { + zTn.call(this); + } + function h9n() { + zTn.call(this); + } + function l9n() { + uG.call(this); + } + function a9n() { + uG.call(this); + } + function d9n() { + uG.call(this); + } + function b9n() { + sG.call(this); + } + function fu() { + Tt.call(this); + } + function nG() { + B2n.call(this); + } + function eG() { + B2n.call(this); + } + function w9n() { + O9n.call(this); + } + function g9n() { + O9n.call(this); + } + function p9n() { + we.call(this); + } + function v9n() { + we.call(this); + } + function m9n() { + we.call(this); + } + function k9n() { + hi.call(this); + } + function BI() { + RIn.call(this); + } + function y9n() { + fj.call(this); + } + function RI() { + Oz.call(this); + } + function _I() { + Oz.call(this); + } + function tG() { + we.call(this); + } + function KI() { + we.call(this); + } + function j9n() { + we.call(this); + } + function iG() { + Yy.call(this); + } + function E9n() { + Yy.call(this); + } + function C9n() { + iG.call(this); + } + function T9n() { + ZH.call(this); + } + function M9n(n) { + hIn.call(this, n); + } + function A9n(n) { + hIn.call(this, n); + } + function rG(n) { + rq.call(this, n); + } + function cG(n) { + n7n.call(this, n); + } + function eie(n) { + cG.call(this, n); + } + function tie(n) { + n7n.call(this, n); + } + function Gp() { + this.a = new Tt(); + } + function uG() { + this.a = new hi(); + } + function sG() { + this.a = new we(); + } + function S9n() { + this.a = new X(); + } + function P9n() { + this.j = new X(); + } + function oG() { + this.a = new Rgn(); + } + function I9n() { + this.a = new T8n(); + } + function O9n() { + this.a = new X2n(); + } + function HI() { + HI = N, uR = new V9n(); + } + function qI() { + qI = N, cR = new X9n(); + } + function Rv() { + Rv = N, rR = new $t(); + } + function aj() { + aj = N, fR = new Xyn(); + } + function iie(n) { + cG.call(this, n); + } + function rie(n) { + cG.call(this, n); + } + function D9n(n) { + m$.call(this, n); + } + function $9n(n) { + m$.call(this, n); + } + function F9n(n) { + uEn.call(this, n); + } + function GI(n) { + C5e.call(this, n); + } + function od(n) { + K0.call(this, n); + } + function _v(n) { + Cj.call(this, n); + } + function fG(n) { + Cj.call(this, n); + } + function x9n(n) { + Cj.call(this, n); + } + function _r(n) { + kCn.call(this, n); + } + function L9n(n) { + _r.call(this, n); + } + function r2() { + M9.call(this, {}); + } + function dj(n) { + r3(), this.a = n; + } + function Kv(n) { + n.b = null, n.c = 0; + } + function cie(n, e) { + n.e = e, NNn(n, e); + } + function uie(n, e) { + n.a = e, h6e(n); + } + function zI(n, e, t) { + n.a[e.g] = t; + } + function sie(n, e, t) { + M4e(t, n, e); + } + function oie(n, e) { + $ue(e.i, n.n); + } + function N9n(n, e) { + Fwe(n).td(e); + } + function fie(n, e) { + return n * n / e; + } + function B9n(n, e) { + return n.g - e.g; + } + function hie(n) { + return new nj(n); + } + function lie(n) { + return new nb(n); + } + function bj(n) { + _r.call(this, n); + } + function mr(n) { + _r.call(this, n); + } + function R9n(n) { + _r.call(this, n); + } + function UI(n) { + kCn.call(this, n); + } + function WI(n) { + AV(), this.a = n; + } + function _9n(n) { + aEn(), this.a = n; + } + function B0(n) { + ED(), this.f = n; + } + function XI(n) { + ED(), this.f = n; + } + function zp(n) { + _r.call(this, n); + } + function Hn(n) { + _r.call(this, n); + } + function $r(n) { + _r.call(this, n); + } + function K9n(n) { + _r.call(this, n); + } + function c2(n) { + _r.call(this, n); + } + function on(n) { + return _n(n), n; + } + function K(n) { + return _n(n), n; + } + function x9(n) { + return _n(n), n; + } + function hG(n) { + return _n(n), n; + } + function aie(n) { + return _n(n), n; + } + function Hv(n) { + return n.b == n.c; + } + function R0(n) { + return !!n && n.b; + } + function die(n) { + return !!n && n.k; + } + function bie(n) { + return !!n && n.j; + } + function Hu(n) { + _n(n), this.a = n; + } + function lG(n) { + return Ea(n), n; + } + function qv(n) { + EW(n, n.length); + } + function i1(n) { + _r.call(this, n); + } + function Af(n) { + _r.call(this, n); + } + function VI(n) { + _r.call(this, n); + } + function pw(n) { + _r.call(this, n); + } + function Gv(n) { + _r.call(this, n); + } + function Ee(n) { + _r.call(this, n); + } + function QI(n) { + Vz.call(this, n, 0); + } + function JI() { + iX.call(this, 12, 3); + } + function aG() { + aG = N, din = new Q1n(); + } + function H9n() { + H9n = N, ain = new zc(); + } + function wj() { + wj = N, dm = new q1(); + } + function q9n() { + q9n = N, vzn = new Zl(); + } + function G9n() { + throw T(new ye()); + } + function dG() { + throw T(new ye()); + } + function z9n() { + throw T(new ye()); + } + function wie() { + throw T(new ye()); + } + function gie() { + throw T(new ye()); + } + function pie() { + throw T(new ye()); + } + function YI() { + this.a = Ce(pe(Qi)); + } + function u2(n) { + Df(), this.a = pe(n); + } + function U9n(n, e) { + n.Td(e), e.Sd(n); + } + function vie(n, e) { + n.a.ec().Mc(e); + } + function mie(n, e, t) { + n.c.lf(e, t); + } + function bG(n) { + mr.call(this, n); + } + function Sf(n) { + Hn.call(this, n); + } + function r1() { + A9.call(this, ""); + } + function zv() { + A9.call(this, ""); + } + function V1() { + A9.call(this, ""); + } + function _0() { + A9.call(this, ""); + } + function wG(n) { + mr.call(this, n); + } + function Up(n) { + Rp.call(this, n); + } + function ZI(n) { + lE.call(this, n); + } + function W9n(n) { + Up.call(this, n); + } + function X9n() { + AI.call(this, null); + } + function V9n() { + AI.call(this, null); + } + function gj() { + gj = N, m3(); + } + function Q9n() { + Q9n = N, Szn = Z4e(); + } + function J9n(n) { + return n.a ? n.b : 0; + } + function kie(n) { + return n.a ? n.b : 0; + } + function yie(n, e) { + return n.a - e.a; + } + function jie(n, e) { + return n.a - e.a; + } + function Eie(n, e) { + return n.a - e.a; + } + function pj(n, e) { + return WX(n, e); + } + function M(n, e) { + return pMn(n, e); + } + function Cie(n, e) { + return e in n.a; + } + function Y9n(n, e) { + return n.f = e, n; + } + function Tie(n, e) { + return n.b = e, n; + } + function Z9n(n, e) { + return n.c = e, n; + } + function Mie(n, e) { + return n.g = e, n; + } + function gG(n, e) { + return n.a = e, n; + } + function pG(n, e) { + return n.f = e, n; + } + function Aie(n, e) { + return n.k = e, n; + } + function vG(n, e) { + return n.a = e, n; + } + function Sie(n, e) { + return n.e = e, n; + } + function mG(n, e) { + return n.e = e, n; + } + function Pie(n, e) { + return n.f = e, n; + } + function Iie(n, e) { + n.b = !0, n.d = e; + } + function Oie(n, e) { + n.b = new kr(e); + } + function Die(n, e, t) { + e.td(n.a[t]); + } + function $ie(n, e, t) { + e.we(n.a[t]); + } + function Fie(n, e) { + return n.b - e.b; + } + function xie(n, e) { + return n.g - e.g; + } + function Lie(n, e) { + return n.s - e.s; + } + function Nie(n, e) { + return n ? 0 : e - 1; + } + function n8n(n, e) { + return n ? 0 : e - 1; + } + function Bie(n, e) { + return n ? e - 1 : 0; + } + function Rie(n, e) { + return e.Yf(n); + } + function fd(n, e) { + return n.b = e, n; + } + function vj(n, e) { + return n.a = e, n; + } + function hd(n, e) { + return n.c = e, n; + } + function ld(n, e) { + return n.d = e, n; + } + function ad(n, e) { + return n.e = e, n; + } + function kG(n, e) { + return n.f = e, n; + } + function Uv(n, e) { + return n.a = e, n; + } + function Wp(n, e) { + return n.b = e, n; + } + function Xp(n, e) { + return n.c = e, n; + } + function gn(n, e) { + return n.c = e, n; + } + function Dn(n, e) { + return n.b = e, n; + } + function pn(n, e) { + return n.d = e, n; + } + function vn(n, e) { + return n.e = e, n; + } + function _ie(n, e) { + return n.f = e, n; + } + function mn(n, e) { + return n.g = e, n; + } + function kn(n, e) { + return n.a = e, n; + } + function yn(n, e) { + return n.i = e, n; + } + function jn(n, e) { + return n.j = e, n; + } + function e8n(n, e) { + return n.k = e, n; + } + function Kie(n, e) { + return n.j = e, n; + } + function Hie(n, e) { + yl(), Hr(e, n); + } + function qie(n, e, t) { + Nfe(n.a, e, t); + } + function t8n(n) { + mTn.call(this, n); + } + function yG(n) { + mTn.call(this, n); + } + function mj(n) { + uD.call(this, n); + } + function i8n(n) { + u2e.call(this, n); + } + function Q1(n) { + Nd.call(this, n); + } + function r8n(n) { + XD.call(this, n); + } + function c8n(n) { + XD.call(this, n); + } + function u8n() { + Mz.call(this, ""); + } + function Li() { + this.a = 0, this.b = 0; + } + function s8n() { + this.b = 0, this.a = 0; + } + function o8n(n, e) { + n.b = 0, lb(n, e); + } + function Gie(n, e) { + n.c = e, n.b = !0; + } + function f8n(n, e) { + return n.c._b(e); + } + function xo(n) { + return n.e && n.e(); + } + function nO(n) { + return n ? n.d : null; + } + function h8n(n, e) { + return LDn(n.b, e); + } + function zie(n) { + return n ? n.g : null; + } + function Uie(n) { + return n ? n.i : null; + } + function J1(n) { + return Ph(n), n.o; + } + function dd() { + dd = N, Mne = h4e(); + } + function l8n() { + l8n = N, mi = jve(); + } + function Vp() { + Vp = N, g1n = a4e(); + } + function a8n() { + a8n = N, hee = l4e(); + } + function jG() { + jG = N, oc = s6e(); + } + function EG() { + EG = N, Wl = L3(); + } + function d8n() { + throw T(new ye()); + } + function b8n() { + throw T(new ye()); + } + function w8n() { + throw T(new ye()); + } + function g8n() { + throw T(new ye()); + } + function p8n() { + throw T(new ye()); + } + function v8n() { + throw T(new ye()); + } + function kj(n) { + this.a = new s2(n); + } + function CG(n) { + d_n(), gTe(this, n); + } + function Y1(n) { + this.a = new AD(n); + } + function vw(n, e) { + for (; n.ye(e); ) + ; + } + function TG(n, e) { + for (; n.sd(e); ) + ; + } + function mw(n, e) { + return n.a += e, n; + } + function eO(n, e) { + return n.a += e, n; + } + function c1(n, e) { + return n.a += e, n; + } + function bd(n, e) { + return n.a += e, n; + } + function Wv(n) { + return fl(n), n.a; + } + function yj(n) { + return n.b != n.d.c; + } + function m8n(n) { + return n.l | n.m << 22; + } + function MG(n, e) { + return n.d[e.p]; + } + function k8n(n, e) { + return Q8e(n, e); + } + function AG(n, e, t) { + n.splice(e, t); + } + function y8n(n) { + n.c ? rBn(n) : cBn(n); + } + function jj(n) { + this.a = 0, this.b = n; + } + function j8n() { + this.a = new B7(Pon); + } + function E8n() { + this.b = new B7(won); + } + function C8n() { + this.b = new B7(OK); + } + function T8n() { + this.b = new B7(OK); + } + function M8n() { + throw T(new ye()); + } + function A8n() { + throw T(new ye()); + } + function S8n() { + throw T(new ye()); + } + function P8n() { + throw T(new ye()); + } + function I8n() { + throw T(new ye()); + } + function O8n() { + throw T(new ye()); + } + function D8n() { + throw T(new ye()); + } + function $8n() { + throw T(new ye()); + } + function F8n() { + throw T(new ye()); + } + function x8n() { + throw T(new ye()); + } + function Wie() { + throw T(new ic()); + } + function Xie() { + throw T(new ic()); + } + function L9(n) { + this.a = new L8n(n); + } + function L8n(n) { + cbe(this, n, cve()); + } + function N9(n) { + return !n || iTn(n); + } + function B9(n) { + return Tf[n] != -1; + } + function Vie() { + _A != 0 && (_A = 0), KA = -1; + } + function N8n() { + iR == null && (iR = []); + } + function Qie(n, e) { + $x(R(n.a), e); + } + function Jie(n, e) { + $x(R(n.a), e); + } + function R9(n, e) { + Sw.call(this, n, e); + } + function Qp(n, e) { + R9.call(this, n, e); + } + function SG(n, e) { + this.b = n, this.c = e; + } + function B8n(n, e) { + this.b = n, this.a = e; + } + function R8n(n, e) { + this.a = n, this.b = e; + } + function _8n(n, e) { + this.a = n, this.b = e; + } + function K8n(n, e) { + this.a = n, this.b = e; + } + function H8n(n, e) { + this.a = n, this.b = e; + } + function q8n(n, e) { + this.a = n, this.b = e; + } + function G8n(n, e) { + this.a = n, this.b = e; + } + function z8n(n, e) { + this.a = n, this.b = e; + } + function U8n(n, e) { + this.a = n, this.b = e; + } + function W8n(n, e) { + this.b = n, this.a = e; + } + function X8n(n, e) { + this.b = n, this.a = e; + } + function V8n(n, e) { + this.b = n, this.a = e; + } + function Q8n(n, e) { + this.b = n, this.a = e; + } + function Oe(n, e) { + this.f = n, this.g = e; + } + function Jp(n, e) { + this.e = n, this.d = e; + } + function wd(n, e) { + this.g = n, this.i = e; + } + function tO(n, e) { + this.a = n, this.b = e; + } + function J8n(n, e) { + this.a = n, this.f = e; + } + function Y8n(n, e) { + this.b = n, this.c = e; + } + function Yie(n, e) { + this.a = n, this.b = e; + } + function Z8n(n, e) { + this.a = n, this.b = e; + } + function iO(n, e) { + this.a = n, this.b = e; + } + function n7n(n) { + Bz(n.dc()), this.c = n; + } + function Ej(n) { + this.b = u(pe(n), 83); + } + function e7n(n) { + this.a = u(pe(n), 83); + } + function K0(n) { + this.a = u(pe(n), 15); + } + function t7n(n) { + this.a = u(pe(n), 15); + } + function Cj(n) { + this.b = u(pe(n), 47); + } + function Tj() { + this.q = new j.Date(); + } + function Zf() { + Zf = N, Sin = new tln(); + } + function Yp() { + Yp = N, W4 = new nln(); + } + function Xv(n) { + return n.f.c + n.g.c; + } + function _9(n, e) { + return n.b.Hc(e); + } + function i7n(n, e) { + return n.b.Ic(e); + } + function r7n(n, e) { + return n.b.Qc(e); + } + function c7n(n, e) { + return n.b.Hc(e); + } + function u7n(n, e) { + return n.c.uc(e); + } + function Ah(n, e) { + return n.a._b(e); + } + function s7n(n, e) { + return tt(n.c, e); + } + function o7n(n, e) { + return Uu(n.b, e); + } + function f7n(n, e) { + return n > e && e < L6; + } + function Zie(n, e) { + return n.Gc(e), n; + } + function nre(n, e) { + return Xi(n, e), n; + } + function ere(n) { + return YCn(), n ? pzn : gzn; + } + function s2(n) { + XOn.call(this, n, 0); + } + function h7n() { + AD.call(this, null); + } + function PG() { + P$.call(this, null); + } + function o2(n) { + this.c = n, qPn(this); + } + function Tt() { + yyn(this), _s(this); + } + function _t(n, e) { + fl(n), n.a.Nb(e); + } + function l7n(n, e) { + return n.Gc(e), n; + } + function tre(n, e) { + return n.a.f = e, n; + } + function a7n(n, e) { + return n.a.d = e, n; + } + function d7n(n, e) { + return n.a.g = e, n; + } + function b7n(n, e) { + return n.a.j = e, n; + } + function fo(n, e) { + return n.a.a = e, n; + } + function ho(n, e) { + return n.a.d = e, n; + } + function lo(n, e) { + return n.a.e = e, n; + } + function ao(n, e) { + return n.a.g = e, n; + } + function K9(n, e) { + return n.a.f = e, n; + } + function ire(n) { + return n.b = !1, n; + } + function Zp() { + Zp = N, _in = new Vkn(); + } + function Mj() { + Mj = N, Izn = new Qkn(); + } + function n3() { + n3 = N, Uin = new aln(); + } + function w7n() { + w7n = N, IWn = new Ran(); + } + function Aj() { + Aj = N, SR = new sjn(); + } + function ua() { + ua = N, X4 = new kln(); + } + function Vv() { + Vv = N, DWn = new _an(); + } + function g7n() { + g7n = N, _zn = new Tln(); + } + function IG() { + IG = N, mWn = new jan(); + } + function H9() { + H9 = N, xWn = new Li(); + } + function p7n() { + p7n = N, kWn = new Pan(); + } + function OG() { + OG = N, yWn = new aCn(); + } + function DG() { + DG = N, qrn = new Aan(); + } + function q9() { + q9 = N, LWn = new ddn(); + } + function v7n() { + v7n = N, _Wn = new Jdn(); + } + function Qv() { + Qv = N, UWn = new Dbn(); + } + function Sj() { + Sj = N, jg = new twn(); + } + function m7n() { + m7n = N, bYn = new li(); + } + function Pj() { + Pj = N, DK = new y7n(); + } + function Ij() { + Ij = N, $K = new yjn(); + } + function Jv() { + Jv = N, hy = new lTn(); + } + function Oj() { + Oj = N, LQn = new O2n(); + } + function k7n() { + KIn(), this.c = new JI(); + } + function y7n() { + Oe.call(this, fHn, 0); + } + function gd(n, e) { + Sa(n.c.b, e.c, e); + } + function Yv(n, e) { + Sa(n.c.c, e.b, e); + } + function rre(n, e, t) { + yr(n.d, e.f, t); + } + function cre(n, e, t, i) { + xpe(n, i, e, t); + } + function ure(n, e, t, i) { + i8e(i, n, e, t); + } + function sre(n, e, t, i) { + kCe(i, n, e, t); + } + function Dj(n, e) { + return n.a = e.g, n; + } + function j7n(n, e) { + return G3e(n.a, e); + } + function ore(n) { + return n.b ? n.b : n.a; + } + function fre(n) { + return (n.c + n.a) / 2; + } + function H0() { + H0 = N, Cne = new N2n(); + } + function E7n() { + E7n = N, Dne = new K2n(); + } + function C7n() { + C7n = N, zne = new v9n(); + } + function T7n() { + T7n = N, Une = new m9n(); + } + function Z1() { + Z1 = N, uo = new tG(); + } + function $G() { + $G = N, w1n = new j9n(); + } + function Zv() { + Zv = N, pH = new Ayn(); + } + function u1() { + u1 = N, Ly = new Syn(); + } + function rO() { + rO = N, uee = new t3n(); + } + function er() { + er = N, oee = new i3n(); + } + function $j() { + $j = N, eI = new we(); + } + function FG() { + FG = N, M1n = new X(); + } + function nl() { + nl = N, Jl = new c4n(); + } + function hre(n) { + j.clearTimeout(n); + } + function xG(n) { + this.a = u(pe(n), 224); + } + function Fj(n) { + return u(n, 42).cd(); + } + function G9(n) { + return n.b < n.d.gc(); + } + function M7n(n, e) { + return kD(n.a, e); + } + function A7n(n, e) { + return hc(n, e) > 0; + } + function cO(n, e) { + return hc(n, e) < 0; + } + function n5(n, e) { + return n.a.get(e); + } + function lre(n, e) { + return e.split(n); + } + function S7n(n, e) { + return Uu(n.e, e); + } + function LG(n) { + return _n(n), !1; + } + function xj(n) { + xn.call(this, n, 21); + } + function are(n, e) { + cMn.call(this, n, e); + } + function Lj(n, e) { + Oe.call(this, n, e); + } + function uO(n, e) { + Oe.call(this, n, e); + } + function NG(n) { + _D(), uEn.call(this, n); + } + function BG(n, e) { + fCn(n, n.length, e); + } + function z9(n, e) { + BCn(n, n.length, e); + } + function dre(n, e, t) { + e.ud(n.a.Ge(t)); + } + function bre(n, e, t) { + e.we(n.a.Fe(t)); + } + function wre(n, e, t) { + e.td(n.a.Kb(t)); + } + function gre(n, e, t) { + n.Mb(t) && e.td(t); + } + function e5(n, e, t) { + n.splice(e, 0, t); + } + function pre(n, e) { + return lu(n.e, e); + } + function Nj(n, e) { + this.d = n, this.e = e; + } + function P7n(n, e) { + this.b = n, this.a = e; + } + function I7n(n, e) { + this.b = n, this.a = e; + } + function RG(n, e) { + this.b = n, this.a = e; + } + function O7n(n, e) { + this.a = n, this.b = e; + } + function D7n(n, e) { + this.a = n, this.b = e; + } + function $7n(n, e) { + this.a = n, this.b = e; + } + function F7n(n, e) { + this.a = n, this.b = e; + } + function f2(n, e) { + this.a = n, this.b = e; + } + function _G(n, e) { + this.b = n, this.a = e; + } + function KG(n, e) { + this.b = n, this.a = e; + } + function Bj(n, e) { + Oe.call(this, n, e); + } + function Rj(n, e) { + Oe.call(this, n, e); + } + function HG(n, e) { + Oe.call(this, n, e); + } + function qG(n, e) { + Oe.call(this, n, e); + } + function kw(n, e) { + Oe.call(this, n, e); + } + function sO(n, e) { + Oe.call(this, n, e); + } + function oO(n, e) { + Oe.call(this, n, e); + } + function fO(n, e) { + Oe.call(this, n, e); + } + function _j(n, e) { + Oe.call(this, n, e); + } + function GG(n, e) { + Oe.call(this, n, e); + } + function hO(n, e) { + Oe.call(this, n, e); + } + function U9(n, e) { + Oe.call(this, n, e); + } + function Kj(n, e) { + Oe.call(this, n, e); + } + function lO(n, e) { + Oe.call(this, n, e); + } + function t5(n, e) { + Oe.call(this, n, e); + } + function zG(n, e) { + Oe.call(this, n, e); + } + function zt(n, e) { + Oe.call(this, n, e); + } + function Hj(n, e) { + Oe.call(this, n, e); + } + function x7n(n, e) { + this.a = n, this.b = e; + } + function L7n(n, e) { + this.a = n, this.b = e; + } + function N7n(n, e) { + this.a = n, this.b = e; + } + function B7n(n, e) { + this.a = n, this.b = e; + } + function R7n(n, e) { + this.a = n, this.b = e; + } + function _7n(n, e) { + this.a = n, this.b = e; + } + function K7n(n, e) { + this.a = n, this.b = e; + } + function H7n(n, e) { + this.a = n, this.b = e; + } + function q7n(n, e) { + this.a = n, this.b = e; + } + function UG(n, e) { + this.b = n, this.a = e; + } + function G7n(n, e) { + this.b = n, this.a = e; + } + function z7n(n, e) { + this.b = n, this.a = e; + } + function U7n(n, e) { + this.b = n, this.a = e; + } + function e3(n, e) { + this.c = n, this.d = e; + } + function W7n(n, e) { + this.e = n, this.d = e; + } + function X7n(n, e) { + this.a = n, this.b = e; + } + function V7n(n, e) { + this.b = e, this.c = n; + } + function qj(n, e) { + Oe.call(this, n, e); + } + function W9(n, e) { + Oe.call(this, n, e); + } + function aO(n, e) { + Oe.call(this, n, e); + } + function i5(n, e) { + Oe.call(this, n, e); + } + function WG(n, e) { + Oe.call(this, n, e); + } + function dO(n, e) { + Oe.call(this, n, e); + } + function bO(n, e) { + Oe.call(this, n, e); + } + function X9(n, e) { + Oe.call(this, n, e); + } + function XG(n, e) { + Oe.call(this, n, e); + } + function wO(n, e) { + Oe.call(this, n, e); + } + function r5(n, e) { + Oe.call(this, n, e); + } + function VG(n, e) { + Oe.call(this, n, e); + } + function c5(n, e) { + Oe.call(this, n, e); + } + function u5(n, e) { + Oe.call(this, n, e); + } + function q0(n, e) { + Oe.call(this, n, e); + } + function gO(n, e) { + Oe.call(this, n, e); + } + function pO(n, e) { + Oe.call(this, n, e); + } + function QG(n, e) { + Oe.call(this, n, e); + } + function s5(n, e) { + Oe.call(this, n, e); + } + function vO(n, e) { + Oe.call(this, n, e); + } + function Gj(n, e) { + Oe.call(this, n, e); + } + function V9(n, e) { + Oe.call(this, n, e); + } + function Q9(n, e) { + Oe.call(this, n, e); + } + function h2(n, e) { + Oe.call(this, n, e); + } + function mO(n, e) { + Oe.call(this, n, e); + } + function JG(n, e) { + Oe.call(this, n, e); + } + function kO(n, e) { + Oe.call(this, n, e); + } + function yO(n, e) { + Oe.call(this, n, e); + } + function YG(n, e) { + Oe.call(this, n, e); + } + function jO(n, e) { + Oe.call(this, n, e); + } + function EO(n, e) { + Oe.call(this, n, e); + } + function CO(n, e) { + Oe.call(this, n, e); + } + function TO(n, e) { + Oe.call(this, n, e); + } + function ZG(n, e) { + Oe.call(this, n, e); + } + function Q7n(n, e) { + this.b = n, this.a = e; + } + function J7n(n, e) { + this.a = n, this.b = e; + } + function Y7n(n, e) { + this.a = n, this.b = e; + } + function Z7n(n, e) { + this.a = n, this.b = e; + } + function nkn(n, e) { + this.a = n, this.b = e; + } + function nz(n, e) { + Oe.call(this, n, e); + } + function ez(n, e) { + Oe.call(this, n, e); + } + function ekn(n, e) { + this.b = n, this.d = e; + } + function tz(n, e) { + Oe.call(this, n, e); + } + function iz(n, e) { + Oe.call(this, n, e); + } + function tkn(n, e) { + this.a = n, this.b = e; + } + function ikn(n, e) { + this.a = n, this.b = e; + } + function zj(n, e) { + Oe.call(this, n, e); + } + function o5(n, e) { + Oe.call(this, n, e); + } + function rz(n, e) { + Oe.call(this, n, e); + } + function cz(n, e) { + Oe.call(this, n, e); + } + function uz(n, e) { + Oe.call(this, n, e); + } + function MO(n, e) { + Oe.call(this, n, e); + } + function sz(n, e) { + Oe.call(this, n, e); + } + function AO(n, e) { + Oe.call(this, n, e); + } + function Uj(n, e) { + Oe.call(this, n, e); + } + function SO(n, e) { + Oe.call(this, n, e); + } + function PO(n, e) { + Oe.call(this, n, e); + } + function J9(n, e) { + Oe.call(this, n, e); + } + function IO(n, e) { + Oe.call(this, n, e); + } + function oz(n, e) { + Oe.call(this, n, e); + } + function Y9(n, e) { + Oe.call(this, n, e); + } + function fz(n, e) { + Oe.call(this, n, e); + } + function vre(n, e) { + return lu(n.c, e); + } + function mre(n, e) { + return lu(e.b, n); + } + function kre(n, e) { + return -n.b.Je(e); + } + function hz(n, e) { + return lu(n.g, e); + } + function Z9(n, e) { + Oe.call(this, n, e); + } + function l2(n, e) { + Oe.call(this, n, e); + } + function rkn(n, e) { + this.a = n, this.b = e; + } + function ckn(n, e) { + this.a = n, this.b = e; + } + function fn(n, e) { + this.a = n, this.b = e; + } + function f5(n, e) { + Oe.call(this, n, e); + } + function h5(n, e) { + Oe.call(this, n, e); + } + function n8(n, e) { + Oe.call(this, n, e); + } + function OO(n, e) { + Oe.call(this, n, e); + } + function Wj(n, e) { + Oe.call(this, n, e); + } + function l5(n, e) { + Oe.call(this, n, e); + } + function DO(n, e) { + Oe.call(this, n, e); + } + function Xj(n, e) { + Oe.call(this, n, e); + } + function yw(n, e) { + Oe.call(this, n, e); + } + function e8(n, e) { + Oe.call(this, n, e); + } + function a5(n, e) { + Oe.call(this, n, e); + } + function d5(n, e) { + Oe.call(this, n, e); + } + function t8(n, e) { + Oe.call(this, n, e); + } + function Vj(n, e) { + Oe.call(this, n, e); + } + function jw(n, e) { + Oe.call(this, n, e); + } + function Qj(n, e) { + Oe.call(this, n, e); + } + function ukn(n, e) { + this.a = n, this.b = e; + } + function skn(n, e) { + this.a = n, this.b = e; + } + function okn(n, e) { + this.a = n, this.b = e; + } + function fkn(n, e) { + this.a = n, this.b = e; + } + function hkn(n, e) { + this.a = n, this.b = e; + } + function lkn(n, e) { + this.a = n, this.b = e; + } + function Pi(n, e) { + this.a = n, this.b = e; + } + function Jj(n, e) { + Oe.call(this, n, e); + } + function akn(n, e) { + this.a = n, this.b = e; + } + function dkn(n, e) { + this.a = n, this.b = e; + } + function bkn(n, e) { + this.a = n, this.b = e; + } + function wkn(n, e) { + this.a = n, this.b = e; + } + function gkn(n, e) { + this.a = n, this.b = e; + } + function pkn(n, e) { + this.a = n, this.b = e; + } + function vkn(n, e) { + this.b = n, this.a = e; + } + function mkn(n, e) { + this.b = n, this.a = e; + } + function kkn(n, e) { + this.b = n, this.a = e; + } + function ykn(n, e) { + this.b = n, this.a = e; + } + function jkn(n, e) { + this.a = n, this.b = e; + } + function Ekn(n, e) { + this.a = n, this.b = e; + } + function yre(n, e) { + J9e(n.a, u(e, 56)); + } + function Ckn(n, e) { + f0e(n.a, u(e, 11)); + } + function jre(n, e) { + return f3(), e != n; + } + function Tkn() { + return Q9n(), new Szn(); + } + function Mkn() { + c$(), this.b = new hi(); + } + function Akn() { + hM(), this.a = new hi(); + } + function Skn() { + tX(), lW.call(this); + } + function a2(n, e) { + Oe.call(this, n, e); + } + function Pkn(n, e) { + this.a = n, this.b = e; + } + function Ikn(n, e) { + this.a = n, this.b = e; + } + function Yj(n, e) { + this.a = n, this.b = e; + } + function Okn(n, e) { + this.a = n, this.b = e; + } + function Dkn(n, e) { + this.a = n, this.b = e; + } + function $kn(n, e) { + this.a = n, this.b = e; + } + function Fkn(n, e) { + this.d = n, this.b = e; + } + function lz(n, e) { + this.d = n, this.e = e; + } + function xkn(n, e) { + this.f = n, this.c = e; + } + function i8(n, e) { + this.b = n, this.c = e; + } + function az(n, e) { + this.i = n, this.g = e; + } + function Lkn(n, e) { + this.e = n, this.a = e; + } + function Nkn(n, e) { + this.a = n, this.b = e; + } + function dz(n, e) { + n.i = null, nT(n, e); + } + function Ere(n, e) { + n && it($y, n, e); + } + function Bkn(n, e) { + return NF(n.a, e); + } + function Zj(n) { + return g7(n.c, n.b); + } + function Vr(n) { + return n ? n.dd() : null; + } + function B(n) { + return n ?? null; + } + function G0(n) { + return typeof n === X2; + } + function z0(n) { + return typeof n === UZ; + } + function yi(n) { + return typeof n === EL; + } + function el(n, e) { + return n.Hd().Xb(e); + } + function nE(n, e) { + return Rbe(n.Kc(), e); + } + function pd(n, e) { + return hc(n, e) == 0; + } + function Cre(n, e) { + return hc(n, e) >= 0; + } + function b5(n, e) { + return hc(n, e) != 0; + } + function Tre(n) { + return "" + (_n(n), n); + } + function r8(n, e) { + return n.substr(e); + } + function Rkn(n) { + return $u(n), n.d.gc(); + } + function $O(n) { + return yme(n, n.c), n; + } + function eE(n) { + return A5(n == null), n; + } + function w5(n, e) { + return n.a += "" + e, n; + } + function br(n, e) { + return n.a += "" + e, n; + } + function g5(n, e) { + return n.a += "" + e, n; + } + function rc(n, e) { + return n.a += "" + e, n; + } + function De(n, e) { + return n.a += "" + e, n; + } + function bz(n, e) { + return n.a += "" + e, n; + } + function _kn(n, e) { + Ht(n, e, n.a, n.a.a); + } + function sa(n, e) { + Ht(n, e, n.c.b, n.c); + } + function Mre(n, e, t) { + VFn(e, Mx(n, t)); + } + function Are(n, e, t) { + VFn(e, Mx(n, t)); + } + function Sre(n, e) { + k0e(new ie(n), e); + } + function Kkn(n, e) { + n.q.setTime(Fd(e)); + } + function Hkn(n, e) { + kW.call(this, n, e); + } + function qkn(n, e) { + kW.call(this, n, e); + } + function FO(n, e) { + kW.call(this, n, e); + } + function Gkn(n) { + Eu(this), Z5(this, n); + } + function wz(n) { + return Ln(n, 0), null; + } + function Lo(n) { + return n.a = 0, n.b = 0, n; + } + function zkn(n, e) { + return n.a = e.g + 1, n; + } + function Pre(n, e) { + return n.j[e.p] == 2; + } + function gz(n) { + return lhe(u(n, 79)); + } + function Ukn() { + Ukn = N, jUn = Fe(qF()); + } + function Wkn() { + Wkn = N, RWn = Fe(PNn()); + } + function Xkn() { + this.b = new s2(ob(12)); + } + function Vkn() { + this.b = 0, this.a = !1; + } + function Qkn() { + this.b = 0, this.a = !1; + } + function p5(n) { + this.a = n, TI.call(this); + } + function Jkn(n) { + this.a = n, TI.call(this); + } + function In(n, e) { + ri.call(this, n, e); + } + function xO(n, e) { + Q0.call(this, n, e); + } + function Ew(n, e) { + az.call(this, n, e); + } + function LO(n, e) { + K3.call(this, n, e); + } + function Ykn(n, e) { + c8.call(this, n, e); + } + function He(n, e) { + $j(), it(eI, n, e); + } + function NO(n, e) { + return Zu(n.a, 0, e); + } + function Zkn(n, e) { + return n.a.a.a.cc(e); + } + function nyn(n, e) { + return B(n) === B(e); + } + function Ire(n, e) { + return ni(n.a, e.a); + } + function Ore(n, e) { + return Uc(n.a, e.a); + } + function Dre(n, e) { + return xCn(n.a, e.a); + } + function Pf(n, e) { + return n.indexOf(e); + } + function vd(n, e) { + return n == e ? 0 : n ? 1 : -1; + } + function tE(n) { + return n < 10 ? "0" + n : "" + n; + } + function $re(n) { + return pe(n), new p5(n); + } + function eyn(n) { + return Nc(n.l, n.m, n.h); + } + function t3(n) { + return Gt((_n(n), n)); + } + function Fre(n) { + return Gt((_n(n), n)); + } + function tyn(n, e) { + return Uc(n.g, e.g); + } + function Fr(n) { + return typeof n === UZ; + } + function xre(n) { + return n == w0 || n == qb; + } + function Lre(n) { + return n == w0 || n == Hb; + } + function pz(n) { + return xr(n.b.b, n, 0); + } + function iyn(n) { + this.a = Tkn(), this.b = n; + } + function ryn(n) { + this.a = Tkn(), this.b = n; + } + function Nre(n, e) { + return W(n.a, e), e; + } + function Bre(n, e) { + return W(n.c, e), n; + } + function cyn(n, e) { + return cs(n.a, e), n; + } + function Rre(n, e) { + return wo(), e.a += n; + } + function _re(n, e) { + return wo(), e.a += n; + } + function Kre(n, e) { + return wo(), e.c += n; + } + function vz(n, e) { + A3(n, 0, n.length, e); + } + function Sh() { + Tq.call(this, new wa()); + } + function uyn() { + xE.call(this, 0, 0, 0, 0); + } + function d2() { + ys.call(this, 0, 0, 0, 0); + } + function kr(n) { + this.a = n.a, this.b = n.b; + } + function tl(n) { + return n == Zs || n == Ao; + } + function i3(n) { + return n == Yh || n == Jh; + } + function syn(n) { + return n == xg || n == Fg; + } + function Cw(n) { + return n != jf && n != ql; + } + function qu(n) { + return n.Lg() && n.Mg(); + } + function oyn(n) { + return JE(u(n, 118)); + } + function iE(n) { + return cs(new li(), n); + } + function fyn(n, e) { + return new K3(e, n); + } + function Hre(n, e) { + return new K3(e, n); + } + function mz(n, e, t) { + UC(n, e), WC(n, t); + } + function rE(n, e, t) { + _d(n, e), Rd(n, t); + } + function Jo(n, e, t) { + Zc(n, e), nu(n, t); + } + function cE(n, e, t) { + O3(n, e), $3(n, t); + } + function uE(n, e, t) { + D3(n, e), F3(n, t); + } + function BO(n, e) { + W3(n, e), x3(n, n.D); + } + function kz(n) { + xkn.call(this, n, !0); + } + function hyn(n, e, t) { + fU.call(this, n, e, t); + } + function il(n) { + jl(), qbe.call(this, n); + } + function lyn() { + Lj.call(this, "Head", 1); + } + function ayn() { + Lj.call(this, "Tail", 3); + } + function RO(n) { + n.c = F(Zn, rn, 1, 0, 5, 1); + } + function dyn(n) { + n.a = F(Zn, rn, 1, 8, 5, 1); + } + function byn(n) { + Yc(n.xf(), new t5n(n)); + } + function Tw(n) { + return n != null ? kt(n) : 0; + } + function qre(n, e) { + return fb(e, nf(n)); + } + function Gre(n, e) { + return fb(e, nf(n)); + } + function zre(n, e) { + return n[n.length] = e; + } + function Ure(n, e) { + return n[n.length] = e; + } + function yz(n) { + return zoe(n.b.Kc(), n.a); + } + function Wre(n, e) { + return ZC(BD(n.d), e); + } + function Xre(n, e) { + return ZC(BD(n.g), e); + } + function Vre(n, e) { + return ZC(BD(n.j), e); + } + function tr(n, e) { + ri.call(this, n.b, e); + } + function md(n) { + xE.call(this, n, n, n, n); + } + function jz(n) { + return n.b && uL(n), n.a; + } + function Ez(n) { + return n.b && uL(n), n.c; + } + function Qre(n, e) { + pf || (n.b = e); + } + function _O(n, e, t) { + return St(n, e, t), t; + } + function wyn(n, e, t) { + St(n.c[e.g], e.g, t); + } + function Jre(n, e, t) { + u(n.c, 69).Xh(e, t); + } + function Yre(n, e, t) { + Jo(t, t.i + n, t.j + e); + } + function Zre(n, e) { + me(wc(n.a), PMn(e)); + } + function nce(n, e) { + me(Ou(n.a), IMn(e)); + } + function v5(n) { + Je(), ud.call(this, n); + } + function ece(n) { + return n == null ? 0 : kt(n); + } + function gyn() { + gyn = N, hK = new f6(cH); + } + function je() { + je = N, new pyn(), new X(); + } + function pyn() { + new we(), new we(), new we(); + } + function Cz() { + Cz = N, Hq(), bin = new we(); + } + function Yo() { + Yo = N, j.Math.log(2); + } + function ms() { + ms = N, Eh = (E7n(), Dne); + } + function tce() { + throw T(new i1(izn)); + } + function ice() { + throw T(new i1(izn)); + } + function rce() { + throw T(new i1(rzn)); + } + function cce() { + throw T(new i1(rzn)); + } + function vyn(n) { + this.a = n, HU.call(this, n); + } + function KO(n) { + this.a = n, Ej.call(this, n); + } + function HO(n) { + this.a = n, Ej.call(this, n); + } + function wi(n, e) { + mD(n.c, n.c.length, e); + } + function Kr(n) { + return n.a < n.c.c.length; + } + function Tz(n) { + return n.a < n.c.a.length; + } + function myn(n, e) { + return n.a ? n.b : e.De(); + } + function Uc(n, e) { + return n < e ? -1 : n > e ? 1 : 0; + } + function kyn(n, e) { + return hc(n, e) > 0 ? n : e; + } + function Nc(n, e, t) { + return { l: n, m: e, h: t }; + } + function uce(n, e) { + n.a != null && Ckn(e, n.a); + } + function yyn(n) { + n.a = new aI(), n.c = new aI(); + } + function sE(n) { + this.b = n, this.a = new X(); + } + function jyn(n) { + this.b = new san(), this.a = n; + } + function Mz(n) { + vU.call(this), this.a = n; + } + function Eyn() { + Lj.call(this, "Range", 2); + } + function Cyn() { + kJ(), this.a = new B7(Hrn); + } + function sce(n, e) { + pe(e), Iw(n).Jc(new Ku()); + } + function oce(n, e) { + return ns(), e.n.b += n; + } + function fce(n, e, t) { + return it(n.g, t, e); + } + function hce(n, e, t) { + return it(n.k, t, e); + } + function lce(n, e) { + return it(n.a, e.a, e); + } + function Mw(n, e, t) { + return _Q(e, t, n.c); + } + function Az(n) { + return new fn(n.c, n.d); + } + function ace(n) { + return new fn(n.c, n.d); + } + function Qr(n) { + return new fn(n.a, n.b); + } + function Tyn(n, e) { + return xEe(n.a, e, null); + } + function dce(n) { + Ki(n, null), Ti(n, null); + } + function Myn(n) { + s$(n, null), o$(n, null); + } + function Ayn() { + c8.call(this, null, null); + } + function Syn() { + wE.call(this, null, null); + } + function Sz(n) { + this.a = n, we.call(this); + } + function bce(n) { + this.b = (Pn(), new DI(n)); + } + function oE(n) { + n.j = F(Ain, q, 310, 0, 0, 1); + } + function wce(n, e, t) { + n.c.Vc(e, u(t, 133)); + } + function gce(n, e, t) { + n.c.ji(e, u(t, 133)); + } + function Pyn(n, e) { + de(n), n.Gc(u(e, 15)); + } + function m5(n, e) { + return Jje(n.c, n.b, e); + } + function pce(n, e) { + return new Jyn(n.Kc(), e); + } + function qO(n, e) { + return gwe(n.Kc(), e) != -1; + } + function Pz(n, e) { + return n.a.Bc(e) != null; + } + function fE(n) { + return n.Ob() ? n.Pb() : null; + } + function Iyn(n) { + return Hs(n, 0, n.length); + } + function I(n, e) { + return n != null && WF(n, e); + } + function vce(n, e) { + n.q.setHours(e), S6(n, e); + } + function Oyn(n, e) { + n.c && (ZU(e), iMn(e)); + } + function mce(n, e, t) { + u(n.Kb(t), 164).Nb(e); + } + function kce(n, e, t) { + return SEe(n, e, t), t; + } + function Dyn(n, e, t) { + n.a = e ^ 1502, n.b = t ^ tN; + } + function GO(n, e, t) { + return n.a[e.g][t.g]; + } + function Zo(n, e) { + return n.a[e.c.p][e.p]; + } + function yce(n, e) { + return n.e[e.c.p][e.p]; + } + function jce(n, e) { + return n.c[e.c.p][e.p]; + } + function Ece(n, e) { + return n.j[e.p] = D9e(e); + } + function Cce(n, e) { + return DX(n.f, e.tg()); + } + function Tce(n, e) { + return DX(n.b, e.tg()); + } + function Mce(n, e) { + return n.a < PU(e) ? -1 : 1; + } + function Ace(n, e, t) { + return t ? e != 0 : e != n - 1; + } + function Sce(n, e, t) { + return n.a = e, n.b = t, n; + } + function If(n, e) { + return n.a *= e, n.b *= e, n; + } + function k5(n, e, t) { + return St(n.g, e, t), t; + } + function Pce(n, e, t, i) { + St(n.a[e.g], t.g, i); + } + function Ice(n, e) { + W0(e, n.a.a.a, n.a.a.b); + } + function $yn(n) { + n.a = u(Rn(n.b.a, 4), 126); + } + function Fyn(n) { + n.a = u(Rn(n.b.a, 4), 126); + } + function Oce(n) { + T8(n, Oqn), _x(n, DCe(n)); + } + function r3() { + r3 = N, UA = new dj(null); + } + function Iz() { + Iz = N, Iz(), Ozn = new lln(); + } + function Oz() { + this.Bb |= 256, this.Bb |= 512; + } + function ie(n) { + this.i = n, this.f = this.i.j; + } + function Yt(n, e, t) { + v8.call(this, n, e, t); + } + function hE(n, e, t) { + Yt.call(this, n, e, t); + } + function hu(n, e, t) { + Yt.call(this, n, e, t); + } + function xyn(n, e, t) { + hE.call(this, n, e, t); + } + function Dz(n, e, t) { + v8.call(this, n, e, t); + } + function Aw(n, e, t) { + v8.call(this, n, e, t); + } + function $z(n, e, t) { + ME.call(this, n, e, t); + } + function Lyn(n, e, t) { + ME.call(this, n, e, t); + } + function Nyn(n, e, t) { + $z.call(this, n, e, t); + } + function Byn(n, e, t) { + Dz.call(this, n, e, t); + } + function Sw(n, e) { + this.a = n, Ej.call(this, e); + } + function Ryn(n, e) { + this.a = n, QI.call(this, e); + } + function _yn(n, e) { + this.a = n, QI.call(this, e); + } + function Kyn(n, e) { + this.a = n, QI.call(this, e); + } + function Fz(n) { + this.a = n, bvn.call(this, n.d); + } + function rl(n) { + this.c = n, this.a = this.c.a; + } + function xz(n, e) { + this.a = e, QI.call(this, n); + } + function Hyn(n, e) { + this.a = e, m$.call(this, n); + } + function qyn(n, e) { + this.a = n, m$.call(this, e); + } + function Dce(n, e) { + return vW(CD(n.c)).Xb(e); + } + function Lz(n, e) { + return Wge(n, new V1(), e).a; + } + function ue(n, e) { + return pe(e), new Gyn(n, e); + } + function Gyn(n, e) { + this.a = e, Cj.call(this, n); + } + function Nz(n) { + this.b = n, this.a = this.b.a.e; + } + function zyn(n) { + n.b.Qb(), --n.d.f.d, NE(n.d); + } + function Uyn(n) { + AI.call(this, u(pe(n), 35)); + } + function Wyn(n) { + AI.call(this, u(pe(n), 35)); + } + function Xyn() { + Oe.call(this, "INSTANCE", 0); + } + function Bz(n) { + if (!n) + throw T(new F9()); + } + function Rz(n) { + if (!n) + throw T(new ou()); + } + function _z(n) { + if (!n) + throw T(new ic()); + } + function Vyn() { + Vyn = N, rO(), see = new Z4n(); + } + function qn() { + qn = N, Ga = !1, G4 = !0; + } + function Bs(n) { + A9.call(this, (_n(n), n)); + } + function Yu(n) { + A9.call(this, (_n(n), n)); + } + function lE(n) { + Rp.call(this, n), this.a = n; + } + function Kz(n) { + _p.call(this, n), this.a = n; + } + function Hz(n) { + Up.call(this, n), this.a = n; + } + function Qyn() { + oE(this), eC(this), this._d(); + } + function Jyn(n, e) { + this.a = e, Cj.call(this, n); + } + function Yyn(n, e) { + return new Uxn(n.a, n.b, e); + } + function aE(n, e) { + return n.lastIndexOf(e); + } + function qz(n, e, t) { + return n.indexOf(e, t); + } + function y5(n) { + return n == null ? iu : Nr(n); + } + function $ce(n) { + return n == null ? null : n.name; + } + function Gz(n) { + return n.a != null ? n.a : null; + } + function Fce(n) { + return yj(n.a) ? FMn(n) : null; + } + function zO(n, e) { + return R5(n.a, e) != null; + } + function lu(n, e) { + return !!e && n.b[e.g] == e; + } + function kd(n) { + return n.$H || (n.$H = ++WTe); + } + function xce(n) { + return n.l + n.m * J2 + n.h * Fa; + } + function Zyn(n, e) { + return W(e.a, n.a), n.a; + } + function njn(n, e) { + return W(e.b, n.a), n.a; + } + function yd(n, e) { + return W(e.a, n.a), n.a; + } + function jd(n) { + return ne(n.a != null), n.a; + } + function UO(n) { + Tq.call(this, new _X(n)); + } + function zz(n, e) { + UQ.call(this, n, e, null); + } + function j5(n) { + this.a = n, mq.call(this, n); + } + function dE() { + dE = N, JA = new ri(OKn, 0); + } + function bE(n, e) { + return ++n.b, W(n.a, e); + } + function Uz(n, e) { + return ++n.b, Qc(n.a, e); + } + function Lce(n, e) { + return ni(n.n.a, e.n.a); + } + function Nce(n, e) { + return ni(n.c.d, e.c.d); + } + function Bce(n, e) { + return ni(n.c.c, e.c.c); + } + function Wc(n, e) { + return u(ct(n.b, e), 15); + } + function Rce(n, e) { + return n.n.b = (_n(e), e); + } + function _ce(n, e) { + return n.n.b = (_n(e), e); + } + function E5(n) { + return Kr(n.a) || Kr(n.b); + } + function Kce(n, e, t) { + return AAn(n, e, t, n.b); + } + function Wz(n, e, t) { + return AAn(n, e, t, n.c); + } + function Xz(n, e, t) { + u(q8(n, e), 21).Fc(t); + } + function Hce(n, e, t) { + MF(n.a, t), KT(n.a, e); + } + function c8(n, e) { + Zv(), this.a = n, this.b = e; + } + function wE(n, e) { + u1(), this.b = n, this.c = e; + } + function WO(n, e) { + ED(), this.f = e, this.d = n; + } + function Vz(n, e) { + $X(e, n), this.d = n, this.c = e; + } + function s1(n) { + var e; + e = n.a, n.a = n.b, n.b = e; + } + function qce(n) { + return wo(), !!n && !n.dc(); + } + function Gce(n) { + return new rb(3, n); + } + function Qz(n, e) { + return new Jjn(n, n.gc(), e); + } + function zce(n) { + return aj(), $e((jMn(), azn), n); + } + function b2(n) { + this.d = n, ie.call(this, n); + } + function w2(n) { + this.c = n, ie.call(this, n); + } + function u8(n) { + this.c = n, b2.call(this, n); + } + function ejn() { + Qv(), this.b = new B5n(this); + } + function nh(n) { + return rs(n, Ib), new Ic(n); + } + function tjn(n) { + return m3(), parseInt(n) || -1; + } + function Zu(n, e, t) { + return n.substr(e, t - e); + } + function c3(n, e, t) { + return qz(n, tu(e), t); + } + function XO(n) { + return IW(n.c, n.c.length); + } + function Uce(n) { + return n.f != null ? n.f : "" + n.g; + } + function VO(n) { + return n.f != null ? n.f : "" + n.g; + } + function QO(n) { + return ne(n.b != 0), n.a.a.c; + } + function gE(n) { + return ne(n.b != 0), n.c.b.c; + } + function s8(n) { + I(n, 150) && u(n, 150).Gh(); + } + function pE(n) { + return n.b = u($Tn(n.a), 42); + } + function Jz(n) { + Zp(), this.b = n, this.a = !0; + } + function ijn(n) { + Mj(), this.b = n, this.a = !0; + } + function rjn(n) { + n.d = new ujn(n), n.e = new we(); + } + function cjn(n) { + if (!n) + throw T(new vs()); + } + function Yz(n) { + if (!n) + throw T(new F9()); + } + function U0(n) { + if (!n) + throw T(new ou()); + } + function Wce(n) { + if (!n) + throw T(new xI()); + } + function ne(n) { + if (!n) + throw T(new ic()); + } + function ujn(n) { + qU.call(this, n, null, null); + } + function sjn() { + Oe.call(this, "POLYOMINO", 0); + } + function ojn(n, e, t, i) { + pW.call(this, n, e, t, i); + } + function Xce(n, e) { + return yl(), Tn(n, e.e, e); + } + function Vce(n, e, t) { + return Oj(), t.qg(n, e); + } + function ai(n, e) { + return !!n.q && Uu(n.q, e); + } + function Qce(n, e) { + return n > 0 ? e * e / n : e * e * 100; + } + function Jce(n, e) { + return n > 0 ? e / (n * n) : e * 100; + } + function Yce(n, e, t) { + return W(e, e$n(n, t)); + } + function Zce(n, e, t) { + DC(), n.Xe(e) && t.td(n); + } + function u3(n, e, t) { + var i; + i = n.Zc(e), i.Rb(t); + } + function W0(n, e, t) { + return n.a += e, n.b += t, n; + } + function nue(n, e, t) { + return n.a *= e, n.b *= t, n; + } + function o8(n, e, t) { + return n.a -= e, n.b -= t, n; + } + function Zz(n, e) { + return n.a = e.a, n.b = e.b, n; + } + function vE(n) { + return n.a = -n.a, n.b = -n.b, n; + } + function fjn(n) { + this.c = n, this.a = 1, this.b = 1; + } + function hjn(n) { + this.c = n, Zc(n, 0), nu(n, 0); + } + function ljn(n) { + Tt.call(this), V5(this, n); + } + function ajn(n) { + yL(), Nmn(this), this.mf(n); + } + function djn(n, e) { + Zv(), c8.call(this, n, e); + } + function nU(n, e) { + u1(), wE.call(this, n, e); + } + function bjn(n, e) { + u1(), wE.call(this, n, e); + } + function wjn(n, e) { + u1(), nU.call(this, n, e); + } + function Gu(n, e, t) { + Xu.call(this, n, e, t, 2); + } + function JO(n, e) { + ms(), FE.call(this, n, e); + } + function gjn(n, e) { + ms(), JO.call(this, n, e); + } + function eU(n, e) { + ms(), JO.call(this, n, e); + } + function pjn(n, e) { + ms(), eU.call(this, n, e); + } + function tU(n, e) { + ms(), FE.call(this, n, e); + } + function vjn(n, e) { + ms(), tU.call(this, n, e); + } + function mjn(n, e) { + ms(), FE.call(this, n, e); + } + function eue(n, e) { + return n.c.Fc(u(e, 133)); + } + function iU(n, e, t) { + return jM(G8(n, e), t); + } + function tue(n, e, t) { + return e.Qk(n.e, n.c, t); + } + function iue(n, e, t) { + return e.Rk(n.e, n.c, t); + } + function YO(n, e) { + return pl(n.e, u(e, 49)); + } + function rue(n, e, t) { + s6(Ou(n.a), e, IMn(t)); + } + function cue(n, e, t) { + s6(wc(n.a), e, PMn(t)); + } + function rU(n, e) { + e.$modCount = n.$modCount; + } + function C5() { + C5 = N, Xm = new yt("root"); + } + function s3() { + s3 = N, xy = new w9n(), new g9n(); + } + function kjn() { + this.a = new Dd(), this.b = new Dd(); + } + function cU() { + RIn.call(this), this.Bb |= Ji; + } + function yjn() { + Oe.call(this, "GROW_TREE", 0); + } + function uue(n) { + return n == null ? null : CCe(n); + } + function sue(n) { + return n == null ? null : D5e(n); + } + function oue(n) { + return n == null ? null : Nr(n); + } + function fue(n) { + return n == null ? null : Nr(n); + } + function Ph(n) { + n.o == null && u9e(n); + } + function sn(n) { + return A5(n == null || G0(n)), n; + } + function Y(n) { + return A5(n == null || z0(n)), n; + } + function Ce(n) { + return A5(n == null || yi(n)), n; + } + function uU(n) { + this.q = new j.Date(Fd(n)); + } + function f8(n, e) { + this.c = n, Jp.call(this, n, e); + } + function mE(n, e) { + this.a = n, f8.call(this, n, e); + } + function hue(n, e) { + this.d = n, Ovn(this), this.b = e; + } + function sU(n, e) { + P$.call(this, n), this.a = e; + } + function oU(n, e) { + P$.call(this, n), this.a = e; + } + function lue(n) { + xQ.call(this, 0, 0), this.f = n; + } + function fU(n, e, t) { + IC.call(this, n, e, t, null); + } + function jjn(n, e, t) { + IC.call(this, n, e, t, null); + } + function aue(n, e, t) { + return n.ue(e, t) <= 0 ? t : e; + } + function due(n, e, t) { + return n.ue(e, t) <= 0 ? e : t; + } + function bue(n, e) { + return u(Ld(n.b, e), 149); + } + function wue(n, e) { + return u(Ld(n.c, e), 229); + } + function ZO(n) { + return u(un(n.a, n.b), 287); + } + function Ejn(n) { + return new fn(n.c, n.d + n.a); + } + function Cjn(n) { + return ns(), syn(u(n, 197)); + } + function X0() { + X0 = N, prn = Cn((Qu(), rd)); + } + function gue(n, e) { + e.a ? e7e(n, e) : zO(n.a, e.b); + } + function Tjn(n, e) { + pf || W(n.a, e); + } + function pue(n, e) { + return H9(), _3(e.d.i, n); + } + function vue(n, e) { + return x2(), new ABn(e, n); + } + function Of(n, e) { + return T8(e, ann), n.f = e, n; + } + function hU(n, e, t) { + return t = os(n, e, 3, t), t; + } + function lU(n, e, t) { + return t = os(n, e, 6, t), t; + } + function aU(n, e, t) { + return t = os(n, e, 9, t), t; + } + function h8(n, e, t) { + ++n.j, n.Ki(), A$(n, e, t); + } + function Mjn(n, e, t) { + ++n.j, n.Hi(e, n.oi(e, t)); + } + function Ajn(n, e, t) { + var i; + i = n.Zc(e), i.Rb(t); + } + function Sjn(n, e, t) { + return MZ(n.c, n.b, e, t); + } + function dU(n, e) { + return (e & nt) % n.d.length; + } + function ri(n, e) { + yt.call(this, n), this.a = e; + } + function bU(n, e) { + xq.call(this, n), this.a = e; + } + function nD(n, e) { + xq.call(this, n), this.a = e; + } + function Pjn(n, e) { + this.c = n, Nd.call(this, e); + } + function Ijn(n, e) { + this.a = n, Omn.call(this, e); + } + function l8(n, e) { + this.a = n, Omn.call(this, e); + } + function Ojn(n) { + this.a = (rs(n, Ib), new Ic(n)); + } + function Djn(n) { + this.a = (rs(n, Ib), new Ic(n)); + } + function a8(n) { + return !n.a && (n.a = new nr()), n.a; + } + function $jn(n) { + return n > 8 ? 0 : n + 1; + } + function mue(n, e) { + return qn(), n == e ? 0 : n ? 1 : -1; + } + function wU(n, e, t) { + return m2(n, u(e, 22), t); + } + function kue(n, e, t) { + return n.apply(e, t); + } + function Fjn(n, e, t) { + return n.a += Hs(e, 0, t), n; + } + function gU(n, e) { + var t; + return t = n.e, n.e = e, t; + } + function yue(n, e) { + var t; + t = n[eN], t.call(n, e); + } + function jue(n, e) { + var t; + t = n[eN], t.call(n, e); + } + function V0(n, e) { + n.a.Vc(n.b, e), ++n.b, n.c = -1; + } + function xjn(n) { + Eu(n.e), n.d.b = n.d, n.d.a = n.d; + } + function d8(n) { + n.b ? d8(n.b) : n.f.c.zc(n.e, n.d); + } + function Eue(n, e, t) { + ua(), Svn(n, e.Ce(n.a, t)); + } + function Cue(n, e) { + return nO(p$n(n.a, e, !0)); + } + function Tue(n, e) { + return nO(v$n(n.a, e, !0)); + } + function bo(n, e) { + return pj(new Array(e), n); + } + function eD(n) { + return String.fromCharCode(n); + } + function Mue(n) { + return n == null ? null : n.message; + } + function Ljn() { + this.a = new X(), this.b = new X(); + } + function Njn() { + this.a = new LH(), this.b = new Umn(); + } + function Bjn() { + this.b = new Li(), this.c = new X(); + } + function pU() { + this.d = new Li(), this.e = new Li(); + } + function vU() { + this.n = new Li(), this.o = new Li(); + } + function kE() { + this.n = new i2(), this.i = new d2(); + } + function Rjn() { + this.a = new v4n(), this.b = new cwn(); + } + function _jn() { + this.a = new X(), this.d = new X(); + } + function Kjn() { + this.b = new hi(), this.a = new hi(); + } + function Hjn() { + this.b = new we(), this.a = new we(); + } + function qjn() { + this.b = new E8n(), this.a = new sgn(); + } + function Gjn() { + kE.call(this), this.a = new Li(); + } + function T5(n) { + Jbe.call(this, n, (FC(), vR)); + } + function mU(n, e, t, i) { + xE.call(this, n, e, t, i); + } + function Aue(n, e, t) { + t != null && JC(e, rx(n, t)); + } + function Sue(n, e, t) { + t != null && YC(e, rx(n, t)); + } + function kU(n, e, t) { + return t = os(n, e, 11, t), t; + } + function st(n, e) { + return n.a += e.a, n.b += e.b, n; + } + function ji(n, e) { + return n.a -= e.a, n.b -= e.b, n; + } + function Pue(n, e) { + return n.n.a = (_n(e), e + 10); + } + function Iue(n, e) { + return n.n.a = (_n(e), e + 10); + } + function Oue(n, e) { + return e == n || s4(sM(e), n); + } + function zjn(n, e) { + return it(n.a, e, "") == null; + } + function Due(n, e) { + return H9(), !_3(e.d.i, n); + } + function $ue(n, e) { + tl(n.f) ? Qme(n, e) : Fve(n, e); + } + function Fue(n, e) { + var t; + return t = e.Hh(n.a), t; + } + function Q0(n, e) { + mr.call(this, rm + n + _a + e); + } + function g2(n, e, t, i) { + V.call(this, n, e, t, i); + } + function yU(n, e, t, i) { + V.call(this, n, e, t, i); + } + function Ujn(n, e, t, i) { + yU.call(this, n, e, t, i); + } + function Wjn(n, e, t, i) { + zE.call(this, n, e, t, i); + } + function tD(n, e, t, i) { + zE.call(this, n, e, t, i); + } + function jU(n, e, t, i) { + zE.call(this, n, e, t, i); + } + function Xjn(n, e, t, i) { + tD.call(this, n, e, t, i); + } + function EU(n, e, t, i) { + tD.call(this, n, e, t, i); + } + function Fn(n, e, t, i) { + jU.call(this, n, e, t, i); + } + function Vjn(n, e, t, i) { + EU.call(this, n, e, t, i); + } + function Qjn(n, e, t, i) { + yW.call(this, n, e, t, i); + } + function Jjn(n, e, t) { + this.a = n, Vz.call(this, e, t); + } + function Yjn(n, e, t) { + this.c = e, this.b = t, this.a = n; + } + function xue(n, e, t) { + return n.d = u(e.Kb(t), 164); + } + function CU(n, e) { + return n.Aj().Nh().Kh(n, e); + } + function TU(n, e) { + return n.Aj().Nh().Ih(n, e); + } + function Zjn(n, e) { + return _n(n), B(n) === B(e); + } + function An(n, e) { + return _n(n), B(n) === B(e); + } + function iD(n, e) { + return nO(p$n(n.a, e, !1)); + } + function rD(n, e) { + return nO(v$n(n.a, e, !1)); + } + function Lue(n, e) { + return n.b.sd(new D7n(n, e)); + } + function Nue(n, e) { + return n.b.sd(new $7n(n, e)); + } + function nEn(n, e) { + return n.b.sd(new F7n(n, e)); + } + function MU(n, e, t) { + return n.lastIndexOf(e, t); + } + function Bue(n, e, t) { + return ni(n[e.b], n[t.b]); + } + function Rue(n, e) { + return H(e, (nn(), Jk), n); + } + function _ue(n, e) { + return Uc(e.a.d.p, n.a.d.p); + } + function Kue(n, e) { + return Uc(n.a.d.p, e.a.d.p); + } + function Hue(n, e) { + return ni(n.c - n.s, e.c - e.s); + } + function eEn(n) { + return n.c ? xr(n.c.a, n, 0) : -1; + } + function que(n) { + return n < 100 ? null : new Q1(n); + } + function p2(n) { + return n == id || n == jh || n == Sc; + } + function tEn(n, e) { + return I(e, 15) && oBn(n.c, e); + } + function Gue(n, e) { + pf || e && (n.d = e); + } + function cD(n, e) { + var t; + return t = e, !!VV(n, t); + } + function AU(n, e) { + this.c = n, DD.call(this, n, e); + } + function iEn(n) { + this.c = n, FO.call(this, IM, 0); + } + function rEn(n, e) { + Voe.call(this, n, n.length, e); + } + function zue(n, e, t) { + return u(n.c, 69).lk(e, t); + } + function yE(n, e, t) { + return u(n.c, 69).mk(e, t); + } + function Uue(n, e, t) { + return tue(n, u(e, 332), t); + } + function SU(n, e, t) { + return iue(n, u(e, 332), t); + } + function Wue(n, e, t) { + return txn(n, u(e, 332), t); + } + function cEn(n, e, t) { + return zve(n, u(e, 332), t); + } + function M5(n, e) { + return e == null ? null : db(n.b, e); + } + function PU(n) { + return z0(n) ? (_n(n), n) : n.ke(); + } + function jE(n) { + return !isNaN(n) && !isFinite(n); + } + function uEn(n) { + Df(), this.a = (Pn(), new Up(n)); + } + function b8(n) { + f3(), this.d = n, this.a = new gw(); + } + function ks(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function sEn(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function oEn(n, e, t) { + this.d = n, this.b = t, this.a = e; + } + function uD(n) { + yyn(this), _s(this), Xi(this, n); + } + function au(n) { + RO(this), GU(this.c, 0, n.Pc()); + } + function fEn(n) { + Wu(n.a), uPn(n.c, n.b), n.b = null; + } + function hEn(n) { + this.a = n, Zf(), eu(Date.now()); + } + function lEn() { + lEn = N, Xin = new zc(), XA = new zc(); + } + function sD() { + sD = N, Rin = new iln(), Pzn = new rln(); + } + function aEn() { + aEn = N, Nne = F(Zn, rn, 1, 0, 5, 1); + } + function dEn() { + dEn = N, eee = F(Zn, rn, 1, 0, 5, 1); + } + function IU() { + IU = N, tee = F(Zn, rn, 1, 0, 5, 1); + } + function Df() { + Df = N, new Bq((Pn(), Pn(), cr)); + } + function Xue(n) { + return FC(), $e((pPn(), Dzn), n); + } + function Vue(n) { + return hf(), $e((LSn(), Bzn), n); + } + function Que(n) { + return $T(), $e((qAn(), Gzn), n); + } + function Jue(n) { + return RC(), $e((GAn(), zzn), n); + } + function Yue(n) { + return dM(), $e((IOn(), Uzn), n); + } + function Zue(n) { + return _o(), $e(($Sn(), Vzn), n); + } + function nse(n) { + return Cu(), $e((FSn(), Jzn), n); + } + function ese(n) { + return Jc(), $e((xSn(), Zzn), n); + } + function tse(n) { + return SM(), $e((Ukn(), jUn), n); + } + function ise(n) { + return qd(), $e((mPn(), CUn), n); + } + function rse(n) { + return K2(), $e((kPn(), MUn), n); + } + function cse(n) { + return d6(), $e((yPn(), PUn), n); + } + function use(n) { + return Aj(), $e((yAn(), IUn), n); + } + function sse(n) { + return _C(), $e((zAn(), WUn), n); + } + function ose(n) { + return W5(), $e((NSn(), bWn), n); + } + function fse(n) { + return Vi(), $e((JPn(), vWn), n); + } + function hse(n) { + return q3(), $e((vPn(), EWn), n); + } + function lse(n) { + return Gd(), $e((BSn(), PWn), n); + } + function OU(n, e) { + if (!n) + throw T(new Hn(e)); + } + function ase(n) { + return Qn(), $e((vIn(), $Wn), n); + } + function DU(n) { + xE.call(this, n.d, n.c, n.a, n.b); + } + function oD(n) { + xE.call(this, n.d, n.c, n.a, n.b); + } + function $U(n, e, t) { + this.b = n, this.c = e, this.a = t; + } + function EE(n, e, t) { + this.b = n, this.a = e, this.c = t; + } + function bEn(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function FU(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function wEn(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function xU(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function gEn(n, e, t) { + this.b = n, this.a = e, this.c = t; + } + function CE(n, e, t) { + this.e = e, this.b = n, this.d = t; + } + function dse(n, e, t) { + return ua(), n.a.Od(e, t), e; + } + function fD(n) { + var e; + return e = new Dln(), e.e = n, e; + } + function LU(n) { + var e; + return e = new Zmn(), e.b = n, e; + } + function w8() { + w8 = N, sS = new Fdn(), oS = new xdn(); + } + function wo() { + wo = N, WWn = new pbn(), XWn = new vbn(); + } + function bse(n) { + return aT(), $e((EPn(), HWn), n); + } + function wse(n) { + return ff(), $e((TPn(), JWn), n); + } + function gse(n) { + return lM(), $e((mOn(), cXn), n); + } + function pse(n) { + return q2(), $e((yIn(), uXn), n); + } + function vse(n) { + return OC(), $e((JAn(), sXn), n); + } + function mse(n) { + return F2(), $e((RSn(), oXn), n); + } + function kse(n) { + return Vw(), $e((UPn(), ZWn), n); + } + function yse(n) { + return Hd(), $e((HSn(), rXn), n); + } + function jse(n) { + return VC(), $e((_Sn(), fXn), n); + } + function Ese(n) { + return Ia(), $e((GPn(), hXn), n); + } + function Cse(n) { + return V8(), $e((WAn(), lXn), n); + } + function Tse(n) { + return ja(), $e((KSn(), dXn), n); + } + function Mse(n) { + return eM(), $e((TIn(), bXn), n); + } + function Ase(n) { + return K8(), $e((XAn(), wXn), n); + } + function Sse(n) { + return A7(), $e((EIn(), gXn), n); + } + function Pse(n) { + return f4(), $e((jIn(), pXn), n); + } + function Ise(n) { + return fr(), $e((zOn(), vXn), n); + } + function Ose(n) { + return H3(), $e((GSn(), mXn), n); + } + function Dse(n) { + return Nh(), $e((qSn(), yXn), n); + } + function $se(n) { + return kC(), $e((YAn(), jXn), n); + } + function Fse(n) { + return Ss(), $e((WPn(), EXn), n); + } + function xse(n) { + return JT(), $e((CIn(), BQn), n); + } + function Lse(n) { + return i6(), $e((zSn(), RQn), n); + } + function Nse(n) { + return gb(), $e((MPn(), _Qn), n); + } + function Bse(n) { + return sr(), $e((XSn(), UQn), n); + } + function Rse(n) { + return Zw(), $e((vOn(), HQn), n); + } + function _se(n) { + return Rh(), $e((WSn(), qQn), n); + } + function Kse(n) { + return z8(), $e((QAn(), GQn), n); + } + function Hse(n) { + return oT(), $e((USn(), WQn), n); + } + function qse(n) { + return b6(), $e((zPn(), KQn), n); + } + function Gse(n) { + return x8(), $e((VAn(), XQn), n); + } + function zse(n) { + return V3(), $e((QSn(), VQn), n); + } + function Use(n) { + return uT(), $e((JSn(), QQn), n); + } + function Wse(n) { + return dT(), $e((VSn(), JQn), n); + } + function Xse(n) { + return Kd(), $e((YSn(), hJn), n); + } + function Vse(n) { + return z5(), $e((nSn(), wJn), n); + } + function Qse(n) { + return Ff(), $e((eSn(), jJn), n); + } + function Jse(n) { + return ef(), $e((tSn(), CJn), n); + } + function Yse(n) { + return No(), $e((ZAn(), RJn), n); + } + function Zse(n) { + return Od(), $e((iSn(), UJn), n); + } + function noe(n) { + return r4(), $e((jPn(), WJn), n); + } + function eoe(n) { + return k6(), $e((MIn(), VJn), n); + } + function toe(n) { + return aC(), $e((uSn(), fYn), n); + } + function ioe(n) { + return iT(), $e((cSn(), wYn), n); + } + function roe(n) { + return gC(), $e((rSn(), hYn), n); + } + function coe(n) { + return CT(), $e((ZSn(), pYn), n); + } + function uoe(n) { + return $C(), $e((sSn(), vYn), n); + } + function soe(n) { + return f7(), $e((nPn(), mYn), n); + } + function ooe(n) { + return qT(), $e((CPn(), FYn), n); + } + function foe(n) { + return sT(), $e((tPn(), xYn), n); + } + function hoe(n) { + return ET(), $e((ePn(), LYn), n); + } + function loe(n) { + return w4(), $e((QPn(), tZn), n); + } + function aoe(n) { + return w7(), $e((iPn(), iZn), n); + } + function doe(n) { + return Pj(), $e((mAn(), rZn), n); + } + function boe(n) { + return Ij(), $e((vAn(), uZn), n); + } + function woe(n) { + return L8(), $e((fSn(), sZn), n); + } + function goe(n) { + return P7(), $e((XPn(), oZn), n); + } + function poe(n) { + return Jv(), $e((kAn(), CZn), n); + } + function voe(n) { + return c7(), $e((oSn(), TZn), n); + } + function moe(n) { + return Ho(), $e((VPn(), OZn), n); + } + function koe(n) { + return j1(), $e((kOn(), $Zn), n); + } + function yoe(n) { + return oh(), $e((kIn(), FZn), n); + } + function joe(n) { + return mb(), $e((mIn(), _Zn), n); + } + function Eoe(n) { + return rr(), $e((Wkn(), RWn), n); + } + function Coe(n) { + return N3(), $e((UAn(), BWn), n); + } + function Toe(n) { + return or(), $e((YPn(), ene), n); + } + function Moe(n) { + return sf(), $e((cPn(), tne), n); + } + function Aoe(n) { + return Hh(), $e((PPn(), ine), n); + } + function Soe(n) { + return ZT(), $e((SIn(), rne), n); + } + function Poe(n) { + return _h(), $e((rPn(), une), n); + } + function Ioe(n) { + return us(), $e((SPn(), one), n); + } + function Ooe(n) { + return Eb(), $e((POn(), fne), n); + } + function Doe(n) { + return qw(), $e((ZPn(), hne), n); + } + function $oe(n) { + return Ai(), $e((bIn(), lne), n); + } + function Foe(n) { + return Tu(), $e((AIn(), ane), n); + } + function xoe(n) { + return Qu(), $e((OPn(), vne), n); + } + function Loe(n) { + return xu(), $e((UOn(), mne), n); + } + function Noe(n) { + return J(), $e((nIn(), dne), n); + } + function Boe(n) { + return AT(), $e((IPn(), kne), n); + } + function Roe(n) { + return Vu(), $e((APn(), Ene), n); + } + function _oe(n) { + return a4(), $e((yOn(), Lne), n); + } + function Koe(n, e) { + return _n(n), n + (_n(e), e); + } + function Hoe(n, e) { + return Zf(), me(R(n.a), e); + } + function qoe(n, e) { + return Zf(), me(R(n.a), e); + } + function hD(n, e) { + this.c = n, this.a = e, this.b = e - n; + } + function pEn(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function NU(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function BU(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function vEn(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function mEn(n, e, t) { + this.a = n, this.b = e, this.c = t; + } + function o1(n, e, t) { + this.e = n, this.a = e, this.c = t; + } + function kEn(n, e, t) { + ms(), QW.call(this, n, e, t); + } + function lD(n, e, t) { + ms(), FW.call(this, n, e, t); + } + function RU(n, e, t) { + ms(), FW.call(this, n, e, t); + } + function _U(n, e, t) { + ms(), FW.call(this, n, e, t); + } + function yEn(n, e, t) { + ms(), lD.call(this, n, e, t); + } + function KU(n, e, t) { + ms(), lD.call(this, n, e, t); + } + function jEn(n, e, t) { + ms(), KU.call(this, n, e, t); + } + function EEn(n, e, t) { + ms(), RU.call(this, n, e, t); + } + function CEn(n, e, t) { + ms(), _U.call(this, n, e, t); + } + function g8(n, e) { + return pe(n), pe(e), new z8n(n, e); + } + function v2(n, e) { + return pe(n), pe(e), new NEn(n, e); + } + function Goe(n, e) { + return pe(n), pe(e), new BEn(n, e); + } + function zoe(n, e) { + return pe(n), pe(e), new W8n(n, e); + } + function u(n, e) { + return A5(n == null || WF(n, e)), n; + } + function o3(n) { + var e; + return e = new X(), _$(e, n), e; + } + function Uoe(n) { + var e; + return e = new hi(), _$(e, n), e; + } + function TEn(n) { + var e; + return e = new Wq(), nF(e, n), e; + } + function p8(n) { + var e; + return e = new Tt(), nF(e, n), e; + } + function Woe(n) { + return !n.e && (n.e = new X()), n.e; + } + function Xoe(n) { + return !n.c && (n.c = new Np()), n.c; + } + function W(n, e) { + return n.c[n.c.length] = e, !0; + } + function MEn(n, e) { + this.c = n, this.b = e, this.a = !1; + } + function HU(n) { + this.d = n, Ovn(this), this.b = _fe(n.d); + } + function AEn() { + this.a = ";,;", this.b = "", this.c = ""; + } + function Voe(n, e, t) { + SCn.call(this, e, t), this.a = n; + } + function SEn(n, e, t) { + this.b = n, Hkn.call(this, e, t); + } + function qU(n, e, t) { + this.c = n, Nj.call(this, e, t); + } + function GU(n, e, t) { + aY(t, 0, n, e, t.length, !1); + } + function eh(n, e, t, i, r) { + n.b = e, n.c = t, n.d = i, n.a = r; + } + function Qoe(n, e) { + e && (n.b = e, n.a = (fl(e), e.a)); + } + function zU(n, e, t, i, r) { + n.d = e, n.c = t, n.a = i, n.b = r; + } + function UU(n) { + var e, t; + e = n.b, t = n.c, n.b = t, n.c = e; + } + function WU(n) { + var e, t; + t = n.d, e = n.a, n.d = e, n.a = t; + } + function XU(n) { + return bl(the(Fr(n) ? Ks(n) : n)); + } + function Joe(n, e) { + return Uc(GEn(n.d), GEn(e.d)); + } + function Yoe(n, e) { + return e == (J(), Gn) ? n.c : n.d; + } + function f3() { + f3 = N, don = (J(), Gn), dP = Vn; + } + function PEn() { + this.b = K(Y(cn((Go(), xR)))); + } + function IEn(n) { + return ua(), F(Zn, rn, 1, n, 5, 1); + } + function Zoe(n) { + return new fn(n.c + n.b, n.d + n.a); + } + function nfe(n, e) { + return Sj(), Uc(n.d.p, e.d.p); + } + function aD(n) { + return ne(n.b != 0), Ts(n, n.a.a); + } + function efe(n) { + return ne(n.b != 0), Ts(n, n.c.b); + } + function VU(n, e) { + if (!n) + throw T(new R9n(e)); + } + function TE(n, e) { + if (!n) + throw T(new Hn(e)); + } + function QU(n, e, t) { + e3.call(this, n, e), this.b = t; + } + function v8(n, e, t) { + lz.call(this, n, e), this.c = t; + } + function OEn(n, e, t) { + oIn.call(this, e, t), this.d = n; + } + function JU(n) { + IU(), Yy.call(this), this.th(n); + } + function DEn(n, e, t) { + this.a = n, Ew.call(this, e, t); + } + function $En(n, e, t) { + this.a = n, Ew.call(this, e, t); + } + function ME(n, e, t) { + lz.call(this, n, e), this.c = t; + } + function FEn() { + C3(), khe.call(this, (Z1(), uo)); + } + function xEn(n) { + return n != null && !$F(n, a9, d9); + } + function tfe(n, e) { + return (GDn(n) << 4 | GDn(e)) & Ut; + } + function ife(n, e) { + return QE(), ex(n, e), new oTn(n, e); + } + function oa(n, e) { + var t; + n.n && (t = e, W(n.f, t)); + } + function h3(n, e, t) { + var i; + i = new nb(t), Ro(n, e, i); + } + function rfe(n, e) { + var t; + return t = n.c, wV(n, e), t; + } + function YU(n, e) { + return e < 0 ? n.g = -1 : n.g = e, n; + } + function AE(n, e) { + return H0e(n), n.a *= e, n.b *= e, n; + } + function LEn(n, e, t, i, r) { + n.c = e, n.d = t, n.b = i, n.a = r; + } + function Ke(n, e) { + return Ht(n, e, n.c.b, n.c), !0; + } + function ZU(n) { + n.a.b = n.b, n.b.a = n.a, n.a = n.b = null; + } + function dD(n) { + this.b = n, this.a = Cd(this.b.a).Ed(); + } + function NEn(n, e) { + this.b = n, this.a = e, TI.call(this); + } + function BEn(n, e) { + this.a = n, this.b = e, TI.call(this); + } + function REn(n, e) { + SCn.call(this, e, 1040), this.a = n; + } + function m8(n) { + return n == 0 || isNaN(n) ? n : n < 0 ? -1 : 1; + } + function cfe(n) { + return C2(), fh(n) == Pt(ml(n)); + } + function ufe(n) { + return C2(), ml(n) == Pt(fh(n)); + } + function Ed(n, e) { + return v6(n, new e3(e.a, e.b)); + } + function sfe(n) { + return !Wi(n) && n.c.i.c == n.d.i.c; + } + function SE(n) { + var e; + return e = n.n, n.a.b + e.d + e.a; + } + function _En(n) { + var e; + return e = n.n, n.e.b + e.d + e.a; + } + function nW(n) { + var e; + return e = n.n, n.e.a + e.b + e.c; + } + function KEn(n) { + return Je(), new th(0, n); + } + function ofe(n) { + return n.a ? n.a : WD(n); + } + function A5(n) { + if (!n) + throw T(new zp(null)); + } + function HEn() { + HEn = N, mH = (Pn(), new OI(XB)); + } + function PE() { + PE = N, new JQ((HI(), uR), (qI(), cR)); + } + function qEn() { + qEn = N, jin = F(Ui, q, 19, 256, 0, 1); + } + function bD(n, e, t, i) { + MQ.call(this, n, e, t, i, 0, 0); + } + function ffe(n, e, t) { + return it(n.b, u(t.b, 17), e); + } + function hfe(n, e, t) { + return it(n.b, u(t.b, 17), e); + } + function lfe(n, e) { + return W(n, new fn(e.a, e.b)); + } + function afe(n, e) { + return n.c < e.c ? -1 : n.c == e.c ? 0 : 1; + } + function wD(n) { + return n.e.c.length + n.g.c.length; + } + function GEn(n) { + return n.e.c.length - n.g.c.length; + } + function zEn(n) { + return n.b.c.length - n.e.c.length; + } + function dfe(n) { + return ns(), (J(), qc).Hc(n.j); + } + function UEn(n) { + IU(), JU.call(this, n), this.a = -1; + } + function IE(n, e) { + i8.call(this, n, e), this.a = this; + } + function Ct(n, e) { + var t; + return t = LD(n, e), t.i = 2, t; + } + function OE(n, e) { + var t; + return ++n.j, t = n.Ti(e), t; + } + function Ze(n, e, t) { + return n.a = -1, Xz(n, e.g, t), n; + } + function bfe(n, e, t) { + cCe(n.a, n.b, n.c, u(e, 202), t); + } + function wfe(n, e) { + pV(n, e == null ? null : (_n(e), e)); + } + function gfe(n, e) { + bV(n, e == null ? null : (_n(e), e)); + } + function pfe(n, e) { + bV(n, e == null ? null : (_n(e), e)); + } + function gD(n, e, t) { + return new Yjn(yhe(n).Ie(), t, e); + } + function fa(n, e, t, i, r, c) { + return QFn(n, e, t, i, r, 0, c); + } + function WEn() { + WEn = N, min = F(op, q, 217, 256, 0, 1); + } + function XEn() { + XEn = N, Ein = F(d0, q, 162, 256, 0, 1); + } + function VEn() { + VEn = N, Min = F(b0, q, 184, 256, 0, 1); + } + function QEn() { + QEn = N, yin = F(bm, q, 172, 128, 0, 1); + } + function eW() { + eh(this, !1, !1, !1, !1); + } + function pD(n) { + eb(), this.a = (Pn(), new OI(pe(n))); + } + function DE(n) { + for (pe(n); n.Ob(); ) + n.Pb(), n.Qb(); + } + function vfe(n) { + n.a.cd(), u(n.a.dd(), 14).gc(), dG(); + } + function tW(n) { + this.c = n, this.b = this.c.d.vc().Kc(); + } + function JEn(n) { + this.c = n, this.a = new o2(this.c.a); + } + function S5(n) { + this.a = new s2(n.gc()), Xi(this, n); + } + function iW(n) { + Tq.call(this, new wa()), Xi(this, n); + } + function YEn(n, e) { + return n.a += Hs(e, 0, e.length), n; + } + function un(n, e) { + return Ln(e, n.c.length), n.c[e]; + } + function ZEn(n, e) { + return Ln(e, n.a.length), n.a[e]; + } + function $n(n, e) { + ua(), P$.call(this, n), this.a = e; + } + function mfe(n, e) { + return Aa(Hi(Aa(n.a).a, e.a)); + } + function kfe(n, e) { + return _n(n), Y8(n, (_n(e), e)); + } + function yfe(n, e) { + return _n(e), Y8(e, (_n(n), n)); + } + function jfe(n, e) { + return St(e, 0, rW(e[0], Aa(1))); + } + function rW(n, e) { + return mfe(u(n, 162), u(e, 162)); + } + function nCn(n) { + return n.c - u(un(n.a, n.b), 287).b; + } + function eCn(n) { + return n.q ? n.q : (Pn(), Pn(), ph); + } + function tCn(n) { + return n.e.Hd().gc() * n.c.Hd().gc(); + } + function Efe(n, e, t) { + return Uc(e.d[n.g], t.d[n.g]); + } + function Cfe(n, e, t) { + return Uc(n.d[e.p], n.d[t.p]); + } + function Tfe(n, e, t) { + return Uc(n.d[e.p], n.d[t.p]); + } + function Mfe(n, e, t) { + return Uc(n.d[e.p], n.d[t.p]); + } + function Afe(n, e, t) { + return Uc(n.d[e.p], n.d[t.p]); + } + function cW(n, e, t) { + return j.Math.min(t / n, 1 / e); + } + function iCn(n, e) { + return n ? 0 : j.Math.max(0, e - 1); + } + function Sfe(n, e) { + var t; + for (t = 0; t < e; ++t) + n[t] = -1; + } + function rCn(n) { + var e; + return e = YFn(n), e ? rCn(e) : n; + } + function Pfe(n, e) { + return n.a == null && dBn(n), n.a[e]; + } + function zu(n) { + return n.c ? n.c.f : n.e.b; + } + function du(n) { + return n.c ? n.c.g : n.e.a; + } + function $E(n) { + Nd.call(this, n.gc()), Ft(this, n); + } + function FE(n, e) { + ms(), uj.call(this, e), this.a = n; + } + function P5(n, e, t) { + this.a = n, Yt.call(this, e, t, 2); + } + function xE(n, e, t, i) { + zU(this, n, e, t, i); + } + function th(n, e) { + Je(), ud.call(this, n), this.a = e; + } + function cCn(n) { + this.b = new Tt(), this.a = n, this.c = -1; + } + function uCn() { + this.d = new fn(0, 0), this.e = new hi(); + } + function sCn(n) { + Vz.call(this, 0, 0), this.a = n, this.b = 0; + } + function oCn(n) { + this.a = n, this.c = new we(), kwe(this); + } + function uW(n) { + if (n.e.c != n.b) + throw T(new vs()); + } + function sW(n) { + if (n.c.e != n.a) + throw T(new vs()); + } + function ge(n) { + return Fr(n) ? n | 0 : m8n(n); + } + function LE(n, e) { + return Je(), new PW(n, e); + } + function vD(n, e) { + return n == null ? e == null : An(n, e); + } + function Ife(n, e) { + return n == null ? e == null : DT(n, e); + } + function m2(n, e, t) { + return ko(n.a, e), TW(n, e.g, t); + } + function mD(n, e, t) { + vDn(0, e, n.length), A3(n, 0, e, t); + } + function J0(n, e, t) { + ib(e, n.c.length), e5(n.c, e, t); + } + function fCn(n, e, t) { + var i; + for (i = 0; i < e; ++i) + n[i] = t; + } + function vt(n, e) { + var t; + return t = Cn(n), qV(t, e), t; + } + function Ofe(n, e) { + return !n && (n = []), n[n.length] = e, n; + } + function Dfe(n, e) { + return n.a.get(e) !== void 0; + } + function hCn(n, e) { + return ube(new pln(), new Bvn(n), e); + } + function $fe(n) { + return n == null ? UA : new dj(_n(n)); + } + function kD(n, e) { + return I(e, 22) && lu(n, u(e, 22)); + } + function lCn(n, e) { + return I(e, 22) && L0e(n, u(e, 22)); + } + function oW(n) { + return Fu(n, 26) * N6 + Fu(n, 27) * B6; + } + function fW(n) { + return Array.isArray(n) && n.im === Xg; + } + function NE(n) { + n.b ? NE(n.b) : n.d.dc() && n.f.c.Bc(n.e); + } + function yD(n, e) { + st(n.c, e), n.b.c += e.a, n.b.d += e.b; + } + function Ffe(n, e) { + yD(n, ji(new fn(e.a, e.b), n.c)); + } + function jD(n, e) { + this.b = new Tt(), this.a = n, this.c = e; + } + function aCn() { + this.b = new Dan(), this.c = new qTn(this); + } + function hW() { + this.d = new Pln(), this.e = new HTn(this); + } + function lW() { + tX(), this.f = new Tt(), this.e = new Tt(); + } + function dCn() { + ns(), this.k = new we(), this.d = new hi(); + } + function ED() { + ED = N, Tne = new tr((Xe(), Bu), 0); + } + function bCn() { + bCn = N, hzn = new sCn(F(Zn, rn, 1, 0, 5, 1)); + } + function xfe(n, e, t) { + uNn(t, n, 1), W(e, new B7n(t, n)); + } + function Lfe(n, e, t) { + g6(t, n, 1), W(e, new z7n(t, n)); + } + function Nfe(n, e, t) { + return ci(n, new f2(e.a, t.a)); + } + function Bfe(n, e, t) { + return -Uc(n.f[e.p], n.f[t.p]); + } + function BE(n, e, t) { + var i; + n && (i = n.i, i.c = e, i.b = t); + } + function RE(n, e, t) { + var i; + n && (i = n.i, i.d = e, i.a = t); + } + function ju(n, e, t) { + return n.a = -1, Xz(n, e.g + 1, t), n; + } + function aW(n, e, t) { + return t = os(n, u(e, 49), 7, t), t; + } + function dW(n, e, t) { + return t = os(n, u(e, 49), 3, t), t; + } + function wCn(n, e, t) { + this.a = n, hE.call(this, e, t, 22); + } + function gCn(n, e, t) { + this.a = n, hE.call(this, e, t, 14); + } + function pCn(n, e, t, i) { + ms(), JMn.call(this, n, e, t, i); + } + function vCn(n, e, t, i) { + ms(), JMn.call(this, n, e, t, i); + } + function Rfe(n, e) { + e.Bb & uc && !n.a.o && (n.a.o = e); + } + function mCn(n) { + return n != null && OD(n) && n.im !== Xg; + } + function bW(n) { + return !Array.isArray(n) && n.im === Xg; + } + function _fe(n) { + return I(n, 15) ? u(n, 15).Yc() : n.Kc(); + } + function wW(n) { + return n.Qc(F(Zn, rn, 1, n.gc(), 5, 1)); + } + function I5(n, e) { + return npe(G8(n, e)) ? e.Qh() : null; + } + function gW(n) { + n ? uJ(n, (Zf(), Sin)) : Zf(); + } + function re(n) { + this.a = (bCn(), hzn), this.d = u(pe(n), 47); + } + function pW(n, e, t, i) { + this.a = n, IC.call(this, n, e, t, i); + } + function ha(n) { + nl(), this.a = 0, this.b = n - 1, this.c = 1; + } + function kCn(n) { + oE(this), this.g = n, eC(this), this._d(); + } + function Cd(n) { + return n.c ? n.c : n.c = n.Id(); + } + function CD(n) { + return n.d ? n.d : n.d = n.Jd(); + } + function vW(n) { + var e; + return e = n.c, e || (n.c = n.Dd()); + } + function yCn(n) { + var e; + return e = n.f, e || (n.f = n.Dc()); + } + function k2(n) { + var e; + return e = n.i, e || (n.i = n.bc()); + } + function jCn(n) { + return Je(), new e$(10, n, 0); + } + function O5(n) { + return Fr(n) ? "" + n : sBn(n); + } + function _E(n) { + if (n.e.j != n.d) + throw T(new vs()); + } + function Ih(n, e) { + return bl(Sxn(Fr(n) ? Ks(n) : n, e)); + } + function cl(n, e) { + return bl(SY(Fr(n) ? Ks(n) : n, e)); + } + function Y0(n, e) { + return bl(H5e(Fr(n) ? Ks(n) : n, e)); + } + function Kfe(n, e) { + return mue((_n(n), n), (_n(e), e)); + } + function TD(n, e) { + return ni((_n(n), n), (_n(e), e)); + } + function ECn(n, e) { + return pe(e), n.a.Ad(e) && !n.b.Ad(e); + } + function Hfe(n, e) { + return Nc(n.l & e.l, n.m & e.m, n.h & e.h); + } + function qfe(n, e) { + return Nc(n.l | e.l, n.m | e.m, n.h | e.h); + } + function Gfe(n, e) { + return Nc(n.l ^ e.l, n.m ^ e.m, n.h ^ e.h); + } + function KE(n, e) { + return d7(n, (_n(e), new Lvn(e))); + } + function HE(n, e) { + return d7(n, (_n(e), new Nvn(e))); + } + function CCn(n) { + return bu(), u(n, 11).e.c.length != 0; + } + function TCn(n) { + return bu(), u(n, 11).g.c.length != 0; + } + function zfe(n, e) { + return x2(), ni(e.a.o.a, n.a.o.a); + } + function MCn(n, e, t) { + return SCe(n, u(e, 11), u(t, 11)); + } + function Ufe(n) { + return n.e ? xX(n.e) : null; + } + function mW(n) { + n.d || (n.d = n.b.Kc(), n.c = n.b.gc()); + } + function Wfe(n, e, t) { + n.a.Mb(t) && (n.b = !0, e.td(t)); + } + function l3(n, e) { + if (n < 0 || n >= e) + throw T(new qq()); + } + function Xfe(n, e, t) { + return St(e, 0, rW(e[0], t[0])), e; + } + function Vfe(n, e, t) { + e.Ye(t, K(Y(te(n.b, t))) * n.a); + } + function ACn(n, e, t) { + return eg(), B3(n, e) && B3(n, t); + } + function D5(n) { + return Tu(), !n.Hc(n1) && !n.Hc(Gl); + } + function qE(n) { + return new fn(n.c + n.b / 2, n.d + n.a / 2); + } + function MD(n, e) { + return e.kh() ? pl(n.b, u(e, 49)) : e; + } + function kW(n, e) { + this.e = n, this.d = e & 64 ? e | Nf : e; + } + function SCn(n, e) { + this.c = 0, this.d = n, this.b = e | 64 | Nf; + } + function GE(n) { + this.b = new Ic(11), this.a = (Ow(), n); + } + function AD(n) { + this.b = null, this.a = (Ow(), n || Lin); + } + function PCn(n) { + this.a = Y$n(n.a), this.b = new au(n.b); + } + function ICn(n) { + this.b = n, b2.call(this, n), $yn(this); + } + function OCn(n) { + this.b = n, u8.call(this, n), Fyn(this); + } + function Z0(n, e, t) { + this.a = n, g2.call(this, e, t, 5, 6); + } + function yW(n, e, t, i) { + this.b = n, Yt.call(this, e, t, i); + } + function gi(n, e, t, i, r) { + D$.call(this, n, e, t, i, r, -1); + } + function $5(n, e, t, i, r) { + R8.call(this, n, e, t, i, r, -1); + } + function V(n, e, t, i) { + Yt.call(this, n, e, t), this.b = i; + } + function zE(n, e, t, i) { + v8.call(this, n, e, t), this.b = i; + } + function DCn(n) { + xkn.call(this, n, !1), this.a = !1; + } + function $Cn(n, e) { + this.b = n, bvn.call(this, n.b), this.a = e; + } + function FCn(n, e) { + eb(), Yie.call(this, n, mT(new Hu(e))); + } + function UE(n, e) { + return Je(), new xW(n, e, 0); + } + function SD(n, e) { + return Je(), new xW(6, n, e); + } + function Qfe(n, e) { + return An(n.substr(0, e.length), e); + } + function Uu(n, e) { + return yi(e) ? QD(n, e) : !!Sr(n.f, e); + } + function Oi(n, e) { + for (_n(e); n.Ob(); ) + e.td(n.Pb()); + } + function Pw(n, e, t) { + jl(), this.e = n, this.d = e, this.a = t; + } + function f1(n, e, t, i) { + var r; + r = n.i, r.i = e, r.a = t, r.b = i; + } + function jW(n) { + var e; + for (e = n; e.f; ) + e = e.f; + return e; + } + function y2(n) { + var e; + return e = t6(n), ne(e != null), e; + } + function Jfe(n) { + var e; + return e = Lge(n), ne(e != null), e; + } + function a3(n, e) { + var t; + return t = n.a.gc(), $X(e, t), t - e; + } + function EW(n, e) { + var t; + for (t = 0; t < e; ++t) + n[t] = !1; + } + function Yfe(n, e, t, i) { + var r; + for (r = e; r < t; ++r) + n[r] = i; + } + function L(n, e, t, i) { + vDn(e, t, n.length), Yfe(n, e, t, i); + } + function Zfe(n, e, t) { + l3(t, n.a.c.length), Es(n.a, t, e); + } + function CW(n, e, t) { + this.c = n, this.a = e, Pn(), this.b = t; + } + function TW(n, e, t) { + var i; + return i = n.b[e], n.b[e] = t, i; + } + function ci(n, e) { + var t; + return t = n.a.zc(e, n), t == null; + } + function nhe(n) { + if (!n) + throw T(new ic()); + return n.d; + } + function MW(n, e) { + if (n == null) + throw T(new c2(e)); + } + function AW(n, e) { + return e ? Xi(n, e) : !1; + } + function ih(n, e, t) { + return Xwe(n, e.g, t), ko(n.c, e), n; + } + function ehe(n) { + return cg(n, (or(), Zs)), n.d = !0, n; + } + function PD(n) { + return !n.j && $te(n, kke(n.g, n.b)), n.j; + } + function F5(n) { + U0(n.b != -1), l1(n.c, n.a = n.b), n.b = -1; + } + function Eu(n) { + n.f = new iyn(n), n.g = new ryn(n), cC(n); + } + function ID(n) { + return new $n(null, uhe(n, n.length)); + } + function ul(n) { + return new re(new xz(n.a.length, n.a)); + } + function the(n) { + return Nc(~n.l & Lu, ~n.m & Lu, ~n.h & Wh); + } + function OD(n) { + return typeof n === Q7 || typeof n === CL; + } + function ihe(n) { + return n == Lt ? Ak : n == Vt ? "-INF" : "" + n; + } + function rhe(n) { + return n == Lt ? Ak : n == Vt ? "-INF" : "" + n; + } + function che(n, e) { + return n > 0 ? j.Math.log(n / e) : -100; + } + function xCn(n, e) { + return hc(n, e) < 0 ? -1 : hc(n, e) > 0 ? 1 : 0; + } + function SW(n, e, t) { + return MRn(n, u(e, 46), u(t, 167)); + } + function LCn(n, e) { + return u(vW(Cd(n.a)).Xb(e), 42).cd(); + } + function uhe(n, e) { + return P0e(e, n.length), new REn(n, e); + } + function DD(n, e) { + this.d = n, ie.call(this, n), this.e = e; + } + function Td(n) { + this.d = (_n(n), n), this.a = 0, this.c = IM; + } + function PW(n, e) { + ud.call(this, 1), this.a = n, this.b = e; + } + function NCn(n, e) { + return n.c ? NCn(n.c, e) : W(n.b, e), n; + } + function she(n, e, t) { + var i; + return i = sb(n, e), g$(n, e, t), i; + } + function IW(n, e) { + var t; + return t = n.slice(0, e), WX(t, n); + } + function BCn(n, e, t) { + var i; + for (i = 0; i < e; ++i) + St(n, i, t); + } + function RCn(n, e, t, i, r) { + for (; e < t; ) + i[r++] = Di(n, e++); + } + function ohe(n, e) { + return ni(n.c.c + n.c.b, e.c.c + e.c.b); + } + function k8(n, e) { + return bT(n.a, e, (qn(), Ga)) == null; + } + function y8(n, e) { + Ht(n.d, e, n.b.b, n.b), ++n.a, n.c = null; + } + function j8(n, e) { + Pyn(n, I(e, 153) ? e : u(e, 1937).gl()); + } + function Md(n, e) { + _t(Xc(n.Oc(), new Vbn()), new W5n(e)); + } + function d3(n, e, t, i, r) { + wx(n, u(ct(e.k, t), 15), t, i, r); + } + function WE(n) { + n.s = NaN, n.c = NaN, ULn(n, n.e), ULn(n, n.j); + } + function _Cn(n) { + n.a = null, n.e = null, Eu(n.b), n.d = 0, ++n.c; + } + function $D(n) { + return j.Math.abs(n.d.e - n.e.e) - n.a; + } + function fhe(n, e, t) { + return u(n.c._c(e, u(t, 133)), 42); + } + function hhe() { + return aj(), A(M(lzn, 1), z, 538, 0, [fR]); + } + function lhe(n) { + return C2(), Pt(fh(n)) == Pt(ml(n)); + } + function KCn(n) { + pU.call(this), this.a = n, W(n.a, this); + } + function FD(n, e) { + this.d = Nge(n), this.c = e, this.a = 0.5 * e; + } + function HCn() { + wa.call(this), this.a = !0, this.b = !0; + } + function ee(n) { + return (n.i == null && Lf(n), n.i).length; + } + function qCn(n) { + return I(n, 99) && (u(n, 18).Bb & uc) != 0; + } + function ahe(n, e) { + ++n.j, px(n, n.i, e), nme(n, u(e, 332)); + } + function xD(n, e) { + return e = n.nk(null, e), hxn(n, null, e); + } + function Ft(n, e) { + return n.hi() && (e = aMn(n, e)), n.Wh(e); + } + function w(n, e, t) { + var i; + return i = LD(n, e), DIn(t, i), i; + } + function LD(n, e) { + var t; + return t = new RV(), t.j = n, t.d = e, t; + } + function pe(n) { + if (n == null) + throw T(new Nv()); + return n; + } + function ND(n) { + var e; + return e = n.j, e || (n.j = new vvn(n)); + } + function GCn(n) { + var e; + return e = n.f, e || (n.f = new Fz(n)); + } + function OW(n) { + var e; + return e = n.k, e || (n.k = new cq(n)); + } + function XE(n) { + var e; + return e = n.k, e || (n.k = new cq(n)); + } + function x5(n) { + var e; + return e = n.g, e || (n.g = new rq(n)); + } + function dhe(n) { + var e; + return e = n.i, e || (n.i = new ovn(n)); + } + function BD(n) { + var e; + return e = n.d, e || (n.d = new SI(n)); + } + function zCn(n) { + return pe(n), I(n, 475) ? u(n, 475) : Nr(n); + } + function DW(n) { + return I(n, 607) ? n : new nMn(n); + } + function UCn(n, e) { + return D8(e, n.c.b.c.gc()), new G8n(n, e); + } + function WCn(n, e, t) { + return Je(), new HMn(n, e, t); + } + function St(n, e, t) { + return Wce(t == null || tye(n, t)), n[e] = t; + } + function $W(n, e) { + var t; + return t = n.a.gc(), D8(e, t), t - 1 - e; + } + function b3(n, e) { + return n.a += String.fromCharCode(e), n; + } + function sl(n, e) { + return n.a += String.fromCharCode(e), n; + } + function RD(n, e) { + for (_n(e); n.c < n.d; ) + n.ze(e, n.c++); + } + function te(n, e) { + return yi(e) ? mc(n, e) : Vr(Sr(n.f, e)); + } + function bhe(n, e) { + return C2(), n == fh(e) ? ml(e) : fh(e); + } + function whe(n, e) { + j2(n, new nb(e.f != null ? e.f : "" + e.g)); + } + function ghe(n, e) { + j2(n, new nb(e.f != null ? e.f : "" + e.g)); + } + function XCn(n) { + this.b = new X(), this.a = new X(), this.c = n; + } + function Rs(n) { + this.c = new Li(), this.a = new X(), this.b = n; + } + function VCn(n) { + pU.call(this), this.a = new Li(), this.c = n; + } + function nb(n) { + if (n == null) + throw T(new Nv()); + this.a = n; + } + function QCn(n) { + Hq(), this.b = new X(), this.a = n, dEe(this, n); + } + function JCn(n) { + this.c = n, this.a = new Tt(), this.b = new Tt(); + } + function YCn() { + YCn = N, gzn = new oq(!1), pzn = new oq(!0); + } + function eb() { + eb = N, Df(), sR = new JD((Pn(), Pn(), cr)); + } + function _D() { + _D = N, Df(), lin = new NG((Pn(), Pn(), zA)); + } + function ol() { + ol = N, Nn = Z6e(), Sn(), lw && u4e(); + } + function phe(n, e) { + return x2(), u(wr(n, e.d), 15).Fc(e); + } + function vhe(n, e, t, i) { + return t == 0 || (t - i) / t < n.e || e >= n.g; + } + function KD(n, e, t) { + var i; + return i = Y$(n, e, t), rZ(n, i); + } + function j2(n, e) { + var t; + t = n.a.length, sb(n, t), g$(n, t, e); + } + function ZCn(n, e) { + var t; + t = console[n], t.call(console, e); + } + function nTn(n, e) { + var t; + ++n.j, t = n.Vi(), n.Ii(n.oi(t, e)); + } + function mhe(n, e, t) { + u(e.b, 65), Yc(e.a, new NU(n, t, e)); + } + function FW(n, e, t) { + uj.call(this, e), this.a = n, this.b = t; + } + function xW(n, e, t) { + ud.call(this, n), this.a = e, this.b = t; + } + function LW(n, e, t) { + this.a = n, xq.call(this, e), this.b = t; + } + function eTn(n, e, t) { + this.a = n, aX.call(this, 8, e, null, t); + } + function khe(n) { + this.a = (_n(xe), xe), this.b = n, new tG(); + } + function tTn(n) { + this.c = n, this.b = this.c.a, this.a = this.c.e; + } + function NW(n) { + this.c = n, this.b = n.a.d.a, rU(n.a.e, this); + } + function Wu(n) { + U0(n.c != -1), n.d.$c(n.c), n.b = n.c, n.c = -1; + } + function L5(n) { + return j.Math.sqrt(n.a * n.a + n.b * n.b); + } + function Ad(n, e) { + return l3(e, n.a.c.length), un(n.a, e); + } + function $f(n, e) { + return B(n) === B(e) || n != null && tt(n, e); + } + function yhe(n) { + return 0 >= n ? new PG() : sbe(n - 1); + } + function jhe(n) { + return dw ? QD(dw, n) : !1; + } + function iTn(n) { + return n ? n.dc() : !n.Kc().Ob(); + } + function qi(n) { + return !n.a && n.c ? n.c.b : n.a; + } + function Ehe(n) { + return !n.a && (n.a = new Yt(zl, n, 4)), n.a; + } + function Sd(n) { + return !n.d && (n.d = new Yt(dr, n, 1)), n.d; + } + function _n(n) { + if (n == null) + throw T(new Nv()); + return n; + } + function N5(n) { + n.c ? n.c.He() : (n.d = !0, S8e(n)); + } + function fl(n) { + n.c ? fl(n.c) : (Ma(n), n.d = !0); + } + function rTn(n) { + KW(n.a), n.b = F(Zn, rn, 1, n.b.length, 5, 1); + } + function Che(n, e) { + return Uc(e.j.c.length, n.j.c.length); + } + function The(n, e) { + n.c < 0 || n.b.b < n.c ? sa(n.b, e) : n.a._e(e); + } + function Mhe(n, e) { + var t; + t = n.Yg(e), t >= 0 ? n.Bh(t) : bY(n, e); + } + function cTn(n) { + var e, t; + return e = n.c.i.c, t = n.d.i.c, e == t; + } + function Ahe(n) { + if (n.p != 4) + throw T(new ou()); + return n.e; + } + function She(n) { + if (n.p != 3) + throw T(new ou()); + return n.e; + } + function Phe(n) { + if (n.p != 6) + throw T(new ou()); + return n.f; + } + function Ihe(n) { + if (n.p != 6) + throw T(new ou()); + return n.k; + } + function Ohe(n) { + if (n.p != 3) + throw T(new ou()); + return n.j; + } + function Dhe(n) { + if (n.p != 4) + throw T(new ou()); + return n.j; + } + function BW(n) { + return !n.b && (n.b = new sj(new KI())), n.b; + } + function Pd(n) { + return n.c == -2 && Pte(n, Qve(n.g, n.b)), n.c; + } + function w3(n, e) { + var t; + return t = LD("", n), t.n = e, t.i = 1, t; + } + function $he(n, e) { + yD(u(e.b, 65), n), Yc(e.a, new Aq(n)); + } + function Fhe(n, e) { + me((!n.a && (n.a = new l8(n, n)), n.a), e); + } + function uTn(n, e) { + this.b = n, DD.call(this, n, e), $yn(this); + } + function sTn(n, e) { + this.b = n, AU.call(this, n, e), Fyn(this); + } + function RW(n, e, t, i) { + wd.call(this, n, e), this.d = t, this.a = i; + } + function VE(n, e, t, i) { + wd.call(this, n, t), this.a = e, this.f = i; + } + function oTn(n, e) { + bce.call(this, obe(pe(n), pe(e))), this.a = e; + } + function fTn() { + UJ.call(this, Ha, (a8n(), hee)), tEe(this); + } + function hTn() { + UJ.call(this, Vs, (Vp(), g1n)), lje(this); + } + function lTn() { + Oe.call(this, "DELAUNAY_TRIANGULATION", 0); + } + function xhe(n) { + return String.fromCharCode.apply(null, n); + } + function it(n, e, t) { + return yi(e) ? yr(n, e, t) : Rc(n.f, e, t); + } + function _W(n) { + return Pn(), n ? n.ve() : (Ow(), Ow(), Bin); + } + function Lhe(n, e, t) { + return L2(), t.pg(n, u(e.cd(), 146)); + } + function aTn(n, e) { + return PE(), new JQ(new Wyn(n), new Uyn(e)); + } + function Nhe(n) { + return rs(n, AL), KC(Hi(Hi(5, n), n / 10 | 0)); + } + function QE() { + QE = N, fzn = new GI(A(M(qa, 1), OM, 42, 0, [])); + } + function dTn(n) { + return !n.d && (n.d = new Rp(n.c.Cc())), n.d; + } + function g3(n) { + return !n.a && (n.a = new W9n(n.c.vc())), n.a; + } + function bTn(n) { + return !n.b && (n.b = new Up(n.c.ec())), n.b; + } + function rh(n, e) { + for (; e-- > 0; ) + n = n << 1 | (n < 0 ? 1 : 0); + return n; + } + function vc(n, e) { + return B(n) === B(e) || n != null && tt(n, e); + } + function Bhe(n, e) { + return qn(), u(e.b, 19).a < n; + } + function Rhe(n, e) { + return qn(), u(e.a, 19).a < n; + } + function wr(n, e) { + return kD(n.a, e) ? n.b[u(e, 22).g] : null; + } + function _he(n, e, t, i) { + n.a = Zu(n.a, 0, e) + ("" + i) + r8(n.a, t); + } + function wTn(n, e) { + n.u.Hc((Tu(), n1)) && G6e(n, e), Mde(n, e); + } + function Di(n, e) { + return Te(e, n.length), n.charCodeAt(e); + } + function gTn() { + _r.call(this, "There is no more element."); + } + function B5(n) { + this.d = n, this.a = this.d.b, this.b = this.d.c; + } + function pTn(n) { + n.b = !1, n.c = !1, n.d = !1, n.a = !1; + } + function Ge(n, e, t, i) { + return gOn(n, e, t, !1), kT(n, i), n; + } + function Khe(n) { + return n.j.c = F(Zn, rn, 1, 0, 5, 1), n.a = -1, n; + } + function Hhe(n) { + return !n.c && (n.c = new Fn(he, n, 5, 8)), n.c; + } + function qhe(n) { + return !n.b && (n.b = new Fn(he, n, 4, 7)), n.b; + } + function JE(n) { + return !n.n && (n.n = new V(Rr, n, 1, 7)), n.n; + } + function HD(n) { + return !n.c && (n.c = new V(Ru, n, 9, 9)), n.c; + } + function p3(n) { + return n.e == K4 && Ote(n, spe(n.g, n.b)), n.e; + } + function E8(n) { + return n.f == K4 && Dte(n, X3e(n.g, n.b)), n.f; + } + function Iw(n) { + var e; + return e = n.b, !e && (n.b = e = new svn(n)), e; + } + function KW(n) { + var e; + for (e = n.Kc(); e.Ob(); ) + e.Pb(), e.Qb(); + } + function v3(n) { + if ($u(n.d), n.d.d != n.c) + throw T(new vs()); + } + function HW(n, e) { + this.b = n, this.c = e, this.a = new o2(this.b); + } + function qD(n, e, t) { + this.a = JZ, this.d = n, this.b = e, this.c = t; + } + function vTn(n, e) { + this.d = (_n(n), n), this.a = 16449, this.c = e; + } + function Ghe(n, e) { + QDn(n, K(Bh(e, "x")), K(Bh(e, "y"))); + } + function zhe(n, e) { + QDn(n, K(Bh(e, "x")), K(Bh(e, "y"))); + } + function pt(n, e) { + return Ma(n), new $n(n, new UX(e, n.a)); + } + function Xc(n, e) { + return Ma(n), new $n(n, new FX(e, n.a)); + } + function YE(n, e) { + return Ma(n), new sU(n, new ASn(e, n.a)); + } + function ZE(n, e) { + return Ma(n), new oU(n, new SSn(e, n.a)); + } + function Uhe(n, e) { + return new UTn(u(pe(n), 62), u(pe(e), 62)); + } + function Whe(n, e) { + return DG(), ni((_n(n), n), (_n(e), e)); + } + function Xhe() { + return Aj(), A(M(krn, 1), z, 481, 0, [SR]); + } + function Vhe() { + return Pj(), A(M(lfn, 1), z, 482, 0, [DK]); + } + function Qhe() { + return Ij(), A(M(cZn, 1), z, 551, 0, [$K]); + } + function Jhe() { + return Jv(), A(M(Dfn, 1), z, 530, 0, [hy]); + } + function mTn(n) { + this.a = new X(), this.e = F(be, q, 48, n, 0, 2); + } + function GD(n, e, t, i) { + this.a = n, this.e = e, this.d = t, this.c = i; + } + function nC(n, e, t, i) { + this.a = n, this.c = e, this.b = t, this.d = i; + } + function qW(n, e, t, i) { + this.c = n, this.b = e, this.a = t, this.d = i; + } + function kTn(n, e, t, i) { + this.c = n, this.b = e, this.d = t, this.a = i; + } + function ys(n, e, t, i) { + this.c = n, this.d = e, this.b = t, this.a = i; + } + function yTn(n, e, t, i) { + this.a = n, this.d = e, this.c = t, this.b = i; + } + function E2(n, e, t, i) { + Oe.call(this, n, e), this.a = t, this.b = i; + } + function jTn(n, e, t, i) { + this.a = n, this.c = e, this.d = t, this.b = i; + } + function Yhe(n, e, t) { + oje(n.a, t), cwe(t), xme(n.b, t), Mje(e, t); + } + function zD(n, e, t) { + var i, r; + return i = _Z(n), r = e.Kh(t, i), r; + } + function ETn(n, e) { + var t, i; + return t = n / e, i = Gt(t), t > i && ++i, i; + } + function Oh(n) { + var e, t; + return t = (e = new sd(), e), I3(t, n), t; + } + function UD(n) { + var e, t; + return t = (e = new sd(), e), VJ(t, n), t; + } + function Zhe(n, e) { + var t; + return t = te(n.f, e), MV(e, t), null; + } + function WD(n) { + var e; + return e = hbe(n), e || null; + } + function CTn(n) { + return !n.b && (n.b = new V(bi, n, 12, 3)), n.b; + } + function n1e(n) { + return n != null && _9(tI, n.toLowerCase()); + } + function e1e(n, e) { + return ni(du(n) * zu(n), du(e) * zu(e)); + } + function t1e(n, e) { + return ni(du(n) * zu(n), du(e) * zu(e)); + } + function i1e(n, e) { + return ni(n.d.c + n.d.b / 2, e.d.c + e.d.b / 2); + } + function r1e(n, e) { + return ni(n.g.c + n.g.b / 2, e.g.c + e.g.b / 2); + } + function TTn(n, e, t) { + t.a ? nu(n, e.b - n.f / 2) : Zc(n, e.a - n.g / 2); + } + function MTn(n, e, t, i) { + this.a = n, this.b = e, this.c = t, this.d = i; + } + function ATn(n, e, t, i) { + this.a = n, this.b = e, this.c = t, this.d = i; + } + function la(n, e, t, i) { + this.e = n, this.a = e, this.c = t, this.d = i; + } + function STn(n, e, t, i) { + this.a = n, this.c = e, this.d = t, this.b = i; + } + function PTn(n, e, t, i) { + ms(), ySn.call(this, e, t, i), this.a = n; + } + function ITn(n, e, t, i) { + ms(), ySn.call(this, e, t, i), this.a = n; + } + function OTn(n, e) { + this.a = n, hue.call(this, n, u(n.d, 15).Zc(e)); + } + function XD(n) { + this.f = n, this.c = this.f.e, n.f > 0 && qFn(this); + } + function DTn(n, e, t, i) { + this.b = n, this.c = i, FO.call(this, e, t); + } + function $Tn(n) { + return ne(n.b < n.d.gc()), n.d.Xb(n.c = n.b++); + } + function _s(n) { + n.a.a = n.c, n.c.b = n.a, n.a.b = n.c.a = null, n.b = 0; + } + function GW(n, e) { + return n.b = e.b, n.c = e.c, n.d = e.d, n.a = e.a, n; + } + function eC(n) { + return n.n && (n.e !== Z_n && n._d(), n.j = null), n; + } + function FTn(n) { + return A5(n == null || OD(n) && n.im !== Xg), n; + } + function xTn(n) { + this.b = new X(), Zt(this.b, this.b), this.a = n; + } + function C2() { + C2 = N, eS = new X(), DR = new we(), OR = new X(); + } + function Pn() { + Pn = N, cr = new Z1n(), ph = new eln(), zA = new Y1n(); + } + function Ow() { + Ow = N, Lin = new DH(), Nin = new DH(), Bin = new sln(); + } + function zW() { + zW = N, Kzn = new Mln(), qzn = new hW(), Hzn = new Aln(); + } + function c1e() { + Vin == 256 && (Xin = XA, XA = new zc(), Vin = 0), ++Vin; + } + function T2(n) { + var e; + return e = n.f, e || (n.f = new Jp(n, n.c)); + } + function u1e(n) { + return Yd(n) && on(sn(hn(n, (nn(), Xa)))); + } + function s1e(n, e) { + return Tn(n, u(k(e, (nn(), lv)), 19), e); + } + function LTn(n, e) { + return Kw(n.j, e.s, e.c) + Kw(e.e, n.s, n.c); + } + function NTn(n, e) { + n.e && !n.e.a && (Lmn(n.e, e), NTn(n.e, e)); + } + function BTn(n, e) { + n.d && !n.d.a && (Lmn(n.d, e), BTn(n.d, e)); + } + function o1e(n, e) { + return -ni(du(n) * zu(n), du(e) * zu(e)); + } + function f1e(n) { + return u(n.cd(), 146).tg() + ":" + Nr(n.dd()); + } + function h1e(n) { + wo(); + var e; + e = u(n.g, 10), e.n.a = n.d.c + e.d.b; + } + function l1e(n, e, t) { + return Qv(), t2e(u(te(n.e, e), 522), t); + } + function a1e(n, e) { + return Du(n), Du(e), B9n(u(n, 22), u(e, 22)); + } + function d1e(n, e, t) { + n.i = 0, n.e = 0, e != t && cDn(n, e, t); + } + function b1e(n, e, t) { + n.i = 0, n.e = 0, e != t && uDn(n, e, t); + } + function aa(n, e, t) { + var i, r; + i = PU(t), r = new nj(i), Ro(n, e, r); + } + function VD(n, e, t, i, r, c) { + R8.call(this, n, e, t, i, r, c ? -2 : -1); + } + function RTn(n, e, t, i) { + lz.call(this, e, t), this.b = n, this.a = i; + } + function UW(n, e) { + new Tt(), this.a = new fu(), this.b = n, this.c = e; + } + function w1e(n, e) { + return u(k(n, (G(), gp)), 15).Fc(e), e; + } + function tC(n, e) { + if (n == null) + throw T(new c2(e)); + return n; + } + function ot(n) { + return !n.q && (n.q = new V(co, n, 11, 10)), n.q; + } + function R(n) { + return !n.s && (n.s = new V(su, n, 21, 17)), n.s; + } + function iC(n) { + return !n.a && (n.a = new V(Ot, n, 10, 11)), n.a; + } + function rC(n) { + return I(n, 14) ? new S5(u(n, 14)) : Uoe(n.Kc()); + } + function g1e(n) { + return new Ryn(n, n.e.Hd().gc() * n.c.Hd().gc()); + } + function p1e(n) { + return new _yn(n, n.e.Hd().gc() * n.c.Hd().gc()); + } + function WW(n) { + return n && n.hashCode ? n.hashCode() : kd(n); + } + function QD(n, e) { + return e == null ? !!Sr(n.f, null) : Dfe(n.g, e); + } + function v1e(n) { + return pe(n), sFn(new re(ue(n.a.Kc(), new Mn()))); + } + function C8(n) { + return Pn(), I(n, 54) ? new ZI(n) : new lE(n); + } + function _Tn(n, e, t) { + return n.f ? n.f.Ne(e, t) : !1; + } + function m1e(n, e) { + return n.a = Zu(n.a, 0, e) + "" + r8(n.a, e + 1), n; + } + function k1e(n, e) { + var t; + return t = Pz(n.a, e), t && (e.d = null), t; + } + function cC(n) { + var e, t; + t = n, e = t.$modCount | 0, t.$modCount = e + 1; + } + function XW(n) { + this.b = n, this.c = n, n.e = null, n.c = null, this.a = 1; + } + function KTn(n) { + this.b = n, this.a = new Y1(u(pe(new uan()), 62)); + } + function HTn(n) { + this.c = n, this.b = new Y1(u(pe(new Sln()), 62)); + } + function qTn(n) { + this.c = n, this.b = new Y1(u(pe(new Oan()), 62)); + } + function GTn() { + this.a = new Qq(), this.b = new o9n(), this.d = new Nan(); + } + function Id() { + this.a = new fu(), this.b = (rs(3, Ib), new Ic(3)); + } + function zTn() { + this.b = new hi(), this.d = new Tt(), this.e = new Yq(); + } + function uC(n) { + this.c = n.c, this.d = n.d, this.b = n.b, this.a = n.a; + } + function UTn(n, e) { + eie.call(this, new AD(n)), this.a = n, this.b = e; + } + function WTn() { + jx(this, new eq()), this.wb = (ol(), Nn), Vp(); + } + function y1e(n) { + le(n, "No crossing minimization", 1), ce(n); + } + function j1e(n) { + gj(), j.setTimeout(function() { + throw n; + }, 0); + } + function Ar(n) { + return n.u || (Iu(n), n.u = new Ijn(n, n)), n.u; + } + function Vc(n) { + var e; + return e = u(Rn(n, 16), 26), e || n.zh(); + } + function XTn(n, e) { + return I(e, 146) && An(n.b, u(e, 146).tg()); + } + function E1e(n, e) { + return n.a ? e.Wg().Kc() : u(e.Wg(), 69).Zh(); + } + function C1e(n) { + return n.k == (Qn(), ii) && ai(n, (G(), Am)); + } + function JD(n) { + this.a = (Pn(), I(n, 54) ? new ZI(n) : new lE(n)); + } + function m3() { + m3 = N; + var n, e; + e = !z2e(), n = new Ch(), aR = e ? new J1n() : n; + } + function YD(n, e) { + var t; + return t = J1(n.gm), e == null ? t : t + ": " + e; + } + function VTn(n, e) { + var t; + return t = n.b.Qc(e), _An(t, n.b.gc()), t; + } + function T8(n, e) { + if (n == null) + throw T(new c2(e)); + return n; + } + function Sr(n, e) { + return kDn(n, e, ule(n, e == null ? 0 : n.b.se(e))); + } + function T1e(n, e, t) { + return t >= 0 && An(n.substr(t, e.length), e); + } + function hl(n, e, t, i, r, c, o) { + return new v$(n.e, e, t, i, r, c, o); + } + function QTn(n, e, t, i, r, c) { + this.a = n, z$.call(this, e, t, i, r, c); + } + function JTn(n, e, t, i, r, c) { + this.a = n, z$.call(this, e, t, i, r, c); + } + function YTn(n, e) { + this.g = n, this.d = A(M(vh, 1), C1, 10, 0, [e]); + } + function h1(n, e) { + this.e = n, this.a = Zn, this.b = yBn(e), this.c = e; + } + function ZTn(n, e) { + kE.call(this), eV(this), this.a = n, this.c = e; + } + function M8(n, e, t, i) { + St(n.c[e.g], t.g, i), St(n.c[t.g], e.g, i); + } + function ZD(n, e, t, i) { + St(n.c[e.g], e.g, t), St(n.b[e.g], e.g, i); + } + function M1e() { + return x8(), A(M(ron, 1), z, 376, 0, [uK, iy]); + } + function A1e() { + return K8(), A(M(Qcn, 1), z, 479, 0, [Vcn, xS]); + } + function S1e() { + return V8(), A(M(Wcn, 1), z, 419, 0, [$S, Ucn]); + } + function P1e() { + return OC(), A(M(Rcn, 1), z, 422, 0, [Bcn, s_]); + } + function I1e() { + return kC(), A(M(fun, 1), z, 420, 0, [j_, oun]); + } + function O1e() { + return z8(), A(M(non, 1), z, 421, 0, [iK, rK]); + } + function D1e() { + return z5(), A(M(bJn, 1), z, 523, 0, [Hm, Km]); + } + function $1e() { + return No(), A(M(BJn, 1), z, 520, 0, [iw, Bl]); + } + function F1e() { + return Ff(), A(M(yJn, 1), z, 516, 0, [A0, O1]); + } + function x1e() { + return ef(), A(M(EJn, 1), z, 515, 0, [Ya, kf]); + } + function L1e() { + return Od(), A(M(zJn, 1), z, 455, 0, [Rl, Lg]); + } + function N1e() { + return gC(), A(M(Son, 1), z, 425, 0, [yK, Aon]); + } + function B1e() { + return aC(), A(M(Mon, 1), z, 480, 0, [kK, Ton]); + } + function R1e() { + return iT(), A(M(Pon, 1), z, 495, 0, [EP, vv]); + } + function _1e() { + return $C(), A(M(Oon, 1), z, 426, 0, [Ion, TK]); + } + function K1e() { + return c7(), A(M(Ffn, 1), z, 429, 0, [DP, $fn]); + } + function H1e() { + return L8(), A(M(afn, 1), z, 430, 0, [FK, IP]); + } + function q1e() { + return $T(), A(M(Jin, 1), z, 428, 0, [yR, Qin]); + } + function G1e() { + return RC(), A(M(Zin, 1), z, 427, 0, [Yin, jR]); + } + function z1e() { + return _C(), A(M(Arn, 1), z, 424, 0, [$R, tS]); + } + function U1e() { + return N3(), A(M(NWn, 1), z, 511, 0, [_k, UR]); + } + function sC(n, e, t, i) { + return t >= 0 ? n.jh(e, t, i) : n.Sg(null, t, i); + } + function n$(n) { + return n.b.b == 0 ? n.a.$e() : aD(n.b); + } + function W1e(n) { + if (n.p != 5) + throw T(new ou()); + return ge(n.f); + } + function X1e(n) { + if (n.p != 5) + throw T(new ou()); + return ge(n.k); + } + function VW(n) { + return B(n.a) === B((eF(), gH)) && Vje(n), n.a; + } + function nMn(n) { + this.a = u(pe(n), 271), this.b = (Pn(), new Hz(n)); + } + function eMn(n, e) { + bte(this, new fn(n.a, n.b)), wte(this, p8(e)); + } + function Od() { + Od = N, Rl = new iz(Y2, 0), Lg = new iz(Z2, 1); + } + function Ff() { + Ff = N, A0 = new ez(Z2, 0), O1 = new ez(Y2, 1); + } + function Dd() { + rie.call(this, new s2(ob(12))), Bz(!0), this.a = 2; + } + function e$(n, e, t) { + Je(), ud.call(this, n), this.b = e, this.a = t; + } + function QW(n, e, t) { + ms(), uj.call(this, e), this.a = n, this.b = t; + } + function tMn(n) { + kE.call(this), eV(this), this.a = n, this.c = !0; + } + function iMn(n) { + var e; + e = n.c.d.b, n.b = e, n.a = n.c.d, e.a = n.c.d.b = n; + } + function oC(n) { + var e; + ebe(n.a), byn(n.a), e = new tj(n.a), TQ(e); + } + function V1e(n, e) { + aBn(n, !0), Yc(n.e.wf(), new $U(n, !0, e)); + } + function fC(n, e) { + return LAn(e), Y0e(n, F(be, Le, 25, e, 15, 1), e); + } + function Q1e(n, e) { + return C2(), n == Pt(fh(e)) || n == Pt(ml(e)); + } + function mc(n, e) { + return e == null ? Vr(Sr(n.f, null)) : n5(n.g, e); + } + function J1e(n) { + return n.b == 0 ? null : (ne(n.b != 0), Ts(n, n.a.a)); + } + function Gt(n) { + return Math.max(Math.min(n, nt), -2147483648) | 0; + } + function Y1e(n, e) { + var t = lR[n.charCodeAt(0)]; + return t ?? n; + } + function hC(n, e) { + return tC(n, "set1"), tC(e, "set2"), new Z8n(n, e); + } + function Z1e(n, e) { + var t; + return t = W0e(n.f, e), st(vE(t), n.f.d); + } + function R5(n, e) { + var t, i; + return t = e, i = new dI(), n_n(n, t, i), i.d; + } + function t$(n, e, t, i) { + var r; + r = new Gjn(), e.a[t.g] = r, m2(n.b, i, r); + } + function JW(n, e, t) { + var i; + i = n.Yg(e), i >= 0 ? n.sh(i, t) : _Y(n, e, t); + } + function Dw(n, e, t) { + dC(), n && it(dH, n, e), n && it($y, n, t); + } + function rMn(n, e, t) { + this.i = new X(), this.b = n, this.g = e, this.a = t; + } + function lC(n, e, t) { + this.c = new X(), this.e = n, this.f = e, this.b = t; + } + function YW(n, e, t) { + this.a = new X(), this.e = n, this.f = e, this.c = t; + } + function cMn(n, e) { + oE(this), this.f = e, this.g = n, eC(this), this._d(); + } + function A8(n, e) { + var t; + t = n.q.getHours(), n.q.setDate(e), S6(n, t); + } + function uMn(n, e) { + var t; + for (pe(e), t = n.a; t; t = t.c) + e.Od(t.g, t.i); + } + function sMn(n) { + var e; + return e = new kj(ob(n.length)), qV(e, n), e; + } + function nle(n) { + function e() { + } + return e.prototype = n || {}, new e(); + } + function ele(n, e) { + return LOn(n, e) ? (FIn(n), !0) : !1; + } + function Dh(n, e) { + if (e == null) + throw T(new Nv()); + return Y2e(n, e); + } + function tle(n) { + if (n.qe()) + return null; + var e = n.n; + return RA[e]; + } + function S8(n) { + return n.Db >> 16 != 3 ? null : u(n.Cb, 33); + } + function nf(n) { + return n.Db >> 16 != 9 ? null : u(n.Cb, 33); + } + function oMn(n) { + return n.Db >> 16 != 6 ? null : u(n.Cb, 79); + } + function fMn(n) { + return n.Db >> 16 != 7 ? null : u(n.Cb, 235); + } + function hMn(n) { + return n.Db >> 16 != 7 ? null : u(n.Cb, 160); + } + function Pt(n) { + return n.Db >> 16 != 11 ? null : u(n.Cb, 33); + } + function lMn(n, e) { + var t; + return t = n.Yg(e), t >= 0 ? n.lh(t) : Ox(n, e); + } + function aMn(n, e) { + var t; + return t = new iW(e), dxn(t, n), new au(t); + } + function ZW(n) { + var e; + return e = n.d, e = n.si(n.f), me(n, e), e.Ob(); + } + function dMn(n, e) { + return n.b += e.b, n.c += e.c, n.d += e.d, n.a += e.a, n; + } + function i$(n, e) { + return j.Math.abs(n) < j.Math.abs(e) ? n : e; + } + function ile(n) { + return !n.a && (n.a = new V(Ot, n, 10, 11)), n.a.i > 0; + } + function bMn() { + this.a = new Sh(), this.e = new hi(), this.g = 0, this.i = 0; + } + function wMn(n) { + this.a = n, this.b = F(lJn, q, 1944, n.e.length, 0, 2); + } + function r$(n, e, t) { + var i; + i = tDn(n, e, t), n.b = new tT(i.c.length); + } + function ef() { + ef = N, Ya = new nz(hN, 0), kf = new nz("UP", 1); + } + function aC() { + aC = N, kK = new rz(PHn, 0), Ton = new rz("FAN", 1); + } + function dC() { + dC = N, dH = new we(), $y = new we(), Ere(Azn, new z2n()); + } + function rle(n) { + if (n.p != 0) + throw T(new ou()); + return b5(n.f, 0); + } + function cle(n) { + if (n.p != 0) + throw T(new ou()); + return b5(n.k, 0); + } + function gMn(n) { + return n.Db >> 16 != 3 ? null : u(n.Cb, 147); + } + function k3(n) { + return n.Db >> 16 != 6 ? null : u(n.Cb, 235); + } + function tb(n) { + return n.Db >> 16 != 17 ? null : u(n.Cb, 26); + } + function pMn(n, e) { + var t = n.a = n.a || []; + return t[e] || (t[e] = n.le(e)); + } + function ule(n, e) { + var t; + return t = n.a.get(e), t ?? new Array(); + } + function sle(n, e) { + var t; + t = n.q.getHours(), n.q.setMonth(e), S6(n, t); + } + function yr(n, e, t) { + return e == null ? Rc(n.f, null, t) : zd(n.g, e, t); + } + function _5(n, e, t, i, r, c) { + return new Lh(n.e, e, n.aj(), t, i, r, c); + } + function P8(n, e, t) { + return n.a = Zu(n.a, 0, e) + ("" + t) + r8(n.a, e), n; + } + function ole(n, e, t) { + return W(n.a, (QE(), ex(e, t), new wd(e, t))), n; + } + function nX(n) { + return _z(n.c), n.e = n.a = n.c, n.c = n.c.c, ++n.d, n.a.f; + } + function vMn(n) { + return _z(n.e), n.c = n.a = n.e, n.e = n.e.e, --n.d, n.a.f; + } + function Ti(n, e) { + n.d && Qc(n.d.e, n), n.d = e, n.d && W(n.d.e, n); + } + function Ki(n, e) { + n.c && Qc(n.c.g, n), n.c = e, n.c && W(n.c.g, n); + } + function jr(n, e) { + n.c && Qc(n.c.a, n), n.c = e, n.c && W(n.c.a, n); + } + function Hr(n, e) { + n.i && Qc(n.i.j, n), n.i = e, n.i && W(n.i.j, n); + } + function mMn(n, e, t) { + this.a = e, this.c = n, this.b = (pe(t), new au(t)); + } + function kMn(n, e, t) { + this.a = e, this.c = n, this.b = (pe(t), new au(t)); + } + function yMn(n, e) { + this.a = n, this.c = Qr(this.a), this.b = new uC(e); + } + function fle(n) { + var e; + return Ma(n), e = new hi(), pt(n, new Vvn(e)); + } + function ib(n, e) { + if (n < 0 || n > e) + throw T(new mr(cnn + n + unn + e)); + } + function eX(n, e) { + return lCn(n.a, e) ? TW(n, u(e, 22).g, null) : null; + } + function hle(n) { + return yF(), qn(), u(n.a, 81).d.e != 0; + } + function jMn() { + jMn = N, azn = Fe((aj(), A(M(lzn, 1), z, 538, 0, [fR]))); + } + function EMn() { + EMn = N, YQn = ju(new li(), (Vi(), Or), (rr(), Kk)); + } + function tX() { + tX = N, ZQn = ju(new li(), (Vi(), Or), (rr(), Kk)); + } + function CMn() { + CMn = N, eJn = ju(new li(), (Vi(), Or), (rr(), Kk)); + } + function TMn() { + TMn = N, gJn = Ze(new li(), (Vi(), Or), (rr(), km)); + } + function ns() { + ns = N, mJn = Ze(new li(), (Vi(), Or), (rr(), km)); + } + function MMn() { + MMn = N, kJn = Ze(new li(), (Vi(), Or), (rr(), km)); + } + function c$() { + c$ = N, TJn = Ze(new li(), (Vi(), Or), (rr(), km)); + } + function AMn() { + AMn = N, lYn = ju(new li(), (r4(), Gm), (k6(), lK)); + } + function da(n, e, t, i) { + this.c = n, this.d = i, s$(this, e), o$(this, t); + } + function M2(n) { + this.c = new Tt(), this.b = n.b, this.d = n.c, this.a = n.a; + } + function u$(n) { + this.a = j.Math.cos(n), this.b = j.Math.sin(n); + } + function s$(n, e) { + n.a && Qc(n.a.k, n), n.a = e, n.a && W(n.a.k, n); + } + function o$(n, e) { + n.b && Qc(n.b.f, n), n.b = e, n.b && W(n.b.f, n); + } + function SMn(n, e) { + mhe(n, n.b, n.c), u(n.b.b, 65), e && u(e.b, 65).b; + } + function lle(n, e) { + vQ(n, e), I(n.Cb, 88) && jb(Iu(u(n.Cb, 88)), 2); + } + function f$(n, e) { + I(n.Cb, 88) && jb(Iu(u(n.Cb, 88)), 4), Oc(n, e); + } + function bC(n, e) { + I(n.Cb, 179) && (u(n.Cb, 179).tb = null), Oc(n, e); + } + function kc(n, e) { + return er(), R$(e) ? new IE(e, n) : new i8(e, n); + } + function ale(n, e) { + var t, i; + t = e.c, i = t != null, i && j2(n, new nb(e.c)); + } + function PMn(n) { + var e, t; + return t = (Vp(), e = new sd(), e), I3(t, n), t; + } + function IMn(n) { + var e, t; + return t = (Vp(), e = new sd(), e), I3(t, n), t; + } + function OMn(n, e) { + var t; + return t = new Rs(n), e.c[e.c.length] = t, t; + } + function DMn(n, e) { + var t; + return t = u(db(T2(n.a), e), 14), t ? t.gc() : 0; + } + function $Mn(n) { + var e; + return Ma(n), e = (Ow(), Ow(), Nin), qC(n, e); + } + function FMn(n) { + for (var e; ; ) + if (e = n.Pb(), !n.Ob()) + return e; + } + function iX(n, e) { + tie.call(this, new s2(ob(n))), rs(e, W_n), this.a = e; + } + function ch(n, e, t) { + KDn(e, t, n.gc()), this.c = n, this.a = e, this.b = t - e; + } + function xMn(n, e, t) { + var i; + KDn(e, t, n.c.length), i = t - e, AG(n.c, e, i); + } + function dle(n, e) { + Dyn(n, ge(ui(cl(e, 24), FM)), ge(ui(e, FM))); + } + function Ln(n, e) { + if (n < 0 || n >= e) + throw T(new mr(cnn + n + unn + e)); + } + function Te(n, e) { + if (n < 0 || n >= e) + throw T(new wG(cnn + n + unn + e)); + } + function xn(n, e) { + this.b = (_n(n), n), this.a = e & Ob ? e : e | 64 | Nf; + } + function LMn(n) { + dyn(this), Wmn(this.a, KV(j.Math.max(8, n)) << 1); + } + function tf(n) { + return Gr(A(M(di, 1), q, 8, 0, [n.i.n, n.n, n.a])); + } + function ble() { + return hf(), A(M(Nu, 1), z, 132, 0, [Win, ls, _b]); + } + function wle() { + return _o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc]); + } + function gle() { + return Cu(), A(M(Qzn, 1), z, 461, 0, [Xf, Ol, Co]); + } + function ple() { + return Jc(), A(M(Yzn, 1), z, 462, 0, [Wo, Dl, To]); + } + function vle() { + return Gd(), A(M(zrn, 1), z, 423, 0, [yg, Grn, qR]); + } + function mle() { + return W5(), A(M(Krn, 1), z, 379, 0, [NR, LR, BR]); + } + function kle() { + return i6(), A(M(Gsn, 1), z, 378, 0, [J_, qsn, oP]); + } + function yle() { + return F2(), A(M(Kcn, 1), z, 314, 0, [ap, qk, _cn]); + } + function jle() { + return VC(), A(M(qcn, 1), z, 337, 0, [Hcn, DS, o_]); + } + function Ele() { + return ja(), A(M(aXn, 1), z, 450, 0, [l_, rv, Tg]); + } + function Cle() { + return Hd(), A(M(YR, 1), z, 361, 0, [p0, Fl, g0]); + } + function Tle() { + return Nh(), A(M(kXn, 1), z, 303, 0, [zk, Ag, dp]); + } + function Mle() { + return H3(), A(M(y_, 1), z, 292, 0, [m_, k_, Gk]); + } + function Ale() { + return sr(), A(M(zQn, 1), z, 452, 0, [Bm, Au, Lc]); + } + function Sle() { + return Rh(), A(M(Zsn, 1), z, 339, 0, [Nl, Ysn, tK]); + } + function Ple() { + return oT(), A(M(ion, 1), z, 375, 0, [eon, cK, ton]); + } + function Ile() { + return dT(), A(M(hon, 1), z, 377, 0, [fK, gv, tw]); + } + function Ole() { + return V3(), A(M(uon, 1), z, 336, 0, [sK, con, Rm]); + } + function Dle() { + return uT(), A(M(fon, 1), z, 338, 0, [oon, oK, son]); + } + function $le() { + return Kd(), A(M(fJn, 1), z, 454, 0, [ry, _m, aP]); + } + function Fle() { + return CT(), A(M(gYn, 1), z, 442, 0, [CK, jK, EK]); + } + function xle() { + return f7(), A(M(Fon, 1), z, 380, 0, [CP, Don, $on]); + } + function Lle() { + return ET(), A(M(Yon, 1), z, 381, 0, [Jon, IK, Qon]); + } + function Nle() { + return sT(), A(M(Xon, 1), z, 293, 0, [PK, Won, Uon]); + } + function Ble() { + return w7(), A(M(OK, 1), z, 437, 0, [AP, SP, PP]); + } + function Rle() { + return _h(), A(M(Khn, 1), z, 334, 0, [HP, x1, i9]); + } + function _le() { + return sf(), A(M(Phn, 1), z, 272, 0, [yv, uw, jv]); + } + function Kle(n, e) { + return o9e(n, e, I(e, 99) && (u(e, 18).Bb & Ji) != 0); + } + function Hle(n, e, t) { + var i; + return i = O6(n, e, !1), i.b <= e && i.a <= t; + } + function NMn(n, e, t) { + var i; + i = new Jwn(), i.b = e, i.a = t, ++e.b, W(n.d, i); + } + function qle(n, e) { + var t; + return t = (_n(n), n).g, Yz(!!t), _n(e), t(e); + } + function rX(n, e) { + var t, i; + return i = a3(n, e), t = n.a.Zc(i), new Y8n(n, t); + } + function Gle(n) { + return n.Db >> 16 != 6 ? null : u(Fx(n), 235); + } + function zle(n) { + if (n.p != 2) + throw T(new ou()); + return ge(n.f) & Ut; + } + function Ule(n) { + if (n.p != 2) + throw T(new ou()); + return ge(n.k) & Ut; + } + function Wle(n) { + return n.a == (C3(), uI) && Ste(n, C9e(n.g, n.b)), n.a; + } + function A2(n) { + return n.d == (C3(), uI) && Ite(n, pke(n.g, n.b)), n.d; + } + function y(n) { + return ne(n.a < n.c.c.length), n.b = n.a++, n.c.c[n.b]; + } + function Xle(n, e) { + n.b = n.b | e.b, n.c = n.c | e.c, n.d = n.d | e.d, n.a = n.a | e.a; + } + function ui(n, e) { + return bl(Hfe(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e)); + } + function rf(n, e) { + return bl(qfe(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e)); + } + function h$(n, e) { + return bl(Gfe(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e)); + } + function Vle(n) { + return Hi(Ih(eu(Fu(n, 32)), 32), eu(Fu(n, 32))); + } + function $d(n) { + return pe(n), I(n, 14) ? new au(u(n, 14)) : o3(n.Kc()); + } + function Qle(n, e) { + return X5(), n.c == e.c ? ni(e.d, n.d) : ni(n.c, e.c); + } + function Jle(n, e) { + return X5(), n.c == e.c ? ni(n.d, e.d) : ni(n.c, e.c); + } + function Yle(n, e) { + return X5(), n.c == e.c ? ni(n.d, e.d) : ni(e.c, n.c); + } + function Zle(n, e) { + return X5(), n.c == e.c ? ni(e.d, n.d) : ni(e.c, n.c); + } + function nae(n, e) { + var t; + t = K(Y(n.a.We((Xe(), KP)))), T_n(n, e, t); + } + function eae(n, e) { + var t; + t = u(te(n.g, e), 57), Yc(e.d, new K7n(n, t)); + } + function tae(n, e) { + var t, i; + return t = EFn(n), i = EFn(e), t < i ? -1 : t > i ? 1 : 0; + } + function BMn(n, e) { + var t, i; + return t = F$(e), i = t, u(te(n.c, i), 19).a; + } + function RMn(n, e) { + var t; + for (t = n + ""; t.length < e; ) + t = "0" + t; + return t; + } + function wC(n) { + return n.c == null || n.c.length == 0 ? "n_" + n.g : "n_" + n.c; + } + function cX(n) { + return n.c == null || n.c.length == 0 ? "n_" + n.b : "n_" + n.c; + } + function uX(n, e) { + return n && n.equals ? n.equals(e) : B(n) === B(e); + } + function sX(n, e) { + return e == 0 ? !!n.o && n.o.f != 0 : zF(n, e); + } + function go(n, e, t) { + var i; + n.n && e && t && (i = new x2n(), W(n.e, i)); + } + function l$(n, e, t) { + var i; + i = n.d[e.p], n.d[e.p] = n.d[t.p], n.d[t.p] = i; + } + function _Mn(n, e, t) { + this.d = n, this.j = e, this.e = t, this.o = -1, this.p = 3; + } + function KMn(n, e, t) { + this.d = n, this.k = e, this.f = t, this.o = -1, this.p = 5; + } + function HMn(n, e, t) { + ud.call(this, 25), this.b = n, this.a = e, this.c = t; + } + function es(n) { + Je(), ud.call(this, n), this.c = !1, this.a = !1; + } + function qMn(n, e, t, i, r, c) { + rV.call(this, n, e, t, i, r), c && (this.o = -2); + } + function GMn(n, e, t, i, r, c) { + cV.call(this, n, e, t, i, r), c && (this.o = -2); + } + function zMn(n, e, t, i, r, c) { + PX.call(this, n, e, t, i, r), c && (this.o = -2); + } + function UMn(n, e, t, i, r, c) { + oV.call(this, n, e, t, i, r), c && (this.o = -2); + } + function WMn(n, e, t, i, r, c) { + IX.call(this, n, e, t, i, r), c && (this.o = -2); + } + function XMn(n, e, t, i, r, c) { + uV.call(this, n, e, t, i, r), c && (this.o = -2); + } + function VMn(n, e, t, i, r, c) { + sV.call(this, n, e, t, i, r), c && (this.o = -2); + } + function QMn(n, e, t, i, r, c) { + OX.call(this, n, e, t, i, r), c && (this.o = -2); + } + function JMn(n, e, t, i) { + uj.call(this, t), this.b = n, this.c = e, this.d = i; + } + function oX(n, e) { + this.a = new X(), this.d = new X(), this.f = n, this.c = e; + } + function YMn() { + this.c = new Cyn(), this.a = new GTn(), this.b = new t9n(), w7n(); + } + function ZMn() { + L2(), this.b = new we(), this.a = new we(), this.c = new X(); + } + function nAn(n, e) { + this.g = n, this.d = (C3(), uI), this.a = uI, this.b = e; + } + function eAn(n, e) { + this.f = n, this.a = (C3(), cI), this.c = cI, this.b = e; + } + function fX(n, e) { + !n.c && (n.c = new xt(n, 0)), yM(n.c, (ht(), w9), e); + } + function gC() { + gC = N, yK = new cz("DFS", 0), Aon = new cz("BFS", 1); + } + function iae(n, e, t) { + var i; + return i = u(n.Zb().xc(e), 14), !!i && i.Hc(t); + } + function tAn(n, e, t) { + var i; + return i = u(n.Zb().xc(e), 14), !!i && i.Mc(t); + } + function iAn(n, e, t, i) { + return n.a += "" + Zu(e == null ? iu : Nr(e), t, i), n; + } + function Jr(n, e, t, i, r, c) { + return gOn(n, e, t, c), dQ(n, i), bQ(n, r), n; + } + function a$(n) { + return ne(n.b.b != n.d.a), n.c = n.b = n.b.b, --n.a, n.c.c; + } + function K5(n) { + for (; n.d > 0 && n.a[--n.d] == 0; ) + ; + n.a[n.d++] == 0 && (n.e = 0); + } + function rAn(n) { + return n.a ? n.e.length == 0 ? n.a.a : n.a.a + ("" + n.e) : n.c; + } + function rae(n) { + return !!n.a && Ou(n.a.a).i != 0 && !(n.b && YF(n.b)); + } + function cae(n) { + return !!n.u && wc(n.u.a).i != 0 && !(n.n && JF(n.n)); + } + function cAn(n) { + return gD(n.e.Hd().gc() * n.c.Hd().gc(), 16, new tvn(n)); + } + function uae(n, e) { + return xCn(eu(n.q.getTime()), eu(e.q.getTime())); + } + function xf(n) { + return u(lf(n, F(GR, MN, 17, n.c.length, 0, 1)), 474); + } + function I8(n) { + return u(lf(n, F(vh, C1, 10, n.c.length, 0, 1)), 193); + } + function sae(n) { + return ns(), !Wi(n) && !(!Wi(n) && n.c.i.c == n.d.i.c); + } + function uAn(n, e, t) { + var i; + i = (pe(n), new au(n)), N3e(new mMn(i, e, t)); + } + function O8(n, e, t) { + var i; + i = (pe(n), new au(n)), B3e(new kMn(i, e, t)); + } + function sAn(n, e) { + var t; + return t = 1 - e, n.a[t] = eT(n.a[t], t), eT(n, e); + } + function oAn(n, e) { + var t; + n.e = new oG(), t = Tb(e), wi(t, n.c), eBn(n, t, 0); + } + function Mi(n, e, t, i) { + var r; + r = new XH(), r.a = e, r.b = t, r.c = i, Ke(n.a, r); + } + function Z(n, e, t, i) { + var r; + r = new XH(), r.a = e, r.b = t, r.c = i, Ke(n.b, r); + } + function po(n) { + var e, t, i; + return e = new HCn(), t = Zx(e, n), UEe(e), i = t, i; + } + function hX() { + var n, e, t; + return e = (t = (n = new sd(), n), t), W(M1n, e), e; + } + function pC(n) { + return n.j.c = F(Zn, rn, 1, 0, 5, 1), KW(n.c), Khe(n.a), n; + } + function $w(n) { + return Qv(), I(n.g, 10) ? u(n.g, 10) : null; + } + function oae(n) { + return Iw(n).dc() ? !1 : (sce(n, new Dv()), !0); + } + function fae(n) { + if (!("stack" in n)) + try { + throw n; + } catch { + } + return n; + } + function D8(n, e) { + if (n < 0 || n >= e) + throw T(new mr(j6e(n, e))); + return n; + } + function fAn(n, e, t) { + if (n < 0 || e < n || e > t) + throw T(new mr(W5e(n, e, t))); + } + function d$(n, e) { + if (ci(n.a, e), e.d) + throw T(new _r(wKn)); + e.d = n; + } + function b$(n, e) { + if (e.$modCount != n.$modCount) + throw T(new vs()); + } + function hAn(n, e) { + return I(e, 42) ? ix(n.a, u(e, 42)) : !1; + } + function lAn(n, e) { + return I(e, 42) ? ix(n.a, u(e, 42)) : !1; + } + function aAn(n, e) { + return I(e, 42) ? ix(n.a, u(e, 42)) : !1; + } + function hae(n, e) { + return n.a <= n.b ? (e.ud(n.a++), !0) : !1; + } + function Fd(n) { + var e; + return Fr(n) ? (e = n, e == -0 ? 0 : e) : m0e(n); + } + function vC(n) { + var e; + return fl(n), e = new fln(), vw(n.a, new Wvn(e)), e; + } + function dAn(n) { + var e; + return fl(n), e = new oln(), vw(n.a, new Uvn(e)), e; + } + function Ii(n, e) { + this.a = n, $v.call(this, n), ib(e, n.gc()), this.b = e; + } + function lX(n) { + this.e = n, this.b = this.e.a.entries(), this.a = new Array(); + } + function lae(n) { + return gD(n.e.Hd().gc() * n.c.Hd().gc(), 273, new evn(n)); + } + function mC(n) { + return new Ic((rs(n, AL), KC(Hi(Hi(5, n), n / 10 | 0)))); + } + function bAn(n) { + return u(lf(n, F(FWn, UKn, 11, n.c.length, 0, 1)), 1943); + } + function aae(n, e, t) { + return t.f.c.length > 0 ? SW(n.a, e, t) : SW(n.b, e, t); + } + function dae(n, e, t) { + n.d && Qc(n.d.e, n), n.d = e, n.d && J0(n.d.e, t, n); + } + function w$(n, e) { + uTe(e, n), WU(n.d), WU(u(k(n, (nn(), eP)), 207)); + } + function H5(n, e) { + cTe(e, n), UU(n.d), UU(u(k(n, (nn(), eP)), 207)); + } + function xd(n, e) { + var t, i; + return t = Dh(n, e), i = null, t && (i = t.fe()), i; + } + function y3(n, e) { + var t, i; + return t = sb(n, e), i = null, t && (i = t.ie()), i; + } + function q5(n, e) { + var t, i; + return t = Dh(n, e), i = null, t && (i = t.ie()), i; + } + function $h(n, e) { + var t, i; + return t = Dh(n, e), i = null, t && (i = tY(t)), i; + } + function bae(n, e, t) { + var i; + return i = t4(t), gM(n.g, i, e), gM(n.i, e, t), e; + } + function wae(n, e, t) { + var i; + i = q2e(); + try { + return kue(n, e, t); + } finally { + Mae(i); + } + } + function wAn(n) { + var e; + e = n.Wg(), this.a = I(e, 69) ? u(e, 69).Zh() : e.Kc(); + } + function li() { + P9n.call(this), this.j.c = F(Zn, rn, 1, 0, 5, 1), this.a = -1; + } + function aX(n, e, t, i) { + this.d = n, this.n = e, this.g = t, this.o = i, this.p = -1; + } + function gAn(n, e, t, i) { + this.e = i, this.d = null, this.c = n, this.a = e, this.b = t; + } + function dX(n, e, t) { + this.d = new r6n(this), this.e = n, this.i = e, this.f = t; + } + function kC() { + kC = N, j_ = new QG(P4, 0), oun = new QG("TOP_LEFT", 1); + } + function pAn() { + pAn = N, aon = aTn(Q(1), Q(4)), lon = aTn(Q(1), Q(2)); + } + function vAn() { + vAn = N, uZn = Fe((Ij(), A(M(cZn, 1), z, 551, 0, [$K]))); + } + function mAn() { + mAn = N, rZn = Fe((Pj(), A(M(lfn, 1), z, 482, 0, [DK]))); + } + function kAn() { + kAn = N, CZn = Fe((Jv(), A(M(Dfn, 1), z, 530, 0, [hy]))); + } + function yAn() { + yAn = N, IUn = Fe((Aj(), A(M(krn, 1), z, 481, 0, [SR]))); + } + function gae() { + return qd(), A(M(EUn, 1), z, 406, 0, [Ok, Ik, MR, AR]); + } + function pae() { + return FC(), A(M(WA, 1), z, 297, 0, [vR, qin, Gin, zin]); + } + function vae() { + return d6(), A(M(SUn, 1), z, 394, 0, [Lk, YA, ZA, Nk]); + } + function mae() { + return K2(), A(M(TUn, 1), z, 323, 0, [$k, Dk, Fk, xk]); + } + function kae() { + return q3(), A(M(jWn, 1), z, 405, 0, [w0, qb, Hb, kg]); + } + function yae() { + return aT(), A(M(KWn, 1), z, 360, 0, [QR, TS, MS, Hk]); + } + function jAn(n, e, t, i) { + return I(t, 54) ? new ojn(n, e, t, i) : new pW(n, e, t, i); + } + function jae() { + return ff(), A(M(QWn, 1), z, 411, 0, [lp, Z4, nv, JR]); + } + function Eae(n) { + var e; + return n.j == (J(), ae) && (e = GLn(n), lu(e, Vn)); + } + function Cae(n, e) { + var t; + t = e.a, Ki(t, e.c.d), Ti(t, e.d.d), hb(t.a, n.n); + } + function EAn(n, e) { + return u(jd(KE(u(ct(n.k, e), 15).Oc(), jg)), 113); + } + function CAn(n, e) { + return u(jd(HE(u(ct(n.k, e), 15).Oc(), jg)), 113); + } + function Tae(n) { + return new xn(jbe(u(n.a.dd(), 14).gc(), n.a.cd()), 16); + } + function j3(n) { + return I(n, 14) ? u(n, 14).dc() : !n.Kc().Ob(); + } + function S2(n) { + return Qv(), I(n.g, 145) ? u(n.g, 145) : null; + } + function TAn(n) { + if (n.e.g != n.b) + throw T(new vs()); + return !!n.c && n.d > 0; + } + function Re(n) { + return ne(n.b != n.d.c), n.c = n.b, n.b = n.b.a, ++n.a, n.c.c; + } + function bX(n, e) { + _n(e), St(n.a, n.c, e), n.c = n.c + 1 & n.a.length - 1, MFn(n); + } + function ll(n, e) { + _n(e), n.b = n.b - 1 & n.a.length - 1, St(n.a, n.b, e), MFn(n); + } + function MAn(n, e) { + var t; + for (t = n.j.c.length; t < e; t++) + W(n.j, n.rg()); + } + function AAn(n, e, t, i) { + var r; + return r = i[e.g][t.g], K(Y(k(n.a, r))); + } + function wX(n, e, t, i, r) { + this.i = n, this.a = e, this.e = t, this.j = i, this.f = r; + } + function SAn(n, e, t, i, r) { + this.a = n, this.e = e, this.f = t, this.b = i, this.g = r; + } + function Mae(n) { + n && j0e((aG(), din)), --_A, n && KA != -1 && (hre(KA), KA = -1); + } + function Aae() { + return gb(), A(M(Z_, 1), z, 197, 0, [fP, Y_, xg, Fg]); + } + function Sae() { + return r4(), A(M(won, 1), z, 393, 0, [gP, qm, uy, Gm]); + } + function Pae() { + return qT(), A(M(zon, 1), z, 340, 0, [SK, qon, Gon, Hon]); + } + function Iae() { + return Qu(), A(M(o9, 1), z, 374, 0, [Ay, rd, My, sw]); + } + function Oae() { + return us(), A(M(sne, 1), z, 285, 0, [Ey, kh, Kl, jy]); + } + function Dae() { + return Hh(), A(M(cH, 1), z, 218, 0, [rH, yy, Ev, Sp]); + } + function $ae() { + return AT(), A(M(Qhn, 1), z, 311, 0, [oH, Whn, Vhn, Xhn]); + } + function Fae() { + return Vu(), A(M(jne, 1), z, 396, 0, [gs, Yhn, Jhn, Zhn]); + } + function xae(n) { + return dC(), Uu(dH, n) ? u(te(dH, n), 331).ug() : null; + } + function js(n, e, t) { + return e < 0 ? Ox(n, t) : u(t, 66).Nj().Sj(n, n.yh(), e); + } + function Lae(n, e, t) { + var i; + return i = t4(t), gM(n.d, i, e), it(n.e, e, t), e; + } + function Nae(n, e, t) { + var i; + return i = t4(t), gM(n.j, i, e), it(n.k, e, t), e; + } + function PAn(n) { + var e, t; + return e = (dd(), t = new VH(), t), n && _x(e, n), e; + } + function gX(n) { + var e; + return e = n.ri(n.i), n.i > 0 && pc(n.g, 0, e, 0, n.i), e; + } + function IAn(n, e) { + $j(); + var t; + return t = u(te(eI, n), 55), !t || t.wj(e); + } + function Bae(n) { + if (n.p != 1) + throw T(new ou()); + return ge(n.f) << 24 >> 24; + } + function Rae(n) { + if (n.p != 1) + throw T(new ou()); + return ge(n.k) << 24 >> 24; + } + function _ae(n) { + if (n.p != 7) + throw T(new ou()); + return ge(n.k) << 16 >> 16; + } + function Kae(n) { + if (n.p != 7) + throw T(new ou()); + return ge(n.f) << 16 >> 16; + } + function Fh(n) { + var e; + for (e = 0; n.Ob(); ) + n.Pb(), e = Hi(e, 1); + return KC(e); + } + function OAn(n, e) { + var t; + return t = new _0(), n.xd(t), t.a += "..", e.yd(t), t.a; + } + function Hae(n, e, t) { + var i; + i = u(te(n.g, t), 57), W(n.a.c, new Pi(e, i)); + } + function qae(n, e, t) { + return TD(Y(Vr(Sr(n.f, e))), Y(Vr(Sr(n.f, t)))); + } + function yC(n, e, t) { + return vM(n, e, t, I(e, 99) && (u(e, 18).Bb & Ji) != 0); + } + function Gae(n, e, t) { + return v4(n, e, t, I(e, 99) && (u(e, 18).Bb & Ji) != 0); + } + function zae(n, e, t) { + return b9e(n, e, t, I(e, 99) && (u(e, 18).Bb & Ji) != 0); + } + function pX(n, e) { + return n == (Qn(), ii) && e == ii ? 4 : n == ii || e == ii ? 8 : 32; + } + function DAn(n, e) { + return B(e) === B(n) ? "(this Map)" : e == null ? iu : Nr(e); + } + function Uae(n, e) { + return u(e == null ? Vr(Sr(n.f, null)) : n5(n.g, e), 281); + } + function $An(n, e, t) { + var i; + return i = t4(t), it(n.b, i, e), it(n.c, e, t), e; + } + function FAn(n, e) { + var t; + for (t = e; t; ) + W0(n, t.i, t.j), t = Pt(t); + return n; + } + function vX(n, e) { + var t; + return t = C8(o3(new x$(n, e))), DE(new x$(n, e)), t; + } + function uh(n, e) { + er(); + var t; + return t = u(n, 66).Mj(), M5e(t, e), t.Ok(e); + } + function Wae(n, e, t, i, r) { + var c; + c = m9e(r, t, i), W(e, p6e(r, c)), o5e(n, r, e); + } + function xAn(n, e, t) { + n.i = 0, n.e = 0, e != t && (uDn(n, e, t), cDn(n, e, t)); + } + function mX(n, e) { + var t; + t = n.q.getHours(), n.q.setFullYear(e + Tl), S6(n, t); + } + function Xae(n, e, t) { + if (t) { + var i = t.ee(); + n.a[e] = i(t); + } else + delete n.a[e]; + } + function g$(n, e, t) { + if (t) { + var i = t.ee(); + t = i(t); + } else + t = void 0; + n.a[e] = t; + } + function LAn(n) { + if (n < 0) + throw T(new K9n("Negative array size: " + n)); + } + function wc(n) { + return n.n || (Iu(n), n.n = new wCn(n, dr, n), Ar(n)), n.n; + } + function G5(n) { + return ne(n.a < n.c.a.length), n.b = n.a, qPn(n), n.c.b[n.b]; + } + function kX(n) { + n.b != n.c && (n.a = F(Zn, rn, 1, 8, 5, 1), n.b = 0, n.c = 0); + } + function NAn(n) { + this.b = new we(), this.c = new we(), this.d = new we(), this.a = n; + } + function rb(n, e) { + Je(), ud.call(this, n), this.a = e, this.c = -1, this.b = -1; + } + function cb(n, e, t, i) { + _Mn.call(this, 1, t, i), this.c = n, this.b = e; + } + function p$(n, e, t, i) { + KMn.call(this, 1, t, i), this.c = n, this.b = e; + } + function v$(n, e, t, i, r, c, o) { + z$.call(this, e, i, r, c, o), this.c = n, this.a = t; + } + function ba(n, e, t) { + this.e = n, this.a = Zn, this.b = yBn(e), this.c = e, this.d = t; + } + function m$(n) { + this.e = n, this.c = this.e.a, this.b = this.e.g, this.d = this.e.i; + } + function BAn(n) { + this.c = n, this.a = u(qs(n), 148), this.b = this.a.Aj().Nh(); + } + function yX(n) { + this.d = n, this.b = this.d.a.entries(), this.a = this.b.next(); + } + function wa() { + we.call(this), rjn(this), this.d.b = this.d, this.d.a = this.d; + } + function RAn(n, e) { + pU.call(this), this.a = n, this.b = e, W(this.a.b, this); + } + function Vae(n, e) { + var t; + return t = e != null ? mc(n, e) : Vr(Sr(n.f, e)), eE(t); + } + function Qae(n, e) { + var t; + return t = e != null ? mc(n, e) : Vr(Sr(n.f, e)), eE(t); + } + function _An(n, e) { + var t; + for (t = 0; t < e; ++t) + St(n, t, new kq(u(n[t], 42))); + } + function Jae(n, e) { + var t; + for (t = n.d - 1; t >= 0 && n.a[t] === e[t]; t--) + ; + return t < 0; + } + function KAn(n, e) { + X3(); + var t; + return t = n.j.g - e.j.g, t != 0 ? t : 0; + } + function HAn(n, e) { + return _n(e), n.a != null ? $fe(e.Kb(n.a)) : UA; + } + function jC(n) { + var e; + return n ? new iW(n) : (e = new Sh(), nF(e, n), e); + } + function ts(n, e) { + var t; + return e.b.Kb(FPn(n, e.c.Ee(), (t = new Jvn(e), t))); + } + function EC(n) { + _J(), Dyn(this, ge(ui(cl(n, 24), FM)), ge(ui(n, FM))); + } + function qAn() { + qAn = N, Gzn = Fe(($T(), A(M(Jin, 1), z, 428, 0, [yR, Qin]))); + } + function GAn() { + GAn = N, zzn = Fe((RC(), A(M(Zin, 1), z, 427, 0, [Yin, jR]))); + } + function zAn() { + zAn = N, WUn = Fe((_C(), A(M(Arn, 1), z, 424, 0, [$R, tS]))); + } + function UAn() { + UAn = N, BWn = Fe((N3(), A(M(NWn, 1), z, 511, 0, [_k, UR]))); + } + function WAn() { + WAn = N, lXn = Fe((V8(), A(M(Wcn, 1), z, 419, 0, [$S, Ucn]))); + } + function XAn() { + XAn = N, wXn = Fe((K8(), A(M(Qcn, 1), z, 479, 0, [Vcn, xS]))); + } + function VAn() { + VAn = N, XQn = Fe((x8(), A(M(ron, 1), z, 376, 0, [uK, iy]))); + } + function QAn() { + QAn = N, GQn = Fe((z8(), A(M(non, 1), z, 421, 0, [iK, rK]))); + } + function JAn() { + JAn = N, sXn = Fe((OC(), A(M(Rcn, 1), z, 422, 0, [Bcn, s_]))); + } + function YAn() { + YAn = N, jXn = Fe((kC(), A(M(fun, 1), z, 420, 0, [j_, oun]))); + } + function ZAn() { + ZAn = N, RJn = Fe((No(), A(M(BJn, 1), z, 520, 0, [iw, Bl]))); + } + function nSn() { + nSn = N, wJn = Fe((z5(), A(M(bJn, 1), z, 523, 0, [Hm, Km]))); + } + function eSn() { + eSn = N, jJn = Fe((Ff(), A(M(yJn, 1), z, 516, 0, [A0, O1]))); + } + function tSn() { + tSn = N, CJn = Fe((ef(), A(M(EJn, 1), z, 515, 0, [Ya, kf]))); + } + function iSn() { + iSn = N, UJn = Fe((Od(), A(M(zJn, 1), z, 455, 0, [Rl, Lg]))); + } + function rSn() { + rSn = N, hYn = Fe((gC(), A(M(Son, 1), z, 425, 0, [yK, Aon]))); + } + function cSn() { + cSn = N, wYn = Fe((iT(), A(M(Pon, 1), z, 495, 0, [EP, vv]))); + } + function uSn() { + uSn = N, fYn = Fe((aC(), A(M(Mon, 1), z, 480, 0, [kK, Ton]))); + } + function sSn() { + sSn = N, vYn = Fe(($C(), A(M(Oon, 1), z, 426, 0, [Ion, TK]))); + } + function oSn() { + oSn = N, TZn = Fe((c7(), A(M(Ffn, 1), z, 429, 0, [DP, $fn]))); + } + function fSn() { + fSn = N, sZn = Fe((L8(), A(M(afn, 1), z, 430, 0, [FK, IP]))); + } + function z5() { + z5 = N, Hm = new ZG("UPPER", 0), Km = new ZG("LOWER", 1); + } + function Yae(n, e) { + var t; + t = new r2(), aa(t, "x", e.a), aa(t, "y", e.b), j2(n, t); + } + function Zae(n, e) { + var t; + t = new r2(), aa(t, "x", e.a), aa(t, "y", e.b), j2(n, t); + } + function nde(n, e) { + var t, i; + i = !1; + do + t = JOn(n, e), i = i | t; + while (t); + return i; + } + function jX(n, e) { + var t, i; + for (t = e, i = 0; t > 0; ) + i += n.a[t], t -= t & -t; + return i; + } + function hSn(n, e) { + var t; + for (t = e; t; ) + W0(n, -t.i, -t.j), t = Pt(t); + return n; + } + function $i(n, e) { + var t, i; + for (_n(e), i = n.Kc(); i.Ob(); ) + t = i.Pb(), e.td(t); + } + function lSn(n, e) { + var t; + return t = e.cd(), new wd(t, n.e.pc(t, u(e.dd(), 14))); + } + function Ht(n, e, t, i) { + var r; + r = new aI(), r.c = e, r.b = t, r.a = i, i.b = t.a = r, ++n.b; + } + function Es(n, e, t) { + var i; + return i = (Ln(e, n.c.length), n.c[e]), n.c[e] = t, i; + } + function ede(n, e, t) { + return u(e == null ? Rc(n.f, null, t) : zd(n.g, e, t), 281); + } + function k$(n) { + return n.c && n.d ? cX(n.c) + "->" + cX(n.d) : "e_" + kd(n); + } + function E3(n, e) { + return (Ma(n), Wv(new $n(n, new UX(e, n.a)))).sd(X4); + } + function tde() { + return Vi(), A(M(Hrn, 1), z, 356, 0, [Vf, $l, Kc, Tc, Or]); + } + function ide() { + return J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn]); + } + function rde(n) { + return gj(), function() { + return wae(n, this, arguments); + }; + } + function cde() { + return Date.now ? Date.now() : (/* @__PURE__ */ new Date()).getTime(); + } + function Wi(n) { + return !n.c || !n.d ? !1 : !!n.c.i && n.c.i == n.d.i; + } + function aSn(n) { + if (!n.c.Sb()) + throw T(new ic()); + return n.a = !0, n.c.Ub(); + } + function $8(n) { + n.i = 0, z9(n.b, null), z9(n.c, null), n.a = null, n.e = null, ++n.g; + } + function EX(n) { + are.call(this, n == null ? iu : Nr(n), I(n, 78) ? u(n, 78) : null); + } + function dSn(n) { + B_n(), Nmn(this), this.a = new Tt(), QV(this, n), Ke(this.a, n); + } + function bSn() { + RO(this), this.b = new fn(Lt, Lt), this.a = new fn(Vt, Vt); + } + function wSn(n, e) { + this.c = 0, this.b = e, qkn.call(this, n, 17493), this.a = this.c; + } + function y$(n) { + CC(), !pf && (this.c = n, this.e = !0, this.a = new X()); + } + function CC() { + CC = N, pf = !0, Fzn = !1, xzn = !1, Nzn = !1, Lzn = !1; + } + function CX(n, e) { + return I(e, 149) ? An(n.c, u(e, 149).c) : !1; + } + function TX(n, e) { + var t; + return t = 0, n && (t += n.f.a / 2), e && (t += e.f.a / 2), t; + } + function j$(n, e) { + var t; + return t = u(Ld(n.d, e), 23), t || u(Ld(n.e, e), 23); + } + function gSn(n) { + this.b = n, ie.call(this, n), this.a = u(Rn(this.b.a, 4), 126); + } + function pSn(n) { + this.b = n, w2.call(this, n), this.a = u(Rn(this.b.a, 4), 126); + } + function Iu(n) { + return n.t || (n.t = new Amn(n), s6(new _9n(n), 0, n.t)), n.t; + } + function ude() { + return or(), A(M(e9, 1), z, 103, 0, [mh, Ao, Zs, Jh, Yh]); + } + function sde() { + return qw(), A(M(c9, 1), z, 249, 0, [Hl, Cy, Hhn, r9, qhn]); + } + function ode() { + return Ho(), A(M(F1, 1), z, 175, 0, [Xn, vi, Yf, Za, $1]); + } + function fde() { + return P7(), A(M(gfn, 1), z, 316, 0, [dfn, xK, wfn, LK, bfn]); + } + function hde() { + return b6(), A(M(Usn, 1), z, 315, 0, [zsn, nK, eK, Lm, Nm]); + } + function lde() { + return Ia(), A(M(zcn, 1), z, 335, 0, [f_, Gcn, h_, Em, jm]); + } + function ade() { + return w4(), A(M(eZn, 1), z, 355, 0, [Ng, Ep, Qm, Vm, Jm]); + } + function dde() { + return Vw(), A(M(YWn, 1), z, 363, 0, [SS, IS, OS, PS, AS]); + } + function bde() { + return Ss(), A(M(jun, 1), z, 163, 0, [Qk, Sm, xl, Pm, Wb]); + } + function C3() { + C3 = N; + var n, e; + cI = (Vp(), e = new fj(), e), uI = (n = new BI(), n); + } + function vSn(n) { + var e; + return n.c || (e = n.r, I(e, 88) && (n.c = u(e, 26))), n.c; + } + function wde(n) { + return n.e = 3, n.d = n.Yb(), n.e != 2 ? (n.e = 0, !0) : !1; + } + function E$(n) { + var e, t, i; + return e = n & Lu, t = n >> 22 & Lu, i = n < 0 ? Wh : 0, Nc(e, t, i); + } + function gde(n) { + var e, t, i, r; + for (t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], N5(e); + } + function pde(n, e) { + var t, i; + t = u(dge(n.c, e), 14), t && (i = t.gc(), t.$b(), n.d -= i); + } + function mSn(n, e) { + var t, i; + return t = e.cd(), i = VV(n, t), !!i && vc(i.e, e.dd()); + } + function P2(n, e) { + return e == 0 || n.e == 0 ? n : e > 0 ? g$n(n, e) : BNn(n, -e); + } + function MX(n, e) { + return e == 0 || n.e == 0 ? n : e > 0 ? BNn(n, e) : g$n(n, -e); + } + function ve(n) { + if (Se(n)) + return n.c = n.a, n.a.Pb(); + throw T(new ic()); + } + function kSn(n) { + var e, t; + return e = n.c.i, t = n.d.i, e.k == (Qn(), Xt) && t.k == Xt; + } + function C$(n) { + var e; + return e = new Id(), Pr(e, n), H(e, (nn(), Mr), null), e; + } + function T$(n, e, t) { + var i; + return i = n.Yg(e), i >= 0 ? n._g(i, t, !0) : Zd(n, e, t); + } + function AX(n, e, t, i) { + var r; + for (r = 0; r < CR; r++) + RE(n.a[e.g][r], t, i[e.g]); + } + function SX(n, e, t, i) { + var r; + for (r = 0; r < QA; r++) + BE(n.a[r][e.g], t, i[e.g]); + } + function PX(n, e, t, i, r) { + _Mn.call(this, e, i, r), this.c = n, this.a = t; + } + function IX(n, e, t, i, r) { + KMn.call(this, e, i, r), this.c = n, this.a = t; + } + function OX(n, e, t, i, r) { + jSn.call(this, e, i, r), this.c = n, this.a = t; + } + function vo(n, e, t, i, r) { + jSn.call(this, e, i, r), this.c = n, this.b = t; + } + function ySn(n, e, t) { + uj.call(this, t), this.b = n, this.c = e, this.d = (LF(), vH); + } + function jSn(n, e, t) { + this.d = n, this.k = e ? 1 : 0, this.f = t ? 1 : 0, this.o = -1, this.p = 0; + } + function ESn(n, e, t) { + var i; + i = new Sz(n.a), Z5(i, n.a.a), Rc(i.f, e, t), n.a.a = i; + } + function F8(n, e) { + n.qi(n.i + 1), k5(n, n.i, n.oi(n.i, e)), n.bi(n.i++, e), n.ci(); + } + function U5(n) { + var e, t; + ++n.j, e = n.g, t = n.i, n.g = null, n.i = 0, n.di(t, e), n.ci(); + } + function cf(n) { + var e, t; + return pe(n), e = Nhe(n.length), t = new Ic(e), qV(t, n), t; + } + function I2(n) { + var e; + return e = (pe(n), n ? new au(n) : o3(n.Kc())), Ax(e), mT(e); + } + function l1(n, e) { + var t; + return t = (Ln(e, n.c.length), n.c[e]), AG(n.c, e, 1), t; + } + function ct(n, e) { + var t; + return t = u(n.c.xc(e), 14), !t && (t = n.ic(e)), n.pc(e, t); + } + function DX(n, e) { + var t, i; + return t = (_n(n), n), i = (_n(e), e), t == i ? 0 : t < i ? -1 : 1; + } + function CSn(n) { + var e; + return e = n.e + n.f, isNaN(e) && jE(n.d) ? n.d : e; + } + function xh(n, e) { + return n.a ? De(n.a, n.b) : n.a = new Yu(n.d), g5(n.a, e), n; + } + function $X(n, e) { + if (n < 0 || n > e) + throw T(new mr(fY(n, e, "index"))); + return n; + } + function M$(n, e, t, i) { + var r; + return r = F(be, Le, 25, e, 15, 1), Pve(r, n, e, t, i), r; + } + function vde(n, e) { + var t; + t = n.q.getHours() + (e / 60 | 0), n.q.setMinutes(e), S6(n, t); + } + function mde(n, e) { + return j.Math.min(al(e.a, n.d.d.c), al(e.b, n.d.d.c)); + } + function O2(n, e) { + return yi(e) ? e == null ? MY(n.f, null) : $On(n.g, e) : MY(n.f, e); + } + function uf(n) { + this.c = n, this.a = new E(this.c.a), this.b = new E(this.c.b); + } + function TC() { + this.e = new X(), this.c = new X(), this.d = new X(), this.b = new X(); + } + function TSn() { + this.g = new zq(), this.b = new zq(), this.a = new X(), this.k = new X(); + } + function MSn(n, e, t) { + this.a = n, this.c = e, this.d = t, W(e.e, this), W(t.b, this); + } + function ASn(n, e) { + Hkn.call(this, e.rd(), e.qd() & -6), _n(n), this.a = n, this.b = e; + } + function SSn(n, e) { + qkn.call(this, e.rd(), e.qd() & -6), _n(n), this.a = n, this.b = e; + } + function FX(n, e) { + FO.call(this, e.rd(), e.qd() & -6), _n(n), this.a = n, this.b = e; + } + function MC(n, e, t) { + this.a = n, this.b = e, this.c = t, W(n.t, this), W(e.i, this); + } + function AC() { + this.b = new Tt(), this.a = new Tt(), this.b = new Tt(), this.a = new Tt(); + } + function SC() { + SC = N, Ym = new yt("org.eclipse.elk.labels.labelManager"); + } + function PSn() { + PSn = N, $cn = new ri("separateLayerConnections", (aT(), QR)); + } + function No() { + No = N, iw = new tz("REGULAR", 0), Bl = new tz("CRITICAL", 1); + } + function x8() { + x8 = N, uK = new YG("STACKED", 0), iy = new YG("SEQUENCED", 1); + } + function L8() { + L8 = N, FK = new oz("FIXED", 0), IP = new oz("CENTER_NODE", 1); + } + function kde(n, e) { + var t; + return t = CEe(n, e), n.b = new tT(t.c.length), Lje(n, t); + } + function yde(n, e, t) { + var i; + return ++n.e, --n.f, i = u(n.d[e].$c(t), 133), i.dd(); + } + function ISn(n) { + var e; + return n.a || (e = n.r, I(e, 148) && (n.a = u(e, 148))), n.a; + } + function xX(n) { + if (n.a) { + if (n.e) + return xX(n.e); + } else + return n; + return null; + } + function jde(n, e) { + return n.p < e.p ? 1 : n.p > e.p ? -1 : 0; + } + function PC(n, e) { + return _n(e), n.c < n.d ? (n.ze(e, n.c++), !0) : !1; + } + function OSn(n, e) { + return Uu(n.a, e) ? (O2(n.a, e), !0) : !1; + } + function Ede(n) { + var e, t; + return e = n.cd(), t = u(n.dd(), 14), g8(t.Nc(), new uvn(e)); + } + function Cde(n) { + var e; + return e = u(IW(n.b, n.b.length), 9), new ks(n.a, e, n.c); + } + function Tde(n) { + var e; + return Ma(n), e = new SEn(n, n.a.e, n.a.d | 4), new sU(n, e); + } + function DSn(n) { + var e; + for (fl(n), e = 0; n.a.sd(new yln()); ) + e = Hi(e, 1); + return e; + } + function LX(n, e, t) { + var i, r; + for (i = 0, r = 0; r < e.length; r++) + i += n.$f(e[r], i, t); + } + function Mde(n, e) { + var t; + n.C && (t = u(wr(n.b, e), 124).n, t.d = n.C.d, t.a = n.C.a); + } + function D2(n, e, t) { + return D8(e, n.e.Hd().gc()), D8(t, n.c.Hd().gc()), n.a[e][t]; + } + function a1(n, e) { + jl(), this.e = n, this.d = 1, this.a = A(M(be, 1), Le, 25, 15, [e]); + } + function IC(n, e, t, i) { + this.f = n, this.e = e, this.d = t, this.b = i, this.c = i ? i.d : null; + } + function NX(n) { + var e, t, i, r; + r = n.d, e = n.a, t = n.b, i = n.c, n.d = t, n.a = i, n.b = r, n.c = e; + } + function Ade(n, e, t, i) { + rRn(n, e, t, v4(n, e, i, I(e, 99) && (u(e, 18).Bb & Ji) != 0)); + } + function Sde(n, e) { + le(e, "Label management", 1), eE(k(n, (SC(), Ym))), ce(e); + } + function Ic(n) { + RO(this), TE(n >= 0, "Initial capacity must not be negative"); + } + function $Sn() { + $Sn = N, Vzn = Fe((_o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc]))); + } + function FSn() { + FSn = N, Jzn = Fe((Cu(), A(M(Qzn, 1), z, 461, 0, [Xf, Ol, Co]))); + } + function xSn() { + xSn = N, Zzn = Fe((Jc(), A(M(Yzn, 1), z, 462, 0, [Wo, Dl, To]))); + } + function LSn() { + LSn = N, Bzn = Fe((hf(), A(M(Nu, 1), z, 132, 0, [Win, ls, _b]))); + } + function NSn() { + NSn = N, bWn = Fe((W5(), A(M(Krn, 1), z, 379, 0, [NR, LR, BR]))); + } + function BSn() { + BSn = N, PWn = Fe((Gd(), A(M(zrn, 1), z, 423, 0, [yg, Grn, qR]))); + } + function RSn() { + RSn = N, oXn = Fe((F2(), A(M(Kcn, 1), z, 314, 0, [ap, qk, _cn]))); + } + function _Sn() { + _Sn = N, fXn = Fe((VC(), A(M(qcn, 1), z, 337, 0, [Hcn, DS, o_]))); + } + function KSn() { + KSn = N, dXn = Fe((ja(), A(M(aXn, 1), z, 450, 0, [l_, rv, Tg]))); + } + function HSn() { + HSn = N, rXn = Fe((Hd(), A(M(YR, 1), z, 361, 0, [p0, Fl, g0]))); + } + function qSn() { + qSn = N, yXn = Fe((Nh(), A(M(kXn, 1), z, 303, 0, [zk, Ag, dp]))); + } + function GSn() { + GSn = N, mXn = Fe((H3(), A(M(y_, 1), z, 292, 0, [m_, k_, Gk]))); + } + function zSn() { + zSn = N, RQn = Fe((i6(), A(M(Gsn, 1), z, 378, 0, [J_, qsn, oP]))); + } + function USn() { + USn = N, WQn = Fe((oT(), A(M(ion, 1), z, 375, 0, [eon, cK, ton]))); + } + function WSn() { + WSn = N, qQn = Fe((Rh(), A(M(Zsn, 1), z, 339, 0, [Nl, Ysn, tK]))); + } + function XSn() { + XSn = N, UQn = Fe((sr(), A(M(zQn, 1), z, 452, 0, [Bm, Au, Lc]))); + } + function VSn() { + VSn = N, JQn = Fe((dT(), A(M(hon, 1), z, 377, 0, [fK, gv, tw]))); + } + function QSn() { + QSn = N, VQn = Fe((V3(), A(M(uon, 1), z, 336, 0, [sK, con, Rm]))); + } + function JSn() { + JSn = N, QQn = Fe((uT(), A(M(fon, 1), z, 338, 0, [oon, oK, son]))); + } + function YSn() { + YSn = N, hJn = Fe((Kd(), A(M(fJn, 1), z, 454, 0, [ry, _m, aP]))); + } + function ZSn() { + ZSn = N, pYn = Fe((CT(), A(M(gYn, 1), z, 442, 0, [CK, jK, EK]))); + } + function nPn() { + nPn = N, mYn = Fe((f7(), A(M(Fon, 1), z, 380, 0, [CP, Don, $on]))); + } + function ePn() { + ePn = N, LYn = Fe((ET(), A(M(Yon, 1), z, 381, 0, [Jon, IK, Qon]))); + } + function tPn() { + tPn = N, xYn = Fe((sT(), A(M(Xon, 1), z, 293, 0, [PK, Won, Uon]))); + } + function iPn() { + iPn = N, iZn = Fe((w7(), A(M(OK, 1), z, 437, 0, [AP, SP, PP]))); + } + function rPn() { + rPn = N, une = Fe((_h(), A(M(Khn, 1), z, 334, 0, [HP, x1, i9]))); + } + function cPn() { + cPn = N, tne = Fe((sf(), A(M(Phn, 1), z, 272, 0, [yv, uw, jv]))); + } + function Pde() { + return Ai(), A(M(Ghn, 1), z, 98, 0, [ql, jf, Cv, id, jh, Sc]); + } + function ga(n, e) { + return !n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), NF(n.o, e); + } + function Ide(n) { + return !n.g && (n.g = new Qy()), !n.g.d && (n.g.d = new Cmn(n)), n.g.d; + } + function Ode(n) { + return !n.g && (n.g = new Qy()), !n.g.a && (n.g.a = new Tmn(n)), n.g.a; + } + function Dde(n) { + return !n.g && (n.g = new Qy()), !n.g.b && (n.g.b = new Emn(n)), n.g.b; + } + function N8(n) { + return !n.g && (n.g = new Qy()), !n.g.c && (n.g.c = new Mmn(n)), n.g.c; + } + function $de(n, e, t) { + var i, r; + for (r = new K3(e, n), i = 0; i < t; ++i) + RT(r); + return r; + } + function A$(n, e, t) { + var i, r; + if (t != null) + for (i = 0; i < e; ++i) + r = t[i], n.fi(i, r); + } + function S$(n, e, t, i) { + var r; + return r = F(be, Le, 25, e + 1, 15, 1), wye(r, n, e, t, i), r; + } + function F(n, e, t, i, r, c) { + var o; + return o = pFn(r, i), r != 10 && A(M(n, c), e, t, r, o), o; + } + function Fde(n, e, t, i) { + return t && (i = t.gh(e, jt(t.Tg(), n.c.Lj()), null, i)), i; + } + function xde(n, e, t, i) { + return t && (i = t.ih(e, jt(t.Tg(), n.c.Lj()), null, i)), i; + } + function BX(n, e, t) { + u(n.b, 65), u(n.b, 65), u(n.b, 65), Yc(n.a, new bEn(t, e, n)); + } + function RX(n, e, t) { + if (n < 0 || e > t || e < n) + throw T(new wG(xM + n + rnn + e + tnn + t)); + } + function T3(n) { + if (!n) + throw T(new $r("Unable to add element to queue")); + } + function P$(n) { + n ? (this.c = n, this.b = null) : (this.c = null, this.b = new X()); + } + function I$(n, e) { + Nj.call(this, n, e), this.a = F(GTe, OM, 436, 2, 0, 1), this.b = !0; + } + function _X(n) { + XOn.call(this, n, 0), rjn(this), this.d.b = this.d, this.d.a = this.d; + } + function O$(n) { + var e; + return e = n.b, e.b == 0 ? null : u(qo(e, 0), 188).b; + } + function uPn(n, e) { + var t; + return t = new dI(), t.c = !0, t.d = e.dd(), n_n(n, e.cd(), t); + } + function Lde(n, e) { + var t; + t = n.q.getHours() + (e / 3600 | 0), n.q.setSeconds(e), S6(n, t); + } + function KX(n, e, t) { + var i; + i = n.b[t.c.p][t.p], i.b += e.b, i.c += e.c, i.a += e.a, ++i.a; + } + function al(n, e) { + var t, i; + return t = n.a - e.a, i = n.b - e.b, j.Math.sqrt(t * t + i * i); + } + function OC() { + OC = N, Bcn = new WG("QUADRATIC", 0), s_ = new WG("SCANLINE", 1); + } + function sPn() { + sPn = N, nJn = ju(Ze(new li(), (Vi(), Vf), (rr(), WR)), Or, Kk); + } + function Nde() { + return mb(), A(M(UK, 1), z, 291, 0, [zK, gy, wy, GK, dy, by]); + } + function Bde() { + return oh(), A(M(Rfn, 1), z, 248, 0, [HK, ly, ay, xP, $P, FP]); + } + function Rde() { + return q2(), A(M(iv, 1), z, 227, 0, [tv, ym, ev, Gb, Cg, Eg]); + } + function _de() { + return f4(), A(M(sun, 1), z, 275, 0, [Cm, iun, uun, cun, run, tun]); + } + function Kde() { + return A7(), A(M(eun, 1), z, 274, 0, [LS, Ycn, nun, Jcn, Zcn, p_]); + } + function Hde() { + return JT(), A(M(Hsn, 1), z, 313, 0, [Q_, _sn, V_, Rsn, Ksn, sP]); + } + function qde() { + return eM(), A(M(Xcn, 1), z, 276, 0, [d_, a_, w_, b_, g_, FS]); + } + function Gde() { + return k6(), A(M(XJn, 1), z, 327, 0, [pP, aK, bK, dK, wK, lK]); + } + function zde() { + return Tu(), A(M(qP, 1), z, 273, 0, [Gl, n1, Ty, s9, u9, Pp]); + } + function Ude() { + return ZT(), A(M(xhn, 1), z, 312, 0, [uH, Dhn, Fhn, Ihn, $hn, Ohn]); + } + function Wde() { + return Qn(), A(M(zR, 1), z, 267, 0, [ii, pi, Xt, Mc, Ju, vf]); + } + function oPn(n) { + U0(!!n.c), b$(n.e, n), n.c.Qb(), n.c = null, n.b = OV(n), rU(n.e, n); + } + function fPn(n) { + return b$(n.c.a.e, n), ne(n.b != n.c.a.d), n.a = n.b, n.b = n.b.a, n.a; + } + function HX(n) { + var e; + return !n.a && n.b != -1 && (e = n.c.Tg(), n.a = On(e, n.b)), n.a; + } + function me(n, e) { + return n.hi() && n.Hc(e) ? !1 : (n.Yh(e), !0); + } + function Bo(n, e) { + return T8(e, "Horizontal alignment cannot be null"), n.b = e, n; + } + function hPn(n, e, t) { + Je(); + var i; + return i = El(n, e), t && i && jhe(n) && (i = null), i; + } + function d1(n, e, t) { + var i, r; + for (r = n.Kc(); r.Ob(); ) + i = u(r.Pb(), 37), M6(i, e, t); + } + function qX(n, e) { + var t, i; + for (i = e.Kc(); i.Ob(); ) + t = u(i.Pb(), 37), DBn(n, t, 0, 0); + } + function GX(n, e, t) { + var i; + n.d[e.g] = t, i = n.g.c, i[e.g] = j.Math.max(i[e.g], t + 1); + } + function B8(n, e) { + var t, i, r; + return r = n.r, i = n.d, t = O6(n, e, !0), t.b != r || t.a != i; + } + function lPn(n, e) { + return S7n(n.e, e) || Sa(n.e, e, new H$n(e)), u(Ld(n.e, e), 113); + } + function pa(n, e, t, i) { + return _n(n), _n(e), _n(t), _n(i), new CW(n, e, new hln()); + } + function Xu(n, e, t, i) { + this.rj(), this.a = e, this.b = n, this.c = new yW(this, e, t, i); + } + function D$(n, e, t, i, r, c) { + aX.call(this, e, i, r, c), this.c = n, this.b = t; + } + function R8(n, e, t, i, r, c) { + aX.call(this, e, i, r, c), this.c = n, this.a = t; + } + function Xde(n, e, t) { + var i, r, c; + i = Dh(n, t), r = null, i && (r = tY(i)), c = r, R$n(e, t, c); + } + function Vde(n, e, t) { + var i, r, c; + i = Dh(n, t), r = null, i && (r = tY(i)), c = r, R$n(e, t, c); + } + function _8(n, e, t) { + var i, r; + return r = (i = d4(n.b, e), i), r ? jM(G8(n, r), t) : null; + } + function M3(n, e) { + var t; + return t = n.Yg(e), t >= 0 ? n._g(t, !0, !0) : Zd(n, e, !0); + } + function Qde(n, e) { + return ni(K(Y(k(n, (G(), y0)))), K(Y(k(e, y0)))); + } + function aPn() { + aPn = N, aYn = Vd(Vd(Dj(new li(), (r4(), qm)), (k6(), pP)), aK); + } + function Jde(n, e, t) { + var i; + return i = tDn(n, e, t), n.b = new tT(i.c.length), JY(n, i); + } + function Yde(n) { + if (n.b <= 0) + throw T(new ic()); + return --n.b, n.a -= n.c.c, Q(n.a); + } + function Zde(n) { + var e; + if (!n.a) + throw T(new gTn()); + return e = n.a, n.a = Pt(n.a), e; + } + function n0e(n) { + for (; !n.a; ) + if (!nEn(n.c, new Xvn(n))) + return !1; + return !0; + } + function $2(n) { + var e; + return pe(n), I(n, 198) ? (e = u(n, 198), e) : new dvn(n); + } + function e0e(n) { + DC(), u(n.We((Xe(), cw)), 174).Fc((Tu(), Ty)), n.Ye(eH, null); + } + function DC() { + DC = N, SZn = new n2n(), IZn = new e2n(), PZn = Rwe((Xe(), eH), SZn, _l, IZn); + } + function $C() { + $C = N, Ion = new sz("LEAF_NUMBER", 0), TK = new sz("NODE_SIZE", 1); + } + function t0e(n, e, t) { + n.a = e, n.c = t, n.b.a.$b(), _s(n.d), n.e.a.c = F(Zn, rn, 1, 0, 5, 1); + } + function $$(n) { + n.a = F(be, Le, 25, n.b + 1, 15, 1), n.c = F(be, Le, 25, n.b, 15, 1), n.d = 0; + } + function i0e(n, e) { + n.a.ue(e.d, n.b) > 0 && (W(n.c, new QU(e.c, e.d, n.d)), n.b = e.d); + } + function zX(n, e) { + if (n.g == null || e >= n.i) + throw T(new xO(e, n.i)); + return n.g[e]; + } + function dPn(n, e, t) { + if (U3(n, t), t != null && !n.wj(t)) + throw T(new xI()); + return t; + } + function bPn(n) { + var e; + if (n.Ek()) + for (e = n.i - 1; e >= 0; --e) + D(n, e); + return gX(n); + } + function r0e(n) { + var e, t; + if (!n.b) + return null; + for (t = n.b; e = t.a[0]; ) + t = e; + return t; + } + function c0e(n, e) { + var t, i; + return LAn(e), t = (i = n.slice(0, e), WX(i, n)), t.length = e, t; + } + function A3(n, e, t, i) { + var r; + i = (Ow(), i || Lin), r = n.slice(e, t), hY(r, n, e, t, -e, i); + } + function Cs(n, e, t, i, r) { + return e < 0 ? Zd(n, t, i) : u(t, 66).Nj().Pj(n, n.yh(), e, i, r); + } + function u0e(n) { + return I(n, 172) ? "" + u(n, 172).a : n == null ? null : Nr(n); + } + function s0e(n) { + return I(n, 172) ? "" + u(n, 172).a : n == null ? null : Nr(n); + } + function wPn(n, e) { + if (e.a) + throw T(new _r(wKn)); + ci(n.a, e), e.a = n, !n.j && (n.j = e); + } + function UX(n, e) { + FO.call(this, e.rd(), e.qd() & -16449), _n(n), this.a = n, this.c = e; + } + function gPn(n, e) { + var t, i; + return i = e / n.c.Hd().gc() | 0, t = e % n.c.Hd().gc(), D2(n, i, t); + } + function Cu() { + Cu = N, Xf = new oO(Y2, 0), Ol = new oO(P4, 1), Co = new oO(Z2, 2); + } + function FC() { + FC = N, vR = new Lj("All", 0), qin = new lyn(), Gin = new Eyn(), zin = new ayn(); + } + function pPn() { + pPn = N, Dzn = Fe((FC(), A(M(WA, 1), z, 297, 0, [vR, qin, Gin, zin]))); + } + function vPn() { + vPn = N, EWn = Fe((q3(), A(M(jWn, 1), z, 405, 0, [w0, qb, Hb, kg]))); + } + function mPn() { + mPn = N, CUn = Fe((qd(), A(M(EUn, 1), z, 406, 0, [Ok, Ik, MR, AR]))); + } + function kPn() { + kPn = N, MUn = Fe((K2(), A(M(TUn, 1), z, 323, 0, [$k, Dk, Fk, xk]))); + } + function yPn() { + yPn = N, PUn = Fe((d6(), A(M(SUn, 1), z, 394, 0, [Lk, YA, ZA, Nk]))); + } + function jPn() { + jPn = N, WJn = Fe((r4(), A(M(won, 1), z, 393, 0, [gP, qm, uy, Gm]))); + } + function EPn() { + EPn = N, HWn = Fe((aT(), A(M(KWn, 1), z, 360, 0, [QR, TS, MS, Hk]))); + } + function CPn() { + CPn = N, FYn = Fe((qT(), A(M(zon, 1), z, 340, 0, [SK, qon, Gon, Hon]))); + } + function TPn() { + TPn = N, JWn = Fe((ff(), A(M(QWn, 1), z, 411, 0, [lp, Z4, nv, JR]))); + } + function MPn() { + MPn = N, _Qn = Fe((gb(), A(M(Z_, 1), z, 197, 0, [fP, Y_, xg, Fg]))); + } + function APn() { + APn = N, Ene = Fe((Vu(), A(M(jne, 1), z, 396, 0, [gs, Yhn, Jhn, Zhn]))); + } + function SPn() { + SPn = N, one = Fe((us(), A(M(sne, 1), z, 285, 0, [Ey, kh, Kl, jy]))); + } + function PPn() { + PPn = N, ine = Fe((Hh(), A(M(cH, 1), z, 218, 0, [rH, yy, Ev, Sp]))); + } + function IPn() { + IPn = N, kne = Fe((AT(), A(M(Qhn, 1), z, 311, 0, [oH, Whn, Vhn, Xhn]))); + } + function OPn() { + OPn = N, vne = Fe((Qu(), A(M(o9, 1), z, 374, 0, [Ay, rd, My, sw]))); + } + function DPn() { + DPn = N, mM(), F1n = Lt, Tee = Vt, x1n = new S9(Lt), Mee = new S9(Vt); + } + function K8() { + K8 = N, Vcn = new VG(Xh, 0), xS = new VG("IMPROVE_STRAIGHTNESS", 1); + } + function o0e(n, e) { + return f3(), W(n, new Pi(e, Q(e.e.c.length + e.g.c.length))); + } + function f0e(n, e) { + return f3(), W(n, new Pi(e, Q(e.e.c.length + e.g.c.length))); + } + function WX(n, e) { + return U8(e) != 10 && A(Du(e), e.hm, e.__elementTypeId$, U8(e), n), n; + } + function Qc(n, e) { + var t; + return t = xr(n, e, 0), t == -1 ? !1 : (l1(n, t), !0); + } + function $Pn(n, e) { + var t; + return t = u(O2(n.e, e), 387), t ? (ZU(t), t.e) : null; + } + function S3(n) { + var e; + return Fr(n) && (e = 0 - n, !isNaN(e)) ? e : bl(G3(n)); + } + function xr(n, e, t) { + for (; t < n.c.length; ++t) + if (vc(e, n.c[t])) + return t; + return -1; + } + function FPn(n, e, t) { + var i; + return fl(n), i = new bI(), i.a = e, n.a.Nb(new I7n(i, t)), i.a; + } + function h0e(n) { + var e; + return fl(n), e = F(Ci, vr, 25, 0, 15, 1), vw(n.a, new zvn(e)), e; + } + function F$(n) { + var e, t; + return t = u(un(n.j, 0), 11), e = u(k(t, (G(), rt)), 11), e; + } + function XX(n) { + var e; + if (!V$(n)) + throw T(new ic()); + return n.e = 1, e = n.d, n.d = null, e; + } + function x$(n, e) { + var t; + this.f = n, this.b = e, t = u(te(n.b, e), 283), this.c = t ? t.b : null; + } + function xPn() { + wo(), this.b = new we(), this.f = new we(), this.g = new we(), this.e = new we(); + } + function LPn(n, e) { + this.a = F(vh, C1, 10, n.a.c.length, 0, 1), lf(n.a, this.a), this.b = e; + } + function H8(n) { + var e; + for (e = n.p + 1; e < n.c.a.c.length; ++e) + --u(un(n.c.a, e), 10).p; + } + function L$(n) { + var e; + e = n.Ai(), e != null && n.d != -1 && u(e, 92).Ng(n), n.i && n.i.Fi(); + } + function xC(n) { + oE(this), this.g = n ? YD(n, n.$d()) : null, this.f = n, eC(this), this._d(); + } + function Lh(n, e, t, i, r, c, o) { + z$.call(this, e, i, r, c, o), this.c = n, this.b = t; + } + function ub(n, e, t, i, r) { + return _n(n), _n(e), _n(t), _n(i), _n(r), new CW(n, e, i); + } + function q8(n, e) { + if (e < 0) + throw T(new mr(_Hn + e)); + return MAn(n, e + 1), un(n.j, e); + } + function NPn(n, e, t, i) { + if (!n) + throw T(new Hn(T6(e, A(M(Zn, 1), rn, 1, 5, [t, i])))); + } + function LC(n, e) { + return vc(e, un(n.f, 0)) || vc(e, un(n.f, 1)) || vc(e, un(n.f, 2)); + } + function l0e(n, e) { + p2(u(u(n.f, 33).We((Xe(), n9)), 98)) && l2e(HD(u(n.f, 33)), e); + } + function G8(n, e) { + var t, i; + return t = u(e, 675), i = t.Oh(), !i && t.Rh(i = new Lkn(n, e)), i; + } + function Er(n, e) { + var t, i; + return t = u(e, 677), i = t.pk(), !i && t.tk(i = new nAn(n, e)), i; + } + function Ou(n) { + return n.b || (n.b = new gCn(n, dr, n), !n.a && (n.a = new l8(n, n))), n.b; + } + function W5() { + W5 = N, NR = new hO("XY", 0), LR = new hO("X", 1), BR = new hO("Y", 2); + } + function Jc() { + Jc = N, Wo = new fO("TOP", 0), Dl = new fO(P4, 1), To = new fO(dnn, 2); + } + function Nh() { + Nh = N, zk = new pO(Xh, 0), Ag = new pO("TOP", 1), dp = new pO(dnn, 2); + } + function z8() { + z8 = N, iK = new JG("INPUT_ORDER", 0), rK = new JG("PORT_DEGREE", 1); + } + function P3() { + P3 = N, win = Nc(Lu, Lu, 524287), mzn = Nc(0, 0, tk), gin = E$(1), E$(2), pin = E$(0); + } + function VX(n, e, t) { + n.a.c = F(Zn, rn, 1, 0, 5, 1), eEe(n, e, t), n.a.c.length == 0 || $ke(n, e); + } + function NC(n) { + var e, t; + return t = n.length, e = F(Ls, Bf, 25, t, 15, 1), RCn(n, 0, t, e, 0), e; + } + function QX(n) { + var e; + return n.dh() || (e = ee(n.Tg()) - n.Ah(), n.ph().bk(e)), n.Pg(); + } + function JX(n) { + var e; + return e = va(Rn(n, 32)), e == null && (Bc(n), e = va(Rn(n, 32))), e; + } + function N$(n, e) { + var t; + return t = jt(n.d, e), t >= 0 ? BT(n, t, !0, !0) : Zd(n, e, !0); + } + function YX(n, e) { + Qv(); + var t, i; + return t = S2(n), i = S2(e), !!t && !!i && !V$n(t.k, i.k); + } + function a0e(n, e) { + Zc(n, e == null || jE((_n(e), e)) || isNaN((_n(e), e)) ? 0 : (_n(e), e)); + } + function d0e(n, e) { + nu(n, e == null || jE((_n(e), e)) || isNaN((_n(e), e)) ? 0 : (_n(e), e)); + } + function b0e(n, e) { + _d(n, e == null || jE((_n(e), e)) || isNaN((_n(e), e)) ? 0 : (_n(e), e)); + } + function w0e(n, e) { + Rd(n, e == null || jE((_n(e), e)) || isNaN((_n(e), e)) ? 0 : (_n(e), e)); + } + function BPn(n) { + (this.q ? this.q : (Pn(), Pn(), ph)).Ac(n.q ? n.q : (Pn(), Pn(), ph)); + } + function g0e(n, e) { + return I(e, 99) && u(e, 18).Bb & Ji ? new LO(e, n) : new K3(e, n); + } + function p0e(n, e) { + return I(e, 99) && u(e, 18).Bb & Ji ? new LO(e, n) : new K3(e, n); + } + function RPn(n, e) { + vrn = new Wy(), AUn = e, gm = n, u(gm.b, 65), BX(gm, vrn, null), DRn(gm); + } + function B$(n, e, t) { + var i; + return i = n.g[e], k5(n, e, n.oi(e, t)), n.gi(e, t, i), n.ci(), i; + } + function BC(n, e) { + var t; + return t = n.Xc(e), t >= 0 ? (n.$c(t), !0) : !1; + } + function R$(n) { + var e; + return n.d != n.r && (e = qs(n), n.e = !!e && e.Cj() == kGn, n.d = e), n.e; + } + function _$(n, e) { + var t; + for (pe(n), pe(e), t = !1; e.Ob(); ) + t = t | n.Fc(e.Pb()); + return t; + } + function Ld(n, e) { + var t; + return t = u(te(n.e, e), 387), t ? (Oyn(n, t), t.e) : null; + } + function _Pn(n) { + var e, t; + return e = n / 60 | 0, t = n % 60, t == 0 ? "" + e : "" + e + ":" + ("" + t); + } + function qr(n, e) { + var t, i; + return Ma(n), i = new FX(e, n.a), t = new iEn(i), new $n(n, t); + } + function sb(n, e) { + var t = n.a[e], i = (cF(), dR)[typeof t]; + return i ? i(t) : tQ(typeof t); + } + function v0e(n) { + switch (n.g) { + case 0: + return nt; + case 1: + return -1; + default: + return 0; + } + } + function m0e(n) { + return mJ(n, (P3(), pin)) < 0 ? -xce(G3(n)) : n.l + n.m * J2 + n.h * Fa; + } + function U8(n) { + return n.__elementTypeCategory$ == null ? 10 : n.__elementTypeCategory$; + } + function K$(n) { + var e; + return e = n.b.c.length == 0 ? null : un(n.b, 0), e != null && J$(n, 0), e; + } + function KPn(n, e) { + for (; e[0] < n.length && Pf(` \r +`, tu(Di(n, e[0]))) >= 0; ) + ++e[0]; + } + function W8(n, e) { + this.e = e, this.a = FOn(n), this.a < 54 ? this.f = Fd(n) : this.c = m7(n); + } + function HPn(n, e, t, i) { + Je(), ud.call(this, 26), this.c = n, this.a = e, this.d = t, this.b = i; + } + function sh(n, e, t) { + var i, r; + for (i = 10, r = 0; r < t - 1; r++) + e < i && (n.a += "0"), i *= 10; + n.a += e; + } + function k0e(n, e) { + var t; + for (t = 0; n.e != n.i.gc(); ) + bfe(e, oe(n), Q(t)), t != nt && ++t; + } + function ZX(n, e) { + var t; + for (++n.d, ++n.c[e], t = e + 1; t < n.a.length; ) + ++n.a[t], t += t & -t; + } + function y0e(n, e) { + var t, i, r; + r = e.c.i, t = u(te(n.f, r), 57), i = t.d.c - t.e.c, EV(e.a, i, 0); + } + function X8(n) { + var e, t; + return e = n + 128, t = (WEn(), min)[e], !t && (t = min[e] = new Dvn(n)), t; + } + function $e(n, e) { + var t; + return _n(e), t = n[":" + e], M0e(!!t, A(M(Zn, 1), rn, 1, 5, [e])), t; + } + function j0e(n) { + var e, t; + if (n.b) { + t = null; + do + e = n.b, n.b = null, t = Rxn(e, t); + while (n.b); + n.b = t; + } + } + function E0e(n) { + var e, t; + if (n.a) { + t = null; + do + e = n.a, n.a = null, t = Rxn(e, t); + while (n.a); + n.a = t; + } + } + function qPn(n) { + var e; + for (++n.a, e = n.c.a.length; n.a < e; ++n.a) + if (n.c.b[n.a]) + return; + } + function C0e(n, e) { + var t, i; + for (i = e.c, t = i + 1; t <= e.f; t++) + n.a[t] > n.a[i] && (i = t); + return i; + } + function T0e(n, e) { + var t; + return t = Ud(n.e.c, e.e.c), t == 0 ? ni(n.e.d, e.e.d) : t; + } + function Fw(n, e) { + return e.e == 0 || n.e == 0 ? U4 : (l4(), Hx(n, e)); + } + function M0e(n, e) { + if (!n) + throw T(new Hn(P8e("Enum constant undefined: %s", e))); + } + function X5() { + X5 = N, MWn = new San(), AWn = new Man(), CWn = new $an(), TWn = new Fan(), SWn = new xan(); + } + function RC() { + RC = N, Yin = new qG("BY_SIZE", 0), jR = new qG("BY_SIZE_AND_SHAPE", 1); + } + function _C() { + _C = N, $R = new GG("EADES", 0), tS = new GG("FRUCHTERMAN_REINGOLD", 1); + } + function V8() { + V8 = N, $S = new XG("READING_DIRECTION", 0), Ucn = new XG("ROTATION", 1); + } + function GPn() { + GPn = N, hXn = Fe((Ia(), A(M(zcn, 1), z, 335, 0, [f_, Gcn, h_, Em, jm]))); + } + function zPn() { + zPn = N, KQn = Fe((b6(), A(M(Usn, 1), z, 315, 0, [zsn, nK, eK, Lm, Nm]))); + } + function UPn() { + UPn = N, ZWn = Fe((Vw(), A(M(YWn, 1), z, 363, 0, [SS, IS, OS, PS, AS]))); + } + function WPn() { + WPn = N, EXn = Fe((Ss(), A(M(jun, 1), z, 163, 0, [Qk, Sm, xl, Pm, Wb]))); + } + function XPn() { + XPn = N, oZn = Fe((P7(), A(M(gfn, 1), z, 316, 0, [dfn, xK, wfn, LK, bfn]))); + } + function VPn() { + VPn = N, OZn = Fe((Ho(), A(M(F1, 1), z, 175, 0, [Xn, vi, Yf, Za, $1]))); + } + function QPn() { + QPn = N, tZn = Fe((w4(), A(M(eZn, 1), z, 355, 0, [Ng, Ep, Qm, Vm, Jm]))); + } + function JPn() { + JPn = N, vWn = Fe((Vi(), A(M(Hrn, 1), z, 356, 0, [Vf, $l, Kc, Tc, Or]))); + } + function YPn() { + YPn = N, ene = Fe((or(), A(M(e9, 1), z, 103, 0, [mh, Ao, Zs, Jh, Yh]))); + } + function ZPn() { + ZPn = N, hne = Fe((qw(), A(M(c9, 1), z, 249, 0, [Hl, Cy, Hhn, r9, qhn]))); + } + function nIn() { + nIn = N, dne = Fe((J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn]))); + } + function H$(n, e) { + var t; + return t = u(te(n.a, e), 134), t || (t = new pI(), it(n.a, e, t)), t; + } + function eIn(n) { + var e; + return e = u(k(n, (G(), v0)), 305), e ? e.a == n : !1; + } + function tIn(n) { + var e; + return e = u(k(n, (G(), v0)), 305), e ? e.i == n : !1; + } + function iIn(n, e) { + return _n(e), mW(n), n.d.Ob() ? (e.td(n.d.Pb()), !0) : !1; + } + function KC(n) { + return hc(n, nt) > 0 ? nt : hc(n, Bi) < 0 ? Bi : ge(n); + } + function ob(n) { + return n < 3 ? (rs(n, J_n), n + 1) : n < L6 ? Gt(n / 0.75 + 1) : nt; + } + function On(n, e) { + var t; + return t = (n.i == null && Lf(n), n.i), e >= 0 && e < t.length ? t[e] : null; + } + function Ro(n, e, t) { + var i; + if (e == null) + throw T(new Nv()); + return i = Dh(n, e), Xae(n, e, t), i; + } + function rIn(n) { + return n.a >= -0.01 && n.a <= bf && (n.a = 0), n.b >= -0.01 && n.b <= bf && (n.b = 0), n; + } + function cIn(n, e) { + return e == (sD(), sD(), Pzn) ? n.toLocaleLowerCase() : n.toLowerCase(); + } + function nV(n) { + return (n.i & 2 ? "interface " : n.i & 1 ? "" : "class ") + (Ph(n), n.o); + } + function Cr(n) { + var e, t; + t = (e = new RI(), e), me((!n.q && (n.q = new V(co, n, 11, 10)), n.q), t); + } + function A0e(n, e) { + var t; + return t = e > 0 ? e - 1 : e, e8n(Kie(IIn(YU(new Gp(), t), n.n), n.j), n.k); + } + function S0e(n, e, t, i) { + var r; + n.j = -1, EY(n, iY(n, e, t), (er(), r = u(e, 66).Mj(), r.Ok(i))); + } + function uIn(n) { + this.g = n, this.f = new X(), this.a = j.Math.min(this.g.c.c, this.g.d.c); + } + function sIn(n) { + this.b = new X(), this.a = new X(), this.c = new X(), this.d = new X(), this.e = n; + } + function oIn(n, e) { + this.a = new we(), this.e = new we(), this.b = (i6(), oP), this.c = n, this.b = e; + } + function fIn(n, e, t) { + kE.call(this), eV(this), this.a = n, this.c = t, this.b = e.d, this.f = e.e; + } + function hIn(n) { + this.d = n, this.c = n.c.vc().Kc(), this.b = null, this.a = null, this.e = (aj(), fR); + } + function Nd(n) { + if (n < 0) + throw T(new Hn("Illegal Capacity: " + n)); + this.g = this.ri(n); + } + function P0e(n, e) { + if (0 > n || n > e) + throw T(new bG("fromIndex: 0, toIndex: " + n + tnn + e)); + } + function I0e(n) { + var e; + if (n.a == n.b.a) + throw T(new ic()); + return e = n.a, n.c = e, n.a = n.a.e, e; + } + function HC(n) { + var e; + U0(!!n.c), e = n.c.a, Ts(n.d, n.c), n.b == n.c ? n.b = e : --n.a, n.c = null; + } + function qC(n, e) { + var t; + return Ma(n), t = new DTn(n, n.a.rd(), n.a.qd() | 4, e), new $n(n, t); + } + function O0e(n, e) { + var t, i; + return t = u(db(n.d, e), 14), t ? (i = e, n.e.pc(i, t)) : null; + } + function GC(n, e) { + var t, i; + for (i = n.Kc(); i.Ob(); ) + t = u(i.Pb(), 70), H(t, (G(), pp), e); + } + function D0e(n) { + var e; + return e = K(Y(k(n, (nn(), P1)))), e < 0 && (e = 0, H(n, P1, e)), e; + } + function $0e(n, e, t) { + var i; + i = j.Math.max(0, n.b / 2 - 0.5), g6(t, i, 1), W(e, new L7n(t, i)); + } + function F0e(n, e, t) { + var i; + return i = n.a.e[u(e.a, 10).p] - n.a.e[u(t.a, 10).p], Gt(m8(i)); + } + function lIn(n, e, t, i, r, c) { + var o; + o = C$(i), Ki(o, r), Ti(o, c), Tn(n.a, i, new EE(o, e, t.f)); + } + function aIn(n, e) { + var t; + if (t = R7(n.Tg(), e), !t) + throw T(new Hn(Pl + e + MB)); + return t; + } + function fb(n, e) { + var t; + for (t = n; Pt(t); ) + if (t = Pt(t), t == e) + return !0; + return !1; + } + function x0e(n, e) { + var t, i, r; + for (i = e.a.cd(), t = u(e.a.dd(), 14).gc(), r = 0; r < t; r++) + n.td(i); + } + function Yc(n, e) { + var t, i, r, c; + for (_n(e), i = n.c, r = 0, c = i.length; r < c; ++r) + t = i[r], e.td(t); + } + function Ts(n, e) { + var t; + return t = e.c, e.a.b = e.b, e.b.a = e.a, e.a = e.b = null, e.c = null, --n.b, t; + } + function L0e(n, e) { + return e && n.b[e.g] == e ? (St(n.b, e.g, null), --n.c, !0) : !1; + } + function dIn(n, e) { + return !!Y5(n, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15)))); + } + function N0e(n, e) { + p2(u(k(u(n.e, 10), (nn(), Bt)), 98)) && (Pn(), wi(u(n.e, 10).j, e)); + } + function eV(n) { + n.b = (Cu(), Ol), n.f = (Jc(), Dl), n.d = (rs(2, Ib), new Ic(2)), n.e = new Li(); + } + function _o() { + _o = N, Zr = new sO("BEGIN", 0), xc = new sO(P4, 1), nc = new sO("END", 2); + } + function sf() { + sf = N, yv = new OO(P4, 0), uw = new OO("HEAD", 1), jv = new OO("TAIL", 2); + } + function B0e() { + return a4(), A(M(nI, 1), z, 237, 0, [aH, YP, ZP, JP, lH, QP, VP, hH]); + } + function R0e() { + return j1(), A(M(DZn, 1), z, 277, 0, [Lfn, _i, sc, mv, Dr, Rt, Cp, yf]); + } + function _0e() { + return lM(), A(M(Ncn, 1), z, 270, 0, [n_, i_, ZR, u_, t_, e_, c_, r_]); + } + function K0e() { + return Zw(), A(M(Jsn, 1), z, 260, 0, [hP, ey, ty, Xsn, Vsn, Wsn, Qsn, lP]); + } + function bIn() { + bIn = N, lne = Fe((Ai(), A(M(Ghn, 1), z, 98, 0, [ql, jf, Cv, id, jh, Sc]))); + } + function wIn() { + wIn = N, QA = (_o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc])).length, CR = QA; + } + function zC(n) { + this.b = (pe(n), new au(n)), this.a = new X(), this.d = new X(), this.e = new Li(); + } + function H0e(n) { + var e; + return e = j.Math.sqrt(n.a * n.a + n.b * n.b), e > 0 && (n.a /= e, n.b /= e), n; + } + function is(n) { + var e; + return n.w ? n.w : (e = Gle(n), e && !e.kh() && (n.w = e), e); + } + function q0e(n) { + var e; + return n == null ? null : (e = u(n, 190), Gve(e, e.length)); + } + function D(n, e) { + if (n.g == null || e >= n.i) + throw T(new xO(e, n.i)); + return n.li(e, n.g[e]); + } + function G0e(n) { + var e, t; + for (e = n.a.d.j, t = n.c.d.j; e != t; ) + ko(n.b, e), e = yT(e); + ko(n.b, e); + } + function z0e(n) { + var e; + for (e = 0; e < n.c.length; e++) + (Ln(e, n.c.length), u(n.c[e], 11)).p = e; + } + function U0e(n, e, t) { + var i, r, c; + for (r = e[t], i = 0; i < r.length; i++) + c = r[i], n.e[c.c.p][c.p] = i; + } + function q$(n, e) { + var t, i, r, c; + for (i = n.d, r = 0, c = i.length; r < c; ++r) + t = i[r], Zo(n.g, t).a = e; + } + function hb(n, e) { + var t, i; + for (i = _e(n, 0); i.b != i.d.c; ) + t = u(Re(i), 8), st(t, e); + return n; + } + function W0e(n, e) { + var t; + return t = ji(Qr(u(te(n.g, e), 8)), Az(u(te(n.f, e), 460).b)), t; + } + function Bd(n) { + var e; + return b$(n.e, n), ne(n.b), n.c = n.a, e = u(n.a.Pb(), 42), n.b = OV(n), e; + } + function va(n) { + var e; + return A5(n == null || Array.isArray(n) && (e = U8(n), !(e >= 14 && e <= 16))), n; + } + function gIn(n, e, t) { + var i = function() { + return n.apply(i, arguments); + }; + return e.apply(i, t), i; + } + function pIn(n, e, t) { + var i, r; + i = e; + do + r = K(n.p[i.p]) + t, n.p[i.p] = r, i = n.a[i.p]; + while (i != e); + } + function I3(n, e) { + var t, i; + i = n.a, t = Tge(n, e, null), i != e && !n.e && (t = y4(n, e, t)), t && t.Fi(); + } + function tV(n, e) { + return Yo(), mo(Cl), j.Math.abs(n - e) <= Cl || n == e || isNaN(n) && isNaN(e); + } + function iV(n, e) { + return Yo(), mo(Cl), j.Math.abs(n - e) <= Cl || n == e || isNaN(n) && isNaN(e); + } + function X0e(n, e) { + return yl(), Uc(n.b.c.length - n.e.c.length, e.b.c.length - e.e.c.length); + } + function xw(n, e) { + return Uie(J5(n, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))))); + } + function vIn() { + vIn = N, $Wn = Fe((Qn(), A(M(zR, 1), z, 267, 0, [ii, pi, Xt, Mc, Ju, vf]))); + } + function mIn() { + mIn = N, _Zn = Fe((mb(), A(M(UK, 1), z, 291, 0, [zK, gy, wy, GK, dy, by]))); + } + function kIn() { + kIn = N, FZn = Fe((oh(), A(M(Rfn, 1), z, 248, 0, [HK, ly, ay, xP, $P, FP]))); + } + function yIn() { + yIn = N, uXn = Fe((q2(), A(M(iv, 1), z, 227, 0, [tv, ym, ev, Gb, Cg, Eg]))); + } + function jIn() { + jIn = N, pXn = Fe((f4(), A(M(sun, 1), z, 275, 0, [Cm, iun, uun, cun, run, tun]))); + } + function EIn() { + EIn = N, gXn = Fe((A7(), A(M(eun, 1), z, 274, 0, [LS, Ycn, nun, Jcn, Zcn, p_]))); + } + function CIn() { + CIn = N, BQn = Fe((JT(), A(M(Hsn, 1), z, 313, 0, [Q_, _sn, V_, Rsn, Ksn, sP]))); + } + function TIn() { + TIn = N, bXn = Fe((eM(), A(M(Xcn, 1), z, 276, 0, [d_, a_, w_, b_, g_, FS]))); + } + function MIn() { + MIn = N, VJn = Fe((k6(), A(M(XJn, 1), z, 327, 0, [pP, aK, bK, dK, wK, lK]))); + } + function AIn() { + AIn = N, ane = Fe((Tu(), A(M(qP, 1), z, 273, 0, [Gl, n1, Ty, s9, u9, Pp]))); + } + function SIn() { + SIn = N, rne = Fe((ZT(), A(M(xhn, 1), z, 312, 0, [uH, Dhn, Fhn, Ihn, $hn, Ohn]))); + } + function V0e() { + return Eb(), A(M(ar, 1), z, 93, 0, [So, Zh, Po, Oo, yh, eo, ds, Io, no]); + } + function UC(n, e) { + var t; + t = n.a, n.a = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 0, t, n.a)); + } + function WC(n, e) { + var t; + t = n.b, n.b = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 1, t, n.b)); + } + function O3(n, e) { + var t; + t = n.b, n.b = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 3, t, n.b)); + } + function Rd(n, e) { + var t; + t = n.f, n.f = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 3, t, n.f)); + } + function _d(n, e) { + var t; + t = n.g, n.g = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 4, t, n.g)); + } + function Zc(n, e) { + var t; + t = n.i, n.i = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 5, t, n.i)); + } + function nu(n, e) { + var t; + t = n.j, n.j = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 6, t, n.j)); + } + function D3(n, e) { + var t; + t = n.j, n.j = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 1, t, n.j)); + } + function $3(n, e) { + var t; + t = n.c, n.c = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 4, t, n.c)); + } + function F3(n, e) { + var t; + t = n.k, n.k = e, n.Db & 4 && !(n.Db & 1) && et(n, new cb(n, 2, t, n.k)); + } + function G$(n, e) { + var t; + t = n.d, n.d = e, n.Db & 4 && !(n.Db & 1) && et(n, new p$(n, 2, t, n.d)); + } + function b1(n, e) { + var t; + t = n.s, n.s = e, n.Db & 4 && !(n.Db & 1) && et(n, new p$(n, 4, t, n.s)); + } + function lb(n, e) { + var t; + t = n.t, n.t = e, n.Db & 4 && !(n.Db & 1) && et(n, new p$(n, 5, t, n.t)); + } + function x3(n, e) { + var t; + t = n.F, n.F = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 5, t, e)); + } + function Q8(n, e) { + var t; + return t = u(te(($j(), eI), n), 55), t ? t.xj(e) : F(Zn, rn, 1, e, 5, 1); + } + function Bh(n, e) { + var t, i; + return t = e in n.a, t && (i = Dh(n, e).he(), i) ? i.a : null; + } + function Q0e(n, e) { + var t, i, r; + return t = (i = (dd(), r = new QH(), r), e && zY(i, e), i), aV(t, n), t; + } + function PIn(n, e, t) { + if (U3(n, t), !n.Bk() && t != null && !n.wj(t)) + throw T(new xI()); + return t; + } + function IIn(n, e) { + return n.n = e, n.n ? (n.f = new X(), n.e = new X()) : (n.f = null, n.e = null), n; + } + function Me(n, e, t, i, r, c) { + var o; + return o = LD(n, e), DIn(t, o), o.i = r ? 8 : 0, o.f = i, o.e = r, o.g = c, o; + } + function rV(n, e, t, i, r) { + this.d = e, this.k = i, this.f = r, this.o = -1, this.p = 1, this.c = n, this.a = t; + } + function cV(n, e, t, i, r) { + this.d = e, this.k = i, this.f = r, this.o = -1, this.p = 2, this.c = n, this.a = t; + } + function uV(n, e, t, i, r) { + this.d = e, this.k = i, this.f = r, this.o = -1, this.p = 6, this.c = n, this.a = t; + } + function sV(n, e, t, i, r) { + this.d = e, this.k = i, this.f = r, this.o = -1, this.p = 7, this.c = n, this.a = t; + } + function oV(n, e, t, i, r) { + this.d = e, this.j = i, this.e = r, this.o = -1, this.p = 4, this.c = n, this.a = t; + } + function OIn(n, e) { + var t, i, r, c; + for (i = e, r = 0, c = i.length; r < c; ++r) + t = i[r], wPn(n.a, t); + return n; + } + function of(n) { + var e, t, i, r; + for (t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], pe(e); + return new Jkn(n); + } + function J0e(n) { + var e = /function(?:\s+([\w$]+))?\s*\(/, t = e.exec(n); + return t && t[1] || SL; + } + function DIn(n, e) { + if (n) { + e.n = n; + var t = tle(e); + if (!t) { + RA[n] = [e]; + return; + } + t.gm = e; + } + } + function Y0e(n, e, t) { + var i, r; + return r = n.length, i = j.Math.min(t, r), aY(n, 0, e, 0, i, !0), e; + } + function $In(n, e, t) { + var i, r; + for (r = e.Kc(); r.Ob(); ) + i = u(r.Pb(), 79), ci(n, u(t.Kb(i), 33)); + } + function Z0e() { + N8n(); + for (var n = iR, e = 0; e < arguments.length; e++) + n.push(arguments[e]); + } + function V5(n, e) { + var t, i, r, c; + for (i = e, r = 0, c = i.length; r < c; ++r) + t = i[r], Ht(n, t, n.c.b, n.c); + } + function XC(n, e) { + n.b = j.Math.max(n.b, e.d), n.e += e.r + (n.a.c.length == 0 ? 0 : n.c), W(n.a, e); + } + function FIn(n) { + U0(n.c >= 0), Q2e(n.d, n.c) < 0 && (n.a = n.a - 1 & n.d.a.length - 1, n.b = n.d.c), n.c = -1; + } + function fV(n) { + return n.a < 54 ? n.f < 0 ? -1 : n.f > 0 ? 1 : 0 : (!n.c && (n.c = h7(n.f)), n.c).e; + } + function mo(n) { + if (!(n >= 0)) + throw T(new Hn("tolerance (" + n + ") must be >= 0")); + return n; + } + function L3() { + return _K || (_K = new kBn(), _w(_K, A(M(mg, 1), rn, 130, 0, [new nq()]))), _K; + } + function sr() { + sr = N, Bm = new kO(K6, 0), Au = new kO("INPUT", 1), Lc = new kO("OUTPUT", 2); + } + function VC() { + VC = N, Hcn = new bO("ARD", 0), DS = new bO("MSD", 1), o_ = new bO("MANUAL", 2); + } + function Kd() { + Kd = N, ry = new TO("BARYCENTER", 0), _m = new TO(rHn, 1), aP = new TO(cHn, 2); + } + function J8(n, e) { + var t; + if (t = n.gc(), e < 0 || e > t) + throw T(new Q0(e, t)); + return new AU(n, e); + } + function xIn(n, e) { + var t; + return I(e, 42) ? n.c.Mc(e) : (t = NF(n, e), IT(n, e), t); + } + function gr(n, e, t) { + return Ta(n, e), Oc(n, t), b1(n, 0), lb(n, 1), v1(n, !0), p1(n, !0), n; + } + function rs(n, e) { + if (n < 0) + throw T(new Hn(e + " cannot be negative but was: " + n)); + return n; + } + function LIn(n, e) { + var t, i; + for (t = 0, i = n.gc(); t < i; ++t) + if (vc(e, n.Xb(t))) + return t; + return -1; + } + function QC(n) { + var e, t; + for (t = n.c.Cc().Kc(); t.Ob(); ) + e = u(t.Pb(), 14), e.$b(); + n.c.$b(), n.d = 0; + } + function nbe(n) { + var e, t, i, r; + for (t = n.a, i = 0, r = t.length; i < r; ++i) + e = t[i], BCn(e, e.length, null); + } + function hV(n) { + var e, t; + if (n == 0) + return 32; + for (t = 0, e = 1; !(e & n); e <<= 1) + ++t; + return t; + } + function ebe(n) { + var e, t; + for (t = new E(jFn(n)); t.a < t.c.c.length; ) + e = u(y(t), 680), e.Gf(); + } + function NIn(n) { + IG(), this.g = new we(), this.f = new we(), this.b = new we(), this.c = new Dd(), this.i = n; + } + function lV() { + this.f = new Li(), this.d = new Zq(), this.c = new Li(), this.a = new X(), this.b = new X(); + } + function BIn(n, e, t, i) { + this.rj(), this.a = e, this.b = n, this.c = null, this.c = new Qjn(this, e, t, i); + } + function z$(n, e, t, i, r) { + this.d = n, this.n = e, this.g = t, this.o = i, this.p = -1, r || (this.o = -2 - i - 1); + } + function RIn() { + Oz.call(this), this.n = -1, this.g = null, this.i = null, this.j = null, this.Bb |= Eo; + } + function tbe() { + return xu(), A(M(Uhn, 1), z, 259, 0, [Tv, Py, GP, f9, zP, WP, UP, sH, Sy]); + } + function ibe() { + return dM(), A(M(wrn, 1), z, 250, 0, [brn, hrn, lrn, frn, ER, drn, arn, orn, srn]); + } + function _In() { + _In = N, kzn = A(M(be, 1), Le, 25, 15, [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15]); + } + function KIn() { + KIn = N, tJn = Ze(Ze(Ze(new li(), (Vi(), Vf), (rr(), mm)), $l, Y4), Kc, J4); + } + function HIn() { + HIn = N, iJn = Ze(Ze(Ze(new li(), (Vi(), Vf), (rr(), mm)), $l, Y4), Kc, J4); + } + function qIn() { + qIn = N, rJn = Ze(Ze(Ze(new li(), (Vi(), Vf), (rr(), mm)), $l, Y4), Kc, J4); + } + function GIn() { + GIn = N, sJn = ju(Ze(Ze(new li(), (Vi(), Kc), (rr(), pS)), Tc, aS), Or, gS); + } + function F2() { + F2 = N, ap = new dO("LAYER_SWEEP", 0), qk = new dO(PN, 1), _cn = new dO(Xh, 2); + } + function rbe(n, e) { + var t, i; + return t = n.c, i = e.e[n.p], i > 0 ? u(un(t.a, i - 1), 10) : null; + } + function Q5(n, e) { + var t; + t = n.k, n.k = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 2, t, n.k)); + } + function JC(n, e) { + var t; + t = n.f, n.f = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 8, t, n.f)); + } + function YC(n, e) { + var t; + t = n.i, n.i = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 7, t, n.i)); + } + function aV(n, e) { + var t; + t = n.a, n.a = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 8, t, n.a)); + } + function dV(n, e) { + var t; + t = n.b, n.b = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 0, t, n.b)); + } + function bV(n, e) { + var t; + t = n.b, n.b = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 0, t, n.b)); + } + function wV(n, e) { + var t; + t = n.c, n.c = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 1, t, n.c)); + } + function gV(n, e) { + var t; + t = n.c, n.c = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 1, t, n.c)); + } + function U$(n, e) { + var t; + t = n.c, n.c = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 4, t, n.c)); + } + function pV(n, e) { + var t; + t = n.d, n.d = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 1, t, n.d)); + } + function W$(n, e) { + var t; + t = n.D, n.D = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 2, t, n.D)); + } + function X$(n, e) { + n.r > 0 && n.c < n.r && (n.c += e, n.i && n.i.d > 0 && n.g != 0 && X$(n.i, e / n.r * n.i.d)); + } + function cbe(n, e, t) { + var i; + n.b = e, n.a = t, i = (n.a & 512) == 512 ? new T9n() : new ZH(), n.c = y7e(i, n.b, n.a); + } + function zIn(n, e) { + return zh(n.e, e) ? (er(), R$(e) ? new IE(e, n) : new i8(e, n)) : new Nkn(e, n); + } + function ZC(n, e) { + return zie(Y5(n.a, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))))); + } + function ube(n, e, t) { + return ub(n, new Hvn(e), new mln(), new qvn(t), A(M(Nu, 1), z, 132, 0, [])); + } + function sbe(n) { + var e, t; + return 0 > n ? new PG() : (e = n + 1, t = new wSn(e, n), new oU(null, t)); + } + function obe(n, e) { + Pn(); + var t; + return t = new s2(1), yi(n) ? yr(t, n, e) : Rc(t.f, n, e), new DI(t); + } + function fbe(n, e) { + var t, i; + return t = n.o + n.p, i = e.o + e.p, t < i ? -1 : t == i ? 0 : 1; + } + function hbe(n) { + var e; + return e = k(n, (G(), rt)), I(e, 160) ? r$n(u(e, 160)) : null; + } + function UIn(n) { + var e; + return n = j.Math.max(n, 2), e = KV(n), n > e ? (e <<= 1, e > 0 ? e : L6) : e; + } + function V$(n) { + switch (Rz(n.e != 3), n.e) { + case 2: + return !1; + case 0: + return !0; + } + return wde(n); + } + function WIn(n, e) { + var t; + return I(e, 8) ? (t = u(e, 8), n.a == t.a && n.b == t.b) : !1; + } + function Q$(n, e, t) { + var i, r, c; + return c = e >> 5, r = e & 31, i = ui(Y0(n.n[t][c], ge(Ih(r, 1))), 3), i; + } + function lbe(n, e) { + var t, i; + for (i = e.vc().Kc(); i.Ob(); ) + t = u(i.Pb(), 42), XT(n, t.cd(), t.dd()); + } + function abe(n, e) { + var t; + t = new Wy(), u(e.b, 65), u(e.b, 65), u(e.b, 65), Yc(e.a, new BU(n, t, e)); + } + function vV(n, e) { + var t; + t = n.b, n.b = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 21, t, n.b)); + } + function mV(n, e) { + var t; + t = n.d, n.d = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 11, t, n.d)); + } + function nT(n, e) { + var t; + t = n.j, n.j = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 13, t, n.j)); + } + function XIn(n, e, t) { + var i, r, c; + for (c = n.a.length - 1, r = n.b, i = 0; i < t; r = r + 1 & c, ++i) + St(e, i, n.a[r]); + } + function ko(n, e) { + var t; + return _n(e), t = e.g, n.b[t] ? !1 : (St(n.b, t, e), ++n.c, !0); + } + function VIn(n, e) { + var t; + return t = e == null ? -1 : xr(n.b, e, 0), t < 0 ? !1 : (J$(n, t), !0); + } + function J$(n, e) { + var t; + t = l1(n.b, n.b.c.length - 1), e < n.b.c.length && (Es(n.b, e, t), fLn(n, e)); + } + function dbe(n, e) { + (CC(), pf ? null : e.c).length == 0 && Tjn(e, new $H()), yr(n.a, pf ? null : e.c, e); + } + function bbe(n, e) { + le(e, "Hierarchical port constraint processing", 1), jpe(n), ETe(n), ce(e); + } + function wbe(n, e) { + var t, i; + for (i = e.Kc(); i.Ob(); ) + t = u(i.Pb(), 266), n.b = !0, ci(n.e, t), t.b = n; + } + function eT(n, e) { + var t, i; + return t = 1 - e, i = n.a[t], n.a[t] = i.a[e], i.a[e] = n, n.b = !0, i.b = !1, i; + } + function gbe(n, e) { + var t, i; + return t = u(k(n, (nn(), nw)), 8), i = u(k(e, nw), 8), ni(t.b, i.b); + } + function QIn(n) { + hW.call(this), this.b = K(Y(k(n, (nn(), Mo)))), this.a = u(k(n, Qh), 218); + } + function JIn(n, e, t) { + dX.call(this, n, e, t), this.a = new we(), this.b = new we(), this.d = new a6n(this); + } + function YIn(n) { + this.e = n, this.d = new kj(ob(k2(this.e).gc())), this.c = this.e.a, this.b = this.e.c; + } + function tT(n) { + this.b = n, this.a = F(be, Le, 25, n + 1, 15, 1), this.c = F(be, Le, 25, n, 15, 1), this.d = 0; + } + function Y$(n, e, t) { + var i; + return i = new X(), XY(n, e, i, t, !0, !0), n.b = new tT(i.c.length), i; + } + function ZIn(n, e) { + var t; + return t = u(te(n.c, e), 458), t || (t = new r9n(), t.c = e, it(n.c, t.c, t)), t; + } + function Z$(n, e) { + var t = n.a, i = 0; + for (var r in t) + t.hasOwnProperty(r) && (e[i++] = r); + return e; + } + function kV(n) { + var e; + return n.b == null ? (u1(), u1(), Ly) : (e = n.Lk() ? n.Kk() : n.Jk(), e); + } + function nOn(n) { + var e, t; + for (t = new ie(n); t.e != t.i.gc(); ) + e = u(oe(t), 33), Zc(e, 0), nu(e, 0); + } + function dl() { + dl = N, hp = new yt(Ann), cS = new yt(RKn), vm = new yt(_Kn), Bk = new yt(KKn); + } + function N3() { + N3 = N, _k = new zG("TO_INTERNAL_LTR", 0), UR = new zG("TO_INPUT_DIRECTION", 1); + } + function iT() { + iT = N, EP = new uz("P1_NODE_PLACEMENT", 0), vv = new uz("P2_EDGE_ROUTING", 1); + } + function Hd() { + Hd = N, p0 = new aO("START", 0), Fl = new aO("MIDDLE", 1), g0 = new aO("END", 2); + } + function x2() { + x2 = N, VR = new ri("edgelabelcenterednessanalysis.includelabel", (qn(), Ga)); + } + function pbe(n, e) { + _t(pt(new $n(null, new xn(new Bp(n.b), 1)), new ukn(n, e)), new okn(n, e)); + } + function eOn() { + this.c = new jj(0), this.b = new jj(AHn), this.d = new jj(MHn), this.a = new jj(kN); + } + function yV(n) { + var e, t; + for (t = n.c.a.ec().Kc(); t.Ob(); ) + e = u(t.Pb(), 214), hte(e, new Exn(e.e)); + } + function tOn(n) { + var e, t; + for (t = n.c.a.ec().Kc(); t.Ob(); ) + e = u(t.Pb(), 214), fte(e, new PCn(e.f)); + } + function Oc(n, e) { + var t; + t = n.zb, n.zb = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 1, t, n.zb)); + } + function rT(n, e) { + var t; + t = n.xb, n.xb = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 3, t, n.xb)); + } + function cT(n, e) { + var t; + t = n.yb, n.yb = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 2, t, n.yb)); + } + function It(n, e) { + var t, i; + t = (i = new BI(), i), t.n = e, me((!n.s && (n.s = new V(su, n, 21, 17)), n.s), t); + } + function bt(n, e) { + var t, i; + i = (t = new cU(), t), i.n = e, me((!n.s && (n.s = new V(su, n, 21, 17)), n.s), i); + } + function Lw(n, e) { + var t, i; + for (t = n.Pc(), A3(t, 0, t.length, e), i = 0; i < t.length; i++) + n._c(i, t[i]); + } + function Xi(n, e) { + var t, i, r; + for (_n(e), t = !1, r = e.Kc(); r.Ob(); ) + i = r.Pb(), t = t | n.Fc(i); + return t; + } + function iOn(n) { + var e, t, i; + for (e = 0, i = n.Kc(); i.Ob(); ) + t = i.Pb(), e += t != null ? kt(t) : 0, e = ~~e; + return e; + } + function rOn(n) { + var e; + return n == 0 ? "UTC" : (n < 0 ? (n = -n, e = "UTC+") : e = "UTC-", e + _Pn(n)); + } + function nF(n, e) { + var t; + return I(e, 14) ? (t = u(e, 14), n.Gc(t)) : _$(n, u(pe(e), 20).Kc()); + } + function cOn(n, e, t) { + oIn.call(this, e, t), this.d = F(vh, C1, 10, n.a.c.length, 0, 1), lf(n.a, this.d); + } + function vbe(n) { + n.a = null, n.e = null, n.b.c = F(Zn, rn, 1, 0, 5, 1), n.f.c = F(Zn, rn, 1, 0, 5, 1), n.c = null; + } + function uOn(n, e) { + e ? n.B == null && (n.B = n.D, n.D = null) : n.B != null && (n.D = n.B, n.B = null); + } + function sOn(n, e) { + return K(Y(jd(d7(Xc(new $n(null, new xn(n.c.b, 16)), new Z5n(n)), e)))); + } + function jV(n, e) { + return K(Y(jd(d7(Xc(new $n(null, new xn(n.c.b, 16)), new Y5n(n)), e)))); + } + function mbe(n, e) { + le(e, iHn, 1), _t(qr(new $n(null, new xn(n.b, 16)), new Zan()), new ndn()), ce(e); + } + function kbe(n, e) { + var t, i; + return t = u(hn(n, (pb(), TP)), 19), i = u(hn(e, TP), 19), Uc(t.a, i.a); + } + function EV(n, e, t) { + var i, r; + for (r = _e(n, 0); r.b != r.d.c; ) + i = u(Re(r), 8), i.a += e, i.b += t; + return n; + } + function J5(n, e, t) { + var i; + for (i = n.b[t & n.f]; i; i = i.b) + if (t == i.a && $f(e, i.g)) + return i; + return null; + } + function Y5(n, e, t) { + var i; + for (i = n.c[t & n.f]; i; i = i.d) + if (t == i.f && $f(e, i.i)) + return i; + return null; + } + function ybe(n, e, t) { + var i, r, c; + for (i = 0, r = 0; r < t; r++) + c = e[r], n[r] = c << 1 | i, i = c >>> 31; + i != 0 && (n[t] = i); + } + function jbe(n, e) { + Pn(); + var t, i; + for (i = new X(), t = 0; t < n; ++t) + i.c[i.c.length] = e; + return new ZI(i); + } + function oOn(n) { + var e; + return e = dAn(n), pd(e.a, 0) ? (Zp(), Zp(), _in) : (Zp(), new Jz(e.b)); + } + function fOn(n) { + var e; + return e = dAn(n), pd(e.a, 0) ? (Zp(), Zp(), _in) : (Zp(), new Jz(e.c)); + } + function Ebe(n) { + var e; + return e = vC(n), pd(e.a, 0) ? (Mj(), Mj(), Izn) : (Mj(), new ijn(e.b)); + } + function Cbe(n) { + return n.b.c.i.k == (Qn(), Xt) ? u(k(n.b.c.i, (G(), rt)), 11) : n.b.c; + } + function hOn(n) { + return n.b.d.i.k == (Qn(), Xt) ? u(k(n.b.d.i, (G(), rt)), 11) : n.b.d; + } + function Kt(n, e, t, i, r, c, o, f, h, l, a, d, g) { + return tLn(n, e, t, i, r, c, o, f, h, l, a, d, g), SF(n, !1), n; + } + function Ms(n, e, t, i, r, c, o) { + Oe.call(this, n, e), this.d = t, this.e = i, this.c = r, this.b = c, this.a = cf(o); + } + function Tbe(n, e) { + typeof window === Q7 && typeof window.$gwt === Q7 && (window.$gwt[n] = e); + } + function Mbe(n, e) { + return q3(), n == w0 && e == qb || n == qb && e == w0 || n == kg && e == Hb || n == Hb && e == kg; + } + function Abe(n, e) { + return q3(), n == w0 && e == Hb || n == w0 && e == kg || n == qb && e == kg || n == qb && e == Hb; + } + function lOn(n, e) { + return Yo(), mo(bf), j.Math.abs(0 - e) <= bf || e == 0 || isNaN(0) && isNaN(e) ? 0 : n / e; + } + function Sbe() { + return fr(), A(M(v_, 1), z, 256, 0, [NS, $s, Tm, BS, sv, Mg, Mm, cv, uv, RS]); + } + function eF() { + eF = N, b9 = new k9n(), gH = A(M(su, 1), gg, 170, 0, []), iee = A(M(co, 1), Qtn, 59, 0, []); + } + function uT() { + uT = N, oon = new EO("NO", 0), oK = new EO("GREEDY", 1), son = new EO("LOOK_BACK", 2); + } + function bu() { + bu = N, Jrn = new Han(), Vrn = new Kan(), Qrn = new qan(), Xrn = new Gan(), Yrn = new zan(), Zrn = new Uan(); + } + function Pbe(n) { + var e, t, i; + for (i = 0, t = new E(n.b); t.a < t.c.c.length; ) + e = u(y(t), 29), e.p = i, ++i; + } + function Ibe(n, e) { + var t; + return t = HJ(n), pY(new fn(t.c, t.d), new fn(t.b, t.a), n.rf(), e, n.Hf()); + } + function yc(n, e) { + var t; + return n.b ? null : (t = A0e(n, n.g), Ke(n.a, t), t.i = n, n.d = e, t); + } + function Obe(n, e, t) { + le(t, "DFS Treeifying phase", 1), _2e(n, e), L8e(n, e), n.a = null, n.b = null, ce(t); + } + function aOn(n, e, t) { + this.g = n, this.d = e, this.e = t, this.a = new X(), P6e(this), Pn(), wi(this.a, null); + } + function CV(n) { + this.i = n.gc(), this.i > 0 && (this.g = this.ri(this.i + (this.i / 8 | 0) + 1), n.Qc(this.g)); + } + function xt(n, e) { + ME.call(this, ree, n, e), this.b = this, this.a = _c(n.Tg(), On(this.e.Tg(), this.c)); + } + function Z5(n, e) { + var t, i; + for (_n(e), i = e.vc().Kc(); i.Ob(); ) + t = u(i.Pb(), 42), n.zc(t.cd(), t.dd()); + } + function Dbe(n, e, t) { + var i; + for (i = t.Kc(); i.Ob(); ) + if (!yC(n, e, i.Pb())) + return !1; + return !0; + } + function $be(n, e, t, i, r) { + var c; + return t && (c = jt(e.Tg(), n.c), r = t.gh(e, -1 - (c == -1 ? i : c), null, r)), r; + } + function Fbe(n, e, t, i, r) { + var c; + return t && (c = jt(e.Tg(), n.c), r = t.ih(e, -1 - (c == -1 ? i : c), null, r)), r; + } + function dOn(n) { + var e; + if (n.b == -2) { + if (n.e == 0) + e = -1; + else + for (e = 0; n.a[e] == 0; e++) + ; + n.b = e; + } + return n.b; + } + function bOn(n) { + switch (n.g) { + case 2: + return J(), Gn; + case 4: + return J(), Vn; + default: + return n; + } + } + function wOn(n) { + switch (n.g) { + case 1: + return J(), ae; + case 3: + return J(), Kn; + default: + return n; + } + } + function xbe(n) { + var e, t, i; + return n.j == (J(), Kn) && (e = GLn(n), t = lu(e, Vn), i = lu(e, Gn), i || i && t); + } + function Lbe(n) { + var e, t; + return e = u(n.e && n.e(), 9), t = u(IW(e, e.length), 9), new ks(e, t, e.length); + } + function Nbe(n, e) { + le(e, iHn, 1), TQ(ire(new tj((Vv(), new GD(n, !1, !1, new BH()))))), ce(e); + } + function Y8(n, e) { + return qn(), yi(n) ? DX(n, Ce(e)) : z0(n) ? TD(n, Y(e)) : G0(n) ? Kfe(n, sn(e)) : n.wd(e); + } + function TV(n, e) { + e.q = n, n.d = j.Math.max(n.d, e.r), n.b += e.d + (n.a.c.length == 0 ? 0 : n.c), W(n.a, e); + } + function B3(n, e) { + var t, i, r, c; + return r = n.c, t = n.c + n.b, c = n.d, i = n.d + n.a, e.a > r && e.a < t && e.b > c && e.b < i; + } + function gOn(n, e, t, i) { + I(n.Cb, 179) && (u(n.Cb, 179).tb = null), Oc(n, t), e && J6e(n, e), i && n.xk(!0); + } + function MV(n, e) { + var t; + t = u(e, 183), aa(t, "x", n.i), aa(t, "y", n.j), aa(t, OB, n.g), aa(t, IB, n.f); + } + function AV() { + AV = N, oJn = Vd(zkn(Ze(Ze(new li(), (Vi(), Kc), (rr(), pS)), Tc, aS), Or), gS); + } + function pOn() { + pOn = N, aJn = Vd(zkn(Ze(Ze(new li(), (Vi(), Kc), (rr(), pS)), Tc, aS), Or), gS); + } + function sT() { + sT = N, PK = new SO(Xh, 0), Won = new SO("POLAR_COORDINATE", 1), Uon = new SO("ID", 2); + } + function oT() { + oT = N, eon = new yO("EQUALLY", 0), cK = new yO(NM, 1), ton = new yO("NORTH_SOUTH", 2); + } + function vOn() { + vOn = N, HQn = Fe((Zw(), A(M(Jsn, 1), z, 260, 0, [hP, ey, ty, Xsn, Vsn, Wsn, Qsn, lP]))); + } + function mOn() { + mOn = N, cXn = Fe((lM(), A(M(Ncn, 1), z, 270, 0, [n_, i_, ZR, u_, t_, e_, c_, r_]))); + } + function kOn() { + kOn = N, $Zn = Fe((j1(), A(M(DZn, 1), z, 277, 0, [Lfn, _i, sc, mv, Dr, Rt, Cp, yf]))); + } + function yOn() { + yOn = N, Lne = Fe((a4(), A(M(nI, 1), z, 237, 0, [aH, YP, ZP, JP, lH, QP, VP, hH]))); + } + function R3() { + R3 = N, pm = new ri("debugSVG", (qn(), !1)), mrn = new ri("overlapsExisted", !0); + } + function jOn(n, e) { + return ub(new Rvn(n), new _vn(e), new Kvn(e), new vln(), A(M(Nu, 1), z, 132, 0, [])); + } + function Bbe() { + var n; + return mR || (mR = new Xmn(), n = new y$(""), Qre(n, (n3(), Uin)), dbe(mR, n)), mR; + } + function Rbe(n, e) { + var t; + for (pe(e); n.Ob(); ) + if (t = n.Pb(), !IV(u(t, 10))) + return !1; + return !0; + } + function EOn(n, e) { + var t; + return t = Vx(L3(), n), t ? (pr(e, (Xe(), kv), t), !0) : !1; + } + function cs(n, e) { + var t; + for (t = 0; t < e.j.c.length; t++) + u(q8(n, t), 21).Gc(u(q8(e, t), 14)); + return n; + } + function _be(n, e) { + var t, i; + for (i = new E(e.b); i.a < i.c.c.length; ) + t = u(y(i), 29), n.a[t.p] = h5e(t); + } + function n6(n, e) { + var t, i; + for (_n(e), i = n.vc().Kc(); i.Ob(); ) + t = u(i.Pb(), 42), e.Od(t.cd(), t.dd()); + } + function fT(n, e) { + var t; + I(e, 83) ? (u(n.c, 76).Xj(), t = u(e, 83), lbe(n, t)) : u(n.c, 76).Wb(e); + } + function ma(n) { + return I(n, 152) ? I2(u(n, 152)) : I(n, 131) ? u(n, 131).a : I(n, 54) ? new od(n) : new K0(n); + } + function Kbe(n, e) { + return e < n.b.gc() ? u(n.b.Xb(e), 10) : e == n.b.gc() ? n.a : u(un(n.e, e - n.b.gc() - 1), 10); + } + function COn(n, e) { + n.a = Hi(n.a, 1), n.c = j.Math.min(n.c, e), n.b = j.Math.max(n.b, e), n.d = Hi(n.d, e); + } + function Hbe(n, e) { + var t; + le(e, "Edge and layer constraint edge reversal", 1), t = z7e(n), sCe(t), ce(e); + } + function TOn(n) { + var e; + n.d == null ? (++n.e, n.f = 0, FDn(null)) : (++n.e, e = n.d, n.d = null, n.f = 0, FDn(e)); + } + function bl(n) { + var e; + return e = n.h, e == 0 ? n.l + n.m * J2 : e == Wh ? n.l + n.m * J2 - Fa : n; + } + function MOn(n) { + return X0(), n.A.Hc((Qu(), sw)) && !n.B.Hc((xu(), Py)) ? o$n(n) : null; + } + function qbe(n) { + if (_n(n), n.length == 0) + throw T(new Sf("Zero length BigInteger")); + tke(this, n); + } + function Nw(n) { + if (!n) + throw T(new $r("no calls to next() since the last call to remove()")); + } + function eu(n) { + return ik < n && n < Fa ? n < 0 ? j.Math.ceil(n) : j.Math.floor(n) : bl(f8e(n)); + } + function Gbe(n, e) { + var t, i, r; + for (t = n.c.Ee(), r = e.Kc(); r.Ob(); ) + i = r.Pb(), n.a.Od(t, i); + return n.b.Kb(t); + } + function et(n, e) { + var t, i, r; + if (t = n.Jg(), t != null && n.Mg()) + for (i = 0, r = t.length; i < r; ++i) + t[i].ui(e); + } + function _3(n, e) { + var t, i; + for (t = n, i = qi(t).e; i; ) { + if (t = i, t == e) + return !0; + i = qi(t).e; + } + return !1; + } + function zbe(n, e, t) { + var i, r; + return i = n.a.f[e.p], r = n.a.f[t.p], i < r ? -1 : i == r ? 0 : 1; + } + function ka(n, e, t) { + var i, r; + return r = u(M5(n.d, e), 19), i = u(M5(n.b, t), 19), !r || !i ? null : D2(n, r.a, i.a); + } + function Ube(n, e) { + var t, i; + for (i = new ie(n); i.e != i.i.gc(); ) + t = u(oe(i), 33), Jo(t, t.i + e.b, t.j + e.d); + } + function Wbe(n, e) { + var t, i; + for (i = new E(e); i.a < i.c.c.length; ) + t = u(y(i), 70), W(n.d, t), i5e(n, t); + } + function Xbe(n, e) { + var t, i; + i = new X(), t = e; + do + i.c[i.c.length] = t, t = u(te(n.k, t), 17); + while (t); + return i; + } + function Rn(n, e) { + var t; + return n.Db & e ? (t = ux(n, e), t == -1 ? n.Eb : va(n.Eb)[t]) : null; + } + function Yr(n, e) { + var t, i; + return t = (i = new tq(), i), t.G = e, !n.rb && (n.rb = new Z0(n, Qo, n)), me(n.rb, t), t; + } + function ze(n, e) { + var t, i; + return t = (i = new fj(), i), t.G = e, !n.rb && (n.rb = new Z0(n, Qo, n)), me(n.rb, t), t; + } + function SV(n, e) { + switch (e) { + case 1: + return !!n.n && n.n.i != 0; + case 2: + return n.k != null; + } + return sX(n, e); + } + function AOn(n) { + switch (n.a.g) { + case 1: + return new Akn(); + case 3: + return new TFn(); + default: + return new U4n(); + } + } + function hT(n) { + var e; + if (n.g > 1 || n.Ob()) + return ++n.a, n.g = 0, e = n.i, n.Ob(), e; + throw T(new ic()); + } + function Vbe(n) { + gyn(); + var e; + return M7n(hK, n) || (e = new Zwn(), e.a = n, wU(hK, n, e)), u(wr(hK, n), 635); + } + function Ks(n) { + var e, t, i, r; + return r = n, i = 0, r < 0 && (r += Fa, i = Wh), t = Gt(r / J2), e = Gt(r - t * J2), Nc(e, t, i); + } + function Z8(n) { + var e, t, i; + for (i = 0, t = new o2(n.a); t.a < t.c.a.length; ) + e = G5(t), n.b.Hc(e) && ++i; + return i; + } + function Qbe(n) { + var e, t, i; + for (e = 1, i = n.Kc(); i.Ob(); ) + t = i.Pb(), e = 31 * e + (t == null ? 0 : kt(t)), e = ~~e; + return e; + } + function Jbe(n, e) { + var t; + this.c = n, t = new X(), rJ(n, t, e, n.b, null, !1, null, !1), this.a = new Ii(t, 0); + } + function K3(n, e) { + this.b = n, this.e = e, this.d = e.j, this.f = (er(), u(n, 66).Oj()), this.k = _c(e.e.Tg(), n); + } + function ya(n, e, t) { + this.b = (_n(n), n), this.d = (_n(e), e), this.e = (_n(t), t), this.c = this.d + ("" + this.e); + } + function SOn() { + this.a = u(cn((Go(), iS)), 19).a, this.c = K(Y(cn(rS))), this.b = K(Y(cn(FR))); + } + function POn() { + POn = N, fne = Fe((Eb(), A(M(ar, 1), z, 93, 0, [So, Zh, Po, Oo, yh, eo, ds, Io, no]))); + } + function IOn() { + IOn = N, Uzn = Fe((dM(), A(M(wrn, 1), z, 250, 0, [brn, hrn, lrn, frn, ER, drn, arn, orn, srn]))); + } + function qd() { + qd = N, Ok = new _j("UP", 0), Ik = new _j(hN, 1), MR = new _j(Y2, 2), AR = new _j(Z2, 3); + } + function PV() { + PV = N, mon = (aC(), kK), ZJn = new In(Zen, mon), von = (gC(), yK), YJn = new In(ntn, von); + } + function H3() { + H3 = N, m_ = new gO("ONE_SIDED", 0), k_ = new gO("TWO_SIDED", 1), Gk = new gO("OFF", 2); + } + function OOn(n) { + n.r = new hi(), n.w = new hi(), n.t = new X(), n.i = new X(), n.d = new hi(), n.a = new d2(), n.c = new we(); + } + function n7(n) { + this.n = new X(), this.e = new Tt(), this.j = new Tt(), this.k = new X(), this.f = new X(), this.p = n; + } + function DOn(n, e) { + n.c && (xBn(n, e, !0), _t(new $n(null, new xn(e, 16)), new s6n(n))), xBn(n, e, !1); + } + function Ybe(n, e, t) { + return n == (Kd(), aP) ? new kwn() : Fu(e, 1) != 0 ? new yG(t.length) : new t8n(t.length); + } + function Pr(n, e) { + var t; + return e && (t = e.Ve(), t.dc() || (n.q ? Z5(n.q, t) : n.q = new Gkn(t))), n; + } + function $On(n, e) { + var t; + return t = n.a.get(e), t === void 0 ? ++n.d : (jue(n.a, e), --n.c, cC(n.b)), t; + } + function Zbe(n, e) { + var t, i, r; + return t = e.p - n.p, t == 0 ? (i = n.f.a * n.f.b, r = e.f.a * e.f.b, ni(i, r)) : t; + } + function nwe(n, e) { + var t, i; + return t = n.f.c.length, i = e.f.c.length, t < i ? -1 : t == i ? 0 : 1; + } + function ewe(n) { + return n.b.c.length != 0 && u(un(n.b, 0), 70).a ? u(un(n.b, 0), 70).a : WD(n); + } + function twe(n) { + var e; + if (n) { + if (e = n, e.dc()) + throw T(new ic()); + return e.Xb(e.gc() - 1); + } + return FMn(n.Kc()); + } + function FOn(n) { + var e; + return hc(n, 0) < 0 && (n = XU(n)), e = ge(cl(n, 32)), 64 - (e != 0 ? x7(e) : x7(ge(n)) + 32); + } + function IV(n) { + var e; + return e = u(k(n, (G(), ec)), 61), n.k == (Qn(), Xt) && (e == (J(), Gn) || e == Vn); + } + function iwe(n, e, t) { + var i, r; + r = u(k(n, (nn(), Mr)), 74), r && (i = new fu(), vF(i, 0, r), hb(i, t), Xi(e, i)); + } + function lT(n, e, t) { + var i, r, c, o; + o = qi(n), i = o.d, r = o.c, c = n.n, e && (c.a = c.a - i.b - r.a), t && (c.b = c.b - i.d - r.b); + } + function rwe(n, e) { + var t, i; + return t = n.j, i = e.j, t != i ? t.g - i.g : n.p == e.p ? 0 : t == (J(), Kn) ? n.p - e.p : e.p - n.p; + } + function cwe(n) { + var e, t; + for (ICe(n), t = new E(n.d); t.a < t.c.c.length; ) + e = u(y(t), 101), e.i && R5e(e); + } + function e6(n, e, t, i, r) { + St(n.c[e.g], t.g, i), St(n.c[t.g], e.g, i), St(n.b[e.g], t.g, r), St(n.b[t.g], e.g, r); + } + function uwe(n, e, t, i) { + u(t.b, 65), u(t.b, 65), u(i.b, 65), u(i.b, 65), u(i.b, 65), Yc(i.a, new NU(n, e, i)); + } + function swe(n, e) { + n.d == (or(), Zs) || n.d == Yh ? u(e.a, 57).c.Fc(u(e.b, 57)) : u(e.b, 57).c.Fc(u(e.a, 57)); + } + function tF(n, e, t, i) { + return t == 1 ? (!n.n && (n.n = new V(Rr, n, 1, 7)), Gi(n.n, e, i)) : QJ(n, e, t, i); + } + function e7(n, e) { + var t, i; + return i = (t = new CI(), t), Oc(i, e), me((!n.A && (n.A = new hu(Gc, n, 7)), n.A), i), i; + } + function owe(n, e, t) { + var i, r, c, o; + return c = null, o = e, r = xd(o, FB), i = new akn(n, t), c = (A4e(i.a, i.b, r), r), c; + } + function iF(n) { + var e; + return (!n.a || !(n.Bb & 1) && n.a.kh()) && (e = qs(n), I(e, 148) && (n.a = u(e, 148))), n.a; + } + function t7(n, e) { + var t, i; + for (_n(e), i = e.Kc(); i.Ob(); ) + if (t = i.Pb(), !n.Hc(t)) + return !1; + return !0; + } + function fwe(n, e) { + var t, i, r; + return t = n.l + e.l, i = n.m + e.m + (t >> 22), r = n.h + e.h + (i >> 22), Nc(t & Lu, i & Lu, r & Wh); + } + function xOn(n, e) { + var t, i, r; + return t = n.l - e.l, i = n.m - e.m + (t >> 22), r = n.h - e.h + (i >> 22), Nc(t & Lu, i & Lu, r & Wh); + } + function i7(n) { + var e; + return n < 128 ? (e = (QEn(), yin)[n], !e && (e = yin[n] = new wq(n)), e) : new wq(n); + } + function Et(n) { + var e; + return I(n, 78) ? n : (e = n && n.__java$exception, e || (e = new CDn(n), Kmn(e)), e); + } + function r7(n) { + if (I(n, 186)) + return u(n, 118); + if (n) + return null; + throw T(new c2(Iqn)); + } + function LOn(n, e) { + if (e == null) + return !1; + for (; n.a != n.b; ) + if (tt(e, vT(n))) + return !0; + return !1; + } + function OV(n) { + return n.a.Ob() ? !0 : n.a != n.d ? !1 : (n.a = new lX(n.e.f), n.a.Ob()); + } + function Zt(n, e) { + var t, i; + return t = e.Pc(), i = t.length, i == 0 ? !1 : (GU(n.c, n.c.length, t), !0); + } + function hwe(n, e, t) { + var i, r; + for (r = e.vc().Kc(); r.Ob(); ) + i = u(r.Pb(), 42), n.yc(i.cd(), i.dd(), t); + return n; + } + function NOn(n, e) { + var t, i; + for (i = new E(n.b); i.a < i.c.c.length; ) + t = u(y(i), 70), H(t, (G(), pp), e); + } + function lwe(n, e, t) { + var i, r; + for (r = new E(n.b); r.a < r.c.c.length; ) + i = u(y(r), 33), Jo(i, i.i + e, i.j + t); + } + function BOn(n, e) { + if (!n) + throw T(new Hn(T6("value already present: %s", A(M(Zn, 1), rn, 1, 5, [e])))); + } + function ROn(n, e) { + return !n || !e || n == e ? !1 : y$n(n.d.c, e.d.c + e.d.b) && y$n(e.d.c, n.d.c + n.d.b); + } + function awe() { + return CC(), pf ? new y$(null) : HLn(Bbe(), "com.google.common.base.Strings"); + } + function _On(n, e) { + var t; + return t = nh(e.a.gc()), _t(qC(new $n(null, new xn(e, 1)), n.i), new ckn(n, t)), t; + } + function KOn(n) { + var e, t; + return t = (e = new CI(), e), Oc(t, "T"), me((!n.d && (n.d = new hu(Gc, n, 11)), n.d), t), t; + } + function DV(n) { + var e, t, i, r; + for (e = 1, t = 0, r = n.gc(); t < r; ++t) + i = n.ki(t), e = 31 * e + (i == null ? 0 : kt(i)); + return e; + } + function HOn(n, e, t, i) { + var r; + return D8(e, n.e.Hd().gc()), D8(t, n.c.Hd().gc()), r = n.a[e][t], St(n.a[e], t, i), r; + } + function A(n, e, t, i, r) { + return r.gm = n, r.hm = e, r.im = Xg, r.__elementTypeId$ = t, r.__elementTypeCategory$ = i, r; + } + function dwe(n, e, t, i, r) { + return eg(), j.Math.min(YRn(n, e, t, i, r), YRn(t, i, n, e, vE(new fn(r.a, r.b)))); + } + function aT() { + aT = N, QR = new Hj(Xh, 0), TS = new Hj(uHn, 1), MS = new Hj(sHn, 2), Hk = new Hj("BOTH", 3); + } + function ff() { + ff = N, lp = new qj(P4, 0), Z4 = new qj(Y2, 1), nv = new qj(Z2, 2), JR = new qj("TOP", 3); + } + function q3() { + q3 = N, w0 = new Kj("Q1", 0), qb = new Kj("Q4", 1), Hb = new Kj("Q2", 2), kg = new Kj("Q3", 3); + } + function dT() { + dT = N, fK = new CO("OFF", 0), gv = new CO("SINGLE_EDGE", 1), tw = new CO("MULTI_EDGE", 2); + } + function c7() { + c7 = N, DP = new fz("MINIMUM_SPANNING_TREE", 0), $fn = new fz("MAXIMUM_SPANNING_TREE", 1); + } + function L2() { + L2 = N, AZn = new Vgn(), MZn = new Xgn(); + } + function $V(n) { + var e, t, i; + for (e = new Tt(), i = _e(n.d, 0); i.b != i.d.c; ) + t = u(Re(i), 188), Ke(e, t.c); + return e; + } + function rF(n) { + var e, t, i, r; + for (r = new X(), i = n.Kc(); i.Ob(); ) + t = u(i.Pb(), 33), e = Tb(t), Zt(r, e); + return r; + } + function bwe(n) { + var e; + t0(n, !0), e = E1, ai(n, (nn(), dv)) && (e += u(k(n, dv), 19).a), H(n, dv, Q(e)); + } + function qOn(n, e, t) { + var i; + Eu(n.a), Yc(t.i, new B6n(n)), i = new sE(u(te(n.a, e.b), 65)), I$n(n, i, e), t.f = i; + } + function wwe(n, e) { + var t, i; + return t = n.c, i = e.e[n.p], i < t.a.c.length - 1 ? u(un(t.a, i + 1), 10) : null; + } + function gwe(n, e) { + var t, i; + for (tC(e, "predicate"), i = 0; n.Ob(); i++) + if (t = n.Pb(), e.Lb(t)) + return i; + return -1; + } + function N2(n, e) { + var t, i; + if (i = 0, n < 64 && n <= e) + for (e = e < 64 ? e : 63, t = n; t <= e; t++) + i = rf(i, Ih(1, t)); + return i; + } + function FV(n) { + Pn(); + var e, t, i; + for (i = 0, t = n.Kc(); t.Ob(); ) + e = t.Pb(), i = i + (e != null ? kt(e) : 0), i = i | 0; + return i; + } + function xV(n) { + var e, t; + return t = (dd(), e = new Vy(), e), n && me((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a), t), t; + } + function pwe(n) { + var e; + return e = new t1(), e.a = n, e.b = Cwe(n), e.c = F(tn, q, 2, 2, 6, 1), e.c[0] = rOn(n), e.c[1] = rOn(n), e; + } + function LV(n, e) { + switch (e) { + case 0: + !n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), n.o.c.$b(); + return; + } + Cx(n, e); + } + function u7(n, e, t) { + switch (t.g) { + case 2: + n.b = e; + break; + case 1: + n.c = e; + break; + case 4: + n.d = e; + break; + case 3: + n.a = e; + } + } + function GOn(n) { + switch (n.g) { + case 1: + return Kl; + case 2: + return kh; + case 3: + return jy; + default: + return Ey; + } + } + function vwe(n) { + switch (u(k(n, (nn(), Hc)), 163).g) { + case 2: + case 4: + return !0; + default: + return !1; + } + } + function zOn() { + zOn = N, vXn = Fe((fr(), A(M(v_, 1), z, 256, 0, [NS, $s, Tm, BS, sv, Mg, Mm, cv, uv, RS]))); + } + function UOn() { + UOn = N, mne = Fe((xu(), A(M(Uhn, 1), z, 259, 0, [Tv, Py, GP, f9, zP, WP, UP, sH, Sy]))); + } + function WOn() { + WOn = N, dYn = Ze(Vd(Vd(Dj(Ze(new li(), (r4(), qm), (k6(), pP)), uy), dK), bK), Gm, wK); + } + function ja() { + ja = N, l_ = new wO(Xh, 0), rv = new wO("INCOMING_ONLY", 1), Tg = new wO("OUTGOING_ONLY", 2); + } + function cF() { + cF = N, dR = { boolean: ere, number: hie, string: lie, object: uLn, function: uLn, undefined: Gte }; + } + function XOn(n, e) { + TE(n >= 0, "Negative initial capacity"), TE(e >= 0, "Non-positive load factor"), Eu(this); + } + function uF(n, e, t) { + return n >= 128 ? !1 : n < 64 ? b5(ui(Ih(1, n), t), 0) : b5(ui(Ih(1, n - 64), e), 0); + } + function mwe(n, e) { + return !n || !e || n == e ? !1 : Ud(n.b.c, e.b.c + e.b.b) < 0 && Ud(e.b.c, n.b.c + n.b.b) < 0; + } + function VOn(n) { + var e, t, i; + return t = n.n, i = n.o, e = n.d, new ys(t.a - e.b, t.b - e.d, i.a + (e.b + e.c), i.b + (e.d + e.a)); + } + function kwe(n) { + var e, t, i, r; + for (t = n.a, i = 0, r = t.length; i < r; ++i) + e = t[i], eDn(n, e, (J(), ae)), eDn(n, e, Kn); + } + function ywe(n) { + var e, t, i, r; + for (e = (n.j == null && (n.j = (m3(), r = aR.ce(n), $4e(r))), n.j), t = 0, i = e.length; t < i; ++t) + ; + } + function G3(n) { + var e, t, i; + return e = ~n.l + 1 & Lu, t = ~n.m + (e == 0 ? 1 : 0) & Lu, i = ~n.h + (e == 0 && t == 0 ? 1 : 0) & Wh, Nc(e, t, i); + } + function jwe(n, e) { + var t, i; + return t = u(u(te(n.g, e.a), 46).a, 65), i = u(u(te(n.g, e.b), 46).a, 65), sRn(t, i); + } + function NV(n, e, t) { + var i; + if (i = n.gc(), e > i) + throw T(new Q0(e, i)); + return n.hi() && (t = aMn(n, t)), n.Vh(e, t); + } + function s7(n, e, t) { + return t == null ? (!n.q && (n.q = new we()), O2(n.q, e)) : (!n.q && (n.q = new we()), it(n.q, e, t)), n; + } + function H(n, e, t) { + return t == null ? (!n.q && (n.q = new we()), O2(n.q, e)) : (!n.q && (n.q = new we()), it(n.q, e, t)), n; + } + function QOn(n) { + var e, t; + return t = new TC(), Pr(t, n), H(t, (dl(), hp), n), e = new we(), Cye(n, t, e), QEe(n, t, e), t; + } + function Ewe(n) { + eg(); + var e, t, i; + for (t = F(di, q, 8, 2, 0, 1), i = 0, e = 0; e < 2; e++) + i += 0.5, t[e] = r3e(i, n); + return t; + } + function JOn(n, e) { + var t, i, r, c; + for (t = !1, i = n.a[e].length, c = 0; c < i - 1; c++) + r = c + 1, t = t | K2e(n, e, c, r); + return t; + } + function z3(n, e, t, i, r) { + var c, o; + for (o = t; o <= r; o++) + for (c = e; c <= i; c++) + zw(n, c, o) || wM(n, c, o, !0, !1); + } + function YOn(n, e) { + this.b = n, Ew.call(this, (u(D(R((ol(), Nn).o), 10), 18), e.i), e.g), this.a = (eF(), gH); + } + function BV(n, e) { + this.c = n, this.d = e, this.b = this.d / this.c.c.Hd().gc() | 0, this.a = this.d % this.c.c.Hd().gc(); + } + function RV() { + this.o = null, this.k = null, this.j = null, this.d = null, this.b = null, this.n = null, this.a = null; + } + function _V(n, e, t) { + this.q = new j.Date(), this.q.setFullYear(n + Tl, e, t), this.q.setHours(0, 0, 0, 0), S6(this, 0); + } + function Rh() { + Rh = N, Nl = new mO(Xh, 0), Ysn = new mO("NODES_AND_EDGES", 1), tK = new mO("PREFER_EDGES", 2); + } + function Cwe(n) { + var e; + return n == 0 ? "Etc/GMT" : (n < 0 ? (n = -n, e = "Etc/GMT-") : e = "Etc/GMT+", e + _Pn(n)); + } + function KV(n) { + var e; + if (n < 0) + return Bi; + if (n == 0) + return 0; + for (e = L6; !(e & n); e >>= 1) + ; + return e; + } + function ZOn(n) { + var e, t; + return t = x7(n.h), t == 32 ? (e = x7(n.m), e == 32 ? x7(n.l) + 32 : e + 20 - 10) : t - 12; + } + function t6(n) { + var e; + return e = n.a[n.b], e == null ? null : (St(n.a, n.b, null), n.b = n.b + 1 & n.a.length - 1, e); + } + function nDn(n) { + var e, t; + return e = n.t - n.k[n.o.p] * n.d + n.j[n.o.p] > n.f, t = n.u + n.e[n.o.p] * n.d > n.f * n.s * n.d, e || t; + } + function bT(n, e, t) { + var i, r; + return i = new I$(e, t), r = new dI(), n.b = zNn(n, n.b, i, r), r.b || ++n.c, n.b.b = !1, r.d; + } + function eDn(n, e, t) { + var i, r, c, o; + for (o = c6(e, t), c = 0, r = o.Kc(); r.Ob(); ) + i = u(r.Pb(), 11), it(n.c, i, Q(c++)); + } + function wl(n) { + var e, t; + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), e.g.c = -e.g.c - e.g.b; + oM(n); + } + function gl(n) { + var e, t; + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 57), e.d.c = -e.d.c - e.d.b; + GY(n); + } + function HV(n) { + var e; + return (!n.c || !(n.Bb & 1) && n.c.Db & 64) && (e = qs(n), I(e, 88) && (n.c = u(e, 26))), n.c; + } + function sF(n) { + var e, t, i; + e = ~n.l + 1 & Lu, t = ~n.m + (e == 0 ? 1 : 0) & Lu, i = ~n.h + (e == 0 && t == 0 ? 1 : 0) & Wh, n.l = e, n.m = t, n.h = i; + } + function Gr(n) { + var e, t, i, r, c; + for (e = new Li(), i = n, r = 0, c = i.length; r < c; ++r) + t = i[r], e.a += t.a, e.b += t.b; + return e; + } + function qV(n, e) { + Pn(); + var t, i, r, c, o; + for (o = !1, i = e, r = 0, c = i.length; r < c; ++r) + t = i[r], o = o | n.Fc(t); + return o; + } + function Bw(n) { + eg(); + var e, t; + for (t = -17976931348623157e292, e = 0; e < n.length; e++) + n[e] > t && (t = n[e]); + return t; + } + function tDn(n, e, t) { + var i; + return i = new X(), XY(n, e, i, (J(), Vn), !0, !1), XY(n, t, i, Gn, !1, !1), i; + } + function oF(n, e, t) { + var i, r, c, o; + return c = null, o = e, r = xd(o, "labels"), i = new jkn(n, t), c = (Hme(i.a, i.b, r), r), c; + } + function Twe(n, e, t, i) { + var r; + return r = xY(n, e, t, i), !r && (r = Mge(n, t, i), r && !rg(n, e, r)) ? null : r; + } + function Mwe(n, e, t, i) { + var r; + return r = LY(n, e, t, i), !r && (r = TF(n, t, i), r && !rg(n, e, r)) ? null : r; + } + function iDn(n, e) { + var t; + for (t = 0; t < n.a.a.length; t++) + if (!u(ZEn(n.a, t), 169).Lb(e)) + return !1; + return !0; + } + function Awe(n, e, t) { + if (pe(e), t.Ob()) + for (bz(e, zCn(t.Pb())); t.Ob(); ) + bz(e, n.a), bz(e, zCn(t.Pb())); + return e; + } + function GV(n) { + Pn(); + var e, t, i; + for (i = 1, t = n.Kc(); t.Ob(); ) + e = t.Pb(), i = 31 * i + (e != null ? kt(e) : 0), i = i | 0; + return i; + } + function Swe(n, e, t, i, r) { + var c; + return c = SY(n, e), t && sF(c), r && (n = h3e(n, e), i ? Il = G3(n) : Il = Nc(n.l, n.m, n.h)), c; + } + function Pwe(n, e) { + var t; + try { + e.Vd(); + } catch (i) { + if (i = Et(i), I(i, 78)) + t = i, n.c[n.c.length] = t; + else + throw T(i); + } + } + function rDn(n, e, t) { + var i, r; + return I(e, 144) && t ? (i = u(e, 144), r = t, n.a[i.b][r.b] + n.a[r.b][i.b]) : 0; + } + function zV(n, e) { + switch (e) { + case 7: + return !!n.e && n.e.i != 0; + case 8: + return !!n.d && n.d.i != 0; + } + return PQ(n, e); + } + function Iwe(n, e) { + switch (e.g) { + case 0: + I(n.b, 631) || (n.b = new SOn()); + break; + case 1: + I(n.b, 632) || (n.b = new PEn()); + } + } + function Owe(n, e) { + for (; n.g == null && !n.c ? ZW(n) : n.g == null || n.i != 0 && u(n.g[n.i - 1], 47).Ob(); ) + yre(e, cM(n)); + } + function cDn(n, e, t) { + n.g = Tx(n, e, (J(), Vn), n.b), n.d = Tx(n, t, Vn, n.b), !(n.g.c == 0 || n.d.c == 0) && Cxn(n); + } + function uDn(n, e, t) { + n.g = Tx(n, e, (J(), Gn), n.j), n.d = Tx(n, t, Gn, n.j), !(n.g.c == 0 || n.d.c == 0) && Cxn(n); + } + function Dwe(n, e, t) { + return !Wv(pt(new $n(null, new xn(n.c, 16)), new Fv(new skn(e, t)))).sd((ua(), X4)); + } + function fF(n) { + var e; + return fl(n), e = new bI(), n.a.sd(e) ? (r3(), new dj(_n(e.a))) : (r3(), r3(), UA); + } + function UV(n) { + var e; + return n.b <= 0 ? !1 : (e = Pf("MLydhHmsSDkK", tu(Di(n.c, 0))), e > 1 || e >= 0 && n.b < 3); + } + function o7(n) { + var e, t, i; + for (e = new fu(), i = _e(n, 0); i.b != i.d.c; ) + t = u(Re(i), 8), u3(e, 0, new kr(t)); + return e; + } + function Ea(n) { + var e, t; + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), e.f.$b(); + uie(n.b, n), DNn(n); + } + function kt(n) { + return yi(n) ? k1(n) : z0(n) ? t3(n) : G0(n) ? (_n(n), n ? 1231 : 1237) : bW(n) ? n.Hb() : fW(n) ? kd(n) : WW(n); + } + function Du(n) { + return yi(n) ? tn : z0(n) ? Si : G0(n) ? oi : bW(n) || fW(n) ? n.gm : n.gm || Array.isArray(n) && M(bzn, 1) || bzn; + } + function sDn(n) { + switch (n.g) { + case 0: + return new Wgn(); + default: + throw T(new Hn(bA + (n.f != null ? n.f : "" + n.g))); + } + } + function oDn(n) { + switch (n.g) { + case 0: + return new Ugn(); + default: + throw T(new Hn(bA + (n.f != null ? n.f : "" + n.g))); + } + } + function WV(n, e, t) { + switch (e) { + case 0: + !n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), fT(n.o, t); + return; + } + Px(n, e, t); + } + function hF(n, e, t) { + this.g = n, this.e = new Li(), this.f = new Li(), this.d = new Tt(), this.b = new Tt(), this.a = e, this.c = t; + } + function lF(n, e, t, i) { + this.b = new X(), this.n = new X(), this.i = i, this.j = t, this.s = n, this.t = e, this.r = 0, this.d = 0; + } + function Ca(n) { + this.e = n, this.d = new yX(this.e.g), this.a = this.d, this.b = OV(this), this.$modCount = n.$modCount; + } + function $we(n) { + for (; !n.d || !n.d.Ob(); ) + if (n.b && !Hv(n.b)) + n.d = u(y2(n.b), 47); + else + return null; + return n.d; + } + function Fwe(n) { + return W(n.c, (L2(), AZn)), iV(n.a, K(Y(cn((xF(), uP))))) ? new M2n() : new G6n(n); + } + function XV(n) { + switch (n.g) { + case 1: + return MHn; + default: + case 2: + return 0; + case 3: + return kN; + case 4: + return AHn; + } + } + function xwe() { + Je(); + var n; + return jH || (n = Gce(El("M", !0)), n = LE(El("M", !1), n), jH = n, jH); + } + function VV(n, e) { + var t, i, r; + for (r = n.b; r; ) { + if (t = n.a.ue(e, r.d), t == 0) + return r; + i = t < 0 ? 0 : 1, r = r.a[i]; + } + return null; + } + function Lwe(n, e, t) { + var i, r; + i = (qn(), !!gz(t)), r = u(e.xc(i), 15), r || (r = new X(), e.zc(i, r)), r.Fc(t); + } + function Nwe(n, e) { + var t, i; + return t = u(hn(n, (Bx(), fy)), 19).a, i = u(hn(e, fy), 19).a, t == i || t < i ? -1 : t > i ? 1 : 0; + } + function QV(n, e) { + return ANn(n, e) ? (Tn(n.b, u(k(e, (G(), zb)), 21), e), Ke(n.a, e), !0) : !1; + } + function Bwe(n) { + var e, t; + e = u(k(n, (G(), Mu)), 10), e && (t = e.c, Qc(t.a, e), t.a.c.length == 0 && Qc(qi(e).b, t)); + } + function fDn(n) { + return pf ? F($zn, lKn, 572, 0, 0, 1) : u(lf(n.a, F($zn, lKn, 572, n.a.c.length, 0, 1)), 842); + } + function Rwe(n, e, t, i) { + return QE(), new GI(A(M(qa, 1), OM, 42, 0, [(ex(n, e), new wd(n, e)), (ex(t, i), new wd(t, i))])); + } + function Rw(n, e, t) { + var i, r; + return r = (i = new RI(), i), gr(r, e, t), me((!n.q && (n.q = new V(co, n, 11, 10)), n.q), r), r; + } + function aF(n) { + var e, t, i, r; + for (r = lre($ne, n), t = r.length, i = F(tn, q, 2, t, 6, 1), e = 0; e < t; ++e) + i[e] = r[e]; + return i; + } + function _w(n, e) { + var t, i, r, c, o; + for (i = e, r = 0, c = i.length; r < c; ++r) + t = i[r], o = new JCn(n), t.Qe(o), qye(o); + Eu(n.f); + } + function dF(n, e) { + var t; + return e === n ? !0 : I(e, 224) ? (t = u(e, 224), tt(n.Zb(), t.Zb())) : !1; + } + function JV(n, e) { + var t; + e * 2 + 1 >= n.b.c.length || (JV(n, 2 * e + 1), t = 2 * e + 2, t < n.b.c.length && JV(n, t), fLn(n, e)); + } + function hDn(n, e, t) { + var i, r; + this.g = n, this.c = e, this.a = this, this.d = this, r = UIn(t), i = F(dzn, nk, 330, r, 0, 1), this.b = i; + } + function YV(n, e, t) { + var i; + for (i = t - 1; i >= 0 && n[i] === e[i]; i--) + ; + return i < 0 ? 0 : cO(ui(n[i], hr), ui(e[i], hr)) ? -1 : 1; + } + function _we(n, e) { + var t, i; + for (i = _e(n, 0); i.b != i.d.c; ) + t = u(Re(i), 214), t.e.length > 0 && (e.td(t), t.i && Fge(t)); + } + function bF(n, e) { + var t, i; + return i = u(Rn(n.a, 4), 126), t = F(bH, qB, 415, e, 0, 1), i != null && pc(i, 0, t, 0, i.length), t; + } + function lDn(n, e) { + var t; + return t = new zx((n.f & 256) != 0, n.i, n.a, n.d, (n.f & 16) != 0, n.j, n.g, e), n.e != null || (t.c = n), t; + } + function Kwe(n, e) { + var t, i; + for (i = n.Zb().Cc().Kc(); i.Ob(); ) + if (t = u(i.Pb(), 14), t.Hc(e)) + return !0; + return !1; + } + function wF(n, e, t, i, r) { + var c, o; + for (o = t; o <= r; o++) + for (c = e; c <= i; c++) + if (zw(n, c, o)) + return !0; + return !1; + } + function aDn(n, e, t) { + var i, r, c, o; + for (_n(t), o = !1, c = n.Zc(e), r = t.Kc(); r.Ob(); ) + i = r.Pb(), c.Rb(i), o = !0; + return o; + } + function Hwe(n, e) { + var t; + return n === e ? !0 : I(e, 83) ? (t = u(e, 83), ZJ(Cd(n), t.vc())) : !1; + } + function dDn(n, e, t) { + var i, r; + for (r = t.Kc(); r.Ob(); ) + if (i = u(r.Pb(), 42), n.re(e, i.dd())) + return !0; + return !1; + } + function bDn(n, e, t) { + return n.d[e.p][t.p] || (Bpe(n, e, t), n.d[e.p][t.p] = !0, n.d[t.p][e.p] = !0), n.a[e.p][t.p]; + } + function U3(n, e) { + if (!n.ai() && e == null) + throw T(new Hn("The 'no null' constraint is violated")); + return e; + } + function W3(n, e) { + n.D == null && n.B != null && (n.D = n.B, n.B = null), W$(n, e == null ? null : (_n(e), e)), n.C && n.yk(null); + } + function qwe(n, e) { + var t; + return !n || n == e || !ai(e, (G(), k0)) ? !1 : (t = u(k(e, (G(), k0)), 10), t != n); + } + function gF(n) { + switch (n.i) { + case 2: + return !0; + case 1: + return !1; + case -1: + ++n.c; + default: + return n.pl(); + } + } + function wDn(n) { + switch (n.i) { + case -2: + return !0; + case -1: + return !1; + case 1: + --n.c; + default: + return n.ql(); + } + } + function gDn(n) { + cMn.call(this, "The given string does not match the expected format for individual spacings.", n); + } + function Vu() { + Vu = N, gs = new Jj("ELK", 0), Yhn = new Jj("JSON", 1), Jhn = new Jj("DOT", 2), Zhn = new Jj("SVG", 3); + } + function f7() { + f7 = N, CP = new AO(Xh, 0), Don = new AO("RADIAL_COMPACTION", 1), $on = new AO("WEDGE_COMPACTION", 2); + } + function hf() { + hf = N, Win = new uO("CONCURRENT", 0), ls = new uO("IDENTITY_FINISH", 1), _b = new uO("UNORDERED", 2); + } + function pF() { + pF = N, jrn = (Aj(), SR), yrn = new In(pnn, jrn), OUn = new yt(vnn), DUn = new yt(mnn), $Un = new yt(knn); + } + function X3() { + X3 = N, xcn = new j0n(), Lcn = new E0n(), zWn = new C0n(), GWn = new T0n(), qWn = new M0n(), Fcn = (_n(qWn), new uln()); + } + function V3() { + V3 = N, sK = new jO("CONSERVATIVE", 0), con = new jO("CONSERVATIVE_SOFT", 1), Rm = new jO("SLOPPY", 2); + } + function wT() { + wT = N, _hn = new md(15), cne = new tr((Xe(), ed), _hn), t9 = Mp, Lhn = HZn, Nhn = nd, Rhn = Kg, Bhn = BP; + } + function vF(n, e, t) { + var i, r, c; + for (i = new Tt(), c = _e(t, 0); c.b != c.d.c; ) + r = u(Re(c), 8), Ke(i, new kr(r)); + aDn(n, e, i); + } + function Gwe(n) { + var e, t, i; + for (e = 0, i = F(di, q, 8, n.b, 0, 1), t = _e(n, 0); t.b != t.d.c; ) + i[e++] = u(Re(t), 8); + return i; + } + function ZV(n) { + var e; + return e = (!n.a && (n.a = new V(e1, n, 9, 5)), n.a), e.i != 0 ? ore(u(D(e, 0), 678)) : null; + } + function zwe(n, e) { + var t; + return t = Hi(n, e), cO(h$(n, e), 0) | Cre(h$(n, t), 0) ? t : Hi(IM, h$(Y0(t, 63), 1)); + } + function Uwe(n, e) { + var t; + t = cn((xF(), uP)) != null && e.wg() != null ? K(Y(e.wg())) / K(Y(cn(uP))) : 1, it(n.b, e, t); + } + function Wwe(n, e) { + var t, i; + return t = u(n.d.Bc(e), 14), t ? (i = n.e.hc(), i.Gc(t), n.e.d -= t.gc(), t.$b(), i) : null; + } + function nQ(n, e) { + var t, i; + if (i = n.c[e], i != 0) + for (n.c[e] = 0, n.d -= i, t = e + 1; t < n.a.length; ) + n.a[t] -= i, t += t & -t; + } + function pDn(n) { + var e; + if (e = n.a.c.length, e > 0) + return l3(e - 1, n.a.c.length), l1(n.a, e - 1); + throw T(new qmn()); + } + function Xwe(n, e, t) { + if (e < 0) + throw T(new mr(_Hn + e)); + e < n.j.c.length ? Es(n.j, e, t) : (MAn(n, e), W(n.j, t)); + } + function vDn(n, e, t) { + if (n > e) + throw T(new Hn(xM + n + aKn + e)); + if (n < 0 || e > t) + throw T(new bG(xM + n + rnn + e + tnn + t)); + } + function mDn(n) { + if (!n.a || !(n.a.i & 8)) + throw T(new $r("Enumeration class expected for layout option " + n.f)); + } + function ab(n) { + var e; + ++n.j, n.i == 0 ? n.g = null : n.i < n.g.length && (e = n.g, n.g = n.ri(n.i), pc(e, 0, n.g, 0, n.i)); + } + function Vwe(n, e) { + var t, i; + for (t = n.a.length - 1, n.c = n.c - 1 & t; e != n.c; ) + i = e + 1 & t, St(n.a, e, n.a[i]), e = i; + St(n.a, n.c, null); + } + function Qwe(n, e) { + var t, i; + for (t = n.a.length - 1; e != n.b; ) + i = e - 1 & t, St(n.a, e, n.a[i]), e = i; + St(n.a, n.b, null), n.b = n.b + 1 & t; + } + function eQ(n, e, t) { + var i, r; + return ib(e, n.c.length), i = t.Pc(), r = i.length, r == 0 ? !1 : (GU(n.c, e, i), !0); + } + function Jwe(n) { + var e, t; + if (n == null) + return null; + for (e = 0, t = n.length; e < t; e++) + if (!xEn(n[e])) + return n[e]; + return null; + } + function kDn(n, e, t) { + var i, r, c, o; + for (r = t, c = 0, o = r.length; c < o; ++c) + if (i = r[c], n.b.re(e, i.cd())) + return i; + return null; + } + function gT(n) { + var e, t, i, r, c; + for (c = 1, t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], c = 31 * c + (e != null ? kt(e) : 0), c = c | 0; + return c; + } + function Fe(n) { + var e, t, i, r, c; + for (e = {}, i = n, r = 0, c = i.length; r < c; ++r) + t = i[r], e[":" + (t.f != null ? t.f : "" + t.g)] = t; + return e; + } + function Ywe(n) { + var e; + for (pe(n), OU(!0, "numberToAdvance must be nonnegative"), e = 0; e < 0 && Se(n); e++) + ve(n); + return e; + } + function yDn(n) { + var e, t, i; + for (i = 0, t = new re(ue(n.a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 17), e.c.i == e.d.i || ++i; + return i; + } + function jDn(n, e) { + var t, i, r; + t = n, r = 0; + do { + if (t == e) + return r; + if (i = t.e, !i) + throw T(new F9()); + t = qi(i), ++r; + } while (!0); + } + function EDn(n, e) { + var t, i, r; + for (r = e - n.f, i = new E(n.d); i.a < i.c.c.length; ) + t = u(y(i), 443), w$n(t, t.e, t.f + r); + n.f = e; + } + function mF(n, e, t) { + return j.Math.abs(e - n) < hA || j.Math.abs(t - n) < hA ? !0 : e - n > hA ? n - t > hA : t - n > hA; + } + function kF(n, e) { + return !n || e && !n.j || I(n, 124) && u(n, 124).a.b == 0 ? 0 : n.Re(); + } + function pT(n, e) { + return !n || e && !n.k || I(n, 124) && u(n, 124).a.a == 0 ? 0 : n.Se(); + } + function h7(n) { + return jl(), n < 0 ? n != -1 ? new VQ(-1, -n) : gR : n <= 10 ? xin[Gt(n)] : new VQ(1, n); + } + function tQ(n) { + throw cF(), T(new L9n("Unexpected typeof result '" + n + "'; please report this bug to the GWT team")); + } + function CDn(n) { + H9n(), oE(this), eC(this), this.e = n, NNn(this, n), this.g = n == null ? iu : Nr(n), this.a = "", this.b = n, this.a = ""; + } + function iQ() { + this.a = new qgn(), this.f = new O6n(this), this.b = new D6n(this), this.i = new $6n(this), this.e = new F6n(this); + } + function TDn() { + iie.call(this, new _X(ob(16))), rs(2, W_n), this.b = 2, this.a = new RW(null, null, 0, null), $9(this.a, this.a); + } + function i6() { + i6 = N, J_ = new vO("DUMMY_NODE_OVER", 0), qsn = new vO("DUMMY_NODE_UNDER", 1), oP = new vO("EQUAL", 2); + } + function yF() { + yF = N, _R = sMn(A(M(e9, 1), z, 103, 0, [(or(), Zs), Ao])), KR = sMn(A(M(e9, 1), z, 103, 0, [Yh, Jh])); + } + function jF(n) { + return (J(), cu).Hc(n.j) ? K(Y(k(n, (G(), fv)))) : Gr(A(M(di, 1), q, 8, 0, [n.i.n, n.n, n.a])).b; + } + function Zwe(n) { + var e, t, i, r; + for (i = n.b.a, t = i.a.ec().Kc(); t.Ob(); ) + e = u(t.Pb(), 561), r = new pNn(e, n.e, n.f), W(n.g, r); + } + function Ta(n, e) { + var t, i, r; + i = n.nk(e, null), r = null, e && (r = (Vp(), t = new sd(), t), I3(r, n.r)), i = af(n, r, i), i && i.Fi(); + } + function nge(n, e) { + var t, i; + for (i = Fu(n.d, 1) != 0, t = !0; t; ) + t = !1, t = e.c.Tf(e.e, i), t = t | _7(n, e, i, !1), i = !i; + yV(n); + } + function rQ(n, e) { + var t, i, r; + return i = !1, t = e.q.d, e.d < n.b && (r = SNn(e.q, n.b), e.q.d > r && (JFn(e.q, r), i = t != e.q.d)), i; + } + function MDn(n, e) { + var t, i, r, c, o, f, h, l; + return h = e.i, l = e.j, i = n.f, r = i.i, c = i.j, o = h - r, f = l - c, t = j.Math.sqrt(o * o + f * f), t; + } + function cQ(n, e) { + var t, i; + return i = OT(n), i || (t = (bL(), Yxn(e)), i = new Fmn(t), me(i.Vk(), n)), i; + } + function l7(n, e) { + var t, i; + return t = u(n.c.Bc(e), 14), t ? (i = n.hc(), i.Gc(t), n.d -= t.gc(), t.$b(), n.mc(i)) : n.jc(); + } + function ADn(n, e) { + var t; + for (t = 0; t < e.length; t++) + if (n == (Te(t, e.length), e.charCodeAt(t))) + return !0; + return !1; + } + function SDn(n, e) { + var t; + for (t = 0; t < e.length; t++) + if (n == (Te(t, e.length), e.charCodeAt(t))) + return !0; + return !1; + } + function ege(n) { + var e, t; + if (n == null) + return !1; + for (e = 0, t = n.length; e < t; e++) + if (!xEn(n[e])) + return !1; + return !0; + } + function PDn(n) { + var e; + if (n.c != 0) + return n.c; + for (e = 0; e < n.a.length; e++) + n.c = n.c * 33 + (n.a[e] & -1); + return n.c = n.c * n.e, n.c; + } + function vT(n) { + var e; + return ne(n.a != n.b), e = n.d.a[n.a], cjn(n.b == n.d.c && e != null), n.c = n.a, n.a = n.a + 1 & n.d.a.length - 1, e; + } + function tge(n) { + var e; + if (!(n.c.c < 0 ? n.a >= n.c.b : n.a <= n.c.b)) + throw T(new ic()); + return e = n.a, n.a += n.c.c, ++n.b, Q(e); + } + function ige(n) { + var e; + return e = new uIn(n), O8(n.a, SWn, new Hu(A(M(Rk, 1), rn, 369, 0, [e]))), e.d && W(e.f, e.d), e.f; + } + function EF(n) { + var e; + return e = new Mz(n.a), Pr(e, n), H(e, (G(), rt), n), e.o.a = n.g, e.o.b = n.f, e.n.a = n.i, e.n.b = n.j, e; + } + function rge(n, e, t, i) { + var r, c; + for (c = n.Kc(); c.Ob(); ) + r = u(c.Pb(), 70), r.n.a = e.a + (i.a - r.o.a) / 2, r.n.b = e.b, e.b += r.o.b + t; + } + function cge(n, e, t) { + var i, r; + for (r = e.a.a.ec().Kc(); r.Ob(); ) + if (i = u(r.Pb(), 57), _Tn(n, i, t)) + return !0; + return !1; + } + function uge(n) { + var e, t; + for (t = new E(n.r); t.a < t.c.c.length; ) + if (e = u(y(t), 10), n.n[e.p] <= 0) + return e; + return null; + } + function IDn(n) { + var e, t, i, r; + for (r = new hi(), i = new E(n); i.a < i.c.c.length; ) + t = u(y(i), 33), e = w7e(t), Xi(r, e); + return r; + } + function sge(n) { + var e; + return e = iE(sJn), u(k(n, (G(), Ac)), 21).Hc((fr(), sv)) && Ze(e, (Vi(), Kc), (rr(), kS)), e; + } + function oge(n, e, t) { + var i; + i = new xLn(n, e), Tn(n.r, e.Hf(), i), t && !D5(n.u) && (i.c = new tMn(n.d), Yc(e.wf(), new i5n(i))); + } + function hc(n, e) { + var t; + return Fr(n) && Fr(e) && (t = n - e, !isNaN(t)) ? t : mJ(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e); + } + function fge(n, e) { + return e < n.length && (Te(e, n.length), n.charCodeAt(e) != 63) && (Te(e, n.length), n.charCodeAt(e) != 35); + } + function ODn(n, e, t, i) { + var r, c; + n.a = e, c = i ? 0 : 1, n.f = (r = new Fxn(n.c, n.a, t, c), new lBn(t, n.a, r, n.e, n.b, n.c == (Kd(), _m))); + } + function uQ(n, e, t) { + var i, r; + return r = n.a, n.a = e, n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 1, r, e), t ? t.Ei(i) : t = i), t; + } + function DDn(n, e, t) { + var i, r; + return r = n.b, n.b = e, n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 3, r, e), t ? t.Ei(i) : t = i), t; + } + function $Dn(n, e, t) { + var i, r; + return r = n.f, n.f = e, n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 0, r, e), t ? t.Ei(i) : t = i), t; + } + function pl(n, e) { + var t, i, r, c; + return c = (r = n ? OT(n) : null, rLn((i = e, r && r.Xk(), i))), c == e && (t = OT(n), t && t.Xk()), c; + } + function sQ(n, e) { + var t, i, r; + for (r = 1, t = n, i = e >= 0 ? e : -e; i > 0; ) + i % 2 == 0 ? (t *= t, i = i / 2 | 0) : (r *= t, i -= 1); + return e < 0 ? 1 / r : r; + } + function hge(n, e) { + var t, i, r; + for (r = 1, t = n, i = e >= 0 ? e : -e; i > 0; ) + i % 2 == 0 ? (t *= t, i = i / 2 | 0) : (r *= t, i -= 1); + return e < 0 ? 1 / r : r; + } + function FDn(n) { + var e, t; + if (n != null) + for (t = 0; t < n.length; ++t) + e = n[t], e && (u(e.g, 367), e.i); + } + function lge(n) { + var e, t, i; + for (i = 0, t = new E(n.a); t.a < t.c.c.length; ) + e = u(y(t), 187), i = j.Math.max(i, e.g); + return i; + } + function age(n) { + var e, t, i; + for (i = new E(n.b); i.a < i.c.c.length; ) + t = u(y(i), 214), e = t.c.Rf() ? t.f : t.a, e && Oje(e, t.j); + } + function _h() { + _h = N, HP = new DO("INHERIT", 0), x1 = new DO("INCLUDE_CHILDREN", 1), i9 = new DO("SEPARATE_CHILDREN", 2); + } + function oQ(n, e) { + switch (e) { + case 1: + !n.n && (n.n = new V(Rr, n, 1, 7)), de(n.n); + return; + case 2: + Q5(n, null); + return; + } + LV(n, e); + } + function mT(n) { + var e; + switch (n.gc()) { + case 0: + return sR; + case 1: + return new pD(pe(n.Xb(0))); + default: + return e = n, new JD(e); + } + } + function xDn(n) { + switch (Df(), n.gc()) { + case 0: + return _D(), lin; + case 1: + return new u2(n.Kc().Pb()); + default: + return new NG(n); + } + } + function w1(n) { + switch (Df(), n.c) { + case 0: + return _D(), lin; + case 1: + return new u2(dLn(new o2(n))); + default: + return new F9n(n); + } + } + function db(n, e) { + pe(n); + try { + return n.xc(e); + } catch (t) { + if (t = Et(t), I(t, 205) || I(t, 173)) + return null; + throw T(t); + } + } + function dge(n, e) { + pe(n); + try { + return n.Bc(e); + } catch (t) { + if (t = Et(t), I(t, 205) || I(t, 173)) + return null; + throw T(t); + } + } + function fQ(n, e) { + pe(n); + try { + return n.Hc(e); + } catch (t) { + if (t = Et(t), I(t, 205) || I(t, 173)) + return !1; + throw T(t); + } + } + function bge(n, e) { + pe(n); + try { + return n.Mc(e); + } catch (t) { + if (t = Et(t), I(t, 205) || I(t, 173)) + return !1; + throw T(t); + } + } + function LDn(n, e) { + pe(n); + try { + return n._b(e); + } catch (t) { + if (t = Et(t), I(t, 205) || I(t, 173)) + return !1; + throw T(t); + } + } + function NDn(n, e) { + var t; + n.a.c.length > 0 && (t = u(un(n.a, n.a.c.length - 1), 570), QV(t, e)) || W(n.a, new dSn(e)); + } + function wge(n) { + wo(); + var e, t; + e = n.d.c - n.e.c, t = u(n.g, 145), Yc(t.b, new _5n(e)), Yc(t.c, new K5n(e)), $i(t.i, new H5n(e)); + } + function BDn(n) { + var e; + return e = new V1(), e.a += "VerticalSegment ", rc(e, n.e), e.a += " ", De(e, Lz(new YI(), new E(n.k))), e.a; + } + function gge(n) { + var e; + return e = u(Ld(n.c.c, ""), 229), e || (e = new M2(Xp(Wp(new Zg(), ""), "Other")), Sa(n.c.c, "", e)), e; + } + function r6(n) { + var e; + return n.Db & 64 ? yo(n) : (e = new Bs(yo(n)), e.a += " (name: ", br(e, n.zb), e.a += ")", e.a); + } + function hQ(n, e, t) { + var i, r; + return r = n.sb, n.sb = e, n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 4, r, e), t ? t.Ei(i) : t = i), t; + } + function CF(n, e) { + var t, i, r; + for (t = 0, r = zr(n, e).Kc(); r.Ob(); ) + i = u(r.Pb(), 11), t += k(i, (G(), Mu)) != null ? 1 : 0; + return t; + } + function Kw(n, e, t) { + var i, r, c; + for (i = 0, c = _e(n, 0); c.b != c.d.c && (r = K(Y(Re(c))), !(r > t)); ) + r >= e && ++i; + return i; + } + function pge(n, e, t) { + var i, r; + return i = new Lh(n.e, 3, 13, null, (r = e.c, r || (Sn(), Cf)), m1(n, e), !1), t ? t.Ei(i) : t = i, t; + } + function vge(n, e, t) { + var i, r; + return i = new Lh(n.e, 4, 13, (r = e.c, r || (Sn(), Cf)), null, m1(n, e), !1), t ? t.Ei(i) : t = i, t; + } + function lQ(n, e, t) { + var i, r; + return r = n.r, n.r = e, n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 8, r, n.r), t ? t.Ei(i) : t = i), t; + } + function g1(n, e) { + var t, i; + return t = u(e, 676), i = t.vk(), !i && t.wk(i = I(e, 88) ? new Fkn(n, u(e, 26)) : new eAn(n, u(e, 148))), i; + } + function a7(n, e, t) { + var i; + n.qi(n.i + 1), i = n.oi(e, t), e != n.i && pc(n.g, e, n.g, e + 1, n.i - e), St(n.g, e, i), ++n.i, n.bi(e, t), n.ci(); + } + function mge(n, e) { + var t; + return e.a && (t = e.a.a.length, n.a ? De(n.a, n.b) : n.a = new Yu(n.d), iAn(n.a, e.a, e.d.length, t)), n; + } + function kge(n, e) { + var t, i, r, c; + if (e.vi(n.a), c = u(Rn(n.a, 8), 1936), c != null) + for (t = c, i = 0, r = t.length; i < r; ++i) + null.jm(); + } + function d7(n, e) { + var t; + return t = new bI(), n.a.sd(t) ? (r3(), new dj(_n(FPn(n, t.a, e)))) : (fl(n), r3(), r3(), UA); + } + function c6(n, e) { + switch (e.g) { + case 2: + case 1: + return zr(n, e); + case 3: + case 4: + return ma(zr(n, e)); + } + return Pn(), Pn(), cr; + } + function tt(n, e) { + return yi(n) ? An(n, e) : z0(n) ? Zjn(n, e) : G0(n) ? (_n(n), B(n) === B(e)) : bW(n) ? n.Fb(e) : fW(n) ? nyn(n, e) : uX(n, e); + } + function yge(n) { + return n ? n.i & 1 ? n == _u ? oi : n == be ? Ui : n == bw ? z4 : n == Ci ? Si : n == Yl ? d0 : n == Wg ? b0 : n == ku ? op : bm : n : null; + } + function jge(n, e, t, i, r) { + e == 0 || i == 0 || (e == 1 ? r[i] = YQ(r, t, i, n[0]) : i == 1 ? r[e] = YQ(r, n, e, t[0]) : Cme(n, t, r, e, i)); + } + function RDn(n, e) { + var t; + n.c.length != 0 && (t = u(lf(n, F(vh, C1, 10, n.c.length, 0, 1)), 193), vz(t, new Idn()), MLn(t, e)); + } + function _Dn(n, e) { + var t; + n.c.length != 0 && (t = u(lf(n, F(vh, C1, 10, n.c.length, 0, 1)), 193), vz(t, new Odn()), MLn(t, e)); + } + function aQ(n, e, t, i) { + switch (e) { + case 1: + return !n.n && (n.n = new V(Rr, n, 1, 7)), n.n; + case 2: + return n.k; + } + return oJ(n, e, t, i); + } + function or() { + or = N, mh = new n8(K6, 0), Ao = new n8(Z2, 1), Zs = new n8(Y2, 2), Jh = new n8(hN, 3), Yh = new n8("UP", 4); + } + function Gd() { + Gd = N, yg = new lO(Xh, 0), Grn = new lO("INSIDE_PORT_SIDE_GROUPS", 1), qR = new lO("FORCE_MODEL_ORDER", 2); + } + function KDn(n, e, t) { + if (n < 0 || e > t) + throw T(new mr(xM + n + rnn + e + ", size: " + t)); + if (n > e) + throw T(new Hn(xM + n + aKn + e)); + } + function As(n, e, t) { + if (e < 0) + bY(n, t); + else { + if (!t.Ij()) + throw T(new Hn(Pl + t.ne() + em)); + u(t, 66).Nj().Vj(n, n.yh(), e); + } + } + function Ege(n, e, t, i, r, c, o, f) { + var h; + for (h = t; c < o; ) + h >= i || e < t && f.ue(n[e], n[h]) <= 0 ? St(r, c++, n[e++]) : St(r, c++, n[h++]); + } + function HDn(n, e, t, i, r, c) { + this.e = new X(), this.f = (sr(), Bm), W(this.e, n), this.d = e, this.a = t, this.b = i, this.f = r, this.c = c; + } + function qDn(n, e) { + var t, i; + for (i = new ie(n); i.e != i.i.gc(); ) + if (t = u(oe(i), 26), B(e) === B(t)) + return !0; + return !1; + } + function Cge(n) { + SM(); + var e, t, i, r; + for (t = qF(), i = 0, r = t.length; i < r; ++i) + if (e = t[i], xr(e.a, n, 0) != -1) + return e; + return TR; + } + function GDn(n) { + return n >= 65 && n <= 70 ? n - 65 + 10 : n >= 97 && n <= 102 ? n - 97 + 10 : n >= 48 && n <= 57 ? n - 48 : 0; + } + function zDn(n) { + var e; + return n.Db & 64 ? yo(n) : (e = new Bs(yo(n)), e.a += " (source: ", br(e, n.d), e.a += ")", e.a); + } + function Tge(n, e, t) { + var i, r; + return r = n.a, n.a = e, n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 5, r, n.a), t ? FJ(t, i) : t = i), t; + } + function p1(n, e) { + var t; + t = (n.Bb & 256) != 0, e ? n.Bb |= 256 : n.Bb &= -257, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 2, t, e)); + } + function dQ(n, e) { + var t; + t = (n.Bb & 256) != 0, e ? n.Bb |= 256 : n.Bb &= -257, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 8, t, e)); + } + function kT(n, e) { + var t; + t = (n.Bb & 256) != 0, e ? n.Bb |= 256 : n.Bb &= -257, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 8, t, e)); + } + function v1(n, e) { + var t; + t = (n.Bb & 512) != 0, e ? n.Bb |= 512 : n.Bb &= -513, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 3, t, e)); + } + function bQ(n, e) { + var t; + t = (n.Bb & 512) != 0, e ? n.Bb |= 512 : n.Bb &= -513, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 9, t, e)); + } + function u6(n, e) { + var t; + return n.b == -1 && n.a && (t = n.a.Gj(), n.b = t ? n.c.Xg(n.a.aj(), t) : jt(n.c.Tg(), n.a)), n.c.Og(n.b, e); + } + function Q(n) { + var e, t; + return n > -129 && n < 128 ? (e = n + 128, t = (qEn(), jin)[e], !t && (t = jin[e] = new gq(n)), t) : new gq(n); + } + function Q3(n) { + var e, t; + return n > -129 && n < 128 ? (e = n + 128, t = (VEn(), Min)[e], !t && (t = Min[e] = new vq(n)), t) : new vq(n); + } + function wQ(n) { + var e, t; + return e = n.k, e == (Qn(), Xt) ? (t = u(k(n, (G(), ec)), 61), t == (J(), Kn) || t == ae) : !1; + } + function Mge(n, e, t) { + var i, r, c; + return c = (r = d4(n.b, e), r), c && (i = u(jM(G8(n, c), ""), 26), i) ? xY(n, i, e, t) : null; + } + function TF(n, e, t) { + var i, r, c; + return c = (r = d4(n.b, e), r), c && (i = u(jM(G8(n, c), ""), 26), i) ? LY(n, i, e, t) : null; + } + function UDn(n, e) { + var t, i; + for (i = new ie(n); i.e != i.i.gc(); ) + if (t = u(oe(i), 138), B(e) === B(t)) + return !0; + return !1; + } + function s6(n, e, t) { + var i; + if (i = n.gc(), e > i) + throw T(new Q0(e, i)); + if (n.hi() && n.Hc(t)) + throw T(new Hn(yk)); + n.Xh(e, t); + } + function Age(n, e) { + var t; + if (t = xw(n.i, e), t == null) + throw T(new Af("Node did not exist in input.")); + return MV(e, t), null; + } + function Sge(n, e) { + var t; + if (t = R7(n, e), I(t, 322)) + return u(t, 34); + throw T(new Hn(Pl + e + "' is not a valid attribute")); + } + function Pge(n, e, t) { + var i, r; + for (r = I(e, 99) && u(e, 18).Bb & Ji ? new LO(e, n) : new K3(e, n), i = 0; i < t; ++i) + RT(r); + return r; + } + function Ige(n) { + var e, t, i; + for (i = 0, t = n.length, e = 0; e < t; e++) + n[e] == 32 || n[e] == 13 || n[e] == 10 || n[e] == 9 || (n[i++] = n[e]); + return i; + } + function Oge(n) { + var e, t, i; + for (e = new X(), i = new E(n.b); i.a < i.c.c.length; ) + t = u(y(i), 594), Zt(e, u(t.jf(), 14)); + return e; + } + function Dge(n) { + var e, t, i; + for (e = u(k(n, (cc(), gon)), 15), i = e.Kc(); i.Ob(); ) + t = u(i.Pb(), 188), Ke(t.b.d, t), Ke(t.c.b, t); + } + function $ge(n) { + switch (u(k(n, (G(), Ua)), 303).g) { + case 1: + H(n, Ua, (Nh(), dp)); + break; + case 2: + H(n, Ua, (Nh(), Ag)); + } + } + function Fge(n) { + var e; + n.g && (e = n.c.Rf() ? n.f : n.a, VY(e.a, n.o, !0), VY(e.a, n.o, !1), H(n.o, (nn(), Bt), (Ai(), id))); + } + function xge(n) { + var e; + if (!n.a) + throw T(new $r("Cannot offset an unassigned cut.")); + e = n.c - n.b, n.b += e, BTn(n, e), NTn(n, e); + } + function Lge(n) { + var e; + return e = n.a[n.c - 1 & n.a.length - 1], e == null ? null : (n.c = n.c - 1 & n.a.length - 1, St(n.a, n.c, null), e); + } + function WDn(n) { + var e, t; + for (t = n.p.a.ec().Kc(); t.Ob(); ) + if (e = u(t.Pb(), 213), e.f && n.b[e.c] < -1e-10) + return e; + return null; + } + function gQ(n, e) { + switch (n.b.g) { + case 0: + case 1: + return e; + case 2: + case 3: + return new ys(e.d, 0, e.a, e.b); + default: + return null; + } + } + function XDn(n) { + switch (n.g) { + case 2: + return Ao; + case 1: + return Zs; + case 4: + return Jh; + case 3: + return Yh; + default: + return mh; + } + } + function pQ(n) { + switch (n.g) { + case 1: + return Gn; + case 2: + return Kn; + case 3: + return Vn; + case 4: + return ae; + default: + return Xr; + } + } + function b7(n) { + switch (n.g) { + case 1: + return ae; + case 2: + return Gn; + case 3: + return Kn; + case 4: + return Vn; + default: + return Xr; + } + } + function yT(n) { + switch (n.g) { + case 1: + return Vn; + case 2: + return ae; + case 3: + return Gn; + case 4: + return Kn; + default: + return Xr; + } + } + function Nge(n) { + switch (n) { + case 0: + return new d9n(); + case 1: + return new l9n(); + case 2: + return new a9n(); + default: + throw T(new F9()); + } + } + function ni(n, e) { + return n < e ? -1 : n > e ? 1 : n == e ? n == 0 ? ni(1 / n, 1 / e) : 0 : isNaN(n) ? isNaN(e) ? 0 : 1 : -1; + } + function Bge(n, e) { + le(e, "Sort end labels", 1), _t(pt(qr(new $n(null, new xn(n.b, 16)), new bdn()), new wdn()), new gdn()), ce(e); + } + function o6(n, e, t) { + var i, r; + return n.ej() ? (r = n.fj(), i = Dx(n, e, t), n.$i(n.Zi(7, Q(t), i, e, r)), i) : Dx(n, e, t); + } + function MF(n, e) { + var t, i, r; + n.d == null ? (++n.e, --n.f) : (r = e.cd(), t = e.Sh(), i = (t & nt) % n.d.length, yde(n, i, hNn(n, i, t, r))); + } + function J3(n, e) { + var t; + t = (n.Bb & Eo) != 0, e ? n.Bb |= Eo : n.Bb &= -1025, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 10, t, e)); + } + function Y3(n, e) { + var t; + t = (n.Bb & Ob) != 0, e ? n.Bb |= Ob : n.Bb &= -4097, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 12, t, e)); + } + function Z3(n, e) { + var t; + t = (n.Bb & vu) != 0, e ? n.Bb |= vu : n.Bb &= -8193, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 15, t, e)); + } + function n4(n, e) { + var t; + t = (n.Bb & Rb) != 0, e ? n.Bb |= Rb : n.Bb &= -2049, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 11, t, e)); + } + function Rge(n, e) { + var t; + return t = ni(n.b.c, e.b.c), t != 0 || (t = ni(n.a.a, e.a.a), t != 0) ? t : ni(n.a.b, e.a.b); + } + function _ge(n, e) { + var t; + if (t = te(n.k, e), t == null) + throw T(new Af("Port did not exist in input.")); + return MV(e, t), null; + } + function Kge(n) { + var e, t; + for (t = wNn(is(n)).Kc(); t.Ob(); ) + if (e = Ce(t.Pb()), A6(n, e)) + return Vae((C7n(), zne), e); + return null; + } + function Hge(n, e) { + var t, i, r, c, o; + for (o = _c(n.e.Tg(), e), c = 0, t = u(n.g, 119), r = 0; r < n.i; ++r) + i = t[r], o.rl(i.ak()) && ++c; + return c; + } + function qge(n, e, t) { + var i, r; + return i = u(e.We(n.a), 35), r = u(t.We(n.a), 35), i != null && r != null ? Y8(i, r) : i != null ? -1 : r != null ? 1 : 0; + } + function VDn(n, e, t) { + var i, r; + if (n.c) + zJ(n.c, e, t); + else + for (r = new E(n.b); r.a < r.c.c.length; ) + i = u(y(r), 157), VDn(i, e, t); + } + function AF(n, e) { + var t, i; + for (i = new E(e); i.a < i.c.c.length; ) + t = u(y(i), 46), Qc(n.b.b, t.b), k1e(u(t.a, 189), u(t.b, 81)); + } + function Gge(n) { + var e, t; + for (t = sl(new V1(), 91), e = !0; n.Ob(); ) + e || (t.a += Qi), e = !1, rc(t, n.Pb()); + return (t.a += "]", t).a; + } + function e4(n, e) { + var t; + t = (n.Bb & Nf) != 0, e ? n.Bb |= Nf : n.Bb &= -16385, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 16, t, e)); + } + function SF(n, e) { + var t; + t = (n.Bb & uc) != 0, e ? n.Bb |= uc : n.Bb &= -32769, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 18, t, e)); + } + function vQ(n, e) { + var t; + t = (n.Bb & uc) != 0, e ? n.Bb |= uc : n.Bb &= -32769, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 18, t, e)); + } + function mQ(n, e) { + var t; + t = (n.Bb & Ji) != 0, e ? n.Bb |= Ji : n.Bb &= -65537, n.Db & 4 && !(n.Db & 1) && et(n, new vo(n, 1, 20, t, e)); + } + function kQ(n) { + var e; + return e = F(Ls, Bf, 25, 2, 15, 1), n -= Ji, e[0] = (n >> 10) + rk & Ut, e[1] = (n & 1023) + 56320 & Ut, Hs(e, 0, e.length); + } + function jT(n) { + var e, t; + return t = u(k(n, (nn(), as)), 103), t == (or(), mh) ? (e = K(Y(k(n, zS))), e >= 1 ? Ao : Jh) : t; + } + function zge(n) { + switch (u(k(n, (nn(), Qh)), 218).g) { + case 1: + return new ewn(); + case 3: + return new uwn(); + default: + return new nwn(); + } + } + function Ma(n) { + if (n.c) + Ma(n.c); + else if (n.d) + throw T(new $r("Stream already terminated, can't be modified or used")); + } + function PF(n) { + var e; + return n.Db & 64 ? yo(n) : (e = new Bs(yo(n)), e.a += " (identifier: ", br(e, n.k), e.a += ")", e.a); + } + function QDn(n, e, t) { + var i, r; + return i = (dd(), r = new Xy(), r), UC(i, e), WC(i, t), n && me((!n.a && (n.a = new Yt(io, n, 5)), n.a), i), i; + } + function IF(n, e, t, i) { + var r, c; + return _n(i), _n(t), r = n.xc(e), c = r == null ? t : l7n(u(r, 15), u(t, 14)), c == null ? n.Bc(e) : n.zc(e, c), c; + } + function Cn(n) { + var e, t, i, r; + return t = (e = u(xo((i = n.gm, r = i.f, r == Ie ? i : r)), 9), new ks(e, u(bo(e, e.length), 9), 0)), ko(t, n), t; + } + function Uge(n, e, t) { + var i, r; + for (r = n.a.ec().Kc(); r.Ob(); ) + if (i = u(r.Pb(), 10), t7(t, u(un(e, i.p), 14))) + return i; + return null; + } + function Wge(n, e, t) { + var i; + try { + Awe(n, e, t); + } catch (r) { + throw r = Et(r), I(r, 597) ? (i = r, T(new EX(i))) : T(r); + } + return e; + } + function vl(n, e) { + var t; + return Fr(n) && Fr(e) && (t = n - e, ik < t && t < Fa) ? t : bl(xOn(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e)); + } + function Hi(n, e) { + var t; + return Fr(n) && Fr(e) && (t = n + e, ik < t && t < Fa) ? t : bl(fwe(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e)); + } + function Ni(n, e) { + var t; + return Fr(n) && Fr(e) && (t = n * e, ik < t && t < Fa) ? t : bl(Ije(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e)); + } + function zr(n, e) { + var t; + return n.i || dY(n), t = u(wr(n.g, e), 46), t ? new ch(n.j, u(t.a, 19).a, u(t.b, 19).a) : (Pn(), Pn(), cr); + } + function zd(n, e, t) { + var i; + return i = n.a.get(e), n.a.set(e, t === void 0 ? null : t), i === void 0 ? (++n.c, cC(n.b)) : ++n.d, i; + } + function Xge(n, e, t) { + n.n = fa(Yl, [q, QL], [364, 25], 14, [t, Gt(j.Math.ceil(e / 32))], 2), n.o = e, n.p = t, n.j = e - 1 >> 1, n.k = t - 1 >> 1; + } + function OF() { + _J(); + var n, e, t; + t = qTe++ + Date.now(), n = Gt(j.Math.floor(t * uk)) & FM, e = Gt(t - n * enn), this.a = n ^ 1502, this.b = e ^ tN; + } + function Kh(n) { + var e, t, i; + for (e = new X(), i = new E(n.j); i.a < i.c.c.length; ) + t = u(y(i), 11), W(e, t.b); + return pe(e), new p5(e); + } + function Lr(n) { + var e, t, i; + for (e = new X(), i = new E(n.j); i.a < i.c.c.length; ) + t = u(y(i), 11), W(e, t.e); + return pe(e), new p5(e); + } + function ei(n) { + var e, t, i; + for (e = new X(), i = new E(n.j); i.a < i.c.c.length; ) + t = u(y(i), 11), W(e, t.g); + return pe(e), new p5(e); + } + function Vge(n) { + var e, t; + for (t = Ume(is(tb(n))).Kc(); t.Ob(); ) + if (e = Ce(t.Pb()), A6(n, e)) + return Qae((T7n(), Une), e); + return null; + } + function Qge(n) { + var e, t, i; + for (t = 0, i = n.length; t < i; t++) + if (n[t] == null) + throw T(new c2("at index " + t)); + return e = n, new Hu(e); + } + function Jge(n, e) { + var t; + if (t = R7(n.Tg(), e), I(t, 99)) + return u(t, 18); + throw T(new Hn(Pl + e + "' is not a valid reference")); + } + function Yge(n) { + var e; + return e = yb(n), e > 34028234663852886e22 ? Lt : e < -34028234663852886e22 ? Vt : e; + } + function JDn(n) { + return n -= n >> 1 & 1431655765, n = (n >> 2 & 858993459) + (n & 858993459), n = (n >> 4) + n & 252645135, n += n >> 8, n += n >> 16, n & 63; + } + function YDn(n) { + var e, t, i, r; + for (e = new Djn(n.Hd().gc()), r = 0, i = $2(n.Hd().Kc()); i.Ob(); ) + t = i.Pb(), ole(e, t, Q(r++)); + return $5e(e.a); + } + function Zge(n, e) { + var t, i, r; + for (r = new we(), i = e.vc().Kc(); i.Ob(); ) + t = u(i.Pb(), 42), it(r, t.cd(), Gbe(n, u(t.dd(), 15))); + return r; + } + function yQ(n, e) { + n.n.c.length == 0 && W(n.n, new lC(n.s, n.t, n.i)), W(n.b, e), iJ(u(un(n.n, n.n.c.length - 1), 211), e), oRn(n, e); + } + function Hw(n) { + return (n.c != n.b.b || n.i != n.g.b) && (n.a.c = F(Zn, rn, 1, 0, 5, 1), Zt(n.a, n.b), Zt(n.a, n.g), n.c = n.b.b, n.i = n.g.b), n.a; + } + function DF(n, e) { + var t, i, r; + for (r = 0, i = u(e.Kb(n), 20).Kc(); i.Ob(); ) + t = u(i.Pb(), 17), on(sn(k(t, (G(), mf)))) || ++r; + return r; + } + function n2e(n, e) { + var t, i, r; + i = $w(e), r = K(Y(wb(i, (nn(), Mo)))), t = j.Math.max(0, r / 2 - 0.5), g6(e, t, 1), W(n, new G7n(e, t)); + } + function Ss() { + Ss = N, Qk = new Q9(Xh, 0), Sm = new Q9("FIRST", 1), xl = new Q9(uHn, 2), Pm = new Q9("LAST", 3), Wb = new Q9(sHn, 4); + } + function Hh() { + Hh = N, rH = new Wj(K6, 0), yy = new Wj("POLYLINE", 1), Ev = new Wj("ORTHOGONAL", 2), Sp = new Wj("SPLINES", 3); + } + function ET() { + ET = N, Jon = new PO("ASPECT_RATIO_DRIVEN", 0), IK = new PO("MAX_SCALE_DRIVEN", 1), Qon = new PO("AREA_DRIVEN", 2); + } + function w7() { + w7 = N, AP = new IO("P1_STRUCTURE", 0), SP = new IO("P2_PROCESSING_ORDER", 1), PP = new IO("P3_EXECUTION", 2); + } + function CT() { + CT = N, CK = new MO("OVERLAP_REMOVAL", 0), jK = new MO("COMPACTION", 1), EK = new MO("GRAPH_SIZE_CALCULATION", 2); + } + function Ud(n, e) { + return Yo(), mo(Cl), j.Math.abs(n - e) <= Cl || n == e || isNaN(n) && isNaN(e) ? 0 : n < e ? -1 : n > e ? 1 : vd(isNaN(n), isNaN(e)); + } + function ZDn(n, e) { + var t, i; + for (t = _e(n, 0); t.b != t.d.c; ) { + if (i = x9(Y(Re(t))), i == e) + return; + if (i > e) { + a$(t); + break; + } + } + y8(t, e); + } + function En(n, e) { + var t, i, r, c, o; + if (t = e.f, Sa(n.c.d, t, e), e.g != null) + for (r = e.g, c = 0, o = r.length; c < o; ++c) + i = r[c], Sa(n.c.e, i, e); + } + function e2e(n, e, t, i) { + var r, c, o; + for (r = e + 1; r < t; ++r) + for (c = r; c > e && i.ue(n[c - 1], n[c]) > 0; --c) + o = n[c], St(n, c, n[c - 1]), St(n, c - 1, o); + } + function Ps(n, e, t, i) { + if (e < 0) + _Y(n, t, i); + else { + if (!t.Ij()) + throw T(new Hn(Pl + t.ne() + em)); + u(t, 66).Nj().Tj(n, n.yh(), e, i); + } + } + function TT(n, e) { + if (e == n.d) + return n.e; + if (e == n.e) + return n.d; + throw T(new Hn("Node " + e + " not part of edge " + n)); + } + function t2e(n, e) { + switch (e.g) { + case 2: + return n.b; + case 1: + return n.c; + case 4: + return n.d; + case 3: + return n.a; + default: + return !1; + } + } + function n$n(n, e) { + switch (e.g) { + case 2: + return n.b; + case 1: + return n.c; + case 4: + return n.d; + case 3: + return n.a; + default: + return !1; + } + } + function jQ(n, e, t, i) { + switch (e) { + case 3: + return n.f; + case 4: + return n.g; + case 5: + return n.i; + case 6: + return n.j; + } + return aQ(n, e, t, i); + } + function i2e(n) { + return n.k != (Qn(), ii) ? !1 : E3(new $n(null, new Td(new re(ue(ei(n).a.Kc(), new Mn())))), new Hbn()); + } + function r2e(n) { + return n.e == null ? n : (!n.c && (n.c = new zx((n.f & 256) != 0, n.i, n.a, n.d, (n.f & 16) != 0, n.j, n.g, null)), n.c); + } + function c2e(n, e) { + return n.h == tk && n.m == 0 && n.l == 0 ? (e && (Il = Nc(0, 0, 0)), eyn((P3(), gin))) : (e && (Il = Nc(n.l, n.m, n.h)), Nc(0, 0, 0)); + } + function Nr(n) { + var e; + return Array.isArray(n) && n.im === Xg ? J1(Du(n)) + "@" + (e = kt(n) >>> 0, e.toString(16)) : n.toString(); + } + function f6(n) { + var e; + this.a = (e = u(n.e && n.e(), 9), new ks(e, u(bo(e, e.length), 9), 0)), this.b = F(Zn, rn, 1, this.a.a.length, 5, 1); + } + function u2e(n) { + var e, t, i; + for (this.a = new Sh(), i = new E(n); i.a < i.c.c.length; ) + t = u(y(i), 14), e = new uCn(), wbe(e, t), ci(this.a, e); + } + function s2e(n) { + X0(); + var e, t, i, r; + for (e = n.o.b, i = u(u(ct(n.r, (J(), ae)), 21), 84).Kc(); i.Ob(); ) + t = u(i.Pb(), 111), r = t.e, r.b += e; + } + function $u(n) { + var e; + if (n.b) { + if ($u(n.b), n.b.d != n.c) + throw T(new vs()); + } else + n.d.dc() && (e = u(n.f.c.xc(n.e), 14), e && (n.d = e)); + } + function o2e(n) { + var e; + return n == null ? !0 : (e = n.length, e > 0 && (Te(e - 1, n.length), n.charCodeAt(e - 1) == 58) && !$F(n, a9, d9)); + } + function $F(n, e, t) { + var i, r; + for (i = 0, r = n.length; i < r; i++) + if (uF((Te(i, n.length), n.charCodeAt(i)), e, t)) + return !0; + return !1; + } + function f2e(n, e) { + var t, i; + for (i = n.e.a.ec().Kc(); i.Ob(); ) + if (t = u(i.Pb(), 266), d5e(e, t.d) || k6e(e, t.d)) + return !0; + return !1; + } + function h2e(n, e) { + var t, i, r; + for (i = V7e(n, e), r = i[i.length - 1] / 2, t = 0; t < i.length; t++) + if (i[t] >= r) + return e.c + t; + return e.c + e.b.gc(); + } + function l2e(n, e) { + s3(); + var t, i, r, c; + for (i = bPn(n), r = e, A3(i, 0, i.length, r), t = 0; t < i.length; t++) + c = W3e(n, i[t], t), t != c && o6(n, t, c); + } + function EQ(n, e) { + var t, i, r, c, o, f; + for (i = 0, t = 0, c = e, o = 0, f = c.length; o < f; ++o) + r = c[o], r > 0 && (i += r, ++t); + return t > 1 && (i += n.d * (t - 1)), i; + } + function CQ(n) { + var e, t, i; + for (i = new r1(), i.a += "[", e = 0, t = n.gc(); e < t; ) + br(i, y5(n.ki(e))), ++e < t && (i.a += Qi); + return i.a += "]", i.a; + } + function a2e(n) { + var e, t, i, r, c; + return c = KJ(n), t = N9(n.c), i = !t, i && (r = new ea(), Ro(c, "knownLayouters", r), e = new mmn(r), $i(n.c, e)), c; + } + function d2e(n, e) { + var t, i, r; + for (_n(e), t = !1, i = new E(n); i.a < i.c.c.length; ) + r = y(i), bb(e, r, !1) && (F5(i), t = !0); + return t; + } + function TQ(n) { + var e, t, i; + for (i = K(Y(n.a.We((Xe(), KP)))), t = new E(n.a.xf()); t.a < t.c.c.length; ) + e = u(y(t), 680), T_n(n, e, i); + } + function FF(n, e) { + var t, i; + for (i = new E(e); i.a < i.c.c.length; ) + t = u(y(i), 46), W(n.b.b, u(t.b, 81)), d$(u(t.a, 189), u(t.b, 81)); + } + function b2e(n, e, t) { + var i, r; + for (r = n.a.b, i = r.c.length; i < t; i++) + J0(r, 0, new Rs(n.a)); + jr(e, u(un(r, r.c.length - t), 29)), n.b[e.p] = t; + } + function w2e(n, e, t) { + var i; + i = t, !i && (i = YU(new Gp(), 0)), le(i, qKn, 2), eFn(n.b, e, yc(i, 1)), Qje(n, e, yc(i, 1)), HCe(e, yc(i, 1)), ce(i); + } + function g2e(n, e, t, i, r) { + ns(), jo(lo(ho(fo(ao(new Ns(), 0), r.d.e - n), e), r.d)), jo(lo(ho(fo(ao(new Ns(), 0), t - r.a.e), r.a), i)); + } + function MQ(n, e, t, i, r, c) { + this.a = n, this.c = e, this.b = t, this.f = i, this.d = r, this.e = c, this.c > 0 && this.b > 0 && cW(this.c, this.b, this.a); + } + function AQ(n) { + xF(), this.c = cf(A(M(sMe, 1), rn, 831, 0, [LQn])), this.b = new we(), this.a = n, it(this.b, uP, 1), Yc(NQn, new q6n(this)); + } + function e$n(n, e) { + var t; + return n.d ? Uu(n.b, e) ? u(te(n.b, e), 51) : (t = e.Kf(), it(n.b, e, t), t) : e.Kf(); + } + function SQ(n, e) { + var t; + return B(n) === B(e) ? !0 : I(e, 91) ? (t = u(e, 91), n.e == t.e && n.d == t.d && Jae(n, t.a)) : !1; + } + function B2(n) { + switch (J(), n.g) { + case 4: + return Kn; + case 1: + return Vn; + case 3: + return ae; + case 2: + return Gn; + default: + return Xr; + } + } + function PQ(n, e) { + switch (e) { + case 3: + return n.f != 0; + case 4: + return n.g != 0; + case 5: + return n.i != 0; + case 6: + return n.j != 0; + } + return SV(n, e); + } + function p2e(n) { + switch (n.g) { + case 0: + return new Lgn(); + case 1: + return new Ngn(); + default: + throw T(new Hn(lB + (n.f != null ? n.f : "" + n.g))); + } + } + function t$n(n) { + switch (n.g) { + case 0: + return new xgn(); + case 1: + return new Bgn(); + default: + throw T(new Hn(AN + (n.f != null ? n.f : "" + n.g))); + } + } + function i$n(n) { + switch (n.g) { + case 0: + return new sG(); + case 1: + return new b9n(); + default: + throw T(new Hn(bA + (n.f != null ? n.f : "" + n.g))); + } + } + function v2e(n) { + switch (n.g) { + case 1: + return new Pgn(); + case 2: + return new kjn(); + default: + throw T(new Hn(lB + (n.f != null ? n.f : "" + n.g))); + } + } + function m2e(n) { + var e, t; + if (n.b) + return n.b; + for (t = pf ? null : n.d; t; ) { + if (e = pf ? null : t.b, e) + return e; + t = pf ? null : t.d; + } + return n3(), Uin; + } + function k2e(n) { + var e, t, i; + return n.e == 0 ? 0 : (e = n.d << 5, t = n.a[n.d - 1], n.e < 0 && (i = dOn(n), i == n.d - 1 && (--t, t = t | 0)), e -= x7(t), e); + } + function y2e(n) { + var e, t, i; + return n < GA.length ? GA[n] : (t = n >> 5, e = n & 31, i = F(be, Le, 25, t + 1, 15, 1), i[t] = 1 << e, new Pw(1, t + 1, i)); + } + function r$n(n) { + var e, t, i; + return t = n.zg(), t ? (e = n.Ug(), I(e, 160) && (i = r$n(u(e, 160)), i != null) ? i + "." + t : t) : null; + } + function bb(n, e, t) { + var i, r; + for (r = n.Kc(); r.Ob(); ) + if (i = r.Pb(), B(e) === B(i) || e != null && tt(e, i)) + return t && r.Qb(), !0; + return !1; + } + function IQ(n, e, t) { + var i, r; + if (++n.j, t.dc()) + return !1; + for (r = t.Kc(); r.Ob(); ) + i = r.Pb(), n.Hi(e, n.oi(e, i)), ++e; + return !0; + } + function j2e(n, e, t, i) { + var r, c; + if (c = t - e, c < 3) + for (; c < 3; ) + n *= 10, ++c; + else { + for (r = 1; c > 3; ) + r *= 10, --c; + n = (n + (r >> 1)) / r | 0; + } + return i.i = n, !0; + } + function E2e(n) { + return yF(), qn(), !!(n$n(u(n.a, 81).j, u(n.b, 103)) || u(n.a, 81).d.e != 0 && n$n(u(n.a, 81).j, u(n.b, 103))); + } + function C2e(n) { + DC(), u(n.We((Xe(), _l)), 174).Hc((xu(), UP)) && (u(n.We(cw), 174).Fc((Tu(), Pp)), u(n.We(_l), 174).Mc(UP)); + } + function c$n(n, e) { + var t, i; + if (e) { + for (t = 0; t < n.i; ++t) + if (i = u(n.g[t], 366), i.Di(e)) + return !1; + return me(n, e); + } else + return !1; + } + function OQ(n) { + var e, t, i, r; + for (e = new ea(), r = new _p(n.b.Kc()); r.b.Ob(); ) + i = u(r.b.Pb(), 686), t = _5e(i), she(e, e.a.length, t); + return e.a; + } + function DQ(n) { + var e; + return !n.c && (n.c = new Gln()), wi(n.d, new Uln()), Mke(n), e = b7e(n), _t(new $n(null, new xn(n.d, 16)), new r5n(n)), e; + } + function MT(n) { + var e; + return n.Db & 64 ? r6(n) : (e = new Bs(r6(n)), e.a += " (instanceClassName: ", br(e, n.D), e.a += ")", e.a); + } + function T2e(n, e) { + var t, i, r, c; + e && (r = Bh(e, "x"), t = new bmn(n), O3(t.a, (_n(r), r)), c = Bh(e, "y"), i = new wmn(n), $3(i.a, (_n(c), c))); + } + function M2e(n, e) { + var t, i, r, c; + e && (r = Bh(e, "x"), t = new hmn(n), D3(t.a, (_n(r), r)), c = Bh(e, "y"), i = new amn(n), F3(i.a, (_n(c), c))); + } + function jt(n, e) { + var t, i, r; + if (t = (n.i == null && Lf(n), n.i), i = e.aj(), i != -1) { + for (r = t.length; i < r; ++i) + if (t[i] == e) + return i; + } + return -1; + } + function A2e(n) { + var e, t, i, r, c; + for (t = u(n.g, 674), i = n.i - 1; i >= 0; --i) + for (e = t[i], r = 0; r < i; ++r) + if (c = t[r], iRn(n, e, c)) { + H2(n, i); + break; + } + } + function S2e(n) { + var e = n.e; + function t(i) { + return !i || i.length == 0 ? "" : " " + i.join(` + `); + } + return e && (e.stack || t(n[PL])); + } + function $Q(n) { + eb(); + var e; + switch (e = n.Pc(), e.length) { + case 0: + return sR; + case 1: + return new pD(pe(e[0])); + default: + return new JD(Qge(e)); + } + } + function Wd(n, e) { + switch (e.g) { + case 1: + return v2(n.j, (bu(), Vrn)); + case 2: + return v2(n.j, (bu(), Jrn)); + default: + return Pn(), Pn(), cr; + } + } + function FQ(n, e) { + switch (e) { + case 3: + Rd(n, 0); + return; + case 4: + _d(n, 0); + return; + case 5: + Zc(n, 0); + return; + case 6: + nu(n, 0); + return; + } + oQ(n, e); + } + function xF() { + xF = N, Oj(), uP = (nn(), M0), NQn = cf(A(M(KK, 1), Jen, 146, 0, [Zk, Mo, jp, T0, ew, G_, bv, wv, z_, Fm, Dg, Ja, $g])); + } + function u$n(n) { + var e, t; + e = n.d == (q2(), ev), t = $J(n), e && !t || !e && t ? H(n.a, (nn(), Qf), (oh(), ay)) : H(n.a, (nn(), Qf), (oh(), ly)); + } + function P2e(n, e) { + var t; + return t = u(ts(n, pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), t.Qc(IEn(t.gc())); + } + function AT() { + AT = N, oH = new Qj("SIMPLE", 0), Whn = new Qj("GROUP_DEC", 1), Vhn = new Qj("GROUP_MIXED", 2), Xhn = new Qj("GROUP_INC", 3); + } + function LF() { + LF = N, vH = new tpn(), v1n = new ipn(), m1n = new rpn(), k1n = new cpn(), y1n = new upn(), j1n = new spn(), E1n = new opn(), C1n = new fpn(), T1n = new hpn(); + } + function s$n(n, e, t) { + wIn(), s9n.call(this), this.a = fa(Xzn, [q, lnn], [595, 212], 0, [QA, CR], 2), this.c = new d2(), this.g = n, this.f = e, this.d = t; + } + function xQ(n, e) { + this.n = fa(Yl, [q, QL], [364, 25], 14, [e, Gt(j.Math.ceil(n / 32))], 2), this.o = n, this.p = e, this.j = n - 1 >> 1, this.k = e - 1 >> 1; + } + function I2e(n, e) { + le(e, "End label post-processing", 1), _t(pt(qr(new $n(null, new xn(n.b, 16)), new udn()), new sdn()), new odn()), ce(e); + } + function O2e(n, e, t) { + var i, r; + return i = K(n.p[e.i.p]) + K(n.d[e.i.p]) + e.n.b + e.a.b, r = K(n.p[t.i.p]) + K(n.d[t.i.p]) + t.n.b + t.a.b, r - i; + } + function D2e(n, e, t) { + var i, r; + for (i = ui(t, hr), r = 0; hc(i, 0) != 0 && r < e; r++) + i = Hi(i, ui(n[r], hr)), n[r] = ge(i), i = cl(i, 32); + return ge(i); + } + function ST(n) { + var e, t, i, r; + for (r = 0, t = 0, i = n.length; t < i; t++) + e = (Te(t, n.length), n.charCodeAt(t)), e < 64 && (r = rf(r, Ih(1, e))); + return r; + } + function $2e(n) { + var e; + return n == null ? null : new il((e = Ec(n, !0), e.length > 0 && (Te(0, e.length), e.charCodeAt(0) == 43) ? e.substr(1) : e)); + } + function F2e(n) { + var e; + return n == null ? null : new il((e = Ec(n, !0), e.length > 0 && (Te(0, e.length), e.charCodeAt(0) == 43) ? e.substr(1) : e)); + } + function LQ(n, e) { + var t; + return n.i > 0 && (e.length < n.i && (t = Q8(Du(e).c, n.i), e = t), pc(n.g, 0, e, 0, n.i)), e.length > n.i && St(e, n.i, null), e; + } + function Dc(n, e, t) { + var i, r, c; + return n.ej() ? (i = n.i, c = n.fj(), a7(n, i, e), r = n.Zi(3, null, e, i, c), t ? t.Ei(r) : t = r) : a7(n, n.i, e), t; + } + function x2e(n, e, t) { + var i, r; + return i = new Lh(n.e, 4, 10, (r = e.c, I(r, 88) ? u(r, 26) : (Sn(), so)), null, m1(n, e), !1), t ? t.Ei(i) : t = i, t; + } + function L2e(n, e, t) { + var i, r; + return i = new Lh(n.e, 3, 10, null, (r = e.c, I(r, 88) ? u(r, 26) : (Sn(), so)), m1(n, e), !1), t ? t.Ei(i) : t = i, t; + } + function o$n(n) { + X0(); + var e; + return e = new kr(u(n.e.We((Xe(), Kg)), 8)), n.B.Hc((xu(), Tv)) && (e.a <= 0 && (e.a = 20), e.b <= 0 && (e.b = 20)), e; + } + function f$n(n) { + gb(); + var e; + return (n.q ? n.q : (Pn(), Pn(), ph))._b((nn(), E0)) ? e = u(k(n, E0), 197) : e = u(k(qi(n), $m), 197), e; + } + function wb(n, e) { + var t, i; + return i = null, ai(n, (nn(), rP)) && (t = u(k(n, rP), 94), t.Xe(e) && (i = t.We(e))), i == null && (i = k(qi(n), e)), i; + } + function h$n(n, e) { + var t, i, r; + return I(e, 42) ? (t = u(e, 42), i = t.cd(), r = db(n.Rc(), i), $f(r, t.dd()) && (r != null || n.Rc()._b(i))) : !1; + } + function NF(n, e) { + var t, i, r; + return n.f > 0 ? (n.qj(), i = e == null ? 0 : kt(e), r = (i & nt) % n.d.length, t = hNn(n, r, i, e), t != -1) : !1; + } + function Ko(n, e) { + var t, i, r; + return n.f > 0 && (n.qj(), i = e == null ? 0 : kt(e), r = (i & nt) % n.d.length, t = kY(n, r, i, e), t) ? t.dd() : null; + } + function g7(n, e) { + var t, i, r, c; + for (c = _c(n.e.Tg(), e), t = u(n.g, 119), r = 0; r < n.i; ++r) + if (i = t[r], c.rl(i.ak())) + return !1; + return !0; + } + function l$n(n) { + if (n.b == null) { + for (; n.a.Ob(); ) + if (n.b = n.a.Pb(), !u(n.b, 49).Zg()) + return !0; + return n.b = null, !1; + } else + return !0; + } + function a$n(n, e) { + n.mj(); + try { + n.d.Vc(n.e++, e), n.f = n.d.j, n.g = -1; + } catch (t) { + throw t = Et(t), I(t, 73) ? T(new vs()) : T(t); + } + } + function PT(n, e) { + Cz(); + var t, i; + return t = a8((wj(), wj(), dm)), i = null, e == t && (i = u(mc(bin, n), 615)), i || (i = new QCn(n), e == t && yr(bin, n, i)), i; + } + function d$n(n, e) { + var t, i; + n.a = Hi(n.a, 1), n.c = j.Math.min(n.c, e), n.b = j.Math.max(n.b, e), n.d += e, t = e - n.f, i = n.e + t, n.f = i - n.e - t, n.e = i; + } + function N2e(n, e) { + var t; + n.c = e, n.a = k2e(e), n.a < 54 && (n.f = (t = e.d > 1 ? rf(Ih(e.a[1], 32), ui(e.a[0], hr)) : ui(e.a[0], hr), Fd(Ni(e.e, t)))); + } + function p7(n, e) { + var t; + return Fr(n) && Fr(e) && (t = n % e, ik < t && t < Fa) ? t : bl((IZ(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e, !0), Il)); + } + function h6(n, e) { + var t; + iCe(e), t = u(k(n, (nn(), JS)), 276), t && H(n, JS, L3e(t)), s1(n.c), s1(n.f), NX(n.d), NX(u(k(n, eP), 207)); + } + function b$n(n) { + this.e = F(be, Le, 25, n.length, 15, 1), this.c = F(_u, wh, 25, n.length, 16, 1), this.b = F(_u, wh, 25, n.length, 16, 1), this.f = 0; + } + function B2e(n) { + var e, t; + for (n.j = F(Ci, vr, 25, n.p.c.length, 15, 1), t = new E(n.p); t.a < t.c.c.length; ) + e = u(y(t), 10), n.j[e.p] = e.o.b / n.i; + } + function BF(n) { + var e; + n.c != 0 && (e = u(un(n.a, n.b), 287), e.b == 1 ? (++n.b, n.b < n.a.c.length && Ivn(u(un(n.a, n.b), 287))) : --e.b, --n.c); + } + function R2e(n) { + var e; + e = n.a; + do + e = u(ve(new re(ue(ei(e).a.Kc(), new Mn()))), 17).d.i, e.k == (Qn(), pi) && W(n.e, e); + while (e.k == (Qn(), pi)); + } + function NQ() { + NQ = N, zhn = new md(15), wne = new tr((Xe(), ed), zhn), pne = new tr(td, 15), gne = new tr(tH, Q(0)), bne = new tr(Tp, D4); + } + function Qu() { + Qu = N, Ay = new Vj("PORTS", 0), rd = new Vj("PORT_LABELS", 1), My = new Vj("NODE_LABELS", 2), sw = new Vj("MINIMUM_SIZE", 3); + } + function v7(n, e) { + var t, i; + for (i = e.length, t = 0; t < i; t += 2) + jc(n, (Te(t, e.length), e.charCodeAt(t)), (Te(t + 1, e.length), e.charCodeAt(t + 1))); + } + function w$n(n, e, t) { + var i, r, c, o; + for (c = e - n.e, o = t - n.f, r = new E(n.a); r.a < r.c.c.length; ) + i = u(y(r), 187), k7(i, i.s + c, i.t + o); + n.e = e, n.f = t; + } + function _2e(n, e) { + var t, i, r, c; + for (c = e.b.b, n.a = new Tt(), n.b = F(be, Le, 25, c, 15, 1), t = 0, r = _e(e.b, 0); r.b != r.d.c; ) + i = u(Re(r), 86), i.g = t++; + } + function g$n(n, e) { + var t, i, r, c; + return t = e >> 5, e &= 31, r = n.d + t + (e == 0 ? 0 : 1), i = F(be, Le, 25, r, 15, 1), Nve(i, n.a, t, e), c = new Pw(n.e, r, i), K5(c), c; + } + function BQ(n, e, t) { + var i, r; + i = u(mc(Sv, e), 117), r = u(mc(m9, e), 117), t ? (yr(Sv, n, i), yr(m9, n, r)) : (yr(m9, n, i), yr(Sv, n, r)); + } + function p$n(n, e, t) { + var i, r, c; + for (r = null, c = n.b; c; ) { + if (i = n.a.ue(e, c.d), t && i == 0) + return c; + i >= 0 ? c = c.a[1] : (r = c, c = c.a[0]); + } + return r; + } + function v$n(n, e, t) { + var i, r, c; + for (r = null, c = n.b; c; ) { + if (i = n.a.ue(e, c.d), t && i == 0) + return c; + i <= 0 ? c = c.a[0] : (r = c, c = c.a[1]); + } + return r; + } + function K2e(n, e, t, i) { + var r, c, o; + return r = !1, jEe(n.f, t, i) && (ape(n.f, n.a[e][t], n.a[e][i]), c = n.a[e], o = c[i], c[i] = c[t], c[t] = o, r = !0), r; + } + function RQ(n, e, t, i, r) { + var c, o, f; + for (o = r; e.b != e.c; ) + c = u(y2(e), 10), f = u(zr(c, i).Xb(0), 11), n.d[f.p] = o++, t.c[t.c.length] = f; + return o; + } + function _Q(n, e, t) { + var i, r, c, o, f; + return o = n.k, f = e.k, i = t[o.g][f.g], r = Y(wb(n, i)), c = Y(wb(e, i)), j.Math.max((_n(r), r), (_n(c), c)); + } + function H2e(n, e, t) { + var i, r, c, o; + for (i = t / n.c.length, r = 0, o = new E(n); o.a < o.c.c.length; ) + c = u(y(o), 200), EDn(c, c.f + i * r), y4e(c, e, i), ++r; + } + function m$n(n, e, t) { + var i, r, c, o; + for (r = u(te(n.b, t), 177), i = 0, o = new E(e.j); o.a < o.c.c.length; ) + c = u(y(o), 113), r[c.d.p] && ++i; + return i; + } + function k$n(n) { + var e, t; + return e = u(Rn(n.a, 4), 126), e != null ? (t = F(bH, qB, 415, e.length, 0, 1), pc(e, 0, t, 0, e.length), t) : Nne; + } + function q2e() { + var n; + return _A != 0 && (n = cde(), n - wzn > 2e3 && (wzn = n, KA = j.setTimeout(Vie, 10))), _A++ == 0 ? (E0e((aG(), din)), !0) : !1; + } + function G2e(n, e) { + var t, i, r; + for (i = new re(ue(ei(n).a.Kc(), new Mn())); Se(i); ) + if (t = u(ve(i), 17), r = t.d.i, r.c == e) + return !1; + return !0; + } + function KQ(n, e) { + var t, i; + if (I(e, 245)) { + i = u(e, 245); + try { + return t = n.vd(i), t == 0; + } catch (r) { + if (r = Et(r), !I(r, 205)) + throw T(r); + } + } + return !1; + } + function z2e() { + return Error.stackTraceLimit > 0 ? (j.Error.stackTraceLimit = Error.stackTraceLimit = 64, !0) : "stack" in new Error(); + } + function U2e(n, e) { + return Yo(), Yo(), mo(Cl), (j.Math.abs(n - e) <= Cl || n == e || isNaN(n) && isNaN(e) ? 0 : n < e ? -1 : n > e ? 1 : vd(isNaN(n), isNaN(e))) > 0; + } + function HQ(n, e) { + return Yo(), Yo(), mo(Cl), (j.Math.abs(n - e) <= Cl || n == e || isNaN(n) && isNaN(e) ? 0 : n < e ? -1 : n > e ? 1 : vd(isNaN(n), isNaN(e))) < 0; + } + function y$n(n, e) { + return Yo(), Yo(), mo(Cl), (j.Math.abs(n - e) <= Cl || n == e || isNaN(n) && isNaN(e) ? 0 : n < e ? -1 : n > e ? 1 : vd(isNaN(n), isNaN(e))) <= 0; + } + function RF(n, e) { + for (var t = 0; !e[t] || e[t] == ""; ) + t++; + for (var i = e[t++]; t < e.length; t++) + !e[t] || e[t] == "" || (i += n + e[t]); + return i; + } + function Hs(n, e, t) { + var i, r, c, o; + for (c = e + t, RX(e, c, n.length), o = "", r = e; r < c; ) + i = j.Math.min(r + 1e4, c), o += xhe(n.slice(r, i)), r = i; + return o; + } + function j$n(n) { + var e, t, i, r, c; + if (n == null) + return null; + for (c = new X(), t = aF(n), i = 0, r = t.length; i < r; ++i) + e = t[i], W(c, Ec(e, !0)); + return c; + } + function E$n(n) { + var e, t, i, r, c; + if (n == null) + return null; + for (c = new X(), t = aF(n), i = 0, r = t.length; i < r; ++i) + e = t[i], W(c, Ec(e, !0)); + return c; + } + function C$n(n) { + var e, t, i, r, c; + if (n == null) + return null; + for (c = new X(), t = aF(n), i = 0, r = t.length; i < r; ++i) + e = t[i], W(c, Ec(e, !0)); + return c; + } + function T$n(n, e) { + var t, i, r; + if (n.c) + _d(n.c, e); + else + for (t = e - du(n), r = new E(n.d); r.a < r.c.c.length; ) + i = u(y(r), 157), T$n(i, du(i) + t); + } + function M$n(n, e) { + var t, i, r; + if (n.c) + Rd(n.c, e); + else + for (t = e - zu(n), r = new E(n.a); r.a < r.c.c.length; ) + i = u(y(r), 157), M$n(i, zu(i) + t); + } + function W2e(n, e) { + var t, i, r, c; + for (r = new Ic(e.gc()), i = e.Kc(); i.Ob(); ) + t = i.Pb(), c = Zx(n, u(t, 56)), c && (r.c[r.c.length] = c); + return r; + } + function IT(n, e) { + var t, i, r; + return n.qj(), i = e == null ? 0 : kt(e), r = (i & nt) % n.d.length, t = kY(n, r, i, e), t ? (xIn(n, t), t.dd()) : null; + } + function Xd(n) { + var e, t; + for (t = Bxn(n), e = null; n.c == 2; ) + Qe(n), e || (e = (Je(), Je(), new v5(2)), Da(e, t), t = e), t.$l(Bxn(n)); + return t; + } + function t4(n) { + var e, t, i; + if (i = null, e = Uf in n.a, t = !e, t) + throw T(new Af("Every element must have an id.")); + return i = G2(Dh(n, Uf)), i; + } + function OT(n) { + var e, t, i; + if (i = n.Zg(), !i) + for (e = 0, t = n.eh(); t; t = t.eh()) { + if (++e > JL) + return t.fh(); + if (i = t.Zg(), i || t == n) + break; + } + return i; + } + function qQ(n) { + return dC(), I(n, 156) ? u(te($y, Azn), 288).vg(n) : Uu($y, Du(n)) ? u(te($y, Du(n)), 288).vg(n) : null; + } + function X2e(n) { + if (DT(N4, n)) + return qn(), G4; + if (DT(EB, n)) + return qn(), Ga; + throw T(new Hn("Expecting true or false")); + } + function V2e(n, e) { + if (e.c == n) + return e.d; + if (e.d == n) + return e.c; + throw T(new Hn("Input edge is not connected to the input port.")); + } + function A$n(n, e) { + return n.e > e.e ? 1 : n.e < e.e ? -1 : n.d > e.d ? n.e : n.d < e.d ? -e.e : n.e * YV(n.a, e.a, n.d); + } + function S$n(n) { + return n >= 48 && n < 48 + j.Math.min(10, 10) ? n - 48 : n >= 97 && n < 97 ? n - 97 + 10 : n >= 65 && n < 65 ? n - 65 + 10 : -1; + } + function P$n(n, e) { + var t; + return B(e) === B(n) ? !0 : !I(e, 21) || (t = u(e, 21), t.gc() != n.gc()) ? !1 : n.Ic(t); + } + function Q2e(n, e) { + var t, i, r, c; + return i = n.a.length - 1, t = e - n.b & i, c = n.c - e & i, r = n.c - n.b & i, cjn(t < r), t >= c ? (Vwe(n, e), -1) : (Qwe(n, e), 1); + } + function J2e(n, e) { + var t, i; + for (t = (Te(e, n.length), n.charCodeAt(e)), i = e + 1; i < n.length && (Te(i, n.length), n.charCodeAt(i) == t); ) + ++i; + return i - e; + } + function GQ(n) { + switch (n.g) { + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + return !0; + default: + return !1; + } + } + function Y2e(n, e) { + var t = n.a, i; + e = String(e), t.hasOwnProperty(e) && (i = t[e]); + var r = (cF(), dR)[typeof i], c = r ? r(i) : tQ(typeof i); + return c; + } + function Vd(n, e) { + if (n.a < 0) + throw T(new $r("Did not call before(...) or after(...) before calling add(...).")); + return Xz(n, n.a, e), n; + } + function Z2e(n, e, t, i) { + var r, c; + e.c.length != 0 && (r = N9e(t, i), c = L6e(e), _t(qC(new $n(null, new xn(c, 1)), new bgn()), new yTn(n, t, r, i))); + } + function R2(n, e, t) { + var i; + n.Db & e ? t == null ? jme(n, e) : (i = ux(n, e), i == -1 ? n.Eb = t : St(va(n.Eb), i, t)) : t != null && W8e(n, e, t); + } + function Bc(n) { + var e, t; + return n.Db & 32 || (t = (e = u(Rn(n, 16), 26), ee(e || n.zh()) - ee(n.zh())), t != 0 && R2(n, 32, F(Zn, rn, 1, t, 5, 1))), n; + } + function npe(n) { + var e; + return n.b || Gie(n, (e = Fue(n.e, n.a), !e || !An(EB, Ko((!e.b && (e.b = new Gu((Sn(), Zi), tc, e)), e.b), "qualified")))), n.c; + } + function epe(n, e, t) { + var i, r, c; + return i = u(D(Ou(n.a), e), 87), c = (r = i.c, r || (Sn(), Cf)), (c.kh() ? pl(n.b, u(c, 49)) : c) == t ? pM(i) : I3(i, t), c; + } + function tpe(n, e) { + (!e && console.groupCollapsed != null ? console.groupCollapsed : console.group ?? console.log).call(console, n); + } + function ipe(n, e, t, i) { + i == n, u(t.b, 65), u(t.b, 65), u(i.b, 65), u(i.b, 65).c.b, BX(i, e, n); + } + function rpe(n) { + var e, t; + for (e = new E(n.g); e.a < e.c.c.length; ) + u(y(e), 562); + t = new FNn(n.g, K(n.a), n.c), lCe(t), n.g = t.b, n.d = t.a; + } + function zQ(n, e, t) { + e.b = j.Math.max(e.b, -t.a), e.c = j.Math.max(e.c, t.a - n.a), e.d = j.Math.max(e.d, -t.b), e.a = j.Math.max(e.a, t.b - n.b); + } + function cpe(n, e) { + return n.e < e.e ? -1 : n.e > e.e ? 1 : n.f < e.f ? -1 : n.f > e.f ? 1 : kt(n) - kt(e); + } + function DT(n, e) { + return _n(n), e == null ? !1 : An(n, e) ? !0 : n.length == e.length && An(n.toLowerCase(), e.toLowerCase()); + } + function upe(n, e) { + var t, i, r, c; + for (i = 0, r = e.gc(); i < r; ++i) + t = e.il(i), I(t, 99) && u(t, 18).Bb & uc && (c = e.jl(i), c != null && Zx(n, u(c, 56))); + } + function I$n(n, e, t) { + var i, r, c; + for (c = new E(t.a); c.a < c.c.c.length; ) + r = u(y(c), 221), i = new sE(u(te(n.a, r.b), 65)), W(e.a, i), I$n(n, i, r); + } + function Aa(n) { + var e, t; + return hc(n, -129) > 0 && hc(n, 128) < 0 ? (e = ge(n) + 128, t = (XEn(), Ein)[e], !t && (t = Ein[e] = new pq(n)), t) : new pq(n); + } + function O$n(n, e) { + var t, i; + return t = e.Hh(n.a), t && (i = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), We)), i != null) ? i : e.ne(); + } + function spe(n, e) { + var t, i; + return t = e.Hh(n.a), t && (i = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), We)), i != null) ? i : e.ne(); + } + function ope(n, e) { + c$(); + var t, i; + for (i = new re(ue(Kh(n).a.Kc(), new Mn())); Se(i); ) + if (t = u(ve(i), 17), t.d.i == e || t.c.i == e) + return t; + return null; + } + function UQ(n, e, t) { + this.c = n, this.f = new X(), this.e = new Li(), this.j = new eW(), this.n = new eW(), this.b = e, this.g = new ys(e.c, e.d, e.b, e.a), this.a = t; + } + function _F(n) { + var e, t, i, r; + for (this.a = new Sh(), this.d = new hi(), this.e = 0, t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], !this.f && (this.f = e), d$(this, e); + } + function D$n(n) { + jl(), n.length == 0 ? (this.e = 0, this.d = 1, this.a = A(M(be, 1), Le, 25, 15, [0])) : (this.e = 1, this.d = n.length, this.a = n, K5(this)); + } + function l6(n, e, t) { + s9n.call(this), this.a = F(Xzn, lnn, 212, (_o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc])).length, 0, 1), this.b = n, this.d = e, this.c = t; + } + function $$n(n) { + this.d = new X(), this.e = new wa(), this.c = F(be, Le, 25, (J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn])).length, 15, 1), this.b = n; + } + function fpe(n) { + var e, t, i, r, c, o; + for (o = u(k(n, (G(), rt)), 11), H(o, fv, n.i.n.b), e = xf(n.e), i = e, r = 0, c = i.length; r < c; ++r) + t = i[r], Ti(t, o); + } + function hpe(n) { + var e, t, i, r, c, o; + for (t = u(k(n, (G(), rt)), 11), H(t, fv, n.i.n.b), e = xf(n.g), r = e, c = 0, o = r.length; c < o; ++c) + i = r[c], Ki(i, t); + } + function lpe(n) { + var e, t; + return ai(n.d.i, (nn(), lv)) ? (e = u(k(n.c.i, lv), 19), t = u(k(n.d.i, lv), 19), Uc(e.a, t.a) > 0) : !1; + } + function F$n(n) { + var e; + B(hn(n, (Xe(), Bg))) === B((_h(), HP)) && (Pt(n) ? (e = u(hn(Pt(n), Bg), 334), pr(n, Bg, e)) : pr(n, Bg, i9)); + } + function ape(n, e, t) { + var i, r; + yx(n.e, e, t, (J(), Gn)), yx(n.i, e, t, Vn), n.a && (r = u(k(e, (G(), rt)), 11), i = u(k(t, rt), 11), l$(n.g, r, i)); + } + function x$n(n, e, t) { + var i, r, c; + i = e.c.p, c = e.p, n.b[i][c] = new YTn(n, e), t && (n.a[i][c] = new c6n(e), r = u(k(e, (G(), k0)), 10), r && Tn(n.d, r, e)); + } + function L$n(n, e) { + var t, i, r; + if (W(eS, n), e.Fc(n), t = u(te(DR, n), 21), t) + for (r = t.Kc(); r.Ob(); ) + i = u(r.Pb(), 33), xr(eS, i, 0) != -1 || L$n(i, e); + } + function dpe(n, e, t) { + var i; + (Fzn ? (m2e(n), !0) : xzn || Nzn ? (n3(), !0) : Lzn && (n3(), !1)) && (i = new hEn(e), i.b = t, g5e(n, i)); + } + function KF(n, e) { + var t; + t = !n.A.Hc((Qu(), rd)) || n.q == (Ai(), Sc), n.u.Hc((Tu(), n1)) ? t ? xCe(n, e) : a_n(n, e) : n.u.Hc(Gl) && (t ? nCe(n, e) : M_n(n, e)); + } + function i4(n, e) { + var t, i; + if (++n.j, e != null && (t = (i = n.a.Cb, I(i, 97) ? u(i, 97).Jg() : null), ome(e, t))) { + R2(n.a, 4, t); + return; + } + R2(n.a, 4, u(e, 126)); + } + function N$n(n, e, t) { + return new ys(j.Math.min(n.a, e.a) - t / 2, j.Math.min(n.b, e.b) - t / 2, j.Math.abs(n.a - e.a) + t, j.Math.abs(n.b - e.b) + t); + } + function bpe(n, e) { + var t, i; + return t = Uc(n.a.c.p, e.a.c.p), t != 0 ? t : (i = Uc(n.a.d.i.p, e.a.d.i.p), i != 0 ? i : Uc(e.a.d.p, n.a.d.p)); + } + function wpe(n, e, t) { + var i, r, c, o; + return c = e.j, o = t.j, c != o ? c.g - o.g : (i = n.f[e.p], r = n.f[t.p], i == 0 && r == 0 ? 0 : i == 0 ? -1 : r == 0 ? 1 : ni(i, r)); + } + function B$n(n, e, t) { + var i, r, c; + if (!t[e.d]) + for (t[e.d] = !0, r = new E(Hw(e)); r.a < r.c.c.length; ) + i = u(y(r), 213), c = TT(i, e), B$n(n, c, t); + } + function WQ(n, e, t) { + var i; + switch (i = t[n.g][e], n.g) { + case 1: + case 3: + return new fn(0, i); + case 2: + case 4: + return new fn(i, 0); + default: + return null; + } + } + function gpe(n, e, t) { + var i, r; + r = u(n$(e.f), 209); + try { + r.Ze(n, t), The(e.f, r); + } catch (c) { + throw c = Et(c), I(c, 102) ? (i = c, T(i)) : T(c); + } + } + function R$n(n, e, t) { + var i, r, c, o, f, h; + return i = null, f = $Z(L3(), e), c = null, f && (r = null, h = OZ(f, t), o = null, h != null && (o = n.Ye(f, h)), r = o, c = r), i = c, i; + } + function ppe(n, e, t, i) { + var r, c, o; + return r = new Lh(n.e, 1, 13, (o = e.c, o || (Sn(), Cf)), (c = t.c, c || (Sn(), Cf)), m1(n, e), !1), i ? i.Ei(r) : i = r, i; + } + function HF(n, e, t, i) { + var r; + if (r = n.length, e >= r) + return r; + for (e = e > 0 ? e : 0; e < r && !uF((Te(e, n.length), n.charCodeAt(e)), t, i); e++) + ; + return e; + } + function lf(n, e) { + var t, i; + for (i = n.c.length, e.length < i && (e = pj(new Array(i), e)), t = 0; t < i; ++t) + St(e, t, n.c[t]); + return e.length > i && St(e, i, null), e; + } + function _$n(n, e) { + var t, i; + for (i = n.a.length, e.length < i && (e = pj(new Array(i), e)), t = 0; t < i; ++t) + St(e, t, n.a[t]); + return e.length > i && St(e, i, null), e; + } + function Sa(n, e, t) { + var i, r, c; + return r = u(te(n.e, e), 387), r ? (c = gU(r, t), Oyn(n, r), c) : (i = new qU(n, e, t), it(n.e, e, i), iMn(i), null); + } + function vpe(n) { + var e; + if (n == null) + return null; + if (e = a9e(Ec(n, !0)), e == null) + throw T(new VI("Invalid hexBinary value: '" + n + "'")); + return e; + } + function m7(n) { + return jl(), hc(n, 0) < 0 ? hc(n, -1) != 0 ? new OJ(-1, S3(n)) : gR : hc(n, 10) <= 0 ? xin[ge(n)] : new OJ(1, n); + } + function qF() { + return SM(), A(M(yUn, 1), z, 159, 0, [mUn, vUn, kUn, hUn, fUn, lUn, bUn, dUn, aUn, pUn, gUn, wUn, sUn, uUn, oUn, rUn, iUn, cUn, eUn, nUn, tUn, TR]); + } + function K$n(n) { + var e; + this.d = new X(), this.j = new Li(), this.g = new Li(), e = n.g.b, this.f = u(k(qi(e), (nn(), as)), 103), this.e = K(Y(xT(e, ew))); + } + function H$n(n) { + this.b = new X(), this.e = new X(), this.d = n, this.a = !Wv(pt(new $n(null, new Td(new uf(n.b))), new Fv(new qbn()))).sd((ua(), X4)); + } + function Ho() { + Ho = N, Xn = new Z9("PARENTS", 0), vi = new Z9("NODES", 1), Yf = new Z9("EDGES", 2), Za = new Z9("PORTS", 3), $1 = new Z9("LABELS", 4); + } + function qw() { + qw = N, Hl = new e8("DISTRIBUTED", 0), Cy = new e8("JUSTIFIED", 1), Hhn = new e8("BEGIN", 2), r9 = new e8(P4, 3), qhn = new e8("END", 4); + } + function mpe(n) { + var e; + switch (e = n.yi(null), e) { + case 10: + return 0; + case 15: + return 1; + case 14: + return 2; + case 11: + return 3; + case 21: + return 4; + } + return -1; + } + function GF(n) { + switch (n.g) { + case 1: + return or(), Yh; + case 4: + return or(), Zs; + case 2: + return or(), Ao; + case 3: + return or(), Jh; + } + return or(), mh; + } + function kpe(n, e, t) { + var i; + switch (i = t.q.getFullYear() - Tl + Tl, i < 0 && (i = -i), e) { + case 1: + n.a += i; + break; + case 2: + sh(n, i % 100, 2); + break; + default: + sh(n, i, e); + } + } + function _e(n, e) { + var t, i; + if (ib(e, n.b), e >= n.b >> 1) + for (i = n.c, t = n.b; t > e; --t) + i = i.b; + else + for (i = n.a.a, t = 0; t < e; ++t) + i = i.a; + return new oEn(n, e, i); + } + function $T() { + $T = N, yR = new HG("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST", 0), Qin = new HG("CORNER_CASES_THAN_SINGLE_SIDE_LAST", 1); + } + function ype(n) { + var e, t, i, r; + for (i = l6e(n), wi(i, LWn), r = n.d, r.c = F(Zn, rn, 1, 0, 5, 1), t = new E(i); t.a < t.c.c.length; ) + e = u(y(t), 456), Zt(r, e.b); + } + function q$n(n) { + var e, t, i; + for (i = (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), n.o), t = i.c.Kc(); t.e != t.i.gc(); ) + e = u(t.nj(), 42), e.dd(); + return N8(i); + } + function jpe(n) { + var e; + p2(u(k(n, (nn(), Bt)), 98)) && (e = n.b, SLn((Ln(0, e.c.length), u(e.c[0], 29))), SLn(u(un(e, e.c.length - 1), 29))); + } + function G$n(n, e) { + var t, i, r, c; + for (t = 0, r = new E(e.a); r.a < r.c.c.length; ) + i = u(y(r), 10), c = i.o.a + i.d.c + i.d.b + n.j, t = j.Math.max(t, c); + return t; + } + function FT(n) { + var e, t, i, r; + for (r = 0, t = 0, i = n.length; t < i; t++) + e = (Te(t, n.length), n.charCodeAt(t)), e >= 64 && e < 128 && (r = rf(r, Ih(1, e - 64))); + return r; + } + function xT(n, e) { + var t, i; + return i = null, ai(n, (Xe(), Ap)) && (t = u(k(n, Ap), 94), t.Xe(e) && (i = t.We(e))), i == null && qi(n) && (i = k(qi(n), e)), i; + } + function z$n(n, e) { + var t, i, r; + r = e.d.i, i = r.k, !(i == (Qn(), ii) || i == vf) && (t = new re(ue(ei(r).a.Kc(), new Mn())), Se(t) && it(n.k, e, u(ve(t), 17))); + } + function zF(n, e) { + var t, i, r; + return i = On(n.Tg(), e), t = e - n.Ah(), t < 0 ? (r = n.Yg(i), r >= 0 ? n.lh(r) : Ox(n, i)) : t < 0 ? Ox(n, i) : u(i, 66).Nj().Sj(n, n.yh(), t); + } + function cn(n) { + var e; + if (I(n.a, 4)) { + if (e = qQ(n.a), e == null) + throw T(new $r(HHn + n.b + "'. " + KHn + (Ph(Fy), Fy.k) + Etn)); + return e; + } else + return n.a; + } + function Epe(n) { + var e; + if (n == null) + return null; + if (e = qCe(Ec(n, !0)), e == null) + throw T(new VI("Invalid base64Binary value: '" + n + "'")); + return e; + } + function oe(n) { + var e; + try { + return e = n.i.Xb(n.e), n.mj(), n.g = n.e++, e; + } catch (t) { + throw t = Et(t), I(t, 73) ? (n.mj(), T(new ic())) : T(t); + } + } + function UF(n) { + var e; + try { + return e = n.c.ki(n.e), n.mj(), n.g = n.e++, e; + } catch (t) { + throw t = Et(t), I(t, 73) ? (n.mj(), T(new ic())) : T(t); + } + } + function a6() { + a6 = N, Trn = (Xe(), yhn), IR = Zfn, FUn = Tp, Crn = ed, BUn = (WT(), irn), NUn = ern, RUn = crn, LUn = nrn, xUn = (pF(), yrn), PR = OUn, Ern = DUn, nS = $Un; + } + function LT(n) { + switch (DG(), this.c = new X(), this.d = n, n.g) { + case 0: + case 2: + this.a = _W(qrn), this.b = Lt; + break; + case 3: + case 1: + this.a = qrn, this.b = Vt; + } + } + function U$n(n, e, t) { + var i, r; + if (n.c) + Zc(n.c, n.c.i + e), nu(n.c, n.c.j + t); + else + for (r = new E(n.b); r.a < r.c.c.length; ) + i = u(y(r), 157), U$n(i, e, t); + } + function Cpe(n, e) { + var t, i; + if (n.j.length != e.j.length) + return !1; + for (t = 0, i = n.j.length; t < i; t++) + if (!An(n.j[t], e.j[t])) + return !1; + return !0; + } + function NT(n, e, t) { + var i; + e.a.length > 0 && (W(n.b, new MEn(e.a, t)), i = e.a.length, 0 < i ? e.a = e.a.substr(0, 0) : 0 > i && (e.a += Iyn(F(Ls, Bf, 25, -i, 15, 1)))); + } + function W$n(n, e) { + var t, i, r; + for (t = n.o, r = u(u(ct(n.r, e), 21), 84).Kc(); r.Ob(); ) + i = u(r.Pb(), 111), i.e.a = M3e(i, t.a), i.e.b = t.b * K(Y(i.b.We(JA))); + } + function Tpe(n, e) { + var t, i, r, c; + return r = n.k, t = K(Y(k(n, (G(), y0)))), c = e.k, i = K(Y(k(e, y0))), c != (Qn(), Xt) ? -1 : r != Xt ? 1 : t == i ? 0 : t < i ? -1 : 1; + } + function Mpe(n, e) { + var t, i; + return t = u(u(te(n.g, e.a), 46).a, 65), i = u(u(te(n.g, e.b), 46).a, 65), al(e.a, e.b) - al(e.a, Az(t.b)) - al(e.b, Az(i.b)); + } + function Ape(n, e) { + var t; + return t = u(k(n, (nn(), Mr)), 74), qO(e, IWn) ? t ? _s(t) : (t = new fu(), H(n, Mr, t)) : t && H(n, Mr, null), t; + } + function X$n(n) { + var e; + return e = new V1(), e.a += "n", n.k != (Qn(), ii) && De(De((e.a += "(", e), VO(n.k).toLowerCase()), ")"), De((e.a += "_", e), E7(n)), e.a; + } + function Spe(n, e) { + le(e, "Self-Loop post-processing", 1), _t(pt(pt(qr(new $n(null, new xn(n.b, 16)), new F0n()), new x0n()), new L0n()), new N0n()), ce(e); + } + function _2(n, e, t, i) { + var r; + return t >= 0 ? n.hh(e, t, i) : (n.eh() && (i = (r = n.Vg(), r >= 0 ? n.Qg(i) : n.eh().ih(n, -1 - r, null, i))), n.Sg(e, t, i)); + } + function XQ(n, e) { + switch (e) { + case 7: + !n.e && (n.e = new Fn(bi, n, 7, 4)), de(n.e); + return; + case 8: + !n.d && (n.d = new Fn(bi, n, 8, 5)), de(n.d); + return; + } + FQ(n, e); + } + function qo(n, e) { + var t; + t = n.Zc(e); + try { + return t.Pb(); + } catch (i) { + throw i = Et(i), I(i, 109) ? T(new mr("Can't get element " + e)) : T(i); + } + } + function VQ(n, e) { + this.e = n, e < YL ? (this.d = 1, this.a = A(M(be, 1), Le, 25, 15, [e | 0])) : (this.d = 2, this.a = A(M(be, 1), Le, 25, 15, [e % YL | 0, e / YL | 0])); + } + function V$n(n, e) { + Pn(); + var t, i, r, c; + for (t = n, c = e, I(n, 21) && !I(e, 21) && (t = e, c = n), r = t.Kc(); r.Ob(); ) + if (i = r.Pb(), c.Hc(i)) + return !1; + return !0; + } + function Gi(n, e, t) { + var i, r, c, o; + return i = n.Xc(e), i != -1 && (n.ej() ? (c = n.fj(), o = H2(n, i), r = n.Zi(4, o, null, i, c), t ? t.Ei(r) : t = r) : H2(n, i)), t; + } + function Ppe(n, e, t) { + var i, r, c, o; + return i = n.Xc(e), i != -1 && (n.ej() ? (c = n.fj(), o = OE(n, i), r = n.Zi(4, o, null, i, c), t ? t.Ei(r) : t = r) : OE(n, i)), t; + } + function Q$n(n, e) { + var t; + switch (t = u(wr(n.b, e), 124).n, e.g) { + case 1: + n.t >= 0 && (t.d = n.t); + break; + case 3: + n.t >= 0 && (t.a = n.t); + } + n.C && (t.b = n.C.b, t.c = n.C.c); + } + function K2() { + K2 = N, $k = new Rj(NM, 0), Dk = new Rj(lN, 1), Fk = new Rj(aN, 2), xk = new Rj(dN, 3), $k.a = !1, Dk.a = !0, Fk.a = !1, xk.a = !0; + } + function d6() { + d6 = N, Lk = new Bj(NM, 0), YA = new Bj(lN, 1), ZA = new Bj(aN, 2), Nk = new Bj(dN, 3), Lk.a = !1, YA.a = !0, ZA.a = !1, Nk.a = !0; + } + function Ipe(n) { + var e; + e = n.a; + do + e = u(ve(new re(ue(Lr(e).a.Kc(), new Mn()))), 17).c.i, e.k == (Qn(), pi) && n.b.Fc(e); + while (e.k == (Qn(), pi)); + n.b = ma(n.b); + } + function Ope(n) { + var e, t, i; + for (i = n.c.a, n.p = (pe(i), new au(i)), t = new E(i); t.a < t.c.c.length; ) + e = u(y(t), 10), e.p = b6e(e).a; + Pn(), wi(n.p, new Ewn()); + } + function J$n(n) { + var e, t, i, r; + if (i = 0, r = Tb(n), r.c.length == 0) + return 1; + for (t = new E(r); t.a < t.c.c.length; ) + e = u(y(t), 33), i += J$n(e); + return i; + } + function Dpe(n, e) { + var t, i, r; + for (r = 0, i = u(u(ct(n.r, e), 21), 84).Kc(); i.Ob(); ) + t = u(i.Pb(), 111), r += t.d.b + t.b.rf().a + t.d.c, i.Ob() && (r += n.w); + return r; + } + function $pe(n, e) { + var t, i, r; + for (r = 0, i = u(u(ct(n.r, e), 21), 84).Kc(); i.Ob(); ) + t = u(i.Pb(), 111), r += t.d.d + t.b.rf().b + t.d.a, i.Ob() && (r += n.w); + return r; + } + function Fpe(n, e, t, i) { + if (e.a < i.a) + return !0; + if (e.a == i.a) { + if (e.b < i.b) + return !0; + if (e.b == i.b && n.b > t.b) + return !0; + } + return !1; + } + function WF(n, e) { + return yi(n) ? !!ozn[e] : n.hm ? !!n.hm[e] : z0(n) ? !!szn[e] : G0(n) ? !!uzn[e] : !1; + } + function pr(n, e, t) { + return t == null ? (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), IT(n.o, e)) : (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), XT(n.o, e, t)), n; + } + function xpe(n, e, t, i) { + var r, c; + c = e.Xe((Xe(), _g)) ? u(e.We(_g), 21) : n.j, r = Cge(c), r != (SM(), TR) && (t && !GQ(r) || nY(d9e(n, r, i), e)); + } + function BT(n, e, t, i) { + var r, c, o; + return c = On(n.Tg(), e), r = e - n.Ah(), r < 0 ? (o = n.Yg(c), o >= 0 ? n._g(o, t, !0) : Zd(n, c, t)) : u(c, 66).Nj().Pj(n, n.yh(), r, t, i); + } + function Lpe(n, e, t, i) { + var r, c, o; + t.mh(e) && (er(), R$(e) ? (r = u(t.ah(e), 153), upe(n, r)) : (c = (o = e, o ? u(i, 49).xh(o) : null), c && Bte(t.ah(e), c))); + } + function Npe(n) { + switch (n.g) { + case 1: + return qd(), Ok; + case 3: + return qd(), Ik; + case 2: + return qd(), AR; + case 4: + return qd(), MR; + default: + return null; + } + } + function QQ(n) { + switch (typeof n) { + case EL: + return k1(n); + case UZ: + return Gt(n); + case X2: + return qn(), n ? 1231 : 1237; + default: + return n == null ? 0 : kd(n); + } + } + function Bpe(n, e, t) { + if (n.e) + switch (n.b) { + case 1: + d1e(n.c, e, t); + break; + case 0: + b1e(n.c, e, t); + } + else + xAn(n.c, e, t); + n.a[e.p][t.p] = n.c.i, n.a[t.p][e.p] = n.c.e; + } + function Y$n(n) { + var e, t; + if (n == null) + return null; + for (t = F(vh, q, 193, n.length, 0, 2), e = 0; e < t.length; e++) + t[e] = u(c0e(n[e], n[e].length), 193); + return t; + } + function RT(n) { + var e; + if (gF(n)) + return _E(n), n.Lk() && (e = y6(n.e, n.b, n.c, n.a, n.j), n.j = e), n.g = n.a, ++n.a, ++n.c, n.i = 0, n.j; + throw T(new ic()); + } + function Rpe(n, e) { + var t, i, r, c; + return c = n.o, t = n.p, c < t ? c *= c : t *= t, i = c + t, c = e.o, t = e.p, c < t ? c *= c : t *= t, r = c + t, i < r ? -1 : i == r ? 0 : 1; + } + function m1(n, e) { + var t, i, r; + if (r = OFn(n, e), r >= 0) + return r; + if (n.Fk()) { + for (i = 0; i < n.i; ++i) + if (t = n.Gk(u(n.g[i], 56)), B(t) === B(e)) + return i; + } + return -1; + } + function Gw(n, e, t) { + var i, r; + if (r = n.gc(), e >= r) + throw T(new Q0(e, r)); + if (n.hi() && (i = n.Xc(t), i >= 0 && i != e)) + throw T(new Hn(yk)); + return n.mi(e, t); + } + function JQ(n, e) { + if (this.a = u(pe(n), 245), this.b = u(pe(e), 245), n.vd(e) > 0 || n == (qI(), cR) || e == (HI(), uR)) + throw T(new Hn("Invalid range: " + OAn(n, e))); + } + function Z$n(n) { + var e, t; + for (this.b = new X(), this.c = n, this.a = !1, t = new E(n.a); t.a < t.c.c.length; ) + e = u(y(t), 10), this.a = this.a | e.k == (Qn(), ii); + } + function _pe(n, e) { + var t, i, r; + for (t = yd(new ca(), n), r = new E(e); r.a < r.c.c.length; ) + i = u(y(r), 121), jo(lo(ho(ao(fo(new Ns(), 0), 0), t), i)); + return t; + } + function nFn(n, e, t) { + var i, r, c; + for (r = new re(ue((e ? Lr(n) : ei(n)).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 17), c = e ? i.c.i : i.d.i, c.k == (Qn(), Ju) && jr(c, t); + } + function gb() { + gb = N, fP = new Gj(Xh, 0), Y_ = new Gj("PORT_POSITION", 1), xg = new Gj("NODE_SIZE_WHERE_SPACE_PERMITS", 2), Fg = new Gj("NODE_SIZE", 3); + } + function oh() { + oh = N, HK = new f5("AUTOMATIC", 0), ly = new f5(Y2, 1), ay = new f5(Z2, 2), xP = new f5("TOP", 3), $P = new f5(dnn, 4), FP = new f5(P4, 5); + } + function YQ(n, e, t, i) { + l4(); + var r, c; + for (r = 0, c = 0; c < t; c++) + r = Hi(Ni(ui(e[c], hr), ui(i, hr)), ui(ge(r), hr)), n[c] = ge(r), r = Y0(r, 32); + return ge(r); + } + function ZQ(n, e, t) { + var i, r; + for (r = 0, i = 0; i < CR; i++) + r = j.Math.max(r, kF(n.a[e.g][i], t)); + return e == (_o(), xc) && n.b && (r = j.Math.max(r, n.b.b)), r; + } + function _T(n, e) { + var t, i; + if (Yz(e > 0), (e & -e) == e) + return Gt(e * Fu(n, 31) * 4656612873077393e-25); + do + t = Fu(n, 31), i = t % e; + while (t - i + (e - 1) < 0); + return Gt(i); + } + function k1(n) { + lEn(); + var e, t, i; + return t = ":" + n, i = XA[t], i != null ? Gt((_n(i), i)) : (i = Xin[t], e = i == null ? I8e(n) : Gt((_n(i), i)), c1e(), XA[t] = e, e); + } + function eFn(n, e, t) { + le(t, "Compound graph preprocessor", 1), n.a = new Dd(), s_n(n, e, null), pje(n, e), Z9e(n), H(e, (G(), dun), n.a), n.a = null, Eu(n.b), ce(t); + } + function Kpe(n, e, t) { + switch (t.g) { + case 1: + n.a = e.a / 2, n.b = 0; + break; + case 2: + n.a = e.a, n.b = e.b / 2; + break; + case 3: + n.a = e.a / 2, n.b = e.b; + break; + case 4: + n.a = 0, n.b = e.b / 2; + } + } + function Hpe(n) { + var e, t, i; + for (i = u(ct(n.a, (Vw(), IS)), 15).Kc(); i.Ob(); ) + t = u(i.Pb(), 101), e = hJ(t), d3(n, t, e[0], (Hd(), g0), 0), d3(n, t, e[1], p0, 1); + } + function qpe(n) { + var e, t, i; + for (i = u(ct(n.a, (Vw(), OS)), 15).Kc(); i.Ob(); ) + t = u(i.Pb(), 101), e = hJ(t), d3(n, t, e[0], (Hd(), g0), 0), d3(n, t, e[1], p0, 1); + } + function XF(n) { + switch (n.g) { + case 0: + return null; + case 1: + return new eOn(); + case 2: + return new oG(); + default: + throw T(new Hn(lB + (n.f != null ? n.f : "" + n.g))); + } + } + function k7(n, e, t) { + var i, r; + for (lwe(n, e - n.s, t - n.t), r = new E(n.n); r.a < r.c.c.length; ) + i = u(y(r), 211), pte(i, i.e + e - n.s), vte(i, i.f + t - n.t); + n.s = e, n.t = t; + } + function Gpe(n) { + var e, t, i, r, c; + for (t = 0, r = new E(n.a); r.a < r.c.c.length; ) + i = u(y(r), 121), i.d = t++; + return e = y5e(n), c = null, e.c.length > 1 && (c = _pe(n, e)), c; + } + function VF(n) { + var e; + return n.f && n.f.kh() && (e = u(n.f, 49), n.f = u(pl(n, e), 82), n.f != e && n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 9, 8, e, n.f))), n.f; + } + function QF(n) { + var e; + return n.i && n.i.kh() && (e = u(n.i, 49), n.i = u(pl(n, e), 82), n.i != e && n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 9, 7, e, n.i))), n.i; + } + function ir(n) { + var e; + return n.b && n.b.Db & 64 && (e = n.b, n.b = u(pl(n, e), 18), n.b != e && n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 9, 21, e, n.b))), n.b; + } + function KT(n, e) { + var t, i, r; + n.d == null ? (++n.e, ++n.f) : (i = e.Sh(), u8e(n, n.f + 1), r = (i & nt) % n.d.length, t = n.d[r], !t && (t = n.d[r] = n.uj()), t.Fc(e), ++n.f); + } + function nJ(n, e, t) { + var i; + return e.Kj() ? !1 : e.Zj() != -2 ? (i = e.zj(), i == null ? t == null : tt(i, t)) : e.Hj() == n.e.Tg() && t == null; + } + function HT() { + var n; + rs(16, J_n), n = UIn(16), this.b = F(oR, nk, 317, n, 0, 1), this.c = F(oR, nk, 317, n, 0, 1), this.a = null, this.e = null, this.i = 0, this.f = n - 1, this.g = 0; + } + function qh(n) { + vU.call(this), this.k = (Qn(), ii), this.j = (rs(6, Ib), new Ic(6)), this.b = (rs(2, Ib), new Ic(2)), this.d = new NI(), this.f = new Zq(), this.a = n; + } + function zpe(n) { + var e, t; + n.c.length <= 1 || (e = ZNn(n, (J(), ae)), Kxn(n, u(e.a, 19).a, u(e.b, 19).a), t = ZNn(n, Gn), Kxn(n, u(t.a, 19).a, u(t.b, 19).a)); + } + function b6() { + b6 = N, zsn = new V9("SIMPLE", 0), nK = new V9(PN, 1), eK = new V9("LINEAR_SEGMENTS", 2), Lm = new V9("BRANDES_KOEPF", 3), Nm = new V9(EHn, 4); + } + function eJ(n, e, t) { + p2(u(k(e, (nn(), Bt)), 98)) || (VX(n, e, y1(e, t)), VX(n, e, y1(e, (J(), ae))), VX(n, e, y1(e, Kn)), Pn(), wi(e.j, new i6n(n))); + } + function tFn(n, e, t, i) { + var r, c, o; + for (r = u(ct(i ? n.a : n.b, e), 21), o = r.Kc(); o.Ob(); ) + if (c = u(o.Pb(), 33), aM(n, t, c)) + return !0; + return !1; + } + function JF(n) { + var e, t; + for (t = new ie(n); t.e != t.i.gc(); ) + if (e = u(oe(t), 87), e.e || (!e.d && (e.d = new Yt(dr, e, 1)), e.d).i != 0) + return !0; + return !1; + } + function YF(n) { + var e, t; + for (t = new ie(n); t.e != t.i.gc(); ) + if (e = u(oe(t), 87), e.e || (!e.d && (e.d = new Yt(dr, e, 1)), e.d).i != 0) + return !0; + return !1; + } + function Upe(n) { + var e, t, i; + for (e = 0, i = new E(n.c.a); i.a < i.c.c.length; ) + t = u(y(i), 10), e += Fh(new re(ue(ei(t).a.Kc(), new Mn()))); + return e / n.c.a.c.length; + } + function iFn(n) { + var e, t; + for (n.c || nEe(n), t = new fu(), e = new E(n.a), y(e); e.a < e.c.c.length; ) + Ke(t, u(y(e), 407).a); + return ne(t.b != 0), Ts(t, t.c.b), t; + } + function ZF() { + ZF = N, Ofn = (Ux(), Afn), Ifn = new md(8), new tr((Xe(), ed), Ifn), new tr(td, 8), EZn = Tfn, Sfn = wZn, Pfn = gZn, jZn = new tr(py, (qn(), !1)); + } + function tJ(n, e, t, i) { + switch (e) { + case 7: + return !n.e && (n.e = new Fn(bi, n, 7, 4)), n.e; + case 8: + return !n.d && (n.d = new Fn(bi, n, 8, 5)), n.d; + } + return jQ(n, e, t, i); + } + function nx(n) { + var e; + return n.a && n.a.kh() && (e = u(n.a, 49), n.a = u(pl(n, e), 138), n.a != e && n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 9, 5, e, n.a))), n.a; + } + function Pa(n) { + return n < 48 || n > 102 ? -1 : n <= 57 ? n - 48 : n < 65 ? -1 : n <= 70 ? n - 65 + 10 : n < 97 ? -1 : n - 97 + 10; + } + function ex(n, e) { + if (n == null) + throw T(new c2("null key in entry: null=" + e)); + if (e == null) + throw T(new c2("null value in entry: " + n + "=null")); + } + function Wpe(n, e) { + for (var t, i; n.Ob(); ) + if (!e.Ob() || (t = n.Pb(), i = e.Pb(), !(B(t) === B(i) || t != null && tt(t, i)))) + return !1; + return !e.Ob(); + } + function rFn(n, e) { + var t; + return t = A(M(Ci, 1), vr, 25, 15, [kF(n.a[0], e), kF(n.a[1], e), kF(n.a[2], e)]), n.d && (t[0] = j.Math.max(t[0], t[2]), t[2] = t[0]), t; + } + function cFn(n, e) { + var t; + return t = A(M(Ci, 1), vr, 25, 15, [pT(n.a[0], e), pT(n.a[1], e), pT(n.a[2], e)]), n.d && (t[0] = j.Math.max(t[0], t[2]), t[2] = t[0]), t; + } + function Ia() { + Ia = N, f_ = new X9("GREEDY", 0), Gcn = new X9(fHn, 1), h_ = new X9(PN, 2), Em = new X9("MODEL_ORDER", 3), jm = new X9("GREEDY_MODEL_ORDER", 4); + } + function uFn(n, e) { + var t, i, r; + for (n.b[e.g] = 1, i = _e(e.d, 0); i.b != i.d.c; ) + t = u(Re(i), 188), r = t.c, n.b[r.g] == 1 ? Ke(n.a, t) : n.b[r.g] == 2 ? n.b[r.g] = 1 : uFn(n, r); + } + function Xpe(n, e) { + var t, i, r; + for (r = new Ic(e.gc()), i = e.Kc(); i.Ob(); ) + t = u(i.Pb(), 286), t.c == t.f ? h4(n, t, t.c) : U5e(n, t) || (r.c[r.c.length] = t); + return r; + } + function Vpe(n, e, t) { + var i, r, c, o, f; + for (f = n.r + e, n.r += e, n.d += t, i = t / n.n.c.length, r = 0, o = new E(n.n); o.a < o.c.c.length; ) + c = u(y(o), 211), r9e(c, f, i, r), ++r; + } + function Qpe(n) { + var e, t, i; + for (Kv(n.b.a), n.a = F(VA, rn, 57, n.c.c.a.b.c.length, 0, 1), e = 0, i = new E(n.c.c.a.b); i.a < i.c.c.length; ) + t = u(y(i), 57), t.f = e++; + } + function Jpe(n) { + var e, t, i; + for (Kv(n.b.a), n.a = F(RR, rn, 81, n.c.a.a.b.c.length, 0, 1), e = 0, i = new E(n.c.a.a.b); i.a < i.c.c.length; ) + t = u(y(i), 81), t.i = e++; + } + function Ype(n, e, t) { + var i; + le(t, "Shrinking tree compaction", 1), on(sn(k(e, (R3(), pm)))) ? (abe(n, e.f), RPn(e.f, (i = e.c, i))) : RPn(e.f, e.c), ce(t); + } + function sFn(n) { + var e; + if (e = Ywe(n), !Se(n)) + throw T(new mr("position (0) must be less than the number of elements that remained (" + e + ")")); + return ve(n); + } + function oFn(n, e, t) { + var i; + try { + return zw(n, e + n.j, t + n.k); + } catch (r) { + throw r = Et(r), I(r, 73) ? (i = r, T(new mr(i.g + RM + e + Qi + t + ")."))) : T(r); + } + } + function Zpe(n, e, t) { + var i; + try { + return lFn(n, e + n.j, t + n.k); + } catch (r) { + throw r = Et(r), I(r, 73) ? (i = r, T(new mr(i.g + RM + e + Qi + t + ")."))) : T(r); + } + } + function n3e(n, e, t) { + var i; + try { + return aFn(n, e + n.j, t + n.k); + } catch (r) { + throw r = Et(r), I(r, 73) ? (i = r, T(new mr(i.g + RM + e + Qi + t + ")."))) : T(r); + } + } + function fFn(n) { + switch (n.g) { + case 1: + return J(), Gn; + case 4: + return J(), Kn; + case 3: + return J(), Vn; + case 2: + return J(), ae; + default: + return J(), Xr; + } + } + function e3e(n, e, t) { + e.k == (Qn(), ii) && t.k == pi && (n.d = CF(e, (J(), ae)), n.b = CF(e, Kn)), t.k == ii && e.k == pi && (n.d = CF(t, (J(), Kn)), n.b = CF(t, ae)); + } + function tx(n, e) { + var t, i, r; + for (r = zr(n, e), i = r.Kc(); i.Ob(); ) + if (t = u(i.Pb(), 11), k(t, (G(), Mu)) != null || E5(new uf(t.b))) + return !0; + return !1; + } + function iJ(n, e) { + return Zc(e, n.e + n.d + (n.c.c.length == 0 ? 0 : n.b)), nu(e, n.f), n.a = j.Math.max(n.a, e.f), n.d += e.g + (n.c.c.length == 0 ? 0 : n.b), W(n.c, e), !0; + } + function t3e(n, e, t) { + var i, r, c, o; + for (o = 0, i = t / n.a.c.length, c = new E(n.a); c.a < c.c.c.length; ) + r = u(y(c), 187), k7(r, r.s, r.t + o * i), Vpe(r, n.d - r.r + e, i), ++o; + } + function i3e(n) { + var e, t, i, r, c; + for (i = new E(n.b); i.a < i.c.c.length; ) + for (t = u(y(i), 29), e = 0, c = new E(t.a); c.a < c.c.c.length; ) + r = u(y(c), 10), r.p = e++; + } + function r3e(n, e) { + var t, i, r, c, o, f; + for (r = e.length - 1, o = 0, f = 0, i = 0; i <= r; i++) + c = e[i], t = E5e(r, i) * sQ(1 - n, r - i) * sQ(n, i), o += c.a * t, f += c.b * t; + return new fn(o, f); + } + function hFn(n, e) { + var t, i, r, c, o; + for (t = e.gc(), n.qi(n.i + t), c = e.Kc(), o = n.i, n.i += t, i = o; i < n.i; ++i) + r = c.Pb(), k5(n, i, n.oi(i, r)), n.bi(i, r), n.ci(); + return t != 0; + } + function c3e(n, e, t) { + var i, r, c; + return n.ej() ? (i = n.Vi(), c = n.fj(), ++n.j, n.Hi(i, n.oi(i, e)), r = n.Zi(3, null, e, i, c), t ? t.Ei(r) : t = r) : Mjn(n, n.Vi(), e), t; + } + function u3e(n, e, t) { + var i, r, c; + return i = u(D(wc(n.a), e), 87), c = (r = i.c, I(r, 88) ? u(r, 26) : (Sn(), so)), (c.Db & 64 ? pl(n.b, c) : c) == t ? pM(i) : I3(i, t), c; + } + function rJ(n, e, t, i, r, c, o, f) { + var h, l; + i && (h = i.a[0], h && rJ(n, e, t, h, r, c, o, f), F3e(n, t, i.d, r, c, o, f) && e.Fc(i), l = i.a[1], l && rJ(n, e, t, l, r, c, o, f)); + } + function s3e(n, e) { + var t; + return n.a || (t = F(Ci, vr, 25, 0, 15, 1), vw(n.b.a, new Gvn(t)), t.sort(gIn(zy.prototype.te, zy, [])), n.a = new rEn(t, n.d)), PC(n.a, e); + } + function zw(n, e, t) { + try { + return pd(Q$(n, e, t), 1); + } catch (i) { + throw i = Et(i), I(i, 320) ? T(new mr(bN + n.o + "*" + n.p + wN + e + Qi + t + gN)) : T(i); + } + } + function lFn(n, e, t) { + try { + return pd(Q$(n, e, t), 0); + } catch (i) { + throw i = Et(i), I(i, 320) ? T(new mr(bN + n.o + "*" + n.p + wN + e + Qi + t + gN)) : T(i); + } + } + function aFn(n, e, t) { + try { + return pd(Q$(n, e, t), 2); + } catch (i) { + throw i = Et(i), I(i, 320) ? T(new mr(bN + n.o + "*" + n.p + wN + e + Qi + t + gN)) : T(i); + } + } + function dFn(n, e) { + if (n.g == -1) + throw T(new ou()); + n.mj(); + try { + n.d._c(n.g, e), n.f = n.d.j; + } catch (t) { + throw t = Et(t), I(t, 73) ? T(new vs()) : T(t); + } + } + function o3e(n, e, t) { + le(t, "Linear segments node placement", 1), n.b = u(k(e, (G(), Ig)), 304), jTe(n, e), cje(n, e), yje(n, e), eTe(n), n.a = null, n.b = null, ce(t); + } + function y7(n, e) { + var t, i, r, c; + for (c = n.gc(), e.length < c && (e = pj(new Array(c), e)), r = e, i = n.Kc(), t = 0; t < c; ++t) + St(r, t, i.Pb()); + return e.length > c && St(e, c, null), e; + } + function f3e(n, e) { + var t, i; + if (i = n.gc(), e == null) { + for (t = 0; t < i; t++) + if (n.Xb(t) == null) + return t; + } else + for (t = 0; t < i; t++) + if (tt(e, n.Xb(t))) + return t; + return -1; + } + function ix(n, e) { + var t, i, r; + return t = e.cd(), r = e.dd(), i = n.xc(t), !(!(B(r) === B(i) || r != null && tt(r, i)) || i == null && !n._b(t)); + } + function h3e(n, e) { + var t, i, r; + return e <= 22 ? (t = n.l & (1 << e) - 1, i = r = 0) : e <= 44 ? (t = n.l, i = n.m & (1 << e - 22) - 1, r = 0) : (t = n.l, i = n.m, r = n.h & (1 << e - 44) - 1), Nc(t, i, r); + } + function l3e(n, e) { + switch (e.g) { + case 1: + return n.f.n.d + n.t; + case 3: + return n.f.n.a + n.t; + case 2: + return n.f.n.c + n.s; + case 4: + return n.f.n.b + n.s; + default: + return 0; + } + } + function a3e(n, e) { + var t, i; + switch (i = e.c, t = e.a, n.b.g) { + case 0: + t.d = n.e - i.a - i.d; + break; + case 1: + t.d += n.e; + break; + case 2: + t.c = n.e - i.a - i.d; + break; + case 3: + t.c = n.e + i.d; + } + } + function cJ(n, e, t, i) { + var r, c; + this.a = e, this.c = i, r = n.a, nte(this, new fn(-r.c, -r.d)), st(this.b, t), c = i / 2, e.a ? o8(this.b, 0, c) : o8(this.b, c, 0), W(n.c, this); + } + function qT() { + qT = N, SK = new Uj(Xh, 0), qon = new Uj(hHn, 1), Gon = new Uj("EDGE_LENGTH_BY_POSITION", 2), Hon = new Uj("CROSSING_MINIMIZATION_BY_POSITION", 3); + } + function rx(n, e) { + var t, i; + if (t = u(xw(n.g, e), 33), t) + return t; + if (i = u(xw(n.j, e), 118), i) + return i; + throw T(new Af("Referenced shape does not exist: " + e)); + } + function d3e(n, e) { + if (n.c == e) + return n.d; + if (n.d == e) + return n.c; + throw T(new Hn("Node 'one' must be either source or target of edge 'edge'.")); + } + function b3e(n, e) { + if (n.c.i == e) + return n.d.i; + if (n.d.i == e) + return n.c.i; + throw T(new Hn("Node " + e + " is neither source nor target of edge " + n)); + } + function w3e(n, e) { + var t; + switch (e.g) { + case 2: + case 4: + t = n.a, n.c.d.n.b < t.d.n.b && (t = n.c), f1(n, e, (ff(), JR), t); + break; + case 1: + case 3: + f1(n, e, (ff(), lp), null); + } + } + function cx(n, e, t, i, r, c) { + var o, f, h, l, a; + for (o = v4e(e, t, c), f = t == (J(), Kn) || t == Gn ? -1 : 1, l = n[t.g], a = 0; a < l.length; a++) + h = l[a], h > 0 && (h += r), l[a] = o, o += f * (h + i); + } + function bFn(n) { + var e, t, i; + for (i = n.f, n.n = F(Ci, vr, 25, i, 15, 1), n.d = F(Ci, vr, 25, i, 15, 1), e = 0; e < i; e++) + t = u(un(n.c.b, e), 29), n.n[e] = G$n(n, t), n.d[e] = TNn(n, t); + } + function ux(n, e) { + var t, i, r; + for (r = 0, i = 2; i < e; i <<= 1) + n.Db & i && ++r; + if (r == 0) { + for (t = e <<= 1; t <= 128; t <<= 1) + if (n.Db & t) + return 0; + return -1; + } else + return r; + } + function wFn(n, e) { + var t, i, r, c, o; + for (o = _c(n.e.Tg(), e), c = null, t = u(n.g, 119), r = 0; r < n.i; ++r) + i = t[r], o.rl(i.ak()) && (!c && (c = new Jy()), me(c, i)); + c && A_n(n, c); + } + function gFn(n) { + var e, t, i; + if (!n) + return null; + if (n.dc()) + return ""; + for (i = new r1(), t = n.Kc(); t.Ob(); ) + e = t.Pb(), br(i, Ce(e)), i.a += " "; + return NO(i, i.a.length - 1); + } + function uJ(n, e, t) { + var i, r, c, o, f; + for (ywe(n), r = (n.k == null && (n.k = F(hR, q, 78, 0, 0, 1)), n.k), c = 0, o = r.length; c < o; ++c) + i = r[c], uJ(i); + f = n.f, f && uJ(f); + } + function pFn(n, e) { + var t = new Array(e), i; + switch (n) { + case 14: + case 15: + i = 0; + break; + case 16: + i = !1; + break; + default: + return t; + } + for (var r = 0; r < e; ++r) + t[r] = i; + return t; + } + function Qd(n) { + var e, t, i; + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 57), e.c.$b(); + tl(n.d) ? i = n.a.c : i = n.a.d, Yc(i, new e5n(n)), n.c.Me(n), HNn(n); + } + function vFn(n) { + var e, t, i, r; + for (t = new E(n.e.c); t.a < t.c.c.length; ) { + for (e = u(y(t), 282), r = new E(e.b); r.a < r.c.c.length; ) + i = u(y(r), 447), EZ(i); + hLn(e); + } + } + function GT(n) { + var e, t, i, r, c; + for (i = 0, c = 0, r = 0, t = new E(n.a); t.a < t.c.c.length; ) + e = u(y(t), 187), c = j.Math.max(c, e.r), i += e.d + (r > 0 ? n.c : 0), ++r; + n.b = i, n.d = c; + } + function g3e(n, e) { + var t, i, r, c, o; + for (i = 0, r = 0, t = 0, o = new E(e); o.a < o.c.c.length; ) + c = u(y(o), 200), i = j.Math.max(i, c.e), r += c.b + (t > 0 ? n.g : 0), ++t; + n.c = r, n.d = i; + } + function mFn(n, e) { + var t; + return t = A(M(Ci, 1), vr, 25, 15, [ZQ(n, (_o(), Zr), e), ZQ(n, xc, e), ZQ(n, nc, e)]), n.f && (t[0] = j.Math.max(t[0], t[2]), t[2] = t[0]), t; + } + function p3e(n, e, t) { + var i; + try { + wM(n, e + n.j, t + n.k, !1, !0); + } catch (r) { + throw r = Et(r), I(r, 73) ? (i = r, T(new mr(i.g + RM + e + Qi + t + ")."))) : T(r); + } + } + function v3e(n, e, t) { + var i; + try { + wM(n, e + n.j, t + n.k, !0, !1); + } catch (r) { + throw r = Et(r), I(r, 73) ? (i = r, T(new mr(i.g + RM + e + Qi + t + ")."))) : T(r); + } + } + function kFn(n) { + var e; + ai(n, (nn(), j0)) && (e = u(k(n, j0), 21), e.Hc((Eb(), So)) ? (e.Mc(So), e.Fc(Po)) : e.Hc(Po) && (e.Mc(Po), e.Fc(So))); + } + function yFn(n) { + var e; + ai(n, (nn(), j0)) && (e = u(k(n, j0), 21), e.Hc((Eb(), Oo)) ? (e.Mc(Oo), e.Fc(eo)) : e.Hc(eo) && (e.Mc(eo), e.Fc(Oo))); + } + function m3e(n, e, t) { + le(t, "Self-Loop ordering", 1), _t(Xc(pt(pt(qr(new $n(null, new xn(e.b, 16)), new P0n()), new I0n()), new O0n()), new D0n()), new O5n(n)), ce(t); + } + function j7(n, e, t, i) { + var r, c; + for (r = e; r < n.c.length; r++) + if (c = (Ln(r, n.c.length), u(n.c[r], 11)), t.Mb(c)) + i.c[i.c.length] = c; + else + return r; + return n.c.length; + } + function sx(n, e, t, i) { + var r, c, o, f; + return n.a == null && j5e(n, e), o = e.b.j.c.length, c = t.d.p, f = i.d.p, r = f - 1, r < 0 && (r = o - 1), c <= r ? n.a[r] - n.a[c] : n.a[o - 1] - n.a[c] + n.a[r]; + } + function k3e(n) { + var e, t; + if (!n.b) + for (n.b = mC(u(n.f, 33).Ag().i), t = new ie(u(n.f, 33).Ag()); t.e != t.i.gc(); ) + e = u(oe(t), 137), W(n.b, new XI(e)); + return n.b; + } + function y3e(n) { + var e, t; + if (!n.e) + for (n.e = mC(HD(u(n.f, 33)).i), t = new ie(HD(u(n.f, 33))); t.e != t.i.gc(); ) + e = u(oe(t), 118), W(n.e, new ymn(e)); + return n.e; + } + function jFn(n) { + var e, t; + if (!n.a) + for (n.a = mC(iC(u(n.f, 33)).i), t = new ie(iC(u(n.f, 33))); t.e != t.i.gc(); ) + e = u(oe(t), 33), W(n.a, new WO(n, e)); + return n.a; + } + function Jd(n) { + var e; + if (!n.C && (n.D != null || n.B != null)) + if (e = HEe(n), e) + n.yk(e); + else + try { + n.yk(null); + } catch (t) { + if (t = Et(t), !I(t, 60)) + throw T(t); + } + return n.C; + } + function j3e(n) { + switch (n.q.g) { + case 5: + UFn(n, (J(), Kn)), UFn(n, ae); + break; + case 4: + BRn(n, (J(), Kn)), BRn(n, ae); + break; + default: + Wxn(n, (J(), Kn)), Wxn(n, ae); + } + } + function E3e(n) { + switch (n.q.g) { + case 5: + WFn(n, (J(), Vn)), WFn(n, Gn); + break; + case 4: + RRn(n, (J(), Vn)), RRn(n, Gn); + break; + default: + Xxn(n, (J(), Vn)), Xxn(n, Gn); + } + } + function Uw(n, e) { + var t, i, r; + for (r = new Li(), i = n.Kc(); i.Ob(); ) + t = u(i.Pb(), 37), M6(t, r.a, 0), r.a += t.f.a + e, r.b = j.Math.max(r.b, t.f.b); + return r.b > 0 && (r.b += e), r; + } + function zT(n, e) { + var t, i, r; + for (r = new Li(), i = n.Kc(); i.Ob(); ) + t = u(i.Pb(), 37), M6(t, 0, r.b), r.b += t.f.b + e, r.a = j.Math.max(r.a, t.f.a); + return r.a > 0 && (r.a += e), r; + } + function EFn(n) { + var e, t, i; + for (i = nt, t = new E(n.a); t.a < t.c.c.length; ) + e = u(y(t), 10), ai(e, (G(), bc)) && (i = j.Math.min(i, u(k(e, bc), 19).a)); + return i; + } + function CFn(n, e) { + var t, i; + if (e.length == 0) + return 0; + for (t = KD(n.a, e[0], (J(), Gn)), t += KD(n.a, e[e.length - 1], Vn), i = 0; i < e.length; i++) + t += u5e(n, i, e); + return t; + } + function TFn() { + C6(), this.c = new X(), this.i = new X(), this.e = new Sh(), this.f = new Sh(), this.g = new Sh(), this.j = new X(), this.a = new X(), this.b = new we(), this.k = new we(); + } + function ox(n, e) { + var t, i; + return n.Db >> 16 == 6 ? n.Cb.ih(n, 5, Vo, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || n.zh()), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function C3e(n) { + m3(); + var e = n.e; + if (e && e.stack) { + var t = e.stack, i = e + ` +`; + return t.substring(0, i.length) == i && (t = t.substring(i.length)), t.split(` +`); + } + return []; + } + function T3e(n) { + var e; + return e = (_In(), kzn), e[n >>> 28] | e[n >> 24 & 15] << 4 | e[n >> 20 & 15] << 8 | e[n >> 16 & 15] << 12 | e[n >> 12 & 15] << 16 | e[n >> 8 & 15] << 20 | e[n >> 4 & 15] << 24 | e[n & 15] << 28; + } + function MFn(n) { + var e, t, i; + n.b == n.c && (i = n.a.length, t = KV(j.Math.max(8, i)) << 1, n.b != 0 ? (e = bo(n.a, t), XIn(n, e, i), n.a = e, n.b = 0) : Wmn(n.a, t), n.c = i); + } + function M3e(n, e) { + var t; + return t = n.b, t.Xe((Xe(), Bu)) ? t.Hf() == (J(), Gn) ? -t.rf().a - K(Y(t.We(Bu))) : e + K(Y(t.We(Bu))) : t.Hf() == (J(), Gn) ? -t.rf().a : e; + } + function E7(n) { + var e; + return n.b.c.length != 0 && u(un(n.b, 0), 70).a ? u(un(n.b, 0), 70).a : (e = WD(n), e ?? "" + (n.c ? xr(n.c.a, n, 0) : -1)); + } + function UT(n) { + var e; + return n.f.c.length != 0 && u(un(n.f, 0), 70).a ? u(un(n.f, 0), 70).a : (e = WD(n), e ?? "" + (n.i ? xr(n.i.j, n, 0) : -1)); + } + function A3e(n, e) { + var t, i; + if (e < 0 || e >= n.gc()) + return null; + for (t = e; t < n.gc(); ++t) + if (i = u(n.Xb(t), 128), t == n.gc() - 1 || !i.o) + return new Pi(Q(t), i); + return null; + } + function S3e(n, e, t) { + var i, r, c, o, f; + for (c = n.c, f = t ? e : n, i = t ? n : e, r = f.p + 1; r < i.p; ++r) + if (o = u(un(c.a, r), 10), !(o.k == (Qn(), vf) || t4e(o))) + return !1; + return !0; + } + function sJ(n) { + var e, t, i, r, c; + for (c = 0, r = Vt, i = 0, t = new E(n.a); t.a < t.c.c.length; ) + e = u(y(t), 187), c += e.r + (i > 0 ? n.c : 0), r = j.Math.max(r, e.d), ++i; + n.e = c, n.b = r; + } + function P3e(n) { + var e, t; + if (!n.b) + for (n.b = mC(u(n.f, 118).Ag().i), t = new ie(u(n.f, 118).Ag()); t.e != t.i.gc(); ) + e = u(oe(t), 137), W(n.b, new XI(e)); + return n.b; + } + function I3e(n, e) { + var t, i, r; + if (e.dc()) + return s3(), s3(), xy; + for (t = new Pjn(n, e.gc()), r = new ie(n); r.e != r.i.gc(); ) + i = oe(r), e.Hc(i) && me(t, i); + return t; + } + function oJ(n, e, t, i) { + return e == 0 ? i ? (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), n.o) : (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), N8(n.o)) : BT(n, e, t, i); + } + function fx(n) { + var e, t; + if (n.rb) + for (e = 0, t = n.rb.i; e < t; ++e) + s8(D(n.rb, e)); + if (n.vb) + for (e = 0, t = n.vb.i; e < t; ++e) + s8(D(n.vb, e)); + I5((wu(), xi), n), n.Bb |= 1; + } + function wt(n, e, t, i, r, c, o, f, h, l, a, d, g, p) { + return tLn(n, e, i, null, r, c, o, f, h, l, g, !0, p), vQ(n, a), I(n.Cb, 88) && jb(Iu(u(n.Cb, 88)), 2), t && vV(n, t), mQ(n, d), n; + } + function O3e(n) { + var e, t; + if (n == null) + return null; + t = 0; + try { + t = ss(n, Bi, nt) & Ut; + } catch (i) { + if (i = Et(i), I(i, 127)) + e = NC(n), t = e[0]; + else + throw T(i); + } + return i7(t); + } + function D3e(n) { + var e, t; + if (n == null) + return null; + t = 0; + try { + t = ss(n, Bi, nt) & Ut; + } catch (i) { + if (i = Et(i), I(i, 127)) + e = NC(n), t = e[0]; + else + throw T(i); + } + return i7(t); + } + function $3e(n, e) { + var t, i, r; + return r = n.h - e.h, r < 0 || (t = n.l - e.l, i = n.m - e.m + (t >> 22), r += i >> 22, r < 0) ? !1 : (n.l = t & Lu, n.m = i & Lu, n.h = r & Wh, !0); + } + function F3e(n, e, t, i, r, c, o) { + var f, h; + return !(e.Ae() && (h = n.a.ue(t, i), h < 0 || !r && h == 0) || e.Be() && (f = n.a.ue(t, c), f > 0 || !o && f == 0)); + } + function x3e(n, e) { + X3(); + var t; + if (t = n.j.g - e.j.g, t != 0) + return 0; + switch (n.j.g) { + case 2: + return DF(e, Lcn) - DF(n, Lcn); + case 4: + return DF(n, xcn) - DF(e, xcn); + } + return 0; + } + function L3e(n) { + switch (n.g) { + case 0: + return a_; + case 1: + return d_; + case 2: + return b_; + case 3: + return w_; + case 4: + return FS; + case 5: + return g_; + default: + return null; + } + } + function Tr(n, e, t) { + var i, r; + return i = (r = new _I(), Ta(r, e), Oc(r, t), me((!n.c && (n.c = new V(I0, n, 12, 10)), n.c), r), r), b1(i, 0), lb(i, 1), v1(i, !0), p1(i, !0), i; + } + function H2(n, e) { + var t, i; + if (e >= n.i) + throw T(new xO(e, n.i)); + return ++n.j, t = n.g[e], i = n.i - e - 1, i > 0 && pc(n.g, e + 1, n.g, e, i), St(n.g, --n.i, null), n.fi(e, t), n.ci(), t; + } + function AFn(n, e) { + var t, i; + return n.Db >> 16 == 17 ? n.Cb.ih(n, 21, ro, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || n.zh()), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function N3e(n) { + var e, t, i, r; + for (Pn(), wi(n.c, n.a), r = new E(n.c); r.a < r.c.c.length; ) + for (i = y(r), t = new E(n.b); t.a < t.c.c.length; ) + e = u(y(t), 679), e.Ke(i); + } + function B3e(n) { + var e, t, i, r; + for (Pn(), wi(n.c, n.a), r = new E(n.c); r.a < r.c.c.length; ) + for (i = y(r), t = new E(n.b); t.a < t.c.c.length; ) + e = u(y(t), 369), e.Ke(i); + } + function R3e(n) { + var e, t, i, r, c; + for (r = nt, c = null, i = new E(n.d); i.a < i.c.c.length; ) + t = u(y(i), 213), t.d.j ^ t.e.j && (e = t.e.e - t.d.e - t.a, e < r && (r = e, c = t)); + return c; + } + function fJ() { + fJ = N, sWn = new In(Snn, (qn(), !1)), rWn = new In(Pnn, 100), Frn = (W5(), NR), cWn = new In(Inn, Frn), uWn = new In(Onn, Kf), oWn = new In(Dnn, Q(nt)); + } + function SFn(n, e, t) { + var i, r, c, o, f, h, l, a; + for (l = 0, r = n.a[e], c = 0, o = r.length; c < o; ++c) + for (i = r[c], a = c6(i, t), h = a.Kc(); h.Ob(); ) + f = u(h.Pb(), 11), it(n.f, f, Q(l++)); + } + function _3e(n, e, t) { + var i, r, c, o; + if (t) + for (r = t.a.length, i = new ha(r), o = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); o.Ob(); ) + c = u(o.Pb(), 19), Tn(n, e, G2(sb(t, c.a))); + } + function K3e(n, e, t) { + var i, r, c, o; + if (t) + for (r = t.a.length, i = new ha(r), o = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); o.Ob(); ) + c = u(o.Pb(), 19), Tn(n, e, G2(sb(t, c.a))); + } + function hJ(n) { + yl(); + var e; + return e = u(y7(k2(n.k), F(Yi, lc, 61, 2, 0, 1)), 122), A3(e, 0, e.length, null), e[0] == (J(), Kn) && e[1] == Gn && (St(e, 0, Gn), St(e, 1, Kn)), e; + } + function PFn(n, e, t) { + var i, r, c; + return r = M8e(n, e, t), c = JY(n, r), $$(n.b), l$(n, e, t), Pn(), wi(r, new d6n(n)), i = JY(n, r), $$(n.b), l$(n, t, e), new Pi(Q(c), Q(i)); + } + function IFn() { + IFn = N, pJn = Ze(new li(), (Vi(), Or), (rr(), km)), bP = new ri("linearSegments.inputPrio", Q(0)), wP = new ri("linearSegments.outputPrio", Q(0)); + } + function r4() { + r4 = N, gP = new zj("P1_TREEIFICATION", 0), qm = new zj("P2_NODE_ORDERING", 1), uy = new zj("P3_NODE_PLACEMENT", 2), Gm = new zj("P4_EDGE_ROUTING", 3); + } + function pb() { + pb = N, DYn = (Xe(), Mp), $Yn = td, SYn = nd, PYn = Kg, IYn = _l, AYn = _g, Ron = ky, OYn = cw, MK = ($Y(), kYn), AK = yYn, _on = jYn, TP = EYn, MP = CYn, oy = TYn, Kon = MYn; + } + function us() { + us = N, Ey = new Xj("UNKNOWN", 0), kh = new Xj("ABOVE", 1), Kl = new Xj("BELOW", 2), jy = new Xj("INLINE", 3), new ri("org.eclipse.elk.labelSide", Ey); + } + function OFn(n, e) { + var t; + if (n.ni() && e != null) { + for (t = 0; t < n.i; ++t) + if (tt(e, n.g[t])) + return t; + } else + for (t = 0; t < n.i; ++t) + if (B(n.g[t]) === B(e)) + return t; + return -1; + } + function H3e(n, e, t) { + var i, r; + return e.c == (sr(), Lc) && t.c == Au ? -1 : e.c == Au && t.c == Lc ? 1 : (i = jDn(e.a, n.a), r = jDn(t.a, n.a), e.c == Lc ? r - i : i - r); + } + function vb(n, e, t) { + if (t && (e < 0 || e > t.a.c.length)) + throw T(new Hn("index must be >= 0 and <= layer node count")); + n.c && Qc(n.c.a, n), n.c = t, t && J0(t.a, e, n); + } + function DFn(n, e) { + var t, i, r; + for (i = new re(ue(Kh(n).a.Kc(), new Mn())); Se(i); ) + return t = u(ve(i), 17), r = u(e.Kb(t), 10), new Zy(pe(r.n.b + r.o.b / 2)); + return Rv(), Rv(), rR; + } + function $Fn(n, e) { + this.c = new we(), this.a = n, this.b = e, this.d = u(k(n, (G(), Ig)), 304), B(k(n, (nn(), ysn))) === B((K8(), xS)) ? this.e = new h9n() : this.e = new f9n(); + } + function q3e(n, e) { + var t, i, r, c; + for (c = 0, i = new E(n); i.a < i.c.c.length; ) + t = u(y(i), 33), c += j.Math.pow(t.g * t.f - e, 2); + return r = j.Math.sqrt(c / (n.c.length - 1)), r; + } + function w6(n, e) { + var t, i; + return i = null, n.Xe((Xe(), Ap)) && (t = u(n.We(Ap), 94), t.Xe(e) && (i = t.We(e))), i == null && n.yf() && (i = n.yf().We(e)), i == null && (i = cn(e)), i; + } + function hx(n, e) { + var t, i; + t = n.Zc(e); + try { + return i = t.Pb(), t.Qb(), i; + } catch (r) { + throw r = Et(r), I(r, 109) ? T(new mr("Can't remove element " + e)) : T(r); + } + } + function G3e(n, e) { + var t, i, r; + if (i = new Tj(), r = new _V(i.q.getFullYear() - Tl, i.q.getMonth(), i.q.getDate()), t = zye(n, e, r), t == 0 || t < e.length) + throw T(new Hn(e)); + return r; + } + function lJ(n, e) { + var t, i, r; + for (_n(e), Yz(e != n), r = n.b.c.length, i = e.Kc(); i.Ob(); ) + t = i.Pb(), W(n.b, _n(t)); + return r != n.b.c.length ? (JV(n, 0), !0) : !1; + } + function C7() { + C7 = N, Brn = (Xe(), NP), new tr(WK, (qn(), !0)), hWn = nd, lWn = Kg, aWn = _l, fWn = _g, _rn = ky, dWn = cw, Nrn = (fJ(), sWn), xrn = cWn, Lrn = uWn, Rrn = oWn, uS = rWn; + } + function z3e(n, e) { + if (e == n.c) + return n.d; + if (e == n.d) + return n.c; + throw T(new Hn("'port' must be either the source port or target port of the edge.")); + } + function U3e(n, e, t) { + var i, r; + switch (r = n.o, i = n.d, e.g) { + case 1: + return -i.d - t; + case 3: + return r.b + i.a + t; + case 2: + return r.a + i.c + t; + case 4: + return -i.b - t; + default: + return 0; + } + } + function aJ(n, e, t, i) { + var r, c, o, f; + for (jr(e, u(i.Xb(0), 29)), f = i.bd(1, i.gc()), c = u(t.Kb(e), 20).Kc(); c.Ob(); ) + r = u(c.Pb(), 17), o = r.c.i == e ? r.d.i : r.c.i, aJ(n, o, t, f); + } + function FFn(n) { + var e; + return e = new we(), ai(n, (G(), P_)) ? u(k(n, P_), 83) : (_t(pt(new $n(null, new xn(n.j, 16)), new nbn()), new F5n(e)), H(n, P_, e), e); + } + function dJ(n, e) { + var t, i; + return n.Db >> 16 == 6 ? n.Cb.ih(n, 6, bi, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || ($c(), XP)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function bJ(n, e) { + var t, i; + return n.Db >> 16 == 7 ? n.Cb.ih(n, 1, Iy, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || ($c(), e1n)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function wJ(n, e) { + var t, i; + return n.Db >> 16 == 9 ? n.Cb.ih(n, 9, Ot, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || ($c(), i1n)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function xFn(n, e) { + var t, i; + return n.Db >> 16 == 5 ? n.Cb.ih(n, 9, iI, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || (Sn(), N1)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function gJ(n, e) { + var t, i; + return n.Db >> 16 == 3 ? n.Cb.ih(n, 0, Dy, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || (Sn(), L1)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function LFn(n, e) { + var t, i; + return n.Db >> 16 == 7 ? n.Cb.ih(n, 6, Vo, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || (Sn(), R1)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function NFn() { + this.a = new q2n(), this.g = new HT(), this.j = new HT(), this.b = new we(), this.d = new HT(), this.i = new HT(), this.k = new we(), this.c = new we(), this.e = new we(), this.f = new we(); + } + function W3e(n, e, t) { + var i, r, c; + for (t < 0 && (t = 0), c = n.i, r = t; r < c; r++) + if (i = D(n, r), e == null) { + if (i == null) + return r; + } else if (B(e) === B(i) || tt(e, i)) + return r; + return -1; + } + function X3e(n, e) { + var t, i; + return t = e.Hh(n.a), t ? (i = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), DA)), An(Tk, i) ? I5(n, is(e.Hj())) : i) : null; + } + function c4(n, e) { + var t, i; + if (e) { + if (e == n) + return !0; + for (t = 0, i = u(e, 49).eh(); i && i != e; i = i.eh()) { + if (++t > JL) + return c4(n, i); + if (i == n) + return !0; + } + } + return !1; + } + function V3e(n) { + switch (dE(), n.q.g) { + case 5: + yLn(n, (J(), Kn)), yLn(n, ae); + break; + case 4: + gNn(n, (J(), Kn)), gNn(n, ae); + break; + default: + g_n(n, (J(), Kn)), g_n(n, ae); + } + } + function Q3e(n) { + switch (dE(), n.q.g) { + case 5: + LLn(n, (J(), Vn)), LLn(n, Gn); + break; + case 4: + W$n(n, (J(), Vn)), W$n(n, Gn); + break; + default: + p_n(n, (J(), Vn)), p_n(n, Gn); + } + } + function J3e(n) { + var e, t; + e = u(k(n, (Go(), eWn)), 19), e ? (t = e.a, t == 0 ? H(n, (dl(), cS), new OF()) : H(n, (dl(), cS), new EC(t))) : H(n, (dl(), cS), new EC(1)); + } + function Y3e(n, e) { + var t; + switch (t = n.i, e.g) { + case 1: + return -(n.n.b + n.o.b); + case 2: + return n.n.a - t.o.a; + case 3: + return n.n.b - t.o.b; + case 4: + return -(n.n.a + n.o.a); + } + return 0; + } + function Z3e(n, e) { + switch (n.g) { + case 0: + return e == (Ss(), xl) ? TS : MS; + case 1: + return e == (Ss(), xl) ? TS : Hk; + case 2: + return e == (Ss(), xl) ? Hk : MS; + default: + return Hk; + } + } + function T7(n, e) { + var t, i, r; + for (Qc(n.a, e), n.e -= e.r + (n.a.c.length == 0 ? 0 : n.c), r = ttn, i = new E(n.a); i.a < i.c.c.length; ) + t = u(y(i), 187), r = j.Math.max(r, t.d); + n.b = r; + } + function pJ(n, e) { + var t, i; + return n.Db >> 16 == 3 ? n.Cb.ih(n, 12, Ot, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || ($c(), n1n)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function vJ(n, e) { + var t, i; + return n.Db >> 16 == 11 ? n.Cb.ih(n, 10, Ot, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || ($c(), t1n)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function BFn(n, e) { + var t, i; + return n.Db >> 16 == 10 ? n.Cb.ih(n, 11, ro, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || (Sn(), B1)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function RFn(n, e) { + var t, i; + return n.Db >> 16 == 10 ? n.Cb.ih(n, 12, co, e) : (i = ir(u(On((t = u(Rn(n, 16), 26), t || (Sn(), aw)), n.Db >> 16), 18)), n.Cb.ih(n, i.n, i.f, e)); + } + function qs(n) { + var e; + return !(n.Bb & 1) && n.r && n.r.kh() && (e = u(n.r, 49), n.r = u(pl(n, e), 138), n.r != e && n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 9, 8, e, n.r))), n.r; + } + function lx(n, e, t) { + var i; + return i = A(M(Ci, 1), vr, 25, 15, [qJ(n, (_o(), Zr), e, t), qJ(n, xc, e, t), qJ(n, nc, e, t)]), n.f && (i[0] = j.Math.max(i[0], i[2]), i[2] = i[0]), i; + } + function n4e(n, e) { + var t, i, r; + if (r = Xpe(n, e), r.c.length != 0) + for (wi(r, new e0n()), t = r.c.length, i = 0; i < t; i++) + h4(n, (Ln(i, r.c.length), u(r.c[i], 286)), k7e(n, r, i)); + } + function e4e(n) { + var e, t, i, r; + for (r = u(ct(n.a, (Vw(), AS)), 15).Kc(); r.Ob(); ) + for (i = u(r.Pb(), 101), t = k2(i.k).Kc(); t.Ob(); ) + e = u(t.Pb(), 61), d3(n, i, e, (Hd(), Fl), 1); + } + function t4e(n) { + var e, t; + if (n.k == (Qn(), pi)) { + for (t = new re(ue(Kh(n).a.Kc(), new Mn())); Se(t); ) + if (e = u(ve(t), 17), !Wi(e) && n.c == TJ(e, n).c) + return !0; + } + return !1; + } + function i4e(n) { + var e, t; + if (n.k == (Qn(), pi)) { + for (t = new re(ue(Kh(n).a.Kc(), new Mn())); Se(t); ) + if (e = u(ve(t), 17), !Wi(e) && e.c.i.c == e.d.i.c) + return !0; + } + return !1; + } + function r4e(n, e) { + var t, i, r, c; + for (le(e, "Dull edge routing", 1), c = _e(n.b, 0); c.b != c.d.c; ) + for (r = u(Re(c), 86), i = _e(r.d, 0); i.b != i.d.c; ) + t = u(Re(i), 188), _s(t.a); + } + function c4e(n, e) { + var t, i, r, c, o; + if (e) + for (r = e.a.length, t = new ha(r), o = (t.b - t.a) * t.c < 0 ? (nl(), Jl) : new rl(t); o.Ob(); ) + c = u(o.Pb(), 19), i = y3(e, c.a), i && fNn(n, i); + } + function u4e() { + FG(); + var n, e; + for (TTe((ol(), Nn)), pTe(Nn), fx(Nn), p1n = (Sn(), Cf), e = new E(M1n); e.a < e.c.c.length; ) + n = u(y(e), 241), y4(n, Cf, null); + return !0; + } + function mJ(n, e) { + var t, i, r, c, o, f, h, l; + return h = n.h >> 19, l = e.h >> 19, h != l ? l - h : (r = n.h, f = e.h, r != f ? r - f : (i = n.m, o = e.m, i != o ? i - o : (t = n.l, c = e.l, t - c))); + } + function WT() { + WT = N, urn = (dM(), ER), crn = new In(snn, urn), rrn = (RC(), jR), irn = new In(onn, rrn), trn = ($T(), yR), ern = new In(fnn, trn), nrn = new In(hnn, (qn(), !0)); + } + function g6(n, e, t) { + var i, r; + i = e * t, I(n.g, 145) ? (r = S2(n), r.f.d ? r.f.a || (n.d.a += i + bf) : (n.d.d -= i + bf, n.d.a += i + bf)) : I(n.g, 10) && (n.d.d -= i, n.d.a += 2 * i); + } + function _Fn(n, e, t) { + var i, r, c, o, f; + for (r = n[t.g], f = new E(e.d); f.a < f.c.c.length; ) + o = u(y(f), 101), c = o.i, c && c.i == t && (i = o.d[t.g], r[i] = j.Math.max(r[i], c.j.b)); + } + function s4e(n, e) { + var t, i, r, c, o; + for (i = 0, r = 0, t = 0, o = new E(e.d); o.a < o.c.c.length; ) + c = u(y(o), 443), GT(c), i = j.Math.max(i, c.b), r += c.d + (t > 0 ? n.g : 0), ++t; + e.b = i, e.e = r; + } + function KFn(n) { + var e, t, i; + if (i = n.b, f7n(n.i, i.length)) { + for (t = i.length * 2, n.b = F(oR, nk, 317, t, 0, 1), n.c = F(oR, nk, 317, t, 0, 1), n.f = t - 1, n.i = 0, e = n.a; e; e = e.c) + D7(n, e, e); + ++n.g; + } + } + function o4e(n, e, t, i) { + var r, c, o, f; + for (r = 0; r < e.o; r++) + for (c = r - e.j + t, o = 0; o < e.p; o++) + f = o - e.k + i, zw(e, r, o) ? n3e(n, c, f) || p3e(n, c, f) : aFn(e, r, o) && (oFn(n, c, f) || v3e(n, c, f)); + } + function f4e(n, e, t) { + var i; + i = e.c.i, i.k == (Qn(), pi) ? (H(n, (G(), Xo), u(k(i, Xo), 11)), H(n, Ys, u(k(i, Ys), 11))) : (H(n, (G(), Xo), e.c), H(n, Ys, t.d)); + } + function u4(n, e, t) { + eg(); + var i, r, c, o, f, h; + return o = e / 2, c = t / 2, i = j.Math.abs(n.a), r = j.Math.abs(n.b), f = 1, h = 1, i > o && (f = o / i), r > c && (h = c / r), If(n, j.Math.min(f, h)), n; + } + function h4e() { + mM(); + var n, e; + try { + if (e = u(PJ((Z1(), uo), R4), 2014), e) + return e; + } catch (t) { + if (t = Et(t), I(t, 102)) + n = t, gW((je(), n)); + else + throw T(t); + } + return new R2n(); + } + function l4e() { + DPn(); + var n, e; + try { + if (e = u(PJ((Z1(), uo), Ha), 2024), e) + return e; + } catch (t) { + if (t = Et(t), I(t, 102)) + n = t, gW((je(), n)); + else + throw T(t); + } + return new r3n(); + } + function a4e() { + mM(); + var n, e; + try { + if (e = u(PJ((Z1(), uo), Vs), 1941), e) + return e; + } catch (t) { + if (t = Et(t), I(t, 102)) + n = t, gW((je(), n)); + else + throw T(t); + } + return new lpn(); + } + function d4e(n, e, t) { + var i, r; + return r = n.e, n.e = e, n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 4, r, e), t ? t.Ei(i) : t = i), r != e && (e ? t = y4(n, uM(n, e), t) : t = y4(n, n.a, t)), t; + } + function HFn() { + Tj.call(this), this.e = -1, this.a = !1, this.p = Bi, this.k = -1, this.c = -1, this.b = -1, this.g = !1, this.f = -1, this.j = -1, this.n = -1, this.i = -1, this.d = -1, this.o = Bi; + } + function b4e(n, e) { + var t, i, r; + if (i = n.b.d.d, n.a || (i += n.b.d.a), r = e.b.d.d, e.a || (r += e.b.d.a), t = ni(i, r), t == 0) { + if (!n.a && e.a) + return -1; + if (!e.a && n.a) + return 1; + } + return t; + } + function w4e(n, e) { + var t, i, r; + if (i = n.b.b.d, n.a || (i += n.b.b.a), r = e.b.b.d, e.a || (r += e.b.b.a), t = ni(i, r), t == 0) { + if (!n.a && e.a) + return -1; + if (!e.a && n.a) + return 1; + } + return t; + } + function g4e(n, e) { + var t, i, r; + if (i = n.b.g.d, n.a || (i += n.b.g.a), r = e.b.g.d, e.a || (r += e.b.g.a), t = ni(i, r), t == 0) { + if (!n.a && e.a) + return -1; + if (!e.a && n.a) + return 1; + } + return t; + } + function kJ() { + kJ = N, wWn = ju(Ze(Ze(Ze(new li(), (Vi(), Tc), (rr(), ycn)), Tc, jcn), Or, Ecn), Or, hcn), pWn = Ze(Ze(new li(), Tc, icn), Tc, lcn), gWn = ju(new li(), Or, dcn); + } + function p4e(n) { + var e, t, i, r, c; + for (e = u(k(n, (G(), Am)), 83), c = n.n, i = e.Cc().Kc(); i.Ob(); ) + t = u(i.Pb(), 306), r = t.i, r.c += c.a, r.d += c.b, t.c ? rBn(t) : cBn(t); + H(n, Am, null); + } + function v4e(n, e, t) { + var i, r; + switch (r = n.b, i = r.d, e.g) { + case 1: + return -i.d - t; + case 2: + return r.o.a + i.c + t; + case 3: + return r.o.b + i.a + t; + case 4: + return -i.b - t; + default: + return -1; + } + } + function m4e(n) { + var e, t, i, r, c; + if (i = 0, r = O4, n.b) + for (e = 0; e < 360; e++) + t = e * 0.017453292519943295, hZ(n, n.d, 0, 0, ag, t), c = n.b.ig(n.d), c < r && (i = t, r = c); + hZ(n, n.d, 0, 0, ag, i); + } + function k4e(n, e) { + var t, i, r, c; + for (c = new we(), e.e = null, e.f = null, i = new E(e.i); i.a < i.c.c.length; ) + t = u(y(i), 65), r = u(te(n.g, t.a), 46), t.a = qE(t.b), it(c, t.a, r); + n.g = c; + } + function y4e(n, e, t) { + var i, r, c, o, f, h; + for (r = e - n.e, c = r / n.d.c.length, o = 0, h = new E(n.d); h.a < h.c.c.length; ) + f = u(y(h), 443), i = n.b - f.b + t, w$n(f, f.e + o * c, f.f), t3e(f, c, i), ++o; + } + function qFn(n) { + var e; + if (n.f.qj(), n.b != -1) { + if (++n.b, e = n.f.d[n.a], n.b < e.i) + return; + ++n.a; + } + for (; n.a < n.f.d.length; ++n.a) + if (e = n.f.d[n.a], e && e.i != 0) { + n.b = 0; + return; + } + n.b = -1; + } + function j4e(n, e) { + var t, i, r; + for (r = e.c.length, t = y6e(n, r == 0 ? "" : (Ln(0, e.c.length), Ce(e.c[0]))), i = 1; i < r && t; ++i) + t = u(t, 49).oh((Ln(i, e.c.length), Ce(e.c[i]))); + return t; + } + function GFn(n, e) { + var t, i; + for (i = new E(e); i.a < i.c.c.length; ) + t = u(y(i), 10), n.c[t.c.p][t.p].a = oW(n.i), n.c[t.c.p][t.p].d = K(n.c[t.c.p][t.p].a), n.c[t.c.p][t.p].b = 1; + } + function E4e(n, e) { + var t, i, r, c; + for (c = 0, i = new E(n); i.a < i.c.c.length; ) + t = u(y(i), 157), c += j.Math.pow(du(t) * zu(t) - e, 2); + return r = j.Math.sqrt(c / (n.c.length - 1)), r; + } + function zFn(n, e, t, i) { + var r, c, o; + return c = Q7e(n, e, t, i), o = rZ(n, c), yx(n, e, t, i), $$(n.b), Pn(), wi(c, new b6n(n)), r = rZ(n, c), yx(n, t, e, i), $$(n.b), new Pi(Q(o), Q(r)); + } + function C4e(n, e, t) { + var i, r; + for (le(t, "Interactive node placement", 1), n.a = u(k(e, (G(), Ig)), 304), r = new E(e.b); r.a < r.c.c.length; ) + i = u(y(r), 29), o7e(n, i); + ce(t); + } + function T4e(n, e) { + var t; + le(e, "General Compactor", 1), e.n && n && go(e, po(n), (Vu(), gs)), t = v2e(u(hn(n, (pb(), AK)), 380)), t.hg(n), e.n && n && go(e, po(n), (Vu(), gs)); + } + function M4e(n, e, t) { + var i, r; + for (uE(n, n.j + e, n.k + t), r = new ie((!n.a && (n.a = new Yt(io, n, 5)), n.a)); r.e != r.i.gc(); ) + i = u(oe(r), 469), mz(i, i.a + e, i.b + t); + cE(n, n.b + e, n.c + t); + } + function yJ(n, e, t, i) { + switch (t) { + case 7: + return !n.e && (n.e = new Fn(bi, n, 7, 4)), Dc(n.e, e, i); + case 8: + return !n.d && (n.d = new Fn(bi, n, 8, 5)), Dc(n.d, e, i); + } + return vx(n, e, t, i); + } + function jJ(n, e, t, i) { + switch (t) { + case 7: + return !n.e && (n.e = new Fn(bi, n, 7, 4)), Gi(n.e, e, i); + case 8: + return !n.d && (n.d = new Fn(bi, n, 8, 5)), Gi(n.d, e, i); + } + return tF(n, e, t, i); + } + function A4e(n, e, t) { + var i, r, c, o, f; + if (t) + for (c = t.a.length, i = new ha(c), f = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); f.Ob(); ) + o = u(f.Pb(), 19), r = y3(t, o.a), r && kLn(n, r, e); + } + function XT(n, e, t) { + var i, r, c, o, f; + return n.qj(), c = e == null ? 0 : kt(e), n.f > 0 && (o = (c & nt) % n.d.length, r = kY(n, o, c, e), r) ? (f = r.ed(t), f) : (i = n.tj(c, e, t), n.c.Fc(i), null); + } + function EJ(n, e) { + var t, i, r, c; + switch (g1(n, e)._k()) { + case 3: + case 2: { + for (t = ig(e), r = 0, c = t.i; r < c; ++r) + if (i = u(D(t, r), 34), Pd(Er(n, i)) == 5) + return i; + break; + } + } + return null; + } + function S4e(n) { + var e, t, i, r, c; + if (f7n(n.f, n.b.length)) + for (i = F(dzn, nk, 330, n.b.length * 2, 0, 1), n.b = i, r = i.length - 1, t = n.a; t != n; t = t.Rd()) + c = u(t, 330), e = c.d & r, c.a = i[e], i[e] = c; + } + function UFn(n, e) { + var t, i, r, c; + for (c = 0, r = u(u(ct(n.r, e), 21), 84).Kc(); r.Ob(); ) + i = u(r.Pb(), 111), c = j.Math.max(c, i.e.a + i.b.rf().a); + t = u(wr(n.b, e), 124), t.n.b = 0, t.a.a = c; + } + function WFn(n, e) { + var t, i, r, c; + for (t = 0, c = u(u(ct(n.r, e), 21), 84).Kc(); c.Ob(); ) + r = u(c.Pb(), 111), t = j.Math.max(t, r.e.b + r.b.rf().b); + i = u(wr(n.b, e), 124), i.n.d = 0, i.a.b = t; + } + function P4e(n) { + var e, t; + return t = u(k(n, (G(), Ac)), 21), e = iE($Jn), t.Hc((fr(), Mg)) && cs(e, LJn), t.Hc(Mm) && cs(e, NJn), t.Hc(cv) && cs(e, FJn), t.Hc(uv) && cs(e, xJn), e; + } + function I4e(n, e) { + var t; + le(e, "Delaunay triangulation", 1), t = new X(), Yc(n.i, new L6n(t)), on(sn(k(n, (R3(), pm)))), n.e ? Xi(n.e, D_n(t)) : n.e = D_n(t), ce(e); + } + function CJ(n) { + if (n < 0) + throw T(new Hn("The input must be positive")); + return n < Nfn.length ? Fd(Nfn[n]) : j.Math.sqrt(ag * n) * (hge(n, n) / sQ(2.718281828459045, n)); + } + function s4(n, e) { + var t; + if (n.ni() && e != null) { + for (t = 0; t < n.i; ++t) + if (tt(e, n.g[t])) + return !0; + } else + for (t = 0; t < n.i; ++t) + if (B(n.g[t]) === B(e)) + return !0; + return !1; + } + function O4e(n, e) { + if (e == null) { + for (; n.a.Ob(); ) + if (u(n.a.Pb(), 42).dd() == null) + return !0; + } else + for (; n.a.Ob(); ) + if (tt(e, u(n.a.Pb(), 42).dd())) + return !0; + return !1; + } + function D4e(n, e) { + var t, i, r; + return e === n ? !0 : I(e, 664) ? (r = u(e, 1947), P$n((i = n.g, i || (n.g = new MI(n))), (t = r.g, t || (r.g = new MI(r))))) : !1; + } + function $4e(n) { + var e, t, i, r; + for (e = "Sz", t = "ez", r = j.Math.min(n.length, 5), i = r - 1; i >= 0; i--) + if (An(n[i].d, e) || An(n[i].d, t)) { + n.length >= i + 1 && n.splice(0, i + 1); + break; + } + return n; + } + function M7(n, e) { + var t; + return Fr(n) && Fr(e) && (t = n / e, ik < t && t < Fa) ? t < 0 ? j.Math.ceil(t) : j.Math.floor(t) : bl(IZ(Fr(n) ? Ks(n) : n, Fr(e) ? Ks(e) : e, !1)); + } + function TJ(n, e) { + if (e == n.c.i) + return n.d.i; + if (e == n.d.i) + return n.c.i; + throw T(new Hn("'node' must either be the source node or target node of the edge.")); + } + function F4e(n) { + var e, t, i, r; + if (r = u(k(n, (G(), aun)), 37), r) { + for (i = new Li(), e = qi(n.c.i); e != r; ) + t = e.e, e = qi(t), W0(st(st(i, t.n), e.c), e.d.b, e.d.d); + return i; + } + return xWn; + } + function x4e(n) { + var e; + e = u(k(n, (G(), ov)), 403), _t(qr(new $n(null, new xn(e.d, 16)), new B0n()), new D5n(n)), _t(pt(new $n(null, new xn(e.d, 16)), new R0n()), new $5n(n)); + } + function ax(n, e) { + var t, i, r, c; + for (r = e ? ei(n) : Lr(n), i = new re(ue(r.a.Kc(), new Mn())); Se(i); ) + if (t = u(ve(i), 17), c = TJ(t, n), c.k == (Qn(), pi) && c.c != n.c) + return c; + return null; + } + function L4e(n) { + var e, t, i; + for (t = new E(n.p); t.a < t.c.c.length; ) + e = u(y(t), 10), e.k == (Qn(), ii) && (i = e.o.b, n.i = j.Math.min(n.i, i), n.g = j.Math.max(n.g, i)); + } + function XFn(n, e, t) { + var i, r, c; + for (c = new E(e); c.a < c.c.c.length; ) + i = u(y(c), 10), n.c[i.c.p][i.p].e = !1; + for (r = new E(e); r.a < r.c.c.length; ) + i = u(y(r), 10), LZ(n, i, t); + } + function dx(n, e, t) { + var i, r; + i = Kw(e.j, t.s, t.c) + Kw(t.e, e.s, e.c), r = Kw(t.j, e.s, e.c) + Kw(e.e, t.s, t.c), i == r ? i > 0 && (n.b += 2, n.a += i) : (n.b += 1, n.a += j.Math.min(i, r)); + } + function VFn(n, e) { + var t, i; + if (i = !1, yi(e) && (i = !0, j2(n, new nb(Ce(e)))), i || I(e, 236) && (i = !0, j2(n, (t = PU(u(e, 236)), new nj(t)))), !i) + throw T(new UI(Btn)); + } + function N4e(n, e, t, i) { + var r, c, o; + return r = new Lh(n.e, 1, 10, (o = e.c, I(o, 88) ? u(o, 26) : (Sn(), so)), (c = t.c, I(c, 88) ? u(c, 26) : (Sn(), so)), m1(n, e), !1), i ? i.Ei(r) : i = r, i; + } + function MJ(n) { + var e, t; + switch (u(k(qi(n), (nn(), dsn)), 420).g) { + case 0: + return e = n.n, t = n.o, new fn(e.a + t.a / 2, e.b + t.b / 2); + case 1: + return new kr(n.n); + default: + return null; + } + } + function A7() { + A7 = N, LS = new c5(Xh, 0), Ycn = new c5("LEFTUP", 1), nun = new c5("RIGHTUP", 2), Jcn = new c5("LEFTDOWN", 3), Zcn = new c5("RIGHTDOWN", 4), p_ = new c5("BALANCED", 5); + } + function B4e(n, e, t) { + var i, r, c; + if (i = ni(n.a[e.p], n.a[t.p]), i == 0) { + if (r = u(k(e, (G(), gp)), 15), c = u(k(t, gp), 15), r.Hc(t)) + return -1; + if (c.Hc(e)) + return 1; + } + return i; + } + function R4e(n) { + switch (n.g) { + case 1: + return new Ogn(); + case 2: + return new Dgn(); + case 3: + return new Ign(); + case 0: + return null; + default: + throw T(new Hn(lB + (n.f != null ? n.f : "" + n.g))); + } + } + function AJ(n, e, t) { + switch (e) { + case 1: + !n.n && (n.n = new V(Rr, n, 1, 7)), de(n.n), !n.n && (n.n = new V(Rr, n, 1, 7)), Ft(n.n, u(t, 14)); + return; + case 2: + Q5(n, Ce(t)); + return; + } + WV(n, e, t); + } + function SJ(n, e, t) { + switch (e) { + case 3: + Rd(n, K(Y(t))); + return; + case 4: + _d(n, K(Y(t))); + return; + case 5: + Zc(n, K(Y(t))); + return; + case 6: + nu(n, K(Y(t))); + return; + } + AJ(n, e, t); + } + function VT(n, e, t) { + var i, r, c; + c = (i = new _I(), i), r = af(c, e, null), r && r.Fi(), Oc(c, t), me((!n.c && (n.c = new V(I0, n, 12, 10)), n.c), c), b1(c, 0), lb(c, 1), v1(c, !0), p1(c, !0); + } + function PJ(n, e) { + var t, i, r; + return t = n5(n.g, e), I(t, 235) ? (r = u(t, 235), r.Qh() == null, r.Nh()) : I(t, 498) ? (i = u(t, 1938), r = i.b, r) : null; + } + function _4e(n, e, t, i) { + var r, c; + return pe(e), pe(t), c = u(M5(n.d, e), 19), NPn(!!c, "Row %s not in %s", e, n.e), r = u(M5(n.b, t), 19), NPn(!!r, "Column %s not in %s", t, n.c), HOn(n, c.a, r.a, i); + } + function QFn(n, e, t, i, r, c, o) { + var f, h, l, a, d; + if (a = r[c], l = c == o - 1, f = l ? i : 0, d = pFn(f, a), i != 10 && A(M(n, o - c), e[c], t[c], f, d), !l) + for (++c, h = 0; h < a; ++h) + d[h] = QFn(n, e, t, i, r, c, o); + return d; + } + function p6(n) { + if (n.g == -1) + throw T(new ou()); + n.mj(); + try { + n.i.$c(n.g), n.f = n.i.j, n.g < n.e && --n.e, n.g = -1; + } catch (e) { + throw e = Et(e), I(e, 73) ? T(new vs()) : T(e); + } + } + function v6(n, e) { + return n.b.a = j.Math.min(n.b.a, e.c), n.b.b = j.Math.min(n.b.b, e.d), n.a.a = j.Math.max(n.a.a, e.c), n.a.b = j.Math.max(n.a.b, e.d), n.c[n.c.length] = e, !0; + } + function K4e(n) { + var e, t, i, r; + for (r = -1, i = 0, t = new E(n); t.a < t.c.c.length; ) { + if (e = u(y(t), 243), e.c == (sr(), Au)) { + r = i == 0 ? 0 : i - 1; + break; + } else + i == n.c.length - 1 && (r = i); + i += 1; + } + return r; + } + function H4e(n) { + var e, t, i, r; + for (r = 0, e = 0, i = new E(n.c); i.a < i.c.c.length; ) + t = u(y(i), 33), Zc(t, n.e + r), nu(t, n.f), r += t.g + n.b, e = j.Math.max(e, t.f + n.b); + n.d = r - n.b, n.a = e - n.b; + } + function Ww(n) { + var e, t, i; + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 57), i = e.d.c, e.d.c = e.d.d, e.d.d = i, i = e.d.b, e.d.b = e.d.a, e.d.a = i, i = e.b.a, e.b.a = e.b.b, e.b.b = i; + GY(n); + } + function Xw(n) { + var e, t, i; + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), i = e.g.c, e.g.c = e.g.d, e.g.d = i, i = e.g.b, e.g.b = e.g.a, e.g.a = i, i = e.e.a, e.e.a = e.e.b, e.e.b = i; + oM(n); + } + function q4e(n) { + var e, t, i, r, c; + for (c = k2(n.k), t = (J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn])), i = 0, r = t.length; i < r; ++i) + if (e = t[i], e != Xr && !c.Hc(e)) + return e; + return null; + } + function bx(n, e) { + var t, i; + return i = u(Gz(fF(pt(new $n(null, new xn(e.j, 16)), new lwn()))), 11), i && (t = u(un(i.e, 0), 17), t) ? u(k(t, (G(), bc)), 19).a : v0e(n.b); + } + function G4e(n, e) { + var t, i, r, c; + for (c = new E(e.a); c.a < c.c.c.length; ) + for (r = u(y(c), 10), qv(n.d), i = new re(ue(ei(r).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), zLn(n, r, t.d.i); + } + function z4e(n, e) { + var t, i; + for (Qc(n.b, e), i = new E(n.n); i.a < i.c.c.length; ) + if (t = u(y(i), 211), xr(t.c, e, 0) != -1) { + Qc(t.c, e), H4e(t), t.c.c.length == 0 && Qc(n.n, t); + break; + } + ije(n); + } + function JFn(n, e) { + var t, i, r, c, o; + for (o = n.f, r = 0, c = 0, i = new E(n.a); i.a < i.c.c.length; ) + t = u(y(i), 187), k7(t, n.e, o), B8(t, e), c = j.Math.max(c, t.r), o += t.d + n.c, r = o; + n.d = c, n.b = r; + } + function YFn(n) { + var e, t; + return t = N7(n), j3(t) ? null : (e = (pe(t), u(sFn(new re(ue(t.a.Kc(), new Mn()))), 79)), Ir(u(D((!e.b && (e.b = new Fn(he, e, 4, 7)), e.b), 0), 82))); + } + function QT(n) { + var e; + return n.o || (e = n.Lj(), e ? n.o = new LW(n, n, null) : n.rk() ? n.o = new bU(n, null) : Pd(Er((wu(), xi), n)) == 1 ? n.o = new BAn(n) : n.o = new nD(n, null)), n.o; + } + function U4e(n, e, t, i) { + var r, c, o, f, h; + t.mh(e) && (r = (o = e, o ? u(i, 49).xh(o) : null), r && (h = t.ah(e), f = e.t, f > 1 || f == -1 ? (c = u(h, 15), r.Wb(W2e(n, c))) : r.Wb(Zx(n, u(h, 56))))); + } + function W4e(n, e, t, i) { + N8n(); + var r = iR; + function c() { + for (var o = 0; o < r.length; o++) + r[o](); + } + if (n) + try { + Nee(c)(); + } catch (o) { + n(e, o); + } + else + Nee(c)(); + } + function X4e(n) { + var e, t, i, r, c; + for (i = new Ca(new ia(n.b).a); i.b; ) + t = Bd(i), e = u(t.cd(), 10), c = u(u(t.dd(), 46).a, 10), r = u(u(t.dd(), 46).b, 8), st(Lo(e.n), st(Qr(c.n), r)); + } + function V4e(n) { + switch (u(k(n.b, (nn(), usn)), 375).g) { + case 1: + _t(Xc(qr(new $n(null, new xn(n.d, 16)), new Bbn()), new Rbn()), new _bn()); + break; + case 2: + B7e(n); + break; + case 0: + m6e(n); + } + } + function Q4e(n, e, t) { + var i; + le(t, "Straight Line Edge Routing", 1), t.n && e && go(t, po(e), (Vu(), gs)), i = u(hn(e, (C5(), Xm)), 33), CRn(n, i), t.n && e && go(t, po(e), (Vu(), gs)); + } + function mb() { + mb = N, zK = new h5("V_TOP", 0), gy = new h5("V_CENTER", 1), wy = new h5("V_BOTTOM", 2), GK = new h5("H_LEFT", 3), dy = new h5("H_CENTER", 4), by = new h5("H_RIGHT", 5); + } + function IJ(n) { + var e; + return n.Db & 64 ? MT(n) : (e = new Bs(MT(n)), e.a += " (abstract: ", c1(e, (n.Bb & 256) != 0), e.a += ", interface: ", c1(e, (n.Bb & 512) != 0), e.a += ")", e.a); + } + function J4e(n, e, t, i) { + var r, c, o, f; + return qu(n.e) && (r = e.ak(), f = e.dd(), c = t.dd(), o = hl(n, 1, r, f, c, r.$j() ? v4(n, r, c, I(r, 99) && (u(r, 18).Bb & Ji) != 0) : -1, !0), i ? i.Ei(o) : i = o), i; + } + function Y4e(n) { + var e; + n.c == null && (e = B(n.b) === B(ain) ? null : n.b, n.d = e == null ? iu : mCn(e) ? $ce(FTn(e)) : yi(e) ? VZ : J1(Du(e)), n.a = n.a + ": " + (mCn(e) ? Mue(FTn(e)) : e + ""), n.c = "(" + n.d + ") " + n.a); + } + function OJ(n, e) { + this.e = n, pd(ui(e, -4294967296), 0) ? (this.d = 1, this.a = A(M(be, 1), Le, 25, 15, [ge(e)])) : (this.d = 2, this.a = A(M(be, 1), Le, 25, 15, [ge(e), ge(cl(e, 32))])); + } + function Z4e() { + function n() { + try { + return (/* @__PURE__ */ new Map()).entries().next().done; + } catch { + return !1; + } + } + return typeof Map === CL && Map.prototype.entries && n() ? Map : ECe(); + } + function nve(n, e) { + var t, i, r, c; + for (c = new Ii(n.e, 0), t = 0; c.b < c.d.gc(); ) { + if (i = K((ne(c.b < c.d.gc()), Y(c.d.Xb(c.c = c.b++)))), r = i - e, r > oB) + return t; + r > -1e-6 && ++t; + } + return t; + } + function DJ(n, e) { + var t; + e != n.b ? (t = null, n.b && (t = sC(n.b, n, -4, t)), e && (t = _2(e, n, -4, t)), t = DDn(n, e, t), t && t.Fi()) : n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 3, e, e)); + } + function ZFn(n, e) { + var t; + e != n.f ? (t = null, n.f && (t = sC(n.f, n, -1, t)), e && (t = _2(e, n, -1, t)), t = $Dn(n, e, t), t && t.Fi()) : n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 0, e, e)); + } + function nxn(n) { + var e, t, i; + if (n == null) + return null; + if (t = u(n, 15), t.dc()) + return ""; + for (i = new r1(), e = t.Kc(); e.Ob(); ) + br(i, (ht(), Ce(e.Pb()))), i.a += " "; + return NO(i, i.a.length - 1); + } + function exn(n) { + var e, t, i; + if (n == null) + return null; + if (t = u(n, 15), t.dc()) + return ""; + for (i = new r1(), e = t.Kc(); e.Ob(); ) + br(i, (ht(), Ce(e.Pb()))), i.a += " "; + return NO(i, i.a.length - 1); + } + function eve(n, e, t) { + var i, r; + return i = n.c[e.c.p][e.p], r = n.c[t.c.p][t.p], i.a != null && r.a != null ? TD(i.a, r.a) : i.a != null ? -1 : r.a != null ? 1 : 0; + } + function tve(n, e) { + var t, i, r, c, o, f; + if (e) + for (c = e.a.length, t = new ha(c), f = (t.b - t.a) * t.c < 0 ? (nl(), Jl) : new rl(t); f.Ob(); ) + o = u(f.Pb(), 19), r = y3(e, o.a), i = new tmn(n), zhe(i.a, r); + } + function ive(n, e) { + var t, i, r, c, o, f; + if (e) + for (c = e.a.length, t = new ha(c), f = (t.b - t.a) * t.c < 0 ? (nl(), Jl) : new rl(t); f.Ob(); ) + o = u(f.Pb(), 19), r = y3(e, o.a), i = new W6n(n), Ghe(i.a, r); + } + function rve(n) { + var e; + if (n != null && n.length > 0 && Di(n, n.length - 1) == 33) + try { + return e = Yxn(Zu(n, 0, n.length - 1)), e.e == null; + } catch (t) { + if (t = Et(t), !I(t, 32)) + throw T(t); + } + return !1; + } + function txn(n, e, t) { + var i, r, c; + return i = e.ak(), c = e.dd(), r = i.$j() ? hl(n, 3, i, null, c, v4(n, i, c, I(i, 99) && (u(i, 18).Bb & Ji) != 0), !0) : hl(n, 1, i, i.zj(), c, -1, !0), t ? t.Ei(r) : t = r, t; + } + function cve() { + var n, e, t; + for (e = 0, n = 0; n < 1; n++) { + if (t = CY((Te(n, 1), "X".charCodeAt(n))), t == 0) + throw T(new Ee("Unknown Option: " + "X".substr(n))); + e |= t; + } + return e; + } + function uve(n, e, t) { + var i, r, c; + switch (i = qi(e), r = jT(i), c = new gc(), Hr(c, e), t.g) { + case 1: + si(c, b7(B2(r))); + break; + case 2: + si(c, B2(r)); + } + return H(c, (nn(), Yb), Y(k(n, Yb))), c; + } + function $J(n) { + var e, t; + return e = u(ve(new re(ue(Lr(n.a).a.Kc(), new Mn()))), 17), t = u(ve(new re(ue(ei(n.a).a.Kc(), new Mn()))), 17), on(sn(k(e, (G(), mf)))) || on(sn(k(t, mf))); + } + function Vw() { + Vw = N, SS = new W9("ONE_SIDE", 0), IS = new W9("TWO_SIDES_CORNER", 1), OS = new W9("TWO_SIDES_OPPOSING", 2), PS = new W9("THREE_SIDES", 3), AS = new W9("FOUR_SIDES", 4); + } + function wx(n, e, t, i, r) { + var c, o; + c = u(ts(pt(e.Oc(), new Jbn()), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), o = u(ka(n.b, t, i), 15), r == 0 ? o.Wc(0, c) : o.Gc(c); + } + function sve(n, e) { + var t, i, r, c, o; + for (c = new E(e.a); c.a < c.c.c.length; ) + for (r = u(y(c), 10), i = new re(ue(Lr(r).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), o = t.c.i.p, n.n[o] = n.n[o] - 1; + } + function ove(n, e) { + var t, i, r, c, o; + for (c = new E(e.d); c.a < c.c.c.length; ) + for (r = u(y(c), 101), o = u(te(n.c, r), 112).o, i = new o2(r.b); i.a < i.c.a.length; ) + t = u(G5(i), 61), GX(r, t, o); + } + function fve(n) { + var e, t; + for (t = new E(n.e.b); t.a < t.c.c.length; ) + e = u(y(t), 29), REe(n, e); + _t(pt(qr(qr(new $n(null, new xn(n.e.b, 16)), new Rwn()), new zwn()), new Uwn()), new S6n(n)); + } + function FJ(n, e) { + return e ? n.Di(e) ? !1 : n.i ? n.i.Ei(e) : I(e, 143) ? (n.i = u(e, 143), !0) : (n.i = new U2n(), n.i.Ei(e)) : !1; + } + function hve(n) { + if (n = Ec(n, !0), An(N4, n) || An("1", n)) + return qn(), G4; + if (An(EB, n) || An("0", n)) + return qn(), Ga; + throw T(new VI("Invalid boolean value: '" + n + "'")); + } + function xJ(n, e, t) { + var i, r, c; + for (r = n.vc().Kc(); r.Ob(); ) + if (i = u(r.Pb(), 42), c = i.cd(), B(e) === B(c) || e != null && tt(e, c)) + return t && (i = new Nj(i.cd(), i.dd()), r.Qb()), i; + return null; + } + function lve(n) { + X0(); + var e, t, i; + n.B.Hc((xu(), GP)) && (i = n.f.i, e = new uC(n.a.c), t = new i2(), t.b = e.c - i.c, t.d = e.d - i.d, t.c = i.c + i.b - (e.c + e.b), t.a = i.d + i.a - (e.d + e.a), n.e.Ff(t)); + } + function ixn(n, e, t, i) { + var r, c, o; + for (o = j.Math.min(t, lRn(u(n.b, 65), e, t, i)), c = new E(n.a); c.a < c.c.c.length; ) + r = u(y(c), 221), r != e && (o = j.Math.min(o, ixn(r, e, o, i))); + return o; + } + function LJ(n) { + var e, t, i, r; + for (r = F(vh, q, 193, n.b.c.length, 0, 2), i = new Ii(n.b, 0); i.b < i.d.gc(); ) + e = (ne(i.b < i.d.gc()), u(i.d.Xb(i.c = i.b++), 29)), t = i.b - 1, r[t] = I8(e.a); + return r; + } + function gx(n, e, t, i, r) { + var c, o, f, h; + for (o = Sie(vG(LU(Npe(t)), i), U3e(n, t, r)), h = y1(n, t).Kc(); h.Ob(); ) + f = u(h.Pb(), 11), e[f.p] && (c = e[f.p].i, W(o.d, new jD(c, gQ(o, c)))); + DQ(o); + } + function NJ(n, e) { + this.f = new we(), this.b = new we(), this.j = new we(), this.a = n, this.c = e, this.c > 0 && SFn(this, this.c - 1, (J(), Vn)), this.c < this.a.length - 1 && SFn(this, this.c + 1, (J(), Gn)); + } + function BJ(n) { + n.length > 0 && n[0].length > 0 && (this.c = on(sn(k(qi(n[0][0]), (G(), wun))))), this.a = F(cJn, q, 2018, n.length, 0, 2), this.b = F(uJn, q, 2019, n.length, 0, 2), this.d = new TDn(); + } + function ave(n) { + return n.c.length == 0 ? !1 : (Ln(0, n.c.length), u(n.c[0], 17)).c.i.k == (Qn(), pi) ? !0 : E3(Xc(new $n(null, new xn(n, 16)), new Iwn()), new Own()); + } + function dve(n, e, t) { + return le(t, "Tree layout", 1), pC(n.b), ih(n.b, (r4(), gP), gP), ih(n.b, qm, qm), ih(n.b, uy, uy), ih(n.b, Gm, Gm), n.a = EM(n.b, e), H8e(n, e, yc(t, 1)), ce(t), e; + } + function rxn(n, e) { + var t, i, r, c, o, f, h; + for (f = Tb(e), c = e.f, h = e.g, o = j.Math.sqrt(c * c + h * h), r = 0, i = new E(f); i.a < i.c.c.length; ) + t = u(y(i), 33), r += rxn(n, t); + return j.Math.max(r, o); + } + function Ai() { + Ai = N, ql = new a5(K6, 0), jf = new a5("FREE", 1), Cv = new a5("FIXED_SIDE", 2), id = new a5("FIXED_ORDER", 3), jh = new a5("FIXED_RATIO", 4), Sc = new a5("FIXED_POS", 5); + } + function bve(n, e) { + var t, i, r; + if (t = e.Hh(n.a), t) { + for (r = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), Qs)), i = 1; i < (wu(), I1n).length; ++i) + if (An(I1n[i], r)) + return i; + } + return 0; + } + function wve(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], xh(c, "" + e); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function gve(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], xh(c, "" + e); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function cxn(n) { + var e, t, i; + for (i = new ya(Qi, "{", "}"), t = n.vc().Kc(); t.Ob(); ) + e = u(t.Pb(), 42), xh(i, DAn(n, e.cd()) + "=" + DAn(n, e.dd())); + return i.a ? i.e.length == 0 ? i.a.a : i.a.a + ("" + i.e) : i.c; + } + function pve(n) { + for (var e, t, i, r; !Hv(n.o); ) + t = u(y2(n.o), 46), i = u(t.a, 121), e = u(t.b, 213), r = TT(e, i), e.e == i ? (bE(r.g, e), i.e = r.e + e.a) : (bE(r.b, e), i.e = r.e - e.a), W(n.e.a, i); + } + function RJ(n, e) { + var t, i, r; + for (t = null, r = u(e.Kb(n), 20).Kc(); r.Ob(); ) + if (i = u(r.Pb(), 17), !t) + t = i.c.i == n ? i.d.i : i.c.i; + else if ((i.c.i == n ? i.d.i : i.c.i) != t) + return !1; + return !0; + } + function uxn(n, e) { + var t, i, r, c, o; + for (t = MNn(n, !1, e), r = new E(t); r.a < r.c.c.length; ) + i = u(y(r), 129), i.d == 0 ? (s$(i, null), o$(i, null)) : (c = i.a, o = i.b, s$(i, o), o$(i, c)); + } + function vve(n) { + var e, t; + return e = new li(), cs(e, _Jn), t = u(k(n, (G(), Ac)), 21), t.Hc((fr(), Mm)) && cs(e, GJn), t.Hc(cv) && cs(e, KJn), t.Hc(Mg) && cs(e, qJn), t.Hc(uv) && cs(e, HJn), e; + } + function mve(n) { + var e, t, i, r; + for (Kje(n), t = new re(ue(Kh(n).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 17), i = e.c.i == n, r = i ? e.d : e.c, i ? Ti(e, null) : Ki(e, null), H(e, (G(), mun), r), Sme(n, r.i); + } + function kve(n, e, t, i) { + var r, c; + switch (c = e.i, r = t[c.g][n.d[c.g]], c.g) { + case 1: + r -= i + e.j.b, e.g.b = r; + break; + case 3: + r += i, e.g.b = r; + break; + case 4: + r -= i + e.j.a, e.g.a = r; + break; + case 2: + r += i, e.g.a = r; + } + } + function yve(n) { + var e, t, i; + for (t = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); t.e != t.i.gc(); ) + if (e = u(oe(t), 33), i = N7(e), !Se(new re(ue(i.a.Kc(), new Mn())))) + return e; + return null; + } + function jve() { + var n; + return Fne ? u(d4((Z1(), uo), R4), 2016) : (n = u(I(mc((Z1(), uo), R4), 555) ? mc(uo, R4) : new VLn(), 555), Fne = !0, MEe(n), FTe(n), fx(n), yr(uo, R4, n), n); + } + function px(n, e, t) { + var i, r; + if (n.j == 0) + return t; + if (r = u(PIn(n, e, t), 72), i = t.ak(), !i.Ij() || !n.a.rl(i)) + throw T(new _r("Invalid entry feature '" + i.Hj().zb + "." + i.ne() + "'")); + return r; + } + function Eve(n, e) { + var t, i, r, c, o, f, h, l; + for (f = n.a, h = 0, l = f.length; h < l; ++h) + for (o = f[h], i = o, r = 0, c = i.length; r < c; ++r) + if (t = i[r], B(e) === B(t) || e != null && tt(e, t)) + return !0; + return !1; + } + function Cve(n) { + var e, t, i; + return hc(n, 0) >= 0 ? (t = M7(n, $M), i = p7(n, $M)) : (e = Y0(n, 1), t = M7(e, 5e8), i = p7(e, 5e8), i = Hi(Ih(i, 1), ui(n, 1))), rf(Ih(i, 32), ui(t, hr)); + } + function sxn(n, e, t) { + var i, r; + switch (i = (ne(e.b != 0), u(Ts(e, e.a.a), 8)), t.g) { + case 0: + i.b = 0; + break; + case 2: + i.b = n.f; + break; + case 3: + i.a = 0; + break; + default: + i.a = n.g; + } + return r = _e(e, 0), y8(r, i), e; + } + function oxn(n, e, t, i) { + var r, c, o, f, h; + switch (h = n.b, c = e.d, o = c.j, f = WQ(o, h.d[o.g], t), r = st(Qr(c.n), c.a), c.j.g) { + case 1: + case 3: + f.a += r.a; + break; + case 2: + case 4: + f.b += r.b; + } + Ht(i, f, i.c.b, i.c); + } + function Tve(n, e, t) { + var i, r, c, o; + for (o = xr(n.e, e, 0), c = new Jq(), c.b = t, i = new Ii(n.e, o); i.b < i.d.gc(); ) + r = (ne(i.b < i.d.gc()), u(i.d.Xb(i.c = i.b++), 10)), r.p = t, W(c.e, r), Wu(i); + return c; + } + function Mve(n, e, t, i) { + var r, c, o, f, h; + for (r = null, c = 0, f = new E(e); f.a < f.c.c.length; ) + o = u(y(f), 33), h = o.i + o.g, n < o.j + o.f + i && (r ? t.i - h < t.i - c && (r = o) : r = o, c = r.i + r.g); + return r ? c + i : 0; + } + function Ave(n, e, t, i) { + var r, c, o, f, h; + for (c = null, r = 0, f = new E(e); f.a < f.c.c.length; ) + o = u(y(f), 33), h = o.j + o.f, n < o.i + o.g + i && (c ? t.j - h < t.j - r && (c = o) : c = o, r = c.j + c.f); + return c ? r + i : 0; + } + function Sve(n) { + var e, t, i; + for (e = !1, i = n.b.c.length, t = 0; t < i; t++) + UV(u(un(n.b, t), 434)) ? !e && t + 1 < i && UV(u(un(n.b, t + 1), 434)) && (e = !0, u(un(n.b, t), 434).a = !0) : e = !1; + } + function Pve(n, e, t, i, r) { + var c, o; + for (c = 0, o = 0; o < r; o++) + c = Hi(c, vl(ui(e[o], hr), ui(i[o], hr))), n[o] = ge(c), c = cl(c, 32); + for (; o < t; o++) + c = Hi(c, ui(e[o], hr)), n[o] = ge(c), c = cl(c, 32); + } + function Ive(n, e) { + l4(); + var t, i; + for (i = (jl(), qA), t = n; e > 1; e >>= 1) + e & 1 && (i = Fw(i, t)), t.d == 1 ? t = Fw(t, t) : t = new D$n(KBn(t.a, t.d, F(be, Le, 25, t.d << 1, 15, 1))); + return i = Fw(i, t), i; + } + function _J() { + _J = N; + var n, e, t, i; + for (Kin = F(Ci, vr, 25, 25, 15, 1), Hin = F(Ci, vr, 25, 33, 15, 1), i = 152587890625e-16, e = 32; e >= 0; e--) + Hin[e] = i, i *= 0.5; + for (t = 1, n = 24; n >= 0; n--) + Kin[n] = t, t *= 0.5; + } + function Ove(n) { + var e, t; + if (on(sn(hn(n, (nn(), Jb))))) { + for (t = new re(ue(Gh(n).a.Kc(), new Mn())); Se(t); ) + if (e = u(ve(t), 79), Yd(e) && on(sn(hn(e, Xa)))) + return !0; + } + return !1; + } + function fxn(n, e) { + var t, i, r; + ci(n.f, e) && (e.b = n, i = e.c, xr(n.j, i, 0) != -1 || W(n.j, i), r = e.d, xr(n.j, r, 0) != -1 || W(n.j, r), t = e.a.b, t.c.length != 0 && (!n.i && (n.i = new K$n(n)), Wbe(n.i, t))); + } + function Dve(n) { + var e, t, i, r, c; + return t = n.c.d, i = t.j, r = n.d.d, c = r.j, i == c ? t.p < r.p ? 0 : 1 : yT(i) == c ? 0 : pQ(i) == c ? 1 : (e = n.b, lu(e.b, yT(i)) ? 0 : 1); + } + function JT() { + JT = N, Q_ = new s5(EHn, 0), _sn = new s5("LONGEST_PATH", 1), V_ = new s5("COFFMAN_GRAHAM", 2), Rsn = new s5(PN, 3), Ksn = new s5("STRETCH_WIDTH", 4), sP = new s5("MIN_WIDTH", 5); + } + function Oa(n) { + var e; + this.d = new we(), this.c = n.c, this.e = n.d, this.b = n.b, this.f = new cCn(n.e), this.a = n.a, n.f ? this.g = n.f : this.g = (e = u(xo(nI), 9), new ks(e, u(bo(e, e.length), 9), 0)); + } + function YT(n, e) { + var t, i, r, c, o, f; + r = n, o = q5(r, "layoutOptions"), !o && (o = q5(r, yqn)), o && (f = o, i = null, f && (i = (c = Z$(f, F(tn, q, 2, 0, 6, 1)), new iO(f, c))), i && (t = new kkn(f, e), $i(i, t))); + } + function Ir(n) { + if (I(n, 239)) + return u(n, 33); + if (I(n, 186)) + return nf(u(n, 118)); + throw T(n ? new i1("Only support nodes and ports.") : new c2(Iqn)); + } + function $ve(n, e, t, i) { + return (e >= 0 && An(n.substr(e, 3), "GMT") || e >= 0 && An(n.substr(e, 3), "UTC")) && (t[0] = e + 3), dZ(n, t, i); + } + function Fve(n, e) { + var t, i, r, c, o; + for (c = n.g.a, o = n.g.b, i = new E(n.d); i.a < i.c.c.length; ) + t = u(y(i), 70), r = t.n, r.a = c, n.i == (J(), Kn) ? r.b = o + n.j.b - t.o.b : r.b = o, st(r, e), c += t.o.a + n.e; + } + function le(n, e, t) { + if (n.b) + throw T(new $r("The task is already done.")); + return n.p != null ? !1 : (n.p = e, n.r = t, n.k && (n.o = (Zf(), Ni(eu(Date.now()), E1))), !0); + } + function KJ(n) { + var e, t, i, r, c, o, f; + return f = new r2(), t = n.tg(), r = t != null, r && h3(f, Uf, n.tg()), i = n.ne(), c = i != null, c && h3(f, We, n.ne()), e = n.sg(), o = e != null, o && h3(f, "description", n.sg()), f; + } + function hxn(n, e, t) { + var i, r, c; + return c = n.q, n.q = e, n.Db & 4 && !(n.Db & 1) && (r = new gi(n, 1, 9, c, e), t ? t.Ei(r) : t = r), e ? (i = e.c, i != n.r && (t = n.nk(i, t))) : n.r && (t = n.nk(null, t)), t; + } + function xve(n, e, t) { + var i, r, c, o, f; + for (t = (f = e, _2(f, n.e, -1 - n.c, t)), o = BW(n.a), c = (i = new Ca(new ia(o.a).a), new oj(i)); c.a.b; ) + r = u(Bd(c.a).cd(), 87), t = y4(r, uM(r, n.a), t); + return t; + } + function Lve(n, e, t) { + var i, r, c, o, f; + for (t = (f = e, sC(f, n.e, -1 - n.c, t)), o = BW(n.a), c = (i = new Ca(new ia(o.a).a), new oj(i)); c.a.b; ) + r = u(Bd(c.a).cd(), 87), t = y4(r, uM(r, n.a), t); + return t; + } + function Nve(n, e, t, i) { + var r, c, o; + if (i == 0) + pc(e, 0, n, t, n.length - t); + else + for (o = 32 - i, n[n.length - 1] = 0, c = n.length - 1; c > t; c--) + n[c] |= e[c - t - 1] >>> o, n[c - 1] = e[c - t - 1] << i; + for (r = 0; r < t; r++) + n[r] = 0; + } + function Bve(n) { + var e, t, i, r, c; + for (e = 0, t = 0, c = n.Kc(); c.Ob(); ) + i = u(c.Pb(), 111), e = j.Math.max(e, i.d.b), t = j.Math.max(t, i.d.c); + for (r = n.Kc(); r.Ob(); ) + i = u(r.Pb(), 111), i.d.b = e, i.d.c = t; + } + function Rve(n) { + var e, t, i, r, c; + for (t = 0, e = 0, c = n.Kc(); c.Ob(); ) + i = u(c.Pb(), 111), t = j.Math.max(t, i.d.d), e = j.Math.max(e, i.d.a); + for (r = n.Kc(); r.Ob(); ) + i = u(r.Pb(), 111), i.d.d = t, i.d.a = e; + } + function lxn(n, e) { + var t, i, r, c; + for (c = new X(), r = 0, i = e.Kc(); i.Ob(); ) { + for (t = Q(u(i.Pb(), 19).a + r); t.a < n.f && !Pfe(n, t.a); ) + t = Q(t.a + 1), ++r; + if (t.a >= n.f) + break; + c.c[c.c.length] = t; + } + return c; + } + function HJ(n) { + var e, t, i, r; + for (e = null, r = new E(n.wf()); r.a < r.c.c.length; ) + i = u(y(r), 181), t = new ys(i.qf().a, i.qf().b, i.rf().a, i.rf().b), e ? m6(e, t) : e = t; + return !e && (e = new d2()), e; + } + function vx(n, e, t, i) { + var r, c; + return t == 1 ? (!n.n && (n.n = new V(Rr, n, 1, 7)), Dc(n.n, e, i)) : (c = u(On((r = u(Rn(n, 16), 26), r || n.zh()), t), 66), c.Nj().Qj(n, Bc(n), t - ee(n.zh()), e, i)); + } + function mx(n, e, t) { + var i, r, c, o, f; + for (i = t.gc(), n.qi(n.i + i), f = n.i - e, f > 0 && pc(n.g, e, n.g, e + i, f), o = t.Kc(), n.i += i, r = 0; r < i; ++r) + c = o.Pb(), k5(n, e, n.oi(e, c)), n.bi(e, c), n.ci(), ++e; + return i != 0; + } + function af(n, e, t) { + var i; + return e != n.q ? (n.q && (t = sC(n.q, n, -10, t)), e && (t = _2(e, n, -10, t)), t = hxn(n, e, t)) : n.Db & 4 && !(n.Db & 1) && (i = new gi(n, 1, 9, e, e), t ? t.Ei(i) : t = i), t; + } + function kx(n, e, t, i) { + return OU((t & Nf) == 0, "flatMap does not support SUBSIZED characteristic"), OU((t & 4) == 0, "flatMap does not support SORTED characteristic"), pe(n), pe(e), new gAn(n, t, i, e); + } + function _ve(n, e) { + MW(e, "Cannot suppress a null exception."), TE(e != n, "Exception can not suppress itself."), !n.i && (n.k == null ? n.k = A(M(hR, 1), q, 78, 0, [e]) : n.k[n.k.length] = e); + } + function Qw(n, e, t, i) { + var r, c, o, f, h, l; + for (o = t.length, c = 0, r = -1, l = cIn(n.substr(e), (sD(), Rin)), f = 0; f < o; ++f) + h = t[f].length, h > c && Qfe(l, cIn(t[f], Rin)) && (r = f, c = h); + return r >= 0 && (i[0] = e + c), r; + } + function Kve(n, e) { + var t; + if (t = tyn(n.b.Hf(), e.b.Hf()), t != 0) + return t; + switch (n.b.Hf().g) { + case 1: + case 2: + return Uc(n.b.sf(), e.b.sf()); + case 3: + case 4: + return Uc(e.b.sf(), n.b.sf()); + } + return 0; + } + function Hve(n) { + var e, t, i; + for (i = n.e.c.length, n.a = fa(be, [q, Le], [48, 25], 15, [i, i], 2), t = new E(n.c); t.a < t.c.c.length; ) + e = u(y(t), 282), n.a[e.c.b][e.d.b] += u(k(e, (Go(), V4)), 19).a; + } + function qve(n, e, t) { + le(t, "Grow Tree", 1), n.b = e.f, on(sn(k(e, (R3(), pm)))) ? (n.c = new Wy(), SMn(n, null)) : n.c = new Wy(), n.a = !1, ONn(n, e.f), H(e, mrn, (qn(), !!n.a)), ce(t); + } + function Gve(n, e) { + var t, i, r, c, o; + if (n == null) + return null; + for (o = F(Ls, Bf, 25, 2 * e, 15, 1), i = 0, r = 0; i < e; ++i) + t = n[i] >> 4 & 15, c = n[i] & 15, o[r++] = r1n[t], o[r++] = r1n[c]; + return Hs(o, 0, o.length); + } + function zve(n, e, t) { + var i, r, c; + return i = e.ak(), c = e.dd(), r = i.$j() ? hl(n, 4, i, c, null, v4(n, i, c, I(i, 99) && (u(i, 18).Bb & Ji) != 0), !0) : hl(n, i.Kj() ? 2 : 1, i, c, i.zj(), -1, !0), t ? t.Ei(r) : t = r, t; + } + function tu(n) { + var e, t; + return n >= Ji ? (e = rk + (n - Ji >> 10 & 1023) & Ut, t = 56320 + (n - Ji & 1023) & Ut, String.fromCharCode(e) + ("" + String.fromCharCode(t))) : String.fromCharCode(n & Ut); + } + function Uve(n, e) { + X0(); + var t, i, r, c; + return r = u(u(ct(n.r, e), 21), 84), r.gc() >= 2 ? (i = u(r.Kc().Pb(), 111), t = n.u.Hc((Tu(), s9)), c = n.u.Hc(Pp), !i.a && !t && (r.gc() == 2 || c)) : !1; + } + function axn(n, e, t, i, r) { + var c, o, f; + for (c = VNn(n, e, t, i, r), f = !1; !c; ) + rM(n, r, !0), f = !0, c = VNn(n, e, t, i, r); + f && rM(n, r, !1), o = rF(r), o.c.length != 0 && (n.d && n.d.lg(o), axn(n, r, t, i, o)); + } + function ZT() { + ZT = N, uH = new l5(Xh, 0), Dhn = new l5("DIRECTED", 1), Fhn = new l5("UNDIRECTED", 2), Ihn = new l5("ASSOCIATION", 3), $hn = new l5("GENERALIZATION", 4), Ohn = new l5("DEPENDENCY", 5); + } + function Wve(n, e) { + var t; + if (!nf(n)) + throw T(new $r(sqn)); + switch (t = nf(n), e.g) { + case 1: + return -(n.j + n.f); + case 2: + return n.i - t.g; + case 3: + return n.j - t.f; + case 4: + return -(n.i + n.g); + } + return 0; + } + function o4(n, e) { + var t, i; + for (_n(e), i = n.b.c.length, W(n.b, e); i > 0; ) { + if (t = i, i = (i - 1) / 2 | 0, n.a.ue(un(n.b, i), e) <= 0) + return Es(n.b, t, e), !0; + Es(n.b, t, un(n.b, i)); + } + return Es(n.b, i, e), !0; + } + function qJ(n, e, t, i) { + var r, c; + if (r = 0, t) + r = pT(n.a[t.g][e.g], i); + else + for (c = 0; c < QA; c++) + r = j.Math.max(r, pT(n.a[c][e.g], i)); + return e == (_o(), xc) && n.b && (r = j.Math.max(r, n.b.a)), r; + } + function Xve(n, e) { + var t, i, r, c, o, f; + return r = n.i, c = e.i, !r || !c || r.i != c.i || r.i == (J(), Vn) || r.i == (J(), Gn) ? !1 : (o = r.g.a, t = o + r.j.a, f = c.g.a, i = f + c.j.a, o <= i && t >= f); + } + function GJ(n, e, t, i) { + var r; + if (r = !1, yi(i) && (r = !0, h3(e, t, Ce(i))), r || G0(i) && (r = !0, GJ(n, e, t, i)), r || I(i, 236) && (r = !0, aa(e, t, u(i, 236))), !r) + throw T(new UI(Btn)); + } + function Vve(n, e) { + var t, i, r; + if (t = e.Hh(n.a), t && (r = Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), Xs), r != null)) { + for (i = 1; i < (wu(), S1n).length; ++i) + if (An(S1n[i], r)) + return i; + } + return 0; + } + function Qve(n, e) { + var t, i, r; + if (t = e.Hh(n.a), t && (r = Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), Xs), r != null)) { + for (i = 1; i < (wu(), P1n).length; ++i) + if (An(P1n[i], r)) + return i; + } + return 0; + } + function dxn(n, e) { + var t, i, r, c; + if (_n(e), c = n.a.gc(), c < e.gc()) + for (t = n.a.ec().Kc(); t.Ob(); ) + i = t.Pb(), e.Hc(i) && t.Qb(); + else + for (r = e.Kc(); r.Ob(); ) + i = r.Pb(), n.a.Bc(i) != null; + return c != n.a.gc(); + } + function bxn(n) { + var e, t; + switch (t = Qr(Gr(A(M(di, 1), q, 8, 0, [n.i.n, n.n, n.a]))), e = n.i.d, n.j.g) { + case 1: + t.b -= e.d; + break; + case 2: + t.a += e.c; + break; + case 3: + t.b += e.a; + break; + case 4: + t.a -= e.b; + } + return t; + } + function Jve(n) { + var e; + for (e = (x2(), u(ve(new re(ue(Lr(n).a.Kc(), new Mn()))), 17).c.i); e.k == (Qn(), pi); ) + H(e, (G(), Xk), (qn(), !0)), e = u(ve(new re(ue(Lr(e).a.Kc(), new Mn()))), 17).c.i; + } + function yx(n, e, t, i) { + var r, c, o, f; + for (f = c6(e, i), o = f.Kc(); o.Ob(); ) + r = u(o.Pb(), 11), n.d[r.p] = n.d[r.p] + n.c[t.p]; + for (f = c6(t, i), c = f.Kc(); c.Ob(); ) + r = u(c.Pb(), 11), n.d[r.p] = n.d[r.p] - n.c[e.p]; + } + function zJ(n, e, t) { + var i, r; + for (r = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); r.e != r.i.gc(); ) + i = u(oe(r), 33), Jo(i, i.i + e, i.j + t); + $i((!n.b && (n.b = new V(bi, n, 12, 3)), n.b), new fkn(e, t)); + } + function Yve(n, e, t, i) { + var r, c; + for (c = e, r = c.d == null || n.a.ue(t.d, c.d) > 0 ? 1 : 0; c.a[r] != t; ) + c = c.a[r], r = n.a.ue(t.d, c.d) > 0 ? 1 : 0; + c.a[r] = i, i.b = t.b, i.a[0] = t.a[0], i.a[1] = t.a[1], t.a[0] = null, t.a[1] = null; + } + function Zve(n) { + Tu(); + var e, t; + return e = vt(n1, A(M(qP, 1), z, 273, 0, [Gl])), !(Z8(hC(e, n)) > 1 || (t = vt(s9, A(M(qP, 1), z, 273, 0, [u9, Pp])), Z8(hC(t, n)) > 1)); + } + function UJ(n, e) { + var t; + t = mc((Z1(), uo), n), I(t, 498) ? yr(uo, n, new Dkn(this, e)) : yr(uo, n, this), jx(this, e), e == (Vp(), g1n) ? (this.wb = u(this, 1939), u(e, 1941)) : this.wb = (ol(), Nn); + } + function n5e(n) { + var e, t, i; + if (n == null) + return null; + for (e = null, t = 0; t < l9.length; ++t) + try { + return j7n(l9[t], n); + } catch (r) { + if (r = Et(r), I(r, 32)) + i = r, e = i; + else + throw T(r); + } + throw T(new xC(e)); + } + function wxn() { + wxn = N, Tzn = A(M(tn, 1), q, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]), Mzn = A(M(tn, 1), q, 2, 6, ["Jan", "Feb", "Mar", "Apr", V2, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]); + } + function gxn(n) { + var e, t, i; + e = An(typeof e, cN) ? null : new jln(), e && (n3(), t = (i = 900, i >= E1 ? "error" : i >= 900 ? "warn" : i >= 800 ? "info" : "log"), ZCn(t, n.a), n.b && UY(e, t, n.b, "Exception: ", !0)); + } + function k(n, e) { + var t, i; + return i = (!n.q && (n.q = new we()), te(n.q, e)), i ?? (t = e.wg(), I(t, 4) && (t == null ? (!n.q && (n.q = new we()), O2(n.q, e)) : (!n.q && (n.q = new we()), it(n.q, e, t))), t); + } + function Vi() { + Vi = N, Vf = new U9("P1_CYCLE_BREAKING", 0), $l = new U9("P2_LAYERING", 1), Kc = new U9("P3_NODE_ORDERING", 2), Tc = new U9("P4_NODE_PLACEMENT", 3), Or = new U9("P5_EDGE_ROUTING", 4); + } + function pxn(n, e) { + var t, i, r, c, o; + for (r = e == 1 ? KR : _R, i = r.a.ec().Kc(); i.Ob(); ) + for (t = u(i.Pb(), 103), o = u(ct(n.f.c, t), 21).Kc(); o.Ob(); ) + c = u(o.Pb(), 46), Qc(n.b.b, c.b), Qc(n.b.a, u(c.b, 81).d); + } + function e5e(n, e) { + X5(); + var t; + if (n.c == e.c) { + if (n.b == e.b || Mbe(n.b, e.b)) { + if (t = xre(n.b) ? 1 : -1, n.a && !e.a) + return t; + if (!n.a && e.a) + return -t; + } + return Uc(n.b.g, e.b.g); + } else + return ni(n.c, e.c); + } + function t5e(n, e) { + var t; + le(e, "Hierarchical port position processing", 1), t = n.b, t.c.length > 0 && LBn((Ln(0, t.c.length), u(t.c[0], 29)), n), t.c.length > 1 && LBn(u(un(t, t.c.length - 1), 29), n), ce(e); + } + function vxn(n, e) { + var t, i, r; + if (XJ(n, e)) + return !0; + for (i = new E(e); i.a < i.c.c.length; ) + if (t = u(y(i), 33), r = YFn(t), aM(n, t, r) || MDn(n, t) - n.g <= n.a) + return !0; + return !1; + } + function S7() { + S7 = N, OP = (Ux(), Afn), RK = yZn, BK = kZn, kfn = pZn, NK = mZn, mfn = new md(8), hZn = new tr((Xe(), ed), mfn), lZn = new tr(td, 8), aZn = Tfn, pfn = dZn, vfn = bZn, fZn = new tr(py, (qn(), !1)); + } + function nM() { + nM = N, Gfn = new md(15), BZn = new tr((Xe(), ed), Gfn), RZn = new tr(td, 15), zfn = new tr(_P, Q(0)), Kfn = ehn, LZn = nd, NZn = _l, _fn = new tr(Tp, qHn), Hfn = NP, qfn = Kg, qK = qZn, xZn = LP; + } + function fh(n) { + if ((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i != 1 || (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c).i != 1) + throw T(new Hn(LB)); + return Ir(u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82)); + } + function mxn(n) { + if ((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i != 1 || (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c).i != 1) + throw T(new Hn(LB)); + return r7(u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82)); + } + function kxn(n) { + if ((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i != 1 || (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c).i != 1) + throw T(new Hn(LB)); + return r7(u(D((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c), 0), 82)); + } + function ml(n) { + if ((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i != 1 || (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c).i != 1) + throw T(new Hn(LB)); + return Ir(u(D((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c), 0), 82)); + } + function WJ(n, e, t) { + var i, r, c; + if (++n.j, r = n.Vi(), e >= r || e < 0) + throw T(new mr(NB + e + _a + r)); + if (t >= r || t < 0) + throw T(new mr(BB + t + _a + r)); + return e != t ? i = (c = n.Ti(t), n.Hi(e, c), c) : i = n.Oi(t), i; + } + function yxn(n) { + var e, t, i; + if (i = n, n) + for (e = 0, t = n.Ug(); t; t = t.Ug()) { + if (++e > JL) + return yxn(t); + if (i = t, t == n) + throw T(new $r("There is a cycle in the containment hierarchy of " + n)); + } + return i; + } + function kl(n) { + var e, t, i; + for (i = new ya(Qi, "[", "]"), t = n.Kc(); t.Ob(); ) + e = t.Pb(), xh(i, B(e) === B(n) ? "(this Collection)" : e == null ? iu : Nr(e)); + return i.a ? i.e.length == 0 ? i.a.a : i.a.a + ("" + i.e) : i.c; + } + function XJ(n, e) { + var t, i; + if (i = !1, e.gc() < 2) + return !1; + for (t = 0; t < e.gc(); t++) + t < e.gc() - 1 ? i = i | aM(n, u(e.Xb(t), 33), u(e.Xb(t + 1), 33)) : i = i | aM(n, u(e.Xb(t), 33), u(e.Xb(0), 33)); + return i; + } + function jxn(n, e) { + var t; + e != n.a ? (t = null, n.a && (t = u(n.a, 49).ih(n, 4, Vo, t)), e && (t = u(e, 49).gh(n, 4, Vo, t)), t = uQ(n, e, t), t && t.Fi()) : n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 1, e, e)); + } + function VJ(n, e) { + var t; + e != n.e ? (n.e && OSn(BW(n.e), n), e && (!e.b && (e.b = new sj(new KI())), zjn(e.b, n)), t = d4e(n, e, null), t && t.Fi()) : n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 4, e, e)); + } + function kb(n) { + var e, t, i; + for (t = n.length, i = 0; i < t && (Te(i, n.length), n.charCodeAt(i) <= 32); ) + ++i; + for (e = t; e > i && (Te(e - 1, n.length), n.charCodeAt(e - 1) <= 32); ) + --e; + return i > 0 || e < t ? n.substr(i, e - i) : n; + } + function i5e(n, e) { + var t; + t = e.o, tl(n.f) ? (n.j.a = j.Math.max(n.j.a, t.a), n.j.b += t.b, n.d.c.length > 1 && (n.j.b += n.e)) : (n.j.a += t.a, n.j.b = j.Math.max(n.j.b, t.b), n.d.c.length > 1 && (n.j.a += n.e)); + } + function yl() { + yl = N, eXn = A(M(Yi, 1), lc, 61, 0, [(J(), Kn), Vn, ae]), nXn = A(M(Yi, 1), lc, 61, 0, [Vn, ae, Gn]), tXn = A(M(Yi, 1), lc, 61, 0, [ae, Gn, Kn]), iXn = A(M(Yi, 1), lc, 61, 0, [Gn, Kn, Vn]); + } + function r5e(n, e, t, i) { + var r, c, o, f, h, l, a; + if (o = n.c.d, f = n.d.d, o.j != f.j) + for (a = n.b, r = o.j, h = null; r != f.j; ) + h = e == 0 ? yT(r) : pQ(r), c = WQ(r, a.d[r.g], t), l = WQ(h, a.d[h.g], t), Ke(i, st(c, l)), r = h; + } + function c5e(n, e, t, i) { + var r, c, o, f, h; + return o = PFn(n.a, e, t), f = u(o.a, 19).a, c = u(o.b, 19).a, i && (h = u(k(e, (G(), Mu)), 10), r = u(k(t, Mu), 10), h && r && (xAn(n.b, h, r), f += n.b.i, c += n.b.e)), f > c; + } + function Exn(n) { + var e, t, i, r, c, o, f, h, l; + for (this.a = Y$n(n), this.b = new X(), t = n, i = 0, r = t.length; i < r; ++i) + for (e = t[i], c = new X(), W(this.b, c), f = e, h = 0, l = f.length; h < l; ++h) + o = f[h], W(c, new au(o.j)); + } + function u5e(n, e, t) { + var i, r, c; + return c = 0, i = t[e], e < t.length - 1 && (r = t[e + 1], n.b[e] ? (c = OTe(n.d, i, r), c += KD(n.a, i, (J(), Vn)), c += KD(n.a, r, Gn)) : c = Jde(n.a, i, r)), n.c[e] && (c += kde(n.a, i)), c; + } + function s5e(n, e, t, i, r) { + var c, o, f, h; + for (h = null, f = new E(i); f.a < f.c.c.length; ) + if (o = u(y(f), 441), o != t && xr(o.e, r, 0) != -1) { + h = o; + break; + } + c = C$(r), Ki(c, t.b), Ti(c, h.b), Tn(n.a, r, new EE(c, e, t.f)); + } + function Cxn(n) { + for (; n.g.c != 0 && n.d.c != 0; ) + ZO(n.g).c > ZO(n.d).c ? (n.i += n.g.c, BF(n.d)) : ZO(n.d).c > ZO(n.g).c ? (n.e += n.d.c, BF(n.g)) : (n.i += nCn(n.g), n.e += nCn(n.d), BF(n.g), BF(n.d)); + } + function o5e(n, e, t) { + var i, r, c, o; + for (c = e.q, o = e.r, new da((No(), Bl), e, c, 1), new da(Bl, c, o, 1), r = new E(t); r.a < r.c.c.length; ) + i = u(y(r), 112), i != c && i != e && i != o && (AZ(n.a, i, e), AZ(n.a, i, o)); + } + function Txn(n, e, t, i) { + n.a.d = j.Math.min(e, t), n.a.a = j.Math.max(e, i) - n.a.d, e < t ? (n.b = 0.5 * (e + t), n.g = fB * n.b + 0.9 * e, n.f = fB * n.b + 0.9 * t) : (n.b = 0.5 * (e + i), n.g = fB * n.b + 0.9 * i, n.f = fB * n.b + 0.9 * e); + } + function f5e() { + RA = {}, !Array.isArray && (Array.isArray = function(e) { + return Object.prototype.toString.call(e) === "[object Array]"; + }); + function n() { + return (/* @__PURE__ */ new Date()).getTime(); + } + !Date.now && (Date.now = n); + } + function Mxn(n, e) { + var t, i; + i = u(k(e, (nn(), Bt)), 98), H(e, (G(), kun), i), t = e.e, t && (_t(new $n(null, new xn(t.a, 16)), new Sq(n)), _t(qr(new $n(null, new xn(t.b, 16)), new NH()), new Pq(n))); + } + function h5e(n) { + var e, t, i, r; + if (i3(u(k(n.b, (nn(), as)), 103))) + return 0; + for (e = 0, i = new E(n.a); i.a < i.c.c.length; ) + t = u(y(i), 10), t.k == (Qn(), ii) && (r = t.o.a, e = j.Math.max(e, r)); + return e; + } + function l5e(n) { + switch (u(k(n, (nn(), Hc)), 163).g) { + case 1: + H(n, Hc, (Ss(), Pm)); + break; + case 2: + H(n, Hc, (Ss(), Wb)); + break; + case 3: + H(n, Hc, (Ss(), Sm)); + break; + case 4: + H(n, Hc, (Ss(), xl)); + } + } + function f4() { + f4 = N, Cm = new u5(Xh, 0), iun = new u5(Y2, 1), uun = new u5(Z2, 2), cun = new u5("LEFT_RIGHT_CONSTRAINT_LOCKING", 3), run = new u5("LEFT_RIGHT_CONNECTION_LOCKING", 4), tun = new u5(hHn, 5); + } + function Axn(n, e, t) { + var i, r, c, o, f, h, l; + f = t.a / 2, c = t.b / 2, i = j.Math.abs(e.a - n.a), r = j.Math.abs(e.b - n.b), h = 1, l = 1, i > f && (h = f / i), r > c && (l = c / r), o = j.Math.min(h, l), n.a += o * (e.a - n.a), n.b += o * (e.b - n.b); + } + function a5e(n, e, t, i, r) { + var c, o; + for (o = !1, c = u(un(t.b, 0), 33); Aye(n, e, c, i, r) && (o = !0, z4e(t, c), t.b.c.length != 0); ) + c = u(un(t.b, 0), 33); + return t.b.c.length == 0 && T7(t.j, t), o && GT(e.q), o; + } + function d5e(n, e) { + eg(); + var t, i, r, c; + if (e.b < 2) + return !1; + for (c = _e(e, 0), t = u(Re(c), 8), i = t; c.b != c.d.c; ) { + if (r = u(Re(c), 8), Kx(n, i, r)) + return !0; + i = r; + } + return !!Kx(n, i, t); + } + function QJ(n, e, t, i) { + var r, c; + return t == 0 ? (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), yE(n.o, e, i)) : (c = u(On((r = u(Rn(n, 16), 26), r || n.zh()), t), 66), c.Nj().Rj(n, Bc(n), t - ee(n.zh()), e, i)); + } + function jx(n, e) { + var t; + e != n.sb ? (t = null, n.sb && (t = u(n.sb, 49).ih(n, 1, h9, t)), e && (t = u(e, 49).gh(n, 1, h9, t)), t = hQ(n, e, t), t && t.Fi()) : n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 4, e, e)); + } + function b5e(n, e) { + var t, i, r, c; + if (e) + r = Bh(e, "x"), t = new Z6n(n), O3(t.a, (_n(r), r)), c = Bh(e, "y"), i = new nmn(n), $3(i.a, (_n(c), c)); + else + throw T(new Af("All edge sections need an end point.")); + } + function w5e(n, e) { + var t, i, r, c; + if (e) + r = Bh(e, "x"), t = new Q6n(n), D3(t.a, (_n(r), r)), c = Bh(e, "y"), i = new J6n(n), F3(i.a, (_n(c), c)); + else + throw T(new Af("All edge sections need a start point.")); + } + function g5e(n, e) { + var t, i, r, c, o, f, h; + for (i = fDn(n), c = 0, f = i.length; c < f; ++c) + gxn(e); + for (h = !pf && n.e ? pf ? null : n.d : null; h; ) { + for (t = fDn(h), r = 0, o = t.length; r < o; ++r) + gxn(e); + h = !pf && h.e ? pf ? null : h.d : null; + } + } + function Qn() { + Qn = N, ii = new t5("NORMAL", 0), pi = new t5("LONG_EDGE", 1), Xt = new t5("EXTERNAL_PORT", 2), Mc = new t5("NORTH_SOUTH_PORT", 3), Ju = new t5("LABEL", 4), vf = new t5("BREAKING_POINT", 5); + } + function p5e(n) { + var e, t, i, r; + if (e = !1, ai(n, (G(), Am))) + for (t = u(k(n, Am), 83), r = new E(n.j); r.a < r.c.c.length; ) + i = u(y(r), 11), k9e(i) && (e || (x6e(qi(n)), e = !0), ype(u(t.xc(i), 306))); + } + function v5e(n, e, t) { + var i; + le(t, "Self-Loop routing", 1), i = zge(e), eE(k(e, (SC(), Ym))), _t(Xc(pt(pt(qr(new $n(null, new xn(e.b, 16)), new G0n()), new z0n()), new U0n()), new W0n()), new x7n(n, i)), ce(t); + } + function m5e(n) { + var e, t, i, r, c, o, f, h, l; + return l = KJ(n), t = n.e, c = t != null, c && h3(l, vA, n.e), f = n.k, o = !!f, o && h3(l, "type", VO(n.k)), i = N9(n.j), r = !i, r && (h = new ea(), Ro(l, xB, h), e = new kmn(h), $i(n.j, e)), l; + } + function k5e(n) { + var e, t, i, r; + for (r = sl((rs(n.gc(), "size"), new _0()), 123), i = !0, t = Cd(n).Kc(); t.Ob(); ) + e = u(t.Pb(), 42), i || (r.a += Qi), i = !1, rc(sl(rc(r, e.cd()), 61), e.dd()); + return (r.a += "}", r).a; + } + function Sxn(n, e) { + var t, i, r; + return e &= 63, e < 22 ? (t = n.l << e, i = n.m << e | n.l >> 22 - e, r = n.h << e | n.m >> 22 - e) : e < 44 ? (t = 0, i = n.l << e - 22, r = n.m << e - 22 | n.l >> 44 - e) : (t = 0, i = 0, r = n.l << e - 44), Nc(t & Lu, i & Lu, r & Wh); + } + function yb(n) { + if (vin == null && (vin = new RegExp("^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$")), !vin.test(n)) + throw T(new Sf(u0 + n + '"')); + return parseFloat(n); + } + function y5e(n) { + var e, t, i, r; + for (e = new X(), t = F(_u, wh, 25, n.a.c.length, 16, 1), EW(t, t.length), r = new E(n.a); r.a < r.c.c.length; ) + i = u(y(r), 121), t[i.d] || (e.c[e.c.length] = i, B$n(n, i, t)); + return e; + } + function j5e(n, e) { + var t, i, r, c; + for (c = e.b.j, n.a = F(be, Le, 25, c.c.length, 15, 1), r = 0, i = 0; i < c.c.length; i++) + t = (Ln(i, c.c.length), u(c.c[i], 11)), t.e.c.length == 0 && t.g.c.length == 0 ? r += 1 : r += 3, n.a[i] = r; + } + function eM() { + eM = N, d_ = new r5("ALWAYS_UP", 0), a_ = new r5("ALWAYS_DOWN", 1), w_ = new r5("DIRECTION_UP", 2), b_ = new r5("DIRECTION_DOWN", 3), g_ = new r5("SMART_UP", 4), FS = new r5("SMART_DOWN", 5); + } + function E5e(n, e) { + if (n < 0 || e < 0) + throw T(new Hn("k and n must be positive")); + if (e > n) + throw T(new Hn("k must be smaller than n")); + return e == 0 || e == n ? 1 : n == 0 ? 0 : CJ(n) / (CJ(e) * CJ(n - e)); + } + function JJ(n, e) { + var t, i, r, c; + for (t = new kz(n); t.g == null && !t.c ? ZW(t) : t.g == null || t.i != 0 && u(t.g[t.i - 1], 47).Ob(); ) + if (c = u(cM(t), 56), I(c, 160)) + for (i = u(c, 160), r = 0; r < e.length; r++) + e[r].og(i); + } + function Ex(n) { + var e; + return n.Db & 64 ? PF(n) : (e = new Bs(PF(n)), e.a += " (height: ", mw(e, n.f), e.a += ", width: ", mw(e, n.g), e.a += ", x: ", mw(e, n.i), e.a += ", y: ", mw(e, n.j), e.a += ")", e.a); + } + function C5e(n) { + var e, t, i, r, c, o, f; + for (e = new wa(), i = n, r = 0, c = i.length; r < c; ++r) + if (t = i[r], o = pe(t.cd()), f = Sa(e, o, pe(t.dd())), f != null) + throw T(new Hn("duplicate key: " + o)); + this.b = (Pn(), new DI(e)); + } + function T5e(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], xh(c, String.fromCharCode(e)); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function YJ() { + YJ = N, Mrn = (_C(), tS), KUn = new In(KM, Mrn), Q(1), _Un = new In(Tnn, Q(300)), Q(0), GUn = new In(Mnn, Q(0)), zUn = new In(yN, Kf), HUn = new In(jN, 5), UUn = tS, qUn = $R; + } + function Pxn(n, e) { + var t, i, r, c, o; + for (r = e == 1 ? KR : _R, i = r.a.ec().Kc(); i.Ob(); ) + for (t = u(i.Pb(), 103), o = u(ct(n.f.c, t), 21).Kc(); o.Ob(); ) + c = u(o.Pb(), 46), W(n.b.b, u(c.b, 81)), W(n.b.a, u(c.b, 81).d); + } + function M5e(n, e) { + var t; + if (e != null && !n.c.Yj().wj(e)) + throw t = I(e, 56) ? u(e, 56).Tg().zb : J1(Du(e)), T(new zp(Pl + n.c.ne() + "'s type '" + n.c.Yj().ne() + "' does not permit a value of type '" + t + "'")); + } + function A5e(n, e, t) { + var i, r; + for (r = new Ii(n.b, 0); r.b < r.d.gc(); ) + i = (ne(r.b < r.d.gc()), u(r.d.Xb(r.c = r.b++), 70)), B(k(i, (G(), vun))) === B(e) && (rY(i.n, qi(n.c.i), t), Wu(r), W(e.b, i)); + } + function S5e(n, e) { + if (e.a) + switch (u(k(e.b, (G(), kun)), 98).g) { + case 0: + case 1: + V4e(e); + case 2: + _t(new $n(null, new xn(e.d, 16)), new RH()), Pme(n.a, e); + } + else + _t(new $n(null, new xn(e.d, 16)), new RH()); + } + function Ixn(n) { + var e, t; + return t = j.Math.sqrt((n.k == null && (n.k = jV(n, new vwn())), K(n.k) / (n.b * (n.g == null && (n.g = sOn(n, new qH())), K(n.g))))), e = ge(eu(j.Math.round(t))), e = j.Math.min(e, n.f), e; + } + function gc() { + bu(), vU.call(this), this.j = (J(), Xr), this.a = new Li(), new NI(), this.f = (rs(2, Ib), new Ic(2)), this.e = (rs(4, Ib), new Ic(4)), this.g = (rs(4, Ib), new Ic(4)), this.b = new q7n(this.e, this.g); + } + function P5e(n, e) { + var t, i; + return !(on(sn(k(e, (G(), mf)))) || (i = e.c.i, n == (Ss(), Sm) && i.k == (Qn(), Ju)) || (t = u(k(i, (nn(), Hc)), 163), t == xl)); + } + function I5e(n, e) { + var t, i; + return !(on(sn(k(e, (G(), mf)))) || (i = e.d.i, n == (Ss(), Pm) && i.k == (Qn(), Ju)) || (t = u(k(i, (nn(), Hc)), 163), t == Wb)); + } + function O5e(n, e) { + var t, i, r, c, o, f, h; + for (o = n.d, h = n.o, f = new ys(-o.b, -o.d, o.b + h.a + o.c, o.d + h.b + o.a), i = e, r = 0, c = i.length; r < c; ++r) + t = i[r], t && m6(f, t.i); + o.b = -f.c, o.d = -f.d, o.c = f.b - o.b - h.a, o.a = f.a - o.d - h.b; + } + function P7() { + P7 = N, dfn = new Y9("CENTER_DISTANCE", 0), xK = new Y9("CIRCLE_UNDERLAP", 1), wfn = new Y9("RECTANGLE_UNDERLAP", 2), LK = new Y9("INVERTED_OVERLAP", 3), bfn = new Y9("MINIMUM_ROOT_DISTANCE", 4); + } + function D5e(n) { + YY(); + var e, t, i, r, c; + if (n == null) + return null; + for (i = n.length, r = i * 2, e = F(Ls, Bf, 25, r, 15, 1), t = 0; t < i; t++) + c = n[t], c < 0 && (c += 256), e[t * 2] = oI[c >> 4], e[t * 2 + 1] = oI[c & 15]; + return Hs(e, 0, e.length); + } + function $5e(n) { + QE(); + var e, t, i; + switch (i = n.c.length, i) { + case 0: + return fzn; + case 1: + return e = u(dLn(new E(n)), 42), ife(e.cd(), e.dd()); + default: + return t = u(lf(n, F(qa, OM, 42, n.c.length, 0, 1)), 165), new GI(t); + } + } + function F5e(n) { + var e, t, i, r, c, o; + for (e = new gw(), t = new gw(), ll(e, n), ll(t, n); t.b != t.c; ) + for (r = u(y2(t), 37), o = new E(r.a); o.a < o.c.c.length; ) + c = u(y(o), 10), c.e && (i = c.e, ll(e, i), ll(t, i)); + return e; + } + function y1(n, e) { + switch (e.g) { + case 1: + return v2(n.j, (bu(), Qrn)); + case 2: + return v2(n.j, (bu(), Xrn)); + case 3: + return v2(n.j, (bu(), Yrn)); + case 4: + return v2(n.j, (bu(), Zrn)); + default: + return Pn(), Pn(), cr; + } + } + function x5e(n, e) { + var t, i, r; + t = Yoe(e, n.e), i = u(te(n.g.f, t), 19).a, r = n.a.c.length - 1, n.a.c.length != 0 && u(un(n.a, r), 287).c == i ? (++u(un(n.a, r), 287).a, ++u(un(n.a, r), 287).b) : W(n.a, new fjn(i)); + } + function L5e(n, e, t) { + var i, r; + return i = H7e(n, e, t), i != 0 ? i : ai(e, (G(), bc)) && ai(t, bc) ? (r = Uc(u(k(e, bc), 19).a, u(k(t, bc), 19).a), r < 0 ? H7(n, e, t) : r > 0 && H7(n, t, e), r) : gme(n, e, t); + } + function Oxn(n, e, t) { + var i, r, c, o; + if (e.b != 0) { + for (i = new Tt(), o = _e(e, 0); o.b != o.d.c; ) + c = u(Re(o), 86), Xi(i, $V(c)), r = c.e, r.a = u(k(c, (cc(), mK)), 19).a, r.b = u(k(c, pon), 19).a; + Oxn(n, i, yc(t, i.b / n.a | 0)); + } + } + function Dxn(n, e) { + var t, i, r, c, o; + if (n.e <= e || Hle(n, n.g, e)) + return n.g; + for (c = n.r, i = n.g, o = n.r, r = (c - i) / 2 + i; i + 1 < c; ) + t = O6(n, r, !1), t.b <= r && t.a <= e ? (o = r, c = r) : i = r, r = (c - i) / 2 + i; + return o; + } + function N5e(n, e, t) { + var i; + i = JNn(n, e, !0), le(t, "Recursive Graph Layout", i), JJ(e, A(M(xfn, 1), rn, 527, 0, [new V4n()])), ga(e, (Xe(), kv)) || JJ(e, A(M(xfn, 1), rn, 527, 0, [new t2n()])), KZ(n, e, null, t), ce(t); + } + function ce(n) { + var e; + if (n.p == null) + throw T(new $r("The task has not begun yet.")); + n.b || (n.k && (e = (Zf(), Ni(eu(Date.now()), E1)), n.q = Fd(vl(e, n.o)) * 1e-9), n.c < n.r && X$(n, n.r - n.c), n.b = !0); + } + function I7(n) { + var e, t, i; + for (i = new fu(), Ke(i, new fn(n.j, n.k)), t = new ie((!n.a && (n.a = new Yt(io, n, 5)), n.a)); t.e != t.i.gc(); ) + e = u(oe(t), 469), Ke(i, new fn(e.a, e.b)); + return Ke(i, new fn(n.b, n.c)), i; + } + function B5e(n, e, t, i, r) { + var c, o, f, h, l, a; + if (r) + for (h = r.a.length, c = new ha(h), a = (c.b - c.a) * c.c < 0 ? (nl(), Jl) : new rl(c); a.Ob(); ) + l = u(a.Pb(), 19), f = y3(r, l.a), o = new MTn(n, e, t, i), Xke(o.a, o.b, o.c, o.d, f); + } + function ZJ(n, e) { + var t; + if (B(n) === B(e)) + return !0; + if (I(e, 21)) { + t = u(e, 21); + try { + return n.gc() == t.gc() && n.Ic(t); + } catch (i) { + if (i = Et(i), I(i, 173) || I(i, 205)) + return !1; + throw T(i); + } + } + return !1; + } + function nY(n, e) { + var t; + W(n.d, e), t = e.rf(), n.c ? (n.e.a = j.Math.max(n.e.a, t.a), n.e.b += t.b, n.d.c.length > 1 && (n.e.b += n.a)) : (n.e.a += t.a, n.e.b = j.Math.max(n.e.b, t.b), n.d.c.length > 1 && (n.e.a += n.a)); + } + function R5e(n) { + var e, t, i, r; + switch (r = n.i, e = r.b, i = r.j, t = r.g, r.a.g) { + case 0: + t.a = (n.g.b.o.a - i.a) / 2; + break; + case 1: + t.a = e.d.n.a + e.d.a.a; + break; + case 2: + t.a = e.d.n.a + e.d.a.a - i.a; + break; + case 3: + t.b = e.d.n.b + e.d.a.b; + } + } + function $xn(n, e, t, i, r) { + if (i < e || r < t) + throw T(new Hn("The highx must be bigger then lowx and the highy must be bigger then lowy")); + return n.a < e ? n.a = e : n.a > i && (n.a = i), n.b < t ? n.b = t : n.b > r && (n.b = r), n; + } + function _5e(n) { + if (I(n, 149)) + return w8e(u(n, 149)); + if (I(n, 229)) + return a2e(u(n, 229)); + if (I(n, 23)) + return m5e(u(n, 23)); + throw T(new Hn(Rtn + kl(new Hu(A(M(Zn, 1), rn, 1, 5, [n]))))); + } + function K5e(n, e, t, i, r) { + var c, o, f; + for (c = !0, o = 0; o < i; o++) + c = c & t[o] == 0; + if (r == 0) + pc(t, i, n, 0, e), o = e; + else { + for (f = 32 - r, c = c & t[o] << f == 0, o = 0; o < e - 1; o++) + n[o] = t[o + i] >>> r | t[o + i + 1] << f; + n[o] = t[o + i] >>> r, ++o; + } + return c; + } + function eY(n, e, t, i) { + var r, c, o; + if (e.k == (Qn(), pi)) { + for (c = new re(ue(Lr(e).a.Kc(), new Mn())); Se(c); ) + if (r = u(ve(c), 17), o = r.c.i.k, o == pi && n.c.a[r.c.i.c.p] == i && n.c.a[e.c.p] == t) + return !0; + } + return !1; + } + function H5e(n, e) { + var t, i, r, c; + return e &= 63, t = n.h & Wh, e < 22 ? (c = t >>> e, r = n.m >> e | t << 22 - e, i = n.l >> e | n.m << 22 - e) : e < 44 ? (c = 0, r = t >>> e - 22, i = n.m >> e - 22 | n.h << 44 - e) : (c = 0, r = 0, i = t >>> e - 44), Nc(i & Lu, r & Lu, c & Wh); + } + function Fxn(n, e, t, i) { + var r; + this.b = i, this.e = n == (Kd(), _m), r = e[t], this.d = fa(_u, [q, wh], [177, 25], 16, [r.length, r.length], 2), this.a = fa(be, [q, Le], [48, 25], 15, [r.length, r.length], 2), this.c = new NJ(e, t); + } + function q5e(n) { + var e, t, i; + for (n.k = new iX((J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn])).length, n.j.c.length), i = new E(n.j); i.a < i.c.c.length; ) + t = u(y(i), 113), e = t.d.j, Tn(n.k, e, t); + n.e = e8e(k2(n.k)); + } + function xxn(n, e) { + var t, i, r; + ci(n.d, e), t = new dgn(), it(n.c, e, t), t.f = jF(e.c), t.a = jF(e.d), t.d = (C6(), r = e.c.i.k, r == (Qn(), ii) || r == vf), t.e = (i = e.d.i.k, i == ii || i == vf), t.b = e.c.j == (J(), Gn), t.c = e.d.j == Vn; + } + function G5e(n) { + var e, t, i, r, c; + for (c = nt, r = nt, i = new E(Hw(n)); i.a < i.c.c.length; ) + t = u(y(i), 213), e = t.e.e - t.d.e, t.e == n && e < r ? r = e : e < c && (c = e); + return r == nt && (r = -1), c == nt && (c = -1), new Pi(Q(r), Q(c)); + } + function z5e(n, e) { + var t, i, r; + return r = O4, i = (d6(), Lk), r = j.Math.abs(n.b), t = j.Math.abs(e.f - n.b), t < r && (r = t, i = ZA), t = j.Math.abs(n.a), t < r && (r = t, i = Nk), t = j.Math.abs(e.g - n.a), t < r && (r = t, i = YA), i; + } + function U5e(n, e) { + var t, i, r, c; + for (t = e.a.o.a, c = new ch(qi(e.a).b, e.c, e.f + 1), r = new $v(c); r.b < r.d.gc(); ) + if (i = (ne(r.b < r.d.gc()), u(r.d.Xb(r.c = r.b++), 29)), i.c.a >= t) + return h4(n, e, i.p), !0; + return !1; + } + function Lxn(n) { + var e; + return n.Db & 64 ? Ex(n) : (e = new Yu(Stn), !n.a || De(De((e.a += ' "', e), n.a), '"'), De(bd(De(bd(De(bd(De(bd((e.a += " (", e), n.i), ","), n.j), " | "), n.g), ","), n.f), ")"), e.a); + } + function Nxn(n, e, t) { + var i, r, c, o, f; + for (f = _c(n.e.Tg(), e), r = u(n.g, 119), i = 0, o = 0; o < n.i; ++o) + if (c = r[o], f.rl(c.ak())) { + if (i == t) + return Cb(n, o), er(), u(e, 66).Oj() ? c : c.dd(); + ++i; + } + throw T(new mr(rm + t + _a + i)); + } + function Bxn(n) { + var e, t, i; + if (e = n.c, e == 2 || e == 7 || e == 1) + return Je(), Je(), k9; + for (i = HZ(n), t = null; (e = n.c) != 2 && e != 7 && e != 1; ) + t || (t = (Je(), Je(), new v5(1)), Da(t, i), i = t), Da(t, HZ(n)); + return i; + } + function W5e(n, e, t) { + return n < 0 || n > t ? fY(n, t, "start index") : e < 0 || e > t ? fY(e, t, "end index") : T6("end index (%s) must not be less than start index (%s)", A(M(Zn, 1), rn, 1, 5, [Q(e), Q(n)])); + } + function Rxn(n, e) { + var t, i, r, c; + for (i = 0, r = n.length; i < r; i++) { + c = n[i]; + try { + c[1] ? c[0].jm() && (e = Ofe(e, c)) : c[0].jm(); + } catch (o) { + if (o = Et(o), I(o, 78)) + t = o, gj(), j1e(I(t, 477) ? u(t, 477).ae() : t); + else + throw T(o); + } + } + return e; + } + function h4(n, e, t) { + var i, r, c; + for (t != e.c + e.b.gc() && rje(e.a, Kbe(e, t - e.c)), c = e.a.c.p, n.a[c] = j.Math.max(n.a[c], e.a.o.a), r = u(k(e.a, (G(), Vk)), 15).Kc(); r.Ob(); ) + i = u(r.Pb(), 70), H(i, VR, (qn(), !0)); + } + function X5e(n, e) { + var t, i, r; + r = E8e(e), H(e, (G(), M_), r), r && (i = nt, Sr(n.f, r) && (i = u(Vr(Sr(n.f, r)), 19).a), t = u(un(e.g, 0), 17), on(sn(k(t, mf))) || it(n, r, Q(j.Math.min(u(k(t, bc), 19).a, i)))); + } + function _xn(n, e, t) { + var i, r, c, o, f; + for (e.p = -1, f = Wd(e, (sr(), Lc)).Kc(); f.Ob(); ) + for (o = u(f.Pb(), 11), r = new E(o.g); r.a < r.c.c.length; ) + i = u(y(r), 17), c = i.d.i, e != c && (c.p < 0 ? t.Fc(i) : c.p > 0 && _xn(n, c, t)); + e.p = 0; + } + function bn(n) { + var e; + this.c = new Tt(), this.f = n.e, this.e = n.d, this.i = n.g, this.d = n.c, this.b = n.b, this.k = n.j, this.a = n.a, n.i ? this.j = n.i : this.j = (e = u(xo(F1), 9), new ks(e, u(bo(e, e.length), 9), 0)), this.g = n.f; + } + function V5e(n) { + var e, t, i, r; + for (e = sl(De(new Yu("Predicates."), "and"), 40), t = !0, r = new $v(n); r.b < r.d.gc(); ) + i = (ne(r.b < r.d.gc()), r.d.Xb(r.c = r.b++)), t || (e.a += ","), e.a += "" + i, t = !1; + return (e.a += ")", e).a; + } + function Kxn(n, e, t) { + var i, r, c; + if (!(t <= e + 2)) + for (r = (t - e) / 2 | 0, i = 0; i < r; ++i) + c = (Ln(e + i, n.c.length), u(n.c[e + i], 11)), Es(n, e + i, (Ln(t - i - 1, n.c.length), u(n.c[t - i - 1], 11))), Ln(t - i - 1, n.c.length), n.c[t - i - 1] = c; + } + function Q5e(n, e, t) { + var i, r, c, o, f, h, l, a; + c = n.d.p, f = c.e, h = c.r, n.g = new b8(h), o = n.d.o.c.p, i = o > 0 ? f[o - 1] : F(vh, C1, 10, 0, 0, 1), r = f[o], l = o < f.length - 1 ? f[o + 1] : F(vh, C1, 10, 0, 0, 1), a = e == t - 1, a ? r$(n.g, r, l) : r$(n.g, i, r); + } + function Hxn(n) { + var e; + this.j = new X(), this.f = new hi(), this.b = (e = u(xo(Yi), 9), new ks(e, u(bo(e, e.length), 9), 0)), this.d = F(be, Le, 25, (J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn])).length, 15, 1), this.g = n; + } + function qxn(n, e) { + var t, i, r; + if (e.c.length != 0) { + for (t = vxn(n, e), r = !1; !t; ) + rM(n, e, !0), r = !0, t = vxn(n, e); + r && rM(n, e, !1), i = rF(e), n.b && n.b.lg(i), n.a = MDn(n, (Ln(0, e.c.length), u(e.c[0], 33))), qxn(n, i); + } + } + function Cx(n, e) { + var t, i, r; + if (i = On(n.Tg(), e), t = e - n.Ah(), t < 0) + if (i) + if (i.Ij()) + r = n.Yg(i), r >= 0 ? n.Bh(r) : bY(n, i); + else + throw T(new Hn(Pl + i.ne() + em)); + else + throw T(new Hn(vqn + e + mqn)); + else + As(n, t, i); + } + function tY(n) { + var e, t; + if (t = null, e = !1, I(n, 204) && (e = !0, t = u(n, 204).a), e || I(n, 258) && (e = !0, t = "" + u(n, 258).a), e || I(n, 483) && (e = !0, t = "" + u(n, 483).a), !e) + throw T(new UI(Btn)); + return t; + } + function Gxn(n, e) { + var t, i; + if (n.f) { + for (; e.Ob(); ) + if (t = u(e.Pb(), 72), i = t.ak(), I(i, 99) && u(i, 18).Bb & uc && (!n.e || i.Gj() != Mv || i.aj() != 0) && t.dd() != null) + return e.Ub(), !0; + return !1; + } else + return e.Ob(); + } + function zxn(n, e) { + var t, i; + if (n.f) { + for (; e.Sb(); ) + if (t = u(e.Ub(), 72), i = t.ak(), I(i, 99) && u(i, 18).Bb & uc && (!n.e || i.Gj() != Mv || i.aj() != 0) && t.dd() != null) + return e.Pb(), !0; + return !1; + } else + return e.Sb(); + } + function iY(n, e, t) { + var i, r, c, o, f, h; + for (h = _c(n.e.Tg(), e), i = 0, f = n.i, r = u(n.g, 119), o = 0; o < n.i; ++o) + if (c = r[o], h.rl(c.ak())) { + if (t == i) + return o; + ++i, f = o + 1; + } + if (t == i) + return f; + throw T(new mr(rm + t + _a + i)); + } + function J5e(n, e) { + var t, i, r, c; + if (n.f.c.length == 0) + return null; + for (c = new d2(), i = new E(n.f); i.a < i.c.c.length; ) + t = u(y(i), 70), r = t.o, c.b = j.Math.max(c.b, r.a), c.a += r.b; + return c.a += (n.f.c.length - 1) * e, c; + } + function Y5e(n, e, t) { + var i, r, c; + for (r = new re(ue(Kh(t).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 17), !Wi(i) && !(!Wi(i) && i.c.i.c == i.d.i.c) && (c = CNn(n, i, t, new u9n()), c.c.length > 1 && (e.c[e.c.length] = c)); + } + function Z5e(n) { + var e, t, i, r; + for (t = new Tt(), Xi(t, n.o), i = new Yq(); t.b != 0; ) + e = u(t.b == 0 ? null : (ne(t.b != 0), Ts(t, t.a.a)), 508), r = C_n(n, e, !0), r && W(i.a, e); + for (; i.a.c.length != 0; ) + e = u(pDn(i), 508), C_n(n, e, !1); + } + function j1() { + j1 = N, Lfn = new l2(K6, 0), _i = new l2("BOOLEAN", 1), sc = new l2("INT", 2), mv = new l2("STRING", 3), Dr = new l2("DOUBLE", 4), Rt = new l2("ENUM", 5), Cp = new l2("ENUMSET", 6), yf = new l2("OBJECT", 7); + } + function m6(n, e) { + var t, i, r, c, o; + i = j.Math.min(n.c, e.c), c = j.Math.min(n.d, e.d), r = j.Math.max(n.c + n.b, e.c + e.b), o = j.Math.max(n.d + n.a, e.d + e.a), r < i && (t = i, i = r, r = t), o < c && (t = c, c = o, o = t), LEn(n, i, c, r - i, o - c); + } + function wu() { + wu = N, P1n = A(M(tn, 1), q, 2, 6, [Ztn, Ck, IA, xGn, OA, UB, vA]), S1n = A(M(tn, 1), q, 2, 6, [Ztn, "empty", Ck, Ek, "elementOnly"]), I1n = A(M(tn, 1), q, 2, 6, [Ztn, "preserve", "replace", Uo]), xi = new FEn(); + } + function rY(n, e, t) { + var i, r, c; + if (e != t) { + i = e; + do + st(n, i.c), r = i.e, r && (c = i.d, W0(n, c.b, c.d), st(n, r.n), i = qi(r)); + while (r); + i = t; + do + ji(n, i.c), r = i.e, r && (c = i.d, o8(n, c.b, c.d), ji(n, r.n), i = qi(r)); + while (r); + } + } + function Tx(n, e, t, i) { + var r, c, o, f, h; + if (i.f.c + i.g.c == 0) + for (o = n.a[n.c], f = 0, h = o.length; f < h; ++f) + c = o[f], it(i, c, new aOn(n, c, t)); + return r = u(Vr(Sr(i.f, e)), 663), r.b = 0, r.c = r.f, r.c == 0 || Ivn(u(un(r.a, r.b), 287)), r; + } + function q2() { + q2 = N, tv = new i5("MEDIAN_LAYER", 0), ym = new i5("TAIL_LAYER", 1), ev = new i5("HEAD_LAYER", 2), Gb = new i5("SPACE_EFFICIENT_LAYER", 3), Cg = new i5("WIDEST_LAYER", 4), Eg = new i5("CENTER_LAYER", 5); + } + function n6e(n) { + switch (n.g) { + case 0: + case 1: + case 2: + return J(), Kn; + case 3: + case 4: + case 5: + return J(), ae; + case 6: + case 7: + case 8: + return J(), Gn; + case 9: + case 10: + case 11: + return J(), Vn; + default: + return J(), Xr; + } + } + function e6e(n, e) { + var t; + return n.c.length == 0 ? !1 : (t = f$n((Ln(0, n.c.length), u(n.c[0], 17)).c.i), ns(), t == (gb(), xg) || t == Fg ? !0 : E3(Xc(new $n(null, new xn(n, 16)), new Dwn()), new y6n(e))); + } + function cY(n, e, t) { + var i, r, c; + if (!n.b[e.g]) { + for (n.b[e.g] = !0, i = t, !i && (i = new AC()), Ke(i.b, e), c = n.a[e.g].Kc(); c.Ob(); ) + r = u(c.Pb(), 188), r.b != e && cY(n, r.b, i), r.c != e && cY(n, r.c, i), Ke(i.a, r); + return i; + } + return null; + } + function k6() { + k6 = N, pP = new o5("ROOT_PROC", 0), aK = new o5("FAN_PROC", 1), bK = new o5("NEIGHBORS_PROC", 2), dK = new o5("LEVEL_HEIGHT", 3), wK = new o5("NODE_POSITION_PROC", 4), lK = new o5("DETREEIFYING_PROC", 5); + } + function Mx(n, e) { + if (I(e, 239)) + return Xre(n, u(e, 33)); + if (I(e, 186)) + return Vre(n, u(e, 118)); + if (I(e, 439)) + return Wre(n, u(e, 202)); + throw T(new Hn(Rtn + kl(new Hu(A(M(Zn, 1), rn, 1, 5, [e]))))); + } + function Uxn(n, e, t) { + var i, r; + if (this.f = n, i = u(te(n.b, e), 283), r = i ? i.a : 0, $X(t, r), t >= (r / 2 | 0)) + for (this.e = i ? i.c : null, this.d = r; t++ < r; ) + vMn(this); + else + for (this.c = i ? i.b : null; t-- > 0; ) + nX(this); + this.b = e, this.a = null; + } + function t6e(n, e) { + var t, i; + e.a ? T8e(n, e) : (t = u(rD(n.b, e.b), 57), t && t == n.a[e.b.f] && t.a && t.a != e.b.a && t.c.Fc(e.b), i = u(iD(n.b, e.b), 57), i && n.a[i.f] == e.b && i.a && i.a != e.b.a && e.b.c.Fc(i), zO(n.b, e.b)); + } + function Wxn(n, e) { + var t, i; + if (t = u(wr(n.b, e), 124), u(u(ct(n.r, e), 21), 84).dc()) { + t.n.b = 0, t.n.c = 0; + return; + } + t.n.b = n.C.b, t.n.c = n.C.c, n.A.Hc((Qu(), rd)) && pBn(n, e), i = Dpe(n, e), qx(n, e) == (qw(), Hl) && (i += 2 * n.w), t.a.a = i; + } + function Xxn(n, e) { + var t, i; + if (t = u(wr(n.b, e), 124), u(u(ct(n.r, e), 21), 84).dc()) { + t.n.d = 0, t.n.a = 0; + return; + } + t.n.d = n.C.d, t.n.a = n.C.a, n.A.Hc((Qu(), rd)) && vBn(n, e), i = $pe(n, e), qx(n, e) == (qw(), Hl) && (i += 2 * n.w), t.a.b = i; + } + function i6e(n, e) { + var t, i, r, c; + for (c = new X(), i = new E(e); i.a < i.c.c.length; ) + t = u(y(i), 65), W(c, new KG(t, !0)), W(c, new KG(t, !1)); + r = new KTn(n), Kv(r.a.a), uAn(c, n.b, new Hu(A(M(Rzn, 1), rn, 679, 0, [r]))); + } + function Vxn(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C; + return h = n.a, p = n.b, l = e.a, v = e.b, a = t.a, m = t.b, d = i.a, C = i.b, c = h * v - p * l, o = a * C - m * d, r = (h - l) * (m - C) - (p - v) * (a - d), f = (c * (a - d) - o * (h - l)) / r, g = (c * (m - C) - o * (p - v)) / r, new fn(f, g); + } + function uY(n, e) { + var t, i, r; + if (!n.d[e.p]) { + for (n.d[e.p] = !0, n.a[e.p] = !0, i = new re(ue(ei(e).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), !Wi(t) && (r = t.d.i, n.a[r.p] ? W(n.b, t) : uY(n, r)); + n.a[e.p] = !1; + } + } + function Qxn(n, e, t) { + var i; + switch (i = 0, u(k(e, (nn(), Hc)), 163).g) { + case 2: + i = 2 * -t + n.a, ++n.a; + break; + case 1: + i = -t; + break; + case 3: + i = t; + break; + case 4: + i = 2 * t + n.b, ++n.b; + } + return ai(e, (G(), bc)) && (i += u(k(e, bc), 19).a), i; + } + function Jxn(n, e, t) { + var i, r, c; + for (t.zc(e, n), W(n.n, e), c = n.p.eg(e), e.j == n.p.fg() ? ZDn(n.e, c) : ZDn(n.j, c), WE(n), r = ul(of(A(M(gf, 1), rn, 20, 0, [new Hp(e), new n2(e)]))); Se(r); ) + i = u(ve(r), 11), t._b(i) || Jxn(n, i, t); + } + function sY(n) { + var e, t, i; + return t = u(hn(n, (Xe(), nd)), 21), t.Hc((Qu(), sw)) ? (i = u(hn(n, _l), 21), e = new kr(u(hn(n, Kg), 8)), i.Hc((xu(), Tv)) && (e.a <= 0 && (e.a = 20), e.b <= 0 && (e.b = 20)), e) : new Li(); + } + function oY(n) { + var e, t, i; + if (!n.b) { + for (i = new Z2n(), t = new w2(I6(n)); t.e != t.i.gc(); ) + e = u(UF(t), 18), e.Bb & uc && me(i, e); + ab(i), n.b = new Ew((u(D(R((ol(), Nn).o), 8), 18), i.i), i.g), Iu(n).b &= -9; + } + return n.b; + } + function r6e(n, e) { + var t, i, r, c, o, f, h, l; + h = u(y7(k2(e.k), F(Yi, lc, 61, 2, 0, 1)), 122), l = e.g, t = CAn(e, h[0]), r = EAn(e, h[1]), i = sx(n, l, t, r), c = CAn(e, h[1]), f = EAn(e, h[0]), o = sx(n, l, c, f), i <= o ? (e.a = t, e.c = r) : (e.a = c, e.c = f); + } + function c6e(n, e, t) { + var i, r, c; + for (le(t, "Processor set neighbors", 1), n.a = e.b.b == 0 ? 1 : e.b.b, r = null, i = _e(e.b, 0); !r && i.b != i.d.c; ) + c = u(Re(i), 86), on(sn(k(c, (cc(), rw)))) && (r = c); + r && iBn(n, new X1(r), t), ce(t); + } + function Yxn(n) { + bL(); + var e, t, i, r; + return i = Pf(n, tu(35)), e = i == -1 ? n : n.substr(0, i), t = i == -1 ? null : n.substr(i + 1), r = Uae(b1n, e), r ? t != null && (r = lDn(r, (_n(t), t))) : (r = yTe(e), ede(b1n, e, r), t != null && (r = lDn(r, t))), r; + } + function Ax(n) { + var e; + Pn(); + var t, i, r, c, o, f; + if (I(n, 54)) + for (c = 0, r = n.gc() - 1; c < r; ++c, --r) + e = n.Xb(c), n._c(c, n.Xb(r)), n._c(r, e); + else + for (t = n.Yc(), o = n.Zc(n.gc()); t.Tb() < o.Vb(); ) + i = t.Pb(), f = o.Ub(), t.Wb(f), o.Wb(i); + } + function u6e(n, e) { + var t, i, r; + le(e, "End label pre-processing", 1), t = K(Y(k(n, (nn(), jp)))), i = K(Y(k(n, ew))), r = i3(u(k(n, as), 103)), _t(qr(new $n(null, new xn(n.b, 16)), new hdn()), new wEn(t, i, r)), ce(e); + } + function Sx(n, e) { + var t, i, r, c, o, f; + for (f = 0, c = new gw(), ll(c, e); c.b != c.c; ) + for (o = u(y2(c), 214), f += CFn(o.d, o.e), r = new E(o.b); r.a < r.c.c.length; ) + i = u(y(r), 37), t = u(un(n.b, i.p), 214), t.s || (f += Sx(n, t)); + return f; + } + function Zxn(n, e, t) { + var i, r; + OOn(this), e == (Od(), Rl) ? ci(this.r, n.c) : ci(this.w, n.c), t == Rl ? ci(this.r, n.d) : ci(this.w, n.d), xxn(this, n), i = jF(n.c), r = jF(n.d), Txn(this, i, r, r), this.o = (C6(), j.Math.abs(i - r) < 0.2); + } + function nLn(n, e, t) { + var i, r, c, o, f, h; + if (f = u(Rn(n.a, 8), 1936), f != null) + for (r = f, c = 0, o = r.length; c < o; ++c) + null.jm(); + i = t, n.a.Db & 1 || (h = new eTn(n, t, e), i.ui(h)), I(i, 672) ? u(i, 672).wi(n.a) : i.ti() == n.a && i.vi(null); + } + function s6e() { + var n; + return Aee ? u(d4((Z1(), uo), Ha), 1945) : (yCe(), n = u(I(mc((Z1(), uo), Ha), 586) ? mc(uo, Ha) : new fTn(), 586), Aee = !0, rTe(n), DTe(n), it(($G(), w1n), n, new u3n()), fx(n), yr(uo, Ha, n), n); + } + function o6e(n, e, t, i) { + var r; + return r = Qw(n, t, A(M(tn, 1), q, 2, 6, [KL, HL, qL, GL, zL, UL, WL]), e), r < 0 && (r = Qw(n, t, A(M(tn, 1), q, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]), e)), r < 0 ? !1 : (i.d = r, !0); + } + function f6e(n, e, t, i) { + var r; + return r = Qw(n, t, A(M(tn, 1), q, 2, 6, [KL, HL, qL, GL, zL, UL, WL]), e), r < 0 && (r = Qw(n, t, A(M(tn, 1), q, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]), e)), r < 0 ? !1 : (i.d = r, !0); + } + function h6e(n) { + var e, t, i; + for (g9e(n), i = new X(), t = new E(n.a.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), W(i, new UG(e, !0)), W(i, new UG(e, !1)); + Jpe(n.c), O8(i, n.b, new Hu(A(M(Rk, 1), rn, 369, 0, [n.c]))), Ome(n); + } + function l6e(n) { + var e, t, i, r; + for (t = new we(), r = new E(n.d); r.a < r.c.c.length; ) + i = u(y(r), 181), e = u(i.We((G(), wp)), 17), Sr(t.f, e) || it(t, e, new xTn(e)), W(u(Vr(Sr(t.f, e)), 456).b, i); + return new au(new Mh(t)); + } + function a6e(n, e) { + var t, i, r, c, o; + for (i = new LMn(n.j.c.length), t = null, c = new E(n.j); c.a < c.c.c.length; ) + r = u(y(c), 11), r.j != t && (i.b == i.c || dNn(i, t, e), kX(i), t = r.j), o = JLn(r), o && bX(i, o); + i.b == i.c || dNn(i, t, e); + } + function d6e(n, e) { + var t, i, r; + for (i = new Ii(n.b, 0); i.b < i.d.gc(); ) + t = (ne(i.b < i.d.gc()), u(i.d.Xb(i.c = i.b++), 70)), r = u(k(t, (nn(), Jf)), 272), r == (sf(), uw) && (Wu(i), W(e.b, t), ai(t, (G(), wp)) || H(t, wp, n)); + } + function b6e(n) { + var e, t, i, r, c; + for (e = Fh(new re(ue(ei(n).a.Kc(), new Mn()))), r = new re(ue(Lr(n).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 17), t = i.c.i, c = Fh(new re(ue(ei(t).a.Kc(), new Mn()))), e = j.Math.max(e, c); + return Q(e); + } + function w6e(n, e, t) { + var i, r, c, o; + for (le(t, "Processor arrange node", 1), r = null, c = new Tt(), i = _e(e.b, 0); !r && i.b != i.d.c; ) + o = u(Re(i), 86), on(sn(k(o, (cc(), rw)))) && (r = o); + Ht(c, r, c.c.b, c.c), h_n(n, c, yc(t, 1)), ce(t); + } + function eLn(n, e, t) { + var i, r, c; + i = u(hn(n, (Xe(), LP)), 21), r = 0, c = 0, e.a > t.a && (i.Hc((mb(), dy)) ? r = (e.a - t.a) / 2 : i.Hc(by) && (r = e.a - t.a)), e.b > t.b && (i.Hc((mb(), gy)) ? c = (e.b - t.b) / 2 : i.Hc(wy) && (c = e.b - t.b)), zJ(n, r, c); + } + function tLn(n, e, t, i, r, c, o, f, h, l, a, d, g) { + I(n.Cb, 88) && jb(Iu(u(n.Cb, 88)), 4), Oc(n, t), n.f = o, Y3(n, f), n4(n, h), J3(n, l), Z3(n, a), v1(n, d), e4(n, g), p1(n, !0), b1(n, r), n.ok(c), Ta(n, e), i != null && (n.i = null, nT(n, i)); + } + function iLn(n) { + var e, t; + if (n.f) { + for (; n.n > 0; ) { + if (e = u(n.k.Xb(n.n - 1), 72), t = e.ak(), I(t, 99) && u(t, 18).Bb & uc && (!n.e || t.Gj() != Mv || t.aj() != 0) && e.dd() != null) + return !0; + --n.n; + } + return !1; + } else + return n.n > 0; + } + function fY(n, e, t) { + if (n < 0) + return T6(K_n, A(M(Zn, 1), rn, 1, 5, [t, Q(n)])); + if (e < 0) + throw T(new Hn(H_n + e)); + return T6("%s (%s) must not be greater than size (%s)", A(M(Zn, 1), rn, 1, 5, [t, Q(n), Q(e)])); + } + function hY(n, e, t, i, r, c) { + var o, f, h, l; + if (o = i - t, o < 7) { + e2e(e, t, i, c); + return; + } + if (h = t + r, f = i + r, l = h + (f - h >> 1), hY(e, n, h, l, -r, c), hY(e, n, l, f, -r, c), c.ue(n[l - 1], n[l]) <= 0) { + for (; t < i; ) + St(e, t++, n[h++]); + return; + } + Ege(n, h, l, f, e, t, i, c); + } + function O7(n, e) { + var t, i, r; + for (r = new X(), i = new E(n.c.a.b); i.a < i.c.c.length; ) + t = u(y(i), 57), e.Lb(t) && (W(r, new RG(t, !0)), W(r, new RG(t, !1))); + Qpe(n.e), uAn(r, n.d, new Hu(A(M(Rzn, 1), rn, 679, 0, [n.e]))); + } + function g6e(n, e) { + var t, i, r, c, o, f, h; + for (h = e.d, r = e.b.j, f = new E(h); f.a < f.c.c.length; ) + for (o = u(y(f), 101), c = F(_u, wh, 25, r.c.length, 16, 1), it(n.b, o, c), t = o.a.d.p - 1, i = o.c.d.p; t != i; ) + t = (t + 1) % r.c.length, c[t] = !0; + } + function p6e(n, e) { + for (n.r = new n7(n.p), dte(n.r, n), Xi(n.r.j, n.j), _s(n.j), Ke(n.j, e), Ke(n.r.e, e), WE(n), WE(n.r); n.f.c.length != 0; ) + Myn(u(un(n.f, 0), 129)); + for (; n.k.c.length != 0; ) + Myn(u(un(n.k, 0), 129)); + return n.r; + } + function Px(n, e, t) { + var i, r, c; + if (r = On(n.Tg(), e), i = e - n.Ah(), i < 0) + if (r) + if (r.Ij()) + c = n.Yg(r), c >= 0 ? n.sh(c, t) : _Y(n, r, t); + else + throw T(new Hn(Pl + r.ne() + em)); + else + throw T(new Hn(vqn + e + mqn)); + else + Ps(n, i, r, t); + } + function rLn(n) { + var e, t, i, r; + if (t = u(n, 49).qh(), t) + try { + if (i = null, e = d4((Z1(), uo), _Bn(r2e(t))), e && (r = e.rh(), r && (i = r.Wk(aie(t.e)))), i && i != n) + return rLn(i); + } catch (c) { + if (c = Et(c), !I(c, 60)) + throw T(c); + } + return n; + } + function Rc(n, e, t) { + var i, r, c, o; + if (o = e == null ? 0 : n.b.se(e), r = (i = n.a.get(o), i ?? new Array()), r.length == 0) + n.a.set(o, r); + else if (c = kDn(n, e, r), c) + return c.ed(t); + return St(r, r.length, new Nj(e, t)), ++n.c, cC(n.b), null; + } + function cLn(n, e) { + var t, i; + return pC(n.a), ih(n.a, (iT(), EP), EP), ih(n.a, vv, vv), i = new li(), Ze(i, vv, (CT(), CK)), B(hn(e, (pb(), AK))) !== B((f7(), CP)) && Ze(i, vv, jK), Ze(i, vv, EK), cyn(n.a, i), t = EM(n.a, e), t; + } + function uLn(n) { + if (!n) + return q9n(), vzn; + var e = n.valueOf ? n.valueOf() : n; + if (e !== n) { + var t = dR[typeof e]; + return t ? t(e) : tQ(typeof e); + } else + return n instanceof Array || n instanceof j.Array ? new sq(n) : new M9(n); + } + function sLn(n, e, t) { + var i, r, c; + switch (c = n.o, i = u(wr(n.p, t), 244), r = i.i, r.b = F7(i), r.a = $7(i), r.b = j.Math.max(r.b, c.a), r.b > c.a && !e && (r.b = c.a), r.c = -(r.b - c.a) / 2, t.g) { + case 1: + r.d = -r.a; + break; + case 3: + r.d = c.b; + } + tL(i), iL(i); + } + function oLn(n, e, t) { + var i, r, c; + switch (c = n.o, i = u(wr(n.p, t), 244), r = i.i, r.b = F7(i), r.a = $7(i), r.a = j.Math.max(r.a, c.b), r.a > c.b && !e && (r.a = c.b), r.d = -(r.a - c.b) / 2, t.g) { + case 4: + r.c = -r.b; + break; + case 2: + r.c = c.a; + } + tL(i), iL(i); + } + function v6e(n, e) { + var t, i, r, c, o; + if (!e.dc()) { + if (r = u(e.Xb(0), 128), e.gc() == 1) { + xNn(n, r, r, 1, 0, e); + return; + } + for (t = 1; t < e.gc(); ) + (r.j || !r.o) && (c = A3e(e, t), c && (i = u(c.a, 19).a, o = u(c.b, 128), xNn(n, r, o, t, i, e), t = i + 1, r = o)); + } + } + function m6e(n) { + var e, t, i, r, c, o; + for (o = new au(n.d), wi(o, new Gbn()), e = (lM(), A(M(Ncn, 1), z, 270, 0, [n_, i_, ZR, u_, t_, e_, c_, r_])), t = 0, c = new E(o); c.a < c.c.c.length; ) + r = u(y(c), 101), i = e[t % e.length], wme(r, i), ++t; + } + function k6e(n, e) { + eg(); + var t, i, r, c; + if (e.b < 2) + return !1; + for (c = _e(e, 0), t = u(Re(c), 8), i = t; c.b != c.d.c; ) { + if (r = u(Re(c), 8), !(B3(n, i) && B3(n, r))) + return !1; + i = r; + } + return !!(B3(n, i) && B3(n, t)); + } + function lY(n, e) { + var t, i, r, c, o, f, h, l, a, d; + return a = null, d = n, o = Bh(d, "x"), t = new rmn(e), a0e(t.a, o), f = Bh(d, "y"), i = new cmn(e), d0e(i.a, f), h = Bh(d, OB), r = new umn(e), b0e(r.a, h), l = Bh(d, IB), c = new smn(e), a = (w0e(c.a, l), l), a; + } + function jb(n, e) { + bBn(n, e), n.b & 1 && (n.a.a = null), n.b & 2 && (n.a.f = null), n.b & 4 && (n.a.g = null, n.a.i = null), n.b & 16 && (n.a.d = null, n.a.e = null), n.b & 8 && (n.a.b = null), n.b & 32 && (n.a.j = null, n.a.c = null); + } + function y6e(n, e) { + var t, i, r; + if (r = 0, e.length > 0) + try { + r = ss(e, Bi, nt); + } catch (c) { + throw c = Et(c), I(c, 127) ? (i = c, T(new xC(i))) : T(c); + } + return t = (!n.a && (n.a = new $I(n)), n.a), r < t.i && r >= 0 ? u(D(t, r), 56) : null; + } + function j6e(n, e) { + if (n < 0) + return T6(K_n, A(M(Zn, 1), rn, 1, 5, ["index", Q(n)])); + if (e < 0) + throw T(new Hn(H_n + e)); + return T6("%s (%s) must be less than size (%s)", A(M(Zn, 1), rn, 1, 5, ["index", Q(n), Q(e)])); + } + function E6e(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], c.a ? De(c.a, c.b) : c.a = new Yu(c.d), g5(c.a, "" + e); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function C6e(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], c.a ? De(c.a, c.b) : c.a = new Yu(c.d), g5(c.a, "" + e); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function T6e(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], c.a ? De(c.a, c.b) : c.a = new Yu(c.d), g5(c.a, "" + e); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function M6e(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], c.a ? De(c.a, c.b) : c.a = new Yu(c.d), g5(c.a, "" + e); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function fLn(n, e) { + var t, i, r, c, o, f; + for (t = n.b.c.length, r = un(n.b, e); e * 2 + 1 < t && (i = (c = 2 * e + 1, o = c + 1, f = c, o < t && n.a.ue(un(n.b, o), un(n.b, c)) < 0 && (f = o), f), !(n.a.ue(r, un(n.b, i)) < 0)); ) + Es(n.b, e, un(n.b, i)), e = i; + Es(n.b, e, r); + } + function aY(n, e, t, i, r, c) { + var o, f, h, l, a; + for (B(n) === B(t) && (n = n.slice(e, e + r), e = 0), h = t, f = e, l = e + r; f < l; ) + o = j.Math.min(f + 1e4, l), r = o - f, a = n.slice(f, o), a.splice(0, 0, i, c ? r : 0), Array.prototype.splice.apply(h, a), f = o, i += r; + } + function Ix(n, e, t) { + var i, r; + return i = t.d, r = t.e, n.g[i.d] <= n.i[e.d] && n.i[e.d] <= n.i[i.d] && n.g[r.d] <= n.i[e.d] && n.i[e.d] <= n.i[r.d] ? !(n.i[i.d] < n.i[r.d]) : n.i[i.d] < n.i[r.d]; + } + function hLn(n) { + var e, t, i, r, c, o, f; + if (i = n.a.c.length, i > 0) + for (o = n.c.d, f = n.d.d, r = If(ji(new fn(f.a, f.b), o), 1 / (i + 1)), c = new fn(o.a, o.b), t = new E(n.a); t.a < t.c.c.length; ) + e = u(y(t), 559), e.d.a = c.a, e.d.b = c.b, st(c, r); + } + function lLn(n, e, t) { + var i, r, c, o, f, h; + for (h = Lt, c = new E(ENn(n.b)); c.a < c.c.c.length; ) + for (r = u(y(c), 168), f = new E(ENn(e.b)); f.a < f.c.c.length; ) + o = u(y(f), 168), i = dwe(r.a, r.b, o.a, o.b, t), h = j.Math.min(h, i); + return h; + } + function si(n, e) { + if (!e) + throw T(new Nv()); + if (n.j = e, !n.d) + switch (n.j.g) { + case 1: + n.a.a = n.o.a / 2, n.a.b = 0; + break; + case 2: + n.a.a = n.o.a, n.a.b = n.o.b / 2; + break; + case 3: + n.a.a = n.o.a / 2, n.a.b = n.o.b; + break; + case 4: + n.a.a = 0, n.a.b = n.o.b / 2; + } + } + function A6e(n, e) { + var t, i, r; + return I(e.g, 10) && u(e.g, 10).k == (Qn(), Xt) ? Lt : (r = S2(e), r ? j.Math.max(0, n.b / 2 - 0.5) : (t = $w(e), t ? (i = K(Y(wb(t, (nn(), M0)))), j.Math.max(0, i / 2 - 0.5)) : Lt)); + } + function S6e(n, e) { + var t, i, r; + return I(e.g, 10) && u(e.g, 10).k == (Qn(), Xt) ? Lt : (r = S2(e), r ? j.Math.max(0, n.b / 2 - 0.5) : (t = $w(e), t ? (i = K(Y(wb(t, (nn(), M0)))), j.Math.max(0, i / 2 - 0.5)) : Lt)); + } + function P6e(n) { + var e, t, i, r, c, o; + for (o = c6(n.d, n.e), c = o.Kc(); c.Ob(); ) + for (r = u(c.Pb(), 11), i = n.e == (J(), Gn) ? r.e : r.g, t = new E(i); t.a < t.c.c.length; ) + e = u(y(t), 17), !Wi(e) && e.c.i.c != e.d.i.c && (x5e(n, e), ++n.f, ++n.c); + } + function aLn(n, e) { + var t, i; + if (e.dc()) + return Pn(), Pn(), cr; + for (i = new X(), W(i, Q(Bi)), t = 1; t < n.f; ++t) + n.a == null && dBn(n), n.a[t] && W(i, Q(t)); + return i.c.length == 1 ? (Pn(), Pn(), cr) : (W(i, Q(nt)), Iye(e, i)); + } + function I6e(n, e) { + var t, i, r, c, o, f, h; + o = e.c.i.k != (Qn(), ii), h = o ? e.d : e.c, t = z3e(e, h).i, r = u(te(n.k, h), 121), i = n.i[t.p].a, eEn(h.i) < (t.c ? xr(t.c.a, t, 0) : -1) ? (c = r, f = i) : (c = i, f = r), jo(lo(ho(ao(fo(new Ns(), 0), 4), c), f)); + } + function O6e(n, e, t) { + var i, r, c, o, f, h; + if (t) + for (r = t.a.length, i = new ha(r), f = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); f.Ob(); ) + o = u(f.Pb(), 19), h = rx(n, G2(sb(t, o.a))), h && (c = (!e.b && (e.b = new Fn(he, e, 4, 7)), e.b), me(c, h)); + } + function D6e(n, e, t) { + var i, r, c, o, f, h; + if (t) + for (r = t.a.length, i = new ha(r), f = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); f.Ob(); ) + o = u(f.Pb(), 19), h = rx(n, G2(sb(t, o.a))), h && (c = (!e.c && (e.c = new Fn(he, e, 5, 8)), e.c), me(c, h)); + } + function D7(n, e, t) { + var i, r; + i = e.a & n.f, e.b = n.b[i], n.b[i] = e, r = e.f & n.f, e.d = n.c[r], n.c[r] = e, t ? (e.e = t.e, e.e ? e.e.c = e : n.a = e, e.c = t.c, e.c ? e.c.e = e : n.e = e) : (e.e = n.e, e.c = null, n.e ? n.e.c = e : n.a = e, n.e = e), ++n.i, ++n.g; + } + function dLn(n) { + var e, t, i; + if (e = n.Pb(), !n.Ob()) + return e; + for (i = rc(De(new V1(), "expected one element but was: <"), e), t = 0; t < 4 && n.Ob(); t++) + rc((i.a += Qi, i), n.Pb()); + throw n.Ob() && (i.a += ", ..."), i.a += ">", T(new Hn(i.a)); + } + function $6e(n, e) { + var t; + e.d ? e.d.b = e.b : n.a = e.b, e.b ? e.b.d = e.d : n.e = e.d, !e.e && !e.c ? (t = u(O2(n.b, e.a), 283), t.a = 0, ++n.c) : (t = u(te(n.b, e.a), 283), --t.a, e.e ? e.e.c = e.c : t.b = e.c, e.c ? e.c.e = e.e : t.c = e.e), --n.d; + } + function F6e(n) { + var e, t; + return t = -n.a, e = A(M(Ls, 1), Bf, 25, 15, [43, 48, 48, 48, 48]), t < 0 && (e[0] = 45, t = -t), e[1] = e[1] + ((t / 60 | 0) / 10 | 0) & Ut, e[2] = e[2] + (t / 60 | 0) % 10 & Ut, e[3] = e[3] + (t % 60 / 10 | 0) & Ut, e[4] = e[4] + t % 10 & Ut, Hs(e, 0, e.length); + } + function bLn(n, e, t) { + var i, r; + for (i = e.d, r = t.d; i.a - r.a == 0 && i.b - r.b == 0; ) + i.a += Fu(n, 26) * N6 + Fu(n, 27) * B6 - 0.5, i.b += Fu(n, 26) * N6 + Fu(n, 27) * B6 - 0.5, r.a += Fu(n, 26) * N6 + Fu(n, 27) * B6 - 0.5, r.b += Fu(n, 26) * N6 + Fu(n, 27) * B6 - 0.5; + } + function dY(n) { + var e, t, i, r; + for (n.g = new f6(u(pe(Yi), 290)), i = 0, t = (J(), Kn), e = 0; e < n.j.c.length; e++) + r = u(un(n.j, e), 11), r.j != t && (i != e && m2(n.g, t, new Pi(Q(i), Q(e))), t = r.j, i = e); + m2(n.g, t, new Pi(Q(i), Q(e))); + } + function x6e(n) { + var e, t, i, r, c, o, f; + for (i = 0, t = new E(n.b); t.a < t.c.c.length; ) + for (e = u(y(t), 29), c = new E(e.a); c.a < c.c.c.length; ) + for (r = u(y(c), 10), r.p = i++, f = new E(r.j); f.a < f.c.c.length; ) + o = u(y(f), 11), o.p = i++; + } + function wLn(n, e, t, i, r) { + var c, o, f, h, l; + if (e) + for (f = e.Kc(); f.Ob(); ) + for (o = u(f.Pb(), 10), l = tZ(o, (sr(), Lc), t).Kc(); l.Ob(); ) + h = u(l.Pb(), 11), c = u(Vr(Sr(r.f, h)), 112), c || (c = new n7(n.d), i.c[i.c.length] = c, Jxn(c, h, r)); + } + function bY(n, e) { + var t, i, r; + if (r = rg((wu(), xi), n.Tg(), e), r) + er(), u(r, 66).Oj() || (r = A2(Er(xi, r))), i = (t = n.Yg(r), u(t >= 0 ? n._g(t, !0, !0) : Zd(n, r, !0), 153)), u(i, 215).ol(e); + else + throw T(new Hn(Pl + e.ne() + em)); + } + function wY(n) { + var e, t; + return n > -140737488355328 && n < 140737488355328 ? n == 0 ? 0 : (e = n < 0, e && (n = -n), t = Gt(j.Math.floor(j.Math.log(n) / 0.6931471805599453)), (!e || n != j.Math.pow(2, t)) && ++t, t) : FOn(eu(n)); + } + function L6e(n) { + var e, t, i, r, c, o, f; + for (c = new Sh(), t = new E(n); t.a < t.c.c.length; ) + e = u(y(t), 129), o = e.a, f = e.b, !(c.a._b(o) || c.a._b(f)) && (r = o, i = f, o.e.b + o.j.b > 2 && f.e.b + f.j.b <= 2 && (r = f, i = o), c.a.zc(r, c), r.q = i); + return c; + } + function gLn(n, e) { + var t, i, r; + return i = new qh(n), Pr(i, e), H(i, (G(), qS), e), H(i, (nn(), Bt), (Ai(), Sc)), H(i, Qf, (oh(), FP)), ta(i, (Qn(), Xt)), t = new gc(), Hr(t, i), si(t, (J(), Gn)), r = new gc(), Hr(r, i), si(r, Vn), i; + } + function pLn(n) { + switch (n.g) { + case 0: + return new WI((Kd(), ry)); + case 1: + return new D4n(); + case 2: + return new R4n(); + default: + throw T(new Hn("No implementation is available for the crossing minimizer " + (n.f != null ? n.f : "" + n.g))); + } + } + function vLn(n, e) { + var t, i, r, c, o; + for (n.c[e.p] = !0, W(n.a, e), o = new E(e.j); o.a < o.c.c.length; ) + for (c = u(y(o), 11), i = new uf(c.b); Kr(i.a) || Kr(i.b); ) + t = u(Kr(i.a) ? y(i.a) : y(i.b), 17), r = V2e(c, t).i, n.c[r.p] || vLn(n, r); + } + function mLn(n) { + var e, t, i, r, c, o, f; + for (o = 0, t = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); t.e != t.i.gc(); ) + e = u(oe(t), 33), f = e.g, r = e.f, i = j.Math.sqrt(f * f + r * r), o = j.Math.max(i, o), c = mLn(e), o = j.Math.max(c, o); + return o; + } + function Tu() { + Tu = N, Gl = new d5("OUTSIDE", 0), n1 = new d5("INSIDE", 1), Ty = new d5("NEXT_TO_PORT_IF_POSSIBLE", 2), s9 = new d5("ALWAYS_SAME_SIDE", 3), u9 = new d5("ALWAYS_OTHER_SAME_SIDE", 4), Pp = new d5("SPACE_EFFICIENT", 5); + } + function kLn(n, e, t) { + var i, r, c, o, f, h; + return i = bae(n, (r = (dd(), c = new nG(), c), t && HY(r, t), r), e), Q5(i, $h(e, Uf)), YT(e, i), Zme(e, i), lY(e, i), o = e, f = xd(o, "ports"), h = new Ekn(n, i), R9e(h.a, h.b, f), oF(n, e, i), owe(n, e, i), i; + } + function N6e(n) { + var e, t; + return t = -n.a, e = A(M(Ls, 1), Bf, 25, 15, [43, 48, 48, 58, 48, 48]), t < 0 && (e[0] = 45, t = -t), e[1] = e[1] + ((t / 60 | 0) / 10 | 0) & Ut, e[2] = e[2] + (t / 60 | 0) % 10 & Ut, e[4] = e[4] + (t % 60 / 10 | 0) & Ut, e[5] = e[5] + t % 10 & Ut, Hs(e, 0, e.length); + } + function B6e(n) { + var e; + return e = A(M(Ls, 1), Bf, 25, 15, [71, 77, 84, 45, 48, 48, 58, 48, 48]), n <= 0 && (e[3] = 43, n = -n), e[4] = e[4] + ((n / 60 | 0) / 10 | 0) & Ut, e[5] = e[5] + (n / 60 | 0) % 10 & Ut, e[7] = e[7] + (n % 60 / 10 | 0) & Ut, e[8] = e[8] + n % 10 & Ut, Hs(e, 0, e.length); + } + function R6e(n) { + var e, t, i, r, c; + if (n == null) + return iu; + for (c = new ya(Qi, "[", "]"), t = n, i = 0, r = t.length; i < r; ++i) + e = t[i], c.a ? De(c.a, c.b) : c.a = new Yu(c.d), g5(c.a, "" + O5(e)); + return c.a ? c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e) : c.c; + } + function gY(n, e) { + var t, i, r; + for (r = nt, i = new E(Hw(e)); i.a < i.c.c.length; ) + t = u(y(i), 213), t.f && !n.c[t.c] && (n.c[t.c] = !0, r = j.Math.min(r, gY(n, TT(t, e)))); + return n.i[e.d] = n.j, n.g[e.d] = j.Math.min(r, n.j++), n.g[e.d]; + } + function yLn(n, e) { + var t, i, r; + for (r = u(u(ct(n.r, e), 21), 84).Kc(); r.Ob(); ) + i = u(r.Pb(), 111), i.e.b = (t = i.b, t.Xe((Xe(), Bu)) ? t.Hf() == (J(), Kn) ? -t.rf().b - K(Y(t.We(Bu))) : K(Y(t.We(Bu))) : t.Hf() == (J(), Kn) ? -t.rf().b : 0); + } + function _6e(n) { + var e, t, i, r, c, o, f; + for (t = Ez(n.e), c = If(o8(Qr(jz(n.e)), n.d * n.a, n.c * n.b), -0.5), e = t.a - c.a, r = t.b - c.b, f = 0; f < n.c; f++) { + for (i = e, o = 0; o < n.d; o++) + f2e(n.e, new ys(i, r, n.a, n.b)) && wM(n, o, f, !1, !0), i += n.a; + r += n.b; + } + } + function K6e(n) { + var e, t, i; + if (on(sn(hn(n, (Xe(), vy))))) { + for (i = new X(), t = new re(ue(Gh(n).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 79), Yd(e) && on(sn(hn(e, VK))) && (i.c[i.c.length] = e); + return i; + } else + return Pn(), Pn(), cr; + } + function G2(n) { + var e, t; + if (t = !1, I(n, 204)) + return t = !0, u(n, 204).a; + if (!t && I(n, 258) && (e = u(n, 258).a % 1 == 0, e)) + return t = !0, Q(Fre(u(n, 258).a)); + throw T(new Af("Id must be a string or an integer: '" + n + "'.")); + } + function H6e(n, e) { + var t, i, r, c, o, f; + for (c = null, r = new DCn((!n.a && (n.a = new $I(n)), n.a)); yY(r); ) + if (t = u(cM(r), 56), i = (o = t.Tg(), f = (ig(o), o.o), !f || !t.mh(f) ? null : TU(iF(f), t.ah(f))), i != null && An(i, e)) { + c = t; + break; + } + return c; + } + function jLn(n, e, t) { + var i, r, c, o, f; + if (rs(t, "occurrences"), t == 0) + return f = u(db(T2(n.a), e), 14), f ? f.gc() : 0; + if (o = u(db(T2(n.a), e), 14), !o) + return 0; + if (c = o.gc(), t >= c) + o.$b(); + else + for (r = o.Kc(), i = 0; i < t; i++) + r.Pb(), r.Qb(); + return c; + } + function q6e(n, e, t) { + var i, r, c, o; + return rs(t, "oldCount"), rs(0, "newCount"), i = u(db(T2(n.a), e), 14), (i ? i.gc() : 0) == t ? (rs(0, "count"), r = (c = u(db(T2(n.a), e), 14), c ? c.gc() : 0), o = -r, o > 0 ? dG() : o < 0 && jLn(n, e, -o), !0) : !1; + } + function $7(n) { + var e, t, i, r, c, o, f; + if (f = 0, n.b == 0) { + for (o = rFn(n, !0), e = 0, i = o, r = 0, c = i.length; r < c; ++r) + t = i[r], t > 0 && (f += t, ++e); + e > 1 && (f += n.c * (e - 1)); + } else + f = J9n(oOn(YE(pt(ID(n.a), new xln()), new Lln()))); + return f > 0 ? f + n.n.d + n.n.a : 0; + } + function F7(n) { + var e, t, i, r, c, o, f; + if (f = 0, n.b == 0) + f = J9n(oOn(YE(pt(ID(n.a), new $ln()), new Fln()))); + else { + for (o = cFn(n, !0), e = 0, i = o, r = 0, c = i.length; r < c; ++r) + t = i[r], t > 0 && (f += t, ++e); + e > 1 && (f += n.c * (e - 1)); + } + return f > 0 ? f + n.n.b + n.n.c : 0; + } + function G6e(n, e) { + var t, i, r, c; + for (c = u(wr(n.b, e), 124), t = c.a, r = u(u(ct(n.r, e), 21), 84).Kc(); r.Ob(); ) + i = u(r.Pb(), 111), i.c && (t.a = j.Math.max(t.a, nW(i.c))); + if (t.a > 0) + switch (e.g) { + case 2: + c.n.c = n.s; + break; + case 4: + c.n.b = n.s; + } + } + function z6e(n, e) { + var t, i, r; + return t = u(k(e, (Go(), V4)), 19).a - u(k(n, V4), 19).a, t == 0 ? (i = ji(Qr(u(k(n, (dl(), Bk)), 8)), u(k(n, vm), 8)), r = ji(Qr(u(k(e, Bk), 8)), u(k(e, vm), 8)), ni(i.a * i.b, r.a * r.b)) : t; + } + function U6e(n, e) { + var t, i, r; + return t = u(k(e, (n0(), jP)), 19).a - u(k(n, jP), 19).a, t == 0 ? (i = ji(Qr(u(k(n, (cc(), sy)), 8)), u(k(n, zm), 8)), r = ji(Qr(u(k(e, sy), 8)), u(k(e, zm), 8)), ni(i.a * i.b, r.a * r.b)) : t; + } + function ELn(n) { + var e, t; + return t = new V1(), t.a += "e_", e = ewe(n), e != null && (t.a += "" + e), n.c && n.d && (De((t.a += " ", t), UT(n.c)), De(rc((t.a += "[", t), n.c.i), "]"), De((t.a += TN, t), UT(n.d)), De(rc((t.a += "[", t), n.d.i), "]")), t.a; + } + function CLn(n) { + switch (n.g) { + case 0: + return new F4n(); + case 1: + return new x4n(); + case 2: + return new $4n(); + case 3: + return new L4n(); + default: + throw T(new Hn("No implementation is available for the layout phase " + (n.f != null ? n.f : "" + n.g))); + } + } + function pY(n, e, t, i, r) { + var c; + switch (c = 0, r.g) { + case 1: + c = j.Math.max(0, e.b + n.b - (t.b + i)); + break; + case 3: + c = j.Math.max(0, -n.b - i); + break; + case 2: + c = j.Math.max(0, -n.a - i); + break; + case 4: + c = j.Math.max(0, e.a + n.a - (t.a + i)); + } + return c; + } + function W6e(n, e, t) { + var i, r, c, o, f; + if (t) + for (r = t.a.length, i = new ha(r), f = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); f.Ob(); ) + o = u(f.Pb(), 19), c = y3(t, o.a), Dtn in c.a || xB in c.a ? rke(n, c, e) : hTe(n, c, e), Oce(u(te(n.b, t4(c)), 79)); + } + function vY(n) { + var e, t; + switch (n.b) { + case -1: + return !0; + case 0: + return t = n.t, t > 1 || t == -1 ? (n.b = -1, !0) : (e = qs(n), e && (er(), e.Cj() == kGn) ? (n.b = -1, !0) : (n.b = 1, !1)); + default: + case 1: + return !1; + } + } + function X6e(n, e) { + var t, i, r, c, o; + for (i = (!e.s && (e.s = new V(su, e, 21, 17)), e.s), c = null, r = 0, o = i.i; r < o; ++r) + switch (t = u(D(i, r), 170), Pd(Er(n, t))) { + case 2: + case 3: + !c && (c = new X()), c.c[c.c.length] = t; + } + return c || (Pn(), Pn(), cr); + } + function mY(n, e) { + var t, i, r, c; + if (Qe(n), n.c != 0 || n.a != 123) + throw T(new Ee(Pe((je(), Hqn)))); + if (c = e == 112, i = n.d, t = c3(n.i, 125, i), t < 0) + throw T(new Ee(Pe((je(), qqn)))); + return r = Zu(n.i, i, t), n.d = t + 1, hPn(r, c, (n.e & 512) == 512); + } + function V6e(n) { + var e; + if (e = u(k(n, (nn(), Om)), 314), e == (F2(), ap)) + throw T(new Gv("The hierarchy aware processor " + e + " in child node " + n + " is only allowed if the root node specifies the same hierarchical processor.")); + } + function Q6e(n, e) { + wo(); + var t, i, r, c, o, f; + for (t = null, o = e.Kc(); o.Ob(); ) + c = u(o.Pb(), 128), !c.o && (i = ace(c.a), r = Zoe(c.a), f = new P6(i, r, null, u(c.d.a.ec().Kc().Pb(), 17)), W(f.c, c.a), n.c[n.c.length] = f, t && W(t.d, f), t = f); + } + function J6e(n, e) { + var t, i, r; + if (!e) + W$(n, null), x3(n, null); + else if (e.i & 4) + for (i = "[]", t = e.c; ; t = t.c) { + if (!(t.i & 4)) { + r = hG((Ph(t), t.o + i)), W$(n, r), x3(n, r); + break; + } + i += "[]"; + } + else + r = hG((Ph(e), e.o)), W$(n, r), x3(n, r); + n.yk(e); + } + function y6(n, e, t, i, r) { + var c, o, f, h; + return h = YO(n, u(r, 56)), B(h) !== B(r) ? (f = u(n.g[t], 72), c = uh(e, h), k5(n, t, px(n, t, c)), qu(n.e) && (o = hl(n, 9, c.ak(), r, h, i, !1), FJ(o, new Lh(n.e, 9, n.c, f, c, i, !1)), L$(o)), h) : r; + } + function Y6e(n, e, t) { + var i, r, c, o, f, h; + for (i = u(ct(n.c, e), 15), r = u(ct(n.c, t), 15), c = i.Zc(i.gc()), o = r.Zc(r.gc()); c.Sb() && o.Sb(); ) + if (f = u(c.Ub(), 19), h = u(o.Ub(), 19), f != h) + return Uc(f.a, h.a); + return !c.Ob() && !o.Ob() ? 0 : c.Ob() ? 1 : -1; + } + function TLn(n, e) { + var t, i, r; + try { + return r = qle(n.a, e), r; + } catch (c) { + if (c = Et(c), I(c, 32)) { + try { + if (i = ss(e, Bi, nt), t = xo(n.a), i >= 0 && i < t.length) + return t[i]; + } catch (o) { + if (o = Et(o), !I(o, 127)) + throw T(o); + } + return null; + } else + throw T(c); + } + } + function Ox(n, e) { + var t, i, r; + if (r = rg((wu(), xi), n.Tg(), e), r) + return er(), u(r, 66).Oj() || (r = A2(Er(xi, r))), i = (t = n.Yg(r), u(t >= 0 ? n._g(t, !0, !0) : Zd(n, r, !0), 153)), u(i, 215).ll(e); + throw T(new Hn(Pl + e.ne() + MB)); + } + function Z6e() { + FG(); + var n; + return cee ? u(d4((Z1(), uo), Vs), 1939) : (He(qa, new Qpn()), FEe(), n = u(I(mc((Z1(), uo), Vs), 547) ? mc(uo, Vs) : new hTn(), 547), cee = !0, ITe(n), xTe(n), it(($G(), w1n), n, new apn()), yr(uo, Vs, n), n); + } + function nme(n, e) { + var t, i, r, c; + n.j = -1, qu(n.e) ? (t = n.i, c = n.i != 0, F8(n, e), i = new Lh(n.e, 3, n.c, null, e, t, c), r = e.Qk(n.e, n.c, null), r = txn(n, e, r), r ? (r.Ei(i), r.Fi()) : et(n.e, i)) : (F8(n, e), r = e.Qk(n.e, n.c, null), r && r.Fi()); + } + function tM(n, e) { + var t, i, r; + if (r = 0, i = e[0], i >= n.length) + return -1; + for (t = (Te(i, n.length), n.charCodeAt(i)); t >= 48 && t <= 57 && (r = r * 10 + (t - 48), ++i, !(i >= n.length)); ) + t = (Te(i, n.length), n.charCodeAt(i)); + return i > e[0] ? e[0] = i : r = -1, r; + } + function eme(n) { + var e, t, i, r, c; + return r = u(n.a, 19).a, c = u(n.b, 19).a, t = r, i = c, e = j.Math.max(j.Math.abs(r), j.Math.abs(c)), r <= 0 && r == c ? (t = 0, i = c - 1) : r == -e && c != e ? (t = c, i = r, c >= 0 && ++t) : (t = -c, i = r), new Pi(Q(t), Q(i)); + } + function tme(n, e, t, i) { + var r, c, o, f, h, l; + for (r = 0; r < e.o; r++) + for (c = r - e.j + t, o = 0; o < e.p; o++) + if (f = o - e.k + i, h = c, l = f, h += n.j, l += n.k, h >= 0 && l >= 0 && h < n.o && l < n.p && (!lFn(e, r, o) && oFn(n, c, f) || zw(e, r, o) && !Zpe(n, c, f))) + return !0; + return !1; + } + function ime(n, e, t) { + var i, r, c, o, f; + o = n.c, f = n.d, c = Gr(A(M(di, 1), q, 8, 0, [o.i.n, o.n, o.a])).b, r = (c + Gr(A(M(di, 1), q, 8, 0, [f.i.n, f.n, f.a])).b) / 2, i = null, o.j == (J(), Vn) ? i = new fn(e + o.i.c.c.a + t, r) : i = new fn(e - t, r), u3(n.a, 0, i); + } + function Yd(n) { + var e, t, i, r; + for (e = null, i = ul(of(A(M(gf, 1), rn, 20, 0, [(!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c)]))); Se(i); ) + if (t = u(ve(i), 82), r = Ir(t), !e) + e = r; + else if (e != r) + return !1; + return !0; + } + function Dx(n, e, t) { + var i; + if (++n.j, e >= n.i) + throw T(new mr(NB + e + _a + n.i)); + if (t >= n.i) + throw T(new mr(BB + t + _a + n.i)); + return i = n.g[t], e != t && (e < t ? pc(n.g, e, n.g, e + 1, t - e) : pc(n.g, t + 1, n.g, t, e - t), St(n.g, e, i), n.ei(e, i, t), n.ci()), i; + } + function Tn(n, e, t) { + var i; + if (i = u(n.c.xc(e), 14), i) + return i.Fc(t) ? (++n.d, !0) : !1; + if (i = n.ic(e), i.Fc(t)) + return ++n.d, n.c.zc(e, i), !0; + throw T(new EX("New Collection violated the Collection spec")); + } + function x7(n) { + var e, t, i; + return n < 0 ? 0 : n == 0 ? 32 : (i = -(n >> 16), e = i >> 16 & 16, t = 16 - e, n = n >> e, i = n - 256, e = i >> 16 & 8, t += e, n <<= e, i = n - Ob, e = i >> 16 & 4, t += e, n <<= e, i = n - Nf, e = i >> 16 & 2, t += e, n <<= e, i = n >> 14, e = i & ~(i >> 1), t + 2 - e); + } + function rme(n) { + C2(); + var e, t, i, r; + for (eS = new X(), DR = new we(), OR = new X(), e = (!n.a && (n.a = new V(Ot, n, 10, 11)), n.a), LCe(e), r = new ie(e); r.e != r.i.gc(); ) + i = u(oe(r), 33), xr(eS, i, 0) == -1 && (t = new X(), W(OR, t), L$n(i, t)); + return OR; + } + function cme(n, e, t) { + var i, r, c, o; + n.a = t.b.d, I(e, 352) ? (r = ng(u(e, 79), !1, !1), c = I7(r), i = new s5n(n), $i(c, i), z7(c, r), e.We((Xe(), Rg)) != null && $i(u(e.We(Rg), 74), i)) : (o = u(e, 470), o.Hg(o.Dg() + n.a.a), o.Ig(o.Eg() + n.a.b)); + } + function MLn(n, e) { + var t, i, r, c, o, f, h, l; + for (l = K(Y(k(e, (nn(), Fm)))), h = n[0].n.a + n[0].o.a + n[0].d.c + l, f = 1; f < n.length; f++) + i = n[f].n, r = n[f].o, t = n[f].d, c = i.a - t.b - h, c < 0 && (i.a -= c), o = e.f, o.a = j.Math.max(o.a, i.a + r.a), h = i.a + r.a + t.c + l; + } + function ume(n, e) { + var t, i, r, c, o, f; + return i = u(u(te(n.g, e.a), 46).a, 65), r = u(u(te(n.g, e.b), 46).a, 65), c = i.b, o = r.b, t = Cje(c, o), t >= 0 ? t : (f = L5(ji(new fn(o.c + o.b / 2, o.d + o.a / 2), new fn(c.c + c.b / 2, c.d + c.a / 2))), -(XBn(c, o) - 1) * f); + } + function sme(n, e, t) { + var i; + _t(new $n(null, (!t.a && (t.a = new V(Mt, t, 6, 6)), new xn(t.a, 16))), new hkn(n, e)), _t(new $n(null, (!t.n && (t.n = new V(Rr, t, 1, 7)), new xn(t.n, 16))), new lkn(n, e)), i = u(hn(t, (Xe(), Rg)), 74), i && EV(i, n, e); + } + function Zd(n, e, t) { + var i, r, c; + if (c = rg((wu(), xi), n.Tg(), e), c) + return er(), u(c, 66).Oj() || (c = A2(Er(xi, c))), r = (i = n.Yg(c), u(i >= 0 ? n._g(i, !0, !0) : Zd(n, c, !0), 153)), u(r, 215).hl(e, t); + throw T(new Hn(Pl + e.ne() + MB)); + } + function kY(n, e, t, i) { + var r, c, o, f, h; + if (r = n.d[e], r) { + if (c = r.g, h = r.i, i != null) { + for (f = 0; f < h; ++f) + if (o = u(c[f], 133), o.Sh() == t && tt(i, o.cd())) + return o; + } else + for (f = 0; f < h; ++f) + if (o = u(c[f], 133), B(o.cd()) === B(i)) + return o; + } + return null; + } + function L7(n, e) { + var t; + if (e < 0) + throw T(new bj("Negative exponent")); + if (e == 0) + return qA; + if (e == 1 || SQ(n, qA) || SQ(n, U4)) + return n; + if (!QLn(n, 0)) { + for (t = 1; !QLn(n, t); ) + ++t; + return Fw(y2e(t * e), L7(MX(n, t), e)); + } + return Ive(n, e); + } + function ome(n, e) { + var t, i, r; + if (B(n) === B(e)) + return !0; + if (n == null || e == null || n.length != e.length) + return !1; + for (t = 0; t < n.length; ++t) + if (i = n[t], r = e[t], !(B(i) === B(r) || i != null && tt(i, r))) + return !1; + return !0; + } + function ALn(n) { + OG(); + var e, t, i; + for (this.b = yWn, this.c = (or(), mh), this.f = (p7n(), kWn), this.a = n, mG(this, new Ian()), oM(this), i = new E(n.b); i.a < i.c.c.length; ) + t = u(y(i), 81), t.d || (e = new _F(A(M(RR, 1), rn, 81, 0, [t])), W(n.a, e)); + } + function fme(n, e, t) { + var i, r, c, o, f, h; + if (!n || n.c.length == 0) + return null; + for (c = new ZTn(e, !t), r = new E(n); r.a < r.c.c.length; ) + i = u(y(r), 70), nY(c, (Vv(), new rj(i))); + return o = c.i, o.a = (h = c.n, c.e.b + h.d + h.a), o.b = (f = c.n, c.e.a + f.b + f.c), c; + } + function SLn(n) { + var e, t, i, r, c, o, f; + for (f = I8(n.a), vz(f, new Adn()), t = null, r = f, c = 0, o = r.length; c < o && (i = r[c], i.k == (Qn(), Xt)); ++c) + e = u(k(i, (G(), ec)), 61), !(e != (J(), Gn) && e != Vn) && (t && u(k(t, gp), 15).Fc(i), t = i); + } + function hme(n, e, t) { + var i, r, c, o, f, h, l; + h = (Ln(e, n.c.length), u(n.c[e], 329)), l1(n, e), h.b / 2 >= t && (i = e, l = (h.c + h.a) / 2, o = l - t, h.c <= l - t && (r = new hD(h.c, o), J0(n, i++, r)), f = l + t, f <= h.a && (c = new hD(f, h.a), ib(i, n.c.length), e5(n.c, i, c))); + } + function yY(n) { + var e; + if (!n.c && n.g == null) + n.d = n.si(n.f), me(n, n.d), e = n.d; + else { + if (n.g == null) + return !0; + if (n.i == 0) + return !1; + e = u(n.g[n.i - 1], 47); + } + return e == n.b && null.km >= null.jm() ? (cM(n), yY(n)) : e.Ob(); + } + function lme(n, e, t) { + var i, r, c, o, f; + if (f = t, !f && (f = YU(new Gp(), 0)), le(f, qKn, 1), XRn(n.c, e), o = TEe(n.a, e), o.gc() == 1) + IRn(u(o.Xb(0), 37), f); + else + for (c = 1 / o.gc(), r = o.Kc(); r.Ob(); ) + i = u(r.Pb(), 37), IRn(i, yc(f, c)); + mie(n.a, o, e), T7e(e), ce(f); + } + function PLn(n) { + if (this.a = n, n.c.i.k == (Qn(), Xt)) + this.c = n.c, this.d = u(k(n.c.i, (G(), ec)), 61); + else if (n.d.i.k == Xt) + this.c = n.d, this.d = u(k(n.d.i, (G(), ec)), 61); + else + throw T(new Hn("Edge " + n + " is not an external edge.")); + } + function ILn(n, e) { + var t, i, r; + r = n.b, n.b = e, n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 3, r, n.b)), e ? e != n && (Oc(n, e.zb), G$(n, e.d), t = (i = e.c, i ?? e.zb), U$(n, t == null || An(t, e.zb) ? null : t)) : (Oc(n, null), G$(n, 0), U$(n, null)); + } + function OLn(n) { + var e, t; + if (n.f) { + for (; n.n < n.o; ) { + if (e = u(n.j ? n.j.pi(n.n) : n.k.Xb(n.n), 72), t = e.ak(), I(t, 99) && u(t, 18).Bb & uc && (!n.e || t.Gj() != Mv || t.aj() != 0) && e.dd() != null) + return !0; + ++n.n; + } + return !1; + } else + return n.n < n.o; + } + function DLn(n, e) { + var t; + this.e = (eb(), pe(n), eb(), $Q(n)), this.c = (pe(e), $Q(e)), Bz(this.e.Hd().dc() == this.c.Hd().dc()), this.d = YDn(this.e), this.b = YDn(this.c), t = fa(Zn, [q, rn], [5, 1], 5, [this.e.Hd().gc(), this.c.Hd().gc()], 2), this.a = t, nbe(this); + } + function $Ln(n) { + !lR && (lR = zCe()); + var e = n.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g, function(t) { + return Y1e(t); + }); + return '"' + e + '"'; + } + function FLn(n) { + zW(); + var e, t; + for (this.b = Kzn, this.c = qzn, this.g = (g7n(), _zn), this.d = (or(), mh), this.a = n, GY(this), t = new E(n.b); t.a < t.c.c.length; ) + e = u(y(t), 57), !e.a && Zyn(OIn(new Xq(), A(M(VA, 1), rn, 57, 0, [e])), n), e.e = new uC(e.d); + } + function ame(n) { + var e, t, i, r, c, o; + for (r = n.e.c.length, i = F(Ds, Db, 15, r, 0, 1), o = new E(n.e); o.a < o.c.c.length; ) + c = u(y(o), 144), i[c.b] = new Tt(); + for (t = new E(n.c); t.a < t.c.c.length; ) + e = u(y(t), 282), i[e.c.b].Fc(e), i[e.d.b].Fc(e); + return i; + } + function dme(n) { + var e, t, i, r, c, o, f; + for (f = nh(n.c.length), r = new E(n); r.a < r.c.c.length; ) { + for (i = u(y(r), 10), o = new hi(), c = ei(i), t = new re(ue(c.a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 17), e.c.i == e.d.i || ci(o, e.d.i); + f.c[f.c.length] = o; + } + return f; + } + function bme(n, e) { + var t, i, r, c, o; + if (t = u(Rn(n.a, 4), 126), o = t == null ? 0 : t.length, e >= o) + throw T(new Q0(e, o)); + return r = t[e], o == 1 ? i = null : (i = F(bH, qB, 415, o - 1, 0, 1), pc(t, 0, i, 0, e), c = o - e - 1, c > 0 && pc(t, e + 1, i, e, c)), i4(n, i), nLn(n, e, r), r; + } + function z2() { + z2 = N, Dp = u(D(R((jG(), oc).qb), 6), 34), Op = u(D(R(oc.qb), 3), 34), kH = u(D(R(oc.qb), 4), 34), yH = u(D(R(oc.qb), 5), 18), QT(Dp), QT(Op), QT(kH), QT(yH), fee = new Hu(A(M(su, 1), gg, 170, 0, [Dp, Op])); + } + function xLn(n, e) { + var t; + this.d = new Bv(), this.b = e, this.e = new kr(e.qf()), t = n.u.Hc((Tu(), Ty)), n.u.Hc(n1) ? n.D ? this.a = t && !e.If() : this.a = !0 : n.u.Hc(Gl) ? t ? this.a = !(e.zf().Kc().Ob() || e.Bf().Kc().Ob()) : this.a = !1 : this.a = !1; + } + function LLn(n, e) { + var t, i, r, c; + for (t = n.o.a, c = u(u(ct(n.r, e), 21), 84).Kc(); c.Ob(); ) + r = u(c.Pb(), 111), r.e.a = (i = r.b, i.Xe((Xe(), Bu)) ? i.Hf() == (J(), Gn) ? -i.rf().a - K(Y(i.We(Bu))) : t + K(Y(i.We(Bu))) : i.Hf() == (J(), Gn) ? -i.rf().a : t); + } + function NLn(n, e) { + var t, i, r, c; + t = u(k(n, (nn(), as)), 103), c = u(hn(e, av), 61), r = u(k(n, Bt), 98), r != (Ai(), jf) && r != ql ? c == (J(), Xr) && (c = mZ(e, t), c == Xr && (c = B2(t))) : (i = PRn(e), i > 0 ? c = B2(t) : c = b7(B2(t))), pr(e, av, c); + } + function wme(n, e) { + var t, i, r, c, o; + for (o = n.j, e.a != e.b && wi(o, new zbn()), r = o.c.length / 2 | 0, i = 0; i < r; i++) + c = (Ln(i, o.c.length), u(o.c[i], 113)), c.c && si(c.d, e.a); + for (t = r; t < o.c.length; t++) + c = (Ln(t, o.c.length), u(o.c[t], 113)), c.c && si(c.d, e.b); + } + function gme(n, e, t) { + var i, r, c; + return i = n.c[e.c.p][e.p], r = n.c[t.c.p][t.p], i.a != null && r.a != null ? (c = TD(i.a, r.a), c < 0 ? H7(n, e, t) : c > 0 && H7(n, t, e), c) : i.a != null ? (H7(n, e, t), -1) : r.a != null ? (H7(n, t, e), 1) : 0; + } + function BLn(n, e) { + var t, i, r, c; + n.ej() ? (t = n.Vi(), c = n.fj(), ++n.j, n.Hi(t, n.oi(t, e)), i = n.Zi(3, null, e, t, c), n.bj() ? (r = n.cj(e, null), r ? (r.Ei(i), r.Fi()) : n.$i(i)) : n.$i(i)) : (nTn(n, e), n.bj() && (r = n.cj(e, null), r && r.Fi())); + } + function iM(n, e) { + var t, i, r, c, o; + for (o = _c(n.e.Tg(), e), r = new Jy(), t = u(n.g, 119), c = n.i; --c >= 0; ) + i = t[c], o.rl(i.ak()) && me(r, i); + !A_n(n, r) && qu(n.e) && qp(n, e.$j() ? hl(n, 6, e, (Pn(), cr), null, -1, !1) : hl(n, e.Kj() ? 2 : 1, e, null, null, -1, !1)); + } + function l4() { + l4 = N; + var n, e; + for (fp = F(vg, q, 91, 32, 0, 1), wm = F(vg, q, 91, 32, 0, 1), n = 1, e = 0; e <= 18; e++) + fp[e] = m7(n), wm[e] = m7(Ih(n, e)), n = Ni(n, 5); + for (; e < wm.length; e++) + fp[e] = Fw(fp[e - 1], fp[1]), wm[e] = Fw(wm[e - 1], (jl(), pR)); + } + function pme(n, e) { + var t, i, r, c, o; + return n.a == (f4(), Cm) ? !0 : (c = e.a.c, t = e.a.c + e.a.b, !(e.j && (i = e.A, o = i.c.c.a - i.o.a / 2, r = c - (i.n.a + i.o.a), r > o) || e.q && (i = e.C, o = i.c.c.a - i.o.a / 2, r = i.n.a - t, r > o))); + } + function vme(n, e) { + var t; + le(e, "Partition preprocessing", 1), t = u(ts(pt(qr(pt(new $n(null, new xn(n.a, 16)), new v0n()), new m0n()), new k0n()), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), _t(t.Oc(), new y0n()), ce(e); + } + function RLn(n) { + c$(); + var e, t, i, r, c, o, f; + for (t = new wa(), r = new E(n.e.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), o = new E(i.a); o.a < o.c.c.length; ) + c = u(y(o), 10), f = n.g[c.p], e = u(Ld(t, f), 15), e || (e = new X(), Sa(t, f, e)), e.Fc(c); + return t; + } + function mme(n, e) { + var t, i, r, c, o; + for (r = e.b.b, n.a = F(Ds, Db, 15, r, 0, 1), n.b = F(_u, wh, 25, r, 16, 1), o = _e(e.b, 0); o.b != o.d.c; ) + c = u(Re(o), 86), n.a[c.g] = new Tt(); + for (i = _e(e.a, 0); i.b != i.d.c; ) + t = u(Re(i), 188), n.a[t.b.g].Fc(t), n.a[t.c.g].Fc(t); + } + function _Ln(n) { + var e; + return n.Db & 64 ? yo(n) : (e = new Bs(yo(n)), e.a += " (startX: ", mw(e, n.j), e.a += ", startY: ", mw(e, n.k), e.a += ", endX: ", mw(e, n.b), e.a += ", endY: ", mw(e, n.c), e.a += ", identifier: ", br(e, n.d), e.a += ")", e.a); + } + function jY(n) { + var e; + return n.Db & 64 ? r6(n) : (e = new Bs(r6(n)), e.a += " (ordered: ", c1(e, (n.Bb & 256) != 0), e.a += ", unique: ", c1(e, (n.Bb & 512) != 0), e.a += ", lowerBound: ", eO(e, n.s), e.a += ", upperBound: ", eO(e, n.t), e.a += ")", e.a); + } + function KLn(n, e, t, i, r, c, o, f) { + var h; + return I(n.Cb, 88) && jb(Iu(u(n.Cb, 88)), 4), Oc(n, t), n.f = i, Y3(n, r), n4(n, c), J3(n, o), Z3(n, !1), v1(n, !0), e4(n, f), p1(n, !0), b1(n, 0), n.b = 0, lb(n, 1), h = af(n, e, null), h && h.Fi(), SF(n, !1), n; + } + function HLn(n, e) { + var t, i, r, c; + return t = u(mc(n.a, e), 512), t || (i = new y$(e), r = (CC(), pf ? null : i.c), c = Zu(r, 0, j.Math.max(0, aE(r, tu(46)))), Gue(i, HLn(n, c)), (pf ? null : i.c).length == 0 && Tjn(i, new $H()), yr(n.a, pf ? null : i.c, i), i); + } + function kme(n, e) { + var t; + n.b = e, n.g = new X(), t = Tme(n.b), n.e = t, n.f = t, n.c = on(sn(k(n.b, (WT(), nrn)))), n.a = Y(k(n.b, (Xe(), Tp))), n.a == null && (n.a = 1), K(n.a) > 1 ? n.e *= K(n.a) : n.f /= K(n.a), Zwe(n), rpe(n), _7e(n), H(n.b, (a6(), nS), n.g); + } + function qLn(n, e, t) { + var i, r, c, o, f, h; + for (i = 0, h = t, e || (i = t * (n.c.length - 1), h *= -1), c = new E(n); c.a < c.c.c.length; ) { + for (r = u(y(c), 10), H(r, (nn(), Qf), (oh(), FP)), r.o.a = i, f = y1(r, (J(), Vn)).Kc(); f.Ob(); ) + o = u(f.Pb(), 11), o.n.a = i; + i += h; + } + } + function EY(n, e, t) { + var i, r, c; + n.ej() ? (c = n.fj(), a7(n, e, t), i = n.Zi(3, null, t, e, c), n.bj() ? (r = n.cj(t, null), n.ij() && (r = n.jj(t, r)), r ? (r.Ei(i), r.Fi()) : n.$i(i)) : n.$i(i)) : (a7(n, e, t), n.bj() && (r = n.cj(t, null), r && r.Fi())); + } + function U2(n, e, t) { + var i, r, c, o, f, h; + return f = n.Gk(t), f != t ? (o = n.g[e], h = f, k5(n, e, n.oi(e, h)), c = o, n.gi(e, h, c), n.rk() && (i = t, r = n.dj(i, null), !u(f, 49).eh() && (r = n.cj(h, r)), r && r.Fi()), qu(n.e) && qp(n, n.Zi(9, t, f, e, !1)), f) : t; + } + function yme(n, e) { + var t, i, r, c; + for (i = new E(n.a.a); i.a < i.c.c.length; ) + t = u(y(i), 189), t.g = !0; + for (c = new E(n.a.b); c.a < c.c.c.length; ) + r = u(y(c), 81), r.k = on(sn(n.e.Kb(new Pi(r, e)))), r.d.g = r.d.g & on(sn(n.e.Kb(new Pi(r, e)))); + return n; + } + function GLn(n) { + var e, t, i, r, c; + if (t = (e = u(xo(Yi), 9), new ks(e, u(bo(e, e.length), 9), 0)), c = u(k(n, (G(), Mu)), 10), c) + for (r = new E(c.j); r.a < r.c.c.length; ) + i = u(y(r), 11), B(k(i, rt)) === B(n) && E5(new uf(i.b)) && ko(t, i.j); + return t; + } + function zLn(n, e, t) { + var i, r, c, o, f; + if (!n.d[t.p]) { + for (r = new re(ue(ei(t).a.Kc(), new Mn())); Se(r); ) { + for (i = u(ve(r), 17), f = i.d.i, o = new re(ue(Lr(f).a.Kc(), new Mn())); Se(o); ) + c = u(ve(o), 17), c.c.i == e && (n.a[c.p] = !0); + zLn(n, e, f); + } + n.d[t.p] = !0; + } + } + function jme(n, e) { + var t, i, r, c, o, f, h; + if (i = JDn(n.Db & 254), i == 1) + n.Eb = null; + else if (c = va(n.Eb), i == 2) + r = ux(n, e), n.Eb = c[r == 0 ? 1 : 0]; + else { + for (o = F(Zn, rn, 1, i - 1, 5, 1), t = 2, f = 0, h = 0; t <= 128; t <<= 1) + t == e ? ++f : n.Db & t && (o[h++] = c[f++]); + n.Eb = o; + } + n.Db &= ~e; + } + function Eme(n, e) { + var t, i, r, c, o; + for (i = (!e.s && (e.s = new V(su, e, 21, 17)), e.s), c = null, r = 0, o = i.i; r < o; ++r) + switch (t = u(D(i, r), 170), Pd(Er(n, t))) { + case 4: + case 5: + case 6: { + !c && (c = new X()), c.c[c.c.length] = t; + break; + } + } + return c || (Pn(), Pn(), cr); + } + function CY(n) { + var e; + switch (e = 0, n) { + case 105: + e = 2; + break; + case 109: + e = 8; + break; + case 115: + e = 4; + break; + case 120: + e = 16; + break; + case 117: + e = 32; + break; + case 119: + e = 64; + break; + case 70: + e = 256; + break; + case 72: + e = 128; + break; + case 88: + e = 512; + break; + case 44: + e = Eo; + } + return e; + } + function Cme(n, e, t, i, r) { + var c, o, f, h; + if (B(n) === B(e) && i == r) { + KBn(n, i, t); + return; + } + for (f = 0; f < i; f++) { + for (o = 0, c = n[f], h = 0; h < r; h++) + o = Hi(Hi(Ni(ui(c, hr), ui(e[h], hr)), ui(t[f + h], hr)), ui(ge(o), hr)), t[f + h] = ge(o), o = Y0(o, 32); + t[f + r] = ge(o); + } + } + function Tme(n) { + var e, t, i, r, c, o, f, h, l, a, d; + for (a = 0, l = 0, r = n.a, f = r.a.gc(), i = r.a.ec().Kc(); i.Ob(); ) + t = u(i.Pb(), 561), e = (t.b && uL(t), t.a), d = e.a, o = e.b, a += d + o, l += d * o; + return h = j.Math.sqrt(400 * f * l - 4 * l + a * a) + a, c = 2 * (100 * f - 1), c == 0 ? h : h / c; + } + function ULn(n, e) { + e.b != 0 && (isNaN(n.s) ? n.s = K((ne(e.b != 0), Y(e.a.a.c))) : n.s = j.Math.min(n.s, K((ne(e.b != 0), Y(e.a.a.c)))), isNaN(n.c) ? n.c = K((ne(e.b != 0), Y(e.c.b.c))) : n.c = j.Math.max(n.c, K((ne(e.b != 0), Y(e.c.b.c))))); + } + function j6(n) { + var e, t, i, r; + for (e = null, i = ul(of(A(M(gf, 1), rn, 20, 0, [(!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c)]))); Se(i); ) + if (t = u(ve(i), 82), r = Ir(t), !e) + e = Pt(r); + else if (e != Pt(r)) + return !0; + return !1; + } + function $x(n, e) { + var t, i, r, c; + n.ej() ? (t = n.i, c = n.fj(), F8(n, e), i = n.Zi(3, null, e, t, c), n.bj() ? (r = n.cj(e, null), n.ij() && (r = n.jj(e, r)), r ? (r.Ei(i), r.Fi()) : n.$i(i)) : n.$i(i)) : (F8(n, e), n.bj() && (r = n.cj(e, null), r && r.Fi())); + } + function WLn(n, e, t) { + var i, r, c; + n.ej() ? (c = n.fj(), ++n.j, n.Hi(e, n.oi(e, t)), i = n.Zi(3, null, t, e, c), n.bj() ? (r = n.cj(t, null), r ? (r.Ei(i), r.Fi()) : n.$i(i)) : n.$i(i)) : (++n.j, n.Hi(e, n.oi(e, t)), n.bj() && (r = n.cj(t, null), r && r.Fi())); + } + function Mme(n) { + var e, t, i, r; + for (r = n.length, e = null, i = 0; i < r; i++) + t = (Te(i, n.length), n.charCodeAt(i)), Pf(".*+?{[()|\\^$", tu(t)) >= 0 ? (e || (e = new zv(), i > 0 && br(e, n.substr(0, i))), e.a += "\\", b3(e, t & Ut)) : e && b3(e, t & Ut); + return e ? e.a : n; + } + function Ame(n) { + var e; + if (!n.a) + throw T(new $r("IDataType class expected for layout option " + n.f)); + if (e = xae(n.a), e == null) + throw T(new $r("Couldn't create new instance of property '" + n.f + "'. " + KHn + (Ph(Fy), Fy.k) + Etn)); + return u(e, 414); + } + function Fx(n) { + var e, t, i, r, c; + return c = n.eh(), c && c.kh() && (r = pl(n, c), r != c) ? (t = n.Vg(), i = (e = n.Vg(), e >= 0 ? n.Qg(null) : n.eh().ih(n, -1 - e, null, null)), n.Rg(u(r, 49), t), i && i.Fi(), n.Lg() && n.Mg() && t > -1 && et(n, new gi(n, 9, t, c, r)), r) : c; + } + function XLn(n) { + var e, t, i, r, c, o, f, h; + for (o = 0, c = n.f.e, i = 0; i < c.c.length; ++i) + for (f = (Ln(i, c.c.length), u(c.c[i], 144)), r = i + 1; r < c.c.length; ++r) + h = (Ln(r, c.c.length), u(c.c[r], 144)), t = al(f.d, h.d), e = t - n.a[f.b][h.b], o += n.i[f.b][h.b] * e * e; + return o; + } + function Sme(n, e) { + var t; + if (!ai(e, (nn(), Hc)) && (t = Z3e(u(k(e, $cn), 360), u(k(n, Hc), 163)), H(e, $cn, t), !Se(new re(ue(Kh(e).a.Kc(), new Mn()))))) + switch (t.g) { + case 1: + H(e, Hc, (Ss(), Sm)); + break; + case 2: + H(e, Hc, (Ss(), Pm)); + } + } + function Pme(n, e) { + var t; + R7e(n), n.a = (t = new JI(), _t(new $n(null, new xn(e.d, 16)), new X5n(t)), t), V8e(n, u(k(e.b, (nn(), N_)), 376)), Hpe(n), Fme(n), e4e(n), qpe(n), Bje(n, e), _t(qr(new $n(null, cAn(dhe(n.b).a)), new Ubn()), new Wbn()), e.a = !1, n.a = null; + } + function VLn() { + UJ.call(this, R4, (dd(), Mne)), this.p = null, this.a = null, this.f = null, this.n = null, this.g = null, this.c = null, this.i = null, this.j = null, this.d = null, this.b = null, this.e = null, this.k = null, this.o = null, this.s = null, this.q = !1, this.r = !1; + } + function a4() { + a4 = N, aH = new a2(lHn, 0), YP = new a2("INSIDE_SELF_LOOPS", 1), ZP = new a2("MULTI_EDGES", 2), JP = new a2("EDGE_LABELS", 3), lH = new a2("PORTS", 4), QP = new a2("COMPOUND", 5), VP = new a2("CLUSTERS", 6), hH = new a2("DISCONNECTED", 7); + } + function QLn(n, e) { + var t, i, r; + if (e == 0) + return (n.a[0] & 1) != 0; + if (e < 0) + throw T(new bj("Negative bit address")); + if (r = e >> 5, r >= n.d) + return n.e < 0; + if (t = n.a[r], e = 1 << (e & 31), n.e < 0) { + if (i = dOn(n), r < i) + return !1; + i == r ? t = -t : t = ~t; + } + return (t & e) != 0; + } + function Ime(n, e, t, i) { + var r; + u(t.b, 65), u(t.b, 65), u(i.b, 65), u(i.b, 65), r = ji(Qr(u(t.b, 65).c), u(i.b, 65).c), AE(r, lLn(u(t.b, 65), u(i.b, 65), r)), u(i.b, 65), u(i.b, 65), u(i.b, 65).c.a + r.a, u(i.b, 65).c.b + r.b, u(i.b, 65), Yc(i.a, new BU(n, e, i)); + } + function TY(n, e) { + var t, i, r, c, o, f, h; + if (c = e.e, c) { + for (t = Fx(c), i = u(n.g, 674), o = 0; o < n.i; ++o) + if (h = i[o], nx(h) == t && (r = (!h.d && (h.d = new Yt(dr, h, 1)), h.d), f = u(t.ah(Qx(c, c.Cb, c.Db >> 16)), 15).Xc(c), f < r.i)) + return TY(n, u(D(r, f), 87)); + } + return e; + } + function b(n, e, t) { + var i = RA, r, c = i[n], o = c instanceof Array ? c[0] : null; + c && !o ? s = c : (s = (r = e && e.prototype, !r && (r = RA[e]), nle(r)), s.hm = t, !e && (s.im = Xg), i[n] = s); + for (var f = 3; f < arguments.length; ++f) + arguments[f].prototype = s; + o && (s.gm = o); + } + function Se(n) { + for (var e; !u(pe(n.a), 47).Ob(); ) { + if (n.d = $we(n), !n.d) + return !1; + if (n.a = u(n.d.Pb(), 47), I(n.a, 39)) { + if (e = u(n.a, 39), n.a = e.a, !n.b && (n.b = new gw()), ll(n.b, n.d), e.b) + for (; !Hv(e.b); ) + ll(n.b, u(Jfe(e.b), 47)); + n.d = e.d; + } + } + return !0; + } + function MY(n, e) { + var t, i, r, c, o; + for (c = e == null ? 0 : n.b.se(e), i = (t = n.a.get(c), t ?? new Array()), o = 0; o < i.length; o++) + if (r = i[o], n.b.re(e, r.cd())) + return i.length == 1 ? (i.length = 0, yue(n.a, c)) : i.splice(o, 1), --n.c, cC(n.b), r.dd(); + return null; + } + function AY(n, e) { + var t, i, r, c; + for (r = 1, e.j = !0, c = null, i = new E(Hw(e)); i.a < i.c.c.length; ) + t = u(y(i), 213), n.c[t.c] || (n.c[t.c] = !0, c = TT(t, e), t.f ? r += AY(n, c) : !c.j && t.a == t.e.e - t.d.e && (t.f = !0, ci(n.p, t), r += AY(n, c))); + return r; + } + function Ome(n) { + var e, t, i; + for (t = new E(n.a.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), i = (_n(0), 0), i > 0 && (!(tl(n.a.c) && e.n.d) && !(i3(n.a.c) && e.n.b) && (e.g.d += j.Math.max(0, i / 2 - 0.5)), !(tl(n.a.c) && e.n.a) && !(i3(n.a.c) && e.n.c) && (e.g.a -= i - 1)); + } + function JLn(n) { + var e, t, i, r, c; + if (r = new X(), c = GBn(n, r), e = u(k(n, (G(), Mu)), 10), e) + for (i = new E(e.j); i.a < i.c.c.length; ) + t = u(y(i), 11), B(k(t, rt)) === B(n) && (c = j.Math.max(c, GBn(t, r))); + return r.c.length == 0 || H(n, Sg, c), c != -1 ? r : null; + } + function YLn(n, e, t) { + var i, r, c, o, f, h; + c = u(un(e.e, 0), 17).c, i = c.i, r = i.k, h = u(un(t.g, 0), 17).d, o = h.i, f = o.k, r == (Qn(), pi) ? H(n, (G(), Xo), u(k(i, Xo), 11)) : H(n, (G(), Xo), c), f == pi ? H(n, (G(), Ys), u(k(o, Ys), 11)) : H(n, (G(), Ys), h); + } + function ZLn(n, e) { + var t, i, r, c; + for (c = ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))), t = c & n.b.length - 1, r = null, i = n.b[t]; i; r = i, i = i.a) + if (i.d == c && $f(i.i, e)) + return r ? r.a = i.a : n.b[t] = i.a, U9n(i.c, i.f), $9(i.b, i.e), --n.f, ++n.e, !0; + return !1; + } + function SY(n, e) { + var t, i, r, c, o; + return e &= 63, t = n.h, i = (t & tk) != 0, i && (t |= -1048576), e < 22 ? (o = t >> e, c = n.m >> e | t << 22 - e, r = n.l >> e | n.m << 22 - e) : e < 44 ? (o = i ? Wh : 0, c = t >> e - 22, r = n.m >> e - 22 | t << 44 - e) : (o = i ? Wh : 0, c = i ? Lu : 0, r = t >> e - 44), Nc(r & Lu, c & Lu, o & Wh); + } + function xx(n) { + var e, t, i, r, c, o; + for (this.c = new X(), this.d = n, i = Lt, r = Lt, e = Vt, t = Vt, o = _e(n, 0); o.b != o.d.c; ) + c = u(Re(o), 8), i = j.Math.min(i, c.a), r = j.Math.min(r, c.b), e = j.Math.max(e, c.a), t = j.Math.max(t, c.b); + this.a = new ys(i, r, e - i, t - r); + } + function nNn(n, e) { + var t, i, r, c, o, f; + for (c = new E(n.b); c.a < c.c.c.length; ) + for (r = u(y(c), 29), f = new E(r.a); f.a < f.c.c.length; ) + for (o = u(y(f), 10), o.k == (Qn(), Ju) && W2(o, e), i = new re(ue(ei(o).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), NOn(t, e); + } + function PY(n) { + var e, t, i; + this.c = n, i = u(k(n, (nn(), as)), 103), e = K(Y(k(n, zS))), t = K(Y(k(n, Dsn))), i == (or(), Zs) || i == Ao || i == mh ? this.b = e * t : this.b = 1 / (e * t), this.j = K(Y(k(n, $g))), this.e = K(Y(k(n, M0))), this.f = n.b.c.length; + } + function Dme(n) { + var e, t; + for (n.e = F(be, Le, 25, n.p.c.length, 15, 1), n.k = F(be, Le, 25, n.p.c.length, 15, 1), t = new E(n.p); t.a < t.c.c.length; ) + e = u(y(t), 10), n.e[e.p] = Fh(new re(ue(Lr(e).a.Kc(), new Mn()))), n.k[e.p] = Fh(new re(ue(ei(e).a.Kc(), new Mn()))); + } + function $me(n) { + var e, t, i, r, c, o; + for (r = 0, n.q = new X(), e = new hi(), o = new E(n.p); o.a < o.c.c.length; ) { + for (c = u(y(o), 10), c.p = r, i = new re(ue(ei(c).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), ci(e, t.d.i); + e.a.Bc(c) != null, W(n.q, new S5(e)), e.a.$b(), ++r; + } + } + function n0() { + n0 = N, jon = new md(20), cYn = new tr((Xe(), ed), jon), Con = new tr(td, 20), nYn = new tr(Tp, D4), jP = new tr(_P, Q(1)), sYn = new tr(iH, (qn(), !0)), kon = py, tYn = nd, iYn = Kg, rYn = _l, eYn = _g, yon = ky, uYn = cw, oYn = (PV(), ZJn), Eon = YJn; + } + function eNn(n, e) { + var t, i, r, c, o, f, h, l, a; + if (n.a.f > 0 && I(e, 42) && (n.a.qj(), l = u(e, 42), h = l.cd(), c = h == null ? 0 : kt(h), o = dU(n.a, c), t = n.a.d[o], t)) { + for (i = u(t.g, 367), a = t.i, f = 0; f < a; ++f) + if (r = i[f], r.Sh() == c && r.Fb(l)) + return eNn(n, l), !0; + } + return !1; + } + function Fme(n) { + var e, t, i, r; + for (r = u(ct(n.a, (Vw(), PS)), 15).Kc(); r.Ob(); ) + i = u(r.Pb(), 101), t = (e = k2(i.k), e.Hc((J(), Kn)) ? e.Hc(Vn) ? e.Hc(ae) ? e.Hc(Gn) ? null : eXn : iXn : tXn : nXn), d3(n, i, t[0], (Hd(), g0), 0), d3(n, i, t[1], Fl, 1), d3(n, i, t[2], p0, 1); + } + function xme(n, e) { + var t, i; + t = fke(e), s7e(n, e, t), uxn(n.a, u(k(qi(e.b), (G(), vp)), 230)), Fke(n), ove(n, e), i = F(be, Le, 25, e.b.j.c.length, 15, 1), pL(n, e, (J(), Kn), i, t), pL(n, e, Vn, i, t), pL(n, e, ae, i, t), pL(n, e, Gn, i, t), n.a = null, n.c = null, n.b = null; + } + function IY() { + IY = N, Zon = (ET(), IK), HYn = new In(htn, Zon), _Yn = new In(ltn, (qn(), !0)), Q(-1), NYn = new In(atn, Q(-1)), Q(-1), BYn = new In(dtn, Q(-1)), KYn = new In(btn, !1), qYn = new In(wtn, !0), RYn = new In(wB, !1), GYn = new In(gtn, -1); + } + function OY(n, e, t) { + switch (e) { + case 7: + !n.e && (n.e = new Fn(bi, n, 7, 4)), de(n.e), !n.e && (n.e = new Fn(bi, n, 7, 4)), Ft(n.e, u(t, 14)); + return; + case 8: + !n.d && (n.d = new Fn(bi, n, 8, 5)), de(n.d), !n.d && (n.d = new Fn(bi, n, 8, 5)), Ft(n.d, u(t, 14)); + return; + } + SJ(n, e, t); + } + function DY(n, e) { + var t, i, r, c, o; + if (B(e) === B(n)) + return !0; + if (!I(e, 15) || (o = u(e, 15), n.gc() != o.gc())) + return !1; + for (c = o.Kc(), i = n.Kc(); i.Ob(); ) + if (t = i.Pb(), r = c.Pb(), !(B(t) === B(r) || t != null && tt(t, r))) + return !1; + return !0; + } + function Lme(n, e) { + var t, i, r, c; + for (c = u(ts(qr(qr(new $n(null, new xn(e.b, 16)), new Ndn()), new Bdn()), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), c.Jc(new Rdn()), t = 0, r = c.Kc(); r.Ob(); ) + i = u(r.Pb(), 11), i.p == -1 && FY(n, i, t++); + } + function tNn(n) { + switch (n.g) { + case 0: + return new z4n(); + case 1: + return new P4n(); + case 2: + return new S4n(); + case 3: + return new Mkn(); + case 4: + return new dCn(); + default: + throw T(new Hn("No implementation is available for the node placer " + (n.f != null ? n.f : "" + n.g))); + } + } + function iNn(n) { + switch (n.g) { + case 0: + return new lW(); + case 1: + return new O4n(); + case 2: + return new y4n(); + case 3: + return new j4n(); + case 4: + return new Skn(); + default: + throw T(new Hn("No implementation is available for the cycle breaker " + (n.f != null ? n.f : "" + n.g))); + } + } + function $Y() { + $Y = N, EYn = new In(rtn, Q(0)), CYn = new In(ctn, 0), xon = (f7(), CP), yYn = new In(aB, xon), Q(0), kYn = new In(dB, Q(1)), Non = (sT(), PK), TYn = new In(utn, Non), Bon = ($C(), TK), MYn = new In(stn, Bon), Lon = (qT(), SK), jYn = new In(otn, Lon); + } + function Nme(n, e, t) { + var i; + i = null, e && (i = e.d), v6(n, new e3(e.n.a - i.b + t.a, e.n.b - i.d + t.b)), v6(n, new e3(e.n.a - i.b + t.a, e.n.b + e.o.b + i.a + t.b)), v6(n, new e3(e.n.a + e.o.a + i.c + t.a, e.n.b - i.d + t.b)), v6(n, new e3(e.n.a + e.o.a + i.c + t.a, e.n.b + e.o.b + i.a + t.b)); + } + function FY(n, e, t) { + var i, r, c; + for (e.p = t, c = ul(of(A(M(gf, 1), rn, 20, 0, [new Hp(e), new n2(e)]))); Se(c); ) + i = u(ve(c), 11), i.p == -1 && FY(n, i, t); + if (e.i.k == (Qn(), pi)) + for (r = new E(e.i.j); r.a < r.c.c.length; ) + i = u(y(r), 11), i != e && i.p == -1 && FY(n, i, t); + } + function rNn(n) { + var e, t, i, r, c; + if (r = u(ts(fle($Mn(n)), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), i = O4, r.gc() >= 2) + for (t = r.Kc(), e = Y(t.Pb()); t.Ob(); ) + c = e, e = Y(t.Pb()), i = j.Math.min(i, (_n(e), e - (_n(c), c))); + return i; + } + function Bme(n, e) { + var t, i, r, c, o; + i = new Tt(), Ht(i, e, i.c.b, i.c); + do + for (t = (ne(i.b != 0), u(Ts(i, i.a.a), 86)), n.b[t.g] = 1, c = _e(t.d, 0); c.b != c.d.c; ) + r = u(Re(c), 188), o = r.c, n.b[o.g] == 1 ? Ke(n.a, r) : n.b[o.g] == 2 ? n.b[o.g] = 1 : Ht(i, o, i.c.b, i.c); + while (i.b != 0); + } + function Rme(n, e) { + var t, i, r; + if (B(e) === B(pe(n))) + return !0; + if (!I(e, 15) || (i = u(e, 15), r = n.gc(), r != i.gc())) + return !1; + if (I(i, 54)) { + for (t = 0; t < r; t++) + if (!$f(n.Xb(t), i.Xb(t))) + return !1; + return !0; + } else + return Wpe(n.Kc(), i.Kc()); + } + function cNn(n, e) { + var t, i; + if (n.c.length != 0) { + if (n.c.length == 2) + W2((Ln(0, n.c.length), u(n.c[0], 10)), (us(), kh)), W2((Ln(1, n.c.length), u(n.c[1], 10)), Kl); + else + for (i = new E(n); i.a < i.c.c.length; ) + t = u(y(i), 10), W2(t, e); + n.c = F(Zn, rn, 1, 0, 5, 1); + } + } + function _me(n) { + var e, t; + if (n.c.length != 2) + throw T(new $r("Order only allowed for two paths.")); + e = (Ln(0, n.c.length), u(n.c[0], 17)), t = (Ln(1, n.c.length), u(n.c[1], 17)), e.d.i != t.c.i && (n.c = F(Zn, rn, 1, 0, 5, 1), n.c[n.c.length] = t, n.c[n.c.length] = e); + } + function Kme(n, e) { + var t, i, r, c, o, f; + for (i = new wa(), o = jC(new Hu(n.g)), c = o.a.ec().Kc(); c.Ob(); ) { + if (r = u(c.Pb(), 10), !r) { + oa(e, "There are no classes in a balanced layout."); + break; + } + f = n.j[r.p], t = u(Ld(i, f), 15), t || (t = new X(), Sa(i, f, t)), t.Fc(r); + } + return i; + } + function Hme(n, e, t) { + var i, r, c, o, f, h, l; + if (t) + for (c = t.a.length, i = new ha(c), f = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); f.Ob(); ) + o = u(f.Pb(), 19), h = y3(t, o.a), h && (l = Q0e($h(h, $B), e), it(n.f, l, h), r = Uf in h.a, r && Q5(l, $h(h, Uf)), YT(h, l), lY(h, l)); + } + function qme(n, e) { + var t, i, r, c, o; + for (le(e, "Port side processing", 1), o = new E(n.a); o.a < o.c.c.length; ) + r = u(y(o), 10), bRn(r); + for (i = new E(n.b); i.a < i.c.c.length; ) + for (t = u(y(i), 29), c = new E(t.a); c.a < c.c.c.length; ) + r = u(y(c), 10), bRn(r); + ce(e); + } + function uNn(n, e, t) { + var i, r, c, o, f; + if (r = n.f, !r && (r = u(n.a.a.ec().Kc().Pb(), 57)), g6(r, e, t), n.a.a.gc() != 1) + for (i = e * t, o = n.a.a.ec().Kc(); o.Ob(); ) + c = u(o.Pb(), 57), c != r && (f = S2(c), f.f.d ? (c.d.d += i + bf, c.d.a -= i + bf) : f.f.a && (c.d.a -= i + bf)); + } + function Lx(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p; + return o = t - n, f = i - e, c = j.Math.atan2(o, f), h = c + kN, l = c - kN, a = r * j.Math.sin(h) + n, g = r * j.Math.cos(h) + e, d = r * j.Math.sin(l) + n, p = r * j.Math.cos(l) + e, cf(A(M(di, 1), q, 8, 0, [new fn(a, g), new fn(d, p)])); + } + function Gme(n, e, t, i) { + var r, c, o, f, h, l, a, d; + r = t, a = e, c = a; + do + c = n.a[c.p], f = (d = n.g[c.p], K(n.p[d.p]) + K(n.d[c.p]) - c.d.d), h = rbe(c, i), h && (o = (l = n.g[h.p], K(n.p[l.p]) + K(n.d[h.p]) + h.o.b + h.d.a), r = j.Math.min(r, f - (o + Mw(n.k, c, h)))); + while (a != c); + return r; + } + function zme(n, e, t, i) { + var r, c, o, f, h, l, a, d; + r = t, a = e, c = a; + do + c = n.a[c.p], o = (d = n.g[c.p], K(n.p[d.p]) + K(n.d[c.p]) + c.o.b + c.d.a), h = wwe(c, i), h && (f = (l = n.g[h.p], K(n.p[l.p]) + K(n.d[h.p]) - h.d.d), r = j.Math.min(r, f - (o + Mw(n.k, c, h)))); + while (a != c); + return r; + } + function hn(n, e) { + var t, i; + return i = (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), Ko(n.o, e)), i ?? (t = e.wg(), I(t, 4) && (t == null ? (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), IT(n.o, e)) : (!n.o && (n.o = new Xu(($c(), Ul), P0, n, 0)), XT(n.o, e, t))), t); + } + function Eb() { + Eb = N, So = new yw("H_LEFT", 0), Zh = new yw("H_CENTER", 1), Po = new yw("H_RIGHT", 2), Oo = new yw("V_TOP", 3), yh = new yw("V_CENTER", 4), eo = new yw("V_BOTTOM", 5), ds = new yw("INSIDE", 6), Io = new yw("OUTSIDE", 7), no = new yw("H_PRIORITY", 8); + } + function Ume(n) { + var e, t, i, r, c, o, f; + if (e = n.Hh(Vs), e && (f = Ce(Ko((!e.b && (e.b = new Gu((Sn(), Zi), tc, e)), e.b), "settingDelegates")), f != null)) { + for (t = new X(), r = Mb(f, "\\w+"), c = 0, o = r.length; c < o; ++c) + i = r[c], t.c[t.c.length] = i; + return t; + } + return Pn(), Pn(), cr; + } + function Wme(n, e) { + var t, i, r, c, o, f, h; + if (!e.f) + throw T(new Hn("The input edge is not a tree edge.")); + for (c = null, r = nt, i = new E(n.d); i.a < i.c.c.length; ) + t = u(y(i), 213), f = t.d, h = t.e, Ix(n, f, e) && !Ix(n, h, e) && (o = h.e - f.e - t.a, o < r && (r = o, c = t)); + return c; + } + function Xme(n) { + var e, t, i, r, c, o; + if (!(n.f.e.c.length <= 1)) { + e = 0, r = XLn(n), t = Lt; + do { + for (e > 0 && (r = t), o = new E(n.f.e); o.a < o.c.c.length; ) + c = u(y(o), 144), !on(sn(k(c, (C7(), Nrn)))) && (i = iye(n, c), st(Lo(c.d), i)); + t = XLn(n); + } while (!vhe(n, e++, r, t)); + } + } + function Vme(n, e) { + var t, i, r; + for (le(e, "Layer constraint preprocessing", 1), t = new X(), r = new Ii(n.a, 0); r.b < r.d.gc(); ) + i = (ne(r.b < r.d.gc()), u(r.d.Xb(r.c = r.b++), 10)), vwe(i) && (mve(i), t.c[t.c.length] = i, Wu(r)); + t.c.length == 0 || H(n, (G(), C_), t), ce(e); + } + function Qme(n, e) { + var t, i, r, c, o; + for (c = n.g.a, o = n.g.b, i = new E(n.d); i.a < i.c.c.length; ) + t = u(y(i), 70), r = t.n, n.a == (ff(), Z4) || n.i == (J(), Vn) ? r.a = c : n.a == nv || n.i == (J(), Gn) ? r.a = c + n.j.a - t.o.a : r.a = c + (n.j.a - t.o.a) / 2, r.b = o, st(r, e), o += t.o.b + n.e; + } + function Jme(n, e, t) { + var i, r, c, o; + for (le(t, "Processor set coordinates", 1), n.a = e.b.b == 0 ? 1 : e.b.b, c = null, i = _e(e.b, 0); !c && i.b != i.d.c; ) + o = u(Re(i), 86), on(sn(k(o, (cc(), rw)))) && (c = o, r = o.e, r.a = u(k(o, mK), 19).a, r.b = 0); + Oxn(n, $V(c), yc(t, 1)), ce(t); + } + function Yme(n, e, t) { + var i, r, c; + for (le(t, "Processor determine the height for each level", 1), n.a = e.b.b == 0 ? 1 : e.b.b, r = null, i = _e(e.b, 0); !r && i.b != i.d.c; ) + c = u(Re(i), 86), on(sn(k(c, (cc(), rw)))) && (r = c); + r && XNn(n, cf(A(M(cMe, 1), ynn, 86, 0, [r])), t), ce(t); + } + function Zme(n, e) { + var t, i, r, c, o, f, h, l, a, d; + l = n, h = q5(l, "individualSpacings"), h && (i = ga(e, (Xe(), Ap)), o = !i, o && (r = new jI(), pr(e, Ap, r)), f = u(hn(e, Ap), 373), d = h, c = null, d && (c = (a = Z$(d, F(tn, q, 2, 0, 6, 1)), new iO(d, a))), c && (t = new ykn(d, f), $i(c, t))); + } + function n9e(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + return h = null, d = n, a = null, (Sqn in d.a || Pqn in d.a || pA in d.a) && (l = null, g = xV(e), o = q5(d, Sqn), t = new imn(g), M2e(t.a, o), f = q5(d, Pqn), i = new dmn(g), T2e(i.a, f), c = xd(d, pA), r = new gmn(g), l = (ive(r.a, c), c), a = l), h = a, h; + } + function e9e(n, e) { + var t, i, r; + if (e === n) + return !0; + if (I(e, 543)) { + if (r = u(e, 835), n.a.d != r.a.d || Iw(n).gc() != Iw(r).gc()) + return !1; + for (i = Iw(r).Kc(); i.Ob(); ) + if (t = u(i.Pb(), 416), DMn(n, t.a.cd()) != u(t.a.dd(), 14).gc()) + return !1; + return !0; + } + return !1; + } + function t9e(n) { + var e, t, i, r; + return i = u(n.a, 19).a, r = u(n.b, 19).a, e = i, t = r, i == 0 && r == 0 ? t -= 1 : i == -1 && r <= 0 ? (e = 0, t -= 2) : i <= 0 && r > 0 ? (e -= 1, t -= 1) : i >= 0 && r < 0 ? (e += 1, t += 1) : i > 0 && r >= 0 ? (e -= 1, t += 1) : (e += 1, t -= 1), new Pi(Q(e), Q(t)); + } + function i9e(n, e) { + return n.c < e.c ? -1 : n.c > e.c ? 1 : n.b < e.b ? -1 : n.b > e.b ? 1 : n.a != e.a ? kt(n.a) - kt(e.a) : n.d == (z5(), Hm) && e.d == Km ? -1 : n.d == Km && e.d == Hm ? 1 : 0; + } + function sNn(n, e) { + var t, i, r, c, o; + return c = e.a, c.c.i == e.b ? o = c.d : o = c.c, c.c.i == e.b ? i = c.c : i = c.d, r = O2e(n.a, o, i), r > 0 && r < O4 ? (t = Gme(n.a, i.i, r, n.c), pIn(n.a, i.i, -t), t > 0) : r < 0 && -r < O4 ? (t = zme(n.a, i.i, -r, n.c), pIn(n.a, i.i, t), t > 0) : !1; + } + function r9e(n, e, t, i) { + var r, c, o, f, h, l, a, d; + for (r = (e - n.d) / n.c.c.length, c = 0, n.a += t, n.d = e, d = new E(n.c); d.a < d.c.c.length; ) + a = u(y(d), 33), l = a.g, h = a.f, Zc(a, a.i + c * r), nu(a, a.j + i * t), _d(a, a.g + r), Rd(a, n.a), ++c, f = a.g, o = a.f, eLn(a, new fn(f, o), new fn(l, h)); + } + function c9e(n) { + var e, t, i, r, c, o, f; + if (n == null) + return null; + for (f = n.length, r = (f + 1) / 2 | 0, o = F(ku, wg, 25, r, 15, 1), f % 2 != 0 && (o[--r] = eZ((Te(f - 1, n.length), n.charCodeAt(f - 1)))), t = 0, i = 0; t < r; ++t) + e = eZ(Di(n, i++)), c = eZ(Di(n, i++)), o[t] = (e << 4 | c) << 24 >> 24; + return o; + } + function u9e(n) { + if (n.pe()) { + var e = n.c; + e.qe() ? n.o = "[" + e.n : e.pe() ? n.o = "[" + e.ne() : n.o = "[L" + e.ne() + ";", n.b = e.me() + "[]", n.k = e.oe() + "[]"; + return; + } + var t = n.j, i = n.d; + i = i.split("/"), n.o = RF(".", [t, RF("$", i)]), n.b = RF(".", [t, RF(".", i)]), n.k = i[i.length - 1]; + } + function s9e(n, e) { + var t, i, r, c, o; + for (o = null, c = new E(n.e.a); c.a < c.c.c.length; ) + if (r = u(y(c), 121), r.b.a.c.length == r.g.a.c.length) { + for (i = r.e, o = G5e(r), t = r.e - u(o.a, 19).a + 1; t < r.e + u(o.b, 19).a; t++) + e[t] < e[i] && (i = t); + e[i] < e[r.e] && (--e[r.e], ++e[i], r.e = i); + } + } + function Nx(n) { + var e, t, i, r, c, o, f, h; + for (r = Lt, i = Vt, t = new E(n.e.b); t.a < t.c.c.length; ) + for (e = u(y(t), 29), o = new E(e.a); o.a < o.c.c.length; ) + c = u(y(o), 10), h = K(n.p[c.p]), f = h + K(n.b[n.g[c.p].p]), r = j.Math.min(r, h), i = j.Math.max(i, f); + return i - r; + } + function xY(n, e, t, i) { + var r, c, o, f, h; + for (r = oZ(n, e), f = 0, h = r.gc(); f < h; ++f) + if (c = u(r.Xb(f), 170), An(i, p3(Er(n, c)))) { + if (o = E8(Er(n, c)), t == null) { + if (o == null) + return c; + } else if (An(t, o)) + return c; + } + return null; + } + function LY(n, e, t, i) { + var r, c, o, f, h; + for (r = Jx(n, e), f = 0, h = r.gc(); f < h; ++f) + if (c = u(r.Xb(f), 170), An(i, p3(Er(n, c)))) { + if (o = E8(Er(n, c)), t == null) { + if (o == null) + return c; + } else if (An(t, o)) + return c; + } + return null; + } + function o9e(n, e, t) { + var i, r, c, o, f, h; + if (o = new Jy(), f = _c(n.e.Tg(), e), i = u(n.g, 119), er(), u(e, 66).Oj()) + for (c = 0; c < n.i; ++c) + r = i[c], f.rl(r.ak()) && me(o, r); + else + for (c = 0; c < n.i; ++c) + r = i[c], f.rl(r.ak()) && (h = r.dd(), me(o, t ? y6(n, e, c, o.i, h) : h)); + return gX(o); + } + function f9e(n, e) { + var t, i, r, c, o; + for (t = new f6(iv), r = (q2(), A(M(iv, 1), z, 227, 0, [tv, ym, ev, Gb, Cg, Eg])), c = 0, o = r.length; c < o; ++c) + i = r[c], wU(t, i, new X()); + return _t(Xc(pt(qr(new $n(null, new xn(n.b, 16)), new Zdn()), new n0n()), new S5n(e)), new P5n(t)), t; + } + function rM(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (c = e.Kc(); c.Ob(); ) + r = u(c.Pb(), 33), a = r.i + r.g / 2, g = r.j + r.f / 2, h = n.f, o = h.i + h.g / 2, f = h.j + h.f / 2, l = a - o, d = g - f, i = j.Math.sqrt(l * l + d * d), l *= n.e / i, d *= n.e / i, t ? (a -= l, g -= d) : (a += l, g += d), Zc(r, a - r.g / 2), nu(r, g - r.f / 2); + } + function Jw(n) { + var e, t, i; + if (!n.c && n.b != null) { + for (e = n.b.length - 4; e >= 0; e -= 2) + for (t = 0; t <= e; t += 2) + (n.b[t] > n.b[t + 2] || n.b[t] === n.b[t + 2] && n.b[t + 1] > n.b[t + 3]) && (i = n.b[t + 2], n.b[t + 2] = n.b[t], n.b[t] = i, i = n.b[t + 3], n.b[t + 3] = n.b[t + 1], n.b[t + 1] = i); + n.c = !0; + } + } + function oNn(n, e) { + var t, i, r, c, o, f, h, l; + for (o = e == 1 ? KR : _R, c = o.a.ec().Kc(); c.Ob(); ) + for (r = u(c.Pb(), 103), h = u(ct(n.f.c, r), 21).Kc(); h.Ob(); ) + switch (f = u(h.Pb(), 46), i = u(f.b, 81), l = u(f.a, 189), t = l.c, r.g) { + case 2: + case 1: + i.g.d += t; + break; + case 4: + case 3: + i.g.c += t; + } + } + function h9e(n, e) { + var t, i, r, c, o, f, h, l, a; + for (l = -1, a = 0, o = n, f = 0, h = o.length; f < h; ++f) { + for (c = o[f], t = new OEn(l == -1 ? n[0] : n[l], e, (i6(), oP)), i = 0; i < c.length; i++) + for (r = i + 1; r < c.length; r++) + ai(c[i], (G(), bc)) && ai(c[r], bc) && P_n(t, c[i], c[r]) > 0 && ++a; + ++l; + } + return a; + } + function yo(n) { + var e, t; + return t = new Yu(J1(n.gm)), t.a += "@", De(t, (e = kt(n) >>> 0, e.toString(16))), n.kh() ? (t.a += " (eProxyURI: ", rc(t, n.qh()), n.$g() && (t.a += " eClass: ", rc(t, n.$g())), t.a += ")") : n.$g() && (t.a += " (eClass: ", rc(t, n.$g()), t.a += ")"), t.a; + } + function E6(n) { + var e, t, i, r; + if (n.e) + throw T(new $r((Ph(kR), uN + kR.k + sN))); + for (n.d == (or(), mh) && TM(n, Zs), t = new E(n.a.a); t.a < t.c.c.length; ) + e = u(y(t), 307), e.g = e.i; + for (r = new E(n.a.b); r.a < r.c.c.length; ) + i = u(y(r), 57), i.i = Vt; + return n.b.Le(n), n; + } + function l9e(n, e) { + var t, i, r, c, o; + if (e < 2 * n.b) + throw T(new Hn("The knot vector must have at least two time the dimension elements.")); + for (n.f = 1, r = 0; r < n.b; r++) + W(n.e, 0); + for (o = e + 1 - 2 * n.b, t = o, c = 1; c < o; c++) + W(n.e, c / t); + if (n.d) + for (i = 0; i < n.b; i++) + W(n.e, 1); + } + function fNn(n, e) { + var t, i, r, c, o, f, h, l, a; + if (l = e, a = u(ZC(BD(n.i), l), 33), !a) + throw r = $h(l, Uf), f = "Unable to find elk node for json object '" + r, h = f + "' Panic!", T(new Af(h)); + c = xd(l, "edges"), t = new dkn(n, a), W6e(t.a, t.b, c), o = xd(l, FB), i = new V6n(n), c4e(i.a, o); + } + function hNn(n, e, t, i) { + var r, c, o, f, h; + if (i != null) { + if (r = n.d[e], r) { + for (c = r.g, h = r.i, f = 0; f < h; ++f) + if (o = u(c[f], 133), o.Sh() == t && tt(i, o.cd())) + return f; + } + } else if (r = n.d[e], r) { + for (c = r.g, h = r.i, f = 0; f < h; ++f) + if (o = u(c[f], 133), B(o.cd()) === B(i)) + return f; + } + return -1; + } + function d4(n, e) { + var t, i, r; + return t = e == null ? Vr(Sr(n.f, null)) : n5(n.g, e), I(t, 235) ? (r = u(t, 235), r.Qh() == null, r) : I(t, 498) ? (i = u(t, 1938), r = i.a, r && (r.yb == null || (e == null ? Rc(n.f, null, r) : zd(n.g, e, r))), r) : null; + } + function a9e(n) { + YY(); + var e, t, i, r, c, o, f; + if (n == null || (r = n.length, r % 2 != 0)) + return null; + for (e = NC(n), c = r / 2 | 0, t = F(ku, wg, 25, c, 15, 1), i = 0; i < c; i++) { + if (o = v9[e[i * 2]], o == -1 || (f = v9[e[i * 2 + 1]], f == -1)) + return null; + t[i] = (o << 4 | f) << 24 >> 24; + } + return t; + } + function d9e(n, e, t) { + var i, r, c; + if (r = u(wr(n.i, e), 306), !r) + if (r = new fIn(n.d, e, t), m2(n.i, e, r), GQ(e)) + Pce(n.a, e.c, e.b, r); + else + switch (c = n6e(e), i = u(wr(n.p, c), 244), c.g) { + case 1: + case 3: + r.j = !0, zI(i, e.b, r); + break; + case 4: + case 2: + r.k = !0, zI(i, e.c, r); + } + return r; + } + function b9e(n, e, t, i) { + var r, c, o, f, h, l; + if (f = new Jy(), h = _c(n.e.Tg(), e), r = u(n.g, 119), er(), u(e, 66).Oj()) + for (o = 0; o < n.i; ++o) + c = r[o], h.rl(c.ak()) && me(f, c); + else + for (o = 0; o < n.i; ++o) + c = r[o], h.rl(c.ak()) && (l = c.dd(), me(f, i ? y6(n, e, o, f.i, l) : l)); + return LQ(f, t); + } + function lNn(n, e) { + var t, i, r, c, o, f, h, l; + if (r = n.b[e.p], r >= 0) + return r; + for (c = 1, f = new E(e.j); f.a < f.c.c.length; ) + for (o = u(y(f), 11), i = new E(o.g); i.a < i.c.c.length; ) + t = u(y(i), 17), l = t.d.i, e != l && (h = lNn(n, l), c = j.Math.max(c, h + 1)); + return b2e(n, e, c), c; + } + function aNn(n, e, t) { + var i, r, c; + for (i = 1; i < n.c.length; i++) { + for (c = (Ln(i, n.c.length), u(n.c[i], 10)), r = i; r > 0 && e.ue((Ln(r - 1, n.c.length), u(n.c[r - 1], 10)), c) > 0; ) + Es(n, r, (Ln(r - 1, n.c.length), u(n.c[r - 1], 10))), --r; + Ln(r, n.c.length), n.c[r] = c; + } + t.a = new we(), t.b = new we(); + } + function w9e(n, e, t) { + var i, r, c, o, f, h, l, a; + for (a = (i = u(e.e && e.e(), 9), new ks(i, u(bo(i, i.length), 9), 0)), h = Mb(t, "[\\[\\]\\s,]+"), c = h, o = 0, f = c.length; o < f; ++o) + if (r = c[o], kb(r).length != 0) { + if (l = TLn(n, r), l == null) + return null; + ko(a, u(l, 22)); + } + return a; + } + function g9e(n) { + var e, t, i; + for (t = new E(n.a.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), i = (_n(0), 0), i > 0 && (!(tl(n.a.c) && e.n.d) && !(i3(n.a.c) && e.n.b) && (e.g.d -= j.Math.max(0, i / 2 - 0.5)), !(tl(n.a.c) && e.n.a) && !(i3(n.a.c) && e.n.c) && (e.g.a += j.Math.max(0, i - 1))); + } + function dNn(n, e, t) { + var i, r; + if ((n.c - n.b & n.a.length - 1) == 2) + e == (J(), Kn) || e == Vn ? (GC(u(t6(n), 15), (us(), kh)), GC(u(t6(n), 15), Kl)) : (GC(u(t6(n), 15), (us(), Kl)), GC(u(t6(n), 15), kh)); + else + for (r = new B5(n); r.a != r.b; ) + i = u(vT(r), 15), GC(i, t); + } + function p9e(n, e) { + var t, i, r, c, o, f, h; + for (r = o3(new Fq(n)), f = new Ii(r, r.c.length), c = o3(new Fq(e)), h = new Ii(c, c.c.length), o = null; f.b > 0 && h.b > 0 && (t = (ne(f.b > 0), u(f.a.Xb(f.c = --f.b), 33)), i = (ne(h.b > 0), u(h.a.Xb(h.c = --h.b), 33)), t == i); ) + o = t; + return o; + } + function Fu(n, e) { + var t, i, r, c, o, f; + return c = n.a * tN + n.b * 1502, f = n.b * tN + 11, t = j.Math.floor(f * uk), c += t, f -= t * enn, c %= enn, n.a = c, n.b = f, e <= 24 ? j.Math.floor(n.a * Kin[e]) : (r = n.a * (1 << e - 24), o = j.Math.floor(n.b * Hin[e]), i = r + o, i >= 2147483648 && (i -= YL), i); + } + function bNn(n, e, t) { + var i, r, c, o; + BMn(n, e) > BMn(n, t) ? (i = zr(t, (J(), Vn)), n.d = i.dc() ? 0 : wD(u(i.Xb(0), 11)), o = zr(e, Gn), n.b = o.dc() ? 0 : wD(u(o.Xb(0), 11))) : (r = zr(t, (J(), Gn)), n.d = r.dc() ? 0 : wD(u(r.Xb(0), 11)), c = zr(e, Vn), n.b = c.dc() ? 0 : wD(u(c.Xb(0), 11))); + } + function wNn(n) { + var e, t, i, r, c, o, f; + if (n && (e = n.Hh(Vs), e && (o = Ce(Ko((!e.b && (e.b = new Gu((Sn(), Zi), tc, e)), e.b), "conversionDelegates")), o != null))) { + for (f = new X(), i = Mb(o, "\\w+"), r = 0, c = i.length; r < c; ++r) + t = i[r], f.c[f.c.length] = t; + return f; + } + return Pn(), Pn(), cr; + } + function gNn(n, e) { + var t, i, r, c; + for (t = n.o.a, c = u(u(ct(n.r, e), 21), 84).Kc(); c.Ob(); ) + r = u(c.Pb(), 111), r.e.a = t * K(Y(r.b.We(JA))), r.e.b = (i = r.b, i.Xe((Xe(), Bu)) ? i.Hf() == (J(), Kn) ? -i.rf().b - K(Y(i.We(Bu))) : K(Y(i.We(Bu))) : i.Hf() == (J(), Kn) ? -i.rf().b : 0); + } + function v9e(n) { + var e, t, i, r, c, o, f, h; + e = !0, r = null, c = null; + n: + for (h = new E(n.a); h.a < h.c.c.length; ) + for (f = u(y(h), 10), i = new re(ue(Lr(f).a.Kc(), new Mn())); Se(i); ) { + if (t = u(ve(i), 17), r && r != f) { + e = !1; + break n; + } + if (r = f, o = t.c.i, c && c != o) { + e = !1; + break n; + } + c = o; + } + return e; + } + function m9e(n, e, t) { + var i, r, c, o, f, h; + for (c = -1, f = -1, o = 0; o < e.c.length && (r = (Ln(o, e.c.length), u(e.c[o], 329)), !(r.c > n.c)); o++) + r.a >= n.s && (c < 0 && (c = o), f = o); + return h = (n.s + n.c) / 2, c >= 0 && (i = nke(n, e, c, f), h = fre((Ln(i, e.c.length), u(e.c[i], 329))), hme(e, i, t)), h; + } + function Bx() { + Bx = N, zYn = new tr((Xe(), Tp), 1.3), efn = ehn, ofn = new md(15), YYn = new tr(ed, ofn), nZn = new tr(td, 15), UYn = LP, VYn = nd, QYn = Kg, JYn = _l, XYn = _g, cfn = ky, ZYn = cw, sfn = (IY(), HYn), rfn = _Yn, ufn = KYn, ffn = qYn, tfn = RYn, ifn = NP, WYn = ihn, fy = BYn, nfn = NYn, hfn = GYn; + } + function ke(n, e, t) { + var i, r, c, o, f, h, l; + for (o = (c = new JH(), c), pV(o, (_n(e), e)), l = (!o.b && (o.b = new Gu((Sn(), Zi), tc, o)), o.b), h = 1; h < t.length; h += 2) + XT(l, t[h - 1], t[h]); + for (i = (!n.Ab && (n.Ab = new V(Be, n, 0, 3)), n.Ab), f = 0; f < 0; ++f) + r = Ehe(u(D(i, i.i - 1), 590)), i = r; + me(i, o); + } + function pNn(n, e, t) { + var i, r, c; + for (lue.call(this, new X()), this.a = e, this.b = t, this.e = n, i = (n.b && uL(n), n.a), this.d = ETn(i.a, this.a), this.c = ETn(i.b, this.b), Xge(this, this.d, this.c), _6e(this), c = this.e.e.a.ec().Kc(); c.Ob(); ) + r = u(c.Pb(), 266), r.c.c.length > 0 && Wje(this, r); + } + function NY(n, e, t, i, r, c) { + var o, f, h; + if (!r[e.b]) { + for (r[e.b] = !0, o = i, !o && (o = new TC()), W(o.e, e), h = c[e.b].Kc(); h.Ob(); ) + f = u(h.Pb(), 282), !(f.d == t || f.c == t) && (f.c != e && NY(n, f.c, e, o, r, c), f.d != e && NY(n, f.d, e, o, r, c), W(o.c, f), Zt(o.d, f.b)); + return o; + } + return null; + } + function k9e(n) { + var e, t, i, r, c, o, f; + for (e = 0, r = new E(n.e); r.a < r.c.c.length; ) + i = u(y(r), 17), t = E3(new $n(null, new xn(i.b, 16)), new pdn()), t && ++e; + for (o = new E(n.g); o.a < o.c.c.length; ) + c = u(y(o), 17), f = E3(new $n(null, new xn(c.b, 16)), new vdn()), f && ++e; + return e >= 2; + } + function y9e(n, e) { + var t, i, r, c; + for (le(e, "Self-Loop pre-processing", 1), i = new E(n.a); i.a < i.c.c.length; ) + t = u(y(i), 10), i2e(t) && (r = (c = new $$n(t), H(t, (G(), ov), c), Rke(c), c), _t(Xc(qr(new $n(null, new xn(r.d, 16)), new K0n()), new H0n()), new q0n()), F8e(r)); + ce(e); + } + function j9e(n, e, t, i, r) { + var c, o, f, h, l, a; + for (c = n.c.d.j, o = u(qo(t, 0), 8), a = 1; a < t.b; a++) + l = u(qo(t, a), 8), Ht(i, o, i.c.b, i.c), f = If(st(new kr(o), l), 0.5), h = If(new u$(XV(c)), r), st(f, h), Ht(i, f, i.c.b, i.c), o = l, c = e == 0 ? yT(c) : pQ(c); + Ke(i, (ne(t.b != 0), u(t.c.b.c, 8))); + } + function E9e(n) { + Eb(); + var e, t, i; + return t = vt(ds, A(M(ar, 1), z, 93, 0, [Io])), !(Z8(hC(t, n)) > 1 || (e = vt(So, A(M(ar, 1), z, 93, 0, [Zh, Po])), Z8(hC(e, n)) > 1) || (i = vt(Oo, A(M(ar, 1), z, 93, 0, [yh, eo])), Z8(hC(i, n)) > 1)); + } + function C9e(n, e) { + var t, i, r; + return t = e.Hh(n.a), t && (r = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), "affiliation")), r != null) ? (i = aE(r, tu(35)), i == -1 ? TF(n, I5(n, is(e.Hj())), r) : i == 0 ? TF(n, null, r.substr(1)) : TF(n, r.substr(0, i), r.substr(i + 1))) : null; + } + function T9e(n) { + var e, t, i; + try { + return n == null ? iu : Nr(n); + } catch (r) { + if (r = Et(r), I(r, 102)) + return e = r, i = J1(Du(n)) + "@" + (t = (Zf(), QQ(n) >>> 0), t.toString(16)), dpe(awe(), (n3(), "Exception during lenientFormat for " + i), e), "<" + i + " threw " + J1(e.gm) + ">"; + throw T(r); + } + } + function vNn(n) { + switch (n.g) { + case 0: + return new T4n(); + case 1: + return new k4n(); + case 2: + return new k7n(); + case 3: + return new jwn(); + case 4: + return new Kjn(); + case 5: + return new M4n(); + default: + throw T(new Hn("No implementation is available for the layerer " + (n.f != null ? n.f : "" + n.g))); + } + } + function BY(n, e, t) { + var i, r, c; + for (c = new E(n.t); c.a < c.c.c.length; ) + i = u(y(c), 268), i.b.s < 0 && i.c > 0 && (i.b.n -= i.c, i.b.n <= 0 && i.b.u > 0 && Ke(e, i.b)); + for (r = new E(n.i); r.a < r.c.c.length; ) + i = u(y(r), 268), i.a.s < 0 && i.c > 0 && (i.a.u -= i.c, i.a.u <= 0 && i.a.n > 0 && Ke(t, i.a)); + } + function cM(n) { + var e, t, i, r, c; + if (n.g == null && (n.d = n.si(n.f), me(n, n.d), n.c)) + return c = n.f, c; + if (e = u(n.g[n.i - 1], 47), r = e.Pb(), n.e = e, t = n.si(r), t.Ob()) + n.d = t, me(n, t); + else + for (n.d = null; !e.Ob() && (St(n.g, --n.i, null), n.i != 0); ) + i = u(n.g[n.i - 1], 47), e = i; + return r; + } + function M9e(n, e) { + var t, i, r, c, o, f; + if (i = e, r = i.ak(), zh(n.e, r)) { + if (r.hi() && yC(n, r, i.dd())) + return !1; + } else + for (f = _c(n.e.Tg(), r), t = u(n.g, 119), c = 0; c < n.i; ++c) + if (o = t[c], f.rl(o.ak())) + return tt(o, i) ? !1 : (u(Gw(n, c, e), 72), !0); + return me(n, e); + } + function A9e(n, e, t, i) { + var r, c, o, f; + for (r = new qh(n), ta(r, (Qn(), Ju)), H(r, (G(), rt), e), H(r, Vk, i), H(r, (nn(), Bt), (Ai(), Sc)), H(r, Xo, e.c), H(r, Ys, e.d), GNn(e, r), f = j.Math.floor(t / 2), o = new E(r.j); o.a < o.c.c.length; ) + c = u(y(o), 11), c.n.b = f; + return r; + } + function S9e(n, e) { + var t, i, r, c, o, f, h, l, a; + for (h = nh(n.c - n.b & n.a.length - 1), l = null, a = null, c = new B5(n); c.a != c.b; ) + r = u(vT(c), 10), t = (f = u(k(r, (G(), Xo)), 11), f ? f.i : null), i = (o = u(k(r, Ys), 11), o ? o.i : null), (l != t || a != i) && (cNn(h, e), l = t, a = i), h.c[h.c.length] = r; + cNn(h, e); + } + function mNn(n) { + var e, t, i, r, c, o, f; + for (e = 0, i = new E(n.a); i.a < i.c.c.length; ) + for (t = u(y(i), 10), c = new re(ue(ei(t).a.Kc(), new Mn())); Se(c); ) + r = u(ve(c), 17), n == r.d.i.c && r.c.j == (J(), Gn) && (o = tf(r.c).b, f = tf(r.d).b, e = j.Math.max(e, j.Math.abs(f - o))); + return e; + } + function P9e(n, e, t) { + var i, r, c; + le(t, "Remove overlaps", 1), t.n && e && go(t, po(e), (Vu(), gs)), i = u(hn(e, (C5(), Xm)), 33), n.f = i, n.a = XF(u(hn(e, (pb(), oy)), 293)), r = Y(hn(e, (Xe(), td))), dq(n, (_n(r), r)), c = Tb(i), f_n(n, e, c, t), t.n && e && go(t, po(e), (Vu(), gs)); + } + function RY(n, e, t) { + switch (t.g) { + case 1: + return new fn(e.a, j.Math.min(n.d.b, e.b)); + case 2: + return new fn(j.Math.max(n.c.a, e.a), e.b); + case 3: + return new fn(e.a, j.Math.max(n.c.b, e.b)); + case 4: + return new fn(j.Math.min(e.a, n.d.a), e.b); + } + return new fn(e.a, e.b); + } + function I9e(n, e, t, i) { + var r, c, o, f, h, l, a, d, g; + for (d = i ? (J(), Gn) : (J(), Vn), r = !1, h = e[t], l = 0, a = h.length; l < a; ++l) + f = h[l], !p2(u(k(f, (nn(), Bt)), 98)) && (o = f.e, g = !zr(f, d).dc() && !!o, g && (c = LJ(o), n.b = new NJ(c, i ? 0 : c.length - 1)), r = r | Ske(n, f, d, g)); + return r; + } + function N7(n) { + var e, t, i; + for (e = nh(1 + (!n.c && (n.c = new V(Ru, n, 9, 9)), n.c).i), W(e, (!n.d && (n.d = new Fn(bi, n, 8, 5)), n.d)), i = new ie((!n.c && (n.c = new V(Ru, n, 9, 9)), n.c)); i.e != i.i.gc(); ) + t = u(oe(i), 118), W(e, (!t.d && (t.d = new Fn(bi, t, 8, 5)), t.d)); + return pe(e), new p5(e); + } + function Gh(n) { + var e, t, i; + for (e = nh(1 + (!n.c && (n.c = new V(Ru, n, 9, 9)), n.c).i), W(e, (!n.e && (n.e = new Fn(bi, n, 7, 4)), n.e)), i = new ie((!n.c && (n.c = new V(Ru, n, 9, 9)), n.c)); i.e != i.i.gc(); ) + t = u(oe(i), 118), W(e, (!t.e && (t.e = new Fn(bi, t, 7, 4)), t.e)); + return pe(e), new p5(e); + } + function O9e(n) { + var e, t, i, r; + if (n == null) + return null; + if (i = Ec(n, !0), r = Ak.length, An(i.substr(i.length - r, r), Ak)) { + if (t = i.length, t == 4) { + if (e = (Te(0, i.length), i.charCodeAt(0)), e == 43) + return F1n; + if (e == 45) + return Tee; + } else if (t == 3) + return F1n; + } + return yb(i); + } + function D9e(n) { + var e, t, i, r; + for (e = 0, t = 0, r = new E(n.j); r.a < r.c.c.length; ) + if (i = u(y(r), 11), e = ge(Hi(e, DSn(pt(new $n(null, new xn(i.e, 16)), new qwn())))), t = ge(Hi(t, DSn(pt(new $n(null, new xn(i.g, 16)), new Gwn())))), e > 1 || t > 1) + return 2; + return e + t == 1 ? 2 : 0; + } + function kNn(n, e, t) { + var i, r, c, o, f; + for (le(t, "ELK Force", 1), on(sn(hn(e, (Go(), Irn)))) || oC((i = new O9((H0(), new B0(e))), i)), f = QOn(e), J3e(f), Iwe(n, u(k(f, Prn), 424)), o = fRn(n.a, f), c = o.Kc(); c.Ob(); ) + r = u(c.Pb(), 231), ake(n.b, r, yc(t, 1 / o.gc())); + f = j_n(o), m_n(f), ce(t); + } + function $9e(n, e) { + var t, i, r, c, o; + if (le(e, "Breaking Point Processor", 1), ZEe(n), on(sn(k(n, (nn(), Nsn))))) { + for (r = new E(n.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), t = 0, o = new E(i.a); o.a < o.c.c.length; ) + c = u(y(o), 10), c.p = t++; + eje(n), qNn(n, !0), qNn(n, !1); + } + ce(e); + } + function F9e(n, e, t) { + var i, r, c, o, f, h; + for (f = n.c, o = (t.q ? t.q : (Pn(), Pn(), ph)).vc().Kc(); o.Ob(); ) + c = u(o.Pb(), 42), i = !Wv(pt(new $n(null, new xn(f, 16)), new Fv(new rkn(e, c)))).sd((ua(), X4)), i && (h = c.dd(), I(h, 4) && (r = qQ(h), r != null && (h = r)), e.Ye(u(c.cd(), 146), h)); + } + function uM(n, e) { + var t, i, r, c, o; + if (e) { + for (c = I(n.Cb, 88) || I(n.Cb, 99), o = !c && I(n.Cb, 322), i = new ie((!e.a && (e.a = new P5(e, dr, e)), e.a)); i.e != i.i.gc(); ) + if (t = u(oe(i), 87), r = pM(t), c ? I(r, 88) : o ? I(r, 148) : r) + return r; + return c ? (Sn(), so) : (Sn(), Cf); + } else + return null; + } + function x9e(n, e) { + var t, i, r, c, o, f; + for (le(e, "Constraints Postprocessor", 1), o = 0, c = new E(n.b); c.a < c.c.c.length; ) { + for (r = u(y(c), 29), f = 0, i = new E(r.a); i.a < i.c.c.length; ) + t = u(y(i), 10), t.k == (Qn(), ii) && (H(t, (nn(), ZS), Q(o)), H(t, VS, Q(f)), ++f); + ++o; + } + ce(e); + } + function L9e(n, e, t, i) { + var r, c, o, f, h, l, a; + for (h = new fn(t, i), ji(h, u(k(e, (cc(), zm)), 8)), a = _e(e.b, 0); a.b != a.d.c; ) + l = u(Re(a), 86), st(l.e, h), Ke(n.b, l); + for (f = _e(e.a, 0); f.b != f.d.c; ) { + for (o = u(Re(f), 188), c = _e(o.a, 0); c.b != c.d.c; ) + r = u(Re(c), 8), st(r, h); + Ke(n.a, o); + } + } + function _Y(n, e, t) { + var i, r, c; + if (c = rg((wu(), xi), n.Tg(), e), c) { + if (er(), !u(c, 66).Oj() && (c = A2(Er(xi, c)), !c)) + throw T(new Hn(Pl + e.ne() + em)); + r = (i = n.Yg(c), u(i >= 0 ? n._g(i, !0, !0) : Zd(n, c, !0), 153)), u(r, 215).ml(e, t); + } else + throw T(new Hn(Pl + e.ne() + em)); + } + function N9e(n, e) { + var t, i, r, c, o; + for (t = new X(), r = qr(new $n(null, new xn(n, 16)), new wgn()), c = qr(new $n(null, new xn(n, 16)), new ggn()), o = h0e(Tde(YE(g8e(A(M(UTe, 1), rn, 833, 0, [r, c])), new pgn()))), i = 1; i < o.length; i++) + o[i] - o[i - 1] >= 2 * e && W(t, new hD(o[i - 1] + e, o[i] - e)); + return t; + } + function B9e(n, e, t) { + le(t, "Eades radial", 1), t.n && e && go(t, po(e), (Vu(), gs)), n.d = u(hn(e, (C5(), Xm)), 33), n.c = K(Y(hn(e, (pb(), MP)))), n.e = XF(u(hn(e, oy), 293)), n.a = p2e(u(hn(e, Kon), 426)), n.b = R4e(u(hn(e, _on), 340)), m4e(n), t.n && e && go(t, po(e), (Vu(), gs)); + } + function R9e(n, e, t) { + var i, r, c, o, f, h, l, a; + if (t) + for (c = t.a.length, i = new ha(c), f = (i.b - i.a) * i.c < 0 ? (nl(), Jl) : new rl(i); f.Ob(); ) + o = u(f.Pb(), 19), r = y3(t, o.a), r && (h = Nae(n, (l = (dd(), a = new eG(), a), e && KY(l, e), l), r), Q5(h, $h(r, Uf)), YT(r, h), lY(r, h), oF(n, r, h)); + } + function sM(n) { + var e, t, i, r, c, o; + if (!n.j) { + if (o = new npn(), e = b9, c = e.a.zc(n, e), c == null) { + for (i = new ie(Ar(n)); i.e != i.i.gc(); ) + t = u(oe(i), 26), r = sM(t), Ft(o, r), me(o, t); + e.a.Bc(n) != null; + } + ab(o), n.j = new Ew((u(D(R((ol(), Nn).o), 11), 18), o.i), o.g), Iu(n).b &= -33; + } + return n.j; + } + function _9e(n) { + var e, t, i, r; + if (n == null) + return null; + if (i = Ec(n, !0), r = Ak.length, An(i.substr(i.length - r, r), Ak)) { + if (t = i.length, t == 4) { + if (e = (Te(0, i.length), i.charCodeAt(0)), e == 43) + return x1n; + if (e == 45) + return Mee; + } else if (t == 3) + return x1n; + } + return new Gq(i); + } + function K9e(n) { + var e, t, i; + return t = n.l, t & t - 1 || (i = n.m, i & i - 1) || (e = n.h, e & e - 1) || e == 0 && i == 0 && t == 0 ? -1 : e == 0 && i == 0 && t != 0 ? hV(t) : e == 0 && i != 0 && t == 0 ? hV(i) + 22 : e != 0 && i == 0 && t == 0 ? hV(e) + 44 : -1; + } + function H9e(n, e) { + var t, i, r, c, o; + for (le(e, "Edge joining", 1), t = on(sn(k(n, (nn(), U_)))), r = new E(n.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), o = new Ii(i.a, 0); o.b < o.d.gc(); ) + c = (ne(o.b < o.d.gc()), u(o.d.Xb(o.c = o.b++), 10)), c.k == (Qn(), pi) && (gL(c, t), Wu(o)); + ce(e); + } + function q9e(n, e, t) { + var i, r; + if (pC(n.b), ih(n.b, (w7(), AP), (Jv(), hy)), ih(n.b, SP, e.g), ih(n.b, PP, e.a), n.a = EM(n.b, e), le(t, "Compaction by shrinking a tree", n.a.c.length), e.i.c.length > 1) + for (r = new E(n.a); r.a < r.c.c.length; ) + i = u(y(r), 51), i.pf(e, yc(t, 1)); + ce(t); + } + function Yw(n, e) { + var t, i, r, c, o; + for (r = e.a & n.f, c = null, i = n.b[r]; ; i = i.b) { + if (i == e) { + c ? c.b = e.b : n.b[r] = e.b; + break; + } + c = i; + } + for (o = e.f & n.f, c = null, t = n.c[o]; ; t = t.d) { + if (t == e) { + c ? c.d = e.d : n.c[o] = e.d; + break; + } + c = t; + } + e.e ? e.e.c = e.c : n.a = e.c, e.c ? e.c.e = e.e : n.e = e.e, --n.i, ++n.g; + } + function G9e(n) { + var e, t, i, r, c, o, f, h, l, a; + for (t = n.o, e = n.p, o = nt, r = Bi, f = nt, c = Bi, l = 0; l < t; ++l) + for (a = 0; a < e; ++a) + zw(n, l, a) && (o = j.Math.min(o, l), r = j.Math.max(r, l), f = j.Math.min(f, a), c = j.Math.max(c, a)); + return h = r - o + 1, i = c - f + 1, new jTn(Q(o), Q(f), Q(h), Q(i)); + } + function Rx(n, e) { + var t, i, r, c; + for (c = new Ii(n, 0), t = (ne(c.b < c.d.gc()), u(c.d.Xb(c.c = c.b++), 140)); c.b < c.d.gc(); ) + i = (ne(c.b < c.d.gc()), u(c.d.Xb(c.c = c.b++), 140)), r = new QU(i.c, t.d, e), ne(c.b > 0), c.a.Xb(c.c = --c.b), V0(c, r), ne(c.b < c.d.gc()), c.d.Xb(c.c = c.b++), r.a = !1, t = i; + } + function yNn(n) { + var e, t, i, r, c, o; + for (r = u(k(n, (G(), _S)), 11), o = new E(n.j); o.a < o.c.c.length; ) { + for (c = u(y(o), 11), i = new E(c.g); i.a < i.c.c.length; ) + return e = u(y(i), 17), Ti(e, r), c; + for (t = new E(c.e); t.a < t.c.c.length; ) + return e = u(y(t), 17), Ki(e, r), c; + } + return null; + } + function z9e(n, e, t) { + var i, r; + i = eu(t.q.getTime()), hc(i, 0) < 0 ? (r = E1 - ge(p7(S3(i), E1)), r == E1 && (r = 0)) : r = ge(p7(i, E1)), e == 1 ? (r = j.Math.min((r + 50) / 100 | 0, 9), sl(n, 48 + r & Ut)) : e == 2 ? (r = j.Math.min((r + 5) / 10 | 0, 99), sh(n, r, 2)) : (sh(n, r, 3), e > 3 && sh(n, 0, e - 3)); + } + function U9e(n) { + var e, t, i, r; + return B(k(n, (nn(), Qb))) === B((_h(), x1)) ? !n.e && B(k(n, Jk)) !== B((H3(), Gk)) : (i = u(k(n, F_), 292), r = on(sn(k(n, x_))) || B(k(n, Om)) === B((F2(), qk)), e = u(k(n, nsn), 19).a, t = n.a.c.length, !r && i != (H3(), Gk) && (e == 0 || e > t)); + } + function W9e(n) { + var e, t; + for (t = 0; t < n.c.length && !(zEn((Ln(t, n.c.length), u(n.c[t], 113))) > 0); t++) + ; + if (t > 0 && t < n.c.length - 1) + return t; + for (e = 0; e < n.c.length && !(zEn((Ln(e, n.c.length), u(n.c[e], 113))) > 0); e++) + ; + return e > 0 && t < n.c.length - 1 ? e : n.c.length / 2 | 0; + } + function jNn(n, e) { + var t, i; + if (e != n.Cb || n.Db >> 16 != 6 && e) { + if (c4(n, e)) + throw T(new Hn(tm + _Ln(n))); + i = null, n.Cb && (i = (t = n.Db >> 16, t >= 0 ? dJ(n, i) : n.Cb.ih(n, -1 - t, null, i))), e && (i = _2(e, n, 6, i)), i = lU(n, e, i), i && i.Fi(); + } else + n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 6, e, e)); + } + function KY(n, e) { + var t, i; + if (e != n.Cb || n.Db >> 16 != 9 && e) { + if (c4(n, e)) + throw T(new Hn(tm + jBn(n))); + i = null, n.Cb && (i = (t = n.Db >> 16, t >= 0 ? wJ(n, i) : n.Cb.ih(n, -1 - t, null, i))), e && (i = _2(e, n, 9, i)), i = aU(n, e, i), i && i.Fi(); + } else + n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 9, e, e)); + } + function _x(n, e) { + var t, i; + if (e != n.Cb || n.Db >> 16 != 3 && e) { + if (c4(n, e)) + throw T(new Hn(tm + yRn(n))); + i = null, n.Cb && (i = (t = n.Db >> 16, t >= 0 ? pJ(n, i) : n.Cb.ih(n, -1 - t, null, i))), e && (i = _2(e, n, 12, i)), i = hU(n, e, i), i && i.Fi(); + } else + n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 3, e, e)); + } + function b4(n) { + var e, t, i, r, c; + if (i = qs(n), c = n.j, c == null && i) + return n.$j() ? null : i.zj(); + if (I(i, 148)) { + if (t = i.Aj(), t && (r = t.Nh(), r != n.i)) { + if (e = u(i, 148), e.Ej()) + try { + n.g = r.Kh(e, c); + } catch (o) { + if (o = Et(o), I(o, 78)) + n.g = null; + else + throw T(o); + } + n.i = r; + } + return n.g; + } + return null; + } + function ENn(n) { + var e; + return e = new X(), W(e, new f2(new fn(n.c, n.d), new fn(n.c + n.b, n.d))), W(e, new f2(new fn(n.c, n.d), new fn(n.c, n.d + n.a))), W(e, new f2(new fn(n.c + n.b, n.d + n.a), new fn(n.c + n.b, n.d))), W(e, new f2(new fn(n.c + n.b, n.d + n.a), new fn(n.c, n.d + n.a))), e; + } + function CNn(n, e, t, i) { + var r, c, o; + if (o = TJ(e, t), i.c[i.c.length] = e, n.j[o.p] == -1 || n.j[o.p] == 2 || n.a[e.p]) + return i; + for (n.j[o.p] = -1, c = new re(ue(Kh(o).a.Kc(), new Mn())); Se(c); ) + if (r = u(ve(c), 17), !(!(!Wi(r) && !(!Wi(r) && r.c.i.c == r.d.i.c)) || r == e)) + return CNn(n, r, o, i); + return i; + } + function X9e(n, e, t) { + var i, r, c; + for (c = e.a.ec().Kc(); c.Ob(); ) + r = u(c.Pb(), 79), i = u(te(n.b, r), 266), !i && (Pt(fh(r)) == Pt(ml(r)) ? f7e(n, r, t) : fh(r) == Pt(ml(r)) ? te(n.c, r) == null && te(n.b, ml(r)) != null && i_n(n, r, t, !1) : te(n.d, r) == null && te(n.b, fh(r)) != null && i_n(n, r, t, !0)); + } + function V9e(n, e) { + var t, i, r, c, o, f, h; + for (r = n.Kc(); r.Ob(); ) + for (i = u(r.Pb(), 10), f = new gc(), Hr(f, i), si(f, (J(), Vn)), H(f, (G(), GS), (qn(), !0)), o = e.Kc(); o.Ob(); ) + c = u(o.Pb(), 10), h = new gc(), Hr(h, c), si(h, Gn), H(h, GS, !0), t = new Id(), H(t, GS, !0), Ki(t, f), Ti(t, h); + } + function Q9e(n, e, t, i) { + var r, c, o, f; + r = m$n(n, e, t), c = m$n(n, t, e), o = u(te(n.c, e), 112), f = u(te(n.c, t), 112), r < c ? new da((No(), iw), o, f, c - r) : c < r ? new da((No(), iw), f, o, r - c) : (r != 0 || !(!e.i || !t.i) && i[e.i.c][t.i.c]) && (new da((No(), iw), o, f, 0), new da(iw, f, o, 0)); + } + function TNn(n, e) { + var t, i, r, c, o, f, h; + for (r = 0, o = new E(e.a); o.a < o.c.c.length; ) + for (c = u(y(o), 10), r += c.o.b + c.d.a + c.d.d + n.e, i = new re(ue(Lr(c).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), t.c.i.k == (Qn(), Mc) && (h = t.c.i, f = u(k(h, (G(), rt)), 10), r += f.o.b + f.d.a + f.d.d); + return r; + } + function MNn(n, e, t) { + var i, r, c, o, f, h, l; + for (c = new X(), l = new Tt(), o = new Tt(), Rye(n, l, o, e), VEe(n, l, o, e, t), h = new E(n); h.a < h.c.c.length; ) + for (f = u(y(h), 112), r = new E(f.k); r.a < r.c.c.length; ) + i = u(y(r), 129), (!e || i.c == (No(), Bl)) && f.g > i.b.g && (c.c[c.c.length] = i); + return c; + } + function w4() { + w4 = N, Ng = new J9("CANDIDATE_POSITION_LAST_PLACED_RIGHT", 0), Ep = new J9("CANDIDATE_POSITION_LAST_PLACED_BELOW", 1), Qm = new J9("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT", 2), Vm = new J9("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW", 3), Jm = new J9("WHOLE_DRAWING", 4); + } + function J9e(n, e) { + if (I(e, 239)) + return Age(n, u(e, 33)); + if (I(e, 186)) + return _ge(n, u(e, 118)); + if (I(e, 354)) + return Zhe(n, u(e, 137)); + if (I(e, 352)) + return Eye(n, u(e, 79)); + if (e) + return null; + throw T(new Hn(Rtn + kl(new Hu(A(M(Zn, 1), rn, 1, 5, [e]))))); + } + function Y9e(n) { + var e, t, i, r, c, o, f; + for (c = new Tt(), r = new E(n.d.a); r.a < r.c.c.length; ) + i = u(y(r), 121), i.b.a.c.length == 0 && Ht(c, i, c.c.b, c.c); + if (c.b > 1) + for (e = yd((t = new ca(), ++n.b, t), n.d), f = _e(c, 0); f.b != f.d.c; ) + o = u(Re(f), 121), jo(lo(ho(ao(fo(new Ns(), 1), 0), e), o)); + } + function HY(n, e) { + var t, i; + if (e != n.Cb || n.Db >> 16 != 11 && e) { + if (c4(n, e)) + throw T(new Hn(tm + uZ(n))); + i = null, n.Cb && (i = (t = n.Db >> 16, t >= 0 ? vJ(n, i) : n.Cb.ih(n, -1 - t, null, i))), e && (i = _2(e, n, 10, i)), i = kU(n, e, i), i && i.Fi(); + } else + n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 11, e, e)); + } + function Z9e(n) { + var e, t, i, r; + for (i = new Ca(new ia(n.b).a); i.b; ) + t = Bd(i), r = u(t.cd(), 11), e = u(t.dd(), 10), H(e, (G(), rt), r), H(r, Mu, e), H(r, Wk, (qn(), !0)), si(r, u(k(e, ec), 61)), k(e, ec), H(r.i, (nn(), Bt), (Ai(), Cv)), u(k(qi(r.i), Ac), 21).Fc((fr(), sv)); + } + function n8e(n, e, t) { + var i, r, c, o, f, h; + if (c = 0, o = 0, n.c) + for (h = new E(n.d.i.j); h.a < h.c.c.length; ) + f = u(y(h), 11), c += f.e.c.length; + else + c = 1; + if (n.d) + for (h = new E(n.c.i.j); h.a < h.c.c.length; ) + f = u(y(h), 11), o += f.g.c.length; + else + o = 1; + return r = Gt(m8(o - c)), i = (t + e) / 2 + (t - e) * (0.4 * r), i; + } + function e8e(n) { + Vw(); + var e, t; + if (n.Hc((J(), Xr))) + throw T(new Hn("Port sides must not contain UNDEFINED")); + switch (n.gc()) { + case 1: + return SS; + case 2: + return e = n.Hc(Vn) && n.Hc(Gn), t = n.Hc(Kn) && n.Hc(ae), e || t ? OS : IS; + case 3: + return PS; + case 4: + return AS; + default: + return null; + } + } + function t8e(n, e, t) { + var i, r, c, o, f; + for (le(t, "Breaking Point Removing", 1), n.a = u(k(e, (nn(), Qh)), 218), c = new E(e.b); c.a < c.c.c.length; ) + for (r = u(y(c), 29), f = new E($d(r.a)); f.a < f.c.c.length; ) + o = u(y(f), 10), eIn(o) && (i = u(k(o, (G(), v0)), 305), !i.d && E_n(n, i)); + ce(t); + } + function Kx(n, e, t) { + return eg(), B3(n, e) && B3(n, t) ? !1 : vL(new fn(n.c, n.d), new fn(n.c + n.b, n.d), e, t) || vL(new fn(n.c + n.b, n.d), new fn(n.c + n.b, n.d + n.a), e, t) || vL(new fn(n.c + n.b, n.d + n.a), new fn(n.c, n.d + n.a), e, t) || vL(new fn(n.c, n.d + n.a), new fn(n.c, n.d), e, t); + } + function qY(n, e) { + var t, i, r, c; + if (!n.dc()) { + for (t = 0, i = n.gc(); t < i; ++t) + if (c = Ce(n.Xb(t)), c == null ? e == null : An(c.substr(0, 3), "!##") ? e != null && (r = e.length, !An(c.substr(c.length - r, r), e) || c.length != e.length + 3) && !An(Ha, e) : An(c, XB) && !An(Ha, e) || An(c, e)) + return !0; + } + return !1; + } + function i8e(n, e, t, i) { + var r, c, o, f, h, l; + for (o = n.j.c.length, h = F(VTe, lnn, 306, o, 0, 1), f = 0; f < o; f++) + c = u(un(n.j, f), 11), c.p = f, h[f] = fme(JLn(c), t, i); + for (A8e(n, h, t, e, i), l = new we(), r = 0; r < h.length; r++) + h[r] && it(l, u(un(n.j, r), 11), h[r]); + l.f.c + l.g.c != 0 && (H(n, (G(), Am), l), O5e(n, h)); + } + function r8e(n, e, t) { + var i, r, c; + for (r = new E(n.a.b); r.a < r.c.c.length; ) + if (i = u(y(r), 57), c = $w(i), c && c.k == (Qn(), Xt)) + switch (u(k(c, (G(), ec)), 61).g) { + case 4: + c.n.a = e.a; + break; + case 2: + c.n.a = t.a - (c.o.a + c.d.c); + break; + case 1: + c.n.b = e.b; + break; + case 3: + c.n.b = t.b - (c.o.b + c.d.a); + } + } + function Zw() { + Zw = N, hP = new h2(Xh, 0), ey = new h2("NIKOLOV", 1), ty = new h2("NIKOLOV_PIXEL", 2), Xsn = new h2("NIKOLOV_IMPROVED", 3), Vsn = new h2("NIKOLOV_IMPROVED_PIXEL", 4), Wsn = new h2("DUMMYNODE_PERCENTAGE", 5), Qsn = new h2("NODECOUNT_PERCENTAGE", 6), lP = new h2("NO_BOUNDARY", 7); + } + function c8e(n, e, t) { + var i, r, c, o, f; + return r = u(hn(e, (nM(), zfn)), 19), !r && (r = Q(0)), c = u(hn(t, zfn), 19), !c && (c = Q(0)), r.a > c.a ? -1 : r.a < c.a ? 1 : n.a && (i = ni(e.j, t.j), i != 0 || (i = ni(e.i, t.i), i != 0)) ? i : (o = e.g * e.f, f = t.g * t.f, ni(o, f)); + } + function u8e(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (++n.e, h = n.d == null ? 0 : n.d.length, e > h) { + for (a = n.d, n.d = F(u1n, Xtn, 63, 2 * h + 4, 0, 1), c = 0; c < h; ++c) + if (l = a[c], l) + for (i = l.g, d = l.i, f = 0; f < d; ++f) + r = u(i[f], 133), o = dU(n, r.Sh()), t = n.d[o], !t && (t = n.d[o] = n.uj()), t.Fc(r); + return !0; + } else + return !1; + } + function s8e(n, e, t) { + var i, r, c, o, f, h; + if (r = t, c = r.ak(), zh(n.e, c)) { + if (c.hi()) { + for (i = u(n.g, 119), o = 0; o < n.i; ++o) + if (f = i[o], tt(f, r) && o != e) + throw T(new Hn(yk)); + } + } else + for (h = _c(n.e.Tg(), c), i = u(n.g, 119), o = 0; o < n.i; ++o) + if (f = i[o], h.rl(f.ak())) + throw T(new Hn(Mk)); + s6(n, e, t); + } + function ANn(n, e) { + var t, i, r, c, o, f; + for (t = u(k(e, (G(), zb)), 21), o = u(ct((yL(), dt), t), 21), f = u(ct(Ne, t), 21), c = o.Kc(); c.Ob(); ) + if (i = u(c.Pb(), 21), !u(ct(n.b, i), 15).dc()) + return !1; + for (r = f.Kc(); r.Ob(); ) + if (i = u(r.Pb(), 21), !u(ct(n.b, i), 15).dc()) + return !1; + return !0; + } + function o8e(n, e) { + var t, i, r, c, o, f; + for (le(e, "Partition postprocessing", 1), i = new E(n.b); i.a < i.c.c.length; ) + for (t = u(y(i), 29), c = new E(t.a); c.a < c.c.c.length; ) + for (r = u(y(c), 10), f = new E(r.j); f.a < f.c.c.length; ) + o = u(y(f), 11), on(sn(k(o, (G(), GS)))) && F5(f); + ce(e); + } + function SNn(n, e) { + var t, i, r, c, o, f, h, l, a; + if (n.a.c.length == 1) + return Dxn(u(un(n.a, 0), 187), e); + for (o = lge(n), h = 0, l = n.d, c = o, a = n.d, f = (l - c) / 2 + c; c + 1 < l; ) { + for (h = 0, i = new E(n.a); i.a < i.c.c.length; ) + t = u(y(i), 187), h += (r = O6(t, f, !1), r.a); + h < e ? (a = f, l = f) : c = f, f = (l - c) / 2 + c; + } + return a; + } + function f8e(n) { + var e, t, i, r, c; + return isNaN(n) ? (P3(), pin) : n < -9223372036854776e3 ? (P3(), mzn) : n >= 9223372036854776e3 ? (P3(), win) : (r = !1, n < 0 && (r = !0, n = -n), i = 0, n >= Fa && (i = Gt(n / Fa), n -= i * Fa), t = 0, n >= J2 && (t = Gt(n / J2), n -= t * J2), e = Gt(n), c = Nc(e, t, i), r && sF(c), c); + } + function h8e(n, e) { + var t, i, r, c; + for (t = !e || !n.u.Hc((Tu(), n1)), c = 0, r = new E(n.e.Cf()); r.a < r.c.c.length; ) { + if (i = u(y(r), 838), i.Hf() == (J(), Xr)) + throw T(new Hn("Label and node size calculator can only be used with ports that have port sides assigned.")); + i.vf(c++), oge(n, i, t); + } + } + function l8e(n, e) { + var t, i, r, c, o; + return r = e.Hh(n.a), r && (i = (!r.b && (r.b = new Gu((Sn(), Zi), tc, r)), r.b), t = Ce(Ko(i, Ri)), t != null && (c = t.lastIndexOf("#"), o = c == -1 ? iU(n, e.Aj(), t) : c == 0 ? _8(n, null, t.substr(1)) : _8(n, t.substr(0, c), t.substr(c + 1)), I(o, 148))) ? u(o, 148) : null; + } + function a8e(n, e) { + var t, i, r, c, o; + return i = e.Hh(n.a), i && (t = (!i.b && (i.b = new Gu((Sn(), Zi), tc, i)), i.b), c = Ce(Ko(t, WB)), c != null && (r = c.lastIndexOf("#"), o = r == -1 ? iU(n, e.Aj(), c) : r == 0 ? _8(n, null, c.substr(1)) : _8(n, c.substr(0, r), c.substr(r + 1)), I(o, 148))) ? u(o, 148) : null; + } + function GY(n) { + var e, t, i, r, c; + for (t = new E(n.a.a); t.a < t.c.c.length; ) { + for (e = u(y(t), 307), e.j = null, c = e.a.a.ec().Kc(); c.Ob(); ) + i = u(c.Pb(), 57), Lo(i.b), (!e.j || i.d.c < e.j.d.c) && (e.j = i); + for (r = e.a.a.ec().Kc(); r.Ob(); ) + i = u(r.Pb(), 57), i.b.a = i.d.c - e.j.d.c, i.b.b = i.d.d - e.j.d.d; + } + return n; + } + function oM(n) { + var e, t, i, r, c; + for (t = new E(n.a.a); t.a < t.c.c.length; ) { + for (e = u(y(t), 189), e.f = null, c = e.a.a.ec().Kc(); c.Ob(); ) + i = u(c.Pb(), 81), Lo(i.e), (!e.f || i.g.c < e.f.g.c) && (e.f = i); + for (r = e.a.a.ec().Kc(); r.Ob(); ) + i = u(r.Pb(), 81), i.e.a = i.g.c - e.f.g.c, i.e.b = i.g.d - e.f.g.d; + } + return n; + } + function d8e(n) { + var e, t, i; + return t = u(n.a, 19).a, i = u(n.b, 19).a, e = j.Math.max(j.Math.abs(t), j.Math.abs(i)), t < e && i == -e ? new Pi(Q(t + 1), Q(i)) : t == e && i < e ? new Pi(Q(t), Q(i + 1)) : t >= -e && i == e ? new Pi(Q(t - 1), Q(i)) : new Pi(Q(t), Q(i - 1)); + } + function PNn() { + return rr(), A(M(nMe, 1), z, 77, 0, [fcn, ucn, mm, WR, Scn, dS, ES, Y4, Mcn, pcn, Ccn, J4, Acn, bcn, Pcn, ncn, pS, XR, lS, kS, Ocn, mS, ecn, Tcn, Dcn, yS, Icn, aS, lcn, jcn, ycn, CS, rcn, hS, wS, icn, Q4, mcn, wcn, Ecn, km, scn, ccn, kcn, gcn, gS, jS, tcn, vS, vcn, bS, acn, hcn, Kk, fS, dcn, ocn]); + } + function b8e(n, e, t) { + n.d = 0, n.b = 0, e.k == (Qn(), Mc) && t.k == Mc && u(k(e, (G(), rt)), 10) == u(k(t, rt), 10) && (F$(e).j == (J(), Kn) ? bNn(n, e, t) : bNn(n, t, e)), e.k == Mc && t.k == pi ? F$(e).j == (J(), Kn) ? n.d = 1 : n.b = 1 : t.k == Mc && e.k == pi && (F$(t).j == (J(), Kn) ? n.b = 1 : n.d = 1), e3e(n, e, t); + } + function w8e(n) { + var e, t, i, r, c, o, f, h, l, a, d; + return d = KJ(n), e = n.a, h = e != null, h && h3(d, "category", n.a), r = N9(new Bp(n.d)), o = !r, o && (l = new ea(), Ro(d, "knownOptions", l), t = new pmn(l), $i(new Bp(n.d), t)), c = N9(n.g), f = !c, f && (a = new ea(), Ro(d, "supportedFeatures", a), i = new vmn(a), $i(n.g, i)), d; + } + function g8e(n) { + var e, t, i, r, c, o, f, h, l; + for (i = !1, e = 336, t = 0, c = new Ojn(n.length), f = n, h = 0, l = f.length; h < l; ++h) + o = f[h], i = i | (Ma(o), !1), r = (fl(o), o.a), W(c.a, pe(r)), e &= r.qd(), t = zwe(t, r.rd()); + return u(u(NCn(new $n(null, kx(new xn((eb(), $Q(c.a)), 16), new Th(), e, t)), new Avn(n)), 670), 833); + } + function p8e(n, e) { + var t; + n.d && (e.c != n.e.c || Abe(n.e.b, e.b)) && (W(n.f, n.d), n.a = n.d.c + n.d.b, n.d = null, n.e = null), Lre(e.b) ? n.c = e : n.b = e, (e.b == (q3(), w0) && !e.a || e.b == Hb && e.a || e.b == kg && e.a || e.b == qb && !e.a) && n.c && n.b && (t = new ys(n.a, n.c.d, e.c - n.a, n.b.d - n.c.d), n.d = t, n.e = e); + } + function B7(n) { + var e; + if (P9n.call(this), this.i = new Zgn(), this.g = n, this.f = u(n.e && n.e(), 9).length, this.f == 0) + throw T(new Hn("There must be at least one phase in the phase enumeration.")); + this.c = (e = u(xo(this.g), 9), new ks(e, u(bo(e, e.length), 9), 0)), this.a = new li(), this.b = new we(); + } + function zY(n, e) { + var t, i; + if (e != n.Cb || n.Db >> 16 != 7 && e) { + if (c4(n, e)) + throw T(new Hn(tm + Lxn(n))); + i = null, n.Cb && (i = (t = n.Db >> 16, t >= 0 ? bJ(n, i) : n.Cb.ih(n, -1 - t, null, i))), e && (i = u(e, 49).gh(n, 1, Iy, i)), i = aW(n, e, i), i && i.Fi(); + } else + n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 7, e, e)); + } + function INn(n, e) { + var t, i; + if (e != n.Cb || n.Db >> 16 != 3 && e) { + if (c4(n, e)) + throw T(new Hn(tm + zDn(n))); + i = null, n.Cb && (i = (t = n.Db >> 16, t >= 0 ? gJ(n, i) : n.Cb.ih(n, -1 - t, null, i))), e && (i = u(e, 49).gh(n, 0, Dy, i)), i = dW(n, e, i), i && i.Fi(); + } else + n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 3, e, e)); + } + function Hx(n, e) { + l4(); + var t, i, r, c, o, f, h, l, a; + return e.d > n.d && (f = n, n = e, e = f), e.d < 63 ? u7e(n, e) : (o = (n.d & -2) << 4, l = MX(n, o), a = MX(e, o), i = rL(n, P2(l, o)), r = rL(e, P2(a, o)), h = Hx(l, a), t = Hx(i, r), c = Hx(rL(l, i), rL(r, a)), c = aL(aL(c, h), t), c = P2(c, o), h = P2(h, o << 1), aL(aL(h, c), t)); + } + function v8e(n, e, t) { + var i, r, c, o, f; + for (o = c6(n, t), f = F(vh, C1, 10, e.length, 0, 1), i = 0, c = o.Kc(); c.Ob(); ) + r = u(c.Pb(), 11), on(sn(k(r, (G(), Wk)))) && (f[i++] = u(k(r, Mu), 10)); + if (i < e.length) + throw T(new $r("Expected " + e.length + " hierarchical ports, but found only " + i + ".")); + return f; + } + function m8e(n, e) { + var t, i, r, c, o, f; + if (!n.tb) { + for (c = (!n.rb && (n.rb = new Z0(n, Qo, n)), n.rb), f = new s2(c.i), r = new ie(c); r.e != r.i.gc(); ) + i = u(oe(r), 138), o = i.ne(), t = u(o == null ? Rc(f.f, null, i) : zd(f.g, o, i), 138), t && (o == null ? Rc(f.f, null, t) : zd(f.g, o, t)); + n.tb = f; + } + return u(mc(n.tb, e), 138); + } + function R7(n, e) { + var t, i, r, c, o; + if ((n.i == null && Lf(n), n.i).length, !n.p) { + for (o = new s2((3 * n.g.i / 2 | 0) + 1), r = new w2(n.g); r.e != r.i.gc(); ) + i = u(UF(r), 170), c = i.ne(), t = u(c == null ? Rc(o.f, null, i) : zd(o.g, c, i), 170), t && (c == null ? Rc(o.f, null, t) : zd(o.g, c, t)); + n.p = o; + } + return u(mc(n.p, e), 170); + } + function UY(n, e, t, i, r) { + var c, o, f, h, l; + for (tpe(i + YD(t, t.$d()), r), ZCn(e, S2e(t)), c = t.f, c && UY(n, e, c, "Caused by: ", !1), f = (t.k == null && (t.k = F(hR, q, 78, 0, 0, 1)), t.k), h = 0, l = f.length; h < l; ++h) + o = f[h], UY(n, e, o, "Suppressed: ", !1); + console.groupEnd != null && console.groupEnd.call(console); + } + function _7(n, e, t, i) { + var r, c, o, f, h; + for (h = e.e, f = h.length, o = e.q._f(h, t ? 0 : f - 1, t), r = h[t ? 0 : f - 1], o = o | wBn(n, r, t, i), c = t ? 1 : f - 2; t ? c < f : c >= 0; c += t ? 1 : -1) + o = o | e.c.Sf(h, c, t, i && !on(sn(k(e.j, (G(), m0)))) && !on(sn(k(e.j, (G(), Pg))))), o = o | e.q._f(h, c, t), o = o | wBn(n, h[c], t, i); + return ci(n.c, e), o; + } + function fM(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (a = bAn(n.j), d = 0, g = a.length; d < g; ++d) { + if (l = a[d], t == (sr(), Au) || t == Bm) + for (h = xf(l.g), r = h, c = 0, o = r.length; c < o; ++c) + i = r[c], I5e(e, i) && t0(i, !0); + if (t == Lc || t == Bm) + for (f = xf(l.e), r = f, c = 0, o = r.length; c < o; ++c) + i = r[c], P5e(e, i) && t0(i, !0); + } + } + function k8e(n) { + var e, t; + switch (e = null, t = null, q4e(n).g) { + case 1: + e = (J(), Vn), t = Gn; + break; + case 2: + e = (J(), ae), t = Kn; + break; + case 3: + e = (J(), Gn), t = Vn; + break; + case 4: + e = (J(), Kn), t = ae; + } + lq(n, u(jd(HE(u(ct(n.k, e), 15).Oc(), jg)), 113)), hq(n, u(jd(KE(u(ct(n.k, t), 15).Oc(), jg)), 113)); + } + function y8e(n) { + var e, t, i, r, c, o; + if (r = u(un(n.j, 0), 11), r.e.c.length + r.g.c.length == 0) + n.n.a = 0; + else { + for (o = 0, i = ul(of(A(M(gf, 1), rn, 20, 0, [new Hp(r), new n2(r)]))); Se(i); ) + t = u(ve(i), 11), o += t.i.n.a + t.n.a + t.a.a; + e = u(k(n, (nn(), C0)), 8), c = e ? e.a : 0, n.n.a = o / (r.e.c.length + r.g.c.length) - c; + } + } + function ONn(n, e) { + var t, i, r; + for (i = new E(e.a); i.a < i.c.c.length; ) + t = u(y(i), 221), yD(u(t.b, 65), ji(Qr(u(e.b, 65).c), u(e.b, 65).a)), r = XBn(u(e.b, 65).b, u(t.b, 65).b), r > 1 && (n.a = !0), Ffe(u(t.b, 65), st(Qr(u(e.b, 65).c), If(ji(Qr(u(t.b, 65).a), u(e.b, 65).a), r))), SMn(n, e), ONn(n, t); + } + function DNn(n) { + var e, t, i, r, c, o, f; + for (c = new E(n.a.a); c.a < c.c.c.length; ) + i = u(y(c), 189), i.e = 0, i.d.a.$b(); + for (r = new E(n.a.a); r.a < r.c.c.length; ) + for (i = u(y(r), 189), t = i.a.a.ec().Kc(); t.Ob(); ) + for (e = u(t.Pb(), 81), f = e.f.Kc(); f.Ob(); ) + o = u(f.Pb(), 81), o.d != i && (ci(i.d, o), ++o.d.e); + } + function j8e(n) { + var e, t, i, r, c, o, f, h; + for (h = n.j.c.length, t = 0, e = h, r = 2 * h, f = new E(n.j); f.a < f.c.c.length; ) + switch (o = u(y(f), 11), o.j.g) { + case 2: + case 4: + o.p = -1; + break; + case 1: + case 3: + i = o.e.c.length, c = o.g.c.length, i > 0 && c > 0 ? o.p = e++ : i > 0 ? o.p = t++ : c > 0 ? o.p = r++ : o.p = t++; + } + Pn(), wi(n.j, new d0n()); + } + function E8e(n) { + var e, t; + t = null, e = u(un(n.g, 0), 17); + do { + if (t = e.d.i, ai(t, (G(), Ys))) + return u(k(t, Ys), 11).i; + if (t.k != (Qn(), ii) && Se(new re(ue(ei(t).a.Kc(), new Mn())))) + e = u(ve(new re(ue(ei(t).a.Kc(), new Mn()))), 17); + else if (t.k != ii) + return null; + } while (t && t.k != (Qn(), ii)); + return t; + } + function C8e(n, e) { + var t, i, r, c, o, f, h, l, a; + for (f = e.j, o = e.g, h = u(un(f, f.c.length - 1), 113), a = (Ln(0, f.c.length), u(f.c[0], 113)), l = sx(n, o, h, a), c = 1; c < f.c.length; c++) + t = (Ln(c - 1, f.c.length), u(f.c[c - 1], 113)), r = (Ln(c, f.c.length), u(f.c[c], 113)), i = sx(n, o, t, r), i > l && (h = t, a = r, l = i); + e.a = a, e.c = h; + } + function T8e(n, e) { + var t, i; + if (i = k8(n.b, e.b), !i) + throw T(new $r("Invalid hitboxes for scanline constraint calculation.")); + (ROn(e.b, u(Tue(n.b, e.b), 57)) || ROn(e.b, u(Cue(n.b, e.b), 57))) && (Zf(), e.b + ""), n.a[e.b.f] = u(rD(n.b, e.b), 57), t = u(iD(n.b, e.b), 57), t && (n.a[t.f] = e.b); + } + function jo(n) { + if (!n.a.d || !n.a.e) + throw T(new $r((Ph(Wzn), Wzn.k + " must have a source and target " + (Ph(grn), grn.k) + " specified."))); + if (n.a.d == n.a.e) + throw T(new $r("Network simplex does not support self-loops: " + n.a + " " + n.a.d + " " + n.a.e)); + return bE(n.a.d.g, n.a), bE(n.a.e.b, n.a), n.a; + } + function M8e(n, e, t) { + var i, r, c, o, f, h, l; + for (l = new Y1(new g6n(n)), o = A(M(FWn, 1), UKn, 11, 0, [e, t]), f = 0, h = o.length; f < h; ++f) + for (c = o[f], bT(l.a, c, (qn(), Ga)) == null, r = new uf(c.b); Kr(r.a) || Kr(r.b); ) + i = u(Kr(r.a) ? y(r.a) : y(r.b), 17), i.c == i.d || k8(l, c == i.c ? i.d : i.c); + return pe(l), new au(l); + } + function $Nn(n, e, t) { + var i, r, c, o, f, h; + if (i = 0, e.b != 0 && t.b != 0) { + c = _e(e, 0), o = _e(t, 0), f = K(Y(Re(c))), h = K(Y(Re(o))), r = !0; + do { + if (f > h - n.b && f < h + n.b) + return -1; + f > h - n.a && f < h + n.a && ++i, f <= h && c.b != c.d.c ? f = K(Y(Re(c))) : h <= f && o.b != o.d.c ? h = K(Y(Re(o))) : r = !1; + } while (r); + } + return i; + } + function A8e(n, e, t, i, r) { + var c, o, f, h; + for (h = (c = u(xo(Yi), 9), new ks(c, u(bo(c, c.length), 9), 0)), f = new E(n.j); f.a < f.c.c.length; ) + o = u(y(f), 11), e[o.p] && (_Ce(o, e[o.p], i), ko(h, o.j)); + r ? (gx(n, e, (J(), Vn), 2 * t, i), gx(n, e, Gn, 2 * t, i)) : (gx(n, e, (J(), Kn), 2 * t, i), gx(n, e, ae, 2 * t, i)); + } + function S8e(n) { + var e, t, i, r, c; + if (c = new X(), Yc(n.b, new Yvn(c)), n.b.c = F(Zn, rn, 1, 0, 5, 1), c.c.length != 0) { + for (e = (Ln(0, c.c.length), u(c.c[0], 78)), t = 1, i = c.c.length; t < i; ++t) + r = (Ln(t, c.c.length), u(c.c[t], 78)), r != e && _ve(e, r); + if (I(e, 60)) + throw T(u(e, 60)); + if (I(e, 289)) + throw T(u(e, 289)); + } + } + function P8e(n, e) { + var t, i, r, c; + for (n = n == null ? iu : (_n(n), n), t = new _0(), c = 0, i = 0; i < e.length && (r = n.indexOf("%s", c), r != -1); ) + De(t, n.substr(c, r - c)), rc(t, e[i++]), c = r + 2; + if (De(t, n.substr(c)), i < e.length) { + for (t.a += " [", rc(t, e[i++]); i < e.length; ) + t.a += Qi, rc(t, e[i++]); + t.a += "]"; + } + return t.a; + } + function I8e(n) { + var e, t, i, r; + for (e = 0, i = n.length, r = i - 4, t = 0; t < r; ) + e = (Te(t + 3, n.length), n.charCodeAt(t + 3) + (Te(t + 2, n.length), 31 * (n.charCodeAt(t + 2) + (Te(t + 1, n.length), 31 * (n.charCodeAt(t + 1) + (Te(t, n.length), 31 * (n.charCodeAt(t) + 31 * e))))))), e = e | 0, t += 4; + for (; t < i; ) + e = e * 31 + Di(n, t++); + return e = e | 0, e; + } + function O8e(n) { + var e, t; + for (t = new re(ue(ei(n).a.Kc(), new Mn())); Se(t); ) + if (e = u(ve(t), 17), e.d.i.k != (Qn(), Ju)) + throw T(new pw(SN + E7(n) + "' has its layer constraint set to LAST, but has at least one outgoing edge that does not go to a LAST_SEPARATE node. That must not happen.")); + } + function D8e(n, e, t, i) { + var r, c, o, f, h, l, a, d, g; + for (h = 0, a = new E(n.a); a.a < a.c.c.length; ) { + for (l = u(y(a), 10), f = 0, c = new re(ue(Lr(l).a.Kc(), new Mn())); Se(c); ) + r = u(ve(c), 17), d = tf(r.c).b, g = tf(r.d).b, f = j.Math.max(f, j.Math.abs(g - d)); + h = j.Math.max(h, f); + } + return o = i * j.Math.min(1, e / t) * h, o; + } + function WY(n) { + var e; + return e = new zv(), n & 256 && (e.a += "F"), n & 128 && (e.a += "H"), n & 512 && (e.a += "X"), n & 2 && (e.a += "i"), n & 8 && (e.a += "m"), n & 4 && (e.a += "s"), n & 32 && (e.a += "u"), n & 64 && (e.a += "w"), n & 16 && (e.a += "x"), n & Eo && (e.a += ","), hG(e.a); + } + function $8e(n, e) { + var t, i, r, c; + for (le(e, "Resize child graph to fit parent.", 1), i = new E(n.b); i.a < i.c.c.length; ) + t = u(y(i), 29), Zt(n.a, t.a), t.a.c = F(Zn, rn, 1, 0, 5, 1); + for (c = new E(n.a); c.a < c.c.c.length; ) + r = u(y(c), 10), jr(r, null); + n.b.c = F(Zn, rn, 1, 0, 5, 1), t7e(n), n.e && Hke(n.e, n), ce(e); + } + function F8e(n) { + var e, t, i, r, c, o, f, h, l; + if (i = n.b, c = i.e, o = p2(u(k(i, (nn(), Bt)), 98)), t = !!c && u(k(c, (G(), Ac)), 21).Hc((fr(), $s)), !(o || t)) + for (l = (f = new Mh(n.e).a.vc().Kc(), new N0(f)); l.a.Ob(); ) + h = (e = u(l.a.Pb(), 42), u(e.dd(), 113)), h.a && (r = h.d, Hr(r, null), h.c = !0, n.a = !0); + } + function x8e(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p; + for (g = -1, p = 0, l = n, a = 0, d = l.length; a < d; ++a) { + for (h = l[a], c = h, o = 0, f = c.length; o < f; ++o) + for (r = c[o], e = new X7n(g == -1 ? n[0] : n[g], FFn(r)), t = 0; t < r.j.c.length; t++) + for (i = t + 1; i < r.j.c.length; i++) + MCn(e, u(un(r.j, t), 11), u(un(r.j, i), 11)) > 0 && ++p; + ++g; + } + return p; + } + function L8e(n, e) { + var t, i, r, c, o; + for (o = u(k(e, (n0(), Eon)), 425), c = _e(e.b, 0); c.b != c.d.c; ) + if (r = u(Re(c), 86), n.b[r.g] == 0) { + switch (o.g) { + case 0: + uFn(n, r); + break; + case 1: + Bme(n, r); + } + n.b[r.g] = 2; + } + for (i = _e(n.a, 0); i.b != i.d.c; ) + t = u(Re(i), 188), bb(t.b.d, t, !0), bb(t.c.b, t, !0); + H(e, (cc(), gon), n.a); + } + function _c(n, e) { + er(); + var t, i, r, c; + return e ? e == (ht(), Cee) || (e == aee || e == cd || e == lee) && n != $1n ? new BZ(n, e) : (i = u(e, 677), t = i.pk(), t || (p3(Er((wu(), xi), e)), t = i.pk()), c = (!t.i && (t.i = new we()), t.i), r = u(Vr(Sr(c.f, n)), 1942), !r && it(c, n, r = new BZ(n, e)), r) : oee; + } + function N8e(n, e) { + var t, i, r, c, o, f, h, l, a; + for (h = u(k(n, (G(), rt)), 11), l = Gr(A(M(di, 1), q, 8, 0, [h.i.n, h.n, h.a])).a, a = n.i.n.b, t = xf(n.e), r = t, c = 0, o = r.length; c < o; ++c) + i = r[c], Ti(i, h), sa(i.a, new fn(l, a)), e && (f = u(k(i, (nn(), Mr)), 74), f || (f = new fu(), H(i, Mr, f)), Ke(f, new fn(l, a))); + } + function B8e(n, e) { + var t, i, r, c, o, f, h, l, a; + for (r = u(k(n, (G(), rt)), 11), l = Gr(A(M(di, 1), q, 8, 0, [r.i.n, r.n, r.a])).a, a = n.i.n.b, t = xf(n.g), o = t, f = 0, h = o.length; f < h; ++f) + c = o[f], Ki(c, r), _kn(c.a, new fn(l, a)), e && (i = u(k(c, (nn(), Mr)), 74), i || (i = new fu(), H(c, Mr, i)), Ke(i, new fn(l, a))); + } + function R8e(n, e) { + var t, i, r, c, o, f; + for (n.b = new X(), n.d = u(k(e, (G(), vp)), 230), n.e = Vle(n.d), c = new Tt(), r = cf(A(M(OWn, 1), GKn, 37, 0, [e])), o = 0; o < r.c.length; ) + i = (Ln(o, r.c.length), u(r.c[o], 37)), i.p = o++, t = new URn(i, n.a, n.b), Zt(r, t.b), W(n.b, t), t.s && (f = _e(c, 0), y8(f, t)); + return n.c = new hi(), c; + } + function _8e(n, e) { + var t, i, r, c, o, f; + for (o = u(u(ct(n.r, e), 21), 84).Kc(); o.Ob(); ) + c = u(o.Pb(), 111), t = c.c ? nW(c.c) : 0, t > 0 ? c.a ? (f = c.b.rf().a, t > f && (r = (t - f) / 2, c.d.b = r, c.d.c = r)) : c.d.c = n.s + t : D5(n.u) && (i = HJ(c.b), i.c < 0 && (c.d.b = -i.c), i.c + i.b > c.b.rf().a && (c.d.c = i.c + i.b - c.b.rf().a)); + } + function K8e(n, e) { + var t, i, r, c; + for (le(e, "Semi-Interactive Crossing Minimization Processor", 1), t = !1, r = new E(n.b); r.a < r.c.c.length; ) + i = u(y(r), 29), c = d7(qC(pt(pt(new $n(null, new xn(i.a, 16)), new V0n()), new Q0n()), new J0n()), new Y0n()), t = t | c.a != null; + t && H(n, (G(), wun), (qn(), !0)), ce(e); + } + function H8e(n, e, t) { + var i, r, c, o, f; + if (r = t, !r && (r = new Gp()), le(r, "Layout", n.a.c.length), on(sn(k(e, (n0(), kon))))) + for (Zf(), i = 0; i < n.a.c.length; i++) + f = (i < 10 ? "0" : "") + i++, "" + f + J1(Du(u(un(n.a, i), 51))); + for (o = new E(n.a); o.a < o.c.c.length; ) + c = u(y(o), 51), c.pf(e, yc(r, 1)); + ce(r); + } + function q8e(n) { + var e, t; + if (e = u(n.a, 19).a, t = u(n.b, 19).a, e >= 0) { + if (e == t) + return new Pi(Q(-e - 1), Q(-e - 1)); + if (e == -t) + return new Pi(Q(-e), Q(t + 1)); + } + return j.Math.abs(e) > j.Math.abs(t) ? e < 0 ? new Pi(Q(-e), Q(t)) : new Pi(Q(-e), Q(t + 1)) : new Pi(Q(e + 1), Q(t)); + } + function G8e(n) { + var e, t; + t = u(k(n, (nn(), Hc)), 163), e = u(k(n, (G(), Ua)), 303), t == (Ss(), xl) ? (H(n, Hc, Qk), H(n, Ua, (Nh(), Ag))) : t == Wb ? (H(n, Hc, Qk), H(n, Ua, (Nh(), dp))) : e == (Nh(), Ag) ? (H(n, Hc, xl), H(n, Ua, zk)) : e == dp && (H(n, Hc, Wb), H(n, Ua, zk)); + } + function hM() { + hM = N, cy = new ngn(), $Jn = Ze(new li(), (Vi(), Kc), (rr(), lS)), LJn = ju(Ze(new li(), Kc, mS), Or, vS), NJn = Vd(Vd(Dj(ju(Ze(new li(), Vf, ES), Or, jS), Tc), yS), CS), FJn = ju(Ze(Ze(Ze(new li(), $l, dS), Tc, wS), Tc, Q4), Or, bS), xJn = ju(Ze(Ze(new li(), Tc, Q4), Tc, hS), Or, fS); + } + function C6() { + C6 = N, _Jn = Ze(ju(new li(), (Vi(), Or), (rr(), acn)), Kc, lS), GJn = Vd(Vd(Dj(ju(Ze(new li(), Vf, ES), Or, jS), Tc), yS), CS), KJn = ju(Ze(Ze(Ze(new li(), $l, dS), Tc, wS), Tc, Q4), Or, bS), qJn = Ze(Ze(new li(), Kc, mS), Or, vS), HJn = ju(Ze(Ze(new li(), Tc, Q4), Tc, hS), Or, fS); + } + function z8e(n, e, t, i, r) { + var c, o; + (!Wi(e) && e.c.i.c == e.d.i.c || !WIn(Gr(A(M(di, 1), q, 8, 0, [r.i.n, r.n, r.a])), t)) && !Wi(e) && (e.c == r ? u3(e.a, 0, new kr(t)) : Ke(e.a, new kr(t)), i && !Ah(n.a, t) && (o = u(k(e, (nn(), Mr)), 74), o || (o = new fu(), H(e, Mr, o)), c = new kr(t), Ht(o, c, o.c.b, o.c), ci(n.a, c))); + } + function U8e(n) { + var e, t; + for (t = new re(ue(Lr(n).a.Kc(), new Mn())); Se(t); ) + if (e = u(ve(t), 17), e.c.i.k != (Qn(), Ju)) + throw T(new pw(SN + E7(n) + "' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen.")); + } + function W8e(n, e, t) { + var i, r, c, o, f, h, l; + if (r = JDn(n.Db & 254), r == 0) + n.Eb = t; + else { + if (r == 1) + f = F(Zn, rn, 1, 2, 5, 1), c = ux(n, e), c == 0 ? (f[0] = t, f[1] = n.Eb) : (f[0] = n.Eb, f[1] = t); + else + for (f = F(Zn, rn, 1, r + 1, 5, 1), o = va(n.Eb), i = 2, h = 0, l = 0; i <= 128; i <<= 1) + i == e ? f[l++] = t : n.Db & i && (f[l++] = o[h++]); + n.Eb = f; + } + n.Db |= e; + } + function FNn(n, e, t) { + var i, r, c, o; + for (this.b = new X(), r = 0, i = 0, o = new E(n); o.a < o.c.c.length; ) + c = u(y(o), 167), t && Uye(c), W(this.b, c), r += c.o, i += c.p; + this.b.c.length > 0 && (c = u(un(this.b, 0), 167), r += c.o, i += c.p), r *= 2, i *= 2, e > 1 ? r = Gt(j.Math.ceil(r * e)) : i = Gt(j.Math.ceil(i / e)), this.a = new xQ(r, i); + } + function xNn(n, e, t, i, r, c) { + var o, f, h, l, a, d, g, p, v, m, C, S; + for (a = i, e.j && e.o ? (p = u(te(n.f, e.A), 57), m = p.d.c + p.d.b, --a) : m = e.a.c + e.a.b, d = r, t.q && t.o ? (p = u(te(n.f, t.C), 57), l = p.d.c, ++d) : l = t.a.c, C = l - m, h = j.Math.max(2, d - a), f = C / h, v = m + f, g = a; g < d; ++g) + o = u(c.Xb(g), 128), S = o.a.b, o.a.c = v - S / 2, v += f; + } + function XY(n, e, t, i, r, c) { + var o, f, h, l, a, d; + for (l = t.c.length, c && (n.c = F(be, Le, 25, e.length, 15, 1)), o = r ? 0 : e.length - 1; r ? o < e.length : o >= 0; o += r ? 1 : -1) { + for (f = e[o], h = i == (J(), Vn) ? r ? zr(f, i) : ma(zr(f, i)) : r ? ma(zr(f, i)) : zr(f, i), c && (n.c[f.p] = h.gc()), d = h.Kc(); d.Ob(); ) + a = u(d.Pb(), 11), n.d[a.p] = l++; + Zt(t, h); + } + } + function LNn(n, e, t) { + var i, r, c, o, f, h, l, a; + for (c = K(Y(n.b.Kc().Pb())), l = K(Y(twe(e.b))), i = If(Qr(n.a), l - t), r = If(Qr(e.a), t - c), a = st(i, r), If(a, 1 / (l - c)), this.a = a, this.b = new X(), f = !0, o = n.b.Kc(), o.Pb(); o.Ob(); ) + h = K(Y(o.Pb())), f && h - t > oB && (this.b.Fc(t), f = !1), this.b.Fc(h); + f && this.b.Fc(t); + } + function X8e(n) { + var e, t, i, r; + if (cke(n, n.n), n.d.c.length > 0) { + for (qv(n.c); AY(n, u(y(new E(n.e.a)), 121)) < n.e.a.c.length; ) { + for (e = R3e(n), r = e.e.e - e.d.e - e.a, e.e.j && (r = -r), i = new E(n.e.a); i.a < i.c.c.length; ) + t = u(y(i), 121), t.j && (t.e += r); + qv(n.c); + } + qv(n.c), gY(n, u(y(new E(n.e.a)), 121)), qRn(n); + } + } + function V8e(n, e) { + var t, i, r, c, o; + for (r = u(ct(n.a, (Vw(), SS)), 15).Kc(); r.Ob(); ) + switch (i = u(r.Pb(), 101), t = u(un(i.j, 0), 113).d.j, c = new au(i.j), wi(c, new Qbn()), e.g) { + case 1: + wx(n, c, t, (Hd(), Fl), 1); + break; + case 0: + o = W9e(c), wx(n, new ch(c, 0, o), t, (Hd(), Fl), 0), wx(n, new ch(c, o, c.c.length), t, Fl, 1); + } + } + function Q8e(n, e) { + L2(); + var t, i; + if (t = j$(L3(), e.tg()), t) { + if (i = t.j, I(n, 239)) + return ile(u(n, 33)) ? lu(i, (Ho(), vi)) || lu(i, Xn) : lu(i, (Ho(), vi)); + if (I(n, 352)) + return lu(i, (Ho(), Yf)); + if (I(n, 186)) + return lu(i, (Ho(), Za)); + if (I(n, 354)) + return lu(i, (Ho(), $1)); + } + return !0; + } + function J8e(n, e, t) { + var i, r, c, o, f, h; + if (r = t, c = r.ak(), zh(n.e, c)) { + if (c.hi()) { + for (i = u(n.g, 119), o = 0; o < n.i; ++o) + if (f = i[o], tt(f, r) && o != e) + throw T(new Hn(yk)); + } + } else + for (h = _c(n.e.Tg(), c), i = u(n.g, 119), o = 0; o < n.i; ++o) + if (f = i[o], h.rl(f.ak()) && o != e) + throw T(new Hn(Mk)); + return u(Gw(n, e, t), 72); + } + function NNn(n, e) { + if (e instanceof Object) + try { + if (e.__java$exception = n, navigator.userAgent.toLowerCase().indexOf("msie") != -1 && $doc.documentMode < 9) + return; + var t = n; + Object.defineProperties(e, { cause: { get: function() { + var i = t.Zd(); + return i && i.Xd(); + } }, suppressed: { get: function() { + return t.Yd(); + } } }); + } catch { + } + } + function BNn(n, e) { + var t, i, r, c, o; + if (i = e >> 5, e &= 31, i >= n.d) + return n.e < 0 ? (jl(), gR) : (jl(), U4); + if (c = n.d - i, r = F(be, Le, 25, c + 1, 15, 1), K5e(r, c, n.a, i, e), n.e < 0) { + for (t = 0; t < i && n.a[t] == 0; t++) + ; + if (t < i || e > 0 && n.a[t] << 32 - e) { + for (t = 0; t < c && r[t] == -1; t++) + r[t] = 0; + t == c && ++c, ++r[t]; + } + } + return o = new Pw(n.e, c, r), K5(o), o; + } + function RNn(n) { + var e, t, i, r; + return r = nf(n), t = new c5n(r), i = new u5n(r), e = new X(), Zt(e, (!n.d && (n.d = new Fn(bi, n, 8, 5)), n.d)), Zt(e, (!n.e && (n.e = new Fn(bi, n, 7, 4)), n.e)), u(ts(Xc(pt(new $n(null, new xn(e, 16)), t), i), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [(hf(), _b), ls]))), 21); + } + function _Nn(n, e, t, i) { + var r, c, o, f, h; + if (f = (er(), u(e, 66).Oj()), zh(n.e, e)) { + if (e.hi() && vM(n, e, i, I(e, 99) && (u(e, 18).Bb & Ji) != 0)) + throw T(new Hn(yk)); + } else + for (h = _c(n.e.Tg(), e), r = u(n.g, 119), o = 0; o < n.i; ++o) + if (c = r[o], h.rl(c.ak())) + throw T(new Hn(Mk)); + s6(n, iY(n, e, t), f ? u(i, 72) : uh(e, i)); + } + function zh(n, e) { + er(); + var t, i, r; + return e.$j() ? !0 : e.Zj() == -2 ? e == (z2(), Dp) || e == Op || e == kH || e == yH ? !0 : (r = n.Tg(), jt(r, e) >= 0 ? !1 : (t = rg((wu(), xi), r, e), t ? (i = t.Zj(), (i > 1 || i == -1) && Pd(Er(xi, t)) != 3) : !0)) : !1; + } + function Y8e(n, e, t, i) { + var r, c, o, f, h; + return f = Ir(u(D((!e.b && (e.b = new Fn(he, e, 4, 7)), e.b), 0), 82)), h = Ir(u(D((!e.c && (e.c = new Fn(he, e, 5, 8)), e.c), 0), 82)), Pt(f) == Pt(h) || fb(h, f) ? null : (o = S8(e), o == t ? i : (c = u(te(n.a, o), 10), c && (r = c.e, r) ? r : null)); + } + function Z8e(n, e) { + var t; + switch (t = u(k(n, (nn(), JS)), 276), le(e, "Label side selection (" + t + ")", 1), t.g) { + case 0: + nNn(n, (us(), kh)); + break; + case 1: + nNn(n, (us(), Kl)); + break; + case 2: + wRn(n, (us(), kh)); + break; + case 3: + wRn(n, (us(), Kl)); + break; + case 4: + QNn(n, (us(), kh)); + break; + case 5: + QNn(n, (us(), Kl)); + } + ce(e); + } + function VY(n, e, t) { + var i, r, c, o, f, h; + if (i = Bie(t, n.length), o = n[i], o[0].k == (Qn(), Xt)) + for (c = n8n(t, o.length), h = e.j, r = 0; r < h.c.length; r++) + f = (Ln(r, h.c.length), u(h.c[r], 11)), (t ? f.j == (J(), Vn) : f.j == (J(), Gn)) && on(sn(k(f, (G(), Wk)))) && (Es(h, r, u(k(o[c], (G(), rt)), 11)), c += t ? 1 : -1); + } + function n7e(n, e) { + var t, i, r, c, o; + o = new X(), t = e; + do + c = u(te(n.b, t), 128), c.B = t.c, c.D = t.d, o.c[o.c.length] = c, t = u(te(n.k, t), 17); + while (t); + return i = (Ln(0, o.c.length), u(o.c[0], 128)), i.j = !0, i.A = u(i.d.a.ec().Kc().Pb(), 17).c.i, r = u(un(o, o.c.length - 1), 128), r.q = !0, r.C = u(r.d.a.ec().Kc().Pb(), 17).d.i, o; + } + function KNn(n) { + if (n.g == null) + switch (n.p) { + case 0: + n.g = rle(n) ? (qn(), G4) : (qn(), Ga); + break; + case 1: + n.g = X8(Bae(n)); + break; + case 2: + n.g = i7(zle(n)); + break; + case 3: + n.g = She(n); + break; + case 4: + n.g = new S9(Ahe(n)); + break; + case 6: + n.g = Aa(Phe(n)); + break; + case 5: + n.g = Q(W1e(n)); + break; + case 7: + n.g = Q3(Kae(n)); + } + return n.g; + } + function QY(n) { + if (n.n == null) + switch (n.p) { + case 0: + n.n = cle(n) ? (qn(), G4) : (qn(), Ga); + break; + case 1: + n.n = X8(Rae(n)); + break; + case 2: + n.n = i7(Ule(n)); + break; + case 3: + n.n = Ohe(n); + break; + case 4: + n.n = new S9(Dhe(n)); + break; + case 6: + n.n = Aa(Ihe(n)); + break; + case 5: + n.n = Q(X1e(n)); + break; + case 7: + n.n = Q3(_ae(n)); + } + return n.n; + } + function HNn(n) { + var e, t, i, r, c, o, f; + for (c = new E(n.a.a); c.a < c.c.c.length; ) + i = u(y(c), 307), i.g = 0, i.i = 0, i.e.a.$b(); + for (r = new E(n.a.a); r.a < r.c.c.length; ) + for (i = u(y(r), 307), t = i.a.a.ec().Kc(); t.Ob(); ) + for (e = u(t.Pb(), 57), f = e.c.Kc(); f.Ob(); ) + o = u(f.Pb(), 57), o.a != i && (ci(i.e, o), ++o.a.g, ++o.a.i); + } + function e7e(n, e) { + var t, i, r, c, o, f; + if (f = k8(n.a, e.b), !f) + throw T(new $r("Invalid hitboxes for scanline overlap calculation.")); + for (o = !1, c = (i = new T5(new j5(new P9(n.a.a).a).b), new I9(i)); G9(c.a.a); ) + if (r = (t = pE(c.a), u(t.cd(), 65)), mwe(e.b, r)) + qie(n.b.a, e.b, r), o = !0; + else if (o) + break; + } + function t7e(n) { + var e, t, i, r, c; + r = u(k(n, (nn(), Va)), 21), c = u(k(n, iP), 21), t = new fn(n.f.a + n.d.b + n.d.c, n.f.b + n.d.d + n.d.a), e = new kr(t), r.Hc((Qu(), sw)) && (i = u(k(n, hv), 8), c.Hc((xu(), Tv)) && (i.a <= 0 && (i.a = 20), i.b <= 0 && (i.b = 20)), e.a = j.Math.max(t.a, i.a), e.b = j.Math.max(t.b, i.b)), Vye(n, t, e); + } + function qNn(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + r = e ? new bwn() : new wwn(), c = !1; + do + for (c = !1, l = e ? ma(n.b) : n.b, h = l.Kc(); h.Ob(); ) + for (f = u(h.Pb(), 29), g = $d(f.a), e || new od(g), d = new E(g); d.a < d.c.c.length; ) + a = u(y(d), 10), r.Mb(a) && (i = a, t = u(k(a, (G(), v0)), 305), o = e ? t.b : t.k, c = hBn(i, o, e, !1)); + while (c); + } + function i7e(n, e, t) { + var i, r, c, o, f; + for (le(t, "Longest path layering", 1), n.a = e, f = n.a.a, n.b = F(be, Le, 25, f.c.length, 15, 1), i = 0, o = new E(f); o.a < o.c.c.length; ) + r = u(y(o), 10), r.p = i, n.b[i] = -1, ++i; + for (c = new E(f); c.a < c.c.c.length; ) + r = u(y(c), 10), lNn(n, r); + f.c = F(Zn, rn, 1, 0, 5, 1), n.a = null, n.b = null, ce(t); + } + function r7e(n, e) { + var t, i, r; + e.a ? (k8(n.b, e.b), n.a[e.b.i] = u(rD(n.b, e.b), 81), t = u(iD(n.b, e.b), 81), t && (n.a[t.i] = e.b)) : (i = u(rD(n.b, e.b), 81), i && i == n.a[e.b.i] && i.d && i.d != e.b.d && i.f.Fc(e.b), r = u(iD(n.b, e.b), 81), r && n.a[r.i] == e.b && r.d && r.d != e.b.d && e.b.f.Fc(r), zO(n.b, e.b)); + } + function GNn(n, e) { + var t, i, r, c, o, f; + return c = n.d, f = K(Y(k(n, (nn(), P1)))), f < 0 && (f = 0, H(n, P1, f)), e.o.b = f, o = j.Math.floor(f / 2), i = new gc(), si(i, (J(), Gn)), Hr(i, e), i.n.b = o, r = new gc(), si(r, Vn), Hr(r, e), r.n.b = o, Ti(n, i), t = new Id(), Pr(t, n), H(t, Mr, null), Ki(t, r), Ti(t, c), hye(e, n, t), d6e(n, t), t; + } + function c7e(n) { + var e, t; + return t = u(k(n, (G(), Ac)), 21), e = new li(), t.Hc((fr(), Tm)) && (cs(e, PJn), cs(e, bon)), (t.Hc(sv) || on(sn(k(n, (nn(), R_))))) && (cs(e, bon), t.Hc(Mg) && cs(e, OJn)), t.Hc($s) && cs(e, SJn), t.Hc(Mm) && cs(e, DJn), t.Hc(BS) && cs(e, IJn), t.Hc(cv) && cs(e, MJn), t.Hc(uv) && cs(e, AJn), e; + } + function u7e(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + return i = n.d, c = e.d, f = i + c, h = n.e != e.e ? -1 : 1, f == 2 ? (a = Ni(ui(n.a[0], hr), ui(e.a[0], hr)), g = ge(a), d = ge(Y0(a, 32)), d == 0 ? new a1(h, g) : new Pw(h, 2, A(M(be, 1), Le, 25, 15, [g, d]))) : (t = n.a, r = e.a, o = F(be, Le, 25, f, 15, 1), jge(t, i, r, c, o), l = new Pw(h, f, o), K5(l), l); + } + function zNn(n, e, t, i) { + var r, c; + if (e) { + if (r = n.a.ue(t.d, e.d), r == 0) + return i.d = gU(e, t.e), i.b = !0, e; + c = r < 0 ? 0 : 1, e.a[c] = zNn(n, e.a[c], t, i), R0(e.a[c]) && (R0(e.a[1 - c]) ? (e.b = !0, e.a[0].b = !1, e.a[1].b = !1) : R0(e.a[c].a[c]) ? e = eT(e, 1 - c) : R0(e.a[c].a[1 - c]) && (e = sAn(e, 1 - c))); + } else + return t; + return e; + } + function UNn(n, e, t) { + var i, r, c, o; + r = n.i, i = n.n, SX(n, (_o(), Zr), r.c + i.b, t), SX(n, nc, r.c + r.b - i.c - t[2], t), o = r.b - i.b - i.c, t[0] > 0 && (t[0] += n.d, o -= t[0]), t[2] > 0 && (t[2] += n.d, o -= t[2]), c = j.Math.max(0, o), t[1] = j.Math.max(t[1], o), SX(n, xc, r.c + i.b + t[0] - (t[1] - o) / 2, t), e == xc && (n.c.b = c, n.c.c = r.c + i.b + (c - o) / 2); + } + function WNn() { + this.c = F(Ci, vr, 25, (J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn])).length, 15, 1), this.b = F(Ci, vr, 25, A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn]).length, 15, 1), this.a = F(Ci, vr, 25, A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn]).length, 15, 1), BG(this.c, Lt), BG(this.b, Vt), BG(this.a, Vt); + } + function jc(n, e, t) { + var i, r, c, o; + if (e <= t ? (r = e, c = t) : (r = t, c = e), i = 0, n.b == null) + n.b = F(be, Le, 25, 2, 15, 1), n.b[0] = r, n.b[1] = c, n.c = !0; + else { + if (i = n.b.length, n.b[i - 1] + 1 == r) { + n.b[i - 1] = c; + return; + } + o = F(be, Le, 25, i + 2, 15, 1), pc(n.b, 0, o, 0, i), n.b = o, n.b[i - 1] >= r && (n.c = !1, n.a = !1), n.b[i++] = r, n.b[i] = c, n.c || Jw(n); + } + } + function s7e(n, e, t) { + var i, r, c, o, f, h, l; + for (l = e.d, n.a = new Ic(l.c.length), n.c = new we(), f = new E(l); f.a < f.c.c.length; ) + o = u(y(f), 101), c = new n7(null), W(n.a, c), it(n.c, o, c); + for (n.b = new we(), g6e(n, e), i = 0; i < l.c.length - 1; i++) + for (h = u(un(e.d, i), 101), r = i + 1; r < l.c.length; r++) + Q9e(n, h, u(un(e.d, r), 101), t); + } + function XNn(n, e, t) { + var i, r, c, o, f, h; + if (!j3(e)) { + for (h = yc(t, (I(e, 14) ? u(e, 14).gc() : Fh(e.Kc())) / n.a | 0), le(h, SHn, 1), f = new ygn(), o = 0, c = e.Kc(); c.Ob(); ) + i = u(c.Pb(), 86), f = of(A(M(gf, 1), rn, 20, 0, [f, new X1(i)])), o < i.f.b && (o = i.f.b); + for (r = e.Kc(); r.Ob(); ) + i = u(r.Pb(), 86), H(i, (cc(), kP), o); + ce(h), XNn(n, f, t); + } + } + function o7e(n, e) { + var t, i, r, c, o, f, h; + for (t = Vt, f = (Qn(), ii), r = new E(e.a); r.a < r.c.c.length; ) + i = u(y(r), 10), c = i.k, c != ii && (o = Y(k(i, (G(), pun))), o == null ? (t = j.Math.max(t, 0), i.n.b = t + Wz(n.a, c, f)) : i.n.b = (_n(o), o)), h = Wz(n.a, c, f), i.n.b < t + h + i.d.d && (i.n.b = t + h + i.d.d), t = i.n.b + i.o.b + i.d.a, f = c; + } + function f7e(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (c = ng(e, !1, !1), l = I7(c), d = K(Y(hn(e, (a6(), IR)))), r = L_n(l, d + n.a), a = new xx(r), Pr(a, e), it(n.b, e, a), t.c[t.c.length] = a, h = (!e.n && (e.n = new V(Rr, e, 1, 7)), e.n), f = new ie(h); f.e != f.i.gc(); ) + o = u(oe(f), 137), i = K7(n, o, !0, 0, 0), t.c[t.c.length] = i; + return a; + } + function VNn(n, e, t, i, r) { + var c, o, f, h, l, a; + if (n.d && n.d.lg(r), c = u(r.Xb(0), 33), tFn(n, t, c, !1) || (o = u(r.Xb(r.gc() - 1), 33), tFn(n, i, o, !0)) || XJ(n, r)) + return !0; + for (a = r.Kc(); a.Ob(); ) + for (l = u(a.Pb(), 33), h = e.Kc(); h.Ob(); ) + if (f = u(h.Pb(), 33), aM(n, l, f)) + return !0; + return !1; + } + function h7e(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + g = e.c.length, d = (l = n.Yg(t), u(l >= 0 ? n._g(l, !1, !0) : Zd(n, t, !1), 58)); + n: + for (c = d.Kc(); c.Ob(); ) { + for (r = u(c.Pb(), 56), a = 0; a < g; ++a) + if (o = (Ln(a, e.c.length), u(e.c[a], 72)), h = o.dd(), f = o.ak(), i = r.bh(f, !1), h == null ? i != null : !tt(h, i)) + continue n; + return r; + } + return null; + } + function l7e(n, e, t, i) { + var r, c, o, f; + for (r = u(y1(e, (J(), Gn)).Kc().Pb(), 11), c = u(y1(e, Vn).Kc().Pb(), 11), f = new E(n.j); f.a < f.c.c.length; ) { + for (o = u(y(f), 11); o.e.c.length != 0; ) + Ti(u(un(o.e, 0), 17), r); + for (; o.g.c.length != 0; ) + Ki(u(un(o.g, 0), 17), c); + } + t || H(e, (G(), Xo), null), i || H(e, (G(), Ys), null); + } + function ng(n, e, t) { + var i, r; + if ((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i == 0) + return xV(n); + if (i = u(D((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a), 0), 202), e && (de((!i.a && (i.a = new Yt(io, i, 5)), i.a)), D3(i, 0), F3(i, 0), O3(i, 0), $3(i, 0)), t) + for (r = (!n.a && (n.a = new V(Mt, n, 6, 6)), n.a); r.i > 1; ) + Cb(r, r.i - 1); + return i; + } + function a7e(n, e) { + var t, i, r, c, o, f, h; + for (le(e, "Comment post-processing", 1), c = new E(n.b); c.a < c.c.c.length; ) { + for (r = u(y(c), 29), i = new X(), f = new E(r.a); f.a < f.c.c.length; ) + o = u(y(f), 10), h = u(k(o, (G(), mp)), 15), t = u(k(o, bp), 15), (h || t) && (dCe(o, h, t), h && Zt(i, h), t && Zt(i, t)); + Zt(r.a, i); + } + ce(e); + } + function QNn(n, e) { + var t, i, r, c, o, f, h; + for (t = new gw(), c = new E(n.b); c.a < c.c.c.length; ) { + for (r = u(y(c), 29), h = !0, i = 0, f = new E(r.a); f.a < f.c.c.length; ) + switch (o = u(y(f), 10), o.k.g) { + case 4: + ++i; + case 1: + bX(t, o); + break; + case 0: + a6e(o, e); + default: + t.b == t.c || RBn(t, i, h, !1, e), h = !1, i = 0; + } + t.b == t.c || RBn(t, i, h, !0, e); + } + } + function d7e(n, e) { + var t, i, r, c, o, f, h; + for (r = new X(), t = 0; t <= n.i; t++) + i = new Rs(e), i.p = n.i - t, r.c[r.c.length] = i; + for (f = new E(n.o); f.a < f.c.c.length; ) + o = u(y(f), 10), jr(o, u(un(r, n.i - n.f[o.p]), 29)); + for (c = new E(r); c.a < c.c.c.length; ) + h = u(y(c), 29), h.a.c.length == 0 && F5(c); + e.b.c = F(Zn, rn, 1, 0, 5, 1), Zt(e.b, r); + } + function JY(n, e) { + var t, i, r, c, o, f; + for (t = 0, f = new E(e); f.a < f.c.c.length; ) { + for (o = u(y(f), 11), nQ(n.b, n.d[o.p]), r = new uf(o.b); Kr(r.a) || Kr(r.b); ) + i = u(Kr(r.a) ? y(r.a) : y(r.b), 17), c = MG(n, o == i.c ? i.d : i.c), c > n.d[o.p] && (t += jX(n.b, c), ll(n.a, Q(c))); + for (; !Hv(n.a); ) + ZX(n.b, u(y2(n.a), 19).a); + } + return t; + } + function JNn(n, e, t) { + var i, r, c, o; + for (c = (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a).i, r = new ie((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); r.e != r.i.gc(); ) + i = u(oe(r), 33), (!i.a && (i.a = new V(Ot, i, 10, 11)), i.a).i == 0 || (c += JNn(n, i, !1)); + if (t) + for (o = Pt(e); o; ) + c += (!o.a && (o.a = new V(Ot, o, 10, 11)), o.a).i, o = Pt(o); + return c; + } + function Cb(n, e) { + var t, i, r, c; + return n.ej() ? (i = null, r = n.fj(), n.ij() && (i = n.kj(n.pi(e), null)), t = n.Zi(4, c = H2(n, e), null, e, r), n.bj() && c != null && (i = n.dj(c, i)), i ? (i.Ei(t), i.Fi()) : n.$i(t), c) : (c = H2(n, e), n.bj() && c != null && (i = n.dj(c, null), i && i.Fi()), c); + } + function b7e(n) { + var e, t, i, r, c, o, f, h, l, a; + for (l = n.a, e = new hi(), h = 0, i = new E(n.d); i.a < i.c.c.length; ) { + for (t = u(y(i), 222), a = 0, Lw(t.b, new Hln()), o = _e(t.b, 0); o.b != o.d.c; ) + c = u(Re(o), 222), e.a._b(c) && (r = t.c, f = c.c, a < f.d + f.a + l && a + r.a + l > f.d && (a = f.d + f.a + l)); + t.c.d = a, e.a.zc(t, e), h = j.Math.max(h, t.c.d + t.c.a); + } + return h; + } + function fr() { + fr = N, NS = new q0("COMMENTS", 0), $s = new q0("EXTERNAL_PORTS", 1), Tm = new q0("HYPEREDGES", 2), BS = new q0("HYPERNODES", 3), sv = new q0("NON_FREE_PORTS", 4), Mg = new q0("NORTH_SOUTH_PORTS", 5), Mm = new q0(lHn, 6), cv = new q0("CENTER_LABELS", 7), uv = new q0("END_LABELS", 8), RS = new q0("PARTITIONS", 9); + } + function Tb(n) { + var e, t, i, r, c; + for (r = new X(), e = new S5((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)), i = new re(ue(Gh(n).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 79), I(D((!t.b && (t.b = new Fn(he, t, 4, 7)), t.b), 0), 186) || (c = Ir(u(D((!t.c && (t.c = new Fn(he, t, 5, 8)), t.c), 0), 82)), e.a._b(c) || (r.c[r.c.length] = c)); + return r; + } + function w7e(n) { + var e, t, i, r, c, o; + for (c = new hi(), e = new S5((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)), r = new re(ue(Gh(n).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 79), I(D((!i.b && (i.b = new Fn(he, i, 4, 7)), i.b), 0), 186) || (o = Ir(u(D((!i.c && (i.c = new Fn(he, i, 5, 8)), i.c), 0), 82)), e.a._b(o) || (t = c.a.zc(o, c), t == null)); + return c; + } + function g7e(n, e, t, i, r) { + return i < 0 ? (i = Qw(n, r, A(M(tn, 1), q, 2, 6, [IL, OL, DL, $L, V2, FL, xL, LL, NL, BL, RL, _L]), e), i < 0 && (i = Qw(n, r, A(M(tn, 1), q, 2, 6, ["Jan", "Feb", "Mar", "Apr", V2, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]), e)), i < 0 ? !1 : (t.k = i, !0)) : i > 0 ? (t.k = i - 1, !0) : !1; + } + function p7e(n, e, t, i, r) { + return i < 0 ? (i = Qw(n, r, A(M(tn, 1), q, 2, 6, [IL, OL, DL, $L, V2, FL, xL, LL, NL, BL, RL, _L]), e), i < 0 && (i = Qw(n, r, A(M(tn, 1), q, 2, 6, ["Jan", "Feb", "Mar", "Apr", V2, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]), e)), i < 0 ? !1 : (t.k = i, !0)) : i > 0 ? (t.k = i - 1, !0) : !1; + } + function v7e(n, e, t, i, r, c) { + var o, f, h, l; + if (f = 32, i < 0) { + if (e[0] >= n.length || (f = Di(n, e[0]), f != 43 && f != 45) || (++e[0], i = tM(n, e), i < 0)) + return !1; + f == 45 && (i = -i); + } + return f == 32 && e[0] - t == 2 && r.b == 2 && (h = new Tj(), l = h.q.getFullYear() - Tl + Tl - 80, o = l % 100, c.a = i == o, i += (l / 100 | 0) * 100 + (i < o ? 100 : 0)), c.p = i, !0; + } + function YNn(n, e) { + var t, i, r, c, o; + Pt(n) && (o = u(k(e, (nn(), Va)), 174), B(hn(n, Bt)) === B((Ai(), ql)) && pr(n, Bt, jf), i = (H0(), new B0(Pt(n))), c = new WO(Pt(n) ? new B0(Pt(n)) : null, n), r = o_n(i, c, !1, !0), ko(o, (Qu(), sw)), t = u(k(e, hv), 8), t.a = j.Math.max(r.a, t.a), t.b = j.Math.max(r.b, t.b)); + } + function m7e(n, e, t) { + var i, r, c, o, f, h; + for (o = u(k(n, (G(), C_)), 15).Kc(); o.Ob(); ) { + switch (c = u(o.Pb(), 10), u(k(c, (nn(), Hc)), 163).g) { + case 2: + jr(c, e); + break; + case 4: + jr(c, t); + } + for (r = new re(ue(Kh(c).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 17), !(i.c && i.d) && (f = !i.d, h = u(k(i, mun), 11), f ? Ti(i, h) : Ki(i, h)); + } + } + function lM() { + lM = N, n_ = new E2(NM, 0, (J(), Kn), Kn), i_ = new E2(aN, 1, ae, ae), ZR = new E2(lN, 2, Vn, Vn), u_ = new E2(dN, 3, Gn, Gn), t_ = new E2("NORTH_WEST_CORNER", 4, Gn, Kn), e_ = new E2("NORTH_EAST_CORNER", 5, Kn, Vn), c_ = new E2("SOUTH_WEST_CORNER", 6, ae, Gn), r_ = new E2("SOUTH_EAST_CORNER", 7, Vn, ae); + } + function eg() { + eg = N, Nfn = A(M(Yl, 1), QL, 25, 14, [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368e3, { l: 3506176, m: 794077, h: 1 }, { l: 884736, m: 916411, h: 20 }, { l: 3342336, m: 3912489, h: 363 }, { l: 589824, m: 3034138, h: 6914 }, { l: 3407872, m: 1962506, h: 138294 }]), j.Math.pow(2, -65); + } + function ZNn(n, e) { + var t, i, r, c, o; + if (n.c.length == 0) + return new Pi(Q(0), Q(0)); + for (t = (Ln(0, n.c.length), u(n.c[0], 11)).j, o = 0, c = e.g, i = e.g + 1; o < n.c.length - 1 && t.g < c; ) + ++o, t = (Ln(o, n.c.length), u(n.c[o], 11)).j; + for (r = o; r < n.c.length - 1 && t.g < i; ) + ++r, t = (Ln(o, n.c.length), u(n.c[o], 11)).j; + return new Pi(Q(o), Q(r)); + } + function k7e(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (c = e.c.length, o = (Ln(t, e.c.length), u(e.c[t], 286)), f = o.a.o.a, d = o.c, g = 0, l = o.c; l <= o.f; l++) { + if (f <= n.a[l]) + return l; + for (a = n.a[l], h = null, r = t + 1; r < c; r++) + i = (Ln(r, e.c.length), u(e.c[r], 286)), i.c <= l && i.f >= l && (h = i); + h && (a = j.Math.max(a, h.a.o.a)), a > g && (d = l, g = a); + } + return d; + } + function y7e(n, e, t) { + var i, r, c; + if (n.e = t, n.d = 0, n.b = 0, n.f = 1, n.i = e, (n.e & 16) == 16 && (n.i = ske(n.i)), n.j = n.i.length, Qe(n), c = Xd(n), n.d != n.j) + throw T(new Ee(Pe((je(), $qn)))); + if (n.g) { + for (i = 0; i < n.g.a.c.length; i++) + if (r = u(Ad(n.g, i), 584), n.f <= r.a) + throw T(new Ee(Pe((je(), Fqn)))); + n.g.a.c = F(Zn, rn, 1, 0, 5, 1); + } + return c; + } + function j7e(n, e) { + var t, i, r; + if (e == null) { + for (i = (!n.a && (n.a = new V(e1, n, 9, 5)), new ie(n.a)); i.e != i.i.gc(); ) + if (t = u(oe(i), 678), r = t.c, (r ?? t.zb) == null) + return t; + } else + for (i = (!n.a && (n.a = new V(e1, n, 9, 5)), new ie(n.a)); i.e != i.i.gc(); ) + if (t = u(oe(i), 678), An(e, (r = t.c, r ?? t.zb))) + return t; + return null; + } + function qx(n, e) { + var t; + switch (t = null, e.g) { + case 1: + n.e.Xe((Xe(), JK)) && (t = u(n.e.We(JK), 249)); + break; + case 3: + n.e.Xe((Xe(), YK)) && (t = u(n.e.We(YK), 249)); + break; + case 2: + n.e.Xe((Xe(), QK)) && (t = u(n.e.We(QK), 249)); + break; + case 4: + n.e.Xe((Xe(), ZK)) && (t = u(n.e.We(ZK), 249)); + } + return !t && (t = u(n.e.We((Xe(), bhn)), 249)), t; + } + function nBn(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (e.p = 1, c = e.c, d = Wd(e, (sr(), Lc)).Kc(); d.Ob(); ) + for (a = u(d.Pb(), 11), r = new E(a.g); r.a < r.c.c.length; ) + i = u(y(r), 17), l = i.d.i, e != l && (o = l.c, o.p <= c.p && (f = c.p + 1, f == t.b.c.length ? (h = new Rs(t), h.p = f, W(t.b, h), jr(l, h)) : (h = u(un(t.b, f), 29), jr(l, h)), nBn(n, l, t))); + } + function eBn(n, e, t) { + var i, r, c, o, f, h; + for (r = t, c = 0, f = new E(e); f.a < f.c.c.length; ) + o = u(y(f), 33), pr(o, (pb(), TP), Q(r++)), h = Tb(o), i = j.Math.atan2(o.j + o.f / 2, o.i + o.g / 2), i += i < 0 ? ag : 0, i < 0.7853981633974483 || i > FHn ? wi(h, n.b) : i <= FHn && i > xHn ? wi(h, n.d) : i <= xHn && i > LHn ? wi(h, n.c) : i <= LHn && wi(h, n.a), c = eBn(n, h, c); + return r; + } + function jl() { + jl = N; + var n; + for (qA = new a1(1, 1), pR = new a1(1, 10), U4 = new a1(0, 0), gR = new a1(-1, 1), xin = A(M(vg, 1), q, 91, 0, [U4, qA, new a1(1, 2), new a1(1, 3), new a1(1, 4), new a1(1, 5), new a1(1, 6), new a1(1, 7), new a1(1, 8), new a1(1, 9), pR]), GA = F(vg, q, 91, 32, 0, 1), n = 0; n < GA.length; n++) + GA[n] = m7(Ih(1, n)); + } + function E7e(n, e, t, i, r, c) { + var o, f, h, l; + for (f = !Wv(pt(n.Oc(), new Fv(new Ydn()))).sd((ua(), X4)), o = n, c == (or(), Yh) && (o = I(o, 152) ? I2(u(o, 152)) : I(o, 131) ? u(o, 131).a : I(o, 54) ? new od(o) : new K0(o)), l = o.Kc(); l.Ob(); ) + h = u(l.Pb(), 70), h.n.a = e.a, f ? h.n.b = e.b + (i.b - h.o.b) / 2 : r ? h.n.b = e.b : h.n.b = e.b + i.b - h.o.b, e.a += h.o.a + t; + } + function tBn(n, e, t, i) { + var r, c, o, f, h, l; + for (r = (i.c + i.a) / 2, _s(e.j), Ke(e.j, r), _s(t.e), Ke(t.e, r), l = new s8n(), f = new E(n.f); f.a < f.c.c.length; ) + c = u(y(f), 129), h = c.a, dx(l, e, h), dx(l, t, h); + for (o = new E(n.k); o.a < o.c.c.length; ) + c = u(y(o), 129), h = c.b, dx(l, e, h), dx(l, t, h); + return l.b += 2, l.a += LTn(e, n.q), l.a += LTn(n.q, t), l; + } + function iBn(n, e, t) { + var i, r, c, o, f; + if (!j3(e)) { + for (f = yc(t, (I(e, 14) ? u(e, 14).gc() : Fh(e.Kc())) / n.a | 0), le(f, SHn, 1), o = new Egn(), c = null, r = e.Kc(); r.Ob(); ) + i = u(r.Pb(), 86), o = of(A(M(gf, 1), rn, 20, 0, [o, new X1(i)])), c && (H(c, (cc(), JJn), i), H(i, pK, c), O$(i) == O$(c) && (H(c, vK, i), H(i, mP, c))), c = i; + ce(f), iBn(n, o, t); + } + } + function rBn(n) { + var e, t, i, r, c, o, f; + for (t = n.i, e = n.n, f = t.d, n.f == (Jc(), Dl) ? f += (t.a - n.e.b) / 2 : n.f == To && (f += t.a - n.e.b), r = new E(n.d); r.a < r.c.c.length; ) { + switch (i = u(y(r), 181), o = i.rf(), c = new Li(), c.b = f, f += o.b + n.a, n.b.g) { + case 0: + c.a = t.c + e.b; + break; + case 1: + c.a = t.c + e.b + (t.b - o.a) / 2; + break; + case 2: + c.a = t.c + t.b - e.c - o.a; + } + i.tf(c); + } + } + function cBn(n) { + var e, t, i, r, c, o, f; + for (t = n.i, e = n.n, f = t.c, n.b == (Cu(), Ol) ? f += (t.b - n.e.a) / 2 : n.b == Co && (f += t.b - n.e.a), r = new E(n.d); r.a < r.c.c.length; ) { + switch (i = u(y(r), 181), o = i.rf(), c = new Li(), c.a = f, f += o.a + n.a, n.f.g) { + case 0: + c.b = t.d + e.d; + break; + case 1: + c.b = t.d + e.d + (t.a - o.b) / 2; + break; + case 2: + c.b = t.d + t.a - e.a - o.b; + } + i.tf(c); + } + } + function C7e(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + a = t.a.c, o = t.a.c + t.a.b, c = u(te(t.c, e), 459), p = c.f, v = c.a, h = new fn(a, p), d = new fn(o, v), r = a, t.p || (r += n.c), r += t.F + t.v * n.b, l = new fn(r, p), g = new fn(r, v), V5(e.a, A(M(di, 1), q, 8, 0, [h, l])), f = t.d.a.gc() > 1, f && (i = new fn(r, t.b), Ke(e.a, i)), V5(e.a, A(M(di, 1), q, 8, 0, [g, d])); + } + function uBn(n) { + gd(n, new Oa(ad(fd(ld(hd(new na(), gA), "ELK Randomizer"), 'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'), new $2n()))), Z(n, gA, s0, zhn), Z(n, gA, $b, 15), Z(n, gA, HM, Q(0)), Z(n, gA, ep, D4); + } + function YY() { + YY = N; + var n, e, t, i, r, c; + for (v9 = F(ku, wg, 25, 255, 15, 1), oI = F(Ls, Bf, 25, 16, 15, 1), e = 0; e < 255; e++) + v9[e] = -1; + for (t = 57; t >= 48; t--) + v9[t] = t - 48 << 24 >> 24; + for (i = 70; i >= 65; i--) + v9[i] = i - 65 + 10 << 24 >> 24; + for (r = 102; r >= 97; r--) + v9[r] = r - 97 + 10 << 24 >> 24; + for (c = 0; c < 10; c++) + oI[c] = 48 + c & Ut; + for (n = 10; n <= 15; n++) + oI[n] = 65 + n - 10 & Ut; + } + function aM(n, e, t) { + var i, r, c, o, f, h, l, a; + return f = e.i - n.g / 2, h = t.i - n.g / 2, l = e.j - n.g / 2, a = t.j - n.g / 2, c = e.g + n.g / 2, o = t.g + n.g / 2, i = e.f + n.g / 2, r = t.f + n.g / 2, f < h + o && h < f && l < a + r && a < l || h < f + c && f < h && a < l + i && l < a || f < h + o && h < f && l < a && a < l + i ? !0 : h < f + c && f < h && l < a + r && a < l; + } + function T7e(n) { + var e, t, i, r, c; + r = u(k(n, (nn(), Va)), 21), c = u(k(n, iP), 21), t = new fn(n.f.a + n.d.b + n.d.c, n.f.b + n.d.d + n.d.a), e = new kr(t), r.Hc((Qu(), sw)) && (i = u(k(n, hv), 8), c.Hc((xu(), Tv)) && (i.a <= 0 && (i.a = 20), i.b <= 0 && (i.b = 20)), e.a = j.Math.max(t.a, i.a), e.b = j.Math.max(t.b, i.b)), on(sn(k(n, H_))) || Xye(n, t, e); + } + function M7e(n, e) { + var t, i, r, c; + for (c = zr(e, (J(), ae)).Kc(); c.Ob(); ) + i = u(c.Pb(), 11), t = u(k(i, (G(), Mu)), 10), t && jo(lo(ho(ao(fo(new Ns(), 0), 0.1), n.i[e.p].d), n.i[t.p].a)); + for (r = zr(e, Kn).Kc(); r.Ob(); ) + i = u(r.Pb(), 11), t = u(k(i, (G(), Mu)), 10), t && jo(lo(ho(ao(fo(new Ns(), 0), 0.1), n.i[t.p].d), n.i[e.p].a)); + } + function Gx(n) { + var e, t, i, r, c, o; + if (!n.c) { + if (o = new Q2n(), e = b9, c = e.a.zc(n, e), c == null) { + for (i = new ie(wc(n)); i.e != i.i.gc(); ) + t = u(oe(i), 87), r = pM(t), I(r, 88) && Ft(o, Gx(u(r, 26))), me(o, t); + e.a.Bc(n) != null, e.a.gc() == 0; + } + A2e(o), ab(o), n.c = new Ew((u(D(R((ol(), Nn).o), 15), 18), o.i), o.g), Iu(n).b &= -33; + } + return n.c; + } + function ZY(n) { + var e; + if (n.c != 10) + throw T(new Ee(Pe((je(), yA)))); + switch (e = n.a, e) { + case 110: + e = 10; + break; + case 114: + e = 13; + break; + case 116: + e = 9; + break; + case 92: + case 124: + case 46: + case 94: + case 45: + case 63: + case 42: + case 43: + case 123: + case 125: + case 40: + case 41: + case 91: + case 93: + break; + default: + throw T(new Ee(Pe((je(), Os)))); + } + return e; + } + function sBn(n) { + var e, t, i, r, c; + if (n.l == 0 && n.m == 0 && n.h == 0) + return "0"; + if (n.h == tk && n.m == 0 && n.l == 0) + return "-9223372036854775808"; + if (n.h >> 19) + return "-" + sBn(G3(n)); + for (t = n, i = ""; !(t.l == 0 && t.m == 0 && t.h == 0); ) { + if (r = E$($M), t = IZ(t, r, !0), e = "" + m8n(Il), !(t.l == 0 && t.m == 0 && t.h == 0)) + for (c = 9 - e.length; c > 0; c--) + e = "0" + e; + i = e + i; + } + return i; + } + function A7e() { + if (!Object.create || !Object.getOwnPropertyNames) + return !1; + var n = "__proto__", e = /* @__PURE__ */ Object.create(null); + if (e[n] !== void 0) + return !1; + var t = Object.getOwnPropertyNames(e); + return !(t.length != 0 || (e[n] = 42, e[n] !== 42) || Object.getOwnPropertyNames(e).length == 0); + } + function S7e(n) { + var e, t, i, r, c, o, f; + for (e = !1, t = 0, r = new E(n.d.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), i.p = t++, o = new E(i.a); o.a < o.c.c.length; ) + c = u(y(o), 10), !e && !j3(Kh(c)) && (e = !0); + f = vt((or(), mh), A(M(e9, 1), z, 103, 0, [Zs, Ao])), e || (ko(f, Yh), ko(f, Jh)), n.a = new sIn(f), Eu(n.f), Eu(n.b), Eu(n.e), Eu(n.g); + } + function P7e(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (i = t.c, r = t.d, f = tf(e.c), h = tf(e.d), i == e.c ? (f = RY(n, f, r), h = bxn(e.d)) : (f = bxn(e.c), h = RY(n, h, r)), l = new mj(e.a), Ht(l, f, l.a, l.a.a), Ht(l, h, l.c.b, l.c), o = e.c == i, d = new Ymn(), c = 0; c < l.b - 1; ++c) + a = new Pi(u(qo(l, c), 8), u(qo(l, c + 1), 8)), o && c == 0 || !o && c == l.b - 2 ? d.b = a : W(d.a, a); + return d; + } + function I7e(n, e) { + var t, i, r, c; + if (c = n.j.g - e.j.g, c != 0) + return c; + if (t = u(k(n, (nn(), I1)), 19), i = u(k(e, I1), 19), t && i && (r = t.a - i.a, r != 0)) + return r; + switch (n.j.g) { + case 1: + return ni(n.n.a, e.n.a); + case 2: + return ni(n.n.b, e.n.b); + case 3: + return ni(e.n.a, n.n.a); + case 4: + return ni(e.n.b, n.n.b); + default: + throw T(new $r($nn)); + } + } + function nZ(n, e, t, i) { + var r, c, o, f, h; + if (Fh((w8(), new re(ue(Kh(e).a.Kc(), new Mn())))) >= n.a || !RJ(e, t)) + return -1; + if (j3(u(i.Kb(e), 20))) + return 1; + for (r = 0, o = u(i.Kb(e), 20).Kc(); o.Ob(); ) + if (c = u(o.Pb(), 17), h = c.c.i == e ? c.d.i : c.c.i, f = nZ(n, h, t, i), f == -1 || (r = j.Math.max(r, f), r > n.c - 1)) + return -1; + return r + 1; + } + function oBn(n, e) { + var t, i, r, c, o, f; + if (B(e) === B(n)) + return !0; + if (!I(e, 15) || (i = u(e, 15), f = n.gc(), i.gc() != f)) + return !1; + if (o = i.Kc(), n.ni()) { + for (t = 0; t < f; ++t) + if (r = n.ki(t), c = o.Pb(), r == null ? c != null : !tt(r, c)) + return !1; + } else + for (t = 0; t < f; ++t) + if (r = n.ki(t), c = o.Pb(), B(r) !== B(c)) + return !1; + return !0; + } + function fBn(n, e) { + var t, i, r, c, o, f; + if (n.f > 0) { + if (n.qj(), e != null) { + for (c = 0; c < n.d.length; ++c) + if (t = n.d[c], t) { + for (i = u(t.g, 367), f = t.i, o = 0; o < f; ++o) + if (r = i[o], tt(e, r.dd())) + return !0; + } + } else + for (c = 0; c < n.d.length; ++c) + if (t = n.d[c], t) { + for (i = u(t.g, 367), f = t.i, o = 0; o < f; ++o) + if (r = i[o], B(e) === B(r.dd())) + return !0; + } + } + return !1; + } + function O7e(n, e, t) { + var i, r, c, o; + le(t, "Orthogonally routing hierarchical port edges", 1), n.a = 0, i = mje(e), EEe(e, i), rEe(n, e, i), jCe(e), r = u(k(e, (nn(), Bt)), 98), c = e.b, u_n((Ln(0, c.c.length), u(c.c[0], 29)), r, e), u_n(u(un(c, c.c.length - 1), 29), r, e), o = e.b, vRn((Ln(0, o.c.length), u(o.c[0], 29))), vRn(u(un(o, o.c.length - 1), 29)), ce(t); + } + function eZ(n) { + switch (n) { + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return n - 48 << 24 >> 24; + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + return n - 97 + 10 << 24 >> 24; + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + return n - 65 + 10 << 24 >> 24; + default: + throw T(new Sf("Invalid hexadecimal")); + } + } + function D7e(n, e, t) { + var i, r, c, o; + for (le(t, "Processor order nodes", 2), n.a = K(Y(k(e, (n0(), Con)))), r = new Tt(), o = _e(e.b, 0); o.b != o.d.c; ) + c = u(Re(o), 86), on(sn(k(c, (cc(), rw)))) && Ht(r, c, r.c.b, r.c); + i = (ne(r.b != 0), u(r.a.a.c, 86)), SRn(n, i), !t.b && X$(t, 1), cZ(n, i, 0 - K(Y(k(i, (cc(), kP)))) / 2, 0), !t.b && X$(t, 1), ce(t); + } + function dM() { + dM = N, brn = new kw("SPIRAL", 0), hrn = new kw("LINE_BY_LINE", 1), lrn = new kw("MANHATTAN", 2), frn = new kw("JITTER", 3), ER = new kw("QUADRANTS_LINE_BY_LINE", 4), drn = new kw("QUADRANTS_MANHATTAN", 5), arn = new kw("QUADRANTS_JITTER", 6), orn = new kw("COMBINE_LINE_BY_LINE_MANHATTAN", 7), srn = new kw("COMBINE_JITTER_MANHATTAN", 8); + } + function hBn(n, e, t, i) { + var r, c, o, f, h, l; + for (h = ax(n, t), l = ax(e, t), r = !1; h && l && (i || S3e(h, l, t)); ) + o = ax(h, t), f = ax(l, t), H8(e), H8(n), c = h.c, gL(h, !1), gL(l, !1), t ? (vb(e, l.p, c), e.p = l.p, vb(n, h.p + 1, c), n.p = h.p) : (vb(n, h.p, c), n.p = h.p, vb(e, l.p + 1, c), e.p = l.p), jr(h, null), jr(l, null), h = o, l = f, r = !0; + return r; + } + function $7e(n, e, t, i) { + var r, c, o, f, h; + for (r = !1, c = !1, f = new E(i.j); f.a < f.c.c.length; ) + o = u(y(f), 11), B(k(o, (G(), rt))) === B(t) && (o.g.c.length == 0 ? o.e.c.length == 0 || (r = !0) : c = !0); + return h = 0, r && r ^ c ? h = t.j == (J(), Kn) ? -n.e[i.c.p][i.p] : e - n.e[i.c.p][i.p] : c && r ^ c ? h = n.e[i.c.p][i.p] + 1 : r && c && (h = t.j == (J(), Kn) ? 0 : e / 2), h; + } + function zx(n, e, t, i, r, c, o, f) { + var h, l, a; + for (h = 0, e != null && (h ^= k1(e.toLowerCase())), t != null && (h ^= k1(t)), i != null && (h ^= k1(i)), o != null && (h ^= k1(o)), f != null && (h ^= k1(f)), l = 0, a = c.length; l < a; l++) + h ^= k1(c[l]); + n ? h |= 256 : h &= -257, r ? h |= 16 : h &= -17, this.f = h, this.i = e == null ? null : (_n(e), e), this.a = t, this.d = i, this.j = c, this.g = o, this.e = f; + } + function tZ(n, e, t) { + var i, r; + switch (r = null, e.g) { + case 1: + r = (bu(), Vrn); + break; + case 2: + r = (bu(), Jrn); + } + switch (i = null, t.g) { + case 1: + i = (bu(), Qrn); + break; + case 2: + i = (bu(), Xrn); + break; + case 3: + i = (bu(), Yrn); + break; + case 4: + i = (bu(), Zrn); + } + return r && i ? v2(n.j, new nvn(new Hu(A(M(BTe, 1), rn, 169, 0, [u(pe(r), 169), u(pe(i), 169)])))) : (Pn(), Pn(), cr); + } + function F7e(n) { + var e, t, i; + switch (e = u(k(n, (nn(), hv)), 8), H(n, hv, new fn(e.b, e.a)), u(k(n, Qf), 248).g) { + case 1: + H(n, Qf, (oh(), xP)); + break; + case 2: + H(n, Qf, (oh(), $P)); + break; + case 3: + H(n, Qf, (oh(), ly)); + break; + case 4: + H(n, Qf, (oh(), ay)); + } + (n.q ? n.q : (Pn(), Pn(), ph))._b(nw) && (t = u(k(n, nw), 8), i = t.a, t.a = t.b, t.b = i); + } + function lBn(n, e, t, i, r, c) { + if (this.b = t, this.d = r, n >= e.length) + throw T(new mr("Greedy SwitchDecider: Free layer not in graph.")); + this.c = e[n], this.e = new b8(i), Y$(this.e, this.c, (J(), Gn)), this.i = new b8(i), Y$(this.i, this.c, Vn), this.f = new oCn(this.c), this.a = !c && r.i && !r.s && this.c[0].k == (Qn(), Xt), this.a && Q5e(this, n, e.length); + } + function aBn(n, e) { + var t, i, r, c, o, f; + c = !n.B.Hc((xu(), Sy)), o = n.B.Hc(sH), n.a = new s$n(o, c, n.c), n.n && GW(n.a.n, n.n), zI(n.g, (_o(), xc), n.a), e || (i = new l6(1, c, n.c), i.n.a = n.k, m2(n.p, (J(), Kn), i), r = new l6(1, c, n.c), r.n.d = n.k, m2(n.p, ae, r), f = new l6(0, c, n.c), f.n.c = n.k, m2(n.p, Gn, f), t = new l6(0, c, n.c), t.n.b = n.k, m2(n.p, Vn, t)); + } + function x7e(n) { + var e, t, i; + switch (e = u(k(n.d, (nn(), Qh)), 218), e.g) { + case 2: + t = lTe(n); + break; + case 3: + t = (i = new X(), _t(pt(Xc(qr(qr(new $n(null, new xn(n.d.b, 16)), new Pbn()), new Ibn()), new Obn()), new gbn()), new U5n(i)), i); + break; + default: + throw T(new $r("Compaction not supported for " + e + " edges.")); + } + $je(n, t), $i(new Bp(n.g), new G5n(n)); + } + function L7e(n, e) { + var t; + return t = new pI(), e && Pr(t, u(te(n.a, Iy), 94)), I(e, 470) && Pr(t, u(te(n.a, Oy), 94)), I(e, 354) ? (Pr(t, u(te(n.a, Rr), 94)), t) : (I(e, 82) && Pr(t, u(te(n.a, he), 94)), I(e, 239) ? (Pr(t, u(te(n.a, Ot), 94)), t) : I(e, 186) ? (Pr(t, u(te(n.a, Ru), 94)), t) : (I(e, 352) && Pr(t, u(te(n.a, bi), 94)), t)); + } + function Go() { + Go = N, V4 = new tr((Xe(), _P), Q(1)), rS = new tr(td, 80), iWn = new tr(jhn, 5), XUn = new tr(Tp, D4), eWn = new tr(tH, Q(1)), tWn = new tr(iH, (qn(), !0)), Orn = new md(50), ZUn = new tr(ed, Orn), Srn = NP, Drn = n9, VUn = new tr(WK, !1), Irn = ky, YUn = _l, JUn = nd, QUn = _g, nWn = cw, Prn = (YJ(), KUn), xR = zUn, iS = _Un, FR = HUn, $rn = GUn; + } + function N7e(n) { + var e, t, i, r, c, o, f, h; + for (h = new bSn(), f = new E(n.a); f.a < f.c.c.length; ) + if (o = u(y(f), 10), o.k != (Qn(), Xt)) { + for (Nme(h, o, new Li()), c = new re(ue(ei(o).a.Kc(), new Mn())); Se(c); ) + if (r = u(ve(c), 17), !(r.c.i.k == Xt || r.d.i.k == Xt)) + for (i = _e(r.a, 0); i.b != i.d.c; ) + t = u(Re(i), 8), e = t, v6(h, new e3(e.a, e.b)); + } + return h; + } + function Ux() { + Ux = N, Afn = new yt(gB), Mfn = (Jv(), hy), Tfn = new In(mB, Mfn), Cfn = (c7(), DP), yZn = new In(ptn, Cfn), Efn = (P7(), xK), kZn = new In(vtn, Efn), pZn = new In(pB, null), jfn = (L8(), IP), mZn = new In(vB, jfn), yfn = (Pj(), DK), dZn = new In(mtn, yfn), bZn = new In(ktn, (qn(), !1)), wZn = new In(ytn, Q(64)), gZn = new In(jtn, !0), vZn = FK; + } + function dBn(n) { + var e, t, i, r, c, o; + if (n.a == null) + if (n.a = F(_u, wh, 25, n.c.b.c.length, 16, 1), n.a[0] = !1, ai(n.c, (nn(), X_))) + for (i = u(k(n.c, X_), 15), t = i.Kc(); t.Ob(); ) + e = u(t.Pb(), 19).a, e > 0 && e < n.a.length && (n.a[e] = !1); + else + for (o = new E(n.c.b), o.a < o.c.c.length && y(o), r = 1; o.a < o.c.c.length; ) + c = u(y(o), 29), n.a[r++] = v9e(c); + } + function bBn(n, e) { + var t, i, r, c; + switch (r = n.b, e) { + case 1: { + n.b |= 1, n.b |= 4, n.b |= 8; + break; + } + case 2: { + n.b |= 2, n.b |= 4, n.b |= 8; + break; + } + case 4: { + n.b |= 1, n.b |= 2, n.b |= 4, n.b |= 8; + break; + } + case 3: { + n.b |= 16, n.b |= 8; + break; + } + case 0: { + n.b |= 32, n.b |= 16, n.b |= 8, n.b |= 1, n.b |= 2, n.b |= 4; + break; + } + } + if (n.b != r && n.c) + for (i = new ie(n.c); i.e != i.i.gc(); ) + c = u(oe(i), 473), t = Iu(c), jb(t, e); + } + function wBn(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v; + for (r = !1, o = e, f = 0, h = o.length; f < h; ++f) + c = o[f], on((qn(), !!c.e)) && !u(un(n.b, c.e.p), 214).s && (r = r | (l = c.e, a = u(un(n.b, l.p), 214), d = a.e, g = n8n(t, d.length), p = d[g][0], p.k == (Qn(), Xt) ? d[g] = v8e(c, d[g], t ? (J(), Gn) : (J(), Vn)) : a.c.Tf(d, t), v = _7(n, a, t, i), VY(a.e, a.o, t), v)); + return r; + } + function gBn(n, e) { + var t, i, r, c, o; + for (c = (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a).i, r = new ie((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); r.e != r.i.gc(); ) + i = u(oe(r), 33), B(hn(i, (Xe(), Bg))) !== B((_h(), i9)) && (o = u(hn(e, kv), 149), t = u(hn(i, kv), 149), (o == t || o && CX(o, t)) && (!i.a && (i.a = new V(Ot, i, 10, 11)), i.a).i != 0 && (c += gBn(n, i))); + return c; + } + function B7e(n) { + var e, t, i, r, c, o, f; + for (i = 0, f = 0, o = new E(n.d); o.a < o.c.c.length; ) + c = u(y(o), 101), r = u(ts(pt(new $n(null, new xn(c.j, 16)), new _H()), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), t = null, i <= f ? (t = (J(), Kn), i += r.gc()) : f < i && (t = (J(), ae), f += r.gc()), e = t, _t(Xc(r.Oc(), new Kbn()), new V5n(e)); + } + function R7e(n) { + var e, t, i, r, c, o, f, h; + for (n.b = new DLn(new Hu((J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn]))), new Hu((Hd(), A(M(YR, 1), z, 361, 0, [p0, Fl, g0])))), o = A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn]), f = 0, h = o.length; f < h; ++f) + for (c = o[f], t = A(M(YR, 1), z, 361, 0, [p0, Fl, g0]), i = 0, r = t.length; i < r; ++i) + e = t[i], _4e(n.b, c, e, new X()); + } + function pBn(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (o = u(u(ct(n.r, e), 21), 84), f = n.u.Hc((Tu(), Gl)), t = n.u.Hc(s9), i = n.u.Hc(u9), l = n.u.Hc(Pp), d = n.B.Hc((xu(), WP)), a = !t && !i && (l || o.gc() == 2), _8e(n, e), r = null, h = null, f) { + for (c = o.Kc(), r = u(c.Pb(), 111), h = r; c.Ob(); ) + h = u(c.Pb(), 111); + r.d.b = 0, h.d.c = 0, a && !r.a && (r.d.c = 0); + } + d && (Bve(o), f && (r.d.b = 0, h.d.c = 0)); + } + function vBn(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (o = u(u(ct(n.r, e), 21), 84), f = n.u.Hc((Tu(), Gl)), t = n.u.Hc(s9), i = n.u.Hc(u9), h = n.u.Hc(Pp), d = n.B.Hc((xu(), WP)), l = !t && !i && (h || o.gc() == 2), eye(n, e), a = null, r = null, f) { + for (c = o.Kc(), a = u(c.Pb(), 111), r = a; c.Ob(); ) + r = u(c.Pb(), 111); + a.d.d = 0, r.d.a = 0, l && !a.a && (a.d.a = 0); + } + d && (Rve(o), f && (a.d.d = 0, r.d.a = 0)); + } + function mBn(n, e, t) { + var i, r, c, o, f, h, l, a; + if (r = e.k, e.p >= 0) + return !1; + if (e.p = t.b, W(t.e, e), r == (Qn(), pi) || r == Mc) { + for (o = new E(e.j); o.a < o.c.c.length; ) + for (c = u(y(o), 11), a = (i = new E(new n2(c).a.g), new Oq(i)); Kr(a.a); ) + if (l = u(y(a.a), 17).d, f = l.i, h = f.k, e.c != f.c && (h == pi || h == Mc) && mBn(n, f, t)) + return !0; + } + return !0; + } + function bM(n) { + var e; + return n.Db & 64 ? jY(n) : (e = new Bs(jY(n)), e.a += " (changeable: ", c1(e, (n.Bb & Eo) != 0), e.a += ", volatile: ", c1(e, (n.Bb & Rb) != 0), e.a += ", transient: ", c1(e, (n.Bb & Ob) != 0), e.a += ", defaultValueLiteral: ", br(e, n.j), e.a += ", unsettable: ", c1(e, (n.Bb & vu) != 0), e.a += ", derived: ", c1(e, (n.Bb & Nf) != 0), e.a += ")", e.a); + } + function _7e(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + for (r = G9e(n.d), o = u(k(n.b, (a6(), Crn)), 116), f = o.b + o.c, h = o.d + o.a, a = r.d.a * n.e + f, l = r.b.a * n.f + h, ete(n.b, new fn(a, l)), g = new E(n.g); g.a < g.c.c.length; ) + d = u(y(g), 562), e = d.g - r.a.a, t = d.i - r.c.a, i = st(nue(new fn(e, t), d.a, d.b), If(o8(Qr(jz(d.e)), d.d * d.a, d.c * d.b), -0.5)), c = Ez(d.e), Iie(d.e, ji(i, c)); + } + function K7e(n, e, t, i) { + var r, c, o, f, h; + for (h = F(Ci, q, 104, (J(), A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn])).length, 0, 2), c = A(M(Yi, 1), lc, 61, 0, [Xr, Kn, Vn, ae, Gn]), o = 0, f = c.length; o < f; ++o) + r = c[o], h[r.g] = F(Ci, vr, 25, n.c[r.g], 15, 1); + return _Fn(h, n, Kn), _Fn(h, n, ae), cx(h, n, Kn, e, t, i), cx(h, n, Vn, e, t, i), cx(h, n, ae, e, t, i), cx(h, n, Gn, e, t, i), h; + } + function H7e(n, e, t) { + if (Uu(n.a, e)) { + if (Ah(u(te(n.a, e), 53), t)) + return 1; + } else + it(n.a, e, new hi()); + if (Uu(n.a, t)) { + if (Ah(u(te(n.a, t), 53), e)) + return -1; + } else + it(n.a, t, new hi()); + if (Uu(n.b, e)) { + if (Ah(u(te(n.b, e), 53), t)) + return -1; + } else + it(n.b, e, new hi()); + if (Uu(n.b, t)) { + if (Ah(u(te(n.b, t), 53), e)) + return 1; + } else + it(n.b, t, new hi()); + return 0; + } + function iZ(n, e, t, i) { + var r, c, o, f, h, l; + if (t == null) { + for (r = u(n.g, 119), f = 0; f < n.i; ++f) + if (o = r[f], o.ak() == e) + return Gi(n, o, i); + } + return c = (er(), u(e, 66).Oj() ? u(t, 72) : uh(e, t)), qu(n.e) ? (l = !g7(n, e), i = Dc(n, c, i), h = e.$j() ? hl(n, 3, e, null, t, v4(n, e, t, I(e, 99) && (u(e, 18).Bb & Ji) != 0), l) : hl(n, 1, e, e.zj(), t, -1, l), i ? i.Ei(h) : i = h) : i = Dc(n, c, i), i; + } + function q7e(n) { + var e, t, i, r, c, o; + n.q == (Ai(), jh) || n.q == Sc || (r = n.f.n.d + SE(u(wr(n.b, (J(), Kn)), 124)) + n.c, e = n.f.n.a + SE(u(wr(n.b, ae), 124)) + n.c, i = u(wr(n.b, Vn), 124), o = u(wr(n.b, Gn), 124), c = j.Math.max(0, i.n.d - r), c = j.Math.max(c, o.n.d - r), t = j.Math.max(0, i.n.a - e), t = j.Math.max(t, o.n.a - e), i.n.d = c, o.n.d = c, i.n.a = t, o.n.a = t); + } + function G7e(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (le(e, "Restoring reversed edges", 1), h = new E(n.b); h.a < h.c.c.length; ) + for (f = u(y(h), 29), a = new E(f.a); a.a < a.c.c.length; ) + for (l = u(y(a), 10), g = new E(l.j); g.a < g.c.c.length; ) + for (d = u(y(g), 11), o = xf(d.g), i = o, r = 0, c = i.length; r < c; ++r) + t = i[r], on(sn(k(t, (G(), mf)))) && t0(t, !1); + ce(e); + } + function kBn() { + this.b = new wa(), this.d = new wa(), this.e = new wa(), this.c = new wa(), this.a = new we(), this.f = new we(), Dw(di, new i2n(), new r2n()), Dw(Bfn, new w2n(), new g2n()), Dw(Urn, new p2n(), new v2n()), Dw(Wrn, new k2n(), new y2n()), Dw(yne, new j2n(), new E2n()), Dw(RTe, new c2n(), new u2n()), Dw(HTe, new s2n(), new o2n()), Dw(_Te, new f2n(), new h2n()), Dw(KTe, new l2n(), new a2n()), Dw(zTe, new d2n(), new b2n()); + } + function yBn(n) { + var e, t, i, r, c, o; + return c = 0, e = qs(n), e.Bj() && (c |= 4), n.Bb & vu && (c |= 2), I(n, 99) ? (t = u(n, 18), r = ir(t), t.Bb & uc && (c |= 32), r && (ee(tb(r)), c |= 8, o = r.t, (o > 1 || o == -1) && (c |= 16), r.Bb & uc && (c |= 64)), t.Bb & Ji && (c |= Rb), c |= Eo) : I(e, 457) ? c |= 512 : (i = e.Bj(), i && i.i & 1 && (c |= 256)), n.Bb & 512 && (c |= 128), c; + } + function T6(n, e) { + var t, i, r, c, o; + for (n = n == null ? iu : (_n(n), n), r = 0; r < e.length; r++) + e[r] = T9e(e[r]); + for (t = new _0(), o = 0, i = 0; i < e.length && (c = n.indexOf("%s", o), c != -1); ) + t.a += "" + Zu(n == null ? iu : (_n(n), n), o, c), rc(t, e[i++]), o = c + 2; + if (iAn(t, n, o, n.length), i < e.length) { + for (t.a += " [", rc(t, e[i++]); i < e.length; ) + t.a += Qi, rc(t, e[i++]); + t.a += "]"; + } + return t.a; + } + function z7e(n) { + var e, t, i, r, c; + for (c = new Ic(n.a.c.length), r = new E(n.a); r.a < r.c.c.length; ) { + switch (i = u(y(r), 10), t = u(k(i, (nn(), Hc)), 163), e = null, t.g) { + case 1: + case 2: + e = (ja(), Tg); + break; + case 3: + case 4: + e = (ja(), rv); + } + e ? (H(i, (G(), HS), (ja(), Tg)), e == rv ? fM(i, t, (sr(), Au)) : e == Tg && fM(i, t, (sr(), Lc))) : c.c[c.c.length] = i; + } + return c; + } + function rZ(n, e) { + var t, i, r, c, o, f, h; + for (t = 0, h = new E(e); h.a < h.c.c.length; ) { + for (f = u(y(h), 11), nQ(n.b, n.d[f.p]), o = 0, r = new uf(f.b); Kr(r.a) || Kr(r.b); ) + i = u(Kr(r.a) ? y(r.a) : y(r.b), 17), cTn(i) ? (c = MG(n, f == i.c ? i.d : i.c), c > n.d[f.p] && (t += jX(n.b, c), ll(n.a, Q(c)))) : ++o; + for (t += n.b.d * o; !Hv(n.a); ) + ZX(n.b, u(y2(n.a), 19).a); + } + return t; + } + function U7e(n, e) { + var t; + return n.f == mH ? (t = Pd(Er((wu(), xi), e)), n.e ? t == 4 && e != (z2(), Dp) && e != (z2(), Op) && e != (z2(), kH) && e != (z2(), yH) : t == 2) : n.d && (n.d.Hc(e) || n.d.Hc(A2(Er((wu(), xi), e))) || n.d.Hc(rg((wu(), xi), n.b, e))) ? !0 : n.f && qY((wu(), n.f), E8(Er(xi, e))) ? (t = Pd(Er(xi, e)), n.e ? t == 4 : t == 2) : !1; + } + function W7e(n, e, t, i) { + var r, c, o, f, h, l, a, d; + return o = u(hn(t, (Xe(), Mp)), 8), h = o.a, a = o.b + n, r = j.Math.atan2(a, h), r < 0 && (r += ag), r += e, r > ag && (r -= ag), f = u(hn(i, Mp), 8), l = f.a, d = f.b + n, c = j.Math.atan2(d, l), c < 0 && (c += ag), c += e, c > ag && (c -= ag), Yo(), mo(1e-10), j.Math.abs(r - c) <= 1e-10 || r == c || isNaN(r) && isNaN(c) ? 0 : r < c ? -1 : r > c ? 1 : vd(isNaN(r), isNaN(c)); + } + function Wx(n) { + var e, t, i, r, c, o, f; + for (f = new we(), i = new E(n.a.b); i.a < i.c.c.length; ) + e = u(y(i), 57), it(f, e, new X()); + for (r = new E(n.a.b); r.a < r.c.c.length; ) + for (e = u(y(r), 57), e.i = Vt, o = e.c.Kc(); o.Ob(); ) + c = u(o.Pb(), 57), u(Vr(Sr(f.f, c)), 15).Fc(e); + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 57), e.c.$b(), e.c = u(Vr(Sr(f.f, e)), 15); + HNn(n); + } + function Xx(n) { + var e, t, i, r, c, o, f; + for (f = new we(), i = new E(n.a.b); i.a < i.c.c.length; ) + e = u(y(i), 81), it(f, e, new X()); + for (r = new E(n.a.b); r.a < r.c.c.length; ) + for (e = u(y(r), 81), e.o = Vt, o = e.f.Kc(); o.Ob(); ) + c = u(o.Pb(), 81), u(Vr(Sr(f.f, c)), 15).Fc(e); + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), e.f.$b(), e.f = u(Vr(Sr(f.f, e)), 15); + DNn(n); + } + function X7e(n, e, t, i) { + var r, c; + for (o4e(n, e, t, i), tte(e, n.j - e.j + t), ite(e, n.k - e.k + i), c = new E(e.f); c.a < c.c.c.length; ) + switch (r = u(y(c), 324), r.a.g) { + case 0: + z3(n, e.g + r.b.a, 0, e.g + r.c.a, e.i - 1); + break; + case 1: + z3(n, e.g + e.o, e.i + r.b.a, n.o - 1, e.i + r.c.a); + break; + case 2: + z3(n, e.g + r.b.a, e.i + e.p, e.g + r.c.a, n.p - 1); + break; + default: + z3(n, 0, e.i + r.b.a, e.g - 1, e.i + r.c.a); + } + } + function wM(n, e, t, i, r) { + var c, o, f; + try { + if (e >= n.o) + throw T(new qq()); + f = e >> 5, o = e & 31, c = Ih(1, ge(Ih(o, 1))), r ? n.n[t][f] = rf(n.n[t][f], c) : n.n[t][f] = ui(n.n[t][f], XU(c)), c = Ih(c, 1), i ? n.n[t][f] = rf(n.n[t][f], c) : n.n[t][f] = ui(n.n[t][f], XU(c)); + } catch (h) { + throw h = Et(h), I(h, 320) ? T(new mr(bN + n.o + "*" + n.p + wN + e + Qi + t + gN)) : T(h); + } + } + function cZ(n, e, t, i) { + var r, c, o; + e && (c = K(Y(k(e, (cc(), D1)))) + i, o = t + K(Y(k(e, kP))) / 2, H(e, mK, Q(ge(eu(j.Math.round(c))))), H(e, pon, Q(ge(eu(j.Math.round(o))))), e.d.b == 0 || cZ(n, u(fE((r = _e(new X1(e).a.d, 0), new e2(r))), 86), t + K(Y(k(e, kP))) + n.a, i + K(Y(k(e, pv)))), k(e, vK) != null && cZ(n, u(k(e, vK), 86), t, i)); + } + function V7e(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (h = qi(e.a), r = K(Y(k(h, (nn(), Ja)))) * 2, a = K(Y(k(h, $g))), l = j.Math.max(r, a), c = F(Ci, vr, 25, e.f - e.c + 1, 15, 1), i = -l, t = 0, f = e.b.Kc(); f.Ob(); ) + o = u(f.Pb(), 10), i += n.a[o.c.p] + l, c[t++] = i; + for (i += n.a[e.a.c.p] + l, c[t++] = i, g = new E(e.e); g.a < g.c.c.length; ) + d = u(y(g), 10), i += n.a[d.c.p] + l, c[t++] = i; + return c; + } + function Q7e(n, e, t, i) { + var r, c, o, f, h, l, a, d, g; + for (g = new Y1(new w6n(n)), f = A(M(vh, 1), C1, 10, 0, [e, t]), h = 0, l = f.length; h < l; ++h) + for (o = f[h], d = c6(o, i).Kc(); d.Ob(); ) + for (a = u(d.Pb(), 11), c = new uf(a.b); Kr(c.a) || Kr(c.b); ) + r = u(Kr(c.a) ? y(c.a) : y(c.b), 17), Wi(r) || (bT(g.a, a, (qn(), Ga)) == null, cTn(r) && k8(g, a == r.c ? r.d : r.c)); + return pe(g), new au(g); + } + function J7e(n, e) { + var t, i, r, c; + if (c = u(hn(n, (Xe(), Hg)), 61).g - u(hn(e, Hg), 61).g, c != 0) + return c; + if (t = u(hn(n, nH), 19), i = u(hn(e, nH), 19), t && i && (r = t.a - i.a, r != 0)) + return r; + switch (u(hn(n, Hg), 61).g) { + case 1: + return ni(n.i, e.i); + case 2: + return ni(n.j, e.j); + case 3: + return ni(e.i, n.i); + case 4: + return ni(e.j, n.j); + default: + throw T(new $r($nn)); + } + } + function uZ(n) { + var e, t, i; + return n.Db & 64 ? Ex(n) : (e = new Yu(Ptn), t = n.k, t ? De(De((e.a += ' "', e), t), '"') : (!n.n && (n.n = new V(Rr, n, 1, 7)), n.n.i > 0 && (i = (!n.n && (n.n = new V(Rr, n, 1, 7)), u(D(n.n, 0), 137)).a, !i || De(De((e.a += ' "', e), i), '"'))), De(bd(De(bd(De(bd(De(bd((e.a += " (", e), n.i), ","), n.j), " | "), n.g), ","), n.f), ")"), e.a); + } + function jBn(n) { + var e, t, i; + return n.Db & 64 ? Ex(n) : (e = new Yu(Itn), t = n.k, t ? De(De((e.a += ' "', e), t), '"') : (!n.n && (n.n = new V(Rr, n, 1, 7)), n.n.i > 0 && (i = (!n.n && (n.n = new V(Rr, n, 1, 7)), u(D(n.n, 0), 137)).a, !i || De(De((e.a += ' "', e), i), '"'))), De(bd(De(bd(De(bd(De(bd((e.a += " (", e), n.i), ","), n.j), " | "), n.g), ","), n.f), ")"), e.a); + } + function Vx(n, e) { + var t, i, r, c, o, f, h; + if (e == null || e.length == 0) + return null; + if (r = u(mc(n.a, e), 149), !r) { + for (i = (f = new Mh(n.b).a.vc().Kc(), new N0(f)); i.a.Ob(); ) + if (t = (c = u(i.a.Pb(), 42), u(c.dd(), 149)), o = t.c, h = e.length, An(o.substr(o.length - h, h), e) && (e.length == o.length || Di(o, o.length - e.length - 1) == 46)) { + if (r) + return null; + r = t; + } + r && yr(n.a, e, r); + } + return r; + } + function Y7e(n, e) { + var t, i, r, c; + return t = new zln(), i = u(ts(Xc(new $n(null, new xn(n.f, 16)), t), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [(hf(), _b), ls]))), 21), r = i.gc(), i = u(ts(Xc(new $n(null, new xn(e.f, 16)), t), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [_b, ls]))), 21), c = i.gc(), r < c ? -1 : r == c ? 0 : 1; + } + function EBn(n) { + var e, t, i; + ai(n, (nn(), j0)) && (i = u(k(n, j0), 21), !i.dc() && (t = (e = u(xo(ar), 9), new ks(e, u(bo(e, e.length), 9), 0)), i.Hc((Eb(), ds)) ? ko(t, ds) : ko(t, Io), i.Hc(no) || ko(t, no), i.Hc(So) ? ko(t, Oo) : i.Hc(Zh) ? ko(t, yh) : i.Hc(Po) && ko(t, eo), i.Hc(Oo) ? ko(t, So) : i.Hc(yh) ? ko(t, Zh) : i.Hc(eo) && ko(t, Po), H(n, j0, t))); + } + function Z7e(n) { + var e, t, i, r, c, o, f; + for (r = u(k(n, (G(), k0)), 10), i = n.j, t = (Ln(0, i.c.length), u(i.c[0], 11)), o = new E(r.j); o.a < o.c.c.length; ) + if (c = u(y(o), 11), B(c) === B(k(t, rt))) { + c.j == (J(), Kn) && n.p > r.p ? (si(c, ae), c.d && (f = c.o.b, e = c.a.b, c.a.b = f - e)) : c.j == ae && r.p > n.p && (si(c, Kn), c.d && (f = c.o.b, e = c.a.b, c.a.b = -(f - e))); + break; + } + return r; + } + function nke(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v; + if (c = t, t < i) + for (g = (p = new n7(n.p), v = new n7(n.p), Xi(p.e, n.e), p.q = n.q, p.r = v, WE(p), Xi(v.j, n.j), v.r = p, WE(v), new Pi(p, v)), d = u(g.a, 112), a = u(g.b, 112), r = (Ln(c, e.c.length), u(e.c[c], 329)), o = tBn(n, d, a, r), l = t + 1; l <= i; l++) + f = (Ln(l, e.c.length), u(e.c[l], 329)), h = tBn(n, d, a, f), Fpe(f, h, r, o) && (r = f, o = h); + return c; + } + function K7(n, e, t, i, r) { + var c, o, f, h, l, a, d; + if (!(I(e, 239) || I(e, 354) || I(e, 186))) + throw T(new Hn("Method only works for ElkNode-, ElkLabel and ElkPort-objects.")); + return o = n.a / 2, h = e.i + i - o, a = e.j + r - o, l = h + e.g + n.a, d = a + e.f + n.a, c = new fu(), Ke(c, new fn(h, a)), Ke(c, new fn(h, d)), Ke(c, new fn(l, d)), Ke(c, new fn(l, a)), f = new xx(c), Pr(f, e), t && it(n.b, e, f), f; + } + function M6(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (c = new fn(e, t), a = new E(n.a); a.a < a.c.c.length; ) + for (l = u(y(a), 10), st(l.n, c), g = new E(l.j); g.a < g.c.c.length; ) + for (d = u(y(g), 11), r = new E(d.g); r.a < r.c.c.length; ) + for (i = u(y(r), 17), hb(i.a, c), o = u(k(i, (nn(), Mr)), 74), o && hb(o, c), h = new E(i.b); h.a < h.c.c.length; ) + f = u(y(h), 70), st(f.n, c); + } + function eke(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (c = new fn(e, t), a = new E(n.a); a.a < a.c.c.length; ) + for (l = u(y(a), 10), st(l.n, c), g = new E(l.j); g.a < g.c.c.length; ) + for (d = u(y(g), 11), r = new E(d.g); r.a < r.c.c.length; ) + for (i = u(y(r), 17), hb(i.a, c), o = u(k(i, (nn(), Mr)), 74), o && hb(o, c), h = new E(i.b); h.a < h.c.c.length; ) + f = u(y(h), 70), st(f.n, c); + } + function CBn(n) { + if ((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i == 0) + throw T(new Gv("Edges must have a source.")); + if ((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c).i == 0) + throw T(new Gv("Edges must have a target.")); + if (!n.b && (n.b = new Fn(he, n, 4, 7)), !(n.b.i <= 1 && (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c.i <= 1))) + throw T(new Gv("Hyperedges are not supported.")); + } + function TBn(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (d = 0, c = new gw(), ll(c, e); c.b != c.c; ) + for (h = u(y2(c), 214), l = 0, a = u(k(e.j, (nn(), Ll)), 339), o = K(Y(k(e.j, XS))), f = K(Y(k(e.j, Yun))), a != (Rh(), Nl) && (l += o * h9e(h.e, a), l += f * x8e(h.e)), d += CFn(h.d, h.e) + l, r = new E(h.b); r.a < r.c.c.length; ) + i = u(y(r), 37), t = u(un(n.b, i.p), 214), t.s || (d += Sx(n, t)); + return d; + } + function tke(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + for (p = e.length, h = p, Te(0, e.length), e.charCodeAt(0) == 45 ? (d = -1, g = 1, --p) : (d = 1, g = 0), c = (oL(), Czn)[10], r = p / c | 0, C = p % c, C != 0 && ++r, f = F(be, Le, 25, r, 15, 1), t = Ezn[8], o = 0, v = g + (C == 0 ? c : C), m = g; m < h; m = v, v = m + c) + i = ss(e.substr(m, v - m), Bi, nt), l = (l4(), YQ(f, f, o, t)), l += D2e(f, o, i), f[o++] = l; + a = o, n.e = d, n.d = a, n.a = f, K5(n); + } + function MBn(n, e, t, i, r, c, o) { + if (n.c = i.qf().a, n.d = i.qf().b, r && (n.c += r.qf().a, n.d += r.qf().b), n.b = e.rf().a, n.a = e.rf().b, !r) + t ? n.c -= o + e.rf().a : n.c += i.rf().a + o; + else + switch (r.Hf().g) { + case 0: + case 2: + n.c += r.rf().a + o + c.a + o; + break; + case 4: + n.c -= o + c.a + o + e.rf().a; + break; + case 1: + n.c += r.rf().a + o, n.d -= o + c.b + o + e.rf().b; + break; + case 3: + n.c += r.rf().a + o, n.d += r.rf().b + o + c.b + o; + } + } + function ABn(n, e) { + var t, i; + for (this.b = new X(), this.e = new X(), this.a = n, this.d = e, Ipe(this), R2e(this), this.b.dc() ? this.c = n.c.p : this.c = u(this.b.Xb(0), 10).c.p, this.e.c.length == 0 ? this.f = n.c.p : this.f = u(un(this.e, this.e.c.length - 1), 10).c.p, i = u(k(n, (G(), Vk)), 15).Kc(); i.Ob(); ) + if (t = u(i.Pb(), 70), ai(t, (nn(), QS))) { + this.d = u(k(t, QS), 227); + break; + } + } + function g4(n, e, t) { + var i, r, c, o, f, h, l, a; + for (i = u(te(n.a, e), 53), c = u(te(n.a, t), 53), r = u(te(n.e, e), 53), o = u(te(n.e, t), 53), i.a.zc(t, i), o.a.zc(e, o), a = c.a.ec().Kc(); a.Ob(); ) + l = u(a.Pb(), 10), i.a.zc(l, i), ci(u(te(n.e, l), 53), e), Xi(u(te(n.e, l), 53), r); + for (h = r.a.ec().Kc(); h.Ob(); ) + f = u(h.Pb(), 10), o.a.zc(f, o), ci(u(te(n.a, f), 53), t), Xi(u(te(n.a, f), 53), c); + } + function H7(n, e, t) { + var i, r, c, o, f, h, l, a; + for (i = u(te(n.a, e), 53), c = u(te(n.a, t), 53), r = u(te(n.b, e), 53), o = u(te(n.b, t), 53), i.a.zc(t, i), o.a.zc(e, o), a = c.a.ec().Kc(); a.Ob(); ) + l = u(a.Pb(), 10), i.a.zc(l, i), ci(u(te(n.b, l), 53), e), Xi(u(te(n.b, l), 53), r); + for (h = r.a.ec().Kc(); h.Ob(); ) + f = u(h.Pb(), 10), o.a.zc(f, o), ci(u(te(n.a, f), 53), t), Xi(u(te(n.a, f), 53), c); + } + function ike(n, e) { + var t, i, r; + switch (le(e, "Breaking Point Insertion", 1), i = new PY(n), u(k(n, (nn(), W_)), 337).g) { + case 2: + r = new GH(); + case 0: + r = new KH(); + break; + default: + r = new zH(); + } + if (t = r.Vf(n, i), on(sn(k(n, Lsn))) && (t = Xje(n, t)), !r.Wf() && ai(n, cP)) + switch (u(k(n, cP), 338).g) { + case 2: + t = aLn(i, t); + break; + case 1: + t = lxn(i, t); + } + if (t.dc()) { + ce(e); + return; + } + XCe(n, t), ce(e); + } + function rke(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + if (a = null, g = e, d = $An(n, PAn(t), g), Q5(d, $h(g, Uf)), o = xd(g, Dtn), i = new bkn(n, d), O6e(i.a, i.b, o), f = xd(g, xB), r = new wkn(n, d), D6e(r.a, r.b, f), (!d.b && (d.b = new Fn(he, d, 4, 7)), d.b).i == 0 || (!d.c && (d.c = new Fn(he, d, 5, 8)), d.c).i == 0) + throw c = $h(g, Uf), h = Tqn + c, l = h + _4, T(new Af(l)); + return YT(g, d), nTe(n, g, d), a = oF(n, g, d), a; + } + function cke(n, e) { + var t, i, r, c, o, f, h; + for (r = F(be, Le, 25, n.e.a.c.length, 15, 1), o = new E(n.e.a); o.a < o.c.c.length; ) + c = u(y(o), 121), r[c.d] += c.b.a.c.length; + for (f = p8(e); f.b != 0; ) + for (c = u(f.b == 0 ? null : (ne(f.b != 0), Ts(f, f.a.a)), 121), i = $2(new E(c.g.a)); i.Ob(); ) + t = u(i.Pb(), 213), h = t.e, h.e = j.Math.max(h.e, c.e + t.a), --r[h.d], r[h.d] == 0 && Ht(f, h, f.c.b, f.c); + } + function SBn(n) { + var e, t, i, r, c, o, f, h, l, a, d; + for (t = Bi, r = nt, f = new E(n.e.a); f.a < f.c.c.length; ) + c = u(y(f), 121), r = j.Math.min(r, c.e), t = j.Math.max(t, c.e); + for (e = F(be, Le, 25, t - r + 1, 15, 1), o = new E(n.e.a); o.a < o.c.c.length; ) + c = u(y(o), 121), c.e -= r, ++e[c.e]; + if (i = 0, n.k != null) + for (l = n.k, a = 0, d = l.length; a < d && (h = l[a], e[i++] += h, e.length != i); ++a) + ; + return e; + } + function PBn(n) { + switch (n.d) { + case 9: + case 8: + return !0; + case 3: + case 5: + case 4: + case 6: + return !1; + case 7: + return u(QY(n), 19).a == n.o; + case 1: + case 2: { + if (n.o == -2) + return !1; + switch (n.p) { + case 0: + case 1: + case 2: + case 6: + case 5: + case 7: + return pd(n.k, n.f); + case 3: + case 4: + return n.j == n.e; + default: + return n.n == null ? n.g == null : tt(n.n, n.g); + } + } + default: + return !1; + } + } + function IBn(n) { + gd(n, new Oa(ad(fd(ld(hd(new na(), Z6), "ELK Fixed"), "Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."), new D2n()))), Z(n, Z6, s0, _hn), Z(n, Z6, oA, cn(t9)), Z(n, Z6, Ttn, cn(Lhn)), Z(n, Z6, hg, cn(Nhn)), Z(n, Z6, ip, cn(Rhn)), Z(n, Z6, tB, cn(Bhn)); + } + function gM(n, e, t) { + var i, r, c, o, f; + if (i = ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))), f = ge(Ni(ah, rh(ge(Ni(t == null ? 0 : kt(t), dh)), 15))), c = J5(n, e, i), c && f == c.f && $f(t, c.i)) + return t; + if (o = Y5(n, t, f), o) + throw T(new Hn("value already present: " + t)); + return r = new VE(e, i, t, f), c ? (Yw(n, c), D7(n, r, c), c.e = null, c.c = null, c.i) : (D7(n, r, null), KFn(n), null); + } + function uke(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + a = t.a.c, o = t.a.c + t.a.b, c = u(te(t.c, e), 459), p = c.f, v = c.a, c.b ? h = new fn(o, p) : h = new fn(a, p), c.c ? d = new fn(a, v) : d = new fn(o, v), r = a, t.p || (r += n.c), r += t.F + t.v * n.b, l = new fn(r, p), g = new fn(r, v), V5(e.a, A(M(di, 1), q, 8, 0, [h, l])), f = t.d.a.gc() > 1, f && (i = new fn(r, t.b), Ke(e.a, i)), V5(e.a, A(M(di, 1), q, 8, 0, [g, d])); + } + function Qx(n, e, t) { + var i, r, c, o, f, h; + if (e) + if (t <= -1) { + if (i = On(e.Tg(), -1 - t), I(i, 99)) + return u(i, 18); + for (o = u(e.ah(i), 153), f = 0, h = o.gc(); f < h; ++f) + if (B(o.jl(f)) === B(n) && (r = o.il(f), I(r, 99) && (c = u(r, 18), c.Bb & uc))) + return c; + throw T(new $r("The containment feature could not be located")); + } else + return ir(u(On(n.Tg(), t), 18)); + else + return null; + } + function ske(n) { + var e, t, i, r, c; + for (i = n.length, e = new zv(), c = 0; c < i; ) + if (t = Di(n, c++), !(t == 9 || t == 10 || t == 12 || t == 13 || t == 32)) { + if (t == 35) { + for (; c < i && (t = Di(n, c++), !(t == 13 || t == 10)); ) + ; + continue; + } + t == 92 && c < i ? (r = (Te(c, n.length), n.charCodeAt(c))) == 35 || r == 9 || r == 10 || r == 12 || r == 13 || r == 32 ? (b3(e, r & Ut), ++c) : (e.a += "\\", b3(e, r & Ut), ++c) : b3(e, t & Ut); + } + return e.a; + } + function oke(n, e) { + var t, i, r; + for (i = new E(e); i.a < i.c.c.length; ) + if (t = u(y(i), 33), Tn(n.a, t, t), Tn(n.b, t, t), r = Tb(t), r.c.length != 0) + for (n.d && n.d.lg(r), Tn(n.a, t, (Ln(0, r.c.length), u(r.c[0], 33))), Tn(n.b, t, u(un(r, r.c.length - 1), 33)); rF(r).c.length != 0; ) + r = rF(r), n.d && n.d.lg(r), Tn(n.a, t, (Ln(0, r.c.length), u(r.c[0], 33))), Tn(n.b, t, u(un(r, r.c.length - 1), 33)); + } + function fke(n) { + var e, t, i, r, c, o, f, h, l, a; + for (t = 0, f = new E(n.d); f.a < f.c.c.length; ) + o = u(y(f), 101), o.i && (o.i.c = t++); + for (e = fa(_u, [q, wh], [177, 25], 16, [t, t], 2), a = n.d, r = 0; r < a.c.length; r++) + if (h = (Ln(r, a.c.length), u(a.c[r], 101)), h.i) + for (c = r + 1; c < a.c.length; c++) + l = (Ln(c, a.c.length), u(a.c[c], 101)), l.i && (i = Xve(h, l), e[h.i.c][l.i.c] = i, e[l.i.c][h.i.c] = i); + return e; + } + function sZ(n, e, t, i) { + var r, c, o; + return o = new J8n(e, t), n.a ? i ? (r = u(te(n.b, e), 283), ++r.a, o.d = i.d, o.e = i.e, o.b = i, o.c = i, i.e ? i.e.c = o : u(te(n.b, e), 283).b = o, i.d ? i.d.b = o : n.a = o, i.d = o, i.e = o) : (n.e.b = o, o.d = n.e, n.e = o, r = u(te(n.b, e), 283), r ? (++r.a, c = r.c, c.c = o, o.e = c, r.c = o) : (it(n.b, e, r = new XW(o)), ++n.c)) : (n.a = n.e = o, it(n.b, e, new XW(o)), ++n.c), ++n.d, o; + } + function Mb(n, e) { + var t, i, r, c, o, f, h, l; + for (t = new RegExp(e, "g"), h = F(tn, q, 2, 0, 6, 1), i = 0, l = n, c = null; ; ) + if (f = t.exec(l), f == null || l == "") { + h[i] = l; + break; + } else + o = f.index, h[i] = l.substr(0, o), l = Zu(l, o + f[0].length, l.length), t.lastIndex = 0, c == l && (h[i] = l.substr(0, 1), l = l.substr(1)), c = l, ++i; + if (n.length > 0) { + for (r = h.length; r > 0 && h[r - 1] == ""; ) + --r; + r < h.length && (h.length = r); + } + return h; + } + function oZ(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (d = Ar(e), l = null, r = !1, f = 0, a = wc(d.a).i; f < a; ++f) + o = u(X7(d, f, (c = u(D(wc(d.a), f), 87), h = c.c, I(h, 88) ? u(h, 26) : (Sn(), so))), 26), t = oZ(n, o), t.dc() || (l ? (r || (r = !0, l = new $E(l)), l.Gc(t)) : l = t); + return i = X6e(n, e), i.dc() ? l || (Pn(), Pn(), cr) : l ? (r || (l = new $E(l)), l.Gc(i), l) : i; + } + function Jx(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (d = Ar(e), l = null, i = !1, f = 0, a = wc(d.a).i; f < a; ++f) + c = u(X7(d, f, (r = u(D(wc(d.a), f), 87), h = r.c, I(h, 88) ? u(h, 26) : (Sn(), so))), 26), t = Jx(n, c), t.dc() || (l ? (i || (i = !0, l = new $E(l)), l.Gc(t)) : l = t); + return o = Eme(n, e), o.dc() ? l || (Pn(), Pn(), cr) : l ? (i || (l = new $E(l)), l.Gc(o), l) : o; + } + function q7(n, e, t) { + var i, r, c, o, f, h; + if (I(e, 72)) + return Gi(n, e, t); + for (f = null, c = null, i = u(n.g, 119), o = 0; o < n.i; ++o) + if (r = i[o], tt(e, r.dd()) && (c = r.ak(), I(c, 99) && u(c, 18).Bb & uc)) { + f = r; + break; + } + return f && (qu(n.e) && (h = c.$j() ? hl(n, 4, c, e, null, v4(n, c, e, I(c, 99) && (u(c, 18).Bb & Ji) != 0), !0) : hl(n, c.Kj() ? 2 : 1, c, e, c.zj(), -1, !0), t ? t.Ei(h) : t = h), t = q7(n, f, t)), t; + } + function hke(n) { + var e, t, i, r; + i = n.o, X0(), n.A.dc() || tt(n.A, prn) ? r = i.a : (r = F7(n.f), n.A.Hc((Qu(), My)) && !n.B.Hc((xu(), f9)) && (r = j.Math.max(r, F7(u(wr(n.p, (J(), Kn)), 244))), r = j.Math.max(r, F7(u(wr(n.p, ae), 244)))), e = MOn(n), e && (r = j.Math.max(r, e.a))), on(sn(n.e.yf().We((Xe(), BP)))) ? i.a = j.Math.max(i.a, r) : i.a = r, t = n.f.i, t.c = 0, t.b = r, tL(n.f); + } + function lke(n, e) { + var t, i, r, c, o, f, h, l, a; + if (t = e.Hh(n.a), t && (h = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), "memberTypes")), h != null)) { + for (l = new X(), c = Mb(h, "\\w"), o = 0, f = c.length; o < f; ++o) + r = c[o], i = r.lastIndexOf("#"), a = i == -1 ? iU(n, e.Aj(), r) : i == 0 ? _8(n, null, r.substr(1)) : _8(n, r.substr(0, i), r.substr(i + 1)), I(a, 148) && W(l, u(a, 148)); + return l; + } + return Pn(), Pn(), cr; + } + function ake(n, e, t) { + var i, r, c, o, f, h, l, a; + for (le(t, BKn, 1), n.bf(e), c = 0; n.df(c); ) { + for (a = new E(e.e); a.a < a.c.c.length; ) + for (h = u(y(a), 144), f = ul(of(A(M(gf, 1), rn, 20, 0, [e.e, e.d, e.b]))); Se(f); ) + o = u(ve(f), 357), o != h && (r = n.af(o, h), r && st(h.a, r)); + for (l = new E(e.e); l.a < l.c.c.length; ) + h = u(y(l), 144), i = h.a, $xn(i, -n.d, -n.d, n.d, n.d), st(h.d, i), Lo(i); + n.cf(), ++c; + } + ce(t); + } + function dke(n, e, t) { + var i, r, c, o; + if (o = _c(n.e.Tg(), e), i = u(n.g, 119), er(), u(e, 66).Oj()) { + for (c = 0; c < n.i; ++c) + if (r = i[c], o.rl(r.ak()) && tt(r, t)) + return Cb(n, c), !0; + } else if (t != null) { + for (c = 0; c < n.i; ++c) + if (r = i[c], o.rl(r.ak()) && tt(t, r.dd())) + return Cb(n, c), !0; + } else + for (c = 0; c < n.i; ++c) + if (r = i[c], o.rl(r.ak()) && r.dd() == null) + return Cb(n, c), !0; + return !1; + } + function bke(n, e) { + var t, i, r, c, o; + for (n.c == null || n.c.length < e.c.length ? n.c = F(_u, wh, 25, e.c.length, 16, 1) : qv(n.c), n.a = new X(), i = 0, o = new E(e); o.a < o.c.c.length; ) + r = u(y(o), 10), r.p = i++; + for (t = new Tt(), c = new E(e); c.a < c.c.c.length; ) + r = u(y(c), 10), n.c[r.p] || (vLn(n, r), t.b == 0 || (ne(t.b != 0), u(t.a.a.c, 15)).gc() < n.a.c.length ? _kn(t, n.a) : sa(t, n.a), n.a = new X()); + return t; + } + function wke(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v; + for (o = u(D(e, 0), 33), Zc(o, 0), nu(o, 0), g = new X(), g.c[g.c.length] = o, f = o, c = new bD(n.a, o.g, o.f, (w4(), Jm)), p = 1; p < e.i; p++) + v = u(D(e, p), 33), h = sL(n, Ng, v, f, c, g, t), l = sL(n, Ep, v, f, c, g, t), a = sL(n, Qm, v, f, c, g, t), d = sL(n, Vm, v, f, c, g, t), r = Sje(n, h, l, a, d, v, f, i), Zc(v, r.d), nu(v, r.e), mte(r, Jm), c = r, f = v, g.c[g.c.length] = v; + return c; + } + function OBn(n) { + gd(n, new Oa(ad(fd(ld(hd(new na(), x4), "ELK SPOrE Overlap Removal"), 'A node overlap removal algorithm proposed by Nachmanson et al. in "Node overlap removal by growing a tree".'), new zgn()))), Z(n, x4, gB, cn(Ofn)), Z(n, x4, s0, Ifn), Z(n, x4, $b, 8), Z(n, x4, mB, cn(EZn)), Z(n, x4, ytn, cn(Sfn)), Z(n, x4, jtn, cn(Pfn)), Z(n, x4, mk, (qn(), !1)); + } + function DBn(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p; + for (o = W0(e.c, t, i), d = new E(e.a); d.a < d.c.c.length; ) { + for (a = u(y(d), 10), st(a.n, o), p = new E(a.j); p.a < p.c.c.length; ) + for (g = u(y(p), 11), c = new E(g.g); c.a < c.c.c.length; ) + for (r = u(y(c), 17), hb(r.a, o), f = u(k(r, (nn(), Mr)), 74), f && hb(f, o), l = new E(r.b); l.a < l.c.c.length; ) + h = u(y(l), 70), st(h.n, o); + W(n.a, a), a.a = n; + } + } + function gke(n, e) { + var t, i, r, c, o; + if (le(e, "Node and Port Label Placement and Node Sizing", 1), byn((Vv(), new GD(n, !0, !0, new Vdn()))), u(k(n, (G(), Ac)), 21).Hc((fr(), $s))) + for (c = u(k(n, (nn(), Zb)), 21), r = c.Hc((Tu(), Ty)), o = on(sn(k(n, Asn))), i = new E(n.b); i.a < i.c.c.length; ) + t = u(y(i), 29), _t(pt(new $n(null, new xn(t.a, 16)), new Qdn()), new gEn(c, r, o)); + ce(e); + } + function pke(n, e) { + var t, i, r, c, o, f; + if (t = e.Hh(n.a), t && (f = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), vA)), f != null)) + switch (r = aE(f, tu(35)), i = e.Hj(), r == -1 ? (o = I5(n, is(i)), c = f) : r == 0 ? (o = null, c = f.substr(1)) : (o = f.substr(0, r), c = f.substr(r + 1)), Pd(Er(n, e))) { + case 2: + case 3: + return Twe(n, i, o, c); + case 0: + case 4: + case 5: + case 6: + return Mwe(n, i, o, c); + } + return null; + } + function fZ(n, e, t) { + var i, r, c, o, f; + if (o = (er(), u(e, 66).Oj()), zh(n.e, e)) { + if (e.hi() && vM(n, e, t, I(e, 99) && (u(e, 18).Bb & Ji) != 0)) + return !1; + } else + for (f = _c(n.e.Tg(), e), i = u(n.g, 119), c = 0; c < n.i; ++c) + if (r = i[c], f.rl(r.ak())) + return (o ? tt(r, t) : t == null ? r.dd() == null : tt(t, r.dd())) ? !1 : (u(Gw(n, c, o ? u(t, 72) : uh(e, t)), 72), !0); + return me(n, o ? u(t, 72) : uh(e, t)); + } + function G7(n) { + var e, t, i, r, c, o, f, h; + if (n.d) + throw T(new $r((Ph(HR), uN + HR.k + sN))); + for (n.c == (or(), mh) && cg(n, Zs), t = new E(n.a.a); t.a < t.c.c.length; ) + e = u(y(t), 189), e.e = 0; + for (o = new E(n.a.b); o.a < o.c.c.length; ) + for (c = u(y(o), 81), c.o = Vt, r = c.f.Kc(); r.Ob(); ) + i = u(r.Pb(), 81), ++i.d.e; + for (hCe(n), h = new E(n.a.b); h.a < h.c.c.length; ) + f = u(y(h), 81), f.k = !0; + return n; + } + function vke(n, e) { + var t, i, r, c, o, f, h, l; + for (f = new Hxn(n), t = new Tt(), Ht(t, e, t.c.b, t.c); t.b != 0; ) { + for (i = u(t.b == 0 ? null : (ne(t.b != 0), Ts(t, t.a.a)), 113), i.d.p = 1, o = new E(i.e); o.a < o.c.c.length; ) + r = u(y(o), 409), fxn(f, r), l = r.d, l.d.p == 0 && Ht(t, l, t.c.b, t.c); + for (c = new E(i.b); c.a < c.c.c.length; ) + r = u(y(c), 409), fxn(f, r), h = r.c, h.d.p == 0 && Ht(t, h, t.c.b, t.c); + } + return f; + } + function $Bn(n) { + var e, t, i, r, c; + if (i = K(Y(hn(n, (Xe(), VZn)))), i != 1) + for (rE(n, i * n.g, i * n.f), t = $re(Goe((!n.c && (n.c = new V(Ru, n, 9, 9)), n.c), new C2n())), c = ul(of(A(M(gf, 1), rn, 20, 0, [(!n.n && (n.n = new V(Rr, n, 1, 7)), n.n), (!n.c && (n.c = new V(Ru, n, 9, 9)), n.c), t]))); Se(c); ) + r = u(ve(c), 470), r.Gg(i * r.Dg(), i * r.Eg()), r.Fg(i * r.Cg(), i * r.Bg()), e = u(r.We(ghn), 8), e && (e.a *= i, e.b *= i); + } + function mke(n, e, t, i, r) { + var c, o, f, h, l, a, d, g; + for (o = new E(n.b); o.a < o.c.c.length; ) + for (c = u(y(o), 29), g = I8(c.a), l = g, a = 0, d = l.length; a < d; ++a) + switch (h = l[a], u(k(h, (nn(), Hc)), 163).g) { + case 1: + U8e(h), jr(h, e), nFn(h, !0, i); + break; + case 3: + O8e(h), jr(h, t), nFn(h, !1, r); + } + for (f = new Ii(n.b, 0); f.b < f.d.gc(); ) + (ne(f.b < f.d.gc()), u(f.d.Xb(f.c = f.b++), 29)).a.c.length == 0 && Wu(f); + } + function kke(n, e) { + var t, i, r, c, o, f, h; + if (t = e.Hh(n.a), t && (h = Ce(Ko((!t.b && (t.b = new Gu((Sn(), Zi), tc, t)), t.b), nin)), h != null)) { + for (i = new X(), c = Mb(h, "\\w"), o = 0, f = c.length; o < f; ++o) + r = c[o], An(r, "##other") ? W(i, "!##" + I5(n, is(e.Hj()))) : An(r, "##local") ? i.c[i.c.length] = null : An(r, Tk) ? W(i, I5(n, is(e.Hj()))) : i.c[i.c.length] = r; + return i; + } + return Pn(), Pn(), cr; + } + function yke(n, e) { + var t, i, r, c; + return t = new tan(), i = u(ts(Xc(new $n(null, new xn(n.f, 16)), t), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [(hf(), _b), ls]))), 21), r = i.gc(), i = u(ts(Xc(new $n(null, new xn(e.f, 16)), t), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [_b, ls]))), 21), c = i.gc(), r = r == 1 ? 1 : 0, c = c == 1 ? 1 : 0, r < c ? -1 : r == c ? 0 : 1; + } + function jke(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + for (f = n.i, r = on(sn(k(f, (nn(), Jb)))), a = 0, i = 0, l = new E(n.g); l.a < l.c.c.length; ) + h = u(y(l), 17), o = Wi(h), c = o && r && on(sn(k(h, Xa))), g = h.d.i, o && c ? ++i : o && !c ? ++a : qi(g).e == f ? ++i : ++a; + for (t = new E(n.e); t.a < t.c.c.length; ) + e = u(y(t), 17), o = Wi(e), c = o && r && on(sn(k(e, Xa))), d = e.c.i, o && c ? ++a : o && !c ? ++i : qi(d).e == f ? ++a : ++i; + return a - i; + } + function tg(n, e, t, i) { + this.e = n, this.k = u(k(n, (G(), Ig)), 304), this.g = F(vh, C1, 10, e, 0, 1), this.b = F(Si, q, 333, e, 7, 1), this.a = F(vh, C1, 10, e, 0, 1), this.d = F(Si, q, 333, e, 7, 1), this.j = F(vh, C1, 10, e, 0, 1), this.i = F(Si, q, 333, e, 7, 1), this.p = F(Si, q, 333, e, 7, 1), this.n = F(oi, q, 476, e, 8, 1), z9(this.n, (qn(), !1)), this.f = F(oi, q, 476, e, 8, 1), z9(this.f, !0), this.o = t, this.c = i; + } + function FBn(n, e) { + var t, i, r, c, o, f; + if (!e.dc()) + if (u(e.Xb(0), 286).d == (q2(), Gb)) + n4e(n, e); + else + for (i = e.Kc(); i.Ob(); ) { + switch (t = u(i.Pb(), 286), t.d.g) { + case 5: + h4(n, t, h2e(n, t)); + break; + case 0: + h4(n, t, (o = t.f - t.c + 1, f = (o - 1) / 2 | 0, t.c + f)); + break; + case 4: + h4(n, t, C0e(n, t)); + break; + case 2: + u$n(t), h4(n, t, (c = $J(t), c ? t.c : t.f)); + break; + case 1: + u$n(t), h4(n, t, (r = $J(t), r ? t.f : t.c)); + } + Jve(t.a); + } + } + function Eke(n, e) { + var t, i, r, c, o, f, h; + if (!e.e) { + for (e.e = !0, i = e.d.a.ec().Kc(); i.Ob(); ) { + if (t = u(i.Pb(), 17), e.o && e.d.a.gc() <= 1) { + o = e.a.c, f = e.a.c + e.a.b, h = new fn(o + (f - o) / 2, e.b), Ke(u(e.d.a.ec().Kc().Pb(), 17).a, h); + continue; + } + if (r = u(te(e.c, t), 459), r.b || r.c) { + uke(n, t, e); + continue; + } + c = n.d == (V3(), Rm) && (r.d || r.e) && pme(n, e) && e.d.a.gc() <= 1, c ? qEe(t, e) : C7e(n, t, e); + } + e.k && $i(e.d, new Cdn()); + } + } + function hZ(n, e, t, i, r, c) { + var o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (g = c, f = (i + r) / 2 + g, C = t * j.Math.cos(f), S = t * j.Math.sin(f), $ = C - e.g / 2, O = S - e.f / 2, Zc(e, $), nu(e, O), d = n.a.jg(e), m = 2 * j.Math.acos(t / t + n.c), m < r - i ? (p = m / d, o = (i + r - m) / 2) : (p = (r - i) / d, o = i), v = Tb(e), n.e && (n.e.kg(n.d), n.e.lg(v)), l = new E(v); l.a < l.c.c.length; ) + h = u(y(l), 33), a = n.a.jg(h), hZ(n, h, t + n.c, o, o + p * a, c), o += p * a; + } + function Cke(n, e, t) { + var i; + switch (i = t.q.getMonth(), e) { + case 5: + De(n, A(M(tn, 1), q, 2, 6, ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"])[i]); + break; + case 4: + De(n, A(M(tn, 1), q, 2, 6, [IL, OL, DL, $L, V2, FL, xL, LL, NL, BL, RL, _L])[i]); + break; + case 3: + De(n, A(M(tn, 1), q, 2, 6, ["Jan", "Feb", "Mar", "Apr", V2, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])[i]); + break; + default: + sh(n, i + 1, e); + } + } + function Yx(n, e) { + var t, i, r, c, o; + if (le(e, "Network simplex", 1), n.e.a.c.length < 1) { + ce(e); + return; + } + for (c = new E(n.e.a); c.a < c.c.c.length; ) + r = u(y(c), 121), r.e = 0; + for (o = n.e.a.c.length >= 40, o && lye(n), wje(n), X8e(n), t = WDn(n), i = 0; t && i < n.f; ) + Ake(n, t, Wme(n, t)), t = WDn(n), ++i; + o && pve(n), n.a ? s9e(n, SBn(n)) : SBn(n), n.b = null, n.d = null, n.p = null, n.c = null, n.g = null, n.i = null, n.n = null, n.o = null, ce(e); + } + function Tke(n, e, t, i) { + var r, c, o, f, h, l, a, d, g; + for (h = new fn(t, i), ji(h, u(k(e, (dl(), vm)), 8)), g = new E(e.e); g.a < g.c.c.length; ) + d = u(y(g), 144), st(d.d, h), W(n.e, d); + for (f = new E(e.c); f.a < f.c.c.length; ) { + for (o = u(y(f), 282), c = new E(o.a); c.a < c.c.c.length; ) + r = u(y(c), 559), st(r.d, h); + W(n.c, o); + } + for (a = new E(e.d); a.a < a.c.c.length; ) + l = u(y(a), 447), st(l.d, h), W(n.d, l); + } + function lZ(n, e) { + var t, i, r, c, o, f, h, l; + for (h = new E(e.j); h.a < h.c.c.length; ) + for (f = u(y(h), 11), r = new uf(f.b); Kr(r.a) || Kr(r.b); ) + i = u(Kr(r.a) ? y(r.a) : y(r.b), 17), t = i.c == f ? i.d : i.c, c = t.i, e != c && (l = u(k(i, (nn(), dv)), 19).a, l < 0 && (l = 0), o = c.p, n.b[o] == 0 && (i.d == t ? (n.a[o] -= l + 1, n.a[o] <= 0 && n.c[o] > 0 && Ke(n.f, c)) : (n.c[o] -= l + 1, n.c[o] <= 0 && n.a[o] > 0 && Ke(n.e, c)))); + } + function Mke(n) { + var e, t, i, r, c, o, f, h, l; + for (f = new Y1(u(pe(new Wln()), 62)), l = Vt, t = new E(n.d); t.a < t.c.c.length; ) { + for (e = u(y(t), 222), l = e.c.c; f.a.c != 0 && (h = u(nhe(r0e(f.a)), 222), h.c.c + h.c.b < l); ) + R5(f.a, h) != null; + for (o = (r = new T5(new j5(new P9(f.a).a).b), new I9(r)); G9(o.a.a); ) + c = (i = pE(o.a), u(i.cd(), 222)), Ke(c.b, e), Ke(e.b, c); + bT(f.a, e, (qn(), Ga)) == null; + } + } + function xBn(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (c = new Ic(e.c.length), l = new E(e); l.a < l.c.c.length; ) + o = u(y(l), 10), W(c, n.b[o.c.p][o.p]); + for (xje(n, c, t), d = null; d = LEe(c); ) + Mye(n, u(d.a, 233), u(d.b, 233), c); + for (e.c = F(Zn, rn, 1, 0, 5, 1), r = new E(c); r.a < r.c.c.length; ) + for (i = u(y(r), 233), f = i.d, h = 0, a = f.length; h < a; ++h) + o = f[h], e.c[e.c.length] = o, n.a[o.c.p][o.p].a = Zo(i.g, i.d[0]).a; + } + function aZ(n, e) { + var t, i, r, c; + if (0 < (I(n, 14) ? u(n, 14).gc() : Fh(n.Kc()))) { + if (r = e, 1 < r) { + for (--r, c = new fgn(), i = n.Kc(); i.Ob(); ) + t = u(i.Pb(), 86), c = of(A(M(gf, 1), rn, 20, 0, [c, new X1(t)])); + return aZ(c, r); + } + if (r < 0) { + for (c = new hgn(), i = n.Kc(); i.Ob(); ) + t = u(i.Pb(), 86), c = of(A(M(gf, 1), rn, 20, 0, [c, new X1(t)])); + if (0 < (I(c, 14) ? u(c, 14).gc() : Fh(c.Kc()))) + return aZ(c, r); + } + } + return u(fE(n.Kc()), 86); + } + function xu() { + xu = N, Tv = new jw("DEFAULT_MINIMUM_SIZE", 0), Py = new jw("MINIMUM_SIZE_ACCOUNTS_FOR_PADDING", 1), GP = new jw("COMPUTE_PADDING", 2), f9 = new jw("OUTSIDE_NODE_LABELS_OVERHANG", 3), zP = new jw("PORTS_OVERHANG", 4), WP = new jw("UNIFORM_PORT_SPACING", 5), UP = new jw("SPACE_EFFICIENT_PORT_LABELS", 6), sH = new jw("FORCE_TABULAR_NODE_LABELS", 7), Sy = new jw("ASYMMETRICAL", 8); + } + function Zx(n, e) { + var t, i, r, c, o, f, h, l; + if (e) { + if (t = (c = e.Tg(), c ? is(c).Nh().Jh(c) : null), t) { + for (Sa(n, e, t), r = e.Tg(), h = 0, l = (r.i == null && Lf(r), r.i).length; h < l; ++h) + f = (i = (r.i == null && Lf(r), r.i), h >= 0 && h < i.length ? i[h] : null), f.Ij() && !f.Jj() && (I(f, 322) ? Lpe(n, u(f, 34), e, t) : (o = u(f, 18), o.Bb & uc && U4e(n, o, e, t))); + e.kh() && u(t, 49).vh(u(e, 49).qh()); + } + return t; + } else + return null; + } + function Ake(n, e, t) { + var i, r, c; + if (!e.f) + throw T(new Hn("Given leave edge is no tree edge.")); + if (t.f) + throw T(new Hn("Given enter edge is a tree edge already.")); + for (e.f = !1, Pz(n.p, e), t.f = !0, ci(n.p, t), i = t.e.e - t.d.e - t.a, Ix(n, t.e, e) || (i = -i), c = new E(n.e.a); c.a < c.c.c.length; ) + r = u(y(c), 121), Ix(n, r, e) || (r.e += i); + n.j = 1, qv(n.c), gY(n, u(y(new E(n.e.a)), 121)), qRn(n); + } + function LBn(n, e) { + var t, i, r, c, o, f; + if (f = u(k(e, (nn(), Bt)), 98), f == (Ai(), jh) || f == Sc) + for (r = new fn(e.f.a + e.d.b + e.d.c, e.f.b + e.d.d + e.d.a).b, o = new E(n.a); o.a < o.c.c.length; ) + c = u(y(o), 10), c.k == (Qn(), Xt) && (t = u(k(c, (G(), ec)), 61), !(t != (J(), Vn) && t != Gn) && (i = K(Y(k(c, y0))), f == jh && (i *= r), c.n.b = i - u(k(c, C0), 8).b, lT(c, !1, !0))); + } + function NBn(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p; + if (U0e(n, e, t), c = e[t], p = i ? (J(), Gn) : (J(), Vn), Ace(e.length, t, i)) { + for (r = e[i ? t - 1 : t + 1], LX(n, r, i ? (sr(), Lc) : (sr(), Au)), h = c, a = 0, g = h.length; a < g; ++a) + o = h[a], eJ(n, o, p); + for (LX(n, c, i ? (sr(), Au) : (sr(), Lc)), f = r, l = 0, d = f.length; l < d; ++l) + o = f[l], o.e || eJ(n, o, b7(p)); + } else + for (f = c, l = 0, d = f.length; l < d; ++l) + o = f[l], eJ(n, o, p); + return !1; + } + function Ske(n, e, t, i) { + var r, c, o, f, h, l, a; + h = zr(e, t), (t == (J(), ae) || t == Gn) && (h = I(h, 152) ? I2(u(h, 152)) : I(h, 131) ? u(h, 131).a : I(h, 54) ? new od(h) : new K0(h)), o = !1; + do + for (r = !1, c = 0; c < h.gc() - 1; c++) + l = u(h.Xb(c), 11), f = u(h.Xb(c + 1), 11), c5e(n, l, f, i) && (o = !0, l$(n.a, u(h.Xb(c), 11), u(h.Xb(c + 1), 11)), a = u(h.Xb(c + 1), 11), h._c(c + 1, u(h.Xb(c), 11)), h._c(c, a), r = !0); + while (r); + return o; + } + function Pke(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + if (qu(n.e)) { + if (e != t && (r = u(n.g, 119), p = r[t], o = p.ak(), zh(n.e, o))) { + for (v = _c(n.e.Tg(), o), h = -1, f = -1, i = 0, l = 0, d = e > t ? e : t; l <= d; ++l) + l == t ? f = i++ : (c = r[l], a = v.rl(c.ak()), l == e && (h = l == d && !a ? i - 1 : i), a && ++i); + return g = u(o6(n, e, t), 72), f != h && qp(n, new R8(n.e, 7, o, Q(f), p.dd(), h)), g; + } + } else + return u(Dx(n, e, t), 72); + return u(o6(n, e, t), 72); + } + function Ike(n, e) { + var t, i, r, c, o, f, h; + for (le(e, "Port order processing", 1), h = u(k(n, (nn(), Ssn)), 421), i = new E(n.b); i.a < i.c.c.length; ) + for (t = u(y(i), 29), c = new E(t.a); c.a < c.c.c.length; ) + r = u(y(c), 10), o = u(k(r, Bt), 98), f = r.j, o == (Ai(), id) || o == jh || o == Sc ? (Pn(), wi(f, Fcn)) : o != jf && o != ql && (Pn(), wi(f, zWn), zpe(f), h == (z8(), rK) && wi(f, GWn)), r.i = !0, dY(r); + ce(e); + } + function Oke(n) { + var e, t, i, r, c, o, f, h; + for (h = new we(), e = new LI(), o = n.Kc(); o.Ob(); ) + r = u(o.Pb(), 10), f = yd(K9(new ca(), r), e), Rc(h.f, r, f); + for (c = n.Kc(); c.Ob(); ) + for (r = u(c.Pb(), 10), i = new re(ue(ei(r).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), !Wi(t) && jo(lo(ho(fo(ao(new Ns(), j.Math.max(1, u(k(t, (nn(), Psn)), 19).a)), 1), u(te(h, t.c.i), 121)), u(te(h, t.d.i), 121))); + return e; + } + function BBn() { + BBn = N, PJn = Ze(new li(), (Vi(), Tc), (rr(), mcn)), bon = Ze(new li(), Kc, lS), OJn = ju(Ze(new li(), Kc, mS), Or, vS), SJn = ju(Ze(Ze(new li(), Kc, bcn), Tc, wcn), Or, gcn), DJn = Vd(Vd(Dj(ju(Ze(new li(), Vf, ES), Or, jS), Tc), yS), CS), IJn = ju(new li(), Or, kcn), MJn = ju(Ze(Ze(Ze(new li(), $l, dS), Tc, wS), Tc, Q4), Or, bS), AJn = ju(Ze(Ze(new li(), Tc, Q4), Tc, hS), Or, fS); + } + function Dke(n, e, t, i, r, c) { + var o, f, h, l, a, d, g; + for (l = ZOn(e) - ZOn(n), o = Sxn(e, l), h = Nc(0, 0, 0); l >= 0 && (f = $3e(n, o), !(f && (l < 22 ? h.l |= 1 << l : l < 44 ? h.m |= 1 << l - 22 : h.h |= 1 << l - 44, n.l == 0 && n.m == 0 && n.h == 0))); ) + a = o.m, d = o.h, g = o.l, o.h = d >>> 1, o.m = a >>> 1 | (d & 1) << 21, o.l = g >>> 1 | (a & 1) << 21, --l; + return t && sF(h), c && (i ? (Il = G3(n), r && (Il = xOn(Il, (P3(), gin)))) : Il = Nc(n.l, n.m, n.h)), h; + } + function $ke(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (l = n.e[e.c.p][e.p] + 1, h = e.c.a.c.length + 1, f = new E(n.a); f.a < f.c.c.length; ) { + for (o = u(y(f), 11), d = 0, c = 0, r = ul(of(A(M(gf, 1), rn, 20, 0, [new Hp(o), new n2(o)]))); Se(r); ) + i = u(ve(r), 11), i.i.c == e.c && (d += yce(n, i.i) + 1, ++c); + t = d / c, a = o.j, a == (J(), Vn) ? t < l ? n.f[o.p] = n.c - t : n.f[o.p] = n.b + (h - t) : a == Gn && (t < l ? n.f[o.p] = n.b + t : n.f[o.p] = n.c - (h - t)); + } + } + function ss(n, e, t) { + var i, r, c, o, f; + if (n == null) + throw T(new Sf(iu)); + for (c = n.length, o = c > 0 && (Te(0, n.length), n.charCodeAt(0) == 45 || (Te(0, n.length), n.charCodeAt(0) == 43)) ? 1 : 0, i = o; i < c; i++) + if (S$n((Te(i, n.length), n.charCodeAt(i))) == -1) + throw T(new Sf(u0 + n + '"')); + if (f = parseInt(n, 10), r = f < e, isNaN(f)) + throw T(new Sf(u0 + n + '"')); + if (r || f > t) + throw T(new Sf(u0 + n + '"')); + return f; + } + function Fke(n) { + var e, t, i, r, c, o, f; + for (o = new Tt(), c = new E(n.a); c.a < c.c.c.length; ) + r = u(y(c), 112), II(r, r.f.c.length), ej(r, r.k.c.length), r.i == 0 && (r.o = 0, Ht(o, r, o.c.b, o.c)); + for (; o.b != 0; ) + for (r = u(o.b == 0 ? null : (ne(o.b != 0), Ts(o, o.a.a)), 112), i = r.o + 1, t = new E(r.f); t.a < t.c.c.length; ) + e = u(y(t), 129), f = e.a, aq(f, j.Math.max(f.o, i)), ej(f, f.i - 1), f.i == 0 && Ht(o, f, o.c.b, o.c); + } + function xke(n) { + var e, t, i, r, c, o, f, h; + for (o = new E(n); o.a < o.c.c.length; ) { + for (c = u(y(o), 79), i = Ir(u(D((!c.b && (c.b = new Fn(he, c, 4, 7)), c.b), 0), 82)), f = i.i, h = i.j, r = u(D((!c.a && (c.a = new V(Mt, c, 6, 6)), c.a), 0), 202), uE(r, r.j + f, r.k + h), cE(r, r.b + f, r.c + h), t = new ie((!r.a && (r.a = new Yt(io, r, 5)), r.a)); t.e != t.i.gc(); ) + e = u(oe(t), 469), mz(e, e.a + f, e.b + h); + EV(u(hn(c, (Xe(), Rg)), 74), f, h); + } + } + function p4(n) { + var e; + switch (n) { + case 100: + return ug(am, !0); + case 68: + return ug(am, !1); + case 119: + return ug(JB, !0); + case 87: + return ug(JB, !1); + case 115: + return ug(YB, !0); + case 83: + return ug(YB, !1); + case 99: + return ug(ZB, !0); + case 67: + return ug(ZB, !1); + case 105: + return ug(nR, !0); + case 73: + return ug(nR, !1); + default: + throw T(new _r((e = n, YGn + e.toString(16)))); + } + } + function Lke(n) { + var e, t, i, r, c; + switch (r = u(un(n.a, 0), 10), e = new qh(n), W(n.a, e), e.o.a = j.Math.max(1, r.o.a), e.o.b = j.Math.max(1, r.o.b), e.n.a = r.n.a, e.n.b = r.n.b, u(k(r, (G(), ec)), 61).g) { + case 4: + e.n.a += 2; + break; + case 1: + e.n.b += 2; + break; + case 2: + e.n.a -= 2; + break; + case 3: + e.n.b -= 2; + } + return i = new gc(), Hr(i, e), t = new Id(), c = u(un(r.j, 0), 11), Ki(t, c), Ti(t, i), st(Lo(i.n), c.n), st(Lo(i.a), c.a), e; + } + function RBn(n, e, t, i, r) { + t && (!i || (n.c - n.b & n.a.length - 1) > 1) && e == 1 && u(n.a[n.b], 10).k == (Qn(), Ju) ? W2(u(n.a[n.b], 10), (us(), kh)) : i && (!t || (n.c - n.b & n.a.length - 1) > 1) && e == 1 && u(n.a[n.c - 1 & n.a.length - 1], 10).k == (Qn(), Ju) ? W2(u(n.a[n.c - 1 & n.a.length - 1], 10), (us(), Kl)) : (n.c - n.b & n.a.length - 1) == 2 ? (W2(u(t6(n), 10), (us(), kh)), W2(u(t6(n), 10), Kl)) : S9e(n, r), kX(n); + } + function Nke(n, e, t) { + var i, r, c, o, f; + for (c = 0, r = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); r.e != r.i.gc(); ) + i = u(oe(r), 33), o = "", (!i.n && (i.n = new V(Rr, i, 1, 7)), i.n).i == 0 || (o = u(D((!i.n && (i.n = new V(Rr, i, 1, 7)), i.n), 0), 137).a), f = new hF(c++, e, o), Pr(f, i), H(f, (cc(), Wm), i), f.e.b = i.j + i.f / 2, f.f.a = j.Math.max(i.g, 1), f.e.a = i.i + i.g / 2, f.f.b = j.Math.max(i.f, 1), Ke(e.b, f), Rc(t.f, i, f); + } + function Bke(n) { + var e, t, i, r, c; + i = u(k(n, (G(), rt)), 33), c = u(hn(i, (nn(), Va)), 174).Hc((Qu(), rd)), n.e || (r = u(k(n, Ac), 21), e = new fn(n.f.a + n.d.b + n.d.c, n.f.b + n.d.d + n.d.a), r.Hc((fr(), $s)) ? (pr(i, Bt, (Ai(), Sc)), i0(i, e.a, e.b, !1, !0)) : on(sn(hn(i, H_))) || i0(i, e.a, e.b, !0, !0)), c ? pr(i, Va, Cn(rd)) : pr(i, Va, (t = u(xo(o9), 9), new ks(t, u(bo(t, t.length), 9), 0))); + } + function dZ(n, e, t) { + var i, r, c, o; + if (e[0] >= n.length) + return t.o = 0, !0; + switch (Di(n, e[0])) { + case 43: + r = 1; + break; + case 45: + r = -1; + break; + default: + return t.o = 0, !0; + } + if (++e[0], c = e[0], o = tM(n, e), o == 0 && e[0] == c) + return !1; + if (e[0] < n.length && Di(n, e[0]) == 58) { + if (i = o * 60, ++e[0], c = e[0], o = tM(n, e), o == 0 && e[0] == c) + return !1; + i += o; + } else + i = o, i < 24 && e[0] - c <= 2 ? i *= 60 : i = i % 100 + (i / 100 | 0) * 60; + return i *= r, t.o = -i, !0; + } + function Rke(n) { + var e, t, i, r, c, o, f, h, l; + for (o = new X(), i = new re(ue(ei(n.b).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), Wi(t) && W(o, new MSn(t, lPn(n, t.c), lPn(n, t.d))); + for (l = (c = new Mh(n.e).a.vc().Kc(), new N0(c)); l.a.Ob(); ) + f = (e = u(l.a.Pb(), 42), u(e.dd(), 113)), f.d.p = 0; + for (h = (r = new Mh(n.e).a.vc().Kc(), new N0(r)); h.a.Ob(); ) + f = (e = u(h.a.Pb(), 42), u(e.dd(), 113)), f.d.p == 0 && W(n.d, vke(n, f)); + } + function _ke(n) { + var e, t, i, r, c, o, f; + for (c = nf(n), r = new ie((!n.e && (n.e = new Fn(bi, n, 7, 4)), n.e)); r.e != r.i.gc(); ) + if (i = u(oe(r), 79), f = Ir(u(D((!i.c && (i.c = new Fn(he, i, 5, 8)), i.c), 0), 82)), !fb(f, c)) + return !0; + for (t = new ie((!n.d && (n.d = new Fn(bi, n, 8, 5)), n.d)); t.e != t.i.gc(); ) + if (e = u(oe(t), 79), o = Ir(u(D((!e.b && (e.b = new Fn(he, e, 4, 7)), e.b), 0), 82)), !fb(o, c)) + return !0; + return !1; + } + function Kke(n) { + var e, t, i, r, c, o, f, h; + for (h = new fu(), e = _e(n, 0), f = null, t = u(Re(e), 8), r = u(Re(e), 8); e.b != e.d.c; ) + f = t, t = r, r = u(Re(e), 8), c = rIn(ji(new fn(f.a, f.b), t)), o = rIn(ji(new fn(r.a, r.b), t)), i = 10, i = j.Math.min(i, j.Math.abs(c.a + c.b) / 2), i = j.Math.min(i, j.Math.abs(o.a + o.b) / 2), c.a = m8(c.a) * i, c.b = m8(c.b) * i, o.a = m8(o.a) * i, o.b = m8(o.b) * i, Ke(h, st(c, t)), Ke(h, st(o, t)); + return h; + } + function os(n, e, t, i) { + var r, c, o, f, h; + return o = n.eh(), h = n.Zg(), r = null, h ? e && !(Qx(n, e, t).Bb & Ji) ? (i = Gi(h.Vk(), n, i), n.uh(null), r = e.fh()) : h = null : (o && (h = o.fh()), e && (r = e.fh())), h != r && h && h.Zk(n), f = n.Vg(), n.Rg(e, t), h != r && r && r.Yk(n), n.Lg() && n.Mg() && (o && f >= 0 && f != t && (c = new gi(n, 1, f, o, null), i ? i.Ei(c) : i = c), t >= 0 && (c = new gi(n, 1, t, f == t ? o : null, e), i ? i.Ei(c) : i = c)), i; + } + function _Bn(n) { + var e, t, i; + if (n.b == null) { + if (i = new r1(), n.i != null && (br(i, n.i), i.a += ":"), n.f & 256) { + for (n.f & 256 && n.a != null && (n1e(n.i) || (i.a += "//"), br(i, n.a)), n.d != null && (i.a += "/", br(i, n.d)), n.f & 16 && (i.a += "/"), e = 0, t = n.j.length; e < t; e++) + e != 0 && (i.a += "/"), br(i, n.j[e]); + n.g != null && (i.a += "?", br(i, n.g)); + } else + br(i, n.a); + n.e != null && (i.a += "#", br(i, n.e)), n.b = i.a; + } + return n.b; + } + function Hke(n, e) { + var t, i, r, c, o, f; + for (r = new E(e.a); r.a < r.c.c.length; ) + i = u(y(r), 10), c = k(i, (G(), rt)), I(c, 11) && (o = u(c, 11), f = cRn(e, i, o.o.a, o.o.b), o.n.a = f.a, o.n.b = f.b, si(o, u(k(i, ec), 61))); + t = new fn(e.f.a + e.d.b + e.d.c, e.f.b + e.d.d + e.d.a), u(k(e, (G(), Ac)), 21).Hc((fr(), $s)) ? (H(n, (nn(), Bt), (Ai(), Sc)), u(k(qi(n), Ac), 21).Fc(sv), HRn(n, t, !1)) : HRn(n, t, !0); + } + function qke(n, e, t) { + var i, r, c, o, f, h; + if (le(t, "Minimize Crossings " + n.a, 1), i = e.b.c.length == 0 || !Wv(pt(new $n(null, new xn(e.b, 16)), new Fv(new Cwn()))).sd((ua(), X4)), h = e.b.c.length == 1 && u(un(e.b, 0), 29).a.c.length == 1, c = B(k(e, (nn(), Qb))) === B((_h(), x1)), i || h && !c) { + ce(t); + return; + } + r = R8e(n, e), o = (f = u(qo(r, 0), 214), f.c.Rf() ? f.c.Lf() ? new h6n(n) : new l6n(n) : new f6n(n)), _we(r, o), age(n), ce(t); + } + function Gke(n, e, t, i) { + var r, c, o, f, h; + if (h = ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))), r = ge(Ni(ah, rh(ge(Ni(t == null ? 0 : kt(t), dh)), 15))), f = Y5(n, e, h), o = J5(n, t, r), f && r == f.a && $f(t, f.g)) + return t; + if (o && !i) + throw T(new Hn("key already present: " + t)); + return f && Yw(n, f), o && Yw(n, o), c = new VE(t, r, e, h), D7(n, c, o), o && (o.e = null, o.c = null), f && (f.e = null, f.c = null), KFn(n), f ? f.g : null; + } + function KBn(n, e, t) { + var i, r, c, o, f; + for (c = 0; c < e; c++) { + for (i = 0, f = c + 1; f < e; f++) + i = Hi(Hi(Ni(ui(n[c], hr), ui(n[f], hr)), ui(t[c + f], hr)), ui(ge(i), hr)), t[c + f] = ge(i), i = Y0(i, 32); + t[c + e] = ge(i); + } + for (ybe(t, t, e << 1), i = 0, r = 0, o = 0; r < e; ++r, o++) + i = Hi(Hi(Ni(ui(n[r], hr), ui(n[r], hr)), ui(t[o], hr)), ui(ge(i), hr)), t[o] = ge(i), i = Y0(i, 32), ++o, i = Hi(i, ui(t[o], hr)), t[o] = ge(i), i = Y0(i, 32); + return t; + } + function HBn(n, e, t) { + var i, r, c, o, f, h, l, a; + if (!j3(e)) { + for (h = K(Y(wb(t.c, (nn(), Fm)))), l = u(wb(t.c, ny), 142), !l && (l = new Bv()), i = t.a, r = null, f = e.Kc(); f.Ob(); ) + o = u(f.Pb(), 11), a = 0, r ? (a = h, a += r.o.b) : a = l.d, c = yd(K9(new ca(), o), n.f), it(n.k, o, c), jo(lo(ho(fo(ao(new Ns(), 0), Gt(j.Math.ceil(a))), i), c)), r = o, i = c; + jo(lo(ho(fo(ao(new Ns(), 0), Gt(j.Math.ceil(l.a + r.o.b))), i), t.d)); + } + } + function zke(n, e, t, i, r, c, o, f) { + var h, l, a, d, g, p; + return p = !1, g = c - t.s, a = t.t - e.f + (l = O6(t, g, !1), l.a), i.g + f > g ? !1 : (d = (h = O6(i, g, !1), h.a), a + f + d <= e.b && (B8(t, c - t.s), t.c = !0, B8(i, c - t.s), k7(i, t.s, t.t + t.d + f), i.k = !0, TV(t.q, i), p = !0, r && (XC(e, i), i.j = e, n.c.length > o && (T7((Ln(o, n.c.length), u(n.c[o], 200)), i), (Ln(o, n.c.length), u(n.c[o], 200)).a.c.length == 0 && l1(n, o)))), p); + } + function Uke(n, e) { + var t, i, r, c, o, f; + if (le(e, "Partition midprocessing", 1), r = new Dd(), _t(pt(new $n(null, new xn(n.a, 16)), new w0n()), new I5n(r)), r.d != 0) { + for (f = u(ts($Mn((c = r.i, new $n(null, (c || (r.i = new Sw(r, r.c))).Nc()))), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), i = f.Kc(), t = u(i.Pb(), 19); i.Ob(); ) + o = u(i.Pb(), 19), V9e(u(ct(r, t), 21), u(ct(r, o), 21)), t = o; + ce(e); + } + } + function qBn(n, e, t) { + var i, r, c, o, f, h, l, a; + if (e.p == 0) { + for (e.p = 1, o = t, o || (r = new X(), c = (i = u(xo(Yi), 9), new ks(i, u(bo(i, i.length), 9), 0)), o = new Pi(r, c)), u(o.a, 15).Fc(e), e.k == (Qn(), Xt) && u(o.b, 21).Fc(u(k(e, (G(), ec)), 61)), h = new E(e.j); h.a < h.c.c.length; ) + for (f = u(y(h), 11), a = ul(of(A(M(gf, 1), rn, 20, 0, [new Hp(f), new n2(f)]))); Se(a); ) + l = u(ve(a), 11), qBn(n, l.i, o); + return o; + } + return null; + } + function A6(n, e) { + var t, i, r, c, o; + if (n.Ab) { + if (n.Ab) { + if (o = n.Ab.i, o > 0) { + if (r = u(n.Ab.g, 1934), e == null) { + for (c = 0; c < o; ++c) + if (t = r[c], t.d == null) + return t; + } else + for (c = 0; c < o; ++c) + if (t = r[c], An(e, t.d)) + return t; + } + } else if (e == null) { + for (i = new ie(n.Ab); i.e != i.i.gc(); ) + if (t = u(oe(i), 590), t.d == null) + return t; + } else + for (i = new ie(n.Ab); i.e != i.i.gc(); ) + if (t = u(oe(i), 590), An(e, t.d)) + return t; + } + return null; + } + function Wke(n, e) { + var t, i, r, c, o, f, h, l; + if (l = sn(k(e, (n0(), sYn))), l == null || (_n(l), l)) { + for (mme(n, e), r = new X(), h = _e(e.b, 0); h.b != h.d.c; ) + o = u(Re(h), 86), t = cY(n, o, null), t && (Pr(t, e), r.c[r.c.length] = t); + if (n.a = null, n.b = null, r.c.length > 1) + for (i = new E(r); i.a < i.c.c.length; ) + for (t = u(y(i), 135), c = 0, f = _e(t.b, 0); f.b != f.d.c; ) + o = u(Re(f), 86), o.g = c++; + return r; + } + return cf(A(M(rMe, 1), ynn, 135, 0, [e])); + } + function Xke(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + p = Lae(n, xV(e), r), mV(p, $h(r, Uf)), Dt = null, v = r, m = q5(v, Cqn), C = new X6n(p), w5e(C.a, m), S = q5(v, "endPoint"), $ = new Y6n(p), b5e($.a, S), O = xd(v, pA), x = new emn(p), tve(x.a, O), d = $h(r, xtn), c = new gkn(n, p), Aue(c.a, c.b, d), g = $h(r, Ftn), o = new pkn(n, p), Sue(o.a, o.b, g), l = xd(r, Ntn), f = new vkn(t, p), _3e(f.b, f.a, l), a = xd(r, Ltn), h = new mkn(i, p), K3e(h.b, h.a, a); + } + function bZ(n, e, t) { + var i, r, c, o, f; + switch (f = null, e.g) { + case 1: + for (r = new E(n.j); r.a < r.c.c.length; ) + if (i = u(y(r), 11), on(sn(k(i, (G(), T_))))) + return i; + f = new gc(), H(f, (G(), T_), (qn(), !0)); + break; + case 2: + for (o = new E(n.j); o.a < o.c.c.length; ) + if (c = u(y(o), 11), on(sn(k(c, (G(), A_))))) + return c; + f = new gc(), H(f, (G(), A_), (qn(), !0)); + } + return f && (Hr(f, n), si(f, t), Kpe(f.n, n.o, t)), f; + } + function GBn(n, e) { + var t, i, r, c, o, f; + for (f = -1, o = new Tt(), i = new uf(n.b); Kr(i.a) || Kr(i.b); ) { + for (t = u(Kr(i.a) ? y(i.a) : y(i.b), 17), f = j.Math.max(f, K(Y(k(t, (nn(), P1))))), t.c == n ? _t(pt(new $n(null, new xn(t.b, 16)), new ldn()), new m5n(o)) : _t(pt(new $n(null, new xn(t.b, 16)), new adn()), new k5n(o)), c = _e(o, 0); c.b != c.d.c; ) + r = u(Re(c), 70), ai(r, (G(), wp)) || H(r, wp, t); + Zt(e, o), _s(o); + } + return f; + } + function Vke(n, e, t, i, r) { + var c, o, f, h; + c = new qh(n), ta(c, (Qn(), Mc)), H(c, (nn(), Bt), (Ai(), Sc)), H(c, (G(), rt), e.c.i), o = new gc(), H(o, rt, e.c), si(o, r), Hr(o, c), H(e.c, Mu, c), f = new qh(n), ta(f, Mc), H(f, Bt, Sc), H(f, rt, e.d.i), h = new gc(), H(h, rt, e.d), si(h, r), Hr(h, f), H(e.d, Mu, f), Ki(e, o), Ti(e, h), ib(0, t.c.length), e5(t.c, 0, c), i.c[i.c.length] = f, H(c, KS, Q(1)), H(f, KS, Q(1)); + } + function e0(n, e, t, i, r) { + var c, o, f, h, l; + f = r ? i.b : i.a, !Ah(n.a, i) && (l = f > t.s && f < t.c, h = !1, t.e.b != 0 && t.j.b != 0 && (h = h | (j.Math.abs(f - K(Y(QO(t.e)))) < Kf && j.Math.abs(f - K(Y(QO(t.j)))) < Kf), h = h | (j.Math.abs(f - K(Y(gE(t.e)))) < Kf && j.Math.abs(f - K(Y(gE(t.j)))) < Kf)), (l || h) && (o = u(k(e, (nn(), Mr)), 74), o || (o = new fu(), H(e, Mr, o)), c = new kr(i), Ht(o, c, o.c.b, o.c), ci(n.a, c))); + } + function Qke(n, e, t, i) { + var r, c, o, f, h, l, a; + if (tme(n, e, t, i)) + return !0; + for (o = new E(e.f); o.a < o.c.c.length; ) { + switch (c = u(y(o), 324), f = !1, h = n.j - e.j + t, l = h + e.o, a = n.k - e.k + i, r = a + e.p, c.a.g) { + case 0: + f = wF(n, h + c.b.a, 0, h + c.c.a, a - 1); + break; + case 1: + f = wF(n, l, a + c.b.a, n.o - 1, a + c.c.a); + break; + case 2: + f = wF(n, h + c.b.a, r, h + c.c.a, n.p - 1); + break; + default: + f = wF(n, 0, a + c.b.a, h - 1, a + c.c.a); + } + if (f) + return !0; + } + return !1; + } + function Jke(n, e) { + var t, i, r, c, o, f, h, l, a; + for (o = new E(e.b); o.a < o.c.c.length; ) + for (c = u(y(o), 29), l = new E(c.a); l.a < l.c.c.length; ) { + for (h = u(y(l), 10), a = new X(), f = 0, i = new re(ue(Lr(h).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), !(Wi(t) || !Wi(t) && t.c.i.c == t.d.i.c) && (r = u(k(t, (nn(), yp)), 19).a, r > f && (f = r, a.c = F(Zn, rn, 1, 0, 5, 1)), r == f && W(a, new Pi(t.c.i, t))); + Pn(), wi(a, n.c), J0(n.b, h.p, a); + } + } + function Yke(n, e) { + var t, i, r, c, o, f, h, l, a; + for (o = new E(e.b); o.a < o.c.c.length; ) + for (c = u(y(o), 29), l = new E(c.a); l.a < l.c.c.length; ) { + for (h = u(y(l), 10), a = new X(), f = 0, i = new re(ue(ei(h).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), !(Wi(t) || !Wi(t) && t.c.i.c == t.d.i.c) && (r = u(k(t, (nn(), yp)), 19).a, r > f && (f = r, a.c = F(Zn, rn, 1, 0, 5, 1)), r == f && W(a, new Pi(t.d.i, t))); + Pn(), wi(a, n.c), J0(n.f, h.p, a); + } + } + function zBn(n) { + gd(n, new Oa(ad(fd(ld(hd(new na(), h0), "ELK Box"), "Algorithm for packing of unconnected boxes, i.e. graphs without edges."), new m2n()))), Z(n, h0, s0, Gfn), Z(n, h0, $b, 15), Z(n, h0, hk, Q(0)), Z(n, h0, dA, cn(Kfn)), Z(n, h0, hg, cn(LZn)), Z(n, h0, tp, cn(NZn)), Z(n, h0, ep, qHn), Z(n, h0, lk, cn(Hfn)), Z(n, h0, ip, cn(qfn)), Z(n, h0, Ctn, cn(qK)), Z(n, h0, sA, cn(xZn)); + } + function UBn(n, e) { + var t, i, r, c, o, f, h, l, a; + if (r = n.i, o = r.o.a, c = r.o.b, o <= 0 && c <= 0) + return J(), Xr; + switch (l = n.n.a, a = n.n.b, f = n.o.a, t = n.o.b, e.g) { + case 2: + case 1: + if (l < 0) + return J(), Gn; + if (l + f > o) + return J(), Vn; + break; + case 4: + case 3: + if (a < 0) + return J(), Kn; + if (a + t > c) + return J(), ae; + } + return h = (l + f / 2) / o, i = (a + t / 2) / c, h + i <= 1 && h - i <= 0 ? (J(), Gn) : h + i >= 1 && h - i >= 0 ? (J(), Vn) : i < 0.5 ? (J(), Kn) : (J(), ae); + } + function Zke(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (t = !1, a = K(Y(k(e, (nn(), M0)))), v = Cl * a, r = new E(e.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), l = new E(i.a), c = u(y(l), 10), d = jW(n.a[c.p]); l.a < l.c.c.length; ) + f = u(y(l), 10), g = jW(n.a[f.p]), d != g && (p = Mw(n.b, c, f), o = c.n.b + c.o.b + c.d.a + d.a + p, h = f.n.b - f.d.d + g.a, o > h + v && (m = d.g + g.g, g.a = (g.g * g.a + d.g * d.a) / m, g.g = m, d.f = g, t = !0)), c = f, d = g; + return t; + } + function WBn(n, e, t, i, r, c, o) { + var f, h, l, a, d, g; + for (g = new d2(), l = e.Kc(); l.Ob(); ) + for (f = u(l.Pb(), 839), d = new E(f.wf()); d.a < d.c.c.length; ) + a = u(y(d), 181), B(a.We((Xe(), XK))) === B((sf(), jv)) && (MBn(g, a, !1, i, r, c, o), m6(n, g)); + for (h = t.Kc(); h.Ob(); ) + for (f = u(h.Pb(), 839), d = new E(f.wf()); d.a < d.c.c.length; ) + a = u(y(d), 181), B(a.We((Xe(), XK))) === B((sf(), uw)) && (MBn(g, a, !0, i, r, c, o), m6(n, g)); + } + function nye(n, e, t) { + var i, r, c, o, f, h, l; + for (o = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); o.e != o.i.gc(); ) + for (c = u(oe(o), 33), r = new re(ue(Gh(c).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 79), !j6(i) && !j6(i) && !Yd(i) && (h = u(Vr(Sr(t.f, c)), 86), l = u(te(t, Ir(u(D((!i.c && (i.c = new Fn(he, i, 5, 8)), i.c), 0), 82))), 86), h && l && (f = new UW(h, l), H(f, (cc(), Wm), i), Pr(f, i), Ke(h.d, f), Ke(l.b, f), Ke(e.a, f))); + } + function eye(n, e) { + var t, i, r, c, o, f, h, l; + for (h = u(u(ct(n.r, e), 21), 84).Kc(); h.Ob(); ) + f = u(h.Pb(), 111), r = f.c ? _En(f.c) : 0, r > 0 ? f.a ? (l = f.b.rf().b, r > l && (n.v || f.c.d.c.length == 1 ? (o = (r - l) / 2, f.d.d = o, f.d.a = o) : (t = u(un(f.c.d, 0), 181).rf().b, i = (t - l) / 2, f.d.d = j.Math.max(0, i), f.d.a = r - i - l))) : f.d.a = n.t + r : D5(n.u) && (c = HJ(f.b), c.d < 0 && (f.d.d = -c.d), c.d + c.a > f.b.rf().b && (f.d.a = c.d + c.a - f.b.rf().b)); + } + function tye(n, e) { + var t; + switch (U8(n)) { + case 6: + return yi(e); + case 7: + return z0(e); + case 8: + return G0(e); + case 3: + return Array.isArray(e) && (t = U8(e), !(t >= 14 && t <= 16)); + case 11: + return e != null && typeof e === CL; + case 12: + return e != null && (typeof e === Q7 || typeof e == CL); + case 0: + return WF(e, n.__elementTypeId$); + case 2: + return OD(e) && e.im !== Xg; + case 1: + return OD(e) && e.im !== Xg || WF(e, n.__elementTypeId$); + default: + return !0; + } + } + function XBn(n, e) { + var t, i, r, c; + return i = j.Math.min(j.Math.abs(n.c - (e.c + e.b)), j.Math.abs(n.c + n.b - e.c)), c = j.Math.min(j.Math.abs(n.d - (e.d + e.a)), j.Math.abs(n.d + n.a - e.d)), t = j.Math.abs(n.c + n.b / 2 - (e.c + e.b / 2)), t > n.b / 2 + e.b / 2 || (r = j.Math.abs(n.d + n.a / 2 - (e.d + e.a / 2)), r > n.a / 2 + e.a / 2) ? 1 : t == 0 && r == 0 ? 0 : t == 0 ? c / r + 1 : r == 0 ? i / t + 1 : j.Math.min(i / t, c / r) + 1; + } + function VBn(n, e) { + var t, i, r, c, o, f; + return r = fV(n), f = fV(e), r == f ? n.e == e.e && n.a < 54 && e.a < 54 ? n.f < e.f ? -1 : n.f > e.f ? 1 : 0 : (i = n.e - e.e, t = (n.d > 0 ? n.d : j.Math.floor((n.a - 1) * uKn) + 1) - (e.d > 0 ? e.d : j.Math.floor((e.a - 1) * uKn) + 1), t > i + 1 ? r : t < i - 1 ? -r : (c = (!n.c && (n.c = h7(n.f)), n.c), o = (!e.c && (e.c = h7(e.f)), e.c), i < 0 ? c = Fw(c, pRn(-i)) : i > 0 && (o = Fw(o, pRn(i))), A$n(c, o))) : r < f ? -1 : 1; + } + function iye(n, e) { + var t, i, r, c, o, f, h; + for (c = 0, f = 0, h = 0, r = new E(n.f.e); r.a < r.c.c.length; ) + i = u(y(r), 144), e != i && (o = n.i[e.b][i.b], c += o, t = al(e.d, i.d), t > 0 && n.d != (W5(), BR) && (f += o * (i.d.a + n.a[e.b][i.b] * (e.d.a - i.d.a) / t)), t > 0 && n.d != (W5(), LR) && (h += o * (i.d.b + n.a[e.b][i.b] * (e.d.b - i.d.b) / t))); + switch (n.d.g) { + case 1: + return new fn(f / c, e.d.b); + case 2: + return new fn(e.d.a, h / c); + default: + return new fn(f / c, h / c); + } + } + function QBn(n, e) { + X3(); + var t, i, r, c, o; + if (o = u(k(n.i, (nn(), Bt)), 98), c = n.j.g - e.j.g, c != 0 || !(o == (Ai(), id) || o == jh || o == Sc)) + return 0; + if (o == (Ai(), id) && (t = u(k(n, I1), 19), i = u(k(e, I1), 19), t && i && (r = t.a - i.a, r != 0))) + return r; + switch (n.j.g) { + case 1: + return ni(n.n.a, e.n.a); + case 2: + return ni(n.n.b, e.n.b); + case 3: + return ni(e.n.a, n.n.a); + case 4: + return ni(e.n.b, n.n.b); + default: + throw T(new $r($nn)); + } + } + function JBn(n) { + var e, t, i, r, c, o; + for (t = (!n.a && (n.a = new Yt(io, n, 5)), n.a).i + 2, o = new Ic(t), W(o, new fn(n.j, n.k)), _t(new $n(null, (!n.a && (n.a = new Yt(io, n, 5)), new xn(n.a, 16))), new z6n(o)), W(o, new fn(n.b, n.c)), e = 1; e < o.c.length - 1; ) + i = (Ln(e - 1, o.c.length), u(o.c[e - 1], 8)), r = (Ln(e, o.c.length), u(o.c[e], 8)), c = (Ln(e + 1, o.c.length), u(o.c[e + 1], 8)), i.a == r.a && r.a == c.a || i.b == r.b && r.b == c.b ? l1(o, e) : ++e; + return o; + } + function YBn(n, e) { + var t, i, r, c, o, f, h; + for (t = njn(b7n(a7n(d7n(new Vq(), e), new uC(e.e)), XWn), n.a), e.j.c.length == 0 || wPn(u(un(e.j, 0), 57).a, t), h = new FI(), it(n.e, t, h), o = new hi(), f = new hi(), c = new E(e.k); c.a < c.c.c.length; ) + r = u(y(c), 17), ci(o, r.c), ci(f, r.d); + i = o.a.gc() - f.a.gc(), i < 0 ? (u7(h, !0, (or(), Zs)), u7(h, !1, Ao)) : i > 0 && (u7(h, !1, (or(), Zs)), u7(h, !0, Ao)), Yc(e.g, new H7n(n, t)), it(n.g, e, t); + } + function ZBn() { + ZBn = N; + var n; + for (Cin = A(M(be, 1), Le, 25, 15, [-1, -1, 30, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]), bR = F(be, Le, 25, 37, 15, 1), yzn = A(M(be, 1), Le, 25, 15, [-1, -1, 63, 40, 32, 28, 25, 23, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13]), Tin = F(Yl, QL, 25, 37, 14, 1), n = 2; n <= 36; n++) + bR[n] = Gt(j.Math.pow(n, Cin[n])), Tin[n] = M7(IM, bR[n]); + } + function rye(n) { + var e; + if ((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i != 1) + throw T(new Hn(oqn + (!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i)); + return e = new fu(), r7(u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82)) && Xi(e, x_n(n, r7(u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82)), !1)), r7(u(D((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c), 0), 82)) && Xi(e, x_n(n, r7(u(D((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c), 0), 82)), !0)), e; + } + function nRn(n, e) { + var t, i, r, c, o; + for (e.d ? r = n.a.c == (Ff(), A0) ? Lr(e.b) : ei(e.b) : r = n.a.c == (Ff(), O1) ? Lr(e.b) : ei(e.b), c = !1, i = new re(ue(r.a.Kc(), new Mn())); Se(i); ) + if (t = u(ve(i), 17), o = on(n.a.f[n.a.g[e.b.p].p]), !(!o && !Wi(t) && t.c.i.c == t.d.i.c) && !(on(n.a.n[n.a.g[e.b.p].p]) || on(n.a.n[n.a.g[e.b.p].p])) && (c = !0, Ah(n.b, n.a.g[b3e(t, e.b).p]))) + return e.c = !0, e.a = t, e; + return e.c = c, e.a = null, e; + } + function cye(n, e, t, i, r) { + var c, o, f, h, l, a, d; + for (Pn(), wi(n, new I2n()), f = new Ii(n, 0), d = new X(), c = 0; f.b < f.d.gc(); ) + o = (ne(f.b < f.d.gc()), u(f.d.Xb(f.c = f.b++), 157)), d.c.length != 0 && du(o) * zu(o) > c * 2 ? (a = new zC(d), l = du(o) / zu(o), h = kL(a, e, new i2(), t, i, r, l), st(Lo(a.e), h), d.c = F(Zn, rn, 1, 0, 5, 1), c = 0, d.c[d.c.length] = a, d.c[d.c.length] = o, c = du(a) * zu(a) + du(o) * zu(o)) : (d.c[d.c.length] = o, c += du(o) * zu(o)); + return d; + } + function wZ(n, e, t) { + var i, r, c, o, f, h, l; + if (i = t.gc(), i == 0) + return !1; + if (n.ej()) + if (h = n.fj(), IQ(n, e, t), o = i == 1 ? n.Zi(3, null, t.Kc().Pb(), e, h) : n.Zi(5, null, t, e, h), n.bj()) { + for (f = i < 100 ? null : new Q1(i), c = e + i, r = e; r < c; ++r) + l = n.Oi(r), f = n.cj(l, f), f = f; + f ? (f.Ei(o), f.Fi()) : n.$i(o); + } else + n.$i(o); + else if (IQ(n, e, t), n.bj()) { + for (f = i < 100 ? null : new Q1(i), c = e + i, r = e; r < c; ++r) + f = n.cj(n.Oi(r), f); + f && f.Fi(); + } + return !0; + } + function eRn(n, e, t) { + var i, r, c, o, f; + return n.ej() ? (r = null, c = n.fj(), i = n.Zi(1, f = (o = n.Ui(e, n.oi(e, t)), o), t, e, c), n.bj() && !(n.ni() && f ? tt(f, t) : B(f) === B(t)) && (f && (r = n.dj(f, r)), r = n.cj(t, r)), r ? (r.Ei(i), r.Fi()) : n.$i(i), f) : (f = (o = n.Ui(e, n.oi(e, t)), o), n.bj() && !(n.ni() && f ? tt(f, t) : B(f) === B(t)) && (r = null, f && (r = n.dj(f, null)), r = n.cj(t, r), r && r.Fi()), f); + } + function gZ(n, e) { + var t, i, r, c, o, f, h, l, a; + if (n.e = e, n.f = u(k(e, (dl(), cS)), 230), Hve(e), n.d = j.Math.max(e.e.c.length * 16 + e.c.c.length, 256), !on(sn(k(e, (Go(), Srn))))) + for (a = n.e.e.c.length, h = new E(e.e); h.a < h.c.c.length; ) + f = u(y(h), 144), l = f.d, l.a = oW(n.f) * a, l.b = oW(n.f) * a; + for (t = e.b, c = new E(e.c); c.a < c.c.c.length; ) + if (r = u(y(c), 282), i = u(k(r, $rn), 19).a, i > 0) { + for (o = 0; o < i; o++) + W(t, new KCn(r)); + hLn(r); + } + } + function W2(n, e) { + var t, i, r, c, o, f; + if (n.k == (Qn(), Ju) && (t = Wv(pt(u(k(n, (G(), Vk)), 15).Oc(), new Fv(new r0n()))).sd((ua(), X4)) ? e : (us(), jy), H(n, pp, t), t != (us(), Kl))) + for (i = u(k(n, rt), 17), f = K(Y(k(i, (nn(), P1)))), o = 0, t == kh ? o = n.o.b - j.Math.ceil(f / 2) : t == jy && (n.o.b -= K(Y(k(qi(n), jp))), o = (n.o.b - j.Math.ceil(f)) / 2), c = new E(n.j); c.a < c.c.c.length; ) + r = u(y(c), 11), r.n.b = o; + } + function pZ() { + pZ = N, rO(), Lee = new r4n(), A(M(Ip, 2), q, 368, 0, [A(M(Ip, 1), xA, 592, 0, [new L9(HGn)])]), A(M(Ip, 2), q, 368, 0, [A(M(Ip, 1), xA, 592, 0, [new L9(rin)])]), A(M(Ip, 2), q, 368, 0, [A(M(Ip, 1), xA, 592, 0, [new L9(qGn)]), A(M(Ip, 1), xA, 592, 0, [new L9(rin)])]), new il("-1"), A(M(Ip, 2), q, 368, 0, [A(M(Ip, 1), xA, 592, 0, [new L9("\\c+")])]), new il("0"), new il("0"), new il("1"), new il("0"), new il(VGn); + } + function pM(n) { + var e, t; + return n.c && n.c.kh() && (t = u(n.c, 49), n.c = u(pl(n, t), 138), n.c != t && (n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 9, 2, t, n.c)), I(n.Cb, 399) ? n.Db >> 16 == -15 && n.Cb.nh() && L$(new D$(n.Cb, 9, 13, t, n.c, m1(Ou(u(n.Cb, 59)), n))) : I(n.Cb, 88) && n.Db >> 16 == -23 && n.Cb.nh() && (e = n.c, I(e, 88) || (e = (Sn(), so)), I(t, 88) || (t = (Sn(), so)), L$(new D$(n.Cb, 9, 10, t, e, m1(wc(u(n.Cb, 26)), n)))))), n.c; + } + function uye(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (le(e, "Hypernodes processing", 1), r = new E(n.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), f = new E(i.a); f.a < f.c.c.length; ) + if (o = u(y(f), 10), on(sn(k(o, (nn(), YS)))) && o.j.c.length <= 2) { + for (d = 0, a = 0, t = 0, c = 0, l = new E(o.j); l.a < l.c.c.length; ) + switch (h = u(y(l), 11), h.j.g) { + case 1: + ++d; + break; + case 2: + ++a; + break; + case 3: + ++t; + break; + case 4: + ++c; + } + d == 0 && t == 0 && fTe(n, o, c <= a); + } + ce(e); + } + function sye(n, e) { + var t, i, r, c, o, f, h, l, a; + for (le(e, "Layer constraint edge reversal", 1), o = new E(n.b); o.a < o.c.c.length; ) { + for (c = u(y(o), 29), a = -1, t = new X(), l = I8(c.a), r = 0; r < l.length; r++) + i = u(k(l[r], (G(), Ua)), 303), a == -1 ? i != (Nh(), Ag) && (a = r) : i == (Nh(), Ag) && (jr(l[r], null), vb(l[r], a++, c)), i == (Nh(), dp) && W(t, l[r]); + for (h = new E(t); h.a < h.c.c.length; ) + f = u(y(h), 10), jr(f, null), jr(f, c); + } + ce(e); + } + function oye(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (le(t, "Hyperedge merging", 1), Lme(n, e), h = new Ii(e.b, 0); h.b < h.d.gc(); ) + if (f = (ne(h.b < h.d.gc()), u(h.d.Xb(h.c = h.b++), 29)), a = f.a, a.c.length != 0) + for (i = null, r = null, c = null, o = null, l = 0; l < a.c.length; l++) + i = (Ln(l, a.c.length), u(a.c[l], 10)), r = i.k, r == (Qn(), pi) && o == pi && (d = tje(i, c), d.a && (l7e(i, c, d.b, d.c), Ln(l, a.c.length), AG(a.c, l, 1), --l, i = c, r = o)), c = i, o = r; + ce(t); + } + function fye(n, e) { + var t, i, r; + i = Fu(n.d, 1) != 0, !on(sn(k(e.j, (G(), m0)))) && !on(sn(k(e.j, Pg))) || B(k(e.j, (nn(), Ll))) === B((Rh(), Nl)) ? e.c.Tf(e.e, i) : i = on(sn(k(e.j, m0))), _7(n, e, i, !0), on(sn(k(e.j, Pg))) && H(e.j, Pg, (qn(), !1)), on(sn(k(e.j, m0))) && (H(e.j, m0, (qn(), !1)), H(e.j, Pg, !0)), t = TBn(n, e); + do { + if (yV(n), t == 0) + return 0; + i = !i, r = t, _7(n, e, i, !1), t = TBn(n, e); + } while (r > t); + return r; + } + function tRn(n, e) { + var t, i, r; + i = Fu(n.d, 1) != 0, !on(sn(k(e.j, (G(), m0)))) && !on(sn(k(e.j, Pg))) || B(k(e.j, (nn(), Ll))) === B((Rh(), Nl)) ? e.c.Tf(e.e, i) : i = on(sn(k(e.j, m0))), _7(n, e, i, !0), on(sn(k(e.j, Pg))) && H(e.j, Pg, (qn(), !1)), on(sn(k(e.j, m0))) && (H(e.j, m0, (qn(), !1)), H(e.j, Pg, !0)), t = Sx(n, e); + do { + if (yV(n), t == 0) + return 0; + i = !i, r = t, _7(n, e, i, !1), t = Sx(n, e); + } while (r > t); + return r; + } + function iRn(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + if (e == t) + return !0; + if (e = TY(n, e), t = TY(n, t), i = nx(e), i) { + if (a = nx(t), a != i) + return a ? (h = i.Dj(), v = a.Dj(), h == v && h != null) : !1; + if (o = (!e.d && (e.d = new Yt(dr, e, 1)), e.d), c = o.i, g = (!t.d && (t.d = new Yt(dr, t, 1)), t.d), c == g.i) { + for (l = 0; l < c; ++l) + if (r = u(D(o, l), 87), d = u(D(g, l), 87), !iRn(n, r, d)) + return !1; + } + return !0; + } else + return f = e.e, p = t.e, f == p; + } + function rRn(n, e, t, i) { + var r, c, o, f, h, l, a, d; + if (zh(n.e, e)) { + for (d = _c(n.e.Tg(), e), c = u(n.g, 119), a = null, h = -1, f = -1, r = 0, l = 0; l < n.i; ++l) + o = c[l], d.rl(o.ak()) && (r == t && (h = l), r == i && (f = l, a = o.dd()), ++r); + if (h == -1) + throw T(new mr(NB + t + _a + r)); + if (f == -1) + throw T(new mr(BB + i + _a + r)); + return o6(n, h, f), qu(n.e) && qp(n, hl(n, 7, e, Q(i), a, t, !0)), a; + } else + throw T(new Hn("The feature must be many-valued to support move")); + } + function cRn(n, e, t, i) { + var r, c, o, f, h; + switch (h = new kr(e.n), h.a += e.o.a / 2, h.b += e.o.b / 2, f = K(Y(k(e, (nn(), Yb)))), c = n.f, o = n.d, r = n.c, u(k(e, (G(), ec)), 61).g) { + case 1: + h.a += o.b + r.a - t / 2, h.b = -i - f, e.n.b = -(o.d + f + r.b); + break; + case 2: + h.a = c.a + o.b + o.c + f, h.b += o.d + r.b - i / 2, e.n.a = c.a + o.c + f - r.a; + break; + case 3: + h.a += o.b + r.a - t / 2, h.b = c.b + o.d + o.a + f, e.n.b = c.b + o.a + f - r.b; + break; + case 4: + h.a = -t - f, h.b += o.d + r.b - i / 2, e.n.a = -(o.b + f + r.a); + } + return h; + } + function uRn(n) { + var e, t, i, r, c, o; + return i = new lV(), Pr(i, n), B(k(i, (nn(), as))) === B((or(), mh)) && H(i, as, jT(i)), k(i, (SC(), Ym)) == null && (o = u(yxn(n), 160), H(i, Ym, eE(o.We(Ym)))), H(i, (G(), rt), n), H(i, Ac, (e = u(xo(v_), 9), new ks(e, u(bo(e, e.length), 9), 0))), r = JEe((Pt(n) && (H0(), new B0(Pt(n))), H0(), new WO(Pt(n) ? new B0(Pt(n)) : null, n)), Ao), c = u(k(i, Esn), 116), t = i.d, dMn(t, c), dMn(t, r), i; + } + function hye(n, e, t) { + var i, r; + i = e.c.i, r = t.d.i, i.k == (Qn(), pi) ? (H(n, (G(), Xo), u(k(i, Xo), 11)), H(n, Ys, u(k(i, Ys), 11)), H(n, Ub, sn(k(i, Ub)))) : i.k == Ju ? (H(n, (G(), Xo), u(k(i, Xo), 11)), H(n, Ys, u(k(i, Ys), 11)), H(n, Ub, (qn(), !0))) : r.k == Ju ? (H(n, (G(), Xo), u(k(r, Xo), 11)), H(n, Ys, u(k(r, Ys), 11)), H(n, Ub, (qn(), !0))) : (H(n, (G(), Xo), e.c), H(n, Ys, t.d)); + } + function lye(n) { + var e, t, i, r, c, o, f; + for (n.o = new gw(), i = new Tt(), o = new E(n.e.a); o.a < o.c.c.length; ) + c = u(y(o), 121), Hw(c).c.length == 1 && Ht(i, c, i.c.b, i.c); + for (; i.b != 0; ) + c = u(i.b == 0 ? null : (ne(i.b != 0), Ts(i, i.a.a)), 121), Hw(c).c.length != 0 && (e = u(un(Hw(c), 0), 213), t = c.g.a.c.length > 0, f = TT(e, c), Uz(t ? f.b : f.g, e), Hw(f).c.length == 1 && Ht(i, f, i.c.b, i.c), r = new Pi(c, e), ll(n.o, r), Qc(n.e.a, c)); + } + function sRn(n, e) { + var t, i, r, c, o, f, h; + return i = j.Math.abs(qE(n.b).a - qE(e.b).a), f = j.Math.abs(qE(n.b).b - qE(e.b).b), r = 0, h = 0, t = 1, o = 1, i > n.b.b / 2 + e.b.b / 2 && (r = j.Math.min(j.Math.abs(n.b.c - (e.b.c + e.b.b)), j.Math.abs(n.b.c + n.b.b - e.b.c)), t = 1 - r / i), f > n.b.a / 2 + e.b.a / 2 && (h = j.Math.min(j.Math.abs(n.b.d - (e.b.d + e.b.a)), j.Math.abs(n.b.d + n.b.a - e.b.d)), o = 1 - h / f), c = j.Math.min(t, o), (1 - c) * j.Math.sqrt(i * i + f * f); + } + function aye(n) { + var e, t, i, r; + for (mL(n, n.e, n.f, (Od(), Rl), !0, n.c, n.i), mL(n, n.e, n.f, Rl, !1, n.c, n.i), mL(n, n.e, n.f, Lg, !0, n.c, n.i), mL(n, n.e, n.f, Lg, !1, n.c, n.i), bye(n, n.c, n.e, n.f, n.i), i = new Ii(n.i, 0); i.b < i.d.gc(); ) + for (e = (ne(i.b < i.d.gc()), u(i.d.Xb(i.c = i.b++), 128)), r = new Ii(n.i, i.b); r.b < r.d.gc(); ) + t = (ne(r.b < r.d.gc()), u(r.d.Xb(r.c = r.b++), 128)), Uje(e, t); + bTe(n.i, u(k(n.d, (G(), vp)), 230)), PEe(n.i); + } + function nL(n, e) { + var t, i; + if (e != null) { + if (i = Jd(n), i) + if (i.i & 1) { + if (i == _u) + return G0(e); + if (i == be) + return I(e, 19); + if (i == bw) + return I(e, 155); + if (i == ku) + return I(e, 217); + if (i == Ls) + return I(e, 172); + if (i == Ci) + return z0(e); + if (i == Wg) + return I(e, 184); + if (i == Yl) + return I(e, 162); + } else + return $j(), t = u(te(eI, i), 55), !t || t.wj(e); + else if (I(e, 56)) + return n.uk(u(e, 56)); + } + return !1; + } + function vZ() { + vZ = N; + var n, e, t, i, r, c, o, f, h; + for (Tf = F(ku, wg, 25, 255, 15, 1), _1 = F(Ls, Bf, 25, 64, 15, 1), e = 0; e < 255; e++) + Tf[e] = -1; + for (t = 90; t >= 65; t--) + Tf[t] = t - 65 << 24 >> 24; + for (i = 122; i >= 97; i--) + Tf[i] = i - 97 + 26 << 24 >> 24; + for (r = 57; r >= 48; r--) + Tf[r] = r - 48 + 52 << 24 >> 24; + for (Tf[43] = 62, Tf[47] = 63, c = 0; c <= 25; c++) + _1[c] = 65 + c & Ut; + for (o = 26, h = 0; o <= 51; ++o, h++) + _1[o] = 97 + h & Ut; + for (n = 52, f = 0; n <= 61; ++n, f++) + _1[n] = 48 + f & Ut; + _1[62] = 43, _1[63] = 47; + } + function dye(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + if (n.dc()) + return new Li(); + for (l = 0, d = 0, r = n.Kc(); r.Ob(); ) + i = u(r.Pb(), 37), c = i.f, l = j.Math.max(l, c.a), d += c.a * c.b; + for (l = j.Math.max(l, j.Math.sqrt(d) * K(Y(k(u(n.Kc().Pb(), 37), (nn(), zS))))), g = 0, p = 0, h = 0, t = e, f = n.Kc(); f.Ob(); ) + o = u(f.Pb(), 37), a = o.f, g + a.a > l && (g = 0, p += h + e, h = 0), M6(o, g, p), t = j.Math.max(t, g + a.a), h = j.Math.max(h, a.b), g += a.a + e; + return new fn(t + e, p + h + e); + } + function bye(n, e, t, i, r) { + var c, o, f, h, l, a, d; + for (o = new E(e); o.a < o.c.c.length; ) { + if (c = u(y(o), 17), h = c.c, t.a._b(h)) + l = (Od(), Rl); + else if (i.a._b(h)) + l = (Od(), Lg); + else + throw T(new Hn("Source port must be in one of the port sets.")); + if (a = c.d, t.a._b(a)) + d = (Od(), Rl); + else if (i.a._b(a)) + d = (Od(), Lg); + else + throw T(new Hn("Target port must be in one of the port sets.")); + f = new Zxn(c, l, d), it(n.b, c, f), r.c[r.c.length] = f; + } + } + function mZ(n, e) { + var t, i, r, c, o, f, h; + if (!nf(n)) + throw T(new $r(sqn)); + if (i = nf(n), c = i.g, r = i.f, c <= 0 && r <= 0) + return J(), Xr; + switch (f = n.i, h = n.j, e.g) { + case 2: + case 1: + if (f < 0) + return J(), Gn; + if (f + n.g > c) + return J(), Vn; + break; + case 4: + case 3: + if (h < 0) + return J(), Kn; + if (h + n.f > r) + return J(), ae; + } + return o = (f + n.g / 2) / c, t = (h + n.f / 2) / r, o + t <= 1 && o - t <= 0 ? (J(), Gn) : o + t >= 1 && o - t >= 0 ? (J(), Vn) : t < 0.5 ? (J(), Kn) : (J(), ae); + } + function wye(n, e, t, i, r) { + var c, o; + if (c = Hi(ui(e[0], hr), ui(i[0], hr)), n[0] = ge(c), c = cl(c, 32), t >= r) { + for (o = 1; o < r; o++) + c = Hi(c, Hi(ui(e[o], hr), ui(i[o], hr))), n[o] = ge(c), c = cl(c, 32); + for (; o < t; o++) + c = Hi(c, ui(e[o], hr)), n[o] = ge(c), c = cl(c, 32); + } else { + for (o = 1; o < t; o++) + c = Hi(c, Hi(ui(e[o], hr), ui(i[o], hr))), n[o] = ge(c), c = cl(c, 32); + for (; o < r; o++) + c = Hi(c, ui(i[o], hr)), n[o] = ge(c), c = cl(c, 32); + } + hc(c, 0) != 0 && (n[o] = ge(c)); + } + function Ab(n) { + Je(); + var e, t, i, r, c, o; + if (n.e != 4 && n.e != 5) + throw T(new Hn("Token#complementRanges(): must be RANGE: " + n.e)); + for (c = n, Jw(c), D6(c), i = c.b.length + 2, c.b[0] == 0 && (i -= 2), t = c.b[c.b.length - 1], t == H4 && (i -= 2), r = new es(4), r.b = F(be, Le, 25, i, 15, 1), o = 0, c.b[0] > 0 && (r.b[o++] = 0, r.b[o++] = c.b[0] - 1), e = 1; e < c.b.length - 2; e += 2) + r.b[o++] = c.b[e] + 1, r.b[o++] = c.b[e + 1] - 1; + return t != H4 && (r.b[o++] = t + 1, r.b[o] = H4), r.a = !0, r; + } + function eL(n, e, t) { + var i, r, c, o, f, h, l, a; + if (i = t.gc(), i == 0) + return !1; + if (n.ej()) + if (l = n.fj(), mx(n, e, t), o = i == 1 ? n.Zi(3, null, t.Kc().Pb(), e, l) : n.Zi(5, null, t, e, l), n.bj()) { + for (f = i < 100 ? null : new Q1(i), c = e + i, r = e; r < c; ++r) + a = n.g[r], f = n.cj(a, f), f = n.jj(a, f); + f ? (f.Ei(o), f.Fi()) : n.$i(o); + } else + n.$i(o); + else if (mx(n, e, t), n.bj()) { + for (f = i < 100 ? null : new Q1(i), c = e + i, r = e; r < c; ++r) + h = n.g[r], f = n.cj(h, f); + f && f.Fi(); + } + return !0; + } + function kZ(n, e, t, i) { + var r, c, o, f, h; + for (o = new E(n.k); o.a < o.c.c.length; ) + r = u(y(o), 129), (!i || r.c == (No(), Bl)) && (h = r.b, h.g < 0 && r.d > 0 && (II(h, h.d - r.d), r.c == (No(), Bl) && lte(h, h.a - r.d), h.d <= 0 && h.i > 0 && Ht(e, h, e.c.b, e.c))); + for (c = new E(n.f); c.a < c.c.c.length; ) + r = u(y(c), 129), (!i || r.c == (No(), Bl)) && (f = r.a, f.g < 0 && r.d > 0 && (ej(f, f.i - r.d), r.c == (No(), Bl) && ate(f, f.b - r.d), f.i <= 0 && f.d > 0 && Ht(t, f, t.c.b, t.c))); + } + function gye(n, e, t) { + var i, r, c, o, f, h, l, a; + for (le(t, "Processor compute fanout", 1), Eu(n.b), Eu(n.a), f = null, c = _e(e.b, 0); !f && c.b != c.d.c; ) + l = u(Re(c), 86), on(sn(k(l, (cc(), rw)))) && (f = l); + for (h = new Tt(), Ht(h, f, h.c.b, h.c), v_n(n, h), a = _e(e.b, 0); a.b != a.d.c; ) + l = u(Re(a), 86), o = Ce(k(l, (cc(), Um))), r = mc(n.b, o) != null ? u(mc(n.b, o), 19).a : 0, H(l, vP, Q(r)), i = 1 + (mc(n.a, o) != null ? u(mc(n.a, o), 19).a : 0), H(l, QJn, Q(i)); + ce(t); + } + function pye(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v; + for (g = nve(n, t), h = 0; h < e; h++) { + for (V0(r, t), p = new X(), v = (ne(i.b < i.d.gc()), u(i.d.Xb(i.c = i.b++), 407)), a = g + h; a < n.b; a++) + f = v, v = (ne(i.b < i.d.gc()), u(i.d.Xb(i.c = i.b++), 407)), W(p, new LNn(f, v, t)); + for (d = g + h; d < n.b; d++) + ne(i.b > 0), i.a.Xb(i.c = --i.b), d > g + h && Wu(i); + for (o = new E(p); o.a < o.c.c.length; ) + c = u(y(o), 407), V0(i, c); + if (h < e - 1) + for (l = g + h; l < n.b; l++) + ne(i.b > 0), i.a.Xb(i.c = --i.b); + } + } + function vye() { + Je(); + var n, e, t, i, r, c; + if (EH) + return EH; + for (n = new es(4), Sb(n, El(eR, !0)), F6(n, El("M", !0)), F6(n, El("C", !0)), c = new es(4), i = 0; i < 11; i++) + jc(c, i, i); + return e = new es(4), Sb(e, El("M", !0)), jc(e, 4448, 4607), jc(e, 65438, 65439), r = new v5(2), Da(r, n), Da(r, k9), t = new v5(2), t.$l(LE(c, El("L", !0))), t.$l(e), t = new rb(3, t), t = new PW(r, t), EH = t, EH; + } + function mye(n) { + var e, t; + if (e = Ce(hn(n, (Xe(), Zm))), !EOn(e, n) && !ga(n, kv) && ((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a).i != 0 || on(sn(hn(n, vy))))) + if (e == null || kb(e).length == 0) { + if (!EOn(Jn, n)) + throw t = De(De(new Yu("Unable to load default layout algorithm "), Jn), " for unconfigured node "), CM(n, t), T(new pw(t.a)); + } else + throw t = De(De(new Yu("Layout algorithm '"), e), "' not found for "), CM(n, t), T(new pw(t.a)); + } + function tL(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p; + if (t = n.i, e = n.n, n.b == 0) + for (p = t.c + e.b, g = t.b - e.b - e.c, o = n.a, h = 0, a = o.length; h < a; ++h) + r = o[h], BE(r, p, g); + else + i = cFn(n, !1), BE(n.a[0], t.c + e.b, i[0]), BE(n.a[2], t.c + t.b - e.c - i[2], i[2]), d = t.b - e.b - e.c, i[0] > 0 && (d -= i[0] + n.c, i[0] += n.c), i[2] > 0 && (d -= i[2] + n.c), i[1] = j.Math.max(i[1], d), BE(n.a[1], t.c + e.b + i[0] - (i[1] - d) / 2, i[1]); + for (c = n.a, f = 0, l = c.length; f < l; ++f) + r = c[f], I(r, 326) && u(r, 326).Te(); + } + function kye(n) { + var e, t, i, r, c, o, f, h, l, a, d; + for (d = new Ywn(), d.d = 0, o = new E(n.b); o.a < o.c.c.length; ) + c = u(y(o), 29), d.d += c.a.c.length; + for (i = 0, r = 0, d.a = F(be, Le, 25, n.b.c.length, 15, 1), l = 0, a = 0, d.e = F(be, Le, 25, d.d, 15, 1), t = new E(n.b); t.a < t.c.c.length; ) + for (e = u(y(t), 29), e.p = i++, d.a[e.p] = r++, a = 0, h = new E(e.a); h.a < h.c.c.length; ) + f = u(y(h), 10), f.p = l++, d.e[f.p] = a++; + return d.c = new P6n(d), d.b = nh(d.d), Jke(d, n), d.f = nh(d.d), Yke(d, n), d; + } + function oRn(n, e) { + var t, i, r, c; + for (c = u(un(n.n, n.n.c.length - 1), 211).d, n.p = j.Math.min(n.p, e.g), n.r = j.Math.max(n.r, c), n.g = j.Math.max(n.g, e.g + (n.b.c.length == 1 ? 0 : n.i)), n.o = j.Math.min(n.o, e.f), n.e += e.f + (n.b.c.length == 1 ? 0 : n.i), n.f = j.Math.max(n.f, e.f), r = n.n.c.length > 0 ? (n.n.c.length - 1) * n.i : 0, i = new E(n.n); i.a < i.c.c.length; ) + t = u(y(i), 211), r += t.a; + n.d = r, n.a = n.e / n.b.c.length - n.i * ((n.b.c.length - 1) / n.b.c.length), sJ(n.j); + } + function fRn(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (a = sn(k(e, (Go(), tWn))), a == null || (_n(a), a)) { + for (d = F(_u, wh, 25, e.e.c.length, 16, 1), o = ame(e), r = new Tt(), l = new E(e.e); l.a < l.c.c.length; ) + f = u(y(l), 144), t = NY(n, f, null, null, d, o), t && (Pr(t, e), Ht(r, t, r.c.b, r.c)); + if (r.b > 1) + for (i = _e(r, 0); i.b != i.d.c; ) + for (t = u(Re(i), 231), c = 0, h = new E(t.e); h.a < h.c.c.length; ) + f = u(y(h), 144), f.b = c++; + return r; + } + return cf(A(M(JTe, 1), ynn, 231, 0, [e])); + } + function Lf(n) { + var e, t, i, r, c, o, f; + if (!n.g) { + if (f = new EI(), e = b9, o = e.a.zc(n, e), o == null) { + for (i = new ie(Ar(n)); i.e != i.i.gc(); ) + t = u(oe(i), 26), Ft(f, Lf(t)); + e.a.Bc(n) != null, e.a.gc() == 0; + } + for (r = f.i, c = (!n.s && (n.s = new V(su, n, 21, 17)), new ie(n.s)); c.e != c.i.gc(); ++r) + kte(u(oe(c), 449), r); + Ft(f, (!n.s && (n.s = new V(su, n, 21, 17)), n.s)), ab(f), n.g = new YOn(n, f), n.i = u(f.g, 247), n.i == null && (n.i = gH), n.p = null, Iu(n).b &= -5; + } + return n.g; + } + function iL(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v; + if (i = n.i, t = n.n, n.b == 0) + e = rFn(n, !1), RE(n.a[0], i.d + t.d, e[0]), RE(n.a[2], i.d + i.a - t.a - e[2], e[2]), g = i.a - t.d - t.a, d = g, e[0] > 0 && (e[0] += n.c, d -= e[0]), e[2] > 0 && (d -= e[2] + n.c), e[1] = j.Math.max(e[1], d), RE(n.a[1], i.d + t.d + e[0] - (e[1] - d) / 2, e[1]); + else + for (v = i.d + t.d, p = i.a - t.d - t.a, o = n.a, h = 0, a = o.length; h < a; ++h) + r = o[h], RE(r, v, p); + for (c = n.a, f = 0, l = c.length; f < l; ++f) + r = c[f], I(r, 326) && u(r, 326).Ue(); + } + function yye(n) { + var e, t, i, r, c, o, f, h, l, a; + for (a = F(be, Le, 25, n.b.c.length + 1, 15, 1), l = new hi(), i = 0, c = new E(n.b); c.a < c.c.c.length; ) { + for (r = u(y(c), 29), a[i++] = l.a.gc(), h = new E(r.a); h.a < h.c.c.length; ) + for (o = u(y(h), 10), t = new re(ue(ei(o).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 17), l.a.zc(e, l); + for (f = new E(r.a); f.a < f.c.c.length; ) + for (o = u(y(f), 10), t = new re(ue(Lr(o).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 17), l.a.Bc(e) != null; + } + return a; + } + function vM(n, e, t, i) { + var r, c, o, f, h; + if (h = _c(n.e.Tg(), e), r = u(n.g, 119), er(), u(e, 66).Oj()) { + for (o = 0; o < n.i; ++o) + if (c = r[o], h.rl(c.ak()) && tt(c, t)) + return !0; + } else if (t != null) { + for (f = 0; f < n.i; ++f) + if (c = r[f], h.rl(c.ak()) && tt(t, c.dd())) + return !0; + if (i) { + for (o = 0; o < n.i; ++o) + if (c = r[o], h.rl(c.ak()) && B(t) === B(YO(n, u(c.dd(), 56)))) + return !0; + } + } else + for (o = 0; o < n.i; ++o) + if (c = r[o], h.rl(c.ak()) && c.dd() == null) + return !1; + return !1; + } + function hRn(n, e, t, i) { + var r, c, o, f, h, l; + if (l = _c(n.e.Tg(), e), o = u(n.g, 119), zh(n.e, e)) { + if (e.hi() && (c = v4(n, e, i, I(e, 99) && (u(e, 18).Bb & Ji) != 0), c >= 0 && c != t)) + throw T(new Hn(yk)); + for (r = 0, h = 0; h < n.i; ++h) + if (f = o[h], l.rl(f.ak())) { + if (r == t) + return u(Gw(n, h, (er(), u(e, 66).Oj() ? u(i, 72) : uh(e, i))), 72); + ++r; + } + throw T(new mr(rm + t + _a + r)); + } else { + for (h = 0; h < n.i; ++h) + if (f = o[h], l.rl(f.ak())) + return er(), u(e, 66).Oj() ? f : f.dd(); + return null; + } + } + function lRn(n, e, t, i) { + var r, c, o, f; + for (f = t, o = new E(e.a); o.a < o.c.c.length; ) { + if (c = u(y(o), 221), r = u(c.b, 65), Ud(n.b.c, r.b.c + r.b.b) <= 0 && Ud(r.b.c, n.b.c + n.b.b) <= 0 && Ud(n.b.d, r.b.d + r.b.a) <= 0 && Ud(r.b.d, n.b.d + n.b.a) <= 0) { + if (Ud(r.b.c, n.b.c + n.b.b) == 0 && i.a < 0 || Ud(r.b.c + r.b.b, n.b.c) == 0 && i.a > 0 || Ud(r.b.d, n.b.d + n.b.a) == 0 && i.b < 0 || Ud(r.b.d + r.b.a, n.b.d) == 0 && i.b > 0) { + f = 0; + break; + } + } else + f = j.Math.min(f, lLn(n, r, i)); + f = j.Math.min(f, lRn(n, c, f, i)); + } + return f; + } + function z7(n, e) { + var t, i, r, c, o, f, h; + if (n.b < 2) + throw T(new Hn("The vector chain must contain at least a source and a target point.")); + for (r = (ne(n.b != 0), u(n.a.a.c, 8)), uE(e, r.a, r.b), h = new b2((!e.a && (e.a = new Yt(io, e, 5)), e.a)), o = _e(n, 1); o.a < n.b - 1; ) + f = u(Re(o), 8), h.e != h.i.gc() ? t = u(oe(h), 469) : (t = (dd(), i = new Xy(), i), a$n(h, t)), mz(t, f.a, f.b); + for (; h.e != h.i.gc(); ) + oe(h), p6(h); + c = (ne(n.b != 0), u(n.c.b.c, 8)), cE(e, c.a, c.b); + } + function aRn(n, e) { + var t, i, r, c, o, f, h, l, a; + for (t = 0, r = new E((Ln(0, n.c.length), u(n.c[0], 101)).g.b.j); r.a < r.c.c.length; ) + i = u(y(r), 11), i.p = t++; + for (e == (J(), Kn) ? wi(n, new Ybn()) : wi(n, new Zbn()), f = 0, a = n.c.length - 1; f < a; ) + o = (Ln(f, n.c.length), u(n.c[f], 101)), l = (Ln(a, n.c.length), u(n.c[a], 101)), c = e == Kn ? o.c : o.a, h = e == Kn ? l.a : l.c, f1(o, e, (ff(), nv), c), f1(l, e, Z4, h), ++f, --a; + f == a && f1((Ln(f, n.c.length), u(n.c[f], 101)), e, (ff(), lp), null); + } + function jye(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + return d = n.a.i + n.a.g / 2, g = n.a.i + n.a.g / 2, v = e.i + e.g / 2, C = e.j + e.f / 2, f = new fn(v, C), l = u(hn(e, (Xe(), Mp)), 8), l.a = l.a + d, l.b = l.b + g, c = (f.b - l.b) / (f.a - l.a), i = f.b - c * f.a, m = t.i + t.g / 2, S = t.j + t.f / 2, h = new fn(m, S), a = u(hn(t, Mp), 8), a.a = a.a + d, a.b = a.b + g, o = (h.b - a.b) / (h.a - a.a), r = h.b - o * h.a, p = (i - r) / (o - c), l.a < p && f.a < p || p < l.a && p < f.a ? !1 : !(a.a < p && h.a < p || p < a.a && p < h.a); + } + function Eye(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + if (g = u(te(n.c, e), 183), !g) + throw T(new Af("Edge did not exist in input.")); + return l = t4(g), c = N9((!e.a && (e.a = new V(Mt, e, 6, 6)), e.a)), f = !c, f && (p = new ea(), t = new vEn(n, l, p), Sre((!e.a && (e.a = new V(Mt, e, 6, 6)), e.a), t), Ro(g, $tn, p)), r = ga(e, (Xe(), Rg)), r && (a = u(hn(e, Rg), 74), o = !a || iTn(a), h = !o, h && (d = new ea(), i = new lmn(d), $i(a, i), Ro(g, "junctionPoints", d))), h3(g, "container", S8(e).k), null; + } + function yZ(n, e, t) { + var i, r, c, o, f, h, l, a; + this.a = n, this.b = e, this.c = t, this.e = cf(A(M(XTe, 1), rn, 168, 0, [new f2(n, e), new f2(e, t), new f2(t, n)])), this.f = cf(A(M(di, 1), q, 8, 0, [n, e, t])), this.d = (i = ji(Qr(this.b), this.a), r = ji(Qr(this.c), this.a), c = ji(Qr(this.c), this.b), o = i.a * (this.a.a + this.b.a) + i.b * (this.a.b + this.b.b), f = r.a * (this.a.a + this.c.a) + r.b * (this.a.b + this.c.b), h = 2 * (i.a * c.b - i.b * c.a), l = (r.b * o - i.b * f) / h, a = (i.a * f - r.a * o) / h, new fn(l, a)); + } + function dRn(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v; + if (g = new nb(n.p), Ro(e, We, g), t && !(n.f ? C8(n.f) : null).a.dc()) + for (a = new ea(), Ro(e, "logs", a), f = 0, v = new _p((n.f ? C8(n.f) : null).b.Kc()); v.b.Ob(); ) + p = Ce(v.b.Pb()), d = new nb(p), sb(a, f), g$(a, f, d), ++f; + if (i && (l = new nj(n.q), Ro(e, "executionTime", l)), !C8(n.a).a.dc()) + for (o = new ea(), Ro(e, FB, o), f = 0, c = new _p(C8(n.a).b.Kc()); c.b.Ob(); ) + r = u(c.b.Pb(), 1949), h = new r2(), sb(o, f), g$(o, f, h), dRn(r, h, t, i), ++f; + } + function t0(n, e) { + var t, i, r, c, o, f; + for (c = n.c, o = n.d, Ki(n, null), Ti(n, null), e && on(sn(k(o, (G(), T_)))) ? Ki(n, bZ(o.i, (sr(), Lc), (J(), Vn))) : Ki(n, o), e && on(sn(k(c, (G(), A_)))) ? Ti(n, bZ(c.i, (sr(), Au), (J(), Gn))) : Ti(n, c), i = new E(n.b); i.a < i.c.c.length; ) + t = u(y(i), 70), r = u(k(t, (nn(), Jf)), 272), r == (sf(), jv) ? H(t, Jf, uw) : r == uw && H(t, Jf, jv); + f = on(sn(k(n, (G(), mf)))), H(n, mf, (qn(), !f)), n.a = o7(n.a); + } + function Cye(n, e, t) { + var i, r, c, o, f, h; + for (i = 0, c = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); c.e != c.i.gc(); ) + r = u(oe(c), 33), o = "", (!r.n && (r.n = new V(Rr, r, 1, 7)), r.n).i == 0 || (o = u(D((!r.n && (r.n = new V(Rr, r, 1, 7)), r.n), 0), 137).a), f = new VCn(o), Pr(f, r), H(f, (dl(), hp), r), f.b = i++, f.d.a = r.i + r.g / 2, f.d.b = r.j + r.f / 2, f.e.a = j.Math.max(r.g, 1), f.e.b = j.Math.max(r.f, 1), W(e.e, f), Rc(t.f, r, f), h = u(hn(r, (Go(), Drn)), 98), h == (Ai(), ql) && (h = jf); + } + function Tye(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + t = yd(new ca(), n.f), l = n.i[e.c.i.p], p = n.i[e.d.i.p], h = e.c, g = e.d, f = h.a.b, d = g.a.b, l.b || (f += h.n.b), p.b || (d += g.n.b), a = Gt(j.Math.max(0, f - d)), o = Gt(j.Math.max(0, d - f)), v = (m = j.Math.max(1, u(k(e, (nn(), yp)), 19).a), C = pX(e.c.i.k, e.d.i.k), m * C), r = jo(lo(ho(fo(ao(new Ns(), v), o), t), u(te(n.k, e.c), 121))), c = jo(lo(ho(fo(ao(new Ns(), v), a), t), u(te(n.k, e.d), 121))), i = new J7n(r, c), n.c[e.p] = i; + } + function Mye(n, e, t, i) { + var r, c, o, f, h, l; + for (o = new _Rn(n, e, t), h = new Ii(i, 0), r = !1; h.b < h.d.gc(); ) + f = (ne(h.b < h.d.gc()), u(h.d.Xb(h.c = h.b++), 233)), f == e || f == t ? Wu(h) : !r && K(Zo(f.g, f.d[0]).a) > K(Zo(o.g, o.d[0]).a) ? (ne(h.b > 0), h.a.Xb(h.c = --h.b), V0(h, o), r = !0) : f.e && f.e.gc() > 0 && (c = (!f.e && (f.e = new X()), f.e).Mc(e), l = (!f.e && (f.e = new X()), f.e).Mc(t), (c || l) && ((!f.e && (f.e = new X()), f.e).Fc(o), ++o.c)); + r || (i.c[i.c.length] = o); + } + function bRn(n) { + var e, t, i; + if (Cw(u(k(n, (nn(), Bt)), 98))) + for (t = new E(n.j); t.a < t.c.c.length; ) + e = u(y(t), 11), e.j == (J(), Xr) && (i = u(k(e, (G(), Mu)), 10), i ? si(e, u(k(i, ec), 61)) : e.e.c.length - e.g.c.length < 0 ? si(e, Vn) : si(e, Gn)); + else { + for (t = new E(n.j); t.a < t.c.c.length; ) + e = u(y(t), 11), i = u(k(e, (G(), Mu)), 10), i ? si(e, u(k(i, ec), 61)) : e.e.c.length - e.g.c.length < 0 ? si(e, (J(), Vn)) : si(e, (J(), Gn)); + H(n, Bt, (Ai(), Cv)); + } + } + function U7(n) { + var e, t, i; + switch (n) { + case 91: + case 93: + case 45: + case 94: + case 44: + case 92: + i = "\\" + String.fromCharCode(n & Ut); + break; + case 12: + i = "\\f"; + break; + case 10: + i = "\\n"; + break; + case 13: + i = "\\r"; + break; + case 9: + i = "\\t"; + break; + case 27: + i = "\\e"; + break; + default: + n < 32 ? (t = (e = n >>> 0, "0" + e.toString(16)), i = "\\x" + Zu(t, t.length - 2, t.length)) : n >= Ji ? (t = (e = n >>> 0, "0" + e.toString(16)), i = "\\v" + Zu(t, t.length - 6, t.length)) : i = "" + String.fromCharCode(n & Ut); + } + return i; + } + function rL(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (o = n.e, h = e.e, h == 0) + return n; + if (o == 0) + return e.e == 0 ? e : new Pw(-e.e, e.d, e.a); + if (c = n.d, f = e.d, c + f == 2) + return t = ui(n.a[0], hr), i = ui(e.a[0], hr), o < 0 && (t = S3(t)), h < 0 && (i = S3(i)), m7(vl(t, i)); + if (r = c != f ? c > f ? 1 : -1 : YV(n.a, e.a, c), r == -1) + d = -h, a = o == h ? M$(e.a, f, n.a, c) : S$(e.a, f, n.a, c); + else if (d = o, o == h) { + if (r == 0) + return jl(), U4; + a = M$(n.a, c, e.a, f); + } else + a = S$(n.a, c, e.a, f); + return l = new Pw(d, a.length, a), K5(l), l; + } + function jZ(n) { + var e, t, i, r, c, o; + for (this.e = new X(), this.a = new X(), t = n.b - 1; t < 3; t++) + u3(n, 0, u(qo(n, 0), 8)); + if (n.b < 4) + throw T(new Hn("At (least dimension + 1) control points are necessary!")); + for (this.b = 3, this.d = !0, this.c = !1, l9e(this, n.b + this.b - 1), o = new X(), c = new E(this.e), e = 0; e < this.b - 1; e++) + W(o, Y(y(c))); + for (r = _e(n, 0); r.b != r.d.c; ) + i = u(Re(r), 8), W(o, Y(y(c))), W(this.a, new eMn(i, o)), Ln(0, o.c.length), o.c.splice(0, 1); + } + function wRn(n, e) { + var t, i, r, c, o, f, h, l, a; + for (c = new E(n.b); c.a < c.c.c.length; ) + for (r = u(y(c), 29), f = new E(r.a); f.a < f.c.c.length; ) + for (o = u(y(f), 10), o.k == (Qn(), Ju) && (h = (l = u(ve(new re(ue(Lr(o).a.Kc(), new Mn()))), 17), a = u(ve(new re(ue(ei(o).a.Kc(), new Mn()))), 17), !on(sn(k(l, (G(), mf)))) || !on(sn(k(a, mf))) ? e : GOn(e)), W2(o, h)), i = new re(ue(ei(o).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), h = on(sn(k(t, (G(), mf)))) ? GOn(e) : e, NOn(t, h); + } + function Aye(n, e, t, i, r) { + var c, o, f; + if (t.f >= e.o && t.f <= e.f || e.a * 0.5 <= t.f && e.a * 1.5 >= t.f) { + if (o = u(un(e.n, e.n.c.length - 1), 211), o.e + o.d + t.g + r <= i && (c = u(un(e.n, e.n.c.length - 1), 211), c.f - n.f + t.f <= n.b || n.a.c.length == 1)) + return yQ(e, t), !0; + if (e.s + t.g <= i && (e.t + e.d + t.f + r <= n.b || n.a.c.length == 1)) + return W(e.b, t), f = u(un(e.n, e.n.c.length - 1), 211), W(e.n, new lC(e.s, f.f + f.a + e.i, e.i)), iJ(u(un(e.n, e.n.c.length - 1), 211), t), oRn(e, t), !0; + } + return !1; + } + function gRn(n, e, t) { + var i, r, c, o; + return n.ej() ? (r = null, c = n.fj(), i = n.Zi(1, o = B$(n, e, t), t, e, c), n.bj() && !(n.ni() && o != null ? tt(o, t) : B(o) === B(t)) ? (o != null && (r = n.dj(o, r)), r = n.cj(t, r), n.ij() && (r = n.lj(o, t, r)), r ? (r.Ei(i), r.Fi()) : n.$i(i)) : (n.ij() && (r = n.lj(o, t, r)), r ? (r.Ei(i), r.Fi()) : n.$i(i)), o) : (o = B$(n, e, t), n.bj() && !(n.ni() && o != null ? tt(o, t) : B(o) === B(t)) && (r = null, o != null && (r = n.dj(o, null)), r = n.cj(t, r), r && r.Fi()), o); + } + function S6(n, e) { + var t, i, r, c, o, f, h, l; + e %= 24, n.q.getHours() != e && (i = new j.Date(n.q.getTime()), i.setDate(i.getDate() + 1), f = n.q.getTimezoneOffset() - i.getTimezoneOffset(), f > 0 && (h = f / 60 | 0, l = f % 60, r = n.q.getDate(), t = n.q.getHours(), t + h >= 24 && ++r, c = new j.Date(n.q.getFullYear(), n.q.getMonth(), r, e + h, n.q.getMinutes() + l, n.q.getSeconds(), n.q.getMilliseconds()), n.q.setTime(c.getTime()))), o = n.q.getTime(), n.q.setTime(o + 36e5), n.q.getHours() != e && n.q.setTime(o); + } + function Sye(n, e) { + var t, i, r, c, o; + if (le(e, "Path-Like Graph Wrapping", 1), n.b.c.length == 0) { + ce(e); + return; + } + if (r = new PY(n), o = (r.i == null && (r.i = jV(r, new HH())), K(r.i) * r.f), t = o / (r.i == null && (r.i = jV(r, new HH())), K(r.i)), r.b > t) { + ce(e); + return; + } + switch (u(k(n, (nn(), W_)), 337).g) { + case 2: + c = new GH(); + break; + case 0: + c = new KH(); + break; + default: + c = new zH(); + } + if (i = c.Vf(n, r), !c.Wf()) + switch (u(k(n, cP), 338).g) { + case 2: + i = aLn(r, i); + break; + case 1: + i = lxn(r, i); + } + Tje(n, r, i), ce(e); + } + function Pye(n, e) { + var t, i, r, c; + if (dle(n.d, n.e), n.c.a.$b(), K(Y(k(e.j, (nn(), XS)))) != 0 || K(Y(k(e.j, XS))) != 0) + for (t = O4, B(k(e.j, Ll)) !== B((Rh(), Nl)) && H(e.j, (G(), m0), (qn(), !0)), c = u(k(e.j, xm), 19).a, r = 0; r < c && (i = fye(n, e), !(i < t && (t = i, tOn(n), t == 0))); r++) + ; + else + for (t = nt, B(k(e.j, Ll)) !== B((Rh(), Nl)) && H(e.j, (G(), m0), (qn(), !0)), c = u(k(e.j, xm), 19).a, r = 0; r < c && (i = tRn(n, e), !(i < t && (t = i, tOn(n), t == 0))); r++) + ; + } + function Iye(n, e) { + var t, i, r, c, o, f, h, l; + for (o = new X(), f = 0, t = 0, h = 0; f < e.c.length - 1 && t < n.gc(); ) { + for (i = u(n.Xb(t), 19).a + h; (Ln(f + 1, e.c.length), u(e.c[f + 1], 19)).a < i; ) + ++f; + for (l = 0, c = i - (Ln(f, e.c.length), u(e.c[f], 19)).a, r = (Ln(f + 1, e.c.length), u(e.c[f + 1], 19)).a - i, c > r && ++l, W(o, (Ln(f + l, e.c.length), u(e.c[f + l], 19))), h += (Ln(f + l, e.c.length), u(e.c[f + l], 19)).a - i, ++t; t < n.gc() && u(n.Xb(t), 19).a + h <= (Ln(f + l, e.c.length), u(e.c[f + l], 19)).a; ) + ++t; + f += 1 + l; + } + return o; + } + function cL(n) { + var e, t, i, r, c, o, f; + if (!n.d) { + if (f = new Y2n(), e = b9, c = e.a.zc(n, e), c == null) { + for (i = new ie(Ar(n)); i.e != i.i.gc(); ) + t = u(oe(i), 26), Ft(f, cL(t)); + e.a.Bc(n) != null, e.a.gc() == 0; + } + for (o = f.i, r = (!n.q && (n.q = new V(co, n, 11, 10)), new ie(n.q)); r.e != r.i.gc(); ++o) + u(oe(r), 399); + Ft(f, (!n.q && (n.q = new V(co, n, 11, 10)), n.q)), ab(f), n.d = new Ew((u(D(R((ol(), Nn).o), 9), 18), f.i), f.g), n.e = u(f.g, 673), n.e == null && (n.e = iee), Iu(n).b &= -17; + } + return n.d; + } + function v4(n, e, t, i) { + var r, c, o, f, h, l; + if (l = _c(n.e.Tg(), e), h = 0, r = u(n.g, 119), er(), u(e, 66).Oj()) { + for (o = 0; o < n.i; ++o) + if (c = r[o], l.rl(c.ak())) { + if (tt(c, t)) + return h; + ++h; + } + } else if (t != null) { + for (f = 0; f < n.i; ++f) + if (c = r[f], l.rl(c.ak())) { + if (tt(t, c.dd())) + return h; + ++h; + } + if (i) { + for (h = 0, o = 0; o < n.i; ++o) + if (c = r[o], l.rl(c.ak())) { + if (B(t) === B(YO(n, u(c.dd(), 56)))) + return h; + ++h; + } + } + } else + for (o = 0; o < n.i; ++o) + if (c = r[o], l.rl(c.ak())) { + if (c.dd() == null) + return h; + ++h; + } + return -1; + } + function Oye(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p; + for (Pn(), wi(n, new S2n()), o = p8(n), p = new X(), g = new X(), f = null, h = 0; o.b != 0; ) + c = u(o.b == 0 ? null : (ne(o.b != 0), Ts(o, o.a.a)), 157), !f || du(f) * zu(f) / 2 < du(c) * zu(c) ? (f = c, p.c[p.c.length] = c) : (h += du(c) * zu(c), g.c[g.c.length] = c, g.c.length > 1 && (h > du(f) * zu(f) / 2 || o.b == 0) && (d = new zC(g), a = du(f) / zu(f), l = kL(d, e, new i2(), t, i, r, a), st(Lo(d.e), l), f = d, p.c[p.c.length] = d, h = 0, g.c = F(Zn, rn, 1, 0, 5, 1))); + return Zt(p, g), p; + } + function Dye(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m; + if (t.mh(e) && (a = (p = e, p ? u(i, 49).xh(p) : null), a)) + if (m = t.bh(e, n.a), v = e.t, v > 1 || v == -1) + if (d = u(m, 69), g = u(a, 69), d.dc()) + g.$b(); + else + for (o = !!ir(e), c = 0, f = n.a ? d.Kc() : d.Zh(); f.Ob(); ) + l = u(f.Pb(), 56), r = u(Ld(n, l), 56), r ? (o ? (h = g.Xc(r), h == -1 ? g.Xh(c, r) : c != h && g.ji(c, r)) : g.Xh(c, r), ++c) : n.b && !o && (g.Xh(c, l), ++c); + else + m == null ? a.Wb(null) : (r = Ld(n, m), r == null ? n.b && !ir(e) && a.Wb(m) : a.Wb(r)); + } + function $ye(n, e) { + var t, i, r, c, o, f, h, l; + for (t = new $dn(), r = new re(ue(Lr(e).a.Kc(), new Mn())); Se(r); ) + if (i = u(ve(r), 17), !Wi(i) && (f = i.c.i, RJ(f, oS))) { + if (l = nZ(n, f, oS, sS), l == -1) + continue; + t.b = j.Math.max(t.b, l), !t.a && (t.a = new X()), W(t.a, f); + } + for (o = new re(ue(ei(e).a.Kc(), new Mn())); Se(o); ) + if (c = u(ve(o), 17), !Wi(c) && (h = c.d.i, RJ(h, sS))) { + if (l = nZ(n, h, sS, oS), l == -1) + continue; + t.d = j.Math.max(t.d, l), !t.c && (t.c = new X()), W(t.c, h); + } + return t; + } + function pRn(n) { + l4(); + var e, t, i, r; + if (e = Gt(n), n < wm.length) + return wm[e]; + if (n <= 50) + return L7((jl(), pR), e); + if (n <= E1) + return P2(L7(fp[1], e), e); + if (n > 1e6) + throw T(new bj("power of ten too big")); + if (n <= nt) + return P2(L7(fp[1], e), e); + for (i = L7(fp[1], nt), r = i, t = eu(n - nt), e = Gt(n % nt); hc(t, nt) > 0; ) + r = Fw(r, i), t = vl(t, nt); + for (r = Fw(r, L7(fp[1], e)), r = P2(r, nt), t = eu(n - nt); hc(t, nt) > 0; ) + r = P2(r, nt), t = vl(t, nt); + return r = P2(r, e), r; + } + function Fye(n, e) { + var t, i, r, c, o, f, h, l, a; + for (le(e, "Hierarchical port dummy size processing", 1), h = new X(), a = new X(), i = K(Y(k(n, (nn(), Dg)))), t = i * 2, c = new E(n.b); c.a < c.c.c.length; ) { + for (r = u(y(c), 29), h.c = F(Zn, rn, 1, 0, 5, 1), a.c = F(Zn, rn, 1, 0, 5, 1), f = new E(r.a); f.a < f.c.c.length; ) + o = u(y(f), 10), o.k == (Qn(), Xt) && (l = u(k(o, (G(), ec)), 61), l == (J(), Kn) ? h.c[h.c.length] = o : l == ae && (a.c[a.c.length] = o)); + qLn(h, !0, t), qLn(a, !1, t); + } + ce(e); + } + function xye(n, e) { + var t, i, r, c, o, f, h; + le(e, "Layer constraint postprocessing", 1), h = n.b, h.c.length != 0 && (i = (Ln(0, h.c.length), u(h.c[0], 29)), o = u(un(h, h.c.length - 1), 29), t = new Rs(n), c = new Rs(n), mke(n, i, o, t, c), t.a.c.length == 0 || (ib(0, h.c.length), e5(h.c, 0, t)), c.a.c.length == 0 || (h.c[h.c.length] = c)), ai(n, (G(), C_)) && (r = new Rs(n), f = new Rs(n), m7e(n, r, f), r.a.c.length == 0 || (ib(0, h.c.length), e5(h.c, 0, r)), f.a.c.length == 0 || (h.c[h.c.length] = f)), ce(e); + } + function vRn(n) { + var e, t, i, r, c, o, f, h, l, a; + for (h = new E(n.a); h.a < h.c.c.length; ) + if (f = u(y(h), 10), f.k == (Qn(), Xt) && (r = u(k(f, (G(), ec)), 61), r == (J(), Vn) || r == Gn)) + for (i = new re(ue(Kh(f).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), e = t.a, e.b != 0 && (l = t.c, l.i == f && (c = (ne(e.b != 0), u(e.a.a.c, 8)), c.b = Gr(A(M(di, 1), q, 8, 0, [l.i.n, l.n, l.a])).b), a = t.d, a.i == f && (o = (ne(e.b != 0), u(e.c.b.c, 8)), o.b = Gr(A(M(di, 1), q, 8, 0, [a.i.n, a.n, a.a])).b)); + } + function Lye(n, e) { + var t, i, r, c, o, f, h; + for (le(e, "Sort By Input Model " + k(n, (nn(), Ll)), 1), r = 0, i = new E(n.b); i.a < i.c.c.length; ) { + for (t = u(y(i), 29), h = r == 0 ? 0 : r - 1, f = u(un(n.b, h), 29), o = new E(t.a); o.a < o.c.c.length; ) + c = u(y(o), 10), B(k(c, Bt)) !== B((Ai(), id)) && B(k(c, Bt)) !== B(Sc) && (Pn(), wi(c.j, new LPn(f, FFn(c))), oa(e, "Node " + c + " ports: " + c.j)); + Pn(), wi(t.a, new cOn(f, u(k(n, Ll), 339), u(k(n, Zun), 378))), oa(e, "Layer " + r + ": " + t), ++r; + } + ce(e); + } + function Nye(n, e) { + var t, i, r, c; + if (c = uRn(e), _t(new $n(null, (!e.c && (e.c = new V(Ru, e, 9, 9)), new xn(e.c, 16))), new l5n(c)), r = u(k(c, (G(), Ac)), 21), BEe(e, r), r.Hc((fr(), $s))) + for (i = new ie((!e.c && (e.c = new V(Ru, e, 9, 9)), e.c)); i.e != i.i.gc(); ) + t = u(oe(i), 118), wCe(n, e, c, t); + return u(hn(e, (nn(), Va)), 174).gc() != 0 && YNn(e, c), on(sn(k(c, Tsn))) && r.Fc(RS), ai(c, Yk) && N9n(new AQ(K(Y(k(c, Yk)))), c), B(hn(e, Qb)) === B((_h(), x1)) ? STe(n, e, c) : VCe(n, e, c), c; + } + function P6(n, e, t, i) { + var r, c, o; + if (this.j = new X(), this.k = new X(), this.b = new X(), this.c = new X(), this.e = new d2(), this.i = new fu(), this.f = new FI(), this.d = new X(), this.g = new X(), W(this.b, n), W(this.b, e), this.e.c = j.Math.min(n.a, e.a), this.e.d = j.Math.min(n.b, e.b), this.e.b = j.Math.abs(n.a - e.a), this.e.a = j.Math.abs(n.b - e.b), r = u(k(i, (nn(), Mr)), 74), r) + for (o = _e(r, 0); o.b != o.d.c; ) + c = u(Re(o), 8), tV(c.a, n.a) && Ke(this.i, c); + t && W(this.j, t), W(this.k, i); + } + function Bye(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (a = new GE(new o5n(t)), f = F(_u, wh, 25, n.f.e.c.length, 16, 1), EW(f, f.length), t[e.b] = 0, l = new E(n.f.e); l.a < l.c.c.length; ) + h = u(y(l), 144), h.b != e.b && (t[h.b] = nt), T3(o4(a, h)); + for (; a.b.c.length != 0; ) + for (d = u(K$(a), 144), f[d.b] = !0, c = Yyn(new tO(n.b, d), 0); c.c; ) + r = u(nX(c), 282), g = d3e(r, d), !f[g.b] && (ai(r, (C7(), uS)) ? o = K(Y(k(r, uS))) : o = n.c, i = t[d.b] + o, i < t[g.b] && (t[g.b] = i, VIn(a, g), T3(o4(a, g)))); + } + function mRn(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (r = !0, o = new E(n.b); o.a < o.c.c.length; ) { + for (c = u(y(o), 29), l = Vt, a = null, h = new E(c.a); h.a < h.c.c.length; ) + if (f = u(y(h), 10), d = K(e.p[f.p]) + K(e.d[f.p]) - f.d.d, i = K(e.p[f.p]) + K(e.d[f.p]) + f.o.b + f.d.a, d > l && i > l) + a = f, l = K(e.p[f.p]) + K(e.d[f.p]) + f.o.b + f.d.a; + else { + r = !1, t.n && oa(t, "bk node placement breaks on " + f + " which should have been after " + a); + break; + } + if (!r) + break; + } + return t.n && oa(t, e + " is feasible: " + r), r; + } + function Rye(n, e, t, i) { + var r, c, o, f, h, l, a; + for (f = -1, a = new E(n); a.a < a.c.c.length; ) + l = u(y(a), 112), l.g = f--, r = ge(vC(ZE(pt(new $n(null, new xn(l.f, 16)), new egn()), new tgn())).d), c = ge(vC(ZE(pt(new $n(null, new xn(l.k, 16)), new ign()), new rgn())).d), o = r, h = c, i || (o = ge(vC(ZE(new $n(null, new xn(l.f, 16)), new cgn())).d), h = ge(vC(ZE(new $n(null, new xn(l.k, 16)), new ugn())).d)), l.d = o, l.a = r, l.i = h, l.b = c, h == 0 ? Ht(t, l, t.c.b, t.c) : o == 0 && Ht(e, l, e.c.b, e.c); + } + function _ye(n, e, t, i) { + var r, c, o, f, h, l, a; + if (t.d.i != e.i) { + for (r = new qh(n), ta(r, (Qn(), pi)), H(r, (G(), rt), t), H(r, (nn(), Bt), (Ai(), Sc)), i.c[i.c.length] = r, o = new gc(), Hr(o, r), si(o, (J(), Gn)), f = new gc(), Hr(f, r), si(f, Vn), a = t.d, Ti(t, o), c = new Id(), Pr(c, t), H(c, Mr, null), Ki(c, f), Ti(c, a), l = new Ii(t.b, 0); l.b < l.d.gc(); ) + h = (ne(l.b < l.d.gc()), u(l.d.Xb(l.c = l.b++), 70)), B(k(h, Jf)) === B((sf(), uw)) && (H(h, wp, t), Wu(l), W(c.b, h)); + YLn(r, o, f); + } + } + function Kye(n, e, t, i) { + var r, c, o, f, h, l, a; + if (t.c.i != e.i) + for (r = new qh(n), ta(r, (Qn(), pi)), H(r, (G(), rt), t), H(r, (nn(), Bt), (Ai(), Sc)), i.c[i.c.length] = r, o = new gc(), Hr(o, r), si(o, (J(), Gn)), f = new gc(), Hr(f, r), si(f, Vn), Ti(t, o), c = new Id(), Pr(c, t), H(c, Mr, null), Ki(c, f), Ti(c, e), YLn(r, o, f), l = new Ii(t.b, 0); l.b < l.d.gc(); ) + h = (ne(l.b < l.d.gc()), u(l.d.Xb(l.c = l.b++), 70)), a = u(k(h, Jf), 272), a == (sf(), uw) && (ai(h, wp) || H(h, wp, t), Wu(l), W(c.b, h)); + } + function Hye(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (g = new X(), S = jC(i), C = e * n.a, d = 0, v = 0, c = new hi(), o = new hi(), f = new X(), $ = 0, O = 0, p = 0, m = 0, l = 0, a = 0; S.a.gc() != 0; ) + h = Uge(S, r, o), h && (S.a.Bc(h) != null, f.c[f.c.length] = h, c.a.zc(h, c), v = n.f[h.p], $ += n.e[h.p] - v * n.b, d = n.c[h.p], O += d * n.b, a += v * n.b, m += n.e[h.p]), (!h || S.a.gc() == 0 || $ >= C && n.e[h.p] > v * n.b || O >= t * C) && (g.c[g.c.length] = f, f = new X(), Xi(o, c), c.a.$b(), l -= a, p = j.Math.max(p, l * n.b + m), l += O, $ = O, O = 0, a = 0, m = 0); + return new Pi(p, g); + } + function qye(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p; + for (t = (l = new Mh(n.c.b).a.vc().Kc(), new N0(l)); t.a.Ob(); ) + e = (f = u(t.a.Pb(), 42), u(f.dd(), 149)), r = e.a, r == null && (r = ""), i = wue(n.c, r), !i && r.length == 0 && (i = gge(n)), i && !bb(i.c, e, !1) && Ke(i.c, e); + for (o = _e(n.a, 0); o.b != o.d.c; ) + c = u(Re(o), 478), a = j$(n.c, c.a), p = j$(n.c, c.b), a && p && Ke(a.c, new Pi(p, c.c)); + for (_s(n.a), g = _e(n.b, 0); g.b != g.d.c; ) + d = u(Re(g), 478), e = bue(n.c, d.a), h = j$(n.c, d.b), e && h && rre(e, h, d.c); + _s(n.b); + } + function Gye(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + c = new M9(n), o = new NFn(), r = ($8(o.g), $8(o.j), Eu(o.b), $8(o.d), $8(o.i), Eu(o.k), Eu(o.c), Eu(o.e), p = kLn(o, c, null), fNn(o, c), p), e && (l = new M9(e), f = nje(l), JJ(r, A(M(xfn, 1), rn, 527, 0, [f]))), g = !1, d = !1, t && (l = new M9(t), kA in l.a && (g = Dh(l, kA).ge().a), Dqn in l.a && (d = Dh(l, Dqn).ge().a)), a = e8n(IIn(new Gp(), g), d), N5e(new Qgn(), r, a), kA in c.a && Ro(c, kA, null), (g || d) && (h = new r2(), dRn(a, h, g, d), Ro(c, kA, h)), i = new omn(o), Owe(new kz(r), i); + } + function zye(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (o = new HFn(), l = A(M(be, 1), Le, 25, 15, [0]), r = -1, c = 0, i = 0, h = 0; h < n.b.c.length; ++h) + if (a = u(un(n.b, h), 434), a.b > 0) { + if (r < 0 && a.a && (r = h, c = l[0], i = 0), r >= 0) { + if (f = a.b, h == r && (f -= i++, f == 0)) + return 0; + if (!k_n(e, l, a, f, o)) { + h = r - 1, l[0] = c; + continue; + } + } else if (r = -1, !k_n(e, l, a, 0, o)) + return 0; + } else { + if (r = -1, Di(a.c, 0) == 32) { + if (d = l[0], KPn(e, l), l[0] > d) + continue; + } else if (T1e(e, a.c, l[0])) { + l[0] += a.c.length; + continue; + } + return 0; + } + return TCe(o, t) ? l[0] : 0; + } + function I6(n) { + var e, t, i, r, c, o, f, h; + if (!n.f) { + if (h = new YH(), f = new YH(), e = b9, o = e.a.zc(n, e), o == null) { + for (c = new ie(Ar(n)); c.e != c.i.gc(); ) + r = u(oe(c), 26), Ft(h, I6(r)); + e.a.Bc(n) != null, e.a.gc() == 0; + } + for (i = (!n.s && (n.s = new V(su, n, 21, 17)), new ie(n.s)); i.e != i.i.gc(); ) + t = u(oe(i), 170), I(t, 99) && me(f, u(t, 18)); + ab(f), n.r = new $En(n, (u(D(R((ol(), Nn).o), 6), 18), f.i), f.g), Ft(h, n.r), ab(h), n.f = new Ew((u(D(R(Nn.o), 5), 18), h.i), h.g), Iu(n).b &= -3; + } + return n.f; + } + function Uye(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v; + for (o = n.o, i = F(be, Le, 25, o, 15, 1), r = F(be, Le, 25, o, 15, 1), t = n.p, e = F(be, Le, 25, t, 15, 1), c = F(be, Le, 25, t, 15, 1), l = 0; l < o; l++) { + for (d = 0; d < t && !zw(n, l, d); ) + ++d; + i[l] = d; + } + for (a = 0; a < o; a++) { + for (d = t - 1; d >= 0 && !zw(n, a, d); ) + --d; + r[a] = d; + } + for (p = 0; p < t; p++) { + for (f = 0; f < o && !zw(n, f, p); ) + ++f; + e[p] = f; + } + for (v = 0; v < t; v++) { + for (f = o - 1; f >= 0 && !zw(n, f, v); ) + --f; + c[v] = f; + } + for (h = 0; h < o; h++) + for (g = 0; g < t; g++) + h < c[g] && h > e[g] && g < r[h] && g > i[h] && wM(n, h, g, !1, !0); + } + function EZ(n) { + var e, t, i, r, c, o, f, h; + t = on(sn(k(n, (Go(), VUn)))), c = n.a.c.d, f = n.a.d.d, t ? (o = If(ji(new fn(f.a, f.b), c), 0.5), h = If(Qr(n.e), 0.5), e = ji(st(new fn(c.a, c.b), o), h), Zz(n.d, e)) : (r = K(Y(k(n.a, iWn))), i = n.d, c.a >= f.a ? c.b >= f.b ? (i.a = f.a + (c.a - f.a) / 2 + r, i.b = f.b + (c.b - f.b) / 2 - r - n.e.b) : (i.a = f.a + (c.a - f.a) / 2 + r, i.b = c.b + (f.b - c.b) / 2 + r) : c.b >= f.b ? (i.a = c.a + (f.a - c.a) / 2 + r, i.b = f.b + (c.b - f.b) / 2 + r) : (i.a = c.a + (f.a - c.a) / 2 + r, i.b = c.b + (f.b - c.b) / 2 - r - n.e.b)); + } + function Ec(n, e) { + var t, i, r, c, o, f, h; + if (n == null) + return null; + if (c = n.length, c == 0) + return ""; + for (h = F(Ls, Bf, 25, c, 15, 1), RX(0, c, n.length), RX(0, c, h.length), RCn(n, 0, c, h, 0), t = null, f = e, r = 0, o = 0; r < c; r++) + i = h[r], __n(), i <= 32 && P[i] & 2 ? f ? (!t && (t = new Bs(n)), m1e(t, r - o++)) : (f = e, i != 32 && (!t && (t = new Bs(n)), _he(t, r - o, r - o + 1, String.fromCharCode(32)))) : f = !1; + return f ? t ? (c = t.a.length, c > 0 ? Zu(t.a, 0, c - 1) : "") : n.substr(0, c - 1) : t ? t.a : n; + } + function kRn(n) { + gd(n, new Oa(ad(fd(ld(hd(new na(), Na), "ELK DisCo"), "Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."), new han()))), Z(n, Na, vN, cn(Trn)), Z(n, Na, mN, cn(IR)), Z(n, Na, ep, cn(FUn)), Z(n, Na, s0, cn(Crn)), Z(n, Na, onn, cn(BUn)), Z(n, Na, fnn, cn(NUn)), Z(n, Na, snn, cn(RUn)), Z(n, Na, hnn, cn(LUn)), Z(n, Na, pnn, cn(xUn)), Z(n, Na, vnn, cn(PR)), Z(n, Na, mnn, cn(Ern)), Z(n, Na, knn, cn(nS)); + } + function CZ(n, e, t, i) { + var r, c, o, f, h, l, a, d, g; + if (c = new qh(n), ta(c, (Qn(), Mc)), H(c, (nn(), Bt), (Ai(), Sc)), r = 0, e) { + for (o = new gc(), H(o, (G(), rt), e), H(c, rt, e.i), si(o, (J(), Gn)), Hr(o, c), g = xf(e.e), l = g, a = 0, d = l.length; a < d; ++a) + h = l[a], Ti(h, o); + H(e, Mu, c), ++r; + } + if (t) { + for (f = new gc(), H(c, (G(), rt), t.i), H(f, rt, t), si(f, (J(), Vn)), Hr(f, c), g = xf(t.g), l = g, a = 0, d = l.length; a < d; ++a) + h = l[a], Ki(h, f); + H(t, Mu, c), ++r; + } + return H(c, (G(), KS), Q(r)), i.c[i.c.length] = c, c; + } + function mM() { + mM = N, r1n = A(M(Ls, 1), Bf, 25, 15, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70]), $ne = new RegExp(`[ +\r\f]+`); + try { + l9 = A(M(lMe, 1), rn, 2015, 0, [new D9((Cz(), PT("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ", a8((wj(), wj(), dm))))), new D9(PT("yyyy-MM-dd'T'HH:mm:ss'.'SSS", a8(dm))), new D9(PT("yyyy-MM-dd'T'HH:mm:ss", a8(dm))), new D9(PT("yyyy-MM-dd'T'HH:mm", a8(dm))), new D9(PT("yyyy-MM-dd", a8(dm)))]); + } catch (n) { + if (n = Et(n), !I(n, 78)) + throw T(n); + } + } + function Wye(n) { + var e, t, i, r; + if (i = jL((!n.c && (n.c = h7(n.f)), n.c), 0), n.e == 0 || n.a == 0 && n.f != -1 && n.e < 0) + return i; + if (e = fV(n) < 0 ? 1 : 0, t = n.e, r = (i.length + 1 + j.Math.abs(Gt(n.e)), new _0()), e == 1 && (r.a += "-"), n.e > 0) + if (t -= i.length - e, t >= 0) { + for (r.a += "0."; t > za.length; t -= za.length) + YEn(r, za); + Fjn(r, za, Gt(t)), De(r, i.substr(e)); + } else + t = e - t, De(r, Zu(i, e, Gt(t))), r.a += ".", De(r, r8(i, Gt(t))); + else { + for (De(r, i.substr(e)); t < -za.length; t += za.length) + YEn(r, za); + Fjn(r, za, Gt(-t)); + } + return r.a; + } + function TZ(n, e, t, i) { + var r, c, o, f, h, l, a, d, g; + return h = ji(new fn(t.a, t.b), n), l = h.a * e.b - h.b * e.a, a = e.a * i.b - e.b * i.a, d = (h.a * i.b - h.b * i.a) / a, g = l / a, a == 0 ? l == 0 ? (r = st(new fn(t.a, t.b), If(new fn(i.a, i.b), 0.5)), c = al(n, r), o = al(st(new fn(n.a, n.b), e), r), f = j.Math.sqrt(i.a * i.a + i.b * i.b) * 0.5, c < o && c <= f ? new fn(n.a, n.b) : o <= f ? st(new fn(n.a, n.b), e) : null) : null : d >= 0 && d <= 1 && g >= 0 && g <= 1 ? st(new fn(n.a, n.b), If(new fn(e.a, e.b), d)) : null; + } + function Xye(n, e, t) { + var i, r, c, o, f; + if (i = u(k(n, (nn(), $_)), 21), t.a > e.a && (i.Hc((mb(), dy)) ? n.c.a += (t.a - e.a) / 2 : i.Hc(by) && (n.c.a += t.a - e.a)), t.b > e.b && (i.Hc((mb(), gy)) ? n.c.b += (t.b - e.b) / 2 : i.Hc(wy) && (n.c.b += t.b - e.b)), u(k(n, (G(), Ac)), 21).Hc((fr(), $s)) && (t.a > e.a || t.b > e.b)) + for (f = new E(n.a); f.a < f.c.c.length; ) + o = u(y(f), 10), o.k == (Qn(), Xt) && (r = u(k(o, ec), 61), r == (J(), Vn) ? o.n.a += t.a - e.a : r == ae && (o.n.b += t.b - e.b)); + c = n.d, n.f.a = t.a - c.b - c.c, n.f.b = t.b - c.d - c.a; + } + function Vye(n, e, t) { + var i, r, c, o, f; + if (i = u(k(n, (nn(), $_)), 21), t.a > e.a && (i.Hc((mb(), dy)) ? n.c.a += (t.a - e.a) / 2 : i.Hc(by) && (n.c.a += t.a - e.a)), t.b > e.b && (i.Hc((mb(), gy)) ? n.c.b += (t.b - e.b) / 2 : i.Hc(wy) && (n.c.b += t.b - e.b)), u(k(n, (G(), Ac)), 21).Hc((fr(), $s)) && (t.a > e.a || t.b > e.b)) + for (o = new E(n.a); o.a < o.c.c.length; ) + c = u(y(o), 10), c.k == (Qn(), Xt) && (r = u(k(c, ec), 61), r == (J(), Vn) ? c.n.a += t.a - e.a : r == ae && (c.n.b += t.b - e.b)); + f = n.d, n.f.a = t.a - f.b - f.c, n.f.b = t.b - f.d - f.a; + } + function Qye(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + for (e = RLn(n), a = (f = new Bp(e).a.vc().Kc(), new bq(f)); a.a.Ob(); ) { + for (l = (r = u(a.a.Pb(), 42), u(r.cd(), 10)), d = 0, g = 0, d = l.d.d, g = l.o.b + l.d.a, n.d[l.p] = 0, t = l; (c = n.a[t.p]) != l; ) + i = ope(t, c), h = 0, n.c == (Ff(), O1) ? h = i.d.n.b + i.d.a.b - i.c.n.b - i.c.a.b : h = i.c.n.b + i.c.a.b - i.d.n.b - i.d.a.b, o = K(n.d[t.p]) + h, n.d[c.p] = o, d = j.Math.max(d, c.d.d - o), g = j.Math.max(g, o + c.o.b + c.d.a), t = c; + t = l; + do + n.d[t.p] = K(n.d[t.p]) + d, t = n.a[t.p]; + while (t != l); + n.b[l.p] = d + g; + } + } + function uL(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + for (n.b = !1, d = Lt, h = Vt, g = Lt, l = Vt, i = n.e.a.ec().Kc(); i.Ob(); ) + for (t = u(i.Pb(), 266), r = t.a, d = j.Math.min(d, r.c), h = j.Math.max(h, r.c + r.b), g = j.Math.min(g, r.d), l = j.Math.max(l, r.d + r.a), o = new E(t.c); o.a < o.c.c.length; ) + c = u(y(o), 395), e = c.a, e.a ? (a = r.d + c.b.b, f = a + c.c, g = j.Math.min(g, a), l = j.Math.max(l, f)) : (a = r.c + c.b.a, f = a + c.c, d = j.Math.min(d, a), h = j.Math.max(h, f)); + n.a = new fn(h - d, l - g), n.c = new fn(d + n.d.a, g + n.d.b); + } + function Jye(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (d = new X(), a = new oX(0, t), c = 0, XC(a, new lF(0, 0, a, t)), r = 0, l = new ie(n); l.e != l.i.gc(); ) + h = u(oe(l), 33), i = u(un(a.a, a.a.c.length - 1), 187), f = r + h.g + (u(un(a.a, 0), 187).b.c.length == 0 ? 0 : t), f > e && (r = 0, c += a.b + t, d.c[d.c.length] = a, a = new oX(c, t), i = new lF(0, a.f, a, t), XC(a, i), r = 0), i.b.c.length == 0 || h.f >= i.o && h.f <= i.f || i.a * 0.5 <= h.f && i.a * 1.5 >= h.f ? yQ(i, h) : (o = new lF(i.s + i.r + t, a.f, a, t), XC(a, o), yQ(o, h)), r = h.i + h.g; + return d.c[d.c.length] = a, d; + } + function ig(n) { + var e, t, i, r, c, o, f, h; + if (!n.a) { + if (n.o = null, h = new Smn(n), e = new J2n(), t = b9, f = t.a.zc(n, t), f == null) { + for (o = new ie(Ar(n)); o.e != o.i.gc(); ) + c = u(oe(o), 26), Ft(h, ig(c)); + t.a.Bc(n) != null, t.a.gc() == 0; + } + for (r = (!n.s && (n.s = new V(su, n, 21, 17)), new ie(n.s)); r.e != r.i.gc(); ) + i = u(oe(r), 170), I(i, 322) && me(e, u(i, 34)); + ab(e), n.k = new DEn(n, (u(D(R((ol(), Nn).o), 7), 18), e.i), e.g), Ft(h, n.k), ab(h), n.a = new Ew((u(D(R(Nn.o), 4), 18), h.i), h.g), Iu(n).b &= -2; + } + return n.a; + } + function Yye(n, e, t, i, r, c, o) { + var f, h, l, a, d, g; + return d = !1, h = SNn(t.q, e.f + e.b - t.q.f), g = r - (t.q.e + h - o), g < i.g || (l = c == n.c.length - 1 && g >= (Ln(c, n.c.length), u(n.c[c], 200)).e, a = (f = O6(i, g, !1), f.a), a > e.b && !l) ? !1 : ((l || a <= e.b) && (l && a > e.b ? (t.d = a, B8(t, Dxn(t, a))) : (JFn(t.q, h), t.c = !0), B8(i, r - (t.s + t.r)), k7(i, t.q.e + t.q.d, e.f), XC(e, i), n.c.length > c && (T7((Ln(c, n.c.length), u(n.c[c], 200)), i), (Ln(c, n.c.length), u(n.c[c], 200)).a.c.length == 0 && l1(n, c)), d = !0), d); + } + function MZ(n, e, t, i) { + var r, c, o, f, h, l, a; + if (a = _c(n.e.Tg(), e), r = 0, c = u(n.g, 119), h = null, er(), u(e, 66).Oj()) { + for (f = 0; f < n.i; ++f) + if (o = c[f], a.rl(o.ak())) { + if (tt(o, t)) { + h = o; + break; + } + ++r; + } + } else if (t != null) { + for (f = 0; f < n.i; ++f) + if (o = c[f], a.rl(o.ak())) { + if (tt(t, o.dd())) { + h = o; + break; + } + ++r; + } + } else + for (f = 0; f < n.i; ++f) + if (o = c[f], a.rl(o.ak())) { + if (o.dd() == null) { + h = o; + break; + } + ++r; + } + return h && (qu(n.e) && (l = e.$j() ? new v$(n.e, 4, e, t, null, r, !0) : hl(n, e.Kj() ? 2 : 1, e, t, e.zj(), -1, !0), i ? i.Ei(l) : i = l), i = q7(n, h, i)), i; + } + function sL(n, e, t, i, r, c, o) { + var f, h, l, a, d, g, p, v, m; + switch (v = 0, m = 0, h = r.c, f = r.b, a = t.f, p = t.g, e.g) { + case 0: + v = i.i + i.g + o, n.c ? m = Ave(v, c, i, o) : m = i.j, g = j.Math.max(h, v + p), l = j.Math.max(f, m + a); + break; + case 1: + m = i.j + i.f + o, n.c ? v = Mve(m, c, i, o) : v = i.i, g = j.Math.max(h, v + p), l = j.Math.max(f, m + a); + break; + case 2: + v = h + o, m = 0, g = h + o + p, l = j.Math.max(f, a); + break; + case 3: + v = 0, m = f + o, g = j.Math.max(h, p), l = f + o + a; + break; + default: + throw T(new Hn("IllegalPlacementOption.")); + } + return d = new MQ(n.a, g, l, e, v, m), d; + } + function Zye(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + if (f = n.d, d = u(k(n, (G(), mp)), 15), e = u(k(n, bp), 15), !(!d && !e)) { + if (c = K(Y(wb(n, (nn(), q_)))), o = K(Y(wb(n, Isn))), g = 0, d) { + for (l = 0, r = d.Kc(); r.Ob(); ) + i = u(r.Pb(), 10), l = j.Math.max(l, i.o.b), g += i.o.a; + g += c * (d.gc() - 1), f.d += l + o; + } + if (t = 0, e) { + for (l = 0, r = e.Kc(); r.Ob(); ) + i = u(r.Pb(), 10), l = j.Math.max(l, i.o.b), t += i.o.a; + t += c * (e.gc() - 1), f.a += l + o; + } + h = j.Math.max(g, t), h > n.o.a && (a = (h - n.o.a) / 2, f.b = j.Math.max(f.b, a), f.c = j.Math.max(f.c, a)); + } + } + function nje(n) { + var e, t, i, r, c, o, f, h; + for (c = new ZMn(), Bre(c, (L2(), MZn)), i = (r = Z$(n, F(tn, q, 2, 0, 6, 1)), new $v(new Hu(new iO(n, r).b))); i.b < i.d.gc(); ) + t = (ne(i.b < i.d.gc()), Ce(i.d.Xb(i.c = i.b++))), o = $Z(Wl, t), o && (e = Dh(n, t), e.je() ? f = e.je().a : e.ge() ? f = "" + e.ge().a : e.he() ? f = "" + e.he().a : f = e.Ib(), h = OZ(o, f), h != null && ((lu(o.j, (Ho(), vi)) || lu(o.j, Xn)) && s7(H$(c, Ot), o, h), lu(o.j, Yf) && s7(H$(c, bi), o, h), lu(o.j, Za) && s7(H$(c, Ru), o, h), lu(o.j, $1) && s7(H$(c, Rr), o, h))); + return c; + } + function kM(n, e, t, i) { + var r, c, o, f, h, l; + if (h = _c(n.e.Tg(), e), c = u(n.g, 119), zh(n.e, e)) { + for (r = 0, f = 0; f < n.i; ++f) + if (o = c[f], h.rl(o.ak())) { + if (r == t) + return er(), u(e, 66).Oj() ? o : (l = o.dd(), l != null && i && I(e, 99) && u(e, 18).Bb & Ji && (l = y6(n, e, f, r, l)), l); + ++r; + } + throw T(new mr(rm + t + _a + r)); + } else { + for (r = 0, f = 0; f < n.i; ++f) { + if (o = c[f], h.rl(o.ak())) + return er(), u(e, 66).Oj() ? o : (l = o.dd(), l != null && i && I(e, 99) && u(e, 18).Bb & Ji && (l = y6(n, e, f, r, l)), l); + ++r; + } + return e.zj(); + } + } + function W7(n, e, t) { + var i, r, c, o, f, h, l, a; + if (r = u(n.g, 119), zh(n.e, e)) + return er(), u(e, 66).Oj() ? new IE(e, n) : new i8(e, n); + for (l = _c(n.e.Tg(), e), i = 0, f = 0; f < n.i; ++f) { + if (c = r[f], o = c.ak(), l.rl(o)) { + if (er(), u(e, 66).Oj()) + return c; + if (o == (z2(), Dp) || o == Op) { + for (h = new Yu(Nr(c.dd())); ++f < n.i; ) + c = r[f], o = c.ak(), (o == Dp || o == Op) && De(h, Nr(c.dd())); + return CU(u(e.Yj(), 148), h.a); + } else + return a = c.dd(), a != null && t && I(e, 99) && u(e, 18).Bb & Ji && (a = y6(n, e, f, i, a)), a; + } + ++i; + } + return e.zj(); + } + function O6(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (c = 0, o = n.t, r = 0, i = 0, h = 0, g = 0, d = 0, t && (n.n.c = F(Zn, rn, 1, 0, 5, 1), W(n.n, new lC(n.s, n.t, n.i))), f = 0, a = new E(n.b); a.a < a.c.c.length; ) + l = u(y(a), 33), c + l.g + (f > 0 ? n.i : 0) > e && h > 0 && (c = 0, o += h + n.i, r = j.Math.max(r, g), i += h + n.i, h = 0, g = 0, t && (++d, W(n.n, new lC(n.s, o, n.i))), f = 0), g += l.g + (f > 0 ? n.i : 0), h = j.Math.max(h, l.f), t && iJ(u(un(n.n, d), 211), l), c += l.g + (f > 0 ? n.i : 0), ++f; + return r = j.Math.max(r, g), i += h, t && (n.r = r, n.d = i, sJ(n.j)), new ys(n.s, n.t, r, i); + } + function pc(n, e, t, i, r) { + Zf(); + var c, o, f, h, l, a, d, g, p; + if (MW(n, "src"), MW(t, "dest"), g = Du(n), h = Du(t), VU((g.i & 4) != 0, "srcType is not an array"), VU((h.i & 4) != 0, "destType is not an array"), d = g.c, o = h.c, VU(d.i & 1 ? d == o : (o.i & 1) == 0, "Array types don't match"), p = n.length, l = t.length, e < 0 || i < 0 || r < 0 || e + r > p || i + r > l) + throw T(new Kq()); + if (!(d.i & 1) && g != h) + if (a = va(n), c = va(t), B(n) === B(t) && e < i) + for (e += r, f = i + r; f-- > i; ) + St(c, f, a[--e]); + else + for (f = i + r; i < f; ) + St(c, i++, a[e++]); + else + r > 0 && aY(n, e, t, i, r, !0); + } + function oL() { + oL = N, Ezn = A(M(be, 1), Le, 25, 15, [Bi, 1162261467, L6, 1220703125, 362797056, 1977326743, L6, 387420489, $M, 214358881, 429981696, 815730721, 1475789056, 170859375, 268435456, 410338673, 612220032, 893871739, 128e7, 1801088541, 113379904, 148035889, 191102976, 244140625, 308915776, 387420489, 481890304, 594823321, 729e6, 887503681, L6, 1291467969, 1544804416, 1838265625, 60466176]), Czn = A(M(be, 1), Le, 25, 15, [-1, -1, 31, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]); + } + function eje(n) { + var e, t, i, r, c, o, f, h; + for (r = new E(n.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), o = new E($d(i.a)); o.a < o.c.c.length; ) + if (c = u(y(o), 10), tIn(c) && (t = u(k(c, (G(), v0)), 305), !t.g && t.d)) + for (e = t, h = t.d; h; ) + hBn(h.i, h.k, !1, !0), H8(e.a), H8(h.i), H8(h.k), H8(h.b), Ti(h.c, e.c.d), Ti(e.c, null), jr(e.a, null), jr(h.i, null), jr(h.k, null), jr(h.b, null), f = new wX(e.i, h.a, e.e, h.j, h.f), f.k = e.k, f.n = e.n, f.b = e.b, f.c = h.c, f.g = e.g, f.d = h.d, H(e.i, v0, f), H(h.a, v0, f), h = h.d, e = f; + } + function Sb(n, e) { + var t, i, r, c, o; + if (o = u(e, 136), Jw(n), Jw(o), o.b != null) { + if (n.c = !0, n.b == null) { + n.b = F(be, Le, 25, o.b.length, 15, 1), pc(o.b, 0, n.b, 0, o.b.length); + return; + } + for (c = F(be, Le, 25, n.b.length + o.b.length, 15, 1), t = 0, i = 0, r = 0; t < n.b.length || i < o.b.length; ) + t >= n.b.length ? (c[r++] = o.b[i++], c[r++] = o.b[i++]) : i >= o.b.length ? (c[r++] = n.b[t++], c[r++] = n.b[t++]) : o.b[i] < n.b[t] || o.b[i] === n.b[t] && o.b[i + 1] < n.b[t + 1] ? (c[r++] = o.b[i++], c[r++] = o.b[i++]) : (c[r++] = n.b[t++], c[r++] = n.b[t++]); + n.b = c; + } + } + function tje(n, e) { + var t, i, r, c, o, f, h, l, a, d; + return t = on(sn(k(n, (G(), Ub)))), f = on(sn(k(e, Ub))), i = u(k(n, Xo), 11), h = u(k(e, Xo), 11), r = u(k(n, Ys), 11), l = u(k(e, Ys), 11), a = !!i && i == h, d = !!r && r == l, !t && !f ? new xU(u(y(new E(n.j)), 11).p == u(y(new E(e.j)), 11).p, a, d) : (c = (!on(sn(k(n, Ub))) || on(sn(k(n, Xk)))) && (!on(sn(k(e, Ub))) || on(sn(k(e, Xk)))), o = (!on(sn(k(n, Ub))) || !on(sn(k(n, Xk)))) && (!on(sn(k(e, Ub))) || !on(sn(k(e, Xk)))), new xU(a && c || d && o, a, d)); + } + function ije(n) { + var e, t, i, r, c, o, f, h; + for (i = 0, t = 0, h = new Tt(), e = 0, f = new E(n.n); f.a < f.c.c.length; ) + o = u(y(f), 211), o.c.c.length == 0 ? Ht(h, o, h.c.b, h.c) : (i = j.Math.max(i, o.d), t += o.a + (e > 0 ? n.i : 0)), ++e; + for (d2e(n.n, h), n.d = t, n.r = i, n.g = 0, n.f = 0, n.e = 0, n.o = Lt, n.p = Lt, c = new E(n.b); c.a < c.c.c.length; ) + r = u(y(c), 33), n.p = j.Math.min(n.p, r.g), n.g = j.Math.max(n.g, r.g), n.f = j.Math.max(n.f, r.f), n.o = j.Math.min(n.o, r.f), n.e += r.f + n.i; + n.a = n.e / n.b.c.length - n.i * ((n.b.c.length - 1) / n.b.c.length), sJ(n.j); + } + function yRn(n) { + var e, t, i, r; + return n.Db & 64 ? PF(n) : (e = new Yu(Atn), i = n.k, i ? De(De((e.a += ' "', e), i), '"') : (!n.n && (n.n = new V(Rr, n, 1, 7)), n.n.i > 0 && (r = (!n.n && (n.n = new V(Rr, n, 1, 7)), u(D(n.n, 0), 137)).a, !r || De(De((e.a += ' "', e), r), '"'))), t = (!n.b && (n.b = new Fn(he, n, 4, 7)), !(n.b.i <= 1 && (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c.i <= 1))), t ? e.a += " [" : e.a += " ", De(e, Lz(new YI(), new ie(n.b))), t && (e.a += "]"), e.a += TN, t && (e.a += "["), De(e, Lz(new YI(), new ie(n.c))), t && (e.a += "]"), e.a); + } + function fL(n, e) { + var t, i, r, c, o, f, h; + if (n.a) { + if (f = n.a.ne(), h = null, f != null ? e.a += "" + f : (o = n.a.Dj(), o != null && (c = Pf(o, tu(91)), c != -1 ? (h = o.substr(c), e.a += "" + Zu(o == null ? iu : (_n(o), o), 0, c)) : e.a += "" + o)), n.d && n.d.i != 0) { + for (r = !0, e.a += "<", i = new ie(n.d); i.e != i.i.gc(); ) + t = u(oe(i), 87), r ? r = !1 : e.a += Qi, fL(t, e); + e.a += ">"; + } + h != null && (e.a += "" + h); + } else + n.e ? (f = n.e.zb, f != null && (e.a += "" + f)) : (e.a += "?", n.b ? (e.a += " super ", fL(n.b, e)) : n.f && (e.a += " extends ", fL(n.f, e))); + } + function rje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn; + for (_ = n.c, U = e.c, t = xr(_.a, n, 0), i = xr(U.a, e, 0), O = u(Wd(n, (sr(), Au)).Kc().Pb(), 11), wn = u(Wd(n, Lc).Kc().Pb(), 11), x = u(Wd(e, Au).Kc().Pb(), 11), zn = u(Wd(e, Lc).Kc().Pb(), 11), S = xf(O.e), en = xf(wn.g), $ = xf(x.e), ln = xf(zn.g), vb(n, i, U), o = $, a = 0, v = o.length; a < v; ++a) + r = o[a], Ti(r, O); + for (f = ln, d = 0, m = f.length; d < m; ++d) + r = f[d], Ki(r, wn); + for (vb(e, t, _), h = S, g = 0, C = h.length; g < C; ++g) + r = h[g], Ti(r, x); + for (c = en, l = 0, p = c.length; l < p; ++l) + r = c[l], Ki(r, zn); + } + function jRn(n, e, t, i) { + var r, c, o, f, h, l, a; + if (c = jT(i), f = on(sn(k(i, (nn(), msn)))), (f || on(sn(k(n, YS)))) && !Cw(u(k(n, Bt), 98))) + r = B2(c), h = bZ(n, t, t == (sr(), Lc) ? r : b7(r)); + else + switch (h = new gc(), Hr(h, n), e ? (a = h.n, a.a = e.a - n.n.a, a.b = e.b - n.n.b, $xn(a, 0, 0, n.o.a, n.o.b), si(h, UBn(h, c))) : (r = B2(c), si(h, t == (sr(), Lc) ? r : b7(r))), o = u(k(i, (G(), Ac)), 21), l = h.j, c.g) { + case 2: + case 1: + (l == (J(), Kn) || l == ae) && o.Fc((fr(), Mg)); + break; + case 4: + case 3: + (l == (J(), Vn) || l == Gn) && o.Fc((fr(), Mg)); + } + return h; + } + function AZ(n, e, t) { + var i, r, c, o, f, h, l, a; + return j.Math.abs(e.s - e.c) < Kf || j.Math.abs(t.s - t.c) < Kf ? 0 : (i = $Nn(n, e.j, t.e), r = $Nn(n, t.j, e.e), c = i == -1 || r == -1, o = 0, c ? (i == -1 && (new da((No(), Bl), t, e, 1), ++o), r == -1 && (new da((No(), Bl), e, t, 1), ++o)) : (f = Kw(e.j, t.s, t.c), f += Kw(t.e, e.s, e.c), h = Kw(t.j, e.s, e.c), h += Kw(e.e, t.s, t.c), l = i + 16 * f, a = r + 16 * h, l < a ? new da((No(), iw), e, t, a - l) : l > a ? new da((No(), iw), t, e, l - a) : l > 0 && a > 0 && (new da((No(), iw), e, t, 0), new da(iw, t, e, 0))), o); + } + function ERn(n, e) { + var t, i, r, c, o, f; + for (o = new Ca(new ia(n.f.b).a); o.b; ) { + if (c = Bd(o), r = u(c.cd(), 594), e == 1) { + if (r.gf() != (or(), Yh) && r.gf() != Jh) + continue; + } else if (r.gf() != (or(), Zs) && r.gf() != Ao) + continue; + switch (i = u(u(c.dd(), 46).b, 81), f = u(u(c.dd(), 46).a, 189), t = f.c, r.gf().g) { + case 2: + i.g.c = n.e.a, i.g.b = j.Math.max(1, i.g.b + t); + break; + case 1: + i.g.c = i.g.c + t, i.g.b = j.Math.max(1, i.g.b - t); + break; + case 4: + i.g.d = n.e.b, i.g.a = j.Math.max(1, i.g.a + t); + break; + case 3: + i.g.d = i.g.d + t, i.g.a = j.Math.max(1, i.g.a - t); + } + } + } + function cje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (f = F(be, Le, 25, e.b.c.length, 15, 1), l = F(zR, z, 267, e.b.c.length, 0, 1), h = F(vh, C1, 10, e.b.c.length, 0, 1), d = n.a, g = 0, p = d.length; g < p; ++g) { + for (a = d[g], m = 0, o = new E(a.e); o.a < o.c.c.length; ) + r = u(y(o), 10), i = pz(r.c), ++f[i], v = K(Y(k(e, (nn(), Mo)))), f[i] > 0 && h[i] && (v = Mw(n.b, h[i], r)), m = j.Math.max(m, r.c.c.b + v); + for (c = new E(a.e); c.a < c.c.c.length; ) + r = u(y(c), 10), r.n.b = m + r.d.d, t = r.c, t.c.b = m + r.d.d + r.o.b + r.d.a, l[xr(t.b.b, t, 0)] = r.k, h[xr(t.b.b, t, 0)] = r; + } + } + function CRn(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (i = new re(ue(Gh(e).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 79), I(D((!t.b && (t.b = new Fn(he, t, 4, 7)), t.b), 0), 186) || (h = Ir(u(D((!t.c && (t.c = new Fn(he, t, 5, 8)), t.c), 0), 82)), j6(t) || (o = e.i + e.g / 2, f = e.j + e.f / 2, a = h.i + h.g / 2, d = h.j + h.f / 2, g = new Li(), g.a = a - o, g.b = d - f, c = new fn(g.a, g.b), u4(c, e.g, e.f), g.a -= c.a, g.b -= c.b, o = a - g.a, f = d - g.b, l = new fn(g.a, g.b), u4(l, h.g, h.f), g.a -= l.a, g.b -= l.b, a = o + g.a, d = f + g.b, r = ng(t, !0, !0), D3(r, o), F3(r, f), O3(r, a), $3(r, d), CRn(n, h))); + } + function TRn(n) { + gd(n, new Oa(ad(fd(ld(hd(new na(), o0), "ELK SPOrE Compaction"), "ShrinkTree is a compaction algorithm that maintains the topology of a layout. The relocation of diagram elements is based on contracting a spanning tree."), new Ggn()))), Z(n, o0, gB, cn(OP)), Z(n, o0, ptn, cn(RK)), Z(n, o0, vtn, cn(BK)), Z(n, o0, pB, cn(kfn)), Z(n, o0, vB, cn(NK)), Z(n, o0, s0, mfn), Z(n, o0, $b, 8), Z(n, o0, mB, cn(aZn)), Z(n, o0, mtn, cn(pfn)), Z(n, o0, ktn, cn(vfn)), Z(n, o0, mk, (qn(), !1)); + } + function uje(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (le(e, "Simple node placement", 1), d = u(k(n, (G(), Ig)), 304), f = 0, c = new E(n.b); c.a < c.c.c.length; ) { + for (i = u(y(c), 29), o = i.c, o.b = 0, t = null, l = new E(i.a); l.a < l.c.c.length; ) + h = u(y(l), 10), t && (o.b += _Q(h, t, d.c)), o.b += h.d.d + h.o.b + h.d.a, t = h; + f = j.Math.max(f, o.b); + } + for (r = new E(n.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), o = i.c, a = (f - o.b) / 2, t = null, l = new E(i.a); l.a < l.c.c.length; ) + h = u(y(l), 10), t && (a += _Q(h, t, d.c)), a += h.d.d, h.n.b = a, a += h.o.b + h.d.a, t = h; + ce(e); + } + function sje(n, e, t, i) { + var r, c, o, f, h, l, a, d; + if (i.gc() == 0) + return !1; + if (h = (er(), u(e, 66).Oj()), o = h ? i : new Nd(i.gc()), zh(n.e, e)) { + if (e.hi()) + for (a = i.Kc(); a.Ob(); ) + l = a.Pb(), vM(n, e, l, I(e, 99) && (u(e, 18).Bb & Ji) != 0) || (c = uh(e, l), o.Fc(c)); + else if (!h) + for (a = i.Kc(); a.Ob(); ) + l = a.Pb(), c = uh(e, l), o.Fc(c); + } else { + for (d = _c(n.e.Tg(), e), r = u(n.g, 119), f = 0; f < n.i; ++f) + if (c = r[f], d.rl(c.ak())) + throw T(new Hn(Mk)); + if (i.gc() > 1) + throw T(new Hn(Mk)); + h || (c = uh(e, i.Kc().Pb()), o.Fc(c)); + } + return NV(n, iY(n, e, t), o); + } + function oje(n, e) { + var t, i, r, c; + for (z0e(e.b.j), _t(Xc(new $n(null, new xn(e.d, 16)), new iwn()), new rwn()), c = new E(e.d); c.a < c.c.c.length; ) { + switch (r = u(y(c), 101), r.e.g) { + case 0: + t = u(un(r.j, 0), 113).d.j, lq(r, u(jd(HE(u(ct(r.k, t), 15).Oc(), jg)), 113)), hq(r, u(jd(KE(u(ct(r.k, t), 15).Oc(), jg)), 113)); + break; + case 1: + i = hJ(r), lq(r, u(jd(HE(u(ct(r.k, i[0]), 15).Oc(), jg)), 113)), hq(r, u(jd(KE(u(ct(r.k, i[1]), 15).Oc(), jg)), 113)); + break; + case 2: + r6e(n, r); + break; + case 3: + k8e(r); + break; + case 4: + C8e(n, r); + } + G0e(r); + } + n.a = null; + } + function hL(n, e, t) { + var i, r, c, o, f, h, l, a; + return i = n.a.o == (ef(), kf) ? Lt : Vt, f = nRn(n, new ekn(e, t)), !f.a && f.c ? (Ke(n.d, f), i) : f.a ? (r = f.a.c, h = f.a.d, t ? (l = n.a.c == (Ff(), A0) ? h : r, c = n.a.c == A0 ? r : h, o = n.a.g[c.i.p], a = K(n.a.p[o.p]) + K(n.a.d[c.i.p]) + c.n.b + c.a.b - K(n.a.d[l.i.p]) - l.n.b - l.a.b) : (l = n.a.c == (Ff(), O1) ? h : r, c = n.a.c == O1 ? r : h, a = K(n.a.p[n.a.g[c.i.p].p]) + K(n.a.d[c.i.p]) + c.n.b + c.a.b - K(n.a.d[l.i.p]) - l.n.b - l.a.b), n.a.n[n.a.g[r.i.p].p] = (qn(), !0), n.a.n[n.a.g[h.i.p].p] = !0, a) : i; + } + function yM(n, e, t) { + var i, r, c, o, f, h, l, a; + if (zh(n.e, e)) + h = (er(), u(e, 66).Oj() ? new IE(e, n) : new i8(e, n)), iM(h.c, h.b), m5(h, u(t, 14)); + else { + for (a = _c(n.e.Tg(), e), i = u(n.g, 119), o = 0; o < n.i; ++o) + if (r = i[o], c = r.ak(), a.rl(c)) { + if (c == (z2(), Dp) || c == Op) { + for (l = nJ(n, e, t), f = o, l ? Cb(n, o) : ++o; o < n.i; ) + r = i[o], c = r.ak(), c == Dp || c == Op ? Cb(n, o) : ++o; + l || u(Gw(n, f, uh(e, t)), 72); + } else + nJ(n, e, t) ? Cb(n, o) : u(Gw(n, o, (er(), u(e, 66).Oj() ? u(t, 72) : uh(e, t))), 72); + return; + } + nJ(n, e, t) || me(n, (er(), u(e, 66).Oj() ? u(t, 72) : uh(e, t))); + } + } + function MRn(n, e, t) { + var i, r, c, o, f, h, l, a; + return tt(t, n.b) || (n.b = t, c = new ran(), o = u(ts(Xc(new $n(null, new xn(t.f, 16)), c), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [(hf(), _b), ls]))), 21), n.e = !0, n.f = !0, n.c = !0, n.d = !0, r = o.Hc((K2(), $k)), i = o.Hc(Fk), r && !i && (n.f = !1), !r && i && (n.d = !1), r = o.Hc(Dk), i = o.Hc(xk), r && !i && (n.c = !1), !r && i && (n.e = !1)), a = u(n.a.Ce(e, t), 46), h = u(a.a, 19).a, l = u(a.b, 19).a, f = !1, h < 0 ? n.c || (f = !0) : n.e || (f = !0), l < 0 ? n.d || (f = !0) : n.f || (f = !0), f ? MRn(n, a, t) : a; + } + function fje(n) { + var e, t, i, r; + r = n.o, X0(), n.A.dc() || tt(n.A, prn) ? e = r.b : (e = $7(n.f), n.A.Hc((Qu(), My)) && !n.B.Hc((xu(), f9)) && (e = j.Math.max(e, $7(u(wr(n.p, (J(), Vn)), 244))), e = j.Math.max(e, $7(u(wr(n.p, Gn), 244)))), t = MOn(n), t && (e = j.Math.max(e, t.b)), n.A.Hc(Ay) && (n.q == (Ai(), jh) || n.q == Sc) && (e = j.Math.max(e, SE(u(wr(n.b, (J(), Vn)), 124))), e = j.Math.max(e, SE(u(wr(n.b, Gn), 124))))), on(sn(n.e.yf().We((Xe(), BP)))) ? r.b = j.Math.max(r.b, e) : r.b = e, i = n.f.i, i.d = 0, i.a = e, iL(n.f); + } + function ARn(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (d = 0; d < e.length; d++) { + for (f = n.Kc(); f.Ob(); ) + c = u(f.Pb(), 225), c.Of(d, e); + for (g = 0; g < e[d].length; g++) { + for (h = n.Kc(); h.Ob(); ) + c = u(h.Pb(), 225), c.Pf(d, g, e); + for (m = e[d][g].j, p = 0; p < m.c.length; p++) { + for (l = n.Kc(); l.Ob(); ) + c = u(l.Pb(), 225), c.Qf(d, g, p, e); + for (v = (Ln(p, m.c.length), u(m.c[p], 11)), t = 0, r = new uf(v.b); Kr(r.a) || Kr(r.b); ) + for (i = u(Kr(r.a) ? y(r.a) : y(r.b), 17), a = n.Kc(); a.Ob(); ) + c = u(a.Pb(), 225), c.Nf(d, g, p, t++, i, e); + } + } + } + for (o = n.Kc(); o.Ob(); ) + c = u(o.Pb(), 225), c.Mf(); + } + function hje(n, e) { + var t, i, r, c, o, f, h; + for (n.b = K(Y(k(e, (nn(), Dg)))), n.c = K(Y(k(e, Ja))), n.d = u(k(e, B_), 336), n.a = u(k(e, WS), 275), i3e(e), f = u(ts(pt(pt(qr(qr(new $n(null, new xn(e.b, 16)), new kdn()), new ydn()), new jdn()), new Edn()), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), r = f.Kc(); r.Ob(); ) + t = u(r.Pb(), 17), o = u(k(t, (G(), Wa)), 15), o.Jc(new y5n(n)), H(t, Wa, null); + for (i = f.Kc(); i.Ob(); ) + t = u(i.Pb(), 17), h = u(k(t, (G(), yun)), 17), c = u(k(t, Og), 15), vTe(n, c, h), H(t, Og, null); + } + function lje(n) { + n.b = null, n.a = null, n.o = null, n.q = null, n.v = null, n.w = null, n.B = null, n.p = null, n.Q = null, n.R = null, n.S = null, n.T = null, n.U = null, n.V = null, n.W = null, n.bb = null, n.eb = null, n.ab = null, n.H = null, n.db = null, n.c = null, n.d = null, n.f = null, n.n = null, n.r = null, n.s = null, n.u = null, n.G = null, n.J = null, n.e = null, n.j = null, n.i = null, n.g = null, n.k = null, n.t = null, n.F = null, n.I = null, n.L = null, n.M = null, n.O = null, n.P = null, n.$ = null, n.N = null, n.Z = null, n.cb = null, n.K = null, n.D = null, n.A = null, n.C = null, n._ = null, n.fb = null, n.X = null, n.Y = null, n.gb = !1, n.hb = !1; + } + function lL(n) { + var e, t, i, r, c, o, f, h, l; + return !(n.k != (Qn(), ii) || n.j.c.length <= 1 || (c = u(k(n, (nn(), Bt)), 98), c == (Ai(), Sc)) || (r = (gb(), (n.q ? n.q : (Pn(), Pn(), ph))._b(E0) ? i = u(k(n, E0), 197) : i = u(k(qi(n), $m), 197), i), r == fP) || !(r == xg || r == Fg) && (o = K(Y(wb(n, Fm))), e = u(k(n, ny), 142), !e && (e = new mU(o, o, o, o)), l = zr(n, (J(), Gn)), h = e.d + e.a + (l.gc() - 1) * o, h > n.o.b || (t = zr(n, Vn), f = e.d + e.a + (t.gc() - 1) * o, f > n.o.b))); + } + function aL(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + if (o = n.e, h = e.e, o == 0) + return e; + if (h == 0) + return n; + if (c = n.d, f = e.d, c + f == 2) + return t = ui(n.a[0], hr), i = ui(e.a[0], hr), o == h ? (a = Hi(t, i), v = ge(a), p = ge(Y0(a, 32)), p == 0 ? new a1(o, v) : new Pw(o, 2, A(M(be, 1), Le, 25, 15, [v, p]))) : m7(o < 0 ? vl(i, t) : vl(t, i)); + if (o == h) + g = o, d = c >= f ? S$(n.a, c, e.a, f) : S$(e.a, f, n.a, c); + else { + if (r = c != f ? c > f ? 1 : -1 : YV(n.a, e.a, c), r == 0) + return jl(), U4; + r == 1 ? (g = o, d = M$(n.a, c, e.a, f)) : (g = h, d = M$(e.a, f, n.a, c)); + } + return l = new Pw(g, d.length, d), K5(l), l; + } + function dL(n, e, t, i, r, c, o) { + var f, h, l, a, d, g, p; + return d = on(sn(k(e, (nn(), ksn)))), g = null, c == (sr(), Au) && i.c.i == t ? g = i.c : c == Lc && i.d.i == t && (g = i.d), l = o, !l || !d || g ? (a = (J(), Xr), g ? a = g.j : Cw(u(k(t, Bt), 98)) && (a = c == Au ? Gn : Vn), h = aje(n, e, t, c, a, i), f = C$((qi(t), i)), c == Au ? (Ki(f, u(un(h.j, 0), 11)), Ti(f, r)) : (Ki(f, r), Ti(f, u(un(h.j, 0), 11))), l = new HDn(i, f, h, u(k(h, (G(), rt)), 11), c, !g)) : (W(l.e, i), p = j.Math.max(K(Y(k(l.d, P1))), K(Y(k(i, P1)))), H(l.d, P1, p)), Tn(n.a, i, new EE(l.d, e, c)), l; + } + function jM(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (a = null, n.d && (a = u(mc(n.d, e), 138)), !a) { + if (c = n.a.Mh(), d = c.i, !n.d || Xv(n.d) != d) { + for (h = new we(), n.d && Z5(h, n.d), l = h.f.c + h.g.c, f = l; f < d; ++f) + i = u(D(c, f), 138), r = g1(n.e, i).ne(), t = u(r == null ? Rc(h.f, null, i) : zd(h.g, r, i), 138), t && t != i && (r == null ? Rc(h.f, null, t) : zd(h.g, r, t)); + if (h.f.c + h.g.c != d) + for (o = 0; o < l; ++o) + i = u(D(c, o), 138), r = g1(n.e, i).ne(), t = u(r == null ? Rc(h.f, null, i) : zd(h.g, r, i), 138), t && t != i && (r == null ? Rc(h.f, null, t) : zd(h.g, r, t)); + n.d = h; + } + a = u(mc(n.d, e), 138); + } + return a; + } + function aje(n, e, t, i, r, c) { + var o, f, h, l, a, d; + return o = null, l = i == (sr(), Au) ? c.c : c.d, h = jT(e), l.i == t ? (o = u(te(n.b, l), 10), o || (o = V7(l, u(k(t, (nn(), Bt)), 98), r, jke(l), null, l.n, l.o, h, e), H(o, (G(), rt), l), it(n.b, l, o))) : (o = V7((a = new pI(), d = K(Y(k(e, (nn(), Mo)))) / 2, s7(a, Yb, d), a), u(k(t, Bt), 98), r, i == Au ? -1 : 1, null, new Li(), new fn(0, 0), h, e), f = uve(o, t, i), H(o, (G(), rt), f), it(n.b, f, o)), u(k(e, (G(), Ac)), 21).Fc((fr(), $s)), Cw(u(k(e, (nn(), Bt)), 98)) ? H(e, Bt, (Ai(), Cv)) : H(e, Bt, (Ai(), jf)), o; + } + function dje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + le(e, "Orthogonal edge routing", 1), l = K(Y(k(n, (nn(), $g)))), t = K(Y(k(n, Dg))), i = K(Y(k(n, Ja))), g = new FD(0, t), C = 0, o = new Ii(n.b, 0), f = null, a = null, h = null, d = null; + do + a = o.b < o.d.gc() ? (ne(o.b < o.d.gc()), u(o.d.Xb(o.c = o.b++), 29)) : null, d = a ? a.a : null, f && (PZ(f, C), C += f.c.a), m = f ? C + i : C, v = FZ(g, n, h, d, m), r = !f || nE(h, (hM(), cy)), c = !a || nE(d, (hM(), cy)), v > 0 ? (p = (v - 1) * t, f && (p += i), a && (p += i), p < l && !r && !c && (p = l), C += p) : !r && !c && (C += l), f = a, h = d; + while (a); + n.f.a = C, ce(e); + } + function bL() { + bL = N; + var n; + b1n = new p9n(), Hne = F(tn, q, 2, 0, 6, 1), _ne = rf(N2(33, 58), N2(1, 26)), Kne = rf(N2(97, 122), N2(65, 90)), f1n = N2(48, 57), Bne = rf(_ne, 0), Rne = rf(Kne, f1n), h1n = rf(rf(0, N2(1, 6)), N2(33, 38)), l1n = rf(rf(f1n, N2(65, 70)), N2(97, 102)), qne = rf(Bne, FT("-_.!~*'()")), Gne = rf(Rne, ST("-_.!~*'()")), FT(sGn), ST(sGn), rf(qne, FT(";:@&=+$,")), rf(Gne, ST(";:@&=+$,")), a1n = FT(":/?#"), d1n = ST(":/?#"), a9 = FT("/?#"), d9 = ST("/?#"), n = new hi(), n.a.zc("jar", n), n.a.zc("zip", n), n.a.zc("archive", n), tI = (Pn(), new Up(n)); + } + function SRn(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (H(e, (cc(), pv), 0), h = u(k(e, mP), 86), e.d.b == 0) + h ? (a = K(Y(k(h, D1))) + n.a + TX(h, e), H(e, D1, a)) : H(e, D1, 0); + else { + for (i = (c = _e(new X1(e).a.d, 0), new e2(c)); yj(i.a); ) + t = u(Re(i.a), 188).c, SRn(n, t); + f = u(fE((o = _e(new X1(e).a.d, 0), new e2(o))), 86), d = u(Fce((r = _e(new X1(e).a.d, 0), new e2(r))), 86), l = (K(Y(k(d, D1))) + K(Y(k(f, D1)))) / 2, h ? (a = K(Y(k(h, D1))) + n.a + TX(h, e), H(e, D1, a), H(e, pv, K(Y(k(e, D1))) - l), yEe(n, e)) : H(e, D1, l); + } + } + function m4(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + f = 0, v = 0, h = fC(n.f, n.f.length), c = n.d, o = n.i, i = n.a, r = n.b; + do { + for (p = 0, a = new E(n.p); a.a < a.c.c.length; ) + l = u(y(a), 10), g = WRn(n, l), t = !0, (n.q == (Zw(), ey) || n.q == ty) && (t = on(sn(g.b))), u(g.a, 19).a < 0 && t ? (++p, h = fC(n.f, n.f.length), n.d = n.d + u(g.a, 19).a, v += c - n.d, c = n.d + u(g.a, 19).a, o = n.i, i = $d(n.a), r = $d(n.b)) : (n.f = fC(h, h.length), n.d = c, n.a = (pe(i), i ? new au(i) : o3(new E(i))), n.b = (pe(r), r ? new au(r) : o3(new E(r))), n.i = o); + ++f, d = p != 0 && on(sn(e.Kb(new Pi(Q(v), Q(f))))); + } while (d); + } + function bje(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn; + return o = n.f, g = e.f, f = o == (w4(), Ep) || o == Vm, p = g == Ep || g == Vm, h = o == Ng || o == Qm, v = g == Ng || g == Qm, l = o == Ng || o == Ep, m = g == Ng || g == Ep, f && p ? n.f == Vm ? n : e : h && v ? n.f == Qm ? n : e : l && m ? (o == Ng ? (d = n, a = e) : (d = e, a = n), c = (C = t.j + t.f, S = d.e + i.f, $ = j.Math.max(C, S), O = $ - j.Math.min(t.j, d.e), x = d.d + i.g - t.i, x * O), r = (_ = t.i + t.g, U = a.d + i.g, en = j.Math.max(_, U), ln = en - j.Math.min(t.i, a.d), wn = a.e + i.f - t.j, ln * wn), c <= r ? n.f == Ng ? n : e : n.f == Ep ? n : e) : n; + } + function wje(n) { + var e, t, i, r, c, o, f, h, l, a, d; + for (a = n.e.a.c.length, o = new E(n.e.a); o.a < o.c.c.length; ) + c = u(y(o), 121), c.j = !1; + for (n.i = F(be, Le, 25, a, 15, 1), n.g = F(be, Le, 25, a, 15, 1), n.n = new X(), r = 0, d = new X(), h = new E(n.e.a); h.a < h.c.c.length; ) + f = u(y(h), 121), f.d = r++, f.b.a.c.length == 0 && W(n.n, f), Zt(d, f.g); + for (e = 0, i = new E(d); i.a < i.c.c.length; ) + t = u(y(i), 213), t.c = e++, t.f = !1; + l = d.c.length, n.b == null || n.b.length < l ? (n.b = F(Ci, vr, 25, l, 15, 1), n.c = F(_u, wh, 25, l, 16, 1)) : qv(n.c), n.d = d, n.p = new UO(ob(n.d.c.length)), n.j = 1; + } + function gje(n, e) { + var t, i, r, c, o, f, h, l, a; + if (!(e.e.c.length <= 1)) { + for (n.f = e, n.d = u(k(n.f, (C7(), xrn)), 379), n.g = u(k(n.f, Rrn), 19).a, n.e = K(Y(k(n.f, Lrn))), n.c = K(Y(k(n.f, uS))), _Cn(n.b), r = new E(n.f.c); r.a < r.c.c.length; ) + i = u(y(r), 282), sZ(n.b, i.c, i, null), sZ(n.b, i.d, i, null); + for (f = n.f.e.c.length, n.a = fa(Ci, [q, vr], [104, 25], 15, [f, f], 2), l = new E(n.f.e); l.a < l.c.c.length; ) + h = u(y(l), 144), Bye(n, h, n.a[h.b]); + for (n.i = fa(Ci, [q, vr], [104, 25], 15, [f, f], 2), c = 0; c < f; ++c) + for (o = 0; o < f; ++o) + t = n.a[c][o], a = 1 / (t * t), n.i[c][o] = a; + } + } + function D6(n) { + var e, t, i, r; + if (!(n.b == null || n.b.length <= 2) && !n.a) { + for (e = 0, r = 0; r < n.b.length; ) { + for (e != r ? (n.b[e] = n.b[r++], n.b[e + 1] = n.b[r++]) : r += 2, t = n.b[e + 1]; r < n.b.length && !(t + 1 < n.b[r]); ) + if (t + 1 == n.b[r]) + n.b[e + 1] = n.b[r + 1], t = n.b[e + 1], r += 2; + else if (t >= n.b[r + 1]) + r += 2; + else if (t < n.b[r + 1]) + n.b[e + 1] = n.b[r + 1], t = n.b[e + 1], r += 2; + else + throw T(new _r("Token#compactRanges(): Internel Error: [" + n.b[e] + "," + n.b[e + 1] + "] [" + n.b[r] + "," + n.b[r + 1] + "]")); + e += 2; + } + e != n.b.length && (i = F(be, Le, 25, e, 15, 1), pc(n.b, 0, i, 0, e), n.b = i), n.a = !0; + } + } + function pje(n, e) { + var t, i, r, c, o, f, h; + for (o = k2(n.a).Kc(); o.Ob(); ) { + if (c = u(o.Pb(), 17), c.b.c.length > 0) + for (i = new au(u(ct(n.a, c), 21)), Pn(), wi(i, new Iq(e)), r = new Ii(c.b, 0); r.b < r.d.gc(); ) { + switch (t = (ne(r.b < r.d.gc()), u(r.d.Xb(r.c = r.b++), 70)), f = -1, u(k(t, (nn(), Jf)), 272).g) { + case 1: + f = i.c.length - 1; + break; + case 0: + f = K4e(i); + break; + case 2: + f = 0; + } + f != -1 && (h = (Ln(f, i.c.length), u(i.c[f], 243)), W(h.b.b, t), u(k(qi(h.b.c.i), (G(), Ac)), 21).Fc((fr(), uv)), u(k(qi(h.b.c.i), Ac), 21).Fc(cv), Wu(r), H(t, vun, c)); + } + Ki(c, null), Ti(c, null); + } + } + function vje(n, e) { + var t, i, r, c; + return t = new Vln(), i = u(ts(Xc(new $n(null, new xn(n.f, 16)), t), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [(hf(), _b), ls]))), 21), r = i.gc(), r = r == 2 ? 1 : 0, r == 1 && pd(p7(u(ts(pt(i.Lc(), new Qln()), jOn(Aa(0), new FH())), 162).a, 2), 0) && (r = 0), i = u(ts(Xc(new $n(null, new xn(e.f, 16)), t), ub(new Vg(), new Qg(), new Jg(), new Yg(), A(M(Nu, 1), z, 132, 0, [_b, ls]))), 21), c = i.gc(), c = c == 2 ? 1 : 0, c == 1 && pd(p7(u(ts(pt(i.Lc(), new Jln()), jOn(Aa(0), new FH())), 162).a, 2), 0) && (c = 0), r < c ? -1 : r == c ? 0 : 1; + } + function mje(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p; + if (l = new X(), !ai(n, (G(), E_))) + return l; + for (i = u(k(n, E_), 15).Kc(); i.Ob(); ) + e = u(i.Pb(), 10), Dje(e, n), l.c[l.c.length] = e; + for (c = new E(n.b); c.a < c.c.c.length; ) + for (r = u(y(c), 29), f = new E(r.a); f.a < f.c.c.length; ) + o = u(y(f), 10), o.k == (Qn(), Xt) && (h = u(k(o, qS), 10), h && (a = new gc(), Hr(a, o), d = u(k(o, ec), 61), si(a, d), g = u(un(h.j, 0), 11), p = new Id(), Ki(p, a), Ti(p, g))); + for (t = new E(l); t.a < t.c.c.length; ) + e = u(y(t), 10), jr(e, u(un(n.b, n.b.c.length - 1), 29)); + return l; + } + function PRn(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + for (e = nf(n), c = on(sn(hn(e, (nn(), Jb)))), a = 0, r = 0, l = new ie((!n.e && (n.e = new Fn(bi, n, 7, 4)), n.e)); l.e != l.i.gc(); ) + h = u(oe(l), 79), f = Yd(h), o = f && c && on(sn(hn(h, Xa))), g = Ir(u(D((!h.c && (h.c = new Fn(he, h, 5, 8)), h.c), 0), 82)), f && o ? ++r : f && !o ? ++a : Pt(g) == e || g == e ? ++r : ++a; + for (i = new ie((!n.d && (n.d = new Fn(bi, n, 8, 5)), n.d)); i.e != i.i.gc(); ) + t = u(oe(i), 79), f = Yd(t), o = f && c && on(sn(hn(t, Xa))), d = Ir(u(D((!t.b && (t.b = new Fn(he, t, 4, 7)), t.b), 0), 82)), f && o ? ++a : f && !o ? ++r : Pt(d) == e || d == e ? ++a : ++r; + return a - r; + } + function kje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + if (le(e, "Edge splitting", 1), n.b.c.length <= 2) { + ce(e); + return; + } + for (c = new Ii(n.b, 0), o = (ne(c.b < c.d.gc()), u(c.d.Xb(c.c = c.b++), 29)); c.b < c.d.gc(); ) + for (r = o, o = (ne(c.b < c.d.gc()), u(c.d.Xb(c.c = c.b++), 29)), h = new E(r.a); h.a < h.c.c.length; ) + for (f = u(y(h), 10), a = new E(f.j); a.a < a.c.c.length; ) + for (l = u(y(a), 11), i = new E(l.g); i.a < i.c.c.length; ) + t = u(y(i), 17), g = t.d, d = g.i.c, d != r && d != o && GNn(t, (p = new qh(n), ta(p, (Qn(), pi)), H(p, (G(), rt), t), H(p, (nn(), Bt), (Ai(), Sc)), jr(p, o), p)); + ce(e); + } + function IRn(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + if (f = e.p != null && !e.b, f || le(e, BKn, 1), t = u(k(n, (G(), S_)), 15), o = 1 / t.gc(), e.n) + for (oa(e, "ELK Layered uses the following " + t.gc() + " modules:"), p = 0, g = t.Kc(); g.Ob(); ) + a = u(g.Pb(), 51), i = (p < 10 ? "0" : "") + p++, oa(e, " Slot " + i + ": " + J1(Du(a))); + for (d = t.Kc(); d.Ob(); ) + a = u(d.Pb(), 51), a.pf(n, yc(e, o)); + for (c = new E(n.b); c.a < c.c.c.length; ) + r = u(y(c), 29), Zt(n.a, r.a), r.a.c = F(Zn, rn, 1, 0, 5, 1); + for (l = new E(n.a); l.a < l.c.c.length; ) + h = u(y(l), 10), jr(h, null); + n.b.c = F(Zn, rn, 1, 0, 5, 1), f || ce(e); + } + function yje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en; + i = K(Y(k(e, (nn(), jsn)))), _ = u(k(e, xm), 19).a, g = 4, r = 3, U = 20 / _, p = !1, h = 0, o = nt; + do { + for (c = h != 1, d = h != 0, en = 0, C = n.a, $ = 0, x = C.length; $ < x; ++$) + v = C[$], v.f = null, oCe(n, v, c, d, i), en += j.Math.abs(v.a); + do + f = Zke(n, e); + while (f); + for (m = n.a, S = 0, O = m.length; S < O; ++S) + if (v = m[S], t = jW(v).a, t != 0) + for (a = new E(v.e); a.a < a.c.c.length; ) + l = u(y(a), 10), l.n.b += t; + h == 0 || h == 1 ? (--g, g <= 0 && (en < o || -g > _) ? (h = 2, o = nt) : h == 0 ? (h = 1, o = en) : (h = 0, o = en)) : (p = en >= o || o - en < U, o = en, p && --r); + } while (!(p && r <= 0)); + } + function wL(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + for (v = new we(), c = n.a.ec().Kc(); c.Ob(); ) + i = u(c.Pb(), 168), it(v, i, t.Je(i)); + for (o = (pe(n), n ? new au(n) : o3(n.a.ec().Kc())), wi(o, new n5n(v)), f = jC(o), h = new sE(e), p = new we(), Rc(p.f, e, h); f.a.gc() != 0; ) { + for (l = null, a = null, d = null, r = f.a.ec().Kc(); r.Ob(); ) + if (i = u(r.Pb(), 168), K(Y(Vr(Sr(v.f, i)))) <= Lt) { + if (Uu(p, i.a) && !Uu(p, i.b)) { + a = i.b, d = i.a, l = i; + break; + } + if (Uu(p, i.b) && !Uu(p, i.a)) { + a = i.a, d = i.b, l = i; + break; + } + } + if (!l) + break; + g = new sE(a), W(u(Vr(Sr(p.f, d)), 221).a, g), Rc(p.f, a, g), f.a.Bc(l) != null; + } + return h; + } + function jje(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + for (le(t, "Depth-first cycle removal", 1), d = e.a, a = d.c.length, n.c = new X(), n.d = F(_u, wh, 25, a, 16, 1), n.a = F(_u, wh, 25, a, 16, 1), n.b = new X(), o = 0, l = new E(d); l.a < l.c.c.length; ) + h = u(y(l), 10), h.p = o, j3(Lr(h)) && W(n.c, h), ++o; + for (p = new E(n.c); p.a < p.c.c.length; ) + g = u(y(p), 10), uY(n, g); + for (c = 0; c < a; c++) + n.d[c] || (f = (Ln(c, d.c.length), u(d.c[c], 10)), uY(n, f)); + for (r = new E(n.b); r.a < r.c.c.length; ) + i = u(y(r), 17), t0(i, !0), H(e, (G(), Uk), (qn(), !0)); + n.c = null, n.d = null, n.a = null, n.b = null, ce(t); + } + function Eje(n, e) { + var t, i, r, c, o, f, h; + for (n.a.c = F(Zn, rn, 1, 0, 5, 1), i = _e(e.b, 0); i.b != i.d.c; ) + t = u(Re(i), 86), t.b.b == 0 && (H(t, (cc(), rw), (qn(), !0)), W(n.a, t)); + switch (n.a.c.length) { + case 0: + r = new hF(0, e, "DUMMY_ROOT"), H(r, (cc(), rw), (qn(), !0)), H(r, gK, !0), Ke(e.b, r); + break; + case 1: + break; + default: + for (c = new hF(0, e, "SUPER_ROOT"), f = new E(n.a); f.a < f.c.c.length; ) + o = u(y(f), 86), h = new UW(c, o), H(h, (cc(), gK), (qn(), !0)), Ke(c.a.a, h), Ke(c.d, h), Ke(o.b, h), H(o, rw, !1); + H(c, (cc(), rw), (qn(), !0)), H(c, gK, !0), Ke(e.b, c); + } + } + function Cje(n, e) { + eg(); + var t, i, r, c, o, f; + return c = e.c - (n.c + n.b), r = n.c - (e.c + e.b), o = n.d - (e.d + e.a), t = e.d - (n.d + n.a), i = j.Math.max(r, c), f = j.Math.max(o, t), Yo(), mo(Gf), (j.Math.abs(i) <= Gf || i == 0 || isNaN(i) && isNaN(0) ? 0 : i < 0 ? -1 : i > 0 ? 1 : vd(isNaN(i), isNaN(0))) >= 0 ^ (mo(Gf), (j.Math.abs(f) <= Gf || f == 0 || isNaN(f) && isNaN(0) ? 0 : f < 0 ? -1 : f > 0 ? 1 : vd(isNaN(f), isNaN(0))) >= 0) ? j.Math.max(f, i) : (mo(Gf), (j.Math.abs(i) <= Gf || i == 0 || isNaN(i) && isNaN(0) ? 0 : i < 0 ? -1 : i > 0 ? 1 : vd(isNaN(i), isNaN(0))) > 0 ? j.Math.sqrt(f * f + i * i) : -j.Math.sqrt(f * f + i * i)); + } + function Da(n, e) { + var t, i, r, c, o, f; + if (e) { + if (!n.a && (n.a = new lj()), n.e == 2) { + hj(n.a, e); + return; + } + if (e.e == 1) { + for (r = 0; r < e.em(); r++) + Da(n, e.am(r)); + return; + } + if (f = n.a.a.c.length, f == 0) { + hj(n.a, e); + return; + } + if (o = u(Ad(n.a, f - 1), 117), !((o.e == 0 || o.e == 10) && (e.e == 0 || e.e == 10))) { + hj(n.a, e); + return; + } + c = e.e == 0 ? 2 : e.bm().length, o.e == 0 ? (t = new zv(), i = o._l(), i >= Ji ? br(t, kQ(i)) : b3(t, i & Ut), o = new e$(10, null, 0), Zfe(n.a, o, f - 1)) : (t = (o.bm().length + c, new zv()), br(t, o.bm())), e.e == 0 ? (i = e._l(), i >= Ji ? br(t, kQ(i)) : b3(t, i & Ut)) : br(t, e.bm()), u(o, 521).b = t.a; + } + } + function ORn(n) { + var e, t, i, r, c; + return n.g != null ? n.g : n.a < 32 ? (n.g = NCe(eu(n.f), Gt(n.e)), n.g) : (r = jL((!n.c && (n.c = h7(n.f)), n.c), 0), n.e == 0 ? r : (e = (!n.c && (n.c = h7(n.f)), n.c).e < 0 ? 2 : 1, t = r.length, i = -n.e + t - e, c = new V1(), c.a += "" + r, n.e > 0 && i >= -6 ? i >= 0 ? P8(c, t - Gt(n.e), String.fromCharCode(46)) : (c.a = Zu(c.a, 0, e - 1) + "0." + r8(c.a, e - 1), P8(c, e + 1, Hs(za, 0, -Gt(i) - 1))) : (t - e >= 1 && (P8(c, e, String.fromCharCode(46)), ++t), P8(c, t, String.fromCharCode(69)), i > 0 && P8(c, ++t, String.fromCharCode(43)), P8(c, ++t, "" + O5(eu(i)))), n.g = c.a, n.g)); + } + function Tje(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + if (!t.dc()) { + for (f = 0, g = 0, i = t.Kc(), v = u(i.Pb(), 19).a; f < e.f; ) { + if (f == v && (g = 0, i.Ob() ? v = u(i.Pb(), 19).a : v = e.f + 1), f != g) { + for (C = u(un(n.b, f), 29), p = u(un(n.b, g), 29), m = $d(C.a), d = new E(m); d.a < d.c.c.length; ) + if (a = u(y(d), 10), vb(a, p.a.c.length, p), g == 0) + for (o = $d(Lr(a)), c = new E(o); c.a < c.c.c.length; ) + r = u(y(c), 17), t0(r, !0), H(n, (G(), Uk), (qn(), !0)), NRn(n, r, 1); + } + ++g, ++f; + } + for (h = new Ii(n.b, 0); h.b < h.d.gc(); ) + l = (ne(h.b < h.d.gc()), u(h.d.Xb(h.c = h.b++), 29)), l.a.c.length == 0 && Wu(h); + } + } + function Mje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (o = e.b, a = o.o, h = o.d, i = K(Y(xT(o, (nn(), Mo)))), r = K(Y(xT(o, jp))), l = K(Y(xT(o, z_))), f = new NI(), zU(f, h.d, h.c, h.a, h.b), g = K7e(e, i, r, l), S = new E(e.d); S.a < S.c.c.length; ) { + for (C = u(y(S), 101), v = C.f.a.ec().Kc(); v.Ob(); ) + p = u(v.Pb(), 409), c = p.a, d = Dve(p), t = ($ = new fu(), oxn(p, p.c, g, $), r5e(p, d, g, $), oxn(p, p.d, g, $), $), t = n.Uf(p, d, t), _s(c.a), Xi(c.a, t), _t(new $n(null, new xn(t, 16)), new U7n(a, f)); + m = C.i, m && (kve(C, m, g, r), O = new kr(m.g), zQ(a, f, O), st(O, m.j), zQ(a, f, O)); + } + zU(h, f.d, f.c, f.a, f.b); + } + function Aje(n, e, t) { + var i, r, c; + if (r = u(k(e, (nn(), WS)), 275), r != (f4(), Cm)) { + switch (le(t, "Horizontal Compaction", 1), n.a = e, c = new xPn(), i = new FLn((c.d = e, c.c = u(k(c.d, Qh), 218), S7e(c), mEe(c), x7e(c), c.a)), Mie(i, n.b), u(k(e, Jun), 422).g) { + case 1: + Z9n(i, new QIn(n.a)); + break; + default: + Z9n(i, (zW(), Hzn)); + } + switch (r.g) { + case 1: + E6(i); + break; + case 2: + E6(TM(i, (or(), Ao))); + break; + case 3: + E6(Y9n(TM(E6(i), (or(), Ao)), new wbn())); + break; + case 4: + E6(Y9n(TM(E6(i), (or(), Ao)), new R5n(c))); + break; + case 5: + E6(Tie(i, UWn)); + } + TM(i, (or(), Zs)), i.e = !0, tCe(c), ce(t); + } + } + function Sje(n, e, t, i, r, c, o, f) { + var h, l, a, d; + switch (h = cf(A(M(uMe, 1), rn, 220, 0, [e, t, i, r])), d = null, n.b.g) { + case 1: + d = cf(A(M(Von, 1), rn, 526, 0, [new yI(), new mI(), new kI()])); + break; + case 0: + d = cf(A(M(Von, 1), rn, 526, 0, [new kI(), new mI(), new yI()])); + break; + case 2: + d = cf(A(M(Von, 1), rn, 526, 0, [new mI(), new yI(), new kI()])); + } + for (a = new E(d); a.a < a.c.c.length; ) + l = u(y(a), 526), h.c.length > 1 && (h = l.mg(h, n.a, f)); + return h.c.length == 1 ? u(un(h, h.c.length - 1), 220) : h.c.length == 2 ? bje((Ln(0, h.c.length), u(h.c[0], 220)), (Ln(1, h.c.length), u(h.c[1], 220)), o, c) : null; + } + function DRn(n) { + var e, t, i, r, c, o; + for (Yc(n.a, new can()), t = new E(n.a); t.a < t.c.c.length; ) + e = u(y(t), 221), i = ji(Qr(u(n.b, 65).c), u(e.b, 65).c), AUn ? (o = u(n.b, 65).b, c = u(e.b, 65).b, j.Math.abs(i.a) >= j.Math.abs(i.b) ? (i.b = 0, c.d + c.a > o.d && c.d < o.d + o.a && AE(i, j.Math.max(o.c - (c.c + c.b), c.c - (o.c + o.b)))) : (i.a = 0, c.c + c.b > o.c && c.c < o.c + o.b && AE(i, j.Math.max(o.d - (c.d + c.a), c.d - (o.d + o.a))))) : AE(i, sRn(u(n.b, 65), u(e.b, 65))), r = j.Math.sqrt(i.a * i.a + i.b * i.b), r = ixn(gm, e, r, i), AE(i, r), yD(u(e.b, 65), i), Yc(e.a, new Aq(i)), u(gm.b, 65), BX(gm, vrn, e); + } + function Pje(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v; + for (n.f = new LI(), l = 0, r = 0, o = new E(n.e.b); o.a < o.c.c.length; ) + for (c = u(y(o), 29), h = new E(c.a); h.a < h.c.c.length; ) { + for (f = u(y(h), 10), f.p = l++, i = new re(ue(ei(f).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 17), t.p = r++; + for (e = lL(f), g = new E(f.j); g.a < g.c.c.length; ) + d = u(y(g), 11), e && (v = d.a.b, v != j.Math.floor(v) && (a = v - Fd(eu(j.Math.round(v))), d.a.b -= a)), p = d.n.b + d.a.b, p != j.Math.floor(p) && (a = p - Fd(eu(j.Math.round(p))), d.n.b -= a); + } + n.g = l, n.b = r, n.i = F(iMe, rn, 401, l, 0, 1), n.c = F(tMe, rn, 649, r, 0, 1), n.d.a.$b(); + } + function de(n) { + var e, t, i, r, c, o, f, h, l; + if (n.ej()) + if (h = n.fj(), n.i > 0) { + if (e = new az(n.i, n.g), t = n.i, c = t < 100 ? null : new Q1(t), n.ij()) + for (i = 0; i < n.i; ++i) + o = n.g[i], c = n.kj(o, c); + if (U5(n), r = t == 1 ? n.Zi(4, D(e, 0), null, 0, h) : n.Zi(6, e, null, -1, h), n.bj()) { + for (i = new w2(e); i.e != i.i.gc(); ) + c = n.dj(UF(i), c); + c ? (c.Ei(r), c.Fi()) : n.$i(r); + } else + c ? (c.Ei(r), c.Fi()) : n.$i(r); + } else + U5(n), n.$i(n.Zi(6, (Pn(), cr), null, -1, h)); + else if (n.bj()) + if (n.i > 0) { + for (f = n.g, l = n.i, U5(n), c = l < 100 ? null : new Q1(l), i = 0; i < l; ++i) + o = f[i], c = n.dj(o, c); + c && c.Fi(); + } else + U5(n); + else + U5(n); + } + function SZ(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (OOn(this), t == (Od(), Rl) ? ci(this.r, n) : ci(this.w, n), a = Lt, l = Vt, o = e.a.ec().Kc(); o.Ob(); ) + r = u(o.Pb(), 46), f = u(r.a, 455), i = u(r.b, 17), h = i.c, h == n && (h = i.d), f == Rl ? ci(this.r, h) : ci(this.w, h), g = (J(), cu).Hc(h.j) ? K(Y(k(h, (G(), fv)))) : Gr(A(M(di, 1), q, 8, 0, [h.i.n, h.n, h.a])).b, a = j.Math.min(a, g), l = j.Math.max(l, g); + for (d = (J(), cu).Hc(n.j) ? K(Y(k(n, (G(), fv)))) : Gr(A(M(di, 1), q, 8, 0, [n.i.n, n.n, n.a])).b, Txn(this, d, a, l), c = e.a.ec().Kc(); c.Ob(); ) + r = u(c.Pb(), 46), xxn(this, u(r.b, 17)); + this.o = !1; + } + function Ije(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se; + return t = n.l & 8191, i = n.l >> 13 | (n.m & 15) << 9, r = n.m >> 4 & 8191, c = n.m >> 17 | (n.h & 255) << 5, o = (n.h & 1048320) >> 8, f = e.l & 8191, h = e.l >> 13 | (e.m & 15) << 9, l = e.m >> 4 & 8191, a = e.m >> 17 | (e.h & 255) << 5, d = (e.h & 1048320) >> 8, ln = t * f, wn = i * f, zn = r * f, Wn = c * f, se = o * f, h != 0 && (wn += t * h, zn += i * h, Wn += r * h, se += c * h), l != 0 && (zn += t * l, Wn += i * l, se += r * l), a != 0 && (Wn += t * a, se += i * a), d != 0 && (se += t * d), p = ln & Lu, v = (wn & 511) << 13, g = p + v, C = ln >> 22, S = wn >> 9, $ = (zn & 262143) << 4, O = (Wn & 31) << 17, m = C + S + $ + O, _ = zn >> 18, U = Wn >> 5, en = (se & 4095) << 8, x = _ + U + en, m += g >> 22, g &= Lu, x += m >> 22, m &= Lu, x &= Wh, Nc(g, m, x); + } + function $Rn(n) { + var e, t, i, r, c, o, f; + if (f = u(un(n.j, 0), 11), f.g.c.length != 0 && f.e.c.length != 0) + throw T(new $r("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.")); + if (f.g.c.length != 0) { + for (c = Lt, t = new E(f.g); t.a < t.c.c.length; ) + e = u(y(t), 17), o = e.d.i, i = u(k(o, (nn(), nP)), 142), c = j.Math.min(c, o.n.a - i.b); + return new Zy(pe(c)); + } + if (f.e.c.length != 0) { + for (r = Vt, t = new E(f.e); t.a < t.c.c.length; ) + e = u(y(t), 17), o = e.c.i, i = u(k(o, (nn(), nP)), 142), r = j.Math.max(r, o.n.a + o.o.a + i.c); + return new Zy(pe(r)); + } + return Rv(), Rv(), rR; + } + function FRn(n, e) { + var t, i, r, c, o, f, h; + if (n.Fk()) { + if (n.i > 4) + if (n.wj(e)) { + if (n.rk()) { + if (r = u(e, 49), i = r.Ug(), h = i == n.e && (n.Dk() ? r.Og(r.Vg(), n.zk()) == n.Ak() : -1 - r.Vg() == n.aj()), n.Ek() && !h && !i && r.Zg()) { + for (c = 0; c < n.i; ++c) + if (t = n.Gk(u(n.g[c], 56)), B(t) === B(e)) + return !0; + } + return h; + } else if (n.Dk() && !n.Ck()) { + if (o = u(e, 56).ah(ir(u(n.ak(), 18))), B(o) === B(n.e)) + return !0; + if (o == null || !u(o, 56).kh()) + return !1; + } + } else + return !1; + if (f = s4(n, e), n.Ek() && !f) { + for (c = 0; c < n.i; ++c) + if (r = n.Gk(u(n.g[c], 56)), B(r) === B(e)) + return !0; + } + return f; + } else + return s4(n, e); + } + function Oje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (a = new X(), g = new hi(), o = e.b, r = 0; r < o.c.length; r++) { + for (l = (Ln(r, o.c.length), u(o.c[r], 29)).a, a.c = F(Zn, rn, 1, 0, 5, 1), c = 0; c < l.c.length; c++) + f = n.a[r][c], f.p = c, f.k == (Qn(), Mc) && (a.c[a.c.length] = f), Es(u(un(e.b, r), 29).a, c, f), f.j.c = F(Zn, rn, 1, 0, 5, 1), Zt(f.j, u(u(un(n.b, r), 15).Xb(c), 14)), p2(u(k(f, (nn(), Bt)), 98)) || H(f, Bt, (Ai(), id)); + for (i = new E(a); i.a < i.c.c.length; ) + t = u(y(i), 10), d = Z7e(t), g.a.zc(d, g), g.a.zc(t, g); + } + for (h = g.a.ec().Kc(); h.Ob(); ) + f = u(h.Pb(), 10), Pn(), wi(f.j, (X3(), Fcn)), f.i = !0, dY(f); + } + function Dje(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (a = u(k(n, (G(), ec)), 61), i = u(un(n.j, 0), 11), a == (J(), Kn) ? si(i, ae) : a == ae && si(i, Kn), u(k(e, (nn(), Va)), 174).Hc((Qu(), rd))) { + if (h = K(Y(k(n, bv))), l = K(Y(k(n, wv))), o = K(Y(k(n, ew))), f = u(k(e, Zb), 21), f.Hc((Tu(), n1))) + for (t = l, d = n.o.a / 2 - i.n.a, c = new E(i.f); c.a < c.c.c.length; ) + r = u(y(c), 70), r.n.b = t, r.n.a = d - r.o.a / 2, t += r.o.b + o; + else if (f.Hc(Gl)) + for (c = new E(i.f); c.a < c.c.c.length; ) + r = u(y(c), 70), r.n.a = h + n.o.a - i.n.a; + nae(new tj((Vv(), new GD(e, !1, !1, new BH()))), new CE(null, n, !1)); + } + } + function $je(n, e) { + var t, i, r, c, o, f, h, l, a; + if (e.c.length != 0) { + for (Pn(), mD(e.c, e.c.length, null), r = new E(e), i = u(y(r), 145); r.a < r.c.c.length; ) + t = u(y(r), 145), tV(i.e.c, t.e.c) && !(HQ(Ejn(i.e).b, t.e.d) || HQ(Ejn(t.e).b, i.e.d)) ? i = (Zt(i.k, t.k), Zt(i.b, t.b), Zt(i.c, t.c), Xi(i.i, t.i), Zt(i.d, t.d), Zt(i.j, t.j), c = j.Math.min(i.e.c, t.e.c), o = j.Math.min(i.e.d, t.e.d), f = j.Math.max(i.e.c + i.e.b, t.e.c + t.e.b), h = f - c, l = j.Math.max(i.e.d + i.e.a, t.e.d + t.e.a), a = l - o, LEn(i.e, c, o, h, a), Xle(i.f, t.f), !i.a && (i.a = t.a), Zt(i.g, t.g), W(i.g, t), i) : (YBn(n, i), i = t); + YBn(n, i); + } + } + function Fje(n, e, t, i) { + var r, c, o, f, h, l; + if (f = n.j, f == (J(), Xr) && e != (Ai(), jf) && e != (Ai(), ql) && (f = UBn(n, t), si(n, f), !(n.q ? n.q : (Pn(), Pn(), ph))._b((nn(), Yb)) && f != Xr && (n.n.a != 0 || n.n.b != 0) && H(n, Yb, Y3e(n, f))), e == (Ai(), jh)) { + switch (l = 0, f.g) { + case 1: + case 3: + c = n.i.o.a, c > 0 && (l = n.n.a / c); + break; + case 2: + case 4: + r = n.i.o.b, r > 0 && (l = n.n.b / r); + } + H(n, (G(), y0), l); + } + if (h = n.o, o = n.a, i) + o.a = i.a, o.b = i.b, n.d = !0; + else if (e != jf && e != ql && f != Xr) + switch (f.g) { + case 1: + o.a = h.a / 2; + break; + case 2: + o.a = h.a, o.b = h.b / 2; + break; + case 3: + o.a = h.a / 2, o.b = h.b; + break; + case 4: + o.b = h.b / 2; + } + else + o.a = h.a / 2, o.b = h.b / 2; + } + function $6(n) { + var e, t, i, r, c, o, f, h, l, a; + if (n.ej()) + if (a = n.Vi(), h = n.fj(), a > 0) + if (e = new CV(n.Gi()), t = a, c = t < 100 ? null : new Q1(t), h8(n, t, e.g), r = t == 1 ? n.Zi(4, D(e, 0), null, 0, h) : n.Zi(6, e, null, -1, h), n.bj()) { + for (i = new ie(e); i.e != i.i.gc(); ) + c = n.dj(oe(i), c); + c ? (c.Ei(r), c.Fi()) : n.$i(r); + } else + c ? (c.Ei(r), c.Fi()) : n.$i(r); + else + h8(n, n.Vi(), n.Wi()), n.$i(n.Zi(6, (Pn(), cr), null, -1, h)); + else if (n.bj()) + if (a = n.Vi(), a > 0) { + for (f = n.Wi(), l = a, h8(n, a, f), c = l < 100 ? null : new Q1(l), i = 0; i < l; ++i) + o = f[i], c = n.dj(o, c); + c && c.Fi(); + } else + h8(n, n.Vi(), n.Wi()); + else + h8(n, n.Vi(), n.Wi()); + } + function xje(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + for (f = new E(e); f.a < f.c.c.length; ) + c = u(y(f), 233), c.e = null, c.c = 0; + for (h = null, o = new E(e); o.a < o.c.c.length; ) + if (c = u(y(o), 233), d = c.d[0], !(t && d.k != (Qn(), ii))) { + for (p = u(k(d, (G(), gp)), 15).Kc(); p.Ob(); ) + g = u(p.Pb(), 10), (!t || g.k == (Qn(), ii)) && ((!c.e && (c.e = new X()), c.e).Fc(n.b[g.c.p][g.p]), ++n.b[g.c.p][g.p].c); + if (!t && d.k == (Qn(), ii)) { + if (h) + for (a = u(ct(n.d, h), 21).Kc(); a.Ob(); ) + for (l = u(a.Pb(), 10), r = u(ct(n.d, d), 21).Kc(); r.Ob(); ) + i = u(r.Pb(), 10), Woe(n.b[l.c.p][l.p]).Fc(n.b[i.c.p][i.p]), ++n.b[i.c.p][i.p].c; + h = d; + } + } + } + function Lje(n, e) { + var t, i, r, c, o, f, h, l, a; + for (t = 0, a = new X(), f = new E(e); f.a < f.c.c.length; ) { + switch (o = u(y(f), 11), nQ(n.b, n.d[o.p]), a.c = F(Zn, rn, 1, 0, 5, 1), o.i.k.g) { + case 0: + i = u(k(o, (G(), Mu)), 10), Yc(i.j, new p6n(a)); + break; + case 1: + uce(fF(pt(new $n(null, new xn(o.i.j, 16)), new v6n(o))), new m6n(a)); + break; + case 3: + r = u(k(o, (G(), rt)), 11), W(a, new Pi(r, Q(o.e.c.length + o.g.c.length))); + } + for (l = new E(a); l.a < l.c.c.length; ) + h = u(y(l), 46), c = MG(n, u(h.a, 11)), c > n.d[o.p] && (t += jX(n.b, c) * u(h.b, 19).a, ll(n.a, Q(c))); + for (; !Hv(n.a); ) + ZX(n.b, u(y2(n.a), 19).a); + } + return t; + } + function Nje(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C; + for (d = new kr(u(hn(n, (nM(), qfn)), 8)), d.a = j.Math.max(d.a - t.b - t.c, 0), d.b = j.Math.max(d.b - t.d - t.a, 0), r = Y(hn(n, _fn)), (r == null || (_n(r), r <= 0)) && (r = 1.3), f = new X(), v = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); v.e != v.i.gc(); ) + p = u(oe(v), 33), o = new hjn(p), f.c[f.c.length] = o; + switch (g = u(hn(n, qK), 311), g.g) { + case 3: + C = cye(f, e, d.a, d.b, (l = i, _n(r), l)); + break; + case 1: + C = Oye(f, e, d.a, d.b, (a = i, _n(r), a)); + break; + default: + C = _je(f, e, d.a, d.b, (h = i, _n(r), h)); + } + c = new zC(C), m = kL(c, e, t, d.a, d.b, i, (_n(r), r)), i0(n, m.a, m.b, !1, !0); + } + function Bje(n, e) { + var t, i, r, c; + t = e.b, c = new au(t.j), r = 0, i = t.j, i.c = F(Zn, rn, 1, 0, 5, 1), Md(u(ka(n.b, (J(), Kn), (Hd(), p0)), 15), t), r = j7(c, r, new Fbn(), i), Md(u(ka(n.b, Kn, Fl), 15), t), r = j7(c, r, new $bn(), i), Md(u(ka(n.b, Kn, g0), 15), t), Md(u(ka(n.b, Vn, p0), 15), t), Md(u(ka(n.b, Vn, Fl), 15), t), r = j7(c, r, new xbn(), i), Md(u(ka(n.b, Vn, g0), 15), t), Md(u(ka(n.b, ae, p0), 15), t), r = j7(c, r, new Lbn(), i), Md(u(ka(n.b, ae, Fl), 15), t), r = j7(c, r, new Nbn(), i), Md(u(ka(n.b, ae, g0), 15), t), Md(u(ka(n.b, Gn, p0), 15), t), r = j7(c, r, new Xbn(), i), Md(u(ka(n.b, Gn, Fl), 15), t), Md(u(ka(n.b, Gn, g0), 15), t); + } + function Rje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (le(e, "Layer size calculation", 1), a = Lt, l = Vt, r = !1, f = new E(n.b); f.a < f.c.c.length; ) + if (o = u(y(f), 29), h = o.c, h.a = 0, h.b = 0, o.a.c.length != 0) { + for (r = !0, g = new E(o.a); g.a < g.c.c.length; ) + d = u(y(g), 10), v = d.o, p = d.d, h.a = j.Math.max(h.a, v.a + p.b + p.c); + i = u(un(o.a, 0), 10), m = i.n.b - i.d.d, i.k == (Qn(), Xt) && (m -= u(k(n, (nn(), ny)), 142).d), c = u(un(o.a, o.a.c.length - 1), 10), t = c.n.b + c.o.b + c.d.a, c.k == Xt && (t += u(k(n, (nn(), ny)), 142).a), h.b = t - m, a = j.Math.min(a, m), l = j.Math.max(l, t); + } + r || (a = 0, l = 0), n.f.b = l - a, n.c.b -= a, ce(e); + } + function PZ(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + for (c = 0, o = 0, l = new E(n.a); l.a < l.c.c.length; ) + f = u(y(l), 10), c = j.Math.max(c, f.d.b), o = j.Math.max(o, f.d.c); + for (h = new E(n.a); h.a < h.c.c.length; ) { + switch (f = u(y(h), 10), t = u(k(f, (nn(), Qf)), 248), t.g) { + case 1: + v = 0; + break; + case 2: + v = 1; + break; + case 5: + v = 0.5; + break; + default: + for (i = 0, d = 0, p = new E(f.j); p.a < p.c.c.length; ) + g = u(y(p), 11), g.e.c.length == 0 || ++i, g.g.c.length == 0 || ++d; + i + d == 0 ? v = 0.5 : v = d / (i + d); + } + C = n.c, a = f.o.a, S = (C.a - a) * v, v > 0.5 ? S -= o * 2 * (v - 0.5) : v < 0.5 && (S += c * 2 * (0.5 - v)), r = f.d.b, S < r && (S = r), m = f.d.c, S > C.a - m - a && (S = C.a - m - a), f.n.a = e + S; + } + } + function _je(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C; + for (f = F(Ci, vr, 25, n.c.length, 15, 1), g = new GE(new P2n()), lJ(g, n), l = 0, m = new X(); g.b.c.length != 0; ) + if (o = u(g.b.c.length == 0 ? null : un(g.b, 0), 157), l > 1 && du(o) * zu(o) / 2 > f[0]) { + for (c = 0; c < m.c.length - 1 && du(o) * zu(o) / 2 > f[c]; ) + ++c; + v = new ch(m, 0, c + 1), d = new zC(v), a = du(o) / zu(o), h = kL(d, e, new i2(), t, i, r, a), st(Lo(d.e), h), T3(o4(g, d)), p = new ch(m, c + 1, m.c.length), lJ(g, p), m.c = F(Zn, rn, 1, 0, 5, 1), l = 0, fCn(f, f.length, 0); + } else + C = g.b.c.length == 0 ? null : un(g.b, 0), C != null && J$(g, 0), l > 0 && (f[l] = f[l - 1]), f[l] += du(o) * zu(o), ++l, m.c[m.c.length] = o; + return m; + } + function Kje(n) { + var e, t, i, r, c; + if (i = u(k(n, (nn(), Hc)), 163), i == (Ss(), xl)) { + for (t = new re(ue(Lr(n).a.Kc(), new Mn())); Se(t); ) + if (e = u(ve(t), 17), !kSn(e)) + throw T(new pw(SN + E7(n) + "' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges.")); + } else if (i == Wb) { + for (c = new re(ue(ei(n).a.Kc(), new Mn())); Se(c); ) + if (r = u(ve(c), 17), !kSn(r)) + throw T(new pw(SN + E7(n) + "' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges.")); + } + } + function Hje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + for (le(e, "Label dummy removal", 1), i = K(Y(k(n, (nn(), jp)))), r = K(Y(k(n, ew))), l = u(k(n, as), 103), h = new E(n.b); h.a < h.c.c.length; ) + for (f = u(y(h), 29), d = new Ii(f.a, 0); d.b < d.d.gc(); ) + a = (ne(d.b < d.d.gc()), u(d.d.Xb(d.c = d.b++), 10)), a.k == (Qn(), Ju) && (g = u(k(a, (G(), rt)), 17), v = K(Y(k(g, P1))), o = B(k(a, pp)) === B((us(), Kl)), t = new kr(a.n), o && (t.b += v + i), c = new fn(a.o.a, a.o.b - v - i), p = u(k(a, Vk), 15), l == (or(), Yh) || l == Jh ? E7e(p, t, r, c, o, l) : rge(p, t, r, c), Zt(g.b, p), gL(a, B(k(n, Qh)) === B((Hh(), yy))), Wu(d)); + ce(e); + } + function qje(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _; + for (h = new X(), c = new E(e.a); c.a < c.c.c.length; ) + for (r = u(y(c), 10), f = new E(r.j); f.a < f.c.c.length; ) { + for (o = u(y(f), 11), a = null, O = xf(o.g), x = 0, _ = O.length; x < _; ++x) + $ = O[x], _3($.d.i, t) || (S = dL(n, e, t, $, $.c, (sr(), Lc), a), S != a && (h.c[h.c.length] = S), S.c && (a = S)); + for (l = null, v = xf(o.e), m = 0, C = v.length; m < C; ++m) + p = v[m], _3(p.c.i, t) || (S = dL(n, e, t, p, p.d, (sr(), Au), l), S != l && (h.c[h.c.length] = S), S.c && (l = S)); + } + for (g = new E(h); g.a < g.c.c.length; ) + d = u(y(g), 441), xr(e.a, d.a, 0) != -1 || W(e.a, d.a), d.c && (i.c[i.c.length] = d); + } + function Gje(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + for (le(t, "Interactive cycle breaking", 1), d = new X(), p = new E(e.a); p.a < p.c.c.length; ) + for (g = u(y(p), 10), g.p = 1, v = MJ(g).a, a = Wd(g, (sr(), Lc)).Kc(); a.Ob(); ) + for (l = u(a.Pb(), 11), c = new E(l.g); c.a < c.c.c.length; ) + i = u(y(c), 17), m = i.d.i, m != g && (C = MJ(m).a, C < v && (d.c[d.c.length] = i)); + for (o = new E(d); o.a < o.c.c.length; ) + i = u(y(o), 17), t0(i, !0); + for (d.c = F(Zn, rn, 1, 0, 5, 1), h = new E(e.a); h.a < h.c.c.length; ) + f = u(y(h), 10), f.p > 0 && _xn(n, f, d); + for (r = new E(d); r.a < r.c.c.length; ) + i = u(y(r), 17), t0(i, !0); + d.c = F(Zn, rn, 1, 0, 5, 1), ce(t); + } + function xRn(n, e) { + var t, i, r, c, o, f, h, l, a; + return l = "", e.length == 0 ? n.de(JZ, SL, -1, -1) : (a = kb(e), An(a.substr(0, 3), "at ") && (a = a.substr(3)), a = a.replace(/\[.*?\]/g, ""), o = a.indexOf("("), o == -1 ? (o = a.indexOf("@"), o == -1 ? (l = a, a = "") : (l = kb(a.substr(o + 1)), a = kb(a.substr(0, o)))) : (t = a.indexOf(")", o), l = a.substr(o + 1, t - (o + 1)), a = kb(a.substr(0, o))), o = Pf(a, tu(46)), o != -1 && (a = a.substr(o + 1)), (a.length == 0 || An(a, "Anonymous function")) && (a = SL), f = aE(l, tu(58)), r = MU(l, tu(58), f - 1), h = -1, i = -1, c = JZ, f != -1 && r != -1 && (c = l.substr(0, r), h = tjn(l.substr(r + 1, f - (r + 1))), i = tjn(l.substr(f + 1))), n.de(c, a, h, i)); + } + function IZ(n, e, t) { + var i, r, c, o, f, h; + if (e.l == 0 && e.m == 0 && e.h == 0) + throw T(new bj("divide by zero")); + if (n.l == 0 && n.m == 0 && n.h == 0) + return t && (Il = Nc(0, 0, 0)), Nc(0, 0, 0); + if (e.h == tk && e.m == 0 && e.l == 0) + return c2e(n, t); + if (h = !1, e.h >> 19 && (e = G3(e), h = !h), o = K9e(e), c = !1, r = !1, i = !1, n.h == tk && n.m == 0 && n.l == 0) + if (r = !0, c = !0, o == -1) + n = eyn((P3(), win)), i = !0, h = !h; + else + return f = SY(n, o), h && sF(f), t && (Il = Nc(0, 0, 0)), f; + else + n.h >> 19 && (c = !0, n = G3(n), i = !0, h = !h); + return o != -1 ? Swe(n, o, h, c, t) : mJ(n, e) < 0 ? (t && (c ? Il = G3(n) : Il = Nc(n.l, n.m, n.h)), Nc(0, 0, 0)) : Dke(i ? n : Nc(n.l, n.m, n.h), e, h, c, r, t); + } + function EM(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + if (n.e && n.c.c < n.f) + throw T(new $r("Expected " + n.f + " phases to be configured; only found " + n.c.c)); + for (a = u(xo(n.g), 9), p = nh(n.f), c = a, f = 0, l = c.length; f < l; ++f) + i = c[f], d = u(q8(n, i.g), 246), d ? W(p, u(e$n(n, d), 123)) : p.c[p.c.length] = null; + for (v = new li(), _t(pt(Xc(pt(new $n(null, new xn(p, 16)), new Jgn()), new R6n(e)), new Ygn()), new _6n(v)), cs(v, n.a), t = new X(), r = a, o = 0, h = r.length; o < h; ++o) + i = r[o], Zt(t, _On(n, rC(u(q8(v, i.g), 20)))), g = u(un(p, i.g), 123), g && (t.c[t.c.length] = g); + return Zt(t, _On(n, rC(u(q8(v, a[a.length - 1].g + 1), 20)))), t; + } + function zje(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + for (le(t, "Model order cycle breaking", 1), n.a = 0, n.b = 0, p = new X(), a = e.a.c.length, l = new E(e.a); l.a < l.c.c.length; ) + h = u(y(l), 10), ai(h, (G(), bc)) && (a = j.Math.max(a, u(k(h, bc), 19).a + 1)); + for (m = new E(e.a); m.a < m.c.c.length; ) + for (v = u(y(m), 10), o = Qxn(n, v, a), g = Wd(v, (sr(), Lc)).Kc(); g.Ob(); ) + for (d = u(g.Pb(), 11), c = new E(d.g); c.a < c.c.c.length; ) + i = u(y(c), 17), C = i.d.i, f = Qxn(n, C, a), f < o && (p.c[p.c.length] = i); + for (r = new E(p); r.a < r.c.c.length; ) + i = u(y(r), 17), t0(i, !0), H(e, (G(), Uk), (qn(), !0)); + p.c = F(Zn, rn, 1, 0, 5, 1), ce(t); + } + function Uje(n, e) { + var t, i, r, c, o, f, h; + if (!(n.g > e.f || e.g > n.f)) { + for (t = 0, i = 0, o = n.w.a.ec().Kc(); o.Ob(); ) + r = u(o.Pb(), 11), mF(Gr(A(M(di, 1), q, 8, 0, [r.i.n, r.n, r.a])).b, e.g, e.f) && ++t; + for (f = n.r.a.ec().Kc(); f.Ob(); ) + r = u(f.Pb(), 11), mF(Gr(A(M(di, 1), q, 8, 0, [r.i.n, r.n, r.a])).b, e.g, e.f) && --t; + for (h = e.w.a.ec().Kc(); h.Ob(); ) + r = u(h.Pb(), 11), mF(Gr(A(M(di, 1), q, 8, 0, [r.i.n, r.n, r.a])).b, n.g, n.f) && ++i; + for (c = e.r.a.ec().Kc(); c.Ob(); ) + r = u(c.Pb(), 11), mF(Gr(A(M(di, 1), q, 8, 0, [r.i.n, r.n, r.a])).b, n.g, n.f) && --i; + t < i ? new MC(n, e, i - t) : i < t ? new MC(e, n, t - i) : (new MC(e, n, 0), new MC(n, e, 0)); + } + } + function Wje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $; + for (l = e.c, r = Ez(n.e), d = If(o8(Qr(jz(n.e)), n.d * n.a, n.c * n.b), -0.5), t = r.a - d.a, i = r.b - d.b, o = e.a, t = o.c - t, i = o.d - i, h = new E(l); h.a < h.c.c.length; ) { + switch (f = u(y(h), 395), g = f.b, p = t + g.a, C = i + g.b, v = Gt(p / n.a), S = Gt(C / n.b), c = f.a, c.g) { + case 0: + a = (K2(), $k); + break; + case 1: + a = (K2(), Dk); + break; + case 2: + a = (K2(), Fk); + break; + default: + a = (K2(), xk); + } + c.a ? ($ = Gt((C + f.c) / n.b), W(n.f, new FU(a, Q(S), Q($))), c == (d6(), Nk) ? z3(n, 0, S, v, $) : z3(n, v, S, n.d - 1, $)) : (m = Gt((p + f.c) / n.a), W(n.f, new FU(a, Q(v), Q(m))), c == (d6(), Lk) ? z3(n, v, 0, m, S) : z3(n, v, S, m, n.c - 1)); + } + } + function Xje(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + for (g = new X(), r = new X(), m = null, f = e.Kc(); f.Ob(); ) + o = u(f.Pb(), 19), c = new u6n(o.a), r.c[r.c.length] = c, m && (c.d = m, m.e = c), m = c; + for (O = yye(n), a = 0; a < r.c.length; ++a) { + for (p = null, C = xX((Ln(0, r.c.length), u(r.c[0], 652))), t = null, i = Lt, d = 1; d < n.b.c.length; ++d) + S = C ? j.Math.abs(C.b - d) : j.Math.abs(d - p.b) + 1, v = p ? j.Math.abs(d - p.b) : S + 1, v < S ? (l = p, h = v) : (l = C, h = S), $ = (x = K(Y(k(n, (nn(), xsn)))), O[d] + j.Math.pow(h, x)), $ < i && (i = $, t = l, t.c = d), C && d == C.b && (p = C, C = Ufe(C)); + t && (W(g, Q(t.c)), t.a = !0, xge(t)); + } + return Pn(), mD(g.c, g.c.length, null), g; + } + function Vje(n) { + var e, t, i, r, c, o, f, h, l, a; + for (e = new EI(), t = new EI(), l = An(Ek, (r = A6(n.b, xe), r ? Ce(Ko((!r.b && (r.b = new Gu((Sn(), Zi), tc, r)), r.b), Xs)) : null)), h = 0; h < n.i; ++h) + f = u(n.g[h], 170), I(f, 99) ? (o = u(f, 18), o.Bb & uc ? (!(o.Bb & Nf) || !l && (c = A6(o, xe), (c ? Ce(Ko((!c.b && (c.b = new Gu((Sn(), Zi), tc, c)), c.b), vA)) : null) == null)) && me(e, o) : (a = ir(o), a && a.Bb & uc || (!(o.Bb & Nf) || !l && (i = A6(o, xe), (i ? Ce(Ko((!i.b && (i.b = new Gu((Sn(), Zi), tc, i)), i.b), vA)) : null) == null)) && me(t, o))) : (er(), u(f, 66).Oj() && (f.Jj() || (me(e, f), me(t, f)))); + ab(e), ab(t), n.a = u(e.g, 247), u(t.g, 247); + } + function Qje(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + for (l = F5e(e), m = u(k(e, (nn(), Om)), 314), m != (F2(), ap) && $i(l, new yan()), C = u(k(e, Jk), 292), $i(l, new f5n(C)), v = 0, a = new X(), c = new B5(l); c.a != c.b; ) + r = u(vT(c), 37), XRn(n.c, r), g = u(k(r, (G(), S_)), 15), v += g.gc(), i = g.Kc(), W(a, new Pi(r, i)); + for (le(t, "Recursive hierarchical layout", v), p = u(u(un(a, a.c.length - 1), 46).b, 47); p.Ob(); ) + for (h = new E(a); h.a < h.c.c.length; ) + for (f = u(y(h), 46), g = u(f.b, 47), o = u(f.a, 37); g.Ob(); ) + if (d = u(g.Pb(), 51), I(d, 507)) { + if (o.e) + break; + d.pf(o, yc(t, 1)); + break; + } else + d.pf(o, yc(t, 1)); + ce(t); + } + function LRn(n, e) { + var t, i, r, c, o, f, h, l, a, d; + if (h = e.length - 1, f = (Te(h, e.length), e.charCodeAt(h)), f == 93) { + if (o = Pf(e, tu(91)), o >= 0) + return r = Jge(n, e.substr(1, o - 1)), a = e.substr(o + 1, h - (o + 1)), UCe(n, a, r); + } else { + if (t = -1, kin == null && (kin = new RegExp("\\d")), kin.test(String.fromCharCode(f)) && (t = MU(e, tu(46), h - 1), t >= 0)) { + i = u(T$(n, aIn(n, e.substr(1, t - 1)), !1), 58), l = 0; + try { + l = ss(e.substr(t + 1), Bi, nt); + } catch (g) { + throw g = Et(g), I(g, 127) ? (c = g, T(new xC(c))) : T(g); + } + if (l < i.gc()) + return d = i.Xb(l), I(d, 72) && (d = u(d, 72).dd()), u(d, 56); + } + if (t < 0) + return u(T$(n, aIn(n, e.substr(1)), !1), 56); + } + return null; + } + function rg(n, e, t) { + var i, r, c, o, f, h, l, a, d; + if (jt(e, t) >= 0) + return t; + switch (Pd(Er(n, t))) { + case 2: { + if (An("", g1(n, t.Hj()).ne())) { + if (h = E8(Er(n, t)), f = p3(Er(n, t)), a = xY(n, e, h, f), a) + return a; + for (r = oZ(n, e), o = 0, d = r.gc(); o < d; ++o) + if (a = u(r.Xb(o), 170), qY(PD(Er(n, a)), h)) + return a; + } + return null; + } + case 4: { + if (An("", g1(n, t.Hj()).ne())) { + for (i = t; i; i = Wle(Er(n, i))) + if (l = E8(Er(n, i)), f = p3(Er(n, i)), a = LY(n, e, l, f), a) + return a; + if (h = E8(Er(n, t)), An(Ha, h)) + return EJ(n, e); + for (c = Jx(n, e), o = 0, d = c.gc(); o < d; ++o) + if (a = u(c.Xb(o), 170), qY(PD(Er(n, a)), h)) + return a; + } + return null; + } + default: + return null; + } + } + function Jje(n, e, t) { + var i, r, c, o, f, h, l, a; + if (t.gc() == 0) + return !1; + if (f = (er(), u(e, 66).Oj()), c = f ? t : new Nd(t.gc()), zh(n.e, e)) { + if (e.hi()) + for (l = t.Kc(); l.Ob(); ) + h = l.Pb(), vM(n, e, h, I(e, 99) && (u(e, 18).Bb & Ji) != 0) || (r = uh(e, h), c.Hc(r) || c.Fc(r)); + else if (!f) + for (l = t.Kc(); l.Ob(); ) + h = l.Pb(), r = uh(e, h), c.Fc(r); + } else { + if (t.gc() > 1) + throw T(new Hn(Mk)); + for (a = _c(n.e.Tg(), e), i = u(n.g, 119), o = 0; o < n.i; ++o) + if (r = i[o], a.rl(r.ak())) { + if (t.Hc(f ? r : r.dd())) + return !1; + for (l = t.Kc(); l.Ob(); ) + h = l.Pb(), u(Gw(n, o, f ? u(h, 72) : uh(e, h)), 72); + return !0; + } + f || (r = uh(e, t.Kc().Pb()), c.Fc(r)); + } + return Ft(n, c); + } + function Yje(n, e) { + var t, i, r, c, o, f, h, l, a; + for (a = new Tt(), f = (l = new Mh(n.c).a.vc().Kc(), new N0(l)); f.a.Ob(); ) + c = (r = u(f.a.Pb(), 42), u(r.dd(), 458)), c.b == 0 && Ht(a, c, a.c.b, a.c); + for (; a.b != 0; ) + for (c = u(a.b == 0 ? null : (ne(a.b != 0), Ts(a, a.a.a)), 458), c.a == null && (c.a = 0), i = new E(c.d); i.a < i.c.c.length; ) + t = u(y(i), 654), t.b.a == null ? t.b.a = K(c.a) + t.a : e.o == (ef(), Ya) ? t.b.a = j.Math.min(K(t.b.a), K(c.a) + t.a) : t.b.a = j.Math.max(K(t.b.a), K(c.a) + t.a), --t.b.b, t.b.b == 0 && Ke(a, t.b); + for (o = (h = new Mh(n.c).a.vc().Kc(), new N0(h)); o.a.Ob(); ) + c = (r = u(o.a.Pb(), 42), u(r.dd(), 458)), e.i[c.c.p] = c.a; + } + function cc() { + cc = N, Wm = new yt(Ann), new ri("DEPTH", Q(0)), vP = new ri("FAN", Q(0)), QJn = new ri(PHn, Q(0)), rw = new ri("ROOT", (qn(), !1)), pK = new ri("LEFTNEIGHBOR", null), JJn = new ri("RIGHTNEIGHBOR", null), mP = new ri("LEFTSIBLING", null), vK = new ri("RIGHTSIBLING", null), gK = new ri("DUMMY", !1), new ri("LEVEL", Q(0)), gon = new ri("REMOVABLE_EDGES", new Tt()), mK = new ri("XCOOR", Q(0)), pon = new ri("YCOOR", Q(0)), kP = new ri("LEVELHEIGHT", 0), Um = new ri("ID", ""), yP = new ri("POSITION", Q(0)), D1 = new ri("PRELIM", 0), pv = new ri("MODIFIER", 0), zm = new yt(_Kn), sy = new yt(KKn); + } + function Zje(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v; + for (a = t + e.c.c.a, p = new E(e.j); p.a < p.c.c.length; ) { + if (g = u(y(p), 11), r = Gr(A(M(di, 1), q, 8, 0, [g.i.n, g.n, g.a])), e.k == (Qn(), Mc) && (f = u(k(g, (G(), rt)), 11), r.a = Gr(A(M(di, 1), q, 8, 0, [f.i.n, f.n, f.a])).a, e.n.a = r.a), o = new fn(0, r.b), g.j == (J(), Vn)) + o.a = a; + else if (g.j == Gn) + o.a = t; + else + continue; + if (v = j.Math.abs(r.a - o.a), !(v <= i && !i4e(e))) + for (c = g.g.c.length + g.e.c.length > 1, l = new uf(g.b); Kr(l.a) || Kr(l.b); ) + h = u(Kr(l.a) ? y(l.a) : y(l.b), 17), d = h.c == g ? h.d : h.c, j.Math.abs(Gr(A(M(di, 1), q, 8, 0, [d.i.n, d.n, d.a])).b - o.b) > 1 && z8e(n, h, o, c, g); + } + } + function nEe(n) { + var e, t, i, r, c, o; + if (r = new Ii(n.e, 0), i = new Ii(n.a, 0), n.d) + for (t = 0; t < n.b; t++) + ne(r.b < r.d.gc()), r.d.Xb(r.c = r.b++); + else + for (t = 0; t < n.b - 1; t++) + ne(r.b < r.d.gc()), r.d.Xb(r.c = r.b++), Wu(r); + for (e = K((ne(r.b < r.d.gc()), Y(r.d.Xb(r.c = r.b++)))); n.f - e > oB; ) { + for (c = e, o = 0; j.Math.abs(e - c) < oB; ) + ++o, e = K((ne(r.b < r.d.gc()), Y(r.d.Xb(r.c = r.b++)))), ne(i.b < i.d.gc()), i.d.Xb(i.c = i.b++); + o < n.b && (ne(r.b > 0), r.a.Xb(r.c = --r.b), pye(n, n.b - o, c, i, r), ne(r.b < r.d.gc()), r.d.Xb(r.c = r.b++)), ne(i.b > 0), i.a.Xb(i.c = --i.b); + } + if (!n.d) + for (t = 0; t < n.b - 1; t++) + ne(r.b < r.d.gc()), r.d.Xb(r.c = r.b++), Wu(r); + n.d = !0, n.c = !0; + } + function ht() { + ht = N, $1n = (jG(), oc).b, aee = u(D(R(oc.b), 0), 34), cd = u(D(R(oc.b), 1), 34), lee = u(D(R(oc.b), 2), 34), Gg = oc.bb, u(D(R(oc.bb), 0), 34), u(D(R(oc.bb), 1), 34), zg = oc.fb, w9 = u(D(R(oc.fb), 0), 34), u(D(R(oc.fb), 1), 34), u(D(R(oc.fb), 2), 18), $0 = oc.qb, Cee = u(D(R(oc.qb), 0), 34), u(D(R(oc.qb), 1), 18), u(D(R(oc.qb), 2), 18), Ry = u(D(R(oc.qb), 3), 34), _y = u(D(R(oc.qb), 4), 34), p9 = u(D(R(oc.qb), 6), 34), g9 = u(D(R(oc.qb), 5), 18), dee = oc.j, bee = oc.k, wee = oc.q, gee = oc.w, pee = oc.B, vee = oc.A, mee = oc.C, kee = oc.D, yee = oc._, jee = oc.cb, Eee = oc.hb; + } + function eEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + n.c = 0, n.b = 0, i = 2 * e.c.a.c.length + 1; + n: + for (d = t.Kc(); d.Ob(); ) { + if (a = u(d.Pb(), 11), f = a.j == (J(), Kn) || a.j == ae, p = 0, f) { + if (g = u(k(a, (G(), Mu)), 10), !g) + continue; + p += $7e(n, i, a, g); + } else { + for (l = new E(a.g); l.a < l.c.c.length; ) + if (h = u(y(l), 17), r = h.d, r.i.c == e.c) { + W(n.a, a); + continue n; + } else + p += n.g[r.p]; + for (o = new E(a.e); o.a < o.c.c.length; ) + if (c = u(y(o), 17), r = c.c, r.i.c == e.c) { + W(n.a, a); + continue n; + } else + p -= n.g[r.p]; + } + a.e.c.length + a.g.c.length > 0 ? (n.f[a.p] = p / (a.e.c.length + a.g.c.length), n.c = j.Math.min(n.c, n.f[a.p]), n.b = j.Math.max(n.b, n.f[a.p])) : f && (n.f[a.p] = p); + } + } + function tEe(n) { + n.b = null, n.bb = null, n.fb = null, n.qb = null, n.a = null, n.c = null, n.d = null, n.e = null, n.f = null, n.n = null, n.M = null, n.L = null, n.Q = null, n.R = null, n.K = null, n.db = null, n.eb = null, n.g = null, n.i = null, n.j = null, n.k = null, n.gb = null, n.o = null, n.p = null, n.q = null, n.r = null, n.$ = null, n.ib = null, n.S = null, n.T = null, n.t = null, n.s = null, n.u = null, n.v = null, n.w = null, n.B = null, n.A = null, n.C = null, n.D = null, n.F = null, n.G = null, n.H = null, n.I = null, n.J = null, n.P = null, n.Z = null, n.U = null, n.V = null, n.W = null, n.X = null, n.Y = null, n._ = null, n.ab = null, n.cb = null, n.hb = null, n.nb = null, n.lb = null, n.mb = null, n.ob = null, n.pb = null, n.jb = null, n.kb = null, n.N = !1, n.O = !1; + } + function iEe(n, e, t) { + var i, r, c, o; + for (le(t, "Graph transformation (" + n.a + ")", 1), o = $d(e.a), c = new E(e.b); c.a < c.c.c.length; ) + r = u(y(c), 29), Zt(o, r.a); + if (i = u(k(e, (nn(), tsn)), 419), i == (V8(), $S)) + switch (u(k(e, as), 103).g) { + case 2: + H5(e, o); + break; + case 3: + h6(e, o); + break; + case 4: + n.a == (N3(), _k) ? (h6(e, o), w$(e, o)) : (w$(e, o), h6(e, o)); + } + else if (n.a == (N3(), _k)) + switch (u(k(e, as), 103).g) { + case 2: + H5(e, o), w$(e, o); + break; + case 3: + h6(e, o), H5(e, o); + break; + case 4: + H5(e, o), h6(e, o); + } + else + switch (u(k(e, as), 103).g) { + case 2: + H5(e, o), w$(e, o); + break; + case 3: + H5(e, o), h6(e, o); + break; + case 4: + h6(e, o), H5(e, o); + } + ce(t); + } + function rEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m; + for (l = new Sh(), a = new Sh(), v = new Sh(), m = new Sh(), h = K(Y(k(e, (nn(), M0)))), c = K(Y(k(e, Mo))), f = new E(t); f.a < f.c.c.length; ) + if (o = u(y(f), 10), d = u(k(o, (G(), ec)), 61), d == (J(), Kn)) + for (a.a.zc(o, a), r = new re(ue(Lr(o).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 17), ci(l, i.c.i); + else if (d == ae) + for (m.a.zc(o, m), r = new re(ue(Lr(o).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 17), ci(v, i.c.i); + l.a.gc() != 0 && (g = new FD(2, c), p = FZ(g, e, l, a, -h - e.c.b), p > 0 && (n.a = h + (p - 1) * c, e.c.b += n.a, e.f.b += n.a)), v.a.gc() != 0 && (g = new FD(1, c), p = FZ(g, e, v, m, e.f.b + h - e.c.b), p > 0 && (e.f.b += h + (p - 1) * c)); + } + function k4(n, e) { + var t, i, r, c; + c = n.F, e == null ? (n.F = null, W3(n, null)) : (n.F = (_n(e), e), i = Pf(e, tu(60)), i != -1 ? (r = e.substr(0, i), Pf(e, tu(46)) == -1 && !An(r, X2) && !An(r, cm) && !An(r, EA) && !An(r, um) && !An(r, sm) && !An(r, om) && !An(r, fm) && !An(r, hm) && (r = yGn), t = aE(e, tu(62)), t != -1 && (r += "" + e.substr(t + 1)), W3(n, r)) : (r = e, Pf(e, tu(46)) == -1 && (i = Pf(e, tu(91)), i != -1 && (r = e.substr(0, i)), !An(r, X2) && !An(r, cm) && !An(r, EA) && !An(r, um) && !An(r, sm) && !An(r, om) && !An(r, fm) && !An(r, hm) ? (r = yGn, i != -1 && (r += "" + e.substr(i))) : r = e), W3(n, r), r == e && (n.F = n.D))), n.Db & 4 && !(n.Db & 1) && et(n, new gi(n, 1, 5, c, e)); + } + function cEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + if (m = e.b.c.length, !(m < 3)) { + for (p = F(be, Le, 25, m, 15, 1), d = 0, a = new E(e.b); a.a < a.c.c.length; ) + l = u(y(a), 29), p[d++] = l.a.c.length; + for (g = new Ii(e.b, 2), i = 1; i < m - 1; i++) + for (t = (ne(g.b < g.d.gc()), u(g.d.Xb(g.c = g.b++), 29)), v = new E(t.a), c = 0, f = 0, h = 0; h < p[i + 1]; h++) + if (O = u(y(v), 10), h == p[i + 1] - 1 || eY(n, O, i + 1, i)) { + for (o = p[i] - 1, eY(n, O, i + 1, i) && (o = n.c.e[u(u(u(un(n.c.b, O.p), 15).Xb(0), 46).a, 10).p]); f <= h; ) { + if ($ = u(un(t.a, f), 10), !eY(n, $, i + 1, i)) + for (S = u(un(n.c.b, $.p), 15).Kc(); S.Ob(); ) + C = u(S.Pb(), 46), r = n.c.e[u(C.a, 10).p], (r < c || r > o) && ci(n.b, u(C.b, 17)); + ++f; + } + c = o; + } + } + } + function OZ(n, e) { + var t; + if (e == null || An(e, iu) || e.length == 0 && n.k != (j1(), Cp)) + return null; + switch (n.k.g) { + case 1: + return DT(e, N4) ? (qn(), G4) : DT(e, EB) ? (qn(), Ga) : null; + case 2: + try { + return Q(ss(e, Bi, nt)); + } catch (i) { + if (i = Et(i), I(i, 127)) + return null; + throw T(i); + } + case 4: + try { + return yb(e); + } catch (i) { + if (i = Et(i), I(i, 127)) + return null; + throw T(i); + } + case 3: + return e; + case 5: + return mDn(n), TLn(n, e); + case 6: + return mDn(n), w9e(n, n.a, e); + case 7: + try { + return t = Ame(n), t.Jf(e), t; + } catch (i) { + if (i = Et(i), I(i, 32)) + return null; + throw T(i); + } + default: + throw T(new $r("Invalid type set for this layout option.")); + } + } + function uEe(n) { + X5(); + var e, t, i, r, c, o, f; + for (f = new Qmn(), t = new E(n); t.a < t.c.c.length; ) + e = u(y(t), 140), (!f.b || e.c >= f.b.c) && (f.b = e), (!f.c || e.c <= f.c.c) && (f.d = f.c, f.c = e), (!f.e || e.d >= f.e.d) && (f.e = e), (!f.f || e.d <= f.f.d) && (f.f = e); + return i = new LT((q3(), w0)), O8(n, AWn, new Hu(A(M(Rk, 1), rn, 369, 0, [i]))), o = new LT(qb), O8(n, MWn, new Hu(A(M(Rk, 1), rn, 369, 0, [o]))), r = new LT(Hb), O8(n, TWn, new Hu(A(M(Rk, 1), rn, 369, 0, [r]))), c = new LT(kg), O8(n, CWn, new Hu(A(M(Rk, 1), rn, 369, 0, [c]))), Rx(i.c, w0), Rx(r.c, Hb), Rx(c.c, kg), Rx(o.c, qb), f.a.c = F(Zn, rn, 1, 0, 5, 1), Zt(f.a, i.c), Zt(f.a, ma(r.c)), Zt(f.a, c.c), Zt(f.a, ma(o.c)), f; + } + function DZ(n) { + var e; + switch (n.d) { + case 1: { + if (n.hj()) + return n.o != -2; + break; + } + case 2: { + if (n.hj()) + return n.o == -2; + break; + } + case 3: + case 5: + case 4: + case 6: + case 7: + return n.o > -2; + default: + return !1; + } + switch (e = n.gj(), n.p) { + case 0: + return e != null && on(sn(e)) != b5(n.k, 0); + case 1: + return e != null && u(e, 217).a != ge(n.k) << 24 >> 24; + case 2: + return e != null && u(e, 172).a != (ge(n.k) & Ut); + case 6: + return e != null && b5(u(e, 162).a, n.k); + case 5: + return e != null && u(e, 19).a != ge(n.k); + case 7: + return e != null && u(e, 184).a != ge(n.k) << 16 >> 16; + case 3: + return e != null && K(Y(e)) != n.j; + case 4: + return e != null && u(e, 155).a != n.j; + default: + return e == null ? n.n != null : !tt(e, n.n); + } + } + function X7(n, e, t) { + var i, r, c, o; + return n.Fk() && n.Ek() && (o = MD(n, u(t, 56)), B(o) !== B(t)) ? (n.Oi(e), n.Ui(e, dPn(n, e, o)), n.rk() && (c = (r = u(t, 49), n.Dk() ? n.Bk() ? r.ih(n.b, ir(u(On(Vc(n.b), n.aj()), 18)).n, u(On(Vc(n.b), n.aj()).Yj(), 26).Bj(), null) : r.ih(n.b, jt(r.Tg(), ir(u(On(Vc(n.b), n.aj()), 18))), null, null) : r.ih(n.b, -1 - n.aj(), null, null)), !u(o, 49).eh() && (c = (i = u(o, 49), n.Dk() ? n.Bk() ? i.gh(n.b, ir(u(On(Vc(n.b), n.aj()), 18)).n, u(On(Vc(n.b), n.aj()).Yj(), 26).Bj(), c) : i.gh(n.b, jt(i.Tg(), ir(u(On(Vc(n.b), n.aj()), 18))), null, c) : i.gh(n.b, -1 - n.aj(), null, c))), c && c.Fi()), qu(n.b) && n.$i(n.Zi(9, t, o, e, !1)), o) : t; + } + function NRn(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + for (a = K(Y(k(n, (nn(), T0)))), i = K(Y(k(n, Osn))), g = new jI(), H(g, T0, a + i), l = e, S = l.d, m = l.c.i, $ = l.d.i, C = pz(m.c), O = pz($.c), r = new X(), d = C; d <= O; d++) + f = new qh(n), ta(f, (Qn(), pi)), H(f, (G(), rt), l), H(f, Bt, (Ai(), Sc)), H(f, rP, g), p = u(un(n.b, d), 29), d == C ? vb(f, p.a.c.length - t, p) : jr(f, p), x = K(Y(k(l, P1))), x < 0 && (x = 0, H(l, P1, x)), f.o.b = x, v = j.Math.floor(x / 2), o = new gc(), si(o, (J(), Gn)), Hr(o, f), o.n.b = v, h = new gc(), si(h, Vn), Hr(h, f), h.n.b = v, Ti(l, o), c = new Id(), Pr(c, l), H(c, Mr, null), Ki(c, h), Ti(c, S), f4e(f, l, c), r.c[r.c.length] = c, l = c; + return r; + } + function gL(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (h = u(y1(n, (J(), Gn)).Kc().Pb(), 11).e, p = u(y1(n, Vn).Kc().Pb(), 11).g, f = h.c.length, O = tf(u(un(n.j, 0), 11)); f-- > 0; ) { + for (m = (Ln(0, h.c.length), u(h.c[0], 17)), r = (Ln(0, p.c.length), u(p.c[0], 17)), $ = r.d.e, c = xr($, r, 0), dae(m, r.d, c), Ki(r, null), Ti(r, null), v = m.a, e && Ke(v, new kr(O)), i = _e(r.a, 0); i.b != i.d.c; ) + t = u(Re(i), 8), Ke(v, new kr(t)); + for (S = m.b, g = new E(r.b); g.a < g.c.c.length; ) + d = u(y(g), 70), S.c[S.c.length] = d; + if (C = u(k(m, (nn(), Mr)), 74), o = u(k(r, Mr), 74), o) + for (C || (C = new fu(), H(m, Mr, C)), a = _e(o, 0); a.b != a.d.c; ) + l = u(Re(a), 8), Ke(C, new kr(l)); + } + } + function BRn(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + if (t = u(wr(n.b, e), 124), h = u(u(ct(n.r, e), 21), 84), h.dc()) { + t.n.b = 0, t.n.c = 0; + return; + } + for (l = n.u.Hc((Tu(), n1)), o = 0, f = h.Kc(), a = null, d = 0, g = 0; f.Ob(); ) + i = u(f.Pb(), 111), r = K(Y(i.b.We((dE(), JA)))), c = i.b.rf().a, n.A.Hc((Qu(), rd)) && pBn(n, e), a ? (p = g + a.d.c + n.w + i.d.b, o = j.Math.max(o, (Yo(), mo(bf), j.Math.abs(d - r) <= bf || d == r || isNaN(d) && isNaN(r) ? 0 : p / (r - d)))) : n.C && n.C.b > 0 && (o = j.Math.max(o, lOn(n.C.b + i.d.b, r))), a = i, d = r, g = c; + n.C && n.C.c > 0 && (p = g + n.C.c, l && (p += a.d.c), o = j.Math.max(o, (Yo(), mo(bf), j.Math.abs(d - 1) <= bf || d == 1 || isNaN(d) && isNaN(1) ? 0 : p / (1 - d)))), t.n.b = 0, t.a.a = o; + } + function RRn(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + if (t = u(wr(n.b, e), 124), h = u(u(ct(n.r, e), 21), 84), h.dc()) { + t.n.d = 0, t.n.a = 0; + return; + } + for (l = n.u.Hc((Tu(), n1)), o = 0, n.A.Hc((Qu(), rd)) && vBn(n, e), f = h.Kc(), a = null, g = 0, d = 0; f.Ob(); ) + i = u(f.Pb(), 111), c = K(Y(i.b.We((dE(), JA)))), r = i.b.rf().b, a ? (p = d + a.d.a + n.w + i.d.d, o = j.Math.max(o, (Yo(), mo(bf), j.Math.abs(g - c) <= bf || g == c || isNaN(g) && isNaN(c) ? 0 : p / (c - g)))) : n.C && n.C.d > 0 && (o = j.Math.max(o, lOn(n.C.d + i.d.d, c))), a = i, g = c, d = r; + n.C && n.C.a > 0 && (p = d + n.C.a, l && (p += a.d.a), o = j.Math.max(o, (Yo(), mo(bf), j.Math.abs(g - 1) <= bf || g == 1 || isNaN(g) && isNaN(1) ? 0 : p / (1 - g)))), t.n.d = 0, t.a.b = o; + } + function _Rn(n, e, t) { + var i, r, c, o, f, h; + for (this.g = n, f = e.d.length, h = t.d.length, this.d = F(vh, C1, 10, f + h, 0, 1), o = 0; o < f; o++) + this.d[o] = e.d[o]; + for (c = 0; c < h; c++) + this.d[f + c] = t.d[c]; + if (e.e) { + if (this.e = p8(e.e), this.e.Mc(t), t.e) + for (r = t.e.Kc(); r.Ob(); ) + i = u(r.Pb(), 233), i != e && (this.e.Hc(i) ? --i.c : this.e.Fc(i)); + } else + t.e && (this.e = p8(t.e), this.e.Mc(e)); + this.f = e.f + t.f, this.a = e.a + t.a, this.a > 0 ? q$(this, this.f / this.a) : Zo(e.g, e.d[0]).a != null && Zo(t.g, t.d[0]).a != null ? q$(this, (K(Zo(e.g, e.d[0]).a) + K(Zo(t.g, t.d[0]).a)) / 2) : Zo(e.g, e.d[0]).a != null ? q$(this, Zo(e.g, e.d[0]).a) : Zo(t.g, t.d[0]).a != null && q$(this, Zo(t.g, t.d[0]).a); + } + function sEe(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (n.a = new XCn(Lbe(e9)), i = new E(e.a); i.a < i.c.c.length; ) { + for (t = u(y(i), 841), f = new _F(A(M(RR, 1), rn, 81, 0, [])), W(n.a.a, f), l = new E(t.d); l.a < l.c.c.length; ) + h = u(y(l), 110), a = new zz(n, h), xZ(a, u(k(t.c, (G(), zb)), 21)), Uu(n.g, t) || (it(n.g, t, new fn(h.c, h.d)), it(n.f, t, a)), W(n.a.b, a), d$(f, a); + for (o = new E(t.b); o.a < o.c.c.length; ) + c = u(y(o), 594), a = new zz(n, c.kf()), it(n.b, c, new Pi(f, a)), xZ(a, u(k(t.c, (G(), zb)), 21)), c.hf() && (d = new UQ(n, c.hf(), 1), xZ(d, u(k(t.c, zb), 21)), r = new _F(A(M(RR, 1), rn, 81, 0, [])), d$(r, d), Tn(n.c, c.gf(), new Pi(f, d))); + } + return n.a; + } + function KRn(n) { + var e; + this.a = n, e = (Qn(), A(M(zR, 1), z, 267, 0, [ii, pi, Xt, Mc, Ju, vf])).length, this.b = fa(KK, [q, Jen], [593, 146], 0, [e, e], 2), this.c = fa(KK, [q, Jen], [593, 146], 0, [e, e], 2), ZD(this, ii, (nn(), M0), $g), e6(this, ii, pi, T0, Ja), M8(this, ii, Mc, T0), M8(this, ii, Xt, T0), e6(this, ii, Ju, M0, $g), ZD(this, pi, Mo, Dg), M8(this, pi, Mc, Mo), M8(this, pi, Xt, Mo), e6(this, pi, Ju, T0, Ja), wyn(this, Mc, Mo), M8(this, Mc, Xt, Mo), M8(this, Mc, Ju, G_), wyn(this, Xt, Fm), e6(this, Xt, Ju, wv, bv), ZD(this, Ju, Mo, Mo), ZD(this, vf, Mo, Dg), e6(this, vf, ii, T0, Ja), e6(this, vf, Ju, T0, Ja), e6(this, vf, pi, T0, Ja); + } + function oEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + if (o = t.ak(), I(o, 99) && u(o, 18).Bb & Ji && (g = u(t.dd(), 49), m = pl(n.e, g), m != g)) { + if (a = uh(o, m), k5(n, e, px(n, e, a)), d = null, qu(n.e) && (i = rg((wu(), xi), n.e.Tg(), o), i != On(n.e.Tg(), n.c))) { + for (C = _c(n.e.Tg(), o), f = 0, c = u(n.g, 119), h = 0; h < e; ++h) + r = c[h], C.rl(r.ak()) && ++f; + d = new v$(n.e, 9, i, g, m, f, !1), d.Ei(new Lh(n.e, 9, n.c, t, a, e, !1)); + } + return v = u(o, 18), p = ir(v), p ? (d = g.ih(n.e, jt(g.Tg(), p), null, d), d = u(m, 49).gh(n.e, jt(m.Tg(), p), null, d)) : v.Bb & uc && (l = -1 - jt(n.e.Tg(), v), d = g.ih(n.e, l, null, null), !u(m, 49).eh() && (d = u(m, 49).gh(n.e, l, null, d))), d && d.Fi(), a; + } + return t; + } + function fEe(n) { + var e, t, i, r, c, o, f, h; + for (c = new E(n.a.b); c.a < c.c.c.length; ) + r = u(y(c), 81), r.b.c = r.g.c, r.b.d = r.g.d; + for (h = new fn(Lt, Lt), e = new fn(Vt, Vt), i = new E(n.a.b); i.a < i.c.c.length; ) + t = u(y(i), 81), h.a = j.Math.min(h.a, t.g.c), h.b = j.Math.min(h.b, t.g.d), e.a = j.Math.max(e.a, t.g.c + t.g.b), e.b = j.Math.max(e.b, t.g.d + t.g.a); + for (f = XE(n.c).a.nc(); f.Ob(); ) + o = u(f.Pb(), 46), t = u(o.b, 81), h.a = j.Math.min(h.a, t.g.c), h.b = j.Math.min(h.b, t.g.d), e.a = j.Math.max(e.a, t.g.c + t.g.b), e.b = j.Math.max(e.b, t.g.d + t.g.a); + n.d = vE(new fn(h.a, h.b)), n.e = ji(new fn(e.a, e.b), h), n.a.a.c = F(Zn, rn, 1, 0, 5, 1), n.a.b.c = F(Zn, rn, 1, 0, 5, 1); + } + function hEe(n) { + var e, t, i; + for (_w(Wl, A(M(mg, 1), rn, 130, 0, [new nq()])), t = new sq(n), i = 0; i < t.a.length; ++i) + e = sb(t, i).je().a, An(e, "layered") ? _w(Wl, A(M(mg, 1), rn, 130, 0, [new A4n()])) : An(e, "force") ? _w(Wl, A(M(mg, 1), rn, 130, 0, [new f4n()])) : An(e, "stress") ? _w(Wl, A(M(mg, 1), rn, 130, 0, [new l4n()])) : An(e, "mrtree") ? _w(Wl, A(M(mg, 1), rn, 130, 0, [new G4n()])) : An(e, "radial") ? _w(Wl, A(M(mg, 1), rn, 130, 0, [new N4n()])) : An(e, "disco") ? _w(Wl, A(M(mg, 1), rn, 130, 0, [new o4n(), new u4n()])) : An(e, "sporeOverlap") || An(e, "sporeCompaction") ? _w(Wl, A(M(mg, 1), rn, 130, 0, [new K4n()])) : An(e, "rectpacking") && _w(Wl, A(M(mg, 1), rn, 130, 0, [new W4n()])); + } + function HRn(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + if (g = new kr(n.o), S = e.a / g.a, f = e.b / g.b, m = e.a - g.a, c = e.b - g.b, t) + for (r = B(k(n, (nn(), Bt))) === B((Ai(), Sc)), v = new E(n.j); v.a < v.c.c.length; ) + switch (p = u(y(v), 11), p.j.g) { + case 1: + r || (p.n.a *= S); + break; + case 2: + p.n.a += m, r || (p.n.b *= f); + break; + case 3: + r || (p.n.a *= S), p.n.b += c; + break; + case 4: + r || (p.n.b *= f); + } + for (l = new E(n.b); l.a < l.c.c.length; ) + h = u(y(l), 70), a = h.n.a + h.o.a / 2, d = h.n.b + h.o.b / 2, C = a / g.a, o = d / g.b, C + o >= 1 && (C - o > 0 && d >= 0 ? (h.n.a += m, h.n.b += c * o) : C - o < 0 && a >= 0 && (h.n.a += m * C, h.n.b += c)); + n.o.a = e.a, n.o.b = e.b, H(n, (nn(), Va), (Qu(), i = u(xo(o9), 9), new ks(i, u(bo(i, i.length), 9), 0))); + } + function lEe(n, e, t, i, r, c) { + var o; + if (!(e == null || !$F(e, a1n, d1n))) + throw T(new Hn("invalid scheme: " + e)); + if (!n && !(t != null && Pf(t, tu(35)) == -1 && t.length > 0 && (Te(0, t.length), t.charCodeAt(0) != 47))) + throw T(new Hn("invalid opaquePart: " + t)); + if (n && !(e != null && _9(tI, e.toLowerCase())) && !(t == null || !$F(t, a9, d9))) + throw T(new Hn(oGn + t)); + if (n && e != null && _9(tI, e.toLowerCase()) && !rve(t)) + throw T(new Hn(oGn + t)); + if (!o2e(i)) + throw T(new Hn("invalid device: " + i)); + if (!ege(r)) + throw o = r == null ? "invalid segments: null" : "invalid segment: " + Jwe(r), T(new Hn(o)); + if (!(c == null || Pf(c, tu(35)) == -1)) + throw T(new Hn("invalid query: " + c)); + } + function aEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + for (le(e, "Calculate Graph Size", 1), e.n && n && go(e, po(n), (Vu(), gs)), f = O4, h = O4, c = ttn, o = ttn, d = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); d.e != d.i.gc(); ) + l = u(oe(d), 33), v = l.i, m = l.j, S = l.g, i = l.f, r = u(hn(l, (Xe(), my)), 142), f = j.Math.min(f, v - r.b), h = j.Math.min(h, m - r.d), c = j.Math.max(c, v + S + r.c), o = j.Math.max(o, m + i + r.a); + for (p = u(hn(n, (Xe(), ed)), 116), g = new fn(f - p.b, h - p.d), a = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); a.e != a.i.gc(); ) + l = u(oe(a), 33), Zc(l, l.i - g.a), nu(l, l.j - g.b); + C = c - f + (p.b + p.c), t = o - h + (p.d + p.a), _d(n, C), Rd(n, t), e.n && n && go(e, po(n), (Vu(), gs)); + } + function qRn(n) { + var e, t, i, r, c, o, f, h, l, a; + for (i = new X(), o = new E(n.e.a); o.a < o.c.c.length; ) { + for (r = u(y(o), 121), a = 0, r.k.c = F(Zn, rn, 1, 0, 5, 1), t = new E(Hw(r)); t.a < t.c.c.length; ) + e = u(y(t), 213), e.f && (W(r.k, e), ++a); + a == 1 && (i.c[i.c.length] = r); + } + for (c = new E(i); c.a < c.c.c.length; ) + for (r = u(y(c), 121); r.k.c.length == 1; ) { + for (l = u(y(new E(r.k)), 213), n.b[l.c] = l.g, f = l.d, h = l.e, t = new E(Hw(r)); t.a < t.c.c.length; ) + e = u(y(t), 213), tt(e, l) || (e.f ? f == e.d || h == e.e ? n.b[l.c] -= n.b[e.c] - e.g : n.b[l.c] += n.b[e.c] - e.g : r == f ? e.d == r ? n.b[l.c] += e.g : n.b[l.c] -= e.g : e.d == r ? n.b[l.c] -= e.g : n.b[l.c] += e.g); + Qc(f.k, l), Qc(h.k, l), f == r ? r = l.e : r = l.d; + } + } + function $Z(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + if (e == null || e.length == 0) + return null; + if (c = u(mc(n.f, e), 23), !c) { + for (r = (p = new Mh(n.d).a.vc().Kc(), new N0(p)); r.a.Ob(); ) + if (t = (o = u(r.a.Pb(), 42), u(o.dd(), 23)), f = t.f, v = e.length, An(f.substr(f.length - v, v), e) && (e.length == f.length || Di(f, f.length - e.length - 1) == 46)) { + if (c) + return null; + c = t; + } + if (!c) { + for (i = (g = new Mh(n.d).a.vc().Kc(), new N0(g)); i.a.Ob(); ) + if (t = (o = u(i.a.Pb(), 42), u(o.dd(), 23)), d = t.g, d != null) { + for (h = d, l = 0, a = h.length; l < a; ++l) + if (f = h[l], v = e.length, An(f.substr(f.length - v, v), e) && (e.length == f.length || Di(f, f.length - e.length - 1) == 46)) { + if (c) + return null; + c = t; + } + } + } + c && yr(n.f, e, c); + } + return c; + } + function dEe(n, e) { + var t, i, r, c, o; + for (t = new _0(), o = !1, c = 0; c < e.length; c++) { + if (i = (Te(c, e.length), e.charCodeAt(c)), i == 32) { + for (NT(n, t, 0), t.a += " ", NT(n, t, 0); c + 1 < e.length && (Te(c + 1, e.length), e.charCodeAt(c + 1) == 32); ) + ++c; + continue; + } + if (o) { + i == 39 ? c + 1 < e.length && (Te(c + 1, e.length), e.charCodeAt(c + 1) == 39) ? (t.a += String.fromCharCode(i), ++c) : o = !1 : t.a += String.fromCharCode(i); + continue; + } + if (Pf("GyMLdkHmsSEcDahKzZv", tu(i)) > 0) { + NT(n, t, 0), t.a += String.fromCharCode(i), r = J2e(e, c), NT(n, t, r), c += r - 1; + continue; + } + i == 39 ? c + 1 < e.length && (Te(c + 1, e.length), e.charCodeAt(c + 1) == 39) ? (t.a += "'", ++c) : o = !0 : t.a += String.fromCharCode(i); + } + NT(n, t, 0), Sve(n); + } + function bEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + if (le(t, "Network simplex layering", 1), n.b = e, S = u(k(e, (nn(), xm)), 19).a * 4, C = n.b.a, C.c.length < 1) { + ce(t); + return; + } + for (c = bke(n, C), m = null, r = _e(c, 0); r.b != r.d.c; ) { + for (i = u(Re(r), 15), f = S * Gt(j.Math.sqrt(i.gc())), o = Oke(i), Yx(gG(Aie(pG(fD(o), f), m), !0), yc(t, 1)), g = n.b.b, v = new E(o.a); v.a < v.c.c.length; ) { + for (p = u(y(v), 121); g.c.length <= p.e; ) + J0(g, g.c.length, new Rs(n.b)); + a = u(p.f, 10), jr(a, u(un(g, p.e), 29)); + } + if (c.b > 1) + for (m = F(be, Le, 25, n.b.b.c.length, 15, 1), d = 0, l = new E(n.b.b); l.a < l.c.c.length; ) + h = u(y(l), 29), m[d++] = h.a.c.length; + } + C.c = F(Zn, rn, 1, 0, 5, 1), n.a = null, n.b = null, n.c = null, ce(t); + } + function GRn(n) { + var e, t, i, r, c, o, f; + for (e = 0, c = new E(n.b.a); c.a < c.c.c.length; ) + i = u(y(c), 189), i.b = 0, i.c = 0; + for (Pxn(n, 0), FF(n, n.g), oM(n.c), lG(n.c), t = (or(), Zs), G7($O(cg(G7($O(cg(G7(cg(n.c, t)), XDn(t)))), t))), cg(n.c, Zs), AF(n, n.g), pxn(n, 0), ERn(n, 0), oNn(n, 1), Pxn(n, 1), FF(n, n.d), oM(n.c), o = new E(n.b.a); o.a < o.c.c.length; ) + i = u(y(o), 189), e += j.Math.abs(i.c); + for (f = new E(n.b.a); f.a < f.c.c.length; ) + i = u(y(f), 189), i.b = 0, i.c = 0; + for (t = Yh, G7($O(cg(G7($O(cg(G7(lG(cg(n.c, t))), XDn(t)))), t))), cg(n.c, Zs), AF(n, n.d), pxn(n, 1), ERn(n, 1), oNn(n, 0), lG(n.c), r = new E(n.b.a); r.a < r.c.c.length; ) + i = u(y(r), 189), e += j.Math.abs(i.c); + return e; + } + function zRn(n, e) { + var t, i, r, c, o, f, h, l, a; + if (l = e, !(l.b == null || n.b == null)) { + for (Jw(n), D6(n), Jw(l), D6(l), t = F(be, Le, 25, n.b.length + l.b.length, 15, 1), a = 0, i = 0, o = 0; i < n.b.length && o < l.b.length; ) + if (r = n.b[i], c = n.b[i + 1], f = l.b[o], h = l.b[o + 1], c < f) + i += 2; + else if (c >= f && r <= h) + f <= r && c <= h ? (t[a++] = r, t[a++] = c, i += 2) : f <= r ? (t[a++] = r, t[a++] = h, n.b[i] = h + 1, o += 2) : c <= h ? (t[a++] = f, t[a++] = c, i += 2) : (t[a++] = f, t[a++] = h, n.b[i] = h + 1); + else if (h < r) + o += 2; + else + throw T(new _r("Token#intersectRanges(): Internal Error: [" + n.b[i] + "," + n.b[i + 1] + "] & [" + l.b[o] + "," + l.b[o + 1] + "]")); + for (; i < n.b.length; ) + t[a++] = n.b[i++], t[a++] = n.b[i++]; + n.b = F(be, Le, 25, a, 15, 1), pc(t, 0, n.b, 0, a); + } + } + function wEe(n) { + var e, t, i, r, c, o, f; + for (e = new X(), n.g = new X(), n.d = new X(), o = new Ca(new ia(n.f.b).a); o.b; ) + c = Bd(o), W(e, u(u(c.dd(), 46).b, 81)), tl(u(c.cd(), 594).gf()) ? W(n.d, u(c.dd(), 46)) : W(n.g, u(c.dd(), 46)); + for (FF(n, n.d), FF(n, n.g), n.c = new ALn(n.b), Pie(n.c, (IG(), mWn)), AF(n, n.d), AF(n, n.g), Zt(e, n.c.a.b), n.e = new fn(Lt, Lt), n.a = new fn(Vt, Vt), i = new E(e); i.a < i.c.c.length; ) + t = u(y(i), 81), n.e.a = j.Math.min(n.e.a, t.g.c), n.e.b = j.Math.min(n.e.b, t.g.d), n.a.a = j.Math.max(n.a.a, t.g.c + t.g.b), n.a.b = j.Math.max(n.a.b, t.g.d + t.g.a); + mG(n.c, new Can()), f = 0; + do + r = GRn(n), ++f; + while ((f < 2 || r > Cl) && f < 10); + mG(n.c, new Tan()), GRn(n), ehe(n.c), fEe(n.f); + } + function gEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + if (on(sn(k(t, (nn(), Jb))))) + for (f = new E(t.j); f.a < f.c.c.length; ) + for (o = u(y(f), 11), g = xf(o.g), l = g, a = 0, d = l.length; a < d; ++a) + h = l[a], c = h.d.i == t, r = c && on(sn(k(h, Xa))), r && (v = h.c, p = u(te(n.b, v), 10), p || (p = V7(v, (Ai(), jf), v.j, -1, null, null, v.o, u(k(e, as), 103), e), H(p, (G(), rt), v), it(n.b, v, p), W(e.a, p)), C = h.d, m = u(te(n.b, C), 10), m || (m = V7(C, (Ai(), jf), C.j, 1, null, null, C.o, u(k(e, as), 103), e), H(m, (G(), rt), C), it(n.b, C, m), W(e.a, m)), i = C$(h), Ki(i, u(un(p.j, 0), 11)), Ti(i, u(un(m.j, 0), 11)), Tn(n.a, h, new EE(i, e, (sr(), Lc))), u(k(e, (G(), Ac)), 21).Fc((fr(), $s))); + } + function pEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + for (le(t, "Label dummy switching", 1), i = u(k(e, (nn(), QS)), 227), Pbe(e), r = f9e(e, i), n.a = F(Ci, vr, 25, e.b.c.length, 15, 1), f = (q2(), A(M(iv, 1), z, 227, 0, [tv, ym, ev, Gb, Cg, Eg])), a = 0, p = f.length; a < p; ++a) + if (c = f[a], (c == Cg || c == Eg || c == Gb) && !u(lu(r.a, c) ? r.b[c.g] : null, 15).dc()) { + _be(n, e); + break; + } + for (h = A(M(iv, 1), z, 227, 0, [tv, ym, ev, Gb, Cg, Eg]), d = 0, v = h.length; d < v; ++d) + c = h[d], c == Cg || c == Eg || c == Gb || FBn(n, u(lu(r.a, c) ? r.b[c.g] : null, 15)); + for (o = A(M(iv, 1), z, 227, 0, [tv, ym, ev, Gb, Cg, Eg]), l = 0, g = o.length; l < g; ++l) + c = o[l], (c == Cg || c == Eg || c == Gb) && FBn(n, u(lu(r.a, c) ? r.b[c.g] : null, 15)); + n.a = null, ce(t); + } + function vEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + switch (n.k.g) { + case 1: + if (i = u(k(n, (G(), rt)), 17), t = u(k(i, gun), 74), t ? on(sn(k(i, mf))) && (t = o7(t)) : t = new fu(), l = u(k(n, Xo), 11), l) { + if (a = Gr(A(M(di, 1), q, 8, 0, [l.i.n, l.n, l.a])), e <= a.a) + return a.b; + Ht(t, a, t.a, t.a.a); + } + if (d = u(k(n, Ys), 11), d) { + if (g = Gr(A(M(di, 1), q, 8, 0, [d.i.n, d.n, d.a])), g.a <= e) + return g.b; + Ht(t, g, t.c.b, t.c); + } + if (t.b >= 2) { + for (h = _e(t, 0), o = u(Re(h), 8), f = u(Re(h), 8); f.a < e && h.b != h.d.c; ) + o = f, f = u(Re(h), 8); + return o.b + (e - o.a) / (f.a - o.a) * (f.b - o.b); + } + break; + case 3: + switch (c = u(k(u(un(n.j, 0), 11), (G(), rt)), 11), r = c.i, c.j.g) { + case 1: + return r.n.b; + case 3: + return r.n.b + r.o.b; + } + } + return MJ(n).b; + } + function mEe(n) { + var e, t, i, r, c, o, f, h, l, a, d; + for (o = new E(n.d.b); o.a < o.c.c.length; ) + for (c = u(y(o), 29), h = new E(c.a); h.a < h.c.c.length; ) { + if (f = u(y(h), 10), on(sn(k(f, (nn(), Im)))) && !j3(Kh(f))) { + i = u(v1e(Kh(f)), 17), a = i.c.i, a == f && (a = i.d.i), d = new Pi(a, ji(Qr(f.n), a.n)), it(n.b, f, d); + continue; + } + r = new ys(f.n.a - f.d.b, f.n.b - f.d.d, f.o.a + f.d.b + f.d.c, f.o.b + f.d.d + f.d.a), e = njn(b7n(a7n(d7n(new Vq(), f), r), WWn), n.a), Zyn(tre(OIn(new Xq(), A(M(VA, 1), rn, 57, 0, [e])), e), n.a), l = new FI(), it(n.e, e, l), t = Fh(new re(ue(Lr(f).a.Kc(), new Mn()))) - Fh(new re(ue(ei(f).a.Kc(), new Mn()))), t < 0 ? u7(l, !0, (or(), Zs)) : t > 0 && u7(l, !0, (or(), Ao)), f.k == (Qn(), Xt) && pTn(l), it(n.f, f, e); + } + } + function kEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + switch (le(t, "Node promotion heuristic", 1), n.g = e, MCe(n), n.q = u(k(e, (nn(), __)), 260), a = u(k(n.g, psn), 19).a, c = new h0n(), n.q.g) { + case 2: + case 1: + m4(n, c); + break; + case 3: + for (n.q = (Zw(), lP), m4(n, c), h = 0, f = new E(n.a); f.a < f.c.c.length; ) + o = u(y(f), 19), h = j.Math.max(h, o.a); + h > n.j && (n.q = ey, m4(n, c)); + break; + case 4: + for (n.q = (Zw(), lP), m4(n, c), l = 0, r = new E(n.b); r.a < r.c.c.length; ) + i = Y(y(r)), l = j.Math.max(l, (_n(i), i)); + l > n.k && (n.q = ty, m4(n, c)); + break; + case 6: + g = Gt(j.Math.ceil(n.f.length * a / 100)), m4(n, new M5n(g)); + break; + case 5: + d = Gt(j.Math.ceil(n.d * a / 100)), m4(n, new A5n(d)); + break; + default: + m4(n, c); + } + d7e(n, e), ce(t); + } + function URn(n, e, t) { + var i, r, c, o; + this.j = n, this.e = LJ(n), this.o = this.j.e, this.i = !!this.o, this.p = this.i ? u(un(t, qi(this.o).p), 214) : null, r = u(k(n, (G(), Ac)), 21), this.g = r.Hc((fr(), $s)), this.b = new X(), this.d = new b$n(this.e), o = u(k(this.j, vp), 230), this.q = Ybe(e, o, this.e), this.k = new wMn(this), c = cf(A(M(VWn, 1), rn, 225, 0, [this, this.d, this.k, this.q])), e == (Kd(), ry) && !on(sn(k(n, (nn(), Xb)))) ? (i = new BJ(this.e), c.c[c.c.length] = i, this.c = new dX(i, o, u(this.q, 402))) : e == ry && on(sn(k(n, (nn(), Xb)))) ? (i = new BJ(this.e), c.c[c.c.length] = i, this.c = new JIn(i, o, u(this.q, 402))) : this.c = new V7n(e, this), W(c, this.c), ARn(c, this.e), this.s = tTe(this.k); + } + function yEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + for (d = u(fE((o = _e(new X1(e).a.d, 0), new e2(o))), 86), v = d ? u(k(d, (cc(), pK)), 86) : null, r = 1; d && v; ) { + for (h = 0, x = 0, t = d, i = v, f = 0; f < r; f++) + t = O$(t), i = O$(i), x += K(Y(k(t, (cc(), pv)))), h += K(Y(k(i, pv))); + if (O = K(Y(k(v, (cc(), D1)))), $ = K(Y(k(d, D1))), g = TX(d, v), p = O + h + n.a + g - $ - x, 0 < p) { + for (l = e, a = 0; l && l != i; ) + ++a, l = u(k(l, mP), 86); + if (l) + for (S = p / a, l = e; l != i; ) + C = K(Y(k(l, D1))) + p, H(l, D1, C), m = K(Y(k(l, pv))) + p, H(l, pv, m), p -= S, l = u(k(l, mP), 86); + else + return; + } + ++r, d.d.b == 0 ? d = aZ(new X1(e), r) : d = u(fE((c = _e(new X1(d).a.d, 0), new e2(c))), 86), v = d ? u(k(d, pK), 86) : null; + } + } + function WRn(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (h = !0, r = 0, l = n.f[e.p], a = e.o.b + n.n, t = n.c[e.p][2], Es(n.a, l, Q(u(un(n.a, l), 19).a - 1 + t)), Es(n.b, l, K(Y(un(n.b, l))) - a + t * n.e), ++l, l >= n.i ? (++n.i, W(n.a, Q(1)), W(n.b, a)) : (i = n.c[e.p][1], Es(n.a, l, Q(u(un(n.a, l), 19).a + 1 - i)), Es(n.b, l, K(Y(un(n.b, l))) + a - i * n.e)), (n.q == (Zw(), ey) && (u(un(n.a, l), 19).a > n.j || u(un(n.a, l - 1), 19).a > n.j) || n.q == ty && (K(Y(un(n.b, l))) > n.k || K(Y(un(n.b, l - 1))) > n.k)) && (h = !1), o = new re(ue(Lr(e).a.Kc(), new Mn())); Se(o); ) + c = u(ve(o), 17), f = c.c.i, n.f[f.p] == l && (d = WRn(n, f), r = r + u(d.a, 19).a, h = h && on(sn(d.b))); + return n.f[e.p] = l, r = r + n.c[e.p][0], new Pi(Q(r), (qn(), !!h)); + } + function FZ(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S; + for (d = new we(), o = new X(), wLn(n, t, n.d.fg(), o, d), wLn(n, i, n.d.gg(), o, d), n.b = 0.2 * (m = rNn(qr(new $n(null, new xn(o, 16)), new vgn())), C = rNn(qr(new $n(null, new xn(o, 16)), new mgn())), j.Math.min(m, C)), c = 0, f = 0; f < o.c.length - 1; f++) + for (h = (Ln(f, o.c.length), u(o.c[f], 112)), v = f + 1; v < o.c.length; v++) + c += AZ(n, h, (Ln(v, o.c.length), u(o.c[v], 112))); + for (g = u(k(e, (G(), vp)), 230), c >= 2 && (S = MNn(o, !0, g), !n.e && (n.e = new I6n(n)), Z2e(n.e, S, o, n.b)), uxn(o, g), NEe(o), p = -1, a = new E(o); a.a < a.c.c.length; ) + l = u(y(a), 112), !(j.Math.abs(l.s - l.c) < Kf) && (p = j.Math.max(p, l.o), n.d.dg(l, r, n.c)); + return n.d.a.a.$b(), p + 1; + } + function XRn(n, e) { + var t, i, r, c, o; + t = K(Y(k(e, (nn(), Mo)))), t < 2 && H(e, Mo, 2), i = u(k(e, as), 103), i == (or(), mh) && H(e, as, jT(e)), r = u(k(e, FQn), 19), r.a == 0 ? H(e, (G(), vp), new OF()) : H(e, (G(), vp), new EC(r.a)), c = sn(k(e, Dm)), c == null && H(e, Dm, (qn(), B(k(e, Qh)) === B((Hh(), Ev)))), _t(new $n(null, new xn(e.a, 16)), new Sq(n)), _t(qr(new $n(null, new xn(e.b, 16)), new NH()), new Pq(n)), o = new KRn(e), H(e, (G(), Ig), o), pC(n.a), ih(n.a, (Vi(), Vf), u(k(e, Vb), 246)), ih(n.a, $l, u(k(e, vsn), 246)), ih(n.a, Kc, u(k(e, Om), 246)), ih(n.a, Tc, u(k(e, tP), 246)), ih(n.a, Or, Vbe(u(k(e, Qh), 218))), cyn(n.a, wTe(e)), H(e, S_, EM(n.a, e)); + } + function jEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + return g = n.c[e], p = n.c[t], v = u(k(g, (G(), gp)), 15), !!v && v.gc() != 0 && v.Hc(p) || (m = g.k != (Qn(), pi) && p.k != pi, C = u(k(g, k0), 10), S = u(k(p, k0), 10), $ = C != S, O = !!C && C != g || !!S && S != p, x = tx(g, (J(), Kn)), _ = tx(p, ae), O = O | (tx(g, ae) || tx(p, Kn)), U = O && $ || x || _, m && U) || g.k == (Qn(), Mc) && p.k == ii || p.k == (Qn(), Mc) && g.k == ii ? !1 : (a = n.c[e], c = n.c[t], r = zFn(n.e, a, c, (J(), Gn)), h = zFn(n.i, a, c, Vn), b8e(n.f, a, c), l = bDn(n.b, a, c) + u(r.a, 19).a + u(h.a, 19).a + n.f.d, f = bDn(n.b, c, a) + u(r.b, 19).a + u(h.b, 19).a + n.f.b, n.a && (d = u(k(a, rt), 11), o = u(k(c, rt), 11), i = PFn(n.g, d, o), l += u(i.a, 19).a, f += u(i.b, 19).a), l > f); + } + function EEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (t = u(k(n, (nn(), Bt)), 98), o = n.f, c = n.d, f = o.a + c.b + c.c, h = 0 - c.d - n.c.b, a = o.b + c.d + c.a - n.c.b, l = new X(), d = new X(), r = new E(e); r.a < r.c.c.length; ) { + switch (i = u(y(r), 10), t.g) { + case 1: + case 2: + case 3: + y8e(i); + break; + case 4: + g = u(k(i, C0), 8), p = g ? g.a : 0, i.n.a = f * K(Y(k(i, (G(), y0)))) - p, lT(i, !0, !1); + break; + case 5: + v = u(k(i, C0), 8), m = v ? v.a : 0, i.n.a = K(Y(k(i, (G(), y0)))) - m, lT(i, !0, !1), o.a = j.Math.max(o.a, i.n.a + i.o.a / 2); + } + switch (u(k(i, (G(), ec)), 61).g) { + case 1: + i.n.b = h, l.c[l.c.length] = i; + break; + case 3: + i.n.b = a, d.c[d.c.length] = i; + } + } + switch (t.g) { + case 1: + case 2: + RDn(l, n), RDn(d, n); + break; + case 3: + _Dn(l, n), _Dn(d, n); + } + } + function CEe(n, e) { + var t, i, r, c, o, f, h, l, a, d; + for (a = new X(), d = new gw(), c = null, r = 0, i = 0; i < e.length; ++i) + switch (t = e[i], qwe(c, t) && (r = RQ(n, d, a, dP, r)), ai(t, (G(), k0)) && (c = u(k(t, k0), 10)), t.k.g) { + case 0: + for (h = yz(v2(zr(t, (J(), Kn)), new UH())); V$(h); ) + o = u(XX(h), 11), n.d[o.p] = r++, a.c[a.c.length] = o; + for (r = RQ(n, d, a, dP, r), l = yz(v2(zr(t, ae), new UH())); V$(l); ) + o = u(XX(l), 11), n.d[o.p] = r++, a.c[a.c.length] = o; + break; + case 3: + zr(t, don).dc() || (o = u(zr(t, don).Xb(0), 11), n.d[o.p] = r++, a.c[a.c.length] = o), zr(t, dP).dc() || ll(d, t); + break; + case 1: + for (f = zr(t, (J(), Gn)).Kc(); f.Ob(); ) + o = u(f.Pb(), 11), n.d[o.p] = r++, a.c[a.c.length] = o; + zr(t, Vn).Jc(new Q7n(d, t)); + } + return RQ(n, d, a, dP, r), a; + } + function VRn(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $; + for (l = Lt, a = Lt, f = Vt, h = Vt, g = new E(e.i); g.a < g.c.c.length; ) + d = u(y(g), 65), r = u(u(te(n.g, d.a), 46).b, 33), Jo(r, d.b.c, d.b.d), l = j.Math.min(l, r.i), a = j.Math.min(a, r.j), f = j.Math.max(f, r.i + r.g), h = j.Math.max(h, r.j + r.f); + for (p = u(hn(n.c, (S7(), hZn)), 116), i0(n.c, f - l + (p.b + p.c), h - a + (p.d + p.a), !0, !0), zJ(n.c, -l + p.b, -a + p.d), i = new ie(CTn(n.c)); i.e != i.i.gc(); ) + t = u(oe(i), 79), o = ng(t, !0, !0), v = fh(t), C = ml(t), m = new fn(v.i + v.g / 2, v.j + v.f / 2), c = new fn(C.i + C.g / 2, C.j + C.f / 2), S = ji(new fn(c.a, c.b), m), u4(S, v.g, v.f), st(m, S), $ = ji(new fn(m.a, m.b), c), u4($, C.g, C.f), st(c, $), uE(o, m.a, m.b), cE(o, c.a, c.b); + } + function TEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + if (n.c = n.d, v = sn(k(e, (nn(), xQn))), p = v == null || (_n(v), v), c = u(k(e, (G(), Ac)), 21).Hc((fr(), $s)), r = u(k(e, Bt), 98), t = !(r == (Ai(), id) || r == jh || r == Sc), p && (t || !c)) { + for (d = new E(e.a); d.a < d.c.c.length; ) + l = u(y(d), 10), l.p = 0; + for (g = new X(), a = new E(e.a); a.a < a.c.c.length; ) + if (l = u(y(a), 10), i = qBn(n, l, null), i) { + for (h = new lV(), Pr(h, e), H(h, zb, u(i.b, 21)), GW(h.d, e.d), H(h, hv, null), f = u(i.a, 15).Kc(); f.Ob(); ) + o = u(f.Pb(), 10), W(h.a, o), o.a = h; + g.Fc(h); + } + c && (B(k(e, kp)) === B((Gd(), qR)) ? n.c = n.b : n.c = n.a); + } else + g = new Hu(A(M(OWn, 1), GKn, 37, 0, [e])); + return B(k(e, kp)) !== B((Gd(), yg)) && (Pn(), g.ad(new Lan())), g; + } + function QRn(n) { + gd(n, new Oa(kG(vj(ad(fd(ld(hd(new na(), M1), "ELK Mr. Tree"), "Tree-based algorithm provided by the Eclipse Layout Kernel. Computes a spanning tree of the input graph and arranges all nodes according to the resulting parent-children hierarchy. I pity the fool who doesn't use Mr. Tree Layout."), new Mgn()), IHn), Cn((a4(), hH))))), Z(n, M1, s0, jon), Z(n, M1, $b, 20), Z(n, M1, ep, D4), Z(n, M1, hk, Q(1)), Z(n, M1, q6, (qn(), !0)), Z(n, M1, mk, cn(kon)), Z(n, M1, hg, cn(tYn)), Z(n, M1, ip, cn(iYn)), Z(n, M1, tp, cn(rYn)), Z(n, M1, $4, cn(eYn)), Z(n, M1, G6, cn(yon)), Z(n, M1, F4, cn(uYn)), Z(n, M1, Zen, cn(oYn)), Z(n, M1, ntn, cn(Eon)); + } + function MEe(n) { + n.q || (n.q = !0, n.p = Yr(n, 0), n.a = Yr(n, 1), bt(n.a, 0), n.f = Yr(n, 2), bt(n.f, 1), It(n.f, 2), n.n = Yr(n, 3), It(n.n, 3), It(n.n, 4), It(n.n, 5), It(n.n, 6), n.g = Yr(n, 4), bt(n.g, 7), It(n.g, 8), n.c = Yr(n, 5), bt(n.c, 7), bt(n.c, 8), n.i = Yr(n, 6), bt(n.i, 9), bt(n.i, 10), bt(n.i, 11), bt(n.i, 12), It(n.i, 13), n.j = Yr(n, 7), bt(n.j, 9), n.d = Yr(n, 8), bt(n.d, 3), bt(n.d, 4), bt(n.d, 5), bt(n.d, 6), It(n.d, 7), It(n.d, 8), It(n.d, 9), It(n.d, 10), n.b = Yr(n, 9), It(n.b, 0), It(n.b, 1), n.e = Yr(n, 10), It(n.e, 1), It(n.e, 2), It(n.e, 3), It(n.e, 4), bt(n.e, 5), bt(n.e, 6), bt(n.e, 7), bt(n.e, 8), bt(n.e, 9), bt(n.e, 10), It(n.e, 11), n.k = Yr(n, 11), It(n.k, 0), It(n.k, 1), n.o = ze(n, 12), n.s = ze(n, 13)); + } + function xZ(n, e) { + e.dc() && eh(n.j, !0, !0, !0, !0), tt(e, (J(), Do)) && eh(n.j, !0, !0, !0, !1), tt(e, Fs) && eh(n.j, !1, !0, !0, !0), tt(e, bs) && eh(n.j, !0, !0, !1, !0), tt(e, to) && eh(n.j, !0, !1, !0, !0), tt(e, Su) && eh(n.j, !1, !0, !0, !1), tt(e, xs) && eh(n.j, !1, !0, !1, !0), tt(e, ws) && eh(n.j, !0, !1, !1, !0), tt(e, $o) && eh(n.j, !0, !1, !0, !1), tt(e, cu) && eh(n.j, !0, !0, !0, !0), tt(e, qc) && eh(n.j, !0, !0, !0, !0), tt(e, cu) && eh(n.j, !0, !0, !0, !0), tt(e, ru) && eh(n.j, !0, !0, !0, !0), tt(e, uu) && eh(n.j, !0, !0, !0, !0), tt(e, Pu) && eh(n.j, !0, !0, !0, !0), tt(e, Pc) && eh(n.j, !0, !0, !0, !0); + } + function AEe(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C; + for (c = new X(), l = new E(i); l.a < l.c.c.length; ) + if (f = u(y(l), 441), o = null, f.f == (sr(), Lc)) + for (v = new E(f.e); v.a < v.c.c.length; ) + p = u(y(v), 17), C = p.d.i, qi(C) == e ? lIn(n, e, f, p, f.b, p.d) : !t || _3(C, t) ? s5e(n, e, f, i, p) : (g = dL(n, e, t, p, f.b, Lc, o), g != o && (c.c[c.c.length] = g), g.c && (o = g)); + else + for (d = new E(f.e); d.a < d.c.c.length; ) + if (a = u(y(d), 17), m = a.c.i, qi(m) == e) + lIn(n, e, f, a, a.c, f.b); + else { + if (!t || _3(m, t)) + continue; + g = dL(n, e, t, a, f.b, Au, o), g != o && (c.c[c.c.length] = g), g.c && (o = g); + } + for (h = new E(c); h.a < h.c.c.length; ) + f = u(y(h), 441), xr(e.a, f.a, 0) != -1 || W(e.a, f.a), f.c && (r.c[r.c.length] = f); + } + function SEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (l = new X(), h = new E(e.a); h.a < h.c.c.length; ) + for (o = u(y(h), 10), g = zr(o, (J(), Vn)).Kc(); g.Ob(); ) + for (d = u(g.Pb(), 11), r = new E(d.g); r.a < r.c.c.length; ) + i = u(y(r), 17), !(!Wi(i) && i.c.i.c == i.d.i.c || Wi(i) || i.d.i.c != t) && (l.c[l.c.length] = i); + for (f = ma(t.a).Kc(); f.Ob(); ) + for (o = u(f.Pb(), 10), g = zr(o, (J(), Gn)).Kc(); g.Ob(); ) + for (d = u(g.Pb(), 11), r = new E(d.e); r.a < r.c.c.length; ) + if (i = u(y(r), 17), !(!Wi(i) && i.c.i.c == i.d.i.c || Wi(i) || i.c.i.c != e)) { + for (a = new Ii(l, l.c.length), c = (ne(a.b > 0), u(a.a.Xb(a.c = --a.b), 17)); c != i && a.b > 0; ) + n.a[c.p] = !0, n.a[i.p] = !0, c = (ne(a.b > 0), u(a.a.Xb(a.c = --a.b), 17)); + a.b > 0 && Wu(a); + } + } + function JRn(n, e, t) { + var i, r, c, o, f, h, l, a, d; + if (n.a != e.Aj()) + throw T(new Hn(B4 + e.ne() + l0)); + if (i = g1((wu(), xi), e).$k(), i) + return i.Aj().Nh().Ih(i, t); + if (o = g1(xi, e).al(), o) { + if (t == null) + return null; + if (f = u(t, 15), f.dc()) + return ""; + for (d = new r1(), c = f.Kc(); c.Ob(); ) + r = c.Pb(), br(d, o.Aj().Nh().Ih(o, r)), d.a += " "; + return NO(d, d.a.length - 1); + } + if (a = g1(xi, e).bl(), !a.dc()) { + for (l = a.Kc(); l.Ob(); ) + if (h = u(l.Pb(), 148), h.wj(t)) + try { + if (d = h.Aj().Nh().Ih(h, t), d != null) + return d; + } catch (g) { + if (g = Et(g), !I(g, 102)) + throw T(g); + } + throw T(new Hn("Invalid value: '" + t + "' for datatype :" + e.ne())); + } + return u(e, 834).Fj(), t == null ? null : I(t, 172) ? "" + u(t, 172).a : Du(t) == HA ? Tyn(l9[0], u(t, 199)) : Nr(t); + } + function PEe(n) { + var e, t, i, r, c, o, f, h, l, a; + for (l = new Tt(), f = new Tt(), c = new E(n); c.a < c.c.c.length; ) + i = u(y(c), 128), i.v = 0, i.n = i.i.c.length, i.u = i.t.c.length, i.n == 0 && Ht(l, i, l.c.b, l.c), i.u == 0 && i.r.a.gc() == 0 && Ht(f, i, f.c.b, f.c); + for (o = -1; l.b != 0; ) + for (i = u(hx(l, 0), 128), t = new E(i.t); t.a < t.c.c.length; ) + e = u(y(t), 268), a = e.b, a.v = j.Math.max(a.v, i.v + 1), o = j.Math.max(o, a.v), --a.n, a.n == 0 && Ht(l, a, l.c.b, l.c); + if (o > -1) { + for (r = _e(f, 0); r.b != r.d.c; ) + i = u(Re(r), 128), i.v = o; + for (; f.b != 0; ) + for (i = u(hx(f, 0), 128), t = new E(i.i); t.a < t.c.c.length; ) + e = u(y(t), 268), h = e.a, h.r.a.gc() == 0 && (h.v = j.Math.min(h.v, i.v - 1), --h.u, h.u == 0 && Ht(f, h, f.c.b, f.c)); + } + } + function YRn(n, e, t, i, r) { + var c, o, f, h; + return h = Lt, o = !1, f = TZ(n, ji(new fn(e.a, e.b), n), st(new fn(t.a, t.b), r), ji(new fn(i.a, i.b), t)), c = !!f && !(j.Math.abs(f.a - n.a) <= f0 && j.Math.abs(f.b - n.b) <= f0 || j.Math.abs(f.a - e.a) <= f0 && j.Math.abs(f.b - e.b) <= f0), f = TZ(n, ji(new fn(e.a, e.b), n), t, r), f && ((j.Math.abs(f.a - n.a) <= f0 && j.Math.abs(f.b - n.b) <= f0) == (j.Math.abs(f.a - e.a) <= f0 && j.Math.abs(f.b - e.b) <= f0) || c ? h = j.Math.min(h, L5(ji(f, t))) : o = !0), f = TZ(n, ji(new fn(e.a, e.b), n), i, r), f && (o || (j.Math.abs(f.a - n.a) <= f0 && j.Math.abs(f.b - n.b) <= f0) == (j.Math.abs(f.a - e.a) <= f0 && j.Math.abs(f.b - e.b) <= f0) || c) && (h = j.Math.min(h, L5(ji(f, i)))), h; + } + function ZRn(n) { + gd(n, new Oa(vj(ad(fd(ld(hd(new na(), Ml), HKn), "Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."), new man()), fs))), Z(n, Ml, lk, cn(Brn)), Z(n, Ml, qM, (qn(), !0)), Z(n, Ml, hg, cn(hWn)), Z(n, Ml, ip, cn(lWn)), Z(n, Ml, tp, cn(aWn)), Z(n, Ml, $4, cn(fWn)), Z(n, Ml, G6, cn(_rn)), Z(n, Ml, F4, cn(dWn)), Z(n, Ml, Snn, cn(Nrn)), Z(n, Ml, Inn, cn(xrn)), Z(n, Ml, Onn, cn(Lrn)), Z(n, Ml, Dnn, cn(Rrn)), Z(n, Ml, Pnn, cn(uS)); + } + function IEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + for (le(e, "Interactive crossing minimization", 1), o = 0, c = new E(n.b); c.a < c.c.c.length; ) + i = u(y(c), 29), i.p = o++; + for (g = LJ(n), C = new yG(g.length), ARn(new Hu(A(M(VWn, 1), rn, 225, 0, [C])), g), m = 0, o = 0, r = new E(n.b); r.a < r.c.c.length; ) { + for (i = u(y(r), 29), t = 0, d = 0, a = new E(i.a); a.a < a.c.c.length; ) + for (h = u(y(a), 10), h.n.a > 0 && (t += h.n.a + h.o.a / 2, ++d), v = new E(h.j); v.a < v.c.c.length; ) + p = u(y(v), 11), p.p = m++; + for (d > 0 && (t /= d), S = F(Ci, vr, 25, i.a.c.length, 15, 1), f = 0, l = new E(i.a); l.a < l.c.c.length; ) + h = u(y(l), 10), h.p = f++, S[h.p] = vEe(h, t), h.k == (Qn(), pi) && H(h, (G(), pun), S[h.p]); + Pn(), wi(i.a, new o6n(S)), NBn(C, g, o, !0), ++o; + } + ce(e); + } + function F6(n, e) { + var t, i, r, c, o, f, h, l, a; + if (e.e == 5) { + zRn(n, e); + return; + } + if (l = e, !(l.b == null || n.b == null)) { + for (Jw(n), D6(n), Jw(l), D6(l), t = F(be, Le, 25, n.b.length + l.b.length, 15, 1), a = 0, i = 0, o = 0; i < n.b.length && o < l.b.length; ) + if (r = n.b[i], c = n.b[i + 1], f = l.b[o], h = l.b[o + 1], c < f) + t[a++] = n.b[i++], t[a++] = n.b[i++]; + else if (c >= f && r <= h) + f <= r && c <= h ? i += 2 : f <= r ? (n.b[i] = h + 1, o += 2) : c <= h ? (t[a++] = r, t[a++] = f - 1, i += 2) : (t[a++] = r, t[a++] = f - 1, n.b[i] = h + 1, o += 2); + else if (h < r) + o += 2; + else + throw T(new _r("Token#subtractRanges(): Internal Error: [" + n.b[i] + "," + n.b[i + 1] + "] - [" + l.b[o] + "," + l.b[o + 1] + "]")); + for (; i < n.b.length; ) + t[a++] = n.b[i++], t[a++] = n.b[i++]; + n.b = F(be, Le, 25, a, 15, 1), pc(t, 0, n.b, 0, a); + } + } + function OEe(n) { + var e, t, i, r, c, o, f; + if (!n.A.dc()) { + if (n.A.Hc((Qu(), Ay)) && (u(wr(n.b, (J(), Kn)), 124).k = !0, u(wr(n.b, ae), 124).k = !0, e = n.q != (Ai(), jh) && n.q != Sc, fq(u(wr(n.b, Vn), 124), e), fq(u(wr(n.b, Gn), 124), e), fq(n.g, e), n.A.Hc(rd) && (u(wr(n.b, Kn), 124).j = !0, u(wr(n.b, ae), 124).j = !0, u(wr(n.b, Vn), 124).k = !0, u(wr(n.b, Gn), 124).k = !0, n.g.k = !0)), n.A.Hc(My)) + for (n.a.j = !0, n.a.k = !0, n.g.j = !0, n.g.k = !0, f = n.B.Hc((xu(), f9)), r = qF(), c = 0, o = r.length; c < o; ++c) + i = r[c], t = u(wr(n.i, i), 306), t && (GQ(i) ? (t.j = !0, t.k = !0) : (t.j = !f, t.k = !f)); + n.A.Hc(sw) && n.B.Hc((xu(), Py)) && (n.g.j = !0, n.g.j = !0, n.a.j || (n.a.j = !0, n.a.k = !0, n.a.e = !0)); + } + } + function DEe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + for (i = new E(n.e.b); i.a < i.c.c.length; ) + for (t = u(y(i), 29), c = new E(t.a); c.a < c.c.c.length; ) + if (r = u(y(c), 10), p = n.i[r.p], l = p.a.e, h = p.d.e, r.n.b = l, S = h - l - r.o.b, e = lL(r), g = (gb(), (r.q ? r.q : (Pn(), Pn(), ph))._b((nn(), E0)) ? d = u(k(r, E0), 197) : d = u(k(qi(r), $m), 197), d), e && (g == xg || g == Fg) && (r.o.b += S), e && (g == Y_ || g == xg || g == Fg)) { + for (m = new E(r.j); m.a < m.c.c.length; ) + v = u(y(m), 11), (J(), qc).Hc(v.j) && (a = u(te(n.k, v), 121), v.n.b = a.e - l); + for (f = new E(r.b); f.a < f.c.c.length; ) + o = u(y(f), 70), C = u(k(r, j0), 21), C.Hc((Eb(), eo)) ? o.n.b += S : C.Hc(yh) && (o.n.b += S / 2); + (g == xg || g == Fg) && zr(r, (J(), ae)).Jc(new C6n(S)); + } + } + function n_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + if (!n.b) + return !1; + for (o = null, g = null, h = new I$(null, null), r = 1, h.a[1] = n.b, d = h; d.a[r]; ) + l = r, f = g, g = d, d = d.a[r], i = n.a.ue(e, d.d), r = i < 0 ? 0 : 1, i == 0 && (!t.c || vc(d.e, t.d)) && (o = d), !(d && d.b) && !R0(d.a[r]) && (R0(d.a[1 - r]) ? g = g.a[l] = eT(d, r) : R0(d.a[1 - r]) || (p = g.a[1 - l], p && (!R0(p.a[1 - l]) && !R0(p.a[l]) ? (g.b = !1, p.b = !0, d.b = !0) : (c = f.a[1] == g ? 1 : 0, R0(p.a[l]) ? f.a[c] = sAn(g, l) : R0(p.a[1 - l]) && (f.a[c] = eT(g, l)), d.b = f.a[c].b = !0, f.a[c].a[0].b = !1, f.a[c].a[1].b = !1)))); + return o && (t.b = !0, t.d = o.e, d != o && (a = new I$(d.d, d.e), Yve(n, h, o, a), g == o && (g = a)), g.a[g.a[1] == d ? 1 : 0] = d.a[d.a[0] ? 0 : 1], --n.c), n.b = h.a[1], n.b && (n.b.b = !1), t.b; + } + function $Ee(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + for (r = new E(n.a.a.b); r.a < r.c.c.length; ) + for (i = u(y(r), 57), h = i.c.Kc(); h.Ob(); ) + f = u(h.Pb(), 57), i.a != f.a && (tl(n.a.d) ? d = n.a.g.Oe(i, f) : d = n.a.g.Pe(i, f), c = i.b.a + i.d.b + d - f.b.a, c = j.Math.ceil(c), c = j.Math.max(0, c), YX(i, f) ? (o = yd(new ca(), n.d), l = Gt(j.Math.ceil(f.b.a - i.b.a)), e = l - (f.b.a - i.b.a), a = S2(i).a, t = i, a || (a = S2(f).a, e = -e, t = f), a && (t.b.a -= e, a.n.a -= e), jo(lo(ho(ao(fo(new Ns(), j.Math.max(0, l)), 1), o), n.c[i.a.d])), jo(lo(ho(ao(fo(new Ns(), j.Math.max(0, -l)), 1), o), n.c[f.a.d]))) : (g = 1, (I(i.g, 145) && I(f.g, 10) || I(f.g, 145) && I(i.g, 10)) && (g = 2), jo(lo(ho(ao(fo(new Ns(), Gt(c)), g), n.c[i.a.d]), n.c[f.a.d])))); + } + function e_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + if (t) + for (i = -1, a = new Ii(e, 0); a.b < a.d.gc(); ) { + if (f = (ne(a.b < a.d.gc()), u(a.d.Xb(a.c = a.b++), 10)), d = n.c[f.c.p][f.p].a, d == null) { + for (o = i + 1, c = new Ii(e, a.b); c.b < c.d.gc(); ) + if (g = jce(n, (ne(c.b < c.d.gc()), u(c.d.Xb(c.c = c.b++), 10))).a, g != null) { + o = (_n(g), g); + break; + } + d = (i + o) / 2, n.c[f.c.p][f.p].a = d, n.c[f.c.p][f.p].d = (_n(d), d), n.c[f.c.p][f.p].b = 1; + } + i = (_n(d), d); + } + else { + for (r = 0, l = new E(e); l.a < l.c.c.length; ) + f = u(y(l), 10), n.c[f.c.p][f.p].a != null && (r = j.Math.max(r, K(n.c[f.c.p][f.p].a))); + for (r += 2, h = new E(e); h.a < h.c.c.length; ) + f = u(y(h), 10), n.c[f.c.p][f.p].a == null && (d = Fu(n.i, 24) * uk * r - 1, n.c[f.c.p][f.p].a = d, n.c[f.c.p][f.p].d = d, n.c[f.c.p][f.p].b = 1); + } + } + function FEe() { + He(fw, new Epn()), He(Be, new Fpn()), He(ro, new zpn()), He(Qo, new Jpn()), He(wH, new Ypn()), He(iI, new Zpn()), He(e1, new n3n()), He(h9, new e3n()), He(Dy, new dpn()), He(fH, new bpn()), He(zl, new wpn()), He(co, new gpn()), He(Vo, new ppn()), He(I0, new vpn()), He(hw, new mpn()), He(su, new kpn()), He(ow, new ypn()), He(tc, new jpn()), He(dr, new Cpn()), He(Gc, new Tpn()), He(oi, new Mpn()), He(M(ku, 1), new Apn()), He(op, new Spn()), He(bm, new Ppn()), He(HA, new Ipn()), He(G1n, new Opn()), He(Si, new Dpn()), He(c1n, new $pn()), He(o1n, new xpn()), He(O1n, new Lpn()), He(rI, new Npn()), He(z4, new Bpn()), He(Ui, new Rpn()), He(fin, new _pn()), He(d0, new Kpn()), He(hin, new Hpn()), He(A1n, new qpn()), He(z1n, new Gpn()), He(b0, new Upn()), He(tn, new Wpn()), He(s1n, new Xpn()), He(U1n, new Vpn()); + } + function xEe(n, e, t) { + var i, r, c, o, f, h, l, a, d; + for (!t && (t = pwe(e.q.getTimezoneOffset())), r = (e.q.getTimezoneOffset() - t.a) * 6e4, f = new uU(Hi(eu(e.q.getTime()), r)), h = f, f.q.getTimezoneOffset() != e.q.getTimezoneOffset() && (r > 0 ? r -= 864e5 : r += 864e5, h = new uU(Hi(eu(e.q.getTime()), r))), a = new _0(), l = n.a.length, c = 0; c < l; ) + if (i = Di(n.a, c), i >= 97 && i <= 122 || i >= 65 && i <= 90) { + for (o = c + 1; o < l && Di(n.a, o) == i; ++o) + ; + PTe(a, i, o - c, f, h, t), c = o; + } else if (i == 39) { + if (++c, c < l && Di(n.a, c) == 39) { + a.a += "'", ++c; + continue; + } + for (d = !1; !d; ) { + for (o = c; o < l && Di(n.a, o) != 39; ) + ++o; + if (o >= l) + throw T(new Hn("Missing trailing '")); + o + 1 < l && Di(n.a, o + 1) == 39 ? ++o : d = !0, De(a, Zu(n.a, c, o)), c = o + 1; + } + } else + a.a += String.fromCharCode(i), ++c; + return a.a; + } + function LEe(n) { + var e, t, i, r, c, o, f, h; + for (e = null, i = new E(n); i.a < i.c.c.length; ) + t = u(y(i), 233), K(Zo(t.g, t.d[0]).a), t.b = null, t.e && t.e.gc() > 0 && t.c == 0 && (!e && (e = new X()), e.c[e.c.length] = t); + if (e) + for (; e.c.length != 0; ) { + if (t = u(l1(e, 0), 233), t.b && t.b.c.length > 0) { + for (c = (!t.b && (t.b = new X()), new E(t.b)); c.a < c.c.c.length; ) + if (r = u(y(c), 233), x9(Zo(r.g, r.d[0]).a) == x9(Zo(t.g, t.d[0]).a)) { + if (xr(n, r, 0) > xr(n, t, 0)) + return new Pi(r, t); + } else if (K(Zo(r.g, r.d[0]).a) > K(Zo(t.g, t.d[0]).a)) + return new Pi(r, t); + } + for (f = (!t.e && (t.e = new X()), t.e).Kc(); f.Ob(); ) + o = u(f.Pb(), 233), h = (!o.b && (o.b = new X()), o.b), ib(0, h.c.length), e5(h.c, 0, t), o.c == h.c.length && (e.c[e.c.length] = o); + } + return null; + } + function t_n(n, e) { + var t, i, r, c, o, f, h, l, a; + if (n == null) + return iu; + if (h = e.a.zc(n, e), h != null) + return "[...]"; + for (t = new ya(Qi, "[", "]"), r = n, c = 0, o = r.length; c < o; ++c) + i = r[c], i != null && Du(i).i & 4 ? Array.isArray(i) && (a = U8(i), !(a >= 14 && a <= 16)) ? e.a._b(i) ? (t.a ? De(t.a, t.b) : t.a = new Yu(t.d), g5(t.a, "[...]")) : (f = va(i), l = new S5(e), xh(t, t_n(f, l))) : I(i, 177) ? xh(t, M6e(u(i, 177))) : I(i, 190) ? xh(t, wve(u(i, 190))) : I(i, 195) ? xh(t, T5e(u(i, 195))) : I(i, 2012) ? xh(t, gve(u(i, 2012))) : I(i, 48) ? xh(t, T6e(u(i, 48))) : I(i, 364) ? xh(t, R6e(u(i, 364))) : I(i, 832) ? xh(t, C6e(u(i, 832))) : I(i, 104) && xh(t, E6e(u(i, 104))) : xh(t, i == null ? iu : Nr(i)); + return t.a ? t.e.length == 0 ? t.a.a : t.a.a + ("" + t.e) : t.c; + } + function i_n(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (f = ng(e, !1, !1), S = I7(f), i && (S = o7(S)), O = K(Y(hn(e, (a6(), IR)))), C = (ne(S.b != 0), u(S.a.a.c, 8)), d = u(qo(S, 1), 8), S.b > 2 ? (a = new X(), Zt(a, new ch(S, 1, S.b)), c = L_n(a, O + n.a), $ = new xx(c), Pr($, e), t.c[t.c.length] = $) : i ? $ = u(te(n.b, fh(e)), 266) : $ = u(te(n.b, ml(e)), 266), h = fh(e), i && (h = ml(e)), o = z5e(C, h), l = O + n.a, o.a ? (l += j.Math.abs(C.b - d.b), m = new fn(d.a, (d.b + C.b) / 2)) : (l += j.Math.abs(C.a - d.a), m = new fn((d.a + C.a) / 2, d.b)), i ? it(n.d, e, new cJ($, o, m, l)) : it(n.c, e, new cJ($, o, m, l)), it(n.b, e, $), v = (!e.n && (e.n = new V(Rr, e, 1, 7)), e.n), p = new ie(v); p.e != p.i.gc(); ) + g = u(oe(p), 137), r = K7(n, g, !0, 0, 0), t.c[t.c.length] = r; + } + function NEe(n) { + var e, t, i, r, c, o, f, h, l, a; + for (l = new X(), f = new X(), o = new E(n); o.a < o.c.c.length; ) + r = u(y(o), 112), II(r, r.f.c.length), ej(r, r.k.c.length), r.d == 0 && (l.c[l.c.length] = r), r.i == 0 && r.e.b == 0 && (f.c[f.c.length] = r); + for (i = -1; l.c.length != 0; ) + for (r = u(l1(l, 0), 112), t = new E(r.k); t.a < t.c.c.length; ) + e = u(y(t), 129), a = e.b, aq(a, j.Math.max(a.o, r.o + 1)), i = j.Math.max(i, a.o), II(a, a.d - 1), a.d == 0 && (l.c[l.c.length] = a); + if (i > -1) { + for (c = new E(f); c.a < c.c.c.length; ) + r = u(y(c), 112), r.o = i; + for (; f.c.length != 0; ) + for (r = u(l1(f, 0), 112), t = new E(r.f); t.a < t.c.c.length; ) + e = u(y(t), 129), h = e.a, !(h.e.b > 0) && (aq(h, j.Math.min(h.o, r.o - 1)), ej(h, h.i - 1), h.i == 0 && (f.c[f.c.length] = h)); + } + } + function y4(n, e, t) { + var i, r, c, o, f, h, l; + if (l = n.c, !e && (e = p1n), n.c = e, n.Db & 4 && !(n.Db & 1) && (h = new gi(n, 1, 2, l, n.c), t ? t.Ei(h) : t = h), l != e) { + if (I(n.Cb, 284)) + n.Db >> 16 == -10 ? t = u(n.Cb, 284).nk(e, t) : n.Db >> 16 == -15 && (!e && (e = (Sn(), Cf)), !l && (l = (Sn(), Cf)), n.Cb.nh() && (h = new Lh(n.Cb, 1, 13, l, e, m1(Ou(u(n.Cb, 59)), n), !1), t ? t.Ei(h) : t = h)); + else if (I(n.Cb, 88)) + n.Db >> 16 == -23 && (I(e, 88) || (e = (Sn(), so)), I(l, 88) || (l = (Sn(), so)), n.Cb.nh() && (h = new Lh(n.Cb, 1, 10, l, e, m1(wc(u(n.Cb, 26)), n), !1), t ? t.Ei(h) : t = h)); + else if (I(n.Cb, 444)) + for (f = u(n.Cb, 836), o = (!f.b && (f.b = new sj(new KI())), f.b), c = (i = new Ca(new ia(o.a).a), new oj(i)); c.a.b; ) + r = u(Bd(c.a).cd(), 87), t = y4(r, uM(r, f), t); + } + return t; + } + function BEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (o = on(sn(hn(n, (nn(), Jb)))), g = u(hn(n, Zb), 21), h = !1, l = !1, d = new ie((!n.c && (n.c = new V(Ru, n, 9, 9)), n.c)); d.e != d.i.gc() && (!h || !l); ) { + for (c = u(oe(d), 118), f = 0, r = ul(of(A(M(gf, 1), rn, 20, 0, [(!c.d && (c.d = new Fn(bi, c, 8, 5)), c.d), (!c.e && (c.e = new Fn(bi, c, 7, 4)), c.e)]))); Se(r) && (i = u(ve(r), 79), a = o && Yd(i) && on(sn(hn(i, Xa))), t = FRn((!i.b && (i.b = new Fn(he, i, 4, 7)), i.b), c) ? n == Pt(Ir(u(D((!i.c && (i.c = new Fn(he, i, 5, 8)), i.c), 0), 82))) : n == Pt(Ir(u(D((!i.b && (i.b = new Fn(he, i, 4, 7)), i.b), 0), 82))), !((a || t) && (++f, f > 1))); ) + ; + (f > 0 || g.Hc((Tu(), n1)) && (!c.n && (c.n = new V(Rr, c, 1, 7)), c.n).i > 0) && (h = !0), f > 1 && (l = !0); + } + h && e.Fc((fr(), $s)), l && e.Fc((fr(), Tm)); + } + function r_n(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + if (g = u(hn(n, (Xe(), nd)), 21), g.dc()) + return null; + if (f = 0, o = 0, g.Hc((Qu(), Ay))) { + for (a = u(hn(n, n9), 98), i = 2, t = 2, r = 2, c = 2, e = Pt(n) ? u(hn(Pt(n), S0), 103) : u(hn(n, S0), 103), l = new ie((!n.c && (n.c = new V(Ru, n, 9, 9)), n.c)); l.e != l.i.gc(); ) + if (h = u(oe(l), 118), d = u(hn(h, Hg), 61), d == (J(), Xr) && (d = mZ(h, e), pr(h, Hg, d)), a == (Ai(), Sc)) + switch (d.g) { + case 1: + i = j.Math.max(i, h.i + h.g); + break; + case 2: + t = j.Math.max(t, h.j + h.f); + break; + case 3: + r = j.Math.max(r, h.i + h.g); + break; + case 4: + c = j.Math.max(c, h.j + h.f); + } + else + switch (d.g) { + case 1: + i += h.g + 2; + break; + case 2: + t += h.f + 2; + break; + case 3: + r += h.g + 2; + break; + case 4: + c += h.f + 2; + } + f = j.Math.max(i, r), o = j.Math.max(t, c); + } + return i0(n, f, o, !0, !0); + } + function pL(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + for ($ = u(ts(qC(pt(new $n(null, new xn(e.d, 16)), new Q5n(t)), new J5n(t)), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)]))), 15), d = nt, a = Bi, h = new E(e.b.j); h.a < h.c.c.length; ) + f = u(y(h), 11), f.j == t && (d = j.Math.min(d, f.p), a = j.Math.max(a, f.p)); + if (d == nt) + for (o = 0; o < $.gc(); o++) + GX(u($.Xb(o), 101), t, o); + else + for (O = F(be, Le, 25, r.length, 15, 1), Sfe(O, O.length), S = $.Kc(); S.Ob(); ) { + for (C = u(S.Pb(), 101), c = u(te(n.b, C), 177), l = 0, m = d; m <= a; m++) + c[m] && (l = j.Math.max(l, i[m])); + if (C.i) { + for (p = C.i.c, x = new hi(), g = 0; g < r.length; g++) + r[p][g] && ci(x, Q(O[g])); + for (; Ah(x, Q(l)); ) + ++l; + } + for (GX(C, t, l), v = d; v <= a; v++) + c[v] && (i[v] = l + 1); + C.i && (O[C.i.c] = l); + } + } + function REe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (r = null, i = new E(e.a); i.a < i.c.c.length; ) + t = u(y(i), 10), lL(t) ? c = (f = yd(K9(new ca(), t), n.f), h = yd(K9(new ca(), t), n.f), l = new qW(t, !0, f, h), a = t.o.b, d = (gb(), (t.q ? t.q : (Pn(), Pn(), ph))._b((nn(), E0)) ? g = u(k(t, E0), 197) : g = u(k(qi(t), $m), 197), g), p = 1e4, d == Fg && (p = 1), v = jo(lo(ho(fo(ao(new Ns(), p), Gt(j.Math.ceil(a))), f), h)), d == xg && ci(n.d, v), HBn(n, ma(zr(t, (J(), Gn))), l), HBn(n, zr(t, Vn), l), l) : c = (m = yd(K9(new ca(), t), n.f), _t(pt(new $n(null, new xn(t.j, 16)), new $wn()), new Y7n(n, m)), new qW(t, !1, m, m)), n.i[t.p] = c, r && (o = r.c.d.a + Mw(n.n, r.c, t) + t.d.d, r.b || (o += r.c.o.b), jo(lo(ho(ao(fo(new Ns(), Gt(j.Math.ceil(o))), 0), r.d), c.a))), r = c; + } + function _Ee(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (le(e, "Label dummy insertions", 1), d = new X(), o = K(Y(k(n, (nn(), jp)))), l = K(Y(k(n, ew))), a = u(k(n, as), 103), p = new E(n.a); p.a < p.c.c.length; ) + for (g = u(y(p), 10), c = new re(ue(ei(g).a.Kc(), new Mn())); Se(c); ) + if (r = u(ve(c), 17), r.c.i != r.d.i && qO(r.b, _Wn)) { + for (m = D0e(r), v = nh(r.b.c.length), t = A9e(n, r, m, v), d.c[d.c.length] = t, i = t.o, f = new Ii(r.b, 0); f.b < f.d.gc(); ) + h = (ne(f.b < f.d.gc()), u(f.d.Xb(f.c = f.b++), 70)), B(k(h, Jf)) === B((sf(), yv)) && (a == (or(), Yh) || a == Jh ? (i.a += h.o.a + l, i.b = j.Math.max(i.b, h.o.b)) : (i.a = j.Math.max(i.a, h.o.a), i.b += h.o.b + l), v.c[v.c.length] = h, Wu(f)); + a == (or(), Yh) || a == Jh ? (i.a -= l, i.b += o + m) : i.b += o - l + m; + } + Zt(n.a, d), ce(e); + } + function KEe(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p; + for (c = new PLn(e), d = P7e(n, e, c), p = j.Math.max(K(Y(k(e, (nn(), P1)))), 1), a = new E(d.a); a.a < a.c.c.length; ) + l = u(y(a), 46), h = N$n(u(l.a, 8), u(l.b, 8), p), Dt = !0, Dt = Dt & Ed(t, new fn(h.c, h.d)), Dt = Dt & Ed(t, W0(new fn(h.c, h.d), h.b, 0)), Dt = Dt & Ed(t, W0(new fn(h.c, h.d), 0, h.a)), Dt & Ed(t, W0(new fn(h.c, h.d), h.b, h.a)); + switch (g = c.d, f = N$n(u(d.b.a, 8), u(d.b.b, 8), p), g == (J(), Gn) || g == Vn ? (i.c[g.g] = j.Math.min(i.c[g.g], f.d), i.b[g.g] = j.Math.max(i.b[g.g], f.d + f.a)) : (i.c[g.g] = j.Math.min(i.c[g.g], f.c), i.b[g.g] = j.Math.max(i.b[g.g], f.c + f.b)), r = Vt, o = c.c.i.d, g.g) { + case 4: + r = o.c; + break; + case 2: + r = o.b; + break; + case 1: + r = o.a; + break; + case 3: + r = o.d; + } + return i.a[g.g] = j.Math.max(i.a[g.g], r), c; + } + function HEe(n) { + var e, t, i, r; + if (t = n.D != null ? n.D : n.B, e = Pf(t, tu(91)), e != -1) { + i = t.substr(0, e), r = new r1(); + do + r.a += "["; + while ((e = c3(t, 91, ++e)) != -1); + An(i, X2) ? r.a += "Z" : An(i, cm) ? r.a += "B" : An(i, EA) ? r.a += "C" : An(i, um) ? r.a += "D" : An(i, sm) ? r.a += "F" : An(i, om) ? r.a += "I" : An(i, fm) ? r.a += "J" : An(i, hm) ? r.a += "S" : (r.a += "L", r.a += "" + i, r.a += ";"); + try { + return null; + } catch (c) { + if (c = Et(c), !I(c, 60)) + throw T(c); + } + } else if (Pf(t, tu(46)) == -1) { + if (An(t, X2)) + return _u; + if (An(t, cm)) + return ku; + if (An(t, EA)) + return Ls; + if (An(t, um)) + return Ci; + if (An(t, sm)) + return bw; + if (An(t, om)) + return be; + if (An(t, fm)) + return Yl; + if (An(t, hm)) + return Wg; + } + return null; + } + function c_n(n, e, t) { + var i, r, c, o, f, h, l, a; + for (l = new qh(t), Pr(l, e), H(l, (G(), rt), e), l.o.a = e.g, l.o.b = e.f, l.n.a = e.i, l.n.b = e.j, W(t.a, l), it(n.a, e, l), ((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a).i != 0 || on(sn(hn(e, (nn(), Jb))))) && H(l, lun, (qn(), !0)), h = u(k(t, Ac), 21), a = u(k(l, (nn(), Bt)), 98), a == (Ai(), ql) ? H(l, Bt, jf) : a != jf && h.Fc((fr(), sv)), i = u(k(t, as), 103), f = new ie((!e.c && (e.c = new V(Ru, e, 9, 9)), e.c)); f.e != f.i.gc(); ) + o = u(oe(f), 118), on(sn(hn(o, Qa))) || pCe(n, o, l, h, i, a); + for (c = new ie((!e.n && (e.n = new V(Rr, e, 1, 7)), e.n)); c.e != c.i.gc(); ) + r = u(oe(c), 137), !on(sn(hn(r, Qa))) && r.a && W(l.b, EF(r)); + return on(sn(k(l, Im))) && h.Fc((fr(), NS)), on(sn(k(l, YS))) && (h.Fc((fr(), BS)), h.Fc(Tm), H(l, Bt, jf)), l; + } + function qEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn; + f = u(te(e.c, n), 459), $ = e.a.c, h = e.a.c + e.a.b, wn = f.f, zn = f.a, o = wn < zn, m = new fn($, wn), O = new fn(h, zn), r = ($ + h) / 2, C = new fn(r, wn), x = new fn(r, zn), c = n8e(n, wn, zn), U = tf(e.B), en = new fn(r, c), ln = tf(e.D), t = Ewe(A(M(di, 1), q, 8, 0, [U, en, ln])), p = !1, S = e.B.i, S && S.c && f.d && (l = o && S.p < S.c.a.c.length - 1 || !o && S.p > 0, l ? l && (g = S.p, o ? ++g : --g, d = u(un(S.c.a, g), 10), i = VOn(d), p = !(Kx(i, U, t[0]) || ACn(i, U, t[0]))) : p = !0), v = !1, _ = e.D.i, _ && _.c && f.e && (a = o && _.p > 0 || !o && _.p < _.c.a.c.length - 1, a ? (g = _.p, o ? --g : ++g, d = u(un(_.c.a, g), 10), i = VOn(d), v = !(Kx(i, t[0], ln) || ACn(i, t[0], ln))) : v = !0), p && v && Ke(n.a, en), p || V5(n.a, A(M(di, 1), q, 8, 0, [m, C])), v || V5(n.a, A(M(di, 1), q, 8, 0, [x, O])); + } + function CM(n, e) { + var t, i, r, c, o, f, h, l; + if (I(n.Ug(), 160) ? (CM(u(n.Ug(), 160), e), e.a += " > ") : e.a += "Root ", t = n.Tg().zb, An(t.substr(0, 3), "Elk") ? De(e, t.substr(3)) : e.a += "" + t, r = n.zg(), r) { + De((e.a += " ", e), r); + return; + } + if (I(n, 354) && (l = u(n, 137).a, l)) { + De((e.a += " ", e), l); + return; + } + for (o = new ie(n.Ag()); o.e != o.i.gc(); ) + if (c = u(oe(o), 137), l = c.a, l) { + De((e.a += " ", e), l); + return; + } + if (I(n, 352) && (i = u(n, 79), !i.b && (i.b = new Fn(he, i, 4, 7)), i.b.i != 0 && (!i.c && (i.c = new Fn(he, i, 5, 8)), i.c.i != 0))) { + for (e.a += " (", f = new b2((!i.b && (i.b = new Fn(he, i, 4, 7)), i.b)); f.e != f.i.gc(); ) + f.e > 0 && (e.a += Qi), CM(u(oe(f), 160), e); + for (e.a += TN, h = new b2((!i.c && (i.c = new Fn(he, i, 5, 8)), i.c)); h.e != h.i.gc(); ) + h.e > 0 && (e.a += Qi), CM(u(oe(h), 160), e); + e.a += ")"; + } + } + function GEe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + if (c = u(k(n, (G(), rt)), 79), !!c) { + for (i = n.a, r = new kr(t), st(r, F4e(n)), _3(n.d.i, n.c.i) ? (g = n.c, d = Gr(A(M(di, 1), q, 8, 0, [g.n, g.a])), ji(d, t)) : d = tf(n.c), Ht(i, d, i.a, i.a.a), p = tf(n.d), k(n, I_) != null && st(p, u(k(n, I_), 8)), Ht(i, p, i.c.b, i.c), hb(i, r), o = ng(c, !0, !0), JC(o, u(D((!c.b && (c.b = new Fn(he, c, 4, 7)), c.b), 0), 82)), YC(o, u(D((!c.c && (c.c = new Fn(he, c, 5, 8)), c.c), 0), 82)), z7(i, o), a = new E(n.b); a.a < a.c.c.length; ) + l = u(y(a), 70), f = u(k(l, rt), 137), _d(f, l.o.a), Rd(f, l.o.b), Jo(f, l.n.a + r.a, l.n.b + r.b), pr(f, (x2(), VR), sn(k(l, VR))); + h = u(k(n, (nn(), Mr)), 74), h ? (hb(h, r), pr(c, Mr, h)) : pr(c, Mr, null), e == (Hh(), Sp) ? pr(c, Qh, Sp) : pr(c, Qh, null); + } + } + function zEe(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $; + for (p = e.c.length, g = 0, d = new E(n.b); d.a < d.c.c.length; ) + if (a = u(y(d), 29), S = a.a, S.c.length != 0) { + for (C = new E(S), l = 0, $ = null, r = u(y(C), 10), c = null; r; ) { + if (c = u(un(e, r.p), 257), c.c >= 0) { + for (h = null, f = new Ii(a.a, l + 1); f.b < f.d.gc() && (o = (ne(f.b < f.d.gc()), u(f.d.Xb(f.c = f.b++), 10)), h = u(un(e, o.p), 257), !(h.d == c.d && h.c < c.c)); ) + h = null; + h && ($ && (Es(i, r.p, Q(u(un(i, r.p), 19).a - 1)), u(un(t, $.p), 15).Mc(c)), c = Tve(c, r, p++), e.c[e.c.length] = c, W(t, new X()), $ ? (u(un(t, $.p), 15).Fc(c), W(i, Q(1))) : W(i, Q(0))); + } + v = null, C.a < C.c.c.length && (v = u(y(C), 10), m = u(un(e, v.p), 257), u(un(t, r.p), 15).Fc(m), Es(i, v.p, Q(u(un(i, v.p), 19).a + 1))), c.d = g, c.c = l++, $ = r, r = v; + } + ++g; + } + } + function vL(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + return h = n, a = ji(new fn(e.a, e.b), n), l = t, d = ji(new fn(i.a, i.b), t), g = h.a, C = h.b, v = l.a, $ = l.b, p = a.a, S = a.b, m = d.a, O = d.b, r = m * S - p * O, Yo(), mo(Gf), j.Math.abs(0 - r) <= Gf || r == 0 || isNaN(0) && isNaN(r) ? !1 : (o = 1 / r * ((g - v) * S - (C - $) * p), f = 1 / r * -(-(g - v) * O + (C - $) * m), c = (mo(Gf), (j.Math.abs(0 - o) <= Gf || o == 0 || isNaN(0) && isNaN(o) ? 0 : 0 < o ? -1 : 0 > o ? 1 : vd(isNaN(0), isNaN(o))) < 0 && (mo(Gf), (j.Math.abs(o - 1) <= Gf || o == 1 || isNaN(o) && isNaN(1) ? 0 : o < 1 ? -1 : o > 1 ? 1 : vd(isNaN(o), isNaN(1))) < 0) && (mo(Gf), (j.Math.abs(0 - f) <= Gf || f == 0 || isNaN(0) && isNaN(f) ? 0 : 0 < f ? -1 : 0 > f ? 1 : vd(isNaN(0), isNaN(f))) < 0) && (mo(Gf), (j.Math.abs(f - 1) <= Gf || f == 1 || isNaN(f) && isNaN(1) ? 0 : f < 1 ? -1 : f > 1 ? 1 : vd(isNaN(f), isNaN(1))) < 0)), c); + } + function UEe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + for (d = new NW(new Mq(n)); d.b != d.c.a.d; ) + for (a = fPn(d), f = u(a.d, 56), e = u(a.e, 56), o = f.Tg(), m = 0, x = (o.i == null && Lf(o), o.i).length; m < x; ++m) + if (l = (c = (o.i == null && Lf(o), o.i), m >= 0 && m < c.length ? c[m] : null), l.Ij() && !l.Jj()) { + if (I(l, 99)) + h = u(l, 18), !(h.Bb & uc) && (U = ir(h), !(U && U.Bb & uc)) && Dye(n, h, f, e); + else if (er(), u(l, 66).Oj() && (t = (_ = l, u(_ ? u(e, 49).xh(_) : null, 153)), t)) + for (p = u(f.ah(l), 153), i = t.gc(), C = 0, v = p.gc(); C < v; ++C) + if (g = p.il(C), I(g, 99)) { + if (O = p.jl(C), r = Ld(n, O), r == null && O != null) { + if ($ = u(g, 18), !n.b || $.Bb & uc || ir($)) + continue; + r = O; + } + if (!t.dl(g, r)) { + for (S = 0; S < i; ++S) + if (t.il(S) == g && B(t.jl(S)) === B(r)) { + t.ii(t.gc() - 1, S), --i; + break; + } + } + } else + t.dl(p.il(C), p.jl(C)); + } + } + function WEe(n, e, t, i, r, c, o) { + var f, h, l, a, d, g, p, v, m, C, S, $, O; + if (S = Jye(e, t, n.g), r.n && r.n && c && go(r, po(c), (Vu(), gs)), n.b) + for (C = 0; C < S.c.length; C++) + d = (Ln(C, S.c.length), u(S.c[C], 200)), C != 0 && (p = (Ln(C - 1, S.c.length), u(S.c[C - 1], 200)), EDn(d, p.f + p.b + n.g)), sTe(C, S, t, n.g), s4e(n, d), r.n && c && go(r, po(c), (Vu(), gs)); + else + for (m = new E(S); m.a < m.c.c.length; ) + for (v = u(y(m), 200), a = new E(v.a); a.a < a.c.c.length; ) + l = u(y(a), 187), $ = new YW(l.s, l.t, n.g), TV($, l), W(v.d, $); + return g3e(n, S), r.n && r.n && c && go(r, po(c), (Vu(), gs)), O = j.Math.max(n.d, i.a - (o.b + o.c)), g = j.Math.max(n.c, i.b - (o.d + o.a)), f = g - n.c, n.e && n.f && (h = O / g, h < n.a ? O = g * n.a : f += O / n.a - g), n.e && H2e(S, O, f), r.n && r.n && c && go(r, po(c), (Vu(), gs)), new bD(n.a, O, n.c + f, (w4(), Jm)); + } + function XEe(n) { + var e, t, i, r, c, o, f, h, l, a, d; + for (n.j = F(be, Le, 25, n.g, 15, 1), n.o = new X(), _t(qr(new $n(null, new xn(n.e.b, 16)), new _wn()), new T6n(n)), n.a = F(_u, wh, 25, n.b, 16, 1), d7(new $n(null, new xn(n.e.b, 16)), new A6n(n)), i = (d = new X(), _t(pt(qr(new $n(null, new xn(n.e.b, 16)), new Hwn()), new M6n(n)), new Z7n(n, d)), d), h = new E(i); h.a < h.c.c.length; ) + if (f = u(y(h), 508), !(f.c.length <= 1)) { + if (f.c.length == 2) { + _me(f), lL((Ln(0, f.c.length), u(f.c[0], 17)).d.i) || W(n.o, f); + continue; + } + if (!(ave(f) || e6e(f, new Kwn()))) + for (l = new E(f), r = null; l.a < l.c.c.length; ) + e = u(y(l), 17), t = n.c[e.p], !r || l.a >= l.c.c.length ? a = pX((Qn(), ii), pi) : a = pX((Qn(), pi), pi), a *= 2, c = t.a.g, t.a.g = j.Math.max(c, c + (a - c)), o = t.b.g, t.b.g = j.Math.max(o, o + (a - o)), r = e; + } + } + function VEe(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _; + for (_ = TEn(n), a = new X(), f = n.c.length, d = f - 1, g = f + 1; _.a.c != 0; ) { + for (; t.b != 0; ) + O = (ne(t.b != 0), u(Ts(t, t.a.a), 112)), R5(_.a, O) != null, O.g = d--, kZ(O, e, t, i); + for (; e.b != 0; ) + x = (ne(e.b != 0), u(Ts(e, e.a.a), 112)), R5(_.a, x) != null, x.g = g++, kZ(x, e, t, i); + for (l = Bi, S = (o = new T5(new j5(new P9(_.a).a).b), new I9(o)); G9(S.a.a); ) { + if (C = (c = pE(S.a), u(c.cd(), 112)), !i && C.b > 0 && C.a <= 0) { + a.c = F(Zn, rn, 1, 0, 5, 1), a.c[a.c.length] = C; + break; + } + m = C.i - C.d, m >= l && (m > l && (a.c = F(Zn, rn, 1, 0, 5, 1), l = m), a.c[a.c.length] = C); + } + a.c.length != 0 && (h = u(un(a, _T(r, a.c.length)), 112), R5(_.a, h) != null, h.g = g++, kZ(h, e, t, i), a.c = F(Zn, rn, 1, 0, 5, 1)); + } + for ($ = n.c.length + 1, v = new E(n); v.a < v.c.c.length; ) + p = u(y(v), 112), p.g < f && (p.g = p.g + $); + } + function TM(n, e) { + var t; + if (n.e) + throw T(new $r((Ph(kR), uN + kR.k + sN))); + if (!pre(n.a, e)) + throw T(new _r(pKn + e + vKn)); + if (e == n.d) + return n; + switch (t = n.d, n.d = e, t.g) { + case 0: + switch (e.g) { + case 2: + Qd(n); + break; + case 1: + gl(n), Qd(n); + break; + case 4: + Ww(n), Qd(n); + break; + case 3: + Ww(n), gl(n), Qd(n); + } + break; + case 2: + switch (e.g) { + case 1: + gl(n), Wx(n); + break; + case 4: + Ww(n), Qd(n); + break; + case 3: + Ww(n), gl(n), Qd(n); + } + break; + case 1: + switch (e.g) { + case 2: + gl(n), Wx(n); + break; + case 4: + gl(n), Ww(n), Qd(n); + break; + case 3: + gl(n), Ww(n), gl(n), Qd(n); + } + break; + case 4: + switch (e.g) { + case 2: + Ww(n), Qd(n); + break; + case 1: + Ww(n), gl(n), Qd(n); + break; + case 3: + gl(n), Wx(n); + } + break; + case 3: + switch (e.g) { + case 2: + gl(n), Ww(n), Qd(n); + break; + case 1: + gl(n), Ww(n), gl(n), Qd(n); + break; + case 4: + gl(n), Wx(n); + } + } + return n; + } + function cg(n, e) { + var t; + if (n.d) + throw T(new $r((Ph(HR), uN + HR.k + sN))); + if (!vre(n.a, e)) + throw T(new _r(pKn + e + vKn)); + if (e == n.c) + return n; + switch (t = n.c, n.c = e, t.g) { + case 0: + switch (e.g) { + case 2: + Ea(n); + break; + case 1: + wl(n), Ea(n); + break; + case 4: + Xw(n), Ea(n); + break; + case 3: + Xw(n), wl(n), Ea(n); + } + break; + case 2: + switch (e.g) { + case 1: + wl(n), Xx(n); + break; + case 4: + Xw(n), Ea(n); + break; + case 3: + Xw(n), wl(n), Ea(n); + } + break; + case 1: + switch (e.g) { + case 2: + wl(n), Xx(n); + break; + case 4: + wl(n), Xw(n), Ea(n); + break; + case 3: + wl(n), Xw(n), wl(n), Ea(n); + } + break; + case 4: + switch (e.g) { + case 2: + Xw(n), Ea(n); + break; + case 1: + Xw(n), wl(n), Ea(n); + break; + case 3: + wl(n), Xx(n); + } + break; + case 3: + switch (e.g) { + case 2: + wl(n), Xw(n), Ea(n); + break; + case 1: + wl(n), Xw(n), wl(n), Ea(n); + break; + case 4: + wl(n), Xx(n); + } + } + return n; + } + function QEe(n, e, t) { + var i, r, c, o, f, h, l, a; + for (h = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); h.e != h.i.gc(); ) + for (f = u(oe(h), 33), r = new re(ue(Gh(f).a.Kc(), new Mn())); Se(r); ) { + if (i = u(ve(r), 79), !i.b && (i.b = new Fn(he, i, 4, 7)), !(i.b.i <= 1 && (!i.c && (i.c = new Fn(he, i, 5, 8)), i.c.i <= 1))) + throw T(new Gv("Graph must not contain hyperedges.")); + if (!j6(i) && f != Ir(u(D((!i.c && (i.c = new Fn(he, i, 5, 8)), i.c), 0), 82))) + for (l = new Ljn(), Pr(l, i), H(l, (dl(), hp), i), rte(l, u(Vr(Sr(t.f, f)), 144)), cte(l, u(te(t, Ir(u(D((!i.c && (i.c = new Fn(he, i, 5, 8)), i.c), 0), 82))), 144)), W(e.c, l), o = new ie((!i.n && (i.n = new V(Rr, i, 1, 7)), i.n)); o.e != o.i.gc(); ) + c = u(oe(o), 137), a = new RAn(l, c.a), Pr(a, c), H(a, hp, c), a.e.a = j.Math.max(c.g, 1), a.e.b = j.Math.max(c.f, 1), EZ(a), W(e.d, a); + } + } + function JEe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (d = new NZ(n), V1e(d, !(e == (or(), Yh) || e == Jh)), a = d.a, g = new i2(), r = (_o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc])), o = 0, h = r.length; o < h; ++o) + t = r[o], l = GO(a, Zr, t), l && (g.d = j.Math.max(g.d, l.Re())); + for (i = A(M(Kb, 1), z, 232, 0, [Zr, xc, nc]), c = 0, f = i.length; c < f; ++c) + t = i[c], l = GO(a, nc, t), l && (g.a = j.Math.max(g.a, l.Re())); + for (m = A(M(Kb, 1), z, 232, 0, [Zr, xc, nc]), S = 0, O = m.length; S < O; ++S) + p = m[S], l = GO(a, p, Zr), l && (g.b = j.Math.max(g.b, l.Se())); + for (v = A(M(Kb, 1), z, 232, 0, [Zr, xc, nc]), C = 0, $ = v.length; C < $; ++C) + p = v[C], l = GO(a, p, nc), l && (g.c = j.Math.max(g.c, l.Se())); + return g.d > 0 && (g.d += a.n.d, g.d += a.d), g.a > 0 && (g.a += a.n.a, g.a += a.d), g.b > 0 && (g.b += a.n.b, g.b += a.d), g.c > 0 && (g.c += a.n.c, g.c += a.d), g; + } + function u_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + for (g = t.d, d = t.c, c = new fn(t.f.a + t.d.b + t.d.c, t.f.b + t.d.d + t.d.a), o = c.b, l = new E(n.a); l.a < l.c.c.length; ) + if (f = u(y(l), 10), f.k == (Qn(), Xt)) { + switch (i = u(k(f, (G(), ec)), 61), r = u(k(f, bun), 8), a = f.n, i.g) { + case 2: + a.a = t.f.a + g.c - d.a; + break; + case 4: + a.a = -d.a - g.b; + } + switch (v = 0, i.g) { + case 2: + case 4: + e == (Ai(), jh) ? (p = K(Y(k(f, y0))), a.b = c.b * p - u(k(f, (nn(), C0)), 8).b, v = a.b + r.b, lT(f, !1, !0)) : e == Sc && (a.b = K(Y(k(f, y0))) - u(k(f, (nn(), C0)), 8).b, v = a.b + r.b, lT(f, !1, !0)); + } + o = j.Math.max(o, v); + } + for (t.f.b += o - c.b, h = new E(n.a); h.a < h.c.c.length; ) + if (f = u(y(h), 10), f.k == (Qn(), Xt)) + switch (i = u(k(f, (G(), ec)), 61), a = f.n, i.g) { + case 1: + a.b = -d.b - g.d; + break; + case 3: + a.b = t.f.b + g.a - d.b; + } + } + function YEe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln; + for (r = u(k(n, (cc(), Wm)), 33), l = nt, a = nt, f = Bi, h = Bi, U = _e(n.b, 0); U.b != U.d.c; ) + x = u(Re(U), 86), m = x.e, C = x.f, l = j.Math.min(l, m.a - C.a / 2), a = j.Math.min(a, m.b - C.b / 2), f = j.Math.max(f, m.a + C.a / 2), h = j.Math.max(h, m.b + C.b / 2); + for (v = u(hn(r, (n0(), cYn)), 116), p = new fn(v.b - l, v.d - a), _ = _e(n.b, 0); _.b != _.d.c; ) + x = u(Re(_), 86), g = k(x, Wm), I(g, 239) && (c = u(g, 33), d = st(x.e, p), Jo(c, d.a - c.g / 2, d.b - c.f / 2)); + for (O = _e(n.a, 0); O.b != O.d.c; ) + $ = u(Re(O), 188), i = u(k($, Wm), 79), i && (e = $.a, S = new kr($.b.e), Ht(e, S, e.a, e.a.a), en = new kr($.c.e), Ht(e, en, e.c.b, e.c), Axn(S, u(qo(e, 1), 8), $.b.f), Axn(en, u(qo(e, e.b - 2), 8), $.c.f), t = ng(i, !0, !0), z7(e, t)); + ln = f - l + (v.b + v.c), o = h - a + (v.d + v.a), i0(r, ln, o, !1, !1); + } + function ZEe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (d = n.b, a = new Ii(d, 0), V0(a, new Rs(n)), $ = !1, o = 1; a.b < a.d.gc(); ) { + for (l = (ne(a.b < a.d.gc()), u(a.d.Xb(a.c = a.b++), 29)), m = (Ln(o, d.c.length), u(d.c[o], 29)), C = $d(l.a), S = C.c.length, v = new E(C); v.a < v.c.c.length; ) + g = u(y(v), 10), jr(g, m); + if ($) { + for (p = rX(new od(C), 0); p.c.Sb(); ) + for (g = u(aSn(p), 10), c = new E($d(Lr(g))); c.a < c.c.c.length; ) + r = u(y(c), 17), t0(r, !0), H(n, (G(), Uk), (qn(), !0)), i = NRn(n, r, S), t = u(k(g, v0), 305), O = u(un(i, i.c.length - 1), 17), t.k = O.c.i, t.n = O, t.b = r.d.i, t.c = r; + $ = !1; + } else + C.c.length != 0 && (e = (Ln(0, C.c.length), u(C.c[0], 10)), e.k == (Qn(), vf) && ($ = !0, o = -1)); + ++o; + } + for (f = new Ii(n.b, 0); f.b < f.d.gc(); ) + h = (ne(f.b < f.d.gc()), u(f.d.Xb(f.c = f.b++), 29)), h.a.c.length == 0 && Wu(f); + } + function nCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + if (a = u(u(ct(n.r, e), 21), 84), a.gc() <= 2 || e == (J(), Vn) || e == (J(), Gn)) { + M_n(n, e); + return; + } + for (m = n.u.Hc((Tu(), Pp)), t = e == (J(), Kn) ? (qd(), Ok) : (qd(), Ik), S = e == Kn ? (Jc(), To) : (Jc(), Wo), i = vG(LU(t), n.s), C = e == Kn ? Lt : Vt, l = a.Kc(); l.Ob(); ) + f = u(l.Pb(), 111), !(!f.c || f.c.d.c.length <= 0) && (v = f.b.rf(), p = f.e, d = f.c, g = d.i, g.b = (c = d.n, d.e.a + c.b + c.c), g.a = (o = d.n, d.e.b + o.d + o.a), m ? (g.c = p.a - (r = d.n, d.e.a + r.b + r.c) - n.s, m = !1) : g.c = p.a + v.a + n.s, T8(S, ann), d.f = S, Bo(d, (Cu(), Co)), W(i.d, new jD(g, gQ(i, g))), C = e == Kn ? j.Math.min(C, p.b) : j.Math.max(C, p.b + f.b.rf().b)); + for (C += e == Kn ? -n.t : n.t, DQ((i.e = C, i)), h = a.Kc(); h.Ob(); ) + f = u(h.Pb(), 111), !(!f.c || f.c.d.c.length <= 0) && (g = f.c.i, g.c -= f.e.a, g.d -= f.e.b); + } + function eCe(n, e, t) { + var i; + if (le(t, "StretchWidth layering", 1), e.a.c.length == 0) { + ce(t); + return; + } + for (n.c = e, n.t = 0, n.u = 0, n.i = Lt, n.g = Vt, n.d = K(Y(k(e, (nn(), Mo)))), Ope(n), $me(n), Dme(n), L4e(n), B2e(n), n.i = j.Math.max(1, n.i), n.g = j.Math.max(1, n.g), n.d = n.d / n.i, n.f = n.g / n.i, n.s = Upe(n), i = new Rs(n.c), W(n.c.b, i), n.r = $d(n.p), n.n = fC(n.k, n.k.length); n.r.c.length != 0; ) + n.o = uge(n), !n.o || nDn(n) && n.b.a.gc() != 0 ? (sve(n, i), i = new Rs(n.c), W(n.c.b, i), Xi(n.a, n.b), n.b.a.$b(), n.t = n.u, n.u = 0) : nDn(n) ? (n.c.b.c = F(Zn, rn, 1, 0, 5, 1), i = new Rs(n.c), W(n.c.b, i), n.t = 0, n.u = 0, n.b.a.$b(), n.a.a.$b(), ++n.f, n.r = $d(n.p), n.n = fC(n.k, n.k.length)) : (jr(n.o, i), Qc(n.r, n.o), ci(n.b, n.o), n.t = n.t - n.k[n.o.p] * n.d + n.j[n.o.p], n.u += n.e[n.o.p] * n.d); + e.a.c = F(Zn, rn, 1, 0, 5, 1), Ax(e.b), ce(t); + } + function tCe(n) { + var e, t, i, r; + for (_t(pt(new $n(null, new xn(n.a.b, 16)), new mbn()), new kbn()), X4e(n), _t(pt(new $n(null, new xn(n.a.b, 16)), new ybn()), new jbn()), n.c == (Hh(), Sp) && (_t(pt(qr(new $n(null, new xn(new Bp(n.f), 1)), new Ebn()), new Cbn()), new q5n(n)), _t(pt(Xc(qr(qr(new $n(null, new xn(n.d.b, 16)), new Tbn()), new Mbn()), new Abn()), new Sbn()), new z5n(n))), r = new fn(Lt, Lt), e = new fn(Vt, Vt), i = new E(n.a.b); i.a < i.c.c.length; ) + t = u(y(i), 57), r.a = j.Math.min(r.a, t.d.c), r.b = j.Math.min(r.b, t.d.d), e.a = j.Math.max(e.a, t.d.c + t.d.b), e.b = j.Math.max(e.b, t.d.d + t.d.a); + st(Lo(n.d.c), vE(new fn(r.a, r.b))), st(Lo(n.d.f), ji(new fn(e.a, e.b), r)), r8e(n, r, e), Eu(n.f), Eu(n.b), Eu(n.g), Eu(n.e), n.a.a.c = F(Zn, rn, 1, 0, 5, 1), n.a.b.c = F(Zn, rn, 1, 0, 5, 1), n.a = null, n.d = null; + } + function s_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (r = new X(), m = new E(e.a); m.a < m.c.c.length; ) + if (v = u(y(m), 10), p = v.e, p && (i = s_n(n, p, v), Zt(r, i), gEe(n, p, v), u(k(p, (G(), Ac)), 21).Hc((fr(), $s)))) + for ($ = u(k(v, (nn(), Bt)), 98), g = u(k(v, Zb), 174).Hc((Tu(), n1)), S = new E(v.j); S.a < S.c.c.length; ) + for (C = u(y(S), 11), c = u(te(n.b, C), 10), c || (c = V7(C, $, C.j, -(C.e.c.length - C.g.c.length), null, new Li(), C.o, u(k(p, as), 103), p), H(c, rt, C), it(n.b, C, c), W(p.a, c)), o = u(un(c.j, 0), 11), a = new E(C.f); a.a < a.c.c.length; ) + l = u(y(a), 70), f = new u8n(), f.o.a = l.o.a, f.o.b = l.o.b, W(o.f, f), g || (O = C.j, d = 0, D5(u(k(v, Zb), 21)) && (d = pY(l.n, l.o, C.o, 0, O)), $ == (Ai(), jf) || (J(), qc).Hc(O) ? f.o.a = d : f.o.b = d); + return h = new X(), AEe(n, e, t, r, h), t && qje(n, e, t, h), h; + } + function LZ(n, e, t) { + var i, r, c, o, f, h, l, a, d; + if (!n.c[e.c.p][e.p].e) { + for (n.c[e.c.p][e.p].e = !0, n.c[e.c.p][e.p].b = 0, n.c[e.c.p][e.p].d = 0, n.c[e.c.p][e.p].a = null, a = new E(e.j); a.a < a.c.c.length; ) + for (l = u(y(a), 11), d = t ? new Hp(l) : new n2(l), h = d.Kc(); h.Ob(); ) + f = u(h.Pb(), 11), o = f.i, o.c == e.c ? o != e && (LZ(n, o, t), n.c[e.c.p][e.p].b += n.c[o.c.p][o.p].b, n.c[e.c.p][e.p].d += n.c[o.c.p][o.p].d) : (n.c[e.c.p][e.p].d += n.g[f.p], ++n.c[e.c.p][e.p].b); + if (c = u(k(e, (G(), hun)), 15), c) + for (r = c.Kc(); r.Ob(); ) + i = u(r.Pb(), 10), e.c == i.c && (LZ(n, i, t), n.c[e.c.p][e.p].b += n.c[i.c.p][i.p].b, n.c[e.c.p][e.p].d += n.c[i.c.p][i.p].d); + n.c[e.c.p][e.p].b > 0 && (n.c[e.c.p][e.p].d += Fu(n.i, 24) * uk * 0.07000000029802322 - 0.03500000014901161, n.c[e.c.p][e.p].a = n.c[e.c.p][e.p].d / n.c[e.c.p][e.p].b); + } + } + function iCe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + for (v = new E(n); v.a < v.c.c.length; ) { + for (p = u(y(v), 10), s1(p.n), s1(p.o), NX(p.f), EBn(p), F7e(p), C = new E(p.j); C.a < C.c.c.length; ) { + for (m = u(y(C), 11), s1(m.n), s1(m.a), s1(m.o), si(m, fFn(m.j)), c = u(k(m, (nn(), I1)), 19), c && H(m, I1, Q(-c.a)), r = new E(m.g); r.a < r.c.c.length; ) { + for (i = u(y(r), 17), t = _e(i.a, 0); t.b != t.d.c; ) + e = u(Re(t), 8), s1(e); + if (h = u(k(i, Mr), 74), h) + for (f = _e(h, 0); f.b != f.d.c; ) + o = u(Re(f), 8), s1(o); + for (d = new E(i.b); d.a < d.c.c.length; ) + l = u(y(d), 70), s1(l.n), s1(l.o); + } + for (g = new E(m.f); g.a < g.c.c.length; ) + l = u(y(g), 70), s1(l.n), s1(l.o); + } + for (p.k == (Qn(), Xt) && (H(p, (G(), ec), fFn(u(k(p, ec), 61))), G8e(p)), a = new E(p.b); a.a < a.c.c.length; ) + l = u(y(a), 70), EBn(l), s1(l.o), s1(l.n); + } + } + function rCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en; + for (n.e = e, f = rme(e), U = new X(), i = new E(f); i.a < i.c.c.length; ) { + for (t = u(y(i), 15), en = new X(), U.c[U.c.length] = en, h = new hi(), v = t.Kc(); v.Ob(); ) { + for (p = u(v.Pb(), 33), c = K7(n, p, !0, 0, 0), en.c[en.c.length] = c, m = p.i, C = p.j, g = (!p.n && (p.n = new V(Rr, p, 1, 7)), p.n), d = new ie(g); d.e != d.i.gc(); ) + l = u(oe(d), 137), r = K7(n, l, !1, m, C), en.c[en.c.length] = r; + for (_ = (!p.c && (p.c = new V(Ru, p, 9, 9)), p.c), $ = new ie(_); $.e != $.i.gc(); ) + for (S = u(oe($), 118), o = K7(n, S, !1, m, C), en.c[en.c.length] = o, O = S.i + m, x = S.j + C, g = (!S.n && (S.n = new V(Rr, S, 1, 7)), S.n), a = new ie(g); a.e != a.i.gc(); ) + l = u(oe(a), 137), r = K7(n, l, !1, O, x), en.c[en.c.length] = r; + Xi(h, rC(of(A(M(gf, 1), rn, 20, 0, [Gh(p), N7(p)])))); + } + X9e(n, h, en); + } + return n.f = new i8n(U), Pr(n.f, e), n.f; + } + function cCe(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se; + zn = te(n.e, i), zn == null && (zn = new r2(), p = u(zn, 183), $ = e + "_s", O = $ + r, g = new nb(O), Ro(p, Uf, g)), wn = u(zn, 183), j2(t, wn), se = new r2(), aa(se, "x", i.j), aa(se, "y", i.k), Ro(wn, Cqn, se), en = new r2(), aa(en, "x", i.b), aa(en, "y", i.c), Ro(wn, "endPoint", en), d = N9((!i.a && (i.a = new Yt(io, i, 5)), i.a)), v = !d, v && (U = new ea(), c = new fmn(U), $i((!i.a && (i.a = new Yt(io, i, 5)), i.a), c), Ro(wn, pA, U)), h = VF(i), x = !!h, x && GJ(n.a, wn, xtn, Mx(n, VF(i))), S = QF(i), _ = !!S, _ && GJ(n.a, wn, Ftn, Mx(n, QF(i))), l = (!i.e && (i.e = new Fn(Mt, i, 10, 9)), i.e).i == 0, m = !l, m && (ln = new ea(), o = new Pkn(n, ln), $i((!i.e && (i.e = new Fn(Mt, i, 10, 9)), i.e), o), Ro(wn, Ntn, ln)), a = (!i.g && (i.g = new Fn(Mt, i, 9, 10)), i.g).i == 0, C = !a, C && (Wn = new ea(), f = new Ikn(n, Wn), $i((!i.g && (i.g = new Fn(Mt, i, 9, 10)), i.g), f), Ro(wn, Ltn, Wn)); + } + function uCe(n) { + X0(); + var e, t, i, r, c, o, f; + for (i = n.f.n, o = OW(n.r).a.nc(); o.Ob(); ) { + if (c = u(o.Pb(), 111), r = 0, c.b.Xe((Xe(), Bu)) && (r = K(Y(c.b.We(Bu))), r < 0)) + switch (c.b.Hf().g) { + case 1: + i.d = j.Math.max(i.d, -r); + break; + case 3: + i.a = j.Math.max(i.a, -r); + break; + case 2: + i.c = j.Math.max(i.c, -r); + break; + case 4: + i.b = j.Math.max(i.b, -r); + } + if (D5(n.u)) + switch (e = Ibe(c.b, r), f = !u(n.e.We(_l), 174).Hc((xu(), Sy)), t = !1, c.b.Hf().g) { + case 1: + t = e > i.d, i.d = j.Math.max(i.d, e), f && t && (i.d = j.Math.max(i.d, i.a), i.a = i.d + r); + break; + case 3: + t = e > i.a, i.a = j.Math.max(i.a, e), f && t && (i.a = j.Math.max(i.a, i.d), i.d = i.a + r); + break; + case 2: + t = e > i.c, i.c = j.Math.max(i.c, e), f && t && (i.c = j.Math.max(i.b, i.c), i.b = i.c + r); + break; + case 4: + t = e > i.b, i.b = j.Math.max(i.b, e), f && t && (i.b = j.Math.max(i.b, i.c), i.c = i.b + r); + } + } + } + function sCe(n) { + var e, t, i, r, c, o, f, h, l, a, d; + for (l = new E(n); l.a < l.c.c.length; ) { + switch (h = u(y(l), 10), o = u(k(h, (nn(), Hc)), 163), c = null, o.g) { + case 1: + case 2: + c = (ja(), Tg); + break; + case 3: + case 4: + c = (ja(), rv); + } + if (c) + H(h, (G(), HS), (ja(), Tg)), c == rv ? fM(h, o, (sr(), Au)) : c == Tg && fM(h, o, (sr(), Lc)); + else if (Cw(u(k(h, Bt), 98)) && h.j.c.length != 0) { + for (e = !0, d = new E(h.j); d.a < d.c.c.length; ) { + if (a = u(y(d), 11), !(a.j == (J(), Vn) && a.e.c.length - a.g.c.length > 0 || a.j == Gn && a.e.c.length - a.g.c.length < 0)) { + e = !1; + break; + } + for (r = new E(a.g); r.a < r.c.c.length; ) + if (t = u(y(r), 17), f = u(k(t.d.i, Hc), 163), f == (Ss(), Pm) || f == Wb) { + e = !1; + break; + } + for (i = new E(a.e); i.a < i.c.c.length; ) + if (t = u(y(i), 17), f = u(k(t.c.i, Hc), 163), f == (Ss(), Sm) || f == xl) { + e = !1; + break; + } + } + e && fM(h, o, (sr(), Bm)); + } + } + } + function oCe(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + for (U = 0, p = 0, d = new E(e.e); d.a < d.c.c.length; ) { + for (a = u(y(d), 10), g = 0, f = 0, h = t ? u(k(a, bP), 19).a : Bi, S = i ? u(k(a, wP), 19).a : Bi, l = j.Math.max(h, S), O = new E(a.j); O.a < O.c.c.length; ) { + if ($ = u(y(O), 11), x = a.n.b + $.n.b + $.a.b, i) + for (o = new E($.g); o.a < o.c.c.length; ) + c = u(y(o), 17), m = c.d, v = m.i, e != n.a[v.p] && (C = j.Math.max(u(k(v, bP), 19).a, u(k(v, wP), 19).a), _ = u(k(c, (nn(), yp)), 19).a, _ >= l && _ >= C && (g += v.n.b + m.n.b + m.a.b - x, ++f)); + if (t) + for (o = new E($.e); o.a < o.c.c.length; ) + c = u(y(o), 17), m = c.c, v = m.i, e != n.a[v.p] && (C = j.Math.max(u(k(v, bP), 19).a, u(k(v, wP), 19).a), _ = u(k(c, (nn(), yp)), 19).a, _ >= l && _ >= C && (g += v.n.b + m.n.b + m.a.b - x, ++f)); + } + f > 0 && (U += g / f, ++p); + } + p > 0 ? (e.a = r * U / p, e.g = p) : (e.a = 0, e.g = 0); + } + function fCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (r = new E(n.a.b); r.a < r.c.c.length; ) + for (t = u(y(r), 29), h = new E(t.a); h.a < h.c.c.length; ) + f = u(y(h), 10), e.j[f.p] = f, e.i[f.p] = e.o == (ef(), kf) ? Vt : Lt; + for (Eu(n.c), o = n.a.b, e.c == (Ff(), O1) && (o = I(o, 152) ? I2(u(o, 152)) : I(o, 131) ? u(o, 131).a : I(o, 54) ? new od(o) : new K0(o)), t0e(n.e, e, n.b), z9(e.p, null), c = o.Kc(); c.Ob(); ) + for (t = u(c.Pb(), 29), l = t.a, e.o == (ef(), kf) && (l = I(l, 152) ? I2(u(l, 152)) : I(l, 131) ? u(l, 131).a : I(l, 54) ? new od(l) : new K0(l)), g = l.Kc(); g.Ob(); ) + d = u(g.Pb(), 10), e.g[d.p] == d && S_n(n, d, e); + for (Yje(n, e), i = o.Kc(); i.Ob(); ) + for (t = u(i.Pb(), 29), g = new E(t.a); g.a < g.c.c.length; ) + d = u(y(g), 10), e.p[d.p] = e.p[e.g[d.p].p], d == e.g[d.p] && (a = K(e.i[e.j[d.p].p]), (e.o == (ef(), kf) && a > Vt || e.o == Ya && a < Lt) && (e.p[d.p] = K(e.p[d.p]) + a)); + n.e.cg(); + } + function o_n(n, e, t, i) { + var r, c, o, f, h; + return f = new NZ(e), h8e(f, i), r = !0, n && n.Xe((Xe(), S0)) && (c = u(n.We((Xe(), S0)), 103), r = c == (or(), mh) || c == Zs || c == Ao), aBn(f, !1), Yc(f.e.wf(), new $U(f, !1, r)), t$(f, f.f, (_o(), Zr), (J(), Kn)), t$(f, f.f, nc, ae), t$(f, f.g, Zr, Gn), t$(f, f.g, nc, Vn), Q$n(f, Kn), Q$n(f, ae), wTn(f, Vn), wTn(f, Gn), X0(), o = f.A.Hc((Qu(), sw)) && f.B.Hc((xu(), Py)) ? o$n(f) : null, o && Oie(f.a, o), uCe(f), j3e(f), E3e(f), OEe(f), hke(f), V3e(f), KF(f, Kn), KF(f, ae), q7e(f), fje(f), t && (s2e(f), Q3e(f), KF(f, Vn), KF(f, Gn), h = f.B.Hc((xu(), f9)), sLn(f, h, Kn), sLn(f, h, ae), oLn(f, h, Vn), oLn(f, h, Gn), _t(new $n(null, new xn(new Mh(f.i), 0)), new Rln()), _t(pt(new $n(null, OW(f.r).a.oc()), new _ln()), new Kln()), lve(f), f.e.uf(f.o), _t(new $n(null, OW(f.r).a.oc()), new qln())), f.o; + } + function hCe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (l = Lt, i = new E(n.a.b); i.a < i.c.c.length; ) + e = u(y(i), 81), l = j.Math.min(l, e.d.f.g.c + e.e.a); + for (p = new Tt(), o = new E(n.a.a); o.a < o.c.c.length; ) + c = u(y(o), 189), c.i = l, c.e == 0 && Ht(p, c, p.c.b, p.c); + for (; p.b != 0; ) { + for (c = u(p.b == 0 ? null : (ne(p.b != 0), Ts(p, p.a.a)), 189), r = c.f.g.c, g = c.a.a.ec().Kc(); g.Ob(); ) + a = u(g.Pb(), 81), m = c.i + a.e.a, a.d.g || a.g.c < m ? a.o = m : a.o = a.g.c; + for (r -= c.f.o, c.b += r, n.c == (or(), Ao) || n.c == Jh ? c.c += r : c.c -= r, d = c.a.a.ec().Kc(); d.Ob(); ) + for (a = u(d.Pb(), 81), h = a.f.Kc(); h.Ob(); ) + f = u(h.Pb(), 81), tl(n.c) ? v = n.f.ef(a, f) : v = n.f.ff(a, f), f.d.i = j.Math.max(f.d.i, a.o + a.g.b + v - f.e.a), f.k || (f.d.i = j.Math.max(f.d.i, f.g.c - f.e.a)), --f.d.e, f.d.e == 0 && Ke(p, f.d); + } + for (t = new E(n.a.b); t.a < t.c.c.length; ) + e = u(y(t), 81), e.g.c = e.o; + } + function lCe(n) { + var e, t, i, r, c, o, f, h; + switch (f = n.b, e = n.a, u(k(n, (WT(), irn)), 427).g) { + case 0: + wi(f, new ut(new Zln())); + break; + case 1: + default: + wi(f, new ut(new nan())); + } + switch (u(k(n, ern), 428).g) { + case 1: + wi(f, new xH()), wi(f, new ean()), wi(f, new Xln()); + break; + case 0: + default: + wi(f, new xH()), wi(f, new Yln()); + } + switch (u(k(n, crn), 250).g) { + case 0: + h = new ian(); + break; + case 1: + h = new gI(); + break; + case 2: + h = new Uy(); + break; + case 3: + h = new wI(); + break; + case 5: + h = new Kp(new Uy()); + break; + case 4: + h = new Kp(new gI()); + break; + case 7: + h = new _G(new Kp(new gI()), new Kp(new Uy())); + break; + case 8: + h = new _G(new Kp(new wI()), new Kp(new Uy())); + break; + case 6: + default: + h = new Kp(new wI()); + } + for (o = new E(f); o.a < o.c.c.length; ) { + for (c = u(y(o), 167), i = 0, r = 0, t = new Pi(Q(i), Q(r)); Qke(e, c, i, r); ) + t = u(h.Ce(t, c), 46), i = u(t.a, 19).a, r = u(t.b, 19).a; + X7e(e, c, i, r); + } + } + function aCe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en; + for (c = n.f.b, g = c.a, a = c.b, v = n.e.g, p = n.e.f, rE(n.e, c.a, c.b), U = g / v, en = a / p, l = new ie(JE(n.e)); l.e != l.i.gc(); ) + h = u(oe(l), 137), Zc(h, h.i * U), nu(h, h.j * en); + for ($ = new ie(HD(n.e)); $.e != $.i.gc(); ) + S = u(oe($), 118), x = S.i, _ = S.j, x > 0 && Zc(S, x * U), _ > 0 && nu(S, _ * en); + for (n6(n.b, new gan()), e = new X(), f = new Ca(new ia(n.c).a); f.b; ) + o = Bd(f), i = u(o.cd(), 79), t = u(o.dd(), 395).a, r = ng(i, !1, !1), d = sxn(fh(i), I7(r), t), z7(d, r), O = mxn(i), O && xr(e, O, 0) == -1 && (e.c[e.c.length] = O, TTn(O, (ne(d.b != 0), u(d.a.a.c, 8)), t)); + for (C = new Ca(new ia(n.d).a); C.b; ) + m = Bd(C), i = u(m.cd(), 79), t = u(m.dd(), 395).a, r = ng(i, !1, !1), d = sxn(ml(i), o7(I7(r)), t), d = o7(d), z7(d, r), O = kxn(i), O && xr(e, O, 0) == -1 && (e.c[e.c.length] = O, TTn(O, (ne(d.b != 0), u(d.c.b.c, 8)), t)); + } + function f_n(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en; + if (t.c.length != 0) { + for (p = new X(), g = new E(t); g.a < g.c.c.length; ) + d = u(y(g), 33), W(p, new fn(d.i, d.j)); + for (i.n && e && go(i, po(e), (Vu(), gs)); XJ(n, t); ) + rM(n, t, !1); + for (i.n && e && go(i, po(e), (Vu(), gs)), o = 0, f = 0, r = null, t.c.length != 0 && (r = (Ln(0, t.c.length), u(t.c[0], 33)), o = r.i - (Ln(0, p.c.length), u(p.c[0], 8)).a, f = r.j - (Ln(0, p.c.length), u(p.c[0], 8)).b), c = j.Math.sqrt(o * o + f * f), a = IDn(t); a.a.gc() != 0; ) { + for (l = a.a.ec().Kc(); l.Ob(); ) + h = u(l.Pb(), 33), v = n.f, m = v.i + v.g / 2, C = v.j + v.f / 2, S = h.i + h.g / 2, $ = h.j + h.f / 2, O = S - m, x = $ - C, _ = j.Math.sqrt(O * O + x * x), U = O / _, en = x / _, Zc(h, h.i + U * c), nu(h, h.j + en * c); + i.n && e && go(i, po(e), (Vu(), gs)), a = IDn(new au(a)); + } + n.a && n.a.lg(new au(a)), i.n && e && go(i, po(e), (Vu(), gs)), f_n(n, e, new au(a), i); + } + } + function dCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + if (m = n.n, C = n.o, g = n.d, d = K(Y(wb(n, (nn(), q_)))), e) { + for (a = d * (e.gc() - 1), p = 0, h = e.Kc(); h.Ob(); ) + o = u(h.Pb(), 10), a += o.o.a, p = j.Math.max(p, o.o.b); + for (S = m.a - (a - C.a) / 2, c = m.b - g.d + p, i = C.a / (e.gc() + 1), r = i, f = e.Kc(); f.Ob(); ) + o = u(f.Pb(), 10), o.n.a = S, o.n.b = c - o.o.b, S += o.o.a + d, l = yNn(o), l.n.a = o.o.a / 2 - l.a.a, l.n.b = o.o.b, v = u(k(o, (G(), _S)), 11), v.e.c.length + v.g.c.length == 1 && (v.n.a = r - v.a.a, v.n.b = 0, Hr(v, n)), r += i; + } + if (t) { + for (a = d * (t.gc() - 1), p = 0, h = t.Kc(); h.Ob(); ) + o = u(h.Pb(), 10), a += o.o.a, p = j.Math.max(p, o.o.b); + for (S = m.a - (a - C.a) / 2, c = m.b + C.b + g.a - p, i = C.a / (t.gc() + 1), r = i, f = t.Kc(); f.Ob(); ) + o = u(f.Pb(), 10), o.n.a = S, o.n.b = c, S += o.o.a + d, l = yNn(o), l.n.a = o.o.a / 2 - l.a.a, l.n.b = 0, v = u(k(o, (G(), _S)), 11), v.e.c.length + v.g.c.length == 1 && (v.n.a = r - v.a.a, v.n.b = C.b, Hr(v, n)), r += i; + } + } + function bCe(n, e) { + var t, i, r, c, o, f; + if (u(k(e, (G(), Ac)), 21).Hc((fr(), $s))) { + for (f = new E(e.a); f.a < f.c.c.length; ) + c = u(y(f), 10), c.k == (Qn(), ii) && (r = u(k(c, (nn(), nP)), 142), n.c = j.Math.min(n.c, c.n.a - r.b), n.a = j.Math.max(n.a, c.n.a + c.o.a + r.c), n.d = j.Math.min(n.d, c.n.b - r.d), n.b = j.Math.max(n.b, c.n.b + c.o.b + r.a)); + for (o = new E(e.a); o.a < o.c.c.length; ) + if (c = u(y(o), 10), c.k != (Qn(), ii)) + switch (c.k.g) { + case 2: + if (i = u(k(c, (nn(), Hc)), 163), i == (Ss(), xl)) { + c.n.a = n.c - 10, DFn(c, new Gdn()).Jb(new j5n(c)); + break; + } + if (i == Wb) { + c.n.a = n.a + 10, DFn(c, new zdn()).Jb(new E5n(c)); + break; + } + if (t = u(k(c, Ua), 303), t == (Nh(), Ag)) { + $Rn(c).Jb(new C5n(c)), c.n.b = n.d - 10; + break; + } + if (t == dp) { + $Rn(c).Jb(new T5n(c)), c.n.b = n.b + 10; + break; + } + break; + default: + throw T(new Hn("The node type " + c.k + " is not supported by the " + ZTe)); + } + } + } + function wCe(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C; + for (h = new fn(i.i + i.g / 2, i.j + i.f / 2), p = PRn(i), v = u(hn(e, (nn(), Bt)), 98), C = u(hn(i, av), 61), Bkn(q$n(i), Yb) || (i.i == 0 && i.j == 0 ? m = 0 : m = Wve(i, C), pr(i, Yb, m)), l = new fn(e.g, e.f), r = V7(i, v, C, p, l, h, new fn(i.g, i.f), u(k(t, as), 103), t), H(r, (G(), rt), i), c = u(un(r.j, 0), 11), ote(c, _ke(i)), H(r, Zb, (Tu(), Cn(Gl))), d = u(hn(e, Zb), 174).Hc(n1), f = new ie((!i.n && (i.n = new V(Rr, i, 1, 7)), i.n)); f.e != f.i.gc(); ) + if (o = u(oe(f), 137), !on(sn(hn(o, Qa))) && o.a && (g = EF(o), W(c.f, g), !d)) + switch (a = 0, D5(u(hn(e, Zb), 21)) && (a = pY(new fn(o.i, o.j), new fn(o.g, o.f), new fn(i.g, i.f), 0, C)), C.g) { + case 2: + case 4: + g.o.a = a; + break; + case 1: + case 3: + g.o.b = a; + } + H(r, bv, Y(hn(Pt(e), bv))), H(r, wv, Y(hn(Pt(e), wv))), H(r, ew, Y(hn(Pt(e), ew))), W(t.a, r), it(n.a, i, r); + } + function h_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _; + for (le(t, "Processor arrange level", 1), a = 0, Pn(), Lw(e, new $q((cc(), vP))), c = e.b, f = _e(e, e.b), l = !0; l && f.b.b != f.d.a; ) + S = u(a$(f), 86), u(k(S, vP), 19).a == 0 ? --c : l = !1; + if (_ = new ch(e, 0, c), o = new uD(_), _ = new ch(e, c, e.b), h = new uD(_), o.b == 0) + for (v = _e(h, 0); v.b != v.d.c; ) + p = u(Re(v), 86), H(p, yP, Q(a++)); + else + for (d = o.b, x = _e(o, 0); x.b != x.d.c; ) { + for (O = u(Re(x), 86), H(O, yP, Q(a++)), i = $V(O), h_n(n, i, yc(t, 1 / d | 0)), Lw(i, _W(new $q(yP))), g = new Tt(), $ = _e(i, 0); $.b != $.d.c; ) + for (S = u(Re($), 86), C = _e(O.d, 0); C.b != C.d.c; ) + m = u(Re(C), 188), m.c == S && Ht(g, m, g.c.b, g.c); + for (_s(O.d), Xi(O.d, g), f = _e(h, h.b), r = O.d.b, l = !0; 0 < r && l && f.b.b != f.d.a; ) + S = u(a$(f), 86), u(k(S, vP), 19).a == 0 ? (H(S, yP, Q(a++)), --r, HC(f)) : l = !1; + } + ce(t); + } + function gCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (le(e, "Inverted port preprocessing", 1), a = n.b, l = new Ii(a, 0), t = null, O = new X(); l.b < l.d.gc(); ) { + for ($ = t, t = (ne(l.b < l.d.gc()), u(l.d.Xb(l.c = l.b++), 29)), p = new E(O); p.a < p.c.c.length; ) + d = u(y(p), 10), jr(d, $); + for (O.c = F(Zn, rn, 1, 0, 5, 1), v = new E(t.a); v.a < v.c.c.length; ) + if (d = u(y(v), 10), d.k == (Qn(), ii) && Cw(u(k(d, (nn(), Bt)), 98))) { + for (S = tZ(d, (sr(), Au), (J(), Vn)).Kc(); S.Ob(); ) + for (m = u(S.Pb(), 11), h = m.e, f = u(lf(h, F(GR, MN, 17, h.c.length, 0, 1)), 474), r = f, c = 0, o = r.length; c < o; ++c) + i = r[c], Kye(n, m, i, O); + for (C = tZ(d, Lc, Gn).Kc(); C.Ob(); ) + for (m = u(C.Pb(), 11), h = m.g, f = u(lf(h, F(GR, MN, 17, h.c.length, 0, 1)), 474), r = f, c = 0, o = r.length; c < o; ++c) + i = r[c], _ye(n, m, i, O); + } + } + for (g = new E(O); g.a < g.c.c.length; ) + d = u(y(g), 10), jr(d, t); + ce(e); + } + function pCe(n, e, t, i, r, c) { + var o, f, h, l, a, d; + for (l = new gc(), Pr(l, e), si(l, u(hn(e, (nn(), av)), 61)), H(l, (G(), rt), e), Hr(l, t), d = l.o, d.a = e.g, d.b = e.f, a = l.n, a.a = e.i, a.b = e.j, it(n.a, e, l), o = E3(Xc(qr(new $n(null, (!e.e && (e.e = new Fn(bi, e, 7, 4)), new xn(e.e, 16))), new Van()), new Wan()), new d5n(e)), o || (o = E3(Xc(qr(new $n(null, (!e.d && (e.d = new Fn(bi, e, 8, 5)), new xn(e.d, 16))), new Qan()), new Xan()), new b5n(e))), o || (o = E3(new $n(null, (!e.e && (e.e = new Fn(bi, e, 7, 4)), new xn(e.e, 16))), new Jan())), H(l, Wk, (qn(), !!o)), Fje(l, c, r, u(hn(e, C0), 8)), h = new ie((!e.n && (e.n = new V(Rr, e, 1, 7)), e.n)); h.e != h.i.gc(); ) + f = u(oe(h), 137), !on(sn(hn(f, Qa))) && f.a && W(l.f, EF(f)); + switch (r.g) { + case 2: + case 1: + (l.j == (J(), Kn) || l.j == ae) && i.Fc((fr(), Mg)); + break; + case 4: + case 3: + (l.j == (J(), Vn) || l.j == Gn) && i.Fc((fr(), Mg)); + } + return l; + } + function mL(n, e, t, i, r, c, o) { + var f, h, l, a, d, g, p, v, m, C, S, $, O; + for (g = null, i == (Od(), Rl) ? g = e : i == Lg && (g = t), m = g.a.ec().Kc(); m.Ob(); ) { + for (v = u(m.Pb(), 11), C = Gr(A(M(di, 1), q, 8, 0, [v.i.n, v.n, v.a])).b, O = new hi(), f = new hi(), l = new uf(v.b); Kr(l.a) || Kr(l.b); ) + if (h = u(Kr(l.a) ? y(l.a) : y(l.b), 17), on(sn(k(h, (G(), mf)))) == r && xr(c, h, 0) != -1) { + if (h.d == v ? S = h.c : S = h.d, $ = Gr(A(M(di, 1), q, 8, 0, [S.i.n, S.n, S.a])).b, j.Math.abs($ - C) < 0.2) + continue; + $ < C ? e.a._b(S) ? ci(O, new Pi(Rl, h)) : ci(O, new Pi(Lg, h)) : e.a._b(S) ? ci(f, new Pi(Rl, h)) : ci(f, new Pi(Lg, h)); + } + if (O.a.gc() > 1) + for (p = new SZ(v, O, i), $i(O, new tkn(n, p)), o.c[o.c.length] = p, d = O.a.ec().Kc(); d.Ob(); ) + a = u(d.Pb(), 46), Qc(c, a.b); + if (f.a.gc() > 1) + for (p = new SZ(v, f, i), $i(f, new ikn(n, p)), o.c[o.c.length] = p, d = f.a.ec().Kc(); d.Ob(); ) + a = u(d.Pb(), 46), Qc(c, a.b); + } + } + function l_n(n) { + gd(n, new Oa(vj(ad(fd(ld(hd(new na(), zf), "ELK Radial"), 'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'), new Fgn()), zf))), Z(n, zf, oA, cn(DYn)), Z(n, zf, $b, cn($Yn)), Z(n, zf, hg, cn(SYn)), Z(n, zf, ip, cn(PYn)), Z(n, zf, tp, cn(IYn)), Z(n, zf, $4, cn(AYn)), Z(n, zf, G6, cn(Ron)), Z(n, zf, F4, cn(OYn)), Z(n, zf, dB, cn(MK)), Z(n, zf, aB, cn(AK)), Z(n, zf, otn, cn(_on)), Z(n, zf, rtn, cn(TP)), Z(n, zf, ctn, cn(MP)), Z(n, zf, utn, cn(oy)), Z(n, zf, stn, cn(Kon)); + } + function NZ(n) { + var e; + if (this.r = Uhe(new Nln(), new Bln()), this.b = new f6(u(pe(Yi), 290)), this.p = new f6(u(pe(Yi), 290)), this.i = new f6(u(pe(yUn), 290)), this.e = n, this.o = new kr(n.rf()), this.D = n.Df() || on(sn(n.We((Xe(), vy)))), this.A = u(n.We((Xe(), nd)), 21), this.B = u(n.We(_l), 21), this.q = u(n.We(n9), 98), this.u = u(n.We(cw), 21), !Zve(this.u)) + throw T(new pw("Invalid port label placement: " + this.u)); + if (this.v = on(sn(n.We(mhn))), this.j = u(n.We(_g), 21), !E9e(this.j)) + throw T(new pw("Invalid node label placement: " + this.j)); + this.n = u(w6(n, uhn), 116), this.k = K(Y(w6(n, KP))), this.d = K(Y(w6(n, Ehn))), this.w = K(Y(w6(n, Shn))), this.s = K(Y(w6(n, Chn))), this.t = K(Y(w6(n, Thn))), this.C = u(w6(n, Mhn), 142), this.c = 2 * this.d, e = !this.B.Hc((xu(), Sy)), this.f = new l6(0, e, 0), this.g = new l6(1, e, 0), zI(this.f, (_o(), xc), this.g); + } + function vCe(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn; + for (O = 0, v = 0, p = 0, g = 1, $ = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); $.e != $.i.gc(); ) + C = u(oe($), 33), g += Fh(new re(ue(Gh(C).a.Kc(), new Mn()))), ln = C.g, v = j.Math.max(v, ln), d = C.f, p = j.Math.max(p, d), O += ln * d; + for (m = (!n.a && (n.a = new V(Ot, n, 10, 11)), n.a).i, o = O + 2 * i * i * g * m, c = j.Math.sqrt(o), h = j.Math.max(c * t, v), f = j.Math.max(c / t, p), S = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); S.e != S.i.gc(); ) + C = u(oe(S), 33), wn = r.b + (Fu(e, 26) * N6 + Fu(e, 27) * B6) * (h - C.g), zn = r.b + (Fu(e, 26) * N6 + Fu(e, 27) * B6) * (f - C.f), Zc(C, wn), nu(C, zn); + for (en = h + (r.b + r.c), U = f + (r.d + r.a), _ = new ie((!n.a && (n.a = new V(Ot, n, 10, 11)), n.a)); _.e != _.i.gc(); ) + for (x = u(oe(_), 33), a = new re(ue(Gh(x).a.Kc(), new Mn())); Se(a); ) + l = u(ve(a), 79), j6(l) || mTe(l, e, en, U); + en += r.b + r.c, U += r.d + r.a, i0(n, en, U, !1, !0); + } + function MM(n) { + var e, t, i, r, c, o, f, h, l, a, d; + if (n == null) + throw T(new Sf(iu)); + if (l = n, c = n.length, h = !1, c > 0 && (e = (Te(0, n.length), n.charCodeAt(0)), (e == 45 || e == 43) && (n = n.substr(1), --c, h = e == 45)), c == 0) + throw T(new Sf(u0 + l + '"')); + for (; n.length > 0 && (Te(0, n.length), n.charCodeAt(0) == 48); ) + n = n.substr(1), --c; + if (c > (ZBn(), yzn)[10]) + throw T(new Sf(u0 + l + '"')); + for (r = 0; r < c; r++) + if (S$n((Te(r, n.length), n.charCodeAt(r))) == -1) + throw T(new Sf(u0 + l + '"')); + for (d = 0, o = Cin[10], a = bR[10], f = S3(Tin[10]), t = !0, i = c % o, i > 0 && (d = -parseInt(n.substr(0, i), 10), n = n.substr(i), c -= i, t = !1); c >= o; ) { + if (i = parseInt(n.substr(0, o), 10), n = n.substr(o), c -= o, t) + t = !1; + else { + if (hc(d, f) < 0) + throw T(new Sf(u0 + l + '"')); + d = Ni(d, a); + } + d = vl(d, i); + } + if (hc(d, 0) > 0) + throw T(new Sf(u0 + l + '"')); + if (!h && (d = S3(d), hc(d, 0) < 0)) + throw T(new Sf(u0 + l + '"')); + return d; + } + function BZ(n, e) { + HEn(); + var t, i, r, c, o, f, h; + if (this.a = new Sz(this), this.b = n, this.c = e, this.f = PD(Er((wu(), xi), e)), this.f.dc()) + if ((f = EJ(xi, n)) == e) + for (this.e = !0, this.d = new X(), this.f = new H2n(), this.f.Fc(Ha), u(jM(G8(xi, is(n)), ""), 26) == n && this.f.Fc(I5(xi, is(n))), r = Jx(xi, n).Kc(); r.Ob(); ) + switch (i = u(r.Pb(), 170), Pd(Er(xi, i))) { + case 4: { + this.d.Fc(i); + break; + } + case 5: { + this.f.Gc(PD(Er(xi, i))); + break; + } + } + else if (er(), u(e, 66).Oj()) + for (this.e = !0, this.f = null, this.d = new X(), o = 0, h = (n.i == null && Lf(n), n.i).length; o < h; ++o) + for (i = (t = (n.i == null && Lf(n), n.i), o >= 0 && o < t.length ? t[o] : null), c = A2(Er(xi, i)); c; c = A2(Er(xi, c))) + c == e && this.d.Fc(i); + else + Pd(Er(xi, e)) == 1 && f ? (this.f = null, this.d = (z2(), fee)) : (this.f = null, this.e = !0, this.d = (Pn(), new OI(e))); + else + this.e = Pd(Er(xi, e)) == 5, this.f.Fb(mH) && (this.f = mH); + } + function a_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + for (t = 0, i = l3e(n, e), g = n.s, p = n.t, l = u(u(ct(n.r, e), 21), 84).Kc(); l.Ob(); ) + if (h = u(l.Pb(), 111), !(!h.c || h.c.d.c.length <= 0)) { + switch (v = h.b.rf(), f = h.b.Xe((Xe(), Bu)) ? K(Y(h.b.We(Bu))) : 0, a = h.c, d = a.i, d.b = (o = a.n, a.e.a + o.b + o.c), d.a = (c = a.n, a.e.b + c.d + c.a), e.g) { + case 1: + d.c = h.a ? (v.a - d.b) / 2 : v.a + g, d.d = v.b + f + i, Bo(a, (Cu(), Ol)), Of(a, (Jc(), Wo)); + break; + case 3: + d.c = h.a ? (v.a - d.b) / 2 : v.a + g, d.d = -f - i - d.a, Bo(a, (Cu(), Ol)), Of(a, (Jc(), To)); + break; + case 2: + d.c = -f - i - d.b, h.a ? (r = n.v ? d.a : u(un(a.d, 0), 181).rf().b, d.d = (v.b - r) / 2) : d.d = v.b + p, Bo(a, (Cu(), Co)), Of(a, (Jc(), Dl)); + break; + case 4: + d.c = v.a + f + i, h.a ? (r = n.v ? d.a : u(un(a.d, 0), 181).rf().b, d.d = (v.b - r) / 2) : d.d = v.b + p, Bo(a, (Cu(), Xf)), Of(a, (Jc(), Dl)); + } + (e == (J(), Kn) || e == ae) && (t = j.Math.max(t, d.a)); + } + t > 0 && (u(wr(n.b, e), 124).a.b = t); + } + function mCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + for (le(e, "Comment pre-processing", 1), t = 0, h = new E(n.a); h.a < h.c.c.length; ) + if (f = u(y(h), 10), on(sn(k(f, (nn(), Im))))) { + for (++t, r = 0, i = null, l = null, v = new E(f.j); v.a < v.c.c.length; ) + g = u(y(v), 11), r += g.e.c.length + g.g.c.length, g.e.c.length == 1 && (i = u(un(g.e, 0), 17), l = i.c), g.g.c.length == 1 && (i = u(un(g.g, 0), 17), l = i.d); + if (r == 1 && l.e.c.length + l.g.c.length == 1 && !on(sn(k(l.i, Im)))) + WCe(f, i, l, l.i), F5(h); + else { + for (S = new X(), p = new E(f.j); p.a < p.c.c.length; ) { + for (g = u(y(p), 11), d = new E(g.g); d.a < d.c.c.length; ) + a = u(y(d), 17), a.d.g.c.length == 0 || (S.c[S.c.length] = a); + for (o = new E(g.e); o.a < o.c.c.length; ) + c = u(y(o), 17), c.c.e.c.length == 0 || (S.c[S.c.length] = c); + } + for (C = new E(S); C.a < C.c.c.length; ) + m = u(y(C), 17), t0(m, !0); + } + } + e.n && oa(e, "Found " + t + " comment boxes"), ce(e); + } + function kCe(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m; + if (g = K(Y(k(n, (nn(), bv)))), p = K(Y(k(n, wv))), d = K(Y(k(n, ew))), f = n.o, c = u(un(n.j, 0), 11), o = c.n, m = J5e(c, d), !!m) { + if (e.Hc((Tu(), n1))) + switch (u(k(n, (G(), ec)), 61).g) { + case 1: + m.c = (f.a - m.b) / 2 - o.a, m.d = p; + break; + case 3: + m.c = (f.a - m.b) / 2 - o.a, m.d = -p - m.a; + break; + case 2: + t && c.e.c.length == 0 && c.g.c.length == 0 ? (a = i ? m.a : u(un(c.f, 0), 70).o.b, m.d = (f.b - a) / 2 - o.b) : m.d = f.b + p - o.b, m.c = -g - m.b; + break; + case 4: + t && c.e.c.length == 0 && c.g.c.length == 0 ? (a = i ? m.a : u(un(c.f, 0), 70).o.b, m.d = (f.b - a) / 2 - o.b) : m.d = f.b + p - o.b, m.c = g; + } + else if (e.Hc(Gl)) + switch (u(k(n, (G(), ec)), 61).g) { + case 1: + case 3: + m.c = o.a + g; + break; + case 2: + case 4: + t && !c.c ? (a = i ? m.a : u(un(c.f, 0), 70).o.b, m.d = (f.b - a) / 2 - o.b) : m.d = o.b + p; + } + for (r = m.d, l = new E(c.f); l.a < l.c.c.length; ) + h = u(y(l), 70), v = h.n, v.a = m.c, v.b = r, r += h.o.b + d; + } + } + function yCe() { + He(Ny, new p3n()), He(sI, new S3n()), He(By, new R3n()), He(D1n, new Q3n()), He(tn, new n4n()), He(M(ku, 1), new e4n()), He(oi, new t4n()), He(op, new i4n()), He(tn, new s3n()), He(tn, new o3n()), He(tn, new f3n()), He(Si, new h3n()), He(tn, new l3n()), He(Ds, new a3n()), He(Ds, new d3n()), He(tn, new b3n()), He(z4, new w3n()), He(tn, new g3n()), He(tn, new v3n()), He(tn, new m3n()), He(tn, new k3n()), He(tn, new y3n()), He(M(ku, 1), new j3n()), He(tn, new E3n()), He(tn, new C3n()), He(Ds, new T3n()), He(Ds, new M3n()), He(tn, new A3n()), He(Ui, new P3n()), He(tn, new I3n()), He(d0, new O3n()), He(tn, new D3n()), He(tn, new $3n()), He(tn, new F3n()), He(tn, new x3n()), He(Ds, new L3n()), He(Ds, new N3n()), He(tn, new B3n()), He(tn, new _3n()), He(tn, new K3n()), He(tn, new H3n()), He(tn, new q3n()), He(tn, new G3n()), He(b0, new z3n()), He(tn, new U3n()), He(tn, new W3n()), He(tn, new X3n()), He(b0, new V3n()), He(d0, new J3n()), He(tn, new Y3n()), He(Ui, new Z3n()); + } + function RZ(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + if (g = e.length, g > 0 && (h = (Te(0, e.length), e.charCodeAt(0)), h != 64)) { + if (h == 37 && (d = e.lastIndexOf("%"), l = !1, d != 0 && (d == g - 1 || (l = (Te(d + 1, e.length), e.charCodeAt(d + 1) == 46))))) { + if (o = e.substr(1, d - 1), O = An("%", o) ? null : _Z(o), i = 0, l) + try { + i = ss(e.substr(d + 2), Bi, nt); + } catch (x) { + throw x = Et(x), I(x, 127) ? (f = x, T(new xC(f))) : T(x); + } + for (C = kV(n.Wg()); C.Ob(); ) + if (v = hT(C), I(v, 510) && (r = u(v, 590), $ = r.d, (O == null ? $ == null : An(O, $)) && i-- == 0)) + return r; + return null; + } + if (a = e.lastIndexOf("."), p = a == -1 ? e : e.substr(0, a), t = 0, a != -1) + try { + t = ss(e.substr(a + 1), Bi, nt); + } catch (x) { + if (x = Et(x), I(x, 127)) + p = e; + else + throw T(x); + } + for (p = An("%", p) ? null : _Z(p), m = kV(n.Wg()); m.Ob(); ) + if (v = hT(m), I(v, 191) && (c = u(v, 191), S = c.ne(), (p == null ? S == null : An(p, S)) && t-- == 0)) + return c; + return null; + } + return LRn(n, e); + } + function jCe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn; + for (U = new X(), v = new E(n.b); v.a < v.c.c.length; ) + for (p = u(y(v), 29), S = new E(p.a); S.a < S.c.c.length; ) + if (m = u(y(S), 10), m.k == (Qn(), Xt) && ai(m, (G(), qS))) { + for ($ = null, x = null, O = null, wn = new E(m.j); wn.a < wn.c.c.length; ) + switch (ln = u(y(wn), 11), ln.j.g) { + case 4: + $ = ln; + break; + case 2: + x = ln; + break; + default: + O = ln; + } + for (_ = u(un(O.g, 0), 17), a = new mj(_.a), l = new kr(O.n), st(l, m.n), d = _e(a, 0), y8(d, l), en = o7(_.a), g = new kr(O.n), st(g, m.n), Ht(en, g, en.c.b, en.c), zn = u(k(m, qS), 10), Wn = u(un(zn.j, 0), 11), h = u(lf($.e, F(GR, MN, 17, 0, 0, 1)), 474), i = h, c = 0, f = i.length; c < f; ++c) + e = i[c], Ti(e, Wn), vF(e.a, e.a.b, a); + for (h = xf(x.g), t = h, r = 0, o = t.length; r < o; ++r) + e = t[r], Ki(e, Wn), vF(e.a, 0, en); + Ki(_, null), Ti(_, null), U.c[U.c.length] = m; + } + for (C = new E(U); C.a < C.c.c.length; ) + m = u(y(C), 10), jr(m, null); + } + function d_n() { + d_n = N; + var n, e, t; + for (new W8(1, 0), new W8(10, 0), new W8(0, 0), jzn = F(wR, q, 240, 11, 0, 1), za = F(Ls, Bf, 25, 100, 15, 1), Pin = A(M(Ci, 1), vr, 25, 15, [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 152587890625, 762939453125, 3814697265625, 19073486328125, 95367431640625, 476837158203125, 2384185791015625]), Iin = F(be, Le, 25, Pin.length, 15, 1), Oin = A(M(Ci, 1), vr, 25, 15, [1, 10, 100, E1, 1e4, JL, 1e6, 1e7, 1e8, $M, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16]), Din = F(be, Le, 25, Oin.length, 15, 1), $in = F(wR, q, 240, 11, 0, 1), n = 0; n < $in.length; n++) + jzn[n] = new W8(n, 0), $in[n] = new W8(0, n), za[n] = 48; + for (; n < za.length; n++) + za[n] = 48; + for (t = 0; t < Iin.length; t++) + Iin[t] = wY(Pin[t]); + for (e = 0; e < Din.length; e++) + Din[e] = wY(Oin[e]); + l4(); + } + function ECe() { + function n() { + this.obj = this.createObject(); + } + return n.prototype.createObject = function(e) { + return /* @__PURE__ */ Object.create(null); + }, n.prototype.get = function(e) { + return this.obj[e]; + }, n.prototype.set = function(e, t) { + this.obj[e] = t; + }, n.prototype[eN] = function(e) { + delete this.obj[e]; + }, n.prototype.keys = function() { + return Object.getOwnPropertyNames(this.obj); + }, n.prototype.entries = function() { + var e = this.keys(), t = this, i = 0; + return { next: function() { + if (i >= e.length) + return { done: !0 }; + var r = e[i++]; + return { value: [r, t.get(r)], done: !1 }; + } }; + }, A7e() || (n.prototype.createObject = function() { + return {}; + }, n.prototype.get = function(e) { + return this.obj[":" + e]; + }, n.prototype.set = function(e, t) { + this.obj[":" + e] = t; + }, n.prototype[eN] = function(e) { + delete this.obj[":" + e]; + }, n.prototype.keys = function() { + var e = []; + for (var t in this.obj) + t.charCodeAt(0) == 58 && e.push(t.substring(1)); + return e; + }), n; + } + function CCe(n) { + vZ(); + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + if (n == null) + return null; + if (d = n.length * 8, d == 0) + return ""; + for (f = d % 24, p = d / 24 | 0, g = f != 0 ? p + 1 : p, c = null, c = F(Ls, Bf, 25, g * 4, 15, 1), l = 0, a = 0, e = 0, t = 0, i = 0, o = 0, r = 0, h = 0; h < p; h++) + e = n[r++], t = n[r++], i = n[r++], a = (t & 15) << 24 >> 24, l = (e & 3) << 24 >> 24, v = e & -128 ? (e >> 2 ^ 192) << 24 >> 24 : e >> 2 << 24 >> 24, m = t & -128 ? (t >> 4 ^ 240) << 24 >> 24 : t >> 4 << 24 >> 24, C = i & -128 ? (i >> 6 ^ 252) << 24 >> 24 : i >> 6 << 24 >> 24, c[o++] = _1[v], c[o++] = _1[m | l << 4], c[o++] = _1[a << 2 | C], c[o++] = _1[i & 63]; + return f == 8 ? (e = n[r], l = (e & 3) << 24 >> 24, v = e & -128 ? (e >> 2 ^ 192) << 24 >> 24 : e >> 2 << 24 >> 24, c[o++] = _1[v], c[o++] = _1[l << 4], c[o++] = 61, c[o++] = 61) : f == 16 && (e = n[r], t = n[r + 1], a = (t & 15) << 24 >> 24, l = (e & 3) << 24 >> 24, v = e & -128 ? (e >> 2 ^ 192) << 24 >> 24 : e >> 2 << 24 >> 24, m = t & -128 ? (t >> 4 ^ 240) << 24 >> 24 : t >> 4 << 24 >> 24, c[o++] = _1[v], c[o++] = _1[m | l << 4], c[o++] = _1[a << 2], c[o++] = 61), Hs(c, 0, c.length); + } + function TCe(n, e) { + var t, i, r, c, o, f, h; + if (n.e == 0 && n.p > 0 && (n.p = -(n.p - 1)), n.p > Bi && mX(e, n.p - Tl), o = e.q.getDate(), A8(e, 1), n.k >= 0 && sle(e, n.k), n.c >= 0 ? A8(e, n.c) : n.k >= 0 ? (h = new _V(e.q.getFullYear() - Tl, e.q.getMonth(), 35), i = 35 - h.q.getDate(), A8(e, j.Math.min(i, o))) : A8(e, o), n.f < 0 && (n.f = e.q.getHours()), n.b > 0 && n.f < 12 && (n.f += 12), vce(e, n.f == 24 && n.g ? 0 : n.f), n.j >= 0 && vde(e, n.j), n.n >= 0 && Lde(e, n.n), n.i >= 0 && Kkn(e, Hi(Ni(M7(eu(e.q.getTime()), E1), E1), n.i)), n.a && (r = new Tj(), mX(r, r.q.getFullYear() - Tl - 80), cO(eu(e.q.getTime()), eu(r.q.getTime())) && mX(e, r.q.getFullYear() - Tl + 100)), n.d >= 0) { + if (n.c == -1) + t = (7 + n.d - e.q.getDay()) % 7, t > 3 && (t -= 7), f = e.q.getMonth(), A8(e, e.q.getDate() + t), e.q.getMonth() != f && A8(e, e.q.getDate() + (t > 0 ? -7 : 7)); + else if (e.q.getDay() != n.d) + return !1; + } + return n.o > Bi && (c = e.q.getTimezoneOffset(), Kkn(e, Hi(eu(e.q.getTime()), (n.o - c) * 60 * E1))), !0; + } + function b_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + if (r = k(e, (G(), rt)), !!I(r, 239)) { + for (v = u(r, 33), m = e.e, g = new kr(e.c), c = e.d, g.a += c.b, g.b += c.d, x = u(hn(v, (nn(), iP)), 174), lu(x, (xu(), GP)) && (p = u(hn(v, Esn), 116), Yee(p, c.a), ute(p, c.d), Zee(p, c.b), ste(p, c.c)), t = new X(), a = new E(e.a); a.a < a.c.c.length; ) + for (h = u(y(a), 10), I(k(h, rt), 239) ? OCe(h, g) : I(k(h, rt), 186) && !m && (i = u(k(h, rt), 118), $ = cRn(e, h, i.g, i.f), Jo(i, $.a, $.b)), S = new E(h.j); S.a < S.c.c.length; ) + C = u(y(S), 11), _t(pt(new $n(null, new xn(C.g, 16)), new w5n(h)), new g5n(t)); + if (m) + for (S = new E(m.j); S.a < S.c.c.length; ) + C = u(y(S), 11), _t(pt(new $n(null, new xn(C.g, 16)), new p5n(m)), new v5n(t)); + for (O = u(hn(v, Qh), 218), f = new E(t); f.a < f.c.c.length; ) + o = u(y(f), 17), GEe(o, O, g); + for (Bke(e), l = new E(e.a); l.a < l.c.c.length; ) + h = u(y(l), 10), d = h.e, d && b_n(n, d); + } + } + function w_n(n) { + gd(n, new Oa(kG(vj(ad(fd(ld(hd(new na(), fs), "ELK Force"), "Force-based algorithm provided by the Eclipse Layout Kernel. Implements methods that follow physical analogies by simulating forces that move the nodes into a balanced distribution. Currently the original Eades model and the Fruchterman - Reingold model are supported."), new van()), fs), vt((a4(), ZP), A(M(nI, 1), z, 237, 0, [JP]))))), Z(n, fs, hk, Q(1)), Z(n, fs, $b, 80), Z(n, fs, EN, 5), Z(n, fs, ep, D4), Z(n, fs, HM, Q(1)), Z(n, fs, q6, (qn(), !0)), Z(n, fs, s0, Orn), Z(n, fs, lk, cn(Srn)), Z(n, fs, CN, cn(Drn)), Z(n, fs, qM, !1), Z(n, fs, G6, cn(Irn)), Z(n, fs, tp, cn(YUn)), Z(n, fs, hg, cn(JUn)), Z(n, fs, $4, cn(QUn)), Z(n, fs, F4, cn(nWn)), Z(n, fs, KM, cn(Prn)), Z(n, fs, yN, cn(xR)), Z(n, fs, Tnn, cn(iS)), Z(n, fs, jN, cn(FR)), Z(n, fs, Mnn, cn($rn)); + } + function g_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + if (!u(u(ct(n.r, e), 21), 84).dc()) { + if (o = u(wr(n.b, e), 124), h = o.i, f = o.n, a = qx(n, e), i = h.b - f.b - f.c, r = o.a.a, c = h.c + f.b, p = n.w, (a == (qw(), Hl) || a == Cy) && u(u(ct(n.r, e), 21), 84).gc() == 1 && (r = a == Hl ? r - 2 * n.w : r, a = r9), i < r && !n.B.Hc((xu(), zP))) + a == Hl ? (p += (i - r) / (u(u(ct(n.r, e), 21), 84).gc() + 1), c += p) : p += (i - r) / (u(u(ct(n.r, e), 21), 84).gc() - 1); + else + switch (i < r && (r = a == Hl ? r - 2 * n.w : r, a = r9), a.g) { + case 3: + c += (i - r) / 2; + break; + case 4: + c += i - r; + break; + case 0: + t = (i - r) / (u(u(ct(n.r, e), 21), 84).gc() + 1), p += j.Math.max(0, t), c += p; + break; + case 1: + t = (i - r) / (u(u(ct(n.r, e), 21), 84).gc() - 1), p += j.Math.max(0, t); + } + for (g = u(u(ct(n.r, e), 21), 84).Kc(); g.Ob(); ) + d = u(g.Pb(), 111), d.e.a = c + d.d.b, d.e.b = (l = d.b, l.Xe((Xe(), Bu)) ? l.Hf() == (J(), Kn) ? -l.rf().b - K(Y(l.We(Bu))) : K(Y(l.We(Bu))) : l.Hf() == (J(), Kn) ? -l.rf().b : 0), c += d.d.b + d.b.rf().a + d.d.c + p; + } + } + function p_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + if (!u(u(ct(n.r, e), 21), 84).dc()) { + if (o = u(wr(n.b, e), 124), h = o.i, f = o.n, d = qx(n, e), i = h.a - f.d - f.a, r = o.a.b, c = h.d + f.d, v = n.w, l = n.o.a, (d == (qw(), Hl) || d == Cy) && u(u(ct(n.r, e), 21), 84).gc() == 1 && (r = d == Hl ? r - 2 * n.w : r, d = r9), i < r && !n.B.Hc((xu(), zP))) + d == Hl ? (v += (i - r) / (u(u(ct(n.r, e), 21), 84).gc() + 1), c += v) : v += (i - r) / (u(u(ct(n.r, e), 21), 84).gc() - 1); + else + switch (i < r && (r = d == Hl ? r - 2 * n.w : r, d = r9), d.g) { + case 3: + c += (i - r) / 2; + break; + case 4: + c += i - r; + break; + case 0: + t = (i - r) / (u(u(ct(n.r, e), 21), 84).gc() + 1), v += j.Math.max(0, t), c += v; + break; + case 1: + t = (i - r) / (u(u(ct(n.r, e), 21), 84).gc() - 1), v += j.Math.max(0, t); + } + for (p = u(u(ct(n.r, e), 21), 84).Kc(); p.Ob(); ) + g = u(p.Pb(), 111), g.e.a = (a = g.b, a.Xe((Xe(), Bu)) ? a.Hf() == (J(), Gn) ? -a.rf().a - K(Y(a.We(Bu))) : l + K(Y(a.We(Bu))) : a.Hf() == (J(), Gn) ? -a.rf().a : l), g.e.b = c + g.d.d, c += g.d.d + g.b.rf().b + g.d.a + v; + } + } + function MCe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (n.n = K(Y(k(n.g, (nn(), M0)))), n.e = K(Y(k(n.g, Ja))), n.i = n.g.b.c.length, f = n.i - 1, g = 0, n.j = 0, n.k = 0, n.a = cf(F(Ui, q, 19, n.i, 0, 1)), n.b = cf(F(Si, q, 333, n.i, 7, 1)), o = new E(n.g.b); o.a < o.c.c.length; ) { + for (r = u(y(o), 29), r.p = f, d = new E(r.a); d.a < d.c.c.length; ) + a = u(y(d), 10), a.p = g, ++g; + --f; + } + for (n.f = F(be, Le, 25, g, 15, 1), n.c = fa(be, [q, Le], [48, 25], 15, [g, 3], 2), n.o = new X(), n.p = new X(), e = 0, n.d = 0, c = new E(n.g.b); c.a < c.c.c.length; ) { + for (r = u(y(c), 29), f = r.p, i = 0, m = 0, h = r.a.c.length, l = 0, d = new E(r.a); d.a < d.c.c.length; ) + a = u(y(d), 10), g = a.p, n.f[g] = a.c.p, l += a.o.b + n.n, t = Fh(new re(ue(Lr(a).a.Kc(), new Mn()))), v = Fh(new re(ue(ei(a).a.Kc(), new Mn()))), n.c[g][0] = v - t, n.c[g][1] = t, n.c[g][2] = v, i += t, m += v, t > 0 && W(n.p, a), W(n.o, a); + e -= i, p = h + e, l += e * n.e, Es(n.a, f, Q(p)), Es(n.b, f, l), n.j = j.Math.max(n.j, p), n.k = j.Math.max(n.k, l), n.d += e, e += m; + } + } + function J() { + J = N; + var n; + Xr = new t8(K6, 0), Kn = new t8(NM, 1), Vn = new t8(lN, 2), ae = new t8(aN, 3), Gn = new t8(dN, 4), Ef = (Pn(), new Up((n = u(xo(Yi), 9), new ks(n, u(bo(n, n.length), 9), 0)))), Do = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, []))), Fs = w1(vt(Vn, A(M(Yi, 1), lc, 61, 0, []))), bs = w1(vt(ae, A(M(Yi, 1), lc, 61, 0, []))), to = w1(vt(Gn, A(M(Yi, 1), lc, 61, 0, []))), cu = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, [ae]))), qc = w1(vt(Vn, A(M(Yi, 1), lc, 61, 0, [Gn]))), $o = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, [Gn]))), Su = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, [Vn]))), ws = w1(vt(ae, A(M(Yi, 1), lc, 61, 0, [Gn]))), xs = w1(vt(Vn, A(M(Yi, 1), lc, 61, 0, [ae]))), Pu = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, [Vn, Gn]))), ru = w1(vt(Vn, A(M(Yi, 1), lc, 61, 0, [ae, Gn]))), uu = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, [ae, Gn]))), mu = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, [Vn, ae]))), Pc = w1(vt(Kn, A(M(Yi, 1), lc, 61, 0, [Vn, ae, Gn]))); + } + function v_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + if (e.b != 0) { + for (p = new Tt(), f = null, v = null, i = Gt(j.Math.floor(j.Math.log(e.b) * j.Math.LOG10E) + 1), h = 0, O = _e(e, 0); O.b != O.d.c; ) + for (S = u(Re(O), 86), B(v) !== B(k(S, (cc(), Um))) && (v = Ce(k(S, Um)), h = 0), v != null ? f = v + RMn(h++, i) : f = RMn(h++, i), H(S, Um, f), C = (r = _e(new X1(S).a.d, 0), new e2(r)); yj(C.a); ) + m = u(Re(C.a), 188).c, Ht(p, m, p.c.b, p.c), H(m, Um, f); + for (g = new we(), o = 0; o < f.length - i; o++) + for ($ = _e(e, 0); $.b != $.d.c; ) + S = u(Re($), 86), l = Zu(Ce(k(S, (cc(), Um))), 0, o + 1), t = (l == null ? Vr(Sr(g.f, null)) : n5(g.g, l)) != null ? u(l == null ? Vr(Sr(g.f, null)) : n5(g.g, l), 19).a + 1 : 1, yr(g, l, Q(t)); + for (d = new Ca(new ia(g).a); d.b; ) + a = Bd(d), c = Q(te(n.a, a.cd()) != null ? u(te(n.a, a.cd()), 19).a : 0), yr(n.a, Ce(a.cd()), Q(u(a.dd(), 19).a + c.a)), c = u(te(n.b, a.cd()), 19), (!c || c.a < u(a.dd(), 19).a) && yr(n.b, Ce(a.cd()), u(a.dd(), 19)); + v_n(n, p); + } + } + function ACe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + for (le(t, "Interactive node layering", 1), i = new X(), p = new E(e.a); p.a < p.c.c.length; ) { + for (d = u(y(p), 10), l = d.n.a, h = l + d.o.a, h = j.Math.max(l + 1, h), S = new Ii(i, 0), r = null; S.b < S.d.gc(); ) + if (m = (ne(S.b < S.d.gc()), u(S.d.Xb(S.c = S.b++), 569)), m.c >= h) { + ne(S.b > 0), S.a.Xb(S.c = --S.b); + break; + } else + m.a > l && (r ? (Zt(r.b, m.b), r.a = j.Math.max(r.a, m.a), Wu(S)) : (W(m.b, d), m.c = j.Math.min(m.c, l), m.a = j.Math.max(m.a, h), r = m)); + r || (r = new i9n(), r.c = l, r.a = h, V0(S, r), W(r.b, d)); + } + for (f = e.b, a = 0, C = new E(i); C.a < C.c.c.length; ) + for (m = u(y(C), 569), c = new Rs(e), c.p = a++, f.c[f.c.length] = c, v = new E(m.b); v.a < v.c.c.length; ) + d = u(y(v), 10), jr(d, c), d.p = 0; + for (g = new E(e.a); g.a < g.c.c.length; ) + d = u(y(g), 10), d.p == 0 && nBn(n, d, e); + for (o = new Ii(f, 0); o.b < o.d.gc(); ) + (ne(o.b < o.d.gc()), u(o.d.Xb(o.c = o.b++), 29)).a.c.length == 0 && Wu(o); + e.a.c = F(Zn, rn, 1, 0, 5, 1), ce(t); + } + function SCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + if (e.e.c.length != 0 && t.e.c.length != 0) { + if (i = u(un(e.e, 0), 17).c.i, o = u(un(t.e, 0), 17).c.i, i == o) + return Uc(u(k(u(un(e.e, 0), 17), (G(), bc)), 19).a, u(k(u(un(t.e, 0), 17), bc), 19).a); + for (a = n.a, d = 0, g = a.length; d < g; ++d) { + if (l = a[d], l == i) + return 1; + if (l == o) + return -1; + } + } + return e.g.c.length != 0 && t.g.c.length != 0 ? (c = u(k(e, (G(), M_)), 10), h = u(k(t, M_), 10), r = 0, f = 0, ai(u(un(e.g, 0), 17), bc) && (r = u(k(u(un(e.g, 0), 17), bc), 19).a), ai(u(un(t.g, 0), 17), bc) && (f = u(k(u(un(e.g, 0), 17), bc), 19).a), c && c == h ? on(sn(k(u(un(e.g, 0), 17), mf))) && !on(sn(k(u(un(t.g, 0), 17), mf))) ? 1 : !on(sn(k(u(un(e.g, 0), 17), mf))) && on(sn(k(u(un(t.g, 0), 17), mf))) || r < f ? -1 : r > f ? 1 : 0 : (n.b && (n.b._b(c) && (r = u(n.b.xc(c), 19).a), n.b._b(h) && (f = u(n.b.xc(h), 19).a)), r < f ? -1 : r > f ? 1 : 0)) : e.e.c.length != 0 && t.g.c.length != 0 ? 1 : -1; + } + function PCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en; + for (le(e, oHn, 1), m = new X(), U = new X(), l = new E(n.b); l.a < l.c.c.length; ) + for (h = u(y(l), 29), S = -1, v = I8(h.a), d = v, g = 0, p = d.length; g < p; ++g) + if (a = d[g], ++S, !!(a.k == (Qn(), ii) && Cw(u(k(a, (nn(), Bt)), 98)))) { + for (p2(u(k(a, (nn(), Bt)), 98)) || j8e(a), H(a, (G(), k0), a), m.c = F(Zn, rn, 1, 0, 5, 1), U.c = F(Zn, rn, 1, 0, 5, 1), t = new X(), x = new Tt(), nF(x, y1(a, (J(), Kn))), O_n(n, x, m, U, t), f = S, en = a, c = new E(m); c.a < c.c.c.length; ) + i = u(y(c), 10), vb(i, f, h), ++S, H(i, k0, a), o = u(un(i.j, 0), 11), C = u(k(o, rt), 11), on(sn(k(C, O_))) || u(k(i, gp), 15).Fc(en); + for (_s(x), O = y1(a, ae).Kc(); O.Ob(); ) + $ = u(O.Pb(), 11), Ht(x, $, x.a, x.a.a); + for (O_n(n, x, U, null, t), _ = a, r = new E(U); r.a < r.c.c.length; ) + i = u(y(r), 10), vb(i, ++S, h), H(i, k0, a), o = u(un(i.j, 0), 11), C = u(k(o, rt), 11), on(sn(k(C, O_))) || u(k(_, gp), 15).Fc(i); + t.c.length == 0 || H(a, hun, t); + } + ce(e); + } + function m_n(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi; + for (d = u(k(n, (dl(), hp)), 33), S = nt, $ = nt, m = Bi, C = Bi, x = new E(n.e); x.a < x.c.c.length; ) + O = u(y(x), 144), wn = O.d, zn = O.e, S = j.Math.min(S, wn.a - zn.a / 2), $ = j.Math.min($, wn.b - zn.b / 2), m = j.Math.max(m, wn.a + zn.a / 2), C = j.Math.max(C, wn.b + zn.b / 2); + for (ln = u(hn(d, (Go(), ZUn)), 116), en = new fn(ln.b - S, ln.d - $), f = new E(n.e); f.a < f.c.c.length; ) + o = u(y(f), 144), U = k(o, hp), I(U, 239) && (p = u(U, 33), _ = st(o.d, en), Jo(p, _.a - p.g / 2, _.b - p.f / 2)); + for (i = new E(n.c); i.a < i.c.c.length; ) + t = u(y(i), 282), l = u(k(t, hp), 79), a = ng(l, !0, !0), Wn = (Ye = ji(Qr(t.d.d), t.c.d), u4(Ye, t.c.e.a, t.c.e.b), st(Ye, t.c.d)), uE(a, Wn.a, Wn.b), e = (fi = ji(Qr(t.c.d), t.d.d), u4(fi, t.d.e.a, t.d.e.b), st(fi, t.d.d)), cE(a, e.a, e.b); + for (c = new E(n.d); c.a < c.c.c.length; ) + r = u(y(c), 447), g = u(k(r, hp), 137), v = st(r.d, en), Jo(g, v.a, v.b); + se = m - S + (ln.b + ln.c), h = C - $ + (ln.d + ln.a), i0(d, se, h, !1, !0); + } + function ICe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g; + for (t = null, h = null, r = u(k(n.b, (nn(), N_)), 376), r == (x8(), iy) && (t = new X(), h = new X()), f = new E(n.d); f.a < f.c.c.length; ) + if (o = u(y(f), 101), c = o.i, !!c) + switch (o.e.g) { + case 0: + e = u(G5(new o2(o.b)), 61), r == iy && e == (J(), Kn) ? t.c[t.c.length] = o : r == iy && e == (J(), ae) ? h.c[h.c.length] = o : w3e(o, e); + break; + case 1: + l = o.a.d.j, a = o.c.d.j, l == (J(), Kn) ? f1(o, Kn, (ff(), Z4), o.a) : a == Kn ? f1(o, Kn, (ff(), nv), o.c) : l == ae ? f1(o, ae, (ff(), nv), o.a) : a == ae && f1(o, ae, (ff(), Z4), o.c); + break; + case 2: + case 3: + i = o.b, lu(i, (J(), Kn)) ? lu(i, ae) ? lu(i, Gn) ? lu(i, Vn) || f1(o, Kn, (ff(), nv), o.c) : f1(o, Kn, (ff(), Z4), o.a) : f1(o, Kn, (ff(), lp), null) : f1(o, ae, (ff(), lp), null); + break; + case 4: + d = o.a.d.j, g = o.a.d.j, d == (J(), Kn) || g == Kn ? f1(o, ae, (ff(), lp), null) : f1(o, Kn, (ff(), lp), null); + } + t && (t.c.length == 0 || aRn(t, (J(), Kn)), h.c.length == 0 || aRn(h, (J(), ae))); + } + function OCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + for (i = u(k(n, (G(), rt)), 33), v = u(k(n, (nn(), VS)), 19).a, c = u(k(n, ZS), 19).a, pr(i, VS, Q(v)), pr(i, ZS, Q(c)), Zc(i, n.n.a + e.a), nu(i, n.n.b + e.b), (u(hn(i, Va), 174).gc() != 0 || n.e || B(k(qi(n), tP)) === B((b6(), Nm)) && syn((gb(), (n.q ? n.q : (Pn(), Pn(), ph))._b(E0) ? g = u(k(n, E0), 197) : g = u(k(qi(n), $m), 197), g))) && (_d(i, n.o.a), Rd(i, n.o.b)), d = new E(n.j); d.a < d.c.c.length; ) + l = u(y(d), 11), m = k(l, rt), I(m, 186) && (r = u(m, 118), Jo(r, l.n.a, l.n.b), pr(r, av, l.j)); + for (p = u(k(n, j0), 174).gc() != 0, h = new E(n.b); h.a < h.c.c.length; ) + o = u(y(h), 70), (p || u(k(o, j0), 174).gc() != 0) && (t = u(k(o, rt), 137), rE(t, o.o.a, o.o.b), Jo(t, o.n.a, o.n.b)); + if (!D5(u(k(n, Zb), 21))) + for (a = new E(n.j); a.a < a.c.c.length; ) + for (l = u(y(a), 11), f = new E(l.f); f.a < f.c.c.length; ) + o = u(y(f), 70), t = u(k(o, rt), 137), _d(t, o.o.a), Rd(t, o.o.b), Jo(t, o.n.a, o.n.b); + } + function DCe(n) { + var e, t, i, r, c; + switch (T8(n, Oqn), (!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i + (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c).i) { + case 0: + throw T(new Hn("The edge must have at least one source or target.")); + case 1: + return (!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i == 0 ? Pt(Ir(u(D((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c), 0), 82))) : Pt(Ir(u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82))); + } + if ((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b).i == 1 && (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c).i == 1) { + if (r = Ir(u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82)), c = Ir(u(D((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c), 0), 82)), Pt(r) == Pt(c)) + return Pt(r); + if (r == Pt(c)) + return r; + if (c == Pt(r)) + return c; + } + for (i = ul(of(A(M(gf, 1), rn, 20, 0, [(!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), (!n.c && (n.c = new Fn(he, n, 5, 8)), n.c)]))), e = Ir(u(ve(i), 82)); Se(i); ) + if (t = Ir(u(ve(i), 82)), t != e && !fb(t, e)) { + if (Pt(t) == Pt(e)) + e = Pt(t); + else if (e = p9e(e, t), !e) + return null; + } + return e; + } + function $Ce(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + for (le(t, "Polyline edge routing", 1), C = K(Y(k(e, (nn(), csn)))), p = K(Y(k(e, $g))), r = K(Y(k(e, Dg))), i = j.Math.min(1, r / p), O = 0, h = 0, e.b.c.length != 0 && (x = mNn(u(un(e.b, 0), 29)), O = 0.4 * i * x), f = new Ii(e.b, 0); f.b < f.d.gc(); ) { + for (o = (ne(f.b < f.d.gc()), u(f.d.Xb(f.c = f.b++), 29)), c = nE(o, cy), c && O > 0 && (O -= p), PZ(o, O), a = 0, g = new E(o.a); g.a < g.c.c.length; ) { + for (d = u(y(g), 10), l = 0, m = new re(ue(ei(d).a.Kc(), new Mn())); Se(m); ) + v = u(ve(m), 17), S = tf(v.c).b, $ = tf(v.d).b, o == v.d.i.c && !Wi(v) && (ime(v, O, 0.4 * i * j.Math.abs(S - $)), v.c.j == (J(), Gn) && (S = 0, $ = 0)), l = j.Math.max(l, j.Math.abs($ - S)); + switch (d.k.g) { + case 0: + case 4: + case 1: + case 3: + case 5: + Zje(n, d, O, C); + } + a = j.Math.max(a, l); + } + f.b < f.d.gc() && (x = mNn((ne(f.b < f.d.gc()), u(f.d.Xb(f.c = f.b++), 29))), a = j.Math.max(a, x), ne(f.b > 0), f.a.Xb(f.c = --f.b)), h = 0.4 * i * a, !c && f.b < f.d.gc() && (h += p), O += o.c.a + h; + } + n.a.a.$b(), e.f.a = O, ce(t); + } + function FCe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $; + for (a = new we(), h = new Dd(), i = new E(n.a.a.b); i.a < i.c.c.length; ) + if (e = u(y(i), 57), l = $w(e), l) + Rc(a.f, l, e); + else if ($ = S2(e), $) + for (c = new E($.k); c.a < c.c.c.length; ) + r = u(y(c), 17), Tn(h, r, e); + for (t = new E(n.a.a.b); t.a < t.c.c.length; ) + if (e = u(y(t), 57), l = $w(e), l) { + for (f = new re(ue(ei(l).a.Kc(), new Mn())); Se(f); ) + if (o = u(ve(f), 17), !Wi(o) && (v = o.c, S = o.d, !((J(), cu).Hc(o.c.j) && cu.Hc(o.d.j)))) { + if (m = u(te(a, o.d.i), 57), jo(lo(ho(ao(fo(new Ns(), 0), 100), n.c[e.a.d]), n.c[m.a.d])), v.j == Gn && TCn((bu(), v))) { + for (g = u(ct(h, o), 21).Kc(); g.Ob(); ) + if (d = u(g.Pb(), 57), d.d.c < e.d.c) { + if (p = n.c[d.a.d], C = n.c[e.a.d], p == C) + continue; + jo(lo(ho(ao(fo(new Ns(), 1), 100), p), C)); + } + } + if (S.j == Vn && CCn((bu(), S))) { + for (g = u(ct(h, o), 21).Kc(); g.Ob(); ) + if (d = u(g.Pb(), 57), d.d.c > e.d.c) { + if (p = n.c[e.a.d], C = n.c[d.a.d], p == C) + continue; + jo(lo(ho(ao(fo(new Ns(), 1), 100), p), C)); + } + } + } + } + } + function _Z(n) { + bL(); + var e, t, i, r, c, o, f, h; + if (n == null) + return null; + if (r = Pf(n, tu(37)), r < 0) + return n; + for (h = new Yu(n.substr(0, r)), e = F(ku, wg, 25, 4, 15, 1), f = 0, i = 0, o = n.length; r < o; r++) + if (Te(r, n.length), n.charCodeAt(r) == 37 && n.length > r + 2 && uF((Te(r + 1, n.length), n.charCodeAt(r + 1)), h1n, l1n) && uF((Te(r + 2, n.length), n.charCodeAt(r + 2)), h1n, l1n)) + if (t = tfe((Te(r + 1, n.length), n.charCodeAt(r + 1)), (Te(r + 2, n.length), n.charCodeAt(r + 2))), r += 2, i > 0 ? (t & 192) == 128 ? e[f++] = t << 24 >> 24 : i = 0 : t >= 128 && ((t & 224) == 192 ? (e[f++] = t << 24 >> 24, i = 2) : (t & 240) == 224 ? (e[f++] = t << 24 >> 24, i = 3) : (t & 248) == 240 && (e[f++] = t << 24 >> 24, i = 4)), i > 0) { + if (f == i) { + switch (f) { + case 2: { + sl(h, ((e[0] & 31) << 6 | e[1] & 63) & Ut); + break; + } + case 3: { + sl(h, ((e[0] & 15) << 12 | (e[1] & 63) << 6 | e[2] & 63) & Ut); + break; + } + } + f = 0, i = 0; + } + } else { + for (c = 0; c < f; ++c) + sl(h, e[c] & Ut); + f = 0, h.a += String.fromCharCode(t); + } + else { + for (c = 0; c < f; ++c) + sl(h, e[c] & Ut); + f = 0, sl(h, (Te(r, n.length), n.charCodeAt(r))); + } + return h.a; + } + function k_n(n, e, t, i, r) { + var c, o, f; + if (KPn(n, e), o = e[0], c = Di(t.c, 0), f = -1, UV(t)) + if (i > 0) { + if (o + i > n.length) + return !1; + f = tM(n.substr(0, o + i), e); + } else + f = tM(n, e); + switch (c) { + case 71: + return f = Qw(n, o, A(M(tn, 1), q, 2, 6, [nKn, eKn]), e), r.e = f, !0; + case 77: + return g7e(n, e, r, f, o); + case 76: + return p7e(n, e, r, f, o); + case 69: + return o6e(n, e, o, r); + case 99: + return f6e(n, e, o, r); + case 97: + return f = Qw(n, o, A(M(tn, 1), q, 2, 6, ["AM", "PM"]), e), r.b = f, !0; + case 121: + return v7e(n, e, o, f, t, r); + case 100: + return f <= 0 ? !1 : (r.c = f, !0); + case 83: + return f < 0 ? !1 : j2e(f, o, e[0], r); + case 104: + f == 12 && (f = 0); + case 75: + case 72: + return f < 0 ? !1 : (r.f = f, r.g = !1, !0); + case 107: + return f < 0 ? !1 : (r.f = f, r.g = !0, !0); + case 109: + return f < 0 ? !1 : (r.j = f, !0); + case 115: + return f < 0 ? !1 : (r.n = f, !0); + case 90: + if (o < n.length && (Te(o, n.length), n.charCodeAt(o) == 90)) + return ++e[0], r.o = 0, !0; + case 122: + case 118: + return $ve(n, o, e, r); + default: + return !1; + } + } + function xCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + if (g = u(u(ct(n.r, e), 21), 84), e == (J(), Vn) || e == Gn) { + a_n(n, e); + return; + } + for (c = e == Kn ? (qd(), Ik) : (qd(), Ok), x = e == Kn ? (Jc(), Wo) : (Jc(), To), t = u(wr(n.b, e), 124), i = t.i, r = i.c + Bw(A(M(Ci, 1), vr, 25, 15, [t.n.b, n.C.b, n.k])), S = i.c + i.b - Bw(A(M(Ci, 1), vr, 25, 15, [t.n.c, n.C.c, n.k])), o = vG(LU(c), n.t), $ = e == Kn ? Vt : Lt, d = g.Kc(); d.Ob(); ) + l = u(d.Pb(), 111), !(!l.c || l.c.d.c.length <= 0) && (C = l.b.rf(), m = l.e, p = l.c, v = p.i, v.b = (h = p.n, p.e.a + h.b + h.c), v.a = (f = p.n, p.e.b + f.d + f.a), T8(x, ann), p.f = x, Bo(p, (Cu(), Co)), v.c = m.a - (v.b - C.a) / 2, _ = j.Math.min(r, m.a), U = j.Math.max(S, m.a + C.a), v.c < _ ? v.c = _ : v.c + v.b > U && (v.c = U - v.b), W(o.d, new jD(v, gQ(o, v))), $ = e == Kn ? j.Math.max($, m.b + l.b.rf().b) : j.Math.min($, m.b)); + for ($ += e == Kn ? n.t : -n.t, O = DQ((o.e = $, o)), O > 0 && (u(wr(n.b, e), 124).a.b = O), a = g.Kc(); a.Ob(); ) + l = u(a.Pb(), 111), !(!l.c || l.c.d.c.length <= 0) && (v = l.c.i, v.c -= l.e.a, v.d -= l.e.b); + } + function LCe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p; + for (e = new we(), h = new ie(n); h.e != h.i.gc(); ) { + for (f = u(oe(h), 33), t = new hi(), it(DR, f, t), p = new lan(), r = u(ts(new $n(null, new Td(new re(ue(N7(f).a.Kc(), new Mn())))), hCn(p, pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [(hf(), ls)])))), 83), $In(t, u(r.xc((qn(), !0)), 14), new aan()), i = u(ts(pt(u(r.xc(!1), 15).Lc(), new dan()), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [ls]))), 15), o = i.Kc(); o.Ob(); ) + c = u(o.Pb(), 79), g = mxn(c), g && (l = u(Vr(Sr(e.f, g)), 21), l || (l = RNn(g), Rc(e.f, g, l)), Xi(t, l)); + for (r = u(ts(new $n(null, new Td(new re(ue(Gh(f).a.Kc(), new Mn())))), hCn(p, pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [ls])))), 83), $In(t, u(r.xc(!0), 14), new ban()), i = u(ts(pt(u(r.xc(!1), 15).Lc(), new wan()), pa(new U1(), new z1(), new W1(), A(M(Nu, 1), z, 132, 0, [ls]))), 15), d = i.Kc(); d.Ob(); ) + a = u(d.Pb(), 79), g = kxn(a), g && (l = u(Vr(Sr(e.f, g)), 21), l || (l = RNn(g), Rc(e.f, g, l)), Xi(t, l)); + } + } + function NCe(n, e) { + oL(); + var t, i, r, c, o, f, h, l, a, d, g, p, v, m; + if (h = hc(n, 0) < 0, h && (n = S3(n)), hc(n, 0) == 0) + switch (e) { + case 0: + return "0"; + case 1: + return A4; + case 2: + return "0.00"; + case 3: + return "0.000"; + case 4: + return "0.0000"; + case 5: + return "0.00000"; + case 6: + return "0.000000"; + default: + return p = new V1(), e < 0 ? p.a += "0E+" : p.a += "0E", p.a += e == Bi ? "2147483648" : "" + -e, p.a; + } + a = 18, d = F(Ls, Bf, 25, a + 1, 15, 1), t = a, m = n; + do + l = m, m = M7(m, 10), d[--t] = ge(Hi(48, vl(l, Ni(m, 10)))) & Ut; + while (hc(m, 0) != 0); + if (r = vl(vl(vl(a, t), e), 1), e == 0) + return h && (d[--t] = 45), Hs(d, t, a - t); + if (e > 0 && hc(r, -6) >= 0) { + if (hc(r, 0) >= 0) { + for (c = t + ge(r), f = a - 1; f >= c; f--) + d[f + 1] = d[f]; + return d[++c] = 46, h && (d[--t] = 45), Hs(d, t, a - t + 1); + } + for (o = 2; cO(o, Hi(S3(r), 1)); o++) + d[--t] = 48; + return d[--t] = 46, d[--t] = 48, h && (d[--t] = 45), Hs(d, t, a - t); + } + return v = t + 1, i = a, g = new _0(), h && (g.a += "-"), i - v >= 1 ? (sl(g, d[t]), g.a += ".", g.a += Hs(d, t + 1, a - t - 1)) : g.a += Hs(d, t, a - t), g.a += "E", hc(r, 0) > 0 && (g.a += "+"), g.a += "" + O5(r), g.a; + } + function BCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + if (n.e.a.$b(), n.f.a.$b(), n.c.c = F(Zn, rn, 1, 0, 5, 1), n.i.c = F(Zn, rn, 1, 0, 5, 1), n.g.a.$b(), e) + for (o = new E(e.a); o.a < o.c.c.length; ) + for (c = u(y(o), 10), d = y1(c, (J(), Vn)).Kc(); d.Ob(); ) + for (a = u(d.Pb(), 11), ci(n.e, a), r = new E(a.g); r.a < r.c.c.length; ) + i = u(y(r), 17), !Wi(i) && (W(n.c, i), z$n(n, i), f = i.c.i.k, (f == (Qn(), ii) || f == Mc || f == Xt || f == vf) && W(n.j, i), p = i.d, g = p.i.c, g == t ? ci(n.f, p) : g == e ? ci(n.e, p) : Qc(n.c, i)); + if (t) + for (o = new E(t.a); o.a < o.c.c.length; ) { + for (c = u(y(o), 10), l = new E(c.j); l.a < l.c.c.length; ) + for (h = u(y(l), 11), r = new E(h.g); r.a < r.c.c.length; ) + i = u(y(r), 17), Wi(i) && ci(n.g, i); + for (d = y1(c, (J(), Gn)).Kc(); d.Ob(); ) + for (a = u(d.Pb(), 11), ci(n.f, a), r = new E(a.g); r.a < r.c.c.length; ) + i = u(y(r), 17), !Wi(i) && (W(n.c, i), z$n(n, i), f = i.c.i.k, (f == (Qn(), ii) || f == Mc || f == Xt || f == vf) && W(n.j, i), p = i.d, g = p.i.c, g == t ? ci(n.f, p) : g == e ? ci(n.e, p) : Qc(n.c, i)); + } + } + function i0(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + if (C = new fn(n.g, n.f), m = sY(n), m.a = j.Math.max(m.a, e), m.b = j.Math.max(m.b, t), U = m.a / C.a, a = m.b / C.b, x = m.a - C.a, h = m.b - C.b, i) + for (o = Pt(n) ? u(hn(Pt(n), (Xe(), S0)), 103) : u(hn(n, (Xe(), S0)), 103), f = B(hn(n, (Xe(), n9))) === B((Ai(), Sc)), $ = new ie((!n.c && (n.c = new V(Ru, n, 9, 9)), n.c)); $.e != $.i.gc(); ) + switch (S = u(oe($), 118), O = u(hn(S, Hg), 61), O == (J(), Xr) && (O = mZ(S, o), pr(S, Hg, O)), O.g) { + case 1: + f || Zc(S, S.i * U); + break; + case 2: + Zc(S, S.i + x), f || nu(S, S.j * a); + break; + case 3: + f || Zc(S, S.i * U), nu(S, S.j + h); + break; + case 4: + f || nu(S, S.j * a); + } + if (rE(n, m.a, m.b), r) + for (g = new ie((!n.n && (n.n = new V(Rr, n, 1, 7)), n.n)); g.e != g.i.gc(); ) + d = u(oe(g), 137), p = d.i + d.g / 2, v = d.j + d.f / 2, _ = p / C.a, l = v / C.b, _ + l >= 1 && (_ - l > 0 && v >= 0 ? (Zc(d, d.i + x), nu(d, d.j + h * l)) : _ - l < 0 && p >= 0 && (Zc(d, d.i + x * _), nu(d, d.j + h))); + return pr(n, (Xe(), nd), (Qu(), c = u(xo(o9), 9), new ks(c, u(bo(c, c.length), 9), 0))), new fn(U, a); + } + function y_n(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v; + if (p = Pt(Ir(u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82))), v = Pt(Ir(u(D((!n.c && (n.c = new Fn(he, n, 5, 8)), n.c), 0), 82))), d = p == v, f = new Li(), e = u(hn(n, (wT(), Lhn)), 74), e && e.b >= 2) { + if ((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i == 0) + t = (dd(), r = new Vy(), r), me((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a), t); + else if ((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i > 1) + for (g = new b2((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a)); g.e != g.i.gc(); ) + p6(g); + z7(e, u(D((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a), 0), 202)); + } + if (d) + for (i = new ie((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a)); i.e != i.i.gc(); ) + for (t = u(oe(i), 202), l = new ie((!t.a && (t.a = new Yt(io, t, 5)), t.a)); l.e != l.i.gc(); ) + h = u(oe(l), 469), f.a = j.Math.max(f.a, h.a), f.b = j.Math.max(f.b, h.b); + for (o = new ie((!n.n && (n.n = new V(Rr, n, 1, 7)), n.n)); o.e != o.i.gc(); ) + c = u(oe(o), 137), a = u(hn(c, t9), 8), a && Jo(c, a.a, a.b), d && (f.a = j.Math.max(f.a, c.i + c.g), f.b = j.Math.max(f.b, c.j + c.f)); + return f; + } + function RCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln; + for (O = e.c.length, r = new tg(n.a, t, null, null), ln = F(Ci, vr, 25, O, 15, 1), m = F(Ci, vr, 25, O, 15, 1), v = F(Ci, vr, 25, O, 15, 1), C = 0, f = 0; f < O; f++) + m[f] = nt, v[f] = Bi; + for (h = 0; h < O; h++) + for (i = (Ln(h, e.c.length), u(e.c[h], 180)), ln[h] = Nx(i), ln[C] > ln[h] && (C = h), d = new E(n.a.b); d.a < d.c.c.length; ) + for (a = u(y(d), 29), $ = new E(a.a); $.a < $.c.c.length; ) + S = u(y($), 10), U = K(i.p[S.p]) + K(i.d[S.p]), m[h] = j.Math.min(m[h], U), v[h] = j.Math.max(v[h], U + S.o.b); + for (en = F(Ci, vr, 25, O, 15, 1), l = 0; l < O; l++) + (Ln(l, e.c.length), u(e.c[l], 180)).o == (ef(), Ya) ? en[l] = m[C] - m[l] : en[l] = v[C] - v[l]; + for (c = F(Ci, vr, 25, O, 15, 1), p = new E(n.a.b); p.a < p.c.c.length; ) + for (g = u(y(p), 29), _ = new E(g.a); _.a < _.c.c.length; ) { + for (x = u(y(_), 10), o = 0; o < O; o++) + c[o] = K((Ln(o, e.c.length), u(e.c[o], 180)).p[x.p]) + K((Ln(o, e.c.length), u(e.c[o], 180)).d[x.p]) + en[o]; + c.sort(gIn(zy.prototype.te, zy, [])), r.p[x.p] = (c[1] + c[2]) / 2, r.d[x.p] = 0; + } + return r; + } + function _Ce(n, e, t) { + var i, r, c, o, f; + switch (i = e.i, c = n.i.o, r = n.i.d, f = n.n, o = Gr(A(M(di, 1), q, 8, 0, [f, n.a])), n.j.g) { + case 1: + Of(e, (Jc(), To)), i.d = -r.d - t - i.a, u(u(un(e.d, 0), 181).We((G(), pp)), 285) == (us(), kh) ? (Bo(e, (Cu(), Co)), i.c = o.a - K(Y(k(n, Sg))) - t - i.b) : (Bo(e, (Cu(), Xf)), i.c = o.a + K(Y(k(n, Sg))) + t); + break; + case 2: + Bo(e, (Cu(), Xf)), i.c = c.a + r.c + t, u(u(un(e.d, 0), 181).We((G(), pp)), 285) == (us(), kh) ? (Of(e, (Jc(), To)), i.d = o.b - K(Y(k(n, Sg))) - t - i.a) : (Of(e, (Jc(), Wo)), i.d = o.b + K(Y(k(n, Sg))) + t); + break; + case 3: + Of(e, (Jc(), Wo)), i.d = c.b + r.a + t, u(u(un(e.d, 0), 181).We((G(), pp)), 285) == (us(), kh) ? (Bo(e, (Cu(), Co)), i.c = o.a - K(Y(k(n, Sg))) - t - i.b) : (Bo(e, (Cu(), Xf)), i.c = o.a + K(Y(k(n, Sg))) + t); + break; + case 4: + Bo(e, (Cu(), Co)), i.c = -r.b - t - i.b, u(u(un(e.d, 0), 181).We((G(), pp)), 285) == (us(), kh) ? (Of(e, (Jc(), To)), i.d = o.b - K(Y(k(n, Sg))) - t - i.a) : (Of(e, (Jc(), Wo)), i.d = o.b + K(Y(k(n, Sg))) + t); + } + } + function KCe(n, e, t, i, r, c, o) { + var f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi; + for (p = 0, zn = 0, h = new E(n); h.a < h.c.c.length; ) + f = u(y(h), 33), r_n(f), p = j.Math.max(p, f.g), zn += f.g * f.f; + for (v = zn / n.c.length, wn = q3e(n, v), zn += n.c.length * wn, p = j.Math.max(p, j.Math.sqrt(zn * o)) + t.b, Ye = t.b, fi = t.d, g = 0, a = t.b + t.c, ln = new Tt(), Ke(ln, Q(0)), U = new Tt(), l = new Ii(n, 0); l.b < l.d.gc(); ) + f = (ne(l.b < l.d.gc()), u(l.d.Xb(l.c = l.b++), 33)), se = f.g, d = f.f, Ye + se > p && (c && (sa(U, g), sa(ln, Q(l.b - 1))), Ye = t.b, fi += g + e, g = 0, a = j.Math.max(a, t.b + t.c + se)), Zc(f, Ye), nu(f, fi), a = j.Math.max(a, Ye + se + t.c), g = j.Math.max(g, d), Ye += se + e; + if (a = j.Math.max(a, i), Wn = fi + g + t.a, Wn < r && (g += r - Wn, Wn = r), c) + for (Ye = t.b, l = new Ii(n, 0), sa(ln, Q(n.c.length)), en = _e(ln, 0), S = u(Re(en), 19).a, sa(U, g), _ = _e(U, 0), x = 0; l.b < l.d.gc(); ) + l.b == S && (Ye = t.b, x = K(Y(Re(_))), S = u(Re(en), 19).a), f = (ne(l.b < l.d.gc()), u(l.d.Xb(l.c = l.b++), 33)), $ = f.f, Rd(f, x), m = x, l.b == S && (C = a - Ye - t.c, O = f.g, _d(f, C), eLn(f, new fn(C, m), new fn(O, $))), Ye += f.g + e; + return new fn(a, Wn); + } + function HCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn; + for (le(e, "Compound graph postprocessor", 1), t = on(sn(k(n, (nn(), U_)))), f = u(k(n, (G(), dun)), 224), a = new hi(), S = f.ec().Kc(); S.Ob(); ) { + for (C = u(S.Pb(), 17), o = new au(f.cc(C)), Pn(), wi(o, new Iq(n)), _ = Cbe((Ln(0, o.c.length), u(o.c[0], 243))), en = hOn(u(un(o, o.c.length - 1), 243)), O = _.i, _3(en.i, O) ? $ = O.e : $ = qi(O), d = Ape(C, o), _s(C.a), g = null, c = new E(o); c.a < c.c.c.length; ) + r = u(y(c), 243), m = new Li(), rY(m, r.a, $), p = r.b, i = new fu(), vF(i, 0, p.a), hb(i, m), x = new kr(tf(p.c)), U = new kr(tf(p.d)), st(x, m), st(U, m), g && (i.b == 0 ? v = U : v = (ne(i.b != 0), u(i.a.a.c, 8)), ln = j.Math.abs(g.a - v.a) > Kf, wn = j.Math.abs(g.b - v.b) > Kf, (!t && ln && wn || t && (ln || wn)) && Ke(C.a, x)), Xi(C.a, i), i.b == 0 ? g = x : g = (ne(i.b != 0), u(i.c.b.c, 8)), iwe(p, d, m), hOn(r) == en && (qi(en.i) != r.a && (m = new Li(), rY(m, qi(en.i), $)), H(C, I_, m)), A5e(p, C, $), a.a.zc(p, a); + Ki(C, _), Ti(C, en); + } + for (l = a.a.ec().Kc(); l.Ob(); ) + h = u(l.Pb(), 17), Ki(h, null), Ti(h, null); + ce(e); + } + function j_n(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + if (n.gc() == 1) + return u(n.Xb(0), 231); + if (n.gc() <= 0) + return new TC(); + for (r = n.Kc(); r.Ob(); ) { + for (t = u(r.Pb(), 231), v = 0, a = nt, d = nt, h = Bi, l = Bi, p = new E(t.e); p.a < p.c.c.length; ) + g = u(y(p), 144), v += u(k(g, (Go(), V4)), 19).a, a = j.Math.min(a, g.d.a - g.e.a / 2), d = j.Math.min(d, g.d.b - g.e.b / 2), h = j.Math.max(h, g.d.a + g.e.a / 2), l = j.Math.max(l, g.d.b + g.e.b / 2); + H(t, (Go(), V4), Q(v)), H(t, (dl(), vm), new fn(a, d)), H(t, Bk, new fn(h, l)); + } + for (Pn(), n.ad(new pan()), m = new TC(), Pr(m, u(n.Xb(0), 94)), f = 0, $ = 0, c = n.Kc(); c.Ob(); ) + t = u(c.Pb(), 231), C = ji(Qr(u(k(t, (dl(), Bk)), 8)), u(k(t, vm), 8)), f = j.Math.max(f, C.a), $ += C.a * C.b; + for (f = j.Math.max(f, j.Math.sqrt($) * K(Y(k(m, (Go(), XUn))))), S = K(Y(k(m, rS))), O = 0, x = 0, o = 0, e = S, i = n.Kc(); i.Ob(); ) + t = u(i.Pb(), 231), C = ji(Qr(u(k(t, (dl(), Bk)), 8)), u(k(t, vm), 8)), O + C.a > f && (O = 0, x += o + S, o = 0), Tke(m, t, O, x), e = j.Math.max(e, O + C.a), o = j.Math.max(o, C.b), O += C.a + S; + return m; + } + function E_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + switch (a = new fu(), n.a.g) { + case 3: + g = u(k(e.e, (G(), Wa)), 15), p = u(k(e.j, Wa), 15), v = u(k(e.f, Wa), 15), t = u(k(e.e, Og), 15), i = u(k(e.j, Og), 15), r = u(k(e.f, Og), 15), o = new X(), Zt(o, g), p.Jc(new pwn()), Zt(o, I(p, 152) ? I2(u(p, 152)) : I(p, 131) ? u(p, 131).a : I(p, 54) ? new od(p) : new K0(p)), Zt(o, v), c = new X(), Zt(c, t), Zt(c, I(i, 152) ? I2(u(i, 152)) : I(i, 131) ? u(i, 131).a : I(i, 54) ? new od(i) : new K0(i)), Zt(c, r), H(e.f, Wa, o), H(e.f, Og, c), H(e.f, yun, e.f), H(e.e, Wa, null), H(e.e, Og, null), H(e.j, Wa, null), H(e.j, Og, null); + break; + case 1: + Xi(a, e.e.a), Ke(a, e.i.n), Xi(a, ma(e.j.a)), Ke(a, e.a.n), Xi(a, e.f.a); + break; + default: + Xi(a, e.e.a), Xi(a, ma(e.j.a)), Xi(a, e.f.a); + } + _s(e.f.a), Xi(e.f.a, a), Ki(e.f, e.e.c), f = u(k(e.e, (nn(), Mr)), 74), l = u(k(e.j, Mr), 74), h = u(k(e.f, Mr), 74), (f || l || h) && (d = new fu(), AW(d, h), AW(d, l), AW(d, f), H(e.f, Mr, d)), Ki(e.j, null), Ti(e.j, null), Ki(e.e, null), Ti(e.e, null), jr(e.a, null), jr(e.i, null), e.g && E_n(n, e.g); + } + function qCe(n) { + vZ(); + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + if (n == null || (c = NC(n), v = Ige(c), v % 4 != 0)) + return null; + if (m = v / 4 | 0, m == 0) + return F(ku, wg, 25, 0, 15, 1); + for (d = null, e = 0, t = 0, i = 0, r = 0, o = 0, f = 0, h = 0, l = 0, p = 0, g = 0, a = 0, d = F(ku, wg, 25, m * 3, 15, 1); p < m - 1; p++) { + if (!B9(o = c[a++]) || !B9(f = c[a++]) || !B9(h = c[a++]) || !B9(l = c[a++])) + return null; + e = Tf[o], t = Tf[f], i = Tf[h], r = Tf[l], d[g++] = (e << 2 | t >> 4) << 24 >> 24, d[g++] = ((t & 15) << 4 | i >> 2 & 15) << 24 >> 24, d[g++] = (i << 6 | r) << 24 >> 24; + } + return !B9(o = c[a++]) || !B9(f = c[a++]) ? null : (e = Tf[o], t = Tf[f], h = c[a++], l = c[a++], Tf[h] == -1 || Tf[l] == -1 ? h == 61 && l == 61 ? t & 15 ? null : (C = F(ku, wg, 25, p * 3 + 1, 15, 1), pc(d, 0, C, 0, p * 3), C[g] = (e << 2 | t >> 4) << 24 >> 24, C) : h != 61 && l == 61 ? (i = Tf[h], i & 3 ? null : (C = F(ku, wg, 25, p * 3 + 2, 15, 1), pc(d, 0, C, 0, p * 3), C[g++] = (e << 2 | t >> 4) << 24 >> 24, C[g] = ((t & 15) << 4 | i >> 2 & 15) << 24 >> 24, C)) : null : (i = Tf[h], r = Tf[l], d[g++] = (e << 2 | t >> 4) << 24 >> 24, d[g++] = ((t & 15) << 4 | i >> 2 & 15) << 24 >> 24, d[g++] = (i << 6 | r) << 24 >> 24, d)); + } + function GCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _; + for (le(e, oHn, 1), v = u(k(n, (nn(), Qh)), 218), r = new E(n.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), l = I8(i.a), o = l, f = 0, h = o.length; f < h; ++f) + if (c = o[f], c.k == (Qn(), Mc)) { + if (v == (Hh(), Sp)) + for (d = new E(c.j); d.a < d.c.c.length; ) + a = u(y(d), 11), a.e.c.length == 0 || fpe(a), a.g.c.length == 0 || hpe(a); + else if (I(k(c, (G(), rt)), 17)) + C = u(k(c, rt), 17), S = u(y1(c, (J(), Gn)).Kc().Pb(), 11), $ = u(y1(c, Vn).Kc().Pb(), 11), O = u(k(S, rt), 11), x = u(k($, rt), 11), Ki(C, x), Ti(C, O), _ = new kr($.i.n), _.a = Gr(A(M(di, 1), q, 8, 0, [x.i.n, x.n, x.a])).a, Ke(C.a, _), _ = new kr(S.i.n), _.a = Gr(A(M(di, 1), q, 8, 0, [O.i.n, O.n, O.a])).a, Ke(C.a, _); + else { + if (c.j.c.length >= 2) { + for (m = !0, g = new E(c.j), t = u(y(g), 11), p = null; g.a < g.c.c.length; ) + if (p = t, t = u(y(g), 11), !tt(k(p, rt), k(t, rt))) { + m = !1; + break; + } + } else + m = !1; + for (d = new E(c.j); d.a < d.c.c.length; ) + a = u(y(d), 11), a.e.c.length == 0 || N8e(a, m), a.g.c.length == 0 || B8e(a, m); + } + jr(c, null); + } + ce(e); + } + function C_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln; + return O = n.c[(Ln(0, e.c.length), u(e.c[0], 17)).p], en = n.c[(Ln(1, e.c.length), u(e.c[1], 17)).p], O.a.e.e - O.a.a - (O.b.e.e - O.b.a) == 0 && en.a.e.e - en.a.a - (en.b.e.e - en.b.a) == 0 || (S = O.b.e.f, !I(S, 10)) ? !1 : (C = u(S, 10), _ = n.i[C.p], U = C.c ? xr(C.c.a, C, 0) : -1, c = Lt, U > 0 && (r = u(un(C.c.a, U - 1), 10), o = n.i[r.p], ln = j.Math.ceil(Mw(n.n, r, C)), c = _.a.e - C.d.d - (o.a.e + r.o.b + r.d.a) - ln), l = Lt, U < C.c.a.c.length - 1 && (h = u(un(C.c.a, U + 1), 10), a = n.i[h.p], ln = j.Math.ceil(Mw(n.n, h, C)), l = a.a.e - h.d.d - (_.a.e + C.o.b + C.d.a) - ln), t && (Yo(), mo(Gf), j.Math.abs(c - l) <= Gf || c == l || isNaN(c) && isNaN(l)) ? !0 : (i = $D(O.a), f = -$D(O.b), d = -$D(en.a), $ = $D(en.b), m = O.a.e.e - O.a.a - (O.b.e.e - O.b.a) > 0 && en.a.e.e - en.a.a - (en.b.e.e - en.b.a) < 0, v = O.a.e.e - O.a.a - (O.b.e.e - O.b.a) < 0 && en.a.e.e - en.a.a - (en.b.e.e - en.b.a) > 0, p = O.a.e.e + O.b.a < en.b.e.e + en.a.a, g = O.a.e.e + O.b.a > en.b.e.e + en.a.a, x = 0, !m && !v && (g ? c + d > 0 ? x = d : l - i > 0 && (x = i) : p && (c + f > 0 ? x = f : l - $ > 0 && (x = $))), _.a.e += x, _.b && (_.d.e += x), !1)); + } + function T_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + if (i = new ys(e.qf().a, e.qf().b, e.rf().a, e.rf().b), r = new d2(), n.c) + for (o = new E(e.wf()); o.a < o.c.c.length; ) + c = u(y(o), 181), r.c = c.qf().a + e.qf().a, r.d = c.qf().b + e.qf().b, r.b = c.rf().a, r.a = c.rf().b, m6(i, r); + for (l = new E(e.Cf()); l.a < l.c.c.length; ) { + if (h = u(y(l), 838), a = h.qf().a + e.qf().a, d = h.qf().b + e.qf().b, n.e && (r.c = a, r.d = d, r.b = h.rf().a, r.a = h.rf().b, m6(i, r)), n.d) + for (o = new E(h.wf()); o.a < o.c.c.length; ) + c = u(y(o), 181), r.c = c.qf().a + a, r.d = c.qf().b + d, r.b = c.rf().a, r.a = c.rf().b, m6(i, r); + if (n.b) { + if (g = new fn(-t, -t), u(e.We((Xe(), cw)), 174).Hc((Tu(), Gl))) + for (o = new E(h.wf()); o.a < o.c.c.length; ) + c = u(y(o), 181), g.a += c.rf().a + t, g.b += c.rf().b + t; + g.a = j.Math.max(g.a, 0), g.b = j.Math.max(g.b, 0), WBn(i, h.Bf(), h.zf(), e, h, g, t); + } + } + n.b && WBn(i, e.Bf(), e.zf(), e, null, null, t), f = new oD(e.Af()), f.d = j.Math.max(0, e.qf().b - i.d), f.a = j.Math.max(0, i.d + i.a - (e.qf().b + e.rf().b)), f.b = j.Math.max(0, e.qf().a - i.c), f.c = j.Math.max(0, i.c + i.b - (e.qf().a + e.rf().a)), e.Ef(f); + } + function zCe() { + var n = ["\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000B", "\\f", "\\r", "\\u000E", "\\u000F", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D", "\\u001E", "\\u001F"]; + return n[34] = '\\"', n[92] = "\\\\", n[173] = "\\u00ad", n[1536] = "\\u0600", n[1537] = "\\u0601", n[1538] = "\\u0602", n[1539] = "\\u0603", n[1757] = "\\u06dd", n[1807] = "\\u070f", n[6068] = "\\u17b4", n[6069] = "\\u17b5", n[8203] = "\\u200b", n[8204] = "\\u200c", n[8205] = "\\u200d", n[8206] = "\\u200e", n[8207] = "\\u200f", n[8232] = "\\u2028", n[8233] = "\\u2029", n[8234] = "\\u202a", n[8235] = "\\u202b", n[8236] = "\\u202c", n[8237] = "\\u202d", n[8238] = "\\u202e", n[8288] = "\\u2060", n[8289] = "\\u2061", n[8290] = "\\u2062", n[8291] = "\\u2063", n[8292] = "\\u2064", n[8298] = "\\u206a", n[8299] = "\\u206b", n[8300] = "\\u206c", n[8301] = "\\u206d", n[8302] = "\\u206e", n[8303] = "\\u206f", n[65279] = "\\ufeff", n[65529] = "\\ufff9", n[65530] = "\\ufffa", n[65531] = "\\ufffb", n; + } + function UCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g; + for (h = new X(), d = e.length, o = HV(t), l = 0; l < d; ++l) { + switch (a = qz(e, tu(61), l), i = Sge(o, e.substr(l, a - l)), r = iF(i), c = r.Aj().Nh(), Di(e, ++a)) { + case 39: { + f = c3(e, 39, ++a), W(h, new Yj(i, zD(e.substr(a, f - a), c, r))), l = f + 1; + break; + } + case 34: { + f = c3(e, 34, ++a), W(h, new Yj(i, zD(e.substr(a, f - a), c, r))), l = f + 1; + break; + } + case 91: { + g = new X(), W(h, new Yj(i, g)); + n: + for (; ; ) { + switch (Di(e, ++a)) { + case 39: { + f = c3(e, 39, ++a), W(g, zD(e.substr(a, f - a), c, r)), a = f + 1; + break; + } + case 34: { + f = c3(e, 34, ++a), W(g, zD(e.substr(a, f - a), c, r)), a = f + 1; + break; + } + case 110: { + if (++a, e.indexOf("ull", a) == a) + g.c[g.c.length] = null; + else + throw T(new _r(pqn)); + a += 3; + break; + } + } + if (a < d) + switch (Te(a, e.length), e.charCodeAt(a)) { + case 44: + break; + case 93: + break n; + default: + throw T(new _r("Expecting , or ]")); + } + else + break; + } + l = a + 1; + break; + } + case 110: { + if (++a, e.indexOf("ull", a) == a) + W(h, new Yj(i, null)); + else + throw T(new _r(pqn)); + l = a + 3; + break; + } + } + if (l < d) { + if (Te(l, e.length), e.charCodeAt(l) != 44) + throw T(new _r("Expecting ,")); + } else + break; + } + return h7e(n, h, t); + } + function M_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (l = u(u(ct(n.r, e), 21), 84), o = Uve(n, e), t = n.u.Hc((Tu(), u9)), h = l.Kc(); h.Ob(); ) + if (f = u(h.Pb(), 111), !(!f.c || f.c.d.c.length <= 0)) { + switch (g = f.b.rf(), a = f.c, d = a.i, d.b = (c = a.n, a.e.a + c.b + c.c), d.a = (r = a.n, a.e.b + r.d + r.a), e.g) { + case 1: + f.a ? (d.c = (g.a - d.b) / 2, Bo(a, (Cu(), Ol))) : o || t ? (d.c = -d.b - n.s, Bo(a, (Cu(), Co))) : (d.c = g.a + n.s, Bo(a, (Cu(), Xf))), d.d = -d.a - n.t, Of(a, (Jc(), To)); + break; + case 3: + f.a ? (d.c = (g.a - d.b) / 2, Bo(a, (Cu(), Ol))) : o || t ? (d.c = -d.b - n.s, Bo(a, (Cu(), Co))) : (d.c = g.a + n.s, Bo(a, (Cu(), Xf))), d.d = g.b + n.t, Of(a, (Jc(), Wo)); + break; + case 2: + f.a ? (i = n.v ? d.a : u(un(a.d, 0), 181).rf().b, d.d = (g.b - i) / 2, Of(a, (Jc(), Dl))) : o || t ? (d.d = -d.a - n.t, Of(a, (Jc(), To))) : (d.d = g.b + n.t, Of(a, (Jc(), Wo))), d.c = g.a + n.s, Bo(a, (Cu(), Xf)); + break; + case 4: + f.a ? (i = n.v ? d.a : u(un(a.d, 0), 181).rf().b, d.d = (g.b - i) / 2, Of(a, (Jc(), Dl))) : o || t ? (d.d = -d.a - n.t, Of(a, (Jc(), To))) : (d.d = g.b + n.t, Of(a, (Jc(), Wo))), d.c = -d.b - n.s, Bo(a, (Cu(), Co)); + } + o = !1; + } + } + function El(n, e) { + Je(); + var t, i, r, c, o, f, h, l, a, d, g, p, v; + if (Xv(Sv) == 0) { + for (d = F(aMe, q, 117, See.length, 0, 1), o = 0; o < d.length; o++) + d[o] = new es(4); + for (i = new zv(), c = 0; c < L1n.length; c++) { + if (a = new es(4), c < 84 ? (f = c * 2, p = (Te(f, tR.length), tR.charCodeAt(f)), g = (Te(f + 1, tR.length), tR.charCodeAt(f + 1)), jc(a, p, g)) : (f = (c - 84) * 2, jc(a, N1n[f], N1n[f + 1])), h = L1n[c], An(h, "Specials") && jc(a, 65520, 65533), An(h, ezn) && (jc(a, 983040, 1048573), jc(a, 1048576, 1114109)), yr(Sv, h, a), yr(m9, h, Ab(a)), l = i.a.length, 0 < l ? i.a = i.a.substr(0, 0) : 0 > l && (i.a += Iyn(F(Ls, Bf, 25, -l, 15, 1))), i.a += "Is", Pf(h, tu(32)) >= 0) + for (r = 0; r < h.length; r++) + Te(r, h.length), h.charCodeAt(r) != 32 && b3(i, (Te(r, h.length), h.charCodeAt(r))); + else + i.a += "" + h; + BQ(i.a, h, !0); + } + BQ(eR, "Cn", !1), BQ(sin, "Cn", !0), t = new es(4), jc(t, 0, H4), yr(Sv, "ALL", t), yr(m9, "ALL", Ab(t)), !dw && (dw = new we()), yr(dw, eR, eR), !dw && (dw = new we()), yr(dw, sin, sin), !dw && (dw = new we()), yr(dw, "ALL", "ALL"); + } + return v = u(mc(e ? Sv : m9, n), 136), v; + } + function WCe(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $; + if (g = !1, d = !1, Cw(u(k(i, (nn(), Bt)), 98))) { + o = !1, f = !1; + n: + for (v = new E(i.j); v.a < v.c.c.length; ) + for (p = u(y(v), 11), C = ul(of(A(M(gf, 1), rn, 20, 0, [new Hp(p), new n2(p)]))); Se(C); ) + if (m = u(ve(C), 11), !on(sn(k(m.i, Im)))) { + if (p.j == (J(), Kn)) { + o = !0; + break n; + } + if (p.j == ae) { + f = !0; + break n; + } + } + g = f && !o, d = o && !f; + } + if (!g && !d && i.b.c.length != 0) { + for (a = 0, l = new E(i.b); l.a < l.c.c.length; ) + h = u(y(l), 70), a += h.n.b + h.o.b / 2; + a /= i.b.c.length, $ = a >= i.o.b / 2; + } else + $ = !d; + $ ? (S = u(k(i, (G(), mp)), 15), S ? g ? c = S : (r = u(k(i, bp), 15), r ? S.gc() <= r.gc() ? c = S : c = r : (c = new X(), H(i, bp, c))) : (c = new X(), H(i, mp, c))) : (r = u(k(i, (G(), bp)), 15), r ? d ? c = r : (S = u(k(i, mp), 15), S ? r.gc() <= S.gc() ? c = r : c = S : (c = new X(), H(i, mp, c))) : (c = new X(), H(i, bp, c))), c.Fc(n), H(n, (G(), _S), t), e.d == t ? (Ti(e, null), t.e.c.length + t.g.c.length == 0 && Hr(t, null), Bwe(t)) : (Ki(e, null), t.e.c.length + t.g.c.length == 0 && Hr(t, null)), _s(e.a); + } + function XCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye; + for ($ = new Ii(n.b, 0), a = e.Kc(), v = 0, l = u(a.Pb(), 19).a, _ = 0, t = new hi(), en = new Sh(); $.b < $.d.gc(); ) { + for (S = (ne($.b < $.d.gc()), u($.d.Xb($.c = $.b++), 29)), x = new E(S.a); x.a < x.c.c.length; ) { + for (O = u(y(x), 10), p = new re(ue(ei(O).a.Kc(), new Mn())); Se(p); ) + d = u(ve(p), 17), en.a.zc(d, en); + for (g = new re(ue(Lr(O).a.Kc(), new Mn())); Se(g); ) + d = u(ve(g), 17), en.a.Bc(d) != null; + } + if (v + 1 == l) { + for (r = new Rs(n), V0($, r), c = new Rs(n), V0($, c), wn = en.a.ec().Kc(); wn.Ob(); ) + ln = u(wn.Pb(), 17), t.a._b(ln) || (++_, t.a.zc(ln, t)), o = new qh(n), H(o, (nn(), Bt), (Ai(), Cv)), jr(o, r), ta(o, (Qn(), vf)), m = new gc(), Hr(m, o), si(m, (J(), Gn)), zn = new gc(), Hr(zn, o), si(zn, Vn), i = new qh(n), H(i, Bt, Cv), jr(i, c), ta(i, vf), C = new gc(), Hr(C, i), si(C, Gn), Wn = new gc(), Hr(Wn, i), si(Wn, Vn), U = new Id(), Ki(U, ln.c), Ti(U, m), Ye = new Id(), Ki(Ye, zn), Ti(Ye, C), Ki(ln, Wn), f = new wX(o, i, U, Ye, ln), H(o, (G(), v0), f), H(i, v0, f), se = U.c.i, se.k == vf && (h = u(k(se, v0), 305), h.d = f, f.g = h); + if (a.Ob()) + l = u(a.Pb(), 19).a; + else + break; + } + ++v; + } + return Q(_); + } + function VCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m; + for (d = 0, r = new ie((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); r.e != r.i.gc(); ) + i = u(oe(r), 33), on(sn(hn(i, (nn(), Qa)))) || ((B(hn(e, Ll)) !== B((Rh(), Nl)) || B(hn(e, Vb)) === B((Ia(), Em)) || B(hn(e, Vb)) === B((Ia(), jm)) || on(sn(hn(e, Xb))) || B(hn(e, kp)) !== B((Gd(), yg))) && !on(sn(hn(i, D_))) && (pr(i, (G(), bc), Q(d)), ++d), c_n(n, i, t)); + for (d = 0, l = new ie((!e.b && (e.b = new V(bi, e, 12, 3)), e.b)); l.e != l.i.gc(); ) + f = u(oe(l), 79), (B(hn(e, (nn(), Ll))) !== B((Rh(), Nl)) || B(hn(e, Vb)) === B((Ia(), Em)) || B(hn(e, Vb)) === B((Ia(), jm)) || on(sn(hn(e, Xb))) || B(hn(e, kp)) !== B((Gd(), yg))) && (pr(f, (G(), bc), Q(d)), ++d), v = fh(f), m = ml(f), a = on(sn(hn(v, Jb))), p = !on(sn(hn(f, Qa))), g = a && Yd(f) && on(sn(hn(f, Xa))), c = Pt(v) == e && Pt(v) == Pt(m), o = (Pt(v) == e && m == e) ^ (Pt(m) == e && v == e), p && !g && (o || c) && GZ(n, f, e, t); + if (Pt(e)) + for (h = new ie(CTn(Pt(e))); h.e != h.i.gc(); ) + f = u(oe(h), 79), v = fh(f), v == e && Yd(f) && (g = on(sn(hn(v, (nn(), Jb)))) && on(sn(hn(f, Xa))), g && GZ(n, f, e, t)); + } + function QCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi; + for (le(t, "MinWidth layering", 1), p = e.b, en = e.a, fi = u(k(e, (nn(), wsn)), 19).a, f = u(k(e, gsn), 19).a, n.b = K(Y(k(e, Mo))), n.d = Lt, x = new E(en); x.a < x.c.c.length; ) + $ = u(y(x), 10), $.k == (Qn(), ii) && (zn = $.o.b, n.d = j.Math.min(n.d, zn)); + for (n.d = j.Math.max(1, n.d), ln = en.c.length, n.c = F(be, Le, 25, ln, 15, 1), n.f = F(be, Le, 25, ln, 15, 1), n.e = F(Ci, vr, 25, ln, 15, 1), l = 0, n.a = 0, _ = new E(en); _.a < _.c.c.length; ) + $ = u(y(_), 10), $.p = l++, n.c[$.p] = yDn(Lr($)), n.f[$.p] = yDn(ei($)), n.e[$.p] = $.o.b / n.d, n.a += n.e[$.p]; + for (n.b /= n.d, n.a /= ln, U = dme(en), wi(en, _W(new t6n(n))), m = Lt, v = nt, o = null, Ye = fi, se = fi, c = f, r = f, fi < 0 && (Ye = u(aon.a.zd(), 19).a, se = u(aon.b.zd(), 19).a), f < 0 && (c = u(lon.a.zd(), 19).a, r = u(lon.b.zd(), 19).a), Wn = Ye; Wn <= se; Wn++) + for (i = c; i <= r; i++) + wn = Hye(n, Wn, i, en, U), S = K(Y(wn.a)), g = u(wn.b, 15), C = g.gc(), (S < m || S == m && C < v) && (m = S, v = C, o = g); + for (d = o.Kc(); d.Ob(); ) { + for (a = u(d.Pb(), 15), h = new Rs(e), O = a.Kc(); O.Ob(); ) + $ = u(O.Pb(), 10), jr($, h); + p.c[p.c.length] = h; + } + Ax(p), en.c = F(Zn, rn, 1, 0, 5, 1), ce(t); + } + function JCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn; + for (n.b = e, n.a = u(k(e, (nn(), fsn)), 19).a, n.c = u(k(e, lsn), 19).a, n.c == 0 && (n.c = nt), C = new Ii(e.b, 0); C.b < C.d.gc(); ) { + for (m = (ne(C.b < C.d.gc()), u(C.d.Xb(C.c = C.b++), 29)), f = new X(), a = -1, x = -1, O = new E(m.a); O.a < O.c.c.length; ) + $ = u(y(O), 10), Fh((w8(), new re(ue(Kh($).a.Kc(), new Mn())))) >= n.a && (i = $ye(n, $), a = j.Math.max(a, i.b), x = j.Math.max(x, i.d), W(f, new Pi($, i))); + for (ln = new X(), l = 0; l < a; ++l) + J0(ln, 0, (ne(C.b > 0), C.a.Xb(C.c = --C.b), wn = new Rs(n.b), V0(C, wn), ne(C.b < C.d.gc()), C.d.Xb(C.c = C.b++), wn)); + for (o = new E(f); o.a < o.c.c.length; ) + if (r = u(y(o), 46), p = u(r.b, 571).a, !!p) + for (g = new E(p); g.a < g.c.c.length; ) + d = u(y(g), 10), aJ(n, d, sS, ln); + for (t = new X(), h = 0; h < x; ++h) + W(t, (zn = new Rs(n.b), V0(C, zn), zn)); + for (c = new E(f); c.a < c.c.c.length; ) + if (r = u(y(c), 46), en = u(r.b, 571).c, !!en) + for (U = new E(en); U.a < U.c.c.length; ) + _ = u(y(U), 10), aJ(n, _, oS, t); + } + for (S = new Ii(e.b, 0); S.b < S.d.gc(); ) + v = (ne(S.b < S.d.gc()), u(S.d.Xb(S.c = S.b++), 29)), v.a.c.length == 0 && Wu(S); + } + function YCe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se; + if (le(t, "Spline edge routing", 1), e.b.c.length == 0) { + e.f.a = 0, ce(t); + return; + } + $ = K(Y(k(e, (nn(), $g)))), f = K(Y(k(e, Ja))), o = K(Y(k(e, Dg))), S = u(k(e, B_), 336), ln = S == (V3(), Rm), en = K(Y(k(e, ssn))), n.d = e, n.j.c = F(Zn, rn, 1, 0, 5, 1), n.a.c = F(Zn, rn, 1, 0, 5, 1), Eu(n.k), h = u(un(e.b, 0), 29), a = nE(h.a, (hM(), cy)), v = u(un(e.b, e.b.c.length - 1), 29), d = nE(v.a, cy), m = new E(e.b), C = null, se = 0; + do { + for (O = m.a < m.c.c.length ? u(y(m), 29) : null, BCe(n, C, O), aye(n), wn = kie(Ebe(ZE(pt(new $n(null, new xn(n.i, 16)), new agn()), new lgn()))), Wn = 0, x = se, g = !C || a && C == h, p = !O || d && O == v, wn > 0 ? (l = 0, C && (l += f), l += (wn - 1) * o, O && (l += f), ln && O && (l = j.Math.max(l, D8e(O, o, $, en))), l < $ && !g && !p && (Wn = ($ - l) / 2, l = $), x += l) : !g && !p && (x += $), O && PZ(O, x), U = new E(n.i); U.a < U.c.c.length; ) + _ = u(y(U), 128), _.a.c = se, _.a.b = x - se, _.F = Wn, _.p = !C; + Zt(n.a, n.i), se = x, O && (se += O.c.a), C = O, g = p; + } while (O); + for (r = new E(n.j); r.a < r.c.c.length; ) + i = u(y(r), 17), c = Xbe(n, i), H(i, (G(), Og), c), zn = n7e(n, i), H(i, Wa, zn); + e.f.a = se, n.d = null, ce(t); + } + function A_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + if (m = n.i != 0, O = !1, S = null, qu(n.e)) { + if (a = e.gc(), a > 0) { + for (g = a < 100 ? null : new Q1(a), l = new CV(e), v = l.g, S = F(be, Le, 25, a, 15, 1), i = 0, x = new Nd(a), r = 0; r < n.i; ++r) { + f = n.g[r], p = f; + n: + for ($ = 0; $ < 2; ++$) { + for (h = a; --h >= 0; ) + if (p != null ? tt(p, v[h]) : B(p) === B(v[h])) { + S.length <= i && (C = S, S = F(be, Le, 25, 2 * S.length, 15, 1), pc(C, 0, S, 0, i)), S[i++] = r, me(x, v[h]); + break n; + } + if (p = p, B(p) === B(f)) + break; + } + } + if (l = x, v = x.g, a = i, i > S.length && (C = S, S = F(be, Le, 25, i, 15, 1), pc(C, 0, S, 0, i)), i > 0) { + for (O = !0, c = 0; c < i; ++c) + p = v[c], g = cEn(n, u(p, 72), g); + for (o = i; --o >= 0; ) + H2(n, S[o]); + if (i != a) { + for (r = a; --r >= i; ) + H2(l, r); + C = S, S = F(be, Le, 25, i, 15, 1), pc(C, 0, S, 0, i); + } + e = l; + } + } + } else + for (e = I3e(n, e), r = n.i; --r >= 0; ) + e.Hc(n.g[r]) && (H2(n, r), O = !0); + if (O) { + if (S != null) { + for (t = e.gc(), d = t == 1 ? _5(n, 4, e.Kc().Pb(), null, S[0], m) : _5(n, 6, e, S, S[0], m), g = t < 100 ? null : new Q1(t), r = e.Kc(); r.Ob(); ) + p = r.Pb(), g = SU(n, u(p, 72), g); + g ? (g.Ei(d), g.Fi()) : et(n.e, d); + } else { + for (g = que(e.gc()), r = e.Kc(); r.Ob(); ) + p = r.Pb(), g = SU(n, u(p, 72), g); + g && g.Fi(); + } + return !0; + } else + return !1; + } + function ZCe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O; + for (t = new Z$n(e), t.a || Lke(e), l = N7e(e), h = new Dd(), C = new WNn(), m = new E(e.a); m.a < m.c.c.length; ) + for (v = u(y(m), 10), r = new re(ue(ei(v).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 17), (i.c.i.k == (Qn(), Xt) || i.d.i.k == Xt) && (a = KEe(n, i, l, C), Tn(h, GF(a.d), a.a)); + for (o = new X(), O = u(k(t.c, (G(), zb)), 21).Kc(); O.Ob(); ) { + switch ($ = u(O.Pb(), 61), p = C.c[$.g], g = C.b[$.g], f = C.a[$.g], c = null, S = null, $.g) { + case 4: + c = new ys(n.d.a, p, l.b.a - n.d.a, g - p), S = new ys(n.d.a, p, f, g - p), Ed(l, new fn(c.c + c.b, c.d)), Ed(l, new fn(c.c + c.b, c.d + c.a)); + break; + case 2: + c = new ys(l.a.a, p, n.c.a - l.a.a, g - p), S = new ys(n.c.a - f, p, f, g - p), Ed(l, new fn(c.c, c.d)), Ed(l, new fn(c.c, c.d + c.a)); + break; + case 1: + c = new ys(p, n.d.b, g - p, l.b.b - n.d.b), S = new ys(p, n.d.b, g - p, f), Ed(l, new fn(c.c, c.d + c.a)), Ed(l, new fn(c.c + c.b, c.d + c.a)); + break; + case 3: + c = new ys(p, l.a.b, g - p, n.c.b - l.a.b), S = new ys(p, n.c.b - f, g - p, f), Ed(l, new fn(c.c, c.d)), Ed(l, new fn(c.c + c.b, c.d)); + } + c && (d = new n9n(), d.d = $, d.b = c, d.c = S, d.a = rC(u(ct(h, GF($)), 21)), o.c[o.c.length] = d); + } + return Zt(t.b, o), t.d = ige(uEe(l)), t; + } + function S_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m; + if (t.p[e.p] == null) { + f = !0, t.p[e.p] = 0, o = e, m = t.o == (ef(), Ya) ? Vt : Lt; + do + r = n.b.e[o.p], c = o.c.a.c.length, t.o == Ya && r > 0 || t.o == kf && r < c - 1 ? (h = null, l = null, t.o == kf ? h = u(un(o.c.a, r + 1), 10) : h = u(un(o.c.a, r - 1), 10), l = t.g[h.p], S_n(n, l, t), m = n.e.bg(m, e, o), t.j[e.p] == e && (t.j[e.p] = t.j[l.p]), t.j[e.p] == t.j[l.p] ? (v = Mw(n.d, o, h), t.o == kf ? (i = K(t.p[e.p]), d = K(t.p[l.p]) + K(t.d[h.p]) - h.d.d - v - o.d.a - o.o.b - K(t.d[o.p]), f ? (f = !1, t.p[e.p] = j.Math.min(d, m)) : t.p[e.p] = j.Math.min(i, j.Math.min(d, m))) : (i = K(t.p[e.p]), d = K(t.p[l.p]) + K(t.d[h.p]) + h.o.b + h.d.a + v + o.d.d - K(t.d[o.p]), f ? (f = !1, t.p[e.p] = j.Math.max(d, m)) : t.p[e.p] = j.Math.max(i, j.Math.max(d, m)))) : (v = K(Y(k(n.a, (nn(), M0)))), p = ZIn(n, t.j[e.p]), a = ZIn(n, t.j[l.p]), t.o == kf ? (g = K(t.p[e.p]) + K(t.d[o.p]) + o.o.b + o.d.a + v - (K(t.p[l.p]) + K(t.d[h.p]) - h.d.d), NMn(p, a, g)) : (g = K(t.p[e.p]) + K(t.d[o.p]) - o.d.d - K(t.p[l.p]) - K(t.d[h.p]) - h.o.b - h.d.a - v, NMn(p, a, g)))) : m = n.e.bg(m, e, o), o = t.a[o.p]; + while (o != e); + Jte(n.e, e); + } + } + function nTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se; + for (O = e, $ = new Dd(), x = new Dd(), a = xd(O, $tn), i = new ATn(n, t, $, x), B5e(i.a, i.b, i.c, i.d, a), h = (en = $.i, en || ($.i = new Sw($, $.c))), wn = h.Kc(); wn.Ob(); ) + for (ln = u(wn.Pb(), 202), r = u(ct($, ln), 21), m = r.Kc(); m.Ob(); ) + if (v = m.Pb(), _ = u(xw(n.d, v), 202), _) + f = (!ln.e && (ln.e = new Fn(Mt, ln, 10, 9)), ln.e), me(f, _); + else + throw o = $h(O, Uf), g = Mqn + v + Aqn + o, p = g + _4, T(new Af(p)); + for (l = (U = x.i, U || (x.i = new Sw(x, x.c))), Wn = l.Kc(); Wn.Ob(); ) + for (zn = u(Wn.Pb(), 202), c = u(ct(x, zn), 21), S = c.Kc(); S.Ob(); ) + if (C = S.Pb(), _ = u(xw(n.d, C), 202), _) + d = (!zn.g && (zn.g = new Fn(Mt, zn, 9, 10)), zn.g), me(d, _); + else + throw o = $h(O, Uf), g = Mqn + C + Aqn + o, p = g + _4, T(new Af(p)); + !t.b && (t.b = new Fn(he, t, 4, 7)), t.b.i != 0 && (!t.c && (t.c = new Fn(he, t, 5, 8)), t.c.i != 0) && (!t.b && (t.b = new Fn(he, t, 4, 7)), t.b.i <= 1 && (!t.c && (t.c = new Fn(he, t, 5, 8)), t.c.i <= 1)) && (!t.a && (t.a = new V(Mt, t, 6, 6)), t.a).i == 1 && (se = u(D((!t.a && (t.a = new V(Mt, t, 6, 6)), t.a), 0), 202), !VF(se) && !QF(se) && (JC(se, u(D((!t.b && (t.b = new Fn(he, t, 4, 7)), t.b), 0), 82)), YC(se, u(D((!t.c && (t.c = new Fn(he, t, 5, 8)), t.c), 0), 82)))); + } + function eTe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn; + for (O = n.a, x = 0, _ = O.length; x < _; ++x) { + for ($ = O[x], l = nt, a = nt, v = new E($.e); v.a < v.c.c.length; ) + g = u(y(v), 10), o = g.c ? xr(g.c.a, g, 0) : -1, o > 0 ? (d = u(un(g.c.a, o - 1), 10), ln = Mw(n.b, g, d), C = g.n.b - g.d.d - (d.n.b + d.o.b + d.d.a + ln)) : C = g.n.b - g.d.d, l = j.Math.min(C, l), o < g.c.a.c.length - 1 ? (d = u(un(g.c.a, o + 1), 10), ln = Mw(n.b, g, d), S = d.n.b - d.d.d - (g.n.b + g.o.b + g.d.a + ln)) : S = 2 * g.n.b, a = j.Math.min(S, a); + for (h = nt, c = !1, r = u(un($.e, 0), 10), zn = new E(r.j); zn.a < zn.c.c.length; ) + for (wn = u(y(zn), 11), m = r.n.b + wn.n.b + wn.a.b, i = new E(wn.e); i.a < i.c.c.length; ) + t = u(y(i), 17), U = t.c, e = U.i.n.b + U.n.b + U.a.b - m, j.Math.abs(e) < j.Math.abs(h) && j.Math.abs(e) < (e < 0 ? l : a) && (h = e, c = !0); + for (f = u(un($.e, $.e.c.length - 1), 10), en = new E(f.j); en.a < en.c.c.length; ) + for (U = u(y(en), 11), m = f.n.b + U.n.b + U.a.b, i = new E(U.g); i.a < i.c.c.length; ) + t = u(y(i), 17), wn = t.d, e = wn.i.n.b + wn.n.b + wn.a.b - m, j.Math.abs(e) < j.Math.abs(h) && j.Math.abs(e) < (e < 0 ? l : a) && (h = e, c = !0); + if (c && h != 0) + for (p = new E($.e); p.a < p.c.c.length; ) + g = u(y(p), 10), g.n.b += h; + } + } + function P_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + if (Uu(n.a, e)) { + if (Ah(u(te(n.a, e), 53), t)) + return 1; + } else + it(n.a, e, new hi()); + if (Uu(n.a, t)) { + if (Ah(u(te(n.a, t), 53), e)) + return -1; + } else + it(n.a, t, new hi()); + if (Uu(n.e, e)) { + if (Ah(u(te(n.e, e), 53), t)) + return -1; + } else + it(n.e, e, new hi()); + if (Uu(n.e, t)) { + if (Ah(u(te(n.a, t), 53), e)) + return 1; + } else + it(n.e, t, new hi()); + if (n.c == (Rh(), tK) || !ai(e, (G(), bc)) || !ai(t, (G(), bc))) { + if (h = u(Gz(HAn(fF(pt(new $n(null, new xn(e.j, 16)), new swn())), new own())), 11), a = u(Gz(HAn(fF(pt(new $n(null, new xn(t.j, 16)), new fwn())), new hwn())), 11), h && a) { + if (f = h.i, l = a.i, f && f == l) { + for (g = new E(f.j); g.a < g.c.c.length; ) { + if (d = u(y(g), 11), d == h) + return g4(n, t, e), -1; + if (d == a) + return g4(n, e, t), 1; + } + return Uc(bx(n, e), bx(n, t)); + } + for (v = n.d, m = 0, C = v.length; m < C; ++m) { + if (p = v[m], p == f) + return g4(n, t, e), -1; + if (p == l) + return g4(n, e, t), 1; + } + } + if (!ai(e, (G(), bc)) || !ai(t, bc)) + return r = bx(n, e), o = bx(n, t), r > o ? g4(n, e, t) : g4(n, t, e), r < o ? -1 : r > o ? 1 : 0; + } + return i = u(k(e, (G(), bc)), 19).a, c = u(k(t, bc), 19).a, i > c ? g4(n, e, t) : g4(n, t, e), i < c ? -1 : i > c ? 1 : 0; + } + function KZ(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $; + if (on(sn(hn(e, (Xe(), RP))))) + return Pn(), Pn(), cr; + if (l = (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a).i != 0, d = K6e(e), a = !d.dc(), l || a) { + if (r = u(hn(e, kv), 149), !r) + throw T(new pw("Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout.")); + if ($ = hz(r, (a4(), YP)), F$n(e), !l && a && !$) + return Pn(), Pn(), cr; + if (h = new X(), B(hn(e, Bg)) === B((_h(), x1)) && (hz(r, QP) || hz(r, VP))) + for (p = gBn(n, e), v = new Tt(), Xi(v, (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); v.b != 0; ) + g = u(v.b == 0 ? null : (ne(v.b != 0), Ts(v, v.a.a)), 33), F$n(g), S = B(hn(g, Bg)) === B(i9), S || ga(g, Zm) && !CX(r, hn(g, kv)) ? (f = KZ(n, g, t, i), Zt(h, f), pr(g, Bg, i9), $Bn(g)) : Xi(v, (!g.a && (g.a = new V(Ot, g, 10, 11)), g.a)); + else + for (p = (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a).i, o = new ie((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); o.e != o.i.gc(); ) + c = u(oe(o), 33), f = KZ(n, c, t, i), Zt(h, f), $Bn(c); + for (C = new E(h); C.a < C.c.c.length; ) + m = u(y(C), 79), pr(m, RP, (qn(), !0)); + return gpe(e, r, yc(i, p)), xke(h), a && $ ? d : (Pn(), Pn(), cr); + } else + return Pn(), Pn(), cr; + } + function V7(n, e, t, i, r, c, o, f, h) { + var l, a, d, g, p, v, m; + switch (p = t, a = new qh(h), ta(a, (Qn(), Xt)), H(a, (G(), bun), o), H(a, (nn(), Bt), (Ai(), Sc)), m = K(Y(n.We(Yb))), H(a, Yb, m), d = new gc(), Hr(d, a), e != jf && e != ql || (i >= 0 ? p = B2(f) : p = b7(B2(f)), n.Ye(av, p)), l = new Li(), g = !1, n.Xe(C0) ? (Zz(l, u(n.We(C0), 8)), g = !0) : Sce(l, o.a / 2, o.b / 2), p.g) { + case 4: + H(a, Hc, (Ss(), xl)), H(a, HS, (ja(), Tg)), a.o.b = o.b, m < 0 && (a.o.a = -m), si(d, (J(), Vn)), g || (l.a = o.a), l.a -= o.a; + break; + case 2: + H(a, Hc, (Ss(), Wb)), H(a, HS, (ja(), rv)), a.o.b = o.b, m < 0 && (a.o.a = -m), si(d, (J(), Gn)), g || (l.a = 0); + break; + case 1: + H(a, Ua, (Nh(), Ag)), a.o.a = o.a, m < 0 && (a.o.b = -m), si(d, (J(), ae)), g || (l.b = o.b), l.b -= o.b; + break; + case 3: + H(a, Ua, (Nh(), dp)), a.o.a = o.a, m < 0 && (a.o.b = -m), si(d, (J(), Kn)), g || (l.b = 0); + } + if (Zz(d.n, l), H(a, C0, l), e == id || e == jh || e == Sc) { + if (v = 0, e == id && n.Xe(I1)) + switch (p.g) { + case 1: + case 2: + v = u(n.We(I1), 19).a; + break; + case 3: + case 4: + v = -u(n.We(I1), 19).a; + } + else + switch (p.g) { + case 4: + case 2: + v = c.b, e == jh && (v /= r.b); + break; + case 1: + case 3: + v = c.a, e == jh && (v /= r.a); + } + H(a, y0, v); + } + return H(a, ec, p), a; + } + function tTe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn; + if (t = K(Y(k(n.a.j, (nn(), esn)))), t < -1 || !n.a.i || p2(u(k(n.a.o, Bt), 98)) || zr(n.a.o, (J(), Vn)).gc() < 2 && zr(n.a.o, Gn).gc() < 2) + return !0; + if (n.a.c.Rf()) + return !1; + for (_ = 0, x = 0, O = new X(), h = n.a.e, l = 0, a = h.length; l < a; ++l) { + for (f = h[l], g = f, p = 0, m = g.length; p < m; ++p) { + if (d = g[p], d.k == (Qn(), Mc)) { + O.c[O.c.length] = d; + continue; + } + for (i = n.b[d.c.p][d.p], d.k == Xt ? (i.b = 1, u(k(d, (G(), rt)), 11).j == (J(), Vn) && (x += i.a)) : (wn = zr(d, (J(), Gn)), wn.dc() || !qO(wn, new Awn()) ? i.c = 1 : (r = zr(d, Vn), (r.dc() || !qO(r, new Mwn())) && (_ += i.a))), o = new re(ue(ei(d).a.Kc(), new Mn())); Se(o); ) + c = u(ve(o), 17), _ += i.c, x += i.b, ln = c.d.i, KX(n, i, ln); + for (S = of(A(M(gf, 1), rn, 20, 0, [zr(d, (J(), Kn)), zr(d, ae)])), en = new re(new xz(S.a.length, S.a)); Se(en); ) + U = u(ve(en), 11), $ = u(k(U, (G(), Mu)), 10), $ && (_ += i.c, x += i.b, KX(n, i, $)); + } + for (v = new E(O); v.a < v.c.c.length; ) + for (d = u(y(v), 10), i = n.b[d.c.p][d.p], o = new re(ue(ei(d).a.Kc(), new Mn())); Se(o); ) + c = u(ve(o), 17), _ += i.c, x += i.b, ln = c.d.i, KX(n, i, ln); + O.c = F(Zn, rn, 1, 0, 5, 1); + } + return e = _ + x, C = e == 0 ? Lt : (_ - x) / e, C >= t; + } + function iTe() { + EG(); + function n(i) { + var r = this; + this.dispatch = function(c) { + var o = c.data; + switch (o.cmd) { + case "algorithms": + var f = OQ((Pn(), new Rp(new Mh(Wl.b)))); + i.postMessage({ id: o.id, data: f }); + break; + case "categories": + var h = OQ((Pn(), new Rp(new Mh(Wl.c)))); + i.postMessage({ id: o.id, data: h }); + break; + case "options": + var l = OQ((Pn(), new Rp(new Mh(Wl.d)))); + i.postMessage({ id: o.id, data: l }); + break; + case "register": + hEe(o.algorithms), i.postMessage({ id: o.id }); + break; + case "layout": + Gye(o.graph, o.layoutOptions || {}, o.options || {}), i.postMessage({ id: o.id, data: o.graph }); + break; + } + }, this.saveDispatch = function(c) { + try { + r.dispatch(c); + } catch (o) { + i.postMessage({ id: c.data.id, error: o }); + } + }; + } + function e(i) { + var r = this; + this.dispatcher = new n({ postMessage: function(c) { + r.onmessage({ data: c }); + } }), this.postMessage = function(c) { + setTimeout(function() { + r.dispatcher.saveDispatch({ data: c }); + }, 0); + }; + } + if (typeof document === cN && typeof self !== cN) { + var t = new n(self); + self.onmessage = t.saveDispatch; + } else + typeof gt !== cN && gt.exports && (Object.defineProperty(Jt, "__esModule", { value: !0 }), gt.exports = { default: e, Worker: e }); + } + function rTe(n) { + n.N || (n.N = !0, n.b = Yr(n, 0), It(n.b, 0), It(n.b, 1), It(n.b, 2), n.bb = Yr(n, 1), It(n.bb, 0), It(n.bb, 1), n.fb = Yr(n, 2), It(n.fb, 3), It(n.fb, 4), bt(n.fb, 5), n.qb = Yr(n, 3), It(n.qb, 0), bt(n.qb, 1), bt(n.qb, 2), It(n.qb, 3), It(n.qb, 4), bt(n.qb, 5), It(n.qb, 6), n.a = ze(n, 4), n.c = ze(n, 5), n.d = ze(n, 6), n.e = ze(n, 7), n.f = ze(n, 8), n.g = ze(n, 9), n.i = ze(n, 10), n.j = ze(n, 11), n.k = ze(n, 12), n.n = ze(n, 13), n.o = ze(n, 14), n.p = ze(n, 15), n.q = ze(n, 16), n.s = ze(n, 17), n.r = ze(n, 18), n.t = ze(n, 19), n.u = ze(n, 20), n.v = ze(n, 21), n.w = ze(n, 22), n.B = ze(n, 23), n.A = ze(n, 24), n.C = ze(n, 25), n.D = ze(n, 26), n.F = ze(n, 27), n.G = ze(n, 28), n.H = ze(n, 29), n.J = ze(n, 30), n.I = ze(n, 31), n.K = ze(n, 32), n.M = ze(n, 33), n.L = ze(n, 34), n.P = ze(n, 35), n.Q = ze(n, 36), n.R = ze(n, 37), n.S = ze(n, 38), n.T = ze(n, 39), n.U = ze(n, 40), n.V = ze(n, 41), n.X = ze(n, 42), n.W = ze(n, 43), n.Y = ze(n, 44), n.Z = ze(n, 45), n.$ = ze(n, 46), n._ = ze(n, 47), n.ab = ze(n, 48), n.cb = ze(n, 49), n.db = ze(n, 50), n.eb = ze(n, 51), n.gb = ze(n, 52), n.hb = ze(n, 53), n.ib = ze(n, 54), n.jb = ze(n, 55), n.kb = ze(n, 56), n.lb = ze(n, 57), n.mb = ze(n, 58), n.nb = ze(n, 59), n.ob = ze(n, 60), n.pb = ze(n, 61)); + } + function cTe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + if ($ = 0, e.f.a == 0) + for (C = new E(n); C.a < C.c.c.length; ) + v = u(y(C), 10), $ = j.Math.max($, v.n.a + v.o.a + v.d.c); + else + $ = e.f.a - e.c.a; + for ($ -= e.c.a, m = new E(n); m.a < m.c.c.length; ) { + switch (v = u(y(m), 10), Lv(v.n, $ - v.o.a), UU(v.f), kFn(v), (v.q ? v.q : (Pn(), Pn(), ph))._b((nn(), nw)) && Lv(u(k(v, nw), 8), $ - v.o.a), u(k(v, Qf), 248).g) { + case 1: + H(v, Qf, (oh(), ay)); + break; + case 2: + H(v, Qf, (oh(), ly)); + } + for (S = v.o, x = new E(v.j); x.a < x.c.c.length; ) { + for (O = u(y(x), 11), Lv(O.n, S.a - O.o.a), Lv(O.a, O.o.a), si(O, bOn(O.j)), o = u(k(O, I1), 19), o && H(O, I1, Q(-o.a)), c = new E(O.g); c.a < c.c.c.length; ) { + for (r = u(y(c), 17), i = _e(r.a, 0); i.b != i.d.c; ) + t = u(Re(i), 8), t.a = $ - t.a; + if (l = u(k(r, Mr), 74), l) + for (h = _e(l, 0); h.b != h.d.c; ) + f = u(Re(h), 8), f.a = $ - f.a; + for (g = new E(r.b); g.a < g.c.c.length; ) + a = u(y(g), 70), Lv(a.n, $ - a.o.a); + } + for (p = new E(O.f); p.a < p.c.c.length; ) + a = u(y(p), 70), Lv(a.n, O.o.a - a.o.a); + } + for (v.k == (Qn(), Xt) && (H(v, (G(), ec), bOn(u(k(v, ec), 61))), l5e(v)), d = new E(v.b); d.a < d.c.c.length; ) + a = u(y(d), 70), kFn(a), Lv(a.n, S.a - a.o.a); + } + } + function uTe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + if ($ = 0, e.f.b == 0) + for (C = new E(n); C.a < C.c.c.length; ) + v = u(y(C), 10), $ = j.Math.max($, v.n.b + v.o.b + v.d.a); + else + $ = e.f.b - e.c.b; + for ($ -= e.c.b, m = new E(n); m.a < m.c.c.length; ) { + switch (v = u(y(m), 10), xv(v.n, $ - v.o.b), WU(v.f), yFn(v), (v.q ? v.q : (Pn(), Pn(), ph))._b((nn(), nw)) && xv(u(k(v, nw), 8), $ - v.o.b), u(k(v, Qf), 248).g) { + case 3: + H(v, Qf, (oh(), $P)); + break; + case 4: + H(v, Qf, (oh(), xP)); + } + for (S = v.o, x = new E(v.j); x.a < x.c.c.length; ) { + for (O = u(y(x), 11), xv(O.n, S.b - O.o.b), xv(O.a, O.o.b), si(O, wOn(O.j)), o = u(k(O, I1), 19), o && H(O, I1, Q(-o.a)), c = new E(O.g); c.a < c.c.c.length; ) { + for (r = u(y(c), 17), i = _e(r.a, 0); i.b != i.d.c; ) + t = u(Re(i), 8), t.b = $ - t.b; + if (l = u(k(r, Mr), 74), l) + for (h = _e(l, 0); h.b != h.d.c; ) + f = u(Re(h), 8), f.b = $ - f.b; + for (g = new E(r.b); g.a < g.c.c.length; ) + a = u(y(g), 70), xv(a.n, $ - a.o.b); + } + for (p = new E(O.f); p.a < p.c.c.length; ) + a = u(y(p), 70), xv(a.n, O.o.b - a.o.b); + } + for (v.k == (Qn(), Xt) && (H(v, (G(), ec), wOn(u(k(v, ec), 61))), $ge(v)), d = new E(v.b); d.a < d.c.c.length; ) + a = u(y(d), 70), yFn(a), xv(a.n, S.b - a.o.b); + } + } + function sTe(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p; + for (d = !1, l = n + 1, a = (Ln(n, e.c.length), u(e.c[n], 200)), o = a.a, f = null, c = 0; c < a.a.c.length; c++) + if (r = (Ln(c, o.c.length), u(o.c[c], 187)), !r.c) { + if (r.b.c.length == 0) { + Zf(), T7(a, r), --c, d = !0; + continue; + } + if (r.k || (f && GT(f), f = new YW(f ? f.e + f.d + i : 0, a.f, i), k7(r, f.e + f.d, a.f), W(a.d, f), TV(f, r), r.k = !0), h = null, h = (p = null, c < a.a.c.length - 1 ? p = u(un(a.a, c + 1), 187) : l < e.c.length && (Ln(l, e.c.length), u(e.c[l], 200)).a.c.length != 0 && (p = u(un((Ln(l, e.c.length), u(e.c[l], 200)).a, 0), 187)), p), g = !1, h && (g = !tt(h.j, a)), h) { + if (h.b.c.length == 0) { + T7(a, h); + break; + } else + B8(r, t - r.s), GT(r.q), d = d | a5e(a, r, h, t, i); + if (h.b.c.length == 0) + for (T7((Ln(l, e.c.length), u(e.c[l], 200)), h), h = null; e.c.length > l && (Ln(l, e.c.length), u(e.c[l], 200)).a.c.length == 0; ) + Qc(e, (Ln(l, e.c.length), e.c[l])); + if (!h) { + --c; + continue; + } + if (zke(e, a, r, h, g, t, l, i)) { + d = !0; + continue; + } + if (g) { + if (Yye(e, a, r, h, t, l, i)) { + d = !0; + continue; + } else if (rQ(a, r)) { + r.c = !0, d = !0; + continue; + } + } else if (rQ(a, r)) { + r.c = !0, d = !0; + continue; + } + if (d) + continue; + } + if (rQ(a, r)) { + r.c = !0, d = !0, h && (h.k = !1); + continue; + } else + GT(r.q); + } + return d; + } + function kL(n, e, t, i, r, c, o) { + var f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi; + for (m = 0, zn = 0, l = new E(n.b); l.a < l.c.c.length; ) + h = u(y(l), 157), h.c && r_n(h.c), m = j.Math.max(m, du(h)), zn += du(h) * zu(h); + for (C = zn / n.b.c.length, wn = E4e(n.b, C), zn += n.b.c.length * wn, m = j.Math.max(m, j.Math.sqrt(zn * o)) + t.b, Ye = t.b, fi = t.d, p = 0, d = t.b + t.c, ln = new Tt(), Ke(ln, Q(0)), U = new Tt(), a = new Ii(n.b, 0), v = null, f = new X(); a.b < a.d.gc(); ) + h = (ne(a.b < a.d.gc()), u(a.d.Xb(a.c = a.b++), 157)), se = du(h), g = zu(h), Ye + se > m && (c && (sa(U, p), sa(ln, Q(a.b - 1)), W(n.d, v), f.c = F(Zn, rn, 1, 0, 5, 1)), Ye = t.b, fi += p + e, p = 0, d = j.Math.max(d, t.b + t.c + se)), f.c[f.c.length] = h, U$n(h, Ye, fi), d = j.Math.max(d, Ye + se + t.c), p = j.Math.max(p, g), Ye += se + e, v = h; + if (Zt(n.a, f), W(n.d, u(un(f, f.c.length - 1), 157)), d = j.Math.max(d, i), Wn = fi + p + t.a, Wn < r && (p += r - Wn, Wn = r), c) + for (Ye = t.b, a = new Ii(n.b, 0), sa(ln, Q(n.b.c.length)), en = _e(ln, 0), $ = u(Re(en), 19).a, sa(U, p), _ = _e(U, 0), x = 0; a.b < a.d.gc(); ) + a.b == $ && (Ye = t.b, x = K(Y(Re(_))), $ = u(Re(en), 19).a), h = (ne(a.b < a.d.gc()), u(a.d.Xb(a.c = a.b++), 157)), M$n(h, x), a.b == $ && (S = d - Ye - t.c, O = du(h), T$n(h, S), VDn(h, (S - O) / 2, 0)), Ye += du(h) + e; + return new fn(d, Wn); + } + function oTe(n) { + var e, t, i, r, c; + switch (e = n.c, c = null, e) { + case 6: + return n.Vl(); + case 13: + return n.Wl(); + case 23: + return n.Nl(); + case 22: + return n.Sl(); + case 18: + return n.Pl(); + case 8: + Qe(n), c = (Je(), B1n); + break; + case 9: + return n.vl(!0); + case 19: + return n.wl(); + case 10: + switch (n.a) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + return c = n.ul(n.a), Qe(n), c; + case 101: + case 102: + case 110: + case 114: + case 116: + case 117: + case 118: + case 120: + t = n.tl(), t < Ji ? c = (Je(), Je(), new th(0, t)) : c = jCn(kQ(t)); + break; + case 99: + return n.Fl(); + case 67: + return n.Al(); + case 105: + return n.Il(); + case 73: + return n.Bl(); + case 103: + return n.Gl(); + case 88: + return n.Cl(); + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return n.xl(); + case 80: + case 112: + if (c = mY(n, n.a), !c) + throw T(new Ee(Pe((je(), KB)))); + break; + default: + c = KEn(n.a); + } + Qe(n); + break; + case 0: + if (n.a == 93 || n.a == 123 || n.a == 125) + throw T(new Ee(Pe((je(), Htn)))); + c = KEn(n.a), i = n.a, Qe(n), (i & 64512) == rk && n.c == 0 && (n.a & 64512) == 56320 && (r = F(Ls, Bf, 25, 2, 15, 1), r[0] = i & Ut, r[1] = n.a & Ut, c = SD(jCn(Hs(r, 0, r.length)), 0), Qe(n)); + break; + default: + throw T(new Ee(Pe((je(), Htn)))); + } + return c; + } + function fTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + if (i = new X(), r = nt, c = nt, o = nt, t) + for (r = n.f.a, m = new E(e.j); m.a < m.c.c.length; ) + for (v = u(y(m), 11), h = new E(v.g); h.a < h.c.c.length; ) + f = u(y(h), 17), f.a.b != 0 && (a = u(QO(f.a), 8), a.a < r && (c = r - a.a, o = nt, i.c = F(Zn, rn, 1, 0, 5, 1), r = a.a), a.a <= r && (i.c[i.c.length] = f, f.a.b > 1 && (o = j.Math.min(o, j.Math.abs(u(qo(f.a, 1), 8).b - a.b))))); + else + for (m = new E(e.j); m.a < m.c.c.length; ) + for (v = u(y(m), 11), h = new E(v.e); h.a < h.c.c.length; ) + f = u(y(h), 17), f.a.b != 0 && (g = u(gE(f.a), 8), g.a > r && (c = g.a - r, o = nt, i.c = F(Zn, rn, 1, 0, 5, 1), r = g.a), g.a >= r && (i.c[i.c.length] = f, f.a.b > 1 && (o = j.Math.min(o, j.Math.abs(u(qo(f.a, f.a.b - 2), 8).b - g.b))))); + if (i.c.length != 0 && c > e.o.a / 2 && o > e.o.b / 2) { + for (p = new gc(), Hr(p, e), si(p, (J(), Kn)), p.n.a = e.o.a / 2, S = new gc(), Hr(S, e), si(S, ae), S.n.a = e.o.a / 2, S.n.b = e.o.b, h = new E(i); h.a < h.c.c.length; ) + f = u(y(h), 17), t ? (l = u(aD(f.a), 8), C = f.a.b == 0 ? tf(f.d) : u(QO(f.a), 8), C.b >= l.b ? Ki(f, S) : Ki(f, p)) : (l = u(efe(f.a), 8), C = f.a.b == 0 ? tf(f.c) : u(gE(f.a), 8), C.b >= l.b ? Ti(f, S) : Ti(f, p)), d = u(k(f, (nn(), Mr)), 74), d && bb(d, l, !0); + e.n.a = r - e.o.a / 2; + } + } + function hTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi, ps, oo; + if (zn = null, se = e, Wn = $An(n, PAn(t), se), Q5(Wn, $h(se, Uf)), Ye = u(xw(n.g, G2(Dh(se, PB))), 33), g = Dh(se, "sourcePort"), i = null, g && (i = G2(g)), fi = u(xw(n.j, i), 118), !Ye) + throw f = t4(se), v = "An edge must have a source node (edge id: '" + f, m = v + _4, T(new Af(m)); + if (fi && !$f(nf(fi), Ye)) + throw h = $h(se, Uf), C = "The source port of an edge must be a port of the edge's source node (edge id: '" + h, S = C + _4, T(new Af(S)); + if (ln = (!Wn.b && (Wn.b = new Fn(he, Wn, 4, 7)), Wn.b), c = null, fi ? c = fi : c = Ye, me(ln, c), ps = u(xw(n.g, G2(Dh(se, _tn))), 33), p = Dh(se, "targetPort"), r = null, p && (r = G2(p)), oo = u(xw(n.j, r), 118), !ps) + throw d = t4(se), $ = "An edge must have a target node (edge id: '" + d, O = $ + _4, T(new Af(O)); + if (oo && !$f(nf(oo), ps)) + throw l = $h(se, Uf), x = "The target port of an edge must be a port of the edge's target node (edge id: '" + l, _ = x + _4, T(new Af(_)); + if (wn = (!Wn.c && (Wn.c = new Fn(he, Wn, 5, 8)), Wn.c), o = null, oo ? o = oo : o = ps, me(wn, o), (!Wn.b && (Wn.b = new Fn(he, Wn, 4, 7)), Wn.b).i == 0 || (!Wn.c && (Wn.c = new Fn(he, Wn, 5, 8)), Wn.c).i == 0) + throw a = $h(se, Uf), U = Tqn + a, en = U + _4, T(new Af(en)); + return YT(se, Wn), n9e(se, Wn), zn = oF(n, se, Wn), zn; + } + function I_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn; + return d = dye(Wc(n, (J(), Ef)), e), v = Uw(Wc(n, Do), e), x = Uw(Wc(n, bs), e), ln = zT(Wc(n, to), e), g = zT(Wc(n, Fs), e), $ = Uw(Wc(n, $o), e), m = Uw(Wc(n, Su), e), U = Uw(Wc(n, ws), e), _ = Uw(Wc(n, xs), e), wn = zT(Wc(n, qc), e), S = Uw(Wc(n, cu), e), O = Uw(Wc(n, Pu), e), en = Uw(Wc(n, ru), e), zn = zT(Wc(n, uu), e), p = zT(Wc(n, mu), e), C = Uw(Wc(n, Pc), e), t = Bw(A(M(Ci, 1), vr, 25, 15, [$.a, ln.a, U.a, zn.a])), i = Bw(A(M(Ci, 1), vr, 25, 15, [v.a, d.a, x.a, C.a])), r = S.a, c = Bw(A(M(Ci, 1), vr, 25, 15, [m.a, g.a, _.a, p.a])), l = Bw(A(M(Ci, 1), vr, 25, 15, [$.b, v.b, m.b, O.b])), h = Bw(A(M(Ci, 1), vr, 25, 15, [ln.b, d.b, g.b, C.b])), a = wn.b, f = Bw(A(M(Ci, 1), vr, 25, 15, [U.b, x.b, _.b, en.b])), d1(Wc(n, Ef), t + r, l + a), d1(Wc(n, Pc), t + r, l + a), d1(Wc(n, Do), t + r, 0), d1(Wc(n, bs), t + r, l + a + h), d1(Wc(n, to), 0, l + a), d1(Wc(n, Fs), t + r + i, l + a), d1(Wc(n, Su), t + r + i, 0), d1(Wc(n, ws), 0, l + a + h), d1(Wc(n, xs), t + r + i, l + a + h), d1(Wc(n, qc), 0, l), d1(Wc(n, cu), t, 0), d1(Wc(n, ru), 0, l + a + h), d1(Wc(n, mu), t + r + i, 0), o = new Li(), o.a = Bw(A(M(Ci, 1), vr, 25, 15, [t + i + r + c, wn.a, O.a, en.a])), o.b = Bw(A(M(Ci, 1), vr, 25, 15, [l + h + a + f, S.b, zn.b, p.b])), o; + } + function lTe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + for (m = new X(), g = new E(n.d.b); g.a < g.c.c.length; ) + for (d = u(y(g), 29), v = new E(d.a); v.a < v.c.c.length; ) { + for (p = u(y(v), 10), r = u(te(n.f, p), 57), h = new re(ue(ei(p).a.Kc(), new Mn())); Se(h); ) + if (o = u(ve(h), 17), i = _e(o.a, 0), l = !0, a = null, i.b != i.d.c) { + for (e = u(Re(i), 8), t = null, o.c.j == (J(), Kn) && (C = new P6(e, new fn(e.a, r.d.d), r, o), C.f.a = !0, C.a = o.c, m.c[m.c.length] = C), o.c.j == ae && (C = new P6(e, new fn(e.a, r.d.d + r.d.a), r, o), C.f.d = !0, C.a = o.c, m.c[m.c.length] = C); i.b != i.d.c; ) + t = u(Re(i), 8), tV(e.b, t.b) || (a = new P6(e, t, null, o), m.c[m.c.length] = a, l && (l = !1, t.b < r.d.d ? a.f.a = !0 : t.b > r.d.d + r.d.a ? a.f.d = !0 : (a.f.d = !0, a.f.a = !0))), i.b != i.d.c && (e = t); + a && (c = u(te(n.f, o.d.i), 57), e.b < c.d.d ? a.f.a = !0 : e.b > c.d.d + c.d.a ? a.f.d = !0 : (a.f.d = !0, a.f.a = !0)); + } + for (f = new re(ue(Lr(p).a.Kc(), new Mn())); Se(f); ) + o = u(ve(f), 17), o.a.b != 0 && (e = u(gE(o.a), 8), o.d.j == (J(), Kn) && (C = new P6(e, new fn(e.a, r.d.d), r, o), C.f.a = !0, C.a = o.d, m.c[m.c.length] = C), o.d.j == ae && (C = new P6(e, new fn(e.a, r.d.d + r.d.a), r, o), C.f.d = !0, C.a = o.d, m.c[m.c.length] = C)); + } + return m; + } + function aTe(n, e, t) { + var i, r, c, o, f, h, l, a, d; + if (le(t, "Network simplex node placement", 1), n.e = e, n.n = u(k(e, (G(), Ig)), 304), Pje(n), fve(n), _t(qr(new $n(null, new xn(n.e.b, 16)), new Fwn()), new E6n(n)), _t(pt(qr(pt(qr(new $n(null, new xn(n.e.b, 16)), new Wwn()), new Xwn()), new Vwn()), new Qwn()), new j6n(n)), on(sn(k(n.e, (nn(), Dm)))) && (o = yc(t, 1), le(o, "Straight Edges Pre-Processing", 1), XEe(n), ce(o)), Gpe(n.f), c = u(k(e, xm), 19).a * n.f.a.c.length, Yx(gG(pG(fD(n.f), c), !1), yc(t, 1)), n.d.a.gc() != 0) { + for (o = yc(t, 1), le(o, "Flexible Where Space Processing", 1), f = u(jd(HE(Xc(new $n(null, new xn(n.f.a, 16)), new xwn()), new Swn())), 19).a, h = u(jd(KE(Xc(new $n(null, new xn(n.f.a, 16)), new Lwn()), new Pwn())), 19).a, l = h - f, a = yd(new ca(), n.f), d = yd(new ca(), n.f), jo(lo(ho(fo(ao(new Ns(), 2e4), l), a), d)), _t(pt(pt(ID(n.i), new Nwn()), new Bwn()), new kTn(f, a, l, d)), r = n.d.a.ec().Kc(); r.Ob(); ) + i = u(r.Pb(), 213), i.g = 1; + Yx(gG(pG(fD(n.f), c), !1), yc(o, 1)), ce(o); + } + on(sn(k(e, Dm))) && (o = yc(t, 1), le(o, "Straight Edges Post-Processing", 1), Z5e(n), ce(o)), DEe(n), n.e = null, n.f = null, n.i = null, n.c = null, Eu(n.k), n.j = null, n.a = null, n.o = null, n.d.a.$b(), ce(t); + } + function dTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _; + for (f = new E(n.a.b); f.a < f.c.c.length; ) + for (c = u(y(f), 29), O = new E(c.a); O.a < O.c.c.length; ) + $ = u(y(O), 10), e.g[$.p] = $, e.a[$.p] = $, e.d[$.p] = 0; + for (h = n.a.b, e.c == (Ff(), O1) && (h = I(h, 152) ? I2(u(h, 152)) : I(h, 131) ? u(h, 131).a : I(h, 54) ? new od(h) : new K0(h)), o = h.Kc(); o.Ob(); ) + for (c = u(o.Pb(), 29), p = -1, g = c.a, e.o == (ef(), kf) && (p = nt, g = I(g, 152) ? I2(u(g, 152)) : I(g, 131) ? u(g, 131).a : I(g, 54) ? new od(g) : new K0(g)), _ = g.Kc(); _.Ob(); ) + if (x = u(_.Pb(), 10), d = null, e.c == O1 ? d = u(un(n.b.f, x.p), 15) : d = u(un(n.b.b, x.p), 15), d.gc() > 0) + if (i = d.gc(), l = Gt(j.Math.floor((i + 1) / 2)) - 1, r = Gt(j.Math.ceil((i + 1) / 2)) - 1, e.o == kf) + for (a = r; a >= l; a--) + e.a[x.p] == x && (m = u(d.Xb(a), 46), v = u(m.a, 10), !Ah(t, m.b) && p > n.b.e[v.p] && (e.a[v.p] = x, e.g[x.p] = e.g[v.p], e.a[x.p] = e.g[x.p], e.f[e.g[x.p].p] = (qn(), !!(on(e.f[e.g[x.p].p]) & x.k == (Qn(), pi))), p = n.b.e[v.p])); + else + for (a = l; a <= r; a++) + e.a[x.p] == x && (S = u(d.Xb(a), 46), C = u(S.a, 10), !Ah(t, S.b) && p < n.b.e[C.p] && (e.a[C.p] = x, e.g[x.p] = e.g[C.p], e.a[x.p] = e.g[x.p], e.f[e.g[x.p].p] = (qn(), !!(on(e.f[e.g[x.p].p]) & x.k == (Qn(), pi))), p = n.b.e[C.p])); + } + function $c() { + $c = N, l8n(), One = mi.a, u(D(R(mi.a), 0), 18), Pne = mi.f, u(D(R(mi.f), 0), 18), u(D(R(mi.f), 1), 34), Ine = mi.n, u(D(R(mi.n), 0), 34), u(D(R(mi.n), 1), 34), u(D(R(mi.n), 2), 34), u(D(R(mi.n), 3), 34), e1n = mi.g, u(D(R(mi.g), 0), 18), u(D(R(mi.g), 1), 34), Sne = mi.c, u(D(R(mi.c), 0), 18), u(D(R(mi.c), 1), 18), t1n = mi.i, u(D(R(mi.i), 0), 18), u(D(R(mi.i), 1), 18), u(D(R(mi.i), 2), 18), u(D(R(mi.i), 3), 18), u(D(R(mi.i), 4), 34), i1n = mi.j, u(D(R(mi.j), 0), 18), n1n = mi.d, u(D(R(mi.d), 0), 18), u(D(R(mi.d), 1), 18), u(D(R(mi.d), 2), 18), u(D(R(mi.d), 3), 18), u(D(R(mi.d), 4), 34), u(D(R(mi.d), 5), 34), u(D(R(mi.d), 6), 34), u(D(R(mi.d), 7), 34), Ane = mi.b, u(D(R(mi.b), 0), 34), u(D(R(mi.b), 1), 34), XP = mi.e, u(D(R(mi.e), 0), 34), u(D(R(mi.e), 1), 34), u(D(R(mi.e), 2), 34), u(D(R(mi.e), 3), 34), u(D(R(mi.e), 4), 18), u(D(R(mi.e), 5), 18), u(D(R(mi.e), 6), 18), u(D(R(mi.e), 7), 18), u(D(R(mi.e), 8), 18), u(D(R(mi.e), 9), 18), u(D(R(mi.e), 10), 34), Ul = mi.k, u(D(R(mi.k), 0), 34), u(D(R(mi.k), 1), 34); + } + function bTe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn; + for (wn = new Tt(), U = new Tt(), C = -1, h = new E(n); h.a < h.c.c.length; ) { + for (o = u(y(h), 128), o.s = C--, a = 0, O = 0, c = new E(o.t); c.a < c.c.c.length; ) + i = u(y(c), 268), O += i.c; + for (r = new E(o.i); r.a < r.c.c.length; ) + i = u(y(r), 268), a += i.c; + o.n = a, o.u = O, O == 0 ? Ht(U, o, U.c.b, U.c) : a == 0 && Ht(wn, o, wn.c.b, wn.c); + } + for (Wn = jC(n), d = n.c.length, m = d + 1, S = d - 1, p = new X(); Wn.a.gc() != 0; ) { + for (; U.b != 0; ) + _ = (ne(U.b != 0), u(Ts(U, U.a.a), 128)), Wn.a.Bc(_) != null, _.s = S--, BY(_, wn, U); + for (; wn.b != 0; ) + en = (ne(wn.b != 0), u(Ts(wn, wn.a.a), 128)), Wn.a.Bc(en) != null, en.s = m++, BY(en, wn, U); + for (v = Bi, l = Wn.a.ec().Kc(); l.Ob(); ) + o = u(l.Pb(), 128), $ = o.u - o.n, $ >= v && ($ > v && (p.c = F(Zn, rn, 1, 0, 5, 1), v = $), p.c[p.c.length] = o); + p.c.length != 0 && (g = u(un(p, _T(e, p.c.length)), 128), Wn.a.Bc(g) != null, g.s = m++, BY(g, wn, U), p.c = F(Zn, rn, 1, 0, 5, 1)); + } + for (x = n.c.length + 1, f = new E(n); f.a < f.c.c.length; ) + o = u(y(f), 128), o.s < d && (o.s += x); + for (ln = new E(n); ln.a < ln.c.c.length; ) + for (en = u(y(ln), 128), t = new Ii(en.t, 0); t.b < t.d.gc(); ) + i = (ne(t.b < t.d.gc()), u(t.d.Xb(t.c = t.b++), 268)), zn = i.b, en.s > zn.s && (Wu(t), Qc(zn.i, i), i.c > 0 && (i.a = zn, W(zn.t, i), i.b = en, W(en.i, i))); + } + function HZ(n) { + var e, t, i, r, c; + switch (e = n.c, e) { + case 11: + return n.Ml(); + case 12: + return n.Ol(); + case 14: + return n.Ql(); + case 15: + return n.Tl(); + case 16: + return n.Rl(); + case 17: + return n.Ul(); + case 21: + return Qe(n), Je(), Je(), k9; + case 10: + switch (n.a) { + case 65: + return n.yl(); + case 90: + return n.Dl(); + case 122: + return n.Kl(); + case 98: + return n.El(); + case 66: + return n.zl(); + case 60: + return n.Jl(); + case 62: + return n.Hl(); + } + } + switch (c = oTe(n), e = n.c, e) { + case 3: + return n.Zl(c); + case 4: + return n.Xl(c); + case 5: + return n.Yl(c); + case 0: + if (n.a == 123 && n.d < n.j) { + if (r = n.d, i = 0, t = -1, (e = Di(n.i, r++)) >= 48 && e <= 57) { + for (i = e - 48; r < n.j && (e = Di(n.i, r++)) >= 48 && e <= 57; ) + if (i = i * 10 + e - 48, i < 0) + throw T(new Ee(Pe((je(), Utn)))); + } else + throw T(new Ee(Pe((je(), Zqn)))); + if (t = i, e == 44) { + if (r >= n.j) + throw T(new Ee(Pe((je(), eGn)))); + if ((e = Di(n.i, r++)) >= 48 && e <= 57) { + for (t = e - 48; r < n.j && (e = Di(n.i, r++)) >= 48 && e <= 57; ) + if (t = t * 10 + e - 48, t < 0) + throw T(new Ee(Pe((je(), Utn)))); + if (i > t) + throw T(new Ee(Pe((je(), tGn)))); + } else + t = -1; + } + if (e != 125) + throw T(new Ee(Pe((je(), nGn)))); + n.sl(r) ? (c = (Je(), Je(), new rb(9, c)), n.d = r + 1) : (c = (Je(), Je(), new rb(3, c)), n.d = r), c.dm(i), c.cm(t), Qe(n); + } + } + return c; + } + function O_n(n, e, t, i, r) { + var c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn; + for (m = new Ic(e.b), x = new Ic(e.b), g = new Ic(e.b), ln = new Ic(e.b), C = new Ic(e.b), en = _e(e, 0); en.b != en.d.c; ) + for (_ = u(Re(en), 11), f = new E(_.g); f.a < f.c.c.length; ) + if (c = u(y(f), 17), c.c.i == c.d.i) { + if (_.j == c.d.j) { + ln.c[ln.c.length] = c; + continue; + } else if (_.j == (J(), Kn) && c.d.j == ae) { + C.c[C.c.length] = c; + continue; + } + } + for (h = new E(C); h.a < h.c.c.length; ) + c = u(y(h), 17), Vke(n, c, t, i, (J(), Vn)); + for (o = new E(ln); o.a < o.c.c.length; ) + c = u(y(o), 17), wn = new qh(n), ta(wn, (Qn(), Mc)), H(wn, (nn(), Bt), (Ai(), Sc)), H(wn, (G(), rt), c), zn = new gc(), H(zn, rt, c.d), si(zn, (J(), Gn)), Hr(zn, wn), Wn = new gc(), H(Wn, rt, c.c), si(Wn, Vn), Hr(Wn, wn), H(c.c, Mu, wn), H(c.d, Mu, wn), Ki(c, null), Ti(c, null), t.c[t.c.length] = wn, H(wn, KS, Q(2)); + for (U = _e(e, 0); U.b != U.d.c; ) + _ = u(Re(U), 11), l = _.e.c.length > 0, S = _.g.c.length > 0, l && S ? g.c[g.c.length] = _ : l ? m.c[m.c.length] = _ : S && (x.c[x.c.length] = _); + for (v = new E(m); v.a < v.c.c.length; ) + p = u(y(v), 11), W(r, CZ(n, p, null, t)); + for (O = new E(x); O.a < O.c.c.length; ) + $ = u(y(O), 11), W(r, CZ(n, null, $, t)); + for (d = new E(g); d.a < d.c.c.length; ) + a = u(y(d), 11), W(r, CZ(n, a, a, t)); + } + function D_n(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn; + for ($ = new fn(Lt, Lt), e = new fn(Vt, Vt), ln = new E(n); ln.a < ln.c.c.length; ) + en = u(y(ln), 8), $.a = j.Math.min($.a, en.a), $.b = j.Math.min($.b, en.b), e.a = j.Math.max(e.a, en.a), e.b = j.Math.max(e.b, en.b); + for (g = new fn(e.a - $.a, e.b - $.b), l = new fn($.a - 50, $.b - g.a - 50), a = new fn($.a - 50, e.b + g.a + 50), d = new fn(e.a + g.b / 2 + 50, $.b + g.b / 2), p = new yZ(l, a, d), U = new hi(), c = new X(), t = new X(), U.a.zc(p, U), zn = new E(n); zn.a < zn.c.c.length; ) { + for (wn = u(y(zn), 8), c.c = F(Zn, rn, 1, 0, 5, 1), _ = U.a.ec().Kc(); _.Ob(); ) + O = u(_.Pb(), 308), i = O.d, al(i, O.a), Ud(al(O.d, wn), al(O.d, O.a)) < 0 && (c.c[c.c.length] = O); + for (t.c = F(Zn, rn, 1, 0, 5, 1), x = new E(c); x.a < x.c.c.length; ) + for (O = u(y(x), 308), C = new E(O.e); C.a < C.c.c.length; ) { + for (v = u(y(C), 168), o = !0, h = new E(c); h.a < h.c.c.length; ) + f = u(y(h), 308), f != O && (vc(v, un(f.e, 0)) || vc(v, un(f.e, 1)) || vc(v, un(f.e, 2))) && (o = !1); + o && (t.c[t.c.length] = v); + } + for (dxn(U, c), $i(U, new Eln()), m = new E(t); m.a < m.c.c.length; ) + v = u(y(m), 168), ci(U, new yZ(wn, v.a, v.b)); + } + for (S = new hi(), $i(U, new Zvn(S)), r = S.a.ec().Kc(); r.Ob(); ) + v = u(r.Pb(), 168), (LC(p, v.a) || LC(p, v.b)) && r.Qb(); + return $i(S, new Cln()), S; + } + function wTe(n) { + var e, t, i, r, c; + switch (t = u(k(n, (G(), Ac)), 21), e = iE(wWn), r = u(k(n, (nn(), Qb)), 334), r == (_h(), x1) && cs(e, gWn), on(sn(k(n, R_))) ? Ze(e, (Vi(), Vf), (rr(), XR)) : Ze(e, (Vi(), Kc), (rr(), XR)), k(n, (SC(), Ym)) != null && cs(e, pWn), (on(sn(k(n, asn))) || on(sn(k(n, osn)))) && ju(e, (Vi(), Or), (rr(), scn)), u(k(n, as), 103).g) { + case 2: + case 3: + case 4: + ju(Ze(e, (Vi(), Vf), (rr(), fcn)), Or, ocn); + } + switch (t.Hc((fr(), NS)) && ju(Ze(Ze(e, (Vi(), Vf), (rr(), ucn)), Tc, rcn), Or, ccn), B(k(n, __)) !== B((Zw(), hP)) && Ze(e, (Vi(), Kc), (rr(), Ccn)), t.Hc(RS) && (Ze(e, (Vi(), Vf), (rr(), Scn)), Ze(e, $l, Mcn), Ze(e, Kc, Acn)), B(k(n, WS)) !== B((f4(), Cm)) && B(k(n, Qh)) !== B((Hh(), yy)) && ju(e, (Vi(), Or), (rr(), vcn)), on(sn(k(n, hsn))) && Ze(e, (Vi(), Kc), (rr(), pcn)), on(sn(k(n, x_))) && Ze(e, (Vi(), Kc), (rr(), Pcn)), U9e(n) && (B(k(n, Qb)) === B(x1) ? i = u(k(n, Jk), 292) : i = u(k(n, F_), 292), c = i == (H3(), m_) ? (rr(), Tcn) : (rr(), Dcn), Ze(e, (Vi(), Tc), c)), u(k(n, Bsn), 377).g) { + case 1: + Ze(e, (Vi(), Tc), (rr(), Icn)); + break; + case 2: + ju(Ze(Ze(e, (Vi(), Kc), (rr(), ncn)), Tc, ecn), Or, tcn); + } + return B(k(n, Ll)) !== B((Rh(), Nl)) && Ze(e, (Vi(), Kc), (rr(), Ocn)), e; + } + function $_n(n) { + gd(n, new Oa(ad(fd(ld(hd(new na(), Us), "ELK Rectangle Packing"), "Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces."), new Hgn()))), Z(n, Us, ep, 1.3), Z(n, Us, dA, cn(efn)), Z(n, Us, s0, ofn), Z(n, Us, $b, 15), Z(n, Us, sA, cn(UYn)), Z(n, Us, hg, cn(VYn)), Z(n, Us, ip, cn(QYn)), Z(n, Us, tp, cn(JYn)), Z(n, Us, $4, cn(XYn)), Z(n, Us, G6, cn(cfn)), Z(n, Us, F4, cn(ZYn)), Z(n, Us, htn, cn(sfn)), Z(n, Us, ltn, cn(rfn)), Z(n, Us, btn, cn(ufn)), Z(n, Us, wtn, cn(ffn)), Z(n, Us, wB, cn(tfn)), Z(n, Us, lk, cn(ifn)), Z(n, Us, cB, cn(WYn)), Z(n, Us, dtn, cn(fy)), Z(n, Us, atn, cn(nfn)), Z(n, Us, gtn, cn(hfn)); + } + function r0(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C; + if (t == null) + return null; + if (n.a != e.Aj()) + throw T(new Hn(B4 + e.ne() + l0)); + if (I(e, 457)) { + if (C = j7e(u(e, 671), t), !C) + throw T(new Hn(AB + t + "' is not a valid enumerator of '" + e.ne() + "'")); + return C; + } + switch (g1((wu(), xi), e).cl()) { + case 2: { + t = Ec(t, !1); + break; + } + case 3: { + t = Ec(t, !0); + break; + } + } + if (i = g1(xi, e).$k(), i) + return i.Aj().Nh().Kh(i, t); + if (g = g1(xi, e).al(), g) { + for (C = new X(), l = aF(t), a = 0, d = l.length; a < d; ++a) + h = l[a], W(C, g.Aj().Nh().Kh(g, h)); + return C; + } + if (m = g1(xi, e).bl(), !m.dc()) { + for (v = m.Kc(); v.Ob(); ) { + p = u(v.Pb(), 148); + try { + if (C = p.Aj().Nh().Kh(p, t), C != null) + return C; + } catch (S) { + if (S = Et(S), !I(S, 60)) + throw T(S); + } + } + throw T(new Hn(AB + t + "' does not match any member types of the union datatype '" + e.ne() + "'")); + } + if (u(e, 834).Fj(), r = yge(e.Bj()), !r) + return null; + if (r == bm) { + o = 0; + try { + o = ss(t, Bi, nt) & Ut; + } catch (S) { + if (S = Et(S), I(S, 127)) + c = NC(t), o = c[0]; + else + throw T(S); + } + return i7(o); + } + if (r == HA) { + for (f = 0; f < l9.length; ++f) + try { + return j7n(l9[f], t); + } catch (S) { + if (S = Et(S), !I(S, 32)) + throw T(S); + } + throw T(new Hn(AB + t + "' is not a date formatted string of the form yyyy-MM-dd'T'HH:mm:ss'.'SSSZ or a valid subset thereof")); + } + throw T(new Hn(AB + t + "' is invalid. ")); + } + function gTe(n, e) { + var t, i, r, c, o, f, h, l; + if (t = 0, o = 0, c = e.length, f = null, l = new _0(), o < c && (Te(o, e.length), e.charCodeAt(o) == 43) && (++o, ++t, o < c && (Te(o, e.length), e.charCodeAt(o) == 43 || (Te(o, e.length), e.charCodeAt(o) == 45)))) + throw T(new Sf(u0 + e + '"')); + for (; o < c && (Te(o, e.length), e.charCodeAt(o) != 46) && (Te(o, e.length), e.charCodeAt(o) != 101) && (Te(o, e.length), e.charCodeAt(o) != 69); ) + ++o; + if (l.a += "" + Zu(e == null ? iu : (_n(e), e), t, o), o < c && (Te(o, e.length), e.charCodeAt(o) == 46)) { + for (++o, t = o; o < c && (Te(o, e.length), e.charCodeAt(o) != 101) && (Te(o, e.length), e.charCodeAt(o) != 69); ) + ++o; + n.e = o - t, l.a += "" + Zu(e == null ? iu : (_n(e), e), t, o); + } else + n.e = 0; + if (o < c && (Te(o, e.length), e.charCodeAt(o) == 101 || (Te(o, e.length), e.charCodeAt(o) == 69)) && (++o, t = o, o < c && (Te(o, e.length), e.charCodeAt(o) == 43) && (++o, o < c && (Te(o, e.length), e.charCodeAt(o) != 45) && ++t), f = e.substr(t, c - t), n.e = n.e - ss(f, Bi, nt), n.e != Gt(n.e))) + throw T(new Sf("Scale out of range.")); + if (h = l.a, h.length < 16) { + if (n.f = (Fin == null && (Fin = new RegExp("^[+-]?\\d*$", "i")), Fin.test(h) ? parseInt(h, 10) : NaN), isNaN(n.f)) + throw T(new Sf(u0 + e + '"')); + n.a = wY(n.f); + } else + N2e(n, new il(h)); + for (n.d = l.a.length, r = 0; r < l.a.length && (i = Di(l.a, r), !(i != 45 && i != 48)); ++r) + --n.d; + n.d == 0 && (n.d = 1); + } + function yL() { + yL = N, dt = new Dd(), Tn(dt, (J(), Ef), Pc), Tn(dt, to, Pc), Tn(dt, to, uu), Tn(dt, Fs, mu), Tn(dt, Fs, Pc), Tn(dt, Do, Pc), Tn(dt, Do, Pu), Tn(dt, bs, ru), Tn(dt, bs, Pc), Tn(dt, cu, qc), Tn(dt, cu, Pc), Tn(dt, cu, Pu), Tn(dt, cu, ru), Tn(dt, qc, cu), Tn(dt, qc, uu), Tn(dt, qc, mu), Tn(dt, qc, Pc), Tn(dt, $o, $o), Tn(dt, $o, Pu), Tn(dt, $o, uu), Tn(dt, Su, Su), Tn(dt, Su, Pu), Tn(dt, Su, mu), Tn(dt, ws, ws), Tn(dt, ws, ru), Tn(dt, ws, uu), Tn(dt, xs, xs), Tn(dt, xs, ru), Tn(dt, xs, mu), Tn(dt, Pu, Do), Tn(dt, Pu, cu), Tn(dt, Pu, $o), Tn(dt, Pu, Su), Tn(dt, Pu, Pc), Tn(dt, Pu, Pu), Tn(dt, Pu, uu), Tn(dt, Pu, mu), Tn(dt, ru, bs), Tn(dt, ru, cu), Tn(dt, ru, ws), Tn(dt, ru, xs), Tn(dt, ru, ru), Tn(dt, ru, uu), Tn(dt, ru, mu), Tn(dt, ru, Pc), Tn(dt, uu, to), Tn(dt, uu, qc), Tn(dt, uu, $o), Tn(dt, uu, ws), Tn(dt, uu, Pu), Tn(dt, uu, ru), Tn(dt, uu, uu), Tn(dt, uu, Pc), Tn(dt, mu, Fs), Tn(dt, mu, qc), Tn(dt, mu, Su), Tn(dt, mu, xs), Tn(dt, mu, Pu), Tn(dt, mu, ru), Tn(dt, mu, mu), Tn(dt, mu, Pc), Tn(dt, Pc, Ef), Tn(dt, Pc, to), Tn(dt, Pc, Fs), Tn(dt, Pc, Do), Tn(dt, Pc, bs), Tn(dt, Pc, cu), Tn(dt, Pc, qc), Tn(dt, Pc, Pu), Tn(dt, Pc, ru), Tn(dt, Pc, uu), Tn(dt, Pc, mu), Tn(dt, Pc, Pc); + } + function qZ(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln; + for (n.d = new fn(Lt, Lt), n.c = new fn(Vt, Vt), g = e.Kc(); g.Ob(); ) + for (a = u(g.Pb(), 37), O = new E(a.a); O.a < O.c.c.length; ) + $ = u(y(O), 10), n.d.a = j.Math.min(n.d.a, $.n.a - $.d.b), n.d.b = j.Math.min(n.d.b, $.n.b - $.d.d), n.c.a = j.Math.max(n.c.a, $.n.a + $.o.a + $.d.c), n.c.b = j.Math.max(n.c.b, $.n.b + $.o.b + $.d.a); + for (f = new Jmn(), d = e.Kc(); d.Ob(); ) + a = u(d.Pb(), 37), i = ZCe(n, a), W(f.a, i), i.a = i.a | !u(k(i.c, (G(), zb)), 21).dc(); + for (n.b = (yF(), ln = new Ean(), ln.f = new NIn(t), ln.b = sEe(ln.f, f), ln), wEe((v = n.b, new Gp(), v)), n.e = new Li(), n.a = n.b.f.e, o = new E(f.a); o.a < o.c.c.length; ) + for (r = u(y(o), 841), x = Z1e(n.b, r), eke(r.c, x.a, x.b), C = new E(r.c.a); C.a < C.c.c.length; ) + m = u(y(C), 10), m.k == (Qn(), Xt) && (S = RY(n, m.n, u(k(m, (G(), ec)), 61)), st(Lo(m.n), S)); + for (c = new E(f.a); c.a < c.c.c.length; ) + for (r = u(y(c), 841), l = new E(Oge(r)); l.a < l.c.c.length; ) + for (h = u(y(l), 17), en = new mj(h.a), u3(en, 0, tf(h.c)), Ke(en, tf(h.d)), p = null, U = _e(en, 0); U.b != U.d.c; ) { + if (_ = u(Re(U), 8), !p) { + p = _; + continue; + } + iV(p.a, _.a) ? (n.e.a = j.Math.min(n.e.a, p.a), n.a.a = j.Math.max(n.a.a, p.a)) : iV(p.b, _.b) && (n.e.b = j.Math.min(n.e.b, p.b), n.a.b = j.Math.max(n.a.b, p.b)), p = _; + } + vE(n.e), st(n.a, n.e); + } + function pTe(n) { + ke(n.b, Vs, A(M(tn, 1), q, 2, 6, [a0, "ConsistentTransient"])), ke(n.a, Vs, A(M(tn, 1), q, 2, 6, [a0, "WellFormedSourceURI"])), ke(n.o, Vs, A(M(tn, 1), q, 2, 6, [a0, "InterfaceIsAbstract AtMostOneID UniqueFeatureNames UniqueOperationSignatures NoCircularSuperTypes WellFormedMapEntryClass ConsistentSuperTypes DisjointFeatureAndOperationSignatures"])), ke(n.p, Vs, A(M(tn, 1), q, 2, 6, [a0, "WellFormedInstanceTypeName UniqueTypeParameterNames"])), ke(n.v, Vs, A(M(tn, 1), q, 2, 6, [a0, "UniqueEnumeratorNames UniqueEnumeratorLiterals"])), ke(n.R, Vs, A(M(tn, 1), q, 2, 6, [a0, "WellFormedName"])), ke(n.T, Vs, A(M(tn, 1), q, 2, 6, [a0, "UniqueParameterNames UniqueTypeParameterNames NoRepeatingVoid"])), ke(n.U, Vs, A(M(tn, 1), q, 2, 6, [a0, "WellFormedNsURI WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames UniqueNsURIs"])), ke(n.W, Vs, A(M(tn, 1), q, 2, 6, [a0, "ConsistentOpposite SingleContainer ConsistentKeys ConsistentUnique ConsistentContainer"])), ke(n.bb, Vs, A(M(tn, 1), q, 2, 6, [a0, "ValidDefaultValueLiteral"])), ke(n.eb, Vs, A(M(tn, 1), q, 2, 6, [a0, "ValidLowerBound ValidUpperBound ConsistentBounds ValidType"])), ke(n.H, Vs, A(M(tn, 1), q, 2, 6, [a0, "ConsistentType ConsistentBounds ConsistentArguments"])); + } + function vTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn; + if (!e.dc()) { + if (r = new fu(), f = t || u(e.Xb(0), 17), v = f.c, C6(), g = v.i.k, !(g == (Qn(), ii) || g == Mc || g == Xt || g == vf)) + throw T(new Hn("The target node of the edge must be a normal node or a northSouthPort.")); + for (sa(r, Gr(A(M(di, 1), q, 8, 0, [v.i.n, v.n, v.a]))), (J(), cu).Hc(v.j) && (C = K(Y(k(v, (G(), fv)))), d = new fn(Gr(A(M(di, 1), q, 8, 0, [v.i.n, v.n, v.a])).a, C), Ht(r, d, r.c.b, r.c)), a = null, i = !1, h = e.Kc(); h.Ob(); ) + o = u(h.Pb(), 17), c = o.a, c.b != 0 && (i ? (l = If(st(a, (ne(c.b != 0), u(c.a.a.c, 8))), 0.5), Ht(r, l, r.c.b, r.c), i = !1) : i = !0, a = Qr((ne(c.b != 0), u(c.c.b.c, 8))), Xi(r, c), _s(c)); + m = f.d, cu.Hc(m.j) && (C = K(Y(k(m, (G(), fv)))), d = new fn(Gr(A(M(di, 1), q, 8, 0, [m.i.n, m.n, m.a])).a, C), Ht(r, d, r.c.b, r.c)), sa(r, Gr(A(M(di, 1), q, 8, 0, [m.i.n, m.n, m.a]))), n.d == (V3(), sK) && (S = (ne(r.b != 0), u(r.a.a.c, 8)), $ = u(qo(r, 1), 8), O = new u$(XV(v.j)), O.a *= 5, O.b *= 5, x = ji(new fn($.a, $.b), S), _ = new fn(i$(O.a, x.a), i$(O.b, x.b)), st(_, S), U = _e(r, 1), y8(U, _), en = (ne(r.b != 0), u(r.c.b.c, 8)), ln = u(qo(r, r.b - 2), 8), O = new u$(XV(m.j)), O.a *= 5, O.b *= 5, x = ji(new fn(ln.a, ln.b), en), wn = new fn(i$(O.a, x.a), i$(O.b, x.b)), st(wn, en), u3(r, r.b - 1, wn)), p = new jZ(r), Xi(f.a, iFn(p)); + } + } + function mTe(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi, ps, oo, Mf, hI, Ky, y9, Hy; + if (O = u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82), _ = O.Dg(), U = O.Eg(), x = O.Cg() / 2, m = O.Bg() / 2, I(O, 186) && ($ = u(O, 118), _ += nf($).i, _ += nf($).i), _ += x, U += m, Wn = u(D((!n.b && (n.b = new Fn(he, n, 4, 7)), n.b), 0), 82), Ye = Wn.Dg(), fi = Wn.Eg(), se = Wn.Cg() / 2, en = Wn.Bg() / 2, I(Wn, 186) && (zn = u(Wn, 118), Ye += nf(zn).i, Ye += nf(zn).i), Ye += se, fi += en, (!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i == 0) + f = (dd(), l = new Vy(), l), me((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a), f); + else if ((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i > 1) + for (v = new b2((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a)); v.e != v.i.gc(); ) + p6(v); + for (o = u(D((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a), 0), 202), C = Ye, Ye > _ + x ? C = _ + x : Ye < _ - x && (C = _ - x), S = fi, fi > U + m ? S = U + m : fi < U - m && (S = U - m), C > _ - x && C < _ + x && S > U - m && S < U + m && (C = _ + x), D3(o, C), F3(o, S), ln = _, _ > Ye + se ? ln = Ye + se : _ < Ye - se && (ln = Ye - se), wn = U, U > fi + en ? wn = fi + en : U < fi - en && (wn = fi - en), ln > Ye - se && ln < Ye + se && wn > fi - en && wn < fi + en && (wn = fi + en), O3(o, ln), $3(o, wn), de((!o.a && (o.a = new Yt(io, o, 5)), o.a)), c = _T(e, 5), O == Wn && ++c, Mf = ln - C, y9 = wn - S, ps = j.Math.sqrt(Mf * Mf + y9 * y9), d = ps * 0.20000000298023224, hI = Mf / (c + 1), Hy = y9 / (c + 1), oo = C, Ky = S, a = 0; a < c; a++) + oo += hI, Ky += Hy, g = oo + Fu(e, 24) * uk * d - d / 2, g < 0 ? g = 1 : g > t && (g = t - 1), p = Ky + Fu(e, 24) * uk * d - d / 2, p < 0 ? p = 1 : p > i && (p = i - 1), r = (dd(), h = new Xy(), h), UC(r, g), WC(r, p), me((!o.a && (o.a = new Yt(io, o, 5)), o.a), r); + } + function nn() { + nn = N, q_ = (Xe(), QZn), Isn = JZn, Zk = yhn, Mo = YZn, jp = jhn, T0 = ZZn, ew = Ehn, bv = Chn, wv = Thn, G_ = KP, M0 = td, z_ = nne, Fm = Shn, rP = Ap, Yk = (zZ(), WVn), Dg = XVn, Ja = VVn, $g = QVn, $Qn = new tr(_P, Q(0)), dv = GVn, Psn = zVn, yp = UVn, Bsn = vQn, Osn = ZVn, Dsn = tQn, W_ = fQn, $sn = cQn, Fsn = sQn, cP = jQn, X_ = mQn, Lsn = bQn, xsn = aQn, Nsn = gQn, E0 = BVn, $m = RVn, B_ = tVn, ssn = rVn, Csn = new md(12), Esn = new tr(ed, Csn), rsn = (Hh(), Ev), Qh = new tr(Jfn, rsn), Yb = new tr(Bu, 0), FQn = new tr(tH, Q(1)), zS = new tr(Tp, D4), Qa = RP, Bt = n9, av = Hg, MQn = py, Qf = KZn, Qb = Bg, xQn = new tr(iH, (qn(), !0)), Jb = vy, Xa = VK, Va = nd, iP = _l, H_ = BP, isn = (or(), mh), as = new tr(S0, isn), j0 = _g, eP = uhn, Zb = cw, DQn = eH, Asn = mhn, Msn = (qw(), Cy), new tr(bhn, Msn), PQn = JK, IQn = YK, OQn = ZK, SQn = QK, U_ = YVn, vsn = MVn, __ = TVn, xm = JVn, Hc = vVn, Vb = XXn, Om = WXn, Xb = FXn, nsn = xXn, F_ = RXn, Jk = LXn, x_ = zXn, msn = AVn, ksn = SVn, dsn = aVn, tP = HVn, K_ = OVn, R_ = sVn, jsn = LVn, usn = nVn, N_ = eVn, $_ = LP, ysn = PVn, WS = AXn, Jun = MXn, US = TXn, hsn = hVn, fsn = fVn, lsn = lVn, hv = Kg, Mr = Rg, P1 = Zfn, Jf = XK, L_ = WK, esn = KXn, I1 = nH, Im = GZn, YS = zZn, C0 = ghn, Tsn = UZn, lv = WZn, wsn = kVn, gsn = jVn, nw = Mp, O_ = CXn, psn = CVn, JS = JXn, QS = QXn, nP = my, bsn = wVn, Dm = $Vn, ny = Mhn, tsn = VXn, Ssn = qVn, csn = YXn, AQn = pVn, TQn = qXn, asn = ihn, ZS = mVn, VS = GXn, Ll = $Xn, Zun = OXn, XS = PXn, Yun = IXn, D_ = DXn, kp = SXn, osn = oVn; + } + function jL(n, e) { + oL(); + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye; + if (ln = n.e, v = n.d, r = n.a, ln == 0) + switch (e) { + case 0: + return "0"; + case 1: + return A4; + case 2: + return "0.00"; + case 3: + return "0.000"; + case 4: + return "0.0000"; + case 5: + return "0.00000"; + case 6: + return "0.000000"; + default: + return U = new V1(), e < 0 ? U.a += "0E+" : U.a += "0E", U.a += -e, U.a; + } + if (O = v * 10 + 1 + 7, x = F(Ls, Bf, 25, O + 1, 15, 1), t = O, v == 1) + if (f = r[0], f < 0) { + Ye = ui(f, hr); + do + m = Ye, Ye = M7(Ye, 10), x[--t] = 48 + ge(vl(m, Ni(Ye, 10))) & Ut; + while (hc(Ye, 0) != 0); + } else { + Ye = f; + do + m = Ye, Ye = Ye / 10 | 0, x[--t] = 48 + (m - Ye * 10) & Ut; + while (Ye != 0); + } + else { + zn = F(be, Le, 25, v, 15, 1), se = v, pc(r, 0, zn, 0, se); + n: + for (; ; ) { + for (en = 0, l = se - 1; l >= 0; l--) + Wn = Hi(Ih(en, 32), ui(zn[l], hr)), S = Cve(Wn), zn[l] = ge(S), en = ge(cl(S, 32)); + $ = ge(en), C = t; + do + x[--t] = 48 + $ % 10 & Ut; + while (($ = $ / 10 | 0) != 0 && t != 0); + for (i = 9 - C + t, h = 0; h < i && t > 0; h++) + x[--t] = 48; + for (d = se - 1; zn[d] == 0; d--) + if (d == 0) + break n; + se = d + 1; + } + for (; x[t] == 48; ) + ++t; + } + if (p = ln < 0, o = O - t - e - 1, e == 0) + return p && (x[--t] = 45), Hs(x, t, O - t); + if (e > 0 && o >= -6) { + if (o >= 0) { + for (a = t + o, g = O - 1; g >= a; g--) + x[g + 1] = x[g]; + return x[++a] = 46, p && (x[--t] = 45), Hs(x, t, O - t + 1); + } + for (d = 2; d < -o + 1; d++) + x[--t] = 48; + return x[--t] = 46, x[--t] = 48, p && (x[--t] = 45), Hs(x, t, O - t); + } + return wn = t + 1, c = O, _ = new _0(), p && (_.a += "-"), c - wn >= 1 ? (sl(_, x[t]), _.a += ".", _.a += Hs(x, t + 1, O - t - 1)) : _.a += Hs(x, t, O - t), _.a += "E", o > 0 && (_.a += "+"), _.a += "" + o, _.a; + } + function F_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + switch (n.c = e, n.g = new we(), t = (H0(), new B0(n.c)), i = new tj(t), TQ(i), O = Ce(hn(n.c, (S7(), kfn))), h = u(hn(n.c, BK), 316), _ = u(hn(n.c, RK), 429), o = u(hn(n.c, pfn), 482), x = u(hn(n.c, NK), 430), n.j = K(Y(hn(n.c, lZn))), f = n.a, h.g) { + case 0: + f = n.a; + break; + case 1: + f = n.b; + break; + case 2: + f = n.i; + break; + case 3: + f = n.e; + break; + case 4: + f = n.f; + break; + default: + throw T(new Hn(bA + (h.f != null ? h.f : "" + h.g))); + } + if (n.d = new rMn(f, _, o), H(n.d, (R3(), pm), sn(hn(n.c, fZn))), n.d.c = on(sn(hn(n.c, vfn))), iC(n.c).i == 0) + return n.d; + for (d = new ie(iC(n.c)); d.e != d.i.gc(); ) { + for (a = u(oe(d), 33), p = a.g / 2, g = a.f / 2, U = new fn(a.i + p, a.j + g); Uu(n.g, U); ) + W0(U, (j.Math.random() - 0.5) * Kf, (j.Math.random() - 0.5) * Kf); + m = u(hn(a, (Xe(), my)), 142), C = new yMn(U, new ys(U.a - p - n.j / 2 - m.b, U.b - g - n.j / 2 - m.d, a.g + n.j + (m.b + m.c), a.f + n.j + (m.d + m.a))), W(n.d.i, C), it(n.g, U, new Pi(C, a)); + } + switch (x.g) { + case 0: + if (O == null) + n.d.d = u(un(n.d.i, 0), 65); + else + for ($ = new E(n.d.i); $.a < $.c.c.length; ) + C = u(y($), 65), v = u(u(te(n.g, C.a), 46).b, 33).zg(), v != null && An(v, O) && (n.d.d = C); + break; + case 1: + for (r = new fn(n.c.g, n.c.f), r.a *= 0.5, r.b *= 0.5, W0(r, n.c.i, n.c.j), c = Lt, S = new E(n.d.i); S.a < S.c.c.length; ) + C = u(y(S), 65), l = al(C.a, r), l < c && (c = l, n.d.d = C); + break; + default: + throw T(new Hn(bA + (x.f != null ? x.f : "" + x.g))); + } + return n.d; + } + function x_n(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + for (_ = u(D((!n.a && (n.a = new V(Mt, n, 6, 6)), n.a), 0), 202), a = new fu(), x = new we(), U = JBn(_), Rc(x.f, _, U), g = new we(), i = new Tt(), v = ul(of(A(M(gf, 1), rn, 20, 0, [(!e.d && (e.d = new Fn(bi, e, 8, 5)), e.d), (!e.e && (e.e = new Fn(bi, e, 7, 4)), e.e)]))); Se(v); ) { + if (p = u(ve(v), 79), (!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i != 1) + throw T(new Hn(oqn + (!n.a && (n.a = new V(Mt, n, 6, 6)), n.a).i)); + p != n && (C = u(D((!p.a && (p.a = new V(Mt, p, 6, 6)), p.a), 0), 202), Ht(i, C, i.c.b, i.c), m = u(Vr(Sr(x.f, C)), 12), m || (m = JBn(C), Rc(x.f, C, m)), d = t ? ji(new kr(u(un(U, U.c.length - 1), 8)), u(un(m, m.c.length - 1), 8)) : ji(new kr((Ln(0, U.c.length), u(U.c[0], 8))), (Ln(0, m.c.length), u(m.c[0], 8))), Rc(g.f, C, d)); + } + if (i.b != 0) + for (S = u(un(U, t ? U.c.length - 1 : 0), 8), l = 1; l < U.c.length; l++) { + for ($ = u(un(U, t ? U.c.length - 1 - l : l), 8), r = _e(i, 0); r.b != r.d.c; ) + C = u(Re(r), 202), m = u(Vr(Sr(x.f, C)), 12), m.c.length <= l ? HC(r) : (O = st(new kr(u(un(m, t ? m.c.length - 1 - l : l), 8)), u(Vr(Sr(g.f, C)), 8)), ($.a != O.a || $.b != O.b) && (c = $.a - S.a, f = $.b - S.b, o = O.a - S.a, h = O.b - S.b, o * f == h * c && (c == 0 || isNaN(c) ? c : c < 0 ? -1 : 1) == (o == 0 || isNaN(o) ? o : o < 0 ? -1 : 1) && (f == 0 || isNaN(f) ? f : f < 0 ? -1 : 1) == (h == 0 || isNaN(h) ? h : h < 0 ? -1 : 1) ? (j.Math.abs(c) < j.Math.abs(o) || j.Math.abs(f) < j.Math.abs(h)) && Ht(a, $, a.c.b, a.c) : l > 1 && Ht(a, S, a.c.b, a.c), HC(r))); + S = $; + } + return a; + } + function kTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi, ps, oo, Mf; + for (le(t, "Greedy cycle removal", 1), O = e.a, Mf = O.c.length, n.a = F(be, Le, 25, Mf, 15, 1), n.c = F(be, Le, 25, Mf, 15, 1), n.b = F(be, Le, 25, Mf, 15, 1), l = 0, S = new E(O); S.a < S.c.c.length; ) { + for (m = u(y(S), 10), m.p = l, wn = new E(m.j); wn.a < wn.c.c.length; ) { + for (U = u(y(wn), 11), f = new E(U.e); f.a < f.c.c.length; ) + i = u(y(f), 17), i.c.i != m && (se = u(k(i, (nn(), dv)), 19).a, n.a[l] += se > 0 ? se + 1 : 1); + for (o = new E(U.g); o.a < o.c.c.length; ) + i = u(y(o), 17), i.d.i != m && (se = u(k(i, (nn(), dv)), 19).a, n.c[l] += se > 0 ? se + 1 : 1); + } + n.c[l] == 0 ? Ke(n.e, m) : n.a[l] == 0 && Ke(n.f, m), ++l; + } + for (v = -1, p = 1, d = new X(), n.d = u(k(e, (G(), vp)), 230); Mf > 0; ) { + for (; n.e.b != 0; ) + fi = u(aD(n.e), 10), n.b[fi.p] = v--, lZ(n, fi), --Mf; + for (; n.f.b != 0; ) + ps = u(aD(n.f), 10), n.b[ps.p] = p++, lZ(n, ps), --Mf; + if (Mf > 0) { + for (g = Bi, $ = new E(O); $.a < $.c.c.length; ) + m = u(y($), 10), n.b[m.p] == 0 && (x = n.c[m.p] - n.a[m.p], x >= g && (x > g && (d.c = F(Zn, rn, 1, 0, 5, 1), g = x), d.c[d.c.length] = m)); + a = n.Zf(d), n.b[a.p] = p++, lZ(n, a), --Mf; + } + } + for (Ye = O.c.length + 1, l = 0; l < O.c.length; l++) + n.b[l] < 0 && (n.b[l] += Ye); + for (C = new E(O); C.a < C.c.c.length; ) + for (m = u(y(C), 10), Wn = bAn(m.j), en = Wn, ln = 0, zn = en.length; ln < zn; ++ln) + for (U = en[ln], _ = xf(U.g), r = _, c = 0, h = r.length; c < h; ++c) + i = r[c], oo = i.d.i.p, n.b[m.p] > n.b[oo] && (t0(i, !0), H(e, Uk, (qn(), !0))); + n.a = null, n.c = null, n.b = null, _s(n.f), _s(n.e), ce(t); + } + function L_n(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + for (i = new X(), f = new X(), C = e / 2, p = n.gc(), r = u(n.Xb(0), 8), S = u(n.Xb(1), 8), v = Lx(r.a, r.b, S.a, S.b, C), W(i, (Ln(0, v.c.length), u(v.c[0], 8))), W(f, (Ln(1, v.c.length), u(v.c[1], 8))), l = 2; l < p; l++) + m = r, r = S, S = u(n.Xb(l), 8), v = Lx(r.a, r.b, m.a, m.b, C), W(i, (Ln(1, v.c.length), u(v.c[1], 8))), W(f, (Ln(0, v.c.length), u(v.c[0], 8))), v = Lx(r.a, r.b, S.a, S.b, C), W(i, (Ln(0, v.c.length), u(v.c[0], 8))), W(f, (Ln(1, v.c.length), u(v.c[1], 8))); + for (v = Lx(S.a, S.b, r.a, r.b, C), W(i, (Ln(1, v.c.length), u(v.c[1], 8))), W(f, (Ln(0, v.c.length), u(v.c[0], 8))), t = new fu(), o = new X(), Ke(t, (Ln(0, i.c.length), u(i.c[0], 8))), a = 1; a < i.c.length - 2; a += 2) + c = (Ln(a, i.c.length), u(i.c[a], 8)), g = Vxn((Ln(a - 1, i.c.length), u(i.c[a - 1], 8)), c, (Ln(a + 1, i.c.length), u(i.c[a + 1], 8)), (Ln(a + 2, i.c.length), u(i.c[a + 2], 8))), !isFinite(g.a) || !isFinite(g.b) ? Ht(t, c, t.c.b, t.c) : Ht(t, g, t.c.b, t.c); + for (Ke(t, u(un(i, i.c.length - 1), 8)), W(o, (Ln(0, f.c.length), u(f.c[0], 8))), d = 1; d < f.c.length - 2; d += 2) + c = (Ln(d, f.c.length), u(f.c[d], 8)), g = Vxn((Ln(d - 1, f.c.length), u(f.c[d - 1], 8)), c, (Ln(d + 1, f.c.length), u(f.c[d + 1], 8)), (Ln(d + 2, f.c.length), u(f.c[d + 2], 8))), !isFinite(g.a) || !isFinite(g.b) ? o.c[o.c.length] = c : o.c[o.c.length] = g; + for (W(o, u(un(f, f.c.length - 1), 8)), h = o.c.length - 1; h >= 0; h--) + Ke(t, (Ln(h, o.c.length), u(o.c[h], 8))); + return t; + } + function yTe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p; + if (o = !0, d = null, i = null, r = null, e = !1, p = Hne, l = null, c = null, f = 0, h = HF(n, f, a1n, d1n), h < n.length && (Te(h, n.length), n.charCodeAt(h) == 58) && (d = n.substr(f, h - f), f = h + 1), t = d != null && _9(tI, d.toLowerCase()), t) { + if (h = n.lastIndexOf("!/"), h == -1) + throw T(new Hn("no archive separator")); + o = !0, i = Zu(n, f, ++h), f = h; + } else + f >= 0 && An(n.substr(f, 2), "//") ? (f += 2, h = HF(n, f, a9, d9), i = n.substr(f, h - f), f = h) : d != null && (f == n.length || (Te(f, n.length), n.charCodeAt(f) != 47)) && (o = !1, h = qz(n, tu(35), f), h == -1 && (h = n.length), i = n.substr(f, h - f), f = h); + if (!t && f < n.length && (Te(f, n.length), n.charCodeAt(f) == 47) && (h = HF(n, f + 1, a9, d9), a = n.substr(f + 1, h - (f + 1)), a.length > 0 && Di(a, a.length - 1) == 58 && (r = a, f = h)), f < n.length && (Te(f, n.length), n.charCodeAt(f) == 47) && (++f, e = !0), f < n.length && (Te(f, n.length), n.charCodeAt(f) != 63) && (Te(f, n.length), n.charCodeAt(f) != 35)) { + for (g = new X(); f < n.length && (Te(f, n.length), n.charCodeAt(f) != 63) && (Te(f, n.length), n.charCodeAt(f) != 35); ) + h = HF(n, f, a9, d9), W(g, n.substr(f, h - f)), f = h, f < n.length && (Te(f, n.length), n.charCodeAt(f) == 47) && (fge(n, ++f) || (g.c[g.c.length] = "")); + p = F(tn, q, 2, g.c.length, 6, 1), lf(g, p); + } + return f < n.length && (Te(f, n.length), n.charCodeAt(f) == 63) && (h = c3(n, 35, ++f), h == -1 && (h = n.length), l = n.substr(f, h - f), f = h), f < n.length && (c = r8(n, ++f)), lEe(o, d, i, r, p, l), new zx(o, d, i, r, e, p, l, c); + } + function jTe(n, e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi, ps, oo; + for (fi = new X(), v = new E(e.b); v.a < v.c.c.length; ) + for (g = u(y(v), 29), _ = new E(g.a); _.a < _.c.c.length; ) { + for (x = u(y(_), 10), x.p = -1, d = Bi, ln = Bi, zn = new E(x.j); zn.a < zn.c.c.length; ) { + for (wn = u(y(zn), 11), r = new E(wn.e); r.a < r.c.c.length; ) + t = u(y(r), 17), Wn = u(k(t, (nn(), yp)), 19).a, d = j.Math.max(d, Wn); + for (i = new E(wn.g); i.a < i.c.c.length; ) + t = u(y(i), 17), Wn = u(k(t, (nn(), yp)), 19).a, ln = j.Math.max(ln, Wn); + } + H(x, bP, Q(d)), H(x, wP, Q(ln)); + } + for (S = 0, p = new E(e.b); p.a < p.c.c.length; ) + for (g = u(y(p), 29), _ = new E(g.a); _.a < _.c.c.length; ) + x = u(y(_), 10), x.p < 0 && (Ye = new Jq(), Ye.b = S++, mBn(n, x, Ye), fi.c[fi.c.length] = Ye); + for (en = nh(fi.c.length), a = nh(fi.c.length), o = 0; o < fi.c.length; o++) + W(en, new X()), W(a, Q(0)); + for (zEe(e, fi, en, a), ps = u(lf(fi, F(vJn, THn, 257, fi.c.length, 0, 1)), 840), U = u(lf(en, F(Ds, Db, 15, en.c.length, 0, 1)), 192), l = F(be, Le, 25, a.c.length, 15, 1), f = 0; f < l.length; f++) + l[f] = (Ln(f, a.c.length), u(a.c[f], 19)).a; + for ($ = 0, O = new X(), h = 0; h < ps.length; h++) + l[h] == 0 && W(O, ps[h]); + for (C = F(be, Le, 25, ps.length, 15, 1); O.c.length != 0; ) + for (Ye = u(l1(O, 0), 257), C[Ye.b] = $++; !U[Ye.b].dc(); ) + oo = u(U[Ye.b].$c(0), 257), --l[oo.b], l[oo.b] == 0 && (O.c[O.c.length] = oo); + for (n.a = F(vJn, THn, 257, ps.length, 0, 1), c = 0; c < ps.length; c++) + for (m = ps[c], se = C[c], n.a[se] = m, m.b = se, _ = new E(m.e); _.a < _.c.c.length; ) + x = u(y(_), 10), x.p = se; + return n.a; + } + function Qe(n) { + var e, t, i; + if (n.d >= n.j) { + n.a = -1, n.c = 1; + return; + } + if (e = Di(n.i, n.d++), n.a = e, n.b == 1) { + switch (e) { + case 92: + if (i = 10, n.d >= n.j) + throw T(new Ee(Pe((je(), yA)))); + n.a = Di(n.i, n.d++); + break; + case 45: + (n.e & 512) == 512 && n.d < n.j && Di(n.i, n.d) == 91 ? (++n.d, i = 24) : i = 0; + break; + case 91: + if ((n.e & 512) != 512 && n.d < n.j && Di(n.i, n.d) == 58) { + ++n.d, i = 20; + break; + } + default: + (e & 64512) == rk && n.d < n.j && (t = Di(n.i, n.d), (t & 64512) == 56320 && (n.a = Ji + (e - rk << 10) + t - 56320, ++n.d)), i = 0; + } + n.c = i; + return; + } + switch (e) { + case 124: + i = 2; + break; + case 42: + i = 3; + break; + case 43: + i = 4; + break; + case 63: + i = 5; + break; + case 41: + i = 7; + break; + case 46: + i = 8; + break; + case 91: + i = 9; + break; + case 94: + i = 11; + break; + case 36: + i = 12; + break; + case 40: + if (i = 6, n.d >= n.j || Di(n.i, n.d) != 63) + break; + if (++n.d >= n.j) + throw T(new Ee(Pe((je(), _B)))); + switch (e = Di(n.i, n.d++), e) { + case 58: + i = 13; + break; + case 61: + i = 14; + break; + case 33: + i = 15; + break; + case 91: + i = 19; + break; + case 62: + i = 18; + break; + case 60: + if (n.d >= n.j) + throw T(new Ee(Pe((je(), _B)))); + if (e = Di(n.i, n.d++), e == 61) + i = 16; + else if (e == 33) + i = 17; + else + throw T(new Ee(Pe((je(), xqn)))); + break; + case 35: + for (; n.d < n.j && (e = Di(n.i, n.d++), e != 41); ) + ; + if (e != 41) + throw T(new Ee(Pe((je(), Lqn)))); + i = 21; + break; + default: + if (e == 45 || 97 <= e && e <= 122 || 65 <= e && e <= 90) { + --n.d, i = 22; + break; + } else if (e == 40) { + i = 23; + break; + } + throw T(new Ee(Pe((je(), _B)))); + } + break; + case 92: + if (i = 10, n.d >= n.j) + throw T(new Ee(Pe((je(), yA)))); + n.a = Di(n.i, n.d++); + break; + default: + i = 0; + } + n.c = i; + } + function ETe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se; + if (en = u(k(n, (nn(), Bt)), 98), en != (Ai(), jf) && en != ql) { + for (v = n.b, p = v.c.length, a = new Ic((rs(p + 2, AL), KC(Hi(Hi(5, p + 2), (p + 2) / 10 | 0)))), m = new Ic((rs(p + 2, AL), KC(Hi(Hi(5, p + 2), (p + 2) / 10 | 0)))), W(a, new we()), W(a, new we()), W(m, new X()), W(m, new X()), U = new X(), e = 0; e < p; e++) + for (t = (Ln(e, v.c.length), u(v.c[e], 29)), ln = (Ln(e, a.c.length), u(a.c[e], 83)), C = new we(), a.c[a.c.length] = C, zn = (Ln(e, m.c.length), u(m.c[e], 15)), $ = new X(), m.c[m.c.length] = $, r = new E(t.a); r.a < r.c.c.length; ) { + if (i = u(y(r), 10), wQ(i)) { + U.c[U.c.length] = i; + continue; + } + for (l = new re(ue(Lr(i).a.Kc(), new Mn())); Se(l); ) + f = u(ve(l), 17), Wn = f.c.i, wQ(Wn) && (wn = u(ln.xc(k(Wn, (G(), rt))), 10), wn || (wn = gLn(n, Wn), ln.zc(k(Wn, rt), wn), zn.Fc(wn)), Ki(f, u(un(wn.j, 1), 11))); + for (h = new re(ue(ei(i).a.Kc(), new Mn())); Se(h); ) + f = u(ve(h), 17), se = f.d.i, wQ(se) && (S = u(te(C, k(se, (G(), rt))), 10), S || (S = gLn(n, se), it(C, k(se, rt), S), $.c[$.c.length] = S), Ti(f, u(un(S.j, 0), 11))); + } + for (d = 0; d < m.c.length; d++) + if (O = (Ln(d, m.c.length), u(m.c[d], 15)), !O.dc()) + for (g = null, d == 0 ? (g = new Rs(n), ib(0, v.c.length), e5(v.c, 0, g)) : d == a.c.length - 1 ? (g = new Rs(n), v.c[v.c.length] = g) : g = (Ln(d - 1, v.c.length), u(v.c[d - 1], 29)), o = O.Kc(); o.Ob(); ) + c = u(o.Pb(), 10), jr(c, g); + for (_ = new E(U); _.a < _.c.c.length; ) + x = u(y(_), 10), jr(x, null); + H(n, (G(), E_), U); + } + } + function CTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _; + if (le(t, "Coffman-Graham Layering", 1), e.a.c.length == 0) { + ce(t); + return; + } + for (_ = u(k(e, (nn(), bsn)), 19).a, h = 0, o = 0, g = new E(e.a); g.a < g.c.c.length; ) + for (d = u(y(g), 10), d.p = h++, c = new re(ue(ei(d).a.Kc(), new Mn())); Se(c); ) + r = u(ve(c), 17), r.p = o++; + for (n.d = F(_u, wh, 25, h, 16, 1), n.a = F(_u, wh, 25, o, 16, 1), n.b = F(be, Le, 25, h, 15, 1), n.e = F(be, Le, 25, h, 15, 1), n.f = F(be, Le, 25, h, 15, 1), QC(n.c), G4e(n, e), v = new GE(new n6n(n)), x = new E(e.a); x.a < x.c.c.length; ) { + for ($ = u(y(x), 10), c = new re(ue(Lr($).a.Kc(), new Mn())); Se(c); ) + r = u(ve(c), 17), n.a[r.p] || ++n.b[$.p]; + n.b[$.p] == 0 && T3(o4(v, $)); + } + for (f = 0; v.b.c.length != 0; ) + for ($ = u(K$(v), 10), n.f[$.p] = f++, c = new re(ue(ei($).a.Kc(), new Mn())); Se(c); ) + r = u(ve(c), 17), !n.a[r.p] && (C = r.d.i, --n.b[C.p], Tn(n.c, C, Q(n.f[$.p])), n.b[C.p] == 0 && T3(o4(v, C))); + for (p = new GE(new e6n(n)), O = new E(e.a); O.a < O.c.c.length; ) { + for ($ = u(y(O), 10), c = new re(ue(ei($).a.Kc(), new Mn())); Se(c); ) + r = u(ve(c), 17), n.a[r.p] || ++n.e[$.p]; + n.e[$.p] == 0 && T3(o4(p, $)); + } + for (a = new X(), i = OMn(e, a); p.b.c.length != 0; ) + for (S = u(K$(p), 10), (i.a.c.length >= _ || !G2e(S, i)) && (i = OMn(e, a)), jr(S, i), c = new re(ue(Lr(S).a.Kc(), new Mn())); Se(c); ) + r = u(ve(c), 17), !n.a[r.p] && (m = r.c.i, --n.e[m.p], n.e[m.p] == 0 && T3(o4(p, m))); + for (l = a.c.length - 1; l >= 0; --l) + W(e.b, (Ln(l, a.c.length), u(a.c[l], 29))); + e.a.c = F(Zn, rn, 1, 0, 5, 1), ce(t); + } + function N_n(n) { + var e, t, i, r, c, o, f, h, l; + for (n.b = 1, Qe(n), e = null, n.c == 0 && n.a == 94 ? (Qe(n), e = (Je(), Je(), new es(4)), jc(e, 0, H4), f = new es(4)) : f = (Je(), Je(), new es(4)), r = !0; (l = n.c) != 1; ) { + if (l == 0 && n.a == 93 && !r) { + e && (F6(e, f), f = e); + break; + } + if (t = n.a, i = !1, l == 10) + switch (t) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + Sb(f, p4(t)), i = !0; + break; + case 105: + case 73: + case 99: + case 67: + t = (Sb(f, p4(t)), -1), t < 0 && (i = !0); + break; + case 112: + case 80: + if (h = mY(n, t), !h) + throw T(new Ee(Pe((je(), KB)))); + Sb(f, h), i = !0; + break; + default: + t = ZY(n); + } + else if (l == 24 && !r) { + if (e && (F6(e, f), f = e), c = N_n(n), F6(f, c), n.c != 0 || n.a != 93) + throw T(new Ee(Pe((je(), zqn)))); + break; + } + if (Qe(n), !i) { + if (l == 0) { + if (t == 91) + throw T(new Ee(Pe((je(), Gtn)))); + if (t == 93) + throw T(new Ee(Pe((je(), ztn)))); + if (t == 45 && !r && n.a != 93) + throw T(new Ee(Pe((je(), HB)))); + } + if (n.c != 0 || n.a != 45 || t == 45 && r) + jc(f, t, t); + else { + if (Qe(n), (l = n.c) == 1) + throw T(new Ee(Pe((je(), jA)))); + if (l == 0 && n.a == 93) + jc(f, t, t), jc(f, 45, 45); + else { + if (l == 0 && n.a == 93 || l == 24) + throw T(new Ee(Pe((je(), HB)))); + if (o = n.a, l == 0) { + if (o == 91) + throw T(new Ee(Pe((je(), Gtn)))); + if (o == 93) + throw T(new Ee(Pe((je(), ztn)))); + if (o == 45) + throw T(new Ee(Pe((je(), HB)))); + } else + l == 10 && (o = ZY(n)); + if (Qe(n), t > o) + throw T(new Ee(Pe((je(), Xqn)))); + jc(f, t, o); + } + } + } + r = !1; + } + if (n.c == 1) + throw T(new Ee(Pe((je(), jA)))); + return Jw(f), D6(f), n.b = 0, Qe(n), f; + } + function TTe(n) { + ke(n.c, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#decimal"])), ke(n.d, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#integer"])), ke(n.e, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#boolean"])), ke(n.f, xe, A(M(tn, 1), q, 2, 6, [Ri, "EBoolean", We, "EBoolean:Object"])), ke(n.i, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#byte"])), ke(n.g, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#hexBinary"])), ke(n.j, xe, A(M(tn, 1), q, 2, 6, [Ri, "EByte", We, "EByte:Object"])), ke(n.n, xe, A(M(tn, 1), q, 2, 6, [Ri, "EChar", We, "EChar:Object"])), ke(n.t, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#double"])), ke(n.u, xe, A(M(tn, 1), q, 2, 6, [Ri, "EDouble", We, "EDouble:Object"])), ke(n.F, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#float"])), ke(n.G, xe, A(M(tn, 1), q, 2, 6, [Ri, "EFloat", We, "EFloat:Object"])), ke(n.I, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#int"])), ke(n.J, xe, A(M(tn, 1), q, 2, 6, [Ri, "EInt", We, "EInt:Object"])), ke(n.N, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#long"])), ke(n.O, xe, A(M(tn, 1), q, 2, 6, [Ri, "ELong", We, "ELong:Object"])), ke(n.Z, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#short"])), ke(n.$, xe, A(M(tn, 1), q, 2, 6, [Ri, "EShort", We, "EShort:Object"])), ke(n._, xe, A(M(tn, 1), q, 2, 6, [Ri, "http://www.w3.org/2001/XMLSchema#string"])); + } + function MTe(n) { + var e, t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se; + if (n.c.length == 1) + return Ln(0, n.c.length), u(n.c[0], 135); + if (n.c.length <= 0) + return new AC(); + for (h = new E(n); h.a < h.c.c.length; ) { + for (o = u(y(h), 135), $ = 0, v = nt, m = nt, g = Bi, p = Bi, S = _e(o.b, 0); S.b != S.d.c; ) + C = u(Re(S), 86), $ += u(k(C, (n0(), jP)), 19).a, v = j.Math.min(v, C.e.a), m = j.Math.min(m, C.e.b), g = j.Math.max(g, C.e.a + C.f.a), p = j.Math.max(p, C.e.b + C.f.b); + H(o, (n0(), jP), Q($)), H(o, (cc(), zm), new fn(v, m)), H(o, sy, new fn(g, p)); + } + for (Pn(), wi(n, new ogn()), _ = new AC(), Pr(_, (Ln(0, n.c.length), u(n.c[0], 94))), d = 0, zn = 0, l = new E(n); l.a < l.c.c.length; ) + o = u(y(l), 135), U = ji(Qr(u(k(o, (cc(), sy)), 8)), u(k(o, zm), 8)), d = j.Math.max(d, U.a), zn += U.a * U.b; + for (d = j.Math.max(d, j.Math.sqrt(zn) * K(Y(k(_, (n0(), nYn))))), en = K(Y(k(_, Con))), Wn = 0, se = 0, a = 0, e = en, f = new E(n); f.a < f.c.c.length; ) + o = u(y(f), 135), U = ji(Qr(u(k(o, (cc(), sy)), 8)), u(k(o, zm), 8)), Wn + U.a > d && (Wn = 0, se += a + en, a = 0), L9e(_, o, Wn, se), e = j.Math.max(e, Wn + U.a), a = j.Math.max(a, U.b), Wn += U.a + en; + for (x = new we(), t = new we(), wn = new E(n); wn.a < wn.c.c.length; ) + for (ln = u(y(wn), 135), i = on(sn(k(ln, (Xe(), py)))), O = ln.q ? ln.q : ph, c = O.vc().Kc(); c.Ob(); ) + r = u(c.Pb(), 42), Uu(x, r.cd()) ? B(u(r.cd(), 146).wg()) !== B(r.dd()) && (i && Uu(t, r.cd()) ? (Zf(), "" + u(r.cd(), 146).tg()) : (it(x, u(r.cd(), 146), r.dd()), H(_, u(r.cd(), 146), r.dd()), i && it(t, u(r.cd(), 146), r.dd()))) : (it(x, u(r.cd(), 146), r.dd()), H(_, u(r.cd(), 146), r.dd())); + return _; + } + function B_n() { + B_n = N, yL(), Ne = new Dd(), Tn(Ne, (J(), Do), Ef), Tn(Ne, to, Ef), Tn(Ne, Su, Ef), Tn(Ne, $o, Ef), Tn(Ne, uu, Ef), Tn(Ne, Pu, Ef), Tn(Ne, $o, Do), Tn(Ne, Ef, Fs), Tn(Ne, Do, Fs), Tn(Ne, to, Fs), Tn(Ne, Su, Fs), Tn(Ne, cu, Fs), Tn(Ne, $o, Fs), Tn(Ne, uu, Fs), Tn(Ne, Pu, Fs), Tn(Ne, qc, Fs), Tn(Ne, Ef, bs), Tn(Ne, Do, bs), Tn(Ne, Fs, bs), Tn(Ne, to, bs), Tn(Ne, Su, bs), Tn(Ne, cu, bs), Tn(Ne, $o, bs), Tn(Ne, qc, bs), Tn(Ne, ws, bs), Tn(Ne, uu, bs), Tn(Ne, mu, bs), Tn(Ne, Pu, bs), Tn(Ne, Do, to), Tn(Ne, Su, to), Tn(Ne, $o, to), Tn(Ne, Pu, to), Tn(Ne, Do, Su), Tn(Ne, to, Su), Tn(Ne, $o, Su), Tn(Ne, Su, Su), Tn(Ne, uu, Su), Tn(Ne, Ef, xs), Tn(Ne, Do, xs), Tn(Ne, Fs, xs), Tn(Ne, bs, xs), Tn(Ne, to, xs), Tn(Ne, Su, xs), Tn(Ne, cu, xs), Tn(Ne, $o, xs), Tn(Ne, ws, xs), Tn(Ne, qc, xs), Tn(Ne, Pu, xs), Tn(Ne, uu, xs), Tn(Ne, Pc, xs), Tn(Ne, Ef, ws), Tn(Ne, Do, ws), Tn(Ne, Fs, ws), Tn(Ne, to, ws), Tn(Ne, Su, ws), Tn(Ne, cu, ws), Tn(Ne, $o, ws), Tn(Ne, qc, ws), Tn(Ne, Pu, ws), Tn(Ne, mu, ws), Tn(Ne, Pc, ws), Tn(Ne, Do, qc), Tn(Ne, to, qc), Tn(Ne, Su, qc), Tn(Ne, $o, qc), Tn(Ne, ws, qc), Tn(Ne, Pu, qc), Tn(Ne, uu, qc), Tn(Ne, Ef, ru), Tn(Ne, Do, ru), Tn(Ne, Fs, ru), Tn(Ne, to, ru), Tn(Ne, Su, ru), Tn(Ne, cu, ru), Tn(Ne, $o, ru), Tn(Ne, qc, ru), Tn(Ne, Pu, ru), Tn(Ne, Do, uu), Tn(Ne, Fs, uu), Tn(Ne, bs, uu), Tn(Ne, Su, uu), Tn(Ne, Ef, mu), Tn(Ne, Do, mu), Tn(Ne, bs, mu), Tn(Ne, to, mu), Tn(Ne, Su, mu), Tn(Ne, cu, mu), Tn(Ne, $o, mu), Tn(Ne, $o, Pc), Tn(Ne, Su, Pc), Tn(Ne, qc, Ef), Tn(Ne, qc, to), Tn(Ne, qc, Fs), Tn(Ne, cu, Ef), Tn(Ne, cu, Do), Tn(Ne, cu, bs); + } + function AM(n, e) { + switch (n.e) { + case 0: + case 2: + case 4: + case 6: + case 42: + case 44: + case 46: + case 48: + case 8: + case 10: + case 12: + case 14: + case 16: + case 18: + case 20: + case 22: + case 24: + case 26: + case 28: + case 30: + case 32: + case 34: + case 36: + case 38: + return new RTn(n.b, n.a, e, n.c); + case 1: + return new hE(n.a, e, jt(e.Tg(), n.c)); + case 43: + return new xyn(n.a, e, jt(e.Tg(), n.c)); + case 3: + return new Yt(n.a, e, jt(e.Tg(), n.c)); + case 45: + return new hu(n.a, e, jt(e.Tg(), n.c)); + case 41: + return new Xu(u(qs(n.c), 26), n.a, e, jt(e.Tg(), n.c)); + case 50: + return new BIn(u(qs(n.c), 26), n.a, e, jt(e.Tg(), n.c)); + case 5: + return new yU(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 47: + return new Ujn(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 7: + return new V(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 49: + return new g2(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 9: + return new Nyn(n.a, e, jt(e.Tg(), n.c)); + case 11: + return new Lyn(n.a, e, jt(e.Tg(), n.c)); + case 13: + return new $z(n.a, e, jt(e.Tg(), n.c)); + case 15: + return new ME(n.a, e, jt(e.Tg(), n.c)); + case 17: + return new Byn(n.a, e, jt(e.Tg(), n.c)); + case 19: + return new Aw(n.a, e, jt(e.Tg(), n.c)); + case 21: + return new Dz(n.a, e, jt(e.Tg(), n.c)); + case 23: + return new v8(n.a, e, jt(e.Tg(), n.c)); + case 25: + return new Vjn(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 27: + return new Fn(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 29: + return new Xjn(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 31: + return new Wjn(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 33: + return new EU(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 35: + return new jU(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 37: + return new tD(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 39: + return new zE(n.a, e, jt(e.Tg(), n.c), n.d.n); + case 40: + return new xt(e, jt(e.Tg(), n.c)); + default: + throw T(new _r("Unknown feature style: " + n.e)); + } + } + function ATe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U; + switch (le(t, "Brandes & Koepf node placement", 1), n.a = e, n.c = kye(e), i = u(k(e, (nn(), K_)), 274), p = on(sn(k(e, Dm))), n.d = i == (A7(), LS) && !p || i == p_, cEe(n, e), _ = null, U = null, S = null, $ = null, C = (rs(4, Ib), new Ic(4)), u(k(e, K_), 274).g) { + case 3: + S = new tg(e, n.c.d, (ef(), Ya), (Ff(), O1)), C.c[C.c.length] = S; + break; + case 1: + $ = new tg(e, n.c.d, (ef(), kf), (Ff(), O1)), C.c[C.c.length] = $; + break; + case 4: + _ = new tg(e, n.c.d, (ef(), Ya), (Ff(), A0)), C.c[C.c.length] = _; + break; + case 2: + U = new tg(e, n.c.d, (ef(), kf), (Ff(), A0)), C.c[C.c.length] = U; + break; + default: + S = new tg(e, n.c.d, (ef(), Ya), (Ff(), O1)), $ = new tg(e, n.c.d, kf, O1), _ = new tg(e, n.c.d, Ya, A0), U = new tg(e, n.c.d, kf, A0), C.c[C.c.length] = _, C.c[C.c.length] = U, C.c[C.c.length] = S, C.c[C.c.length] = $; + } + for (r = new nkn(e, n.c), f = new E(C); f.a < f.c.c.length; ) + c = u(y(f), 180), dTe(r, c, n.b), Qye(c); + for (g = new $Fn(e, n.c), h = new E(C); h.a < h.c.c.length; ) + c = u(y(h), 180), fCe(g, c); + if (t.n) + for (l = new E(C); l.a < l.c.c.length; ) + c = u(y(l), 180), oa(t, c + " size is " + Nx(c)); + if (d = null, n.d && (a = RCe(n, C, n.c.d), mRn(e, a, t) && (d = a)), !d) + for (l = new E(C); l.a < l.c.c.length; ) + c = u(y(l), 180), mRn(e, c, t) && (!d || Nx(d) > Nx(c)) && (d = c); + for (!d && (d = (Ln(0, C.c.length), u(C.c[0], 180))), m = new E(e.b); m.a < m.c.c.length; ) + for (v = u(y(m), 29), x = new E(v.a); x.a < x.c.c.length; ) + O = u(y(x), 10), O.n.b = K(d.p[O.p]) + K(d.d[O.p]); + for (t.n && (oa(t, "Chosen node placement: " + d), oa(t, "Blocks: " + RLn(d)), oa(t, "Classes: " + Kme(d, t)), oa(t, "Marked edges: " + n.b)), o = new E(C); o.a < o.c.c.length; ) + c = u(y(o), 180), c.g = null, c.b = null, c.a = null, c.d = null, c.j = null, c.i = null, c.p = null; + vbe(n.c), n.b.a.$b(), ce(t); + } + function STe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn; + for (o = new Tt(), _ = u(k(t, (nn(), as)), 103), v = 0, Xi(o, (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); o.b != 0; ) + l = u(o.b == 0 ? null : (ne(o.b != 0), Ts(o, o.a.a)), 33), (B(hn(e, Ll)) !== B((Rh(), Nl)) || B(hn(e, Vb)) === B((Ia(), Em)) || B(hn(e, Vb)) === B((Ia(), jm)) || on(sn(hn(e, Xb))) || B(hn(e, kp)) !== B((Gd(), yg))) && !on(sn(hn(l, D_))) && pr(l, (G(), bc), Q(v++)), C = !on(sn(hn(l, Qa))), C && (d = (!l.a && (l.a = new V(Ot, l, 10, 11)), l.a).i != 0, p = Ove(l), g = B(hn(l, Qb)) === B((_h(), x1)), Wn = !ga(l, (Xe(), Zm)) || An(Ce(hn(l, Zm)), Jn), O = null, Wn && g && (d || p) && (O = uRn(l), H(O, as, _), ai(O, Yk) && N9n(new AQ(K(Y(k(O, Yk)))), O), u(hn(l, Va), 174).gc() != 0 && (a = O, _t(new $n(null, (!l.c && (l.c = new V(Ru, l, 9, 9)), new xn(l.c, 16))), new a5n(a)), YNn(l, O))), U = t, en = u(te(n.a, Pt(l)), 10), en && (U = en.e), $ = c_n(n, l, U), O && ($.e = O, O.e = $, Xi(o, (!l.a && (l.a = new V(Ot, l, 10, 11)), l.a)))); + for (v = 0, Ht(o, e, o.c.b, o.c); o.b != 0; ) { + for (c = u(o.b == 0 ? null : (ne(o.b != 0), Ts(o, o.a.a)), 33), h = new ie((!c.b && (c.b = new V(bi, c, 12, 3)), c.b)); h.e != h.i.gc(); ) + f = u(oe(h), 79), CBn(f), (B(hn(e, Ll)) !== B((Rh(), Nl)) || B(hn(e, Vb)) === B((Ia(), Em)) || B(hn(e, Vb)) === B((Ia(), jm)) || on(sn(hn(e, Xb))) || B(hn(e, kp)) !== B((Gd(), yg))) && pr(f, (G(), bc), Q(v++)), wn = Ir(u(D((!f.b && (f.b = new Fn(he, f, 4, 7)), f.b), 0), 82)), zn = Ir(u(D((!f.c && (f.c = new Fn(he, f, 5, 8)), f.c), 0), 82)), !(on(sn(hn(f, Qa))) || on(sn(hn(wn, Qa))) || on(sn(hn(zn, Qa)))) && (m = Yd(f) && on(sn(hn(wn, Jb))) && on(sn(hn(f, Xa))), x = c, m || fb(zn, wn) ? x = wn : fb(wn, zn) && (x = zn), U = t, en = u(te(n.a, x), 10), en && (U = en.e), S = GZ(n, f, x, U), H(S, (G(), aun), Y8e(n, f, e, t))); + if (g = B(hn(c, Qb)) === B((_h(), x1)), g) + for (r = new ie((!c.a && (c.a = new V(Ot, c, 10, 11)), c.a)); r.e != r.i.gc(); ) + i = u(oe(r), 33), Wn = !ga(i, (Xe(), Zm)) || An(Ce(hn(i, Zm)), Jn), ln = B(hn(i, Qb)) === B(x1), Wn && ln && Ht(o, i, o.c.b, o.c); + } + } + function PTe(n, e, t, i, r, c) { + var o, f, h, l, a, d, g, p, v, m, C, S; + switch (e) { + case 71: + f = i.q.getFullYear() - Tl >= -1900 ? 1 : 0, t >= 4 ? De(n, A(M(tn, 1), q, 2, 6, [nKn, eKn])[f]) : De(n, A(M(tn, 1), q, 2, 6, ["BC", "AD"])[f]); + break; + case 121: + kpe(n, t, i); + break; + case 77: + Cke(n, t, i); + break; + case 107: + h = r.q.getHours(), h == 0 ? sh(n, 24, t) : sh(n, h, t); + break; + case 83: + z9e(n, t, r); + break; + case 69: + a = i.q.getDay(), t == 5 ? De(n, A(M(tn, 1), q, 2, 6, ["S", "M", "T", "W", "T", "F", "S"])[a]) : t == 4 ? De(n, A(M(tn, 1), q, 2, 6, [KL, HL, qL, GL, zL, UL, WL])[a]) : De(n, A(M(tn, 1), q, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"])[a]); + break; + case 97: + r.q.getHours() >= 12 && r.q.getHours() < 24 ? De(n, A(M(tn, 1), q, 2, 6, ["AM", "PM"])[1]) : De(n, A(M(tn, 1), q, 2, 6, ["AM", "PM"])[0]); + break; + case 104: + d = r.q.getHours() % 12, d == 0 ? sh(n, 12, t) : sh(n, d, t); + break; + case 75: + g = r.q.getHours() % 12, sh(n, g, t); + break; + case 72: + p = r.q.getHours(), sh(n, p, t); + break; + case 99: + v = i.q.getDay(), t == 5 ? De(n, A(M(tn, 1), q, 2, 6, ["S", "M", "T", "W", "T", "F", "S"])[v]) : t == 4 ? De(n, A(M(tn, 1), q, 2, 6, [KL, HL, qL, GL, zL, UL, WL])[v]) : t == 3 ? De(n, A(M(tn, 1), q, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"])[v]) : sh(n, v, 1); + break; + case 76: + m = i.q.getMonth(), t == 5 ? De(n, A(M(tn, 1), q, 2, 6, ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"])[m]) : t == 4 ? De(n, A(M(tn, 1), q, 2, 6, [IL, OL, DL, $L, V2, FL, xL, LL, NL, BL, RL, _L])[m]) : t == 3 ? De(n, A(M(tn, 1), q, 2, 6, ["Jan", "Feb", "Mar", "Apr", V2, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])[m]) : sh(n, m + 1, t); + break; + case 81: + C = i.q.getMonth() / 3 | 0, t < 4 ? De(n, A(M(tn, 1), q, 2, 6, ["Q1", "Q2", "Q3", "Q4"])[C]) : De(n, A(M(tn, 1), q, 2, 6, ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"])[C]); + break; + case 100: + S = i.q.getDate(), sh(n, S, t); + break; + case 109: + l = r.q.getMinutes(), sh(n, l, t); + break; + case 115: + o = r.q.getSeconds(), sh(n, o, t); + break; + case 122: + t < 4 ? De(n, c.c[0]) : De(n, c.c[1]); + break; + case 118: + De(n, c.b); + break; + case 90: + t < 3 ? De(n, F6e(c)) : t == 3 ? De(n, N6e(c)) : De(n, B6e(c.a)); + break; + default: + return !1; + } + return !0; + } + function GZ(n, e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye; + if (CBn(e), h = u(D((!e.b && (e.b = new Fn(he, e, 4, 7)), e.b), 0), 82), a = u(D((!e.c && (e.c = new Fn(he, e, 5, 8)), e.c), 0), 82), f = Ir(h), l = Ir(a), o = (!e.a && (e.a = new V(Mt, e, 6, 6)), e.a).i == 0 ? null : u(D((!e.a && (e.a = new V(Mt, e, 6, 6)), e.a), 0), 202), en = u(te(n.a, f), 10), Wn = u(te(n.a, l), 10), ln = null, se = null, I(h, 186) && (U = u(te(n.a, h), 299), I(U, 11) ? ln = u(U, 11) : I(U, 10) && (en = u(U, 10), ln = u(un(en.j, 0), 11))), I(a, 186) && (zn = u(te(n.a, a), 299), I(zn, 11) ? se = u(zn, 11) : I(zn, 10) && (Wn = u(zn, 10), se = u(un(Wn.j, 0), 11))), !en || !Wn) + throw T(new Gv("The source or the target of edge " + e + " could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN.")); + for (m = new Id(), Pr(m, e), H(m, (G(), rt), e), H(m, (nn(), Mr), null), p = u(k(i, Ac), 21), en == Wn && p.Fc((fr(), Mm)), ln || (_ = (sr(), Lc), wn = null, o && Cw(u(k(en, Bt), 98)) && (wn = new fn(o.j, o.k), FAn(wn, S8(e)), hSn(wn, t), fb(l, f) && (_ = Au, st(wn, en.n))), ln = jRn(en, wn, _, i)), se || (_ = (sr(), Au), Ye = null, o && Cw(u(k(Wn, Bt), 98)) && (Ye = new fn(o.b, o.c), FAn(Ye, S8(e)), hSn(Ye, t)), se = jRn(Wn, Ye, _, qi(Wn))), Ki(m, ln), Ti(m, se), (ln.e.c.length > 1 || ln.g.c.length > 1 || se.e.c.length > 1 || se.g.c.length > 1) && p.Fc((fr(), Tm)), g = new ie((!e.n && (e.n = new V(Rr, e, 1, 7)), e.n)); g.e != g.i.gc(); ) + if (d = u(oe(g), 137), !on(sn(hn(d, Qa))) && d.a) + switch (C = EF(d), W(m.b, C), u(k(C, Jf), 272).g) { + case 1: + case 2: + p.Fc((fr(), uv)); + break; + case 0: + p.Fc((fr(), cv)), H(C, Jf, (sf(), yv)); + } + if (c = u(k(i, Om), 314), S = u(k(i, tP), 315), r = c == (F2(), qk) || S == (b6(), nK), o && (!o.a && (o.a = new Yt(io, o, 5)), o.a).i != 0 && r) { + for ($ = I7(o), v = new fu(), x = _e($, 0); x.b != x.d.c; ) + O = u(Re(x), 8), Ke(v, new kr(O)); + H(m, gun, v); + } + return m; + } + function ITe(n) { + n.gb || (n.gb = !0, n.b = Yr(n, 0), It(n.b, 18), bt(n.b, 19), n.a = Yr(n, 1), It(n.a, 1), bt(n.a, 2), bt(n.a, 3), bt(n.a, 4), bt(n.a, 5), n.o = Yr(n, 2), It(n.o, 8), It(n.o, 9), bt(n.o, 10), bt(n.o, 11), bt(n.o, 12), bt(n.o, 13), bt(n.o, 14), bt(n.o, 15), bt(n.o, 16), bt(n.o, 17), bt(n.o, 18), bt(n.o, 19), bt(n.o, 20), bt(n.o, 21), bt(n.o, 22), bt(n.o, 23), Cr(n.o), Cr(n.o), Cr(n.o), Cr(n.o), Cr(n.o), Cr(n.o), Cr(n.o), Cr(n.o), Cr(n.o), Cr(n.o), n.p = Yr(n, 3), It(n.p, 2), It(n.p, 3), It(n.p, 4), It(n.p, 5), bt(n.p, 6), bt(n.p, 7), Cr(n.p), Cr(n.p), n.q = Yr(n, 4), It(n.q, 8), n.v = Yr(n, 5), bt(n.v, 9), Cr(n.v), Cr(n.v), Cr(n.v), n.w = Yr(n, 6), It(n.w, 2), It(n.w, 3), It(n.w, 4), bt(n.w, 5), n.B = Yr(n, 7), bt(n.B, 1), Cr(n.B), Cr(n.B), Cr(n.B), n.Q = Yr(n, 8), bt(n.Q, 0), Cr(n.Q), n.R = Yr(n, 9), It(n.R, 1), n.S = Yr(n, 10), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), Cr(n.S), n.T = Yr(n, 11), bt(n.T, 10), bt(n.T, 11), bt(n.T, 12), bt(n.T, 13), bt(n.T, 14), Cr(n.T), Cr(n.T), n.U = Yr(n, 12), It(n.U, 2), It(n.U, 3), bt(n.U, 4), bt(n.U, 5), bt(n.U, 6), bt(n.U, 7), Cr(n.U), n.V = Yr(n, 13), bt(n.V, 10), n.W = Yr(n, 14), It(n.W, 18), It(n.W, 19), It(n.W, 20), bt(n.W, 21), bt(n.W, 22), bt(n.W, 23), n.bb = Yr(n, 15), It(n.bb, 10), It(n.bb, 11), It(n.bb, 12), It(n.bb, 13), It(n.bb, 14), It(n.bb, 15), It(n.bb, 16), bt(n.bb, 17), Cr(n.bb), Cr(n.bb), n.eb = Yr(n, 16), It(n.eb, 2), It(n.eb, 3), It(n.eb, 4), It(n.eb, 5), It(n.eb, 6), It(n.eb, 7), bt(n.eb, 8), bt(n.eb, 9), n.ab = Yr(n, 17), It(n.ab, 0), It(n.ab, 1), n.H = Yr(n, 18), bt(n.H, 0), bt(n.H, 1), bt(n.H, 2), bt(n.H, 3), bt(n.H, 4), bt(n.H, 5), Cr(n.H), n.db = Yr(n, 19), bt(n.db, 2), n.c = ze(n, 20), n.d = ze(n, 21), n.e = ze(n, 22), n.f = ze(n, 23), n.i = ze(n, 24), n.g = ze(n, 25), n.j = ze(n, 26), n.k = ze(n, 27), n.n = ze(n, 28), n.r = ze(n, 29), n.s = ze(n, 30), n.t = ze(n, 31), n.u = ze(n, 32), n.fb = ze(n, 33), n.A = ze(n, 34), n.C = ze(n, 35), n.D = ze(n, 36), n.F = ze(n, 37), n.G = ze(n, 38), n.I = ze(n, 39), n.J = ze(n, 40), n.L = ze(n, 41), n.M = ze(n, 42), n.N = ze(n, 43), n.O = ze(n, 44), n.P = ze(n, 45), n.X = ze(n, 46), n.Y = ze(n, 47), n.Z = ze(n, 48), n.$ = ze(n, 49), n._ = ze(n, 50), n.cb = ze(n, 51), n.K = ze(n, 52)); + } + function Xe() { + Xe = N; + var n, e; + Zm = new yt(GHn), kv = new yt(zHn), Ufn = (oh(), HK), KZn = new In(Oen, Ufn), Tp = new In(ep, null), HZn = new yt(Ttn), Xfn = (mb(), vt(zK, A(M(UK, 1), z, 291, 0, [GK]))), LP = new In(sA, Xfn), py = new In(mk, (qn(), !1)), Vfn = (or(), mh), S0 = new In(Fen, Vfn), Yfn = (Hh(), rH), Jfn = new In(pk, Yfn), ehn = new In(dA, !1), thn = (_h(), HP), Bg = new In(uA, thn), ahn = new md(12), ed = new In(s0, ahn), NP = new In(lk, !1), ihn = new In(cB, !1), ky = new In(G6, !1), phn = (Ai(), ql), n9 = new In(CN, phn), Mp = new yt(oA), _P = new yt(hk), tH = new yt(HM), iH = new yt(q6), rhn = new fu(), Rg = new In(qen, rhn), GZn = new In(Uen, !1), zZn = new In(Wen, !1), chn = new Bv(), my = new In(Ven, chn), RP = new In(Pen, !1), VZn = new In(UHn, 1), new In(WHn, !0), Q(0), new In(XHn, Q(100)), new In(VHn, !1), Q(0), new In(QHn, Q(4e3)), Q(0), new In(JHn, Q(400)), new In(YHn, !1), new In(ZHn, !1), new In(nqn, !0), new In(eqn, !1), Wfn = (AT(), oH), qZn = new In(Ctn, Wfn), QZn = new In(pen, 10), JZn = new In(ven, 10), yhn = new In(vN, 20), YZn = new In(men, 10), jhn = new In(EN, 2), ZZn = new In(ken, 10), Ehn = new In(yen, 0), KP = new In(Cen, 5), Chn = new In(jen, 1), Thn = new In(Een, 1), td = new In($b, 20), nne = new In(Ten, 10), Shn = new In(Men, 10), Ap = new yt(Aen), Ahn = new uyn(), Mhn = new In(Qen, Ahn), WZn = new yt(rB), dhn = !1, UZn = new In(iB, dhn), shn = new md(5), uhn = new In(xen, shn), ohn = (Eb(), e = u(xo(ar), 9), new ks(e, u(bo(e, e.length), 9), 0)), _g = new In($4, ohn), whn = (qw(), Hl), bhn = new In(Ben, whn), JK = new yt(Ren), YK = new yt(_en), ZK = new yt(Ken), QK = new yt(Hen), fhn = (n = u(xo(o9), 9), new ks(n, u(bo(n, n.length), 9), 0)), nd = new In(hg, fhn), lhn = Cn((xu(), Tv)), _l = new In(tp, lhn), hhn = new fn(0, 0), Kg = new In(ip, hhn), BP = new In(tB, !1), Qfn = (sf(), yv), XK = new In(Gen, Qfn), WK = new In(qM, !1), Q(1), new In(tqn, null), ghn = new yt(Xen), nH = new yt(zen), khn = (J(), Xr), Hg = new In(Ien, khn), Bu = new yt(Sen), vhn = (Tu(), Cn(Gl)), cw = new In(F4, vhn), eH = new In(Len, !1), mhn = new In(Nen, !0), vy = new In(Den, !1), VK = new In($en, !1), Zfn = new In(mN, 1), nhn = (ZT(), uH), new In(iqn, nhn), XZn = !0; + } + function G() { + G = N; + var n, e; + rt = new yt(Ann), aun = new yt("coordinateOrigin"), S_ = new yt("processors"), lun = new ri("compoundNode", (qn(), !1)), Wk = new ri("insideConnections", !1), gun = new yt("originalBendpoints"), pun = new yt("originalDummyNodePosition"), vun = new yt("originalLabelEdge"), Vk = new yt("representedLabels"), Am = new yt("endLabels"), wp = new yt("endLabel.origin"), pp = new ri("labelSide", (us(), Ey)), Sg = new ri("maxEdgeThickness", 0), mf = new ri("reversed", !1), vp = new yt(RKn), Xo = new ri("longEdgeSource", null), Ys = new ri("longEdgeTarget", null), Ub = new ri("longEdgeHasLabelDummies", !1), Xk = new ri("longEdgeBeforeLabelDummy", !1), HS = new ri("edgeConstraint", (ja(), l_)), k0 = new yt("inLayerLayoutUnit"), Ua = new ri("inLayerConstraint", (Nh(), zk)), gp = new ri("inLayerSuccessorConstraint", new X()), wun = new ri("inLayerSuccessorConstraintBetweenNonDummies", !1), Mu = new yt("portDummy"), KS = new ri("crossingHint", Q(0)), Ac = new ri("graphProperties", (e = u(xo(v_), 9), new ks(e, u(bo(e, e.length), 9), 0))), ec = new ri("externalPortSide", (J(), Xr)), bun = new ri("externalPortSize", new Li()), E_ = new yt("externalPortReplacedDummies"), qS = new yt("externalPortReplacedDummy"), zb = new ri("externalPortConnections", (n = u(xo(Yi), 9), new ks(n, u(bo(n, n.length), 9), 0))), y0 = new ri(OKn, 0), hun = new yt("barycenterAssociates"), mp = new yt("TopSideComments"), bp = new yt("BottomSideComments"), _S = new yt("CommentConnectionPort"), T_ = new ri("inputCollect", !1), A_ = new ri("outputCollect", !1), Uk = new ri("cyclic", !1), dun = new yt("crossHierarchyMap"), I_ = new yt("targetOffset"), new ri("splineLabelSize", new Li()), Ig = new yt("spacings"), GS = new ri("partitionConstraint", !1), v0 = new yt("breakingPoint.info"), yun = new yt("splines.survivingEdge"), Wa = new yt("splines.route.start"), Og = new yt("splines.edgeChain"), kun = new yt("originalPortConstraints"), ov = new yt("selfLoopHolder"), fv = new yt("splines.nsPortY"), bc = new yt("modelOrder"), M_ = new yt("longEdgeTargetNode"), m0 = new ri(aHn, !1), Pg = new ri(aHn, !1), C_ = new yt("layerConstraints.hiddenNodes"), mun = new yt("layerConstraints.opposidePort"), P_ = new yt("targetNode.modelOrder"); + } + function zZ() { + zZ = N, Dun = (V8(), $S), VXn = new In(xnn, Dun), sVn = new In(Lnn, (qn(), !1)), Bun = (kC(), j_), aVn = new In(WM, Bun), AVn = new In(Nnn, !1), SVn = new In(Bnn, !0), CXn = new In(Rnn, !1), Uun = (z8(), iK), qVn = new In(_nn, Uun), Q(1), JVn = new In(Knn, Q(7)), YVn = new In(Hnn, !1), oVn = new In(qnn, !1), Oun = (Ia(), f_), XXn = new In(IN, Oun), Kun = (JT(), Q_), MVn = new In(wk, Kun), Run = (Ss(), Qk), vVn = new In(Gnn, Run), Q(-1), pVn = new In(znn, Q(-1)), Q(-1), mVn = new In(Unn, Q(-1)), Q(-1), kVn = new In(ON, Q(4)), Q(-1), jVn = new In(DN, Q(2)), _un = (Zw(), hP), TVn = new In($N, _un), Q(0), CVn = new In(FN, Q(0)), wVn = new In(xN, Q(nt)), Iun = (F2(), ap), WXn = new In(X6, Iun), FXn = new In(Wnn, !1), KXn = new In(LN, 0.1), zXn = new In(NN, !1), Q(-1), qXn = new In(Xnn, Q(-1)), Q(-1), GXn = new In(Vnn, Q(-1)), Q(0), xXn = new In(Qnn, Q(40)), Pun = (H3(), k_), RXn = new In(BN, Pun), Sun = Gk, LXn = new In(XM, Sun), zun = (b6(), Lm), HVn = new In(lg, zun), $Vn = new yt(VM), Hun = (K8(), xS), PVn = new In(RN, Hun), qun = (A7(), LS), OVn = new In(_N, qun), LVn = new In(KN, 0.3), BVn = new yt(HN), Gun = (gb(), fP), RVn = new In(qN, Gun), xun = (oT(), cK), nVn = new In(Jnn, xun), Lun = (x8(), uK), eVn = new In(Ynn, Lun), Nun = (V3(), Rm), tVn = new In(QM, Nun), rVn = new In(JM, 0.2), YXn = new In(GN, 2), WVn = new In(Znn, null), VVn = new In(nen, 10), XVn = new In(een, 10), QVn = new In(ten, 20), Q(0), GVn = new In(ien, Q(0)), Q(0), zVn = new In(ren, Q(0)), Q(0), UVn = new In(cen, Q(0)), TXn = new In(zN, !1), Cun = (f4(), Cm), AXn = new In(uen, Cun), Eun = (OC(), s_), MXn = new In(sen, Eun), hVn = new In(YM, !1), Q(0), fVn = new In(UN, Q(16)), Q(0), lVn = new In(WN, Q(5)), Vun = (dT(), fK), vQn = new In(Vh, Vun), ZVn = new In(ZM, 10), tQn = new In(nA, 1), Xun = (VC(), DS), fQn = new In(V6, Xun), cQn = new yt(XN), Wun = Q(1), Q(0), sQn = new In(VN, Wun), Qun = (uT(), oK), jQn = new In(eA, Qun), mQn = new yt(tA), bQn = new In(iA, !0), aQn = new In(rA, 2), gQn = new In(QN, !0), Fun = (eM(), FS), JXn = new In(oen, Fun), $un = (q2(), tv), QXn = new In(fen, $un), Aun = (Rh(), Nl), $Xn = new In(cA, Aun), DXn = new In(hen, !1), Tun = (Gd(), yg), SXn = new In(JN, Tun), Mun = (i6(), J_), OXn = new In(len, Mun), PXn = new In(YN, 0), IXn = new In(ZN, 0), bVn = h_, dVn = qk, yVn = sP, EVn = sP, gVn = V_, HXn = (_h(), x1), UXn = ap, _Xn = ap, NXn = ap, BXn = x1, FVn = Nm, xVn = Lm, IVn = Lm, DVn = Lm, NVn = eK, KVn = Nm, _Vn = Nm, iVn = (Hh(), Sp), cVn = Sp, uVn = Rm, ZXn = yy, nQn = gv, eQn = tw, iQn = gv, rQn = tw, hQn = gv, lQn = tw, uQn = o_, oQn = DS, EQn = gv, CQn = tw, kQn = gv, yQn = tw, wQn = tw, dQn = tw, pQn = tw; + } + function rr() { + rr = N, fcn = new zt("DIRECTION_PREPROCESSOR", 0), ucn = new zt("COMMENT_PREPROCESSOR", 1), mm = new zt("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER", 2), WR = new zt("INTERACTIVE_EXTERNAL_PORT_POSITIONER", 3), Scn = new zt("PARTITION_PREPROCESSOR", 4), dS = new zt("LABEL_DUMMY_INSERTER", 5), ES = new zt("SELF_LOOP_PREPROCESSOR", 6), Y4 = new zt("LAYER_CONSTRAINT_PREPROCESSOR", 7), Mcn = new zt("PARTITION_MIDPROCESSOR", 8), pcn = new zt("HIGH_DEGREE_NODE_LAYER_PROCESSOR", 9), Ccn = new zt("NODE_PROMOTION", 10), J4 = new zt("LAYER_CONSTRAINT_POSTPROCESSOR", 11), Acn = new zt("PARTITION_POSTPROCESSOR", 12), bcn = new zt("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR", 13), Pcn = new zt("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR", 14), ncn = new zt("BREAKING_POINT_INSERTER", 15), pS = new zt("LONG_EDGE_SPLITTER", 16), XR = new zt("PORT_SIDE_PROCESSOR", 17), lS = new zt("INVERTED_PORT_PROCESSOR", 18), kS = new zt("PORT_LIST_SORTER", 19), Ocn = new zt("SORT_BY_INPUT_ORDER_OF_MODEL", 20), mS = new zt("NORTH_SOUTH_PORT_PREPROCESSOR", 21), ecn = new zt("BREAKING_POINT_PROCESSOR", 22), Tcn = new zt(rHn, 23), Dcn = new zt(cHn, 24), yS = new zt("SELF_LOOP_PORT_RESTORER", 25), Icn = new zt("SINGLE_EDGE_GRAPH_WRAPPER", 26), aS = new zt("IN_LAYER_CONSTRAINT_PROCESSOR", 27), lcn = new zt("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR", 28), jcn = new zt("LABEL_AND_NODE_SIZE_PROCESSOR", 29), ycn = new zt("INNERMOST_NODE_MARGIN_CALCULATOR", 30), CS = new zt("SELF_LOOP_ROUTER", 31), rcn = new zt("COMMENT_NODE_MARGIN_CALCULATOR", 32), hS = new zt("END_LABEL_PREPROCESSOR", 33), wS = new zt("LABEL_DUMMY_SWITCHER", 34), icn = new zt("CENTER_LABEL_MANAGEMENT_PROCESSOR", 35), Q4 = new zt("LABEL_SIDE_SELECTOR", 36), mcn = new zt("HYPEREDGE_DUMMY_MERGER", 37), wcn = new zt("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR", 38), Ecn = new zt("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR", 39), km = new zt("HIERARCHICAL_PORT_POSITION_PROCESSOR", 40), scn = new zt("CONSTRAINTS_POSTPROCESSOR", 41), ccn = new zt("COMMENT_POSTPROCESSOR", 42), kcn = new zt("HYPERNODE_PROCESSOR", 43), gcn = new zt("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER", 44), gS = new zt("LONG_EDGE_JOINER", 45), jS = new zt("SELF_LOOP_POSTPROCESSOR", 46), tcn = new zt("BREAKING_POINT_REMOVER", 47), vS = new zt("NORTH_SOUTH_PORT_POSTPROCESSOR", 48), vcn = new zt("HORIZONTAL_COMPACTOR", 49), bS = new zt("LABEL_DUMMY_REMOVER", 50), acn = new zt("FINAL_SPLINE_BENDPOINTS_CALCULATOR", 51), hcn = new zt("END_LABEL_SORTER", 52), Kk = new zt("REVERSED_EDGE_RESTORER", 53), fS = new zt("END_LABEL_POSTPROCESSOR", 54), dcn = new zt("HIERARCHICAL_NODE_RESIZER", 55), ocn = new zt("DIRECTION_POSTPROCESSOR", 56); + } + function OTe(n, e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se, Ye, fi, ps, oo, Mf, hI, Ky, y9, Hy, Iv, CH, Ree, TH, K1, F0, Ov, qy, Gy, Fp, MH, j9, _ee, W1n, x0, E9, AH, xp, C9, ww, T9, SH, Kee; + for (W1n = 0, Ye = e, oo = 0, Ky = Ye.length; oo < Ky; ++oo) + for (Wn = Ye[oo], F0 = new E(Wn.j); F0.a < F0.c.c.length; ) { + for (K1 = u(y(F0), 11), qy = 0, f = new E(K1.g); f.a < f.c.c.length; ) + o = u(y(f), 17), Wn.c != o.d.i.c && ++qy; + qy > 0 && (n.a[K1.p] = W1n++); + } + for (C9 = 0, fi = t, Mf = 0, y9 = fi.length; Mf < y9; ++Mf) { + for (Wn = fi[Mf], Hy = 0, F0 = new E(Wn.j); F0.a < F0.c.c.length && (K1 = u(y(F0), 11), K1.j == (J(), Kn)); ) + for (f = new E(K1.e); f.a < f.c.c.length; ) + if (o = u(y(f), 17), Wn.c != o.c.i.c) { + ++Hy; + break; + } + for (CH = 0, Gy = new Ii(Wn.j, Wn.j.c.length); Gy.b > 0; ) { + for (K1 = (ne(Gy.b > 0), u(Gy.a.Xb(Gy.c = --Gy.b), 11)), qy = 0, f = new E(K1.e); f.a < f.c.c.length; ) + o = u(y(f), 17), Wn.c != o.c.i.c && ++qy; + qy > 0 && (K1.j == (J(), Kn) ? (n.a[K1.p] = C9, ++C9) : (n.a[K1.p] = C9 + Hy + CH, ++CH)); + } + C9 += CH; + } + for (Ov = new we(), v = new Sh(), se = e, ps = 0, hI = se.length; ps < hI; ++ps) + for (Wn = se[ps], AH = new E(Wn.j); AH.a < AH.c.c.length; ) + for (E9 = u(y(AH), 11), f = new E(E9.g); f.a < f.c.c.length; ) + if (o = u(y(f), 17), T9 = o.d, Wn.c != T9.i.c) + if (x0 = u(Vr(Sr(Ov.f, E9)), 467), ww = u(Vr(Sr(Ov.f, T9)), 467), !x0 && !ww) + p = new _jn(), v.a.zc(p, v), W(p.a, o), W(p.d, E9), Rc(Ov.f, E9, p), W(p.d, T9), Rc(Ov.f, T9, p); + else if (!x0) + W(ww.a, o), W(ww.d, E9), Rc(Ov.f, E9, ww); + else if (!ww) + W(x0.a, o), W(x0.d, T9), Rc(Ov.f, T9, x0); + else if (x0 == ww) + W(x0.a, o); + else { + for (W(x0.a, o), TH = new E(ww.d); TH.a < TH.c.c.length; ) + Ree = u(y(TH), 11), Rc(Ov.f, Ree, x0); + Zt(x0.a, ww.a), Zt(x0.d, ww.d), v.a.Bc(ww) != null; + } + for (m = u(y7(v, F(eMe, { 3: 1, 4: 1, 5: 1, 1946: 1 }, 467, v.a.gc(), 0, 1)), 1946), zn = e[0].c, _ee = t[0].c, a = m, d = 0, g = a.length; d < g; ++d) + for (l = a[d], l.e = W1n, l.f = C9, F0 = new E(l.d); F0.a < F0.c.c.length; ) + K1 = u(y(F0), 11), Fp = n.a[K1.p], K1.i.c == zn ? (Fp < l.e && (l.e = Fp), Fp > l.b && (l.b = Fp)) : K1.i.c == _ee && (Fp < l.f && (l.f = Fp), Fp > l.c && (l.c = Fp)); + for (A3(m, 0, m.length, null), xp = F(be, Le, 25, m.length, 15, 1), i = F(be, Le, 25, C9 + 1, 15, 1), S = 0; S < m.length; S++) + xp[S] = m[S].f, i[xp[S]] = 1; + for (c = 0, $ = 0; $ < i.length; $++) + i[$] == 1 ? i[$] = c : --c; + for (MH = 0, O = 0; O < xp.length; O++) + xp[O] += i[xp[O]], MH = j.Math.max(MH, xp[O] + 1); + for (h = 1; h < MH; ) + h *= 2; + for (Kee = 2 * h - 1, h -= 1, SH = F(be, Le, 25, Kee, 15, 1), r = 0, ln = 0; ln < xp.length; ln++) + for (en = xp[ln] + h, ++SH[en]; en > 0; ) + en % 2 > 0 && (r += SH[en + 1]), en = (en - 1) / 2 | 0, ++SH[en]; + for (wn = F(dJn, rn, 362, m.length * 2, 0, 1), x = 0; x < m.length; x++) + wn[2 * x] = new nC(m[x], m[x].e, m[x].b, (z5(), Hm)), wn[2 * x + 1] = new nC(m[x], m[x].b, m[x].e, Km); + for (A3(wn, 0, wn.length, null), Iv = 0, _ = 0; _ < wn.length; _++) + switch (wn[_].d.g) { + case 0: + ++Iv; + break; + case 1: + --Iv, r += Iv; + } + for (j9 = F(dJn, rn, 362, m.length * 2, 0, 1), U = 0; U < m.length; U++) + j9[2 * U] = new nC(m[U], m[U].f, m[U].c, (z5(), Hm)), j9[2 * U + 1] = new nC(m[U], m[U].c, m[U].f, Km); + for (A3(j9, 0, j9.length, null), Iv = 0, C = 0; C < j9.length; C++) + switch (j9[C].d.g) { + case 0: + ++Iv; + break; + case 1: + --Iv, r += Iv; + } + return r; + } + function Je() { + Je = N, k9 = new ud(7), R1n = new th(8, 94), new th(8, 64), _1n = new th(8, 36), Iee = new th(8, 65), Oee = new th(8, 122), Dee = new th(8, 90), Fee = new th(8, 98), Pee = new th(8, 66), $ee = new th(8, 60), xee = new th(8, 62), B1n = new ud(11), fI = new es(4), jc(fI, 48, 57), Pv = new es(4), jc(Pv, 48, 57), jc(Pv, 65, 90), jc(Pv, 95, 95), jc(Pv, 97, 122), $p = new es(4), jc($p, 9, 9), jc($p, 10, 10), jc($p, 12, 12), jc($p, 13, 13), jc($p, 32, 32), K1n = Ab(fI), q1n = Ab(Pv), H1n = Ab($p), Sv = new we(), m9 = new we(), See = A(M(tn, 1), q, 2, 6, ["Cn", "Lu", "Ll", "Lt", "Lm", "Lo", "Mn", "Me", "Mc", "Nd", "Nl", "No", "Zs", "Zl", "Zp", "Cc", "Cf", null, "Co", "Cs", "Pd", "Ps", "Pe", "Pc", "Po", "Sm", "Sc", "Sk", "So", "Pi", "Pf", "L", "M", "N", "Z", "C", "P", "S"]), L1n = A(M(tn, 1), q, 2, 6, ["Basic Latin", "Latin-1 Supplement", "Latin Extended-A", "Latin Extended-B", "IPA Extensions", "Spacing Modifier Letters", "Combining Diacritical Marks", "Greek", "Cyrillic", "Armenian", "Hebrew", "Arabic", "Syriac", "Thaana", "Devanagari", "Bengali", "Gurmukhi", "Gujarati", "Oriya", "Tamil", "Telugu", "Kannada", "Malayalam", "Sinhala", "Thai", "Lao", "Tibetan", "Myanmar", "Georgian", "Hangul Jamo", "Ethiopic", "Cherokee", "Unified Canadian Aboriginal Syllabics", "Ogham", "Runic", "Khmer", "Mongolian", "Latin Extended Additional", "Greek Extended", "General Punctuation", "Superscripts and Subscripts", "Currency Symbols", "Combining Marks for Symbols", "Letterlike Symbols", "Number Forms", "Arrows", "Mathematical Operators", "Miscellaneous Technical", "Control Pictures", "Optical Character Recognition", "Enclosed Alphanumerics", "Box Drawing", "Block Elements", "Geometric Shapes", "Miscellaneous Symbols", "Dingbats", "Braille Patterns", "CJK Radicals Supplement", "Kangxi Radicals", "Ideographic Description Characters", "CJK Symbols and Punctuation", "Hiragana", "Katakana", "Bopomofo", "Hangul Compatibility Jamo", "Kanbun", "Bopomofo Extended", "Enclosed CJK Letters and Months", "CJK Compatibility", "CJK Unified Ideographs Extension A", "CJK Unified Ideographs", "Yi Syllables", "Yi Radicals", "Hangul Syllables", ezn, "CJK Compatibility Ideographs", "Alphabetic Presentation Forms", "Arabic Presentation Forms-A", "Combining Half Marks", "CJK Compatibility Forms", "Small Form Variants", "Arabic Presentation Forms-B", "Specials", "Halfwidth and Fullwidth Forms", "Old Italic", "Gothic", "Deseret", "Byzantine Musical Symbols", "Musical Symbols", "Mathematical Alphanumeric Symbols", "CJK Unified Ideographs Extension B", "CJK Compatibility Ideographs Supplement", "Tags"]), N1n = A(M(be, 1), Le, 25, 15, [66304, 66351, 66352, 66383, 66560, 66639, 118784, 119039, 119040, 119295, 119808, 120831, 131072, 173782, 194560, 195103, 917504, 917631]); + } + function SM() { + SM = N, mUn = new Ms("OUT_T_L", 0, (Cu(), Xf), (Jc(), To), (_o(), Zr), Zr, A(M(Js, 1), rn, 21, 0, [vt((Eb(), Io), A(M(ar, 1), z, 93, 0, [Oo, So]))])), vUn = new Ms("OUT_T_C", 1, Ol, To, Zr, xc, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [Oo, Zh])), vt(Io, A(M(ar, 1), z, 93, 0, [Oo, Zh, no]))])), kUn = new Ms("OUT_T_R", 2, Co, To, Zr, nc, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [Oo, Po]))])), hUn = new Ms("OUT_B_L", 3, Xf, Wo, nc, Zr, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [eo, So]))])), fUn = new Ms("OUT_B_C", 4, Ol, Wo, nc, xc, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [eo, Zh])), vt(Io, A(M(ar, 1), z, 93, 0, [eo, Zh, no]))])), lUn = new Ms("OUT_B_R", 5, Co, Wo, nc, nc, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [eo, Po]))])), bUn = new Ms("OUT_L_T", 6, Co, Wo, Zr, Zr, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [So, Oo, no]))])), dUn = new Ms("OUT_L_C", 7, Co, Dl, xc, Zr, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [So, yh])), vt(Io, A(M(ar, 1), z, 93, 0, [So, yh, no]))])), aUn = new Ms("OUT_L_B", 8, Co, To, nc, Zr, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [So, eo, no]))])), pUn = new Ms("OUT_R_T", 9, Xf, Wo, Zr, nc, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [Po, Oo, no]))])), gUn = new Ms("OUT_R_C", 10, Xf, Dl, xc, nc, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [Po, yh])), vt(Io, A(M(ar, 1), z, 93, 0, [Po, yh, no]))])), wUn = new Ms("OUT_R_B", 11, Xf, To, nc, nc, A(M(Js, 1), rn, 21, 0, [vt(Io, A(M(ar, 1), z, 93, 0, [Po, eo, no]))])), sUn = new Ms("IN_T_L", 12, Xf, Wo, Zr, Zr, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [Oo, So])), vt(ds, A(M(ar, 1), z, 93, 0, [Oo, So, no]))])), uUn = new Ms("IN_T_C", 13, Ol, Wo, Zr, xc, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [Oo, Zh])), vt(ds, A(M(ar, 1), z, 93, 0, [Oo, Zh, no]))])), oUn = new Ms("IN_T_R", 14, Co, Wo, Zr, nc, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [Oo, Po])), vt(ds, A(M(ar, 1), z, 93, 0, [Oo, Po, no]))])), rUn = new Ms("IN_C_L", 15, Xf, Dl, xc, Zr, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [yh, So])), vt(ds, A(M(ar, 1), z, 93, 0, [yh, So, no]))])), iUn = new Ms("IN_C_C", 16, Ol, Dl, xc, xc, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [yh, Zh])), vt(ds, A(M(ar, 1), z, 93, 0, [yh, Zh, no]))])), cUn = new Ms("IN_C_R", 17, Co, Dl, xc, nc, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [yh, Po])), vt(ds, A(M(ar, 1), z, 93, 0, [yh, Po, no]))])), eUn = new Ms("IN_B_L", 18, Xf, To, nc, Zr, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [eo, So])), vt(ds, A(M(ar, 1), z, 93, 0, [eo, So, no]))])), nUn = new Ms("IN_B_C", 19, Ol, To, nc, xc, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [eo, Zh])), vt(ds, A(M(ar, 1), z, 93, 0, [eo, Zh, no]))])), tUn = new Ms("IN_B_R", 20, Co, To, nc, nc, A(M(Js, 1), rn, 21, 0, [vt(ds, A(M(ar, 1), z, 93, 0, [eo, Po])), vt(ds, A(M(ar, 1), z, 93, 0, [eo, Po, no]))])), TR = new Ms(K6, 21, null, null, null, null, A(M(Js, 1), rn, 21, 0, [])); + } + function Sn() { + Sn = N, lw = (ol(), Nn).b, u(D(R(Nn.b), 0), 34), u(D(R(Nn.b), 1), 18), L1 = Nn.a, u(D(R(Nn.a), 0), 34), u(D(R(Nn.a), 1), 18), u(D(R(Nn.a), 2), 18), u(D(R(Nn.a), 3), 18), u(D(R(Nn.a), 4), 18), Xl = Nn.o, u(D(R(Nn.o), 0), 34), u(D(R(Nn.o), 1), 34), Xne = u(D(R(Nn.o), 2), 18), u(D(R(Nn.o), 3), 18), u(D(R(Nn.o), 4), 18), u(D(R(Nn.o), 5), 18), u(D(R(Nn.o), 6), 18), u(D(R(Nn.o), 7), 18), u(D(R(Nn.o), 8), 18), u(D(R(Nn.o), 9), 18), u(D(R(Nn.o), 10), 18), u(D(R(Nn.o), 11), 18), u(D(R(Nn.o), 12), 18), u(D(R(Nn.o), 13), 18), u(D(R(Nn.o), 14), 18), u(D(R(Nn.o), 15), 18), u(D(ot(Nn.o), 0), 59), u(D(ot(Nn.o), 1), 59), u(D(ot(Nn.o), 2), 59), u(D(ot(Nn.o), 3), 59), u(D(ot(Nn.o), 4), 59), u(D(ot(Nn.o), 5), 59), u(D(ot(Nn.o), 6), 59), u(D(ot(Nn.o), 7), 59), u(D(ot(Nn.o), 8), 59), u(D(ot(Nn.o), 9), 59), Wne = Nn.p, u(D(R(Nn.p), 0), 34), u(D(R(Nn.p), 1), 34), u(D(R(Nn.p), 2), 34), u(D(R(Nn.p), 3), 34), u(D(R(Nn.p), 4), 18), u(D(R(Nn.p), 5), 18), u(D(ot(Nn.p), 0), 59), u(D(ot(Nn.p), 1), 59), Vne = Nn.q, u(D(R(Nn.q), 0), 34), Vl = Nn.v, u(D(R(Nn.v), 0), 18), u(D(ot(Nn.v), 0), 59), u(D(ot(Nn.v), 1), 59), u(D(ot(Nn.v), 2), 59), N1 = Nn.w, u(D(R(Nn.w), 0), 34), u(D(R(Nn.w), 1), 34), u(D(R(Nn.w), 2), 34), u(D(R(Nn.w), 3), 18), Ql = Nn.B, u(D(R(Nn.B), 0), 18), u(D(ot(Nn.B), 0), 59), u(D(ot(Nn.B), 1), 59), u(D(ot(Nn.B), 2), 59), Qne = Nn.Q, u(D(R(Nn.Q), 0), 18), u(D(ot(Nn.Q), 0), 59), Jne = Nn.R, u(D(R(Nn.R), 0), 34), so = Nn.S, u(D(ot(Nn.S), 0), 59), u(D(ot(Nn.S), 1), 59), u(D(ot(Nn.S), 2), 59), u(D(ot(Nn.S), 3), 59), u(D(ot(Nn.S), 4), 59), u(D(ot(Nn.S), 5), 59), u(D(ot(Nn.S), 6), 59), u(D(ot(Nn.S), 7), 59), u(D(ot(Nn.S), 8), 59), u(D(ot(Nn.S), 9), 59), u(D(ot(Nn.S), 10), 59), u(D(ot(Nn.S), 11), 59), u(D(ot(Nn.S), 12), 59), u(D(ot(Nn.S), 13), 59), u(D(ot(Nn.S), 14), 59), B1 = Nn.T, u(D(R(Nn.T), 0), 18), u(D(R(Nn.T), 2), 18), Yne = u(D(R(Nn.T), 3), 18), u(D(R(Nn.T), 4), 18), u(D(ot(Nn.T), 0), 59), u(D(ot(Nn.T), 1), 59), u(D(R(Nn.T), 1), 18), R1 = Nn.U, u(D(R(Nn.U), 0), 34), u(D(R(Nn.U), 1), 34), u(D(R(Nn.U), 2), 18), u(D(R(Nn.U), 3), 18), u(D(R(Nn.U), 4), 18), u(D(R(Nn.U), 5), 18), u(D(ot(Nn.U), 0), 59), aw = Nn.V, u(D(R(Nn.V), 0), 18), qg = Nn.W, u(D(R(Nn.W), 0), 34), u(D(R(Nn.W), 1), 34), u(D(R(Nn.W), 2), 34), u(D(R(Nn.W), 3), 18), u(D(R(Nn.W), 4), 18), u(D(R(Nn.W), 5), 18), Zne = Nn.bb, u(D(R(Nn.bb), 0), 34), u(D(R(Nn.bb), 1), 34), u(D(R(Nn.bb), 2), 34), u(D(R(Nn.bb), 3), 34), u(D(R(Nn.bb), 4), 34), u(D(R(Nn.bb), 5), 34), u(D(R(Nn.bb), 6), 34), u(D(R(Nn.bb), 7), 18), u(D(ot(Nn.bb), 0), 59), u(D(ot(Nn.bb), 1), 59), nee = Nn.eb, u(D(R(Nn.eb), 0), 34), u(D(R(Nn.eb), 1), 34), u(D(R(Nn.eb), 2), 34), u(D(R(Nn.eb), 3), 34), u(D(R(Nn.eb), 4), 34), u(D(R(Nn.eb), 5), 34), u(D(R(Nn.eb), 6), 18), u(D(R(Nn.eb), 7), 18), Zi = Nn.ab, u(D(R(Nn.ab), 0), 34), u(D(R(Nn.ab), 1), 34), O0 = Nn.H, u(D(R(Nn.H), 0), 18), u(D(R(Nn.H), 1), 18), u(D(R(Nn.H), 2), 18), u(D(R(Nn.H), 3), 18), u(D(R(Nn.H), 4), 18), u(D(R(Nn.H), 5), 18), u(D(ot(Nn.H), 0), 59), D0 = Nn.db, u(D(R(Nn.db), 0), 18), Cf = Nn.M; + } + function DTe(n) { + var e; + n.O || (n.O = !0, Oc(n, "type"), rT(n, "ecore.xml.type"), cT(n, Ha), e = u(d4((Z1(), uo), Ha), 1945), me(Ar(n.fb), n.b), Jr(n.b, Ny, "AnyType", !1, !1, !0), Kt(u(D(R(n.b), 0), 34), n.wb.D, Ek, null, 0, -1, Ny, !1, !1, !0, !1, !1, !1), Kt(u(D(R(n.b), 1), 34), n.wb.D, "any", null, 0, -1, Ny, !0, !0, !0, !1, !1, !0), Kt(u(D(R(n.b), 2), 34), n.wb.D, "anyAttribute", null, 0, -1, Ny, !1, !1, !0, !1, !1, !1), Jr(n.bb, sI, LGn, !1, !1, !0), Kt(u(D(R(n.bb), 0), 34), n.gb, "data", null, 0, 1, sI, !1, !1, !0, !1, !0, !1), Kt(u(D(R(n.bb), 1), 34), n.gb, _tn, null, 1, 1, sI, !1, !1, !0, !1, !0, !1), Jr(n.fb, By, NGn, !1, !1, !0), Kt(u(D(R(n.fb), 0), 34), e.gb, "rawValue", null, 0, 1, By, !0, !0, !0, !1, !0, !0), Kt(u(D(R(n.fb), 1), 34), e.a, im, null, 0, 1, By, !0, !0, !0, !1, !0, !0), wt(u(D(R(n.fb), 2), 18), n.wb.q, null, "instanceType", 1, 1, By, !1, !1, !0, !1, !1, !1, !1), Jr(n.qb, D1n, BGn, !1, !1, !0), Kt(u(D(R(n.qb), 0), 34), n.wb.D, Ek, null, 0, -1, null, !1, !1, !0, !1, !1, !1), wt(u(D(R(n.qb), 1), 18), n.wb.ab, null, "xMLNSPrefixMap", 0, -1, null, !0, !1, !0, !0, !1, !1, !1), wt(u(D(R(n.qb), 2), 18), n.wb.ab, null, "xSISchemaLocation", 0, -1, null, !0, !1, !0, !0, !1, !1, !1), Kt(u(D(R(n.qb), 3), 34), n.gb, "cDATA", null, 0, -2, null, !0, !0, !0, !1, !1, !0), Kt(u(D(R(n.qb), 4), 34), n.gb, "comment", null, 0, -2, null, !0, !0, !0, !1, !1, !0), wt(u(D(R(n.qb), 5), 18), n.bb, null, JGn, 0, -2, null, !0, !0, !0, !0, !1, !1, !0), Kt(u(D(R(n.qb), 6), 34), n.gb, $B, null, 0, -2, null, !0, !0, !0, !1, !1, !0), Ge(n.a, Zn, "AnySimpleType", !0), Ge(n.c, tn, "AnyURI", !0), Ge(n.d, M(ku, 1), "Base64Binary", !0), Ge(n.e, _u, "Boolean", !0), Ge(n.f, oi, "BooleanObject", !0), Ge(n.g, ku, "Byte", !0), Ge(n.i, op, "ByteObject", !0), Ge(n.j, tn, "Date", !0), Ge(n.k, tn, "DateTime", !0), Ge(n.n, wR, "Decimal", !0), Ge(n.o, Ci, "Double", !0), Ge(n.p, Si, "DoubleObject", !0), Ge(n.q, tn, "Duration", !0), Ge(n.s, Ds, "ENTITIES", !0), Ge(n.r, Ds, "ENTITIESBase", !0), Ge(n.t, tn, tin, !0), Ge(n.u, bw, "Float", !0), Ge(n.v, z4, "FloatObject", !0), Ge(n.w, tn, "GDay", !0), Ge(n.B, tn, "GMonth", !0), Ge(n.A, tn, "GMonthDay", !0), Ge(n.C, tn, "GYear", !0), Ge(n.D, tn, "GYearMonth", !0), Ge(n.F, M(ku, 1), "HexBinary", !0), Ge(n.G, tn, "ID", !0), Ge(n.H, tn, "IDREF", !0), Ge(n.J, Ds, "IDREFS", !0), Ge(n.I, Ds, "IDREFSBase", !0), Ge(n.K, be, "Int", !0), Ge(n.M, vg, "Integer", !0), Ge(n.L, Ui, "IntObject", !0), Ge(n.P, tn, "Language", !0), Ge(n.Q, Yl, "Long", !0), Ge(n.R, d0, "LongObject", !0), Ge(n.S, tn, "Name", !0), Ge(n.T, tn, FA, !0), Ge(n.U, vg, "NegativeInteger", !0), Ge(n.V, tn, cin, !0), Ge(n.X, Ds, "NMTOKENS", !0), Ge(n.W, Ds, "NMTOKENSBase", !0), Ge(n.Y, vg, "NonNegativeInteger", !0), Ge(n.Z, vg, "NonPositiveInteger", !0), Ge(n.$, tn, "NormalizedString", !0), Ge(n._, tn, "NOTATION", !0), Ge(n.ab, tn, "PositiveInteger", !0), Ge(n.cb, tn, "QName", !0), Ge(n.db, Wg, "Short", !0), Ge(n.eb, b0, "ShortObject", !0), Ge(n.gb, tn, VZ, !0), Ge(n.hb, tn, "Time", !0), Ge(n.ib, tn, "Token", !0), Ge(n.jb, Wg, "UnsignedByte", !0), Ge(n.kb, b0, "UnsignedByteObject", !0), Ge(n.lb, Yl, "UnsignedInt", !0), Ge(n.mb, d0, "UnsignedIntObject", !0), Ge(n.nb, vg, "UnsignedLong", !0), Ge(n.ob, be, "UnsignedShort", !0), Ge(n.pb, Ui, "UnsignedShortObject", !0), cQ(n, Ha), $Te(n)); + } + function R_n(n) { + gd(n, new Oa(kG(vj(ad(fd(ld(hd(new na(), Jn), "ELK Layered"), "Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level."), new ywn()), Jn), vt((a4(), aH), A(M(nI, 1), z, 237, 0, [YP, ZP, JP, lH, QP, VP]))))), Z(n, Jn, pen, cn(q_)), Z(n, Jn, ven, cn(Isn)), Z(n, Jn, vN, cn(Zk)), Z(n, Jn, men, cn(Mo)), Z(n, Jn, EN, cn(jp)), Z(n, Jn, ken, cn(T0)), Z(n, Jn, yen, cn(ew)), Z(n, Jn, jen, cn(bv)), Z(n, Jn, Een, cn(wv)), Z(n, Jn, Cen, cn(G_)), Z(n, Jn, $b, cn(M0)), Z(n, Jn, Ten, cn(z_)), Z(n, Jn, Men, cn(Fm)), Z(n, Jn, Aen, cn(rP)), Z(n, Jn, Znn, cn(Yk)), Z(n, Jn, een, cn(Dg)), Z(n, Jn, nen, cn(Ja)), Z(n, Jn, ten, cn($g)), Z(n, Jn, hk, Q(0)), Z(n, Jn, ien, cn(dv)), Z(n, Jn, ren, cn(Psn)), Z(n, Jn, cen, cn(yp)), Z(n, Jn, Vh, cn(Bsn)), Z(n, Jn, ZM, cn(Osn)), Z(n, Jn, nA, cn(Dsn)), Z(n, Jn, V6, cn(W_)), Z(n, Jn, XN, cn($sn)), Z(n, Jn, VN, cn(Fsn)), Z(n, Jn, eA, cn(cP)), Z(n, Jn, tA, cn(X_)), Z(n, Jn, iA, cn(Lsn)), Z(n, Jn, rA, cn(xsn)), Z(n, Jn, QN, cn(Nsn)), Z(n, Jn, HN, cn(E0)), Z(n, Jn, qN, cn($m)), Z(n, Jn, QM, cn(B_)), Z(n, Jn, JM, cn(ssn)), Z(n, Jn, s0, Csn), Z(n, Jn, pk, rsn), Z(n, Jn, Sen, 0), Z(n, Jn, HM, Q(1)), Z(n, Jn, ep, D4), Z(n, Jn, Pen, cn(Qa)), Z(n, Jn, CN, cn(Bt)), Z(n, Jn, Ien, cn(av)), Z(n, Jn, mk, cn(MQn)), Z(n, Jn, Oen, cn(Qf)), Z(n, Jn, uA, cn(Qb)), Z(n, Jn, q6, (qn(), !0)), Z(n, Jn, Den, cn(Jb)), Z(n, Jn, $en, cn(Xa)), Z(n, Jn, hg, cn(Va)), Z(n, Jn, tp, cn(iP)), Z(n, Jn, tB, cn(H_)), Z(n, Jn, Fen, isn), Z(n, Jn, $4, cn(j0)), Z(n, Jn, xen, cn(eP)), Z(n, Jn, F4, cn(Zb)), Z(n, Jn, Len, cn(DQn)), Z(n, Jn, Nen, cn(Asn)), Z(n, Jn, Ben, Msn), Z(n, Jn, Ren, cn(PQn)), Z(n, Jn, _en, cn(IQn)), Z(n, Jn, Ken, cn(OQn)), Z(n, Jn, Hen, cn(SQn)), Z(n, Jn, Hnn, cn(U_)), Z(n, Jn, wk, cn(vsn)), Z(n, Jn, $N, cn(__)), Z(n, Jn, Knn, cn(xm)), Z(n, Jn, Gnn, cn(Hc)), Z(n, Jn, IN, cn(Vb)), Z(n, Jn, X6, cn(Om)), Z(n, Jn, Wnn, cn(Xb)), Z(n, Jn, Qnn, cn(nsn)), Z(n, Jn, BN, cn(F_)), Z(n, Jn, XM, cn(Jk)), Z(n, Jn, NN, cn(x_)), Z(n, Jn, Nnn, cn(msn)), Z(n, Jn, Bnn, cn(ksn)), Z(n, Jn, WM, cn(dsn)), Z(n, Jn, lg, cn(tP)), Z(n, Jn, _N, cn(K_)), Z(n, Jn, Lnn, cn(R_)), Z(n, Jn, KN, cn(jsn)), Z(n, Jn, Jnn, cn(usn)), Z(n, Jn, Ynn, cn(N_)), Z(n, Jn, sA, cn($_)), Z(n, Jn, RN, cn(ysn)), Z(n, Jn, uen, cn(WS)), Z(n, Jn, sen, cn(Jun)), Z(n, Jn, zN, cn(US)), Z(n, Jn, YM, cn(hsn)), Z(n, Jn, UN, cn(fsn)), Z(n, Jn, WN, cn(lsn)), Z(n, Jn, ip, cn(hv)), Z(n, Jn, qen, cn(Mr)), Z(n, Jn, mN, cn(P1)), Z(n, Jn, Gen, cn(Jf)), Z(n, Jn, qM, cn(L_)), Z(n, Jn, LN, cn(esn)), Z(n, Jn, zen, cn(I1)), Z(n, Jn, Uen, cn(Im)), Z(n, Jn, Wen, cn(YS)), Z(n, Jn, Xen, cn(C0)), Z(n, Jn, iB, cn(Tsn)), Z(n, Jn, rB, cn(lv)), Z(n, Jn, ON, cn(wsn)), Z(n, Jn, DN, cn(gsn)), Z(n, Jn, oA, cn(nw)), Z(n, Jn, Rnn, cn(O_)), Z(n, Jn, FN, cn(psn)), Z(n, Jn, oen, cn(JS)), Z(n, Jn, fen, cn(QS)), Z(n, Jn, Ven, cn(nP)), Z(n, Jn, xN, cn(bsn)), Z(n, Jn, VM, cn(Dm)), Z(n, Jn, Qen, cn(ny)), Z(n, Jn, xnn, cn(tsn)), Z(n, Jn, _nn, cn(Ssn)), Z(n, Jn, GN, cn(csn)), Z(n, Jn, znn, cn(AQn)), Z(n, Jn, Xnn, cn(TQn)), Z(n, Jn, cB, cn(asn)), Z(n, Jn, Unn, cn(ZS)), Z(n, Jn, Vnn, cn(VS)), Z(n, Jn, cA, cn(Ll)), Z(n, Jn, len, cn(Zun)), Z(n, Jn, YN, cn(XS)), Z(n, Jn, ZN, cn(Yun)), Z(n, Jn, hen, cn(D_)), Z(n, Jn, JN, cn(kp)), Z(n, Jn, qnn, cn(osn)); + } + function ug(n, e) { + var t, i; + return Ug || (Ug = new we(), Av = new we(), i = (Je(), Je(), new es(4)), v7(i, ` +\r\r `), yr(Ug, YB, i), yr(Av, YB, Ab(i)), i = new es(4), v7(i, ZGn), yr(Ug, am, i), yr(Av, am, Ab(i)), i = new es(4), v7(i, ZGn), yr(Ug, am, i), yr(Av, am, Ab(i)), i = new es(4), v7(i, nzn), Sb(i, u(mc(Ug, am), 117)), yr(Ug, JB, i), yr(Av, JB, Ab(i)), i = new es(4), v7(i, "-.0:AZ__az··ÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁːˑ̀͠͡ͅΆΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁ҃҆ҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆֹֻֽֿֿׁׂ֑֣֡ׄׄאתװײءغـْ٠٩ٰڷںھۀێېۓە۪ۭۨ۰۹ँःअह़्॑॔क़ॣ०९ঁঃঅঌএঐওনপরললশহ়়াৄেৈো্ৗৗড়ঢ়য়ৣ০ৱਂਂਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹ਼਼ਾੂੇੈੋ੍ਖ਼ੜਫ਼ਫ਼੦ੴઁઃઅઋઍઍએઑઓનપરલળવહ઼ૅેૉો્ૠૠ૦૯ଁଃଅଌଏଐଓନପରଲଳଶହ଼ୃେୈୋ୍ୖୗଡ଼ଢ଼ୟୡ୦୯ஂஃஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹாூெைொ்ௗௗ௧௯ఁఃఅఌఎఐఒనపళవహాౄెైొ్ౕౖౠౡ౦౯ಂಃಅಌಎಐಒನಪಳವಹಾೄೆೈೊ್ೕೖೞೞೠೡ೦೯ംഃഅഌഎഐഒനപഹാൃെൈൊ്ൗൗൠൡ൦൯กฮะฺเ๎๐๙ກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະູົຽເໄໆໆ່ໍ໐໙༘༙༠༩༹༹༵༵༷༷༾ཇཉཀྵ྄ཱ྆ྋྐྕྗྗྙྭྱྷྐྵྐྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼ⃐⃜⃡⃡ΩΩKÅ℮℮ↀↂ々々〇〇〡〯〱〵ぁゔ゙゚ゝゞァヺーヾㄅㄬ一龥가힣"), yr(Ug, ZB, i), yr(Av, ZB, Ab(i)), i = new es(4), v7(i, nzn), jc(i, 95, 95), jc(i, 58, 58), yr(Ug, nR, i), yr(Av, nR, Ab(i))), t = u(mc(e ? Ug : Av, n), 136), t; + } + function $Te(n) { + ke(n.a, xe, A(M(tn, 1), q, 2, 6, [We, "anySimpleType"])), ke(n.b, xe, A(M(tn, 1), q, 2, 6, [We, "anyType", Xs, Ek])), ke(u(D(R(n.b), 0), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, UB, We, ":mixed"])), ke(u(D(R(n.b), 1), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, UB, nin, XB, We, ":1", RGn, "lax"])), ke(u(D(R(n.b), 2), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, xGn, nin, XB, We, ":2", RGn, "lax"])), ke(n.c, xe, A(M(tn, 1), q, 2, 6, [We, "anyURI", Qs, Uo])), ke(n.d, xe, A(M(tn, 1), q, 2, 6, [We, "base64Binary", Qs, Uo])), ke(n.e, xe, A(M(tn, 1), q, 2, 6, [We, X2, Qs, Uo])), ke(n.f, xe, A(M(tn, 1), q, 2, 6, [We, "boolean:Object", Ri, X2])), ke(n.g, xe, A(M(tn, 1), q, 2, 6, [We, cm])), ke(n.i, xe, A(M(tn, 1), q, 2, 6, [We, "byte:Object", Ri, cm])), ke(n.j, xe, A(M(tn, 1), q, 2, 6, [We, "date", Qs, Uo])), ke(n.k, xe, A(M(tn, 1), q, 2, 6, [We, "dateTime", Qs, Uo])), ke(n.n, xe, A(M(tn, 1), q, 2, 6, [We, "decimal", Qs, Uo])), ke(n.o, xe, A(M(tn, 1), q, 2, 6, [We, um, Qs, Uo])), ke(n.p, xe, A(M(tn, 1), q, 2, 6, [We, "double:Object", Ri, um])), ke(n.q, xe, A(M(tn, 1), q, 2, 6, [We, "duration", Qs, Uo])), ke(n.s, xe, A(M(tn, 1), q, 2, 6, [We, "ENTITIES", Ri, _Gn, ein, "1"])), ke(n.r, xe, A(M(tn, 1), q, 2, 6, [We, _Gn, WB, tin])), ke(n.t, xe, A(M(tn, 1), q, 2, 6, [We, tin, Ri, FA])), ke(n.u, xe, A(M(tn, 1), q, 2, 6, [We, sm, Qs, Uo])), ke(n.v, xe, A(M(tn, 1), q, 2, 6, [We, "float:Object", Ri, sm])), ke(n.w, xe, A(M(tn, 1), q, 2, 6, [We, "gDay", Qs, Uo])), ke(n.B, xe, A(M(tn, 1), q, 2, 6, [We, "gMonth", Qs, Uo])), ke(n.A, xe, A(M(tn, 1), q, 2, 6, [We, "gMonthDay", Qs, Uo])), ke(n.C, xe, A(M(tn, 1), q, 2, 6, [We, "gYear", Qs, Uo])), ke(n.D, xe, A(M(tn, 1), q, 2, 6, [We, "gYearMonth", Qs, Uo])), ke(n.F, xe, A(M(tn, 1), q, 2, 6, [We, "hexBinary", Qs, Uo])), ke(n.G, xe, A(M(tn, 1), q, 2, 6, [We, "ID", Ri, FA])), ke(n.H, xe, A(M(tn, 1), q, 2, 6, [We, "IDREF", Ri, FA])), ke(n.J, xe, A(M(tn, 1), q, 2, 6, [We, "IDREFS", Ri, KGn, ein, "1"])), ke(n.I, xe, A(M(tn, 1), q, 2, 6, [We, KGn, WB, "IDREF"])), ke(n.K, xe, A(M(tn, 1), q, 2, 6, [We, om])), ke(n.M, xe, A(M(tn, 1), q, 2, 6, [We, iin])), ke(n.L, xe, A(M(tn, 1), q, 2, 6, [We, "int:Object", Ri, om])), ke(n.P, xe, A(M(tn, 1), q, 2, 6, [We, "language", Ri, VB, QB, HGn])), ke(n.Q, xe, A(M(tn, 1), q, 2, 6, [We, fm])), ke(n.R, xe, A(M(tn, 1), q, 2, 6, [We, "long:Object", Ri, fm])), ke(n.S, xe, A(M(tn, 1), q, 2, 6, [We, "Name", Ri, VB, QB, rin])), ke(n.T, xe, A(M(tn, 1), q, 2, 6, [We, FA, Ri, "Name", QB, qGn])), ke(n.U, xe, A(M(tn, 1), q, 2, 6, [We, "negativeInteger", Ri, GGn, Sk, "-1"])), ke(n.V, xe, A(M(tn, 1), q, 2, 6, [We, cin, Ri, VB, QB, "\\c+"])), ke(n.X, xe, A(M(tn, 1), q, 2, 6, [We, "NMTOKENS", Ri, zGn, ein, "1"])), ke(n.W, xe, A(M(tn, 1), q, 2, 6, [We, zGn, WB, cin])), ke(n.Y, xe, A(M(tn, 1), q, 2, 6, [We, uin, Ri, iin, Pk, "0"])), ke(n.Z, xe, A(M(tn, 1), q, 2, 6, [We, GGn, Ri, iin, Sk, "0"])), ke(n.$, xe, A(M(tn, 1), q, 2, 6, [We, UGn, Ri, EL, Qs, "replace"])), ke(n._, xe, A(M(tn, 1), q, 2, 6, [We, "NOTATION", Qs, Uo])), ke(n.ab, xe, A(M(tn, 1), q, 2, 6, [We, "positiveInteger", Ri, uin, Pk, "1"])), ke(n.bb, xe, A(M(tn, 1), q, 2, 6, [We, "processingInstruction_._type", Xs, "empty"])), ke(u(D(R(n.bb), 0), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, IA, We, "data"])), ke(u(D(R(n.bb), 1), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, IA, We, _tn])), ke(n.cb, xe, A(M(tn, 1), q, 2, 6, [We, "QName", Qs, Uo])), ke(n.db, xe, A(M(tn, 1), q, 2, 6, [We, hm])), ke(n.eb, xe, A(M(tn, 1), q, 2, 6, [We, "short:Object", Ri, hm])), ke(n.fb, xe, A(M(tn, 1), q, 2, 6, [We, "simpleAnyType", Xs, Ck])), ke(u(D(R(n.fb), 0), 34), xe, A(M(tn, 1), q, 2, 6, [We, ":3", Xs, Ck])), ke(u(D(R(n.fb), 1), 34), xe, A(M(tn, 1), q, 2, 6, [We, ":4", Xs, Ck])), ke(u(D(R(n.fb), 2), 18), xe, A(M(tn, 1), q, 2, 6, [We, ":5", Xs, Ck])), ke(n.gb, xe, A(M(tn, 1), q, 2, 6, [We, EL, Qs, "preserve"])), ke(n.hb, xe, A(M(tn, 1), q, 2, 6, [We, "time", Qs, Uo])), ke(n.ib, xe, A(M(tn, 1), q, 2, 6, [We, VB, Ri, UGn, Qs, Uo])), ke(n.jb, xe, A(M(tn, 1), q, 2, 6, [We, WGn, Sk, "255", Pk, "0"])), ke(n.kb, xe, A(M(tn, 1), q, 2, 6, [We, "unsignedByte:Object", Ri, WGn])), ke(n.lb, xe, A(M(tn, 1), q, 2, 6, [We, XGn, Sk, "4294967295", Pk, "0"])), ke(n.mb, xe, A(M(tn, 1), q, 2, 6, [We, "unsignedInt:Object", Ri, XGn])), ke(n.nb, xe, A(M(tn, 1), q, 2, 6, [We, "unsignedLong", Ri, uin, Sk, VGn, Pk, "0"])), ke(n.ob, xe, A(M(tn, 1), q, 2, 6, [We, QGn, Sk, "65535", Pk, "0"])), ke(n.pb, xe, A(M(tn, 1), q, 2, 6, [We, "unsignedShort:Object", Ri, QGn])), ke(n.qb, xe, A(M(tn, 1), q, 2, 6, [We, "", Xs, Ek])), ke(u(D(R(n.qb), 0), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, UB, We, ":mixed"])), ke(u(D(R(n.qb), 1), 18), xe, A(M(tn, 1), q, 2, 6, [Xs, IA, We, "xmlns:prefix"])), ke(u(D(R(n.qb), 2), 18), xe, A(M(tn, 1), q, 2, 6, [Xs, IA, We, "xsi:schemaLocation"])), ke(u(D(R(n.qb), 3), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, OA, We, "cDATA", DA, Tk])), ke(u(D(R(n.qb), 4), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, OA, We, "comment", DA, Tk])), ke(u(D(R(n.qb), 5), 18), xe, A(M(tn, 1), q, 2, 6, [Xs, OA, We, JGn, DA, Tk])), ke(u(D(R(n.qb), 6), 34), xe, A(M(tn, 1), q, 2, 6, [Xs, OA, We, $B, DA, Tk])); + } + function Pe(n) { + return An("_UI_EMFDiagnostic_marker", n) ? "EMF Problem" : An("_UI_CircularContainment_diagnostic", n) ? "An object may not circularly contain itself" : An($qn, n) ? "Wrong character." : An(Fqn, n) ? "Invalid reference number." : An(yA, n) ? "A character is required after \\." : An(_B, n) ? "'?' is not expected. '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?" : An(xqn, n) ? "'(?<' or '(? toIndex: ", rnn = ", toIndex: ", cnn = "Index: ", unn = ", Size: ", S4 = "org.eclipse.elk.alg.common", at = { 62: 1 }, dKn = "org.eclipse.elk.alg.common.compaction", bKn = "Scanline/EventHandler", bh = "org.eclipse.elk.alg.common.compaction.oned", wKn = "CNode belongs to another CGroup.", gKn = "ISpacingsHandler/1", uN = "The ", sN = " instance has been finished already.", pKn = "The direction ", vKn = " is not supported by the CGraph instance.", mKn = "OneDimensionalCompactor", kKn = "OneDimensionalCompactor/lambda$0$Type", yKn = "Quadruplet", jKn = "ScanlineConstraintCalculator", EKn = "ScanlineConstraintCalculator/ConstraintsScanlineHandler", CKn = "ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type", TKn = "ScanlineConstraintCalculator/Timestamp", MKn = "ScanlineConstraintCalculator/lambda$0$Type", Rf = { 169: 1, 45: 1 }, oN = "org.eclipse.elk.alg.common.compaction.options", Wr = "org.eclipse.elk.core.data", snn = "org.eclipse.elk.polyomino.traversalStrategy", onn = "org.eclipse.elk.polyomino.lowLevelSort", fnn = "org.eclipse.elk.polyomino.highLevelSort", hnn = "org.eclipse.elk.polyomino.fill", zs = { 130: 1 }, fN = "polyomino", _6 = "org.eclipse.elk.alg.common.networksimplex", wh = { 177: 1, 3: 1, 4: 1 }, AKn = "org.eclipse.elk.alg.common.nodespacing", xa = "org.eclipse.elk.alg.common.nodespacing.cellsystem", P4 = "CENTER", SKn = { 212: 1, 326: 1 }, lnn = { 3: 1, 4: 1, 5: 1, 595: 1 }, Y2 = "LEFT", Z2 = "RIGHT", ann = "Vertical alignment cannot be null", dnn = "BOTTOM", LM = "org.eclipse.elk.alg.common.nodespacing.internal", K6 = "UNDEFINED", bf = 0.01, sk = "org.eclipse.elk.alg.common.nodespacing.internal.algorithm", PKn = "LabelPlacer/lambda$0$Type", IKn = "LabelPlacer/lambda$1$Type", OKn = "portRatioOrPosition", I4 = "org.eclipse.elk.alg.common.overlaps", hN = "DOWN", _f = "org.eclipse.elk.alg.common.polyomino", NM = "NORTH", lN = "EAST", aN = "SOUTH", dN = "WEST", BM = "org.eclipse.elk.alg.common.polyomino.structures", bnn = "Direction", bN = "Grid is only of size ", wN = ". Requested point (", gN = ") is out of bounds.", RM = " Given center based coordinates were (", ok = "org.eclipse.elk.graph.properties", DKn = "IPropertyHolder", wnn = { 3: 1, 94: 1, 134: 1 }, np = "org.eclipse.elk.alg.common.spore", $Kn = "org.eclipse.elk.alg.common.utils", La = { 209: 1 }, og = "org.eclipse.elk.core", FKn = "Connected Components Compaction", xKn = "org.eclipse.elk.alg.disco", _M = "org.eclipse.elk.alg.disco.graph", pN = "org.eclipse.elk.alg.disco.options", gnn = "CompactionStrategy", pnn = "org.eclipse.elk.disco.componentCompaction.strategy", vnn = "org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm", mnn = "org.eclipse.elk.disco.debug.discoGraph", knn = "org.eclipse.elk.disco.debug.discoPolys", LKn = "componentCompaction", Na = "org.eclipse.elk.disco", vN = "org.eclipse.elk.spacing.componentComponent", mN = "org.eclipse.elk.edge.thickness", ep = "org.eclipse.elk.aspectRatio", s0 = "org.eclipse.elk.padding", fg = "org.eclipse.elk.alg.disco.transform", kN = 1.5707963267948966, O4 = 17976931348623157e292, Db = { 3: 1, 4: 1, 5: 1, 192: 1 }, ynn = { 3: 1, 6: 1, 4: 1, 5: 1, 106: 1, 120: 1 }, jnn = "org.eclipse.elk.alg.force", Enn = "ComponentsProcessor", NKn = "ComponentsProcessor/1", fk = "org.eclipse.elk.alg.force.graph", BKn = "Component Layout", Cnn = "org.eclipse.elk.alg.force.model", KM = "org.eclipse.elk.force.model", Tnn = "org.eclipse.elk.force.iterations", Mnn = "org.eclipse.elk.force.repulsivePower", yN = "org.eclipse.elk.force.temperature", Kf = 1e-3, jN = "org.eclipse.elk.force.repulsion", H6 = "org.eclipse.elk.alg.force.options", D4 = 1.600000023841858, fs = "org.eclipse.elk.force", hk = "org.eclipse.elk.priority", $b = "org.eclipse.elk.spacing.nodeNode", EN = "org.eclipse.elk.spacing.edgeLabel", HM = "org.eclipse.elk.randomSeed", q6 = "org.eclipse.elk.separateConnectedComponents", lk = "org.eclipse.elk.interactive", CN = "org.eclipse.elk.portConstraints", qM = "org.eclipse.elk.edgeLabels.inline", G6 = "org.eclipse.elk.omitNodeMicroLayout", tp = "org.eclipse.elk.nodeSize.options", hg = "org.eclipse.elk.nodeSize.constraints", $4 = "org.eclipse.elk.nodeLabels.placement", F4 = "org.eclipse.elk.portLabels.placement", Ann = "origin", RKn = "random", _Kn = "boundingBox.upLeft", KKn = "boundingBox.lowRight", Snn = "org.eclipse.elk.stress.fixed", Pnn = "org.eclipse.elk.stress.desiredEdgeLength", Inn = "org.eclipse.elk.stress.dimension", Onn = "org.eclipse.elk.stress.epsilon", Dnn = "org.eclipse.elk.stress.iterationLimit", Ml = "org.eclipse.elk.stress", HKn = "ELK Stress", ip = "org.eclipse.elk.nodeSize.minimum", GM = "org.eclipse.elk.alg.force.stress", qKn = "Layered layout", rp = "org.eclipse.elk.alg.layered", ak = "org.eclipse.elk.alg.layered.compaction.components", z6 = "org.eclipse.elk.alg.layered.compaction.oned", zM = "org.eclipse.elk.alg.layered.compaction.oned.algs", Ba = "org.eclipse.elk.alg.layered.compaction.recthull", Hf = "org.eclipse.elk.alg.layered.components", Xh = "NONE", lc = { 3: 1, 6: 1, 4: 1, 9: 1, 5: 1, 122: 1 }, GKn = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 106: 1, 120: 1 }, UM = "org.eclipse.elk.alg.layered.compound", Nt = { 51: 1 }, Fc = "org.eclipse.elk.alg.layered.graph", TN = " -> ", zKn = "Not supported by LGraph", $nn = "Port side is undefined", MN = { 3: 1, 6: 1, 4: 1, 5: 1, 474: 1, 141: 1, 106: 1, 120: 1 }, C1 = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 193: 1, 203: 1, 106: 1, 120: 1 }, UKn = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 1943: 1, 203: 1, 106: 1, 120: 1 }, WKn = `([{"' \r +`, XKn = `)]}"' \r +`, VKn = "The given string contains parts that cannot be parsed as numbers.", dk = "org.eclipse.elk.core.math", QKn = { 3: 1, 4: 1, 142: 1, 207: 1, 414: 1 }, JKn = { 3: 1, 4: 1, 116: 1, 207: 1, 414: 1 }, Jn = "org.eclipse.elk.layered", T1 = "org.eclipse.elk.alg.layered.graph.transform", YKn = "ElkGraphImporter", ZKn = "ElkGraphImporter/lambda$0$Type", nHn = "ElkGraphImporter/lambda$1$Type", eHn = "ElkGraphImporter/lambda$2$Type", tHn = "ElkGraphImporter/lambda$4$Type", iHn = "Node margin calculation", Un = "org.eclipse.elk.alg.layered.intermediate", rHn = "ONE_SIDED_GREEDY_SWITCH", cHn = "TWO_SIDED_GREEDY_SWITCH", AN = "No implementation is available for the layout processor ", Fnn = "IntermediateProcessorStrategy", SN = "Node '", uHn = "FIRST_SEPARATE", sHn = "LAST_SEPARATE", oHn = "Odd port side processing", Qt = "org.eclipse.elk.alg.layered.intermediate.compaction", U6 = "org.eclipse.elk.alg.layered.intermediate.greedyswitch", gh = "org.eclipse.elk.alg.layered.p3order.counting", bk = { 225: 1 }, cp = "org.eclipse.elk.alg.layered.intermediate.loops", hs = "org.eclipse.elk.alg.layered.intermediate.loops.ordering", Al = "org.eclipse.elk.alg.layered.intermediate.loops.routing", W6 = "org.eclipse.elk.alg.layered.intermediate.preserveorder", qf = "org.eclipse.elk.alg.layered.intermediate.wrapping", ac = "org.eclipse.elk.alg.layered.options", PN = "INTERACTIVE", fHn = "DEPTH_FIRST", hHn = "EDGE_LENGTH", lHn = "SELF_LOOPS", aHn = "firstTryWithInitialOrder", xnn = "org.eclipse.elk.layered.directionCongruency", Lnn = "org.eclipse.elk.layered.feedbackEdges", WM = "org.eclipse.elk.layered.interactiveReferencePoint", Nnn = "org.eclipse.elk.layered.mergeEdges", Bnn = "org.eclipse.elk.layered.mergeHierarchyEdges", Rnn = "org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides", _nn = "org.eclipse.elk.layered.portSortingStrategy", Knn = "org.eclipse.elk.layered.thoroughness", Hnn = "org.eclipse.elk.layered.unnecessaryBendpoints", qnn = "org.eclipse.elk.layered.generatePositionAndLayerIds", IN = "org.eclipse.elk.layered.cycleBreaking.strategy", wk = "org.eclipse.elk.layered.layering.strategy", Gnn = "org.eclipse.elk.layered.layering.layerConstraint", znn = "org.eclipse.elk.layered.layering.layerChoiceConstraint", Unn = "org.eclipse.elk.layered.layering.layerId", ON = "org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth", DN = "org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor", $N = "org.eclipse.elk.layered.layering.nodePromotion.strategy", FN = "org.eclipse.elk.layered.layering.nodePromotion.maxIterations", xN = "org.eclipse.elk.layered.layering.coffmanGraham.layerBound", X6 = "org.eclipse.elk.layered.crossingMinimization.strategy", Wnn = "org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder", LN = "org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness", NN = "org.eclipse.elk.layered.crossingMinimization.semiInteractive", Xnn = "org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint", Vnn = "org.eclipse.elk.layered.crossingMinimization.positionId", Qnn = "org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold", BN = "org.eclipse.elk.layered.crossingMinimization.greedySwitch.type", XM = "org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type", lg = "org.eclipse.elk.layered.nodePlacement.strategy", VM = "org.eclipse.elk.layered.nodePlacement.favorStraightEdges", RN = "org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening", _N = "org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment", KN = "org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening", HN = "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility", qN = "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default", Jnn = "org.eclipse.elk.layered.edgeRouting.selfLoopDistribution", Ynn = "org.eclipse.elk.layered.edgeRouting.selfLoopOrdering", QM = "org.eclipse.elk.layered.edgeRouting.splines.mode", JM = "org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor", GN = "org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth", Znn = "org.eclipse.elk.layered.spacing.baseValue", nen = "org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers", een = "org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers", ten = "org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers", ien = "org.eclipse.elk.layered.priority.direction", ren = "org.eclipse.elk.layered.priority.shortness", cen = "org.eclipse.elk.layered.priority.straightness", zN = "org.eclipse.elk.layered.compaction.connectedComponents", uen = "org.eclipse.elk.layered.compaction.postCompaction.strategy", sen = "org.eclipse.elk.layered.compaction.postCompaction.constraints", YM = "org.eclipse.elk.layered.highDegreeNodes.treatment", UN = "org.eclipse.elk.layered.highDegreeNodes.threshold", WN = "org.eclipse.elk.layered.highDegreeNodes.treeHeight", Vh = "org.eclipse.elk.layered.wrapping.strategy", ZM = "org.eclipse.elk.layered.wrapping.additionalEdgeSpacing", nA = "org.eclipse.elk.layered.wrapping.correctionFactor", V6 = "org.eclipse.elk.layered.wrapping.cutting.strategy", XN = "org.eclipse.elk.layered.wrapping.cutting.cuts", VN = "org.eclipse.elk.layered.wrapping.cutting.msd.freedom", eA = "org.eclipse.elk.layered.wrapping.validify.strategy", tA = "org.eclipse.elk.layered.wrapping.validify.forbiddenIndices", iA = "org.eclipse.elk.layered.wrapping.multiEdge.improveCuts", rA = "org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty", QN = "org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges", oen = "org.eclipse.elk.layered.edgeLabels.sideSelection", fen = "org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy", cA = "org.eclipse.elk.layered.considerModelOrder.strategy", hen = "org.eclipse.elk.layered.considerModelOrder.noModelOrder", JN = "org.eclipse.elk.layered.considerModelOrder.components", len = "org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy", YN = "org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence", ZN = "org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence", nB = "layering", dHn = "layering.minWidth", bHn = "layering.nodePromotion", gk = "crossingMinimization", uA = "org.eclipse.elk.hierarchyHandling", wHn = "crossingMinimization.greedySwitch", gHn = "nodePlacement", pHn = "nodePlacement.bk", vHn = "edgeRouting", pk = "org.eclipse.elk.edgeRouting", wf = "spacing", aen = "priority", den = "compaction", mHn = "compaction.postCompaction", kHn = "Specifies whether and how post-process compaction is applied.", ben = "highDegreeNodes", wen = "wrapping", yHn = "wrapping.cutting", jHn = "wrapping.validify", gen = "wrapping.multiEdge", eB = "edgeLabels", vk = "considerModelOrder", pen = "org.eclipse.elk.spacing.commentComment", ven = "org.eclipse.elk.spacing.commentNode", men = "org.eclipse.elk.spacing.edgeEdge", ken = "org.eclipse.elk.spacing.edgeNode", yen = "org.eclipse.elk.spacing.labelLabel", jen = "org.eclipse.elk.spacing.labelPortHorizontal", Een = "org.eclipse.elk.spacing.labelPortVertical", Cen = "org.eclipse.elk.spacing.labelNode", Ten = "org.eclipse.elk.spacing.nodeSelfLoop", Men = "org.eclipse.elk.spacing.portPort", Aen = "org.eclipse.elk.spacing.individual", Sen = "org.eclipse.elk.port.borderOffset", Pen = "org.eclipse.elk.noLayout", Ien = "org.eclipse.elk.port.side", mk = "org.eclipse.elk.debugMode", Oen = "org.eclipse.elk.alignment", Den = "org.eclipse.elk.insideSelfLoops.activate", $en = "org.eclipse.elk.insideSelfLoops.yo", tB = "org.eclipse.elk.nodeSize.fixedGraphSize", Fen = "org.eclipse.elk.direction", xen = "org.eclipse.elk.nodeLabels.padding", Len = "org.eclipse.elk.portLabels.nextToPortIfPossible", Nen = "org.eclipse.elk.portLabels.treatAsGroup", Ben = "org.eclipse.elk.portAlignment.default", Ren = "org.eclipse.elk.portAlignment.north", _en = "org.eclipse.elk.portAlignment.south", Ken = "org.eclipse.elk.portAlignment.west", Hen = "org.eclipse.elk.portAlignment.east", sA = "org.eclipse.elk.contentAlignment", qen = "org.eclipse.elk.junctionPoints", Gen = "org.eclipse.elk.edgeLabels.placement", zen = "org.eclipse.elk.port.index", Uen = "org.eclipse.elk.commentBox", Wen = "org.eclipse.elk.hypernode", Xen = "org.eclipse.elk.port.anchor", iB = "org.eclipse.elk.partitioning.activate", rB = "org.eclipse.elk.partitioning.partition", oA = "org.eclipse.elk.position", Ven = "org.eclipse.elk.margins", Qen = "org.eclipse.elk.spacing.portsSurrounding", cB = "org.eclipse.elk.interactiveLayout", dc = "org.eclipse.elk.core.util", Jen = { 3: 1, 4: 1, 5: 1, 593: 1 }, EHn = "NETWORK_SIMPLEX", Cc = { 123: 1, 51: 1 }, fA = "org.eclipse.elk.alg.layered.p1cycles", Fb = "org.eclipse.elk.alg.layered.p2layers", Yen = { 402: 1, 225: 1 }, CHn = { 832: 1, 3: 1, 4: 1 }, pu = "org.eclipse.elk.alg.layered.p3order", lr = "org.eclipse.elk.alg.layered.p4nodes", THn = { 3: 1, 4: 1, 5: 1, 840: 1 }, Gf = 1e-5, Sl = "org.eclipse.elk.alg.layered.p4nodes.bk", uB = "org.eclipse.elk.alg.layered.p5edges", zo = "org.eclipse.elk.alg.layered.p5edges.orthogonal", sB = "org.eclipse.elk.alg.layered.p5edges.orthogonal.direction", oB = 1e-6, xb = "org.eclipse.elk.alg.layered.p5edges.splines", fB = 0.09999999999999998, hA = 1e-8, MHn = 4.71238898038469, AHn = 3.141592653589793, Q6 = "org.eclipse.elk.alg.mrtree", J6 = "org.eclipse.elk.alg.mrtree.graph", up = "org.eclipse.elk.alg.mrtree.intermediate", SHn = "Set neighbors in level", PHn = "DESCENDANTS", Zen = "org.eclipse.elk.mrtree.weighting", ntn = "org.eclipse.elk.mrtree.searchOrder", lA = "org.eclipse.elk.alg.mrtree.options", M1 = "org.eclipse.elk.mrtree", IHn = "org.eclipse.elk.tree", etn = "org.eclipse.elk.alg.radial", ag = 6.283185307179586, ttn = 5e-324, OHn = "org.eclipse.elk.alg.radial.intermediate", hB = "org.eclipse.elk.alg.radial.intermediate.compaction", DHn = { 3: 1, 4: 1, 5: 1, 106: 1 }, itn = "org.eclipse.elk.alg.radial.intermediate.optimization", lB = "No implementation is available for the layout option ", Y6 = "org.eclipse.elk.alg.radial.options", rtn = "org.eclipse.elk.radial.orderId", ctn = "org.eclipse.elk.radial.radius", aB = "org.eclipse.elk.radial.compactor", dB = "org.eclipse.elk.radial.compactionStepSize", utn = "org.eclipse.elk.radial.sorter", stn = "org.eclipse.elk.radial.wedgeCriteria", otn = "org.eclipse.elk.radial.optimizationCriteria", zf = "org.eclipse.elk.radial", $Hn = "org.eclipse.elk.alg.radial.p1position.wedge", ftn = "org.eclipse.elk.alg.radial.sorting", FHn = 5.497787143782138, xHn = 3.9269908169872414, LHn = 2.356194490192345, NHn = "org.eclipse.elk.alg.rectpacking", aA = "org.eclipse.elk.alg.rectpacking.firstiteration", bB = "org.eclipse.elk.alg.rectpacking.options", htn = "org.eclipse.elk.rectpacking.optimizationGoal", ltn = "org.eclipse.elk.rectpacking.lastPlaceShift", atn = "org.eclipse.elk.rectpacking.currentPosition", dtn = "org.eclipse.elk.rectpacking.desiredPosition", btn = "org.eclipse.elk.rectpacking.onlyFirstIteration", wtn = "org.eclipse.elk.rectpacking.rowCompaction", wB = "org.eclipse.elk.rectpacking.expandToAspectRatio", gtn = "org.eclipse.elk.rectpacking.targetWidth", dA = "org.eclipse.elk.expandNodes", Us = "org.eclipse.elk.rectpacking", kk = "org.eclipse.elk.alg.rectpacking.util", bA = "No implementation available for ", Lb = "org.eclipse.elk.alg.spore", Nb = "org.eclipse.elk.alg.spore.options", o0 = "org.eclipse.elk.sporeCompaction", gB = "org.eclipse.elk.underlyingLayoutAlgorithm", ptn = "org.eclipse.elk.processingOrder.treeConstruction", vtn = "org.eclipse.elk.processingOrder.spanningTreeCostFunction", pB = "org.eclipse.elk.processingOrder.preferredRoot", vB = "org.eclipse.elk.processingOrder.rootSelection", mB = "org.eclipse.elk.structure.structureExtractionStrategy", mtn = "org.eclipse.elk.compaction.compactionStrategy", ktn = "org.eclipse.elk.compaction.orthogonal", ytn = "org.eclipse.elk.overlapRemoval.maxIterations", jtn = "org.eclipse.elk.overlapRemoval.runScanline", kB = "processingOrder", BHn = "overlapRemoval", x4 = "org.eclipse.elk.sporeOverlap", RHn = "org.eclipse.elk.alg.spore.p1structure", yB = "org.eclipse.elk.alg.spore.p2processingorder", jB = "org.eclipse.elk.alg.spore.p3execution", _Hn = "Invalid index: ", L4 = "org.eclipse.elk.core.alg", dg = { 331: 1 }, Bb = { 288: 1 }, KHn = "Make sure its type is registered with the ", Etn = " utility class.", N4 = "true", EB = "false", HHn = "Couldn't clone property '", f0 = 0.05, Ws = "org.eclipse.elk.core.options", qHn = 1.2999999523162842, h0 = "org.eclipse.elk.box", Ctn = "org.eclipse.elk.box.packingMode", GHn = "org.eclipse.elk.algorithm", zHn = "org.eclipse.elk.resolvedAlgorithm", Ttn = "org.eclipse.elk.bendPoints", LTe = "org.eclipse.elk.labelManager", UHn = "org.eclipse.elk.scaleFactor", WHn = "org.eclipse.elk.animate", XHn = "org.eclipse.elk.animTimeFactor", VHn = "org.eclipse.elk.layoutAncestors", QHn = "org.eclipse.elk.maxAnimTime", JHn = "org.eclipse.elk.minAnimTime", YHn = "org.eclipse.elk.progressBar", ZHn = "org.eclipse.elk.validateGraph", nqn = "org.eclipse.elk.validateOptions", eqn = "org.eclipse.elk.zoomToFit", NTe = "org.eclipse.elk.font.name", tqn = "org.eclipse.elk.font.size", iqn = "org.eclipse.elk.edge.type", rqn = "partitioning", cqn = "nodeLabels", wA = "portAlignment", CB = "nodeSize", TB = "port", Mtn = "portLabels", uqn = "insideSelfLoops", Z6 = "org.eclipse.elk.fixed", gA = "org.eclipse.elk.random", sqn = "port must have a parent node to calculate the port side", oqn = "The edge needs to have exactly one edge section. Found: ", nm = "org.eclipse.elk.core.util.adapters", Is = "org.eclipse.emf.ecore", bg = "org.eclipse.elk.graph", fqn = "EMapPropertyHolder", hqn = "ElkBendPoint", lqn = "ElkGraphElement", aqn = "ElkConnectableShape", Atn = "ElkEdge", dqn = "ElkEdgeSection", bqn = "EModelElement", wqn = "ENamedElement", Stn = "ElkLabel", Ptn = "ElkNode", Itn = "ElkPort", gqn = { 92: 1, 90: 1 }, sp = "org.eclipse.emf.common.notify.impl", Pl = "The feature '", em = "' is not a valid changeable feature", pqn = "Expecting null", MB = "' is not a valid feature", vqn = "The feature ID", mqn = " is not a valid feature ID", uc = 32768, kqn = { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1 }, Bn = "org.eclipse.emf.ecore.impl", Ra = "org.eclipse.elk.graph.impl", tm = "Recursive containment not allowed for ", B4 = "The datatype '", l0 = "' is not a valid classifier", AB = "The value '", wg = { 190: 1, 3: 1, 4: 1 }, SB = "The class '", R4 = "http://www.eclipse.org/elk/ElkGraph", Eo = 1024, Otn = "property", im = "value", PB = "source", yqn = "properties", jqn = "identifier", IB = "height", OB = "width", DB = "parent", $B = "text", FB = "children", Eqn = "hierarchical", Dtn = "sources", xB = "targets", $tn = "sections", pA = "bendPoints", Ftn = "outgoingShape", xtn = "incomingShape", Ltn = "outgoingSections", Ntn = "incomingSections", zi = "org.eclipse.emf.common.util", Btn = "Severe implementation error in the Json to ElkGraph importer.", Uf = "id", Fi = "org.eclipse.elk.graph.json", Rtn = "Unhandled parameter types: ", Cqn = "startPoint", Tqn = "An edge must have at least one source and one target (edge id: '", _4 = "').", Mqn = "Referenced edge section does not exist: ", Aqn = " (edge id: '", _tn = "target", Sqn = "sourcePoint", Pqn = "targetPoint", vA = "group", We = "name", Iqn = "connectableShape cannot be null", Oqn = "edge cannot be null", LB = "Passed edge is not 'simple'.", mA = "org.eclipse.elk.graph.util", yk = "The 'no duplicates' constraint is violated", NB = "targetIndex=", _a = ", size=", BB = "sourceIndex=", Wf = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1 }, RB = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 47: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 588: 1 }, kA = "logging", Dqn = "measureExecutionTime", $qn = "parser.parse.1", Fqn = "parser.parse.2", yA = "parser.next.1", _B = "parser.next.2", xqn = "parser.next.3", Lqn = "parser.next.4", Ka = "parser.factor.1", Ktn = "parser.factor.2", Nqn = "parser.factor.3", Bqn = "parser.factor.4", Rqn = "parser.factor.5", _qn = "parser.factor.6", Kqn = "parser.atom.1", Hqn = "parser.atom.2", qqn = "parser.atom.3", Htn = "parser.atom.4", KB = "parser.atom.5", qtn = "parser.cc.1", jA = "parser.cc.2", Gqn = "parser.cc.3", zqn = "parser.cc.5", Gtn = "parser.cc.6", ztn = "parser.cc.7", HB = "parser.cc.8", Uqn = "parser.ope.1", Wqn = "parser.ope.2", Xqn = "parser.ope.3", A1 = "parser.descape.1", Vqn = "parser.descape.2", Qqn = "parser.descape.3", Jqn = "parser.descape.4", Yqn = "parser.descape.5", Os = "parser.process.1", Zqn = "parser.quantifier.1", nGn = "parser.quantifier.2", eGn = "parser.quantifier.3", tGn = "parser.quantifier.4", Utn = "parser.quantifier.5", iGn = "org.eclipse.emf.common.notify", Wtn = { 415: 1, 672: 1 }, rGn = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1 }, jk = { 366: 1, 143: 1 }, rm = "index=", qB = { 3: 1, 4: 1, 5: 1, 126: 1 }, cGn = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 58: 1 }, Xtn = { 3: 1, 6: 1, 4: 1, 5: 1, 192: 1 }, uGn = { 3: 1, 4: 1, 5: 1, 165: 1, 367: 1 }, sGn = ";/?:@&=+$,", oGn = "invalid authority: ", fGn = "EAnnotation", hGn = "ETypedElement", lGn = "EStructuralFeature", aGn = "EAttribute", dGn = "EClassifier", bGn = "EEnumLiteral", wGn = "EGenericType", gGn = "EOperation", pGn = "EParameter", vGn = "EReference", mGn = "ETypeParameter", mt = "org.eclipse.emf.ecore.util", GB = { 76: 1 }, Vtn = { 3: 1, 20: 1, 14: 1, 15: 1, 58: 1, 589: 1, 76: 1, 69: 1, 95: 1 }, kGn = "org.eclipse.emf.ecore.util.FeatureMap$Entry", vu = 8192, Rb = 2048, cm = "byte", EA = "char", um = "double", sm = "float", om = "int", fm = "long", hm = "short", yGn = "java.lang.Object", gg = { 3: 1, 4: 1, 5: 1, 247: 1 }, Qtn = { 3: 1, 4: 1, 5: 1, 673: 1 }, jGn = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 69: 1 }, Br = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, Ek = "mixed", xe = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData", Xs = "kind", EGn = { 3: 1, 4: 1, 5: 1, 674: 1 }, Jtn = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, CA = { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 69: 1 }, TA = { 47: 1, 125: 1, 279: 1 }, MA = { 72: 1, 332: 1 }, AA = "The value of type '", SA = "' must be of type '", pg = 1316, Vs = "http://www.eclipse.org/emf/2002/Ecore", PA = -32768, a0 = "constraints", Ri = "baseType", CGn = "getEStructuralFeature", TGn = "getFeatureID", lm = "feature", MGn = "getOperationID", Ytn = "operation", AGn = "defaultValue", SGn = "eTypeParameters", PGn = "isInstance", IGn = "getEEnumLiteral", OGn = "eContainingClass", qe = { 55: 1 }, DGn = { 3: 1, 4: 1, 5: 1, 119: 1 }, $Gn = "org.eclipse.emf.ecore.resource", FGn = { 92: 1, 90: 1, 591: 1, 1935: 1 }, zB = "org.eclipse.emf.ecore.resource.impl", Ztn = "unspecified", Ck = "simple", IA = "attribute", xGn = "attributeWildcard", OA = "element", UB = "elementWildcard", Uo = "collapse", WB = "itemType", DA = "namespace", Tk = "##targetNamespace", Qs = "whiteSpace", nin = "wildcards", Ha = "http://www.eclipse.org/emf/2003/XMLType", XB = "##any", K4 = "uninitialized", Mk = "The multiplicity constraint is violated", $A = "org.eclipse.emf.ecore.xml.type", LGn = "ProcessingInstruction", NGn = "SimpleAnyType", BGn = "XMLTypeDocumentRoot", Wt = "org.eclipse.emf.ecore.xml.type.impl", Ak = "INF", RGn = "processing", _Gn = "ENTITIES_._base", ein = "minLength", tin = "ENTITY", FA = "NCName", KGn = "IDREFS_._base", iin = "integer", VB = "token", QB = "pattern", HGn = "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*", rin = "\\i\\c*", qGn = "[\\i-[:]][\\c-[:]]*", GGn = "nonPositiveInteger", Sk = "maxInclusive", cin = "NMTOKEN", zGn = "NMTOKENS_._base", uin = "nonNegativeInteger", Pk = "minInclusive", UGn = "normalizedString", WGn = "unsignedByte", XGn = "unsignedInt", VGn = "18446744073709551615", QGn = "unsignedShort", JGn = "processingInstruction", S1 = "org.eclipse.emf.ecore.xml.type.internal", H4 = 1114111, YGn = "Internal Error: shorthands: \\u", am = "xml:isDigit", JB = "xml:isWord", YB = "xml:isSpace", ZB = "xml:isNameChar", nR = "xml:isInitialNameChar", ZGn = "09٠٩۰۹०९০৯੦੯૦૯୦୯௧௯౦౯೦೯൦൯๐๙໐໙༠༩", nzn = "AZazÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁΆΆΈΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆאתװײءغفيٱڷںھۀێېۓەەۥۦअहऽऽक़ॡঅঌএঐওনপরললশহড়ঢ়য়ৡৰৱਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹਖ਼ੜਫ਼ਫ਼ੲੴઅઋઍઍએઑઓનપરલળવહઽઽૠૠଅଌଏଐଓନପରଲଳଶହଽଽଡ଼ଢ଼ୟୡஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹఅఌఎఐఒనపళవహౠౡಅಌಎಐಒನಪಳವಹೞೞೠೡഅഌഎഐഒനപഹൠൡกฮะะาำเๅກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະະາຳຽຽເໄཀཇཉཀྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼΩΩKÅ℮℮ↀↂ〇〇〡〩ぁゔァヺㄅㄬ一龥가힣", ezn = "Private Use", eR = "ASSIGNED", tR = "\0€ÿĀſƀɏɐʯʰ˿̀ͯͰϿЀӿ԰֏֐׿؀ۿ܀ݏހ޿ऀॿঀ৿਀੿઀૿଀୿஀௿ఀ౿ಀ೿ഀൿ඀෿฀๿຀໿ༀ࿿က႟Ⴀჿᄀᇿሀ፿Ꭰ᏿᐀ᙿ ᚟ᚠ᛿ក៿᠀᢯Ḁỿἀ῿ ⁰₟₠⃏⃐⃿℀⅏⅐↏←⇿∀⋿⌀⏿␀␿⑀⑟①⓿─╿▀▟■◿☀⛿✀➿⠀⣿⺀⻿⼀⿟⿰⿿ 〿぀ゟ゠ヿ㄀ㄯ㄰㆏㆐㆟ㆠㆿ㈀㋿㌀㏿㐀䶵一鿿ꀀ꒏꒐꓏가힣豈﫿ffﭏﭐ﷿︠︯︰﹏﹐﹯ﹰ﻾\uFEFF\uFEFF＀￯", sin = "UNASSIGNED", q4 = { 3: 1, 117: 1 }, tzn = "org.eclipse.emf.ecore.xml.type.util", xA = { 3: 1, 4: 1, 5: 1, 368: 1 }, oin = "org.eclipse.xtext.xbase.lib", izn = "Cannot add elements to a Range", rzn = "Cannot set elements in a Range", czn = "Cannot remove elements from a Range", LA = "locale", NA = "default", BA = "user.agent", s, RA, iR; + j.goog = j.goog || {}, j.goog.global = j.goog.global || j, f5e(), b(1, null, {}, zc), s.Fb = function(e) { + return nyn(this, e); + }, s.Gb = function() { + return this.gm; + }, s.Hb = function() { + return kd(this); + }, s.Ib = function() { + var e; + return J1(Du(this)) + "@" + (e = kt(this) >>> 0, e.toString(16)); + }, s.equals = function(n) { + return this.Fb(n); + }, s.hashCode = function() { + return this.Hb(); + }, s.toString = function() { + return this.Ib(); + }; + var uzn, szn, ozn; + b(290, 1, { 290: 1, 2026: 1 }, RV), s.le = function(e) { + var t; + return t = new RV(), t.i = 4, e > 1 ? t.c = pMn(this, e - 1) : t.c = this, t; + }, s.me = function() { + return Ph(this), this.b; + }, s.ne = function() { + return J1(this); + }, s.oe = function() { + return Ph(this), this.k; + }, s.pe = function() { + return (this.i & 4) != 0; + }, s.qe = function() { + return (this.i & 1) != 0; + }, s.Ib = function() { + return nV(this); + }, s.i = 0; + var Zn = w(Ur, "Object", 1), fin = w(Ur, "Class", 290); + b(1998, 1, J7), w(Y7, "Optional", 1998), b(1170, 1998, J7, $t), s.Fb = function(e) { + return e === this; + }, s.Hb = function() { + return 2040732332; + }, s.Ib = function() { + return "Optional.absent()"; + }, s.Jb = function(e) { + return pe(e), Rv(), rR; + }; + var rR; + w(Y7, "Absent", 1170), b(628, 1, {}, YI), w(Y7, "Joiner", 628); + var BTe = Ct(Y7, "Predicate"); + b(582, 1, { 169: 1, 582: 1, 3: 1, 45: 1 }, nvn), s.Mb = function(e) { + return iDn(this, e); + }, s.Lb = function(e) { + return iDn(this, e); + }, s.Fb = function(e) { + var t; + return I(e, 582) ? (t = u(e, 582), DY(this.a, t.a)) : !1; + }, s.Hb = function() { + return GV(this.a) + 306654252; + }, s.Ib = function() { + return V5e(this.a); + }, w(Y7, "Predicates/AndPredicate", 582), b(408, 1998, { 408: 1, 3: 1 }, Zy), s.Fb = function(e) { + var t; + return I(e, 408) ? (t = u(e, 408), tt(this.a, t.a)) : !1; + }, s.Hb = function() { + return 1502476572 + kt(this.a); + }, s.Ib = function() { + return q_n + this.a + ")"; + }, s.Jb = function(e) { + return new Zy(tC(e.Kb(this.a), "the Function passed to Optional.transform() must not return null.")); + }, w(Y7, "Present", 408), b(198, 1, j4), s.Nb = function(e) { + Oi(this, e); + }, s.Qb = function() { + G9n(); + }, w(an, "UnmodifiableIterator", 198), b(1978, 198, E4), s.Qb = function() { + G9n(); + }, s.Rb = function(e) { + throw T(new ye()); + }, s.Wb = function(e) { + throw T(new ye()); + }, w(an, "UnmodifiableListIterator", 1978), b(386, 1978, E4), s.Ob = function() { + return this.c < this.d; + }, s.Sb = function() { + return this.c > 0; + }, s.Pb = function() { + if (this.c >= this.d) + throw T(new ic()); + return this.Xb(this.c++); + }, s.Tb = function() { + return this.c; + }, s.Ub = function() { + if (this.c <= 0) + throw T(new ic()); + return this.Xb(--this.c); + }, s.Vb = function() { + return this.c - 1; + }, s.c = 0, s.d = 0, w(an, "AbstractIndexedListIterator", 386), b(699, 198, j4), s.Ob = function() { + return V$(this); + }, s.Pb = function() { + return XX(this); + }, s.e = 1, w(an, "AbstractIterator", 699), b(1986, 1, { 224: 1 }), s.Zb = function() { + var e; + return e = this.f, e || (this.f = this.ac()); + }, s.Fb = function(e) { + return dF(this, e); + }, s.Hb = function() { + return kt(this.Zb()); + }, s.dc = function() { + return this.gc() == 0; + }, s.ec = function() { + return k2(this); + }, s.Ib = function() { + return Nr(this.Zb()); + }, w(an, "AbstractMultimap", 1986), b(726, 1986, $a), s.$b = function() { + QC(this); + }, s._b = function(e) { + return f8n(this, e); + }, s.ac = function() { + return new Jp(this, this.c); + }, s.ic = function(e) { + return this.hc(); + }, s.bc = function() { + return new Sw(this, this.c); + }, s.jc = function() { + return this.mc(this.hc()); + }, s.kc = function() { + return new A9n(this); + }, s.lc = function() { + return kx(this.c.vc().Nc(), new Ue(), 64, this.d); + }, s.cc = function(e) { + return ct(this, e); + }, s.fc = function(e) { + return l7(this, e); + }, s.gc = function() { + return this.d; + }, s.mc = function(e) { + return Pn(), new Rp(e); + }, s.nc = function() { + return new M9n(this); + }, s.oc = function() { + return kx(this.c.Cc().Nc(), new qt(), 64, this.d); + }, s.pc = function(e, t) { + return new IC(this, e, t, null); + }, s.d = 0, w(an, "AbstractMapBasedMultimap", 726), b(1631, 726, $a), s.hc = function() { + return new Ic(this.a); + }, s.jc = function() { + return Pn(), Pn(), cr; + }, s.cc = function(e) { + return u(ct(this, e), 15); + }, s.fc = function(e) { + return u(l7(this, e), 15); + }, s.Zb = function() { + return T2(this); + }, s.Fb = function(e) { + return dF(this, e); + }, s.qc = function(e) { + return u(ct(this, e), 15); + }, s.rc = function(e) { + return u(l7(this, e), 15); + }, s.mc = function(e) { + return C8(u(e, 15)); + }, s.pc = function(e, t) { + return jAn(this, e, u(t, 15), null); + }, w(an, "AbstractListMultimap", 1631), b(732, 1, Ei), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.c.Ob() || this.e.Ob(); + }, s.Pb = function() { + var e; + return this.e.Ob() || (e = u(this.c.Pb(), 42), this.b = e.cd(), this.a = u(e.dd(), 14), this.e = this.a.Kc()), this.sc(this.b, this.e.Pb()); + }, s.Qb = function() { + this.e.Qb(), this.a.dc() && this.c.Qb(), --this.d.d; + }, w(an, "AbstractMapBasedMultimap/Itr", 732), b(1099, 732, Ei, M9n), s.sc = function(e, t) { + return t; + }, w(an, "AbstractMapBasedMultimap/1", 1099), b(1100, 1, {}, qt), s.Kb = function(e) { + return u(e, 14).Nc(); + }, w(an, "AbstractMapBasedMultimap/1methodref$spliterator$Type", 1100), b(1101, 732, Ei, A9n), s.sc = function(e, t) { + return new wd(e, t); + }, w(an, "AbstractMapBasedMultimap/2", 1101); + var hin = Ct(fe, "Map"); + b(1967, 1, c0), s.wc = function(e) { + n6(this, e); + }, s.yc = function(e, t, i) { + return IF(this, e, t, i); + }, s.$b = function() { + this.vc().$b(); + }, s.tc = function(e) { + return ix(this, e); + }, s._b = function(e) { + return !!xJ(this, e, !1); + }, s.uc = function(e) { + var t, i, r; + for (i = this.vc().Kc(); i.Ob(); ) + if (t = u(i.Pb(), 42), r = t.dd(), B(e) === B(r) || e != null && tt(e, r)) + return !0; + return !1; + }, s.Fb = function(e) { + var t, i, r; + if (e === this) + return !0; + if (!I(e, 83) || (r = u(e, 83), this.gc() != r.gc())) + return !1; + for (i = r.vc().Kc(); i.Ob(); ) + if (t = u(i.Pb(), 42), !this.tc(t)) + return !1; + return !0; + }, s.xc = function(e) { + return Vr(xJ(this, e, !1)); + }, s.Hb = function() { + return FV(this.vc()); + }, s.dc = function() { + return this.gc() == 0; + }, s.ec = function() { + return new Bp(this); + }, s.zc = function(e, t) { + throw T(new i1("Put not supported on this map")); + }, s.Ac = function(e) { + Z5(this, e); + }, s.Bc = function(e) { + return Vr(xJ(this, e, !0)); + }, s.gc = function() { + return this.vc().gc(); + }, s.Ib = function() { + return cxn(this); + }, s.Cc = function() { + return new Mh(this); + }, w(fe, "AbstractMap", 1967), b(1987, 1967, c0), s.bc = function() { + return new Ej(this); + }, s.vc = function() { + return yCn(this); + }, s.ec = function() { + var e; + return e = this.g, e || (this.g = this.bc()); + }, s.Cc = function() { + var e; + return e = this.i, e || (this.i = new e7n(this)); + }, w(an, "Maps/ViewCachingAbstractMap", 1987), b(389, 1987, c0, Jp), s.xc = function(e) { + return O0e(this, e); + }, s.Bc = function(e) { + return Wwe(this, e); + }, s.$b = function() { + this.d == this.e.c ? this.e.$b() : DE(new tW(this)); + }, s._b = function(e) { + return LDn(this.d, e); + }, s.Ec = function() { + return new rvn(this); + }, s.Dc = function() { + return this.Ec(); + }, s.Fb = function(e) { + return this === e || tt(this.d, e); + }, s.Hb = function() { + return kt(this.d); + }, s.ec = function() { + return this.e.ec(); + }, s.gc = function() { + return this.d.gc(); + }, s.Ib = function() { + return Nr(this.d); + }, w(an, "AbstractMapBasedMultimap/AsMap", 389); + var gf = Ct(Ur, "Iterable"); + b(28, 1, Pb), s.Jc = function(e) { + $i(this, e); + }, s.Lc = function() { + return this.Oc(); + }, s.Nc = function() { + return new xn(this, 0); + }, s.Oc = function() { + return new $n(null, this.Nc()); + }, s.Fc = function(e) { + throw T(new i1("Add not supported on this collection")); + }, s.Gc = function(e) { + return Xi(this, e); + }, s.$b = function() { + KW(this); + }, s.Hc = function(e) { + return bb(this, e, !1); + }, s.Ic = function(e) { + return t7(this, e); + }, s.dc = function() { + return this.gc() == 0; + }, s.Mc = function(e) { + return bb(this, e, !0); + }, s.Pc = function() { + return wW(this); + }, s.Qc = function(e) { + return y7(this, e); + }, s.Ib = function() { + return kl(this); + }, w(fe, "AbstractCollection", 28); + var Js = Ct(fe, "Set"); + b(df, 28, gu), s.Nc = function() { + return new xn(this, 1); + }, s.Fb = function(e) { + return P$n(this, e); + }, s.Hb = function() { + return FV(this); + }, w(fe, "AbstractSet", df), b(1970, df, gu), w(an, "Sets/ImprovedAbstractSet", 1970), b(1971, 1970, gu), s.$b = function() { + this.Rc().$b(); + }, s.Hc = function(e) { + return h$n(this, e); + }, s.dc = function() { + return this.Rc().dc(); + }, s.Mc = function(e) { + var t; + return this.Hc(e) ? (t = u(e, 42), this.Rc().ec().Mc(t.cd())) : !1; + }, s.gc = function() { + return this.Rc().gc(); + }, w(an, "Maps/EntrySet", 1971), b(1097, 1971, gu, rvn), s.Hc = function(e) { + return fQ(this.a.d.vc(), e); + }, s.Kc = function() { + return new tW(this.a); + }, s.Rc = function() { + return this.a; + }, s.Mc = function(e) { + var t; + return fQ(this.a.d.vc(), e) ? (t = u(e, 42), pde(this.a.e, t.cd()), !0) : !1; + }, s.Nc = function() { + return g8(this.a.d.vc().Nc(), new cvn(this.a)); + }, w(an, "AbstractMapBasedMultimap/AsMap/AsMapEntries", 1097), b(1098, 1, {}, cvn), s.Kb = function(e) { + return lSn(this.a, u(e, 42)); + }, w(an, "AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type", 1098), b(730, 1, Ei, tW), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + var e; + return e = u(this.b.Pb(), 42), this.a = u(e.dd(), 14), lSn(this.c, e); + }, s.Ob = function() { + return this.b.Ob(); + }, s.Qb = function() { + Nw(!!this.a), this.b.Qb(), this.c.e.d -= this.a.gc(), this.a.$b(), this.a = null; + }, w(an, "AbstractMapBasedMultimap/AsMap/AsMapIterator", 730), b(532, 1970, gu, Ej), s.$b = function() { + this.b.$b(); + }, s.Hc = function(e) { + return this.b._b(e); + }, s.Jc = function(e) { + pe(e), this.b.wc(new jvn(e)); + }, s.dc = function() { + return this.b.dc(); + }, s.Kc = function() { + return new _v(this.b.vc().Kc()); + }, s.Mc = function(e) { + return this.b._b(e) ? (this.b.Bc(e), !0) : !1; + }, s.gc = function() { + return this.b.gc(); + }, w(an, "Maps/KeySet", 532), b(318, 532, gu, Sw), s.$b = function() { + var e; + DE((e = this.b.vc().Kc(), new SG(this, e))); + }, s.Ic = function(e) { + return this.b.ec().Ic(e); + }, s.Fb = function(e) { + return this === e || tt(this.b.ec(), e); + }, s.Hb = function() { + return kt(this.b.ec()); + }, s.Kc = function() { + var e; + return e = this.b.vc().Kc(), new SG(this, e); + }, s.Mc = function(e) { + var t, i; + return i = 0, t = u(this.b.Bc(e), 14), t && (i = t.gc(), t.$b(), this.a.d -= i), i > 0; + }, s.Nc = function() { + return this.b.ec().Nc(); + }, w(an, "AbstractMapBasedMultimap/KeySet", 318), b(731, 1, Ei, SG), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.c.Ob(); + }, s.Pb = function() { + return this.a = u(this.c.Pb(), 42), this.a.cd(); + }, s.Qb = function() { + var e; + Nw(!!this.a), e = u(this.a.dd(), 14), this.c.Qb(), this.b.a.d -= e.gc(), e.$b(), this.a = null; + }, w(an, "AbstractMapBasedMultimap/KeySet/1", 731), b(491, 389, { 83: 1, 161: 1 }, f8), s.bc = function() { + return this.Sc(); + }, s.ec = function() { + return this.Tc(); + }, s.Sc = function() { + return new R9(this.c, this.Uc()); + }, s.Tc = function() { + var e; + return e = this.b, e || (this.b = this.Sc()); + }, s.Uc = function() { + return u(this.d, 161); + }, w(an, "AbstractMapBasedMultimap/SortedAsMap", 491), b(542, 491, G_n, mE), s.bc = function() { + return new Qp(this.a, u(u(this.d, 161), 171)); + }, s.Sc = function() { + return new Qp(this.a, u(u(this.d, 161), 171)); + }, s.ec = function() { + var e; + return e = this.b, u(e || (this.b = new Qp(this.a, u(u(this.d, 161), 171))), 271); + }, s.Tc = function() { + var e; + return e = this.b, u(e || (this.b = new Qp(this.a, u(u(this.d, 161), 171))), 271); + }, s.Uc = function() { + return u(u(this.d, 161), 171); + }, w(an, "AbstractMapBasedMultimap/NavigableAsMap", 542), b(490, 318, z_n, R9), s.Nc = function() { + return this.b.ec().Nc(); + }, w(an, "AbstractMapBasedMultimap/SortedKeySet", 490), b(388, 490, WZ, Qp), w(an, "AbstractMapBasedMultimap/NavigableKeySet", 388), b(541, 28, Pb, IC), s.Fc = function(e) { + var t, i; + return $u(this), i = this.d.dc(), t = this.d.Fc(e), t && (++this.f.d, i && d8(this)), t; + }, s.Gc = function(e) { + var t, i, r; + return e.dc() ? !1 : (r = ($u(this), this.d.gc()), t = this.d.Gc(e), t && (i = this.d.gc(), this.f.d += i - r, r == 0 && d8(this)), t); + }, s.$b = function() { + var e; + e = ($u(this), this.d.gc()), e != 0 && (this.d.$b(), this.f.d -= e, NE(this)); + }, s.Hc = function(e) { + return $u(this), this.d.Hc(e); + }, s.Ic = function(e) { + return $u(this), this.d.Ic(e); + }, s.Fb = function(e) { + return e === this ? !0 : ($u(this), tt(this.d, e)); + }, s.Hb = function() { + return $u(this), kt(this.d); + }, s.Kc = function() { + return $u(this), new HU(this); + }, s.Mc = function(e) { + var t; + return $u(this), t = this.d.Mc(e), t && (--this.f.d, NE(this)), t; + }, s.gc = function() { + return Rkn(this); + }, s.Nc = function() { + return $u(this), this.d.Nc(); + }, s.Ib = function() { + return $u(this), Nr(this.d); + }, w(an, "AbstractMapBasedMultimap/WrappedCollection", 541); + var Ds = Ct(fe, "List"); + b(728, 541, { 20: 1, 28: 1, 14: 1, 15: 1 }, pW), s.ad = function(e) { + Lw(this, e); + }, s.Nc = function() { + return $u(this), this.d.Nc(); + }, s.Vc = function(e, t) { + var i; + $u(this), i = this.d.dc(), u(this.d, 15).Vc(e, t), ++this.a.d, i && d8(this); + }, s.Wc = function(e, t) { + var i, r, c; + return t.dc() ? !1 : (c = ($u(this), this.d.gc()), i = u(this.d, 15).Wc(e, t), i && (r = this.d.gc(), this.a.d += r - c, c == 0 && d8(this)), i); + }, s.Xb = function(e) { + return $u(this), u(this.d, 15).Xb(e); + }, s.Xc = function(e) { + return $u(this), u(this.d, 15).Xc(e); + }, s.Yc = function() { + return $u(this), new vyn(this); + }, s.Zc = function(e) { + return $u(this), new OTn(this, e); + }, s.$c = function(e) { + var t; + return $u(this), t = u(this.d, 15).$c(e), --this.a.d, NE(this), t; + }, s._c = function(e, t) { + return $u(this), u(this.d, 15)._c(e, t); + }, s.bd = function(e, t) { + return $u(this), jAn(this.a, this.e, u(this.d, 15).bd(e, t), this.b ? this.b : this); + }, w(an, "AbstractMapBasedMultimap/WrappedList", 728), b(1096, 728, { 20: 1, 28: 1, 14: 1, 15: 1, 54: 1 }, ojn), w(an, "AbstractMapBasedMultimap/RandomAccessWrappedList", 1096), b(620, 1, Ei, HU), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return v3(this), this.b.Ob(); + }, s.Pb = function() { + return v3(this), this.b.Pb(); + }, s.Qb = function() { + zyn(this); + }, w(an, "AbstractMapBasedMultimap/WrappedCollection/WrappedIterator", 620), b(729, 620, hh, vyn, OTn), s.Qb = function() { + zyn(this); + }, s.Rb = function(e) { + var t; + t = Rkn(this.a) == 0, (v3(this), u(this.b, 125)).Rb(e), ++this.a.a.d, t && d8(this.a); + }, s.Sb = function() { + return (v3(this), u(this.b, 125)).Sb(); + }, s.Tb = function() { + return (v3(this), u(this.b, 125)).Tb(); + }, s.Ub = function() { + return (v3(this), u(this.b, 125)).Ub(); + }, s.Vb = function() { + return (v3(this), u(this.b, 125)).Vb(); + }, s.Wb = function(e) { + (v3(this), u(this.b, 125)).Wb(e); + }, w(an, "AbstractMapBasedMultimap/WrappedList/WrappedListIterator", 729), b(727, 541, z_n, fU), s.Nc = function() { + return $u(this), this.d.Nc(); + }, w(an, "AbstractMapBasedMultimap/WrappedSortedSet", 727), b(1095, 727, WZ, hyn), w(an, "AbstractMapBasedMultimap/WrappedNavigableSet", 1095), b(1094, 541, gu, jjn), s.Nc = function() { + return $u(this), this.d.Nc(); + }, w(an, "AbstractMapBasedMultimap/WrappedSet", 1094), b(1103, 1, {}, Ue), s.Kb = function(e) { + return Ede(u(e, 42)); + }, w(an, "AbstractMapBasedMultimap/lambda$1$Type", 1103), b(1102, 1, {}, uvn), s.Kb = function(e) { + return new wd(this.a, e); + }, w(an, "AbstractMapBasedMultimap/lambda$2$Type", 1102); + var qa = Ct(fe, "Map/Entry"); + b(345, 1, PM), s.Fb = function(e) { + var t; + return I(e, 42) ? (t = u(e, 42), $f(this.cd(), t.cd()) && $f(this.dd(), t.dd())) : !1; + }, s.Hb = function() { + var e, t; + return e = this.cd(), t = this.dd(), (e == null ? 0 : kt(e)) ^ (t == null ? 0 : kt(t)); + }, s.ed = function(e) { + throw T(new ye()); + }, s.Ib = function() { + return this.cd() + "=" + this.dd(); + }, w(an, U_n, 345), b(1988, 28, Pb), s.$b = function() { + this.fd().$b(); + }, s.Hc = function(e) { + var t; + return I(e, 42) ? (t = u(e, 42), iae(this.fd(), t.cd(), t.dd())) : !1; + }, s.Mc = function(e) { + var t; + return I(e, 42) ? (t = u(e, 42), tAn(this.fd(), t.cd(), t.dd())) : !1; + }, s.gc = function() { + return this.fd().d; + }, w(an, "Multimaps/Entries", 1988), b(733, 1988, Pb, rq), s.Kc = function() { + return this.a.kc(); + }, s.fd = function() { + return this.a; + }, s.Nc = function() { + return this.a.lc(); + }, w(an, "AbstractMultimap/Entries", 733), b(734, 733, gu, rG), s.Nc = function() { + return this.a.lc(); + }, s.Fb = function(e) { + return ZJ(this, e); + }, s.Hb = function() { + return iOn(this); + }, w(an, "AbstractMultimap/EntrySet", 734), b(735, 28, Pb, cq), s.$b = function() { + this.a.$b(); + }, s.Hc = function(e) { + return Kwe(this.a, e); + }, s.Kc = function() { + return this.a.nc(); + }, s.gc = function() { + return this.a.d; + }, s.Nc = function() { + return this.a.oc(); + }, w(an, "AbstractMultimap/Values", 735), b(1989, 28, { 835: 1, 20: 1, 28: 1, 14: 1 }), s.Jc = function(e) { + pe(e), Iw(this).Jc(new yvn(e)); + }, s.Nc = function() { + var e; + return e = Iw(this).Nc(), kx(e, new G1(), 64 | e.qd() & 1296, this.a.d); + }, s.Fc = function(e) { + return dG(), !0; + }, s.Gc = function(e) { + return pe(this), pe(e), I(e, 543) ? oae(u(e, 835)) : !e.dc() && _$(this, e.Kc()); + }, s.Hc = function(e) { + var t; + return t = u(db(T2(this.a), e), 14), (t ? t.gc() : 0) > 0; + }, s.Fb = function(e) { + return e9e(this, e); + }, s.Hb = function() { + return kt(Iw(this)); + }, s.dc = function() { + return Iw(this).dc(); + }, s.Mc = function(e) { + return jLn(this, e, 1) > 0; + }, s.Ib = function() { + return Nr(Iw(this)); + }, w(an, "AbstractMultiset", 1989), b(1991, 1970, gu), s.$b = function() { + QC(this.a.a); + }, s.Hc = function(e) { + var t, i; + return I(e, 492) ? (i = u(e, 416), u(i.a.dd(), 14).gc() <= 0 ? !1 : (t = DMn(this.a, i.a.cd()), t == u(i.a.dd(), 14).gc())) : !1; + }, s.Mc = function(e) { + var t, i, r, c; + return I(e, 492) && (i = u(e, 416), t = i.a.cd(), r = u(i.a.dd(), 14).gc(), r != 0) ? (c = this.a, q6e(c, t, r)) : !1; + }, w(an, "Multisets/EntrySet", 1991), b(1109, 1991, gu, svn), s.Kc = function() { + return new x9n(yCn(T2(this.a.a)).Kc()); + }, s.gc = function() { + return T2(this.a.a).gc(); + }, w(an, "AbstractMultiset/EntrySet", 1109), b(619, 726, $a), s.hc = function() { + return this.gd(); + }, s.jc = function() { + return this.hd(); + }, s.cc = function(e) { + return this.jd(e); + }, s.fc = function(e) { + return this.kd(e); + }, s.Zb = function() { + var e; + return e = this.f, e || (this.f = this.ac()); + }, s.hd = function() { + return Pn(), Pn(), zA; + }, s.Fb = function(e) { + return dF(this, e); + }, s.jd = function(e) { + return u(ct(this, e), 21); + }, s.kd = function(e) { + return u(l7(this, e), 21); + }, s.mc = function(e) { + return Pn(), new Up(u(e, 21)); + }, s.pc = function(e, t) { + return new jjn(this, e, u(t, 21)); + }, w(an, "AbstractSetMultimap", 619), b(1657, 619, $a), s.hc = function() { + return new Y1(this.b); + }, s.gd = function() { + return new Y1(this.b); + }, s.jc = function() { + return DW(new Y1(this.b)); + }, s.hd = function() { + return DW(new Y1(this.b)); + }, s.cc = function(e) { + return u(u(ct(this, e), 21), 84); + }, s.jd = function(e) { + return u(u(ct(this, e), 21), 84); + }, s.fc = function(e) { + return u(u(l7(this, e), 21), 84); + }, s.kd = function(e) { + return u(u(l7(this, e), 21), 84); + }, s.mc = function(e) { + return I(e, 271) ? DW(u(e, 271)) : (Pn(), new Hz(u(e, 84))); + }, s.Zb = function() { + var e; + return e = this.f, e || (this.f = I(this.c, 171) ? new mE(this, u(this.c, 171)) : I(this.c, 161) ? new f8(this, u(this.c, 161)) : new Jp(this, this.c)); + }, s.pc = function(e, t) { + return I(t, 271) ? new hyn(this, e, u(t, 271)) : new fU(this, e, u(t, 84)); + }, w(an, "AbstractSortedSetMultimap", 1657), b(1658, 1657, $a), s.Zb = function() { + var e; + return e = this.f, u(u(e || (this.f = I(this.c, 171) ? new mE(this, u(this.c, 171)) : I(this.c, 161) ? new f8(this, u(this.c, 161)) : new Jp(this, this.c)), 161), 171); + }, s.ec = function() { + var e; + return e = this.i, u(u(e || (this.i = I(this.c, 171) ? new Qp(this, u(this.c, 171)) : I(this.c, 161) ? new R9(this, u(this.c, 161)) : new Sw(this, this.c)), 84), 271); + }, s.bc = function() { + return I(this.c, 171) ? new Qp(this, u(this.c, 171)) : I(this.c, 161) ? new R9(this, u(this.c, 161)) : new Sw(this, this.c); + }, w(an, "AbstractSortedKeySortedSetMultimap", 1658), b(2010, 1, { 1947: 1 }), s.Fb = function(e) { + return D4e(this, e); + }, s.Hb = function() { + var e; + return FV((e = this.g, e || (this.g = new MI(this)))); + }, s.Ib = function() { + var e; + return cxn((e = this.f, e || (this.f = new Fz(this)))); + }, w(an, "AbstractTable", 2010), b(665, df, gu, MI), s.$b = function() { + z9n(); + }, s.Hc = function(e) { + var t, i; + return I(e, 468) ? (t = u(e, 682), i = u(db(GCn(this.a), el(t.c.e, t.b)), 83), !!i && fQ(i.vc(), new wd(el(t.c.c, t.a), D2(t.c, t.b, t.a)))) : !1; + }, s.Kc = function() { + return g1e(this.a); + }, s.Mc = function(e) { + var t, i; + return I(e, 468) ? (t = u(e, 682), i = u(db(GCn(this.a), el(t.c.e, t.b)), 83), !!i && bge(i.vc(), new wd(el(t.c.c, t.a), D2(t.c, t.b, t.a)))) : !1; + }, s.gc = function() { + return tCn(this.a); + }, s.Nc = function() { + return lae(this.a); + }, w(an, "AbstractTable/CellSet", 665), b(1928, 28, Pb, ovn), s.$b = function() { + z9n(); + }, s.Hc = function(e) { + return Eve(this.a, e); + }, s.Kc = function() { + return p1e(this.a); + }, s.gc = function() { + return tCn(this.a); + }, s.Nc = function() { + return cAn(this.a); + }, w(an, "AbstractTable/Values", 1928), b(1632, 1631, $a), w(an, "ArrayListMultimapGwtSerializationDependencies", 1632), b(513, 1632, $a, JI, iX), s.hc = function() { + return new Ic(this.a); + }, s.a = 0, w(an, "ArrayListMultimap", 513), b(664, 2010, { 664: 1, 1947: 1, 3: 1 }, DLn), w(an, "ArrayTable", 664), b(1924, 386, E4, Ryn), s.Xb = function(e) { + return new BV(this.a, e); + }, w(an, "ArrayTable/1", 1924), b(1925, 1, {}, evn), s.ld = function(e) { + return new BV(this.a, e); + }, w(an, "ArrayTable/1methodref$getCell$Type", 1925), b(2011, 1, { 682: 1 }), s.Fb = function(e) { + var t; + return e === this ? !0 : I(e, 468) ? (t = u(e, 682), $f(el(this.c.e, this.b), el(t.c.e, t.b)) && $f(el(this.c.c, this.a), el(t.c.c, t.a)) && $f(D2(this.c, this.b, this.a), D2(t.c, t.b, t.a))) : !1; + }, s.Hb = function() { + return gT(A(M(Zn, 1), rn, 1, 5, [el(this.c.e, this.b), el(this.c.c, this.a), D2(this.c, this.b, this.a)])); + }, s.Ib = function() { + return "(" + el(this.c.e, this.b) + "," + el(this.c.c, this.a) + ")=" + D2(this.c, this.b, this.a); + }, w(an, "Tables/AbstractCell", 2011), b(468, 2011, { 468: 1, 682: 1 }, BV), s.a = 0, s.b = 0, s.d = 0, w(an, "ArrayTable/2", 468), b(1927, 1, {}, tvn), s.ld = function(e) { + return gPn(this.a, e); + }, w(an, "ArrayTable/2methodref$getValue$Type", 1927), b(1926, 386, E4, _yn), s.Xb = function(e) { + return gPn(this.a, e); + }, w(an, "ArrayTable/3", 1926), b(1979, 1967, c0), s.$b = function() { + DE(this.kc()); + }, s.vc = function() { + return new Evn(this); + }, s.lc = function() { + return new vTn(this.kc(), this.gc()); + }, w(an, "Maps/IteratorBasedAbstractMap", 1979), b(828, 1979, c0), s.$b = function() { + throw T(new ye()); + }, s._b = function(e) { + return h8n(this.c, e); + }, s.kc = function() { + return new Kyn(this, this.c.b.c.gc()); + }, s.lc = function() { + return gD(this.c.b.c.gc(), 16, new ivn(this)); + }, s.xc = function(e) { + var t; + return t = u(M5(this.c, e), 19), t ? this.nd(t.a) : null; + }, s.dc = function() { + return this.c.b.c.dc(); + }, s.ec = function() { + return CD(this.c); + }, s.zc = function(e, t) { + var i; + if (i = u(M5(this.c, e), 19), !i) + throw T(new Hn(this.md() + " " + e + " not in " + CD(this.c))); + return this.od(i.a, t); + }, s.Bc = function(e) { + throw T(new ye()); + }, s.gc = function() { + return this.c.b.c.gc(); + }, w(an, "ArrayTable/ArrayMap", 828), b(1923, 1, {}, ivn), s.ld = function(e) { + return UCn(this.a, e); + }, w(an, "ArrayTable/ArrayMap/0methodref$getEntry$Type", 1923), b(1921, 345, PM, G8n), s.cd = function() { + return Dce(this.a, this.b); + }, s.dd = function() { + return this.a.nd(this.b); + }, s.ed = function(e) { + return this.a.od(this.b, e); + }, s.b = 0, w(an, "ArrayTable/ArrayMap/1", 1921), b(1922, 386, E4, Kyn), s.Xb = function(e) { + return UCn(this.a, e); + }, w(an, "ArrayTable/ArrayMap/2", 1922), b(1920, 828, c0, $Cn), s.md = function() { + return "Column"; + }, s.nd = function(e) { + return D2(this.b, this.a, e); + }, s.od = function(e, t) { + return HOn(this.b, this.a, e, t); + }, s.a = 0, w(an, "ArrayTable/Row", 1920), b(829, 828, c0, Fz), s.nd = function(e) { + return new $Cn(this.a, e); + }, s.zc = function(e, t) { + return u(t, 83), wie(); + }, s.od = function(e, t) { + return u(t, 83), gie(); + }, s.md = function() { + return "Row"; + }, w(an, "ArrayTable/RowMap", 829), b(1120, 1, Gs, z8n), s.qd = function() { + return this.a.qd() & -262; + }, s.rd = function() { + return this.a.rd(); + }, s.Nb = function(e) { + this.a.Nb(new _8n(e, this.b)); + }, s.sd = function(e) { + return this.a.sd(new R8n(e, this.b)); + }, w(an, "CollectSpliterators/1", 1120), b(1121, 1, Yn, R8n), s.td = function(e) { + this.a.td(this.b.Kb(e)); + }, w(an, "CollectSpliterators/1/lambda$0$Type", 1121), b(1122, 1, Yn, _8n), s.td = function(e) { + this.a.td(this.b.Kb(e)); + }, w(an, "CollectSpliterators/1/lambda$1$Type", 1122), b(1123, 1, Gs, gAn), s.qd = function() { + return this.a; + }, s.rd = function() { + return this.d && (this.b = kyn(this.b, this.d.rd())), kyn(this.b, 0); + }, s.Nb = function(e) { + this.d && (this.d.Nb(e), this.d = null), this.c.Nb(new B8n(this.e, e)), this.b = 0; + }, s.sd = function(e) { + for (; ; ) { + if (this.d && this.d.sd(e)) + return b5(this.b, IM) && (this.b = vl(this.b, 1)), !0; + if (this.d = null, !this.c.sd(new K8n(this, this.e))) + return !1; + } + }, s.a = 0, s.b = 0, w(an, "CollectSpliterators/1FlatMapSpliterator", 1123), b(1124, 1, Yn, K8n), s.td = function(e) { + xue(this.a, this.b, e); + }, w(an, "CollectSpliterators/1FlatMapSpliterator/lambda$0$Type", 1124), b(1125, 1, Yn, B8n), s.td = function(e) { + mce(this.b, this.a, e); + }, w(an, "CollectSpliterators/1FlatMapSpliterator/lambda$1$Type", 1125), b(1117, 1, Gs, Yjn), s.qd = function() { + return 16464 | this.b; + }, s.rd = function() { + return this.a.rd(); + }, s.Nb = function(e) { + this.a.xe(new q8n(e, this.c)); + }, s.sd = function(e) { + return this.a.ye(new H8n(e, this.c)); + }, s.b = 0, w(an, "CollectSpliterators/1WithCharacteristics", 1117), b(1118, 1, Z7, H8n), s.ud = function(e) { + this.a.td(this.b.ld(e)); + }, w(an, "CollectSpliterators/1WithCharacteristics/lambda$0$Type", 1118), b(1119, 1, Z7, q8n), s.ud = function(e) { + this.a.td(this.b.ld(e)); + }, w(an, "CollectSpliterators/1WithCharacteristics/lambda$1$Type", 1119), b(245, 1, TL), s.wd = function(e) { + return this.vd(u(e, 245)); + }, s.vd = function(e) { + var t; + return e == (HI(), uR) ? 1 : e == (qI(), cR) ? -1 : (t = (PE(), Y8(this.a, e.a)), t != 0 ? t : I(this, 519) == I(e, 519) ? 0 : I(this, 519) ? 1 : -1); + }, s.zd = function() { + return this.a; + }, s.Fb = function(e) { + return KQ(this, e); + }, w(an, "Cut", 245), b(1761, 245, TL, X9n), s.vd = function(e) { + return e == this ? 0 : 1; + }, s.xd = function(e) { + throw T(new _q()); + }, s.yd = function(e) { + e.a += "+∞)"; + }, s.zd = function() { + throw T(new $r(X_n)); + }, s.Hb = function() { + return Zf(), QQ(this); + }, s.Ad = function(e) { + return !1; + }, s.Ib = function() { + return "+∞"; + }; + var cR; + w(an, "Cut/AboveAll", 1761), b(519, 245, { 245: 1, 519: 1, 3: 1, 35: 1 }, Uyn), s.xd = function(e) { + rc((e.a += "(", e), this.a); + }, s.yd = function(e) { + sl(rc(e, this.a), 93); + }, s.Hb = function() { + return ~kt(this.a); + }, s.Ad = function(e) { + return PE(), Y8(this.a, e) < 0; + }, s.Ib = function() { + return "/" + this.a + "\\"; + }, w(an, "Cut/AboveValue", 519), b(1760, 245, TL, V9n), s.vd = function(e) { + return e == this ? 0 : -1; + }, s.xd = function(e) { + e.a += "(-∞"; + }, s.yd = function(e) { + throw T(new _q()); + }, s.zd = function() { + throw T(new $r(X_n)); + }, s.Hb = function() { + return Zf(), QQ(this); + }, s.Ad = function(e) { + return !0; + }, s.Ib = function() { + return "-∞"; + }; + var uR; + w(an, "Cut/BelowAll", 1760), b(1762, 245, TL, Wyn), s.xd = function(e) { + rc((e.a += "[", e), this.a); + }, s.yd = function(e) { + sl(rc(e, this.a), 41); + }, s.Hb = function() { + return kt(this.a); + }, s.Ad = function(e) { + return PE(), Y8(this.a, e) <= 0; + }, s.Ib = function() { + return "\\" + this.a + "/"; + }, w(an, "Cut/BelowValue", 1762), b(537, 1, lh), s.Jc = function(e) { + $i(this, e); + }, s.Ib = function() { + return Gge(u(tC(this, "use Optional.orNull() instead of Optional.or(null)"), 20).Kc()); + }, w(an, "FluentIterable", 537), b(433, 537, lh, p5), s.Kc = function() { + return new re(ue(this.a.Kc(), new Mn())); + }, w(an, "FluentIterable/2", 433), b(1046, 537, lh, Jkn), s.Kc = function() { + return ul(this); + }, w(an, "FluentIterable/3", 1046), b(708, 386, E4, xz), s.Xb = function(e) { + return this.a[e].Kc(); + }, w(an, "FluentIterable/3/1", 708), b(1972, 1, {}), s.Ib = function() { + return Nr(this.Bd().b); + }, w(an, "ForwardingObject", 1972), b(1973, 1972, V_n), s.Bd = function() { + return this.Cd(); + }, s.Jc = function(e) { + $i(this, e); + }, s.Lc = function() { + return this.Oc(); + }, s.Nc = function() { + return new xn(this, 0); + }, s.Oc = function() { + return new $n(null, this.Nc()); + }, s.Fc = function(e) { + return this.Cd(), b8n(); + }, s.Gc = function(e) { + return this.Cd(), w8n(); + }, s.$b = function() { + this.Cd(), g8n(); + }, s.Hc = function(e) { + return this.Cd().Hc(e); + }, s.Ic = function(e) { + return this.Cd().Ic(e); + }, s.dc = function() { + return this.Cd().b.dc(); + }, s.Kc = function() { + return this.Cd().Kc(); + }, s.Mc = function(e) { + return this.Cd(), p8n(); + }, s.gc = function() { + return this.Cd().b.gc(); + }, s.Pc = function() { + return this.Cd().Pc(); + }, s.Qc = function(e) { + return this.Cd().Qc(e); + }, w(an, "ForwardingCollection", 1973), b(1980, 28, XZ), s.Kc = function() { + return this.Ed(); + }, s.Fc = function(e) { + throw T(new ye()); + }, s.Gc = function(e) { + throw T(new ye()); + }, s.$b = function() { + throw T(new ye()); + }, s.Hc = function(e) { + return e != null && bb(this, e, !1); + }, s.Dd = function() { + switch (this.gc()) { + case 0: + return eb(), eb(), sR; + case 1: + return eb(), new pD(pe(this.Ed().Pb())); + default: + return new FCn(this, this.Pc()); + } + }, s.Mc = function(e) { + throw T(new ye()); + }, w(an, "ImmutableCollection", 1980), b(712, 1980, XZ, Bq), s.Kc = function() { + return $2(this.a.Kc()); + }, s.Hc = function(e) { + return e != null && this.a.Hc(e); + }, s.Ic = function(e) { + return this.a.Ic(e); + }, s.dc = function() { + return this.a.dc(); + }, s.Ed = function() { + return $2(this.a.Kc()); + }, s.gc = function() { + return this.a.gc(); + }, s.Pc = function() { + return this.a.Pc(); + }, s.Qc = function(e) { + return this.a.Qc(e); + }, s.Ib = function() { + return Nr(this.a); + }, w(an, "ForwardingImmutableCollection", 712), b(152, 1980, x6), s.Kc = function() { + return this.Ed(); + }, s.Yc = function() { + return this.Fd(0); + }, s.Zc = function(e) { + return this.Fd(e); + }, s.ad = function(e) { + Lw(this, e); + }, s.Nc = function() { + return new xn(this, 16); + }, s.bd = function(e, t) { + return this.Gd(e, t); + }, s.Vc = function(e, t) { + throw T(new ye()); + }, s.Wc = function(e, t) { + throw T(new ye()); + }, s.Fb = function(e) { + return Rme(this, e); + }, s.Hb = function() { + return Qbe(this); + }, s.Xc = function(e) { + return e == null ? -1 : f3e(this, e); + }, s.Ed = function() { + return this.Fd(0); + }, s.Fd = function(e) { + return Qz(this, e); + }, s.$c = function(e) { + throw T(new ye()); + }, s._c = function(e, t) { + throw T(new ye()); + }, s.Gd = function(e, t) { + var i; + return mT((i = new t7n(this), new ch(i, e, t))); + }; + var sR; + w(an, "ImmutableList", 152), b(2006, 152, x6), s.Kc = function() { + return $2(this.Hd().Kc()); + }, s.bd = function(e, t) { + return mT(this.Hd().bd(e, t)); + }, s.Hc = function(e) { + return e != null && this.Hd().Hc(e); + }, s.Ic = function(e) { + return this.Hd().Ic(e); + }, s.Fb = function(e) { + return tt(this.Hd(), e); + }, s.Xb = function(e) { + return el(this, e); + }, s.Hb = function() { + return kt(this.Hd()); + }, s.Xc = function(e) { + return this.Hd().Xc(e); + }, s.dc = function() { + return this.Hd().dc(); + }, s.Ed = function() { + return $2(this.Hd().Kc()); + }, s.gc = function() { + return this.Hd().gc(); + }, s.Gd = function(e, t) { + return mT(this.Hd().bd(e, t)); + }, s.Pc = function() { + return this.Hd().Qc(F(Zn, rn, 1, this.Hd().gc(), 5, 1)); + }, s.Qc = function(e) { + return this.Hd().Qc(e); + }, s.Ib = function() { + return Nr(this.Hd()); + }, w(an, "ForwardingImmutableList", 2006), b(714, 1, C4), s.vc = function() { + return Cd(this); + }, s.wc = function(e) { + n6(this, e); + }, s.ec = function() { + return CD(this); + }, s.yc = function(e, t, i) { + return IF(this, e, t, i); + }, s.Cc = function() { + return this.Ld(); + }, s.$b = function() { + throw T(new ye()); + }, s._b = function(e) { + return this.xc(e) != null; + }, s.uc = function(e) { + return this.Ld().Hc(e); + }, s.Jd = function() { + return new Rmn(this); + }, s.Kd = function() { + return new _mn(this); + }, s.Fb = function(e) { + return Hwe(this, e); + }, s.Hb = function() { + return Cd(this).Hb(); + }, s.dc = function() { + return this.gc() == 0; + }, s.zc = function(e, t) { + return pie(); + }, s.Bc = function(e) { + throw T(new ye()); + }, s.Ib = function() { + return k5e(this); + }, s.Ld = function() { + return this.e ? this.e : this.e = this.Kd(); + }, s.c = null, s.d = null, s.e = null; + var fzn; + w(an, "ImmutableMap", 714), b(715, 714, C4), s._b = function(e) { + return h8n(this, e); + }, s.uc = function(e) { + return u7n(this.b, e); + }, s.Id = function() { + return xDn(new fvn(this)); + }, s.Jd = function() { + return xDn(bTn(this.b)); + }, s.Kd = function() { + return Df(), new Bq(dTn(this.b)); + }, s.Fb = function(e) { + return s7n(this.b, e); + }, s.xc = function(e) { + return M5(this, e); + }, s.Hb = function() { + return kt(this.b.c); + }, s.dc = function() { + return this.b.c.dc(); + }, s.gc = function() { + return this.b.c.gc(); + }, s.Ib = function() { + return Nr(this.b.c); + }, w(an, "ForwardingImmutableMap", 715), b(1974, 1973, ML), s.Bd = function() { + return this.Md(); + }, s.Cd = function() { + return this.Md(); + }, s.Nc = function() { + return new xn(this, 1); + }, s.Fb = function(e) { + return e === this || this.Md().Fb(e); + }, s.Hb = function() { + return this.Md().Hb(); + }, w(an, "ForwardingSet", 1974), b(1069, 1974, ML, fvn), s.Bd = function() { + return g3(this.a.b); + }, s.Cd = function() { + return g3(this.a.b); + }, s.Hc = function(e) { + if (I(e, 42) && u(e, 42).cd() == null) + return !1; + try { + return c7n(g3(this.a.b), e); + } catch (t) { + if (t = Et(t), I(t, 205)) + return !1; + throw T(t); + } + }, s.Md = function() { + return g3(this.a.b); + }, s.Qc = function(e) { + var t; + return t = VTn(g3(this.a.b), e), g3(this.a.b).b.gc() < t.length && St(t, g3(this.a.b).b.gc(), null), t; + }, w(an, "ForwardingImmutableMap/1", 1069), b(1981, 1980, T4), s.Kc = function() { + return this.Ed(); + }, s.Nc = function() { + return new xn(this, 1); + }, s.Fb = function(e) { + return ZJ(this, e); + }, s.Hb = function() { + return iOn(this); + }, w(an, "ImmutableSet", 1981), b(703, 1981, T4), s.Kc = function() { + return $2(new _p(this.a.b.Kc())); + }, s.Hc = function(e) { + return e != null && _9(this.a, e); + }, s.Ic = function(e) { + return i7n(this.a, e); + }, s.Hb = function() { + return kt(this.a.b); + }, s.dc = function() { + return this.a.b.dc(); + }, s.Ed = function() { + return $2(new _p(this.a.b.Kc())); + }, s.gc = function() { + return this.a.b.gc(); + }, s.Pc = function() { + return this.a.b.Pc(); + }, s.Qc = function(e) { + return r7n(this.a, e); + }, s.Ib = function() { + return Nr(this.a.b); + }, w(an, "ForwardingImmutableSet", 703), b(1975, 1974, Q_n), s.Bd = function() { + return this.b; + }, s.Cd = function() { + return this.b; + }, s.Md = function() { + return this.b; + }, s.Nc = function() { + return new xj(this); + }, w(an, "ForwardingSortedSet", 1975), b(533, 1979, C4, HT), s.Ac = function(e) { + Z5(this, e); + }, s.Cc = function() { + var e; + return e = this.d, new KO(e || (this.d = new SI(this))); + }, s.$b = function() { + $8(this); + }, s._b = function(e) { + return !!J5(this, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15)))); + }, s.uc = function(e) { + return dIn(this, e); + }, s.kc = function() { + return new Hyn(this, this); + }, s.wc = function(e) { + uMn(this, e); + }, s.xc = function(e) { + return xw(this, e); + }, s.ec = function() { + return new HO(this); + }, s.zc = function(e, t) { + return gM(this, e, t); + }, s.Bc = function(e) { + var t; + return t = J5(this, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15)))), t ? (Yw(this, t), t.e = null, t.c = null, t.i) : null; + }, s.gc = function() { + return this.i; + }, s.pd = function() { + var e; + return e = this.d, new KO(e || (this.d = new SI(this))); + }, s.f = 0, s.g = 0, s.i = 0, w(an, "HashBiMap", 533), b(534, 1, Ei), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return TAn(this); + }, s.Pb = function() { + var e; + if (!TAn(this)) + throw T(new ic()); + return e = this.c, this.c = e.c, this.f = e, --this.d, this.Nd(e); + }, s.Qb = function() { + if (this.e.g != this.b) + throw T(new vs()); + Nw(!!this.f), Yw(this.e, this.f), this.b = this.e.g, this.f = null; + }, s.b = 0, s.d = 0, s.f = null, w(an, "HashBiMap/Itr", 534), b(1011, 534, Ei, Hyn), s.Nd = function(e) { + return new X8n(this, e); + }, w(an, "HashBiMap/1", 1011), b(1012, 345, PM, X8n), s.cd = function() { + return this.a.g; + }, s.dd = function() { + return this.a.i; + }, s.ed = function(e) { + var t, i, r; + return i = this.a.i, r = ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))), r == this.a.f && (B(e) === B(i) || e != null && tt(e, i)) ? e : (BOn(!Y5(this.b.a, e, r), e), Yw(this.b.a, this.a), t = new VE(this.a.g, this.a.a, e, r), D7(this.b.a, t, this.a), this.a.e = null, this.a.c = null, this.b.b = this.b.a.g, this.b.f == this.a && (this.b.f = t), this.a = t, i); + }, w(an, "HashBiMap/1/MapEntry", 1012), b(238, 345, { 345: 1, 238: 1, 3: 1, 42: 1 }, wd), s.cd = function() { + return this.g; + }, s.dd = function() { + return this.i; + }, s.ed = function(e) { + throw T(new ye()); + }, w(an, "ImmutableEntry", 238), b(317, 238, { 345: 1, 317: 1, 238: 1, 3: 1, 42: 1 }, VE), s.a = 0, s.f = 0; + var oR = w(an, "HashBiMap/BiEntry", 317); + b(610, 1979, C4, SI), s.Ac = function(e) { + Z5(this, e); + }, s.Cc = function() { + return new HO(this.a); + }, s.$b = function() { + $8(this.a); + }, s._b = function(e) { + return dIn(this.a, e); + }, s.kc = function() { + return new qyn(this, this.a); + }, s.wc = function(e) { + pe(e), uMn(this.a, new hvn(e)); + }, s.xc = function(e) { + return ZC(this, e); + }, s.ec = function() { + return new KO(this); + }, s.zc = function(e, t) { + return Gke(this.a, e, t, !1); + }, s.Bc = function(e) { + var t; + return t = Y5(this.a, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15)))), t ? (Yw(this.a, t), t.e = null, t.c = null, t.g) : null; + }, s.gc = function() { + return this.a.i; + }, s.pd = function() { + return new HO(this.a); + }, w(an, "HashBiMap/Inverse", 610), b(1008, 534, Ei, qyn), s.Nd = function(e) { + return new V8n(this, e); + }, w(an, "HashBiMap/Inverse/1", 1008), b(1009, 345, PM, V8n), s.cd = function() { + return this.a.i; + }, s.dd = function() { + return this.a.g; + }, s.ed = function(e) { + var t, i, r; + return r = this.a.g, t = ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))), t == this.a.a && (B(e) === B(r) || e != null && tt(e, r)) ? e : (BOn(!J5(this.b.a.a, e, t), e), Yw(this.b.a.a, this.a), i = new VE(e, t, this.a.i, this.a.f), this.a = i, D7(this.b.a.a, i, null), this.b.b = this.b.a.a.g, r); + }, w(an, "HashBiMap/Inverse/1/InverseEntry", 1009), b(611, 532, gu, KO), s.Kc = function() { + return new D9n(this.a.a); + }, s.Mc = function(e) { + var t; + return t = Y5(this.a.a, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15)))), t ? (Yw(this.a.a, t), !0) : !1; + }, w(an, "HashBiMap/Inverse/InverseKeySet", 611), b(1007, 534, Ei, D9n), s.Nd = function(e) { + return e.i; + }, w(an, "HashBiMap/Inverse/InverseKeySet/1", 1007), b(1010, 1, {}, hvn), s.Od = function(e, t) { + Vte(this.a, e, t); + }, w(an, "HashBiMap/Inverse/lambda$0$Type", 1010), b(609, 532, gu, HO), s.Kc = function() { + return new $9n(this.a); + }, s.Mc = function(e) { + var t; + return t = J5(this.a, e, ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15)))), t ? (Yw(this.a, t), t.e = null, t.c = null, !0) : !1; + }, w(an, "HashBiMap/KeySet", 609), b(1006, 534, Ei, $9n), s.Nd = function(e) { + return e.g; + }, w(an, "HashBiMap/KeySet/1", 1006), b(1093, 619, $a), w(an, "HashMultimapGwtSerializationDependencies", 1093), b(265, 1093, $a, Dd), s.hc = function() { + return new kj(ob(this.a)); + }, s.gd = function() { + return new kj(ob(this.a)); + }, s.a = 2, w(an, "HashMultimap", 265), b(1999, 152, x6), s.Hc = function(e) { + return this.Pd().Hc(e); + }, s.dc = function() { + return this.Pd().dc(); + }, s.gc = function() { + return this.Pd().gc(); + }, w(an, "ImmutableAsList", 1999), b(1931, 715, C4), s.Ld = function() { + return Df(), new u2(this.a); + }, s.Cc = function() { + return Df(), new u2(this.a); + }, s.pd = function() { + return Df(), new u2(this.a); + }, w(an, "ImmutableBiMap", 1931), b(1977, 1, {}), w(an, "ImmutableCollection/Builder", 1977), b(1022, 703, T4, F9n), w(an, "ImmutableEnumSet", 1022), b(969, 386, E4, Jjn), s.Xb = function(e) { + return this.a.Xb(e); + }, w(an, "ImmutableList/1", 969), b(968, 1977, {}, Ojn), w(an, "ImmutableList/Builder", 968), b(614, 198, j4, PI), s.Ob = function() { + return this.a.Ob(); + }, s.Pb = function() { + return u(this.a.Pb(), 42).cd(); + }, w(an, "ImmutableMap/1", 614), b(1041, 1, {}, ki), s.Kb = function(e) { + return u(e, 42).cd(); + }, w(an, "ImmutableMap/2methodref$getKey$Type", 1041), b(1040, 1, {}, Djn), w(an, "ImmutableMap/Builder", 1040), b(2e3, 1981, T4), s.Kc = function() { + var e; + return e = Cd(this.a).Ed(), new PI(e); + }, s.Dd = function() { + return new Rq(this); + }, s.Jc = function(e) { + var t, i; + for (pe(e), i = this.gc(), t = 0; t < i; t++) + e.td(u(vW(Cd(this.a)).Xb(t), 42).cd()); + }, s.Ed = function() { + var e; + return (e = this.c, e || (this.c = new Rq(this))).Ed(); + }, s.Nc = function() { + return gD(this.gc(), 1296, new avn(this)); + }, w(an, "IndexedImmutableSet", 2e3), b(1180, 2e3, T4, Rmn), s.Kc = function() { + var e; + return e = Cd(this.a).Ed(), new PI(e); + }, s.Hc = function(e) { + return this.a._b(e); + }, s.Jc = function(e) { + pe(e), n6(this.a, new lvn(e)); + }, s.Ed = function() { + var e; + return e = Cd(this.a).Ed(), new PI(e); + }, s.gc = function() { + return this.a.gc(); + }, s.Nc = function() { + return g8(Cd(this.a).Nc(), new ki()); + }, w(an, "ImmutableMapKeySet", 1180), b(1181, 1, {}, lvn), s.Od = function(e, t) { + Df(), this.a.td(e); + }, w(an, "ImmutableMapKeySet/lambda$0$Type", 1181), b(1178, 1980, XZ, _mn), s.Kc = function() { + return new dD(this); + }, s.Hc = function(e) { + return e != null && O4e(new dD(this), e); + }, s.Ed = function() { + return new dD(this); + }, s.gc = function() { + return this.a.gc(); + }, s.Nc = function() { + return g8(Cd(this.a).Nc(), new ur()); + }, w(an, "ImmutableMapValues", 1178), b(1179, 1, {}, ur), s.Kb = function(e) { + return u(e, 42).dd(); + }, w(an, "ImmutableMapValues/0methodref$getValue$Type", 1179), b(626, 198, j4, dD), s.Ob = function() { + return this.a.Ob(); + }, s.Pb = function() { + return u(this.a.Pb(), 42).dd(); + }, w(an, "ImmutableMapValues/1", 626), b(1182, 1, {}, avn), s.ld = function(e) { + return LCn(this.a, e); + }, w(an, "IndexedImmutableSet/0methodref$get$Type", 1182), b(752, 1999, x6, Rq), s.Pd = function() { + return this.a; + }, s.Xb = function(e) { + return LCn(this.a, e); + }, s.gc = function() { + return this.a.a.gc(); + }, w(an, "IndexedImmutableSet/1", 752), b(44, 1, {}, Mn), s.Kb = function(e) { + return u(e, 20).Kc(); + }, s.Fb = function(e) { + return this === e; + }, w(an, "Iterables/10", 44), b(1042, 537, lh, NEn), s.Jc = function(e) { + pe(e), this.b.Jc(new Q8n(this.a, e)); + }, s.Kc = function() { + return yz(this); + }, w(an, "Iterables/4", 1042), b(1043, 1, Yn, Q8n), s.td = function(e) { + gre(this.b, this.a, e); + }, w(an, "Iterables/4/lambda$0$Type", 1043), b(1044, 537, lh, BEn), s.Jc = function(e) { + pe(e), $i(this.a, new U8n(e, this.b)); + }, s.Kc = function() { + return ue(new ie(this.a), this.b); + }, w(an, "Iterables/5", 1044), b(1045, 1, Yn, U8n), s.td = function(e) { + this.a.td(oyn(e)); + }, w(an, "Iterables/5/lambda$0$Type", 1045), b(1071, 198, j4, dvn), s.Ob = function() { + return this.a.Ob(); + }, s.Pb = function() { + return this.a.Pb(); + }, w(an, "Iterators/1", 1071), b(1072, 699, j4, W8n), s.Yb = function() { + for (var e; this.b.Ob(); ) + if (e = this.b.Pb(), this.a.Lb(e)) + return e; + return this.e = 2, null; + }, w(an, "Iterators/5", 1072), b(487, 1, Ei), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.b.Ob(); + }, s.Pb = function() { + return this.Qd(this.b.Pb()); + }, s.Qb = function() { + this.b.Qb(); + }, w(an, "TransformedIterator", 487), b(1073, 487, Ei, Gyn), s.Qd = function(e) { + return this.a.Kb(e); + }, w(an, "Iterators/6", 1073), b(717, 198, j4, uq), s.Ob = function() { + return !this.a; + }, s.Pb = function() { + if (this.a) + throw T(new ic()); + return this.a = !0, this.b; + }, s.a = !1, w(an, "Iterators/9", 717), b(1070, 386, E4, sCn), s.Xb = function(e) { + return this.a[this.b + e]; + }, s.b = 0; + var hzn; + w(an, "Iterators/ArrayItr", 1070), b(39, 1, { 39: 1, 47: 1 }, re), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return Se(this); + }, s.Pb = function() { + return ve(this); + }, s.Qb = function() { + Nw(!!this.c), this.c.Qb(), this.c = null; + }, w(an, "Iterators/ConcatenatedIterator", 39), b(22, 1, { 3: 1, 35: 1, 22: 1 }), s.wd = function(e) { + return B9n(this, u(e, 22)); + }, s.Fb = function(e) { + return this === e; + }, s.Hb = function() { + return kd(this); + }, s.Ib = function() { + return VO(this); + }, s.g = 0; + var Ie = w(Ur, "Enum", 22); + b(538, 22, { 538: 1, 3: 1, 35: 1, 22: 1, 47: 1 }, Xyn), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return !1; + }, s.Pb = function() { + throw T(new ic()); + }, s.Qb = function() { + Nw(!1); + }; + var fR, lzn = Me(an, "Iterators/EmptyModifiableIterator", 538, Ie, hhe, zce), azn; + b(1834, 619, $a), w(an, "LinkedHashMultimapGwtSerializationDependencies", 1834), b(1835, 1834, $a, TDn), s.hc = function() { + return new UO(ob(this.b)); + }, s.$b = function() { + QC(this), $9(this.a, this.a); + }, s.gd = function() { + return new UO(ob(this.b)); + }, s.ic = function(e) { + return new hDn(this, e, this.b); + }, s.kc = function() { + return new Nz(this); + }, s.lc = function() { + var e; + return new xn((e = this.g, u(e || (this.g = new rG(this)), 21)), 17); + }, s.ec = function() { + var e; + return e = this.i, e || (this.i = new Sw(this, this.c)); + }, s.nc = function() { + return new fG(new Nz(this)); + }, s.oc = function() { + var e; + return g8(new xn((e = this.g, u(e || (this.g = new rG(this)), 21)), 17), new fc()); + }, s.b = 2, w(an, "LinkedHashMultimap", 1835), b(1838, 1, {}, fc), s.Kb = function(e) { + return u(e, 42).dd(); + }, w(an, "LinkedHashMultimap/0methodref$getValue$Type", 1838), b(824, 1, Ei, Nz), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return I0e(this); + }, s.Ob = function() { + return this.a != this.b.a; + }, s.Qb = function() { + Nw(!!this.c), tAn(this.b, this.c.g, this.c.i), this.c = null; + }, w(an, "LinkedHashMultimap/1", 824), b(330, 238, { 345: 1, 238: 1, 330: 1, 2020: 1, 3: 1, 42: 1 }, RW), s.Rd = function() { + return this.f; + }, s.Sd = function(e) { + this.c = e; + }, s.Td = function(e) { + this.f = e; + }, s.d = 0; + var dzn = w(an, "LinkedHashMultimap/ValueEntry", 330); + b(1836, 1970, { 2020: 1, 20: 1, 28: 1, 14: 1, 21: 1 }, hDn), s.Fc = function(e) { + var t, i, r, c, o; + for (o = ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))), t = o & this.b.length - 1, c = this.b[t], i = c; i; i = i.a) + if (i.d == o && $f(i.i, e)) + return !1; + return r = new RW(this.c, e, o, c), U9n(this.d, r), r.f = this, this.d = r, $9(this.g.a.b, r), $9(r, this.g.a), this.b[t] = r, ++this.f, ++this.e, S4e(this), !0; + }, s.$b = function() { + var e, t; + for (z9(this.b, null), this.f = 0, e = this.a; e != this; e = e.Rd()) + t = u(e, 330), $9(t.b, t.e); + this.a = this, this.d = this, ++this.e; + }, s.Hc = function(e) { + var t, i; + for (i = ge(Ni(ah, rh(ge(Ni(e == null ? 0 : kt(e), dh)), 15))), t = this.b[i & this.b.length - 1]; t; t = t.a) + if (t.d == i && $f(t.i, e)) + return !0; + return !1; + }, s.Jc = function(e) { + var t; + for (pe(e), t = this.a; t != this; t = t.Rd()) + e.td(u(t, 330).i); + }, s.Rd = function() { + return this.a; + }, s.Kc = function() { + return new tTn(this); + }, s.Mc = function(e) { + return ZLn(this, e); + }, s.Sd = function(e) { + this.d = e; + }, s.Td = function(e) { + this.a = e; + }, s.gc = function() { + return this.f; + }, s.e = 0, s.f = 0, w(an, "LinkedHashMultimap/ValueSet", 1836), b(1837, 1, Ei, tTn), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return sW(this), this.b != this.c; + }, s.Pb = function() { + var e, t; + if (sW(this), this.b == this.c) + throw T(new ic()); + return e = u(this.b, 330), t = e.i, this.d = e, this.b = e.f, t; + }, s.Qb = function() { + sW(this), Nw(!!this.d), ZLn(this.c, this.d.i), this.a = this.c.e, this.d = null; + }, s.a = 0, w(an, "LinkedHashMultimap/ValueSet/1", 1837), b(766, 1986, $a, Xkn), s.Zb = function() { + var e; + return e = this.f, e || (this.f = new xG(this)); + }, s.Fb = function(e) { + return dF(this, e); + }, s.cc = function(e) { + return new tO(this, e); + }, s.fc = function(e) { + return vX(this, e); + }, s.$b = function() { + _Cn(this); + }, s._b = function(e) { + return o7n(this, e); + }, s.ac = function() { + return new xG(this); + }, s.bc = function() { + return new Cvn(this); + }, s.qc = function(e) { + return new tO(this, e); + }, s.dc = function() { + return !this.a; + }, s.rc = function(e) { + return vX(this, e); + }, s.gc = function() { + return this.d; + }, s.c = 0, s.d = 0, w(an, "LinkedListMultimap", 766), b(52, 28, M4), s.ad = function(e) { + Lw(this, e); + }, s.Nc = function() { + return new xn(this, 16); + }, s.Vc = function(e, t) { + throw T(new i1("Add not supported on this list")); + }, s.Fc = function(e) { + return this.Vc(this.gc(), e), !0; + }, s.Wc = function(e, t) { + var i, r, c; + for (_n(t), i = !1, c = t.Kc(); c.Ob(); ) + r = c.Pb(), this.Vc(e++, r), i = !0; + return i; + }, s.$b = function() { + this.Ud(0, this.gc()); + }, s.Fb = function(e) { + return DY(this, e); + }, s.Hb = function() { + return GV(this); + }, s.Xc = function(e) { + return LIn(this, e); + }, s.Kc = function() { + return new $v(this); + }, s.Yc = function() { + return this.Zc(0); + }, s.Zc = function(e) { + return new Ii(this, e); + }, s.$c = function(e) { + throw T(new i1("Remove not supported on this list")); + }, s.Ud = function(e, t) { + var i, r; + for (r = this.Zc(e), i = e; i < t; ++i) + r.Pb(), r.Qb(); + }, s._c = function(e, t) { + throw T(new i1("Set not supported on this list")); + }, s.bd = function(e, t) { + return new ch(this, e, t); + }, s.j = 0, w(fe, "AbstractList", 52), b(1964, 52, M4), s.Vc = function(e, t) { + u3(this, e, t); + }, s.Wc = function(e, t) { + return aDn(this, e, t); + }, s.Xb = function(e) { + return qo(this, e); + }, s.Kc = function() { + return this.Zc(0); + }, s.$c = function(e) { + return hx(this, e); + }, s._c = function(e, t) { + var i, r; + i = this.Zc(e); + try { + return r = i.Pb(), i.Wb(t), r; + } catch (c) { + throw c = Et(c), I(c, 109) ? T(new mr("Can't set element " + e)) : T(c); + } + }, w(fe, "AbstractSequentialList", 1964), b(636, 1964, M4, tO), s.Zc = function(e) { + return Yyn(this, e); + }, s.gc = function() { + var e; + return e = u(te(this.a.b, this.b), 283), e ? e.a : 0; + }, w(an, "LinkedListMultimap/1", 636), b(1297, 1970, gu, Cvn), s.Hc = function(e) { + return o7n(this.a, e); + }, s.Kc = function() { + return new YIn(this.a); + }, s.Mc = function(e) { + return !vX(this.a, e).a.dc(); + }, s.gc = function() { + return Xv(this.a.b); + }, w(an, "LinkedListMultimap/1KeySetImpl", 1297), b(1296, 1, Ei, YIn), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return uW(this), !!this.c; + }, s.Pb = function() { + uW(this), _z(this.c), this.a = this.c, ci(this.d, this.a.a); + do + this.c = this.c.b; + while (this.c && !ci(this.d, this.c.a)); + return this.a.a; + }, s.Qb = function() { + uW(this), Nw(!!this.a), DE(new x$(this.e, this.a.a)), this.a = null, this.b = this.e.c; + }, s.b = 0, w(an, "LinkedListMultimap/DistinctKeyIterator", 1296), b(283, 1, { 283: 1 }, XW), s.a = 0, w(an, "LinkedListMultimap/KeyList", 283), b(1295, 345, PM, J8n), s.cd = function() { + return this.a; + }, s.dd = function() { + return this.f; + }, s.ed = function(e) { + var t; + return t = this.f, this.f = e, t; + }, w(an, "LinkedListMultimap/Node", 1295), b(560, 1, hh, x$, Uxn), s.Nb = function(e) { + Oi(this, e); + }, s.Rb = function(e) { + this.e = sZ(this.f, this.b, e, this.c), ++this.d, this.a = null; + }, s.Ob = function() { + return !!this.c; + }, s.Sb = function() { + return !!this.e; + }, s.Pb = function() { + return nX(this); + }, s.Tb = function() { + return this.d; + }, s.Ub = function() { + return vMn(this); + }, s.Vb = function() { + return this.d - 1; + }, s.Qb = function() { + Nw(!!this.a), this.a != this.c ? (this.e = this.a.e, --this.d) : this.c = this.a.c, $6e(this.f, this.a), this.a = null; + }, s.Wb = function(e) { + Rz(!!this.a), this.a.f = e; + }, s.d = 0, w(an, "LinkedListMultimap/ValueForKeyIterator", 560), b(1018, 52, M4), s.Vc = function(e, t) { + this.a.Vc(e, t); + }, s.Wc = function(e, t) { + return this.a.Wc(e, t); + }, s.Hc = function(e) { + return this.a.Hc(e); + }, s.Xb = function(e) { + return this.a.Xb(e); + }, s.$c = function(e) { + return this.a.$c(e); + }, s._c = function(e, t) { + return this.a._c(e, t); + }, s.gc = function() { + return this.a.gc(); + }, w(an, "Lists/AbstractListWrapper", 1018), b(1019, 1018, Y_n), w(an, "Lists/RandomAccessListWrapper", 1019), b(1021, 1019, Y_n, t7n), s.Zc = function(e) { + return this.a.Zc(e); + }, w(an, "Lists/1", 1021), b(131, 52, { 131: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1 }, K0), s.Vc = function(e, t) { + this.a.Vc(a3(this, e), t); + }, s.$b = function() { + this.a.$b(); + }, s.Xb = function(e) { + return this.a.Xb($W(this, e)); + }, s.Kc = function() { + return rX(this, 0); + }, s.Zc = function(e) { + return rX(this, e); + }, s.$c = function(e) { + return this.a.$c($W(this, e)); + }, s.Ud = function(e, t) { + (fAn(e, t, this.a.gc()), ma(this.a.bd(a3(this, t), a3(this, e)))).$b(); + }, s._c = function(e, t) { + return this.a._c($W(this, e), t); + }, s.gc = function() { + return this.a.gc(); + }, s.bd = function(e, t) { + return fAn(e, t, this.a.gc()), ma(this.a.bd(a3(this, t), a3(this, e))); + }, w(an, "Lists/ReverseList", 131), b(280, 131, { 131: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1 }, od), w(an, "Lists/RandomAccessReverseList", 280), b(1020, 1, hh, Y8n), s.Nb = function(e) { + Oi(this, e); + }, s.Rb = function(e) { + this.c.Rb(e), this.c.Ub(), this.a = !1; + }, s.Ob = function() { + return this.c.Sb(); + }, s.Sb = function() { + return this.c.Ob(); + }, s.Pb = function() { + return aSn(this); + }, s.Tb = function() { + return a3(this.b, this.c.Tb()); + }, s.Ub = function() { + if (!this.c.Ob()) + throw T(new ic()); + return this.a = !0, this.c.Pb(); + }, s.Vb = function() { + return a3(this.b, this.c.Tb()) - 1; + }, s.Qb = function() { + Nw(this.a), this.c.Qb(), this.a = !1; + }, s.Wb = function(e) { + Rz(this.a), this.c.Wb(e); + }, s.a = !1, w(an, "Lists/ReverseList/1", 1020), b(432, 487, Ei, _v), s.Qd = function(e) { + return Fj(e); + }, w(an, "Maps/1", 432), b(698, 487, Ei, fG), s.Qd = function(e) { + return u(e, 42).dd(); + }, w(an, "Maps/2", 698), b(962, 487, Ei, Jyn), s.Qd = function(e) { + return new wd(e, Zkn(this.a, e)); + }, w(an, "Maps/3", 962), b(959, 1971, gu, Evn), s.Jc = function(e) { + nie(this.a, e); + }, s.Kc = function() { + return this.a.kc(); + }, s.Rc = function() { + return this.a; + }, s.Nc = function() { + return this.a.lc(); + }, w(an, "Maps/IteratorBasedAbstractMap/1", 959), b(960, 1, {}, jvn), s.Od = function(e, t) { + this.a.td(e); + }, w(an, "Maps/KeySet/lambda$0$Type", 960), b(958, 28, Pb, e7n), s.$b = function() { + this.a.$b(); + }, s.Hc = function(e) { + return this.a.uc(e); + }, s.Jc = function(e) { + pe(e), this.a.wc(new gvn(e)); + }, s.dc = function() { + return this.a.dc(); + }, s.Kc = function() { + return new fG(this.a.vc().Kc()); + }, s.Mc = function(e) { + var t, i; + try { + return bb(this, e, !0); + } catch (r) { + if (r = Et(r), I(r, 41)) { + for (i = this.a.vc().Kc(); i.Ob(); ) + if (t = u(i.Pb(), 42), $f(e, t.dd())) + return this.a.Bc(t.cd()), !0; + return !1; + } else + throw T(r); + } + }, s.gc = function() { + return this.a.gc(); + }, w(an, "Maps/Values", 958), b(961, 1, {}, gvn), s.Od = function(e, t) { + this.a.td(t); + }, w(an, "Maps/Values/lambda$0$Type", 961), b(736, 1987, c0, xG), s.xc = function(e) { + return this.a._b(e) ? this.a.cc(e) : null; + }, s.Bc = function(e) { + return this.a._b(e) ? this.a.fc(e) : null; + }, s.$b = function() { + this.a.$b(); + }, s._b = function(e) { + return this.a._b(e); + }, s.Ec = function() { + return new wvn(this); + }, s.Dc = function() { + return this.Ec(); + }, s.dc = function() { + return this.a.dc(); + }, s.ec = function() { + return this.a.ec(); + }, s.gc = function() { + return this.a.ec().gc(); + }, w(an, "Multimaps/AsMap", 736), b(1104, 1971, gu, wvn), s.Kc = function() { + return pce(this.a.a.ec(), new pvn(this)); + }, s.Rc = function() { + return this.a; + }, s.Mc = function(e) { + var t; + return h$n(this, e) ? (t = u(e, 42), vie(this.a, t.cd()), !0) : !1; + }, w(an, "Multimaps/AsMap/EntrySet", 1104), b(1108, 1, {}, pvn), s.Kb = function(e) { + return Zkn(this, e); + }, s.Fb = function(e) { + return this === e; + }, w(an, "Multimaps/AsMap/EntrySet/1", 1108), b(543, 1989, { 543: 1, 835: 1, 20: 1, 28: 1, 14: 1 }, vvn), s.$b = function() { + QC(this.a); + }, s.Hc = function(e) { + return f8n(this.a, e); + }, s.Jc = function(e) { + pe(e), $i(x5(this.a), new kvn(e)); + }, s.Kc = function() { + return new _v(x5(this.a).a.kc()); + }, s.gc = function() { + return this.a.d; + }, s.Nc = function() { + return g8(x5(this.a).Nc(), new yu()); + }, w(an, "Multimaps/Keys", 543), b(1106, 1, {}, yu), s.Kb = function(e) { + return u(e, 42).cd(); + }, w(an, "Multimaps/Keys/0methodref$getKey$Type", 1106), b(1105, 487, Ei, x9n), s.Qd = function(e) { + return new mvn(u(e, 42)); + }, w(an, "Multimaps/Keys/1", 1105), b(1990, 1, { 416: 1 }), s.Fb = function(e) { + var t; + return I(e, 492) ? (t = u(e, 416), u(this.a.dd(), 14).gc() == u(t.a.dd(), 14).gc() && $f(this.a.cd(), t.a.cd())) : !1; + }, s.Hb = function() { + var e; + return e = this.a.cd(), (e == null ? 0 : kt(e)) ^ u(this.a.dd(), 14).gc(); + }, s.Ib = function() { + var e, t; + return t = y5(this.a.cd()), e = u(this.a.dd(), 14).gc(), e == 1 ? t : t + " x " + e; + }, w(an, "Multisets/AbstractEntry", 1990), b(492, 1990, { 492: 1, 416: 1 }, mvn), w(an, "Multimaps/Keys/1/1", 492), b(1107, 1, Yn, kvn), s.td = function(e) { + this.a.td(u(e, 42).cd()); + }, w(an, "Multimaps/Keys/lambda$1$Type", 1107), b(1110, 1, Yn, Ku), s.td = function(e) { + vfe(u(e, 416)); + }, w(an, "Multiset/lambda$0$Type", 1110), b(737, 1, Yn, yvn), s.td = function(e) { + x0e(this.a, u(e, 416)); + }, w(an, "Multiset/lambda$1$Type", 737), b(1111, 1, {}, Dv), w(an, "Multisets/0methodref$add$Type", 1111), b(738, 1, {}, G1), s.Kb = function(e) { + return Tae(u(e, 416)); + }, w(an, "Multisets/lambda$3$Type", 738), b(2008, 1, J7), w(an, "RangeGwtSerializationDependencies", 2008), b(514, 2008, { 169: 1, 514: 1, 3: 1, 45: 1 }, JQ), s.Lb = function(e) { + return ECn(this, u(e, 35)); + }, s.Mb = function(e) { + return ECn(this, u(e, 35)); + }, s.Fb = function(e) { + var t; + return I(e, 514) ? (t = u(e, 514), KQ(this.a, t.a) && KQ(this.b, t.b)) : !1; + }, s.Hb = function() { + return this.a.Hb() * 31 + this.b.Hb(); + }, s.Ib = function() { + return OAn(this.a, this.b); + }, w(an, "Range", 514), b(778, 1999, x6, FCn), s.Zc = function(e) { + return Qz(this.b, e); + }, s.Pd = function() { + return this.a; + }, s.Xb = function(e) { + return el(this.b, e); + }, s.Fd = function(e) { + return Qz(this.b, e); + }, w(an, "RegularImmutableAsList", 778), b(646, 2006, x6, JD), s.Hd = function() { + return this.a; + }, w(an, "RegularImmutableList", 646), b(616, 715, C4, GI), w(an, "RegularImmutableMap", 616), b(716, 703, T4, NG); + var lin; + w(an, "RegularImmutableSet", 716), b(1976, df, gu), s.Kc = function() { + return new HW(this.a, this.b); + }, s.Fc = function(e) { + throw T(new ye()); + }, s.Gc = function(e) { + throw T(new ye()); + }, s.$b = function() { + throw T(new ye()); + }, s.Mc = function(e) { + throw T(new ye()); + }, w(an, "Sets/SetView", 1976), b(963, 1976, gu, Z8n), s.Kc = function() { + return new HW(this.a, this.b); + }, s.Hc = function(e) { + return kD(this.a, e) && this.b.Hc(e); + }, s.Ic = function(e) { + return t7(this.a, e) && this.b.Ic(e); + }, s.dc = function() { + return V$n(this.b, this.a); + }, s.Lc = function() { + return pt(new $n(null, new xn(this.a, 1)), new Mvn(this.b)); + }, s.gc = function() { + return Z8(this); + }, s.Oc = function() { + return pt(new $n(null, new xn(this.a, 1)), new Tvn(this.b)); + }, w(an, "Sets/2", 963), b(700, 699, j4, HW), s.Yb = function() { + for (var e; Tz(this.a); ) + if (e = G5(this.a), this.c.Hc(e)) + return e; + return this.e = 2, null; + }, w(an, "Sets/2/1", 700), b(964, 1, Ve, Tvn), s.Mb = function(e) { + return this.a.Hc(e); + }, w(an, "Sets/2/4methodref$contains$Type", 964), b(965, 1, Ve, Mvn), s.Mb = function(e) { + return this.a.Hc(e); + }, w(an, "Sets/2/5methodref$contains$Type", 965), b(607, 1975, { 607: 1, 3: 1, 20: 1, 14: 1, 271: 1, 21: 1, 84: 1 }, nMn), s.Bd = function() { + return this.b; + }, s.Cd = function() { + return this.b; + }, s.Md = function() { + return this.b; + }, s.Jc = function(e) { + this.a.Jc(e); + }, s.Lc = function() { + return this.a.Lc(); + }, s.Oc = function() { + return this.a.Oc(); + }, w(an, "Sets/UnmodifiableNavigableSet", 607), b(1932, 1931, C4, oTn), s.Ld = function() { + return Df(), new u2(this.a); + }, s.Cc = function() { + return Df(), new u2(this.a); + }, s.pd = function() { + return Df(), new u2(this.a); + }, w(an, "SingletonImmutableBiMap", 1932), b(647, 2006, x6, pD), s.Hd = function() { + return this.a; + }, w(an, "SingletonImmutableList", 647), b(350, 1981, T4, u2), s.Kc = function() { + return new uq(this.a); + }, s.Hc = function(e) { + return tt(this.a, e); + }, s.Ed = function() { + return new uq(this.a); + }, s.gc = function() { + return 1; + }, w(an, "SingletonImmutableSet", 350), b(1115, 1, {}, Th), s.Kb = function(e) { + return u(e, 164); + }, w(an, "Streams/lambda$0$Type", 1115), b(1116, 1, DM, Avn), s.Vd = function() { + gde(this.a); + }, w(an, "Streams/lambda$1$Type", 1116), b(1659, 1658, $a, UTn), s.Zb = function() { + var e; + return e = this.f, u(u(e || (this.f = I(this.c, 171) ? new mE(this, u(this.c, 171)) : I(this.c, 161) ? new f8(this, u(this.c, 161)) : new Jp(this, this.c)), 161), 171); + }, s.hc = function() { + return new Y1(this.b); + }, s.gd = function() { + return new Y1(this.b); + }, s.ec = function() { + var e; + return e = this.i, u(u(e || (this.i = I(this.c, 171) ? new Qp(this, u(this.c, 171)) : I(this.c, 161) ? new R9(this, u(this.c, 161)) : new Sw(this, this.c)), 84), 271); + }, s.ac = function() { + return I(this.c, 171) ? new mE(this, u(this.c, 171)) : I(this.c, 161) ? new f8(this, u(this.c, 161)) : new Jp(this, this.c); + }, s.ic = function(e) { + return e == null && this.a.ue(e, e), new Y1(this.b); + }, w(an, "TreeMultimap", 1659), b(78, 1, { 3: 1, 78: 1 }), s.Wd = function(e) { + return new Error(e); + }, s.Xd = function() { + return this.e; + }, s.Yd = function() { + return P2e(Xc(ID((this.k == null && (this.k = F(hR, q, 78, 0, 0, 1)), this.k)), new cln())); + }, s.Zd = function() { + return this.f; + }, s.$d = function() { + return this.g; + }, s._d = function() { + cie(this, fae(this.Wd(YD(this, this.g)))), Kmn(this); + }, s.Ib = function() { + return YD(this, this.$d()); + }, s.e = Z_n, s.i = !1, s.n = !0; + var hR = w(Ur, "Throwable", 78); + b(102, 78, { 3: 1, 102: 1, 78: 1 }), w(Ur, "Exception", 102), b(60, 102, Uh, ra, _r), w(Ur, "RuntimeException", 60), b(598, 60, Uh), w(Ur, "JsException", 598), b(863, 598, Uh), w(ek, "JavaScriptExceptionBase", 863), b(477, 863, { 477: 1, 3: 1, 102: 1, 60: 1, 78: 1 }, CDn), s.$d = function() { + return Y4e(this), this.c; + }, s.ae = function() { + return B(this.b) === B(ain) ? null : this.b; + }; + var ain; + w(QZ, "JavaScriptException", 477); + var bzn = w(QZ, "JavaScriptObject$", 0), lR; + b(1948, 1, {}), w(QZ, "Scheduler", 1948); + var _A = 0, wzn = 0, KA = -1; + b(890, 1948, {}, Q1n); + var din; + w(ek, "SchedulerImpl", 890); + var aR; + b(1960, 1, {}), w(ek, "StackTraceCreator/Collector", 1960), b(864, 1960, {}, J1n), s.be = function(e) { + var t = {}, i = []; + e[PL] = i; + for (var r = arguments.callee.caller; r; ) { + var c = (m3(), r.name || (r.name = J0e(r.toString()))); + i.push(c); + var o = ":" + c, f = t[o]; + if (f) { + var h, l; + for (h = 0, l = f.length; h < l; h++) + if (f[h] === r) + return; + } + (f || (t[o] = [])).push(r), r = r.caller; + } + }, s.ce = function(e) { + var t, i, r, c; + for (r = (m3(), e && e[PL] ? e[PL] : []), i = r.length, c = F(Ain, q, 310, i, 0, 1), t = 0; t < i; t++) + c[t] = new qD(r[t], null, -1); + return c; + }, w(ek, "StackTraceCreator/CollectorLegacy", 864), b(1961, 1960, {}), s.be = function(e) { + }, s.de = function(e, t, i, r) { + return new qD(t, e + "@" + r, i < 0 ? -1 : i); + }, s.ce = function(e) { + var t, i, r, c, o, f; + if (c = C3e(e), o = F(Ain, q, 310, 0, 0, 1), t = 0, r = c.length, r == 0) + return o; + for (f = xRn(this, c[0]), An(f.d, SL) || (o[t++] = f), i = 1; i < r; i++) + o[t++] = xRn(this, c[i]); + return o; + }, w(ek, "StackTraceCreator/CollectorModern", 1961), b(865, 1961, {}, Ch), s.de = function(e, t, i, r) { + return new qD(t, e, -1); + }, w(ek, "StackTraceCreator/CollectorModernNoSourceMap", 865), b(1050, 1, {}), w(YZ, tKn, 1050), b(615, 1050, { 615: 1 }, QCn); + var bin; + w(XL, tKn, 615), b(2001, 1, {}), w(YZ, iKn, 2001), b(2002, 2001, {}), w(XL, iKn, 2002), b(1090, 1, {}, q1); + var dm; + w(XL, "LocaleInfo", 1090), b(1918, 1, {}, t1), s.a = 0, w(XL, "TimeZone", 1918), b(1258, 2002, {}, nr), w("com.google.gwt.i18n.client.impl.cldr", "DateTimeFormatInfoImpl", 1258), b(434, 1, { 434: 1 }, MEn), s.a = !1, s.b = 0, w(YZ, "DateTimeFormat/PatternPart", 434), b(199, 1, rKn, Tj, _V, uU), s.wd = function(e) { + return uae(this, u(e, 199)); + }, s.Fb = function(e) { + return I(e, 199) && pd(eu(this.q.getTime()), eu(u(e, 199).q.getTime())); + }, s.Hb = function() { + var e; + return e = eu(this.q.getTime()), ge(h$(e, Y0(e, 32))); + }, s.Ib = function() { + var e, t, i; + return i = -this.q.getTimezoneOffset(), e = (i >= 0 ? "+" : "") + (i / 60 | 0), t = tE(j.Math.abs(i) % 60), (wxn(), Tzn)[this.q.getDay()] + " " + Mzn[this.q.getMonth()] + " " + tE(this.q.getDate()) + " " + tE(this.q.getHours()) + ":" + tE(this.q.getMinutes()) + ":" + tE(this.q.getSeconds()) + " GMT" + e + t + " " + this.q.getFullYear(); + }; + var HA = w(fe, "Date", 199); + b(1915, 199, rKn, HFn), s.a = !1, s.b = 0, s.c = 0, s.d = 0, s.e = 0, s.f = 0, s.g = !1, s.i = 0, s.j = 0, s.k = 0, s.n = 0, s.o = 0, s.p = 0, w("com.google.gwt.i18n.shared.impl", "DateRecord", 1915), b(1966, 1, {}), s.fe = function() { + return null; + }, s.ge = function() { + return null; + }, s.he = function() { + return null; + }, s.ie = function() { + return null; + }, s.je = function() { + return null; + }, w(Q2, "JSONValue", 1966), b(216, 1966, { 216: 1 }, ea, sq), s.Fb = function(e) { + return I(e, 216) ? uX(this.a, u(e, 216).a) : !1; + }, s.ee = function() { + return Rte; + }, s.Hb = function() { + return WW(this.a); + }, s.fe = function() { + return this; + }, s.Ib = function() { + var e, t, i; + for (i = new Yu("["), t = 0, e = this.a.length; t < e; t++) + t > 0 && (i.a += ","), rc(i, sb(this, t)); + return i.a += "]", i.a; + }, w(Q2, "JSONArray", 216), b(483, 1966, { 483: 1 }, oq), s.ee = function() { + return _te; + }, s.ge = function() { + return this; + }, s.Ib = function() { + return qn(), "" + this.a; + }, s.a = !1; + var gzn, pzn; + w(Q2, "JSONBoolean", 483), b(985, 60, Uh, L9n), w(Q2, "JSONException", 985), b(1023, 1966, {}, Zl), s.ee = function() { + return zte; + }, s.Ib = function() { + return iu; + }; + var vzn; + w(Q2, "JSONNull", 1023), b(258, 1966, { 258: 1 }, nj), s.Fb = function(e) { + return I(e, 258) ? this.a == u(e, 258).a : !1; + }, s.ee = function() { + return Kte; + }, s.Hb = function() { + return t3(this.a); + }, s.he = function() { + return this; + }, s.Ib = function() { + return this.a + ""; + }, s.a = 0, w(Q2, "JSONNumber", 258), b(183, 1966, { 183: 1 }, r2, M9), s.Fb = function(e) { + return I(e, 183) ? uX(this.a, u(e, 183).a) : !1; + }, s.ee = function() { + return Hte; + }, s.Hb = function() { + return WW(this.a); + }, s.ie = function() { + return this; + }, s.Ib = function() { + var e, t, i, r, c, o, f; + for (f = new Yu("{"), e = !0, o = Z$(this, F(tn, q, 2, 0, 6, 1)), i = o, r = 0, c = i.length; r < c; ++r) + t = i[r], e ? e = !1 : f.a += Qi, De(f, $Ln(t)), f.a += ":", rc(f, Dh(this, t)); + return f.a += "}", f.a; + }, w(Q2, "JSONObject", 183), b(596, df, gu, iO), s.Hc = function(e) { + return yi(e) && Cie(this.a, Ce(e)); + }, s.Kc = function() { + return new $v(new Hu(this.b)); + }, s.gc = function() { + return this.b.length; + }, w(Q2, "JSONObject/1", 596); + var dR; + b(204, 1966, { 204: 1 }, nb), s.Fb = function(e) { + return I(e, 204) ? An(this.a, u(e, 204).a) : !1; + }, s.ee = function() { + return qte; + }, s.Hb = function() { + return k1(this.a); + }, s.je = function() { + return this; + }, s.Ib = function() { + return $Ln(this.a); + }, w(Q2, "JSONString", 204); + var Il, win, mzn, gin, pin; + b(1962, 1, { 525: 1 }), w(ZZ, "OutputStream", 1962), b(1963, 1962, { 525: 1 }), w(ZZ, "FilterOutputStream", 1963), b(866, 1963, { 525: 1 }, tln), w(ZZ, "PrintStream", 866), b(418, 1, { 475: 1 }), s.Ib = function() { + return this.a; + }, w(Ur, "AbstractStringBuilder", 418), b(529, 60, Uh, bj), w(Ur, "ArithmeticException", 529), b(73, 60, VL, Kq, mr), w(Ur, "IndexOutOfBoundsException", 73), b(320, 73, { 3: 1, 320: 1, 102: 1, 73: 1, 60: 1, 78: 1 }, qq, bG), w(Ur, "ArrayIndexOutOfBoundsException", 320), b(528, 60, Uh, xI, R9n), w(Ur, "ArrayStoreException", 528), b(289, 78, cKn, UI), w(Ur, "Error", 289), b(194, 289, cKn, _q, EX), w(Ur, "AssertionError", 194), uzn = { 3: 1, 476: 1, 35: 1 }; + var Ga, G4, oi = w(Ur, "Boolean", 476); + b(236, 1, { 3: 1, 236: 1 }); + var vin; + w(Ur, "Number", 236), b(217, 236, { 3: 1, 217: 1, 35: 1, 236: 1 }, Dvn), s.wd = function(e) { + return yie(this, u(e, 217)); + }, s.ke = function() { + return this.a; + }, s.Fb = function(e) { + return I(e, 217) && u(e, 217).a == this.a; + }, s.Hb = function() { + return this.a; + }, s.Ib = function() { + return "" + this.a; + }, s.a = 0; + var op = w(Ur, "Byte", 217), min; + b(172, 1, { 3: 1, 172: 1, 35: 1 }, wq), s.wd = function(e) { + return jie(this, u(e, 172)); + }, s.Fb = function(e) { + return I(e, 172) && u(e, 172).a == this.a; + }, s.Hb = function() { + return this.a; + }, s.Ib = function() { + return String.fromCharCode(this.a); + }, s.a = 0; + var kin, bm = w(Ur, "Character", 172), yin; + b(205, 60, { 3: 1, 205: 1, 102: 1, 60: 1, 78: 1 }, Hmn, zp), w(Ur, "ClassCastException", 205), szn = { 3: 1, 35: 1, 333: 1, 236: 1 }; + var Si = w(Ur, "Double", 333); + b(155, 236, { 3: 1, 35: 1, 155: 1, 236: 1 }, S9, Gq), s.wd = function(e) { + return Ire(this, u(e, 155)); + }, s.ke = function() { + return this.a; + }, s.Fb = function(e) { + return I(e, 155) && Zjn(this.a, u(e, 155).a); + }, s.Hb = function() { + return Gt(this.a); + }, s.Ib = function() { + return "" + this.a; + }, s.a = 0; + var z4 = w(Ur, "Float", 155); + b(32, 60, { 3: 1, 102: 1, 32: 1, 60: 1, 78: 1 }, F9, Hn, gDn), w(Ur, "IllegalArgumentException", 32), b(71, 60, Uh, ou, $r), w(Ur, "IllegalStateException", 71), b(19, 236, { 3: 1, 35: 1, 19: 1, 236: 1 }, gq), s.wd = function(e) { + return Ore(this, u(e, 19)); + }, s.ke = function() { + return this.a; + }, s.Fb = function(e) { + return I(e, 19) && u(e, 19).a == this.a; + }, s.Hb = function() { + return this.a; + }, s.Ib = function() { + return "" + this.a; + }, s.a = 0; + var Ui = w(Ur, "Integer", 19), jin, kzn; + b(162, 236, { 3: 1, 35: 1, 162: 1, 236: 1 }, pq), s.wd = function(e) { + return Dre(this, u(e, 162)); + }, s.ke = function() { + return Fd(this.a); + }, s.Fb = function(e) { + return I(e, 162) && pd(u(e, 162).a, this.a); + }, s.Hb = function() { + return ge(this.a); + }, s.Ib = function() { + return "" + O5(this.a); + }, s.a = 0; + var d0 = w(Ur, "Long", 162), Ein; + b(2039, 1, {}), b(1831, 60, Uh, K9n), w(Ur, "NegativeArraySizeException", 1831), b(173, 598, { 3: 1, 102: 1, 173: 1, 60: 1, 78: 1 }, Nv, c2), s.Wd = function(e) { + return new TypeError(e); + }, w(Ur, "NullPointerException", 173); + var Cin, bR, yzn, Tin; + b(127, 32, { 3: 1, 102: 1, 32: 1, 127: 1, 60: 1, 78: 1 }, Sf), w(Ur, "NumberFormatException", 127), b(184, 236, { 3: 1, 35: 1, 236: 1, 184: 1 }, vq), s.wd = function(e) { + return Eie(this, u(e, 184)); + }, s.ke = function() { + return this.a; + }, s.Fb = function(e) { + return I(e, 184) && u(e, 184).a == this.a; + }, s.Hb = function() { + return this.a; + }, s.Ib = function() { + return "" + this.a; + }, s.a = 0; + var b0 = w(Ur, "Short", 184), Min; + b(310, 1, { 3: 1, 310: 1 }, qD), s.Fb = function(e) { + var t; + return I(e, 310) ? (t = u(e, 310), this.c == t.c && this.d == t.d && this.a == t.a && this.b == t.b) : !1; + }, s.Hb = function() { + return gT(A(M(Zn, 1), rn, 1, 5, [Q(this.c), this.a, this.d, this.b])); + }, s.Ib = function() { + return this.a + "." + this.d + "(" + (this.b != null ? this.b : "Unknown Source") + (this.c >= 0 ? ":" + this.c : "") + ")"; + }, s.c = 0; + var Ain = w(Ur, "StackTraceElement", 310); + ozn = { 3: 1, 475: 1, 35: 1, 2: 1 }; + var tn = w(Ur, VZ, 2); + b(107, 418, { 475: 1 }, r1, zv, Bs), w(Ur, "StringBuffer", 107), b(100, 418, { 475: 1 }, V1, _0, Yu), w(Ur, "StringBuilder", 100), b(687, 73, VL, wG), w(Ur, "StringIndexOutOfBoundsException", 687), b(2043, 1, {}); + var Sin; + b(844, 1, {}, cln), s.Kb = function(e) { + return u(e, 78).e; + }, w(Ur, "Throwable/lambda$0$Type", 844), b(41, 60, { 3: 1, 102: 1, 60: 1, 78: 1, 41: 1 }, ye, i1), w(Ur, "UnsupportedOperationException", 41), b(240, 236, { 3: 1, 35: 1, 236: 1, 240: 1 }, W8, CG), s.wd = function(e) { + return VBn(this, u(e, 240)); + }, s.ke = function() { + return yb(ORn(this)); + }, s.Fb = function(e) { + var t; + return this === e ? !0 : I(e, 240) ? (t = u(e, 240), this.e == t.e && VBn(this, t) == 0) : !1; + }, s.Hb = function() { + var e; + return this.b != 0 ? this.b : this.a < 54 ? (e = eu(this.f), this.b = ge(ui(e, -1)), this.b = 33 * this.b + ge(ui(cl(e, 32), -1)), this.b = 17 * this.b + Gt(this.e), this.b) : (this.b = 17 * PDn(this.c) + Gt(this.e), this.b); + }, s.Ib = function() { + return ORn(this); + }, s.a = 0, s.b = 0, s.d = 0, s.e = 0, s.f = 0; + var jzn, za, Pin, Iin, Oin, Din, $in, Fin, wR = w("java.math", "BigDecimal", 240); + b(91, 236, { 3: 1, 35: 1, 236: 1, 91: 1 }, VQ, a1, Pw, OJ, D$n, il), s.wd = function(e) { + return A$n(this, u(e, 91)); + }, s.ke = function() { + return yb(jL(this, 0)); + }, s.Fb = function(e) { + return SQ(this, e); + }, s.Hb = function() { + return PDn(this); + }, s.Ib = function() { + return jL(this, 0); + }, s.b = -2, s.c = 0, s.d = 0, s.e = 0; + var gR, qA, xin, pR, GA, U4, vg = w("java.math", "BigInteger", 91), Ezn, Czn, fp, wm; + b(488, 1967, c0), s.$b = function() { + Eu(this); + }, s._b = function(e) { + return Uu(this, e); + }, s.uc = function(e) { + return dDn(this, e, this.g) || dDn(this, e, this.f); + }, s.vc = function() { + return new ia(this); + }, s.xc = function(e) { + return te(this, e); + }, s.zc = function(e, t) { + return it(this, e, t); + }, s.Bc = function(e) { + return O2(this, e); + }, s.gc = function() { + return Xv(this); + }, w(fe, "AbstractHashMap", 488), b(261, df, gu, ia), s.$b = function() { + this.a.$b(); + }, s.Hc = function(e) { + return lAn(this, e); + }, s.Kc = function() { + return new Ca(this.a); + }, s.Mc = function(e) { + var t; + return lAn(this, e) ? (t = u(e, 42).cd(), this.a.Bc(t), !0) : !1; + }, s.gc = function() { + return this.a.gc(); + }, w(fe, "AbstractHashMap/EntrySet", 261), b(262, 1, Ei, Ca), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return Bd(this); + }, s.Ob = function() { + return this.b; + }, s.Qb = function() { + oPn(this); + }, s.b = !1, w(fe, "AbstractHashMap/EntrySetIterator", 262), b(417, 1, Ei, $v), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return G9(this); + }, s.Pb = function() { + return $Tn(this); + }, s.Qb = function() { + Wu(this); + }, s.b = 0, s.c = -1, w(fe, "AbstractList/IteratorImpl", 417), b(96, 417, hh, Ii), s.Qb = function() { + Wu(this); + }, s.Rb = function(e) { + V0(this, e); + }, s.Sb = function() { + return this.b > 0; + }, s.Tb = function() { + return this.b; + }, s.Ub = function() { + return ne(this.b > 0), this.a.Xb(this.c = --this.b); + }, s.Vb = function() { + return this.b - 1; + }, s.Wb = function(e) { + U0(this.c != -1), this.a._c(this.c, e); + }, w(fe, "AbstractList/ListIteratorImpl", 96), b(219, 52, M4, ch), s.Vc = function(e, t) { + ib(e, this.b), this.c.Vc(this.a + e, t), ++this.b; + }, s.Xb = function(e) { + return Ln(e, this.b), this.c.Xb(this.a + e); + }, s.$c = function(e) { + var t; + return Ln(e, this.b), t = this.c.$c(this.a + e), --this.b, t; + }, s._c = function(e, t) { + return Ln(e, this.b), this.c._c(this.a + e, t); + }, s.gc = function() { + return this.b; + }, s.a = 0, s.b = 0, w(fe, "AbstractList/SubList", 219), b(384, df, gu, Bp), s.$b = function() { + this.a.$b(); + }, s.Hc = function(e) { + return this.a._b(e); + }, s.Kc = function() { + var e; + return e = this.a.vc().Kc(), new bq(e); + }, s.Mc = function(e) { + return this.a._b(e) ? (this.a.Bc(e), !0) : !1; + }, s.gc = function() { + return this.a.gc(); + }, w(fe, "AbstractMap/1", 384), b(691, 1, Ei, bq), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.a.Ob(); + }, s.Pb = function() { + var e; + return e = u(this.a.Pb(), 42), e.cd(); + }, s.Qb = function() { + this.a.Qb(); + }, w(fe, "AbstractMap/1/1", 691), b(226, 28, Pb, Mh), s.$b = function() { + this.a.$b(); + }, s.Hc = function(e) { + return this.a.uc(e); + }, s.Kc = function() { + var e; + return e = this.a.vc().Kc(), new N0(e); + }, s.gc = function() { + return this.a.gc(); + }, w(fe, "AbstractMap/2", 226), b(294, 1, Ei, N0), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.a.Ob(); + }, s.Pb = function() { + var e; + return e = u(this.a.Pb(), 42), e.dd(); + }, s.Qb = function() { + this.a.Qb(); + }, w(fe, "AbstractMap/2/1", 294), b(484, 1, { 484: 1, 42: 1 }), s.Fb = function(e) { + var t; + return I(e, 42) ? (t = u(e, 42), vc(this.d, t.cd()) && vc(this.e, t.dd())) : !1; + }, s.cd = function() { + return this.d; + }, s.dd = function() { + return this.e; + }, s.Hb = function() { + return Tw(this.d) ^ Tw(this.e); + }, s.ed = function(e) { + return gU(this, e); + }, s.Ib = function() { + return this.d + "=" + this.e; + }, w(fe, "AbstractMap/AbstractEntry", 484), b(383, 484, { 484: 1, 383: 1, 42: 1 }, Nj), w(fe, "AbstractMap/SimpleEntry", 383), b(1984, 1, ZL), s.Fb = function(e) { + var t; + return I(e, 42) ? (t = u(e, 42), vc(this.cd(), t.cd()) && vc(this.dd(), t.dd())) : !1; + }, s.Hb = function() { + return Tw(this.cd()) ^ Tw(this.dd()); + }, s.Ib = function() { + return this.cd() + "=" + this.dd(); + }, w(fe, U_n, 1984), b(1992, 1967, G_n), s.tc = function(e) { + return mSn(this, e); + }, s._b = function(e) { + return cD(this, e); + }, s.vc = function() { + return new mq(this); + }, s.xc = function(e) { + var t; + return t = e, Vr(VV(this, t)); + }, s.ec = function() { + return new P9(this); + }, w(fe, "AbstractNavigableMap", 1992), b(739, df, gu, mq), s.Hc = function(e) { + return I(e, 42) && mSn(this.b, u(e, 42)); + }, s.Kc = function() { + return new T5(this.b); + }, s.Mc = function(e) { + var t; + return I(e, 42) ? (t = u(e, 42), uPn(this.b, t)) : !1; + }, s.gc = function() { + return this.b.c; + }, w(fe, "AbstractNavigableMap/EntrySet", 739), b(493, df, WZ, P9), s.Nc = function() { + return new xj(this); + }, s.$b = function() { + Kv(this.a); + }, s.Hc = function(e) { + return cD(this.a, e); + }, s.Kc = function() { + var e; + return e = new T5(new j5(this.a).b), new I9(e); + }, s.Mc = function(e) { + return cD(this.a, e) ? (R5(this.a, e), !0) : !1; + }, s.gc = function() { + return this.a.c; + }, w(fe, "AbstractNavigableMap/NavigableKeySet", 493), b(494, 1, Ei, I9), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return G9(this.a.a); + }, s.Pb = function() { + var e; + return e = pE(this.a), e.cd(); + }, s.Qb = function() { + fEn(this.a); + }, w(fe, "AbstractNavigableMap/NavigableKeySet/1", 494), b(2004, 28, Pb), s.Fc = function(e) { + return T3(o4(this, e)), !0; + }, s.Gc = function(e) { + return _n(e), TE(e != this, "Can't add a queue to itself"), Xi(this, e); + }, s.$b = function() { + for (; K$(this) != null; ) + ; + }, w(fe, "AbstractQueue", 2004), b(302, 28, { 4: 1, 20: 1, 28: 1, 14: 1 }, gw, LMn), s.Fc = function(e) { + return bX(this, e), !0; + }, s.$b = function() { + kX(this); + }, s.Hc = function(e) { + return LOn(new B5(this), e); + }, s.dc = function() { + return Hv(this); + }, s.Kc = function() { + return new B5(this); + }, s.Mc = function(e) { + return ele(new B5(this), e); + }, s.gc = function() { + return this.c - this.b & this.a.length - 1; + }, s.Nc = function() { + return new xn(this, 272); + }, s.Qc = function(e) { + var t; + return t = this.c - this.b & this.a.length - 1, e.length < t && (e = pj(new Array(t), e)), XIn(this, e, t), e.length > t && St(e, t, null), e; + }, s.b = 0, s.c = 0, w(fe, "ArrayDeque", 302), b(446, 1, Ei, B5), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.a != this.b; + }, s.Pb = function() { + return vT(this); + }, s.Qb = function() { + FIn(this); + }, s.a = 0, s.b = 0, s.c = -1, w(fe, "ArrayDeque/IteratorImpl", 446), b(12, 52, sKn, X, Ic, au), s.Vc = function(e, t) { + J0(this, e, t); + }, s.Fc = function(e) { + return W(this, e); + }, s.Wc = function(e, t) { + return eQ(this, e, t); + }, s.Gc = function(e) { + return Zt(this, e); + }, s.$b = function() { + this.c = F(Zn, rn, 1, 0, 5, 1); + }, s.Hc = function(e) { + return xr(this, e, 0) != -1; + }, s.Jc = function(e) { + Yc(this, e); + }, s.Xb = function(e) { + return un(this, e); + }, s.Xc = function(e) { + return xr(this, e, 0); + }, s.dc = function() { + return this.c.length == 0; + }, s.Kc = function() { + return new E(this); + }, s.$c = function(e) { + return l1(this, e); + }, s.Mc = function(e) { + return Qc(this, e); + }, s.Ud = function(e, t) { + xMn(this, e, t); + }, s._c = function(e, t) { + return Es(this, e, t); + }, s.gc = function() { + return this.c.length; + }, s.ad = function(e) { + wi(this, e); + }, s.Pc = function() { + return XO(this); + }, s.Qc = function(e) { + return lf(this, e); + }; + var RTe = w(fe, "ArrayList", 12); + b(7, 1, Ei, E), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return Kr(this); + }, s.Pb = function() { + return y(this); + }, s.Qb = function() { + F5(this); + }, s.a = 0, s.b = -1, w(fe, "ArrayList/1", 7), b(2013, j.Function, {}, zy), s.te = function(e, t) { + return ni(e, t); + }, b(154, 52, oKn, Hu), s.Hc = function(e) { + return LIn(this, e) != -1; + }, s.Jc = function(e) { + var t, i, r, c; + for (_n(e), i = this.a, r = 0, c = i.length; r < c; ++r) + t = i[r], e.td(t); + }, s.Xb = function(e) { + return ZEn(this, e); + }, s._c = function(e, t) { + var i; + return i = (Ln(e, this.a.length), this.a[e]), St(this.a, e, t), i; + }, s.gc = function() { + return this.a.length; + }, s.ad = function(e) { + mD(this.a, this.a.length, e); + }, s.Pc = function() { + return _$n(this, F(Zn, rn, 1, this.a.length, 5, 1)); + }, s.Qc = function(e) { + return _$n(this, e); + }, w(fe, "Arrays/ArrayList", 154); + var cr, ph, zA; + b(940, 52, oKn, Z1n), s.Hc = function(e) { + return !1; + }, s.Xb = function(e) { + return wz(e); + }, s.Kc = function() { + return Pn(), Yp(), W4; + }, s.Yc = function() { + return Pn(), Yp(), W4; + }, s.gc = function() { + return 0; + }, w(fe, "Collections/EmptyList", 940), b(941, 1, hh, nln), s.Nb = function(e) { + Oi(this, e); + }, s.Rb = function(e) { + throw T(new ye()); + }, s.Ob = function() { + return !1; + }, s.Sb = function() { + return !1; + }, s.Pb = function() { + throw T(new ic()); + }, s.Tb = function() { + return 0; + }, s.Ub = function() { + throw T(new ic()); + }, s.Vb = function() { + return -1; + }, s.Qb = function() { + throw T(new ou()); + }, s.Wb = function(e) { + throw T(new ou()); + }; + var W4; + w(fe, "Collections/EmptyListIterator", 941), b(943, 1967, C4, eln), s._b = function(e) { + return !1; + }, s.uc = function(e) { + return !1; + }, s.vc = function() { + return Pn(), zA; + }, s.xc = function(e) { + return null; + }, s.ec = function() { + return Pn(), zA; + }, s.gc = function() { + return 0; + }, s.Cc = function() { + return Pn(), cr; + }, w(fe, "Collections/EmptyMap", 943), b(942, df, T4, Y1n), s.Hc = function(e) { + return !1; + }, s.Kc = function() { + return Pn(), Yp(), W4; + }, s.gc = function() { + return 0; + }, w(fe, "Collections/EmptySet", 942), b(599, 52, { 3: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1 }, OI), s.Hc = function(e) { + return vc(this.a, e); + }, s.Xb = function(e) { + return Ln(e, 1), this.a; + }, s.gc = function() { + return 1; + }, w(fe, "Collections/SingletonList", 599), b(372, 1, V_n, Rp), s.Jc = function(e) { + $i(this, e); + }, s.Lc = function() { + return new $n(null, this.Nc()); + }, s.Nc = function() { + return new xn(this, 0); + }, s.Oc = function() { + return new $n(null, this.Nc()); + }, s.Fc = function(e) { + return b8n(); + }, s.Gc = function(e) { + return w8n(); + }, s.$b = function() { + g8n(); + }, s.Hc = function(e) { + return _9(this, e); + }, s.Ic = function(e) { + return i7n(this, e); + }, s.dc = function() { + return this.b.dc(); + }, s.Kc = function() { + return new _p(this.b.Kc()); + }, s.Mc = function(e) { + return p8n(); + }, s.gc = function() { + return this.b.gc(); + }, s.Pc = function() { + return this.b.Pc(); + }, s.Qc = function(e) { + return r7n(this, e); + }, s.Ib = function() { + return Nr(this.b); + }, w(fe, "Collections/UnmodifiableCollection", 372), b(371, 1, Ei, _p), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.b.Ob(); + }, s.Pb = function() { + return this.b.Pb(); + }, s.Qb = function() { + v8n(); + }, w(fe, "Collections/UnmodifiableCollectionIterator", 371), b(531, 372, fKn, lE), s.Nc = function() { + return new xn(this, 16); + }, s.Vc = function(e, t) { + throw T(new ye()); + }, s.Wc = function(e, t) { + throw T(new ye()); + }, s.Fb = function(e) { + return tt(this.a, e); + }, s.Xb = function(e) { + return this.a.Xb(e); + }, s.Hb = function() { + return kt(this.a); + }, s.Xc = function(e) { + return this.a.Xc(e); + }, s.dc = function() { + return this.a.dc(); + }, s.Yc = function() { + return new Kz(this.a.Zc(0)); + }, s.Zc = function(e) { + return new Kz(this.a.Zc(e)); + }, s.$c = function(e) { + throw T(new ye()); + }, s._c = function(e, t) { + throw T(new ye()); + }, s.ad = function(e) { + throw T(new ye()); + }, s.bd = function(e, t) { + return new lE(this.a.bd(e, t)); + }, w(fe, "Collections/UnmodifiableList", 531), b(690, 371, hh, Kz), s.Qb = function() { + v8n(); + }, s.Rb = function(e) { + throw T(new ye()); + }, s.Sb = function() { + return this.a.Sb(); + }, s.Tb = function() { + return this.a.Tb(); + }, s.Ub = function() { + return this.a.Ub(); + }, s.Vb = function() { + return this.a.Vb(); + }, s.Wb = function(e) { + throw T(new ye()); + }, w(fe, "Collections/UnmodifiableListIterator", 690), b(600, 1, c0, DI), s.wc = function(e) { + n6(this, e); + }, s.yc = function(e, t, i) { + return IF(this, e, t, i); + }, s.$b = function() { + throw T(new ye()); + }, s._b = function(e) { + return this.c._b(e); + }, s.uc = function(e) { + return u7n(this, e); + }, s.vc = function() { + return g3(this); + }, s.Fb = function(e) { + return s7n(this, e); + }, s.xc = function(e) { + return this.c.xc(e); + }, s.Hb = function() { + return kt(this.c); + }, s.dc = function() { + return this.c.dc(); + }, s.ec = function() { + return bTn(this); + }, s.zc = function(e, t) { + throw T(new ye()); + }, s.Bc = function(e) { + throw T(new ye()); + }, s.gc = function() { + return this.c.gc(); + }, s.Ib = function() { + return Nr(this.c); + }, s.Cc = function() { + return dTn(this); + }, w(fe, "Collections/UnmodifiableMap", 600), b(382, 372, ML, Up), s.Nc = function() { + return new xn(this, 1); + }, s.Fb = function(e) { + return tt(this.b, e); + }, s.Hb = function() { + return kt(this.b); + }, w(fe, "Collections/UnmodifiableSet", 382), b(944, 382, ML, W9n), s.Hc = function(e) { + return c7n(this, e); + }, s.Ic = function(e) { + return this.b.Ic(e); + }, s.Kc = function() { + var e; + return e = this.b.Kc(), new $vn(e); + }, s.Pc = function() { + var e; + return e = this.b.Pc(), _An(e, e.length), e; + }, s.Qc = function(e) { + return VTn(this, e); + }, w(fe, "Collections/UnmodifiableMap/UnmodifiableEntrySet", 944), b(945, 1, Ei, $vn), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return new kq(u(this.a.Pb(), 42)); + }, s.Ob = function() { + return this.a.Ob(); + }, s.Qb = function() { + throw T(new ye()); + }, w(fe, "Collections/UnmodifiableMap/UnmodifiableEntrySet/1", 945), b(688, 1, ZL, kq), s.Fb = function(e) { + return this.a.Fb(e); + }, s.cd = function() { + return this.a.cd(); + }, s.dd = function() { + return this.a.dd(); + }, s.Hb = function() { + return this.a.Hb(); + }, s.ed = function(e) { + throw T(new ye()); + }, s.Ib = function() { + return Nr(this.a); + }, w(fe, "Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry", 688), b(601, 531, { 20: 1, 14: 1, 15: 1, 54: 1 }, ZI), w(fe, "Collections/UnmodifiableRandomAccessList", 601), b(689, 382, Q_n, Hz), s.Nc = function() { + return new xj(this); + }, s.Fb = function(e) { + return tt(this.a, e); + }, s.Hb = function() { + return kt(this.a); + }, w(fe, "Collections/UnmodifiableSortedSet", 689), b(847, 1, nN, uln), s.ue = function(e, t) { + var i; + return i = KAn(u(e, 11), u(t, 11)), i != 0 ? i : QBn(u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(fe, "Comparator/lambda$0$Type", 847); + var Lin, Nin, Bin; + b(751, 1, nN, DH), s.ue = function(e, t) { + return kfe(u(e, 35), u(t, 35)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return Ow(), Bin; + }, w(fe, "Comparators/NaturalOrderComparator", 751), b(1177, 1, nN, sln), s.ue = function(e, t) { + return yfe(u(e, 35), u(t, 35)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return Ow(), Nin; + }, w(fe, "Comparators/ReverseNaturalOrderComparator", 1177), b(64, 1, nN, ut), s.Fb = function(e) { + return this === e; + }, s.ue = function(e, t) { + return this.a.ue(t, e); + }, s.ve = function() { + return this.a; + }, w(fe, "Comparators/ReversedComparator", 64), b(166, 60, Uh, vs), w(fe, "ConcurrentModificationException", 166); + var Tzn, Mzn; + b(1904, 1, ck, oln), s.we = function(e) { + d$n(this, e); + }, s.Ib = function() { + return "DoubleSummaryStatistics[count = " + O5(this.a) + ", avg = " + (A7n(this.a, 0) ? CSn(this) / Fd(this.a) : 0) + ", min = " + this.c + ", max = " + this.b + ", sum = " + CSn(this) + "]"; + }, s.a = 0, s.b = Vt, s.c = Lt, s.d = 0, s.e = 0, s.f = 0, w(fe, "DoubleSummaryStatistics", 1904), b(1805, 60, Uh, qmn), w(fe, "EmptyStackException", 1805), b(451, 1967, c0, f6), s.zc = function(e, t) { + return wU(this, e, t); + }, s.$b = function() { + rTn(this); + }, s._b = function(e) { + return M7n(this, e); + }, s.uc = function(e) { + var t, i; + for (i = new o2(this.a); i.a < i.c.a.length; ) + if (t = G5(i), vc(e, this.b[t.g])) + return !0; + return !1; + }, s.vc = function() { + return new xvn(this); + }, s.xc = function(e) { + return wr(this, e); + }, s.Bc = function(e) { + return eX(this, e); + }, s.gc = function() { + return this.a.c; + }, w(fe, "EnumMap", 451), b(1352, df, gu, xvn), s.$b = function() { + rTn(this.a); + }, s.Hc = function(e) { + return hAn(this, e); + }, s.Kc = function() { + return new JEn(this.a); + }, s.Mc = function(e) { + var t; + return hAn(this, e) ? (t = u(e, 42).cd(), eX(this.a, t), !0) : !1; + }, s.gc = function() { + return this.a.a.c; + }, w(fe, "EnumMap/EntrySet", 1352), b(1353, 1, Ei, JEn), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return this.b = G5(this.a), new P7n(this.c, this.b); + }, s.Ob = function() { + return Tz(this.a); + }, s.Qb = function() { + U0(!!this.b), eX(this.c, this.b), this.b = null; + }, w(fe, "EnumMap/EntrySetIterator", 1353), b(1354, 1984, ZL, P7n), s.cd = function() { + return this.a; + }, s.dd = function() { + return this.b.b[this.a.g]; + }, s.ed = function(e) { + return TW(this.b, this.a.g, e); + }, w(fe, "EnumMap/MapEntry", 1354), b(174, df, { 20: 1, 28: 1, 14: 1, 174: 1, 21: 1 }); + var Azn = w(fe, "EnumSet", 174); + b(156, 174, { 20: 1, 28: 1, 14: 1, 174: 1, 156: 1, 21: 1 }, ks), s.Fc = function(e) { + return ko(this, u(e, 22)); + }, s.Hc = function(e) { + return kD(this, e); + }, s.Kc = function() { + return new o2(this); + }, s.Mc = function(e) { + return lCn(this, e); + }, s.gc = function() { + return this.c; + }, s.c = 0, w(fe, "EnumSet/EnumSetImpl", 156), b(343, 1, Ei, o2), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return G5(this); + }, s.Ob = function() { + return Tz(this); + }, s.Qb = function() { + U0(this.b != -1), St(this.c.b, this.b, null), --this.c.c, this.b = -1; + }, s.a = -1, s.b = -1, w(fe, "EnumSet/EnumSetImpl/IteratorImpl", 343), b(43, 488, sg, we, s2, Gkn), s.re = function(e, t) { + return B(e) === B(t) || e != null && tt(e, t); + }, s.se = function(e) { + var t; + return t = kt(e), t | 0; + }, w(fe, "HashMap", 43), b(53, df, nnn, hi, kj, S5), s.Fc = function(e) { + return ci(this, e); + }, s.$b = function() { + this.a.$b(); + }, s.Hc = function(e) { + return Ah(this, e); + }, s.dc = function() { + return this.a.gc() == 0; + }, s.Kc = function() { + return this.a.ec().Kc(); + }, s.Mc = function(e) { + return Pz(this, e); + }, s.gc = function() { + return this.a.gc(); + }; + var _Te = w(fe, "HashSet", 53); + b(1781, 1, Z7, fln), s.ud = function(e) { + COn(this, e); + }, s.Ib = function() { + return "IntSummaryStatistics[count = " + O5(this.a) + ", avg = " + (A7n(this.a, 0) ? Fd(this.d) / Fd(this.a) : 0) + ", min = " + this.c + ", max = " + this.b + ", sum = " + O5(this.d) + "]"; + }, s.a = 0, s.b = Bi, s.c = nt, s.d = 0, w(fe, "IntSummaryStatistics", 1781), b(1049, 1, lh, iyn), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return new lX(this); + }, s.c = 0, w(fe, "InternalHashCodeMap", 1049), b(711, 1, Ei, lX), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return this.d = this.a[this.c++], this.d; + }, s.Ob = function() { + var e; + return this.c < this.a.length ? !0 : (e = this.b.next(), e.done ? !1 : (this.a = e.value[1], this.c = 0, !0)); + }, s.Qb = function() { + MY(this.e, this.d.cd()), this.c != 0 && --this.c; + }, s.c = 0, s.d = null, w(fe, "InternalHashCodeMap/1", 711); + var Szn; + b(1047, 1, lh, ryn), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return new yX(this); + }, s.c = 0, s.d = 0, w(fe, "InternalStringMap", 1047), b(710, 1, Ei, yX), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return this.c = this.a, this.a = this.b.next(), new sEn(this.d, this.c, this.d.d); + }, s.Ob = function() { + return !this.a.done; + }, s.Qb = function() { + $On(this.d, this.c.value[0]); + }, w(fe, "InternalStringMap/1", 710), b(1048, 1984, ZL, sEn), s.cd = function() { + return this.b.value[0]; + }, s.dd = function() { + return this.a.d != this.c ? n5(this.a, this.b.value[0]) : this.b.value[1]; + }, s.ed = function(e) { + return zd(this.a, this.b.value[0], e); + }, s.c = 0, w(fe, "InternalStringMap/2", 1048), b(228, 43, sg, wa, _X), s.$b = function() { + xjn(this); + }, s._b = function(e) { + return S7n(this, e); + }, s.uc = function(e) { + var t; + for (t = this.d.a; t != this.d; ) { + if (vc(t.e, e)) + return !0; + t = t.a; + } + return !1; + }, s.vc = function() { + return new Mq(this); + }, s.xc = function(e) { + return Ld(this, e); + }, s.zc = function(e, t) { + return Sa(this, e, t); + }, s.Bc = function(e) { + return $Pn(this, e); + }, s.gc = function() { + return Xv(this.e); + }, s.c = !1, w(fe, "LinkedHashMap", 228), b(387, 383, { 484: 1, 383: 1, 387: 1, 42: 1 }, ujn, qU), w(fe, "LinkedHashMap/ChainEntry", 387), b(701, df, gu, Mq), s.$b = function() { + xjn(this.a); + }, s.Hc = function(e) { + return aAn(this, e); + }, s.Kc = function() { + return new NW(this); + }, s.Mc = function(e) { + var t; + return aAn(this, e) ? (t = u(e, 42).cd(), $Pn(this.a, t), !0) : !1; + }, s.gc = function() { + return Xv(this.a.e); + }, w(fe, "LinkedHashMap/EntrySet", 701), b(702, 1, Ei, NW), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return fPn(this); + }, s.Ob = function() { + return this.b != this.c.a.d; + }, s.Qb = function() { + U0(!!this.a), b$(this.c.a.e, this), ZU(this.a), O2(this.c.a.e, this.a.d), rU(this.c.a.e, this), this.a = null; + }, w(fe, "LinkedHashMap/EntrySet/EntryIterator", 702), b(178, 53, nnn, Sh, UO, iW); + var KTe = w(fe, "LinkedHashSet", 178); + b(68, 1964, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 68: 1, 15: 1 }, Tt, uD), s.Fc = function(e) { + return Ke(this, e); + }, s.$b = function() { + _s(this); + }, s.Zc = function(e) { + return _e(this, e); + }, s.gc = function() { + return this.b; + }, s.b = 0; + var HTe = w(fe, "LinkedList", 68); + b(970, 1, hh, oEn), s.Nb = function(e) { + Oi(this, e); + }, s.Rb = function(e) { + y8(this, e); + }, s.Ob = function() { + return yj(this); + }, s.Sb = function() { + return this.b.b != this.d.a; + }, s.Pb = function() { + return Re(this); + }, s.Tb = function() { + return this.a; + }, s.Ub = function() { + return a$(this); + }, s.Vb = function() { + return this.a - 1; + }, s.Qb = function() { + HC(this); + }, s.Wb = function(e) { + U0(!!this.c), this.c.c = e; + }, s.a = 0, s.c = null, w(fe, "LinkedList/ListIteratorImpl", 970), b(608, 1, {}, aI), w(fe, "LinkedList/Node", 608), b(1959, 1, {}); + var Rin, Pzn; + w(fe, "Locale", 1959), b(861, 1959, {}, iln), s.Ib = function() { + return ""; + }, w(fe, "Locale/1", 861), b(862, 1959, {}, rln), s.Ib = function() { + return "unknown"; + }, w(fe, "Locale/4", 862), b(109, 60, { 3: 1, 102: 1, 60: 1, 78: 1, 109: 1 }, ic, gTn), w(fe, "NoSuchElementException", 109), b(404, 1, { 404: 1 }, dj), s.Fb = function(e) { + var t; + return e === this ? !0 : I(e, 404) ? (t = u(e, 404), vc(this.a, t.a)) : !1; + }, s.Hb = function() { + return Tw(this.a); + }, s.Ib = function() { + return this.a != null ? q_n + y5(this.a) + ")" : "Optional.empty()"; + }; + var UA; + w(fe, "Optional", 404), b(463, 1, { 463: 1 }, Vkn, Jz), s.Fb = function(e) { + var t; + return e === this ? !0 : I(e, 463) ? (t = u(e, 463), this.a == t.a && ni(this.b, t.b) == 0) : !1; + }, s.Hb = function() { + return this.a ? Gt(this.b) : 0; + }, s.Ib = function() { + return this.a ? "OptionalDouble.of(" + ("" + this.b) + ")" : "OptionalDouble.empty()"; + }, s.a = !1, s.b = 0; + var _in; + w(fe, "OptionalDouble", 463), b(517, 1, { 517: 1 }, Qkn, ijn), s.Fb = function(e) { + var t; + return e === this ? !0 : I(e, 517) ? (t = u(e, 517), this.a == t.a && Uc(this.b, t.b) == 0) : !1; + }, s.Hb = function() { + return this.a ? this.b : 0; + }, s.Ib = function() { + return this.a ? "OptionalInt.of(" + ("" + this.b) + ")" : "OptionalInt.empty()"; + }, s.a = !1, s.b = 0; + var Izn; + w(fe, "OptionalInt", 517), b(503, 2004, Pb, GE), s.Gc = function(e) { + return lJ(this, e); + }, s.$b = function() { + this.b.c = F(Zn, rn, 1, 0, 5, 1); + }, s.Hc = function(e) { + return (e == null ? -1 : xr(this.b, e, 0)) != -1; + }, s.Kc = function() { + return new Fvn(this); + }, s.Mc = function(e) { + return VIn(this, e); + }, s.gc = function() { + return this.b.c.length; + }, s.Nc = function() { + return new xn(this, 256); + }, s.Pc = function() { + return XO(this.b); + }, s.Qc = function(e) { + return lf(this.b, e); + }, w(fe, "PriorityQueue", 503), b(1277, 1, Ei, Fvn), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.a < this.c.b.c.length; + }, s.Pb = function() { + return ne(this.a < this.c.b.c.length), this.b = this.a++, un(this.c.b, this.b); + }, s.Qb = function() { + U0(this.b != -1), J$(this.c, this.a = this.b), this.b = -1; + }, s.a = 0, s.b = -1, w(fe, "PriorityQueue/1", 1277), b(230, 1, { 230: 1 }, OF, EC), s.a = 0, s.b = 0; + var Kin, Hin, qTe = 0; + w(fe, "Random", 230), b(27, 1, Gs, xn, Td, vTn), s.qd = function() { + return this.a; + }, s.rd = function() { + return mW(this), this.c; + }, s.Nb = function(e) { + mW(this), this.d.Nb(e); + }, s.sd = function(e) { + return iIn(this, e); + }, s.a = 0, s.c = 0, w(fe, "Spliterators/IteratorSpliterator", 27), b(485, 27, Gs, xj), w(fe, "SortedSet/1", 485), b(602, 1, ck, yq), s.we = function(e) { + this.a.td(e); + }, w(fe, "Spliterator/OfDouble/0methodref$accept$Type", 602), b(603, 1, ck, jq), s.we = function(e) { + this.a.td(e); + }, w(fe, "Spliterator/OfDouble/1methodref$accept$Type", 603), b(604, 1, Z7, Eq), s.ud = function(e) { + this.a.td(Q(e)); + }, w(fe, "Spliterator/OfInt/2methodref$accept$Type", 604), b(605, 1, Z7, Cq), s.ud = function(e) { + this.a.td(Q(e)); + }, w(fe, "Spliterator/OfInt/3methodref$accept$Type", 605), b(617, 1, Gs), s.Nb = function(e) { + TG(this, e); + }, s.qd = function() { + return this.d; + }, s.rd = function() { + return this.e; + }, s.d = 0, s.e = 0, w(fe, "Spliterators/BaseSpliterator", 617), b(721, 617, Gs), s.xe = function(e) { + vw(this, e); + }, s.Nb = function(e) { + I(e, 182) ? vw(this, u(e, 182)) : vw(this, new jq(e)); + }, s.sd = function(e) { + return I(e, 182) ? this.ye(u(e, 182)) : this.ye(new yq(e)); + }, w(fe, "Spliterators/AbstractDoubleSpliterator", 721), b(720, 617, Gs), s.xe = function(e) { + vw(this, e); + }, s.Nb = function(e) { + I(e, 196) ? vw(this, u(e, 196)) : vw(this, new Cq(e)); + }, s.sd = function(e) { + return I(e, 196) ? this.ye(u(e, 196)) : this.ye(new Eq(e)); + }, w(fe, "Spliterators/AbstractIntSpliterator", 720), b(540, 617, Gs), w(fe, "Spliterators/AbstractSpliterator", 540), b(692, 1, Gs), s.Nb = function(e) { + TG(this, e); + }, s.qd = function() { + return this.b; + }, s.rd = function() { + return this.d - this.c; + }, s.b = 0, s.c = 0, s.d = 0, w(fe, "Spliterators/BaseArraySpliterator", 692), b(947, 692, Gs, REn), s.ze = function(e, t) { + Die(this, u(e, 38), t); + }, s.Nb = function(e) { + RD(this, e); + }, s.sd = function(e) { + return PC(this, e); + }, w(fe, "Spliterators/ArraySpliterator", 947), b(693, 692, Gs, rEn), s.ze = function(e, t) { + $ie(this, u(e, 182), t); + }, s.xe = function(e) { + RD(this, e); + }, s.Nb = function(e) { + I(e, 182) ? RD(this, u(e, 182)) : RD(this, new jq(e)); + }, s.ye = function(e) { + return PC(this, e); + }, s.sd = function(e) { + return I(e, 182) ? PC(this, u(e, 182)) : PC(this, new yq(e)); + }, w(fe, "Spliterators/DoubleArraySpliterator", 693), b(1968, 1, Gs), s.Nb = function(e) { + TG(this, e); + }, s.qd = function() { + return 16448; + }, s.rd = function() { + return 0; + }; + var Ozn; + w(fe, "Spliterators/EmptySpliterator", 1968), b(946, 1968, Gs, lln), s.xe = function(e) { + iq(e); + }, s.Nb = function(e) { + I(e, 196) ? iq(u(e, 196)) : iq(new Cq(e)); + }, s.ye = function(e) { + return LG(e); + }, s.sd = function(e) { + return I(e, 196) ? LG(u(e, 196)) : LG(new Eq(e)); + }, w(fe, "Spliterators/EmptySpliterator/OfInt", 946), b(580, 52, hKn, lj), s.Vc = function(e, t) { + l3(e, this.a.c.length + 1), J0(this.a, e, t); + }, s.Fc = function(e) { + return W(this.a, e); + }, s.Wc = function(e, t) { + return l3(e, this.a.c.length + 1), eQ(this.a, e, t); + }, s.Gc = function(e) { + return Zt(this.a, e); + }, s.$b = function() { + this.a.c = F(Zn, rn, 1, 0, 5, 1); + }, s.Hc = function(e) { + return xr(this.a, e, 0) != -1; + }, s.Ic = function(e) { + return t7(this.a, e); + }, s.Jc = function(e) { + Yc(this.a, e); + }, s.Xb = function(e) { + return l3(e, this.a.c.length), un(this.a, e); + }, s.Xc = function(e) { + return xr(this.a, e, 0); + }, s.dc = function() { + return this.a.c.length == 0; + }, s.Kc = function() { + return new E(this.a); + }, s.$c = function(e) { + return l3(e, this.a.c.length), l1(this.a, e); + }, s.Ud = function(e, t) { + xMn(this.a, e, t); + }, s._c = function(e, t) { + return l3(e, this.a.c.length), Es(this.a, e, t); + }, s.gc = function() { + return this.a.c.length; + }, s.ad = function(e) { + wi(this.a, e); + }, s.bd = function(e, t) { + return new ch(this.a, e, t); + }, s.Pc = function() { + return XO(this.a); + }, s.Qc = function(e) { + return lf(this.a, e); + }, s.Ib = function() { + return kl(this.a); + }, w(fe, "Vector", 580), b(809, 580, hKn, Yq), w(fe, "Stack", 809), b(206, 1, { 206: 1 }, ya), s.Ib = function() { + return rAn(this); + }, w(fe, "StringJoiner", 206), b(544, 1992, { 3: 1, 83: 1, 171: 1, 161: 1 }, h7n, AD), s.$b = function() { + Kv(this); + }, s.vc = function() { + return new j5(this); + }, s.zc = function(e, t) { + return bT(this, e, t); + }, s.Bc = function(e) { + return R5(this, e); + }, s.gc = function() { + return this.c; + }, s.c = 0, w(fe, "TreeMap", 544), b(390, 1, Ei, T5), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return pE(this); + }, s.Ob = function() { + return G9(this.a); + }, s.Qb = function() { + fEn(this); + }, w(fe, "TreeMap/EntryIterator", 390), b(435, 739, gu, j5), s.$b = function() { + Kv(this.a); + }, w(fe, "TreeMap/EntrySet", 435), b(436, 383, { 484: 1, 383: 1, 42: 1, 436: 1 }, I$), s.b = !1; + var GTe = w(fe, "TreeMap/Node", 436); + b(621, 1, {}, dI), s.Ib = function() { + return "State: mv=" + this.c + " value=" + this.d + " done=" + this.a + " found=" + this.b; + }, s.a = !1, s.b = !1, s.c = !1, w(fe, "TreeMap/State", 621), b(297, 22, iN, Lj), s.Ae = function() { + return !1; + }, s.Be = function() { + return !1; + }; + var vR, qin, Gin, zin, WA = Me(fe, "TreeMap/SubMapType", 297, Ie, pae, Xue); + b(1112, 297, iN, lyn), s.Be = function() { + return !0; + }, Me(fe, "TreeMap/SubMapType/1", 1112, WA, null, null), b(1113, 297, iN, Eyn), s.Ae = function() { + return !0; + }, s.Be = function() { + return !0; + }, Me(fe, "TreeMap/SubMapType/2", 1113, WA, null, null), b(1114, 297, iN, ayn), s.Ae = function() { + return !0; + }, Me(fe, "TreeMap/SubMapType/3", 1114, WA, null, null); + var Dzn; + b(208, df, { 3: 1, 20: 1, 28: 1, 14: 1, 271: 1, 21: 1, 84: 1, 208: 1 }, Wq, Y1), s.Nc = function() { + return new xj(this); + }, s.Fc = function(e) { + return k8(this, e); + }, s.$b = function() { + Kv(this.a); + }, s.Hc = function(e) { + return cD(this.a, e); + }, s.Kc = function() { + var e; + return e = new T5(new j5(new P9(this.a).a).b), new I9(e); + }, s.Mc = function(e) { + return zO(this, e); + }, s.gc = function() { + return this.a.c; + }; + var zTe = w(fe, "TreeSet", 208); + b(966, 1, {}, Lvn), s.Ce = function(e, t) { + return aue(this.a, e, t); + }, w(rN, "BinaryOperator/lambda$0$Type", 966), b(967, 1, {}, Nvn), s.Ce = function(e, t) { + return due(this.a, e, t); + }, w(rN, "BinaryOperator/lambda$1$Type", 967), b(846, 1, {}, hln), s.Kb = function(e) { + return e; + }, w(rN, "Function/lambda$0$Type", 846), b(431, 1, Ve, Fv), s.Mb = function(e) { + return !this.a.Mb(e); + }, w(rN, "Predicate/lambda$2$Type", 431), b(572, 1, { 572: 1 }); + var $zn = w(R6, "Handler", 572); + b(2007, 1, J7), s.ne = function() { + return "DUMMY"; + }, s.Ib = function() { + return this.ne(); + }; + var Uin; + w(R6, "Level", 2007), b(1621, 2007, J7, aln), s.ne = function() { + return "INFO"; + }, w(R6, "Level/LevelInfo", 1621), b(1640, 1, {}, Xmn); + var mR; + w(R6, "LogManager", 1640), b(1780, 1, J7, hEn), s.b = null, w(R6, "LogRecord", 1780), b(512, 1, { 512: 1 }, y$), s.e = !1; + var Fzn = !1, xzn = !1, pf = !1, Lzn = !1, Nzn = !1; + w(R6, "Logger", 512), b(819, 572, { 572: 1 }, $H), w(R6, "SimpleConsoleLogHandler", 819), b(132, 22, { 3: 1, 35: 1, 22: 1, 132: 1 }, uO); + var Win, ls, _b, Nu = Me(ti, "Collector/Characteristics", 132, Ie, ble, Vue), Bzn; + b(744, 1, {}, CW), w(ti, "CollectorImpl", 744), b(1060, 1, {}, dln), s.Ce = function(e, t) { + return mge(u(e, 206), u(t, 206)); + }, w(ti, "Collectors/10methodref$merge$Type", 1060), b(1061, 1, {}, bln), s.Kb = function(e) { + return rAn(u(e, 206)); + }, w(ti, "Collectors/11methodref$toString$Type", 1061), b(1062, 1, {}, Bvn), s.Kb = function(e) { + return qn(), !!gz(e); + }, w(ti, "Collectors/12methodref$test$Type", 1062), b(251, 1, {}, z1), s.Od = function(e, t) { + u(e, 14).Fc(t); + }, w(ti, "Collectors/20methodref$add$Type", 251), b(253, 1, {}, U1), s.Ee = function() { + return new X(); + }, w(ti, "Collectors/21methodref$ctor$Type", 253), b(346, 1, {}, Vg), s.Ee = function() { + return new hi(); + }, w(ti, "Collectors/23methodref$ctor$Type", 346), b(347, 1, {}, Qg), s.Od = function(e, t) { + ci(u(e, 53), t); + }, w(ti, "Collectors/24methodref$add$Type", 347), b(1055, 1, {}, wln), s.Ce = function(e, t) { + return l7n(u(e, 15), u(t, 14)); + }, w(ti, "Collectors/4methodref$addAll$Type", 1055), b(1059, 1, {}, gln), s.Od = function(e, t) { + xh(u(e, 206), u(t, 475)); + }, w(ti, "Collectors/9methodref$add$Type", 1059), b(1058, 1, {}, AEn), s.Ee = function() { + return new ya(this.a, this.b, this.c); + }, w(ti, "Collectors/lambda$15$Type", 1058), b(1063, 1, {}, pln), s.Ee = function() { + var e; + return e = new wa(), Sa(e, (qn(), !1), new X()), Sa(e, !0, new X()), e; + }, w(ti, "Collectors/lambda$22$Type", 1063), b(1064, 1, {}, Rvn), s.Ee = function() { + return A(M(Zn, 1), rn, 1, 5, [this.a]); + }, w(ti, "Collectors/lambda$25$Type", 1064), b(1065, 1, {}, _vn), s.Od = function(e, t) { + jfe(this.a, va(e)); + }, w(ti, "Collectors/lambda$26$Type", 1065), b(1066, 1, {}, Kvn), s.Ce = function(e, t) { + return Xfe(this.a, va(e), va(t)); + }, w(ti, "Collectors/lambda$27$Type", 1066), b(1067, 1, {}, vln), s.Kb = function(e) { + return va(e)[0]; + }, w(ti, "Collectors/lambda$28$Type", 1067), b(713, 1, {}, FH), s.Ce = function(e, t) { + return rW(e, t); + }, w(ti, "Collectors/lambda$4$Type", 713), b(252, 1, {}, W1), s.Ce = function(e, t) { + return Zie(u(e, 14), u(t, 14)); + }, w(ti, "Collectors/lambda$42$Type", 252), b(348, 1, {}, Jg), s.Ce = function(e, t) { + return nre(u(e, 53), u(t, 53)); + }, w(ti, "Collectors/lambda$50$Type", 348), b(349, 1, {}, Yg), s.Kb = function(e) { + return u(e, 53); + }, w(ti, "Collectors/lambda$51$Type", 349), b(1054, 1, {}, Hvn), s.Od = function(e, t) { + Lwe(this.a, u(e, 83), t); + }, w(ti, "Collectors/lambda$7$Type", 1054), b(1056, 1, {}, mln), s.Ce = function(e, t) { + return hwe(u(e, 83), u(t, 83), new wln()); + }, w(ti, "Collectors/lambda$8$Type", 1056), b(1057, 1, {}, qvn), s.Kb = function(e) { + return Zge(this.a, u(e, 83)); + }, w(ti, "Collectors/lambda$9$Type", 1057), b(539, 1, {}), s.He = function() { + N5(this); + }, s.d = !1, w(ti, "TerminatableStream", 539), b(812, 539, inn, sU), s.He = function() { + N5(this); + }, w(ti, "DoubleStreamImpl", 812), b(1784, 721, Gs, SEn), s.ye = function(e) { + return s3e(this, u(e, 182)); + }, s.a = null, w(ti, "DoubleStreamImpl/2", 1784), b(1785, 1, ck, Gvn), s.we = function(e) { + Ure(this.a, e); + }, w(ti, "DoubleStreamImpl/2/lambda$0$Type", 1785), b(1782, 1, ck, zvn), s.we = function(e) { + zre(this.a, e); + }, w(ti, "DoubleStreamImpl/lambda$0$Type", 1782), b(1783, 1, ck, Uvn), s.we = function(e) { + d$n(this.a, e); + }, w(ti, "DoubleStreamImpl/lambda$2$Type", 1783), b(1358, 720, Gs, wSn), s.ye = function(e) { + return hae(this, u(e, 196)); + }, s.a = 0, s.b = 0, s.c = 0, w(ti, "IntStream/5", 1358), b(787, 539, inn, oU), s.He = function() { + N5(this); + }, s.Ie = function() { + return fl(this), this.a; + }, w(ti, "IntStreamImpl", 787), b(788, 539, inn, PG), s.He = function() { + N5(this); + }, s.Ie = function() { + return fl(this), Iz(), Ozn; + }, w(ti, "IntStreamImpl/Empty", 788), b(1463, 1, Z7, Wvn), s.ud = function(e) { + COn(this.a, e); + }, w(ti, "IntStreamImpl/lambda$4$Type", 1463); + var UTe = Ct(ti, "Stream"); + b(30, 539, { 525: 1, 670: 1, 833: 1 }, $n), s.He = function() { + N5(this); + }; + var X4; + w(ti, "StreamImpl", 30), b(845, 1, {}, Vee), s.ld = function(e) { + return IEn(e); + }, w(ti, "StreamImpl/0methodref$lambda$2$Type", 845), b(1084, 540, Gs, iEn), s.sd = function(e) { + for (; n0e(this); ) { + if (this.a.sd(e)) + return !0; + N5(this.b), this.b = null, this.a = null; + } + return !1; + }, w(ti, "StreamImpl/1", 1084), b(1085, 1, Yn, Xvn), s.td = function(e) { + Qoe(this.a, u(e, 833)); + }, w(ti, "StreamImpl/1/lambda$0$Type", 1085), b(1086, 1, Ve, Vvn), s.Mb = function(e) { + return ci(this.a, e); + }, w(ti, "StreamImpl/1methodref$add$Type", 1086), b(1087, 540, Gs, DTn), s.sd = function(e) { + var t; + return this.a || (t = new X(), this.b.a.Nb(new Qvn(t)), Pn(), wi(t, this.c), this.a = new xn(t, 16)), iIn(this.a, e); + }, s.a = null, w(ti, "StreamImpl/5", 1087), b(1088, 1, Yn, Qvn), s.td = function(e) { + W(this.a, e); + }, w(ti, "StreamImpl/5/2methodref$add$Type", 1088), b(722, 540, Gs, UX), s.sd = function(e) { + for (this.b = !1; !this.b && this.c.sd(new O7n(this, e)); ) + ; + return this.b; + }, s.b = !1, w(ti, "StreamImpl/FilterSpliterator", 722), b(1079, 1, Yn, O7n), s.td = function(e) { + Wfe(this.a, this.b, e); + }, w(ti, "StreamImpl/FilterSpliterator/lambda$0$Type", 1079), b(1075, 721, Gs, ASn), s.ye = function(e) { + return Lue(this, u(e, 182)); + }, w(ti, "StreamImpl/MapToDoubleSpliterator", 1075), b(1078, 1, Yn, D7n), s.td = function(e) { + bre(this.a, this.b, e); + }, w(ti, "StreamImpl/MapToDoubleSpliterator/lambda$0$Type", 1078), b(1074, 720, Gs, SSn), s.ye = function(e) { + return Nue(this, u(e, 196)); + }, w(ti, "StreamImpl/MapToIntSpliterator", 1074), b(1077, 1, Yn, $7n), s.td = function(e) { + dre(this.a, this.b, e); + }, w(ti, "StreamImpl/MapToIntSpliterator/lambda$0$Type", 1077), b(719, 540, Gs, FX), s.sd = function(e) { + return nEn(this, e); + }, w(ti, "StreamImpl/MapToObjSpliterator", 719), b(1076, 1, Yn, F7n), s.td = function(e) { + wre(this.a, this.b, e); + }, w(ti, "StreamImpl/MapToObjSpliterator/lambda$0$Type", 1076), b(618, 1, Yn, bI), s.td = function(e) { + Svn(this, e); + }, w(ti, "StreamImpl/ValueConsumer", 618), b(1080, 1, Yn, kln), s.td = function(e) { + ua(); + }, w(ti, "StreamImpl/lambda$0$Type", 1080), b(1081, 1, Yn, yln), s.td = function(e) { + ua(); + }, w(ti, "StreamImpl/lambda$1$Type", 1081), b(1082, 1, {}, Jvn), s.Ce = function(e, t) { + return dse(this.a, e, t); + }, w(ti, "StreamImpl/lambda$4$Type", 1082), b(1083, 1, Yn, I7n), s.td = function(e) { + Eue(this.b, this.a, e); + }, w(ti, "StreamImpl/lambda$5$Type", 1083), b(1089, 1, Yn, Yvn), s.td = function(e) { + Pwe(this.a, u(e, 365)); + }, w(ti, "TerminatableStream/lambda$0$Type", 1089), b(2041, 1, {}), b(1914, 1, {}, jln), w("javaemul.internal", "ConsoleLogger", 1914), b(2038, 1, {}); + var WTe = 0, Xin, Vin = 0, XA; + b(1768, 1, Yn, Eln), s.td = function(e) { + u(e, 308); + }, w(S4, "BowyerWatsonTriangulation/lambda$0$Type", 1768), b(1769, 1, Yn, Zvn), s.td = function(e) { + Xi(this.a, u(e, 308).e); + }, w(S4, "BowyerWatsonTriangulation/lambda$1$Type", 1769), b(1770, 1, Yn, Cln), s.td = function(e) { + u(e, 168); + }, w(S4, "BowyerWatsonTriangulation/lambda$2$Type", 1770), b(1765, 1, at, n5n), s.ue = function(e, t) { + return qae(this.a, u(e, 168), u(t, 168)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(S4, "NaiveMinST/lambda$0$Type", 1765), b(499, 1, {}, O9), w(S4, "NodeMicroLayout", 499), b(168, 1, { 168: 1 }, f2), s.Fb = function(e) { + var t; + return I(e, 168) ? (t = u(e, 168), vc(this.a, t.a) && vc(this.b, t.b) || vc(this.a, t.b) && vc(this.b, t.a)) : !1; + }, s.Hb = function() { + return Tw(this.a) + Tw(this.b); + }; + var XTe = w(S4, "TEdge", 168); + b(308, 1, { 308: 1 }, yZ), s.Fb = function(e) { + var t; + return I(e, 308) ? (t = u(e, 308), LC(this, t.a) && LC(this, t.b) && LC(this, t.c)) : !1; + }, s.Hb = function() { + return Tw(this.a) + Tw(this.b) + Tw(this.c); + }, w(S4, "TTriangle", 308), b(221, 1, { 221: 1 }, sE), w(S4, "Tree", 221), b(1254, 1, {}, mMn), w(dKn, "Scanline", 1254); + var Rzn = Ct(dKn, bKn); + b(1692, 1, {}, sIn), w(bh, "CGraph", 1692), b(307, 1, { 307: 1 }, bMn), s.b = 0, s.c = 0, s.d = 0, s.g = 0, s.i = 0, s.k = Vt, w(bh, "CGroup", 307), b(815, 1, {}, Xq), w(bh, "CGroup/CGroupBuilder", 815), b(57, 1, { 57: 1 }, Bjn), s.Ib = function() { + var e; + return this.j ? Ce(this.j.Kb(this)) : (Ph(VA), VA.o + "@" + (e = kd(this) >>> 0, e.toString(16))); + }, s.f = 0, s.i = Vt; + var VA = w(bh, "CNode", 57); + b(814, 1, {}, Vq), w(bh, "CNode/CNodeBuilder", 814); + var _zn; + b(1525, 1, {}, Tln), s.Oe = function(e, t) { + return 0; + }, s.Pe = function(e, t) { + return 0; + }, w(bh, gKn, 1525), b(1790, 1, {}, Mln), s.Le = function(e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C; + for (a = Lt, r = new E(e.a.b); r.a < r.c.c.length; ) + t = u(y(r), 57), a = j.Math.min(a, t.a.j.d.c + t.b.a); + for (v = new Tt(), f = new E(e.a.a); f.a < f.c.c.length; ) + o = u(y(f), 307), o.k = a, o.g == 0 && Ht(v, o, v.c.b, v.c); + for (; v.b != 0; ) { + for (o = u(v.b == 0 ? null : (ne(v.b != 0), Ts(v, v.a.a)), 307), c = o.j.d.c, p = o.a.a.ec().Kc(); p.Ob(); ) + d = u(p.Pb(), 57), C = o.k + d.b.a, !cge(e, o, e.d) || d.d.c < C ? d.i = C : d.i = d.d.c; + for (c -= o.j.i, o.b += c, e.d == (or(), Ao) || e.d == Jh ? o.c += c : o.c -= c, g = o.a.a.ec().Kc(); g.Ob(); ) + for (d = u(g.Pb(), 57), l = d.c.Kc(); l.Ob(); ) + h = u(l.Pb(), 57), tl(e.d) ? m = e.g.Oe(d, h) : m = e.g.Pe(d, h), h.a.k = j.Math.max(h.a.k, d.i + d.d.b + m - h.b.a), _Tn(e, h, e.d) && (h.a.k = j.Math.max(h.a.k, h.d.c - h.b.a)), --h.a.g, h.a.g == 0 && Ke(v, h.a); + } + for (i = new E(e.a.b); i.a < i.c.c.length; ) + t = u(y(i), 57), t.d.c = t.i; + }, w(bh, "LongestPathCompaction", 1790), b(1690, 1, {}, FLn), s.e = !1; + var Kzn, Hzn, qzn, kR = w(bh, mKn, 1690); + b(1691, 1, Yn, e5n), s.td = function(e) { + swe(this.a, u(e, 46)); + }, w(bh, kKn, 1691), b(1791, 1, {}, Aln), s.Me = function(e) { + var t, i, r, c, o, f, h; + for (i = new E(e.a.b); i.a < i.c.c.length; ) + t = u(y(i), 57), t.c.$b(); + for (c = new E(e.a.b); c.a < c.c.c.length; ) + for (r = u(y(c), 57), f = new E(e.a.b); f.a < f.c.c.length; ) + o = u(y(f), 57), r != o && (r.a && r.a == o.a || (tl(e.d) ? h = e.g.Pe(r, o) : h = e.g.Oe(r, o), (o.d.c > r.d.c || r.d.c == o.d.c && r.d.b < o.d.b) && U2e(o.d.d + o.d.a + h, r.d.d) && HQ(o.d.d, r.d.d + r.d.a + h) && r.c.Fc(o))); + }, w(bh, "QuadraticConstraintCalculation", 1791), b(522, 1, { 522: 1 }, FI), s.a = !1, s.b = !1, s.c = !1, s.d = !1, w(bh, yKn, 522), b(803, 1, {}, hW), s.Me = function(e) { + this.c = e, O7(this, new Iln()); + }, w(bh, jKn, 803), b(1718, 1, { 679: 1 }, HTn), s.Ke = function(e) { + t6e(this, u(e, 464)); + }, w(bh, EKn, 1718), b(1719, 1, at, Sln), s.ue = function(e, t) { + return i1e(u(e, 57), u(t, 57)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(bh, CKn, 1719), b(464, 1, { 464: 1 }, RG), s.a = !1, w(bh, TKn, 464), b(1720, 1, at, Pln), s.ue = function(e, t) { + return b4e(u(e, 464), u(t, 464)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(bh, MKn, 1720), b(1721, 1, Rf, Iln), s.Lb = function(e) { + return u(e, 57), !0; + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return u(e, 57), !0; + }, w(bh, "ScanlineConstraintCalculator/lambda$1$Type", 1721), b(428, 22, { 3: 1, 35: 1, 22: 1, 428: 1 }, HG); + var Qin, yR, Jin = Me(oN, "HighLevelSortingCriterion", 428, Ie, q1e, Que), Gzn; + b(427, 22, { 3: 1, 35: 1, 22: 1, 427: 1 }, qG); + var Yin, jR, Zin = Me(oN, "LowLevelSortingCriterion", 427, Ie, G1e, Jue), zzn, mg = Ct(Wr, "ILayoutMetaDataProvider"); + b(853, 1, zs, o4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), snn), fN), "Polyomino Traversal Strategy"), "Traversal strategy for trying different candidate positions for polyominoes."), urn), (j1(), Rt)), wrn), Cn((Ho(), Xn))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), onn), fN), "Polyomino Secondary Sorting Criterion"), "Possible secondary sorting criteria for the processing order of polyominoes. They are used when polyominoes are equal according to the primary sorting criterion HighLevelSortingCriterion."), rrn), Rt), Zin), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), fnn), fN), "Polyomino Primary Sorting Criterion"), "Possible primary sorting criteria for the processing order of polyominoes."), trn), Rt), Jin), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), hnn), fN), "Fill Polyominoes"), "Use the Profile Fill algorithm to fill polyominoes to prevent small polyominoes from being placed inside of big polyominoes with large holes. Might increase packing area."), (qn(), !0)), _i), oi), Cn(Xn)))); + }; + var nrn, ern, trn, irn, rrn, crn, urn; + w(oN, "PolyominoOptions", 853), b(250, 22, { 3: 1, 35: 1, 22: 1, 250: 1 }, kw); + var srn, orn, frn, hrn, lrn, arn, ER, drn, brn, wrn = Me(oN, "TraversalStrategy", 250, Ie, ibe, Yue), Uzn; + b(213, 1, { 213: 1 }, Oln), s.Ib = function() { + return "NEdge[id=" + this.b + " w=" + this.g + " d=" + this.a + "]"; + }, s.a = 1, s.b = 0, s.c = 0, s.f = !1, s.g = 0; + var Wzn = w(_6, "NEdge", 213); + b(176, 1, {}, Ns), w(_6, "NEdge/NEdgeBuilder", 176), b(653, 1, {}, LI), w(_6, "NGraph", 653), b(121, 1, { 121: 1 }, TSn), s.c = -1, s.d = 0, s.e = 0, s.i = -1, s.j = !1; + var grn = w(_6, "NNode", 121); + b(795, 1, fKn, zq), s.Jc = function(e) { + $i(this, e); + }, s.Lc = function() { + return new $n(null, new xn(this, 16)); + }, s.ad = function(e) { + Lw(this, e); + }, s.Nc = function() { + return new xn(this, 16); + }, s.Oc = function() { + return new $n(null, new xn(this, 16)); + }, s.Vc = function(e, t) { + ++this.b, J0(this.a, e, t); + }, s.Fc = function(e) { + return bE(this, e); + }, s.Wc = function(e, t) { + return ++this.b, eQ(this.a, e, t); + }, s.Gc = function(e) { + return ++this.b, Zt(this.a, e); + }, s.$b = function() { + ++this.b, this.a.c = F(Zn, rn, 1, 0, 5, 1); + }, s.Hc = function(e) { + return xr(this.a, e, 0) != -1; + }, s.Ic = function(e) { + return t7(this.a, e); + }, s.Xb = function(e) { + return un(this.a, e); + }, s.Xc = function(e) { + return xr(this.a, e, 0); + }, s.dc = function() { + return this.a.c.length == 0; + }, s.Kc = function() { + return $2(new E(this.a)); + }, s.Yc = function() { + throw T(new ye()); + }, s.Zc = function(e) { + throw T(new ye()); + }, s.$c = function(e) { + return ++this.b, l1(this.a, e); + }, s.Mc = function(e) { + return Uz(this, e); + }, s._c = function(e, t) { + return ++this.b, Es(this.a, e, t); + }, s.gc = function() { + return this.a.c.length; + }, s.bd = function(e, t) { + return new ch(this.a, e, t); + }, s.Pc = function() { + return XO(this.a); + }, s.Qc = function(e) { + return lf(this.a, e); + }, s.b = 0, w(_6, "NNode/ChangeAwareArrayList", 795), b(269, 1, {}, ca), w(_6, "NNode/NNodeBuilder", 269), b(1630, 1, {}, Dln), s.a = !1, s.f = nt, s.j = 0, w(_6, "NetworkSimplex", 1630), b(1294, 1, Yn, t5n), s.td = function(e) { + o_n(this.a, u(e, 680), !0, !1); + }, w(AKn, "NodeLabelAndSizeCalculator/lambda$0$Type", 1294), b(558, 1, {}, tj), s.b = !0, s.c = !0, s.d = !0, s.e = !0, w(AKn, "NodeMarginCalculator", 558), b(212, 1, { 212: 1 }), s.j = !1, s.k = !1; + var Xzn = w(xa, "Cell", 212); + b(124, 212, { 124: 1, 212: 1 }, Gjn), s.Re = function() { + return SE(this); + }, s.Se = function() { + var e; + return e = this.n, this.a.a + e.b + e.c; + }, w(xa, "AtomicCell", 124), b(232, 22, { 3: 1, 35: 1, 22: 1, 232: 1 }, sO); + var Zr, xc, nc, Kb = Me(xa, "ContainerArea", 232, Ie, wle, Zue), Vzn; + b(326, 212, SKn), w(xa, "ContainerCell", 326), b(1473, 326, SKn, s$n), s.Re = function() { + var e; + return e = 0, this.e ? this.b ? e = this.b.b : this.a[1][1] && (e = this.a[1][1].Re()) : e = EQ(this, mFn(this, !0)), e > 0 ? e + this.n.d + this.n.a : 0; + }, s.Se = function() { + var e, t, i, r, c; + if (c = 0, this.e) + this.b ? c = this.b.a : this.a[1][1] && (c = this.a[1][1].Se()); + else if (this.g) + c = EQ(this, lx(this, null, !0)); + else + for (t = (_o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc])), i = 0, r = t.length; i < r; ++i) + e = t[i], c = j.Math.max(c, EQ(this, lx(this, e, !0))); + return c > 0 ? c + this.n.b + this.n.c : 0; + }, s.Te = function() { + var e, t, i, r, c; + if (this.g) + for (e = lx(this, null, !1), i = (_o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc])), r = 0, c = i.length; r < c; ++r) + t = i[r], UNn(this, t, e); + else + for (i = (_o(), A(M(Kb, 1), z, 232, 0, [Zr, xc, nc])), r = 0, c = i.length; r < c; ++r) + t = i[r], e = lx(this, t, !1), UNn(this, t, e); + }, s.Ue = function() { + var e, t, i, r; + t = this.i, e = this.n, r = mFn(this, !1), AX(this, (_o(), Zr), t.d + e.d, r), AX(this, nc, t.d + t.a - e.a - r[2], r), i = t.a - e.d - e.a, r[0] > 0 && (r[0] += this.d, i -= r[0]), r[2] > 0 && (r[2] += this.d, i -= r[2]), this.c.a = j.Math.max(0, i), this.c.d = t.d + e.d + (this.c.a - i) / 2, r[1] = j.Math.max(r[1], i), AX(this, xc, t.d + e.d + r[0] - (r[1] - i) / 2, r); + }, s.b = null, s.d = 0, s.e = !1, s.f = !1, s.g = !1; + var CR = 0, QA = 0; + w(xa, "GridContainerCell", 1473), b(461, 22, { 3: 1, 35: 1, 22: 1, 461: 1 }, oO); + var Ol, Xf, Co, Qzn = Me(xa, "HorizontalLabelAlignment", 461, Ie, gle, nse), Jzn; + b(306, 212, { 212: 1, 306: 1 }, tMn, fIn, ZTn), s.Re = function() { + return _En(this); + }, s.Se = function() { + return nW(this); + }, s.a = 0, s.c = !1; + var VTe = w(xa, "LabelCell", 306); + b(244, 326, { 212: 1, 326: 1, 244: 1 }, l6), s.Re = function() { + return $7(this); + }, s.Se = function() { + return F7(this); + }, s.Te = function() { + tL(this); + }, s.Ue = function() { + iL(this); + }, s.b = 0, s.c = 0, s.d = !1, w(xa, "StripContainerCell", 244), b(1626, 1, Ve, $ln), s.Mb = function(e) { + return die(u(e, 212)); + }, w(xa, "StripContainerCell/lambda$0$Type", 1626), b(1627, 1, {}, Fln), s.Fe = function(e) { + return u(e, 212).Se(); + }, w(xa, "StripContainerCell/lambda$1$Type", 1627), b(1628, 1, Ve, xln), s.Mb = function(e) { + return bie(u(e, 212)); + }, w(xa, "StripContainerCell/lambda$2$Type", 1628), b(1629, 1, {}, Lln), s.Fe = function(e) { + return u(e, 212).Re(); + }, w(xa, "StripContainerCell/lambda$3$Type", 1629), b(462, 22, { 3: 1, 35: 1, 22: 1, 462: 1 }, fO); + var To, Dl, Wo, Yzn = Me(xa, "VerticalLabelAlignment", 462, Ie, ple, ese), Zzn; + b(789, 1, {}, NZ), s.c = 0, s.d = 0, s.k = 0, s.s = 0, s.t = 0, s.v = !1, s.w = 0, s.D = !1, w(LM, "NodeContext", 789), b(1471, 1, at, Nln), s.ue = function(e, t) { + return tyn(u(e, 61), u(t, 61)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(LM, "NodeContext/0methodref$comparePortSides$Type", 1471), b(1472, 1, at, Bln), s.ue = function(e, t) { + return Kve(u(e, 111), u(t, 111)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(LM, "NodeContext/1methodref$comparePortContexts$Type", 1472), b(159, 22, { 3: 1, 35: 1, 22: 1, 159: 1 }, Ms); + var nUn, eUn, tUn, iUn, rUn, cUn, uUn, sUn, oUn, fUn, hUn, lUn, aUn, dUn, bUn, wUn, gUn, pUn, vUn, mUn, kUn, TR, yUn = Me(LM, "NodeLabelLocation", 159, Ie, qF, tse), jUn; + b(111, 1, { 111: 1 }, xLn), s.a = !1, w(LM, "PortContext", 111), b(1476, 1, Yn, Rln), s.td = function(e) { + y8n(u(e, 306)); + }, w(sk, PKn, 1476), b(1477, 1, Ve, _ln), s.Mb = function(e) { + return !!u(e, 111).c; + }, w(sk, IKn, 1477), b(1478, 1, Yn, Kln), s.td = function(e) { + y8n(u(e, 111).c); + }, w(sk, "LabelPlacer/lambda$2$Type", 1478); + var prn; + b(1475, 1, Yn, qln), s.td = function(e) { + X0(), Wte(u(e, 111)); + }, w(sk, "NodeLabelAndSizeUtilities/lambda$0$Type", 1475), b(790, 1, Yn, $U), s.td = function(e) { + cre(this.b, this.c, this.a, u(e, 181)); + }, s.a = !1, s.c = !1, w(sk, "NodeLabelCellCreator/lambda$0$Type", 790), b(1474, 1, Yn, i5n), s.td = function(e) { + Qte(this.a, u(e, 181)); + }, w(sk, "PortContextCreator/lambda$0$Type", 1474); + var JA; + b(1829, 1, {}, Gln), w(I4, "GreedyRectangleStripOverlapRemover", 1829), b(1830, 1, at, Hln), s.ue = function(e, t) { + return Nce(u(e, 222), u(t, 222)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(I4, "GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type", 1830), b(1786, 1, {}, Zmn), s.a = 5, s.e = 0, w(I4, "RectangleStripOverlapRemover", 1786), b(1787, 1, at, Uln), s.ue = function(e, t) { + return Bce(u(e, 222), u(t, 222)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(I4, "RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type", 1787), b(1789, 1, at, Wln), s.ue = function(e, t) { + return ohe(u(e, 222), u(t, 222)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(I4, "RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type", 1789), b(406, 22, { 3: 1, 35: 1, 22: 1, 406: 1 }, _j); + var Ik, MR, AR, Ok, EUn = Me(I4, "RectangleStripOverlapRemover/OverlapRemovalDirection", 406, Ie, gae, ise), CUn; + b(222, 1, { 222: 1 }, jD), w(I4, "RectangleStripOverlapRemover/RectangleNode", 222), b(1788, 1, Yn, r5n), s.td = function(e) { + a3e(this.a, u(e, 222)); + }, w(I4, "RectangleStripOverlapRemover/lambda$1$Type", 1788), b(1304, 1, at, Xln), s.ue = function(e, t) { + return vje(u(e, 167), u(t, 167)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(_f, "PolyominoCompactor/CornerCasesGreaterThanRestComparator", 1304), b(1307, 1, {}, Vln), s.Kb = function(e) { + return u(e, 324).a; + }, w(_f, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type", 1307), b(1308, 1, Ve, Qln), s.Mb = function(e) { + return u(e, 323).a; + }, w(_f, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type", 1308), b(1309, 1, Ve, Jln), s.Mb = function(e) { + return u(e, 323).a; + }, w(_f, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type", 1309), b(1302, 1, at, Yln), s.ue = function(e, t) { + return Y7e(u(e, 167), u(t, 167)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(_f, "PolyominoCompactor/MinNumOfExtensionDirectionsComparator", 1302), b(1305, 1, {}, zln), s.Kb = function(e) { + return u(e, 324).a; + }, w(_f, "PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type", 1305), b(767, 1, at, xH), s.ue = function(e, t) { + return nwe(u(e, 167), u(t, 167)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(_f, "PolyominoCompactor/MinNumOfExtensionsComparator", 767), b(1300, 1, at, Zln), s.ue = function(e, t) { + return fbe(u(e, 321), u(t, 321)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(_f, "PolyominoCompactor/MinPerimeterComparator", 1300), b(1301, 1, at, nan), s.ue = function(e, t) { + return Rpe(u(e, 321), u(t, 321)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(_f, "PolyominoCompactor/MinPerimeterComparatorWithShape", 1301), b(1303, 1, at, ean), s.ue = function(e, t) { + return yke(u(e, 167), u(t, 167)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(_f, "PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator", 1303), b(1306, 1, {}, tan), s.Kb = function(e) { + return u(e, 324).a; + }, w(_f, "PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type", 1306), b(777, 1, {}, _G), s.Ce = function(e, t) { + return aae(this, u(e, 46), u(t, 167)); + }, w(_f, "SuccessorCombination", 777), b(644, 1, {}, wI), s.Ce = function(e, t) { + var i; + return eme((i = u(e, 46), u(t, 167), i)); + }, w(_f, "SuccessorJitter", 644), b(643, 1, {}, gI), s.Ce = function(e, t) { + var i; + return q8e((i = u(e, 46), u(t, 167), i)); + }, w(_f, "SuccessorLineByLine", 643), b(568, 1, {}, Uy), s.Ce = function(e, t) { + var i; + return t9e((i = u(e, 46), u(t, 167), i)); + }, w(_f, "SuccessorManhattan", 568), b(1356, 1, {}, ian), s.Ce = function(e, t) { + var i; + return d8e((i = u(e, 46), u(t, 167), i)); + }, w(_f, "SuccessorMaxNormWindingInMathPosSense", 1356), b(400, 1, {}, Kp), s.Ce = function(e, t) { + return SW(this, e, t); + }, s.c = !1, s.d = !1, s.e = !1, s.f = !1, w(_f, "SuccessorQuadrantsGeneric", 400), b(1357, 1, {}, ran), s.Kb = function(e) { + return u(e, 324).a; + }, w(_f, "SuccessorQuadrantsGeneric/lambda$0$Type", 1357), b(323, 22, { 3: 1, 35: 1, 22: 1, 323: 1 }, Rj), s.a = !1; + var Dk, $k, Fk, xk, TUn = Me(BM, bnn, 323, Ie, mae, rse), MUn; + b(1298, 1, {}), s.Ib = function() { + var e, t, i, r, c, o; + for (i = " ", e = Q(0), c = 0; c < this.o; c++) + i += "" + e.a, e = Q($jn(e.a)); + for (i += ` +`, e = Q(0), o = 0; o < this.p; o++) { + for (i += "" + e.a, e = Q($jn(e.a)), r = 0; r < this.o; r++) + t = Q$(this, r, o), hc(t, 0) == 0 ? i += "_" : hc(t, 1) == 0 ? i += "X" : i += "0"; + i += ` +`; + } + return Zu(i, 0, i.length - 1); + }, s.o = 0, s.p = 0, w(BM, "TwoBitGrid", 1298), b(321, 1298, { 321: 1 }, xQ), s.j = 0, s.k = 0, w(BM, "PlanarGrid", 321), b(167, 321, { 321: 1, 167: 1 }), s.g = 0, s.i = 0, w(BM, "Polyomino", 167); + var QTe = Ct(ok, DKn); + b(134, 1, wnn, pI), s.Ye = function(e, t) { + return s7(this, e, t); + }, s.Ve = function() { + return eCn(this); + }, s.We = function(e) { + return k(this, e); + }, s.Xe = function(e) { + return ai(this, e); + }, w(ok, "MapPropertyHolder", 134), b(1299, 134, wnn, FNn), w(BM, "Polyominoes", 1299); + var AUn = !1, gm, vrn; + b(1766, 1, Yn, can), s.td = function(e) { + DRn(u(e, 221)); + }, w(np, "DepthFirstCompaction/0methodref$compactTree$Type", 1766), b(810, 1, Yn, Aq), s.td = function(e) { + $he(this.a, u(e, 221)); + }, w(np, "DepthFirstCompaction/lambda$1$Type", 810), b(1767, 1, Yn, bEn), s.td = function(e) { + ipe(this.a, this.b, this.c, u(e, 221)); + }, w(np, "DepthFirstCompaction/lambda$2$Type", 1767); + var pm, mrn; + b(65, 1, { 65: 1 }, yMn), w(np, "Node", 65), b(1250, 1, {}, jyn), w(np, "ScanlineOverlapCheck", 1250), b(1251, 1, { 679: 1 }, KTn), s.Ke = function(e) { + gue(this, u(e, 440)); + }, w(np, "ScanlineOverlapCheck/OverlapsScanlineHandler", 1251), b(1252, 1, at, uan), s.ue = function(e, t) { + return Rge(u(e, 65), u(t, 65)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(np, "ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type", 1252), b(440, 1, { 440: 1 }, KG), s.a = !1, w(np, "ScanlineOverlapCheck/Timestamp", 440), b(1253, 1, at, san), s.ue = function(e, t) { + return w4e(u(e, 440), u(t, 440)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(np, "ScanlineOverlapCheck/lambda$0$Type", 1253), b(550, 1, {}, Wy), w($Kn, "SVGImage", 550), b(324, 1, { 324: 1 }, FU), s.Ib = function() { + return "(" + this.a + Qi + this.b + Qi + this.c + ")"; + }, w($Kn, "UniqueTriple", 324), b(209, 1, La), w(og, "AbstractLayoutProvider", 209), b(1132, 209, La, oan), s.Ze = function(e, t) { + var i, r, c, o; + switch (le(t, FKn, 1), this.a = K(Y(hn(e, (a6(), Trn)))), ga(e, PR) && (c = Ce(hn(e, PR)), i = Vx(L3(), c), i && (r = u(n$(i.f), 209), r.Ze(e, yc(t, 1)))), o = new NAn(this.a), this.b = rCe(o, e), u(hn(e, (pF(), yrn)), 481).g) { + case 0: + kme(new fan(), this.b), pr(e, nS, k(this.b, nS)); + break; + default: + Zf(); + } + aCe(o), pr(e, Ern, this.b), ce(t); + }, s.a = 0, w(xKn, "DisCoLayoutProvider", 1132), b(1244, 1, {}, fan), s.c = !1, s.e = 0, s.f = 0, w(xKn, "DisCoPolyominoCompactor", 1244), b(561, 1, { 561: 1 }, uCn), s.b = !0, w(_M, "DCComponent", 561), b(394, 22, { 3: 1, 35: 1, 22: 1, 394: 1 }, Bj), s.a = !1; + var YA, Lk, ZA, Nk, SUn = Me(_M, "DCDirection", 394, Ie, vae, cse), PUn; + b(266, 134, { 3: 1, 266: 1, 94: 1, 134: 1 }, xx), w(_M, "DCElement", 266), b(395, 1, { 395: 1 }, cJ), s.c = 0, w(_M, "DCExtension", 395), b(755, 134, wnn, i8n), w(_M, "DCGraph", 755), b(481, 22, { 3: 1, 35: 1, 22: 1, 481: 1 }, sjn); + var SR, krn = Me(pN, gnn, 481, Ie, Xhe, use), IUn; + b(854, 1, zs, u4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), pnn), LKn), "Connected Components Compaction Strategy"), "Strategy for packing different connected components in order to save space and enhance readability of a graph."), jrn), (j1(), Rt)), krn), Cn((Ho(), Xn))))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), vnn), LKn), "Connected Components Layout Algorithm"), "A layout algorithm that is to be applied to each connected component before the components themselves are compacted. If unspecified, the positions of the components' nodes are not altered."), mv), tn), Cn(Xn)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), mnn), "debug"), "DCGraph"), "Access to the DCGraph is intended for the debug view,"), yf), Zn), Cn(Xn)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), knn), "debug"), "List of Polyominoes"), "Access to the polyominoes is intended for the debug view,"), yf), Zn), Cn(Xn)))), kRn((new s4n(), e)); + }; + var OUn, yrn, jrn, DUn, $Un; + w(pN, "DisCoMetaDataProvider", 854), b(998, 1, zs, s4n), s.Qe = function(e) { + kRn(e); + }; + var FUn, PR, xUn, Ern, nS, IR, Crn, LUn, NUn, BUn, RUn, Trn; + w(pN, "DisCoOptions", 998), b(999, 1, {}, han), s.$e = function() { + var e; + return e = new oan(), e; + }, s._e = function(e) { + }, w(pN, "DisCoOptions/DiscoFactory", 999), b(562, 167, { 321: 1, 167: 1, 562: 1 }, pNn), s.a = 0, s.b = 0, s.c = 0, s.d = 0, w("org.eclipse.elk.alg.disco.structures", "DCPolyomino", 562); + var OR, DR, eS; + b(1268, 1, Ve, lan), s.Mb = function(e) { + return gz(e); + }, w(fg, "ElkGraphComponentsProcessor/lambda$0$Type", 1268), b(1269, 1, {}, aan), s.Kb = function(e) { + return C2(), fh(u(e, 79)); + }, w(fg, "ElkGraphComponentsProcessor/lambda$1$Type", 1269), b(1270, 1, Ve, dan), s.Mb = function(e) { + return cfe(u(e, 79)); + }, w(fg, "ElkGraphComponentsProcessor/lambda$2$Type", 1270), b(1271, 1, {}, ban), s.Kb = function(e) { + return C2(), ml(u(e, 79)); + }, w(fg, "ElkGraphComponentsProcessor/lambda$3$Type", 1271), b(1272, 1, Ve, wan), s.Mb = function(e) { + return ufe(u(e, 79)); + }, w(fg, "ElkGraphComponentsProcessor/lambda$4$Type", 1272), b(1273, 1, Ve, c5n), s.Mb = function(e) { + return Q1e(this.a, u(e, 79)); + }, w(fg, "ElkGraphComponentsProcessor/lambda$5$Type", 1273), b(1274, 1, {}, u5n), s.Kb = function(e) { + return bhe(this.a, u(e, 79)); + }, w(fg, "ElkGraphComponentsProcessor/lambda$6$Type", 1274), b(1241, 1, {}, NAn), s.a = 0, w(fg, "ElkGraphTransformer", 1241), b(1242, 1, {}, gan), s.Od = function(e, t) { + cme(this, u(e, 160), u(t, 266)); + }, w(fg, "ElkGraphTransformer/OffsetApplier", 1242), b(1243, 1, Yn, s5n), s.td = function(e) { + Ice(this, u(e, 8)); + }, w(fg, "ElkGraphTransformer/OffsetApplier/OffSetToChainApplier", 1243), b(753, 1, {}, LH), w(jnn, Enn, 753), b(1232, 1, at, pan), s.ue = function(e, t) { + return z6e(u(e, 231), u(t, 231)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(jnn, NKn, 1232), b(740, 209, La, Uq), s.Ze = function(e, t) { + kNn(this, e, t); + }, w(jnn, "ForceLayoutProvider", 740), b(357, 134, { 3: 1, 357: 1, 94: 1, 134: 1 }), w(fk, "FParticle", 357), b(559, 357, { 3: 1, 559: 1, 357: 1, 94: 1, 134: 1 }, KCn), s.Ib = function() { + var e; + return this.a ? (e = xr(this.a.a, this, 0), e >= 0 ? "b" + e + "[" + k$(this.a) + "]" : "b[" + k$(this.a) + "]") : "b_" + kd(this); + }, w(fk, "FBendpoint", 559), b(282, 134, { 3: 1, 282: 1, 94: 1, 134: 1 }, Ljn), s.Ib = function() { + return k$(this); + }, w(fk, "FEdge", 282), b(231, 134, { 3: 1, 231: 1, 94: 1, 134: 1 }, TC); + var JTe = w(fk, "FGraph", 231); + b(447, 357, { 3: 1, 447: 1, 357: 1, 94: 1, 134: 1 }, RAn), s.Ib = function() { + return this.b == null || this.b.length == 0 ? "l[" + k$(this.a) + "]" : "l_" + this.b; + }, w(fk, "FLabel", 447), b(144, 357, { 3: 1, 144: 1, 357: 1, 94: 1, 134: 1 }, VCn), s.Ib = function() { + return cX(this); + }, s.b = 0, w(fk, "FNode", 144), b(2003, 1, {}), s.bf = function(e) { + gZ(this, e); + }, s.cf = function() { + vFn(this); + }, s.d = 0, w(Cnn, "AbstractForceModel", 2003), b(631, 2003, { 631: 1 }, SOn), s.af = function(e, t) { + var i, r, c, o, f; + return bLn(this.f, e, t), c = ji(Qr(t.d), e.d), f = j.Math.sqrt(c.a * c.a + c.b * c.b), r = j.Math.max(0, f - L5(e.e) / 2 - L5(t.e) / 2), i = rDn(this.e, e, t), i > 0 ? o = -che(r, this.c) * i : o = Jce(r, this.b) * u(k(e, (Go(), V4)), 19).a, If(c, o / f), c; + }, s.bf = function(e) { + gZ(this, e), this.a = u(k(e, (Go(), iS)), 19).a, this.c = K(Y(k(e, rS))), this.b = K(Y(k(e, FR))); + }, s.df = function(e) { + return e < this.a; + }, s.a = 0, s.b = 0, s.c = 0, w(Cnn, "EadesModel", 631), b(632, 2003, { 632: 1 }, PEn), s.af = function(e, t) { + var i, r, c, o, f; + return bLn(this.f, e, t), c = ji(Qr(t.d), e.d), f = j.Math.sqrt(c.a * c.a + c.b * c.b), r = j.Math.max(0, f - L5(e.e) / 2 - L5(t.e) / 2), o = Qce(r, this.a) * u(k(e, (Go(), V4)), 19).a, i = rDn(this.e, e, t), i > 0 && (o -= fie(r, this.a) * i), If(c, o * this.b / f), c; + }, s.bf = function(e) { + var t, i, r, c, o, f, h; + for (gZ(this, e), this.b = K(Y(k(e, (Go(), xR)))), this.c = this.b / u(k(e, iS), 19).a, r = e.e.c.length, o = 0, c = 0, h = new E(e.e); h.a < h.c.c.length; ) + f = u(y(h), 144), o += f.e.a, c += f.e.b; + t = o * c, i = K(Y(k(e, rS))) * bf, this.a = j.Math.sqrt(t / (2 * r)) * i; + }, s.cf = function() { + vFn(this), this.b -= this.c; + }, s.df = function(e) { + return this.b > 0; + }, s.a = 0, s.b = 0, s.c = 0, w(Cnn, "FruchtermanReingoldModel", 632), b(849, 1, zs, f4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), KM), ""), "Force Model"), "Determines the model for force calculation."), Mrn), (j1(), Rt)), Arn), Cn((Ho(), Xn))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Tnn), ""), "Iterations"), "The number of iterations on the force model."), Q(300)), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Mnn), ""), "Repulsive Power"), "Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"), Q(0)), sc), Ui), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), yN), ""), "FR Temperature"), "The temperature is used as a scaling factor for particle displacements."), Kf), Dr), Si), Cn(Xn)))), Mi(e, yN, KM, UUn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), jN), ""), "Eades Repulsion"), "Factor for repulsive forces in Eades' model."), 5), Dr), Si), Cn(Xn)))), Mi(e, jN, KM, qUn), w_n((new h4n(), e)); + }; + var _Un, KUn, Mrn, HUn, qUn, GUn, zUn, UUn; + w(H6, "ForceMetaDataProvider", 849), b(424, 22, { 3: 1, 35: 1, 22: 1, 424: 1 }, GG); + var $R, tS, Arn = Me(H6, "ForceModelStrategy", 424, Ie, z1e, sse), WUn; + b(988, 1, zs, h4n), s.Qe = function(e) { + w_n(e); + }; + var XUn, VUn, Srn, iS, Prn, QUn, JUn, YUn, Irn, ZUn, Orn, Drn, nWn, V4, eWn, FR, $rn, tWn, iWn, rS, xR; + w(H6, "ForceOptions", 988), b(989, 1, {}, van), s.$e = function() { + var e; + return e = new Uq(), e; + }, s._e = function(e) { + }, w(H6, "ForceOptions/ForceFactory", 989); + var Bk, vm, hp, cS; + b(850, 1, zs, l4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Snn), ""), "Fixed Position"), "Prevent that the node is moved by the layout algorithm."), (qn(), !1)), (j1(), _i)), oi), Cn((Ho(), vi))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Pnn), ""), "Desired Edge Length"), "Either specified for parent nodes or for individual edges, where the latter takes higher precedence."), 100), Dr), Si), vt(Xn, A(M(F1, 1), z, 175, 0, [Yf]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Inn), ""), "Layout Dimension"), "Dimensions that are permitted to be altered during layout."), Frn), Rt), Krn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Onn), ""), "Stress Epsilon"), "Termination criterion for the iterative process."), Kf), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Dnn), ""), "Iteration Limit"), "Maximum number of performed iterations. Takes higher precedence than 'epsilon'."), Q(nt)), sc), Ui), Cn(Xn)))), ZRn((new a4n(), e)); + }; + var rWn, cWn, Frn, uWn, sWn, oWn; + w(H6, "StressMetaDataProvider", 850), b(992, 1, zs, a4n), s.Qe = function(e) { + ZRn(e); + }; + var uS, xrn, Lrn, Nrn, Brn, Rrn, fWn, hWn, lWn, aWn, _rn, dWn; + w(H6, "StressOptions", 992), b(993, 1, {}, man), s.$e = function() { + var e; + return e = new Njn(), e; + }, s._e = function(e) { + }, w(H6, "StressOptions/StressFactory", 993), b(1128, 209, La, Njn), s.Ze = function(e, t) { + var i, r, c, o, f; + for (le(t, HKn, 1), on(sn(hn(e, (C7(), Brn)))) ? on(sn(hn(e, _rn))) || oC((i = new O9((H0(), new B0(e))), i)) : kNn(new Uq(), e, yc(t, 1)), c = QOn(e), r = fRn(this.a, c), f = r.Kc(); f.Ob(); ) + o = u(f.Pb(), 231), !(o.e.c.length <= 1) && (gje(this.b, o), Xme(this.b), Yc(o.d, new kan())); + c = j_n(r), m_n(c), ce(t); + }, w(GM, "StressLayoutProvider", 1128), b(1129, 1, Yn, kan), s.td = function(e) { + EZ(u(e, 447)); + }, w(GM, "StressLayoutProvider/lambda$0$Type", 1129), b(990, 1, {}, Umn), s.c = 0, s.e = 0, s.g = 0, w(GM, "StressMajorization", 990), b(379, 22, { 3: 1, 35: 1, 22: 1, 379: 1 }, hO); + var LR, NR, BR, Krn = Me(GM, "StressMajorization/Dimension", 379, Ie, mle, ose), bWn; + b(991, 1, at, o5n), s.ue = function(e, t) { + return Bue(this.a, u(e, 144), u(t, 144)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(GM, "StressMajorization/lambda$0$Type", 991), b(1229, 1, {}, YMn), w(rp, "ElkLayered", 1229), b(1230, 1, Yn, yan), s.td = function(e) { + V6e(u(e, 37)); + }, w(rp, "ElkLayered/lambda$0$Type", 1230), b(1231, 1, Yn, f5n), s.td = function(e) { + Rue(this.a, u(e, 37)); + }, w(rp, "ElkLayered/lambda$1$Type", 1231), b(1263, 1, {}, Cyn); + var wWn, gWn, pWn; + w(rp, "GraphConfigurator", 1263), b(759, 1, Yn, Sq), s.td = function(e) { + Mxn(this.a, u(e, 10)); + }, w(rp, "GraphConfigurator/lambda$0$Type", 759), b(760, 1, {}, NH), s.Kb = function(e) { + return kJ(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(rp, "GraphConfigurator/lambda$1$Type", 760), b(761, 1, Yn, Pq), s.td = function(e) { + Mxn(this.a, u(e, 10)); + }, w(rp, "GraphConfigurator/lambda$2$Type", 761), b(1127, 209, La, Vmn), s.Ze = function(e, t) { + var i; + i = Nye(new e9n(), e), B(hn(e, (nn(), Qb))) === B((_h(), x1)) ? w2e(this.a, i, t) : lme(this.a, i, t), b_n(new b4n(), i); + }, w(rp, "LayeredLayoutProvider", 1127), b(356, 22, { 3: 1, 35: 1, 22: 1, 356: 1 }, U9); + var Vf, $l, Kc, Tc, Or, Hrn = Me(rp, "LayeredPhases", 356, Ie, tde, fse), vWn; + b(1651, 1, {}, NIn), s.i = 0; + var mWn; + w(ak, "ComponentsToCGraphTransformer", 1651); + var kWn; + b(1652, 1, {}, jan), s.ef = function(e, t) { + return j.Math.min(e.a != null ? K(e.a) : e.c.i, t.a != null ? K(t.a) : t.c.i); + }, s.ff = function(e, t) { + return j.Math.min(e.a != null ? K(e.a) : e.c.i, t.a != null ? K(t.a) : t.c.i); + }, w(ak, "ComponentsToCGraphTransformer/1", 1652), b(81, 1, { 81: 1 }), s.i = 0, s.k = !0, s.o = Vt; + var RR = w(z6, "CNode", 81); + b(460, 81, { 460: 1, 81: 1 }, zz, UQ), s.Ib = function() { + return ""; + }, w(ak, "ComponentsToCGraphTransformer/CRectNode", 460), b(1623, 1, {}, Ean); + var _R, KR; + w(ak, "OneDimensionalComponentsCompaction", 1623), b(1624, 1, {}, Can), s.Kb = function(e) { + return hle(u(e, 46)); + }, s.Fb = function(e) { + return this === e; + }, w(ak, "OneDimensionalComponentsCompaction/lambda$0$Type", 1624), b(1625, 1, {}, Tan), s.Kb = function(e) { + return E2e(u(e, 46)); + }, s.Fb = function(e) { + return this === e; + }, w(ak, "OneDimensionalComponentsCompaction/lambda$1$Type", 1625), b(1654, 1, {}, XCn), w(z6, "CGraph", 1654), b(189, 1, { 189: 1 }, _F), s.b = 0, s.c = 0, s.e = 0, s.g = !0, s.i = Vt, w(z6, "CGroup", 189), b(1653, 1, {}, Pan), s.ef = function(e, t) { + return j.Math.max(e.a != null ? K(e.a) : e.c.i, t.a != null ? K(t.a) : t.c.i); + }, s.ff = function(e, t) { + return j.Math.max(e.a != null ? K(e.a) : e.c.i, t.a != null ? K(t.a) : t.c.i); + }, w(z6, gKn, 1653), b(1655, 1, {}, ALn), s.d = !1; + var yWn, HR = w(z6, mKn, 1655); + b(1656, 1, {}, Ian), s.Kb = function(e) { + return OG(), qn(), u(u(e, 46).a, 81).d.e != 0; + }, s.Fb = function(e) { + return this === e; + }, w(z6, kKn, 1656), b(823, 1, {}, eW), s.a = !1, s.b = !1, s.c = !1, s.d = !1, w(z6, yKn, 823), b(1825, 1, {}, aCn), w(zM, jKn, 1825); + var Rk = Ct(Ba, bKn); + b(1826, 1, { 369: 1 }, qTn), s.Ke = function(e) { + r7e(this, u(e, 466)); + }, w(zM, EKn, 1826), b(1827, 1, at, Oan), s.ue = function(e, t) { + return r1e(u(e, 81), u(t, 81)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(zM, CKn, 1827), b(466, 1, { 466: 1 }, UG), s.a = !1, w(zM, TKn, 466), b(1828, 1, at, Dan), s.ue = function(e, t) { + return g4e(u(e, 466), u(t, 466)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(zM, MKn, 1828), b(140, 1, { 140: 1 }, e3, QU), s.Fb = function(e) { + var t; + return e == null || YTe != Du(e) ? !1 : (t = u(e, 140), vc(this.c, t.c) && vc(this.d, t.d)); + }, s.Hb = function() { + return gT(A(M(Zn, 1), rn, 1, 5, [this.c, this.d])); + }, s.Ib = function() { + return "(" + this.c + Qi + this.d + (this.a ? "cx" : "") + this.b + ")"; + }, s.a = !0, s.c = 0, s.d = 0; + var YTe = w(Ba, "Point", 140); + b(405, 22, { 3: 1, 35: 1, 22: 1, 405: 1 }, Kj); + var w0, Hb, kg, qb, jWn = Me(Ba, "Point/Quadrant", 405, Ie, kae, hse), EWn; + b(1642, 1, {}, Qmn), s.b = null, s.c = null, s.d = null, s.e = null, s.f = null; + var CWn, TWn, MWn, AWn, SWn; + w(Ba, "RectilinearConvexHull", 1642), b(574, 1, { 369: 1 }, LT), s.Ke = function(e) { + i0e(this, u(e, 140)); + }, s.b = 0; + var qrn; + w(Ba, "RectilinearConvexHull/MaximalElementsEventHandler", 574), b(1644, 1, at, Aan), s.ue = function(e, t) { + return Whe(Y(e), Y(t)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Ba, "RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type", 1644), b(1643, 1, { 369: 1 }, uIn), s.Ke = function(e) { + p8e(this, u(e, 140)); + }, s.a = 0, s.b = null, s.c = null, s.d = null, s.e = null, w(Ba, "RectilinearConvexHull/RectangleEventHandler", 1643), b(1645, 1, at, San), s.ue = function(e, t) { + return Qle(u(e, 140), u(t, 140)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Ba, "RectilinearConvexHull/lambda$0$Type", 1645), b(1646, 1, at, Man), s.ue = function(e, t) { + return Jle(u(e, 140), u(t, 140)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Ba, "RectilinearConvexHull/lambda$1$Type", 1646), b(1647, 1, at, $an), s.ue = function(e, t) { + return Zle(u(e, 140), u(t, 140)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Ba, "RectilinearConvexHull/lambda$2$Type", 1647), b(1648, 1, at, Fan), s.ue = function(e, t) { + return Yle(u(e, 140), u(t, 140)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Ba, "RectilinearConvexHull/lambda$3$Type", 1648), b(1649, 1, at, xan), s.ue = function(e, t) { + return e5e(u(e, 140), u(t, 140)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Ba, "RectilinearConvexHull/lambda$4$Type", 1649), b(1650, 1, {}, kMn), w(Ba, "Scanline", 1650), b(2005, 1, {}), w(Hf, "AbstractGraphPlacer", 2005), b(325, 1, { 325: 1 }, ajn), s.mf = function(e) { + return this.nf(e) ? (Tn(this.b, u(k(e, (G(), zb)), 21), e), !0) : !1; + }, s.nf = function(e) { + var t, i, r, c; + for (t = u(k(e, (G(), zb)), 21), c = u(ct(dt, t), 21), r = c.Kc(); r.Ob(); ) + if (i = u(r.Pb(), 21), !u(ct(this.b, i), 15).dc()) + return !1; + return !0; + }; + var dt; + w(Hf, "ComponentGroup", 325), b(765, 2005, {}, Qq), s.of = function(e) { + var t, i; + for (i = new E(this.a); i.a < i.c.c.length; ) + if (t = u(y(i), 325), t.mf(e)) + return; + W(this.a, new ajn(e)); + }, s.lf = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m; + if (this.a.c = F(Zn, rn, 1, 0, 5, 1), t.a.c = F(Zn, rn, 1, 0, 5, 1), e.dc()) { + t.f.a = 0, t.f.b = 0; + return; + } + for (f = u(e.Xb(0), 37), Pr(t, f), c = e.Kc(); c.Ob(); ) + r = u(c.Pb(), 37), this.of(r); + for (m = new Li(), o = K(Y(k(f, (nn(), Zk)))), a = new E(this.a); a.a < a.c.c.length; ) + h = u(y(a), 325), d = I_n(h, o), d1(XE(h.b), m.a, m.b), m.a += d.a, m.b += d.b; + if (t.f.a = m.a - o, t.f.b = m.b - o, on(sn(k(f, US))) && B(k(f, Qh)) === B((Hh(), Ev))) { + for (v = e.Kc(); v.Ob(); ) + g = u(v.Pb(), 37), M6(g, g.c.a, g.c.b); + for (i = new vI(), qZ(i, e, o), p = e.Kc(); p.Ob(); ) + g = u(p.Pb(), 37), st(Lo(g.c), i.e); + st(Lo(t.f), i.a); + } + for (l = new E(this.a); l.a < l.c.c.length; ) + h = u(y(l), 325), qX(t, XE(h.b)); + }, w(Hf, "ComponentGroupGraphPlacer", 765), b(1293, 765, {}, o9n), s.of = function(e) { + NDn(this, e); + }, s.lf = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x; + if (this.a.c = F(Zn, rn, 1, 0, 5, 1), t.a.c = F(Zn, rn, 1, 0, 5, 1), e.dc()) { + t.f.a = 0, t.f.b = 0; + return; + } + for (f = u(e.Xb(0), 37), Pr(t, f), c = e.Kc(); c.Ob(); ) + r = u(c.Pb(), 37), NDn(this, r); + for (x = new Li(), O = new Li(), C = new Li(), m = new Li(), o = K(Y(k(f, (nn(), Zk)))), a = new E(this.a); a.a < a.c.c.length; ) { + if (h = u(y(a), 325), tl(u(k(t, (Xe(), S0)), 103))) { + for (C.a = x.a, $ = new _v(x5(ND(h.b).a).a.kc()); $.b.Ob(); ) + if (S = u(Fj($.b.Pb()), 21), S.Hc((J(), Kn))) { + C.a = O.a; + break; + } + } else if (i3(u(k(t, S0), 103))) { + for (C.b = x.b, $ = new _v(x5(ND(h.b).a).a.kc()); $.b.Ob(); ) + if (S = u(Fj($.b.Pb()), 21), S.Hc((J(), Gn))) { + C.b = O.b; + break; + } + } + if (d = I_n(u(h, 570), o), d1(XE(h.b), C.a, C.b), tl(u(k(t, S0), 103))) { + for (O.a = C.a + d.a, m.a = j.Math.max(m.a, O.a), $ = new _v(x5(ND(h.b).a).a.kc()); $.b.Ob(); ) + if (S = u(Fj($.b.Pb()), 21), S.Hc((J(), ae))) { + x.a = C.a + d.a; + break; + } + O.b = C.b + d.b, C.b = O.b, m.b = j.Math.max(m.b, C.b); + } else if (i3(u(k(t, S0), 103))) { + for (O.b = C.b + d.b, m.b = j.Math.max(m.b, O.b), $ = new _v(x5(ND(h.b).a).a.kc()); $.b.Ob(); ) + if (S = u(Fj($.b.Pb()), 21), S.Hc((J(), Vn))) { + x.b = C.b + d.b; + break; + } + O.a = C.a + d.a, C.a = O.a, m.a = j.Math.max(m.a, C.a); + } + } + if (t.f.a = m.a - o, t.f.b = m.b - o, on(sn(k(f, US))) && B(k(f, Qh)) === B((Hh(), Ev))) { + for (v = e.Kc(); v.Ob(); ) + g = u(v.Pb(), 37), M6(g, g.c.a, g.c.b); + for (i = new vI(), qZ(i, e, o), p = e.Kc(); p.Ob(); ) + g = u(p.Pb(), 37), st(Lo(g.c), i.e); + st(Lo(t.f), i.a); + } + for (l = new E(this.a); l.a < l.c.c.length; ) + h = u(y(l), 325), qX(t, XE(h.b)); + }, w(Hf, "ComponentGroupModelOrderGraphPlacer", 1293), b(423, 22, { 3: 1, 35: 1, 22: 1, 423: 1 }, lO); + var qR, Grn, yg, zrn = Me(Hf, "ComponentOrderingStrategy", 423, Ie, vle, lse), PWn; + b(650, 1, {}, vI), w(Hf, "ComponentsCompactor", 650), b(1468, 12, sKn, bSn), s.Fc = function(e) { + return v6(this, u(e, 140)); + }, w(Hf, "ComponentsCompactor/Hullpoints", 1468), b(1465, 1, { 841: 1 }, Z$n), s.a = !1, w(Hf, "ComponentsCompactor/InternalComponent", 1465), b(1464, 1, lh, Jmn), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return new E(this.a); + }, w(Hf, "ComponentsCompactor/InternalConnectedComponents", 1464), b(1467, 1, { 594: 1 }, PLn), s.hf = function() { + return null; + }, s.jf = function() { + return this.a; + }, s.gf = function() { + return GF(this.d); + }, s.kf = function() { + return this.b; + }, w(Hf, "ComponentsCompactor/InternalExternalExtension", 1467), b(1466, 1, { 594: 1 }, n9n), s.jf = function() { + return this.a; + }, s.gf = function() { + return GF(this.d); + }, s.hf = function() { + return this.c; + }, s.kf = function() { + return this.b; + }, w(Hf, "ComponentsCompactor/InternalUnionExternalExtension", 1466), b(1470, 1, {}, WNn), w(Hf, "ComponentsCompactor/OuterSegments", 1470), b(1469, 1, {}, Ymn), w(Hf, "ComponentsCompactor/Segments", 1469), b(1264, 1, {}, GTn), w(Hf, Enn, 1264), b(1265, 1, at, Lan), s.ue = function(e, t) { + return tae(u(e, 37), u(t, 37)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Hf, "ComponentsProcessor/lambda$0$Type", 1265), b(570, 325, { 325: 1, 570: 1 }, dSn), s.mf = function(e) { + return QV(this, e); + }, s.nf = function(e) { + return ANn(this, e); + }; + var Ne; + w(Hf, "ModelOrderComponentGroup", 570), b(1291, 2005, {}, Nan), s.lf = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en; + if (e.gc() == 1) { + x = u(e.Xb(0), 37), x != t && (t.a.c = F(Zn, rn, 1, 0, 5, 1), DBn(t, x, 0, 0), Pr(t, x), GW(t.d, x.d), t.f.a = x.f.a, t.f.b = x.f.b); + return; + } else if (e.dc()) { + t.a.c = F(Zn, rn, 1, 0, 5, 1), t.f.a = 0, t.f.b = 0; + return; + } + if (B(k(t, (nn(), kp))) === B((Gd(), yg))) { + for (l = e.Kc(); l.Ob(); ) { + for (f = u(l.Pb(), 37), $ = 0, C = new E(f.a); C.a < C.c.c.length; ) + m = u(y(C), 10), $ += u(k(m, $Qn), 19).a; + f.p = $; + } + Pn(), e.ad(new Ban()); + } + for (o = u(e.Xb(0), 37), t.a.c = F(Zn, rn, 1, 0, 5, 1), Pr(t, o), v = 0, _ = 0, a = e.Kc(); a.Ob(); ) + f = u(a.Pb(), 37), O = f.f, v = j.Math.max(v, O.a), _ += O.a * O.b; + for (v = j.Math.max(v, j.Math.sqrt(_) * K(Y(k(t, zS)))), c = K(Y(k(t, Zk))), U = 0, en = 0, p = 0, i = c, h = e.Kc(); h.Ob(); ) + f = u(h.Pb(), 37), O = f.f, U + O.a > v && (U = 0, en += p + c, p = 0), S = f.c, M6(f, U + S.a, en + S.b), Lo(S), i = j.Math.max(i, U + O.a), p = j.Math.max(p, O.b), U += O.a + c; + if (t.f.a = i, t.f.b = en + p, on(sn(k(o, US)))) { + for (r = new vI(), qZ(r, e, c), g = e.Kc(); g.Ob(); ) + d = u(g.Pb(), 37), st(Lo(d.c), r.e); + st(Lo(t.f), r.a); + } + qX(t, e); + }, w(Hf, "SimpleRowGraphPlacer", 1291), b(1292, 1, at, Ban), s.ue = function(e, t) { + return Zbe(u(e, 37), u(t, 37)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Hf, "SimpleRowGraphPlacer/1", 1292); + var IWn; + b(1262, 1, Rf, Ran), s.Lb = function(e) { + var t; + return t = u(k(u(e, 243).b, (nn(), Mr)), 74), !!t && t.b != 0; + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + var t; + return t = u(k(u(e, 243).b, (nn(), Mr)), 74), !!t && t.b != 0; + }, w(UM, "CompoundGraphPostprocessor/1", 1262), b(1261, 1, Nt, t9n), s.pf = function(e, t) { + eFn(this, u(e, 37), t); + }, w(UM, "CompoundGraphPreprocessor", 1261), b(441, 1, { 441: 1 }, HDn), s.c = !1, w(UM, "CompoundGraphPreprocessor/ExternalPort", 441), b(243, 1, { 243: 1 }, EE), s.Ib = function() { + return VO(this.c) + ":" + ELn(this.b); + }, w(UM, "CrossHierarchyEdge", 243), b(763, 1, at, Iq), s.ue = function(e, t) { + return H3e(this, u(e, 243), u(t, 243)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(UM, "CrossHierarchyEdgeComparator", 763), b(299, 134, { 3: 1, 299: 1, 94: 1, 134: 1 }), s.p = 0, w(Fc, "LGraphElement", 299), b(17, 299, { 3: 1, 17: 1, 299: 1, 94: 1, 134: 1 }, Id), s.Ib = function() { + return ELn(this); + }; + var GR = w(Fc, "LEdge", 17); + b(37, 299, { 3: 1, 20: 1, 37: 1, 299: 1, 94: 1, 134: 1 }, lV), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return new E(this.b); + }, s.Ib = function() { + return this.b.c.length == 0 ? "G-unlayered" + kl(this.a) : this.a.c.length == 0 ? "G-layered" + kl(this.b) : "G[layerless" + kl(this.a) + ", layers" + kl(this.b) + "]"; + }; + var OWn = w(Fc, "LGraph", 37), DWn; + b(657, 1, {}), s.qf = function() { + return this.e.n; + }, s.We = function(e) { + return k(this.e, e); + }, s.rf = function() { + return this.e.o; + }, s.sf = function() { + return this.e.p; + }, s.Xe = function(e) { + return ai(this.e, e); + }, s.tf = function(e) { + this.e.n.a = e.a, this.e.n.b = e.b; + }, s.uf = function(e) { + this.e.o.a = e.a, this.e.o.b = e.b; + }, s.vf = function(e) { + this.e.p = e; + }, w(Fc, "LGraphAdapters/AbstractLShapeAdapter", 657), b(577, 1, { 839: 1 }, ij), s.wf = function() { + var e, t; + if (!this.b) + for (this.b = nh(this.a.b.c.length), t = new E(this.a.b); t.a < t.c.c.length; ) + e = u(y(t), 70), W(this.b, new rj(e)); + return this.b; + }, s.b = null, w(Fc, "LGraphAdapters/LEdgeAdapter", 577), b(656, 1, {}, GD), s.xf = function() { + var e, t, i, r, c, o; + if (!this.b) { + for (this.b = new X(), r = new E(this.a.b); r.a < r.c.c.length; ) + for (i = u(y(r), 29), o = new E(i.a); o.a < o.c.c.length; ) + if (c = u(y(o), 10), this.c.Mb(c) && (W(this.b, new CE(this, c, this.e)), this.d)) { + if (ai(c, (G(), mp))) + for (t = u(k(c, mp), 15).Kc(); t.Ob(); ) + e = u(t.Pb(), 10), W(this.b, new CE(this, e, !1)); + if (ai(c, bp)) + for (t = u(k(c, bp), 15).Kc(); t.Ob(); ) + e = u(t.Pb(), 10), W(this.b, new CE(this, e, !1)); + } + } + return this.b; + }, s.qf = function() { + throw T(new i1(zKn)); + }, s.We = function(e) { + return k(this.a, e); + }, s.rf = function() { + return this.a.f; + }, s.sf = function() { + return this.a.p; + }, s.Xe = function(e) { + return ai(this.a, e); + }, s.tf = function(e) { + throw T(new i1(zKn)); + }, s.uf = function(e) { + this.a.f.a = e.a, this.a.f.b = e.b; + }, s.vf = function(e) { + this.a.p = e; + }, s.b = null, s.d = !1, s.e = !1, w(Fc, "LGraphAdapters/LGraphAdapter", 656), b(576, 657, { 181: 1 }, rj), w(Fc, "LGraphAdapters/LLabelAdapter", 576), b(575, 657, { 680: 1 }, CE), s.yf = function() { + return this.b; + }, s.zf = function() { + return Pn(), Pn(), cr; + }, s.wf = function() { + var e, t; + if (!this.a) + for (this.a = nh(u(this.e, 10).b.c.length), t = new E(u(this.e, 10).b); t.a < t.c.c.length; ) + e = u(y(t), 70), W(this.a, new rj(e)); + return this.a; + }, s.Af = function() { + var e; + return e = u(this.e, 10).d, new mU(e.d, e.c, e.a, e.b); + }, s.Bf = function() { + return Pn(), Pn(), cr; + }, s.Cf = function() { + var e, t; + if (!this.c) + for (this.c = nh(u(this.e, 10).j.c.length), t = new E(u(this.e, 10).j); t.a < t.c.c.length; ) + e = u(y(t), 11), W(this.c, new W7n(e, this.d)); + return this.c; + }, s.Df = function() { + return on(sn(k(u(this.e, 10), (G(), lun)))); + }, s.Ef = function(e) { + u(this.e, 10).d.b = e.b, u(this.e, 10).d.d = e.d, u(this.e, 10).d.c = e.c, u(this.e, 10).d.a = e.a; + }, s.Ff = function(e) { + u(this.e, 10).f.b = e.b, u(this.e, 10).f.d = e.d, u(this.e, 10).f.c = e.c, u(this.e, 10).f.a = e.a; + }, s.Gf = function() { + N0e(this, (Vv(), DWn)); + }, s.a = null, s.b = null, s.c = null, s.d = !1, w(Fc, "LGraphAdapters/LNodeAdapter", 575), b(1722, 657, { 838: 1 }, W7n), s.zf = function() { + var e, t, i, r; + if (this.d && u(this.e, 11).i.k == (Qn(), Mc)) + return Pn(), Pn(), cr; + if (!this.a) { + for (this.a = new X(), i = new E(u(this.e, 11).e); i.a < i.c.c.length; ) + e = u(y(i), 17), W(this.a, new ij(e)); + if (this.d && (r = u(k(u(this.e, 11), (G(), Mu)), 10), r)) + for (t = new re(ue(Lr(r).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 17), W(this.a, new ij(e)); + } + return this.a; + }, s.wf = function() { + var e, t; + if (!this.b) + for (this.b = nh(u(this.e, 11).f.c.length), t = new E(u(this.e, 11).f); t.a < t.c.c.length; ) + e = u(y(t), 70), W(this.b, new rj(e)); + return this.b; + }, s.Bf = function() { + var e, t, i, r; + if (this.d && u(this.e, 11).i.k == (Qn(), Mc)) + return Pn(), Pn(), cr; + if (!this.c) { + for (this.c = new X(), i = new E(u(this.e, 11).g); i.a < i.c.c.length; ) + e = u(y(i), 17), W(this.c, new ij(e)); + if (this.d && (r = u(k(u(this.e, 11), (G(), Mu)), 10), r)) + for (t = new re(ue(ei(r).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 17), W(this.c, new ij(e)); + } + return this.c; + }, s.Hf = function() { + return u(this.e, 11).j; + }, s.If = function() { + return on(sn(k(u(this.e, 11), (G(), Wk)))); + }, s.a = null, s.b = null, s.c = null, s.d = !1, w(Fc, "LGraphAdapters/LPortAdapter", 1722), b(1723, 1, at, _an), s.ue = function(e, t) { + return I7e(u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Fc, "LGraphAdapters/PortComparator", 1723), b(804, 1, Ve, BH), s.Mb = function(e) { + return u(e, 10), Vv(), !0; + }, w(Fc, "LGraphAdapters/lambda$0$Type", 804), b(392, 299, { 3: 1, 299: 1, 392: 1, 94: 1, 134: 1 }), w(Fc, "LShape", 392), b(70, 392, { 3: 1, 299: 1, 70: 1, 392: 1, 94: 1, 134: 1 }, u8n, Mz), s.Ib = function() { + var e; + return e = ofe(this), e == null ? "label" : "l_" + e; + }, w(Fc, "LLabel", 70), b(207, 1, { 3: 1, 4: 1, 207: 1, 414: 1 }), s.Fb = function(e) { + var t; + return I(e, 207) ? (t = u(e, 207), this.d == t.d && this.a == t.a && this.b == t.b && this.c == t.c) : !1; + }, s.Hb = function() { + var e, t; + return e = t3(this.b) << 16, e |= t3(this.a) & Ut, t = t3(this.c) << 16, t |= t3(this.d) & Ut, e ^ t; + }, s.Jf = function(e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (o = 0; o < e.length && SDn((Te(o, e.length), e.charCodeAt(o)), WKn); ) + ++o; + for (t = e.length; t > 0 && SDn((Te(t - 1, e.length), e.charCodeAt(t - 1)), XKn); ) + --t; + if (o < t) { + d = Mb(e.substr(o, t - o), ",|;"); + try { + for (h = d, l = 0, a = h.length; l < a; ++l) { + if (f = h[l], c = Mb(f, "="), c.length != 2) + throw T(new Hn("Expecting a list of key-value pairs.")); + r = kb(c[0]), g = yb(kb(c[1])), An(r, "top") ? this.d = g : An(r, "left") ? this.b = g : An(r, "bottom") ? this.a = g : An(r, "right") && (this.c = g); + } + } catch (p) { + throw p = Et(p), I(p, 127) ? (i = p, T(new Hn(VKn + i))) : T(p); + } + } + }, s.Ib = function() { + return "[top=" + this.d + ",left=" + this.b + ",bottom=" + this.a + ",right=" + this.c + "]"; + }, s.a = 0, s.b = 0, s.c = 0, s.d = 0, w(dk, "Spacing", 207), b(142, 207, QKn, Bv, uyn, mU, oD); + var Urn = w(dk, "ElkMargin", 142); + b(651, 142, QKn, NI), w(Fc, "LMargin", 651), b(10, 392, { 3: 1, 299: 1, 10: 1, 392: 1, 94: 1, 134: 1 }, qh), s.Ib = function() { + return X$n(this); + }, s.i = !1; + var vh = w(Fc, "LNode", 10); + b(267, 22, { 3: 1, 35: 1, 22: 1, 267: 1 }, t5); + var vf, Xt, Ju, pi, ii, Mc, zR = Me(Fc, "LNode/NodeType", 267, Ie, Wde, ase), $Wn; + b(116, 207, JKn, i2, md, DU); + var Wrn = w(dk, "ElkPadding", 116); + b(764, 116, JKn, Zq), w(Fc, "LPadding", 764), b(11, 392, { 3: 1, 299: 1, 11: 1, 392: 1, 94: 1, 134: 1 }, gc), s.Ib = function() { + var e, t, i; + return e = new V1(), De((e.a += "p_", e), UT(this)), this.i && De(rc((e.a += "[", e), this.i), "]"), this.e.c.length == 1 && this.g.c.length == 0 && u(un(this.e, 0), 17).c != this && (t = u(un(this.e, 0), 17).c, De((e.a += " << ", e), UT(t)), De(rc((e.a += "[", e), t.i), "]")), this.e.c.length == 0 && this.g.c.length == 1 && u(un(this.g, 0), 17).d != this && (i = u(un(this.g, 0), 17).d, De((e.a += " >> ", e), UT(i)), De(rc((e.a += "[", e), i.i), "]")), e.a; + }, s.c = !0, s.d = !1; + var Xrn, Vrn, Qrn, Jrn, Yrn, Zrn, FWn = w(Fc, "LPort", 11); + b(397, 1, lh, Hp), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + var e; + return e = new E(this.a.e), new h5n(e); + }, w(Fc, "LPort/1", 397), b(1290, 1, Ei, h5n), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return u(y(this.a), 17).c; + }, s.Ob = function() { + return Kr(this.a); + }, s.Qb = function() { + F5(this.a); + }, w(Fc, "LPort/1/1", 1290), b(359, 1, lh, n2), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + var e; + return e = new E(this.a.g), new Oq(e); + }, w(Fc, "LPort/2", 359), b(762, 1, Ei, Oq), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return u(y(this.a), 17).d; + }, s.Ob = function() { + return Kr(this.a); + }, s.Qb = function() { + F5(this.a); + }, w(Fc, "LPort/2/1", 762), b(1283, 1, lh, q7n), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return new uf(this); + }, w(Fc, "LPort/CombineIter", 1283), b(201, 1, Ei, uf), s.Nb = function(e) { + Oi(this, e); + }, s.Qb = function() { + d8n(); + }, s.Ob = function() { + return E5(this); + }, s.Pb = function() { + return Kr(this.a) ? y(this.a) : y(this.b); + }, w(Fc, "LPort/CombineIter/1", 201), b(1285, 1, Rf, Kan), s.Lb = function(e) { + return CCn(e); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return bu(), u(e, 11).e.c.length != 0; + }, w(Fc, "LPort/lambda$0$Type", 1285), b(1284, 1, Rf, Han), s.Lb = function(e) { + return TCn(e); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return bu(), u(e, 11).g.c.length != 0; + }, w(Fc, "LPort/lambda$1$Type", 1284), b(1286, 1, Rf, qan), s.Lb = function(e) { + return bu(), u(e, 11).j == (J(), Kn); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return bu(), u(e, 11).j == (J(), Kn); + }, w(Fc, "LPort/lambda$2$Type", 1286), b(1287, 1, Rf, Gan), s.Lb = function(e) { + return bu(), u(e, 11).j == (J(), Vn); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return bu(), u(e, 11).j == (J(), Vn); + }, w(Fc, "LPort/lambda$3$Type", 1287), b(1288, 1, Rf, zan), s.Lb = function(e) { + return bu(), u(e, 11).j == (J(), ae); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return bu(), u(e, 11).j == (J(), ae); + }, w(Fc, "LPort/lambda$4$Type", 1288), b(1289, 1, Rf, Uan), s.Lb = function(e) { + return bu(), u(e, 11).j == (J(), Gn); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return bu(), u(e, 11).j == (J(), Gn); + }, w(Fc, "LPort/lambda$5$Type", 1289), b(29, 299, { 3: 1, 20: 1, 299: 1, 29: 1, 94: 1, 134: 1 }, Rs), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return new E(this.a); + }, s.Ib = function() { + return "L_" + xr(this.b.b, this, 0) + kl(this.a); + }, w(Fc, "Layer", 29), b(1342, 1, {}, e9n), w(T1, YKn, 1342), b(1346, 1, {}, Wan), s.Kb = function(e) { + return Ir(u(e, 82)); + }, w(T1, "ElkGraphImporter/0methodref$connectableShapeToNode$Type", 1346), b(1349, 1, {}, Xan), s.Kb = function(e) { + return Ir(u(e, 82)); + }, w(T1, "ElkGraphImporter/1methodref$connectableShapeToNode$Type", 1349), b(1343, 1, Yn, l5n), s.td = function(e) { + NLn(this.a, u(e, 118)); + }, w(T1, ZKn, 1343), b(1344, 1, Yn, a5n), s.td = function(e) { + NLn(this.a, u(e, 118)); + }, w(T1, nHn, 1344), b(1345, 1, {}, Van), s.Kb = function(e) { + return new $n(null, new xn(Hhe(u(e, 79)), 16)); + }, w(T1, eHn, 1345), b(1347, 1, Ve, d5n), s.Mb = function(e) { + return qre(this.a, u(e, 33)); + }, w(T1, tHn, 1347), b(1348, 1, {}, Qan), s.Kb = function(e) { + return new $n(null, new xn(qhe(u(e, 79)), 16)); + }, w(T1, "ElkGraphImporter/lambda$5$Type", 1348), b(1350, 1, Ve, b5n), s.Mb = function(e) { + return Gre(this.a, u(e, 33)); + }, w(T1, "ElkGraphImporter/lambda$7$Type", 1350), b(1351, 1, Ve, Jan), s.Mb = function(e) { + return u1e(u(e, 79)); + }, w(T1, "ElkGraphImporter/lambda$8$Type", 1351), b(1278, 1, {}, b4n); + var xWn; + w(T1, "ElkGraphLayoutTransferrer", 1278), b(1279, 1, Ve, w5n), s.Mb = function(e) { + return Due(this.a, u(e, 17)); + }, w(T1, "ElkGraphLayoutTransferrer/lambda$0$Type", 1279), b(1280, 1, Yn, g5n), s.td = function(e) { + H9(), W(this.a, u(e, 17)); + }, w(T1, "ElkGraphLayoutTransferrer/lambda$1$Type", 1280), b(1281, 1, Ve, p5n), s.Mb = function(e) { + return pue(this.a, u(e, 17)); + }, w(T1, "ElkGraphLayoutTransferrer/lambda$2$Type", 1281), b(1282, 1, Yn, v5n), s.td = function(e) { + H9(), W(this.a, u(e, 17)); + }, w(T1, "ElkGraphLayoutTransferrer/lambda$3$Type", 1282), b(1485, 1, Nt, Yan), s.pf = function(e, t) { + mbe(u(e, 37), t); + }, w(Un, "CommentNodeMarginCalculator", 1485), b(1486, 1, {}, Zan), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "CommentNodeMarginCalculator/lambda$0$Type", 1486), b(1487, 1, Yn, ndn), s.td = function(e) { + Zye(u(e, 10)); + }, w(Un, "CommentNodeMarginCalculator/lambda$1$Type", 1487), b(1488, 1, Nt, edn), s.pf = function(e, t) { + a7e(u(e, 37), t); + }, w(Un, "CommentPostprocessor", 1488), b(1489, 1, Nt, tdn), s.pf = function(e, t) { + mCe(u(e, 37), t); + }, w(Un, "CommentPreprocessor", 1489), b(1490, 1, Nt, idn), s.pf = function(e, t) { + x9e(u(e, 37), t); + }, w(Un, "ConstraintsPostprocessor", 1490), b(1491, 1, Nt, rdn), s.pf = function(e, t) { + Hbe(u(e, 37), t); + }, w(Un, "EdgeAndLayerConstraintEdgeReverser", 1491), b(1492, 1, Nt, cdn), s.pf = function(e, t) { + I2e(u(e, 37), t); + }, w(Un, "EndLabelPostprocessor", 1492), b(1493, 1, {}, udn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "EndLabelPostprocessor/lambda$0$Type", 1493), b(1494, 1, Ve, sdn), s.Mb = function(e) { + return C1e(u(e, 10)); + }, w(Un, "EndLabelPostprocessor/lambda$1$Type", 1494), b(1495, 1, Yn, odn), s.td = function(e) { + p4e(u(e, 10)); + }, w(Un, "EndLabelPostprocessor/lambda$2$Type", 1495), b(1496, 1, Nt, fdn), s.pf = function(e, t) { + u6e(u(e, 37), t); + }, w(Un, "EndLabelPreprocessor", 1496), b(1497, 1, {}, hdn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "EndLabelPreprocessor/lambda$0$Type", 1497), b(1498, 1, Yn, wEn), s.td = function(e) { + ure(this.a, this.b, this.c, u(e, 10)); + }, s.a = 0, s.b = 0, s.c = !1, w(Un, "EndLabelPreprocessor/lambda$1$Type", 1498), b(1499, 1, Ve, ldn), s.Mb = function(e) { + return B(k(u(e, 70), (nn(), Jf))) === B((sf(), jv)); + }, w(Un, "EndLabelPreprocessor/lambda$2$Type", 1499), b(1500, 1, Yn, m5n), s.td = function(e) { + Ke(this.a, u(e, 70)); + }, w(Un, "EndLabelPreprocessor/lambda$3$Type", 1500), b(1501, 1, Ve, adn), s.Mb = function(e) { + return B(k(u(e, 70), (nn(), Jf))) === B((sf(), uw)); + }, w(Un, "EndLabelPreprocessor/lambda$4$Type", 1501), b(1502, 1, Yn, k5n), s.td = function(e) { + Ke(this.a, u(e, 70)); + }, w(Un, "EndLabelPreprocessor/lambda$5$Type", 1502), b(1551, 1, Nt, d4n), s.pf = function(e, t) { + Bge(u(e, 37), t); + }; + var LWn; + w(Un, "EndLabelSorter", 1551), b(1552, 1, at, ddn), s.ue = function(e, t) { + return bpe(u(e, 456), u(t, 456)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "EndLabelSorter/1", 1552), b(456, 1, { 456: 1 }, xTn), w(Un, "EndLabelSorter/LabelGroup", 456), b(1553, 1, {}, bdn), s.Kb = function(e) { + return q9(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "EndLabelSorter/lambda$0$Type", 1553), b(1554, 1, Ve, wdn), s.Mb = function(e) { + return q9(), u(e, 10).k == (Qn(), ii); + }, w(Un, "EndLabelSorter/lambda$1$Type", 1554), b(1555, 1, Yn, gdn), s.td = function(e) { + p5e(u(e, 10)); + }, w(Un, "EndLabelSorter/lambda$2$Type", 1555), b(1556, 1, Ve, pdn), s.Mb = function(e) { + return q9(), B(k(u(e, 70), (nn(), Jf))) === B((sf(), uw)); + }, w(Un, "EndLabelSorter/lambda$3$Type", 1556), b(1557, 1, Ve, vdn), s.Mb = function(e) { + return q9(), B(k(u(e, 70), (nn(), Jf))) === B((sf(), jv)); + }, w(Un, "EndLabelSorter/lambda$4$Type", 1557), b(1503, 1, Nt, mdn), s.pf = function(e, t) { + hje(this, u(e, 37)); + }, s.b = 0, s.c = 0, w(Un, "FinalSplineBendpointsCalculator", 1503), b(1504, 1, {}, kdn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "FinalSplineBendpointsCalculator/lambda$0$Type", 1504), b(1505, 1, {}, ydn), s.Kb = function(e) { + return new $n(null, new Td(new re(ue(ei(u(e, 10)).a.Kc(), new Mn())))); + }, w(Un, "FinalSplineBendpointsCalculator/lambda$1$Type", 1505), b(1506, 1, Ve, jdn), s.Mb = function(e) { + return !Wi(u(e, 17)); + }, w(Un, "FinalSplineBendpointsCalculator/lambda$2$Type", 1506), b(1507, 1, Ve, Edn), s.Mb = function(e) { + return ai(u(e, 17), (G(), Wa)); + }, w(Un, "FinalSplineBendpointsCalculator/lambda$3$Type", 1507), b(1508, 1, Yn, y5n), s.td = function(e) { + Eke(this.a, u(e, 128)); + }, w(Un, "FinalSplineBendpointsCalculator/lambda$4$Type", 1508), b(1509, 1, Yn, Cdn), s.td = function(e) { + Ax(u(e, 17).a); + }, w(Un, "FinalSplineBendpointsCalculator/lambda$5$Type", 1509), b(792, 1, Nt, Dq), s.pf = function(e, t) { + iEe(this, u(e, 37), t); + }, w(Un, "GraphTransformer", 792), b(511, 22, { 3: 1, 35: 1, 22: 1, 511: 1 }, zG); + var UR, _k, NWn = Me(Un, "GraphTransformer/Mode", 511, Ie, U1e, Coe), BWn; + b(1510, 1, Nt, Tdn), s.pf = function(e, t) { + $8e(u(e, 37), t); + }, w(Un, "HierarchicalNodeResizingProcessor", 1510), b(1511, 1, Nt, Mdn), s.pf = function(e, t) { + bbe(u(e, 37), t); + }, w(Un, "HierarchicalPortConstraintProcessor", 1511), b(1512, 1, at, Adn), s.ue = function(e, t) { + return Tpe(u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "HierarchicalPortConstraintProcessor/NodeComparator", 1512), b(1513, 1, Nt, Sdn), s.pf = function(e, t) { + Fye(u(e, 37), t); + }, w(Un, "HierarchicalPortDummySizeProcessor", 1513), b(1514, 1, Nt, Pdn), s.pf = function(e, t) { + O7e(this, u(e, 37), t); + }, s.a = 0, w(Un, "HierarchicalPortOrthogonalEdgeRouter", 1514), b(1515, 1, at, Idn), s.ue = function(e, t) { + return Lce(u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "HierarchicalPortOrthogonalEdgeRouter/1", 1515), b(1516, 1, at, Odn), s.ue = function(e, t) { + return Qde(u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "HierarchicalPortOrthogonalEdgeRouter/2", 1516), b(1517, 1, Nt, Ddn), s.pf = function(e, t) { + t5e(u(e, 37), t); + }, w(Un, "HierarchicalPortPositionProcessor", 1517), b(1518, 1, Nt, w4n), s.pf = function(e, t) { + JCe(this, u(e, 37)); + }, s.a = 0, s.c = 0; + var sS, oS; + w(Un, "HighDegreeNodeLayeringProcessor", 1518), b(571, 1, { 571: 1 }, $dn), s.b = -1, s.d = -1, w(Un, "HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation", 571), b(1519, 1, {}, Fdn), s.Kb = function(e) { + return w8(), Lr(u(e, 10)); + }, s.Fb = function(e) { + return this === e; + }, w(Un, "HighDegreeNodeLayeringProcessor/lambda$0$Type", 1519), b(1520, 1, {}, xdn), s.Kb = function(e) { + return w8(), ei(u(e, 10)); + }, s.Fb = function(e) { + return this === e; + }, w(Un, "HighDegreeNodeLayeringProcessor/lambda$1$Type", 1520), b(1526, 1, Nt, Ldn), s.pf = function(e, t) { + oye(this, u(e, 37), t); + }, w(Un, "HyperedgeDummyMerger", 1526), b(793, 1, {}, xU), s.a = !1, s.b = !1, s.c = !1, w(Un, "HyperedgeDummyMerger/MergeState", 793), b(1527, 1, {}, Ndn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "HyperedgeDummyMerger/lambda$0$Type", 1527), b(1528, 1, {}, Bdn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 10).j, 16)); + }, w(Un, "HyperedgeDummyMerger/lambda$1$Type", 1528), b(1529, 1, Yn, Rdn), s.td = function(e) { + u(e, 11).p = -1; + }, w(Un, "HyperedgeDummyMerger/lambda$2$Type", 1529), b(1530, 1, Nt, _dn), s.pf = function(e, t) { + uye(u(e, 37), t); + }, w(Un, "HypernodesProcessor", 1530), b(1531, 1, Nt, Kdn), s.pf = function(e, t) { + sye(u(e, 37), t); + }, w(Un, "InLayerConstraintProcessor", 1531), b(1532, 1, Nt, Hdn), s.pf = function(e, t) { + Nbe(u(e, 37), t); + }, w(Un, "InnermostNodeMarginCalculator", 1532), b(1533, 1, Nt, qdn), s.pf = function(e, t) { + bCe(this, u(e, 37)); + }, s.a = Vt, s.b = Vt, s.c = Lt, s.d = Lt; + var ZTe = w(Un, "InteractiveExternalPortPositioner", 1533); + b(1534, 1, {}, Gdn), s.Kb = function(e) { + return u(e, 17).d.i; + }, s.Fb = function(e) { + return this === e; + }, w(Un, "InteractiveExternalPortPositioner/lambda$0$Type", 1534), b(1535, 1, {}, j5n), s.Kb = function(e) { + return Rce(this.a, Y(e)); + }, s.Fb = function(e) { + return this === e; + }, w(Un, "InteractiveExternalPortPositioner/lambda$1$Type", 1535), b(1536, 1, {}, zdn), s.Kb = function(e) { + return u(e, 17).c.i; + }, s.Fb = function(e) { + return this === e; + }, w(Un, "InteractiveExternalPortPositioner/lambda$2$Type", 1536), b(1537, 1, {}, E5n), s.Kb = function(e) { + return _ce(this.a, Y(e)); + }, s.Fb = function(e) { + return this === e; + }, w(Un, "InteractiveExternalPortPositioner/lambda$3$Type", 1537), b(1538, 1, {}, C5n), s.Kb = function(e) { + return Pue(this.a, Y(e)); + }, s.Fb = function(e) { + return this === e; + }, w(Un, "InteractiveExternalPortPositioner/lambda$4$Type", 1538), b(1539, 1, {}, T5n), s.Kb = function(e) { + return Iue(this.a, Y(e)); + }, s.Fb = function(e) { + return this === e; + }, w(Un, "InteractiveExternalPortPositioner/lambda$5$Type", 1539), b(77, 22, { 3: 1, 35: 1, 22: 1, 77: 1, 234: 1 }, zt), s.Kf = function() { + switch (this.g) { + case 15: + return new awn(); + case 22: + return new dwn(); + case 47: + return new gwn(); + case 28: + case 35: + return new t0n(); + case 32: + return new Yan(); + case 42: + return new edn(); + case 1: + return new tdn(); + case 41: + return new idn(); + case 56: + return new Dq((N3(), _k)); + case 0: + return new Dq((N3(), UR)); + case 2: + return new rdn(); + case 54: + return new cdn(); + case 33: + return new fdn(); + case 51: + return new mdn(); + case 55: + return new Tdn(); + case 13: + return new Mdn(); + case 38: + return new Sdn(); + case 44: + return new Pdn(); + case 40: + return new Ddn(); + case 9: + return new w4n(); + case 49: + return new ejn(); + case 37: + return new Ldn(); + case 43: + return new _dn(); + case 27: + return new Kdn(); + case 30: + return new Hdn(); + case 3: + return new qdn(); + case 18: + return new Wdn(); + case 29: + return new Xdn(); + case 5: + return new g4n(); + case 50: + return new Udn(); + case 34: + return new p4n(); + case 36: + return new i0n(); + case 52: + return new d4n(); + case 11: + return new c0n(); + case 7: + return new m4n(); + case 39: + return new u0n(); + case 45: + return new s0n(); + case 16: + return new o0n(); + case 10: + return new f0n(); + case 48: + return new l0n(); + case 21: + return new a0n(); + case 23: + return new WI((Kd(), _m)); + case 8: + return new b0n(); + case 12: + return new g0n(); + case 4: + return new p0n(); + case 19: + return new E4n(); + case 17: + return new A0n(); + case 53: + return new S0n(); + case 6: + return new _0n(); + case 25: + return new c9n(); + case 46: + return new $0n(); + case 31: + return new Rjn(); + case 14: + return new X0n(); + case 26: + return new mwn(); + case 20: + return new Z0n(); + case 24: + return new WI((Kd(), aP)); + default: + throw T(new Hn(AN + (this.f != null ? this.f : "" + this.g))); + } + }; + var ncn, ecn, tcn, icn, rcn, ccn, ucn, scn, ocn, fcn, mm, fS, hS, hcn, lcn, acn, dcn, bcn, wcn, gcn, km, pcn, vcn, mcn, kcn, ycn, WR, lS, aS, jcn, dS, bS, wS, Q4, J4, Y4, Ecn, gS, pS, Ccn, vS, mS, Tcn, Mcn, Acn, Scn, kS, XR, Kk, yS, jS, ES, CS, Pcn, Icn, Ocn, Dcn, nMe = Me(Un, Fnn, 77, Ie, PNn, Eoe), RWn; + b(1540, 1, Nt, Wdn), s.pf = function(e, t) { + gCe(u(e, 37), t); + }, w(Un, "InvertedPortProcessor", 1540), b(1541, 1, Nt, Xdn), s.pf = function(e, t) { + gke(u(e, 37), t); + }, w(Un, "LabelAndNodeSizeProcessor", 1541), b(1542, 1, Ve, Vdn), s.Mb = function(e) { + return u(e, 10).k == (Qn(), ii); + }, w(Un, "LabelAndNodeSizeProcessor/lambda$0$Type", 1542), b(1543, 1, Ve, Qdn), s.Mb = function(e) { + return u(e, 10).k == (Qn(), Xt); + }, w(Un, "LabelAndNodeSizeProcessor/lambda$1$Type", 1543), b(1544, 1, Yn, gEn), s.td = function(e) { + sre(this.b, this.a, this.c, u(e, 10)); + }, s.a = !1, s.c = !1, w(Un, "LabelAndNodeSizeProcessor/lambda$2$Type", 1544), b(1545, 1, Nt, g4n), s.pf = function(e, t) { + _Ee(u(e, 37), t); + }; + var _Wn; + w(Un, "LabelDummyInserter", 1545), b(1546, 1, Rf, Jdn), s.Lb = function(e) { + return B(k(u(e, 70), (nn(), Jf))) === B((sf(), yv)); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return B(k(u(e, 70), (nn(), Jf))) === B((sf(), yv)); + }, w(Un, "LabelDummyInserter/1", 1546), b(1547, 1, Nt, Udn), s.pf = function(e, t) { + Hje(u(e, 37), t); + }, w(Un, "LabelDummyRemover", 1547), b(1548, 1, Ve, Ydn), s.Mb = function(e) { + return on(sn(k(u(e, 70), (nn(), L_)))); + }, w(Un, "LabelDummyRemover/lambda$0$Type", 1548), b(1359, 1, Nt, p4n), s.pf = function(e, t) { + pEe(this, u(e, 37), t); + }, s.a = null; + var VR; + w(Un, "LabelDummySwitcher", 1359), b(286, 1, { 286: 1 }, ABn), s.c = 0, s.d = null, s.f = 0, w(Un, "LabelDummySwitcher/LabelDummyInfo", 286), b(1360, 1, {}, Zdn), s.Kb = function(e) { + return x2(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "LabelDummySwitcher/lambda$0$Type", 1360), b(1361, 1, Ve, n0n), s.Mb = function(e) { + return x2(), u(e, 10).k == (Qn(), Ju); + }, w(Un, "LabelDummySwitcher/lambda$1$Type", 1361), b(1362, 1, {}, S5n), s.Kb = function(e) { + return vue(this.a, u(e, 10)); + }, w(Un, "LabelDummySwitcher/lambda$2$Type", 1362), b(1363, 1, Yn, P5n), s.td = function(e) { + phe(this.a, u(e, 286)); + }, w(Un, "LabelDummySwitcher/lambda$3$Type", 1363), b(1364, 1, at, e0n), s.ue = function(e, t) { + return zfe(u(e, 286), u(t, 286)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "LabelDummySwitcher/lambda$4$Type", 1364), b(791, 1, Nt, t0n), s.pf = function(e, t) { + Sde(u(e, 37), t); + }, w(Un, "LabelManagementProcessor", 791), b(1549, 1, Nt, i0n), s.pf = function(e, t) { + Z8e(u(e, 37), t); + }, w(Un, "LabelSideSelector", 1549), b(1550, 1, Ve, r0n), s.Mb = function(e) { + return on(sn(k(u(e, 70), (nn(), L_)))); + }, w(Un, "LabelSideSelector/lambda$0$Type", 1550), b(1558, 1, Nt, c0n), s.pf = function(e, t) { + xye(u(e, 37), t); + }, w(Un, "LayerConstraintPostprocessor", 1558), b(1559, 1, Nt, m4n), s.pf = function(e, t) { + Vme(u(e, 37), t); + }; + var $cn; + w(Un, "LayerConstraintPreprocessor", 1559), b(360, 22, { 3: 1, 35: 1, 22: 1, 360: 1 }, Hj); + var Hk, TS, MS, QR, KWn = Me(Un, "LayerConstraintPreprocessor/HiddenNodeConnections", 360, Ie, yae, bse), HWn; + b(1560, 1, Nt, u0n), s.pf = function(e, t) { + Rje(u(e, 37), t); + }, w(Un, "LayerSizeAndGraphHeightCalculator", 1560), b(1561, 1, Nt, s0n), s.pf = function(e, t) { + H9e(u(e, 37), t); + }, w(Un, "LongEdgeJoiner", 1561), b(1562, 1, Nt, o0n), s.pf = function(e, t) { + kje(u(e, 37), t); + }, w(Un, "LongEdgeSplitter", 1562), b(1563, 1, Nt, f0n), s.pf = function(e, t) { + kEe(this, u(e, 37), t); + }, s.d = 0, s.e = 0, s.i = 0, s.j = 0, s.k = 0, s.n = 0, w(Un, "NodePromotion", 1563), b(1564, 1, {}, h0n), s.Kb = function(e) { + return u(e, 46), qn(), !0; + }, s.Fb = function(e) { + return this === e; + }, w(Un, "NodePromotion/lambda$0$Type", 1564), b(1565, 1, {}, M5n), s.Kb = function(e) { + return Bhe(this.a, u(e, 46)); + }, s.Fb = function(e) { + return this === e; + }, s.a = 0, w(Un, "NodePromotion/lambda$1$Type", 1565), b(1566, 1, {}, A5n), s.Kb = function(e) { + return Rhe(this.a, u(e, 46)); + }, s.Fb = function(e) { + return this === e; + }, s.a = 0, w(Un, "NodePromotion/lambda$2$Type", 1566), b(1567, 1, Nt, l0n), s.pf = function(e, t) { + GCe(u(e, 37), t); + }, w(Un, "NorthSouthPortPostprocessor", 1567), b(1568, 1, Nt, a0n), s.pf = function(e, t) { + PCe(u(e, 37), t); + }, w(Un, "NorthSouthPortPreprocessor", 1568), b(1569, 1, at, d0n), s.ue = function(e, t) { + return rwe(u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "NorthSouthPortPreprocessor/lambda$0$Type", 1569), b(1570, 1, Nt, b0n), s.pf = function(e, t) { + Uke(u(e, 37), t); + }, w(Un, "PartitionMidprocessor", 1570), b(1571, 1, Ve, w0n), s.Mb = function(e) { + return ai(u(e, 10), (nn(), lv)); + }, w(Un, "PartitionMidprocessor/lambda$0$Type", 1571), b(1572, 1, Yn, I5n), s.td = function(e) { + s1e(this.a, u(e, 10)); + }, w(Un, "PartitionMidprocessor/lambda$1$Type", 1572), b(1573, 1, Nt, g0n), s.pf = function(e, t) { + o8e(u(e, 37), t); + }, w(Un, "PartitionPostprocessor", 1573), b(1574, 1, Nt, p0n), s.pf = function(e, t) { + vme(u(e, 37), t); + }, w(Un, "PartitionPreprocessor", 1574), b(1575, 1, Ve, v0n), s.Mb = function(e) { + return ai(u(e, 10), (nn(), lv)); + }, w(Un, "PartitionPreprocessor/lambda$0$Type", 1575), b(1576, 1, {}, m0n), s.Kb = function(e) { + return new $n(null, new Td(new re(ue(ei(u(e, 10)).a.Kc(), new Mn())))); + }, w(Un, "PartitionPreprocessor/lambda$1$Type", 1576), b(1577, 1, Ve, k0n), s.Mb = function(e) { + return lpe(u(e, 17)); + }, w(Un, "PartitionPreprocessor/lambda$2$Type", 1577), b(1578, 1, Yn, y0n), s.td = function(e) { + bwe(u(e, 17)); + }, w(Un, "PartitionPreprocessor/lambda$3$Type", 1578), b(1579, 1, Nt, E4n), s.pf = function(e, t) { + Ike(u(e, 37), t); + }; + var Fcn, qWn, GWn, zWn, xcn, Lcn; + w(Un, "PortListSorter", 1579), b(1580, 1, {}, j0n), s.Kb = function(e) { + return X3(), u(e, 11).e; + }, w(Un, "PortListSorter/lambda$0$Type", 1580), b(1581, 1, {}, E0n), s.Kb = function(e) { + return X3(), u(e, 11).g; + }, w(Un, "PortListSorter/lambda$1$Type", 1581), b(1582, 1, at, C0n), s.ue = function(e, t) { + return KAn(u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "PortListSorter/lambda$2$Type", 1582), b(1583, 1, at, T0n), s.ue = function(e, t) { + return x3e(u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "PortListSorter/lambda$3$Type", 1583), b(1584, 1, at, M0n), s.ue = function(e, t) { + return QBn(u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "PortListSorter/lambda$4$Type", 1584), b(1585, 1, Nt, A0n), s.pf = function(e, t) { + qme(u(e, 37), t); + }, w(Un, "PortSideProcessor", 1585), b(1586, 1, Nt, S0n), s.pf = function(e, t) { + G7e(u(e, 37), t); + }, w(Un, "ReversedEdgeRestorer", 1586), b(1591, 1, Nt, c9n), s.pf = function(e, t) { + m3e(this, u(e, 37), t); + }, w(Un, "SelfLoopPortRestorer", 1591), b(1592, 1, {}, P0n), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "SelfLoopPortRestorer/lambda$0$Type", 1592), b(1593, 1, Ve, I0n), s.Mb = function(e) { + return u(e, 10).k == (Qn(), ii); + }, w(Un, "SelfLoopPortRestorer/lambda$1$Type", 1593), b(1594, 1, Ve, O0n), s.Mb = function(e) { + return ai(u(e, 10), (G(), ov)); + }, w(Un, "SelfLoopPortRestorer/lambda$2$Type", 1594), b(1595, 1, {}, D0n), s.Kb = function(e) { + return u(k(u(e, 10), (G(), ov)), 403); + }, w(Un, "SelfLoopPortRestorer/lambda$3$Type", 1595), b(1596, 1, Yn, O5n), s.td = function(e) { + S5e(this.a, u(e, 403)); + }, w(Un, "SelfLoopPortRestorer/lambda$4$Type", 1596), b(794, 1, Yn, RH), s.td = function(e) { + q5e(u(e, 101)); + }, w(Un, "SelfLoopPortRestorer/lambda$5$Type", 794), b(1597, 1, Nt, $0n), s.pf = function(e, t) { + Spe(u(e, 37), t); + }, w(Un, "SelfLoopPostProcessor", 1597), b(1598, 1, {}, F0n), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "SelfLoopPostProcessor/lambda$0$Type", 1598), b(1599, 1, Ve, x0n), s.Mb = function(e) { + return u(e, 10).k == (Qn(), ii); + }, w(Un, "SelfLoopPostProcessor/lambda$1$Type", 1599), b(1600, 1, Ve, L0n), s.Mb = function(e) { + return ai(u(e, 10), (G(), ov)); + }, w(Un, "SelfLoopPostProcessor/lambda$2$Type", 1600), b(1601, 1, Yn, N0n), s.td = function(e) { + x4e(u(e, 10)); + }, w(Un, "SelfLoopPostProcessor/lambda$3$Type", 1601), b(1602, 1, {}, B0n), s.Kb = function(e) { + return new $n(null, new xn(u(e, 101).f, 1)); + }, w(Un, "SelfLoopPostProcessor/lambda$4$Type", 1602), b(1603, 1, Yn, D5n), s.td = function(e) { + Cae(this.a, u(e, 409)); + }, w(Un, "SelfLoopPostProcessor/lambda$5$Type", 1603), b(1604, 1, Ve, R0n), s.Mb = function(e) { + return !!u(e, 101).i; + }, w(Un, "SelfLoopPostProcessor/lambda$6$Type", 1604), b(1605, 1, Yn, $5n), s.td = function(e) { + oie(this.a, u(e, 101)); + }, w(Un, "SelfLoopPostProcessor/lambda$7$Type", 1605), b(1587, 1, Nt, _0n), s.pf = function(e, t) { + y9e(u(e, 37), t); + }, w(Un, "SelfLoopPreProcessor", 1587), b(1588, 1, {}, K0n), s.Kb = function(e) { + return new $n(null, new xn(u(e, 101).f, 1)); + }, w(Un, "SelfLoopPreProcessor/lambda$0$Type", 1588), b(1589, 1, {}, H0n), s.Kb = function(e) { + return u(e, 409).a; + }, w(Un, "SelfLoopPreProcessor/lambda$1$Type", 1589), b(1590, 1, Yn, q0n), s.td = function(e) { + dce(u(e, 17)); + }, w(Un, "SelfLoopPreProcessor/lambda$2$Type", 1590), b(1606, 1, Nt, Rjn), s.pf = function(e, t) { + v5e(this, u(e, 37), t); + }, w(Un, "SelfLoopRouter", 1606), b(1607, 1, {}, G0n), s.Kb = function(e) { + return new $n(null, new xn(u(e, 29).a, 16)); + }, w(Un, "SelfLoopRouter/lambda$0$Type", 1607), b(1608, 1, Ve, z0n), s.Mb = function(e) { + return u(e, 10).k == (Qn(), ii); + }, w(Un, "SelfLoopRouter/lambda$1$Type", 1608), b(1609, 1, Ve, U0n), s.Mb = function(e) { + return ai(u(e, 10), (G(), ov)); + }, w(Un, "SelfLoopRouter/lambda$2$Type", 1609), b(1610, 1, {}, W0n), s.Kb = function(e) { + return u(k(u(e, 10), (G(), ov)), 403); + }, w(Un, "SelfLoopRouter/lambda$3$Type", 1610), b(1611, 1, Yn, x7n), s.td = function(e) { + Yhe(this.a, this.b, u(e, 403)); + }, w(Un, "SelfLoopRouter/lambda$4$Type", 1611), b(1612, 1, Nt, X0n), s.pf = function(e, t) { + K8e(u(e, 37), t); + }, w(Un, "SemiInteractiveCrossMinProcessor", 1612), b(1613, 1, Ve, V0n), s.Mb = function(e) { + return u(e, 10).k == (Qn(), ii); + }, w(Un, "SemiInteractiveCrossMinProcessor/lambda$0$Type", 1613), b(1614, 1, Ve, Q0n), s.Mb = function(e) { + return eCn(u(e, 10))._b((nn(), nw)); + }, w(Un, "SemiInteractiveCrossMinProcessor/lambda$1$Type", 1614), b(1615, 1, at, J0n), s.ue = function(e, t) { + return gbe(u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Un, "SemiInteractiveCrossMinProcessor/lambda$2$Type", 1615), b(1616, 1, {}, Y0n), s.Ce = function(e, t) { + return w1e(u(e, 10), u(t, 10)); + }, w(Un, "SemiInteractiveCrossMinProcessor/lambda$3$Type", 1616), b(1618, 1, Nt, Z0n), s.pf = function(e, t) { + Lye(u(e, 37), t); + }, w(Un, "SortByInputModelProcessor", 1618), b(1619, 1, Ve, nbn), s.Mb = function(e) { + return u(e, 11).g.c.length != 0; + }, w(Un, "SortByInputModelProcessor/lambda$0$Type", 1619), b(1620, 1, Yn, F5n), s.td = function(e) { + X5e(this.a, u(e, 11)); + }, w(Un, "SortByInputModelProcessor/lambda$1$Type", 1620), b(1693, 803, {}, QIn), s.Me = function(e) { + var t, i, r, c; + switch (this.c = e, this.a.g) { + case 2: + t = new X(), _t(pt(new $n(null, new xn(this.c.a.b, 16)), new bbn()), new _7n(this, t)), O7(this, new ibn()), Yc(t, new rbn()), t.c = F(Zn, rn, 1, 0, 5, 1), _t(pt(new $n(null, new xn(this.c.a.b, 16)), new cbn()), new L5n(t)), O7(this, new ubn()), Yc(t, new sbn()), t.c = F(Zn, rn, 1, 0, 5, 1), i = myn(fOn(YE(new $n(null, new xn(this.c.a.b, 16)), new N5n(this))), new obn()), _t(new $n(null, new xn(this.c.a.a, 16)), new N7n(i, t)), O7(this, new hbn()), Yc(t, new ebn()), t.c = F(Zn, rn, 1, 0, 5, 1); + break; + case 3: + r = new X(), O7(this, new tbn()), c = myn(fOn(YE(new $n(null, new xn(this.c.a.b, 16)), new x5n(this))), new fbn()), _t(pt(new $n(null, new xn(this.c.a.b, 16)), new lbn()), new R7n(c, r)), O7(this, new abn()), Yc(r, new dbn()), r.c = F(Zn, rn, 1, 0, 5, 1); + break; + default: + throw T(new Gmn()); + } + }, s.b = 0, w(Qt, "EdgeAwareScanlineConstraintCalculation", 1693), b(1694, 1, Rf, tbn), s.Lb = function(e) { + return I(u(e, 57).g, 145); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return I(u(e, 57).g, 145); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$0$Type", 1694), b(1695, 1, {}, x5n), s.Fe = function(e) { + return A6e(this.a, u(e, 57)); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$1$Type", 1695), b(1703, 1, DM, L7n), s.Vd = function() { + g6(this.a, this.b, -1); + }, s.b = 0, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$10$Type", 1703), b(1705, 1, Rf, ibn), s.Lb = function(e) { + return I(u(e, 57).g, 145); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return I(u(e, 57).g, 145); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$11$Type", 1705), b(1706, 1, Yn, rbn), s.td = function(e) { + u(e, 365).Vd(); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$12$Type", 1706), b(1707, 1, Ve, cbn), s.Mb = function(e) { + return I(u(e, 57).g, 10); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$13$Type", 1707), b(1709, 1, Yn, L5n), s.td = function(e) { + n2e(this.a, u(e, 57)); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$14$Type", 1709), b(1708, 1, DM, G7n), s.Vd = function() { + g6(this.b, this.a, -1); + }, s.a = 0, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$15$Type", 1708), b(1710, 1, Rf, ubn), s.Lb = function(e) { + return I(u(e, 57).g, 10); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return I(u(e, 57).g, 10); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$16$Type", 1710), b(1711, 1, Yn, sbn), s.td = function(e) { + u(e, 365).Vd(); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$17$Type", 1711), b(1712, 1, {}, N5n), s.Fe = function(e) { + return S6e(this.a, u(e, 57)); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$18$Type", 1712), b(1713, 1, {}, obn), s.De = function() { + return 0; + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$19$Type", 1713), b(1696, 1, {}, fbn), s.De = function() { + return 0; + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$2$Type", 1696), b(1715, 1, Yn, N7n), s.td = function(e) { + xfe(this.a, this.b, u(e, 307)); + }, s.a = 0, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$20$Type", 1715), b(1714, 1, DM, B7n), s.Vd = function() { + uNn(this.a, this.b, -1); + }, s.b = 0, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$21$Type", 1714), b(1716, 1, Rf, hbn), s.Lb = function(e) { + return u(e, 57), !0; + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return u(e, 57), !0; + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$22$Type", 1716), b(1717, 1, Yn, ebn), s.td = function(e) { + u(e, 365).Vd(); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$23$Type", 1717), b(1697, 1, Ve, lbn), s.Mb = function(e) { + return I(u(e, 57).g, 10); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$3$Type", 1697), b(1699, 1, Yn, R7n), s.td = function(e) { + Lfe(this.a, this.b, u(e, 57)); + }, s.a = 0, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$4$Type", 1699), b(1698, 1, DM, z7n), s.Vd = function() { + g6(this.b, this.a, -1); + }, s.a = 0, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$5$Type", 1698), b(1700, 1, Rf, abn), s.Lb = function(e) { + return u(e, 57), !0; + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return u(e, 57), !0; + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$6$Type", 1700), b(1701, 1, Yn, dbn), s.td = function(e) { + u(e, 365).Vd(); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$7$Type", 1701), b(1702, 1, Ve, bbn), s.Mb = function(e) { + return I(u(e, 57).g, 145); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$8$Type", 1702), b(1704, 1, Yn, _7n), s.td = function(e) { + $0e(this.a, this.b, u(e, 57)); + }, w(Qt, "EdgeAwareScanlineConstraintCalculation/lambda$9$Type", 1704), b(1521, 1, Nt, ejn), s.pf = function(e, t) { + Aje(this, u(e, 37), t); + }; + var UWn; + w(Qt, "HorizontalGraphCompactor", 1521), b(1522, 1, {}, B5n), s.Oe = function(e, t) { + var i, r, c; + return YX(e, t) || (i = $w(e), r = $w(t), i && i.k == (Qn(), Xt) || r && r.k == (Qn(), Xt)) ? 0 : (c = u(k(this.a.a, (G(), Ig)), 304), Kce(c, i ? i.k : (Qn(), pi), r ? r.k : (Qn(), pi))); + }, s.Pe = function(e, t) { + var i, r, c; + return YX(e, t) ? 1 : (i = $w(e), r = $w(t), c = u(k(this.a.a, (G(), Ig)), 304), Wz(c, i ? i.k : (Qn(), pi), r ? r.k : (Qn(), pi))); + }, w(Qt, "HorizontalGraphCompactor/1", 1522), b(1523, 1, {}, wbn), s.Ne = function(e, t) { + return Qv(), e.a.i == 0; + }, w(Qt, "HorizontalGraphCompactor/lambda$0$Type", 1523), b(1524, 1, {}, R5n), s.Ne = function(e, t) { + return l1e(this.a, e, t); + }, w(Qt, "HorizontalGraphCompactor/lambda$1$Type", 1524), b(1664, 1, {}, xPn); + var WWn, XWn; + w(Qt, "LGraphToCGraphTransformer", 1664), b(1672, 1, Ve, gbn), s.Mb = function(e) { + return e != null; + }, w(Qt, "LGraphToCGraphTransformer/0methodref$nonNull$Type", 1672), b(1665, 1, {}, pbn), s.Kb = function(e) { + return wo(), Nr(k(u(u(e, 57).g, 10), (G(), rt))); + }, w(Qt, "LGraphToCGraphTransformer/lambda$0$Type", 1665), b(1666, 1, {}, vbn), s.Kb = function(e) { + return wo(), BDn(u(u(e, 57).g, 145)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$1$Type", 1666), b(1675, 1, Ve, mbn), s.Mb = function(e) { + return wo(), I(u(e, 57).g, 10); + }, w(Qt, "LGraphToCGraphTransformer/lambda$10$Type", 1675), b(1676, 1, Yn, kbn), s.td = function(e) { + h1e(u(e, 57)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$11$Type", 1676), b(1677, 1, Ve, ybn), s.Mb = function(e) { + return wo(), I(u(e, 57).g, 145); + }, w(Qt, "LGraphToCGraphTransformer/lambda$12$Type", 1677), b(1681, 1, Yn, jbn), s.td = function(e) { + wge(u(e, 57)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$13$Type", 1681), b(1678, 1, Yn, _5n), s.td = function(e) { + Rre(this.a, u(e, 8)); + }, s.a = 0, w(Qt, "LGraphToCGraphTransformer/lambda$14$Type", 1678), b(1679, 1, Yn, K5n), s.td = function(e) { + Kre(this.a, u(e, 110)); + }, s.a = 0, w(Qt, "LGraphToCGraphTransformer/lambda$15$Type", 1679), b(1680, 1, Yn, H5n), s.td = function(e) { + _re(this.a, u(e, 8)); + }, s.a = 0, w(Qt, "LGraphToCGraphTransformer/lambda$16$Type", 1680), b(1682, 1, {}, Ebn), s.Kb = function(e) { + return wo(), new $n(null, new Td(new re(ue(ei(u(e, 10)).a.Kc(), new Mn())))); + }, w(Qt, "LGraphToCGraphTransformer/lambda$17$Type", 1682), b(1683, 1, Ve, Cbn), s.Mb = function(e) { + return wo(), Wi(u(e, 17)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$18$Type", 1683), b(1684, 1, Yn, q5n), s.td = function(e) { + y0e(this.a, u(e, 17)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$19$Type", 1684), b(1668, 1, Yn, G5n), s.td = function(e) { + eae(this.a, u(e, 145)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$2$Type", 1668), b(1685, 1, {}, Tbn), s.Kb = function(e) { + return wo(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$20$Type", 1685), b(1686, 1, {}, Mbn), s.Kb = function(e) { + return wo(), new $n(null, new Td(new re(ue(ei(u(e, 10)).a.Kc(), new Mn())))); + }, w(Qt, "LGraphToCGraphTransformer/lambda$21$Type", 1686), b(1687, 1, {}, Abn), s.Kb = function(e) { + return wo(), u(k(u(e, 17), (G(), Wa)), 15); + }, w(Qt, "LGraphToCGraphTransformer/lambda$22$Type", 1687), b(1688, 1, Ve, Sbn), s.Mb = function(e) { + return qce(u(e, 15)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$23$Type", 1688), b(1689, 1, Yn, z5n), s.td = function(e) { + v6e(this.a, u(e, 15)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$24$Type", 1689), b(1667, 1, Yn, K7n), s.td = function(e) { + Hae(this.a, this.b, u(e, 145)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$3$Type", 1667), b(1669, 1, {}, Pbn), s.Kb = function(e) { + return wo(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$4$Type", 1669), b(1670, 1, {}, Ibn), s.Kb = function(e) { + return wo(), new $n(null, new Td(new re(ue(ei(u(e, 10)).a.Kc(), new Mn())))); + }, w(Qt, "LGraphToCGraphTransformer/lambda$5$Type", 1670), b(1671, 1, {}, Obn), s.Kb = function(e) { + return wo(), u(k(u(e, 17), (G(), Wa)), 15); + }, w(Qt, "LGraphToCGraphTransformer/lambda$6$Type", 1671), b(1673, 1, Yn, U5n), s.td = function(e) { + Q6e(this.a, u(e, 15)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$8$Type", 1673), b(1674, 1, Yn, H7n), s.td = function(e) { + fce(this.a, this.b, u(e, 145)); + }, w(Qt, "LGraphToCGraphTransformer/lambda$9$Type", 1674), b(1663, 1, {}, Dbn), s.Le = function(e) { + var t, i, r, c, o; + for (this.a = e, this.d = new LI(), this.c = F(grn, rn, 121, this.a.a.a.c.length, 0, 1), this.b = 0, i = new E(this.a.a.a); i.a < i.c.c.length; ) + t = u(y(i), 307), t.d = this.b, o = yd(K9(new ca(), t), this.d), this.c[this.b] = o, ++this.b; + for ($Ee(this), FCe(this), Y9e(this), Yx(fD(this.d), new Gp()), c = new E(this.a.a.b); c.a < c.c.c.length; ) + r = u(y(c), 57), r.d.c = this.c[r.a.d].e + r.b.a; + }, s.b = 0, w(Qt, "NetworkSimplexCompaction", 1663), b(145, 1, { 35: 1, 145: 1 }, P6), s.wd = function(e) { + return T0e(this, u(e, 145)); + }, s.Ib = function() { + return BDn(this); + }, w(Qt, "VerticalSegment", 145), b(827, 1, {}, NJ), s.c = 0, s.e = 0, s.i = 0, w(U6, "BetweenLayerEdgeTwoNodeCrossingsCounter", 827), b(663, 1, { 663: 1 }, aOn), s.Ib = function() { + return "AdjacencyList [node=" + this.d + ", adjacencies= " + this.a + "]"; + }, s.b = 0, s.c = 0, s.f = 0, w(U6, "BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList", 663), b(287, 1, { 35: 1, 287: 1 }, fjn), s.wd = function(e) { + return afe(this, u(e, 287)); + }, s.Ib = function() { + return "Adjacency [position=" + this.c + ", cardinality=" + this.a + ", currentCardinality=" + this.b + "]"; + }, s.a = 0, s.b = 0, s.c = 0, w(U6, "BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency", 287), b(1929, 1, {}, Fxn), s.b = 0, s.e = !1, w(U6, "CrossingMatrixFiller", 1929); + var VWn = Ct(gh, "IInitializable"); + b(1804, 1, bk, V7n), s.Nf = function(e, t, i, r, c, o) { + }, s.Pf = function(e, t, i) { + }, s.Lf = function() { + return this.c != (Kd(), _m); + }, s.Mf = function() { + this.e = F(be, Le, 25, this.d, 15, 1); + }, s.Of = function(e, t) { + t[e][0].c.p = e; + }, s.Qf = function(e, t, i, r) { + ++this.d; + }, s.Rf = function() { + return !0; + }, s.Sf = function(e, t, i, r) { + return ODn(this, e, t, i), nde(this, t); + }, s.Tf = function(e, t) { + var i; + return i = Nie(t, e.length), ODn(this, e, i, t), JOn(this, i); + }, s.d = 0, w(U6, "GreedySwitchHeuristic", 1804), b(1930, 1, {}, oCn), s.b = 0, s.d = 0, w(U6, "NorthSouthEdgeNeighbouringNodeCrossingsCounter", 1930), b(1917, 1, {}, lBn), s.a = !1, w(U6, "SwitchDecider", 1917), b(101, 1, { 101: 1 }, Hxn), s.a = null, s.c = null, s.i = null, w(cp, "SelfHyperLoop", 101), b(1916, 1, {}, K$n), s.c = 0, s.e = 0, w(cp, "SelfHyperLoopLabels", 1916), b(411, 22, { 3: 1, 35: 1, 22: 1, 411: 1 }, qj); + var lp, Z4, nv, JR, QWn = Me(cp, "SelfHyperLoopLabels/Alignment", 411, Ie, jae, wse), JWn; + b(409, 1, { 409: 1 }, MSn), w(cp, "SelfLoopEdge", 409), b(403, 1, { 403: 1 }, $$n), s.a = !1, w(cp, "SelfLoopHolder", 403), b(1724, 1, Ve, Hbn), s.Mb = function(e) { + return Wi(u(e, 17)); + }, w(cp, "SelfLoopHolder/lambda$0$Type", 1724), b(113, 1, { 113: 1 }, H$n), s.a = !1, s.c = !1, w(cp, "SelfLoopPort", 113), b(1792, 1, Ve, qbn), s.Mb = function(e) { + return Wi(u(e, 17)); + }, w(cp, "SelfLoopPort/lambda$0$Type", 1792), b(363, 22, { 3: 1, 35: 1, 22: 1, 363: 1 }, W9); + var AS, SS, PS, IS, OS, YWn = Me(cp, "SelfLoopType", 363, Ie, dde, kse), ZWn; + b(1732, 1, {}, C4n); + var nXn, eXn, tXn, iXn; + w(hs, "PortRestorer", 1732), b(361, 22, { 3: 1, 35: 1, 22: 1, 361: 1 }, aO); + var g0, Fl, p0, YR = Me(hs, "PortRestorer/PortSideArea", 361, Ie, Cle, yse), rXn; + b(1733, 1, {}, Ubn), s.Kb = function(e) { + return yl(), u(e, 15).Oc(); + }, w(hs, "PortRestorer/lambda$0$Type", 1733), b(1734, 1, Yn, Wbn), s.td = function(e) { + yl(), u(e, 113).c = !1; + }, w(hs, "PortRestorer/lambda$1$Type", 1734), b(1743, 1, Ve, Xbn), s.Mb = function(e) { + return yl(), u(e, 11).j == (J(), Gn); + }, w(hs, "PortRestorer/lambda$10$Type", 1743), b(1744, 1, {}, Vbn), s.Kb = function(e) { + return yl(), u(e, 113).d; + }, w(hs, "PortRestorer/lambda$11$Type", 1744), b(1745, 1, Yn, W5n), s.td = function(e) { + Hie(this.a, u(e, 11)); + }, w(hs, "PortRestorer/lambda$12$Type", 1745), b(1735, 1, Yn, X5n), s.td = function(e) { + Xce(this.a, u(e, 101)); + }, w(hs, "PortRestorer/lambda$2$Type", 1735), b(1736, 1, at, Qbn), s.ue = function(e, t) { + return X0e(u(e, 113), u(t, 113)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(hs, "PortRestorer/lambda$3$Type", 1736), b(1737, 1, Ve, Jbn), s.Mb = function(e) { + return yl(), u(e, 113).c; + }, w(hs, "PortRestorer/lambda$4$Type", 1737), b(1738, 1, Ve, Fbn), s.Mb = function(e) { + return xbe(u(e, 11)); + }, w(hs, "PortRestorer/lambda$5$Type", 1738), b(1739, 1, Ve, $bn), s.Mb = function(e) { + return yl(), u(e, 11).j == (J(), Kn); + }, w(hs, "PortRestorer/lambda$6$Type", 1739), b(1740, 1, Ve, xbn), s.Mb = function(e) { + return yl(), u(e, 11).j == (J(), Vn); + }, w(hs, "PortRestorer/lambda$7$Type", 1740), b(1741, 1, Ve, Lbn), s.Mb = function(e) { + return Eae(u(e, 11)); + }, w(hs, "PortRestorer/lambda$8$Type", 1741), b(1742, 1, Ve, Nbn), s.Mb = function(e) { + return yl(), u(e, 11).j == (J(), ae); + }, w(hs, "PortRestorer/lambda$9$Type", 1742), b(270, 22, { 3: 1, 35: 1, 22: 1, 270: 1 }, E2); + var ZR, n_, e_, t_, i_, r_, c_, u_, Ncn = Me(hs, "PortSideAssigner/Target", 270, Ie, _0e, gse), cXn; + b(1725, 1, {}, Bbn), s.Kb = function(e) { + return pt(new $n(null, new xn(u(e, 101).j, 16)), new _H()); + }, w(hs, "PortSideAssigner/lambda$1$Type", 1725), b(1726, 1, {}, Rbn), s.Kb = function(e) { + return u(e, 113).d; + }, w(hs, "PortSideAssigner/lambda$2$Type", 1726), b(1727, 1, Yn, _bn), s.td = function(e) { + si(u(e, 11), (J(), Kn)); + }, w(hs, "PortSideAssigner/lambda$3$Type", 1727), b(1728, 1, {}, Kbn), s.Kb = function(e) { + return u(e, 113).d; + }, w(hs, "PortSideAssigner/lambda$4$Type", 1728), b(1729, 1, Yn, V5n), s.td = function(e) { + Xte(this.a, u(e, 11)); + }, w(hs, "PortSideAssigner/lambda$5$Type", 1729), b(1730, 1, at, Gbn), s.ue = function(e, t) { + return Che(u(e, 101), u(t, 101)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(hs, "PortSideAssigner/lambda$6$Type", 1730), b(1731, 1, at, zbn), s.ue = function(e, t) { + return Joe(u(e, 113), u(t, 113)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(hs, "PortSideAssigner/lambda$7$Type", 1731), b(805, 1, Ve, _H), s.Mb = function(e) { + return u(e, 113).c; + }, w(hs, "PortSideAssigner/lambda$8$Type", 805), b(2009, 1, {}), w(Al, "AbstractSelfLoopRouter", 2009), b(1750, 1, at, Ybn), s.ue = function(e, t) { + return Kue(u(e, 101), u(t, 101)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Al, PKn, 1750), b(1751, 1, at, Zbn), s.ue = function(e, t) { + return _ue(u(e, 101), u(t, 101)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Al, IKn, 1751), b(1793, 2009, {}, nwn), s.Uf = function(e, t, i) { + return i; + }, w(Al, "OrthogonalSelfLoopRouter", 1793), b(1795, 1, Yn, U7n), s.td = function(e) { + zQ(this.b, this.a, u(e, 8)); + }, w(Al, "OrthogonalSelfLoopRouter/lambda$0$Type", 1795), b(1794, 1793, {}, ewn), s.Uf = function(e, t, i) { + var r, c; + return r = e.c.d, u3(i, 0, st(Qr(r.n), r.a)), c = e.d.d, Ke(i, st(Qr(c.n), c.a)), Kke(i); + }, w(Al, "PolylineSelfLoopRouter", 1794), b(1746, 1, {}, v4n), s.a = null; + var jg; + w(Al, "RoutingDirector", 1746), b(1747, 1, at, twn), s.ue = function(e, t) { + return nfe(u(e, 113), u(t, 113)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Al, "RoutingDirector/lambda$0$Type", 1747), b(1748, 1, {}, iwn), s.Kb = function(e) { + return Sj(), u(e, 101).j; + }, w(Al, "RoutingDirector/lambda$1$Type", 1748), b(1749, 1, Yn, rwn), s.td = function(e) { + Sj(), u(e, 15).ad(jg); + }, w(Al, "RoutingDirector/lambda$2$Type", 1749), b(1752, 1, {}, cwn), w(Al, "RoutingSlotAssigner", 1752), b(1753, 1, Ve, Q5n), s.Mb = function(e) { + return mre(this.a, u(e, 101)); + }, w(Al, "RoutingSlotAssigner/lambda$0$Type", 1753), b(1754, 1, at, J5n), s.ue = function(e, t) { + return Efe(this.a, u(e, 101), u(t, 101)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Al, "RoutingSlotAssigner/lambda$1$Type", 1754), b(1796, 1793, {}, uwn), s.Uf = function(e, t, i) { + var r, c, o, f; + return r = K(Y(xT(e.b.g.b, (nn(), jp)))), f = new ljn(A(M(di, 1), q, 8, 0, [(o = e.c.d, st(new kr(o.n), o.a))])), j9e(e, t, i, f, r), Ke(f, (c = e.d.d, st(new kr(c.n), c.a))), iFn(new jZ(f)); + }, w(Al, "SplineSelfLoopRouter", 1796), b(578, 1, at, cOn, OEn), s.ue = function(e, t) { + return P_n(this, u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(W6, "ModelOrderNodeComparator", 578), b(1755, 1, Ve, swn), s.Mb = function(e) { + return u(e, 11).e.c.length != 0; + }, w(W6, "ModelOrderNodeComparator/lambda$0$Type", 1755), b(1756, 1, {}, own), s.Kb = function(e) { + return u(un(u(e, 11).e, 0), 17).c; + }, w(W6, "ModelOrderNodeComparator/lambda$1$Type", 1756), b(1757, 1, Ve, fwn), s.Mb = function(e) { + return u(e, 11).e.c.length != 0; + }, w(W6, "ModelOrderNodeComparator/lambda$2$Type", 1757), b(1758, 1, {}, hwn), s.Kb = function(e) { + return u(un(u(e, 11).e, 0), 17).c; + }, w(W6, "ModelOrderNodeComparator/lambda$3$Type", 1758), b(1759, 1, Ve, lwn), s.Mb = function(e) { + return u(e, 11).e.c.length != 0; + }, w(W6, "ModelOrderNodeComparator/lambda$4$Type", 1759), b(806, 1, at, LPn, X7n), s.ue = function(e, t) { + return MCn(this, e, t); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(W6, "ModelOrderPortComparator", 806), b(801, 1, {}, KH), s.Vf = function(e, t) { + var i, r, c, o; + for (c = Ixn(t), i = new X(), o = t.f / c, r = 1; r < c; ++r) + W(i, Q(ge(eu(j.Math.round(r * o))))); + return i; + }, s.Wf = function() { + return !1; + }, w(qf, "ARDCutIndexHeuristic", 801), b(1479, 1, Nt, awn), s.pf = function(e, t) { + ike(u(e, 37), t); + }, w(qf, "BreakingPointInserter", 1479), b(305, 1, { 305: 1 }, wX), s.Ib = function() { + var e; + return e = new V1(), e.a += "BPInfo[", e.a += ` + start=`, rc(e, this.i), e.a += ` + end=`, rc(e, this.a), e.a += ` + nodeStartEdge=`, rc(e, this.e), e.a += ` + startEndEdge=`, rc(e, this.j), e.a += ` + originalEdge=`, rc(e, this.f), e.a += ` + startInLayerDummy=`, rc(e, this.k), e.a += ` + startInLayerEdge=`, rc(e, this.n), e.a += ` + endInLayerDummy=`, rc(e, this.b), e.a += ` + endInLayerEdge=`, rc(e, this.c), e.a; + }, w(qf, "BreakingPointInserter/BPInfo", 305), b(652, 1, { 652: 1 }, u6n), s.a = !1, s.b = 0, s.c = 0, w(qf, "BreakingPointInserter/Cut", 652), b(1480, 1, Nt, dwn), s.pf = function(e, t) { + $9e(u(e, 37), t); + }, w(qf, "BreakingPointProcessor", 1480), b(1481, 1, Ve, bwn), s.Mb = function(e) { + return eIn(u(e, 10)); + }, w(qf, "BreakingPointProcessor/0methodref$isEnd$Type", 1481), b(1482, 1, Ve, wwn), s.Mb = function(e) { + return tIn(u(e, 10)); + }, w(qf, "BreakingPointProcessor/1methodref$isStart$Type", 1482), b(1483, 1, Nt, gwn), s.pf = function(e, t) { + t8e(this, u(e, 37), t); + }, w(qf, "BreakingPointRemover", 1483), b(1484, 1, Yn, pwn), s.td = function(e) { + u(e, 128).k = !0; + }, w(qf, "BreakingPointRemover/lambda$0$Type", 1484), b(797, 1, {}, PY), s.b = 0, s.e = 0, s.f = 0, s.j = 0, w(qf, "GraphStats", 797), b(798, 1, {}, HH), s.Ce = function(e, t) { + return j.Math.max(K(Y(e)), K(Y(t))); + }, w(qf, "GraphStats/0methodref$max$Type", 798), b(799, 1, {}, qH), s.Ce = function(e, t) { + return j.Math.max(K(Y(e)), K(Y(t))); + }, w(qf, "GraphStats/2methodref$max$Type", 799), b(1660, 1, {}, vwn), s.Ce = function(e, t) { + return Koe(Y(e), Y(t)); + }, w(qf, "GraphStats/lambda$1$Type", 1660), b(1661, 1, {}, Y5n), s.Kb = function(e) { + return G$n(this.a, u(e, 29)); + }, w(qf, "GraphStats/lambda$2$Type", 1661), b(1662, 1, {}, Z5n), s.Kb = function(e) { + return TNn(this.a, u(e, 29)); + }, w(qf, "GraphStats/lambda$6$Type", 1662), b(800, 1, {}, GH), s.Vf = function(e, t) { + var i; + return i = u(k(e, (nn(), $sn)), 15), i || (Pn(), Pn(), cr); + }, s.Wf = function() { + return !1; + }, w(qf, "ICutIndexCalculator/ManualCutIndexCalculator", 800), b(802, 1, {}, zH), s.Vf = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _; + for (_ = (t.n == null && bFn(t), t.n), l = (t.d == null && bFn(t), t.d), x = F(Ci, vr, 25, _.length, 15, 1), x[0] = _[0], $ = _[0], a = 1; a < _.length; a++) + x[a] = x[a - 1] + _[a], $ += _[a]; + for (c = Ixn(t) - 1, f = u(k(e, (nn(), Fsn)), 19).a, r = Vt, i = new X(), p = j.Math.max(0, c - f); p <= j.Math.min(t.f - 1, c + f); p++) { + if (C = $ / (p + 1), S = 0, d = 1, o = new X(), O = Vt, g = 0, h = 0, m = l[0], p == 0) + O = $, h = (t.g == null && (t.g = sOn(t, new qH())), K(t.g)); + else { + for (; d < t.f; ) + x[d - 1] - S >= C && (W(o, Q(d)), O = j.Math.max(O, x[d - 1] - g), h += m, S += x[d - 1] - S, g = x[d - 1], m = l[d]), m = j.Math.max(m, l[d]), ++d; + h += m; + } + v = j.Math.min(1 / O, 1 / t.b / h), v > r && (r = v, i = o); + } + return i; + }, s.Wf = function() { + return !1; + }, w(qf, "MSDCutIndexHeuristic", 802), b(1617, 1, Nt, mwn), s.pf = function(e, t) { + Sye(u(e, 37), t); + }, w(qf, "SingleEdgeGraphWrapper", 1617), b(227, 22, { 3: 1, 35: 1, 22: 1, 227: 1 }, i5); + var Eg, ev, tv, Gb, ym, Cg, iv = Me(ac, "CenterEdgeLabelPlacementStrategy", 227, Ie, Rde, pse), uXn; + b(422, 22, { 3: 1, 35: 1, 22: 1, 422: 1 }, WG); + var Bcn, s_, Rcn = Me(ac, "ConstraintCalculationStrategy", 422, Ie, P1e, vse), sXn; + b(314, 22, { 3: 1, 35: 1, 22: 1, 314: 1, 246: 1, 234: 1 }, dO), s.Kf = function() { + return pLn(this); + }, s.Xf = function() { + return pLn(this); + }; + var qk, ap, _cn, Kcn = Me(ac, "CrossingMinimizationStrategy", 314, Ie, yle, mse), oXn; + b(337, 22, { 3: 1, 35: 1, 22: 1, 337: 1 }, bO); + var Hcn, o_, DS, qcn = Me(ac, "CuttingStrategy", 337, Ie, jle, jse), fXn; + b(335, 22, { 3: 1, 35: 1, 22: 1, 335: 1, 246: 1, 234: 1 }, X9), s.Kf = function() { + return iNn(this); + }, s.Xf = function() { + return iNn(this); + }; + var Gcn, f_, jm, h_, Em, zcn = Me(ac, "CycleBreakingStrategy", 335, Ie, lde, Ese), hXn; + b(419, 22, { 3: 1, 35: 1, 22: 1, 419: 1 }, XG); + var $S, Ucn, Wcn = Me(ac, "DirectionCongruency", 419, Ie, S1e, Cse), lXn; + b(450, 22, { 3: 1, 35: 1, 22: 1, 450: 1 }, wO); + var rv, l_, Tg, aXn = Me(ac, "EdgeConstraint", 450, Ie, Ele, Tse), dXn; + b(276, 22, { 3: 1, 35: 1, 22: 1, 276: 1 }, r5); + var a_, d_, b_, w_, FS, g_, Xcn = Me(ac, "EdgeLabelSideSelection", 276, Ie, qde, Mse), bXn; + b(479, 22, { 3: 1, 35: 1, 22: 1, 479: 1 }, VG); + var xS, Vcn, Qcn = Me(ac, "EdgeStraighteningStrategy", 479, Ie, A1e, Ase), wXn; + b(274, 22, { 3: 1, 35: 1, 22: 1, 274: 1 }, c5); + var p_, Jcn, Ycn, LS, Zcn, nun, eun = Me(ac, "FixedAlignment", 274, Ie, Kde, Sse), gXn; + b(275, 22, { 3: 1, 35: 1, 22: 1, 275: 1 }, u5); + var tun, iun, run, cun, Cm, uun, sun = Me(ac, "GraphCompactionStrategy", 275, Ie, _de, Pse), pXn; + b(256, 22, { 3: 1, 35: 1, 22: 1, 256: 1 }, q0); + var cv, NS, uv, $s, Tm, BS, sv, Mg, RS, Mm, v_ = Me(ac, "GraphProperties", 256, Ie, Sbe, Ise), vXn; + b(292, 22, { 3: 1, 35: 1, 22: 1, 292: 1 }, gO); + var Gk, m_, k_, y_ = Me(ac, "GreedySwitchType", 292, Ie, Mle, Ose), mXn; + b(303, 22, { 3: 1, 35: 1, 22: 1, 303: 1 }, pO); + var dp, zk, Ag, kXn = Me(ac, "InLayerConstraint", 303, Ie, Tle, Dse), yXn; + b(420, 22, { 3: 1, 35: 1, 22: 1, 420: 1 }, QG); + var j_, oun, fun = Me(ac, "InteractiveReferencePoint", 420, Ie, I1e, $se), jXn, hun, bp, v0, _S, lun, aun, KS, dun, Uk, HS, Am, wp, zb, E_, qS, ec, bun, m0, Ac, C_, T_, Wk, Ua, k0, gp, wun, pp, Xk, Ub, Xo, Ys, M_, Sg, bc, rt, gun, pun, vun, mun, kun, A_, GS, Mu, y0, S_, vp, Vk, mf, Pg, ov, Ig, Og, fv, Wa, yun, P_, I_, mp; + b(163, 22, { 3: 1, 35: 1, 22: 1, 163: 1 }, Q9); + var Sm, xl, Pm, Wb, Qk, jun = Me(ac, "LayerConstraint", 163, Ie, bde, Fse), EXn; + b(848, 1, zs, A4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), xnn), ""), "Direction Congruency"), "Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."), Dun), (j1(), Rt)), Wcn), Cn((Ho(), Xn))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Lnn), ""), "Feedback Edges"), "Whether feedback edges should be highlighted by routing around the nodes."), (qn(), !1)), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), WM), ""), "Interactive Reference Point"), "Determines which point of a node is considered by interactive layout phases."), Bun), Rt), fun), Cn(Xn)))), Mi(e, WM, IN, bVn), Mi(e, WM, X6, dVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Nnn), ""), "Merge Edges"), "Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Bnn), ""), "Merge Hierarchy-Crossing Edges"), "If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."), !0), _i), oi), Cn(Xn)))), En(e, new bn(_ie(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Rnn), ""), "Allow Non-Flow Ports To Switch Sides"), "Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."), !1), _i), oi), Cn(Za)), A(M(tn, 1), q, 2, 6, ["org.eclipse.elk.layered.northOrSouthPort"])))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), _nn), ""), "Port Sorting Strategy"), "Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."), Uun), Rt), non), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Knn), ""), "Thoroughness"), "How much effort should be spent to produce a nice layout."), Q(7)), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Hnn), ""), "Add Unnecessary Bendpoints"), "Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), qnn), ""), "Generate Position and Layer IDs"), "If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), IN), "cycleBreaking"), "Cycle Breaking Strategy"), "Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."), Oun), Rt), zcn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), wk), nB), "Node Layering Strategy"), "Strategy for node layering."), Kun), Rt), Hsn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Gnn), nB), "Layer Constraint"), "Determines a constraint on the placement of the node regarding the layering."), Run), Rt), jun), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), znn), nB), "Layer Choice Constraint"), "Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), Q(-1)), sc), Ui), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Unn), nB), "Layer ID"), "Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."), Q(-1)), sc), Ui), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ON), dHn), "Upper Bound On Width [MinWidth Layerer]"), "Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."), Q(4)), sc), Ui), Cn(Xn)))), Mi(e, ON, wk, yVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), DN), dHn), "Upper Layer Estimation Scaling Factor [MinWidth Layerer]"), "Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."), Q(2)), sc), Ui), Cn(Xn)))), Mi(e, DN, wk, EVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), $N), bHn), "Node Promotion Strategy"), "Reduces number of dummy nodes after layering phase (if possible)."), _un), Rt), Jsn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), FN), bHn), "Max Node Promotion Iterations"), "Limits the number of iterations for node promotion."), Q(0)), sc), Ui), Cn(Xn)))), Mi(e, FN, $N, null), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), xN), "layering.coffmanGraham"), "Layer Bound"), "The maximum number of nodes allowed per layer."), Q(nt)), sc), Ui), Cn(Xn)))), Mi(e, xN, wk, gVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), X6), gk), "Crossing Minimization Strategy"), "Strategy for crossing minimization."), Iun), Rt), Kcn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Wnn), gk), "Force Node Model Order"), "The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), LN), gk), "Hierarchical Sweepiness"), "How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."), 0.1), Dr), Si), Cn(Xn)))), Mi(e, LN, uA, HXn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), NN), gk), "Semi-Interactive Crossing Minimization"), "Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."), !1), _i), oi), Cn(Xn)))), Mi(e, NN, X6, UXn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Xnn), gk), "Position Choice Constraint"), "Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), Q(-1)), sc), Ui), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Vnn), gk), "Position ID"), "Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."), Q(-1)), sc), Ui), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Qnn), wHn), "Greedy Switch Activation Threshold"), "By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."), Q(40)), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), BN), wHn), "Greedy Switch Crossing Minimization"), "Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."), Pun), Rt), y_), Cn(Xn)))), Mi(e, BN, X6, _Xn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), XM), "crossingMinimization.greedySwitchHierarchical"), "Greedy Switch Crossing Minimization (hierarchical)"), "Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."), Sun), Rt), y_), Cn(Xn)))), Mi(e, XM, X6, NXn), Mi(e, XM, uA, BXn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), lg), gHn), "Node Placement Strategy"), "Strategy for node placement."), zun), Rt), Usn), Cn(Xn)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), VM), gHn), "Favor Straight Edges Over Balancing"), "Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."), _i), oi), Cn(Xn)))), Mi(e, VM, lg, FVn), Mi(e, VM, lg, xVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), RN), pHn), "BK Edge Straightening"), "Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."), Hun), Rt), Qcn), Cn(Xn)))), Mi(e, RN, lg, IVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), _N), pHn), "BK Fixed Alignment"), "Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."), qun), Rt), eun), Cn(Xn)))), Mi(e, _N, lg, DVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), KN), "nodePlacement.linearSegments"), "Linear Segments Deflection Dampening"), "Dampens the movement of nodes to keep the diagram from getting too large."), 0.3), Dr), Si), Cn(Xn)))), Mi(e, KN, lg, NVn), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), HN), "nodePlacement.networkSimplex"), "Node Flexibility"), "Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."), Rt), Z_), Cn(vi)))), Mi(e, HN, lg, KVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), qN), "nodePlacement.networkSimplex.nodeFlexibility"), "Node Flexibility Default"), "Default value of the 'nodeFlexibility' option for the children of a hierarchical node."), Gun), Rt), Z_), Cn(Xn)))), Mi(e, qN, lg, _Vn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Jnn), vHn), "Self-Loop Distribution"), "Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."), xun), Rt), ion), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Ynn), vHn), "Self-Loop Ordering"), "Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."), Lun), Rt), ron), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), QM), "edgeRouting.splines"), "Spline Routing Mode"), "Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."), Nun), Rt), uon), Cn(Xn)))), Mi(e, QM, pk, iVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), JM), "edgeRouting.splines.sloppy"), "Sloppy Spline Layer Spacing Factor"), "Spacing factor for routing area between layers when using sloppy spline routing."), 0.2), Dr), Si), Cn(Xn)))), Mi(e, JM, pk, cVn), Mi(e, JM, QM, uVn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), GN), "edgeRouting.polyline"), "Sloped Edge Zone Width"), "Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."), 2), Dr), Si), Cn(Xn)))), Mi(e, GN, pk, ZXn), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Znn), wf), "Spacing Base Value"), "An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), nen), wf), "Edge Node Between Layers Spacing"), "The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."), 10), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), een), wf), "Edge Edge Between Layer Spacing"), "Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."), 10), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ten), wf), "Node Node Between Layers Spacing"), "The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."), 20), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ien), aen), "Direction Priority"), "Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."), Q(0)), sc), Ui), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ren), aen), "Shortness Priority"), "Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."), Q(0)), sc), Ui), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), cen), aen), "Straightness Priority"), "Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."), Q(0)), sc), Ui), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), zN), den), FKn), "Tries to further compact components (disconnected sub-graphs)."), !1), _i), oi), Cn(Xn)))), Mi(e, zN, q6, !0), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), uen), mHn), "Post Compaction Strategy"), kHn), Cun), Rt), sun), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), sen), mHn), "Post Compaction Constraint Calculation"), kHn), Eun), Rt), Rcn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), YM), ben), "High Degree Node Treatment"), "Makes room around high degree nodes to place leafs and trees."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), UN), ben), "High Degree Node Threshold"), "Whether a node is considered to have a high degree."), Q(16)), sc), Ui), Cn(Xn)))), Mi(e, UN, YM, !0), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), WN), ben), "High Degree Node Maximum Tree Height"), "Maximum height of a subtree connected to a high degree node to be moved to separate layers."), Q(5)), sc), Ui), Cn(Xn)))), Mi(e, WN, YM, !0), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Vh), wen), "Graph Wrapping Strategy"), "For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."), Vun), Rt), hon), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ZM), wen), "Additional Wrapped Edges Spacing"), "To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."), 10), Dr), Si), Cn(Xn)))), Mi(e, ZM, Vh, nQn), Mi(e, ZM, Vh, eQn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), nA), wen), "Correction Factor for Wrapping"), "At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."), 1), Dr), Si), Cn(Xn)))), Mi(e, nA, Vh, iQn), Mi(e, nA, Vh, rQn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), V6), yHn), "Cutting Strategy"), "The strategy by which the layer indexes are determined at which the layering crumbles into chunks."), Xun), Rt), qcn), Cn(Xn)))), Mi(e, V6, Vh, hQn), Mi(e, V6, Vh, lQn), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), XN), yHn), "Manually Specified Cuts"), "Allows the user to specify her own cuts for a certain graph."), yf), Ds), Cn(Xn)))), Mi(e, XN, V6, uQn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), VN), "wrapping.cutting.msd"), "MSD Freedom"), "The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."), Wun), sc), Ui), Cn(Xn)))), Mi(e, VN, V6, oQn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), eA), jHn), "Validification Strategy"), "When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."), Qun), Rt), fon), Cn(Xn)))), Mi(e, eA, Vh, EQn), Mi(e, eA, Vh, CQn), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), tA), jHn), "Valid Indices for Wrapping"), null), yf), Ds), Cn(Xn)))), Mi(e, tA, Vh, kQn), Mi(e, tA, Vh, yQn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), iA), gen), "Improve Cuts"), "For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."), !0), _i), oi), Cn(Xn)))), Mi(e, iA, Vh, wQn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), rA), gen), "Distance Penalty When Improving Cuts"), null), 2), Dr), Si), Cn(Xn)))), Mi(e, rA, Vh, dQn), Mi(e, rA, iA, !0), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), QN), gen), "Improve Wrapped Edges"), "The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."), !0), _i), oi), Cn(Xn)))), Mi(e, QN, Vh, pQn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), oen), eB), "Edge Label Side Selection"), "Method to decide on edge label sides."), Fun), Rt), Xcn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), fen), eB), "Edge Center Label Placement Strategy"), "Determines in which layer center labels of long edges should be placed."), $un), Rt), iv), vt(Xn, A(M(F1, 1), z, 175, 0, [$1]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), cA), vk), "Consider Model Order"), "Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."), Aun), Rt), Zsn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), hen), vk), "No Model Order"), "Set on a node to not set a model order for this node even though it is a real node."), !1), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), JN), vk), "Consider Model Order for Components"), "If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."), Tun), Rt), zrn), Cn(Xn)))), Mi(e, JN, q6, null), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), len), vk), "Long Edge Ordering Strategy"), "Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."), Mun), Rt), Gsn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), YN), vk), "Crossing Counter Node Order Influence"), "Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."), 0), Dr), Si), Cn(Xn)))), Mi(e, YN, cA, null), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ZN), vk), "Crossing Counter Port Order Influence"), "Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."), 0), Dr), Si), Cn(Xn)))), Mi(e, ZN, cA, null), R_n((new I4n(), e)); + }; + var CXn, TXn, MXn, Eun, AXn, Cun, SXn, Tun, PXn, IXn, OXn, Mun, DXn, $Xn, Aun, FXn, xXn, LXn, Sun, NXn, BXn, RXn, Pun, _Xn, KXn, HXn, qXn, GXn, zXn, UXn, WXn, Iun, XXn, Oun, VXn, Dun, QXn, $un, JXn, Fun, YXn, ZXn, nVn, xun, eVn, Lun, tVn, Nun, iVn, rVn, cVn, uVn, sVn, oVn, fVn, hVn, lVn, aVn, Bun, dVn, bVn, wVn, gVn, pVn, vVn, Run, mVn, kVn, yVn, jVn, EVn, CVn, TVn, _un, MVn, Kun, AVn, SVn, PVn, Hun, IVn, OVn, qun, DVn, $Vn, FVn, xVn, LVn, NVn, BVn, RVn, Gun, _Vn, KVn, HVn, zun, qVn, Uun, GVn, zVn, UVn, WVn, XVn, VVn, QVn, JVn, YVn, ZVn, nQn, eQn, tQn, iQn, rQn, cQn, uQn, sQn, Wun, oQn, fQn, Xun, hQn, lQn, aQn, dQn, bQn, wQn, gQn, pQn, vQn, Vun, mQn, kQn, yQn, jQn, Qun, EQn, CQn; + w(ac, "LayeredMetaDataProvider", 848), b(986, 1, zs, I4n), s.Qe = function(e) { + R_n(e); + }; + var Qf, O_, zS, Im, US, Jun, WS, kp, XS, Yun, Zun, D_, Ll, $_, Xb, nsn, Jk, F_, esn, TQn, VS, x_, Om, Vb, MQn, as, tsn, isn, QS, L_, Jf, JS, Qh, rsn, csn, usn, N_, B_, ssn, P1, R_, osn, Qb, fsn, hsn, lsn, YS, Jb, Xa, asn, dsn, Mr, bsn, AQn, Hc, ZS, wsn, gsn, psn, __, vsn, nP, msn, ksn, eP, j0, ysn, K_, Dm, jsn, E0, $m, tP, Va, H_, hv, iP, Qa, Esn, Csn, Tsn, lv, Msn, SQn, PQn, IQn, OQn, C0, Yb, Bt, I1, DQn, Zb, Asn, av, Ssn, nw, $Qn, dv, Psn, yp, FQn, xQn, Yk, q_, Isn, Zk, Mo, Dg, jp, T0, Ja, rP, ew, G_, bv, wv, M0, $g, z_, ny, Fm, xm, U_, Osn, Dsn, $sn, Fsn, W_, xsn, Lsn, Nsn, Bsn, X_, cP; + w(ac, "LayeredOptions", 986), b(987, 1, {}, ywn), s.$e = function() { + var e; + return e = new Vmn(), e; + }, s._e = function(e) { + }, w(ac, "LayeredOptions/LayeredFactory", 987), b(1372, 1, {}), s.a = 0; + var LQn; + w(dc, "ElkSpacings/AbstractSpacingsBuilder", 1372), b(779, 1372, {}, AQ); + var uP, NQn; + w(ac, "LayeredSpacings/LayeredSpacingsBuilder", 779), b(313, 22, { 3: 1, 35: 1, 22: 1, 313: 1, 246: 1, 234: 1 }, s5), s.Kf = function() { + return vNn(this); + }, s.Xf = function() { + return vNn(this); + }; + var V_, Rsn, _sn, sP, Q_, Ksn, Hsn = Me(ac, "LayeringStrategy", 313, Ie, Hde, xse), BQn; + b(378, 22, { 3: 1, 35: 1, 22: 1, 378: 1 }, vO); + var J_, qsn, oP, Gsn = Me(ac, "LongEdgeOrderingStrategy", 378, Ie, kle, Lse), RQn; + b(197, 22, { 3: 1, 35: 1, 22: 1, 197: 1 }, Gj); + var Fg, xg, fP, Y_, Z_ = Me(ac, "NodeFlexibility", 197, Ie, Aae, Nse), _Qn; + b(315, 22, { 3: 1, 35: 1, 22: 1, 315: 1, 246: 1, 234: 1 }, V9), s.Kf = function() { + return tNn(this); + }, s.Xf = function() { + return tNn(this); + }; + var Lm, nK, eK, Nm, zsn, Usn = Me(ac, "NodePlacementStrategy", 315, Ie, hde, qse), KQn; + b(260, 22, { 3: 1, 35: 1, 22: 1, 260: 1 }, h2); + var Wsn, ey, Xsn, Vsn, ty, Qsn, hP, lP, Jsn = Me(ac, "NodePromotionStrategy", 260, Ie, K0e, Rse), HQn; + b(339, 22, { 3: 1, 35: 1, 22: 1, 339: 1 }, mO); + var Ysn, Nl, tK, Zsn = Me(ac, "OrderingStrategy", 339, Ie, Sle, _se), qQn; + b(421, 22, { 3: 1, 35: 1, 22: 1, 421: 1 }, JG); + var iK, rK, non = Me(ac, "PortSortingStrategy", 421, Ie, O1e, Kse), GQn; + b(452, 22, { 3: 1, 35: 1, 22: 1, 452: 1 }, kO); + var Au, Lc, Bm, zQn = Me(ac, "PortType", 452, Ie, Ale, Bse), UQn; + b(375, 22, { 3: 1, 35: 1, 22: 1, 375: 1 }, yO); + var eon, cK, ton, ion = Me(ac, "SelfLoopDistributionStrategy", 375, Ie, Ple, Hse), WQn; + b(376, 22, { 3: 1, 35: 1, 22: 1, 376: 1 }, YG); + var iy, uK, ron = Me(ac, "SelfLoopOrderingStrategy", 376, Ie, M1e, Gse), XQn; + b(304, 1, { 304: 1 }, KRn), w(ac, "Spacings", 304), b(336, 22, { 3: 1, 35: 1, 22: 1, 336: 1 }, jO); + var sK, con, Rm, uon = Me(ac, "SplineRoutingMode", 336, Ie, Ole, zse), VQn; + b(338, 22, { 3: 1, 35: 1, 22: 1, 338: 1 }, EO); + var oK, son, oon, fon = Me(ac, "ValidifyStrategy", 338, Ie, Dle, Use), QQn; + b(377, 22, { 3: 1, 35: 1, 22: 1, 377: 1 }, CO); + var tw, fK, gv, hon = Me(ac, "WrappingStrategy", 377, Ie, Ile, Wse), JQn; + b(1383, 1, Cc, O4n), s.Yf = function(e) { + return u(e, 37), YQn; + }, s.pf = function(e, t) { + jje(this, u(e, 37), t); + }; + var YQn; + w(fA, "DepthFirstCycleBreaker", 1383), b(782, 1, Cc, lW), s.Yf = function(e) { + return u(e, 37), ZQn; + }, s.pf = function(e, t) { + kTe(this, u(e, 37), t); + }, s.Zf = function(e) { + return u(un(e, _T(this.d, e.c.length)), 10); + }; + var ZQn; + w(fA, "GreedyCycleBreaker", 782), b(1386, 782, Cc, Skn), s.Zf = function(e) { + var t, i, r, c; + for (c = null, t = nt, r = new E(e); r.a < r.c.c.length; ) + i = u(y(r), 10), ai(i, (G(), bc)) && u(k(i, bc), 19).a < t && (t = u(k(i, bc), 19).a, c = i); + return c || u(un(e, _T(this.d, e.c.length)), 10); + }, w(fA, "GreedyModelOrderCycleBreaker", 1386), b(1384, 1, Cc, y4n), s.Yf = function(e) { + return u(e, 37), nJn; + }, s.pf = function(e, t) { + Gje(this, u(e, 37), t); + }; + var nJn; + w(fA, "InteractiveCycleBreaker", 1384), b(1385, 1, Cc, j4n), s.Yf = function(e) { + return u(e, 37), eJn; + }, s.pf = function(e, t) { + zje(this, u(e, 37), t); + }, s.a = 0, s.b = 0; + var eJn; + w(fA, "ModelOrderCycleBreaker", 1385), b(1389, 1, Cc, k7n), s.Yf = function(e) { + return u(e, 37), tJn; + }, s.pf = function(e, t) { + CTe(this, u(e, 37), t); + }; + var tJn; + w(Fb, "CoffmanGrahamLayerer", 1389), b(1390, 1, at, n6n), s.ue = function(e, t) { + return Y6e(this.a, u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Fb, "CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type", 1390), b(1391, 1, at, e6n), s.ue = function(e, t) { + return Bfe(this.a, u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Fb, "CoffmanGrahamLayerer/lambda$1$Type", 1391), b(1392, 1, Cc, jwn), s.Yf = function(e) { + return u(e, 37), Ze(Ze(Ze(new li(), (Vi(), Vf), (rr(), WR)), $l, Y4), Kc, J4); + }, s.pf = function(e, t) { + ACe(this, u(e, 37), t); + }, w(Fb, "InteractiveLayerer", 1392), b(569, 1, { 569: 1 }, i9n), s.a = 0, s.c = 0, w(Fb, "InteractiveLayerer/LayerSpan", 569), b(1388, 1, Cc, k4n), s.Yf = function(e) { + return u(e, 37), iJn; + }, s.pf = function(e, t) { + i7e(this, u(e, 37), t); + }; + var iJn; + w(Fb, "LongestPathLayerer", 1388), b(1395, 1, Cc, M4n), s.Yf = function(e) { + return u(e, 37), Ze(Ze(Ze(new li(), (Vi(), Vf), (rr(), mm)), $l, Y4), Kc, J4); + }, s.pf = function(e, t) { + QCe(this, u(e, 37), t); + }, s.a = 0, s.b = 0, s.d = 0; + var lon, aon; + w(Fb, "MinWidthLayerer", 1395), b(1396, 1, at, t6n), s.ue = function(e, t) { + return zbe(this, u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Fb, "MinWidthLayerer/MinOutgoingEdgesComparator", 1396), b(1387, 1, Cc, T4n), s.Yf = function(e) { + return u(e, 37), rJn; + }, s.pf = function(e, t) { + bEe(this, u(e, 37), t); + }; + var rJn; + w(Fb, "NetworkSimplexLayerer", 1387), b(1393, 1, Cc, Kjn), s.Yf = function(e) { + return u(e, 37), Ze(Ze(Ze(new li(), (Vi(), Vf), (rr(), mm)), $l, Y4), Kc, J4); + }, s.pf = function(e, t) { + eCe(this, u(e, 37), t); + }, s.d = 0, s.f = 0, s.g = 0, s.i = 0, s.s = 0, s.t = 0, s.u = 0, w(Fb, "StretchWidthLayerer", 1393), b(1394, 1, at, Ewn), s.ue = function(e, t) { + return jde(u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Fb, "StretchWidthLayerer/1", 1394), b(402, 1, Yen), s.Nf = function(e, t, i, r, c, o) { + }, s._f = function(e, t, i) { + return NBn(this, e, t, i); + }, s.Mf = function() { + this.g = F(bw, CHn, 25, this.d, 15, 1), this.f = F(bw, CHn, 25, this.d, 15, 1); + }, s.Of = function(e, t) { + this.e[e] = F(be, Le, 25, t[e].length, 15, 1); + }, s.Pf = function(e, t, i) { + var r; + r = i[e][t], r.p = t, this.e[e][t] = t; + }, s.Qf = function(e, t, i, r) { + u(un(r[e][t].j, i), 11).p = this.d++; + }, s.b = 0, s.c = 0, s.d = 0, w(pu, "AbstractBarycenterPortDistributor", 402), b(1633, 1, at, i6n), s.ue = function(e, t) { + return wpe(this.a, u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(pu, "AbstractBarycenterPortDistributor/lambda$0$Type", 1633), b(817, 1, bk, dX), s.Nf = function(e, t, i, r, c, o) { + }, s.Pf = function(e, t, i) { + }, s.Qf = function(e, t, i, r) { + }, s.Lf = function() { + return !1; + }, s.Mf = function() { + this.c = this.e.a, this.g = this.f.g; + }, s.Of = function(e, t) { + t[e][0].c.p = e; + }, s.Rf = function() { + return !1; + }, s.ag = function(e, t, i, r) { + i ? GFn(this, e) : (XFn(this, e, r), e_n(this, e, t)), e.c.length > 1 && (on(sn(k(qi((Ln(0, e.c.length), u(e.c[0], 10))), (nn(), Xb)))) ? aNn(e, this.d, u(this, 660)) : (Pn(), wi(e, this.d)), DOn(this.e, e)); + }, s.Sf = function(e, t, i, r) { + var c, o, f, h, l, a, d; + for (t != iCn(i, e.length) && (o = e[t - (i ? 1 : -1)], LX(this.f, o, i ? (sr(), Lc) : (sr(), Au))), c = e[t][0], d = !r || c.k == (Qn(), Xt), a = cf(e[t]), this.ag(a, d, !1, i), f = 0, l = new E(a); l.a < l.c.c.length; ) + h = u(y(l), 10), e[t][f++] = h; + return !1; + }, s.Tf = function(e, t) { + var i, r, c, o, f; + for (f = iCn(t, e.length), o = cf(e[f]), this.ag(o, !1, !0, t), i = 0, c = new E(o); c.a < c.c.c.length; ) + r = u(y(c), 10), e[f][i++] = r; + return !1; + }, w(pu, "BarycenterHeuristic", 817), b(658, 1, { 658: 1 }, c6n), s.Ib = function() { + return "BarycenterState [node=" + this.c + ", summedWeight=" + this.d + ", degree=" + this.b + ", barycenter=" + this.a + ", visited=" + this.e + "]"; + }, s.b = 0, s.d = 0, s.e = !1; + var cJn = w(pu, "BarycenterHeuristic/BarycenterState", 658); + b(1802, 1, at, r6n), s.ue = function(e, t) { + return eve(this.a, u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(pu, "BarycenterHeuristic/lambda$0$Type", 1802), b(816, 1, bk, BJ), s.Mf = function() { + }, s.Nf = function(e, t, i, r, c, o) { + }, s.Qf = function(e, t, i, r) { + }, s.Of = function(e, t) { + this.a[e] = F(cJn, { 3: 1, 4: 1, 5: 1, 2018: 1 }, 658, t[e].length, 0, 1), this.b[e] = F(uJn, { 3: 1, 4: 1, 5: 1, 2019: 1 }, 233, t[e].length, 0, 1); + }, s.Pf = function(e, t, i) { + x$n(this, i[e][t], !0); + }, s.c = !1, w(pu, "ForsterConstraintResolver", 816), b(233, 1, { 233: 1 }, YTn, _Rn), s.Ib = function() { + var e, t; + for (t = new V1(), t.a += "[", e = 0; e < this.d.length; e++) + De(t, X$n(this.d[e])), Zo(this.g, this.d[0]).a != null && De(De((t.a += "<", t), Tre(Zo(this.g, this.d[0]).a)), ">"), e < this.d.length - 1 && (t.a += Qi); + return (t.a += "]", t).a; + }, s.a = 0, s.c = 0, s.f = 0; + var uJn = w(pu, "ForsterConstraintResolver/ConstraintGroup", 233); + b(1797, 1, Yn, s6n), s.td = function(e) { + x$n(this.a, u(e, 10), !1); + }, w(pu, "ForsterConstraintResolver/lambda$0$Type", 1797), b(214, 1, { 214: 1, 225: 1 }, URn), s.Nf = function(e, t, i, r, c, o) { + }, s.Of = function(e, t) { + }, s.Mf = function() { + this.r = F(be, Le, 25, this.n, 15, 1); + }, s.Pf = function(e, t, i) { + var r, c; + c = i[e][t], r = c.e, r && W(this.b, r); + }, s.Qf = function(e, t, i, r) { + ++this.n; + }, s.Ib = function() { + return t_n(this.e, new hi()); + }, s.g = !1, s.i = !1, s.n = 0, s.s = !1, w(pu, "GraphInfoHolder", 214), b(1832, 1, bk, kwn), s.Nf = function(e, t, i, r, c, o) { + }, s.Of = function(e, t) { + }, s.Qf = function(e, t, i, r) { + }, s._f = function(e, t, i) { + return i && t > 0 ? r$(this.a, e[t - 1], e[t]) : !i && t < e.length - 1 ? r$(this.a, e[t], e[t + 1]) : Y$(this.a, e[t], i ? (J(), Gn) : (J(), Vn)), I9e(this, e, t, i); + }, s.Mf = function() { + this.d = F(be, Le, 25, this.c, 15, 1), this.a = new b8(this.d); + }, s.Pf = function(e, t, i) { + var r; + r = i[e][t], this.c += r.j.c.length; + }, s.c = 0, w(pu, "GreedyPortDistributor", 1832), b(1401, 1, Cc, D4n), s.Yf = function(e) { + return sge(u(e, 37)); + }, s.pf = function(e, t) { + IEe(u(e, 37), t); + }; + var sJn; + w(pu, "InteractiveCrossingMinimizer", 1401), b(1402, 1, at, o6n), s.ue = function(e, t) { + return B4e(this, u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(pu, "InteractiveCrossingMinimizer/1", 1402), b(507, 1, { 507: 1, 123: 1, 51: 1 }, WI), s.Yf = function(e) { + var t; + return u(e, 37), t = iE(oJn), Ze(t, (Vi(), Kc), (rr(), kS)), t; + }, s.pf = function(e, t) { + qke(this, u(e, 37), t); + }, s.e = 0; + var oJn; + w(pu, "LayerSweepCrossingMinimizer", 507), b(1398, 1, Yn, f6n), s.td = function(e) { + Pye(this.a, u(e, 214)); + }, w(pu, "LayerSweepCrossingMinimizer/0methodref$compareDifferentRandomizedLayouts$Type", 1398), b(1399, 1, Yn, h6n), s.td = function(e) { + nge(this.a, u(e, 214)); + }, w(pu, "LayerSweepCrossingMinimizer/1methodref$minimizeCrossingsNoCounter$Type", 1399), b(1400, 1, Yn, l6n), s.td = function(e) { + tRn(this.a, u(e, 214)); + }, w(pu, "LayerSweepCrossingMinimizer/2methodref$minimizeCrossingsWithCounter$Type", 1400), b(454, 22, { 3: 1, 35: 1, 22: 1, 454: 1 }, TO); + var ry, _m, aP, fJn = Me(pu, "LayerSweepCrossingMinimizer/CrossMinType", 454, Ie, $le, Xse), hJn; + b(1397, 1, Ve, Cwn), s.Mb = function(e) { + return AV(), u(e, 29).a.c.length == 0; + }, w(pu, "LayerSweepCrossingMinimizer/lambda$0$Type", 1397), b(1799, 1, bk, wMn), s.Mf = function() { + }, s.Nf = function(e, t, i, r, c, o) { + }, s.Qf = function(e, t, i, r) { + }, s.Of = function(e, t) { + t[e][0].c.p = e, this.b[e] = F(lJn, { 3: 1, 4: 1, 5: 1, 1944: 1 }, 659, t[e].length, 0, 1); + }, s.Pf = function(e, t, i) { + var r; + r = i[e][t], r.p = t, St(this.b[e], t, new Twn()); + }, w(pu, "LayerSweepTypeDecider", 1799), b(659, 1, { 659: 1 }, Twn), s.Ib = function() { + return "NodeInfo [connectedEdges=" + this.a + ", hierarchicalInfluence=" + this.b + ", randomInfluence=" + this.c + "]"; + }, s.a = 0, s.b = 0, s.c = 0; + var lJn = w(pu, "LayerSweepTypeDecider/NodeInfo", 659); + b(1800, 1, Rf, Mwn), s.Lb = function(e) { + return E5(new uf(u(e, 11).b)); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return E5(new uf(u(e, 11).b)); + }, w(pu, "LayerSweepTypeDecider/lambda$0$Type", 1800), b(1801, 1, Rf, Awn), s.Lb = function(e) { + return E5(new uf(u(e, 11).b)); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return E5(new uf(u(e, 11).b)); + }, w(pu, "LayerSweepTypeDecider/lambda$1$Type", 1801), b(1833, 402, Yen, t8n), s.$f = function(e, t, i) { + var r, c, o, f, h, l, a, d, g; + switch (a = this.g, i.g) { + case 1: { + for (r = 0, c = 0, l = new E(e.j); l.a < l.c.c.length; ) + f = u(y(l), 11), f.e.c.length != 0 && (++r, f.j == (J(), Kn) && ++c); + for (o = t + c, g = t + r, h = Wd(e, (sr(), Au)).Kc(); h.Ob(); ) + f = u(h.Pb(), 11), f.j == (J(), Kn) ? (a[f.p] = o, --o) : (a[f.p] = g, --g); + return r; + } + case 2: { + for (d = 0, h = Wd(e, (sr(), Lc)).Kc(); h.Ob(); ) + f = u(h.Pb(), 11), ++d, a[f.p] = t + d; + return d; + } + default: + throw T(new F9()); + } + }, w(pu, "LayerTotalPortDistributor", 1833), b(660, 817, { 660: 1, 225: 1 }, JIn), s.ag = function(e, t, i, r) { + i ? GFn(this, e) : (XFn(this, e, r), e_n(this, e, t)), e.c.length > 1 && (on(sn(k(qi((Ln(0, e.c.length), u(e.c[0], 10))), (nn(), Xb)))) ? aNn(e, this.d, this) : (Pn(), wi(e, this.d)), on(sn(k(qi((Ln(0, e.c.length), u(e.c[0], 10))), Xb))) || DOn(this.e, e)); + }, w(pu, "ModelOrderBarycenterHeuristic", 660), b(1803, 1, at, a6n), s.ue = function(e, t) { + return L5e(this.a, u(e, 10), u(t, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(pu, "ModelOrderBarycenterHeuristic/lambda$0$Type", 1803), b(1403, 1, Cc, R4n), s.Yf = function(e) { + var t; + return u(e, 37), t = iE(aJn), Ze(t, (Vi(), Kc), (rr(), kS)), t; + }, s.pf = function(e, t) { + y1e((u(e, 37), t)); + }; + var aJn; + w(pu, "NoCrossingMinimizer", 1403), b(796, 402, Yen, yG), s.$f = function(e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v; + switch (g = this.g, i.g) { + case 1: { + for (c = 0, o = 0, d = new E(e.j); d.a < d.c.c.length; ) + l = u(y(d), 11), l.e.c.length != 0 && (++c, l.j == (J(), Kn) && ++o); + for (r = 1 / (c + 1), f = t + o * r, v = t + 1 - r, a = Wd(e, (sr(), Au)).Kc(); a.Ob(); ) + l = u(a.Pb(), 11), l.j == (J(), Kn) ? (g[l.p] = f, f -= r) : (g[l.p] = v, v -= r); + break; + } + case 2: { + for (h = 0, d = new E(e.j); d.a < d.c.c.length; ) + l = u(y(d), 11), l.g.c.length == 0 || ++h; + for (r = 1 / (h + 1), p = t + r, a = Wd(e, (sr(), Lc)).Kc(); a.Ob(); ) + l = u(a.Pb(), 11), g[l.p] = p, p += r; + break; + } + default: + throw T(new Hn("Port type is undefined")); + } + return 1; + }, w(pu, "NodeRelativePortDistributor", 796), b(807, 1, {}, PCn, Exn), w(pu, "SweepCopy", 807), b(1798, 1, bk, b$n), s.Of = function(e, t) { + }, s.Mf = function() { + var e; + e = F(be, Le, 25, this.f, 15, 1), this.d = new k6n(e), this.a = new b8(e); + }, s.Nf = function(e, t, i, r, c, o) { + var f; + f = u(un(o[e][t].j, i), 11), c.c == f && c.c.i.c == c.d.i.c && ++this.e[e]; + }, s.Pf = function(e, t, i) { + var r; + r = i[e][t], this.c[e] = this.c[e] | r.k == (Qn(), Mc); + }, s.Qf = function(e, t, i, r) { + var c; + c = u(un(r[e][t].j, i), 11), c.p = this.f++, c.g.c.length + c.e.c.length > 1 && (c.j == (J(), Vn) ? this.b[e] = !0 : c.j == Gn && e > 0 && (this.b[e - 1] = !0)); + }, s.f = 0, w(gh, "AllCrossingsCounter", 1798), b(587, 1, {}, tT), s.b = 0, s.d = 0, w(gh, "BinaryIndexedTree", 587), b(524, 1, {}, b8); + var don, dP; + w(gh, "CrossingsCounter", 524), b(1906, 1, at, d6n), s.ue = function(e, t) { + return Cfe(this.a, u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(gh, "CrossingsCounter/lambda$0$Type", 1906), b(1907, 1, at, b6n), s.ue = function(e, t) { + return Tfe(this.a, u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(gh, "CrossingsCounter/lambda$1$Type", 1907), b(1908, 1, at, w6n), s.ue = function(e, t) { + return Mfe(this.a, u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(gh, "CrossingsCounter/lambda$2$Type", 1908), b(1909, 1, at, g6n), s.ue = function(e, t) { + return Afe(this.a, u(e, 11), u(t, 11)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(gh, "CrossingsCounter/lambda$3$Type", 1909), b(1910, 1, Yn, p6n), s.td = function(e) { + o0e(this.a, u(e, 11)); + }, w(gh, "CrossingsCounter/lambda$4$Type", 1910), b(1911, 1, Ve, v6n), s.Mb = function(e) { + return jre(this.a, u(e, 11)); + }, w(gh, "CrossingsCounter/lambda$5$Type", 1911), b(1912, 1, Yn, m6n), s.td = function(e) { + Ckn(this, e); + }, w(gh, "CrossingsCounter/lambda$6$Type", 1912), b(1913, 1, Yn, Q7n), s.td = function(e) { + var t; + f3(), ll(this.b, (t = this.a, u(e, 11), t)); + }, w(gh, "CrossingsCounter/lambda$7$Type", 1913), b(826, 1, Rf, UH), s.Lb = function(e) { + return f3(), ai(u(e, 11), (G(), Mu)); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return f3(), ai(u(e, 11), (G(), Mu)); + }, w(gh, "CrossingsCounter/lambda$8$Type", 826), b(1905, 1, {}, k6n), w(gh, "HyperedgeCrossingsCounter", 1905), b(467, 1, { 35: 1, 467: 1 }, _jn), s.wd = function(e) { + return cpe(this, u(e, 467)); + }, s.b = 0, s.c = 0, s.e = 0, s.f = 0; + var eMe = w(gh, "HyperedgeCrossingsCounter/Hyperedge", 467); + b(362, 1, { 35: 1, 362: 1 }, nC), s.wd = function(e) { + return i9e(this, u(e, 362)); + }, s.b = 0, s.c = 0; + var dJn = w(gh, "HyperedgeCrossingsCounter/HyperedgeCorner", 362); + b(523, 22, { 3: 1, 35: 1, 22: 1, 523: 1 }, ZG); + var Km, Hm, bJn = Me(gh, "HyperedgeCrossingsCounter/HyperedgeCorner/Type", 523, Ie, D1e, Vse), wJn; + b(1405, 1, Cc, P4n), s.Yf = function(e) { + return u(k(u(e, 37), (G(), Ac)), 21).Hc((fr(), $s)) ? gJn : null; + }, s.pf = function(e, t) { + C4e(this, u(e, 37), t); + }; + var gJn; + w(lr, "InteractiveNodePlacer", 1405), b(1406, 1, Cc, S4n), s.Yf = function(e) { + return u(k(u(e, 37), (G(), Ac)), 21).Hc((fr(), $s)) ? pJn : null; + }, s.pf = function(e, t) { + o3e(this, u(e, 37), t); + }; + var pJn, bP, wP; + w(lr, "LinearSegmentsNodePlacer", 1406), b(257, 1, { 35: 1, 257: 1 }, Jq), s.wd = function(e) { + return Fie(this, u(e, 257)); + }, s.Fb = function(e) { + var t; + return I(e, 257) ? (t = u(e, 257), this.b == t.b) : !1; + }, s.Hb = function() { + return this.b; + }, s.Ib = function() { + return "ls" + kl(this.e); + }, s.a = 0, s.b = 0, s.c = -1, s.d = -1, s.g = 0; + var vJn = w(lr, "LinearSegmentsNodePlacer/LinearSegment", 257); + b(1408, 1, Cc, dCn), s.Yf = function(e) { + return u(k(u(e, 37), (G(), Ac)), 21).Hc((fr(), $s)) ? mJn : null; + }, s.pf = function(e, t) { + aTe(this, u(e, 37), t); + }, s.b = 0, s.g = 0; + var mJn; + w(lr, "NetworkSimplexPlacer", 1408), b(1427, 1, at, Swn), s.ue = function(e, t) { + return Uc(u(e, 19).a, u(t, 19).a); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(lr, "NetworkSimplexPlacer/0methodref$compare$Type", 1427), b(1429, 1, at, Pwn), s.ue = function(e, t) { + return Uc(u(e, 19).a, u(t, 19).a); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(lr, "NetworkSimplexPlacer/1methodref$compare$Type", 1429), b(649, 1, { 649: 1 }, J7n); + var tMe = w(lr, "NetworkSimplexPlacer/EdgeRep", 649); + b(401, 1, { 401: 1 }, qW), s.b = !1; + var iMe = w(lr, "NetworkSimplexPlacer/NodeRep", 401); + b(508, 12, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 12: 1, 14: 1, 15: 1, 54: 1, 508: 1 }, u9n), w(lr, "NetworkSimplexPlacer/Path", 508), b(1409, 1, {}, Iwn), s.Kb = function(e) { + return u(e, 17).d.i.k; + }, w(lr, "NetworkSimplexPlacer/Path/lambda$0$Type", 1409), b(1410, 1, Ve, Own), s.Mb = function(e) { + return u(e, 267) == (Qn(), pi); + }, w(lr, "NetworkSimplexPlacer/Path/lambda$1$Type", 1410), b(1411, 1, {}, Dwn), s.Kb = function(e) { + return u(e, 17).d.i; + }, w(lr, "NetworkSimplexPlacer/Path/lambda$2$Type", 1411), b(1412, 1, Ve, y6n), s.Mb = function(e) { + return Cjn(f$n(u(e, 10))); + }, w(lr, "NetworkSimplexPlacer/Path/lambda$3$Type", 1412), b(1413, 1, Ve, $wn), s.Mb = function(e) { + return dfe(u(e, 11)); + }, w(lr, "NetworkSimplexPlacer/lambda$0$Type", 1413), b(1414, 1, Yn, Y7n), s.td = function(e) { + hce(this.a, this.b, u(e, 11)); + }, w(lr, "NetworkSimplexPlacer/lambda$1$Type", 1414), b(1423, 1, Yn, j6n), s.td = function(e) { + I6e(this.a, u(e, 17)); + }, w(lr, "NetworkSimplexPlacer/lambda$10$Type", 1423), b(1424, 1, {}, Fwn), s.Kb = function(e) { + return ns(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(lr, "NetworkSimplexPlacer/lambda$11$Type", 1424), b(1425, 1, Yn, E6n), s.td = function(e) { + M7e(this.a, u(e, 10)); + }, w(lr, "NetworkSimplexPlacer/lambda$12$Type", 1425), b(1426, 1, {}, xwn), s.Kb = function(e) { + return ns(), Q(u(e, 121).e); + }, w(lr, "NetworkSimplexPlacer/lambda$13$Type", 1426), b(1428, 1, {}, Lwn), s.Kb = function(e) { + return ns(), Q(u(e, 121).e); + }, w(lr, "NetworkSimplexPlacer/lambda$15$Type", 1428), b(1430, 1, Ve, Nwn), s.Mb = function(e) { + return ns(), u(e, 401).c.k == (Qn(), ii); + }, w(lr, "NetworkSimplexPlacer/lambda$17$Type", 1430), b(1431, 1, Ve, Bwn), s.Mb = function(e) { + return ns(), u(e, 401).c.j.c.length > 1; + }, w(lr, "NetworkSimplexPlacer/lambda$18$Type", 1431), b(1432, 1, Yn, kTn), s.td = function(e) { + g2e(this.c, this.b, this.d, this.a, u(e, 401)); + }, s.c = 0, s.d = 0, w(lr, "NetworkSimplexPlacer/lambda$19$Type", 1432), b(1415, 1, {}, Rwn), s.Kb = function(e) { + return ns(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(lr, "NetworkSimplexPlacer/lambda$2$Type", 1415), b(1433, 1, Yn, C6n), s.td = function(e) { + oce(this.a, u(e, 11)); + }, s.a = 0, w(lr, "NetworkSimplexPlacer/lambda$20$Type", 1433), b(1434, 1, {}, _wn), s.Kb = function(e) { + return ns(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(lr, "NetworkSimplexPlacer/lambda$21$Type", 1434), b(1435, 1, Yn, T6n), s.td = function(e) { + Ece(this.a, u(e, 10)); + }, w(lr, "NetworkSimplexPlacer/lambda$22$Type", 1435), b(1436, 1, Ve, Kwn), s.Mb = function(e) { + return Cjn(e); + }, w(lr, "NetworkSimplexPlacer/lambda$23$Type", 1436), b(1437, 1, {}, Hwn), s.Kb = function(e) { + return ns(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(lr, "NetworkSimplexPlacer/lambda$24$Type", 1437), b(1438, 1, Ve, M6n), s.Mb = function(e) { + return Pre(this.a, u(e, 10)); + }, w(lr, "NetworkSimplexPlacer/lambda$25$Type", 1438), b(1439, 1, Yn, Z7n), s.td = function(e) { + Y5e(this.a, this.b, u(e, 10)); + }, w(lr, "NetworkSimplexPlacer/lambda$26$Type", 1439), b(1440, 1, Ve, qwn), s.Mb = function(e) { + return ns(), !Wi(u(e, 17)); + }, w(lr, "NetworkSimplexPlacer/lambda$27$Type", 1440), b(1441, 1, Ve, Gwn), s.Mb = function(e) { + return ns(), !Wi(u(e, 17)); + }, w(lr, "NetworkSimplexPlacer/lambda$28$Type", 1441), b(1442, 1, {}, A6n), s.Ce = function(e, t) { + return kce(this.a, u(e, 29), u(t, 29)); + }, w(lr, "NetworkSimplexPlacer/lambda$29$Type", 1442), b(1416, 1, {}, zwn), s.Kb = function(e) { + return ns(), new $n(null, new Td(new re(ue(ei(u(e, 10)).a.Kc(), new Mn())))); + }, w(lr, "NetworkSimplexPlacer/lambda$3$Type", 1416), b(1417, 1, Ve, Uwn), s.Mb = function(e) { + return ns(), sae(u(e, 17)); + }, w(lr, "NetworkSimplexPlacer/lambda$4$Type", 1417), b(1418, 1, Yn, S6n), s.td = function(e) { + Tye(this.a, u(e, 17)); + }, w(lr, "NetworkSimplexPlacer/lambda$5$Type", 1418), b(1419, 1, {}, Wwn), s.Kb = function(e) { + return ns(), new $n(null, new xn(u(e, 29).a, 16)); + }, w(lr, "NetworkSimplexPlacer/lambda$6$Type", 1419), b(1420, 1, Ve, Xwn), s.Mb = function(e) { + return ns(), u(e, 10).k == (Qn(), ii); + }, w(lr, "NetworkSimplexPlacer/lambda$7$Type", 1420), b(1421, 1, {}, Vwn), s.Kb = function(e) { + return ns(), new $n(null, new Td(new re(ue(Kh(u(e, 10)).a.Kc(), new Mn())))); + }, w(lr, "NetworkSimplexPlacer/lambda$8$Type", 1421), b(1422, 1, Ve, Qwn), s.Mb = function(e) { + return ns(), sfe(u(e, 17)); + }, w(lr, "NetworkSimplexPlacer/lambda$9$Type", 1422), b(1404, 1, Cc, z4n), s.Yf = function(e) { + return u(k(u(e, 37), (G(), Ac)), 21).Hc((fr(), $s)) ? kJn : null; + }, s.pf = function(e, t) { + uje(u(e, 37), t); + }; + var kJn; + w(lr, "SimpleNodePlacer", 1404), b(180, 1, { 180: 1 }, tg), s.Ib = function() { + var e; + return e = "", this.c == (Ff(), A0) ? e += Z2 : this.c == O1 && (e += Y2), this.o == (ef(), Ya) ? e += hN : this.o == kf ? e += "UP" : e += "BALANCED", e; + }, w(Sl, "BKAlignedLayout", 180), b(516, 22, { 3: 1, 35: 1, 22: 1, 516: 1 }, ez); + var O1, A0, yJn = Me(Sl, "BKAlignedLayout/HDirection", 516, Ie, F1e, Qse), jJn; + b(515, 22, { 3: 1, 35: 1, 22: 1, 515: 1 }, nz); + var Ya, kf, EJn = Me(Sl, "BKAlignedLayout/VDirection", 515, Ie, x1e, Jse), CJn; + b(1634, 1, {}, nkn), w(Sl, "BKAligner", 1634), b(1637, 1, {}, $Fn), w(Sl, "BKCompactor", 1637), b(654, 1, { 654: 1 }, Jwn), s.a = 0, w(Sl, "BKCompactor/ClassEdge", 654), b(458, 1, { 458: 1 }, r9n), s.a = null, s.b = 0, w(Sl, "BKCompactor/ClassNode", 458), b(1407, 1, Cc, Mkn), s.Yf = function(e) { + return u(k(u(e, 37), (G(), Ac)), 21).Hc((fr(), $s)) ? TJn : null; + }, s.pf = function(e, t) { + ATe(this, u(e, 37), t); + }, s.d = !1; + var TJn; + w(Sl, "BKNodePlacer", 1407), b(1635, 1, {}, Ywn), s.d = 0, w(Sl, "NeighborhoodInformation", 1635), b(1636, 1, at, P6n), s.ue = function(e, t) { + return F0e(this, u(e, 46), u(t, 46)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Sl, "NeighborhoodInformation/NeighborComparator", 1636), b(808, 1, {}), w(Sl, "ThresholdStrategy", 808), b(1763, 808, {}, f9n), s.bg = function(e, t, i) { + return this.a.o == (ef(), kf) ? Lt : Vt; + }, s.cg = function() { + }, w(Sl, "ThresholdStrategy/NullThresholdStrategy", 1763), b(579, 1, { 579: 1 }, ekn), s.c = !1, s.d = !1, w(Sl, "ThresholdStrategy/Postprocessable", 579), b(1764, 808, {}, h9n), s.bg = function(e, t, i) { + var r, c, o; + return c = t == i, r = this.a.a[i.p] == t, c || r ? (o = e, this.a.c == (Ff(), A0) ? (c && (o = hL(this, t, !0)), !isNaN(o) && !isFinite(o) && r && (o = hL(this, i, !1))) : (c && (o = hL(this, t, !0)), !isNaN(o) && !isFinite(o) && r && (o = hL(this, i, !1))), o) : e; + }, s.cg = function() { + for (var e, t, i, r, c; this.d.b != 0; ) + c = u(J1e(this.d), 579), r = nRn(this, c), r.a && (e = r.a, i = on(this.a.f[this.a.g[c.b.p].p]), !(!i && !Wi(e) && e.c.i.c == e.d.i.c) && (t = sNn(this, c), t || Nre(this.e, c))); + for (; this.e.a.c.length != 0; ) + sNn(this, u(pDn(this.e), 579)); + }, w(Sl, "ThresholdStrategy/SimpleThresholdStrategy", 1764), b(635, 1, { 635: 1, 246: 1, 234: 1 }, Zwn), s.Kf = function() { + return AOn(this); + }, s.Xf = function() { + return AOn(this); + }; + var hK; + w(uB, "EdgeRouterFactory", 635), b(1458, 1, Cc, U4n), s.Yf = function(e) { + return c7e(u(e, 37)); + }, s.pf = function(e, t) { + dje(u(e, 37), t); + }; + var MJn, AJn, SJn, PJn, IJn, bon, OJn, DJn; + w(uB, "OrthogonalEdgeRouter", 1458), b(1451, 1, Cc, Akn), s.Yf = function(e) { + return P4e(u(e, 37)); + }, s.pf = function(e, t) { + $Ce(this, u(e, 37), t); + }; + var $Jn, FJn, xJn, LJn, cy, NJn; + w(uB, "PolylineEdgeRouter", 1451), b(1452, 1, Rf, ngn), s.Lb = function(e) { + return IV(u(e, 10)); + }, s.Fb = function(e) { + return this === e; + }, s.Mb = function(e) { + return IV(u(e, 10)); + }, w(uB, "PolylineEdgeRouter/1", 1452), b(1809, 1, Ve, egn), s.Mb = function(e) { + return u(e, 129).c == (No(), Bl); + }, w(zo, "HyperEdgeCycleDetector/lambda$0$Type", 1809), b(1810, 1, {}, tgn), s.Ge = function(e) { + return u(e, 129).d; + }, w(zo, "HyperEdgeCycleDetector/lambda$1$Type", 1810), b(1811, 1, Ve, ign), s.Mb = function(e) { + return u(e, 129).c == (No(), Bl); + }, w(zo, "HyperEdgeCycleDetector/lambda$2$Type", 1811), b(1812, 1, {}, rgn), s.Ge = function(e) { + return u(e, 129).d; + }, w(zo, "HyperEdgeCycleDetector/lambda$3$Type", 1812), b(1813, 1, {}, cgn), s.Ge = function(e) { + return u(e, 129).d; + }, w(zo, "HyperEdgeCycleDetector/lambda$4$Type", 1813), b(1814, 1, {}, ugn), s.Ge = function(e) { + return u(e, 129).d; + }, w(zo, "HyperEdgeCycleDetector/lambda$5$Type", 1814), b(112, 1, { 35: 1, 112: 1 }, n7), s.wd = function(e) { + return xie(this, u(e, 112)); + }, s.Fb = function(e) { + var t; + return I(e, 112) ? (t = u(e, 112), this.g == t.g) : !1; + }, s.Hb = function() { + return this.g; + }, s.Ib = function() { + var e, t, i, r; + for (e = new Yu("{"), r = new E(this.n); r.a < r.c.c.length; ) + i = u(y(r), 11), t = E7(i.i), t == null && (t = "n" + eEn(i.i)), e.a += "" + t, r.a < r.c.c.length && (e.a += ","); + return e.a += "}", e.a; + }, s.a = 0, s.b = 0, s.c = NaN, s.d = 0, s.g = 0, s.i = 0, s.o = 0, s.s = NaN, w(zo, "HyperEdgeSegment", 112), b(129, 1, { 129: 1 }, da), s.Ib = function() { + return this.a + "->" + this.b + " (" + Uce(this.c) + ")"; + }, s.d = 0, w(zo, "HyperEdgeSegmentDependency", 129), b(520, 22, { 3: 1, 35: 1, 22: 1, 520: 1 }, tz); + var Bl, iw, BJn = Me(zo, "HyperEdgeSegmentDependency/DependencyType", 520, Ie, $1e, Yse), RJn; + b(1815, 1, {}, I6n), w(zo, "HyperEdgeSegmentSplitter", 1815), b(1816, 1, {}, s8n), s.a = 0, s.b = 0, w(zo, "HyperEdgeSegmentSplitter/AreaRating", 1816), b(329, 1, { 329: 1 }, hD), s.a = 0, s.b = 0, s.c = 0, w(zo, "HyperEdgeSegmentSplitter/FreeArea", 329), b(1817, 1, at, bgn), s.ue = function(e, t) { + return Hue(u(e, 112), u(t, 112)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(zo, "HyperEdgeSegmentSplitter/lambda$0$Type", 1817), b(1818, 1, Yn, yTn), s.td = function(e) { + Wae(this.a, this.d, this.c, this.b, u(e, 112)); + }, s.b = 0, w(zo, "HyperEdgeSegmentSplitter/lambda$1$Type", 1818), b(1819, 1, {}, wgn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 112).e, 16)); + }, w(zo, "HyperEdgeSegmentSplitter/lambda$2$Type", 1819), b(1820, 1, {}, ggn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 112).j, 16)); + }, w(zo, "HyperEdgeSegmentSplitter/lambda$3$Type", 1820), b(1821, 1, {}, pgn), s.Fe = function(e) { + return K(Y(e)); + }, w(zo, "HyperEdgeSegmentSplitter/lambda$4$Type", 1821), b(655, 1, {}, FD), s.a = 0, s.b = 0, s.c = 0, w(zo, "OrthogonalRoutingGenerator", 655), b(1638, 1, {}, vgn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 112).e, 16)); + }, w(zo, "OrthogonalRoutingGenerator/lambda$0$Type", 1638), b(1639, 1, {}, mgn), s.Kb = function(e) { + return new $n(null, new xn(u(e, 112).j, 16)); + }, w(zo, "OrthogonalRoutingGenerator/lambda$1$Type", 1639), b(661, 1, {}), w(sB, "BaseRoutingDirectionStrategy", 661), b(1807, 661, {}, l9n), s.dg = function(e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C; + if (!(e.r && !e.q)) + for (d = t + e.o * i, a = new E(e.n); a.a < a.c.c.length; ) + for (l = u(y(a), 11), g = Gr(A(M(di, 1), q, 8, 0, [l.i.n, l.n, l.a])).a, h = new E(l.g); h.a < h.c.c.length; ) + f = u(y(h), 17), Wi(f) || (m = f.d, C = Gr(A(M(di, 1), q, 8, 0, [m.i.n, m.n, m.a])).a, j.Math.abs(g - C) > Kf && (o = d, c = e, r = new fn(g, o), Ke(f.a, r), e0(this, f, c, r, !1), p = e.r, p && (v = K(Y(qo(p.e, 0))), r = new fn(v, o), Ke(f.a, r), e0(this, f, c, r, !1), o = t + p.o * i, c = p, r = new fn(v, o), Ke(f.a, r), e0(this, f, c, r, !1)), r = new fn(C, o), Ke(f.a, r), e0(this, f, c, r, !1))); + }, s.eg = function(e) { + return e.i.n.a + e.n.a + e.a.a; + }, s.fg = function() { + return J(), ae; + }, s.gg = function() { + return J(), Kn; + }, w(sB, "NorthToSouthRoutingStrategy", 1807), b(1808, 661, {}, a9n), s.dg = function(e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C; + if (!(e.r && !e.q)) + for (d = t - e.o * i, a = new E(e.n); a.a < a.c.c.length; ) + for (l = u(y(a), 11), g = Gr(A(M(di, 1), q, 8, 0, [l.i.n, l.n, l.a])).a, h = new E(l.g); h.a < h.c.c.length; ) + f = u(y(h), 17), Wi(f) || (m = f.d, C = Gr(A(M(di, 1), q, 8, 0, [m.i.n, m.n, m.a])).a, j.Math.abs(g - C) > Kf && (o = d, c = e, r = new fn(g, o), Ke(f.a, r), e0(this, f, c, r, !1), p = e.r, p && (v = K(Y(qo(p.e, 0))), r = new fn(v, o), Ke(f.a, r), e0(this, f, c, r, !1), o = t - p.o * i, c = p, r = new fn(v, o), Ke(f.a, r), e0(this, f, c, r, !1)), r = new fn(C, o), Ke(f.a, r), e0(this, f, c, r, !1))); + }, s.eg = function(e) { + return e.i.n.a + e.n.a + e.a.a; + }, s.fg = function() { + return J(), Kn; + }, s.gg = function() { + return J(), ae; + }, w(sB, "SouthToNorthRoutingStrategy", 1808), b(1806, 661, {}, d9n), s.dg = function(e, t, i) { + var r, c, o, f, h, l, a, d, g, p, v, m, C; + if (!(e.r && !e.q)) + for (d = t + e.o * i, a = new E(e.n); a.a < a.c.c.length; ) + for (l = u(y(a), 11), g = Gr(A(M(di, 1), q, 8, 0, [l.i.n, l.n, l.a])).b, h = new E(l.g); h.a < h.c.c.length; ) + f = u(y(h), 17), Wi(f) || (m = f.d, C = Gr(A(M(di, 1), q, 8, 0, [m.i.n, m.n, m.a])).b, j.Math.abs(g - C) > Kf && (o = d, c = e, r = new fn(o, g), Ke(f.a, r), e0(this, f, c, r, !0), p = e.r, p && (v = K(Y(qo(p.e, 0))), r = new fn(o, v), Ke(f.a, r), e0(this, f, c, r, !0), o = t + p.o * i, c = p, r = new fn(o, v), Ke(f.a, r), e0(this, f, c, r, !0)), r = new fn(o, C), Ke(f.a, r), e0(this, f, c, r, !0))); + }, s.eg = function(e) { + return e.i.n.b + e.n.b + e.a.b; + }, s.fg = function() { + return J(), Vn; + }, s.gg = function() { + return J(), Gn; + }, w(sB, "WestToEastRoutingStrategy", 1806), b(813, 1, {}, jZ), s.Ib = function() { + return kl(this.a); + }, s.b = 0, s.c = !1, s.d = !1, s.f = 0, w(xb, "NubSpline", 813), b(407, 1, { 407: 1 }, LNn, eMn), w(xb, "NubSpline/PolarCP", 407), b(1453, 1, Cc, TFn), s.Yf = function(e) { + return vve(u(e, 37)); + }, s.pf = function(e, t) { + YCe(this, u(e, 37), t); + }; + var _Jn, KJn, HJn, qJn, GJn; + w(xb, "SplineEdgeRouter", 1453), b(268, 1, { 268: 1 }, MC), s.Ib = function() { + return this.a + " ->(" + this.c + ") " + this.b; + }, s.c = 0, w(xb, "SplineEdgeRouter/Dependency", 268), b(455, 22, { 3: 1, 35: 1, 22: 1, 455: 1 }, iz); + var Rl, Lg, zJn = Me(xb, "SplineEdgeRouter/SideToProcess", 455, Ie, L1e, Zse), UJn; + b(1454, 1, Ve, agn), s.Mb = function(e) { + return C6(), !u(e, 128).o; + }, w(xb, "SplineEdgeRouter/lambda$0$Type", 1454), b(1455, 1, {}, lgn), s.Ge = function(e) { + return C6(), u(e, 128).v + 1; + }, w(xb, "SplineEdgeRouter/lambda$1$Type", 1455), b(1456, 1, Yn, tkn), s.td = function(e) { + ffe(this.a, this.b, u(e, 46)); + }, w(xb, "SplineEdgeRouter/lambda$2$Type", 1456), b(1457, 1, Yn, ikn), s.td = function(e) { + hfe(this.a, this.b, u(e, 46)); + }, w(xb, "SplineEdgeRouter/lambda$3$Type", 1457), b(128, 1, { 35: 1, 128: 1 }, Zxn, SZ), s.wd = function(e) { + return Lie(this, u(e, 128)); + }, s.b = 0, s.e = !1, s.f = 0, s.g = 0, s.j = !1, s.k = !1, s.n = 0, s.o = !1, s.p = !1, s.q = !1, s.s = 0, s.u = 0, s.v = 0, s.F = 0, w(xb, "SplineSegment", 128), b(459, 1, { 459: 1 }, dgn), s.a = 0, s.b = !1, s.c = !1, s.d = !1, s.e = !1, s.f = 0, w(xb, "SplineSegment/EdgeInformation", 459), b(1234, 1, {}, sgn), w(Q6, Enn, 1234), b(1235, 1, at, ogn), s.ue = function(e, t) { + return U6e(u(e, 135), u(t, 135)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(Q6, NKn, 1235), b(1233, 1, {}, E8n), w(Q6, "MrTree", 1233), b(393, 22, { 3: 1, 35: 1, 22: 1, 393: 1, 246: 1, 234: 1 }, zj), s.Kf = function() { + return CLn(this); + }, s.Xf = function() { + return CLn(this); + }; + var gP, qm, uy, Gm, won = Me(Q6, "TreeLayoutPhases", 393, Ie, Sae, noe), WJn; + b(1130, 209, La, qjn), s.Ze = function(e, t) { + var i, r, c, o, f, h, l; + for (on(sn(hn(e, (n0(), yon)))) || oC((i = new O9((H0(), new B0(e))), i)), f = (h = new AC(), Pr(h, e), H(h, (cc(), Wm), e), l = new we(), Nke(e, h, l), nye(e, h, l), h), o = Wke(this.a, f), c = new E(o); c.a < c.c.c.length; ) + r = u(y(c), 135), dve(this.b, r, yc(t, 1 / o.c.length)); + f = MTe(o), YEe(f); + }, w(Q6, "TreeLayoutProvider", 1130), b(1847, 1, lh, fgn), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return Pn(), Yp(), W4; + }, w(Q6, "TreeUtil/1", 1847), b(1848, 1, lh, hgn), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return Pn(), Yp(), W4; + }, w(Q6, "TreeUtil/2", 1848), b(502, 134, { 3: 1, 502: 1, 94: 1, 134: 1 }), s.g = 0, w(J6, "TGraphElement", 502), b(188, 502, { 3: 1, 188: 1, 502: 1, 94: 1, 134: 1 }, UW), s.Ib = function() { + return this.b && this.c ? wC(this.b) + "->" + wC(this.c) : "e_" + kt(this); + }, w(J6, "TEdge", 188), b(135, 134, { 3: 1, 135: 1, 94: 1, 134: 1 }, AC), s.Ib = function() { + var e, t, i, r, c; + for (c = null, r = _e(this.b, 0); r.b != r.d.c; ) + i = u(Re(r), 86), c += (i.c == null || i.c.length == 0 ? "n_" + i.g : "n_" + i.c) + ` +`; + for (t = _e(this.a, 0); t.b != t.d.c; ) + e = u(Re(t), 188), c += (e.b && e.c ? wC(e.b) + "->" + wC(e.c) : "e_" + kt(e)) + ` +`; + return c; + }; + var rMe = w(J6, "TGraph", 135); + b(633, 502, { 3: 1, 502: 1, 633: 1, 94: 1, 134: 1 }), w(J6, "TShape", 633), b(86, 633, { 3: 1, 502: 1, 86: 1, 633: 1, 94: 1, 134: 1 }, hF), s.Ib = function() { + return wC(this); + }; + var cMe = w(J6, "TNode", 86); + b(255, 1, lh, X1), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + var e; + return e = _e(this.a.d, 0), new e2(e); + }, w(J6, "TNode/2", 255), b(358, 1, Ei, e2), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return u(Re(this.a), 188).c; + }, s.Ob = function() { + return yj(this.a); + }, s.Qb = function() { + HC(this.a); + }, w(J6, "TNode/2/1", 358), b(1840, 1, Nt, Hjn), s.pf = function(e, t) { + gye(this, u(e, 135), t); + }, w(up, "FanProcessor", 1840), b(327, 22, { 3: 1, 35: 1, 22: 1, 327: 1, 234: 1 }, o5), s.Kf = function() { + switch (this.g) { + case 0: + return new S9n(); + case 1: + return new Hjn(); + case 2: + return new jgn(); + case 3: + return new kgn(); + case 4: + return new Cgn(); + case 5: + return new Tgn(); + default: + throw T(new Hn(AN + (this.f != null ? this.f : "" + this.g))); + } + }; + var lK, aK, dK, bK, wK, pP, XJn = Me(up, Fnn, 327, Ie, Gde, eoe), VJn; + b(1843, 1, Nt, kgn), s.pf = function(e, t) { + Yme(this, u(e, 135), t); + }, s.a = 0, w(up, "LevelHeightProcessor", 1843), b(1844, 1, lh, ygn), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return Pn(), Yp(), W4; + }, w(up, "LevelHeightProcessor/1", 1844), b(1841, 1, Nt, jgn), s.pf = function(e, t) { + c6e(this, u(e, 135), t); + }, s.a = 0, w(up, "NeighborsProcessor", 1841), b(1842, 1, lh, Egn), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return Pn(), Yp(), W4; + }, w(up, "NeighborsProcessor/1", 1842), b(1845, 1, Nt, Cgn), s.pf = function(e, t) { + Jme(this, u(e, 135), t); + }, s.a = 0, w(up, "NodePositionProcessor", 1845), b(1839, 1, Nt, S9n), s.pf = function(e, t) { + Eje(this, u(e, 135)); + }, w(up, "RootProcessor", 1839), b(1846, 1, Nt, Tgn), s.pf = function(e, t) { + Dge(u(e, 135)); + }, w(up, "Untreeifyer", 1846); + var sy, zm, QJn, gK, vP, Um, pK, mP, kP, pv, Wm, yP, D1, gon, JJn, vK, rw, mK, pon; + b(851, 1, zs, G4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Zen), ""), "Weighting of Nodes"), "Which weighting to use when computing a node order."), mon), (j1(), Rt)), Mon), Cn((Ho(), Xn))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ntn), ""), "Search Order"), "Which search order to use when computing a spanning tree."), von), Rt), Son), Cn(Xn)))), QRn((new q4n(), e)); + }; + var YJn, von, ZJn, mon; + w(lA, "MrTreeMetaDataProvider", 851), b(994, 1, zs, q4n), s.Qe = function(e) { + QRn(e); + }; + var nYn, kon, eYn, tYn, iYn, rYn, yon, cYn, jon, uYn, jP, Eon, sYn, Con, oYn; + w(lA, "MrTreeOptions", 994), b(995, 1, {}, Mgn), s.$e = function() { + var e; + return e = new qjn(), e; + }, s._e = function(e) { + }, w(lA, "MrTreeOptions/MrtreeFactory", 995), b(480, 22, { 3: 1, 35: 1, 22: 1, 480: 1 }, rz); + var kK, Ton, Mon = Me(lA, "OrderWeighting", 480, Ie, B1e, toe), fYn; + b(425, 22, { 3: 1, 35: 1, 22: 1, 425: 1 }, cz); + var Aon, yK, Son = Me(lA, "TreeifyingOrder", 425, Ie, N1e, roe), hYn; + b(1459, 1, Cc, F4n), s.Yf = function(e) { + return u(e, 135), lYn; + }, s.pf = function(e, t) { + Obe(this, u(e, 135), t); + }; + var lYn; + w("org.eclipse.elk.alg.mrtree.p1treeify", "DFSTreeifyer", 1459), b(1460, 1, Cc, x4n), s.Yf = function(e) { + return u(e, 135), aYn; + }, s.pf = function(e, t) { + w6e(this, u(e, 135), t); + }; + var aYn; + w("org.eclipse.elk.alg.mrtree.p2order", "NodeOrderer", 1460), b(1461, 1, Cc, $4n), s.Yf = function(e) { + return u(e, 135), dYn; + }, s.pf = function(e, t) { + D7e(this, u(e, 135), t); + }, s.a = 0; + var dYn; + w("org.eclipse.elk.alg.mrtree.p3place", "NodePlacer", 1461), b(1462, 1, Cc, L4n), s.Yf = function(e) { + return u(e, 135), bYn; + }, s.pf = function(e, t) { + r4e(u(e, 135), t); + }; + var bYn; + w("org.eclipse.elk.alg.mrtree.p4route", "EdgeRouter", 1462); + var Xm; + b(495, 22, { 3: 1, 35: 1, 22: 1, 495: 1, 246: 1, 234: 1 }, uz), s.Kf = function() { + return t$n(this); + }, s.Xf = function() { + return t$n(this); + }; + var EP, vv, Pon = Me(etn, "RadialLayoutPhases", 495, Ie, R1e, ioe), wYn; + b(1131, 209, La, j8n), s.Ze = function(e, t) { + var i, r, c, o, f, h; + if (i = cLn(this, e), le(t, "Radial layout", i.c.length), on(sn(hn(e, (pb(), Ron)))) || oC((r = new O9((H0(), new B0(e))), r)), h = yve(e), pr(e, (C5(), Xm), h), !h) + throw T(new Hn("The given graph is not a tree!")); + for (c = K(Y(hn(e, MP))), c == 0 && (c = mLn(e)), pr(e, MP, c), f = new E(cLn(this, e)); f.a < f.c.c.length; ) + o = u(y(f), 51), o.pf(e, yc(t, 1)); + ce(t); + }, w(etn, "RadialLayoutProvider", 1131), b(549, 1, at, jj), s.ue = function(e, t) { + return W7e(this.a, this.b, u(e, 33), u(t, 33)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, s.a = 0, s.b = 0, w(etn, "RadialUtil/lambda$0$Type", 549), b(1375, 1, Nt, Sgn), s.pf = function(e, t) { + aEe(u(e, 33), t); + }, w(OHn, "CalculateGraphSize", 1375), b(442, 22, { 3: 1, 35: 1, 22: 1, 442: 1, 234: 1 }, MO), s.Kf = function() { + switch (this.g) { + case 0: + return new $gn(); + case 1: + return new Agn(); + case 2: + return new Sgn(); + default: + throw T(new Hn(AN + (this.f != null ? this.f : "" + this.g))); + } + }; + var jK, EK, CK, gYn = Me(OHn, Fnn, 442, Ie, Fle, coe), pYn; + b(645, 1, {}), s.e = 1, s.g = 0, w(hB, "AbstractRadiusExtensionCompaction", 645), b(1772, 645, {}, kjn), s.hg = function(e) { + var t, i, r, c, o, f, h, l, a; + for (this.c = u(hn(e, (C5(), Xm)), 33), gte(this, this.c), this.d = XF(u(hn(e, (pb(), oy)), 293)), l = u(hn(e, MK), 19), l && Pvn(this, l.a), h = Y(hn(e, (Xe(), td))), dq(this, (_n(h), h)), a = Tb(this.c), this.d && this.d.lg(a), oke(this, a), f = new Hu(A(M(Ot, 1), DHn, 33, 0, [this.c])), i = 0; i < 2; i++) + for (t = 0; t < a.c.length; t++) + c = new Hu(A(M(Ot, 1), DHn, 33, 0, [(Ln(t, a.c.length), u(a.c[t], 33))])), o = t < a.c.length - 1 ? (Ln(t + 1, a.c.length), u(a.c[t + 1], 33)) : (Ln(0, a.c.length), u(a.c[0], 33)), r = t == 0 ? u(un(a, a.c.length - 1), 33) : (Ln(t - 1, a.c.length), u(a.c[t - 1], 33)), axn(this, (Ln(t, a.c.length), u(a.c[t], 33), f), r, o, c); + }, w(hB, "AnnulusWedgeCompaction", 1772), b(1374, 1, Nt, Agn), s.pf = function(e, t) { + T4e(u(e, 33), t); + }, w(hB, "GeneralCompactor", 1374), b(1771, 645, {}, Pgn), s.hg = function(e) { + var t, i, r, c; + i = u(hn(e, (C5(), Xm)), 33), this.f = i, this.b = XF(u(hn(e, (pb(), oy)), 293)), c = u(hn(e, MK), 19), c && Pvn(this, c.a), r = Y(hn(e, (Xe(), td))), dq(this, (_n(r), r)), t = Tb(i), this.b && this.b.lg(t), qxn(this, t); + }, s.a = 0, w(hB, "RadialCompaction", 1771), b(1779, 1, {}, Ign), s.ig = function(e) { + var t, i, r, c, o, f; + for (this.a = e, t = 0, f = Tb(e), r = 0, o = new E(f); o.a < o.c.c.length; ) + for (c = u(y(o), 33), ++r, i = r; i < f.c.length; i++) + jye(this, c, (Ln(i, f.c.length), u(f.c[i], 33))) && (t += 1); + return t; + }, w(itn, "CrossingMinimizationPosition", 1779), b(1777, 1, {}, Ogn), s.ig = function(e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v; + for (r = 0, i = new re(ue(Gh(e).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 79), h = Ir(u(D((!t.c && (t.c = new Fn(he, t, 5, 8)), t.c), 0), 82)), a = h.i + h.g / 2, d = h.j + h.f / 2, c = e.i + e.g / 2, o = e.j + e.f / 2, g = new Li(), g.a = a - c, g.b = d - o, f = new fn(g.a, g.b), u4(f, e.g, e.f), g.a -= f.a, g.b -= f.b, c = a - g.a, o = d - g.b, l = new fn(g.a, g.b), u4(l, h.g, h.f), g.a -= l.a, g.b -= l.b, a = c + g.a, d = o + g.b, p = a - c, v = d - o, r += j.Math.sqrt(p * p + v * v); + return r; + }, w(itn, "EdgeLengthOptimization", 1777), b(1778, 1, {}, Dgn), s.ig = function(e) { + var t, i, r, c, o, f, h, l, a, d, g; + for (r = 0, i = new re(ue(Gh(e).a.Kc(), new Mn())); Se(i); ) + t = u(ve(i), 79), h = Ir(u(D((!t.c && (t.c = new Fn(he, t, 5, 8)), t.c), 0), 82)), l = h.i + h.g / 2, a = h.j + h.f / 2, c = u(hn(h, (Xe(), Mp)), 8), o = e.i + c.a + e.g / 2, f = e.j + c.b + e.f, d = l - o, g = a - f, r += j.Math.sqrt(d * d + g * g); + return r; + }, w(itn, "EdgeLengthPositionOptimization", 1778), b(1373, 645, Nt, $gn), s.pf = function(e, t) { + P9e(this, u(e, 33), t); + }, w("org.eclipse.elk.alg.radial.intermediate.overlaps", "RadiusExtensionOverlapRemoval", 1373), b(426, 22, { 3: 1, 35: 1, 22: 1, 426: 1 }, sz); + var Ion, TK, Oon = Me(Y6, "AnnulusWedgeCriteria", 426, Ie, _1e, uoe), vYn; + b(380, 22, { 3: 1, 35: 1, 22: 1, 380: 1 }, AO); + var CP, Don, $on, Fon = Me(Y6, gnn, 380, Ie, xle, soe), mYn; + b(852, 1, zs, N4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), rtn), ""), "Order ID"), "The id can be used to define an order for nodes of one radius. This can be used to sort them in the layer accordingly."), Q(0)), (j1(), sc)), Ui), Cn((Ho(), vi))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ctn), ""), "Radius"), "The radius option can be used to set the initial radius for the radial layouter."), 0), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), aB), ""), "Compaction"), "With the compacter option it can be determined how compaction on the graph is done. It can be chosen between none, the radial compaction or the compaction of wedges separately."), xon), Rt), Fon), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), dB), ""), "Compaction Step Size"), "Determine the size of steps with which the compaction is done. Step size 1 correlates to a compaction of 1 pixel per Iteration."), Q(1)), sc), Ui), Cn(Xn)))), Mi(e, dB, aB, null), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), utn), ""), "Sorter"), "Sort the nodes per radius according to the sorting algorithm. The strategies are none, by the given order id, or sorting them by polar coordinates."), Non), Rt), Xon), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), stn), ""), "Annulus Wedge Criteria"), "Determine how the wedge for the node placement is calculated. It can be chosen between wedge determination by the number of leaves or by the maximum sum of diagonals."), Bon), Rt), Oon), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), otn), ""), "Translation Optimization"), "Find the optimal translation of the nodes of the first radii according to this criteria. For example edge crossings can be minimized."), Lon), Rt), zon), Cn(Xn)))), l_n((new B4n(), e)); + }; + var kYn, yYn, xon, jYn, Lon, EYn, CYn, TYn, Non, MYn, Bon; + w(Y6, "RadialMetaDataProvider", 852), b(996, 1, zs, B4n), s.Qe = function(e) { + l_n(e); + }; + var MK, AK, AYn, SYn, PYn, IYn, Ron, _on, TP, OYn, DYn, MP, oy, $Yn, Kon; + w(Y6, "RadialOptions", 996), b(997, 1, {}, Fgn), s.$e = function() { + var e; + return e = new j8n(), e; + }, s._e = function(e) { + }, w(Y6, "RadialOptions/RadialFactory", 997), b(340, 22, { 3: 1, 35: 1, 22: 1, 340: 1 }, Uj); + var Hon, qon, Gon, SK, zon = Me(Y6, "RadialTranslationStrategy", 340, Ie, Pae, ooe), FYn; + b(293, 22, { 3: 1, 35: 1, 22: 1, 293: 1 }, SO); + var Uon, PK, Won, Xon = Me(Y6, "SortingStrategy", 293, Ie, Nle, foe), xYn; + b(1449, 1, Cc, xgn), s.Yf = function(e) { + return u(e, 33), null; + }, s.pf = function(e, t) { + B9e(this, u(e, 33), t); + }, s.c = 0, w("org.eclipse.elk.alg.radial.p1position", "EadesRadial", 1449), b(1775, 1, {}, Lgn), s.jg = function(e) { + return J$n(e); + }, w($Hn, "AnnulusWedgeByLeafs", 1775), b(1776, 1, {}, Ngn), s.jg = function(e) { + return rxn(this, e); + }, w($Hn, "AnnulusWedgeByNodeSpace", 1776), b(1450, 1, Cc, Bgn), s.Yf = function(e) { + return u(e, 33), null; + }, s.pf = function(e, t) { + Q4e(this, u(e, 33), t); + }, w("org.eclipse.elk.alg.radial.p2routing", "StraightLineEdgeRouter", 1450), b(811, 1, {}, oG), s.kg = function(e) { + }, s.lg = function(e) { + Bmn(this, e); + }, w(ftn, "IDSorter", 811), b(1774, 1, at, Rgn), s.ue = function(e, t) { + return kbe(u(e, 33), u(t, 33)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(ftn, "IDSorter/lambda$0$Type", 1774), b(1773, 1, {}, eOn), s.kg = function(e) { + oAn(this, e); + }, s.lg = function(e) { + var t; + e.dc() || (this.e || (t = rCn(u(e.Xb(0), 33)), oAn(this, t)), Bmn(this.e, e)); + }, w(ftn, "PolarCoordinateSorter", 1773), b(1136, 209, La, _gn), s.Ze = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn, zn, Wn, se; + if (le(t, "Rectangle Packing", 1), t.n && t.n && e && go(t, po(e), (Vu(), gs)), i = K(Y(hn(e, (Bx(), zYn)))), C = u(hn(e, sfn), 381), O = on(sn(hn(e, rfn))), en = on(sn(hn(e, ufn))), g = on(sn(hn(e, efn))), ln = u(hn(e, YYn), 116), U = K(Y(hn(e, nZn))), c = on(sn(hn(e, ffn))), p = on(sn(hn(e, tfn))), $ = on(sn(hn(e, ifn))), se = K(Y(hn(e, hfn))), zn = (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a), nOn(zn), $) { + for (m = new X(), l = new ie(zn); l.e != l.i.gc(); ) + f = u(oe(l), 33), ga(f, fy) && (m.c[m.c.length] = f); + for (a = new E(m); a.a < a.c.c.length; ) + f = u(y(a), 33), BC(zn, f); + for (Pn(), wi(m, new Kgn()), d = new E(m); d.a < d.c.c.length; ) + f = u(y(d), 33), wn = u(hn(f, fy), 19).a, wn = j.Math.min(wn, zn.i), s6(zn, wn, f); + for (S = 0, h = new ie(zn); h.e != h.i.gc(); ) + f = u(oe(h), 33), pr(f, nfn, Q(S)), ++S; + } + _ = sY(e), _.a -= ln.b + ln.c, _.b -= ln.d + ln.a, x = _.a, se < 0 || se < _.a ? (v = new pEn(i, C, O), o = wke(v, zn, U, ln), t.n && t.n && e && go(t, po(e), (Vu(), gs))) : o = new bD(i, se, 0, (w4(), Jm)), _.a += ln.b + ln.c, _.b += ln.d + ln.a, en || (nOn(zn), Wn = new SAn(i, g, p, c, U), x = j.Math.max(_.a, o.c), o = WEe(Wn, zn, x, _, t, e, ln)), Ube(zn, ln), i0(e, o.c + (ln.b + ln.c), o.b + (ln.d + ln.a), !1, !0), on(sn(hn(e, cfn))) || oC((r = new O9((H0(), new B0(e))), r)), t.n && t.n && e && go(t, po(e), (Vu(), gs)), ce(t); + }, w(NHn, "RectPackingLayoutProvider", 1136), b(1137, 1, at, Kgn), s.ue = function(e, t) { + return Nwe(u(e, 33), u(t, 33)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(NHn, "RectPackingLayoutProvider/lambda$0$Type", 1137), b(1256, 1, {}, pEn), s.a = 0, s.c = !1, w(aA, "AreaApproximation", 1256); + var Von = Ct(aA, "BestCandidateFilter"); + b(638, 1, { 526: 1 }, mI), s.mg = function(e, t, i) { + var r, c, o, f, h, l; + for (l = new X(), o = Lt, h = new E(e); h.a < h.c.c.length; ) + f = u(y(h), 220), o = j.Math.min(o, (f.c + (i.b + i.c)) * (f.b + (i.d + i.a))); + for (c = new E(e); c.a < c.c.c.length; ) + r = u(y(c), 220), (r.c + (i.b + i.c)) * (r.b + (i.d + i.a)) == o && (l.c[l.c.length] = r); + return l; + }, w(aA, "AreaFilter", 638), b(639, 1, { 526: 1 }, kI), s.mg = function(e, t, i) { + var r, c, o, f, h, l; + for (h = new X(), l = Lt, f = new E(e); f.a < f.c.c.length; ) + o = u(y(f), 220), l = j.Math.min(l, j.Math.abs((o.c + (i.b + i.c)) / (o.b + (i.d + i.a)) - t)); + for (c = new E(e); c.a < c.c.c.length; ) + r = u(y(c), 220), j.Math.abs((r.c + (i.b + i.c)) / (r.b + (i.d + i.a)) - t) == l && (h.c[h.c.length] = r); + return h; + }, w(aA, "AspectRatioFilter", 639), b(637, 1, { 526: 1 }, yI), s.mg = function(e, t, i) { + var r, c, o, f, h, l; + for (l = new X(), o = Vt, h = new E(e); h.a < h.c.c.length; ) + f = u(y(h), 220), o = j.Math.max(o, cW(f.c + (i.b + i.c), f.b + (i.d + i.a), f.a)); + for (c = new E(e); c.a < c.c.c.length; ) + r = u(y(c), 220), cW(r.c + (i.b + i.c), r.b + (i.d + i.a), r.a) == o && (l.c[l.c.length] = r); + return l; + }, w(aA, "ScaleMeasureFilter", 637), b(381, 22, { 3: 1, 35: 1, 22: 1, 381: 1 }, PO); + var Qon, Jon, IK, Yon = Me(bB, "OptimizationGoal", 381, Ie, Lle, hoe), LYn; + b(856, 1, zs, W4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), htn), ""), "Optimization Goal"), "Optimization goal for approximation of the bounding box given by the first iteration. Determines whether layout is sorted by the maximum scaling, aspect ratio, or area. Depending on the strategy the aspect ratio might be nearly ignored."), Zon), (j1(), Rt)), Yon), Cn((Ho(), vi))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ltn), ""), "Shift Last Placed."), "When placing a rectangle behind or below the last placed rectangle in the first iteration, it is sometimes possible to shift the rectangle further to the left or right, resulting in less whitespace. True (default) enables the shift and false disables it. Disabling the shift produces a greater approximated area by the first iteration and a layout, when using ONLY the first iteration (default not the case), where it is sometimes impossible to implement a size transformation of rectangles that will fill the bounding box and eliminate empty spaces."), (qn(), !0)), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), atn), ""), "Current position of a node in the order of nodes"), "The rectangles are ordered. Normally according to their definition the the model. This option specifies the current position of a node."), Q(-1)), sc), Ui), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), dtn), ""), "Desired index of node"), "The rectangles are ordered. Normally according to their definition the the model. This option allows to specify a desired position that has preference over the original position."), Q(-1)), sc), Ui), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), btn), ""), "Only Area Approximation"), "If enabled only the width approximation step is executed and the nodes are placed accordingly. The nodes are layouted according to the packingStrategy. If set to true not expansion of nodes is taking place."), !1), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), wtn), ""), "Compact Rows"), "Enables compaction. Compacts blocks if they do not use the full height of the row. This option allows to have a smaller drawing. If this option is disabled all nodes are placed next to each other in rows."), !0), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), wB), ""), "Fit Aspect Ratio"), "Expands nodes if expandNodes is true to fit the aspect ratio instead of only in their bounds. The option is only useful if the used packingStrategy is ASPECT_RATIO_DRIVEN, otherwise this may result in unreasonable ndoe expansion."), !1), _i), oi), Cn(vi)))), Mi(e, wB, dA, null), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), gtn), ""), "Target Width"), "Option to place the rectangles in the given target width instead of approximating the width using the desired aspect ratio. The padding is not included in this. Meaning a drawing will have width of targetwidth + horizontal padding."), -1), Dr), Si), Cn(vi)))), $_n((new X4n(), e)); + }; + var NYn, BYn, RYn, _Yn, KYn, HYn, Zon, qYn, GYn; + w(bB, "RectPackingMetaDataProvider", 856), b(1004, 1, zs, X4n), s.Qe = function(e) { + $_n(e); + }; + var zYn, UYn, nfn, fy, efn, tfn, ifn, WYn, rfn, XYn, VYn, QYn, JYn, cfn, ufn, sfn, YYn, ofn, ZYn, ffn, nZn, hfn; + w(bB, "RectPackingOptions", 1004), b(1005, 1, {}, Hgn), s.$e = function() { + var e; + return e = new _gn(), e; + }, s._e = function(e) { + }, w(bB, "RectPackingOptions/RectpackingFactory", 1005), b(1257, 1, {}, SAn), s.a = 0, s.b = !1, s.c = 0, s.d = 0, s.e = !1, s.f = !1, s.g = 0, w("org.eclipse.elk.alg.rectpacking.seconditeration", "RowFillingAndCompaction", 1257), b(187, 1, { 187: 1 }, lF), s.a = 0, s.c = !1, s.d = 0, s.e = 0, s.f = 0, s.g = 0, s.i = 0, s.k = !1, s.o = Lt, s.p = Lt, s.r = 0, s.s = 0, s.t = 0, w(kk, "Block", 187), b(211, 1, { 211: 1 }, lC), s.a = 0, s.b = 0, s.d = 0, s.e = 0, s.f = 0, w(kk, "BlockRow", 211), b(443, 1, { 443: 1 }, YW), s.b = 0, s.c = 0, s.d = 0, s.e = 0, s.f = 0, w(kk, "BlockStack", 443), b(220, 1, { 220: 1 }, bD, MQ), s.a = 0, s.b = 0, s.c = 0, s.d = 0, s.e = 0; + var uMe = w(kk, "DrawingData", 220); + b(355, 22, { 3: 1, 35: 1, 22: 1, 355: 1 }, J9); + var Ep, Ng, Vm, Qm, Jm, eZn = Me(kk, "DrawingDataDescriptor", 355, Ie, ade, loe), tZn; + b(200, 1, { 200: 1 }, oX), s.b = 0, s.c = 0, s.e = 0, s.f = 0, w(kk, "RectRow", 200), b(756, 1, {}, iQ), s.j = 0, w(Lb, YKn, 756), b(1245, 1, {}, qgn), s.Je = function(e) { + return al(e.a, e.b); + }, w(Lb, ZKn, 1245), b(1246, 1, {}, O6n), s.Je = function(e) { + return mde(this.a, e); + }, w(Lb, nHn, 1246), b(1247, 1, {}, D6n), s.Je = function(e) { + return Mpe(this.a, e); + }, w(Lb, eHn, 1247), b(1248, 1, {}, $6n), s.Je = function(e) { + return jwe(this.a, e); + }, w(Lb, "ElkGraphImporter/lambda$3$Type", 1248), b(1249, 1, {}, F6n), s.Je = function(e) { + return ume(this.a, e); + }, w(Lb, tHn, 1249), b(1133, 209, La, C8n), s.Ze = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v; + for (ga(e, (S7(), OP)) && (v = Ce(hn(e, (ZF(), Ofn))), o = Vx(L3(), v), o && (f = u(n$(o.f), 209), f.Ze(e, yc(t, 1)))), pr(e, NK, (L8(), IP)), pr(e, BK, (P7(), LK)), pr(e, RK, (c7(), DP)), h = u(hn(e, (ZF(), Sfn)), 19).a, le(t, "Overlap removal", 1), on(sn(hn(e, jZn))), l = new hi(), a = new x6n(l), r = new iQ(), i = F_n(r, e), d = !0, c = 0; c < h && d; ) { + if (on(sn(hn(e, Pfn)))) { + if (l.a.$b(), i6e(new jyn(a), i.i), l.a.gc() == 0) + break; + i.e = l; + } + for (pC(this.b), ih(this.b, (w7(), AP), (Jv(), hy)), ih(this.b, SP, i.g), ih(this.b, PP, (Ij(), $K)), this.a = EM(this.b, i), p = new E(this.a); p.a < p.c.c.length; ) + g = u(y(p), 51), g.pf(i, yc(t, 1)); + k4e(r, i), d = on(sn(k(i, (R3(), mrn)))), ++c; + } + VRn(r, i), ce(t); + }, w(Lb, "OverlapRemovalLayoutProvider", 1133), b(1134, 1, {}, x6n), w(Lb, "OverlapRemovalLayoutProvider/lambda$0$Type", 1134), b(437, 22, { 3: 1, 35: 1, 22: 1, 437: 1 }, IO); + var AP, SP, PP, OK = Me(Lb, "SPOrEPhases", 437, Ie, Ble, aoe), iZn; + b(1255, 1, {}, T8n), w(Lb, "ShrinkTree", 1255), b(1135, 209, La, I9n), s.Ze = function(e, t) { + var i, r, c, o, f; + ga(e, (S7(), OP)) && (f = Ce(hn(e, OP)), c = Vx(L3(), f), c && (o = u(n$(c.f), 209), o.Ze(e, yc(t, 1)))), r = new iQ(), i = F_n(r, e), q9e(this.a, i, yc(t, 1)), VRn(r, i); + }, w(Lb, "ShrinkTreeLayoutProvider", 1135), b(300, 134, { 3: 1, 300: 1, 94: 1, 134: 1 }, rMn), s.c = !1, w("org.eclipse.elk.alg.spore.graph", "Graph", 300), b(482, 22, { 3: 1, 35: 1, 22: 1, 482: 1, 246: 1, 234: 1 }, y7n), s.Kf = function() { + return sDn(this); + }, s.Xf = function() { + return sDn(this); + }; + var DK, lfn = Me(Nb, gnn, 482, Ie, Vhe, doe), rZn; + b(551, 22, { 3: 1, 35: 1, 22: 1, 551: 1, 246: 1, 234: 1 }, yjn), s.Kf = function() { + return new WH(); + }, s.Xf = function() { + return new WH(); + }; + var $K, cZn = Me(Nb, "OverlapRemovalStrategy", 551, Ie, Qhe, boe), uZn; + b(430, 22, { 3: 1, 35: 1, 22: 1, 430: 1 }, oz); + var IP, FK, afn = Me(Nb, "RootSelection", 430, Ie, H1e, woe), sZn; + b(316, 22, { 3: 1, 35: 1, 22: 1, 316: 1 }, Y9); + var dfn, xK, LK, bfn, wfn, gfn = Me(Nb, "SpanningTreeCostFunction", 316, Ie, fde, goe), oZn; + b(1002, 1, zs, _4n), s.Qe = function(e) { + TRn(e); + }; + var pfn, vfn, fZn, hZn, mfn, kfn, NK, BK, RK, lZn, aZn, OP; + w(Nb, "SporeCompactionOptions", 1002), b(1003, 1, {}, Ggn), s.$e = function() { + var e; + return e = new I9n(), e; + }, s._e = function(e) { + }, w(Nb, "SporeCompactionOptions/SporeCompactionFactory", 1003), b(855, 1, zs, K4n), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), gB), ""), "Underlying Layout Algorithm"), "A layout algorithm that is applied to the graph before it is compacted. If this is null, nothing is applied before compaction."), (j1(), mv)), tn), Cn((Ho(), Xn))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), mB), "structure"), "Structure Extraction Strategy"), "This option defines what kind of triangulation or other partitioning of the plane is applied to the vertices."), Mfn), Rt), Dfn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ptn), kB), "Tree Construction Strategy"), "Whether a minimum spanning tree or a maximum spanning tree should be constructed."), Cfn), Rt), Ffn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), vtn), kB), "Cost Function for Spanning Tree"), "The cost function is used in the creation of the spanning tree."), Efn), Rt), gfn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), pB), kB), "Root node for spanning tree construction"), "The identifier of the node that is preferred as the root of the spanning tree. If this is null, the first node is chosen."), null), mv), tn), Cn(Xn)))), Mi(e, pB, vB, vZn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), vB), kB), "Root selection for spanning tree"), "This sets the method used to select a root node for the construction of a spanning tree"), jfn), Rt), afn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), mtn), den), "Compaction Strategy"), "This option defines how the compaction is applied."), yfn), Rt), lfn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ktn), den), "Orthogonal Compaction"), "Restricts the translation of nodes to orthogonal directions in the compaction phase."), (qn(), !1)), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ytn), BHn), "Upper limit for iterations of overlap removal"), null), Q(64)), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), jtn), BHn), "Whether to run a supplementary scanline overlap check."), null), !0), _i), oi), Cn(Xn)))), OBn((new H4n(), e)), TRn((new _4n(), e)); + }; + var dZn, yfn, bZn, wZn, gZn, pZn, vZn, mZn, jfn, kZn, Efn, yZn, Cfn, Tfn, Mfn, Afn; + w(Nb, "SporeMetaDataProvider", 855), b(E1, 1, zs, H4n), s.Qe = function(e) { + OBn(e); + }; + var jZn, Sfn, Pfn, Ifn, EZn, Ofn; + w(Nb, "SporeOverlapRemovalOptions", E1), b(1001, 1, {}, zgn), s.$e = function() { + var e; + return e = new C8n(), e; + }, s._e = function(e) { + }, w(Nb, "SporeOverlapRemovalOptions/SporeOverlapFactory", 1001), b(530, 22, { 3: 1, 35: 1, 22: 1, 530: 1, 246: 1, 234: 1 }, lTn), s.Kf = function() { + return oDn(this); + }, s.Xf = function() { + return oDn(this); + }; + var hy, Dfn = Me(Nb, "StructureExtractionStrategy", 530, Ie, Jhe, poe), CZn; + b(429, 22, { 3: 1, 35: 1, 22: 1, 429: 1, 246: 1, 234: 1 }, fz), s.Kf = function() { + return i$n(this); + }, s.Xf = function() { + return i$n(this); + }; + var $fn, DP, Ffn = Me(Nb, "TreeConstructionStrategy", 429, Ie, K1e, voe), TZn; + b(1443, 1, Cc, Ugn), s.Yf = function(e) { + return u(e, 300), new li(); + }, s.pf = function(e, t) { + I4e(u(e, 300), t); + }, w(RHn, "DelaunayTriangulationPhase", 1443), b(1444, 1, Yn, L6n), s.td = function(e) { + W(this.a, u(e, 65).a); + }, w(RHn, "DelaunayTriangulationPhase/lambda$0$Type", 1444), b(783, 1, Cc, sG), s.Yf = function(e) { + return u(e, 300), new li(); + }, s.pf = function(e, t) { + this.ng(u(e, 300), t); + }, s.ng = function(e, t) { + var i, r, c; + le(t, "Minimum spanning tree construction", 1), e.d ? r = e.d.a : r = u(un(e.i, 0), 65).a, on(sn(k(e, (R3(), pm)))) ? c = wL(e.e, r, (i = e.b, i)) : c = wL(e.e, r, e.b), qOn(this, c, e), ce(t); + }, w(yB, "MinSTPhase", 783), b(1446, 783, Cc, b9n), s.ng = function(e, t) { + var i, r, c, o; + le(t, "Maximum spanning tree construction", 1), i = new N6n(e), e.d ? c = e.d.c : c = u(un(e.i, 0), 65).c, on(sn(k(e, (R3(), pm)))) ? o = wL(e.e, c, (r = i, r)) : o = wL(e.e, c, i), qOn(this, o, e), ce(t); + }, w(yB, "MaxSTPhase", 1446), b(1447, 1, {}, N6n), s.Je = function(e) { + return kre(this.a, e); + }, w(yB, "MaxSTPhase/lambda$0$Type", 1447), b(1445, 1, Yn, B6n), s.td = function(e) { + lce(this.a, u(e, 65)); + }, w(yB, "MinSTPhase/lambda$0$Type", 1445), b(785, 1, Cc, WH), s.Yf = function(e) { + return u(e, 300), new li(); + }, s.pf = function(e, t) { + qve(this, u(e, 300), t); + }, s.a = !1, w(jB, "GrowTreePhase", 785), b(786, 1, Yn, NU), s.td = function(e) { + uwe(this.a, this.b, this.c, u(e, 221)); + }, w(jB, "GrowTreePhase/lambda$0$Type", 786), b(1448, 1, Cc, Wgn), s.Yf = function(e) { + return u(e, 300), new li(); + }, s.pf = function(e, t) { + Ype(this, u(e, 300), t); + }, w(jB, "ShrinkTreeCompactionPhase", 1448), b(784, 1, Yn, BU), s.td = function(e) { + Ime(this.a, this.b, this.c, u(e, 221)); + }, w(jB, "ShrinkTreeCompactionPhase/lambda$0$Type", 784); + var xfn = Ct(dc, "IGraphElementVisitor"); + b(860, 1, { 527: 1 }, ZMn), s.og = function(e) { + var t; + t = L7e(this, e), Pr(t, u(te(this.b, e), 94)), F9e(this, e, t); + }; + var MZn, AZn; + w(og, "LayoutConfigurator", 860); + var sMe = Ct(og, "LayoutConfigurator/IPropertyHolderOptionFilter"); + b(932, 1, { 1933: 1 }, Xgn), s.pg = function(e, t) { + return L2(), !e.Xe(t); + }, w(og, "LayoutConfigurator/lambda$0$Type", 932), b(933, 1, { 1933: 1 }, Qee), s.pg = function(e, t) { + return k8n(e, t); + }, w(og, "LayoutConfigurator/lambda$1$Type", 933), b(931, 1, { 831: 1 }, Vgn), s.qg = function(e, t) { + return L2(), !e.Xe(t); + }, w(og, "LayoutConfigurator/lambda$2$Type", 931), b(934, 1, Ve, rkn), s.Mb = function(e) { + return Lhe(this.a, this.b, u(e, 1933)); + }, w(og, "LayoutConfigurator/lambda$3$Type", 934), b(858, 1, {}, Qgn), w(og, "RecursiveGraphLayoutEngine", 858), b(296, 60, Uh, Gmn, pw), w(og, "UnsupportedConfigurationException", 296), b(453, 60, Uh, Gv), w(og, "UnsupportedGraphException", 453), b(754, 1, {}), w(dc, "AbstractRandomListAccessor", 754), b(500, 754, {}, B7), s.rg = function() { + return null; + }, s.d = !0, s.e = !0, s.f = 0, w(L4, "AlgorithmAssembler", 500), b(1236, 1, Ve, Jgn), s.Mb = function(e) { + return !!u(e, 123); + }, w(L4, "AlgorithmAssembler/lambda$0$Type", 1236), b(1237, 1, {}, R6n), s.Kb = function(e) { + return Rie(this.a, u(e, 123)); + }, w(L4, "AlgorithmAssembler/lambda$1$Type", 1237), b(1238, 1, Ve, Ygn), s.Mb = function(e) { + return !!u(e, 80); + }, w(L4, "AlgorithmAssembler/lambda$2$Type", 1238), b(1239, 1, Yn, _6n), s.td = function(e) { + cs(this.a, u(e, 80)); + }, w(L4, "AlgorithmAssembler/lambda$3$Type", 1239), b(1240, 1, Yn, ckn), s.td = function(e) { + Yce(this.a, this.b, u(e, 234)); + }, w(L4, "AlgorithmAssembler/lambda$4$Type", 1240), b(1355, 1, at, Zgn), s.ue = function(e, t) { + return a1e(u(e, 234), u(t, 234)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(L4, "EnumBasedFactoryComparator", 1355), b(80, 754, { 80: 1 }, li), s.rg = function() { + return new hi(); + }, s.a = 0, w(L4, "LayoutProcessorConfiguration", 80), b(1013, 1, { 527: 1 }, V4n), s.og = function(e) { + n6(PZn, new K6n(e)); + }; + var SZn, PZn, IZn; + w(Wr, "DeprecatedLayoutOptionReplacer", 1013), b(1014, 1, Yn, n2n), s.td = function(e) { + e0e(u(e, 160)); + }, w(Wr, "DeprecatedLayoutOptionReplacer/lambda$0$Type", 1014), b(1015, 1, Yn, e2n), s.td = function(e) { + C2e(u(e, 160)); + }, w(Wr, "DeprecatedLayoutOptionReplacer/lambda$1$Type", 1015), b(1016, 1, {}, K6n), s.Od = function(e, t) { + Zce(this.a, u(e, 146), u(t, 38)); + }, w(Wr, "DeprecatedLayoutOptionReplacer/lambda$2$Type", 1016), b(149, 1, { 686: 1, 149: 1 }, Oa), s.Fb = function(e) { + return CX(this, e); + }, s.sg = function() { + return this.b; + }, s.tg = function() { + return this.c; + }, s.ne = function() { + return this.e; + }, s.Hb = function() { + return k1(this.c); + }, s.Ib = function() { + return "Layout Algorithm: " + this.c; + }; + var oMe = w(Wr, "LayoutAlgorithmData", 149); + b(263, 1, {}, na), w(Wr, "LayoutAlgorithmData/Builder", 263), b(1017, 1, { 527: 1 }, t2n), s.og = function(e) { + I(e, 239) && !on(sn(e.We((Xe(), RP)))) && mye(u(e, 33)); + }, w(Wr, "LayoutAlgorithmResolver", 1017), b(229, 1, { 686: 1, 229: 1 }, M2), s.Fb = function(e) { + return I(e, 229) ? An(this.b, u(e, 229).b) : !1; + }, s.sg = function() { + return this.a; + }, s.tg = function() { + return this.b; + }, s.ne = function() { + return this.d; + }, s.Hb = function() { + return k1(this.b); + }, s.Ib = function() { + return "Layout Type: " + this.b; + }, w(Wr, "LayoutCategoryData", 229), b(344, 1, {}, Zg), w(Wr, "LayoutCategoryData/Builder", 344), b(867, 1, {}, kBn); + var _K; + w(Wr, "LayoutMetaDataService", 867), b(868, 1, {}, JCn), w(Wr, "LayoutMetaDataService/Registry", 868), b(478, 1, { 478: 1 }, XH), w(Wr, "LayoutMetaDataService/Registry/Triple", 478), b(869, 1, dg, i2n), s.ug = function() { + return new Li(); + }, w(Wr, "LayoutMetaDataService/lambda$0$Type", 869), b(870, 1, Bb, r2n), s.vg = function(e) { + return Qr(u(e, 8)); + }, w(Wr, "LayoutMetaDataService/lambda$1$Type", 870), b(879, 1, dg, c2n), s.ug = function() { + return new X(); + }, w(Wr, "LayoutMetaDataService/lambda$10$Type", 879), b(880, 1, Bb, u2n), s.vg = function(e) { + return new au(u(e, 12)); + }, w(Wr, "LayoutMetaDataService/lambda$11$Type", 880), b(881, 1, dg, s2n), s.ug = function() { + return new Tt(); + }, w(Wr, "LayoutMetaDataService/lambda$12$Type", 881), b(882, 1, Bb, o2n), s.vg = function(e) { + return p8(u(e, 68)); + }, w(Wr, "LayoutMetaDataService/lambda$13$Type", 882), b(883, 1, dg, f2n), s.ug = function() { + return new hi(); + }, w(Wr, "LayoutMetaDataService/lambda$14$Type", 883), b(884, 1, Bb, h2n), s.vg = function(e) { + return rC(u(e, 53)); + }, w(Wr, "LayoutMetaDataService/lambda$15$Type", 884), b(885, 1, dg, l2n), s.ug = function() { + return new Sh(); + }, w(Wr, "LayoutMetaDataService/lambda$16$Type", 885), b(886, 1, Bb, a2n), s.vg = function(e) { + return jC(u(e, 53)); + }, w(Wr, "LayoutMetaDataService/lambda$17$Type", 886), b(887, 1, dg, d2n), s.ug = function() { + return new Wq(); + }, w(Wr, "LayoutMetaDataService/lambda$18$Type", 887), b(888, 1, Bb, b2n), s.vg = function(e) { + return TEn(u(e, 208)); + }, w(Wr, "LayoutMetaDataService/lambda$19$Type", 888), b(871, 1, dg, w2n), s.ug = function() { + return new fu(); + }, w(Wr, "LayoutMetaDataService/lambda$2$Type", 871), b(872, 1, Bb, g2n), s.vg = function(e) { + return new mj(u(e, 74)); + }, w(Wr, "LayoutMetaDataService/lambda$3$Type", 872), b(873, 1, dg, p2n), s.ug = function() { + return new Bv(); + }, w(Wr, "LayoutMetaDataService/lambda$4$Type", 873), b(874, 1, Bb, v2n), s.vg = function(e) { + return new oD(u(e, 142)); + }, w(Wr, "LayoutMetaDataService/lambda$5$Type", 874), b(875, 1, dg, k2n), s.ug = function() { + return new i2(); + }, w(Wr, "LayoutMetaDataService/lambda$6$Type", 875), b(876, 1, Bb, y2n), s.vg = function(e) { + return new DU(u(e, 116)); + }, w(Wr, "LayoutMetaDataService/lambda$7$Type", 876), b(877, 1, dg, j2n), s.ug = function() { + return new jI(); + }, w(Wr, "LayoutMetaDataService/lambda$8$Type", 877), b(878, 1, Bb, E2n), s.vg = function(e) { + return new BPn(u(e, 373)); + }, w(Wr, "LayoutMetaDataService/lambda$9$Type", 878); + var KK = Ct(ok, "IProperty"); + b(23, 1, { 35: 1, 686: 1, 23: 1, 146: 1 }, bn), s.wd = function(e) { + return Cce(this, u(e, 146)); + }, s.Fb = function(e) { + return I(e, 23) ? An(this.f, u(e, 23).f) : I(e, 146) && An(this.f, u(e, 146).tg()); + }, s.wg = function() { + var e; + if (I(this.b, 4)) { + if (e = qQ(this.b), e == null) + throw T(new $r(HHn + this.f + "'. Make sure it's type is registered with the " + (Ph(Fy), Fy.k) + Etn)); + return e; + } else + return this.b; + }, s.sg = function() { + return this.d; + }, s.tg = function() { + return this.f; + }, s.ne = function() { + return this.i; + }, s.Hb = function() { + return k1(this.f); + }, s.Ib = function() { + return "Layout Option: " + this.f; + }, w(Wr, "LayoutOptionData", 23), b(24, 1, {}, dn), w(Wr, "LayoutOptionData/Builder", 24), b(175, 22, { 3: 1, 35: 1, 22: 1, 175: 1 }, Z9); + var Yf, $1, vi, Xn, Za, F1 = Me(Wr, "LayoutOptionData/Target", 175, Ie, ode, moe), OZn; + b(277, 22, { 3: 1, 35: 1, 22: 1, 277: 1 }, l2); + var _i, Dr, Rt, Cp, sc, yf, mv, Lfn, DZn = Me(Wr, "LayoutOptionData/Type", 277, Ie, R0e, koe), $Zn, Ym, Nfn; + b(110, 1, { 110: 1 }, d2, ys, uC), s.Fb = function(e) { + var t; + return e == null || !I(e, 110) ? !1 : (t = u(e, 110), vc(this.c, t.c) && vc(this.d, t.d) && vc(this.b, t.b) && vc(this.a, t.a)); + }, s.Hb = function() { + return gT(A(M(Zn, 1), rn, 1, 5, [this.c, this.d, this.b, this.a])); + }, s.Ib = function() { + return "Rect[x=" + this.c + ",y=" + this.d + ",w=" + this.b + ",h=" + this.a + "]"; + }, s.a = 0, s.b = 0, s.c = 0, s.d = 0, w(dk, "ElkRectangle", 110), b(8, 1, { 3: 1, 4: 1, 8: 1, 414: 1 }, Li, u$, fn, kr), s.Fb = function(e) { + return WIn(this, e); + }, s.Hb = function() { + return t3(this.a) + T3e(t3(this.b)); + }, s.Jf = function(e) { + var t, i, r, c; + for (r = 0; r < e.length && ADn((Te(r, e.length), e.charCodeAt(r)), WKn); ) + ++r; + for (t = e.length; t > 0 && ADn((Te(t - 1, e.length), e.charCodeAt(t - 1)), XKn); ) + --t; + if (r >= t) + throw T(new Hn("The given string does not contain any numbers.")); + if (c = Mb(e.substr(r, t - r), `,|;|\r| +`), c.length != 2) + throw T(new Hn("Exactly two numbers are expected, " + c.length + " were found.")); + try { + this.a = yb(kb(c[0])), this.b = yb(kb(c[1])); + } catch (o) { + throw o = Et(o), I(o, 127) ? (i = o, T(new Hn(VKn + i))) : T(o); + } + }, s.Ib = function() { + return "(" + this.a + "," + this.b + ")"; + }, s.a = 0, s.b = 0; + var di = w(dk, "KVector", 8); + b(74, 68, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 68: 1, 15: 1, 74: 1, 414: 1 }, fu, mj, ljn), s.Pc = function() { + return Gwe(this); + }, s.Jf = function(e) { + var t, i, r, c, o, f; + r = Mb(e, `,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | +`), _s(this); + try { + for (i = 0, o = 0, c = 0, f = 0; i < r.length; ) + r[i] != null && kb(r[i]).length > 0 && (o % 2 == 0 ? c = yb(r[i]) : f = yb(r[i]), o > 0 && o % 2 != 0 && Ke(this, new fn(c, f)), ++o), ++i; + } catch (h) { + throw h = Et(h), I(h, 127) ? (t = h, T(new Hn("The given string does not match the expected format for vectors." + t))) : T(h); + } + }, s.Ib = function() { + var e, t, i; + for (e = new Yu("("), t = _e(this, 0); t.b != t.d.c; ) + i = u(Re(t), 8), De(e, i.a + "," + i.b), t.b != t.d.c && (e.a += "; "); + return (e.a += ")", e).a; + }; + var Bfn = w(dk, "KVectorChain", 74); + b(248, 22, { 3: 1, 35: 1, 22: 1, 248: 1 }, f5); + var HK, $P, FP, ly, ay, xP, Rfn = Me(Ws, "Alignment", 248, Ie, Bde, yoe), FZn; + b(979, 1, zs, Q4n), s.Qe = function(e) { + zBn(e); + }; + var _fn, qK, xZn, Kfn, Hfn, LZn, qfn, NZn, BZn, Gfn, zfn, RZn; + w(Ws, "BoxLayouterOptions", 979), b(980, 1, {}, m2n), s.$e = function() { + var e; + return e = new A2n(), e; + }, s._e = function(e) { + }, w(Ws, "BoxLayouterOptions/BoxFactory", 980), b(291, 22, { 3: 1, 35: 1, 22: 1, 291: 1 }, h5); + var dy, GK, by, wy, gy, zK, UK = Me(Ws, "ContentAlignment", 291, Ie, Nde, joe), _Zn; + b(684, 1, zs, nq), s.Qe = function(e) { + En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), GHn), ""), "Layout Algorithm"), "Select a specific layout algorithm."), (j1(), mv)), tn), Cn((Ho(), Xn))))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), zHn), ""), "Resolved Layout Algorithm"), "Meta data associated with the selected algorithm."), yf), oMe), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Oen), ""), "Alignment"), "Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."), Ufn), Rt), Rfn), Cn(vi)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), ep), ""), "Aspect Ratio"), "The desired aspect ratio of the drawing, that is the quotient of width by height."), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Ttn), ""), "Bend Points"), "A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."), yf), Bfn), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), sA), ""), "Content Alignment"), "Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."), Xfn), Cp), UK), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), mk), ""), "Debug Mode"), "Whether additional debug information shall be generated."), (qn(), !1)), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Fen), ""), bnn), "Overall direction of edges: horizontal (right / left) or vertical (down / up)."), Vfn), Rt), e9), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), pk), ""), "Edge Routing"), "What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."), Yfn), Rt), cH), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), dA), ""), "Expand Nodes"), "If active, nodes are expanded to fill the area of their parent."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), uA), ""), "Hierarchy Handling"), "Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."), thn), Rt), Khn), vt(Xn, A(M(F1, 1), z, 175, 0, [vi]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), s0), ""), "Padding"), "The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."), ahn), yf), Wrn), vt(Xn, A(M(F1, 1), z, 175, 0, [vi]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), lk), ""), "Interactive"), "Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), cB), ""), "interactive Layout"), "Whether the graph should be changeable interactively and by setting constraints"), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), G6), ""), "Omit Node Micro Layout"), "Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), CN), ""), "Port Constraints"), "Defines constraints of the position of the ports of a node."), phn), Rt), Ghn), Cn(vi)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), oA), ""), "Position"), "The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."), yf), di), vt(vi, A(M(F1, 1), z, 175, 0, [Za, $1]))))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), hk), ""), "Priority"), "Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."), sc), Ui), vt(vi, A(M(F1, 1), z, 175, 0, [Yf]))))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), HM), ""), "Randomization Seed"), "Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), q6), ""), "Separate Connected Components"), "Whether each connected component should be processed separately."), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), qen), ""), "Junction Points"), "This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."), rhn), yf), Bfn), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Uen), ""), "Comment Box"), "Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."), !1), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Wen), ""), "Hypernode"), "Whether the node should be handled as a hypernode."), !1), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), LTe), ""), "Label Manager"), "Label managers can shorten labels upon a layout algorithm's request."), yf), dMe), vt(Xn, A(M(F1, 1), z, 175, 0, [$1]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Ven), ""), "Margins"), "Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."), chn), yf), Urn), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Pen), ""), "No Layout"), "No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."), !1), _i), oi), vt(vi, A(M(F1, 1), z, 175, 0, [Yf, Za, $1]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), UHn), ""), "Scale Factor"), "The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."), 1), Dr), Si), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), WHn), ""), "Animate"), "Whether the shift from the old layout to the new computed layout shall be animated."), !0), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), XHn), ""), "Animation Time Factor"), "Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."), Q(100)), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), VHn), ""), "Layout Ancestors"), "Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), QHn), ""), "Maximal Animation Time"), "The maximal time for animations, in milliseconds."), Q(4e3)), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), JHn), ""), "Minimal Animation Time"), "The minimal time for animations, in milliseconds."), Q(400)), sc), Ui), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), YHn), ""), "Progress Bar"), "Whether a progress bar shall be displayed during layout computations."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ZHn), ""), "Validate Graph"), "Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), nqn), ""), "Validate Options"), "Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."), !0), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), eqn), ""), "Zoom to Fit"), "Whether the zoom level shall be set to view the whole diagram after layout."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Ctn), "box"), "Box Layout Mode"), "Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."), Wfn), Rt), Qhn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), pen), wf), "Comment Comment Spacing"), "Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."), 10), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ven), wf), "Comment Node Spacing"), "Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."), 10), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), vN), wf), "Components Spacing"), "Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."), 20), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), men), wf), "Edge Spacing"), "Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."), 10), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), EN), wf), "Edge Label Spacing"), "The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."), 2), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ken), wf), "Edge Node Spacing"), "Spacing to be preserved between nodes and edges."), 10), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), yen), wf), "Label Spacing"), "Determines the amount of space to be left between two labels of the same graph element."), 0), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Cen), wf), "Label Node Spacing"), "Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."), 5), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), jen), wf), "Horizontal spacing between Label and Port"), "Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Een), wf), "Vertical spacing between Label and Port"), "Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), $b), wf), "Node Spacing"), "The minimal distance to be preserved between each two nodes."), 20), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Ten), wf), "Node Self Loop Spacing"), "Spacing to be preserved between a node and its self loops."), 10), Dr), Si), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Men), wf), "Port Spacing"), "Spacing between pairs of ports of the same node."), 10), Dr), Si), vt(Xn, A(M(F1, 1), z, 175, 0, [vi]))))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Aen), wf), "Individual Spacing"), "Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."), yf), yne), vt(vi, A(M(F1, 1), z, 175, 0, [Yf, Za, $1]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Qen), wf), "Additional Port Space"), "Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."), Ahn), yf), Urn), Cn(Xn)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), rB), rqn), "Layout Partition"), "Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."), sc), Ui), vt(Xn, A(M(F1, 1), z, 175, 0, [vi]))))), Mi(e, rB, iB, XZn), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), iB), rqn), "Layout Partitioning"), "Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."), dhn), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), xen), cqn), "Node Label Padding"), "Define padding for node labels that are placed inside of a node."), shn), yf), Wrn), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), $4), cqn), "Node Label Placement"), "Hints for where node labels are to be placed; if empty, the node label's position is not modified."), ohn), Cp), ar), vt(vi, A(M(F1, 1), z, 175, 0, [$1]))))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Ben), wA), "Port Alignment"), "Defines the default port distribution for a node. May be overridden for each side individually."), whn), Rt), c9), Cn(vi)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Ren), wA), "Port Alignment (North)"), "Defines how ports on the northern side are placed, overriding the node's general port alignment."), Rt), c9), Cn(vi)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), _en), wA), "Port Alignment (South)"), "Defines how ports on the southern side are placed, overriding the node's general port alignment."), Rt), c9), Cn(vi)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Ken), wA), "Port Alignment (West)"), "Defines how ports on the western side are placed, overriding the node's general port alignment."), Rt), c9), Cn(vi)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Hen), wA), "Port Alignment (East)"), "Defines how ports on the eastern side are placed, overriding the node's general port alignment."), Rt), c9), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), hg), CB), "Node Size Constraints"), "What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."), fhn), Cp), o9), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), tp), CB), "Node Size Options"), "Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."), lhn), Cp), Uhn), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), ip), CB), "Node Size Minimum"), "The minimal size to which a node can be reduced."), hhn), yf), di), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), tB), CB), "Fixed Graph Size"), "By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."), !1), _i), oi), Cn(Xn)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Gen), eB), "Edge Label Placement"), "Gives a hint on where to put edge labels."), Qfn), Rt), Phn), Cn($1)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), qM), eB), "Inline Edge Labels"), "If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."), !1), _i), oi), Cn($1)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), NTe), "font"), "Font Name"), "Font name used for a label."), mv), tn), Cn($1)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), tqn), "font"), "Font Size"), "Font size used for a label."), sc), Ui), Cn($1)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Xen), TB), "Port Anchor Offset"), "The offset to the port position where connections shall be attached."), yf), di), Cn(Za)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), zen), TB), "Port Index"), "The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."), sc), Ui), Cn(Za)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Ien), TB), "Port Side"), "The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."), khn), Rt), Yi), Cn(Za)))), En(e, new bn(yn(kn(jn(gn(mn(pn(vn(new dn(), Sen), TB), "Port Border Offset"), "The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."), Dr), Si), Cn(Za)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), F4), Mtn), "Port Label Placement"), "Decides on a placement method for port labels; if empty, the node label's position is not modified."), vhn), Cp), qP), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Len), Mtn), "Port Labels Next to Port"), "Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."), !1), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Nen), Mtn), "Treat Port Labels as Group"), "If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."), !0), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), Den), uqn), "Activate Inside Self Loops"), "Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."), !1), _i), oi), Cn(vi)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), $en), uqn), "Inside Self Loop"), "Whether a self loop should be routed inside a node instead of around that node."), !1), _i), oi), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), mN), "edge"), "Edge Thickness"), "The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."), 1), Dr), Si), Cn(Yf)))), En(e, new bn(yn(kn(jn(Dn(gn(mn(pn(vn(new dn(), iqn), "edge"), "Edge Type"), "The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."), nhn), Rt), xhn), Cn(Yf)))), Yv(e, new M2(Uv(Xp(Wp(new Zg(), Jn), "Layered"), 'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))), Yv(e, new M2(Uv(Xp(Wp(new Zg(), "org.eclipse.elk.orthogonal"), "Orthogonal"), `Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))), Yv(e, new M2(Uv(Xp(Wp(new Zg(), fs), "Force"), "Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))), Yv(e, new M2(Uv(Xp(Wp(new Zg(), "org.eclipse.elk.circle"), "Circle"), "Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))), Yv(e, new M2(Uv(Xp(Wp(new Zg(), IHn), "Tree"), "Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))), Yv(e, new M2(Uv(Xp(Wp(new Zg(), "org.eclipse.elk.planar"), "Planar"), "Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))), Yv(e, new M2(Uv(Xp(Wp(new Zg(), zf), "Radial"), "Radial layout algorithms usually position the nodes of the graph on concentric circles."))), IBn((new J4n(), e)), zBn((new Q4n(), e)), uBn((new Y4n(), e)); + }; + var Zm, KZn, Ufn, Tp, HZn, qZn, Wfn, GZn, LP, Xfn, py, S0, Vfn, WK, XK, Qfn, Jfn, Yfn, Zfn, nhn, ehn, Bg, thn, zZn, vy, VK, NP, ihn, Rg, rhn, my, chn, uhn, shn, _g, ohn, nd, fhn, BP, Kg, hhn, _l, lhn, RP, ky, ed, ahn, UZn, dhn, WZn, XZn, bhn, whn, QK, JK, YK, ZK, ghn, Bu, n9, phn, nH, eH, cw, vhn, mhn, Hg, khn, Mp, _P, tH, kv, VZn, iH, QZn, JZn, yhn, YZn, jhn, ZZn, Ap, Ehn, KP, Chn, Thn, td, nne, Mhn, Ahn, Shn; + w(Ws, "CoreOptions", 684), b(103, 22, { 3: 1, 35: 1, 22: 1, 103: 1 }, n8); + var Jh, Zs, Ao, mh, Yh, e9 = Me(Ws, bnn, 103, Ie, ude, Toe), ene; + b(272, 22, { 3: 1, 35: 1, 22: 1, 272: 1 }, OO); + var yv, uw, jv, Phn = Me(Ws, "EdgeLabelPlacement", 272, Ie, _le, Moe), tne; + b(218, 22, { 3: 1, 35: 1, 22: 1, 218: 1 }, Wj); + var Ev, yy, Sp, rH, cH = Me(Ws, "EdgeRouting", 218, Ie, Dae, Aoe), ine; + b(312, 22, { 3: 1, 35: 1, 22: 1, 312: 1 }, l5); + var Ihn, Ohn, Dhn, $hn, uH, Fhn, xhn = Me(Ws, "EdgeType", 312, Ie, Ude, Soe), rne; + b(977, 1, zs, J4n), s.Qe = function(e) { + IBn(e); + }; + var Lhn, Nhn, Bhn, Rhn, cne, _hn, t9; + w(Ws, "FixedLayouterOptions", 977), b(978, 1, {}, D2n), s.$e = function() { + var e; + return e = new T2n(), e; + }, s._e = function(e) { + }, w(Ws, "FixedLayouterOptions/FixedFactory", 978), b(334, 22, { 3: 1, 35: 1, 22: 1, 334: 1 }, DO); + var x1, HP, i9, Khn = Me(Ws, "HierarchyHandling", 334, Ie, Rle, Poe), une; + b(285, 22, { 3: 1, 35: 1, 22: 1, 285: 1 }, Xj); + var kh, Kl, jy, Ey, sne = Me(Ws, "LabelSide", 285, Ie, Oae, Ioe), one; + b(93, 22, { 3: 1, 35: 1, 22: 1, 93: 1 }, yw); + var Zh, So, no, Po, ds, Io, eo, yh, Oo, ar = Me(Ws, "NodeLabelPlacement", 93, Ie, V0e, Ooe), fne; + b(249, 22, { 3: 1, 35: 1, 22: 1, 249: 1 }, e8); + var Hhn, r9, Hl, qhn, Cy, c9 = Me(Ws, "PortAlignment", 249, Ie, sde, Doe), hne; + b(98, 22, { 3: 1, 35: 1, 22: 1, 98: 1 }, a5); + var id, Sc, jh, Cv, jf, ql, Ghn = Me(Ws, "PortConstraints", 98, Ie, Pde, $oe), lne; + b(273, 22, { 3: 1, 35: 1, 22: 1, 273: 1 }, d5); + var u9, s9, n1, Ty, Gl, Pp, qP = Me(Ws, "PortLabelPlacement", 273, Ie, zde, Foe), ane; + b(61, 22, { 3: 1, 35: 1, 22: 1, 61: 1 }, t8); + var Vn, Kn, Fs, xs, ru, qc, Ef, Do, Su, mu, Pc, Pu, cu, uu, $o, bs, ws, to, ae, Xr, Gn, Yi = Me(Ws, "PortSide", 61, Ie, ide, Noe), dne; + b(981, 1, zs, Y4n), s.Qe = function(e) { + uBn(e); + }; + var bne, wne, zhn, gne, pne; + w(Ws, "RandomLayouterOptions", 981), b(982, 1, {}, $2n), s.$e = function() { + var e; + return e = new L2n(), e; + }, s._e = function(e) { + }, w(Ws, "RandomLayouterOptions/RandomFactory", 982), b(374, 22, { 3: 1, 35: 1, 22: 1, 374: 1 }, Vj); + var sw, My, Ay, rd, o9 = Me(Ws, "SizeConstraint", 374, Ie, Iae, xoe), vne; + b(259, 22, { 3: 1, 35: 1, 22: 1, 259: 1 }, jw); + var Sy, GP, Tv, sH, Py, f9, zP, UP, WP, Uhn = Me(Ws, "SizeOptions", 259, Ie, tbe, Loe), mne; + b(370, 1, { 1949: 1 }, Gp), s.b = !1, s.c = 0, s.d = -1, s.e = null, s.f = null, s.g = -1, s.j = !1, s.k = !1, s.n = !1, s.o = 0, s.q = 0, s.r = 0, w(dc, "BasicProgressMonitor", 370), b(972, 209, La, A2n), s.Ze = function(e, t) { + var i, r, c, o, f, h, l, a, d; + switch (le(t, "Box layout", 2), c = x9(Y(hn(e, (nM(), RZn)))), o = u(hn(e, BZn), 116), i = on(sn(hn(e, Kfn))), r = on(sn(hn(e, Hfn))), u(hn(e, qK), 311).g) { + case 0: + f = (h = new au((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)), Pn(), wi(h, new H6n(r)), h), l = sY(e), a = Y(hn(e, _fn)), (a == null || (_n(a), a <= 0)) && (a = 1.3), d = KCe(f, c, o, l.a, l.b, i, (_n(a), a)), i0(e, d.a, d.b, !1, !0); + break; + default: + Nje(e, c, o, i); + } + ce(t); + }, w(dc, "BoxLayoutProvider", 972), b(973, 1, at, H6n), s.ue = function(e, t) { + return c8e(this, u(e, 33), u(t, 33)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, s.a = !1, w(dc, "BoxLayoutProvider/1", 973), b(157, 1, { 157: 1 }, zC, hjn), s.Ib = function() { + return this.c ? uZ(this.c) : kl(this.b); + }, w(dc, "BoxLayoutProvider/Group", 157), b(311, 22, { 3: 1, 35: 1, 22: 1, 311: 1 }, Qj); + var Whn, Xhn, Vhn, oH, Qhn = Me(dc, "BoxLayoutProvider/PackingMode", 311, Ie, $ae, Boe), kne; + b(974, 1, at, S2n), s.ue = function(e, t) { + return o1e(u(e, 157), u(t, 157)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(dc, "BoxLayoutProvider/lambda$0$Type", 974), b(975, 1, at, P2n), s.ue = function(e, t) { + return e1e(u(e, 157), u(t, 157)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(dc, "BoxLayoutProvider/lambda$1$Type", 975), b(976, 1, at, I2n), s.ue = function(e, t) { + return t1e(u(e, 157), u(t, 157)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(dc, "BoxLayoutProvider/lambda$2$Type", 976), b(1365, 1, { 831: 1 }, O2n), s.qg = function(e, t) { + return Oj(), !I(t, 160) || k8n((L2(), u(e, 160)), t); + }, w(dc, "ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type", 1365), b(1366, 1, Yn, q6n), s.td = function(e) { + Uwe(this.a, u(e, 146)); + }, w(dc, "ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type", 1366), b(1367, 1, Yn, M2n), s.td = function(e) { + u(e, 94), Oj(); + }, w(dc, "ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type", 1367), b(1371, 1, Yn, G6n), s.td = function(e) { + pbe(this.a, u(e, 94)); + }, w(dc, "ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type", 1371), b(1369, 1, Ve, ukn), s.Mb = function(e) { + return Dwe(this.a, this.b, u(e, 146)); + }, w(dc, "ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type", 1369), b(1368, 1, Ve, skn), s.Mb = function(e) { + return Vce(this.a, this.b, u(e, 831)); + }, w(dc, "ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type", 1368), b(1370, 1, Yn, okn), s.td = function(e) { + Vfe(this.a, this.b, u(e, 146)); + }, w(dc, "ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type", 1370), b(935, 1, {}, C2n), s.Kb = function(e) { + return oyn(e); + }, s.Fb = function(e) { + return this === e; + }, w(dc, "ElkUtil/lambda$0$Type", 935), b(936, 1, Yn, fkn), s.td = function(e) { + sme(this.a, this.b, u(e, 79)); + }, s.a = 0, s.b = 0, w(dc, "ElkUtil/lambda$1$Type", 936), b(937, 1, Yn, hkn), s.td = function(e) { + sie(this.a, this.b, u(e, 202)); + }, s.a = 0, s.b = 0, w(dc, "ElkUtil/lambda$2$Type", 937), b(938, 1, Yn, lkn), s.td = function(e) { + Yre(this.a, this.b, u(e, 137)); + }, s.a = 0, s.b = 0, w(dc, "ElkUtil/lambda$3$Type", 938), b(939, 1, Yn, z6n), s.td = function(e) { + lfe(this.a, u(e, 469)); + }, w(dc, "ElkUtil/lambda$4$Type", 939), b(342, 1, { 35: 1, 342: 1 }, Nte), s.wd = function(e) { + return Mce(this, u(e, 236)); + }, s.Fb = function(e) { + var t; + return I(e, 342) ? (t = u(e, 342), this.a == t.a) : !1; + }, s.Hb = function() { + return Gt(this.a); + }, s.Ib = function() { + return this.a + " (exclusive)"; + }, s.a = 0, w(dc, "ExclusiveBounds/ExclusiveLowerBound", 342), b(1138, 209, La, T2n), s.Ze = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $, O, x, _, U, en, ln, wn; + for (le(t, "Fixed Layout", 1), o = u(hn(e, (Xe(), Jfn)), 218), g = 0, p = 0, O = new ie((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); O.e != O.i.gc(); ) { + for (S = u(oe(O), 33), wn = u(hn(S, (wT(), t9)), 8), wn && (Jo(S, wn.a, wn.b), u(hn(S, Nhn), 174).Hc((Qu(), sw)) && (v = u(hn(S, Rhn), 8), v.a > 0 && v.b > 0 && i0(S, v.a, v.b, !0, !0))), g = j.Math.max(g, S.i + S.g), p = j.Math.max(p, S.j + S.f), a = new ie((!S.n && (S.n = new V(Rr, S, 1, 7)), S.n)); a.e != a.i.gc(); ) + h = u(oe(a), 137), wn = u(hn(h, t9), 8), wn && Jo(h, wn.a, wn.b), g = j.Math.max(g, S.i + h.i + h.g), p = j.Math.max(p, S.j + h.j + h.f); + for (U = new ie((!S.c && (S.c = new V(Ru, S, 9, 9)), S.c)); U.e != U.i.gc(); ) + for (_ = u(oe(U), 118), wn = u(hn(_, t9), 8), wn && Jo(_, wn.a, wn.b), en = S.i + _.i, ln = S.j + _.j, g = j.Math.max(g, en + _.g), p = j.Math.max(p, ln + _.f), l = new ie((!_.n && (_.n = new V(Rr, _, 1, 7)), _.n)); l.e != l.i.gc(); ) + h = u(oe(l), 137), wn = u(hn(h, t9), 8), wn && Jo(h, wn.a, wn.b), g = j.Math.max(g, en + h.i + h.g), p = j.Math.max(p, ln + h.j + h.f); + for (c = new re(ue(Gh(S).a.Kc(), new Mn())); Se(c); ) + i = u(ve(c), 79), d = y_n(i), g = j.Math.max(g, d.a), p = j.Math.max(p, d.b); + for (r = new re(ue(N7(S).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 79), Pt(fh(i)) != e && (d = y_n(i), g = j.Math.max(g, d.a), p = j.Math.max(p, d.b)); + } + if (o == (Hh(), Ev)) + for ($ = new ie((!e.a && (e.a = new V(Ot, e, 10, 11)), e.a)); $.e != $.i.gc(); ) + for (S = u(oe($), 33), r = new re(ue(Gh(S).a.Kc(), new Mn())); Se(r); ) + i = u(ve(r), 79), f = rye(i), f.b == 0 ? pr(i, Rg, null) : pr(i, Rg, f); + on(sn(hn(e, (wT(), Bhn)))) || (x = u(hn(e, cne), 116), C = g + x.b + x.c, m = p + x.d + x.a, i0(e, C, m, !0, !0)), ce(t); + }, w(dc, "FixedLayoutProvider", 1138), b(373, 134, { 3: 1, 414: 1, 373: 1, 94: 1, 134: 1 }, jI, BPn), s.Jf = function(e) { + var t, i, r, c, o, f, h, l, a; + if (e) + try { + for (l = Mb(e, ";,;"), o = l, f = 0, h = o.length; f < h; ++f) { + if (c = o[f], i = Mb(c, "\\:"), r = $Z(L3(), i[0]), !r) + throw T(new Hn("Invalid option id: " + i[0])); + if (a = OZ(r, i[1]), a == null) + throw T(new Hn("Invalid option value: " + i[1])); + a == null ? (!this.q && (this.q = new we()), O2(this.q, r)) : (!this.q && (this.q = new we()), it(this.q, r, a)); + } + } catch (d) { + throw d = Et(d), I(d, 102) ? (t = d, T(new gDn(t))) : T(d); + } + }, s.Ib = function() { + var e; + return e = Ce(ts(Xc((this.q ? this.q : (Pn(), Pn(), ph)).vc().Oc(), new F2n()), ub(new AEn(), new gln(), new dln(), new bln(), A(M(Nu, 1), z, 132, 0, [])))), e; + }; + var yne = w(dc, "IndividualSpacings", 373); + b(971, 1, {}, F2n), s.Kb = function(e) { + return f1e(u(e, 42)); + }, w(dc, "IndividualSpacings/lambda$0$Type", 971), b(709, 1, {}, cCn), s.c = 0, w(dc, "InstancePool", 709), b(1275, 1, {}, x2n), w(dc, "LoggedGraph", 1275), b(396, 22, { 3: 1, 35: 1, 22: 1, 396: 1 }, Jj); + var Jhn, gs, Yhn, Zhn, jne = Me(dc, "LoggedGraph/Type", 396, Ie, Fae, Roe), Ene; + b(46, 1, { 20: 1, 46: 1 }, Pi), s.Jc = function(e) { + $i(this, e); + }, s.Fb = function(e) { + var t, i, r; + return I(e, 46) ? (i = u(e, 46), t = this.a == null ? i.a == null : tt(this.a, i.a), r = this.b == null ? i.b == null : tt(this.b, i.b), t && r) : !1; + }, s.Hb = function() { + var e, t, i, r, c, o; + return i = this.a == null ? 0 : kt(this.a), e = i & Ut, t = i & -65536, o = this.b == null ? 0 : kt(this.b), r = o & Ut, c = o & -65536, e ^ c >> 16 & Ut | t ^ r << 16; + }, s.Kc = function() { + return new U6n(this); + }, s.Ib = function() { + return this.a == null && this.b == null ? "pair(null,null)" : this.a == null ? "pair(null," + Nr(this.b) + ")" : this.b == null ? "pair(" + Nr(this.a) + ",null)" : "pair(" + Nr(this.a) + "," + Nr(this.b) + ")"; + }, w(dc, "Pair", 46), b(983, 1, Ei, U6n), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return !this.c && (!this.b && this.a.a != null || this.a.b != null); + }, s.Pb = function() { + if (!this.c && !this.b && this.a.a != null) + return this.b = !0, this.a.a; + if (!this.c && this.a.b != null) + return this.c = !0, this.a.b; + throw T(new ic()); + }, s.Qb = function() { + throw this.c && this.a.b != null ? this.a.b = null : this.b && this.a.a != null && (this.a.a = null), T(new ou()); + }, s.b = !1, s.c = !1, w(dc, "Pair/1", 983), b(448, 1, { 448: 1 }, jTn), s.Fb = function(e) { + return vc(this.a, u(e, 448).a) && vc(this.c, u(e, 448).c) && vc(this.d, u(e, 448).d) && vc(this.b, u(e, 448).b); + }, s.Hb = function() { + return gT(A(M(Zn, 1), rn, 1, 5, [this.a, this.c, this.d, this.b])); + }, s.Ib = function() { + return "(" + this.a + Qi + this.c + Qi + this.d + Qi + this.b + ")"; + }, w(dc, "Quadruple", 448), b(1126, 209, La, L2n), s.Ze = function(e, t) { + var i, r, c, o, f; + if (le(t, "Random Layout", 1), (!e.a && (e.a = new V(Ot, e, 10, 11)), e.a).i == 0) { + ce(t); + return; + } + o = u(hn(e, (NQ(), gne)), 19), o && o.a != 0 ? c = new EC(o.a) : c = new OF(), i = x9(Y(hn(e, bne))), f = x9(Y(hn(e, pne))), r = u(hn(e, wne), 116), vCe(e, c, i, f, r), ce(t); + }, w(dc, "RandomLayoutProvider", 1126); + var Cne; + b(553, 1, {}), s.qf = function() { + return new fn(this.f.i, this.f.j); + }, s.We = function(e) { + return XTn(e, (Xe(), Bu)) ? hn(this.f, Tne) : hn(this.f, e); + }, s.rf = function() { + return new fn(this.f.g, this.f.f); + }, s.sf = function() { + return this.g; + }, s.Xe = function(e) { + return ga(this.f, e); + }, s.tf = function(e) { + Zc(this.f, e.a), nu(this.f, e.b); + }, s.uf = function(e) { + _d(this.f, e.a), Rd(this.f, e.b); + }, s.vf = function(e) { + this.g = e; + }, s.g = 0; + var Tne; + w(nm, "ElkGraphAdapters/AbstractElkGraphElementAdapter", 553), b(554, 1, { 839: 1 }, cj), s.wf = function() { + var e, t; + if (!this.b) + for (this.b = mC(JE(this.a).i), t = new ie(JE(this.a)); t.e != t.i.gc(); ) + e = u(oe(t), 137), W(this.b, new XI(e)); + return this.b; + }, s.b = null, w(nm, "ElkGraphAdapters/ElkEdgeAdapter", 554), b(301, 553, {}, B0), s.xf = function() { + return jFn(this); + }, s.a = null, w(nm, "ElkGraphAdapters/ElkGraphAdapter", 301), b(630, 553, { 181: 1 }, XI), w(nm, "ElkGraphAdapters/ElkLabelAdapter", 630), b(629, 553, { 680: 1 }, WO), s.wf = function() { + return k3e(this); + }, s.Af = function() { + var e; + return e = u(hn(this.f, (Xe(), my)), 142), !e && (e = new Bv()), e; + }, s.Cf = function() { + return y3e(this); + }, s.Ef = function(e) { + var t; + t = new oD(e), pr(this.f, (Xe(), my), t); + }, s.Ff = function(e) { + pr(this.f, (Xe(), ed), new DU(e)); + }, s.yf = function() { + return this.d; + }, s.zf = function() { + var e, t; + if (!this.a) + for (this.a = new X(), t = new re(ue(N7(u(this.f, 33)).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 79), W(this.a, new cj(e)); + return this.a; + }, s.Bf = function() { + var e, t; + if (!this.c) + for (this.c = new X(), t = new re(ue(Gh(u(this.f, 33)).a.Kc(), new Mn())); Se(t); ) + e = u(ve(t), 79), W(this.c, new cj(e)); + return this.c; + }, s.Df = function() { + return iC(u(this.f, 33)).i != 0 || on(sn(u(this.f, 33).We((Xe(), vy)))); + }, s.Gf = function() { + l0e(this, (H0(), Cne)); + }, s.a = null, s.b = null, s.c = null, s.d = null, s.e = null, w(nm, "ElkGraphAdapters/ElkNodeAdapter", 629), b(1266, 553, { 838: 1 }, ymn), s.wf = function() { + return P3e(this); + }, s.zf = function() { + var e, t; + if (!this.a) + for (this.a = nh(u(this.f, 118).xg().i), t = new ie(u(this.f, 118).xg()); t.e != t.i.gc(); ) + e = u(oe(t), 79), W(this.a, new cj(e)); + return this.a; + }, s.Bf = function() { + var e, t; + if (!this.c) + for (this.c = nh(u(this.f, 118).yg().i), t = new ie(u(this.f, 118).yg()); t.e != t.i.gc(); ) + e = u(oe(t), 79), W(this.c, new cj(e)); + return this.c; + }, s.Hf = function() { + return u(u(this.f, 118).We((Xe(), Hg)), 61); + }, s.If = function() { + var e, t, i, r, c, o, f, h; + for (r = nf(u(this.f, 118)), i = new ie(u(this.f, 118).yg()); i.e != i.i.gc(); ) + for (e = u(oe(i), 79), h = new ie((!e.c && (e.c = new Fn(he, e, 5, 8)), e.c)); h.e != h.i.gc(); ) { + if (f = u(oe(h), 82), fb(Ir(f), r)) + return !0; + if (Ir(f) == r && on(sn(hn(e, (Xe(), VK))))) + return !0; + } + for (t = new ie(u(this.f, 118).xg()); t.e != t.i.gc(); ) + for (e = u(oe(t), 79), o = new ie((!e.b && (e.b = new Fn(he, e, 4, 7)), e.b)); o.e != o.i.gc(); ) + if (c = u(oe(o), 82), fb(Ir(c), r)) + return !0; + return !1; + }, s.a = null, s.b = null, s.c = null, w(nm, "ElkGraphAdapters/ElkPortAdapter", 1266), b(1267, 1, at, N2n), s.ue = function(e, t) { + return J7e(u(e, 118), u(t, 118)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(nm, "ElkGraphAdapters/PortComparator", 1267); + var zl = Ct(Is, "EObject"), Mv = Ct(bg, fqn), io = Ct(bg, hqn), Iy = Ct(bg, lqn), Oy = Ct(bg, "ElkShape"), he = Ct(bg, aqn), bi = Ct(bg, Atn), Mt = Ct(bg, dqn), Dy = Ct(Is, bqn), h9 = Ct(Is, "EFactory"), Mne, fH = Ct(Is, wqn), Vo = Ct(Is, "EPackage"), mi, Ane, Sne, n1n, XP, Pne, e1n, t1n, i1n, Ul, Ine, One, Rr = Ct(bg, Stn), Ot = Ct(bg, Ptn), Ru = Ct(bg, Itn); + b(90, 1, gqn), s.Jg = function() { + return this.Kg(), null; + }, s.Kg = function() { + return null; + }, s.Lg = function() { + return this.Kg(), !1; + }, s.Mg = function() { + return !1; + }, s.Ng = function(e) { + et(this, e); + }, w(sp, "BasicNotifierImpl", 90), b(97, 90, kqn), s.nh = function() { + return qu(this); + }, s.Og = function(e, t) { + return e; + }, s.Pg = function() { + throw T(new ye()); + }, s.Qg = function(e) { + var t; + return t = ir(u(On(this.Tg(), this.Vg()), 18)), this.eh().ih(this, t.n, t.f, e); + }, s.Rg = function(e, t) { + throw T(new ye()); + }, s.Sg = function(e, t, i) { + return os(this, e, t, i); + }, s.Tg = function() { + var e; + return this.Pg() && (e = this.Pg().ck(), e) ? e : this.zh(); + }, s.Ug = function() { + return Fx(this); + }, s.Vg = function() { + throw T(new ye()); + }, s.Wg = function() { + var e, t; + return t = this.ph().dk(), !t && this.Pg().ik(t = (Zv(), e = VW(Lf(this.Tg())), e == null ? pH : new c8(this, e))), t; + }, s.Xg = function(e, t) { + return e; + }, s.Yg = function(e) { + var t; + return t = e.Gj(), t ? e.aj() : jt(this.Tg(), e); + }, s.Zg = function() { + var e; + return e = this.Pg(), e ? e.fk() : null; + }, s.$g = function() { + return this.Pg() ? this.Pg().ck() : null; + }, s._g = function(e, t, i) { + return BT(this, e, t, i); + }, s.ah = function(e) { + return M3(this, e); + }, s.bh = function(e, t) { + return T$(this, e, t); + }, s.dh = function() { + var e; + return e = this.Pg(), !!e && e.gk(); + }, s.eh = function() { + throw T(new ye()); + }, s.fh = function() { + return OT(this); + }, s.gh = function(e, t, i, r) { + return _2(this, e, t, r); + }, s.hh = function(e, t, i) { + var r; + return r = u(On(this.Tg(), t), 66), r.Nj().Qj(this, this.yh(), t - this.Ah(), e, i); + }, s.ih = function(e, t, i, r) { + return sC(this, e, t, r); + }, s.jh = function(e, t, i) { + var r; + return r = u(On(this.Tg(), t), 66), r.Nj().Rj(this, this.yh(), t - this.Ah(), e, i); + }, s.kh = function() { + return !!this.Pg() && !!this.Pg().ek(); + }, s.lh = function(e) { + return zF(this, e); + }, s.mh = function(e) { + return lMn(this, e); + }, s.oh = function(e) { + return LRn(this, e); + }, s.ph = function() { + throw T(new ye()); + }, s.qh = function() { + return this.Pg() ? this.Pg().ek() : null; + }, s.rh = function() { + return OT(this); + }, s.sh = function(e, t) { + Px(this, e, t); + }, s.th = function(e) { + this.ph().hk(e); + }, s.uh = function(e) { + this.ph().kk(e); + }, s.vh = function(e) { + this.ph().jk(e); + }, s.wh = function(e, t) { + var i, r, c, o; + return o = this.Zg(), o && e && (t = Gi(o.Vk(), this, t), o.Zk(this)), r = this.eh(), r && (Qx(this, this.eh(), this.Vg()).Bb & Ji ? (c = r.fh(), c && (e ? !o && c.Zk(this) : c.Yk(this))) : (t = (i = this.Vg(), i >= 0 ? this.Qg(t) : this.eh().ih(this, -1 - i, null, t)), t = this.Sg(null, -1, t))), this.uh(e), t; + }, s.xh = function(e) { + var t, i, r, c, o, f, h, l; + if (i = this.Tg(), o = jt(i, e), t = this.Ah(), o >= t) + return u(e, 66).Nj().Uj(this, this.yh(), o - t); + if (o <= -1) + if (f = rg((wu(), xi), i, e), f) { + if (er(), u(f, 66).Oj() || (f = A2(Er(xi, f))), c = (r = this.Yg(f), u(r >= 0 ? this._g(r, !0, !0) : Zd(this, f, !0), 153)), l = f.Zj(), l > 1 || l == -1) + return u(u(c, 215).hl(e, !1), 76); + } else + throw T(new Hn(Pl + e.ne() + MB)); + else if (e.$j()) + return r = this.Yg(e), u(r >= 0 ? this._g(r, !1, !0) : Zd(this, e, !1), 76); + return h = new Okn(this, e), h; + }, s.yh = function() { + return QX(this); + }, s.zh = function() { + return (ol(), Nn).S; + }, s.Ah = function() { + return ee(this.zh()); + }, s.Bh = function(e) { + Cx(this, e); + }, s.Ib = function() { + return yo(this); + }, w(Bn, "BasicEObjectImpl", 97); + var Dne; + b(114, 97, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1 }), s.Ch = function(e) { + var t; + return t = JX(this), t[e]; + }, s.Dh = function(e, t) { + var i; + i = JX(this), St(i, e, t); + }, s.Eh = function(e) { + var t; + t = JX(this), St(t, e, null); + }, s.Jg = function() { + return u(Rn(this, 4), 126); + }, s.Kg = function() { + throw T(new ye()); + }, s.Lg = function() { + return (this.Db & 4) != 0; + }, s.Pg = function() { + throw T(new ye()); + }, s.Fh = function(e) { + R2(this, 2, e); + }, s.Rg = function(e, t) { + this.Db = t << 16 | this.Db & 255, this.Fh(e); + }, s.Tg = function() { + return Vc(this); + }, s.Vg = function() { + return this.Db >> 16; + }, s.Wg = function() { + var e, t; + return Zv(), t = VW(Lf((e = u(Rn(this, 16), 26), e || this.zh()))), t == null ? pH : new c8(this, t); + }, s.Mg = function() { + return (this.Db & 1) == 0; + }, s.Zg = function() { + return u(Rn(this, 128), 1935); + }, s.$g = function() { + return u(Rn(this, 16), 26); + }, s.dh = function() { + return (this.Db & 32) != 0; + }, s.eh = function() { + return u(Rn(this, 2), 49); + }, s.kh = function() { + return (this.Db & 64) != 0; + }, s.ph = function() { + throw T(new ye()); + }, s.qh = function() { + return u(Rn(this, 64), 281); + }, s.th = function(e) { + R2(this, 16, e); + }, s.uh = function(e) { + R2(this, 128, e); + }, s.vh = function(e) { + R2(this, 64, e); + }, s.yh = function() { + return Bc(this); + }, s.Db = 0, w(Bn, "MinimalEObjectImpl", 114), b(115, 114, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }), s.Fh = function(e) { + this.Cb = e; + }, s.eh = function() { + return this.Cb; + }, w(Bn, "MinimalEObjectImpl/Container", 115), b(1985, 115, { 105: 1, 413: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }), s._g = function(e, t, i) { + return oJ(this, e, t, i); + }, s.jh = function(e, t, i) { + return QJ(this, e, t, i); + }, s.lh = function(e) { + return sX(this, e); + }, s.sh = function(e, t) { + WV(this, e, t); + }, s.zh = function() { + return $c(), One; + }, s.Bh = function(e) { + LV(this, e); + }, s.Ve = function() { + return q$n(this); + }, s.We = function(e) { + return hn(this, e); + }, s.Xe = function(e) { + return ga(this, e); + }, s.Ye = function(e, t) { + return pr(this, e, t); + }, w(Ra, "EMapPropertyHolderImpl", 1985), b(567, 115, { 105: 1, 469: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Xy), s._g = function(e, t, i) { + switch (e) { + case 0: + return this.a; + case 1: + return this.b; + } + return BT(this, e, t, i); + }, s.lh = function(e) { + switch (e) { + case 0: + return this.a != 0; + case 1: + return this.b != 0; + } + return zF(this, e); + }, s.sh = function(e, t) { + switch (e) { + case 0: + UC(this, K(Y(t))); + return; + case 1: + WC(this, K(Y(t))); + return; + } + Px(this, e, t); + }, s.zh = function() { + return $c(), Ane; + }, s.Bh = function(e) { + switch (e) { + case 0: + UC(this, 0); + return; + case 1: + WC(this, 0); + return; + } + Cx(this, e); + }, s.Ib = function() { + var e; + return this.Db & 64 ? yo(this) : (e = new Bs(yo(this)), e.a += " (x: ", mw(e, this.a), e.a += ", y: ", mw(e, this.b), e.a += ")", e.a); + }, s.a = 0, s.b = 0, w(Ra, "ElkBendPointImpl", 567), b(723, 1985, { 105: 1, 413: 1, 160: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }), s._g = function(e, t, i) { + return aQ(this, e, t, i); + }, s.hh = function(e, t, i) { + return vx(this, e, t, i); + }, s.jh = function(e, t, i) { + return tF(this, e, t, i); + }, s.lh = function(e) { + return SV(this, e); + }, s.sh = function(e, t) { + AJ(this, e, t); + }, s.zh = function() { + return $c(), Pne; + }, s.Bh = function(e) { + oQ(this, e); + }, s.zg = function() { + return this.k; + }, s.Ag = function() { + return JE(this); + }, s.Ib = function() { + return PF(this); + }, s.k = null, w(Ra, "ElkGraphElementImpl", 723), b(724, 723, { 105: 1, 413: 1, 160: 1, 470: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }), s._g = function(e, t, i) { + return jQ(this, e, t, i); + }, s.lh = function(e) { + return PQ(this, e); + }, s.sh = function(e, t) { + SJ(this, e, t); + }, s.zh = function() { + return $c(), Ine; + }, s.Bh = function(e) { + FQ(this, e); + }, s.Bg = function() { + return this.f; + }, s.Cg = function() { + return this.g; + }, s.Dg = function() { + return this.i; + }, s.Eg = function() { + return this.j; + }, s.Fg = function(e, t) { + rE(this, e, t); + }, s.Gg = function(e, t) { + Jo(this, e, t); + }, s.Hg = function(e) { + Zc(this, e); + }, s.Ig = function(e) { + nu(this, e); + }, s.Ib = function() { + return Ex(this); + }, s.f = 0, s.g = 0, s.i = 0, s.j = 0, w(Ra, "ElkShapeImpl", 724), b(725, 724, { 105: 1, 413: 1, 82: 1, 160: 1, 470: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }), s._g = function(e, t, i) { + return tJ(this, e, t, i); + }, s.hh = function(e, t, i) { + return yJ(this, e, t, i); + }, s.jh = function(e, t, i) { + return jJ(this, e, t, i); + }, s.lh = function(e) { + return zV(this, e); + }, s.sh = function(e, t) { + OY(this, e, t); + }, s.zh = function() { + return $c(), Sne; + }, s.Bh = function(e) { + XQ(this, e); + }, s.xg = function() { + return !this.d && (this.d = new Fn(bi, this, 8, 5)), this.d; + }, s.yg = function() { + return !this.e && (this.e = new Fn(bi, this, 7, 4)), this.e; + }, w(Ra, "ElkConnectableShapeImpl", 725), b(352, 723, { 105: 1, 413: 1, 79: 1, 160: 1, 352: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, VH), s.Qg = function(e) { + return pJ(this, e); + }, s._g = function(e, t, i) { + switch (e) { + case 3: + return S8(this); + case 4: + return !this.b && (this.b = new Fn(he, this, 4, 7)), this.b; + case 5: + return !this.c && (this.c = new Fn(he, this, 5, 8)), this.c; + case 6: + return !this.a && (this.a = new V(Mt, this, 6, 6)), this.a; + case 7: + return qn(), !this.b && (this.b = new Fn(he, this, 4, 7)), !(this.b.i <= 1 && (!this.c && (this.c = new Fn(he, this, 5, 8)), this.c.i <= 1)); + case 8: + return qn(), !!j6(this); + case 9: + return qn(), !!Yd(this); + case 10: + return qn(), !this.b && (this.b = new Fn(he, this, 4, 7)), this.b.i != 0 && (!this.c && (this.c = new Fn(he, this, 5, 8)), this.c.i != 0); + } + return aQ(this, e, t, i); + }, s.hh = function(e, t, i) { + var r; + switch (t) { + case 3: + return this.Cb && (i = (r = this.Db >> 16, r >= 0 ? pJ(this, i) : this.Cb.ih(this, -1 - r, null, i))), hU(this, u(e, 33), i); + case 4: + return !this.b && (this.b = new Fn(he, this, 4, 7)), Dc(this.b, e, i); + case 5: + return !this.c && (this.c = new Fn(he, this, 5, 8)), Dc(this.c, e, i); + case 6: + return !this.a && (this.a = new V(Mt, this, 6, 6)), Dc(this.a, e, i); + } + return vx(this, e, t, i); + }, s.jh = function(e, t, i) { + switch (t) { + case 3: + return hU(this, null, i); + case 4: + return !this.b && (this.b = new Fn(he, this, 4, 7)), Gi(this.b, e, i); + case 5: + return !this.c && (this.c = new Fn(he, this, 5, 8)), Gi(this.c, e, i); + case 6: + return !this.a && (this.a = new V(Mt, this, 6, 6)), Gi(this.a, e, i); + } + return tF(this, e, t, i); + }, s.lh = function(e) { + switch (e) { + case 3: + return !!S8(this); + case 4: + return !!this.b && this.b.i != 0; + case 5: + return !!this.c && this.c.i != 0; + case 6: + return !!this.a && this.a.i != 0; + case 7: + return !this.b && (this.b = new Fn(he, this, 4, 7)), !(this.b.i <= 1 && (!this.c && (this.c = new Fn(he, this, 5, 8)), this.c.i <= 1)); + case 8: + return j6(this); + case 9: + return Yd(this); + case 10: + return !this.b && (this.b = new Fn(he, this, 4, 7)), this.b.i != 0 && (!this.c && (this.c = new Fn(he, this, 5, 8)), this.c.i != 0); + } + return SV(this, e); + }, s.sh = function(e, t) { + switch (e) { + case 3: + _x(this, u(t, 33)); + return; + case 4: + !this.b && (this.b = new Fn(he, this, 4, 7)), de(this.b), !this.b && (this.b = new Fn(he, this, 4, 7)), Ft(this.b, u(t, 14)); + return; + case 5: + !this.c && (this.c = new Fn(he, this, 5, 8)), de(this.c), !this.c && (this.c = new Fn(he, this, 5, 8)), Ft(this.c, u(t, 14)); + return; + case 6: + !this.a && (this.a = new V(Mt, this, 6, 6)), de(this.a), !this.a && (this.a = new V(Mt, this, 6, 6)), Ft(this.a, u(t, 14)); + return; + } + AJ(this, e, t); + }, s.zh = function() { + return $c(), n1n; + }, s.Bh = function(e) { + switch (e) { + case 3: + _x(this, null); + return; + case 4: + !this.b && (this.b = new Fn(he, this, 4, 7)), de(this.b); + return; + case 5: + !this.c && (this.c = new Fn(he, this, 5, 8)), de(this.c); + return; + case 6: + !this.a && (this.a = new V(Mt, this, 6, 6)), de(this.a); + return; + } + oQ(this, e); + }, s.Ib = function() { + return yRn(this); + }, w(Ra, "ElkEdgeImpl", 352), b(439, 1985, { 105: 1, 413: 1, 202: 1, 439: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Vy), s.Qg = function(e) { + return dJ(this, e); + }, s._g = function(e, t, i) { + switch (e) { + case 1: + return this.j; + case 2: + return this.k; + case 3: + return this.b; + case 4: + return this.c; + case 5: + return !this.a && (this.a = new Yt(io, this, 5)), this.a; + case 6: + return oMn(this); + case 7: + return t ? QF(this) : this.i; + case 8: + return t ? VF(this) : this.f; + case 9: + return !this.g && (this.g = new Fn(Mt, this, 9, 10)), this.g; + case 10: + return !this.e && (this.e = new Fn(Mt, this, 10, 9)), this.e; + case 11: + return this.d; + } + return oJ(this, e, t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 6: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? dJ(this, i) : this.Cb.ih(this, -1 - c, null, i))), lU(this, u(e, 79), i); + case 9: + return !this.g && (this.g = new Fn(Mt, this, 9, 10)), Dc(this.g, e, i); + case 10: + return !this.e && (this.e = new Fn(Mt, this, 10, 9)), Dc(this.e, e, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || ($c(), XP)), t), 66), o.Nj().Qj(this, Bc(this), t - ee(($c(), XP)), e, i); + }, s.jh = function(e, t, i) { + switch (t) { + case 5: + return !this.a && (this.a = new Yt(io, this, 5)), Gi(this.a, e, i); + case 6: + return lU(this, null, i); + case 9: + return !this.g && (this.g = new Fn(Mt, this, 9, 10)), Gi(this.g, e, i); + case 10: + return !this.e && (this.e = new Fn(Mt, this, 10, 9)), Gi(this.e, e, i); + } + return QJ(this, e, t, i); + }, s.lh = function(e) { + switch (e) { + case 1: + return this.j != 0; + case 2: + return this.k != 0; + case 3: + return this.b != 0; + case 4: + return this.c != 0; + case 5: + return !!this.a && this.a.i != 0; + case 6: + return !!oMn(this); + case 7: + return !!this.i; + case 8: + return !!this.f; + case 9: + return !!this.g && this.g.i != 0; + case 10: + return !!this.e && this.e.i != 0; + case 11: + return this.d != null; + } + return sX(this, e); + }, s.sh = function(e, t) { + switch (e) { + case 1: + D3(this, K(Y(t))); + return; + case 2: + F3(this, K(Y(t))); + return; + case 3: + O3(this, K(Y(t))); + return; + case 4: + $3(this, K(Y(t))); + return; + case 5: + !this.a && (this.a = new Yt(io, this, 5)), de(this.a), !this.a && (this.a = new Yt(io, this, 5)), Ft(this.a, u(t, 14)); + return; + case 6: + jNn(this, u(t, 79)); + return; + case 7: + YC(this, u(t, 82)); + return; + case 8: + JC(this, u(t, 82)); + return; + case 9: + !this.g && (this.g = new Fn(Mt, this, 9, 10)), de(this.g), !this.g && (this.g = new Fn(Mt, this, 9, 10)), Ft(this.g, u(t, 14)); + return; + case 10: + !this.e && (this.e = new Fn(Mt, this, 10, 9)), de(this.e), !this.e && (this.e = new Fn(Mt, this, 10, 9)), Ft(this.e, u(t, 14)); + return; + case 11: + mV(this, Ce(t)); + return; + } + WV(this, e, t); + }, s.zh = function() { + return $c(), XP; + }, s.Bh = function(e) { + switch (e) { + case 1: + D3(this, 0); + return; + case 2: + F3(this, 0); + return; + case 3: + O3(this, 0); + return; + case 4: + $3(this, 0); + return; + case 5: + !this.a && (this.a = new Yt(io, this, 5)), de(this.a); + return; + case 6: + jNn(this, null); + return; + case 7: + YC(this, null); + return; + case 8: + JC(this, null); + return; + case 9: + !this.g && (this.g = new Fn(Mt, this, 9, 10)), de(this.g); + return; + case 10: + !this.e && (this.e = new Fn(Mt, this, 10, 9)), de(this.e); + return; + case 11: + mV(this, null); + return; + } + LV(this, e); + }, s.Ib = function() { + return _Ln(this); + }, s.b = 0, s.c = 0, s.d = null, s.j = 0, s.k = 0, w(Ra, "ElkEdgeSectionImpl", 439), b(150, 115, { 105: 1, 92: 1, 90: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }), s._g = function(e, t, i) { + var r; + return e == 0 ? (!this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab) : Cs(this, e - ee(this.zh()), On((r = u(Rn(this, 16), 26), r || this.zh()), e), t, i); + }, s.hh = function(e, t, i) { + var r, c; + return t == 0 ? (!this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i)) : (c = u(On((r = u(Rn(this, 16), 26), r || this.zh()), t), 66), c.Nj().Qj(this, Bc(this), t - ee(this.zh()), e, i)); + }, s.jh = function(e, t, i) { + var r, c; + return t == 0 ? (!this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i)) : (c = u(On((r = u(Rn(this, 16), 26), r || this.zh()), t), 66), c.Nj().Rj(this, Bc(this), t - ee(this.zh()), e, i)); + }, s.lh = function(e) { + var t; + return e == 0 ? !!this.Ab && this.Ab.i != 0 : js(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.oh = function(e) { + return RZ(this, e); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + } + Ps(this, e - ee(this.zh()), On((i = u(Rn(this, 16), 26), i || this.zh()), e), t); + }, s.uh = function(e) { + R2(this, 128, e); + }, s.zh = function() { + return Sn(), Qne; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + } + As(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.Gh = function() { + this.Bb |= 1; + }, s.Hh = function(e) { + return A6(this, e); + }, s.Bb = 0, w(Bn, "EModelElementImpl", 150), b(704, 150, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, eq), s.Ih = function(e, t) { + return JRn(this, e, t); + }, s.Jh = function(e) { + var t, i, r, c, o; + if (this.a != is(e) || e.Bb & 256) + throw T(new Hn(SB + e.zb + l0)); + for (r = Ar(e); wc(r.a).i != 0; ) { + if (i = u(X7(r, 0, (t = u(D(wc(r.a), 0), 87), o = t.c, I(o, 88) ? u(o, 26) : (Sn(), so))), 26), Jd(i)) + return c = is(i).Nh().Jh(i), u(c, 49).th(e), c; + r = Ar(i); + } + return (e.D != null ? e.D : e.B) == "java.util.Map$Entry" ? new UEn(e) : new JU(e); + }, s.Kh = function(e, t) { + return r0(this, e, t); + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.a; + } + return Cs(this, e - ee((Sn(), Ql)), On((r = u(Rn(this, 16), 26), r || Ql), e), t, i); + }, s.hh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 1: + return this.a && (i = u(this.a, 49).ih(this, 4, Vo, i)), uQ(this, u(e, 235), i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), Ql)), t), 66), c.Nj().Qj(this, Bc(this), t - ee((Sn(), Ql)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 1: + return uQ(this, null, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), Ql)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), Ql)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return !!this.a; + } + return js(this, e - ee((Sn(), Ql)), On((t = u(Rn(this, 16), 26), t || Ql), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + jxn(this, u(t, 235)); + return; + } + Ps(this, e - ee((Sn(), Ql)), On((i = u(Rn(this, 16), 26), i || Ql), e), t); + }, s.zh = function() { + return Sn(), Ql; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + jxn(this, null); + return; + } + As(this, e - ee((Sn(), Ql)), On((t = u(Rn(this, 16), 26), t || Ql), e)); + }; + var l9, r1n, $ne; + w(Bn, "EFactoryImpl", 704), b(Eo, 704, { 105: 1, 2014: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, R2n), s.Ih = function(e, t) { + switch (e.yj()) { + case 12: + return u(t, 146).tg(); + case 13: + return Nr(t); + default: + throw T(new Hn(B4 + e.ne() + l0)); + } + }, s.Jh = function(e) { + var t, i, r, c, o, f, h, l; + switch (e.G == -1 && (e.G = (t = is(e), t ? m1(t.Mh(), e) : -1)), e.G) { + case 4: + return o = new QH(), o; + case 6: + return f = new nG(), f; + case 7: + return h = new eG(), h; + case 8: + return r = new VH(), r; + case 9: + return i = new Xy(), i; + case 10: + return c = new Vy(), c; + case 11: + return l = new _2n(), l; + default: + throw T(new Hn(SB + e.zb + l0)); + } + }, s.Kh = function(e, t) { + switch (e.yj()) { + case 13: + case 12: + return null; + default: + throw T(new Hn(B4 + e.ne() + l0)); + } + }, w(Ra, "ElkGraphFactoryImpl", Eo), b(438, 150, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }), s.Wg = function() { + var e, t; + return t = (e = u(Rn(this, 16), 26), VW(Lf(e || this.zh()))), t == null ? (Zv(), Zv(), pH) : new djn(this, t); + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.ne(); + } + return Cs(this, e - ee(this.zh()), On((r = u(Rn(this, 16), 26), r || this.zh()), e), t, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + } + return js(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + this.Lh(Ce(t)); + return; + } + Ps(this, e - ee(this.zh()), On((i = u(Rn(this, 16), 26), i || this.zh()), e), t); + }, s.zh = function() { + return Sn(), Jne; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + this.Lh(null); + return; + } + As(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.ne = function() { + return this.zb; + }, s.Lh = function(e) { + Oc(this, e); + }, s.Ib = function() { + return r6(this); + }, s.zb = null, w(Bn, "ENamedElementImpl", 438), b(179, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1 }, WTn), s.Qg = function(e) { + return LFn(this, e); + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.yb; + case 3: + return this.xb; + case 4: + return this.sb; + case 5: + return !this.rb && (this.rb = new Z0(this, Qo, this)), this.rb; + case 6: + return !this.vb && (this.vb = new g2(Vo, this, 6, 7)), this.vb; + case 7: + return t ? this.Db >> 16 == 7 ? u(this.Cb, 235) : null : fMn(this); + } + return Cs(this, e - ee((Sn(), R1)), On((r = u(Rn(this, 16), 26), r || R1), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 4: + return this.sb && (i = u(this.sb, 49).ih(this, 1, h9, i)), hQ(this, u(e, 471), i); + case 5: + return !this.rb && (this.rb = new Z0(this, Qo, this)), Dc(this.rb, e, i); + case 6: + return !this.vb && (this.vb = new g2(Vo, this, 6, 7)), Dc(this.vb, e, i); + case 7: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? LFn(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 7, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || (Sn(), R1)), t), 66), o.Nj().Qj(this, Bc(this), t - ee((Sn(), R1)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 4: + return hQ(this, null, i); + case 5: + return !this.rb && (this.rb = new Z0(this, Qo, this)), Gi(this.rb, e, i); + case 6: + return !this.vb && (this.vb = new g2(Vo, this, 6, 7)), Gi(this.vb, e, i); + case 7: + return os(this, null, 7, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), R1)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), R1)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.yb != null; + case 3: + return this.xb != null; + case 4: + return !!this.sb; + case 5: + return !!this.rb && this.rb.i != 0; + case 6: + return !!this.vb && this.vb.i != 0; + case 7: + return !!fMn(this); + } + return js(this, e - ee((Sn(), R1)), On((t = u(Rn(this, 16), 26), t || R1), e)); + }, s.oh = function(e) { + var t; + return t = m8e(this, e), t || RZ(this, e); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + Oc(this, Ce(t)); + return; + case 2: + cT(this, Ce(t)); + return; + case 3: + rT(this, Ce(t)); + return; + case 4: + jx(this, u(t, 471)); + return; + case 5: + !this.rb && (this.rb = new Z0(this, Qo, this)), de(this.rb), !this.rb && (this.rb = new Z0(this, Qo, this)), Ft(this.rb, u(t, 14)); + return; + case 6: + !this.vb && (this.vb = new g2(Vo, this, 6, 7)), de(this.vb), !this.vb && (this.vb = new g2(Vo, this, 6, 7)), Ft(this.vb, u(t, 14)); + return; + } + Ps(this, e - ee((Sn(), R1)), On((i = u(Rn(this, 16), 26), i || R1), e), t); + }, s.vh = function(e) { + var t, i; + if (e && this.rb) + for (i = new ie(this.rb); i.e != i.i.gc(); ) + t = oe(i), I(t, 351) && (u(t, 351).w = null); + R2(this, 64, e); + }, s.zh = function() { + return Sn(), R1; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + Oc(this, null); + return; + case 2: + cT(this, null); + return; + case 3: + rT(this, null); + return; + case 4: + jx(this, null); + return; + case 5: + !this.rb && (this.rb = new Z0(this, Qo, this)), de(this.rb); + return; + case 6: + !this.vb && (this.vb = new g2(Vo, this, 6, 7)), de(this.vb); + return; + } + As(this, e - ee((Sn(), R1)), On((t = u(Rn(this, 16), 26), t || R1), e)); + }, s.Gh = function() { + fx(this); + }, s.Mh = function() { + return !this.rb && (this.rb = new Z0(this, Qo, this)), this.rb; + }, s.Nh = function() { + return this.sb; + }, s.Oh = function() { + return this.ub; + }, s.Ph = function() { + return this.xb; + }, s.Qh = function() { + return this.yb; + }, s.Rh = function(e) { + this.ub = e; + }, s.Ib = function() { + var e; + return this.Db & 64 ? r6(this) : (e = new Bs(r6(this)), e.a += " (nsURI: ", br(e, this.yb), e.a += ", nsPrefix: ", br(e, this.xb), e.a += ")", e.a); + }, s.xb = null, s.yb = null, w(Bn, "EPackageImpl", 179), b(555, 179, { 105: 1, 2016: 1, 555: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1 }, VLn), s.q = !1, s.r = !1; + var Fne = !1; + w(Ra, "ElkGraphPackageImpl", 555), b(354, 724, { 105: 1, 413: 1, 160: 1, 137: 1, 470: 1, 354: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, QH), s.Qg = function(e) { + return bJ(this, e); + }, s._g = function(e, t, i) { + switch (e) { + case 7: + return hMn(this); + case 8: + return this.a; + } + return jQ(this, e, t, i); + }, s.hh = function(e, t, i) { + var r; + switch (t) { + case 7: + return this.Cb && (i = (r = this.Db >> 16, r >= 0 ? bJ(this, i) : this.Cb.ih(this, -1 - r, null, i))), aW(this, u(e, 160), i); + } + return vx(this, e, t, i); + }, s.jh = function(e, t, i) { + return t == 7 ? aW(this, null, i) : tF(this, e, t, i); + }, s.lh = function(e) { + switch (e) { + case 7: + return !!hMn(this); + case 8: + return !An("", this.a); + } + return PQ(this, e); + }, s.sh = function(e, t) { + switch (e) { + case 7: + zY(this, u(t, 160)); + return; + case 8: + aV(this, Ce(t)); + return; + } + SJ(this, e, t); + }, s.zh = function() { + return $c(), e1n; + }, s.Bh = function(e) { + switch (e) { + case 7: + zY(this, null); + return; + case 8: + aV(this, ""); + return; + } + FQ(this, e); + }, s.Ib = function() { + return Lxn(this); + }, s.a = "", w(Ra, "ElkLabelImpl", 354), b(239, 725, { 105: 1, 413: 1, 82: 1, 160: 1, 33: 1, 470: 1, 239: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, nG), s.Qg = function(e) { + return vJ(this, e); + }, s._g = function(e, t, i) { + switch (e) { + case 9: + return !this.c && (this.c = new V(Ru, this, 9, 9)), this.c; + case 10: + return !this.a && (this.a = new V(Ot, this, 10, 11)), this.a; + case 11: + return Pt(this); + case 12: + return !this.b && (this.b = new V(bi, this, 12, 3)), this.b; + case 13: + return qn(), !this.a && (this.a = new V(Ot, this, 10, 11)), this.a.i > 0; + } + return tJ(this, e, t, i); + }, s.hh = function(e, t, i) { + var r; + switch (t) { + case 9: + return !this.c && (this.c = new V(Ru, this, 9, 9)), Dc(this.c, e, i); + case 10: + return !this.a && (this.a = new V(Ot, this, 10, 11)), Dc(this.a, e, i); + case 11: + return this.Cb && (i = (r = this.Db >> 16, r >= 0 ? vJ(this, i) : this.Cb.ih(this, -1 - r, null, i))), kU(this, u(e, 33), i); + case 12: + return !this.b && (this.b = new V(bi, this, 12, 3)), Dc(this.b, e, i); + } + return yJ(this, e, t, i); + }, s.jh = function(e, t, i) { + switch (t) { + case 9: + return !this.c && (this.c = new V(Ru, this, 9, 9)), Gi(this.c, e, i); + case 10: + return !this.a && (this.a = new V(Ot, this, 10, 11)), Gi(this.a, e, i); + case 11: + return kU(this, null, i); + case 12: + return !this.b && (this.b = new V(bi, this, 12, 3)), Gi(this.b, e, i); + } + return jJ(this, e, t, i); + }, s.lh = function(e) { + switch (e) { + case 9: + return !!this.c && this.c.i != 0; + case 10: + return !!this.a && this.a.i != 0; + case 11: + return !!Pt(this); + case 12: + return !!this.b && this.b.i != 0; + case 13: + return !this.a && (this.a = new V(Ot, this, 10, 11)), this.a.i > 0; + } + return zV(this, e); + }, s.sh = function(e, t) { + switch (e) { + case 9: + !this.c && (this.c = new V(Ru, this, 9, 9)), de(this.c), !this.c && (this.c = new V(Ru, this, 9, 9)), Ft(this.c, u(t, 14)); + return; + case 10: + !this.a && (this.a = new V(Ot, this, 10, 11)), de(this.a), !this.a && (this.a = new V(Ot, this, 10, 11)), Ft(this.a, u(t, 14)); + return; + case 11: + HY(this, u(t, 33)); + return; + case 12: + !this.b && (this.b = new V(bi, this, 12, 3)), de(this.b), !this.b && (this.b = new V(bi, this, 12, 3)), Ft(this.b, u(t, 14)); + return; + } + OY(this, e, t); + }, s.zh = function() { + return $c(), t1n; + }, s.Bh = function(e) { + switch (e) { + case 9: + !this.c && (this.c = new V(Ru, this, 9, 9)), de(this.c); + return; + case 10: + !this.a && (this.a = new V(Ot, this, 10, 11)), de(this.a); + return; + case 11: + HY(this, null); + return; + case 12: + !this.b && (this.b = new V(bi, this, 12, 3)), de(this.b); + return; + } + XQ(this, e); + }, s.Ib = function() { + return uZ(this); + }, w(Ra, "ElkNodeImpl", 239), b(186, 725, { 105: 1, 413: 1, 82: 1, 160: 1, 118: 1, 470: 1, 186: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, eG), s.Qg = function(e) { + return wJ(this, e); + }, s._g = function(e, t, i) { + return e == 9 ? nf(this) : tJ(this, e, t, i); + }, s.hh = function(e, t, i) { + var r; + switch (t) { + case 9: + return this.Cb && (i = (r = this.Db >> 16, r >= 0 ? wJ(this, i) : this.Cb.ih(this, -1 - r, null, i))), aU(this, u(e, 33), i); + } + return yJ(this, e, t, i); + }, s.jh = function(e, t, i) { + return t == 9 ? aU(this, null, i) : jJ(this, e, t, i); + }, s.lh = function(e) { + return e == 9 ? !!nf(this) : zV(this, e); + }, s.sh = function(e, t) { + switch (e) { + case 9: + KY(this, u(t, 33)); + return; + } + OY(this, e, t); + }, s.zh = function() { + return $c(), i1n; + }, s.Bh = function(e) { + switch (e) { + case 9: + KY(this, null); + return; + } + XQ(this, e); + }, s.Ib = function() { + return jBn(this); + }, w(Ra, "ElkPortImpl", 186); + var xne = Ct(zi, "BasicEMap/Entry"); + b(1092, 115, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, _2n), s.Fb = function(e) { + return this === e; + }, s.cd = function() { + return this.b; + }, s.Hb = function() { + return kd(this); + }, s.Uh = function(e) { + dV(this, u(e, 146)); + }, s._g = function(e, t, i) { + switch (e) { + case 0: + return this.b; + case 1: + return this.c; + } + return BT(this, e, t, i); + }, s.lh = function(e) { + switch (e) { + case 0: + return !!this.b; + case 1: + return this.c != null; + } + return zF(this, e); + }, s.sh = function(e, t) { + switch (e) { + case 0: + dV(this, u(t, 146)); + return; + case 1: + gV(this, t); + return; + } + Px(this, e, t); + }, s.zh = function() { + return $c(), Ul; + }, s.Bh = function(e) { + switch (e) { + case 0: + dV(this, null); + return; + case 1: + gV(this, null); + return; + } + Cx(this, e); + }, s.Sh = function() { + var e; + return this.a == -1 && (e = this.b, this.a = e ? kt(e) : 0), this.a; + }, s.dd = function() { + return this.c; + }, s.Th = function(e) { + this.a = e; + }, s.ed = function(e) { + var t; + return t = this.c, gV(this, e), t; + }, s.Ib = function() { + var e; + return this.Db & 64 ? yo(this) : (e = new V1(), De(De(De(e, this.b ? this.b.tg() : iu), TN), y5(this.c)), e.a); + }, s.a = -1, s.c = null; + var P0 = w(Ra, "ElkPropertyToValueMapEntryImpl", 1092); + b(984, 1, {}, q2n), w(Fi, "JsonAdapter", 984), b(210, 60, Uh, Af), w(Fi, "JsonImportException", 210), b(857, 1, {}, NFn), w(Fi, "JsonImporter", 857), b(891, 1, {}, akn), w(Fi, "JsonImporter/lambda$0$Type", 891), b(892, 1, {}, dkn), w(Fi, "JsonImporter/lambda$1$Type", 892), b(900, 1, {}, W6n), w(Fi, "JsonImporter/lambda$10$Type", 900), b(902, 1, {}, bkn), w(Fi, "JsonImporter/lambda$11$Type", 902), b(903, 1, {}, wkn), w(Fi, "JsonImporter/lambda$12$Type", 903), b(909, 1, {}, ATn), w(Fi, "JsonImporter/lambda$13$Type", 909), b(908, 1, {}, MTn), w(Fi, "JsonImporter/lambda$14$Type", 908), b(904, 1, {}, gkn), w(Fi, "JsonImporter/lambda$15$Type", 904), b(905, 1, {}, pkn), w(Fi, "JsonImporter/lambda$16$Type", 905), b(906, 1, {}, vkn), w(Fi, "JsonImporter/lambda$17$Type", 906), b(907, 1, {}, mkn), w(Fi, "JsonImporter/lambda$18$Type", 907), b(912, 1, {}, X6n), w(Fi, "JsonImporter/lambda$19$Type", 912), b(893, 1, {}, V6n), w(Fi, "JsonImporter/lambda$2$Type", 893), b(910, 1, {}, Q6n), w(Fi, "JsonImporter/lambda$20$Type", 910), b(911, 1, {}, J6n), w(Fi, "JsonImporter/lambda$21$Type", 911), b(915, 1, {}, Y6n), w(Fi, "JsonImporter/lambda$22$Type", 915), b(913, 1, {}, Z6n), w(Fi, "JsonImporter/lambda$23$Type", 913), b(914, 1, {}, nmn), w(Fi, "JsonImporter/lambda$24$Type", 914), b(917, 1, {}, emn), w(Fi, "JsonImporter/lambda$25$Type", 917), b(916, 1, {}, tmn), w(Fi, "JsonImporter/lambda$26$Type", 916), b(918, 1, Yn, kkn), s.td = function(e) { + Xde(this.b, this.a, Ce(e)); + }, w(Fi, "JsonImporter/lambda$27$Type", 918), b(919, 1, Yn, ykn), s.td = function(e) { + Vde(this.b, this.a, Ce(e)); + }, w(Fi, "JsonImporter/lambda$28$Type", 919), b(920, 1, {}, jkn), w(Fi, "JsonImporter/lambda$29$Type", 920), b(896, 1, {}, imn), w(Fi, "JsonImporter/lambda$3$Type", 896), b(921, 1, {}, Ekn), w(Fi, "JsonImporter/lambda$30$Type", 921), b(922, 1, {}, rmn), w(Fi, "JsonImporter/lambda$31$Type", 922), b(923, 1, {}, cmn), w(Fi, "JsonImporter/lambda$32$Type", 923), b(924, 1, {}, umn), w(Fi, "JsonImporter/lambda$33$Type", 924), b(925, 1, {}, smn), w(Fi, "JsonImporter/lambda$34$Type", 925), b(859, 1, {}, omn), w(Fi, "JsonImporter/lambda$35$Type", 859), b(929, 1, {}, vEn), w(Fi, "JsonImporter/lambda$36$Type", 929), b(926, 1, Yn, fmn), s.td = function(e) { + Yae(this.a, u(e, 469)); + }, w(Fi, "JsonImporter/lambda$37$Type", 926), b(927, 1, Yn, Pkn), s.td = function(e) { + Mre(this.a, this.b, u(e, 202)); + }, w(Fi, "JsonImporter/lambda$38$Type", 927), b(928, 1, Yn, Ikn), s.td = function(e) { + Are(this.a, this.b, u(e, 202)); + }, w(Fi, "JsonImporter/lambda$39$Type", 928), b(894, 1, {}, hmn), w(Fi, "JsonImporter/lambda$4$Type", 894), b(930, 1, Yn, lmn), s.td = function(e) { + Zae(this.a, u(e, 8)); + }, w(Fi, "JsonImporter/lambda$40$Type", 930), b(895, 1, {}, amn), w(Fi, "JsonImporter/lambda$5$Type", 895), b(899, 1, {}, dmn), w(Fi, "JsonImporter/lambda$6$Type", 899), b(897, 1, {}, bmn), w(Fi, "JsonImporter/lambda$7$Type", 897), b(898, 1, {}, wmn), w(Fi, "JsonImporter/lambda$8$Type", 898), b(901, 1, {}, gmn), w(Fi, "JsonImporter/lambda$9$Type", 901), b(948, 1, Yn, pmn), s.td = function(e) { + j2(this.a, new nb(Ce(e))); + }, w(Fi, "JsonMetaDataConverter/lambda$0$Type", 948), b(949, 1, Yn, vmn), s.td = function(e) { + whe(this.a, u(e, 237)); + }, w(Fi, "JsonMetaDataConverter/lambda$1$Type", 949), b(950, 1, Yn, mmn), s.td = function(e) { + ale(this.a, u(e, 149)); + }, w(Fi, "JsonMetaDataConverter/lambda$2$Type", 950), b(951, 1, Yn, kmn), s.td = function(e) { + ghe(this.a, u(e, 175)); + }, w(Fi, "JsonMetaDataConverter/lambda$3$Type", 951), b(237, 22, { 3: 1, 35: 1, 22: 1, 237: 1 }, a2); + var VP, QP, hH, JP, YP, ZP, lH, aH, nI = Me(ok, "GraphFeature", 237, Ie, B0e, _oe), Lne; + b(13, 1, { 35: 1, 146: 1 }, yt, ri, In, tr), s.wd = function(e) { + return Tce(this, u(e, 146)); + }, s.Fb = function(e) { + return XTn(this, e); + }, s.wg = function() { + return cn(this); + }, s.tg = function() { + return this.b; + }, s.Hb = function() { + return k1(this.b); + }, s.Ib = function() { + return this.b; + }, w(ok, "Property", 13), b(818, 1, at, $q), s.ue = function(e, t) { + return qge(this, u(e, 94), u(t, 94)); + }, s.Fb = function(e) { + return this === e; + }, s.ve = function() { + return new ut(this); + }, w(ok, "PropertyHolderComparator", 818), b(695, 1, Ei, Fq), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return Zde(this); + }, s.Qb = function() { + d8n(); + }, s.Ob = function() { + return !!this.a; + }, w(mA, "ElkGraphUtil/AncestorIterator", 695); + var c1n = Ct(zi, "EList"); + b(67, 52, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1 }), s.Vc = function(e, t) { + s6(this, e, t); + }, s.Fc = function(e) { + return me(this, e); + }, s.Wc = function(e, t) { + return NV(this, e, t); + }, s.Gc = function(e) { + return Ft(this, e); + }, s.Zh = function() { + return new w2(this); + }, s.$h = function() { + return new u8(this); + }, s._h = function(e) { + return J8(this, e); + }, s.ai = function() { + return !0; + }, s.bi = function(e, t) { + }, s.ci = function() { + }, s.di = function(e, t) { + A$(this, e, t); + }, s.ei = function(e, t, i) { + }, s.fi = function(e, t) { + }, s.gi = function(e, t, i) { + }, s.Fb = function(e) { + return oBn(this, e); + }, s.Hb = function() { + return DV(this); + }, s.hi = function() { + return !1; + }, s.Kc = function() { + return new ie(this); + }, s.Yc = function() { + return new b2(this); + }, s.Zc = function(e) { + var t; + if (t = this.gc(), e < 0 || e > t) + throw T(new Q0(e, t)); + return new DD(this, e); + }, s.ji = function(e, t) { + this.ii(e, this.Xc(t)); + }, s.Mc = function(e) { + return BC(this, e); + }, s.li = function(e, t) { + return t; + }, s._c = function(e, t) { + return Gw(this, e, t); + }, s.Ib = function() { + return CQ(this); + }, s.ni = function() { + return !0; + }, s.oi = function(e, t) { + return U3(this, t); + }, w(zi, "AbstractEList", 67), b(63, 67, Wf, Jy, Nd, CV), s.Vh = function(e, t) { + return mx(this, e, t); + }, s.Wh = function(e) { + return hFn(this, e); + }, s.Xh = function(e, t) { + a7(this, e, t); + }, s.Yh = function(e) { + F8(this, e); + }, s.pi = function(e) { + return zX(this, e); + }, s.$b = function() { + U5(this); + }, s.Hc = function(e) { + return s4(this, e); + }, s.Xb = function(e) { + return D(this, e); + }, s.qi = function(e) { + var t, i, r; + ++this.j, i = this.g == null ? 0 : this.g.length, e > i && (r = this.g, t = i + (i / 2 | 0) + 4, t < e && (t = e), this.g = this.ri(t), r != null && pc(r, 0, this.g, 0, this.i)); + }, s.Xc = function(e) { + return OFn(this, e); + }, s.dc = function() { + return this.i == 0; + }, s.ii = function(e, t) { + return Dx(this, e, t); + }, s.ri = function(e) { + return F(Zn, rn, 1, e, 5, 1); + }, s.ki = function(e) { + return this.g[e]; + }, s.$c = function(e) { + return H2(this, e); + }, s.mi = function(e, t) { + return B$(this, e, t); + }, s.gc = function() { + return this.i; + }, s.Pc = function() { + return gX(this); + }, s.Qc = function(e) { + return LQ(this, e); + }, s.i = 0; + var u1n = w(zi, "BasicEList", 63), s1n = Ct(zi, "TreeIterator"); + b(694, 63, RB), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.g == null && !this.c ? ZW(this) : this.g == null || this.i != 0 && u(this.g[this.i - 1], 47).Ob(); + }, s.Pb = function() { + return cM(this); + }, s.Qb = function() { + if (!this.e) + throw T(new $r("There is no valid object to remove.")); + this.e.Qb(); + }, s.c = !1, w(zi, "AbstractTreeIterator", 694), b(685, 694, RB, kz), s.si = function(e) { + var t; + return t = u(e, 56).Wg().Kc(), I(t, 279) && u(t, 279).Nk(new G2n()), t; + }, w(mA, "ElkGraphUtil/PropertiesSkippingTreeIterator", 685), b(952, 1, {}, G2n), w(mA, "ElkGraphUtil/PropertiesSkippingTreeIterator/1", 952); + var $y, dH, Fy = w(mA, "ElkReflect", null); + b(889, 1, Bb, z2n), s.vg = function(e) { + return dC(), Cde(u(e, 174)); + }, w(mA, "ElkReflect/lambda$0$Type", 889); + var Wl; + Ct(zi, "ResourceLocator"), b(1051, 1, {}), w(zi, "DelegatingResourceLocator", 1051), b(1052, 1051, {}), w("org.eclipse.emf.common", "EMFPlugin", 1052); + var bH = Ct(iGn, "Adapter"), fMe = Ct(iGn, "Notification"); + b(1153, 1, Wtn), s.ti = function() { + return this.d; + }, s.ui = function(e) { + }, s.vi = function(e) { + this.d = e; + }, s.wi = function(e) { + this.d == e && (this.d = null); + }, s.d = null, w(sp, "AdapterImpl", 1153), b(1995, 67, rGn), s.Vh = function(e, t) { + return IQ(this, e, t); + }, s.Wh = function(e) { + var t, i, r; + if (++this.j, e.dc()) + return !1; + for (t = this.Vi(), r = e.Kc(); r.Ob(); ) + i = r.Pb(), this.Ii(this.oi(t, i)), ++t; + return !0; + }, s.Xh = function(e, t) { + Mjn(this, e, t); + }, s.Yh = function(e) { + nTn(this, e); + }, s.Gi = function() { + return this.Ji(); + }, s.$b = function() { + h8(this, this.Vi(), this.Wi()); + }, s.Hc = function(e) { + return this.Li(e); + }, s.Ic = function(e) { + return this.Mi(e); + }, s.Hi = function(e, t) { + this.Si().jm(); + }, s.Ii = function(e) { + this.Si().jm(); + }, s.Ji = function() { + return this.Si(); + }, s.Ki = function() { + this.Si().jm(); + }, s.Li = function(e) { + return this.Si().jm(); + }, s.Mi = function(e) { + return this.Si().jm(); + }, s.Ni = function(e) { + return this.Si().jm(); + }, s.Oi = function(e) { + return this.Si().jm(); + }, s.Pi = function() { + return this.Si().jm(); + }, s.Qi = function(e) { + return this.Si().jm(); + }, s.Ri = function() { + return this.Si().jm(); + }, s.Ti = function(e) { + return this.Si().jm(); + }, s.Ui = function(e, t) { + return this.Si().jm(); + }, s.Vi = function() { + return this.Si().jm(); + }, s.Wi = function() { + return this.Si().jm(); + }, s.Xi = function(e) { + return this.Si().jm(); + }, s.Yi = function() { + return this.Si().jm(); + }, s.Fb = function(e) { + return this.Ni(e); + }, s.Xb = function(e) { + return this.li(e, this.Oi(e)); + }, s.Hb = function() { + return this.Pi(); + }, s.Xc = function(e) { + return this.Qi(e); + }, s.dc = function() { + return this.Ri(); + }, s.ii = function(e, t) { + return WJ(this, e, t); + }, s.ki = function(e) { + return this.Oi(e); + }, s.$c = function(e) { + return OE(this, e); + }, s.Mc = function(e) { + var t; + return t = this.Xc(e), t >= 0 ? (this.$c(t), !0) : !1; + }, s.mi = function(e, t) { + return this.Ui(e, this.oi(e, t)); + }, s.gc = function() { + return this.Vi(); + }, s.Pc = function() { + return this.Wi(); + }, s.Qc = function(e) { + return this.Xi(e); + }, s.Ib = function() { + return this.Yi(); + }, w(zi, "DelegatingEList", 1995), b(1996, 1995, rGn), s.Vh = function(e, t) { + return wZ(this, e, t); + }, s.Wh = function(e) { + return this.Vh(this.Vi(), e); + }, s.Xh = function(e, t) { + WLn(this, e, t); + }, s.Yh = function(e) { + BLn(this, e); + }, s.ai = function() { + return !this.bj(); + }, s.$b = function() { + $6(this); + }, s.Zi = function(e, t, i, r, c) { + return new QTn(this, e, t, i, r, c); + }, s.$i = function(e) { + et(this.Ai(), e); + }, s._i = function() { + return null; + }, s.aj = function() { + return -1; + }, s.Ai = function() { + return null; + }, s.bj = function() { + return !1; + }, s.cj = function(e, t) { + return t; + }, s.dj = function(e, t) { + return t; + }, s.ej = function() { + return !1; + }, s.fj = function() { + return !this.Ri(); + }, s.ii = function(e, t) { + var i, r; + return this.ej() ? (r = this.fj(), i = WJ(this, e, t), this.$i(this.Zi(7, Q(t), i, e, r)), i) : WJ(this, e, t); + }, s.$c = function(e) { + var t, i, r, c; + return this.ej() ? (i = null, r = this.fj(), t = this.Zi(4, c = OE(this, e), null, e, r), this.bj() && c ? (i = this.dj(c, i), i ? (i.Ei(t), i.Fi()) : this.$i(t)) : i ? (i.Ei(t), i.Fi()) : this.$i(t), c) : (c = OE(this, e), this.bj() && c && (i = this.dj(c, null), i && i.Fi()), c); + }, s.mi = function(e, t) { + return eRn(this, e, t); + }, w(sp, "DelegatingNotifyingListImpl", 1996), b(143, 1, jk), s.Ei = function(e) { + return FJ(this, e); + }, s.Fi = function() { + L$(this); + }, s.xi = function() { + return this.d; + }, s._i = function() { + return null; + }, s.gj = function() { + return null; + }, s.yi = function(e) { + return -1; + }, s.zi = function() { + return KNn(this); + }, s.Ai = function() { + return null; + }, s.Bi = function() { + return QY(this); + }, s.Ci = function() { + return this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o; + }, s.hj = function() { + return !1; + }, s.Di = function(e) { + var t, i, r, c, o, f, h, l, a, d, g; + switch (this.d) { + case 1: + case 2: + switch (c = e.xi(), c) { + case 1: + case 2: + if (o = e.Ai(), B(o) === B(this.Ai()) && this.yi(null) == e.yi(null)) + return this.g = e.zi(), e.xi() == 1 && (this.d = 1), !0; + } + case 4: { + switch (c = e.xi(), c) { + case 4: { + if (o = e.Ai(), B(o) === B(this.Ai()) && this.yi(null) == e.yi(null)) + return a = DZ(this), l = this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o, f = e.Ci(), this.d = 6, g = new Nd(2), l <= f ? (me(g, this.n), me(g, e.Bi()), this.g = A(M(be, 1), Le, 25, 15, [this.o = l, f + 1])) : (me(g, e.Bi()), me(g, this.n), this.g = A(M(be, 1), Le, 25, 15, [this.o = f, l])), this.n = g, a || (this.o = -2 - this.o - 1), !0; + break; + } + } + break; + } + case 6: { + switch (c = e.xi(), c) { + case 4: { + if (o = e.Ai(), B(o) === B(this.Ai()) && this.yi(null) == e.yi(null)) { + for (a = DZ(this), f = e.Ci(), d = u(this.g, 48), r = F(be, Le, 25, d.length + 1, 15, 1), t = 0; t < d.length && (h = d[t], h <= f); ) + r[t++] = h, ++f; + for (i = u(this.n, 15), i.Vc(t, e.Bi()), r[t] = f; ++t < r.length; ) + r[t] = d[t - 1]; + return this.g = r, a || (this.o = -2 - r[0]), !0; + } + break; + } + } + break; + } + } + return !1; + }, s.Ib = function() { + var e, t, i, r; + switch (r = new Bs(J1(this.gm) + "@" + (t = kt(this) >>> 0, t.toString(16))), r.a += " (eventType: ", this.d) { + case 1: { + r.a += "SET"; + break; + } + case 2: { + r.a += "UNSET"; + break; + } + case 3: { + r.a += "ADD"; + break; + } + case 5: { + r.a += "ADD_MANY"; + break; + } + case 4: { + r.a += "REMOVE"; + break; + } + case 6: { + r.a += "REMOVE_MANY"; + break; + } + case 7: { + r.a += "MOVE"; + break; + } + case 8: { + r.a += "REMOVING_ADAPTER"; + break; + } + case 9: { + r.a += "RESOLVE"; + break; + } + default: { + eO(r, this.d); + break; + } + } + if (PBn(this) && (r.a += ", touch: true"), r.a += ", position: ", eO(r, this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o), r.a += ", notifier: ", w5(r, this.Ai()), r.a += ", feature: ", w5(r, this._i()), r.a += ", oldValue: ", w5(r, QY(this)), r.a += ", newValue: ", this.d == 6 && I(this.g, 48)) { + for (i = u(this.g, 48), r.a += "[", e = 0; e < i.length; ) + r.a += i[e], ++e < i.length && (r.a += Qi); + r.a += "]"; + } else + w5(r, KNn(this)); + return r.a += ", isTouch: ", c1(r, PBn(this)), r.a += ", wasSet: ", c1(r, DZ(this)), r.a += ")", r.a; + }, s.d = 0, s.e = 0, s.f = 0, s.j = 0, s.k = 0, s.o = 0, s.p = 0, w(sp, "NotificationImpl", 143), b(1167, 143, jk, QTn), s._i = function() { + return this.a._i(); + }, s.yi = function(e) { + return this.a.aj(); + }, s.Ai = function() { + return this.a.Ai(); + }, w(sp, "DelegatingNotifyingListImpl/1", 1167), b(242, 63, Wf, U2n, Q1), s.Fc = function(e) { + return c$n(this, u(e, 366)); + }, s.Ei = function(e) { + return c$n(this, e); + }, s.Fi = function() { + var e, t, i; + for (e = 0; e < this.i; ++e) + t = u(this.g[e], 366), i = t.Ai(), i != null && t.xi() != -1 && u(i, 92).Ng(t); + }, s.ri = function(e) { + return F(fMe, rn, 366, e, 0, 1); + }, w(sp, "NotificationChainImpl", 242), b(1378, 90, gqn), s.Kg = function() { + return this.e; + }, s.Mg = function() { + return (this.f & 1) != 0; + }, s.f = 1, w(sp, "NotifierImpl", 1378), b(1993, 63, Wf), s.Vh = function(e, t) { + return eL(this, e, t); + }, s.Wh = function(e) { + return this.Vh(this.i, e); + }, s.Xh = function(e, t) { + EY(this, e, t); + }, s.Yh = function(e) { + $x(this, e); + }, s.ai = function() { + return !this.bj(); + }, s.$b = function() { + de(this); + }, s.Zi = function(e, t, i, r, c) { + return new JTn(this, e, t, i, r, c); + }, s.$i = function(e) { + et(this.Ai(), e); + }, s._i = function() { + return null; + }, s.aj = function() { + return -1; + }, s.Ai = function() { + return null; + }, s.bj = function() { + return !1; + }, s.ij = function() { + return !1; + }, s.cj = function(e, t) { + return t; + }, s.dj = function(e, t) { + return t; + }, s.ej = function() { + return !1; + }, s.fj = function() { + return this.i != 0; + }, s.ii = function(e, t) { + return o6(this, e, t); + }, s.$c = function(e) { + return Cb(this, e); + }, s.mi = function(e, t) { + return gRn(this, e, t); + }, s.jj = function(e, t) { + return t; + }, s.kj = function(e, t) { + return t; + }, s.lj = function(e, t, i) { + return i; + }, w(sp, "NotifyingListImpl", 1993), b(1166, 143, jk, JTn), s._i = function() { + return this.a._i(); + }, s.yi = function(e) { + return this.a.aj(); + }, s.Ai = function() { + return this.a.Ai(); + }, w(sp, "NotifyingListImpl/1", 1166), b(953, 63, Wf, Pjn), s.Hc = function(e) { + return this.i > 10 ? ((!this.b || this.c.j != this.a) && (this.b = new S5(this), this.a = this.j), Ah(this.b, e)) : s4(this, e); + }, s.ni = function() { + return !0; + }, s.a = 0, w(zi, "AbstractEList/1", 953), b(295, 73, VL, Q0), w(zi, "AbstractEList/BasicIndexOutOfBoundsException", 295), b(40, 1, Ei, ie), s.Nb = function(e) { + Oi(this, e); + }, s.mj = function() { + if (this.i.j != this.f) + throw T(new vs()); + }, s.nj = function() { + return oe(this); + }, s.Ob = function() { + return this.e != this.i.gc(); + }, s.Pb = function() { + return this.nj(); + }, s.Qb = function() { + p6(this); + }, s.e = 0, s.f = 0, s.g = -1, w(zi, "AbstractEList/EIterator", 40), b(278, 40, hh, b2, DD), s.Qb = function() { + p6(this); + }, s.Rb = function(e) { + a$n(this, e); + }, s.oj = function() { + var e; + try { + return e = this.d.Xb(--this.e), this.mj(), this.g = this.e, e; + } catch (t) { + throw t = Et(t), I(t, 73) ? (this.mj(), T(new ic())) : T(t); + } + }, s.pj = function(e) { + dFn(this, e); + }, s.Sb = function() { + return this.e != 0; + }, s.Tb = function() { + return this.e; + }, s.Ub = function() { + return this.oj(); + }, s.Vb = function() { + return this.e - 1; + }, s.Wb = function(e) { + this.pj(e); + }, w(zi, "AbstractEList/EListIterator", 278), b(341, 40, Ei, w2), s.nj = function() { + return UF(this); + }, s.Qb = function() { + throw T(new ye()); + }, w(zi, "AbstractEList/NonResolvingEIterator", 341), b(385, 278, hh, u8, AU), s.Rb = function(e) { + throw T(new ye()); + }, s.nj = function() { + var e; + try { + return e = this.c.ki(this.e), this.mj(), this.g = this.e++, e; + } catch (t) { + throw t = Et(t), I(t, 73) ? (this.mj(), T(new ic())) : T(t); + } + }, s.oj = function() { + var e; + try { + return e = this.c.ki(--this.e), this.mj(), this.g = this.e, e; + } catch (t) { + throw t = Et(t), I(t, 73) ? (this.mj(), T(new ic())) : T(t); + } + }, s.Qb = function() { + throw T(new ye()); + }, s.Wb = function(e) { + throw T(new ye()); + }, w(zi, "AbstractEList/NonResolvingEListIterator", 385), b(1982, 67, cGn), s.Vh = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p; + if (c = t.gc(), c != 0) { + for (a = u(Rn(this.a, 4), 126), d = a == null ? 0 : a.length, p = d + c, r = bF(this, p), g = d - e, g > 0 && pc(a, e, r, e + c, g), l = t.Kc(), f = 0; f < c; ++f) + h = l.Pb(), i = e + f, _O(r, i, U3(this, h)); + for (i4(this, r), o = 0; o < c; ++o) + h = r[e], this.bi(e, h), ++e; + return !0; + } else + return ++this.j, !1; + }, s.Wh = function(e) { + var t, i, r, c, o, f, h, l, a; + if (r = e.gc(), r != 0) { + for (l = (i = u(Rn(this.a, 4), 126), i == null ? 0 : i.length), a = l + r, t = bF(this, a), h = e.Kc(), o = l; o < a; ++o) + f = h.Pb(), _O(t, o, U3(this, f)); + for (i4(this, t), c = l; c < a; ++c) + f = t[c], this.bi(c, f); + return !0; + } else + return ++this.j, !1; + }, s.Xh = function(e, t) { + var i, r, c, o; + r = u(Rn(this.a, 4), 126), c = r == null ? 0 : r.length, i = bF(this, c + 1), o = U3(this, t), e != c && pc(r, e, i, e + 1, c - e), St(i, e, o), i4(this, i), this.bi(e, t); + }, s.Yh = function(e) { + var t, i, r; + r = (i = u(Rn(this.a, 4), 126), i == null ? 0 : i.length), t = bF(this, r + 1), _O(t, r, U3(this, e)), i4(this, t), this.bi(r, e); + }, s.Zh = function() { + return new pSn(this); + }, s.$h = function() { + return new OCn(this); + }, s._h = function(e) { + var t, i; + if (i = (t = u(Rn(this.a, 4), 126), t == null ? 0 : t.length), e < 0 || e > i) + throw T(new Q0(e, i)); + return new sTn(this, e); + }, s.$b = function() { + var e, t; + ++this.j, e = u(Rn(this.a, 4), 126), t = e == null ? 0 : e.length, i4(this, null), A$(this, t, e); + }, s.Hc = function(e) { + var t, i, r, c, o; + if (t = u(Rn(this.a, 4), 126), t != null) { + if (e != null) { + for (r = t, c = 0, o = r.length; c < o; ++c) + if (i = r[c], tt(e, i)) + return !0; + } else + for (r = t, c = 0, o = r.length; c < o; ++c) + if (i = r[c], B(i) === B(e)) + return !0; + } + return !1; + }, s.Xb = function(e) { + var t, i; + if (t = u(Rn(this.a, 4), 126), i = t == null ? 0 : t.length, e >= i) + throw T(new Q0(e, i)); + return t[e]; + }, s.Xc = function(e) { + var t, i, r; + if (t = u(Rn(this.a, 4), 126), t != null) { + if (e != null) { + for (i = 0, r = t.length; i < r; ++i) + if (tt(e, t[i])) + return i; + } else + for (i = 0, r = t.length; i < r; ++i) + if (B(t[i]) === B(e)) + return i; + } + return -1; + }, s.dc = function() { + return u(Rn(this.a, 4), 126) == null; + }, s.Kc = function() { + return new gSn(this); + }, s.Yc = function() { + return new ICn(this); + }, s.Zc = function(e) { + var t, i; + if (i = (t = u(Rn(this.a, 4), 126), t == null ? 0 : t.length), e < 0 || e > i) + throw T(new Q0(e, i)); + return new uTn(this, e); + }, s.ii = function(e, t) { + var i, r, c; + if (i = k$n(this), c = i == null ? 0 : i.length, e >= c) + throw T(new mr(NB + e + _a + c)); + if (t >= c) + throw T(new mr(BB + t + _a + c)); + return r = i[t], e != t && (e < t ? pc(i, e, i, e + 1, t - e) : pc(i, t + 1, i, t, e - t), St(i, e, r), i4(this, i)), r; + }, s.ki = function(e) { + return u(Rn(this.a, 4), 126)[e]; + }, s.$c = function(e) { + return bme(this, e); + }, s.mi = function(e, t) { + var i, r; + return i = k$n(this), r = i[e], _O(i, e, U3(this, t)), i4(this, i), r; + }, s.gc = function() { + var e; + return e = u(Rn(this.a, 4), 126), e == null ? 0 : e.length; + }, s.Pc = function() { + var e, t, i; + return e = u(Rn(this.a, 4), 126), i = e == null ? 0 : e.length, t = F(bH, qB, 415, i, 0, 1), i > 0 && pc(e, 0, t, 0, i), t; + }, s.Qc = function(e) { + var t, i, r; + return t = u(Rn(this.a, 4), 126), r = t == null ? 0 : t.length, r > 0 && (e.length < r && (i = Q8(Du(e).c, r), e = i), pc(t, 0, e, 0, r)), e.length > r && St(e, r, null), e; + }; + var Nne; + w(zi, "ArrayDelegatingEList", 1982), b(1038, 40, Ei, gSn), s.mj = function() { + if (this.b.j != this.f || B(u(Rn(this.b.a, 4), 126)) !== B(this.a)) + throw T(new vs()); + }, s.Qb = function() { + p6(this), this.a = u(Rn(this.b.a, 4), 126); + }, w(zi, "ArrayDelegatingEList/EIterator", 1038), b(706, 278, hh, ICn, uTn), s.mj = function() { + if (this.b.j != this.f || B(u(Rn(this.b.a, 4), 126)) !== B(this.a)) + throw T(new vs()); + }, s.pj = function(e) { + dFn(this, e), this.a = u(Rn(this.b.a, 4), 126); + }, s.Qb = function() { + p6(this), this.a = u(Rn(this.b.a, 4), 126); + }, w(zi, "ArrayDelegatingEList/EListIterator", 706), b(1039, 341, Ei, pSn), s.mj = function() { + if (this.b.j != this.f || B(u(Rn(this.b.a, 4), 126)) !== B(this.a)) + throw T(new vs()); + }, w(zi, "ArrayDelegatingEList/NonResolvingEIterator", 1039), b(707, 385, hh, OCn, sTn), s.mj = function() { + if (this.b.j != this.f || B(u(Rn(this.b.a, 4), 126)) !== B(this.a)) + throw T(new vs()); + }, w(zi, "ArrayDelegatingEList/NonResolvingEListIterator", 707), b(606, 295, VL, xO), w(zi, "BasicEList/BasicIndexOutOfBoundsException", 606), b(696, 63, Wf, az), s.Vc = function(e, t) { + throw T(new ye()); + }, s.Fc = function(e) { + throw T(new ye()); + }, s.Wc = function(e, t) { + throw T(new ye()); + }, s.Gc = function(e) { + throw T(new ye()); + }, s.$b = function() { + throw T(new ye()); + }, s.qi = function(e) { + throw T(new ye()); + }, s.Kc = function() { + return this.Zh(); + }, s.Yc = function() { + return this.$h(); + }, s.Zc = function(e) { + return this._h(e); + }, s.ii = function(e, t) { + throw T(new ye()); + }, s.ji = function(e, t) { + throw T(new ye()); + }, s.$c = function(e) { + throw T(new ye()); + }, s.Mc = function(e) { + throw T(new ye()); + }, s._c = function(e, t) { + throw T(new ye()); + }, w(zi, "BasicEList/UnmodifiableEList", 696), b(705, 1, { 3: 1, 20: 1, 14: 1, 15: 1, 58: 1, 589: 1 }), s.Vc = function(e, t) { + wce(this, e, u(t, 42)); + }, s.Fc = function(e) { + return eue(this, u(e, 42)); + }, s.Jc = function(e) { + $i(this, e); + }, s.Xb = function(e) { + return u(D(this.c, e), 133); + }, s.ii = function(e, t) { + return u(this.c.ii(e, t), 42); + }, s.ji = function(e, t) { + gce(this, e, u(t, 42)); + }, s.Lc = function() { + return new $n(null, new xn(this, 16)); + }, s.$c = function(e) { + return u(this.c.$c(e), 42); + }, s._c = function(e, t) { + return fhe(this, e, u(t, 42)); + }, s.ad = function(e) { + Lw(this, e); + }, s.Nc = function() { + return new xn(this, 16); + }, s.Oc = function() { + return new $n(null, new xn(this, 16)); + }, s.Wc = function(e, t) { + return this.c.Wc(e, t); + }, s.Gc = function(e) { + return this.c.Gc(e); + }, s.$b = function() { + this.c.$b(); + }, s.Hc = function(e) { + return this.c.Hc(e); + }, s.Ic = function(e) { + return t7(this.c, e); + }, s.qj = function() { + var e, t, i; + if (this.d == null) { + for (this.d = F(u1n, Xtn, 63, 2 * this.f + 1, 0, 1), i = this.e, this.f = 0, t = this.c.Kc(); t.e != t.i.gc(); ) + e = u(t.nj(), 133), KT(this, e); + this.e = i; + } + }, s.Fb = function(e) { + return tEn(this, e); + }, s.Hb = function() { + return DV(this.c); + }, s.Xc = function(e) { + return this.c.Xc(e); + }, s.rj = function() { + this.c = new jmn(this); + }, s.dc = function() { + return this.f == 0; + }, s.Kc = function() { + return this.c.Kc(); + }, s.Yc = function() { + return this.c.Yc(); + }, s.Zc = function(e) { + return this.c.Zc(e); + }, s.sj = function() { + return N8(this); + }, s.tj = function(e, t, i) { + return new mEn(e, t, i); + }, s.uj = function() { + return new W2n(); + }, s.Mc = function(e) { + return xIn(this, e); + }, s.gc = function() { + return this.f; + }, s.bd = function(e, t) { + return new ch(this.c, e, t); + }, s.Pc = function() { + return this.c.Pc(); + }, s.Qc = function(e) { + return this.c.Qc(e); + }, s.Ib = function() { + return CQ(this.c); + }, s.e = 0, s.f = 0, w(zi, "BasicEMap", 705), b(1033, 63, Wf, jmn), s.bi = function(e, t) { + Yte(this, u(t, 133)); + }, s.ei = function(e, t, i) { + var r; + ++(r = this, u(t, 133), r).a.e; + }, s.fi = function(e, t) { + Zte(this, u(t, 133)); + }, s.gi = function(e, t, i) { + Hce(this, u(t, 133), u(i, 133)); + }, s.di = function(e, t) { + TOn(this.a); + }, w(zi, "BasicEMap/1", 1033), b(1034, 63, Wf, W2n), s.ri = function(e) { + return F(hMe, uGn, 612, e, 0, 1); + }, w(zi, "BasicEMap/2", 1034), b(1035, df, gu, Emn), s.$b = function() { + this.a.c.$b(); + }, s.Hc = function(e) { + return NF(this.a, e); + }, s.Kc = function() { + return this.a.f == 0 ? (s3(), xy.a) : new r8n(this.a); + }, s.Mc = function(e) { + var t; + return t = this.a.f, IT(this.a, e), this.a.f != t; + }, s.gc = function() { + return this.a.f; + }, w(zi, "BasicEMap/3", 1035), b(1036, 28, Pb, Cmn), s.$b = function() { + this.a.c.$b(); + }, s.Hc = function(e) { + return fBn(this.a, e); + }, s.Kc = function() { + return this.a.f == 0 ? (s3(), xy.a) : new c8n(this.a); + }, s.gc = function() { + return this.a.f; + }, w(zi, "BasicEMap/4", 1036), b(1037, df, gu, Tmn), s.$b = function() { + this.a.c.$b(); + }, s.Hc = function(e) { + var t, i, r, c, o, f, h, l, a; + if (this.a.f > 0 && I(e, 42) && (this.a.qj(), l = u(e, 42), h = l.cd(), c = h == null ? 0 : kt(h), o = dU(this.a, c), t = this.a.d[o], t)) { + for (i = u(t.g, 367), a = t.i, f = 0; f < a; ++f) + if (r = i[f], r.Sh() == c && r.Fb(l)) + return !0; + } + return !1; + }, s.Kc = function() { + return this.a.f == 0 ? (s3(), xy.a) : new XD(this.a); + }, s.Mc = function(e) { + return eNn(this, e); + }, s.gc = function() { + return this.a.f; + }, w(zi, "BasicEMap/5", 1037), b(613, 1, Ei, XD), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return this.b != -1; + }, s.Pb = function() { + var e; + if (this.f.e != this.c) + throw T(new vs()); + if (this.b == -1) + throw T(new ic()); + return this.d = this.a, this.e = this.b, qFn(this), e = u(this.f.d[this.d].g[this.e], 133), this.vj(e); + }, s.Qb = function() { + if (this.f.e != this.c) + throw T(new vs()); + if (this.e == -1) + throw T(new ou()); + this.f.c.Mc(D(this.f.d[this.d], this.e)), this.c = this.f.e, this.e = -1, this.a == this.d && this.b != -1 && --this.b; + }, s.vj = function(e) { + return e; + }, s.a = 0, s.b = -1, s.c = 0, s.d = 0, s.e = 0, w(zi, "BasicEMap/BasicEMapIterator", 613), b(1031, 613, Ei, r8n), s.vj = function(e) { + return e.cd(); + }, w(zi, "BasicEMap/BasicEMapKeyIterator", 1031), b(1032, 613, Ei, c8n), s.vj = function(e) { + return e.dd(); + }, w(zi, "BasicEMap/BasicEMapValueIterator", 1032), b(1030, 1, c0, Mmn), s.wc = function(e) { + n6(this, e); + }, s.yc = function(e, t, i) { + return IF(this, e, t, i); + }, s.$b = function() { + this.a.c.$b(); + }, s._b = function(e) { + return Bkn(this, e); + }, s.uc = function(e) { + return fBn(this.a, e); + }, s.vc = function() { + return Ode(this.a); + }, s.Fb = function(e) { + return tEn(this.a, e); + }, s.xc = function(e) { + return Ko(this.a, e); + }, s.Hb = function() { + return DV(this.a.c); + }, s.dc = function() { + return this.a.f == 0; + }, s.ec = function() { + return Dde(this.a); + }, s.zc = function(e, t) { + return XT(this.a, e, t); + }, s.Bc = function(e) { + return IT(this.a, e); + }, s.gc = function() { + return this.a.f; + }, s.Ib = function() { + return CQ(this.a.c); + }, s.Cc = function() { + return Ide(this.a); + }, w(zi, "BasicEMap/DelegatingMap", 1030), b(612, 1, { 42: 1, 133: 1, 612: 1 }, mEn), s.Fb = function(e) { + var t; + return I(e, 42) ? (t = u(e, 42), (this.b != null ? tt(this.b, t.cd()) : B(this.b) === B(t.cd())) && (this.c != null ? tt(this.c, t.dd()) : B(this.c) === B(t.dd()))) : !1; + }, s.Sh = function() { + return this.a; + }, s.cd = function() { + return this.b; + }, s.dd = function() { + return this.c; + }, s.Hb = function() { + return this.a ^ (this.c == null ? 0 : kt(this.c)); + }, s.Th = function(e) { + this.a = e; + }, s.Uh = function(e) { + throw T(new ra()); + }, s.ed = function(e) { + var t; + return t = this.c, this.c = e, t; + }, s.Ib = function() { + return this.b + "->" + this.c; + }, s.a = 0; + var hMe = w(zi, "BasicEMap/EntryImpl", 612); + b(536, 1, {}, Qy), w(zi, "BasicEMap/View", 536); + var xy; + b(768, 1, {}), s.Fb = function(e) { + return DY((Pn(), cr), e); + }, s.Hb = function() { + return GV((Pn(), cr)); + }, s.Ib = function() { + return kl((Pn(), cr)); + }, w(zi, "ECollections/BasicEmptyUnmodifiableEList", 768), b(1312, 1, hh, X2n), s.Nb = function(e) { + Oi(this, e); + }, s.Rb = function(e) { + throw T(new ye()); + }, s.Ob = function() { + return !1; + }, s.Sb = function() { + return !1; + }, s.Pb = function() { + throw T(new ic()); + }, s.Tb = function() { + return 0; + }, s.Ub = function() { + throw T(new ic()); + }, s.Vb = function() { + return -1; + }, s.Qb = function() { + throw T(new ye()); + }, s.Wb = function(e) { + throw T(new ye()); + }, w(zi, "ECollections/BasicEmptyUnmodifiableEList/1", 1312), b(1310, 768, { 20: 1, 14: 1, 15: 1, 58: 1 }, w9n), s.Vc = function(e, t) { + M8n(); + }, s.Fc = function(e) { + return A8n(); + }, s.Wc = function(e, t) { + return S8n(); + }, s.Gc = function(e) { + return P8n(); + }, s.$b = function() { + I8n(); + }, s.Hc = function(e) { + return !1; + }, s.Ic = function(e) { + return !1; + }, s.Jc = function(e) { + $i(this, e); + }, s.Xb = function(e) { + return wz((Pn(), e)), null; + }, s.Xc = function(e) { + return -1; + }, s.dc = function() { + return !0; + }, s.Kc = function() { + return this.a; + }, s.Yc = function() { + return this.a; + }, s.Zc = function(e) { + return this.a; + }, s.ii = function(e, t) { + return O8n(); + }, s.ji = function(e, t) { + D8n(); + }, s.Lc = function() { + return new $n(null, new xn(this, 16)); + }, s.$c = function(e) { + return $8n(); + }, s.Mc = function(e) { + return F8n(); + }, s._c = function(e, t) { + return x8n(); + }, s.gc = function() { + return 0; + }, s.ad = function(e) { + Lw(this, e); + }, s.Nc = function() { + return new xn(this, 16); + }, s.Oc = function() { + return new $n(null, new xn(this, 16)); + }, s.bd = function(e, t) { + return Pn(), new ch(cr, e, t); + }, s.Pc = function() { + return wW((Pn(), cr)); + }, s.Qc = function(e) { + return Pn(), y7(cr, e); + }, w(zi, "ECollections/EmptyUnmodifiableEList", 1310), b(1311, 768, { 20: 1, 14: 1, 15: 1, 58: 1, 589: 1 }, g9n), s.Vc = function(e, t) { + M8n(); + }, s.Fc = function(e) { + return A8n(); + }, s.Wc = function(e, t) { + return S8n(); + }, s.Gc = function(e) { + return P8n(); + }, s.$b = function() { + I8n(); + }, s.Hc = function(e) { + return !1; + }, s.Ic = function(e) { + return !1; + }, s.Jc = function(e) { + $i(this, e); + }, s.Xb = function(e) { + return wz((Pn(), e)), null; + }, s.Xc = function(e) { + return -1; + }, s.dc = function() { + return !0; + }, s.Kc = function() { + return this.a; + }, s.Yc = function() { + return this.a; + }, s.Zc = function(e) { + return this.a; + }, s.ii = function(e, t) { + return O8n(); + }, s.ji = function(e, t) { + D8n(); + }, s.Lc = function() { + return new $n(null, new xn(this, 16)); + }, s.$c = function(e) { + return $8n(); + }, s.Mc = function(e) { + return F8n(); + }, s._c = function(e, t) { + return x8n(); + }, s.gc = function() { + return 0; + }, s.ad = function(e) { + Lw(this, e); + }, s.Nc = function() { + return new xn(this, 16); + }, s.Oc = function() { + return new $n(null, new xn(this, 16)); + }, s.bd = function(e, t) { + return Pn(), new ch(cr, e, t); + }, s.Pc = function() { + return wW((Pn(), cr)); + }, s.Qc = function(e) { + return Pn(), y7(cr, e); + }, s.sj = function() { + return Pn(), Pn(), ph; + }, w(zi, "ECollections/EmptyUnmodifiableEMap", 1311); + var o1n = Ct(zi, "Enumerator"), eI; + b(281, 1, { 281: 1 }, zx), s.Fb = function(e) { + var t; + return this === e ? !0 : I(e, 281) ? (t = u(e, 281), this.f == t.f && Ife(this.i, t.i) && vD(this.a, this.f & 256 ? t.f & 256 ? t.a : null : t.f & 256 ? null : t.a) && vD(this.d, t.d) && vD(this.g, t.g) && vD(this.e, t.e) && Cpe(this, t)) : !1; + }, s.Hb = function() { + return this.f; + }, s.Ib = function() { + return _Bn(this); + }, s.f = 0; + var Bne = 0, Rne = 0, _ne = 0, Kne = 0, f1n = 0, h1n = 0, l1n = 0, a1n = 0, d1n = 0, Hne, a9 = 0, d9 = 0, qne = 0, Gne = 0, tI, b1n; + w(zi, "URI", 281), b(1091, 43, sg, p9n), s.zc = function(e, t) { + return u(yr(this, Ce(e), u(t, 281)), 281); + }, w(zi, "URI/URICache", 1091), b(497, 63, Wf, H2n, $E), s.hi = function() { + return !0; + }, w(zi, "UniqueEList", 497), b(581, 60, Uh, xC), w(zi, "WrappedException", 581); + var Be = Ct(Is, fGn), ow = Ct(Is, hGn), su = Ct(Is, lGn), fw = Ct(Is, aGn), Qo = Ct(Is, dGn), ro = Ct(Is, "EClass"), wH = Ct(Is, "EDataType"), zne; + b(1183, 43, sg, v9n), s.xc = function(e) { + return yi(e) ? mc(this, e) : Vr(Sr(this.f, e)); + }, w(Is, "EDataType/Internal/ConversionDelegate/Factory/Registry/Impl", 1183); + var iI = Ct(Is, "EEnum"), e1 = Ct(Is, bGn), dr = Ct(Is, wGn), co = Ct(Is, gGn), uo, I0 = Ct(Is, pGn), hw = Ct(Is, vGn); + b(1029, 1, {}, K2n), s.Ib = function() { + return "NIL"; + }, w(Is, "EStructuralFeature/Internal/DynamicValueHolder/1", 1029); + var Une; + b(1028, 43, sg, m9n), s.xc = function(e) { + return yi(e) ? mc(this, e) : Vr(Sr(this.f, e)); + }, w(Is, "EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl", 1028); + var Gc = Ct(Is, mGn), Ip = Ct(Is, "EValidator/PatternMatcher"), w1n, g1n, Nn, L1, lw, Xl, Wne, Xne, Vne, Vl, N1, Ql, O0, Cf, Qne, Jne, so, B1, Yne, R1, aw, qg, Zi, Zne, nee, D0, rI = Ct(mt, "FeatureMap/Entry"); + b(535, 1, { 72: 1 }, Yj), s.ak = function() { + return this.a; + }, s.dd = function() { + return this.b; + }, w(Bn, "BasicEObjectImpl/1", 535), b(1027, 1, GB, Okn), s.Wj = function(e) { + return T$(this.a, this.b, e); + }, s.fj = function() { + return lMn(this.a, this.b); + }, s.Wb = function(e) { + JW(this.a, this.b, e); + }, s.Xj = function() { + Mhe(this.a, this.b); + }, w(Bn, "BasicEObjectImpl/4", 1027), b(1983, 1, { 108: 1 }), s.bk = function(e) { + this.e = e == 0 ? eee : F(Zn, rn, 1, e, 5, 1); + }, s.Ch = function(e) { + return this.e[e]; + }, s.Dh = function(e, t) { + this.e[e] = t; + }, s.Eh = function(e) { + this.e[e] = null; + }, s.ck = function() { + return this.c; + }, s.dk = function() { + throw T(new ye()); + }, s.ek = function() { + throw T(new ye()); + }, s.fk = function() { + return this.d; + }, s.gk = function() { + return this.e != null; + }, s.hk = function(e) { + this.c = e; + }, s.ik = function(e) { + throw T(new ye()); + }, s.jk = function(e) { + throw T(new ye()); + }, s.kk = function(e) { + this.d = e; + }; + var eee; + w(Bn, "BasicEObjectImpl/EPropertiesHolderBaseImpl", 1983), b(185, 1983, { 108: 1 }, Fo), s.dk = function() { + return this.a; + }, s.ek = function() { + return this.b; + }, s.ik = function(e) { + this.a = e; + }, s.jk = function(e) { + this.b = e; + }, w(Bn, "BasicEObjectImpl/EPropertiesHolderImpl", 185), b(506, 97, kqn, Yy), s.Kg = function() { + return this.f; + }, s.Pg = function() { + return this.k; + }, s.Rg = function(e, t) { + this.g = e, this.i = t; + }, s.Tg = function() { + return this.j & 2 ? this.ph().ck() : this.zh(); + }, s.Vg = function() { + return this.i; + }, s.Mg = function() { + return (this.j & 1) != 0; + }, s.eh = function() { + return this.g; + }, s.kh = function() { + return (this.j & 4) != 0; + }, s.ph = function() { + return !this.k && (this.k = new Fo()), this.k; + }, s.th = function(e) { + this.ph().hk(e), e ? this.j |= 2 : this.j &= -3; + }, s.vh = function(e) { + this.ph().jk(e), e ? this.j |= 4 : this.j &= -5; + }, s.zh = function() { + return (ol(), Nn).S; + }, s.i = 0, s.j = 1, w(Bn, "EObjectImpl", 506), b(780, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1 }, JU), s.Ch = function(e) { + return this.e[e]; + }, s.Dh = function(e, t) { + this.e[e] = t; + }, s.Eh = function(e) { + this.e[e] = null; + }, s.Tg = function() { + return this.d; + }, s.Yg = function(e) { + return jt(this.d, e); + }, s.$g = function() { + return this.d; + }, s.dh = function() { + return this.e != null; + }, s.ph = function() { + return !this.k && (this.k = new V2n()), this.k; + }, s.th = function(e) { + this.d = e; + }, s.yh = function() { + var e; + return this.e == null && (e = ee(this.d), this.e = e == 0 ? tee : F(Zn, rn, 1, e, 5, 1)), this; + }, s.Ah = function() { + return 0; + }; + var tee; + w(Bn, "DynamicEObjectImpl", 780), b(1376, 780, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1 }, UEn), s.Fb = function(e) { + return this === e; + }, s.Hb = function() { + return kd(this); + }, s.th = function(e) { + this.d = e, this.b = R7(e, "key"), this.c = R7(e, im); + }, s.Sh = function() { + var e; + return this.a == -1 && (e = N$(this, this.b), this.a = e == null ? 0 : kt(e)), this.a; + }, s.cd = function() { + return N$(this, this.b); + }, s.dd = function() { + return N$(this, this.c); + }, s.Th = function(e) { + this.a = e; + }, s.Uh = function(e) { + JW(this, this.b, e); + }, s.ed = function(e) { + var t; + return t = N$(this, this.c), JW(this, this.c, e), t; + }, s.a = 0, w(Bn, "DynamicEObjectImpl/BasicEMapEntry", 1376), b(1377, 1, { 108: 1 }, V2n), s.bk = function(e) { + throw T(new ye()); + }, s.Ch = function(e) { + throw T(new ye()); + }, s.Dh = function(e, t) { + throw T(new ye()); + }, s.Eh = function(e) { + throw T(new ye()); + }, s.ck = function() { + throw T(new ye()); + }, s.dk = function() { + return this.a; + }, s.ek = function() { + return this.b; + }, s.fk = function() { + return this.c; + }, s.gk = function() { + throw T(new ye()); + }, s.hk = function(e) { + throw T(new ye()); + }, s.ik = function(e) { + this.a = e; + }, s.jk = function(e) { + this.b = e; + }, s.kk = function(e) { + this.c = e; + }, w(Bn, "DynamicEObjectImpl/DynamicEPropertiesHolderImpl", 1377), b(510, 150, { 105: 1, 92: 1, 90: 1, 590: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 510: 1, 150: 1, 114: 1, 115: 1 }, JH), s.Qg = function(e) { + return gJ(this, e); + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.d; + case 2: + return i ? (!this.b && (this.b = new Gu((Sn(), Zi), tc, this)), this.b) : (!this.b && (this.b = new Gu((Sn(), Zi), tc, this)), N8(this.b)); + case 3: + return gMn(this); + case 4: + return !this.a && (this.a = new Yt(zl, this, 4)), this.a; + case 5: + return !this.c && (this.c = new Aw(zl, this, 5)), this.c; + } + return Cs(this, e - ee((Sn(), L1)), On((r = u(Rn(this, 16), 26), r || L1), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 3: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? gJ(this, i) : this.Cb.ih(this, -1 - c, null, i))), dW(this, u(e, 147), i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || (Sn(), L1)), t), 66), o.Nj().Qj(this, Bc(this), t - ee((Sn(), L1)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 2: + return !this.b && (this.b = new Gu((Sn(), Zi), tc, this)), yE(this.b, e, i); + case 3: + return dW(this, null, i); + case 4: + return !this.a && (this.a = new Yt(zl, this, 4)), Gi(this.a, e, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), L1)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), L1)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.d != null; + case 2: + return !!this.b && this.b.f != 0; + case 3: + return !!gMn(this); + case 4: + return !!this.a && this.a.i != 0; + case 5: + return !!this.c && this.c.i != 0; + } + return js(this, e - ee((Sn(), L1)), On((t = u(Rn(this, 16), 26), t || L1), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + wfe(this, Ce(t)); + return; + case 2: + !this.b && (this.b = new Gu((Sn(), Zi), tc, this)), fT(this.b, t); + return; + case 3: + INn(this, u(t, 147)); + return; + case 4: + !this.a && (this.a = new Yt(zl, this, 4)), de(this.a), !this.a && (this.a = new Yt(zl, this, 4)), Ft(this.a, u(t, 14)); + return; + case 5: + !this.c && (this.c = new Aw(zl, this, 5)), de(this.c), !this.c && (this.c = new Aw(zl, this, 5)), Ft(this.c, u(t, 14)); + return; + } + Ps(this, e - ee((Sn(), L1)), On((i = u(Rn(this, 16), 26), i || L1), e), t); + }, s.zh = function() { + return Sn(), L1; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + pV(this, null); + return; + case 2: + !this.b && (this.b = new Gu((Sn(), Zi), tc, this)), this.b.c.$b(); + return; + case 3: + INn(this, null); + return; + case 4: + !this.a && (this.a = new Yt(zl, this, 4)), de(this.a); + return; + case 5: + !this.c && (this.c = new Aw(zl, this, 5)), de(this.c); + return; + } + As(this, e - ee((Sn(), L1)), On((t = u(Rn(this, 16), 26), t || L1), e)); + }, s.Ib = function() { + return zDn(this); + }, s.d = null, w(Bn, "EAnnotationImpl", 510), b(151, 705, Vtn, Xu), s.Xh = function(e, t) { + Jre(this, e, u(t, 42)); + }, s.lk = function(e, t) { + return zue(this, u(e, 42), t); + }, s.pi = function(e) { + return u(u(this.c, 69).pi(e), 133); + }, s.Zh = function() { + return u(this.c, 69).Zh(); + }, s.$h = function() { + return u(this.c, 69).$h(); + }, s._h = function(e) { + return u(this.c, 69)._h(e); + }, s.mk = function(e, t) { + return yE(this, e, t); + }, s.Wj = function(e) { + return u(this.c, 76).Wj(e); + }, s.rj = function() { + }, s.fj = function() { + return u(this.c, 76).fj(); + }, s.tj = function(e, t, i) { + var r; + return r = u(is(this.b).Nh().Jh(this.b), 133), r.Th(e), r.Uh(t), r.ed(i), r; + }, s.uj = function() { + return new Lq(this); + }, s.Wb = function(e) { + fT(this, e); + }, s.Xj = function() { + u(this.c, 76).Xj(); + }, w(mt, "EcoreEMap", 151), b(158, 151, Vtn, Gu), s.qj = function() { + var e, t, i, r, c, o; + if (this.d == null) { + for (o = F(u1n, Xtn, 63, 2 * this.f + 1, 0, 1), i = this.c.Kc(); i.e != i.i.gc(); ) + t = u(i.nj(), 133), r = t.Sh(), c = (r & nt) % o.length, e = o[c], !e && (e = o[c] = new Lq(this)), e.Fc(t); + this.d = o; + } + }, w(Bn, "EAnnotationImpl/1", 158), b(284, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 284: 1, 114: 1, 115: 1 }), s._g = function(e, t, i) { + var r, c; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return qn(), !!(this.Bb & 256); + case 3: + return qn(), !!(this.Bb & 512); + case 4: + return Q(this.s); + case 5: + return Q(this.t); + case 6: + return qn(), !!this.$j(); + case 7: + return qn(), c = this.s, c >= 1; + case 8: + return t ? qs(this) : this.r; + case 9: + return this.q; + } + return Cs(this, e - ee(this.zh()), On((r = u(Rn(this, 16), 26), r || this.zh()), e), t, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 9: + return xD(this, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || this.zh()), t), 66), c.Nj().Rj(this, Bc(this), t - ee(this.zh()), e, i); + }, s.lh = function(e) { + var t, i; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return this.$j(); + case 7: + return i = this.s, i >= 1; + case 8: + return !!this.r && !this.q.e && Sd(this.q).i == 0; + case 9: + return !!this.q && !(this.r && !this.q.e && Sd(this.q).i == 0); + } + return js(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.sh = function(e, t) { + var i, r; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + this.Lh(Ce(t)); + return; + case 2: + p1(this, on(sn(t))); + return; + case 3: + v1(this, on(sn(t))); + return; + case 4: + b1(this, u(t, 19).a); + return; + case 5: + this.ok(u(t, 19).a); + return; + case 8: + Ta(this, u(t, 138)); + return; + case 9: + r = af(this, u(t, 87), null), r && r.Fi(); + return; + } + Ps(this, e - ee(this.zh()), On((i = u(Rn(this, 16), 26), i || this.zh()), e), t); + }, s.zh = function() { + return Sn(), nee; + }, s.Bh = function(e) { + var t, i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + this.Lh(null); + return; + case 2: + p1(this, !0); + return; + case 3: + v1(this, !0); + return; + case 4: + b1(this, 0); + return; + case 5: + this.ok(1); + return; + case 8: + Ta(this, null); + return; + case 9: + i = af(this, null, null), i && i.Fi(); + return; + } + As(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.Gh = function() { + qs(this), this.Bb |= 1; + }, s.Yj = function() { + return qs(this); + }, s.Zj = function() { + return this.t; + }, s.$j = function() { + var e; + return e = this.t, e > 1 || e == -1; + }, s.hi = function() { + return (this.Bb & 512) != 0; + }, s.nk = function(e, t) { + return lQ(this, e, t); + }, s.ok = function(e) { + lb(this, e); + }, s.Ib = function() { + return jY(this); + }, s.s = 0, s.t = 1, w(Bn, "ETypedElementImpl", 284), b(449, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }), s.Qg = function(e) { + return AFn(this, e); + }, s._g = function(e, t, i) { + var r, c; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return qn(), !!(this.Bb & 256); + case 3: + return qn(), !!(this.Bb & 512); + case 4: + return Q(this.s); + case 5: + return Q(this.t); + case 6: + return qn(), !!this.$j(); + case 7: + return qn(), c = this.s, c >= 1; + case 8: + return t ? qs(this) : this.r; + case 9: + return this.q; + case 10: + return qn(), !!(this.Bb & Eo); + case 11: + return qn(), !!(this.Bb & Rb); + case 12: + return qn(), !!(this.Bb & Ob); + case 13: + return this.j; + case 14: + return b4(this); + case 15: + return qn(), !!(this.Bb & vu); + case 16: + return qn(), !!(this.Bb & Nf); + case 17: + return tb(this); + } + return Cs(this, e - ee(this.zh()), On((r = u(Rn(this, 16), 26), r || this.zh()), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 17: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? AFn(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 17, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || this.zh()), t), 66), o.Nj().Qj(this, Bc(this), t - ee(this.zh()), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 9: + return xD(this, i); + case 17: + return os(this, null, 17, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || this.zh()), t), 66), c.Nj().Rj(this, Bc(this), t - ee(this.zh()), e, i); + }, s.lh = function(e) { + var t, i; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return this.$j(); + case 7: + return i = this.s, i >= 1; + case 8: + return !!this.r && !this.q.e && Sd(this.q).i == 0; + case 9: + return !!this.q && !(this.r && !this.q.e && Sd(this.q).i == 0); + case 10: + return (this.Bb & Eo) == 0; + case 11: + return (this.Bb & Rb) != 0; + case 12: + return (this.Bb & Ob) != 0; + case 13: + return this.j != null; + case 14: + return b4(this) != null; + case 15: + return (this.Bb & vu) != 0; + case 16: + return (this.Bb & Nf) != 0; + case 17: + return !!tb(this); + } + return js(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.sh = function(e, t) { + var i, r; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + f$(this, Ce(t)); + return; + case 2: + p1(this, on(sn(t))); + return; + case 3: + v1(this, on(sn(t))); + return; + case 4: + b1(this, u(t, 19).a); + return; + case 5: + this.ok(u(t, 19).a); + return; + case 8: + Ta(this, u(t, 138)); + return; + case 9: + r = af(this, u(t, 87), null), r && r.Fi(); + return; + case 10: + J3(this, on(sn(t))); + return; + case 11: + n4(this, on(sn(t))); + return; + case 12: + Y3(this, on(sn(t))); + return; + case 13: + dz(this, Ce(t)); + return; + case 15: + Z3(this, on(sn(t))); + return; + case 16: + e4(this, on(sn(t))); + return; + } + Ps(this, e - ee(this.zh()), On((i = u(Rn(this, 16), 26), i || this.zh()), e), t); + }, s.zh = function() { + return Sn(), Zne; + }, s.Bh = function(e) { + var t, i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + I(this.Cb, 88) && jb(Iu(u(this.Cb, 88)), 4), Oc(this, null); + return; + case 2: + p1(this, !0); + return; + case 3: + v1(this, !0); + return; + case 4: + b1(this, 0); + return; + case 5: + this.ok(1); + return; + case 8: + Ta(this, null); + return; + case 9: + i = af(this, null, null), i && i.Fi(); + return; + case 10: + J3(this, !0); + return; + case 11: + n4(this, !1); + return; + case 12: + Y3(this, !1); + return; + case 13: + this.i = null, nT(this, null); + return; + case 15: + Z3(this, !1); + return; + case 16: + e4(this, !1); + return; + } + As(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.Gh = function() { + p3(Er((wu(), xi), this)), qs(this), this.Bb |= 1; + }, s.Gj = function() { + return this.f; + }, s.zj = function() { + return b4(this); + }, s.Hj = function() { + return tb(this); + }, s.Lj = function() { + return null; + }, s.pk = function() { + return this.k; + }, s.aj = function() { + return this.n; + }, s.Mj = function() { + return QT(this); + }, s.Nj = function() { + var e, t, i, r, c, o, f, h, l; + return this.p || (i = tb(this), (i.i == null && Lf(i), i.i).length, r = this.Lj(), r && ee(tb(r)), c = qs(this), f = c.Bj(), e = f ? f.i & 1 ? f == _u ? oi : f == be ? Ui : f == bw ? z4 : f == Ci ? Si : f == Yl ? d0 : f == Wg ? b0 : f == ku ? op : bm : f : null, t = b4(this), h = c.zj(), Vge(this), this.Bb & Nf && ((o = EJ((wu(), xi), i)) && o != this || (o = A2(Er(xi, this)))) ? this.p = new $kn(this, o) : this.$j() ? this.rk() ? r ? this.Bb & vu ? e ? this.sk() ? this.p = new la(47, e, this, r) : this.p = new la(5, e, this, r) : this.sk() ? this.p = new ba(46, this, r) : this.p = new ba(4, this, r) : e ? this.sk() ? this.p = new la(49, e, this, r) : this.p = new la(7, e, this, r) : this.sk() ? this.p = new ba(48, this, r) : this.p = new ba(6, this, r) : this.Bb & vu ? e ? e == qa ? this.p = new o1(50, xne, this) : this.sk() ? this.p = new o1(43, e, this) : this.p = new o1(1, e, this) : this.sk() ? this.p = new h1(42, this) : this.p = new h1(0, this) : e ? e == qa ? this.p = new o1(41, xne, this) : this.sk() ? this.p = new o1(45, e, this) : this.p = new o1(3, e, this) : this.sk() ? this.p = new h1(44, this) : this.p = new h1(2, this) : I(c, 148) ? e == rI ? this.p = new h1(40, this) : this.Bb & 512 ? this.Bb & vu ? e ? this.p = new o1(9, e, this) : this.p = new h1(8, this) : e ? this.p = new o1(11, e, this) : this.p = new h1(10, this) : this.Bb & vu ? e ? this.p = new o1(13, e, this) : this.p = new h1(12, this) : e ? this.p = new o1(15, e, this) : this.p = new h1(14, this) : r ? (l = r.t, l > 1 || l == -1 ? this.sk() ? this.Bb & vu ? e ? this.p = new la(25, e, this, r) : this.p = new ba(24, this, r) : e ? this.p = new la(27, e, this, r) : this.p = new ba(26, this, r) : this.Bb & vu ? e ? this.p = new la(29, e, this, r) : this.p = new ba(28, this, r) : e ? this.p = new la(31, e, this, r) : this.p = new ba(30, this, r) : this.sk() ? this.Bb & vu ? e ? this.p = new la(33, e, this, r) : this.p = new ba(32, this, r) : e ? this.p = new la(35, e, this, r) : this.p = new ba(34, this, r) : this.Bb & vu ? e ? this.p = new la(37, e, this, r) : this.p = new ba(36, this, r) : e ? this.p = new la(39, e, this, r) : this.p = new ba(38, this, r)) : this.sk() ? this.Bb & vu ? e ? this.p = new o1(17, e, this) : this.p = new h1(16, this) : e ? this.p = new o1(19, e, this) : this.p = new h1(18, this) : this.Bb & vu ? e ? this.p = new o1(21, e, this) : this.p = new h1(20, this) : e ? this.p = new o1(23, e, this) : this.p = new h1(22, this) : this.qk() ? this.sk() ? this.p = new kEn(u(c, 26), this, r) : this.p = new QW(u(c, 26), this, r) : I(c, 148) ? e == rI ? this.p = new h1(40, this) : this.Bb & vu ? e ? this.p = new vCn(t, h, this, (LF(), f == be ? E1n : f == _u ? v1n : f == Yl ? C1n : f == bw ? j1n : f == Ci ? y1n : f == Wg ? T1n : f == ku ? m1n : f == Ls ? k1n : vH)) : this.p = new ITn(u(c, 148), t, h, this) : e ? this.p = new pCn(t, h, this, (LF(), f == be ? E1n : f == _u ? v1n : f == Yl ? C1n : f == bw ? j1n : f == Ci ? y1n : f == Wg ? T1n : f == ku ? m1n : f == Ls ? k1n : vH)) : this.p = new PTn(u(c, 148), t, h, this) : this.rk() ? r ? this.Bb & vu ? this.sk() ? this.p = new jEn(u(c, 26), this, r) : this.p = new KU(u(c, 26), this, r) : this.sk() ? this.p = new yEn(u(c, 26), this, r) : this.p = new lD(u(c, 26), this, r) : this.Bb & vu ? this.sk() ? this.p = new pjn(u(c, 26), this) : this.p = new eU(u(c, 26), this) : this.sk() ? this.p = new gjn(u(c, 26), this) : this.p = new JO(u(c, 26), this) : this.sk() ? r ? this.Bb & vu ? this.p = new EEn(u(c, 26), this, r) : this.p = new RU(u(c, 26), this, r) : this.Bb & vu ? this.p = new vjn(u(c, 26), this) : this.p = new tU(u(c, 26), this) : r ? this.Bb & vu ? this.p = new CEn(u(c, 26), this, r) : this.p = new _U(u(c, 26), this, r) : this.Bb & vu ? this.p = new mjn(u(c, 26), this) : this.p = new FE(u(c, 26), this)), this.p; + }, s.Ij = function() { + return (this.Bb & Eo) != 0; + }, s.qk = function() { + return !1; + }, s.rk = function() { + return !1; + }, s.Jj = function() { + return (this.Bb & Nf) != 0; + }, s.Oj = function() { + return R$(this); + }, s.sk = function() { + return !1; + }, s.Kj = function() { + return (this.Bb & vu) != 0; + }, s.tk = function(e) { + this.k = e; + }, s.Lh = function(e) { + f$(this, e); + }, s.Ib = function() { + return bM(this); + }, s.e = !1, s.n = 0, w(Bn, "EStructuralFeatureImpl", 449), b(322, 449, { 105: 1, 92: 1, 90: 1, 34: 1, 147: 1, 191: 1, 56: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 322: 1, 150: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }, BI), s._g = function(e, t, i) { + var r, c; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return qn(), !!(this.Bb & 256); + case 3: + return qn(), !!(this.Bb & 512); + case 4: + return Q(this.s); + case 5: + return Q(this.t); + case 6: + return qn(), !!vY(this); + case 7: + return qn(), c = this.s, c >= 1; + case 8: + return t ? qs(this) : this.r; + case 9: + return this.q; + case 10: + return qn(), !!(this.Bb & Eo); + case 11: + return qn(), !!(this.Bb & Rb); + case 12: + return qn(), !!(this.Bb & Ob); + case 13: + return this.j; + case 14: + return b4(this); + case 15: + return qn(), !!(this.Bb & vu); + case 16: + return qn(), !!(this.Bb & Nf); + case 17: + return tb(this); + case 18: + return qn(), !!(this.Bb & uc); + case 19: + return t ? iF(this) : ISn(this); + } + return Cs(this, e - ee((Sn(), lw)), On((r = u(Rn(this, 16), 26), r || lw), e), t, i); + }, s.lh = function(e) { + var t, i; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return vY(this); + case 7: + return i = this.s, i >= 1; + case 8: + return !!this.r && !this.q.e && Sd(this.q).i == 0; + case 9: + return !!this.q && !(this.r && !this.q.e && Sd(this.q).i == 0); + case 10: + return (this.Bb & Eo) == 0; + case 11: + return (this.Bb & Rb) != 0; + case 12: + return (this.Bb & Ob) != 0; + case 13: + return this.j != null; + case 14: + return b4(this) != null; + case 15: + return (this.Bb & vu) != 0; + case 16: + return (this.Bb & Nf) != 0; + case 17: + return !!tb(this); + case 18: + return (this.Bb & uc) != 0; + case 19: + return !!ISn(this); + } + return js(this, e - ee((Sn(), lw)), On((t = u(Rn(this, 16), 26), t || lw), e)); + }, s.sh = function(e, t) { + var i, r; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + f$(this, Ce(t)); + return; + case 2: + p1(this, on(sn(t))); + return; + case 3: + v1(this, on(sn(t))); + return; + case 4: + b1(this, u(t, 19).a); + return; + case 5: + o8n(this, u(t, 19).a); + return; + case 8: + Ta(this, u(t, 138)); + return; + case 9: + r = af(this, u(t, 87), null), r && r.Fi(); + return; + case 10: + J3(this, on(sn(t))); + return; + case 11: + n4(this, on(sn(t))); + return; + case 12: + Y3(this, on(sn(t))); + return; + case 13: + dz(this, Ce(t)); + return; + case 15: + Z3(this, on(sn(t))); + return; + case 16: + e4(this, on(sn(t))); + return; + case 18: + SF(this, on(sn(t))); + return; + } + Ps(this, e - ee((Sn(), lw)), On((i = u(Rn(this, 16), 26), i || lw), e), t); + }, s.zh = function() { + return Sn(), lw; + }, s.Bh = function(e) { + var t, i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + I(this.Cb, 88) && jb(Iu(u(this.Cb, 88)), 4), Oc(this, null); + return; + case 2: + p1(this, !0); + return; + case 3: + v1(this, !0); + return; + case 4: + b1(this, 0); + return; + case 5: + this.b = 0, lb(this, 1); + return; + case 8: + Ta(this, null); + return; + case 9: + i = af(this, null, null), i && i.Fi(); + return; + case 10: + J3(this, !0); + return; + case 11: + n4(this, !1); + return; + case 12: + Y3(this, !1); + return; + case 13: + this.i = null, nT(this, null); + return; + case 15: + Z3(this, !1); + return; + case 16: + e4(this, !1); + return; + case 18: + SF(this, !1); + return; + } + As(this, e - ee((Sn(), lw)), On((t = u(Rn(this, 16), 26), t || lw), e)); + }, s.Gh = function() { + iF(this), p3(Er((wu(), xi), this)), qs(this), this.Bb |= 1; + }, s.$j = function() { + return vY(this); + }, s.nk = function(e, t) { + return this.b = 0, this.a = null, lQ(this, e, t); + }, s.ok = function(e) { + o8n(this, e); + }, s.Ib = function() { + var e; + return this.Db & 64 ? bM(this) : (e = new Bs(bM(this)), e.a += " (iD: ", c1(e, (this.Bb & uc) != 0), e.a += ")", e.a); + }, s.b = 0, w(Bn, "EAttributeImpl", 322), b(351, 438, { 105: 1, 92: 1, 90: 1, 138: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 150: 1, 114: 1, 115: 1, 676: 1 }), s.uk = function(e) { + return e.Tg() == this; + }, s.Qg = function(e) { + return ox(this, e); + }, s.Rg = function(e, t) { + this.w = null, this.Db = t << 16 | this.Db & 255, this.Cb = e; + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return Jd(this); + case 4: + return this.zj(); + case 5: + return this.F; + case 6: + return t ? is(this) : k3(this); + case 7: + return !this.A && (this.A = new hu(Gc, this, 7)), this.A; + } + return Cs(this, e - ee(this.zh()), On((r = u(Rn(this, 16), 26), r || this.zh()), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 6: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? ox(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 6, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || this.zh()), t), 66), o.Nj().Qj(this, Bc(this), t - ee(this.zh()), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 6: + return os(this, null, 6, i); + case 7: + return !this.A && (this.A = new hu(Gc, this, 7)), Gi(this.A, e, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || this.zh()), t), 66), c.Nj().Rj(this, Bc(this), t - ee(this.zh()), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!Jd(this); + case 4: + return this.zj() != null; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!k3(this); + case 7: + return !!this.A && this.A.i != 0; + } + return js(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + bC(this, Ce(t)); + return; + case 2: + BO(this, Ce(t)); + return; + case 5: + k4(this, Ce(t)); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A), !this.A && (this.A = new hu(Gc, this, 7)), Ft(this.A, u(t, 14)); + return; + } + Ps(this, e - ee(this.zh()), On((i = u(Rn(this, 16), 26), i || this.zh()), e), t); + }, s.zh = function() { + return Sn(), Wne; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + I(this.Cb, 179) && (u(this.Cb, 179).tb = null), Oc(this, null); + return; + case 2: + W3(this, null), x3(this, this.D); + return; + case 5: + k4(this, null); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A); + return; + } + As(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.yj = function() { + var e; + return this.G == -1 && (this.G = (e = is(this), e ? m1(e.Mh(), this) : -1)), this.G; + }, s.zj = function() { + return null; + }, s.Aj = function() { + return is(this); + }, s.vk = function() { + return this.v; + }, s.Bj = function() { + return Jd(this); + }, s.Cj = function() { + return this.D != null ? this.D : this.B; + }, s.Dj = function() { + return this.F; + }, s.wj = function(e) { + return nL(this, e); + }, s.wk = function(e) { + this.v = e; + }, s.xk = function(e) { + uOn(this, e); + }, s.yk = function(e) { + this.C = e; + }, s.Lh = function(e) { + bC(this, e); + }, s.Ib = function() { + return MT(this); + }, s.C = null, s.D = null, s.G = -1, w(Bn, "EClassifierImpl", 351), b(88, 351, { 105: 1, 92: 1, 90: 1, 26: 1, 138: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 88: 1, 351: 1, 150: 1, 473: 1, 114: 1, 115: 1, 676: 1 }, tq), s.uk = function(e) { + return Oue(this, e.Tg()); + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return Jd(this); + case 4: + return null; + case 5: + return this.F; + case 6: + return t ? is(this) : k3(this); + case 7: + return !this.A && (this.A = new hu(Gc, this, 7)), this.A; + case 8: + return qn(), !!(this.Bb & 256); + case 9: + return qn(), !!(this.Bb & 512); + case 10: + return Ar(this); + case 11: + return !this.q && (this.q = new V(co, this, 11, 10)), this.q; + case 12: + return ig(this); + case 13: + return I6(this); + case 14: + return I6(this), this.r; + case 15: + return ig(this), this.k; + case 16: + return oY(this); + case 17: + return cL(this); + case 18: + return Lf(this); + case 19: + return sM(this); + case 20: + return ig(this), this.o; + case 21: + return !this.s && (this.s = new V(su, this, 21, 17)), this.s; + case 22: + return wc(this); + case 23: + return Gx(this); + } + return Cs(this, e - ee((Sn(), Xl)), On((r = u(Rn(this, 16), 26), r || Xl), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 6: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? ox(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 6, i); + case 11: + return !this.q && (this.q = new V(co, this, 11, 10)), Dc(this.q, e, i); + case 21: + return !this.s && (this.s = new V(su, this, 21, 17)), Dc(this.s, e, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || (Sn(), Xl)), t), 66), o.Nj().Qj(this, Bc(this), t - ee((Sn(), Xl)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 6: + return os(this, null, 6, i); + case 7: + return !this.A && (this.A = new hu(Gc, this, 7)), Gi(this.A, e, i); + case 11: + return !this.q && (this.q = new V(co, this, 11, 10)), Gi(this.q, e, i); + case 21: + return !this.s && (this.s = new V(su, this, 21, 17)), Gi(this.s, e, i); + case 22: + return Gi(wc(this), e, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), Xl)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), Xl)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!Jd(this); + case 4: + return !1; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!k3(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) != 0; + case 9: + return (this.Bb & 512) != 0; + case 10: + return !!this.u && wc(this.u.a).i != 0 && !(this.n && JF(this.n)); + case 11: + return !!this.q && this.q.i != 0; + case 12: + return ig(this).i != 0; + case 13: + return I6(this).i != 0; + case 14: + return I6(this), this.r.i != 0; + case 15: + return ig(this), this.k.i != 0; + case 16: + return oY(this).i != 0; + case 17: + return cL(this).i != 0; + case 18: + return Lf(this).i != 0; + case 19: + return sM(this).i != 0; + case 20: + return ig(this), !!this.o; + case 21: + return !!this.s && this.s.i != 0; + case 22: + return !!this.n && JF(this.n); + case 23: + return Gx(this).i != 0; + } + return js(this, e - ee((Sn(), Xl)), On((t = u(Rn(this, 16), 26), t || Xl), e)); + }, s.oh = function(e) { + var t; + return t = this.i == null || this.q && this.q.i != 0 ? null : R7(this, e), t || RZ(this, e); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + bC(this, Ce(t)); + return; + case 2: + BO(this, Ce(t)); + return; + case 5: + k4(this, Ce(t)); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A), !this.A && (this.A = new hu(Gc, this, 7)), Ft(this.A, u(t, 14)); + return; + case 8: + dQ(this, on(sn(t))); + return; + case 9: + bQ(this, on(sn(t))); + return; + case 10: + $6(Ar(this)), Ft(Ar(this), u(t, 14)); + return; + case 11: + !this.q && (this.q = new V(co, this, 11, 10)), de(this.q), !this.q && (this.q = new V(co, this, 11, 10)), Ft(this.q, u(t, 14)); + return; + case 21: + !this.s && (this.s = new V(su, this, 21, 17)), de(this.s), !this.s && (this.s = new V(su, this, 21, 17)), Ft(this.s, u(t, 14)); + return; + case 22: + de(wc(this)), Ft(wc(this), u(t, 14)); + return; + } + Ps(this, e - ee((Sn(), Xl)), On((i = u(Rn(this, 16), 26), i || Xl), e), t); + }, s.zh = function() { + return Sn(), Xl; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + I(this.Cb, 179) && (u(this.Cb, 179).tb = null), Oc(this, null); + return; + case 2: + W3(this, null), x3(this, this.D); + return; + case 5: + k4(this, null); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A); + return; + case 8: + dQ(this, !1); + return; + case 9: + bQ(this, !1); + return; + case 10: + this.u && $6(this.u); + return; + case 11: + !this.q && (this.q = new V(co, this, 11, 10)), de(this.q); + return; + case 21: + !this.s && (this.s = new V(su, this, 21, 17)), de(this.s); + return; + case 22: + this.n && de(this.n); + return; + } + As(this, e - ee((Sn(), Xl)), On((t = u(Rn(this, 16), 26), t || Xl), e)); + }, s.Gh = function() { + var e, t; + if (ig(this), I6(this), oY(this), cL(this), Lf(this), sM(this), Gx(this), U5(Xoe(Iu(this))), this.s) + for (e = 0, t = this.s.i; e < t; ++e) + s8(D(this.s, e)); + if (this.q) + for (e = 0, t = this.q.i; e < t; ++e) + s8(D(this.q, e)); + g1((wu(), xi), this).ne(), this.Bb |= 1; + }, s.Ib = function() { + return IJ(this); + }, s.k = null, s.r = null; + var b9, iee, gH; + w(Bn, "EClassImpl", 88), b(1994, 1993, jGn), s.Vh = function(e, t) { + return eL(this, e, t); + }, s.Wh = function(e) { + return eL(this, this.i, e); + }, s.Xh = function(e, t) { + EY(this, e, t); + }, s.Yh = function(e) { + $x(this, e); + }, s.lk = function(e, t) { + return Dc(this, e, t); + }, s.pi = function(e) { + return zX(this, e); + }, s.mk = function(e, t) { + return Gi(this, e, t); + }, s.mi = function(e, t) { + return gRn(this, e, t); + }, s.Zh = function() { + return new w2(this); + }, s.$h = function() { + return new u8(this); + }, s._h = function(e) { + return J8(this, e); + }, w(mt, "NotifyingInternalEListImpl", 1994), b(622, 1994, Br), s.Hc = function(e) { + return FRn(this, e); + }, s.Zi = function(e, t, i, r, c) { + return _5(this, e, t, i, r, c); + }, s.$i = function(e) { + qp(this, e); + }, s.Wj = function(e) { + return this; + }, s.ak = function() { + return On(this.e.Tg(), this.aj()); + }, s._i = function() { + return this.ak(); + }, s.aj = function() { + return jt(this.e.Tg(), this.ak()); + }, s.zk = function() { + return u(this.ak().Yj(), 26).Bj(); + }, s.Ak = function() { + return ir(u(this.ak(), 18)).n; + }, s.Ai = function() { + return this.e; + }, s.Bk = function() { + return !0; + }, s.Ck = function() { + return !1; + }, s.Dk = function() { + return !1; + }, s.Ek = function() { + return !1; + }, s.Xc = function(e) { + return m1(this, e); + }, s.cj = function(e, t) { + var i; + return i = u(e, 49), this.Dk() ? this.Bk() ? i.gh(this.e, this.Ak(), this.zk(), t) : i.gh(this.e, jt(i.Tg(), ir(u(this.ak(), 18))), null, t) : i.gh(this.e, -1 - this.aj(), null, t); + }, s.dj = function(e, t) { + var i; + return i = u(e, 49), this.Dk() ? this.Bk() ? i.ih(this.e, this.Ak(), this.zk(), t) : i.ih(this.e, jt(i.Tg(), ir(u(this.ak(), 18))), null, t) : i.ih(this.e, -1 - this.aj(), null, t); + }, s.rk = function() { + return !1; + }, s.Fk = function() { + return !0; + }, s.wj = function(e) { + return IAn(this.d, e); + }, s.ej = function() { + return qu(this.e); + }, s.fj = function() { + return this.i != 0; + }, s.ri = function(e) { + return Q8(this.d, e); + }, s.li = function(e, t) { + return this.Fk() && this.Ek() ? U2(this, e, u(t, 56)) : t; + }, s.Gk = function(e) { + return e.kh() ? pl(this.e, u(e, 49)) : e; + }, s.Wb = function(e) { + Pyn(this, e); + }, s.Pc = function() { + return bPn(this); + }, s.Qc = function(e) { + var t; + if (this.Ek()) + for (t = this.i - 1; t >= 0; --t) + D(this, t); + return LQ(this, e); + }, s.Xj = function() { + de(this); + }, s.oi = function(e, t) { + return PIn(this, e, t); + }, w(mt, "EcoreEList", 622), b(496, 622, Br, v8), s.ai = function() { + return !1; + }, s.aj = function() { + return this.c; + }, s.bj = function() { + return !1; + }, s.Fk = function() { + return !0; + }, s.hi = function() { + return !0; + }, s.li = function(e, t) { + return t; + }, s.ni = function() { + return !1; + }, s.c = 0, w(mt, "EObjectEList", 496), b(85, 496, Br, Yt), s.bj = function() { + return !0; + }, s.Dk = function() { + return !1; + }, s.rk = function() { + return !0; + }, w(mt, "EObjectContainmentEList", 85), b(545, 85, Br, hE), s.ci = function() { + this.b = !0; + }, s.fj = function() { + return this.b; + }, s.Xj = function() { + var e; + de(this), qu(this.e) ? (e = this.b, this.b = !1, et(this.e, new vo(this.e, 2, this.c, e, !1))) : this.b = !1; + }, s.b = !1, w(mt, "EObjectContainmentEList/Unsettable", 545), b(1140, 545, Br, wCn), s.ii = function(e, t) { + var i, r; + return i = u(o6(this, e, t), 87), qu(this.e) && qp(this, new R8(this.a, 7, (Sn(), Xne), Q(t), (r = i.c, I(r, 88) ? u(r, 26) : so), e)), i; + }, s.jj = function(e, t) { + return L2e(this, u(e, 87), t); + }, s.kj = function(e, t) { + return x2e(this, u(e, 87), t); + }, s.lj = function(e, t, i) { + return N4e(this, u(e, 87), u(t, 87), i); + }, s.Zi = function(e, t, i, r, c) { + switch (e) { + case 3: + return _5(this, e, t, i, r, this.i > 1); + case 5: + return _5(this, e, t, i, r, this.i - u(i, 15).gc() > 0); + default: + return new Lh(this.e, e, this.c, t, i, r, !0); + } + }, s.ij = function() { + return !0; + }, s.fj = function() { + return JF(this); + }, s.Xj = function() { + de(this); + }, w(Bn, "EClassImpl/1", 1140), b(1154, 1153, Wtn), s.ui = function(e) { + var t, i, r, c, o, f, h; + if (i = e.xi(), i != 8) { + if (r = mpe(e), r == 0) + switch (i) { + case 1: + case 9: { + h = e.Bi(), h != null && (t = Iu(u(h, 473)), !t.c && (t.c = new Np()), BC(t.c, e.Ai())), f = e.zi(), f != null && (c = u(f, 473), c.Bb & 1 || (t = Iu(c), !t.c && (t.c = new Np()), me(t.c, u(e.Ai(), 26)))); + break; + } + case 3: { + f = e.zi(), f != null && (c = u(f, 473), c.Bb & 1 || (t = Iu(c), !t.c && (t.c = new Np()), me(t.c, u(e.Ai(), 26)))); + break; + } + case 5: { + if (f = e.zi(), f != null) + for (o = u(f, 14).Kc(); o.Ob(); ) + c = u(o.Pb(), 473), c.Bb & 1 || (t = Iu(c), !t.c && (t.c = new Np()), me(t.c, u(e.Ai(), 26))); + break; + } + case 4: { + h = e.Bi(), h != null && (c = u(h, 473), c.Bb & 1 || (t = Iu(c), !t.c && (t.c = new Np()), BC(t.c, e.Ai()))); + break; + } + case 6: { + if (h = e.Bi(), h != null) + for (o = u(h, 14).Kc(); o.Ob(); ) + c = u(o.Pb(), 473), c.Bb & 1 || (t = Iu(c), !t.c && (t.c = new Np()), BC(t.c, e.Ai())); + break; + } + } + this.Hk(r); + } + }, s.Hk = function(e) { + bBn(this, e); + }, s.b = 63, w(Bn, "ESuperAdapter", 1154), b(1155, 1154, Wtn, Amn), s.Hk = function(e) { + jb(this, e); + }, w(Bn, "EClassImpl/10", 1155), b(1144, 696, Br), s.Vh = function(e, t) { + return mx(this, e, t); + }, s.Wh = function(e) { + return hFn(this, e); + }, s.Xh = function(e, t) { + a7(this, e, t); + }, s.Yh = function(e) { + F8(this, e); + }, s.pi = function(e) { + return zX(this, e); + }, s.mi = function(e, t) { + return B$(this, e, t); + }, s.lk = function(e, t) { + throw T(new ye()); + }, s.Zh = function() { + return new w2(this); + }, s.$h = function() { + return new u8(this); + }, s._h = function(e) { + return J8(this, e); + }, s.mk = function(e, t) { + throw T(new ye()); + }, s.Wj = function(e) { + return this; + }, s.fj = function() { + return this.i != 0; + }, s.Wb = function(e) { + throw T(new ye()); + }, s.Xj = function() { + throw T(new ye()); + }, w(mt, "EcoreEList/UnmodifiableEList", 1144), b(319, 1144, Br, Ew), s.ni = function() { + return !1; + }, w(mt, "EcoreEList/UnmodifiableEList/FastCompare", 319), b(1147, 319, Br, YOn), s.Xc = function(e) { + var t, i, r; + if (I(e, 170) && (t = u(e, 170), i = t.aj(), i != -1)) { + for (r = this.i; i < r; ++i) + if (B(this.g[i]) === B(e)) + return i; + } + return -1; + }, w(Bn, "EClassImpl/1EAllStructuralFeaturesList", 1147), b(1141, 497, Wf, Q2n), s.ri = function(e) { + return F(dr, EGn, 87, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/1EGenericSuperTypeEList", 1141), b(623, 497, Wf, EI), s.ri = function(e) { + return F(su, gg, 170, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/1EStructuralFeatureUniqueEList", 623), b(741, 497, Wf, YH), s.ri = function(e) { + return F(hw, gg, 18, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/1ReferenceList", 741), b(1142, 497, Wf, Smn), s.bi = function(e, t) { + Rfe(this, u(t, 34)); + }, s.ri = function(e) { + return F(fw, gg, 34, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/2", 1142), b(1143, 497, Wf, J2n), s.ri = function(e) { + return F(fw, gg, 34, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/3", 1143), b(1145, 319, Br, DEn), s.Fc = function(e) { + return Hoe(this, u(e, 34)); + }, s.Yh = function(e) { + Qie(this, u(e, 34)); + }, w(Bn, "EClassImpl/4", 1145), b(1146, 319, Br, $En), s.Fc = function(e) { + return qoe(this, u(e, 18)); + }, s.Yh = function(e) { + Jie(this, u(e, 18)); + }, w(Bn, "EClassImpl/5", 1146), b(1148, 497, Wf, Y2n), s.ri = function(e) { + return F(co, Qtn, 59, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/6", 1148), b(1149, 497, Wf, Z2n), s.ri = function(e) { + return F(hw, gg, 18, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/7", 1149), b(1997, 1996, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1, 69: 1 }), s.Vh = function(e, t) { + return wZ(this, e, t); + }, s.Wh = function(e) { + return wZ(this, this.Vi(), e); + }, s.Xh = function(e, t) { + WLn(this, e, t); + }, s.Yh = function(e) { + BLn(this, e); + }, s.lk = function(e, t) { + return c3e(this, e, t); + }, s.mk = function(e, t) { + return Ppe(this, e, t); + }, s.mi = function(e, t) { + return eRn(this, e, t); + }, s.pi = function(e) { + return this.Oi(e); + }, s.Zh = function() { + return new w2(this); + }, s.Gi = function() { + return this.Ji(); + }, s.$h = function() { + return new u8(this); + }, s._h = function(e) { + return J8(this, e); + }, w(mt, "DelegatingNotifyingInternalEListImpl", 1997), b(742, 1997, Jtn), s.ai = function() { + var e; + return e = On(Vc(this.b), this.aj()).Yj(), I(e, 148) && !I(e, 457) && (e.Bj().i & 1) == 0; + }, s.Hc = function(e) { + var t, i, r, c, o, f, h, l; + if (this.Fk()) { + if (l = this.Vi(), l > 4) + if (this.wj(e)) { + if (this.rk()) { + if (r = u(e, 49), i = r.Ug(), h = i == this.b && (this.Dk() ? r.Og(r.Vg(), u(On(Vc(this.b), this.aj()).Yj(), 26).Bj()) == ir(u(On(Vc(this.b), this.aj()), 18)).n : -1 - r.Vg() == this.aj()), this.Ek() && !h && !i && r.Zg()) { + for (c = 0; c < l; ++c) + if (t = MD(this, this.Oi(c)), B(t) === B(e)) + return !0; + } + return h; + } else if (this.Dk() && !this.Ck()) { + if (o = u(e, 56).ah(ir(u(On(Vc(this.b), this.aj()), 18))), B(o) === B(this.b)) + return !0; + if (o == null || !u(o, 56).kh()) + return !1; + } + } else + return !1; + if (f = this.Li(e), this.Ek() && !f) { + for (c = 0; c < l; ++c) + if (r = MD(this, this.Oi(c)), B(r) === B(e)) + return !0; + } + return f; + } else + return this.Li(e); + }, s.Zi = function(e, t, i, r, c) { + return new Lh(this.b, e, this.aj(), t, i, r, c); + }, s.$i = function(e) { + et(this.b, e); + }, s.Wj = function(e) { + return this; + }, s._i = function() { + return On(Vc(this.b), this.aj()); + }, s.aj = function() { + return jt(Vc(this.b), On(Vc(this.b), this.aj())); + }, s.Ai = function() { + return this.b; + }, s.Bk = function() { + return !!On(Vc(this.b), this.aj()).Yj().Bj(); + }, s.bj = function() { + var e, t; + return t = On(Vc(this.b), this.aj()), I(t, 99) ? (e = u(t, 18), (e.Bb & uc) != 0 || !!ir(u(t, 18))) : !1; + }, s.Ck = function() { + var e, t, i, r; + return t = On(Vc(this.b), this.aj()), I(t, 99) ? (e = u(t, 18), i = ir(e), !!i && (r = i.t, r > 1 || r == -1)) : !1; + }, s.Dk = function() { + var e, t, i; + return t = On(Vc(this.b), this.aj()), I(t, 99) ? (e = u(t, 18), i = ir(e), !!i) : !1; + }, s.Ek = function() { + var e, t; + return t = On(Vc(this.b), this.aj()), I(t, 99) ? (e = u(t, 18), (e.Bb & Ji) != 0) : !1; + }, s.Xc = function(e) { + var t, i, r, c; + if (r = this.Qi(e), r >= 0) + return r; + if (this.Fk()) { + for (i = 0, c = this.Vi(); i < c; ++i) + if (t = MD(this, this.Oi(i)), B(t) === B(e)) + return i; + } + return -1; + }, s.cj = function(e, t) { + var i; + return i = u(e, 49), this.Dk() ? this.Bk() ? i.gh(this.b, ir(u(On(Vc(this.b), this.aj()), 18)).n, u(On(Vc(this.b), this.aj()).Yj(), 26).Bj(), t) : i.gh(this.b, jt(i.Tg(), ir(u(On(Vc(this.b), this.aj()), 18))), null, t) : i.gh(this.b, -1 - this.aj(), null, t); + }, s.dj = function(e, t) { + var i; + return i = u(e, 49), this.Dk() ? this.Bk() ? i.ih(this.b, ir(u(On(Vc(this.b), this.aj()), 18)).n, u(On(Vc(this.b), this.aj()).Yj(), 26).Bj(), t) : i.ih(this.b, jt(i.Tg(), ir(u(On(Vc(this.b), this.aj()), 18))), null, t) : i.ih(this.b, -1 - this.aj(), null, t); + }, s.rk = function() { + var e, t; + return t = On(Vc(this.b), this.aj()), I(t, 99) ? (e = u(t, 18), (e.Bb & uc) != 0) : !1; + }, s.Fk = function() { + return I(On(Vc(this.b), this.aj()).Yj(), 88); + }, s.wj = function(e) { + return On(Vc(this.b), this.aj()).Yj().wj(e); + }, s.ej = function() { + return qu(this.b); + }, s.fj = function() { + return !this.Ri(); + }, s.hi = function() { + return On(Vc(this.b), this.aj()).hi(); + }, s.li = function(e, t) { + return X7(this, e, t); + }, s.Wb = function(e) { + $6(this), Ft(this, u(e, 15)); + }, s.Pc = function() { + var e; + if (this.Ek()) + for (e = this.Vi() - 1; e >= 0; --e) + X7(this, e, this.Oi(e)); + return this.Wi(); + }, s.Qc = function(e) { + var t; + if (this.Ek()) + for (t = this.Vi() - 1; t >= 0; --t) + X7(this, t, this.Oi(t)); + return this.Xi(e); + }, s.Xj = function() { + $6(this); + }, s.oi = function(e, t) { + return dPn(this, e, t); + }, w(mt, "DelegatingEcoreEList", 742), b(1150, 742, Jtn, Ijn), s.Hi = function(e, t) { + cue(this, e, u(t, 26)); + }, s.Ii = function(e) { + Zre(this, u(e, 26)); + }, s.Oi = function(e) { + var t, i; + return t = u(D(wc(this.a), e), 87), i = t.c, I(i, 88) ? u(i, 26) : (Sn(), so); + }, s.Ti = function(e) { + var t, i; + return t = u(Cb(wc(this.a), e), 87), i = t.c, I(i, 88) ? u(i, 26) : (Sn(), so); + }, s.Ui = function(e, t) { + return u3e(this, e, u(t, 26)); + }, s.ai = function() { + return !1; + }, s.Zi = function(e, t, i, r, c) { + return null; + }, s.Ji = function() { + return new Pmn(this); + }, s.Ki = function() { + de(wc(this.a)); + }, s.Li = function(e) { + return qDn(this, e); + }, s.Mi = function(e) { + var t, i; + for (i = e.Kc(); i.Ob(); ) + if (t = i.Pb(), !qDn(this, t)) + return !1; + return !0; + }, s.Ni = function(e) { + var t, i, r; + if (I(e, 15) && (r = u(e, 15), r.gc() == wc(this.a).i)) { + for (t = r.Kc(), i = new ie(this); t.Ob(); ) + if (B(t.Pb()) !== B(oe(i))) + return !1; + return !0; + } + return !1; + }, s.Pi = function() { + var e, t, i, r, c; + for (i = 1, t = new ie(wc(this.a)); t.e != t.i.gc(); ) + e = u(oe(t), 87), r = (c = e.c, I(c, 88) ? u(c, 26) : (Sn(), so)), i = 31 * i + (r ? kd(r) : 0); + return i; + }, s.Qi = function(e) { + var t, i, r, c; + for (r = 0, i = new ie(wc(this.a)); i.e != i.i.gc(); ) { + if (t = u(oe(i), 87), B(e) === B((c = t.c, I(c, 88) ? u(c, 26) : (Sn(), so)))) + return r; + ++r; + } + return -1; + }, s.Ri = function() { + return wc(this.a).i == 0; + }, s.Si = function() { + return null; + }, s.Vi = function() { + return wc(this.a).i; + }, s.Wi = function() { + var e, t, i, r, c, o; + for (o = wc(this.a).i, c = F(Zn, rn, 1, o, 5, 1), i = 0, t = new ie(wc(this.a)); t.e != t.i.gc(); ) + e = u(oe(t), 87), c[i++] = (r = e.c, I(r, 88) ? u(r, 26) : (Sn(), so)); + return c; + }, s.Xi = function(e) { + var t, i, r, c, o, f, h; + for (h = wc(this.a).i, e.length < h && (c = Q8(Du(e).c, h), e = c), e.length > h && St(e, h, null), r = 0, i = new ie(wc(this.a)); i.e != i.i.gc(); ) + t = u(oe(i), 87), o = (f = t.c, I(f, 88) ? u(f, 26) : (Sn(), so)), St(e, r++, o); + return e; + }, s.Yi = function() { + var e, t, i, r, c; + for (c = new r1(), c.a += "[", e = wc(this.a), t = 0, r = wc(this.a).i; t < r; ) + br(c, y5((i = u(D(e, t), 87).c, I(i, 88) ? u(i, 26) : (Sn(), so)))), ++t < r && (c.a += Qi); + return c.a += "]", c.a; + }, s.$i = function(e) { + }, s.aj = function() { + return 10; + }, s.Bk = function() { + return !0; + }, s.bj = function() { + return !1; + }, s.Ck = function() { + return !1; + }, s.Dk = function() { + return !1; + }, s.Ek = function() { + return !0; + }, s.rk = function() { + return !1; + }, s.Fk = function() { + return !0; + }, s.wj = function(e) { + return I(e, 88); + }, s.fj = function() { + return cae(this.a); + }, s.hi = function() { + return !0; + }, s.ni = function() { + return !0; + }, w(Bn, "EClassImpl/8", 1150), b(1151, 1964, M4, Pmn), s.Zc = function(e) { + return J8(this.a, e); + }, s.gc = function() { + return wc(this.a.a).i; + }, w(Bn, "EClassImpl/8/1", 1151), b(1152, 497, Wf, npn), s.ri = function(e) { + return F(Qo, rn, 138, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "EClassImpl/9", 1152), b(1139, 53, nnn, k9n), w(Bn, "EClassImpl/MyHashSet", 1139), b(566, 351, { 105: 1, 92: 1, 90: 1, 138: 1, 148: 1, 834: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 150: 1, 114: 1, 115: 1, 676: 1 }, fj), s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return Jd(this); + case 4: + return this.zj(); + case 5: + return this.F; + case 6: + return t ? is(this) : k3(this); + case 7: + return !this.A && (this.A = new hu(Gc, this, 7)), this.A; + case 8: + return qn(), !!(this.Bb & 256); + } + return Cs(this, e - ee(this.zh()), On((r = u(Rn(this, 16), 26), r || this.zh()), e), t, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!Jd(this); + case 4: + return this.zj() != null; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!k3(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) == 0; + } + return js(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + bC(this, Ce(t)); + return; + case 2: + BO(this, Ce(t)); + return; + case 5: + k4(this, Ce(t)); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A), !this.A && (this.A = new hu(Gc, this, 7)), Ft(this.A, u(t, 14)); + return; + case 8: + kT(this, on(sn(t))); + return; + } + Ps(this, e - ee(this.zh()), On((i = u(Rn(this, 16), 26), i || this.zh()), e), t); + }, s.zh = function() { + return Sn(), Vne; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + I(this.Cb, 179) && (u(this.Cb, 179).tb = null), Oc(this, null); + return; + case 2: + W3(this, null), x3(this, this.D); + return; + case 5: + k4(this, null); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A); + return; + case 8: + kT(this, !0); + return; + } + As(this, e - ee(this.zh()), On((t = u(Rn(this, 16), 26), t || this.zh()), e)); + }, s.Gh = function() { + g1((wu(), xi), this).ne(), this.Bb |= 1; + }, s.Fj = function() { + var e, t, i; + if (!this.c && (e = wNn(is(this)), !e.dc())) + for (i = e.Kc(); i.Ob(); ) + t = Ce(i.Pb()), A6(this, t) && Kge(this); + return this.b; + }, s.zj = function() { + var e; + if (!this.e) { + e = null; + try { + e = Jd(this); + } catch (t) { + if (t = Et(t), !I(t, 102)) + throw T(t); + } + this.d = null, e && e.i & 1 && (e == _u ? this.d = (qn(), Ga) : e == be ? this.d = Q(0) : e == bw ? this.d = new S9(0) : e == Ci ? this.d = 0 : e == Yl ? this.d = Aa(0) : e == Wg ? this.d = Q3(0) : e == ku ? this.d = X8(0) : this.d = i7(0)), this.e = !0; + } + return this.d; + }, s.Ej = function() { + return (this.Bb & 256) != 0; + }, s.Ik = function(e) { + e && (this.D = "org.eclipse.emf.common.util.AbstractEnumerator"); + }, s.xk = function(e) { + uOn(this, e), this.Ik(e); + }, s.yk = function(e) { + this.C = e, this.e = !1; + }, s.Ib = function() { + var e; + return this.Db & 64 ? MT(this) : (e = new Bs(MT(this)), e.a += " (serializable: ", c1(e, (this.Bb & 256) != 0), e.a += ")", e.a); + }, s.c = !1, s.d = null, s.e = !1, w(Bn, "EDataTypeImpl", 566), b(457, 566, { 105: 1, 92: 1, 90: 1, 138: 1, 148: 1, 834: 1, 671: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 457: 1, 150: 1, 114: 1, 115: 1, 676: 1 }, y9n), s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return Jd(this); + case 4: + return ZV(this); + case 5: + return this.F; + case 6: + return t ? is(this) : k3(this); + case 7: + return !this.A && (this.A = new hu(Gc, this, 7)), this.A; + case 8: + return qn(), !!(this.Bb & 256); + case 9: + return !this.a && (this.a = new V(e1, this, 9, 5)), this.a; + } + return Cs(this, e - ee((Sn(), Vl)), On((r = u(Rn(this, 16), 26), r || Vl), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 6: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? ox(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 6, i); + case 9: + return !this.a && (this.a = new V(e1, this, 9, 5)), Dc(this.a, e, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || (Sn(), Vl)), t), 66), o.Nj().Qj(this, Bc(this), t - ee((Sn(), Vl)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 6: + return os(this, null, 6, i); + case 7: + return !this.A && (this.A = new hu(Gc, this, 7)), Gi(this.A, e, i); + case 9: + return !this.a && (this.a = new V(e1, this, 9, 5)), Gi(this.a, e, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), Vl)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), Vl)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!Jd(this); + case 4: + return !!ZV(this); + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!k3(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) == 0; + case 9: + return !!this.a && this.a.i != 0; + } + return js(this, e - ee((Sn(), Vl)), On((t = u(Rn(this, 16), 26), t || Vl), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + bC(this, Ce(t)); + return; + case 2: + BO(this, Ce(t)); + return; + case 5: + k4(this, Ce(t)); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A), !this.A && (this.A = new hu(Gc, this, 7)), Ft(this.A, u(t, 14)); + return; + case 8: + kT(this, on(sn(t))); + return; + case 9: + !this.a && (this.a = new V(e1, this, 9, 5)), de(this.a), !this.a && (this.a = new V(e1, this, 9, 5)), Ft(this.a, u(t, 14)); + return; + } + Ps(this, e - ee((Sn(), Vl)), On((i = u(Rn(this, 16), 26), i || Vl), e), t); + }, s.zh = function() { + return Sn(), Vl; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + I(this.Cb, 179) && (u(this.Cb, 179).tb = null), Oc(this, null); + return; + case 2: + W3(this, null), x3(this, this.D); + return; + case 5: + k4(this, null); + return; + case 7: + !this.A && (this.A = new hu(Gc, this, 7)), de(this.A); + return; + case 8: + kT(this, !0); + return; + case 9: + !this.a && (this.a = new V(e1, this, 9, 5)), de(this.a); + return; + } + As(this, e - ee((Sn(), Vl)), On((t = u(Rn(this, 16), 26), t || Vl), e)); + }, s.Gh = function() { + var e, t; + if (this.a) + for (e = 0, t = this.a.i; e < t; ++e) + s8(D(this.a, e)); + g1((wu(), xi), this).ne(), this.Bb |= 1; + }, s.zj = function() { + return ZV(this); + }, s.wj = function(e) { + return e != null; + }, s.Ik = function(e) { + }, w(Bn, "EEnumImpl", 457), b(573, 438, { 105: 1, 92: 1, 90: 1, 1940: 1, 678: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 573: 1, 150: 1, 114: 1, 115: 1 }, zmn), s.ne = function() { + return this.zb; + }, s.Qg = function(e) { + return xFn(this, e); + }, s._g = function(e, t, i) { + var r, c; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Q(this.d); + case 3: + return this.b ? this.b : this.a; + case 4: + return c = this.c, c ?? this.zb; + case 5: + return this.Db >> 16 == 5 ? u(this.Cb, 671) : null; + } + return Cs(this, e - ee((Sn(), N1)), On((r = u(Rn(this, 16), 26), r || N1), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 5: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? xFn(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 5, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || (Sn(), N1)), t), 66), o.Nj().Qj(this, Bc(this), t - ee((Sn(), N1)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 5: + return os(this, null, 5, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), N1)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), N1)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.d != 0; + case 3: + return !!this.b; + case 4: + return this.c != null; + case 5: + return !!(this.Db >> 16 == 5 && u(this.Cb, 671)); + } + return js(this, e - ee((Sn(), N1)), On((t = u(Rn(this, 16), 26), t || N1), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + Oc(this, Ce(t)); + return; + case 2: + G$(this, u(t, 19).a); + return; + case 3: + ILn(this, u(t, 1940)); + return; + case 4: + U$(this, Ce(t)); + return; + } + Ps(this, e - ee((Sn(), N1)), On((i = u(Rn(this, 16), 26), i || N1), e), t); + }, s.zh = function() { + return Sn(), N1; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + Oc(this, null); + return; + case 2: + G$(this, 0); + return; + case 3: + ILn(this, null); + return; + case 4: + U$(this, null); + return; + } + As(this, e - ee((Sn(), N1)), On((t = u(Rn(this, 16), 26), t || N1), e)); + }, s.Ib = function() { + var e; + return e = this.c, e ?? this.zb; + }, s.b = null, s.c = null, s.d = 0, w(Bn, "EEnumLiteralImpl", 573); + var lMe = Ct(Bn, "EFactoryImpl/InternalEDateTimeFormat"); + b(489, 1, { 2015: 1 }, D9), w(Bn, "EFactoryImpl/1ClientInternalEDateTimeFormat", 489), b(241, 115, { 105: 1, 92: 1, 90: 1, 87: 1, 56: 1, 108: 1, 49: 1, 97: 1, 241: 1, 114: 1, 115: 1 }, sd), s.Sg = function(e, t, i) { + var r; + return i = os(this, e, t, i), this.e && I(e, 170) && (r = uM(this, this.e), r != this.c && (i = y4(this, r, i))), i; + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return this.f; + case 1: + return !this.d && (this.d = new Yt(dr, this, 1)), this.d; + case 2: + return t ? pM(this) : this.c; + case 3: + return this.b; + case 4: + return this.e; + case 5: + return t ? nx(this) : this.a; + } + return Cs(this, e - ee((Sn(), O0)), On((r = u(Rn(this, 16), 26), r || O0), e), t, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return $Dn(this, null, i); + case 1: + return !this.d && (this.d = new Yt(dr, this, 1)), Gi(this.d, e, i); + case 3: + return DDn(this, null, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), O0)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), O0)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.f; + case 1: + return !!this.d && this.d.i != 0; + case 2: + return !!this.c; + case 3: + return !!this.b; + case 4: + return !!this.e; + case 5: + return !!this.a; + } + return js(this, e - ee((Sn(), O0)), On((t = u(Rn(this, 16), 26), t || O0), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + ZFn(this, u(t, 87)); + return; + case 1: + !this.d && (this.d = new Yt(dr, this, 1)), de(this.d), !this.d && (this.d = new Yt(dr, this, 1)), Ft(this.d, u(t, 14)); + return; + case 3: + DJ(this, u(t, 87)); + return; + case 4: + VJ(this, u(t, 836)); + return; + case 5: + I3(this, u(t, 138)); + return; + } + Ps(this, e - ee((Sn(), O0)), On((i = u(Rn(this, 16), 26), i || O0), e), t); + }, s.zh = function() { + return Sn(), O0; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + ZFn(this, null); + return; + case 1: + !this.d && (this.d = new Yt(dr, this, 1)), de(this.d); + return; + case 3: + DJ(this, null); + return; + case 4: + VJ(this, null); + return; + case 5: + I3(this, null); + return; + } + As(this, e - ee((Sn(), O0)), On((t = u(Rn(this, 16), 26), t || O0), e)); + }, s.Ib = function() { + var e; + return e = new Yu(yo(this)), e.a += " (expression: ", fL(this, e), e.a += ")", e.a; + }; + var p1n; + w(Bn, "EGenericTypeImpl", 241), b(1969, 1964, CA), s.Xh = function(e, t) { + Ajn(this, e, t); + }, s.lk = function(e, t) { + return Ajn(this, this.gc(), e), t; + }, s.pi = function(e) { + return qo(this.Gi(), e); + }, s.Zh = function() { + return this.$h(); + }, s.Gi = function() { + return new $mn(this); + }, s.$h = function() { + return this._h(0); + }, s._h = function(e) { + return this.Gi().Zc(e); + }, s.mk = function(e, t) { + return bb(this, e, !0), t; + }, s.ii = function(e, t) { + var i, r; + return r = hx(this, t), i = this.Zc(e), i.Rb(r), r; + }, s.ji = function(e, t) { + var i; + bb(this, t, !0), i = this.Zc(e), i.Rb(t); + }, w(mt, "AbstractSequentialInternalEList", 1969), b(486, 1969, CA, c8), s.pi = function(e) { + return qo(this.Gi(), e); + }, s.Zh = function() { + return this.b == null ? (u1(), u1(), Ly) : this.Jk(); + }, s.Gi = function() { + return new Ykn(this.a, this.b); + }, s.$h = function() { + return this.b == null ? (u1(), u1(), Ly) : this.Jk(); + }, s._h = function(e) { + var t, i; + if (this.b == null) { + if (e < 0 || e > 1) + throw T(new mr(rm + e + ", size=0")); + return u1(), u1(), Ly; + } + for (i = this.Jk(), t = 0; t < e; ++t) + hT(i); + return i; + }, s.dc = function() { + var e, t, i, r, c, o; + if (this.b != null) { + for (i = 0; i < this.b.length; ++i) + if (e = this.b[i], !this.Mk() || this.a.mh(e)) { + if (o = this.a.bh(e, !1), er(), u(e, 66).Oj()) { + for (t = u(o, 153), r = 0, c = t.gc(); r < c; ++r) + if (qCn(t.il(r)) && t.jl(r) != null) + return !1; + } else if (e.$j()) { + if (!u(o, 14).dc()) + return !1; + } else if (o != null) + return !1; + } + } + return !0; + }, s.Kc = function() { + return kV(this); + }, s.Zc = function(e) { + var t, i; + if (this.b == null) { + if (e != 0) + throw T(new mr(rm + e + ", size=0")); + return u1(), u1(), Ly; + } + for (i = this.Lk() ? this.Kk() : this.Jk(), t = 0; t < e; ++t) + hT(i); + return i; + }, s.ii = function(e, t) { + throw T(new ye()); + }, s.ji = function(e, t) { + throw T(new ye()); + }, s.Jk = function() { + return new wE(this.a, this.b); + }, s.Kk = function() { + return new nU(this.a, this.b); + }, s.Lk = function() { + return !0; + }, s.gc = function() { + var e, t, i, r, c, o, f; + if (c = 0, this.b != null) { + for (i = 0; i < this.b.length; ++i) + if (e = this.b[i], !this.Mk() || this.a.mh(e)) + if (f = this.a.bh(e, !1), er(), u(e, 66).Oj()) + for (t = u(f, 153), r = 0, o = t.gc(); r < o; ++r) + qCn(t.il(r)) && t.jl(r) != null && ++c; + else + e.$j() ? c += u(f, 14).gc() : f != null && ++c; + } + return c; + }, s.Mk = function() { + return !0; + }; + var pH; + w(mt, "EContentsEList", 486), b(1156, 486, CA, djn), s.Jk = function() { + return new bjn(this.a, this.b); + }, s.Kk = function() { + return new wjn(this.a, this.b); + }, s.Mk = function() { + return !1; + }, w(Bn, "ENamedElementImpl/1", 1156), b(279, 1, TA, wE), s.Nb = function(e) { + Oi(this, e); + }, s.Rb = function(e) { + throw T(new ye()); + }, s.Nk = function(e) { + if (this.g != 0 || this.e) + throw T(new $r("Iterator already in use or already filtered")); + this.e = e; + }, s.Ob = function() { + var e, t, i, r, c, o; + switch (this.g) { + case 3: + case 2: + return !0; + case 1: + return !1; + case -3: + this.p ? this.p.Pb() : ++this.n; + default: + if (!this.k || (this.p ? !Gxn(this, this.p) : !OLn(this))) { + for (; this.d < this.c.length; ) + if (t = this.c[this.d++], (!this.e || t.Gj() != Mv || t.aj() != 0) && (!this.Mk() || this.b.mh(t))) { + if (o = this.b.bh(t, this.Lk()), this.f = (er(), u(t, 66).Oj()), this.f || t.$j()) { + if (this.Lk() ? (r = u(o, 15), this.k = r) : (r = u(o, 69), this.k = this.j = r), I(this.k, 54) ? (this.p = null, this.o = this.k.gc(), this.n = 0) : this.p = this.j ? this.j.$h() : this.k.Yc(), this.p ? Gxn(this, this.p) : OLn(this)) + return c = this.p ? this.p.Pb() : this.j ? this.j.pi(this.n++) : this.k.Xb(this.n++), this.f ? (e = u(c, 72), e.ak(), i = e.dd(), this.i = i) : (i = c, this.i = i), this.g = 3, !0; + } else if (o != null) + return this.k = null, this.p = null, i = o, this.i = i, this.g = 2, !0; + } + return this.k = null, this.p = null, this.f = !1, this.g = 1, !1; + } else + return c = this.p ? this.p.Pb() : this.j ? this.j.pi(this.n++) : this.k.Xb(this.n++), this.f ? (e = u(c, 72), e.ak(), i = e.dd(), this.i = i) : (i = c, this.i = i), this.g = 3, !0; + } + }, s.Sb = function() { + var e, t, i, r, c, o; + switch (this.g) { + case -3: + case -2: + return !0; + case -1: + return !1; + case 3: + this.p ? this.p.Ub() : --this.n; + default: + if (!this.k || (this.p ? !zxn(this, this.p) : !iLn(this))) { + for (; this.d > 0; ) + if (t = this.c[--this.d], (!this.e || t.Gj() != Mv || t.aj() != 0) && (!this.Mk() || this.b.mh(t))) { + if (o = this.b.bh(t, this.Lk()), this.f = (er(), u(t, 66).Oj()), this.f || t.$j()) { + if (this.Lk() ? (r = u(o, 15), this.k = r) : (r = u(o, 69), this.k = this.j = r), I(this.k, 54) ? (this.o = this.k.gc(), this.n = this.o) : this.p = this.j ? this.j._h(this.k.gc()) : this.k.Zc(this.k.gc()), this.p ? zxn(this, this.p) : iLn(this)) + return c = this.p ? this.p.Ub() : this.j ? this.j.pi(--this.n) : this.k.Xb(--this.n), this.f ? (e = u(c, 72), e.ak(), i = e.dd(), this.i = i) : (i = c, this.i = i), this.g = -3, !0; + } else if (o != null) + return this.k = null, this.p = null, i = o, this.i = i, this.g = -2, !0; + } + return this.k = null, this.p = null, this.g = -1, !1; + } else + return c = this.p ? this.p.Ub() : this.j ? this.j.pi(--this.n) : this.k.Xb(--this.n), this.f ? (e = u(c, 72), e.ak(), i = e.dd(), this.i = i) : (i = c, this.i = i), this.g = -3, !0; + } + }, s.Pb = function() { + return hT(this); + }, s.Tb = function() { + return this.a; + }, s.Ub = function() { + var e; + if (this.g < -1 || this.Sb()) + return --this.a, this.g = 0, e = this.i, this.Sb(), e; + throw T(new ic()); + }, s.Vb = function() { + return this.a - 1; + }, s.Qb = function() { + throw T(new ye()); + }, s.Lk = function() { + return !1; + }, s.Wb = function(e) { + throw T(new ye()); + }, s.Mk = function() { + return !0; + }, s.a = 0, s.d = 0, s.f = !1, s.g = 0, s.n = 0, s.o = 0; + var Ly; + w(mt, "EContentsEList/FeatureIteratorImpl", 279), b(697, 279, TA, nU), s.Lk = function() { + return !0; + }, w(mt, "EContentsEList/ResolvingFeatureIteratorImpl", 697), b(1157, 697, TA, wjn), s.Mk = function() { + return !1; + }, w(Bn, "ENamedElementImpl/1/1", 1157), b(1158, 279, TA, bjn), s.Mk = function() { + return !1; + }, w(Bn, "ENamedElementImpl/1/2", 1158), b(36, 143, jk, cb, p$, gi, D$, Lh, vo, rV, qMn, cV, GMn, PX, zMn, oV, UMn, IX, WMn, uV, XMn, $5, R8, VD, sV, VMn, OX, QMn), s._i = function() { + return HX(this); + }, s.gj = function() { + var e; + return e = HX(this), e ? e.zj() : null; + }, s.yi = function(e) { + return this.b == -1 && this.a && (this.b = this.c.Xg(this.a.aj(), this.a.Gj())), this.c.Og(this.b, e); + }, s.Ai = function() { + return this.c; + }, s.hj = function() { + var e; + return e = HX(this), e ? e.Kj() : !1; + }, s.b = -1, w(Bn, "ENotificationImpl", 36), b(399, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 59: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 399: 1, 284: 1, 114: 1, 115: 1 }, RI), s.Qg = function(e) { + return BFn(this, e); + }, s._g = function(e, t, i) { + var r, c, o; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return qn(), !!(this.Bb & 256); + case 3: + return qn(), !!(this.Bb & 512); + case 4: + return Q(this.s); + case 5: + return Q(this.t); + case 6: + return qn(), o = this.t, o > 1 || o == -1; + case 7: + return qn(), c = this.s, c >= 1; + case 8: + return t ? qs(this) : this.r; + case 9: + return this.q; + case 10: + return this.Db >> 16 == 10 ? u(this.Cb, 26) : null; + case 11: + return !this.d && (this.d = new hu(Gc, this, 11)), this.d; + case 12: + return !this.c && (this.c = new V(I0, this, 12, 10)), this.c; + case 13: + return !this.a && (this.a = new l8(this, this)), this.a; + case 14: + return Ou(this); + } + return Cs(this, e - ee((Sn(), B1)), On((r = u(Rn(this, 16), 26), r || B1), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 10: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? BFn(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 10, i); + case 12: + return !this.c && (this.c = new V(I0, this, 12, 10)), Dc(this.c, e, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || (Sn(), B1)), t), 66), o.Nj().Qj(this, Bc(this), t - ee((Sn(), B1)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 9: + return xD(this, i); + case 10: + return os(this, null, 10, i); + case 11: + return !this.d && (this.d = new hu(Gc, this, 11)), Gi(this.d, e, i); + case 12: + return !this.c && (this.c = new V(I0, this, 12, 10)), Gi(this.c, e, i); + case 14: + return Gi(Ou(this), e, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), B1)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), B1)), e, i); + }, s.lh = function(e) { + var t, i, r; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return r = this.t, r > 1 || r == -1; + case 7: + return i = this.s, i >= 1; + case 8: + return !!this.r && !this.q.e && Sd(this.q).i == 0; + case 9: + return !!this.q && !(this.r && !this.q.e && Sd(this.q).i == 0); + case 10: + return !!(this.Db >> 16 == 10 && u(this.Cb, 26)); + case 11: + return !!this.d && this.d.i != 0; + case 12: + return !!this.c && this.c.i != 0; + case 13: + return !!this.a && Ou(this.a.a).i != 0 && !(this.b && YF(this.b)); + case 14: + return !!this.b && YF(this.b); + } + return js(this, e - ee((Sn(), B1)), On((t = u(Rn(this, 16), 26), t || B1), e)); + }, s.sh = function(e, t) { + var i, r; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + Oc(this, Ce(t)); + return; + case 2: + p1(this, on(sn(t))); + return; + case 3: + v1(this, on(sn(t))); + return; + case 4: + b1(this, u(t, 19).a); + return; + case 5: + lb(this, u(t, 19).a); + return; + case 8: + Ta(this, u(t, 138)); + return; + case 9: + r = af(this, u(t, 87), null), r && r.Fi(); + return; + case 11: + !this.d && (this.d = new hu(Gc, this, 11)), de(this.d), !this.d && (this.d = new hu(Gc, this, 11)), Ft(this.d, u(t, 14)); + return; + case 12: + !this.c && (this.c = new V(I0, this, 12, 10)), de(this.c), !this.c && (this.c = new V(I0, this, 12, 10)), Ft(this.c, u(t, 14)); + return; + case 13: + !this.a && (this.a = new l8(this, this)), $6(this.a), !this.a && (this.a = new l8(this, this)), Ft(this.a, u(t, 14)); + return; + case 14: + de(Ou(this)), Ft(Ou(this), u(t, 14)); + return; + } + Ps(this, e - ee((Sn(), B1)), On((i = u(Rn(this, 16), 26), i || B1), e), t); + }, s.zh = function() { + return Sn(), B1; + }, s.Bh = function(e) { + var t, i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + Oc(this, null); + return; + case 2: + p1(this, !0); + return; + case 3: + v1(this, !0); + return; + case 4: + b1(this, 0); + return; + case 5: + lb(this, 1); + return; + case 8: + Ta(this, null); + return; + case 9: + i = af(this, null, null), i && i.Fi(); + return; + case 11: + !this.d && (this.d = new hu(Gc, this, 11)), de(this.d); + return; + case 12: + !this.c && (this.c = new V(I0, this, 12, 10)), de(this.c); + return; + case 13: + this.a && $6(this.a); + return; + case 14: + this.b && de(this.b); + return; + } + As(this, e - ee((Sn(), B1)), On((t = u(Rn(this, 16), 26), t || B1), e)); + }, s.Gh = function() { + var e, t; + if (this.c) + for (e = 0, t = this.c.i; e < t; ++e) + s8(D(this.c, e)); + qs(this), this.Bb |= 1; + }, w(Bn, "EOperationImpl", 399), b(505, 742, Jtn, l8), s.Hi = function(e, t) { + rue(this, e, u(t, 138)); + }, s.Ii = function(e) { + nce(this, u(e, 138)); + }, s.Oi = function(e) { + var t, i; + return t = u(D(Ou(this.a), e), 87), i = t.c, i || (Sn(), Cf); + }, s.Ti = function(e) { + var t, i; + return t = u(Cb(Ou(this.a), e), 87), i = t.c, i || (Sn(), Cf); + }, s.Ui = function(e, t) { + return epe(this, e, u(t, 138)); + }, s.ai = function() { + return !1; + }, s.Zi = function(e, t, i, r, c) { + return null; + }, s.Ji = function() { + return new Imn(this); + }, s.Ki = function() { + de(Ou(this.a)); + }, s.Li = function(e) { + return UDn(this, e); + }, s.Mi = function(e) { + var t, i; + for (i = e.Kc(); i.Ob(); ) + if (t = i.Pb(), !UDn(this, t)) + return !1; + return !0; + }, s.Ni = function(e) { + var t, i, r; + if (I(e, 15) && (r = u(e, 15), r.gc() == Ou(this.a).i)) { + for (t = r.Kc(), i = new ie(this); t.Ob(); ) + if (B(t.Pb()) !== B(oe(i))) + return !1; + return !0; + } + return !1; + }, s.Pi = function() { + var e, t, i, r, c; + for (i = 1, t = new ie(Ou(this.a)); t.e != t.i.gc(); ) + e = u(oe(t), 87), r = (c = e.c, c || (Sn(), Cf)), i = 31 * i + (r ? kt(r) : 0); + return i; + }, s.Qi = function(e) { + var t, i, r, c; + for (r = 0, i = new ie(Ou(this.a)); i.e != i.i.gc(); ) { + if (t = u(oe(i), 87), B(e) === B((c = t.c, c || (Sn(), Cf)))) + return r; + ++r; + } + return -1; + }, s.Ri = function() { + return Ou(this.a).i == 0; + }, s.Si = function() { + return null; + }, s.Vi = function() { + return Ou(this.a).i; + }, s.Wi = function() { + var e, t, i, r, c, o; + for (o = Ou(this.a).i, c = F(Zn, rn, 1, o, 5, 1), i = 0, t = new ie(Ou(this.a)); t.e != t.i.gc(); ) + e = u(oe(t), 87), c[i++] = (r = e.c, r || (Sn(), Cf)); + return c; + }, s.Xi = function(e) { + var t, i, r, c, o, f, h; + for (h = Ou(this.a).i, e.length < h && (c = Q8(Du(e).c, h), e = c), e.length > h && St(e, h, null), r = 0, i = new ie(Ou(this.a)); i.e != i.i.gc(); ) + t = u(oe(i), 87), o = (f = t.c, f || (Sn(), Cf)), St(e, r++, o); + return e; + }, s.Yi = function() { + var e, t, i, r, c; + for (c = new r1(), c.a += "[", e = Ou(this.a), t = 0, r = Ou(this.a).i; t < r; ) + br(c, y5((i = u(D(e, t), 87).c, i || (Sn(), Cf)))), ++t < r && (c.a += Qi); + return c.a += "]", c.a; + }, s.$i = function(e) { + }, s.aj = function() { + return 13; + }, s.Bk = function() { + return !0; + }, s.bj = function() { + return !1; + }, s.Ck = function() { + return !1; + }, s.Dk = function() { + return !1; + }, s.Ek = function() { + return !0; + }, s.rk = function() { + return !1; + }, s.Fk = function() { + return !0; + }, s.wj = function(e) { + return I(e, 138); + }, s.fj = function() { + return rae(this.a); + }, s.hi = function() { + return !0; + }, s.ni = function() { + return !0; + }, w(Bn, "EOperationImpl/1", 505), b(1340, 1964, M4, Imn), s.Zc = function(e) { + return J8(this.a, e); + }, s.gc = function() { + return Ou(this.a.a).i; + }, w(Bn, "EOperationImpl/1/1", 1340), b(1341, 545, Br, gCn), s.ii = function(e, t) { + var i, r; + return i = u(o6(this, e, t), 87), qu(this.e) && qp(this, new R8(this.a, 7, (Sn(), Yne), Q(t), (r = i.c, r || Cf), e)), i; + }, s.jj = function(e, t) { + return pge(this, u(e, 87), t); + }, s.kj = function(e, t) { + return vge(this, u(e, 87), t); + }, s.lj = function(e, t, i) { + return ppe(this, u(e, 87), u(t, 87), i); + }, s.Zi = function(e, t, i, r, c) { + switch (e) { + case 3: + return _5(this, e, t, i, r, this.i > 1); + case 5: + return _5(this, e, t, i, r, this.i - u(i, 15).gc() > 0); + default: + return new Lh(this.e, e, this.c, t, i, r, !0); + } + }, s.ij = function() { + return !0; + }, s.fj = function() { + return YF(this); + }, s.Xj = function() { + de(this); + }, w(Bn, "EOperationImpl/2", 1341), b(498, 1, { 1938: 1, 498: 1 }, Dkn), w(Bn, "EPackageImpl/1", 498), b(16, 85, Br, V), s.zk = function() { + return this.d; + }, s.Ak = function() { + return this.b; + }, s.Dk = function() { + return !0; + }, s.b = 0, w(mt, "EObjectContainmentWithInverseEList", 16), b(353, 16, Br, g2), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectContainmentWithInverseEList/Resolving", 353), b(298, 353, Br, Z0), s.ci = function() { + this.a.tb = null; + }, w(Bn, "EPackageImpl/2", 298), b(1228, 1, {}, Jee), w(Bn, "EPackageImpl/3", 1228), b(718, 43, sg, tG), s._b = function(e) { + return yi(e) ? QD(this, e) : !!Sr(this.f, e); + }, w(Bn, "EPackageRegistryImpl", 718), b(509, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 2017: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 509: 1, 284: 1, 114: 1, 115: 1 }, _I), s.Qg = function(e) { + return RFn(this, e); + }, s._g = function(e, t, i) { + var r, c, o; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return qn(), !!(this.Bb & 256); + case 3: + return qn(), !!(this.Bb & 512); + case 4: + return Q(this.s); + case 5: + return Q(this.t); + case 6: + return qn(), o = this.t, o > 1 || o == -1; + case 7: + return qn(), c = this.s, c >= 1; + case 8: + return t ? qs(this) : this.r; + case 9: + return this.q; + case 10: + return this.Db >> 16 == 10 ? u(this.Cb, 59) : null; + } + return Cs(this, e - ee((Sn(), aw)), On((r = u(Rn(this, 16), 26), r || aw), e), t, i); + }, s.hh = function(e, t, i) { + var r, c, o; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Dc(this.Ab, e, i); + case 10: + return this.Cb && (i = (c = this.Db >> 16, c >= 0 ? RFn(this, i) : this.Cb.ih(this, -1 - c, null, i))), os(this, e, 10, i); + } + return o = u(On((r = u(Rn(this, 16), 26), r || (Sn(), aw)), t), 66), o.Nj().Qj(this, Bc(this), t - ee((Sn(), aw)), e, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 9: + return xD(this, i); + case 10: + return os(this, null, 10, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), aw)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), aw)), e, i); + }, s.lh = function(e) { + var t, i, r; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return r = this.t, r > 1 || r == -1; + case 7: + return i = this.s, i >= 1; + case 8: + return !!this.r && !this.q.e && Sd(this.q).i == 0; + case 9: + return !!this.q && !(this.r && !this.q.e && Sd(this.q).i == 0); + case 10: + return !!(this.Db >> 16 == 10 && u(this.Cb, 59)); + } + return js(this, e - ee((Sn(), aw)), On((t = u(Rn(this, 16), 26), t || aw), e)); + }, s.zh = function() { + return Sn(), aw; + }, w(Bn, "EParameterImpl", 509), b(99, 449, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 18: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 99: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }, cU), s._g = function(e, t, i) { + var r, c, o, f; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return qn(), !!(this.Bb & 256); + case 3: + return qn(), !!(this.Bb & 512); + case 4: + return Q(this.s); + case 5: + return Q(this.t); + case 6: + return qn(), f = this.t, f > 1 || f == -1; + case 7: + return qn(), c = this.s, c >= 1; + case 8: + return t ? qs(this) : this.r; + case 9: + return this.q; + case 10: + return qn(), !!(this.Bb & Eo); + case 11: + return qn(), !!(this.Bb & Rb); + case 12: + return qn(), !!(this.Bb & Ob); + case 13: + return this.j; + case 14: + return b4(this); + case 15: + return qn(), !!(this.Bb & vu); + case 16: + return qn(), !!(this.Bb & Nf); + case 17: + return tb(this); + case 18: + return qn(), !!(this.Bb & uc); + case 19: + return qn(), o = ir(this), !!(o && o.Bb & uc); + case 20: + return qn(), !!(this.Bb & Ji); + case 21: + return t ? ir(this) : this.b; + case 22: + return t ? HV(this) : vSn(this); + case 23: + return !this.a && (this.a = new Aw(fw, this, 23)), this.a; + } + return Cs(this, e - ee((Sn(), qg)), On((r = u(Rn(this, 16), 26), r || qg), e), t, i); + }, s.lh = function(e) { + var t, i, r, c; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return c = this.t, c > 1 || c == -1; + case 7: + return i = this.s, i >= 1; + case 8: + return !!this.r && !this.q.e && Sd(this.q).i == 0; + case 9: + return !!this.q && !(this.r && !this.q.e && Sd(this.q).i == 0); + case 10: + return (this.Bb & Eo) == 0; + case 11: + return (this.Bb & Rb) != 0; + case 12: + return (this.Bb & Ob) != 0; + case 13: + return this.j != null; + case 14: + return b4(this) != null; + case 15: + return (this.Bb & vu) != 0; + case 16: + return (this.Bb & Nf) != 0; + case 17: + return !!tb(this); + case 18: + return (this.Bb & uc) != 0; + case 19: + return r = ir(this), !!r && (r.Bb & uc) != 0; + case 20: + return (this.Bb & Ji) == 0; + case 21: + return !!this.b; + case 22: + return !!vSn(this); + case 23: + return !!this.a && this.a.i != 0; + } + return js(this, e - ee((Sn(), qg)), On((t = u(Rn(this, 16), 26), t || qg), e)); + }, s.sh = function(e, t) { + var i, r; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + f$(this, Ce(t)); + return; + case 2: + p1(this, on(sn(t))); + return; + case 3: + v1(this, on(sn(t))); + return; + case 4: + b1(this, u(t, 19).a); + return; + case 5: + lb(this, u(t, 19).a); + return; + case 8: + Ta(this, u(t, 138)); + return; + case 9: + r = af(this, u(t, 87), null), r && r.Fi(); + return; + case 10: + J3(this, on(sn(t))); + return; + case 11: + n4(this, on(sn(t))); + return; + case 12: + Y3(this, on(sn(t))); + return; + case 13: + dz(this, Ce(t)); + return; + case 15: + Z3(this, on(sn(t))); + return; + case 16: + e4(this, on(sn(t))); + return; + case 18: + lle(this, on(sn(t))); + return; + case 20: + mQ(this, on(sn(t))); + return; + case 21: + vV(this, u(t, 18)); + return; + case 23: + !this.a && (this.a = new Aw(fw, this, 23)), de(this.a), !this.a && (this.a = new Aw(fw, this, 23)), Ft(this.a, u(t, 14)); + return; + } + Ps(this, e - ee((Sn(), qg)), On((i = u(Rn(this, 16), 26), i || qg), e), t); + }, s.zh = function() { + return Sn(), qg; + }, s.Bh = function(e) { + var t, i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + I(this.Cb, 88) && jb(Iu(u(this.Cb, 88)), 4), Oc(this, null); + return; + case 2: + p1(this, !0); + return; + case 3: + v1(this, !0); + return; + case 4: + b1(this, 0); + return; + case 5: + lb(this, 1); + return; + case 8: + Ta(this, null); + return; + case 9: + i = af(this, null, null), i && i.Fi(); + return; + case 10: + J3(this, !0); + return; + case 11: + n4(this, !1); + return; + case 12: + Y3(this, !1); + return; + case 13: + this.i = null, nT(this, null); + return; + case 15: + Z3(this, !1); + return; + case 16: + e4(this, !1); + return; + case 18: + vQ(this, !1), I(this.Cb, 88) && jb(Iu(u(this.Cb, 88)), 2); + return; + case 20: + mQ(this, !0); + return; + case 21: + vV(this, null); + return; + case 23: + !this.a && (this.a = new Aw(fw, this, 23)), de(this.a); + return; + } + As(this, e - ee((Sn(), qg)), On((t = u(Rn(this, 16), 26), t || qg), e)); + }, s.Gh = function() { + HV(this), p3(Er((wu(), xi), this)), qs(this), this.Bb |= 1; + }, s.Lj = function() { + return ir(this); + }, s.qk = function() { + var e; + return e = ir(this), !!e && (e.Bb & uc) != 0; + }, s.rk = function() { + return (this.Bb & uc) != 0; + }, s.sk = function() { + return (this.Bb & Ji) != 0; + }, s.nk = function(e, t) { + return this.c = null, lQ(this, e, t); + }, s.Ib = function() { + var e; + return this.Db & 64 ? bM(this) : (e = new Bs(bM(this)), e.a += " (containment: ", c1(e, (this.Bb & uc) != 0), e.a += ", resolveProxies: ", c1(e, (this.Bb & Ji) != 0), e.a += ")", e.a); + }, w(Bn, "EReferenceImpl", 99), b(548, 115, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1, 548: 1, 114: 1, 115: 1 }, epn), s.Fb = function(e) { + return this === e; + }, s.cd = function() { + return this.b; + }, s.dd = function() { + return this.c; + }, s.Hb = function() { + return kd(this); + }, s.Uh = function(e) { + gfe(this, Ce(e)); + }, s.ed = function(e) { + return rfe(this, Ce(e)); + }, s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return this.b; + case 1: + return this.c; + } + return Cs(this, e - ee((Sn(), Zi)), On((r = u(Rn(this, 16), 26), r || Zi), e), t, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return this.b != null; + case 1: + return this.c != null; + } + return js(this, e - ee((Sn(), Zi)), On((t = u(Rn(this, 16), 26), t || Zi), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + pfe(this, Ce(t)); + return; + case 1: + wV(this, Ce(t)); + return; + } + Ps(this, e - ee((Sn(), Zi)), On((i = u(Rn(this, 16), 26), i || Zi), e), t); + }, s.zh = function() { + return Sn(), Zi; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + bV(this, null); + return; + case 1: + wV(this, null); + return; + } + As(this, e - ee((Sn(), Zi)), On((t = u(Rn(this, 16), 26), t || Zi), e)); + }, s.Sh = function() { + var e; + return this.a == -1 && (e = this.b, this.a = e == null ? 0 : k1(e)), this.a; + }, s.Th = function(e) { + this.a = e; + }, s.Ib = function() { + var e; + return this.Db & 64 ? yo(this) : (e = new Bs(yo(this)), e.a += " (key: ", br(e, this.b), e.a += ", value: ", br(e, this.c), e.a += ")", e.a); + }, s.a = -1, s.b = null, s.c = null; + var tc = w(Bn, "EStringToStringMapEntryImpl", 548), ree = Ct(mt, "FeatureMap/Entry/Internal"); + b(565, 1, MA), s.Ok = function(e) { + return this.Pk(u(e, 49)); + }, s.Pk = function(e) { + return this.Ok(e); + }, s.Fb = function(e) { + var t, i; + return this === e ? !0 : I(e, 72) ? (t = u(e, 72), t.ak() == this.c ? (i = this.dd(), i == null ? t.dd() == null : tt(i, t.dd())) : !1) : !1; + }, s.ak = function() { + return this.c; + }, s.Hb = function() { + var e; + return e = this.dd(), kt(this.c) ^ (e == null ? 0 : kt(e)); + }, s.Ib = function() { + var e, t; + return e = this.c, t = is(e.Hj()).Ph(), e.ne(), (t != null && t.length != 0 ? t + ":" + e.ne() : e.ne()) + "=" + this.dd(); + }, w(Bn, "EStructuralFeatureImpl/BasicFeatureMapEntry", 565), b(776, 565, MA, bU), s.Pk = function(e) { + return new bU(this.c, e); + }, s.dd = function() { + return this.a; + }, s.Qk = function(e, t, i) { + return $be(this, e, this.a, t, i); + }, s.Rk = function(e, t, i) { + return Fbe(this, e, this.a, t, i); + }, w(Bn, "EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry", 776), b(1314, 1, {}, $kn), s.Pj = function(e, t, i, r, c) { + var o; + return o = u(M3(e, this.b), 215), o.nl(this.a).Wj(r); + }, s.Qj = function(e, t, i, r, c) { + var o; + return o = u(M3(e, this.b), 215), o.el(this.a, r, c); + }, s.Rj = function(e, t, i, r, c) { + var o; + return o = u(M3(e, this.b), 215), o.fl(this.a, r, c); + }, s.Sj = function(e, t, i) { + var r; + return r = u(M3(e, this.b), 215), r.nl(this.a).fj(); + }, s.Tj = function(e, t, i, r) { + var c; + c = u(M3(e, this.b), 215), c.nl(this.a).Wb(r); + }, s.Uj = function(e, t, i) { + return u(M3(e, this.b), 215).nl(this.a); + }, s.Vj = function(e, t, i) { + var r; + r = u(M3(e, this.b), 215), r.nl(this.a).Xj(); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator", 1314), b(89, 1, {}, o1, la, h1, ba), s.Pj = function(e, t, i, r, c) { + var o; + if (o = t.Ch(i), o == null && t.Dh(i, o = AM(this, e)), !c) + switch (this.e) { + case 50: + case 41: + return u(o, 589).sj(); + case 40: + return u(o, 215).kl(); + } + return o; + }, s.Qj = function(e, t, i, r, c) { + var o, f; + return f = t.Ch(i), f == null && t.Dh(i, f = AM(this, e)), o = u(f, 69).lk(r, c), o; + }, s.Rj = function(e, t, i, r, c) { + var o; + return o = t.Ch(i), o != null && (c = u(o, 69).mk(r, c)), c; + }, s.Sj = function(e, t, i) { + var r; + return r = t.Ch(i), r != null && u(r, 76).fj(); + }, s.Tj = function(e, t, i, r) { + var c; + c = u(t.Ch(i), 76), !c && t.Dh(i, c = AM(this, e)), c.Wb(r); + }, s.Uj = function(e, t, i) { + var r, c; + return c = t.Ch(i), c == null && t.Dh(i, c = AM(this, e)), I(c, 76) ? u(c, 76) : (r = u(t.Ch(i), 15), new Dmn(r)); + }, s.Vj = function(e, t, i) { + var r; + r = u(t.Ch(i), 76), !r && t.Dh(i, r = AM(this, e)), r.Xj(); + }, s.b = 0, s.e = 0, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateMany", 89), b(504, 1, {}), s.Qj = function(e, t, i, r, c) { + throw T(new ye()); + }, s.Rj = function(e, t, i, r, c) { + throw T(new ye()); + }, s.Uj = function(e, t, i) { + return new STn(this, e, t, i); + }; + var Eh; + w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingle", 504), b(1331, 1, GB, STn), s.Wj = function(e) { + return this.a.Pj(this.c, this.d, this.b, e, !0); + }, s.fj = function() { + return this.a.Sj(this.c, this.d, this.b); + }, s.Wb = function(e) { + this.a.Tj(this.c, this.d, this.b, e); + }, s.Xj = function() { + this.a.Vj(this.c, this.d, this.b); + }, s.b = 0, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingle/1", 1331), b(769, 504, {}, QW), s.Pj = function(e, t, i, r, c) { + return Qx(e, e.eh(), e.Vg()) == this.b ? this.sk() && r ? Fx(e) : e.eh() : null; + }, s.Qj = function(e, t, i, r, c) { + var o, f; + return e.eh() && (c = (o = e.Vg(), o >= 0 ? e.Qg(c) : e.eh().ih(e, -1 - o, null, c))), f = jt(e.Tg(), this.e), e.Sg(r, f, c); + }, s.Rj = function(e, t, i, r, c) { + var o; + return o = jt(e.Tg(), this.e), e.Sg(null, o, c); + }, s.Sj = function(e, t, i) { + var r; + return r = jt(e.Tg(), this.e), !!e.eh() && e.Vg() == r; + }, s.Tj = function(e, t, i, r) { + var c, o, f, h, l; + if (r != null && !nL(this.a, r)) + throw T(new zp(AA + (I(r, 56) ? IJ(u(r, 56).Tg()) : nV(Du(r))) + SA + this.a + "'")); + if (c = e.eh(), f = jt(e.Tg(), this.e), B(r) !== B(c) || e.Vg() != f && r != null) { + if (c4(e, u(r, 56))) + throw T(new Hn(tm + e.Ib())); + l = null, c && (l = (o = e.Vg(), o >= 0 ? e.Qg(l) : e.eh().ih(e, -1 - o, null, l))), h = u(r, 49), h && (l = h.gh(e, jt(h.Tg(), this.b), null, l)), l = e.Sg(h, f, l), l && l.Fi(); + } else + e.Lg() && e.Mg() && et(e, new gi(e, 1, f, r, r)); + }, s.Vj = function(e, t, i) { + var r, c, o, f; + r = e.eh(), r ? (f = (c = e.Vg(), c >= 0 ? e.Qg(null) : e.eh().ih(e, -1 - c, null, null)), o = jt(e.Tg(), this.e), f = e.Sg(null, o, f), f && f.Fi()) : e.Lg() && e.Mg() && et(e, new $5(e, 1, this.e, null, null)); + }, s.sk = function() { + return !1; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleContainer", 769), b(1315, 769, {}, kEn), s.sk = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving", 1315), b(563, 504, {}), s.Pj = function(e, t, i, r, c) { + var o; + return o = t.Ch(i), o == null ? this.b : B(o) === B(Eh) ? null : o; + }, s.Sj = function(e, t, i) { + var r; + return r = t.Ch(i), r != null && (B(r) === B(Eh) || !tt(r, this.b)); + }, s.Tj = function(e, t, i, r) { + var c, o; + e.Lg() && e.Mg() ? (c = (o = t.Ch(i), o == null ? this.b : B(o) === B(Eh) ? null : o), r == null ? this.c != null ? (t.Dh(i, null), r = this.b) : this.b != null ? t.Dh(i, Eh) : t.Dh(i, null) : (this.Sk(r), t.Dh(i, r)), et(e, this.d.Tk(e, 1, this.e, c, r))) : r == null ? this.c != null ? t.Dh(i, null) : this.b != null ? t.Dh(i, Eh) : t.Dh(i, null) : (this.Sk(r), t.Dh(i, r)); + }, s.Vj = function(e, t, i) { + var r, c; + e.Lg() && e.Mg() ? (r = (c = t.Ch(i), c == null ? this.b : B(c) === B(Eh) ? null : c), t.Eh(i), et(e, this.d.Tk(e, 1, this.e, r, this.b))) : t.Eh(i); + }, s.Sk = function(e) { + throw T(new Hmn()); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData", 563), b(pg, 1, {}, tpn), s.Tk = function(e, t, i, r, c) { + return new $5(e, t, i, r, c); + }, s.Uk = function(e, t, i, r, c, o) { + return new VD(e, t, i, r, c, o); + }; + var v1n, m1n, k1n, y1n, j1n, E1n, C1n, vH, T1n; + w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator", pg), b(1332, pg, {}, ipn), s.Tk = function(e, t, i, r, c) { + return new OX(e, t, i, on(sn(r)), on(sn(c))); + }, s.Uk = function(e, t, i, r, c, o) { + return new QMn(e, t, i, on(sn(r)), on(sn(c)), o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1", 1332), b(1333, pg, {}, rpn), s.Tk = function(e, t, i, r, c) { + return new rV(e, t, i, u(r, 217).a, u(c, 217).a); + }, s.Uk = function(e, t, i, r, c, o) { + return new qMn(e, t, i, u(r, 217).a, u(c, 217).a, o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2", 1333), b(1334, pg, {}, cpn), s.Tk = function(e, t, i, r, c) { + return new cV(e, t, i, u(r, 172).a, u(c, 172).a); + }, s.Uk = function(e, t, i, r, c, o) { + return new GMn(e, t, i, u(r, 172).a, u(c, 172).a, o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3", 1334), b(1335, pg, {}, upn), s.Tk = function(e, t, i, r, c) { + return new PX(e, t, i, K(Y(r)), K(Y(c))); + }, s.Uk = function(e, t, i, r, c, o) { + return new zMn(e, t, i, K(Y(r)), K(Y(c)), o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4", 1335), b(1336, pg, {}, spn), s.Tk = function(e, t, i, r, c) { + return new oV(e, t, i, u(r, 155).a, u(c, 155).a); + }, s.Uk = function(e, t, i, r, c, o) { + return new UMn(e, t, i, u(r, 155).a, u(c, 155).a, o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5", 1336), b(1337, pg, {}, opn), s.Tk = function(e, t, i, r, c) { + return new IX(e, t, i, u(r, 19).a, u(c, 19).a); + }, s.Uk = function(e, t, i, r, c, o) { + return new WMn(e, t, i, u(r, 19).a, u(c, 19).a, o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6", 1337), b(1338, pg, {}, fpn), s.Tk = function(e, t, i, r, c) { + return new uV(e, t, i, u(r, 162).a, u(c, 162).a); + }, s.Uk = function(e, t, i, r, c, o) { + return new XMn(e, t, i, u(r, 162).a, u(c, 162).a, o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7", 1338), b(1339, pg, {}, hpn), s.Tk = function(e, t, i, r, c) { + return new sV(e, t, i, u(r, 184).a, u(c, 184).a); + }, s.Uk = function(e, t, i, r, c, o) { + return new VMn(e, t, i, u(r, 184).a, u(c, 184).a, o); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8", 1339), b(1317, 563, {}, PTn), s.Sk = function(e) { + if (!this.a.wj(e)) + throw T(new zp(AA + Du(e) + SA + this.a + "'")); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic", 1317), b(1318, 563, {}, pCn), s.Sk = function(e) { + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic", 1318), b(770, 563, {}), s.Sj = function(e, t, i) { + var r; + return r = t.Ch(i), r != null; + }, s.Tj = function(e, t, i, r) { + var c, o; + e.Lg() && e.Mg() ? (c = !0, o = t.Ch(i), o == null ? (c = !1, o = this.b) : B(o) === B(Eh) && (o = null), r == null ? this.c != null ? (t.Dh(i, null), r = this.b) : t.Dh(i, Eh) : (this.Sk(r), t.Dh(i, r)), et(e, this.d.Uk(e, 1, this.e, o, r, !c))) : r == null ? this.c != null ? t.Dh(i, null) : t.Dh(i, Eh) : (this.Sk(r), t.Dh(i, r)); + }, s.Vj = function(e, t, i) { + var r, c; + e.Lg() && e.Mg() ? (r = !0, c = t.Ch(i), c == null ? (r = !1, c = this.b) : B(c) === B(Eh) && (c = null), t.Eh(i), et(e, this.d.Uk(e, 2, this.e, c, this.b, r))) : t.Eh(i); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable", 770), b(1319, 770, {}, ITn), s.Sk = function(e) { + if (!this.a.wj(e)) + throw T(new zp(AA + Du(e) + SA + this.a + "'")); + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic", 1319), b(1320, 770, {}, vCn), s.Sk = function(e) { + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic", 1320), b(398, 504, {}, FE), s.Pj = function(e, t, i, r, c) { + var o, f, h, l, a; + if (a = t.Ch(i), this.Kj() && B(a) === B(Eh)) + return null; + if (this.sk() && r && a != null) { + if (h = u(a, 49), h.kh() && (l = pl(e, h), h != l)) { + if (!nL(this.a, l)) + throw T(new zp(AA + Du(l) + SA + this.a + "'")); + t.Dh(i, a = l), this.rk() && (o = u(l, 49), f = h.ih(e, this.b ? jt(h.Tg(), this.b) : -1 - jt(e.Tg(), this.e), null, null), !o.eh() && (f = o.gh(e, this.b ? jt(o.Tg(), this.b) : -1 - jt(e.Tg(), this.e), null, f)), f && f.Fi()), e.Lg() && e.Mg() && et(e, new $5(e, 9, this.e, h, l)); + } + return a; + } else + return a; + }, s.Qj = function(e, t, i, r, c) { + var o, f; + return f = t.Ch(i), B(f) === B(Eh) && (f = null), t.Dh(i, r), this.bj() ? B(f) !== B(r) && f != null && (o = u(f, 49), c = o.ih(e, jt(o.Tg(), this.b), null, c)) : this.rk() && f != null && (c = u(f, 49).ih(e, -1 - jt(e.Tg(), this.e), null, c)), e.Lg() && e.Mg() && (!c && (c = new Q1(4)), c.Ei(new $5(e, 1, this.e, f, r))), c; + }, s.Rj = function(e, t, i, r, c) { + var o; + return o = t.Ch(i), B(o) === B(Eh) && (o = null), t.Eh(i), e.Lg() && e.Mg() && (!c && (c = new Q1(4)), this.Kj() ? c.Ei(new $5(e, 2, this.e, o, null)) : c.Ei(new $5(e, 1, this.e, o, null))), c; + }, s.Sj = function(e, t, i) { + var r; + return r = t.Ch(i), r != null; + }, s.Tj = function(e, t, i, r) { + var c, o, f, h, l; + if (r != null && !nL(this.a, r)) + throw T(new zp(AA + (I(r, 56) ? IJ(u(r, 56).Tg()) : nV(Du(r))) + SA + this.a + "'")); + l = t.Ch(i), h = l != null, this.Kj() && B(l) === B(Eh) && (l = null), f = null, this.bj() ? B(l) !== B(r) && (l != null && (c = u(l, 49), f = c.ih(e, jt(c.Tg(), this.b), null, f)), r != null && (c = u(r, 49), f = c.gh(e, jt(c.Tg(), this.b), null, f))) : this.rk() && B(l) !== B(r) && (l != null && (f = u(l, 49).ih(e, -1 - jt(e.Tg(), this.e), null, f)), r != null && (f = u(r, 49).gh(e, -1 - jt(e.Tg(), this.e), null, f))), r == null && this.Kj() ? t.Dh(i, Eh) : t.Dh(i, r), e.Lg() && e.Mg() ? (o = new VD(e, 1, this.e, l, r, this.Kj() && !h), f ? (f.Ei(o), f.Fi()) : et(e, o)) : f && f.Fi(); + }, s.Vj = function(e, t, i) { + var r, c, o, f, h; + h = t.Ch(i), f = h != null, this.Kj() && B(h) === B(Eh) && (h = null), o = null, h != null && (this.bj() ? (r = u(h, 49), o = r.ih(e, jt(r.Tg(), this.b), null, o)) : this.rk() && (o = u(h, 49).ih(e, -1 - jt(e.Tg(), this.e), null, o))), t.Eh(i), e.Lg() && e.Mg() ? (c = new VD(e, this.Kj() ? 2 : 1, this.e, h, null, f), o ? (o.Ei(c), o.Fi()) : et(e, c)) : o && o.Fi(); + }, s.bj = function() { + return !1; + }, s.rk = function() { + return !1; + }, s.sk = function() { + return !1; + }, s.Kj = function() { + return !1; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObject", 398), b(564, 398, {}, JO), s.rk = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment", 564), b(1323, 564, {}, gjn), s.sk = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving", 1323), b(772, 564, {}, eU), s.Kj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable", 772), b(1325, 772, {}, pjn), s.sk = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving", 1325), b(640, 564, {}, lD), s.bj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse", 640), b(1324, 640, {}, yEn), s.sk = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving", 1324), b(773, 640, {}, KU), s.Kj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable", 773), b(1326, 773, {}, jEn), s.sk = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving", 1326), b(641, 398, {}, tU), s.sk = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving", 641), b(1327, 641, {}, vjn), s.Kj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable", 1327), b(774, 641, {}, RU), s.bj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse", 774), b(1328, 774, {}, EEn), s.Kj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable", 1328), b(1321, 398, {}, mjn), s.Kj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable", 1321), b(771, 398, {}, _U), s.bj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse", 771), b(1322, 771, {}, CEn), s.Kj = function() { + return !0; + }, w(Bn, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable", 1322), b(775, 565, MA, LW), s.Pk = function(e) { + return new LW(this.a, this.c, e); + }, s.dd = function() { + return this.b; + }, s.Qk = function(e, t, i) { + return Fde(this, e, this.b, i); + }, s.Rk = function(e, t, i) { + return xde(this, e, this.b, i); + }, w(Bn, "EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry", 775), b(1329, 1, GB, Dmn), s.Wj = function(e) { + return this.a; + }, s.fj = function() { + return I(this.a, 95) ? u(this.a, 95).fj() : !this.a.dc(); + }, s.Wb = function(e) { + this.a.$b(), this.a.Gc(u(e, 15)); + }, s.Xj = function() { + I(this.a, 95) ? u(this.a, 95).Xj() : this.a.$b(); + }, w(Bn, "EStructuralFeatureImpl/SettingMany", 1329), b(1330, 565, MA, BAn), s.Ok = function(e) { + return new nD((ht(), p9), this.b.Ih(this.a, e)); + }, s.dd = function() { + return null; + }, s.Qk = function(e, t, i) { + return i; + }, s.Rk = function(e, t, i) { + return i; + }, w(Bn, "EStructuralFeatureImpl/SimpleContentFeatureMapEntry", 1330), b(642, 565, MA, nD), s.Ok = function(e) { + return new nD(this.c, e); + }, s.dd = function() { + return this.a; + }, s.Qk = function(e, t, i) { + return i; + }, s.Rk = function(e, t, i) { + return i; + }, w(Bn, "EStructuralFeatureImpl/SimpleFeatureMapEntry", 642), b(391, 497, Wf, Np), s.ri = function(e) { + return F(ro, rn, 26, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(Bn, "ESuperAdapter/1", 391), b(444, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 836: 1, 49: 1, 97: 1, 150: 1, 444: 1, 114: 1, 115: 1 }, CI), s._g = function(e, t, i) { + var r; + switch (e) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return !this.a && (this.a = new P5(this, dr, this)), this.a; + } + return Cs(this, e - ee((Sn(), D0)), On((r = u(Rn(this, 16), 26), r || D0), e), t, i); + }, s.jh = function(e, t, i) { + var r, c; + switch (t) { + case 0: + return !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Gi(this.Ab, e, i); + case 2: + return !this.a && (this.a = new P5(this, dr, this)), Gi(this.a, e, i); + } + return c = u(On((r = u(Rn(this, 16), 26), r || (Sn(), D0)), t), 66), c.Nj().Rj(this, Bc(this), t - ee((Sn(), D0)), e, i); + }, s.lh = function(e) { + var t; + switch (e) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return !!this.a && this.a.i != 0; + } + return js(this, e - ee((Sn(), D0)), On((t = u(Rn(this, 16), 26), t || D0), e)); + }, s.sh = function(e, t) { + var i; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab), !this.Ab && (this.Ab = new V(Be, this, 0, 3)), Ft(this.Ab, u(t, 14)); + return; + case 1: + Oc(this, Ce(t)); + return; + case 2: + !this.a && (this.a = new P5(this, dr, this)), de(this.a), !this.a && (this.a = new P5(this, dr, this)), Ft(this.a, u(t, 14)); + return; + } + Ps(this, e - ee((Sn(), D0)), On((i = u(Rn(this, 16), 26), i || D0), e), t); + }, s.zh = function() { + return Sn(), D0; + }, s.Bh = function(e) { + var t; + switch (e) { + case 0: + !this.Ab && (this.Ab = new V(Be, this, 0, 3)), de(this.Ab); + return; + case 1: + Oc(this, null); + return; + case 2: + !this.a && (this.a = new P5(this, dr, this)), de(this.a); + return; + } + As(this, e - ee((Sn(), D0)), On((t = u(Rn(this, 16), 26), t || D0), e)); + }, w(Bn, "ETypeParameterImpl", 444), b(445, 85, Br, P5), s.cj = function(e, t) { + return xve(this, u(e, 87), t); + }, s.dj = function(e, t) { + return Lve(this, u(e, 87), t); + }, w(Bn, "ETypeParameterImpl/1", 445), b(634, 43, sg, KI), s.ec = function() { + return new sj(this); + }, w(Bn, "ETypeParameterImpl/2", 634), b(556, df, gu, sj), s.Fc = function(e) { + return zjn(this, u(e, 87)); + }, s.Gc = function(e) { + var t, i, r; + for (r = !1, i = e.Kc(); i.Ob(); ) + t = u(i.Pb(), 87), it(this.a, t, "") == null && (r = !0); + return r; + }, s.$b = function() { + Eu(this.a); + }, s.Hc = function(e) { + return Uu(this.a, e); + }, s.Kc = function() { + var e; + return e = new Ca(new ia(this.a).a), new oj(e); + }, s.Mc = function(e) { + return OSn(this, e); + }, s.gc = function() { + return Xv(this.a); + }, w(Bn, "ETypeParameterImpl/2/1", 556), b(557, 1, Ei, oj), s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return u(Bd(this.a).cd(), 87); + }, s.Ob = function() { + return this.a.b; + }, s.Qb = function() { + oPn(this.a); + }, w(Bn, "ETypeParameterImpl/2/1/1", 557), b(1276, 43, sg, j9n), s._b = function(e) { + return yi(e) ? QD(this, e) : !!Sr(this.f, e); + }, s.xc = function(e) { + var t, i; + return t = yi(e) ? mc(this, e) : Vr(Sr(this.f, e)), I(t, 837) ? (i = u(t, 837), t = i._j(), it(this, u(e, 235), t), t) : t ?? (e == null ? (rO(), uee) : null); + }, w(Bn, "EValidatorRegistryImpl", 1276), b(1313, 704, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 1941: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, lpn), s.Ih = function(e, t) { + switch (e.yj()) { + case 21: + case 22: + case 23: + case 24: + case 26: + case 31: + case 32: + case 37: + case 38: + case 39: + case 40: + case 43: + case 44: + case 48: + case 49: + case 20: + return t == null ? null : Nr(t); + case 25: + return q0e(t); + case 27: + return u0e(t); + case 28: + return s0e(t); + case 29: + return t == null ? null : Tyn(l9[0], u(t, 199)); + case 41: + return t == null ? "" : J1(u(t, 290)); + case 42: + return Nr(t); + case 50: + return Ce(t); + default: + throw T(new Hn(B4 + e.ne() + l0)); + } + }, s.Jh = function(e) { + var t, i, r, c, o, f, h, l, a, d, g, p, v, m, C, S; + switch (e.G == -1 && (e.G = (p = is(e), p ? m1(p.Mh(), e) : -1)), e.G) { + case 0: + return i = new BI(), i; + case 1: + return t = new JH(), t; + case 2: + return r = new tq(), r; + case 4: + return c = new fj(), c; + case 5: + return o = new y9n(), o; + case 6: + return f = new zmn(), f; + case 7: + return h = new eq(), h; + case 10: + return a = new Yy(), a; + case 11: + return d = new RI(), d; + case 12: + return g = new WTn(), g; + case 13: + return v = new _I(), v; + case 14: + return m = new cU(), m; + case 17: + return C = new epn(), C; + case 18: + return l = new sd(), l; + case 19: + return S = new CI(), S; + default: + throw T(new Hn(SB + e.zb + l0)); + } + }, s.Kh = function(e, t) { + switch (e.yj()) { + case 20: + return t == null ? null : new CG(t); + case 21: + return t == null ? null : new il(t); + case 23: + case 22: + return t == null ? null : X2e(t); + case 26: + case 24: + return t == null ? null : X8(ss(t, -128, 127) << 24 >> 24); + case 25: + return c9e(t); + case 27: + return O3e(t); + case 28: + return D3e(t); + case 29: + return n5e(t); + case 32: + case 31: + return t == null ? null : yb(t); + case 38: + case 37: + return t == null ? null : new Gq(t); + case 40: + case 39: + return t == null ? null : Q(ss(t, Bi, nt)); + case 41: + return null; + case 42: + return t == null, null; + case 44: + case 43: + return t == null ? null : Aa(MM(t)); + case 49: + case 48: + return t == null ? null : Q3(ss(t, PA, 32767) << 16 >> 16); + case 50: + return t; + default: + throw T(new Hn(B4 + e.ne() + l0)); + } + }, w(Bn, "EcoreFactoryImpl", 1313), b(547, 179, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 1939: 1, 49: 1, 97: 1, 150: 1, 179: 1, 547: 1, 114: 1, 115: 1, 675: 1 }, hTn), s.gb = !1, s.hb = !1; + var M1n, cee = !1; + w(Bn, "EcorePackageImpl", 547), b(1184, 1, { 837: 1 }, apn), s._j = function() { + return Vyn(), see; + }, w(Bn, "EcorePackageImpl/1", 1184), b(1193, 1, qe, dpn), s.wj = function(e) { + return I(e, 147); + }, s.xj = function(e) { + return F(Dy, rn, 147, e, 0, 1); + }, w(Bn, "EcorePackageImpl/10", 1193), b(1194, 1, qe, bpn), s.wj = function(e) { + return I(e, 191); + }, s.xj = function(e) { + return F(fH, rn, 191, e, 0, 1); + }, w(Bn, "EcorePackageImpl/11", 1194), b(1195, 1, qe, wpn), s.wj = function(e) { + return I(e, 56); + }, s.xj = function(e) { + return F(zl, rn, 56, e, 0, 1); + }, w(Bn, "EcorePackageImpl/12", 1195), b(1196, 1, qe, gpn), s.wj = function(e) { + return I(e, 399); + }, s.xj = function(e) { + return F(co, Qtn, 59, e, 0, 1); + }, w(Bn, "EcorePackageImpl/13", 1196), b(1197, 1, qe, ppn), s.wj = function(e) { + return I(e, 235); + }, s.xj = function(e) { + return F(Vo, rn, 235, e, 0, 1); + }, w(Bn, "EcorePackageImpl/14", 1197), b(1198, 1, qe, vpn), s.wj = function(e) { + return I(e, 509); + }, s.xj = function(e) { + return F(I0, rn, 2017, e, 0, 1); + }, w(Bn, "EcorePackageImpl/15", 1198), b(1199, 1, qe, mpn), s.wj = function(e) { + return I(e, 99); + }, s.xj = function(e) { + return F(hw, gg, 18, e, 0, 1); + }, w(Bn, "EcorePackageImpl/16", 1199), b(1200, 1, qe, kpn), s.wj = function(e) { + return I(e, 170); + }, s.xj = function(e) { + return F(su, gg, 170, e, 0, 1); + }, w(Bn, "EcorePackageImpl/17", 1200), b(1201, 1, qe, ypn), s.wj = function(e) { + return I(e, 472); + }, s.xj = function(e) { + return F(ow, rn, 472, e, 0, 1); + }, w(Bn, "EcorePackageImpl/18", 1201), b(1202, 1, qe, jpn), s.wj = function(e) { + return I(e, 548); + }, s.xj = function(e) { + return F(tc, uGn, 548, e, 0, 1); + }, w(Bn, "EcorePackageImpl/19", 1202), b(1185, 1, qe, Epn), s.wj = function(e) { + return I(e, 322); + }, s.xj = function(e) { + return F(fw, gg, 34, e, 0, 1); + }, w(Bn, "EcorePackageImpl/2", 1185), b(1203, 1, qe, Cpn), s.wj = function(e) { + return I(e, 241); + }, s.xj = function(e) { + return F(dr, EGn, 87, e, 0, 1); + }, w(Bn, "EcorePackageImpl/20", 1203), b(1204, 1, qe, Tpn), s.wj = function(e) { + return I(e, 444); + }, s.xj = function(e) { + return F(Gc, rn, 836, e, 0, 1); + }, w(Bn, "EcorePackageImpl/21", 1204), b(1205, 1, qe, Mpn), s.wj = function(e) { + return G0(e); + }, s.xj = function(e) { + return F(oi, q, 476, e, 8, 1); + }, w(Bn, "EcorePackageImpl/22", 1205), b(1206, 1, qe, Apn), s.wj = function(e) { + return I(e, 190); + }, s.xj = function(e) { + return F(ku, q, 190, e, 0, 2); + }, w(Bn, "EcorePackageImpl/23", 1206), b(1207, 1, qe, Spn), s.wj = function(e) { + return I(e, 217); + }, s.xj = function(e) { + return F(op, q, 217, e, 0, 1); + }, w(Bn, "EcorePackageImpl/24", 1207), b(1208, 1, qe, Ppn), s.wj = function(e) { + return I(e, 172); + }, s.xj = function(e) { + return F(bm, q, 172, e, 0, 1); + }, w(Bn, "EcorePackageImpl/25", 1208), b(1209, 1, qe, Ipn), s.wj = function(e) { + return I(e, 199); + }, s.xj = function(e) { + return F(HA, q, 199, e, 0, 1); + }, w(Bn, "EcorePackageImpl/26", 1209), b(1210, 1, qe, Opn), s.wj = function(e) { + return !1; + }, s.xj = function(e) { + return F(G1n, rn, 2110, e, 0, 1); + }, w(Bn, "EcorePackageImpl/27", 1210), b(1211, 1, qe, Dpn), s.wj = function(e) { + return z0(e); + }, s.xj = function(e) { + return F(Si, q, 333, e, 7, 1); + }, w(Bn, "EcorePackageImpl/28", 1211), b(1212, 1, qe, $pn), s.wj = function(e) { + return I(e, 58); + }, s.xj = function(e) { + return F(c1n, Db, 58, e, 0, 1); + }, w(Bn, "EcorePackageImpl/29", 1212), b(1186, 1, qe, Fpn), s.wj = function(e) { + return I(e, 510); + }, s.xj = function(e) { + return F(Be, { 3: 1, 4: 1, 5: 1, 1934: 1 }, 590, e, 0, 1); + }, w(Bn, "EcorePackageImpl/3", 1186), b(1213, 1, qe, xpn), s.wj = function(e) { + return I(e, 573); + }, s.xj = function(e) { + return F(o1n, rn, 1940, e, 0, 1); + }, w(Bn, "EcorePackageImpl/30", 1213), b(1214, 1, qe, Lpn), s.wj = function(e) { + return I(e, 153); + }, s.xj = function(e) { + return F(O1n, Db, 153, e, 0, 1); + }, w(Bn, "EcorePackageImpl/31", 1214), b(1215, 1, qe, Npn), s.wj = function(e) { + return I(e, 72); + }, s.xj = function(e) { + return F(rI, DGn, 72, e, 0, 1); + }, w(Bn, "EcorePackageImpl/32", 1215), b(1216, 1, qe, Bpn), s.wj = function(e) { + return I(e, 155); + }, s.xj = function(e) { + return F(z4, q, 155, e, 0, 1); + }, w(Bn, "EcorePackageImpl/33", 1216), b(1217, 1, qe, Rpn), s.wj = function(e) { + return I(e, 19); + }, s.xj = function(e) { + return F(Ui, q, 19, e, 0, 1); + }, w(Bn, "EcorePackageImpl/34", 1217), b(1218, 1, qe, _pn), s.wj = function(e) { + return I(e, 290); + }, s.xj = function(e) { + return F(fin, rn, 290, e, 0, 1); + }, w(Bn, "EcorePackageImpl/35", 1218), b(1219, 1, qe, Kpn), s.wj = function(e) { + return I(e, 162); + }, s.xj = function(e) { + return F(d0, q, 162, e, 0, 1); + }, w(Bn, "EcorePackageImpl/36", 1219), b(1220, 1, qe, Hpn), s.wj = function(e) { + return I(e, 83); + }, s.xj = function(e) { + return F(hin, rn, 83, e, 0, 1); + }, w(Bn, "EcorePackageImpl/37", 1220), b(1221, 1, qe, qpn), s.wj = function(e) { + return I(e, 591); + }, s.xj = function(e) { + return F(A1n, rn, 591, e, 0, 1); + }, w(Bn, "EcorePackageImpl/38", 1221), b(1222, 1, qe, Gpn), s.wj = function(e) { + return !1; + }, s.xj = function(e) { + return F(z1n, rn, 2111, e, 0, 1); + }, w(Bn, "EcorePackageImpl/39", 1222), b(1187, 1, qe, zpn), s.wj = function(e) { + return I(e, 88); + }, s.xj = function(e) { + return F(ro, rn, 26, e, 0, 1); + }, w(Bn, "EcorePackageImpl/4", 1187), b(1223, 1, qe, Upn), s.wj = function(e) { + return I(e, 184); + }, s.xj = function(e) { + return F(b0, q, 184, e, 0, 1); + }, w(Bn, "EcorePackageImpl/40", 1223), b(1224, 1, qe, Wpn), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Bn, "EcorePackageImpl/41", 1224), b(1225, 1, qe, Xpn), s.wj = function(e) { + return I(e, 588); + }, s.xj = function(e) { + return F(s1n, rn, 588, e, 0, 1); + }, w(Bn, "EcorePackageImpl/42", 1225), b(1226, 1, qe, Vpn), s.wj = function(e) { + return !1; + }, s.xj = function(e) { + return F(U1n, q, 2112, e, 0, 1); + }, w(Bn, "EcorePackageImpl/43", 1226), b(1227, 1, qe, Qpn), s.wj = function(e) { + return I(e, 42); + }, s.xj = function(e) { + return F(qa, OM, 42, e, 0, 1); + }, w(Bn, "EcorePackageImpl/44", 1227), b(1188, 1, qe, Jpn), s.wj = function(e) { + return I(e, 138); + }, s.xj = function(e) { + return F(Qo, rn, 138, e, 0, 1); + }, w(Bn, "EcorePackageImpl/5", 1188), b(1189, 1, qe, Ypn), s.wj = function(e) { + return I(e, 148); + }, s.xj = function(e) { + return F(wH, rn, 148, e, 0, 1); + }, w(Bn, "EcorePackageImpl/6", 1189), b(1190, 1, qe, Zpn), s.wj = function(e) { + return I(e, 457); + }, s.xj = function(e) { + return F(iI, rn, 671, e, 0, 1); + }, w(Bn, "EcorePackageImpl/7", 1190), b(1191, 1, qe, n3n), s.wj = function(e) { + return I(e, 573); + }, s.xj = function(e) { + return F(e1, rn, 678, e, 0, 1); + }, w(Bn, "EcorePackageImpl/8", 1191), b(1192, 1, qe, e3n), s.wj = function(e) { + return I(e, 471); + }, s.xj = function(e) { + return F(h9, rn, 471, e, 0, 1); + }, w(Bn, "EcorePackageImpl/9", 1192), b(1025, 1982, cGn, _9n), s.bi = function(e, t) { + kge(this, u(t, 415)); + }, s.fi = function(e, t) { + nLn(this, e, u(t, 415)); + }, w(Bn, "MinimalEObjectImpl/1ArrayDelegatingAdapterList", 1025), b(1026, 143, jk, eTn), s.Ai = function() { + return this.a.a; + }, w(Bn, "MinimalEObjectImpl/1ArrayDelegatingAdapterList/1", 1026), b(1053, 1052, {}, pyn), w("org.eclipse.emf.ecore.plugin", "EcorePlugin", 1053); + var A1n = Ct($Gn, "Resource"); + b(781, 1378, FGn), s.Yk = function(e) { + }, s.Zk = function(e) { + }, s.Vk = function() { + return !this.a && (this.a = new $I(this)), this.a; + }, s.Wk = function(e) { + var t, i, r, c, o; + if (r = e.length, r > 0) + if (Te(0, e.length), e.charCodeAt(0) == 47) { + for (o = new Ic(4), c = 1, t = 1; t < r; ++t) + Te(t, e.length), e.charCodeAt(t) == 47 && (W(o, c == t ? "" : e.substr(c, t - c)), c = t + 1); + return W(o, e.substr(c)), j4e(this, o); + } else + Te(r - 1, e.length), e.charCodeAt(r - 1) == 63 && (i = MU(e, tu(63), r - 2), i > 0 && (e = e.substr(0, i))); + return H6e(this, e); + }, s.Xk = function() { + return this.c; + }, s.Ib = function() { + var e; + return J1(this.gm) + "@" + (e = kt(this) >>> 0, e.toString(16)) + " uri='" + this.d + "'"; + }, s.b = !1, w(zB, "ResourceImpl", 781), b(1379, 781, FGn, Fmn), w(zB, "BinaryResourceImpl", 1379), b(1169, 694, RB), s.si = function(e) { + return I(e, 56) ? E1e(this, u(e, 56)) : I(e, 591) ? new ie(u(e, 591).Vk()) : B(e) === B(this.f) ? u(e, 14).Kc() : (s3(), xy.a); + }, s.Ob = function() { + return yY(this); + }, s.a = !1, w(mt, "EcoreUtil/ContentTreeIterator", 1169), b(1380, 1169, RB, DCn), s.si = function(e) { + return B(e) === B(this.f) ? u(e, 15).Kc() : new wAn(u(e, 56)); + }, w(zB, "ResourceImpl/5", 1380), b(648, 1994, jGn, $I), s.Hc = function(e) { + return this.i <= 4 ? s4(this, e) : I(e, 49) && u(e, 49).Zg() == this.a; + }, s.bi = function(e, t) { + e == this.i - 1 && (this.a.b || (this.a.b = !0)); + }, s.di = function(e, t) { + e == 0 ? this.a.b || (this.a.b = !0) : A$(this, e, t); + }, s.fi = function(e, t) { + }, s.gi = function(e, t, i) { + }, s.aj = function() { + return 2; + }, s.Ai = function() { + return this.a; + }, s.bj = function() { + return !0; + }, s.cj = function(e, t) { + var i; + return i = u(e, 49), t = i.wh(this.a, t), t; + }, s.dj = function(e, t) { + var i; + return i = u(e, 49), i.wh(null, t); + }, s.ej = function() { + return !1; + }, s.hi = function() { + return !0; + }, s.ri = function(e) { + return F(zl, rn, 56, e, 0, 1); + }, s.ni = function() { + return !1; + }, w(zB, "ResourceImpl/ContentsEList", 648), b(957, 1964, M4, $mn), s.Zc = function(e) { + return this.a._h(e); + }, s.gc = function() { + return this.a.gc(); + }, w(mt, "AbstractSequentialInternalEList/1", 957); + var S1n, P1n, xi, I1n; + b(624, 1, {}, FEn); + var cI, uI; + w(mt, "BasicExtendedMetaData", 624), b(1160, 1, {}, Fkn), s.$k = function() { + return null; + }, s._k = function() { + return this.a == -2 && yte(this, Vve(this.d, this.b)), this.a; + }, s.al = function() { + return null; + }, s.bl = function() { + return Pn(), Pn(), cr; + }, s.ne = function() { + return this.c == K4 && Ete(this, O$n(this.d, this.b)), this.c; + }, s.cl = function() { + return 0; + }, s.a = -2, s.c = K4, w(mt, "BasicExtendedMetaData/EClassExtendedMetaDataImpl", 1160), b(1161, 1, {}, eAn), s.$k = function() { + return this.a == (C3(), cI) && jte(this, l8e(this.f, this.b)), this.a; + }, s._k = function() { + return 0; + }, s.al = function() { + return this.c == (C3(), cI) && Cte(this, a8e(this.f, this.b)), this.c; + }, s.bl = function() { + return !this.d && Tte(this, lke(this.f, this.b)), this.d; + }, s.ne = function() { + return this.e == K4 && Mte(this, O$n(this.f, this.b)), this.e; + }, s.cl = function() { + return this.g == -2 && Ate(this, bve(this.f, this.b)), this.g; + }, s.e = K4, s.g = -2, w(mt, "BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl", 1161), b(1159, 1, {}, Lkn), s.b = !1, s.c = !1, w(mt, "BasicExtendedMetaData/EPackageExtendedMetaDataImpl", 1159), b(1162, 1, {}, nAn), s.c = -2, s.e = K4, s.f = K4, w(mt, "BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl", 1162), b(585, 622, Br, ME), s.aj = function() { + return this.c; + }, s.Fk = function() { + return !1; + }, s.li = function(e, t) { + return t; + }, s.c = 0, w(mt, "EDataTypeEList", 585); + var O1n = Ct(mt, "FeatureMap"); + b(75, 585, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 76: 1, 153: 1, 215: 1, 1937: 1, 69: 1, 95: 1 }, xt), s.Vc = function(e, t) { + s8e(this, e, u(t, 72)); + }, s.Fc = function(e) { + return M9e(this, u(e, 72)); + }, s.Yh = function(e) { + ahe(this, u(e, 72)); + }, s.cj = function(e, t) { + return Uue(this, u(e, 72), t); + }, s.dj = function(e, t) { + return SU(this, u(e, 72), t); + }, s.ii = function(e, t) { + return Pke(this, e, t); + }, s.li = function(e, t) { + return oEe(this, e, u(t, 72)); + }, s._c = function(e, t) { + return J8e(this, e, u(t, 72)); + }, s.jj = function(e, t) { + return Wue(this, u(e, 72), t); + }, s.kj = function(e, t) { + return cEn(this, u(e, 72), t); + }, s.lj = function(e, t, i) { + return J4e(this, u(e, 72), u(t, 72), i); + }, s.oi = function(e, t) { + return px(this, e, u(t, 72)); + }, s.dl = function(e, t) { + return fZ(this, e, t); + }, s.Wc = function(e, t) { + var i, r, c, o, f, h, l, a, d; + for (a = new Nd(t.gc()), c = t.Kc(); c.Ob(); ) + if (r = u(c.Pb(), 72), o = r.ak(), zh(this.e, o)) + (!o.hi() || !yC(this, o, r.dd()) && !s4(a, r)) && me(a, r); + else { + for (d = _c(this.e.Tg(), o), i = u(this.g, 119), f = !0, h = 0; h < this.i; ++h) + if (l = i[h], d.rl(l.ak())) { + u(Gw(this, h, r), 72), f = !1; + break; + } + f && me(a, r); + } + return NV(this, e, a); + }, s.Gc = function(e) { + var t, i, r, c, o, f, h, l, a; + for (l = new Nd(e.gc()), r = e.Kc(); r.Ob(); ) + if (i = u(r.Pb(), 72), c = i.ak(), zh(this.e, c)) + (!c.hi() || !yC(this, c, i.dd()) && !s4(l, i)) && me(l, i); + else { + for (a = _c(this.e.Tg(), c), t = u(this.g, 119), o = !0, f = 0; f < this.i; ++f) + if (h = t[f], a.rl(h.ak())) { + u(Gw(this, f, i), 72), o = !1; + break; + } + o && me(l, i); + } + return Ft(this, l); + }, s.Wh = function(e) { + return this.j = -1, eL(this, this.i, e); + }, s.el = function(e, t, i) { + return iZ(this, e, t, i); + }, s.mk = function(e, t) { + return q7(this, e, t); + }, s.fl = function(e, t, i) { + return MZ(this, e, t, i); + }, s.gl = function() { + return this; + }, s.hl = function(e, t) { + return W7(this, e, t); + }, s.il = function(e) { + return u(D(this, e), 72).ak(); + }, s.jl = function(e) { + return u(D(this, e), 72).dd(); + }, s.kl = function() { + return this.b; + }, s.bj = function() { + return !0; + }, s.ij = function() { + return !0; + }, s.ll = function(e) { + return !g7(this, e); + }, s.ri = function(e) { + return F(ree, DGn, 332, e, 0, 1); + }, s.Gk = function(e) { + return YO(this, e); + }, s.Wb = function(e) { + j8(this, e); + }, s.ml = function(e, t) { + yM(this, e, t); + }, s.nl = function(e) { + return zIn(this, e); + }, s.ol = function(e) { + wFn(this, e); + }, w(mt, "BasicFeatureMap", 75), b(1851, 1, hh), s.Nb = function(e) { + Oi(this, e); + }, s.Rb = function(e) { + if (this.g == -1) + throw T(new ou()); + _E(this); + try { + _Nn(this.e, this.b, this.a, e), this.d = this.e.j, RT(this); + } catch (t) { + throw t = Et(t), I(t, 73) ? T(new vs()) : T(t); + } + }, s.Ob = function() { + return gF(this); + }, s.Sb = function() { + return wDn(this); + }, s.Pb = function() { + return RT(this); + }, s.Tb = function() { + return this.a; + }, s.Ub = function() { + var e; + if (wDn(this)) + return _E(this), this.g = --this.a, this.Lk() && (e = y6(this.e, this.b, this.c, this.a, this.j), this.j = e), this.i = 0, this.j; + throw T(new ic()); + }, s.Vb = function() { + return this.a - 1; + }, s.Qb = function() { + if (this.g == -1) + throw T(new ou()); + _E(this); + try { + Nxn(this.e, this.b, this.g), this.d = this.e.j, this.g < this.a && (--this.a, --this.c), --this.g; + } catch (e) { + throw e = Et(e), I(e, 73) ? T(new vs()) : T(e); + } + }, s.Lk = function() { + return !1; + }, s.Wb = function(e) { + if (this.g == -1) + throw T(new ou()); + _E(this); + try { + hRn(this.e, this.b, this.g, e), this.d = this.e.j; + } catch (t) { + throw t = Et(t), I(t, 73) ? T(new vs()) : T(t); + } + }, s.a = 0, s.c = 0, s.d = 0, s.f = !1, s.g = 0, s.i = 0, w(mt, "FeatureMapUtil/BasicFeatureEIterator", 1851), b(410, 1851, hh, K3), s.pl = function() { + var e, t, i; + for (i = this.e.i, e = u(this.e.g, 119); this.c < i; ) { + if (t = e[this.c], this.k.rl(t.ak())) + return this.j = this.f ? t : t.dd(), this.i = 2, !0; + ++this.c; + } + return this.i = 1, this.g = -1, !1; + }, s.ql = function() { + var e, t; + for (e = u(this.e.g, 119); --this.c >= 0; ) + if (t = e[this.c], this.k.rl(t.ak())) + return this.j = this.f ? t : t.dd(), this.i = -2, !0; + return this.i = -1, this.g = -1, !1; + }, w(mt, "BasicFeatureMap/FeatureEIterator", 410), b(662, 410, hh, LO), s.Lk = function() { + return !0; + }, w(mt, "BasicFeatureMap/ResolvingFeatureEIterator", 662), b(955, 486, CA, Ayn), s.Gi = function() { + return this; + }, w(mt, "EContentsEList/1", 955), b(956, 486, CA, Ykn), s.Lk = function() { + return !1; + }, w(mt, "EContentsEList/2", 956), b(954, 279, TA, Syn), s.Nk = function(e) { + }, s.Ob = function() { + return !1; + }, s.Sb = function() { + return !1; + }, w(mt, "EContentsEList/FeatureIteratorImpl/1", 954), b(825, 585, Br, $z), s.ci = function() { + this.a = !0; + }, s.fj = function() { + return this.a; + }, s.Xj = function() { + var e; + de(this), qu(this.e) ? (e = this.a, this.a = !1, et(this.e, new vo(this.e, 2, this.c, e, !1))) : this.a = !1; + }, s.a = !1, w(mt, "EDataTypeEList/Unsettable", 825), b(1849, 585, Br, Lyn), s.hi = function() { + return !0; + }, w(mt, "EDataTypeUniqueEList", 1849), b(1850, 825, Br, Nyn), s.hi = function() { + return !0; + }, w(mt, "EDataTypeUniqueEList/Unsettable", 1850), b(139, 85, Br, hu), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectContainmentEList/Resolving", 139), b(1163, 545, Br, xyn), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectContainmentEList/Unsettable/Resolving", 1163), b(748, 16, Br, yU), s.ci = function() { + this.a = !0; + }, s.fj = function() { + return this.a; + }, s.Xj = function() { + var e; + de(this), qu(this.e) ? (e = this.a, this.a = !1, et(this.e, new vo(this.e, 2, this.c, e, !1))) : this.a = !1; + }, s.a = !1, w(mt, "EObjectContainmentWithInverseEList/Unsettable", 748), b(1173, 748, Br, Ujn), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectContainmentWithInverseEList/Unsettable/Resolving", 1173), b(743, 496, Br, Dz), s.ci = function() { + this.a = !0; + }, s.fj = function() { + return this.a; + }, s.Xj = function() { + var e; + de(this), qu(this.e) ? (e = this.a, this.a = !1, et(this.e, new vo(this.e, 2, this.c, e, !1))) : this.a = !1; + }, s.a = !1, w(mt, "EObjectEList/Unsettable", 743), b(328, 496, Br, Aw), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectResolvingEList", 328), b(1641, 743, Br, Byn), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectResolvingEList/Unsettable", 1641), b(1381, 1, {}, t3n); + var uee; + w(mt, "EObjectValidator", 1381), b(546, 496, Br, zE), s.zk = function() { + return this.d; + }, s.Ak = function() { + return this.b; + }, s.bj = function() { + return !0; + }, s.Dk = function() { + return !0; + }, s.b = 0, w(mt, "EObjectWithInverseEList", 546), b(1176, 546, Br, Wjn), s.Ck = function() { + return !0; + }, w(mt, "EObjectWithInverseEList/ManyInverse", 1176), b(625, 546, Br, tD), s.ci = function() { + this.a = !0; + }, s.fj = function() { + return this.a; + }, s.Xj = function() { + var e; + de(this), qu(this.e) ? (e = this.a, this.a = !1, et(this.e, new vo(this.e, 2, this.c, e, !1))) : this.a = !1; + }, s.a = !1, w(mt, "EObjectWithInverseEList/Unsettable", 625), b(1175, 625, Br, Xjn), s.Ck = function() { + return !0; + }, w(mt, "EObjectWithInverseEList/Unsettable/ManyInverse", 1175), b(749, 546, Br, jU), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectWithInverseResolvingEList", 749), b(31, 749, Br, Fn), s.Ck = function() { + return !0; + }, w(mt, "EObjectWithInverseResolvingEList/ManyInverse", 31), b(750, 625, Br, EU), s.Ek = function() { + return !0; + }, s.li = function(e, t) { + return U2(this, e, u(t, 56)); + }, w(mt, "EObjectWithInverseResolvingEList/Unsettable", 750), b(1174, 750, Br, Vjn), s.Ck = function() { + return !0; + }, w(mt, "EObjectWithInverseResolvingEList/Unsettable/ManyInverse", 1174), b(1164, 622, Br), s.ai = function() { + return (this.b & 1792) == 0; + }, s.ci = function() { + this.b |= 1; + }, s.Bk = function() { + return (this.b & 4) != 0; + }, s.bj = function() { + return (this.b & 40) != 0; + }, s.Ck = function() { + return (this.b & 16) != 0; + }, s.Dk = function() { + return (this.b & 8) != 0; + }, s.Ek = function() { + return (this.b & Rb) != 0; + }, s.rk = function() { + return (this.b & 32) != 0; + }, s.Fk = function() { + return (this.b & Eo) != 0; + }, s.wj = function(e) { + return this.d ? IAn(this.d, e) : this.ak().Yj().wj(e); + }, s.fj = function() { + return this.b & 2 ? (this.b & 1) != 0 : this.i != 0; + }, s.hi = function() { + return (this.b & 128) != 0; + }, s.Xj = function() { + var e; + de(this), this.b & 2 && (qu(this.e) ? (e = (this.b & 1) != 0, this.b &= -2, qp(this, new vo(this.e, 2, jt(this.e.Tg(), this.ak()), e, !1))) : this.b &= -2); + }, s.ni = function() { + return (this.b & 1536) == 0; + }, s.b = 0, w(mt, "EcoreEList/Generic", 1164), b(1165, 1164, Br, RTn), s.ak = function() { + return this.a; + }, w(mt, "EcoreEList/Dynamic", 1165), b(747, 63, Wf, Lq), s.ri = function(e) { + return Q8(this.a.a, e); + }, w(mt, "EcoreEMap/1", 747), b(746, 85, Br, yW), s.bi = function(e, t) { + KT(this.b, u(t, 133)); + }, s.di = function(e, t) { + TOn(this.b); + }, s.ei = function(e, t, i) { + var r; + ++(r = this.b, u(t, 133), r).e; + }, s.fi = function(e, t) { + MF(this.b, u(t, 133)); + }, s.gi = function(e, t, i) { + MF(this.b, u(i, 133)), B(i) === B(t) && u(i, 133).Th(ece(u(t, 133).cd())), KT(this.b, u(t, 133)); + }, w(mt, "EcoreEMap/DelegateEObjectContainmentEList", 746), b(1171, 151, Vtn, BIn), w(mt, "EcoreEMap/Unsettable", 1171), b(1172, 746, Br, Qjn), s.ci = function() { + this.a = !0; + }, s.fj = function() { + return this.a; + }, s.Xj = function() { + var e; + de(this), qu(this.e) ? (e = this.a, this.a = !1, et(this.e, new vo(this.e, 2, this.c, e, !1))) : this.a = !1; + }, s.a = !1, w(mt, "EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList", 1172), b(1168, 228, sg, HCn), s.a = !1, s.b = !1, w(mt, "EcoreUtil/Copier", 1168), b(745, 1, Ei, wAn), s.Nb = function(e) { + Oi(this, e); + }, s.Ob = function() { + return l$n(this); + }, s.Pb = function() { + var e; + return l$n(this), e = this.b, this.b = null, e; + }, s.Qb = function() { + this.a.Qb(); + }, w(mt, "EcoreUtil/ProperContentIterator", 745), b(1382, 1381, {}, Z4n); + var see; + w(mt, "EcoreValidator", 1382); + var oee; + Ct(mt, "FeatureMapUtil/Validator"), b(1260, 1, { 1942: 1 }, i3n), s.rl = function(e) { + return !0; + }, w(mt, "FeatureMapUtil/1", 1260), b(757, 1, { 1942: 1 }, BZ), s.rl = function(e) { + var t; + return this.c == e ? !0 : (t = sn(te(this.a, e)), t == null ? U7e(this, e) ? (ESn(this.a, e, (qn(), G4)), !0) : (ESn(this.a, e, (qn(), Ga)), !1) : t == (qn(), G4)); + }, s.e = !1; + var mH; + w(mt, "FeatureMapUtil/BasicValidator", 757), b(758, 43, sg, Sz), w(mt, "FeatureMapUtil/BasicValidator/Cache", 758), b(501, 52, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, i8), s.Vc = function(e, t) { + _Nn(this.c, this.b, e, t); + }, s.Fc = function(e) { + return fZ(this.c, this.b, e); + }, s.Wc = function(e, t) { + return sje(this.c, this.b, e, t); + }, s.Gc = function(e) { + return m5(this, e); + }, s.Xh = function(e, t) { + S0e(this.c, this.b, e, t); + }, s.lk = function(e, t) { + return iZ(this.c, this.b, e, t); + }, s.pi = function(e) { + return kM(this.c, this.b, e, !1); + }, s.Zh = function() { + return fyn(this.c, this.b); + }, s.$h = function() { + return Hre(this.c, this.b); + }, s._h = function(e) { + return $de(this.c, this.b, e); + }, s.mk = function(e, t) { + return Sjn(this, e, t); + }, s.$b = function() { + t2(this); + }, s.Hc = function(e) { + return yC(this.c, this.b, e); + }, s.Ic = function(e) { + return Dbe(this.c, this.b, e); + }, s.Xb = function(e) { + return kM(this.c, this.b, e, !0); + }, s.Wj = function(e) { + return this; + }, s.Xc = function(e) { + return Gae(this.c, this.b, e); + }, s.dc = function() { + return Zj(this); + }, s.fj = function() { + return !g7(this.c, this.b); + }, s.Kc = function() { + return g0e(this.c, this.b); + }, s.Yc = function() { + return p0e(this.c, this.b); + }, s.Zc = function(e) { + return Pge(this.c, this.b, e); + }, s.ii = function(e, t) { + return rRn(this.c, this.b, e, t); + }, s.ji = function(e, t) { + Ade(this.c, this.b, e, t); + }, s.$c = function(e) { + return Nxn(this.c, this.b, e); + }, s.Mc = function(e) { + return dke(this.c, this.b, e); + }, s._c = function(e, t) { + return hRn(this.c, this.b, e, t); + }, s.Wb = function(e) { + iM(this.c, this.b), m5(this, u(e, 15)); + }, s.gc = function() { + return Hge(this.c, this.b); + }, s.Pc = function() { + return Kle(this.c, this.b); + }, s.Qc = function(e) { + return zae(this.c, this.b, e); + }, s.Ib = function() { + var e, t; + for (t = new r1(), t.a += "[", e = fyn(this.c, this.b); gF(e); ) + br(t, y5(RT(e))), gF(e) && (t.a += Qi); + return t.a += "]", t.a; + }, s.Xj = function() { + iM(this.c, this.b); + }, w(mt, "FeatureMapUtil/FeatureEList", 501), b(627, 36, jk, v$), s.yi = function(e) { + return u6(this, e); + }, s.Di = function(e) { + var t, i, r, c, o, f, h; + switch (this.d) { + case 1: + case 2: { + if (o = e.Ai(), B(o) === B(this.c) && u6(this, null) == e.yi(null)) + return this.g = e.zi(), e.xi() == 1 && (this.d = 1), !0; + break; + } + case 3: { + switch (c = e.xi(), c) { + case 3: { + if (o = e.Ai(), B(o) === B(this.c) && u6(this, null) == e.yi(null)) + return this.d = 5, t = new Nd(2), me(t, this.g), me(t, e.zi()), this.g = t, !0; + break; + } + } + break; + } + case 5: { + switch (c = e.xi(), c) { + case 3: { + if (o = e.Ai(), B(o) === B(this.c) && u6(this, null) == e.yi(null)) + return i = u(this.g, 14), i.Fc(e.zi()), !0; + break; + } + } + break; + } + case 4: { + switch (c = e.xi(), c) { + case 3: { + if (o = e.Ai(), B(o) === B(this.c) && u6(this, null) == e.yi(null)) + return this.d = 1, this.g = e.zi(), !0; + break; + } + case 4: { + if (o = e.Ai(), B(o) === B(this.c) && u6(this, null) == e.yi(null)) + return this.d = 6, h = new Nd(2), me(h, this.n), me(h, e.Bi()), this.n = h, f = A(M(be, 1), Le, 25, 15, [this.o, e.Ci()]), this.g = f, !0; + break; + } + } + break; + } + case 6: { + switch (c = e.xi(), c) { + case 4: { + if (o = e.Ai(), B(o) === B(this.c) && u6(this, null) == e.yi(null)) + return i = u(this.n, 14), i.Fc(e.Bi()), f = u(this.g, 48), r = F(be, Le, 25, f.length + 1, 15, 1), pc(f, 0, r, 0, f.length), r[f.length] = e.Ci(), this.g = r, !0; + break; + } + } + break; + } + } + return !1; + }, w(mt, "FeatureMapUtil/FeatureENotificationImpl", 627), b(552, 501, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 76: 1, 153: 1, 215: 1, 1937: 1, 69: 1, 95: 1 }, IE), s.dl = function(e, t) { + return fZ(this.c, e, t); + }, s.el = function(e, t, i) { + return iZ(this.c, e, t, i); + }, s.fl = function(e, t, i) { + return MZ(this.c, e, t, i); + }, s.gl = function() { + return this; + }, s.hl = function(e, t) { + return W7(this.c, e, t); + }, s.il = function(e) { + return u(kM(this.c, this.b, e, !1), 72).ak(); + }, s.jl = function(e) { + return u(kM(this.c, this.b, e, !1), 72).dd(); + }, s.kl = function() { + return this.a; + }, s.ll = function(e) { + return !g7(this.c, e); + }, s.ml = function(e, t) { + yM(this.c, e, t); + }, s.nl = function(e) { + return zIn(this.c, e); + }, s.ol = function(e) { + wFn(this.c, e); + }, w(mt, "FeatureMapUtil/FeatureFeatureMap", 552), b(1259, 1, GB, Nkn), s.Wj = function(e) { + return kM(this.b, this.a, -1, e); + }, s.fj = function() { + return !g7(this.b, this.a); + }, s.Wb = function(e) { + yM(this.b, this.a, e); + }, s.Xj = function() { + iM(this.b, this.a); + }, w(mt, "FeatureMapUtil/FeatureValue", 1259); + var Op, kH, yH, Dp, fee, Ny = Ct($A, "AnyType"); + b(666, 60, Uh, VI), w($A, "InvalidDatatypeValueException", 666); + var sI = Ct($A, LGn), By = Ct($A, NGn), D1n = Ct($A, BGn), hee, oc, $1n, cd, lee, aee, dee, bee, wee, gee, pee, vee, mee, kee, yee, Gg, jee, zg, w9, Eee, $0, Ry, _y, Cee, g9, p9; + b(830, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 843: 1 }, iG), s._g = function(e, t, i) { + switch (e) { + case 0: + return i ? (!this.c && (this.c = new xt(this, 0)), this.c) : (!this.c && (this.c = new xt(this, 0)), this.c.b); + case 1: + return i ? (!this.c && (this.c = new xt(this, 0)), u(kc(this.c, (ht(), cd)), 153)) : (!this.c && (this.c = new xt(this, 0)), u(u(kc(this.c, (ht(), cd)), 153), 215)).kl(); + case 2: + return i ? (!this.b && (this.b = new xt(this, 2)), this.b) : (!this.b && (this.b = new xt(this, 2)), this.b.b); + } + return Cs(this, e - ee(this.zh()), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : this.zh(), e), t, i); + }, s.jh = function(e, t, i) { + var r; + switch (t) { + case 0: + return !this.c && (this.c = new xt(this, 0)), q7(this.c, e, i); + case 1: + return (!this.c && (this.c = new xt(this, 0)), u(u(kc(this.c, (ht(), cd)), 153), 69)).mk(e, i); + case 2: + return !this.b && (this.b = new xt(this, 2)), q7(this.b, e, i); + } + return r = u(On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : this.zh(), t), 66), r.Nj().Rj(this, QX(this), t - ee(this.zh()), e, i); + }, s.lh = function(e) { + switch (e) { + case 0: + return !!this.c && this.c.i != 0; + case 1: + return !(!this.c && (this.c = new xt(this, 0)), u(kc(this.c, (ht(), cd)), 153)).dc(); + case 2: + return !!this.b && this.b.i != 0; + } + return js(this, e - ee(this.zh()), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : this.zh(), e)); + }, s.sh = function(e, t) { + switch (e) { + case 0: + !this.c && (this.c = new xt(this, 0)), j8(this.c, t); + return; + case 1: + (!this.c && (this.c = new xt(this, 0)), u(u(kc(this.c, (ht(), cd)), 153), 215)).Wb(t); + return; + case 2: + !this.b && (this.b = new xt(this, 2)), j8(this.b, t); + return; + } + Ps(this, e - ee(this.zh()), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : this.zh(), e), t); + }, s.zh = function() { + return ht(), $1n; + }, s.Bh = function(e) { + switch (e) { + case 0: + !this.c && (this.c = new xt(this, 0)), de(this.c); + return; + case 1: + (!this.c && (this.c = new xt(this, 0)), u(kc(this.c, (ht(), cd)), 153)).$b(); + return; + case 2: + !this.b && (this.b = new xt(this, 2)), de(this.b); + return; + } + As(this, e - ee(this.zh()), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : this.zh(), e)); + }, s.Ib = function() { + var e; + return this.j & 4 ? yo(this) : (e = new Bs(yo(this)), e.a += " (mixed: ", w5(e, this.c), e.a += ", anyAttribute: ", w5(e, this.b), e.a += ")", e.a); + }, w(Wt, "AnyTypeImpl", 830), b(667, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 2021: 1, 667: 1 }, c3n), s._g = function(e, t, i) { + switch (e) { + case 0: + return this.a; + case 1: + return this.b; + } + return Cs(this, e - ee((ht(), Gg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : Gg, e), t, i); + }, s.lh = function(e) { + switch (e) { + case 0: + return this.a != null; + case 1: + return this.b != null; + } + return js(this, e - ee((ht(), Gg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : Gg, e)); + }, s.sh = function(e, t) { + switch (e) { + case 0: + Fte(this, Ce(t)); + return; + case 1: + xte(this, Ce(t)); + return; + } + Ps(this, e - ee((ht(), Gg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : Gg, e), t); + }, s.zh = function() { + return ht(), Gg; + }, s.Bh = function(e) { + switch (e) { + case 0: + this.a = null; + return; + case 1: + this.b = null; + return; + } + As(this, e - ee((ht(), Gg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : Gg, e)); + }, s.Ib = function() { + var e; + return this.j & 4 ? yo(this) : (e = new Bs(yo(this)), e.a += " (data: ", br(e, this.a), e.a += ", target: ", br(e, this.b), e.a += ")", e.a); + }, s.a = null, s.b = null, w(Wt, "ProcessingInstructionImpl", 667), b(668, 830, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 843: 1, 2022: 1, 668: 1 }, C9n), s._g = function(e, t, i) { + switch (e) { + case 0: + return i ? (!this.c && (this.c = new xt(this, 0)), this.c) : (!this.c && (this.c = new xt(this, 0)), this.c.b); + case 1: + return i ? (!this.c && (this.c = new xt(this, 0)), u(kc(this.c, (ht(), cd)), 153)) : (!this.c && (this.c = new xt(this, 0)), u(u(kc(this.c, (ht(), cd)), 153), 215)).kl(); + case 2: + return i ? (!this.b && (this.b = new xt(this, 2)), this.b) : (!this.b && (this.b = new xt(this, 2)), this.b.b); + case 3: + return !this.c && (this.c = new xt(this, 0)), Ce(W7(this.c, (ht(), w9), !0)); + case 4: + return CU(this.a, (!this.c && (this.c = new xt(this, 0)), Ce(W7(this.c, (ht(), w9), !0)))); + case 5: + return this.a; + } + return Cs(this, e - ee((ht(), zg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : zg, e), t, i); + }, s.lh = function(e) { + switch (e) { + case 0: + return !!this.c && this.c.i != 0; + case 1: + return !(!this.c && (this.c = new xt(this, 0)), u(kc(this.c, (ht(), cd)), 153)).dc(); + case 2: + return !!this.b && this.b.i != 0; + case 3: + return !this.c && (this.c = new xt(this, 0)), Ce(W7(this.c, (ht(), w9), !0)) != null; + case 4: + return CU(this.a, (!this.c && (this.c = new xt(this, 0)), Ce(W7(this.c, (ht(), w9), !0)))) != null; + case 5: + return !!this.a; + } + return js(this, e - ee((ht(), zg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : zg, e)); + }, s.sh = function(e, t) { + switch (e) { + case 0: + !this.c && (this.c = new xt(this, 0)), j8(this.c, t); + return; + case 1: + (!this.c && (this.c = new xt(this, 0)), u(u(kc(this.c, (ht(), cd)), 153), 215)).Wb(t); + return; + case 2: + !this.b && (this.b = new xt(this, 2)), j8(this.b, t); + return; + case 3: + fX(this, Ce(t)); + return; + case 4: + fX(this, TU(this.a, t)); + return; + case 5: + Lte(this, u(t, 148)); + return; + } + Ps(this, e - ee((ht(), zg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : zg, e), t); + }, s.zh = function() { + return ht(), zg; + }, s.Bh = function(e) { + switch (e) { + case 0: + !this.c && (this.c = new xt(this, 0)), de(this.c); + return; + case 1: + (!this.c && (this.c = new xt(this, 0)), u(kc(this.c, (ht(), cd)), 153)).$b(); + return; + case 2: + !this.b && (this.b = new xt(this, 2)), de(this.b); + return; + case 3: + !this.c && (this.c = new xt(this, 0)), yM(this.c, (ht(), w9), null); + return; + case 4: + fX(this, TU(this.a, null)); + return; + case 5: + this.a = null; + return; + } + As(this, e - ee((ht(), zg)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : zg, e)); + }, w(Wt, "SimpleAnyTypeImpl", 668), b(669, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 2023: 1, 669: 1 }, E9n), s._g = function(e, t, i) { + switch (e) { + case 0: + return i ? (!this.a && (this.a = new xt(this, 0)), this.a) : (!this.a && (this.a = new xt(this, 0)), this.a.b); + case 1: + return i ? (!this.b && (this.b = new Xu((Sn(), Zi), tc, this, 1)), this.b) : (!this.b && (this.b = new Xu((Sn(), Zi), tc, this, 1)), N8(this.b)); + case 2: + return i ? (!this.c && (this.c = new Xu((Sn(), Zi), tc, this, 2)), this.c) : (!this.c && (this.c = new Xu((Sn(), Zi), tc, this, 2)), N8(this.c)); + case 3: + return !this.a && (this.a = new xt(this, 0)), kc(this.a, (ht(), Ry)); + case 4: + return !this.a && (this.a = new xt(this, 0)), kc(this.a, (ht(), _y)); + case 5: + return !this.a && (this.a = new xt(this, 0)), kc(this.a, (ht(), g9)); + case 6: + return !this.a && (this.a = new xt(this, 0)), kc(this.a, (ht(), p9)); + } + return Cs(this, e - ee((ht(), $0)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : $0, e), t, i); + }, s.jh = function(e, t, i) { + var r; + switch (t) { + case 0: + return !this.a && (this.a = new xt(this, 0)), q7(this.a, e, i); + case 1: + return !this.b && (this.b = new Xu((Sn(), Zi), tc, this, 1)), yE(this.b, e, i); + case 2: + return !this.c && (this.c = new Xu((Sn(), Zi), tc, this, 2)), yE(this.c, e, i); + case 5: + return !this.a && (this.a = new xt(this, 0)), Sjn(kc(this.a, (ht(), g9)), e, i); + } + return r = u(On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : (ht(), $0), t), 66), r.Nj().Rj(this, QX(this), t - ee((ht(), $0)), e, i); + }, s.lh = function(e) { + switch (e) { + case 0: + return !!this.a && this.a.i != 0; + case 1: + return !!this.b && this.b.f != 0; + case 2: + return !!this.c && this.c.f != 0; + case 3: + return !this.a && (this.a = new xt(this, 0)), !Zj(kc(this.a, (ht(), Ry))); + case 4: + return !this.a && (this.a = new xt(this, 0)), !Zj(kc(this.a, (ht(), _y))); + case 5: + return !this.a && (this.a = new xt(this, 0)), !Zj(kc(this.a, (ht(), g9))); + case 6: + return !this.a && (this.a = new xt(this, 0)), !Zj(kc(this.a, (ht(), p9))); + } + return js(this, e - ee((ht(), $0)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : $0, e)); + }, s.sh = function(e, t) { + switch (e) { + case 0: + !this.a && (this.a = new xt(this, 0)), j8(this.a, t); + return; + case 1: + !this.b && (this.b = new Xu((Sn(), Zi), tc, this, 1)), fT(this.b, t); + return; + case 2: + !this.c && (this.c = new Xu((Sn(), Zi), tc, this, 2)), fT(this.c, t); + return; + case 3: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), Ry))), !this.a && (this.a = new xt(this, 0)), m5(kc(this.a, Ry), u(t, 14)); + return; + case 4: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), _y))), !this.a && (this.a = new xt(this, 0)), m5(kc(this.a, _y), u(t, 14)); + return; + case 5: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), g9))), !this.a && (this.a = new xt(this, 0)), m5(kc(this.a, g9), u(t, 14)); + return; + case 6: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), p9))), !this.a && (this.a = new xt(this, 0)), m5(kc(this.a, p9), u(t, 14)); + return; + } + Ps(this, e - ee((ht(), $0)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : $0, e), t); + }, s.zh = function() { + return ht(), $0; + }, s.Bh = function(e) { + switch (e) { + case 0: + !this.a && (this.a = new xt(this, 0)), de(this.a); + return; + case 1: + !this.b && (this.b = new Xu((Sn(), Zi), tc, this, 1)), this.b.c.$b(); + return; + case 2: + !this.c && (this.c = new Xu((Sn(), Zi), tc, this, 2)), this.c.c.$b(); + return; + case 3: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), Ry))); + return; + case 4: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), _y))); + return; + case 5: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), g9))); + return; + case 6: + !this.a && (this.a = new xt(this, 0)), t2(kc(this.a, (ht(), p9))); + return; + } + As(this, e - ee((ht(), $0)), On(this.j & 2 ? (!this.k && (this.k = new Fo()), this.k).ck() : $0, e)); + }, s.Ib = function() { + var e; + return this.j & 4 ? yo(this) : (e = new Bs(yo(this)), e.a += " (mixed: ", w5(e, this.a), e.a += ")", e.a); + }, w(Wt, "XMLTypeDocumentRootImpl", 669), b(1919, 704, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1, 2024: 1 }, r3n), s.Ih = function(e, t) { + switch (e.yj()) { + case 7: + case 8: + case 9: + case 10: + case 16: + case 22: + case 23: + case 24: + case 25: + case 26: + case 32: + case 33: + case 34: + case 36: + case 37: + case 44: + case 45: + case 50: + case 51: + case 53: + case 55: + case 56: + case 57: + case 58: + case 60: + case 61: + case 4: + return t == null ? null : Nr(t); + case 19: + case 28: + case 29: + case 35: + case 38: + case 39: + case 41: + case 46: + case 52: + case 54: + case 5: + return Ce(t); + case 6: + return uue(u(t, 190)); + case 12: + case 47: + case 49: + case 11: + return JRn(this, e, t); + case 13: + return t == null ? null : Wye(u(t, 240)); + case 15: + case 14: + return t == null ? null : ihe(K(Y(t))); + case 17: + return nxn((ht(), t)); + case 18: + return nxn(t); + case 21: + case 20: + return t == null ? null : rhe(u(t, 155).a); + case 27: + return sue(u(t, 190)); + case 30: + return gFn((ht(), u(t, 15))); + case 31: + return gFn(u(t, 15)); + case 40: + return fue((ht(), t)); + case 42: + return exn((ht(), t)); + case 43: + return exn(t); + case 59: + case 48: + return oue((ht(), t)); + default: + throw T(new Hn(B4 + e.ne() + l0)); + } + }, s.Jh = function(e) { + var t, i, r, c, o; + switch (e.G == -1 && (e.G = (i = is(e), i ? m1(i.Mh(), e) : -1)), e.G) { + case 0: + return t = new iG(), t; + case 1: + return r = new c3n(), r; + case 2: + return c = new C9n(), c; + case 3: + return o = new E9n(), o; + default: + throw T(new Hn(SB + e.zb + l0)); + } + }, s.Kh = function(e, t) { + var i, r, c, o, f, h, l, a, d, g, p, v, m, C, S, $; + switch (e.yj()) { + case 5: + case 52: + case 4: + return t; + case 6: + return Epe(t); + case 8: + case 7: + return t == null ? null : hve(t); + case 9: + return t == null ? null : X8(ss((r = Ec(t, !0), r.length > 0 && (Te(0, r.length), r.charCodeAt(0) == 43) ? r.substr(1) : r), -128, 127) << 24 >> 24); + case 10: + return t == null ? null : X8(ss((c = Ec(t, !0), c.length > 0 && (Te(0, c.length), c.charCodeAt(0) == 43) ? c.substr(1) : c), -128, 127) << 24 >> 24); + case 11: + return Ce(r0(this, (ht(), dee), t)); + case 12: + return Ce(r0(this, (ht(), bee), t)); + case 13: + return t == null ? null : new CG(Ec(t, !0)); + case 15: + case 14: + return O9e(t); + case 16: + return Ce(r0(this, (ht(), wee), t)); + case 17: + return j$n((ht(), t)); + case 18: + return j$n(t); + case 28: + case 29: + case 35: + case 38: + case 39: + case 41: + case 54: + case 19: + return Ec(t, !0); + case 21: + case 20: + return _9e(t); + case 22: + return Ce(r0(this, (ht(), gee), t)); + case 23: + return Ce(r0(this, (ht(), pee), t)); + case 24: + return Ce(r0(this, (ht(), vee), t)); + case 25: + return Ce(r0(this, (ht(), mee), t)); + case 26: + return Ce(r0(this, (ht(), kee), t)); + case 27: + return vpe(t); + case 30: + return E$n((ht(), t)); + case 31: + return E$n(t); + case 32: + return t == null ? null : Q(ss((d = Ec(t, !0), d.length > 0 && (Te(0, d.length), d.charCodeAt(0) == 43) ? d.substr(1) : d), Bi, nt)); + case 33: + return t == null ? null : new il((g = Ec(t, !0), g.length > 0 && (Te(0, g.length), g.charCodeAt(0) == 43) ? g.substr(1) : g)); + case 34: + return t == null ? null : Q(ss((p = Ec(t, !0), p.length > 0 && (Te(0, p.length), p.charCodeAt(0) == 43) ? p.substr(1) : p), Bi, nt)); + case 36: + return t == null ? null : Aa(MM((v = Ec(t, !0), v.length > 0 && (Te(0, v.length), v.charCodeAt(0) == 43) ? v.substr(1) : v))); + case 37: + return t == null ? null : Aa(MM((m = Ec(t, !0), m.length > 0 && (Te(0, m.length), m.charCodeAt(0) == 43) ? m.substr(1) : m))); + case 40: + return F2e((ht(), t)); + case 42: + return C$n((ht(), t)); + case 43: + return C$n(t); + case 44: + return t == null ? null : new il((C = Ec(t, !0), C.length > 0 && (Te(0, C.length), C.charCodeAt(0) == 43) ? C.substr(1) : C)); + case 45: + return t == null ? null : new il((S = Ec(t, !0), S.length > 0 && (Te(0, S.length), S.charCodeAt(0) == 43) ? S.substr(1) : S)); + case 46: + return Ec(t, !1); + case 47: + return Ce(r0(this, (ht(), yee), t)); + case 59: + case 48: + return $2e((ht(), t)); + case 49: + return Ce(r0(this, (ht(), jee), t)); + case 50: + return t == null ? null : Q3(ss(($ = Ec(t, !0), $.length > 0 && (Te(0, $.length), $.charCodeAt(0) == 43) ? $.substr(1) : $), PA, 32767) << 16 >> 16); + case 51: + return t == null ? null : Q3(ss((o = Ec(t, !0), o.length > 0 && (Te(0, o.length), o.charCodeAt(0) == 43) ? o.substr(1) : o), PA, 32767) << 16 >> 16); + case 53: + return Ce(r0(this, (ht(), Eee), t)); + case 55: + return t == null ? null : Q3(ss((f = Ec(t, !0), f.length > 0 && (Te(0, f.length), f.charCodeAt(0) == 43) ? f.substr(1) : f), PA, 32767) << 16 >> 16); + case 56: + return t == null ? null : Q3(ss((h = Ec(t, !0), h.length > 0 && (Te(0, h.length), h.charCodeAt(0) == 43) ? h.substr(1) : h), PA, 32767) << 16 >> 16); + case 57: + return t == null ? null : Aa(MM((l = Ec(t, !0), l.length > 0 && (Te(0, l.length), l.charCodeAt(0) == 43) ? l.substr(1) : l))); + case 58: + return t == null ? null : Aa(MM((a = Ec(t, !0), a.length > 0 && (Te(0, a.length), a.charCodeAt(0) == 43) ? a.substr(1) : a))); + case 60: + return t == null ? null : Q(ss((i = Ec(t, !0), i.length > 0 && (Te(0, i.length), i.charCodeAt(0) == 43) ? i.substr(1) : i), Bi, nt)); + case 61: + return t == null ? null : Q(ss(Ec(t, !0), Bi, nt)); + default: + throw T(new Hn(B4 + e.ne() + l0)); + } + }; + var Tee, F1n, Mee, x1n; + w(Wt, "XMLTypeFactoryImpl", 1919), b(586, 179, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1, 1945: 1, 586: 1 }, fTn), s.N = !1, s.O = !1; + var Aee = !1; + w(Wt, "XMLTypePackageImpl", 586), b(1852, 1, { 837: 1 }, u3n), s._j = function() { + return pZ(), Lee; + }, w(Wt, "XMLTypePackageImpl/1", 1852), b(1861, 1, qe, s3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/10", 1861), b(1862, 1, qe, o3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/11", 1862), b(1863, 1, qe, f3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/12", 1863), b(1864, 1, qe, h3n), s.wj = function(e) { + return z0(e); + }, s.xj = function(e) { + return F(Si, q, 333, e, 7, 1); + }, w(Wt, "XMLTypePackageImpl/13", 1864), b(1865, 1, qe, l3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/14", 1865), b(1866, 1, qe, a3n), s.wj = function(e) { + return I(e, 15); + }, s.xj = function(e) { + return F(Ds, Db, 15, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/15", 1866), b(1867, 1, qe, d3n), s.wj = function(e) { + return I(e, 15); + }, s.xj = function(e) { + return F(Ds, Db, 15, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/16", 1867), b(1868, 1, qe, b3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/17", 1868), b(1869, 1, qe, w3n), s.wj = function(e) { + return I(e, 155); + }, s.xj = function(e) { + return F(z4, q, 155, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/18", 1869), b(1870, 1, qe, g3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/19", 1870), b(1853, 1, qe, p3n), s.wj = function(e) { + return I(e, 843); + }, s.xj = function(e) { + return F(Ny, rn, 843, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/2", 1853), b(1871, 1, qe, v3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/20", 1871), b(1872, 1, qe, m3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/21", 1872), b(1873, 1, qe, k3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/22", 1873), b(1874, 1, qe, y3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/23", 1874), b(1875, 1, qe, j3n), s.wj = function(e) { + return I(e, 190); + }, s.xj = function(e) { + return F(ku, q, 190, e, 0, 2); + }, w(Wt, "XMLTypePackageImpl/24", 1875), b(1876, 1, qe, E3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/25", 1876), b(1877, 1, qe, C3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/26", 1877), b(1878, 1, qe, T3n), s.wj = function(e) { + return I(e, 15); + }, s.xj = function(e) { + return F(Ds, Db, 15, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/27", 1878), b(1879, 1, qe, M3n), s.wj = function(e) { + return I(e, 15); + }, s.xj = function(e) { + return F(Ds, Db, 15, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/28", 1879), b(1880, 1, qe, A3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/29", 1880), b(1854, 1, qe, S3n), s.wj = function(e) { + return I(e, 667); + }, s.xj = function(e) { + return F(sI, rn, 2021, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/3", 1854), b(1881, 1, qe, P3n), s.wj = function(e) { + return I(e, 19); + }, s.xj = function(e) { + return F(Ui, q, 19, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/30", 1881), b(1882, 1, qe, I3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/31", 1882), b(1883, 1, qe, O3n), s.wj = function(e) { + return I(e, 162); + }, s.xj = function(e) { + return F(d0, q, 162, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/32", 1883), b(1884, 1, qe, D3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/33", 1884), b(1885, 1, qe, $3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/34", 1885), b(1886, 1, qe, F3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/35", 1886), b(1887, 1, qe, x3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/36", 1887), b(1888, 1, qe, L3n), s.wj = function(e) { + return I(e, 15); + }, s.xj = function(e) { + return F(Ds, Db, 15, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/37", 1888), b(1889, 1, qe, N3n), s.wj = function(e) { + return I(e, 15); + }, s.xj = function(e) { + return F(Ds, Db, 15, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/38", 1889), b(1890, 1, qe, B3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/39", 1890), b(1855, 1, qe, R3n), s.wj = function(e) { + return I(e, 668); + }, s.xj = function(e) { + return F(By, rn, 2022, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/4", 1855), b(1891, 1, qe, _3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/40", 1891), b(1892, 1, qe, K3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/41", 1892), b(1893, 1, qe, H3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/42", 1893), b(1894, 1, qe, q3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/43", 1894), b(1895, 1, qe, G3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/44", 1895), b(1896, 1, qe, z3n), s.wj = function(e) { + return I(e, 184); + }, s.xj = function(e) { + return F(b0, q, 184, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/45", 1896), b(1897, 1, qe, U3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/46", 1897), b(1898, 1, qe, W3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/47", 1898), b(1899, 1, qe, X3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/48", 1899), b(Tl, 1, qe, V3n), s.wj = function(e) { + return I(e, 184); + }, s.xj = function(e) { + return F(b0, q, 184, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/49", Tl), b(1856, 1, qe, Q3n), s.wj = function(e) { + return I(e, 669); + }, s.xj = function(e) { + return F(D1n, rn, 2023, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/5", 1856), b(1901, 1, qe, J3n), s.wj = function(e) { + return I(e, 162); + }, s.xj = function(e) { + return F(d0, q, 162, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/50", 1901), b(1902, 1, qe, Y3n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/51", 1902), b(1903, 1, qe, Z3n), s.wj = function(e) { + return I(e, 19); + }, s.xj = function(e) { + return F(Ui, q, 19, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/52", 1903), b(1857, 1, qe, n4n), s.wj = function(e) { + return yi(e); + }, s.xj = function(e) { + return F(tn, q, 2, e, 6, 1); + }, w(Wt, "XMLTypePackageImpl/6", 1857), b(1858, 1, qe, e4n), s.wj = function(e) { + return I(e, 190); + }, s.xj = function(e) { + return F(ku, q, 190, e, 0, 2); + }, w(Wt, "XMLTypePackageImpl/7", 1858), b(1859, 1, qe, t4n), s.wj = function(e) { + return G0(e); + }, s.xj = function(e) { + return F(oi, q, 476, e, 8, 1); + }, w(Wt, "XMLTypePackageImpl/8", 1859), b(1860, 1, qe, i4n), s.wj = function(e) { + return I(e, 217); + }, s.xj = function(e) { + return F(op, q, 217, e, 0, 1); + }, w(Wt, "XMLTypePackageImpl/9", 1860); + var Tf, _1, v9, oI, P; + b(50, 60, Uh, Ee), w(S1, "RegEx/ParseException", 50), b(820, 1, {}, ZH), s.sl = function(e) { + return e < this.j && Di(this.i, e) == 63; + }, s.tl = function() { + var e, t, i, r, c; + if (this.c != 10) + throw T(new Ee(Pe((je(), yA)))); + switch (e = this.a, e) { + case 101: + e = 27; + break; + case 102: + e = 12; + break; + case 110: + e = 10; + break; + case 114: + e = 13; + break; + case 116: + e = 9; + break; + case 120: + if (Qe(this), this.c != 0) + throw T(new Ee(Pe((je(), A1)))); + if (this.a == 123) { + c = 0, i = 0; + do { + if (Qe(this), this.c != 0) + throw T(new Ee(Pe((je(), A1)))); + if ((c = Pa(this.a)) < 0) + break; + if (i > i * 16) + throw T(new Ee(Pe((je(), Vqn)))); + i = i * 16 + c; + } while (!0); + if (this.a != 125) + throw T(new Ee(Pe((je(), Qqn)))); + if (i > H4) + throw T(new Ee(Pe((je(), Jqn)))); + e = i; + } else { + if (c = 0, this.c != 0 || (c = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (i = c, Qe(this), this.c != 0 || (c = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + i = i * 16 + c, e = i; + } + break; + case 117: + if (r = 0, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = t * 16 + r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = t * 16 + r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + t = t * 16 + r, e = t; + break; + case 118: + if (Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = t * 16 + r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = t * 16 + r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = t * 16 + r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = t * 16 + r, Qe(this), this.c != 0 || (r = Pa(this.a)) < 0) + throw T(new Ee(Pe((je(), A1)))); + if (t = t * 16 + r, t > H4) + throw T(new Ee(Pe((je(), "parser.descappe.4")))); + e = t; + break; + case 65: + case 90: + case 122: + throw T(new Ee(Pe((je(), Yqn)))); + } + return e; + }, s.ul = function(e) { + var t, i; + switch (e) { + case 100: + i = (this.e & 32) == 32 ? El("Nd", !0) : (Je(), fI); + break; + case 68: + i = (this.e & 32) == 32 ? El("Nd", !1) : (Je(), K1n); + break; + case 119: + i = (this.e & 32) == 32 ? El("IsWord", !0) : (Je(), Pv); + break; + case 87: + i = (this.e & 32) == 32 ? El("IsWord", !1) : (Je(), q1n); + break; + case 115: + i = (this.e & 32) == 32 ? El("IsSpace", !0) : (Je(), $p); + break; + case 83: + i = (this.e & 32) == 32 ? El("IsSpace", !1) : (Je(), H1n); + break; + default: + throw T(new _r((t = e, YGn + t.toString(16)))); + } + return i; + }, s.vl = function(e) { + var t, i, r, c, o, f, h, l, a, d, g, p; + for (this.b = 1, Qe(this), t = null, this.c == 0 && this.a == 94 ? (Qe(this), e ? d = (Je(), Je(), new es(5)) : (t = (Je(), Je(), new es(4)), jc(t, 0, H4), d = new es(4))) : d = (Je(), Je(), new es(4)), c = !0; (p = this.c) != 1 && !(p == 0 && this.a == 93 && !c); ) { + if (c = !1, i = this.a, r = !1, p == 10) + switch (i) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + Sb(d, this.ul(i)), r = !0; + break; + case 105: + case 73: + case 99: + case 67: + i = this.Ll(d, i), i < 0 && (r = !0); + break; + case 112: + case 80: + if (g = mY(this, i), !g) + throw T(new Ee(Pe((je(), KB)))); + Sb(d, g), r = !0; + break; + default: + i = this.tl(); + } + else if (p == 20) { + if (f = c3(this.i, 58, this.d), f < 0) + throw T(new Ee(Pe((je(), qtn)))); + if (h = !0, Di(this.i, this.d) == 94 && (++this.d, h = !1), o = Zu(this.i, this.d, f), l = hPn(o, h, (this.e & 512) == 512), !l) + throw T(new Ee(Pe((je(), Gqn)))); + if (Sb(d, l), r = !0, f + 1 >= this.j || Di(this.i, f + 1) != 93) + throw T(new Ee(Pe((je(), qtn)))); + this.d = f + 2; + } + if (Qe(this), !r) + if (this.c != 0 || this.a != 45) + jc(d, i, i); + else { + if (Qe(this), (p = this.c) == 1) + throw T(new Ee(Pe((je(), jA)))); + p == 0 && this.a == 93 ? (jc(d, i, i), jc(d, 45, 45)) : (a = this.a, p == 10 && (a = this.tl()), Qe(this), jc(d, i, a)); + } + (this.e & Eo) == Eo && this.c == 0 && this.a == 44 && Qe(this); + } + if (this.c == 1) + throw T(new Ee(Pe((je(), jA)))); + return t && (F6(t, d), d = t), Jw(d), D6(d), this.b = 0, Qe(this), d; + }, s.wl = function() { + var e, t, i, r; + for (i = this.vl(!1); (r = this.c) != 7; ) + if (e = this.a, r == 0 && (e == 45 || e == 38) || r == 4) { + if (Qe(this), this.c != 9) + throw T(new Ee(Pe((je(), Uqn)))); + if (t = this.vl(!1), r == 4) + Sb(i, t); + else if (e == 45) + F6(i, t); + else if (e == 38) + zRn(i, t); + else + throw T(new _r("ASSERT")); + } else + throw T(new Ee(Pe((je(), Wqn)))); + return Qe(this), i; + }, s.xl = function() { + var e, t; + return e = this.a - 48, t = (Je(), Je(), new e$(12, null, e)), !this.g && (this.g = new lj()), hj(this.g, new Nq(e)), Qe(this), t; + }, s.yl = function() { + return Qe(this), Je(), Iee; + }, s.zl = function() { + return Qe(this), Je(), Pee; + }, s.Al = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Bl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Cl = function() { + return Qe(this), xwe(); + }, s.Dl = function() { + return Qe(this), Je(), Dee; + }, s.El = function() { + return Qe(this), Je(), Fee; + }, s.Fl = function() { + var e; + if (this.d >= this.j || ((e = Di(this.i, this.d++)) & 65504) != 64) + throw T(new Ee(Pe((je(), Kqn)))); + return Qe(this), Je(), Je(), new th(0, e - 64); + }, s.Gl = function() { + return Qe(this), vye(); + }, s.Hl = function() { + return Qe(this), Je(), xee; + }, s.Il = function() { + var e; + return e = (Je(), Je(), new th(0, 105)), Qe(this), e; + }, s.Jl = function() { + return Qe(this), Je(), $ee; + }, s.Kl = function() { + return Qe(this), Je(), Oee; + }, s.Ll = function(e, t) { + return this.tl(); + }, s.Ml = function() { + return Qe(this), Je(), R1n; + }, s.Nl = function() { + var e, t, i, r, c; + if (this.d + 1 >= this.j) + throw T(new Ee(Pe((je(), Bqn)))); + if (r = -1, t = null, e = Di(this.i, this.d), 49 <= e && e <= 57) { + if (r = e - 48, !this.g && (this.g = new lj()), hj(this.g, new Nq(r)), ++this.d, Di(this.i, this.d) != 41) + throw T(new Ee(Pe((je(), Ka)))); + ++this.d; + } else + switch (e == 63 && --this.d, Qe(this), t = HZ(this), t.e) { + case 20: + case 21: + case 22: + case 23: + break; + case 8: + if (this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + break; + default: + throw T(new Ee(Pe((je(), Rqn)))); + } + if (Qe(this), c = Xd(this), i = null, c.e == 2) { + if (c.em() != 2) + throw T(new Ee(Pe((je(), _qn)))); + i = c.am(1), c = c.am(0); + } + if (this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), Je(), Je(), new HPn(r, t, c, i); + }, s.Ol = function() { + return Qe(this), Je(), _1n; + }, s.Pl = function() { + var e; + if (Qe(this), e = UE(24, Xd(this)), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), e; + }, s.Ql = function() { + var e; + if (Qe(this), e = UE(20, Xd(this)), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), e; + }, s.Rl = function() { + var e; + if (Qe(this), e = UE(22, Xd(this)), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), e; + }, s.Sl = function() { + var e, t, i, r, c; + for (e = 0, i = 0, t = -1; this.d < this.j && (t = Di(this.i, this.d), c = CY(t), c != 0); ) + e |= c, ++this.d; + if (this.d >= this.j) + throw T(new Ee(Pe((je(), Ktn)))); + if (t == 45) { + for (++this.d; this.d < this.j && (t = Di(this.i, this.d), c = CY(t), c != 0); ) + i |= c, ++this.d; + if (this.d >= this.j) + throw T(new Ee(Pe((je(), Ktn)))); + } + if (t == 58) { + if (++this.d, Qe(this), r = WCn(Xd(this), e, i), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + Qe(this); + } else if (t == 41) + ++this.d, Qe(this), r = WCn(Xd(this), e, i); + else + throw T(new Ee(Pe((je(), Nqn)))); + return r; + }, s.Tl = function() { + var e; + if (Qe(this), e = UE(21, Xd(this)), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), e; + }, s.Ul = function() { + var e; + if (Qe(this), e = UE(23, Xd(this)), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), e; + }, s.Vl = function() { + var e, t; + if (Qe(this), e = this.f++, t = SD(Xd(this), e), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), t; + }, s.Wl = function() { + var e; + if (Qe(this), e = SD(Xd(this), 0), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), e; + }, s.Xl = function(e) { + return Qe(this), this.c == 5 ? (Qe(this), LE(e, (Je(), Je(), new rb(9, e)))) : LE(e, (Je(), Je(), new rb(3, e))); + }, s.Yl = function(e) { + var t; + return Qe(this), t = (Je(), Je(), new v5(2)), this.c == 5 ? (Qe(this), Da(t, k9), Da(t, e)) : (Da(t, e), Da(t, k9)), t; + }, s.Zl = function(e) { + return Qe(this), this.c == 5 ? (Qe(this), Je(), Je(), new rb(9, e)) : (Je(), Je(), new rb(3, e)); + }, s.a = 0, s.b = 0, s.c = 0, s.d = 0, s.e = 0, s.f = 1, s.g = null, s.j = 0, w(S1, "RegEx/RegexParser", 820), b(1824, 820, {}, T9n), s.sl = function(e) { + return !1; + }, s.tl = function() { + return ZY(this); + }, s.ul = function(e) { + return p4(e); + }, s.vl = function(e) { + return N_n(this); + }, s.wl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.xl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.yl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.zl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Al = function() { + return Qe(this), p4(67); + }, s.Bl = function() { + return Qe(this), p4(73); + }, s.Cl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Dl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.El = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Fl = function() { + return Qe(this), p4(99); + }, s.Gl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Hl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Il = function() { + return Qe(this), p4(105); + }, s.Jl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Kl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Ll = function(e, t) { + return Sb(e, p4(t)), -1; + }, s.Ml = function() { + return Qe(this), Je(), Je(), new th(0, 94); + }, s.Nl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Ol = function() { + return Qe(this), Je(), Je(), new th(0, 36); + }, s.Pl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Ql = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Rl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Sl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Tl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Ul = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Vl = function() { + var e; + if (Qe(this), e = SD(Xd(this), 0), this.c != 7) + throw T(new Ee(Pe((je(), Ka)))); + return Qe(this), e; + }, s.Wl = function() { + throw T(new Ee(Pe((je(), Os)))); + }, s.Xl = function(e) { + return Qe(this), LE(e, (Je(), Je(), new rb(3, e))); + }, s.Yl = function(e) { + var t; + return Qe(this), t = (Je(), Je(), new v5(2)), Da(t, e), Da(t, k9), t; + }, s.Zl = function(e) { + return Qe(this), Je(), Je(), new rb(3, e); + }; + var Ug = null, Av = null; + w(S1, "RegEx/ParserForXMLSchema", 1824), b(117, 1, q4, ud), s.$l = function(e) { + throw T(new _r("Not supported.")); + }, s._l = function() { + return -1; + }, s.am = function(e) { + return null; + }, s.bm = function() { + return null; + }, s.cm = function(e) { + }, s.dm = function(e) { + }, s.em = function() { + return 0; + }, s.Ib = function() { + return this.fm(0); + }, s.fm = function(e) { + return this.e == 11 ? "." : ""; + }, s.e = 0; + var L1n, Sv, m9, See, N1n, dw = null, fI, jH = null, B1n, k9, EH = null, R1n, _1n, K1n, H1n, q1n, Pee, $p, Iee, Oee, Dee, $ee, Pv, Fee, xee, aMe = w(S1, "RegEx/Token", 117); + b(136, 117, { 3: 1, 136: 1, 117: 1 }, es), s.fm = function(e) { + var t, i, r; + if (this.e == 4) + if (this == B1n) + i = "."; + else if (this == fI) + i = "\\d"; + else if (this == Pv) + i = "\\w"; + else if (this == $p) + i = "\\s"; + else { + for (r = new r1(), r.a += "[", t = 0; t < this.b.length; t += 2) + e & Eo && t > 0 && (r.a += ","), this.b[t] === this.b[t + 1] ? br(r, U7(this.b[t])) : (br(r, U7(this.b[t])), r.a += "-", br(r, U7(this.b[t + 1]))); + r.a += "]", i = r.a; + } + else if (this == K1n) + i = "\\D"; + else if (this == q1n) + i = "\\W"; + else if (this == H1n) + i = "\\S"; + else { + for (r = new r1(), r.a += "[^", t = 0; t < this.b.length; t += 2) + e & Eo && t > 0 && (r.a += ","), this.b[t] === this.b[t + 1] ? br(r, U7(this.b[t])) : (br(r, U7(this.b[t])), r.a += "-", br(r, U7(this.b[t + 1]))); + r.a += "]", i = r.a; + } + return i; + }, s.a = !1, s.c = !1, w(S1, "RegEx/RangeToken", 136), b(584, 1, { 584: 1 }, Nq), s.a = 0, w(S1, "RegEx/RegexParser/ReferencePosition", 584), b(583, 1, { 3: 1, 583: 1 }, L8n), s.Fb = function(e) { + var t; + return e == null || !I(e, 583) ? !1 : (t = u(e, 583), An(this.b, t.b) && this.a == t.a); + }, s.Hb = function() { + return k1(this.b + "/" + WY(this.a)); + }, s.Ib = function() { + return this.c.fm(this.a); + }, s.a = 0, w(S1, "RegEx/RegularExpression", 583), b(223, 117, q4, th), s._l = function() { + return this.a; + }, s.fm = function(e) { + var t, i, r; + switch (this.e) { + case 0: + switch (this.a) { + case 124: + case 42: + case 43: + case 63: + case 40: + case 41: + case 46: + case 91: + case 123: + case 92: + r = "\\" + eD(this.a & Ut); + break; + case 12: + r = "\\f"; + break; + case 10: + r = "\\n"; + break; + case 13: + r = "\\r"; + break; + case 9: + r = "\\t"; + break; + case 27: + r = "\\e"; + break; + default: + this.a >= Ji ? (i = (t = this.a >>> 0, "0" + t.toString(16)), r = "\\v" + Zu(i, i.length - 6, i.length)) : r = "" + eD(this.a & Ut); + } + break; + case 8: + this == R1n || this == _1n ? r = "" + eD(this.a & Ut) : r = "\\" + eD(this.a & Ut); + break; + default: + r = null; + } + return r; + }, s.a = 0, w(S1, "RegEx/Token/CharToken", 223), b(309, 117, q4, rb), s.am = function(e) { + return this.a; + }, s.cm = function(e) { + this.b = e; + }, s.dm = function(e) { + this.c = e; + }, s.em = function() { + return 1; + }, s.fm = function(e) { + var t; + if (this.e == 3) + if (this.c < 0 && this.b < 0) + t = this.a.fm(e) + "*"; + else if (this.c == this.b) + t = this.a.fm(e) + "{" + this.c + "}"; + else if (this.c >= 0 && this.b >= 0) + t = this.a.fm(e) + "{" + this.c + "," + this.b + "}"; + else if (this.c >= 0 && this.b < 0) + t = this.a.fm(e) + "{" + this.c + ",}"; + else + throw T(new _r("Token#toString(): CLOSURE " + this.c + Qi + this.b)); + else if (this.c < 0 && this.b < 0) + t = this.a.fm(e) + "*?"; + else if (this.c == this.b) + t = this.a.fm(e) + "{" + this.c + "}?"; + else if (this.c >= 0 && this.b >= 0) + t = this.a.fm(e) + "{" + this.c + "," + this.b + "}?"; + else if (this.c >= 0 && this.b < 0) + t = this.a.fm(e) + "{" + this.c + ",}?"; + else + throw T(new _r("Token#toString(): NONGREEDYCLOSURE " + this.c + Qi + this.b)); + return t; + }, s.b = 0, s.c = 0, w(S1, "RegEx/Token/ClosureToken", 309), b(821, 117, q4, PW), s.am = function(e) { + return e == 0 ? this.a : this.b; + }, s.em = function() { + return 2; + }, s.fm = function(e) { + var t; + return this.b.e == 3 && this.b.am(0) == this.a ? t = this.a.fm(e) + "+" : this.b.e == 9 && this.b.am(0) == this.a ? t = this.a.fm(e) + "+?" : t = this.a.fm(e) + ("" + this.b.fm(e)), t; + }, w(S1, "RegEx/Token/ConcatToken", 821), b(1822, 117, q4, HPn), s.am = function(e) { + if (e == 0) + return this.d; + if (e == 1) + return this.b; + throw T(new _r("Internal Error: " + e)); + }, s.em = function() { + return this.b ? 2 : 1; + }, s.fm = function(e) { + var t; + return this.c > 0 ? t = "(?(" + this.c + ")" : this.a.e == 8 ? t = "(?(" + this.a + ")" : t = "(?" + this.a, this.b ? t += this.d + "|" + this.b + ")" : t += this.d + ")", t; + }, s.c = 0, w(S1, "RegEx/Token/ConditionToken", 1822), b(1823, 117, q4, HMn), s.am = function(e) { + return this.b; + }, s.em = function() { + return 1; + }, s.fm = function(e) { + return "(?" + (this.a == 0 ? "" : WY(this.a)) + (this.c == 0 ? "" : WY(this.c)) + ":" + this.b.fm(e) + ")"; + }, s.a = 0, s.c = 0, w(S1, "RegEx/Token/ModifierToken", 1823), b(822, 117, q4, xW), s.am = function(e) { + return this.a; + }, s.em = function() { + return 1; + }, s.fm = function(e) { + var t; + switch (t = null, this.e) { + case 6: + this.b == 0 ? t = "(?:" + this.a.fm(e) + ")" : t = "(" + this.a.fm(e) + ")"; + break; + case 20: + t = "(?=" + this.a.fm(e) + ")"; + break; + case 21: + t = "(?!" + this.a.fm(e) + ")"; + break; + case 22: + t = "(?<=" + this.a.fm(e) + ")"; + break; + case 23: + t = "(?" + this.a.fm(e) + ")"; + } + return t; + }, s.b = 0, w(S1, "RegEx/Token/ParenToken", 822), b(521, 117, { 3: 1, 117: 1, 521: 1 }, e$), s.bm = function() { + return this.b; + }, s.fm = function(e) { + return this.e == 12 ? "\\" + this.a : Mme(this.b); + }, s.a = 0, w(S1, "RegEx/Token/StringToken", 521), b(465, 117, q4, v5), s.$l = function(e) { + Da(this, e); + }, s.am = function(e) { + return u(Ad(this.a, e), 117); + }, s.em = function() { + return this.a ? this.a.a.c.length : 0; + }, s.fm = function(e) { + var t, i, r, c, o; + if (this.e == 1) { + if (this.a.a.c.length == 2) + t = u(Ad(this.a, 0), 117), i = u(Ad(this.a, 1), 117), i.e == 3 && i.am(0) == t ? c = t.fm(e) + "+" : i.e == 9 && i.am(0) == t ? c = t.fm(e) + "+?" : c = t.fm(e) + ("" + i.fm(e)); + else { + for (o = new r1(), r = 0; r < this.a.a.c.length; r++) + br(o, u(Ad(this.a, r), 117).fm(e)); + c = o.a; + } + return c; + } + if (this.a.a.c.length == 2 && u(Ad(this.a, 1), 117).e == 7) + c = u(Ad(this.a, 0), 117).fm(e) + "?"; + else if (this.a.a.c.length == 2 && u(Ad(this.a, 0), 117).e == 7) + c = u(Ad(this.a, 1), 117).fm(e) + "??"; + else { + for (o = new r1(), br(o, u(Ad(this.a, 0), 117).fm(e)), r = 1; r < this.a.a.c.length; r++) + o.a += "|", br(o, u(Ad(this.a, r), 117).fm(e)); + c = o.a; + } + return c; + }, w(S1, "RegEx/Token/UnionToken", 465), b(518, 1, { 592: 1 }, L9), s.Ib = function() { + return this.a.b; + }, w(tzn, "XMLTypeUtil/PatternMatcherImpl", 518), b(1622, 1381, {}, r4n); + var Lee; + w(tzn, "XMLTypeValidator", 1622), b(264, 1, lh, ha), s.Jc = function(e) { + $i(this, e); + }, s.Kc = function() { + return (this.b - this.a) * this.c < 0 ? Jl : new rl(this); + }, s.a = 0, s.b = 0, s.c = 0; + var Jl; + w(oin, "ExclusiveRange", 264), b(1068, 1, hh, c4n), s.Rb = function(e) { + u(e, 19), tce(); + }, s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return Wie(); + }, s.Ub = function() { + return Xie(); + }, s.Wb = function(e) { + u(e, 19), rce(); + }, s.Ob = function() { + return !1; + }, s.Sb = function() { + return !1; + }, s.Tb = function() { + return -1; + }, s.Vb = function() { + return -1; + }, s.Qb = function() { + throw T(new i1(czn)); + }, w(oin, "ExclusiveRange/1", 1068), b(254, 1, hh, rl), s.Rb = function(e) { + u(e, 19), ice(); + }, s.Nb = function(e) { + Oi(this, e); + }, s.Pb = function() { + return tge(this); + }, s.Ub = function() { + return Yde(this); + }, s.Wb = function(e) { + u(e, 19), cce(); + }, s.Ob = function() { + return this.c.c < 0 ? this.a >= this.c.b : this.a <= this.c.b; + }, s.Sb = function() { + return this.b > 0; + }, s.Tb = function() { + return this.b; + }, s.Vb = function() { + return this.b - 1; + }, s.Qb = function() { + throw T(new i1(czn)); + }, s.a = 0, s.b = 0, w(oin, "ExclusiveRange/RangeIterator", 254); + var Ls = w3(EA, "C"), be = w3(om, "I"), _u = w3(X2, "Z"), Yl = w3(fm, "J"), ku = w3(cm, "B"), Ci = w3(um, "D"), bw = w3(sm, "F"), Wg = w3(hm, "S"), dMe = Ct("org.eclipse.elk.core.labels", "ILabelManager"), G1n = Ct(zi, "DiagnosticChain"), z1n = Ct($Gn, "ResourceSet"), U1n = w(zi, "InvocationTargetException", null), Nee = (gj(), rde), Bee = Bee = W4e; + Z0e(Ute), Tbe("permProps", [[[LA, NA], [BA, "gecko1_8"]], [[LA, NA], [BA, "ie10"]], [[LA, NA], [BA, "ie8"]], [[LA, NA], [BA, "ie9"]], [[LA, NA], [BA, "safari"]]]), Bee(null, "elk", null); + }).call(this); + }).call(this, typeof Hee < "u" ? Hee : typeof self < "u" ? self : typeof window < "u" ? window : {}); + }, {}], 3: [function(ft, gt, Jt) { + function lt(qt, Ue) { + if (!(qt instanceof Ue)) + throw new TypeError("Cannot call a class as a function"); + } + function j(qt, Ue) { + if (!qt) + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return Ue && (typeof Ue == "object" || typeof Ue == "function") ? Ue : qt; + } + function Dt(qt, Ue) { + if (typeof Ue != "function" && Ue !== null) + throw new TypeError("Super expression must either be null or a function, not " + typeof Ue); + qt.prototype = Object.create(Ue && Ue.prototype, { constructor: { value: qt, enumerable: !1, writable: !0, configurable: !0 } }), Ue && (Object.setPrototypeOf ? Object.setPrototypeOf(qt, Ue) : qt.__proto__ = Ue); + } + var zc = ft("./elk-api.js").default, $t = function(qt) { + Dt(Ue, qt); + function Ue() { + var ki = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + lt(this, Ue); + var ur = Object.assign({}, ki), Mn = !1; + try { + ft.resolve("web-worker"), Mn = !0; + } catch { + } + if (ki.workerUrl) + if (Mn) { + var fc = ft("web-worker"); + ur.workerFactory = function(nr) { + return new fc(nr); + }; + } else + console.warn(`Web worker requested but 'web-worker' package not installed. +Consider installing the package or pass your own 'workerFactory' to ELK's constructor. +... Falling back to non-web worker version.`); + if (!ur.workerFactory) { + var yu = ft("./elk-worker.min.js"), Ku = yu.Worker; + ur.workerFactory = function(nr) { + return new Ku(nr); + }; + } + return j(this, (Ue.__proto__ || Object.getPrototypeOf(Ue)).call(this, ur)); + } + return Ue; + }(zc); + Object.defineProperty(gt.exports, "__esModule", { + value: !0 + }), gt.exports = $t, $t.default = $t; + }, { "./elk-api.js": 1, "./elk-worker.min.js": 2, "web-worker": 4 }], 4: [function(ft, gt, Jt) { + gt.exports = Worker; + }, {}] }, {}, [3])(3); + }); +})(Uee); +var MMe = Uee.exports; +const AMe = /* @__PURE__ */ gMe(MMe), qee = new AMe(); +let L0 = {}; +const SMe = {}; +let Lp = {}; +const PMe = async function(Ae, At, ft, gt, Jt, lt, j) { + const zc = ft.select(`[id="${At}"]`).insert("g").attr("class", "nodes"), $t = Object.keys(Ae); + return await Promise.all( + $t.map(async function(qt) { + const Ue = Ae[qt]; + let ki = "default"; + Ue.classes.length > 0 && (ki = Ue.classes.join(" ")), ki = ki + " flowchart-label"; + const ur = V1n(Ue.styles); + let Mn = Ue.text !== void 0 ? Ue.text : Ue.id; + const fc = { width: 0, height: 0 }, yu = [ + { + id: Ue.id + "-west", + layoutOptions: { + "port.side": "WEST" + } + }, + { + id: Ue.id + "-east", + layoutOptions: { + "port.side": "EAST" + } + }, + { + id: Ue.id + "-south", + layoutOptions: { + "port.side": "SOUTH" + } + }, + { + id: Ue.id + "-north", + layoutOptions: { + "port.side": "NORTH" + } + } + ]; + let Ku = 0, nr = "", Ch = {}; + switch (Ue.type) { + case "round": + Ku = 5, nr = "rect"; + break; + case "square": + nr = "rect"; + break; + case "diamond": + nr = "question", Ch = { + portConstraints: "FIXED_SIDE" + }; + break; + case "hexagon": + nr = "hexagon"; + break; + case "odd": + nr = "rect_left_inv_arrow"; + break; + case "lean_right": + nr = "lean_right"; + break; + case "lean_left": + nr = "lean_left"; + break; + case "trapezoid": + nr = "trapezoid"; + break; + case "inv_trapezoid": + nr = "inv_trapezoid"; + break; + case "odd_right": + nr = "rect_left_inv_arrow"; + break; + case "circle": + nr = "circle"; + break; + case "ellipse": + nr = "ellipse"; + break; + case "stadium": + nr = "stadium"; + break; + case "subroutine": + nr = "subroutine"; + break; + case "cylinder": + nr = "cylinder"; + break; + case "group": + nr = "rect"; + break; + case "doublecircle": + nr = "doublecircle"; + break; + default: + nr = "rect"; + } + const q1 = { + labelStyle: ur.labelStyle, + shape: nr, + labelText: Mn, + labelType: Ue.labelType, + rx: Ku, + ry: Ku, + class: ki, + style: ur.style, + id: Ue.id, + link: Ue.link, + linkTarget: Ue.linkTarget, + tooltip: Jt.db.getTooltip(Ue.id) || "", + domId: Jt.db.lookUpDomId(Ue.id), + haveCallback: Ue.haveCallback, + width: Ue.type === "group" ? 500 : void 0, + dir: Ue.dir, + type: Ue.type, + props: Ue.props, + padding: OH().flowchart.padding + }; + let t1, Zl; + if (q1.type !== "group") + Zl = await kMe(zc, q1, Ue.dir), t1 = Zl.node().getBBox(); + else { + gt.createElementNS("http://www.w3.org/2000/svg", "text"); + const { shapeSvg: G1, bbox: Th } = await yMe(zc, q1, void 0, !0); + fc.width = Th.width, fc.wrappingWidth = OH().flowchart.wrappingWidth, fc.height = Th.height, fc.labelNode = G1.node(), q1.labelData = fc; + } + const Dv = { + id: Ue.id, + ports: Ue.type === "diamond" ? yu : [], + // labelStyle: styles.labelStyle, + // shape: _shape, + layoutOptions: Ch, + labelText: Mn, + labelData: fc, + // labels: [{ text: vertexText }], + // rx: radius, + // ry: radius, + // class: classStr, + // style: styles.style, + // link: vertex.link, + // linkTarget: vertex.linkTarget, + // tooltip: diagObj.db.getTooltip(vertex.id) || '', + domId: Jt.db.lookUpDomId(Ue.id), + // haveCallback: vertex.haveCallback, + width: t1 == null ? void 0 : t1.width, + height: t1 == null ? void 0 : t1.height, + // dir: vertex.dir, + type: Ue.type, + // props: vertex.props, + // padding: getConfig().flowchart.padding, + // boundingBox, + el: Zl, + parent: lt.parentById[Ue.id] + }; + Lp[q1.id] = Dv; + }) + ), j; +}, Gee = (Ae, At, ft) => { + const gt = { + TB: { + in: { + north: "north" + }, + out: { + south: "west", + west: "east", + east: "south" + } + }, + LR: { + in: { + west: "west" + }, + out: { + east: "south", + south: "north", + north: "east" + } + }, + RL: { + in: { + east: "east" + }, + out: { + west: "north", + north: "south", + south: "west" + } + }, + BT: { + in: { + south: "south" + }, + out: { + north: "east", + east: "west", + west: "north" + } + } + }; + return gt.TD = gt.TB, H1.info("abc88", ft, At, Ae), gt[ft][At][Ae]; +}, zee = (Ae, At, ft) => { + if (H1.info("getNextPort abc88", { node: Ae, edgeDirection: At, graphDirection: ft }), !L0[Ae]) + switch (ft) { + case "TB": + case "TD": + L0[Ae] = { + inPosition: "north", + outPosition: "south" + }; + break; + case "BT": + L0[Ae] = { + inPosition: "south", + outPosition: "north" + }; + break; + case "RL": + L0[Ae] = { + inPosition: "east", + outPosition: "west" + }; + break; + case "LR": + L0[Ae] = { + inPosition: "west", + outPosition: "east" + }; + break; + } + const gt = At === "in" ? L0[Ae].inPosition : L0[Ae].outPosition; + return At === "in" ? L0[Ae].inPosition = Gee( + L0[Ae].inPosition, + At, + ft + ) : L0[Ae].outPosition = Gee( + L0[Ae].outPosition, + At, + ft + ), gt; +}, IMe = (Ae, At) => { + let ft = Ae.start, gt = Ae.end; + const Jt = ft, lt = gt, j = Lp[ft], Dt = Lp[gt]; + return !j || !Dt ? { source: ft, target: gt } : (j.type === "diamond" && (ft = `${ft}-${zee(ft, "out", At)}`), Dt.type === "diamond" && (gt = `${gt}-${zee(gt, "in", At)}`), { source: ft, target: gt, sourceId: Jt, targetId: lt }); +}, OMe = function(Ae, At, ft, gt) { + H1.info("abc78 edges = ", Ae); + const Jt = gt.insert("g").attr("class", "edgeLabels"); + let lt = {}, j = At.db.getDirection(), Dt, zc; + if (Ae.defaultStyle !== void 0) { + const $t = V1n(Ae.defaultStyle); + Dt = $t.style, zc = $t.labelStyle; + } + return Ae.forEach(function($t) { + const qt = "L-" + $t.start + "-" + $t.end; + lt[qt] === void 0 ? (lt[qt] = 0, H1.info("abc78 new entry", qt, lt[qt])) : (lt[qt]++, H1.info("abc78 new entry", qt, lt[qt])); + let Ue = qt + "-" + lt[qt]; + H1.info("abc78 new link id to be used is", qt, Ue, lt[qt]); + const ki = "LS-" + $t.start, ur = "LE-" + $t.end, Mn = { style: "", labelStyle: "" }; + switch (Mn.minlen = $t.length || 1, $t.type === "arrow_open" ? Mn.arrowhead = "none" : Mn.arrowhead = "normal", Mn.arrowTypeStart = "arrow_open", Mn.arrowTypeEnd = "arrow_open", $t.type) { + case "double_arrow_cross": + Mn.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + Mn.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + Mn.arrowTypeStart = "arrow_point"; + case "arrow_point": + Mn.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + Mn.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + Mn.arrowTypeEnd = "arrow_circle"; + break; + } + let fc = "", yu = ""; + switch ($t.stroke) { + case "normal": + fc = "fill:none;", Dt !== void 0 && (fc = Dt), zc !== void 0 && (yu = zc), Mn.thickness = "normal", Mn.pattern = "solid"; + break; + case "dotted": + Mn.thickness = "normal", Mn.pattern = "dotted", Mn.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + Mn.thickness = "thick", Mn.pattern = "solid", Mn.style = "stroke-width: 3.5px;fill:none;"; + break; + } + if ($t.style !== void 0) { + const Zl = V1n($t.style); + fc = Zl.style, yu = Zl.labelStyle; + } + Mn.style = Mn.style += fc, Mn.labelStyle = Mn.labelStyle += yu, $t.interpolate !== void 0 ? Mn.curve = X1n($t.interpolate, IH) : Ae.defaultInterpolate !== void 0 ? Mn.curve = X1n(Ae.defaultInterpolate, IH) : Mn.curve = X1n(SMe.curve, IH), $t.text === void 0 ? $t.style !== void 0 && (Mn.arrowheadStyle = "fill: #333") : (Mn.arrowheadStyle = "fill: #333", Mn.labelpos = "c"), Mn.labelType = $t.labelType, Mn.label = $t.text.replace(vMe.lineBreakRegex, ` +`), $t.style === void 0 && (Mn.style = Mn.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), Mn.labelStyle = Mn.labelStyle.replace("color:", "fill:"), Mn.id = Ue, Mn.classes = "flowchart-link " + ki + " " + ur; + const Ku = jMe(Jt, Mn), { source: nr, target: Ch, sourceId: q1, targetId: t1 } = IMe($t, j); + H1.debug("abc78 source and target", nr, Ch), ft.edges.push({ + id: "e" + $t.start + $t.end, + sources: [nr], + targets: [Ch], + sourceId: q1, + targetId: t1, + labelEl: Ku, + labels: [ + { + width: Mn.width, + height: Mn.height, + orgWidth: Mn.width, + orgHeight: Mn.height, + text: Mn.label, + layoutOptions: { + "edgeLabels.inline": "true", + "edgeLabels.placement": "CENTER" + } + } + ], + edgeData: Mn + }); + }), ft; +}, DMe = function(Ae, At, ft, gt, Jt) { + let lt = ""; + switch (gt && (lt = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, lt = lt.replace(/\(/g, "\\("), lt = lt.replace(/\)/g, "\\)")), At.arrowTypeStart) { + case "arrow_cross": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-crossStart)" + ); + break; + case "arrow_point": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-pointStart)" + ); + break; + case "arrow_barb": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-barbStart)" + ); + break; + case "arrow_circle": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-circleStart)" + ); + break; + case "aggregation": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-aggregationStart)" + ); + break; + case "extension": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-extensionStart)" + ); + break; + case "composition": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-compositionStart)" + ); + break; + case "dependency": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-dependencyStart)" + ); + break; + case "lollipop": + Ae.attr( + "marker-start", + "url(" + lt + "#" + Jt + "_" + ft + "-lollipopStart)" + ); + break; + } + switch (At.arrowTypeEnd) { + case "arrow_cross": + Ae.attr("marker-end", "url(" + lt + "#" + Jt + "_" + ft + "-crossEnd)"); + break; + case "arrow_point": + Ae.attr("marker-end", "url(" + lt + "#" + Jt + "_" + ft + "-pointEnd)"); + break; + case "arrow_barb": + Ae.attr("marker-end", "url(" + lt + "#" + Jt + "_" + ft + "-barbEnd)"); + break; + case "arrow_circle": + Ae.attr("marker-end", "url(" + lt + "#" + Jt + "_" + ft + "-circleEnd)"); + break; + case "aggregation": + Ae.attr( + "marker-end", + "url(" + lt + "#" + Jt + "_" + ft + "-aggregationEnd)" + ); + break; + case "extension": + Ae.attr( + "marker-end", + "url(" + lt + "#" + Jt + "_" + ft + "-extensionEnd)" + ); + break; + case "composition": + Ae.attr( + "marker-end", + "url(" + lt + "#" + Jt + "_" + ft + "-compositionEnd)" + ); + break; + case "dependency": + Ae.attr( + "marker-end", + "url(" + lt + "#" + Jt + "_" + ft + "-dependencyEnd)" + ); + break; + case "lollipop": + Ae.attr( + "marker-end", + "url(" + lt + "#" + Jt + "_" + ft + "-lollipopEnd)" + ); + break; + } +}, $Me = function(Ae, At) { + return H1.info("Extracting classes"), At.db.getClasses(); +}, FMe = function(Ae) { + const At = { parentById: {}, childrenById: {} }, ft = Ae.getSubGraphs(); + return H1.info("Subgraphs - ", ft), ft.forEach(function(gt) { + gt.nodes.forEach(function(Jt) { + At.parentById[Jt] = gt.id, At.childrenById[gt.id] === void 0 && (At.childrenById[gt.id] = []), At.childrenById[gt.id].push(Jt); + }); + }), ft.forEach(function(gt) { + gt.id, At.parentById[gt.id] !== void 0 && At.parentById[gt.id]; + }), At; +}, xMe = function(Ae, At, ft) { + const gt = TMe(Ae, At, ft); + if (gt === void 0 || gt === "root") + return { x: 0, y: 0 }; + const Jt = Lp[gt].offset; + return { x: Jt.posX, y: Jt.posY }; +}, LMe = function(Ae, At, ft, gt, Jt, lt) { + const j = xMe(At.sourceId, At.targetId, Jt), Dt = At.sections[0].startPoint, zc = At.sections[0].endPoint, qt = (At.sections[0].bendPoints ? At.sections[0].bendPoints : []).map((Ch) => [Ch.x + j.x, Ch.y + j.y]), Ue = [ + [Dt.x + j.x, Dt.y + j.y], + ...qt, + [zc.x + j.x, zc.y + j.y] + ], { x: ki, y: ur } = EMe(At.edgeData), Mn = CMe().x(ki).y(ur).curve(IH), fc = Ae.insert("path").attr("d", Mn(Ue)).attr("class", "path " + ft.classes).attr("fill", "none"), yu = Ae.insert("g").attr("class", "edgeLabel"), Ku = lI(yu.node().appendChild(At.labelEl)), nr = Ku.node().firstChild.getBoundingClientRect(); + Ku.attr("width", nr.width), Ku.attr("height", nr.height), yu.attr( + "transform", + `translate(${At.labels[0].x + j.x}, ${At.labels[0].y + j.y})` + ), DMe(fc, ft, gt.type, gt.arrowMarkerAbsolute, lt); +}, Wee = (Ae, At) => { + Ae.forEach((ft) => { + ft.children || (ft.children = []); + const gt = At.childrenById[ft.id]; + gt && gt.forEach((Jt) => { + ft.children.push(Lp[Jt]); + }), Wee(ft.children, At); + }); +}, NMe = async function(Ae, At, ft, gt) { + var Dv; + Lp = {}, L0 = {}; + const Jt = lI("body").append("div").attr("style", "height:400px").attr("id", "cy"); + let lt = { + id: "root", + layoutOptions: { + "elk.hierarchyHandling": "INCLUDE_CHILDREN", + "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", + "elk.layered.spacing.edgeNodeBetweenLayers": "30", + // 'elk.layered.mergeEdges': 'true', + "elk.direction": "DOWN" + // 'elk.ports.sameLayerEdges': true, + // 'nodePlacement.strategy': 'SIMPLE', + }, + children: [], + edges: [] + }; + switch (H1.info("Drawing flowchart using v3 renderer", qee), gt.db.getDirection()) { + case "BT": + lt.layoutOptions["elk.direction"] = "UP"; + break; + case "TB": + lt.layoutOptions["elk.direction"] = "DOWN"; + break; + case "LR": + lt.layoutOptions["elk.direction"] = "RIGHT"; + break; + case "RL": + lt.layoutOptions["elk.direction"] = "LEFT"; + break; + } + const { securityLevel: Dt, flowchart: zc } = OH(); + let $t; + Dt === "sandbox" && ($t = lI("#i" + At)); + const qt = Dt === "sandbox" ? lI($t.nodes()[0].contentDocument.body) : lI("body"), Ue = Dt === "sandbox" ? $t.nodes()[0].contentDocument : document, ki = qt.select(`[id="${At}"]`); + mMe(ki, ["point", "circle", "cross"], gt.type, At); + const Mn = gt.db.getVertices(); + let fc; + const yu = gt.db.getSubGraphs(); + H1.info("Subgraphs - ", yu); + for (let G1 = yu.length - 1; G1 >= 0; G1--) + fc = yu[G1], gt.db.addVertex( + fc.id, + { text: fc.title, type: fc.labelType }, + "group", + void 0, + fc.classes, + fc.dir + ); + const Ku = ki.insert("g").attr("class", "subgraphs"), nr = FMe(gt.db); + lt = await PMe(Mn, At, qt, Ue, gt, nr, lt); + const Ch = ki.insert("g").attr("class", "edges edgePath"), q1 = gt.db.getEdges(); + lt = OMe(q1, gt, lt, ki), Object.keys(Lp).forEach((G1) => { + const Th = Lp[G1]; + Th.parent || lt.children.push(Th), nr.childrenById[G1] !== void 0 && (Th.labels = [ + { + text: Th.labelText, + layoutOptions: { + "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" + }, + width: Th.labelData.width, + height: Th.labelData.height + // width: 100, + // height: 100, + } + ], delete Th.x, delete Th.y, delete Th.width, delete Th.height); + }), Wee(lt.children, nr), H1.info("after layout", JSON.stringify(lt, null, 2)); + const Zl = await qee.layout(lt); + Xee(0, 0, Zl.children, ki, Ku, gt, 0), H1.info("after layout", Zl), (Dv = Zl.edges) == null || Dv.map((G1) => { + LMe(Ch, G1, G1.edgeData, gt, nr, At); + }), pMe({}, ki, zc.diagramPadding, zc.useMaxWidth), Jt.remove(); +}, Xee = (Ae, At, ft, gt, Jt, lt, j) => { + ft.forEach(function(Dt) { + if (Dt) + if (Lp[Dt.id].offset = { + posX: Dt.x + Ae, + posY: Dt.y + At, + x: Ae, + y: At, + depth: j, + width: Dt.width, + height: Dt.height + }, Dt.type === "group") { + const zc = Jt.insert("g").attr("class", "subgraph"); + zc.insert("rect").attr("class", "subgraph subgraph-lvl-" + j % 5 + " node").attr("x", Dt.x + Ae).attr("y", Dt.y + At).attr("width", Dt.width).attr("height", Dt.height); + const $t = zc.insert("g").attr("class", "label"), qt = OH().flowchart.htmlLabels ? Dt.labelData.width / 2 : 0; + $t.attr( + "transform", + `translate(${Dt.labels[0].x + Ae + Dt.x + qt}, ${Dt.labels[0].y + At + Dt.y + 3})` + ), $t.node().appendChild(Dt.labelData.labelNode), H1.info("Id (UGH)= ", Dt.type, Dt.labels); + } else + H1.info("Id (UGH)= ", Dt.id), Dt.el.attr( + "transform", + `translate(${Dt.x + Ae + Dt.width / 2}, ${Dt.y + At + Dt.height / 2})` + ); + }), ft.forEach(function(Dt) { + Dt && Dt.type === "group" && Xee(Ae + Dt.x, At + Dt.y, Dt.children, gt, Jt, lt, j + 1); + }); +}, BMe = { + getClasses: $Me, + draw: NMe +}, RMe = (Ae) => { + let At = ""; + for (let ft = 0; ft < 5; ft++) + At += ` + .subgraph-lvl-${ft} { + fill: ${Ae[`surface${ft}`]}; + stroke: ${Ae[`surfacePeer${ft}`]}; + } + `; + return At; +}, _Me = (Ae) => `.label { + font-family: ${Ae.fontFamily}; + color: ${Ae.nodeTextColor || Ae.textColor}; + } + .cluster-label text { + fill: ${Ae.titleColor}; + } + .cluster-label span { + color: ${Ae.titleColor}; + } + + .label text,span { + fill: ${Ae.nodeTextColor || Ae.textColor}; + color: ${Ae.nodeTextColor || Ae.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${Ae.mainBkg}; + stroke: ${Ae.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${Ae.arrowheadColor}; + } + + .edgePath .path { + stroke: ${Ae.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${Ae.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${Ae.edgeLabelBackground}; + rect { + opacity: 0.85; + background-color: ${Ae.edgeLabelBackground}; + fill: ${Ae.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${Ae.clusterBkg}; + stroke: ${Ae.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${Ae.titleColor}; + } + + .cluster span { + color: ${Ae.titleColor}; + } + /* .cluster div { + color: ${Ae.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${Ae.fontFamily}; + font-size: 12px; + background: ${Ae.tertiaryColor}; + border: 1px solid ${Ae.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${Ae.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + + .flowchart-label text { + text-anchor: middle; + } + + ${RMe(Ae)} +`, KMe = _Me, VMe = { + db: bMe, + renderer: BMe, + parser: wMe, + styles: KMe +}; +export { + VMe as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-b487ab79.js b/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-b487ab79.js new file mode 100644 index 0000000..f18a2b8 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-b487ab79.js @@ -0,0 +1,911 @@ +import { d as db, p as parser } from "./flowDb-fa1288b0.js"; +import { select, curveLinear, line } from "d3"; +import { a as insertMarkers, e as insertNode, l as labelHelper, f as insertEdgeLabel, j as getLineFunctionsWithOffset } from "./edges-f15a7e05.js"; +import { l as log, c as getConfig, o as setupGraphViewbox, k as getStylesFromArray, n as interpolateToCurve, e as common } from "./mermaid-0d192ec3.js"; +import ELK from "elkjs/lib/elk.bundled.js"; +import "./createText-80c3befb.js"; +import "mdast-util-from-markdown"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +const findCommonAncestor = (id1, id2, treeData) => { + const { parentById } = treeData; + const visited = /* @__PURE__ */ new Set(); + let currentId = id1; + while (currentId) { + visited.add(currentId); + if (currentId === id2) { + return currentId; + } + currentId = parentById[currentId]; + } + currentId = id2; + while (currentId) { + if (visited.has(currentId)) { + return currentId; + } + currentId = parentById[currentId]; + } + return "root"; +}; +const elk = new ELK(); +let portPos = {}; +const conf = {}; +let nodeDb = {}; +const addVertices = async function(vert, svgId, root, doc, diagObj, parentLookupDb, graph) { + const svg = root.select(`[id="${svgId}"]`); + const nodes = svg.insert("g").attr("class", "nodes"); + const keys = Object.keys(vert); + await Promise.all( + keys.map(async function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles2 = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + const labelData = { width: 0, height: 0 }; + const ports = [ + { + id: vertex.id + "-west", + layoutOptions: { + "port.side": "WEST" + } + }, + { + id: vertex.id + "-east", + layoutOptions: { + "port.side": "EAST" + } + }, + { + id: vertex.id + "-south", + layoutOptions: { + "port.side": "SOUTH" + } + }, + { + id: vertex.id + "-north", + layoutOptions: { + "port.side": "NORTH" + } + } + ]; + let radious = 0; + let _shape = ""; + let layoutOptions = {}; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + layoutOptions = { + portConstraints: "FIXED_SIDE" + }; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const node = { + labelStyle: styles2.labelStyle, + shape: _shape, + labelText: vertexText, + labelType: vertex.labelType, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: getConfig().flowchart.padding + }; + let boundingBox; + let nodeEl; + if (node.type !== "group") { + nodeEl = await insertNode(nodes, node, vertex.dir); + boundingBox = nodeEl.node().getBBox(); + } else { + doc.createElementNS("http://www.w3.org/2000/svg", "text"); + const { shapeSvg, bbox } = await labelHelper(nodes, node, void 0, true); + labelData.width = bbox.width; + labelData.wrappingWidth = getConfig().flowchart.wrappingWidth; + labelData.height = bbox.height; + labelData.labelNode = shapeSvg.node(); + node.labelData = labelData; + } + const data = { + id: vertex.id, + ports: vertex.type === "diamond" ? ports : [], + // labelStyle: styles.labelStyle, + // shape: _shape, + layoutOptions, + labelText: vertexText, + labelData, + // labels: [{ text: vertexText }], + // rx: radius, + // ry: radius, + // class: classStr, + // style: styles.style, + // link: vertex.link, + // linkTarget: vertex.linkTarget, + // tooltip: diagObj.db.getTooltip(vertex.id) || '', + domId: diagObj.db.lookUpDomId(vertex.id), + // haveCallback: vertex.haveCallback, + width: boundingBox == null ? void 0 : boundingBox.width, + height: boundingBox == null ? void 0 : boundingBox.height, + // dir: vertex.dir, + type: vertex.type, + // props: vertex.props, + // padding: getConfig().flowchart.padding, + // boundingBox, + el: nodeEl, + parent: parentLookupDb.parentById[vertex.id] + }; + nodeDb[node.id] = data; + }) + ); + return graph; +}; +const getNextPosition = (position, edgeDirection, graphDirection) => { + const portPos2 = { + TB: { + in: { + north: "north" + }, + out: { + south: "west", + west: "east", + east: "south" + } + }, + LR: { + in: { + west: "west" + }, + out: { + east: "south", + south: "north", + north: "east" + } + }, + RL: { + in: { + east: "east" + }, + out: { + west: "north", + north: "south", + south: "west" + } + }, + BT: { + in: { + south: "south" + }, + out: { + north: "east", + east: "west", + west: "north" + } + } + }; + portPos2.TD = portPos2.TB; + log.info("abc88", graphDirection, edgeDirection, position); + return portPos2[graphDirection][edgeDirection][position]; +}; +const getNextPort = (node, edgeDirection, graphDirection) => { + log.info("getNextPort abc88", { node, edgeDirection, graphDirection }); + if (!portPos[node]) { + switch (graphDirection) { + case "TB": + case "TD": + portPos[node] = { + inPosition: "north", + outPosition: "south" + }; + break; + case "BT": + portPos[node] = { + inPosition: "south", + outPosition: "north" + }; + break; + case "RL": + portPos[node] = { + inPosition: "east", + outPosition: "west" + }; + break; + case "LR": + portPos[node] = { + inPosition: "west", + outPosition: "east" + }; + break; + } + } + const result = edgeDirection === "in" ? portPos[node].inPosition : portPos[node].outPosition; + if (edgeDirection === "in") { + portPos[node].inPosition = getNextPosition( + portPos[node].inPosition, + edgeDirection, + graphDirection + ); + } else { + portPos[node].outPosition = getNextPosition( + portPos[node].outPosition, + edgeDirection, + graphDirection + ); + } + return result; +}; +const getEdgeStartEndPoint = (edge, dir) => { + let source = edge.start; + let target = edge.end; + const sourceId = source; + const targetId = target; + const startNode = nodeDb[source]; + const endNode = nodeDb[target]; + if (!startNode || !endNode) { + return { source, target }; + } + if (startNode.type === "diamond") { + source = `${source}-${getNextPort(source, "out", dir)}`; + } + if (endNode.type === "diamond") { + target = `${target}-${getNextPort(target, "in", dir)}`; + } + return { source, target, sourceId, targetId }; +}; +const addEdges = function(edges, diagObj, graph, svg) { + log.info("abc78 edges = ", edges); + const labelsEl = svg.insert("g").attr("class", "edgeLabels"); + let linkIdCnt = {}; + let dir = diagObj.db.getDirection(); + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + log.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + const labelEl = insertEdgeLabel(labelsEl, edgeData); + const { source, target, sourceId, targetId } = getEdgeStartEndPoint(edge, dir); + log.debug("abc78 source and target", source, target); + graph.edges.push({ + id: "e" + edge.start + edge.end, + sources: [source], + targets: [target], + sourceId, + targetId, + labelEl, + labels: [ + { + width: edgeData.width, + height: edgeData.height, + orgWidth: edgeData.width, + orgHeight: edgeData.height, + text: edgeData.label, + layoutOptions: { + "edgeLabels.inline": "true", + "edgeLabels.placement": "CENTER" + } + } + ], + edgeData + }); + }); + return graph; +}; +const addMarkersToEdge = function(svgPath, edgeData, diagramType, arrowMarkerAbsolute, id) { + let url = ""; + if (arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (edgeData.arrowTypeStart) { + case "arrow_cross": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-crossStart)" + ); + break; + case "arrow_point": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-pointStart)" + ); + break; + case "arrow_barb": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-barbStart)" + ); + break; + case "arrow_circle": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-circleStart)" + ); + break; + case "aggregation": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationStart)" + ); + break; + case "extension": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-extensionStart)" + ); + break; + case "composition": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-compositionStart)" + ); + break; + case "dependency": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyStart)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopStart)" + ); + break; + } + switch (edgeData.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationEnd)" + ); + break; + case "extension": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-extensionEnd)" + ); + break; + case "composition": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-compositionEnd)" + ); + break; + case "dependency": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyEnd)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopEnd)" + ); + break; + } +}; +const getClasses = function(text, diagObj) { + log.info("Extracting classes"); + return diagObj.db.getClasses(); +}; +const addSubGraphs = function(db2) { + const parentLookupDb = { parentById: {}, childrenById: {} }; + const subgraphs = db2.getSubGraphs(); + log.info("Subgraphs - ", subgraphs); + subgraphs.forEach(function(subgraph) { + subgraph.nodes.forEach(function(node) { + parentLookupDb.parentById[node] = subgraph.id; + if (parentLookupDb.childrenById[subgraph.id] === void 0) { + parentLookupDb.childrenById[subgraph.id] = []; + } + parentLookupDb.childrenById[subgraph.id].push(node); + }); + }); + subgraphs.forEach(function(subgraph) { + ({ id: subgraph.id }); + if (parentLookupDb.parentById[subgraph.id] !== void 0) { + parentLookupDb.parentById[subgraph.id]; + } + }); + return parentLookupDb; +}; +const calcOffset = function(src, dest, parentLookupDb) { + const ancestor = findCommonAncestor(src, dest, parentLookupDb); + if (ancestor === void 0 || ancestor === "root") { + return { x: 0, y: 0 }; + } + const ancestorOffset = nodeDb[ancestor].offset; + return { x: ancestorOffset.posX, y: ancestorOffset.posY }; +}; +const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb, id) { + const offset = calcOffset(edge.sourceId, edge.targetId, parentLookupDb); + const src = edge.sections[0].startPoint; + const dest = edge.sections[0].endPoint; + const segments = edge.sections[0].bendPoints ? edge.sections[0].bendPoints : []; + const segPoints = segments.map((segment) => [segment.x + offset.x, segment.y + offset.y]); + const points = [ + [src.x + offset.x, src.y + offset.y], + ...segPoints, + [dest.x + offset.x, dest.y + offset.y] + ]; + const { x, y } = getLineFunctionsWithOffset(edge.edgeData); + const curve = line().x(x).y(y).curve(curveLinear); + const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path " + edgeData.classes).attr("fill", "none"); + const edgeG = edgesEl.insert("g").attr("class", "edgeLabel"); + const edgeWithLabel = select(edgeG.node().appendChild(edge.labelEl)); + const box = edgeWithLabel.node().firstChild.getBoundingClientRect(); + edgeWithLabel.attr("width", box.width); + edgeWithLabel.attr("height", box.height); + edgeG.attr( + "transform", + `translate(${edge.labels[0].x + offset.x}, ${edge.labels[0].y + offset.y})` + ); + addMarkersToEdge(edgePath, edgeData, diagObj.type, diagObj.arrowMarkerAbsolute, id); +}; +const insertChildren = (nodeArray, parentLookupDb) => { + nodeArray.forEach((node) => { + if (!node.children) { + node.children = []; + } + const childIds = parentLookupDb.childrenById[node.id]; + if (childIds) { + childIds.forEach((childId) => { + node.children.push(nodeDb[childId]); + }); + } + insertChildren(node.children, parentLookupDb); + }); +}; +const draw = async function(text, id, _version, diagObj) { + var _a; + nodeDb = {}; + portPos = {}; + const renderEl = select("body").append("div").attr("style", "height:400px").attr("id", "cy"); + let graph = { + id: "root", + layoutOptions: { + "elk.hierarchyHandling": "INCLUDE_CHILDREN", + "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", + "elk.layered.spacing.edgeNodeBetweenLayers": "30", + // 'elk.layered.mergeEdges': 'true', + "elk.direction": "DOWN" + // 'elk.ports.sameLayerEdges': true, + // 'nodePlacement.strategy': 'SIMPLE', + }, + children: [], + edges: [] + }; + log.info("Drawing flowchart using v3 renderer", elk); + let dir = diagObj.db.getDirection(); + switch (dir) { + case "BT": + graph.layoutOptions["elk.direction"] = "UP"; + break; + case "TB": + graph.layoutOptions["elk.direction"] = "DOWN"; + break; + case "LR": + graph.layoutOptions["elk.direction"] = "RIGHT"; + break; + case "RL": + graph.layoutOptions["elk.direction"] = "LEFT"; + break; + } + const { securityLevel, flowchart: conf2 } = getConfig(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const svg = root.select(`[id="${id}"]`); + const markers = ["point", "circle", "cross"]; + insertMarkers(svg, markers, diagObj.type, id); + const vert = diagObj.db.getVertices(); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + log.info("Subgraphs - ", subGraphs); + for (let i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const subGraphsEl = svg.insert("g").attr("class", "subgraphs"); + const parentLookupDb = addSubGraphs(diagObj.db); + graph = await addVertices(vert, id, root, doc, diagObj, parentLookupDb, graph); + const edgesEl = svg.insert("g").attr("class", "edges edgePath"); + const edges = diagObj.db.getEdges(); + graph = addEdges(edges, diagObj, graph, svg); + const nodes = Object.keys(nodeDb); + nodes.forEach((nodeId) => { + const node = nodeDb[nodeId]; + if (!node.parent) { + graph.children.push(node); + } + if (parentLookupDb.childrenById[nodeId] !== void 0) { + node.labels = [ + { + text: node.labelText, + layoutOptions: { + "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" + }, + width: node.labelData.width, + height: node.labelData.height + // width: 100, + // height: 100, + } + ]; + delete node.x; + delete node.y; + delete node.width; + delete node.height; + } + }); + insertChildren(graph.children, parentLookupDb); + log.info("after layout", JSON.stringify(graph, null, 2)); + const g = await elk.layout(graph); + drawNodes(0, 0, g.children, svg, subGraphsEl, diagObj, 0); + log.info("after layout", g); + (_a = g.edges) == null ? void 0 : _a.map((edge) => { + insertEdge(edgesEl, edge, edge.edgeData, diagObj, parentLookupDb, id); + }); + setupGraphViewbox({}, svg, conf2.diagramPadding, conf2.useMaxWidth); + renderEl.remove(); +}; +const drawNodes = (relX, relY, nodeArray, svg, subgraphsEl, diagObj, depth) => { + nodeArray.forEach(function(node) { + if (node) { + nodeDb[node.id].offset = { + posX: node.x + relX, + posY: node.y + relY, + x: relX, + y: relY, + depth, + width: node.width, + height: node.height + }; + if (node.type === "group") { + const subgraphEl = subgraphsEl.insert("g").attr("class", "subgraph"); + subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node.x + relX).attr("y", node.y + relY).attr("width", node.width).attr("height", node.height); + const label = subgraphEl.insert("g").attr("class", "label"); + const labelCentering = getConfig().flowchart.htmlLabels ? node.labelData.width / 2 : 0; + label.attr( + "transform", + `translate(${node.labels[0].x + relX + node.x + labelCentering}, ${node.labels[0].y + relY + node.y + 3})` + ); + label.node().appendChild(node.labelData.labelNode); + log.info("Id (UGH)= ", node.type, node.labels); + } else { + log.info("Id (UGH)= ", node.id); + node.el.attr( + "transform", + `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})` + ); + } + } + }); + nodeArray.forEach(function(node) { + if (node && node.type === "group") { + drawNodes(relX + node.x, relY + node.y, node.children, svg, subgraphsEl, diagObj, depth + 1); + } + }); +}; +const renderer = { + getClasses, + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < 5; i++) { + sections += ` + .subgraph-lvl-${i} { + fill: ${options[`surface${i}`]}; + stroke: ${options[`surfacePeer${i}`]}; + } + `; + } + return sections; +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span { + color: ${options.titleColor}; + } + + .label text,span { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.85; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + + .flowchart-label text { + text-anchor: middle; + } + + ${genSections(options)} +`; +const styles = getStyles; +const diagram = { + db, + renderer, + parser, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-ee4ab33c.js b/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-ee4ab33c.js new file mode 100644 index 0000000..43bba28 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/flowchart-elk-definition-ee4ab33c.js @@ -0,0 +1,89689 @@ +import { d as db, p as parser } from "./flowDb-af7c12e0.js"; +import { Q as commonjsGlobal, T as getDefaultExportFromCjs, l as log, j as d3select, c as getConfig, r as setupGraphViewbox, o as getStylesFromArray, q as interpolateToCurve, n as curveLinear, f as common } from "./mermaid-491db2d9.js"; +import { a as insertMarkers, e as insertNode, l as labelHelper, f as insertEdgeLabel, j as getLineFunctionsWithOffset } from "./edges-9bf94b2d.js"; +import { l as line } from "./line-8fd2bd69.js"; +import "./createText-2660bae1.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +const findCommonAncestor = (id1, id2, treeData) => { + const { parentById } = treeData; + const visited = /* @__PURE__ */ new Set(); + let currentId = id1; + while (currentId) { + visited.add(currentId); + if (currentId === id2) { + return currentId; + } + currentId = parentById[currentId]; + } + currentId = id2; + while (currentId) { + if (visited.has(currentId)) { + return currentId; + } + currentId = parentById[currentId]; + } + return "root"; +}; +function commonjsRequire(path) { + throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} +var elk_bundled = { exports: {} }; +(function(module, exports) { + (function(f) { + { + module.exports = f(); + } + })(function() { + return function() { + function r(e, n, t) { + function o(i2, f) { + if (!n[i2]) { + if (!e[i2]) { + var c = "function" == typeof commonjsRequire && commonjsRequire; + if (!f && c) + return c(i2, true); + if (u) + return u(i2, true); + var a = new Error("Cannot find module '" + i2 + "'"); + throw a.code = "MODULE_NOT_FOUND", a; + } + var p = n[i2] = { exports: {} }; + e[i2][0].call(p.exports, function(r2) { + var n2 = e[i2][1][r2]; + return o(n2 || r2); + }, p, p.exports, r, e, n, t); + } + return n[i2].exports; + } + for (var u = "function" == typeof commonjsRequire && commonjsRequire, i = 0; i < t.length; i++) + o(t[i]); + return o; + } + return r; + }()({ 1: [function(require2, module2, exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var ELK2 = function() { + function ELK3() { + var _this = this; + var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, defaultLayoutOptions = _ref$defaultLayoutOpt === void 0 ? {} : _ref$defaultLayoutOpt, _ref$algorithms = _ref.algorithms, algorithms = _ref$algorithms === void 0 ? ["layered", "stress", "mrtree", "radial", "force", "disco", "sporeOverlap", "sporeCompaction", "rectpacking"] : _ref$algorithms, workerFactory = _ref.workerFactory, workerUrl = _ref.workerUrl; + _classCallCheck(this, ELK3); + this.defaultLayoutOptions = defaultLayoutOptions; + this.initialized = false; + if (typeof workerUrl === "undefined" && typeof workerFactory === "undefined") { + throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'."); + } + var factory = workerFactory; + if (typeof workerUrl !== "undefined" && typeof workerFactory === "undefined") { + factory = function factory2(url) { + return new Worker(url); + }; + } + var worker = factory(workerUrl); + if (typeof worker.postMessage !== "function") { + throw new TypeError("Created worker does not provide the required 'postMessage' function."); + } + this.worker = new PromisedWorker(worker); + this.worker.postMessage({ + cmd: "register", + algorithms + }).then(function(r) { + return _this.initialized = true; + }).catch(console.err); + } + _createClass(ELK3, [{ + key: "layout", + value: function layout(graph) { + var _ref2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref2$layoutOptions = _ref2.layoutOptions, layoutOptions = _ref2$layoutOptions === void 0 ? this.defaultLayoutOptions : _ref2$layoutOptions, _ref2$logging = _ref2.logging, logging = _ref2$logging === void 0 ? false : _ref2$logging, _ref2$measureExecutio = _ref2.measureExecutionTime, measureExecutionTime = _ref2$measureExecutio === void 0 ? false : _ref2$measureExecutio; + if (!graph) { + return Promise.reject(new Error("Missing mandatory parameter 'graph'.")); + } + return this.worker.postMessage({ + cmd: "layout", + graph, + layoutOptions, + options: { + logging, + measureExecutionTime + } + }); + } + }, { + key: "knownLayoutAlgorithms", + value: function knownLayoutAlgorithms() { + return this.worker.postMessage({ cmd: "algorithms" }); + } + }, { + key: "knownLayoutOptions", + value: function knownLayoutOptions() { + return this.worker.postMessage({ cmd: "options" }); + } + }, { + key: "knownLayoutCategories", + value: function knownLayoutCategories() { + return this.worker.postMessage({ cmd: "categories" }); + } + }, { + key: "terminateWorker", + value: function terminateWorker() { + this.worker.terminate(); + } + }]); + return ELK3; + }(); + exports2.default = ELK2; + var PromisedWorker = function() { + function PromisedWorker2(worker) { + var _this2 = this; + _classCallCheck(this, PromisedWorker2); + if (worker === void 0) { + throw new Error("Missing mandatory parameter 'worker'."); + } + this.resolvers = {}; + this.worker = worker; + this.worker.onmessage = function(answer) { + setTimeout(function() { + _this2.receive(_this2, answer); + }, 0); + }; + } + _createClass(PromisedWorker2, [{ + key: "postMessage", + value: function postMessage(msg) { + var id = this.id || 0; + this.id = id + 1; + msg.id = id; + var self2 = this; + return new Promise(function(resolve, reject) { + self2.resolvers[id] = function(err, res) { + if (err) { + self2.convertGwtStyleError(err); + reject(err); + } else { + resolve(res); + } + }; + self2.worker.postMessage(msg); + }); + } + }, { + key: "receive", + value: function receive(self2, answer) { + var json = answer.data; + var resolver = self2.resolvers[json.id]; + if (resolver) { + delete self2.resolvers[json.id]; + if (json.error) { + resolver(json.error); + } else { + resolver(null, json.data); + } + } + } + }, { + key: "terminate", + value: function terminate() { + if (this.worker.terminate) { + this.worker.terminate(); + } + } + }, { + key: "convertGwtStyleError", + value: function convertGwtStyleError(err) { + if (!err) { + return; + } + var javaException = err["__java$exception"]; + if (javaException) { + if (javaException.cause && javaException.cause.backingJsObject) { + err.cause = javaException.cause.backingJsObject; + this.convertGwtStyleError(err.cause); + } + delete err["__java$exception"]; + } + } + }]); + return PromisedWorker2; + }(); + }, {}], 2: [function(require2, module2, exports2) { + (function(global) { + (function() { + var $wnd; + if (typeof window !== "undefined") + $wnd = window; + else if (typeof global !== "undefined") + $wnd = global; + else if (typeof self !== "undefined") + $wnd = self; + var o; + function nb() { + } + function xb() { + } + function Fd() { + } + function $g() { + } + function _p() { + } + function yq() { + } + function Sq() { + } + function Es() { + } + function Jw() { + } + function Vw() { + } + function VA() { + } + function dA() { + } + function MA() { + } + function PA() { + } + function PB() { + } + function bx() { + } + function cx() { + } + function vy() { + } + function Nz() { + } + function Yz() { + } + function Ylb() { + } + function Ymb() { + } + function xmb() { + } + function Fmb() { + } + function Qmb() { + } + function gcb() { + } + function ccb() { + } + function jcb() { + } + function jtb() { + } + function otb() { + } + function qtb() { + } + function _fb() { + } + function bpb() { + } + function kpb() { + } + function ppb() { + } + function Gpb() { + } + function drb() { + } + function dzb() { + } + function fzb() { + } + function fxb() { + } + function Vxb() { + } + function Ovb() { + } + function byb() { + } + function zyb() { + } + function Zyb() { + } + function _yb() { + } + function hzb() { + } + function jzb() { + } + function lzb() { + } + function nzb() { + } + function rzb() { + } + function zzb() { + } + function Czb() { + } + function Ezb() { + } + function Gzb() { + } + function Izb() { + } + function Mzb() { + } + function bBb() { + } + function NBb() { + } + function PBb() { + } + function RBb() { + } + function iCb() { + } + function OCb() { + } + function SCb() { + } + function GDb() { + } + function JDb() { + } + function fEb() { + } + function xEb() { + } + function CEb() { + } + function GEb() { + } + function yFb() { + } + function KGb() { + } + function tIb() { + } + function vIb() { + } + function xIb() { + } + function zIb() { + } + function OIb() { + } + function SIb() { + } + function TJb() { + } + function VJb() { + } + function XJb() { + } + function XKb() { + } + function fKb() { + } + function VKb() { + } + function VLb() { + } + function jLb() { + } + function nLb() { + } + function GLb() { + } + function KLb() { + } + function MLb() { + } + function OLb() { + } + function RLb() { + } + function YLb() { + } + function bMb() { + } + function gMb() { + } + function lMb() { + } + function pMb() { + } + function wMb() { + } + function zMb() { + } + function CMb() { + } + function FMb() { + } + function LMb() { + } + function zNb() { + } + function PNb() { + } + function kOb() { + } + function pOb() { + } + function tOb() { + } + function yOb() { + } + function FOb() { + } + function GPb() { + } + function aQb() { + } + function cQb() { + } + function eQb() { + } + function gQb() { + } + function iQb() { + } + function CQb() { + } + function MQb() { + } + function OQb() { + } + function ASb() { + } + function fTb() { + } + function kTb() { + } + function STb() { + } + function fUb() { + } + function DUb() { + } + function VUb() { + } + function YUb() { + } + function _Ub() { + } + function _Wb() { + } + function QWb() { + } + function XWb() { + } + function jVb() { + } + function DVb() { + } + function VVb() { + } + function $Vb() { + } + function dXb() { + } + function hXb() { + } + function lXb() { + } + function gYb() { + } + function HYb() { + } + function SYb() { + } + function VYb() { + } + function dZb() { + } + function P$b() { + } + function T$b() { + } + function h1b() { + } + function m1b() { + } + function q1b() { + } + function u1b() { + } + function y1b() { + } + function C1b() { + } + function e2b() { + } + function g2b() { + } + function m2b() { + } + function q2b() { + } + function u2b() { + } + function S2b() { + } + function U2b() { + } + function W2b() { + } + function _2b() { + } + function e3b() { + } + function h3b() { + } + function p3b() { + } + function t3b() { + } + function w3b() { + } + function y3b() { + } + function A3b() { + } + function M3b() { + } + function Q3b() { + } + function U3b() { + } + function Y3b() { + } + function l4b() { + } + function q4b() { + } + function s4b() { + } + function u4b() { + } + function w4b() { + } + function y4b() { + } + function L4b() { + } + function N4b() { + } + function P4b() { + } + function R4b() { + } + function T4b() { + } + function X4b() { + } + function I5b() { + } + function Q5b() { + } + function T5b() { + } + function Z5b() { + } + function l6b() { + } + function o6b() { + } + function t6b() { + } + function z6b() { + } + function L6b() { + } + function M6b() { + } + function P6b() { + } + function X6b() { + } + function $6b() { + } + function a7b() { + } + function c7b() { + } + function g7b() { + } + function j7b() { + } + function m7b() { + } + function r7b() { + } + function x7b() { + } + function D7b() { + } + function D9b() { + } + function b9b() { + } + function h9b() { + } + function j9b() { + } + function l9b() { + } + function w9b() { + } + function F9b() { + } + function hac() { + } + function jac() { + } + function pac() { + } + function uac() { + } + function Iac() { + } + function Kac() { + } + function Sac() { + } + function obc() { + } + function rbc() { + } + function vbc() { + } + function Fbc() { + } + function Jbc() { + } + function Xbc() { + } + function ccc() { + } + function fcc() { + } + function lcc() { + } + function occ() { + } + function tcc() { + } + function ycc() { + } + function Acc() { + } + function Ccc() { + } + function Ecc() { + } + function Gcc() { + } + function Zcc() { + } + function _cc() { + } + function bdc() { + } + function fdc() { + } + function jdc() { + } + function pdc() { + } + function sdc() { + } + function ydc() { + } + function Adc() { + } + function Cdc() { + } + function Edc() { + } + function Idc() { + } + function Ndc() { + } + function Qdc() { + } + function Sdc() { + } + function Udc() { + } + function Wdc() { + } + function Ydc() { + } + function aec() { + } + function hec() { + } + function jec() { + } + function lec() { + } + function nec() { + } + function uec() { + } + function wec() { + } + function yec() { + } + function Aec() { + } + function Fec() { + } + function Jec() { + } + function Lec() { + } + function Nec() { + } + function Rec() { + } + function Uec() { + } + function Zec() { + } + function Zfc() { + } + function lfc() { + } + function tfc() { + } + function xfc() { + } + function zfc() { + } + function Ffc() { + } + function Jfc() { + } + function Nfc() { + } + function Pfc() { + } + function Vfc() { + } + function _fc() { + } + function fgc() { + } + function jgc() { + } + function lgc() { + } + function Bgc() { + } + function ehc() { + } + function ghc() { + } + function ihc() { + } + function khc() { + } + function mhc() { + } + function ohc() { + } + function qhc() { + } + function yhc() { + } + function Ahc() { + } + function Ghc() { + } + function Ihc() { + } + function Khc() { + } + function Mhc() { + } + function Shc() { + } + function Uhc() { + } + function Whc() { + } + function dic() { + } + function dlc() { + } + function blc() { + } + function flc() { + } + function hlc() { + } + function jlc() { + } + function Glc() { + } + function Ilc() { + } + function Klc() { + } + function Mlc() { + } + function Mjc() { + } + function Qjc() { + } + function Qlc() { + } + function Ulc() { + } + function Ylc() { + } + function Lkc() { + } + function Nkc() { + } + function Pkc() { + } + function Rkc() { + } + function Xkc() { + } + function _kc() { + } + function gmc() { + } + function kmc() { + } + function zmc() { + } + function Fmc() { + } + function Wmc() { + } + function $mc() { + } + function anc() { + } + function mnc() { + } + function wnc() { + } + function Hnc() { + } + function Jnc() { + } + function Lnc() { + } + function Nnc() { + } + function Pnc() { + } + function Ync() { + } + function eoc() { + } + function Aoc() { + } + function Coc() { + } + function Eoc() { + } + function Joc() { + } + function Loc() { + } + function Zoc() { + } + function _oc() { + } + function bpc() { + } + function hpc() { + } + function kpc() { + } + function ppc() { + } + function pFc() { + } + function Ryc() { + } + function QCc() { + } + function PDc() { + } + function xGc() { + } + function HGc() { + } + function JGc() { + } + function NGc() { + } + function GIc() { + } + function iKc() { + } + function mKc() { + } + function wKc() { + } + function yKc() { + } + function AKc() { + } + function EKc() { + } + function KKc() { + } + function OKc() { + } + function QKc() { + } + function SKc() { + } + function UKc() { + } + function YKc() { + } + function aLc() { + } + function fLc() { + } + function hLc() { + } + function nLc() { + } + function pLc() { + } + function tLc() { + } + function vLc() { + } + function zLc() { + } + function BLc() { + } + function DLc() { + } + function FLc() { + } + function sMc() { + } + function JMc() { + } + function hNc() { + } + function RNc() { + } + function ZNc() { + } + function _Nc() { + } + function bOc() { + } + function dOc() { + } + function fOc() { + } + function hOc() { + } + function hRc() { + } + function jRc() { + } + function KRc() { + } + function NRc() { + } + function NQc() { + } + function LQc() { + } + function _Qc() { + } + function cPc() { + } + function iPc() { + } + function kPc() { + } + function mPc() { + } + function xPc() { + } + function zPc() { + } + function zSc() { + } + function BSc() { + } + function GSc() { + } + function ISc() { + } + function NSc() { + } + function TSc() { + } + function NTc() { + } + function NVc() { + } + function oVc() { + } + function SVc() { + } + function VVc() { + } + function XVc() { + } + function ZVc() { + } + function bWc() { + } + function bXc() { + } + function CXc() { + } + function FXc() { + } + function IXc() { + } + function MXc() { + } + function UXc() { + } + function bYc() { + } + function fYc() { + } + function oYc() { + } + function qYc() { + } + function uYc() { + } + function pZc() { + } + function G$c() { + } + function h0c() { + } + function N0c() { + } + function k1c() { + } + function I1c() { + } + function Q1c() { + } + function f2c() { + } + function i2c() { + } + function k2c() { + } + function w2c() { + } + function O2c() { + } + function S2c() { + } + function Z2c() { + } + function v3c() { + } + function x3c() { + } + function R3c() { + } + function U3c() { + } + function e4c() { + } + function w4c() { + } + function x4c() { + } + function z4c() { + } + function B4c() { + } + function D4c() { + } + function F4c() { + } + function H4c() { + } + function J4c() { + } + function L4c() { + } + function N4c() { + } + function P4c() { + } + function R4c() { + } + function T4c() { + } + function V4c() { + } + function X4c() { + } + function Z4c() { + } + function _4c() { + } + function _7c() { + } + function b5c() { + } + function d5c() { + } + function f5c() { + } + function h5c() { + } + function H5c() { + } + function Hfd() { + } + function Zfd() { + } + function Zed() { + } + function ged() { + } + function Jed() { + } + function Ned() { + } + function Red() { + } + function Ved() { + } + function bbd() { + } + function mdd() { + } + function _fd() { + } + function fgd() { + } + function kgd() { + } + function Mgd() { + } + function Ahd() { + } + function Ald() { + } + function Tld() { + } + function xkd() { + } + function rmd() { + } + function knd() { + } + function Jod() { + } + function JCd() { + } + function Bpd() { + } + function BFd() { + } + function oFd() { + } + function bqd() { + } + function bvd() { + } + function jvd() { + } + function yud() { + } + function Hxd() { + } + function EBd() { + } + function aDd() { + } + function MGd() { + } + function vHd() { + } + function RHd() { + } + function wNd() { + } + function zNd() { + } + function CNd() { + } + function KNd() { + } + function XNd() { + } + function $Nd() { + } + function HPd() { + } + function lUd() { + } + function XUd() { + } + function DWd() { + } + function GWd() { + } + function JWd() { + } + function MWd() { + } + function PWd() { + } + function SWd() { + } + function VWd() { + } + function YWd() { + } + function _Wd() { + } + function xYd() { + } + function BYd() { + } + function mZd() { + } + function EZd() { + } + function GZd() { + } + function JZd() { + } + function MZd() { + } + function PZd() { + } + function SZd() { + } + function VZd() { + } + function YZd() { + } + function _Zd() { + } + function c$d() { + } + function f$d() { + } + function i$d() { + } + function l$d() { + } + function o$d() { + } + function r$d() { + } + function u$d() { + } + function x$d() { + } + function A$d() { + } + function D$d() { + } + function G$d() { + } + function J$d() { + } + function M$d() { + } + function P$d() { + } + function S$d() { + } + function V$d() { + } + function Y$d() { + } + function _$d() { + } + function c_d() { + } + function f_d() { + } + function i_d() { + } + function l_d() { + } + function o_d() { + } + function r_d() { + } + function u_d() { + } + function x_d() { + } + function A_d() { + } + function D_d() { + } + function G_d() { + } + function J_d() { + } + function M_d() { + } + function P_d() { + } + function S_d() { + } + function V_d() { + } + function Y_d() { + } + function h5d() { + } + function U6d() { + } + function U9d() { + } + function _8d() { + } + function fae() { + } + function hae() { + } + function kae() { + } + function nae() { + } + function qae() { + } + function tae() { + } + function wae() { + } + function zae() { + } + function Cae() { + } + function Fae() { + } + function Iae() { + } + function Lae() { + } + function Oae() { + } + function Rae() { + } + function Uae() { + } + function Xae() { + } + function $ae() { + } + function bbe() { + } + function ebe() { + } + function hbe() { + } + function kbe() { + } + function nbe() { + } + function qbe() { + } + function tbe() { + } + function wbe() { + } + function zbe() { + } + function Cbe() { + } + function Fbe() { + } + function Ibe() { + } + function Lbe() { + } + function Obe() { + } + function Rbe() { + } + function Ube() { + } + function Xbe() { + } + function $be() { + } + function bce() { + } + function ece() { + } + function hce() { + } + function kce() { + } + function nce() { + } + function qce() { + } + function tce() { + } + function wce() { + } + function zce() { + } + function Cce() { + } + function Fce() { + } + function Ice() { + } + function Lce() { + } + function Oce() { + } + function Rce() { + } + function Uce() { + } + function Xce() { + } + function ude() { + } + function Vge() { + } + function dhe() { + } + function ol() { + wb(); + } + function oPb() { + nPb(); + } + function EPb() { + CPb(); + } + function gFb() { + fFb(); + } + function TRb() { + SRb(); + } + function ySb() { + wSb(); + } + function PSb() { + OSb(); + } + function dTb() { + bTb(); + } + function i4b() { + b4b(); + } + function D2b() { + x2b(); + } + function J6b() { + D6b(); + } + function u9b() { + q9b(); + } + function $9b() { + I9b(); + } + function Umc() { + Imc(); + } + function abc() { + Vac(); + } + function ZCc() { + VCc(); + } + function kCc() { + hCc(); + } + function rCc() { + oCc(); + } + function Tcc() { + Occ(); + } + function xkc() { + gkc(); + } + function xDc() { + rDc(); + } + function iDc() { + cDc(); + } + function kwc() { + jwc(); + } + function tJc() { + jJc(); + } + function dJc() { + aJc(); + } + function Pyc() { + Nyc(); + } + function VBc() { + SBc(); + } + function CFc() { + yFc(); + } + function CUc() { + wUc(); + } + function lUc() { + fUc(); + } + function sUc() { + pUc(); + } + function IUc() { + GUc(); + } + function IWc() { + HWc(); + } + function _Wc() { + ZWc(); + } + function fHc() { + dHc(); + } + function f0c() { + d0c(); + } + function B0c() { + A0c(); + } + function L0c() { + J0c(); + } + function LTc() { + JTc(); + } + function sTc() { + rTc(); + } + function KLc() { + ILc(); + } + function wNc() { + tNc(); + } + function PYc() { + OYc(); + } + function nZc() { + lZc(); + } + function q3c() { + p3c(); + } + function Z7c() { + X7c(); + } + function Z9c() { + Y9c(); + } + function _ad() { + Zad(); + } + function kdd() { + idd(); + } + function $md() { + Smd(); + } + function HGd() { + tGd(); + } + function hLd() { + NKd(); + } + function J6d() { + Uge(); + } + function Mvb(a) { + uCb(a); + } + function Yb(a) { + this.a = a; + } + function cc(a) { + this.a = a; + } + function cj(a) { + this.a = a; + } + function ij(a) { + this.a = a; + } + function Dj(a) { + this.a = a; + } + function df(a) { + this.a = a; + } + function kf(a) { + this.a = a; + } + function ah(a) { + this.a = a; + } + function lh(a) { + this.a = a; + } + function th(a) { + this.a = a; + } + function Ph(a) { + this.a = a; + } + function vi(a) { + this.a = a; + } + function Ci(a) { + this.a = a; + } + function Fk(a) { + this.a = a; + } + function Ln(a) { + this.a = a; + } + function ap(a) { + this.a = a; + } + function zp(a) { + this.a = a; + } + function Yp(a) { + this.a = a; + } + function qq(a) { + this.a = a; + } + function Dq(a) { + this.a = a; + } + function wr(a) { + this.a = a; + } + function Ir(a) { + this.b = a; + } + function sj(a) { + this.c = a; + } + function sw(a) { + this.a = a; + } + function fw(a) { + this.a = a; + } + function xw(a) { + this.a = a; + } + function Cw(a) { + this.a = a; + } + function Qw(a) { + this.a = a; + } + function Rw(a) { + this.a = a; + } + function Xw(a) { + this.a = a; + } + function Xv(a) { + this.a = a; + } + function Sv(a) { + this.a = a; + } + function eu(a) { + this.a = a; + } + function Zx(a) { + this.a = a; + } + function _x(a) { + this.a = a; + } + function xy(a) { + this.a = a; + } + function xB(a) { + this.a = a; + } + function HB(a) { + this.a = a; + } + function TB(a) { + this.a = a; + } + function fC(a) { + this.a = a; + } + function wB() { + this.a = []; + } + function MBb(a, b) { + a.a = b; + } + function w_b(a, b) { + a.a = b; + } + function x_b(a, b) { + a.b = b; + } + function YOb(a, b) { + a.b = b; + } + function $Ob(a, b) { + a.b = b; + } + function ZGb(a, b) { + a.j = b; + } + function qNb(a, b) { + a.g = b; + } + function rNb(a, b) { + a.i = b; + } + function dRb(a, b) { + a.c = b; + } + function eRb(a, b) { + a.d = b; + } + function z_b(a, b) { + a.d = b; + } + function y_b(a, b) { + a.c = b; + } + function __b(a, b) { + a.k = b; + } + function E0b(a, b) { + a.c = b; + } + function njc(a, b) { + a.c = b; + } + function mjc(a, b) { + a.a = b; + } + function dFc(a, b) { + a.a = b; + } + function eFc(a, b) { + a.f = b; + } + function nOc(a, b) { + a.a = b; + } + function oOc(a, b) { + a.b = b; + } + function pOc(a, b) { + a.d = b; + } + function qOc(a, b) { + a.i = b; + } + function rOc(a, b) { + a.o = b; + } + function sOc(a, b) { + a.r = b; + } + function $Pc(a, b) { + a.a = b; + } + function _Pc(a, b) { + a.b = b; + } + function DVc(a, b) { + a.e = b; + } + function EVc(a, b) { + a.f = b; + } + function FVc(a, b) { + a.g = b; + } + function SZc(a, b) { + a.e = b; + } + function TZc(a, b) { + a.f = b; + } + function c$c(a, b) { + a.f = b; + } + function bJd(a, b) { + a.n = b; + } + function A1d(a, b) { + a.a = b; + } + function J1d(a, b) { + a.a = b; + } + function B1d(a, b) { + a.c = b; + } + function K1d(a, b) { + a.c = b; + } + function L1d(a, b) { + a.d = b; + } + function M1d(a, b) { + a.e = b; + } + function N1d(a, b) { + a.g = b; + } + function d2d(a, b) { + a.a = b; + } + function e2d(a, b) { + a.c = b; + } + function f2d(a, b) { + a.d = b; + } + function g2d(a, b) { + a.e = b; + } + function h2d(a, b) { + a.f = b; + } + function i2d(a, b) { + a.j = b; + } + function Z8d(a, b) { + a.a = b; + } + function $8d(a, b) { + a.b = b; + } + function g9d(a, b) { + a.a = b; + } + function Cic(a) { + a.b = a.a; + } + function Dg(a) { + a.c = a.d.d; + } + function vib(a) { + this.d = a; + } + function eib(a) { + this.a = a; + } + function Pib(a) { + this.a = a; + } + function Vib(a) { + this.a = a; + } + function $ib(a) { + this.a = a; + } + function mcb(a) { + this.a = a; + } + function Mcb(a) { + this.a = a; + } + function Xcb(a) { + this.a = a; + } + function Ndb(a) { + this.a = a; + } + function _db(a) { + this.a = a; + } + function teb(a) { + this.a = a; + } + function Qeb(a) { + this.a = a; + } + function djb(a) { + this.a = a; + } + function Gjb(a) { + this.a = a; + } + function Njb(a) { + this.a = a; + } + function Bjb(a) { + this.b = a; + } + function lnb(a) { + this.b = a; + } + function Dnb(a) { + this.b = a; + } + function anb(a) { + this.a = a; + } + function Mob(a) { + this.a = a; + } + function Rob(a) { + this.a = a; + } + function iob(a) { + this.c = a; + } + function olb(a) { + this.c = a; + } + function qub(a) { + this.c = a; + } + function Tub(a) { + this.a = a; + } + function Vub(a) { + this.a = a; + } + function Xub(a) { + this.a = a; + } + function Zub(a) { + this.a = a; + } + function tpb(a) { + this.a = a; + } + function _pb(a) { + this.a = a; + } + function Wqb(a) { + this.a = a; + } + function nsb(a) { + this.a = a; + } + function Rxb(a) { + this.a = a; + } + function Txb(a) { + this.a = a; + } + function Xxb(a) { + this.a = a; + } + function bzb(a) { + this.a = a; + } + function tzb(a) { + this.a = a; + } + function vzb(a) { + this.a = a; + } + function xzb(a) { + this.a = a; + } + function Kzb(a) { + this.a = a; + } + function Ozb(a) { + this.a = a; + } + function iAb(a) { + this.a = a; + } + function kAb(a) { + this.a = a; + } + function mAb(a) { + this.a = a; + } + function BAb(a) { + this.a = a; + } + function hBb(a) { + this.a = a; + } + function jBb(a) { + this.a = a; + } + function nBb(a) { + this.a = a; + } + function TBb(a) { + this.a = a; + } + function XBb(a) { + this.a = a; + } + function QCb(a) { + this.a = a; + } + function WCb(a) { + this.a = a; + } + function _Cb(a) { + this.a = a; + } + function dEb(a) { + this.a = a; + } + function QGb(a) { + this.a = a; + } + function YGb(a) { + this.a = a; + } + function tKb(a) { + this.a = a; + } + function CLb(a) { + this.a = a; + } + function JMb(a) { + this.a = a; + } + function RNb(a) { + this.a = a; + } + function kQb(a) { + this.a = a; + } + function mQb(a) { + this.a = a; + } + function FQb(a) { + this.a = a; + } + function ETb(a) { + this.a = a; + } + function UTb(a) { + this.a = a; + } + function dUb(a) { + this.a = a; + } + function hUb(a) { + this.a = a; + } + function EZb(a) { + this.a = a; + } + function j$b(a) { + this.a = a; + } + function v$b(a) { + this.e = a; + } + function J0b(a) { + this.a = a; + } + function M0b(a) { + this.a = a; + } + function R0b(a) { + this.a = a; + } + function U0b(a) { + this.a = a; + } + function i2b(a) { + this.a = a; + } + function k2b(a) { + this.a = a; + } + function o2b(a) { + this.a = a; + } + function s2b(a) { + this.a = a; + } + function G2b(a) { + this.a = a; + } + function I2b(a) { + this.a = a; + } + function K2b(a) { + this.a = a; + } + function M2b(a) { + this.a = a; + } + function W3b(a) { + this.a = a; + } + function $3b(a) { + this.a = a; + } + function V4b(a) { + this.a = a; + } + function u5b(a) { + this.a = a; + } + function A7b(a) { + this.a = a; + } + function G7b(a) { + this.a = a; + } + function J7b(a) { + this.a = a; + } + function M7b(a) { + this.a = a; + } + function Mbc(a) { + this.a = a; + } + function Pbc(a) { + this.a = a; + } + function lac(a) { + this.a = a; + } + function nac(a) { + this.a = a; + } + function qcc(a) { + this.a = a; + } + function Gdc(a) { + this.a = a; + } + function $dc(a) { + this.a = a; + } + function cec(a) { + this.a = a; + } + function _ec(a) { + this.a = a; + } + function pfc(a) { + this.a = a; + } + function Bfc(a) { + this.a = a; + } + function Lfc(a) { + this.a = a; + } + function ygc(a) { + this.a = a; + } + function Dgc(a) { + this.a = a; + } + function shc(a) { + this.a = a; + } + function uhc(a) { + this.a = a; + } + function whc(a) { + this.a = a; + } + function Chc(a) { + this.a = a; + } + function Ehc(a) { + this.a = a; + } + function Ohc(a) { + this.a = a; + } + function Yhc(a) { + this.a = a; + } + function Tkc(a) { + this.a = a; + } + function Vkc(a) { + this.a = a; + } + function Olc(a) { + this.a = a; + } + function pnc(a) { + this.a = a; + } + function rnc(a) { + this.a = a; + } + function dpc(a) { + this.a = a; + } + function fpc(a) { + this.a = a; + } + function GCc(a) { + this.a = a; + } + function KCc(a) { + this.a = a; + } + function mDc(a) { + this.a = a; + } + function jEc(a) { + this.a = a; + } + function HEc(a) { + this.a = a; + } + function FEc(a) { + this.c = a; + } + function qoc(a) { + this.b = a; + } + function bFc(a) { + this.a = a; + } + function GFc(a) { + this.a = a; + } + function iGc(a) { + this.a = a; + } + function kGc(a) { + this.a = a; + } + function mGc(a) { + this.a = a; + } + function $Gc(a) { + this.a = a; + } + function hIc(a) { + this.a = a; + } + function lIc(a) { + this.a = a; + } + function pIc(a) { + this.a = a; + } + function tIc(a) { + this.a = a; + } + function xIc(a) { + this.a = a; + } + function zIc(a) { + this.a = a; + } + function CIc(a) { + this.a = a; + } + function LIc(a) { + this.a = a; + } + function CKc(a) { + this.a = a; + } + function IKc(a) { + this.a = a; + } + function MKc(a) { + this.a = a; + } + function $Kc(a) { + this.a = a; + } + function cLc(a) { + this.a = a; + } + function jLc(a) { + this.a = a; + } + function rLc(a) { + this.a = a; + } + function xLc(a) { + this.a = a; + } + function OMc(a) { + this.a = a; + } + function ZOc(a) { + this.a = a; + } + function ZRc(a) { + this.a = a; + } + function aSc(a) { + this.a = a; + } + function I$c(a) { + this.a = a; + } + function K$c(a) { + this.a = a; + } + function M$c(a) { + this.a = a; + } + function O$c(a) { + this.a = a; + } + function U$c(a) { + this.a = a; + } + function n1c(a) { + this.a = a; + } + function z1c(a) { + this.a = a; + } + function B1c(a) { + this.a = a; + } + function Q2c(a) { + this.a = a; + } + function U2c(a) { + this.a = a; + } + function z3c(a) { + this.a = a; + } + function med(a) { + this.a = a; + } + function Xed(a) { + this.a = a; + } + function _ed(a) { + this.a = a; + } + function Qfd(a) { + this.a = a; + } + function Bgd(a) { + this.a = a; + } + function $gd(a) { + this.a = a; + } + function lrd(a) { + this.a = a; + } + function urd(a) { + this.a = a; + } + function vrd(a) { + this.a = a; + } + function wrd(a) { + this.a = a; + } + function xrd(a) { + this.a = a; + } + function yrd(a) { + this.a = a; + } + function zrd(a) { + this.a = a; + } + function Ard(a) { + this.a = a; + } + function Brd(a) { + this.a = a; + } + function Crd(a) { + this.a = a; + } + function Ird(a) { + this.a = a; + } + function Krd(a) { + this.a = a; + } + function Lrd(a) { + this.a = a; + } + function Mrd(a) { + this.a = a; + } + function Nrd(a) { + this.a = a; + } + function Prd(a) { + this.a = a; + } + function Srd(a) { + this.a = a; + } + function Yrd(a) { + this.a = a; + } + function Zrd(a) { + this.a = a; + } + function _rd(a) { + this.a = a; + } + function asd(a) { + this.a = a; + } + function bsd(a) { + this.a = a; + } + function csd(a) { + this.a = a; + } + function dsd(a) { + this.a = a; + } + function msd(a) { + this.a = a; + } + function osd(a) { + this.a = a; + } + function qsd(a) { + this.a = a; + } + function ssd(a) { + this.a = a; + } + function Wsd(a) { + this.a = a; + } + function Lsd(a) { + this.b = a; + } + function thd(a) { + this.f = a; + } + function qtd(a) { + this.a = a; + } + function yBd(a) { + this.a = a; + } + function GBd(a) { + this.a = a; + } + function MBd(a) { + this.a = a; + } + function SBd(a) { + this.a = a; + } + function iCd(a) { + this.a = a; + } + function YMd(a) { + this.a = a; + } + function GNd(a) { + this.a = a; + } + function EPd(a) { + this.a = a; + } + function EQd(a) { + this.a = a; + } + function NTd(a) { + this.a = a; + } + function qOd(a) { + this.b = a; + } + function lVd(a) { + this.c = a; + } + function VVd(a) { + this.e = a; + } + function iYd(a) { + this.a = a; + } + function RYd(a) { + this.a = a; + } + function ZYd(a) { + this.a = a; + } + function z0d(a) { + this.a = a; + } + function O0d(a) { + this.a = a; + } + function s0d(a) { + this.d = a; + } + function W5d(a) { + this.a = a; + } + function cge(a) { + this.a = a; + } + function xfe(a) { + this.e = a; + } + function Tfd() { + this.a = 0; + } + function jkb() { + Vjb(this); + } + function Rkb() { + Ckb(this); + } + function Lqb() { + Uhb(this); + } + function lEb() { + kEb(this); + } + function A_b() { + } + function UQd() { + this.c = FQd; + } + function v6d(a, b) { + b.Wb(a); + } + function moc(a, b) { + a.b += b; + } + function yXb(a) { + a.b = new Ji(); + } + function vbb(a) { + return a.e; + } + function DB(a) { + return a.a; + } + function LB(a) { + return a.a; + } + function ZB(a) { + return a.a; + } + function lC(a) { + return a.a; + } + function EC(a) { + return a.a; + } + function wC() { + return null; + } + function SB() { + return null; + } + function hcb() { + mvd(); + ovd(); + } + function zJb(a) { + a.b.tf(a.e); + } + function j5b(a, b) { + a.b = b - a.b; + } + function g5b(a, b) { + a.a = b - a.a; + } + function PXc(a, b) { + b.ad(a.a); + } + function plc(a, b) { + G0b(b, a); + } + function hp(a, b, c) { + a.Od(c, b); + } + function As(a, b) { + a.e = b; + b.b = a; + } + function Zl(a) { + Ql(); + this.a = a; + } + function jq(a) { + Ql(); + this.a = a; + } + function sq(a) { + Ql(); + this.a = a; + } + function Fq(a) { + im(); + this.a = a; + } + function Sz(a) { + Rz(); + Qz.be(a); + } + function gz() { + Xy.call(this); + } + function xcb() { + Xy.call(this); + } + function pcb() { + gz.call(this); + } + function tcb() { + gz.call(this); + } + function Bdb() { + gz.call(this); + } + function Vdb() { + gz.call(this); + } + function Ydb() { + gz.call(this); + } + function Geb() { + gz.call(this); + } + function bgb() { + gz.call(this); + } + function Apb() { + gz.call(this); + } + function Jpb() { + gz.call(this); + } + function utb() { + gz.call(this); + } + function x2c() { + gz.call(this); + } + function rQd() { + this.a = this; + } + function MPd() { + this.Bb |= 256; + } + function tTb() { + this.b = new mt(); + } + function fA() { + fA = ccb; + new Lqb(); + } + function rcb() { + pcb.call(this); + } + function dCb(a, b) { + a.length = b; + } + function Tvb(a, b) { + Ekb(a.a, b); + } + function sKb(a, b) { + UHb(a.c, b); + } + function SMc(a, b) { + Qqb(a.b, b); + } + function vBd(a, b) { + uAd(a.a, b); + } + function wBd(a, b) { + vAd(a.a, b); + } + function GLd(a, b) { + Uhd(a.e, b); + } + function d7d(a) { + D2d(a.c, a.b); + } + function mj(a, b) { + a.kc().Nb(b); + } + function Odb(a) { + this.a = Tdb(a); + } + function Tqb() { + this.a = new Lqb(); + } + function gyb() { + this.a = new Lqb(); + } + function Wvb() { + this.a = new Rkb(); + } + function KFb() { + this.a = new Rkb(); + } + function PFb() { + this.a = new Rkb(); + } + function FFb() { + this.a = new yFb(); + } + function pGb() { + this.a = new MFb(); + } + function ZQb() { + this.a = new MQb(); + } + function Gxb() { + this.a = new Pwb(); + } + function jUb() { + this.a = new PTb(); + } + function sDb() { + this.a = new oDb(); + } + function zDb() { + this.a = new tDb(); + } + function CWb() { + this.a = new Rkb(); + } + function HXb() { + this.a = new Rkb(); + } + function nYb() { + this.a = new Rkb(); + } + function BYb() { + this.a = new Rkb(); + } + function fLb() { + this.d = new Rkb(); + } + function vYb() { + this.a = new Tqb(); + } + function a2b() { + this.a = new Lqb(); + } + function wZb() { + this.b = new Lqb(); + } + function TCc() { + this.b = new Rkb(); + } + function zJc() { + this.e = new Rkb(); + } + function uMc() { + this.d = new Rkb(); + } + function wdc() { + this.a = new xkc(); + } + function vKc() { + Rkb.call(this); + } + function twb() { + Wvb.call(this); + } + function oHb() { + $Gb.call(this); + } + function LXb() { + HXb.call(this); + } + function L_b() { + H_b.call(this); + } + function H_b() { + A_b.call(this); + } + function p0b() { + A_b.call(this); + } + function s0b() { + p0b.call(this); + } + function WMc() { + VMc.call(this); + } + function bNc() { + VMc.call(this); + } + function EPc() { + CPc.call(this); + } + function JPc() { + CPc.call(this); + } + function OPc() { + CPc.call(this); + } + function w1c() { + s1c.call(this); + } + function s7c() { + Psb.call(this); + } + function apd() { + Ald.call(this); + } + function ppd() { + Ald.call(this); + } + function lDd() { + YCd.call(this); + } + function NDd() { + YCd.call(this); + } + function mFd() { + Lqb.call(this); + } + function vFd() { + Lqb.call(this); + } + function GFd() { + Lqb.call(this); + } + function KPd() { + Tqb.call(this); + } + function OJd() { + hJd.call(this); + } + function aQd() { + MPd.call(this); + } + function SSd() { + FId.call(this); + } + function rUd() { + FId.call(this); + } + function oUd() { + Lqb.call(this); + } + function NYd() { + Lqb.call(this); + } + function cZd() { + Lqb.call(this); + } + function R8d() { + MGd.call(this); + } + function o9d() { + MGd.call(this); + } + function i9d() { + R8d.call(this); + } + function hee() { + ude.call(this); + } + function Dd(a) { + yd.call(this, a); + } + function Hd(a) { + yd.call(this, a); + } + function ph(a) { + lh.call(this, a); + } + function Sh(a) { + Wc.call(this, a); + } + function oi(a) { + Sh.call(this, a); + } + function Ii(a) { + Wc.call(this, a); + } + function Zdd() { + this.a = new Psb(); + } + function CPc() { + this.a = new Tqb(); + } + function s1c() { + this.a = new Lqb(); + } + function QSc() { + this.a = new Rkb(); + } + function D2c() { + this.j = new Rkb(); + } + function QXc() { + this.a = new UXc(); + } + function e_c() { + this.a = new d_c(); + } + function YCd() { + this.a = new aDd(); + } + function _k() { + _k = ccb; + $k = new al(); + } + function Lk() { + Lk = ccb; + Kk = new Mk(); + } + function wb() { + wb = ccb; + vb = new xb(); + } + function hs() { + hs = ccb; + gs = new is(); + } + function rs(a) { + Sh.call(this, a); + } + function Gp(a) { + Sh.call(this, a); + } + function xp(a) { + Lo.call(this, a); + } + function Ep(a) { + Lo.call(this, a); + } + function Tp(a) { + Wn.call(this, a); + } + function wx(a) { + un.call(this, a); + } + function ov(a) { + dv.call(this, a); + } + function Mv(a) { + Br.call(this, a); + } + function Ov(a) { + Br.call(this, a); + } + function Lw(a) { + Br.call(this, a); + } + function hz(a) { + Yy.call(this, a); + } + function MB(a) { + hz.call(this, a); + } + function eC() { + fC.call(this, {}); + } + function Ftb(a) { + Atb(); + this.a = a; + } + function zwb(a) { + a.b = null; + a.c = 0; + } + function Vy(a, b) { + a.e = b; + Sy(a, b); + } + function LVb(a, b) { + a.a = b; + NVb(a); + } + function lIb(a, b, c) { + a.a[b.g] = c; + } + function vfd(a, b, c) { + Dfd(c, a, b); + } + function Odc(a, b) { + rjc(b.i, a.n); + } + function Wyc(a, b) { + Xyc(a).td(b); + } + function ERb(a, b) { + return a * a / b; + } + function Xr(a, b) { + return a.g - b.g; + } + function tC(a) { + return new TB(a); + } + function vC(a) { + return new yC(a); + } + function ocb(a) { + hz.call(this, a); + } + function qcb(a) { + hz.call(this, a); + } + function ucb(a) { + hz.call(this, a); + } + function vcb(a) { + Yy.call(this, a); + } + function fGc(a) { + LFc(); + this.a = a; + } + function c0d(a) { + kzd(); + this.a = a; + } + function bhd(a) { + Rgd(); + this.f = a; + } + function dhd(a) { + Rgd(); + this.f = a; + } + function Cdb(a) { + hz.call(this, a); + } + function Wdb(a) { + hz.call(this, a); + } + function Zdb(a) { + hz.call(this, a); + } + function Feb(a) { + hz.call(this, a); + } + function Heb(a) { + hz.call(this, a); + } + function Ccb(a) { + return uCb(a), a; + } + function Edb(a) { + return uCb(a), a; + } + function Gdb(a) { + return uCb(a), a; + } + function jfb(a) { + return uCb(a), a; + } + function tfb(a) { + return uCb(a), a; + } + function akb(a) { + return a.b == a.c; + } + function Hwb(a) { + return !!a && a.b; + } + function pIb(a) { + return !!a && a.k; + } + function qIb(a) { + return !!a && a.j; + } + function amb(a) { + uCb(a); + this.a = a; + } + function wVb(a) { + qVb(a); + return a; + } + function Blb(a) { + Glb(a, a.length); + } + function cgb(a) { + hz.call(this, a); + } + function cqd(a) { + hz.call(this, a); + } + function n8d(a) { + hz.call(this, a); + } + function y2c(a) { + hz.call(this, a); + } + function z2c(a) { + hz.call(this, a); + } + function mde(a) { + hz.call(this, a); + } + function pc(a) { + qc.call(this, a, 0); + } + function Ji() { + Ki.call(this, 12, 3); + } + function Kz() { + Kz = ccb; + Jz = new Nz(); + } + function jz() { + jz = ccb; + iz = new nb(); + } + function KA() { + KA = ccb; + JA = new MA(); + } + function OB() { + OB = ccb; + NB = new PB(); + } + function jc() { + throw vbb(new bgb()); + } + function zh() { + throw vbb(new bgb()); + } + function Pi() { + throw vbb(new bgb()); + } + function Pj() { + throw vbb(new bgb()); + } + function Qj() { + throw vbb(new bgb()); + } + function Ym() { + throw vbb(new bgb()); + } + function Gb() { + this.a = GD(Qb(She)); + } + function oy(a) { + Ql(); + this.a = Qb(a); + } + function Bs(a, b) { + a.Td(b); + b.Sd(a); + } + function iw(a, b) { + a.a.ec().Mc(b); + } + function CYb(a, b, c) { + a.c.lf(b, c); + } + function scb(a) { + qcb.call(this, a); + } + function Oeb(a) { + Wdb.call(this, a); + } + function Hfb() { + mcb.call(this, ""); + } + function Ifb() { + mcb.call(this, ""); + } + function Ufb() { + mcb.call(this, ""); + } + function Vfb() { + mcb.call(this, ""); + } + function Xfb(a) { + qcb.call(this, a); + } + function zob(a) { + lnb.call(this, a); + } + function Yob(a) { + Inb.call(this, a); + } + function Gob(a) { + zob.call(this, a); + } + function Mk() { + Fk.call(this, null); + } + function al() { + Fk.call(this, null); + } + function Az() { + Az = ccb; + !!(Rz(), Qz); + } + function wrb() { + wrb = ccb; + vrb = yrb(); + } + function Mtb(a) { + return a.a ? a.b : 0; + } + function Vtb(a) { + return a.a ? a.b : 0; + } + function Lcb(a, b) { + return a.a - b.a; + } + function Wcb(a, b) { + return a.a - b.a; + } + function Peb(a, b) { + return a.a - b.a; + } + function eCb(a, b) { + return PC(a, b); + } + function GC(a, b) { + return rdb(a, b); + } + function _B(b, a) { + return a in b.a; + } + function _Db(a, b) { + a.f = b; + return a; + } + function ZDb(a, b) { + a.b = b; + return a; + } + function $Db(a, b) { + a.c = b; + return a; + } + function aEb(a, b) { + a.g = b; + return a; + } + function HGb(a, b) { + a.a = b; + return a; + } + function IGb(a, b) { + a.f = b; + return a; + } + function JGb(a, b) { + a.k = b; + return a; + } + function dLb(a, b) { + a.a = b; + return a; + } + function eLb(a, b) { + a.e = b; + return a; + } + function zVb(a, b) { + a.e = b; + return a; + } + function AVb(a, b) { + a.f = b; + return a; + } + function KOb(a, b) { + a.b = true; + a.d = b; + } + function DHb(a, b) { + a.b = new g7c(b); + } + function uvb(a, b, c) { + b.td(a.a[c]); + } + function zvb(a, b, c) { + b.we(a.a[c]); + } + function wJc(a, b) { + return a.b - b.b; + } + function kOc(a, b) { + return a.g - b.g; + } + function WQc(a, b) { + return a.s - b.s; + } + function Lic(a, b) { + return a ? 0 : b - 1; + } + function SFc(a, b) { + return a ? 0 : b - 1; + } + function RFc(a, b) { + return a ? b - 1 : 0; + } + function M2c(a, b) { + return b.Yf(a); + } + function M3c(a, b) { + a.b = b; + return a; + } + function L3c(a, b) { + a.a = b; + return a; + } + function N3c(a, b) { + a.c = b; + return a; + } + function O3c(a, b) { + a.d = b; + return a; + } + function P3c(a, b) { + a.e = b; + return a; + } + function Q3c(a, b) { + a.f = b; + return a; + } + function b4c(a, b) { + a.a = b; + return a; + } + function c4c(a, b) { + a.b = b; + return a; + } + function d4c(a, b) { + a.c = b; + return a; + } + function z5c(a, b) { + a.c = b; + return a; + } + function y5c(a, b) { + a.b = b; + return a; + } + function A5c(a, b) { + a.d = b; + return a; + } + function B5c(a, b) { + a.e = b; + return a; + } + function C5c(a, b) { + a.f = b; + return a; + } + function D5c(a, b) { + a.g = b; + return a; + } + function E5c(a, b) { + a.a = b; + return a; + } + function F5c(a, b) { + a.i = b; + return a; + } + function G5c(a, b) { + a.j = b; + return a; + } + function Vdd(a, b) { + a.k = b; + return a; + } + function Wdd(a, b) { + a.j = b; + return a; + } + function ykc(a, b) { + gkc(); + F0b(b, a); + } + function T$c(a, b, c) { + R$c(a.a, b, c); + } + function RGc(a) { + cEc.call(this, a); + } + function iHc(a) { + cEc.call(this, a); + } + function t7c(a) { + Qsb.call(this, a); + } + function aPb(a) { + _Ob.call(this, a); + } + function Ixd(a) { + zud.call(this, a); + } + function dCd(a) { + ZBd.call(this, a); + } + function fCd(a) { + ZBd.call(this, a); + } + function p_b() { + q_b.call(this, ""); + } + function d7c() { + this.a = 0; + this.b = 0; + } + function aPc() { + this.b = 0; + this.a = 0; + } + function NJd(a, b) { + a.b = 0; + DId(a, b); + } + function X1d(a, b) { + a.c = b; + a.b = true; + } + function Oc(a, b) { + return a.c._b(b); + } + function gdb(a) { + return a.e && a.e(); + } + function Vd(a) { + return !a ? null : a.d; + } + function sn(a, b) { + return Gv(a.b, b); + } + function Fv(a) { + return !a ? null : a.g; + } + function Kv(a) { + return !a ? null : a.i; + } + function hdb(a) { + fdb(a); + return a.o; + } + function Fhd() { + Fhd = ccb; + Ehd = ond(); + } + function Hhd() { + Hhd = ccb; + Ghd = Cod(); + } + function LFd() { + LFd = ccb; + KFd = qZd(); + } + function p8d() { + p8d = ccb; + o8d = Y9d(); + } + function r8d() { + r8d = ccb; + q8d = dae(); + } + function mvd() { + mvd = ccb; + lvd = n4c(); + } + function Srb() { + throw vbb(new bgb()); + } + function enb() { + throw vbb(new bgb()); + } + function fnb() { + throw vbb(new bgb()); + } + function gnb() { + throw vbb(new bgb()); + } + function jnb() { + throw vbb(new bgb()); + } + function Cnb() { + throw vbb(new bgb()); + } + function Uqb(a) { + this.a = new Mqb(a); + } + function tgb(a) { + lgb(); + ngb(this, a); + } + function Hxb(a) { + this.a = new Qwb(a); + } + function _ub(a, b) { + while (a.ye(b)) + ; + } + function Sub(a, b) { + while (a.sd(b)) + ; + } + function Bfb(a, b) { + a.a += b; + return a; + } + function Cfb(a, b) { + a.a += b; + return a; + } + function Ffb(a, b) { + a.a += b; + return a; + } + function Lfb(a, b) { + a.a += b; + return a; + } + function WAb(a) { + Tzb(a); + return a.a; + } + function Wsb(a) { + return a.b != a.d.c; + } + function pD(a) { + return a.l | a.m << 22; + } + function aIc(a, b) { + return a.d[b.p]; + } + function h2c(a, b) { + return c2c(a, b); + } + function cCb(a, b, c) { + a.splice(b, c); + } + function WHb(a) { + a.c ? VHb(a) : XHb(a); + } + function jVc(a) { + this.a = 0; + this.b = a; + } + function ZUc() { + this.a = new L2c(K$); + } + function tRc() { + this.b = new L2c(h$); + } + function Q$c() { + this.b = new L2c(J_); + } + function d_c() { + this.b = new L2c(J_); + } + function OCd() { + throw vbb(new bgb()); + } + function PCd() { + throw vbb(new bgb()); + } + function QCd() { + throw vbb(new bgb()); + } + function RCd() { + throw vbb(new bgb()); + } + function SCd() { + throw vbb(new bgb()); + } + function TCd() { + throw vbb(new bgb()); + } + function UCd() { + throw vbb(new bgb()); + } + function VCd() { + throw vbb(new bgb()); + } + function WCd() { + throw vbb(new bgb()); + } + function XCd() { + throw vbb(new bgb()); + } + function ahe() { + throw vbb(new utb()); + } + function bhe() { + throw vbb(new utb()); + } + function Rge(a) { + this.a = new ege(a); + } + function ege(a) { + dge(this, a, Vee()); + } + function Fhe(a) { + return !a || Ehe(a); + } + function dde(a) { + return $ce[a] != -1; + } + function Iz() { + xz != 0 && (xz = 0); + zz = -1; + } + function Ybb() { + Wbb == null && (Wbb = []); + } + function ONd(a, b) { + Rxd(ZKd(a.a), b); + } + function TNd(a, b) { + Rxd(ZKd(a.a), b); + } + function Yf(a, b) { + zf.call(this, a, b); + } + function $f(a, b) { + Yf.call(this, a, b); + } + function Hf(a, b) { + this.b = a; + this.c = b; + } + function rk(a, b) { + this.b = a; + this.a = b; + } + function ek(a, b) { + this.a = a; + this.b = b; + } + function gk(a, b) { + this.a = a; + this.b = b; + } + function pk(a, b) { + this.a = a; + this.b = b; + } + function yk(a, b) { + this.a = a; + this.b = b; + } + function Ak(a, b) { + this.a = a; + this.b = b; + } + function Fj(a, b) { + this.a = a; + this.b = b; + } + function _j(a, b) { + this.a = a; + this.b = b; + } + function dr(a, b) { + this.a = a; + this.b = b; + } + function zr(a, b) { + this.b = a; + this.a = b; + } + function So(a, b) { + this.b = a; + this.a = b; + } + function qp(a, b) { + this.b = a; + this.a = b; + } + function $q(a, b) { + this.b = a; + this.a = b; + } + function $r(a, b) { + this.f = a; + this.g = b; + } + function ne(a, b) { + this.e = a; + this.d = b; + } + function Wo(a, b) { + this.g = a; + this.i = b; + } + function bu(a, b) { + this.a = a; + this.b = b; + } + function qu(a, b) { + this.a = a; + this.f = b; + } + function qv(a, b) { + this.b = a; + this.c = b; + } + function ox(a, b) { + this.a = a; + this.b = b; + } + function Px(a, b) { + this.a = a; + this.b = b; + } + function mC(a, b) { + this.a = a; + this.b = b; + } + function Wc(a) { + Lb(a.dc()); + this.c = a; + } + function rf(a) { + this.b = BD(Qb(a), 83); + } + function Zv(a) { + this.a = BD(Qb(a), 83); + } + function dv(a) { + this.a = BD(Qb(a), 15); + } + function $u(a) { + this.a = BD(Qb(a), 15); + } + function Br(a) { + this.b = BD(Qb(a), 47); + } + function eB() { + this.q = new $wnd.Date(); + } + function Zfb() { + Zfb = ccb; + Yfb = new jcb(); + } + function Emb() { + Emb = ccb; + Dmb = new Fmb(); + } + function Vhb(a) { + return a.f.c + a.g.c; + } + function hnb(a, b) { + return a.b.Hc(b); + } + function inb(a, b) { + return a.b.Ic(b); + } + function knb(a, b) { + return a.b.Qc(b); + } + function Dob(a, b) { + return a.b.Hc(b); + } + function dob(a, b) { + return a.c.uc(b); + } + function Rqb(a, b) { + return a.a._b(b); + } + function fob(a, b) { + return pb(a.c, b); + } + function jt(a, b) { + return Mhb(a.b, b); + } + function Lp(a, b) { + return a > b && b < Iie; + } + function Ryb(a, b) { + return a.Gc(b), a; + } + function Syb(a, b) { + return ye(a, b), a; + } + function sC(a) { + return GB(), a ? FB : EB; + } + function Mqb(a) { + Whb.call(this, a, 0); + } + function Pwb() { + Qwb.call(this, null); + } + function yAb() { + Vzb.call(this, null); + } + function Gqb(a) { + this.c = a; + Dqb(this); + } + function Psb() { + Csb(this); + Osb(this); + } + function MAb(a, b) { + Tzb(a); + a.a.Nb(b); + } + function Myb(a, b) { + a.Gc(b); + return a; + } + function qDb(a, b) { + a.a.f = b; + return a; + } + function wDb(a, b) { + a.a.d = b; + return a; + } + function xDb(a, b) { + a.a.g = b; + return a; + } + function yDb(a, b) { + a.a.j = b; + return a; + } + function BFb(a, b) { + a.a.a = b; + return a; + } + function CFb(a, b) { + a.a.d = b; + return a; + } + function DFb(a, b) { + a.a.e = b; + return a; + } + function EFb(a, b) { + a.a.g = b; + return a; + } + function oGb(a, b) { + a.a.f = b; + return a; + } + function TGb(a) { + a.b = false; + return a; + } + function Ltb() { + Ltb = ccb; + Ktb = new Otb(); + } + function Utb() { + Utb = ccb; + Ttb = new Wtb(); + } + function $xb() { + $xb = ccb; + Zxb = new byb(); + } + function $Yb() { + $Yb = ccb; + ZYb = new dZb(); + } + function cPb() { + cPb = ccb; + bPb = new dPb(); + } + function EAb() { + EAb = ccb; + DAb = new PBb(); + } + function a$b() { + a$b = ccb; + _Zb = new P$b(); + } + function FDb() { + FDb = ccb; + EDb = new GDb(); + } + function xUb() { + xUb = ccb; + wUb = new DUb(); + } + function x2b() { + x2b = ccb; + w2b = new d7c(); + } + function iVb() { + iVb = ccb; + hVb = new jVb(); + } + function nVb() { + nVb = ccb; + mVb = new OVb(); + } + function LWb() { + LWb = ccb; + KWb = new QWb(); + } + function b4b() { + b4b = ccb; + a4b = new l4b(); + } + function q9b() { + q9b = ccb; + p9b = new w9b(); + } + function qgc() { + qgc = ccb; + pgc = new dic(); + } + function Imc() { + Imc = ccb; + Hmc = new Wmc(); + } + function GUc() { + GUc = ccb; + FUc = new j3c(); + } + function i_c() { + i_c = ccb; + h_c = new k_c(); + } + function s_c() { + s_c = ccb; + r_c = new t_c(); + } + function R0c() { + R0c = ccb; + Q0c = new T0c(); + } + function Vyc() { + Vyc = ccb; + Uyc = new Ved(); + } + function DCc() { + vCc(); + this.c = new Ji(); + } + function k_c() { + $r.call(this, Une, 0); + } + function r4c(a, b) { + Xrb(a.c.b, b.c, b); + } + function s4c(a, b) { + Xrb(a.c.c, b.b, b); + } + function B3c(a, b, c) { + Shb(a.d, b.f, c); + } + function kKb(a, b, c, d) { + jKb(a, d, b, c); + } + function E3b(a, b, c, d) { + J3b(d, a, b, c); + } + function e9b(a, b, c, d) { + f9b(d, a, b, c); + } + function g3c(a, b) { + a.a = b.g; + return a; + } + function DQd(a, b) { + return qA(a.a, b); + } + function nQd(a) { + return a.b ? a.b : a.a; + } + function $Oc(a) { + return (a.c + a.a) / 2; + } + function Pgd() { + Pgd = ccb; + Ogd = new Ahd(); + } + function AFd() { + AFd = ccb; + zFd = new BFd(); + } + function tFd() { + tFd = ccb; + sFd = new vFd(); + } + function EFd() { + EFd = ccb; + DFd = new GFd(); + } + function yFd() { + yFd = ccb; + xFd = new oUd(); + } + function JFd() { + JFd = ccb; + IFd = new cZd(); + } + function nRd() { + nRd = ccb; + mRd = new u4d(); + } + function LRd() { + LRd = ccb; + KRd = new y4d(); + } + function g5d() { + g5d = ccb; + f5d = new h5d(); + } + function Q6d() { + Q6d = ccb; + P6d = new U6d(); + } + function pEd() { + pEd = ccb; + oEd = new Lqb(); + } + function tZd() { + tZd = ccb; + rZd = new Rkb(); + } + function Xge() { + Xge = ccb; + Wge = new dhe(); + } + function Hz(a) { + $wnd.clearTimeout(a); + } + function jw(a) { + this.a = BD(Qb(a), 224); + } + function Lv(a) { + return BD(a, 42).cd(); + } + function sib(a) { + return a.b < a.d.gc(); + } + function Lpb(a, b) { + return tqb(a.a, b); + } + function Dbb(a, b) { + return ybb(a, b) > 0; + } + function Gbb(a, b) { + return ybb(a, b) < 0; + } + function Crb(a, b) { + return a.a.get(b); + } + function icb(b, a) { + return a.split(b); + } + function Vrb(a, b) { + return Mhb(a.e, b); + } + function Nvb(a) { + return uCb(a), false; + } + function Rub(a) { + Kub.call(this, a, 21); + } + function wcb(a, b) { + Zy.call(this, a, b); + } + function mxb(a, b) { + $r.call(this, a, b); + } + function Gyb(a, b) { + $r.call(this, a, b); + } + function zx(a) { + yx(); + Wn.call(this, a); + } + function zlb(a, b) { + Dlb(a, a.length, b); + } + function Alb(a, b) { + Flb(a, a.length, b); + } + function ABb(a, b, c) { + b.ud(a.a.Ge(c)); + } + function uBb(a, b, c) { + b.we(a.a.Fe(c)); + } + function GBb(a, b, c) { + b.td(a.a.Kb(c)); + } + function Zq(a, b, c) { + a.Mb(c) && b.td(c); + } + function aCb(a, b, c) { + a.splice(b, 0, c); + } + function lDb(a, b) { + return uqb(a.e, b); + } + function pjb(a, b) { + this.d = a; + this.e = b; + } + function kqb(a, b) { + this.b = a; + this.a = b; + } + function VBb(a, b) { + this.b = a; + this.a = b; + } + function BEb(a, b) { + this.b = a; + this.a = b; + } + function sBb(a, b) { + this.a = a; + this.b = b; + } + function yBb(a, b) { + this.a = a; + this.b = b; + } + function EBb(a, b) { + this.a = a; + this.b = b; + } + function KBb(a, b) { + this.a = a; + this.b = b; + } + function aDb(a, b) { + this.a = a; + this.b = b; + } + function tMb(a, b) { + this.b = a; + this.a = b; + } + function oOb(a, b) { + this.b = a; + this.a = b; + } + function SOb(a, b) { + $r.call(this, a, b); + } + function SMb(a, b) { + $r.call(this, a, b); + } + function NEb(a, b) { + $r.call(this, a, b); + } + function VEb(a, b) { + $r.call(this, a, b); + } + function sFb(a, b) { + $r.call(this, a, b); + } + function hHb(a, b) { + $r.call(this, a, b); + } + function OHb(a, b) { + $r.call(this, a, b); + } + function FIb(a, b) { + $r.call(this, a, b); + } + function wLb(a, b) { + $r.call(this, a, b); + } + function YRb(a, b) { + $r.call(this, a, b); + } + function zTb(a, b) { + $r.call(this, a, b); + } + function rUb(a, b) { + $r.call(this, a, b); + } + function oWb(a, b) { + $r.call(this, a, b); + } + function SXb(a, b) { + $r.call(this, a, b); + } + function k0b(a, b) { + $r.call(this, a, b); + } + function z5b(a, b) { + $r.call(this, a, b); + } + function T8b(a, b) { + $r.call(this, a, b); + } + function ibc(a, b) { + $r.call(this, a, b); + } + function Cec(a, b) { + this.a = a; + this.b = b; + } + function rfc(a, b) { + this.a = a; + this.b = b; + } + function Rfc(a, b) { + this.a = a; + this.b = b; + } + function Tfc(a, b) { + this.a = a; + this.b = b; + } + function bgc(a, b) { + this.a = a; + this.b = b; + } + function ngc(a, b) { + this.a = a; + this.b = b; + } + function Qhc(a, b) { + this.a = a; + this.b = b; + } + function $hc(a, b) { + this.a = a; + this.b = b; + } + function Z0b(a, b) { + this.a = a; + this.b = b; + } + function ZVb(a, b) { + this.b = a; + this.a = b; + } + function Dfc(a, b) { + this.b = a; + this.a = b; + } + function dgc(a, b) { + this.b = a; + this.a = b; + } + function Bmc(a, b) { + this.b = a; + this.a = b; + } + function cWb(a, b) { + this.c = a; + this.d = b; + } + function I$b(a, b) { + this.e = a; + this.d = b; + } + function Unc(a, b) { + this.a = a; + this.b = b; + } + function Oic(a, b) { + this.b = b; + this.c = a; + } + function Bjc(a, b) { + $r.call(this, a, b); + } + function Yjc(a, b) { + $r.call(this, a, b); + } + function Gkc(a, b) { + $r.call(this, a, b); + } + function Bpc(a, b) { + $r.call(this, a, b); + } + function Jpc(a, b) { + $r.call(this, a, b); + } + function Tpc(a, b) { + $r.call(this, a, b); + } + function cqc(a, b) { + $r.call(this, a, b); + } + function oqc(a, b) { + $r.call(this, a, b); + } + function yqc(a, b) { + $r.call(this, a, b); + } + function Hqc(a, b) { + $r.call(this, a, b); + } + function Uqc(a, b) { + $r.call(this, a, b); + } + function arc(a, b) { + $r.call(this, a, b); + } + function mrc(a, b) { + $r.call(this, a, b); + } + function zrc(a, b) { + $r.call(this, a, b); + } + function Prc(a, b) { + $r.call(this, a, b); + } + function Yrc(a, b) { + $r.call(this, a, b); + } + function fsc(a, b) { + $r.call(this, a, b); + } + function nsc(a, b) { + $r.call(this, a, b); + } + function nzc(a, b) { + $r.call(this, a, b); + } + function zzc(a, b) { + $r.call(this, a, b); + } + function Kzc(a, b) { + $r.call(this, a, b); + } + function Xzc(a, b) { + $r.call(this, a, b); + } + function Dtc(a, b) { + $r.call(this, a, b); + } + function lAc(a, b) { + $r.call(this, a, b); + } + function uAc(a, b) { + $r.call(this, a, b); + } + function CAc(a, b) { + $r.call(this, a, b); + } + function LAc(a, b) { + $r.call(this, a, b); + } + function UAc(a, b) { + $r.call(this, a, b); + } + function aBc(a, b) { + $r.call(this, a, b); + } + function uBc(a, b) { + $r.call(this, a, b); + } + function DBc(a, b) { + $r.call(this, a, b); + } + function MBc(a, b) { + $r.call(this, a, b); + } + function sGc(a, b) { + $r.call(this, a, b); + } + function VIc(a, b) { + $r.call(this, a, b); + } + function EIc(a, b) { + this.b = a; + this.a = b; + } + function qKc(a, b) { + this.a = a; + this.b = b; + } + function GKc(a, b) { + this.a = a; + this.b = b; + } + function lLc(a, b) { + this.a = a; + this.b = b; + } + function mMc(a, b) { + this.a = a; + this.b = b; + } + function fMc(a, b) { + $r.call(this, a, b); + } + function ZLc(a, b) { + $r.call(this, a, b); + } + function ZMc(a, b) { + this.b = a; + this.d = b; + } + function IOc(a, b) { + $r.call(this, a, b); + } + function GQc(a, b) { + $r.call(this, a, b); + } + function PQc(a, b) { + this.a = a; + this.b = b; + } + function RQc(a, b) { + this.a = a; + this.b = b; + } + function ARc(a, b) { + $r.call(this, a, b); + } + function rSc(a, b) { + $r.call(this, a, b); + } + function TTc(a, b) { + $r.call(this, a, b); + } + function _Tc(a, b) { + $r.call(this, a, b); + } + function RUc(a, b) { + $r.call(this, a, b); + } + function uVc(a, b) { + $r.call(this, a, b); + } + function hWc(a, b) { + $r.call(this, a, b); + } + function rWc(a, b) { + $r.call(this, a, b); + } + function kXc(a, b) { + $r.call(this, a, b); + } + function uXc(a, b) { + $r.call(this, a, b); + } + function AYc(a, b) { + $r.call(this, a, b); + } + function l$c(a, b) { + $r.call(this, a, b); + } + function Z$c(a, b) { + $r.call(this, a, b); + } + function D_c(a, b) { + $r.call(this, a, b); + } + function O_c(a, b) { + $r.call(this, a, b); + } + function c1c(a, b) { + $r.call(this, a, b); + } + function cVb(a, b) { + return uqb(a.c, b); + } + function nnc(a, b) { + return uqb(b.b, a); + } + function x1c(a, b) { + return -a.b.Je(b); + } + function D3c(a, b) { + return uqb(a.g, b); + } + function O5c(a, b) { + $r.call(this, a, b); + } + function a6c(a, b) { + $r.call(this, a, b); + } + function m2c(a, b) { + this.a = a; + this.b = b; + } + function W2c(a, b) { + this.a = a; + this.b = b; + } + function f7c(a, b) { + this.a = a; + this.b = b; + } + function G7c(a, b) { + $r.call(this, a, b); + } + function j8c(a, b) { + $r.call(this, a, b); + } + function iad(a, b) { + $r.call(this, a, b); + } + function rad(a, b) { + $r.call(this, a, b); + } + function Bad(a, b) { + $r.call(this, a, b); + } + function Nad(a, b) { + $r.call(this, a, b); + } + function ibd(a, b) { + $r.call(this, a, b); + } + function tbd(a, b) { + $r.call(this, a, b); + } + function Ibd(a, b) { + $r.call(this, a, b); + } + function Ubd(a, b) { + $r.call(this, a, b); + } + function gcd(a, b) { + $r.call(this, a, b); + } + function scd(a, b) { + $r.call(this, a, b); + } + function Ycd(a, b) { + $r.call(this, a, b); + } + function udd(a, b) { + $r.call(this, a, b); + } + function Jdd(a, b) { + $r.call(this, a, b); + } + function Eed(a, b) { + $r.call(this, a, b); + } + function bfd(a, b) { + this.a = a; + this.b = b; + } + function dfd(a, b) { + this.a = a; + this.b = b; + } + function ffd(a, b) { + this.a = a; + this.b = b; + } + function Kfd(a, b) { + this.a = a; + this.b = b; + } + function Mfd(a, b) { + this.a = a; + this.b = b; + } + function Ofd(a, b) { + this.a = a; + this.b = b; + } + function vgd(a, b) { + this.a = a; + this.b = b; + } + function qgd(a, b) { + $r.call(this, a, b); + } + function jrd(a, b) { + this.a = a; + this.b = b; + } + function krd(a, b) { + this.a = a; + this.b = b; + } + function mrd(a, b) { + this.a = a; + this.b = b; + } + function nrd(a, b) { + this.a = a; + this.b = b; + } + function qrd(a, b) { + this.a = a; + this.b = b; + } + function rrd(a, b) { + this.a = a; + this.b = b; + } + function srd(a, b) { + this.b = a; + this.a = b; + } + function trd(a, b) { + this.b = a; + this.a = b; + } + function Drd(a, b) { + this.b = a; + this.a = b; + } + function Frd(a, b) { + this.b = a; + this.a = b; + } + function Hrd(a, b) { + this.a = a; + this.b = b; + } + function Jrd(a, b) { + this.a = a; + this.b = b; + } + function Ord(a, b) { + Xqd(a.a, BD(b, 56)); + } + function BIc(a, b) { + gIc(a.a, BD(b, 11)); + } + function fIc(a, b) { + FHc(); + return b != a; + } + function Arb() { + wrb(); + return new vrb(); + } + function CMc() { + wMc(); + this.b = new Tqb(); + } + function NNc() { + FNc(); + this.a = new Tqb(); + } + function eCc() { + ZBc(); + aCc.call(this); + } + function Dsd(a, b) { + $r.call(this, a, b); + } + function Urd(a, b) { + this.a = a; + this.b = b; + } + function Wrd(a, b) { + this.a = a; + this.b = b; + } + function kGd(a, b) { + this.a = a; + this.b = b; + } + function nGd(a, b) { + this.a = a; + this.b = b; + } + function bUd(a, b) { + this.a = a; + this.b = b; + } + function zVd(a, b) { + this.a = a; + this.b = b; + } + function C1d(a, b) { + this.d = a; + this.b = b; + } + function MLd(a, b) { + this.d = a; + this.e = b; + } + function Wud(a, b) { + this.f = a; + this.c = b; + } + function f7d(a, b) { + this.b = a; + this.c = b; + } + function _zd(a, b) { + this.i = a; + this.g = b; + } + function Y1d(a, b) { + this.e = a; + this.a = b; + } + function c8d(a, b) { + this.a = a; + this.b = b; + } + function $Id(a, b) { + a.i = null; + _Id(a, b); + } + function ivd(a, b) { + !!a && Rhb(cvd, a, b); + } + function hCd(a, b) { + return qAd(a.a, b); + } + function e7d(a) { + return R2d(a.c, a.b); + } + function Wd(a) { + return !a ? null : a.dd(); + } + function PD(a) { + return a == null ? null : a; + } + function KD(a) { + return typeof a === Khe; + } + function LD(a) { + return typeof a === Lhe; + } + function ND(a) { + return typeof a === Mhe; + } + function Em(a, b) { + return a.Hd().Xb(b); + } + function Kq(a, b) { + return hr(a.Kc(), b); + } + function Bbb(a, b) { + return ybb(a, b) == 0; + } + function Ebb(a, b) { + return ybb(a, b) >= 0; + } + function Kbb(a, b) { + return ybb(a, b) != 0; + } + function Jdb(a) { + return "" + (uCb(a), a); + } + function pfb(a, b) { + return a.substr(b); + } + function cg(a) { + ag(a); + return a.d.gc(); + } + function oVb(a) { + pVb(a, a.c); + return a; + } + function RD(a) { + CCb(a == null); + return a; + } + function Dfb(a, b) { + a.a += "" + b; + return a; + } + function Efb(a, b) { + a.a += "" + b; + return a; + } + function Nfb(a, b) { + a.a += "" + b; + return a; + } + function Pfb(a, b) { + a.a += "" + b; + return a; + } + function Qfb(a, b) { + a.a += "" + b; + return a; + } + function Mfb(a, b) { + return a.a += "" + b, a; + } + function Esb(a, b) { + Gsb(a, b, a.a, a.a.a); + } + function Fsb(a, b) { + Gsb(a, b, a.c.b, a.c); + } + function Mqd(a, b, c) { + Rpd(b, kqd(a, c)); + } + function Nqd(a, b, c) { + Rpd(b, kqd(a, c)); + } + function Dhe(a, b) { + Hhe(new Fyd(a), b); + } + function cB(a, b) { + a.q.setTime(Sbb(b)); + } + function fvb(a, b) { + bvb.call(this, a, b); + } + function jvb(a, b) { + bvb.call(this, a, b); + } + function nvb(a, b) { + bvb.call(this, a, b); + } + function Nqb(a) { + Uhb(this); + Ld(this, a); + } + function wmb(a) { + tCb(a, 0); + return null; + } + function X6c(a) { + a.a = 0; + a.b = 0; + return a; + } + function f3c(a, b) { + a.a = b.g + 1; + return a; + } + function PJc(a, b) { + return a.j[b.p] == 2; + } + function _Pb(a) { + return VPb(BD(a, 79)); + } + function yJb() { + yJb = ccb; + xJb = as(wJb()); + } + function Y8b() { + Y8b = ccb; + X8b = as(W8b()); + } + function mt() { + this.b = new Mqb(Cv(12)); + } + function Otb() { + this.b = 0; + this.a = false; + } + function Wtb() { + this.b = 0; + this.a = false; + } + function sl(a) { + this.a = a; + ol.call(this); + } + function vl(a) { + this.a = a; + ol.call(this); + } + function Nsd(a, b) { + Msd.call(this, a, b); + } + function $zd(a, b) { + Cyd.call(this, a, b); + } + function nNd(a, b) { + _zd.call(this, a, b); + } + function s4d(a, b) { + p4d.call(this, a, b); + } + function w4d(a, b) { + qRd.call(this, a, b); + } + function rEd(a, b) { + pEd(); + Rhb(oEd, a, b); + } + function lcb(a, b) { + return qfb(a.a, 0, b); + } + function ww(a, b) { + return a.a.a.a.cc(b); + } + function mb(a, b) { + return PD(a) === PD(b); + } + function Mdb(a, b) { + return Kdb(a.a, b.a); + } + function $db(a, b) { + return beb(a.a, b.a); + } + function seb(a, b) { + return ueb(a.a, b.a); + } + function hfb(a, b) { + return a.indexOf(b); + } + function Ny(a, b) { + return a == b ? 0 : a ? 1 : -1; + } + function kB(a) { + return a < 10 ? "0" + a : "" + a; + } + function Mq(a) { + return Qb(a), new sl(a); + } + function SC(a) { + return TC(a.l, a.m, a.h); + } + function Hdb(a) { + return QD((uCb(a), a)); + } + function Idb(a) { + return QD((uCb(a), a)); + } + function NIb(a, b) { + return beb(a.g, b.g); + } + function Fbb(a) { + return typeof a === Lhe; + } + function mWb(a) { + return a == hWb || a == kWb; + } + function nWb(a) { + return a == hWb || a == iWb; + } + function G1b(a) { + return Jkb(a.b.b, a, 0); + } + function lrb(a) { + this.a = Arb(); + this.b = a; + } + function Frb(a) { + this.a = Arb(); + this.b = a; + } + function swb(a, b) { + Ekb(a.a, b); + return b; + } + function Z1c(a, b) { + Ekb(a.c, b); + return a; + } + function E2c(a, b) { + d3c(a.a, b); + return a; + } + function _gc(a, b) { + Hgc(); + return b.a += a; + } + function bhc(a, b) { + Hgc(); + return b.a += a; + } + function ahc(a, b) { + Hgc(); + return b.c += a; + } + function Nlb(a, b) { + Klb(a, 0, a.length, b); + } + function zsb() { + Wqb.call(this, new $rb()); + } + function I_b() { + B_b.call(this, 0, 0, 0, 0); + } + function I6c() { + J6c.call(this, 0, 0, 0, 0); + } + function g7c(a) { + this.a = a.a; + this.b = a.b; + } + function fad(a) { + return a == aad || a == bad; + } + function gad(a) { + return a == dad || a == _9c; + } + function Jzc(a) { + return a == Fzc || a == Ezc; + } + function fcd(a) { + return a != bcd && a != ccd; + } + function oid(a) { + return a.Lg() && a.Mg(); + } + function Gfd(a) { + return Kkd(BD(a, 118)); + } + function k3c(a) { + return d3c(new j3c(), a); + } + function y2d(a, b) { + return new p4d(b, a); + } + function z2d(a, b) { + return new p4d(b, a); + } + function ukd(a, b, c) { + vkd(a, b); + wkd(a, c); + } + function _kd(a, b, c) { + cld(a, b); + ald(a, c); + } + function bld(a, b, c) { + dld(a, b); + eld(a, c); + } + function gmd(a, b, c) { + hmd(a, b); + imd(a, c); + } + function nmd(a, b, c) { + omd(a, b); + pmd(a, c); + } + function iKd(a, b) { + $Jd(a, b); + _Jd(a, a.D); + } + function _ud(a) { + Wud.call(this, a, true); + } + function Xg(a, b, c) { + Vg.call(this, a, b, c); + } + function Ygb(a) { + Hgb(); + Zgb.call(this, a); + } + function rxb() { + mxb.call(this, "Head", 1); + } + function wxb() { + mxb.call(this, "Tail", 3); + } + function Ckb(a) { + a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + function Vjb(a) { + a.a = KC(SI, Uhe, 1, 8, 5, 1); + } + function MGb(a) { + Hkb(a.xf(), new QGb(a)); + } + function xtb(a) { + return a != null ? tb(a) : 0; + } + function b2b(a, b) { + return ntd(b, mpd(a)); + } + function c2b(a, b) { + return ntd(b, mpd(a)); + } + function dAb(a, b) { + return a[a.length] = b; + } + function gAb(a, b) { + return a[a.length] = b; + } + function Vq(a) { + return lr(a.b.Kc(), a.a); + } + function dqd(a, b) { + return _o(qo(a.d), b); + } + function eqd(a, b) { + return _o(qo(a.g), b); + } + function fqd(a, b) { + return _o(qo(a.j), b); + } + function Osd(a, b) { + Msd.call(this, a.b, b); + } + function q0b(a) { + B_b.call(this, a, a, a, a); + } + function HOb(a) { + a.b && LOb(a); + return a.a; + } + function IOb(a) { + a.b && LOb(a); + return a.c; + } + function uyb(a, b) { + if (lyb) { + return; + } + a.b = b; + } + function lzd(a, b, c) { + NC(a, b, c); + return c; + } + function mBc(a, b, c) { + NC(a.c[b.g], b.g, c); + } + function _Hd(a, b, c) { + BD(a.c, 69).Xh(b, c); + } + function wfd(a, b, c) { + bld(c, c.i + a, c.j + b); + } + function UOd(a, b) { + wtd(VKd(a.a), XOd(b)); + } + function bTd(a, b) { + wtd(QSd(a.a), eTd(b)); + } + function Lge(a) { + wfe(); + xfe.call(this, a); + } + function CAd(a) { + return a == null ? 0 : tb(a); + } + function fNc() { + fNc = ccb; + eNc = new Rpb(v1); + } + function h0d() { + h0d = ccb; + new i0d(); + new Rkb(); + } + function i0d() { + new Lqb(); + new Lqb(); + new Lqb(); + } + function GA() { + GA = ccb; + fA(); + FA = new Lqb(); + } + function Iy() { + Iy = ccb; + $wnd.Math.log(2); + } + function UVd() { + UVd = ccb; + TVd = (AFd(), zFd); + } + function _ge() { + throw vbb(new cgb(Cxe)); + } + function ohe() { + throw vbb(new cgb(Cxe)); + } + function che() { + throw vbb(new cgb(Dxe)); + } + function rhe() { + throw vbb(new cgb(Dxe)); + } + function Mg(a) { + this.a = a; + Gg.call(this, a); + } + function up(a) { + this.a = a; + rf.call(this, a); + } + function Bp(a) { + this.a = a; + rf.call(this, a); + } + function Okb(a, b) { + Mlb(a.c, a.c.length, b); + } + function llb(a) { + return a.a < a.c.c.length; + } + function Eqb(a) { + return a.a < a.c.a.length; + } + function Ntb(a, b) { + return a.a ? a.b : b.De(); + } + function beb(a, b) { + return a < b ? -1 : a > b ? 1 : 0; + } + function Deb(a, b) { + return ybb(a, b) > 0 ? a : b; + } + function TC(a, b, c) { + return { l: a, m: b, h: c }; + } + function Ctb(a, b) { + a.a != null && BIc(b, a.a); + } + function Csb(a) { + a.a = new jtb(); + a.c = new jtb(); + } + function hDb(a) { + this.b = a; + this.a = new Rkb(); + } + function dOb(a) { + this.b = new pOb(); + this.a = a; + } + function q_b(a) { + n_b.call(this); + this.a = a; + } + function txb() { + mxb.call(this, "Range", 2); + } + function bUb() { + ZTb(); + this.a = new L2c(zP); + } + function Bh(a, b) { + Qb(b); + Ah(a).Jc(new Vw()); + } + function fKc(a, b) { + FJc(); + return b.n.b += a; + } + function Tgc(a, b, c) { + return Rhb(a.g, c, b); + } + function LJc(a, b, c) { + return Rhb(a.k, c, b); + } + function r1c(a, b) { + return Rhb(a.a, b.a, b); + } + function jBc(a, b, c) { + return hBc(b, c, a.c); + } + function E6c(a) { + return new f7c(a.c, a.d); + } + function F6c(a) { + return new f7c(a.c, a.d); + } + function R6c(a) { + return new f7c(a.a, a.b); + } + function CQd(a, b) { + return hA(a.a, b, null); + } + function fec(a) { + QZb(a, null); + RZb(a, null); + } + function AOc(a) { + BOc(a, null); + COc(a, null); + } + function u4d() { + qRd.call(this, null, null); + } + function y4d() { + RRd.call(this, null, null); + } + function a7d(a) { + this.a = a; + Lqb.call(this); + } + function Pp(a) { + this.b = (mmb(), new iob(a)); + } + function Py(a) { + a.j = KC(VI, nie, 310, 0, 0, 1); + } + function oAd(a, b, c) { + a.c.Vc(b, BD(c, 133)); + } + function GAd(a, b, c) { + a.c.ji(b, BD(c, 133)); + } + function JLd(a, b) { + Uxd(a); + a.Gc(BD(b, 15)); + } + function b7d(a, b) { + return t2d(a.c, a.b, b); + } + function Bv(a, b) { + return new Qv(a.Kc(), b); + } + function Lq(a, b) { + return rr(a.Kc(), b) != -1; + } + function Sqb(a, b) { + return a.a.Bc(b) != null; + } + function pr(a) { + return a.Ob() ? a.Pb() : null; + } + function yfb(a) { + return zfb(a, 0, a.length); + } + function JD(a, b) { + return a != null && AD(a, b); + } + function $A(a, b) { + a.q.setHours(b); + YA(a, b); + } + function Yrb(a, b) { + if (a.c) { + jsb(b); + isb(b); + } + } + function nk(a, b, c) { + BD(a.Kb(c), 164).Nb(b); + } + function RJc(a, b, c) { + SJc(a, b, c); + return c; + } + function Eub(a, b, c) { + a.a = b ^ 1502; + a.b = c ^ kke; + } + function xHb(a, b, c) { + return a.a[b.g][c.g]; + } + function REc(a, b) { + return a.a[b.c.p][b.p]; + } + function aEc(a, b) { + return a.e[b.c.p][b.p]; + } + function tEc(a, b) { + return a.c[b.c.p][b.p]; + } + function OJc(a, b) { + return a.j[b.p] = aKc(b); + } + function k5c(a, b) { + return cfb(a.f, b.tg()); + } + function Isd(a, b) { + return cfb(a.b, b.tg()); + } + function Sfd(a, b) { + return a.a < Kcb(b) ? -1 : 1; + } + function ZDc(a, b, c) { + return c ? b != 0 : b != a - 1; + } + function _6c(a, b, c) { + a.a = b; + a.b = c; + return a; + } + function Y6c(a, b) { + a.a *= b; + a.b *= b; + return a; + } + function mud(a, b, c) { + NC(a.g, b, c); + return c; + } + function CHb(a, b, c, d) { + NC(a.a[b.g], c.g, d); + } + function EQb(a, b) { + O6c(b, a.a.a.a, a.a.a.b); + } + function Ozd(a) { + a.a = BD(Ajd(a.b.a, 4), 126); + } + function Wzd(a) { + a.a = BD(Ajd(a.b.a, 4), 126); + } + function otd(a) { + ytb(a, hue); + Rld(a, gtd(a)); + } + function Atb() { + Atb = ccb; + ztb = new Ftb(null); + } + function Ivb() { + Ivb = ccb; + Ivb(); + Hvb = new Ovb(); + } + function FId() { + this.Bb |= 256; + this.Bb |= 512; + } + function Fyd(a) { + this.i = a; + this.f = this.i.j; + } + function xMd(a, b, c) { + pMd.call(this, a, b, c); + } + function BMd(a, b, c) { + xMd.call(this, a, b, c); + } + function K4d(a, b, c) { + xMd.call(this, a, b, c); + } + function N4d(a, b, c) { + BMd.call(this, a, b, c); + } + function X4d(a, b, c) { + pMd.call(this, a, b, c); + } + function _4d(a, b, c) { + pMd.call(this, a, b, c); + } + function C4d(a, b, c) { + k2d.call(this, a, b, c); + } + function G4d(a, b, c) { + k2d.call(this, a, b, c); + } + function I4d(a, b, c) { + C4d.call(this, a, b, c); + } + function c5d(a, b, c) { + X4d.call(this, a, b, c); + } + function zf(a, b) { + this.a = a; + rf.call(this, b); + } + function aj(a, b) { + this.a = a; + pc.call(this, b); + } + function kj(a, b) { + this.a = a; + pc.call(this, b); + } + function Jj(a, b) { + this.a = a; + pc.call(this, b); + } + function Rj(a) { + this.a = a; + sj.call(this, a.d); + } + function she(a) { + this.c = a; + this.a = this.c.a; + } + function xl(a, b) { + this.a = b; + pc.call(this, a); + } + function Qo(a, b) { + this.a = b; + Lo.call(this, a); + } + function op(a, b) { + this.a = a; + Lo.call(this, b); + } + function rj(a, b) { + return Rl(Xm(a.c)).Xb(b); + } + function Eb(a, b) { + return Db(a, new Ufb(), b).a; + } + function ur(a, b) { + Qb(b); + return new Gr(a, b); + } + function Gr(a, b) { + this.a = b; + Br.call(this, a); + } + function Hs(a) { + this.b = a; + this.a = this.b.a.e; + } + function Eg(a) { + a.b.Qb(); + --a.d.f.d; + bg(a.d); + } + function Uk(a) { + Fk.call(this, BD(Qb(a), 35)); + } + function il(a) { + Fk.call(this, BD(Qb(a), 35)); + } + function is() { + $r.call(this, "INSTANCE", 0); + } + function Lb(a) { + if (!a) { + throw vbb(new Vdb()); + } + } + function Ub(a) { + if (!a) { + throw vbb(new Ydb()); + } + } + function ot(a) { + if (!a) { + throw vbb(new utb()); + } + } + function I6d() { + I6d = ccb; + g5d(); + H6d = new J6d(); + } + function Bcb() { + Bcb = ccb; + zcb = false; + Acb = true; + } + function Jfb(a) { + mcb.call(this, (uCb(a), a)); + } + function Wfb(a) { + mcb.call(this, (uCb(a), a)); + } + function Inb(a) { + lnb.call(this, a); + this.a = a; + } + function Xnb(a) { + Dnb.call(this, a); + this.a = a; + } + function Zob(a) { + zob.call(this, a); + this.a = a; + } + function Xy() { + Py(this); + Ry(this); + this._d(); + } + function Qv(a, b) { + this.a = b; + Br.call(this, a); + } + function au(a, b) { + return new xu(a.a, a.b, b); + } + function kfb(a, b) { + return a.lastIndexOf(b); + } + function ifb(a, b, c) { + return a.indexOf(b, c); + } + function xfb(a) { + return a == null ? Xhe : fcb(a); + } + function nz(a) { + return a == null ? null : a.name; + } + function Etb(a) { + return a.a != null ? a.a : null; + } + function or(a) { + return Wsb(a.a) ? nr(a) : null; + } + function Fxb(a, b) { + return Jwb(a.a, b) != null; + } + function uqb(a, b) { + return !!b && a.b[b.g] == b; + } + function FCb(a) { + return a.$H || (a.$H = ++ECb); + } + function aD(a) { + return a.l + a.m * Hje + a.h * Ije; + } + function pDb(a, b) { + Ekb(b.a, a.a); + return a.a; + } + function vDb(a, b) { + Ekb(b.b, a.a); + return a.a; + } + function nGb(a, b) { + Ekb(b.a, a.a); + return a.a; + } + function Btb(a) { + sCb(a.a != null); + return a.a; + } + function Asb(a) { + Wqb.call(this, new _rb(a)); + } + function GUb(a, b) { + HUb.call(this, a, b, null); + } + function cxb(a) { + this.a = a; + Bjb.call(this, a); + } + function CKb() { + CKb = ccb; + BKb = new Msd(tle, 0); + } + function NFb(a, b) { + ++a.b; + return Ekb(a.a, b); + } + function OFb(a, b) { + ++a.b; + return Lkb(a.a, b); + } + function n6b(a, b) { + return Kdb(a.n.a, b.n.a); + } + function WKb(a, b) { + return Kdb(a.c.d, b.c.d); + } + function gLb(a, b) { + return Kdb(a.c.c, b.c.c); + } + function zXb(a, b) { + return BD(Qc(a.b, b), 15); + } + function s7b(a, b) { + return a.n.b = (uCb(b), b); + } + function t7b(a, b) { + return a.n.b = (uCb(b), b); + } + function a1b(a) { + return llb(a.a) || llb(a.b); + } + function fBc(a, b, c) { + return gBc(a, b, c, a.b); + } + function iBc(a, b, c) { + return gBc(a, b, c, a.c); + } + function i3c(a, b, c) { + BD(B2c(a, b), 21).Fc(c); + } + function xBd(a, b, c) { + vAd(a.a, c); + uAd(a.a, b); + } + function qRd(a, b) { + nRd(); + this.a = a; + this.b = b; + } + function RRd(a, b) { + LRd(); + this.b = a; + this.c = b; + } + function hhd(a, b) { + Rgd(); + this.f = b; + this.d = a; + } + function qc(a, b) { + Sb(b, a); + this.d = a; + this.c = b; + } + function n5b(a) { + var b; + b = a.a; + a.a = a.b; + a.b = b; + } + function chc(a) { + Hgc(); + return !!a && !a.dc(); + } + function Afe(a) { + return new lge(3, a); + } + function jm(a, b) { + return new Vp(a, a.gc(), b); + } + function ns(a) { + hs(); + return es((qs(), ps), a); + } + function Oyd(a) { + this.d = a; + Fyd.call(this, a); + } + function $yd(a) { + this.c = a; + Fyd.call(this, a); + } + function bzd(a) { + this.c = a; + Oyd.call(this, a); + } + function sgc() { + qgc(); + this.b = new ygc(this); + } + function Pu(a) { + Xj(a, Jie); + return new Skb(a); + } + function Vz(a) { + Rz(); + return parseInt(a) || -1; + } + function qfb(a, b, c) { + return a.substr(b, c - b); + } + function gfb(a, b, c) { + return ifb(a, wfb(b), c); + } + function Pkb(a) { + return ZBb(a.c, a.c.length); + } + function Yr(a) { + return a.f != null ? a.f : "" + a.g; + } + function Zr(a) { + return a.f != null ? a.f : "" + a.g; + } + function Hsb(a) { + sCb(a.b != 0); + return a.a.a.c; + } + function Isb(a) { + sCb(a.b != 0); + return a.c.b.c; + } + function Cmd(a) { + JD(a, 150) && BD(a, 150).Gh(); + } + function Wwb(a) { + return a.b = BD(tib(a.a), 42); + } + function Ptb(a) { + Ltb(); + this.b = a; + this.a = true; + } + function Xtb(a) { + Utb(); + this.b = a; + this.a = true; + } + function Trb(a) { + a.d = new ksb(a); + a.e = new Lqb(); + } + function mkb(a) { + if (!a) { + throw vbb(new Apb()); + } + } + function lCb(a) { + if (!a) { + throw vbb(new Vdb()); + } + } + function yCb(a) { + if (!a) { + throw vbb(new Ydb()); + } + } + function qCb(a) { + if (!a) { + throw vbb(new tcb()); + } + } + function sCb(a) { + if (!a) { + throw vbb(new utb()); + } + } + function ksb(a) { + lsb.call(this, a, null, null); + } + function dPb() { + $r.call(this, "POLYOMINO", 0); + } + function Cg(a, b, c, d) { + qg.call(this, a, b, c, d); + } + function zkc(a, b) { + gkc(); + return Rc(a, b.e, b); + } + function azc(a, b, c) { + Vyc(); + return c.qg(a, b); + } + function wNb(a, b) { + return !!a.q && Mhb(a.q, b); + } + function JRb(a, b) { + return a > 0 ? b * b / a : b * b * 100; + } + function CRb(a, b) { + return a > 0 ? b / (a * a) : b * 100; + } + function G2c(a, b, c) { + return Ekb(b, I2c(a, c)); + } + function t3c(a, b, c) { + p3c(); + a.Xe(b) && c.td(a); + } + function St(a, b, c) { + var d; + d = a.Zc(b); + d.Rb(c); + } + function O6c(a, b, c) { + a.a += b; + a.b += c; + return a; + } + function Z6c(a, b, c) { + a.a *= b; + a.b *= c; + return a; + } + function b7c(a, b, c) { + a.a -= b; + a.b -= c; + return a; + } + function a7c(a, b) { + a.a = b.a; + a.b = b.b; + return a; + } + function V6c(a) { + a.a = -a.a; + a.b = -a.b; + return a; + } + function Dic(a) { + this.c = a; + this.a = 1; + this.b = 1; + } + function xed(a) { + this.c = a; + dld(a, 0); + eld(a, 0); + } + function u7c(a) { + Psb.call(this); + n7c(this, a); + } + function AXb(a) { + xXb(); + yXb(this); + this.mf(a); + } + function GRd(a, b) { + nRd(); + qRd.call(this, a, b); + } + function dSd(a, b) { + LRd(); + RRd.call(this, a, b); + } + function hSd(a, b) { + LRd(); + RRd.call(this, a, b); + } + function fSd(a, b) { + LRd(); + dSd.call(this, a, b); + } + function sId(a, b, c) { + dId.call(this, a, b, c, 2); + } + function zXd(a, b) { + UVd(); + nXd.call(this, a, b); + } + function BXd(a, b) { + UVd(); + zXd.call(this, a, b); + } + function DXd(a, b) { + UVd(); + zXd.call(this, a, b); + } + function FXd(a, b) { + UVd(); + DXd.call(this, a, b); + } + function PXd(a, b) { + UVd(); + nXd.call(this, a, b); + } + function RXd(a, b) { + UVd(); + PXd.call(this, a, b); + } + function XXd(a, b) { + UVd(); + nXd.call(this, a, b); + } + function pAd(a, b) { + return a.c.Fc(BD(b, 133)); + } + function w1d(a, b, c) { + return V1d(p1d(a, b), c); + } + function N2d(a, b, c) { + return b.Qk(a.e, a.c, c); + } + function P2d(a, b, c) { + return b.Rk(a.e, a.c, c); + } + function a3d(a, b) { + return xid(a.e, BD(b, 49)); + } + function aTd(a, b, c) { + vtd(QSd(a.a), b, eTd(c)); + } + function TOd(a, b, c) { + vtd(VKd(a.a), b, XOd(c)); + } + function ypb(a, b) { + b.$modCount = a.$modCount; + } + function MUc() { + MUc = ccb; + LUc = new Lsd("root"); + } + function LCd() { + LCd = ccb; + KCd = new lDd(); + new NDd(); + } + function KVc() { + this.a = new Hp(); + this.b = new Hp(); + } + function FUd() { + hJd.call(this); + this.Bb |= Tje; + } + function t_c() { + $r.call(this, "GROW_TREE", 0); + } + function C9d(a) { + return a == null ? null : cde(a); + } + function G9d(a) { + return a == null ? null : jde(a); + } + function J9d(a) { + return a == null ? null : fcb(a); + } + function K9d(a) { + return a == null ? null : fcb(a); + } + function fdb(a) { + if (a.o != null) { + return; + } + vdb(a); + } + function DD(a) { + CCb(a == null || KD(a)); + return a; + } + function ED(a) { + CCb(a == null || LD(a)); + return a; + } + function GD(a) { + CCb(a == null || ND(a)); + return a; + } + function gB(a) { + this.q = new $wnd.Date(Sbb(a)); + } + function Mf(a, b) { + this.c = a; + ne.call(this, a, b); + } + function Sf(a, b) { + this.a = a; + Mf.call(this, a, b); + } + function Hg(a, b) { + this.d = a; + Dg(this); + this.b = b; + } + function bAb(a, b) { + Vzb.call(this, a); + this.a = b; + } + function vAb(a, b) { + Vzb.call(this, a); + this.a = b; + } + function sNb(a) { + pNb.call(this, 0, 0); + this.f = a; + } + function Vg(a, b, c) { + dg.call(this, a, b, c, null); + } + function Yg(a, b, c) { + dg.call(this, a, b, c, null); + } + function Pxb(a, b, c) { + return a.ue(b, c) <= 0 ? c : b; + } + function Qxb(a, b, c) { + return a.ue(b, c) <= 0 ? b : c; + } + function g4c(a, b) { + return BD(Wrb(a.b, b), 149); + } + function i4c(a, b) { + return BD(Wrb(a.c, b), 229); + } + function wic(a) { + return BD(Ikb(a.a, a.b), 287); + } + function B6c(a) { + return new f7c(a.c, a.d + a.a); + } + function eLc(a) { + return FJc(), Jzc(BD(a, 197)); + } + function $Jb() { + $Jb = ccb; + ZJb = pqb((tdd(), sdd)); + } + function fOb(a, b) { + b.a ? gOb(a, b) : Fxb(a.a, b.b); + } + function qyb(a, b) { + if (lyb) { + return; + } + Ekb(a.a, b); + } + function F2b(a, b) { + x2b(); + return f_b(b.d.i, a); + } + function _9b(a, b) { + I9b(); + return new gac(b, a); + } + function _Hb(a, b) { + ytb(b, lle); + a.f = b; + return a; + } + function Kld(a, b, c) { + c = _hd(a, b, 3, c); + return c; + } + function bmd(a, b, c) { + c = _hd(a, b, 6, c); + return c; + } + function kpd(a, b, c) { + c = _hd(a, b, 9, c); + return c; + } + function Cvd(a, b, c) { + ++a.j; + a.Ki(); + Atd(a, b, c); + } + function Avd(a, b, c) { + ++a.j; + a.Hi(b, a.oi(b, c)); + } + function bRd(a, b, c) { + var d; + d = a.Zc(b); + d.Rb(c); + } + function c7d(a, b, c) { + return C2d(a.c, a.b, b, c); + } + function DAd(a, b) { + return (b & Ohe) % a.d.length; + } + function Msd(a, b) { + Lsd.call(this, a); + this.a = b; + } + function uVd(a, b) { + lVd.call(this, a); + this.a = b; + } + function sYd(a, b) { + lVd.call(this, a); + this.a = b; + } + function zyd(a, b) { + this.c = a; + zud.call(this, b); + } + function YOd(a, b) { + this.a = a; + qOd.call(this, b); + } + function fTd(a, b) { + this.a = a; + qOd.call(this, b); + } + function Xp(a) { + this.a = (Xj(a, Jie), new Skb(a)); + } + function cq(a) { + this.a = (Xj(a, Jie), new Skb(a)); + } + function LA(a) { + !a.a && (a.a = new VA()); + return a.a; + } + function XMb(a) { + if (a > 8) { + return 0; + } + return a + 1; + } + function Ecb(a, b) { + Bcb(); + return a == b ? 0 : a ? 1 : -1; + } + function Opb(a, b, c) { + return Npb(a, BD(b, 22), c); + } + function Bz(a, b, c) { + return a.apply(b, c); + } + function Sfb(a, b, c) { + a.a += zfb(b, 0, c); + return a; + } + function ijb(a, b) { + var c; + c = a.e; + a.e = b; + return c; + } + function trb(a, b) { + var c; + c = a[hke]; + c.call(a, b); + } + function urb(a, b) { + var c; + c = a[hke]; + c.call(a, b); + } + function Aib(a, b) { + a.a.Vc(a.b, b); + ++a.b; + a.c = -1; + } + function Urb(a) { + Uhb(a.e); + a.d.b = a.d; + a.d.a = a.d; + } + function _f(a) { + a.b ? _f(a.b) : a.f.c.zc(a.e, a.d); + } + function _Ab(a, b, c) { + EAb(); + MBb(a, b.Ce(a.a, c)); + } + function Bxb(a, b) { + return Vd(Cwb(a.a, b, true)); + } + function Cxb(a, b) { + return Vd(Dwb(a.a, b, true)); + } + function _Bb(a, b) { + return eCb(new Array(b), a); + } + function HD(a) { + return String.fromCharCode(a); + } + function mz(a) { + return a == null ? null : a.message; + } + function gRb() { + this.a = new Rkb(); + this.b = new Rkb(); + } + function iTb() { + this.a = new MQb(); + this.b = new tTb(); + } + function tDb() { + this.b = new d7c(); + this.c = new Rkb(); + } + function _Qb() { + this.d = new d7c(); + this.e = new d7c(); + } + function n_b() { + this.n = new d7c(); + this.o = new d7c(); + } + function $Gb() { + this.n = new p0b(); + this.i = new I6c(); + } + function sec() { + this.a = new Umc(); + this.b = new mnc(); + } + function NIc() { + this.a = new Rkb(); + this.d = new Rkb(); + } + function LDc() { + this.b = new Tqb(); + this.a = new Tqb(); + } + function hSc() { + this.b = new Lqb(); + this.a = new Lqb(); + } + function HRc() { + this.b = new tRc(); + this.a = new hRc(); + } + function aHb() { + $Gb.call(this); + this.a = new d7c(); + } + function Ywb(a) { + Zwb.call(this, a, (lxb(), hxb)); + } + function J_b(a, b, c, d) { + B_b.call(this, a, b, c, d); + } + function sqd(a, b, c) { + c != null && kmd(b, Wqd(a, c)); + } + function tqd(a, b, c) { + c != null && lmd(b, Wqd(a, c)); + } + function Tod(a, b, c) { + c = _hd(a, b, 11, c); + return c; + } + function P6c(a, b) { + a.a += b.a; + a.b += b.b; + return a; + } + function c7c(a, b) { + a.a -= b.a; + a.b -= b.b; + return a; + } + function u7b(a, b) { + return a.n.a = (uCb(b), b) + 10; + } + function v7b(a, b) { + return a.n.a = (uCb(b), b) + 10; + } + function dLd(a, b) { + return b == a || pud(UKd(b), a); + } + function PYd(a, b) { + return Rhb(a.a, b, "") == null; + } + function E2b(a, b) { + x2b(); + return !f_b(b.d.i, a); + } + function rjc(a, b) { + fad(a.f) ? sjc(a, b) : tjc(a, b); + } + function h1d(a, b) { + var c; + c = b.Hh(a.a); + return c; + } + function Cyd(a, b) { + qcb.call(this, gve + a + mue + b); + } + function gUd(a, b, c, d) { + cUd.call(this, a, b, c, d); + } + function Q4d(a, b, c, d) { + cUd.call(this, a, b, c, d); + } + function U4d(a, b, c, d) { + Q4d.call(this, a, b, c, d); + } + function n5d(a, b, c, d) { + i5d.call(this, a, b, c, d); + } + function p5d(a, b, c, d) { + i5d.call(this, a, b, c, d); + } + function v5d(a, b, c, d) { + i5d.call(this, a, b, c, d); + } + function t5d(a, b, c, d) { + p5d.call(this, a, b, c, d); + } + function A5d(a, b, c, d) { + p5d.call(this, a, b, c, d); + } + function y5d(a, b, c, d) { + v5d.call(this, a, b, c, d); + } + function D5d(a, b, c, d) { + A5d.call(this, a, b, c, d); + } + function d6d(a, b, c, d) { + Y5d.call(this, a, b, c, d); + } + function Vp(a, b, c) { + this.a = a; + qc.call(this, b, c); + } + function tk(a, b, c) { + this.c = b; + this.b = c; + this.a = a; + } + function ik(a, b, c) { + return a.d = BD(b.Kb(c), 164); + } + function j6d(a, b) { + return a.Aj().Nh().Kh(a, b); + } + function h6d(a, b) { + return a.Aj().Nh().Ih(a, b); + } + function Fdb(a, b) { + return uCb(a), PD(a) === PD(b); + } + function dfb(a, b) { + return uCb(a), PD(a) === PD(b); + } + function Dxb(a, b) { + return Vd(Cwb(a.a, b, false)); + } + function Exb(a, b) { + return Vd(Dwb(a.a, b, false)); + } + function vBb(a, b) { + return a.b.sd(new yBb(a, b)); + } + function BBb(a, b) { + return a.b.sd(new EBb(a, b)); + } + function HBb(a, b) { + return a.b.sd(new KBb(a, b)); + } + function lfb(a, b, c) { + return a.lastIndexOf(b, c); + } + function uTb(a, b, c) { + return Kdb(a[b.b], a[c.b]); + } + function RTb(a, b) { + return yNb(b, (Nyc(), Cwc), a); + } + function fmc(a, b) { + return beb(b.a.d.p, a.a.d.p); + } + function emc(a, b) { + return beb(a.a.d.p, b.a.d.p); + } + function _Oc(a, b) { + return Kdb(a.c - a.s, b.c - b.s); + } + function S_b(a) { + return !a.c ? -1 : Jkb(a.c.a, a, 0); + } + function Vxd(a) { + return a < 100 ? null : new Ixd(a); + } + function ecd(a) { + return a == Zbd || a == _bd || a == $bd; + } + function zAd(a, b) { + return JD(b, 15) && Btd(a.c, b); + } + function vyb(a, b) { + if (lyb) { + return; + } + !!b && (a.d = b); + } + function ujb(a, b) { + var c; + c = b; + return !!Awb(a, c); + } + function czd(a, b) { + this.c = a; + Pyd.call(this, a, b); + } + function fBb(a) { + this.c = a; + nvb.call(this, rie, 0); + } + function Avb(a, b) { + Bvb.call(this, a, a.length, b); + } + function aId(a, b, c) { + return BD(a.c, 69).lk(b, c); + } + function bId(a, b, c) { + return BD(a.c, 69).mk(b, c); + } + function O2d(a, b, c) { + return N2d(a, BD(b, 332), c); + } + function Q2d(a, b, c) { + return P2d(a, BD(b, 332), c); + } + function i3d(a, b, c) { + return h3d(a, BD(b, 332), c); + } + function k3d(a, b, c) { + return j3d(a, BD(b, 332), c); + } + function tn(a, b) { + return b == null ? null : Hv(a.b, b); + } + function Kcb(a) { + return LD(a) ? (uCb(a), a) : a.ke(); + } + function Ldb(a) { + return !isNaN(a) && !isFinite(a); + } + function Wn(a) { + Ql(); + this.a = (mmb(), new zob(a)); + } + function dIc(a) { + FHc(); + this.d = a; + this.a = new jkb(); + } + function xqb(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function Nrb(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function $sb(a, b, c) { + this.d = a; + this.b = c; + this.a = b; + } + function Qsb(a) { + Csb(this); + Osb(this); + ye(this, a); + } + function Tkb(a) { + Ckb(this); + bCb(this.c, 0, a.Pc()); + } + function Xwb(a) { + uib(a.a); + Kwb(a.c, a.b); + a.b = null; + } + function iyb(a) { + this.a = a; + Zfb(); + Cbb(Date.now()); + } + function JCb() { + JCb = ccb; + GCb = new nb(); + ICb = new nb(); + } + function ntb() { + ntb = ccb; + ltb = new otb(); + mtb = new qtb(); + } + function kzd() { + kzd = ccb; + jzd = KC(SI, Uhe, 1, 0, 5, 1); + } + function tGd() { + tGd = ccb; + sGd = KC(SI, Uhe, 1, 0, 5, 1); + } + function $Gd() { + $Gd = ccb; + ZGd = KC(SI, Uhe, 1, 0, 5, 1); + } + function Ql() { + Ql = ccb; + new Zl((mmb(), mmb(), jmb)); + } + function pxb(a) { + lxb(); + return es((zxb(), yxb), a); + } + function Hyb(a) { + Fyb(); + return es((Kyb(), Jyb), a); + } + function OEb(a) { + MEb(); + return es((REb(), QEb), a); + } + function WEb(a) { + UEb(); + return es((ZEb(), YEb), a); + } + function tFb(a) { + rFb(); + return es((wFb(), vFb), a); + } + function iHb(a) { + gHb(); + return es((lHb(), kHb), a); + } + function PHb(a) { + NHb(); + return es((SHb(), RHb), a); + } + function GIb(a) { + EIb(); + return es((JIb(), IIb), a); + } + function vJb(a) { + qJb(); + return es((yJb(), xJb), a); + } + function xLb(a) { + vLb(); + return es((ALb(), zLb), a); + } + function TMb(a) { + RMb(); + return es((WMb(), VMb), a); + } + function TOb(a) { + ROb(); + return es((WOb(), VOb), a); + } + function ePb(a) { + cPb(); + return es((hPb(), gPb), a); + } + function ZRb(a) { + XRb(); + return es((aSb(), _Rb), a); + } + function ATb(a) { + yTb(); + return es((DTb(), CTb), a); + } + function sUb(a) { + qUb(); + return es((vUb(), uUb), a); + } + function rWb(a) { + lWb(); + return es((uWb(), tWb), a); + } + function TXb(a) { + RXb(); + return es((WXb(), VXb), a); + } + function Mb(a, b) { + if (!a) { + throw vbb(new Wdb(b)); + } + } + function l0b(a) { + j0b(); + return es((o0b(), n0b), a); + } + function r0b(a) { + B_b.call(this, a.d, a.c, a.a, a.b); + } + function K_b(a) { + B_b.call(this, a.d, a.c, a.a, a.b); + } + function mKb(a, b, c) { + this.b = a; + this.c = b; + this.a = c; + } + function BZb(a, b, c) { + this.b = a; + this.a = b; + this.c = c; + } + function TNb(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function uOb(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function S3b(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function Z6b(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function n9b(a, b, c) { + this.b = a; + this.a = b; + this.c = c; + } + function x$b(a, b, c) { + this.e = b; + this.b = a; + this.d = c; + } + function $Ab(a, b, c) { + EAb(); + a.a.Od(b, c); + return b; + } + function LGb(a) { + var b; + b = new KGb(); + b.e = a; + return b; + } + function iLb(a) { + var b; + b = new fLb(); + b.b = a; + return b; + } + function D6b() { + D6b = ccb; + B6b = new M6b(); + C6b = new P6b(); + } + function Hgc() { + Hgc = ccb; + Fgc = new ghc(); + Ggc = new ihc(); + } + function jbc(a) { + gbc(); + return es((mbc(), lbc), a); + } + function Cjc(a) { + Ajc(); + return es((Fjc(), Ejc), a); + } + function Clc(a) { + Alc(); + return es((Flc(), Elc), a); + } + function Cpc(a) { + Apc(); + return es((Fpc(), Epc), a); + } + function Kpc(a) { + Ipc(); + return es((Npc(), Mpc), a); + } + function Wpc(a) { + Rpc(); + return es((Zpc(), Ypc), a); + } + function $jc(a) { + Xjc(); + return es((bkc(), akc), a); + } + function Hkc(a) { + Fkc(); + return es((Kkc(), Jkc), a); + } + function dqc(a) { + bqc(); + return es((gqc(), fqc), a); + } + function rqc(a) { + mqc(); + return es((uqc(), tqc), a); + } + function zqc(a) { + xqc(); + return es((Cqc(), Bqc), a); + } + function Iqc(a) { + Gqc(); + return es((Lqc(), Kqc), a); + } + function Vqc(a) { + Sqc(); + return es((Yqc(), Xqc), a); + } + function brc(a) { + _qc(); + return es((erc(), drc), a); + } + function nrc(a) { + lrc(); + return es((qrc(), prc), a); + } + function Arc(a) { + yrc(); + return es((Drc(), Crc), a); + } + function Qrc(a) { + Orc(); + return es((Trc(), Src), a); + } + function Zrc(a) { + Xrc(); + return es((asc(), _rc), a); + } + function gsc(a) { + esc(); + return es((jsc(), isc), a); + } + function osc(a) { + msc(); + return es((rsc(), qsc), a); + } + function Etc(a) { + Ctc(); + return es((Htc(), Gtc), a); + } + function qzc(a) { + lzc(); + return es((tzc(), szc), a); + } + function Azc(a) { + xzc(); + return es((Dzc(), Czc), a); + } + function Mzc(a) { + Izc(); + return es((Pzc(), Ozc), a); + } + function MAc(a) { + KAc(); + return es((PAc(), OAc), a); + } + function mAc(a) { + kAc(); + return es((pAc(), oAc), a); + } + function vAc(a) { + tAc(); + return es((yAc(), xAc), a); + } + function DAc(a) { + BAc(); + return es((GAc(), FAc), a); + } + function VAc(a) { + TAc(); + return es((YAc(), XAc), a); + } + function $zc(a) { + Vzc(); + return es((bAc(), aAc), a); + } + function bBc(a) { + _Ac(); + return es((eBc(), dBc), a); + } + function vBc(a) { + tBc(); + return es((yBc(), xBc), a); + } + function EBc(a) { + CBc(); + return es((HBc(), GBc), a); + } + function NBc(a) { + LBc(); + return es((QBc(), PBc), a); + } + function tGc(a) { + rGc(); + return es((wGc(), vGc), a); + } + function WIc(a) { + UIc(); + return es((ZIc(), YIc), a); + } + function $Lc(a) { + YLc(); + return es((bMc(), aMc), a); + } + function gMc(a) { + eMc(); + return es((jMc(), iMc), a); + } + function JOc(a) { + HOc(); + return es((MOc(), LOc), a); + } + function HQc(a) { + FQc(); + return es((KQc(), JQc), a); + } + function DRc(a) { + yRc(); + return es((GRc(), FRc), a); + } + function tSc(a) { + qSc(); + return es((wSc(), vSc), a); + } + function UTc(a) { + STc(); + return es((XTc(), WTc), a); + } + function UUc(a) { + PUc(); + return es((XUc(), WUc), a); + } + function aUc(a) { + $Tc(); + return es((dUc(), cUc), a); + } + function wVc(a) { + tVc(); + return es((zVc(), yVc), a); + } + function iWc(a) { + fWc(); + return es((lWc(), kWc), a); + } + function sWc(a) { + pWc(); + return es((vWc(), uWc), a); + } + function lXc(a) { + iXc(); + return es((oXc(), nXc), a); + } + function vXc(a) { + sXc(); + return es((yXc(), xXc), a); + } + function BYc(a) { + zYc(); + return es((EYc(), DYc), a); + } + function m$c(a) { + k$c(); + return es((p$c(), o$c), a); + } + function $$c(a) { + Y$c(); + return es((b_c(), a_c), a); + } + function n_c(a) { + i_c(); + return es((q_c(), p_c), a); + } + function w_c(a) { + s_c(); + return es((z_c(), y_c), a); + } + function E_c(a) { + C_c(); + return es((H_c(), G_c), a); + } + function P_c(a) { + N_c(); + return es((S_c(), R_c), a); + } + function W0c(a) { + R0c(); + return es((Z0c(), Y0c), a); + } + function f1c(a) { + a1c(); + return es((i1c(), h1c), a); + } + function P5c(a) { + N5c(); + return es((S5c(), R5c), a); + } + function b6c(a) { + _5c(); + return es((e6c(), d6c), a); + } + function H7c(a) { + F7c(); + return es((K7c(), J7c), a); + } + function k8c(a) { + i8c(); + return es((n8c(), m8c), a); + } + function V8b(a) { + S8b(); + return es((Y8b(), X8b), a); + } + function A5b(a) { + y5b(); + return es((D5b(), C5b), a); + } + function jad(a) { + ead(); + return es((mad(), lad), a); + } + function sad(a) { + qad(); + return es((vad(), uad), a); + } + function Cad(a) { + Aad(); + return es((Fad(), Ead), a); + } + function Oad(a) { + Mad(); + return es((Rad(), Qad), a); + } + function jbd(a) { + hbd(); + return es((mbd(), lbd), a); + } + function ubd(a) { + rbd(); + return es((xbd(), wbd), a); + } + function Kbd(a) { + Hbd(); + return es((Nbd(), Mbd), a); + } + function Vbd(a) { + Tbd(); + return es((Ybd(), Xbd), a); + } + function hcd(a) { + dcd(); + return es((kcd(), jcd), a); + } + function vcd(a) { + rcd(); + return es((ycd(), xcd), a); + } + function vdd(a) { + tdd(); + return es((ydd(), xdd), a); + } + function Kdd(a) { + Idd(); + return es((Ndd(), Mdd), a); + } + function $cd(a) { + Ucd(); + return es((cdd(), bdd), a); + } + function Fed(a) { + Ded(); + return es((Ied(), Hed), a); + } + function rgd(a) { + pgd(); + return es((ugd(), tgd), a); + } + function Esd(a) { + Csd(); + return es((Hsd(), Gsd), a); + } + function Yoc(a, b) { + return (uCb(a), a) + (uCb(b), b); + } + function NNd(a, b) { + Zfb(); + return wtd(ZKd(a.a), b); + } + function SNd(a, b) { + Zfb(); + return wtd(ZKd(a.a), b); + } + function bPc(a, b) { + this.c = a; + this.a = b; + this.b = b - a; + } + function nYc(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function L1c(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function T1c(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function Rrd(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function zCd(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + } + function IVd(a, b, c) { + this.e = a; + this.a = b; + this.c = c; + } + function kWd(a, b, c) { + UVd(); + cWd.call(this, a, b, c); + } + function HXd(a, b, c) { + UVd(); + oXd.call(this, a, b, c); + } + function TXd(a, b, c) { + UVd(); + oXd.call(this, a, b, c); + } + function ZXd(a, b, c) { + UVd(); + oXd.call(this, a, b, c); + } + function JXd(a, b, c) { + UVd(); + HXd.call(this, a, b, c); + } + function LXd(a, b, c) { + UVd(); + HXd.call(this, a, b, c); + } + function NXd(a, b, c) { + UVd(); + LXd.call(this, a, b, c); + } + function VXd(a, b, c) { + UVd(); + TXd.call(this, a, b, c); + } + function _Xd(a, b, c) { + UVd(); + ZXd.call(this, a, b, c); + } + function $j(a, b) { + Qb(a); + Qb(b); + return new _j(a, b); + } + function Nq(a, b) { + Qb(a); + Qb(b); + return new Wq(a, b); + } + function Rq(a, b) { + Qb(a); + Qb(b); + return new ar(a, b); + } + function lr(a, b) { + Qb(a); + Qb(b); + return new zr(a, b); + } + function BD(a, b) { + CCb(a == null || AD(a, b)); + return a; + } + function Nu(a) { + var b; + b = new Rkb(); + fr(b, a); + return b; + } + function Ex(a) { + var b; + b = new Tqb(); + fr(b, a); + return b; + } + function Hx(a) { + var b; + b = new Gxb(); + Jq(b, a); + return b; + } + function Ru(a) { + var b; + b = new Psb(); + Jq(b, a); + return b; + } + function YEc(a) { + !a.e && (a.e = new Rkb()); + return a.e; + } + function SMd(a) { + !a.c && (a.c = new xYd()); + return a.c; + } + function Ekb(a, b) { + a.c[a.c.length] = b; + return true; + } + function WA(a, b) { + this.c = a; + this.b = b; + this.a = false; + } + function Gg(a) { + this.d = a; + Dg(this); + this.b = ed(a.d); + } + function pzb() { + this.a = ";,;"; + this.b = ""; + this.c = ""; + } + function Bvb(a, b, c) { + qvb.call(this, b, c); + this.a = a; + } + function fAb(a, b, c) { + this.b = a; + fvb.call(this, b, c); + } + function lsb(a, b, c) { + this.c = a; + pjb.call(this, b, c); + } + function bCb(a, b, c) { + $Bb(c, 0, a, b, c.length, false); + } + function HVb(a, b, c, d, e) { + a.b = b; + a.c = c; + a.d = d; + a.a = e; + } + function eBb(a, b) { + if (b) { + a.b = b; + a.a = (Tzb(b), b.a); + } + } + function v_b(a, b, c, d, e) { + a.d = b; + a.c = c; + a.a = d; + a.b = e; + } + function h5b(a) { + var b, c; + b = a.b; + c = a.c; + a.b = c; + a.c = b; + } + function k5b(a) { + var b, c; + c = a.d; + b = a.a; + a.d = b; + a.a = c; + } + function Lbb(a) { + return zbb(iD(Fbb(a) ? Rbb(a) : a)); + } + function rlc(a, b) { + return beb(D0b(a.d), D0b(b.d)); + } + function uic(a, b) { + return b == (Ucd(), Tcd) ? a.c : a.d; + } + function FHc() { + FHc = ccb; + DHc = (Ucd(), Tcd); + EHc = zcd; + } + function DRb() { + this.b = Edb(ED(Ksd((wSb(), vSb)))); + } + function aBb(a) { + return EAb(), KC(SI, Uhe, 1, a, 5, 1); + } + function C6c(a) { + return new f7c(a.c + a.b, a.d + a.a); + } + function Vmc(a, b) { + Imc(); + return beb(a.d.p, b.d.p); + } + function Lsb(a) { + sCb(a.b != 0); + return Nsb(a, a.a.a); + } + function Msb(a) { + sCb(a.b != 0); + return Nsb(a, a.c.b); + } + function rCb(a, b) { + if (!a) { + throw vbb(new ucb(b)); + } + } + function mCb(a, b) { + if (!a) { + throw vbb(new Wdb(b)); + } + } + function dWb(a, b, c) { + cWb.call(this, a, b); + this.b = c; + } + function pMd(a, b, c) { + MLd.call(this, a, b); + this.c = c; + } + function Dnc(a, b, c) { + Cnc.call(this, b, c); + this.d = a; + } + function _Gd(a) { + $Gd(); + MGd.call(this); + this.th(a); + } + function PNd(a, b, c) { + this.a = a; + nNd.call(this, b, c); + } + function UNd(a, b, c) { + this.a = a; + nNd.call(this, b, c); + } + function k2d(a, b, c) { + MLd.call(this, a, b); + this.c = c; + } + function y1d() { + T0d(); + z1d.call(this, (yFd(), xFd)); + } + function gFd(a) { + return a != null && !OEd(a, CEd, DEd); + } + function dFd(a, b) { + return (jFd(a) << 4 | jFd(b)) & aje; + } + function ln(a, b) { + return Vm(), Wj(a, b), new iy(a, b); + } + function Sdd(a, b) { + var c; + if (a.n) { + c = b; + Ekb(a.f, c); + } + } + function Upd(a, b, c) { + var d; + d = new yC(c); + cC(a, b, d); + } + function WUd(a, b) { + var c; + c = a.c; + VUd(a, b); + return c; + } + function Ydd(a, b) { + b < 0 ? a.g = -1 : a.g = b; + return a; + } + function $6c(a, b) { + W6c(a); + a.a *= b; + a.b *= b; + return a; + } + function G6c(a, b, c, d, e) { + a.c = b; + a.d = c; + a.b = d; + a.a = e; + } + function Dsb(a, b) { + Gsb(a, b, a.c.b, a.c); + return true; + } + function jsb(a) { + a.a.b = a.b; + a.b.a = a.a; + a.a = a.b = null; + } + function Aq(a) { + this.b = a; + this.a = Wm(this.b.a).Ed(); + } + function Wq(a, b) { + this.b = a; + this.a = b; + ol.call(this); + } + function ar(a, b) { + this.a = a; + this.b = b; + ol.call(this); + } + function vvb(a, b) { + qvb.call(this, b, 1040); + this.a = a; + } + function Eeb(a) { + return a == 0 || isNaN(a) ? a : a < 0 ? -1 : 1; + } + function WPb(a) { + QPb(); + return jtd(a) == Xod(ltd(a)); + } + function XPb(a) { + QPb(); + return ltd(a) == Xod(jtd(a)); + } + function iYb(a, b) { + return hYb(a, new cWb(b.a, b.b)); + } + function NZb(a) { + return !OZb(a) && a.c.i.c == a.d.i.c; + } + function _Gb(a) { + var b; + b = a.n; + return a.a.b + b.d + b.a; + } + function YHb(a) { + var b; + b = a.n; + return a.e.b + b.d + b.a; + } + function ZHb(a) { + var b; + b = a.n; + return a.e.a + b.b + b.c; + } + function zfe(a) { + wfe(); + return new ige(0, a); + } + function o_b(a) { + if (a.a) { + return a.a; + } + return JZb(a); + } + function CCb(a) { + if (!a) { + throw vbb(new Cdb(null)); + } + } + function X6d() { + X6d = ccb; + W6d = (mmb(), new anb(Fwe)); + } + function ex() { + ex = ccb; + new gx((_k(), $k), (Lk(), Kk)); + } + function oeb() { + oeb = ccb; + neb = KC(JI, nie, 19, 256, 0, 1); + } + function d$c(a, b, c, d) { + e$c.call(this, a, b, c, d, 0, 0); + } + function sQc(a, b, c) { + return Rhb(a.b, BD(c.b, 17), b); + } + function tQc(a, b, c) { + return Rhb(a.b, BD(c.b, 17), b); + } + function xfd(a, b) { + return Ekb(a, new f7c(b.a, b.b)); + } + function Bic(a, b) { + return a.c < b.c ? -1 : a.c == b.c ? 0 : 1; + } + function B0b(a) { + return a.e.c.length + a.g.c.length; + } + function D0b(a) { + return a.e.c.length - a.g.c.length; + } + function Ojc(a) { + return a.b.c.length - a.e.c.length; + } + function dKc(a) { + FJc(); + return (Ucd(), Ecd).Hc(a.j); + } + function lHd(a) { + $Gd(); + _Gd.call(this, a); + this.a = -1; + } + function R7d(a, b) { + f7d.call(this, a, b); + this.a = this; + } + function odb(a, b) { + var c; + c = ldb(a, b); + c.i = 2; + return c; + } + function Evd(a, b) { + var c; + ++a.j; + c = a.Ti(b); + return c; + } + function e3c(a, b, c) { + a.a = -1; + i3c(a, b.g, c); + return a; + } + function Qrd(a, b, c) { + Kqd(a.a, a.b, a.c, BD(b, 202), c); + } + function OHd(a, b) { + PHd(a, b == null ? null : (uCb(b), b)); + } + function SUd(a, b) { + UUd(a, b == null ? null : (uCb(b), b)); + } + function TUd(a, b) { + UUd(a, b == null ? null : (uCb(b), b)); + } + function Zj(a, b, c) { + return new tk(oAb(a).Ie(), c, b); + } + function IC(a, b, c, d, e, f) { + return JC(a, b, c, d, e, 0, f); + } + function Ucb() { + Ucb = ccb; + Tcb = KC(xI, nie, 217, 256, 0, 1); + } + function Ceb() { + Ceb = ccb; + Beb = KC(MI, nie, 162, 256, 0, 1); + } + function Yeb() { + Yeb = ccb; + Xeb = KC(UI, nie, 184, 256, 0, 1); + } + function ddb() { + ddb = ccb; + cdb = KC(yI, nie, 172, 128, 0, 1); + } + function IVb() { + HVb(this, false, false, false, false); + } + function my(a) { + im(); + this.a = (mmb(), new anb(Qb(a))); + } + function ir(a) { + Qb(a); + while (a.Ob()) { + a.Pb(); + a.Qb(); + } + } + function Tw(a) { + a.a.cd(); + BD(a.a.dd(), 14).gc(); + zh(); + } + function mf(a) { + this.c = a; + this.b = this.c.d.vc().Kc(); + } + function fqb(a) { + this.c = a; + this.a = new Gqb(this.c.a); + } + function Vqb(a) { + this.a = new Mqb(a.gc()); + ye(this, a); + } + function Bsb(a) { + Wqb.call(this, new $rb()); + ye(this, a); + } + function Rfb(a, b) { + a.a += zfb(b, 0, b.length); + return a; + } + function Ikb(a, b) { + tCb(b, a.c.length); + return a.c[b]; + } + function $lb(a, b) { + tCb(b, a.a.length); + return a.a[b]; + } + function YAb(a, b) { + EAb(); + Vzb.call(this, a); + this.a = b; + } + function Qyb(a, b) { + return Aeb(wbb(Aeb(a.a).a, b.a)); + } + function jpb(a, b) { + return uCb(a), Fcb(a, (uCb(b), b)); + } + function opb(a, b) { + return uCb(b), Fcb(b, (uCb(a), a)); + } + function Oyb(a, b) { + return NC(b, 0, Bzb(b[0], Aeb(1))); + } + function Bzb(a, b) { + return Qyb(BD(a, 162), BD(b, 162)); + } + function vic(a) { + return a.c - BD(Ikb(a.a, a.b), 287).b; + } + function uNb(a) { + return !a.q ? (mmb(), mmb(), kmb) : a.q; + } + function Xi(a) { + return a.e.Hd().gc() * a.c.Hd().gc(); + } + function onc(a, b, c) { + return beb(b.d[a.g], c.d[a.g]); + } + function YHc(a, b, c) { + return beb(a.d[b.p], a.d[c.p]); + } + function ZHc(a, b, c) { + return beb(a.d[b.p], a.d[c.p]); + } + function $Hc(a, b, c) { + return beb(a.d[b.p], a.d[c.p]); + } + function _Hc(a, b, c) { + return beb(a.d[b.p], a.d[c.p]); + } + function q$c(a, b, c) { + return $wnd.Math.min(c / a, 1 / b); + } + function sEc(a, b) { + return a ? 0 : $wnd.Math.max(0, b - 1); + } + function Elb(a, b) { + var c; + for (c = 0; c < b; ++c) { + a[c] = -1; + } + } + function bVc(a) { + var b; + b = hVc(a); + return !b ? a : bVc(b); + } + function Voc(a, b) { + a.a == null && Toc(a); + return a.a[b]; + } + function qed(a) { + if (a.c) { + return a.c.f; + } + return a.e.b; + } + function red(a) { + if (a.c) { + return a.c.g; + } + return a.e.a; + } + function pFd(a) { + zud.call(this, a.gc()); + ytd(this, a); + } + function nXd(a, b) { + UVd(); + VVd.call(this, b); + this.a = a; + } + function KYd(a, b, c) { + this.a = a; + xMd.call(this, b, c, 2); + } + function B_b(a, b, c, d) { + v_b(this, a, b, c, d); + } + function ige(a, b) { + wfe(); + xfe.call(this, a); + this.a = b; + } + function jgd(a) { + this.b = new Psb(); + this.a = a; + this.c = -1; + } + function MOb() { + this.d = new f7c(0, 0); + this.e = new Tqb(); + } + function Nr(a) { + qc.call(this, 0, 0); + this.a = a; + this.b = 0; + } + function ejc(a) { + this.a = a; + this.c = new Lqb(); + $ic(this); + } + function ju(a) { + if (a.e.c != a.b) { + throw vbb(new Apb()); + } + } + function bt(a) { + if (a.c.e != a.a) { + throw vbb(new Apb()); + } + } + function Tbb(a) { + if (Fbb(a)) { + return a | 0; + } + return pD(a); + } + function Bfe(a, b) { + wfe(); + return new rge(a, b); + } + function SEd(a, b) { + return a == null ? b == null : dfb(a, b); + } + function TEd(a, b) { + return a == null ? b == null : efb(a, b); + } + function Npb(a, b, c) { + rqb(a.a, b); + return Qpb(a, b.g, c); + } + function Mlb(a, b, c) { + oCb(0, b, a.length); + Klb(a, 0, b, c); + } + function Dkb(a, b, c) { + wCb(b, a.c.length); + aCb(a.c, b, c); + } + function Dlb(a, b, c) { + var d; + for (d = 0; d < b; ++d) { + a[d] = c; + } + } + function qqb(a, b) { + var c; + c = pqb(a); + nmb(c, b); + return c; + } + function Oz(a, b) { + !a && (a = []); + a[a.length] = b; + return a; + } + function Brb(a, b) { + return !(a.a.get(b) === void 0); + } + function Wyb(a, b) { + return Nyb(new rzb(), new bzb(a), b); + } + function Itb(a) { + return a == null ? ztb : new Ftb(uCb(a)); + } + function tqb(a, b) { + return JD(b, 22) && uqb(a, BD(b, 22)); + } + function vqb(a, b) { + return JD(b, 22) && wqb(a, BD(b, 22)); + } + function Aub(a) { + return Cub(a, 26) * ike + Cub(a, 27) * jke; + } + function MC(a) { + return Array.isArray(a) && a.im === gcb; + } + function bg(a) { + a.b ? bg(a.b) : a.d.dc() && a.f.c.Bc(a.e); + } + function $Nb(a, b) { + P6c(a.c, b); + a.b.c += b.a; + a.b.d += b.b; + } + function ZNb(a, b) { + $Nb(a, c7c(new f7c(b.a, b.b), a.c)); + } + function BLb(a, b) { + this.b = new Psb(); + this.a = a; + this.c = b; + } + function OVb() { + this.b = new $Vb(); + this.c = new SVb(this); + } + function oEb() { + this.d = new CEb(); + this.e = new uEb(this); + } + function aCc() { + ZBc(); + this.f = new Psb(); + this.e = new Psb(); + } + function $Jc() { + FJc(); + this.k = new Lqb(); + this.d = new Tqb(); + } + function Rgd() { + Rgd = ccb; + Qgd = new Osd((Y9c(), s9c), 0); + } + function Mr() { + Mr = ccb; + Lr = new Nr(KC(SI, Uhe, 1, 0, 5, 1)); + } + function gfc(a, b, c) { + bfc(c, a, 1); + Ekb(b, new Tfc(c, a)); + } + function hfc(a, b, c) { + cfc(c, a, 1); + Ekb(b, new dgc(c, a)); + } + function R$c(a, b, c) { + return Qqb(a, new aDb(b.a, c.a)); + } + function ACc(a, b, c) { + return -beb(a.f[b.p], a.f[c.p]); + } + function mHb(a, b, c) { + var d; + if (a) { + d = a.i; + d.c = b; + d.b = c; + } + } + function nHb(a, b, c) { + var d; + if (a) { + d = a.i; + d.d = b; + d.a = c; + } + } + function c3c(a, b, c) { + a.a = -1; + i3c(a, b.g + 1, c); + return a; + } + function Dod(a, b, c) { + c = _hd(a, BD(b, 49), 7, c); + return c; + } + function JHd(a, b, c) { + c = _hd(a, BD(b, 49), 3, c); + return c; + } + function JMd(a, b, c) { + this.a = a; + BMd.call(this, b, c, 22); + } + function UTd(a, b, c) { + this.a = a; + BMd.call(this, b, c, 14); + } + function eXd(a, b, c, d) { + UVd(); + nWd.call(this, a, b, c, d); + } + function lXd(a, b, c, d) { + UVd(); + nWd.call(this, a, b, c, d); + } + function FNd(a, b) { + (b.Bb & ote) != 0 && !a.a.o && (a.a.o = b); + } + function MD(a) { + return a != null && OD(a) && !(a.im === gcb); + } + function ID(a) { + return !Array.isArray(a) && a.im === gcb; + } + function ed(a) { + return JD(a, 15) ? BD(a, 15).Yc() : a.Kc(); + } + function De(a) { + return a.Qc(KC(SI, Uhe, 1, a.gc(), 5, 1)); + } + function u1d(a, b) { + return W1d(p1d(a, b)) ? b.Qh() : null; + } + function uvd(a) { + a ? Ty(a, (Zfb(), Yfb)) : (Zfb(), Yfb); + } + function Sr(a) { + this.a = (Mr(), Lr); + this.d = BD(Qb(a), 47); + } + function qg(a, b, c, d) { + this.a = a; + dg.call(this, a, b, c, d); + } + function Yge(a) { + Xge(); + this.a = 0; + this.b = a - 1; + this.c = 1; + } + function Yy(a) { + Py(this); + this.g = a; + Ry(this); + this._d(); + } + function Wm(a) { + if (a.c) { + return a.c; + } + return a.c = a.Id(); + } + function Xm(a) { + if (a.d) { + return a.d; + } + return a.d = a.Jd(); + } + function Rl(a) { + var b; + b = a.c; + return !b ? a.c = a.Dd() : b; + } + function fe(a) { + var b; + b = a.f; + return !b ? a.f = a.Dc() : b; + } + function Ec(a) { + var b; + b = a.i; + return !b ? a.i = a.bc() : b; + } + function Ffe(a) { + wfe(); + return new Hge(10, a, 0); + } + function Ubb(a) { + if (Fbb(a)) { + return "" + a; + } + return qD(a); + } + function a4d(a) { + if (a.e.j != a.d) { + throw vbb(new Apb()); + } + } + function Nbb(a, b) { + return zbb(kD(Fbb(a) ? Rbb(a) : a, b)); + } + function Obb(a, b) { + return zbb(lD(Fbb(a) ? Rbb(a) : a, b)); + } + function Pbb(a, b) { + return zbb(mD(Fbb(a) ? Rbb(a) : a, b)); + } + function Dcb(a, b) { + return Ecb((uCb(a), a), (uCb(b), b)); + } + function Ddb(a, b) { + return Kdb((uCb(a), a), (uCb(b), b)); + } + function fx(a, b) { + return Qb(b), a.a.Ad(b) && !a.b.Ad(b); + } + function dD(a, b) { + return TC(a.l & b.l, a.m & b.m, a.h & b.h); + } + function jD(a, b) { + return TC(a.l | b.l, a.m | b.m, a.h | b.h); + } + function rD(a, b) { + return TC(a.l ^ b.l, a.m ^ b.m, a.h ^ b.h); + } + function QAb(a, b) { + return TAb(a, (uCb(b), new Rxb(b))); + } + function RAb(a, b) { + return TAb(a, (uCb(b), new Txb(b))); + } + function g1b(a) { + return z0b(), BD(a, 11).e.c.length != 0; + } + function l1b(a) { + return z0b(), BD(a, 11).g.c.length != 0; + } + function bac(a, b) { + I9b(); + return Kdb(b.a.o.a, a.a.o.a); + } + function Rnc(a, b, c) { + return Snc(a, BD(b, 11), BD(c, 11)); + } + function koc(a) { + if (a.e) { + return poc(a.e); + } + return null; + } + function Iub(a) { + if (!a.d) { + a.d = a.b.Kc(); + a.c = a.b.gc(); + } + } + function pBb(a, b, c) { + if (a.a.Mb(c)) { + a.b = true; + b.td(c); + } + } + function _vb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new rcb()); + } + } + function Pyb(a, b, c) { + NC(b, 0, Bzb(b[0], c[0])); + return b; + } + function _yc(a, b, c) { + b.Ye(c, Edb(ED(Ohb(a.b, c))) * a.a); + } + function n6c(a, b, c) { + i6c(); + return m6c(a, b) && m6c(a, c); + } + function tcd(a) { + rcd(); + return !a.Hc(ncd) && !a.Hc(pcd); + } + function D6c(a) { + return new f7c(a.c + a.b / 2, a.d + a.a / 2); + } + function oOd(a, b) { + return b.kh() ? xid(a.b, BD(b, 49)) : b; + } + function bvb(a, b) { + this.e = a; + this.d = (b & 64) != 0 ? b | oie : b; + } + function qvb(a, b) { + this.c = 0; + this.d = a; + this.b = b | 64 | oie; + } + function gub(a) { + this.b = new Skb(11); + this.a = (ipb(), a); + } + function Qwb(a) { + this.b = null; + this.a = (ipb(), !a ? fpb : a); + } + function nHc(a) { + this.a = lHc(a.a); + this.b = new Tkb(a.b); + } + function Pzd(a) { + this.b = a; + Oyd.call(this, a); + Ozd(this); + } + function Xzd(a) { + this.b = a; + bzd.call(this, a); + Wzd(this); + } + function jUd(a, b, c) { + this.a = a; + gUd.call(this, b, c, 5, 6); + } + function Y5d(a, b, c, d) { + this.b = a; + xMd.call(this, b, c, d); + } + function nSd(a, b, c, d, e) { + oSd.call(this, a, b, c, d, e, -1); + } + function DSd(a, b, c, d, e) { + ESd.call(this, a, b, c, d, e, -1); + } + function cUd(a, b, c, d) { + xMd.call(this, a, b, c); + this.b = d; + } + function i5d(a, b, c, d) { + pMd.call(this, a, b, c); + this.b = d; + } + function x0d(a) { + Wud.call(this, a, false); + this.a = false; + } + function Lj(a, b) { + this.b = a; + sj.call(this, a.b); + this.a = b; + } + function px(a, b) { + im(); + ox.call(this, a, Dm(new amb(b))); + } + function Cfe(a, b) { + wfe(); + return new Dge(a, b, 0); + } + function Efe(a, b) { + wfe(); + return new Dge(6, a, b); + } + function nfb(a, b) { + return dfb(a.substr(0, b.length), b); + } + function Mhb(a, b) { + return ND(b) ? Qhb(a, b) : !!irb(a.f, b); + } + function Rrb(a, b) { + uCb(b); + while (a.Ob()) { + b.td(a.Pb()); + } + } + function Vgb(a, b, c) { + Hgb(); + this.e = a; + this.d = b; + this.a = c; + } + function amc(a, b, c, d) { + var e; + e = a.i; + e.i = b; + e.a = c; + e.b = d; + } + function xJc(a) { + var b; + b = a; + while (b.f) { + b = b.f; + } + return b; + } + function fkb(a) { + var b; + b = bkb(a); + sCb(b != null); + return b; + } + function gkb(a) { + var b; + b = ckb(a); + sCb(b != null); + return b; + } + function cv(a, b) { + var c; + c = a.a.gc(); + Sb(b, c); + return c - b; + } + function Glb(a, b) { + var c; + for (c = 0; c < b; ++c) { + a[c] = false; + } + } + function Clb(a, b, c, d) { + var e; + for (e = b; e < c; ++e) { + a[e] = d; + } + } + function ylb(a, b, c, d) { + oCb(b, c, a.length); + Clb(a, b, c, d); + } + function Vvb(a, b, c) { + _vb(c, a.a.c.length); + Nkb(a.a, c, b); + } + function Lyb(a, b, c) { + this.c = a; + this.a = b; + mmb(); + this.b = c; + } + function Qpb(a, b, c) { + var d; + d = a.b[b]; + a.b[b] = c; + return d; + } + function Qqb(a, b) { + var c; + c = a.a.zc(b, a); + return c == null; + } + function zjb(a) { + if (!a) { + throw vbb(new utb()); + } + return a.d; + } + function vCb(a, b) { + if (a == null) { + throw vbb(new Heb(b)); + } + } + function Goc(a, b) { + if (!b) { + return false; + } + return ye(a, b); + } + function K2c(a, b, c) { + C2c(a, b.g, c); + rqb(a.c, b); + return a; + } + function vVb(a) { + tVb(a, (ead(), aad)); + a.d = true; + return a; + } + function c2d(a) { + !a.j && i2d(a, d1d(a.g, a.b)); + return a.j; + } + function nlb(a) { + yCb(a.b != -1); + Kkb(a.c, a.a = a.b); + a.b = -1; + } + function Uhb(a) { + a.f = new lrb(a); + a.g = new Frb(a); + zpb(a); + } + function Plb(a) { + return new YAb(null, Olb(a, a.length)); + } + function ul(a) { + return new Sr(new xl(a.a.length, a.a)); + } + function iD(a) { + return TC(~a.l & Eje, ~a.m & Eje, ~a.h & Fje); + } + function OD(a) { + return typeof a === Jhe || typeof a === Nhe; + } + function D9d(a) { + return a == Pje ? Nwe : a == Qje ? "-INF" : "" + a; + } + function F9d(a) { + return a == Pje ? Nwe : a == Qje ? "-INF" : "" + a; + } + function yRb(a, b) { + return a > 0 ? $wnd.Math.log(a / b) : -100; + } + function ueb(a, b) { + return ybb(a, b) < 0 ? -1 : ybb(a, b) > 0 ? 1 : 0; + } + function HMb(a, b, c) { + return IMb(a, BD(b, 46), BD(c, 167)); + } + function iq(a, b) { + return BD(Rl(Wm(a.a)).Xb(b), 42).cd(); + } + function Olb(a, b) { + return avb(b, a.length), new vvb(a, b); + } + function Pyd(a, b) { + this.d = a; + Fyd.call(this, a); + this.e = b; + } + function Lub(a) { + this.d = (uCb(a), a); + this.a = 0; + this.c = rie; + } + function rge(a, b) { + xfe.call(this, 1); + this.a = a; + this.b = b; + } + function Rzb(a, b) { + !a.c ? Ekb(a.b, b) : Rzb(a.c, b); + return a; + } + function uB(a, b, c) { + var d; + d = tB(a, b); + vB(a, b, c); + return d; + } + function ZBb(a, b) { + var c; + c = a.slice(0, b); + return PC(c, a); + } + function Flb(a, b, c) { + var d; + for (d = 0; d < b; ++d) { + NC(a, d, c); + } + } + function ffb(a, b, c, d, e) { + while (b < c) { + d[e++] = bfb(a, b++); + } + } + function hLb(a, b) { + return Kdb(a.c.c + a.c.b, b.c.c + b.c.b); + } + function Axb(a, b) { + return Iwb(a.a, b, (Bcb(), zcb)) == null; + } + function Vsb(a, b) { + Gsb(a.d, b, a.b.b, a.b); + ++a.a; + a.c = null; + } + function d3d(a, b) { + JLd(a, JD(b, 153) ? b : BD(b, 1937).gl()); + } + function hkc(a, b) { + MAb(NAb(a.Oc(), new Rkc()), new Tkc(b)); + } + function kkc(a, b, c, d, e) { + jkc(a, BD(Qc(b.k, c), 15), c, d, e); + } + function lOc(a) { + a.s = NaN; + a.c = NaN; + mOc(a, a.e); + mOc(a, a.j); + } + function it(a) { + a.a = null; + a.e = null; + Uhb(a.b); + a.d = 0; + ++a.c; + } + function gKc(a) { + return $wnd.Math.abs(a.d.e - a.e.e) - a.a; + } + function MAd(a, b, c) { + return BD(a.c._c(b, BD(c, 133)), 42); + } + function os() { + hs(); + return OC(GC(yG, 1), Kie, 538, 0, [gs]); + } + function VPb(a) { + QPb(); + return Xod(jtd(a)) == Xod(ltd(a)); + } + function aRb(a) { + _Qb.call(this); + this.a = a; + Ekb(a.a, this); + } + function tPc(a, b) { + this.d = DPc(a); + this.c = b; + this.a = 0.5 * b; + } + function A6d() { + $rb.call(this); + this.a = true; + this.b = true; + } + function aLd(a) { + return (a.i == null && TKd(a), a.i).length; + } + function oRd(a) { + return JD(a, 99) && (BD(a, 18).Bb & ote) != 0; + } + function w2d(a, b) { + ++a.j; + t3d(a, a.i, b); + v2d(a, BD(b, 332)); + } + function vId(a, b) { + b = a.nk(null, b); + return uId(a, null, b); + } + function ytd(a, b) { + a.hi() && (b = Dtd(a, b)); + return a.Wh(b); + } + function mdb(a, b, c) { + var d; + d = ldb(a, b); + zdb(c, d); + return d; + } + function ldb(a, b) { + var c; + c = new jdb(); + c.j = a; + c.d = b; + return c; + } + function Qb(a) { + if (a == null) { + throw vbb(new Geb()); + } + return a; + } + function Fc(a) { + var b; + b = a.j; + return !b ? a.j = new Cw(a) : b; + } + function Vi(a) { + var b; + b = a.f; + return !b ? a.f = new Rj(a) : b; + } + function ci(a) { + var b; + return b = a.k, !b ? a.k = new th(a) : b; + } + function Uc(a) { + var b; + return b = a.k, !b ? a.k = new th(a) : b; + } + function Pc(a) { + var b; + return b = a.g, !b ? a.g = new lh(a) : b; + } + function Yi(a) { + var b; + return b = a.i, !b ? a.i = new Ci(a) : b; + } + function qo(a) { + var b; + b = a.d; + return !b ? a.d = new ap(a) : b; + } + function Fb(a) { + Qb(a); + return JD(a, 475) ? BD(a, 475) : fcb(a); + } + function Ix(a) { + if (JD(a, 607)) { + return a; + } + return new by(a); + } + function qj(a, b) { + Pb(b, a.c.b.c.gc()); + return new Fj(a, b); + } + function Dfe(a, b, c) { + wfe(); + return new zge(a, b, c); + } + function NC(a, b, c) { + qCb(c == null || FC(a, c)); + return a[b] = c; + } + function bv(a, b) { + var c; + c = a.a.gc(); + Pb(b, c); + return c - 1 - b; + } + function Afb(a, b) { + a.a += String.fromCharCode(b); + return a; + } + function Kfb(a, b) { + a.a += String.fromCharCode(b); + return a; + } + function ovb(a, b) { + uCb(b); + while (a.c < a.d) { + a.ze(b, a.c++); + } + } + function Ohb(a, b) { + return ND(b) ? Phb(a, b) : Wd(irb(a.f, b)); + } + function ZPb(a, b) { + QPb(); + return a == jtd(b) ? ltd(b) : jtd(b); + } + function isd(a, b) { + Qpd(a, new yC(b.f != null ? b.f : "" + b.g)); + } + function ksd(a, b) { + Qpd(a, new yC(b.f != null ? b.f : "" + b.g)); + } + function dVb(a) { + this.b = new Rkb(); + this.a = new Rkb(); + this.c = a; + } + function H1b(a) { + this.c = new d7c(); + this.a = new Rkb(); + this.b = a; + } + function pRb(a) { + _Qb.call(this); + this.a = new d7c(); + this.c = a; + } + function yC(a) { + if (a == null) { + throw vbb(new Geb()); + } + this.a = a; + } + function HA(a) { + fA(); + this.b = new Rkb(); + this.a = a; + sA(this, a); + } + function v4c(a) { + this.c = a; + this.a = new Psb(); + this.b = new Psb(); + } + function GB() { + GB = ccb; + EB = new HB(false); + FB = new HB(true); + } + function im() { + im = ccb; + Ql(); + hm = new ux((mmb(), mmb(), jmb)); + } + function yx() { + yx = ccb; + Ql(); + xx = new zx((mmb(), mmb(), lmb)); + } + function NFd() { + NFd = ccb; + MFd = BZd(); + !!(jGd(), PFd) && DZd(); + } + function aac(a, b) { + I9b(); + return BD(Mpb(a, b.d), 15).Fc(b); + } + function pTb(a, b, c, d) { + return c == 0 || (c - d) / c < a.e || b >= a.g; + } + function NHc(a, b, c) { + var d; + d = THc(a, b, c); + return MHc(a, d); + } + function Qpd(a, b) { + var c; + c = a.a.length; + tB(a, c); + vB(a, c, b); + } + function gCb(a, b) { + var c; + c = console[a]; + c.call(console, b); + } + function Bvd(a, b) { + var c; + ++a.j; + c = a.Vi(); + a.Ii(a.oi(c, b)); + } + function E1c(a, b, c) { + BD(b.b, 65); + Hkb(b.a, new L1c(a, c, b)); + } + function oXd(a, b, c) { + VVd.call(this, b); + this.a = a; + this.b = c; + } + function Dge(a, b, c) { + xfe.call(this, a); + this.a = b; + this.b = c; + } + function dYd(a, b, c) { + this.a = a; + lVd.call(this, b); + this.b = c; + } + function f0d(a, b, c) { + this.a = a; + mxd.call(this, 8, b, null, c); + } + function z1d(a) { + this.a = (uCb(Rve), Rve); + this.b = a; + new oUd(); + } + function ct(a) { + this.c = a; + this.b = this.c.a; + this.a = this.c.e; + } + function usb(a) { + this.c = a; + this.b = a.a.d.a; + ypb(a.a.e, this); + } + function uib(a) { + yCb(a.c != -1); + a.d.$c(a.c); + a.b = a.c; + a.c = -1; + } + function U6c(a) { + return $wnd.Math.sqrt(a.a * a.a + a.b * a.b); + } + function Uvb(a, b) { + return _vb(b, a.a.c.length), Ikb(a.a, b); + } + function Hb(a, b) { + return PD(a) === PD(b) || a != null && pb(a, b); + } + function oAb(a) { + if (0 >= a) { + return new yAb(); + } + return pAb(a - 1); + } + function Nfe(a) { + if (!bfe) + return false; + return Qhb(bfe, a); + } + function Ehe(a) { + if (a) + return a.dc(); + return !a.Kc().Ob(); + } + function Q_b(a) { + if (!a.a && !!a.c) { + return a.c.b; + } + return a.a; + } + function LHd(a) { + !a.a && (a.a = new xMd(m5, a, 4)); + return a.a; + } + function LQd(a) { + !a.d && (a.d = new xMd(j5, a, 1)); + return a.d; + } + function uCb(a) { + if (a == null) { + throw vbb(new Geb()); + } + return a; + } + function Qzb(a) { + if (!a.c) { + a.d = true; + Szb(a); + } else { + a.c.He(); + } + } + function Tzb(a) { + if (!a.c) { + Uzb(a); + a.d = true; + } else { + Tzb(a.c); + } + } + function Kpb(a) { + Ae(a.a); + a.b = KC(SI, Uhe, 1, a.b.length, 5, 1); + } + function qlc(a, b) { + return beb(b.j.c.length, a.j.c.length); + } + function igd(a, b) { + a.c < 0 || a.b.b < a.c ? Fsb(a.b, b) : a.a._e(b); + } + function Did(a, b) { + var c; + c = a.Yg(b); + c >= 0 ? a.Bh(c) : vid(a, b); + } + function WHc(a) { + var b, c; + b = a.c.i.c; + c = a.d.i.c; + return b == c; + } + function Wwd(a) { + if (a.p != 4) + throw vbb(new Ydb()); + return a.e; + } + function Vwd(a) { + if (a.p != 3) + throw vbb(new Ydb()); + return a.e; + } + function Ywd(a) { + if (a.p != 6) + throw vbb(new Ydb()); + return a.f; + } + function fxd(a) { + if (a.p != 6) + throw vbb(new Ydb()); + return a.k; + } + function cxd(a) { + if (a.p != 3) + throw vbb(new Ydb()); + return a.j; + } + function dxd(a) { + if (a.p != 4) + throw vbb(new Ydb()); + return a.j; + } + function AYd(a) { + !a.b && (a.b = new RYd(new NYd())); + return a.b; + } + function $1d(a) { + a.c == -2 && e2d(a, X0d(a.g, a.b)); + return a.c; + } + function pdb(a, b) { + var c; + c = ldb("", a); + c.n = b; + c.i = 1; + return c; + } + function MNb(a, b) { + $Nb(BD(b.b, 65), a); + Hkb(b.a, new RNb(a)); + } + function Cnd(a, b) { + wtd((!a.a && (a.a = new fTd(a, a)), a.a), b); + } + function Qzd(a, b) { + this.b = a; + Pyd.call(this, a, b); + Ozd(this); + } + function Yzd(a, b) { + this.b = a; + czd.call(this, a, b); + Wzd(this); + } + function Ms(a, b, c, d) { + Wo.call(this, a, b); + this.d = c; + this.a = d; + } + function $o(a, b, c, d) { + Wo.call(this, a, c); + this.a = b; + this.f = d; + } + function iy(a, b) { + Pp.call(this, umb(Qb(a), Qb(b))); + this.a = b; + } + function cae() { + fod.call(this, Ewe, (p8d(), o8d)); + $9d(this); + } + function AZd() { + fod.call(this, _ve, (LFd(), KFd)); + uZd(this); + } + function T0c() { + $r.call(this, "DELAUNAY_TRIANGULATION", 0); + } + function vfb(a) { + return String.fromCharCode.apply(null, a); + } + function Rhb(a, b, c) { + return ND(b) ? Shb(a, b, c) : jrb(a.f, b, c); + } + function tmb(a) { + mmb(); + return !a ? (ipb(), ipb(), hpb) : a.ve(); + } + function d2c(a, b, c) { + Y1c(); + return c.pg(a, BD(b.cd(), 146)); + } + function ix(a, b) { + ex(); + return new gx(new il(a), new Uk(b)); + } + function Iu(a) { + Xj(a, Mie); + return Oy(wbb(wbb(5, a), a / 10 | 0)); + } + function Vm() { + Vm = ccb; + Um = new wx(OC(GC(CK, 1), zie, 42, 0, [])); + } + function hob(a) { + !a.d && (a.d = new lnb(a.c.Cc())); + return a.d; + } + function eob(a) { + !a.a && (a.a = new Gob(a.c.vc())); + return a.a; + } + function gob(a) { + !a.b && (a.b = new zob(a.c.ec())); + return a.b; + } + function keb(a, b) { + while (b-- > 0) { + a = a << 1 | (a < 0 ? 1 : 0); + } + return a; + } + function wtb(a, b) { + return PD(a) === PD(b) || a != null && pb(a, b); + } + function Gbc(a, b) { + return Bcb(), BD(b.b, 19).a < a ? true : false; + } + function Hbc(a, b) { + return Bcb(), BD(b.a, 19).a < a ? true : false; + } + function Mpb(a, b) { + return tqb(a.a, b) ? a.b[BD(b, 22).g] : null; + } + function kcb(a, b, c, d) { + a.a = qfb(a.a, 0, b) + ("" + d) + pfb(a.a, c); + } + function OJb(a, b) { + a.u.Hc((rcd(), ncd)) && MJb(a, b); + QJb(a, b); + } + function bfb(a, b) { + BCb(b, a.length); + return a.charCodeAt(b); + } + function vtb() { + hz.call(this, "There is no more element."); + } + function xkb(a) { + this.d = a; + this.a = this.d.b; + this.b = this.d.c; + } + function kEb(a) { + a.b = false; + a.c = false; + a.d = false; + a.a = false; + } + function Znd(a, b, c, d) { + Ynd(a, b, c, false); + LPd(a, d); + return a; + } + function h3c(a) { + a.j.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = -1; + return a; + } + function Old(a) { + !a.c && (a.c = new y5d(z2, a, 5, 8)); + return a.c; + } + function Nld(a) { + !a.b && (a.b = new y5d(z2, a, 4, 7)); + return a.b; + } + function Kkd(a) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + return a.n; + } + function Yod(a) { + !a.c && (a.c = new cUd(F2, a, 9, 9)); + return a.c; + } + function a2d(a) { + a.e == Gwe && g2d(a, a1d(a.g, a.b)); + return a.e; + } + function b2d(a) { + a.f == Gwe && h2d(a, b1d(a.g, a.b)); + return a.f; + } + function Ah(a) { + var b; + b = a.b; + !b && (a.b = b = new Ph(a)); + return b; + } + function Ae(a) { + var b; + for (b = a.Kc(); b.Ob(); ) { + b.Pb(); + b.Qb(); + } + } + function Fg(a) { + ag(a.d); + if (a.d.d != a.c) { + throw vbb(new Apb()); + } + } + function Xx(a, b) { + this.b = a; + this.c = b; + this.a = new Gqb(this.b); + } + function Zeb(a, b, c) { + this.a = Zie; + this.d = a; + this.b = b; + this.c = c; + } + function Mub(a, b) { + this.d = (uCb(a), a); + this.a = 16449; + this.c = b; + } + function nqd(a, b) { + ctd(a, Edb(Xpd(b, "x")), Edb(Xpd(b, "y"))); + } + function Aqd(a, b) { + ctd(a, Edb(Xpd(b, "x")), Edb(Xpd(b, "y"))); + } + function JAb(a, b) { + Uzb(a); + return new YAb(a, new qBb(b, a.a)); + } + function NAb(a, b) { + Uzb(a); + return new YAb(a, new IBb(b, a.a)); + } + function OAb(a, b) { + Uzb(a); + return new bAb(a, new wBb(b, a.a)); + } + function PAb(a, b) { + Uzb(a); + return new vAb(a, new CBb(b, a.a)); + } + function Cy(a, b) { + return new Ay(BD(Qb(a), 62), BD(Qb(b), 62)); + } + function PWb(a, b) { + LWb(); + return Kdb((uCb(a), a), (uCb(b), b)); + } + function fPb() { + cPb(); + return OC(GC(GO, 1), Kie, 481, 0, [bPb]); + } + function o_c() { + i_c(); + return OC(GC(N_, 1), Kie, 482, 0, [h_c]); + } + function x_c() { + s_c(); + return OC(GC(O_, 1), Kie, 551, 0, [r_c]); + } + function X0c() { + R0c(); + return OC(GC(W_, 1), Kie, 530, 0, [Q0c]); + } + function cEc(a) { + this.a = new Rkb(); + this.e = KC(WD, nie, 48, a, 0, 2); + } + function l$b(a, b, c, d) { + this.a = a; + this.e = b; + this.d = c; + this.c = d; + } + function QIc(a, b, c, d) { + this.a = a; + this.c = b; + this.b = c; + this.d = d; + } + function rKc(a, b, c, d) { + this.c = a; + this.b = b; + this.a = c; + this.d = d; + } + function WKc(a, b, c, d) { + this.c = a; + this.b = b; + this.d = c; + this.a = d; + } + function J6c(a, b, c, d) { + this.c = a; + this.d = b; + this.b = c; + this.a = d; + } + function gPc(a, b, c, d) { + this.a = a; + this.d = b; + this.c = c; + this.b = d; + } + function Blc(a, b, c, d) { + $r.call(this, a, b); + this.a = c; + this.b = d; + } + function Ggd(a, b, c, d) { + this.a = a; + this.c = b; + this.d = c; + this.b = d; + } + function pec(a, b, c) { + Pmc(a.a, c); + dmc(c); + enc(a.b, c); + xmc(b, c); + } + function Pid(a, b, c) { + var d, e; + d = QEd(a); + e = b.Kh(c, d); + return e; + } + function KPb(a, b) { + var c, d; + c = a / b; + d = QD(c); + c > d && ++d; + return d; + } + function Nnd(a) { + var b, c; + c = (b = new UQd(), b); + NQd(c, a); + return c; + } + function Ond(a) { + var b, c; + c = (b = new UQd(), b); + RQd(c, a); + return c; + } + function hqd(a, b) { + var c; + c = Ohb(a.f, b); + Yqd(b, c); + return null; + } + function JZb(a) { + var b; + b = P2b(a); + if (b) { + return b; + } + return null; + } + function Wod(a) { + !a.b && (a.b = new cUd(B2, a, 12, 3)); + return a.b; + } + function YEd(a) { + return a != null && hnb(GEd, a.toLowerCase()); + } + function ied(a, b) { + return Kdb(red(a) * qed(a), red(b) * qed(b)); + } + function jed(a, b) { + return Kdb(red(a) * qed(a), red(b) * qed(b)); + } + function wEb(a, b) { + return Kdb(a.d.c + a.d.b / 2, b.d.c + b.d.b / 2); + } + function UVb(a, b) { + return Kdb(a.g.c + a.g.b / 2, b.g.c + b.g.b / 2); + } + function pQb(a, b, c) { + c.a ? eld(a, b.b - a.f / 2) : dld(a, b.a - a.g / 2); + } + function prd(a, b, c, d) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + } + function ord(a, b, c, d) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + } + function JVd(a, b, c, d) { + this.e = a; + this.a = b; + this.c = c; + this.d = d; + } + function ZVd(a, b, c, d) { + this.a = a; + this.c = b; + this.d = c; + this.b = d; + } + function cXd(a, b, c, d) { + UVd(); + mWd.call(this, b, c, d); + this.a = a; + } + function jXd(a, b, c, d) { + UVd(); + mWd.call(this, b, c, d); + this.a = a; + } + function Ng(a, b) { + this.a = a; + Hg.call(this, a, BD(a.d, 15).Zc(b)); + } + function ZBd(a) { + this.f = a; + this.c = this.f.e; + a.f > 0 && YBd(this); + } + function lBb(a, b, c, d) { + this.b = a; + this.c = d; + nvb.call(this, b, c); + } + function tib(a) { + sCb(a.b < a.d.gc()); + return a.d.Xb(a.c = a.b++); + } + function Osb(a) { + a.a.a = a.c; + a.c.b = a.a; + a.a.b = a.c.a = null; + a.b = 0; + } + function u_b(a, b) { + a.b = b.b; + a.c = b.c; + a.d = b.d; + a.a = b.a; + return a; + } + function Ry(a) { + if (a.n) { + a.e !== Sie && a._d(); + a.j = null; + } + return a; + } + function FD(a) { + CCb(a == null || OD(a) && !(a.im === gcb)); + return a; + } + function p4b(a) { + this.b = new Rkb(); + Gkb(this.b, this.b); + this.a = a; + } + function QPb() { + QPb = ccb; + PPb = new Rkb(); + OPb = new Lqb(); + NPb = new Rkb(); + } + function mmb() { + mmb = ccb; + jmb = new xmb(); + kmb = new Qmb(); + lmb = new Ymb(); + } + function ipb() { + ipb = ccb; + fpb = new kpb(); + gpb = new kpb(); + hpb = new ppb(); + } + function ODb() { + ODb = ccb; + LDb = new JDb(); + NDb = new oEb(); + MDb = new fEb(); + } + function MCb() { + if (HCb == 256) { + GCb = ICb; + ICb = new nb(); + HCb = 0; + } + ++HCb; + } + function nd(a) { + var b; + return b = a.f, !b ? a.f = new ne(a, a.c) : b; + } + function d2b(a) { + return Qld(a) && Ccb(DD(hkd(a, (Nyc(), gxc)))); + } + function mcc(a, b) { + return Rc(a, BD(vNb(b, (Nyc(), Nxc)), 19), b); + } + function POc(a, b) { + return vPc(a.j, b.s, b.c) + vPc(b.e, a.s, a.c); + } + function ooc(a, b) { + if (!!a.e && !a.e.a) { + moc(a.e, b); + ooc(a.e, b); + } + } + function noc(a, b) { + if (!!a.d && !a.d.a) { + moc(a.d, b); + noc(a.d, b); + } + } + function hed(a, b) { + return -Kdb(red(a) * qed(a), red(b) * qed(b)); + } + function cgd(a) { + return BD(a.cd(), 146).tg() + ":" + fcb(a.dd()); + } + function Zgc(a) { + Hgc(); + var b; + b = BD(a.g, 10); + b.n.a = a.d.c + b.d.b; + } + function wgc(a, b, c) { + qgc(); + return iEb(BD(Ohb(a.e, b), 522), c); + } + function Y2c(a, b) { + rb(a); + rb(b); + return Xr(BD(a, 22), BD(b, 22)); + } + function oic(a, b, c) { + a.i = 0; + a.e = 0; + if (b == c) { + return; + } + kic(a, b, c); + } + function pic(a, b, c) { + a.i = 0; + a.e = 0; + if (b == c) { + return; + } + lic(a, b, c); + } + function Spd(a, b, c) { + var d, e; + d = Kcb(c); + e = new TB(d); + cC(a, b, e); + } + function FSd(a, b, c, d, e, f) { + ESd.call(this, a, b, c, d, e, f ? -2 : -1); + } + function U5d(a, b, c, d) { + MLd.call(this, b, c); + this.b = a; + this.a = d; + } + function QRc(a, b) { + new Psb(); + this.a = new s7c(); + this.b = a; + this.c = b; + } + function Hec(a, b) { + BD(vNb(a, (wtc(), Qsc)), 15).Fc(b); + return b; + } + function Rb(a, b) { + if (a == null) { + throw vbb(new Heb(b)); + } + return a; + } + function WKd(a) { + !a.q && (a.q = new cUd(n5, a, 11, 10)); + return a.q; + } + function ZKd(a) { + !a.s && (a.s = new cUd(t5, a, 21, 17)); + return a.s; + } + function Vod(a) { + !a.a && (a.a = new cUd(E2, a, 10, 11)); + return a.a; + } + function Dx(a) { + return JD(a, 14) ? new Vqb(BD(a, 14)) : Ex(a.Kc()); + } + function Ni(a) { + return new aj(a, a.e.Hd().gc() * a.c.Hd().gc()); + } + function Zi(a) { + return new kj(a, a.e.Hd().gc() * a.c.Hd().gc()); + } + function rz(a) { + return !!a && !!a.hashCode ? a.hashCode() : FCb(a); + } + function Qhb(a, b) { + return b == null ? !!irb(a.f, null) : Brb(a.g, b); + } + function Oq(a) { + Qb(a); + return mr(new Sr(ur(a.a.Kc(), new Sq()))); + } + function vmb(a) { + mmb(); + return JD(a, 54) ? new Yob(a) : new Inb(a); + } + function VDb(a, b, c) { + if (a.f) { + return a.f.Ne(b, c); + } + return false; + } + function Gfb(a, b) { + a.a = qfb(a.a, 0, b) + "" + pfb(a.a, b + 1); + return a; + } + function fVb(a, b) { + var c; + c = Sqb(a.a, b); + c && (b.d = null); + return c; + } + function zpb(a) { + var b, c; + c = a; + b = c.$modCount | 0; + c.$modCount = b + 1; + } + function pu(a) { + this.b = a; + this.c = a; + a.e = null; + a.c = null; + this.a = 1; + } + function hOb(a) { + this.b = a; + this.a = new Hxb(BD(Qb(new kOb()), 62)); + } + function uEb(a) { + this.c = a; + this.b = new Hxb(BD(Qb(new xEb()), 62)); + } + function SVb(a) { + this.c = a; + this.b = new Hxb(BD(Qb(new VVb()), 62)); + } + function FYb() { + this.a = new HXb(); + this.b = new LXb(); + this.d = new SYb(); + } + function UZb() { + this.a = new s7c(); + this.b = (Xj(3, Jie), new Skb(3)); + } + function VMc() { + this.b = new Tqb(); + this.d = new Psb(); + this.e = new twb(); + } + function K6c(a) { + this.c = a.c; + this.d = a.d; + this.b = a.b; + this.a = a.a; + } + function Ay(a, b) { + oi.call(this, new Qwb(a)); + this.a = a; + this.b = b; + } + function eod() { + bod(this, new $md()); + this.wb = (NFd(), MFd); + LFd(); + } + function eHc(a) { + Odd(a, "No crossing minimization", 1); + Qdd(a); + } + function Gz(a) { + Az(); + $wnd.setTimeout(function() { + throw a; + }, 0); + } + function _Kd(a) { + if (!a.u) { + $Kd(a); + a.u = new YOd(a, a); + } + return a.u; + } + function wjd(a) { + var b; + b = BD(Ajd(a, 16), 26); + return !b ? a.zh() : b; + } + function Jsd(a, b) { + return JD(b, 146) && dfb(a.b, BD(b, 146).tg()); + } + function t0d(a, b) { + return a.a ? b.Wg().Kc() : BD(b.Wg(), 69).Zh(); + } + function u3b(a) { + return a.k == (j0b(), h0b) && wNb(a, (wtc(), Csc)); + } + function ux(a) { + this.a = (mmb(), JD(a, 54) ? new Yob(a) : new Inb(a)); + } + function Rz() { + Rz = ccb; + var a, b; + b = !Xz(); + a = new dA(); + Qz = b ? new Yz() : a; + } + function Wy(a, b) { + var c; + c = hdb(a.gm); + return b == null ? c : c + ": " + b; + } + function Eob(a, b) { + var c; + c = a.b.Qc(b); + Fob(c, a.b.gc()); + return c; + } + function ytb(a, b) { + if (a == null) { + throw vbb(new Heb(b)); + } + return a; + } + function irb(a, b) { + return grb(a, b, hrb(a, b == null ? 0 : a.b.se(b))); + } + function ofb(a, b, c) { + return c >= 0 && dfb(a.substr(c, b.length), b); + } + function H2d(a, b, c, d, e, f, g) { + return new O7d(a.e, b, c, d, e, f, g); + } + function Cxd(a, b, c, d, e, f) { + this.a = a; + nxd.call(this, b, c, d, e, f); + } + function vyd(a, b, c, d, e, f) { + this.a = a; + nxd.call(this, b, c, d, e, f); + } + function $Ec(a, b) { + this.g = a; + this.d = OC(GC(OQ, 1), kne, 10, 0, [b]); + } + function KVd(a, b) { + this.e = a; + this.a = SI; + this.b = R5d(b); + this.c = b; + } + function cIb(a, b) { + $Gb.call(this); + THb(this); + this.a = a; + this.c = b; + } + function kBc(a, b, c, d) { + NC(a.c[b.g], c.g, d); + NC(a.c[c.g], b.g, d); + } + function nBc(a, b, c, d) { + NC(a.c[b.g], b.g, c); + NC(a.b[b.g], b.g, d); + } + function cBc() { + _Ac(); + return OC(GC(fX, 1), Kie, 376, 0, [$Ac, ZAc]); + } + function crc() { + _qc(); + return OC(GC(MW, 1), Kie, 479, 0, [$qc, Zqc]); + } + function Aqc() { + xqc(); + return OC(GC(JW, 1), Kie, 419, 0, [vqc, wqc]); + } + function Lpc() { + Ipc(); + return OC(GC(FW, 1), Kie, 422, 0, [Gpc, Hpc]); + } + function psc() { + msc(); + return OC(GC(SW, 1), Kie, 420, 0, [ksc, lsc]); + } + function EAc() { + BAc(); + return OC(GC(cX, 1), Kie, 421, 0, [zAc, AAc]); + } + function XIc() { + UIc(); + return OC(GC(mY, 1), Kie, 523, 0, [TIc, SIc]); + } + function KOc() { + HOc(); + return OC(GC(DZ, 1), Kie, 520, 0, [GOc, FOc]); + } + function _Lc() { + YLc(); + return OC(GC(fZ, 1), Kie, 516, 0, [XLc, WLc]); + } + function hMc() { + eMc(); + return OC(GC(gZ, 1), Kie, 515, 0, [cMc, dMc]); + } + function IQc() { + FQc(); + return OC(GC(YZ, 1), Kie, 455, 0, [DQc, EQc]); + } + function bUc() { + $Tc(); + return OC(GC(F$, 1), Kie, 425, 0, [ZTc, YTc]); + } + function VTc() { + STc(); + return OC(GC(E$, 1), Kie, 480, 0, [QTc, RTc]); + } + function VUc() { + PUc(); + return OC(GC(K$, 1), Kie, 495, 0, [NUc, OUc]); + } + function jWc() { + fWc(); + return OC(GC(X$, 1), Kie, 426, 0, [dWc, eWc]); + } + function g1c() { + a1c(); + return OC(GC(X_, 1), Kie, 429, 0, [_0c, $0c]); + } + function F_c() { + C_c(); + return OC(GC(P_, 1), Kie, 430, 0, [B_c, A_c]); + } + function PEb() { + MEb(); + return OC(GC(aN, 1), Kie, 428, 0, [LEb, KEb]); + } + function XEb() { + UEb(); + return OC(GC(bN, 1), Kie, 427, 0, [SEb, TEb]); + } + function $Rb() { + XRb(); + return OC(GC(gP, 1), Kie, 424, 0, [VRb, WRb]); + } + function B5b() { + y5b(); + return OC(GC(ZR, 1), Kie, 511, 0, [x5b, w5b]); + } + function lid(a, b, c, d) { + return c >= 0 ? a.jh(b, c, d) : a.Sg(null, c, d); + } + function hgd(a) { + if (a.b.b == 0) { + return a.a.$e(); + } + return Lsb(a.b); + } + function Xwd(a) { + if (a.p != 5) + throw vbb(new Ydb()); + return Tbb(a.f); + } + function exd(a) { + if (a.p != 5) + throw vbb(new Ydb()); + return Tbb(a.k); + } + function pNd(a) { + PD(a.a) === PD((NKd(), MKd)) && qNd(a); + return a.a; + } + function by(a) { + this.a = BD(Qb(a), 271); + this.b = (mmb(), new Zob(a)); + } + function bQc(a, b) { + $Pc(this, new f7c(a.a, a.b)); + _Pc(this, Ru(b)); + } + function FQc() { + FQc = ccb; + DQc = new GQc(jle, 0); + EQc = new GQc(kle, 1); + } + function YLc() { + YLc = ccb; + XLc = new ZLc(kle, 0); + WLc = new ZLc(jle, 1); + } + function Hp() { + Gp.call(this, new Mqb(Cv(12))); + Lb(true); + this.a = 2; + } + function Hge(a, b, c) { + wfe(); + xfe.call(this, a); + this.b = b; + this.a = c; + } + function cWd(a, b, c) { + UVd(); + VVd.call(this, b); + this.a = a; + this.b = c; + } + function aIb(a) { + $Gb.call(this); + THb(this); + this.a = a; + this.c = true; + } + function isb(a) { + var b; + b = a.c.d.b; + a.b = b; + a.a = a.c.d; + b.a = a.c.d.b = a; + } + function $Cb(a) { + var b; + NGb(a.a); + MGb(a.a); + b = new YGb(a.a); + UGb(b); + } + function iKb(a, b) { + hKb(a, true); + Hkb(a.e.wf(), new mKb(a, true, b)); + } + function tlb(a, b) { + pCb(b); + return vlb(a, KC(WD, oje, 25, b, 15, 1), b); + } + function YPb(a, b) { + QPb(); + return a == Xod(jtd(b)) || a == Xod(ltd(b)); + } + function Phb(a, b) { + return b == null ? Wd(irb(a.f, null)) : Crb(a.g, b); + } + function Ksb(a) { + return a.b == 0 ? null : (sCb(a.b != 0), Nsb(a, a.a.a)); + } + function QD(a) { + return Math.max(Math.min(a, Ohe), -2147483648) | 0; + } + function uz(a, b) { + var c = tz[a.charCodeAt(0)]; + return c == null ? a : c; + } + function Cx(a, b) { + Rb(a, "set1"); + Rb(b, "set2"); + return new Px(a, b); + } + function QUb(a, b) { + var c; + c = zUb(a.f, b); + return P6c(V6c(c), a.f.d); + } + function Jwb(a, b) { + var c, d; + c = b; + d = new fxb(); + Lwb(a, c, d); + return d.d; + } + function NJb(a, b, c, d) { + var e; + e = new aHb(); + b.a[c.g] = e; + Npb(a.b, d, e); + } + function zid(a, b, c) { + var d; + d = a.Yg(b); + d >= 0 ? a.sh(d, c) : uid(a, b, c); + } + function hvd(a, b, c) { + evd(); + !!a && Rhb(dvd, a, b); + !!a && Rhb(cvd, a, c); + } + function g_c(a, b, c) { + this.i = new Rkb(); + this.b = a; + this.g = b; + this.a = c; + } + function VZc(a, b, c) { + this.c = new Rkb(); + this.e = a; + this.f = b; + this.b = c; + } + function b$c(a, b, c) { + this.a = new Rkb(); + this.e = a; + this.f = b; + this.c = c; + } + function Zy(a, b) { + Py(this); + this.f = b; + this.g = a; + Ry(this); + this._d(); + } + function ZA(a, b) { + var c; + c = a.q.getHours(); + a.q.setDate(b); + YA(a, c); + } + function no(a, b) { + var c; + Qb(b); + for (c = a.a; c; c = c.c) { + b.Od(c.g, c.i); + } + } + function Fx(a) { + var b; + b = new Uqb(Cv(a.length)); + nmb(b, a); + return b; + } + function ecb(a) { + function b() { + } + b.prototype = a || {}; + return new b(); + } + function dkb(a, b) { + if (Zjb(a, b)) { + wkb(a); + return true; + } + return false; + } + function aC(a, b) { + if (b == null) { + throw vbb(new Geb()); + } + return bC(a, b); + } + function tdb(a) { + if (a.qe()) { + return null; + } + var b = a.n; + return _bb[b]; + } + function Mld(a) { + if (a.Db >> 16 != 3) + return null; + return BD(a.Cb, 33); + } + function mpd(a) { + if (a.Db >> 16 != 9) + return null; + return BD(a.Cb, 33); + } + function fmd(a) { + if (a.Db >> 16 != 6) + return null; + return BD(a.Cb, 79); + } + function Ind(a) { + if (a.Db >> 16 != 7) + return null; + return BD(a.Cb, 235); + } + function Fod(a) { + if (a.Db >> 16 != 7) + return null; + return BD(a.Cb, 160); + } + function Xod(a) { + if (a.Db >> 16 != 11) + return null; + return BD(a.Cb, 33); + } + function nid(a, b) { + var c; + c = a.Yg(b); + return c >= 0 ? a.lh(c) : tid(a, b); + } + function Dtd(a, b) { + var c; + c = new Bsb(b); + Ve(c, a); + return new Tkb(c); + } + function Uud(a) { + var b; + b = a.d; + b = a.si(a.f); + wtd(a, b); + return b.Ob(); + } + function t_b(a, b) { + a.b += b.b; + a.c += b.c; + a.d += b.d; + a.a += b.a; + return a; + } + function A4b(a, b) { + return $wnd.Math.abs(a) < $wnd.Math.abs(b) ? a : b; + } + function Zod(a) { + return !a.a && (a.a = new cUd(E2, a, 10, 11)), a.a.i > 0; + } + function oDb() { + this.a = new zsb(); + this.e = new Tqb(); + this.g = 0; + this.i = 0; + } + function BGc(a) { + this.a = a; + this.b = KC(SX, nie, 1944, a.e.length, 0, 2); + } + function RHc(a, b, c) { + var d; + d = SHc(a, b, c); + a.b = new BHc(d.c.length); + } + function eMc() { + eMc = ccb; + cMc = new fMc(vle, 0); + dMc = new fMc("UP", 1); + } + function STc() { + STc = ccb; + QTc = new TTc(Yqe, 0); + RTc = new TTc("FAN", 1); + } + function evd() { + evd = ccb; + dvd = new Lqb(); + cvd = new Lqb(); + ivd(hK, new jvd()); + } + function Swd(a) { + if (a.p != 0) + throw vbb(new Ydb()); + return Kbb(a.f, 0); + } + function _wd(a) { + if (a.p != 0) + throw vbb(new Ydb()); + return Kbb(a.k, 0); + } + function MHd(a) { + if (a.Db >> 16 != 3) + return null; + return BD(a.Cb, 147); + } + function ZJd(a) { + if (a.Db >> 16 != 6) + return null; + return BD(a.Cb, 235); + } + function WId(a) { + if (a.Db >> 16 != 17) + return null; + return BD(a.Cb, 26); + } + function rdb(a, b) { + var c = a.a = a.a || []; + return c[b] || (c[b] = a.le(b)); + } + function hrb(a, b) { + var c; + c = a.a.get(b); + return c == null ? new Array() : c; + } + function aB(a, b) { + var c; + c = a.q.getHours(); + a.q.setMonth(b); + YA(a, c); + } + function Shb(a, b, c) { + return b == null ? jrb(a.f, null, c) : Drb(a.g, b, c); + } + function FLd(a, b, c, d, e, f) { + return new pSd(a.e, b, a.aj(), c, d, e, f); + } + function Tfb(a, b, c) { + a.a = qfb(a.a, 0, b) + ("" + c) + pfb(a.a, b); + return a; + } + function bq(a, b, c) { + Ekb(a.a, (Vm(), Wj(b, c), new Wo(b, c))); + return a; + } + function uu(a) { + ot(a.c); + a.e = a.a = a.c; + a.c = a.c.c; + ++a.d; + return a.a.f; + } + function vu(a) { + ot(a.e); + a.c = a.a = a.e; + a.e = a.e.e; + --a.d; + return a.a.f; + } + function RZb(a, b) { + !!a.d && Lkb(a.d.e, a); + a.d = b; + !!a.d && Ekb(a.d.e, a); + } + function QZb(a, b) { + !!a.c && Lkb(a.c.g, a); + a.c = b; + !!a.c && Ekb(a.c.g, a); + } + function $_b(a, b) { + !!a.c && Lkb(a.c.a, a); + a.c = b; + !!a.c && Ekb(a.c.a, a); + } + function F0b(a, b) { + !!a.i && Lkb(a.i.j, a); + a.i = b; + !!a.i && Ekb(a.i.j, a); + } + function jDb(a, b, c) { + this.a = b; + this.c = a; + this.b = (Qb(c), new Tkb(c)); + } + function qXb(a, b, c) { + this.a = b; + this.c = a; + this.b = (Qb(c), new Tkb(c)); + } + function aOb(a, b) { + this.a = a; + this.c = R6c(this.a); + this.b = new K6c(b); + } + function IAb(a) { + var b; + Uzb(a); + b = new Tqb(); + return JAb(a, new jBb(b)); + } + function wCb(a, b) { + if (a < 0 || a > b) { + throw vbb(new qcb(Ake + a + Bke + b)); + } + } + function Ppb(a, b) { + return vqb(a.a, b) ? Qpb(a, BD(b, 22).g, null) : null; + } + function WUb(a) { + LUb(); + return Bcb(), BD(a.a, 81).d.e != 0 ? true : false; + } + function qs() { + qs = ccb; + ps = as((hs(), OC(GC(yG, 1), Kie, 538, 0, [gs]))); + } + function SBc() { + SBc = ccb; + RBc = c3c(new j3c(), (qUb(), pUb), (S8b(), J8b)); + } + function ZBc() { + ZBc = ccb; + YBc = c3c(new j3c(), (qUb(), pUb), (S8b(), J8b)); + } + function oCc() { + oCc = ccb; + nCc = c3c(new j3c(), (qUb(), pUb), (S8b(), J8b)); + } + function aJc() { + aJc = ccb; + _Ic = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function FJc() { + FJc = ccb; + EJc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function ILc() { + ILc = ccb; + HLc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function wMc() { + wMc = ccb; + vMc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function fUc() { + fUc = ccb; + eUc = c3c(new j3c(), (yRc(), xRc), (qSc(), kSc)); + } + function DOc(a, b, c, d) { + this.c = a; + this.d = d; + BOc(this, b); + COc(this, c); + } + function W3c(a) { + this.c = new Psb(); + this.b = a.b; + this.d = a.c; + this.a = a.a; + } + function e7c(a) { + this.a = $wnd.Math.cos(a); + this.b = $wnd.Math.sin(a); + } + function BOc(a, b) { + !!a.a && Lkb(a.a.k, a); + a.a = b; + !!a.a && Ekb(a.a.k, a); + } + function COc(a, b) { + !!a.b && Lkb(a.b.f, a); + a.b = b; + !!a.b && Ekb(a.b.f, a); + } + function D1c(a, b) { + E1c(a, a.b, a.c); + BD(a.b.b, 65); + !!b && BD(b.b, 65).b; + } + function BUd(a, b) { + CUd(a, b); + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 2); + } + function cJd(a, b) { + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 4); + pnd(a, b); + } + function lKd(a, b) { + JD(a.Cb, 179) && (BD(a.Cb, 179).tb = null); + pnd(a, b); + } + function T2d(a, b) { + return Q6d(), YId(b) ? new R7d(b, a) : new f7d(b, a); + } + function jsd(a, b) { + var c, d; + c = b.c; + d = c != null; + d && Qpd(a, new yC(b.c)); + } + function XOd(a) { + var b, c; + c = (LFd(), b = new UQd(), b); + NQd(c, a); + return c; + } + function eTd(a) { + var b, c; + c = (LFd(), b = new UQd(), b); + NQd(c, a); + return c; + } + function yCc(a, b) { + var c; + c = new H1b(a); + b.c[b.c.length] = c; + return c; + } + function Aw(a, b) { + var c; + c = BD(Hv(nd(a.a), b), 14); + return !c ? 0 : c.gc(); + } + function UAb(a) { + var b; + Uzb(a); + b = (ipb(), ipb(), gpb); + return VAb(a, b); + } + function nr(a) { + var b; + while (true) { + b = a.Pb(); + if (!a.Ob()) { + return b; + } + } + } + function Ki(a, b) { + Ii.call(this, new Mqb(Cv(a))); + Xj(b, mie); + this.a = b; + } + function Jib(a, b, c) { + xCb(b, c, a.gc()); + this.c = a; + this.a = b; + this.b = c - b; + } + function Mkb(a, b, c) { + var d; + xCb(b, c, a.c.length); + d = c - b; + cCb(a.c, b, d); + } + function Fub(a, b) { + Eub(a, Tbb(xbb(Obb(b, 24), nke)), Tbb(xbb(b, nke))); + } + function tCb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new qcb(Ake + a + Bke + b)); + } + } + function BCb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new Xfb(Ake + a + Bke + b)); + } + } + function Kub(a, b) { + this.b = (uCb(a), a); + this.a = (b & Rje) == 0 ? b | 64 | oie : b; + } + function kkb(a) { + Vjb(this); + dCb(this.a, geb($wnd.Math.max(8, a)) << 1); + } + function A0b(a) { + return l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a])); + } + function Iyb() { + Fyb(); + return OC(GC(xL, 1), Kie, 132, 0, [Cyb, Dyb, Eyb]); + } + function jHb() { + gHb(); + return OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]); + } + function QHb() { + NHb(); + return OC(GC(sN, 1), Kie, 461, 0, [LHb, KHb, MHb]); + } + function HIb() { + EIb(); + return OC(GC(zN, 1), Kie, 462, 0, [DIb, CIb, BIb]); + } + function UXb() { + RXb(); + return OC(GC(hQ, 1), Kie, 423, 0, [QXb, PXb, OXb]); + } + function BTb() { + yTb(); + return OC(GC(oP, 1), Kie, 379, 0, [wTb, vTb, xTb]); + } + function Bzc() { + xzc(); + return OC(GC(ZW, 1), Kie, 378, 0, [uzc, vzc, wzc]); + } + function Xpc() { + Rpc(); + return OC(GC(GW, 1), Kie, 314, 0, [Ppc, Opc, Qpc]); + } + function eqc() { + bqc(); + return OC(GC(HW, 1), Kie, 337, 0, [$pc, aqc, _pc]); + } + function Jqc() { + Gqc(); + return OC(GC(KW, 1), Kie, 450, 0, [Eqc, Dqc, Fqc]); + } + function Ikc() { + Fkc(); + return OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc]); + } + function hsc() { + esc(); + return OC(GC(RW, 1), Kie, 303, 0, [csc, dsc, bsc]); + } + function $rc() { + Xrc(); + return OC(GC(QW, 1), Kie, 292, 0, [Vrc, Wrc, Urc]); + } + function NAc() { + KAc(); + return OC(GC(dX, 1), Kie, 452, 0, [JAc, HAc, IAc]); + } + function wAc() { + tAc(); + return OC(GC(bX, 1), Kie, 339, 0, [rAc, qAc, sAc]); + } + function WAc() { + TAc(); + return OC(GC(eX, 1), Kie, 375, 0, [QAc, RAc, SAc]); + } + function OBc() { + LBc(); + return OC(GC(jX, 1), Kie, 377, 0, [JBc, KBc, IBc]); + } + function wBc() { + tBc(); + return OC(GC(hX, 1), Kie, 336, 0, [qBc, rBc, sBc]); + } + function FBc() { + CBc(); + return OC(GC(iX, 1), Kie, 338, 0, [BBc, zBc, ABc]); + } + function uGc() { + rGc(); + return OC(GC(PX, 1), Kie, 454, 0, [oGc, pGc, qGc]); + } + function xVc() { + tVc(); + return OC(GC(O$, 1), Kie, 442, 0, [sVc, qVc, rVc]); + } + function tWc() { + pWc(); + return OC(GC(Y$, 1), Kie, 380, 0, [mWc, nWc, oWc]); + } + function CYc() { + zYc(); + return OC(GC(q_, 1), Kie, 381, 0, [xYc, yYc, wYc]); + } + function wXc() { + sXc(); + return OC(GC(b_, 1), Kie, 293, 0, [qXc, rXc, pXc]); + } + function _$c() { + Y$c(); + return OC(GC(J_, 1), Kie, 437, 0, [V$c, W$c, X$c]); + } + function kbd() { + hbd(); + return OC(GC(z1, 1), Kie, 334, 0, [fbd, ebd, gbd]); + } + function tad() { + qad(); + return OC(GC(u1, 1), Kie, 272, 0, [nad, oad, pad]); + } + function o3d(a, b) { + return p3d(a, b, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function LZc(a, b, c) { + var d; + d = MZc(a, b, false); + return d.b <= b && d.a <= c; + } + function tMc(a, b, c) { + var d; + d = new sMc(); + d.b = b; + d.a = c; + ++b.b; + Ekb(a.d, d); + } + function fs(a, b) { + var c; + c = (uCb(a), a).g; + lCb(!!c); + uCb(b); + return c(b); + } + function av(a, b) { + var c, d; + d = cv(a, b); + c = a.a.Zc(d); + return new qv(a, c); + } + function cKd(a) { + if (a.Db >> 16 != 6) + return null; + return BD(aid(a), 235); + } + function Uwd(a) { + if (a.p != 2) + throw vbb(new Ydb()); + return Tbb(a.f) & aje; + } + function bxd(a) { + if (a.p != 2) + throw vbb(new Ydb()); + return Tbb(a.k) & aje; + } + function Z1d(a) { + a.a == (T0d(), S0d) && d2d(a, U0d(a.g, a.b)); + return a.a; + } + function _1d(a) { + a.d == (T0d(), S0d) && f2d(a, Y0d(a.g, a.b)); + return a.d; + } + function mlb(a) { + sCb(a.a < a.c.c.length); + a.b = a.a++; + return a.c.c[a.b]; + } + function hEb(a, b) { + a.b = a.b | b.b; + a.c = a.c | b.c; + a.d = a.d | b.d; + a.a = a.a | b.a; + } + function xbb(a, b) { + return zbb(dD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Mbb(a, b) { + return zbb(jD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Vbb(a, b) { + return zbb(rD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Dub(a) { + return wbb(Nbb(Cbb(Cub(a, 32)), 32), Cbb(Cub(a, 32))); + } + function Mu(a) { + Qb(a); + return JD(a, 14) ? new Tkb(BD(a, 14)) : Nu(a.Kc()); + } + function EWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(b.d, a.d) : Kdb(a.c, b.c); + } + function FWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(a.d, b.d) : Kdb(a.c, b.c); + } + function HWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(a.d, b.d) : Kdb(b.c, a.c); + } + function GWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(b.d, a.d) : Kdb(b.c, a.c); + } + function WGb(a, b) { + var c; + c = Edb(ED(a.a.We((Y9c(), Q9c)))); + XGb(a, b, c); + } + function Rgc(a, b) { + var c; + c = BD(Ohb(a.g, b), 57); + Hkb(b.d, new Qhc(a, c)); + } + function GYb(a, b) { + var c, d; + c = d_b(a); + d = d_b(b); + return c < d ? -1 : c > d ? 1 : 0; + } + function bjc(a, b) { + var c, d; + c = ajc(b); + d = c; + return BD(Ohb(a.c, d), 19).a; + } + function iSc(a, b) { + var c; + c = a + ""; + while (c.length < b) { + c = "0" + c; + } + return c; + } + function WRc(a) { + return a.c == null || a.c.length == 0 ? "n_" + a.g : "n_" + a.c; + } + function oRb(a) { + return a.c == null || a.c.length == 0 ? "n_" + a.b : "n_" + a.c; + } + function qz(a, b) { + return !!a && !!a.equals ? a.equals(b) : PD(a) === PD(b); + } + function dkd(a, b) { + if (b == 0) { + return !!a.o && a.o.f != 0; + } + return mid(a, b); + } + function Tdd(a, b, c) { + var d; + if (a.n && !!b && !!c) { + d = new kgd(); + Ekb(a.e, d); + } + } + function cIc(a, b, c) { + var d; + d = a.d[b.p]; + a.d[b.p] = a.d[c.p]; + a.d[c.p] = d; + } + function kxd(a, b, c) { + this.d = a; + this.j = b; + this.e = c; + this.o = -1; + this.p = 3; + } + function lxd(a, b, c) { + this.d = a; + this.k = b; + this.f = c; + this.o = -1; + this.p = 5; + } + function zge(a, b, c) { + xfe.call(this, 25); + this.b = a; + this.a = b; + this.c = c; + } + function $fe(a) { + wfe(); + xfe.call(this, a); + this.c = false; + this.a = false; + } + function sSd(a, b, c, d, e, f) { + rSd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function uSd(a, b, c, d, e, f) { + tSd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function wSd(a, b, c, d, e, f) { + vSd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function ySd(a, b, c, d, e, f) { + xSd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function ASd(a, b, c, d, e, f) { + zSd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function CSd(a, b, c, d, e, f) { + BSd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function HSd(a, b, c, d, e, f) { + GSd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function JSd(a, b, c, d, e, f) { + ISd.call(this, a, b, c, d, e); + f && (this.o = -2); + } + function nWd(a, b, c, d) { + VVd.call(this, c); + this.b = a; + this.c = b; + this.d = d; + } + function x$c(a, b) { + this.a = new Rkb(); + this.d = new Rkb(); + this.f = a; + this.c = b; + } + function PTb() { + this.c = new bUb(); + this.a = new FYb(); + this.b = new wZb(); + $Yb(); + } + function b2c() { + Y1c(); + this.b = new Lqb(); + this.a = new Lqb(); + this.c = new Rkb(); + } + function j2d(a, b) { + this.g = a; + this.d = (T0d(), S0d); + this.a = S0d; + this.b = b; + } + function O1d(a, b) { + this.f = a; + this.a = (T0d(), R0d); + this.c = R0d; + this.b = b; + } + function h9d(a, b) { + !a.c && (a.c = new u3d(a, 0)); + f3d(a.c, (Q8d(), I8d), b); + } + function $Tc() { + $Tc = ccb; + ZTc = new _Tc("DFS", 0); + YTc = new _Tc("BFS", 1); + } + function Cc(a, b, c) { + var d; + d = BD(a.Zb().xc(b), 14); + return !!d && d.Hc(c); + } + function Gc(a, b, c) { + var d; + d = BD(a.Zb().xc(b), 14); + return !!d && d.Mc(c); + } + function Ofb(a, b, c, d) { + a.a += "" + qfb(b == null ? Xhe : fcb(b), c, d); + return a; + } + function Xnd(a, b, c, d, e, f) { + Ynd(a, b, c, f); + eLd(a, d); + fLd(a, e); + return a; + } + function Ysb(a) { + sCb(a.b.b != a.d.a); + a.c = a.b = a.b.b; + --a.a; + return a.c.c; + } + function Jgb(a) { + while (a.d > 0 && a.a[--a.d] == 0) + ; + a.a[a.d++] == 0 && (a.e = 0); + } + function wwb(a) { + return !a.a ? a.c : a.e.length == 0 ? a.a.a : a.a.a + ("" + a.e); + } + function RSd(a) { + return !!a.a && QSd(a.a.a).i != 0 && !(!!a.b && QTd(a.b)); + } + function cLd(a) { + return !!a.u && VKd(a.u.a).i != 0 && !(!!a.n && FMd(a.n)); + } + function $i(a) { + return Zj(a.e.Hd().gc() * a.c.Hd().gc(), 16, new ij(a)); + } + function XA(a, b) { + return ueb(Cbb(a.q.getTime()), Cbb(b.q.getTime())); + } + function k_b(a) { + return BD(Qkb(a, KC(AQ, jne, 17, a.c.length, 0, 1)), 474); + } + function l_b(a) { + return BD(Qkb(a, KC(OQ, kne, 10, a.c.length, 0, 1)), 193); + } + function cKc(a) { + FJc(); + return !OZb(a) && !(!OZb(a) && a.c.i.c == a.d.i.c); + } + function kDb(a, b, c) { + var d; + d = (Qb(a), new Tkb(a)); + iDb(new jDb(d, b, c)); + } + function rXb(a, b, c) { + var d; + d = (Qb(a), new Tkb(a)); + pXb(new qXb(d, b, c)); + } + function Nwb(a, b) { + var c; + c = 1 - b; + a.a[c] = Owb(a.a[c], c); + return Owb(a, b); + } + function YXc(a, b) { + var c; + a.e = new QXc(); + c = gVc(b); + Okb(c, a.c); + ZXc(a, c, 0); + } + function o4c(a, b, c, d) { + var e; + e = new w4c(); + e.a = b; + e.b = c; + e.c = d; + Dsb(a.a, e); + } + function p4c(a, b, c, d) { + var e; + e = new w4c(); + e.a = b; + e.b = c; + e.c = d; + Dsb(a.b, e); + } + function i6d(a) { + var b, c, d; + b = new A6d(); + c = s6d(b, a); + z6d(b); + d = c; + return d; + } + function vZd() { + var a, b, c; + b = (c = (a = new UQd(), a), c); + Ekb(rZd, b); + return b; + } + function H2c(a) { + a.j.c = KC(SI, Uhe, 1, 0, 5, 1); + Ae(a.c); + h3c(a.a); + return a; + } + function tgc(a) { + qgc(); + if (JD(a.g, 10)) { + return BD(a.g, 10); + } + return null; + } + function Zw(a) { + if (Ah(a).dc()) { + return false; + } + Bh(a, new bx()); + return true; + } + function _y(b) { + if (!("stack" in b)) { + try { + throw b; + } catch (a) { + } + } + return b; + } + function Pb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new qcb(Ib(a, b))); + } + return a; + } + function Tb(a, b, c) { + if (a < 0 || b < a || b > c) { + throw vbb(new qcb(Kb(a, b, c))); + } + } + function eVb(a, b) { + Qqb(a.a, b); + if (b.d) { + throw vbb(new hz(Hke)); + } + b.d = a; + } + function xpb(a, b) { + if (b.$modCount != a.$modCount) { + throw vbb(new Apb()); + } + } + function $pb(a, b) { + if (JD(b, 42)) { + return Jd(a.a, BD(b, 42)); + } + return false; + } + function dib(a, b) { + if (JD(b, 42)) { + return Jd(a.a, BD(b, 42)); + } + return false; + } + function msb(a, b) { + if (JD(b, 42)) { + return Jd(a.a, BD(b, 42)); + } + return false; + } + function qAb(a, b) { + if (a.a <= a.b) { + b.ud(a.a++); + return true; + } + return false; + } + function Sbb(a) { + var b; + if (Fbb(a)) { + b = a; + return b == -0 ? 0 : b; + } + return oD(a); + } + function tAb(a) { + var b; + Tzb(a); + b = new drb(); + _ub(a.a, new BAb(b)); + return b; + } + function Yzb(a) { + var b; + Tzb(a); + b = new Gpb(); + _ub(a.a, new mAb(b)); + return b; + } + function Bib(a, b) { + this.a = a; + vib.call(this, a); + wCb(b, a.gc()); + this.b = b; + } + function orb(a) { + this.e = a; + this.b = this.e.a.entries(); + this.a = new Array(); + } + function Oi(a) { + return Zj(a.e.Hd().gc() * a.c.Hd().gc(), 273, new cj(a)); + } + function Qu(a) { + return new Skb((Xj(a, Mie), Oy(wbb(wbb(5, a), a / 10 | 0)))); + } + function m_b(a) { + return BD(Qkb(a, KC(aR, lne, 11, a.c.length, 0, 1)), 1943); + } + function sMb(a, b, c) { + return c.f.c.length > 0 ? HMb(a.a, b, c) : HMb(a.b, b, c); + } + function SZb(a, b, c) { + !!a.d && Lkb(a.d.e, a); + a.d = b; + !!a.d && Dkb(a.d.e, c, a); + } + function a5b(a, b) { + i5b(b, a); + k5b(a.d); + k5b(BD(vNb(a, (Nyc(), wxc)), 207)); + } + function _4b(a, b) { + f5b(b, a); + h5b(a.d); + h5b(BD(vNb(a, (Nyc(), wxc)), 207)); + } + function Ypd(a, b) { + var c, d; + c = aC(a, b); + d = null; + !!c && (d = c.fe()); + return d; + } + function Zpd(a, b) { + var c, d; + c = tB(a, b); + d = null; + !!c && (d = c.ie()); + return d; + } + function $pd(a, b) { + var c, d; + c = aC(a, b); + d = null; + !!c && (d = c.ie()); + return d; + } + function _pd(a, b) { + var c, d; + c = aC(a, b); + d = null; + !!c && (d = aqd(c)); + return d; + } + function Tqd(a, b, c) { + var d; + d = Wpd(c); + ro(a.g, d, b); + ro(a.i, b, c); + return b; + } + function Ez(a, b, c) { + var d; + d = Cz(); + try { + return Bz(a, b, c); + } finally { + Fz(d); + } + } + function C6d(a) { + var b; + b = a.Wg(); + this.a = JD(b, 69) ? BD(b, 69).Zh() : b.Kc(); + } + function j3c() { + D2c.call(this); + this.j.c = KC(SI, Uhe, 1, 0, 5, 1); + this.a = -1; + } + function mxd(a, b, c, d) { + this.d = a; + this.n = b; + this.g = c; + this.o = d; + this.p = -1; + } + function jk(a, b, c, d) { + this.e = d; + this.d = null; + this.c = a; + this.a = b; + this.b = c; + } + function uEc(a, b, c) { + this.d = new HEc(this); + this.e = a; + this.i = b; + this.f = c; + } + function msc() { + msc = ccb; + ksc = new nsc(gle, 0); + lsc = new nsc("TOP_LEFT", 1); + } + function cDc() { + cDc = ccb; + bDc = ix(meb(1), meb(4)); + aDc = ix(meb(1), meb(2)); + } + function z_c() { + z_c = ccb; + y_c = as((s_c(), OC(GC(O_, 1), Kie, 551, 0, [r_c]))); + } + function q_c() { + q_c = ccb; + p_c = as((i_c(), OC(GC(N_, 1), Kie, 482, 0, [h_c]))); + } + function Z0c() { + Z0c = ccb; + Y0c = as((R0c(), OC(GC(W_, 1), Kie, 530, 0, [Q0c]))); + } + function hPb() { + hPb = ccb; + gPb = as((cPb(), OC(GC(GO, 1), Kie, 481, 0, [bPb]))); + } + function yLb() { + vLb(); + return OC(GC(PN, 1), Kie, 406, 0, [uLb, rLb, sLb, tLb]); + } + function qxb() { + lxb(); + return OC(GC(iL, 1), Kie, 297, 0, [hxb, ixb, jxb, kxb]); + } + function UOb() { + ROb(); + return OC(GC(CO, 1), Kie, 394, 0, [OOb, NOb, POb, QOb]); + } + function UMb() { + RMb(); + return OC(GC(jO, 1), Kie, 323, 0, [OMb, NMb, PMb, QMb]); + } + function sWb() { + lWb(); + return OC(GC(SP, 1), Kie, 405, 0, [hWb, kWb, iWb, jWb]); + } + function kbc() { + gbc(); + return OC(GC(VS, 1), Kie, 360, 0, [fbc, dbc, ebc, cbc]); + } + function Vc(a, b, c, d) { + return JD(c, 54) ? new Cg(a, b, c, d) : new qg(a, b, c, d); + } + function Djc() { + Ajc(); + return OC(GC(mV, 1), Kie, 411, 0, [wjc, xjc, yjc, zjc]); + } + function okc(a) { + var b; + return a.j == (Ucd(), Rcd) && (b = pkc(a), uqb(b, zcd)); + } + function Mdc(a, b) { + var c; + c = b.a; + QZb(c, b.c.d); + RZb(c, b.d.d); + q7c(c.a, a.n); + } + function Smc(a, b) { + return BD(Btb(QAb(BD(Qc(a.k, b), 15).Oc(), Hmc)), 113); + } + function Tmc(a, b) { + return BD(Btb(RAb(BD(Qc(a.k, b), 15).Oc(), Hmc)), 113); + } + function _w(a) { + return new Kub(rmb(BD(a.a.dd(), 14).gc(), a.a.cd()), 16); + } + function Qq(a) { + if (JD(a, 14)) { + return BD(a, 14).dc(); + } + return !a.Kc().Ob(); + } + function ugc(a) { + qgc(); + if (JD(a.g, 145)) { + return BD(a.g, 145); + } + return null; + } + function Ko(a) { + if (a.e.g != a.b) { + throw vbb(new Apb()); + } + return !!a.c && a.d > 0; + } + function Xsb(a) { + sCb(a.b != a.d.c); + a.c = a.b; + a.b = a.b.a; + ++a.a; + return a.c.c; + } + function Xjb(a, b) { + uCb(b); + NC(a.a, a.c, b); + a.c = a.c + 1 & a.a.length - 1; + _jb(a); + } + function Wjb(a, b) { + uCb(b); + a.b = a.b - 1 & a.a.length - 1; + NC(a.a, a.b, b); + _jb(a); + } + function A2c(a, b) { + var c; + for (c = a.j.c.length; c < b; c++) { + Ekb(a.j, a.rg()); + } + } + function gBc(a, b, c, d) { + var e; + e = d[b.g][c.g]; + return Edb(ED(vNb(a.a, e))); + } + function goc(a, b, c, d, e) { + this.i = a; + this.a = b; + this.e = c; + this.j = d; + this.f = e; + } + function DZc(a, b, c, d, e) { + this.a = a; + this.e = b; + this.f = c; + this.b = d; + this.g = e; + } + function Fz(a) { + a && Mz((Kz(), Jz)); + --xz; + if (a) { + if (zz != -1) { + Hz(zz); + zz = -1; + } + } + } + function Nzc() { + Izc(); + return OC(GC($W, 1), Kie, 197, 0, [Gzc, Hzc, Fzc, Ezc]); + } + function ERc() { + yRc(); + return OC(GC(h$, 1), Kie, 393, 0, [uRc, vRc, wRc, xRc]); + } + function mXc() { + iXc(); + return OC(GC(a_, 1), Kie, 340, 0, [hXc, fXc, gXc, eXc]); + } + function wdd() { + tdd(); + return OC(GC(I1, 1), Kie, 374, 0, [rdd, sdd, qdd, pdd]); + } + function vbd() { + rbd(); + return OC(GC(A1, 1), Kie, 285, 0, [qbd, nbd, obd, pbd]); + } + function Dad() { + Aad(); + return OC(GC(v1, 1), Kie, 218, 0, [zad, xad, wad, yad]); + } + function Ged() { + Ded(); + return OC(GC(O1, 1), Kie, 311, 0, [Ced, zed, Bed, Aed]); + } + function sgd() { + pgd(); + return OC(GC(k2, 1), Kie, 396, 0, [mgd, ngd, lgd, ogd]); + } + function gvd(a) { + evd(); + return Mhb(dvd, a) ? BD(Ohb(dvd, a), 331).ug() : null; + } + function cid(a, b, c) { + return b < 0 ? tid(a, c) : BD(c, 66).Nj().Sj(a, a.yh(), b); + } + function Sqd(a, b, c) { + var d; + d = Wpd(c); + ro(a.d, d, b); + Rhb(a.e, b, c); + return b; + } + function Uqd(a, b, c) { + var d; + d = Wpd(c); + ro(a.j, d, b); + Rhb(a.k, b, c); + return b; + } + function dtd(a) { + var b, c; + b = (Fhd(), c = new Tld(), c); + !!a && Rld(b, a); + return b; + } + function wud(a) { + var b; + b = a.ri(a.i); + a.i > 0 && $fb(a.g, 0, b, 0, a.i); + return b; + } + function qEd(a, b) { + pEd(); + var c; + c = BD(Ohb(oEd, a), 55); + return !c || c.wj(b); + } + function Twd(a) { + if (a.p != 1) + throw vbb(new Ydb()); + return Tbb(a.f) << 24 >> 24; + } + function axd(a) { + if (a.p != 1) + throw vbb(new Ydb()); + return Tbb(a.k) << 24 >> 24; + } + function gxd(a) { + if (a.p != 7) + throw vbb(new Ydb()); + return Tbb(a.k) << 16 >> 16; + } + function Zwd(a) { + if (a.p != 7) + throw vbb(new Ydb()); + return Tbb(a.f) << 16 >> 16; + } + function sr(a) { + var b; + b = 0; + while (a.Ob()) { + a.Pb(); + b = wbb(b, 1); + } + return Oy(b); + } + function nx(a, b) { + var c; + c = new Vfb(); + a.xd(c); + c.a += ".."; + b.yd(c); + return c.a; + } + function Sgc(a, b, c) { + var d; + d = BD(Ohb(a.g, c), 57); + Ekb(a.a.c, new vgd(b, d)); + } + function VCb(a, b, c) { + return Ddb(ED(Wd(irb(a.f, b))), ED(Wd(irb(a.f, c)))); + } + function E2d(a, b, c) { + return F2d(a, b, c, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function L2d(a, b, c) { + return M2d(a, b, c, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function q3d(a, b, c) { + return r3d(a, b, c, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function JJc(a, b) { + return a == (j0b(), h0b) && b == h0b ? 4 : a == h0b || b == h0b ? 8 : 32; + } + function Nd(a, b) { + return PD(b) === PD(a) ? "(this Map)" : b == null ? Xhe : fcb(b); + } + function kFd(a, b) { + return BD(b == null ? Wd(irb(a.f, null)) : Crb(a.g, b), 281); + } + function Rqd(a, b, c) { + var d; + d = Wpd(c); + Rhb(a.b, d, b); + Rhb(a.c, b, c); + return b; + } + function Bfd(a, b) { + var c; + c = b; + while (c) { + O6c(a, c.i, c.j); + c = Xod(c); + } + return a; + } + function kt(a, b) { + var c; + c = vmb(Nu(new wu(a, b))); + ir(new wu(a, b)); + return c; + } + function R6d(a, b) { + Q6d(); + var c; + c = BD(a, 66).Mj(); + kVd(c, b); + return c.Ok(b); + } + function TOc(a, b, c, d, e) { + var f; + f = OOc(e, c, d); + Ekb(b, tOc(e, f)); + XOc(a, e, b); + } + function mic(a, b, c) { + a.i = 0; + a.e = 0; + if (b == c) { + return; + } + lic(a, b, c); + kic(a, b, c); + } + function dB(a, b) { + var c; + c = a.q.getHours(); + a.q.setFullYear(b + nje); + YA(a, c); + } + function dC(d, a, b) { + if (b) { + var c = b.ee(); + d.a[a] = c(b); + } else { + delete d.a[a]; + } + } + function vB(d, a, b) { + if (b) { + var c = b.ee(); + b = c(b); + } else { + b = void 0; + } + d.a[a] = b; + } + function pCb(a) { + if (a < 0) { + throw vbb(new Feb("Negative array size: " + a)); + } + } + function VKd(a) { + if (!a.n) { + $Kd(a); + a.n = new JMd(a, j5, a); + _Kd(a); + } + return a.n; + } + function Fqb(a) { + sCb(a.a < a.c.a.length); + a.b = a.a; + Dqb(a); + return a.c.b[a.b]; + } + function Yjb(a) { + if (a.b == a.c) { + return; + } + a.a = KC(SI, Uhe, 1, 8, 5, 1); + a.b = 0; + a.c = 0; + } + function AQb(a) { + this.b = new Lqb(); + this.c = new Lqb(); + this.d = new Lqb(); + this.a = a; + } + function lge(a, b) { + wfe(); + xfe.call(this, a); + this.a = b; + this.c = -1; + this.b = -1; + } + function lSd(a, b, c, d) { + kxd.call(this, 1, c, d); + this.c = a; + this.b = b; + } + function mSd(a, b, c, d) { + lxd.call(this, 1, c, d); + this.c = a; + this.b = b; + } + function O7d(a, b, c, d, e, f, g) { + nxd.call(this, b, d, e, f, g); + this.c = a; + this.a = c; + } + function LVd(a, b, c) { + this.e = a; + this.a = SI; + this.b = R5d(b); + this.c = b; + this.d = c; + } + function Lo(a) { + this.e = a; + this.c = this.e.a; + this.b = this.e.g; + this.d = this.e.i; + } + function nYd(a) { + this.c = a; + this.a = BD(wId(a), 148); + this.b = this.a.Aj().Nh(); + } + function Irb(a) { + this.d = a; + this.b = this.d.a.entries(); + this.a = this.b.next(); + } + function $rb() { + Lqb.call(this); + Trb(this); + this.d.b = this.d; + this.d.a = this.d; + } + function mRb(a, b) { + _Qb.call(this); + this.a = a; + this.b = b; + Ekb(this.a.b, this); + } + function uFd(a, b) { + var c; + return c = b != null ? Phb(a, b) : Wd(irb(a.f, b)), RD(c); + } + function FFd(a, b) { + var c; + return c = b != null ? Phb(a, b) : Wd(irb(a.f, b)), RD(c); + } + function Fob(a, b) { + var c; + for (c = 0; c < b; ++c) { + NC(a, c, new Rob(BD(a[c], 42))); + } + } + function Lgb(a, b) { + var c; + for (c = a.d - 1; c >= 0 && a.a[c] === b[c]; c--) + ; + return c < 0; + } + function Ucc(a, b) { + Occ(); + var c; + c = a.j.g - b.j.g; + if (c != 0) { + return c; + } + return 0; + } + function Dtb(a, b) { + uCb(b); + if (a.a != null) { + return Itb(b.Kb(a.a)); + } + return ztb; + } + function Gx(a) { + var b; + if (a) { + return new Bsb(a); + } + b = new zsb(); + Jq(b, a); + return b; + } + function GAb(a, b) { + var c; + return b.b.Kb(SAb(a, b.c.Ee(), (c = new TBb(b), c))); + } + function Hub(a) { + zub(); + Eub(this, Tbb(xbb(Obb(a, 24), nke)), Tbb(xbb(a, nke))); + } + function REb() { + REb = ccb; + QEb = as((MEb(), OC(GC(aN, 1), Kie, 428, 0, [LEb, KEb]))); + } + function ZEb() { + ZEb = ccb; + YEb = as((UEb(), OC(GC(bN, 1), Kie, 427, 0, [SEb, TEb]))); + } + function aSb() { + aSb = ccb; + _Rb = as((XRb(), OC(GC(gP, 1), Kie, 424, 0, [VRb, WRb]))); + } + function D5b() { + D5b = ccb; + C5b = as((y5b(), OC(GC(ZR, 1), Kie, 511, 0, [x5b, w5b]))); + } + function Cqc() { + Cqc = ccb; + Bqc = as((xqc(), OC(GC(JW, 1), Kie, 419, 0, [vqc, wqc]))); + } + function erc() { + erc = ccb; + drc = as((_qc(), OC(GC(MW, 1), Kie, 479, 0, [$qc, Zqc]))); + } + function eBc() { + eBc = ccb; + dBc = as((_Ac(), OC(GC(fX, 1), Kie, 376, 0, [$Ac, ZAc]))); + } + function GAc() { + GAc = ccb; + FAc = as((BAc(), OC(GC(cX, 1), Kie, 421, 0, [zAc, AAc]))); + } + function Npc() { + Npc = ccb; + Mpc = as((Ipc(), OC(GC(FW, 1), Kie, 422, 0, [Gpc, Hpc]))); + } + function rsc() { + rsc = ccb; + qsc = as((msc(), OC(GC(SW, 1), Kie, 420, 0, [ksc, lsc]))); + } + function MOc() { + MOc = ccb; + LOc = as((HOc(), OC(GC(DZ, 1), Kie, 520, 0, [GOc, FOc]))); + } + function ZIc() { + ZIc = ccb; + YIc = as((UIc(), OC(GC(mY, 1), Kie, 523, 0, [TIc, SIc]))); + } + function bMc() { + bMc = ccb; + aMc = as((YLc(), OC(GC(fZ, 1), Kie, 516, 0, [XLc, WLc]))); + } + function jMc() { + jMc = ccb; + iMc = as((eMc(), OC(GC(gZ, 1), Kie, 515, 0, [cMc, dMc]))); + } + function KQc() { + KQc = ccb; + JQc = as((FQc(), OC(GC(YZ, 1), Kie, 455, 0, [DQc, EQc]))); + } + function dUc() { + dUc = ccb; + cUc = as(($Tc(), OC(GC(F$, 1), Kie, 425, 0, [ZTc, YTc]))); + } + function XUc() { + XUc = ccb; + WUc = as((PUc(), OC(GC(K$, 1), Kie, 495, 0, [NUc, OUc]))); + } + function XTc() { + XTc = ccb; + WTc = as((STc(), OC(GC(E$, 1), Kie, 480, 0, [QTc, RTc]))); + } + function lWc() { + lWc = ccb; + kWc = as((fWc(), OC(GC(X$, 1), Kie, 426, 0, [dWc, eWc]))); + } + function i1c() { + i1c = ccb; + h1c = as((a1c(), OC(GC(X_, 1), Kie, 429, 0, [_0c, $0c]))); + } + function H_c() { + H_c = ccb; + G_c = as((C_c(), OC(GC(P_, 1), Kie, 430, 0, [B_c, A_c]))); + } + function UIc() { + UIc = ccb; + TIc = new VIc("UPPER", 0); + SIc = new VIc("LOWER", 1); + } + function Lqd(a, b) { + var c; + c = new eC(); + Spd(c, "x", b.a); + Spd(c, "y", b.b); + Qpd(a, c); + } + function Oqd(a, b) { + var c; + c = new eC(); + Spd(c, "x", b.a); + Spd(c, "y", b.b); + Qpd(a, c); + } + function Jic(a, b) { + var c, d; + d = false; + do { + c = Mic(a, b); + d = d | c; + } while (c); + return d; + } + function zHc(a, b) { + var c, d; + c = b; + d = 0; + while (c > 0) { + d += a.a[c]; + c -= c & -c; + } + return d; + } + function Cfd(a, b) { + var c; + c = b; + while (c) { + O6c(a, -c.i, -c.j); + c = Xod(c); + } + return a; + } + function reb(a, b) { + var c, d; + uCb(b); + for (d = a.Kc(); d.Ob(); ) { + c = d.Pb(); + b.td(c); + } + } + function me(a, b) { + var c; + c = b.cd(); + return new Wo(c, a.e.pc(c, BD(b.dd(), 14))); + } + function Gsb(a, b, c, d) { + var e; + e = new jtb(); + e.c = b; + e.b = c; + e.a = d; + d.b = c.a = e; + ++a.b; + } + function Nkb(a, b, c) { + var d; + d = (tCb(b, a.c.length), a.c[b]); + a.c[b] = c; + return d; + } + function lFd(a, b, c) { + return BD(b == null ? jrb(a.f, null, c) : Drb(a.g, b, c), 281); + } + function fRb(a) { + return !!a.c && !!a.d ? oRb(a.c) + "->" + oRb(a.d) : "e_" + FCb(a); + } + function FAb(a, b) { + return (Uzb(a), WAb(new YAb(a, new qBb(b, a.a)))).sd(DAb); + } + function tUb() { + qUb(); + return OC(GC(zP, 1), Kie, 356, 0, [lUb, mUb, nUb, oUb, pUb]); + } + function _cd() { + Ucd(); + return OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]); + } + function Dz(b) { + Az(); + return function() { + return Ez(b, this, arguments); + }; + } + function sz() { + if (Date.now) { + return Date.now(); + } + return (/* @__PURE__ */ new Date()).getTime(); + } + function OZb(a) { + if (!a.c || !a.d) { + return false; + } + return !!a.c.i && a.c.i == a.d.i; + } + function pv(a) { + if (!a.c.Sb()) { + throw vbb(new utb()); + } + a.a = true; + return a.c.Ub(); + } + function ko(a) { + a.i = 0; + Alb(a.b, null); + Alb(a.c, null); + a.a = null; + a.e = null; + ++a.g; + } + function ycb(a) { + wcb.call(this, a == null ? Xhe : fcb(a), JD(a, 78) ? BD(a, 78) : null); + } + function PYb(a) { + MYb(); + yXb(this); + this.a = new Psb(); + NYb(this, a); + Dsb(this.a, a); + } + function jYb() { + Ckb(this); + this.b = new f7c(Pje, Pje); + this.a = new f7c(Qje, Qje); + } + function rAb(a, b) { + this.c = 0; + this.b = b; + jvb.call(this, a, 17493); + this.a = this.c; + } + function wyb(a) { + oyb(); + if (lyb) { + return; + } + this.c = a; + this.e = true; + this.a = new Rkb(); + } + function oyb() { + oyb = ccb; + lyb = true; + jyb = false; + kyb = false; + nyb = false; + myb = false; + } + function C3c(a, b) { + if (JD(b, 149)) { + return dfb(a.c, BD(b, 149).c); + } + return false; + } + function zUc(a, b) { + var c; + c = 0; + !!a && (c += a.f.a / 2); + !!b && (c += b.f.a / 2); + return c; + } + function j4c(a, b) { + var c; + c = BD(Wrb(a.d, b), 23); + return c ? c : BD(Wrb(a.e, b), 23); + } + function Lzd(a) { + this.b = a; + Fyd.call(this, a); + this.a = BD(Ajd(this.b.a, 4), 126); + } + function Uzd(a) { + this.b = a; + $yd.call(this, a); + this.a = BD(Ajd(this.b.a, 4), 126); + } + function $Kd(a) { + if (!a.t) { + a.t = new YMd(a); + vtd(new c0d(a), 0, a.t); + } + return a.t; + } + function kad() { + ead(); + return OC(GC(t1, 1), Kie, 103, 0, [cad, bad, aad, _9c, dad]); + } + function Wbd() { + Tbd(); + return OC(GC(C1, 1), Kie, 249, 0, [Qbd, Sbd, Obd, Pbd, Rbd]); + } + function Q5c() { + N5c(); + return OC(GC(e1, 1), Kie, 175, 0, [L5c, K5c, I5c, M5c, J5c]); + } + function Q_c() { + N_c(); + return OC(GC(Q_, 1), Kie, 316, 0, [I_c, J_c, M_c, K_c, L_c]); + } + function _zc() { + Vzc(); + return OC(GC(_W, 1), Kie, 315, 0, [Uzc, Rzc, Szc, Qzc, Tzc]); + } + function sqc() { + mqc(); + return OC(GC(IW, 1), Kie, 335, 0, [iqc, hqc, kqc, lqc, jqc]); + } + function n$c() { + k$c(); + return OC(GC(y_, 1), Kie, 355, 0, [g$c, f$c, i$c, h$c, j$c]); + } + function _jc() { + Xjc(); + return OC(GC(uV, 1), Kie, 363, 0, [Tjc, Vjc, Wjc, Ujc, Sjc]); + } + function Ftc() { + Ctc(); + return OC(GC(TW, 1), Kie, 163, 0, [Btc, xtc, ytc, ztc, Atc]); + } + function T0d() { + T0d = ccb; + var a, b; + R0d = (LFd(), b = new MPd(), b); + S0d = (a = new OJd(), a); + } + function yUd(a) { + var b; + if (!a.c) { + b = a.r; + JD(b, 88) && (a.c = BD(b, 26)); + } + return a.c; + } + function zc(a) { + a.e = 3; + a.d = a.Yb(); + if (a.e != 2) { + a.e = 0; + return true; + } + return false; + } + function RC(a) { + var b, c, d; + b = a & Eje; + c = a >> 22 & Eje; + d = a < 0 ? Fje : 0; + return TC(b, c, d); + } + function uy(a) { + var b, c, d, e; + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + Qzb(b); + } + } + function Tc(a, b) { + var c, d; + c = BD(Iv(a.c, b), 14); + if (c) { + d = c.gc(); + c.$b(); + a.d -= d; + } + } + function tjb(a, b) { + var c, d; + c = b.cd(); + d = Awb(a, c); + return !!d && wtb(d.e, b.dd()); + } + function Qgb(a, b) { + if (b == 0 || a.e == 0) { + return a; + } + return b > 0 ? ihb(a, b) : lhb(a, -b); + } + function Rgb(a, b) { + if (b == 0 || a.e == 0) { + return a; + } + return b > 0 ? lhb(a, b) : ihb(a, -b); + } + function Rr(a) { + if (Qr(a)) { + a.c = a.a; + return a.a.Pb(); + } else { + throw vbb(new utb()); + } + } + function Yac(a) { + var b, c; + b = a.c.i; + c = a.d.i; + return b.k == (j0b(), e0b) && c.k == e0b; + } + function kZb(a) { + var b; + b = new UZb(); + tNb(b, a); + yNb(b, (Nyc(), jxc), null); + return b; + } + function hid(a, b, c) { + var d; + return d = a.Yg(b), d >= 0 ? a._g(d, c, true) : sid(a, b, c); + } + function uHb(a, b, c, d) { + var e; + for (e = 0; e < rHb; e++) { + nHb(a.a[b.g][e], c, d[b.g]); + } + } + function vHb(a, b, c, d) { + var e; + for (e = 0; e < sHb; e++) { + mHb(a.a[e][b.g], c, d[b.g]); + } + } + function vSd(a, b, c, d, e) { + kxd.call(this, b, d, e); + this.c = a; + this.a = c; + } + function zSd(a, b, c, d, e) { + lxd.call(this, b, d, e); + this.c = a; + this.a = c; + } + function ISd(a, b, c, d, e) { + oxd.call(this, b, d, e); + this.c = a; + this.a = c; + } + function qSd(a, b, c, d, e) { + oxd.call(this, b, d, e); + this.c = a; + this.b = c; + } + function mWd(a, b, c) { + VVd.call(this, c); + this.b = a; + this.c = b; + this.d = (CWd(), AWd); + } + function oxd(a, b, c) { + this.d = a; + this.k = b ? 1 : 0; + this.f = c ? 1 : 0; + this.o = -1; + this.p = 0; + } + function _6d(a, b, c) { + var d; + d = new a7d(a.a); + Ld(d, a.a.a); + jrb(d.f, b, c); + a.a.a = d; + } + function lud(a, b) { + a.qi(a.i + 1); + mud(a, a.i, a.oi(a.i, b)); + a.bi(a.i++, b); + a.ci(); + } + function oud(a) { + var b, c; + ++a.j; + b = a.g; + c = a.i; + a.g = null; + a.i = 0; + a.di(c, b); + a.ci(); + } + function Ou(a) { + var b, c; + Qb(a); + b = Iu(a.length); + c = new Skb(b); + nmb(c, a); + return c; + } + function km(a) { + var b; + b = (Qb(a), a ? new Tkb(a) : Nu(a.Kc())); + smb(b); + return Dm(b); + } + function Kkb(a, b) { + var c; + c = (tCb(b, a.c.length), a.c[b]); + cCb(a.c, b, 1); + return c; + } + function Qc(a, b) { + var c; + c = BD(a.c.xc(b), 14); + !c && (c = a.ic(b)); + return a.pc(b, c); + } + function cfb(a, b) { + var c, d; + c = (uCb(a), a); + d = (uCb(b), b); + return c == d ? 0 : c < d ? -1 : 1; + } + function Fpb(a) { + var b; + b = a.e + a.f; + if (isNaN(b) && Ldb(a.d)) { + return a.d; + } + return b; + } + function uwb(a, b) { + !a.a ? a.a = new Wfb(a.d) : Qfb(a.a, a.b); + Nfb(a.a, b); + return a; + } + function Sb(a, b) { + if (a < 0 || a > b) { + throw vbb(new qcb(Jb(a, b, "index"))); + } + return a; + } + function zhb(a, b, c, d) { + var e; + e = KC(WD, oje, 25, b, 15, 1); + Ahb(e, a, b, c, d); + return e; + } + function _A(a, b) { + var c; + c = a.q.getHours() + (b / 60 | 0); + a.q.setMinutes(b); + YA(a, c); + } + function A$c(a, b) { + return $wnd.Math.min(S6c(b.a, a.d.d.c), S6c(b.b, a.d.d.c)); + } + function Thb(a, b) { + return ND(b) ? b == null ? krb(a.f, null) : Erb(a.g, b) : krb(a.f, b); + } + function b1b(a) { + this.c = a; + this.a = new olb(this.c.a); + this.b = new olb(this.c.b); + } + function kRb() { + this.e = new Rkb(); + this.c = new Rkb(); + this.d = new Rkb(); + this.b = new Rkb(); + } + function MFb() { + this.g = new PFb(); + this.b = new PFb(); + this.a = new Rkb(); + this.k = new Rkb(); + } + function Gjc(a, b, c) { + this.a = a; + this.c = b; + this.d = c; + Ekb(b.e, this); + Ekb(c.b, this); + } + function wBb(a, b) { + fvb.call(this, b.rd(), b.qd() & -6); + uCb(a); + this.a = a; + this.b = b; + } + function CBb(a, b) { + jvb.call(this, b.rd(), b.qd() & -6); + uCb(a); + this.a = a; + this.b = b; + } + function IBb(a, b) { + nvb.call(this, b.rd(), b.qd() & -6); + uCb(a); + this.a = a; + this.b = b; + } + function BQc(a, b, c) { + this.a = a; + this.b = b; + this.c = c; + Ekb(a.t, this); + Ekb(b.i, this); + } + function SRc() { + this.b = new Psb(); + this.a = new Psb(); + this.b = new Psb(); + this.a = new Psb(); + } + function g6c() { + g6c = ccb; + f6c = new Lsd("org.eclipse.elk.labels.labelManager"); + } + function Vac() { + Vac = ccb; + Uac = new Msd("separateLayerConnections", (gbc(), fbc)); + } + function HOc() { + HOc = ccb; + GOc = new IOc("REGULAR", 0); + FOc = new IOc("CRITICAL", 1); + } + function _Ac() { + _Ac = ccb; + $Ac = new aBc("STACKED", 0); + ZAc = new aBc("SEQUENCED", 1); + } + function C_c() { + C_c = ccb; + B_c = new D_c("FIXED", 0); + A_c = new D_c("CENTER_NODE", 1); + } + function PHc(a, b) { + var c; + c = VHc(a, b); + a.b = new BHc(c.c.length); + return OHc(a, c); + } + function KAd(a, b, c) { + var d; + ++a.e; + --a.f; + d = BD(a.d[b].$c(c), 133); + return d.dd(); + } + function JJd(a) { + var b; + if (!a.a) { + b = a.r; + JD(b, 148) && (a.a = BD(b, 148)); + } + return a.a; + } + function poc(a) { + if (a.a) { + if (a.e) { + return poc(a.e); + } + } else { + return a; + } + return null; + } + function ODc(a, b) { + if (a.p < b.p) { + return 1; + } else if (a.p > b.p) { + return -1; + } + return 0; + } + function pvb(a, b) { + uCb(b); + if (a.c < a.d) { + a.ze(b, a.c++); + return true; + } + return false; + } + function QYd(a, b) { + if (Mhb(a.a, b)) { + Thb(a.a, b); + return true; + } else { + return false; + } + } + function fd(a) { + var b, c; + b = a.cd(); + c = BD(a.dd(), 14); + return $j(c.Nc(), new ah(b)); + } + function sqb(a) { + var b; + b = BD(ZBb(a.b, a.b.length), 9); + return new xqb(a.a, b, a.c); + } + function _zb(a) { + var b; + Uzb(a); + b = new fAb(a, a.a.e, a.a.d | 4); + return new bAb(a, b); + } + function HAb(a) { + var b; + Tzb(a); + b = 0; + while (a.a.sd(new RBb())) { + b = wbb(b, 1); + } + return b; + } + function UDc(a, b, c) { + var d, e; + d = 0; + for (e = 0; e < b.length; e++) { + d += a.$f(b[e], d, c); + } + } + function QJb(a, b) { + var c; + if (a.C) { + c = BD(Mpb(a.b, b), 124).n; + c.d = a.C.d; + c.a = a.C.a; + } + } + function Mi(a, b, c) { + Pb(b, a.e.Hd().gc()); + Pb(c, a.c.Hd().gc()); + return a.a[b][c]; + } + function Ugb(a, b) { + Hgb(); + this.e = a; + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [b]); + } + function dg(a, b, c, d) { + this.f = a; + this.e = b; + this.d = c; + this.b = d; + this.c = !d ? null : d.d; + } + function o5b(a) { + var b, c, d, e; + e = a.d; + b = a.a; + c = a.b; + d = a.c; + a.d = c; + a.a = d; + a.b = e; + a.c = b; + } + function Y2d(a, b, c, d) { + X2d(a, b, c, M2d(a, b, d, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)); + } + function tac(a, b) { + Odd(b, "Label management", 1); + RD(vNb(a, (g6c(), f6c))); + Qdd(b); + } + function Skb(a) { + Ckb(this); + mCb(a >= 0, "Initial capacity must not be negative"); + } + function lHb() { + lHb = ccb; + kHb = as((gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]))); + } + function SHb() { + SHb = ccb; + RHb = as((NHb(), OC(GC(sN, 1), Kie, 461, 0, [LHb, KHb, MHb]))); + } + function JIb() { + JIb = ccb; + IIb = as((EIb(), OC(GC(zN, 1), Kie, 462, 0, [DIb, CIb, BIb]))); + } + function Kyb() { + Kyb = ccb; + Jyb = as((Fyb(), OC(GC(xL, 1), Kie, 132, 0, [Cyb, Dyb, Eyb]))); + } + function DTb() { + DTb = ccb; + CTb = as((yTb(), OC(GC(oP, 1), Kie, 379, 0, [wTb, vTb, xTb]))); + } + function WXb() { + WXb = ccb; + VXb = as((RXb(), OC(GC(hQ, 1), Kie, 423, 0, [QXb, PXb, OXb]))); + } + function Zpc() { + Zpc = ccb; + Ypc = as((Rpc(), OC(GC(GW, 1), Kie, 314, 0, [Ppc, Opc, Qpc]))); + } + function gqc() { + gqc = ccb; + fqc = as((bqc(), OC(GC(HW, 1), Kie, 337, 0, [$pc, aqc, _pc]))); + } + function Lqc() { + Lqc = ccb; + Kqc = as((Gqc(), OC(GC(KW, 1), Kie, 450, 0, [Eqc, Dqc, Fqc]))); + } + function Kkc() { + Kkc = ccb; + Jkc = as((Fkc(), OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc]))); + } + function jsc() { + jsc = ccb; + isc = as((esc(), OC(GC(RW, 1), Kie, 303, 0, [csc, dsc, bsc]))); + } + function asc() { + asc = ccb; + _rc = as((Xrc(), OC(GC(QW, 1), Kie, 292, 0, [Vrc, Wrc, Urc]))); + } + function Dzc() { + Dzc = ccb; + Czc = as((xzc(), OC(GC(ZW, 1), Kie, 378, 0, [uzc, vzc, wzc]))); + } + function YAc() { + YAc = ccb; + XAc = as((TAc(), OC(GC(eX, 1), Kie, 375, 0, [QAc, RAc, SAc]))); + } + function yAc() { + yAc = ccb; + xAc = as((tAc(), OC(GC(bX, 1), Kie, 339, 0, [rAc, qAc, sAc]))); + } + function PAc() { + PAc = ccb; + OAc = as((KAc(), OC(GC(dX, 1), Kie, 452, 0, [JAc, HAc, IAc]))); + } + function QBc() { + QBc = ccb; + PBc = as((LBc(), OC(GC(jX, 1), Kie, 377, 0, [JBc, KBc, IBc]))); + } + function yBc() { + yBc = ccb; + xBc = as((tBc(), OC(GC(hX, 1), Kie, 336, 0, [qBc, rBc, sBc]))); + } + function HBc() { + HBc = ccb; + GBc = as((CBc(), OC(GC(iX, 1), Kie, 338, 0, [BBc, zBc, ABc]))); + } + function wGc() { + wGc = ccb; + vGc = as((rGc(), OC(GC(PX, 1), Kie, 454, 0, [oGc, pGc, qGc]))); + } + function zVc() { + zVc = ccb; + yVc = as((tVc(), OC(GC(O$, 1), Kie, 442, 0, [sVc, qVc, rVc]))); + } + function vWc() { + vWc = ccb; + uWc = as((pWc(), OC(GC(Y$, 1), Kie, 380, 0, [mWc, nWc, oWc]))); + } + function EYc() { + EYc = ccb; + DYc = as((zYc(), OC(GC(q_, 1), Kie, 381, 0, [xYc, yYc, wYc]))); + } + function yXc() { + yXc = ccb; + xXc = as((sXc(), OC(GC(b_, 1), Kie, 293, 0, [qXc, rXc, pXc]))); + } + function b_c() { + b_c = ccb; + a_c = as((Y$c(), OC(GC(J_, 1), Kie, 437, 0, [V$c, W$c, X$c]))); + } + function mbd() { + mbd = ccb; + lbd = as((hbd(), OC(GC(z1, 1), Kie, 334, 0, [fbd, ebd, gbd]))); + } + function vad() { + vad = ccb; + uad = as((qad(), OC(GC(u1, 1), Kie, 272, 0, [nad, oad, pad]))); + } + function icd() { + dcd(); + return OC(GC(D1, 1), Kie, 98, 0, [ccd, bcd, acd, Zbd, _bd, $bd]); + } + function ikd(a, b) { + return !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), qAd(a.o, b); + } + function NAd(a) { + !a.g && (a.g = new JCd()); + !a.g.d && (a.g.d = new MBd(a)); + return a.g.d; + } + function yAd(a) { + !a.g && (a.g = new JCd()); + !a.g.a && (a.g.a = new SBd(a)); + return a.g.a; + } + function EAd(a) { + !a.g && (a.g = new JCd()); + !a.g.b && (a.g.b = new GBd(a)); + return a.g.b; + } + function FAd(a) { + !a.g && (a.g = new JCd()); + !a.g.c && (a.g.c = new iCd(a)); + return a.g.c; + } + function A2d(a, b, c) { + var d, e; + e = new p4d(b, a); + for (d = 0; d < c; ++d) { + d4d(e); + } + return e; + } + function Atd(a, b, c) { + var d, e; + if (c != null) { + for (d = 0; d < b; ++d) { + e = c[d]; + a.fi(d, e); + } + } + } + function uhb(a, b, c, d) { + var e; + e = KC(WD, oje, 25, b + 1, 15, 1); + vhb(e, a, b, c, d); + return e; + } + function KC(a, b, c, d, e, f) { + var g; + g = LC(e, d); + e != 10 && OC(GC(a, f), b, c, e, g); + return g; + } + function bYd(a, b, c, d) { + !!c && (d = c.gh(b, bLd(c.Tg(), a.c.Lj()), null, d)); + return d; + } + function cYd(a, b, c, d) { + !!c && (d = c.ih(b, bLd(c.Tg(), a.c.Lj()), null, d)); + return d; + } + function KNb(a, b, c) { + BD(a.b, 65); + BD(a.b, 65); + BD(a.b, 65); + Hkb(a.a, new TNb(c, b, a)); + } + function ACb(a, b, c) { + if (a < 0 || b > c || b < a) { + throw vbb(new Xfb(xke + a + zke + b + oke + c)); + } + } + function zCb(a) { + if (!a) { + throw vbb(new Zdb("Unable to add element to queue")); + } + } + function Vzb(a) { + if (!a) { + this.c = null; + this.b = new Rkb(); + } else { + this.c = a; + this.b = null; + } + } + function exb(a, b) { + pjb.call(this, a, b); + this.a = KC(dL, zie, 436, 2, 0, 1); + this.b = true; + } + function _rb(a) { + Whb.call(this, a, 0); + Trb(this); + this.d.b = this.d; + this.d.a = this.d; + } + function VRc(a) { + var b; + b = a.b; + if (b.b == 0) { + return null; + } + return BD(Ut(b, 0), 188).b; + } + function Kwb(a, b) { + var c; + c = new fxb(); + c.c = true; + c.d = b.dd(); + return Lwb(a, b.cd(), c); + } + function bB(a, b) { + var c; + c = a.q.getHours() + (b / 3600 | 0); + a.q.setSeconds(b); + YA(a, c); + } + function zGc(a, b, c) { + var d; + d = a.b[c.c.p][c.p]; + d.b += b.b; + d.c += b.c; + d.a += b.a; + ++d.a; + } + function S6c(a, b) { + var c, d; + c = a.a - b.a; + d = a.b - b.b; + return $wnd.Math.sqrt(c * c + d * d); + } + function Ipc() { + Ipc = ccb; + Gpc = new Jpc("QUADRATIC", 0); + Hpc = new Jpc("SCANLINE", 1); + } + function hCc() { + hCc = ccb; + gCc = c3c(e3c(new j3c(), (qUb(), lUb), (S8b(), n8b)), pUb, J8b); + } + function l8c() { + i8c(); + return OC(GC(r1, 1), Kie, 291, 0, [h8c, g8c, f8c, d8c, c8c, e8c]); + } + function I7c() { + F7c(); + return OC(GC(o1, 1), Kie, 248, 0, [z7c, C7c, D7c, E7c, A7c, B7c]); + } + function Dpc() { + Apc(); + return OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]); + } + function Brc() { + yrc(); + return OC(GC(OW, 1), Kie, 275, 0, [wrc, trc, xrc, vrc, urc, rrc]); + } + function orc() { + lrc(); + return OC(GC(NW, 1), Kie, 274, 0, [irc, hrc, krc, grc, jrc, frc]); + } + function rzc() { + lzc(); + return OC(GC(YW, 1), Kie, 313, 0, [jzc, hzc, fzc, gzc, kzc, izc]); + } + function Wqc() { + Sqc(); + return OC(GC(LW, 1), Kie, 276, 0, [Nqc, Mqc, Pqc, Oqc, Rqc, Qqc]); + } + function uSc() { + qSc(); + return OC(GC(t$, 1), Kie, 327, 0, [pSc, lSc, nSc, mSc, oSc, kSc]); + } + function wcd() { + rcd(); + return OC(GC(E1, 1), Kie, 273, 0, [pcd, ncd, ocd, mcd, lcd, qcd]); + } + function Pad() { + Mad(); + return OC(GC(w1, 1), Kie, 312, 0, [Kad, Iad, Lad, Gad, Jad, Had]); + } + function m0b() { + j0b(); + return OC(GC(NQ, 1), Kie, 267, 0, [h0b, g0b, e0b, i0b, f0b, d0b]); + } + function mib(a) { + yCb(!!a.c); + xpb(a.e, a); + a.c.Qb(); + a.c = null; + a.b = kib(a); + ypb(a.e, a); + } + function tsb(a) { + xpb(a.c.a.e, a); + sCb(a.b != a.c.a.d); + a.a = a.b; + a.b = a.b.a; + return a.a; + } + function kSd(a) { + var b; + if (!a.a && a.b != -1) { + b = a.c.Tg(); + a.a = XKd(b, a.b); + } + return a.a; + } + function wtd(a, b) { + if (a.hi() && a.Hc(b)) { + return false; + } else { + a.Yh(b); + return true; + } + } + function $Hb(a, b) { + ytb(b, "Horizontal alignment cannot be null"); + a.b = b; + return a; + } + function Lfe(a, b, c) { + wfe(); + var d; + d = Kfe(a, b); + c && !!d && Nfe(a) && (d = null); + return d; + } + function vXb(a, b, c) { + var d, e; + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + uXb(d, b, c); + } + } + function tXb(a, b) { + var c, d; + for (d = b.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 37); + sXb(a, c, 0, 0); + } + } + function ojc(a, b, c) { + var d; + a.d[b.g] = c; + d = a.g.c; + d[b.g] = $wnd.Math.max(d[b.g], c + 1); + } + function KZc(a, b) { + var c, d, e; + e = a.r; + d = a.d; + c = MZc(a, b, true); + return c.b != e || c.a != d; + } + function Jjc(a, b) { + Vrb(a.e, b) || Xrb(a.e, b, new Pjc(b)); + return BD(Wrb(a.e, b), 113); + } + function Byb(a, b, c, d) { + uCb(a); + uCb(b); + uCb(c); + uCb(d); + return new Lyb(a, b, new Vxb()); + } + function dId(a, b, c, d) { + this.rj(); + this.a = b; + this.b = a; + this.c = new Y5d(this, b, c, d); + } + function oSd(a, b, c, d, e, f) { + mxd.call(this, b, d, e, f); + this.c = a; + this.b = c; + } + function ESd(a, b, c, d, e, f) { + mxd.call(this, b, d, e, f); + this.c = a; + this.a = c; + } + function Bqd(a, b, c) { + var d, e, f; + d = aC(a, c); + e = null; + !!d && (e = aqd(d)); + f = e; + Vqd(b, c, f); + } + function Cqd(a, b, c) { + var d, e, f; + d = aC(a, c); + e = null; + !!d && (e = aqd(d)); + f = e; + Vqd(b, c, f); + } + function v1d(a, b, c) { + var d, e; + e = (d = nUd(a.b, b), d); + return !e ? null : V1d(p1d(a, e), c); + } + function gid(a, b) { + var c; + return c = a.Yg(b), c >= 0 ? a._g(c, true, true) : sid(a, b, true); + } + function s6b(a, b) { + return Kdb(Edb(ED(vNb(a, (wtc(), htc)))), Edb(ED(vNb(b, htc)))); + } + function pUc() { + pUc = ccb; + oUc = b3c(b3c(g3c(new j3c(), (yRc(), vRc)), (qSc(), pSc)), lSc); + } + function IHc(a, b, c) { + var d; + d = SHc(a, b, c); + a.b = new BHc(d.c.length); + return KHc(a, d); + } + function qhe(a) { + if (a.b <= 0) + throw vbb(new utb()); + --a.b; + a.a -= a.c.c; + return meb(a.a); + } + function ptd(a) { + var b; + if (!a.a) { + throw vbb(new vtb()); + } + b = a.a; + a.a = Xod(a.a); + return b; + } + function dBb(a) { + while (!a.a) { + if (!HBb(a.c, new hBb(a))) { + return false; + } + } + return true; + } + function vr(a) { + var b; + Qb(a); + if (JD(a, 198)) { + b = BD(a, 198); + return b; + } + return new wr(a); + } + function r3c(a) { + p3c(); + BD(a.We((Y9c(), x9c)), 174).Fc((rcd(), ocd)); + a.Ye(w9c, null); + } + function p3c() { + p3c = ccb; + m3c = new v3c(); + o3c = new x3c(); + n3c = mn((Y9c(), w9c), m3c, b9c, o3c); + } + function fWc() { + fWc = ccb; + dWc = new hWc("LEAF_NUMBER", 0); + eWc = new hWc("NODE_SIZE", 1); + } + function UMc(a, b, c) { + a.a = b; + a.c = c; + a.b.a.$b(); + Osb(a.d); + a.e.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + function yHc(a) { + a.a = KC(WD, oje, 25, a.b + 1, 15, 1); + a.c = KC(WD, oje, 25, a.b, 15, 1); + a.d = 0; + } + function MWb(a, b) { + if (a.a.ue(b.d, a.b) > 0) { + Ekb(a.c, new dWb(b.c, b.d, a.d)); + a.b = b.d; + } + } + function nud(a, b) { + if (a.g == null || b >= a.i) + throw vbb(new $zd(b, a.i)); + return a.g[b]; + } + function pOd(a, b, c) { + Itd(a, c); + if (c != null && !a.wj(c)) { + throw vbb(new tcb()); + } + return c; + } + function KLd(a) { + var b; + if (a.Ek()) { + for (b = a.i - 1; b >= 0; --b) { + qud(a, b); + } + } + return wud(a); + } + function Bwb(a) { + var b, c; + if (!a.b) { + return null; + } + c = a.b; + while (b = c.a[0]) { + c = b; + } + return c; + } + function ulb(a, b) { + var c, d; + pCb(b); + return c = (d = a.slice(0, b), PC(d, a)), c.length = b, c; + } + function Klb(a, b, c, d) { + var e; + d = (ipb(), !d ? fpb : d); + e = a.slice(b, c); + Llb(e, a, b, c, -b, d); + } + function bid(a, b, c, d, e) { + return b < 0 ? sid(a, c, d) : BD(c, 66).Nj().Pj(a, a.yh(), b, d, e); + } + function hZd(a) { + if (JD(a, 172)) { + return "" + BD(a, 172).a; + } + return a == null ? null : fcb(a); + } + function iZd(a) { + if (JD(a, 172)) { + return "" + BD(a, 172).a; + } + return a == null ? null : fcb(a); + } + function nDb(a, b) { + if (b.a) { + throw vbb(new hz(Hke)); + } + Qqb(a.a, b); + b.a = a; + !a.j && (a.j = b); + } + function qBb(a, b) { + nvb.call(this, b.rd(), b.qd() & -16449); + uCb(a); + this.a = a; + this.c = b; + } + function Ti(a, b) { + var c, d; + d = b / a.c.Hd().gc() | 0; + c = b % a.c.Hd().gc(); + return Mi(a, d, c); + } + function NHb() { + NHb = ccb; + LHb = new OHb(jle, 0); + KHb = new OHb(gle, 1); + MHb = new OHb(kle, 2); + } + function lxb() { + lxb = ccb; + hxb = new mxb("All", 0); + ixb = new rxb(); + jxb = new txb(); + kxb = new wxb(); + } + function zxb() { + zxb = ccb; + yxb = as((lxb(), OC(GC(iL, 1), Kie, 297, 0, [hxb, ixb, jxb, kxb]))); + } + function uWb() { + uWb = ccb; + tWb = as((lWb(), OC(GC(SP, 1), Kie, 405, 0, [hWb, kWb, iWb, jWb]))); + } + function ALb() { + ALb = ccb; + zLb = as((vLb(), OC(GC(PN, 1), Kie, 406, 0, [uLb, rLb, sLb, tLb]))); + } + function WMb() { + WMb = ccb; + VMb = as((RMb(), OC(GC(jO, 1), Kie, 323, 0, [OMb, NMb, PMb, QMb]))); + } + function WOb() { + WOb = ccb; + VOb = as((ROb(), OC(GC(CO, 1), Kie, 394, 0, [OOb, NOb, POb, QOb]))); + } + function GRc() { + GRc = ccb; + FRc = as((yRc(), OC(GC(h$, 1), Kie, 393, 0, [uRc, vRc, wRc, xRc]))); + } + function mbc() { + mbc = ccb; + lbc = as((gbc(), OC(GC(VS, 1), Kie, 360, 0, [fbc, dbc, ebc, cbc]))); + } + function oXc() { + oXc = ccb; + nXc = as((iXc(), OC(GC(a_, 1), Kie, 340, 0, [hXc, fXc, gXc, eXc]))); + } + function Fjc() { + Fjc = ccb; + Ejc = as((Ajc(), OC(GC(mV, 1), Kie, 411, 0, [wjc, xjc, yjc, zjc]))); + } + function Pzc() { + Pzc = ccb; + Ozc = as((Izc(), OC(GC($W, 1), Kie, 197, 0, [Gzc, Hzc, Fzc, Ezc]))); + } + function ugd() { + ugd = ccb; + tgd = as((pgd(), OC(GC(k2, 1), Kie, 396, 0, [mgd, ngd, lgd, ogd]))); + } + function xbd() { + xbd = ccb; + wbd = as((rbd(), OC(GC(A1, 1), Kie, 285, 0, [qbd, nbd, obd, pbd]))); + } + function Fad() { + Fad = ccb; + Ead = as((Aad(), OC(GC(v1, 1), Kie, 218, 0, [zad, xad, wad, yad]))); + } + function Ied() { + Ied = ccb; + Hed = as((Ded(), OC(GC(O1, 1), Kie, 311, 0, [Ced, zed, Bed, Aed]))); + } + function ydd() { + ydd = ccb; + xdd = as((tdd(), OC(GC(I1, 1), Kie, 374, 0, [rdd, sdd, qdd, pdd]))); + } + function A9d() { + A9d = ccb; + Smd(); + x9d = Pje; + w9d = Qje; + z9d = new Ndb(Pje); + y9d = new Ndb(Qje); + } + function _qc() { + _qc = ccb; + $qc = new arc(ane, 0); + Zqc = new arc("IMPROVE_STRAIGHTNESS", 1); + } + function eIc(a, b) { + FHc(); + return Ekb(a, new vgd(b, meb(b.e.c.length + b.g.c.length))); + } + function gIc(a, b) { + FHc(); + return Ekb(a, new vgd(b, meb(b.e.c.length + b.g.c.length))); + } + function PC(a, b) { + HC(b) != 10 && OC(rb(b), b.hm, b.__elementTypeId$, HC(b), a); + return a; + } + function Lkb(a, b) { + var c; + c = Jkb(a, b, 0); + if (c == -1) { + return false; + } + Kkb(a, c); + return true; + } + function Zrb(a, b) { + var c; + c = BD(Thb(a.e, b), 387); + if (c) { + jsb(c); + return c.e; + } + return null; + } + function Jbb(a) { + var b; + if (Fbb(a)) { + b = 0 - a; + if (!isNaN(b)) { + return b; + } + } + return zbb(hD(a)); + } + function Jkb(a, b, c) { + for (; c < a.c.length; ++c) { + if (wtb(b, a.c[c])) { + return c; + } + } + return -1; + } + function SAb(a, b, c) { + var d; + Tzb(a); + d = new NBb(); + d.a = b; + a.a.Nb(new VBb(d, c)); + return d.a; + } + function aAb(a) { + var b; + Tzb(a); + b = KC(UD, Vje, 25, 0, 15, 1); + _ub(a.a, new kAb(b)); + return b; + } + function ajc(a) { + var b, c; + c = BD(Ikb(a.j, 0), 11); + b = BD(vNb(c, (wtc(), $sc)), 11); + return b; + } + function yc(a) { + var b; + if (!xc(a)) { + throw vbb(new utb()); + } + a.e = 1; + b = a.d; + a.d = null; + return b; + } + function wu(a, b) { + var c; + this.f = a; + this.b = b; + c = BD(Ohb(a.b, b), 283); + this.c = !c ? null : c.b; + } + function Ygc() { + Hgc(); + this.b = new Lqb(); + this.f = new Lqb(); + this.g = new Lqb(); + this.e = new Lqb(); + } + function Tnc(a, b) { + this.a = KC(OQ, kne, 10, a.a.c.length, 0, 1); + Qkb(a.a, this.a); + this.b = b; + } + function zoc(a) { + var b; + for (b = a.p + 1; b < a.c.a.c.length; ++b) { + --BD(Ikb(a.c.a, b), 10).p; + } + } + function Rwd(a) { + var b; + b = a.Ai(); + b != null && a.d != -1 && BD(b, 92).Ng(a); + !!a.i && a.i.Fi(); + } + function rFd(a) { + Py(this); + this.g = !a ? null : Wy(a, a.$d()); + this.f = a; + Ry(this); + this._d(); + } + function pSd(a, b, c, d, e, f, g) { + nxd.call(this, b, d, e, f, g); + this.c = a; + this.b = c; + } + function Ayb(a, b, c, d, e) { + uCb(a); + uCb(b); + uCb(c); + uCb(d); + uCb(e); + return new Lyb(a, b, d); + } + function B2c(a, b) { + if (b < 0) { + throw vbb(new qcb(ese + b)); + } + A2c(a, b + 1); + return Ikb(a.j, b); + } + function Ob(a, b, c, d) { + if (!a) { + throw vbb(new Wdb(hc(b, OC(GC(SI, 1), Uhe, 1, 5, [c, d])))); + } + } + function dDb(a, b) { + return wtb(b, Ikb(a.f, 0)) || wtb(b, Ikb(a.f, 1)) || wtb(b, Ikb(a.f, 2)); + } + function ghd(a, b) { + ecd(BD(BD(a.f, 33).We((Y9c(), t9c)), 98)) && NCd(Yod(BD(a.f, 33)), b); + } + function p1d(a, b) { + var c, d; + c = BD(b, 675); + d = c.Oh(); + !d && c.Rh(d = new Y1d(a, b)); + return d; + } + function q1d(a, b) { + var c, d; + c = BD(b, 677); + d = c.pk(); + !d && c.tk(d = new j2d(a, b)); + return d; + } + function QSd(a) { + if (!a.b) { + a.b = new UTd(a, j5, a); + !a.a && (a.a = new fTd(a, a)); + } + return a.b; + } + function yTb() { + yTb = ccb; + wTb = new zTb("XY", 0); + vTb = new zTb("X", 1); + xTb = new zTb("Y", 2); + } + function EIb() { + EIb = ccb; + DIb = new FIb("TOP", 0); + CIb = new FIb(gle, 1); + BIb = new FIb(mle, 2); + } + function esc() { + esc = ccb; + csc = new fsc(ane, 0); + dsc = new fsc("TOP", 1); + bsc = new fsc(mle, 2); + } + function BAc() { + BAc = ccb; + zAc = new CAc("INPUT_ORDER", 0); + AAc = new CAc("PORT_DEGREE", 1); + } + function wD() { + wD = ccb; + sD = TC(Eje, Eje, 524287); + tD = TC(0, 0, Gje); + uD = RC(1); + RC(2); + vD = RC(0); + } + function WDc(a, b, c) { + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + $Dc(a, b, c); + a.a.c.length == 0 || TDc(a, b); + } + function rfb(a) { + var b, c; + c = a.length; + b = KC(TD, $ie, 25, c, 15, 1); + ffb(a, 0, c, b, 0); + return b; + } + function Aid(a) { + var b; + if (!a.dh()) { + b = aLd(a.Tg()) - a.Ah(); + a.ph().bk(b); + } + return a.Pg(); + } + function xjd(a) { + var b; + b = CD(Ajd(a, 32)); + if (b == null) { + yjd(a); + b = CD(Ajd(a, 32)); + } + return b; + } + function iid(a, b) { + var c; + c = bLd(a.d, b); + return c >= 0 ? fid(a, c, true, true) : sid(a, b, true); + } + function vgc(a, b) { + qgc(); + var c, d; + c = ugc(a); + d = ugc(b); + return !!c && !!d && !omb(c.k, d.k); + } + function Gqd(a, b) { + dld(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function Hqd(a, b) { + eld(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function Iqd(a, b) { + cld(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function Jqd(a, b) { + ald(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function agd(a) { + (!this.q ? (mmb(), mmb(), kmb) : this.q).Ac(!a.q ? (mmb(), mmb(), kmb) : a.q); + } + function S2d(a, b) { + return JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 ? new s4d(b, a) : new p4d(b, a); + } + function U2d(a, b) { + return JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 ? new s4d(b, a) : new p4d(b, a); + } + function INb(a, b) { + HNb = new tOb(); + FNb = b; + GNb = a; + BD(GNb.b, 65); + KNb(GNb, HNb, null); + JNb(GNb); + } + function uud(a, b, c) { + var d; + d = a.g[b]; + mud(a, b, a.oi(b, c)); + a.gi(b, c, d); + a.ci(); + return d; + } + function Ftd(a, b) { + var c; + c = a.Xc(b); + if (c >= 0) { + a.$c(c); + return true; + } else { + return false; + } + } + function YId(a) { + var b; + if (a.d != a.r) { + b = wId(a); + a.e = !!b && b.Cj() == Bve; + a.d = b; + } + return a.e; + } + function fr(a, b) { + var c; + Qb(a); + Qb(b); + c = false; + while (b.Ob()) { + c = c | a.Fc(b.Pb()); + } + return c; + } + function Wrb(a, b) { + var c; + c = BD(Ohb(a.e, b), 387); + if (c) { + Yrb(a, c); + return c.e; + } + return null; + } + function UA(a) { + var b, c; + b = a / 60 | 0; + c = a % 60; + if (c == 0) { + return "" + b; + } + return "" + b + ":" + ("" + c); + } + function LAb(a, b) { + var c, d; + Uzb(a); + d = new IBb(b, a.a); + c = new fBb(d); + return new YAb(a, c); + } + function tB(d, a) { + var b = d.a[a]; + var c = (rC(), qC)[typeof b]; + return c ? c(b) : xC(typeof b); + } + function yzc(a) { + switch (a.g) { + case 0: + return Ohe; + case 1: + return -1; + default: + return 0; + } + } + function oD(a) { + if (eD(a, (wD(), vD)) < 0) { + return -aD(hD(a)); + } + return a.l + a.m * Hje + a.h * Ije; + } + function HC(a) { + return a.__elementTypeCategory$ == null ? 10 : a.__elementTypeCategory$; + } + function dub(a) { + var b; + b = a.b.c.length == 0 ? null : Ikb(a.b, 0); + b != null && fub(a, 0); + return b; + } + function uA(a, b) { + while (b[0] < a.length && hfb(" \r\n", wfb(bfb(a, b[0]))) >= 0) { + ++b[0]; + } + } + function sgb(a, b) { + this.e = b; + this.a = vgb(a); + this.a < 54 ? this.f = Sbb(a) : this.c = ghb(a); + } + function vge(a, b, c, d) { + wfe(); + xfe.call(this, 26); + this.c = a; + this.a = b; + this.d = c; + this.b = d; + } + function EA(a, b, c) { + var d, e; + d = 10; + for (e = 0; e < c - 1; e++) { + b < d && (a.a += "0", a); + d *= 10; + } + a.a += b; + } + function Hhe(a, b) { + var c; + c = 0; + while (a.e != a.i.gc()) { + Qrd(b, Dyd(a), meb(c)); + c != Ohe && ++c; + } + } + function xHc(a, b) { + var c; + ++a.d; + ++a.c[b]; + c = b + 1; + while (c < a.a.length) { + ++a.a[c]; + c += c & -c; + } + } + function Qgc(a, b) { + var c, d, e; + e = b.c.i; + c = BD(Ohb(a.f, e), 57); + d = c.d.c - c.e.c; + p7c(b.a, d, 0); + } + function Scb(a) { + var b, c; + b = a + 128; + c = (Ucb(), Tcb)[b]; + !c && (c = Tcb[b] = new Mcb(a)); + return c; + } + function es(a, b) { + var c; + uCb(b); + c = a[":" + b]; + nCb(!!c, OC(GC(SI, 1), Uhe, 1, 5, [b])); + return c; + } + function Mz(a) { + var b, c; + if (a.b) { + c = null; + do { + b = a.b; + a.b = null; + c = Pz(b, c); + } while (a.b); + a.b = c; + } + } + function Lz(a) { + var b, c; + if (a.a) { + c = null; + do { + b = a.a; + a.a = null; + c = Pz(b, c); + } while (a.a); + a.a = c; + } + } + function Dqb(a) { + var b; + ++a.a; + for (b = a.c.a.length; a.a < b; ++a.a) { + if (a.c.b[a.a]) { + return; + } + } + } + function S9b(a, b) { + var c, d; + d = b.c; + for (c = d + 1; c <= b.f; c++) { + a.a[c] > a.a[d] && (d = c); + } + return d; + } + function fic(a, b) { + var c; + c = Jy(a.e.c, b.e.c); + if (c == 0) { + return Kdb(a.e.d, b.e.d); + } + return c; + } + function Ogb(a, b) { + if (b.e == 0) { + return Ggb; + } + if (a.e == 0) { + return Ggb; + } + return Dhb(), Ehb(a, b); + } + function nCb(a, b) { + if (!a) { + throw vbb(new Wdb(DCb("Enum constant undefined: %s", b))); + } + } + function AWb() { + AWb = ccb; + xWb = new XWb(); + yWb = new _Wb(); + vWb = new dXb(); + wWb = new hXb(); + zWb = new lXb(); + } + function UEb() { + UEb = ccb; + SEb = new VEb("BY_SIZE", 0); + TEb = new VEb("BY_SIZE_AND_SHAPE", 1); + } + function XRb() { + XRb = ccb; + VRb = new YRb("EADES", 0); + WRb = new YRb("FRUCHTERMAN_REINGOLD", 1); + } + function xqc() { + xqc = ccb; + vqc = new yqc("READING_DIRECTION", 0); + wqc = new yqc("ROTATION", 1); + } + function uqc() { + uqc = ccb; + tqc = as((mqc(), OC(GC(IW, 1), Kie, 335, 0, [iqc, hqc, kqc, lqc, jqc]))); + } + function bAc() { + bAc = ccb; + aAc = as((Vzc(), OC(GC(_W, 1), Kie, 315, 0, [Uzc, Rzc, Szc, Qzc, Tzc]))); + } + function bkc() { + bkc = ccb; + akc = as((Xjc(), OC(GC(uV, 1), Kie, 363, 0, [Tjc, Vjc, Wjc, Ujc, Sjc]))); + } + function Htc() { + Htc = ccb; + Gtc = as((Ctc(), OC(GC(TW, 1), Kie, 163, 0, [Btc, xtc, ytc, ztc, Atc]))); + } + function S_c() { + S_c = ccb; + R_c = as((N_c(), OC(GC(Q_, 1), Kie, 316, 0, [I_c, J_c, M_c, K_c, L_c]))); + } + function S5c() { + S5c = ccb; + R5c = as((N5c(), OC(GC(e1, 1), Kie, 175, 0, [L5c, K5c, I5c, M5c, J5c]))); + } + function p$c() { + p$c = ccb; + o$c = as((k$c(), OC(GC(y_, 1), Kie, 355, 0, [g$c, f$c, i$c, h$c, j$c]))); + } + function vUb() { + vUb = ccb; + uUb = as((qUb(), OC(GC(zP, 1), Kie, 356, 0, [lUb, mUb, nUb, oUb, pUb]))); + } + function mad() { + mad = ccb; + lad = as((ead(), OC(GC(t1, 1), Kie, 103, 0, [cad, bad, aad, _9c, dad]))); + } + function Ybd() { + Ybd = ccb; + Xbd = as((Tbd(), OC(GC(C1, 1), Kie, 249, 0, [Qbd, Sbd, Obd, Pbd, Rbd]))); + } + function cdd() { + cdd = ccb; + bdd = as((Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]))); + } + function _1c(a, b) { + var c; + c = BD(Ohb(a.a, b), 134); + if (!c) { + c = new zNb(); + Rhb(a.a, b, c); + } + return c; + } + function hoc(a) { + var b; + b = BD(vNb(a, (wtc(), usc)), 305); + if (b) { + return b.a == a; + } + return false; + } + function ioc(a) { + var b; + b = BD(vNb(a, (wtc(), usc)), 305); + if (b) { + return b.i == a; + } + return false; + } + function Jub(a, b) { + uCb(b); + Iub(a); + if (a.d.Ob()) { + b.td(a.d.Pb()); + return true; + } + return false; + } + function Oy(a) { + if (ybb(a, Ohe) > 0) { + return Ohe; + } + if (ybb(a, Rie) < 0) { + return Rie; + } + return Tbb(a); + } + function Cv(a) { + if (a < 3) { + Xj(a, Hie); + return a + 1; + } + if (a < Iie) { + return QD(a / 0.75 + 1); + } + return Ohe; + } + function XKd(a, b) { + var c; + c = (a.i == null && TKd(a), a.i); + return b >= 0 && b < c.length ? c[b] : null; + } + function cC(a, b, c) { + var d; + if (b == null) { + throw vbb(new Geb()); + } + d = aC(a, b); + dC(a, b, c); + return d; + } + function Emc(a) { + a.a >= -0.01 && a.a <= ple && (a.a = 0); + a.b >= -0.01 && a.b <= ple && (a.b = 0); + return a; + } + function sfb(a, b) { + return b == (ntb(), ntb(), mtb) ? a.toLocaleLowerCase() : a.toLowerCase(); + } + function idb(a) { + return ((a.i & 2) != 0 ? "interface " : (a.i & 1) != 0 ? "" : "class ") + (fdb(a), a.o); + } + function Pnd(a) { + var b, c; + c = (b = new SSd(), b); + wtd((!a.q && (a.q = new cUd(n5, a, 11, 10)), a.q), c); + } + function Pdd(a, b) { + var c; + c = b > 0 ? b - 1 : b; + return Vdd(Wdd(Xdd(Ydd(new Zdd(), c), a.n), a.j), a.k); + } + function u2d(a, b, c, d) { + var e; + a.j = -1; + Qxd(a, I2d(a, b, c), (Q6d(), e = BD(b, 66).Mj(), e.Ok(d))); + } + function VWb(a) { + this.g = a; + this.f = new Rkb(); + this.a = $wnd.Math.min(this.g.c.c, this.g.d.c); + } + function mDb(a) { + this.b = new Rkb(); + this.a = new Rkb(); + this.c = new Rkb(); + this.d = new Rkb(); + this.e = a; + } + function Cnc(a, b) { + this.a = new Lqb(); + this.e = new Lqb(); + this.b = (xzc(), wzc); + this.c = a; + this.b = b; + } + function bIb(a, b, c) { + $Gb.call(this); + THb(this); + this.a = a; + this.c = c; + this.b = b.d; + this.f = b.e; + } + function yd(a) { + this.d = a; + this.c = a.c.vc().Kc(); + this.b = null; + this.a = null; + this.e = (hs(), gs); + } + function zud(a) { + if (a < 0) { + throw vbb(new Wdb("Illegal Capacity: " + a)); + } + this.g = this.ri(a); + } + function avb(a, b) { + if (0 > a || a > b) { + throw vbb(new scb("fromIndex: 0, toIndex: " + a + oke + b)); + } + } + function Gs(a) { + var b; + if (a.a == a.b.a) { + throw vbb(new utb()); + } + b = a.a; + a.c = b; + a.a = a.a.e; + return b; + } + function Zsb(a) { + var b; + yCb(!!a.c); + b = a.c.a; + Nsb(a.d, a.c); + a.b == a.c ? a.b = b : --a.a; + a.c = null; + } + function VAb(a, b) { + var c; + Uzb(a); + c = new lBb(a, a.a.rd(), a.a.qd() | 4, b); + return new YAb(a, c); + } + function ke(a, b) { + var c, d; + c = BD(Hv(a.d, b), 14); + if (!c) { + return null; + } + d = b; + return a.e.pc(d, c); + } + function xac(a, b) { + var c, d; + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 70); + yNb(c, (wtc(), Ssc), b); + } + } + function t9b(a) { + var b; + b = Edb(ED(vNb(a, (Nyc(), Zwc)))); + if (b < 0) { + b = 0; + yNb(a, Zwc, b); + } + return b; + } + function ifc(a, b, c) { + var d; + d = $wnd.Math.max(0, a.b / 2 - 0.5); + cfc(c, d, 1); + Ekb(b, new rfc(c, d)); + } + function NMc(a, b, c) { + var d; + d = a.a.e[BD(b.a, 10).p] - a.a.e[BD(c.a, 10).p]; + return QD(Eeb(d)); + } + function iZb(a, b, c, d, e, f) { + var g; + g = kZb(d); + QZb(g, e); + RZb(g, f); + Rc(a.a, d, new BZb(g, b, c.f)); + } + function Bid(a, b) { + var c; + c = YKd(a.Tg(), b); + if (!c) { + throw vbb(new Wdb(ite + b + lte)); + } + return c; + } + function ntd(a, b) { + var c; + c = a; + while (Xod(c)) { + c = Xod(c); + if (c == b) { + return true; + } + } + return false; + } + function Uw(a, b) { + var c, d, e; + d = b.a.cd(); + c = BD(b.a.dd(), 14).gc(); + for (e = 0; e < c; e++) { + a.td(d); + } + } + function Hkb(a, b) { + var c, d, e, f; + uCb(b); + for (d = a.c, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + b.td(c); + } + } + function Nsb(a, b) { + var c; + c = b.c; + b.a.b = b.b; + b.b.a = b.a; + b.a = b.b = null; + b.c = null; + --a.b; + return c; + } + function wqb(a, b) { + if (!!b && a.b[b.g] == b) { + NC(a.b, b.g, null); + --a.c; + return true; + } + return false; + } + function lo(a, b) { + return !!vo(a, b, Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15)))); + } + function w$b(a, b) { + ecd(BD(vNb(BD(a.e, 10), (Nyc(), Vxc)), 98)) && (mmb(), Okb(BD(a.e, 10).j, b)); + } + function THb(a) { + a.b = (NHb(), KHb); + a.f = (EIb(), CIb); + a.d = (Xj(2, Jie), new Skb(2)); + a.e = new d7c(); + } + function gHb() { + gHb = ccb; + dHb = new hHb("BEGIN", 0); + eHb = new hHb(gle, 1); + fHb = new hHb("END", 2); + } + function qad() { + qad = ccb; + nad = new rad(gle, 0); + oad = new rad("HEAD", 1); + pad = new rad("TAIL", 2); + } + function Fsd() { + Csd(); + return OC(GC(O3, 1), Kie, 237, 0, [Bsd, ysd, zsd, xsd, Asd, vsd, usd, wsd]); + } + function c6c() { + _5c(); + return OC(GC(f1, 1), Kie, 277, 0, [$5c, T5c, X5c, Z5c, U5c, V5c, W5c, Y5c]); + } + function Dlc() { + Alc(); + return OC(GC(KV, 1), Kie, 270, 0, [tlc, wlc, slc, zlc, vlc, ulc, ylc, xlc]); + } + function nAc() { + kAc(); + return OC(GC(aX, 1), Kie, 260, 0, [iAc, dAc, gAc, eAc, fAc, cAc, hAc, jAc]); + } + function kcd() { + kcd = ccb; + jcd = as((dcd(), OC(GC(D1, 1), Kie, 98, 0, [ccd, bcd, acd, Zbd, _bd, $bd]))); + } + function tHb() { + tHb = ccb; + sHb = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])).length; + rHb = sHb; + } + function wed(a) { + this.b = (Qb(a), new Tkb(a)); + this.a = new Rkb(); + this.d = new Rkb(); + this.e = new d7c(); + } + function W6c(a) { + var b; + b = $wnd.Math.sqrt(a.a * a.a + a.b * a.b); + if (b > 0) { + a.a /= b; + a.b /= b; + } + return a; + } + function bKd(a) { + var b; + if (a.w) { + return a.w; + } else { + b = cKd(a); + !!b && !b.kh() && (a.w = b); + return b; + } + } + function gZd(a) { + var b; + if (a == null) { + return null; + } else { + b = BD(a, 190); + return Umd(b, b.length); + } + } + function qud(a, b) { + if (a.g == null || b >= a.i) + throw vbb(new $zd(b, a.i)); + return a.li(b, a.g[b]); + } + function Mmc(a) { + var b, c; + b = a.a.d.j; + c = a.c.d.j; + while (b != c) { + rqb(a.b, b); + b = Xcd(b); + } + rqb(a.b, b); + } + function Jmc(a) { + var b; + for (b = 0; b < a.c.length; b++) { + (tCb(b, a.c.length), BD(a.c[b], 11)).p = b; + } + } + function bEc(a, b, c) { + var d, e, f; + e = b[c]; + for (d = 0; d < e.length; d++) { + f = e[d]; + a.e[f.c.p][f.p] = d; + } + } + function ZEc(a, b) { + var c, d, e, f; + for (d = a.d, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + REc(a.g, c).a = b; + } + } + function q7c(a, b) { + var c, d; + for (d = Jsb(a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 8); + P6c(c, b); + } + return a; + } + function zUb(a, b) { + var c; + c = c7c(R6c(BD(Ohb(a.g, b), 8)), E6c(BD(Ohb(a.f, b), 460).b)); + return c; + } + function lib(a) { + var b; + xpb(a.e, a); + sCb(a.b); + a.c = a.a; + b = BD(a.a.Pb(), 42); + a.b = kib(a); + return b; + } + function CD(a) { + var b; + CCb(a == null || Array.isArray(a) && (b = HC(a), !(b >= 14 && b <= 16))); + return a; + } + function dcb(a, b, c) { + var d = function() { + return a.apply(d, arguments); + }; + b.apply(d, c); + return d; + } + function TLc(a, b, c) { + var d, e; + d = b; + do { + e = Edb(a.p[d.p]) + c; + a.p[d.p] = e; + d = a.a[d.p]; + } while (d != b); + } + function NQd(a, b) { + var c, d; + d = a.a; + c = OQd(a, b, null); + d != b && !a.e && (c = QQd(a, b, c)); + !!c && c.Fi(); + } + function ADb(a, b) { + return Iy(), My(Qie), $wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b); + } + function Ky(a, b) { + Iy(); + My(Qie); + return $wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b); + } + function Akc(a, b) { + gkc(); + return beb(a.b.c.length - a.e.c.length, b.b.c.length - b.e.c.length); + } + function oo(a, b) { + return Kv(uo(a, b, Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))))); + } + function o0b() { + o0b = ccb; + n0b = as((j0b(), OC(GC(NQ, 1), Kie, 267, 0, [h0b, g0b, e0b, i0b, f0b, d0b]))); + } + function n8c() { + n8c = ccb; + m8c = as((i8c(), OC(GC(r1, 1), Kie, 291, 0, [h8c, g8c, f8c, d8c, c8c, e8c]))); + } + function K7c() { + K7c = ccb; + J7c = as((F7c(), OC(GC(o1, 1), Kie, 248, 0, [z7c, C7c, D7c, E7c, A7c, B7c]))); + } + function Fpc() { + Fpc = ccb; + Epc = as((Apc(), OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]))); + } + function Drc() { + Drc = ccb; + Crc = as((yrc(), OC(GC(OW, 1), Kie, 275, 0, [wrc, trc, xrc, vrc, urc, rrc]))); + } + function qrc() { + qrc = ccb; + prc = as((lrc(), OC(GC(NW, 1), Kie, 274, 0, [irc, hrc, krc, grc, jrc, frc]))); + } + function tzc() { + tzc = ccb; + szc = as((lzc(), OC(GC(YW, 1), Kie, 313, 0, [jzc, hzc, fzc, gzc, kzc, izc]))); + } + function Yqc() { + Yqc = ccb; + Xqc = as((Sqc(), OC(GC(LW, 1), Kie, 276, 0, [Nqc, Mqc, Pqc, Oqc, Rqc, Qqc]))); + } + function wSc() { + wSc = ccb; + vSc = as((qSc(), OC(GC(t$, 1), Kie, 327, 0, [pSc, lSc, nSc, mSc, oSc, kSc]))); + } + function ycd() { + ycd = ccb; + xcd = as((rcd(), OC(GC(E1, 1), Kie, 273, 0, [pcd, ncd, ocd, mcd, lcd, qcd]))); + } + function Rad() { + Rad = ccb; + Qad = as((Mad(), OC(GC(w1, 1), Kie, 312, 0, [Kad, Iad, Lad, Gad, Jad, Had]))); + } + function Lbd() { + Hbd(); + return OC(GC(B1, 1), Kie, 93, 0, [zbd, ybd, Bbd, Gbd, Fbd, Ebd, Cbd, Dbd, Abd]); + } + function vkd(a, b) { + var c; + c = a.a; + a.a = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 0, c, a.a)); + } + function wkd(a, b) { + var c; + c = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 1, c, a.b)); + } + function hmd(a, b) { + var c; + c = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 3, c, a.b)); + } + function ald(a, b) { + var c; + c = a.f; + a.f = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 3, c, a.f)); + } + function cld(a, b) { + var c; + c = a.g; + a.g = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 4, c, a.g)); + } + function dld(a, b) { + var c; + c = a.i; + a.i = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 5, c, a.i)); + } + function eld(a, b) { + var c; + c = a.j; + a.j = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 6, c, a.j)); + } + function omd(a, b) { + var c; + c = a.j; + a.j = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 1, c, a.j)); + } + function imd(a, b) { + var c; + c = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 4, c, a.c)); + } + function pmd(a, b) { + var c; + c = a.k; + a.k = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 2, c, a.k)); + } + function qQd(a, b) { + var c; + c = a.d; + a.d = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new mSd(a, 2, c, a.d)); + } + function AId(a, b) { + var c; + c = a.s; + a.s = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new mSd(a, 4, c, a.s)); + } + function DId(a, b) { + var c; + c = a.t; + a.t = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new mSd(a, 5, c, a.t)); + } + function _Jd(a, b) { + var c; + c = a.F; + a.F = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 5, c, b)); + } + function izd(a, b) { + var c; + c = BD(Ohb((pEd(), oEd), a), 55); + return c ? c.xj(b) : KC(SI, Uhe, 1, b, 5, 1); + } + function Xpd(a, b) { + var c, d; + c = b in a.a; + if (c) { + d = aC(a, b).he(); + if (d) { + return d.a; + } + } + return null; + } + function ftd(a, b) { + var c, d, e; + c = (d = (Fhd(), e = new Jod(), e), !!b && God(d, b), d); + Hod(c, a); + return c; + } + function LLd(a, b, c) { + Itd(a, c); + if (!a.Bk() && c != null && !a.wj(c)) { + throw vbb(new tcb()); + } + return c; + } + function Xdd(a, b) { + a.n = b; + if (a.n) { + a.f = new Rkb(); + a.e = new Rkb(); + } else { + a.f = null; + a.e = null; + } + return a; + } + function ndb(a, b, c, d, e, f) { + var g; + g = ldb(a, b); + zdb(c, g); + g.i = e ? 8 : 0; + g.f = d; + g.e = e; + g.g = f; + return g; + } + function rSd(a, b, c, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 1; + this.c = a; + this.a = c; + } + function tSd(a, b, c, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 2; + this.c = a; + this.a = c; + } + function BSd(a, b, c, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 6; + this.c = a; + this.a = c; + } + function GSd(a, b, c, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 7; + this.c = a; + this.a = c; + } + function xSd(a, b, c, d, e) { + this.d = b; + this.j = d; + this.e = e; + this.o = -1; + this.p = 4; + this.c = a; + this.a = c; + } + function rDb(a, b) { + var c, d, e, f; + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + nDb(a.a, c); + } + return a; + } + function pl(a) { + var b, c, d, e; + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + Qb(b); + } + return new vl(a); + } + function Uz(a) { + var b = /function(?:\s+([\w$]+))?\s*\(/; + var c = b.exec(a); + return c && c[1] || Xie; + } + function zdb(a, b) { + if (!a) { + return; + } + b.n = a; + var d = tdb(b); + if (!d) { + _bb[a] = [b]; + return; + } + d.gm = b; + } + function vlb(a, b, c) { + var d, e; + e = a.length; + d = $wnd.Math.min(c, e); + $Bb(a, 0, b, 0, d, true); + return b; + } + function RPb(a, b, c) { + var d, e; + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 79); + Qqb(a, BD(c.Kb(d), 33)); + } + } + function Xbb() { + Ybb(); + var a = Wbb; + for (var b = 0; b < arguments.length; b++) { + a.push(arguments[b]); + } + } + function n7c(a, b) { + var c, d, e, f; + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + Gsb(a, c, a.c.b, a.c); + } + } + function s$c(a, b) { + a.b = $wnd.Math.max(a.b, b.d); + a.e += b.r + (a.a.c.length == 0 ? 0 : a.c); + Ekb(a.a, b); + } + function wkb(a) { + yCb(a.c >= 0); + if (ekb(a.d, a.c) < 0) { + a.a = a.a - 1 & a.d.a.length - 1; + a.b = a.d.c; + } + a.c = -1; + } + function pgb(a) { + if (a.a < 54) { + return a.f < 0 ? -1 : a.f > 0 ? 1 : 0; + } + return (!a.c && (a.c = fhb(a.f)), a.c).e; + } + function My(a) { + if (!(a >= 0)) { + throw vbb(new Wdb("tolerance (" + a + ") must be >= 0")); + } + return a; + } + function n4c() { + if (!f4c) { + f4c = new m4c(); + l4c(f4c, OC(GC(C0, 1), Uhe, 130, 0, [new Z9c()])); + } + return f4c; + } + function KAc() { + KAc = ccb; + JAc = new LAc(ole, 0); + HAc = new LAc("INPUT", 1); + IAc = new LAc("OUTPUT", 2); + } + function bqc() { + bqc = ccb; + $pc = new cqc("ARD", 0); + aqc = new cqc("MSD", 1); + _pc = new cqc("MANUAL", 2); + } + function rGc() { + rGc = ccb; + oGc = new sGc("BARYCENTER", 0); + pGc = new sGc(Bne, 1); + qGc = new sGc(Cne, 2); + } + function ztd(a, b) { + var c; + c = a.gc(); + if (b < 0 || b > c) + throw vbb(new Cyd(b, c)); + return new czd(a, b); + } + function JAd(a, b) { + var c; + if (JD(b, 42)) { + return a.c.Mc(b); + } else { + c = qAd(a, b); + LAd(a, b); + return c; + } + } + function $nd(a, b, c) { + yId(a, b); + pnd(a, c); + AId(a, 0); + DId(a, 1); + CId(a, true); + BId(a, true); + return a; + } + function Xj(a, b) { + if (a < 0) { + throw vbb(new Wdb(b + " cannot be negative but was: " + a)); + } + return a; + } + function Bt(a, b) { + var c, d; + for (c = 0, d = a.gc(); c < d; ++c) { + if (wtb(b, a.Xb(c))) { + return c; + } + } + return -1; + } + function Nc(a) { + var b, c; + for (c = a.c.Cc().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 14); + b.$b(); + } + a.c.$b(); + a.d = 0; + } + function Ri(a) { + var b, c, d, e; + for (c = a.a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + Flb(b, b.length, null); + } + } + function ieb(a) { + var b, c; + if (a == 0) { + return 32; + } else { + c = 0; + for (b = 1; (b & a) == 0; b <<= 1) { + ++c; + } + return c; + } + } + function NGb(a) { + var b, c; + for (c = new olb(ahd(a)); c.a < c.c.c.length; ) { + b = BD(mlb(c), 680); + b.Gf(); + } + } + function CUb(a) { + xUb(); + this.g = new Lqb(); + this.f = new Lqb(); + this.b = new Lqb(); + this.c = new Hp(); + this.i = a; + } + function XZb() { + this.f = new d7c(); + this.d = new s0b(); + this.c = new d7c(); + this.a = new Rkb(); + this.b = new Rkb(); + } + function c6d(a, b, c, d) { + this.rj(); + this.a = b; + this.b = a; + this.c = null; + this.c = new d6d(this, b, c, d); + } + function nxd(a, b, c, d, e) { + this.d = a; + this.n = b; + this.g = c; + this.o = d; + this.p = -1; + e || (this.o = -2 - d - 1); + } + function hJd() { + FId.call(this); + this.n = -1; + this.g = null; + this.i = null; + this.j = null; + this.Bb |= zte; + } + function Ldd() { + Idd(); + return OC(GC(J1, 1), Kie, 259, 0, [Bdd, Ddd, Add, Edd, Fdd, Hdd, Gdd, Cdd, zdd]); + } + function uFb() { + rFb(); + return OC(GC(dN, 1), Kie, 250, 0, [qFb, lFb, mFb, kFb, oFb, pFb, nFb, jFb, iFb]); + } + function qeb() { + qeb = ccb; + peb = OC(GC(WD, 1), oje, 25, 15, [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15]); + } + function vCc() { + vCc = ccb; + uCc = e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + } + function VCc() { + VCc = ccb; + UCc = e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + } + function rDc() { + rDc = ccb; + qDc = e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + } + function yFc() { + yFc = ccb; + xFc = c3c(e3c(e3c(new j3c(), (qUb(), nUb), (S8b(), z8b)), oUb, p8b), pUb, y8b); + } + function Rpc() { + Rpc = ccb; + Ppc = new Tpc("LAYER_SWEEP", 0); + Opc = new Tpc(Tne, 1); + Qpc = new Tpc(ane, 2); + } + function RLc(a, b) { + var c, d; + c = a.c; + d = b.e[a.p]; + if (d > 0) { + return BD(Ikb(c.a, d - 1), 10); + } + return null; + } + function Lkd(a, b) { + var c; + c = a.k; + a.k = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 2, c, a.k)); + } + function kmd(a, b) { + var c; + c = a.f; + a.f = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 8, c, a.f)); + } + function lmd(a, b) { + var c; + c = a.i; + a.i = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 7, c, a.i)); + } + function Hod(a, b) { + var c; + c = a.a; + a.a = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 8, c, a.a)); + } + function zpd(a, b) { + var c; + c = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 0, c, a.b)); + } + function UUd(a, b) { + var c; + c = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 0, c, a.b)); + } + function VUd(a, b) { + var c; + c = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c, a.c)); + } + function Apd(a, b) { + var c; + c = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c, a.c)); + } + function pQd(a, b) { + var c; + c = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 4, c, a.c)); + } + function PHd(a, b) { + var c; + c = a.d; + a.d = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c, a.d)); + } + function jKd(a, b) { + var c; + c = a.D; + a.D = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 2, c, a.D)); + } + function Rdd(a, b) { + if (a.r > 0 && a.c < a.r) { + a.c += b; + !!a.i && a.i.d > 0 && a.g != 0 && Rdd(a.i, b / a.r * a.i.d); + } + } + function dge(a, b, c) { + var d; + a.b = b; + a.a = c; + d = (a.a & 512) == 512 ? new hee() : new ude(); + a.c = ode(d, a.b, a.a); + } + function g3d(a, b) { + return T6d(a.e, b) ? (Q6d(), YId(b) ? new R7d(b, a) : new f7d(b, a)) : new c8d(b, a); + } + function _o(a, b) { + return Fv(vo(a.a, b, Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))))); + } + function Nyb(a, b, c) { + return Ayb(a, new Kzb(b), new Mzb(), new Ozb(c), OC(GC(xL, 1), Kie, 132, 0, [])); + } + function pAb(a) { + var b, c; + if (0 > a) { + return new yAb(); + } + b = a + 1; + c = new rAb(b, a); + return new vAb(null, c); + } + function umb(a, b) { + mmb(); + var c; + c = new Mqb(1); + ND(a) ? Shb(c, a, b) : jrb(c.f, a, b); + return new iob(c); + } + function aMb(a, b) { + var c, d; + c = a.o + a.p; + d = b.o + b.p; + if (c < d) { + return -1; + } + if (c == d) { + return 0; + } + return 1; + } + function P2b(a) { + var b; + b = vNb(a, (wtc(), $sc)); + if (JD(b, 160)) { + return O2b(BD(b, 160)); + } + return null; + } + function Kp(a) { + var b; + a = $wnd.Math.max(a, 2); + b = geb(a); + if (a > b) { + b <<= 1; + return b > 0 ? b : Iie; + } + return b; + } + function xc(a) { + Ub(a.e != 3); + switch (a.e) { + case 2: + return false; + case 0: + return true; + } + return zc(a); + } + function T6c(a, b) { + var c; + if (JD(b, 8)) { + c = BD(b, 8); + return a.a == c.a && a.b == c.b; + } else { + return false; + } + } + function _Mb(a, b, c) { + var d, e, f; + f = b >> 5; + e = b & 31; + d = xbb(Pbb(a.n[c][f], Tbb(Nbb(e, 1))), 3); + return d; + } + function IAd(a, b) { + var c, d; + for (d = b.vc().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 42); + HAd(a, c.cd(), c.dd()); + } + } + function N1c(a, b) { + var c; + c = new tOb(); + BD(b.b, 65); + BD(b.b, 65); + BD(b.b, 65); + Hkb(b.a, new T1c(a, c, b)); + } + function DUd(a, b) { + var c; + c = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 21, c, a.b)); + } + function jmd(a, b) { + var c; + c = a.d; + a.d = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 11, c, a.d)); + } + function _Id(a, b) { + var c; + c = a.j; + a.j = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 13, c, a.j)); + } + function $jb(a, b, c) { + var d, e, f; + f = a.a.length - 1; + for (e = a.b, d = 0; d < c; e = e + 1 & f, ++d) { + NC(b, d, a.a[e]); + } + } + function rqb(a, b) { + var c; + uCb(b); + c = b.g; + if (!a.b[c]) { + NC(a.b, c, b); + ++a.c; + return true; + } + return false; + } + function eub(a, b) { + var c; + c = b == null ? -1 : Jkb(a.b, b, 0); + if (c < 0) { + return false; + } + fub(a, c); + return true; + } + function fub(a, b) { + var c; + c = Kkb(a.b, a.b.c.length - 1); + if (b < a.b.c.length) { + Nkb(a.b, b, c); + bub(a, b); + } + } + function eyb(a, b) { + ((oyb(), lyb) ? null : b.c).length == 0 && qyb(b, new zyb()); + Shb(a.a, lyb ? null : b.c, b); + } + function M5b(a, b) { + Odd(b, "Hierarchical port constraint processing", 1); + N5b(a); + P5b(a); + Qdd(b); + } + function GOb(a, b) { + var c, d; + for (d = b.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 266); + a.b = true; + Qqb(a.e, c); + c.b = a; + } + } + function Owb(a, b) { + var c, d; + c = 1 - b; + d = a.a[c]; + a.a[c] = d.a[b]; + d.a[b] = a; + a.b = true; + d.b = false; + return d; + } + function Gec(a, b) { + var c, d; + c = BD(vNb(a, (Nyc(), ayc)), 8); + d = BD(vNb(b, ayc), 8); + return Kdb(c.b, d.b); + } + function jfc(a) { + oEb.call(this); + this.b = Edb(ED(vNb(a, (Nyc(), lyc)))); + this.a = BD(vNb(a, Swc), 218); + } + function XGc(a, b, c) { + uEc.call(this, a, b, c); + this.a = new Lqb(); + this.b = new Lqb(); + this.d = new $Gc(this); + } + function ku(a) { + this.e = a; + this.d = new Uqb(Cv(Ec(this.e).gc())); + this.c = this.e.a; + this.b = this.e.c; + } + function BHc(a) { + this.b = a; + this.a = KC(WD, oje, 25, a + 1, 15, 1); + this.c = KC(WD, oje, 25, a, 15, 1); + this.d = 0; + } + function THc(a, b, c) { + var d; + d = new Rkb(); + UHc(a, b, d, c, true, true); + a.b = new BHc(d.c.length); + return d; + } + function nMc(a, b) { + var c; + c = BD(Ohb(a.c, b), 458); + if (!c) { + c = new uMc(); + c.c = b; + Rhb(a.c, c.c, c); + } + return c; + } + function $B(e, a) { + var b = e.a; + var c = 0; + for (var d in b) { + b.hasOwnProperty(d) && (a[c++] = d); + } + return a; + } + function pRd(a) { + var b; + if (a.b == null) { + return LRd(), LRd(), KRd; + } + b = a.Lk() ? a.Kk() : a.Jk(); + return b; + } + function r$c(a) { + var b, c; + for (c = new Fyd(a); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 33); + dld(b, 0); + eld(b, 0); + } + } + function HSb() { + HSb = ccb; + FSb = new Lsd(Ime); + GSb = new Lsd(Jme); + ESb = new Lsd(Kme); + DSb = new Lsd(Lme); + } + function y5b() { + y5b = ccb; + x5b = new z5b("TO_INTERNAL_LTR", 0); + w5b = new z5b("TO_INPUT_DIRECTION", 1); + } + function PUc() { + PUc = ccb; + NUc = new RUc("P1_NODE_PLACEMENT", 0); + OUc = new RUc("P2_EDGE_ROUTING", 1); + } + function Fkc() { + Fkc = ccb; + Ekc = new Gkc("START", 0); + Dkc = new Gkc("MIDDLE", 1); + Ckc = new Gkc("END", 2); + } + function I9b() { + I9b = ccb; + H9b = new Msd("edgelabelcenterednessanalysis.includelabel", (Bcb(), zcb)); + } + function Zyc(a, b) { + MAb(JAb(new YAb(null, new Kub(new Pib(a.b), 1)), new bfd(a, b)), new ffd(a, b)); + } + function $Xc() { + this.c = new jVc(0); + this.b = new jVc(Tqe); + this.d = new jVc(Sqe); + this.a = new jVc(cme); + } + function $Fc(a) { + var b, c; + for (c = a.c.a.ec().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 214); + eFc(b, new oHc(b.e)); + } + } + function ZFc(a) { + var b, c; + for (c = a.c.a.ec().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 214); + dFc(b, new nHc(b.f)); + } + } + function pnd(a, b) { + var c; + c = a.zb; + a.zb = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c, a.zb)); + } + function cod(a, b) { + var c; + c = a.xb; + a.xb = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, c, a.xb)); + } + function dod(a, b) { + var c; + c = a.yb; + a.yb = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 2, c, a.yb)); + } + function Knd(a, b) { + var c, d; + c = (d = new OJd(), d); + c.n = b; + wtd((!a.s && (a.s = new cUd(t5, a, 21, 17)), a.s), c); + } + function Qnd(a, b) { + var c, d; + d = (c = new FUd(), c); + d.n = b; + wtd((!a.s && (a.s = new cUd(t5, a, 21, 17)), a.s), d); + } + function ktb(a, b) { + var c, d; + c = a.Pc(); + Klb(c, 0, c.length, b); + for (d = 0; d < c.length; d++) { + a._c(d, c[d]); + } + } + function ye(a, b) { + var c, d, e; + uCb(b); + c = false; + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + c = c | a.Fc(d); + } + return c; + } + function Bx(a) { + var b, c, d; + b = 0; + for (d = a.Kc(); d.Ob(); ) { + c = d.Pb(); + b += c != null ? tb(c) : 0; + b = ~~b; + } + return b; + } + function SA(a) { + var b; + if (a == 0) { + return "UTC"; + } + if (a < 0) { + a = -a; + b = "UTC+"; + } else { + b = "UTC-"; + } + return b + UA(a); + } + function Jq(a, b) { + var c; + if (JD(b, 14)) { + c = BD(b, 14); + return a.Gc(c); + } + return fr(a, BD(Qb(b), 20).Kc()); + } + function Bnc(a, b, c) { + Cnc.call(this, b, c); + this.d = KC(OQ, kne, 10, a.a.c.length, 0, 1); + Qkb(a.a, this.d); + } + function IMc(a) { + a.a = null; + a.e = null; + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + a.f.c = KC(SI, Uhe, 1, 0, 5, 1); + a.c = null; + } + function gKd(a, b) { + if (b) { + if (a.B == null) { + a.B = a.D; + a.D = null; + } + } else if (a.B != null) { + a.D = a.B; + a.B = null; + } + } + function Poc(a, b) { + return Edb(ED(Btb(TAb(NAb(new YAb(null, new Kub(a.c.b, 16)), new fpc(a)), b)))); + } + function Soc(a, b) { + return Edb(ED(Btb(TAb(NAb(new YAb(null, new Kub(a.c.b, 16)), new dpc(a)), b)))); + } + function Q2b(a, b) { + Odd(b, zne, 1); + MAb(LAb(new YAb(null, new Kub(a.b, 16)), new U2b()), new W2b()); + Qdd(b); + } + function SXc(a, b) { + var c, d; + c = BD(hkd(a, (ZWc(), SWc)), 19); + d = BD(hkd(b, SWc), 19); + return beb(c.a, d.a); + } + function p7c(a, b, c) { + var d, e; + for (e = Jsb(a, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 8); + d.a += b; + d.b += c; + } + return a; + } + function uo(a, b, c) { + var d; + for (d = a.b[c & a.f]; d; d = d.b) { + if (c == d.a && Hb(b, d.g)) { + return d; + } + } + return null; + } + function vo(a, b, c) { + var d; + for (d = a.c[c & a.f]; d; d = d.d) { + if (c == d.f && Hb(b, d.i)) { + return d; + } + } + return null; + } + function khb(a, b, c) { + var d, e, f; + d = 0; + for (e = 0; e < c; e++) { + f = b[e]; + a[e] = f << 1 | d; + d = f >>> 31; + } + d != 0 && (a[c] = d); + } + function rmb(a, b) { + mmb(); + var c, d; + d = new Rkb(); + for (c = 0; c < a; ++c) { + d.c[d.c.length] = b; + } + return new Yob(d); + } + function Zzb(a) { + var b; + b = Yzb(a); + if (Bbb(b.a, 0)) { + return Ltb(), Ltb(), Ktb; + } + return Ltb(), new Ptb(b.b); + } + function $zb(a) { + var b; + b = Yzb(a); + if (Bbb(b.a, 0)) { + return Ltb(), Ltb(), Ktb; + } + return Ltb(), new Ptb(b.c); + } + function uAb(a) { + var b; + b = tAb(a); + if (Bbb(b.a, 0)) { + return Utb(), Utb(), Ttb; + } + return Utb(), new Xtb(b.b); + } + function zZb(a) { + if (a.b.c.i.k == (j0b(), e0b)) { + return BD(vNb(a.b.c.i, (wtc(), $sc)), 11); + } + return a.b.c; + } + function AZb(a) { + if (a.b.d.i.k == (j0b(), e0b)) { + return BD(vNb(a.b.d.i, (wtc(), $sc)), 11); + } + return a.b.d; + } + function Vnd(a, b, c, d, e, f, g, h, i, j, k, l, m) { + aod(a, b, c, d, e, f, g, h, i, j, k, l, m); + MJd(a, false); + return a; + } + function tJb(a, b, c, d, e, f, g) { + $r.call(this, a, b); + this.d = c; + this.e = d; + this.c = e; + this.b = f; + this.a = Ou(g); + } + function $bb(a, b) { + typeof window === Jhe && typeof window["$gwt"] === Jhe && (window["$gwt"][a] = b); + } + function pWb(a, b) { + lWb(); + return a == hWb && b == kWb || a == kWb && b == hWb || a == jWb && b == iWb || a == iWb && b == jWb; + } + function qWb(a, b) { + lWb(); + return a == hWb && b == iWb || a == hWb && b == jWb || a == kWb && b == jWb || a == kWb && b == iWb; + } + function IJb(a, b) { + return Iy(), My(ple), $wnd.Math.abs(0 - b) <= ple || 0 == b || isNaN(0) && isNaN(b) ? 0 : a / b; + } + function Rrc() { + Orc(); + return OC(GC(PW, 1), Kie, 256, 0, [Frc, Hrc, Irc, Jrc, Krc, Lrc, Nrc, Erc, Grc, Mrc]); + } + function NKd() { + NKd = ccb; + KKd = new KPd(); + MKd = OC(GC(t5, 1), Mve, 170, 0, []); + LKd = OC(GC(n5, 1), Nve, 59, 0, []); + } + function CBc() { + CBc = ccb; + BBc = new DBc("NO", 0); + zBc = new DBc("GREEDY", 1); + ABc = new DBc("LOOK_BACK", 2); + } + function z0b() { + z0b = ccb; + w0b = new m1b(); + u0b = new h1b(); + v0b = new q1b(); + t0b = new u1b(); + x0b = new y1b(); + y0b = new C1b(); + } + function J9b(a) { + var b, c, d; + d = 0; + for (c = new olb(a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 29); + b.p = d; + ++d; + } + } + function nfd(a, b) { + var c; + c = sfd(a); + return mfd(new f7c(c.c, c.d), new f7c(c.b, c.a), a.rf(), b, a.Hf()); + } + function Udd(a, b) { + var c; + if (a.b) { + return null; + } else { + c = Pdd(a, a.g); + Dsb(a.a, c); + c.i = a; + a.d = b; + return c; + } + } + function kUc(a, b, c) { + Odd(c, "DFS Treeifying phase", 1); + jUc(a, b); + hUc(a, b); + a.a = null; + a.b = null; + Qdd(c); + } + function zic(a, b, c) { + this.g = a; + this.d = b; + this.e = c; + this.a = new Rkb(); + xic(this); + mmb(); + Okb(this.a, null); + } + function Aud(a) { + this.i = a.gc(); + if (this.i > 0) { + this.g = this.ri(this.i + (this.i / 8 | 0) + 1); + a.Qc(this.g); + } + } + function u3d(a, b) { + k2d.call(this, D9, a, b); + this.b = this; + this.a = S6d(a.Tg(), XKd(this.e.Tg(), this.c)); + } + function Ld(a, b) { + var c, d; + uCb(b); + for (d = b.vc().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 42); + a.zc(c.cd(), c.dd()); + } + } + function G2d(a, b, c) { + var d; + for (d = c.Kc(); d.Ob(); ) { + if (!E2d(a, b, d.Pb())) { + return false; + } + } + return true; + } + function sVd(a, b, c, d, e) { + var f; + if (c) { + f = bLd(b.Tg(), a.c); + e = c.gh(b, -1 - (f == -1 ? d : f), null, e); + } + return e; + } + function tVd(a, b, c, d, e) { + var f; + if (c) { + f = bLd(b.Tg(), a.c); + e = c.ih(b, -1 - (f == -1 ? d : f), null, e); + } + return e; + } + function Mgb(a) { + var b; + if (a.b == -2) { + if (a.e == 0) { + b = -1; + } else { + for (b = 0; a.a[b] == 0; b++) + ; + } + a.b = b; + } + return a.b; + } + function Z4b(a) { + switch (a.g) { + case 2: + return Ucd(), Tcd; + case 4: + return Ucd(), zcd; + default: + return a; + } + } + function $4b(a) { + switch (a.g) { + case 1: + return Ucd(), Rcd; + case 3: + return Ucd(), Acd; + default: + return a; + } + } + function nkc(a) { + var b, c, d; + return a.j == (Ucd(), Acd) && (b = pkc(a), c = uqb(b, zcd), d = uqb(b, Tcd), d || d && c); + } + function oqb(a) { + var b, c; + b = BD(a.e && a.e(), 9); + c = BD(ZBb(b, b.length), 9); + return new xqb(b, c, b.length); + } + function l7b(a, b) { + Odd(b, zne, 1); + UGb(TGb(new YGb((a$b(), new l$b(a, false, false, new T$b()))))); + Qdd(b); + } + function Fcb(a, b) { + Bcb(); + return ND(a) ? cfb(a, GD(b)) : LD(a) ? Ddb(a, ED(b)) : KD(a) ? Dcb(a, DD(b)) : a.wd(b); + } + function WZc(a, b) { + b.q = a; + a.d = $wnd.Math.max(a.d, b.r); + a.b += b.d + (a.a.c.length == 0 ? 0 : a.c); + Ekb(a.a, b); + } + function m6c(a, b) { + var c, d, e, f; + e = a.c; + c = a.c + a.b; + f = a.d; + d = a.d + a.a; + return b.a > e && b.a < c && b.b > f && b.b < d; + } + function Ynd(a, b, c, d) { + JD(a.Cb, 179) && (BD(a.Cb, 179).tb = null); + pnd(a, c); + !!b && hKd(a, b); + d && a.xk(true); + } + function Yqd(a, b) { + var c; + c = BD(b, 183); + Spd(c, "x", a.i); + Spd(c, "y", a.j); + Spd(c, Gte, a.g); + Spd(c, Fte, a.f); + } + function LFc() { + LFc = ccb; + KFc = b3c(f3c(e3c(e3c(new j3c(), (qUb(), nUb), (S8b(), z8b)), oUb, p8b), pUb), y8b); + } + function dHc() { + dHc = ccb; + cHc = b3c(f3c(e3c(e3c(new j3c(), (qUb(), nUb), (S8b(), z8b)), oUb, p8b), pUb), y8b); + } + function sXc() { + sXc = ccb; + qXc = new uXc(ane, 0); + rXc = new uXc("POLAR_COORDINATE", 1); + pXc = new uXc("ID", 2); + } + function TAc() { + TAc = ccb; + QAc = new UAc("EQUALLY", 0); + RAc = new UAc(xle, 1); + SAc = new UAc("NORTH_SOUTH", 2); + } + function pAc() { + pAc = ccb; + oAc = as((kAc(), OC(GC(aX, 1), Kie, 260, 0, [iAc, dAc, gAc, eAc, fAc, cAc, hAc, jAc]))); + } + function Flc() { + Flc = ccb; + Elc = as((Alc(), OC(GC(KV, 1), Kie, 270, 0, [tlc, wlc, slc, zlc, vlc, ulc, ylc, xlc]))); + } + function e6c() { + e6c = ccb; + d6c = as((_5c(), OC(GC(f1, 1), Kie, 277, 0, [$5c, T5c, X5c, Z5c, U5c, V5c, W5c, Y5c]))); + } + function Hsd() { + Hsd = ccb; + Gsd = as((Csd(), OC(GC(O3, 1), Kie, 237, 0, [Bsd, ysd, zsd, xsd, Asd, vsd, usd, wsd]))); + } + function XNb() { + XNb = ccb; + VNb = new Msd("debugSVG", (Bcb(), false)); + WNb = new Msd("overlapsExisted", true); + } + function Xyb(a, b) { + return Ayb(new tzb(a), new vzb(b), new xzb(b), new zzb(), OC(GC(xL, 1), Kie, 132, 0, [])); + } + function hyb() { + var a; + if (!dyb) { + dyb = new gyb(); + a = new wyb(""); + uyb(a, ($xb(), Zxb)); + eyb(dyb, a); + } + return dyb; + } + function hr(a, b) { + var c; + Qb(b); + while (a.Ob()) { + c = a.Pb(); + if (!QNc(BD(c, 10))) { + return false; + } + } + return true; + } + function T3c(a, b) { + var c; + c = h4c(n4c(), a); + if (c) { + jkd(b, (Y9c(), F9c), c); + return true; + } else { + return false; + } + } + function d3c(a, b) { + var c; + for (c = 0; c < b.j.c.length; c++) { + BD(B2c(a, c), 21).Gc(BD(B2c(b, c), 14)); + } + return a; + } + function M9b(a, b) { + var c, d; + for (d = new olb(b.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + a.a[c.p] = _$b(c); + } + } + function stb(a, b) { + var c, d; + uCb(b); + for (d = a.vc().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 42); + b.Od(c.cd(), c.dd()); + } + } + function cId(a, b) { + var c; + if (JD(b, 83)) { + BD(a.c, 76).Xj(); + c = BD(b, 83); + IAd(a, c); + } else { + BD(a.c, 76).Wb(b); + } + } + function Su(a) { + return JD(a, 152) ? km(BD(a, 152)) : JD(a, 131) ? BD(a, 131).a : JD(a, 54) ? new ov(a) : new dv(a); + } + function fac(a, b) { + return b < a.b.gc() ? BD(a.b.Xb(b), 10) : b == a.b.gc() ? a.a : BD(Ikb(a.e, b - a.b.gc() - 1), 10); + } + function crb(a, b) { + a.a = wbb(a.a, 1); + a.c = $wnd.Math.min(a.c, b); + a.b = $wnd.Math.max(a.b, b); + a.d = wbb(a.d, b); + } + function n3b(a, b) { + var c; + Odd(b, "Edge and layer constraint edge reversal", 1); + c = m3b(a); + l3b(c); + Qdd(b); + } + function tAd(a) { + var b; + if (a.d == null) { + ++a.e; + a.f = 0; + sAd(null); + } else { + ++a.e; + b = a.d; + a.d = null; + a.f = 0; + sAd(b); + } + } + function zbb(a) { + var b; + b = a.h; + if (b == 0) { + return a.l + a.m * Hje; + } + if (b == Fje) { + return a.l + a.m * Hje - Ije; + } + return a; + } + function aKb(a) { + $Jb(); + if (a.A.Hc((tdd(), pdd))) { + if (!a.B.Hc((Idd(), Ddd))) { + return _Jb(a); + } + } + return null; + } + function Zgb(a) { + uCb(a); + if (a.length == 0) { + throw vbb(new Oeb("Zero length BigInteger")); + } + dhb(this, a); + } + function Vb(a) { + if (!a) { + throw vbb(new Zdb("no calls to next() since the last call to remove()")); + } + } + function Cbb(a) { + if (Kje < a && a < Ije) { + return a < 0 ? $wnd.Math.ceil(a) : $wnd.Math.floor(a); + } + return zbb(fD(a)); + } + function Yyb(a, b) { + var c, d, e; + c = a.c.Ee(); + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + a.a.Od(c, d); + } + return a.b.Kb(c); + } + function Uhd(a, b) { + var c, d, e; + c = a.Jg(); + if (c != null && a.Mg()) { + for (d = 0, e = c.length; d < e; ++d) { + c[d].ui(b); + } + } + } + function f_b(a, b) { + var c, d; + c = a; + d = Q_b(c).e; + while (d) { + c = d; + if (c == b) { + return true; + } + d = Q_b(c).e; + } + return false; + } + function lDc(a, b, c) { + var d, e; + d = a.a.f[b.p]; + e = a.a.f[c.p]; + if (d < e) { + return -1; + } + if (d == e) { + return 0; + } + return 1; + } + function Si(a, b, c) { + var d, e; + e = BD(tn(a.d, b), 19); + d = BD(tn(a.b, c), 19); + return !e || !d ? null : Mi(a, e.a, d.a); + } + function cYc(a, b) { + var c, d; + for (d = new Fyd(a); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 33); + bld(c, c.i + b.b, c.j + b.d); + } + } + function qjc(a, b) { + var c, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 70); + Ekb(a.d, c); + ujc(a, c); + } + } + function pQc(a, b) { + var c, d; + d = new Rkb(); + c = b; + do { + d.c[d.c.length] = c; + c = BD(Ohb(a.k, c), 17); + } while (c); + return d; + } + function Ajd(a, b) { + var c; + if ((a.Db & b) != 0) { + c = zjd(a, b); + return c == -1 ? a.Eb : CD(a.Eb)[c]; + } else { + return null; + } + } + function Lnd(a, b) { + var c, d; + c = (d = new hLd(), d); + c.G = b; + !a.rb && (a.rb = new jUd(a, d5, a)); + wtd(a.rb, c); + return c; + } + function Mnd(a, b) { + var c, d; + c = (d = new MPd(), d); + c.G = b; + !a.rb && (a.rb = new jUd(a, d5, a)); + wtd(a.rb, c); + return c; + } + function Hkd(a, b) { + switch (b) { + case 1: + return !!a.n && a.n.i != 0; + case 2: + return a.k != null; + } + return dkd(a, b); + } + function gNc(a) { + switch (a.a.g) { + case 1: + return new NNc(); + case 3: + return new vQc(); + default: + return new wNc(); + } + } + function MRd(a) { + var b; + if (a.g > 1 || a.Ob()) { + ++a.a; + a.g = 0; + b = a.i; + a.Ob(); + return b; + } else { + throw vbb(new utb()); + } + } + function kNc(a) { + fNc(); + var b; + if (!Lpb(eNc, a)) { + b = new hNc(); + b.a = a; + Opb(eNc, a, b); + } + return BD(Mpb(eNc, a), 635); + } + function Rbb(a) { + var b, c, d, e; + e = a; + d = 0; + if (e < 0) { + e += Ije; + d = Fje; + } + c = QD(e / Hje); + b = QD(e - c * Hje); + return TC(b, c, d); + } + function Ox(a) { + var b, c, d; + d = 0; + for (c = new Gqb(a.a); c.a < c.c.a.length; ) { + b = Fqb(c); + a.b.Hc(b) && ++d; + } + return d; + } + function Ku(a) { + var b, c, d; + b = 1; + for (d = a.Kc(); d.Ob(); ) { + c = d.Pb(); + b = 31 * b + (c == null ? 0 : tb(c)); + b = ~~b; + } + return b; + } + function Zwb(a, b) { + var c; + this.c = a; + c = new Rkb(); + Ewb(a, c, b, a.b, null, false, null, false); + this.a = new Bib(c, 0); + } + function p4d(a, b) { + this.b = a; + this.e = b; + this.d = b.j; + this.f = (Q6d(), BD(a, 66).Oj()); + this.k = S6d(b.e.Tg(), a); + } + function xwb(a, b, c) { + this.b = (uCb(a), a); + this.d = (uCb(b), b); + this.e = (uCb(c), c); + this.c = this.d + ("" + this.e); + } + function xRb() { + this.a = BD(Ksd((wSb(), eSb)), 19).a; + this.c = Edb(ED(Ksd(uSb))); + this.b = Edb(ED(Ksd(qSb))); + } + function Nbd() { + Nbd = ccb; + Mbd = as((Hbd(), OC(GC(B1, 1), Kie, 93, 0, [zbd, ybd, Bbd, Gbd, Fbd, Ebd, Cbd, Dbd, Abd]))); + } + function wFb() { + wFb = ccb; + vFb = as((rFb(), OC(GC(dN, 1), Kie, 250, 0, [qFb, lFb, mFb, kFb, oFb, pFb, nFb, jFb, iFb]))); + } + function vLb() { + vLb = ccb; + uLb = new wLb("UP", 0); + rLb = new wLb(vle, 1); + sLb = new wLb(jle, 2); + tLb = new wLb(kle, 3); + } + function rTc() { + rTc = ccb; + qTc = (STc(), QTc); + pTc = new Nsd(Zqe, qTc); + oTc = ($Tc(), ZTc); + nTc = new Nsd($qe, oTc); + } + function Xrc() { + Xrc = ccb; + Vrc = new Yrc("ONE_SIDED", 0); + Wrc = new Yrc("TWO_SIDED", 1); + Urc = new Yrc("OFF", 2); + } + function TQc(a) { + a.r = new Tqb(); + a.w = new Tqb(); + a.t = new Rkb(); + a.i = new Rkb(); + a.d = new Tqb(); + a.a = new I6c(); + a.c = new Lqb(); + } + function uOc(a) { + this.n = new Rkb(); + this.e = new Psb(); + this.j = new Psb(); + this.k = new Rkb(); + this.f = new Rkb(); + this.p = a; + } + function PEc(a, b) { + if (a.c) { + QEc(a, b, true); + MAb(new YAb(null, new Kub(b, 16)), new bFc(a)); + } + QEc(a, b, false); + } + function wFc(a, b, c) { + return a == (rGc(), qGc) ? new pFc() : Cub(b, 1) != 0 ? new iHc(c.length) : new RGc(c.length); + } + function tNb(a, b) { + var c; + if (!b) { + return a; + } + c = b.Ve(); + c.dc() || (!a.q ? a.q = new Nqb(c) : Ld(a.q, c)); + return a; + } + function Erb(a, b) { + var c; + c = a.a.get(b); + if (c === void 0) { + ++a.d; + } else { + urb(a.a, b); + --a.c; + zpb(a.b); + } + return c; + } + function UYb(a, b) { + var c, d, e; + c = b.p - a.p; + if (c == 0) { + d = a.f.a * a.f.b; + e = b.f.a * b.f.b; + return Kdb(d, e); + } + return c; + } + function XLb(a, b) { + var c, d; + c = a.f.c.length; + d = b.f.c.length; + if (c < d) { + return -1; + } + if (c == d) { + return 0; + } + return 1; + } + function KZb(a) { + if (a.b.c.length != 0 && !!BD(Ikb(a.b, 0), 70).a) { + return BD(Ikb(a.b, 0), 70).a; + } + return JZb(a); + } + function Pq(a) { + var b; + if (a) { + b = a; + if (b.dc()) { + throw vbb(new utb()); + } + return b.Xb(b.gc() - 1); + } + return nr(a.Kc()); + } + function vgb(a) { + var b; + ybb(a, 0) < 0 && (a = Lbb(a)); + return b = Tbb(Obb(a, 32)), 64 - (b != 0 ? heb(b) : heb(Tbb(a)) + 32); + } + function QNc(a) { + var b; + b = BD(vNb(a, (wtc(), Hsc)), 61); + return a.k == (j0b(), e0b) && (b == (Ucd(), Tcd) || b == zcd); + } + function bZb(a, b, c) { + var d, e; + e = BD(vNb(a, (Nyc(), jxc)), 74); + if (e) { + d = new s7c(); + o7c(d, 0, e); + q7c(d, c); + ye(b, d); + } + } + function M_b(a, b, c) { + var d, e, f, g; + g = Q_b(a); + d = g.d; + e = g.c; + f = a.n; + b && (f.a = f.a - d.b - e.a); + c && (f.b = f.b - d.d - e.b); + } + function dcc(a, b) { + var c, d; + c = a.j; + d = b.j; + return c != d ? c.g - d.g : a.p == b.p ? 0 : c == (Ucd(), Acd) ? a.p - b.p : b.p - a.p; + } + function dmc(a) { + var b, c; + bmc(a); + for (c = new olb(a.d); c.a < c.c.c.length; ) { + b = BD(mlb(c), 101); + !!b.i && cmc(b); + } + } + function lBc(a, b, c, d, e) { + NC(a.c[b.g], c.g, d); + NC(a.c[c.g], b.g, d); + NC(a.b[b.g], c.g, e); + NC(a.b[c.g], b.g, e); + } + function G1c(a, b, c, d) { + BD(c.b, 65); + BD(c.b, 65); + BD(d.b, 65); + BD(d.b, 65); + BD(d.b, 65); + Hkb(d.a, new L1c(a, b, d)); + } + function WDb(a, b) { + a.d == (ead(), aad) || a.d == dad ? BD(b.a, 57).c.Fc(BD(b.b, 57)) : BD(b.b, 57).c.Fc(BD(b.a, 57)); + } + function Gkd(a, b, c, d) { + if (c == 1) { + return !a.n && (a.n = new cUd(D2, a, 1, 7)), Txd(a.n, b, d); + } + return ckd(a, b, c, d); + } + function Gnd(a, b) { + var c, d; + d = (c = new BYd(), c); + pnd(d, b); + wtd((!a.A && (a.A = new K4d(u5, a, 7)), a.A), d); + return d; + } + function Zqd(a, b, c) { + var d, e, f, g; + f = null; + g = b; + e = Ypd(g, Jte); + d = new jrd(a, c); + f = (lqd(d.a, d.b, e), e); + return f; + } + function KJd(a) { + var b; + if (!a.a || (a.Bb & 1) == 0 && a.a.kh()) { + b = wId(a); + JD(b, 148) && (a.a = BD(b, 148)); + } + return a.a; + } + function Be(a, b) { + var c, d; + uCb(b); + for (d = b.Kc(); d.Ob(); ) { + c = d.Pb(); + if (!a.Hc(c)) { + return false; + } + } + return true; + } + function cD(a, b) { + var c, d, e; + c = a.l + b.l; + d = a.m + b.m + (c >> 22); + e = a.h + b.h + (d >> 22); + return TC(c & Eje, d & Eje, e & Fje); + } + function nD(a, b) { + var c, d, e; + c = a.l - b.l; + d = a.m - b.m + (c >> 22); + e = a.h - b.h + (d >> 22); + return TC(c & Eje, d & Eje, e & Fje); + } + function bdb(a) { + var b; + if (a < 128) { + b = (ddb(), cdb)[a]; + !b && (b = cdb[a] = new Xcb(a)); + return b; + } + return new Xcb(a); + } + function ubb(a) { + var b; + if (JD(a, 78)) { + return a; + } + b = a && a.__java$exception; + if (!b) { + b = new lz(a); + Sz(b); + } + return b; + } + function btd(a) { + if (JD(a, 186)) { + return BD(a, 118); + } else if (!a) { + throw vbb(new Heb(gue)); + } else { + return null; + } + } + function Zjb(a, b) { + if (b == null) { + return false; + } + while (a.a != a.b) { + if (pb(b, vkb(a))) { + return true; + } + } + return false; + } + function kib(a) { + if (a.a.Ob()) { + return true; + } + if (a.a != a.d) { + return false; + } + a.a = new orb(a.e.f); + return a.a.Ob(); + } + function Gkb(a, b) { + var c, d; + c = b.Pc(); + d = c.length; + if (d == 0) { + return false; + } + bCb(a.c, a.c.length, c); + return true; + } + function Vyb(a, b, c) { + var d, e; + for (e = b.vc().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 42); + a.yc(d.cd(), d.dd(), c); + } + return a; + } + function yac(a, b) { + var c, d; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 70); + yNb(c, (wtc(), Ssc), b); + } + } + function FZc(a, b, c) { + var d, e; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 33); + bld(d, d.i + b, d.j + c); + } + } + function Nb(a, b) { + if (!a) { + throw vbb(new Wdb(hc("value already present: %s", OC(GC(SI, 1), Uhe, 1, 5, [b])))); + } + } + function mEb(a, b) { + if (!a || !b || a == b) { + return false; + } + return CDb(a.d.c, b.d.c + b.d.b) && CDb(b.d.c, a.d.c + a.d.b); + } + function xyb() { + oyb(); + if (lyb) { + return new wyb(null); + } + return fyb(hyb(), "com.google.common.base.Strings"); + } + function J2c(a, b) { + var c; + c = Pu(b.a.gc()); + MAb(VAb(new YAb(null, new Kub(b, 1)), a.i), new W2c(a, c)); + return c; + } + function Hnd(a) { + var b, c; + c = (b = new BYd(), b); + pnd(c, "T"); + wtd((!a.d && (a.d = new K4d(u5, a, 11)), a.d), c); + return c; + } + function Etd(a) { + var b, c, d, e; + b = 1; + for (c = 0, e = a.gc(); c < e; ++c) { + d = a.ki(c); + b = 31 * b + (d == null ? 0 : tb(d)); + } + return b; + } + function Wi(a, b, c, d) { + var e; + Pb(b, a.e.Hd().gc()); + Pb(c, a.c.Hd().gc()); + e = a.a[b][c]; + NC(a.a[b], c, d); + return e; + } + function OC(a, b, c, d, e) { + e.gm = a; + e.hm = b; + e.im = gcb; + e.__elementTypeId$ = c; + e.__elementTypeCategory$ = d; + return e; + } + function p6c(a, b, c, d, e) { + i6c(); + return $wnd.Math.min(A6c(a, b, c, d, e), A6c(c, d, a, b, V6c(new f7c(e.a, e.b)))); + } + function gbc() { + gbc = ccb; + fbc = new ibc(ane, 0); + dbc = new ibc(Gne, 1); + ebc = new ibc(Hne, 2); + cbc = new ibc("BOTH", 3); + } + function Ajc() { + Ajc = ccb; + wjc = new Bjc(gle, 0); + xjc = new Bjc(jle, 1); + yjc = new Bjc(kle, 2); + zjc = new Bjc("TOP", 3); + } + function lWb() { + lWb = ccb; + hWb = new oWb("Q1", 0); + kWb = new oWb("Q4", 1); + iWb = new oWb("Q2", 2); + jWb = new oWb("Q3", 3); + } + function LBc() { + LBc = ccb; + JBc = new MBc("OFF", 0); + KBc = new MBc("SINGLE_EDGE", 1); + IBc = new MBc("MULTI_EDGE", 2); + } + function a1c() { + a1c = ccb; + _0c = new c1c("MINIMUM_SPANNING_TREE", 0); + $0c = new c1c("MAXIMUM_SPANNING_TREE", 1); + } + function Y1c() { + Y1c = ccb; + W1c = new k2c(); + V1c = new f2c(); + } + function URc(a) { + var b, c, d; + b = new Psb(); + for (d = Jsb(a.d, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 188); + Dsb(b, c.c); + } + return b; + } + function dVc(a) { + var b, c, d, e; + e = new Rkb(); + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 33); + b = gVc(c); + Gkb(e, b); + } + return e; + } + function xcc(a) { + var b; + PZb(a, true); + b = _ie; + wNb(a, (Nyc(), cyc)) && (b += BD(vNb(a, cyc), 19).a); + yNb(a, cyc, meb(b)); + } + function q1c(a, b, c) { + var d; + Uhb(a.a); + Hkb(c.i, new B1c(a)); + d = new hDb(BD(Ohb(a.a, b.b), 65)); + p1c(a, d, b); + c.f = d; + } + function QLc(a, b) { + var c, d; + c = a.c; + d = b.e[a.p]; + if (d < c.a.c.length - 1) { + return BD(Ikb(c.a, d + 1), 10); + } + return null; + } + function rr(a, b) { + var c, d; + Rb(b, "predicate"); + for (d = 0; a.Ob(); d++) { + c = a.Pb(); + if (b.Lb(c)) { + return d; + } + } + return -1; + } + function ZEd(a, b) { + var c, d; + d = 0; + if (a < 64 && a <= b) { + b = b < 64 ? b : 63; + for (c = a; c <= b; c++) { + d = Mbb(d, Nbb(1, c)); + } + } + return d; + } + function pmb(a) { + mmb(); + var b, c, d; + d = 0; + for (c = a.Kc(); c.Ob(); ) { + b = c.Pb(); + d = d + (b != null ? tb(b) : 0); + d = d | 0; + } + return d; + } + function etd(a) { + var b, c; + c = (Fhd(), b = new rmd(), b); + !!a && wtd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), c); + return c; + } + function TA(a) { + var b; + b = new PA(); + b.a = a; + b.b = RA(a); + b.c = KC(ZI, nie, 2, 2, 6, 1); + b.c[0] = SA(a); + b.c[1] = SA(a); + return b; + } + function fkd(a, b) { + switch (b) { + case 0: + !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)); + a.o.c.$b(); + return; + } + Cid(a, b); + } + function jEb(a, b, c) { + switch (c.g) { + case 2: + a.b = b; + break; + case 1: + a.c = b; + break; + case 4: + a.d = b; + break; + case 3: + a.a = b; + } + } + function sbd(a) { + switch (a.g) { + case 1: + return obd; + case 2: + return nbd; + case 3: + return pbd; + default: + return qbd; + } + } + function Zac(a) { + switch (BD(vNb(a, (Nyc(), mxc)), 163).g) { + case 2: + case 4: + return true; + default: + return false; + } + } + function Trc() { + Trc = ccb; + Src = as((Orc(), OC(GC(PW, 1), Kie, 256, 0, [Frc, Hrc, Irc, Jrc, Krc, Lrc, Nrc, Erc, Grc, Mrc]))); + } + function Ndd() { + Ndd = ccb; + Mdd = as((Idd(), OC(GC(J1, 1), Kie, 259, 0, [Bdd, Ddd, Add, Edd, Fdd, Hdd, Gdd, Cdd, zdd]))); + } + function wUc() { + wUc = ccb; + vUc = e3c(b3c(b3c(g3c(e3c(new j3c(), (yRc(), vRc), (qSc(), pSc)), wRc), mSc), nSc), xRc, oSc); + } + function Gqc() { + Gqc = ccb; + Eqc = new Hqc(ane, 0); + Dqc = new Hqc("INCOMING_ONLY", 1); + Fqc = new Hqc("OUTGOING_ONLY", 2); + } + function rC() { + rC = ccb; + qC = { "boolean": sC, "number": tC, "string": vC, "object": uC, "function": uC, "undefined": wC }; + } + function Whb(a, b) { + mCb(a >= 0, "Negative initial capacity"); + mCb(b >= 0, "Non-positive load factor"); + Uhb(this); + } + function _Ed(a, b, c) { + if (a >= 128) + return false; + return a < 64 ? Kbb(xbb(Nbb(1, a), c), 0) : Kbb(xbb(Nbb(1, a - 64), b), 0); + } + function bOb(a, b) { + if (!a || !b || a == b) { + return false; + } + return Jy(a.b.c, b.b.c + b.b.b) < 0 && Jy(b.b.c, a.b.c + a.b.b) < 0; + } + function I4b(a) { + var b, c, d; + c = a.n; + d = a.o; + b = a.d; + return new J6c(c.a - b.b, c.b - b.d, d.a + (b.b + b.c), d.b + (b.d + b.a)); + } + function $ic(a) { + var b, c, d, e; + for (c = a.a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + djc(a, b, (Ucd(), Rcd)); + djc(a, b, Acd); + } + } + function Uy(a) { + var b, c, d, e; + for (b = (a.j == null && (a.j = (Rz(), e = Qz.ce(a), Tz(e))), a.j), c = 0, d = b.length; c < d; ++c) + ; + } + function hD(a) { + var b, c, d; + b = ~a.l + 1 & Eje; + c = ~a.m + (b == 0 ? 1 : 0) & Eje; + d = ~a.h + (b == 0 && c == 0 ? 1 : 0) & Fje; + return TC(b, c, d); + } + function C$c(a, b) { + var c, d; + c = BD(BD(Ohb(a.g, b.a), 46).a, 65); + d = BD(BD(Ohb(a.g, b.b), 46).a, 65); + return _Nb(c, d); + } + function xtd(a, b, c) { + var d; + d = a.gc(); + if (b > d) + throw vbb(new Cyd(b, d)); + a.hi() && (c = Dtd(a, c)); + return a.Vh(b, c); + } + function xNb(a, b, c) { + return c == null ? (!a.q && (a.q = new Lqb()), Thb(a.q, b)) : (!a.q && (a.q = new Lqb()), Rhb(a.q, b, c)), a; + } + function yNb(a, b, c) { + c == null ? (!a.q && (a.q = new Lqb()), Thb(a.q, b)) : (!a.q && (a.q = new Lqb()), Rhb(a.q, b, c)); + return a; + } + function TQb(a) { + var b, c; + c = new kRb(); + tNb(c, a); + yNb(c, (HSb(), FSb), a); + b = new Lqb(); + VQb(a, c, b); + UQb(a, c, b); + return c; + } + function j6c(a) { + i6c(); + var b, c, d; + c = KC(m1, nie, 8, 2, 0, 1); + d = 0; + for (b = 0; b < 2; b++) { + d += 0.5; + c[b] = r6c(d, a); + } + return c; + } + function Mic(a, b) { + var c, d, e, f; + c = false; + d = a.a[b].length; + for (f = 0; f < d - 1; f++) { + e = f + 1; + c = c | Nic(a, b, f, e); + } + return c; + } + function nNb(a, b, c, d, e) { + var f, g; + for (g = c; g <= e; g++) { + for (f = b; f <= d; f++) { + YMb(a, f, g) || aNb(a, f, g, true, false); + } + } + } + function rNd(a, b) { + this.b = a; + nNd.call(this, (BD(qud(ZKd((NFd(), MFd).o), 10), 18), b.i), b.g); + this.a = (NKd(), MKd); + } + function hj(a, b) { + this.c = a; + this.d = b; + this.b = this.d / this.c.c.Hd().gc() | 0; + this.a = this.d % this.c.c.Hd().gc(); + } + function jdb() { + this.o = null; + this.k = null; + this.j = null; + this.d = null; + this.b = null; + this.n = null; + this.a = null; + } + function fB(a, b, c) { + this.q = new $wnd.Date(); + this.q.setFullYear(a + nje, b, c); + this.q.setHours(0, 0, 0, 0); + YA(this, 0); + } + function tAc() { + tAc = ccb; + rAc = new uAc(ane, 0); + qAc = new uAc("NODES_AND_EDGES", 1); + sAc = new uAc("PREFER_EDGES", 2); + } + function RA(a) { + var b; + if (a == 0) { + return "Etc/GMT"; + } + if (a < 0) { + a = -a; + b = "Etc/GMT-"; + } else { + b = "Etc/GMT+"; + } + return b + UA(a); + } + function geb(a) { + var b; + if (a < 0) { + return Rie; + } else if (a == 0) { + return 0; + } else { + for (b = Iie; (b & a) == 0; b >>= 1) + ; + return b; + } + } + function $C(a) { + var b, c; + c = heb(a.h); + if (c == 32) { + b = heb(a.m); + return b == 32 ? heb(a.l) + 32 : b + 20 - 10; + } else { + return c - 12; + } + } + function bkb(a) { + var b; + b = a.a[a.b]; + if (b == null) { + return null; + } + NC(a.a, a.b, null); + a.b = a.b + 1 & a.a.length - 1; + return b; + } + function EDc(a) { + var b, c; + b = a.t - a.k[a.o.p] * a.d + a.j[a.o.p] > a.f; + c = a.u + a.e[a.o.p] * a.d > a.f * a.s * a.d; + return b || c; + } + function Iwb(a, b, c) { + var d, e; + d = new exb(b, c); + e = new fxb(); + a.b = Gwb(a, a.b, d, e); + e.b || ++a.c; + a.b.b = false; + return e.d; + } + function djc(a, b, c) { + var d, e, f, g; + g = CHc(b, c); + f = 0; + for (e = g.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + Rhb(a.c, d, meb(f++)); + } + } + function xVb(a) { + var b, c; + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + b.g.c = -b.g.c - b.g.b; + } + sVb(a); + } + function XDb(a) { + var b, c; + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + b.d.c = -b.d.c - b.d.b; + } + RDb(a); + } + function AUd(a) { + var b; + if (!a.c || (a.Bb & 1) == 0 && (a.c.Db & 64) != 0) { + b = wId(a); + JD(b, 88) && (a.c = BD(b, 26)); + } + return a.c; + } + function ZC(a) { + var b, c, d; + b = ~a.l + 1 & Eje; + c = ~a.m + (b == 0 ? 1 : 0) & Eje; + d = ~a.h + (b == 0 && c == 0 ? 1 : 0) & Fje; + a.l = b; + a.m = c; + a.h = d; + } + function l7c(a) { + var b, c, d, e, f; + b = new d7c(); + for (d = a, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + b.a += c.a; + b.b += c.b; + } + return b; + } + function nmb(a, b) { + mmb(); + var c, d, e, f, g; + g = false; + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + g = g | a.Fc(c); + } + return g; + } + function w6c(a) { + i6c(); + var b, c; + c = -17976931348623157e292; + for (b = 0; b < a.length; b++) { + a[b] > c && (c = a[b]); + } + return c; + } + function SHc(a, b, c) { + var d; + d = new Rkb(); + UHc(a, b, d, (Ucd(), zcd), true, false); + UHc(a, c, d, Tcd, false, false); + return d; + } + function crd(a, b, c) { + var d, e, f, g; + f = null; + g = b; + e = Ypd(g, "labels"); + d = new Hrd(a, c); + f = (Dqd(d.a, d.b, e), e); + return f; + } + function j1d(a, b, c, d) { + var e; + e = r1d(a, b, c, d); + if (!e) { + e = i1d(a, c, d); + if (!!e && !e1d(a, b, e)) { + return null; + } + } + return e; + } + function m1d(a, b, c, d) { + var e; + e = s1d(a, b, c, d); + if (!e) { + e = l1d(a, c, d); + if (!!e && !e1d(a, b, e)) { + return null; + } + } + return e; + } + function Xb(a, b) { + var c; + for (c = 0; c < a.a.a.length; c++) { + if (!BD($lb(a.a, c), 169).Lb(b)) { + return false; + } + } + return true; + } + function Cb(a, b, c) { + Qb(b); + if (c.Ob()) { + Mfb(b, Fb(c.Pb())); + while (c.Ob()) { + Mfb(b, a.a); + Mfb(b, Fb(c.Pb())); + } + } + return b; + } + function qmb(a) { + mmb(); + var b, c, d; + d = 1; + for (c = a.Kc(); c.Ob(); ) { + b = c.Pb(); + d = 31 * d + (b != null ? tb(b) : 0); + d = d | 0; + } + return d; + } + function WC(a, b, c, d, e) { + var f; + f = lD(a, b); + c && ZC(f); + if (e) { + a = YC(a, b); + d ? QC = hD(a) : QC = TC(a.l, a.m, a.h); + } + return f; + } + function Xzb(b, c) { + var d; + try { + c.Vd(); + } catch (a) { + a = ubb(a); + if (JD(a, 78)) { + d = a; + b.c[b.c.length] = d; + } else + throw vbb(a); + } + } + function jRb(a, b, c) { + var d, e; + if (JD(b, 144) && !!c) { + d = BD(b, 144); + e = c; + return a.a[d.b][e.b] + a.a[e.b][d.b]; + } + return 0; + } + function xld(a, b) { + switch (b) { + case 7: + return !!a.e && a.e.i != 0; + case 8: + return !!a.d && a.d.i != 0; + } + return Ykd(a, b); + } + function YQb(a, b) { + switch (b.g) { + case 0: + JD(a.b, 631) || (a.b = new xRb()); + break; + case 1: + JD(a.b, 632) || (a.b = new DRb()); + } + } + function Ghe(a, b) { + while (a.g == null && !a.c ? Uud(a) : a.g == null || a.i != 0 && BD(a.g[a.i - 1], 47).Ob()) { + Ord(b, Vud(a)); + } + } + function kic(a, b, c) { + a.g = qic(a, b, (Ucd(), zcd), a.b); + a.d = qic(a, c, zcd, a.b); + if (a.g.c == 0 || a.d.c == 0) { + return; + } + nic(a); + } + function lic(a, b, c) { + a.g = qic(a, b, (Ucd(), Tcd), a.j); + a.d = qic(a, c, Tcd, a.j); + if (a.g.c == 0 || a.d.c == 0) { + return; + } + nic(a); + } + function $yc(a, b, c) { + return !WAb(JAb(new YAb(null, new Kub(a.c, 16)), new Xxb(new dfd(b, c)))).sd((EAb(), DAb)); + } + function KAb(a) { + var b; + Tzb(a); + b = new NBb(); + if (a.a.sd(b)) { + return Atb(), new Ftb(uCb(b.a)); + } + return Atb(), Atb(), ztb; + } + function nA(a) { + var b; + if (a.b <= 0) { + return false; + } + b = hfb("MLydhHmsSDkK", wfb(bfb(a.c, 0))); + return b > 1 || b >= 0 && a.b < 3; + } + function w7c(a) { + var b, c, d; + b = new s7c(); + for (d = Jsb(a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 8); + St(b, 0, new g7c(c)); + } + return b; + } + function qVb(a) { + var b, c; + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + b.f.$b(); + } + LVb(a.b, a); + rVb(a); + } + function tb(a) { + return ND(a) ? LCb(a) : LD(a) ? Hdb(a) : KD(a) ? (uCb(a), a) ? 1231 : 1237 : ID(a) ? a.Hb() : MC(a) ? FCb(a) : rz(a); + } + function rb(a) { + return ND(a) ? ZI : LD(a) ? BI : KD(a) ? wI : ID(a) ? a.gm : MC(a) ? a.gm : a.gm || Array.isArray(a) && GC(PH, 1) || PH; + } + function j_c(a) { + switch (a.g) { + case 0: + return new Q1c(); + default: + throw vbb(new Wdb(Mre + (a.f != null ? a.f : "" + a.g))); + } + } + function S0c(a) { + switch (a.g) { + case 0: + return new k1c(); + default: + throw vbb(new Wdb(Mre + (a.f != null ? a.f : "" + a.g))); + } + } + function ekd(a, b, c) { + switch (b) { + case 0: + !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)); + cId(a.o, c); + return; + } + yid(a, b, c); + } + function XRc(a, b, c) { + this.g = a; + this.e = new d7c(); + this.f = new d7c(); + this.d = new Psb(); + this.b = new Psb(); + this.a = b; + this.c = c; + } + function PZc(a, b, c, d) { + this.b = new Rkb(); + this.n = new Rkb(); + this.i = d; + this.j = c; + this.s = a; + this.t = b; + this.r = 0; + this.d = 0; + } + function nib(a) { + this.e = a; + this.d = new Irb(this.e.g); + this.a = this.d; + this.b = kib(this); + this.$modCount = a.$modCount; + } + function Pr(a) { + while (!a.d || !a.d.Ob()) { + if (!!a.b && !akb(a.b)) { + a.d = BD(fkb(a.b), 47); + } else { + return null; + } + } + return a.d; + } + function Xyc(a) { + Ekb(a.c, (Y1c(), W1c)); + if (Ky(a.a, Edb(ED(Ksd((dzc(), bzc)))))) { + return new Zed(); + } + return new _ed(a); + } + function bRc(a) { + switch (a.g) { + case 1: + return Sqe; + default: + case 2: + return 0; + case 3: + return cme; + case 4: + return Tqe; + } + } + function Ife() { + wfe(); + var a; + if (dfe) + return dfe; + a = Afe(Kfe("M", true)); + a = Bfe(Kfe("M", false), a); + dfe = a; + return dfe; + } + function Awb(a, b) { + var c, d, e; + e = a.b; + while (e) { + c = a.a.ue(b, e.d); + if (c == 0) { + return e; + } + d = c < 0 ? 0 : 1; + e = e.a[d]; + } + return null; + } + function Tyb(a, b, c) { + var d, e; + d = (Bcb(), _Pb(c) ? true : false); + e = BD(b.xc(d), 15); + if (!e) { + e = new Rkb(); + b.zc(d, e); + } + e.Fc(c); + } + function dYc(a, b) { + var c, d; + c = BD(hkd(a, (lZc(), UYc)), 19).a; + d = BD(hkd(b, UYc), 19).a; + return c == d ? -1 : c < d ? -1 : c > d ? 1 : 0; + } + function NYb(a, b) { + if (OYb(a, b)) { + Rc(a.b, BD(vNb(b, (wtc(), Esc)), 21), b); + Dsb(a.a, b); + return true; + } else { + return false; + } + } + function d3b(a) { + var b, c; + b = BD(vNb(a, (wtc(), gtc)), 10); + if (b) { + c = b.c; + Lkb(c.a, b); + c.a.c.length == 0 && Lkb(Q_b(b).b, c); + } + } + function syb(a) { + if (lyb) { + return KC(qL, tke, 572, 0, 0, 1); + } + return BD(Qkb(a.a, KC(qL, tke, 572, a.a.c.length, 0, 1)), 842); + } + function mn(a, b, c, d) { + Vm(); + return new wx(OC(GC(CK, 1), zie, 42, 0, [(Wj(a, b), new Wo(a, b)), (Wj(c, d), new Wo(c, d))])); + } + function Dnd(a, b, c) { + var d, e; + e = (d = new SSd(), d); + $nd(e, b, c); + wtd((!a.q && (a.q = new cUd(n5, a, 11, 10)), a.q), e); + return e; + } + function Zmd(a) { + var b, c, d, e; + e = icb(Rmd, a); + c = e.length; + d = KC(ZI, nie, 2, c, 6, 1); + for (b = 0; b < c; ++b) { + d[b] = e[b]; + } + return d; + } + function l4c(a, b) { + var c, d, e, f, g; + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + g = new v4c(a); + c.Qe(g); + q4c(g); + } + Uhb(a.f); + } + function hw(a, b) { + var c; + if (b === a) { + return true; + } + if (JD(b, 224)) { + c = BD(b, 224); + return pb(a.Zb(), c.Zb()); + } + return false; + } + function aub(a, b) { + var c; + if (b * 2 + 1 >= a.b.c.length) { + return; + } + aub(a, 2 * b + 1); + c = 2 * b + 2; + c < a.b.c.length && aub(a, c); + bub(a, b); + } + function Ss(a, b, c) { + var d, e; + this.g = a; + this.c = b; + this.a = this; + this.d = this; + e = Kp(c); + d = KC(BG, Gie, 330, e, 0, 1); + this.b = d; + } + function whb(a, b, c) { + var d; + for (d = c - 1; d >= 0 && a[d] === b[d]; d--) + ; + return d < 0 ? 0 : Gbb(xbb(a[d], Yje), xbb(b[d], Yje)) ? -1 : 1; + } + function UFc(a, b) { + var c, d; + for (d = Jsb(a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 214); + if (c.e.length > 0) { + b.td(c); + c.i && _Fc(c); + } + } + } + function nzd(a, b) { + var c, d; + d = BD(Ajd(a.a, 4), 126); + c = KC($3, hve, 415, b, 0, 1); + d != null && $fb(d, 0, c, 0, d.length); + return c; + } + function JEd(a, b) { + var c; + c = new NEd((a.f & 256) != 0, a.i, a.a, a.d, (a.f & 16) != 0, a.j, a.g, b); + a.e != null || (c.c = a); + return c; + } + function Dc(a, b) { + var c, d; + for (d = a.Zb().Cc().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 14); + if (c.Hc(b)) { + return true; + } + } + return false; + } + function oNb(a, b, c, d, e) { + var f, g; + for (g = c; g <= e; g++) { + for (f = b; f <= d; f++) { + if (YMb(a, f, g)) { + return true; + } + } + } + return false; + } + function Tt(a, b, c) { + var d, e, f, g; + uCb(c); + g = false; + f = a.Zc(b); + for (e = c.Kc(); e.Ob(); ) { + d = e.Pb(); + f.Rb(d); + g = true; + } + return g; + } + function Dv(a, b) { + var c; + if (a === b) { + return true; + } else if (JD(b, 83)) { + c = BD(b, 83); + return Ax(Wm(a), c.vc()); + } + return false; + } + function Nhb(a, b, c) { + var d, e; + for (e = c.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 42); + if (a.re(b, d.dd())) { + return true; + } + } + return false; + } + function Hic(a, b, c) { + if (!a.d[b.p][c.p]) { + Gic(a, b, c); + a.d[b.p][c.p] = true; + a.d[c.p][b.p] = true; + } + return a.a[b.p][c.p]; + } + function Itd(a, b) { + if (!a.ai() && b == null) { + throw vbb(new Wdb("The 'no null' constraint is violated")); + } + return b; + } + function $Jd(a, b) { + if (a.D == null && a.B != null) { + a.D = a.B; + a.B = null; + } + jKd(a, b == null ? null : (uCb(b), b)); + !!a.C && a.yk(null); + } + function XHc(a, b) { + var c; + if (!a || a == b || !wNb(b, (wtc(), Psc))) { + return false; + } + c = BD(vNb(b, (wtc(), Psc)), 10); + return c != a; + } + function b4d(a) { + switch (a.i) { + case 2: { + return true; + } + case 1: { + return false; + } + case -1: { + ++a.c; + } + default: { + return a.pl(); + } + } + } + function c4d(a) { + switch (a.i) { + case -2: { + return true; + } + case -1: { + return false; + } + case 1: { + --a.c; + } + default: { + return a.ql(); + } + } + } + function Xdb(a) { + Zy.call(this, "The given string does not match the expected format for individual spacings.", a); + } + function pgd() { + pgd = ccb; + mgd = new qgd("ELK", 0); + ngd = new qgd("JSON", 1); + lgd = new qgd("DOT", 2); + ogd = new qgd("SVG", 3); + } + function pWc() { + pWc = ccb; + mWc = new rWc(ane, 0); + nWc = new rWc("RADIAL_COMPACTION", 1); + oWc = new rWc("WEDGE_COMPACTION", 2); + } + function Fyb() { + Fyb = ccb; + Cyb = new Gyb("CONCURRENT", 0); + Dyb = new Gyb("IDENTITY_FINISH", 1); + Eyb = new Gyb("UNORDERED", 2); + } + function nPb() { + nPb = ccb; + kPb = (cPb(), bPb); + jPb = new Nsd(Tle, kPb); + iPb = new Lsd(Ule); + lPb = new Lsd(Vle); + mPb = new Lsd(Wle); + } + function Occ() { + Occ = ccb; + Mcc = new Zcc(); + Ncc = new _cc(); + Lcc = new bdc(); + Kcc = new fdc(); + Jcc = new jdc(); + Icc = (uCb(Jcc), new bpb()); + } + function tBc() { + tBc = ccb; + qBc = new uBc("CONSERVATIVE", 0); + rBc = new uBc("CONSERVATIVE_SOFT", 1); + sBc = new uBc("SLOPPY", 2); + } + function Zad() { + Zad = ccb; + Xad = new q0b(15); + Wad = new Osd((Y9c(), f9c), Xad); + Yad = C9c; + Sad = s8c; + Tad = Y8c; + Vad = _8c; + Uad = $8c; + } + function o7c(a, b, c) { + var d, e, f; + d = new Psb(); + for (f = Jsb(c, 0); f.b != f.d.c; ) { + e = BD(Xsb(f), 8); + Dsb(d, new g7c(e)); + } + Tt(a, b, d); + } + function r7c(a) { + var b, c, d; + b = 0; + d = KC(m1, nie, 8, a.b, 0, 1); + c = Jsb(a, 0); + while (c.b != c.d.c) { + d[b++] = BD(Xsb(c), 8); + } + return d; + } + function $Pd(a) { + var b; + b = (!a.a && (a.a = new cUd(g5, a, 9, 5)), a.a); + if (b.i != 0) { + return nQd(BD(qud(b, 0), 678)); + } + return null; + } + function Ly(a, b) { + var c; + c = wbb(a, b); + if (Gbb(Vbb(a, b), 0) | Ebb(Vbb(a, c), 0)) { + return c; + } + return wbb(rie, Vbb(Pbb(c, 63), 1)); + } + function Yyc(a, b) { + var c; + c = Ksd((dzc(), bzc)) != null && b.wg() != null ? Edb(ED(b.wg())) / Edb(ED(Ksd(bzc))) : 1; + Rhb(a.b, b, c); + } + function le(a, b) { + var c, d; + c = BD(a.d.Bc(b), 14); + if (!c) { + return null; + } + d = a.e.hc(); + d.Gc(c); + a.e.d -= c.gc(); + c.$b(); + return d; + } + function AHc(a, b) { + var c, d; + d = a.c[b]; + if (d == 0) { + return; + } + a.c[b] = 0; + a.d -= d; + c = b + 1; + while (c < a.a.length) { + a.a[c] -= d; + c += c & -c; + } + } + function rwb(a) { + var b; + b = a.a.c.length; + if (b > 0) { + return _vb(b - 1, a.a.c.length), Kkb(a.a, b - 1); + } else { + throw vbb(new Jpb()); + } + } + function C2c(a, b, c) { + if (b < 0) { + throw vbb(new qcb(ese + b)); + } + if (b < a.j.c.length) { + Nkb(a.j, b, c); + } else { + A2c(a, b); + Ekb(a.j, c); + } + } + function oCb(a, b, c) { + if (a > b) { + throw vbb(new Wdb(xke + a + yke + b)); + } + if (a < 0 || b > c) { + throw vbb(new scb(xke + a + zke + b + oke + c)); + } + } + function j5c(a) { + if (!a.a || (a.a.i & 8) == 0) { + throw vbb(new Zdb("Enumeration class expected for layout option " + a.f)); + } + } + function vud(a) { + var b; + ++a.j; + if (a.i == 0) { + a.g = null; + } else if (a.i < a.g.length) { + b = a.g; + a.g = a.ri(a.i); + $fb(b, 0, a.g, 0, a.i); + } + } + function hkb(a, b) { + var c, d; + c = a.a.length - 1; + a.c = a.c - 1 & c; + while (b != a.c) { + d = b + 1 & c; + NC(a.a, b, a.a[d]); + b = d; + } + NC(a.a, a.c, null); + } + function ikb(a, b) { + var c, d; + c = a.a.length - 1; + while (b != a.b) { + d = b - 1 & c; + NC(a.a, b, a.a[d]); + b = d; + } + NC(a.a, a.b, null); + a.b = a.b + 1 & c; + } + function Fkb(a, b, c) { + var d, e; + wCb(b, a.c.length); + d = c.Pc(); + e = d.length; + if (e == 0) { + return false; + } + bCb(a.c, b, d); + return true; + } + function VEd(a) { + var b, c; + if (a == null) + return null; + for (b = 0, c = a.length; b < c; b++) { + if (!gFd(a[b])) + return a[b]; + } + return null; + } + function grb(a, b, c) { + var d, e, f, g; + for (e = c, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + if (a.b.re(b, d.cd())) { + return d; + } + } + return null; + } + function Hlb(a) { + var b, c, d, e, f; + f = 1; + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + f = 31 * f + (b != null ? tb(b) : 0); + f = f | 0; + } + return f; + } + function as(a) { + var b, c, d, e, f; + b = {}; + for (d = a, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + b[":" + (c.f != null ? c.f : "" + c.g)] = c; + } + return b; + } + function gr(a) { + var b; + Qb(a); + Mb(true, "numberToAdvance must be nonnegative"); + for (b = 0; b < 0 && Qr(a); b++) { + Rr(a); + } + return b; + } + function eDc(a) { + var b, c, d; + d = 0; + for (c = new Sr(ur(a.a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + b.c.i == b.d.i || ++d; + } + return d; + } + function HZb(a, b) { + var c, d, e; + c = a; + e = 0; + do { + if (c == b) { + return e; + } + d = c.e; + if (!d) { + throw vbb(new Vdb()); + } + c = Q_b(d); + ++e; + } while (true); + } + function w$c(a, b) { + var c, d, e; + e = b - a.f; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c = BD(mlb(d), 443); + _Zc(c, c.e, c.f + e); + } + a.f = b; + } + function aRc(a, b, c) { + if ($wnd.Math.abs(b - a) < Rqe || $wnd.Math.abs(c - a) < Rqe) { + return true; + } + return b - a > Rqe ? a - c > Rqe : c - a > Rqe; + } + function pHb(a, b) { + if (!a) { + return 0; + } + if (b && !a.j) { + return 0; + } + if (JD(a, 124)) { + if (BD(a, 124).a.b == 0) { + return 0; + } + } + return a.Re(); + } + function qHb(a, b) { + if (!a) { + return 0; + } + if (b && !a.k) { + return 0; + } + if (JD(a, 124)) { + if (BD(a, 124).a.a == 0) { + return 0; + } + } + return a.Se(); + } + function fhb(a) { + Hgb(); + if (a < 0) { + if (a != -1) { + return new Tgb(-1, -a); + } + return Bgb; + } else + return a <= 10 ? Dgb[QD(a)] : new Tgb(1, a); + } + function xC(a) { + rC(); + throw vbb(new MB("Unexpected typeof result '" + a + "'; please report this bug to the GWT team")); + } + function lz(a) { + jz(); + Py(this); + Ry(this); + this.e = a; + Sy(this, a); + this.g = a == null ? Xhe : fcb(a); + this.a = ""; + this.b = a; + this.a = ""; + } + function F$c() { + this.a = new G$c(); + this.f = new I$c(this); + this.b = new K$c(this); + this.i = new M$c(this); + this.e = new O$c(this); + } + function ss() { + rs.call(this, new _rb(Cv(16))); + Xj(2, mie); + this.b = 2; + this.a = new Ms(null, null, 0, null); + As(this.a, this.a); + } + function xzc() { + xzc = ccb; + uzc = new zzc("DUMMY_NODE_OVER", 0); + vzc = new zzc("DUMMY_NODE_UNDER", 1); + wzc = new zzc("EQUAL", 2); + } + function LUb() { + LUb = ccb; + JUb = Fx(OC(GC(t1, 1), Kie, 103, 0, [(ead(), aad), bad])); + KUb = Fx(OC(GC(t1, 1), Kie, 103, 0, [dad, _9c])); + } + function VQc(a) { + return (Ucd(), Lcd).Hc(a.j) ? Edb(ED(vNb(a, (wtc(), qtc)))) : l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a])).b; + } + function DOb(a) { + var b, c, d, e; + d = a.b.a; + for (c = d.a.ec().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 561); + e = new MPb(b, a.e, a.f); + Ekb(a.g, e); + } + } + function yId(a, b) { + var c, d, e; + d = a.nk(b, null); + e = null; + if (b) { + e = (LFd(), c = new UQd(), c); + NQd(e, a.r); + } + d = xId(a, e, d); + !!d && d.Fi(); + } + function VFc(a, b) { + var c, d; + d = Cub(a.d, 1) != 0; + c = true; + while (c) { + c = false; + c = b.c.Tf(b.e, d); + c = c | dGc(a, b, d, false); + d = !d; + } + $Fc(a); + } + function wZc(a, b) { + var c, d, e; + d = false; + c = b.q.d; + if (b.d < a.b) { + e = ZZc(b.q, a.b); + if (b.q.d > e) { + $Zc(b.q, e); + d = c != b.q.d; + } + } + return d; + } + function PVc(a, b) { + var c, d, e, f, g, h, i, j; + i = b.i; + j = b.j; + d = a.f; + e = d.i; + f = d.j; + g = i - e; + h = j - f; + c = $wnd.Math.sqrt(g * g + h * h); + return c; + } + function Rnd(a, b) { + var c, d; + d = jid(a); + if (!d) { + c = (IEd(), PEd(b)); + d = new s0d(c); + wtd(d.Vk(), a); + } + return d; + } + function Sc(a, b) { + var c, d; + c = BD(a.c.Bc(b), 14); + if (!c) { + return a.jc(); + } + d = a.hc(); + d.Gc(c); + a.d -= c.gc(); + c.$b(); + return a.mc(d); + } + function j7c(a, b) { + var c; + for (c = 0; c < b.length; c++) { + if (a == (BCb(c, b.length), b.charCodeAt(c))) { + return true; + } + } + return false; + } + function E_b(a, b) { + var c; + for (c = 0; c < b.length; c++) { + if (a == (BCb(c, b.length), b.charCodeAt(c))) { + return true; + } + } + return false; + } + function hFd(a) { + var b, c; + if (a == null) + return false; + for (b = 0, c = a.length; b < c; b++) { + if (!gFd(a[b])) + return false; + } + return true; + } + function Ngb(a) { + var b; + if (a.c != 0) { + return a.c; + } + for (b = 0; b < a.a.length; b++) { + a.c = a.c * 33 + (a.a[b] & -1); + } + a.c = a.c * a.e; + return a.c; + } + function vkb(a) { + var b; + sCb(a.a != a.b); + b = a.d.a[a.a]; + mkb(a.b == a.d.c && b != null); + a.c = a.a; + a.a = a.a + 1 & a.d.a.length - 1; + return b; + } + function phe(a) { + var b; + if (!(a.c.c < 0 ? a.a >= a.c.b : a.a <= a.c.b)) { + throw vbb(new utb()); + } + b = a.a; + a.a += a.c.c; + ++a.b; + return meb(b); + } + function BWb(a) { + var b; + b = new VWb(a); + rXb(a.a, zWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [b]))); + !!b.d && Ekb(b.f, b.d); + return b.f; + } + function Z1b(a) { + var b; + b = new q_b(a.a); + tNb(b, a); + yNb(b, (wtc(), $sc), a); + b.o.a = a.g; + b.o.b = a.f; + b.n.a = a.i; + b.n.b = a.j; + return b; + } + function A9b(a, b, c, d) { + var e, f; + for (f = a.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 70); + e.n.a = b.a + (d.a - e.o.a) / 2; + e.n.b = b.b; + b.b += e.o.b + c; + } + } + function UDb(a, b, c) { + var d, e; + for (e = b.a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 57); + if (VDb(a, d, c)) { + return true; + } + } + return false; + } + function JDc(a) { + var b, c; + for (c = new olb(a.r); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + if (a.n[b.p] <= 0) { + return b; + } + } + return null; + } + function cVc(a) { + var b, c, d, e; + e = new Tqb(); + for (d = new olb(a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 33); + b = fVc(c); + ye(e, b); + } + return e; + } + function zFc(a) { + var b; + b = k3c(xFc); + BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Krc)) && e3c(b, (qUb(), nUb), (S8b(), H8b)); + return b; + } + function qKb(a, b, c) { + var d; + d = new AJb(a, b); + Rc(a.r, b.Hf(), d); + if (c && !tcd(a.u)) { + d.c = new aIb(a.d); + Hkb(b.wf(), new tKb(d)); + } + } + function ybb(a, b) { + var c; + if (Fbb(a) && Fbb(b)) { + c = a - b; + if (!isNaN(c)) { + return c; + } + } + return eD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b); + } + function bFd(a, b) { + return b < a.length && (BCb(b, a.length), a.charCodeAt(b) != 63) && (BCb(b, a.length), a.charCodeAt(b) != 35); + } + function Kic(a, b, c, d) { + var e, f; + a.a = b; + f = d ? 0 : 1; + a.f = (e = new Iic(a.c, a.a, c, f), new jjc(c, a.a, e, a.e, a.b, a.c == (rGc(), pGc))); + } + function Tmd(a, b, c) { + var d, e; + e = a.a; + a.a = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 1, e, b); + !c ? c = d : c.Ei(d); + } + return c; + } + function GQd(a, b, c) { + var d, e; + e = a.b; + a.b = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 3, e, b); + !c ? c = d : c.Ei(d); + } + return c; + } + function IQd(a, b, c) { + var d, e; + e = a.f; + a.f = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 0, e, b); + !c ? c = d : c.Ei(d); + } + return c; + } + function xid(a, b) { + var c, d, e, f; + f = (e = a ? jid(a) : null, q6d((d = b, e ? e.Xk() : null, d))); + if (f == b) { + c = jid(a); + !!c && c.Xk(); + } + return f; + } + function x6c(a, b) { + var c, d, e; + e = 1; + c = a; + d = b >= 0 ? b : -b; + while (d > 0) { + if (d % 2 == 0) { + c *= c; + d = d / 2 | 0; + } else { + e *= c; + d -= 1; + } + } + return b < 0 ? 1 / e : e; + } + function y6c(a, b) { + var c, d, e; + e = 1; + c = a; + d = b >= 0 ? b : -b; + while (d > 0) { + if (d % 2 == 0) { + c *= c; + d = d / 2 | 0; + } else { + e *= c; + d -= 1; + } + } + return b < 0 ? 1 / e : e; + } + function sAd(a) { + var b, c; + if (a != null) { + for (c = 0; c < a.length; ++c) { + b = a[c]; + if (b) { + BD(b.g, 367); + b.i; + } + } + } + } + function YZc(a) { + var b, c, d; + d = 0; + for (c = new olb(a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 187); + d = $wnd.Math.max(d, b.g); + } + return d; + } + function eGc(a) { + var b, c, d; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 214); + b = c.c.Rf() ? c.f : c.a; + !!b && mHc(b, c.j); + } + } + function hbd() { + hbd = ccb; + fbd = new ibd("INHERIT", 0); + ebd = new ibd("INCLUDE_CHILDREN", 1); + gbd = new ibd("SEPARATE_CHILDREN", 2); + } + function Jkd(a, b) { + switch (b) { + case 1: + !a.n && (a.n = new cUd(D2, a, 1, 7)); + Uxd(a.n); + return; + case 2: + Lkd(a, null); + return; + } + fkd(a, b); + } + function Dm(a) { + var b; + switch (a.gc()) { + case 0: + return hm; + case 1: + return new my(Qb(a.Xb(0))); + default: + b = a; + return new ux(b); + } + } + function Vn(a) { + Ql(); + switch (a.gc()) { + case 0: + return yx(), xx; + case 1: + return new oy(a.Kc().Pb()); + default: + return new zx(a); + } + } + function Up(a) { + Ql(); + switch (a.c) { + case 0: + return yx(), xx; + case 1: + return new oy(qr(new Gqb(a))); + default: + return new Tp(a); + } + } + function Hv(b, c) { + Qb(b); + try { + return b.xc(c); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return null; + } else + throw vbb(a); + } + } + function Iv(b, c) { + Qb(b); + try { + return b.Bc(c); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return null; + } else + throw vbb(a); + } + } + function Ck(b, c) { + Qb(b); + try { + return b.Hc(c); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return false; + } else + throw vbb(a); + } + } + function Dk(b, c) { + Qb(b); + try { + return b.Mc(c); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return false; + } else + throw vbb(a); + } + } + function Gv(b, c) { + Qb(b); + try { + return b._b(c); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return false; + } else + throw vbb(a); + } + } + function KXb(a, b) { + var c; + if (a.a.c.length > 0) { + c = BD(Ikb(a.a, a.a.c.length - 1), 570); + if (NYb(c, b)) { + return; + } + } + Ekb(a.a, new PYb(b)); + } + function $gc(a) { + Hgc(); + var b, c; + b = a.d.c - a.e.c; + c = BD(a.g, 145); + Hkb(c.b, new shc(b)); + Hkb(c.c, new uhc(b)); + reb(c.i, new whc(b)); + } + function gic(a) { + var b; + b = new Ufb(); + b.a += "VerticalSegment "; + Pfb(b, a.e); + b.a += " "; + Qfb(b, Eb(new Gb(), new olb(a.k))); + return b.a; + } + function u4c(a) { + var b; + b = BD(Wrb(a.c.c, ""), 229); + if (!b) { + b = new W3c(d4c(c4c(new e4c(), ""), "Other")); + Xrb(a.c.c, "", b); + } + return b; + } + function qnd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (name: "; + Efb(b, a.zb); + b.a += ")"; + return b.a; + } + function Jnd(a, b, c) { + var d, e; + e = a.sb; + a.sb = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 4, e, b); + !c ? c = d : c.Ei(d); + } + return c; + } + function _ic(a, b) { + var c, d, e; + c = 0; + for (e = V_b(a, b).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + c += vNb(d, (wtc(), gtc)) != null ? 1 : 0; + } + return c; + } + function vPc(a, b, c) { + var d, e, f; + d = 0; + for (f = Jsb(a, 0); f.b != f.d.c; ) { + e = Edb(ED(Xsb(f))); + if (e > c) { + break; + } else + e >= b && ++d; + } + return d; + } + function RTd(a, b, c) { + var d, e; + d = new pSd(a.e, 3, 13, null, (e = b.c, e ? e : (jGd(), YFd)), HLd(a, b), false); + !c ? c = d : c.Ei(d); + return c; + } + function STd(a, b, c) { + var d, e; + d = new pSd(a.e, 4, 13, (e = b.c, e ? e : (jGd(), YFd)), null, HLd(a, b), false); + !c ? c = d : c.Ei(d); + return c; + } + function zId(a, b, c) { + var d, e; + e = a.r; + a.r = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 8, e, a.r); + !c ? c = d : c.Ei(d); + } + return c; + } + function o1d(a, b) { + var c, d; + c = BD(b, 676); + d = c.vk(); + !d && c.wk(d = JD(b, 88) ? new C1d(a, BD(b, 26)) : new O1d(a, BD(b, 148))); + return d; + } + function kud(a, b, c) { + var d; + a.qi(a.i + 1); + d = a.oi(b, c); + b != a.i && $fb(a.g, b, a.g, b + 1, a.i - b); + NC(a.g, b, d); + ++a.i; + a.bi(b, c); + a.ci(); + } + function vwb(a, b) { + var c; + if (b.a) { + c = b.a.a.length; + !a.a ? a.a = new Wfb(a.d) : Qfb(a.a, a.b); + Ofb(a.a, b.a, b.d.length, c); + } + return a; + } + function __d(a, b) { + var c, d, e, f; + b.vi(a.a); + f = BD(Ajd(a.a, 8), 1936); + if (f != null) { + for (c = f, d = 0, e = c.length; d < e; ++d) { + null.jm(); + } + } + } + function TAb(a, b) { + var c; + c = new NBb(); + if (!a.a.sd(c)) { + Tzb(a); + return Atb(), Atb(), ztb; + } + return Atb(), new Ftb(uCb(SAb(a, c.a, b))); + } + function CHc(a, b) { + switch (b.g) { + case 2: + case 1: + return V_b(a, b); + case 3: + case 4: + return Su(V_b(a, b)); + } + return mmb(), mmb(), jmb; + } + function pb(a, b) { + return ND(a) ? dfb(a, b) : LD(a) ? Fdb(a, b) : KD(a) ? (uCb(a), PD(a) === PD(b)) : ID(a) ? a.Fb(b) : MC(a) ? mb(a, b) : qz(a, b); + } + function r6d(a) { + return !a ? null : (a.i & 1) != 0 ? a == sbb ? wI : a == WD ? JI : a == VD ? FI : a == UD ? BI : a == XD ? MI : a == rbb ? UI : a == SD ? xI : yI : a; + } + function Fhb(a, b, c, d, e) { + if (b == 0 || d == 0) { + return; + } + b == 1 ? e[d] = Hhb(e, c, d, a[0]) : d == 1 ? e[b] = Hhb(e, a, b, c[0]) : Ghb(a, c, e, b, d); + } + function c6b(a, b) { + var c; + if (a.c.length == 0) { + return; + } + c = BD(Qkb(a, KC(OQ, kne, 10, a.c.length, 0, 1)), 193); + Nlb(c, new o6b()); + _5b(c, b); + } + function i6b(a, b) { + var c; + if (a.c.length == 0) { + return; + } + c = BD(Qkb(a, KC(OQ, kne, 10, a.c.length, 0, 1)), 193); + Nlb(c, new t6b()); + _5b(c, b); + } + function Ekd(a, b, c, d) { + switch (b) { + case 1: + return !a.n && (a.n = new cUd(D2, a, 1, 7)), a.n; + case 2: + return a.k; + } + return bkd(a, b, c, d); + } + function ead() { + ead = ccb; + cad = new iad(ole, 0); + bad = new iad(kle, 1); + aad = new iad(jle, 2); + _9c = new iad(vle, 3); + dad = new iad("UP", 4); + } + function RXb() { + RXb = ccb; + QXb = new SXb(ane, 0); + PXb = new SXb("INSIDE_PORT_SIDE_GROUPS", 1); + OXb = new SXb("FORCE_MODEL_ORDER", 2); + } + function xCb(a, b, c) { + if (a < 0 || b > c) { + throw vbb(new qcb(xke + a + zke + b + ", size: " + c)); + } + if (a > b) { + throw vbb(new Wdb(xke + a + yke + b)); + } + } + function eid(a, b, c) { + if (b < 0) { + vid(a, c); + } else { + if (!c.Ij()) { + throw vbb(new Wdb(ite + c.ne() + jte)); + } + BD(c, 66).Nj().Vj(a, a.yh(), b); + } + } + function Jlb(a, b, c, d, e, f, g, h) { + var i; + i = c; + while (f < g) { + i >= d || b < c && h.ue(a[b], a[i]) <= 0 ? NC(e, f++, a[b++]) : NC(e, f++, a[i++]); + } + } + function yZb(a, b, c, d, e, f) { + this.e = new Rkb(); + this.f = (KAc(), JAc); + Ekb(this.e, a); + this.d = b; + this.a = c; + this.b = d; + this.f = e; + this.c = f; + } + function VOd(a, b) { + var c, d; + for (d = new Fyd(a); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 26); + if (PD(b) === PD(c)) { + return true; + } + } + return false; + } + function uJb(a) { + qJb(); + var b, c, d, e; + for (c = wJb(), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + if (Jkb(b.a, a, 0) != -1) { + return b; + } + } + return pJb; + } + function jFd(a) { + if (a >= 65 && a <= 70) { + return a - 65 + 10; + } + if (a >= 97 && a <= 102) { + return a - 97 + 10; + } + if (a >= 48 && a <= 57) { + return a - 48; + } + return 0; + } + function QHd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (source: "; + Efb(b, a.d); + b.a += ")"; + return b.a; + } + function OQd(a, b, c) { + var d, e; + e = a.a; + a.a = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 5, e, a.a); + !c ? c = d : Qwd(c, d); + } + return c; + } + function BId(a, b) { + var c; + c = (a.Bb & 256) != 0; + b ? a.Bb |= 256 : a.Bb &= -257; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 2, c, b)); + } + function eLd(a, b) { + var c; + c = (a.Bb & 256) != 0; + b ? a.Bb |= 256 : a.Bb &= -257; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 8, c, b)); + } + function LPd(a, b) { + var c; + c = (a.Bb & 256) != 0; + b ? a.Bb |= 256 : a.Bb &= -257; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 8, c, b)); + } + function CId(a, b) { + var c; + c = (a.Bb & 512) != 0; + b ? a.Bb |= 512 : a.Bb &= -513; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 3, c, b)); + } + function fLd(a, b) { + var c; + c = (a.Bb & 512) != 0; + b ? a.Bb |= 512 : a.Bb &= -513; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 9, c, b)); + } + function N7d(a, b) { + var c; + if (a.b == -1 && !!a.a) { + c = a.a.Gj(); + a.b = !c ? bLd(a.c.Tg(), a.a) : a.c.Xg(a.a.aj(), c); + } + return a.c.Og(a.b, b); + } + function meb(a) { + var b, c; + if (a > -129 && a < 128) { + b = a + 128; + c = (oeb(), neb)[b]; + !c && (c = neb[b] = new _db(a)); + return c; + } + return new _db(a); + } + function Web(a) { + var b, c; + if (a > -129 && a < 128) { + b = a + 128; + c = (Yeb(), Xeb)[b]; + !c && (c = Xeb[b] = new Qeb(a)); + return c; + } + return new Qeb(a); + } + function L5b(a) { + var b, c; + b = a.k; + if (b == (j0b(), e0b)) { + c = BD(vNb(a, (wtc(), Hsc)), 61); + return c == (Ucd(), Acd) || c == Rcd; + } + return false; + } + function i1d(a, b, c) { + var d, e, f; + f = (e = nUd(a.b, b), e); + if (f) { + d = BD(V1d(p1d(a, f), ""), 26); + if (d) { + return r1d(a, d, b, c); + } + } + return null; + } + function l1d(a, b, c) { + var d, e, f; + f = (e = nUd(a.b, b), e); + if (f) { + d = BD(V1d(p1d(a, f), ""), 26); + if (d) { + return s1d(a, d, b, c); + } + } + return null; + } + function cTd(a, b) { + var c, d; + for (d = new Fyd(a); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 138); + if (PD(b) === PD(c)) { + return true; + } + } + return false; + } + function vtd(a, b, c) { + var d; + d = a.gc(); + if (b > d) + throw vbb(new Cyd(b, d)); + if (a.hi() && a.Hc(c)) { + throw vbb(new Wdb(kue)); + } + a.Xh(b, c); + } + function iqd(a, b) { + var c; + c = oo(a.i, b); + if (c == null) { + throw vbb(new cqd("Node did not exist in input.")); + } + Yqd(b, c); + return null; + } + function $hd(a, b) { + var c; + c = YKd(a, b); + if (JD(c, 322)) { + return BD(c, 34); + } + throw vbb(new Wdb(ite + b + "' is not a valid attribute")); + } + function V2d(a, b, c) { + var d, e; + e = JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 ? new s4d(b, a) : new p4d(b, a); + for (d = 0; d < c; ++d) { + d4d(e); + } + return e; + } + function ede(a) { + var b, c, d; + d = 0; + c = a.length; + for (b = 0; b < c; b++) { + a[b] == 32 || a[b] == 13 || a[b] == 10 || a[b] == 9 || (a[d++] = a[b]); + } + return d; + } + function lYb(a) { + var b, c, d; + b = new Rkb(); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 594); + Gkb(b, BD(c.jf(), 14)); + } + return b; + } + function SSc(a) { + var b, c, d; + b = BD(vNb(a, (mTc(), gTc)), 15); + for (d = b.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 188); + Dsb(c.b.d, c); + Dsb(c.c.b, c); + } + } + function b5b(a) { + switch (BD(vNb(a, (wtc(), Osc)), 303).g) { + case 1: + yNb(a, Osc, (esc(), bsc)); + break; + case 2: + yNb(a, Osc, (esc(), dsc)); + } + } + function _Fc(a) { + var b; + if (a.g) { + b = a.c.Rf() ? a.f : a.a; + bGc(b.a, a.o, true); + bGc(b.a, a.o, false); + yNb(a.o, (Nyc(), Vxc), (dcd(), Zbd)); + } + } + function loc(a) { + var b; + if (!a.a) { + throw vbb(new Zdb("Cannot offset an unassigned cut.")); + } + b = a.c - a.b; + a.b += b; + noc(a, b); + ooc(a, b); + } + function ckb(a) { + var b; + b = a.a[a.c - 1 & a.a.length - 1]; + if (b == null) { + return null; + } + a.c = a.c - 1 & a.a.length - 1; + NC(a.a, a.c, null); + return b; + } + function zGb(a) { + var b, c; + for (c = a.p.a.ec().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 213); + if (b.f && a.b[b.c] < -1e-10) { + return b; + } + } + return null; + } + function bLb(a, b) { + switch (a.b.g) { + case 0: + case 1: + return b; + case 2: + case 3: + return new J6c(b.d, 0, b.a, b.b); + default: + return null; + } + } + function had(a) { + switch (a.g) { + case 2: + return bad; + case 1: + return aad; + case 4: + return _9c; + case 3: + return dad; + default: + return cad; + } + } + function Vcd(a) { + switch (a.g) { + case 1: + return Tcd; + case 2: + return Acd; + case 3: + return zcd; + case 4: + return Rcd; + default: + return Scd; + } + } + function Wcd(a) { + switch (a.g) { + case 1: + return Rcd; + case 2: + return Tcd; + case 3: + return Acd; + case 4: + return zcd; + default: + return Scd; + } + } + function Xcd(a) { + switch (a.g) { + case 1: + return zcd; + case 2: + return Rcd; + case 3: + return Tcd; + case 4: + return Acd; + default: + return Scd; + } + } + function DPc(a) { + switch (a) { + case 0: + return new OPc(); + case 1: + return new EPc(); + case 2: + return new JPc(); + default: + throw vbb(new Vdb()); + } + } + function Kdb(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + if (a == b) { + return a == 0 ? Kdb(1 / a, 1 / b) : 0; + } + return isNaN(a) ? isNaN(b) ? 0 : 1 : -1; + } + function f4b(a, b) { + Odd(b, "Sort end labels", 1); + MAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new q4b()), new s4b()), new u4b()); + Qdd(b); + } + function Wxd(a, b, c) { + var d, e; + if (a.ej()) { + e = a.fj(); + d = sud(a, b, c); + a.$i(a.Zi(7, meb(c), d, b, e)); + return d; + } else { + return sud(a, b, c); + } + } + function vAd(a, b) { + var c, d, e; + if (a.d == null) { + ++a.e; + --a.f; + } else { + e = b.cd(); + c = b.Sh(); + d = (c & Ohe) % a.d.length; + KAd(a, d, xAd(a, d, c, e)); + } + } + function ZId(a, b) { + var c; + c = (a.Bb & zte) != 0; + b ? a.Bb |= zte : a.Bb &= -1025; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 10, c, b)); + } + function dJd(a, b) { + var c; + c = (a.Bb & Rje) != 0; + b ? a.Bb |= Rje : a.Bb &= -4097; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 12, c, b)); + } + function eJd(a, b) { + var c; + c = (a.Bb & Cve) != 0; + b ? a.Bb |= Cve : a.Bb &= -8193; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 15, c, b)); + } + function fJd(a, b) { + var c; + c = (a.Bb & Dve) != 0; + b ? a.Bb |= Dve : a.Bb &= -2049; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 11, c, b)); + } + function jOb(a, b) { + var c; + c = Kdb(a.b.c, b.b.c); + if (c != 0) { + return c; + } + c = Kdb(a.a.a, b.a.a); + if (c != 0) { + return c; + } + return Kdb(a.a.b, b.a.b); + } + function jqd(a, b) { + var c; + c = Ohb(a.k, b); + if (c == null) { + throw vbb(new cqd("Port did not exist in input.")); + } + Yqd(b, c); + return null; + } + function k6d(a) { + var b, c; + for (c = l6d(bKd(a)).Kc(); c.Ob(); ) { + b = GD(c.Pb()); + if (Dmd(a, b)) { + return uFd((tFd(), sFd), b); + } + } + return null; + } + function n3d(a, b) { + var c, d, e, f, g; + g = S6d(a.e.Tg(), b); + f = 0; + c = BD(a.g, 119); + for (e = 0; e < a.i; ++e) { + d = c[e]; + g.rl(d.ak()) && ++f; + } + return f; + } + function Vsd(a, b, c) { + var d, e; + d = BD(b.We(a.a), 35); + e = BD(c.We(a.a), 35); + return d != null && e != null ? Fcb(d, e) : d != null ? -1 : e != null ? 1 : 0; + } + function ved(a, b, c) { + var d, e; + if (a.c) { + Efd(a.c, b, c); + } else { + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + ved(d, b, c); + } + } + } + function RUb(a, b) { + var c, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 46); + Lkb(a.b.b, c.b); + fVb(BD(c.a, 189), BD(c.b, 81)); + } + } + function tr(a) { + var b, c; + c = Kfb(new Ufb(), 91); + b = true; + while (a.Ob()) { + b || (c.a += She, c); + b = false; + Pfb(c, a.Pb()); + } + return (c.a += "]", c).a; + } + function aJd(a, b) { + var c; + c = (a.Bb & oie) != 0; + b ? a.Bb |= oie : a.Bb &= -16385; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 16, c, b)); + } + function MJd(a, b) { + var c; + c = (a.Bb & ote) != 0; + b ? a.Bb |= ote : a.Bb &= -32769; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 18, c, b)); + } + function CUd(a, b) { + var c; + c = (a.Bb & ote) != 0; + b ? a.Bb |= ote : a.Bb &= -32769; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 18, c, b)); + } + function EUd(a, b) { + var c; + c = (a.Bb & Tje) != 0; + b ? a.Bb |= Tje : a.Bb &= -65537; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 20, c, b)); + } + function Tee(a) { + var b; + b = KC(TD, $ie, 25, 2, 15, 1); + a -= Tje; + b[0] = (a >> 10) + Uje & aje; + b[1] = (a & 1023) + 56320 & aje; + return zfb(b, 0, b.length); + } + function a_b(a) { + var b, c; + c = BD(vNb(a, (Nyc(), Lwc)), 103); + if (c == (ead(), cad)) { + b = Edb(ED(vNb(a, owc))); + return b >= 1 ? bad : _9c; + } + return c; + } + function rec(a) { + switch (BD(vNb(a, (Nyc(), Swc)), 218).g) { + case 1: + return new Fmc(); + case 3: + return new wnc(); + default: + return new zmc(); + } + } + function Uzb(a) { + if (a.c) { + Uzb(a.c); + } else if (a.d) { + throw vbb(new Zdb("Stream already terminated, can't be modified or used")); + } + } + function Mkd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (identifier: "; + Efb(b, a.k); + b.a += ")"; + return b.a; + } + function ctd(a, b, c) { + var d, e; + d = (Fhd(), e = new xkd(), e); + vkd(d, b); + wkd(d, c); + !!a && wtd((!a.a && (a.a = new xMd(y2, a, 5)), a.a), d); + return d; + } + function ttb(a, b, c, d) { + var e, f; + uCb(d); + uCb(c); + e = a.xc(b); + f = e == null ? c : Myb(BD(e, 15), BD(c, 14)); + f == null ? a.Bc(b) : a.zc(b, f); + return f; + } + function pqb(a) { + var b, c, d, e; + c = (b = BD(gdb((d = a.gm, e = d.f, e == CI ? d : e)), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + rqb(c, a); + return c; + } + function hDc(a, b, c) { + var d, e; + for (e = a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + if (Be(c, BD(Ikb(b, d.p), 14))) { + return d; + } + } + return null; + } + function Db(b, c, d) { + var e; + try { + Cb(b, c, d); + } catch (a) { + a = ubb(a); + if (JD(a, 597)) { + e = a; + throw vbb(new ycb(e)); + } else + throw vbb(a); + } + return c; + } + function Qbb(a, b) { + var c; + if (Fbb(a) && Fbb(b)) { + c = a - b; + if (Kje < c && c < Ije) { + return c; + } + } + return zbb(nD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function wbb(a, b) { + var c; + if (Fbb(a) && Fbb(b)) { + c = a + b; + if (Kje < c && c < Ije) { + return c; + } + } + return zbb(cD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Ibb(a, b) { + var c; + if (Fbb(a) && Fbb(b)) { + c = a * b; + if (Kje < c && c < Ije) { + return c; + } + } + return zbb(gD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function V_b(a, b) { + var c; + a.i || N_b(a); + c = BD(Mpb(a.g, b), 46); + return !c ? (mmb(), mmb(), jmb) : new Jib(a.j, BD(c.a, 19).a, BD(c.b, 19).a); + } + function Drb(a, b, c) { + var d; + d = a.a.get(b); + a.a.set(b, c === void 0 ? null : c); + if (d === void 0) { + ++a.c; + zpb(a.b); + } else { + ++a.d; + } + return d; + } + function kNb(a, b, c) { + a.n = IC(XD, [nie, Sje], [364, 25], 14, [c, QD($wnd.Math.ceil(b / 32))], 2); + a.o = b; + a.p = c; + a.j = b - 1 >> 1; + a.k = c - 1 >> 1; + } + function Gub() { + zub(); + var a, b, c; + c = yub++ + Date.now(); + a = QD($wnd.Math.floor(c * lke)) & nke; + b = QD(c - a * mke); + this.a = a ^ 1502; + this.b = b ^ kke; + } + function O_b(a) { + var b, c, d; + b = new Rkb(); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c = BD(mlb(d), 11); + Ekb(b, c.b); + } + return Qb(b), new sl(b); + } + function R_b(a) { + var b, c, d; + b = new Rkb(); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c = BD(mlb(d), 11); + Ekb(b, c.e); + } + return Qb(b), new sl(b); + } + function U_b(a) { + var b, c, d; + b = new Rkb(); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c = BD(mlb(d), 11); + Ekb(b, c.g); + } + return Qb(b), new sl(b); + } + function n6d(a) { + var b, c; + for (c = o6d(bKd(WId(a))).Kc(); c.Ob(); ) { + b = GD(c.Pb()); + if (Dmd(a, b)) + return FFd((EFd(), DFd), b); + } + return null; + } + function wm(a) { + var b, c, d; + for (c = 0, d = a.length; c < d; c++) { + if (a[c] == null) { + throw vbb(new Heb("at index " + c)); + } + } + b = a; + return new amb(b); + } + function wid(a, b) { + var c; + c = YKd(a.Tg(), b); + if (JD(c, 99)) { + return BD(c, 18); + } + throw vbb(new Wdb(ite + b + "' is not a valid reference")); + } + function Tdb(a) { + var b; + b = Hcb(a); + if (b > 34028234663852886e22) { + return Pje; + } else if (b < -34028234663852886e22) { + return Qje; + } + return b; + } + function aeb(a) { + a -= a >> 1 & 1431655765; + a = (a >> 2 & 858993459) + (a & 858993459); + a = (a >> 4) + a & 252645135; + a += a >> 8; + a += a >> 16; + return a & 63; + } + function Ev(a) { + var b, c, d, e; + b = new cq(a.Hd().gc()); + e = 0; + for (d = vr(a.Hd().Kc()); d.Ob(); ) { + c = d.Pb(); + bq(b, c, meb(e++)); + } + return fn(b.a); + } + function Uyb(a, b) { + var c, d, e; + e = new Lqb(); + for (d = b.vc().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 42); + Rhb(e, c.cd(), Yyb(a, BD(c.dd(), 15))); + } + return e; + } + function EZc(a, b) { + a.n.c.length == 0 && Ekb(a.n, new VZc(a.s, a.t, a.i)); + Ekb(a.b, b); + QZc(BD(Ikb(a.n, a.n.c.length - 1), 211), b); + GZc(a, b); + } + function LFb(a) { + if (a.c != a.b.b || a.i != a.g.b) { + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(a.a, a.b); + Gkb(a.a, a.g); + a.c = a.b.b; + a.i = a.g.b; + } + return a.a; + } + function Ycc(a, b) { + var c, d, e; + e = 0; + for (d = BD(b.Kb(a), 20).Kc(); d.Ob(); ) { + c = BD(d.Pb(), 17); + Ccb(DD(vNb(c, (wtc(), ltc)))) || ++e; + } + return e; + } + function efc(a, b) { + var c, d, e; + d = tgc(b); + e = Edb(ED(pBc(d, (Nyc(), lyc)))); + c = $wnd.Math.max(0, e / 2 - 0.5); + cfc(b, c, 1); + Ekb(a, new Dfc(b, c)); + } + function Ctc() { + Ctc = ccb; + Btc = new Dtc(ane, 0); + xtc = new Dtc("FIRST", 1); + ytc = new Dtc(Gne, 2); + ztc = new Dtc("LAST", 3); + Atc = new Dtc(Hne, 4); + } + function Aad() { + Aad = ccb; + zad = new Bad(ole, 0); + xad = new Bad("POLYLINE", 1); + wad = new Bad("ORTHOGONAL", 2); + yad = new Bad("SPLINES", 3); + } + function zYc() { + zYc = ccb; + xYc = new AYc("ASPECT_RATIO_DRIVEN", 0); + yYc = new AYc("MAX_SCALE_DRIVEN", 1); + wYc = new AYc("AREA_DRIVEN", 2); + } + function Y$c() { + Y$c = ccb; + V$c = new Z$c("P1_STRUCTURE", 0); + W$c = new Z$c("P2_PROCESSING_ORDER", 1); + X$c = new Z$c("P3_EXECUTION", 2); + } + function tVc() { + tVc = ccb; + sVc = new uVc("OVERLAP_REMOVAL", 0); + qVc = new uVc("COMPACTION", 1); + rVc = new uVc("GRAPH_SIZE_CALCULATION", 2); + } + function Jy(a, b) { + Iy(); + return My(Qie), $wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b)); + } + function yOc(a, b) { + var c, d; + c = Jsb(a, 0); + while (c.b != c.d.c) { + d = Gdb(ED(Xsb(c))); + if (d == b) { + return; + } else if (d > b) { + Ysb(c); + break; + } + } + Vsb(c, b); + } + function t4c(a, b) { + var c, d, e, f, g; + c = b.f; + Xrb(a.c.d, c, b); + if (b.g != null) { + for (e = b.g, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + Xrb(a.c.e, d, b); + } + } + } + function Ilb(a, b, c, d) { + var e, f, g; + for (e = b + 1; e < c; ++e) { + for (f = e; f > b && d.ue(a[f - 1], a[f]) > 0; --f) { + g = a[f]; + NC(a, f, a[f - 1]); + NC(a, f - 1, g); + } + } + } + function did(a, b, c, d) { + if (b < 0) { + uid(a, c, d); + } else { + if (!c.Ij()) { + throw vbb(new Wdb(ite + c.ne() + jte)); + } + BD(c, 66).Nj().Tj(a, a.yh(), b, d); + } + } + function xFb(a, b) { + if (b == a.d) { + return a.e; + } else if (b == a.e) { + return a.d; + } else { + throw vbb(new Wdb("Node " + b + " not part of edge " + a)); + } + } + function iEb(a, b) { + switch (b.g) { + case 2: + return a.b; + case 1: + return a.c; + case 4: + return a.d; + case 3: + return a.a; + default: + return false; + } + } + function GVb(a, b) { + switch (b.g) { + case 2: + return a.b; + case 1: + return a.c; + case 4: + return a.d; + case 3: + return a.a; + default: + return false; + } + } + function Xkd(a, b, c, d) { + switch (b) { + case 3: + return a.f; + case 4: + return a.g; + case 5: + return a.i; + case 6: + return a.j; + } + return Ekd(a, b, c, d); + } + function Ljc(a) { + if (a.k != (j0b(), h0b)) { + return false; + } + return FAb(new YAb(null, new Lub(new Sr(ur(U_b(a).a.Kc(), new Sq())))), new Mjc()); + } + function MEd(a) { + if (a.e == null) { + return a; + } else + !a.c && (a.c = new NEd((a.f & 256) != 0, a.i, a.a, a.d, (a.f & 16) != 0, a.j, a.g, null)); + return a.c; + } + function VC(a, b) { + if (a.h == Gje && a.m == 0 && a.l == 0) { + b && (QC = TC(0, 0, 0)); + return SC((wD(), uD)); + } + b && (QC = TC(a.l, a.m, a.h)); + return TC(0, 0, 0); + } + function fcb(a) { + var b; + if (Array.isArray(a) && a.im === gcb) { + return hdb(rb(a)) + "@" + (b = tb(a) >>> 0, b.toString(16)); + } + return a.toString(); + } + function Rpb(a) { + var b; + this.a = (b = BD(a.e && a.e(), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + this.b = KC(SI, Uhe, 1, this.a.a.length, 5, 1); + } + function _Ob(a) { + var b, c, d; + this.a = new zsb(); + for (d = new olb(a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 14); + b = new MOb(); + GOb(b, c); + Qqb(this.a, b); + } + } + function cKb(a) { + $Jb(); + var b, c, d, e; + b = a.o.b; + for (d = BD(BD(Qc(a.r, (Ucd(), Rcd)), 21), 84).Kc(); d.Ob(); ) { + c = BD(d.Pb(), 111); + e = c.e; + e.b += b; + } + } + function ag(a) { + var b; + if (a.b) { + ag(a.b); + if (a.b.d != a.c) { + throw vbb(new Apb()); + } + } else if (a.d.dc()) { + b = BD(a.f.c.xc(a.e), 14); + !!b && (a.d = b); + } + } + function fFd(a) { + var b; + if (a == null) + return true; + b = a.length; + return b > 0 && (BCb(b - 1, a.length), a.charCodeAt(b - 1) == 58) && !OEd(a, CEd, DEd); + } + function OEd(a, b, c) { + var d, e; + for (d = 0, e = a.length; d < e; d++) { + if (_Ed((BCb(d, a.length), a.charCodeAt(d)), b, c)) + return true; + } + return false; + } + function JOb(a, b) { + var c, d; + for (d = a.e.a.ec().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 266); + if (t6c(b, c.d) || o6c(b, c.d)) { + return true; + } + } + return false; + } + function Q9b(a, b) { + var c, d, e; + d = N9b(a, b); + e = d[d.length - 1] / 2; + for (c = 0; c < d.length; c++) { + if (d[c] >= e) { + return b.c + c; + } + } + return b.c + b.b.gc(); + } + function NCd(a, b) { + LCd(); + var c, d, e, f; + d = KLd(a); + e = b; + Klb(d, 0, d.length, e); + for (c = 0; c < d.length; c++) { + f = MCd(a, d[c], c); + c != f && Wxd(a, c, f); + } + } + function EHb(a, b) { + var c, d, e, f, g, h; + d = 0; + c = 0; + for (f = b, g = 0, h = f.length; g < h; ++g) { + e = f[g]; + if (e > 0) { + d += e; + ++c; + } + } + c > 1 && (d += a.d * (c - 1)); + return d; + } + function Htd(a) { + var b, c, d; + d = new Hfb(); + d.a += "["; + for (b = 0, c = a.gc(); b < c; ) { + Efb(d, xfb(a.ki(b))); + ++b < c && (d.a += She, d); + } + d.a += "]"; + return d.a; + } + function fsd(a) { + var b, c, d, e, f; + f = hsd(a); + c = Fhe(a.c); + d = !c; + if (d) { + e = new wB(); + cC(f, "knownLayouters", e); + b = new qsd(e); + reb(a.c, b); + } + return f; + } + function Ce(a, b) { + var c, d, e; + uCb(b); + c = false; + for (d = new olb(a); d.a < d.c.c.length; ) { + e = mlb(d); + if (ze(b, e, false)) { + nlb(d); + c = true; + } + } + return c; + } + function UGb(a) { + var b, c, d; + d = Edb(ED(a.a.We((Y9c(), Q9c)))); + for (c = new olb(a.a.xf()); c.a < c.c.c.length; ) { + b = BD(mlb(c), 680); + XGb(a, b, d); + } + } + function MUb(a, b) { + var c, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 46); + Ekb(a.b.b, BD(c.b, 81)); + eVb(BD(c.a, 189), BD(c.b, 81)); + } + } + function XCc(a, b, c) { + var d, e; + e = a.a.b; + for (d = e.c.length; d < c; d++) { + Dkb(e, 0, new H1b(a.a)); + } + $_b(b, BD(Ikb(e, e.c.length - c), 29)); + a.b[b.p] = c; + } + function JTb(a, b, c) { + var d; + d = c; + !d && (d = Ydd(new Zdd(), 0)); + Odd(d, Vme, 2); + qZb(a.b, b, Udd(d, 1)); + LTb(a, b, Udd(d, 1)); + _Yb(b, Udd(d, 1)); + Qdd(d); + } + function eKc(a, b, c, d, e) { + FJc(); + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), e.d.e - a), b), e.d)); + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), c - e.a.e), e.a), d)); + } + function e$c(a, b, c, d, e, f) { + this.a = a; + this.c = b; + this.b = c; + this.f = d; + this.d = e; + this.e = f; + this.c > 0 && this.b > 0 && q$c(this.c, this.b, this.a); + } + function ezc(a) { + dzc(); + this.c = Ou(OC(GC(h0, 1), Uhe, 831, 0, [Uyc])); + this.b = new Lqb(); + this.a = a; + Rhb(this.b, bzc, 1); + Hkb(czc, new Xed(this)); + } + function I2c(a, b) { + var c; + if (a.d) { + if (Mhb(a.b, b)) { + return BD(Ohb(a.b, b), 51); + } else { + c = b.Kf(); + Rhb(a.b, b, c); + return c; + } + } else { + return b.Kf(); + } + } + function Kgb(a, b) { + var c; + if (PD(a) === PD(b)) { + return true; + } + if (JD(b, 91)) { + c = BD(b, 91); + return a.e == c.e && a.d == c.d && Lgb(a, c.a); + } + return false; + } + function Zcd(a) { + Ucd(); + switch (a.g) { + case 4: + return Acd; + case 1: + return zcd; + case 3: + return Rcd; + case 2: + return Tcd; + default: + return Scd; + } + } + function Ykd(a, b) { + switch (b) { + case 3: + return a.f != 0; + case 4: + return a.g != 0; + case 5: + return a.i != 0; + case 6: + return a.j != 0; + } + return Hkd(a, b); + } + function gWc(a) { + switch (a.g) { + case 0: + return new FXc(); + case 1: + return new IXc(); + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function QUc(a) { + switch (a.g) { + case 0: + return new CXc(); + case 1: + return new MXc(); + default: + throw vbb(new Wdb(Dne + (a.f != null ? a.f : "" + a.g))); + } + } + function b1c(a) { + switch (a.g) { + case 0: + return new s1c(); + case 1: + return new w1c(); + default: + throw vbb(new Wdb(Mre + (a.f != null ? a.f : "" + a.g))); + } + } + function qWc(a) { + switch (a.g) { + case 1: + return new SVc(); + case 2: + return new KVc(); + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function ryb(a) { + var b, c; + if (a.b) { + return a.b; + } + c = lyb ? null : a.d; + while (c) { + b = lyb ? null : c.b; + if (b) { + return b; + } + c = lyb ? null : c.d; + } + return $xb(), Zxb; + } + function hhb(a) { + var b, c, d; + if (a.e == 0) { + return 0; + } + b = a.d << 5; + c = a.a[a.d - 1]; + if (a.e < 0) { + d = Mgb(a); + if (d == a.d - 1) { + --c; + c = c | 0; + } + } + b -= heb(c); + return b; + } + function bhb(a) { + var b, c, d; + if (a < Fgb.length) { + return Fgb[a]; + } + c = a >> 5; + b = a & 31; + d = KC(WD, oje, 25, c + 1, 15, 1); + d[c] = 1 << b; + return new Vgb(1, c + 1, d); + } + function O2b(a) { + var b, c, d; + c = a.zg(); + if (c) { + b = a.Ug(); + if (JD(b, 160)) { + d = O2b(BD(b, 160)); + if (d != null) { + return d + "." + c; + } + } + return c; + } + return null; + } + function ze(a, b, c) { + var d, e; + for (e = a.Kc(); e.Ob(); ) { + d = e.Pb(); + if (PD(b) === PD(d) || b != null && pb(b, d)) { + c && e.Qb(); + return true; + } + } + return false; + } + function zvd(a, b, c) { + var d, e; + ++a.j; + if (c.dc()) { + return false; + } else { + for (e = c.Kc(); e.Ob(); ) { + d = e.Pb(); + a.Hi(b, a.oi(b, d)); + ++b; + } + return true; + } + } + function yA(a, b, c, d) { + var e, f; + f = c - b; + if (f < 3) { + while (f < 3) { + a *= 10; + ++f; + } + } else { + e = 1; + while (f > 3) { + e *= 10; + --f; + } + a = (a + (e >> 1)) / e | 0; + } + d.i = a; + return true; + } + function XUb(a) { + LUb(); + return Bcb(), GVb(BD(a.a, 81).j, BD(a.b, 103)) || BD(a.a, 81).d.e != 0 && GVb(BD(a.a, 81).j, BD(a.b, 103)) ? true : false; + } + function s3c(a) { + p3c(); + if (BD(a.We((Y9c(), b9c)), 174).Hc((Idd(), Gdd))) { + BD(a.We(x9c), 174).Fc((rcd(), qcd)); + BD(a.We(b9c), 174).Mc(Gdd); + } + } + function Gxd(a, b) { + var c, d; + if (!b) { + return false; + } else { + for (c = 0; c < a.i; ++c) { + d = BD(a.g[c], 366); + if (d.Di(b)) { + return false; + } + } + return wtd(a, b); + } + } + function pvd(a) { + var b, c, d, e; + b = new wB(); + for (e = new Dnb(a.b.Kc()); e.b.Ob(); ) { + d = BD(e.b.Pb(), 686); + c = lsd(d); + uB(b, b.a.length, c); + } + return b.a; + } + function cLb(a) { + var b; + !a.c && (a.c = new VKb()); + Okb(a.d, new jLb()); + _Kb(a); + b = UKb(a); + MAb(new YAb(null, new Kub(a.d, 16)), new CLb(a)); + return b; + } + function mKd(a) { + var b; + if ((a.Db & 64) != 0) + return qnd(a); + b = new Jfb(qnd(a)); + b.a += " (instanceClassName: "; + Efb(b, a.D); + b.a += ")"; + return b.a; + } + function Pqd(a, b) { + var c, d, e, f; + if (b) { + e = Xpd(b, "x"); + c = new bsd(a); + hmd(c.a, (uCb(e), e)); + f = Xpd(b, "y"); + d = new csd(a); + imd(d.a, (uCb(f), f)); + } + } + function Eqd(a, b) { + var c, d, e, f; + if (b) { + e = Xpd(b, "x"); + c = new Yrd(a); + omd(c.a, (uCb(e), e)); + f = Xpd(b, "y"); + d = new _rd(a); + pmd(d.a, (uCb(f), f)); + } + } + function bLd(a, b) { + var c, d, e; + c = (a.i == null && TKd(a), a.i); + d = b.aj(); + if (d != -1) { + for (e = c.length; d < e; ++d) { + if (c[d] == b) { + return d; + } + } + } + return -1; + } + function tNd(a) { + var b, c, d, e, f; + c = BD(a.g, 674); + for (d = a.i - 1; d >= 0; --d) { + b = c[d]; + for (e = 0; e < d; ++e) { + f = c[e]; + if (uNd(a, b, f)) { + tud(a, d); + break; + } + } + } + } + function jCb(b) { + var c = b.e; + function d(a) { + if (!a || a.length == 0) { + return ""; + } + return " " + a.join("\n "); + } + return c && (c.stack || d(b[Yie])); + } + function nm(a) { + im(); + var b; + b = a.Pc(); + switch (b.length) { + case 0: + return hm; + case 1: + return new my(Qb(b[0])); + default: + return new ux(wm(b)); + } + } + function W_b(a, b) { + switch (b.g) { + case 1: + return Nq(a.j, (z0b(), u0b)); + case 2: + return Nq(a.j, (z0b(), w0b)); + default: + return mmb(), mmb(), jmb; + } + } + function $kd(a, b) { + switch (b) { + case 3: + ald(a, 0); + return; + case 4: + cld(a, 0); + return; + case 5: + dld(a, 0); + return; + case 6: + eld(a, 0); + return; + } + Jkd(a, b); + } + function dzc() { + dzc = ccb; + Vyc(); + bzc = (Nyc(), vyc); + czc = Ou(OC(GC(Q3, 1), zqe, 146, 0, [kyc, lyc, nyc, oyc, ryc, syc, tyc, uyc, xyc, zyc, myc, pyc, wyc])); + } + function Y9b(a) { + var b, c; + b = a.d == (Apc(), vpc); + c = U9b(a); + b && !c || !b && c ? yNb(a.a, (Nyc(), mwc), (F7c(), D7c)) : yNb(a.a, (Nyc(), mwc), (F7c(), C7c)); + } + function XAb(a, b) { + var c; + c = BD(GAb(a, Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + return c.Qc(aBb(c.gc())); + } + function Ded() { + Ded = ccb; + Ced = new Eed("SIMPLE", 0); + zed = new Eed("GROUP_DEC", 1); + Bed = new Eed("GROUP_MIXED", 2); + Aed = new Eed("GROUP_INC", 3); + } + function CWd() { + CWd = ccb; + AWd = new DWd(); + tWd = new GWd(); + uWd = new JWd(); + vWd = new MWd(); + wWd = new PWd(); + xWd = new SWd(); + yWd = new VWd(); + zWd = new YWd(); + BWd = new _Wd(); + } + function FHb(a, b, c) { + tHb(); + oHb.call(this); + this.a = IC(oN, [nie, ile], [595, 212], 0, [sHb, rHb], 2); + this.c = new I6c(); + this.g = a; + this.f = b; + this.d = c; + } + function pNb(a, b) { + this.n = IC(XD, [nie, Sje], [364, 25], 14, [b, QD($wnd.Math.ceil(a / 32))], 2); + this.o = a; + this.p = b; + this.j = a - 1 >> 1; + this.k = b - 1 >> 1; + } + function r3b(a, b) { + Odd(b, "End label post-processing", 1); + MAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new w3b()), new y3b()), new A3b()); + Qdd(b); + } + function NLc(a, b, c) { + var d, e; + d = Edb(a.p[b.i.p]) + Edb(a.d[b.i.p]) + b.n.b + b.a.b; + e = Edb(a.p[c.i.p]) + Edb(a.d[c.i.p]) + c.n.b + c.a.b; + return e - d; + } + function xhb(a, b, c) { + var d, e; + d = xbb(c, Yje); + for (e = 0; ybb(d, 0) != 0 && e < b; e++) { + d = wbb(d, xbb(a[e], Yje)); + a[e] = Tbb(d); + d = Obb(d, 32); + } + return Tbb(d); + } + function $Ed(a) { + var b, c, d, e; + e = 0; + for (c = 0, d = a.length; c < d; c++) { + b = (BCb(c, a.length), a.charCodeAt(c)); + b < 64 && (e = Mbb(e, Nbb(1, b))); + } + return e; + } + function S9d(a) { + var b; + return a == null ? null : new Ygb((b = Qge(a, true), b.length > 0 && (BCb(0, b.length), b.charCodeAt(0) == 43) ? b.substr(1) : b)); + } + function T9d(a) { + var b; + return a == null ? null : new Ygb((b = Qge(a, true), b.length > 0 && (BCb(0, b.length), b.charCodeAt(0) == 43) ? b.substr(1) : b)); + } + function xud(a, b) { + var c; + if (a.i > 0) { + if (b.length < a.i) { + c = izd(rb(b).c, a.i); + b = c; + } + $fb(a.g, 0, b, 0, a.i); + } + b.length > a.i && NC(b, a.i, null); + return b; + } + function Sxd(a, b, c) { + var d, e, f; + if (a.ej()) { + d = a.i; + f = a.fj(); + kud(a, d, b); + e = a.Zi(3, null, b, d, f); + !c ? c = e : c.Ei(e); + } else { + kud(a, a.i, b); + } + return c; + } + function HMd(a, b, c) { + var d, e; + d = new pSd(a.e, 4, 10, (e = b.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)), null, HLd(a, b), false); + !c ? c = d : c.Ei(d); + return c; + } + function GMd(a, b, c) { + var d, e; + d = new pSd(a.e, 3, 10, null, (e = b.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)), HLd(a, b), false); + !c ? c = d : c.Ei(d); + return c; + } + function _Jb(a) { + $Jb(); + var b; + b = new g7c(BD(a.e.We((Y9c(), _8c)), 8)); + if (a.B.Hc((Idd(), Bdd))) { + b.a <= 0 && (b.a = 20); + b.b <= 0 && (b.b = 20); + } + return b; + } + function Lzc(a) { + Izc(); + var b; + (!a.q ? (mmb(), mmb(), kmb) : a.q)._b((Nyc(), Cxc)) ? b = BD(vNb(a, Cxc), 197) : b = BD(vNb(Q_b(a), Dxc), 197); + return b; + } + function pBc(a, b) { + var c, d; + d = null; + if (wNb(a, (Nyc(), qyc))) { + c = BD(vNb(a, qyc), 94); + c.Xe(b) && (d = c.We(b)); + } + d == null && (d = vNb(Q_b(a), b)); + return d; + } + function Ze(a, b) { + var c, d, e; + if (JD(b, 42)) { + c = BD(b, 42); + d = c.cd(); + e = Hv(a.Rc(), d); + return Hb(e, c.dd()) && (e != null || a.Rc()._b(d)); + } + return false; + } + function qAd(a, b) { + var c, d, e; + if (a.f > 0) { + a.qj(); + d = b == null ? 0 : tb(b); + e = (d & Ohe) % a.d.length; + c = xAd(a, e, d, b); + return c != -1; + } else { + return false; + } + } + function AAd(a, b) { + var c, d, e; + if (a.f > 0) { + a.qj(); + d = b == null ? 0 : tb(b); + e = (d & Ohe) % a.d.length; + c = wAd(a, e, d, b); + if (c) { + return c.dd(); + } + } + return null; + } + function R2d(a, b) { + var c, d, e, f; + f = S6d(a.e.Tg(), b); + c = BD(a.g, 119); + for (e = 0; e < a.i; ++e) { + d = c[e]; + if (f.rl(d.ak())) { + return false; + } + } + return true; + } + function B6d(a) { + if (a.b == null) { + while (a.a.Ob()) { + a.b = a.a.Pb(); + if (!BD(a.b, 49).Zg()) { + return true; + } + } + a.b = null; + return false; + } else { + return true; + } + } + function Myd(b, c) { + b.mj(); + try { + b.d.Vc(b.e++, c); + b.f = b.d.j; + b.g = -1; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + } + function IA(a, b) { + GA(); + var c, d; + c = LA((KA(), KA(), JA)); + d = null; + b == c && (d = BD(Phb(FA, a), 615)); + if (!d) { + d = new HA(a); + b == c && Shb(FA, a, d); + } + return d; + } + function Epb(a, b) { + var c, d; + a.a = wbb(a.a, 1); + a.c = $wnd.Math.min(a.c, b); + a.b = $wnd.Math.max(a.b, b); + a.d += b; + c = b - a.f; + d = a.e + c; + a.f = d - a.e - c; + a.e = d; + } + function ogb(a, b) { + var c; + a.c = b; + a.a = hhb(b); + a.a < 54 && (a.f = (c = b.d > 1 ? Mbb(Nbb(b.a[1], 32), xbb(b.a[0], Yje)) : xbb(b.a[0], Yje), Sbb(Ibb(b.e, c)))); + } + function Hbb(a, b) { + var c; + if (Fbb(a) && Fbb(b)) { + c = a % b; + if (Kje < c && c < Ije) { + return c; + } + } + return zbb((UC(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b, true), QC)); + } + function p5b(a, b) { + var c; + m5b(b); + c = BD(vNb(a, (Nyc(), Rwc)), 276); + !!c && yNb(a, Rwc, Tqc(c)); + n5b(a.c); + n5b(a.f); + o5b(a.d); + o5b(BD(vNb(a, wxc), 207)); + } + function rHc(a) { + this.e = KC(WD, oje, 25, a.length, 15, 1); + this.c = KC(sbb, dle, 25, a.length, 16, 1); + this.b = KC(sbb, dle, 25, a.length, 16, 1); + this.f = 0; + } + function BDc(a) { + var b, c; + a.j = KC(UD, Vje, 25, a.p.c.length, 15, 1); + for (c = new olb(a.p); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + a.j[b.p] = b.o.b / a.i; + } + } + function yic(a) { + var b; + if (a.c == 0) { + return; + } + b = BD(Ikb(a.a, a.b), 287); + b.b == 1 ? (++a.b, a.b < a.a.c.length && Cic(BD(Ikb(a.a, a.b), 287))) : --b.b; + --a.c; + } + function eac(a) { + var b; + b = a.a; + do { + b = BD(Rr(new Sr(ur(U_b(b).a.Kc(), new Sq()))), 17).d.i; + b.k == (j0b(), g0b) && Ekb(a.e, b); + } while (b.k == (j0b(), g0b)); + } + function idd() { + idd = ccb; + fdd = new q0b(15); + edd = new Osd((Y9c(), f9c), fdd); + hdd = new Osd(T9c, 15); + gdd = new Osd(E9c, meb(0)); + ddd = new Osd(r8c, tme); + } + function tdd() { + tdd = ccb; + rdd = new udd("PORTS", 0); + sdd = new udd("PORT_LABELS", 1); + qdd = new udd("NODE_LABELS", 2); + pdd = new udd("MINIMUM_SIZE", 3); + } + function Ree(a, b) { + var c, d; + d = b.length; + for (c = 0; c < d; c += 2) + Ufe(a, (BCb(c, b.length), b.charCodeAt(c)), (BCb(c + 1, b.length), b.charCodeAt(c + 1))); + } + function _Zc(a, b, c) { + var d, e, f, g; + f = b - a.e; + g = c - a.f; + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 187); + OZc(d, d.s + f, d.t + g); + } + a.e = b; + a.f = c; + } + function jUc(a, b) { + var c, d, e, f; + f = b.b.b; + a.a = new Psb(); + a.b = KC(WD, oje, 25, f, 15, 1); + c = 0; + for (e = Jsb(b.b, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 86); + d.g = c++; + } + } + function ihb(a, b) { + var c, d, e, f; + c = b >> 5; + b &= 31; + e = a.d + c + (b == 0 ? 0 : 1); + d = KC(WD, oje, 25, e, 15, 1); + jhb(d, a.a, c, b); + f = new Vgb(a.e, e, d); + Jgb(f); + return f; + } + function Ofe(a, b, c) { + var d, e; + d = BD(Phb(Zee, b), 117); + e = BD(Phb($ee, b), 117); + if (c) { + Shb(Zee, a, d); + Shb($ee, a, e); + } else { + Shb($ee, a, d); + Shb(Zee, a, e); + } + } + function Cwb(a, b, c) { + var d, e, f; + e = null; + f = a.b; + while (f) { + d = a.a.ue(b, f.d); + if (c && d == 0) { + return f; + } + if (d >= 0) { + f = f.a[1]; + } else { + e = f; + f = f.a[0]; + } + } + return e; + } + function Dwb(a, b, c) { + var d, e, f; + e = null; + f = a.b; + while (f) { + d = a.a.ue(b, f.d); + if (c && d == 0) { + return f; + } + if (d <= 0) { + f = f.a[0]; + } else { + e = f; + f = f.a[1]; + } + } + return e; + } + function Nic(a, b, c, d) { + var e, f, g; + e = false; + if (fjc(a.f, c, d)) { + ijc(a.f, a.a[b][c], a.a[b][d]); + f = a.a[b]; + g = f[d]; + f[d] = f[c]; + f[c] = g; + e = true; + } + return e; + } + function QHc(a, b, c, d, e) { + var f, g, h; + g = e; + while (b.b != b.c) { + f = BD(fkb(b), 10); + h = BD(V_b(f, d).Xb(0), 11); + a.d[h.p] = g++; + c.c[c.c.length] = h; + } + return g; + } + function hBc(a, b, c) { + var d, e, f, g, h; + g = a.k; + h = b.k; + d = c[g.g][h.g]; + e = ED(pBc(a, d)); + f = ED(pBc(b, d)); + return $wnd.Math.max((uCb(e), e), (uCb(f), f)); + } + function zZc(a, b, c) { + var d, e, f, g; + d = c / a.c.length; + e = 0; + for (g = new olb(a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 200); + w$c(f, f.f + d * e); + t$c(f, b, d); + ++e; + } + } + function hnc(a, b, c) { + var d, e, f, g; + e = BD(Ohb(a.b, c), 177); + d = 0; + for (g = new olb(b.j); g.a < g.c.c.length; ) { + f = BD(mlb(g), 113); + e[f.d.p] && ++d; + } + return d; + } + function mzd(a) { + var b, c; + b = BD(Ajd(a.a, 4), 126); + if (b != null) { + c = KC($3, hve, 415, b.length, 0, 1); + $fb(b, 0, c, 0, b.length); + return c; + } else { + return jzd; + } + } + function Cz() { + var a; + if (xz != 0) { + a = sz(); + if (a - yz > 2e3) { + yz = a; + zz = $wnd.setTimeout(Iz, 10); + } + } + if (xz++ == 0) { + Lz((Kz(), Jz)); + return true; + } + return false; + } + function wCc(a, b) { + var c, d, e; + for (d = new Sr(ur(U_b(a).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + e = c.d.i; + if (e.c == b) { + return false; + } + } + return true; + } + function Ek(b, c) { + var d, e; + if (JD(c, 245)) { + e = BD(c, 245); + try { + d = b.vd(e); + return d == 0; + } catch (a) { + a = ubb(a); + if (!JD(a, 205)) + throw vbb(a); + } + } + return false; + } + function Xz() { + if (Error.stackTraceLimit > 0) { + $wnd.Error.stackTraceLimit = Error.stackTraceLimit = 64; + return true; + } + return "stack" in new Error(); + } + function BDb(a, b) { + return Iy(), Iy(), My(Qie), ($wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b))) > 0; + } + function DDb(a, b) { + return Iy(), Iy(), My(Qie), ($wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b))) < 0; + } + function CDb(a, b) { + return Iy(), Iy(), My(Qie), ($wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b))) <= 0; + } + function ydb(a, b) { + var c = 0; + while (!b[c] || b[c] == "") { + c++; + } + var d = b[c++]; + for (; c < b.length; c++) { + if (!b[c] || b[c] == "") { + continue; + } + d += a + b[c]; + } + return d; + } + function zfb(a, b, c) { + var d, e, f, g; + f = b + c; + ACb(b, f, a.length); + g = ""; + for (e = b; e < f; ) { + d = $wnd.Math.min(e + 1e4, f); + g += vfb(a.slice(e, d)); + e = d; + } + return g; + } + function N9d(a) { + var b, c, d, e, f; + if (a == null) + return null; + f = new Rkb(); + for (c = Zmd(a), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + Ekb(f, Qge(b, true)); + } + return f; + } + function Q9d(a) { + var b, c, d, e, f; + if (a == null) + return null; + f = new Rkb(); + for (c = Zmd(a), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + Ekb(f, Qge(b, true)); + } + return f; + } + function R9d(a) { + var b, c, d, e, f; + if (a == null) + return null; + f = new Rkb(); + for (c = Zmd(a), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + Ekb(f, Qge(b, true)); + } + return f; + } + function ted(a, b) { + var c, d, e; + if (a.c) { + cld(a.c, b); + } else { + c = b - red(a); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + ted(d, red(d) + c); + } + } + } + function sed(a, b) { + var c, d, e; + if (a.c) { + ald(a.c, b); + } else { + c = b - qed(a); + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + sed(d, qed(d) + c); + } + } + } + function t6d(a, b) { + var c, d, e, f; + e = new Skb(b.gc()); + for (d = b.Kc(); d.Ob(); ) { + c = d.Pb(); + f = s6d(a, BD(c, 56)); + !!f && (e.c[e.c.length] = f, true); + } + return e; + } + function LAd(a, b) { + var c, d, e; + a.qj(); + d = b == null ? 0 : tb(b); + e = (d & Ohe) % a.d.length; + c = wAd(a, e, d, b); + if (c) { + JAd(a, c); + return c.dd(); + } else { + return null; + } + } + function rde(a) { + var b, c; + c = sde(a); + b = null; + while (a.c == 2) { + nde(a); + if (!b) { + b = (wfe(), wfe(), new Lge(2)); + Kge(b, c); + c = b; + } + c.$l(sde(a)); + } + return c; + } + function Wpd(a) { + var b, c, d; + d = null; + b = Vte in a.a; + c = !b; + if (c) { + throw vbb(new cqd("Every element must have an id.")); + } + d = Vpd(aC(a, Vte)); + return d; + } + function jid(a) { + var b, c, d; + d = a.Zg(); + if (!d) { + b = 0; + for (c = a.eh(); c; c = c.eh()) { + if (++b > Wje) { + return c.fh(); + } + d = c.Zg(); + if (!!d || c == a) { + break; + } + } + } + return d; + } + function fvd(a) { + evd(); + if (JD(a, 156)) { + return BD(Ohb(cvd, hK), 288).vg(a); + } + if (Mhb(cvd, rb(a))) { + return BD(Ohb(cvd, rb(a)), 288).vg(a); + } + return null; + } + function fZd(a) { + if (efb(kse, a)) { + return Bcb(), Acb; + } else if (efb(lse, a)) { + return Bcb(), zcb; + } else { + throw vbb(new Wdb("Expecting true or false")); + } + } + function uDc(a, b) { + if (b.c == a) { + return b.d; + } else if (b.d == a) { + return b.c; + } + throw vbb(new Wdb("Input edge is not connected to the input port.")); + } + function Igb(a, b) { + if (a.e > b.e) { + return 1; + } + if (a.e < b.e) { + return -1; + } + if (a.d > b.d) { + return a.e; + } + if (a.d < b.d) { + return -b.e; + } + return a.e * whb(a.a, b.a, a.d); + } + function Zcb(a) { + if (a >= 48 && a < 48 + $wnd.Math.min(10, 10)) { + return a - 48; + } + if (a >= 97 && a < 97) { + return a - 97 + 10; + } + if (a >= 65 && a < 65) { + return a - 65 + 10; + } + return -1; + } + function Ue(a, b) { + var c; + if (PD(b) === PD(a)) { + return true; + } + if (!JD(b, 21)) { + return false; + } + c = BD(b, 21); + if (c.gc() != a.gc()) { + return false; + } + return a.Ic(c); + } + function ekb(a, b) { + var c, d, e, f; + d = a.a.length - 1; + c = b - a.b & d; + f = a.c - b & d; + e = a.c - a.b & d; + mkb(c < e); + if (c >= f) { + hkb(a, b); + return -1; + } else { + ikb(a, b); + return 1; + } + } + function lA(a, b) { + var c, d; + c = (BCb(b, a.length), a.charCodeAt(b)); + d = b + 1; + while (d < a.length && (BCb(d, a.length), a.charCodeAt(d) == c)) { + ++d; + } + return d - b; + } + function sJb(a) { + switch (a.g) { + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + return true; + default: + return false; + } + } + function bC(f, a) { + var b = f.a; + var c; + a = String(a); + b.hasOwnProperty(a) && (c = b[a]); + var d = (rC(), qC)[typeof c]; + var e = d ? d(c) : xC(typeof c); + return e; + } + function b3c(a, b) { + if (a.a < 0) { + throw vbb(new Zdb("Did not call before(...) or after(...) before calling add(...).")); + } + i3c(a, a.a, b); + return a; + } + function VOc(a, b, c, d) { + var e, f; + if (b.c.length == 0) { + return; + } + e = ROc(c, d); + f = QOc(b); + MAb(VAb(new YAb(null, new Kub(f, 1)), new cPc()), new gPc(a, c, e, d)); + } + function Cjd(a, b, c) { + var d; + if ((a.Db & b) != 0) { + if (c == null) { + Bjd(a, b); + } else { + d = zjd(a, b); + d == -1 ? a.Eb = c : NC(CD(a.Eb), d, c); + } + } else + c != null && vjd(a, b, c); + } + function yjd(a) { + var b, c; + if ((a.Db & 32) == 0) { + c = (b = BD(Ajd(a, 16), 26), aLd(!b ? a.zh() : b) - aLd(a.zh())); + c != 0 && Cjd(a, 32, KC(SI, Uhe, 1, c, 5, 1)); + } + return a; + } + function W1d(a) { + var b; + a.b || X1d(a, (b = h1d(a.e, a.a), !b || !dfb(lse, AAd((!b.b && (b.b = new sId((jGd(), fGd), x6, b)), b.b), "qualified")))); + return a.c; + } + function dTd(a, b, c) { + var d, e, f; + d = BD(qud(QSd(a.a), b), 87); + f = (e = d.c, e ? e : (jGd(), YFd)); + (f.kh() ? xid(a.b, BD(f, 49)) : f) == c ? KQd(d) : NQd(d, c); + return f; + } + function fCb(a, b) { + (!b && console.groupCollapsed != null ? console.groupCollapsed : console.group != null ? console.group : console.log).call(console, a); + } + function NNb(a, b, c, d) { + d == a ? (BD(c.b, 65), BD(c.b, 65), BD(d.b, 65), BD(d.b, 65).c.b) : (BD(c.b, 65), BD(c.b, 65), BD(d.b, 65), BD(d.b, 65).c.b); + KNb(d, b, a); + } + function EOb(a) { + var c, d; + for (c = new olb(a.g); c.a < c.c.c.length; ) { + BD(mlb(c), 562); + } + d = new ENb(a.g, Edb(a.a), a.c); + ELb(d); + a.g = d.b; + a.d = d.a; + } + function ymc(a, b, c) { + b.b = $wnd.Math.max(b.b, -c.a); + b.c = $wnd.Math.max(b.c, c.a - a.a); + b.d = $wnd.Math.max(b.d, -c.b); + b.a = $wnd.Math.max(b.a, c.b - a.b); + } + function MIc(a, b) { + if (a.e < b.e) { + return -1; + } else if (a.e > b.e) { + return 1; + } else if (a.f < b.f) { + return -1; + } else if (a.f > b.f) { + return 1; + } + return tb(a) - tb(b); + } + function efb(a, b) { + uCb(a); + if (b == null) { + return false; + } + if (dfb(a, b)) { + return true; + } + return a.length == b.length && dfb(a.toLowerCase(), b.toLowerCase()); + } + function x6d(a, b) { + var c, d, e, f; + for (d = 0, e = b.gc(); d < e; ++d) { + c = b.il(d); + if (JD(c, 99) && (BD(c, 18).Bb & ote) != 0) { + f = b.jl(d); + f != null && s6d(a, BD(f, 56)); + } + } + } + function p1c(a, b, c) { + var d, e, f; + for (f = new olb(c.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 221); + d = new hDb(BD(Ohb(a.a, e.b), 65)); + Ekb(b.a, d); + p1c(a, d, e); + } + } + function Aeb(a) { + var b, c; + if (ybb(a, -129) > 0 && ybb(a, 128) < 0) { + b = Tbb(a) + 128; + c = (Ceb(), Beb)[b]; + !c && (c = Beb[b] = new teb(a)); + return c; + } + return new teb(a); + } + function _0d(a, b) { + var c, d; + c = b.Hh(a.a); + if (c) { + d = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), fue)); + if (d != null) { + return d; + } + } + return b.ne(); + } + function a1d(a, b) { + var c, d; + c = b.Hh(a.a); + if (c) { + d = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), fue)); + if (d != null) { + return d; + } + } + return b.ne(); + } + function FMc(a, b) { + wMc(); + var c, d; + for (d = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + if (c.d.i == b || c.c.i == b) { + return c; + } + } + return null; + } + function HUb(a, b, c) { + this.c = a; + this.f = new Rkb(); + this.e = new d7c(); + this.j = new IVb(); + this.n = new IVb(); + this.b = b; + this.g = new J6c(b.c, b.d, b.b, b.a); + this.a = c; + } + function gVb(a) { + var b, c, d, e; + this.a = new zsb(); + this.d = new Tqb(); + this.e = 0; + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + !this.f && (this.f = b); + eVb(this, b); + } + } + function Xgb(a) { + Hgb(); + if (a.length == 0) { + this.e = 0; + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [0]); + } else { + this.e = 1; + this.d = a.length; + this.a = a; + Jgb(this); + } + } + function mIb(a, b, c) { + oHb.call(this); + this.a = KC(oN, ile, 212, (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])).length, 0, 1); + this.b = a; + this.d = b; + this.c = c; + } + function Kjc(a) { + this.d = new Rkb(); + this.e = new $rb(); + this.c = KC(WD, oje, 25, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 15, 1); + this.b = a; + } + function Vbc(a) { + var b, c, d, e, f, g; + g = BD(vNb(a, (wtc(), $sc)), 11); + yNb(g, qtc, a.i.n.b); + b = k_b(a.e); + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + RZb(c, g); + } + } + function Wbc(a) { + var b, c, d, e, f, g; + c = BD(vNb(a, (wtc(), $sc)), 11); + yNb(c, qtc, a.i.n.b); + b = k_b(a.g); + for (e = b, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + QZb(d, c); + } + } + function vcc(a) { + var b, c; + if (wNb(a.d.i, (Nyc(), Nxc))) { + b = BD(vNb(a.c.i, Nxc), 19); + c = BD(vNb(a.d.i, Nxc), 19); + return beb(b.a, c.a) > 0; + } else { + return false; + } + } + function q2c(a) { + var b; + if (PD(hkd(a, (Y9c(), J8c))) === PD((hbd(), fbd))) { + if (!Xod(a)) { + jkd(a, J8c, gbd); + } else { + b = BD(hkd(Xod(a), J8c), 334); + jkd(a, J8c, b); + } + } + } + function ijc(a, b, c) { + var d, e; + bIc(a.e, b, c, (Ucd(), Tcd)); + bIc(a.i, b, c, zcd); + if (a.a) { + e = BD(vNb(b, (wtc(), $sc)), 11); + d = BD(vNb(c, $sc), 11); + cIc(a.g, e, d); + } + } + function OEc(a, b, c) { + var d, e, f; + d = b.c.p; + f = b.p; + a.b[d][f] = new $Ec(a, b); + if (c) { + a.a[d][f] = new FEc(b); + e = BD(vNb(b, (wtc(), Psc)), 10); + !!e && Rc(a.d, e, b); + } + } + function TPb(a, b) { + var c, d, e; + Ekb(PPb, a); + b.Fc(a); + c = BD(Ohb(OPb, a), 21); + if (c) { + for (e = c.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 33); + Jkb(PPb, d, 0) != -1 || TPb(d, b); + } + } + } + function tyb(a, b, c) { + var d; + (jyb ? (ryb(a), true) : kyb ? ($xb(), true) : nyb ? ($xb(), true) : myb && ($xb(), false)) && (d = new iyb(b), d.b = c, pyb(a, d), void 0); + } + function xKb(a, b) { + var c; + c = !a.A.Hc((tdd(), sdd)) || a.q == (dcd(), $bd); + a.u.Hc((rcd(), ncd)) ? c ? vKb(a, b) : zKb(a, b) : a.u.Hc(pcd) && (c ? wKb(a, b) : AKb(a, b)); + } + function b0d(a, b) { + var c, d; + ++a.j; + if (b != null) { + c = (d = a.a.Cb, JD(d, 97) ? BD(d, 97).Jg() : null); + if (xlb(b, c)) { + Cjd(a.a, 4, c); + return; + } + } + Cjd(a.a, 4, BD(b, 126)); + } + function dYb(a, b, c) { + return new J6c($wnd.Math.min(a.a, b.a) - c / 2, $wnd.Math.min(a.b, b.b) - c / 2, $wnd.Math.abs(a.a - b.a) + c, $wnd.Math.abs(a.b - b.b) + c); + } + function k4b(a, b) { + var c, d; + c = beb(a.a.c.p, b.a.c.p); + if (c != 0) { + return c; + } + d = beb(a.a.d.i.p, b.a.d.i.p); + if (d != 0) { + return d; + } + return beb(b.a.d.p, a.a.d.p); + } + function _Dc(a, b, c) { + var d, e, f, g; + f = b.j; + g = c.j; + if (f != g) { + return f.g - g.g; + } else { + d = a.f[b.p]; + e = a.f[c.p]; + return d == 0 && e == 0 ? 0 : d == 0 ? -1 : e == 0 ? 1 : Kdb(d, e); + } + } + function HFb(a, b, c) { + var d, e, f; + if (c[b.d]) { + return; + } + c[b.d] = true; + for (e = new olb(LFb(b)); e.a < e.c.c.length; ) { + d = BD(mlb(e), 213); + f = xFb(d, b); + HFb(a, f, c); + } + } + function umc(a, b, c) { + var d; + d = c[a.g][b]; + switch (a.g) { + case 1: + case 3: + return new f7c(0, d); + case 2: + case 4: + return new f7c(d, 0); + default: + return null; + } + } + function r2c(b, c, d) { + var e, f; + f = BD(hgd(c.f), 209); + try { + f.Ze(b, d); + igd(c.f, f); + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + e = a; + throw vbb(e); + } else + throw vbb(a); + } + } + function Vqd(a, b, c) { + var d, e, f, g, h, i; + d = null; + h = k4c(n4c(), b); + f = null; + if (h) { + e = null; + i = o5c(h, c); + g = null; + i != null && (g = a.Ye(h, i)); + e = g; + f = e; + } + d = f; + return d; + } + function TTd(a, b, c, d) { + var e, f, g; + e = new pSd(a.e, 1, 13, (g = b.c, g ? g : (jGd(), YFd)), (f = c.c, f ? f : (jGd(), YFd)), HLd(a, b), false); + !d ? d = e : d.Ei(e); + return d; + } + function UEd(a, b, c, d) { + var e; + e = a.length; + if (b >= e) + return e; + for (b = b > 0 ? b : 0; b < e; b++) { + if (_Ed((BCb(b, a.length), a.charCodeAt(b)), c, d)) + break; + } + return b; + } + function Qkb(a, b) { + var c, d; + d = a.c.length; + b.length < d && (b = eCb(new Array(d), b)); + for (c = 0; c < d; ++c) { + NC(b, c, a.c[c]); + } + b.length > d && NC(b, d, null); + return b; + } + function _lb(a, b) { + var c, d; + d = a.a.length; + b.length < d && (b = eCb(new Array(d), b)); + for (c = 0; c < d; ++c) { + NC(b, c, a.a[c]); + } + b.length > d && NC(b, d, null); + return b; + } + function Xrb(a, b, c) { + var d, e, f; + e = BD(Ohb(a.e, b), 387); + if (!e) { + d = new lsb(a, b, c); + Rhb(a.e, b, d); + isb(d); + return null; + } else { + f = ijb(e, c); + Yrb(a, e); + return f; + } + } + function P9d(a) { + var b; + if (a == null) + return null; + b = ide(Qge(a, true)); + if (b == null) { + throw vbb(new n8d("Invalid hexBinary value: '" + a + "'")); + } + return b; + } + function ghb(a) { + Hgb(); + if (ybb(a, 0) < 0) { + if (ybb(a, -1) != 0) { + return new Wgb(-1, Jbb(a)); + } + return Bgb; + } else + return ybb(a, 10) <= 0 ? Dgb[Tbb(a)] : new Wgb(1, a); + } + function wJb() { + qJb(); + return OC(GC(DN, 1), Kie, 159, 0, [nJb, mJb, oJb, eJb, dJb, fJb, iJb, hJb, gJb, lJb, kJb, jJb, bJb, aJb, cJb, $Ib, ZIb, _Ib, XIb, WIb, YIb, pJb]); + } + function vjc(a) { + var b; + this.d = new Rkb(); + this.j = new d7c(); + this.g = new d7c(); + b = a.g.b; + this.f = BD(vNb(Q_b(b), (Nyc(), Lwc)), 103); + this.e = Edb(ED(c_b(b, ryc))); + } + function Pjc(a) { + this.b = new Rkb(); + this.e = new Rkb(); + this.d = a; + this.a = !WAb(JAb(new YAb(null, new Lub(new b1b(a.b))), new Xxb(new Qjc()))).sd((EAb(), DAb)); + } + function N5c() { + N5c = ccb; + L5c = new O5c("PARENTS", 0); + K5c = new O5c("NODES", 1); + I5c = new O5c("EDGES", 2); + M5c = new O5c("PORTS", 3); + J5c = new O5c("LABELS", 4); + } + function Tbd() { + Tbd = ccb; + Qbd = new Ubd("DISTRIBUTED", 0); + Sbd = new Ubd("JUSTIFIED", 1); + Obd = new Ubd("BEGIN", 2); + Pbd = new Ubd(gle, 3); + Rbd = new Ubd("END", 4); + } + function UMd(a) { + var b; + b = a.yi(null); + switch (b) { + case 10: + return 0; + case 15: + return 1; + case 14: + return 2; + case 11: + return 3; + case 21: + return 4; + } + return -1; + } + function cYb(a) { + switch (a.g) { + case 1: + return ead(), dad; + case 4: + return ead(), aad; + case 2: + return ead(), bad; + case 3: + return ead(), _9c; + } + return ead(), cad; + } + function kA(a, b, c) { + var d; + d = c.q.getFullYear() - nje + nje; + d < 0 && (d = -d); + switch (b) { + case 1: + a.a += d; + break; + case 2: + EA(a, d % 100, 2); + break; + default: + EA(a, d, b); + } + } + function Jsb(a, b) { + var c, d; + wCb(b, a.b); + if (b >= a.b >> 1) { + d = a.c; + for (c = a.b; c > b; --c) { + d = d.b; + } + } else { + d = a.a.a; + for (c = 0; c < b; ++c) { + d = d.a; + } + } + return new $sb(a, b, d); + } + function MEb() { + MEb = ccb; + LEb = new NEb("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST", 0); + KEb = new NEb("CORNER_CASES_THAN_SINGLE_SIDE_LAST", 1); + } + function h4b(a) { + var b, c, d, e; + d = c4b(a); + Okb(d, a4b); + e = a.d; + e.c = KC(SI, Uhe, 1, 0, 5, 1); + for (c = new olb(d); c.a < c.c.c.length; ) { + b = BD(mlb(c), 456); + Gkb(e, b.b); + } + } + function gkd(a) { + var b, c, d; + d = (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), a.o); + for (c = d.c.Kc(); c.e != c.i.gc(); ) { + b = BD(c.nj(), 42); + b.dd(); + } + return FAd(d); + } + function N5b(a) { + var b; + if (!ecd(BD(vNb(a, (Nyc(), Vxc)), 98))) { + return; + } + b = a.b; + O5b((tCb(0, b.c.length), BD(b.c[0], 29))); + O5b(BD(Ikb(b, b.c.length - 1), 29)); + } + function Roc(a, b) { + var c, d, e, f; + c = 0; + for (e = new olb(b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + f = d.o.a + d.d.c + d.d.b + a.j; + c = $wnd.Math.max(c, f); + } + return c; + } + function XEd(a) { + var b, c, d, e; + e = 0; + for (c = 0, d = a.length; c < d; c++) { + b = (BCb(c, a.length), a.charCodeAt(c)); + b >= 64 && b < 128 && (e = Mbb(e, Nbb(1, b - 64))); + } + return e; + } + function c_b(a, b) { + var c, d; + d = null; + if (wNb(a, (Y9c(), O9c))) { + c = BD(vNb(a, O9c), 94); + c.Xe(b) && (d = c.We(b)); + } + d == null && !!Q_b(a) && (d = vNb(Q_b(a), b)); + return d; + } + function oQc(a, b) { + var c, d, e; + e = b.d.i; + d = e.k; + if (d == (j0b(), h0b) || d == d0b) { + return; + } + c = new Sr(ur(U_b(e).a.Kc(), new Sq())); + Qr(c) && Rhb(a.k, b, BD(Rr(c), 17)); + } + function mid(a, b) { + var c, d, e; + d = XKd(a.Tg(), b); + c = b - a.Ah(); + return c < 0 ? (e = a.Yg(d), e >= 0 ? a.lh(e) : tid(a, d)) : c < 0 ? tid(a, d) : BD(d, 66).Nj().Sj(a, a.yh(), c); + } + function Ksd(a) { + var b; + if (JD(a.a, 4)) { + b = fvd(a.a); + if (b == null) { + throw vbb(new Zdb(mse + a.b + "'. " + ise + (fdb(Y3), Y3.k) + jse)); + } + return b; + } else { + return a.a; + } + } + function L9d(a) { + var b; + if (a == null) + return null; + b = bde(Qge(a, true)); + if (b == null) { + throw vbb(new n8d("Invalid base64Binary value: '" + a + "'")); + } + return b; + } + function Dyd(b) { + var c; + try { + c = b.i.Xb(b.e); + b.mj(); + b.g = b.e++; + return c; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + b.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + } + function Zyd(b) { + var c; + try { + c = b.c.ki(b.e); + b.mj(); + b.g = b.e++; + return c; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + b.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + } + function CPb() { + CPb = ccb; + BPb = (Y9c(), K9c); + vPb = G8c; + qPb = r8c; + wPb = f9c; + zPb = (fFb(), bFb); + yPb = _Eb; + APb = dFb; + xPb = $Eb; + sPb = (nPb(), jPb); + rPb = iPb; + tPb = lPb; + uPb = mPb; + } + function NWb(a) { + LWb(); + this.c = new Rkb(); + this.d = a; + switch (a.g) { + case 0: + case 2: + this.a = tmb(KWb); + this.b = Pje; + break; + case 3: + case 1: + this.a = KWb; + this.b = Qje; + } + } + function ued(a, b, c) { + var d, e; + if (a.c) { + dld(a.c, a.c.i + b); + eld(a.c, a.c.j + c); + } else { + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + ued(d, b, c); + } + } + } + function KEd(a, b) { + var c, d; + if (a.j.length != b.j.length) + return false; + for (c = 0, d = a.j.length; c < d; c++) { + if (!dfb(a.j[c], b.j[c])) + return false; + } + return true; + } + function gA(a, b, c) { + var d; + if (b.a.length > 0) { + Ekb(a.b, new WA(b.a, c)); + d = b.a.length; + 0 < d ? b.a = b.a.substr(0, 0) : 0 > d && (b.a += yfb(KC(TD, $ie, 25, -d, 15, 1))); + } + } + function JKb(a, b) { + var c, d, e; + c = a.o; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.e.a = DKb(d, c.a); + d.e.b = c.b * Edb(ED(d.b.We(BKb))); + } + } + function S5b(a, b) { + var c, d, e, f; + e = a.k; + c = Edb(ED(vNb(a, (wtc(), htc)))); + f = b.k; + d = Edb(ED(vNb(b, htc))); + return f != (j0b(), e0b) ? -1 : e != e0b ? 1 : c == d ? 0 : c < d ? -1 : 1; + } + function B$c(a, b) { + var c, d; + c = BD(BD(Ohb(a.g, b.a), 46).a, 65); + d = BD(BD(Ohb(a.g, b.b), 46).a, 65); + return S6c(b.a, b.b) - S6c(b.a, E6c(c.b)) - S6c(b.b, E6c(d.b)); + } + function aZb(a, b) { + var c; + c = BD(vNb(a, (Nyc(), jxc)), 74); + if (Lq(b, ZYb)) { + if (!c) { + c = new s7c(); + yNb(a, jxc, c); + } else { + Osb(c); + } + } else + !!c && yNb(a, jxc, null); + return c; + } + function a0b(a) { + var b; + b = new Ufb(); + b.a += "n"; + a.k != (j0b(), h0b) && Qfb(Qfb((b.a += "(", b), Zr(a.k).toLowerCase()), ")"); + Qfb((b.a += "_", b), P_b(a)); + return b.a; + } + function Kdc(a, b) { + Odd(b, "Self-Loop post-processing", 1); + MAb(JAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new Qdc()), new Sdc()), new Udc()), new Wdc()); + Qdd(b); + } + function kid(a, b, c, d) { + var e; + if (c >= 0) { + return a.hh(b, c, d); + } else { + !!a.eh() && (d = (e = a.Vg(), e >= 0 ? a.Qg(d) : a.eh().ih(a, -1 - e, null, d))); + return a.Sg(b, c, d); + } + } + function zld(a, b) { + switch (b) { + case 7: + !a.e && (a.e = new y5d(B2, a, 7, 4)); + Uxd(a.e); + return; + case 8: + !a.d && (a.d = new y5d(B2, a, 8, 5)); + Uxd(a.d); + return; + } + $kd(a, b); + } + function Ut(b, c) { + var d; + d = b.Zc(c); + try { + return d.Pb(); + } catch (a) { + a = ubb(a); + if (JD(a, 109)) { + throw vbb(new qcb("Can't get element " + c)); + } else + throw vbb(a); + } + } + function Tgb(a, b) { + this.e = a; + if (b < Zje) { + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [b | 0]); + } else { + this.d = 2; + this.a = OC(GC(WD, 1), oje, 25, 15, [b % Zje | 0, b / Zje | 0]); + } + } + function omb(a, b) { + mmb(); + var c, d, e, f; + c = a; + f = b; + if (JD(a, 21) && !JD(b, 21)) { + c = b; + f = a; + } + for (e = c.Kc(); e.Ob(); ) { + d = e.Pb(); + if (f.Hc(d)) { + return false; + } + } + return true; + } + function Txd(a, b, c) { + var d, e, f, g; + d = a.Xc(b); + if (d != -1) { + if (a.ej()) { + f = a.fj(); + g = tud(a, d); + e = a.Zi(4, g, null, d, f); + !c ? c = e : c.Ei(e); + } else { + tud(a, d); + } + } + return c; + } + function uwd(a, b, c) { + var d, e, f, g; + d = a.Xc(b); + if (d != -1) { + if (a.ej()) { + f = a.fj(); + g = Evd(a, d); + e = a.Zi(4, g, null, d, f); + !c ? c = e : c.Ei(e); + } else { + Evd(a, d); + } + } + return c; + } + function PJb(a, b) { + var c; + c = BD(Mpb(a.b, b), 124).n; + switch (b.g) { + case 1: + a.t >= 0 && (c.d = a.t); + break; + case 3: + a.t >= 0 && (c.a = a.t); + } + if (a.C) { + c.b = a.C.b; + c.c = a.C.c; + } + } + function RMb() { + RMb = ccb; + OMb = new SMb(xle, 0); + NMb = new SMb(yle, 1); + PMb = new SMb(zle, 2); + QMb = new SMb(Ale, 3); + OMb.a = false; + NMb.a = true; + PMb.a = false; + QMb.a = true; + } + function ROb() { + ROb = ccb; + OOb = new SOb(xle, 0); + NOb = new SOb(yle, 1); + POb = new SOb(zle, 2); + QOb = new SOb(Ale, 3); + OOb.a = false; + NOb.a = true; + POb.a = false; + QOb.a = true; + } + function dac(a) { + var b; + b = a.a; + do { + b = BD(Rr(new Sr(ur(R_b(b).a.Kc(), new Sq()))), 17).c.i; + b.k == (j0b(), g0b) && a.b.Fc(b); + } while (b.k == (j0b(), g0b)); + a.b = Su(a.b); + } + function CDc(a) { + var b, c, d; + d = a.c.a; + a.p = (Qb(d), new Tkb(d)); + for (c = new olb(d); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + b.p = GDc(b).a; + } + mmb(); + Okb(a.p, new PDc()); + } + function eVc(a) { + var b, c, d, e; + d = 0; + e = gVc(a); + if (e.c.length == 0) { + return 1; + } else { + for (c = new olb(e); c.a < c.c.c.length; ) { + b = BD(mlb(c), 33); + d += eVc(b); + } + } + return d; + } + function JJb(a, b) { + var c, d, e; + e = 0; + d = BD(BD(Qc(a.r, b), 21), 84).Kc(); + while (d.Ob()) { + c = BD(d.Pb(), 111); + e += c.d.b + c.b.rf().a + c.d.c; + d.Ob() && (e += a.w); + } + return e; + } + function RKb(a, b) { + var c, d, e; + e = 0; + d = BD(BD(Qc(a.r, b), 21), 84).Kc(); + while (d.Ob()) { + c = BD(d.Pb(), 111); + e += c.d.d + c.b.rf().b + c.d.a; + d.Ob() && (e += a.w); + } + return e; + } + function SOc(a, b, c, d) { + if (b.a < d.a) { + return true; + } else if (b.a == d.a) { + if (b.b < d.b) { + return true; + } else if (b.b == d.b) { + if (a.b > c.b) { + return true; + } + } + } + return false; + } + function AD(a, b) { + if (ND(a)) { + return !!zD[b]; + } else if (a.hm) { + return !!a.hm[b]; + } else if (LD(a)) { + return !!yD[b]; + } else if (KD(a)) { + return !!xD[b]; + } + return false; + } + function jkd(a, b, c) { + c == null ? (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), LAd(a.o, b)) : (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), HAd(a.o, b, c)); + return a; + } + function jKb(a, b, c, d) { + var e, f; + f = b.Xe((Y9c(), W8c)) ? BD(b.We(W8c), 21) : a.j; + e = uJb(f); + if (e == (qJb(), pJb)) { + return; + } + if (c && !sJb(e)) { + return; + } + UHb(lKb(a, e, d), b); + } + function fid(a, b, c, d) { + var e, f, g; + f = XKd(a.Tg(), b); + e = b - a.Ah(); + return e < 0 ? (g = a.Yg(f), g >= 0 ? a._g(g, c, true) : sid(a, f, c)) : BD(f, 66).Nj().Pj(a, a.yh(), e, c, d); + } + function u6d(a, b, c, d) { + var e, f, g; + if (c.mh(b)) { + Q6d(); + if (YId(b)) { + e = BD(c.ah(b), 153); + x6d(a, e); + } else { + f = (g = b, !g ? null : BD(d, 49).xh(g)); + !!f && v6d(c.ah(b), f); + } + } + } + function H3b(a) { + switch (a.g) { + case 1: + return vLb(), uLb; + case 3: + return vLb(), rLb; + case 2: + return vLb(), tLb; + case 4: + return vLb(), sLb; + default: + return null; + } + } + function kCb(a) { + switch (typeof a) { + case Mhe: + return LCb(a); + case Lhe: + return QD(a); + case Khe: + return Bcb(), a ? 1231 : 1237; + default: + return a == null ? 0 : FCb(a); + } + } + function Gic(a, b, c) { + if (a.e) { + switch (a.b) { + case 1: + oic(a.c, b, c); + break; + case 0: + pic(a.c, b, c); + } + } else { + mic(a.c, b, c); + } + a.a[b.p][c.p] = a.c.i; + a.a[c.p][b.p] = a.c.e; + } + function lHc(a) { + var b, c; + if (a == null) { + return null; + } + c = KC(OQ, nie, 193, a.length, 0, 2); + for (b = 0; b < c.length; b++) { + c[b] = BD(ulb(a[b], a[b].length), 193); + } + return c; + } + function d4d(a) { + var b; + if (b4d(a)) { + a4d(a); + if (a.Lk()) { + b = b3d(a.e, a.b, a.c, a.a, a.j); + a.j = b; + } + a.g = a.a; + ++a.a; + ++a.c; + a.i = 0; + return a.j; + } else { + throw vbb(new utb()); + } + } + function fMb(a, b) { + var c, d, e, f; + f = a.o; + c = a.p; + f < c ? f *= f : c *= c; + d = f + c; + f = b.o; + c = b.p; + f < c ? f *= f : c *= c; + e = f + c; + if (d < e) { + return -1; + } + if (d == e) { + return 0; + } + return 1; + } + function HLd(a, b) { + var c, d, e; + e = rud(a, b); + if (e >= 0) + return e; + if (a.Fk()) { + for (d = 0; d < a.i; ++d) { + c = a.Gk(BD(a.g[d], 56)); + if (PD(c) === PD(b)) { + return d; + } + } + } + return -1; + } + function Gtd(a, b, c) { + var d, e; + e = a.gc(); + if (b >= e) + throw vbb(new Cyd(b, e)); + if (a.hi()) { + d = a.Xc(c); + if (d >= 0 && d != b) { + throw vbb(new Wdb(kue)); + } + } + return a.mi(b, c); + } + function gx(a, b) { + this.a = BD(Qb(a), 245); + this.b = BD(Qb(b), 245); + if (a.vd(b) > 0 || a == (Lk(), Kk) || b == (_k(), $k)) { + throw vbb(new Wdb("Invalid range: " + nx(a, b))); + } + } + function mYb(a) { + var b, c; + this.b = new Rkb(); + this.c = a; + this.a = false; + for (c = new olb(a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + this.a = this.a | b.k == (j0b(), h0b); + } + } + function GFb(a, b) { + var c, d, e; + c = nGb(new pGb(), a); + for (e = new olb(b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 0), c), d)); + } + return c; + } + function Nac(a, b, c) { + var d, e, f; + for (e = new Sr(ur((b ? R_b(a) : U_b(a)).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + f = b ? d.c.i : d.d.i; + f.k == (j0b(), f0b) && $_b(f, c); + } + } + function Izc() { + Izc = ccb; + Gzc = new Kzc(ane, 0); + Hzc = new Kzc("PORT_POSITION", 1); + Fzc = new Kzc("NODE_SIZE_WHERE_SPACE_PERMITS", 2); + Ezc = new Kzc("NODE_SIZE", 3); + } + function F7c() { + F7c = ccb; + z7c = new G7c("AUTOMATIC", 0); + C7c = new G7c(jle, 1); + D7c = new G7c(kle, 2); + E7c = new G7c("TOP", 3); + A7c = new G7c(mle, 4); + B7c = new G7c(gle, 5); + } + function Hhb(a, b, c, d) { + Dhb(); + var e, f; + e = 0; + for (f = 0; f < c; f++) { + e = wbb(Ibb(xbb(b[f], Yje), xbb(d, Yje)), xbb(Tbb(e), Yje)); + a[f] = Tbb(e); + e = Pbb(e, 32); + } + return Tbb(e); + } + function zHb(a, b, c) { + var d, e; + e = 0; + for (d = 0; d < rHb; d++) { + e = $wnd.Math.max(e, pHb(a.a[b.g][d], c)); + } + b == (gHb(), eHb) && !!a.b && (e = $wnd.Math.max(e, a.b.b)); + return e; + } + function Bub(a, b) { + var c, d; + lCb(b > 0); + if ((b & -b) == b) { + return QD(b * Cub(a, 31) * 4656612873077393e-25); + } + do { + c = Cub(a, 31); + d = c % b; + } while (c - d + (b - 1) < 0); + return QD(d); + } + function LCb(a) { + JCb(); + var b, c, d; + c = ":" + a; + d = ICb[c]; + if (d != null) { + return QD((uCb(d), d)); + } + d = GCb[c]; + b = d == null ? KCb(a) : QD((uCb(d), d)); + MCb(); + ICb[c] = b; + return b; + } + function qZb(a, b, c) { + Odd(c, "Compound graph preprocessor", 1); + a.a = new Hp(); + vZb(a, b, null); + pZb(a, b); + uZb(a); + yNb(b, (wtc(), zsc), a.a); + a.a = null; + Uhb(a.b); + Qdd(c); + } + function X$b(a, b, c) { + switch (c.g) { + case 1: + a.a = b.a / 2; + a.b = 0; + break; + case 2: + a.a = b.a; + a.b = b.b / 2; + break; + case 3: + a.a = b.a / 2; + a.b = b.b; + break; + case 4: + a.a = 0; + a.b = b.b / 2; + } + } + function tkc(a) { + var b, c, d; + for (d = BD(Qc(a.a, (Xjc(), Vjc)), 15).Kc(); d.Ob(); ) { + c = BD(d.Pb(), 101); + b = Bkc(c); + kkc(a, c, b[0], (Fkc(), Ckc), 0); + kkc(a, c, b[1], Ekc, 1); + } + } + function ukc(a) { + var b, c, d; + for (d = BD(Qc(a.a, (Xjc(), Wjc)), 15).Kc(); d.Ob(); ) { + c = BD(d.Pb(), 101); + b = Bkc(c); + kkc(a, c, b[0], (Fkc(), Ckc), 0); + kkc(a, c, b[1], Ekc, 1); + } + } + function tXc(a) { + switch (a.g) { + case 0: + return null; + case 1: + return new $Xc(); + case 2: + return new QXc(); + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function OZc(a, b, c) { + var d, e; + FZc(a, b - a.s, c - a.t); + for (e = new olb(a.n); e.a < e.c.c.length; ) { + d = BD(mlb(e), 211); + SZc(d, d.e + b - a.s); + TZc(d, d.f + c - a.t); + } + a.s = b; + a.t = c; + } + function JFb(a) { + var b, c, d, e, f; + c = 0; + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + d.d = c++; + } + b = IFb(a); + f = null; + b.c.length > 1 && (f = GFb(a, b)); + return f; + } + function dmd(a) { + var b; + if (!!a.f && a.f.kh()) { + b = BD(a.f, 49); + a.f = BD(xid(a, b), 82); + a.f != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 8, b, a.f)); + } + return a.f; + } + function emd(a) { + var b; + if (!!a.i && a.i.kh()) { + b = BD(a.i, 49); + a.i = BD(xid(a, b), 82); + a.i != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 7, b, a.i)); + } + return a.i; + } + function zUd(a) { + var b; + if (!!a.b && (a.b.Db & 64) != 0) { + b = a.b; + a.b = BD(xid(a, b), 18); + a.b != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 21, b, a.b)); + } + return a.b; + } + function uAd(a, b) { + var c, d, e; + if (a.d == null) { + ++a.e; + ++a.f; + } else { + d = b.Sh(); + BAd(a, a.f + 1); + e = (d & Ohe) % a.d.length; + c = a.d[e]; + !c && (c = a.d[e] = a.uj()); + c.Fc(b); + ++a.f; + } + } + function m3d(a, b, c) { + var d; + if (b.Kj()) { + return false; + } else if (b.Zj() != -2) { + d = b.zj(); + return d == null ? c == null : pb(d, c); + } else + return b.Hj() == a.e.Tg() && c == null; + } + function wo() { + var a; + Xj(16, Hie); + a = Kp(16); + this.b = KC(GF, Gie, 317, a, 0, 1); + this.c = KC(GF, Gie, 317, a, 0, 1); + this.a = null; + this.e = null; + this.i = 0; + this.f = a - 1; + this.g = 0; + } + function b0b(a) { + n_b.call(this); + this.k = (j0b(), h0b); + this.j = (Xj(6, Jie), new Skb(6)); + this.b = (Xj(2, Jie), new Skb(2)); + this.d = new L_b(); + this.f = new s0b(); + this.a = a; + } + function Scc(a) { + var b, c; + if (a.c.length <= 1) { + return; + } + b = Pcc(a, (Ucd(), Rcd)); + Rcc(a, BD(b.a, 19).a, BD(b.b, 19).a); + c = Pcc(a, Tcd); + Rcc(a, BD(c.a, 19).a, BD(c.b, 19).a); + } + function Vzc() { + Vzc = ccb; + Uzc = new Xzc("SIMPLE", 0); + Rzc = new Xzc(Tne, 1); + Szc = new Xzc("LINEAR_SEGMENTS", 2); + Qzc = new Xzc("BRANDES_KOEPF", 3); + Tzc = new Xzc(Aqe, 4); + } + function XDc(a, b, c) { + if (!ecd(BD(vNb(b, (Nyc(), Vxc)), 98))) { + WDc(a, b, Y_b(b, c)); + WDc(a, b, Y_b(b, (Ucd(), Rcd))); + WDc(a, b, Y_b(b, Acd)); + mmb(); + Okb(b.j, new jEc(a)); + } + } + function HVc(a, b, c, d) { + var e, f, g; + e = d ? BD(Qc(a.a, b), 21) : BD(Qc(a.b, b), 21); + for (g = e.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 33); + if (BVc(a, c, f)) { + return true; + } + } + return false; + } + function FMd(a) { + var b, c; + for (c = new Fyd(a); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 87); + if (!!b.e || (!b.d && (b.d = new xMd(j5, b, 1)), b.d).i != 0) { + return true; + } + } + return false; + } + function QTd(a) { + var b, c; + for (c = new Fyd(a); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 87); + if (!!b.e || (!b.d && (b.d = new xMd(j5, b, 1)), b.d).i != 0) { + return true; + } + } + return false; + } + function FDc(a) { + var b, c, d; + b = 0; + for (d = new olb(a.c.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + b += sr(new Sr(ur(U_b(c).a.Kc(), new Sq()))); + } + return b / a.c.a.c.length; + } + function UPc(a) { + var b, c; + a.c || XPc(a); + c = new s7c(); + b = new olb(a.a); + mlb(b); + while (b.a < b.c.c.length) { + Dsb(c, BD(mlb(b), 407).a); + } + sCb(c.b != 0); + Nsb(c, c.c.b); + return c; + } + function J0c() { + J0c = ccb; + I0c = (A0c(), z0c); + G0c = new q0b(8); + new Osd((Y9c(), f9c), G0c); + new Osd(T9c, 8); + H0c = x0c; + E0c = n0c; + F0c = o0c; + D0c = new Osd(y8c, (Bcb(), false)); + } + function uld(a, b, c, d) { + switch (b) { + case 7: + return !a.e && (a.e = new y5d(B2, a, 7, 4)), a.e; + case 8: + return !a.d && (a.d = new y5d(B2, a, 8, 5)), a.d; + } + return Xkd(a, b, c, d); + } + function JQd(a) { + var b; + if (!!a.a && a.a.kh()) { + b = BD(a.a, 49); + a.a = BD(xid(a, b), 138); + a.a != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 5, b, a.a)); + } + return a.a; + } + function yde(a) { + if (a < 48) + return -1; + if (a > 102) + return -1; + if (a <= 57) + return a - 48; + if (a < 65) + return -1; + if (a <= 70) + return a - 65 + 10; + if (a < 97) + return -1; + return a - 97 + 10; + } + function Wj(a, b) { + if (a == null) { + throw vbb(new Heb("null key in entry: null=" + b)); + } else if (b == null) { + throw vbb(new Heb("null value in entry: " + a + "=null")); + } + } + function kr(a, b) { + var c, d; + while (a.Ob()) { + if (!b.Ob()) { + return false; + } + c = a.Pb(); + d = b.Pb(); + if (!(PD(c) === PD(d) || c != null && pb(c, d))) { + return false; + } + } + return !b.Ob(); + } + function jIb(a, b) { + var c; + c = OC(GC(UD, 1), Vje, 25, 15, [pHb(a.a[0], b), pHb(a.a[1], b), pHb(a.a[2], b)]); + if (a.d) { + c[0] = $wnd.Math.max(c[0], c[2]); + c[2] = c[0]; + } + return c; + } + function kIb(a, b) { + var c; + c = OC(GC(UD, 1), Vje, 25, 15, [qHb(a.a[0], b), qHb(a.a[1], b), qHb(a.a[2], b)]); + if (a.d) { + c[0] = $wnd.Math.max(c[0], c[2]); + c[2] = c[0]; + } + return c; + } + function mqc() { + mqc = ccb; + iqc = new oqc("GREEDY", 0); + hqc = new oqc(Une, 1); + kqc = new oqc(Tne, 2); + lqc = new oqc("MODEL_ORDER", 3); + jqc = new oqc("GREEDY_MODEL_ORDER", 4); + } + function iUc(a, b) { + var c, d, e; + a.b[b.g] = 1; + for (d = Jsb(b.d, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 188); + e = c.c; + a.b[e.g] == 1 ? Dsb(a.a, c) : a.b[e.g] == 2 ? a.b[e.g] = 1 : iUc(a, e); + } + } + function V9b(a, b) { + var c, d, e; + e = new Skb(b.gc()); + for (d = b.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 286); + c.c == c.f ? K9b(a, c, c.c) : L9b(a, c) || (e.c[e.c.length] = c, true); + } + return e; + } + function IZc(a, b, c) { + var d, e, f, g, h; + h = a.r + b; + a.r += b; + a.d += c; + d = c / a.n.c.length; + e = 0; + for (g = new olb(a.n); g.a < g.c.c.length; ) { + f = BD(mlb(g), 211); + RZc(f, h, d, e); + ++e; + } + } + function tEb(a) { + var b, c, d; + zwb(a.b.a); + a.a = KC(PM, Uhe, 57, a.c.c.a.b.c.length, 0, 1); + b = 0; + for (d = new olb(a.c.c.a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 57); + c.f = b++; + } + } + function RVb(a) { + var b, c, d; + zwb(a.b.a); + a.a = KC(IP, Uhe, 81, a.c.a.a.b.c.length, 0, 1); + b = 0; + for (d = new olb(a.c.a.a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 81); + c.i = b++; + } + } + function P1c(a, b, c) { + var d; + Odd(c, "Shrinking tree compaction", 1); + if (Ccb(DD(vNb(b, (XNb(), VNb))))) { + N1c(a, b.f); + INb(b.f, (d = b.c, d)); + } else { + INb(b.f, b.c); + } + Qdd(c); + } + function mr(a) { + var b; + b = gr(a); + if (!Qr(a)) { + throw vbb(new qcb("position (0) must be less than the number of elements that remained (" + b + ")")); + } + return Rr(a); + } + function hNb(b, c, d) { + var e; + try { + return YMb(b, c + b.j, d + b.k); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c + She + d + ").")); + } else + throw vbb(a); + } + } + function iNb(b, c, d) { + var e; + try { + return ZMb(b, c + b.j, d + b.k); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c + She + d + ").")); + } else + throw vbb(a); + } + } + function jNb(b, c, d) { + var e; + try { + return $Mb(b, c + b.j, d + b.k); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c + She + d + ").")); + } else + throw vbb(a); + } + } + function s5b(a) { + switch (a.g) { + case 1: + return Ucd(), Tcd; + case 4: + return Ucd(), Acd; + case 3: + return Ucd(), zcd; + case 2: + return Ucd(), Rcd; + default: + return Ucd(), Scd; + } + } + function cjc(a, b, c) { + if (b.k == (j0b(), h0b) && c.k == g0b) { + a.d = _ic(b, (Ucd(), Rcd)); + a.b = _ic(b, Acd); + } + if (c.k == h0b && b.k == g0b) { + a.d = _ic(c, (Ucd(), Acd)); + a.b = _ic(c, Rcd); + } + } + function gjc(a, b) { + var c, d, e; + e = V_b(a, b); + for (d = e.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 11); + if (vNb(c, (wtc(), gtc)) != null || a1b(new b1b(c.b))) { + return true; + } + } + return false; + } + function QZc(a, b) { + dld(b, a.e + a.d + (a.c.c.length == 0 ? 0 : a.b)); + eld(b, a.f); + a.a = $wnd.Math.max(a.a, b.f); + a.d += b.g + (a.c.c.length == 0 ? 0 : a.b); + Ekb(a.c, b); + return true; + } + function XZc(a, b, c) { + var d, e, f, g; + g = 0; + d = c / a.a.c.length; + for (f = new olb(a.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 187); + OZc(e, e.s, e.t + g * d); + IZc(e, a.d - e.r + b, d); + ++g; + } + } + function H4b(a) { + var b, c, d, e, f; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + b = 0; + for (f = new olb(c.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + e.p = b++; + } + } + } + function r6c(a, b) { + var c, d, e, f, g, h; + e = b.length - 1; + g = 0; + h = 0; + for (d = 0; d <= e; d++) { + f = b[d]; + c = k6c(e, d) * x6c(1 - a, e - d) * x6c(a, d); + g += f.a * c; + h += f.b * c; + } + return new f7c(g, h); + } + function jud(a, b) { + var c, d, e, f, g; + c = b.gc(); + a.qi(a.i + c); + f = b.Kc(); + g = a.i; + a.i += c; + for (d = g; d < a.i; ++d) { + e = f.Pb(); + mud(a, d, a.oi(d, e)); + a.bi(d, e); + a.ci(); + } + return c != 0; + } + function twd(a, b, c) { + var d, e, f; + if (a.ej()) { + d = a.Vi(); + f = a.fj(); + ++a.j; + a.Hi(d, a.oi(d, b)); + e = a.Zi(3, null, b, d, f); + !c ? c = e : c.Ei(e); + } else { + Avd(a, a.Vi(), b); + } + return c; + } + function WOd(a, b, c) { + var d, e, f; + d = BD(qud(VKd(a.a), b), 87); + f = (e = d.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)); + ((f.Db & 64) != 0 ? xid(a.b, f) : f) == c ? KQd(d) : NQd(d, c); + return f; + } + function Ewb(a, b, c, d, e, f, g, h) { + var i, j; + if (!d) { + return; + } + i = d.a[0]; + !!i && Ewb(a, b, c, i, e, f, g, h); + Fwb(a, c, d.d, e, f, g, h) && b.Fc(d); + j = d.a[1]; + !!j && Ewb(a, b, c, j, e, f, g, h); + } + function eAb(a, b) { + var c; + if (!a.a) { + c = KC(UD, Vje, 25, 0, 15, 1); + _ub(a.b.a, new iAb(c)); + c.sort(dcb(Ylb.prototype.te, Ylb, [])); + a.a = new Avb(c, a.d); + } + return pvb(a.a, b); + } + function YMb(b, c, d) { + try { + return Bbb(_Mb(b, c, d), 1); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c + She + d + Fle)); + } else + throw vbb(a); + } + } + function ZMb(b, c, d) { + try { + return Bbb(_Mb(b, c, d), 0); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c + She + d + Fle)); + } else + throw vbb(a); + } + } + function $Mb(b, c, d) { + try { + return Bbb(_Mb(b, c, d), 2); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c + She + d + Fle)); + } else + throw vbb(a); + } + } + function Nyd(b, c) { + if (b.g == -1) { + throw vbb(new Ydb()); + } + b.mj(); + try { + b.d._c(b.g, c); + b.f = b.d.j; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + } + function rJc(a, b, c) { + Odd(c, "Linear segments node placement", 1); + a.b = BD(vNb(b, (wtc(), otc)), 304); + sJc(a, b); + nJc(a, b); + kJc(a, b); + qJc(a); + a.a = null; + a.b = null; + Qdd(c); + } + function Ee(a, b) { + var c, d, e, f; + f = a.gc(); + b.length < f && (b = eCb(new Array(f), b)); + e = b; + d = a.Kc(); + for (c = 0; c < f; ++c) { + NC(e, c, d.Pb()); + } + b.length > f && NC(b, f, null); + return b; + } + function Lu(a, b) { + var c, d; + d = a.gc(); + if (b == null) { + for (c = 0; c < d; c++) { + if (a.Xb(c) == null) { + return c; + } + } + } else { + for (c = 0; c < d; c++) { + if (pb(b, a.Xb(c))) { + return c; + } + } + } + return -1; + } + function Jd(a, b) { + var c, d, e; + c = b.cd(); + e = b.dd(); + d = a.xc(c); + if (!(PD(e) === PD(d) || e != null && pb(e, d))) { + return false; + } + if (d == null && !a._b(c)) { + return false; + } + return true; + } + function YC(a, b) { + var c, d, e; + if (b <= 22) { + c = a.l & (1 << b) - 1; + d = e = 0; + } else if (b <= 44) { + c = a.l; + d = a.m & (1 << b - 22) - 1; + e = 0; + } else { + c = a.l; + d = a.m; + e = a.h & (1 << b - 44) - 1; + } + return TC(c, d, e); + } + function yKb(a, b) { + switch (b.g) { + case 1: + return a.f.n.d + a.t; + case 3: + return a.f.n.a + a.t; + case 2: + return a.f.n.c + a.s; + case 4: + return a.f.n.b + a.s; + default: + return 0; + } + } + function aLb(a, b) { + var c, d; + d = b.c; + c = b.a; + switch (a.b.g) { + case 0: + c.d = a.e - d.a - d.d; + break; + case 1: + c.d += a.e; + break; + case 2: + c.c = a.e - d.a - d.d; + break; + case 3: + c.c = a.e + d.d; + } + } + function ZOb(a, b, c, d) { + var e, f; + this.a = b; + this.c = d; + e = a.a; + YOb(this, new f7c(-e.c, -e.d)); + P6c(this.b, c); + f = d / 2; + b.a ? b7c(this.b, 0, f) : b7c(this.b, f, 0); + Ekb(a.c, this); + } + function iXc() { + iXc = ccb; + hXc = new kXc(ane, 0); + fXc = new kXc(Vne, 1); + gXc = new kXc("EDGE_LENGTH_BY_POSITION", 2); + eXc = new kXc("CROSSING_MINIMIZATION_BY_POSITION", 3); + } + function Wqd(a, b) { + var c, d; + c = BD(oo(a.g, b), 33); + if (c) { + return c; + } + d = BD(oo(a.j, b), 118); + if (d) { + return d; + } + throw vbb(new cqd("Referenced shape does not exist: " + b)); + } + function rTb(a, b) { + if (a.c == b) { + return a.d; + } else if (a.d == b) { + return a.c; + } else { + throw vbb(new Wdb("Node 'one' must be either source or target of edge 'edge'.")); + } + } + function TMc(a, b) { + if (a.c.i == b) { + return a.d.i; + } else if (a.d.i == b) { + return a.c.i; + } else { + throw vbb(new Wdb("Node " + b + " is neither source nor target of edge " + a)); + } + } + function _lc(a, b) { + var c; + switch (b.g) { + case 2: + case 4: + c = a.a; + a.c.d.n.b < c.d.n.b && (c = a.c); + amc(a, b, (Ajc(), zjc), c); + break; + case 1: + case 3: + amc(a, b, (Ajc(), wjc), null); + } + } + function smc(a, b, c, d, e, f) { + var g, h, i, j, k; + g = qmc(b, c, f); + h = c == (Ucd(), Acd) || c == Tcd ? -1 : 1; + j = a[c.g]; + for (k = 0; k < j.length; k++) { + i = j[k]; + i > 0 && (i += e); + j[k] = g; + g += h * (i + d); + } + } + function Uoc(a) { + var b, c, d; + d = a.f; + a.n = KC(UD, Vje, 25, d, 15, 1); + a.d = KC(UD, Vje, 25, d, 15, 1); + for (b = 0; b < d; b++) { + c = BD(Ikb(a.c.b, b), 29); + a.n[b] = Roc(a, c); + a.d[b] = Qoc(a, c); + } + } + function zjd(a, b) { + var c, d, e; + e = 0; + for (d = 2; d < b; d <<= 1) { + (a.Db & d) != 0 && ++e; + } + if (e == 0) { + for (c = b <<= 1; c <= 128; c <<= 1) { + if ((a.Db & c) != 0) { + return 0; + } + } + return -1; + } else { + return e; + } + } + function s3d(a, b) { + var c, d, e, f, g; + g = S6d(a.e.Tg(), b); + f = null; + c = BD(a.g, 119); + for (e = 0; e < a.i; ++e) { + d = c[e]; + if (g.rl(d.ak())) { + !f && (f = new yud()); + wtd(f, d); + } + } + !!f && Yxd(a, f); + } + function H9d(a) { + var b, c, d; + if (!a) + return null; + if (a.dc()) + return ""; + d = new Hfb(); + for (c = a.Kc(); c.Ob(); ) { + b = c.Pb(); + Efb(d, GD(b)); + d.a += " "; + } + return lcb(d, d.a.length - 1); + } + function Ty(a, b, c) { + var d, e, f, g, h; + Uy(a); + for (e = (a.k == null && (a.k = KC(_I, nie, 78, 0, 0, 1)), a.k), f = 0, g = e.length; f < g; ++f) { + d = e[f]; + Ty(d); + } + h = a.f; + !!h && Ty(h); + } + function LC(a, b) { + var c = new Array(b); + var d; + switch (a) { + case 14: + case 15: + d = 0; + break; + case 16: + d = false; + break; + default: + return c; + } + for (var e = 0; e < b; ++e) { + c[e] = d; + } + return c; + } + function PDb(a) { + var b, c, d; + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + b.c.$b(); + } + fad(a.d) ? d = a.a.c : d = a.a.d; + Hkb(d, new dEb(a)); + a.c.Me(a); + QDb(a); + } + function sRb(a) { + var b, c, d, e; + for (c = new olb(a.e.c); c.a < c.c.c.length; ) { + b = BD(mlb(c), 282); + for (e = new olb(b.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 447); + lRb(d); + } + cRb(b); + } + } + function a$c(a) { + var b, c, d, e, f; + d = 0; + f = 0; + e = 0; + for (c = new olb(a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 187); + f = $wnd.Math.max(f, b.r); + d += b.d + (e > 0 ? a.c : 0); + ++e; + } + a.b = d; + a.d = f; + } + function BZc(a, b) { + var c, d, e, f, g; + d = 0; + e = 0; + c = 0; + for (g = new olb(b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 200); + d = $wnd.Math.max(d, f.e); + e += f.b + (c > 0 ? a.g : 0); + ++c; + } + a.c = e; + a.d = d; + } + function AHb(a, b) { + var c; + c = OC(GC(UD, 1), Vje, 25, 15, [zHb(a, (gHb(), dHb), b), zHb(a, eHb, b), zHb(a, fHb, b)]); + if (a.f) { + c[0] = $wnd.Math.max(c[0], c[2]); + c[2] = c[0]; + } + return c; + } + function lNb(b, c, d) { + var e; + try { + aNb(b, c + b.j, d + b.k, false, true); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c + She + d + ").")); + } else + throw vbb(a); + } + } + function mNb(b, c, d) { + var e; + try { + aNb(b, c + b.j, d + b.k, true, false); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c + She + d + ").")); + } else + throw vbb(a); + } + } + function d5b(a) { + var b; + if (!wNb(a, (Nyc(), xxc))) { + return; + } + b = BD(vNb(a, xxc), 21); + if (b.Hc((Hbd(), zbd))) { + b.Mc(zbd); + b.Fc(Bbd); + } else if (b.Hc(Bbd)) { + b.Mc(Bbd); + b.Fc(zbd); + } + } + function e5b(a) { + var b; + if (!wNb(a, (Nyc(), xxc))) { + return; + } + b = BD(vNb(a, xxc), 21); + if (b.Hc((Hbd(), Gbd))) { + b.Mc(Gbd); + b.Fc(Ebd); + } else if (b.Hc(Ebd)) { + b.Mc(Ebd); + b.Fc(Gbd); + } + } + function udc(a, b, c) { + Odd(c, "Self-Loop ordering", 1); + MAb(NAb(JAb(JAb(LAb(new YAb(null, new Kub(b.b, 16)), new ydc()), new Adc()), new Cdc()), new Edc()), new Gdc(a)); + Qdd(c); + } + function ikc(a, b, c, d) { + var e, f; + for (e = b; e < a.c.length; e++) { + f = (tCb(e, a.c.length), BD(a.c[e], 11)); + if (c.Mb(f)) { + d.c[d.c.length] = f; + } else { + return e; + } + } + return a.c.length; + } + function Kmc(a, b, c, d) { + var e, f, g, h; + a.a == null && Nmc(a, b); + g = b.b.j.c.length; + f = c.d.p; + h = d.d.p; + e = h - 1; + e < 0 && (e = g - 1); + return f <= e ? a.a[e] - a.a[f] : a.a[g - 1] - a.a[f] + a.a[e]; + } + function ehd(a) { + var b, c; + if (!a.b) { + a.b = Qu(BD(a.f, 33).Ag().i); + for (c = new Fyd(BD(a.f, 33).Ag()); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 137); + Ekb(a.b, new dhd(b)); + } + } + return a.b; + } + function fhd(a) { + var b, c; + if (!a.e) { + a.e = Qu(Yod(BD(a.f, 33)).i); + for (c = new Fyd(Yod(BD(a.f, 33))); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 118); + Ekb(a.e, new thd(b)); + } + } + return a.e; + } + function ahd(a) { + var b, c; + if (!a.a) { + a.a = Qu(Vod(BD(a.f, 33)).i); + for (c = new Fyd(Vod(BD(a.f, 33))); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 33); + Ekb(a.a, new hhd(a, b)); + } + } + return a.a; + } + function dKd(b) { + var c; + if (!b.C && (b.D != null || b.B != null)) { + c = eKd(b); + if (c) { + b.yk(c); + } else { + try { + b.yk(null); + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } + } + return b.C; + } + function GJb(a) { + switch (a.q.g) { + case 5: + DJb(a, (Ucd(), Acd)); + DJb(a, Rcd); + break; + case 4: + EJb(a, (Ucd(), Acd)); + EJb(a, Rcd); + break; + default: + FJb(a, (Ucd(), Acd)); + FJb(a, Rcd); + } + } + function PKb(a) { + switch (a.q.g) { + case 5: + MKb(a, (Ucd(), zcd)); + MKb(a, Tcd); + break; + case 4: + NKb(a, (Ucd(), zcd)); + NKb(a, Tcd); + break; + default: + OKb(a, (Ucd(), zcd)); + OKb(a, Tcd); + } + } + function EXb(a, b) { + var c, d, e; + e = new d7c(); + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 37); + uXb(c, e.a, 0); + e.a += c.f.a + b; + e.b = $wnd.Math.max(e.b, c.f.b); + } + e.b > 0 && (e.b += b); + return e; + } + function GXb(a, b) { + var c, d, e; + e = new d7c(); + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 37); + uXb(c, 0, e.b); + e.b += c.f.b + b; + e.a = $wnd.Math.max(e.a, c.f.a); + } + e.a > 0 && (e.a += b); + return e; + } + function d_b(a) { + var b, c, d; + d = Ohe; + for (c = new olb(a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + wNb(b, (wtc(), Zsc)) && (d = $wnd.Math.min(d, BD(vNb(b, Zsc), 19).a)); + } + return d; + } + function pHc(a, b) { + var c, d; + if (b.length == 0) { + return 0; + } + c = NHc(a.a, b[0], (Ucd(), Tcd)); + c += NHc(a.a, b[b.length - 1], zcd); + for (d = 0; d < b.length; d++) { + c += qHc(a, d, b); + } + return c; + } + function vQc() { + hQc(); + this.c = new Rkb(); + this.i = new Rkb(); + this.e = new zsb(); + this.f = new zsb(); + this.g = new zsb(); + this.j = new Rkb(); + this.a = new Rkb(); + this.b = new Lqb(); + this.k = new Lqb(); + } + function aKd(a, b) { + var c, d; + if (a.Db >> 16 == 6) { + return a.Cb.ih(a, 5, o5, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? a.zh() : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Wz(a) { + Rz(); + var b = a.e; + if (b && b.stack) { + var c = b.stack; + var d = b + "\n"; + c.substring(0, d.length) == d && (c = c.substring(d.length)); + return c.split("\n"); + } + return []; + } + function jeb(a) { + var b; + b = (qeb(), peb); + return b[a >>> 28] | b[a >> 24 & 15] << 4 | b[a >> 20 & 15] << 8 | b[a >> 16 & 15] << 12 | b[a >> 12 & 15] << 16 | b[a >> 8 & 15] << 20 | b[a >> 4 & 15] << 24 | b[a & 15] << 28; + } + function _jb(a) { + var b, c, d; + if (a.b != a.c) { + return; + } + d = a.a.length; + c = geb($wnd.Math.max(8, d)) << 1; + if (a.b != 0) { + b = _Bb(a.a, c); + $jb(a, b, d); + a.a = b; + a.b = 0; + } else { + dCb(a.a, c); + } + a.c = d; + } + function DKb(a, b) { + var c; + c = a.b; + return c.Xe((Y9c(), s9c)) ? c.Hf() == (Ucd(), Tcd) ? -c.rf().a - Edb(ED(c.We(s9c))) : b + Edb(ED(c.We(s9c))) : c.Hf() == (Ucd(), Tcd) ? -c.rf().a : b; + } + function P_b(a) { + var b; + if (a.b.c.length != 0 && !!BD(Ikb(a.b, 0), 70).a) { + return BD(Ikb(a.b, 0), 70).a; + } + b = JZb(a); + if (b != null) { + return b; + } + return "" + (!a.c ? -1 : Jkb(a.c.a, a, 0)); + } + function C0b(a) { + var b; + if (a.f.c.length != 0 && !!BD(Ikb(a.f, 0), 70).a) { + return BD(Ikb(a.f, 0), 70).a; + } + b = JZb(a); + if (b != null) { + return b; + } + return "" + (!a.i ? -1 : Jkb(a.i.j, a, 0)); + } + function Ogc(a, b) { + var c, d; + if (b < 0 || b >= a.gc()) { + return null; + } + for (c = b; c < a.gc(); ++c) { + d = BD(a.Xb(c), 128); + if (c == a.gc() - 1 || !d.o) { + return new vgd(meb(c), d); + } + } + return null; + } + function uoc(a, b, c) { + var d, e, f, g, h; + f = a.c; + h = c ? b : a; + d = c ? a : b; + for (e = h.p + 1; e < d.p; ++e) { + g = BD(Ikb(f.a, e), 10); + if (!(g.k == (j0b(), d0b) || voc(g))) { + return false; + } + } + return true; + } + function u$c(a) { + var b, c, d, e, f; + f = 0; + e = Qje; + d = 0; + for (c = new olb(a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 187); + f += b.r + (d > 0 ? a.c : 0); + e = $wnd.Math.max(e, b.d); + ++d; + } + a.e = f; + a.b = e; + } + function shd(a) { + var b, c; + if (!a.b) { + a.b = Qu(BD(a.f, 118).Ag().i); + for (c = new Fyd(BD(a.f, 118).Ag()); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 137); + Ekb(a.b, new dhd(b)); + } + } + return a.b; + } + function Ctd(a, b) { + var c, d, e; + if (b.dc()) { + return LCd(), LCd(), KCd; + } else { + c = new zyd(a, b.gc()); + for (e = new Fyd(a); e.e != e.i.gc(); ) { + d = Dyd(e); + b.Hc(d) && wtd(c, d); + } + return c; + } + } + function bkd(a, b, c, d) { + if (b == 0) { + return d ? (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), a.o) : (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), FAd(a.o)); + } + return fid(a, b, c, d); + } + function Tnd(a) { + var b, c; + if (a.rb) { + for (b = 0, c = a.rb.i; b < c; ++b) { + Cmd(qud(a.rb, b)); + } + } + if (a.vb) { + for (b = 0, c = a.vb.i; b < c; ++b) { + Cmd(qud(a.vb, b)); + } + } + u1d((O6d(), M6d), a); + a.Bb |= 1; + } + function _nd(a, b, c, d, e, f, g, h, i, j, k, l, m, n) { + aod(a, b, d, null, e, f, g, h, i, j, m, true, n); + CUd(a, k); + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 2); + !!c && DUd(a, c); + EUd(a, l); + return a; + } + function jZd(b) { + var c, d; + if (b == null) { + return null; + } + d = 0; + try { + d = Icb(b, Rie, Ohe) & aje; + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + c = rfb(b); + d = c[0]; + } else + throw vbb(a); + } + return bdb(d); + } + function kZd(b) { + var c, d; + if (b == null) { + return null; + } + d = 0; + try { + d = Icb(b, Rie, Ohe) & aje; + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + c = rfb(b); + d = c[0]; + } else + throw vbb(a); + } + return bdb(d); + } + function bD(a, b) { + var c, d, e; + e = a.h - b.h; + if (e < 0) { + return false; + } + c = a.l - b.l; + d = a.m - b.m + (c >> 22); + e += d >> 22; + if (e < 0) { + return false; + } + a.l = c & Eje; + a.m = d & Eje; + a.h = e & Fje; + return true; + } + function Fwb(a, b, c, d, e, f, g) { + var h, i; + if (b.Ae() && (i = a.a.ue(c, d), i < 0 || !e && i == 0)) { + return false; + } + if (b.Be() && (h = a.a.ue(c, f), h > 0 || !g && h == 0)) { + return false; + } + return true; + } + function Vcc(a, b) { + Occ(); + var c; + c = a.j.g - b.j.g; + if (c != 0) { + return 0; + } + switch (a.j.g) { + case 2: + return Ycc(b, Ncc) - Ycc(a, Ncc); + case 4: + return Ycc(a, Mcc) - Ycc(b, Mcc); + } + return 0; + } + function Tqc(a) { + switch (a.g) { + case 0: + return Mqc; + case 1: + return Nqc; + case 2: + return Oqc; + case 3: + return Pqc; + case 4: + return Qqc; + case 5: + return Rqc; + default: + return null; + } + } + function End(a, b, c) { + var d, e; + d = (e = new rUd(), yId(e, b), pnd(e, c), wtd((!a.c && (a.c = new cUd(p5, a, 12, 10)), a.c), e), e); + AId(d, 0); + DId(d, 1); + CId(d, true); + BId(d, true); + return d; + } + function tud(a, b) { + var c, d; + if (b >= a.i) + throw vbb(new $zd(b, a.i)); + ++a.j; + c = a.g[b]; + d = a.i - b - 1; + d > 0 && $fb(a.g, b + 1, a.g, b, d); + NC(a.g, --a.i, null); + a.fi(b, c); + a.ci(); + return c; + } + function UId(a, b) { + var c, d; + if (a.Db >> 16 == 17) { + return a.Cb.ih(a, 21, c5, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? a.zh() : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function iDb(a) { + var b, c, d, e; + mmb(); + Okb(a.c, a.a); + for (e = new olb(a.c); e.a < e.c.c.length; ) { + d = mlb(e); + for (c = new olb(a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 679); + b.Ke(d); + } + } + } + function pXb(a) { + var b, c, d, e; + mmb(); + Okb(a.c, a.a); + for (e = new olb(a.c); e.a < e.c.c.length; ) { + d = mlb(e); + for (c = new olb(a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 369); + b.Ke(d); + } + } + } + function AGb(a) { + var b, c, d, e, f; + e = Ohe; + f = null; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c = BD(mlb(d), 213); + if (c.d.j ^ c.e.j) { + b = c.e.e - c.d.e - c.a; + if (b < e) { + e = b; + f = c; + } + } + } + return f; + } + function OSb() { + OSb = ccb; + MSb = new Nsd(Mme, (Bcb(), false)); + ISb = new Nsd(Nme, 100); + KSb = (yTb(), wTb); + JSb = new Nsd(Ome, KSb); + LSb = new Nsd(Pme, qme); + NSb = new Nsd(Qme, meb(Ohe)); + } + function ric(a, b, c) { + var d, e, f, g, h, i, j, k; + j = 0; + for (e = a.a[b], f = 0, g = e.length; f < g; ++f) { + d = e[f]; + k = CHc(d, c); + for (i = k.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 11); + Rhb(a.f, h, meb(j++)); + } + } + } + function uqd(a, b, c) { + var d, e, f, g; + if (c) { + e = c.a.length; + d = new Yge(e); + for (g = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); g.Ob(); ) { + f = BD(g.Pb(), 19); + Rc(a, b, Vpd(tB(c, f.a))); + } + } + } + function vqd(a, b, c) { + var d, e, f, g; + if (c) { + e = c.a.length; + d = new Yge(e); + for (g = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); g.Ob(); ) { + f = BD(g.Pb(), 19); + Rc(a, b, Vpd(tB(c, f.a))); + } + } + } + function Bkc(a) { + gkc(); + var b; + b = BD(Ee(Ec(a.k), KC(F1, bne, 61, 2, 0, 1)), 122); + Klb(b, 0, b.length, null); + if (b[0] == (Ucd(), Acd) && b[1] == Tcd) { + NC(b, 0, Tcd); + NC(b, 1, Acd); + } + return b; + } + function JHc(a, b, c) { + var d, e, f; + e = HHc(a, b, c); + f = KHc(a, e); + yHc(a.b); + cIc(a, b, c); + mmb(); + Okb(e, new hIc(a)); + d = KHc(a, e); + yHc(a.b); + cIc(a, c, b); + return new vgd(meb(f), meb(d)); + } + function jJc() { + jJc = ccb; + gJc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + hJc = new Msd("linearSegments.inputPrio", meb(0)); + iJc = new Msd("linearSegments.outputPrio", meb(0)); + } + function yRc() { + yRc = ccb; + uRc = new ARc("P1_TREEIFICATION", 0); + vRc = new ARc("P2_NODE_ORDERING", 1); + wRc = new ARc("P3_NODE_PLACEMENT", 2); + xRc = new ARc("P4_EDGE_ROUTING", 3); + } + function ZWc() { + ZWc = ccb; + UWc = (Y9c(), C9c); + XWc = T9c; + NWc = Y8c; + OWc = _8c; + PWc = b9c; + MWc = W8c; + QWc = e9c; + TWc = x9c; + KWc = (HWc(), wWc); + LWc = xWc; + RWc = zWc; + SWc = BWc; + VWc = CWc; + WWc = DWc; + YWc = FWc; + } + function rbd() { + rbd = ccb; + qbd = new tbd("UNKNOWN", 0); + nbd = new tbd("ABOVE", 1); + obd = new tbd("BELOW", 2); + pbd = new tbd("INLINE", 3); + new Msd("org.eclipse.elk.labelSide", qbd); + } + function rud(a, b) { + var c; + if (a.ni() && b != null) { + for (c = 0; c < a.i; ++c) { + if (pb(b, a.g[c])) { + return c; + } + } + } else { + for (c = 0; c < a.i; ++c) { + if (PD(a.g[c]) === PD(b)) { + return c; + } + } + } + return -1; + } + function DZb(a, b, c) { + var d, e; + if (b.c == (KAc(), IAc) && c.c == HAc) { + return -1; + } else if (b.c == HAc && c.c == IAc) { + return 1; + } + d = HZb(b.a, a.a); + e = HZb(c.a, a.a); + return b.c == IAc ? e - d : d - e; + } + function Z_b(a, b, c) { + if (!!c && (b < 0 || b > c.a.c.length)) { + throw vbb(new Wdb("index must be >= 0 and <= layer node count")); + } + !!a.c && Lkb(a.c.a, a); + a.c = c; + !!c && Dkb(c.a, b, a); + } + function p7b(a, b) { + var c, d, e; + for (d = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + e = BD(b.Kb(c), 10); + return new cc(Qb(e.n.b + e.o.b / 2)); + } + return wb(), wb(), vb; + } + function rMc(a, b) { + this.c = new Lqb(); + this.a = a; + this.b = b; + this.d = BD(vNb(a, (wtc(), otc)), 304); + PD(vNb(a, (Nyc(), yxc))) === PD((_qc(), Zqc)) ? this.e = new bNc() : this.e = new WMc(); + } + function $dd(a, b) { + var c, d, e, f; + f = 0; + for (d = new olb(a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 33); + f += $wnd.Math.pow(c.g * c.f - b, 2); + } + e = $wnd.Math.sqrt(f / (a.c.length - 1)); + return e; + } + function bgd(a, b) { + var c, d; + d = null; + if (a.Xe((Y9c(), O9c))) { + c = BD(a.We(O9c), 94); + c.Xe(b) && (d = c.We(b)); + } + d == null && !!a.yf() && (d = a.yf().We(b)); + d == null && (d = Ksd(b)); + return d; + } + function Vt(b, c) { + var d, e; + d = b.Zc(c); + try { + e = d.Pb(); + d.Qb(); + return e; + } catch (a) { + a = ubb(a); + if (JD(a, 109)) { + throw vbb(new qcb("Can't remove element " + c)); + } else + throw vbb(a); + } + } + function qA(a, b) { + var c, d, e; + d = new eB(); + e = new fB(d.q.getFullYear() - nje, d.q.getMonth(), d.q.getDate()); + c = pA(a, b, e); + if (c == 0 || c < b.length) { + throw vbb(new Wdb(b)); + } + return e; + } + function _tb(a, b) { + var c, d, e; + uCb(b); + lCb(b != a); + e = a.b.c.length; + for (d = b.Kc(); d.Ob(); ) { + c = d.Pb(); + Ekb(a.b, uCb(c)); + } + if (e != a.b.c.length) { + aub(a, 0); + return true; + } + return false; + } + function bTb() { + bTb = ccb; + VSb = (Y9c(), O8c); + new Osd(B8c, (Bcb(), true)); + YSb = Y8c; + ZSb = _8c; + $Sb = b9c; + XSb = W8c; + _Sb = e9c; + aTb = x9c; + USb = (OSb(), MSb); + SSb = JSb; + TSb = LSb; + WSb = NSb; + RSb = ISb; + } + function MZb(a, b) { + if (b == a.c) { + return a.d; + } else if (b == a.d) { + return a.c; + } else { + throw vbb(new Wdb("'port' must be either the source port or target port of the edge.")); + } + } + function C3b(a, b, c) { + var d, e; + e = a.o; + d = a.d; + switch (b.g) { + case 1: + return -d.d - c; + case 3: + return e.b + d.a + c; + case 2: + return e.a + d.c + c; + case 4: + return -d.b - c; + default: + return 0; + } + } + function H6b(a, b, c, d) { + var e, f, g, h; + $_b(b, BD(d.Xb(0), 29)); + h = d.bd(1, d.gc()); + for (f = BD(c.Kb(b), 20).Kc(); f.Ob(); ) { + e = BD(f.Pb(), 17); + g = e.c.i == b ? e.d.i : e.c.i; + H6b(a, g, c, h); + } + } + function Xec(a) { + var b; + b = new Lqb(); + if (wNb(a, (wtc(), ttc))) { + return BD(vNb(a, ttc), 83); + } + MAb(JAb(new YAb(null, new Kub(a.j, 16)), new Zec()), new _ec(b)); + yNb(a, ttc, b); + return b; + } + function cmd(a, b) { + var c, d; + if (a.Db >> 16 == 6) { + return a.Cb.ih(a, 6, B2, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (Thd(), Lhd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Eod(a, b) { + var c, d; + if (a.Db >> 16 == 7) { + return a.Cb.ih(a, 1, C2, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (Thd(), Nhd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function lpd(a, b) { + var c, d; + if (a.Db >> 16 == 9) { + return a.Cb.ih(a, 9, E2, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (Thd(), Phd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function mQd(a, b) { + var c, d; + if (a.Db >> 16 == 5) { + return a.Cb.ih(a, 9, h5, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (jGd(), VFd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function KHd(a, b) { + var c, d; + if (a.Db >> 16 == 3) { + return a.Cb.ih(a, 0, k5, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (jGd(), OFd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Snd(a, b) { + var c, d; + if (a.Db >> 16 == 7) { + return a.Cb.ih(a, 6, o5, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (jGd(), cGd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function ird() { + this.a = new bqd(); + this.g = new wo(); + this.j = new wo(); + this.b = new Lqb(); + this.d = new wo(); + this.i = new wo(); + this.k = new Lqb(); + this.c = new Lqb(); + this.e = new Lqb(); + this.f = new Lqb(); + } + function MCd(a, b, c) { + var d, e, f; + c < 0 && (c = 0); + f = a.i; + for (e = c; e < f; e++) { + d = qud(a, e); + if (b == null) { + if (d == null) { + return e; + } + } else if (PD(b) === PD(d) || pb(b, d)) { + return e; + } + } + return -1; + } + function b1d(a, b) { + var c, d; + c = b.Hh(a.a); + if (!c) { + return null; + } else { + d = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), Awe)); + return dfb(Bwe, d) ? u1d(a, bKd(b.Hj())) : d; + } + } + function p6d(a, b) { + var c, d; + if (b) { + if (b == a) { + return true; + } + c = 0; + for (d = BD(b, 49).eh(); !!d && d != b; d = d.eh()) { + if (++c > Wje) { + return p6d(a, d); + } + if (d == a) { + return true; + } + } + } + return false; + } + function HKb(a) { + CKb(); + switch (a.q.g) { + case 5: + EKb(a, (Ucd(), Acd)); + EKb(a, Rcd); + break; + case 4: + FKb(a, (Ucd(), Acd)); + FKb(a, Rcd); + break; + default: + GKb(a, (Ucd(), Acd)); + GKb(a, Rcd); + } + } + function LKb(a) { + CKb(); + switch (a.q.g) { + case 5: + IKb(a, (Ucd(), zcd)); + IKb(a, Tcd); + break; + case 4: + JKb(a, (Ucd(), zcd)); + JKb(a, Tcd); + break; + default: + KKb(a, (Ucd(), zcd)); + KKb(a, Tcd); + } + } + function XQb(a) { + var b, c; + b = BD(vNb(a, (wSb(), pSb)), 19); + if (b) { + c = b.a; + c == 0 ? yNb(a, (HSb(), GSb), new Gub()) : yNb(a, (HSb(), GSb), new Hub(c)); + } else { + yNb(a, (HSb(), GSb), new Hub(1)); + } + } + function V$b(a, b) { + var c; + c = a.i; + switch (b.g) { + case 1: + return -(a.n.b + a.o.b); + case 2: + return a.n.a - c.o.a; + case 3: + return a.n.b - c.o.b; + case 4: + return -(a.n.a + a.o.a); + } + return 0; + } + function hbc(a, b) { + switch (a.g) { + case 0: + return b == (Ctc(), ytc) ? dbc : ebc; + case 1: + return b == (Ctc(), ytc) ? dbc : cbc; + case 2: + return b == (Ctc(), ytc) ? cbc : ebc; + default: + return cbc; + } + } + function v$c(a, b) { + var c, d, e; + Lkb(a.a, b); + a.e -= b.r + (a.a.c.length == 0 ? 0 : a.c); + e = ere; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 187); + e = $wnd.Math.max(e, c.d); + } + a.b = e; + } + function Lld(a, b) { + var c, d; + if (a.Db >> 16 == 3) { + return a.Cb.ih(a, 12, E2, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (Thd(), Khd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Uod(a, b) { + var c, d; + if (a.Db >> 16 == 11) { + return a.Cb.ih(a, 10, E2, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (Thd(), Ohd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function PSd(a, b) { + var c, d; + if (a.Db >> 16 == 10) { + return a.Cb.ih(a, 11, c5, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (jGd(), aGd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function qUd(a, b) { + var c, d; + if (a.Db >> 16 == 10) { + return a.Cb.ih(a, 12, n5, b); + } + return d = zUd(BD(XKd((c = BD(Ajd(a, 16), 26), !c ? (jGd(), dGd) : c), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function wId(a) { + var b; + if ((a.Bb & 1) == 0 && !!a.r && a.r.kh()) { + b = BD(a.r, 49); + a.r = BD(xid(a, b), 138); + a.r != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 8, b, a.r)); + } + return a.r; + } + function yHb(a, b, c) { + var d; + d = OC(GC(UD, 1), Vje, 25, 15, [BHb(a, (gHb(), dHb), b, c), BHb(a, eHb, b, c), BHb(a, fHb, b, c)]); + if (a.f) { + d[0] = $wnd.Math.max(d[0], d[2]); + d[2] = d[0]; + } + return d; + } + function O9b(a, b) { + var c, d, e; + e = V9b(a, b); + if (e.c.length == 0) { + return; + } + Okb(e, new pac()); + c = e.c.length; + for (d = 0; d < c; d++) { + K9b(a, (tCb(d, e.c.length), BD(e.c[d], 286)), R9b(a, e, d)); + } + } + function qkc(a) { + var b, c, d, e; + for (e = BD(Qc(a.a, (Xjc(), Sjc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 101); + for (c = Ec(d.k).Kc(); c.Ob(); ) { + b = BD(c.Pb(), 61); + kkc(a, d, b, (Fkc(), Dkc), 1); + } + } + } + function voc(a) { + var b, c; + if (a.k == (j0b(), g0b)) { + for (c = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + if (!OZb(b) && a.c == LZb(b, a).c) { + return true; + } + } + } + return false; + } + function JNc(a) { + var b, c; + if (a.k == (j0b(), g0b)) { + for (c = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + if (!OZb(b) && b.c.i.c == b.d.i.c) { + return true; + } + } + } + return false; + } + function HUc(a, b) { + var c, d, e, f; + Odd(b, "Dull edge routing", 1); + for (f = Jsb(a.b, 0); f.b != f.d.c; ) { + e = BD(Xsb(f), 86); + for (d = Jsb(e.d, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 188); + Osb(c.a); + } + } + } + function xqd(a, b) { + var c, d, e, f, g; + if (b) { + e = b.a.length; + c = new Yge(e); + for (g = (c.b - c.a) * c.c < 0 ? (Xge(), Wge) : new she(c); g.Ob(); ) { + f = BD(g.Pb(), 19); + d = Zpd(b, f.a); + !!d && ard(a, d); + } + } + } + function DZd() { + tZd(); + var a, b; + xZd((NFd(), MFd)); + wZd(MFd); + Tnd(MFd); + FQd = (jGd(), YFd); + for (b = new olb(rZd); b.a < b.c.c.length; ) { + a = BD(mlb(b), 241); + QQd(a, YFd, null); + } + return true; + } + function eD(a, b) { + var c, d, e, f, g, h, i, j; + i = a.h >> 19; + j = b.h >> 19; + if (i != j) { + return j - i; + } + e = a.h; + h = b.h; + if (e != h) { + return e - h; + } + d = a.m; + g = b.m; + if (d != g) { + return d - g; + } + c = a.l; + f = b.l; + return c - f; + } + function fFb() { + fFb = ccb; + eFb = (rFb(), oFb); + dFb = new Nsd(Yke, eFb); + cFb = (UEb(), TEb); + bFb = new Nsd(Zke, cFb); + aFb = (MEb(), LEb); + _Eb = new Nsd($ke, aFb); + $Eb = new Nsd(_ke, (Bcb(), true)); + } + function cfc(a, b, c) { + var d, e; + d = b * c; + if (JD(a.g, 145)) { + e = ugc(a); + if (e.f.d) { + e.f.a || (a.d.a += d + ple); + } else { + a.d.d -= d + ple; + a.d.a += d + ple; + } + } else if (JD(a.g, 10)) { + a.d.d -= d; + a.d.a += 2 * d; + } + } + function vmc(a, b, c) { + var d, e, f, g, h; + e = a[c.g]; + for (h = new olb(b.d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f = g.i; + if (!!f && f.i == c) { + d = g.d[c.g]; + e[d] = $wnd.Math.max(e[d], f.j.b); + } + } + } + function AZc(a, b) { + var c, d, e, f, g; + d = 0; + e = 0; + c = 0; + for (g = new olb(b.d); g.a < g.c.c.length; ) { + f = BD(mlb(g), 443); + a$c(f); + d = $wnd.Math.max(d, f.b); + e += f.d + (c > 0 ? a.g : 0); + ++c; + } + b.b = d; + b.e = e; + } + function to(a) { + var b, c, d; + d = a.b; + if (Lp(a.i, d.length)) { + c = d.length * 2; + a.b = KC(GF, Gie, 317, c, 0, 1); + a.c = KC(GF, Gie, 317, c, 0, 1); + a.f = c - 1; + a.i = 0; + for (b = a.a; b; b = b.c) { + po(a, b, b); + } + ++a.g; + } + } + function cNb(a, b, c, d) { + var e, f, g, h; + for (e = 0; e < b.o; e++) { + f = e - b.j + c; + for (g = 0; g < b.p; g++) { + h = g - b.k + d; + YMb(b, e, g) ? jNb(a, f, h) || lNb(a, f, h) : $Mb(b, e, g) && (hNb(a, f, h) || mNb(a, f, h)); + } + } + } + function Ooc(a, b, c) { + var d; + d = b.c.i; + if (d.k == (j0b(), g0b)) { + yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)); + yNb(a, Wsc, BD(vNb(d, Wsc), 11)); + } else { + yNb(a, (wtc(), Vsc), b.c); + yNb(a, Wsc, c.d); + } + } + function l6c(a, b, c) { + i6c(); + var d, e, f, g, h, i; + g = b / 2; + f = c / 2; + d = $wnd.Math.abs(a.a); + e = $wnd.Math.abs(a.b); + h = 1; + i = 1; + d > g && (h = g / d); + e > f && (i = f / e); + Y6c(a, $wnd.Math.min(h, i)); + return a; + } + function ond() { + Smd(); + var b, c; + try { + c = BD(mUd((yFd(), xFd), yte), 2014); + if (c) { + return c; + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + b = a; + uvd((h0d(), b)); + } else + throw vbb(a); + } + return new knd(); + } + function Y9d() { + A9d(); + var b, c; + try { + c = BD(mUd((yFd(), xFd), Ewe), 2024); + if (c) { + return c; + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + b = a; + uvd((h0d(), b)); + } else + throw vbb(a); + } + return new U9d(); + } + function qZd() { + Smd(); + var b, c; + try { + c = BD(mUd((yFd(), xFd), _ve), 1941); + if (c) { + return c; + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + b = a; + uvd((h0d(), b)); + } else + throw vbb(a); + } + return new mZd(); + } + function HQd(a, b, c) { + var d, e; + e = a.e; + a.e = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 4, e, b); + !c ? c = d : c.Ei(d); + } + e != b && (b ? c = QQd(a, MQd(a, b), c) : c = QQd(a, a.a, c)); + return c; + } + function nB() { + eB.call(this); + this.e = -1; + this.a = false; + this.p = Rie; + this.k = -1; + this.c = -1; + this.b = -1; + this.g = false; + this.f = -1; + this.j = -1; + this.n = -1; + this.i = -1; + this.d = -1; + this.o = Rie; + } + function qEb(a, b) { + var c, d, e; + d = a.b.d.d; + a.a || (d += a.b.d.a); + e = b.b.d.d; + b.a || (e += b.b.d.a); + c = Kdb(d, e); + if (c == 0) { + if (!a.a && b.a) { + return -1; + } else if (!b.a && a.a) { + return 1; + } + } + return c; + } + function eOb(a, b) { + var c, d, e; + d = a.b.b.d; + a.a || (d += a.b.b.a); + e = b.b.b.d; + b.a || (e += b.b.b.a); + c = Kdb(d, e); + if (c == 0) { + if (!a.a && b.a) { + return -1; + } else if (!b.a && a.a) { + return 1; + } + } + return c; + } + function PVb(a, b) { + var c, d, e; + d = a.b.g.d; + a.a || (d += a.b.g.a); + e = b.b.g.d; + b.a || (e += b.b.g.a); + c = Kdb(d, e); + if (c == 0) { + if (!a.a && b.a) { + return -1; + } else if (!b.a && a.a) { + return 1; + } + } + return c; + } + function ZTb() { + ZTb = ccb; + WTb = c3c(e3c(e3c(e3c(new j3c(), (qUb(), oUb), (S8b(), m8b)), oUb, q8b), pUb, x8b), pUb, a8b); + YTb = e3c(e3c(new j3c(), oUb, S7b), oUb, b8b); + XTb = c3c(new j3c(), pUb, d8b); + } + function s3b(a) { + var b, c, d, e, f; + b = BD(vNb(a, (wtc(), Csc)), 83); + f = a.n; + for (d = b.Cc().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 306); + e = c.i; + e.c += f.a; + e.d += f.b; + c.c ? VHb(c) : XHb(c); + } + yNb(a, Csc, null); + } + function qmc(a, b, c) { + var d, e; + e = a.b; + d = e.d; + switch (b.g) { + case 1: + return -d.d - c; + case 2: + return e.o.a + d.c + c; + case 3: + return e.o.b + d.a + c; + case 4: + return -d.b - c; + default: + return -1; + } + } + function BXc(a) { + var b, c, d, e, f; + d = 0; + e = dme; + if (a.b) { + for (b = 0; b < 360; b++) { + c = b * 0.017453292519943295; + zXc(a, a.d, 0, 0, dre, c); + f = a.b.ig(a.d); + if (f < e) { + d = c; + e = f; + } + } + } + zXc(a, a.d, 0, 0, dre, d); + } + function E$c(a, b) { + var c, d, e, f; + f = new Lqb(); + b.e = null; + b.f = null; + for (d = new olb(b.i); d.a < d.c.c.length; ) { + c = BD(mlb(d), 65); + e = BD(Ohb(a.g, c.a), 46); + c.a = D6c(c.b); + Rhb(f, c.a, e); + } + a.g = f; + } + function t$c(a, b, c) { + var d, e, f, g, h, i; + e = b - a.e; + f = e / a.d.c.length; + g = 0; + for (i = new olb(a.d); i.a < i.c.c.length; ) { + h = BD(mlb(i), 443); + d = a.b - h.b + c; + _Zc(h, h.e + g * f, h.f); + XZc(h, f, d); + ++g; + } + } + function YBd(a) { + var b; + a.f.qj(); + if (a.b != -1) { + ++a.b; + b = a.f.d[a.a]; + if (a.b < b.i) { + return; + } + ++a.a; + } + for (; a.a < a.f.d.length; ++a.a) { + b = a.f.d[a.a]; + if (!!b && b.i != 0) { + a.b = 0; + return; + } + } + a.b = -1; + } + function j0d(a, b) { + var c, d, e; + e = b.c.length; + c = l0d(a, e == 0 ? "" : (tCb(0, b.c.length), GD(b.c[0]))); + for (d = 1; d < e && !!c; ++d) { + c = BD(c, 49).oh((tCb(d, b.c.length), GD(b.c[d]))); + } + return c; + } + function rEc(a, b) { + var c, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + a.c[c.c.p][c.p].a = Aub(a.i); + a.c[c.c.p][c.p].d = Edb(a.c[c.c.p][c.p].a); + a.c[c.c.p][c.p].b = 1; + } + } + function _dd(a, b) { + var c, d, e, f; + f = 0; + for (d = new olb(a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 157); + f += $wnd.Math.pow(red(c) * qed(c) - b, 2); + } + e = $wnd.Math.sqrt(f / (a.c.length - 1)); + return e; + } + function LHc(a, b, c, d) { + var e, f, g; + f = GHc(a, b, c, d); + g = MHc(a, f); + bIc(a, b, c, d); + yHc(a.b); + mmb(); + Okb(f, new lIc(a)); + e = MHc(a, f); + bIc(a, c, b, d); + yHc(a.b); + return new vgd(meb(g), meb(e)); + } + function cJc(a, b, c) { + var d, e; + Odd(c, "Interactive node placement", 1); + a.a = BD(vNb(b, (wtc(), otc)), 304); + for (e = new olb(b.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + bJc(a, d); + } + Qdd(c); + } + function MVc(a, b) { + var c; + Odd(b, "General Compactor", 1); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + c = qWc(BD(hkd(a, (ZWc(), LWc)), 380)); + c.hg(a); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + } + function Dfd(a, b, c) { + var d, e; + nmd(a, a.j + b, a.k + c); + for (e = new Fyd((!a.a && (a.a = new xMd(y2, a, 5)), a.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 469); + ukd(d, d.a + b, d.b + c); + } + gmd(a, a.b + b, a.c + c); + } + function vld(a, b, c, d) { + switch (c) { + case 7: + return !a.e && (a.e = new y5d(B2, a, 7, 4)), Sxd(a.e, b, d); + case 8: + return !a.d && (a.d = new y5d(B2, a, 8, 5)), Sxd(a.d, b, d); + } + return Fkd(a, b, c, d); + } + function wld(a, b, c, d) { + switch (c) { + case 7: + return !a.e && (a.e = new y5d(B2, a, 7, 4)), Txd(a.e, b, d); + case 8: + return !a.d && (a.d = new y5d(B2, a, 8, 5)), Txd(a.d, b, d); + } + return Gkd(a, b, c, d); + } + function lqd(a, b, c) { + var d, e, f, g, h; + if (c) { + f = c.a.length; + d = new Yge(f); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(c, g.a); + !!e && drd(a, e, b); + } + } + } + function HAd(a, b, c) { + var d, e, f, g, h; + a.qj(); + f = b == null ? 0 : tb(b); + if (a.f > 0) { + g = (f & Ohe) % a.d.length; + e = wAd(a, g, f, b); + if (e) { + h = e.ed(c); + return h; + } + } + d = a.tj(f, b, c); + a.c.Fc(d); + return null; + } + function t1d(a, b) { + var c, d, e, f; + switch (o1d(a, b)._k()) { + case 3: + case 2: { + c = OKd(b); + for (e = 0, f = c.i; e < f; ++e) { + d = BD(qud(c, e), 34); + if ($1d(q1d(a, d)) == 5) { + return d; + } + } + break; + } + } + return null; + } + function Qs(a) { + var b, c, d, e, f; + if (Lp(a.f, a.b.length)) { + d = KC(BG, Gie, 330, a.b.length * 2, 0, 1); + a.b = d; + e = d.length - 1; + for (c = a.a; c != a; c = c.Rd()) { + f = BD(c, 330); + b = f.d & e; + f.a = d[b]; + d[b] = f; + } + } + } + function DJb(a, b) { + var c, d, e, f; + f = 0; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + f = $wnd.Math.max(f, d.e.a + d.b.rf().a); + } + c = BD(Mpb(a.b, b), 124); + c.n.b = 0; + c.a.a = f; + } + function MKb(a, b) { + var c, d, e, f; + c = 0; + for (f = BD(BD(Qc(a.r, b), 21), 84).Kc(); f.Ob(); ) { + e = BD(f.Pb(), 111); + c = $wnd.Math.max(c, e.e.b + e.b.rf().b); + } + d = BD(Mpb(a.b, b), 124); + d.n.d = 0; + d.a.b = c; + } + function INc(a) { + var b, c; + c = BD(vNb(a, (wtc(), Ksc)), 21); + b = k3c(zNc); + c.Hc((Orc(), Lrc)) && d3c(b, CNc); + c.Hc(Nrc) && d3c(b, ENc); + c.Hc(Erc) && d3c(b, ANc); + c.Hc(Grc) && d3c(b, BNc); + return b; + } + function j1c(a, b) { + var c; + Odd(b, "Delaunay triangulation", 1); + c = new Rkb(); + Hkb(a.i, new n1c(c)); + Ccb(DD(vNb(a, (XNb(), VNb)))) && "null10bw"; + !a.e ? a.e = NCb(c) : ye(a.e, NCb(c)); + Qdd(b); + } + function q6c(a) { + if (a < 0) { + throw vbb(new Wdb("The input must be positive")); + } else + return a < h6c.length ? Sbb(h6c[a]) : $wnd.Math.sqrt(dre * a) * (y6c(a, a) / x6c(2.718281828459045, a)); + } + function pud(a, b) { + var c; + if (a.ni() && b != null) { + for (c = 0; c < a.i; ++c) { + if (pb(b, a.g[c])) { + return true; + } + } + } else { + for (c = 0; c < a.i; ++c) { + if (PD(a.g[c]) === PD(b)) { + return true; + } + } + } + return false; + } + function jr(a, b) { + if (b == null) { + while (a.a.Ob()) { + if (BD(a.a.Pb(), 42).dd() == null) { + return true; + } + } + } else { + while (a.a.Ob()) { + if (pb(b, BD(a.a.Pb(), 42).dd())) { + return true; + } + } + } + return false; + } + function zy(a, b) { + var c, d, e; + if (b === a) { + return true; + } else if (JD(b, 664)) { + e = BD(b, 1947); + return Ue((d = a.g, !d ? a.g = new vi(a) : d), (c = e.g, !c ? e.g = new vi(e) : c)); + } else { + return false; + } + } + function Tz(a) { + var b, c, d, e; + b = "Sz"; + c = "ez"; + e = $wnd.Math.min(a.length, 5); + for (d = e - 1; d >= 0; d--) { + if (dfb(a[d].d, b) || dfb(a[d].d, c)) { + a.length >= d + 1 && a.splice(0, d + 1); + break; + } + } + return a; + } + function Abb(a, b) { + var c; + if (Fbb(a) && Fbb(b)) { + c = a / b; + if (Kje < c && c < Ije) { + return c < 0 ? $wnd.Math.ceil(c) : $wnd.Math.floor(c); + } + } + return zbb(UC(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b, false)); + } + function LZb(a, b) { + if (b == a.c.i) { + return a.d.i; + } else if (b == a.d.i) { + return a.c.i; + } else { + throw vbb(new Wdb("'node' must either be the source node or target node of the edge.")); + } + } + function C2b(a) { + var b, c, d, e; + e = BD(vNb(a, (wtc(), xsc)), 37); + if (e) { + d = new d7c(); + b = Q_b(a.c.i); + while (b != e) { + c = b.e; + b = Q_b(c); + O6c(P6c(P6c(d, c.n), b.c), b.d.b, b.d.d); + } + return d; + } + return w2b; + } + function Ldc(a) { + var b; + b = BD(vNb(a, (wtc(), ntc)), 403); + MAb(LAb(new YAb(null, new Kub(b.d, 16)), new Ydc()), new $dc(a)); + MAb(JAb(new YAb(null, new Kub(b.d, 16)), new aec()), new cec(a)); + } + function woc(a, b) { + var c, d, e, f; + e = b ? U_b(a) : R_b(a); + for (d = new Sr(ur(e.a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + f = LZb(c, a); + if (f.k == (j0b(), g0b) && f.c != a.c) { + return f; + } + } + return null; + } + function HDc(a) { + var b, c, d; + for (c = new olb(a.p); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + if (b.k != (j0b(), h0b)) { + continue; + } + d = b.o.b; + a.i = $wnd.Math.min(a.i, d); + a.g = $wnd.Math.max(a.g, d); + } + } + function oEc(a, b, c) { + var d, e, f; + for (f = new olb(b); f.a < f.c.c.length; ) { + d = BD(mlb(f), 10); + a.c[d.c.p][d.p].e = false; + } + for (e = new olb(b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + nEc(a, d, c); + } + } + function WOc(a, b, c) { + var d, e; + d = vPc(b.j, c.s, c.c) + vPc(c.e, b.s, b.c); + e = vPc(c.j, b.s, b.c) + vPc(b.e, c.s, c.c); + if (d == e) { + if (d > 0) { + a.b += 2; + a.a += d; + } + } else { + a.b += 1; + a.a += $wnd.Math.min(d, e); + } + } + function Rpd(a, b) { + var c, d; + d = false; + if (ND(b)) { + d = true; + Qpd(a, new yC(GD(b))); + } + if (!d) { + if (JD(b, 236)) { + d = true; + Qpd(a, (c = Kcb(BD(b, 236)), new TB(c))); + } + } + if (!d) { + throw vbb(new vcb(Ute)); + } + } + function IMd(a, b, c, d) { + var e, f, g; + e = new pSd(a.e, 1, 10, (g = b.c, JD(g, 88) ? BD(g, 26) : (jGd(), _Fd)), (f = c.c, JD(f, 88) ? BD(f, 26) : (jGd(), _Fd)), HLd(a, b), false); + !d ? d = e : d.Ei(e); + return d; + } + function T_b(a) { + var b, c; + switch (BD(vNb(Q_b(a), (Nyc(), ixc)), 420).g) { + case 0: + b = a.n; + c = a.o; + return new f7c(b.a + c.a / 2, b.b + c.b / 2); + case 1: + return new g7c(a.n); + default: + return null; + } + } + function lrc() { + lrc = ccb; + irc = new mrc(ane, 0); + hrc = new mrc("LEFTUP", 1); + krc = new mrc("RIGHTUP", 2); + grc = new mrc("LEFTDOWN", 3); + jrc = new mrc("RIGHTDOWN", 4); + frc = new mrc("BALANCED", 5); + } + function FFc(a, b, c) { + var d, e, f; + d = Kdb(a.a[b.p], a.a[c.p]); + if (d == 0) { + e = BD(vNb(b, (wtc(), Qsc)), 15); + f = BD(vNb(c, Qsc), 15); + if (e.Hc(c)) { + return -1; + } else if (f.Hc(b)) { + return 1; + } + } + return d; + } + function jXc(a) { + switch (a.g) { + case 1: + return new XVc(); + case 2: + return new ZVc(); + case 3: + return new VVc(); + case 0: + return null; + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function Ikd(a, b, c) { + switch (b) { + case 1: + !a.n && (a.n = new cUd(D2, a, 1, 7)); + Uxd(a.n); + !a.n && (a.n = new cUd(D2, a, 1, 7)); + ytd(a.n, BD(c, 14)); + return; + case 2: + Lkd(a, GD(c)); + return; + } + ekd(a, b, c); + } + function Zkd(a, b, c) { + switch (b) { + case 3: + ald(a, Edb(ED(c))); + return; + case 4: + cld(a, Edb(ED(c))); + return; + case 5: + dld(a, Edb(ED(c))); + return; + case 6: + eld(a, Edb(ED(c))); + return; + } + Ikd(a, b, c); + } + function Fnd(a, b, c) { + var d, e, f; + f = (d = new rUd(), d); + e = xId(f, b, null); + !!e && e.Fi(); + pnd(f, c); + wtd((!a.c && (a.c = new cUd(p5, a, 12, 10)), a.c), f); + AId(f, 0); + DId(f, 1); + CId(f, true); + BId(f, true); + } + function mUd(a, b) { + var c, d, e; + c = Crb(a.g, b); + if (JD(c, 235)) { + e = BD(c, 235); + e.Qh() == null && void 0; + return e.Nh(); + } else if (JD(c, 498)) { + d = BD(c, 1938); + e = d.b; + return e; + } else { + return null; + } + } + function Ui(a, b, c, d) { + var e, f; + Qb(b); + Qb(c); + f = BD(tn(a.d, b), 19); + Ob(!!f, "Row %s not in %s", b, a.e); + e = BD(tn(a.b, c), 19); + Ob(!!e, "Column %s not in %s", c, a.c); + return Wi(a, f.a, e.a, d); + } + function JC(a, b, c, d, e, f, g) { + var h, i, j, k, l; + k = e[f]; + j = f == g - 1; + h = j ? d : 0; + l = LC(h, k); + d != 10 && OC(GC(a, g - f), b[f], c[f], h, l); + if (!j) { + ++f; + for (i = 0; i < k; ++i) { + l[i] = JC(a, b, c, d, e, f, g); + } + } + return l; + } + function Eyd(b) { + if (b.g == -1) { + throw vbb(new Ydb()); + } + b.mj(); + try { + b.i.$c(b.g); + b.f = b.i.j; + b.g < b.e && --b.e; + b.g = -1; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + } + function hYb(a, b) { + a.b.a = $wnd.Math.min(a.b.a, b.c); + a.b.b = $wnd.Math.min(a.b.b, b.d); + a.a.a = $wnd.Math.max(a.a.a, b.c); + a.a.b = $wnd.Math.max(a.a.b, b.d); + return a.c[a.c.length] = b, true; + } + function nZb(a) { + var b, c, d, e; + e = -1; + d = 0; + for (c = new olb(a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 243); + if (b.c == (KAc(), HAc)) { + e = d == 0 ? 0 : d - 1; + break; + } else + d == a.c.length - 1 && (e = d); + d += 1; + } + return e; + } + function UZc(a) { + var b, c, d, e; + e = 0; + b = 0; + for (d = new olb(a.c); d.a < d.c.c.length; ) { + c = BD(mlb(d), 33); + dld(c, a.e + e); + eld(c, a.f); + e += c.g + a.b; + b = $wnd.Math.max(b, c.f + a.b); + } + a.d = e - a.b; + a.a = b - a.b; + } + function bEb(a) { + var b, c, d; + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + d = b.d.c; + b.d.c = b.d.d; + b.d.d = d; + d = b.d.b; + b.d.b = b.d.a; + b.d.a = d; + d = b.b.a; + b.b.a = b.b.b; + b.b.b = d; + } + RDb(a); + } + function BVb(a) { + var b, c, d; + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + d = b.g.c; + b.g.c = b.g.d; + b.g.d = d; + d = b.g.b; + b.g.b = b.g.a; + b.g.a = d; + d = b.e.a; + b.e.a = b.e.b; + b.e.b = d; + } + sVb(a); + } + function Lmc(a) { + var b, c, d, e, f; + f = Ec(a.k); + for (c = (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + if (b != Scd && !f.Hc(b)) { + return b; + } + } + return null; + } + function znc(a, b) { + var c, d; + d = BD(Etb(KAb(JAb(new YAb(null, new Kub(b.j, 16)), new Pnc()))), 11); + if (d) { + c = BD(Ikb(d.e, 0), 17); + if (c) { + return BD(vNb(c, (wtc(), Zsc)), 19).a; + } + } + return yzc(a.b); + } + function CCc(a, b) { + var c, d, e, f; + for (f = new olb(b.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + Blb(a.d); + for (d = new Sr(ur(U_b(e).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + zCc(a, e, c.d.i); + } + } + } + function NZc(a, b) { + var c, d; + Lkb(a.b, b); + for (d = new olb(a.n); d.a < d.c.c.length; ) { + c = BD(mlb(d), 211); + if (Jkb(c.c, b, 0) != -1) { + Lkb(c.c, b); + UZc(c); + c.c.c.length == 0 && Lkb(a.n, c); + break; + } + } + HZc(a); + } + function $Zc(a, b) { + var c, d, e, f, g; + g = a.f; + e = 0; + f = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 187); + OZc(c, a.e, g); + KZc(c, b); + f = $wnd.Math.max(f, c.r); + g += c.d + a.c; + e = g; + } + a.d = f; + a.b = e; + } + function hVc(a) { + var b, c; + c = $sd(a); + if (Qq(c)) { + return null; + } else { + b = (Qb(c), BD(mr(new Sr(ur(c.a.Kc(), new Sq()))), 79)); + return atd(BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82)); + } + } + function XId(a) { + var b; + if (!a.o) { + b = a.Lj(); + b ? a.o = new dYd(a, a, null) : a.rk() ? a.o = new uVd(a, null) : $1d(q1d((O6d(), M6d), a)) == 1 ? a.o = new nYd(a) : a.o = new sYd(a, null); + } + return a.o; + } + function w6d(a, b, c, d) { + var e, f, g, h, i; + if (c.mh(b)) { + e = (g = b, !g ? null : BD(d, 49).xh(g)); + if (e) { + i = c.ah(b); + h = b.t; + if (h > 1 || h == -1) { + f = BD(i, 15); + e.Wb(t6d(a, f)); + } else { + e.Wb(s6d(a, BD(i, 56))); + } + } + } + } + function Zbb(b, c, d, e) { + Ybb(); + var f = Wbb; + function g() { + for (var a = 0; a < f.length; a++) { + f[a](); + } + } + if (b) { + try { + Ihe(g)(); + } catch (a) { + b(c, a); + } + } else { + Ihe(g)(); + } + } + function Kgc(a) { + var b, c, d, e, f; + for (d = new nib(new eib(a.b).a); d.b; ) { + c = lib(d); + b = BD(c.cd(), 10); + f = BD(BD(c.dd(), 46).a, 10); + e = BD(BD(c.dd(), 46).b, 8); + P6c(X6c(b.n), P6c(R6c(f.n), e)); + } + } + function llc(a) { + switch (BD(vNb(a.b, (Nyc(), Vwc)), 375).g) { + case 1: + MAb(NAb(LAb(new YAb(null, new Kub(a.d, 16)), new Glc()), new Ilc()), new Klc()); + break; + case 2: + nlc(a); + break; + case 0: + mlc(a); + } + } + function KXc(a, b, c) { + var d; + Odd(c, "Straight Line Edge Routing", 1); + c.n && !!b && Tdd(c, i6d(b), (pgd(), mgd)); + d = BD(hkd(b, (MUc(), LUc)), 33); + LXc(a, d); + c.n && !!b && Tdd(c, i6d(b), (pgd(), mgd)); + } + function i8c() { + i8c = ccb; + h8c = new j8c("V_TOP", 0); + g8c = new j8c("V_CENTER", 1); + f8c = new j8c("V_BOTTOM", 2); + d8c = new j8c("H_LEFT", 3); + c8c = new j8c("H_CENTER", 4); + e8c = new j8c("H_RIGHT", 5); + } + function gLd(a) { + var b; + if ((a.Db & 64) != 0) + return mKd(a); + b = new Jfb(mKd(a)); + b.a += " (abstract: "; + Ffb(b, (a.Bb & 256) != 0); + b.a += ", interface: "; + Ffb(b, (a.Bb & 512) != 0); + b.a += ")"; + return b.a; + } + function l3d(a, b, c, d) { + var e, f, g, h; + if (oid(a.e)) { + e = b.ak(); + h = b.dd(); + f = c.dd(); + g = H2d(a, 1, e, h, f, e.$j() ? M2d(a, e, f, JD(e, 99) && (BD(e, 18).Bb & Tje) != 0) : -1, true); + d ? d.Ei(g) : d = g; + } + return d; + } + function kz(a) { + var b; + if (a.c == null) { + b = PD(a.b) === PD(iz) ? null : a.b; + a.d = b == null ? Xhe : MD(b) ? nz(FD(b)) : ND(b) ? Vie : hdb(rb(b)); + a.a = a.a + ": " + (MD(b) ? mz(FD(b)) : b + ""); + a.c = "(" + a.d + ") " + a.a; + } + } + function Wgb(a, b) { + this.e = a; + if (Bbb(xbb(b, -4294967296), 0)) { + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [Tbb(b)]); + } else { + this.d = 2; + this.a = OC(GC(WD, 1), oje, 25, 15, [Tbb(b), Tbb(Obb(b, 32))]); + } + } + function yrb() { + function b() { + try { + return (/* @__PURE__ */ new Map()).entries().next().done; + } catch (a) { + return false; + } + } + if (typeof Map === Nhe && Map.prototype.entries && b()) { + return Map; + } else { + return zrb(); + } + } + function VPc(a, b) { + var c, d, e, f; + f = new Bib(a.e, 0); + c = 0; + while (f.b < f.d.gc()) { + d = Edb((sCb(f.b < f.d.gc()), ED(f.d.Xb(f.c = f.b++)))); + e = d - b; + if (e > Oqe) { + return c; + } else + e > -1e-6 && ++c; + } + return c; + } + function PQd(a, b) { + var c; + if (b != a.b) { + c = null; + !!a.b && (c = lid(a.b, a, -4, c)); + !!b && (c = kid(b, a, -4, c)); + c = GQd(a, b, c); + !!c && c.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, b, b)); + } + function SQd(a, b) { + var c; + if (b != a.f) { + c = null; + !!a.f && (c = lid(a.f, a, -1, c)); + !!b && (c = kid(b, a, -1, c)); + c = IQd(a, b, c); + !!c && c.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 0, b, b)); + } + function E9d(a) { + var b, c, d; + if (a == null) + return null; + c = BD(a, 15); + if (c.dc()) + return ""; + d = new Hfb(); + for (b = c.Kc(); b.Ob(); ) { + Efb(d, (Q8d(), GD(b.Pb()))); + d.a += " "; + } + return lcb(d, d.a.length - 1); + } + function I9d(a) { + var b, c, d; + if (a == null) + return null; + c = BD(a, 15); + if (c.dc()) + return ""; + d = new Hfb(); + for (b = c.Kc(); b.Ob(); ) { + Efb(d, (Q8d(), GD(b.Pb()))); + d.a += " "; + } + return lcb(d, d.a.length - 1); + } + function qEc(a, b, c) { + var d, e; + d = a.c[b.c.p][b.p]; + e = a.c[c.c.p][c.p]; + if (d.a != null && e.a != null) { + return Ddb(d.a, e.a); + } else if (d.a != null) { + return -1; + } else if (e.a != null) { + return 1; + } + return 0; + } + function zqd(a, b) { + var c, d, e, f, g, h; + if (b) { + f = b.a.length; + c = new Yge(f); + for (h = (c.b - c.a) * c.c < 0 ? (Xge(), Wge) : new she(c); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(b, g.a); + d = new Crd(a); + Aqd(d.a, e); + } + } + } + function Qqd(a, b) { + var c, d, e, f, g, h; + if (b) { + f = b.a.length; + c = new Yge(f); + for (h = (c.b - c.a) * c.c < 0 ? (Xge(), Wge) : new she(c); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(b, g.a); + d = new lrd(a); + nqd(d.a, e); + } + } + } + function eFd(b) { + var c; + if (b != null && b.length > 0 && bfb(b, b.length - 1) == 33) { + try { + c = PEd(qfb(b, 0, b.length - 1)); + return c.e == null; + } catch (a) { + a = ubb(a); + if (!JD(a, 32)) + throw vbb(a); + } + } + return false; + } + function h3d(a, b, c) { + var d, e, f; + d = b.ak(); + f = b.dd(); + e = d.$j() ? H2d(a, 3, d, null, f, M2d(a, d, f, JD(d, 99) && (BD(d, 18).Bb & Tje) != 0), true) : H2d(a, 1, d, d.zj(), f, -1, true); + c ? c.Ei(e) : c = e; + return c; + } + function Vee() { + var a, b, c; + b = 0; + for (a = 0; a < "X".length; a++) { + c = Uee((BCb(a, "X".length), "X".charCodeAt(a))); + if (c == 0) + throw vbb(new mde("Unknown Option: " + "X".substr(a))); + b |= c; + } + return b; + } + function mZb(a, b, c) { + var d, e, f; + d = Q_b(b); + e = a_b(d); + f = new H0b(); + F0b(f, b); + switch (c.g) { + case 1: + G0b(f, Wcd(Zcd(e))); + break; + case 2: + G0b(f, Zcd(e)); + } + yNb(f, (Nyc(), Uxc), ED(vNb(a, Uxc))); + return f; + } + function U9b(a) { + var b, c; + b = BD(Rr(new Sr(ur(R_b(a.a).a.Kc(), new Sq()))), 17); + c = BD(Rr(new Sr(ur(U_b(a.a).a.Kc(), new Sq()))), 17); + return Ccb(DD(vNb(b, (wtc(), ltc)))) || Ccb(DD(vNb(c, ltc))); + } + function Xjc() { + Xjc = ccb; + Tjc = new Yjc("ONE_SIDE", 0); + Vjc = new Yjc("TWO_SIDES_CORNER", 1); + Wjc = new Yjc("TWO_SIDES_OPPOSING", 2); + Ujc = new Yjc("THREE_SIDES", 3); + Sjc = new Yjc("FOUR_SIDES", 4); + } + function jkc(a, b, c, d, e) { + var f, g; + f = BD(GAb(JAb(b.Oc(), new _kc()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + g = BD(Si(a.b, c, d), 15); + e == 0 ? g.Wc(0, f) : g.Gc(f); + } + function KDc(a, b) { + var c, d, e, f, g; + for (f = new olb(b.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + for (d = new Sr(ur(R_b(e).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + g = c.c.i.p; + a.n[g] = a.n[g] - 1; + } + } + } + function cnc(a, b) { + var c, d, e, f, g; + for (f = new olb(b.d); f.a < f.c.c.length; ) { + e = BD(mlb(f), 101); + g = BD(Ohb(a.c, e), 112).o; + for (d = new Gqb(e.b); d.a < d.c.a.length; ) { + c = BD(Fqb(d), 61); + ojc(e, c, g); + } + } + } + function HJc(a) { + var b, c; + for (c = new olb(a.e.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 29); + YJc(a, b); + } + MAb(JAb(LAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new YKc()), new tLc()), new vLc()), new xLc(a)); + } + function Qwd(a, b) { + if (!b) { + return false; + } else { + if (a.Di(b)) { + return false; + } + if (!a.i) { + if (JD(b, 143)) { + a.i = BD(b, 143); + return true; + } else { + a.i = new Hxd(); + return a.i.Ei(b); + } + } else { + return a.i.Ei(b); + } + } + } + function B9d(a) { + a = Qge(a, true); + if (dfb(kse, a) || dfb("1", a)) { + return Bcb(), Acb; + } else if (dfb(lse, a) || dfb("0", a)) { + return Bcb(), zcb; + } + throw vbb(new n8d("Invalid boolean value: '" + a + "'")); + } + function Kd(a, b, c) { + var d, e, f; + for (e = a.vc().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 42); + f = d.cd(); + if (PD(b) === PD(f) || b != null && pb(b, f)) { + if (c) { + d = new pjb(d.cd(), d.dd()); + e.Qb(); + } + return d; + } + } + return null; + } + function dKb(a) { + $Jb(); + var b, c, d; + if (!a.B.Hc((Idd(), Add))) { + return; + } + d = a.f.i; + b = new K6c(a.a.c); + c = new p0b(); + c.b = b.c - d.c; + c.d = b.d - d.d; + c.c = d.c + d.b - (b.c + b.b); + c.a = d.d + d.a - (b.d + b.a); + a.e.Ff(c); + } + function LNb(a, b, c, d) { + var e, f, g; + g = $wnd.Math.min(c, ONb(BD(a.b, 65), b, c, d)); + for (f = new olb(a.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 221); + e != b && (g = $wnd.Math.min(g, LNb(e, b, g, d))); + } + return g; + } + function WZb(a) { + var b, c, d, e; + e = KC(OQ, nie, 193, a.b.c.length, 0, 2); + d = new Bib(a.b, 0); + while (d.b < d.d.gc()) { + b = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 29)); + c = d.b - 1; + e[c] = l_b(b.a); + } + return e; + } + function K3b(a, b, c, d, e) { + var f, g, h, i; + g = eLb(dLb(iLb(H3b(c)), d), C3b(a, c, e)); + for (i = Y_b(a, c).Kc(); i.Ob(); ) { + h = BD(i.Pb(), 11); + if (b[h.p]) { + f = b[h.p].i; + Ekb(g.d, new BLb(f, bLb(g, f))); + } + } + cLb(g); + } + function sic(a, b) { + this.f = new Lqb(); + this.b = new Lqb(); + this.j = new Lqb(); + this.a = a; + this.c = b; + this.c > 0 && ric(this, this.c - 1, (Ucd(), zcd)); + this.c < this.a.length - 1 && ric(this, this.c + 1, (Ucd(), Tcd)); + } + function SEc(a) { + a.length > 0 && a[0].length > 0 && (this.c = Ccb(DD(vNb(Q_b(a[0][0]), (wtc(), Rsc))))); + this.a = KC(CX, nie, 2018, a.length, 0, 2); + this.b = KC(FX, nie, 2019, a.length, 0, 2); + this.d = new ss(); + } + function tKc(a) { + if (a.c.length == 0) { + return false; + } + if ((tCb(0, a.c.length), BD(a.c[0], 17)).c.i.k == (j0b(), g0b)) { + return true; + } + return FAb(NAb(new YAb(null, new Kub(a, 16)), new wKc()), new yKc()); + } + function rRc(a, b, c) { + Odd(c, "Tree layout", 1); + H2c(a.b); + K2c(a.b, (yRc(), uRc), uRc); + K2c(a.b, vRc, vRc); + K2c(a.b, wRc, wRc); + K2c(a.b, xRc, xRc); + a.a = F2c(a.b, b); + sRc(a, b, Udd(c, 1)); + Qdd(c); + return b; + } + function HXc(a, b) { + var c, d, e, f, g, h, i; + h = gVc(b); + f = b.f; + i = b.g; + g = $wnd.Math.sqrt(f * f + i * i); + e = 0; + for (d = new olb(h); d.a < d.c.c.length; ) { + c = BD(mlb(d), 33); + e += HXc(a, c); + } + return $wnd.Math.max(e, g); + } + function dcd() { + dcd = ccb; + ccd = new gcd(ole, 0); + bcd = new gcd("FREE", 1); + acd = new gcd("FIXED_SIDE", 2); + Zbd = new gcd("FIXED_ORDER", 3); + _bd = new gcd("FIXED_RATIO", 4); + $bd = new gcd("FIXED_POS", 5); + } + function c1d(a, b) { + var c, d, e; + c = b.Hh(a.a); + if (c) { + e = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), Cwe)); + for (d = 1; d < (O6d(), N6d).length; ++d) { + if (dfb(N6d[d], e)) { + return d; + } + } + } + return 0; + } + function Qlb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + uwb(f, "" + b); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function Wlb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + uwb(f, "" + b); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function Md(a) { + var b, c, d; + d = new xwb(She, "{", "}"); + for (c = a.vc().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 42); + uwb(d, Nd(a, b.cd()) + "=" + Nd(a, b.dd())); + } + return !d.a ? d.c : d.e.length == 0 ? d.a.a : d.a.a + ("" + d.e); + } + function EGb(a) { + var b, c, d, e; + while (!akb(a.o)) { + c = BD(fkb(a.o), 46); + d = BD(c.a, 121); + b = BD(c.b, 213); + e = xFb(b, d); + if (b.e == d) { + NFb(e.g, b); + d.e = e.e + b.a; + } else { + NFb(e.b, b); + d.e = e.e - b.a; + } + Ekb(a.e.a, d); + } + } + function F6b(a, b) { + var c, d, e; + c = null; + for (e = BD(b.Kb(a), 20).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 17); + if (!c) { + c = d.c.i == a ? d.d.i : d.c.i; + } else { + if ((d.c.i == a ? d.d.i : d.c.i) != c) { + return false; + } + } + } + return true; + } + function uPc(a, b) { + var c, d, e, f, g; + c = WNc(a, false, b); + for (e = new olb(c); e.a < e.c.c.length; ) { + d = BD(mlb(e), 129); + d.d == 0 ? (BOc(d, null), COc(d, null)) : (f = d.a, g = d.b, BOc(d, g), COc(d, f), void 0); + } + } + function qQc(a) { + var b, c; + b = new j3c(); + d3c(b, cQc); + c = BD(vNb(a, (wtc(), Ksc)), 21); + c.Hc((Orc(), Nrc)) && d3c(b, gQc); + c.Hc(Erc) && d3c(b, dQc); + c.Hc(Lrc) && d3c(b, fQc); + c.Hc(Grc) && d3c(b, eQc); + return b; + } + function Xac(a) { + var b, c, d, e; + Wac(a); + for (c = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + d = b.c.i == a; + e = d ? b.d : b.c; + d ? RZb(b, null) : QZb(b, null); + yNb(b, (wtc(), ctc), e); + _ac(a, e.i); + } + } + function wmc(a, b, c, d) { + var e, f; + f = b.i; + e = c[f.g][a.d[f.g]]; + switch (f.g) { + case 1: + e -= d + b.j.b; + b.g.b = e; + break; + case 3: + e += d; + b.g.b = e; + break; + case 4: + e -= d + b.j.a; + b.g.a = e; + break; + case 2: + e += d; + b.g.a = e; + } + } + function aVc(a) { + var b, c, d; + for (c = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 33); + d = $sd(b); + if (!Qr(new Sr(ur(d.a.Kc(), new Sq())))) { + return b; + } + } + return null; + } + function Cod() { + var a; + if (yod) + return BD(nUd((yFd(), xFd), yte), 2016); + a = BD(JD(Phb((yFd(), xFd), yte), 555) ? Phb(xFd, yte) : new Bod(), 555); + yod = true; + zod(a); + Aod(a); + Tnd(a); + Shb(xFd, yte, a); + return a; + } + function t3d(a, b, c) { + var d, e; + if (a.j == 0) + return c; + e = BD(LLd(a, b, c), 72); + d = c.ak(); + if (!d.Ij() || !a.a.rl(d)) { + throw vbb(new hz("Invalid entry feature '" + d.Hj().zb + "." + d.ne() + "'")); + } + return e; + } + function Qi(a, b) { + var c, d, e, f, g, h, i, j; + for (h = a.a, i = 0, j = h.length; i < j; ++i) { + g = h[i]; + for (d = g, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + if (PD(b) === PD(c) || b != null && pb(b, c)) { + return true; + } + } + } + return false; + } + function qhb(a) { + var b, c, d; + if (ybb(a, 0) >= 0) { + c = Abb(a, Jje); + d = Hbb(a, Jje); + } else { + b = Pbb(a, 1); + c = Abb(b, 5e8); + d = Hbb(b, 5e8); + d = wbb(Nbb(d, 1), xbb(a, 1)); + } + return Mbb(Nbb(d, 32), xbb(c, Yje)); + } + function oQb(a, b, c) { + var d, e; + d = (sCb(b.b != 0), BD(Nsb(b, b.a.a), 8)); + switch (c.g) { + case 0: + d.b = 0; + break; + case 2: + d.b = a.f; + break; + case 3: + d.a = 0; + break; + default: + d.a = a.g; + } + e = Jsb(b, 0); + Vsb(e, d); + return b; + } + function pmc(a, b, c, d) { + var e, f, g, h, i; + i = a.b; + f = b.d; + g = f.j; + h = umc(g, i.d[g.g], c); + e = P6c(R6c(f.n), f.a); + switch (f.j.g) { + case 1: + case 3: + h.a += e.a; + break; + case 2: + case 4: + h.b += e.b; + } + Gsb(d, h, d.c.b, d.c); + } + function yJc(a, b, c) { + var d, e, f, g; + g = Jkb(a.e, b, 0); + f = new zJc(); + f.b = c; + d = new Bib(a.e, g); + while (d.b < d.d.gc()) { + e = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 10)); + e.p = c; + Ekb(f.e, e); + uib(d); + } + return f; + } + function sYc(a, b, c, d) { + var e, f, g, h, i; + e = null; + f = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 33); + i = g.i + g.g; + if (a < g.j + g.f + d) { + !e ? e = g : c.i - i < c.i - f && (e = g); + f = e.i + e.g; + } + } + return !e ? 0 : f + d; + } + function tYc(a, b, c, d) { + var e, f, g, h, i; + f = null; + e = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 33); + i = g.j + g.f; + if (a < g.i + g.g + d) { + !f ? f = g : c.j - i < c.j - e && (f = g); + e = f.j + f.f; + } + } + return !f ? 0 : e + d; + } + function mA(a) { + var b, c, d; + b = false; + d = a.b.c.length; + for (c = 0; c < d; c++) { + if (nA(BD(Ikb(a.b, c), 434))) { + if (!b && c + 1 < d && nA(BD(Ikb(a.b, c + 1), 434))) { + b = true; + BD(Ikb(a.b, c), 434).a = true; + } + } else { + b = false; + } + } + } + function Ahb(a, b, c, d, e) { + var f, g; + f = 0; + for (g = 0; g < e; g++) { + f = wbb(f, Qbb(xbb(b[g], Yje), xbb(d[g], Yje))); + a[g] = Tbb(f); + f = Obb(f, 32); + } + for (; g < c; g++) { + f = wbb(f, xbb(b[g], Yje)); + a[g] = Tbb(f); + f = Obb(f, 32); + } + } + function Jhb(a, b) { + Dhb(); + var c, d; + d = (Hgb(), Cgb); + c = a; + for (; b > 1; b >>= 1) { + (b & 1) != 0 && (d = Ogb(d, c)); + c.d == 1 ? c = Ogb(c, c) : c = new Xgb(Lhb(c.a, c.d, KC(WD, oje, 25, c.d << 1, 15, 1))); + } + d = Ogb(d, c); + return d; + } + function zub() { + zub = ccb; + var a, b, c, d; + wub = KC(UD, Vje, 25, 25, 15, 1); + xub = KC(UD, Vje, 25, 33, 15, 1); + d = 152587890625e-16; + for (b = 32; b >= 0; b--) { + xub[b] = d; + d *= 0.5; + } + c = 1; + for (a = 24; a >= 0; a--) { + wub[a] = c; + c *= 0.5; + } + } + function S1b(a) { + var b, c; + if (Ccb(DD(hkd(a, (Nyc(), fxc))))) { + for (c = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 79); + if (Qld(b)) { + if (Ccb(DD(hkd(b, gxc)))) { + return true; + } + } + } + } + return false; + } + function kjc(a, b) { + var c, d, e; + if (Qqb(a.f, b)) { + b.b = a; + d = b.c; + Jkb(a.j, d, 0) != -1 || Ekb(a.j, d); + e = b.d; + Jkb(a.j, e, 0) != -1 || Ekb(a.j, e); + c = b.a.b; + if (c.c.length != 0) { + !a.i && (a.i = new vjc(a)); + qjc(a.i, c); + } + } + } + function rmc(a) { + var b, c, d, e, f; + c = a.c.d; + d = c.j; + e = a.d.d; + f = e.j; + if (d == f) { + return c.p < e.p ? 0 : 1; + } else if (Xcd(d) == f) { + return 0; + } else if (Vcd(d) == f) { + return 1; + } else { + b = a.b; + return uqb(b.b, Xcd(d)) ? 0 : 1; + } + } + function lzc() { + lzc = ccb; + jzc = new nzc(Aqe, 0); + hzc = new nzc("LONGEST_PATH", 1); + fzc = new nzc("COFFMAN_GRAHAM", 2); + gzc = new nzc(Tne, 3); + kzc = new nzc("STRETCH_WIDTH", 4); + izc = new nzc("MIN_WIDTH", 5); + } + function E3c(a) { + var b; + this.d = new Lqb(); + this.c = a.c; + this.e = a.d; + this.b = a.b; + this.f = new jgd(a.e); + this.a = a.a; + !a.f ? this.g = (b = BD(gdb(O3), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)) : this.g = a.f; + } + function grd(a, b) { + var c, d, e, f, g, h; + e = a; + g = $pd(e, "layoutOptions"); + !g && (g = $pd(e, Dte)); + if (g) { + h = g; + d = null; + !!h && (d = (f = $B(h, KC(ZI, nie, 2, 0, 6, 1)), new mC(h, f))); + if (d) { + c = new Drd(h, b); + reb(d, c); + } + } + } + function atd(a) { + if (JD(a, 239)) { + return BD(a, 33); + } else if (JD(a, 186)) { + return mpd(BD(a, 118)); + } else if (!a) { + throw vbb(new Heb(gue)); + } else { + throw vbb(new cgb("Only support nodes and ports.")); + } + } + function CA(a, b, c, d) { + if (b >= 0 && dfb(a.substr(b, "GMT".length), "GMT")) { + c[0] = b + 3; + return tA(a, c, d); + } + if (b >= 0 && dfb(a.substr(b, "UTC".length), "UTC")) { + c[0] = b + 3; + return tA(a, c, d); + } + return tA(a, c, d); + } + function tjc(a, b) { + var c, d, e, f, g; + f = a.g.a; + g = a.g.b; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c = BD(mlb(d), 70); + e = c.n; + e.a = f; + a.i == (Ucd(), Acd) ? e.b = g + a.j.b - c.o.b : e.b = g; + P6c(e, b); + f += c.o.a + a.e; + } + } + function Odd(a, b, c) { + if (a.b) { + throw vbb(new Zdb("The task is already done.")); + } else if (a.p != null) { + return false; + } else { + a.p = b; + a.r = c; + a.k && (a.o = (Zfb(), Ibb(Cbb(Date.now()), _ie))); + return true; + } + } + function hsd(a) { + var b, c, d, e, f, g, h; + h = new eC(); + c = a.tg(); + e = c != null; + e && Upd(h, Vte, a.tg()); + d = a.ne(); + f = d != null; + f && Upd(h, fue, a.ne()); + b = a.sg(); + g = b != null; + g && Upd(h, "description", a.sg()); + return h; + } + function uId(a, b, c) { + var d, e, f; + f = a.q; + a.q = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + e = new nSd(a, 1, 9, f, b); + !c ? c = e : c.Ei(e); + } + if (!b) { + !!a.r && (c = a.nk(null, c)); + } else { + d = b.c; + d != a.r && (c = a.nk(d, c)); + } + return c; + } + function IYd(a, b, c) { + var d, e, f, g, h; + c = (h = b, kid(h, a.e, -1 - a.c, c)); + g = AYd(a.a); + for (f = (d = new nib(new eib(g.a).a), new ZYd(d)); f.a.b; ) { + e = BD(lib(f.a).cd(), 87); + c = QQd(e, MQd(e, a.a), c); + } + return c; + } + function JYd(a, b, c) { + var d, e, f, g, h; + c = (h = b, lid(h, a.e, -1 - a.c, c)); + g = AYd(a.a); + for (f = (d = new nib(new eib(g.a).a), new ZYd(d)); f.a.b; ) { + e = BD(lib(f.a).cd(), 87); + c = QQd(e, MQd(e, a.a), c); + } + return c; + } + function jhb(a, b, c, d) { + var e, f, g; + if (d == 0) { + $fb(b, 0, a, c, a.length - c); + } else { + g = 32 - d; + a[a.length - 1] = 0; + for (f = a.length - 1; f > c; f--) { + a[f] |= b[f - c - 1] >>> g; + a[f - 1] = b[f - c - 1] << d; + } + } + for (e = 0; e < c; e++) { + a[e] = 0; + } + } + function LJb(a) { + var b, c, d, e, f; + b = 0; + c = 0; + for (f = a.Kc(); f.Ob(); ) { + d = BD(f.Pb(), 111); + b = $wnd.Math.max(b, d.d.b); + c = $wnd.Math.max(c, d.d.c); + } + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.d.b = b; + d.d.c = c; + } + } + function TKb(a) { + var b, c, d, e, f; + c = 0; + b = 0; + for (f = a.Kc(); f.Ob(); ) { + d = BD(f.Pb(), 111); + c = $wnd.Math.max(c, d.d.d); + b = $wnd.Math.max(b, d.d.a); + } + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.d.d = c; + d.d.a = b; + } + } + function rpc(a, b) { + var c, d, e, f; + f = new Rkb(); + e = 0; + d = b.Kc(); + while (d.Ob()) { + c = meb(BD(d.Pb(), 19).a + e); + while (c.a < a.f && !Voc(a, c.a)) { + c = meb(c.a + 1); + ++e; + } + if (c.a >= a.f) { + break; + } + f.c[f.c.length] = c; + } + return f; + } + function sfd(a) { + var b, c, d, e; + b = null; + for (e = new olb(a.wf()); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + c = new J6c(d.qf().a, d.qf().b, d.rf().a, d.rf().b); + !b ? b = c : H6c(b, c); + } + !b && (b = new I6c()); + return b; + } + function Fkd(a, b, c, d) { + var e, f; + if (c == 1) { + return !a.n && (a.n = new cUd(D2, a, 1, 7)), Sxd(a.n, b, d); + } + return f = BD(XKd((e = BD(Ajd(a, 16), 26), !e ? a.zh() : e), c), 66), f.Nj().Qj(a, yjd(a), c - aLd(a.zh()), b, d); + } + function iud(a, b, c) { + var d, e, f, g, h; + d = c.gc(); + a.qi(a.i + d); + h = a.i - b; + h > 0 && $fb(a.g, b, a.g, b + d, h); + g = c.Kc(); + a.i += d; + for (e = 0; e < d; ++e) { + f = g.Pb(); + mud(a, b, a.oi(b, f)); + a.bi(b, f); + a.ci(); + ++b; + } + return d != 0; + } + function xId(a, b, c) { + var d; + if (b != a.q) { + !!a.q && (c = lid(a.q, a, -10, c)); + !!b && (c = kid(b, a, -10, c)); + c = uId(a, b, c); + } else if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 9, b, b); + !c ? c = d : c.Ei(d); + } + return c; + } + function Yj(a, b, c, d) { + Mb((c & oie) == 0, "flatMap does not support SUBSIZED characteristic"); + Mb((c & 4) == 0, "flatMap does not support SORTED characteristic"); + Qb(a); + Qb(b); + return new jk(a, c, d, b); + } + function Qy(a, b) { + vCb(b, "Cannot suppress a null exception."); + mCb(b != a, "Exception can not suppress itself."); + if (a.i) { + return; + } + a.k == null ? a.k = OC(GC(_I, 1), nie, 78, 0, [b]) : a.k[a.k.length] = b; + } + function oA(a, b, c, d) { + var e, f, g, h, i, j; + g = c.length; + f = 0; + e = -1; + j = sfb(a.substr(b), (ntb(), ltb)); + for (h = 0; h < g; ++h) { + i = c[h].length; + if (i > f && nfb(j, sfb(c[h], ltb))) { + e = h; + f = i; + } + } + e >= 0 && (d[0] = b + f); + return e; + } + function MIb(a, b) { + var c; + c = NIb(a.b.Hf(), b.b.Hf()); + if (c != 0) { + return c; + } + switch (a.b.Hf().g) { + case 1: + case 2: + return beb(a.b.sf(), b.b.sf()); + case 3: + case 4: + return beb(b.b.sf(), a.b.sf()); + } + return 0; + } + function iRb(a) { + var b, c, d; + d = a.e.c.length; + a.a = IC(WD, [nie, oje], [48, 25], 15, [d, d], 2); + for (c = new olb(a.c); c.a < c.c.c.length; ) { + b = BD(mlb(c), 282); + a.a[b.c.b][b.d.b] += BD(vNb(b, (wSb(), oSb)), 19).a; + } + } + function H1c(a, b, c) { + Odd(c, "Grow Tree", 1); + a.b = b.f; + if (Ccb(DD(vNb(b, (XNb(), VNb))))) { + a.c = new tOb(); + D1c(a, null); + } else { + a.c = new tOb(); + } + a.a = false; + F1c(a, b.f); + yNb(b, WNb, (Bcb(), a.a ? true : false)); + Qdd(c); + } + function Umd(a, b) { + var c, d, e, f, g; + if (a == null) { + return null; + } else { + g = KC(TD, $ie, 25, 2 * b, 15, 1); + for (d = 0, e = 0; d < b; ++d) { + c = a[d] >> 4 & 15; + f = a[d] & 15; + g[e++] = Qmd[c]; + g[e++] = Qmd[f]; + } + return zfb(g, 0, g.length); + } + } + function j3d(a, b, c) { + var d, e, f; + d = b.ak(); + f = b.dd(); + e = d.$j() ? H2d(a, 4, d, f, null, M2d(a, d, f, JD(d, 99) && (BD(d, 18).Bb & Tje) != 0), true) : H2d(a, d.Kj() ? 2 : 1, d, f, d.zj(), -1, true); + c ? c.Ei(e) : c = e; + return c; + } + function wfb(a) { + var b, c; + if (a >= Tje) { + b = Uje + (a - Tje >> 10 & 1023) & aje; + c = 56320 + (a - Tje & 1023) & aje; + return String.fromCharCode(b) + ("" + String.fromCharCode(c)); + } else { + return String.fromCharCode(a & aje); + } + } + function bKb(a, b) { + $Jb(); + var c, d, e, f; + e = BD(BD(Qc(a.r, b), 21), 84); + if (e.gc() >= 2) { + d = BD(e.Kc().Pb(), 111); + c = a.u.Hc((rcd(), mcd)); + f = a.u.Hc(qcd); + return !d.a && !c && (e.gc() == 2 || f); + } else { + return false; + } + } + function IVc(a, b, c, d, e) { + var f, g, h; + f = JVc(a, b, c, d, e); + h = false; + while (!f) { + AVc(a, e, true); + h = true; + f = JVc(a, b, c, d, e); + } + h && AVc(a, e, false); + g = dVc(e); + if (g.c.length != 0) { + !!a.d && a.d.lg(g); + IVc(a, e, c, d, g); + } + } + function Mad() { + Mad = ccb; + Kad = new Nad(ane, 0); + Iad = new Nad("DIRECTED", 1); + Lad = new Nad("UNDIRECTED", 2); + Gad = new Nad("ASSOCIATION", 3); + Jad = new Nad("GENERALIZATION", 4); + Had = new Nad("DEPENDENCY", 5); + } + function kfd(a, b) { + var c; + if (!mpd(a)) { + throw vbb(new Zdb(Sse)); + } + c = mpd(a); + switch (b.g) { + case 1: + return -(a.j + a.f); + case 2: + return a.i - c.g; + case 3: + return a.j - c.f; + case 4: + return -(a.i + a.g); + } + return 0; + } + function cub(a, b) { + var c, d; + uCb(b); + d = a.b.c.length; + Ekb(a.b, b); + while (d > 0) { + c = d; + d = (d - 1) / 2 | 0; + if (a.a.ue(Ikb(a.b, d), b) <= 0) { + Nkb(a.b, c, b); + return true; + } + Nkb(a.b, c, Ikb(a.b, d)); + } + Nkb(a.b, d, b); + return true; + } + function BHb(a, b, c, d) { + var e, f; + e = 0; + if (!c) { + for (f = 0; f < sHb; f++) { + e = $wnd.Math.max(e, qHb(a.a[f][b.g], d)); + } + } else { + e = qHb(a.a[c.g][b.g], d); + } + b == (gHb(), eHb) && !!a.b && (e = $wnd.Math.max(e, a.b.a)); + return e; + } + function knc(a, b) { + var c, d, e, f, g, h; + e = a.i; + f = b.i; + if (!e || !f) { + return false; + } + if (e.i != f.i || e.i == (Ucd(), zcd) || e.i == (Ucd(), Tcd)) { + return false; + } + g = e.g.a; + c = g + e.j.a; + h = f.g.a; + d = h + f.j.a; + return g <= d && c >= h; + } + function Tpd(a, b, c, d) { + var e; + e = false; + if (ND(d)) { + e = true; + Upd(b, c, GD(d)); + } + if (!e) { + if (KD(d)) { + e = true; + Tpd(a, b, c, d); + } + } + if (!e) { + if (JD(d, 236)) { + e = true; + Spd(b, c, BD(d, 236)); + } + } + if (!e) { + throw vbb(new vcb(Ute)); + } + } + function W0d(a, b) { + var c, d, e; + c = b.Hh(a.a); + if (c) { + e = AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), Sve); + if (e != null) { + for (d = 1; d < (O6d(), K6d).length; ++d) { + if (dfb(K6d[d], e)) { + return d; + } + } + } + } + return 0; + } + function X0d(a, b) { + var c, d, e; + c = b.Hh(a.a); + if (c) { + e = AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), Sve); + if (e != null) { + for (d = 1; d < (O6d(), L6d).length; ++d) { + if (dfb(L6d[d], e)) { + return d; + } + } + } + } + return 0; + } + function Ve(a, b) { + var c, d, e, f; + uCb(b); + f = a.a.gc(); + if (f < b.gc()) { + for (c = a.a.ec().Kc(); c.Ob(); ) { + d = c.Pb(); + b.Hc(d) && c.Qb(); + } + } else { + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + a.a.Bc(d) != null; + } + } + return f != a.a.gc(); + } + function bYb(a) { + var b, c; + c = R6c(l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a]))); + b = a.i.d; + switch (a.j.g) { + case 1: + c.b -= b.d; + break; + case 2: + c.a += b.c; + break; + case 3: + c.b += b.a; + break; + case 4: + c.a -= b.b; + } + return c; + } + function P9b(a) { + var b; + b = (I9b(), BD(Rr(new Sr(ur(R_b(a).a.Kc(), new Sq()))), 17).c.i); + while (b.k == (j0b(), g0b)) { + yNb(b, (wtc(), Tsc), (Bcb(), true)); + b = BD(Rr(new Sr(ur(R_b(b).a.Kc(), new Sq()))), 17).c.i; + } + } + function bIc(a, b, c, d) { + var e, f, g, h; + h = CHc(b, d); + for (g = h.Kc(); g.Ob(); ) { + e = BD(g.Pb(), 11); + a.d[e.p] = a.d[e.p] + a.c[c.p]; + } + h = CHc(c, d); + for (f = h.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 11); + a.d[e.p] = a.d[e.p] - a.c[b.p]; + } + } + function Efd(a, b, c) { + var d, e; + for (e = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + bld(d, d.i + b, d.j + c); + } + reb((!a.b && (a.b = new cUd(B2, a, 12, 3)), a.b), new Kfd(b, c)); + } + function Mwb(a, b, c, d) { + var e, f; + f = b; + e = f.d == null || a.a.ue(c.d, f.d) > 0 ? 1 : 0; + while (f.a[e] != c) { + f = f.a[e]; + e = a.a.ue(c.d, f.d) > 0 ? 1 : 0; + } + f.a[e] = d; + d.b = c.b; + d.a[0] = c.a[0]; + d.a[1] = c.a[1]; + c.a[0] = null; + c.a[1] = null; + } + function ucd(a) { + rcd(); + var b, c; + b = qqb(ncd, OC(GC(E1, 1), Kie, 273, 0, [pcd])); + if (Ox(Cx(b, a)) > 1) { + return false; + } + c = qqb(mcd, OC(GC(E1, 1), Kie, 273, 0, [lcd, qcd])); + if (Ox(Cx(c, a)) > 1) { + return false; + } + return true; + } + function fod(a, b) { + var c; + c = Phb((yFd(), xFd), a); + JD(c, 498) ? Shb(xFd, a, new bUd(this, b)) : Shb(xFd, a, this); + bod(this, b); + if (b == (LFd(), KFd)) { + this.wb = BD(this, 1939); + BD(b, 1941); + } else { + this.wb = (NFd(), MFd); + } + } + function lZd(b) { + var c, d, e; + if (b == null) { + return null; + } + c = null; + for (d = 0; d < Pmd.length; ++d) { + try { + return DQd(Pmd[d], b); + } catch (a) { + a = ubb(a); + if (JD(a, 32)) { + e = a; + c = e; + } else + throw vbb(a); + } + } + throw vbb(new rFd(c)); + } + function Dpb() { + Dpb = ccb; + Bpb = OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]); + Cpb = OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]); + } + function yyb(a) { + var b, c, d; + b = dfb(typeof b, uke) ? null : new iCb(); + if (!b) { + return; + } + $xb(); + c = (d = 900, d >= _ie ? "error" : d >= 900 ? "warn" : d >= 800 ? "info" : "log"); + gCb(c, a.a); + !!a.b && hCb(b, c, a.b, "Exception: ", true); + } + function vNb(a, b) { + var c, d; + d = (!a.q && (a.q = new Lqb()), Ohb(a.q, b)); + if (d != null) { + return d; + } + c = b.wg(); + JD(c, 4) && (c == null ? (!a.q && (a.q = new Lqb()), Thb(a.q, b)) : (!a.q && (a.q = new Lqb()), Rhb(a.q, b, c)), a); + return c; + } + function qUb() { + qUb = ccb; + lUb = new rUb("P1_CYCLE_BREAKING", 0); + mUb = new rUb("P2_LAYERING", 1); + nUb = new rUb("P3_NODE_ORDERING", 2); + oUb = new rUb("P4_NODE_PLACEMENT", 3); + pUb = new rUb("P5_EDGE_ROUTING", 4); + } + function SUb(a, b) { + var c, d, e, f, g; + e = b == 1 ? KUb : JUb; + for (d = e.a.ec().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 103); + for (g = BD(Qc(a.f.c, c), 21).Kc(); g.Ob(); ) { + f = BD(g.Pb(), 46); + Lkb(a.b.b, f.b); + Lkb(a.b.a, BD(f.b, 81).d); + } + } + } + function IWb(a, b) { + AWb(); + var c; + if (a.c == b.c) { + if (a.b == b.b || pWb(a.b, b.b)) { + c = mWb(a.b) ? 1 : -1; + if (a.a && !b.a) { + return c; + } else if (!a.a && b.a) { + return -c; + } + } + return beb(a.b.g, b.b.g); + } else { + return Kdb(a.c, b.c); + } + } + function y6b(a, b) { + var c; + Odd(b, "Hierarchical port position processing", 1); + c = a.b; + c.c.length > 0 && x6b((tCb(0, c.c.length), BD(c.c[0], 29)), a); + c.c.length > 1 && x6b(BD(Ikb(c, c.c.length - 1), 29), a); + Qdd(b); + } + function RVc(a, b) { + var c, d, e; + if (CVc(a, b)) { + return true; + } + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 33); + e = hVc(c); + if (BVc(a, c, e)) { + return true; + } + if (PVc(a, c) - a.g <= a.a) { + return true; + } + } + return false; + } + function d0c() { + d0c = ccb; + c0c = (A0c(), z0c); + __c = v0c; + $_c = t0c; + Y_c = p0c; + Z_c = r0c; + X_c = new q0b(8); + W_c = new Osd((Y9c(), f9c), X_c); + a0c = new Osd(T9c, 8); + b0c = x0c; + T_c = k0c; + U_c = m0c; + V_c = new Osd(y8c, (Bcb(), false)); + } + function X7c() { + X7c = ccb; + U7c = new q0b(15); + T7c = new Osd((Y9c(), f9c), U7c); + W7c = new Osd(T9c, 15); + V7c = new Osd(D9c, meb(0)); + O7c = I8c; + Q7c = Y8c; + S7c = b9c; + L7c = new Osd(r8c, pse); + P7c = O8c; + R7c = _8c; + M7c = t8c; + N7c = w8c; + } + function jtd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)); + } + function ktd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return btd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)); + } + function mtd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return btd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)); + } + function ltd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)); + } + function Dvd(a, b, c) { + var d, e, f; + ++a.j; + e = a.Vi(); + if (b >= e || b < 0) + throw vbb(new qcb(lue + b + mue + e)); + if (c >= e || c < 0) + throw vbb(new qcb(nue + c + mue + e)); + b != c ? d = (f = a.Ti(c), a.Hi(b, f), f) : d = a.Oi(c); + return d; + } + function m6d(a) { + var b, c, d; + d = a; + if (a) { + b = 0; + for (c = a.Ug(); c; c = c.Ug()) { + if (++b > Wje) { + return m6d(c); + } + d = c; + if (c == a) { + throw vbb(new Zdb("There is a cycle in the containment hierarchy of " + a)); + } + } + } + return d; + } + function Fe(a) { + var b, c, d; + d = new xwb(She, "[", "]"); + for (c = a.Kc(); c.Ob(); ) { + b = c.Pb(); + uwb(d, PD(b) === PD(a) ? "(this Collection)" : b == null ? Xhe : fcb(b)); + } + return !d.a ? d.c : d.e.length == 0 ? d.a.a : d.a.a + ("" + d.e); + } + function CVc(a, b) { + var c, d; + d = false; + if (b.gc() < 2) { + return false; + } + for (c = 0; c < b.gc(); c++) { + c < b.gc() - 1 ? d = d | BVc(a, BD(b.Xb(c), 33), BD(b.Xb(c + 1), 33)) : d = d | BVc(a, BD(b.Xb(c), 33), BD(b.Xb(0), 33)); + } + return d; + } + function Ymd(a, b) { + var c; + if (b != a.a) { + c = null; + !!a.a && (c = BD(a.a, 49).ih(a, 4, o5, c)); + !!b && (c = BD(b, 49).gh(a, 4, o5, c)); + c = Tmd(a, b, c); + !!c && c.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, b, b)); + } + function RQd(a, b) { + var c; + if (b != a.e) { + !!a.e && QYd(AYd(a.e), a); + !!b && (!b.b && (b.b = new RYd(new NYd())), PYd(b.b, a)); + c = HQd(a, b, null); + !!c && c.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 4, b, b)); + } + function ufb(a) { + var b, c, d; + c = a.length; + d = 0; + while (d < c && (BCb(d, a.length), a.charCodeAt(d) <= 32)) { + ++d; + } + b = c; + while (b > d && (BCb(b - 1, a.length), a.charCodeAt(b - 1) <= 32)) { + --b; + } + return d > 0 || b < c ? a.substr(d, b - d) : a; + } + function ujc(a, b) { + var c; + c = b.o; + if (fad(a.f)) { + a.j.a = $wnd.Math.max(a.j.a, c.a); + a.j.b += c.b; + a.d.c.length > 1 && (a.j.b += a.e); + } else { + a.j.a += c.a; + a.j.b = $wnd.Math.max(a.j.b, c.b); + a.d.c.length > 1 && (a.j.a += a.e); + } + } + function gkc() { + gkc = ccb; + dkc = OC(GC(F1, 1), bne, 61, 0, [(Ucd(), Acd), zcd, Rcd]); + ckc = OC(GC(F1, 1), bne, 61, 0, [zcd, Rcd, Tcd]); + ekc = OC(GC(F1, 1), bne, 61, 0, [Rcd, Tcd, Acd]); + fkc = OC(GC(F1, 1), bne, 61, 0, [Tcd, Acd, zcd]); + } + function omc(a, b, c, d) { + var e, f, g, h, i, j, k; + g = a.c.d; + h = a.d.d; + if (g.j == h.j) { + return; + } + k = a.b; + e = g.j; + i = null; + while (e != h.j) { + i = b == 0 ? Xcd(e) : Vcd(e); + f = umc(e, k.d[e.g], c); + j = umc(i, k.d[i.g], c); + Dsb(d, P6c(f, j)); + e = i; + } + } + function oFc(a, b, c, d) { + var e, f, g, h, i; + g = JHc(a.a, b, c); + h = BD(g.a, 19).a; + f = BD(g.b, 19).a; + if (d) { + i = BD(vNb(b, (wtc(), gtc)), 10); + e = BD(vNb(c, gtc), 10); + if (!!i && !!e) { + mic(a.b, i, e); + h += a.b.i; + f += a.b.e; + } + } + return h > f; + } + function oHc(a) { + var b, c, d, e, f, g, h, i, j; + this.a = lHc(a); + this.b = new Rkb(); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + f = new Rkb(); + Ekb(this.b, f); + for (h = b, i = 0, j = h.length; i < j; ++i) { + g = h[i]; + Ekb(f, new Tkb(g.j)); + } + } + } + function qHc(a, b, c) { + var d, e, f; + f = 0; + d = c[b]; + if (b < c.length - 1) { + e = c[b + 1]; + if (a.b[b]) { + f = KIc(a.d, d, e); + f += NHc(a.a, d, (Ucd(), zcd)); + f += NHc(a.a, e, Tcd); + } else { + f = IHc(a.a, d, e); + } + } + a.c[b] && (f += PHc(a.a, d)); + return f; + } + function jZb(a, b, c, d, e) { + var f, g, h, i; + i = null; + for (h = new olb(d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 441); + if (g != c && Jkb(g.e, e, 0) != -1) { + i = g; + break; + } + } + f = kZb(e); + QZb(f, c.b); + RZb(f, i.b); + Rc(a.a, e, new BZb(f, b, c.f)); + } + function nic(a) { + while (a.g.c != 0 && a.d.c != 0) { + if (wic(a.g).c > wic(a.d).c) { + a.i += a.g.c; + yic(a.d); + } else if (wic(a.d).c > wic(a.g).c) { + a.e += a.d.c; + yic(a.g); + } else { + a.i += vic(a.g); + a.e += vic(a.d); + yic(a.g); + yic(a.d); + } + } + } + function XOc(a, b, c) { + var d, e, f, g; + f = b.q; + g = b.r; + new DOc((HOc(), FOc), b, f, 1); + new DOc(FOc, f, g, 1); + for (e = new olb(c); e.a < e.c.c.length; ) { + d = BD(mlb(e), 112); + if (d != f && d != b && d != g) { + pPc(a.a, d, b); + pPc(a.a, d, g); + } + } + } + function XQc(a, b, c, d) { + a.a.d = $wnd.Math.min(b, c); + a.a.a = $wnd.Math.max(b, d) - a.a.d; + if (b < c) { + a.b = 0.5 * (b + c); + a.g = Qqe * a.b + 0.9 * b; + a.f = Qqe * a.b + 0.9 * c; + } else { + a.b = 0.5 * (b + d); + a.g = Qqe * a.b + 0.9 * d; + a.f = Qqe * a.b + 0.9 * b; + } + } + function acb() { + _bb = {}; + !Array.isArray && (Array.isArray = function(a) { + return Object.prototype.toString.call(a) === "[object Array]"; + }); + function b() { + return (/* @__PURE__ */ new Date()).getTime(); + } + !Date.now && (Date.now = b); + } + function $Tb(a, b) { + var c, d; + d = BD(vNb(b, (Nyc(), Vxc)), 98); + yNb(b, (wtc(), dtc), d); + c = b.e; + !!c && (MAb(new YAb(null, new Kub(c.a, 16)), new dUb(a)), MAb(LAb(new YAb(null, new Kub(c.b, 16)), new fUb()), new hUb(a))); + } + function _$b(a) { + var b, c, d, e; + if (gad(BD(vNb(a.b, (Nyc(), Lwc)), 103))) { + return 0; + } + b = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + if (c.k == (j0b(), h0b)) { + e = c.o.a; + b = $wnd.Math.max(b, e); + } + } + return b; + } + function c5b(a) { + switch (BD(vNb(a, (Nyc(), mxc)), 163).g) { + case 1: + yNb(a, mxc, (Ctc(), ztc)); + break; + case 2: + yNb(a, mxc, (Ctc(), Atc)); + break; + case 3: + yNb(a, mxc, (Ctc(), xtc)); + break; + case 4: + yNb(a, mxc, (Ctc(), ytc)); + } + } + function yrc() { + yrc = ccb; + wrc = new zrc(ane, 0); + trc = new zrc(jle, 1); + xrc = new zrc(kle, 2); + vrc = new zrc("LEFT_RIGHT_CONSTRAINT_LOCKING", 3); + urc = new zrc("LEFT_RIGHT_CONNECTION_LOCKING", 4); + rrc = new zrc(Vne, 5); + } + function qRc(a, b, c) { + var d, e, f, g, h, i, j; + h = c.a / 2; + f = c.b / 2; + d = $wnd.Math.abs(b.a - a.a); + e = $wnd.Math.abs(b.b - a.b); + i = 1; + j = 1; + d > h && (i = h / d); + e > f && (j = f / e); + g = $wnd.Math.min(i, j); + a.a += g * (b.a - a.a); + a.b += g * (b.b - a.b); + } + function sZc(a, b, c, d, e) { + var f, g; + g = false; + f = BD(Ikb(c.b, 0), 33); + while (yZc(a, b, f, d, e)) { + g = true; + NZc(c, f); + if (c.b.c.length == 0) { + break; + } + f = BD(Ikb(c.b, 0), 33); + } + c.b.c.length == 0 && v$c(c.j, c); + g && a$c(b.q); + return g; + } + function t6c(a, b) { + i6c(); + var c, d, e, f; + if (b.b < 2) { + return false; + } + f = Jsb(b, 0); + c = BD(Xsb(f), 8); + d = c; + while (f.b != f.d.c) { + e = BD(Xsb(f), 8); + if (s6c(a, d, e)) { + return true; + } + d = e; + } + if (s6c(a, d, c)) { + return true; + } + return false; + } + function ckd(a, b, c, d) { + var e, f; + if (c == 0) { + return !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), bId(a.o, b, d); + } + return f = BD(XKd((e = BD(Ajd(a, 16), 26), !e ? a.zh() : e), c), 66), f.Nj().Rj(a, yjd(a), c - aLd(a.zh()), b, d); + } + function bod(a, b) { + var c; + if (b != a.sb) { + c = null; + !!a.sb && (c = BD(a.sb, 49).ih(a, 1, i5, c)); + !!b && (c = BD(b, 49).gh(a, 1, i5, c)); + c = Jnd(a, b, c); + !!c && c.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 4, b, b)); + } + function yqd(a, b) { + var c, d, e, f; + if (b) { + e = Xpd(b, "x"); + c = new zrd(a); + hmd(c.a, (uCb(e), e)); + f = Xpd(b, "y"); + d = new Ard(a); + imd(d.a, (uCb(f), f)); + } else { + throw vbb(new cqd("All edge sections need an end point.")); + } + } + function wqd(a, b) { + var c, d, e, f; + if (b) { + e = Xpd(b, "x"); + c = new wrd(a); + omd(c.a, (uCb(e), e)); + f = Xpd(b, "y"); + d = new xrd(a); + pmd(d.a, (uCb(f), f)); + } else { + throw vbb(new cqd("All edge sections need a start point.")); + } + } + function pyb(a, b) { + var c, d, e, f, g, h, i; + for (d = syb(a), f = 0, h = d.length; f < h; ++f) { + yyb(b); + } + i = !lyb && a.e ? lyb ? null : a.d : null; + while (i) { + for (c = syb(i), e = 0, g = c.length; e < g; ++e) { + yyb(b); + } + i = !lyb && i.e ? lyb ? null : i.d : null; + } + } + function j0b() { + j0b = ccb; + h0b = new k0b("NORMAL", 0); + g0b = new k0b("LONG_EDGE", 1); + e0b = new k0b("EXTERNAL_PORT", 2); + i0b = new k0b("NORTH_SOUTH_PORT", 3); + f0b = new k0b("LABEL", 4); + d0b = new k0b("BREAKING_POINT", 5); + } + function g4b(a) { + var b, c, d, e; + b = false; + if (wNb(a, (wtc(), Csc))) { + c = BD(vNb(a, Csc), 83); + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + if (e4b(d)) { + if (!b) { + d4b(Q_b(a)); + b = true; + } + h4b(BD(c.xc(d), 306)); + } + } + } + } + function qec(a, b, c) { + var d; + Odd(c, "Self-Loop routing", 1); + d = rec(b); + RD(vNb(b, (g6c(), f6c))); + MAb(NAb(JAb(JAb(LAb(new YAb(null, new Kub(b.b, 16)), new uec()), new wec()), new yec()), new Aec()), new Cec(a, d)); + Qdd(c); + } + function gsd(a) { + var b, c, d, e, f, g, h, i, j; + j = hsd(a); + c = a.e; + f = c != null; + f && Upd(j, eue, a.e); + h = a.k; + g = !!h; + g && Upd(j, "type", Zr(a.k)); + d = Fhe(a.j); + e = !d; + if (e) { + i = new wB(); + cC(j, Mte, i); + b = new ssd(i); + reb(a.j, b); + } + return j; + } + function Jv(a) { + var b, c, d, e; + e = Kfb((Xj(a.gc(), "size"), new Vfb()), 123); + d = true; + for (c = Wm(a).Kc(); c.Ob(); ) { + b = BD(c.Pb(), 42); + d || (e.a += She, e); + d = false; + Pfb(Kfb(Pfb(e, b.cd()), 61), b.dd()); + } + return (e.a += "}", e).a; + } + function kD(a, b) { + var c, d, e; + b &= 63; + if (b < 22) { + c = a.l << b; + d = a.m << b | a.l >> 22 - b; + e = a.h << b | a.m >> 22 - b; + } else if (b < 44) { + c = 0; + d = a.l << b - 22; + e = a.m << b - 22 | a.l >> 44 - b; + } else { + c = 0; + d = 0; + e = a.l << b - 44; + } + return TC(c & Eje, d & Eje, e & Fje); + } + function Hcb(a) { + Gcb == null && (Gcb = new RegExp("^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$")); + if (!Gcb.test(a)) { + throw vbb(new Oeb(Oje + a + '"')); + } + return parseFloat(a); + } + function IFb(a) { + var b, c, d, e; + b = new Rkb(); + c = KC(sbb, dle, 25, a.a.c.length, 16, 1); + Glb(c, c.length); + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + if (!c[d.d]) { + b.c[b.c.length] = d; + HFb(a, d, c); + } + } + return b; + } + function Nmc(a, b) { + var c, d, e, f; + f = b.b.j; + a.a = KC(WD, oje, 25, f.c.length, 15, 1); + e = 0; + for (d = 0; d < f.c.length; d++) { + c = (tCb(d, f.c.length), BD(f.c[d], 11)); + c.e.c.length == 0 && c.g.c.length == 0 ? e += 1 : e += 3; + a.a[d] = e; + } + } + function Sqc() { + Sqc = ccb; + Nqc = new Uqc("ALWAYS_UP", 0); + Mqc = new Uqc("ALWAYS_DOWN", 1); + Pqc = new Uqc("DIRECTION_UP", 2); + Oqc = new Uqc("DIRECTION_DOWN", 3); + Rqc = new Uqc("SMART_UP", 4); + Qqc = new Uqc("SMART_DOWN", 5); + } + function k6c(a, b) { + if (a < 0 || b < 0) { + throw vbb(new Wdb("k and n must be positive")); + } else if (b > a) { + throw vbb(new Wdb("k must be smaller than n")); + } else + return b == 0 || b == a ? 1 : a == 0 ? 0 : q6c(a) / (q6c(b) * q6c(a - b)); + } + function jfd(a, b) { + var c, d, e, f; + c = new _ud(a); + while (c.g == null && !c.c ? Uud(c) : c.g == null || c.i != 0 && BD(c.g[c.i - 1], 47).Ob()) { + f = BD(Vud(c), 56); + if (JD(f, 160)) { + d = BD(f, 160); + for (e = 0; e < b.length; e++) { + b[e].og(d); + } + } + } + } + function fld(a) { + var b; + if ((a.Db & 64) != 0) + return Mkd(a); + b = new Jfb(Mkd(a)); + b.a += " (height: "; + Bfb(b, a.f); + b.a += ", width: "; + Bfb(b, a.g); + b.a += ", x: "; + Bfb(b, a.i); + b.a += ", y: "; + Bfb(b, a.j); + b.a += ")"; + return b.a; + } + function un(a) { + var b, c, d, e, f, g, h; + b = new $rb(); + for (d = a, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + g = Qb(c.cd()); + h = Xrb(b, g, Qb(c.dd())); + if (h != null) { + throw vbb(new Wdb("duplicate key: " + g)); + } + } + this.b = (mmb(), new iob(b)); + } + function Rlb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + uwb(f, String.fromCharCode(b)); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function SRb() { + SRb = ccb; + MRb = (XRb(), WRb); + LRb = new Nsd(mme, MRb); + meb(1); + KRb = new Nsd(nme, meb(300)); + meb(0); + PRb = new Nsd(ome, meb(0)); + QRb = new Nsd(pme, qme); + NRb = new Nsd(rme, 5); + RRb = WRb; + ORb = VRb; + } + function NUb(a, b) { + var c, d, e, f, g; + e = b == 1 ? KUb : JUb; + for (d = e.a.ec().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 103); + for (g = BD(Qc(a.f.c, c), 21).Kc(); g.Ob(); ) { + f = BD(g.Pb(), 46); + Ekb(a.b.b, BD(f.b, 81)); + Ekb(a.b.a, BD(f.b, 81).d); + } + } + } + function kVd(a, b) { + var c; + if (b != null && !a.c.Yj().wj(b)) { + c = JD(b, 56) ? BD(b, 56).Tg().zb : hdb(rb(b)); + throw vbb(new Cdb(ite + a.c.ne() + "'s type '" + a.c.Yj().ne() + "' does not permit a value of type '" + c + "'")); + } + } + function cZb(a, b, c) { + var d, e; + e = new Bib(a.b, 0); + while (e.b < e.d.gc()) { + d = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 70)); + if (PD(vNb(d, (wtc(), btc))) !== PD(b)) { + continue; + } + Y$b(d.n, Q_b(a.c.i), c); + uib(e); + Ekb(b.b, d); + } + } + function vdc(a, b) { + if (b.a) { + switch (BD(vNb(b.b, (wtc(), dtc)), 98).g) { + case 0: + case 1: + llc(b); + case 2: + MAb(new YAb(null, new Kub(b.d, 16)), new Idc()); + wkc(a.a, b); + } + } else { + MAb(new YAb(null, new Kub(b.d, 16)), new Idc()); + } + } + function Znc(a) { + var b, c; + c = $wnd.Math.sqrt((a.k == null && (a.k = Soc(a, new bpc())), Edb(a.k) / (a.b * (a.g == null && (a.g = Poc(a, new _oc())), Edb(a.g))))); + b = Tbb(Cbb($wnd.Math.round(c))); + b = $wnd.Math.min(b, a.f); + return b; + } + function H0b() { + z0b(); + n_b.call(this); + this.j = (Ucd(), Scd); + this.a = new d7c(); + new L_b(); + this.f = (Xj(2, Jie), new Skb(2)); + this.e = (Xj(4, Jie), new Skb(4)); + this.g = (Xj(4, Jie), new Skb(4)); + this.b = new Z0b(this.e, this.g); + } + function j3b(a, b) { + var c, d; + if (Ccb(DD(vNb(b, (wtc(), ltc))))) { + return false; + } + d = b.c.i; + if (a == (Ctc(), xtc)) { + if (d.k == (j0b(), f0b)) { + return false; + } + } + c = BD(vNb(d, (Nyc(), mxc)), 163); + if (c == ytc) { + return false; + } + return true; + } + function k3b(a, b) { + var c, d; + if (Ccb(DD(vNb(b, (wtc(), ltc))))) { + return false; + } + d = b.d.i; + if (a == (Ctc(), ztc)) { + if (d.k == (j0b(), f0b)) { + return false; + } + } + c = BD(vNb(d, (Nyc(), mxc)), 163); + if (c == Atc) { + return false; + } + return true; + } + function L3b(a, b) { + var c, d, e, f, g, h, i; + g = a.d; + i = a.o; + h = new J6c(-g.b, -g.d, g.b + i.a + g.c, g.d + i.b + g.a); + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + !!c && H6c(h, c.i); + } + g.b = -h.c; + g.d = -h.d; + g.c = h.b - g.b - i.a; + g.a = h.a - g.d - i.b; + } + function N_c() { + N_c = ccb; + I_c = new O_c("CENTER_DISTANCE", 0); + J_c = new O_c("CIRCLE_UNDERLAP", 1); + M_c = new O_c("RECTANGLE_UNDERLAP", 2); + K_c = new O_c("INVERTED_OVERLAP", 3); + L_c = new O_c("MINIMUM_ROOT_DISTANCE", 4); + } + function jde(a) { + hde(); + var b, c, d, e, f; + if (a == null) + return null; + d = a.length; + e = d * 2; + b = KC(TD, $ie, 25, e, 15, 1); + for (c = 0; c < d; c++) { + f = a[c]; + f < 0 && (f += 256); + b[c * 2] = gde[f >> 4]; + b[c * 2 + 1] = gde[f & 15]; + } + return zfb(b, 0, b.length); + } + function fn(a) { + Vm(); + var b, c, d; + d = a.c.length; + switch (d) { + case 0: + return Um; + case 1: + b = BD(qr(new olb(a)), 42); + return ln(b.cd(), b.dd()); + default: + c = BD(Qkb(a, KC(CK, zie, 42, a.c.length, 0, 1)), 165); + return new wx(c); + } + } + function ITb(a) { + var b, c, d, e, f, g; + b = new jkb(); + c = new jkb(); + Wjb(b, a); + Wjb(c, a); + while (c.b != c.c) { + e = BD(fkb(c), 37); + for (g = new olb(e.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + if (f.e) { + d = f.e; + Wjb(b, d); + Wjb(c, d); + } + } + } + return b; + } + function Y_b(a, b) { + switch (b.g) { + case 1: + return Nq(a.j, (z0b(), v0b)); + case 2: + return Nq(a.j, (z0b(), t0b)); + case 3: + return Nq(a.j, (z0b(), x0b)); + case 4: + return Nq(a.j, (z0b(), y0b)); + default: + return mmb(), mmb(), jmb; + } + } + function tic(a, b) { + var c, d, e; + c = uic(b, a.e); + d = BD(Ohb(a.g.f, c), 19).a; + e = a.a.c.length - 1; + if (a.a.c.length != 0 && BD(Ikb(a.a, e), 287).c == d) { + ++BD(Ikb(a.a, e), 287).a; + ++BD(Ikb(a.a, e), 287).b; + } else { + Ekb(a.a, new Dic(d)); + } + } + function VGc(a, b, c) { + var d, e; + d = UGc(a, b, c); + if (d != 0) { + return d; + } + if (wNb(b, (wtc(), Zsc)) && wNb(c, Zsc)) { + e = beb(BD(vNb(b, Zsc), 19).a, BD(vNb(c, Zsc), 19).a); + e < 0 ? WGc(a, b, c) : e > 0 && WGc(a, c, b); + return e; + } + return TGc(a, b, c); + } + function MSc(a, b, c) { + var d, e, f, g; + if (b.b != 0) { + d = new Psb(); + for (g = Jsb(b, 0); g.b != g.d.c; ) { + f = BD(Xsb(g), 86); + ye(d, URc(f)); + e = f.e; + e.a = BD(vNb(f, (mTc(), kTc)), 19).a; + e.b = BD(vNb(f, lTc), 19).a; + } + MSc(a, d, Udd(c, d.b / a.a | 0)); + } + } + function JZc(a, b) { + var c, d, e, f, g; + if (a.e <= b) { + return a.g; + } + if (LZc(a, a.g, b)) { + return a.g; + } + f = a.r; + d = a.g; + g = a.r; + e = (f - d) / 2 + d; + while (d + 1 < f) { + c = MZc(a, e, false); + if (c.b <= e && c.a <= b) { + g = e; + f = e; + } else { + d = e; + } + e = (f - d) / 2 + d; + } + return g; + } + function t2c(a, b, c) { + var d; + d = o2c(a, b, true); + Odd(c, "Recursive Graph Layout", d); + jfd(b, OC(GC(g2, 1), Uhe, 527, 0, [new q3c()])); + ikd(b, (Y9c(), F9c)) || jfd(b, OC(GC(g2, 1), Uhe, 527, 0, [new U3c()])); + u2c(a, b, null, c); + Qdd(c); + } + function Qdd(a) { + var b; + if (a.p == null) { + throw vbb(new Zdb("The task has not begun yet.")); + } + if (!a.b) { + if (a.k) { + b = (Zfb(), Ibb(Cbb(Date.now()), _ie)); + a.q = Sbb(Qbb(b, a.o)) * 1e-9; + } + a.c < a.r && Rdd(a, a.r - a.c); + a.b = true; + } + } + function ofd(a) { + var b, c, d; + d = new s7c(); + Dsb(d, new f7c(a.j, a.k)); + for (c = new Fyd((!a.a && (a.a = new xMd(y2, a, 5)), a.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 469); + Dsb(d, new f7c(b.a, b.b)); + } + Dsb(d, new f7c(a.b, a.c)); + return d; + } + function qqd(a, b, c, d, e) { + var f, g, h, i, j, k; + if (e) { + i = e.a.length; + f = new Yge(i); + for (k = (f.b - f.a) * f.c < 0 ? (Xge(), Wge) : new she(f); k.Ob(); ) { + j = BD(k.Pb(), 19); + h = Zpd(e, j.a); + g = new prd(a, b, c, d); + rqd(g.a, g.b, g.c, g.d, h); + } + } + } + function Ax(b, c) { + var d; + if (PD(b) === PD(c)) { + return true; + } + if (JD(c, 21)) { + d = BD(c, 21); + try { + return b.gc() == d.gc() && b.Ic(d); + } catch (a) { + a = ubb(a); + if (JD(a, 173) || JD(a, 205)) { + return false; + } else + throw vbb(a); + } + } + return false; + } + function UHb(a, b) { + var c; + Ekb(a.d, b); + c = b.rf(); + if (a.c) { + a.e.a = $wnd.Math.max(a.e.a, c.a); + a.e.b += c.b; + a.d.c.length > 1 && (a.e.b += a.a); + } else { + a.e.a += c.a; + a.e.b = $wnd.Math.max(a.e.b, c.b); + a.d.c.length > 1 && (a.e.a += a.a); + } + } + function cmc(a) { + var b, c, d, e; + e = a.i; + b = e.b; + d = e.j; + c = e.g; + switch (e.a.g) { + case 0: + c.a = (a.g.b.o.a - d.a) / 2; + break; + case 1: + c.a = b.d.n.a + b.d.a.a; + break; + case 2: + c.a = b.d.n.a + b.d.a.a - d.a; + break; + case 3: + c.b = b.d.n.b + b.d.a.b; + } + } + function Q6c(a, b, c, d, e) { + if (d < b || e < c) { + throw vbb(new Wdb("The highx must be bigger then lowx and the highy must be bigger then lowy")); + } + a.a < b ? a.a = b : a.a > d && (a.a = d); + a.b < c ? a.b = c : a.b > e && (a.b = e); + return a; + } + function lsd(a) { + if (JD(a, 149)) { + return esd(BD(a, 149)); + } else if (JD(a, 229)) { + return fsd(BD(a, 229)); + } else if (JD(a, 23)) { + return gsd(BD(a, 23)); + } else { + throw vbb(new Wdb(Xte + Fe(new amb(OC(GC(SI, 1), Uhe, 1, 5, [a]))))); + } + } + function mhb(a, b, c, d, e) { + var f, g, h; + f = true; + for (g = 0; g < d; g++) { + f = f & c[g] == 0; + } + if (e == 0) { + $fb(c, d, a, 0, b); + g = b; + } else { + h = 32 - e; + f = f & c[g] << h == 0; + for (g = 0; g < b - 1; g++) { + a[g] = c[g + d] >>> e | c[g + d + 1] << h; + } + a[g] = c[g + d] >>> e; + ++g; + } + return f; + } + function zMc(a, b, c, d) { + var e, f, g; + if (b.k == (j0b(), g0b)) { + for (f = new Sr(ur(R_b(b).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + g = e.c.i.k; + if (g == g0b && a.c.a[e.c.i.c.p] == d && a.c.a[b.c.p] == c) { + return true; + } + } + } + return false; + } + function mD(a, b) { + var c, d, e, f; + b &= 63; + c = a.h & Fje; + if (b < 22) { + f = c >>> b; + e = a.m >> b | c << 22 - b; + d = a.l >> b | a.m << 22 - b; + } else if (b < 44) { + f = 0; + e = c >>> b - 22; + d = a.m >> b - 22 | a.h << 44 - b; + } else { + f = 0; + e = 0; + d = c >>> b - 44; + } + return TC(d & Eje, e & Eje, f & Fje); + } + function Iic(a, b, c, d) { + var e; + this.b = d; + this.e = a == (rGc(), pGc); + e = b[c]; + this.d = IC(sbb, [nie, dle], [177, 25], 16, [e.length, e.length], 2); + this.a = IC(WD, [nie, oje], [48, 25], 15, [e.length, e.length], 2); + this.c = new sic(b, c); + } + function ljc(a) { + var b, c, d; + a.k = new Ki((Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, a.j.c.length); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c = BD(mlb(d), 113); + b = c.d.j; + Rc(a.k, b, c); + } + a.e = Zjc(Ec(a.k)); + } + function UQc(a, b) { + var c, d, e; + Qqb(a.d, b); + c = new _Qc(); + Rhb(a.c, b, c); + c.f = VQc(b.c); + c.a = VQc(b.d); + c.d = (hQc(), e = b.c.i.k, e == (j0b(), h0b) || e == d0b); + c.e = (d = b.d.i.k, d == h0b || d == d0b); + c.b = b.c.j == (Ucd(), Tcd); + c.c = b.d.j == zcd; + } + function BGb(a) { + var b, c, d, e, f; + f = Ohe; + e = Ohe; + for (d = new olb(LFb(a)); d.a < d.c.c.length; ) { + c = BD(mlb(d), 213); + b = c.e.e - c.d.e; + c.e == a && b < e ? e = b : b < f && (f = b); + } + e == Ohe && (e = -1); + f == Ohe && (f = -1); + return new vgd(meb(e), meb(f)); + } + function zQb(a, b) { + var c, d, e; + e = dme; + d = (ROb(), OOb); + e = $wnd.Math.abs(a.b); + c = $wnd.Math.abs(b.f - a.b); + if (c < e) { + e = c; + d = POb; + } + c = $wnd.Math.abs(a.a); + if (c < e) { + e = c; + d = QOb; + } + c = $wnd.Math.abs(b.g - a.a); + if (c < e) { + e = c; + d = NOb; + } + return d; + } + function L9b(a, b) { + var c, d, e, f; + c = b.a.o.a; + f = new Jib(Q_b(b.a).b, b.c, b.f + 1); + for (e = new vib(f); e.b < e.d.gc(); ) { + d = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 29)); + if (d.c.a >= c) { + K9b(a, b, d.p); + return true; + } + } + return false; + } + function Iod(a) { + var b; + if ((a.Db & 64) != 0) + return fld(a); + b = new Wfb(dte); + !a.a || Qfb(Qfb((b.a += ' "', b), a.a), '"'); + Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a += " (", b), a.i), ","), a.j), " | "), a.g), ","), a.f), ")"); + return b.a; + } + function Z2d(a, b, c) { + var d, e, f, g, h; + h = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + d = 0; + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (h.rl(f.ak())) { + if (d == c) { + Xxd(a, g); + return Q6d(), BD(b, 66).Oj() ? f : f.dd(); + } + ++d; + } + } + throw vbb(new qcb(gve + c + mue + d)); + } + function sde(a) { + var b, c, d; + b = a.c; + if (b == 2 || b == 7 || b == 1) { + return wfe(), wfe(), ffe; + } else { + d = qde(a); + c = null; + while ((b = a.c) != 2 && b != 7 && b != 1) { + if (!c) { + c = (wfe(), wfe(), new Lge(1)); + Kge(c, d); + d = c; + } + Kge(c, qde(a)); + } + return d; + } + } + function Kb(a, b, c) { + if (a < 0 || a > c) { + return Jb(a, c, "start index"); + } + if (b < 0 || b > c) { + return Jb(b, c, "end index"); + } + return hc("end index (%s) must not be less than start index (%s)", OC(GC(SI, 1), Uhe, 1, 5, [meb(b), meb(a)])); + } + function Pz(b, c) { + var d, e, f, g; + for (e = 0, f = b.length; e < f; e++) { + g = b[e]; + try { + g[1] ? g[0].jm() && (c = Oz(c, g)) : g[0].jm(); + } catch (a) { + a = ubb(a); + if (JD(a, 78)) { + d = a; + Az(); + Gz(JD(d, 477) ? BD(d, 477).ae() : d); + } else + throw vbb(a); + } + } + return c; + } + function K9b(a, b, c) { + var d, e, f; + c != b.c + b.b.gc() && Z9b(b.a, fac(b, c - b.c)); + f = b.a.c.p; + a.a[f] = $wnd.Math.max(a.a[f], b.a.o.a); + for (e = BD(vNb(b.a, (wtc(), ktc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 70); + yNb(d, H9b, (Bcb(), true)); + } + } + function Wec(a, b) { + var c, d, e; + e = Vec(b); + yNb(b, (wtc(), Xsc), e); + if (e) { + d = Ohe; + !!irb(a.f, e) && (d = BD(Wd(irb(a.f, e)), 19).a); + c = BD(Ikb(b.g, 0), 17); + Ccb(DD(vNb(c, ltc))) || Rhb(a, e, meb($wnd.Math.min(BD(vNb(c, Zsc), 19).a, d))); + } + } + function iCc(a, b, c) { + var d, e, f, g, h; + b.p = -1; + for (h = W_b(b, (KAc(), IAc)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + for (e = new olb(g.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + f = d.d.i; + b != f && (f.p < 0 ? c.Fc(d) : f.p > 0 && iCc(a, f, c)); + } + } + b.p = 0; + } + function p5c(a) { + var b; + this.c = new Psb(); + this.f = a.e; + this.e = a.d; + this.i = a.g; + this.d = a.c; + this.b = a.b; + this.k = a.j; + this.a = a.a; + !a.i ? this.j = (b = BD(gdb(e1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)) : this.j = a.i; + this.g = a.f; + } + function Wb(a) { + var b, c, d, e; + b = Kfb(Qfb(new Wfb("Predicates."), "and"), 40); + c = true; + for (e = new vib(a); e.b < e.d.gc(); ) { + d = (sCb(e.b < e.d.gc()), e.d.Xb(e.c = e.b++)); + c || (b.a += ",", b); + b.a += "" + d; + c = false; + } + return (b.a += ")", b).a; + } + function Rcc(a, b, c) { + var d, e, f; + if (c <= b + 2) { + return; + } + e = (c - b) / 2 | 0; + for (d = 0; d < e; ++d) { + f = (tCb(b + d, a.c.length), BD(a.c[b + d], 11)); + Nkb(a, b + d, (tCb(c - d - 1, a.c.length), BD(a.c[c - d - 1], 11))); + tCb(c - d - 1, a.c.length); + a.c[c - d - 1] = f; + } + } + function hjc(a, b, c) { + var d, e, f, g, h, i, j, k; + f = a.d.p; + h = f.e; + i = f.r; + a.g = new dIc(i); + g = a.d.o.c.p; + d = g > 0 ? h[g - 1] : KC(OQ, kne, 10, 0, 0, 1); + e = h[g]; + j = g < h.length - 1 ? h[g + 1] : KC(OQ, kne, 10, 0, 0, 1); + k = b == c - 1; + k ? RHc(a.g, e, j) : RHc(a.g, d, e); + } + function pjc(a) { + var b; + this.j = new Rkb(); + this.f = new Tqb(); + this.b = (b = BD(gdb(F1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + this.d = KC(WD, oje, 25, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 15, 1); + this.g = a; + } + function QVc(a, b) { + var c, d, e; + if (b.c.length != 0) { + c = RVc(a, b); + e = false; + while (!c) { + AVc(a, b, true); + e = true; + c = RVc(a, b); + } + e && AVc(a, b, false); + d = dVc(b); + !!a.b && a.b.lg(d); + a.a = PVc(a, (tCb(0, b.c.length), BD(b.c[0], 33))); + QVc(a, d); + } + } + function Cid(a, b) { + var c, d, e; + d = XKd(a.Tg(), b); + c = b - a.Ah(); + if (c < 0) { + if (!d) { + throw vbb(new Wdb(mte + b + nte)); + } else if (d.Ij()) { + e = a.Yg(d); + e >= 0 ? a.Bh(e) : vid(a, d); + } else { + throw vbb(new Wdb(ite + d.ne() + jte)); + } + } else { + eid(a, c, d); + } + } + function aqd(a) { + var b, c; + c = null; + b = false; + if (JD(a, 204)) { + b = true; + c = BD(a, 204).a; + } + if (!b) { + if (JD(a, 258)) { + b = true; + c = "" + BD(a, 258).a; + } + } + if (!b) { + if (JD(a, 483)) { + b = true; + c = "" + BD(a, 483).a; + } + } + if (!b) { + throw vbb(new vcb(Ute)); + } + return c; + } + function ORd(a, b) { + var c, d; + if (a.f) { + while (b.Ob()) { + c = BD(b.Pb(), 72); + d = c.ak(); + if (JD(d, 99) && (BD(d, 18).Bb & ote) != 0 && (!a.e || d.Gj() != x2 || d.aj() != 0) && c.dd() != null) { + b.Ub(); + return true; + } + } + return false; + } else { + return b.Ob(); + } + } + function QRd(a, b) { + var c, d; + if (a.f) { + while (b.Sb()) { + c = BD(b.Ub(), 72); + d = c.ak(); + if (JD(d, 99) && (BD(d, 18).Bb & ote) != 0 && (!a.e || d.Gj() != x2 || d.aj() != 0) && c.dd() != null) { + b.Pb(); + return true; + } + } + return false; + } else { + return b.Sb(); + } + } + function I2d(a, b, c) { + var d, e, f, g, h, i; + i = S6d(a.e.Tg(), b); + d = 0; + h = a.i; + e = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (i.rl(f.ak())) { + if (c == d) { + return g; + } + ++d; + h = g + 1; + } + } + if (c == d) { + return h; + } else { + throw vbb(new qcb(gve + c + mue + d)); + } + } + function d9b(a, b) { + var c, d, e, f; + if (a.f.c.length == 0) { + return null; + } else { + f = new I6c(); + for (d = new olb(a.f); d.a < d.c.c.length; ) { + c = BD(mlb(d), 70); + e = c.o; + f.b = $wnd.Math.max(f.b, e.a); + f.a += e.b; + } + f.a += (a.f.c.length - 1) * b; + return f; + } + } + function QJc(a, b, c) { + var d, e, f; + for (e = new Sr(ur(O_b(c).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (!(!OZb(d) && !(!OZb(d) && d.c.i.c == d.d.i.c))) { + continue; + } + f = IJc(a, d, c, new vKc()); + f.c.length > 1 && (b.c[b.c.length] = f, true); + } + } + function TJc(a) { + var b, c, d, e; + c = new Psb(); + ye(c, a.o); + d = new twb(); + while (c.b != 0) { + b = BD(c.b == 0 ? null : (sCb(c.b != 0), Nsb(c, c.a.a)), 508); + e = KJc(a, b, true); + e && Ekb(d.a, b); + } + while (d.a.c.length != 0) { + b = BD(rwb(d), 508); + KJc(a, b, false); + } + } + function _5c() { + _5c = ccb; + $5c = new a6c(ole, 0); + T5c = new a6c("BOOLEAN", 1); + X5c = new a6c("INT", 2); + Z5c = new a6c("STRING", 3); + U5c = new a6c("DOUBLE", 4); + V5c = new a6c("ENUM", 5); + W5c = new a6c("ENUMSET", 6); + Y5c = new a6c("OBJECT", 7); + } + function H6c(a, b) { + var c, d, e, f, g; + d = $wnd.Math.min(a.c, b.c); + f = $wnd.Math.min(a.d, b.d); + e = $wnd.Math.max(a.c + a.b, b.c + b.b); + g = $wnd.Math.max(a.d + a.a, b.d + b.a); + if (e < d) { + c = d; + d = e; + e = c; + } + if (g < f) { + c = f; + f = g; + g = c; + } + G6c(a, d, f, e - d, g - f); + } + function O6d() { + O6d = ccb; + L6d = OC(GC(ZI, 1), nie, 2, 6, [swe, twe, uwe, vwe, wwe, xwe, eue]); + K6d = OC(GC(ZI, 1), nie, 2, 6, [swe, "empty", twe, Qve, "elementOnly"]); + N6d = OC(GC(ZI, 1), nie, 2, 6, [swe, "preserve", "replace", ywe]); + M6d = new y1d(); + } + function Y$b(a, b, c) { + var d, e, f; + if (b == c) { + return; + } + d = b; + do { + P6c(a, d.c); + e = d.e; + if (e) { + f = d.d; + O6c(a, f.b, f.d); + P6c(a, e.n); + d = Q_b(e); + } + } while (e); + d = c; + do { + c7c(a, d.c); + e = d.e; + if (e) { + f = d.d; + b7c(a, f.b, f.d); + c7c(a, e.n); + d = Q_b(e); + } + } while (e); + } + function qic(a, b, c, d) { + var e, f, g, h, i; + if (d.f.c + d.g.c == 0) { + for (g = a.a[a.c], h = 0, i = g.length; h < i; ++h) { + f = g[h]; + Rhb(d, f, new zic(a, f, c)); + } + } + e = BD(Wd(irb(d.f, b)), 663); + e.b = 0; + e.c = e.f; + e.c == 0 || Cic(BD(Ikb(e.a, e.b), 287)); + return e; + } + function Apc() { + Apc = ccb; + wpc = new Bpc("MEDIAN_LAYER", 0); + ypc = new Bpc("TAIL_LAYER", 1); + vpc = new Bpc("HEAD_LAYER", 2); + xpc = new Bpc("SPACE_EFFICIENT_LAYER", 3); + zpc = new Bpc("WIDEST_LAYER", 4); + upc = new Bpc("CENTER_LAYER", 5); + } + function rJb(a) { + switch (a.g) { + case 0: + case 1: + case 2: + return Ucd(), Acd; + case 3: + case 4: + case 5: + return Ucd(), Rcd; + case 6: + case 7: + case 8: + return Ucd(), Tcd; + case 9: + case 10: + case 11: + return Ucd(), zcd; + default: + return Ucd(), Scd; + } + } + function sKc(a, b) { + var c; + if (a.c.length == 0) { + return false; + } + c = Lzc((tCb(0, a.c.length), BD(a.c[0], 17)).c.i); + FJc(); + if (c == (Izc(), Fzc) || c == Ezc) { + return true; + } + return FAb(NAb(new YAb(null, new Kub(a, 16)), new AKc()), new CKc(b)); + } + function cRc(a, b, c) { + var d, e, f; + if (!a.b[b.g]) { + a.b[b.g] = true; + d = c; + !d && (d = new SRc()); + Dsb(d.b, b); + for (f = a.a[b.g].Kc(); f.Ob(); ) { + e = BD(f.Pb(), 188); + e.b != b && cRc(a, e.b, d); + e.c != b && cRc(a, e.c, d); + Dsb(d.a, e); + } + return d; + } + return null; + } + function qSc() { + qSc = ccb; + pSc = new rSc("ROOT_PROC", 0); + lSc = new rSc("FAN_PROC", 1); + nSc = new rSc("NEIGHBORS_PROC", 2); + mSc = new rSc("LEVEL_HEIGHT", 3); + oSc = new rSc("NODE_POSITION_PROC", 4); + kSc = new rSc("DETREEIFYING_PROC", 5); + } + function kqd(a, b) { + if (JD(b, 239)) { + return eqd(a, BD(b, 33)); + } else if (JD(b, 186)) { + return fqd(a, BD(b, 118)); + } else if (JD(b, 439)) { + return dqd(a, BD(b, 202)); + } else { + throw vbb(new Wdb(Xte + Fe(new amb(OC(GC(SI, 1), Uhe, 1, 5, [b]))))); + } + } + function xu(a, b, c) { + var d, e; + this.f = a; + d = BD(Ohb(a.b, b), 283); + e = !d ? 0 : d.a; + Sb(c, e); + if (c >= (e / 2 | 0)) { + this.e = !d ? null : d.c; + this.d = e; + while (c++ < e) { + vu(this); + } + } else { + this.c = !d ? null : d.b; + while (c-- > 0) { + uu(this); + } + } + this.b = b; + this.a = null; + } + function rEb(a, b) { + var c, d; + b.a ? sEb(a, b) : (c = BD(Exb(a.b, b.b), 57), !!c && c == a.a[b.b.f] && !!c.a && c.a != b.b.a && c.c.Fc(b.b), d = BD(Dxb(a.b, b.b), 57), !!d && a.a[d.f] == b.b && !!d.a && d.a != b.b.a && b.b.c.Fc(d), Fxb(a.b, b.b), void 0); + } + function FJb(a, b) { + var c, d; + c = BD(Mpb(a.b, b), 124); + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + c.n.b = 0; + c.n.c = 0; + return; + } + c.n.b = a.C.b; + c.n.c = a.C.c; + a.A.Hc((tdd(), sdd)) && KJb(a, b); + d = JJb(a, b); + KIb(a, b) == (Tbd(), Qbd) && (d += 2 * a.w); + c.a.a = d; + } + function OKb(a, b) { + var c, d; + c = BD(Mpb(a.b, b), 124); + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + c.n.d = 0; + c.n.a = 0; + return; + } + c.n.d = a.C.d; + c.n.a = a.C.a; + a.A.Hc((tdd(), sdd)) && SKb(a, b); + d = RKb(a, b); + KIb(a, b) == (Tbd(), Qbd) && (d += 2 * a.w); + c.a.b = d; + } + function cOb(a, b) { + var c, d, e, f; + f = new Rkb(); + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 65); + Ekb(f, new oOb(c, true)); + Ekb(f, new oOb(c, false)); + } + e = new hOb(a); + zwb(e.a.a); + kDb(f, a.b, new amb(OC(GC(JM, 1), Uhe, 679, 0, [e]))); + } + function rQb(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q; + i = a.a; + n = a.b; + j = b.a; + o2 = b.b; + k = c.a; + p = c.b; + l = d.a; + q = d.b; + f = i * o2 - n * j; + g = k * q - p * l; + e = (i - j) * (p - q) - (n - o2) * (k - l); + h = (f * (k - l) - g * (i - j)) / e; + m = (f * (p - q) - g * (n - o2)) / e; + return new f7c(h, m); + } + function TBc(a, b) { + var c, d, e; + if (a.d[b.p]) { + return; + } + a.d[b.p] = true; + a.a[b.p] = true; + for (d = new Sr(ur(U_b(b).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + if (OZb(c)) { + continue; + } + e = c.d.i; + a.a[e.p] ? Ekb(a.b, c) : TBc(a, e); + } + a.a[b.p] = false; + } + function pCc(a, b, c) { + var d; + d = 0; + switch (BD(vNb(b, (Nyc(), mxc)), 163).g) { + case 2: + d = 2 * -c + a.a; + ++a.a; + break; + case 1: + d = -c; + break; + case 3: + d = c; + break; + case 4: + d = 2 * c + a.b; + ++a.b; + } + wNb(b, (wtc(), Zsc)) && (d += BD(vNb(b, Zsc), 19).a); + return d; + } + function jOc(a, b, c) { + var d, e, f; + c.zc(b, a); + Ekb(a.n, b); + f = a.p.eg(b); + b.j == a.p.fg() ? yOc(a.e, f) : yOc(a.j, f); + lOc(a); + for (e = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(b), new R0b(b)]))); Qr(e); ) { + d = BD(Rr(e), 11); + c._b(d) || jOc(a, d, c); + } + } + function rfd(a) { + var b, c, d; + c = BD(hkd(a, (Y9c(), Y8c)), 21); + if (c.Hc((tdd(), pdd))) { + d = BD(hkd(a, b9c), 21); + b = new g7c(BD(hkd(a, _8c), 8)); + if (d.Hc((Idd(), Bdd))) { + b.a <= 0 && (b.a = 20); + b.b <= 0 && (b.b = 20); + } + return b; + } else { + return new d7c(); + } + } + function PKd(a) { + var b, c, d; + if (!a.b) { + d = new $Nd(); + for (c = new $yd(SKd(a)); c.e != c.i.gc(); ) { + b = BD(Zyd(c), 18); + (b.Bb & ote) != 0 && wtd(d, b); + } + vud(d); + a.b = new nNd((BD(qud(ZKd((NFd(), MFd).o), 8), 18), d.i), d.g); + $Kd(a).b &= -9; + } + return a.b; + } + function Rmc(a, b) { + var c, d, e, f, g, h, i, j; + i = BD(Ee(Ec(b.k), KC(F1, bne, 61, 2, 0, 1)), 122); + j = b.g; + c = Tmc(b, i[0]); + e = Smc(b, i[1]); + d = Kmc(a, j, c, e); + f = Tmc(b, i[1]); + h = Smc(b, i[0]); + g = Kmc(a, j, f, h); + if (d <= g) { + b.a = c; + b.c = e; + } else { + b.a = f; + b.c = h; + } + } + function ESc(a, b, c) { + var d, e, f; + Odd(c, "Processor set neighbors", 1); + a.a = b.b.b == 0 ? 1 : b.b.b; + e = null; + d = Jsb(b.b, 0); + while (!e && d.b != d.d.c) { + f = BD(Xsb(d), 86); + Ccb(DD(vNb(f, (mTc(), jTc)))) && (e = f); + } + !!e && FSc(a, new ZRc(e), c); + Qdd(c); + } + function PEd(a) { + IEd(); + var b, c, d, e; + d = hfb(a, wfb(35)); + b = d == -1 ? a : a.substr(0, d); + c = d == -1 ? null : a.substr(d + 1); + e = kFd(HEd, b); + if (!e) { + e = aFd(b); + lFd(HEd, b, e); + c != null && (e = JEd(e, c)); + } else + c != null && (e = JEd(e, (uCb(c), c))); + return e; + } + function smb(a) { + var h; + mmb(); + var b, c, d, e, f, g; + if (JD(a, 54)) { + for (e = 0, d = a.gc() - 1; e < d; ++e, --d) { + h = a.Xb(e); + a._c(e, a.Xb(d)); + a._c(d, h); + } + } else { + b = a.Yc(); + f = a.Zc(a.gc()); + while (b.Tb() < f.Vb()) { + c = b.Pb(); + g = f.Ub(); + b.Wb(g); + f.Wb(c); + } + } + } + function I3b(a, b) { + var c, d, e; + Odd(b, "End label pre-processing", 1); + c = Edb(ED(vNb(a, (Nyc(), nyc)))); + d = Edb(ED(vNb(a, ryc))); + e = gad(BD(vNb(a, Lwc), 103)); + MAb(LAb(new YAb(null, new Kub(a.b, 16)), new Q3b()), new S3b(c, d, e)); + Qdd(b); + } + function NFc(a, b) { + var c, d, e, f, g, h; + h = 0; + f = new jkb(); + Wjb(f, b); + while (f.b != f.c) { + g = BD(fkb(f), 214); + h += pHc(g.d, g.e); + for (e = new olb(g.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 37); + c = BD(Ikb(a.b, d.p), 214); + c.s || (h += NFc(a, c)); + } + } + return h; + } + function YQc(a, b, c) { + var d, e; + TQc(this); + b == (FQc(), DQc) ? Qqb(this.r, a.c) : Qqb(this.w, a.c); + c == DQc ? Qqb(this.r, a.d) : Qqb(this.w, a.d); + UQc(this, a); + d = VQc(a.c); + e = VQc(a.d); + XQc(this, d, e, e); + this.o = (hQc(), $wnd.Math.abs(d - e) < 0.2); + } + function a0d(a, b, c) { + var d, e, f, g, h, i; + h = BD(Ajd(a.a, 8), 1936); + if (h != null) { + for (e = h, f = 0, g = e.length; f < g; ++f) { + null.jm(); + } + } + d = c; + if ((a.a.Db & 1) == 0) { + i = new f0d(a, c, b); + d.ui(i); + } + JD(d, 672) ? BD(d, 672).wi(a.a) : d.ti() == a.a && d.vi(null); + } + function dae() { + var a; + if (Z9d) + return BD(nUd((yFd(), xFd), Ewe), 1945); + eae(); + a = BD(JD(Phb((yFd(), xFd), Ewe), 586) ? Phb(xFd, Ewe) : new cae(), 586); + Z9d = true; + aae(a); + bae(a); + Rhb((JFd(), IFd), a, new fae()); + Tnd(a); + Shb(xFd, Ewe, a); + return a; + } + function xA(a, b, c, d) { + var e; + e = oA(a, c, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje]), b); + e < 0 && (e = oA(a, c, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]), b)); + if (e < 0) { + return false; + } + d.d = e; + return true; + } + function AA(a, b, c, d) { + var e; + e = oA(a, c, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje]), b); + e < 0 && (e = oA(a, c, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]), b)); + if (e < 0) { + return false; + } + d.d = e; + return true; + } + function NVb(a) { + var b, c, d; + KVb(a); + d = new Rkb(); + for (c = new olb(a.a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + Ekb(d, new ZVb(b, true)); + Ekb(d, new ZVb(b, false)); + } + RVb(a.c); + rXb(d, a.b, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [a.c]))); + MVb(a); + } + function c4b(a) { + var b, c, d, e; + c = new Lqb(); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + b = BD(d.We((wtc(), Dsc)), 17); + !!irb(c.f, b) || Rhb(c, b, new p4b(b)); + Ekb(BD(Wd(irb(c.f, b)), 456).b, d); + } + return new Tkb(new $ib(c)); + } + function Gac(a, b) { + var c, d, e, f, g; + d = new kkb(a.j.c.length); + c = null; + for (f = new olb(a.j); f.a < f.c.c.length; ) { + e = BD(mlb(f), 11); + if (e.j != c) { + d.b == d.c || Hac(d, c, b); + Yjb(d); + c = e.j; + } + g = N3b(e); + !!g && (Xjb(d, g), true); + } + d.b == d.c || Hac(d, c, b); + } + function wbc(a, b) { + var c, d, e; + d = new Bib(a.b, 0); + while (d.b < d.d.gc()) { + c = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 70)); + e = BD(vNb(c, (Nyc(), Qwc)), 272); + if (e == (qad(), oad)) { + uib(d); + Ekb(b.b, c); + wNb(c, (wtc(), Dsc)) || yNb(c, Dsc, a); + } + } + } + function GDc(a) { + var b, c, d, e, f; + b = sr(new Sr(ur(U_b(a).a.Kc(), new Sq()))); + for (e = new Sr(ur(R_b(a).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + c = d.c.i; + f = sr(new Sr(ur(U_b(c).a.Kc(), new Sq()))); + b = $wnd.Math.max(b, f); + } + return meb(b); + } + function rUc(a, b, c) { + var d, e, f, g; + Odd(c, "Processor arrange node", 1); + e = null; + f = new Psb(); + d = Jsb(b.b, 0); + while (!e && d.b != d.d.c) { + g = BD(Xsb(d), 86); + Ccb(DD(vNb(g, (mTc(), jTc)))) && (e = g); + } + Gsb(f, e, f.c.b, f.c); + qUc(a, f, Udd(c, 1)); + Qdd(c); + } + function Ffd(a, b, c) { + var d, e, f; + d = BD(hkd(a, (Y9c(), w8c)), 21); + e = 0; + f = 0; + b.a > c.a && (d.Hc((i8c(), c8c)) ? e = (b.a - c.a) / 2 : d.Hc(e8c) && (e = b.a - c.a)); + b.b > c.b && (d.Hc((i8c(), g8c)) ? f = (b.b - c.b) / 2 : d.Hc(f8c) && (f = b.b - c.b)); + Efd(a, e, f); + } + function aod(a, b, c, d, e, f, g, h, i, j, k, l, m) { + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 4); + pnd(a, c); + a.f = g; + dJd(a, h); + fJd(a, i); + ZId(a, j); + eJd(a, k); + CId(a, l); + aJd(a, m); + BId(a, true); + AId(a, e); + a.ok(f); + yId(a, b); + d != null && (a.i = null, _Id(a, d)); + } + function PRd(a) { + var b, c; + if (a.f) { + while (a.n > 0) { + b = BD(a.k.Xb(a.n - 1), 72); + c = b.ak(); + if (JD(c, 99) && (BD(c, 18).Bb & ote) != 0 && (!a.e || c.Gj() != x2 || c.aj() != 0) && b.dd() != null) { + return true; + } else { + --a.n; + } + } + return false; + } else { + return a.n > 0; + } + } + function Jb(a, b, c) { + if (a < 0) { + return hc(The, OC(GC(SI, 1), Uhe, 1, 5, [c, meb(a)])); + } else if (b < 0) { + throw vbb(new Wdb(Vhe + b)); + } else { + return hc("%s (%s) must not be greater than size (%s)", OC(GC(SI, 1), Uhe, 1, 5, [c, meb(a), meb(b)])); + } + } + function Llb(a, b, c, d, e, f) { + var g, h, i, j; + g = d - c; + if (g < 7) { + Ilb(b, c, d, f); + return; + } + i = c + e; + h = d + e; + j = i + (h - i >> 1); + Llb(b, a, i, j, -e, f); + Llb(b, a, j, h, -e, f); + if (f.ue(a[j - 1], a[j]) <= 0) { + while (c < d) { + NC(b, c++, a[i++]); + } + return; + } + Jlb(a, i, j, h, b, c, d, f); + } + function nEb(a, b) { + var c, d, e; + e = new Rkb(); + for (d = new olb(a.c.a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 57); + if (b.Lb(c)) { + Ekb(e, new BEb(c, true)); + Ekb(e, new BEb(c, false)); + } + } + tEb(a.e); + kDb(e, a.d, new amb(OC(GC(JM, 1), Uhe, 679, 0, [a.e]))); + } + function gnc(a, b) { + var c, d, e, f, g, h, i; + i = b.d; + e = b.b.j; + for (h = new olb(i); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f = KC(sbb, dle, 25, e.c.length, 16, 1); + Rhb(a.b, g, f); + c = g.a.d.p - 1; + d = g.c.d.p; + while (c != d) { + c = (c + 1) % e.c.length; + f[c] = true; + } + } + } + function tOc(a, b) { + a.r = new uOc(a.p); + sOc(a.r, a); + ye(a.r.j, a.j); + Osb(a.j); + Dsb(a.j, b); + Dsb(a.r.e, b); + lOc(a); + lOc(a.r); + while (a.f.c.length != 0) { + AOc(BD(Ikb(a.f, 0), 129)); + } + while (a.k.c.length != 0) { + AOc(BD(Ikb(a.k, 0), 129)); + } + return a.r; + } + function yid(a, b, c) { + var d, e, f; + e = XKd(a.Tg(), b); + d = b - a.Ah(); + if (d < 0) { + if (!e) { + throw vbb(new Wdb(mte + b + nte)); + } else if (e.Ij()) { + f = a.Yg(e); + f >= 0 ? a.sh(f, c) : uid(a, e, c); + } else { + throw vbb(new Wdb(ite + e.ne() + jte)); + } + } else { + did(a, d, e, c); + } + } + function q6d(b) { + var c, d, e, f; + d = BD(b, 49).qh(); + if (d) { + try { + e = null; + c = nUd((yFd(), xFd), LEd(MEd(d))); + if (c) { + f = c.rh(); + !!f && (e = f.Wk(tfb(d.e))); + } + if (!!e && e != b) { + return q6d(e); + } + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } + return b; + } + function jrb(a, b, c) { + var d, e, f, g; + g = b == null ? 0 : a.b.se(b); + e = (d = a.a.get(g), d == null ? new Array() : d); + if (e.length == 0) { + a.a.set(g, e); + } else { + f = grb(a, b, e); + if (f) { + return f.ed(c); + } + } + NC(e, e.length, new pjb(b, c)); + ++a.c; + zpb(a.b); + return null; + } + function YUc(a, b) { + var c, d; + H2c(a.a); + K2c(a.a, (PUc(), NUc), NUc); + K2c(a.a, OUc, OUc); + d = new j3c(); + e3c(d, OUc, (tVc(), sVc)); + PD(hkd(b, (ZWc(), LWc))) !== PD((pWc(), mWc)) && e3c(d, OUc, qVc); + e3c(d, OUc, rVc); + E2c(a.a, d); + c = F2c(a.a, b); + return c; + } + function uC(a) { + if (!a) { + return OB(), NB; + } + var b = a.valueOf ? a.valueOf() : a; + if (b !== a) { + var c = qC[typeof b]; + return c ? c(b) : xC(typeof b); + } else if (a instanceof Array || a instanceof $wnd.Array) { + return new xB(a); + } else { + return new fC(a); + } + } + function RJb(a, b, c) { + var d, e, f; + f = a.o; + d = BD(Mpb(a.p, c), 244); + e = d.i; + e.b = gIb(d); + e.a = fIb(d); + e.b = $wnd.Math.max(e.b, f.a); + e.b > f.a && !b && (e.b = f.a); + e.c = -(e.b - f.a) / 2; + switch (c.g) { + case 1: + e.d = -e.a; + break; + case 3: + e.d = f.b; + } + hIb(d); + iIb(d); + } + function SJb(a, b, c) { + var d, e, f; + f = a.o; + d = BD(Mpb(a.p, c), 244); + e = d.i; + e.b = gIb(d); + e.a = fIb(d); + e.a = $wnd.Math.max(e.a, f.b); + e.a > f.b && !b && (e.a = f.b); + e.d = -(e.a - f.b) / 2; + switch (c.g) { + case 4: + e.c = -e.b; + break; + case 2: + e.c = f.a; + } + hIb(d); + iIb(d); + } + function Jgc(a, b) { + var c, d, e, f, g; + if (b.dc()) { + return; + } + e = BD(b.Xb(0), 128); + if (b.gc() == 1) { + Igc(a, e, e, 1, 0, b); + return; + } + c = 1; + while (c < b.gc()) { + if (e.j || !e.o) { + f = Ogc(b, c); + if (f) { + d = BD(f.a, 19).a; + g = BD(f.b, 128); + Igc(a, e, g, c, d, b); + c = d + 1; + e = g; + } + } + } + } + function mlc(a) { + var b, c, d, e, f, g; + g = new Tkb(a.d); + Okb(g, new Qlc()); + b = (Alc(), OC(GC(KV, 1), Kie, 270, 0, [tlc, wlc, slc, zlc, vlc, ulc, ylc, xlc])); + c = 0; + for (f = new olb(g); f.a < f.c.c.length; ) { + e = BD(mlb(f), 101); + d = b[c % b.length]; + olc(e, d); + ++c; + } + } + function o6c(a, b) { + i6c(); + var c, d, e, f; + if (b.b < 2) { + return false; + } + f = Jsb(b, 0); + c = BD(Xsb(f), 8); + d = c; + while (f.b != f.d.c) { + e = BD(Xsb(f), 8); + if (!(m6c(a, d) && m6c(a, e))) { + return false; + } + d = e; + } + if (!(m6c(a, d) && m6c(a, c))) { + return false; + } + return true; + } + function hrd(a, b) { + var c, d, e, f, g, h, i, j, k, l; + k = null; + l = a; + g = Xpd(l, "x"); + c = new Krd(b); + Gqd(c.a, g); + h = Xpd(l, "y"); + d = new Lrd(b); + Hqd(d.a, h); + i = Xpd(l, Gte); + e = new Mrd(b); + Iqd(e.a, i); + j = Xpd(l, Fte); + f = new Nrd(b); + k = (Jqd(f.a, j), j); + return k; + } + function XMd(a, b) { + TMd(a, b); + (a.b & 1) != 0 && (a.a.a = null); + (a.b & 2) != 0 && (a.a.f = null); + if ((a.b & 4) != 0) { + a.a.g = null; + a.a.i = null; + } + if ((a.b & 16) != 0) { + a.a.d = null; + a.a.e = null; + } + (a.b & 8) != 0 && (a.a.b = null); + if ((a.b & 32) != 0) { + a.a.j = null; + a.a.c = null; + } + } + function l0d(b, c) { + var d, e, f; + f = 0; + if (c.length > 0) { + try { + f = Icb(c, Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + e = a; + throw vbb(new rFd(e)); + } else + throw vbb(a); + } + } + d = (!b.a && (b.a = new z0d(b)), b.a); + return f < d.i && f >= 0 ? BD(qud(d, f), 56) : null; + } + function Ib(a, b) { + if (a < 0) { + return hc(The, OC(GC(SI, 1), Uhe, 1, 5, ["index", meb(a)])); + } else if (b < 0) { + throw vbb(new Wdb(Vhe + b)); + } else { + return hc("%s (%s) must be less than size (%s)", OC(GC(SI, 1), Uhe, 1, 5, ["index", meb(a), meb(b)])); + } + } + function Slb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + !f.a ? f.a = new Wfb(f.d) : Qfb(f.a, f.b); + Nfb(f.a, "" + b); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function Tlb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + !f.a ? f.a = new Wfb(f.d) : Qfb(f.a, f.b); + Nfb(f.a, "" + b); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function Ulb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + !f.a ? f.a = new Wfb(f.d) : Qfb(f.a, f.b); + Nfb(f.a, "" + b); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function Xlb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + !f.a ? f.a = new Wfb(f.d) : Qfb(f.a, f.b); + Nfb(f.a, "" + b); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function bub(a, b) { + var c, d, e, f, g, h; + c = a.b.c.length; + e = Ikb(a.b, b); + while (b * 2 + 1 < c) { + d = (f = 2 * b + 1, g = f + 1, h = f, g < c && a.a.ue(Ikb(a.b, g), Ikb(a.b, f)) < 0 && (h = g), h); + if (a.a.ue(e, Ikb(a.b, d)) < 0) { + break; + } + Nkb(a.b, b, Ikb(a.b, d)); + b = d; + } + Nkb(a.b, b, e); + } + function $Bb(a, b, c, d, e, f) { + var g, h, i, j, k; + if (PD(a) === PD(c)) { + a = a.slice(b, b + e); + b = 0; + } + i = c; + for (h = b, j = b + e; h < j; ) { + g = $wnd.Math.min(h + 1e4, j); + e = g - h; + k = a.slice(h, g); + k.splice(0, 0, d, f ? e : 0); + Array.prototype.splice.apply(i, k); + h = g; + d += e; + } + } + function xGb(a, b, c) { + var d, e; + d = c.d; + e = c.e; + if (a.g[d.d] <= a.i[b.d] && a.i[b.d] <= a.i[d.d] && a.g[e.d] <= a.i[b.d] && a.i[b.d] <= a.i[e.d]) { + if (a.i[d.d] < a.i[e.d]) { + return false; + } + return true; + } + if (a.i[d.d] < a.i[e.d]) { + return true; + } + return false; + } + function cRb(a) { + var b, c, d, e, f, g, h; + d = a.a.c.length; + if (d > 0) { + g = a.c.d; + h = a.d.d; + e = Y6c(c7c(new f7c(h.a, h.b), g), 1 / (d + 1)); + f = new f7c(g.a, g.b); + for (c = new olb(a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 559); + b.d.a = f.a; + b.d.b = f.b; + P6c(f, e); + } + } + } + function YNb(a, b, c) { + var d, e, f, g, h, i; + i = Pje; + for (f = new olb(wOb(a.b)); f.a < f.c.c.length; ) { + e = BD(mlb(f), 168); + for (h = new olb(wOb(b.b)); h.a < h.c.c.length; ) { + g = BD(mlb(h), 168); + d = p6c(e.a, e.b, g.a, g.b, c); + i = $wnd.Math.min(i, d); + } + } + return i; + } + function G0b(a, b) { + if (!b) { + throw vbb(new Geb()); + } + a.j = b; + if (!a.d) { + switch (a.j.g) { + case 1: + a.a.a = a.o.a / 2; + a.a.b = 0; + break; + case 2: + a.a.a = a.o.a; + a.a.b = a.o.b / 2; + break; + case 3: + a.a.a = a.o.a / 2; + a.a.b = a.o.b; + break; + case 4: + a.a.a = 0; + a.a.b = a.o.b / 2; + } + } + } + function dfc(a, b) { + var c, d, e; + if (JD(b.g, 10) && BD(b.g, 10).k == (j0b(), e0b)) { + return Pje; + } + e = ugc(b); + if (e) { + return $wnd.Math.max(0, a.b / 2 - 0.5); + } + c = tgc(b); + if (c) { + d = Edb(ED(pBc(c, (Nyc(), vyc)))); + return $wnd.Math.max(0, d / 2 - 0.5); + } + return Pje; + } + function ffc(a, b) { + var c, d, e; + if (JD(b.g, 10) && BD(b.g, 10).k == (j0b(), e0b)) { + return Pje; + } + e = ugc(b); + if (e) { + return $wnd.Math.max(0, a.b / 2 - 0.5); + } + c = tgc(b); + if (c) { + d = Edb(ED(pBc(c, (Nyc(), vyc)))); + return $wnd.Math.max(0, d / 2 - 0.5); + } + return Pje; + } + function xic(a) { + var b, c, d, e, f, g; + g = CHc(a.d, a.e); + for (f = g.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 11); + d = a.e == (Ucd(), Tcd) ? e.e : e.g; + for (c = new olb(d); c.a < c.c.c.length; ) { + b = BD(mlb(c), 17); + if (!OZb(b) && b.c.i.c != b.d.i.c) { + tic(a, b); + ++a.f; + ++a.c; + } + } + } + } + function tpc(a, b) { + var c, d; + if (b.dc()) { + return mmb(), mmb(), jmb; + } + d = new Rkb(); + Ekb(d, meb(Rie)); + for (c = 1; c < a.f; ++c) { + a.a == null && Toc(a); + a.a[c] && Ekb(d, meb(c)); + } + if (d.c.length == 1) { + return mmb(), mmb(), jmb; + } + Ekb(d, meb(Ohe)); + return spc(b, d); + } + function MJc(a, b) { + var c, d, e, f, g, h, i; + g = b.c.i.k != (j0b(), h0b); + i = g ? b.d : b.c; + c = MZb(b, i).i; + e = BD(Ohb(a.k, i), 121); + d = a.i[c.p].a; + if (S_b(i.i) < (!c.c ? -1 : Jkb(c.c.a, c, 0))) { + f = e; + h = d; + } else { + f = d; + h = e; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 4), f), h)); + } + function oqd(a, b, c) { + var d, e, f, g, h, i; + if (c) { + e = c.a.length; + d = new Yge(e); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + i = Wqd(a, Vpd(tB(c, g.a))); + if (i) { + f = (!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b); + wtd(f, i); + } + } + } + } + function pqd(a, b, c) { + var d, e, f, g, h, i; + if (c) { + e = c.a.length; + d = new Yge(e); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + i = Wqd(a, Vpd(tB(c, g.a))); + if (i) { + f = (!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c); + wtd(f, i); + } + } + } + } + function po(a, b, c) { + var d, e; + d = b.a & a.f; + b.b = a.b[d]; + a.b[d] = b; + e = b.f & a.f; + b.d = a.c[e]; + a.c[e] = b; + if (!c) { + b.e = a.e; + b.c = null; + !a.e ? a.a = b : a.e.c = b; + a.e = b; + } else { + b.e = c.e; + !b.e ? a.a = b : b.e.c = b; + b.c = c.c; + !b.c ? a.e = b : b.c.e = b; + } + ++a.i; + ++a.g; + } + function qr(a) { + var b, c, d; + b = a.Pb(); + if (!a.Ob()) { + return b; + } + d = Pfb(Qfb(new Ufb(), "expected one element but was: <"), b); + for (c = 0; c < 4 && a.Ob(); c++) { + Pfb((d.a += She, d), a.Pb()); + } + a.Ob() && (d.a += ", ...", d); + d.a += ">"; + throw vbb(new Wdb(d.a)); + } + function lt(a, b) { + var c; + b.d ? b.d.b = b.b : a.a = b.b; + b.b ? b.b.d = b.d : a.e = b.d; + if (!b.e && !b.c) { + c = BD(Thb(a.b, b.a), 283); + c.a = 0; + ++a.c; + } else { + c = BD(Ohb(a.b, b.a), 283); + --c.a; + !b.e ? c.b = b.c : b.e.c = b.c; + !b.c ? c.c = b.e : b.c.e = b.e; + } + --a.d; + } + function OA(a) { + var b, c; + c = -a.a; + b = OC(GC(TD, 1), $ie, 25, 15, [43, 48, 48, 48, 48]); + if (c < 0) { + b[0] = 45; + c = -c; + } + b[1] = b[1] + ((c / 60 | 0) / 10 | 0) & aje; + b[2] = b[2] + (c / 60 | 0) % 10 & aje; + b[3] = b[3] + (c % 60 / 10 | 0) & aje; + b[4] = b[4] + c % 10 & aje; + return zfb(b, 0, b.length); + } + function uRb(a, b, c) { + var d, e; + d = b.d; + e = c.d; + while (d.a - e.a == 0 && d.b - e.b == 0) { + d.a += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + d.b += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + e.a += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + e.b += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + } + } + function N_b(a) { + var b, c, d, e; + a.g = new Rpb(BD(Qb(F1), 290)); + d = 0; + c = (Ucd(), Acd); + b = 0; + for (; b < a.j.c.length; b++) { + e = BD(Ikb(a.j, b), 11); + if (e.j != c) { + d != b && Npb(a.g, c, new vgd(meb(d), meb(b))); + c = e.j; + d = b; + } + } + Npb(a.g, c, new vgd(meb(d), meb(b))); + } + function d4b(a) { + var b, c, d, e, f, g, h; + d = 0; + for (c = new olb(a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 29); + for (f = new olb(b.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + e.p = d++; + for (h = new olb(e.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + g.p = d++; + } + } + } + } + function qPc(a, b, c, d, e) { + var f, g, h, i, j; + if (b) { + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + for (j = X_b(g, (KAc(), IAc), c).Kc(); j.Ob(); ) { + i = BD(j.Pb(), 11); + f = BD(Wd(irb(e.f, i)), 112); + if (!f) { + f = new uOc(a.d); + d.c[d.c.length] = f; + jOc(f, i, e); + } + } + } + } + } + function vid(a, b) { + var c, d, e; + e = e1d((O6d(), M6d), a.Tg(), b); + if (e) { + Q6d(); + BD(e, 66).Oj() || (e = _1d(q1d(M6d, e))); + d = (c = a.Yg(e), BD(c >= 0 ? a._g(c, true, true) : sid(a, e, true), 153)); + BD(d, 215).ol(b); + } else { + throw vbb(new Wdb(ite + b.ne() + jte)); + } + } + function ugb(a) { + var b, c; + if (a > -140737488355328 && a < 140737488355328) { + if (a == 0) { + return 0; + } + b = a < 0; + b && (a = -a); + c = QD($wnd.Math.floor($wnd.Math.log(a) / 0.6931471805599453)); + (!b || a != $wnd.Math.pow(2, c)) && ++c; + return c; + } + return vgb(Cbb(a)); + } + function QOc(a) { + var b, c, d, e, f, g, h; + f = new zsb(); + for (c = new olb(a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 129); + g = b.a; + h = b.b; + if (f.a._b(g) || f.a._b(h)) { + continue; + } + e = g; + d = h; + if (g.e.b + g.j.b > 2 && h.e.b + h.j.b <= 2) { + e = h; + d = g; + } + f.a.zc(e, f); + e.q = d; + } + return f; + } + function K5b(a, b) { + var c, d, e; + d = new b0b(a); + tNb(d, b); + yNb(d, (wtc(), Gsc), b); + yNb(d, (Nyc(), Vxc), (dcd(), $bd)); + yNb(d, mwc, (F7c(), B7c)); + __b(d, (j0b(), e0b)); + c = new H0b(); + F0b(c, d); + G0b(c, (Ucd(), Tcd)); + e = new H0b(); + F0b(e, d); + G0b(e, zcd); + return d; + } + function Spc(a) { + switch (a.g) { + case 0: + return new fGc((rGc(), oGc)); + case 1: + return new CFc(); + case 2: + return new fHc(); + default: + throw vbb(new Wdb("No implementation is available for the crossing minimizer " + (a.f != null ? a.f : "" + a.g))); + } + } + function tDc(a, b) { + var c, d, e, f, g; + a.c[b.p] = true; + Ekb(a.a, b); + for (g = new olb(b.j); g.a < g.c.c.length; ) { + f = BD(mlb(g), 11); + for (d = new b1b(f.b); llb(d.a) || llb(d.b); ) { + c = BD(llb(d.a) ? mlb(d.a) : mlb(d.b), 17); + e = uDc(f, c).i; + a.c[e.p] || tDc(a, e); + } + } + } + function _Uc(a) { + var b, c, d, e, f, g, h; + g = 0; + for (c = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 33); + h = b.g; + e = b.f; + d = $wnd.Math.sqrt(h * h + e * e); + g = $wnd.Math.max(d, g); + f = _Uc(b); + g = $wnd.Math.max(f, g); + } + return g; + } + function rcd() { + rcd = ccb; + pcd = new scd("OUTSIDE", 0); + ncd = new scd("INSIDE", 1); + ocd = new scd("NEXT_TO_PORT_IF_POSSIBLE", 2); + mcd = new scd("ALWAYS_SAME_SIDE", 3); + lcd = new scd("ALWAYS_OTHER_SAME_SIDE", 4); + qcd = new scd("SPACE_EFFICIENT", 5); + } + function drd(a, b, c) { + var d, e, f, h, i, j; + d = Tqd(a, (e = (Fhd(), f = new apd(), f), !!c && $od(e, c), e), b); + Lkd(d, _pd(b, Vte)); + grd(b, d); + brd(b, d); + hrd(b, d); + h = b; + i = Ypd(h, "ports"); + j = new Jrd(a, d); + Fqd(j.a, j.b, i); + crd(a, b, d); + Zqd(a, b, d); + return d; + } + function NA(a) { + var b, c; + c = -a.a; + b = OC(GC(TD, 1), $ie, 25, 15, [43, 48, 48, 58, 48, 48]); + if (c < 0) { + b[0] = 45; + c = -c; + } + b[1] = b[1] + ((c / 60 | 0) / 10 | 0) & aje; + b[2] = b[2] + (c / 60 | 0) % 10 & aje; + b[4] = b[4] + (c % 60 / 10 | 0) & aje; + b[5] = b[5] + c % 10 & aje; + return zfb(b, 0, b.length); + } + function QA(a) { + var b; + b = OC(GC(TD, 1), $ie, 25, 15, [71, 77, 84, 45, 48, 48, 58, 48, 48]); + if (a <= 0) { + b[3] = 43; + a = -a; + } + b[4] = b[4] + ((a / 60 | 0) / 10 | 0) & aje; + b[5] = b[5] + (a / 60 | 0) % 10 & aje; + b[7] = b[7] + (a % 60 / 10 | 0) & aje; + b[8] = b[8] + a % 10 & aje; + return zfb(b, 0, b.length); + } + function Vlb(a) { + var b, c, d, e, f; + if (a == null) { + return Xhe; + } + f = new xwb(She, "[", "]"); + for (c = a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + !f.a ? f.a = new Wfb(f.d) : Qfb(f.a, f.b); + Nfb(f.a, "" + Ubb(b)); + } + return !f.a ? f.c : f.e.length == 0 ? f.a.a : f.a.a + ("" + f.e); + } + function DGb(a, b) { + var c, d, e; + e = Ohe; + for (d = new olb(LFb(b)); d.a < d.c.c.length; ) { + c = BD(mlb(d), 213); + if (c.f && !a.c[c.c]) { + a.c[c.c] = true; + e = $wnd.Math.min(e, DGb(a, xFb(c, b))); + } + } + a.i[b.d] = a.j; + a.g[b.d] = $wnd.Math.min(e, a.j++); + return a.g[b.d]; + } + function EKb(a, b) { + var c, d, e; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.e.b = (c = d.b, c.Xe((Y9c(), s9c)) ? c.Hf() == (Ucd(), Acd) ? -c.rf().b - Edb(ED(c.We(s9c))) : Edb(ED(c.We(s9c))) : c.Hf() == (Ucd(), Acd) ? -c.rf().b : 0); + } + } + function LPb(a) { + var b, c, d, e, f, g, h; + c = IOb(a.e); + f = Y6c(b7c(R6c(HOb(a.e)), a.d * a.a, a.c * a.b), -0.5); + b = c.a - f.a; + e = c.b - f.b; + for (h = 0; h < a.c; h++) { + d = b; + for (g = 0; g < a.d; g++) { + JOb(a.e, new J6c(d, e, a.a, a.b)) && aNb(a, g, h, false, true); + d += a.a; + } + e += a.b; + } + } + function s2c(a) { + var b, c, d; + if (Ccb(DD(hkd(a, (Y9c(), M8c))))) { + d = new Rkb(); + for (c = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 79); + Qld(b) && Ccb(DD(hkd(b, N8c))) && (d.c[d.c.length] = b, true); + } + return d; + } else { + return mmb(), mmb(), jmb; + } + } + function Vpd(a) { + var b, c; + c = false; + if (JD(a, 204)) { + c = true; + return BD(a, 204).a; + } + if (!c) { + if (JD(a, 258)) { + b = BD(a, 258).a % 1 == 0; + if (b) { + c = true; + return meb(Idb(BD(a, 258).a)); + } + } + } + throw vbb(new cqd("Id must be a string or an integer: '" + a + "'.")); + } + function k0d(a, b) { + var c, d, e, f, g, h; + f = null; + for (e = new x0d((!a.a && (a.a = new z0d(a)), a.a)); u0d(e); ) { + c = BD(Vud(e), 56); + d = (g = c.Tg(), h = (OKd(g), g.o), !h || !c.mh(h) ? null : h6d(KJd(h), c.ah(h))); + if (d != null) { + if (dfb(d, b)) { + f = c; + break; + } + } + } + return f; + } + function Bw(a, b, c) { + var d, e, f, g, h; + Xj(c, "occurrences"); + if (c == 0) { + return h = BD(Hv(nd(a.a), b), 14), !h ? 0 : h.gc(); + } + g = BD(Hv(nd(a.a), b), 14); + if (!g) { + return 0; + } + f = g.gc(); + if (c >= f) { + g.$b(); + } else { + e = g.Kc(); + for (d = 0; d < c; d++) { + e.Pb(); + e.Qb(); + } + } + return f; + } + function ax(a, b, c) { + var d, e, f, g; + Xj(c, "oldCount"); + Xj(0, "newCount"); + d = BD(Hv(nd(a.a), b), 14); + if ((!d ? 0 : d.gc()) == c) { + Xj(0, "count"); + e = (f = BD(Hv(nd(a.a), b), 14), !f ? 0 : f.gc()); + g = -e; + g > 0 ? zh() : g < 0 && Bw(a, b, -g); + return true; + } else { + return false; + } + } + function fIb(a) { + var b, c, d, e, f, g, h; + h = 0; + if (a.b == 0) { + g = jIb(a, true); + b = 0; + for (d = g, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + if (c > 0) { + h += c; + ++b; + } + } + b > 1 && (h += a.c * (b - 1)); + } else { + h = Mtb(Zzb(OAb(JAb(Plb(a.a), new xIb()), new zIb()))); + } + return h > 0 ? h + a.n.d + a.n.a : 0; + } + function gIb(a) { + var b, c, d, e, f, g, h; + h = 0; + if (a.b == 0) { + h = Mtb(Zzb(OAb(JAb(Plb(a.a), new tIb()), new vIb()))); + } else { + g = kIb(a, true); + b = 0; + for (d = g, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + if (c > 0) { + h += c; + ++b; + } + } + b > 1 && (h += a.c * (b - 1)); + } + return h > 0 ? h + a.n.b + a.n.c : 0; + } + function MJb(a, b) { + var c, d, e, f; + f = BD(Mpb(a.b, b), 124); + c = f.a; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + !!d.c && (c.a = $wnd.Math.max(c.a, ZHb(d.c))); + } + if (c.a > 0) { + switch (b.g) { + case 2: + f.n.c = a.s; + break; + case 4: + f.n.b = a.s; + } + } + } + function NQb(a, b) { + var c, d, e; + c = BD(vNb(b, (wSb(), oSb)), 19).a - BD(vNb(a, oSb), 19).a; + if (c == 0) { + d = c7c(R6c(BD(vNb(a, (HSb(), DSb)), 8)), BD(vNb(a, ESb), 8)); + e = c7c(R6c(BD(vNb(b, DSb), 8)), BD(vNb(b, ESb), 8)); + return Kdb(d.a * d.b, e.a * e.b); + } + return c; + } + function iRc(a, b) { + var c, d, e; + c = BD(vNb(b, (JTc(), ETc)), 19).a - BD(vNb(a, ETc), 19).a; + if (c == 0) { + d = c7c(R6c(BD(vNb(a, (mTc(), VSc)), 8)), BD(vNb(a, WSc), 8)); + e = c7c(R6c(BD(vNb(b, VSc), 8)), BD(vNb(b, WSc), 8)); + return Kdb(d.a * d.b, e.a * e.b); + } + return c; + } + function TZb(a) { + var b, c; + c = new Ufb(); + c.a += "e_"; + b = KZb(a); + b != null && (c.a += "" + b, c); + if (!!a.c && !!a.d) { + Qfb((c.a += " ", c), C0b(a.c)); + Qfb(Pfb((c.a += "[", c), a.c.i), "]"); + Qfb((c.a += gne, c), C0b(a.d)); + Qfb(Pfb((c.a += "[", c), a.d.i), "]"); + } + return c.a; + } + function zRc(a) { + switch (a.g) { + case 0: + return new lUc(); + case 1: + return new sUc(); + case 2: + return new CUc(); + case 3: + return new IUc(); + default: + throw vbb(new Wdb("No implementation is available for the layout phase " + (a.f != null ? a.f : "" + a.g))); + } + } + function mfd(a, b, c, d, e) { + var f; + f = 0; + switch (e.g) { + case 1: + f = $wnd.Math.max(0, b.b + a.b - (c.b + d)); + break; + case 3: + f = $wnd.Math.max(0, -a.b - d); + break; + case 2: + f = $wnd.Math.max(0, -a.a - d); + break; + case 4: + f = $wnd.Math.max(0, b.a + a.a - (c.a + d)); + } + return f; + } + function mqd(a, b, c) { + var d, e, f, g, h; + if (c) { + e = c.a.length; + d = new Yge(e); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + f = Zpd(c, g.a); + Lte in f.a || Mte in f.a ? $qd(a, f, b) : erd(a, f, b); + otd(BD(Ohb(a.b, Wpd(f)), 79)); + } + } + } + function LJd(a) { + var b, c; + switch (a.b) { + case -1: { + return true; + } + case 0: { + c = a.t; + if (c > 1 || c == -1) { + a.b = -1; + return true; + } else { + b = wId(a); + if (!!b && (Q6d(), b.Cj() == Bve)) { + a.b = -1; + return true; + } else { + a.b = 1; + return false; + } + } + } + default: + case 1: { + return false; + } + } + } + function k1d(a, b) { + var c, d, e, f, g; + d = (!b.s && (b.s = new cUd(t5, b, 21, 17)), b.s); + f = null; + for (e = 0, g = d.i; e < g; ++e) { + c = BD(qud(d, e), 170); + switch ($1d(q1d(a, c))) { + case 2: + case 3: { + !f && (f = new Rkb()); + f.c[f.c.length] = c; + } + } + } + return !f ? (mmb(), mmb(), jmb) : f; + } + function tde(a, b) { + var c, d, e, f; + nde(a); + if (a.c != 0 || a.a != 123) + throw vbb(new mde(tvd((h0d(), Fue)))); + f = b == 112; + d = a.d; + c = gfb(a.i, 125, d); + if (c < 0) + throw vbb(new mde(tvd((h0d(), Gue)))); + e = qfb(a.i, d, c); + a.d = c + 1; + return Lfe(e, f, (a.e & 512) == 512); + } + function QTb(a) { + var b; + b = BD(vNb(a, (Nyc(), Iwc)), 314); + if (b == (Rpc(), Ppc)) { + throw vbb(new z2c("The hierarchy aware processor " + b + " in child node " + a + " is only allowed if the root node specifies the same hierarchical processor.")); + } + } + function dhc(a, b) { + Hgc(); + var c, d, e, f, g, h; + c = null; + for (g = b.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 128); + if (f.o) { + continue; + } + d = F6c(f.a); + e = C6c(f.a); + h = new hic(d, e, null, BD(f.d.a.ec().Kc().Pb(), 17)); + Ekb(h.c, f.a); + a.c[a.c.length] = h; + !!c && Ekb(c.d, h); + c = h; + } + } + function hKd(a, b) { + var c, d, e; + if (!b) { + jKd(a, null); + _Jd(a, null); + } else if ((b.i & 4) != 0) { + d = "[]"; + for (c = b.c; ; c = c.c) { + if ((c.i & 4) == 0) { + e = jfb((fdb(c), c.o + d)); + jKd(a, e); + _Jd(a, e); + break; + } + d += "[]"; + } + } else { + e = jfb((fdb(b), b.o)); + jKd(a, e); + _Jd(a, e); + } + a.yk(b); + } + function b3d(a, b, c, d, e) { + var f, g, h, i; + i = a3d(a, BD(e, 56)); + if (PD(i) !== PD(e)) { + h = BD(a.g[c], 72); + f = R6d(b, i); + mud(a, c, t3d(a, c, f)); + if (oid(a.e)) { + g = H2d(a, 9, f.ak(), e, i, d, false); + Qwd(g, new pSd(a.e, 9, a.c, h, f, d, false)); + Rwd(g); + } + return i; + } + return e; + } + function xCc(a, b, c) { + var d, e, f, g, h, i; + d = BD(Qc(a.c, b), 15); + e = BD(Qc(a.c, c), 15); + f = d.Zc(d.gc()); + g = e.Zc(e.gc()); + while (f.Sb() && g.Sb()) { + h = BD(f.Ub(), 19); + i = BD(g.Ub(), 19); + if (h != i) { + return beb(h.a, i.a); + } + } + return !f.Ob() && !g.Ob() ? 0 : f.Ob() ? 1 : -1; + } + function m5c(c, d) { + var e, f, g; + try { + g = fs(c.a, d); + return g; + } catch (b) { + b = ubb(b); + if (JD(b, 32)) { + try { + f = Icb(d, Rie, Ohe); + e = gdb(c.a); + if (f >= 0 && f < e.length) { + return e[f]; + } + } catch (a) { + a = ubb(a); + if (!JD(a, 127)) + throw vbb(a); + } + return null; + } else + throw vbb(b); + } + } + function tid(a, b) { + var c, d, e; + e = e1d((O6d(), M6d), a.Tg(), b); + if (e) { + Q6d(); + BD(e, 66).Oj() || (e = _1d(q1d(M6d, e))); + d = (c = a.Yg(e), BD(c >= 0 ? a._g(c, true, true) : sid(a, e, true), 153)); + return BD(d, 215).ll(b); + } else { + throw vbb(new Wdb(ite + b.ne() + lte)); + } + } + function BZd() { + tZd(); + var a; + if (sZd) + return BD(nUd((yFd(), xFd), _ve), 1939); + rEd(CK, new J_d()); + CZd(); + a = BD(JD(Phb((yFd(), xFd), _ve), 547) ? Phb(xFd, _ve) : new AZd(), 547); + sZd = true; + yZd(a); + zZd(a); + Rhb((JFd(), IFd), a, new EZd()); + Shb(xFd, _ve, a); + return a; + } + function v2d(a, b) { + var c, d, e, f; + a.j = -1; + if (oid(a.e)) { + c = a.i; + f = a.i != 0; + lud(a, b); + d = new pSd(a.e, 3, a.c, null, b, c, f); + e = b.Qk(a.e, a.c, null); + e = h3d(a, b, e); + if (!e) { + Uhd(a.e, d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + lud(a, b); + e = b.Qk(a.e, a.c, null); + !!e && e.Fi(); + } + } + function rA(a, b) { + var c, d, e; + e = 0; + d = b[0]; + if (d >= a.length) { + return -1; + } + c = (BCb(d, a.length), a.charCodeAt(d)); + while (c >= 48 && c <= 57) { + e = e * 10 + (c - 48); + ++d; + if (d >= a.length) { + break; + } + c = (BCb(d, a.length), a.charCodeAt(d)); + } + d > b[0] ? b[0] = d : e = -1; + return e; + } + function vMb(a) { + var b, c, d, e, f; + e = BD(a.a, 19).a; + f = BD(a.b, 19).a; + c = e; + d = f; + b = $wnd.Math.max($wnd.Math.abs(e), $wnd.Math.abs(f)); + if (e <= 0 && e == f) { + c = 0; + d = f - 1; + } else { + if (e == -b && f != b) { + c = f; + d = e; + f >= 0 && ++c; + } else { + c = -f; + d = e; + } + } + return new vgd(meb(c), meb(d)); + } + function fNb(a, b, c, d) { + var e, f, g, h, i, j; + for (e = 0; e < b.o; e++) { + f = e - b.j + c; + for (g = 0; g < b.p; g++) { + h = g - b.k + d; + if ((i = f, j = h, i += a.j, j += a.k, i >= 0 && j >= 0 && i < a.o && j < a.p) && (!ZMb(b, e, g) && hNb(a, f, h) || YMb(b, e, g) && !iNb(a, f, h))) { + return true; + } + } + } + return false; + } + function LNc(a, b, c) { + var d, e, f, g, h; + g = a.c; + h = a.d; + f = l7c(OC(GC(m1, 1), nie, 8, 0, [g.i.n, g.n, g.a])).b; + e = (f + l7c(OC(GC(m1, 1), nie, 8, 0, [h.i.n, h.n, h.a])).b) / 2; + d = null; + g.j == (Ucd(), zcd) ? d = new f7c(b + g.i.c.c.a + c, e) : d = new f7c(b - c, e); + St(a.a, 0, d); + } + function Qld(a) { + var b, c, d, e; + b = null; + for (d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)]))); Qr(d); ) { + c = BD(Rr(d), 82); + e = atd(c); + if (!b) { + b = e; + } else if (b != e) { + return false; + } + } + return true; + } + function sud(a, b, c) { + var d; + ++a.j; + if (b >= a.i) + throw vbb(new qcb(lue + b + mue + a.i)); + if (c >= a.i) + throw vbb(new qcb(nue + c + mue + a.i)); + d = a.g[c]; + if (b != c) { + b < c ? $fb(a.g, b, a.g, b + 1, c - b) : $fb(a.g, c + 1, a.g, c, b - c); + NC(a.g, b, d); + a.ei(b, d, c); + a.ci(); + } + return d; + } + function Rc(a, b, c) { + var d; + d = BD(a.c.xc(b), 14); + if (!d) { + d = a.ic(b); + if (d.Fc(c)) { + ++a.d; + a.c.zc(b, d); + return true; + } else { + throw vbb(new ycb("New Collection violated the Collection spec")); + } + } else if (d.Fc(c)) { + ++a.d; + return true; + } else { + return false; + } + } + function heb(a) { + var b, c, d; + if (a < 0) { + return 0; + } else if (a == 0) { + return 32; + } else { + d = -(a >> 16); + b = d >> 16 & 16; + c = 16 - b; + a = a >> b; + d = a - 256; + b = d >> 16 & 8; + c += b; + a <<= b; + d = a - Rje; + b = d >> 16 & 4; + c += b; + a <<= b; + d = a - oie; + b = d >> 16 & 2; + c += b; + a <<= b; + d = a >> 14; + b = d & ~(d >> 1); + return c + 2 - b; + } + } + function $Pb(a) { + QPb(); + var b, c, d, e; + PPb = new Rkb(); + OPb = new Lqb(); + NPb = new Rkb(); + b = (!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a); + SPb(b); + for (e = new Fyd(b); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + if (Jkb(PPb, d, 0) == -1) { + c = new Rkb(); + Ekb(NPb, c); + TPb(d, c); + } + } + return NPb; + } + function BQb(a, b, c) { + var d, e, f, g; + a.a = c.b.d; + if (JD(b, 352)) { + e = itd(BD(b, 79), false, false); + f = ofd(e); + d = new FQb(a); + reb(f, d); + ifd(f, e); + b.We((Y9c(), Q8c)) != null && reb(BD(b.We(Q8c), 74), d); + } else { + g = BD(b, 470); + g.Hg(g.Dg() + a.a.a); + g.Ig(g.Eg() + a.a.b); + } + } + function _5b(a, b) { + var c, d, e, f, g, h, i, j; + j = Edb(ED(vNb(b, (Nyc(), zyc)))); + i = a[0].n.a + a[0].o.a + a[0].d.c + j; + for (h = 1; h < a.length; h++) { + d = a[h].n; + e = a[h].o; + c = a[h].d; + f = d.a - c.b - i; + f < 0 && (d.a -= f); + g = b.f; + g.a = $wnd.Math.max(g.a, d.a + e.a); + i = d.a + e.a + c.c + j; + } + } + function D$c(a, b) { + var c, d, e, f, g, h; + d = BD(BD(Ohb(a.g, b.a), 46).a, 65); + e = BD(BD(Ohb(a.g, b.b), 46).a, 65); + f = d.b; + g = e.b; + c = z6c(f, g); + if (c >= 0) { + return c; + } + h = U6c(c7c(new f7c(g.c + g.b / 2, g.d + g.a / 2), new f7c(f.c + f.b / 2, f.d + f.a / 2))); + return -(xOb(f, g) - 1) * h; + } + function ufd(a, b, c) { + var d; + MAb(new YAb(null, (!c.a && (c.a = new cUd(A2, c, 6, 6)), new Kub(c.a, 16))), new Mfd(a, b)); + MAb(new YAb(null, (!c.n && (c.n = new cUd(D2, c, 1, 7)), new Kub(c.n, 16))), new Ofd(a, b)); + d = BD(hkd(c, (Y9c(), Q8c)), 74); + !!d && p7c(d, a, b); + } + function sid(a, b, c) { + var d, e, f; + f = e1d((O6d(), M6d), a.Tg(), b); + if (f) { + Q6d(); + BD(f, 66).Oj() || (f = _1d(q1d(M6d, f))); + e = (d = a.Yg(f), BD(d >= 0 ? a._g(d, true, true) : sid(a, f, true), 153)); + return BD(e, 215).hl(b, c); + } else { + throw vbb(new Wdb(ite + b.ne() + lte)); + } + } + function wAd(a, b, c, d) { + var e, f, g, h, i; + e = a.d[b]; + if (e) { + f = e.g; + i = e.i; + if (d != null) { + for (h = 0; h < i; ++h) { + g = BD(f[h], 133); + if (g.Sh() == c && pb(d, g.cd())) { + return g; + } + } + } else { + for (h = 0; h < i; ++h) { + g = BD(f[h], 133); + if (PD(g.cd()) === PD(d)) { + return g; + } + } + } + } + return null; + } + function Pgb(a, b) { + var c; + if (b < 0) { + throw vbb(new ocb("Negative exponent")); + } + if (b == 0) { + return Cgb; + } else if (b == 1 || Kgb(a, Cgb) || Kgb(a, Ggb)) { + return a; + } + if (!Sgb(a, 0)) { + c = 1; + while (!Sgb(a, c)) { + ++c; + } + return Ogb(bhb(c * b), Pgb(Rgb(a, c), b)); + } + return Jhb(a, b); + } + function xlb(a, b) { + var c, d, e; + if (PD(a) === PD(b)) { + return true; + } + if (a == null || b == null) { + return false; + } + if (a.length != b.length) { + return false; + } + for (c = 0; c < a.length; ++c) { + d = a[c]; + e = b[c]; + if (!(PD(d) === PD(e) || d != null && pb(d, e))) { + return false; + } + } + return true; + } + function CVb(a) { + nVb(); + var b, c, d; + this.b = mVb; + this.c = (ead(), cad); + this.f = (iVb(), hVb); + this.a = a; + zVb(this, new DVb()); + sVb(this); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 81); + if (!c.d) { + b = new gVb(OC(GC(IP, 1), Uhe, 81, 0, [c])); + Ekb(a.a, b); + } + } + } + function D3b(a, b, c) { + var d, e, f, g, h, i; + if (!a || a.c.length == 0) { + return null; + } + f = new cIb(b, !c); + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 70); + UHb(f, (a$b(), new v$b(d))); + } + g = f.i; + g.a = (i = f.n, f.e.b + i.d + i.a); + g.b = (h = f.n, f.e.a + h.b + h.c); + return f; + } + function O5b(a) { + var b, c, d, e, f, g, h; + h = l_b(a.a); + Nlb(h, new T5b()); + c = null; + for (e = h, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + if (d.k != (j0b(), e0b)) { + break; + } + b = BD(vNb(d, (wtc(), Hsc)), 61); + if (b != (Ucd(), Tcd) && b != zcd) { + continue; + } + !!c && BD(vNb(c, Qsc), 15).Fc(d); + c = d; + } + } + function YOc(a, b, c) { + var d, e, f, g, h, i, j; + i = (tCb(b, a.c.length), BD(a.c[b], 329)); + Kkb(a, b); + if (i.b / 2 >= c) { + d = b; + j = (i.c + i.a) / 2; + g = j - c; + if (i.c <= j - c) { + e = new bPc(i.c, g); + Dkb(a, d++, e); + } + h = j + c; + if (h <= i.a) { + f = new bPc(h, i.a); + wCb(d, a.c.length); + aCb(a.c, d, f); + } + } + } + function u0d(a) { + var b; + if (!a.c && a.g == null) { + a.d = a.si(a.f); + wtd(a, a.d); + b = a.d; + } else { + if (a.g == null) { + return true; + } else if (a.i == 0) { + return false; + } else { + b = BD(a.g[a.i - 1], 47); + } + } + if (b == a.b && null.km >= null.jm()) { + Vud(a); + return u0d(a); + } else { + return b.Ob(); + } + } + function KTb(a, b, c) { + var d, e, f, g, h; + h = c; + !h && (h = Ydd(new Zdd(), 0)); + Odd(h, Vme, 1); + aUb(a.c, b); + g = EYb(a.a, b); + if (g.gc() == 1) { + MTb(BD(g.Xb(0), 37), h); + } else { + f = 1 / g.gc(); + for (e = g.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + MTb(d, Udd(h, f)); + } + } + CYb(a.a, g, b); + NTb(b); + Qdd(h); + } + function qYb(a) { + this.a = a; + if (a.c.i.k == (j0b(), e0b)) { + this.c = a.c; + this.d = BD(vNb(a.c.i, (wtc(), Hsc)), 61); + } else if (a.d.i.k == e0b) { + this.c = a.d; + this.d = BD(vNb(a.d.i, (wtc(), Hsc)), 61); + } else { + throw vbb(new Wdb("Edge " + a + " is not an external edge.")); + } + } + function oQd(a, b) { + var c, d, e; + e = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, e, a.b)); + if (!b) { + pnd(a, null); + qQd(a, 0); + pQd(a, null); + } else if (b != a) { + pnd(a, b.zb); + qQd(a, b.d); + c = (d = b.c, d == null ? b.zb : d); + pQd(a, c == null || dfb(c, b.zb) ? null : c); + } + } + function NRd(a) { + var b, c; + if (a.f) { + while (a.n < a.o) { + b = BD(!a.j ? a.k.Xb(a.n) : a.j.pi(a.n), 72); + c = b.ak(); + if (JD(c, 99) && (BD(c, 18).Bb & ote) != 0 && (!a.e || c.Gj() != x2 || c.aj() != 0) && b.dd() != null) { + return true; + } else { + ++a.n; + } + } + return false; + } else { + return a.n < a.o; + } + } + function _i(a, b) { + var c; + this.e = (im(), Qb(a), im(), nm(a)); + this.c = (Qb(b), nm(b)); + Lb(this.e.Hd().dc() == this.c.Hd().dc()); + this.d = Ev(this.e); + this.b = Ev(this.c); + c = IC(SI, [nie, Uhe], [5, 1], 5, [this.e.Hd().gc(), this.c.Hd().gc()], 2); + this.a = c; + Ri(this); + } + function vz(b) { + !tz && (tz = wz()), tz; + var d = b.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g, function(a) { + return uz(a); + }); + return '"' + d + '"'; + } + function cEb(a) { + ODb(); + var b, c; + this.b = LDb; + this.c = NDb; + this.g = (FDb(), EDb); + this.d = (ead(), cad); + this.a = a; + RDb(this); + for (c = new olb(a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + !b.a && pDb(rDb(new sDb(), OC(GC(PM, 1), Uhe, 57, 0, [b])), a); + b.e = new K6c(b.d); + } + } + function HQb(a) { + var b, c, d, e, f, g; + e = a.e.c.length; + d = KC(yK, eme, 15, e, 0, 1); + for (g = new olb(a.e); g.a < g.c.c.length; ) { + f = BD(mlb(g), 144); + d[f.b] = new Psb(); + } + for (c = new olb(a.c); c.a < c.c.c.length; ) { + b = BD(mlb(c), 282); + d[b.c.b].Fc(b); + d[b.d.b].Fc(b); + } + return d; + } + function fDc(a) { + var b, c, d, e, f, g, h; + h = Pu(a.c.length); + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + g = new Tqb(); + f = U_b(d); + for (c = new Sr(ur(f.a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + b.c.i == b.d.i || Qqb(g, b.d.i); + } + h.c[h.c.length] = g; + } + return h; + } + function ozd(a, b) { + var c, d, e, f, g; + c = BD(Ajd(a.a, 4), 126); + g = c == null ? 0 : c.length; + if (b >= g) + throw vbb(new Cyd(b, g)); + e = c[b]; + if (g == 1) { + d = null; + } else { + d = KC($3, hve, 415, g - 1, 0, 1); + $fb(c, 0, d, 0, b); + f = g - b - 1; + f > 0 && $fb(c, b + 1, d, b, f); + } + b0d(a, d); + a0d(a, b, e); + return e; + } + function m8d() { + m8d = ccb; + k8d = BD(qud(ZKd((r8d(), q8d).qb), 6), 34); + h8d = BD(qud(ZKd(q8d.qb), 3), 34); + i8d = BD(qud(ZKd(q8d.qb), 4), 34); + j8d = BD(qud(ZKd(q8d.qb), 5), 18); + XId(k8d); + XId(h8d); + XId(i8d); + XId(j8d); + l8d = new amb(OC(GC(t5, 1), Mve, 170, 0, [k8d, h8d])); + } + function AJb(a, b) { + var c; + this.d = new H_b(); + this.b = b; + this.e = new g7c(b.qf()); + c = a.u.Hc((rcd(), ocd)); + a.u.Hc(ncd) ? a.D ? this.a = c && !b.If() : this.a = true : a.u.Hc(pcd) ? c ? this.a = !(b.zf().Kc().Ob() || b.Bf().Kc().Ob()) : this.a = false : this.a = false; + } + function IKb(a, b) { + var c, d, e, f; + c = a.o.a; + for (f = BD(BD(Qc(a.r, b), 21), 84).Kc(); f.Ob(); ) { + e = BD(f.Pb(), 111); + e.e.a = (d = e.b, d.Xe((Y9c(), s9c)) ? d.Hf() == (Ucd(), Tcd) ? -d.rf().a - Edb(ED(d.We(s9c))) : c + Edb(ED(d.We(s9c))) : d.Hf() == (Ucd(), Tcd) ? -d.rf().a : c); + } + } + function Q1b(a, b) { + var c, d, e, f; + c = BD(vNb(a, (Nyc(), Lwc)), 103); + f = BD(hkd(b, $xc), 61); + e = BD(vNb(a, Vxc), 98); + if (e != (dcd(), bcd) && e != ccd) { + if (f == (Ucd(), Scd)) { + f = lfd(b, c); + f == Scd && (f = Zcd(c)); + } + } else { + d = M1b(b); + d > 0 ? f = Zcd(c) : f = Wcd(Zcd(c)); + } + jkd(b, $xc, f); + } + function olc(a, b) { + var c, d, e, f, g; + g = a.j; + b.a != b.b && Okb(g, new Ulc()); + e = g.c.length / 2 | 0; + for (d = 0; d < e; d++) { + f = (tCb(d, g.c.length), BD(g.c[d], 113)); + f.c && G0b(f.d, b.a); + } + for (c = e; c < g.c.length; c++) { + f = (tCb(c, g.c.length), BD(g.c[c], 113)); + f.c && G0b(f.d, b.b); + } + } + function TGc(a, b, c) { + var d, e, f; + d = a.c[b.c.p][b.p]; + e = a.c[c.c.p][c.p]; + if (d.a != null && e.a != null) { + f = Ddb(d.a, e.a); + f < 0 ? WGc(a, b, c) : f > 0 && WGc(a, c, b); + return f; + } else if (d.a != null) { + WGc(a, b, c); + return -1; + } else if (e.a != null) { + WGc(a, c, b); + return 1; + } + return 0; + } + function swd(a, b) { + var c, d, e, f; + if (a.ej()) { + c = a.Vi(); + f = a.fj(); + ++a.j; + a.Hi(c, a.oi(c, b)); + d = a.Zi(3, null, b, c, f); + if (a.bj()) { + e = a.cj(b, null); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + Bvd(a, b); + if (a.bj()) { + e = a.cj(b, null); + !!e && e.Fi(); + } + } + } + function D2d(a, b) { + var c, d, e, f, g; + g = S6d(a.e.Tg(), b); + e = new yud(); + c = BD(a.g, 119); + for (f = a.i; --f >= 0; ) { + d = c[f]; + g.rl(d.ak()) && wtd(e, d); + } + !Yxd(a, e) && oid(a.e) && GLd(a, b.$j() ? H2d(a, 6, b, (mmb(), jmb), null, -1, false) : H2d(a, b.Kj() ? 2 : 1, b, null, null, -1, false)); + } + function Dhb() { + Dhb = ccb; + var a, b; + Bhb = KC(cJ, nie, 91, 32, 0, 1); + Chb = KC(cJ, nie, 91, 32, 0, 1); + a = 1; + for (b = 0; b <= 18; b++) { + Bhb[b] = ghb(a); + Chb[b] = ghb(Nbb(a, b)); + a = Ibb(a, 5); + } + for (; b < Chb.length; b++) { + Bhb[b] = Ogb(Bhb[b - 1], Bhb[1]); + Chb[b] = Ogb(Chb[b - 1], (Hgb(), Egb)); + } + } + function K4b(a, b) { + var c, d, e, f, g; + if (a.a == (yrc(), wrc)) { + return true; + } + f = b.a.c; + c = b.a.c + b.a.b; + if (b.j) { + d = b.A; + g = d.c.c.a - d.o.a / 2; + e = f - (d.n.a + d.o.a); + if (e > g) { + return false; + } + } + if (b.q) { + d = b.C; + g = d.c.c.a - d.o.a / 2; + e = d.n.a - c; + if (e > g) { + return false; + } + } + return true; + } + function wcc(a, b) { + var c; + Odd(b, "Partition preprocessing", 1); + c = BD(GAb(JAb(LAb(JAb(new YAb(null, new Kub(a.a, 16)), new Acc()), new Ccc()), new Ecc()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + MAb(c.Oc(), new Gcc()); + Qdd(b); + } + function DMc(a) { + wMc(); + var b, c, d, e, f, g, h; + c = new $rb(); + for (e = new olb(a.e.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + for (g = new olb(d.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + h = a.g[f.p]; + b = BD(Wrb(c, h), 15); + if (!b) { + b = new Rkb(); + Xrb(c, h, b); + } + b.Fc(f); + } + } + return c; + } + function dRc(a, b) { + var c, d, e, f, g; + e = b.b.b; + a.a = KC(yK, eme, 15, e, 0, 1); + a.b = KC(sbb, dle, 25, e, 16, 1); + for (g = Jsb(b.b, 0); g.b != g.d.c; ) { + f = BD(Xsb(g), 86); + a.a[f.g] = new Psb(); + } + for (d = Jsb(b.a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 188); + a.a[c.b.g].Fc(c); + a.a[c.c.g].Fc(c); + } + } + function qmd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (startX: "; + Bfb(b, a.j); + b.a += ", startY: "; + Bfb(b, a.k); + b.a += ", endX: "; + Bfb(b, a.b); + b.a += ", endY: "; + Bfb(b, a.c); + b.a += ", identifier: "; + Efb(b, a.d); + b.a += ")"; + return b.a; + } + function EId(a) { + var b; + if ((a.Db & 64) != 0) + return qnd(a); + b = new Jfb(qnd(a)); + b.a += " (ordered: "; + Ffb(b, (a.Bb & 256) != 0); + b.a += ", unique: "; + Ffb(b, (a.Bb & 512) != 0); + b.a += ", lowerBound: "; + Cfb(b, a.s); + b.a += ", upperBound: "; + Cfb(b, a.t); + b.a += ")"; + return b.a; + } + function Wnd(a, b, c, d, e, f, g, h) { + var i; + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 4); + pnd(a, c); + a.f = d; + dJd(a, e); + fJd(a, f); + ZId(a, g); + eJd(a, false); + CId(a, true); + aJd(a, h); + BId(a, true); + AId(a, 0); + a.b = 0; + DId(a, 1); + i = xId(a, b, null); + !!i && i.Fi(); + MJd(a, false); + return a; + } + function fyb(a, b) { + var c, d, e, f; + c = BD(Phb(a.a, b), 512); + if (!c) { + d = new wyb(b); + e = (oyb(), lyb) ? null : d.c; + f = qfb(e, 0, $wnd.Math.max(0, kfb(e, wfb(46)))); + vyb(d, fyb(a, f)); + (lyb ? null : d.c).length == 0 && qyb(d, new zyb()); + Shb(a.a, lyb ? null : d.c, d); + return d; + } + return c; + } + function BOb(a, b) { + var c; + a.b = b; + a.g = new Rkb(); + c = COb(a.b); + a.e = c; + a.f = c; + a.c = Ccb(DD(vNb(a.b, (fFb(), $Eb)))); + a.a = ED(vNb(a.b, (Y9c(), r8c))); + a.a == null && (a.a = 1); + Edb(a.a) > 1 ? a.e *= Edb(a.a) : a.f /= Edb(a.a); + DOb(a); + EOb(a); + AOb(a); + yNb(a.b, (CPb(), uPb), a.g); + } + function Y5b(a, b, c) { + var d, e, f, g, h, i; + d = 0; + i = c; + if (!b) { + d = c * (a.c.length - 1); + i *= -1; + } + for (f = new olb(a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + yNb(e, (Nyc(), mwc), (F7c(), B7c)); + e.o.a = d; + for (h = Y_b(e, (Ucd(), zcd)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + g.n.a = d; + } + d += i; + } + } + function Qxd(a, b, c) { + var d, e, f; + if (a.ej()) { + f = a.fj(); + kud(a, b, c); + d = a.Zi(3, null, c, b, f); + if (a.bj()) { + e = a.cj(c, null); + a.ij() && (e = a.jj(c, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + kud(a, b, c); + if (a.bj()) { + e = a.cj(c, null); + !!e && e.Fi(); + } + } + } + function ILd(a, b, c) { + var d, e, f, g, h, i; + h = a.Gk(c); + if (h != c) { + g = a.g[b]; + i = h; + mud(a, b, a.oi(b, i)); + f = g; + a.gi(b, i, f); + if (a.rk()) { + d = c; + e = a.dj(d, null); + !BD(h, 49).eh() && (e = a.cj(i, e)); + !!e && e.Fi(); + } + oid(a.e) && GLd(a, a.Zi(9, c, h, b, false)); + return h; + } else { + return c; + } + } + function pVb(a, b) { + var c, d, e, f; + for (d = new olb(a.a.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 189); + c.g = true; + } + for (f = new olb(a.a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 81); + e.k = Ccb(DD(a.e.Kb(new vgd(e, b)))); + e.d.g = e.d.g & Ccb(DD(a.e.Kb(new vgd(e, b)))); + } + return a; + } + function pkc(a) { + var b, c, d, e, f; + c = (b = BD(gdb(F1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + f = BD(vNb(a, (wtc(), gtc)), 10); + if (f) { + for (e = new olb(f.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + PD(vNb(d, $sc)) === PD(a) && a1b(new b1b(d.b)) && rqb(c, d.j); + } + } + return c; + } + function zCc(a, b, c) { + var d, e, f, g, h; + if (a.d[c.p]) { + return; + } + for (e = new Sr(ur(U_b(c).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + h = d.d.i; + for (g = new Sr(ur(R_b(h).a.Kc(), new Sq())); Qr(g); ) { + f = BD(Rr(g), 17); + f.c.i == b && (a.a[f.p] = true); + } + zCc(a, b, h); + } + a.d[c.p] = true; + } + function Bjd(a, b) { + var c, d, e, f, g, h, i; + d = aeb(a.Db & 254); + if (d == 1) { + a.Eb = null; + } else { + f = CD(a.Eb); + if (d == 2) { + e = zjd(a, b); + a.Eb = f[e == 0 ? 1 : 0]; + } else { + g = KC(SI, Uhe, 1, d - 1, 5, 1); + for (c = 2, h = 0, i = 0; c <= 128; c <<= 1) { + c == b ? ++h : (a.Db & c) != 0 && (g[i++] = f[h++]); + } + a.Eb = g; + } + } + a.Db &= ~b; + } + function n1d(a, b) { + var c, d, e, f, g; + d = (!b.s && (b.s = new cUd(t5, b, 21, 17)), b.s); + f = null; + for (e = 0, g = d.i; e < g; ++e) { + c = BD(qud(d, e), 170); + switch ($1d(q1d(a, c))) { + case 4: + case 5: + case 6: { + !f && (f = new Rkb()); + f.c[f.c.length] = c; + break; + } + } + } + return !f ? (mmb(), mmb(), jmb) : f; + } + function Uee(a) { + var b; + b = 0; + switch (a) { + case 105: + b = 2; + break; + case 109: + b = 8; + break; + case 115: + b = 4; + break; + case 120: + b = 16; + break; + case 117: + b = 32; + break; + case 119: + b = 64; + break; + case 70: + b = 256; + break; + case 72: + b = 128; + break; + case 88: + b = 512; + break; + case 44: + b = zte; + } + return b; + } + function Ghb(a, b, c, d, e) { + var f, g, h, i; + if (PD(a) === PD(b) && d == e) { + Lhb(a, d, c); + return; + } + for (h = 0; h < d; h++) { + g = 0; + f = a[h]; + for (i = 0; i < e; i++) { + g = wbb(wbb(Ibb(xbb(f, Yje), xbb(b[i], Yje)), xbb(c[h + i], Yje)), xbb(Tbb(g), Yje)); + c[h + i] = Tbb(g); + g = Pbb(g, 32); + } + c[h + e] = Tbb(g); + } + } + function COb(a) { + var b, c, d, e, f, g, h, i, j, k, l; + k = 0; + j = 0; + e = a.a; + h = e.a.gc(); + for (d = e.a.ec().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 561); + b = (c.b && LOb(c), c.a); + l = b.a; + g = b.b; + k += l + g; + j += l * g; + } + i = $wnd.Math.sqrt(400 * h * j - 4 * j + k * k) + k; + f = 2 * (100 * h - 1); + if (f == 0) { + return i; + } + return i / f; + } + function mOc(a, b) { + if (b.b != 0) { + isNaN(a.s) ? a.s = Edb((sCb(b.b != 0), ED(b.a.a.c))) : a.s = $wnd.Math.min(a.s, Edb((sCb(b.b != 0), ED(b.a.a.c)))); + isNaN(a.c) ? a.c = Edb((sCb(b.b != 0), ED(b.c.b.c))) : a.c = $wnd.Math.max(a.c, Edb((sCb(b.b != 0), ED(b.c.b.c)))); + } + } + function Pld(a) { + var b, c, d, e; + b = null; + for (d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)]))); Qr(d); ) { + c = BD(Rr(d), 82); + e = atd(c); + if (!b) { + b = Xod(e); + } else if (b != Xod(e)) { + return true; + } + } + return false; + } + function Rxd(a, b) { + var c, d, e, f; + if (a.ej()) { + c = a.i; + f = a.fj(); + lud(a, b); + d = a.Zi(3, null, b, c, f); + if (a.bj()) { + e = a.cj(b, null); + a.ij() && (e = a.jj(b, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + lud(a, b); + if (a.bj()) { + e = a.cj(b, null); + !!e && e.Fi(); + } + } + } + function rwd(a, b, c) { + var d, e, f; + if (a.ej()) { + f = a.fj(); + ++a.j; + a.Hi(b, a.oi(b, c)); + d = a.Zi(3, null, c, b, f); + if (a.bj()) { + e = a.cj(c, null); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + ++a.j; + a.Hi(b, a.oi(b, c)); + if (a.bj()) { + e = a.cj(c, null); + !!e && e.Fi(); + } + } + } + function Wee(a) { + var b, c, d, e; + e = a.length; + b = null; + for (d = 0; d < e; d++) { + c = (BCb(d, a.length), a.charCodeAt(d)); + if (hfb(".*+?{[()|\\^$", wfb(c)) >= 0) { + if (!b) { + b = new Ifb(); + d > 0 && Efb(b, a.substr(0, d)); + } + b.a += "\\"; + Afb(b, c & aje); + } else + !!b && Afb(b, c & aje); + } + return b ? b.a : a; + } + function l5c(a) { + var b; + if (!a.a) { + throw vbb(new Zdb("IDataType class expected for layout option " + a.f)); + } + b = gvd(a.a); + if (b == null) { + throw vbb(new Zdb("Couldn't create new instance of property '" + a.f + "'. " + ise + (fdb(Y3), Y3.k) + jse)); + } + return BD(b, 414); + } + function aid(a) { + var b, c, d, e, f; + f = a.eh(); + if (f) { + if (f.kh()) { + e = xid(a, f); + if (e != f) { + c = a.Vg(); + d = (b = a.Vg(), b >= 0 ? a.Qg(null) : a.eh().ih(a, -1 - b, null, null)); + a.Rg(BD(e, 49), c); + !!d && d.Fi(); + a.Lg() && a.Mg() && c > -1 && Uhd(a, new nSd(a, 9, c, f, e)); + return e; + } + } + } + return f; + } + function nTb(a) { + var b, c, d, e, f, g, h, i; + g = 0; + f = a.f.e; + for (d = 0; d < f.c.length; ++d) { + h = (tCb(d, f.c.length), BD(f.c[d], 144)); + for (e = d + 1; e < f.c.length; ++e) { + i = (tCb(e, f.c.length), BD(f.c[e], 144)); + c = S6c(h.d, i.d); + b = c - a.a[h.b][i.b]; + g += a.i[h.b][i.b] * b * b; + } + } + return g; + } + function _ac(a, b) { + var c; + if (wNb(b, (Nyc(), mxc))) { + return; + } + c = hbc(BD(vNb(b, Uac), 360), BD(vNb(a, mxc), 163)); + yNb(b, Uac, c); + if (Qr(new Sr(ur(O_b(b).a.Kc(), new Sq())))) { + return; + } + switch (c.g) { + case 1: + yNb(b, mxc, (Ctc(), xtc)); + break; + case 2: + yNb(b, mxc, (Ctc(), ztc)); + } + } + function wkc(a, b) { + var c; + mkc(a); + a.a = (c = new Ji(), MAb(new YAb(null, new Kub(b.d, 16)), new Vkc(c)), c); + rkc(a, BD(vNb(b.b, (Nyc(), Wwc)), 376)); + tkc(a); + skc(a); + qkc(a); + ukc(a); + vkc(a, b); + MAb(LAb(new YAb(null, $i(Yi(a.b).a)), new Lkc()), new Nkc()); + b.a = false; + a.a = null; + } + function Bod() { + fod.call(this, yte, (Fhd(), Ehd)); + this.p = null; + this.a = null; + this.f = null; + this.n = null; + this.g = null; + this.c = null; + this.i = null; + this.j = null; + this.d = null; + this.b = null; + this.e = null; + this.k = null; + this.o = null; + this.s = null; + this.q = false; + this.r = false; + } + function Csd() { + Csd = ccb; + Bsd = new Dsd(Wne, 0); + ysd = new Dsd("INSIDE_SELF_LOOPS", 1); + zsd = new Dsd("MULTI_EDGES", 2); + xsd = new Dsd("EDGE_LABELS", 3); + Asd = new Dsd("PORTS", 4); + vsd = new Dsd("COMPOUND", 5); + usd = new Dsd("CLUSTERS", 6); + wsd = new Dsd("DISCONNECTED", 7); + } + function Sgb(a, b) { + var c, d, e; + if (b == 0) { + return (a.a[0] & 1) != 0; + } + if (b < 0) { + throw vbb(new ocb("Negative bit address")); + } + e = b >> 5; + if (e >= a.d) { + return a.e < 0; + } + c = a.a[e]; + b = 1 << (b & 31); + if (a.e < 0) { + d = Mgb(a); + if (e < d) { + return false; + } else + d == e ? c = -c : c = ~c; + } + return (c & b) != 0; + } + function O1c(a, b, c, d) { + var e; + BD(c.b, 65); + BD(c.b, 65); + BD(d.b, 65); + BD(d.b, 65); + e = c7c(R6c(BD(c.b, 65).c), BD(d.b, 65).c); + $6c(e, YNb(BD(c.b, 65), BD(d.b, 65), e)); + BD(d.b, 65); + BD(d.b, 65); + BD(d.b, 65).c.a + e.a; + BD(d.b, 65).c.b + e.b; + BD(d.b, 65); + Hkb(d.a, new T1c(a, b, d)); + } + function vNd(a, b) { + var c, d, e, f, g, h, i; + f = b.e; + if (f) { + c = aid(f); + d = BD(a.g, 674); + for (g = 0; g < a.i; ++g) { + i = d[g]; + if (JQd(i) == c) { + e = (!i.d && (i.d = new xMd(j5, i, 1)), i.d); + h = BD(c.ah(Nid(f, f.Cb, f.Db >> 16)), 15).Xc(f); + if (h < e.i) { + return vNd(a, BD(qud(e, h), 87)); + } + } + } + } + return b; + } + function bcb(a, b, c) { + var d = _bb, h; + var e = d[a]; + var f = e instanceof Array ? e[0] : null; + if (e && !f) { + _ = e; + } else { + _ = (h = b && b.prototype, !h && (h = _bb[b]), ecb(h)); + _.hm = c; + !b && (_.im = gcb); + d[a] = _; + } + for (var g = 3; g < arguments.length; ++g) { + arguments[g].prototype = _; + } + f && (_.gm = f); + } + function Qr(a) { + var b; + while (!BD(Qb(a.a), 47).Ob()) { + a.d = Pr(a); + if (!a.d) { + return false; + } + a.a = BD(a.d.Pb(), 47); + if (JD(a.a, 39)) { + b = BD(a.a, 39); + a.a = b.a; + !a.b && (a.b = new jkb()); + Wjb(a.b, a.d); + if (b.b) { + while (!akb(b.b)) { + Wjb(a.b, BD(gkb(b.b), 47)); + } + } + a.d = b.d; + } + } + return true; + } + function krb(a, b) { + var c, d, e, f, g; + f = b == null ? 0 : a.b.se(b); + d = (c = a.a.get(f), c == null ? new Array() : c); + for (g = 0; g < d.length; g++) { + e = d[g]; + if (a.b.re(b, e.cd())) { + if (d.length == 1) { + d.length = 0; + trb(a.a, f); + } else { + d.splice(g, 1); + } + --a.c; + zpb(a.b); + return e.dd(); + } + } + return null; + } + function GGb(a, b) { + var c, d, e, f; + e = 1; + b.j = true; + f = null; + for (d = new olb(LFb(b)); d.a < d.c.c.length; ) { + c = BD(mlb(d), 213); + if (!a.c[c.c]) { + a.c[c.c] = true; + f = xFb(c, b); + if (c.f) { + e += GGb(a, f); + } else if (!f.j && c.a == c.e.e - c.d.e) { + c.f = true; + Qqb(a.p, c); + e += GGb(a, f); + } + } + } + return e; + } + function MVb(a) { + var b, c, d; + for (c = new olb(a.a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + d = (uCb(0), 0); + if (d > 0) { + !(fad(a.a.c) && b.n.d) && !(gad(a.a.c) && b.n.b) && (b.g.d += $wnd.Math.max(0, d / 2 - 0.5)); + !(fad(a.a.c) && b.n.a) && !(gad(a.a.c) && b.n.c) && (b.g.a -= d - 1); + } + } + } + function N3b(a) { + var b, c, d, e, f; + e = new Rkb(); + f = O3b(a, e); + b = BD(vNb(a, (wtc(), gtc)), 10); + if (b) { + for (d = new olb(b.j); d.a < d.c.c.length; ) { + c = BD(mlb(d), 11); + PD(vNb(c, $sc)) === PD(a) && (f = $wnd.Math.max(f, O3b(c, e))); + } + } + e.c.length == 0 || yNb(a, Ysc, f); + return f != -1 ? e : null; + } + function a9b(a, b, c) { + var d, e, f, g, h, i; + f = BD(Ikb(b.e, 0), 17).c; + d = f.i; + e = d.k; + i = BD(Ikb(c.g, 0), 17).d; + g = i.i; + h = g.k; + e == (j0b(), g0b) ? yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)) : yNb(a, (wtc(), Vsc), f); + h == g0b ? yNb(a, (wtc(), Wsc), BD(vNb(g, Wsc), 11)) : yNb(a, (wtc(), Wsc), i); + } + function Rs(a, b) { + var c, d, e, f; + f = Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))); + c = f & a.b.length - 1; + e = null; + for (d = a.b[c]; d; e = d, d = d.a) { + if (d.d == f && Hb(d.i, b)) { + !e ? a.b[c] = d.a : e.a = d.a; + Bs(d.c, d.f); + As(d.b, d.e); + --a.f; + ++a.e; + return true; + } + } + return false; + } + function lD(a, b) { + var c, d, e, f, g; + b &= 63; + c = a.h; + d = (c & Gje) != 0; + d && (c |= -1048576); + if (b < 22) { + g = c >> b; + f = a.m >> b | c << 22 - b; + e = a.l >> b | a.m << 22 - b; + } else if (b < 44) { + g = d ? Fje : 0; + f = c >> b - 22; + e = a.m >> b - 22 | c << 44 - b; + } else { + g = d ? Fje : 0; + f = d ? Eje : 0; + e = c >> b - 44; + } + return TC(e & Eje, f & Eje, g & Fje); + } + function XOb(a) { + var b, c, d, e, f, g; + this.c = new Rkb(); + this.d = a; + d = Pje; + e = Pje; + b = Qje; + c = Qje; + for (g = Jsb(a, 0); g.b != g.d.c; ) { + f = BD(Xsb(g), 8); + d = $wnd.Math.min(d, f.a); + e = $wnd.Math.min(e, f.b); + b = $wnd.Math.max(b, f.a); + c = $wnd.Math.max(c, f.b); + } + this.a = new J6c(d, e, b - d, c - e); + } + function Dac(a, b) { + var c, d, e, f, g, h; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + g.k == (j0b(), f0b) && zac(g, b); + for (d = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + yac(c, b); + } + } + } + } + function Xoc(a) { + var b, c, d; + this.c = a; + d = BD(vNb(a, (Nyc(), Lwc)), 103); + b = Edb(ED(vNb(a, owc))); + c = Edb(ED(vNb(a, Dyc))); + d == (ead(), aad) || d == bad || d == cad ? this.b = b * c : this.b = 1 / (b * c); + this.j = Edb(ED(vNb(a, wyc))); + this.e = Edb(ED(vNb(a, vyc))); + this.f = a.b.c.length; + } + function ADc(a) { + var b, c; + a.e = KC(WD, oje, 25, a.p.c.length, 15, 1); + a.k = KC(WD, oje, 25, a.p.c.length, 15, 1); + for (c = new olb(a.p); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + a.e[b.p] = sr(new Sr(ur(R_b(b).a.Kc(), new Sq()))); + a.k[b.p] = sr(new Sr(ur(U_b(b).a.Kc(), new Sq()))); + } + } + function DDc(a) { + var b, c, d, e, f, g; + e = 0; + a.q = new Rkb(); + b = new Tqb(); + for (g = new olb(a.p); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + f.p = e; + for (d = new Sr(ur(U_b(f).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + Qqb(b, c.d.i); + } + b.a.Bc(f) != null; + Ekb(a.q, new Vqb(b)); + b.a.$b(); + ++e; + } + } + function JTc() { + JTc = ccb; + CTc = new q0b(20); + BTc = new Osd((Y9c(), f9c), CTc); + HTc = new Osd(T9c, 20); + uTc = new Osd(r8c, tme); + ETc = new Osd(D9c, meb(1)); + GTc = new Osd(H9c, (Bcb(), true)); + vTc = y8c; + xTc = Y8c; + yTc = _8c; + zTc = b9c; + wTc = W8c; + ATc = e9c; + DTc = x9c; + ITc = (rTc(), pTc); + FTc = nTc; + } + function RBd(a, b) { + var c, d, e, f, g, h, i, j, k; + if (a.a.f > 0 && JD(b, 42)) { + a.a.qj(); + j = BD(b, 42); + i = j.cd(); + f = i == null ? 0 : tb(i); + g = DAd(a.a, f); + c = a.a.d[g]; + if (c) { + d = BD(c.g, 367); + k = c.i; + for (h = 0; h < k; ++h) { + e = d[h]; + if (e.Sh() == f && e.Fb(j)) { + RBd(a, j); + return true; + } + } + } + } + return false; + } + function skc(a) { + var b, c, d, e; + for (e = BD(Qc(a.a, (Xjc(), Ujc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 101); + c = (b = Ec(d.k), b.Hc((Ucd(), Acd)) ? b.Hc(zcd) ? b.Hc(Rcd) ? b.Hc(Tcd) ? null : dkc : fkc : ekc : ckc); + kkc(a, d, c[0], (Fkc(), Ckc), 0); + kkc(a, d, c[1], Dkc, 1); + kkc(a, d, c[2], Ekc, 1); + } + } + function enc(a, b) { + var c, d; + c = fnc(b); + inc(a, b, c); + uPc(a.a, BD(vNb(Q_b(b.b), (wtc(), jtc)), 230)); + dnc(a); + cnc(a, b); + d = KC(WD, oje, 25, b.b.j.c.length, 15, 1); + lnc(a, b, (Ucd(), Acd), d, c); + lnc(a, b, zcd, d, c); + lnc(a, b, Rcd, d, c); + lnc(a, b, Tcd, d, c); + a.a = null; + a.c = null; + a.b = null; + } + function OYc() { + OYc = ccb; + LYc = (zYc(), yYc); + KYc = new Nsd(Bre, LYc); + IYc = new Nsd(Cre, (Bcb(), true)); + meb(-1); + FYc = new Nsd(Dre, meb(-1)); + meb(-1); + GYc = new Nsd(Ere, meb(-1)); + JYc = new Nsd(Fre, false); + MYc = new Nsd(Gre, true); + HYc = new Nsd(Hre, false); + NYc = new Nsd(Ire, -1); + } + function yld(a, b, c) { + switch (b) { + case 7: + !a.e && (a.e = new y5d(B2, a, 7, 4)); + Uxd(a.e); + !a.e && (a.e = new y5d(B2, a, 7, 4)); + ytd(a.e, BD(c, 14)); + return; + case 8: + !a.d && (a.d = new y5d(B2, a, 8, 5)); + Uxd(a.d); + !a.d && (a.d = new y5d(B2, a, 8, 5)); + ytd(a.d, BD(c, 14)); + return; + } + Zkd(a, b, c); + } + function At(a, b) { + var c, d, e, f, g; + if (PD(b) === PD(a)) { + return true; + } + if (!JD(b, 15)) { + return false; + } + g = BD(b, 15); + if (a.gc() != g.gc()) { + return false; + } + f = g.Kc(); + for (d = a.Kc(); d.Ob(); ) { + c = d.Pb(); + e = f.Pb(); + if (!(PD(c) === PD(e) || c != null && pb(c, e))) { + return false; + } + } + return true; + } + function U6b(a, b) { + var c, d, e, f; + f = BD(GAb(LAb(LAb(new YAb(null, new Kub(b.b, 16)), new $6b()), new a7b()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + f.Jc(new c7b()); + c = 0; + for (e = f.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + d.p == -1 && T6b(a, d, c++); + } + } + function Wzc(a) { + switch (a.g) { + case 0: + return new KLc(); + case 1: + return new dJc(); + case 2: + return new tJc(); + case 3: + return new CMc(); + case 4: + return new $Jc(); + default: + throw vbb(new Wdb("No implementation is available for the node placer " + (a.f != null ? a.f : "" + a.g))); + } + } + function nqc(a) { + switch (a.g) { + case 0: + return new aCc(); + case 1: + return new VBc(); + case 2: + return new kCc(); + case 3: + return new rCc(); + case 4: + return new eCc(); + default: + throw vbb(new Wdb("No implementation is available for the cycle breaker " + (a.f != null ? a.f : "" + a.g))); + } + } + function HWc() { + HWc = ccb; + BWc = new Nsd(lre, meb(0)); + CWc = new Nsd(mre, 0); + yWc = (pWc(), mWc); + xWc = new Nsd(nre, yWc); + meb(0); + wWc = new Nsd(ore, meb(1)); + EWc = (sXc(), qXc); + DWc = new Nsd(pre, EWc); + GWc = (fWc(), eWc); + FWc = new Nsd(qre, GWc); + AWc = (iXc(), hXc); + zWc = new Nsd(rre, AWc); + } + function XXb(a, b, c) { + var d; + d = null; + !!b && (d = b.d); + hYb(a, new cWb(b.n.a - d.b + c.a, b.n.b - d.d + c.b)); + hYb(a, new cWb(b.n.a - d.b + c.a, b.n.b + b.o.b + d.a + c.b)); + hYb(a, new cWb(b.n.a + b.o.a + d.c + c.a, b.n.b - d.d + c.b)); + hYb(a, new cWb(b.n.a + b.o.a + d.c + c.a, b.n.b + b.o.b + d.a + c.b)); + } + function T6b(a, b, c) { + var d, e, f; + b.p = c; + for (f = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(b), new R0b(b)]))); Qr(f); ) { + d = BD(Rr(f), 11); + d.p == -1 && T6b(a, d, c); + } + if (b.i.k == (j0b(), g0b)) { + for (e = new olb(b.i.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + d != b && d.p == -1 && T6b(a, d, c); + } + } + } + function rPc(a) { + var b, c, d, e, f; + e = BD(GAb(IAb(UAb(a)), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + d = dme; + if (e.gc() >= 2) { + c = e.Kc(); + b = ED(c.Pb()); + while (c.Ob()) { + f = b; + b = ED(c.Pb()); + d = $wnd.Math.min(d, (uCb(b), b) - (uCb(f), f)); + } + } + return d; + } + function gUc(a, b) { + var c, d, e, f, g; + d = new Psb(); + Gsb(d, b, d.c.b, d.c); + do { + c = (sCb(d.b != 0), BD(Nsb(d, d.a.a), 86)); + a.b[c.g] = 1; + for (f = Jsb(c.d, 0); f.b != f.d.c; ) { + e = BD(Xsb(f), 188); + g = e.c; + a.b[g.g] == 1 ? Dsb(a.a, e) : a.b[g.g] == 2 ? a.b[g.g] = 1 : Gsb(d, g, d.c.b, d.c); + } + } while (d.b != 0); + } + function Ju(a, b) { + var c, d, e; + if (PD(b) === PD(Qb(a))) { + return true; + } + if (!JD(b, 15)) { + return false; + } + d = BD(b, 15); + e = a.gc(); + if (e != d.gc()) { + return false; + } + if (JD(d, 54)) { + for (c = 0; c < e; c++) { + if (!Hb(a.Xb(c), d.Xb(c))) { + return false; + } + } + return true; + } else { + return kr(a.Kc(), d.Kc()); + } + } + function Aac(a, b) { + var c, d; + if (a.c.length != 0) { + if (a.c.length == 2) { + zac((tCb(0, a.c.length), BD(a.c[0], 10)), (rbd(), nbd)); + zac((tCb(1, a.c.length), BD(a.c[1], 10)), obd); + } else { + for (d = new olb(a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + zac(c, b); + } + } + a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + function uKc(a) { + var b, c; + if (a.c.length != 2) { + throw vbb(new Zdb("Order only allowed for two paths.")); + } + b = (tCb(0, a.c.length), BD(a.c[0], 17)); + c = (tCb(1, a.c.length), BD(a.c[1], 17)); + if (b.d.i != c.c.i) { + a.c = KC(SI, Uhe, 1, 0, 5, 1); + a.c[a.c.length] = c; + a.c[a.c.length] = b; + } + } + function EMc(a, b) { + var c, d, e, f, g, h; + d = new $rb(); + g = Gx(new amb(a.g)); + for (f = g.a.ec().Kc(); f.Ob(); ) { + e = BD(f.Pb(), 10); + if (!e) { + Sdd(b, "There are no classes in a balanced layout."); + break; + } + h = a.j[e.p]; + c = BD(Wrb(d, h), 15); + if (!c) { + c = new Rkb(); + Xrb(d, h, c); + } + c.Fc(e); + } + return d; + } + function Dqd(a, b, c) { + var d, e, f, g, h, i, j; + if (c) { + f = c.a.length; + d = new Yge(f); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + i = Zpd(c, g.a); + if (i) { + j = ftd(_pd(i, Ite), b); + Rhb(a.f, j, i); + e = Vte in i.a; + e && Lkd(j, _pd(i, Vte)); + grd(i, j); + hrd(i, j); + } + } + } + } + function ndc(a, b) { + var c, d, e, f, g; + Odd(b, "Port side processing", 1); + for (g = new olb(a.a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + odc(e); + } + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + for (f = new olb(c.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + odc(e); + } + } + Qdd(b); + } + function bfc(a, b, c) { + var d, e, f, g, h; + e = a.f; + !e && (e = BD(a.a.a.ec().Kc().Pb(), 57)); + cfc(e, b, c); + if (a.a.a.gc() == 1) { + return; + } + d = b * c; + for (g = a.a.a.ec().Kc(); g.Ob(); ) { + f = BD(g.Pb(), 57); + if (f != e) { + h = ugc(f); + if (h.f.d) { + f.d.d += d + ple; + f.d.a -= d + ple; + } else + h.f.a && (f.d.a -= d + ple); + } + } + } + function tQb(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n; + g = c - a; + h = d - b; + f = $wnd.Math.atan2(g, h); + i = f + cme; + j = f - cme; + k = e * $wnd.Math.sin(i) + a; + m = e * $wnd.Math.cos(i) + b; + l = e * $wnd.Math.sin(j) + a; + n = e * $wnd.Math.cos(j) + b; + return Ou(OC(GC(m1, 1), nie, 8, 0, [new f7c(k, m), new f7c(l, n)])); + } + function OLc(a, b, c, d) { + var e, f, g, h, i, j, k, l; + e = c; + k = b; + f = k; + do { + f = a.a[f.p]; + h = (l = a.g[f.p], Edb(a.p[l.p]) + Edb(a.d[f.p]) - f.d.d); + i = RLc(f, d); + if (i) { + g = (j = a.g[i.p], Edb(a.p[j.p]) + Edb(a.d[i.p]) + i.o.b + i.d.a); + e = $wnd.Math.min(e, h - (g + jBc(a.k, f, i))); + } + } while (k != f); + return e; + } + function PLc(a, b, c, d) { + var e, f, g, h, i, j, k, l; + e = c; + k = b; + f = k; + do { + f = a.a[f.p]; + g = (l = a.g[f.p], Edb(a.p[l.p]) + Edb(a.d[f.p]) + f.o.b + f.d.a); + i = QLc(f, d); + if (i) { + h = (j = a.g[i.p], Edb(a.p[j.p]) + Edb(a.d[i.p]) - i.d.d); + e = $wnd.Math.min(e, h - (g + jBc(a.k, f, i))); + } + } while (k != f); + return e; + } + function hkd(a, b) { + var c, d; + d = (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), AAd(a.o, b)); + if (d != null) { + return d; + } + c = b.wg(); + JD(c, 4) && (c == null ? (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), LAd(a.o, b)) : (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), HAd(a.o, b, c)), a); + return c; + } + function Hbd() { + Hbd = ccb; + zbd = new Ibd("H_LEFT", 0); + ybd = new Ibd("H_CENTER", 1); + Bbd = new Ibd("H_RIGHT", 2); + Gbd = new Ibd("V_TOP", 3); + Fbd = new Ibd("V_CENTER", 4); + Ebd = new Ibd("V_BOTTOM", 5); + Cbd = new Ibd("INSIDE", 6); + Dbd = new Ibd("OUTSIDE", 7); + Abd = new Ibd("H_PRIORITY", 8); + } + function o6d(a) { + var b, c, d, e, f, g, h; + b = a.Hh(_ve); + if (b) { + h = GD(AAd((!b.b && (b.b = new sId((jGd(), fGd), x6, b)), b.b), "settingDelegates")); + if (h != null) { + c = new Rkb(); + for (e = mfb(h, "\\w+"), f = 0, g = e.length; f < g; ++f) { + d = e[f]; + c.c[c.c.length] = d; + } + return c; + } + } + return mmb(), mmb(), jmb; + } + function sGb(a, b) { + var c, d, e, f, g, h, i; + if (!b.f) { + throw vbb(new Wdb("The input edge is not a tree edge.")); + } + f = null; + e = Ohe; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c = BD(mlb(d), 213); + h = c.d; + i = c.e; + if (xGb(a, h, b) && !xGb(a, i, b)) { + g = i.e - h.e - c.a; + if (g < e) { + e = g; + f = c; + } + } + } + return f; + } + function qTb(a) { + var b, c, d, e, f, g; + if (a.f.e.c.length <= 1) { + return; + } + b = 0; + e = nTb(a); + c = Pje; + do { + b > 0 && (e = c); + for (g = new olb(a.f.e); g.a < g.c.c.length; ) { + f = BD(mlb(g), 144); + if (Ccb(DD(vNb(f, (bTb(), USb))))) { + continue; + } + d = mTb(a, f); + P6c(X6c(f.d), d); + } + c = nTb(a); + } while (!pTb(a, b++, e, c)); + } + function $ac(a, b) { + var c, d, e; + Odd(b, "Layer constraint preprocessing", 1); + c = new Rkb(); + e = new Bib(a.a, 0); + while (e.b < e.d.gc()) { + d = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 10)); + if (Zac(d)) { + Xac(d); + c.c[c.c.length] = d; + uib(e); + } + } + c.c.length == 0 || yNb(a, (wtc(), Lsc), c); + Qdd(b); + } + function sjc(a, b) { + var c, d, e, f, g; + f = a.g.a; + g = a.g.b; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c = BD(mlb(d), 70); + e = c.n; + a.a == (Ajc(), xjc) || a.i == (Ucd(), zcd) ? e.a = f : a.a == yjc || a.i == (Ucd(), Tcd) ? e.a = f + a.j.a - c.o.a : e.a = f + (a.j.a - c.o.a) / 2; + e.b = g; + P6c(e, b); + g += c.o.b + a.e; + } + } + function LSc(a, b, c) { + var d, e, f, g; + Odd(c, "Processor set coordinates", 1); + a.a = b.b.b == 0 ? 1 : b.b.b; + f = null; + d = Jsb(b.b, 0); + while (!f && d.b != d.d.c) { + g = BD(Xsb(d), 86); + if (Ccb(DD(vNb(g, (mTc(), jTc))))) { + f = g; + e = g.e; + e.a = BD(vNb(g, kTc), 19).a; + e.b = 0; + } + } + MSc(a, URc(f), Udd(c, 1)); + Qdd(c); + } + function xSc(a, b, c) { + var d, e, f; + Odd(c, "Processor determine the height for each level", 1); + a.a = b.b.b == 0 ? 1 : b.b.b; + e = null; + d = Jsb(b.b, 0); + while (!e && d.b != d.d.c) { + f = BD(Xsb(d), 86); + Ccb(DD(vNb(f, (mTc(), jTc)))) && (e = f); + } + !!e && ySc(a, Ou(OC(GC(q$, 1), fme, 86, 0, [e])), c); + Qdd(c); + } + function brd(a, b) { + var c, d, e, f, g, h, i, j, k, l; + j = a; + i = $pd(j, "individualSpacings"); + if (i) { + d = ikd(b, (Y9c(), O9c)); + g = !d; + if (g) { + e = new _fd(); + jkd(b, O9c, e); + } + h = BD(hkd(b, O9c), 373); + l = i; + f = null; + !!l && (f = (k = $B(l, KC(ZI, nie, 2, 0, 6, 1)), new mC(l, k))); + if (f) { + c = new Frd(l, h); + reb(f, c); + } + } + } + function frd(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + i = null; + l = a; + k = null; + if (cue in l.a || due in l.a || Ote in l.a) { + j = null; + m = etd(b); + g = $pd(l, cue); + c = new Ird(m); + Eqd(c.a, g); + h = $pd(l, due); + d = new asd(m); + Pqd(d.a, h); + f = Ypd(l, Ote); + e = new dsd(m); + j = (Qqd(e.a, f), f); + k = j; + } + i = k; + return i; + } + function $w(a, b) { + var c, d, e; + if (b === a) { + return true; + } + if (JD(b, 543)) { + e = BD(b, 835); + if (a.a.d != e.a.d || Ah(a).gc() != Ah(e).gc()) { + return false; + } + for (d = Ah(e).Kc(); d.Ob(); ) { + c = BD(d.Pb(), 416); + if (Aw(a, c.a.cd()) != BD(c.a.dd(), 14).gc()) { + return false; + } + } + return true; + } + return false; + } + function BMb(a) { + var b, c, d, e; + d = BD(a.a, 19).a; + e = BD(a.b, 19).a; + b = d; + c = e; + if (d == 0 && e == 0) { + c -= 1; + } else { + if (d == -1 && e <= 0) { + b = 0; + c -= 2; + } else { + if (d <= 0 && e > 0) { + b -= 1; + c -= 1; + } else { + if (d >= 0 && e < 0) { + b += 1; + c += 1; + } else { + if (d > 0 && e >= 0) { + b -= 1; + c += 1; + } else { + b += 1; + c -= 1; + } + } + } + } + } + return new vgd(meb(b), meb(c)); + } + function PIc(a, b) { + if (a.c < b.c) { + return -1; + } else if (a.c > b.c) { + return 1; + } else if (a.b < b.b) { + return -1; + } else if (a.b > b.b) { + return 1; + } else if (a.a != b.a) { + return tb(a.a) - tb(b.a); + } else if (a.d == (UIc(), TIc) && b.d == SIc) { + return -1; + } else if (a.d == SIc && b.d == TIc) { + return 1; + } + return 0; + } + function aNc(a, b) { + var c, d, e, f, g; + f = b.a; + f.c.i == b.b ? g = f.d : g = f.c; + f.c.i == b.b ? d = f.c : d = f.d; + e = NLc(a.a, g, d); + if (e > 0 && e < dme) { + c = OLc(a.a, d.i, e, a.c); + TLc(a.a, d.i, -c); + return c > 0; + } else if (e < 0 && -e < dme) { + c = PLc(a.a, d.i, -e, a.c); + TLc(a.a, d.i, c); + return c > 0; + } + return false; + } + function RZc(a, b, c, d) { + var e, f, g, h, i, j, k, l; + e = (b - a.d) / a.c.c.length; + f = 0; + a.a += c; + a.d = b; + for (l = new olb(a.c); l.a < l.c.c.length; ) { + k = BD(mlb(l), 33); + j = k.g; + i = k.f; + dld(k, k.i + f * e); + eld(k, k.j + d * c); + cld(k, k.g + e); + ald(k, a.a); + ++f; + h = k.g; + g = k.f; + Ffd(k, new f7c(h, g), new f7c(j, i)); + } + } + function Xmd(a) { + var b, c, d, e, f, g, h; + if (a == null) { + return null; + } + h = a.length; + e = (h + 1) / 2 | 0; + g = KC(SD, wte, 25, e, 15, 1); + h % 2 != 0 && (g[--e] = jnd((BCb(h - 1, a.length), a.charCodeAt(h - 1)))); + for (c = 0, d = 0; c < e; ++c) { + b = jnd(bfb(a, d++)); + f = jnd(bfb(a, d++)); + g[c] = (b << 4 | f) << 24 >> 24; + } + return g; + } + function vdb(a) { + if (a.pe()) { + var b = a.c; + b.qe() ? a.o = "[" + b.n : !b.pe() ? a.o = "[L" + b.ne() + ";" : a.o = "[" + b.ne(); + a.b = b.me() + "[]"; + a.k = b.oe() + "[]"; + return; + } + var c = a.j; + var d = a.d; + d = d.split("/"); + a.o = ydb(".", [c, ydb("$", d)]); + a.b = ydb(".", [c, ydb(".", d)]); + a.k = d[d.length - 1]; + } + function qGb(a, b) { + var c, d, e, f, g; + g = null; + for (f = new olb(a.e.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 121); + if (e.b.a.c.length == e.g.a.c.length) { + d = e.e; + g = BGb(e); + for (c = e.e - BD(g.a, 19).a + 1; c < e.e + BD(g.b, 19).a; c++) { + b[c] < b[d] && (d = c); + } + if (b[d] < b[e.e]) { + --b[e.e]; + ++b[d]; + e.e = d; + } + } + } + } + function SLc(a) { + var b, c, d, e, f, g, h, i; + e = Pje; + d = Qje; + for (c = new olb(a.e.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 29); + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + i = Edb(a.p[f.p]); + h = i + Edb(a.b[a.g[f.p].p]); + e = $wnd.Math.min(e, i); + d = $wnd.Math.max(d, h); + } + } + return d - e; + } + function r1d(a, b, c, d) { + var e, f, g, h, j; + e = f1d(a, b); + for (h = 0, j = e.gc(); h < j; ++h) { + f = BD(e.Xb(h), 170); + if (dfb(d, a2d(q1d(a, f)))) { + g = b2d(q1d(a, f)); + if (c == null) { + if (g == null) { + return f; + } + } else if (dfb(c, g)) { + return f; + } else + ; + } + } + return null; + } + function s1d(a, b, c, d) { + var e, f, g, h, j; + e = g1d(a, b); + for (h = 0, j = e.gc(); h < j; ++h) { + f = BD(e.Xb(h), 170); + if (dfb(d, a2d(q1d(a, f)))) { + g = b2d(q1d(a, f)); + if (c == null) { + if (g == null) { + return f; + } + } else if (dfb(c, g)) { + return f; + } else + ; + } + } + return null; + } + function p3d(a, b, c) { + var d, e, f, g, h, i; + g = new yud(); + h = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (f = 0; f < a.i; ++f) { + e = d[f]; + h.rl(e.ak()) && wtd(g, e); + } + } else { + for (f = 0; f < a.i; ++f) { + e = d[f]; + if (h.rl(e.ak())) { + i = e.dd(); + wtd(g, c ? b3d(a, b, f, g.i, i) : i); + } + } + } + return wud(g); + } + function T9b(a, b) { + var c, d, e, f, g; + c = new Rpb(EW); + for (e = (Apc(), OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc])), f = 0, g = e.length; f < g; ++f) { + d = e[f]; + Opb(c, d, new Rkb()); + } + MAb(NAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new hac()), new jac()), new lac(b)), new nac(c)); + return c; + } + function AVc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + for (f = b.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 33); + k = e.i + e.g / 2; + m = e.j + e.f / 2; + i = a.f; + g = i.i + i.g / 2; + h = i.j + i.f / 2; + j = k - g; + l = m - h; + d = $wnd.Math.sqrt(j * j + l * l); + j *= a.e / d; + l *= a.e / d; + if (c) { + k -= j; + m -= l; + } else { + k += j; + m += l; + } + dld(e, k - e.g / 2); + eld(e, m - e.f / 2); + } + } + function Yfe(a) { + var b, c, d; + if (a.c) + return; + if (a.b == null) + return; + for (b = a.b.length - 4; b >= 0; b -= 2) { + for (c = 0; c <= b; c += 2) { + if (a.b[c] > a.b[c + 2] || a.b[c] === a.b[c + 2] && a.b[c + 1] > a.b[c + 3]) { + d = a.b[c + 2]; + a.b[c + 2] = a.b[c]; + a.b[c] = d; + d = a.b[c + 3]; + a.b[c + 3] = a.b[c + 1]; + a.b[c + 1] = d; + } + } + } + a.c = true; + } + function UUb(a, b) { + var c, d, e, f, g, h, i, j; + g = b == 1 ? KUb : JUb; + for (f = g.a.ec().Kc(); f.Ob(); ) { + e = BD(f.Pb(), 103); + for (i = BD(Qc(a.f.c, e), 21).Kc(); i.Ob(); ) { + h = BD(i.Pb(), 46); + d = BD(h.b, 81); + j = BD(h.a, 189); + c = j.c; + switch (e.g) { + case 2: + case 1: + d.g.d += c; + break; + case 4: + case 3: + d.g.c += c; + } + } + } + } + function PFc(a, b) { + var c, d, e, f, g, h, i, j, k; + j = -1; + k = 0; + for (g = a, h = 0, i = g.length; h < i; ++h) { + f = g[h]; + c = new Dnc(j == -1 ? a[0] : a[j], b, (xzc(), wzc)); + for (d = 0; d < f.length; d++) { + for (e = d + 1; e < f.length; e++) { + wNb(f[d], (wtc(), Zsc)) && wNb(f[e], Zsc) && ync(c, f[d], f[e]) > 0 && ++k; + } + } + ++j; + } + return k; + } + function Eid(a) { + var b, c; + c = new Wfb(hdb(a.gm)); + c.a += "@"; + Qfb(c, (b = tb(a) >>> 0, b.toString(16))); + if (a.kh()) { + c.a += " (eProxyURI: "; + Pfb(c, a.qh()); + if (a.$g()) { + c.a += " eClass: "; + Pfb(c, a.$g()); + } + c.a += ")"; + } else if (a.$g()) { + c.a += " (eClass: "; + Pfb(c, a.$g()); + c.a += ")"; + } + return c.a; + } + function TDb(a) { + var b, c, d, e; + if (a.e) { + throw vbb(new Zdb((fdb(TM), Jke + TM.k + Kke))); + } + a.d == (ead(), cad) && SDb(a, aad); + for (c = new olb(a.a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 307); + b.g = b.i; + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + d.i = Qje; + } + a.b.Le(a); + return a; + } + function TPc(a, b) { + var c, d, e, f, g; + if (b < 2 * a.b) { + throw vbb(new Wdb("The knot vector must have at least two time the dimension elements.")); + } + a.f = 1; + for (e = 0; e < a.b; e++) { + Ekb(a.e, 0); + } + g = b + 1 - 2 * a.b; + c = g; + for (f = 1; f < g; f++) { + Ekb(a.e, f / c); + } + if (a.d) { + for (d = 0; d < a.b; d++) { + Ekb(a.e, 1); + } + } + } + function ard(a, b) { + var c, d, e, f, g, h, i, j, k; + j = b; + k = BD(_o(qo(a.i), j), 33); + if (!k) { + e = _pd(j, Vte); + h = "Unable to find elk node for json object '" + e; + i = h + "' Panic!"; + throw vbb(new cqd(i)); + } + f = Ypd(j, "edges"); + c = new krd(a, k); + mqd(c.a, c.b, f); + g = Ypd(j, Jte); + d = new vrd(a); + xqd(d.a, g); + } + function xAd(a, b, c, d) { + var e, f, g, h, i; + if (d != null) { + e = a.d[b]; + if (e) { + f = e.g; + i = e.i; + for (h = 0; h < i; ++h) { + g = BD(f[h], 133); + if (g.Sh() == c && pb(d, g.cd())) { + return h; + } + } + } + } else { + e = a.d[b]; + if (e) { + f = e.g; + i = e.i; + for (h = 0; h < i; ++h) { + g = BD(f[h], 133); + if (PD(g.cd()) === PD(d)) { + return h; + } + } + } + } + return -1; + } + function nUd(a, b) { + var c, d, e; + c = b == null ? Wd(irb(a.f, null)) : Crb(a.g, b); + if (JD(c, 235)) { + e = BD(c, 235); + e.Qh() == null && void 0; + return e; + } else if (JD(c, 498)) { + d = BD(c, 1938); + e = d.a; + !!e && (e.yb == null ? void 0 : b == null ? jrb(a.f, null, e) : Drb(a.g, b, e)); + return e; + } else { + return null; + } + } + function ide(a) { + hde(); + var b, c, d, e, f, g, h; + if (a == null) + return null; + e = a.length; + if (e % 2 != 0) + return null; + b = rfb(a); + f = e / 2 | 0; + c = KC(SD, wte, 25, f, 15, 1); + for (d = 0; d < f; d++) { + g = fde[b[d * 2]]; + if (g == -1) + return null; + h = fde[b[d * 2 + 1]]; + if (h == -1) + return null; + c[d] = (g << 4 | h) << 24 >> 24; + } + return c; + } + function lKb(a, b, c) { + var d, e, f; + e = BD(Mpb(a.i, b), 306); + if (!e) { + e = new bIb(a.d, b, c); + Npb(a.i, b, e); + if (sJb(b)) { + CHb(a.a, b.c, b.b, e); + } else { + f = rJb(b); + d = BD(Mpb(a.p, f), 244); + switch (f.g) { + case 1: + case 3: + e.j = true; + lIb(d, b.b, e); + break; + case 4: + case 2: + e.k = true; + lIb(d, b.c, e); + } + } + } + return e; + } + function r3d(a, b, c, d) { + var e, f, g, h, i, j; + h = new yud(); + i = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (g = 0; g < a.i; ++g) { + f = e[g]; + i.rl(f.ak()) && wtd(h, f); + } + } else { + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (i.rl(f.ak())) { + j = f.dd(); + wtd(h, d ? b3d(a, b, g, h.i, j) : j); + } + } + } + return xud(h, c); + } + function YCc(a, b) { + var c, d, e, f, g, h, i, j; + e = a.b[b.p]; + if (e >= 0) { + return e; + } else { + f = 1; + for (h = new olb(b.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + for (d = new olb(g.g); d.a < d.c.c.length; ) { + c = BD(mlb(d), 17); + j = c.d.i; + if (b != j) { + i = YCc(a, j); + f = $wnd.Math.max(f, i + 1); + } + } + } + XCc(a, b, f); + return f; + } + } + function YGc(a, b, c) { + var d, e, f; + for (d = 1; d < a.c.length; d++) { + f = (tCb(d, a.c.length), BD(a.c[d], 10)); + e = d; + while (e > 0 && b.ue((tCb(e - 1, a.c.length), BD(a.c[e - 1], 10)), f) > 0) { + Nkb(a, e, (tCb(e - 1, a.c.length), BD(a.c[e - 1], 10))); + --e; + } + tCb(e, a.c.length); + a.c[e] = f; + } + c.a = new Lqb(); + c.b = new Lqb(); + } + function n5c(a, b, c) { + var d, e, f, g, h, i, j, k; + k = (d = BD(b.e && b.e(), 9), new xqb(d, BD(_Bb(d, d.length), 9), 0)); + i = mfb(c, "[\\[\\]\\s,]+"); + for (f = i, g = 0, h = f.length; g < h; ++g) { + e = f[g]; + if (ufb(e).length == 0) { + continue; + } + j = m5c(a, e); + if (j == null) { + return null; + } else { + rqb(k, BD(j, 22)); + } + } + return k; + } + function KVb(a) { + var b, c, d; + for (c = new olb(a.a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + d = (uCb(0), 0); + if (d > 0) { + !(fad(a.a.c) && b.n.d) && !(gad(a.a.c) && b.n.b) && (b.g.d -= $wnd.Math.max(0, d / 2 - 0.5)); + !(fad(a.a.c) && b.n.a) && !(gad(a.a.c) && b.n.c) && (b.g.a += $wnd.Math.max(0, d - 1)); + } + } + } + function Hac(a, b, c) { + var d, e; + if ((a.c - a.b & a.a.length - 1) == 2) { + if (b == (Ucd(), Acd) || b == zcd) { + xac(BD(bkb(a), 15), (rbd(), nbd)); + xac(BD(bkb(a), 15), obd); + } else { + xac(BD(bkb(a), 15), (rbd(), obd)); + xac(BD(bkb(a), 15), nbd); + } + } else { + for (e = new xkb(a); e.a != e.b; ) { + d = BD(vkb(e), 15); + xac(d, c); + } + } + } + function htd(a, b) { + var c, d, e, f, g, h, i; + e = Nu(new qtd(a)); + h = new Bib(e, e.c.length); + f = Nu(new qtd(b)); + i = new Bib(f, f.c.length); + g = null; + while (h.b > 0 && i.b > 0) { + c = (sCb(h.b > 0), BD(h.a.Xb(h.c = --h.b), 33)); + d = (sCb(i.b > 0), BD(i.a.Xb(i.c = --i.b), 33)); + if (c == d) { + g = c; + } else { + break; + } + } + return g; + } + function Cub(a, b) { + var c, d, e, f, g, h; + f = a.a * kke + a.b * 1502; + h = a.b * kke + 11; + c = $wnd.Math.floor(h * lke); + f += c; + h -= c * mke; + f %= mke; + a.a = f; + a.b = h; + if (b <= 24) { + return $wnd.Math.floor(a.a * wub[b]); + } else { + e = a.a * (1 << b - 24); + g = $wnd.Math.floor(a.b * xub[b]); + d = e + g; + d >= 2147483648 && (d -= Zje); + return d; + } + } + function Zic(a, b, c) { + var d, e, f, g; + if (bjc(a, b) > bjc(a, c)) { + d = V_b(c, (Ucd(), zcd)); + a.d = d.dc() ? 0 : B0b(BD(d.Xb(0), 11)); + g = V_b(b, Tcd); + a.b = g.dc() ? 0 : B0b(BD(g.Xb(0), 11)); + } else { + e = V_b(c, (Ucd(), Tcd)); + a.d = e.dc() ? 0 : B0b(BD(e.Xb(0), 11)); + f = V_b(b, zcd); + a.b = f.dc() ? 0 : B0b(BD(f.Xb(0), 11)); + } + } + function l6d(a) { + var b, c, d, e, f, g, h; + if (a) { + b = a.Hh(_ve); + if (b) { + g = GD(AAd((!b.b && (b.b = new sId((jGd(), fGd), x6, b)), b.b), "conversionDelegates")); + if (g != null) { + h = new Rkb(); + for (d = mfb(g, "\\w+"), e = 0, f = d.length; e < f; ++e) { + c = d[e]; + h.c[h.c.length] = c; + } + return h; + } + } + } + return mmb(), mmb(), jmb; + } + function FKb(a, b) { + var c, d, e, f; + c = a.o.a; + for (f = BD(BD(Qc(a.r, b), 21), 84).Kc(); f.Ob(); ) { + e = BD(f.Pb(), 111); + e.e.a = c * Edb(ED(e.b.We(BKb))); + e.e.b = (d = e.b, d.Xe((Y9c(), s9c)) ? d.Hf() == (Ucd(), Acd) ? -d.rf().b - Edb(ED(d.We(s9c))) : Edb(ED(d.We(s9c))) : d.Hf() == (Ucd(), Acd) ? -d.rf().b : 0); + } + } + function Woc(a) { + var b, c, d, e, f, g, h, i; + b = true; + e = null; + f = null; + j: + for (i = new olb(a.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + for (d = new Sr(ur(R_b(h).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + if (!!e && e != h) { + b = false; + break j; + } + e = h; + g = c.c.i; + if (!!f && f != g) { + b = false; + break j; + } + f = g; + } + } + return b; + } + function OOc(a, b, c) { + var d, e, f, g, h, i; + f = -1; + h = -1; + for (g = 0; g < b.c.length; g++) { + e = (tCb(g, b.c.length), BD(b.c[g], 329)); + if (e.c > a.c) { + break; + } else if (e.a >= a.s) { + f < 0 && (f = g); + h = g; + } + } + i = (a.s + a.c) / 2; + if (f >= 0) { + d = NOc(a, b, f, h); + i = $Oc((tCb(d, b.c.length), BD(b.c[d], 329))); + YOc(b, d, c); + } + return i; + } + function lZc() { + lZc = ccb; + RYc = new Osd((Y9c(), r8c), 1.3); + VYc = I8c; + gZc = new q0b(15); + fZc = new Osd(f9c, gZc); + jZc = new Osd(T9c, 15); + SYc = w8c; + _Yc = Y8c; + aZc = _8c; + bZc = b9c; + $Yc = W8c; + cZc = e9c; + hZc = x9c; + eZc = (OYc(), KYc); + ZYc = IYc; + dZc = JYc; + iZc = MYc; + WYc = HYc; + XYc = O8c; + YYc = P8c; + UYc = GYc; + TYc = FYc; + kZc = NYc; + } + function Bnd(a, b, c) { + var d, e, f, g, h, i, j; + g = (f = new RHd(), f); + PHd(g, (uCb(b), b)); + j = (!g.b && (g.b = new sId((jGd(), fGd), x6, g)), g.b); + for (i = 1; i < c.length; i += 2) { + HAd(j, c[i - 1], c[i]); + } + d = (!a.Ab && (a.Ab = new cUd(a5, a, 0, 3)), a.Ab); + for (h = 0; h < 0; ++h) { + e = LHd(BD(qud(d, d.i - 1), 590)); + d = e; + } + wtd(d, g); + } + function MPb(a, b, c) { + var d, e, f; + sNb.call(this, new Rkb()); + this.a = b; + this.b = c; + this.e = a; + d = (a.b && LOb(a), a.a); + this.d = KPb(d.a, this.a); + this.c = KPb(d.b, this.b); + kNb(this, this.d, this.c); + LPb(this); + for (f = this.e.e.a.ec().Kc(); f.Ob(); ) { + e = BD(f.Pb(), 266); + e.c.c.length > 0 && JPb(this, e); + } + } + function IQb(a, b, c, d, e, f) { + var g, h, i; + if (!e[b.b]) { + e[b.b] = true; + g = d; + !g && (g = new kRb()); + Ekb(g.e, b); + for (i = f[b.b].Kc(); i.Ob(); ) { + h = BD(i.Pb(), 282); + if (h.d == c || h.c == c) { + continue; + } + h.c != b && IQb(a, h.c, b, g, e, f); + h.d != b && IQb(a, h.d, b, g, e, f); + Ekb(g.c, h); + Gkb(g.d, h.b); + } + return g; + } + return null; + } + function e4b(a) { + var b, c, d, e, f, g, h; + b = 0; + for (e = new olb(a.e); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + c = FAb(new YAb(null, new Kub(d.b, 16)), new w4b()); + c && ++b; + } + for (g = new olb(a.g); g.a < g.c.c.length; ) { + f = BD(mlb(g), 17); + h = FAb(new YAb(null, new Kub(f.b, 16)), new y4b()); + h && ++b; + } + return b >= 2; + } + function gec(a, b) { + var c, d, e, f; + Odd(b, "Self-Loop pre-processing", 1); + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + if (Ljc(c)) { + e = (f = new Kjc(c), yNb(c, (wtc(), ntc), f), Hjc(f), f); + MAb(NAb(LAb(new YAb(null, new Kub(e.d, 16)), new jec()), new lec()), new nec()); + eec(e); + } + } + Qdd(b); + } + function vnc(a, b, c, d, e) { + var f, g, h, i, j, k; + f = a.c.d.j; + g = BD(Ut(c, 0), 8); + for (k = 1; k < c.b; k++) { + j = BD(Ut(c, k), 8); + Gsb(d, g, d.c.b, d.c); + h = Y6c(P6c(new g7c(g), j), 0.5); + i = Y6c(new e7c(bRc(f)), e); + P6c(h, i); + Gsb(d, h, d.c.b, d.c); + g = j; + f = b == 0 ? Xcd(f) : Vcd(f); + } + Dsb(d, (sCb(c.b != 0), BD(c.c.b.c, 8))); + } + function Jbd(a) { + Hbd(); + var b, c, d; + c = qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Dbd])); + if (Ox(Cx(c, a)) > 1) { + return false; + } + b = qqb(zbd, OC(GC(B1, 1), Kie, 93, 0, [ybd, Bbd])); + if (Ox(Cx(b, a)) > 1) { + return false; + } + d = qqb(Gbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, Ebd])); + if (Ox(Cx(d, a)) > 1) { + return false; + } + return true; + } + function U0d(a, b) { + var c, d, e; + c = b.Hh(a.a); + if (c) { + e = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), "affiliation")); + if (e != null) { + d = kfb(e, wfb(35)); + return d == -1 ? l1d(a, u1d(a, bKd(b.Hj())), e) : d == 0 ? l1d(a, null, e.substr(1)) : l1d(a, e.substr(0, d), e.substr(d + 1)); + } + } + return null; + } + function ic(b) { + var c, d, e; + try { + return b == null ? Xhe : fcb(b); + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + c = a; + e = hdb(rb(b)) + "@" + (d = (Zfb(), kCb(b)) >>> 0, d.toString(16)); + tyb(xyb(), ($xb(), "Exception during lenientFormat for " + e), c); + return "<" + e + " threw " + hdb(c.gm) + ">"; + } else + throw vbb(a); + } + } + function mzc(a) { + switch (a.g) { + case 0: + return new xDc(); + case 1: + return new ZCc(); + case 2: + return new DCc(); + case 3: + return new QCc(); + case 4: + return new LDc(); + case 5: + return new iDc(); + default: + throw vbb(new Wdb("No implementation is available for the layerer " + (a.f != null ? a.f : "" + a.g))); + } + } + function AQc(a, b, c) { + var d, e, f; + for (f = new olb(a.t); f.a < f.c.c.length; ) { + d = BD(mlb(f), 268); + if (d.b.s < 0 && d.c > 0) { + d.b.n -= d.c; + d.b.n <= 0 && d.b.u > 0 && Dsb(b, d.b); + } + } + for (e = new olb(a.i); e.a < e.c.c.length; ) { + d = BD(mlb(e), 268); + if (d.a.s < 0 && d.c > 0) { + d.a.u -= d.c; + d.a.u <= 0 && d.a.n > 0 && Dsb(c, d.a); + } + } + } + function Vud(a) { + var b, c, d, e, f; + if (a.g == null) { + a.d = a.si(a.f); + wtd(a, a.d); + if (a.c) { + f = a.f; + return f; + } + } + b = BD(a.g[a.i - 1], 47); + e = b.Pb(); + a.e = b; + c = a.si(e); + if (c.Ob()) { + a.d = c; + wtd(a, c); + } else { + a.d = null; + while (!b.Ob()) { + NC(a.g, --a.i, null); + if (a.i == 0) { + break; + } + d = BD(a.g[a.i - 1], 47); + b = d; + } + } + return e; + } + function r2d(a, b) { + var c, d, e, f, g, h; + d = b; + e = d.ak(); + if (T6d(a.e, e)) { + if (e.hi() && E2d(a, e, d.dd())) { + return false; + } + } else { + h = S6d(a.e.Tg(), e); + c = BD(a.g, 119); + for (f = 0; f < a.i; ++f) { + g = c[f]; + if (h.rl(g.ak())) { + if (pb(g, d)) { + return false; + } else { + BD(Gtd(a, f, b), 72); + return true; + } + } + } + } + return wtd(a, b); + } + function r9b(a, b, c, d) { + var e, f, g, h; + e = new b0b(a); + __b(e, (j0b(), f0b)); + yNb(e, (wtc(), $sc), b); + yNb(e, ktc, d); + yNb(e, (Nyc(), Vxc), (dcd(), $bd)); + yNb(e, Vsc, b.c); + yNb(e, Wsc, b.d); + zbc(b, e); + h = $wnd.Math.floor(c / 2); + for (g = new olb(e.j); g.a < g.c.c.length; ) { + f = BD(mlb(g), 11); + f.n.b = h; + } + return e; + } + function wac(a, b) { + var c, d, e, f, g, h, i, j, k; + i = Pu(a.c - a.b & a.a.length - 1); + j = null; + k = null; + for (f = new xkb(a); f.a != f.b; ) { + e = BD(vkb(f), 10); + c = (h = BD(vNb(e, (wtc(), Vsc)), 11), !h ? null : h.i); + d = (g = BD(vNb(e, Wsc), 11), !g ? null : g.i); + if (j != c || k != d) { + Aac(i, b); + j = c; + k = d; + } + i.c[i.c.length] = e; + } + Aac(i, b); + } + function HNc(a) { + var b, c, d, e, f, g, h; + b = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + for (f = new Sr(ur(U_b(c).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + if (a == e.d.i.c && e.c.j == (Ucd(), Tcd)) { + g = A0b(e.c).b; + h = A0b(e.d).b; + b = $wnd.Math.max(b, $wnd.Math.abs(h - g)); + } + } + } + return b; + } + function aWc(a, b, c) { + var d, e, f; + Odd(c, "Remove overlaps", 1); + c.n && !!b && Tdd(c, i6d(b), (pgd(), mgd)); + d = BD(hkd(b, (MUc(), LUc)), 33); + a.f = d; + a.a = tXc(BD(hkd(b, (ZWc(), WWc)), 293)); + e = ED(hkd(b, (Y9c(), T9c))); + FVc(a, (uCb(e), e)); + f = gVc(d); + _Vc(a, b, f, c); + c.n && !!b && Tdd(c, i6d(b), (pgd(), mgd)); + } + function aYb(a, b, c) { + switch (c.g) { + case 1: + return new f7c(b.a, $wnd.Math.min(a.d.b, b.b)); + case 2: + return new f7c($wnd.Math.max(a.c.a, b.a), b.b); + case 3: + return new f7c(b.a, $wnd.Math.max(a.c.b, b.b)); + case 4: + return new f7c($wnd.Math.min(b.a, a.d.a), b.b); + } + return new f7c(b.a, b.b); + } + function mFc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m; + l = d ? (Ucd(), Tcd) : (Ucd(), zcd); + e = false; + for (i = b[c], j = 0, k = i.length; j < k; ++j) { + h = i[j]; + if (ecd(BD(vNb(h, (Nyc(), Vxc)), 98))) { + continue; + } + g = h.e; + m = !V_b(h, l).dc() && !!g; + if (m) { + f = WZb(g); + a.b = new sic(f, d ? 0 : f.length - 1); + } + e = e | nFc(a, h, l, m); + } + return e; + } + function $sd(a) { + var b, c, d; + b = Pu(1 + (!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c).i); + Ekb(b, (!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); + for (d = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 118); + Ekb(b, (!c.d && (c.d = new y5d(B2, c, 8, 5)), c.d)); + } + return Qb(b), new sl(b); + } + function _sd(a) { + var b, c, d; + b = Pu(1 + (!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c).i); + Ekb(b, (!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); + for (d = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 118); + Ekb(b, (!c.e && (c.e = new y5d(B2, c, 7, 4)), c.e)); + } + return Qb(b), new sl(b); + } + function M9d(a) { + var b, c, d, e; + if (a == null) { + return null; + } else { + d = Qge(a, true); + e = Nwe.length; + if (dfb(d.substr(d.length - e, e), Nwe)) { + c = d.length; + if (c == 4) { + b = (BCb(0, d.length), d.charCodeAt(0)); + if (b == 43) { + return x9d; + } else if (b == 45) { + return w9d; + } + } else if (c == 3) { + return x9d; + } + } + return Hcb(d); + } + } + function aKc(a) { + var b, c, d, e; + b = 0; + c = 0; + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + b = Tbb(wbb(b, HAb(JAb(new YAb(null, new Kub(d.e, 16)), new nLc())))); + c = Tbb(wbb(c, HAb(JAb(new YAb(null, new Kub(d.g, 16)), new pLc())))); + if (b > 1 || c > 1) { + return 2; + } + } + if (b + c == 1) { + return 2; + } + return 0; + } + function WQb(a, b, c) { + var d, e, f, g, h; + Odd(c, "ELK Force", 1); + Ccb(DD(hkd(b, (wSb(), jSb)))) || $Cb((d = new _Cb((Pgd(), new bhd(b))), d)); + h = TQb(b); + XQb(h); + YQb(a, BD(vNb(h, fSb), 424)); + g = LQb(a.a, h); + for (f = g.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 231); + tRb(a.b, e, Udd(c, 1 / g.gc())); + } + h = KQb(g); + SQb(h); + Qdd(c); + } + function yoc(a, b) { + var c, d, e, f, g; + Odd(b, "Breaking Point Processor", 1); + xoc(a); + if (Ccb(DD(vNb(a, (Nyc(), Jyc))))) { + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + c = 0; + for (g = new olb(d.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + f.p = c++; + } + } + soc(a); + toc(a, true); + toc(a, false); + } + Qdd(b); + } + function $1c(a, b, c) { + var d, e, f, g, h, i; + h = a.c; + for (g = (!c.q ? (mmb(), mmb(), kmb) : c.q).vc().Kc(); g.Ob(); ) { + f = BD(g.Pb(), 42); + d = !WAb(JAb(new YAb(null, new Kub(h, 16)), new Xxb(new m2c(b, f)))).sd((EAb(), DAb)); + if (d) { + i = f.dd(); + if (JD(i, 4)) { + e = fvd(i); + e != null && (i = e); + } + b.Ye(BD(f.cd(), 146), i); + } + } + } + function MQd(a, b) { + var c, d, e, f, g; + if (!b) { + return null; + } else { + f = JD(a.Cb, 88) || JD(a.Cb, 99); + g = !f && JD(a.Cb, 322); + for (d = new Fyd((!b.a && (b.a = new KYd(b, j5, b)), b.a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 87); + e = KQd(c); + if (f ? JD(e, 88) : g ? JD(e, 148) : !!e) { + return e; + } + } + return f ? (jGd(), _Fd) : (jGd(), YFd); + } + } + function g3b(a, b) { + var c, d, e, f, g, h; + Odd(b, "Constraints Postprocessor", 1); + g = 0; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + h = 0; + for (d = new olb(e.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + if (c.k == (j0b(), h0b)) { + yNb(c, (Nyc(), nxc), meb(g)); + yNb(c, Gwc, meb(h)); + ++h; + } + } + ++g; + } + Qdd(b); + } + function eRc(a, b, c, d) { + var e, f, g, h, i, j, k; + i = new f7c(c, d); + c7c(i, BD(vNb(b, (mTc(), WSc)), 8)); + for (k = Jsb(b.b, 0); k.b != k.d.c; ) { + j = BD(Xsb(k), 86); + P6c(j.e, i); + Dsb(a.b, j); + } + for (h = Jsb(b.a, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 188); + for (f = Jsb(g.a, 0); f.b != f.d.c; ) { + e = BD(Xsb(f), 8); + P6c(e, i); + } + Dsb(a.a, g); + } + } + function uid(a, b, c) { + var d, e, f; + f = e1d((O6d(), M6d), a.Tg(), b); + if (f) { + Q6d(); + if (!BD(f, 66).Oj()) { + f = _1d(q1d(M6d, f)); + if (!f) { + throw vbb(new Wdb(ite + b.ne() + jte)); + } + } + e = (d = a.Yg(f), BD(d >= 0 ? a._g(d, true, true) : sid(a, f, true), 153)); + BD(e, 215).ml(b, c); + } else { + throw vbb(new Wdb(ite + b.ne() + jte)); + } + } + function ROc(a, b) { + var c, d, e, f, g; + c = new Rkb(); + e = LAb(new YAb(null, new Kub(a, 16)), new iPc()); + f = LAb(new YAb(null, new Kub(a, 16)), new kPc()); + g = aAb(_zb(OAb(ty(OC(GC(xM, 1), Uhe, 833, 0, [e, f])), new mPc()))); + for (d = 1; d < g.length; d++) { + g[d] - g[d - 1] >= 2 * b && Ekb(c, new bPc(g[d - 1] + b, g[d] - b)); + } + return c; + } + function AXc(a, b, c) { + Odd(c, "Eades radial", 1); + c.n && !!b && Tdd(c, i6d(b), (pgd(), mgd)); + a.d = BD(hkd(b, (MUc(), LUc)), 33); + a.c = Edb(ED(hkd(b, (ZWc(), VWc)))); + a.e = tXc(BD(hkd(b, WWc), 293)); + a.a = gWc(BD(hkd(b, YWc), 426)); + a.b = jXc(BD(hkd(b, RWc), 340)); + BXc(a); + c.n && !!b && Tdd(c, i6d(b), (pgd(), mgd)); + } + function Fqd(a, b, c) { + var d, e, f, g, h, j, k, l; + if (c) { + f = c.a.length; + d = new Yge(f); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(c, g.a); + !!e && (j = Uqd(a, (k = (Fhd(), l = new ppd(), l), !!b && npd(k, b), k), e), Lkd(j, _pd(e, Vte)), grd(e, j), hrd(e, j), crd(a, e, j)); + } + } + } + function UKd(a) { + var b, c, d, e, f, g; + if (!a.j) { + g = new HPd(); + b = KKd; + f = b.a.zc(a, b); + if (f == null) { + for (d = new Fyd(_Kd(a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 26); + e = UKd(c); + ytd(g, e); + wtd(g, c); + } + b.a.Bc(a) != null; + } + vud(g); + a.j = new nNd((BD(qud(ZKd((NFd(), MFd).o), 11), 18), g.i), g.g); + $Kd(a).b &= -33; + } + return a.j; + } + function O9d(a) { + var b, c, d, e; + if (a == null) { + return null; + } else { + d = Qge(a, true); + e = Nwe.length; + if (dfb(d.substr(d.length - e, e), Nwe)) { + c = d.length; + if (c == 4) { + b = (BCb(0, d.length), d.charCodeAt(0)); + if (b == 43) { + return z9d; + } else if (b == 45) { + return y9d; + } + } else if (c == 3) { + return z9d; + } + } + return new Odb(d); + } + } + function _C(a) { + var b, c, d; + c = a.l; + if ((c & c - 1) != 0) { + return -1; + } + d = a.m; + if ((d & d - 1) != 0) { + return -1; + } + b = a.h; + if ((b & b - 1) != 0) { + return -1; + } + if (b == 0 && d == 0 && c == 0) { + return -1; + } + if (b == 0 && d == 0 && c != 0) { + return ieb(c); + } + if (b == 0 && d != 0 && c == 0) { + return ieb(d) + 22; + } + if (b != 0 && d == 0 && c == 0) { + return ieb(b) + 44; + } + return -1; + } + function qbc(a, b) { + var c, d, e, f, g; + Odd(b, "Edge joining", 1); + c = Ccb(DD(vNb(a, (Nyc(), Byc)))); + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + g = new Bib(d.a, 0); + while (g.b < g.d.gc()) { + f = (sCb(g.b < g.d.gc()), BD(g.d.Xb(g.c = g.b++), 10)); + if (f.k == (j0b(), g0b)) { + sbc(f, c); + uib(g); + } + } + } + Qdd(b); + } + function c_c(a, b, c) { + var d, e; + H2c(a.b); + K2c(a.b, (Y$c(), V$c), (R0c(), Q0c)); + K2c(a.b, W$c, b.g); + K2c(a.b, X$c, b.a); + a.a = F2c(a.b, b); + Odd(c, "Compaction by shrinking a tree", a.a.c.length); + if (b.i.c.length > 1) { + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 51); + d.pf(b, Udd(c, 1)); + } + } + Qdd(c); + } + function mo(a, b) { + var c, d, e, f, g; + e = b.a & a.f; + f = null; + for (d = a.b[e]; true; d = d.b) { + if (d == b) { + !f ? a.b[e] = b.b : f.b = b.b; + break; + } + f = d; + } + g = b.f & a.f; + f = null; + for (c = a.c[g]; true; c = c.d) { + if (c == b) { + !f ? a.c[g] = b.d : f.d = b.d; + break; + } + f = c; + } + !b.e ? a.a = b.c : b.e.c = b.c; + !b.c ? a.e = b.e : b.c.e = b.e; + --a.i; + ++a.g; + } + function eNb(a) { + var b, c, d, e, f, g, h, i, j, k; + c = a.o; + b = a.p; + g = Ohe; + e = Rie; + h = Ohe; + f = Rie; + for (j = 0; j < c; ++j) { + for (k = 0; k < b; ++k) { + if (YMb(a, j, k)) { + g = $wnd.Math.min(g, j); + e = $wnd.Math.max(e, j); + h = $wnd.Math.min(h, k); + f = $wnd.Math.max(f, k); + } + } + } + i = e - g + 1; + d = f - h + 1; + return new Ggd(meb(g), meb(h), meb(i), meb(d)); + } + function DWb(a, b) { + var c, d, e, f; + f = new Bib(a, 0); + c = (sCb(f.b < f.d.gc()), BD(f.d.Xb(f.c = f.b++), 140)); + while (f.b < f.d.gc()) { + d = (sCb(f.b < f.d.gc()), BD(f.d.Xb(f.c = f.b++), 140)); + e = new dWb(d.c, c.d, b); + sCb(f.b > 0); + f.a.Xb(f.c = --f.b); + Aib(f, e); + sCb(f.b < f.d.gc()); + f.d.Xb(f.c = f.b++); + e.a = false; + c = d; + } + } + function Y2b(a) { + var b, c, d, e, f, g; + e = BD(vNb(a, (wtc(), vsc)), 11); + for (g = new olb(a.j); g.a < g.c.c.length; ) { + f = BD(mlb(g), 11); + for (d = new olb(f.g); d.a < d.c.c.length; ) { + b = BD(mlb(d), 17); + RZb(b, e); + return f; + } + for (c = new olb(f.e); c.a < c.c.c.length; ) { + b = BD(mlb(c), 17); + QZb(b, e); + return f; + } + } + return null; + } + function iA(a, b, c) { + var d, e; + d = Cbb(c.q.getTime()); + if (ybb(d, 0) < 0) { + e = _ie - Tbb(Hbb(Jbb(d), _ie)); + e == _ie && (e = 0); + } else { + e = Tbb(Hbb(d, _ie)); + } + if (b == 1) { + e = $wnd.Math.min((e + 50) / 100 | 0, 9); + Kfb(a, 48 + e & aje); + } else if (b == 2) { + e = $wnd.Math.min((e + 5) / 10 | 0, 99); + EA(a, e, 2); + } else { + EA(a, e, 3); + b > 3 && EA(a, 0, b - 3); + } + } + function cUb(a) { + var b, c, d, e; + if (PD(vNb(a, (Nyc(), axc))) === PD((hbd(), ebd))) { + return !a.e && PD(vNb(a, Cwc)) !== PD((Xrc(), Urc)); + } + d = BD(vNb(a, Dwc), 292); + e = Ccb(DD(vNb(a, Hwc))) || PD(vNb(a, Iwc)) === PD((Rpc(), Opc)); + b = BD(vNb(a, Bwc), 19).a; + c = a.a.c.length; + return !e && d != (Xrc(), Urc) && (b == 0 || b > c); + } + function lkc(a) { + var b, c; + c = 0; + for (; c < a.c.length; c++) { + if (Ojc((tCb(c, a.c.length), BD(a.c[c], 113))) > 0) { + break; + } + } + if (c > 0 && c < a.c.length - 1) { + return c; + } + b = 0; + for (; b < a.c.length; b++) { + if (Ojc((tCb(b, a.c.length), BD(a.c[b], 113))) > 0) { + break; + } + } + if (b > 0 && c < a.c.length - 1) { + return b; + } + return a.c.length / 2 | 0; + } + function mmd(a, b) { + var c, d; + if (b != a.Cb || a.Db >> 16 != 6 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + qmd(a))); + d = null; + !!a.Cb && (d = (c = a.Db >> 16, c >= 0 ? cmd(a, d) : a.Cb.ih(a, -1 - c, null, d))); + !!b && (d = kid(b, a, 6, d)); + d = bmd(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 6, b, b)); + } + function npd(a, b) { + var c, d; + if (b != a.Cb || a.Db >> 16 != 9 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + opd(a))); + d = null; + !!a.Cb && (d = (c = a.Db >> 16, c >= 0 ? lpd(a, d) : a.Cb.ih(a, -1 - c, null, d))); + !!b && (d = kid(b, a, 9, d)); + d = kpd(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 9, b, b)); + } + function Rld(a, b) { + var c, d; + if (b != a.Cb || a.Db >> 16 != 3 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + Sld(a))); + d = null; + !!a.Cb && (d = (c = a.Db >> 16, c >= 0 ? Lld(a, d) : a.Cb.ih(a, -1 - c, null, d))); + !!b && (d = kid(b, a, 12, d)); + d = Kld(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, b, b)); + } + function VId(b) { + var c, d, e, f, g; + e = wId(b); + g = b.j; + if (g == null && !!e) { + return b.$j() ? null : e.zj(); + } else if (JD(e, 148)) { + d = e.Aj(); + if (d) { + f = d.Nh(); + if (f != b.i) { + c = BD(e, 148); + if (c.Ej()) { + try { + b.g = f.Kh(c, g); + } catch (a) { + a = ubb(a); + if (JD(a, 78)) { + b.g = null; + } else + throw vbb(a); + } + } + b.i = f; + } + } + return b.g; + } + return null; + } + function wOb(a) { + var b; + b = new Rkb(); + Ekb(b, new aDb(new f7c(a.c, a.d), new f7c(a.c + a.b, a.d))); + Ekb(b, new aDb(new f7c(a.c, a.d), new f7c(a.c, a.d + a.a))); + Ekb(b, new aDb(new f7c(a.c + a.b, a.d + a.a), new f7c(a.c + a.b, a.d))); + Ekb(b, new aDb(new f7c(a.c + a.b, a.d + a.a), new f7c(a.c, a.d + a.a))); + return b; + } + function IJc(a, b, c, d) { + var e, f, g; + g = LZb(b, c); + d.c[d.c.length] = b; + if (a.j[g.p] == -1 || a.j[g.p] == 2 || a.a[b.p]) { + return d; + } + a.j[g.p] = -1; + for (f = new Sr(ur(O_b(g).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + if (!(!OZb(e) && !(!OZb(e) && e.c.i.c == e.d.i.c)) || e == b) { + continue; + } + return IJc(a, e, g, d); + } + return d; + } + function vQb(a, b, c) { + var d, e, f; + for (f = b.a.ec().Kc(); f.Ob(); ) { + e = BD(f.Pb(), 79); + d = BD(Ohb(a.b, e), 266); + !d && (Xod(jtd(e)) == Xod(ltd(e)) ? uQb(a, e, c) : jtd(e) == Xod(ltd(e)) ? Ohb(a.c, e) == null && Ohb(a.b, ltd(e)) != null && xQb(a, e, c, false) : Ohb(a.d, e) == null && Ohb(a.b, jtd(e)) != null && xQb(a, e, c, true)); + } + } + function jcc(a, b) { + var c, d, e, f, g, h, i; + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + h = new H0b(); + F0b(h, d); + G0b(h, (Ucd(), zcd)); + yNb(h, (wtc(), ftc), (Bcb(), true)); + for (g = b.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 10); + i = new H0b(); + F0b(i, f); + G0b(i, Tcd); + yNb(i, ftc, true); + c = new UZb(); + yNb(c, ftc, true); + QZb(c, h); + RZb(c, i); + } + } + } + function jnc(a, b, c, d) { + var e, f, g, h; + e = hnc(a, b, c); + f = hnc(a, c, b); + g = BD(Ohb(a.c, b), 112); + h = BD(Ohb(a.c, c), 112); + if (e < f) { + new DOc((HOc(), GOc), g, h, f - e); + } else if (f < e) { + new DOc((HOc(), GOc), h, g, e - f); + } else if (e != 0 || !(!b.i || !c.i) && d[b.i.c][c.i.c]) { + new DOc((HOc(), GOc), g, h, 0); + new DOc(GOc, h, g, 0); + } + } + function Qoc(a, b) { + var c, d, e, f, g, h, i; + e = 0; + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + e += f.o.b + f.d.a + f.d.d + a.e; + for (d = new Sr(ur(R_b(f).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + if (c.c.i.k == (j0b(), i0b)) { + i = c.c.i; + h = BD(vNb(i, (wtc(), $sc)), 10); + e += h.o.b + h.d.a + h.d.d; + } + } + } + return e; + } + function WNc(a, b, c) { + var d, e, f, g, h, i, j; + f = new Rkb(); + j = new Psb(); + g = new Psb(); + XNc(a, j, g, b); + VNc(a, j, g, b, c); + for (i = new olb(a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 112); + for (e = new olb(h.k); e.a < e.c.c.length; ) { + d = BD(mlb(e), 129); + (!b || d.c == (HOc(), FOc)) && h.g > d.b.g && (f.c[f.c.length] = d, true); + } + } + return f; + } + function k$c() { + k$c = ccb; + g$c = new l$c("CANDIDATE_POSITION_LAST_PLACED_RIGHT", 0); + f$c = new l$c("CANDIDATE_POSITION_LAST_PLACED_BELOW", 1); + i$c = new l$c("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT", 2); + h$c = new l$c("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW", 3); + j$c = new l$c("WHOLE_DRAWING", 4); + } + function Xqd(a, b) { + if (JD(b, 239)) { + return iqd(a, BD(b, 33)); + } else if (JD(b, 186)) { + return jqd(a, BD(b, 118)); + } else if (JD(b, 354)) { + return hqd(a, BD(b, 137)); + } else if (JD(b, 352)) { + return gqd(a, BD(b, 79)); + } else if (b) { + return null; + } else { + throw vbb(new Wdb(Xte + Fe(new amb(OC(GC(SI, 1), Uhe, 1, 5, [b]))))); + } + } + function aic(a) { + var b, c, d, e, f, g, h; + f = new Psb(); + for (e = new olb(a.d.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + d.b.a.c.length == 0 && (Gsb(f, d, f.c.b, f.c), true); + } + if (f.b > 1) { + b = nGb((c = new pGb(), ++a.b, c), a.d); + for (h = Jsb(f, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 121); + AFb(DFb(CFb(EFb(BFb(new FFb(), 1), 0), b), g)); + } + } + } + function $od(a, b) { + var c, d; + if (b != a.Cb || a.Db >> 16 != 11 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + _od(a))); + d = null; + !!a.Cb && (d = (c = a.Db >> 16, c >= 0 ? Uod(a, d) : a.Cb.ih(a, -1 - c, null, d))); + !!b && (d = kid(b, a, 10, d)); + d = Tod(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 11, b, b)); + } + function uZb(a) { + var b, c, d, e; + for (d = new nib(new eib(a.b).a); d.b; ) { + c = lib(d); + e = BD(c.cd(), 11); + b = BD(c.dd(), 10); + yNb(b, (wtc(), $sc), e); + yNb(e, gtc, b); + yNb(e, Nsc, (Bcb(), true)); + G0b(e, BD(vNb(b, Hsc), 61)); + vNb(b, Hsc); + yNb(e.i, (Nyc(), Vxc), (dcd(), acd)); + BD(vNb(Q_b(e.i), Ksc), 21).Fc((Orc(), Krc)); + } + } + function G4b(a, b, c) { + var d, e, f, g, h, i; + f = 0; + g = 0; + if (a.c) { + for (i = new olb(a.d.i.j); i.a < i.c.c.length; ) { + h = BD(mlb(i), 11); + f += h.e.c.length; + } + } else { + f = 1; + } + if (a.d) { + for (i = new olb(a.c.i.j); i.a < i.c.c.length; ) { + h = BD(mlb(i), 11); + g += h.g.c.length; + } + } else { + g = 1; + } + e = QD(Eeb(g - f)); + d = (c + b) / 2 + (c - b) * (0.4 * e); + return d; + } + function Zjc(a) { + Xjc(); + var b, c; + if (a.Hc((Ucd(), Scd))) { + throw vbb(new Wdb("Port sides must not contain UNDEFINED")); + } + switch (a.gc()) { + case 1: + return Tjc; + case 2: + b = a.Hc(zcd) && a.Hc(Tcd); + c = a.Hc(Acd) && a.Hc(Rcd); + return b || c ? Wjc : Vjc; + case 3: + return Ujc; + case 4: + return Sjc; + default: + return null; + } + } + function Hoc(a, b, c) { + var d, e, f, g, h; + Odd(c, "Breaking Point Removing", 1); + a.a = BD(vNb(b, (Nyc(), Swc)), 218); + for (f = new olb(b.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + for (h = new olb(Mu(e.a)); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (hoc(g)) { + d = BD(vNb(g, (wtc(), usc)), 305); + !d.d && Ioc(a, d); + } + } + } + Qdd(c); + } + function s6c(a, b, c) { + i6c(); + if (m6c(a, b) && m6c(a, c)) { + return false; + } + return u6c(new f7c(a.c, a.d), new f7c(a.c + a.b, a.d), b, c) || u6c(new f7c(a.c + a.b, a.d), new f7c(a.c + a.b, a.d + a.a), b, c) || u6c(new f7c(a.c + a.b, a.d + a.a), new f7c(a.c, a.d + a.a), b, c) || u6c(new f7c(a.c, a.d + a.a), new f7c(a.c, a.d), b, c); + } + function x1d(a, b) { + var c, d, e, f; + if (!a.dc()) { + for (c = 0, d = a.gc(); c < d; ++c) { + f = GD(a.Xb(c)); + if (f == null ? b == null : dfb(f.substr(0, 3), "!##") ? b != null && (e = b.length, !dfb(f.substr(f.length - e, e), b) || f.length != b.length + 3) && !dfb(Ewe, b) : dfb(f, Fwe) && !dfb(Ewe, b) || dfb(f, b)) { + return true; + } + } + } + return false; + } + function J3b(a, b, c, d) { + var e, f, g, h, i, j; + g = a.j.c.length; + i = KC(tN, ile, 306, g, 0, 1); + for (h = 0; h < g; h++) { + f = BD(Ikb(a.j, h), 11); + f.p = h; + i[h] = D3b(N3b(f), c, d); + } + F3b(a, i, c, b, d); + j = new Lqb(); + for (e = 0; e < i.length; e++) { + !!i[e] && Rhb(j, BD(Ikb(a.j, e), 11), i[e]); + } + if (j.f.c + j.g.c != 0) { + yNb(a, (wtc(), Csc), j); + L3b(a, i); + } + } + function Lgc(a, b, c) { + var d, e, f; + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + f = tgc(d); + if (f) { + if (f.k == (j0b(), e0b)) { + switch (BD(vNb(f, (wtc(), Hsc)), 61).g) { + case 4: + f.n.a = b.a; + break; + case 2: + f.n.a = c.a - (f.o.a + f.d.c); + break; + case 1: + f.n.b = b.b; + break; + case 3: + f.n.b = c.b - (f.o.b + f.d.a); + } + } + } + } + } + function kAc() { + kAc = ccb; + iAc = new lAc(ane, 0); + dAc = new lAc("NIKOLOV", 1); + gAc = new lAc("NIKOLOV_PIXEL", 2); + eAc = new lAc("NIKOLOV_IMPROVED", 3); + fAc = new lAc("NIKOLOV_IMPROVED_PIXEL", 4); + cAc = new lAc("DUMMYNODE_PERCENTAGE", 5); + hAc = new lAc("NODECOUNT_PERCENTAGE", 6); + jAc = new lAc("NO_BOUNDARY", 7); + } + function led(a, b, c) { + var d, e, f, g, h; + e = BD(hkd(b, (X7c(), V7c)), 19); + !e && (e = meb(0)); + f = BD(hkd(c, V7c), 19); + !f && (f = meb(0)); + if (e.a > f.a) { + return -1; + } else if (e.a < f.a) { + return 1; + } else { + if (a.a) { + d = Kdb(b.j, c.j); + if (d != 0) { + return d; + } + d = Kdb(b.i, c.i); + if (d != 0) { + return d; + } + } + g = b.g * b.f; + h = c.g * c.f; + return Kdb(g, h); + } + } + function BAd(a, b) { + var c, d, e, f, g, h, i, j, k, l; + ++a.e; + i = a.d == null ? 0 : a.d.length; + if (b > i) { + k = a.d; + a.d = KC(y4, jve, 63, 2 * i + 4, 0, 1); + for (f = 0; f < i; ++f) { + j = k[f]; + if (j) { + d = j.g; + l = j.i; + for (h = 0; h < l; ++h) { + e = BD(d[h], 133); + g = DAd(a, e.Sh()); + c = a.d[g]; + !c && (c = a.d[g] = a.uj()); + c.Fc(e); + } + } + } + return true; + } else { + return false; + } + } + function o2d(a, b, c) { + var d, e, f, g, h, i; + e = c; + f = e.ak(); + if (T6d(a.e, f)) { + if (f.hi()) { + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (pb(h, e) && g != b) { + throw vbb(new Wdb(kue)); + } + } + } + } else { + i = S6d(a.e.Tg(), f); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (i.rl(h.ak())) { + throw vbb(new Wdb(Hwe)); + } + } + } + vtd(a, b, c); + } + function OYb(a, b) { + var c, d, e, f, g, h; + c = BD(vNb(b, (wtc(), Esc)), 21); + g = BD(Qc((xXb(), wXb), c), 21); + h = BD(Qc(LYb, c), 21); + for (f = g.Kc(); f.Ob(); ) { + d = BD(f.Pb(), 21); + if (!BD(Qc(a.b, d), 15).dc()) { + return false; + } + } + for (e = h.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 21); + if (!BD(Qc(a.b, d), 15).dc()) { + return false; + } + } + return true; + } + function scc(a, b) { + var c, d, e, f, g, h; + Odd(b, "Partition postprocessing", 1); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + for (f = new olb(c.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + h = new olb(e.j); + while (h.a < h.c.c.length) { + g = BD(mlb(h), 11); + Ccb(DD(vNb(g, (wtc(), ftc)))) && nlb(h); + } + } + } + Qdd(b); + } + function ZZc(a, b) { + var c, d, e, f, g, h, i, j, k; + if (a.a.c.length == 1) { + return JZc(BD(Ikb(a.a, 0), 187), b); + } + g = YZc(a); + i = 0; + j = a.d; + f = g; + k = a.d; + h = (j - f) / 2 + f; + while (f + 1 < j) { + i = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 187); + i += (e = MZc(c, h, false), e.a); + } + if (i < b) { + k = h; + j = h; + } else { + f = h; + } + h = (j - f) / 2 + f; + } + return k; + } + function fD(a) { + var b, c, d, e, f; + if (isNaN(a)) { + return wD(), vD; + } + if (a < -9223372036854776e3) { + return wD(), tD; + } + if (a >= 9223372036854776e3) { + return wD(), sD; + } + e = false; + if (a < 0) { + e = true; + a = -a; + } + d = 0; + if (a >= Ije) { + d = QD(a / Ije); + a -= d * Ije; + } + c = 0; + if (a >= Hje) { + c = QD(a / Hje); + a -= c * Hje; + } + b = QD(a); + f = TC(b, c, d); + e && ZC(f); + return f; + } + function rKb(a, b) { + var c, d, e, f; + c = !b || !a.u.Hc((rcd(), ncd)); + f = 0; + for (e = new olb(a.e.Cf()); e.a < e.c.c.length; ) { + d = BD(mlb(e), 838); + if (d.Hf() == (Ucd(), Scd)) { + throw vbb(new Wdb("Label and node size calculator can only be used with ports that have port sides assigned.")); + } + d.vf(f++); + qKb(a, d, c); + } + } + function V0d(a, b) { + var c, d, e, f, g; + e = b.Hh(a.a); + if (e) { + d = (!e.b && (e.b = new sId((jGd(), fGd), x6, e)), e.b); + c = GD(AAd(d, cwe)); + if (c != null) { + f = c.lastIndexOf("#"); + g = f == -1 ? w1d(a, b.Aj(), c) : f == 0 ? v1d(a, null, c.substr(1)) : v1d(a, c.substr(0, f), c.substr(f + 1)); + if (JD(g, 148)) { + return BD(g, 148); + } + } + } + return null; + } + function Z0d(a, b) { + var c, d, e, f, g; + d = b.Hh(a.a); + if (d) { + c = (!d.b && (d.b = new sId((jGd(), fGd), x6, d)), d.b); + f = GD(AAd(c, zwe)); + if (f != null) { + e = f.lastIndexOf("#"); + g = e == -1 ? w1d(a, b.Aj(), f) : e == 0 ? v1d(a, null, f.substr(1)) : v1d(a, f.substr(0, e), f.substr(e + 1)); + if (JD(g, 148)) { + return BD(g, 148); + } + } + } + return null; + } + function RDb(a) { + var b, c, d, e, f; + for (c = new olb(a.a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 307); + b.j = null; + for (f = b.a.a.ec().Kc(); f.Ob(); ) { + d = BD(f.Pb(), 57); + X6c(d.b); + (!b.j || d.d.c < b.j.d.c) && (b.j = d); + } + for (e = b.a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 57); + d.b.a = d.d.c - b.j.d.c; + d.b.b = d.d.d - b.j.d.d; + } + } + return a; + } + function sVb(a) { + var b, c, d, e, f; + for (c = new olb(a.a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 189); + b.f = null; + for (f = b.a.a.ec().Kc(); f.Ob(); ) { + d = BD(f.Pb(), 81); + X6c(d.e); + (!b.f || d.g.c < b.f.g.c) && (b.f = d); + } + for (e = b.a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 81); + d.e.a = d.g.c - b.f.g.c; + d.e.b = d.g.d - b.f.g.d; + } + } + return a; + } + function EMb(a) { + var b, c, d; + c = BD(a.a, 19).a; + d = BD(a.b, 19).a; + b = $wnd.Math.max($wnd.Math.abs(c), $wnd.Math.abs(d)); + if (c < b && d == -b) { + return new vgd(meb(c + 1), meb(d)); + } + if (c == b && d < b) { + return new vgd(meb(c), meb(d + 1)); + } + if (c >= -b && d == b) { + return new vgd(meb(c - 1), meb(d)); + } + return new vgd(meb(c), meb(d - 1)); + } + function W8b() { + S8b(); + return OC(GC(AS, 1), Kie, 77, 0, [Y7b, V7b, Z7b, n8b, G8b, r8b, M8b, w8b, E8b, i8b, A8b, v8b, F8b, e8b, O8b, P7b, z8b, I8b, o8b, H8b, Q8b, C8b, Q7b, D8b, R8b, K8b, P8b, p8b, b8b, q8b, m8b, N8b, T7b, _7b, t8b, S7b, u8b, k8b, f8b, x8b, h8b, W7b, U7b, l8b, g8b, y8b, L8b, R7b, B8b, j8b, s8b, c8b, a8b, J8b, $7b, d8b, X7b]); + } + function Yic(a, b, c) { + a.d = 0; + a.b = 0; + b.k == (j0b(), i0b) && c.k == i0b && BD(vNb(b, (wtc(), $sc)), 10) == BD(vNb(c, $sc), 10) && (ajc(b).j == (Ucd(), Acd) ? Zic(a, b, c) : Zic(a, c, b)); + b.k == i0b && c.k == g0b ? ajc(b).j == (Ucd(), Acd) ? a.d = 1 : a.b = 1 : c.k == i0b && b.k == g0b && (ajc(c).j == (Ucd(), Acd) ? a.b = 1 : a.d = 1); + cjc(a, b, c); + } + function esd(a) { + var b, c, d, e, f, g, h, i, j, k, l; + l = hsd(a); + b = a.a; + i = b != null; + i && Upd(l, "category", a.a); + e = Fhe(new Pib(a.d)); + g = !e; + if (g) { + j = new wB(); + cC(l, "knownOptions", j); + c = new msd(j); + reb(new Pib(a.d), c); + } + f = Fhe(a.g); + h = !f; + if (h) { + k = new wB(); + cC(l, "supportedFeatures", k); + d = new osd(k); + reb(a.g, d); + } + return l; + } + function ty(a) { + var b, c, d, e, f, g, h, i, j; + d = false; + b = 336; + c = 0; + f = new Xp(a.length); + for (h = a, i = 0, j = h.length; i < j; ++i) { + g = h[i]; + d = d | (Uzb(g), false); + e = (Tzb(g), g.a); + Ekb(f.a, Qb(e)); + b &= e.qd(); + c = Ly(c, e.rd()); + } + return BD(BD(Rzb(new YAb(null, Yj(new Kub((im(), nm(f.a)), 16), new vy(), b, c)), new xy(a)), 670), 833); + } + function UWb(a, b) { + var c; + if (!!a.d && (b.c != a.e.c || qWb(a.e.b, b.b))) { + Ekb(a.f, a.d); + a.a = a.d.c + a.d.b; + a.d = null; + a.e = null; + } + nWb(b.b) ? a.c = b : a.b = b; + if (b.b == (lWb(), hWb) && !b.a || b.b == iWb && b.a || b.b == jWb && b.a || b.b == kWb && !b.a) { + if (!!a.c && !!a.b) { + c = new J6c(a.a, a.c.d, b.c - a.a, a.b.d - a.c.d); + a.d = c; + a.e = b; + } + } + } + function L2c(a) { + var b; + D2c.call(this); + this.i = new Z2c(); + this.g = a; + this.f = BD(a.e && a.e(), 9).length; + if (this.f == 0) { + throw vbb(new Wdb("There must be at least one phase in the phase enumeration.")); + } + this.c = (b = BD(gdb(this.g), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + this.a = new j3c(); + this.b = new Lqb(); + } + function God(a, b) { + var c, d; + if (b != a.Cb || a.Db >> 16 != 7 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + Iod(a))); + d = null; + !!a.Cb && (d = (c = a.Db >> 16, c >= 0 ? Eod(a, d) : a.Cb.ih(a, -1 - c, null, d))); + !!b && (d = BD(b, 49).gh(a, 1, C2, d)); + d = Dod(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 7, b, b)); + } + function NHd(a, b) { + var c, d; + if (b != a.Cb || a.Db >> 16 != 3 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + QHd(a))); + d = null; + !!a.Cb && (d = (c = a.Db >> 16, c >= 0 ? KHd(a, d) : a.Cb.ih(a, -1 - c, null, d))); + !!b && (d = BD(b, 49).gh(a, 0, k5, d)); + d = JHd(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, b, b)); + } + function Ehb(a, b) { + Dhb(); + var c, d, e, f, g, h, i, j, k; + if (b.d > a.d) { + h = a; + a = b; + b = h; + } + if (b.d < 63) { + return Ihb(a, b); + } + g = (a.d & -2) << 4; + j = Rgb(a, g); + k = Rgb(b, g); + d = yhb(a, Qgb(j, g)); + e = yhb(b, Qgb(k, g)); + i = Ehb(j, k); + c = Ehb(d, e); + f = Ehb(yhb(j, d), yhb(e, k)); + f = thb(thb(f, i), c); + f = Qgb(f, g); + i = Qgb(i, g << 1); + return thb(thb(i, f), c); + } + function aGc(a, b, c) { + var d, e, f, g, h; + g = CHc(a, c); + h = KC(OQ, kne, 10, b.length, 0, 1); + d = 0; + for (f = g.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 11); + Ccb(DD(vNb(e, (wtc(), Nsc)))) && (h[d++] = BD(vNb(e, gtc), 10)); + } + if (d < b.length) { + throw vbb(new Zdb("Expected " + b.length + " hierarchical ports, but found only " + d + ".")); + } + return h; + } + function Und(a, b) { + var c, d, e, f, g, h; + if (!a.tb) { + f = (!a.rb && (a.rb = new jUd(a, d5, a)), a.rb); + h = new Mqb(f.i); + for (e = new Fyd(f); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 138); + g = d.ne(); + c = BD(g == null ? jrb(h.f, null, d) : Drb(h.g, g, d), 138); + !!c && (g == null ? jrb(h.f, null, c) : Drb(h.g, g, c)); + } + a.tb = h; + } + return BD(Phb(a.tb, b), 138); + } + function YKd(a, b) { + var c, d, e, f, g; + (a.i == null && TKd(a), a.i).length; + if (!a.p) { + g = new Mqb((3 * a.g.i / 2 | 0) + 1); + for (e = new $yd(a.g); e.e != e.i.gc(); ) { + d = BD(Zyd(e), 170); + f = d.ne(); + c = BD(f == null ? jrb(g.f, null, d) : Drb(g.g, f, d), 170); + !!c && (f == null ? jrb(g.f, null, c) : Drb(g.g, f, c)); + } + a.p = g; + } + return BD(Phb(a.p, b), 170); + } + function hCb(a, b, c, d, e) { + var f, g, h, i, j; + fCb(d + Wy(c, c.$d()), e); + gCb(b, jCb(c)); + f = c.f; + !!f && hCb(a, b, f, "Caused by: ", false); + for (h = (c.k == null && (c.k = KC(_I, nie, 78, 0, 0, 1)), c.k), i = 0, j = h.length; i < j; ++i) { + g = h[i]; + hCb(a, b, g, "Suppressed: ", false); + } + console.groupEnd != null && console.groupEnd.call(console); + } + function dGc(a, b, c, d) { + var e, f, g, h, i; + i = b.e; + h = i.length; + g = b.q._f(i, c ? 0 : h - 1, c); + e = i[c ? 0 : h - 1]; + g = g | cGc(a, e, c, d); + for (f = c ? 1 : h - 2; c ? f < h : f >= 0; f += c ? 1 : -1) { + g = g | b.c.Sf(i, f, c, d && !Ccb(DD(vNb(b.j, (wtc(), Jsc)))) && !Ccb(DD(vNb(b.j, (wtc(), mtc))))); + g = g | b.q._f(i, f, c); + g = g | cGc(a, i[f], c, d); + } + Qqb(a.c, b); + return g; + } + function o3b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + for (k = m_b(a.j), l = 0, m = k.length; l < m; ++l) { + j = k[l]; + if (c == (KAc(), HAc) || c == JAc) { + i = k_b(j.g); + for (e = i, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + k3b(b, d) && PZb(d, true); + } + } + if (c == IAc || c == JAc) { + h = k_b(j.e); + for (e = h, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + j3b(b, d) && PZb(d, true); + } + } + } + } + function Qmc(a) { + var b, c; + b = null; + c = null; + switch (Lmc(a).g) { + case 1: + b = (Ucd(), zcd); + c = Tcd; + break; + case 2: + b = (Ucd(), Rcd); + c = Acd; + break; + case 3: + b = (Ucd(), Tcd); + c = zcd; + break; + case 4: + b = (Ucd(), Acd); + c = Rcd; + } + mjc(a, BD(Btb(RAb(BD(Qc(a.k, b), 15).Oc(), Hmc)), 113)); + njc(a, BD(Btb(QAb(BD(Qc(a.k, c), 15).Oc(), Hmc)), 113)); + } + function a6b(a) { + var b, c, d, e, f, g; + e = BD(Ikb(a.j, 0), 11); + if (e.e.c.length + e.g.c.length == 0) { + a.n.a = 0; + } else { + g = 0; + for (d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(e), new R0b(e)]))); Qr(d); ) { + c = BD(Rr(d), 11); + g += c.i.n.a + c.n.a + c.a.a; + } + b = BD(vNb(a, (Nyc(), Txc)), 8); + f = !b ? 0 : b.a; + a.n.a = g / (e.e.c.length + e.g.c.length) - f; + } + } + function F1c(a, b) { + var c, d, e; + for (d = new olb(b.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 221); + $Nb(BD(c.b, 65), c7c(R6c(BD(b.b, 65).c), BD(b.b, 65).a)); + e = xOb(BD(b.b, 65).b, BD(c.b, 65).b); + e > 1 && (a.a = true); + ZNb(BD(c.b, 65), P6c(R6c(BD(b.b, 65).c), Y6c(c7c(R6c(BD(c.b, 65).a), BD(b.b, 65).a), e))); + D1c(a, b); + F1c(a, c); + } + } + function rVb(a) { + var b, c, d, e, f, g, h; + for (f = new olb(a.a.a); f.a < f.c.c.length; ) { + d = BD(mlb(f), 189); + d.e = 0; + d.d.a.$b(); + } + for (e = new olb(a.a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 189); + for (c = d.a.a.ec().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 81); + for (h = b.f.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 81); + if (g.d != d) { + Qqb(d.d, g); + ++g.d.e; + } + } + } + } + } + function bcc(a) { + var b, c, d, e, f, g, h, i; + i = a.j.c.length; + c = 0; + b = i; + e = 2 * i; + for (h = new olb(a.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + switch (g.j.g) { + case 2: + case 4: + g.p = -1; + break; + case 1: + case 3: + d = g.e.c.length; + f = g.g.c.length; + d > 0 && f > 0 ? g.p = b++ : d > 0 ? g.p = c++ : f > 0 ? g.p = e++ : g.p = c++; + } + } + mmb(); + Okb(a.j, new fcc()); + } + function Vec(a) { + var b, c; + c = null; + b = BD(Ikb(a.g, 0), 17); + do { + c = b.d.i; + if (wNb(c, (wtc(), Wsc))) { + return BD(vNb(c, Wsc), 11).i; + } + if (c.k != (j0b(), h0b) && Qr(new Sr(ur(U_b(c).a.Kc(), new Sq())))) { + b = BD(Rr(new Sr(ur(U_b(c).a.Kc(), new Sq()))), 17); + } else if (c.k != h0b) { + return null; + } + } while (!!c && c.k != (j0b(), h0b)); + return c; + } + function Omc(a, b) { + var c, d, e, f, g, h, i, j, k; + h = b.j; + g = b.g; + i = BD(Ikb(h, h.c.length - 1), 113); + k = (tCb(0, h.c.length), BD(h.c[0], 113)); + j = Kmc(a, g, i, k); + for (f = 1; f < h.c.length; f++) { + c = (tCb(f - 1, h.c.length), BD(h.c[f - 1], 113)); + e = (tCb(f, h.c.length), BD(h.c[f], 113)); + d = Kmc(a, g, c, e); + if (d > j) { + i = c; + k = e; + j = d; + } + } + b.a = k; + b.c = i; + } + function sEb(a, b) { + var c, d; + d = Axb(a.b, b.b); + if (!d) { + throw vbb(new Zdb("Invalid hitboxes for scanline constraint calculation.")); + } + (mEb(b.b, BD(Cxb(a.b, b.b), 57)) || mEb(b.b, BD(Bxb(a.b, b.b), 57))) && (Zfb(), b.b + " has overlap."); + a.a[b.b.f] = BD(Exb(a.b, b.b), 57); + c = BD(Dxb(a.b, b.b), 57); + !!c && (a.a[c.f] = b.b); + } + function AFb(a) { + if (!a.a.d || !a.a.e) { + throw vbb(new Zdb((fdb(fN), fN.k + " must have a source and target " + (fdb(jN), jN.k) + " specified."))); + } + if (a.a.d == a.a.e) { + throw vbb(new Zdb("Network simplex does not support self-loops: " + a.a + " " + a.a.d + " " + a.a.e)); + } + NFb(a.a.d.g, a.a); + NFb(a.a.e.b, a.a); + return a.a; + } + function HHc(a, b, c) { + var d, e, f, g, h, i, j; + j = new Hxb(new tIc(a)); + for (g = OC(GC(aR, 1), lne, 11, 0, [b, c]), h = 0, i = g.length; h < i; ++h) { + f = g[h]; + Iwb(j.a, f, (Bcb(), zcb)) == null; + for (e = new b1b(f.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + d.c == d.d || Axb(j, f == d.c ? d.d : d.c); + } + } + return Qb(j), new Tkb(j); + } + function oPc(a, b, c) { + var d, e, f, g, h, i; + d = 0; + if (b.b != 0 && c.b != 0) { + f = Jsb(b, 0); + g = Jsb(c, 0); + h = Edb(ED(Xsb(f))); + i = Edb(ED(Xsb(g))); + e = true; + do { + if (h > i - a.b && h < i + a.b) { + return -1; + } else + h > i - a.a && h < i + a.a && ++d; + h <= i && f.b != f.d.c ? h = Edb(ED(Xsb(f))) : i <= h && g.b != g.d.c ? i = Edb(ED(Xsb(g))) : e = false; + } while (e); + } + return d; + } + function F3b(a, b, c, d, e) { + var f, g, h, i; + i = (f = BD(gdb(F1), 9), new xqb(f, BD(_Bb(f, f.length), 9), 0)); + for (h = new olb(a.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + if (b[g.p]) { + G3b(g, b[g.p], d); + rqb(i, g.j); + } + } + if (e) { + K3b(a, b, (Ucd(), zcd), 2 * c, d); + K3b(a, b, Tcd, 2 * c, d); + } else { + K3b(a, b, (Ucd(), Acd), 2 * c, d); + K3b(a, b, Rcd, 2 * c, d); + } + } + function Szb(a) { + var b, c, d, e, f; + f = new Rkb(); + Hkb(a.b, new XBb(f)); + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + if (f.c.length != 0) { + b = (tCb(0, f.c.length), BD(f.c[0], 78)); + for (c = 1, d = f.c.length; c < d; ++c) { + e = (tCb(c, f.c.length), BD(f.c[c], 78)); + e != b && Qy(b, e); + } + if (JD(b, 60)) { + throw vbb(BD(b, 60)); + } + if (JD(b, 289)) { + throw vbb(BD(b, 289)); + } + } + } + function DCb(a, b) { + var c, d, e, f; + a = a == null ? Xhe : (uCb(a), a); + c = new Vfb(); + f = 0; + d = 0; + while (d < b.length) { + e = a.indexOf("%s", f); + if (e == -1) { + break; + } + Qfb(c, a.substr(f, e - f)); + Pfb(c, b[d++]); + f = e + 2; + } + Qfb(c, a.substr(f)); + if (d < b.length) { + c.a += " ["; + Pfb(c, b[d++]); + while (d < b.length) { + c.a += She; + Pfb(c, b[d++]); + } + c.a += "]"; + } + return c.a; + } + function KCb(a) { + var b, c, d, e; + b = 0; + d = a.length; + e = d - 4; + c = 0; + while (c < e) { + b = (BCb(c + 3, a.length), a.charCodeAt(c + 3) + (BCb(c + 2, a.length), 31 * (a.charCodeAt(c + 2) + (BCb(c + 1, a.length), 31 * (a.charCodeAt(c + 1) + (BCb(c, a.length), 31 * (a.charCodeAt(c) + 31 * b))))))); + b = b | 0; + c += 4; + } + while (c < d) { + b = b * 31 + bfb(a, c++); + } + b = b | 0; + return b; + } + function Rac(a) { + var b, c; + for (c = new Sr(ur(U_b(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + if (b.d.i.k != (j0b(), f0b)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to LAST, but has at least one outgoing edge that does not go to a LAST_SEPARATE node. That must not happen.")); + } + } + } + function jQc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m; + i = 0; + for (k = new olb(a.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + h = 0; + for (f = new Sr(ur(R_b(j).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + l = A0b(e.c).b; + m = A0b(e.d).b; + h = $wnd.Math.max(h, $wnd.Math.abs(m - l)); + } + i = $wnd.Math.max(i, h); + } + g = d * $wnd.Math.min(1, b / c) * i; + return g; + } + function See(a) { + var b; + b = new Ifb(); + (a & 256) != 0 && (b.a += "F", b); + (a & 128) != 0 && (b.a += "H", b); + (a & 512) != 0 && (b.a += "X", b); + (a & 2) != 0 && (b.a += "i", b); + (a & 8) != 0 && (b.a += "m", b); + (a & 4) != 0 && (b.a += "s", b); + (a & 32) != 0 && (b.a += "u", b); + (a & 64) != 0 && (b.a += "w", b); + (a & 16) != 0 && (b.a += "x", b); + (a & zte) != 0 && (b.a += ",", b); + return jfb(b.a); + } + function F5b(a, b) { + var c, d, e, f; + Odd(b, "Resize child graph to fit parent.", 1); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + Gkb(a.a, c.a); + c.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + for (f = new olb(a.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + $_b(e, null); + } + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + G5b(a); + !!a.e && E5b(a.e, a); + Qdd(b); + } + function eec(a) { + var b, c, d, e, f, g, h, i, j; + d = a.b; + f = d.e; + g = ecd(BD(vNb(d, (Nyc(), Vxc)), 98)); + c = !!f && BD(vNb(f, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)); + if (g || c) { + return; + } + for (j = (h = new $ib(a.e).a.vc().Kc(), new djb(h)); j.a.Ob(); ) { + i = (b = BD(j.a.Pb(), 42), BD(b.dd(), 113)); + if (i.a) { + e = i.d; + F0b(e, null); + i.c = true; + a.a = true; + } + } + } + function QFc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n; + m = -1; + n = 0; + for (j = a, k = 0, l = j.length; k < l; ++k) { + i = j[k]; + for (f = i, g = 0, h = f.length; g < h; ++g) { + e = f[g]; + b = new Unc(m == -1 ? a[0] : a[m], Xec(e)); + for (c = 0; c < e.j.c.length; c++) { + for (d = c + 1; d < e.j.c.length; d++) { + Rnc(b, BD(Ikb(e.j, c), 11), BD(Ikb(e.j, d), 11)) > 0 && ++n; + } + } + } + ++m; + } + return n; + } + function hUc(a, b) { + var c, d, e, f, g; + g = BD(vNb(b, (JTc(), FTc)), 425); + for (f = Jsb(b.b, 0); f.b != f.d.c; ) { + e = BD(Xsb(f), 86); + if (a.b[e.g] == 0) { + switch (g.g) { + case 0: + iUc(a, e); + break; + case 1: + gUc(a, e); + } + a.b[e.g] = 2; + } + } + for (d = Jsb(a.a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 188); + ze(c.b.d, c, true); + ze(c.c.b, c, true); + } + yNb(b, (mTc(), gTc), a.a); + } + function S6d(a, b) { + Q6d(); + var c, d, e, f; + if (!b) { + return P6d; + } else if (b == (Q8d(), N8d) || (b == v8d || b == t8d || b == u8d) && a != s8d) { + return new Z6d(a, b); + } else { + d = BD(b, 677); + c = d.pk(); + if (!c) { + a2d(q1d((O6d(), M6d), b)); + c = d.pk(); + } + f = (!c.i && (c.i = new Lqb()), c.i); + e = BD(Wd(irb(f.f, a)), 1942); + !e && Rhb(f, a, e = new Z6d(a, b)); + return e; + } + } + function Tbc(a, b) { + var c, d, e, f, g, h, i, j, k; + i = BD(vNb(a, (wtc(), $sc)), 11); + j = l7c(OC(GC(m1, 1), nie, 8, 0, [i.i.n, i.n, i.a])).a; + k = a.i.n.b; + c = k_b(a.e); + for (e = c, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + RZb(d, i); + Fsb(d.a, new f7c(j, k)); + if (b) { + h = BD(vNb(d, (Nyc(), jxc)), 74); + if (!h) { + h = new s7c(); + yNb(d, jxc, h); + } + Dsb(h, new f7c(j, k)); + } + } + } + function Ubc(a, b) { + var c, d, e, f, g, h, i, j, k; + e = BD(vNb(a, (wtc(), $sc)), 11); + j = l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).a; + k = a.i.n.b; + c = k_b(a.g); + for (g = c, h = 0, i = g.length; h < i; ++h) { + f = g[h]; + QZb(f, e); + Esb(f.a, new f7c(j, k)); + if (b) { + d = BD(vNb(f, (Nyc(), jxc)), 74); + if (!d) { + d = new s7c(); + yNb(f, jxc, d); + } + Dsb(d, new f7c(j, k)); + } + } + } + function TFc(a, b) { + var c, d, e, f, g, h; + a.b = new Rkb(); + a.d = BD(vNb(b, (wtc(), jtc)), 230); + a.e = Dub(a.d); + f = new Psb(); + e = Ou(OC(GC(KQ, 1), cne, 37, 0, [b])); + g = 0; + while (g < e.c.length) { + d = (tCb(g, e.c.length), BD(e.c[g], 37)); + d.p = g++; + c = new fFc(d, a.a, a.b); + Gkb(e, c.b); + Ekb(a.b, c); + c.s && (h = Jsb(f, 0), Vsb(h, c)); + } + a.c = new Tqb(); + return f; + } + function HJb(a, b) { + var c, d, e, f, g, h; + for (g = BD(BD(Qc(a.r, b), 21), 84).Kc(); g.Ob(); ) { + f = BD(g.Pb(), 111); + c = f.c ? ZHb(f.c) : 0; + if (c > 0) { + if (f.a) { + h = f.b.rf().a; + if (c > h) { + e = (c - h) / 2; + f.d.b = e; + f.d.c = e; + } + } else { + f.d.c = a.s + c; + } + } else if (tcd(a.u)) { + d = sfd(f.b); + d.c < 0 && (f.d.b = -d.c); + d.c + d.b > f.b.rf().a && (f.d.c = d.c + d.b - f.b.rf().a); + } + } + } + function Eec(a, b) { + var c, d, e, f; + Odd(b, "Semi-Interactive Crossing Minimization Processor", 1); + c = false; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + f = TAb(VAb(JAb(JAb(new YAb(null, new Kub(d.a, 16)), new Jec()), new Lec()), new Nec()), new Rec()); + c = c | f.a != null; + } + c && yNb(a, (wtc(), Rsc), (Bcb(), true)); + Qdd(b); + } + function sRc(a, b, c) { + var d, e, f, g, h; + e = c; + !e && (e = new Zdd()); + Odd(e, "Layout", a.a.c.length); + if (Ccb(DD(vNb(b, (JTc(), vTc))))) { + Zfb(); + for (d = 0; d < a.a.c.length; d++) { + h = (d < 10 ? "0" : "") + d++; + " Slot " + h + ": " + hdb(rb(BD(Ikb(a.a, d), 51))); + } + } + for (g = new olb(a.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 51); + f.pf(b, Udd(e, 1)); + } + Qdd(e); + } + function yMb(a) { + var b, c; + b = BD(a.a, 19).a; + c = BD(a.b, 19).a; + if (b >= 0) { + if (b == c) { + return new vgd(meb(-b - 1), meb(-b - 1)); + } + if (b == -c) { + return new vgd(meb(-b), meb(c + 1)); + } + } + if ($wnd.Math.abs(b) > $wnd.Math.abs(c)) { + if (b < 0) { + return new vgd(meb(-b), meb(c)); + } + return new vgd(meb(-b), meb(c + 1)); + } + return new vgd(meb(b + 1), meb(c)); + } + function q5b(a) { + var b, c; + c = BD(vNb(a, (Nyc(), mxc)), 163); + b = BD(vNb(a, (wtc(), Osc)), 303); + if (c == (Ctc(), ytc)) { + yNb(a, mxc, Btc); + yNb(a, Osc, (esc(), dsc)); + } else if (c == Atc) { + yNb(a, mxc, Btc); + yNb(a, Osc, (esc(), bsc)); + } else if (b == (esc(), dsc)) { + yNb(a, mxc, ytc); + yNb(a, Osc, csc); + } else if (b == bsc) { + yNb(a, mxc, Atc); + yNb(a, Osc, csc); + } + } + function FNc() { + FNc = ccb; + DNc = new RNc(); + zNc = e3c(new j3c(), (qUb(), nUb), (S8b(), o8b)); + CNc = c3c(e3c(new j3c(), nUb, C8b), pUb, B8b); + ENc = b3c(b3c(g3c(c3c(e3c(new j3c(), lUb, M8b), pUb, L8b), oUb), K8b), N8b); + ANc = c3c(e3c(e3c(e3c(new j3c(), mUb, r8b), oUb, t8b), oUb, u8b), pUb, s8b); + BNc = c3c(e3c(e3c(new j3c(), oUb, u8b), oUb, _7b), pUb, $7b); + } + function hQc() { + hQc = ccb; + cQc = e3c(c3c(new j3c(), (qUb(), pUb), (S8b(), c8b)), nUb, o8b); + gQc = b3c(b3c(g3c(c3c(e3c(new j3c(), lUb, M8b), pUb, L8b), oUb), K8b), N8b); + dQc = c3c(e3c(e3c(e3c(new j3c(), mUb, r8b), oUb, t8b), oUb, u8b), pUb, s8b); + fQc = e3c(e3c(new j3c(), nUb, C8b), pUb, B8b); + eQc = c3c(e3c(e3c(new j3c(), oUb, u8b), oUb, _7b), pUb, $7b); + } + function GNc(a, b, c, d, e) { + var f, g; + if ((!OZb(b) && b.c.i.c == b.d.i.c || !T6c(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])), c)) && !OZb(b)) { + b.c == e ? St(b.a, 0, new g7c(c)) : Dsb(b.a, new g7c(c)); + if (d && !Rqb(a.a, c)) { + g = BD(vNb(b, (Nyc(), jxc)), 74); + if (!g) { + g = new s7c(); + yNb(b, jxc, g); + } + f = new g7c(c); + Gsb(g, f, g.c.b, g.c); + Qqb(a.a, f); + } + } + } + function Qac(a) { + var b, c; + for (c = new Sr(ur(R_b(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + if (b.c.i.k != (j0b(), f0b)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen.")); + } + } + } + function vjd(a, b, c) { + var d, e, f, g, h, i, j; + e = aeb(a.Db & 254); + if (e == 0) { + a.Eb = c; + } else { + if (e == 1) { + h = KC(SI, Uhe, 1, 2, 5, 1); + f = zjd(a, b); + if (f == 0) { + h[0] = c; + h[1] = a.Eb; + } else { + h[0] = a.Eb; + h[1] = c; + } + } else { + h = KC(SI, Uhe, 1, e + 1, 5, 1); + g = CD(a.Eb); + for (d = 2, i = 0, j = 0; d <= 128; d <<= 1) { + d == b ? h[j++] = c : (a.Db & d) != 0 && (h[j++] = g[i++]); + } + } + a.Eb = h; + } + a.Db |= b; + } + function ENb(a, b, c) { + var d, e, f, g; + this.b = new Rkb(); + e = 0; + d = 0; + for (g = new olb(a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 167); + c && rMb(f); + Ekb(this.b, f); + e += f.o; + d += f.p; + } + if (this.b.c.length > 0) { + f = BD(Ikb(this.b, 0), 167); + e += f.o; + d += f.p; + } + e *= 2; + d *= 2; + b > 1 ? e = QD($wnd.Math.ceil(e * b)) : d = QD($wnd.Math.ceil(d / b)); + this.a = new pNb(e, d); + } + function Igc(a, b, c, d, e, f) { + var g, h, i, j, k, l, m, n, o2, p, q, r; + k = d; + if (b.j && b.o) { + n = BD(Ohb(a.f, b.A), 57); + p = n.d.c + n.d.b; + --k; + } else { + p = b.a.c + b.a.b; + } + l = e; + if (c.q && c.o) { + n = BD(Ohb(a.f, c.C), 57); + j = n.d.c; + ++l; + } else { + j = c.a.c; + } + q = j - p; + i = $wnd.Math.max(2, l - k); + h = q / i; + o2 = p + h; + for (m = k; m < l; ++m) { + g = BD(f.Xb(m), 128); + r = g.a.b; + g.a.c = o2 - r / 2; + o2 += h; + } + } + function UHc(a, b, c, d, e, f) { + var g, h, i, j, k, l; + j = c.c.length; + f && (a.c = KC(WD, oje, 25, b.length, 15, 1)); + for (g = e ? 0 : b.length - 1; e ? g < b.length : g >= 0; g += e ? 1 : -1) { + h = b[g]; + i = d == (Ucd(), zcd) ? e ? V_b(h, d) : Su(V_b(h, d)) : e ? Su(V_b(h, d)) : V_b(h, d); + f && (a.c[h.p] = i.gc()); + for (l = i.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + a.d[k.p] = j++; + } + Gkb(c, i); + } + } + function aQc(a, b, c) { + var d, e, f, g, h, i, j, k; + f = Edb(ED(a.b.Kc().Pb())); + j = Edb(ED(Pq(b.b))); + d = Y6c(R6c(a.a), j - c); + e = Y6c(R6c(b.a), c - f); + k = P6c(d, e); + Y6c(k, 1 / (j - f)); + this.a = k; + this.b = new Rkb(); + h = true; + g = a.b.Kc(); + g.Pb(); + while (g.Ob()) { + i = Edb(ED(g.Pb())); + if (h && i - c > Oqe) { + this.b.Fc(c); + h = false; + } + this.b.Fc(i); + } + h && this.b.Fc(c); + } + function vGb(a) { + var b, c, d, e; + yGb(a, a.n); + if (a.d.c.length > 0) { + Blb(a.c); + while (GGb(a, BD(mlb(new olb(a.e.a)), 121)) < a.e.a.c.length) { + b = AGb(a); + e = b.e.e - b.d.e - b.a; + b.e.j && (e = -e); + for (d = new olb(a.e.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 121); + c.j && (c.e += e); + } + Blb(a.c); + } + Blb(a.c); + DGb(a, BD(mlb(new olb(a.e.a)), 121)); + rGb(a); + } + } + function rkc(a, b) { + var c, d, e, f, g; + for (e = BD(Qc(a.a, (Xjc(), Tjc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 101); + c = BD(Ikb(d.j, 0), 113).d.j; + f = new Tkb(d.j); + Okb(f, new Xkc()); + switch (b.g) { + case 1: + jkc(a, f, c, (Fkc(), Dkc), 1); + break; + case 0: + g = lkc(f); + jkc(a, new Jib(f, 0, g), c, (Fkc(), Dkc), 0); + jkc(a, new Jib(f, g, f.c.length), c, Dkc, 1); + } + } + } + function c2c(a, b) { + Y1c(); + var c, d; + c = j4c(n4c(), b.tg()); + if (c) { + d = c.j; + if (JD(a, 239)) { + return Zod(BD(a, 33)) ? uqb(d, (N5c(), K5c)) || uqb(d, L5c) : uqb(d, (N5c(), K5c)); + } else if (JD(a, 352)) { + return uqb(d, (N5c(), I5c)); + } else if (JD(a, 186)) { + return uqb(d, (N5c(), M5c)); + } else if (JD(a, 354)) { + return uqb(d, (N5c(), J5c)); + } + } + return true; + } + function c3d(a, b, c) { + var d, e, f, g, h, i; + e = c; + f = e.ak(); + if (T6d(a.e, f)) { + if (f.hi()) { + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (pb(h, e) && g != b) { + throw vbb(new Wdb(kue)); + } + } + } + } else { + i = S6d(a.e.Tg(), f); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (i.rl(h.ak()) && g != b) { + throw vbb(new Wdb(Hwe)); + } + } + } + return BD(Gtd(a, b, c), 72); + } + function Sy(d, b) { + if (b instanceof Object) { + try { + b.__java$exception = d; + if (navigator.userAgent.toLowerCase().indexOf("msie") != -1 && $doc.documentMode < 9) { + return; + } + var c = d; + Object.defineProperties(b, { cause: { get: function() { + var a = c.Zd(); + return a && a.Xd(); + } }, suppressed: { get: function() { + return c.Yd(); + } } }); + } catch (a) { + } + } + } + function lhb(a, b) { + var c, d, e, f, g; + d = b >> 5; + b &= 31; + if (d >= a.d) { + return a.e < 0 ? (Hgb(), Bgb) : (Hgb(), Ggb); + } + f = a.d - d; + e = KC(WD, oje, 25, f + 1, 15, 1); + mhb(e, f, a.a, d, b); + if (a.e < 0) { + for (c = 0; c < d && a.a[c] == 0; c++) + ; + if (c < d || b > 0 && a.a[c] << 32 - b != 0) { + for (c = 0; c < f && e[c] == -1; c++) { + e[c] = 0; + } + c == f && ++f; + ++e[c]; + } + } + g = new Vgb(a.e, f, e); + Jgb(g); + return g; + } + function UPb(a) { + var b, c, d, e; + e = mpd(a); + c = new kQb(e); + d = new mQb(e); + b = new Rkb(); + Gkb(b, (!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); + Gkb(b, (!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); + return BD(GAb(NAb(JAb(new YAb(null, new Kub(b, 16)), c), d), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + } + function p2d(a, b, c, d) { + var e, f, g, h, i; + h = (Q6d(), BD(b, 66).Oj()); + if (T6d(a.e, b)) { + if (b.hi() && F2d(a, b, d, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + throw vbb(new Wdb(kue)); + } + } else { + i = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (i.rl(f.ak())) { + throw vbb(new Wdb(Hwe)); + } + } + } + vtd(a, I2d(a, b, c), h ? BD(d, 72) : R6d(b, d)); + } + function T6d(a, b) { + Q6d(); + var c, d, e; + if (b.$j()) { + return true; + } else if (b.Zj() == -2) { + if (b == (m8d(), k8d) || b == h8d || b == i8d || b == j8d) { + return true; + } else { + e = a.Tg(); + if (bLd(e, b) >= 0) { + return false; + } else { + c = e1d((O6d(), M6d), e, b); + if (!c) { + return true; + } else { + d = c.Zj(); + return (d > 1 || d == -1) && $1d(q1d(M6d, c)) != 3; + } + } + } + } else { + return false; + } + } + function R1b(a, b, c, d) { + var e, f, g, h, i; + h = atd(BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82)); + i = atd(BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82)); + if (Xod(h) == Xod(i)) { + return null; + } + if (ntd(i, h)) { + return null; + } + g = Mld(b); + if (g == c) { + return d; + } else { + f = BD(Ohb(a.a, g), 10); + if (f) { + e = f.e; + if (e) { + return e; + } + } + } + return null; + } + function Cac(a, b) { + var c; + c = BD(vNb(a, (Nyc(), Rwc)), 276); + Odd(b, "Label side selection (" + c + ")", 1); + switch (c.g) { + case 0: + Dac(a, (rbd(), nbd)); + break; + case 1: + Dac(a, (rbd(), obd)); + break; + case 2: + Bac(a, (rbd(), nbd)); + break; + case 3: + Bac(a, (rbd(), obd)); + break; + case 4: + Eac(a, (rbd(), nbd)); + break; + case 5: + Eac(a, (rbd(), obd)); + } + Qdd(b); + } + function bGc(a, b, c) { + var d, e, f, g, h, i; + d = RFc(c, a.length); + g = a[d]; + if (g[0].k != (j0b(), e0b)) { + return; + } + f = SFc(c, g.length); + i = b.j; + for (e = 0; e < i.c.length; e++) { + h = (tCb(e, i.c.length), BD(i.c[e], 11)); + if ((c ? h.j == (Ucd(), zcd) : h.j == (Ucd(), Tcd)) && Ccb(DD(vNb(h, (wtc(), Nsc))))) { + Nkb(i, e, BD(vNb(g[f], (wtc(), $sc)), 11)); + f += c ? 1 : -1; + } + } + } + function rQc(a, b) { + var c, d, e, f, g; + g = new Rkb(); + c = b; + do { + f = BD(Ohb(a.b, c), 128); + f.B = c.c; + f.D = c.d; + g.c[g.c.length] = f; + c = BD(Ohb(a.k, c), 17); + } while (c); + d = (tCb(0, g.c.length), BD(g.c[0], 128)); + d.j = true; + d.A = BD(d.d.a.ec().Kc().Pb(), 17).c.i; + e = BD(Ikb(g, g.c.length - 1), 128); + e.q = true; + e.C = BD(e.d.a.ec().Kc().Pb(), 17).d.i; + return g; + } + function $wd(a) { + if (a.g == null) { + switch (a.p) { + case 0: + a.g = Swd(a) ? (Bcb(), Acb) : (Bcb(), zcb); + break; + case 1: + a.g = Scb(Twd(a)); + break; + case 2: + a.g = bdb(Uwd(a)); + break; + case 3: + a.g = Vwd(a); + break; + case 4: + a.g = new Ndb(Wwd(a)); + break; + case 6: + a.g = Aeb(Ywd(a)); + break; + case 5: + a.g = meb(Xwd(a)); + break; + case 7: + a.g = Web(Zwd(a)); + } + } + return a.g; + } + function hxd(a) { + if (a.n == null) { + switch (a.p) { + case 0: + a.n = _wd(a) ? (Bcb(), Acb) : (Bcb(), zcb); + break; + case 1: + a.n = Scb(axd(a)); + break; + case 2: + a.n = bdb(bxd(a)); + break; + case 3: + a.n = cxd(a); + break; + case 4: + a.n = new Ndb(dxd(a)); + break; + case 6: + a.n = Aeb(fxd(a)); + break; + case 5: + a.n = meb(exd(a)); + break; + case 7: + a.n = Web(gxd(a)); + } + } + return a.n; + } + function QDb(a) { + var b, c, d, e, f, g, h; + for (f = new olb(a.a.a); f.a < f.c.c.length; ) { + d = BD(mlb(f), 307); + d.g = 0; + d.i = 0; + d.e.a.$b(); + } + for (e = new olb(a.a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 307); + for (c = d.a.a.ec().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 57); + for (h = b.c.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 57); + if (g.a != d) { + Qqb(d.e, g); + ++g.a.g; + ++g.a.i; + } + } + } + } + } + function gOb(a, b) { + var c, d, e, f, g, h; + h = Axb(a.a, b.b); + if (!h) { + throw vbb(new Zdb("Invalid hitboxes for scanline overlap calculation.")); + } + g = false; + for (f = (d = new Ywb(new cxb(new Gjb(a.a.a).a).b), new Njb(d)); sib(f.a.a); ) { + e = (c = Wwb(f.a), BD(c.cd(), 65)); + if (bOb(b.b, e)) { + T$c(a.b.a, b.b, e); + g = true; + } else { + if (g) { + break; + } + } + } + } + function G5b(a) { + var b, c, d, e, f; + e = BD(vNb(a, (Nyc(), Fxc)), 21); + f = BD(vNb(a, Ixc), 21); + c = new f7c(a.f.a + a.d.b + a.d.c, a.f.b + a.d.d + a.d.a); + b = new g7c(c); + if (e.Hc((tdd(), pdd))) { + d = BD(vNb(a, Hxc), 8); + if (f.Hc((Idd(), Bdd))) { + d.a <= 0 && (d.a = 20); + d.b <= 0 && (d.b = 20); + } + b.a = $wnd.Math.max(c.a, d.a); + b.b = $wnd.Math.max(c.b, d.b); + } + H5b(a, c, b); + } + function toc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + e = b ? new Coc() : new Eoc(); + f = false; + do { + f = false; + j = b ? Su(a.b) : a.b; + for (i = j.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 29); + m = Mu(h.a); + b || new ov(m); + for (l = new olb(m); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + if (e.Mb(k)) { + d = k; + c = BD(vNb(k, (wtc(), usc)), 305); + g = b ? c.b : c.k; + f = roc(d, g, b, false); + } + } + } + } while (f); + } + function WCc(a, b, c) { + var d, e, f, g, h; + Odd(c, "Longest path layering", 1); + a.a = b; + h = a.a.a; + a.b = KC(WD, oje, 25, h.c.length, 15, 1); + d = 0; + for (g = new olb(h); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + e.p = d; + a.b[d] = -1; + ++d; + } + for (f = new olb(h); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + YCc(a, e); + } + h.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = null; + a.b = null; + Qdd(c); + } + function QVb(a, b) { + var c, d, e; + b.a ? (Axb(a.b, b.b), a.a[b.b.i] = BD(Exb(a.b, b.b), 81), c = BD(Dxb(a.b, b.b), 81), !!c && (a.a[c.i] = b.b), void 0) : (d = BD(Exb(a.b, b.b), 81), !!d && d == a.a[b.b.i] && !!d.d && d.d != b.b.d && d.f.Fc(b.b), e = BD(Dxb(a.b, b.b), 81), !!e && a.a[e.i] == b.b && !!e.d && e.d != b.b.d && b.b.f.Fc(e), Fxb(a.b, b.b), void 0); + } + function zbc(a, b) { + var c, d, e, f, g, h; + f = a.d; + h = Edb(ED(vNb(a, (Nyc(), Zwc)))); + if (h < 0) { + h = 0; + yNb(a, Zwc, h); + } + b.o.b = h; + g = $wnd.Math.floor(h / 2); + d = new H0b(); + G0b(d, (Ucd(), Tcd)); + F0b(d, b); + d.n.b = g; + e = new H0b(); + G0b(e, zcd); + F0b(e, b); + e.n.b = g; + RZb(a, d); + c = new UZb(); + tNb(c, a); + yNb(c, jxc, null); + QZb(c, e); + RZb(c, f); + ybc(b, a, c); + wbc(a, c); + return c; + } + function uNc(a) { + var b, c; + c = BD(vNb(a, (wtc(), Ksc)), 21); + b = new j3c(); + if (c.Hc((Orc(), Irc))) { + d3c(b, oNc); + d3c(b, qNc); + } + if (c.Hc(Krc) || Ccb(DD(vNb(a, (Nyc(), $wc))))) { + d3c(b, qNc); + c.Hc(Lrc) && d3c(b, rNc); + } + c.Hc(Hrc) && d3c(b, nNc); + c.Hc(Nrc) && d3c(b, sNc); + c.Hc(Jrc) && d3c(b, pNc); + c.Hc(Erc) && d3c(b, lNc); + c.Hc(Grc) && d3c(b, mNc); + return b; + } + function Ihb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + d = a.d; + f = b.d; + h = d + f; + i = a.e != b.e ? -1 : 1; + if (h == 2) { + k = Ibb(xbb(a.a[0], Yje), xbb(b.a[0], Yje)); + m = Tbb(k); + l = Tbb(Pbb(k, 32)); + return l == 0 ? new Ugb(i, m) : new Vgb(i, 2, OC(GC(WD, 1), oje, 25, 15, [m, l])); + } + c = a.a; + e = b.a; + g = KC(WD, oje, 25, h, 15, 1); + Fhb(c, d, e, f, g); + j = new Vgb(i, h, g); + Jgb(j); + return j; + } + function Gwb(a, b, c, d) { + var e, f; + if (!b) { + return c; + } else { + e = a.a.ue(c.d, b.d); + if (e == 0) { + d.d = ijb(b, c.e); + d.b = true; + return b; + } + f = e < 0 ? 0 : 1; + b.a[f] = Gwb(a, b.a[f], c, d); + if (Hwb(b.a[f])) { + if (Hwb(b.a[1 - f])) { + b.b = true; + b.a[0].b = false; + b.a[1].b = false; + } else { + Hwb(b.a[f].a[f]) ? b = Owb(b, 1 - f) : Hwb(b.a[f].a[1 - f]) && (b = Nwb(b, 1 - f)); + } + } + } + return b; + } + function wHb(a, b, c) { + var d, e, f, g; + e = a.i; + d = a.n; + vHb(a, (gHb(), dHb), e.c + d.b, c); + vHb(a, fHb, e.c + e.b - d.c - c[2], c); + g = e.b - d.b - d.c; + if (c[0] > 0) { + c[0] += a.d; + g -= c[0]; + } + if (c[2] > 0) { + c[2] += a.d; + g -= c[2]; + } + f = $wnd.Math.max(0, g); + c[1] = $wnd.Math.max(c[1], g); + vHb(a, eHb, e.c + d.b + c[0] - (c[1] - g) / 2, c); + if (b == eHb) { + a.c.b = f; + a.c.c = e.c + d.b + (f - g) / 2; + } + } + function AYb() { + this.c = KC(UD, Vje, 25, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 15, 1); + this.b = KC(UD, Vje, 25, OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]).length, 15, 1); + this.a = KC(UD, Vje, 25, OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]).length, 15, 1); + zlb(this.c, Pje); + zlb(this.b, Qje); + zlb(this.a, Qje); + } + function Ufe(a, b, c) { + var d, e, f, g; + if (b <= c) { + e = b; + f = c; + } else { + e = c; + f = b; + } + d = 0; + if (a.b == null) { + a.b = KC(WD, oje, 25, 2, 15, 1); + a.b[0] = e; + a.b[1] = f; + a.c = true; + } else { + d = a.b.length; + if (a.b[d - 1] + 1 == e) { + a.b[d - 1] = f; + return; + } + g = KC(WD, oje, 25, d + 2, 15, 1); + $fb(a.b, 0, g, 0, d); + a.b = g; + a.b[d - 1] >= e && (a.c = false, a.a = false); + a.b[d++] = e; + a.b[d] = f; + a.c || Yfe(a); + } + } + function inc(a, b, c) { + var d, e, f, g, h, i, j; + j = b.d; + a.a = new Skb(j.c.length); + a.c = new Lqb(); + for (h = new olb(j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f = new uOc(null); + Ekb(a.a, f); + Rhb(a.c, g, f); + } + a.b = new Lqb(); + gnc(a, b); + for (d = 0; d < j.c.length - 1; d++) { + i = BD(Ikb(b.d, d), 101); + for (e = d + 1; e < j.c.length; e++) { + jnc(a, i, BD(Ikb(b.d, e), 101), c); + } + } + } + function ySc(a, b, c) { + var d, e, f, g, h, i; + if (!Qq(b)) { + i = Udd(c, (JD(b, 14) ? BD(b, 14).gc() : sr(b.Kc())) / a.a | 0); + Odd(i, Xqe, 1); + h = new BSc(); + g = 0; + for (f = b.Kc(); f.Ob(); ) { + d = BD(f.Pb(), 86); + h = pl(OC(GC(KI, 1), Uhe, 20, 0, [h, new ZRc(d)])); + g < d.f.b && (g = d.f.b); + } + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 86); + yNb(d, (mTc(), bTc), g); + } + Qdd(i); + ySc(a, h, c); + } + } + function bJc(a, b) { + var c, d, e, f, g, h, i; + c = Qje; + h = (j0b(), h0b); + for (e = new olb(b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + f = d.k; + if (f != h0b) { + g = ED(vNb(d, (wtc(), atc))); + if (g == null) { + c = $wnd.Math.max(c, 0); + d.n.b = c + iBc(a.a, f, h); + } else { + d.n.b = (uCb(g), g); + } + } + i = iBc(a.a, f, h); + d.n.b < c + i + d.d.d && (d.n.b = c + i + d.d.d); + c = d.n.b + d.o.b + d.d.a; + h = f; + } + } + function uQb(a, b, c) { + var d, e, f, g, h, i, j, k, l; + f = itd(b, false, false); + j = ofd(f); + l = Edb(ED(hkd(b, (CPb(), vPb)))); + e = sQb(j, l + a.a); + k = new XOb(e); + tNb(k, b); + Rhb(a.b, b, k); + c.c[c.c.length] = k; + i = (!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n); + for (h = new Fyd(i); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 137); + d = wQb(a, g, true, 0, 0); + c.c[c.c.length] = d; + } + return k; + } + function JVc(a, b, c, d, e) { + var f, g, h, i, j, k; + !!a.d && a.d.lg(e); + f = BD(e.Xb(0), 33); + if (HVc(a, c, f, false)) { + return true; + } + g = BD(e.Xb(e.gc() - 1), 33); + if (HVc(a, d, g, true)) { + return true; + } + if (CVc(a, e)) { + return true; + } + for (k = e.Kc(); k.Ob(); ) { + j = BD(k.Pb(), 33); + for (i = b.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 33); + if (BVc(a, j, h)) { + return true; + } + } + } + return false; + } + function qid(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + m = b.c.length; + l = (j = a.Yg(c), BD(j >= 0 ? a._g(j, false, true) : sid(a, c, false), 58)); + n: + for (f = l.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 56); + for (k = 0; k < m; ++k) { + g = (tCb(k, b.c.length), BD(b.c[k], 72)); + i = g.dd(); + h = g.ak(); + d = e.bh(h, false); + if (i == null ? d != null : !pb(i, d)) { + continue n; + } + } + return e; + } + return null; + } + function V6b(a, b, c, d) { + var e, f, g, h; + e = BD(Y_b(b, (Ucd(), Tcd)).Kc().Pb(), 11); + f = BD(Y_b(b, zcd).Kc().Pb(), 11); + for (h = new olb(a.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + while (g.e.c.length != 0) { + RZb(BD(Ikb(g.e, 0), 17), e); + } + while (g.g.c.length != 0) { + QZb(BD(Ikb(g.g, 0), 17), f); + } + } + c || yNb(b, (wtc(), Vsc), null); + d || yNb(b, (wtc(), Wsc), null); + } + function itd(a, b, c) { + var d, e; + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i == 0) { + return etd(a); + } else { + d = BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202); + if (b) { + Uxd((!d.a && (d.a = new xMd(y2, d, 5)), d.a)); + omd(d, 0); + pmd(d, 0); + hmd(d, 0); + imd(d, 0); + } + if (c) { + e = (!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a); + while (e.i > 1) { + Xxd(e, e.i - 1); + } + } + return d; + } + } + function Z2b(a, b) { + var c, d, e, f, g, h, i; + Odd(b, "Comment post-processing", 1); + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + d = new Rkb(); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + i = BD(vNb(g, (wtc(), vtc)), 15); + c = BD(vNb(g, tsc), 15); + if (!!i || !!c) { + $2b(g, i, c); + !!i && Gkb(d, i); + !!c && Gkb(d, c); + } + } + Gkb(e.a, d); + } + Qdd(b); + } + function Eac(a, b) { + var c, d, e, f, g, h, i; + c = new jkb(); + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + i = true; + d = 0; + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + switch (g.k.g) { + case 4: + ++d; + case 1: + Xjb(c, g); + break; + case 0: + Gac(g, b); + default: + c.b == c.c || Fac(c, d, i, false, b); + i = false; + d = 0; + } + } + c.b == c.c || Fac(c, d, i, true, b); + } + } + function Ebc(a, b) { + var c, d, e, f, g, h, i; + e = new Rkb(); + for (c = 0; c <= a.i; c++) { + d = new H1b(b); + d.p = a.i - c; + e.c[e.c.length] = d; + } + for (h = new olb(a.o); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + $_b(g, BD(Ikb(e, a.i - a.f[g.p]), 29)); + } + f = new olb(e); + while (f.a < f.c.c.length) { + i = BD(mlb(f), 29); + i.a.c.length == 0 && nlb(f); + } + b.b.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(b.b, e); + } + function KHc(a, b) { + var c, d, e, f, g, h; + c = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + AHc(a.b, a.d[g.p]); + for (e = new b1b(g.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + f = aIc(a, g == d.c ? d.d : d.c); + if (f > a.d[g.p]) { + c += zHc(a.b, f); + Wjb(a.a, meb(f)); + } + } + while (!akb(a.a)) { + xHc(a.b, BD(fkb(a.a), 19).a); + } + } + return c; + } + function o2c(a, b, c) { + var d, e, f, g; + f = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i; + for (e = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + (!d.a && (d.a = new cUd(E2, d, 10, 11)), d.a).i == 0 || (f += o2c(a, d, false)); + } + if (c) { + g = Xod(b); + while (g) { + f += (!g.a && (g.a = new cUd(E2, g, 10, 11)), g.a).i; + g = Xod(g); + } + } + return f; + } + function Xxd(a, b) { + var c, d, e, f; + if (a.ej()) { + d = null; + e = a.fj(); + a.ij() && (d = a.kj(a.pi(b), null)); + c = a.Zi(4, f = tud(a, b), null, b, e); + if (a.bj() && f != null) { + d = a.dj(f, d); + if (!d) { + a.$i(c); + } else { + d.Ei(c); + d.Fi(); + } + } else { + if (!d) { + a.$i(c); + } else { + d.Ei(c); + d.Fi(); + } + } + return f; + } else { + f = tud(a, b); + if (a.bj() && f != null) { + d = a.dj(f, null); + !!d && d.Fi(); + } + return f; + } + } + function UKb(a) { + var b, c, d, e, f, g, h, i, j, k; + j = a.a; + b = new Tqb(); + i = 0; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c = BD(mlb(d), 222); + k = 0; + ktb(c.b, new XKb()); + for (g = Jsb(c.b, 0); g.b != g.d.c; ) { + f = BD(Xsb(g), 222); + if (b.a._b(f)) { + e = c.c; + h = f.c; + k < h.d + h.a + j && k + e.a + j > h.d && (k = h.d + h.a + j); + } + } + c.c.d = k; + b.a.zc(c, b); + i = $wnd.Math.max(i, c.c.d + c.c.a); + } + return i; + } + function Orc() { + Orc = ccb; + Frc = new Prc("COMMENTS", 0); + Hrc = new Prc("EXTERNAL_PORTS", 1); + Irc = new Prc("HYPEREDGES", 2); + Jrc = new Prc("HYPERNODES", 3); + Krc = new Prc("NON_FREE_PORTS", 4); + Lrc = new Prc("NORTH_SOUTH_PORTS", 5); + Nrc = new Prc(Wne, 6); + Erc = new Prc("CENTER_LABELS", 7); + Grc = new Prc("END_LABELS", 8); + Mrc = new Prc("PARTITIONS", 9); + } + function gVc(a) { + var b, c, d, e, f; + e = new Rkb(); + b = new Vqb((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); + for (d = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 79); + if (!JD(qud((!c.b && (c.b = new y5d(z2, c, 4, 7)), c.b), 0), 186)) { + f = atd(BD(qud((!c.c && (c.c = new y5d(z2, c, 5, 8)), c.c), 0), 82)); + b.a._b(f) || (e.c[e.c.length] = f, true); + } + } + return e; + } + function fVc(a) { + var b, c, d, e, f, g; + f = new Tqb(); + b = new Vqb((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); + for (e = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 79); + if (!JD(qud((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b), 0), 186)) { + g = atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82)); + b.a._b(g) || (c = f.a.zc(g, f), c == null); + } + } + return f; + } + function zA(a, b, c, d, e) { + if (d < 0) { + d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje]), b); + d < 0 && (d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]), b)); + if (d < 0) { + return false; + } + c.k = d; + return true; + } else if (d > 0) { + c.k = d - 1; + return true; + } + return false; + } + function BA(a, b, c, d, e) { + if (d < 0) { + d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje]), b); + d < 0 && (d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]), b)); + if (d < 0) { + return false; + } + c.k = d; + return true; + } else if (d > 0) { + c.k = d - 1; + return true; + } + return false; + } + function DA(a, b, c, d, e, f) { + var g, h, i, j; + h = 32; + if (d < 0) { + if (b[0] >= a.length) { + return false; + } + h = bfb(a, b[0]); + if (h != 43 && h != 45) { + return false; + } + ++b[0]; + d = rA(a, b); + if (d < 0) { + return false; + } + h == 45 && (d = -d); + } + if (h == 32 && b[0] - c == 2 && e.b == 2) { + i = new eB(); + j = i.q.getFullYear() - nje + nje - 80; + g = j % 100; + f.a = d == g; + d += (j / 100 | 0) * 100 + (d < g ? 100 : 0); + } + f.p = d; + return true; + } + function L1b(a, b) { + var c, d, e, f, g; + if (!Xod(a)) { + return; + } + g = BD(vNb(b, (Nyc(), Fxc)), 174); + PD(hkd(a, Vxc)) === PD((dcd(), ccd)) && jkd(a, Vxc, bcd); + d = (Pgd(), new bhd(Xod(a))); + f = new hhd(!Xod(a) ? null : new bhd(Xod(a)), a); + e = PGb(d, f, false, true); + rqb(g, (tdd(), pdd)); + c = BD(vNb(b, Hxc), 8); + c.a = $wnd.Math.max(e.a, c.a); + c.b = $wnd.Math.max(e.b, c.b); + } + function Pac(a, b, c) { + var d, e, f, g, h, i; + for (g = BD(vNb(a, (wtc(), Lsc)), 15).Kc(); g.Ob(); ) { + f = BD(g.Pb(), 10); + switch (BD(vNb(f, (Nyc(), mxc)), 163).g) { + case 2: + $_b(f, b); + break; + case 4: + $_b(f, c); + } + for (e = new Sr(ur(O_b(f).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (!!d.c && !!d.d) { + continue; + } + h = !d.d; + i = BD(vNb(d, ctc), 11); + h ? RZb(d, i) : QZb(d, i); + } + } + } + function Alc() { + Alc = ccb; + tlc = new Blc(xle, 0, (Ucd(), Acd), Acd); + wlc = new Blc(zle, 1, Rcd, Rcd); + slc = new Blc(yle, 2, zcd, zcd); + zlc = new Blc(Ale, 3, Tcd, Tcd); + vlc = new Blc("NORTH_WEST_CORNER", 4, Tcd, Acd); + ulc = new Blc("NORTH_EAST_CORNER", 5, Acd, zcd); + ylc = new Blc("SOUTH_WEST_CORNER", 6, Rcd, Tcd); + xlc = new Blc("SOUTH_EAST_CORNER", 7, zcd, Rcd); + } + function i6c() { + i6c = ccb; + h6c = OC(GC(XD, 1), Sje, 25, 14, [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368e3, { l: 3506176, m: 794077, h: 1 }, { l: 884736, m: 916411, h: 20 }, { l: 3342336, m: 3912489, h: 363 }, { l: 589824, m: 3034138, h: 6914 }, { l: 3407872, m: 1962506, h: 138294 }]); + $wnd.Math.pow(2, -65); + } + function Pcc(a, b) { + var c, d, e, f, g; + if (a.c.length == 0) { + return new vgd(meb(0), meb(0)); + } + c = (tCb(0, a.c.length), BD(a.c[0], 11)).j; + g = 0; + f = b.g; + d = b.g + 1; + while (g < a.c.length - 1 && c.g < f) { + ++g; + c = (tCb(g, a.c.length), BD(a.c[g], 11)).j; + } + e = g; + while (e < a.c.length - 1 && c.g < d) { + ++e; + c = (tCb(g, a.c.length), BD(a.c[g], 11)).j; + } + return new vgd(meb(g), meb(e)); + } + function R9b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + f = b.c.length; + g = (tCb(c, b.c.length), BD(b.c[c], 286)); + h = g.a.o.a; + l = g.c; + m = 0; + for (j = g.c; j <= g.f; j++) { + if (h <= a.a[j]) { + return j; + } + k = a.a[j]; + i = null; + for (e = c + 1; e < f; e++) { + d = (tCb(e, b.c.length), BD(b.c[e], 286)); + d.c <= j && d.f >= j && (i = d); + } + !!i && (k = $wnd.Math.max(k, i.a.o.a)); + if (k > m) { + l = j; + m = k; + } + } + return l; + } + function ode(a, b, c) { + var d, e, f; + a.e = c; + a.d = 0; + a.b = 0; + a.f = 1; + a.i = b; + (a.e & 16) == 16 && (a.i = Xee(a.i)); + a.j = a.i.length; + nde(a); + f = rde(a); + if (a.d != a.j) + throw vbb(new mde(tvd((h0d(), sue)))); + if (a.g) { + for (d = 0; d < a.g.a.c.length; d++) { + e = BD(Uvb(a.g, d), 584); + if (a.f <= e.a) + throw vbb(new mde(tvd((h0d(), tue)))); + } + a.g.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + return f; + } + function _Pd(a, b) { + var c, d, e; + if (b == null) { + for (d = (!a.a && (a.a = new cUd(g5, a, 9, 5)), new Fyd(a.a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 678); + e = c.c; + if ((e == null ? c.zb : e) == null) { + return c; + } + } + } else { + for (d = (!a.a && (a.a = new cUd(g5, a, 9, 5)), new Fyd(a.a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 678); + if (dfb(b, (e = c.c, e == null ? c.zb : e))) { + return c; + } + } + } + return null; + } + function KIb(a, b) { + var c; + c = null; + switch (b.g) { + case 1: + a.e.Xe((Y9c(), o9c)) && (c = BD(a.e.We(o9c), 249)); + break; + case 3: + a.e.Xe((Y9c(), p9c)) && (c = BD(a.e.We(p9c), 249)); + break; + case 2: + a.e.Xe((Y9c(), n9c)) && (c = BD(a.e.We(n9c), 249)); + break; + case 4: + a.e.Xe((Y9c(), q9c)) && (c = BD(a.e.We(q9c), 249)); + } + !c && (c = BD(a.e.We((Y9c(), l9c)), 249)); + return c; + } + function OCc(a, b, c) { + var d, e, f, g, h, i, j, k, l; + b.p = 1; + f = b.c; + for (l = W_b(b, (KAc(), IAc)).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + for (e = new olb(k.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + j = d.d.i; + if (b != j) { + g = j.c; + if (g.p <= f.p) { + h = f.p + 1; + if (h == c.b.c.length) { + i = new H1b(c); + i.p = h; + Ekb(c.b, i); + $_b(j, i); + } else { + i = BD(Ikb(c.b, h), 29); + $_b(j, i); + } + OCc(a, j, c); + } + } + } + } + } + function ZXc(a, b, c) { + var d, e, f, g, h, i; + e = c; + f = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 33); + jkd(g, (ZWc(), SWc), meb(e++)); + i = gVc(g); + d = $wnd.Math.atan2(g.j + g.f / 2, g.i + g.g / 2); + d += d < 0 ? dre : 0; + d < 0.7853981633974483 || d > vre ? Okb(i, a.b) : d <= vre && d > wre ? Okb(i, a.d) : d <= wre && d > xre ? Okb(i, a.c) : d <= xre && Okb(i, a.a); + f = ZXc(a, i, f); + } + return e; + } + function Hgb() { + Hgb = ccb; + var a; + Cgb = new Ugb(1, 1); + Egb = new Ugb(1, 10); + Ggb = new Ugb(0, 0); + Bgb = new Ugb(-1, 1); + Dgb = OC(GC(cJ, 1), nie, 91, 0, [Ggb, Cgb, new Ugb(1, 2), new Ugb(1, 3), new Ugb(1, 4), new Ugb(1, 5), new Ugb(1, 6), new Ugb(1, 7), new Ugb(1, 8), new Ugb(1, 9), Egb]); + Fgb = KC(cJ, nie, 91, 32, 0, 1); + for (a = 0; a < Fgb.length; a++) { + Fgb[a] = ghb(Nbb(1, a)); + } + } + function B9b(a, b, c, d, e, f) { + var g, h, i, j; + h = !WAb(JAb(a.Oc(), new Xxb(new F9b()))).sd((EAb(), DAb)); + g = a; + f == (ead(), dad) && (g = JD(g, 152) ? km(BD(g, 152)) : JD(g, 131) ? BD(g, 131).a : JD(g, 54) ? new ov(g) : new dv(g)); + for (j = g.Kc(); j.Ob(); ) { + i = BD(j.Pb(), 70); + i.n.a = b.a; + h ? i.n.b = b.b + (d.b - i.o.b) / 2 : e ? i.n.b = b.b : i.n.b = b.b + d.b - i.o.b; + b.a += i.o.a + c; + } + } + function UOc(a, b, c, d) { + var e, f, g, h, i, j; + e = (d.c + d.a) / 2; + Osb(b.j); + Dsb(b.j, e); + Osb(c.e); + Dsb(c.e, e); + j = new aPc(); + for (h = new olb(a.f); h.a < h.c.c.length; ) { + f = BD(mlb(h), 129); + i = f.a; + WOc(j, b, i); + WOc(j, c, i); + } + for (g = new olb(a.k); g.a < g.c.c.length; ) { + f = BD(mlb(g), 129); + i = f.b; + WOc(j, b, i); + WOc(j, c, i); + } + j.b += 2; + j.a += POc(b, a.q); + j.a += POc(a.q, c); + return j; + } + function FSc(a, b, c) { + var d, e, f, g, h; + if (!Qq(b)) { + h = Udd(c, (JD(b, 14) ? BD(b, 14).gc() : sr(b.Kc())) / a.a | 0); + Odd(h, Xqe, 1); + g = new ISc(); + f = null; + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 86); + g = pl(OC(GC(KI, 1), Uhe, 20, 0, [g, new ZRc(d)])); + if (f) { + yNb(f, (mTc(), hTc), d); + yNb(d, _Sc, f); + if (VRc(d) == VRc(f)) { + yNb(f, iTc, d); + yNb(d, aTc, f); + } + } + f = d; + } + Qdd(h); + FSc(a, g, c); + } + } + function VHb(a) { + var b, c, d, e, f, g, h; + c = a.i; + b = a.n; + h = c.d; + a.f == (EIb(), CIb) ? h += (c.a - a.e.b) / 2 : a.f == BIb && (h += c.a - a.e.b); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + g = d.rf(); + f = new d7c(); + f.b = h; + h += g.b + a.a; + switch (a.b.g) { + case 0: + f.a = c.c + b.b; + break; + case 1: + f.a = c.c + b.b + (c.b - g.a) / 2; + break; + case 2: + f.a = c.c + c.b - b.c - g.a; + } + d.tf(f); + } + } + function XHb(a) { + var b, c, d, e, f, g, h; + c = a.i; + b = a.n; + h = c.c; + a.b == (NHb(), KHb) ? h += (c.b - a.e.a) / 2 : a.b == MHb && (h += c.b - a.e.a); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + g = d.rf(); + f = new d7c(); + f.a = h; + h += g.a + a.a; + switch (a.f.g) { + case 0: + f.b = c.d + b.d; + break; + case 1: + f.b = c.d + b.d + (c.a - g.b) / 2; + break; + case 2: + f.b = c.d + c.a - b.a - g.b; + } + d.tf(f); + } + } + function D4b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2; + k = c.a.c; + g = c.a.c + c.a.b; + f = BD(Ohb(c.c, b), 459); + n = f.f; + o2 = f.a; + i = new f7c(k, n); + l = new f7c(g, o2); + e = k; + c.p || (e += a.c); + e += c.F + c.v * a.b; + j = new f7c(e, n); + m = new f7c(e, o2); + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [i, j])); + h = c.d.a.gc() > 1; + if (h) { + d = new f7c(e, c.b); + Dsb(b.a, d); + } + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [m, l])); + } + function jdd(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Rse), "ELK Randomizer"), 'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'), new mdd()))); + p4c(a, Rse, ame, fdd); + p4c(a, Rse, wme, 15); + p4c(a, Rse, yme, meb(0)); + p4c(a, Rse, _le, tme); + } + function hde() { + hde = ccb; + var a, b, c, d, e, f; + fde = KC(SD, wte, 25, 255, 15, 1); + gde = KC(TD, $ie, 25, 16, 15, 1); + for (b = 0; b < 255; b++) { + fde[b] = -1; + } + for (c = 57; c >= 48; c--) { + fde[c] = c - 48 << 24 >> 24; + } + for (d = 70; d >= 65; d--) { + fde[d] = d - 65 + 10 << 24 >> 24; + } + for (e = 102; e >= 97; e--) { + fde[e] = e - 97 + 10 << 24 >> 24; + } + for (f = 0; f < 10; f++) + gde[f] = 48 + f & aje; + for (a = 10; a <= 15; a++) + gde[a] = 65 + a - 10 & aje; + } + function BVc(a, b, c) { + var d, e, f, g, h, i, j, k; + h = b.i - a.g / 2; + i = c.i - a.g / 2; + j = b.j - a.g / 2; + k = c.j - a.g / 2; + f = b.g + a.g / 2; + g = c.g + a.g / 2; + d = b.f + a.g / 2; + e = c.f + a.g / 2; + if (h < i + g && i < h && j < k + e && k < j) { + return true; + } else if (i < h + f && h < i && k < j + d && j < k) { + return true; + } else if (h < i + g && i < h && j < k && k < j + d) { + return true; + } else if (i < h + f && h < i && j < k + e && k < j) { + return true; + } + return false; + } + function NTb(a) { + var b, c, d, e, f; + e = BD(vNb(a, (Nyc(), Fxc)), 21); + f = BD(vNb(a, Ixc), 21); + c = new f7c(a.f.a + a.d.b + a.d.c, a.f.b + a.d.d + a.d.a); + b = new g7c(c); + if (e.Hc((tdd(), pdd))) { + d = BD(vNb(a, Hxc), 8); + if (f.Hc((Idd(), Bdd))) { + d.a <= 0 && (d.a = 20); + d.b <= 0 && (d.b = 20); + } + b.a = $wnd.Math.max(c.a, d.a); + b.b = $wnd.Math.max(c.b, d.b); + } + Ccb(DD(vNb(a, Gxc))) || OTb(a, c, b); + } + function NJc(a, b) { + var c, d, e, f; + for (f = V_b(b, (Ucd(), Rcd)).Kc(); f.Ob(); ) { + d = BD(f.Pb(), 11); + c = BD(vNb(d, (wtc(), gtc)), 10); + !!c && AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 0.1), a.i[b.p].d), a.i[c.p].a)); + } + for (e = V_b(b, Acd).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + c = BD(vNb(d, (wtc(), gtc)), 10); + !!c && AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 0.1), a.i[c.p].d), a.i[b.p].a)); + } + } + function QKd(a) { + var b, c, d, e, f, g; + if (!a.c) { + g = new wNd(); + b = KKd; + f = b.a.zc(a, b); + if (f == null) { + for (d = new Fyd(VKd(a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 87); + e = KQd(c); + JD(e, 88) && ytd(g, QKd(BD(e, 26))); + wtd(g, c); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + tNd(g); + vud(g); + a.c = new nNd((BD(qud(ZKd((NFd(), MFd).o), 15), 18), g.i), g.g); + $Kd(a).b &= -33; + } + return a.c; + } + function eee(a) { + var b; + if (a.c != 10) + throw vbb(new mde(tvd((h0d(), uue)))); + b = a.a; + switch (b) { + case 110: + b = 10; + break; + case 114: + b = 13; + break; + case 116: + b = 9; + break; + case 92: + case 124: + case 46: + case 94: + case 45: + case 63: + case 42: + case 43: + case 123: + case 125: + case 40: + case 41: + case 91: + case 93: + break; + default: + throw vbb(new mde(tvd((h0d(), Yue)))); + } + return b; + } + function qD(a) { + var b, c, d, e, f; + if (a.l == 0 && a.m == 0 && a.h == 0) { + return "0"; + } + if (a.h == Gje && a.m == 0 && a.l == 0) { + return "-9223372036854775808"; + } + if (a.h >> 19 != 0) { + return "-" + qD(hD(a)); + } + c = a; + d = ""; + while (!(c.l == 0 && c.m == 0 && c.h == 0)) { + e = RC(Jje); + c = UC(c, e, true); + b = "" + pD(QC); + if (!(c.l == 0 && c.m == 0 && c.h == 0)) { + f = 9 - b.length; + for (; f > 0; f--) { + b = "0" + b; + } + } + d = b + d; + } + return d; + } + function xrb() { + if (!Object.create || !Object.getOwnPropertyNames) { + return false; + } + var a = "__proto__"; + var b = /* @__PURE__ */ Object.create(null); + if (b[a] !== void 0) { + return false; + } + var c = Object.getOwnPropertyNames(b); + if (c.length != 0) { + return false; + } + b[a] = 42; + if (b[a] !== 42) { + return false; + } + if (Object.getOwnPropertyNames(b).length == 0) { + return false; + } + return true; + } + function Pgc(a) { + var b, c, d, e, f, g, h; + b = false; + c = 0; + for (e = new olb(a.d.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + d.p = c++; + for (g = new olb(d.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + !b && !Qq(O_b(f)) && (b = true); + } + } + h = qqb((ead(), cad), OC(GC(t1, 1), Kie, 103, 0, [aad, bad])); + if (!b) { + rqb(h, dad); + rqb(h, _9c); + } + a.a = new mDb(h); + Uhb(a.f); + Uhb(a.b); + Uhb(a.e); + Uhb(a.g); + } + function _Xb(a, b, c) { + var d, e, f, g, h, i, j, k, l; + d = c.c; + e = c.d; + h = A0b(b.c); + i = A0b(b.d); + if (d == b.c) { + h = aYb(a, h, e); + i = bYb(b.d); + } else { + h = bYb(b.c); + i = aYb(a, i, e); + } + j = new t7c(b.a); + Gsb(j, h, j.a, j.a.a); + Gsb(j, i, j.c.b, j.c); + g = b.c == d; + l = new BYb(); + for (f = 0; f < j.b - 1; ++f) { + k = new vgd(BD(Ut(j, f), 8), BD(Ut(j, f + 1), 8)); + g && f == 0 || !g && f == j.b - 2 ? l.b = k : Ekb(l.a, k); + } + return l; + } + function O$b(a, b) { + var c, d, e, f; + f = a.j.g - b.j.g; + if (f != 0) { + return f; + } + c = BD(vNb(a, (Nyc(), Wxc)), 19); + d = BD(vNb(b, Wxc), 19); + if (!!c && !!d) { + e = c.a - d.a; + if (e != 0) { + return e; + } + } + switch (a.j.g) { + case 1: + return Kdb(a.n.a, b.n.a); + case 2: + return Kdb(a.n.b, b.n.b); + case 3: + return Kdb(b.n.a, a.n.a); + case 4: + return Kdb(b.n.b, a.n.b); + default: + throw vbb(new Zdb(ine)); + } + } + function G6b(a, b, c, d) { + var e, f, g, h, i; + if (sr((D6b(), new Sr(ur(O_b(b).a.Kc(), new Sq())))) >= a.a) { + return -1; + } + if (!F6b(b, c)) { + return -1; + } + if (Qq(BD(d.Kb(b), 20))) { + return 1; + } + e = 0; + for (g = BD(d.Kb(b), 20).Kc(); g.Ob(); ) { + f = BD(g.Pb(), 17); + i = f.c.i == b ? f.d.i : f.c.i; + h = G6b(a, i, c, d); + if (h == -1) { + return -1; + } + e = $wnd.Math.max(e, h); + if (e > a.c - 1) { + return -1; + } + } + return e + 1; + } + function Btd(a, b) { + var c, d, e, f, g, h; + if (PD(b) === PD(a)) { + return true; + } + if (!JD(b, 15)) { + return false; + } + d = BD(b, 15); + h = a.gc(); + if (d.gc() != h) { + return false; + } + g = d.Kc(); + if (a.ni()) { + for (c = 0; c < h; ++c) { + e = a.ki(c); + f = g.Pb(); + if (e == null ? f != null : !pb(e, f)) { + return false; + } + } + } else { + for (c = 0; c < h; ++c) { + e = a.ki(c); + f = g.Pb(); + if (PD(e) !== PD(f)) { + return false; + } + } + } + return true; + } + function rAd(a, b) { + var c, d, e, f, g, h; + if (a.f > 0) { + a.qj(); + if (b != null) { + for (f = 0; f < a.d.length; ++f) { + c = a.d[f]; + if (c) { + d = BD(c.g, 367); + h = c.i; + for (g = 0; g < h; ++g) { + e = d[g]; + if (pb(b, e.dd())) { + return true; + } + } + } + } + } else { + for (f = 0; f < a.d.length; ++f) { + c = a.d[f]; + if (c) { + d = BD(c.g, 367); + h = c.i; + for (g = 0; g < h; ++g) { + e = d[g]; + if (PD(b) === PD(e.dd())) { + return true; + } + } + } + } + } + } + return false; + } + function e6b(a, b, c) { + var d, e, f, g; + Odd(c, "Orthogonally routing hierarchical port edges", 1); + a.a = 0; + d = h6b(b); + k6b(b, d); + j6b(a, b, d); + f6b(b); + e = BD(vNb(b, (Nyc(), Vxc)), 98); + f = b.b; + d6b((tCb(0, f.c.length), BD(f.c[0], 29)), e, b); + d6b(BD(Ikb(f, f.c.length - 1), 29), e, b); + g = b.b; + b6b((tCb(0, g.c.length), BD(g.c[0], 29))); + b6b(BD(Ikb(g, g.c.length - 1), 29)); + Qdd(c); + } + function jnd(a) { + switch (a) { + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: { + return a - 48 << 24 >> 24; + } + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: { + return a - 97 + 10 << 24 >> 24; + } + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: { + return a - 65 + 10 << 24 >> 24; + } + default: { + throw vbb(new Oeb("Invalid hexadecimal")); + } + } + } + function AUc(a, b, c) { + var d, e, f, g; + Odd(c, "Processor order nodes", 2); + a.a = Edb(ED(vNb(b, (JTc(), HTc)))); + e = new Psb(); + for (g = Jsb(b.b, 0); g.b != g.d.c; ) { + f = BD(Xsb(g), 86); + Ccb(DD(vNb(f, (mTc(), jTc)))) && (Gsb(e, f, e.c.b, e.c), true); + } + d = (sCb(e.b != 0), BD(e.a.a.c, 86)); + yUc(a, d); + !c.b && Rdd(c, 1); + BUc(a, d, 0 - Edb(ED(vNb(d, (mTc(), bTc)))) / 2, 0); + !c.b && Rdd(c, 1); + Qdd(c); + } + function rFb() { + rFb = ccb; + qFb = new sFb("SPIRAL", 0); + lFb = new sFb("LINE_BY_LINE", 1); + mFb = new sFb("MANHATTAN", 2); + kFb = new sFb("JITTER", 3); + oFb = new sFb("QUADRANTS_LINE_BY_LINE", 4); + pFb = new sFb("QUADRANTS_MANHATTAN", 5); + nFb = new sFb("QUADRANTS_JITTER", 6); + jFb = new sFb("COMBINE_LINE_BY_LINE_MANHATTAN", 7); + iFb = new sFb("COMBINE_JITTER_MANHATTAN", 8); + } + function roc(a, b, c, d) { + var e, f, g, h, i, j; + i = woc(a, c); + j = woc(b, c); + e = false; + while (!!i && !!j) { + if (d || uoc(i, j, c)) { + g = woc(i, c); + h = woc(j, c); + zoc(b); + zoc(a); + f = i.c; + sbc(i, false); + sbc(j, false); + if (c) { + Z_b(b, j.p, f); + b.p = j.p; + Z_b(a, i.p + 1, f); + a.p = i.p; + } else { + Z_b(a, i.p, f); + a.p = i.p; + Z_b(b, j.p + 1, f); + b.p = j.p; + } + $_b(i, null); + $_b(j, null); + i = g; + j = h; + e = true; + } else { + break; + } + } + return e; + } + function VDc(a, b, c, d) { + var e, f, g, h, i; + e = false; + f = false; + for (h = new olb(d.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + PD(vNb(g, (wtc(), $sc))) === PD(c) && (g.g.c.length == 0 ? g.e.c.length == 0 || (e = true) : f = true); + } + i = 0; + e && e ^ f ? i = c.j == (Ucd(), Acd) ? -a.e[d.c.p][d.p] : b - a.e[d.c.p][d.p] : f && e ^ f ? i = a.e[d.c.p][d.p] + 1 : e && f && (i = c.j == (Ucd(), Acd) ? 0 : b / 2); + return i; + } + function NEd(a, b, c, d, e, f, g, h) { + var i, j, k; + i = 0; + b != null && (i ^= LCb(b.toLowerCase())); + c != null && (i ^= LCb(c)); + d != null && (i ^= LCb(d)); + g != null && (i ^= LCb(g)); + h != null && (i ^= LCb(h)); + for (j = 0, k = f.length; j < k; j++) { + i ^= LCb(f[j]); + } + a ? i |= 256 : i &= -257; + e ? i |= 16 : i &= -17; + this.f = i; + this.i = b == null ? null : (uCb(b), b); + this.a = c; + this.d = d; + this.j = f; + this.g = g; + this.e = h; + } + function X_b(a, b, c) { + var d, e; + e = null; + switch (b.g) { + case 1: + e = (z0b(), u0b); + break; + case 2: + e = (z0b(), w0b); + } + d = null; + switch (c.g) { + case 1: + d = (z0b(), v0b); + break; + case 2: + d = (z0b(), t0b); + break; + case 3: + d = (z0b(), x0b); + break; + case 4: + d = (z0b(), y0b); + } + return !!e && !!d ? Nq(a.j, new Yb(new amb(OC(GC(_D, 1), Uhe, 169, 0, [BD(Qb(e), 169), BD(Qb(d), 169)])))) : (mmb(), mmb(), jmb); + } + function t5b(a) { + var b, c, d; + b = BD(vNb(a, (Nyc(), Hxc)), 8); + yNb(a, Hxc, new f7c(b.b, b.a)); + switch (BD(vNb(a, mwc), 248).g) { + case 1: + yNb(a, mwc, (F7c(), E7c)); + break; + case 2: + yNb(a, mwc, (F7c(), A7c)); + break; + case 3: + yNb(a, mwc, (F7c(), C7c)); + break; + case 4: + yNb(a, mwc, (F7c(), D7c)); + } + if ((!a.q ? (mmb(), mmb(), kmb) : a.q)._b(ayc)) { + c = BD(vNb(a, ayc), 8); + d = c.a; + c.a = c.b; + c.b = d; + } + } + function jjc(a, b, c, d, e, f) { + this.b = c; + this.d = e; + if (a >= b.length) { + throw vbb(new qcb("Greedy SwitchDecider: Free layer not in graph.")); + } + this.c = b[a]; + this.e = new dIc(d); + THc(this.e, this.c, (Ucd(), Tcd)); + this.i = new dIc(d); + THc(this.i, this.c, zcd); + this.f = new ejc(this.c); + this.a = !f && e.i && !e.s && this.c[0].k == (j0b(), e0b); + this.a && hjc(this, a, b.length); + } + function hKb(a, b) { + var c, d, e, f, g, h; + f = !a.B.Hc((Idd(), zdd)); + g = a.B.Hc(Cdd); + a.a = new FHb(g, f, a.c); + !!a.n && u_b(a.a.n, a.n); + lIb(a.g, (gHb(), eHb), a.a); + if (!b) { + d = new mIb(1, f, a.c); + d.n.a = a.k; + Npb(a.p, (Ucd(), Acd), d); + e = new mIb(1, f, a.c); + e.n.d = a.k; + Npb(a.p, Rcd, e); + h = new mIb(0, f, a.c); + h.n.c = a.k; + Npb(a.p, Tcd, h); + c = new mIb(0, f, a.c); + c.n.b = a.k; + Npb(a.p, zcd, c); + } + } + function Vgc(a) { + var b, c, d; + b = BD(vNb(a.d, (Nyc(), Swc)), 218); + switch (b.g) { + case 2: + c = Ngc(a); + break; + case 3: + c = (d = new Rkb(), MAb(JAb(NAb(LAb(LAb(new YAb(null, new Kub(a.d.b, 16)), new Shc()), new Uhc()), new Whc()), new ehc()), new Yhc(d)), d); + break; + default: + throw vbb(new Zdb("Compaction not supported for " + b + " edges.")); + } + Ugc(a, c); + reb(new Pib(a.g), new Ehc(a)); + } + function a2c(a, b) { + var c; + c = new zNb(); + !!b && tNb(c, BD(Ohb(a.a, C2), 94)); + JD(b, 470) && tNb(c, BD(Ohb(a.a, G2), 94)); + if (JD(b, 354)) { + tNb(c, BD(Ohb(a.a, D2), 94)); + return c; + } + JD(b, 82) && tNb(c, BD(Ohb(a.a, z2), 94)); + if (JD(b, 239)) { + tNb(c, BD(Ohb(a.a, E2), 94)); + return c; + } + if (JD(b, 186)) { + tNb(c, BD(Ohb(a.a, F2), 94)); + return c; + } + JD(b, 352) && tNb(c, BD(Ohb(a.a, B2), 94)); + return c; + } + function wSb() { + wSb = ccb; + oSb = new Osd((Y9c(), D9c), meb(1)); + uSb = new Osd(T9c, 80); + tSb = new Osd(M9c, 5); + bSb = new Osd(r8c, tme); + pSb = new Osd(E9c, meb(1)); + sSb = new Osd(H9c, (Bcb(), true)); + lSb = new q0b(50); + kSb = new Osd(f9c, lSb); + dSb = O8c; + mSb = t9c; + cSb = new Osd(B8c, false); + jSb = e9c; + iSb = b9c; + hSb = Y8c; + gSb = W8c; + nSb = x9c; + fSb = (SRb(), LRb); + vSb = QRb; + eSb = KRb; + qSb = NRb; + rSb = PRb; + } + function ZXb(a) { + var b, c, d, e, f, g, h, i; + i = new jYb(); + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), e0b)) { + continue; + } + XXb(i, g, new d7c()); + for (f = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + if (e.c.i.k == e0b || e.d.i.k == e0b) { + continue; + } + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 8); + b = c; + hYb(i, new cWb(b.a, b.b)); + } + } + } + return i; + } + function A0c() { + A0c = ccb; + z0c = new Lsd(Qre); + y0c = (R0c(), Q0c); + x0c = new Nsd(Vre, y0c); + w0c = (a1c(), _0c); + v0c = new Nsd(Rre, w0c); + u0c = (N_c(), J_c); + t0c = new Nsd(Sre, u0c); + p0c = new Nsd(Tre, null); + s0c = (C_c(), A_c); + r0c = new Nsd(Ure, s0c); + l0c = (i_c(), h_c); + k0c = new Nsd(Wre, l0c); + m0c = new Nsd(Xre, (Bcb(), false)); + n0c = new Nsd(Yre, meb(64)); + o0c = new Nsd(Zre, true); + q0c = B_c; + } + function Toc(a) { + var b, c, d, e, f, g; + if (a.a != null) { + return; + } + a.a = KC(sbb, dle, 25, a.c.b.c.length, 16, 1); + a.a[0] = false; + if (wNb(a.c, (Nyc(), Lyc))) { + d = BD(vNb(a.c, Lyc), 15); + for (c = d.Kc(); c.Ob(); ) { + b = BD(c.Pb(), 19).a; + b > 0 && b < a.a.length && (a.a[b] = false); + } + } else { + g = new olb(a.c.b); + g.a < g.c.c.length && mlb(g); + e = 1; + while (g.a < g.c.c.length) { + f = BD(mlb(g), 29); + a.a[e++] = Woc(f); + } + } + } + function TMd(a, b) { + var c, d, e, f; + e = a.b; + switch (b) { + case 1: { + a.b |= 1; + a.b |= 4; + a.b |= 8; + break; + } + case 2: { + a.b |= 2; + a.b |= 4; + a.b |= 8; + break; + } + case 4: { + a.b |= 1; + a.b |= 2; + a.b |= 4; + a.b |= 8; + break; + } + case 3: { + a.b |= 16; + a.b |= 8; + break; + } + case 0: { + a.b |= 32; + a.b |= 16; + a.b |= 8; + a.b |= 1; + a.b |= 2; + a.b |= 4; + break; + } + } + if (a.b != e && !!a.c) { + for (d = new Fyd(a.c); d.e != d.i.gc(); ) { + f = BD(Dyd(d), 473); + c = $Kd(f); + XMd(c, b); + } + } + } + function cGc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2; + e = false; + for (g = b, h = 0, i = g.length; h < i; ++h) { + f = g[h]; + Ccb((Bcb(), f.e ? true : false)) && !BD(Ikb(a.b, f.e.p), 214).s && (e = e | (j = f.e, k = BD(Ikb(a.b, j.p), 214), l = k.e, m = SFc(c, l.length), n = l[m][0], n.k == (j0b(), e0b) ? l[m] = aGc(f, l[m], c ? (Ucd(), Tcd) : (Ucd(), zcd)) : k.c.Tf(l, c), o2 = dGc(a, k, c, d), bGc(k.e, k.o, c), o2)); + } + return e; + } + function p2c(a, b) { + var c, d, e, f, g; + f = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i; + for (e = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + if (PD(hkd(d, (Y9c(), J8c))) !== PD((hbd(), gbd))) { + g = BD(hkd(b, F9c), 149); + c = BD(hkd(d, F9c), 149); + (g == c || !!g && C3c(g, c)) && (!d.a && (d.a = new cUd(E2, d, 10, 11)), d.a).i != 0 && (f += p2c(a, d)); + } + } + return f; + } + function nlc(a) { + var b, c, d, e, f, g, h; + d = 0; + h = 0; + for (g = new olb(a.d); g.a < g.c.c.length; ) { + f = BD(mlb(g), 101); + e = BD(GAb(JAb(new YAb(null, new Kub(f.j, 16)), new Ylc()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + c = null; + if (d <= h) { + c = (Ucd(), Acd); + d += e.gc(); + } else if (h < d) { + c = (Ucd(), Rcd); + h += e.gc(); + } + b = c; + MAb(NAb(e.Oc(), new Mlc()), new Olc(b)); + } + } + function mkc(a) { + var b, c, d, e, f, g, h, i; + a.b = new _i(new amb((Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]))), new amb((Fkc(), OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc])))); + for (g = OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]), h = 0, i = g.length; h < i; ++h) { + f = g[h]; + for (c = OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc]), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + Ui(a.b, f, b, new Rkb()); + } + } + } + function KJb(a, b) { + var c, d, e, f, g, h, i, j, k, l; + g = BD(BD(Qc(a.r, b), 21), 84); + h = a.u.Hc((rcd(), pcd)); + c = a.u.Hc(mcd); + d = a.u.Hc(lcd); + j = a.u.Hc(qcd); + l = a.B.Hc((Idd(), Hdd)); + k = !c && !d && (j || g.gc() == 2); + HJb(a, b); + e = null; + i = null; + if (h) { + f = g.Kc(); + e = BD(f.Pb(), 111); + i = e; + while (f.Ob()) { + i = BD(f.Pb(), 111); + } + e.d.b = 0; + i.d.c = 0; + k && !e.a && (e.d.c = 0); + } + if (l) { + LJb(g); + if (h) { + e.d.b = 0; + i.d.c = 0; + } + } + } + function SKb(a, b) { + var c, d, e, f, g, h, i, j, k, l; + g = BD(BD(Qc(a.r, b), 21), 84); + h = a.u.Hc((rcd(), pcd)); + c = a.u.Hc(mcd); + d = a.u.Hc(lcd); + i = a.u.Hc(qcd); + l = a.B.Hc((Idd(), Hdd)); + j = !c && !d && (i || g.gc() == 2); + QKb(a, b); + k = null; + e = null; + if (h) { + f = g.Kc(); + k = BD(f.Pb(), 111); + e = k; + while (f.Ob()) { + e = BD(f.Pb(), 111); + } + k.d.d = 0; + e.d.a = 0; + j && !k.a && (k.d.a = 0); + } + if (l) { + TKb(g); + if (h) { + k.d.d = 0; + e.d.a = 0; + } + } + } + function oJc(a, b, c) { + var d, e, f, g, h, i, j, k; + e = b.k; + if (b.p >= 0) { + return false; + } else { + b.p = c.b; + Ekb(c.e, b); + } + if (e == (j0b(), g0b) || e == i0b) { + for (g = new olb(b.j); g.a < g.c.c.length; ) { + f = BD(mlb(g), 11); + for (k = (d = new olb(new R0b(f).a.g), new U0b(d)); llb(k.a); ) { + j = BD(mlb(k.a), 17).d; + h = j.i; + i = h.k; + if (b.c != h.c) { + if (i == g0b || i == i0b) { + if (oJc(a, h, c)) { + return true; + } + } + } + } + } + } + return true; + } + function gJd(a) { + var b; + if ((a.Db & 64) != 0) + return EId(a); + b = new Jfb(EId(a)); + b.a += " (changeable: "; + Ffb(b, (a.Bb & zte) != 0); + b.a += ", volatile: "; + Ffb(b, (a.Bb & Dve) != 0); + b.a += ", transient: "; + Ffb(b, (a.Bb & Rje) != 0); + b.a += ", defaultValueLiteral: "; + Efb(b, a.j); + b.a += ", unsettable: "; + Ffb(b, (a.Bb & Cve) != 0); + b.a += ", derived: "; + Ffb(b, (a.Bb & oie) != 0); + b.a += ")"; + return b.a; + } + function AOb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + e = eNb(a.d); + g = BD(vNb(a.b, (CPb(), wPb)), 116); + h = g.b + g.c; + i = g.d + g.a; + k = e.d.a * a.e + h; + j = e.b.a * a.f + i; + $Ob(a.b, new f7c(k, j)); + for (m = new olb(a.g); m.a < m.c.c.length; ) { + l = BD(mlb(m), 562); + b = l.g - e.a.a; + c = l.i - e.c.a; + d = P6c(Z6c(new f7c(b, c), l.a, l.b), Y6c(b7c(R6c(HOb(l.e)), l.d * l.a, l.c * l.b), -0.5)); + f = IOb(l.e); + KOb(l.e, c7c(d, f)); + } + } + function tmc(a, b, c, d) { + var e, f, g, h, i; + i = KC(UD, nie, 104, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 0, 2); + for (f = OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]), g = 0, h = f.length; g < h; ++g) { + e = f[g]; + i[e.g] = KC(UD, Vje, 25, a.c[e.g], 15, 1); + } + vmc(i, a, Acd); + vmc(i, a, Rcd); + smc(i, a, Acd, b, c, d); + smc(i, a, zcd, b, c, d); + smc(i, a, Rcd, b, c, d); + smc(i, a, Tcd, b, c, d); + return i; + } + function UGc(a, b, c) { + if (Mhb(a.a, b)) { + if (Rqb(BD(Ohb(a.a, b), 53), c)) { + return 1; + } + } else { + Rhb(a.a, b, new Tqb()); + } + if (Mhb(a.a, c)) { + if (Rqb(BD(Ohb(a.a, c), 53), b)) { + return -1; + } + } else { + Rhb(a.a, c, new Tqb()); + } + if (Mhb(a.b, b)) { + if (Rqb(BD(Ohb(a.b, b), 53), c)) { + return -1; + } + } else { + Rhb(a.b, b, new Tqb()); + } + if (Mhb(a.b, c)) { + if (Rqb(BD(Ohb(a.b, c), 53), b)) { + return 1; + } + } else { + Rhb(a.b, c, new Tqb()); + } + return 0; + } + function x2d(a, b, c, d) { + var e, f, g, h, i, j; + if (c == null) { + e = BD(a.g, 119); + for (h = 0; h < a.i; ++h) { + g = e[h]; + if (g.ak() == b) { + return Txd(a, g, d); + } + } + } + f = (Q6d(), BD(b, 66).Oj() ? BD(c, 72) : R6d(b, c)); + if (oid(a.e)) { + j = !R2d(a, b); + d = Sxd(a, f, d); + i = b.$j() ? H2d(a, 3, b, null, c, M2d(a, b, c, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0), j) : H2d(a, 1, b, b.zj(), c, -1, j); + d ? d.Ei(i) : d = i; + } else { + d = Sxd(a, f, d); + } + return d; + } + function CJb(a) { + var b, c, d, e, f, g; + if (a.q == (dcd(), _bd) || a.q == $bd) { + return; + } + e = a.f.n.d + _Gb(BD(Mpb(a.b, (Ucd(), Acd)), 124)) + a.c; + b = a.f.n.a + _Gb(BD(Mpb(a.b, Rcd), 124)) + a.c; + d = BD(Mpb(a.b, zcd), 124); + g = BD(Mpb(a.b, Tcd), 124); + f = $wnd.Math.max(0, d.n.d - e); + f = $wnd.Math.max(f, g.n.d - e); + c = $wnd.Math.max(0, d.n.a - b); + c = $wnd.Math.max(c, g.n.a - b); + d.n.d = f; + g.n.d = f; + d.n.a = c; + g.n.a = c; + } + function rdc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + Odd(b, "Restoring reversed edges", 1); + for (i = new olb(a.b); i.a < i.c.c.length; ) { + h = BD(mlb(i), 29); + for (k = new olb(h.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + for (m = new olb(j.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + g = k_b(l.g); + for (d = g, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + Ccb(DD(vNb(c, (wtc(), ltc)))) && PZb(c, false); + } + } + } + } + Qdd(b); + } + function m4c() { + this.b = new $rb(); + this.d = new $rb(); + this.e = new $rb(); + this.c = new $rb(); + this.a = new Lqb(); + this.f = new Lqb(); + hvd(m1, new x4c(), new z4c()); + hvd(l1, new V4c(), new X4c()); + hvd(i1, new Z4c(), new _4c()); + hvd(j1, new b5c(), new d5c()); + hvd(i2, new f5c(), new h5c()); + hvd(DJ, new B4c(), new D4c()); + hvd(xK, new F4c(), new H4c()); + hvd(jK, new J4c(), new L4c()); + hvd(uK, new N4c(), new P4c()); + hvd(kL, new R4c(), new T4c()); + } + function R5d(a) { + var b, c, d, e, f, g; + f = 0; + b = wId(a); + !!b.Bj() && (f |= 4); + (a.Bb & Cve) != 0 && (f |= 2); + if (JD(a, 99)) { + c = BD(a, 18); + e = zUd(c); + (c.Bb & ote) != 0 && (f |= 32); + if (e) { + aLd(WId(e)); + f |= 8; + g = e.t; + (g > 1 || g == -1) && (f |= 16); + (e.Bb & ote) != 0 && (f |= 64); + } + (c.Bb & Tje) != 0 && (f |= Dve); + f |= zte; + } else { + if (JD(b, 457)) { + f |= 512; + } else { + d = b.Bj(); + !!d && (d.i & 1) != 0 && (f |= 256); + } + } + (a.Bb & 512) != 0 && (f |= 128); + return f; + } + function hc(a, b) { + var c, d, e, f, g; + a = a == null ? Xhe : (uCb(a), a); + for (e = 0; e < b.length; e++) { + b[e] = ic(b[e]); + } + c = new Vfb(); + g = 0; + d = 0; + while (d < b.length) { + f = a.indexOf("%s", g); + if (f == -1) { + break; + } + c.a += "" + qfb(a == null ? Xhe : (uCb(a), a), g, f); + Pfb(c, b[d++]); + g = f + 2; + } + Ofb(c, a, g, a.length); + if (d < b.length) { + c.a += " ["; + Pfb(c, b[d++]); + while (d < b.length) { + c.a += She; + Pfb(c, b[d++]); + } + c.a += "]"; + } + return c.a; + } + function m3b(a) { + var b, c, d, e, f; + f = new Skb(a.a.c.length); + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + c = BD(vNb(d, (Nyc(), mxc)), 163); + b = null; + switch (c.g) { + case 1: + case 2: + b = (Gqc(), Fqc); + break; + case 3: + case 4: + b = (Gqc(), Dqc); + } + if (b) { + yNb(d, (wtc(), Bsc), (Gqc(), Fqc)); + b == Dqc ? o3b(d, c, (KAc(), HAc)) : b == Fqc && o3b(d, c, (KAc(), IAc)); + } else { + f.c[f.c.length] = d; + } + } + return f; + } + function MHc(a, b) { + var c, d, e, f, g, h, i; + c = 0; + for (i = new olb(b); i.a < i.c.c.length; ) { + h = BD(mlb(i), 11); + AHc(a.b, a.d[h.p]); + g = 0; + for (e = new b1b(h.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + if (WHc(d)) { + f = aIc(a, h == d.c ? d.d : d.c); + if (f > a.d[h.p]) { + c += zHc(a.b, f); + Wjb(a.a, meb(f)); + } + } else { + ++g; + } + } + c += a.b.d * g; + while (!akb(a.a)) { + xHc(a.b, BD(fkb(a.a), 19).a); + } + } + return c; + } + function Y6d(a, b) { + var c; + if (a.f == W6d) { + c = $1d(q1d((O6d(), M6d), b)); + return a.e ? c == 4 && b != (m8d(), k8d) && b != (m8d(), h8d) && b != (m8d(), i8d) && b != (m8d(), j8d) : c == 2; + } + if (!!a.d && (a.d.Hc(b) || a.d.Hc(_1d(q1d((O6d(), M6d), b))) || a.d.Hc(e1d((O6d(), M6d), a.b, b)))) { + return true; + } + if (a.f) { + if (x1d((O6d(), a.f), b2d(q1d(M6d, b)))) { + c = $1d(q1d(M6d, b)); + return a.e ? c == 4 : c == 2; + } + } + return false; + } + function iVc(a, b, c, d) { + var e, f, g, h, i, j, k, l; + g = BD(hkd(c, (Y9c(), C9c)), 8); + i = g.a; + k = g.b + a; + e = $wnd.Math.atan2(k, i); + e < 0 && (e += dre); + e += b; + e > dre && (e -= dre); + h = BD(hkd(d, C9c), 8); + j = h.a; + l = h.b + a; + f = $wnd.Math.atan2(l, j); + f < 0 && (f += dre); + f += b; + f > dre && (f -= dre); + return Iy(), My(1e-10), $wnd.Math.abs(e - f) <= 1e-10 || e == f || isNaN(e) && isNaN(f) ? 0 : e < f ? -1 : e > f ? 1 : Ny(isNaN(e), isNaN(f)); + } + function YDb(a) { + var b, c, d, e, f, g, h; + h = new Lqb(); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 57); + Rhb(h, b, new Rkb()); + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + b = BD(mlb(e), 57); + b.i = Qje; + for (g = b.c.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 57); + BD(Wd(irb(h.f, f)), 15).Fc(b); + } + } + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + b.c.$b(); + b.c = BD(Wd(irb(h.f, b)), 15); + } + QDb(a); + } + function yVb(a) { + var b, c, d, e, f, g, h; + h = new Lqb(); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 81); + Rhb(h, b, new Rkb()); + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + b = BD(mlb(e), 81); + b.o = Qje; + for (g = b.f.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 81); + BD(Wd(irb(h.f, f)), 15).Fc(b); + } + } + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + b.f.$b(); + b.f = BD(Wd(irb(h.f, b)), 15); + } + rVb(a); + } + function dNb(a, b, c, d) { + var e, f; + cNb(a, b, c, d); + qNb(b, a.j - b.j + c); + rNb(b, a.k - b.k + d); + for (f = new olb(b.f); f.a < f.c.c.length; ) { + e = BD(mlb(f), 324); + switch (e.a.g) { + case 0: + nNb(a, b.g + e.b.a, 0, b.g + e.c.a, b.i - 1); + break; + case 1: + nNb(a, b.g + b.o, b.i + e.b.a, a.o - 1, b.i + e.c.a); + break; + case 2: + nNb(a, b.g + e.b.a, b.i + b.p, b.g + e.c.a, a.p - 1); + break; + default: + nNb(a, 0, b.i + e.b.a, b.g - 1, b.i + e.c.a); + } + } + } + function aNb(b, c, d, e, f) { + var g, h, i; + try { + if (c >= b.o) { + throw vbb(new rcb()); + } + i = c >> 5; + h = c & 31; + g = Nbb(1, Tbb(Nbb(h, 1))); + f ? b.n[d][i] = Mbb(b.n[d][i], g) : b.n[d][i] = xbb(b.n[d][i], Lbb(g)); + g = Nbb(g, 1); + e ? b.n[d][i] = Mbb(b.n[d][i], g) : b.n[d][i] = xbb(b.n[d][i], Lbb(g)); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c + She + d + Fle)); + } else + throw vbb(a); + } + } + function BUc(a, b, c, d) { + var e, f, g; + if (b) { + f = Edb(ED(vNb(b, (mTc(), fTc)))) + d; + g = c + Edb(ED(vNb(b, bTc))) / 2; + yNb(b, kTc, meb(Tbb(Cbb($wnd.Math.round(f))))); + yNb(b, lTc, meb(Tbb(Cbb($wnd.Math.round(g))))); + b.d.b == 0 || BUc(a, BD(pr((e = Jsb(new ZRc(b).a.d, 0), new aSc(e))), 86), c + Edb(ED(vNb(b, bTc))) + a.a, d + Edb(ED(vNb(b, cTc)))); + vNb(b, iTc) != null && BUc(a, BD(vNb(b, iTc), 86), c, d); + } + } + function N9b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + i = Q_b(b.a); + e = Edb(ED(vNb(i, (Nyc(), pyc)))) * 2; + k = Edb(ED(vNb(i, wyc))); + j = $wnd.Math.max(e, k); + f = KC(UD, Vje, 25, b.f - b.c + 1, 15, 1); + d = -j; + c = 0; + for (h = b.b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + d += a.a[g.c.p] + j; + f[c++] = d; + } + d += a.a[b.a.c.p] + j; + f[c++] = d; + for (m = new olb(b.e); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + d += a.a[l.c.p] + j; + f[c++] = d; + } + return f; + } + function GHc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m; + m = new Hxb(new pIc(a)); + for (h = OC(GC(OQ, 1), kne, 10, 0, [b, c]), i = 0, j = h.length; i < j; ++i) { + g = h[i]; + for (l = CHc(g, d).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + for (f = new b1b(k.b); llb(f.a) || llb(f.b); ) { + e = BD(llb(f.a) ? mlb(f.a) : mlb(f.b), 17); + if (!OZb(e)) { + Iwb(m.a, k, (Bcb(), zcb)) == null; + WHc(e) && Axb(m, k == e.c ? e.d : e.c); + } + } + } + } + return Qb(m), new Tkb(m); + } + function zhd(a, b) { + var c, d, e, f; + f = BD(hkd(a, (Y9c(), A9c)), 61).g - BD(hkd(b, A9c), 61).g; + if (f != 0) { + return f; + } + c = BD(hkd(a, v9c), 19); + d = BD(hkd(b, v9c), 19); + if (!!c && !!d) { + e = c.a - d.a; + if (e != 0) { + return e; + } + } + switch (BD(hkd(a, A9c), 61).g) { + case 1: + return Kdb(a.i, b.i); + case 2: + return Kdb(a.j, b.j); + case 3: + return Kdb(b.i, a.i); + case 4: + return Kdb(b.j, a.j); + default: + throw vbb(new Zdb(ine)); + } + } + function _od(a) { + var b, c, d; + if ((a.Db & 64) != 0) + return fld(a); + b = new Wfb(ete); + c = a.k; + if (!c) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + if (a.n.i > 0) { + d = (!a.n && (a.n = new cUd(D2, a, 1, 7)), BD(qud(a.n, 0), 137)).a; + !d || Qfb(Qfb((b.a += ' "', b), d), '"'); + } + } else { + Qfb(Qfb((b.a += ' "', b), c), '"'); + } + Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a += " (", b), a.i), ","), a.j), " | "), a.g), ","), a.f), ")"); + return b.a; + } + function opd(a) { + var b, c, d; + if ((a.Db & 64) != 0) + return fld(a); + b = new Wfb(fte); + c = a.k; + if (!c) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + if (a.n.i > 0) { + d = (!a.n && (a.n = new cUd(D2, a, 1, 7)), BD(qud(a.n, 0), 137)).a; + !d || Qfb(Qfb((b.a += ' "', b), d), '"'); + } + } else { + Qfb(Qfb((b.a += ' "', b), c), '"'); + } + Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a += " (", b), a.i), ","), a.j), " | "), a.g), ","), a.f), ")"); + return b.a; + } + function h4c(a, b) { + var c, d, e, f, g, h, i; + if (b == null || b.length == 0) { + return null; + } + e = BD(Phb(a.a, b), 149); + if (!e) { + for (d = (h = new $ib(a.b).a.vc().Kc(), new djb(h)); d.a.Ob(); ) { + c = (f = BD(d.a.Pb(), 42), BD(f.dd(), 149)); + g = c.c; + i = b.length; + if (dfb(g.substr(g.length - i, i), b) && (b.length == g.length || bfb(g, g.length - b.length - 1) == 46)) { + if (e) { + return null; + } + e = c; + } + } + !!e && Shb(a.a, b, e); + } + return e; + } + function QLb(a, b) { + var c, d, e, f; + c = new VLb(); + d = BD(GAb(NAb(new YAb(null, new Kub(a.f, 16)), c), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + e = d.gc(); + d = BD(GAb(NAb(new YAb(null, new Kub(b.f, 16)), c), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [Eyb, Dyb]))), 21); + f = d.gc(); + if (e < f) { + return -1; + } + if (e == f) { + return 0; + } + return 1; + } + function r5b(a) { + var b, c, d; + if (!wNb(a, (Nyc(), xxc))) { + return; + } + d = BD(vNb(a, xxc), 21); + if (d.dc()) { + return; + } + c = (b = BD(gdb(B1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + d.Hc((Hbd(), Cbd)) ? rqb(c, Cbd) : rqb(c, Dbd); + d.Hc(Abd) || rqb(c, Abd); + d.Hc(zbd) ? rqb(c, Gbd) : d.Hc(ybd) ? rqb(c, Fbd) : d.Hc(Bbd) && rqb(c, Ebd); + d.Hc(Gbd) ? rqb(c, zbd) : d.Hc(Fbd) ? rqb(c, ybd) : d.Hc(Ebd) && rqb(c, Bbd); + yNb(a, xxc, c); + } + function kHc(a) { + var b, c, d, e, f, g, h; + e = BD(vNb(a, (wtc(), Psc)), 10); + d = a.j; + c = (tCb(0, d.c.length), BD(d.c[0], 11)); + for (g = new olb(e.j); g.a < g.c.c.length; ) { + f = BD(mlb(g), 11); + if (PD(f) === PD(vNb(c, $sc))) { + if (f.j == (Ucd(), Acd) && a.p > e.p) { + G0b(f, Rcd); + if (f.d) { + h = f.o.b; + b = f.a.b; + f.a.b = h - b; + } + } else if (f.j == Rcd && e.p > a.p) { + G0b(f, Acd); + if (f.d) { + h = f.o.b; + b = f.a.b; + f.a.b = -(h - b); + } + } + break; + } + } + return e; + } + function NOc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2; + f = c; + if (c < d) { + m = (n = new uOc(a.p), o2 = new uOc(a.p), ye(n.e, a.e), n.q = a.q, n.r = o2, lOc(n), ye(o2.j, a.j), o2.r = n, lOc(o2), new vgd(n, o2)); + l = BD(m.a, 112); + k = BD(m.b, 112); + e = (tCb(f, b.c.length), BD(b.c[f], 329)); + g = UOc(a, l, k, e); + for (j = c + 1; j <= d; j++) { + h = (tCb(j, b.c.length), BD(b.c[j], 329)); + i = UOc(a, l, k, h); + if (SOc(h, i, e, g)) { + e = h; + g = i; + } + } + } + return f; + } + function wQb(a, b, c, d, e) { + var f, g, h, i, j, k, l; + if (!(JD(b, 239) || JD(b, 354) || JD(b, 186))) { + throw vbb(new Wdb("Method only works for ElkNode-, ElkLabel and ElkPort-objects.")); + } + g = a.a / 2; + i = b.i + d - g; + k = b.j + e - g; + j = i + b.g + a.a; + l = k + b.f + a.a; + f = new s7c(); + Dsb(f, new f7c(i, k)); + Dsb(f, new f7c(i, l)); + Dsb(f, new f7c(j, l)); + Dsb(f, new f7c(j, k)); + h = new XOb(f); + tNb(h, b); + c && Rhb(a.b, b, h); + return h; + } + function uXb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + f = new f7c(b, c); + for (k = new olb(a.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + P6c(j.n, f); + for (m = new olb(j.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + for (e = new olb(l.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + q7c(d.a, f); + g = BD(vNb(d, (Nyc(), jxc)), 74); + !!g && q7c(g, f); + for (i = new olb(d.b); i.a < i.c.c.length; ) { + h = BD(mlb(i), 70); + P6c(h.n, f); + } + } + } + } + } + function g_b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + f = new f7c(b, c); + for (k = new olb(a.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + P6c(j.n, f); + for (m = new olb(j.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + for (e = new olb(l.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + q7c(d.a, f); + g = BD(vNb(d, (Nyc(), jxc)), 74); + !!g && q7c(g, f); + for (i = new olb(d.b); i.a < i.c.c.length; ) { + h = BD(mlb(i), 70); + P6c(h.n, f); + } + } + } + } + } + function N1b(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i == 0) { + throw vbb(new z2c("Edges must have a source.")); + } else if ((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i == 0) { + throw vbb(new z2c("Edges must have a target.")); + } else { + !a.b && (a.b = new y5d(z2, a, 4, 7)); + if (!(a.b.i <= 1 && (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c.i <= 1))) { + throw vbb(new z2c("Hyperedges are not supported.")); + } + } + } + function OFc(a, b) { + var c, d, e, f, g, h, i, j, k, l; + l = 0; + f = new jkb(); + Wjb(f, b); + while (f.b != f.c) { + i = BD(fkb(f), 214); + j = 0; + k = BD(vNb(b.j, (Nyc(), ywc)), 339); + g = Edb(ED(vNb(b.j, uwc))); + h = Edb(ED(vNb(b.j, vwc))); + if (k != (tAc(), rAc)) { + j += g * PFc(i.e, k); + j += h * QFc(i.e); + } + l += pHc(i.d, i.e) + j; + for (e = new olb(i.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 37); + c = BD(Ikb(a.b, d.p), 214); + c.s || (l += NFc(a, c)); + } + } + return l; + } + function dhb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + n = b.length; + i = n; + BCb(0, b.length); + if (b.charCodeAt(0) == 45) { + l = -1; + m = 1; + --n; + } else { + l = 1; + m = 0; + } + f = (phb(), ohb)[10]; + e = n / f | 0; + q = n % f; + q != 0 && ++e; + h = KC(WD, oje, 25, e, 15, 1); + c = nhb[8]; + g = 0; + o2 = m + (q == 0 ? f : q); + for (p = m; p < i; p = o2, o2 = p + f) { + d = Icb(b.substr(p, o2 - p), Rie, Ohe); + j = (Dhb(), Hhb(h, h, g, c)); + j += xhb(h, g, d); + h[g++] = j; + } + k = g; + a.e = l; + a.d = k; + a.a = h; + Jgb(a); + } + function SGb(a, b, c, d, e, f, g) { + a.c = d.qf().a; + a.d = d.qf().b; + if (e) { + a.c += e.qf().a; + a.d += e.qf().b; + } + a.b = b.rf().a; + a.a = b.rf().b; + if (!e) { + c ? a.c -= g + b.rf().a : a.c += d.rf().a + g; + } else { + switch (e.Hf().g) { + case 0: + case 2: + a.c += e.rf().a + g + f.a + g; + break; + case 4: + a.c -= g + f.a + g + b.rf().a; + break; + case 1: + a.c += e.rf().a + g; + a.d -= g + f.b + g + b.rf().b; + break; + case 3: + a.c += e.rf().a + g; + a.d += e.rf().b + g + f.b + g; + } + } + } + function gac(a, b) { + var c, d; + this.b = new Rkb(); + this.e = new Rkb(); + this.a = a; + this.d = b; + dac(this); + eac(this); + this.b.dc() ? this.c = a.c.p : this.c = BD(this.b.Xb(0), 10).c.p; + this.e.c.length == 0 ? this.f = a.c.p : this.f = BD(Ikb(this.e, this.e.c.length - 1), 10).c.p; + for (d = BD(vNb(a, (wtc(), ktc)), 15).Kc(); d.Ob(); ) { + c = BD(d.Pb(), 70); + if (wNb(c, (Nyc(), Owc))) { + this.d = BD(vNb(c, Owc), 227); + break; + } + } + } + function Anc(a, b, c) { + var d, e, f, g, h, i, j, k; + d = BD(Ohb(a.a, b), 53); + f = BD(Ohb(a.a, c), 53); + e = BD(Ohb(a.e, b), 53); + g = BD(Ohb(a.e, c), 53); + d.a.zc(c, d); + g.a.zc(b, g); + for (k = f.a.ec().Kc(); k.Ob(); ) { + j = BD(k.Pb(), 10); + d.a.zc(j, d); + Qqb(BD(Ohb(a.e, j), 53), b); + ye(BD(Ohb(a.e, j), 53), e); + } + for (i = e.a.ec().Kc(); i.Ob(); ) { + h = BD(i.Pb(), 10); + g.a.zc(h, g); + Qqb(BD(Ohb(a.a, h), 53), c); + ye(BD(Ohb(a.a, h), 53), f); + } + } + function WGc(a, b, c) { + var d, e, f, g, h, i, j, k; + d = BD(Ohb(a.a, b), 53); + f = BD(Ohb(a.a, c), 53); + e = BD(Ohb(a.b, b), 53); + g = BD(Ohb(a.b, c), 53); + d.a.zc(c, d); + g.a.zc(b, g); + for (k = f.a.ec().Kc(); k.Ob(); ) { + j = BD(k.Pb(), 10); + d.a.zc(j, d); + Qqb(BD(Ohb(a.b, j), 53), b); + ye(BD(Ohb(a.b, j), 53), e); + } + for (i = e.a.ec().Kc(); i.Ob(); ) { + h = BD(i.Pb(), 10); + g.a.zc(h, g); + Qqb(BD(Ohb(a.a, h), 53), c); + ye(BD(Ohb(a.a, h), 53), f); + } + } + function doc(a, b) { + var c, d, e; + Odd(b, "Breaking Point Insertion", 1); + d = new Xoc(a); + switch (BD(vNb(a, (Nyc(), Gyc)), 337).g) { + case 2: + e = new hpc(); + case 0: + e = new Ync(); + break; + default: + e = new kpc(); + } + c = e.Vf(a, d); + Ccb(DD(vNb(a, Iyc))) && (c = coc(a, c)); + if (!e.Wf() && wNb(a, Myc)) { + switch (BD(vNb(a, Myc), 338).g) { + case 2: + c = tpc(d, c); + break; + case 1: + c = rpc(d, c); + } + } + if (c.dc()) { + Qdd(b); + return; + } + aoc(a, c); + Qdd(b); + } + function $qd(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + k = null; + m = b; + l = Rqd(a, dtd(c), m); + Lkd(l, _pd(m, Vte)); + g = Ypd(m, Lte); + d = new mrd(a, l); + oqd(d.a, d.b, g); + h = Ypd(m, Mte); + e = new nrd(a, l); + pqd(e.a, e.b, h); + if ((!l.b && (l.b = new y5d(z2, l, 4, 7)), l.b).i == 0 || (!l.c && (l.c = new y5d(z2, l, 5, 8)), l.c).i == 0) { + f = _pd(m, Vte); + i = Zte + f; + j = i + $te; + throw vbb(new cqd(j)); + } + grd(m, l); + _qd(a, m, l); + k = crd(a, m, l); + return k; + } + function yGb(a, b) { + var c, d, e, f, g, h, i; + e = KC(WD, oje, 25, a.e.a.c.length, 15, 1); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 121); + e[f.d] += f.b.a.c.length; + } + h = Ru(b); + while (h.b != 0) { + f = BD(h.b == 0 ? null : (sCb(h.b != 0), Nsb(h, h.a.a)), 121); + for (d = vr(new olb(f.g.a)); d.Ob(); ) { + c = BD(d.Pb(), 213); + i = c.e; + i.e = $wnd.Math.max(i.e, f.e + c.a); + --e[i.d]; + e[i.d] == 0 && (Gsb(h, i, h.c.b, h.c), true); + } + } + } + function CGb(a) { + var b, c, d, e, f, g, h, i, j, k, l; + c = Rie; + e = Ohe; + for (h = new olb(a.e.a); h.a < h.c.c.length; ) { + f = BD(mlb(h), 121); + e = $wnd.Math.min(e, f.e); + c = $wnd.Math.max(c, f.e); + } + b = KC(WD, oje, 25, c - e + 1, 15, 1); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 121); + f.e -= e; + ++b[f.e]; + } + d = 0; + if (a.k != null) { + for (j = a.k, k = 0, l = j.length; k < l; ++k) { + i = j[k]; + b[d++] += i; + if (b.length == d) { + break; + } + } + } + return b; + } + function ixd(a) { + switch (a.d) { + case 9: + case 8: { + return true; + } + case 3: + case 5: + case 4: + case 6: { + return false; + } + case 7: { + return BD(hxd(a), 19).a == a.o; + } + case 1: + case 2: { + if (a.o == -2) { + return false; + } else { + switch (a.p) { + case 0: + case 1: + case 2: + case 6: + case 5: + case 7: { + return Bbb(a.k, a.f); + } + case 3: + case 4: { + return a.j == a.e; + } + default: { + return a.n == null ? a.g == null : pb(a.n, a.g); + } + } + } + } + default: { + return false; + } + } + } + function $ad(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Qse), "ELK Fixed"), "Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."), new bbd()))); + p4c(a, Qse, ame, Xad); + p4c(a, Qse, uqe, Ksd(Yad)); + p4c(a, Qse, use, Ksd(Sad)); + p4c(a, Qse, Fme, Ksd(Tad)); + p4c(a, Qse, Tme, Ksd(Vad)); + p4c(a, Qse, bqe, Ksd(Uad)); + } + function ro(a, b, c) { + var d, e, f, g, h; + d = Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))); + h = Tbb(Ibb(Eie, keb(Tbb(Ibb(c == null ? 0 : tb(c), Fie)), 15))); + f = uo(a, b, d); + if (!!f && h == f.f && Hb(c, f.i)) { + return c; + } + g = vo(a, c, h); + if (g) { + throw vbb(new Wdb("value already present: " + c)); + } + e = new $o(b, d, c, h); + if (f) { + mo(a, f); + po(a, e, f); + f.e = null; + f.c = null; + return f.i; + } else { + po(a, e, null); + to(a); + return null; + } + } + function E4b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2; + k = c.a.c; + g = c.a.c + c.a.b; + f = BD(Ohb(c.c, b), 459); + n = f.f; + o2 = f.a; + f.b ? i = new f7c(g, n) : i = new f7c(k, n); + f.c ? l = new f7c(k, o2) : l = new f7c(g, o2); + e = k; + c.p || (e += a.c); + e += c.F + c.v * a.b; + j = new f7c(e, n); + m = new f7c(e, o2); + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [i, j])); + h = c.d.a.gc() > 1; + if (h) { + d = new f7c(e, c.b); + Dsb(b.a, d); + } + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [m, l])); + } + function Nid(a, b, c) { + var d, e, f, g, h, i; + if (!b) { + return null; + } else { + if (c <= -1) { + d = XKd(b.Tg(), -1 - c); + if (JD(d, 99)) { + return BD(d, 18); + } else { + g = BD(b.ah(d), 153); + for (h = 0, i = g.gc(); h < i; ++h) { + if (PD(g.jl(h)) === PD(a)) { + e = g.il(h); + if (JD(e, 99)) { + f = BD(e, 18); + if ((f.Bb & ote) != 0) { + return f; + } + } + } + } + throw vbb(new Zdb("The containment feature could not be located")); + } + } else { + return zUd(BD(XKd(a.Tg(), c), 18)); + } + } + } + function Xee(a) { + var b, c, d, e, f; + d = a.length; + b = new Ifb(); + f = 0; + while (f < d) { + c = bfb(a, f++); + if (c == 9 || c == 10 || c == 12 || c == 13 || c == 32) + continue; + if (c == 35) { + while (f < d) { + c = bfb(a, f++); + if (c == 13 || c == 10) + break; + } + continue; + } + if (c == 92 && f < d) { + if ((e = (BCb(f, a.length), a.charCodeAt(f))) == 35 || e == 9 || e == 10 || e == 12 || e == 13 || e == 32) { + Afb(b, e & aje); + ++f; + } else { + b.a += "\\"; + Afb(b, e & aje); + ++f; + } + } else + Afb(b, c & aje); + } + return b.a; + } + function GVc(a, b) { + var c, d, e; + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 33); + Rc(a.a, c, c); + Rc(a.b, c, c); + e = gVc(c); + if (e.c.length != 0) { + !!a.d && a.d.lg(e); + Rc(a.a, c, (tCb(0, e.c.length), BD(e.c[0], 33))); + Rc(a.b, c, BD(Ikb(e, e.c.length - 1), 33)); + while (dVc(e).c.length != 0) { + e = dVc(e); + !!a.d && a.d.lg(e); + Rc(a.a, c, (tCb(0, e.c.length), BD(e.c[0], 33))); + Rc(a.b, c, BD(Ikb(e, e.c.length - 1), 33)); + } + } + } + } + function fnc(a) { + var b, c, d, e, f, g, h, i, j, k; + c = 0; + for (h = new olb(a.d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + !!g.i && (g.i.c = c++); + } + b = IC(sbb, [nie, dle], [177, 25], 16, [c, c], 2); + k = a.d; + for (e = 0; e < k.c.length; e++) { + i = (tCb(e, k.c.length), BD(k.c[e], 101)); + if (i.i) { + for (f = e + 1; f < k.c.length; f++) { + j = (tCb(f, k.c.length), BD(k.c[f], 101)); + if (j.i) { + d = knc(i, j); + b[i.i.c][j.i.c] = d; + b[j.i.c][i.i.c] = d; + } + } + } + } + return b; + } + function ht(a, b, c, d) { + var e, f, g; + g = new qu(b, c); + if (!a.a) { + a.a = a.e = g; + Rhb(a.b, b, new pu(g)); + ++a.c; + } else if (!d) { + a.e.b = g; + g.d = a.e; + a.e = g; + e = BD(Ohb(a.b, b), 283); + if (!e) { + Rhb(a.b, b, e = new pu(g)); + ++a.c; + } else { + ++e.a; + f = e.c; + f.c = g; + g.e = f; + e.c = g; + } + } else { + e = BD(Ohb(a.b, b), 283); + ++e.a; + g.d = d.d; + g.e = d.e; + g.b = d; + g.c = d; + !d.e ? BD(Ohb(a.b, b), 283).b = g : d.e.c = g; + !d.d ? a.a = g : d.d.b = g; + d.d = g; + d.e = g; + } + ++a.d; + return g; + } + function mfb(a, b) { + var c, d, e, f, g, h, i, j; + c = new RegExp(b, "g"); + i = KC(ZI, nie, 2, 0, 6, 1); + d = 0; + j = a; + f = null; + while (true) { + h = c.exec(j); + if (h == null || j == "") { + i[d] = j; + break; + } else { + g = h.index; + i[d] = j.substr(0, g); + j = qfb(j, g + h[0].length, j.length); + c.lastIndex = 0; + if (f == j) { + i[d] = j.substr(0, 1); + j = j.substr(1); + } + f = j; + ++d; + } + } + if (a.length > 0) { + e = i.length; + while (e > 0 && i[e - 1] == "") { + --e; + } + e < i.length && (i.length = e); + } + return i; + } + function f1d(a, b) { + var c, d, e, f, g, h, i, j, k, l; + l = _Kd(b); + j = null; + e = false; + for (h = 0, k = VKd(l.a).i; h < k; ++h) { + g = BD(nOd(l, h, (f = BD(qud(VKd(l.a), h), 87), i = f.c, JD(i, 88) ? BD(i, 26) : (jGd(), _Fd))), 26); + c = f1d(a, g); + if (!c.dc()) { + if (!j) { + j = c; + } else { + if (!e) { + e = true; + j = new pFd(j); + } + j.Gc(c); + } + } + } + d = k1d(a, b); + if (d.dc()) { + return !j ? (mmb(), mmb(), jmb) : j; + } else { + if (!j) { + return d; + } else { + e || (j = new pFd(j)); + j.Gc(d); + return j; + } + } + } + function g1d(a, b) { + var c, d, e, f, g, h, i, j, k, l; + l = _Kd(b); + j = null; + d = false; + for (h = 0, k = VKd(l.a).i; h < k; ++h) { + f = BD(nOd(l, h, (e = BD(qud(VKd(l.a), h), 87), i = e.c, JD(i, 88) ? BD(i, 26) : (jGd(), _Fd))), 26); + c = g1d(a, f); + if (!c.dc()) { + if (!j) { + j = c; + } else { + if (!d) { + d = true; + j = new pFd(j); + } + j.Gc(c); + } + } + } + g = n1d(a, b); + if (g.dc()) { + return !j ? (mmb(), mmb(), jmb) : j; + } else { + if (!j) { + return g; + } else { + d || (j = new pFd(j)); + j.Gc(g); + return j; + } + } + } + function B2d(a, b, c) { + var d, e, f, g, h, i; + if (JD(b, 72)) { + return Txd(a, b, c); + } else { + h = null; + f = null; + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + e = d[g]; + if (pb(b, e.dd())) { + f = e.ak(); + if (JD(f, 99) && (BD(f, 18).Bb & ote) != 0) { + h = e; + break; + } + } + } + if (h) { + if (oid(a.e)) { + i = f.$j() ? H2d(a, 4, f, b, null, M2d(a, f, b, JD(f, 99) && (BD(f, 18).Bb & Tje) != 0), true) : H2d(a, f.Kj() ? 2 : 1, f, b, f.zj(), -1, true); + c ? c.Ei(i) : c = i; + } + c = B2d(a, h, c); + } + return c; + } + } + function pKb(a) { + var b, c, d, e; + d = a.o; + $Jb(); + if (a.A.dc() || pb(a.A, ZJb)) { + e = d.a; + } else { + e = gIb(a.f); + if (a.A.Hc((tdd(), qdd)) && !a.B.Hc((Idd(), Edd))) { + e = $wnd.Math.max(e, gIb(BD(Mpb(a.p, (Ucd(), Acd)), 244))); + e = $wnd.Math.max(e, gIb(BD(Mpb(a.p, Rcd), 244))); + } + b = aKb(a); + !!b && (e = $wnd.Math.max(e, b.a)); + } + Ccb(DD(a.e.yf().We((Y9c(), $8c)))) ? d.a = $wnd.Math.max(d.a, e) : d.a = e; + c = a.f.i; + c.c = 0; + c.b = e; + hIb(a.f); + } + function $0d(a, b) { + var c, d, e, f, g, h, i, j, k; + c = b.Hh(a.a); + if (c) { + i = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), "memberTypes")); + if (i != null) { + j = new Rkb(); + for (f = mfb(i, "\\w"), g = 0, h = f.length; g < h; ++g) { + e = f[g]; + d = e.lastIndexOf("#"); + k = d == -1 ? w1d(a, b.Aj(), e) : d == 0 ? v1d(a, null, e.substr(1)) : v1d(a, e.substr(0, d), e.substr(d + 1)); + JD(k, 148) && Ekb(j, BD(k, 148)); + } + return j; + } + } + return mmb(), mmb(), jmb; + } + function tRb(a, b, c) { + var d, e, f, g, h, i, j, k; + Odd(c, kme, 1); + a.bf(b); + f = 0; + while (a.df(f)) { + for (k = new olb(b.e); k.a < k.c.c.length; ) { + i = BD(mlb(k), 144); + for (h = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [b.e, b.d, b.b]))); Qr(h); ) { + g = BD(Rr(h), 357); + if (g != i) { + e = a.af(g, i); + !!e && P6c(i.a, e); + } + } + } + for (j = new olb(b.e); j.a < j.c.c.length; ) { + i = BD(mlb(j), 144); + d = i.a; + Q6c(d, -a.d, -a.d, a.d, a.d); + P6c(i.d, d); + X6c(d); + } + a.cf(); + ++f; + } + Qdd(c); + } + function $2d(a, b, c) { + var d, e, f, g; + g = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (f = 0; f < a.i; ++f) { + e = d[f]; + if (g.rl(e.ak())) { + if (pb(e, c)) { + Xxd(a, f); + return true; + } + } + } + } else if (c != null) { + for (f = 0; f < a.i; ++f) { + e = d[f]; + if (g.rl(e.ak())) { + if (pb(c, e.dd())) { + Xxd(a, f); + return true; + } + } + } + } else { + for (f = 0; f < a.i; ++f) { + e = d[f]; + if (g.rl(e.ak())) { + if (e.dd() == null) { + Xxd(a, f); + return true; + } + } + } + } + return false; + } + function sDc(a, b) { + var c, d, e, f, g; + a.c == null || a.c.length < b.c.length ? a.c = KC(sbb, dle, 25, b.c.length, 16, 1) : Blb(a.c); + a.a = new Rkb(); + d = 0; + for (g = new olb(b); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + e.p = d++; + } + c = new Psb(); + for (f = new olb(b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + if (!a.c[e.p]) { + tDc(a, e); + c.b == 0 || (sCb(c.b != 0), BD(c.a.a.c, 15)).gc() < a.a.c.length ? Esb(c, a.a) : Fsb(c, a.a); + a.a = new Rkb(); + } + } + return c; + } + function jYc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2; + g = BD(qud(b, 0), 33); + dld(g, 0); + eld(g, 0); + m = new Rkb(); + m.c[m.c.length] = g; + h = g; + f = new d$c(a.a, g.g, g.f, (k$c(), j$c)); + for (n = 1; n < b.i; n++) { + o2 = BD(qud(b, n), 33); + i = kYc(a, g$c, o2, h, f, m, c); + j = kYc(a, f$c, o2, h, f, m, c); + k = kYc(a, i$c, o2, h, f, m, c); + l = kYc(a, h$c, o2, h, f, m, c); + e = mYc(a, i, j, k, l, o2, h, d); + dld(o2, e.d); + eld(o2, e.e); + c$c(e, j$c); + f = e; + h = o2; + m.c[m.c.length] = o2; + } + return f; + } + function K0c(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), ase), "ELK SPOrE Overlap Removal"), 'A node overlap removal algorithm proposed by Nachmanson et al. in "Node overlap removal by growing a tree".'), new N0c()))); + p4c(a, ase, Qre, Ksd(I0c)); + p4c(a, ase, ame, G0c); + p4c(a, ase, wme, 8); + p4c(a, ase, Vre, Ksd(H0c)); + p4c(a, ase, Yre, Ksd(E0c)); + p4c(a, ase, Zre, Ksd(F0c)); + p4c(a, ase, Zpe, (Bcb(), false)); + } + function sXb(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n; + g = O6c(b.c, c, d); + for (l = new olb(b.a); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + P6c(k.n, g); + for (n = new olb(k.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + for (f = new olb(m.g); f.a < f.c.c.length; ) { + e = BD(mlb(f), 17); + q7c(e.a, g); + h = BD(vNb(e, (Nyc(), jxc)), 74); + !!h && q7c(h, g); + for (j = new olb(e.b); j.a < j.c.c.length; ) { + i = BD(mlb(j), 70); + P6c(i.n, g); + } + } + } + Ekb(a.a, k); + k.a = a; + } + } + function g9b(a, b) { + var c, d, e, f, g; + Odd(b, "Node and Port Label Placement and Node Sizing", 1); + MGb((a$b(), new l$b(a, true, true, new j9b()))); + if (BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + f = BD(vNb(a, (Nyc(), Yxc)), 21); + e = f.Hc((rcd(), ocd)); + g = Ccb(DD(vNb(a, Zxc))); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + MAb(JAb(new YAb(null, new Kub(c.a, 16)), new l9b()), new n9b(f, e, g)); + } + } + Qdd(b); + } + function Y0d(a, b) { + var c, d, e, f, g, h; + c = b.Hh(a.a); + if (c) { + h = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), eue)); + if (h != null) { + e = kfb(h, wfb(35)); + d = b.Hj(); + if (e == -1) { + g = u1d(a, bKd(d)); + f = h; + } else if (e == 0) { + g = null; + f = h.substr(1); + } else { + g = h.substr(0, e); + f = h.substr(e + 1); + } + switch ($1d(q1d(a, b))) { + case 2: + case 3: { + return j1d(a, d, g, f); + } + case 0: + case 4: + case 5: + case 6: { + return m1d(a, d, g, f); + } + } + } + } + return null; + } + function q2d(a, b, c) { + var d, e, f, g, h; + g = (Q6d(), BD(b, 66).Oj()); + if (T6d(a.e, b)) { + if (b.hi() && F2d(a, b, c, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + return false; + } + } else { + h = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + for (f = 0; f < a.i; ++f) { + e = d[f]; + if (h.rl(e.ak())) { + if (g ? pb(e, c) : c == null ? e.dd() == null : pb(c, e.dd())) { + return false; + } else { + BD(Gtd(a, f, g ? BD(c, 72) : R6d(b, c)), 72); + return true; + } + } + } + } + return wtd(a, g ? BD(c, 72) : R6d(b, c)); + } + function uVb(a) { + var b, c, d, e, f, g, h, i; + if (a.d) { + throw vbb(new Zdb((fdb(LP), Jke + LP.k + Kke))); + } + a.c == (ead(), cad) && tVb(a, aad); + for (c = new olb(a.a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 189); + b.e = 0; + } + for (g = new olb(a.a.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 81); + f.o = Qje; + for (e = f.f.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 81); + ++d.d.e; + } + } + JVb(a); + for (i = new olb(a.a.b); i.a < i.c.c.length; ) { + h = BD(mlb(i), 81); + h.k = true; + } + return a; + } + function Ijc(a, b) { + var c, d, e, f, g, h, i, j; + h = new pjc(a); + c = new Psb(); + Gsb(c, b, c.c.b, c.c); + while (c.b != 0) { + d = BD(c.b == 0 ? null : (sCb(c.b != 0), Nsb(c, c.a.a)), 113); + d.d.p = 1; + for (g = new olb(d.e); g.a < g.c.c.length; ) { + e = BD(mlb(g), 409); + kjc(h, e); + j = e.d; + j.d.p == 0 && (Gsb(c, j, c.c.b, c.c), true); + } + for (f = new olb(d.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 409); + kjc(h, e); + i = e.c; + i.d.p == 0 && (Gsb(c, i, c.c.b, c.c), true); + } + } + return h; + } + function hfd(a) { + var b, c, d, e, f; + d = Edb(ED(hkd(a, (Y9c(), G9c)))); + if (d == 1) { + return; + } + _kd(a, d * a.g, d * a.f); + c = Mq(Rq((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c), new Hfd())); + for (f = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.n && (a.n = new cUd(D2, a, 1, 7)), a.n), (!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c), c]))); Qr(f); ) { + e = BD(Rr(f), 470); + e.Gg(d * e.Dg(), d * e.Eg()); + e.Fg(d * e.Cg(), d * e.Bg()); + b = BD(e.We(r9c), 8); + if (b) { + b.a *= d; + b.b *= d; + } + } + } + function Mac(a, b, c, d, e) { + var f, g, h, i, j, k, l, m; + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + m = l_b(f.a); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i = j[k]; + switch (BD(vNb(i, (Nyc(), mxc)), 163).g) { + case 1: + Qac(i); + $_b(i, b); + Nac(i, true, d); + break; + case 3: + Rac(i); + $_b(i, c); + Nac(i, false, e); + } + } + } + h = new Bib(a.b, 0); + while (h.b < h.d.gc()) { + (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29)).a.c.length == 0 && uib(h); + } + } + function d1d(a, b) { + var c, d, e, f, g, h, i; + c = b.Hh(a.a); + if (c) { + i = GD(AAd((!c.b && (c.b = new sId((jGd(), fGd), x6, c)), c.b), Dwe)); + if (i != null) { + d = new Rkb(); + for (f = mfb(i, "\\w"), g = 0, h = f.length; g < h; ++g) { + e = f[g]; + dfb(e, "##other") ? Ekb(d, "!##" + u1d(a, bKd(b.Hj()))) : dfb(e, "##local") ? (d.c[d.c.length] = null, true) : dfb(e, Bwe) ? Ekb(d, u1d(a, bKd(b.Hj()))) : (d.c[d.c.length] = e, true); + } + return d; + } + } + return mmb(), mmb(), jmb; + } + function kMb(a, b) { + var c, d, e, f; + c = new pMb(); + d = BD(GAb(NAb(new YAb(null, new Kub(a.f, 16)), c), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + e = d.gc(); + d = BD(GAb(NAb(new YAb(null, new Kub(b.f, 16)), c), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [Eyb, Dyb]))), 21); + f = d.gc(); + e = e == 1 ? 1 : 0; + f = f == 1 ? 1 : 0; + if (e < f) { + return -1; + } + if (e == f) { + return 0; + } + return 1; + } + function hZb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + h = a.i; + e = Ccb(DD(vNb(h, (Nyc(), fxc)))); + k = 0; + d = 0; + for (j = new olb(a.g); j.a < j.c.c.length; ) { + i = BD(mlb(j), 17); + g = OZb(i); + f = g && e && Ccb(DD(vNb(i, gxc))); + m = i.d.i; + g && f ? ++d : g && !f ? ++k : Q_b(m).e == h ? ++d : ++k; + } + for (c = new olb(a.e); c.a < c.c.c.length; ) { + b = BD(mlb(c), 17); + g = OZb(b); + f = g && e && Ccb(DD(vNb(b, gxc))); + l = b.c.i; + g && f ? ++k : g && !f ? ++d : Q_b(l).e == h ? ++k : ++d; + } + return k - d; + } + function ULc(a, b, c, d) { + this.e = a; + this.k = BD(vNb(a, (wtc(), otc)), 304); + this.g = KC(OQ, kne, 10, b, 0, 1); + this.b = KC(BI, nie, 333, b, 7, 1); + this.a = KC(OQ, kne, 10, b, 0, 1); + this.d = KC(BI, nie, 333, b, 7, 1); + this.j = KC(OQ, kne, 10, b, 0, 1); + this.i = KC(BI, nie, 333, b, 7, 1); + this.p = KC(BI, nie, 333, b, 7, 1); + this.n = KC(wI, nie, 476, b, 8, 1); + Alb(this.n, (Bcb(), false)); + this.f = KC(wI, nie, 476, b, 8, 1); + Alb(this.f, true); + this.o = c; + this.c = d; + } + function X9b(a, b) { + var c, d, e, f, g, h; + if (b.dc()) { + return; + } + if (BD(b.Xb(0), 286).d == (Apc(), xpc)) { + O9b(a, b); + } else { + for (d = b.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 286); + switch (c.d.g) { + case 5: + K9b(a, c, Q9b(a, c)); + break; + case 0: + K9b(a, c, (g = c.f - c.c + 1, h = (g - 1) / 2 | 0, c.c + h)); + break; + case 4: + K9b(a, c, S9b(a, c)); + break; + case 2: + Y9b(c); + K9b(a, c, (f = U9b(c), f ? c.c : c.f)); + break; + case 1: + Y9b(c); + K9b(a, c, (e = U9b(c), e ? c.f : c.c)); + } + P9b(c.a); + } + } + } + function C4b(a, b) { + var c, d, e, f, g, h, i; + if (b.e) { + return; + } + b.e = true; + for (d = b.d.a.ec().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 17); + if (b.o && b.d.a.gc() <= 1) { + g = b.a.c; + h = b.a.c + b.a.b; + i = new f7c(g + (h - g) / 2, b.b); + Dsb(BD(b.d.a.ec().Kc().Pb(), 17).a, i); + continue; + } + e = BD(Ohb(b.c, c), 459); + if (e.b || e.c) { + E4b(a, c, b); + continue; + } + f = a.d == (tBc(), sBc) && (e.d || e.e) && K4b(a, b) && b.d.a.gc() <= 1; + f ? F4b(c, b) : D4b(a, c, b); + } + b.k && reb(b.d, new X4b()); + } + function zXc(a, b, c, d, e, f) { + var g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + m = f; + h = (d + e) / 2 + m; + q = c * $wnd.Math.cos(h); + r = c * $wnd.Math.sin(h); + s = q - b.g / 2; + t = r - b.f / 2; + dld(b, s); + eld(b, t); + l = a.a.jg(b); + p = 2 * $wnd.Math.acos(c / c + a.c); + if (p < e - d) { + n = p / l; + g = (d + e - p) / 2; + } else { + n = (e - d) / l; + g = d; + } + o2 = gVc(b); + if (a.e) { + a.e.kg(a.d); + a.e.lg(o2); + } + for (j = new olb(o2); j.a < j.c.c.length; ) { + i = BD(mlb(j), 33); + k = a.a.jg(i); + zXc(a, i, c + a.c, g, g + n * k, f); + g += n * k; + } + } + function jA(a, b, c) { + var d; + d = c.q.getMonth(); + switch (b) { + case 5: + Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"])[d]); + break; + case 4: + Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje])[d]); + break; + case 3: + Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])[d]); + break; + default: + EA(a, d + 1, b); + } + } + function uGb(a, b) { + var c, d, e, f, g; + Odd(b, "Network simplex", 1); + if (a.e.a.c.length < 1) { + Qdd(b); + return; + } + for (f = new olb(a.e.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 121); + e.e = 0; + } + g = a.e.a.c.length >= 40; + g && FGb(a); + wGb(a); + vGb(a); + c = zGb(a); + d = 0; + while (!!c && d < a.f) { + tGb(a, c, sGb(a, c)); + c = zGb(a); + ++d; + } + g && EGb(a); + a.a ? qGb(a, CGb(a)) : CGb(a); + a.b = null; + a.d = null; + a.p = null; + a.c = null; + a.g = null; + a.i = null; + a.n = null; + a.o = null; + Qdd(b); + } + function JQb(a, b, c, d) { + var e, f, g, h, i, j, k, l, m; + i = new f7c(c, d); + c7c(i, BD(vNb(b, (HSb(), ESb)), 8)); + for (m = new olb(b.e); m.a < m.c.c.length; ) { + l = BD(mlb(m), 144); + P6c(l.d, i); + Ekb(a.e, l); + } + for (h = new olb(b.c); h.a < h.c.c.length; ) { + g = BD(mlb(h), 282); + for (f = new olb(g.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 559); + P6c(e.d, i); + } + Ekb(a.c, g); + } + for (k = new olb(b.d); k.a < k.c.c.length; ) { + j = BD(mlb(k), 447); + P6c(j.d, i); + Ekb(a.d, j); + } + } + function _Bc(a, b) { + var c, d, e, f, g, h, i, j; + for (i = new olb(b.j); i.a < i.c.c.length; ) { + h = BD(mlb(i), 11); + for (e = new b1b(h.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + c = d.c == h ? d.d : d.c; + f = c.i; + if (b == f) { + continue; + } + j = BD(vNb(d, (Nyc(), cyc)), 19).a; + j < 0 && (j = 0); + g = f.p; + if (a.b[g] == 0) { + if (d.d == c) { + a.a[g] -= j + 1; + a.a[g] <= 0 && a.c[g] > 0 && Dsb(a.f, f); + } else { + a.c[g] -= j + 1; + a.c[g] <= 0 && a.a[g] > 0 && Dsb(a.e, f); + } + } + } + } + } + function _Kb(a) { + var b, c, d, e, f, g, h, i, j; + h = new Hxb(BD(Qb(new nLb()), 62)); + j = Qje; + for (c = new olb(a.d); c.a < c.c.c.length; ) { + b = BD(mlb(c), 222); + j = b.c.c; + while (h.a.c != 0) { + i = BD(zjb(Bwb(h.a)), 222); + if (i.c.c + i.c.b < j) { + Jwb(h.a, i) != null; + } else { + break; + } + } + for (g = (e = new Ywb(new cxb(new Gjb(h.a).a).b), new Njb(e)); sib(g.a.a); ) { + f = (d = Wwb(g.a), BD(d.cd(), 222)); + Dsb(f.b, b); + Dsb(b.b, f); + } + Iwb(h.a, b, (Bcb(), zcb)) == null; + } + } + function QEc(a, b, c) { + var d, e, f, g, h, i, j, k, l; + f = new Skb(b.c.length); + for (j = new olb(b); j.a < j.c.c.length; ) { + g = BD(mlb(j), 10); + Ekb(f, a.b[g.c.p][g.p]); + } + LEc(a, f, c); + l = null; + while (l = MEc(f)) { + NEc(a, BD(l.a, 233), BD(l.b, 233), f); + } + b.c = KC(SI, Uhe, 1, 0, 5, 1); + for (e = new olb(f); e.a < e.c.c.length; ) { + d = BD(mlb(e), 233); + for (h = d.d, i = 0, k = h.length; i < k; ++i) { + g = h[i]; + b.c[b.c.length] = g; + a.a[g.c.p][g.p].a = REc(d.g, d.d[0]).a; + } + } + } + function JRc(a, b) { + var c, d, e, f; + if (0 < (JD(a, 14) ? BD(a, 14).gc() : sr(a.Kc()))) { + e = b; + if (1 < e) { + --e; + f = new KRc(); + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 86); + f = pl(OC(GC(KI, 1), Uhe, 20, 0, [f, new ZRc(c)])); + } + return JRc(f, e); + } + if (e < 0) { + f = new NRc(); + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 86); + f = pl(OC(GC(KI, 1), Uhe, 20, 0, [f, new ZRc(c)])); + } + if (0 < (JD(f, 14) ? BD(f, 14).gc() : sr(f.Kc()))) { + return JRc(f, e); + } + } + } + return BD(pr(a.Kc()), 86); + } + function Idd() { + Idd = ccb; + Bdd = new Jdd("DEFAULT_MINIMUM_SIZE", 0); + Ddd = new Jdd("MINIMUM_SIZE_ACCOUNTS_FOR_PADDING", 1); + Add = new Jdd("COMPUTE_PADDING", 2); + Edd = new Jdd("OUTSIDE_NODE_LABELS_OVERHANG", 3); + Fdd = new Jdd("PORTS_OVERHANG", 4); + Hdd = new Jdd("UNIFORM_PORT_SPACING", 5); + Gdd = new Jdd("SPACE_EFFICIENT_PORT_LABELS", 6); + Cdd = new Jdd("FORCE_TABULAR_NODE_LABELS", 7); + zdd = new Jdd("ASYMMETRICAL", 8); + } + function s6d(a, b) { + var c, d, e, f, g, h, i, j; + if (!b) { + return null; + } else { + c = (f = b.Tg(), !f ? null : bKd(f).Nh().Jh(f)); + if (c) { + Xrb(a, b, c); + e = b.Tg(); + for (i = 0, j = (e.i == null && TKd(e), e.i).length; i < j; ++i) { + h = (d = (e.i == null && TKd(e), e.i), i >= 0 && i < d.length ? d[i] : null); + if (h.Ij() && !h.Jj()) { + if (JD(h, 322)) { + u6d(a, BD(h, 34), b, c); + } else { + g = BD(h, 18); + (g.Bb & ote) != 0 && w6d(a, g, b, c); + } + } + } + b.kh() && BD(c, 49).vh(BD(b, 49).qh()); + } + return c; + } + } + function tGb(a, b, c) { + var d, e, f; + if (!b.f) { + throw vbb(new Wdb("Given leave edge is no tree edge.")); + } + if (c.f) { + throw vbb(new Wdb("Given enter edge is a tree edge already.")); + } + b.f = false; + Sqb(a.p, b); + c.f = true; + Qqb(a.p, c); + d = c.e.e - c.d.e - c.a; + xGb(a, c.e, b) || (d = -d); + for (f = new olb(a.e.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 121); + xGb(a, e, b) || (e.e += d); + } + a.j = 1; + Blb(a.c); + DGb(a, BD(mlb(new olb(a.e.a)), 121)); + rGb(a); + } + function x6b(a, b) { + var c, d, e, f, g, h; + h = BD(vNb(b, (Nyc(), Vxc)), 98); + if (!(h == (dcd(), _bd) || h == $bd)) { + return; + } + e = new f7c(b.f.a + b.d.b + b.d.c, b.f.b + b.d.d + b.d.a).b; + for (g = new olb(a.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + if (f.k != (j0b(), e0b)) { + continue; + } + c = BD(vNb(f, (wtc(), Hsc)), 61); + if (c != (Ucd(), zcd) && c != Tcd) { + continue; + } + d = Edb(ED(vNb(f, htc))); + h == _bd && (d *= e); + f.n.b = d - BD(vNb(f, Txc), 8).b; + M_b(f, false, true); + } + } + function YDc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n; + bEc(a, b, c); + f = b[c]; + n = d ? (Ucd(), Tcd) : (Ucd(), zcd); + if (ZDc(b.length, c, d)) { + e = b[d ? c - 1 : c + 1]; + UDc(a, e, d ? (KAc(), IAc) : (KAc(), HAc)); + for (i = f, k = 0, m = i.length; k < m; ++k) { + g = i[k]; + XDc(a, g, n); + } + UDc(a, f, d ? (KAc(), HAc) : (KAc(), IAc)); + for (h = e, j = 0, l = h.length; j < l; ++j) { + g = h[j]; + !!g.e || XDc(a, g, Wcd(n)); + } + } else { + for (h = f, j = 0, l = h.length; j < l; ++j) { + g = h[j]; + XDc(a, g, n); + } + } + return false; + } + function nFc(a, b, c, d) { + var e, f, g, h, i, j, k; + i = V_b(b, c); + (c == (Ucd(), Rcd) || c == Tcd) && (i = JD(i, 152) ? km(BD(i, 152)) : JD(i, 131) ? BD(i, 131).a : JD(i, 54) ? new ov(i) : new dv(i)); + g = false; + do { + e = false; + for (f = 0; f < i.gc() - 1; f++) { + j = BD(i.Xb(f), 11); + h = BD(i.Xb(f + 1), 11); + if (oFc(a, j, h, d)) { + g = true; + cIc(a.a, BD(i.Xb(f), 11), BD(i.Xb(f + 1), 11)); + k = BD(i.Xb(f + 1), 11); + i._c(f + 1, BD(i.Xb(f), 11)); + i._c(f, k); + e = true; + } + } + } while (e); + return g; + } + function W2d(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2; + if (oid(a.e)) { + if (b != c) { + e = BD(a.g, 119); + n = e[c]; + g = n.ak(); + if (T6d(a.e, g)) { + o2 = S6d(a.e.Tg(), g); + i = -1; + h = -1; + d = 0; + for (j = 0, l = b > c ? b : c; j <= l; ++j) { + if (j == c) { + h = d++; + } else { + f = e[j]; + k = o2.rl(f.ak()); + j == b && (i = j == l && !k ? d - 1 : d); + k && ++d; + } + } + m = BD(Wxd(a, b, c), 72); + h != i && GLd(a, new ESd(a.e, 7, g, meb(h), n.dd(), i)); + return m; + } + } + } else { + return BD(sud(a, b, c), 72); + } + return BD(Wxd(a, b, c), 72); + } + function Qcc(a, b) { + var c, d, e, f, g, h, i; + Odd(b, "Port order processing", 1); + i = BD(vNb(a, (Nyc(), _xc)), 421); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + for (f = new olb(c.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + g = BD(vNb(e, Vxc), 98); + h = e.j; + if (g == (dcd(), Zbd) || g == _bd || g == $bd) { + mmb(); + Okb(h, Icc); + } else if (g != bcd && g != ccd) { + mmb(); + Okb(h, Lcc); + Scc(h); + i == (BAc(), AAc) && Okb(h, Kcc); + } + e.i = true; + N_b(e); + } + } + Qdd(b); + } + function vDc(a) { + var b, c, d, e, f, g, h, i; + i = new Lqb(); + b = new KFb(); + for (g = a.Kc(); g.Ob(); ) { + e = BD(g.Pb(), 10); + h = nGb(oGb(new pGb(), e), b); + jrb(i.f, e, h); + } + for (f = a.Kc(); f.Ob(); ) { + e = BD(f.Pb(), 10); + for (d = new Sr(ur(U_b(e).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + if (OZb(c)) { + continue; + } + AFb(DFb(CFb(BFb(EFb(new FFb(), $wnd.Math.max(1, BD(vNb(c, (Nyc(), dyc)), 19).a)), 1), BD(Ohb(i, c.c.i), 121)), BD(Ohb(i, c.d.i), 121))); + } + } + return b; + } + function tNc() { + tNc = ccb; + oNc = e3c(new j3c(), (qUb(), oUb), (S8b(), k8b)); + qNc = e3c(new j3c(), nUb, o8b); + rNc = c3c(e3c(new j3c(), nUb, C8b), pUb, B8b); + nNc = c3c(e3c(e3c(new j3c(), nUb, e8b), oUb, f8b), pUb, g8b); + sNc = b3c(b3c(g3c(c3c(e3c(new j3c(), lUb, M8b), pUb, L8b), oUb), K8b), N8b); + pNc = c3c(new j3c(), pUb, l8b); + lNc = c3c(e3c(e3c(e3c(new j3c(), mUb, r8b), oUb, t8b), oUb, u8b), pUb, s8b); + mNc = c3c(e3c(e3c(new j3c(), oUb, u8b), oUb, _7b), pUb, $7b); + } + function XC(a, b, c, d, e, f) { + var g, h, i, j, k, l, m; + j = $C(b) - $C(a); + g = kD(b, j); + i = TC(0, 0, 0); + while (j >= 0) { + h = bD(a, g); + if (h) { + j < 22 ? (i.l |= 1 << j, void 0) : j < 44 ? (i.m |= 1 << j - 22, void 0) : (i.h |= 1 << j - 44, void 0); + if (a.l == 0 && a.m == 0 && a.h == 0) { + break; + } + } + k = g.m; + l = g.h; + m = g.l; + g.h = l >>> 1; + g.m = k >>> 1 | (l & 1) << 21; + g.l = m >>> 1 | (k & 1) << 21; + --j; + } + c && ZC(i); + if (f) { + if (d) { + QC = hD(a); + e && (QC = nD(QC, (wD(), uD))); + } else { + QC = TC(a.l, a.m, a.h); + } + } + return i; + } + function TDc(a, b) { + var c, d, e, f, g, h, i, j, k, l; + j = a.e[b.c.p][b.p] + 1; + i = b.c.a.c.length + 1; + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + l = 0; + f = 0; + for (e = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(g), new R0b(g)]))); Qr(e); ) { + d = BD(Rr(e), 11); + if (d.i.c == b.c) { + l += aEc(a, d.i) + 1; + ++f; + } + } + c = l / f; + k = g.j; + k == (Ucd(), zcd) ? c < j ? a.f[g.p] = a.c - c : a.f[g.p] = a.b + (i - c) : k == Tcd && (c < j ? a.f[g.p] = a.b + c : a.f[g.p] = a.c - (i - c)); + } + } + function Icb(a, b, c) { + var d, e, f, g, h; + if (a == null) { + throw vbb(new Oeb(Xhe)); + } + f = a.length; + g = f > 0 && (BCb(0, a.length), a.charCodeAt(0) == 45 || (BCb(0, a.length), a.charCodeAt(0) == 43)) ? 1 : 0; + for (d = g; d < f; d++) { + if (Zcb((BCb(d, a.length), a.charCodeAt(d))) == -1) { + throw vbb(new Oeb(Oje + a + '"')); + } + } + h = parseInt(a, 10); + e = h < b; + if (isNaN(h)) { + throw vbb(new Oeb(Oje + a + '"')); + } else if (e || h > c) { + throw vbb(new Oeb(Oje + a + '"')); + } + return h; + } + function dnc(a) { + var b, c, d, e, f, g, h; + g = new Psb(); + for (f = new olb(a.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 112); + pOc(e, e.f.c.length); + qOc(e, e.k.c.length); + if (e.i == 0) { + e.o = 0; + Gsb(g, e, g.c.b, g.c); + } + } + while (g.b != 0) { + e = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 112); + d = e.o + 1; + for (c = new olb(e.f); c.a < c.c.c.length; ) { + b = BD(mlb(c), 129); + h = b.a; + rOc(h, $wnd.Math.max(h.o, d)); + qOc(h, h.i - 1); + h.i == 0 && (Gsb(g, h, g.c.b, g.c), true); + } + } + } + function v2c(a) { + var b, c, d, e, f, g, h, i; + for (g = new olb(a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 79); + d = atd(BD(qud((!f.b && (f.b = new y5d(z2, f, 4, 7)), f.b), 0), 82)); + h = d.i; + i = d.j; + e = BD(qud((!f.a && (f.a = new cUd(A2, f, 6, 6)), f.a), 0), 202); + nmd(e, e.j + h, e.k + i); + gmd(e, e.b + h, e.c + i); + for (c = new Fyd((!e.a && (e.a = new xMd(y2, e, 5)), e.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 469); + ukd(b, b.a + h, b.b + i); + } + p7c(BD(hkd(f, (Y9c(), Q8c)), 74), h, i); + } + } + function fee(a) { + var b; + switch (a) { + case 100: + return kee(nxe, true); + case 68: + return kee(nxe, false); + case 119: + return kee(oxe, true); + case 87: + return kee(oxe, false); + case 115: + return kee(pxe, true); + case 83: + return kee(pxe, false); + case 99: + return kee(qxe, true); + case 67: + return kee(qxe, false); + case 105: + return kee(rxe, true); + case 73: + return kee(rxe, false); + default: + throw vbb(new hz((b = a, mxe + b.toString(16)))); + } + } + function $Xb(a) { + var b, c, d, e, f; + e = BD(Ikb(a.a, 0), 10); + b = new b0b(a); + Ekb(a.a, b); + b.o.a = $wnd.Math.max(1, e.o.a); + b.o.b = $wnd.Math.max(1, e.o.b); + b.n.a = e.n.a; + b.n.b = e.n.b; + switch (BD(vNb(e, (wtc(), Hsc)), 61).g) { + case 4: + b.n.a += 2; + break; + case 1: + b.n.b += 2; + break; + case 2: + b.n.a -= 2; + break; + case 3: + b.n.b -= 2; + } + d = new H0b(); + F0b(d, b); + c = new UZb(); + f = BD(Ikb(e.j, 0), 11); + QZb(c, f); + RZb(c, d); + P6c(X6c(d.n), f.n); + P6c(X6c(d.a), f.a); + return b; + } + function Fac(a, b, c, d, e) { + if (c && (!d || (a.c - a.b & a.a.length - 1) > 1) && b == 1 && BD(a.a[a.b], 10).k == (j0b(), f0b)) { + zac(BD(a.a[a.b], 10), (rbd(), nbd)); + } else if (d && (!c || (a.c - a.b & a.a.length - 1) > 1) && b == 1 && BD(a.a[a.c - 1 & a.a.length - 1], 10).k == (j0b(), f0b)) { + zac(BD(a.a[a.c - 1 & a.a.length - 1], 10), (rbd(), obd)); + } else if ((a.c - a.b & a.a.length - 1) == 2) { + zac(BD(bkb(a), 10), (rbd(), nbd)); + zac(BD(bkb(a), 10), obd); + } else { + wac(a, e); + } + Yjb(a); + } + function pRc(a, b, c) { + var d, e, f, g, h; + f = 0; + for (e = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + g = ""; + (!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n).i == 0 || (g = BD(qud((!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n), 0), 137).a); + h = new XRc(f++, b, g); + tNb(h, d); + yNb(h, (mTc(), dTc), d); + h.e.b = d.j + d.f / 2; + h.f.a = $wnd.Math.max(d.g, 1); + h.e.a = d.i + d.g / 2; + h.f.b = $wnd.Math.max(d.f, 1); + Dsb(b.b, h); + jrb(c.f, d, h); + } + } + function B2b(a) { + var b, c, d, e, f; + d = BD(vNb(a, (wtc(), $sc)), 33); + f = BD(hkd(d, (Nyc(), Fxc)), 174).Hc((tdd(), sdd)); + if (!a.e) { + e = BD(vNb(a, Ksc), 21); + b = new f7c(a.f.a + a.d.b + a.d.c, a.f.b + a.d.d + a.d.a); + if (e.Hc((Orc(), Hrc))) { + jkd(d, Vxc, (dcd(), $bd)); + Afd(d, b.a, b.b, false, true); + } else { + Ccb(DD(hkd(d, Gxc))) || Afd(d, b.a, b.b, true, true); + } + } + f ? jkd(d, Fxc, pqb(sdd)) : jkd(d, Fxc, (c = BD(gdb(I1), 9), new xqb(c, BD(_Bb(c, c.length), 9), 0))); + } + function tA(a, b, c) { + var d, e, f, g; + if (b[0] >= a.length) { + c.o = 0; + return true; + } + switch (bfb(a, b[0])) { + case 43: + e = 1; + break; + case 45: + e = -1; + break; + default: + c.o = 0; + return true; + } + ++b[0]; + f = b[0]; + g = rA(a, b); + if (g == 0 && b[0] == f) { + return false; + } + if (b[0] < a.length && bfb(a, b[0]) == 58) { + d = g * 60; + ++b[0]; + f = b[0]; + g = rA(a, b); + if (g == 0 && b[0] == f) { + return false; + } + d += g; + } else { + d = g; + d < 24 && b[0] - f <= 2 ? d *= 60 : d = d % 100 + (d / 100 | 0) * 60; + } + d *= e; + c.o = -d; + return true; + } + function Hjc(a) { + var b, c, d, e, f, g, h, i, j; + g = new Rkb(); + for (d = new Sr(ur(U_b(a.b).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + OZb(c) && Ekb(g, new Gjc(c, Jjc(a, c.c), Jjc(a, c.d))); + } + for (j = (f = new $ib(a.e).a.vc().Kc(), new djb(f)); j.a.Ob(); ) { + h = (b = BD(j.a.Pb(), 42), BD(b.dd(), 113)); + h.d.p = 0; + } + for (i = (e = new $ib(a.e).a.vc().Kc(), new djb(e)); i.a.Ob(); ) { + h = (b = BD(i.a.Pb(), 42), BD(b.dd(), 113)); + h.d.p == 0 && Ekb(a.d, Ijc(a, h)); + } + } + function W1b(a) { + var b, c, d, e, f, g, h; + f = mpd(a); + for (e = new Fyd((!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 79); + h = atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82)); + if (!ntd(h, f)) { + return true; + } + } + for (c = new Fyd((!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 79); + g = atd(BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82)); + if (!ntd(g, f)) { + return true; + } + } + return false; + } + function Dmc(a) { + var b, c, d, e, f, g, h, i; + i = new s7c(); + b = Jsb(a, 0); + h = null; + c = BD(Xsb(b), 8); + e = BD(Xsb(b), 8); + while (b.b != b.d.c) { + h = c; + c = e; + e = BD(Xsb(b), 8); + f = Emc(c7c(new f7c(h.a, h.b), c)); + g = Emc(c7c(new f7c(e.a, e.b), c)); + d = 10; + d = $wnd.Math.min(d, $wnd.Math.abs(f.a + f.b) / 2); + d = $wnd.Math.min(d, $wnd.Math.abs(g.a + g.b) / 2); + f.a = Eeb(f.a) * d; + f.b = Eeb(f.b) * d; + g.a = Eeb(g.a) * d; + g.b = Eeb(g.b) * d; + Dsb(i, P6c(f, c)); + Dsb(i, P6c(g, c)); + } + return i; + } + function _hd(a, b, c, d) { + var e, f, g, h, i; + g = a.eh(); + i = a.Zg(); + e = null; + if (i) { + if (!!b && (Nid(a, b, c).Bb & Tje) == 0) { + d = Txd(i.Vk(), a, d); + a.uh(null); + e = b.fh(); + } else { + i = null; + } + } else { + !!g && (i = g.fh()); + !!b && (e = b.fh()); + } + i != e && !!i && i.Zk(a); + h = a.Vg(); + a.Rg(b, c); + i != e && !!e && e.Yk(a); + if (a.Lg() && a.Mg()) { + if (!!g && h >= 0 && h != c) { + f = new nSd(a, 1, h, g, null); + !d ? d = f : d.Ei(f); + } + if (c >= 0) { + f = new nSd(a, 1, c, h == c ? g : null, b); + !d ? d = f : d.Ei(f); + } + } + return d; + } + function LEd(a) { + var b, c, d; + if (a.b == null) { + d = new Hfb(); + if (a.i != null) { + Efb(d, a.i); + d.a += ":"; + } + if ((a.f & 256) != 0) { + if ((a.f & 256) != 0 && a.a != null) { + YEd(a.i) || (d.a += "//", d); + Efb(d, a.a); + } + if (a.d != null) { + d.a += "/"; + Efb(d, a.d); + } + (a.f & 16) != 0 && (d.a += "/", d); + for (b = 0, c = a.j.length; b < c; b++) { + b != 0 && (d.a += "/", d); + Efb(d, a.j[b]); + } + if (a.g != null) { + d.a += "?"; + Efb(d, a.g); + } + } else { + Efb(d, a.a); + } + if (a.e != null) { + d.a += "#"; + Efb(d, a.e); + } + a.b = d.a; + } + return a.b; + } + function E5b(a, b) { + var c, d, e, f, g, h; + for (e = new olb(b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + f = vNb(d, (wtc(), $sc)); + if (JD(f, 11)) { + g = BD(f, 11); + h = b_b(b, d, g.o.a, g.o.b); + g.n.a = h.a; + g.n.b = h.b; + G0b(g, BD(vNb(d, Hsc), 61)); + } + } + c = new f7c(b.f.a + b.d.b + b.d.c, b.f.b + b.d.d + b.d.a); + if (BD(vNb(b, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + yNb(a, (Nyc(), Vxc), (dcd(), $bd)); + BD(vNb(Q_b(a), Ksc), 21).Fc(Krc); + j_b(a, c, false); + } else { + j_b(a, c, true); + } + } + function YFc(a, b, c) { + var d, e, f, g, h, i; + Odd(c, "Minimize Crossings " + a.a, 1); + d = b.b.c.length == 0 || !WAb(JAb(new YAb(null, new Kub(b.b, 16)), new Xxb(new xGc()))).sd((EAb(), DAb)); + i = b.b.c.length == 1 && BD(Ikb(b.b, 0), 29).a.c.length == 1; + f = PD(vNb(b, (Nyc(), axc))) === PD((hbd(), ebd)); + if (d || i && !f) { + Qdd(c); + return; + } + e = TFc(a, b); + g = (h = BD(Ut(e, 0), 214), h.c.Rf() ? h.c.Lf() ? new kGc(a) : new mGc(a) : new iGc(a)); + UFc(e, g); + eGc(a); + Qdd(c); + } + function so(a, b, c, d) { + var e, f, g, h, i; + i = Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))); + e = Tbb(Ibb(Eie, keb(Tbb(Ibb(c == null ? 0 : tb(c), Fie)), 15))); + h = vo(a, b, i); + g = uo(a, c, e); + if (!!h && e == h.a && Hb(c, h.g)) { + return c; + } else if (!!g && !d) { + throw vbb(new Wdb("key already present: " + c)); + } + !!h && mo(a, h); + !!g && mo(a, g); + f = new $o(c, e, b, i); + po(a, f, g); + if (g) { + g.e = null; + g.c = null; + } + if (h) { + h.e = null; + h.c = null; + } + to(a); + return !h ? null : h.g; + } + function Lhb(a, b, c) { + var d, e, f, g, h; + for (f = 0; f < b; f++) { + d = 0; + for (h = f + 1; h < b; h++) { + d = wbb(wbb(Ibb(xbb(a[f], Yje), xbb(a[h], Yje)), xbb(c[f + h], Yje)), xbb(Tbb(d), Yje)); + c[f + h] = Tbb(d); + d = Pbb(d, 32); + } + c[f + b] = Tbb(d); + } + khb(c, c, b << 1); + d = 0; + for (e = 0, g = 0; e < b; ++e, g++) { + d = wbb(wbb(Ibb(xbb(a[e], Yje), xbb(a[e], Yje)), xbb(c[g], Yje)), xbb(Tbb(d), Yje)); + c[g] = Tbb(d); + d = Pbb(d, 32); + ++g; + d = wbb(d, xbb(c[g], Yje)); + c[g] = Tbb(d); + d = Pbb(d, 32); + } + return c; + } + function ZJc(a, b, c) { + var d, e, f, g, h, i, j, k; + if (Qq(b)) { + return; + } + i = Edb(ED(pBc(c.c, (Nyc(), zyc)))); + j = BD(pBc(c.c, yyc), 142); + !j && (j = new H_b()); + d = c.a; + e = null; + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + k = 0; + if (!e) { + k = j.d; + } else { + k = i; + k += e.o.b; + } + f = nGb(oGb(new pGb(), g), a.f); + Rhb(a.k, g, f); + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), QD($wnd.Math.ceil(k))), d), f)); + e = g; + d = f; + } + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), QD($wnd.Math.ceil(j.a + e.o.b))), d), c.d)); + } + function uZc(a, b, c, d, e, f, g, h) { + var i, j, k, l, m, n; + n = false; + m = f - c.s; + k = c.t - b.f + (j = MZc(c, m, false), j.a); + if (d.g + h > m) { + return false; + } + l = (i = MZc(d, m, false), i.a); + if (k + h + l <= b.b) { + KZc(c, f - c.s); + c.c = true; + KZc(d, f - c.s); + OZc(d, c.s, c.t + c.d + h); + d.k = true; + WZc(c.q, d); + n = true; + if (e) { + s$c(b, d); + d.j = b; + if (a.c.length > g) { + v$c((tCb(g, a.c.length), BD(a.c[g], 200)), d); + (tCb(g, a.c.length), BD(a.c[g], 200)).a.c.length == 0 && Kkb(a, g); + } + } + } + return n; + } + function kcc(a, b) { + var c, d, e, f, g, h; + Odd(b, "Partition midprocessing", 1); + e = new Hp(); + MAb(JAb(new YAb(null, new Kub(a.a, 16)), new occ()), new qcc(e)); + if (e.d == 0) { + return; + } + h = BD(GAb(UAb((f = e.i, new YAb(null, (!f ? e.i = new zf(e, e.c) : f).Nc()))), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + d = h.Kc(); + c = BD(d.Pb(), 19); + while (d.Ob()) { + g = BD(d.Pb(), 19); + jcc(BD(Qc(e, c), 21), BD(Qc(e, g), 21)); + c = g; + } + Qdd(b); + } + function DYb(a, b, c) { + var d, e, f, g, h, i, j, k; + if (b.p == 0) { + b.p = 1; + g = c; + if (!g) { + e = new Rkb(); + f = (d = BD(gdb(F1), 9), new xqb(d, BD(_Bb(d, d.length), 9), 0)); + g = new vgd(e, f); + } + BD(g.a, 15).Fc(b); + b.k == (j0b(), e0b) && BD(g.b, 21).Fc(BD(vNb(b, (wtc(), Hsc)), 61)); + for (i = new olb(b.j); i.a < i.c.c.length; ) { + h = BD(mlb(i), 11); + for (k = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(h), new R0b(h)]))); Qr(k); ) { + j = BD(Rr(k), 11); + DYb(a, j.i, g); + } + } + return g; + } + return null; + } + function Dmd(a, b) { + var c, d, e, f, g; + if (a.Ab) { + if (a.Ab) { + g = a.Ab.i; + if (g > 0) { + e = BD(a.Ab.g, 1934); + if (b == null) { + for (f = 0; f < g; ++f) { + c = e[f]; + if (c.d == null) { + return c; + } + } + } else { + for (f = 0; f < g; ++f) { + c = e[f]; + if (dfb(b, c.d)) { + return c; + } + } + } + } + } else { + if (b == null) { + for (d = new Fyd(a.Ab); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 590); + if (c.d == null) { + return c; + } + } + } else { + for (d = new Fyd(a.Ab); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 590); + if (dfb(b, c.d)) { + return c; + } + } + } + } + } + return null; + } + function gRc(a, b) { + var c, d, e, f, g, h, i, j; + j = DD(vNb(b, (JTc(), GTc))); + if (j == null || (uCb(j), j)) { + dRc(a, b); + e = new Rkb(); + for (i = Jsb(b.b, 0); i.b != i.d.c; ) { + g = BD(Xsb(i), 86); + c = cRc(a, g, null); + if (c) { + tNb(c, b); + e.c[e.c.length] = c; + } + } + a.a = null; + a.b = null; + if (e.c.length > 1) { + for (d = new olb(e); d.a < d.c.c.length; ) { + c = BD(mlb(d), 135); + f = 0; + for (h = Jsb(c.b, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 86); + g.g = f++; + } + } + } + return e; + } + return Ou(OC(GC(n$, 1), fme, 135, 0, [b])); + } + function rqd(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, p, q, r, s, t, u, v; + n = Sqd(a, etd(b), e); + jmd(n, _pd(e, Vte)); + o = null; + p = e; + q = $pd(p, Yte); + r = new urd(n); + wqd(r.a, q); + s = $pd(p, "endPoint"); + t = new yrd(n); + yqd(t.a, s); + u = Ypd(p, Ote); + v = new Brd(n); + zqd(v.a, u); + l = _pd(e, Qte); + f = new qrd(a, n); + sqd(f.a, f.b, l); + m = _pd(e, Pte); + g = new rrd(a, n); + tqd(g.a, g.b, m); + j = Ypd(e, Ste); + h = new srd(c, n); + uqd(h.b, h.a, j); + k = Ypd(e, Rte); + i = new trd(d, n); + vqd(i.b, i.a, k); + } + function i_b(a, b, c) { + var d, e, f, g, h; + h = null; + switch (b.g) { + case 1: + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + if (Ccb(DD(vNb(d, (wtc(), Msc))))) { + return d; + } + } + h = new H0b(); + yNb(h, (wtc(), Msc), (Bcb(), true)); + break; + case 2: + for (g = new olb(a.j); g.a < g.c.c.length; ) { + f = BD(mlb(g), 11); + if (Ccb(DD(vNb(f, (wtc(), etc))))) { + return f; + } + } + h = new H0b(); + yNb(h, (wtc(), etc), (Bcb(), true)); + } + if (h) { + F0b(h, a); + G0b(h, c); + X$b(h.n, a.o, c); + } + return h; + } + function O3b(a, b) { + var c, d, e, f, g, h; + h = -1; + g = new Psb(); + for (d = new b1b(a.b); llb(d.a) || llb(d.b); ) { + c = BD(llb(d.a) ? mlb(d.a) : mlb(d.b), 17); + h = $wnd.Math.max(h, Edb(ED(vNb(c, (Nyc(), Zwc))))); + c.c == a ? MAb(JAb(new YAb(null, new Kub(c.b, 16)), new U3b()), new W3b(g)) : MAb(JAb(new YAb(null, new Kub(c.b, 16)), new Y3b()), new $3b(g)); + for (f = Jsb(g, 0); f.b != f.d.c; ) { + e = BD(Xsb(f), 70); + wNb(e, (wtc(), Dsc)) || yNb(e, Dsc, c); + } + Gkb(b, g); + Osb(g); + } + return h; + } + function _bc(a, b, c, d, e) { + var f, g, h, i; + f = new b0b(a); + __b(f, (j0b(), i0b)); + yNb(f, (Nyc(), Vxc), (dcd(), $bd)); + yNb(f, (wtc(), $sc), b.c.i); + g = new H0b(); + yNb(g, $sc, b.c); + G0b(g, e); + F0b(g, f); + yNb(b.c, gtc, f); + h = new b0b(a); + __b(h, i0b); + yNb(h, Vxc, $bd); + yNb(h, $sc, b.d.i); + i = new H0b(); + yNb(i, $sc, b.d); + G0b(i, e); + F0b(i, h); + yNb(b.d, gtc, h); + QZb(b, g); + RZb(b, i); + wCb(0, c.c.length); + aCb(c.c, 0, f); + d.c[d.c.length] = h; + yNb(f, ysc, meb(1)); + yNb(h, ysc, meb(1)); + } + function BPc(a, b, c, d, e) { + var f, g, h, i, j; + h = e ? d.b : d.a; + if (Rqb(a.a, d)) { + return; + } + j = h > c.s && h < c.c; + i = false; + if (c.e.b != 0 && c.j.b != 0) { + i = i | ($wnd.Math.abs(h - Edb(ED(Hsb(c.e)))) < qme && $wnd.Math.abs(h - Edb(ED(Hsb(c.j)))) < qme); + i = i | ($wnd.Math.abs(h - Edb(ED(Isb(c.e)))) < qme && $wnd.Math.abs(h - Edb(ED(Isb(c.j)))) < qme); + } + if (j || i) { + g = BD(vNb(b, (Nyc(), jxc)), 74); + if (!g) { + g = new s7c(); + yNb(b, jxc, g); + } + f = new g7c(d); + Gsb(g, f, g.c.b, g.c); + Qqb(a.a, f); + } + } + function gNb(a, b, c, d) { + var e, f, g, h, i, j, k; + if (fNb(a, b, c, d)) { + return true; + } else { + for (g = new olb(b.f); g.a < g.c.c.length; ) { + f = BD(mlb(g), 324); + h = false; + i = a.j - b.j + c; + j = i + b.o; + k = a.k - b.k + d; + e = k + b.p; + switch (f.a.g) { + case 0: + h = oNb(a, i + f.b.a, 0, i + f.c.a, k - 1); + break; + case 1: + h = oNb(a, j, k + f.b.a, a.o - 1, k + f.c.a); + break; + case 2: + h = oNb(a, i + f.b.a, e, i + f.c.a, a.p - 1); + break; + default: + h = oNb(a, 0, k + f.b.a, i - 1, k + f.c.a); + } + if (h) { + return true; + } + } + } + return false; + } + function LMc(a, b) { + var c, d, e, f, g, h, i, j, k; + for (g = new olb(b.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + for (j = new olb(f.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + k = new Rkb(); + h = 0; + for (d = new Sr(ur(R_b(i).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + if (OZb(c) || !OZb(c) && c.c.i.c == c.d.i.c) { + continue; + } + e = BD(vNb(c, (Nyc(), eyc)), 19).a; + if (e > h) { + h = e; + k.c = KC(SI, Uhe, 1, 0, 5, 1); + } + e == h && Ekb(k, new vgd(c.c.i, c)); + } + mmb(); + Okb(k, a.c); + Dkb(a.b, i.p, k); + } + } + } + function MMc(a, b) { + var c, d, e, f, g, h, i, j, k; + for (g = new olb(b.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + for (j = new olb(f.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + k = new Rkb(); + h = 0; + for (d = new Sr(ur(U_b(i).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + if (OZb(c) || !OZb(c) && c.c.i.c == c.d.i.c) { + continue; + } + e = BD(vNb(c, (Nyc(), eyc)), 19).a; + if (e > h) { + h = e; + k.c = KC(SI, Uhe, 1, 0, 5, 1); + } + e == h && Ekb(k, new vgd(c.d.i, c)); + } + mmb(); + Okb(k, a.c); + Dkb(a.f, i.p, k); + } + } + } + function Y7c(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), qse), "ELK Box"), "Algorithm for packing of unconnected boxes, i.e. graphs without edges."), new _7c()))); + p4c(a, qse, ame, U7c); + p4c(a, qse, wme, 15); + p4c(a, qse, vme, meb(0)); + p4c(a, qse, Jre, Ksd(O7c)); + p4c(a, qse, Fme, Ksd(Q7c)); + p4c(a, qse, Eme, Ksd(S7c)); + p4c(a, qse, _le, pse); + p4c(a, qse, Ame, Ksd(P7c)); + p4c(a, qse, Tme, Ksd(R7c)); + p4c(a, qse, rse, Ksd(M7c)); + p4c(a, qse, lqe, Ksd(N7c)); + } + function W$b(a, b) { + var c, d, e, f, g, h, i, j, k; + e = a.i; + g = e.o.a; + f = e.o.b; + if (g <= 0 && f <= 0) { + return Ucd(), Scd; + } + j = a.n.a; + k = a.n.b; + h = a.o.a; + c = a.o.b; + switch (b.g) { + case 2: + case 1: + if (j < 0) { + return Ucd(), Tcd; + } else if (j + h > g) { + return Ucd(), zcd; + } + break; + case 4: + case 3: + if (k < 0) { + return Ucd(), Acd; + } else if (k + c > f) { + return Ucd(), Rcd; + } + } + i = (j + h / 2) / g; + d = (k + c / 2) / f; + return i + d <= 1 && i - d <= 0 ? (Ucd(), Tcd) : i + d >= 1 && i - d >= 0 ? (Ucd(), zcd) : d < 0.5 ? (Ucd(), Acd) : (Ucd(), Rcd); + } + function pJc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + c = false; + k = Edb(ED(vNb(b, (Nyc(), vyc)))); + o2 = Qie * k; + for (e = new olb(b.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + j = new olb(d.a); + f = BD(mlb(j), 10); + l = xJc(a.a[f.p]); + while (j.a < j.c.c.length) { + h = BD(mlb(j), 10); + m = xJc(a.a[h.p]); + if (l != m) { + n = jBc(a.b, f, h); + g = f.n.b + f.o.b + f.d.a + l.a + n; + i = h.n.b - h.d.d + m.a; + if (g > i + o2) { + p = l.g + m.g; + m.a = (m.g * m.a + l.g * l.a) / p; + m.g = p; + l.f = m; + c = true; + } + } + f = h; + l = m; + } + } + return c; + } + function VGb(a, b, c, d, e, f, g) { + var h, i, j, k, l, m; + m = new I6c(); + for (j = b.Kc(); j.Ob(); ) { + h = BD(j.Pb(), 839); + for (l = new olb(h.wf()); l.a < l.c.c.length; ) { + k = BD(mlb(l), 181); + if (PD(k.We((Y9c(), C8c))) === PD((qad(), pad))) { + SGb(m, k, false, d, e, f, g); + H6c(a, m); + } + } + } + for (i = c.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 839); + for (l = new olb(h.wf()); l.a < l.c.c.length; ) { + k = BD(mlb(l), 181); + if (PD(k.We((Y9c(), C8c))) === PD((qad(), oad))) { + SGb(m, k, true, d, e, f, g); + H6c(a, m); + } + } + } + } + function oRc(a, b, c) { + var d, e, f, g, h, i, j; + for (g = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); g.e != g.i.gc(); ) { + f = BD(Dyd(g), 33); + for (e = new Sr(ur(_sd(f).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 79); + if (!Pld(d) && !Pld(d) && !Qld(d)) { + i = BD(Wd(irb(c.f, f)), 86); + j = BD(Ohb(c, atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))), 86); + if (!!i && !!j) { + h = new QRc(i, j); + yNb(h, (mTc(), dTc), d); + tNb(h, d); + Dsb(i.d, h); + Dsb(j.b, h); + Dsb(b.a, h); + } + } + } + } + } + function QKb(a, b) { + var c, d, e, f, g, h, i, j; + for (i = BD(BD(Qc(a.r, b), 21), 84).Kc(); i.Ob(); ) { + h = BD(i.Pb(), 111); + e = h.c ? YHb(h.c) : 0; + if (e > 0) { + if (h.a) { + j = h.b.rf().b; + if (e > j) { + if (a.v || h.c.d.c.length == 1) { + g = (e - j) / 2; + h.d.d = g; + h.d.a = g; + } else { + c = BD(Ikb(h.c.d, 0), 181).rf().b; + d = (c - j) / 2; + h.d.d = $wnd.Math.max(0, d); + h.d.a = e - d - j; + } + } + } else { + h.d.a = a.t + e; + } + } else if (tcd(a.u)) { + f = sfd(h.b); + f.d < 0 && (h.d.d = -f.d); + f.d + f.a > h.b.rf().b && (h.d.a = f.d + f.a - h.b.rf().b); + } + } + } + function FC(a, b) { + var c; + switch (HC(a)) { + case 6: + return ND(b); + case 7: + return LD(b); + case 8: + return KD(b); + case 3: + return Array.isArray(b) && (c = HC(b), !(c >= 14 && c <= 16)); + case 11: + return b != null && typeof b === Nhe; + case 12: + return b != null && (typeof b === Jhe || typeof b == Nhe); + case 0: + return AD(b, a.__elementTypeId$); + case 2: + return OD(b) && !(b.im === gcb); + case 1: + return OD(b) && !(b.im === gcb) || AD(b, a.__elementTypeId$); + default: + return true; + } + } + function xOb(a, b) { + var c, d, e, f; + d = $wnd.Math.min($wnd.Math.abs(a.c - (b.c + b.b)), $wnd.Math.abs(a.c + a.b - b.c)); + f = $wnd.Math.min($wnd.Math.abs(a.d - (b.d + b.a)), $wnd.Math.abs(a.d + a.a - b.d)); + c = $wnd.Math.abs(a.c + a.b / 2 - (b.c + b.b / 2)); + if (c > a.b / 2 + b.b / 2) { + return 1; + } + e = $wnd.Math.abs(a.d + a.a / 2 - (b.d + b.a / 2)); + if (e > a.a / 2 + b.a / 2) { + return 1; + } + if (c == 0 && e == 0) { + return 0; + } + if (c == 0) { + return f / e + 1; + } + if (e == 0) { + return d / c + 1; + } + return $wnd.Math.min(d / c, f / e) + 1; + } + function mgb(a, b) { + var c, d, e, f, g, h; + e = pgb(a); + h = pgb(b); + if (e == h) { + if (a.e == b.e && a.a < 54 && b.a < 54) { + return a.f < b.f ? -1 : a.f > b.f ? 1 : 0; + } + d = a.e - b.e; + c = (a.d > 0 ? a.d : $wnd.Math.floor((a.a - 1) * Xje) + 1) - (b.d > 0 ? b.d : $wnd.Math.floor((b.a - 1) * Xje) + 1); + if (c > d + 1) { + return e; + } else if (c < d - 1) { + return -e; + } else { + f = (!a.c && (a.c = fhb(a.f)), a.c); + g = (!b.c && (b.c = fhb(b.f)), b.c); + d < 0 ? f = Ogb(f, Khb(-d)) : d > 0 && (g = Ogb(g, Khb(d))); + return Igb(f, g); + } + } else + return e < h ? -1 : 1; + } + function mTb(a, b) { + var c, d, e, f, g, h, i; + f = 0; + h = 0; + i = 0; + for (e = new olb(a.f.e); e.a < e.c.c.length; ) { + d = BD(mlb(e), 144); + if (b == d) { + continue; + } + g = a.i[b.b][d.b]; + f += g; + c = S6c(b.d, d.d); + c > 0 && a.d != (yTb(), xTb) && (h += g * (d.d.a + a.a[b.b][d.b] * (b.d.a - d.d.a) / c)); + c > 0 && a.d != (yTb(), vTb) && (i += g * (d.d.b + a.a[b.b][d.b] * (b.d.b - d.d.b) / c)); + } + switch (a.d.g) { + case 1: + return new f7c(h / f, b.d.b); + case 2: + return new f7c(b.d.a, i / f); + default: + return new f7c(h / f, i / f); + } + } + function Wcc(a, b) { + Occ(); + var c, d, e, f, g; + g = BD(vNb(a.i, (Nyc(), Vxc)), 98); + f = a.j.g - b.j.g; + if (f != 0 || !(g == (dcd(), Zbd) || g == _bd || g == $bd)) { + return 0; + } + if (g == (dcd(), Zbd)) { + c = BD(vNb(a, Wxc), 19); + d = BD(vNb(b, Wxc), 19); + if (!!c && !!d) { + e = c.a - d.a; + if (e != 0) { + return e; + } + } + } + switch (a.j.g) { + case 1: + return Kdb(a.n.a, b.n.a); + case 2: + return Kdb(a.n.b, b.n.b); + case 3: + return Kdb(b.n.a, a.n.a); + case 4: + return Kdb(b.n.b, a.n.b); + default: + throw vbb(new Zdb(ine)); + } + } + function tfd(a) { + var b, c, d, e, f, g; + c = (!a.a && (a.a = new xMd(y2, a, 5)), a.a).i + 2; + g = new Skb(c); + Ekb(g, new f7c(a.j, a.k)); + MAb(new YAb(null, (!a.a && (a.a = new xMd(y2, a, 5)), new Kub(a.a, 16))), new Qfd(g)); + Ekb(g, new f7c(a.b, a.c)); + b = 1; + while (b < g.c.length - 1) { + d = (tCb(b - 1, g.c.length), BD(g.c[b - 1], 8)); + e = (tCb(b, g.c.length), BD(g.c[b], 8)); + f = (tCb(b + 1, g.c.length), BD(g.c[b + 1], 8)); + d.a == e.a && e.a == f.a || d.b == e.b && e.b == f.b ? Kkb(g, b) : ++b; + } + return g; + } + function Xgc(a, b) { + var c, d, e, f, g, h, i; + c = vDb(yDb(wDb(xDb(new zDb(), b), new K6c(b.e)), Ggc), a.a); + b.j.c.length == 0 || nDb(BD(Ikb(b.j, 0), 57).a, c); + i = new lEb(); + Rhb(a.e, c, i); + g = new Tqb(); + h = new Tqb(); + for (f = new olb(b.k); f.a < f.c.c.length; ) { + e = BD(mlb(f), 17); + Qqb(g, e.c); + Qqb(h, e.d); + } + d = g.a.gc() - h.a.gc(); + if (d < 0) { + jEb(i, true, (ead(), aad)); + jEb(i, false, bad); + } else if (d > 0) { + jEb(i, false, (ead(), aad)); + jEb(i, true, bad); + } + Hkb(b.g, new $hc(a, c)); + Rhb(a.g, b, c); + } + function Neb() { + Neb = ccb; + var a; + Jeb = OC(GC(WD, 1), oje, 25, 15, [-1, -1, 30, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]); + Keb = KC(WD, oje, 25, 37, 15, 1); + Leb = OC(GC(WD, 1), oje, 25, 15, [-1, -1, 63, 40, 32, 28, 25, 23, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13]); + Meb = KC(XD, Sje, 25, 37, 14, 1); + for (a = 2; a <= 36; a++) { + Keb[a] = QD($wnd.Math.pow(a, Jeb[a])); + Meb[a] = Abb(rie, Keb[a]); + } + } + function pfd(a) { + var b; + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i != 1) { + throw vbb(new Wdb(Tse + (!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i)); + } + b = new s7c(); + !!btd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)) && ye(b, qfd(a, btd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)), false)); + !!btd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)) && ye(b, qfd(a, btd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)), true)); + return b; + } + function _Mc(a, b) { + var c, d, e, f, g; + b.d ? e = a.a.c == (YLc(), XLc) ? R_b(b.b) : U_b(b.b) : e = a.a.c == (YLc(), WLc) ? R_b(b.b) : U_b(b.b); + f = false; + for (d = new Sr(ur(e.a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + g = Ccb(a.a.f[a.a.g[b.b.p].p]); + if (!g && !OZb(c) && c.c.i.c == c.d.i.c) { + continue; + } + if (Ccb(a.a.n[a.a.g[b.b.p].p]) || Ccb(a.a.n[a.a.g[b.b.p].p])) { + continue; + } + f = true; + if (Rqb(a.b, a.a.g[TMc(c, b.b).p])) { + b.c = true; + b.a = c; + return b; + } + } + b.c = f; + b.a = null; + return b; + } + function bed(a, b, c, d, e) { + var f, g, h, i, j, k, l; + mmb(); + Okb(a, new Red()); + h = new Bib(a, 0); + l = new Rkb(); + f = 0; + while (h.b < h.d.gc()) { + g = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 157)); + if (l.c.length != 0 && red(g) * qed(g) > f * 2) { + k = new wed(l); + j = red(g) / qed(g); + i = fed(k, b, new p0b(), c, d, e, j); + P6c(X6c(k.e), i); + l.c = KC(SI, Uhe, 1, 0, 5, 1); + f = 0; + l.c[l.c.length] = k; + l.c[l.c.length] = g; + f = red(k) * qed(k) + red(g) * qed(g); + } else { + l.c[l.c.length] = g; + f += red(g) * qed(g); + } + } + return l; + } + function qwd(a, b, c) { + var d, e, f, g, h, i, j; + d = c.gc(); + if (d == 0) { + return false; + } else { + if (a.ej()) { + i = a.fj(); + zvd(a, b, c); + g = d == 1 ? a.Zi(3, null, c.Kc().Pb(), b, i) : a.Zi(5, null, c, b, i); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f = b + d; + for (e = b; e < f; ++e) { + j = a.Oi(e); + h = a.cj(j, h); + h = h; + } + if (!h) { + a.$i(g); + } else { + h.Ei(g); + h.Fi(); + } + } else { + a.$i(g); + } + } else { + zvd(a, b, c); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f = b + d; + for (e = b; e < f; ++e) { + h = a.cj(a.Oi(e), h); + } + !!h && h.Fi(); + } + } + return true; + } + } + function wwd(a, b, c) { + var d, e, f, g, h; + if (a.ej()) { + e = null; + f = a.fj(); + d = a.Zi(1, h = (g = a.Ui(b, a.oi(b, c)), g), c, b, f); + if (a.bj() && !(a.ni() && !!h ? pb(h, c) : PD(h) === PD(c))) { + !!h && (e = a.dj(h, e)); + e = a.cj(c, e); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } + return h; + } else { + h = (g = a.Ui(b, a.oi(b, c)), g); + if (a.bj() && !(a.ni() && !!h ? pb(h, c) : PD(h) === PD(c))) { + e = null; + !!h && (e = a.dj(h, null)); + e = a.cj(c, e); + !!e && e.Fi(); + } + return h; + } + } + function rRb(a, b) { + var c, d, e, f, g, h, i, j, k; + a.e = b; + a.f = BD(vNb(b, (HSb(), GSb)), 230); + iRb(b); + a.d = $wnd.Math.max(b.e.c.length * 16 + b.c.c.length, 256); + if (!Ccb(DD(vNb(b, (wSb(), dSb))))) { + k = a.e.e.c.length; + for (i = new olb(b.e); i.a < i.c.c.length; ) { + h = BD(mlb(i), 144); + j = h.d; + j.a = Aub(a.f) * k; + j.b = Aub(a.f) * k; + } + } + c = b.b; + for (f = new olb(b.c); f.a < f.c.c.length; ) { + e = BD(mlb(f), 282); + d = BD(vNb(e, rSb), 19).a; + if (d > 0) { + for (g = 0; g < d; g++) { + Ekb(c, new aRb(e)); + } + cRb(e); + } + } + } + function zac(a, b) { + var c, d, e, f, g, h; + if (a.k == (j0b(), f0b)) { + c = WAb(JAb(BD(vNb(a, (wtc(), ktc)), 15).Oc(), new Xxb(new Kac()))).sd((EAb(), DAb)) ? b : (rbd(), pbd); + yNb(a, Ssc, c); + if (c != (rbd(), obd)) { + d = BD(vNb(a, $sc), 17); + h = Edb(ED(vNb(d, (Nyc(), Zwc)))); + g = 0; + if (c == nbd) { + g = a.o.b - $wnd.Math.ceil(h / 2); + } else if (c == pbd) { + a.o.b -= Edb(ED(vNb(Q_b(a), nyc))); + g = (a.o.b - $wnd.Math.ceil(h)) / 2; + } + for (f = new olb(a.j); f.a < f.c.c.length; ) { + e = BD(mlb(f), 11); + e.n.b = g; + } + } + } + } + function Uge() { + Uge = ccb; + g5d(); + Tge = new Vge(); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge(Xwe)])]); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge(Ywe)])]); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge(Zwe)]), OC(GC(w5, 1), Axe, 592, 0, [new Rge(Ywe)])]); + new Ygb("-1"); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge("\\c+")])]); + new Ygb("0"); + new Ygb("0"); + new Ygb("1"); + new Ygb("0"); + new Ygb(hxe); + } + function KQd(a) { + var b, c; + if (!!a.c && a.c.kh()) { + c = BD(a.c, 49); + a.c = BD(xid(a, c), 138); + if (a.c != c) { + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 2, c, a.c)); + if (JD(a.Cb, 399)) { + a.Db >> 16 == -15 && a.Cb.nh() && Rwd(new oSd(a.Cb, 9, 13, c, a.c, HLd(QSd(BD(a.Cb, 59)), a))); + } else if (JD(a.Cb, 88)) { + if (a.Db >> 16 == -23 && a.Cb.nh()) { + b = a.c; + JD(b, 88) || (b = (jGd(), _Fd)); + JD(c, 88) || (c = (jGd(), _Fd)); + Rwd(new oSd(a.Cb, 9, 10, c, b, HLd(VKd(BD(a.Cb, 26)), a))); + } + } + } + } + return a.c; + } + function f7b(a, b) { + var c, d, e, f, g, h, i, j, k, l; + Odd(b, "Hypernodes processing", 1); + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + for (h = new olb(d.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (Ccb(DD(vNb(g, (Nyc(), exc)))) && g.j.c.length <= 2) { + l = 0; + k = 0; + c = 0; + f = 0; + for (j = new olb(g.j); j.a < j.c.c.length; ) { + i = BD(mlb(j), 11); + switch (i.j.g) { + case 1: + ++l; + break; + case 2: + ++k; + break; + case 3: + ++c; + break; + case 4: + ++f; + } + } + l == 0 && c == 0 && e7b(a, g, f <= k); + } + } + } + Qdd(b); + } + function i7b(a, b) { + var c, d, e, f, g, h, i, j, k; + Odd(b, "Layer constraint edge reversal", 1); + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + k = -1; + c = new Rkb(); + j = l_b(f.a); + for (e = 0; e < j.length; e++) { + d = BD(vNb(j[e], (wtc(), Osc)), 303); + if (k == -1) { + d != (esc(), dsc) && (k = e); + } else { + if (d == (esc(), dsc)) { + $_b(j[e], null); + Z_b(j[e], k++, f); + } + } + d == (esc(), bsc) && Ekb(c, j[e]); + } + for (i = new olb(c); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + $_b(h, null); + $_b(h, f); + } + } + Qdd(b); + } + function W6b(a, b, c) { + var d, e, f, g, h, i, j, k, l; + Odd(c, "Hyperedge merging", 1); + U6b(a, b); + i = new Bib(b.b, 0); + while (i.b < i.d.gc()) { + h = (sCb(i.b < i.d.gc()), BD(i.d.Xb(i.c = i.b++), 29)); + k = h.a; + if (k.c.length == 0) { + continue; + } + d = null; + e = null; + f = null; + g = null; + for (j = 0; j < k.c.length; j++) { + d = (tCb(j, k.c.length), BD(k.c[j], 10)); + e = d.k; + if (e == (j0b(), g0b) && g == g0b) { + l = S6b(d, f); + if (l.a) { + V6b(d, f, l.b, l.c); + tCb(j, k.c.length); + cCb(k.c, j, 1); + --j; + d = f; + e = g; + } + } + f = d; + g = e; + } + } + Qdd(c); + } + function WFc(a, b) { + var c, d, e; + d = Cub(a.d, 1) != 0; + !Ccb(DD(vNb(b.j, (wtc(), Jsc)))) && !Ccb(DD(vNb(b.j, mtc))) || PD(vNb(b.j, (Nyc(), ywc))) === PD((tAc(), rAc)) ? b.c.Tf(b.e, d) : d = Ccb(DD(vNb(b.j, Jsc))); + dGc(a, b, d, true); + Ccb(DD(vNb(b.j, mtc))) && yNb(b.j, mtc, (Bcb(), false)); + if (Ccb(DD(vNb(b.j, Jsc)))) { + yNb(b.j, Jsc, (Bcb(), false)); + yNb(b.j, mtc, true); + } + c = OFc(a, b); + do { + $Fc(a); + if (c == 0) { + return 0; + } + d = !d; + e = c; + dGc(a, b, d, false); + c = OFc(a, b); + } while (e > c); + return e; + } + function XFc(a, b) { + var c, d, e; + d = Cub(a.d, 1) != 0; + !Ccb(DD(vNb(b.j, (wtc(), Jsc)))) && !Ccb(DD(vNb(b.j, mtc))) || PD(vNb(b.j, (Nyc(), ywc))) === PD((tAc(), rAc)) ? b.c.Tf(b.e, d) : d = Ccb(DD(vNb(b.j, Jsc))); + dGc(a, b, d, true); + Ccb(DD(vNb(b.j, mtc))) && yNb(b.j, mtc, (Bcb(), false)); + if (Ccb(DD(vNb(b.j, Jsc)))) { + yNb(b.j, Jsc, (Bcb(), false)); + yNb(b.j, mtc, true); + } + c = NFc(a, b); + do { + $Fc(a); + if (c == 0) { + return 0; + } + d = !d; + e = c; + dGc(a, b, d, false); + c = NFc(a, b); + } while (e > c); + return e; + } + function uNd(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2; + if (b == c) { + return true; + } else { + b = vNd(a, b); + c = vNd(a, c); + d = JQd(b); + if (d) { + k = JQd(c); + if (k != d) { + if (!k) { + return false; + } else { + i = d.Dj(); + o2 = k.Dj(); + return i == o2 && i != null; + } + } else { + g = (!b.d && (b.d = new xMd(j5, b, 1)), b.d); + f = g.i; + m = (!c.d && (c.d = new xMd(j5, c, 1)), c.d); + if (f == m.i) { + for (j = 0; j < f; ++j) { + e = BD(qud(g, j), 87); + l = BD(qud(m, j), 87); + if (!uNd(a, e, l)) { + return false; + } + } + } + return true; + } + } else { + h = b.e; + n = c.e; + return h == n; + } + } + } + function X2d(a, b, c, d) { + var e, f, g, h, i, j, k, l; + if (T6d(a.e, b)) { + l = S6d(a.e.Tg(), b); + f = BD(a.g, 119); + k = null; + i = -1; + h = -1; + e = 0; + for (j = 0; j < a.i; ++j) { + g = f[j]; + if (l.rl(g.ak())) { + e == c && (i = j); + if (e == d) { + h = j; + k = g.dd(); + } + ++e; + } + } + if (i == -1) { + throw vbb(new qcb(lue + c + mue + e)); + } + if (h == -1) { + throw vbb(new qcb(nue + d + mue + e)); + } + Wxd(a, i, h); + oid(a.e) && GLd(a, H2d(a, 7, b, meb(d), k, c, true)); + return k; + } else { + throw vbb(new Wdb("The feature must be many-valued to support move")); + } + } + function b_b(a, b, c, d) { + var e, f, g, h, i; + i = new g7c(b.n); + i.a += b.o.a / 2; + i.b += b.o.b / 2; + h = Edb(ED(vNb(b, (Nyc(), Uxc)))); + f = a.f; + g = a.d; + e = a.c; + switch (BD(vNb(b, (wtc(), Hsc)), 61).g) { + case 1: + i.a += g.b + e.a - c / 2; + i.b = -d - h; + b.n.b = -(g.d + h + e.b); + break; + case 2: + i.a = f.a + g.b + g.c + h; + i.b += g.d + e.b - d / 2; + b.n.a = f.a + g.c + h - e.a; + break; + case 3: + i.a += g.b + e.a - c / 2; + i.b = f.b + g.d + g.a + h; + b.n.b = f.b + g.a + h - e.b; + break; + case 4: + i.a = -c - h; + i.b += g.d + e.b - d / 2; + b.n.a = -(g.b + h + e.a); + } + return i; + } + function P1b(a) { + var b, c, d, e, f, g; + d = new XZb(); + tNb(d, a); + PD(vNb(d, (Nyc(), Lwc))) === PD((ead(), cad)) && yNb(d, Lwc, a_b(d)); + if (vNb(d, (g6c(), f6c)) == null) { + g = BD(m6d(a), 160); + yNb(d, f6c, RD(g.We(f6c))); + } + yNb(d, (wtc(), $sc), a); + yNb(d, Ksc, (b = BD(gdb(PW), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0))); + e = OGb((!Xod(a) ? null : (Pgd(), new bhd(Xod(a))), Pgd(), new hhd(!Xod(a) ? null : new bhd(Xod(a)), a)), bad); + f = BD(vNb(d, Kxc), 116); + c = d.d; + t_b(c, f); + t_b(c, e); + return d; + } + function ybc(a, b, c) { + var d, e; + d = b.c.i; + e = c.d.i; + if (d.k == (j0b(), g0b)) { + yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)); + yNb(a, Wsc, BD(vNb(d, Wsc), 11)); + yNb(a, Usc, DD(vNb(d, Usc))); + } else if (d.k == f0b) { + yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)); + yNb(a, Wsc, BD(vNb(d, Wsc), 11)); + yNb(a, Usc, (Bcb(), true)); + } else if (e.k == f0b) { + yNb(a, (wtc(), Vsc), BD(vNb(e, Vsc), 11)); + yNb(a, Wsc, BD(vNb(e, Wsc), 11)); + yNb(a, Usc, (Bcb(), true)); + } else { + yNb(a, (wtc(), Vsc), b.c); + yNb(a, Wsc, c.d); + } + } + function FGb(a) { + var b, c, d, e, f, g, h; + a.o = new jkb(); + d = new Psb(); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 121); + LFb(f).c.length == 1 && (Gsb(d, f, d.c.b, d.c), true); + } + while (d.b != 0) { + f = BD(d.b == 0 ? null : (sCb(d.b != 0), Nsb(d, d.a.a)), 121); + if (LFb(f).c.length == 0) { + continue; + } + b = BD(Ikb(LFb(f), 0), 213); + c = f.g.a.c.length > 0; + h = xFb(b, f); + c ? OFb(h.b, b) : OFb(h.g, b); + LFb(h).c.length == 1 && (Gsb(d, h, d.c.b, d.c), true); + e = new vgd(f, b); + Wjb(a.o, e); + Lkb(a.e.a, f); + } + } + function _Nb(a, b) { + var c, d, e, f, g, h, i; + d = $wnd.Math.abs(D6c(a.b).a - D6c(b.b).a); + h = $wnd.Math.abs(D6c(a.b).b - D6c(b.b).b); + e = 0; + i = 0; + c = 1; + g = 1; + if (d > a.b.b / 2 + b.b.b / 2) { + e = $wnd.Math.min($wnd.Math.abs(a.b.c - (b.b.c + b.b.b)), $wnd.Math.abs(a.b.c + a.b.b - b.b.c)); + c = 1 - e / d; + } + if (h > a.b.a / 2 + b.b.a / 2) { + i = $wnd.Math.min($wnd.Math.abs(a.b.d - (b.b.d + b.b.a)), $wnd.Math.abs(a.b.d + a.b.a - b.b.d)); + g = 1 - i / h; + } + f = $wnd.Math.min(c, g); + return (1 - f) * $wnd.Math.sqrt(d * d + h * h); + } + function lQc(a) { + var b, c, d, e; + nQc(a, a.e, a.f, (FQc(), DQc), true, a.c, a.i); + nQc(a, a.e, a.f, DQc, false, a.c, a.i); + nQc(a, a.e, a.f, EQc, true, a.c, a.i); + nQc(a, a.e, a.f, EQc, false, a.c, a.i); + mQc(a, a.c, a.e, a.f, a.i); + d = new Bib(a.i, 0); + while (d.b < d.d.gc()) { + b = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 128)); + e = new Bib(a.i, d.b); + while (e.b < e.d.gc()) { + c = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 128)); + kQc(b, c); + } + } + wQc(a.i, BD(vNb(a.d, (wtc(), jtc)), 230)); + zQc(a.i); + } + function fKd(a, b) { + var c, d; + if (b != null) { + d = dKd(a); + if (d) { + if ((d.i & 1) != 0) { + if (d == sbb) { + return KD(b); + } else if (d == WD) { + return JD(b, 19); + } else if (d == VD) { + return JD(b, 155); + } else if (d == SD) { + return JD(b, 217); + } else if (d == TD) { + return JD(b, 172); + } else if (d == UD) { + return LD(b); + } else if (d == rbb) { + return JD(b, 184); + } else if (d == XD) { + return JD(b, 162); + } + } else { + return pEd(), c = BD(Ohb(oEd, d), 55), !c || c.wj(b); + } + } else if (JD(b, 56)) { + return a.uk(BD(b, 56)); + } + } + return false; + } + function ade() { + ade = ccb; + var a, b, c, d, e, f, g, h, i; + $ce = KC(SD, wte, 25, 255, 15, 1); + _ce = KC(TD, $ie, 25, 64, 15, 1); + for (b = 0; b < 255; b++) { + $ce[b] = -1; + } + for (c = 90; c >= 65; c--) { + $ce[c] = c - 65 << 24 >> 24; + } + for (d = 122; d >= 97; d--) { + $ce[d] = d - 97 + 26 << 24 >> 24; + } + for (e = 57; e >= 48; e--) { + $ce[e] = e - 48 + 52 << 24 >> 24; + } + $ce[43] = 62; + $ce[47] = 63; + for (f = 0; f <= 25; f++) + _ce[f] = 65 + f & aje; + for (g = 26, i = 0; g <= 51; ++g, i++) + _ce[g] = 97 + i & aje; + for (a = 52, h = 0; a <= 61; ++a, h++) + _ce[a] = 48 + h & aje; + _ce[62] = 43; + _ce[63] = 47; + } + function FXb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + if (a.dc()) { + return new d7c(); + } + j = 0; + l = 0; + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + f = d.f; + j = $wnd.Math.max(j, f.a); + l += f.a * f.b; + } + j = $wnd.Math.max(j, $wnd.Math.sqrt(l) * Edb(ED(vNb(BD(a.Kc().Pb(), 37), (Nyc(), owc))))); + m = 0; + n = 0; + i = 0; + c = b; + for (h = a.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 37); + k = g.f; + if (m + k.a > j) { + m = 0; + n += i + b; + i = 0; + } + uXb(g, m, n); + c = $wnd.Math.max(c, m + k.a); + i = $wnd.Math.max(i, k.b); + m += k.a + b; + } + return new f7c(c + b, n + i + b); + } + function mQc(a, b, c, d, e) { + var f, g, h, i, j, k, l; + for (g = new olb(b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 17); + i = f.c; + if (c.a._b(i)) { + j = (FQc(), DQc); + } else if (d.a._b(i)) { + j = (FQc(), EQc); + } else { + throw vbb(new Wdb("Source port must be in one of the port sets.")); + } + k = f.d; + if (c.a._b(k)) { + l = (FQc(), DQc); + } else if (d.a._b(k)) { + l = (FQc(), EQc); + } else { + throw vbb(new Wdb("Target port must be in one of the port sets.")); + } + h = new YQc(f, j, l); + Rhb(a.b, f, h); + e.c[e.c.length] = h; + } + } + function lfd(a, b) { + var c, d, e, f, g, h, i; + if (!mpd(a)) { + throw vbb(new Zdb(Sse)); + } + d = mpd(a); + f = d.g; + e = d.f; + if (f <= 0 && e <= 0) { + return Ucd(), Scd; + } + h = a.i; + i = a.j; + switch (b.g) { + case 2: + case 1: + if (h < 0) { + return Ucd(), Tcd; + } else if (h + a.g > f) { + return Ucd(), zcd; + } + break; + case 4: + case 3: + if (i < 0) { + return Ucd(), Acd; + } else if (i + a.f > e) { + return Ucd(), Rcd; + } + } + g = (h + a.g / 2) / f; + c = (i + a.f / 2) / e; + return g + c <= 1 && g - c <= 0 ? (Ucd(), Tcd) : g + c >= 1 && g - c >= 0 ? (Ucd(), zcd) : c < 0.5 ? (Ucd(), Acd) : (Ucd(), Rcd); + } + function vhb(a, b, c, d, e) { + var f, g; + f = wbb(xbb(b[0], Yje), xbb(d[0], Yje)); + a[0] = Tbb(f); + f = Obb(f, 32); + if (c >= e) { + for (g = 1; g < e; g++) { + f = wbb(f, wbb(xbb(b[g], Yje), xbb(d[g], Yje))); + a[g] = Tbb(f); + f = Obb(f, 32); + } + for (; g < c; g++) { + f = wbb(f, xbb(b[g], Yje)); + a[g] = Tbb(f); + f = Obb(f, 32); + } + } else { + for (g = 1; g < c; g++) { + f = wbb(f, wbb(xbb(b[g], Yje), xbb(d[g], Yje))); + a[g] = Tbb(f); + f = Obb(f, 32); + } + for (; g < e; g++) { + f = wbb(f, xbb(d[g], Yje)); + a[g] = Tbb(f); + f = Obb(f, 32); + } + } + ybb(f, 0) != 0 && (a[g] = Tbb(f)); + } + function _fe(a) { + wfe(); + var b, c, d, e, f, g; + if (a.e != 4 && a.e != 5) + throw vbb(new Wdb("Token#complementRanges(): must be RANGE: " + a.e)); + f = a; + Yfe(f); + Vfe(f); + d = f.b.length + 2; + f.b[0] == 0 && (d -= 2); + c = f.b[f.b.length - 1]; + c == lxe && (d -= 2); + e = new $fe(4); + e.b = KC(WD, oje, 25, d, 15, 1); + g = 0; + if (f.b[0] > 0) { + e.b[g++] = 0; + e.b[g++] = f.b[0] - 1; + } + for (b = 1; b < f.b.length - 2; b += 2) { + e.b[g++] = f.b[b] + 1; + e.b[g++] = f.b[b + 1] - 1; + } + if (c != lxe) { + e.b[g++] = c + 1; + e.b[g] = lxe; + } + e.a = true; + return e; + } + function Pxd(a, b, c) { + var d, e, f, g, h, i, j, k; + d = c.gc(); + if (d == 0) { + return false; + } else { + if (a.ej()) { + j = a.fj(); + iud(a, b, c); + g = d == 1 ? a.Zi(3, null, c.Kc().Pb(), b, j) : a.Zi(5, null, c, b, j); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f = b + d; + for (e = b; e < f; ++e) { + k = a.g[e]; + h = a.cj(k, h); + h = a.jj(k, h); + } + if (!h) { + a.$i(g); + } else { + h.Ei(g); + h.Fi(); + } + } else { + a.$i(g); + } + } else { + iud(a, b, c); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f = b + d; + for (e = b; e < f; ++e) { + i = a.g[e]; + h = a.cj(i, h); + } + !!h && h.Fi(); + } + } + return true; + } + } + function YNc(a, b, c, d) { + var e, f, g, h, i; + for (g = new olb(a.k); g.a < g.c.c.length; ) { + e = BD(mlb(g), 129); + if (!d || e.c == (HOc(), FOc)) { + i = e.b; + if (i.g < 0 && e.d > 0) { + pOc(i, i.d - e.d); + e.c == (HOc(), FOc) && nOc(i, i.a - e.d); + i.d <= 0 && i.i > 0 && (Gsb(b, i, b.c.b, b.c), true); + } + } + } + for (f = new olb(a.f); f.a < f.c.c.length; ) { + e = BD(mlb(f), 129); + if (!d || e.c == (HOc(), FOc)) { + h = e.a; + if (h.g < 0 && e.d > 0) { + qOc(h, h.i - e.d); + e.c == (HOc(), FOc) && oOc(h, h.b - e.d); + h.i <= 0 && h.d > 0 && (Gsb(c, h, c.c.b, c.c), true); + } + } + } + } + function gSc(a, b, c) { + var d, e, f, g, h, i, j, k; + Odd(c, "Processor compute fanout", 1); + Uhb(a.b); + Uhb(a.a); + h = null; + f = Jsb(b.b, 0); + while (!h && f.b != f.d.c) { + j = BD(Xsb(f), 86); + Ccb(DD(vNb(j, (mTc(), jTc)))) && (h = j); + } + i = new Psb(); + Gsb(i, h, i.c.b, i.c); + fSc(a, i); + for (k = Jsb(b.b, 0); k.b != k.d.c; ) { + j = BD(Xsb(k), 86); + g = GD(vNb(j, (mTc(), $Sc))); + e = Phb(a.b, g) != null ? BD(Phb(a.b, g), 19).a : 0; + yNb(j, ZSc, meb(e)); + d = 1 + (Phb(a.a, g) != null ? BD(Phb(a.a, g), 19).a : 0); + yNb(j, XSc, meb(d)); + } + Qdd(c); + } + function WPc(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2; + m = VPc(a, c); + for (i = 0; i < b; i++) { + Aib(e, c); + n = new Rkb(); + o2 = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 407)); + for (k = m + i; k < a.b; k++) { + h = o2; + o2 = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 407)); + Ekb(n, new aQc(h, o2, c)); + } + for (l = m + i; l < a.b; l++) { + sCb(d.b > 0); + d.a.Xb(d.c = --d.b); + l > m + i && uib(d); + } + for (g = new olb(n); g.a < g.c.c.length; ) { + f = BD(mlb(g), 407); + Aib(d, f); + } + if (i < b - 1) { + for (j = m + i; j < a.b; j++) { + sCb(d.b > 0); + d.a.Xb(d.c = --d.b); + } + } + } + } + function Jfe() { + wfe(); + var a, b, c, d, e, f; + if (gfe) + return gfe; + a = new $fe(4); + Xfe(a, Kfe(vxe, true)); + Zfe(a, Kfe("M", true)); + Zfe(a, Kfe("C", true)); + f = new $fe(4); + for (d = 0; d < 11; d++) { + Ufe(f, d, d); + } + b = new $fe(4); + Xfe(b, Kfe("M", true)); + Ufe(b, 4448, 4607); + Ufe(b, 65438, 65439); + e = new Lge(2); + Kge(e, a); + Kge(e, ffe); + c = new Lge(2); + c.$l(Bfe(f, Kfe("L", true))); + c.$l(b); + c = new lge(3, c); + c = new rge(e, c); + gfe = c; + return gfe; + } + function S3c(a) { + var b, c; + b = GD(hkd(a, (Y9c(), o8c))); + if (T3c(b, a)) { + return; + } + if (!ikd(a, F9c) && ((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a).i != 0 || Ccb(DD(hkd(a, M8c))))) { + if (b == null || ufb(b).length == 0) { + if (!T3c(sne, a)) { + c = Qfb(Qfb(new Wfb("Unable to load default layout algorithm "), sne), " for unconfigured node "); + yfd(a, c); + throw vbb(new y2c(c.a)); + } + } else { + c = Qfb(Qfb(new Wfb("Layout algorithm '"), b), "' not found for "); + yfd(a, c); + throw vbb(new y2c(c.a)); + } + } + } + function hIb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n; + c = a.i; + b = a.n; + if (a.b == 0) { + n = c.c + b.b; + m = c.b - b.b - b.c; + for (g = a.a, i = 0, k = g.length; i < k; ++i) { + e = g[i]; + mHb(e, n, m); + } + } else { + d = kIb(a, false); + mHb(a.a[0], c.c + b.b, d[0]); + mHb(a.a[2], c.c + c.b - b.c - d[2], d[2]); + l = c.b - b.b - b.c; + if (d[0] > 0) { + l -= d[0] + a.c; + d[0] += a.c; + } + d[2] > 0 && (l -= d[2] + a.c); + d[1] = $wnd.Math.max(d[1], l); + mHb(a.a[1], c.c + b.b + d[0] - (d[1] - l) / 2, d[1]); + } + for (f = a.a, h = 0, j = f.length; h < j; ++h) { + e = f[h]; + JD(e, 326) && BD(e, 326).Te(); + } + } + function KMc(a) { + var b, c, d, e, f, g, h, i, j, k, l; + l = new JMc(); + l.d = 0; + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + l.d += f.a.c.length; + } + d = 0; + e = 0; + l.a = KC(WD, oje, 25, a.b.c.length, 15, 1); + j = 0; + k = 0; + l.e = KC(WD, oje, 25, l.d, 15, 1); + for (c = new olb(a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 29); + b.p = d++; + l.a[b.p] = e++; + k = 0; + for (i = new olb(b.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + h.p = j++; + l.e[h.p] = k++; + } + } + l.c = new OMc(l); + l.b = Pu(l.d); + LMc(l, a); + l.f = Pu(l.d); + MMc(l, a); + return l; + } + function GZc(a, b) { + var c, d, e, f; + f = BD(Ikb(a.n, a.n.c.length - 1), 211).d; + a.p = $wnd.Math.min(a.p, b.g); + a.r = $wnd.Math.max(a.r, f); + a.g = $wnd.Math.max(a.g, b.g + (a.b.c.length == 1 ? 0 : a.i)); + a.o = $wnd.Math.min(a.o, b.f); + a.e += b.f + (a.b.c.length == 1 ? 0 : a.i); + a.f = $wnd.Math.max(a.f, b.f); + e = a.n.c.length > 0 ? (a.n.c.length - 1) * a.i : 0; + for (d = new olb(a.n); d.a < d.c.c.length; ) { + c = BD(mlb(d), 211); + e += c.a; + } + a.d = e; + a.a = a.e / a.b.c.length - a.i * ((a.b.c.length - 1) / a.b.c.length); + u$c(a.j); + } + function LQb(a, b) { + var c, d, e, f, g, h, i, j, k, l; + k = DD(vNb(b, (wSb(), sSb))); + if (k == null || (uCb(k), k)) { + l = KC(sbb, dle, 25, b.e.c.length, 16, 1); + g = HQb(b); + e = new Psb(); + for (j = new olb(b.e); j.a < j.c.c.length; ) { + h = BD(mlb(j), 144); + c = IQb(a, h, null, null, l, g); + if (c) { + tNb(c, b); + Gsb(e, c, e.c.b, e.c); + } + } + if (e.b > 1) { + for (d = Jsb(e, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 231); + f = 0; + for (i = new olb(c.e); i.a < i.c.c.length; ) { + h = BD(mlb(i), 144); + h.b = f++; + } + } + } + return e; + } + return Ou(OC(GC($O, 1), fme, 231, 0, [b])); + } + function TKd(a) { + var b, c, d, e, f, g, h; + if (!a.g) { + h = new zNd(); + b = KKd; + g = b.a.zc(a, b); + if (g == null) { + for (d = new Fyd(_Kd(a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 26); + ytd(h, TKd(c)); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + e = h.i; + for (f = (!a.s && (a.s = new cUd(t5, a, 21, 17)), new Fyd(a.s)); f.e != f.i.gc(); ++e) { + bJd(BD(Dyd(f), 449), e); + } + ytd(h, (!a.s && (a.s = new cUd(t5, a, 21, 17)), a.s)); + vud(h); + a.g = new rNd(a, h); + a.i = BD(h.g, 247); + a.i == null && (a.i = MKd); + a.p = null; + $Kd(a).b &= -5; + } + return a.g; + } + function iIb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2; + d = a.i; + c = a.n; + if (a.b == 0) { + b = jIb(a, false); + nHb(a.a[0], d.d + c.d, b[0]); + nHb(a.a[2], d.d + d.a - c.a - b[2], b[2]); + m = d.a - c.d - c.a; + l = m; + if (b[0] > 0) { + b[0] += a.c; + l -= b[0]; + } + b[2] > 0 && (l -= b[2] + a.c); + b[1] = $wnd.Math.max(b[1], l); + nHb(a.a[1], d.d + c.d + b[0] - (b[1] - l) / 2, b[1]); + } else { + o2 = d.d + c.d; + n = d.a - c.d - c.a; + for (g = a.a, i = 0, k = g.length; i < k; ++i) { + e = g[i]; + nHb(e, o2, n); + } + } + for (f = a.a, h = 0, j = f.length; h < j; ++h) { + e = f[h]; + JD(e, 326) && BD(e, 326).Ue(); + } + } + function boc(a) { + var b, c, d, e, f, g, h, i, j, k; + k = KC(WD, oje, 25, a.b.c.length + 1, 15, 1); + j = new Tqb(); + d = 0; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + k[d++] = j.a.gc(); + for (i = new olb(e.a); i.a < i.c.c.length; ) { + g = BD(mlb(i), 10); + for (c = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + j.a.zc(b, j); + } + } + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + for (c = new Sr(ur(R_b(g).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + j.a.Bc(b) != null; + } + } + } + return k; + } + function F2d(a, b, c, d) { + var e, f, g, h, i; + i = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (i.rl(f.ak()) && pb(f, c)) { + return true; + } + } + } else if (c != null) { + for (h = 0; h < a.i; ++h) { + f = e[h]; + if (i.rl(f.ak()) && pb(c, f.dd())) { + return true; + } + } + if (d) { + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (i.rl(f.ak()) && PD(c) === PD(a3d(a, BD(f.dd(), 56)))) { + return true; + } + } + } + } else { + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (i.rl(f.ak()) && f.dd() == null) { + return false; + } + } + } + return false; + } + function e3d(a, b, c, d) { + var e, f, g, h, i, j; + j = S6d(a.e.Tg(), b); + g = BD(a.g, 119); + if (T6d(a.e, b)) { + if (b.hi()) { + f = M2d(a, b, d, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + if (f >= 0 && f != c) { + throw vbb(new Wdb(kue)); + } + } + e = 0; + for (i = 0; i < a.i; ++i) { + h = g[i]; + if (j.rl(h.ak())) { + if (e == c) { + return BD(Gtd(a, i, (Q6d(), BD(b, 66).Oj() ? BD(d, 72) : R6d(b, d))), 72); + } + ++e; + } + } + throw vbb(new qcb(gve + c + mue + e)); + } else { + for (i = 0; i < a.i; ++i) { + h = g[i]; + if (j.rl(h.ak())) { + return Q6d(), BD(b, 66).Oj() ? h : h.dd(); + } + } + return null; + } + } + function ONb(a, b, c, d) { + var e, f, g, h; + h = c; + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 221); + e = BD(f.b, 65); + if (Jy(a.b.c, e.b.c + e.b.b) <= 0 && Jy(e.b.c, a.b.c + a.b.b) <= 0 && Jy(a.b.d, e.b.d + e.b.a) <= 0 && Jy(e.b.d, a.b.d + a.b.a) <= 0) { + if (Jy(e.b.c, a.b.c + a.b.b) == 0 && d.a < 0 || Jy(e.b.c + e.b.b, a.b.c) == 0 && d.a > 0 || Jy(e.b.d, a.b.d + a.b.a) == 0 && d.b < 0 || Jy(e.b.d + e.b.a, a.b.d) == 0 && d.b > 0) { + h = 0; + break; + } + } else { + h = $wnd.Math.min(h, YNb(a, e, d)); + } + h = $wnd.Math.min(h, ONb(a, f, h, d)); + } + return h; + } + function ifd(a, b) { + var c, d, e, f, g, h, i; + if (a.b < 2) { + throw vbb(new Wdb("The vector chain must contain at least a source and a target point.")); + } + e = (sCb(a.b != 0), BD(a.a.a.c, 8)); + nmd(b, e.a, e.b); + i = new Oyd((!b.a && (b.a = new xMd(y2, b, 5)), b.a)); + g = Jsb(a, 1); + while (g.a < a.b - 1) { + h = BD(Xsb(g), 8); + if (i.e != i.i.gc()) { + c = BD(Dyd(i), 469); + } else { + c = (Fhd(), d = new xkd(), d); + Myd(i, c); + } + ukd(c, h.a, h.b); + } + while (i.e != i.i.gc()) { + Dyd(i); + Eyd(i); + } + f = (sCb(a.b != 0), BD(a.c.b.c, 8)); + gmd(b, f.a, f.b); + } + function $lc(a, b) { + var c, d, e, f, g, h, i, j, k; + c = 0; + for (e = new olb((tCb(0, a.c.length), BD(a.c[0], 101)).g.b.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + d.p = c++; + } + b == (Ucd(), Acd) ? Okb(a, new gmc()) : Okb(a, new kmc()); + h = 0; + k = a.c.length - 1; + while (h < k) { + g = (tCb(h, a.c.length), BD(a.c[h], 101)); + j = (tCb(k, a.c.length), BD(a.c[k], 101)); + f = b == Acd ? g.c : g.a; + i = b == Acd ? j.a : j.c; + amc(g, b, (Ajc(), yjc), f); + amc(j, b, xjc, i); + ++h; + --k; + } + h == k && amc((tCb(h, a.c.length), BD(a.c[h], 101)), b, (Ajc(), wjc), null); + } + function UVc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + l = a.a.i + a.a.g / 2; + m = a.a.i + a.a.g / 2; + o2 = b.i + b.g / 2; + q = b.j + b.f / 2; + h = new f7c(o2, q); + j = BD(hkd(b, (Y9c(), C9c)), 8); + j.a = j.a + l; + j.b = j.b + m; + f = (h.b - j.b) / (h.a - j.a); + d = h.b - f * h.a; + p = c.i + c.g / 2; + r = c.j + c.f / 2; + i = new f7c(p, r); + k = BD(hkd(c, C9c), 8); + k.a = k.a + l; + k.b = k.b + m; + g = (i.b - k.b) / (i.a - k.a); + e = i.b - g * i.a; + n = (d - e) / (g - f); + if (j.a < n && h.a < n || n < j.a && n < h.a) { + return false; + } else if (k.a < n && i.a < n || n < k.a && n < i.a) { + return false; + } + return true; + } + function gqd(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + m = BD(Ohb(a.c, b), 183); + if (!m) { + throw vbb(new cqd("Edge did not exist in input.")); + } + j = Wpd(m); + f = Fhe((!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a)); + h = !f; + if (h) { + n = new wB(); + c = new Rrd(a, j, n); + Dhe((!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a), c); + cC(m, Nte, n); + } + e = ikd(b, (Y9c(), Q8c)); + if (e) { + k = BD(hkd(b, Q8c), 74); + g = !k || Ehe(k); + i = !g; + if (i) { + l = new wB(); + d = new Zrd(l); + reb(k, d); + cC(m, "junctionPoints", l); + } + } + Upd(m, "container", Mld(b).k); + return null; + } + function eDb(a, b, c) { + var d, e, f, g, h, i, j, k; + this.a = a; + this.b = b; + this.c = c; + this.e = Ou(OC(GC(GM, 1), Uhe, 168, 0, [new aDb(a, b), new aDb(b, c), new aDb(c, a)])); + this.f = Ou(OC(GC(m1, 1), nie, 8, 0, [a, b, c])); + this.d = (d = c7c(R6c(this.b), this.a), e = c7c(R6c(this.c), this.a), f = c7c(R6c(this.c), this.b), g = d.a * (this.a.a + this.b.a) + d.b * (this.a.b + this.b.b), h = e.a * (this.a.a + this.c.a) + e.b * (this.a.b + this.c.b), i = 2 * (d.a * f.b - d.b * f.a), j = (e.b * g - d.b * h) / i, k = (d.a * h - e.a * g) / i, new f7c(j, k)); + } + function nvd(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2; + m = new yC(a.p); + cC(b, fue, m); + if (c && !(!a.f ? null : vmb(a.f)).a.dc()) { + k = new wB(); + cC(b, "logs", k); + h = 0; + for (o2 = new Dnb((!a.f ? null : vmb(a.f)).b.Kc()); o2.b.Ob(); ) { + n = GD(o2.b.Pb()); + l = new yC(n); + tB(k, h); + vB(k, h, l); + ++h; + } + } + if (d) { + j = new TB(a.q); + cC(b, "executionTime", j); + } + if (!vmb(a.a).a.dc()) { + g = new wB(); + cC(b, Jte, g); + h = 0; + for (f = new Dnb(vmb(a.a).b.Kc()); f.b.Ob(); ) { + e = BD(f.b.Pb(), 1949); + i = new eC(); + tB(g, h); + vB(g, h, i); + nvd(e, i, c, d); + ++h; + } + } + } + function PZb(a, b) { + var c, d, e, f, g, h; + f = a.c; + g = a.d; + QZb(a, null); + RZb(a, null); + b && Ccb(DD(vNb(g, (wtc(), Msc)))) ? QZb(a, i_b(g.i, (KAc(), IAc), (Ucd(), zcd))) : QZb(a, g); + b && Ccb(DD(vNb(f, (wtc(), etc)))) ? RZb(a, i_b(f.i, (KAc(), HAc), (Ucd(), Tcd))) : RZb(a, f); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 70); + e = BD(vNb(c, (Nyc(), Qwc)), 272); + e == (qad(), pad) ? yNb(c, Qwc, oad) : e == oad && yNb(c, Qwc, pad); + } + h = Ccb(DD(vNb(a, (wtc(), ltc)))); + yNb(a, ltc, (Bcb(), h ? false : true)); + a.a = w7c(a.a); + } + function VQb(a, b, c) { + var d, e, f, g, h, i; + d = 0; + for (f = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); f.e != f.i.gc(); ) { + e = BD(Dyd(f), 33); + g = ""; + (!e.n && (e.n = new cUd(D2, e, 1, 7)), e.n).i == 0 || (g = BD(qud((!e.n && (e.n = new cUd(D2, e, 1, 7)), e.n), 0), 137).a); + h = new pRb(g); + tNb(h, e); + yNb(h, (HSb(), FSb), e); + h.b = d++; + h.d.a = e.i + e.g / 2; + h.d.b = e.j + e.f / 2; + h.e.a = $wnd.Math.max(e.g, 1); + h.e.b = $wnd.Math.max(e.f, 1); + Ekb(b.e, h); + jrb(c.f, e, h); + i = BD(hkd(e, (wSb(), mSb)), 98); + i == (dcd(), ccd) && (i = bcd); + } + } + function XJc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + c = nGb(new pGb(), a.f); + j = a.i[b.c.i.p]; + n = a.i[b.d.i.p]; + i = b.c; + m = b.d; + h = i.a.b; + l = m.a.b; + j.b || (h += i.n.b); + n.b || (l += m.n.b); + k = QD($wnd.Math.max(0, h - l)); + g = QD($wnd.Math.max(0, l - h)); + o2 = (p = $wnd.Math.max(1, BD(vNb(b, (Nyc(), eyc)), 19).a), q = JJc(b.c.i.k, b.d.i.k), p * q); + e = AFb(DFb(CFb(BFb(EFb(new FFb(), o2), g), c), BD(Ohb(a.k, b.c), 121))); + f = AFb(DFb(CFb(BFb(EFb(new FFb(), o2), k), c), BD(Ohb(a.k, b.d), 121))); + d = new qKc(e, f); + a.c[b.p] = d; + } + function NEc(a, b, c, d) { + var e, f, g, h, i, j; + g = new _Ec(a, b, c); + i = new Bib(d, 0); + e = false; + while (i.b < i.d.gc()) { + h = (sCb(i.b < i.d.gc()), BD(i.d.Xb(i.c = i.b++), 233)); + if (h == b || h == c) { + uib(i); + } else if (!e && Edb(REc(h.g, h.d[0]).a) > Edb(REc(g.g, g.d[0]).a)) { + sCb(i.b > 0); + i.a.Xb(i.c = --i.b); + Aib(i, g); + e = true; + } else if (!!h.e && h.e.gc() > 0) { + f = (!h.e && (h.e = new Rkb()), h.e).Mc(b); + j = (!h.e && (h.e = new Rkb()), h.e).Mc(c); + if (f || j) { + (!h.e && (h.e = new Rkb()), h.e).Fc(g); + ++g.c; + } + } + } + e || (d.c[d.c.length] = g, true); + } + function odc(a) { + var b, c, d; + if (fcd(BD(vNb(a, (Nyc(), Vxc)), 98))) { + for (c = new olb(a.j); c.a < c.c.c.length; ) { + b = BD(mlb(c), 11); + b.j == (Ucd(), Scd) && (d = BD(vNb(b, (wtc(), gtc)), 10), d ? G0b(b, BD(vNb(d, Hsc), 61)) : b.e.c.length - b.g.c.length < 0 ? G0b(b, zcd) : G0b(b, Tcd)); + } + } else { + for (c = new olb(a.j); c.a < c.c.c.length; ) { + b = BD(mlb(c), 11); + d = BD(vNb(b, (wtc(), gtc)), 10); + d ? G0b(b, BD(vNb(d, Hsc), 61)) : b.e.c.length - b.g.c.length < 0 ? G0b(b, (Ucd(), zcd)) : G0b(b, (Ucd(), Tcd)); + } + yNb(a, Vxc, (dcd(), acd)); + } + } + function age(a) { + var b, c, d; + switch (a) { + case 91: + case 93: + case 45: + case 94: + case 44: + case 92: + d = "\\" + String.fromCharCode(a & aje); + break; + case 12: + d = "\\f"; + break; + case 10: + d = "\\n"; + break; + case 13: + d = "\\r"; + break; + case 9: + d = "\\t"; + break; + case 27: + d = "\\e"; + break; + default: + if (a < 32) { + c = (b = a >>> 0, "0" + b.toString(16)); + d = "\\x" + qfb(c, c.length - 2, c.length); + } else if (a >= Tje) { + c = (b = a >>> 0, "0" + b.toString(16)); + d = "\\v" + qfb(c, c.length - 6, c.length); + } else + d = "" + String.fromCharCode(a & aje); + } + return d; + } + function yhb(a, b) { + var c, d, e, f, g, h, i, j, k, l; + g = a.e; + i = b.e; + if (i == 0) { + return a; + } + if (g == 0) { + return b.e == 0 ? b : new Vgb(-b.e, b.d, b.a); + } + f = a.d; + h = b.d; + if (f + h == 2) { + c = xbb(a.a[0], Yje); + d = xbb(b.a[0], Yje); + g < 0 && (c = Jbb(c)); + i < 0 && (d = Jbb(d)); + return ghb(Qbb(c, d)); + } + e = f != h ? f > h ? 1 : -1 : whb(a.a, b.a, f); + if (e == -1) { + l = -i; + k = g == i ? zhb(b.a, h, a.a, f) : uhb(b.a, h, a.a, f); + } else { + l = g; + if (g == i) { + if (e == 0) { + return Hgb(), Ggb; + } + k = zhb(a.a, f, b.a, h); + } else { + k = uhb(a.a, f, b.a, h); + } + } + j = new Vgb(l, k.length, k); + Jgb(j); + return j; + } + function YPc(a) { + var b, c, d, e, f, g; + this.e = new Rkb(); + this.a = new Rkb(); + for (c = a.b - 1; c < 3; c++) { + St(a, 0, BD(Ut(a, 0), 8)); + } + if (a.b < 4) { + throw vbb(new Wdb("At (least dimension + 1) control points are necessary!")); + } else { + this.b = 3; + this.d = true; + this.c = false; + TPc(this, a.b + this.b - 1); + g = new Rkb(); + f = new olb(this.e); + for (b = 0; b < this.b - 1; b++) { + Ekb(g, ED(mlb(f))); + } + for (e = Jsb(a, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 8); + Ekb(g, ED(mlb(f))); + Ekb(this.a, new bQc(d, g)); + tCb(0, g.c.length); + g.c.splice(0, 1); + } + } + } + function Bac(a, b) { + var c, d, e, f, g, h, i, j, k; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), f0b)) { + i = (j = BD(Rr(new Sr(ur(R_b(g).a.Kc(), new Sq()))), 17), k = BD(Rr(new Sr(ur(U_b(g).a.Kc(), new Sq()))), 17), !Ccb(DD(vNb(j, (wtc(), ltc)))) || !Ccb(DD(vNb(k, ltc)))) ? b : sbd(b); + zac(g, i); + } + for (d = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + i = Ccb(DD(vNb(c, (wtc(), ltc)))) ? sbd(b) : b; + yac(c, i); + } + } + } + } + function yZc(a, b, c, d, e) { + var f, g, h; + if (c.f >= b.o && c.f <= b.f || b.a * 0.5 <= c.f && b.a * 1.5 >= c.f) { + g = BD(Ikb(b.n, b.n.c.length - 1), 211); + if (g.e + g.d + c.g + e <= d && (f = BD(Ikb(b.n, b.n.c.length - 1), 211), f.f - a.f + c.f <= a.b || a.a.c.length == 1)) { + EZc(b, c); + return true; + } else if (b.s + c.g <= d && (b.t + b.d + c.f + e <= a.b || a.a.c.length == 1)) { + Ekb(b.b, c); + h = BD(Ikb(b.n, b.n.c.length - 1), 211); + Ekb(b.n, new VZc(b.s, h.f + h.a + b.i, b.i)); + QZc(BD(Ikb(b.n, b.n.c.length - 1), 211), c); + GZc(b, c); + return true; + } + } + return false; + } + function Zxd(a, b, c) { + var d, e, f, g; + if (a.ej()) { + e = null; + f = a.fj(); + d = a.Zi(1, g = uud(a, b, c), c, b, f); + if (a.bj() && !(a.ni() && g != null ? pb(g, c) : PD(g) === PD(c))) { + g != null && (e = a.dj(g, e)); + e = a.cj(c, e); + a.ij() && (e = a.lj(g, c, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.ij() && (e = a.lj(g, c, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } + return g; + } else { + g = uud(a, b, c); + if (a.bj() && !(a.ni() && g != null ? pb(g, c) : PD(g) === PD(c))) { + e = null; + g != null && (e = a.dj(g, null)); + e = a.cj(c, e); + !!e && e.Fi(); + } + return g; + } + } + function YA(a, b) { + var c, d, e, f, g, h, i, j; + b %= 24; + if (a.q.getHours() != b) { + d = new $wnd.Date(a.q.getTime()); + d.setDate(d.getDate() + 1); + h = a.q.getTimezoneOffset() - d.getTimezoneOffset(); + if (h > 0) { + i = h / 60 | 0; + j = h % 60; + e = a.q.getDate(); + c = a.q.getHours(); + c + i >= 24 && ++e; + f = new $wnd.Date(a.q.getFullYear(), a.q.getMonth(), e, b + i, a.q.getMinutes() + j, a.q.getSeconds(), a.q.getMilliseconds()); + a.q.setTime(f.getTime()); + } + } + g = a.q.getTime(); + a.q.setTime(g + 36e5); + a.q.getHours() != b && a.q.setTime(g); + } + function opc(a, b) { + var c, d, e, f, g; + Odd(b, "Path-Like Graph Wrapping", 1); + if (a.b.c.length == 0) { + Qdd(b); + return; + } + e = new Xoc(a); + g = (e.i == null && (e.i = Soc(e, new Zoc())), Edb(e.i) * e.f); + c = g / (e.i == null && (e.i = Soc(e, new Zoc())), Edb(e.i)); + if (e.b > c) { + Qdd(b); + return; + } + switch (BD(vNb(a, (Nyc(), Gyc)), 337).g) { + case 2: + f = new hpc(); + break; + case 0: + f = new Ync(); + break; + default: + f = new kpc(); + } + d = f.Vf(a, e); + if (!f.Wf()) { + switch (BD(vNb(a, Myc), 338).g) { + case 2: + d = tpc(e, d); + break; + case 1: + d = rpc(e, d); + } + } + npc(a, e, d); + Qdd(b); + } + function MFc(a, b) { + var c, d, e, f; + Fub(a.d, a.e); + a.c.a.$b(); + if (Edb(ED(vNb(b.j, (Nyc(), uwc)))) != 0 || Edb(ED(vNb(b.j, uwc))) != 0) { + c = dme; + PD(vNb(b.j, ywc)) !== PD((tAc(), rAc)) && yNb(b.j, (wtc(), Jsc), (Bcb(), true)); + f = BD(vNb(b.j, Ayc), 19).a; + for (e = 0; e < f; e++) { + d = WFc(a, b); + if (d < c) { + c = d; + ZFc(a); + if (c == 0) { + break; + } + } + } + } else { + c = Ohe; + PD(vNb(b.j, ywc)) !== PD((tAc(), rAc)) && yNb(b.j, (wtc(), Jsc), (Bcb(), true)); + f = BD(vNb(b.j, Ayc), 19).a; + for (e = 0; e < f; e++) { + d = XFc(a, b); + if (d < c) { + c = d; + ZFc(a); + if (c == 0) { + break; + } + } + } + } + } + function spc(a, b) { + var c, d, e, f, g, h, i, j; + g = new Rkb(); + h = 0; + c = 0; + i = 0; + while (h < b.c.length - 1 && c < a.gc()) { + d = BD(a.Xb(c), 19).a + i; + while ((tCb(h + 1, b.c.length), BD(b.c[h + 1], 19)).a < d) { + ++h; + } + j = 0; + f = d - (tCb(h, b.c.length), BD(b.c[h], 19)).a; + e = (tCb(h + 1, b.c.length), BD(b.c[h + 1], 19)).a - d; + f > e && ++j; + Ekb(g, (tCb(h + j, b.c.length), BD(b.c[h + j], 19))); + i += (tCb(h + j, b.c.length), BD(b.c[h + j], 19)).a - d; + ++c; + while (c < a.gc() && BD(a.Xb(c), 19).a + i <= (tCb(h + j, b.c.length), BD(b.c[h + j], 19)).a) { + ++c; + } + h += 1 + j; + } + return g; + } + function RKd(a) { + var b, c, d, e, f, g, h; + if (!a.d) { + h = new XNd(); + b = KKd; + f = b.a.zc(a, b); + if (f == null) { + for (d = new Fyd(_Kd(a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 26); + ytd(h, RKd(c)); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + g = h.i; + for (e = (!a.q && (a.q = new cUd(n5, a, 11, 10)), new Fyd(a.q)); e.e != e.i.gc(); ++g) { + BD(Dyd(e), 399); + } + ytd(h, (!a.q && (a.q = new cUd(n5, a, 11, 10)), a.q)); + vud(h); + a.d = new nNd((BD(qud(ZKd((NFd(), MFd).o), 9), 18), h.i), h.g); + a.e = BD(h.g, 673); + a.e == null && (a.e = LKd); + $Kd(a).b &= -17; + } + return a.d; + } + function M2d(a, b, c, d) { + var e, f, g, h, i, j; + j = S6d(a.e.Tg(), b); + i = 0; + e = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (j.rl(f.ak())) { + if (pb(f, c)) { + return i; + } + ++i; + } + } + } else if (c != null) { + for (h = 0; h < a.i; ++h) { + f = e[h]; + if (j.rl(f.ak())) { + if (pb(c, f.dd())) { + return i; + } + ++i; + } + } + if (d) { + i = 0; + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (j.rl(f.ak())) { + if (PD(c) === PD(a3d(a, BD(f.dd(), 56)))) { + return i; + } + ++i; + } + } + } + } else { + for (g = 0; g < a.i; ++g) { + f = e[g]; + if (j.rl(f.ak())) { + if (f.dd() == null) { + return i; + } + ++i; + } + } + } + return -1; + } + function aed(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n; + mmb(); + Okb(a, new Jed()); + g = Ru(a); + n = new Rkb(); + m = new Rkb(); + h = null; + i = 0; + while (g.b != 0) { + f = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 157); + if (!h || red(h) * qed(h) / 2 < red(f) * qed(f)) { + h = f; + n.c[n.c.length] = f; + } else { + i += red(f) * qed(f); + m.c[m.c.length] = f; + if (m.c.length > 1 && (i > red(h) * qed(h) / 2 || g.b == 0)) { + l = new wed(m); + k = red(h) / qed(h); + j = fed(l, b, new p0b(), c, d, e, k); + P6c(X6c(l.e), j); + h = l; + n.c[n.c.length] = l; + i = 0; + m.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + } + Gkb(n, m); + return n; + } + function y6d(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p; + if (c.mh(b)) { + k = (n = b, !n ? null : BD(d, 49).xh(n)); + if (k) { + p = c.bh(b, a.a); + o2 = b.t; + if (o2 > 1 || o2 == -1) { + l = BD(p, 69); + m = BD(k, 69); + if (l.dc()) { + m.$b(); + } else { + g = !!zUd(b); + f = 0; + for (h = a.a ? l.Kc() : l.Zh(); h.Ob(); ) { + j = BD(h.Pb(), 56); + e = BD(Wrb(a, j), 56); + if (!e) { + if (a.b && !g) { + m.Xh(f, j); + ++f; + } + } else { + if (g) { + i = m.Xc(e); + i == -1 ? m.Xh(f, e) : f != i && m.ji(f, e); + } else { + m.Xh(f, e); + } + ++f; + } + } + } + } else { + if (p == null) { + k.Wb(null); + } else { + e = Wrb(a, p); + e == null ? a.b && !zUd(b) && k.Wb(p) : k.Wb(e); + } + } + } + } + } + function E6b(a, b) { + var c, d, e, f, g, h, i, j; + c = new L6b(); + for (e = new Sr(ur(R_b(b).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (OZb(d)) { + continue; + } + h = d.c.i; + if (F6b(h, C6b)) { + j = G6b(a, h, C6b, B6b); + if (j == -1) { + continue; + } + c.b = $wnd.Math.max(c.b, j); + !c.a && (c.a = new Rkb()); + Ekb(c.a, h); + } + } + for (g = new Sr(ur(U_b(b).a.Kc(), new Sq())); Qr(g); ) { + f = BD(Rr(g), 17); + if (OZb(f)) { + continue; + } + i = f.d.i; + if (F6b(i, B6b)) { + j = G6b(a, i, B6b, C6b); + if (j == -1) { + continue; + } + c.d = $wnd.Math.max(c.d, j); + !c.c && (c.c = new Rkb()); + Ekb(c.c, i); + } + } + return c; + } + function Khb(a) { + Dhb(); + var b, c, d, e; + b = QD(a); + if (a < Chb.length) { + return Chb[b]; + } else if (a <= 50) { + return Pgb((Hgb(), Egb), b); + } else if (a <= _ie) { + return Qgb(Pgb(Bhb[1], b), b); + } + if (a > 1e6) { + throw vbb(new ocb("power of ten too big")); + } + if (a <= Ohe) { + return Qgb(Pgb(Bhb[1], b), b); + } + d = Pgb(Bhb[1], Ohe); + e = d; + c = Cbb(a - Ohe); + b = QD(a % Ohe); + while (ybb(c, Ohe) > 0) { + e = Ogb(e, d); + c = Qbb(c, Ohe); + } + e = Ogb(e, Pgb(Bhb[1], b)); + e = Qgb(e, Ohe); + c = Cbb(a - Ohe); + while (ybb(c, Ohe) > 0) { + e = Qgb(e, Ohe); + c = Qbb(c, Ohe); + } + e = Qgb(e, b); + return e; + } + function X5b(a, b) { + var c, d, e, f, g, h, i, j, k; + Odd(b, "Hierarchical port dummy size processing", 1); + i = new Rkb(); + k = new Rkb(); + d = Edb(ED(vNb(a, (Nyc(), myc)))); + c = d * 2; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + i.c = KC(SI, Uhe, 1, 0, 5, 1); + k.c = KC(SI, Uhe, 1, 0, 5, 1); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), e0b)) { + j = BD(vNb(g, (wtc(), Hsc)), 61); + j == (Ucd(), Acd) ? (i.c[i.c.length] = g, true) : j == Rcd && (k.c[k.c.length] = g, true); + } + } + Y5b(i, true, c); + Y5b(k, false, c); + } + Qdd(b); + } + function Oac(a, b) { + var c, d, e, f, g, h, i; + Odd(b, "Layer constraint postprocessing", 1); + i = a.b; + if (i.c.length != 0) { + d = (tCb(0, i.c.length), BD(i.c[0], 29)); + g = BD(Ikb(i, i.c.length - 1), 29); + c = new H1b(a); + f = new H1b(a); + Mac(a, d, g, c, f); + c.a.c.length == 0 || (wCb(0, i.c.length), aCb(i.c, 0, c)); + f.a.c.length == 0 || (i.c[i.c.length] = f, true); + } + if (wNb(a, (wtc(), Lsc))) { + e = new H1b(a); + h = new H1b(a); + Pac(a, e, h); + e.a.c.length == 0 || (wCb(0, i.c.length), aCb(i.c, 0, e)); + h.a.c.length == 0 || (i.c[i.c.length] = h, true); + } + Qdd(b); + } + function b6b(a) { + var b, c, d, e, f, g, h, i, j, k; + for (i = new olb(a.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + if (h.k != (j0b(), e0b)) { + continue; + } + e = BD(vNb(h, (wtc(), Hsc)), 61); + if (e == (Ucd(), zcd) || e == Tcd) { + for (d = new Sr(ur(O_b(h).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + b = c.a; + if (b.b == 0) { + continue; + } + j = c.c; + if (j.i == h) { + f = (sCb(b.b != 0), BD(b.a.a.c, 8)); + f.b = l7c(OC(GC(m1, 1), nie, 8, 0, [j.i.n, j.n, j.a])).b; + } + k = c.d; + if (k.i == h) { + g = (sCb(b.b != 0), BD(b.c.b.c, 8)); + g.b = l7c(OC(GC(m1, 1), nie, 8, 0, [k.i.n, k.n, k.a])).b; + } + } + } + } + } + function Tec(a, b) { + var c, d, e, f, g, h, i; + Odd(b, "Sort By Input Model " + vNb(a, (Nyc(), ywc)), 1); + e = 0; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + i = e == 0 ? 0 : e - 1; + h = BD(Ikb(a.b, i), 29); + for (g = new olb(c.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + if (PD(vNb(f, Vxc)) !== PD((dcd(), Zbd)) && PD(vNb(f, Vxc)) !== PD($bd)) { + mmb(); + Okb(f.j, new Tnc(h, Xec(f))); + Sdd(b, "Node " + f + " ports: " + f.j); + } + } + mmb(); + Okb(c.a, new Bnc(h, BD(vNb(a, ywc), 339), BD(vNb(a, wwc), 378))); + Sdd(b, "Layer " + e + ": " + c); + ++e; + } + Qdd(b); + } + function U1b(a, b) { + var c, d, e, f; + f = P1b(b); + MAb(new YAb(null, (!b.c && (b.c = new cUd(F2, b, 9, 9)), new Kub(b.c, 16))), new i2b(f)); + e = BD(vNb(f, (wtc(), Ksc)), 21); + O1b(b, e); + if (e.Hc((Orc(), Hrc))) { + for (d = new Fyd((!b.c && (b.c = new cUd(F2, b, 9, 9)), b.c)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 118); + Y1b(a, b, f, c); + } + } + BD(hkd(b, (Nyc(), Fxc)), 174).gc() != 0 && L1b(b, f); + Ccb(DD(vNb(f, Mxc))) && e.Fc(Mrc); + wNb(f, hyc) && Wyc(new ezc(Edb(ED(vNb(f, hyc)))), f); + PD(hkd(b, axc)) === PD((hbd(), ebd)) ? V1b(a, b, f) : T1b(a, b, f); + return f; + } + function hic(a, b, c, d) { + var e, f, g; + this.j = new Rkb(); + this.k = new Rkb(); + this.b = new Rkb(); + this.c = new Rkb(); + this.e = new I6c(); + this.i = new s7c(); + this.f = new lEb(); + this.d = new Rkb(); + this.g = new Rkb(); + Ekb(this.b, a); + Ekb(this.b, b); + this.e.c = $wnd.Math.min(a.a, b.a); + this.e.d = $wnd.Math.min(a.b, b.b); + this.e.b = $wnd.Math.abs(a.a - b.a); + this.e.a = $wnd.Math.abs(a.b - b.b); + e = BD(vNb(d, (Nyc(), jxc)), 74); + if (e) { + for (g = Jsb(e, 0); g.b != g.d.c; ) { + f = BD(Xsb(g), 8); + ADb(f.a, a.a) && Dsb(this.i, f); + } + } + !!c && Ekb(this.j, c); + Ekb(this.k, d); + } + function oTb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + k = new gub(new ETb(c)); + h = KC(sbb, dle, 25, a.f.e.c.length, 16, 1); + Glb(h, h.length); + c[b.b] = 0; + for (j = new olb(a.f.e); j.a < j.c.c.length; ) { + i = BD(mlb(j), 144); + i.b != b.b && (c[i.b] = Ohe); + zCb(cub(k, i)); + } + while (k.b.c.length != 0) { + l = BD(dub(k), 144); + h[l.b] = true; + for (f = au(new bu(a.b, l), 0); f.c; ) { + e = BD(uu(f), 282); + m = rTb(e, l); + if (h[m.b]) { + continue; + } + wNb(e, (bTb(), RSb)) ? g = Edb(ED(vNb(e, RSb))) : g = a.c; + d = c[l.b] + g; + if (d < c[m.b]) { + c[m.b] = d; + eub(k, m); + zCb(cub(k, m)); + } + } + } + } + function xMc(a, b, c) { + var d, e, f, g, h, i, j, k, l; + e = true; + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + j = Qje; + k = null; + for (i = new olb(f.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + l = Edb(b.p[h.p]) + Edb(b.d[h.p]) - h.d.d; + d = Edb(b.p[h.p]) + Edb(b.d[h.p]) + h.o.b + h.d.a; + if (l > j && d > j) { + k = h; + j = Edb(b.p[h.p]) + Edb(b.d[h.p]) + h.o.b + h.d.a; + } else { + e = false; + c.n && Sdd(c, "bk node placement breaks on " + h + " which should have been after " + k); + break; + } + } + if (!e) { + break; + } + } + c.n && Sdd(c, b + " is feasible: " + e); + return e; + } + function XNc(a, b, c, d) { + var e, f, g, h, i, j, k; + h = -1; + for (k = new olb(a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 112); + j.g = h--; + e = Tbb(tAb(PAb(JAb(new YAb(null, new Kub(j.f, 16)), new ZNc()), new _Nc())).d); + f = Tbb(tAb(PAb(JAb(new YAb(null, new Kub(j.k, 16)), new bOc()), new dOc())).d); + g = e; + i = f; + if (!d) { + g = Tbb(tAb(PAb(new YAb(null, new Kub(j.f, 16)), new fOc())).d); + i = Tbb(tAb(PAb(new YAb(null, new Kub(j.k, 16)), new hOc())).d); + } + j.d = g; + j.a = e; + j.i = i; + j.b = f; + i == 0 ? (Gsb(c, j, c.c.b, c.c), true) : g == 0 && (Gsb(b, j, b.c.b, b.c), true); + } + } + function $8b(a, b, c, d) { + var e, f, g, h, i, j, k; + if (c.d.i == b.i) { + return; + } + e = new b0b(a); + __b(e, (j0b(), g0b)); + yNb(e, (wtc(), $sc), c); + yNb(e, (Nyc(), Vxc), (dcd(), $bd)); + d.c[d.c.length] = e; + g = new H0b(); + F0b(g, e); + G0b(g, (Ucd(), Tcd)); + h = new H0b(); + F0b(h, e); + G0b(h, zcd); + k = c.d; + RZb(c, g); + f = new UZb(); + tNb(f, c); + yNb(f, jxc, null); + QZb(f, h); + RZb(f, k); + j = new Bib(c.b, 0); + while (j.b < j.d.gc()) { + i = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 70)); + if (PD(vNb(i, Qwc)) === PD((qad(), oad))) { + yNb(i, Dsc, c); + uib(j); + Ekb(f.b, i); + } + } + a9b(e, g, h); + } + function Z8b(a, b, c, d) { + var e, f, g, h, i, j, k; + if (c.c.i == b.i) { + return; + } + e = new b0b(a); + __b(e, (j0b(), g0b)); + yNb(e, (wtc(), $sc), c); + yNb(e, (Nyc(), Vxc), (dcd(), $bd)); + d.c[d.c.length] = e; + g = new H0b(); + F0b(g, e); + G0b(g, (Ucd(), Tcd)); + h = new H0b(); + F0b(h, e); + G0b(h, zcd); + RZb(c, g); + f = new UZb(); + tNb(f, c); + yNb(f, jxc, null); + QZb(f, h); + RZb(f, b); + a9b(e, g, h); + j = new Bib(c.b, 0); + while (j.b < j.d.gc()) { + i = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 70)); + k = BD(vNb(i, Qwc), 272); + if (k == (qad(), oad)) { + wNb(i, Dsc) || yNb(i, Dsc, c); + uib(j); + Ekb(f.b, i); + } + } + } + function dDc(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + m = new Rkb(); + r = Gx(d); + q = b * a.a; + l = 0; + o2 = 0; + f = new Tqb(); + g = new Tqb(); + h = new Rkb(); + s = 0; + t = 0; + n = 0; + p = 0; + j = 0; + k = 0; + while (r.a.gc() != 0) { + i = hDc(r, e, g); + if (i) { + r.a.Bc(i) != null; + h.c[h.c.length] = i; + f.a.zc(i, f); + o2 = a.f[i.p]; + s += a.e[i.p] - o2 * a.b; + l = a.c[i.p]; + t += l * a.b; + k += o2 * a.b; + p += a.e[i.p]; + } + if (!i || r.a.gc() == 0 || s >= q && a.e[i.p] > o2 * a.b || t >= c * q) { + m.c[m.c.length] = h; + h = new Rkb(); + ye(g, f); + f.a.$b(); + j -= k; + n = $wnd.Math.max(n, j * a.b + p); + j += t; + s = t; + t = 0; + k = 0; + p = 0; + } + } + return new vgd(n, m); + } + function q4c(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n; + for (c = (j = new $ib(a.c.b).a.vc().Kc(), new djb(j)); c.a.Ob(); ) { + b = (h = BD(c.a.Pb(), 42), BD(h.dd(), 149)); + e = b.a; + e == null && (e = ""); + d = i4c(a.c, e); + !d && e.length == 0 && (d = u4c(a)); + !!d && !ze(d.c, b, false) && Dsb(d.c, b); + } + for (g = Jsb(a.a, 0); g.b != g.d.c; ) { + f = BD(Xsb(g), 478); + k = j4c(a.c, f.a); + n = j4c(a.c, f.b); + !!k && !!n && Dsb(k.c, new vgd(n, f.c)); + } + Osb(a.a); + for (m = Jsb(a.b, 0); m.b != m.d.c; ) { + l = BD(Xsb(m), 478); + b = g4c(a.c, l.a); + i = j4c(a.c, l.b); + !!b && !!i && B3c(b, i, l.c); + } + Osb(a.b); + } + function qvd(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + f = new fC(a); + g = new ird(); + e = (ko(g.g), ko(g.j), Uhb(g.b), ko(g.d), ko(g.i), Uhb(g.k), Uhb(g.c), Uhb(g.e), n = drd(g, f, null), ard(g, f), n); + if (b) { + j = new fC(b); + h = rvd(j); + jfd(e, OC(GC(g2, 1), Uhe, 527, 0, [h])); + } + m = false; + l = false; + if (c) { + j = new fC(c); + que in j.a && (m = aC(j, que).ge().a); + rue in j.a && (l = aC(j, rue).ge().a); + } + k = Vdd(Xdd(new Zdd(), m), l); + t2c(new w2c(), e, k); + que in f.a && cC(f, que, null); + if (m || l) { + i = new eC(); + nvd(k, i, m, l); + cC(f, que, i); + } + d = new Prd(g); + Ghe(new _ud(e), d); + } + function pA(a, b, c) { + var d, e, f, g, h, i, j, k, l; + g = new nB(); + j = OC(GC(WD, 1), oje, 25, 15, [0]); + e = -1; + f = 0; + d = 0; + for (i = 0; i < a.b.c.length; ++i) { + k = BD(Ikb(a.b, i), 434); + if (k.b > 0) { + if (e < 0 && k.a) { + e = i; + f = j[0]; + d = 0; + } + if (e >= 0) { + h = k.b; + if (i == e) { + h -= d++; + if (h == 0) { + return 0; + } + } + if (!wA(b, j, k, h, g)) { + i = e - 1; + j[0] = f; + continue; + } + } else { + e = -1; + if (!wA(b, j, k, 0, g)) { + return 0; + } + } + } else { + e = -1; + if (bfb(k.c, 0) == 32) { + l = j[0]; + uA(b, j); + if (j[0] > l) { + continue; + } + } else if (ofb(b, k.c, j[0])) { + j[0] += k.c.length; + continue; + } + return 0; + } + } + if (!mB(g, c)) { + return 0; + } + return j[0]; + } + function SKd(a) { + var b, c, d, e, f, g, h, i; + if (!a.f) { + i = new CNd(); + h = new CNd(); + b = KKd; + g = b.a.zc(a, b); + if (g == null) { + for (f = new Fyd(_Kd(a)); f.e != f.i.gc(); ) { + e = BD(Dyd(f), 26); + ytd(i, SKd(e)); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + for (d = (!a.s && (a.s = new cUd(t5, a, 21, 17)), new Fyd(a.s)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 170); + JD(c, 99) && wtd(h, BD(c, 18)); + } + vud(h); + a.r = new UNd(a, (BD(qud(ZKd((NFd(), MFd).o), 6), 18), h.i), h.g); + ytd(i, a.r); + vud(i); + a.f = new nNd((BD(qud(ZKd(MFd.o), 5), 18), i.i), i.g); + $Kd(a).b &= -3; + } + return a.f; + } + function rMb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2; + g = a.o; + d = KC(WD, oje, 25, g, 15, 1); + e = KC(WD, oje, 25, g, 15, 1); + c = a.p; + b = KC(WD, oje, 25, c, 15, 1); + f = KC(WD, oje, 25, c, 15, 1); + for (j = 0; j < g; j++) { + l = 0; + while (l < c && !YMb(a, j, l)) { + ++l; + } + d[j] = l; + } + for (k = 0; k < g; k++) { + l = c - 1; + while (l >= 0 && !YMb(a, k, l)) { + --l; + } + e[k] = l; + } + for (n = 0; n < c; n++) { + h = 0; + while (h < g && !YMb(a, h, n)) { + ++h; + } + b[n] = h; + } + for (o2 = 0; o2 < c; o2++) { + h = g - 1; + while (h >= 0 && !YMb(a, h, o2)) { + --h; + } + f[o2] = h; + } + for (i = 0; i < g; i++) { + for (m = 0; m < c; m++) { + i < f[m] && i > b[m] && m < e[i] && m > d[i] && aNb(a, i, m, false, true); + } + } + } + function lRb(a) { + var b, c, d, e, f, g, h, i; + c = Ccb(DD(vNb(a, (wSb(), cSb)))); + f = a.a.c.d; + h = a.a.d.d; + if (c) { + g = Y6c(c7c(new f7c(h.a, h.b), f), 0.5); + i = Y6c(R6c(a.e), 0.5); + b = c7c(P6c(new f7c(f.a, f.b), g), i); + a7c(a.d, b); + } else { + e = Edb(ED(vNb(a.a, tSb))); + d = a.d; + if (f.a >= h.a) { + if (f.b >= h.b) { + d.a = h.a + (f.a - h.a) / 2 + e; + d.b = h.b + (f.b - h.b) / 2 - e - a.e.b; + } else { + d.a = h.a + (f.a - h.a) / 2 + e; + d.b = f.b + (h.b - f.b) / 2 + e; + } + } else { + if (f.b >= h.b) { + d.a = f.a + (h.a - f.a) / 2 + e; + d.b = h.b + (f.b - h.b) / 2 + e; + } else { + d.a = f.a + (h.a - f.a) / 2 + e; + d.b = f.b + (h.b - f.b) / 2 - e - a.e.b; + } + } + } + } + function Qge(a, b) { + var c, d, e, f, g, h, i; + if (a == null) { + return null; + } + f = a.length; + if (f == 0) { + return ""; + } + i = KC(TD, $ie, 25, f, 15, 1); + ACb(0, f, a.length); + ACb(0, f, i.length); + ffb(a, 0, f, i, 0); + c = null; + h = b; + for (e = 0, g = 0; e < f; e++) { + d = i[e]; + lde(); + if (d <= 32 && (kde[d] & 2) != 0) { + if (h) { + !c && (c = new Jfb(a)); + Gfb(c, e - g++); + } else { + h = b; + if (d != 32) { + !c && (c = new Jfb(a)); + kcb(c, e - g, e - g + 1, String.fromCharCode(32)); + } + } + } else { + h = false; + } + } + if (h) { + if (!c) { + return a.substr(0, f - 1); + } else { + f = c.a.length; + return f > 0 ? qfb(c.a, 0, f - 1) : ""; + } + } else { + return !c ? a : c.a; + } + } + function DPb(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Yle), "ELK DisCo"), "Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."), new GPb()))); + p4c(a, Yle, Zle, Ksd(BPb)); + p4c(a, Yle, $le, Ksd(vPb)); + p4c(a, Yle, _le, Ksd(qPb)); + p4c(a, Yle, ame, Ksd(wPb)); + p4c(a, Yle, Zke, Ksd(zPb)); + p4c(a, Yle, $ke, Ksd(yPb)); + p4c(a, Yle, Yke, Ksd(APb)); + p4c(a, Yle, _ke, Ksd(xPb)); + p4c(a, Yle, Tle, Ksd(sPb)); + p4c(a, Yle, Ule, Ksd(rPb)); + p4c(a, Yle, Vle, Ksd(tPb)); + p4c(a, Yle, Wle, Ksd(uPb)); + } + function Zbc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m; + f = new b0b(a); + __b(f, (j0b(), i0b)); + yNb(f, (Nyc(), Vxc), (dcd(), $bd)); + e = 0; + if (b) { + g = new H0b(); + yNb(g, (wtc(), $sc), b); + yNb(f, $sc, b.i); + G0b(g, (Ucd(), Tcd)); + F0b(g, f); + m = k_b(b.e); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i = j[k]; + RZb(i, g); + } + yNb(b, gtc, f); + ++e; + } + if (c) { + h = new H0b(); + yNb(f, (wtc(), $sc), c.i); + yNb(h, $sc, c); + G0b(h, (Ucd(), zcd)); + F0b(h, f); + m = k_b(c.g); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i = j[k]; + QZb(i, h); + } + yNb(c, gtc, f); + ++e; + } + yNb(f, (wtc(), ysc), meb(e)); + d.c[d.c.length] = f; + return f; + } + function Smd() { + Smd = ccb; + Qmd = OC(GC(TD, 1), $ie, 25, 15, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70]); + Rmd = new RegExp("[ \n\r\f]+"); + try { + Pmd = OC(GC(c6, 1), Uhe, 2015, 0, [new EQd((GA(), IA("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ", LA((KA(), KA(), JA))))), new EQd(IA("yyyy-MM-dd'T'HH:mm:ss'.'SSS", LA((null, JA)))), new EQd(IA("yyyy-MM-dd'T'HH:mm:ss", LA((null, JA)))), new EQd(IA("yyyy-MM-dd'T'HH:mm", LA((null, JA)))), new EQd(IA("yyyy-MM-dd", LA((null, JA))))]); + } catch (a) { + a = ubb(a); + if (!JD(a, 78)) + throw vbb(a); + } + } + function qgb(a) { + var b, c, d, e; + d = shb((!a.c && (a.c = fhb(a.f)), a.c), 0); + if (a.e == 0 || a.a == 0 && a.f != -1 && a.e < 0) { + return d; + } + b = pgb(a) < 0 ? 1 : 0; + c = a.e; + e = (d.length + 1 + $wnd.Math.abs(QD(a.e)), new Vfb()); + b == 1 && (e.a += "-", e); + if (a.e > 0) { + c -= d.length - b; + if (c >= 0) { + e.a += "0."; + for (; c > egb.length; c -= egb.length) { + Rfb(e, egb); + } + Sfb(e, egb, QD(c)); + Qfb(e, d.substr(b)); + } else { + c = b - c; + Qfb(e, qfb(d, b, QD(c))); + e.a += "."; + Qfb(e, pfb(d, QD(c))); + } + } else { + Qfb(e, d.substr(b)); + for (; c < -egb.length; c += egb.length) { + Rfb(e, egb); + } + Sfb(e, egb, QD(-c)); + } + return e.a; + } + function v6c(a, b, c, d) { + var e, f, g, h, i, j, k, l, m; + i = c7c(new f7c(c.a, c.b), a); + j = i.a * b.b - i.b * b.a; + k = b.a * d.b - b.b * d.a; + l = (i.a * d.b - i.b * d.a) / k; + m = j / k; + if (k == 0) { + if (j == 0) { + e = P6c(new f7c(c.a, c.b), Y6c(new f7c(d.a, d.b), 0.5)); + f = S6c(a, e); + g = S6c(P6c(new f7c(a.a, a.b), b), e); + h = $wnd.Math.sqrt(d.a * d.a + d.b * d.b) * 0.5; + if (f < g && f <= h) { + return new f7c(a.a, a.b); + } + if (g <= h) { + return P6c(new f7c(a.a, a.b), b); + } + return null; + } else { + return null; + } + } else { + return l >= 0 && l <= 1 && m >= 0 && m <= 1 ? P6c(new f7c(a.a, a.b), Y6c(new f7c(b.a, b.b), l)) : null; + } + } + function OTb(a, b, c) { + var d, e, f, g, h; + d = BD(vNb(a, (Nyc(), zwc)), 21); + c.a > b.a && (d.Hc((i8c(), c8c)) ? a.c.a += (c.a - b.a) / 2 : d.Hc(e8c) && (a.c.a += c.a - b.a)); + c.b > b.b && (d.Hc((i8c(), g8c)) ? a.c.b += (c.b - b.b) / 2 : d.Hc(f8c) && (a.c.b += c.b - b.b)); + if (BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) && (c.a > b.a || c.b > b.b)) { + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), e0b)) { + e = BD(vNb(g, Hsc), 61); + e == (Ucd(), zcd) ? g.n.a += c.a - b.a : e == Rcd && (g.n.b += c.b - b.b); + } + } + } + f = a.d; + a.f.a = c.a - f.b - f.c; + a.f.b = c.b - f.d - f.a; + } + function H5b(a, b, c) { + var d, e, f, g, h; + d = BD(vNb(a, (Nyc(), zwc)), 21); + c.a > b.a && (d.Hc((i8c(), c8c)) ? a.c.a += (c.a - b.a) / 2 : d.Hc(e8c) && (a.c.a += c.a - b.a)); + c.b > b.b && (d.Hc((i8c(), g8c)) ? a.c.b += (c.b - b.b) / 2 : d.Hc(f8c) && (a.c.b += c.b - b.b)); + if (BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) && (c.a > b.a || c.b > b.b)) { + for (g = new olb(a.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + if (f.k == (j0b(), e0b)) { + e = BD(vNb(f, Hsc), 61); + e == (Ucd(), zcd) ? f.n.a += c.a - b.a : e == Rcd && (f.n.b += c.b - b.b); + } + } + } + h = a.d; + a.f.a = c.a - h.b - h.c; + a.f.b = c.b - h.d - h.a; + } + function kMc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + b = DMc(a); + for (k = (h = new Pib(b).a.vc().Kc(), new Vib(h)); k.a.Ob(); ) { + j = (e = BD(k.a.Pb(), 42), BD(e.cd(), 10)); + l = 0; + m = 0; + l = j.d.d; + m = j.o.b + j.d.a; + a.d[j.p] = 0; + c = j; + while ((f = a.a[c.p]) != j) { + d = FMc(c, f); + i = 0; + a.c == (YLc(), WLc) ? i = d.d.n.b + d.d.a.b - d.c.n.b - d.c.a.b : i = d.c.n.b + d.c.a.b - d.d.n.b - d.d.a.b; + g = Edb(a.d[c.p]) + i; + a.d[f.p] = g; + l = $wnd.Math.max(l, f.d.d - g); + m = $wnd.Math.max(m, g + f.o.b + f.d.a); + c = f; + } + c = j; + do { + a.d[c.p] = Edb(a.d[c.p]) + l; + c = a.a[c.p]; + } while (c != j); + a.b[j.p] = l + m; + } + } + function LOb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + a.b = false; + l = Pje; + i = Qje; + m = Pje; + j = Qje; + for (d = a.e.a.ec().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 266); + e = c.a; + l = $wnd.Math.min(l, e.c); + i = $wnd.Math.max(i, e.c + e.b); + m = $wnd.Math.min(m, e.d); + j = $wnd.Math.max(j, e.d + e.a); + for (g = new olb(c.c); g.a < g.c.c.length; ) { + f = BD(mlb(g), 395); + b = f.a; + if (b.a) { + k = e.d + f.b.b; + h = k + f.c; + m = $wnd.Math.min(m, k); + j = $wnd.Math.max(j, h); + } else { + k = e.c + f.b.a; + h = k + f.c; + l = $wnd.Math.min(l, k); + i = $wnd.Math.max(i, h); + } + } + } + a.a = new f7c(i - l, j - m); + a.c = new f7c(l + a.d.a, m + a.d.b); + } + function xZc(a, b, c) { + var d, e, f, g, h, i, j, k, l; + l = new Rkb(); + k = new x$c(0, c); + f = 0; + s$c(k, new PZc(0, 0, k, c)); + e = 0; + for (j = new Fyd(a); j.e != j.i.gc(); ) { + i = BD(Dyd(j), 33); + d = BD(Ikb(k.a, k.a.c.length - 1), 187); + h = e + i.g + (BD(Ikb(k.a, 0), 187).b.c.length == 0 ? 0 : c); + if (h > b) { + e = 0; + f += k.b + c; + l.c[l.c.length] = k; + k = new x$c(f, c); + d = new PZc(0, k.f, k, c); + s$c(k, d); + e = 0; + } + if (d.b.c.length == 0 || i.f >= d.o && i.f <= d.f || d.a * 0.5 <= i.f && d.a * 1.5 >= i.f) { + EZc(d, i); + } else { + g = new PZc(d.s + d.r + c, k.f, k, c); + s$c(k, g); + EZc(g, i); + } + e = i.i + i.g; + } + l.c[l.c.length] = k; + return l; + } + function OKd(a) { + var b, c, d, e, f, g, h, i; + if (!a.a) { + a.o = null; + i = new GNd(a); + b = new KNd(); + c = KKd; + h = c.a.zc(a, c); + if (h == null) { + for (g = new Fyd(_Kd(a)); g.e != g.i.gc(); ) { + f = BD(Dyd(g), 26); + ytd(i, OKd(f)); + } + c.a.Bc(a) != null; + c.a.gc() == 0 && void 0; + } + for (e = (!a.s && (a.s = new cUd(t5, a, 21, 17)), new Fyd(a.s)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 170); + JD(d, 322) && wtd(b, BD(d, 34)); + } + vud(b); + a.k = new PNd(a, (BD(qud(ZKd((NFd(), MFd).o), 7), 18), b.i), b.g); + ytd(i, a.k); + vud(i); + a.a = new nNd((BD(qud(ZKd(MFd.o), 4), 18), i.i), i.g); + $Kd(a).b &= -2; + } + return a.a; + } + function vZc(a, b, c, d, e, f, g) { + var h, i, j, k, l, m; + l = false; + i = ZZc(c.q, b.f + b.b - c.q.f); + m = e - (c.q.e + i - g); + if (m < d.g) { + return false; + } + j = f == a.c.length - 1 && m >= (tCb(f, a.c.length), BD(a.c[f], 200)).e; + k = (h = MZc(d, m, false), h.a); + if (k > b.b && !j) { + return false; + } + if (j || k <= b.b) { + if (j && k > b.b) { + c.d = k; + KZc(c, JZc(c, k)); + } else { + $Zc(c.q, i); + c.c = true; + } + KZc(d, e - (c.s + c.r)); + OZc(d, c.q.e + c.q.d, b.f); + s$c(b, d); + if (a.c.length > f) { + v$c((tCb(f, a.c.length), BD(a.c[f], 200)), d); + (tCb(f, a.c.length), BD(a.c[f], 200)).a.c.length == 0 && Kkb(a, f); + } + l = true; + } + return l; + } + function C2d(a, b, c, d) { + var e, f, g, h, i, j, k; + k = S6d(a.e.Tg(), b); + e = 0; + f = BD(a.g, 119); + i = null; + Q6d(); + if (BD(b, 66).Oj()) { + for (h = 0; h < a.i; ++h) { + g = f[h]; + if (k.rl(g.ak())) { + if (pb(g, c)) { + i = g; + break; + } + ++e; + } + } + } else if (c != null) { + for (h = 0; h < a.i; ++h) { + g = f[h]; + if (k.rl(g.ak())) { + if (pb(c, g.dd())) { + i = g; + break; + } + ++e; + } + } + } else { + for (h = 0; h < a.i; ++h) { + g = f[h]; + if (k.rl(g.ak())) { + if (g.dd() == null) { + i = g; + break; + } + ++e; + } + } + } + if (i) { + if (oid(a.e)) { + j = b.$j() ? new O7d(a.e, 4, b, c, null, e, true) : H2d(a, b.Kj() ? 2 : 1, b, c, b.zj(), -1, true); + d ? d.Ei(j) : d = j; + } + d = B2d(a, i, d); + } + return d; + } + function kYc(a, b, c, d, e, f, g) { + var h, i, j, k, l, m, n, o2, p; + o2 = 0; + p = 0; + i = e.c; + h = e.b; + k = c.f; + n = c.g; + switch (b.g) { + case 0: + o2 = d.i + d.g + g; + a.c ? p = tYc(o2, f, d, g) : p = d.j; + m = $wnd.Math.max(i, o2 + n); + j = $wnd.Math.max(h, p + k); + break; + case 1: + p = d.j + d.f + g; + a.c ? o2 = sYc(p, f, d, g) : o2 = d.i; + m = $wnd.Math.max(i, o2 + n); + j = $wnd.Math.max(h, p + k); + break; + case 2: + o2 = i + g; + p = 0; + m = i + g + n; + j = $wnd.Math.max(h, k); + break; + case 3: + o2 = 0; + p = h + g; + m = $wnd.Math.max(i, n); + j = h + g + k; + break; + default: + throw vbb(new Wdb("IllegalPlacementOption.")); + } + l = new e$c(a.a, m, j, b, o2, p); + return l; + } + function R2b(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + h = a.d; + l = BD(vNb(a, (wtc(), vtc)), 15); + b = BD(vNb(a, tsc), 15); + if (!l && !b) { + return; + } + f = Edb(ED(pBc(a, (Nyc(), iyc)))); + g = Edb(ED(pBc(a, jyc))); + m = 0; + if (l) { + j = 0; + for (e = l.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + j = $wnd.Math.max(j, d.o.b); + m += d.o.a; + } + m += f * (l.gc() - 1); + h.d += j + g; + } + c = 0; + if (b) { + j = 0; + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + j = $wnd.Math.max(j, d.o.b); + c += d.o.a; + } + c += f * (b.gc() - 1); + h.a += j + g; + } + i = $wnd.Math.max(m, c); + if (i > a.o.a) { + k = (i - a.o.a) / 2; + h.b = $wnd.Math.max(h.b, k); + h.c = $wnd.Math.max(h.c, k); + } + } + function rvd(a) { + var b, c, d, e, f, g, h, i; + f = new b2c(); + Z1c(f, (Y1c(), V1c)); + for (d = (e = $B(a, KC(ZI, nie, 2, 0, 6, 1)), new vib(new amb(new mC(a, e).b))); d.b < d.d.gc(); ) { + c = (sCb(d.b < d.d.gc()), GD(d.d.Xb(d.c = d.b++))); + g = k4c(lvd, c); + if (g) { + b = aC(a, c); + b.je() ? h = b.je().a : b.ge() ? h = "" + b.ge().a : b.he() ? h = "" + b.he().a : h = b.Ib(); + i = o5c(g, h); + if (i != null) { + (uqb(g.j, (N5c(), K5c)) || uqb(g.j, L5c)) && xNb(_1c(f, E2), g, i); + uqb(g.j, I5c) && xNb(_1c(f, B2), g, i); + uqb(g.j, M5c) && xNb(_1c(f, F2), g, i); + uqb(g.j, J5c) && xNb(_1c(f, D2), g, i); + } + } + } + return f; + } + function J2d(a, b, c, d) { + var e, f, g, h, i, j; + i = S6d(a.e.Tg(), b); + f = BD(a.g, 119); + if (T6d(a.e, b)) { + e = 0; + for (h = 0; h < a.i; ++h) { + g = f[h]; + if (i.rl(g.ak())) { + if (e == c) { + Q6d(); + if (BD(b, 66).Oj()) { + return g; + } else { + j = g.dd(); + j != null && d && JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 && (j = b3d(a, b, h, e, j)); + return j; + } + } + ++e; + } + } + throw vbb(new qcb(gve + c + mue + e)); + } else { + e = 0; + for (h = 0; h < a.i; ++h) { + g = f[h]; + if (i.rl(g.ak())) { + Q6d(); + if (BD(b, 66).Oj()) { + return g; + } else { + j = g.dd(); + j != null && d && JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 && (j = b3d(a, b, h, e, j)); + return j; + } + } + ++e; + } + return b.zj(); + } + } + function K2d(a, b, c) { + var d, e, f, g, h, i, j, k; + e = BD(a.g, 119); + if (T6d(a.e, b)) { + return Q6d(), BD(b, 66).Oj() ? new R7d(b, a) : new f7d(b, a); + } else { + j = S6d(a.e.Tg(), b); + d = 0; + for (h = 0; h < a.i; ++h) { + f = e[h]; + g = f.ak(); + if (j.rl(g)) { + Q6d(); + if (BD(b, 66).Oj()) { + return f; + } else if (g == (m8d(), k8d) || g == h8d) { + i = new Wfb(fcb(f.dd())); + while (++h < a.i) { + f = e[h]; + g = f.ak(); + (g == k8d || g == h8d) && Qfb(i, fcb(f.dd())); + } + return j6d(BD(b.Yj(), 148), i.a); + } else { + k = f.dd(); + k != null && c && JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 && (k = b3d(a, b, h, d, k)); + return k; + } + } + ++d; + } + return b.zj(); + } + } + function MZc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + f = 0; + g = a.t; + e = 0; + d = 0; + i = 0; + m = 0; + l = 0; + if (c) { + a.n.c = KC(SI, Uhe, 1, 0, 5, 1); + Ekb(a.n, new VZc(a.s, a.t, a.i)); + } + h = 0; + for (k = new olb(a.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 33); + if (f + j.g + (h > 0 ? a.i : 0) > b && i > 0) { + f = 0; + g += i + a.i; + e = $wnd.Math.max(e, m); + d += i + a.i; + i = 0; + m = 0; + if (c) { + ++l; + Ekb(a.n, new VZc(a.s, g, a.i)); + } + h = 0; + } + m += j.g + (h > 0 ? a.i : 0); + i = $wnd.Math.max(i, j.f); + c && QZc(BD(Ikb(a.n, l), 211), j); + f += j.g + (h > 0 ? a.i : 0); + ++h; + } + e = $wnd.Math.max(e, m); + d += i; + if (c) { + a.r = e; + a.d = d; + u$c(a.j); + } + return new J6c(a.s, a.t, e, d); + } + function $fb(a, b, c, d, e) { + Zfb(); + var f, g, h, i, j, k, l, m, n; + vCb(a, "src"); + vCb(c, "dest"); + m = rb(a); + i = rb(c); + rCb((m.i & 4) != 0, "srcType is not an array"); + rCb((i.i & 4) != 0, "destType is not an array"); + l = m.c; + g = i.c; + rCb((l.i & 1) != 0 ? l == g : (g.i & 1) == 0, "Array types don't match"); + n = a.length; + j = c.length; + if (b < 0 || d < 0 || e < 0 || b + e > n || d + e > j) { + throw vbb(new pcb()); + } + if ((l.i & 1) == 0 && m != i) { + k = CD(a); + f = CD(c); + if (PD(a) === PD(c) && b < d) { + b += e; + for (h = d + e; h-- > d; ) { + NC(f, h, k[--b]); + } + } else { + for (h = d + e; d < h; ) { + NC(f, d++, k[b++]); + } + } + } else + e > 0 && $Bb(a, b, c, d, e, true); + } + function phb() { + phb = ccb; + nhb = OC(GC(WD, 1), oje, 25, 15, [Rie, 1162261467, Iie, 1220703125, 362797056, 1977326743, Iie, 387420489, Jje, 214358881, 429981696, 815730721, 1475789056, 170859375, 268435456, 410338673, 612220032, 893871739, 128e7, 1801088541, 113379904, 148035889, 191102976, 244140625, 308915776, 387420489, 481890304, 594823321, 729e6, 887503681, Iie, 1291467969, 1544804416, 1838265625, 60466176]); + ohb = OC(GC(WD, 1), oje, 25, 15, [-1, -1, 31, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]); + } + function soc(a) { + var b, c, d, e, f, g, h, i; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + for (g = new olb(Mu(d.a)); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + if (ioc(f)) { + c = BD(vNb(f, (wtc(), usc)), 305); + if (!c.g && !!c.d) { + b = c; + i = c.d; + while (i) { + roc(i.i, i.k, false, true); + zoc(b.a); + zoc(i.i); + zoc(i.k); + zoc(i.b); + RZb(i.c, b.c.d); + RZb(b.c, null); + $_b(b.a, null); + $_b(i.i, null); + $_b(i.k, null); + $_b(i.b, null); + h = new goc(b.i, i.a, b.e, i.j, i.f); + h.k = b.k; + h.n = b.n; + h.b = b.b; + h.c = i.c; + h.g = b.g; + h.d = i.d; + yNb(b.i, usc, h); + yNb(i.a, usc, h); + i = i.d; + b = h; + } + } + } + } + } + } + function Xfe(a, b) { + var c, d, e, f, g; + g = BD(b, 136); + Yfe(a); + Yfe(g); + if (g.b == null) + return; + a.c = true; + if (a.b == null) { + a.b = KC(WD, oje, 25, g.b.length, 15, 1); + $fb(g.b, 0, a.b, 0, g.b.length); + return; + } + f = KC(WD, oje, 25, a.b.length + g.b.length, 15, 1); + for (c = 0, d = 0, e = 0; c < a.b.length || d < g.b.length; ) { + if (c >= a.b.length) { + f[e++] = g.b[d++]; + f[e++] = g.b[d++]; + } else if (d >= g.b.length) { + f[e++] = a.b[c++]; + f[e++] = a.b[c++]; + } else if (g.b[d] < a.b[c] || g.b[d] === a.b[c] && g.b[d + 1] < a.b[c + 1]) { + f[e++] = g.b[d++]; + f[e++] = g.b[d++]; + } else { + f[e++] = a.b[c++]; + f[e++] = a.b[c++]; + } + } + a.b = f; + } + function S6b(a, b) { + var c, d, e, f, g, h, i, j, k, l; + c = Ccb(DD(vNb(a, (wtc(), Usc)))); + h = Ccb(DD(vNb(b, Usc))); + d = BD(vNb(a, Vsc), 11); + i = BD(vNb(b, Vsc), 11); + e = BD(vNb(a, Wsc), 11); + j = BD(vNb(b, Wsc), 11); + k = !!d && d == i; + l = !!e && e == j; + if (!c && !h) { + return new Z6b(BD(mlb(new olb(a.j)), 11).p == BD(mlb(new olb(b.j)), 11).p, k, l); + } + f = (!Ccb(DD(vNb(a, Usc))) || Ccb(DD(vNb(a, Tsc)))) && (!Ccb(DD(vNb(b, Usc))) || Ccb(DD(vNb(b, Tsc)))); + g = (!Ccb(DD(vNb(a, Usc))) || !Ccb(DD(vNb(a, Tsc)))) && (!Ccb(DD(vNb(b, Usc))) || !Ccb(DD(vNb(b, Tsc)))); + return new Z6b(k && f || l && g, k, l); + } + function HZc(a) { + var b, c, d, e, f, g, h, i; + d = 0; + c = 0; + i = new Psb(); + b = 0; + for (h = new olb(a.n); h.a < h.c.c.length; ) { + g = BD(mlb(h), 211); + if (g.c.c.length == 0) { + Gsb(i, g, i.c.b, i.c); + } else { + d = $wnd.Math.max(d, g.d); + c += g.a + (b > 0 ? a.i : 0); + } + ++b; + } + Ce(a.n, i); + a.d = c; + a.r = d; + a.g = 0; + a.f = 0; + a.e = 0; + a.o = Pje; + a.p = Pje; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 33); + a.p = $wnd.Math.min(a.p, e.g); + a.g = $wnd.Math.max(a.g, e.g); + a.f = $wnd.Math.max(a.f, e.f); + a.o = $wnd.Math.min(a.o, e.f); + a.e += e.f + a.i; + } + a.a = a.e / a.b.c.length - a.i * ((a.b.c.length - 1) / a.b.c.length); + u$c(a.j); + } + function Sld(a) { + var b, c, d, e; + if ((a.Db & 64) != 0) + return Mkd(a); + b = new Wfb(_se); + d = a.k; + if (!d) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + if (a.n.i > 0) { + e = (!a.n && (a.n = new cUd(D2, a, 1, 7)), BD(qud(a.n, 0), 137)).a; + !e || Qfb(Qfb((b.a += ' "', b), e), '"'); + } + } else { + Qfb(Qfb((b.a += ' "', b), d), '"'); + } + c = (!a.b && (a.b = new y5d(z2, a, 4, 7)), !(a.b.i <= 1 && (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c.i <= 1))); + c ? (b.a += " [", b) : (b.a += " ", b); + Qfb(b, Eb(new Gb(), new Fyd(a.b))); + c && (b.a += "]", b); + b.a += gne; + c && (b.a += "[", b); + Qfb(b, Eb(new Gb(), new Fyd(a.c))); + c && (b.a += "]", b); + return b.a; + } + function TQd(a, b) { + var c, d, e, f, g, h, i; + if (a.a) { + h = a.a.ne(); + i = null; + if (h != null) { + b.a += "" + h; + } else { + g = a.a.Dj(); + if (g != null) { + f = hfb(g, wfb(91)); + if (f != -1) { + i = g.substr(f); + b.a += "" + qfb(g == null ? Xhe : (uCb(g), g), 0, f); + } else { + b.a += "" + g; + } + } + } + if (!!a.d && a.d.i != 0) { + e = true; + b.a += "<"; + for (d = new Fyd(a.d); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 87); + e ? e = false : (b.a += She, b); + TQd(c, b); + } + b.a += ">"; + } + i != null && (b.a += "" + i, b); + } else if (a.e) { + h = a.e.zb; + h != null && (b.a += "" + h, b); + } else { + b.a += "?"; + if (a.b) { + b.a += " super "; + TQd(a.b, b); + } else { + if (a.f) { + b.a += " extends "; + TQd(a.f, b); + } + } + } + } + function Z9b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D; + v = a.c; + w = b.c; + c = Jkb(v.a, a, 0); + d = Jkb(w.a, b, 0); + t = BD(W_b(a, (KAc(), HAc)).Kc().Pb(), 11); + C = BD(W_b(a, IAc).Kc().Pb(), 11); + u = BD(W_b(b, HAc).Kc().Pb(), 11); + D = BD(W_b(b, IAc).Kc().Pb(), 11); + r = k_b(t.e); + A = k_b(C.g); + s = k_b(u.e); + B = k_b(D.g); + Z_b(a, d, w); + for (g = s, k = 0, o2 = g.length; k < o2; ++k) { + e = g[k]; + RZb(e, t); + } + for (h = B, l = 0, p = h.length; l < p; ++l) { + e = h[l]; + QZb(e, C); + } + Z_b(b, c, v); + for (i = r, m = 0, q = i.length; m < q; ++m) { + e = i[m]; + RZb(e, u); + } + for (f = A, j = 0, n = f.length; j < n; ++j) { + e = f[j]; + QZb(e, D); + } + } + function $$b(a, b, c, d) { + var e, f, g, h, i, j, k; + f = a_b(d); + h = Ccb(DD(vNb(d, (Nyc(), uxc)))); + if ((h || Ccb(DD(vNb(a, exc)))) && !fcd(BD(vNb(a, Vxc), 98))) { + e = Zcd(f); + i = i_b(a, c, c == (KAc(), IAc) ? e : Wcd(e)); + } else { + i = new H0b(); + F0b(i, a); + if (b) { + k = i.n; + k.a = b.a - a.n.a; + k.b = b.b - a.n.b; + Q6c(k, 0, 0, a.o.a, a.o.b); + G0b(i, W$b(i, f)); + } else { + e = Zcd(f); + G0b(i, c == (KAc(), IAc) ? e : Wcd(e)); + } + g = BD(vNb(d, (wtc(), Ksc)), 21); + j = i.j; + switch (f.g) { + case 2: + case 1: + (j == (Ucd(), Acd) || j == Rcd) && g.Fc((Orc(), Lrc)); + break; + case 4: + case 3: + (j == (Ucd(), zcd) || j == Tcd) && g.Fc((Orc(), Lrc)); + } + } + return i; + } + function pPc(a, b, c) { + var d, e, f, g, h, i, j, k; + if ($wnd.Math.abs(b.s - b.c) < qme || $wnd.Math.abs(c.s - c.c) < qme) { + return 0; + } + d = oPc(a, b.j, c.e); + e = oPc(a, c.j, b.e); + f = d == -1 || e == -1; + g = 0; + if (f) { + if (d == -1) { + new DOc((HOc(), FOc), c, b, 1); + ++g; + } + if (e == -1) { + new DOc((HOc(), FOc), b, c, 1); + ++g; + } + } else { + h = vPc(b.j, c.s, c.c); + h += vPc(c.e, b.s, b.c); + i = vPc(c.j, b.s, b.c); + i += vPc(b.e, c.s, c.c); + j = d + 16 * h; + k = e + 16 * i; + if (j < k) { + new DOc((HOc(), GOc), b, c, k - j); + } else if (j > k) { + new DOc((HOc(), GOc), c, b, j - k); + } else if (j > 0 && k > 0) { + new DOc((HOc(), GOc), b, c, 0); + new DOc(GOc, c, b, 0); + } + } + return g; + } + function TUb(a, b) { + var c, d, e, f, g, h; + for (g = new nib(new eib(a.f.b).a); g.b; ) { + f = lib(g); + e = BD(f.cd(), 594); + if (b == 1) { + if (e.gf() != (ead(), dad) && e.gf() != _9c) { + continue; + } + } else { + if (e.gf() != (ead(), aad) && e.gf() != bad) { + continue; + } + } + d = BD(BD(f.dd(), 46).b, 81); + h = BD(BD(f.dd(), 46).a, 189); + c = h.c; + switch (e.gf().g) { + case 2: + d.g.c = a.e.a; + d.g.b = $wnd.Math.max(1, d.g.b + c); + break; + case 1: + d.g.c = d.g.c + c; + d.g.b = $wnd.Math.max(1, d.g.b - c); + break; + case 4: + d.g.d = a.e.b; + d.g.a = $wnd.Math.max(1, d.g.a + c); + break; + case 3: + d.g.d = d.g.d + c; + d.g.a = $wnd.Math.max(1, d.g.a - c); + } + } + } + function nJc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + h = KC(WD, oje, 25, b.b.c.length, 15, 1); + j = KC(NQ, Kie, 267, b.b.c.length, 0, 1); + i = KC(OQ, kne, 10, b.b.c.length, 0, 1); + for (l = a.a, m = 0, n = l.length; m < n; ++m) { + k = l[m]; + p = 0; + for (g = new olb(k.e); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + d = G1b(e.c); + ++h[d]; + o2 = Edb(ED(vNb(b, (Nyc(), lyc)))); + h[d] > 0 && !!i[d] && (o2 = jBc(a.b, i[d], e)); + p = $wnd.Math.max(p, e.c.c.b + o2); + } + for (f = new olb(k.e); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + e.n.b = p + e.d.d; + c = e.c; + c.c.b = p + e.d.d + e.o.b + e.d.a; + j[Jkb(c.b.b, c, 0)] = e.k; + i[Jkb(c.b.b, c, 0)] = e; + } + } + } + function LXc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + for (d = new Sr(ur(_sd(b).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 79); + if (!JD(qud((!c.b && (c.b = new y5d(z2, c, 4, 7)), c.b), 0), 186)) { + i = atd(BD(qud((!c.c && (c.c = new y5d(z2, c, 5, 8)), c.c), 0), 82)); + if (!Pld(c)) { + g = b.i + b.g / 2; + h = b.j + b.f / 2; + k = i.i + i.g / 2; + l = i.j + i.f / 2; + m = new d7c(); + m.a = k - g; + m.b = l - h; + f = new f7c(m.a, m.b); + l6c(f, b.g, b.f); + m.a -= f.a; + m.b -= f.b; + g = k - m.a; + h = l - m.b; + j = new f7c(m.a, m.b); + l6c(j, i.g, i.f); + m.a -= j.a; + m.b -= j.b; + k = g + m.a; + l = h + m.b; + e = itd(c, true, true); + omd(e, g); + pmd(e, h); + hmd(e, k); + imd(e, l); + LXc(a, i); + } + } + } + } + function e0c(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Pre), "ELK SPOrE Compaction"), "ShrinkTree is a compaction algorithm that maintains the topology of a layout. The relocation of diagram elements is based on contracting a spanning tree."), new h0c()))); + p4c(a, Pre, Qre, Ksd(c0c)); + p4c(a, Pre, Rre, Ksd(__c)); + p4c(a, Pre, Sre, Ksd($_c)); + p4c(a, Pre, Tre, Ksd(Y_c)); + p4c(a, Pre, Ure, Ksd(Z_c)); + p4c(a, Pre, ame, X_c); + p4c(a, Pre, wme, 8); + p4c(a, Pre, Vre, Ksd(b0c)); + p4c(a, Pre, Wre, Ksd(T_c)); + p4c(a, Pre, Xre, Ksd(U_c)); + p4c(a, Pre, Zpe, (Bcb(), false)); + } + function JLc(a, b) { + var c, d, e, f, g, h, i, j, k, l; + Odd(b, "Simple node placement", 1); + l = BD(vNb(a, (wtc(), otc)), 304); + h = 0; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + d = BD(mlb(f), 29); + g = d.c; + g.b = 0; + c = null; + for (j = new olb(d.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + !!c && (g.b += hBc(i, c, l.c)); + g.b += i.d.d + i.o.b + i.d.a; + c = i; + } + h = $wnd.Math.max(h, g.b); + } + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + g = d.c; + k = (h - g.b) / 2; + c = null; + for (j = new olb(d.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + !!c && (k += hBc(i, c, l.c)); + k += i.d.d; + i.n.b = k; + k += i.o.b + i.d.a; + c = i; + } + } + Qdd(b); + } + function s2d(a, b, c, d) { + var e, f, g, h, i, j, k, l; + if (d.gc() == 0) { + return false; + } + i = (Q6d(), BD(b, 66).Oj()); + g = i ? d : new zud(d.gc()); + if (T6d(a.e, b)) { + if (b.hi()) { + for (k = d.Kc(); k.Ob(); ) { + j = k.Pb(); + if (!F2d(a, b, j, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + f = R6d(b, j); + g.Fc(f); + } + } + } else if (!i) { + for (k = d.Kc(); k.Ob(); ) { + j = k.Pb(); + f = R6d(b, j); + g.Fc(f); + } + } + } else { + l = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + for (h = 0; h < a.i; ++h) { + f = e[h]; + if (l.rl(f.ak())) { + throw vbb(new Wdb(Hwe)); + } + } + if (d.gc() > 1) { + throw vbb(new Wdb(Hwe)); + } + if (!i) { + f = R6d(b, d.Kc().Pb()); + g.Fc(f); + } + } + return xtd(a, I2d(a, b, c), g); + } + function Pmc(a, b) { + var c, d, e, f; + Jmc(b.b.j); + MAb(NAb(new YAb(null, new Kub(b.d, 16)), new $mc()), new anc()); + for (f = new olb(b.d); f.a < f.c.c.length; ) { + e = BD(mlb(f), 101); + switch (e.e.g) { + case 0: + c = BD(Ikb(e.j, 0), 113).d.j; + mjc(e, BD(Btb(RAb(BD(Qc(e.k, c), 15).Oc(), Hmc)), 113)); + njc(e, BD(Btb(QAb(BD(Qc(e.k, c), 15).Oc(), Hmc)), 113)); + break; + case 1: + d = Bkc(e); + mjc(e, BD(Btb(RAb(BD(Qc(e.k, d[0]), 15).Oc(), Hmc)), 113)); + njc(e, BD(Btb(QAb(BD(Qc(e.k, d[1]), 15).Oc(), Hmc)), 113)); + break; + case 2: + Rmc(a, e); + break; + case 3: + Qmc(e); + break; + case 4: + Omc(a, e); + } + Mmc(e); + } + a.a = null; + } + function $Mc(a, b, c) { + var d, e, f, g, h, i, j, k; + d = a.a.o == (eMc(), dMc) ? Pje : Qje; + h = _Mc(a, new ZMc(b, c)); + if (!h.a && h.c) { + Dsb(a.d, h); + return d; + } else if (h.a) { + e = h.a.c; + i = h.a.d; + if (c) { + j = a.a.c == (YLc(), XLc) ? i : e; + f = a.a.c == XLc ? e : i; + g = a.a.g[f.i.p]; + k = Edb(a.a.p[g.p]) + Edb(a.a.d[f.i.p]) + f.n.b + f.a.b - Edb(a.a.d[j.i.p]) - j.n.b - j.a.b; + } else { + j = a.a.c == (YLc(), WLc) ? i : e; + f = a.a.c == WLc ? e : i; + k = Edb(a.a.p[a.a.g[f.i.p].p]) + Edb(a.a.d[f.i.p]) + f.n.b + f.a.b - Edb(a.a.d[j.i.p]) - j.n.b - j.a.b; + } + a.a.n[a.a.g[e.i.p].p] = (Bcb(), true); + a.a.n[a.a.g[i.i.p].p] = true; + return k; + } + return d; + } + function f3d(a, b, c) { + var d, e, f, g, h, i, j, k; + if (T6d(a.e, b)) { + i = (Q6d(), BD(b, 66).Oj() ? new R7d(b, a) : new f7d(b, a)); + D2d(i.c, i.b); + b7d(i, BD(c, 14)); + } else { + k = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + e = d[g]; + f = e.ak(); + if (k.rl(f)) { + if (f == (m8d(), k8d) || f == h8d) { + j = m3d(a, b, c); + h = g; + j ? Xxd(a, g) : ++g; + while (g < a.i) { + e = d[g]; + f = e.ak(); + f == k8d || f == h8d ? Xxd(a, g) : ++g; + } + j || BD(Gtd(a, h, R6d(b, c)), 72); + } else + m3d(a, b, c) ? Xxd(a, g) : BD(Gtd(a, g, (Q6d(), BD(b, 66).Oj() ? BD(c, 72) : R6d(b, c))), 72); + return; + } + } + m3d(a, b, c) || wtd(a, (Q6d(), BD(b, 66).Oj() ? BD(c, 72) : R6d(b, c))); + } + } + function IMb(a, b, c) { + var d, e, f, g, h, i, j, k; + if (!pb(c, a.b)) { + a.b = c; + f = new LMb(); + g = BD(GAb(NAb(new YAb(null, new Kub(c.f, 16)), f), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + a.e = true; + a.f = true; + a.c = true; + a.d = true; + e = g.Hc((RMb(), OMb)); + d = g.Hc(PMb); + e && !d && (a.f = false); + !e && d && (a.d = false); + e = g.Hc(NMb); + d = g.Hc(QMb); + e && !d && (a.c = false); + !e && d && (a.e = false); + } + k = BD(a.a.Ce(b, c), 46); + i = BD(k.a, 19).a; + j = BD(k.b, 19).a; + h = false; + i < 0 ? a.c || (h = true) : a.e || (h = true); + j < 0 ? a.d || (h = true) : a.f || (h = true); + return h ? IMb(a, k, c) : k; + } + function oKb(a) { + var b, c, d, e; + e = a.o; + $Jb(); + if (a.A.dc() || pb(a.A, ZJb)) { + b = e.b; + } else { + b = fIb(a.f); + if (a.A.Hc((tdd(), qdd)) && !a.B.Hc((Idd(), Edd))) { + b = $wnd.Math.max(b, fIb(BD(Mpb(a.p, (Ucd(), zcd)), 244))); + b = $wnd.Math.max(b, fIb(BD(Mpb(a.p, Tcd), 244))); + } + c = aKb(a); + !!c && (b = $wnd.Math.max(b, c.b)); + if (a.A.Hc(rdd)) { + if (a.q == (dcd(), _bd) || a.q == $bd) { + b = $wnd.Math.max(b, _Gb(BD(Mpb(a.b, (Ucd(), zcd)), 124))); + b = $wnd.Math.max(b, _Gb(BD(Mpb(a.b, Tcd), 124))); + } + } + } + Ccb(DD(a.e.yf().We((Y9c(), $8c)))) ? e.b = $wnd.Math.max(e.b, b) : e.b = b; + d = a.f.i; + d.d = 0; + d.a = b; + iIb(a.f); + } + function $Ic(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + for (l = 0; l < b.length; l++) { + for (h = a.Kc(); h.Ob(); ) { + f = BD(h.Pb(), 225); + f.Of(l, b); + } + for (m = 0; m < b[l].length; m++) { + for (i = a.Kc(); i.Ob(); ) { + f = BD(i.Pb(), 225); + f.Pf(l, m, b); + } + p = b[l][m].j; + for (n = 0; n < p.c.length; n++) { + for (j = a.Kc(); j.Ob(); ) { + f = BD(j.Pb(), 225); + f.Qf(l, m, n, b); + } + o2 = (tCb(n, p.c.length), BD(p.c[n], 11)); + c = 0; + for (e = new b1b(o2.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + for (k = a.Kc(); k.Ob(); ) { + f = BD(k.Pb(), 225); + f.Nf(l, m, n, c++, d, b); + } + } + } + } + } + for (g = a.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 225); + f.Mf(); + } + } + function J4b(a, b) { + var c, d, e, f, g, h, i; + a.b = Edb(ED(vNb(b, (Nyc(), myc)))); + a.c = Edb(ED(vNb(b, pyc))); + a.d = BD(vNb(b, Xwc), 336); + a.a = BD(vNb(b, swc), 275); + H4b(b); + h = BD(GAb(JAb(JAb(LAb(LAb(new YAb(null, new Kub(b.b, 16)), new N4b()), new P4b()), new R4b()), new T4b()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + for (e = h.Kc(); e.Ob(); ) { + c = BD(e.Pb(), 17); + g = BD(vNb(c, (wtc(), rtc)), 15); + g.Jc(new V4b(a)); + yNb(c, rtc, null); + } + for (d = h.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 17); + i = BD(vNb(c, (wtc(), stc)), 17); + f = BD(vNb(c, ptc), 15); + B4b(a, f, i); + yNb(c, ptc, null); + } + } + function uZd(a) { + a.b = null; + a.a = null; + a.o = null; + a.q = null; + a.v = null; + a.w = null; + a.B = null; + a.p = null; + a.Q = null; + a.R = null; + a.S = null; + a.T = null; + a.U = null; + a.V = null; + a.W = null; + a.bb = null; + a.eb = null; + a.ab = null; + a.H = null; + a.db = null; + a.c = null; + a.d = null; + a.f = null; + a.n = null; + a.r = null; + a.s = null; + a.u = null; + a.G = null; + a.J = null; + a.e = null; + a.j = null; + a.i = null; + a.g = null; + a.k = null; + a.t = null; + a.F = null; + a.I = null; + a.L = null; + a.M = null; + a.O = null; + a.P = null; + a.$ = null; + a.N = null; + a.Z = null; + a.cb = null; + a.K = null; + a.D = null; + a.A = null; + a.C = null; + a._ = null; + a.fb = null; + a.X = null; + a.Y = null; + a.gb = false; + a.hb = false; + } + function bKc(a) { + var b, c, d, e, f, g, h, i, j; + if (a.k != (j0b(), h0b)) { + return false; + } + if (a.j.c.length <= 1) { + return false; + } + f = BD(vNb(a, (Nyc(), Vxc)), 98); + if (f == (dcd(), $bd)) { + return false; + } + e = (Izc(), (!a.q ? (mmb(), mmb(), kmb) : a.q)._b(Cxc) ? d = BD(vNb(a, Cxc), 197) : d = BD(vNb(Q_b(a), Dxc), 197), d); + if (e == Gzc) { + return false; + } + if (!(e == Fzc || e == Ezc)) { + g = Edb(ED(pBc(a, zyc))); + b = BD(vNb(a, yyc), 142); + !b && (b = new J_b(g, g, g, g)); + j = V_b(a, (Ucd(), Tcd)); + i = b.d + b.a + (j.gc() - 1) * g; + if (i > a.o.b) { + return false; + } + c = V_b(a, zcd); + h = b.d + b.a + (c.gc() - 1) * g; + if (h > a.o.b) { + return false; + } + } + return true; + } + function thb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + g = a.e; + i = b.e; + if (g == 0) { + return b; + } + if (i == 0) { + return a; + } + f = a.d; + h = b.d; + if (f + h == 2) { + c = xbb(a.a[0], Yje); + d = xbb(b.a[0], Yje); + if (g == i) { + k = wbb(c, d); + o2 = Tbb(k); + n = Tbb(Pbb(k, 32)); + return n == 0 ? new Ugb(g, o2) : new Vgb(g, 2, OC(GC(WD, 1), oje, 25, 15, [o2, n])); + } + return ghb(g < 0 ? Qbb(d, c) : Qbb(c, d)); + } else if (g == i) { + m = g; + l = f >= h ? uhb(a.a, f, b.a, h) : uhb(b.a, h, a.a, f); + } else { + e = f != h ? f > h ? 1 : -1 : whb(a.a, b.a, f); + if (e == 0) { + return Hgb(), Ggb; + } + if (e == 1) { + m = g; + l = zhb(a.a, f, b.a, h); + } else { + m = i; + l = zhb(b.a, h, a.a, f); + } + } + j = new Vgb(m, l.length, l); + Jgb(j); + return j; + } + function oZb(a, b, c, d, e, f, g) { + var h, i, j, k, l, m, n; + l = Ccb(DD(vNb(b, (Nyc(), vxc)))); + m = null; + f == (KAc(), HAc) && d.c.i == c ? m = d.c : f == IAc && d.d.i == c && (m = d.d); + j = g; + if (!j || !l || !!m) { + k = (Ucd(), Scd); + m ? k = m.j : fcd(BD(vNb(c, Vxc), 98)) && (k = f == HAc ? Tcd : zcd); + i = lZb(a, b, c, f, k, d); + h = kZb((Q_b(c), d)); + if (f == HAc) { + QZb(h, BD(Ikb(i.j, 0), 11)); + RZb(h, e); + } else { + QZb(h, e); + RZb(h, BD(Ikb(i.j, 0), 11)); + } + j = new yZb(d, h, i, BD(vNb(i, (wtc(), $sc)), 11), f, !m); + } else { + Ekb(j.e, d); + n = $wnd.Math.max(Edb(ED(vNb(j.d, Zwc))), Edb(ED(vNb(d, Zwc)))); + yNb(j.d, Zwc, n); + } + Rc(a.a, d, new BZb(j.d, b, f)); + return j; + } + function V1d(a, b) { + var c, d, e, f, g, h, i, j, k, l; + k = null; + !!a.d && (k = BD(Phb(a.d, b), 138)); + if (!k) { + f = a.a.Mh(); + l = f.i; + if (!a.d || Vhb(a.d) != l) { + i = new Lqb(); + !!a.d && Ld(i, a.d); + j = i.f.c + i.g.c; + for (h = j; h < l; ++h) { + d = BD(qud(f, h), 138); + e = o1d(a.e, d).ne(); + c = BD(e == null ? jrb(i.f, null, d) : Drb(i.g, e, d), 138); + !!c && c != d && (e == null ? jrb(i.f, null, c) : Drb(i.g, e, c)); + } + if (i.f.c + i.g.c != l) { + for (g = 0; g < j; ++g) { + d = BD(qud(f, g), 138); + e = o1d(a.e, d).ne(); + c = BD(e == null ? jrb(i.f, null, d) : Drb(i.g, e, d), 138); + !!c && c != d && (e == null ? jrb(i.f, null, c) : Drb(i.g, e, c)); + } + } + a.d = i; + } + k = BD(Phb(a.d, b), 138); + } + return k; + } + function lZb(a, b, c, d, e, f) { + var g, h, i, j, k, l; + g = null; + j = d == (KAc(), HAc) ? f.c : f.d; + i = a_b(b); + if (j.i == c) { + g = BD(Ohb(a.b, j), 10); + if (!g) { + g = Z$b(j, BD(vNb(c, (Nyc(), Vxc)), 98), e, hZb(j), null, j.n, j.o, i, b); + yNb(g, (wtc(), $sc), j); + Rhb(a.b, j, g); + } + } else { + g = Z$b((k = new zNb(), l = Edb(ED(vNb(b, (Nyc(), lyc)))) / 2, xNb(k, Uxc, l), k), BD(vNb(c, Vxc), 98), e, d == HAc ? -1 : 1, null, new d7c(), new f7c(0, 0), i, b); + h = mZb(g, c, d); + yNb(g, (wtc(), $sc), h); + Rhb(a.b, h, g); + } + BD(vNb(b, (wtc(), Ksc)), 21).Fc((Orc(), Hrc)); + fcd(BD(vNb(b, (Nyc(), Vxc)), 98)) ? yNb(b, Vxc, (dcd(), acd)) : yNb(b, Vxc, (dcd(), bcd)); + return g; + } + function vNc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + Odd(b, "Orthogonal edge routing", 1); + j = Edb(ED(vNb(a, (Nyc(), wyc)))); + c = Edb(ED(vNb(a, myc))); + d = Edb(ED(vNb(a, pyc))); + m = new tPc(0, c); + q = 0; + g = new Bib(a.b, 0); + h = null; + k = null; + i = null; + l = null; + do { + k = g.b < g.d.gc() ? (sCb(g.b < g.d.gc()), BD(g.d.Xb(g.c = g.b++), 29)) : null; + l = !k ? null : k.a; + if (h) { + h_b(h, q); + q += h.c.a; + } + p = !h ? q : q + d; + o2 = sPc(m, a, i, l, p); + e = !h || Kq(i, (FNc(), DNc)); + f = !k || Kq(l, (FNc(), DNc)); + if (o2 > 0) { + n = (o2 - 1) * c; + !!h && (n += d); + !!k && (n += d); + n < j && !e && !f && (n = j); + q += n; + } else + !e && !f && (q += j); + h = k; + i = l; + } while (k); + a.f.a = q; + Qdd(b); + } + function IEd() { + IEd = ccb; + var a; + HEd = new mFd(); + BEd = KC(ZI, nie, 2, 0, 6, 1); + uEd = Mbb(ZEd(33, 58), ZEd(1, 26)); + vEd = Mbb(ZEd(97, 122), ZEd(65, 90)); + wEd = ZEd(48, 57); + sEd = Mbb(uEd, 0); + tEd = Mbb(vEd, wEd); + xEd = Mbb(Mbb(0, ZEd(1, 6)), ZEd(33, 38)); + yEd = Mbb(Mbb(wEd, ZEd(65, 70)), ZEd(97, 102)); + EEd = Mbb(sEd, XEd("-_.!~*'()")); + FEd = Mbb(tEd, $Ed("-_.!~*'()")); + XEd(lve); + $Ed(lve); + Mbb(EEd, XEd(";:@&=+$,")); + Mbb(FEd, $Ed(";:@&=+$,")); + zEd = XEd(":/?#"); + AEd = $Ed(":/?#"); + CEd = XEd("/?#"); + DEd = $Ed("/?#"); + a = new Tqb(); + a.a.zc("jar", a); + a.a.zc("zip", a); + a.a.zc("archive", a); + GEd = (mmb(), new zob(a)); + } + function yUc(a, b) { + var c, d, e, f, g, h, i, j, k, l; + yNb(b, (mTc(), cTc), 0); + i = BD(vNb(b, aTc), 86); + if (b.d.b == 0) { + if (i) { + k = Edb(ED(vNb(i, fTc))) + a.a + zUc(i, b); + yNb(b, fTc, k); + } else { + yNb(b, fTc, 0); + } + } else { + for (d = (f = Jsb(new ZRc(b).a.d, 0), new aSc(f)); Wsb(d.a); ) { + c = BD(Xsb(d.a), 188).c; + yUc(a, c); + } + h = BD(pr((g = Jsb(new ZRc(b).a.d, 0), new aSc(g))), 86); + l = BD(or((e = Jsb(new ZRc(b).a.d, 0), new aSc(e))), 86); + j = (Edb(ED(vNb(l, fTc))) + Edb(ED(vNb(h, fTc)))) / 2; + if (i) { + k = Edb(ED(vNb(i, fTc))) + a.a + zUc(i, b); + yNb(b, fTc, k); + yNb(b, cTc, Edb(ED(vNb(b, fTc))) - j); + xUc(a, b); + } else { + yNb(b, fTc, j); + } + } + } + function Dbc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + h = 0; + o2 = 0; + i = tlb(a.f, a.f.length); + f = a.d; + g = a.i; + d = a.a; + e = a.b; + do { + n = 0; + for (k = new olb(a.p); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + m = Cbc(a, j); + c = true; + (a.q == (kAc(), dAc) || a.q == gAc) && (c = Ccb(DD(m.b))); + if (BD(m.a, 19).a < 0 && c) { + ++n; + i = tlb(a.f, a.f.length); + a.d = a.d + BD(m.a, 19).a; + o2 += f - a.d; + f = a.d + BD(m.a, 19).a; + g = a.i; + d = Mu(a.a); + e = Mu(a.b); + } else { + a.f = tlb(i, i.length); + a.d = f; + a.a = (Qb(d), d ? new Tkb(d) : Nu(new olb(d))); + a.b = (Qb(e), e ? new Tkb(e) : Nu(new olb(e))); + a.i = g; + } + } + ++h; + l = n != 0 && Ccb(DD(b.Kb(new vgd(meb(o2), meb(h))))); + } while (l); + } + function lYc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C; + g = a.f; + m = b.f; + h = g == (k$c(), f$c) || g == h$c; + n = m == f$c || m == h$c; + i = g == g$c || g == i$c; + o2 = m == g$c || m == i$c; + j = g == g$c || g == f$c; + p = m == g$c || m == f$c; + if (h && n) { + return a.f == h$c ? a : b; + } else if (i && o2) { + return a.f == i$c ? a : b; + } else if (j && p) { + if (g == g$c) { + l = a; + k = b; + } else { + l = b; + k = a; + } + f = (q = c.j + c.f, r = l.e + d.f, s = $wnd.Math.max(q, r), t = s - $wnd.Math.min(c.j, l.e), u = l.d + d.g - c.i, u * t); + e = (v = c.i + c.g, w = k.d + d.g, A = $wnd.Math.max(v, w), B = A - $wnd.Math.min(c.i, k.d), C = k.e + d.f - c.j, B * C); + return f <= e ? a.f == g$c ? a : b : a.f == f$c ? a : b; + } + return a; + } + function wGb(a) { + var b, c, d, e, f, g, h, i, j, k, l; + k = a.e.a.c.length; + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 121); + f.j = false; + } + a.i = KC(WD, oje, 25, k, 15, 1); + a.g = KC(WD, oje, 25, k, 15, 1); + a.n = new Rkb(); + e = 0; + l = new Rkb(); + for (i = new olb(a.e.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 121); + h.d = e++; + h.b.a.c.length == 0 && Ekb(a.n, h); + Gkb(l, h.g); + } + b = 0; + for (d = new olb(l); d.a < d.c.c.length; ) { + c = BD(mlb(d), 213); + c.c = b++; + c.f = false; + } + j = l.c.length; + if (a.b == null || a.b.length < j) { + a.b = KC(UD, Vje, 25, j, 15, 1); + a.c = KC(sbb, dle, 25, j, 16, 1); + } else { + Blb(a.c); + } + a.d = l; + a.p = new Asb(Cv(a.d.c.length)); + a.j = 1; + } + function sTb(a, b) { + var c, d, e, f, g, h, i, j, k; + if (b.e.c.length <= 1) { + return; + } + a.f = b; + a.d = BD(vNb(a.f, (bTb(), SSb)), 379); + a.g = BD(vNb(a.f, WSb), 19).a; + a.e = Edb(ED(vNb(a.f, TSb))); + a.c = Edb(ED(vNb(a.f, RSb))); + it(a.b); + for (e = new olb(a.f.c); e.a < e.c.c.length; ) { + d = BD(mlb(e), 282); + ht(a.b, d.c, d, null); + ht(a.b, d.d, d, null); + } + h = a.f.e.c.length; + a.a = IC(UD, [nie, Vje], [104, 25], 15, [h, h], 2); + for (j = new olb(a.f.e); j.a < j.c.c.length; ) { + i = BD(mlb(j), 144); + oTb(a, i, a.a[i.b]); + } + a.i = IC(UD, [nie, Vje], [104, 25], 15, [h, h], 2); + for (f = 0; f < h; ++f) { + for (g = 0; g < h; ++g) { + c = a.a[f][g]; + k = 1 / (c * c); + a.i[f][g] = k; + } + } + } + function Vfe(a) { + var b, c, d, e; + if (a.b == null || a.b.length <= 2) + return; + if (a.a) + return; + b = 0; + e = 0; + while (e < a.b.length) { + if (b != e) { + a.b[b] = a.b[e++]; + a.b[b + 1] = a.b[e++]; + } else + e += 2; + c = a.b[b + 1]; + while (e < a.b.length) { + if (c + 1 < a.b[e]) + break; + if (c + 1 == a.b[e]) { + a.b[b + 1] = a.b[e + 1]; + c = a.b[b + 1]; + e += 2; + } else if (c >= a.b[e + 1]) { + e += 2; + } else if (c < a.b[e + 1]) { + a.b[b + 1] = a.b[e + 1]; + c = a.b[b + 1]; + e += 2; + } else { + throw vbb(new hz("Token#compactRanges(): Internel Error: [" + a.b[b] + "," + a.b[b + 1] + "] [" + a.b[e] + "," + a.b[e + 1] + "]")); + } + } + b += 2; + } + if (b != a.b.length) { + d = KC(WD, oje, 25, b, 15, 1); + $fb(a.b, 0, d, 0, b); + a.b = d; + } + a.a = true; + } + function pZb(a, b) { + var c, d, e, f, g, h, i; + for (g = Ec(a.a).Kc(); g.Ob(); ) { + f = BD(g.Pb(), 17); + if (f.b.c.length > 0) { + d = new Tkb(BD(Qc(a.a, f), 21)); + mmb(); + Okb(d, new EZb(b)); + e = new Bib(f.b, 0); + while (e.b < e.d.gc()) { + c = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 70)); + h = -1; + switch (BD(vNb(c, (Nyc(), Qwc)), 272).g) { + case 1: + h = d.c.length - 1; + break; + case 0: + h = nZb(d); + break; + case 2: + h = 0; + } + if (h != -1) { + i = (tCb(h, d.c.length), BD(d.c[h], 243)); + Ekb(i.b.b, c); + BD(vNb(Q_b(i.b.c.i), (wtc(), Ksc)), 21).Fc((Orc(), Grc)); + BD(vNb(Q_b(i.b.c.i), Ksc), 21).Fc(Erc); + uib(e); + yNb(c, btc, f); + } + } + } + QZb(f, null); + RZb(f, null); + } + } + function FLb(a, b) { + var c, d, e, f; + c = new KLb(); + d = BD(GAb(NAb(new YAb(null, new Kub(a.f, 16)), c), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + e = d.gc(); + e = e == 2 ? 1 : 0; + e == 1 && Bbb(Hbb(BD(GAb(JAb(d.Lc(), new MLb()), Xyb(Aeb(0), new Czb())), 162).a, 2), 0) && (e = 0); + d = BD(GAb(NAb(new YAb(null, new Kub(b.f, 16)), c), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [Eyb, Dyb]))), 21); + f = d.gc(); + f = f == 2 ? 1 : 0; + f == 1 && Bbb(Hbb(BD(GAb(JAb(d.Lc(), new OLb()), Xyb(Aeb(0), new Czb())), 162).a, 2), 0) && (f = 0); + if (e < f) { + return -1; + } + if (e == f) { + return 0; + } + return 1; + } + function h6b(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n; + j = new Rkb(); + if (!wNb(a, (wtc(), Fsc))) { + return j; + } + for (d = BD(vNb(a, Fsc), 15).Kc(); d.Ob(); ) { + b = BD(d.Pb(), 10); + g6b(b, a); + j.c[j.c.length] = b; + } + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k != (j0b(), e0b)) { + continue; + } + i = BD(vNb(g, Gsc), 10); + !!i && (k = new H0b(), F0b(k, g), l = BD(vNb(g, Hsc), 61), G0b(k, l), m = BD(Ikb(i.j, 0), 11), n = new UZb(), QZb(n, k), RZb(n, m), void 0); + } + } + for (c = new olb(j); c.a < c.c.c.length; ) { + b = BD(mlb(c), 10); + $_b(b, BD(Ikb(a.b, a.b.c.length - 1), 29)); + } + return j; + } + function M1b(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + b = mpd(a); + f = Ccb(DD(hkd(b, (Nyc(), fxc)))); + k = 0; + e = 0; + for (j = new Fyd((!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); j.e != j.i.gc(); ) { + i = BD(Dyd(j), 79); + h = Qld(i); + g = h && f && Ccb(DD(hkd(i, gxc))); + m = atd(BD(qud((!i.c && (i.c = new y5d(z2, i, 5, 8)), i.c), 0), 82)); + h && g ? ++e : h && !g ? ++k : Xod(m) == b || m == b ? ++e : ++k; + } + for (d = new Fyd((!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 79); + h = Qld(c); + g = h && f && Ccb(DD(hkd(c, gxc))); + l = atd(BD(qud((!c.b && (c.b = new y5d(z2, c, 4, 7)), c.b), 0), 82)); + h && g ? ++k : h && !g ? ++e : Xod(l) == b || l == b ? ++k : ++e; + } + return k - e; + } + function ubc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + Odd(b, "Edge splitting", 1); + if (a.b.c.length <= 2) { + Qdd(b); + return; + } + f = new Bib(a.b, 0); + g = (sCb(f.b < f.d.gc()), BD(f.d.Xb(f.c = f.b++), 29)); + while (f.b < f.d.gc()) { + e = g; + g = (sCb(f.b < f.d.gc()), BD(f.d.Xb(f.c = f.b++), 29)); + for (i = new olb(e.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + for (k = new olb(h.j); k.a < k.c.c.length; ) { + j = BD(mlb(k), 11); + for (d = new olb(j.g); d.a < d.c.c.length; ) { + c = BD(mlb(d), 17); + m = c.d; + l = m.i.c; + l != e && l != g && zbc(c, (n = new b0b(a), __b(n, (j0b(), g0b)), yNb(n, (wtc(), $sc), c), yNb(n, (Nyc(), Vxc), (dcd(), $bd)), $_b(n, g), n)); + } + } + } + } + Qdd(b); + } + function MTb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + h = b.p != null && !b.b; + h || Odd(b, kme, 1); + c = BD(vNb(a, (wtc(), itc)), 15); + g = 1 / c.gc(); + if (b.n) { + Sdd(b, "ELK Layered uses the following " + c.gc() + " modules:"); + n = 0; + for (m = c.Kc(); m.Ob(); ) { + k = BD(m.Pb(), 51); + d = (n < 10 ? "0" : "") + n++; + Sdd(b, " Slot " + d + ": " + hdb(rb(k))); + } + } + for (l = c.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 51); + k.pf(a, Udd(b, g)); + } + for (f = new olb(a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + Gkb(a.a, e.a); + e.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + for (j = new olb(a.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + $_b(i, null); + } + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + h || Qdd(b); + } + function kJc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A; + d = Edb(ED(vNb(b, (Nyc(), Bxc)))); + v = BD(vNb(b, Ayc), 19).a; + m = 4; + e = 3; + w = 20 / v; + n = false; + i = 0; + g = Ohe; + do { + f = i != 1; + l = i != 0; + A = 0; + for (q = a.a, s = 0, u = q.length; s < u; ++s) { + o2 = q[s]; + o2.f = null; + lJc(a, o2, f, l, d); + A += $wnd.Math.abs(o2.a); + } + do { + h = pJc(a, b); + } while (h); + for (p = a.a, r = 0, t = p.length; r < t; ++r) { + o2 = p[r]; + c = xJc(o2).a; + if (c != 0) { + for (k = new olb(o2.e); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + j.n.b += c; + } + } + } + if (i == 0 || i == 1) { + --m; + if (m <= 0 && (A < g || -m > v)) { + i = 2; + g = Ohe; + } else if (i == 0) { + i = 1; + g = A; + } else { + i = 0; + g = A; + } + } else { + n = A >= g || g - A < w; + g = A; + n && --e; + } + } while (!(n && e <= 0)); + } + function UCb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2; + o2 = new Lqb(); + for (f = a.a.ec().Kc(); f.Ob(); ) { + d = BD(f.Pb(), 168); + Rhb(o2, d, c.Je(d)); + } + g = (Qb(a), a ? new Tkb(a) : Nu(a.a.ec().Kc())); + Okb(g, new WCb(o2)); + h = Gx(g); + i = new hDb(b); + n = new Lqb(); + jrb(n.f, b, i); + while (h.a.gc() != 0) { + j = null; + k = null; + l = null; + for (e = h.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 168); + if (Edb(ED(Wd(irb(o2.f, d)))) <= Pje) { + if (Mhb(n, d.a) && !Mhb(n, d.b)) { + k = d.b; + l = d.a; + j = d; + break; + } + if (Mhb(n, d.b)) { + if (!Mhb(n, d.a)) { + k = d.a; + l = d.b; + j = d; + break; + } + } + } + } + if (!j) { + break; + } + m = new hDb(k); + Ekb(BD(Wd(irb(n.f, l)), 221).a, m); + jrb(n.f, k, m); + h.a.Bc(j) != null; + } + return i; + } + function UBc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + Odd(c, "Depth-first cycle removal", 1); + l = b.a; + k = l.c.length; + a.c = new Rkb(); + a.d = KC(sbb, dle, 25, k, 16, 1); + a.a = KC(sbb, dle, 25, k, 16, 1); + a.b = new Rkb(); + g = 0; + for (j = new olb(l); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + i.p = g; + Qq(R_b(i)) && Ekb(a.c, i); + ++g; + } + for (n = new olb(a.c); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + TBc(a, m); + } + for (f = 0; f < k; f++) { + if (!a.d[f]) { + h = (tCb(f, l.c.length), BD(l.c[f], 10)); + TBc(a, h); + } + } + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + PZb(d, true); + yNb(b, (wtc(), Asc), (Bcb(), true)); + } + a.c = null; + a.d = null; + a.a = null; + a.b = null; + Qdd(c); + } + function PSc(a, b) { + var c, d, e, f, g, h, i; + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + for (d = Jsb(b.b, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 86); + if (c.b.b == 0) { + yNb(c, (mTc(), jTc), (Bcb(), true)); + Ekb(a.a, c); + } + } + switch (a.a.c.length) { + case 0: + e = new XRc(0, b, "DUMMY_ROOT"); + yNb(e, (mTc(), jTc), (Bcb(), true)); + yNb(e, YSc, true); + Dsb(b.b, e); + break; + case 1: + break; + default: + f = new XRc(0, b, "SUPER_ROOT"); + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 86); + i = new QRc(f, g); + yNb(i, (mTc(), YSc), (Bcb(), true)); + Dsb(f.a.a, i); + Dsb(f.d, i); + Dsb(g.b, i); + yNb(g, jTc, false); + } + yNb(f, (mTc(), jTc), (Bcb(), true)); + yNb(f, YSc, true); + Dsb(b.b, f); + } + } + function z6c(a, b) { + i6c(); + var c, d, e, f, g, h; + f = b.c - (a.c + a.b); + e = a.c - (b.c + b.b); + g = a.d - (b.d + b.a); + c = b.d - (a.d + a.a); + d = $wnd.Math.max(e, f); + h = $wnd.Math.max(g, c); + Iy(); + My(Jqe); + if (($wnd.Math.abs(d) <= Jqe || d == 0 || isNaN(d) && isNaN(0) ? 0 : d < 0 ? -1 : d > 0 ? 1 : Ny(isNaN(d), isNaN(0))) >= 0 ^ (My(Jqe), ($wnd.Math.abs(h) <= Jqe || h == 0 || isNaN(h) && isNaN(0) ? 0 : h < 0 ? -1 : h > 0 ? 1 : Ny(isNaN(h), isNaN(0))) >= 0)) { + return $wnd.Math.max(h, d); + } + My(Jqe); + if (($wnd.Math.abs(d) <= Jqe || d == 0 || isNaN(d) && isNaN(0) ? 0 : d < 0 ? -1 : d > 0 ? 1 : Ny(isNaN(d), isNaN(0))) > 0) { + return $wnd.Math.sqrt(h * h + d * d); + } + return -$wnd.Math.sqrt(h * h + d * d); + } + function Kge(a, b) { + var c, d, e, f, g, h; + if (!b) + return; + !a.a && (a.a = new Wvb()); + if (a.e == 2) { + Tvb(a.a, b); + return; + } + if (b.e == 1) { + for (e = 0; e < b.em(); e++) + Kge(a, b.am(e)); + return; + } + h = a.a.a.c.length; + if (h == 0) { + Tvb(a.a, b); + return; + } + g = BD(Uvb(a.a, h - 1), 117); + if (!((g.e == 0 || g.e == 10) && (b.e == 0 || b.e == 10))) { + Tvb(a.a, b); + return; + } + f = b.e == 0 ? 2 : b.bm().length; + if (g.e == 0) { + c = new Ifb(); + d = g._l(); + d >= Tje ? Efb(c, Tee(d)) : Afb(c, d & aje); + g = new Hge(10, null, 0); + Vvb(a.a, g, h - 1); + } else { + c = (g.bm().length + f, new Ifb()); + Efb(c, g.bm()); + } + if (b.e == 0) { + d = b._l(); + d >= Tje ? Efb(c, Tee(d)) : Afb(c, d & aje); + } else { + Efb(c, b.bm()); + } + BD(g, 521).b = c.a; + } + function rgb(a) { + var b, c, d, e, f; + if (a.g != null) { + return a.g; + } + if (a.a < 32) { + a.g = rhb(Cbb(a.f), QD(a.e)); + return a.g; + } + e = shb((!a.c && (a.c = fhb(a.f)), a.c), 0); + if (a.e == 0) { + return e; + } + b = (!a.c && (a.c = fhb(a.f)), a.c).e < 0 ? 2 : 1; + c = e.length; + d = -a.e + c - b; + f = new Ufb(); + f.a += "" + e; + if (a.e > 0 && d >= -6) { + if (d >= 0) { + Tfb(f, c - QD(a.e), String.fromCharCode(46)); + } else { + f.a = qfb(f.a, 0, b - 1) + "0." + pfb(f.a, b - 1); + Tfb(f, b + 1, zfb(egb, 0, -QD(d) - 1)); + } + } else { + if (c - b >= 1) { + Tfb(f, b, String.fromCharCode(46)); + ++c; + } + Tfb(f, c, String.fromCharCode(69)); + d > 0 && Tfb(f, ++c, String.fromCharCode(43)); + Tfb(f, ++c, "" + Ubb(Cbb(d))); + } + a.g = f.a; + return a.g; + } + function npc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + if (c.dc()) { + return; + } + h = 0; + m = 0; + d = c.Kc(); + o2 = BD(d.Pb(), 19).a; + while (h < b.f) { + if (h == o2) { + m = 0; + d.Ob() ? o2 = BD(d.Pb(), 19).a : o2 = b.f + 1; + } + if (h != m) { + q = BD(Ikb(a.b, h), 29); + n = BD(Ikb(a.b, m), 29); + p = Mu(q.a); + for (l = new olb(p); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + Z_b(k, n.a.c.length, n); + if (m == 0) { + g = Mu(R_b(k)); + for (f = new olb(g); f.a < f.c.c.length; ) { + e = BD(mlb(f), 17); + PZb(e, true); + yNb(a, (wtc(), Asc), (Bcb(), true)); + Noc(a, e, 1); + } + } + } + } + ++m; + ++h; + } + i = new Bib(a.b, 0); + while (i.b < i.d.gc()) { + j = (sCb(i.b < i.d.gc()), BD(i.d.Xb(i.c = i.b++), 29)); + j.a.c.length == 0 && uib(i); + } + } + function xmc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + g = b.b; + k = g.o; + i = g.d; + d = Edb(ED(c_b(g, (Nyc(), lyc)))); + e = Edb(ED(c_b(g, nyc))); + j = Edb(ED(c_b(g, xyc))); + h = new L_b(); + v_b(h, i.d, i.c, i.a, i.b); + m = tmc(b, d, e, j); + for (r = new olb(b.d); r.a < r.c.c.length; ) { + q = BD(mlb(r), 101); + for (o2 = q.f.a.ec().Kc(); o2.Ob(); ) { + n = BD(o2.Pb(), 409); + f = n.a; + l = rmc(n); + c = (s = new s7c(), pmc(n, n.c, m, s), omc(n, l, m, s), pmc(n, n.d, m, s), s); + c = a.Uf(n, l, c); + Osb(f.a); + ye(f.a, c); + MAb(new YAb(null, new Kub(c, 16)), new Bmc(k, h)); + } + p = q.i; + if (p) { + wmc(q, p, m, e); + t = new g7c(p.g); + ymc(k, h, t); + P6c(t, p.j); + ymc(k, h, t); + } + } + v_b(i, h.d, h.c, h.a, h.b); + } + function rgc(a, b, c) { + var d, e, f; + e = BD(vNb(b, (Nyc(), swc)), 275); + if (e == (yrc(), wrc)) { + return; + } + Odd(c, "Horizontal Compaction", 1); + a.a = b; + f = new Ygc(); + d = new cEb((f.d = b, f.c = BD(vNb(f.d, Swc), 218), Pgc(f), Wgc(f), Vgc(f), f.a)); + aEb(d, a.b); + switch (BD(vNb(b, rwc), 422).g) { + case 1: + $Db(d, new jfc(a.a)); + break; + default: + $Db(d, (ODb(), MDb)); + } + switch (e.g) { + case 1: + TDb(d); + break; + case 2: + TDb(SDb(d, (ead(), bad))); + break; + case 3: + TDb(_Db(SDb(TDb(d), (ead(), bad)), new Bgc())); + break; + case 4: + TDb(_Db(SDb(TDb(d), (ead(), bad)), new Dgc(f))); + break; + case 5: + TDb(ZDb(d, pgc)); + } + SDb(d, (ead(), aad)); + d.e = true; + Mgc(f); + Qdd(c); + } + function mYc(a, b, c, d, e, f, g, h) { + var i, j, k, l; + i = Ou(OC(GC(z_, 1), Uhe, 220, 0, [b, c, d, e])); + l = null; + switch (a.b.g) { + case 1: + l = Ou(OC(GC(o_, 1), Uhe, 526, 0, [new uYc(), new oYc(), new qYc()])); + break; + case 0: + l = Ou(OC(GC(o_, 1), Uhe, 526, 0, [new qYc(), new oYc(), new uYc()])); + break; + case 2: + l = Ou(OC(GC(o_, 1), Uhe, 526, 0, [new oYc(), new uYc(), new qYc()])); + } + for (k = new olb(l); k.a < k.c.c.length; ) { + j = BD(mlb(k), 526); + i.c.length > 1 && (i = j.mg(i, a.a, h)); + } + if (i.c.length == 1) { + return BD(Ikb(i, i.c.length - 1), 220); + } + if (i.c.length == 2) { + return lYc((tCb(0, i.c.length), BD(i.c[0], 220)), (tCb(1, i.c.length), BD(i.c[1], 220)), g, f); + } + return null; + } + function JNb(a) { + var b, c, d, e, f, g; + Hkb(a.a, new PNb()); + for (c = new olb(a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 221); + d = c7c(R6c(BD(a.b, 65).c), BD(b.b, 65).c); + if (FNb) { + g = BD(a.b, 65).b; + f = BD(b.b, 65).b; + if ($wnd.Math.abs(d.a) >= $wnd.Math.abs(d.b)) { + d.b = 0; + f.d + f.a > g.d && f.d < g.d + g.a && $6c(d, $wnd.Math.max(g.c - (f.c + f.b), f.c - (g.c + g.b))); + } else { + d.a = 0; + f.c + f.b > g.c && f.c < g.c + g.b && $6c(d, $wnd.Math.max(g.d - (f.d + f.a), f.d - (g.d + g.a))); + } + } else { + $6c(d, _Nb(BD(a.b, 65), BD(b.b, 65))); + } + e = $wnd.Math.sqrt(d.a * d.a + d.b * d.b); + e = LNb(GNb, b, e, d); + $6c(d, e); + $Nb(BD(b.b, 65), d); + Hkb(b.a, new RNb(d)); + BD(GNb.b, 65); + KNb(GNb, HNb, b); + } + } + function VJc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2; + a.f = new KFb(); + j = 0; + e = 0; + for (g = new olb(a.e.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + for (i = new olb(f.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + h.p = j++; + for (d = new Sr(ur(U_b(h).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 17); + c.p = e++; + } + b = bKc(h); + for (m = new olb(h.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + if (b) { + o2 = l.a.b; + if (o2 != $wnd.Math.floor(o2)) { + k = o2 - Sbb(Cbb($wnd.Math.round(o2))); + l.a.b -= k; + } + } + n = l.n.b + l.a.b; + if (n != $wnd.Math.floor(n)) { + k = n - Sbb(Cbb($wnd.Math.round(n))); + l.n.b -= k; + } + } + } + } + a.g = j; + a.b = e; + a.i = KC(xY, Uhe, 401, j, 0, 1); + a.c = KC(wY, Uhe, 649, e, 0, 1); + a.d.a.$b(); + } + function Uxd(a) { + var b, c, d, e, f, g, h, i, j; + if (a.ej()) { + i = a.fj(); + if (a.i > 0) { + b = new _zd(a.i, a.g); + c = a.i; + f = c < 100 ? null : new Ixd(c); + if (a.ij()) { + for (d = 0; d < a.i; ++d) { + g = a.g[d]; + f = a.kj(g, f); + } + } + oud(a); + e = c == 1 ? a.Zi(4, qud(b, 0), null, 0, i) : a.Zi(6, b, null, -1, i); + if (a.bj()) { + for (d = new $yd(b); d.e != d.i.gc(); ) { + f = a.dj(Zyd(d), f); + } + if (!f) { + a.$i(e); + } else { + f.Ei(e); + f.Fi(); + } + } else { + if (!f) { + a.$i(e); + } else { + f.Ei(e); + f.Fi(); + } + } + } else { + oud(a); + a.$i(a.Zi(6, (mmb(), jmb), null, -1, i)); + } + } else if (a.bj()) { + if (a.i > 0) { + h = a.g; + j = a.i; + oud(a); + f = j < 100 ? null : new Ixd(j); + for (d = 0; d < j; ++d) { + g = h[d]; + f = a.dj(g, f); + } + !!f && f.Fi(); + } else { + oud(a); + } + } else { + oud(a); + } + } + function ZQc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + TQc(this); + c == (FQc(), DQc) ? Qqb(this.r, a) : Qqb(this.w, a); + k = Pje; + j = Qje; + for (g = b.a.ec().Kc(); g.Ob(); ) { + e = BD(g.Pb(), 46); + h = BD(e.a, 455); + d = BD(e.b, 17); + i = d.c; + i == a && (i = d.d); + h == DQc ? Qqb(this.r, i) : Qqb(this.w, i); + m = (Ucd(), Lcd).Hc(i.j) ? Edb(ED(vNb(i, (wtc(), qtc)))) : l7c(OC(GC(m1, 1), nie, 8, 0, [i.i.n, i.n, i.a])).b; + k = $wnd.Math.min(k, m); + j = $wnd.Math.max(j, m); + } + l = (Ucd(), Lcd).Hc(a.j) ? Edb(ED(vNb(a, (wtc(), qtc)))) : l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a])).b; + XQc(this, l, k, j); + for (f = b.a.ec().Kc(); f.Ob(); ) { + e = BD(f.Pb(), 46); + UQc(this, BD(e.b, 17)); + } + this.o = false; + } + function gD(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G; + c = a.l & 8191; + d = a.l >> 13 | (a.m & 15) << 9; + e = a.m >> 4 & 8191; + f = a.m >> 17 | (a.h & 255) << 5; + g = (a.h & 1048320) >> 8; + h = b.l & 8191; + i = b.l >> 13 | (b.m & 15) << 9; + j = b.m >> 4 & 8191; + k = b.m >> 17 | (b.h & 255) << 5; + l = (b.h & 1048320) >> 8; + B = c * h; + C = d * h; + D = e * h; + F = f * h; + G = g * h; + if (i != 0) { + C += c * i; + D += d * i; + F += e * i; + G += f * i; + } + if (j != 0) { + D += c * j; + F += d * j; + G += e * j; + } + if (k != 0) { + F += c * k; + G += d * k; + } + l != 0 && (G += c * l); + n = B & Eje; + o2 = (C & 511) << 13; + m = n + o2; + q = B >> 22; + r = C >> 9; + s = (D & 262143) << 4; + t = (F & 31) << 17; + p = q + r + s + t; + v = D >> 18; + w = F >> 5; + A = (G & 4095) << 8; + u = v + w + A; + p += m >> 22; + m &= Eje; + u += p >> 22; + p &= Eje; + u &= Fje; + return TC(m, p, u); + } + function o7b(a) { + var b, c, d, e, f, g, h; + h = BD(Ikb(a.j, 0), 11); + if (h.g.c.length != 0 && h.e.c.length != 0) { + throw vbb(new Zdb("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.")); + } + if (h.g.c.length != 0) { + f = Pje; + for (c = new olb(h.g); c.a < c.c.c.length; ) { + b = BD(mlb(c), 17); + g = b.d.i; + d = BD(vNb(g, (Nyc(), txc)), 142); + f = $wnd.Math.min(f, g.n.a - d.b); + } + return new cc(Qb(f)); + } + if (h.e.c.length != 0) { + e = Qje; + for (c = new olb(h.e); c.a < c.c.c.length; ) { + b = BD(mlb(c), 17); + g = b.c.i; + d = BD(vNb(g, (Nyc(), txc)), 142); + e = $wnd.Math.max(e, g.n.a + g.o.a + d.c); + } + return new cc(Qb(e)); + } + return wb(), wb(), vb; + } + function ELd(a, b) { + var c, d, e, f, g, h, i; + if (a.Fk()) { + if (a.i > 4) { + if (a.wj(b)) { + if (a.rk()) { + e = BD(b, 49); + d = e.Ug(); + i = d == a.e && (a.Dk() ? e.Og(e.Vg(), a.zk()) == a.Ak() : -1 - e.Vg() == a.aj()); + if (a.Ek() && !i && !d && !!e.Zg()) { + for (f = 0; f < a.i; ++f) { + c = a.Gk(BD(a.g[f], 56)); + if (PD(c) === PD(b)) { + return true; + } + } + } + return i; + } else if (a.Dk() && !a.Ck()) { + g = BD(b, 56).ah(zUd(BD(a.ak(), 18))); + if (PD(g) === PD(a.e)) { + return true; + } else if (g == null || !BD(g, 56).kh()) { + return false; + } + } + } else { + return false; + } + } + h = pud(a, b); + if (a.Ek() && !h) { + for (f = 0; f < a.i; ++f) { + e = a.Gk(BD(a.g[f], 56)); + if (PD(e) === PD(b)) { + return true; + } + } + } + return h; + } else { + return pud(a, b); + } + } + function mHc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + k = new Rkb(); + m = new Tqb(); + g = b.b; + for (e = 0; e < g.c.length; e++) { + j = (tCb(e, g.c.length), BD(g.c[e], 29)).a; + k.c = KC(SI, Uhe, 1, 0, 5, 1); + for (f = 0; f < j.c.length; f++) { + h = a.a[e][f]; + h.p = f; + h.k == (j0b(), i0b) && (k.c[k.c.length] = h, true); + Nkb(BD(Ikb(b.b, e), 29).a, f, h); + h.j.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(h.j, BD(BD(Ikb(a.b, e), 15).Xb(f), 14)); + ecd(BD(vNb(h, (Nyc(), Vxc)), 98)) || yNb(h, Vxc, (dcd(), Zbd)); + } + for (d = new olb(k); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + l = kHc(c); + m.a.zc(l, m); + m.a.zc(c, m); + } + } + for (i = m.a.ec().Kc(); i.Ob(); ) { + h = BD(i.Pb(), 10); + mmb(); + Okb(h.j, (Occ(), Icc)); + h.i = true; + N_b(h); + } + } + function g6b(a, b) { + var c, d, e, f, g, h, i, j, k, l; + k = BD(vNb(a, (wtc(), Hsc)), 61); + d = BD(Ikb(a.j, 0), 11); + k == (Ucd(), Acd) ? G0b(d, Rcd) : k == Rcd && G0b(d, Acd); + if (BD(vNb(b, (Nyc(), Fxc)), 174).Hc((tdd(), sdd))) { + i = Edb(ED(vNb(a, tyc))); + j = Edb(ED(vNb(a, uyc))); + g = Edb(ED(vNb(a, ryc))); + h = BD(vNb(b, Yxc), 21); + if (h.Hc((rcd(), ncd))) { + c = j; + l = a.o.a / 2 - d.n.a; + for (f = new olb(d.f); f.a < f.c.c.length; ) { + e = BD(mlb(f), 70); + e.n.b = c; + e.n.a = l - e.o.a / 2; + c += e.o.b + g; + } + } else if (h.Hc(pcd)) { + for (f = new olb(d.f); f.a < f.c.c.length; ) { + e = BD(mlb(f), 70); + e.n.a = i + a.o.a - d.n.a; + } + } + WGb(new YGb((a$b(), new l$b(b, false, false, new T$b()))), new x$b(null, a, false)); + } + } + function Ugc(a, b) { + var c, d, e, f, g, h, i, j, k; + if (b.c.length == 0) { + return; + } + mmb(); + Mlb(b.c, b.c.length, null); + e = new olb(b); + d = BD(mlb(e), 145); + while (e.a < e.c.c.length) { + c = BD(mlb(e), 145); + if (ADb(d.e.c, c.e.c) && !(DDb(B6c(d.e).b, c.e.d) || DDb(B6c(c.e).b, d.e.d))) { + d = (Gkb(d.k, c.k), Gkb(d.b, c.b), Gkb(d.c, c.c), ye(d.i, c.i), Gkb(d.d, c.d), Gkb(d.j, c.j), f = $wnd.Math.min(d.e.c, c.e.c), g = $wnd.Math.min(d.e.d, c.e.d), h = $wnd.Math.max(d.e.c + d.e.b, c.e.c + c.e.b), i = h - f, j = $wnd.Math.max(d.e.d + d.e.a, c.e.d + c.e.a), k = j - g, G6c(d.e, f, g, i, k), hEb(d.f, c.f), !d.a && (d.a = c.a), Gkb(d.g, c.g), Ekb(d.g, c), d); + } else { + Xgc(a, d); + d = c; + } + } + Xgc(a, d); + } + function e_b(a, b, c, d) { + var e, f, g, h, i, j; + h = a.j; + if (h == (Ucd(), Scd) && b != (dcd(), bcd) && b != (dcd(), ccd)) { + h = W$b(a, c); + G0b(a, h); + !(!a.q ? (mmb(), mmb(), kmb) : a.q)._b((Nyc(), Uxc)) && h != Scd && (a.n.a != 0 || a.n.b != 0) && yNb(a, Uxc, V$b(a, h)); + } + if (b == (dcd(), _bd)) { + j = 0; + switch (h.g) { + case 1: + case 3: + f = a.i.o.a; + f > 0 && (j = a.n.a / f); + break; + case 2: + case 4: + e = a.i.o.b; + e > 0 && (j = a.n.b / e); + } + yNb(a, (wtc(), htc), j); + } + i = a.o; + g = a.a; + if (d) { + g.a = d.a; + g.b = d.b; + a.d = true; + } else if (b != bcd && b != ccd && h != Scd) { + switch (h.g) { + case 1: + g.a = i.a / 2; + break; + case 2: + g.a = i.a; + g.b = i.b / 2; + break; + case 3: + g.a = i.a / 2; + g.b = i.b; + break; + case 4: + g.b = i.b / 2; + } + } else { + g.a = i.a / 2; + g.b = i.b / 2; + } + } + function vwd(a) { + var b, c, d, e, f, g, h, i, j, k; + if (a.ej()) { + k = a.Vi(); + i = a.fj(); + if (k > 0) { + b = new Aud(a.Gi()); + c = k; + f = c < 100 ? null : new Ixd(c); + Cvd(a, c, b.g); + e = c == 1 ? a.Zi(4, qud(b, 0), null, 0, i) : a.Zi(6, b, null, -1, i); + if (a.bj()) { + for (d = new Fyd(b); d.e != d.i.gc(); ) { + f = a.dj(Dyd(d), f); + } + if (!f) { + a.$i(e); + } else { + f.Ei(e); + f.Fi(); + } + } else { + if (!f) { + a.$i(e); + } else { + f.Ei(e); + f.Fi(); + } + } + } else { + Cvd(a, a.Vi(), a.Wi()); + a.$i(a.Zi(6, (mmb(), jmb), null, -1, i)); + } + } else if (a.bj()) { + k = a.Vi(); + if (k > 0) { + h = a.Wi(); + j = k; + Cvd(a, k, h); + f = j < 100 ? null : new Ixd(j); + for (d = 0; d < j; ++d) { + g = h[d]; + f = a.dj(g, f); + } + !!f && f.Fi(); + } else { + Cvd(a, a.Vi(), a.Wi()); + } + } else { + Cvd(a, a.Vi(), a.Wi()); + } + } + function LEc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + for (h = new olb(b); h.a < h.c.c.length; ) { + f = BD(mlb(h), 233); + f.e = null; + f.c = 0; + } + i = null; + for (g = new olb(b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 233); + l = f.d[0]; + if (c && l.k != (j0b(), h0b)) { + continue; + } + for (n = BD(vNb(l, (wtc(), Qsc)), 15).Kc(); n.Ob(); ) { + m = BD(n.Pb(), 10); + if (!c || m.k == (j0b(), h0b)) { + (!f.e && (f.e = new Rkb()), f.e).Fc(a.b[m.c.p][m.p]); + ++a.b[m.c.p][m.p].c; + } + } + if (!c && l.k == (j0b(), h0b)) { + if (i) { + for (k = BD(Qc(a.d, i), 21).Kc(); k.Ob(); ) { + j = BD(k.Pb(), 10); + for (e = BD(Qc(a.d, l), 21).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + YEc(a.b[j.c.p][j.p]).Fc(a.b[d.c.p][d.p]); + ++a.b[d.c.p][d.p].c; + } + } + } + i = l; + } + } + } + function OHc(a, b) { + var c, d, e, f, g, h, i, j, k; + c = 0; + k = new Rkb(); + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + AHc(a.b, a.d[g.p]); + k.c = KC(SI, Uhe, 1, 0, 5, 1); + switch (g.i.k.g) { + case 0: + d = BD(vNb(g, (wtc(), gtc)), 10); + Hkb(d.j, new xIc(k)); + break; + case 1: + Ctb(KAb(JAb(new YAb(null, new Kub(g.i.j, 16)), new zIc(g))), new CIc(k)); + break; + case 3: + e = BD(vNb(g, (wtc(), $sc)), 11); + Ekb(k, new vgd(e, meb(g.e.c.length + g.g.c.length))); + } + for (j = new olb(k); j.a < j.c.c.length; ) { + i = BD(mlb(j), 46); + f = aIc(a, BD(i.a, 11)); + if (f > a.d[g.p]) { + c += zHc(a.b, f) * BD(i.b, 19).a; + Wjb(a.a, meb(f)); + } + } + while (!akb(a.a)) { + xHc(a.b, BD(fkb(a.a), 19).a); + } + } + return c; + } + function eed(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q; + l = new g7c(BD(hkd(a, (X7c(), R7c)), 8)); + l.a = $wnd.Math.max(l.a - c.b - c.c, 0); + l.b = $wnd.Math.max(l.b - c.d - c.a, 0); + e = ED(hkd(a, L7c)); + (e == null || (uCb(e), e) <= 0) && (e = 1.3); + h = new Rkb(); + for (o2 = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); o2.e != o2.i.gc(); ) { + n = BD(Dyd(o2), 33); + g = new xed(n); + h.c[h.c.length] = g; + } + m = BD(hkd(a, M7c), 311); + switch (m.g) { + case 3: + q = bed(h, b, l.a, l.b, (j = d, uCb(e), j)); + break; + case 1: + q = aed(h, b, l.a, l.b, (k = d, uCb(e), k)); + break; + default: + q = ced(h, b, l.a, l.b, (i = d, uCb(e), i)); + } + f = new wed(q); + p = fed(f, b, c, l.a, l.b, d, (uCb(e), e)); + Afd(a, p.a, p.b, false, true); + } + function vkc(a, b) { + var c, d, e, f; + c = b.b; + f = new Tkb(c.j); + e = 0; + d = c.j; + d.c = KC(SI, Uhe, 1, 0, 5, 1); + hkc(BD(Si(a.b, (Ucd(), Acd), (Fkc(), Ekc)), 15), c); + e = ikc(f, e, new blc(), d); + hkc(BD(Si(a.b, Acd, Dkc), 15), c); + e = ikc(f, e, new dlc(), d); + hkc(BD(Si(a.b, Acd, Ckc), 15), c); + hkc(BD(Si(a.b, zcd, Ekc), 15), c); + hkc(BD(Si(a.b, zcd, Dkc), 15), c); + e = ikc(f, e, new flc(), d); + hkc(BD(Si(a.b, zcd, Ckc), 15), c); + hkc(BD(Si(a.b, Rcd, Ekc), 15), c); + e = ikc(f, e, new hlc(), d); + hkc(BD(Si(a.b, Rcd, Dkc), 15), c); + e = ikc(f, e, new jlc(), d); + hkc(BD(Si(a.b, Rcd, Ckc), 15), c); + hkc(BD(Si(a.b, Tcd, Ekc), 15), c); + e = ikc(f, e, new Pkc(), d); + hkc(BD(Si(a.b, Tcd, Dkc), 15), c); + hkc(BD(Si(a.b, Tcd, Ckc), 15), c); + } + function nbc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + Odd(b, "Layer size calculation", 1); + k = Pje; + j = Qje; + e = false; + for (h = new olb(a.b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 29); + i = g.c; + i.a = 0; + i.b = 0; + if (g.a.c.length == 0) { + continue; + } + e = true; + for (m = new olb(g.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + o2 = l.o; + n = l.d; + i.a = $wnd.Math.max(i.a, o2.a + n.b + n.c); + } + d = BD(Ikb(g.a, 0), 10); + p = d.n.b - d.d.d; + d.k == (j0b(), e0b) && (p -= BD(vNb(a, (Nyc(), yyc)), 142).d); + f = BD(Ikb(g.a, g.a.c.length - 1), 10); + c = f.n.b + f.o.b + f.d.a; + f.k == e0b && (c += BD(vNb(a, (Nyc(), yyc)), 142).a); + i.b = c - p; + k = $wnd.Math.min(k, p); + j = $wnd.Math.max(j, c); + } + if (!e) { + k = 0; + j = 0; + } + a.f.b = j - k; + a.c.b -= k; + Qdd(b); + } + function h_b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + f = 0; + g = 0; + for (j = new olb(a.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 10); + f = $wnd.Math.max(f, h.d.b); + g = $wnd.Math.max(g, h.d.c); + } + for (i = new olb(a.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + c = BD(vNb(h, (Nyc(), mwc)), 248); + switch (c.g) { + case 1: + o2 = 0; + break; + case 2: + o2 = 1; + break; + case 5: + o2 = 0.5; + break; + default: + d = 0; + l = 0; + for (n = new olb(h.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + m.e.c.length == 0 || ++d; + m.g.c.length == 0 || ++l; + } + d + l == 0 ? o2 = 0.5 : o2 = l / (d + l); + } + q = a.c; + k = h.o.a; + r = (q.a - k) * o2; + o2 > 0.5 ? r -= g * 2 * (o2 - 0.5) : o2 < 0.5 && (r += f * 2 * (0.5 - o2)); + e = h.d.b; + r < e && (r = e); + p = h.d.c; + r > q.a - p - k && (r = q.a - p - k); + h.n.a = b + r; + } + } + function ced(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q; + h = KC(UD, Vje, 25, a.c.length, 15, 1); + m = new gub(new Ned()); + _tb(m, a); + j = 0; + p = new Rkb(); + while (m.b.c.length != 0) { + g = BD(m.b.c.length == 0 ? null : Ikb(m.b, 0), 157); + if (j > 1 && red(g) * qed(g) / 2 > h[0]) { + f = 0; + while (f < p.c.length - 1 && red(g) * qed(g) / 2 > h[f]) { + ++f; + } + o2 = new Jib(p, 0, f + 1); + l = new wed(o2); + k = red(g) / qed(g); + i = fed(l, b, new p0b(), c, d, e, k); + P6c(X6c(l.e), i); + zCb(cub(m, l)); + n = new Jib(p, f + 1, p.c.length); + _tb(m, n); + p.c = KC(SI, Uhe, 1, 0, 5, 1); + j = 0; + Dlb(h, h.length, 0); + } else { + q = m.b.c.length == 0 ? null : Ikb(m.b, 0); + q != null && fub(m, 0); + j > 0 && (h[j] = h[j - 1]); + h[j] += red(g) * qed(g); + ++j; + p.c[p.c.length] = g; + } + } + return p; + } + function Wac(a) { + var b, c, d, e, f; + d = BD(vNb(a, (Nyc(), mxc)), 163); + if (d == (Ctc(), ytc)) { + for (c = new Sr(ur(R_b(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 17); + if (!Yac(b)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges.")); + } + } + } else if (d == Atc) { + for (f = new Sr(ur(U_b(a).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + if (!Yac(e)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges.")); + } + } + } + } + function C9b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + Odd(b, "Label dummy removal", 1); + d = Edb(ED(vNb(a, (Nyc(), nyc)))); + e = Edb(ED(vNb(a, ryc))); + j = BD(vNb(a, Lwc), 103); + for (i = new olb(a.b); i.a < i.c.c.length; ) { + h = BD(mlb(i), 29); + l = new Bib(h.a, 0); + while (l.b < l.d.gc()) { + k = (sCb(l.b < l.d.gc()), BD(l.d.Xb(l.c = l.b++), 10)); + if (k.k == (j0b(), f0b)) { + m = BD(vNb(k, (wtc(), $sc)), 17); + o2 = Edb(ED(vNb(m, Zwc))); + g = PD(vNb(k, Ssc)) === PD((rbd(), obd)); + c = new g7c(k.n); + g && (c.b += o2 + d); + f = new f7c(k.o.a, k.o.b - o2 - d); + n = BD(vNb(k, ktc), 15); + j == (ead(), dad) || j == _9c ? B9b(n, c, e, f, g, j) : A9b(n, c, e, f); + Gkb(m.b, n); + sbc(k, PD(vNb(a, Swc)) === PD((Aad(), xad))); + uib(l); + } + } + } + Qdd(b); + } + function tZb(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v; + i = new Rkb(); + for (f = new olb(b.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + for (h = new olb(e.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + k = null; + for (t = k_b(g.g), u = 0, v = t.length; u < v; ++u) { + s = t[u]; + if (!f_b(s.d.i, c)) { + r = oZb(a, b, c, s, s.c, (KAc(), IAc), k); + r != k && (i.c[i.c.length] = r, true); + r.c && (k = r); + } + } + j = null; + for (o2 = k_b(g.e), p = 0, q = o2.length; p < q; ++p) { + n = o2[p]; + if (!f_b(n.c.i, c)) { + r = oZb(a, b, c, n, n.d, (KAc(), HAc), j); + r != j && (i.c[i.c.length] = r, true); + r.c && (j = r); + } + } + } + } + for (m = new olb(i); m.a < m.c.c.length; ) { + l = BD(mlb(m), 441); + Jkb(b.a, l.a, 0) != -1 || Ekb(b.a, l.a); + l.c && (d.c[d.c.length] = l, true); + } + } + function jCc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + Odd(c, "Interactive cycle breaking", 1); + l = new Rkb(); + for (n = new olb(b.a); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + m.p = 1; + o2 = T_b(m).a; + for (k = W_b(m, (KAc(), IAc)).Kc(); k.Ob(); ) { + j = BD(k.Pb(), 11); + for (f = new olb(j.g); f.a < f.c.c.length; ) { + d = BD(mlb(f), 17); + p = d.d.i; + if (p != m) { + q = T_b(p).a; + q < o2 && (l.c[l.c.length] = d, true); + } + } + } + } + for (g = new olb(l); g.a < g.c.c.length; ) { + d = BD(mlb(g), 17); + PZb(d, true); + } + l.c = KC(SI, Uhe, 1, 0, 5, 1); + for (i = new olb(b.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + h.p > 0 && iCc(a, h, l); + } + for (e = new olb(l); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + PZb(d, true); + } + l.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c); + } + function _z(a, b) { + var c, d, e, f, g, h, i, j, k; + j = ""; + if (b.length == 0) { + return a.de(Zie, Xie, -1, -1); + } + k = ufb(b); + dfb(k.substr(0, 3), "at ") && (k = k.substr(3)); + k = k.replace(/\[.*?\]/g, ""); + g = k.indexOf("("); + if (g == -1) { + g = k.indexOf("@"); + if (g == -1) { + j = k; + k = ""; + } else { + j = ufb(k.substr(g + 1)); + k = ufb(k.substr(0, g)); + } + } else { + c = k.indexOf(")", g); + j = k.substr(g + 1, c - (g + 1)); + k = ufb(k.substr(0, g)); + } + g = hfb(k, wfb(46)); + g != -1 && (k = k.substr(g + 1)); + (k.length == 0 || dfb(k, "Anonymous function")) && (k = Xie); + h = kfb(j, wfb(58)); + e = lfb(j, wfb(58), h - 1); + i = -1; + d = -1; + f = Zie; + if (h != -1 && e != -1) { + f = j.substr(0, e); + i = Vz(j.substr(e + 1, h - (e + 1))); + d = Vz(j.substr(h + 1)); + } + return a.de(f, k, i, d); + } + function UC(a, b, c) { + var d, e, f, g, h, i; + if (b.l == 0 && b.m == 0 && b.h == 0) { + throw vbb(new ocb("divide by zero")); + } + if (a.l == 0 && a.m == 0 && a.h == 0) { + c && (QC = TC(0, 0, 0)); + return TC(0, 0, 0); + } + if (b.h == Gje && b.m == 0 && b.l == 0) { + return VC(a, c); + } + i = false; + if (b.h >> 19 != 0) { + b = hD(b); + i = !i; + } + g = _C(b); + f = false; + e = false; + d = false; + if (a.h == Gje && a.m == 0 && a.l == 0) { + e = true; + f = true; + if (g == -1) { + a = SC((wD(), sD)); + d = true; + i = !i; + } else { + h = lD(a, g); + i && ZC(h); + c && (QC = TC(0, 0, 0)); + return h; + } + } else if (a.h >> 19 != 0) { + f = true; + a = hD(a); + d = true; + i = !i; + } + if (g != -1) { + return WC(a, g, i, f, c); + } + if (eD(a, b) < 0) { + c && (f ? QC = hD(a) : QC = TC(a.l, a.m, a.h)); + return TC(0, 0, 0); + } + return XC(d ? a : TC(a.l, a.m, a.h), b, i, f, e, c); + } + function F2c(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + if (a.e && a.c.c < a.f) { + throw vbb(new Zdb("Expected " + a.f + " phases to be configured; only found " + a.c.c)); + } + k = BD(gdb(a.g), 9); + n = Pu(a.f); + for (f = k, h = 0, j = f.length; h < j; ++h) { + d = f[h]; + l = BD(B2c(a, d.g), 246); + l ? Ekb(n, BD(I2c(a, l), 123)) : (n.c[n.c.length] = null, true); + } + o2 = new j3c(); + MAb(JAb(NAb(JAb(new YAb(null, new Kub(n, 16)), new O2c()), new Q2c(b)), new S2c()), new U2c(o2)); + d3c(o2, a.a); + c = new Rkb(); + for (e = k, g = 0, i = e.length; g < i; ++g) { + d = e[g]; + Gkb(c, J2c(a, Dx(BD(B2c(o2, d.g), 20)))); + m = BD(Ikb(n, d.g), 123); + !!m && (c.c[c.c.length] = m, true); + } + Gkb(c, J2c(a, Dx(BD(B2c(o2, k[k.length - 1].g + 1), 20)))); + return c; + } + function qCc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + Odd(c, "Model order cycle breaking", 1); + a.a = 0; + a.b = 0; + n = new Rkb(); + k = b.a.c.length; + for (j = new olb(b.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + wNb(i, (wtc(), Zsc)) && (k = $wnd.Math.max(k, BD(vNb(i, Zsc), 19).a + 1)); + } + for (p = new olb(b.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + g = pCc(a, o2, k); + for (m = W_b(o2, (KAc(), IAc)).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 11); + for (f = new olb(l.g); f.a < f.c.c.length; ) { + d = BD(mlb(f), 17); + q = d.d.i; + h = pCc(a, q, k); + h < g && (n.c[n.c.length] = d, true); + } + } + } + for (e = new olb(n); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + PZb(d, true); + yNb(b, (wtc(), Asc), (Bcb(), true)); + } + n.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c); + } + function kQc(a, b) { + var c, d, e, f, g, h, i; + if (a.g > b.f || b.g > a.f) { + return; + } + c = 0; + d = 0; + for (g = a.w.a.ec().Kc(); g.Ob(); ) { + e = BD(g.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, b.g, b.f) && ++c; + } + for (h = a.r.a.ec().Kc(); h.Ob(); ) { + e = BD(h.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, b.g, b.f) && --c; + } + for (i = b.w.a.ec().Kc(); i.Ob(); ) { + e = BD(i.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, a.g, a.f) && ++d; + } + for (f = b.r.a.ec().Kc(); f.Ob(); ) { + e = BD(f.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, a.g, a.f) && --d; + } + if (c < d) { + new BQc(a, b, d - c); + } else if (d < c) { + new BQc(b, a, c - d); + } else { + new BQc(b, a, 0); + new BQc(a, b, 0); + } + } + function JPb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s; + j = b.c; + e = IOb(a.e); + l = Y6c(b7c(R6c(HOb(a.e)), a.d * a.a, a.c * a.b), -0.5); + c = e.a - l.a; + d = e.b - l.b; + g = b.a; + c = g.c - c; + d = g.d - d; + for (i = new olb(j); i.a < i.c.c.length; ) { + h = BD(mlb(i), 395); + m = h.b; + n = c + m.a; + q = d + m.b; + o2 = QD(n / a.a); + r = QD(q / a.b); + f = h.a; + switch (f.g) { + case 0: + k = (RMb(), OMb); + break; + case 1: + k = (RMb(), NMb); + break; + case 2: + k = (RMb(), PMb); + break; + default: + k = (RMb(), QMb); + } + if (f.a) { + s = QD((q + h.c) / a.b); + Ekb(a.f, new uOb(k, meb(r), meb(s))); + f == (ROb(), QOb) ? nNb(a, 0, r, o2, s) : nNb(a, o2, r, a.d - 1, s); + } else { + p = QD((n + h.c) / a.a); + Ekb(a.f, new uOb(k, meb(o2), meb(p))); + f == (ROb(), OOb) ? nNb(a, o2, 0, p, r) : nNb(a, o2, r, p, a.c - 1); + } + } + } + function coc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + m = new Rkb(); + e = new Rkb(); + p = null; + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 19); + f = new qoc(g.a); + e.c[e.c.length] = f; + if (p) { + f.d = p; + p.e = f; + } + p = f; + } + t = boc(a); + for (k = 0; k < e.c.length; ++k) { + n = null; + q = poc((tCb(0, e.c.length), BD(e.c[0], 652))); + c = null; + d = Pje; + for (l = 1; l < a.b.c.length; ++l) { + r = q ? $wnd.Math.abs(q.b - l) : $wnd.Math.abs(l - n.b) + 1; + o2 = n ? $wnd.Math.abs(l - n.b) : r + 1; + if (o2 < r) { + j = n; + i = o2; + } else { + j = q; + i = r; + } + s = (u = Edb(ED(vNb(a, (Nyc(), Hyc)))), t[l] + $wnd.Math.pow(i, u)); + if (s < d) { + d = s; + c = j; + c.c = l; + } + if (!!q && l == q.b) { + n = q; + q = koc(q); + } + } + if (c) { + Ekb(m, meb(c.c)); + c.a = true; + loc(c); + } + } + mmb(); + Mlb(m.c, m.c.length, null); + return m; + } + function qNd(a) { + var b, c, d, e, f, g, h, i, j, k; + b = new zNd(); + c = new zNd(); + j = dfb(Qve, (e = Dmd(a.b, Rve), !e ? null : GD(AAd((!e.b && (e.b = new sId((jGd(), fGd), x6, e)), e.b), Sve)))); + for (i = 0; i < a.i; ++i) { + h = BD(a.g[i], 170); + if (JD(h, 99)) { + g = BD(h, 18); + (g.Bb & ote) != 0 ? ((g.Bb & oie) == 0 || !j && (f = Dmd(g, Rve), (!f ? null : GD(AAd((!f.b && (f.b = new sId((jGd(), fGd), x6, f)), f.b), eue))) == null)) && wtd(b, g) : (k = zUd(g), !!k && (k.Bb & ote) != 0 || ((g.Bb & oie) == 0 || !j && (d = Dmd(g, Rve), (!d ? null : GD(AAd((!d.b && (d.b = new sId((jGd(), fGd), x6, d)), d.b), eue))) == null)) && wtd(c, g)); + } else { + Q6d(); + if (BD(h, 66).Oj()) { + if (!h.Jj()) { + wtd(b, h); + wtd(c, h); + } + } + } + } + vud(b); + vud(c); + a.a = BD(b.g, 247); + BD(c.g, 247); + } + function LTb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, p, q, r; + j = ITb(b); + q = BD(vNb(b, (Nyc(), Iwc)), 314); + q != (Rpc(), Ppc) && reb(j, new STb()); + r = BD(vNb(b, Cwc), 292); + reb(j, new UTb(r)); + p = 0; + k = new Rkb(); + for (f = new xkb(j); f.a != f.b; ) { + e = BD(vkb(f), 37); + aUb(a.c, e); + m = BD(vNb(e, (wtc(), itc)), 15); + p += m.gc(); + d = m.Kc(); + Ekb(k, new vgd(e, d)); + } + Odd(c, "Recursive hierarchical layout", p); + n = BD(BD(Ikb(k, k.c.length - 1), 46).b, 47); + while (n.Ob()) { + for (i = new olb(k); i.a < i.c.c.length; ) { + h = BD(mlb(i), 46); + m = BD(h.b, 47); + g = BD(h.a, 37); + while (m.Ob()) { + l = BD(m.Pb(), 51); + if (JD(l, 507)) { + if (!g.e) { + l.pf(g, Udd(c, 1)); + break; + } else { + break; + } + } else { + l.pf(g, Udd(c, 1)); + } + } + } + } + Qdd(c); + } + function rid(b, c) { + var d, e, f, g, h, i, j, k, l, m; + j = c.length - 1; + i = (BCb(j, c.length), c.charCodeAt(j)); + if (i == 93) { + h = hfb(c, wfb(91)); + if (h >= 0) { + f = wid(b, c.substr(1, h - 1)); + l = c.substr(h + 1, j - (h + 1)); + return pid(b, l, f); + } + } else { + d = -1; + Vcb == null && (Vcb = new RegExp("\\d")); + if (Vcb.test(String.fromCharCode(i))) { + d = lfb(c, wfb(46), j - 1); + if (d >= 0) { + e = BD(hid(b, Bid(b, c.substr(1, d - 1)), false), 58); + k = 0; + try { + k = Icb(c.substr(d + 1), Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + g = a; + throw vbb(new rFd(g)); + } else + throw vbb(a); + } + if (k < e.gc()) { + m = e.Xb(k); + JD(m, 72) && (m = BD(m, 72).dd()); + return BD(m, 56); + } + } + } + if (d < 0) { + return BD(hid(b, Bid(b, c.substr(1)), false), 56); + } + } + return null; + } + function e1d(a, b, c) { + var d, e, f, g, h, i, j, k, l; + if (bLd(b, c) >= 0) { + return c; + } + switch ($1d(q1d(a, c))) { + case 2: { + if (dfb("", o1d(a, c.Hj()).ne())) { + i = b2d(q1d(a, c)); + h = a2d(q1d(a, c)); + k = r1d(a, b, i, h); + if (k) { + return k; + } + e = f1d(a, b); + for (g = 0, l = e.gc(); g < l; ++g) { + k = BD(e.Xb(g), 170); + if (x1d(c2d(q1d(a, k)), i)) { + return k; + } + } + } + return null; + } + case 4: { + if (dfb("", o1d(a, c.Hj()).ne())) { + for (d = c; d; d = Z1d(q1d(a, d))) { + j = b2d(q1d(a, d)); + h = a2d(q1d(a, d)); + k = s1d(a, b, j, h); + if (k) { + return k; + } + } + i = b2d(q1d(a, c)); + if (dfb(Ewe, i)) { + return t1d(a, b); + } else { + f = g1d(a, b); + for (g = 0, l = f.gc(); g < l; ++g) { + k = BD(f.Xb(g), 170); + if (x1d(c2d(q1d(a, k)), i)) { + return k; + } + } + } + } + return null; + } + default: { + return null; + } + } + } + function t2d(a, b, c) { + var d, e, f, g, h, i, j, k; + if (c.gc() == 0) { + return false; + } + h = (Q6d(), BD(b, 66).Oj()); + f = h ? c : new zud(c.gc()); + if (T6d(a.e, b)) { + if (b.hi()) { + for (j = c.Kc(); j.Ob(); ) { + i = j.Pb(); + if (!F2d(a, b, i, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + e = R6d(b, i); + f.Hc(e) || f.Fc(e); + } + } + } else if (!h) { + for (j = c.Kc(); j.Ob(); ) { + i = j.Pb(); + e = R6d(b, i); + f.Fc(e); + } + } + } else { + if (c.gc() > 1) { + throw vbb(new Wdb(Hwe)); + } + k = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + e = d[g]; + if (k.rl(e.ak())) { + if (c.Hc(h ? e : e.dd())) { + return false; + } else { + for (j = c.Kc(); j.Ob(); ) { + i = j.Pb(); + BD(Gtd(a, g, h ? BD(i, 72) : R6d(b, i)), 72); + } + return true; + } + } + } + if (!h) { + e = R6d(b, c.Kc().Pb()); + f.Fc(e); + } + } + return ytd(a, f); + } + function qMc(a, b) { + var c, d, e, f, g, h, i, j, k; + k = new Psb(); + for (h = (j = new $ib(a.c).a.vc().Kc(), new djb(j)); h.a.Ob(); ) { + f = (e = BD(h.a.Pb(), 42), BD(e.dd(), 458)); + f.b == 0 && (Gsb(k, f, k.c.b, k.c), true); + } + while (k.b != 0) { + f = BD(k.b == 0 ? null : (sCb(k.b != 0), Nsb(k, k.a.a)), 458); + f.a == null && (f.a = 0); + for (d = new olb(f.d); d.a < d.c.c.length; ) { + c = BD(mlb(d), 654); + c.b.a == null ? c.b.a = Edb(f.a) + c.a : b.o == (eMc(), cMc) ? c.b.a = $wnd.Math.min(Edb(c.b.a), Edb(f.a) + c.a) : c.b.a = $wnd.Math.max(Edb(c.b.a), Edb(f.a) + c.a); + --c.b.b; + c.b.b == 0 && Dsb(k, c.b); + } + } + for (g = (i = new $ib(a.c).a.vc().Kc(), new djb(i)); g.a.Ob(); ) { + f = (e = BD(g.a.Pb(), 42), BD(e.dd(), 458)); + b.i[f.c.p] = f.a; + } + } + function mTc() { + mTc = ccb; + dTc = new Lsd(Ime); + new Msd("DEPTH", meb(0)); + ZSc = new Msd("FAN", meb(0)); + XSc = new Msd(Yqe, meb(0)); + jTc = new Msd("ROOT", (Bcb(), false)); + _Sc = new Msd("LEFTNEIGHBOR", null); + hTc = new Msd("RIGHTNEIGHBOR", null); + aTc = new Msd("LEFTSIBLING", null); + iTc = new Msd("RIGHTSIBLING", null); + YSc = new Msd("DUMMY", false); + new Msd("LEVEL", meb(0)); + gTc = new Msd("REMOVABLE_EDGES", new Psb()); + kTc = new Msd("XCOOR", meb(0)); + lTc = new Msd("YCOOR", meb(0)); + bTc = new Msd("LEVELHEIGHT", 0); + $Sc = new Msd("ID", ""); + eTc = new Msd("POSITION", meb(0)); + fTc = new Msd("PRELIM", 0); + cTc = new Msd("MODIFIER", 0); + WSc = new Lsd(Kme); + VSc = new Lsd(Lme); + } + function MNc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2; + k = c + b.c.c.a; + for (n = new olb(b.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + e = l7c(OC(GC(m1, 1), nie, 8, 0, [m.i.n, m.n, m.a])); + if (b.k == (j0b(), i0b)) { + h = BD(vNb(m, (wtc(), $sc)), 11); + e.a = l7c(OC(GC(m1, 1), nie, 8, 0, [h.i.n, h.n, h.a])).a; + b.n.a = e.a; + } + g = new f7c(0, e.b); + if (m.j == (Ucd(), zcd)) { + g.a = k; + } else if (m.j == Tcd) { + g.a = c; + } else { + continue; + } + o2 = $wnd.Math.abs(e.a - g.a); + if (o2 <= d && !JNc(b)) { + continue; + } + f = m.g.c.length + m.e.c.length > 1; + for (j = new b1b(m.b); llb(j.a) || llb(j.b); ) { + i = BD(llb(j.a) ? mlb(j.a) : mlb(j.b), 17); + l = i.c == m ? i.d : i.c; + $wnd.Math.abs(l7c(OC(GC(m1, 1), nie, 8, 0, [l.i.n, l.n, l.a])).b - g.b) > 1 && GNc(a, i, g, f, m); + } + } + } + function XPc(a) { + var b, c, d, e, f, g; + e = new Bib(a.e, 0); + d = new Bib(a.a, 0); + if (a.d) { + for (c = 0; c < a.b; c++) { + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + } + } else { + for (c = 0; c < a.b - 1; c++) { + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + uib(e); + } + } + b = Edb((sCb(e.b < e.d.gc()), ED(e.d.Xb(e.c = e.b++)))); + while (a.f - b > Oqe) { + f = b; + g = 0; + while ($wnd.Math.abs(b - f) < Oqe) { + ++g; + b = Edb((sCb(e.b < e.d.gc()), ED(e.d.Xb(e.c = e.b++)))); + sCb(d.b < d.d.gc()); + d.d.Xb(d.c = d.b++); + } + if (g < a.b) { + sCb(e.b > 0); + e.a.Xb(e.c = --e.b); + WPc(a, a.b - g, f, d, e); + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + } + sCb(d.b > 0); + d.a.Xb(d.c = --d.b); + } + if (!a.d) { + for (c = 0; c < a.b - 1; c++) { + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + uib(e); + } + } + a.d = true; + a.c = true; + } + function Q8d() { + Q8d = ccb; + s8d = (r8d(), q8d).b; + v8d = BD(qud(ZKd(q8d.b), 0), 34); + t8d = BD(qud(ZKd(q8d.b), 1), 34); + u8d = BD(qud(ZKd(q8d.b), 2), 34); + F8d = q8d.bb; + BD(qud(ZKd(q8d.bb), 0), 34); + BD(qud(ZKd(q8d.bb), 1), 34); + H8d = q8d.fb; + I8d = BD(qud(ZKd(q8d.fb), 0), 34); + BD(qud(ZKd(q8d.fb), 1), 34); + BD(qud(ZKd(q8d.fb), 2), 18); + K8d = q8d.qb; + N8d = BD(qud(ZKd(q8d.qb), 0), 34); + BD(qud(ZKd(q8d.qb), 1), 18); + BD(qud(ZKd(q8d.qb), 2), 18); + L8d = BD(qud(ZKd(q8d.qb), 3), 34); + M8d = BD(qud(ZKd(q8d.qb), 4), 34); + P8d = BD(qud(ZKd(q8d.qb), 6), 34); + O8d = BD(qud(ZKd(q8d.qb), 5), 18); + w8d = q8d.j; + x8d = q8d.k; + y8d = q8d.q; + z8d = q8d.w; + A8d = q8d.B; + B8d = q8d.A; + C8d = q8d.C; + D8d = q8d.D; + E8d = q8d._; + G8d = q8d.cb; + J8d = q8d.hb; + } + function $Dc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + a.c = 0; + a.b = 0; + d = 2 * b.c.a.c.length + 1; + o: + for (l = c.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + h = k.j == (Ucd(), Acd) || k.j == Rcd; + n = 0; + if (h) { + m = BD(vNb(k, (wtc(), gtc)), 10); + if (!m) { + continue; + } + n += VDc(a, d, k, m); + } else { + for (j = new olb(k.g); j.a < j.c.c.length; ) { + i = BD(mlb(j), 17); + e = i.d; + if (e.i.c == b.c) { + Ekb(a.a, k); + continue o; + } else { + n += a.g[e.p]; + } + } + for (g = new olb(k.e); g.a < g.c.c.length; ) { + f = BD(mlb(g), 17); + e = f.c; + if (e.i.c == b.c) { + Ekb(a.a, k); + continue o; + } else { + n -= a.g[e.p]; + } + } + } + if (k.e.c.length + k.g.c.length > 0) { + a.f[k.p] = n / (k.e.c.length + k.g.c.length); + a.c = $wnd.Math.min(a.c, a.f[k.p]); + a.b = $wnd.Math.max(a.b, a.f[k.p]); + } else + h && (a.f[k.p] = n); + } + } + function $9d(a) { + a.b = null; + a.bb = null; + a.fb = null; + a.qb = null; + a.a = null; + a.c = null; + a.d = null; + a.e = null; + a.f = null; + a.n = null; + a.M = null; + a.L = null; + a.Q = null; + a.R = null; + a.K = null; + a.db = null; + a.eb = null; + a.g = null; + a.i = null; + a.j = null; + a.k = null; + a.gb = null; + a.o = null; + a.p = null; + a.q = null; + a.r = null; + a.$ = null; + a.ib = null; + a.S = null; + a.T = null; + a.t = null; + a.s = null; + a.u = null; + a.v = null; + a.w = null; + a.B = null; + a.A = null; + a.C = null; + a.D = null; + a.F = null; + a.G = null; + a.H = null; + a.I = null; + a.J = null; + a.P = null; + a.Z = null; + a.U = null; + a.V = null; + a.W = null; + a.X = null; + a.Y = null; + a._ = null; + a.ab = null; + a.cb = null; + a.hb = null; + a.nb = null; + a.lb = null; + a.mb = null; + a.ob = null; + a.pb = null; + a.jb = null; + a.kb = null; + a.N = false; + a.O = false; + } + function l5b(a, b, c) { + var d, e, f, g; + Odd(c, "Graph transformation (" + a.a + ")", 1); + g = Mu(b.a); + for (f = new olb(b.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + Gkb(g, e.a); + } + d = BD(vNb(b, (Nyc(), Mwc)), 419); + if (d == (xqc(), vqc)) { + switch (BD(vNb(b, Lwc), 103).g) { + case 2: + _4b(b, g); + break; + case 3: + p5b(b, g); + break; + case 4: + if (a.a == (y5b(), x5b)) { + p5b(b, g); + a5b(b, g); + } else { + a5b(b, g); + p5b(b, g); + } + } + } else { + if (a.a == (y5b(), x5b)) { + switch (BD(vNb(b, Lwc), 103).g) { + case 2: + _4b(b, g); + a5b(b, g); + break; + case 3: + p5b(b, g); + _4b(b, g); + break; + case 4: + _4b(b, g); + p5b(b, g); + } + } else { + switch (BD(vNb(b, Lwc), 103).g) { + case 2: + _4b(b, g); + a5b(b, g); + break; + case 3: + _4b(b, g); + p5b(b, g); + break; + case 4: + p5b(b, g); + _4b(b, g); + } + } + } + Qdd(c); + } + function j6b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p; + j = new zsb(); + k = new zsb(); + o2 = new zsb(); + p = new zsb(); + i = Edb(ED(vNb(b, (Nyc(), vyc)))); + f = Edb(ED(vNb(b, lyc))); + for (h = new olb(c); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + l = BD(vNb(g, (wtc(), Hsc)), 61); + if (l == (Ucd(), Acd)) { + k.a.zc(g, k); + for (e = new Sr(ur(R_b(g).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + Qqb(j, d.c.i); + } + } else if (l == Rcd) { + p.a.zc(g, p); + for (e = new Sr(ur(R_b(g).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + Qqb(o2, d.c.i); + } + } + } + if (j.a.gc() != 0) { + m = new tPc(2, f); + n = sPc(m, b, j, k, -i - b.c.b); + if (n > 0) { + a.a = i + (n - 1) * f; + b.c.b += a.a; + b.f.b += a.a; + } + } + if (o2.a.gc() != 0) { + m = new tPc(1, f); + n = sPc(m, b, o2, p, b.f.b + i - b.c.b); + n > 0 && (b.f.b += i + (n - 1) * f); + } + } + function kKd(a, b) { + var c, d, e, f; + f = a.F; + if (b == null) { + a.F = null; + $Jd(a, null); + } else { + a.F = (uCb(b), b); + d = hfb(b, wfb(60)); + if (d != -1) { + e = b.substr(0, d); + hfb(b, wfb(46)) == -1 && !dfb(e, Khe) && !dfb(e, Eve) && !dfb(e, Fve) && !dfb(e, Gve) && !dfb(e, Hve) && !dfb(e, Ive) && !dfb(e, Jve) && !dfb(e, Kve) && (e = Lve); + c = kfb(b, wfb(62)); + c != -1 && (e += "" + b.substr(c + 1)); + $Jd(a, e); + } else { + e = b; + if (hfb(b, wfb(46)) == -1) { + d = hfb(b, wfb(91)); + d != -1 && (e = b.substr(0, d)); + if (!dfb(e, Khe) && !dfb(e, Eve) && !dfb(e, Fve) && !dfb(e, Gve) && !dfb(e, Hve) && !dfb(e, Ive) && !dfb(e, Jve) && !dfb(e, Kve)) { + e = Lve; + d != -1 && (e += "" + b.substr(d)); + } else { + e = b; + } + } + $Jd(a, e); + e == b && (a.F = a.D); + } + } + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 5, f, b)); + } + function AMc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + p = b.b.c.length; + if (p < 3) { + return; + } + n = KC(WD, oje, 25, p, 15, 1); + l = 0; + for (k = new olb(b.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 29); + n[l++] = j.a.c.length; + } + m = new Bib(b.b, 2); + for (d = 1; d < p - 1; d++) { + c = (sCb(m.b < m.d.gc()), BD(m.d.Xb(m.c = m.b++), 29)); + o2 = new olb(c.a); + f = 0; + h = 0; + for (i = 0; i < n[d + 1]; i++) { + t = BD(mlb(o2), 10); + if (i == n[d + 1] - 1 || zMc(a, t, d + 1, d)) { + g = n[d] - 1; + zMc(a, t, d + 1, d) && (g = a.c.e[BD(BD(BD(Ikb(a.c.b, t.p), 15).Xb(0), 46).a, 10).p]); + while (h <= i) { + s = BD(Ikb(c.a, h), 10); + if (!zMc(a, s, d + 1, d)) { + for (r = BD(Ikb(a.c.b, s.p), 15).Kc(); r.Ob(); ) { + q = BD(r.Pb(), 46); + e = a.c.e[BD(q.a, 10).p]; + (e < f || e > g) && Qqb(a.b, BD(q.b, 17)); + } + } + ++h; + } + f = g; + } + } + } + } + function o5c(b, c) { + var d; + if (c == null || dfb(c, Xhe)) { + return null; + } + if (c.length == 0 && b.k != (_5c(), W5c)) { + return null; + } + switch (b.k.g) { + case 1: + return efb(c, kse) ? (Bcb(), Acb) : efb(c, lse) ? (Bcb(), zcb) : null; + case 2: + try { + return meb(Icb(c, Rie, Ohe)); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + return null; + } else + throw vbb(a); + } + case 4: + try { + return Hcb(c); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + return null; + } else + throw vbb(a); + } + case 3: + return c; + case 5: + j5c(b); + return m5c(b, c); + case 6: + j5c(b); + return n5c(b, b.a, c); + case 7: + try { + d = l5c(b); + d.Jf(c); + return d; + } catch (a) { + a = ubb(a); + if (JD(a, 32)) { + return null; + } else + throw vbb(a); + } + default: + throw vbb(new Zdb("Invalid type set for this layout option.")); + } + } + function JWb(a) { + AWb(); + var b, c, d, e, f, g, h; + h = new CWb(); + for (c = new olb(a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 140); + (!h.b || b.c >= h.b.c) && (h.b = b); + if (!h.c || b.c <= h.c.c) { + h.d = h.c; + h.c = b; + } + (!h.e || b.d >= h.e.d) && (h.e = b); + (!h.f || b.d <= h.f.d) && (h.f = b); + } + d = new NWb((lWb(), hWb)); + rXb(a, yWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [d]))); + g = new NWb(kWb); + rXb(a, xWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [g]))); + e = new NWb(iWb); + rXb(a, wWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [e]))); + f = new NWb(jWb); + rXb(a, vWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [f]))); + DWb(d.c, hWb); + DWb(e.c, iWb); + DWb(f.c, jWb); + DWb(g.c, kWb); + h.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(h.a, d.c); + Gkb(h.a, Su(e.c)); + Gkb(h.a, f.c); + Gkb(h.a, Su(g.c)); + return h; + } + function jxd(a) { + var b; + switch (a.d) { + case 1: { + if (a.hj()) { + return a.o != -2; + } + break; + } + case 2: { + if (a.hj()) { + return a.o == -2; + } + break; + } + case 3: + case 5: + case 4: + case 6: + case 7: { + return a.o > -2; + } + default: { + return false; + } + } + b = a.gj(); + switch (a.p) { + case 0: + return b != null && Ccb(DD(b)) != Kbb(a.k, 0); + case 1: + return b != null && BD(b, 217).a != Tbb(a.k) << 24 >> 24; + case 2: + return b != null && BD(b, 172).a != (Tbb(a.k) & aje); + case 6: + return b != null && Kbb(BD(b, 162).a, a.k); + case 5: + return b != null && BD(b, 19).a != Tbb(a.k); + case 7: + return b != null && BD(b, 184).a != Tbb(a.k) << 16 >> 16; + case 3: + return b != null && Edb(ED(b)) != a.j; + case 4: + return b != null && BD(b, 155).a != a.j; + default: + return b == null ? a.n != null : !pb(b, a.n); + } + } + function nOd(a, b, c) { + var d, e, f, g; + if (a.Fk() && a.Ek()) { + g = oOd(a, BD(c, 56)); + if (PD(g) !== PD(c)) { + a.Oi(b); + a.Ui(b, pOd(a, b, g)); + if (a.rk()) { + f = (e = BD(c, 49), a.Dk() ? a.Bk() ? e.ih(a.b, zUd(BD(XKd(wjd(a.b), a.aj()), 18)).n, BD(XKd(wjd(a.b), a.aj()).Yj(), 26).Bj(), null) : e.ih(a.b, bLd(e.Tg(), zUd(BD(XKd(wjd(a.b), a.aj()), 18))), null, null) : e.ih(a.b, -1 - a.aj(), null, null)); + !BD(g, 49).eh() && (f = (d = BD(g, 49), a.Dk() ? a.Bk() ? d.gh(a.b, zUd(BD(XKd(wjd(a.b), a.aj()), 18)).n, BD(XKd(wjd(a.b), a.aj()).Yj(), 26).Bj(), f) : d.gh(a.b, bLd(d.Tg(), zUd(BD(XKd(wjd(a.b), a.aj()), 18))), null, f) : d.gh(a.b, -1 - a.aj(), null, f))); + !!f && f.Fi(); + } + oid(a.b) && a.$i(a.Zi(9, c, g, b, false)); + return g; + } + } + return c; + } + function Noc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + k = Edb(ED(vNb(a, (Nyc(), oyc)))); + d = Edb(ED(vNb(a, Cyc))); + m = new _fd(); + yNb(m, oyc, k + d); + j = b; + r = j.d; + p = j.c.i; + s = j.d.i; + q = G1b(p.c); + t = G1b(s.c); + e = new Rkb(); + for (l = q; l <= t; l++) { + h = new b0b(a); + __b(h, (j0b(), g0b)); + yNb(h, (wtc(), $sc), j); + yNb(h, Vxc, (dcd(), $bd)); + yNb(h, qyc, m); + n = BD(Ikb(a.b, l), 29); + l == q ? Z_b(h, n.a.c.length - c, n) : $_b(h, n); + u = Edb(ED(vNb(j, Zwc))); + if (u < 0) { + u = 0; + yNb(j, Zwc, u); + } + h.o.b = u; + o2 = $wnd.Math.floor(u / 2); + g = new H0b(); + G0b(g, (Ucd(), Tcd)); + F0b(g, h); + g.n.b = o2; + i = new H0b(); + G0b(i, zcd); + F0b(i, h); + i.n.b = o2; + RZb(j, g); + f = new UZb(); + tNb(f, j); + yNb(f, jxc, null); + QZb(f, i); + RZb(f, r); + Ooc(h, j, f); + e.c[e.c.length] = f; + j = f; + } + return e; + } + function sbc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + i = BD(Y_b(a, (Ucd(), Tcd)).Kc().Pb(), 11).e; + n = BD(Y_b(a, zcd).Kc().Pb(), 11).g; + h = i.c.length; + t = A0b(BD(Ikb(a.j, 0), 11)); + while (h-- > 0) { + p = (tCb(0, i.c.length), BD(i.c[0], 17)); + e = (tCb(0, n.c.length), BD(n.c[0], 17)); + s = e.d.e; + f = Jkb(s, e, 0); + SZb(p, e.d, f); + QZb(e, null); + RZb(e, null); + o2 = p.a; + b && Dsb(o2, new g7c(t)); + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 8); + Dsb(o2, new g7c(c)); + } + r = p.b; + for (m = new olb(e.b); m.a < m.c.c.length; ) { + l = BD(mlb(m), 70); + r.c[r.c.length] = l; + } + q = BD(vNb(p, (Nyc(), jxc)), 74); + g = BD(vNb(e, jxc), 74); + if (g) { + if (!q) { + q = new s7c(); + yNb(p, jxc, q); + } + for (k = Jsb(g, 0); k.b != k.d.c; ) { + j = BD(Xsb(k), 8); + Dsb(q, new g7c(j)); + } + } + } + } + function EJb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + c = BD(Mpb(a.b, b), 124); + i = BD(BD(Qc(a.r, b), 21), 84); + if (i.dc()) { + c.n.b = 0; + c.n.c = 0; + return; + } + j = a.u.Hc((rcd(), ncd)); + g = 0; + h = i.Kc(); + k = null; + l = 0; + m = 0; + while (h.Ob()) { + d = BD(h.Pb(), 111); + e = Edb(ED(d.b.We((CKb(), BKb)))); + f = d.b.rf().a; + a.A.Hc((tdd(), sdd)) && KJb(a, b); + if (!k) { + !!a.C && a.C.b > 0 && (g = $wnd.Math.max(g, IJb(a.C.b + d.d.b, e))); + } else { + n = m + k.d.c + a.w + d.d.b; + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(l - e) <= ple || l == e || isNaN(l) && isNaN(e) ? 0 : n / (e - l))); + } + k = d; + l = e; + m = f; + } + if (!!a.C && a.C.c > 0) { + n = m + a.C.c; + j && (n += k.d.c); + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(l - 1) <= ple || l == 1 || isNaN(l) && isNaN(1) ? 0 : n / (1 - l))); + } + c.n.b = 0; + c.a.a = g; + } + function NKb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + c = BD(Mpb(a.b, b), 124); + i = BD(BD(Qc(a.r, b), 21), 84); + if (i.dc()) { + c.n.d = 0; + c.n.a = 0; + return; + } + j = a.u.Hc((rcd(), ncd)); + g = 0; + a.A.Hc((tdd(), sdd)) && SKb(a, b); + h = i.Kc(); + k = null; + m = 0; + l = 0; + while (h.Ob()) { + d = BD(h.Pb(), 111); + f = Edb(ED(d.b.We((CKb(), BKb)))); + e = d.b.rf().b; + if (!k) { + !!a.C && a.C.d > 0 && (g = $wnd.Math.max(g, IJb(a.C.d + d.d.d, f))); + } else { + n = l + k.d.a + a.w + d.d.d; + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(m - f) <= ple || m == f || isNaN(m) && isNaN(f) ? 0 : n / (f - m))); + } + k = d; + m = f; + l = e; + } + if (!!a.C && a.C.a > 0) { + n = l + a.C.a; + j && (n += k.d.a); + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(m - 1) <= ple || m == 1 || isNaN(m) && isNaN(1) ? 0 : n / (1 - m))); + } + c.n.d = 0; + c.a.b = g; + } + function _Ec(a, b, c) { + var d, e, f, g, h, i; + this.g = a; + h = b.d.length; + i = c.d.length; + this.d = KC(OQ, kne, 10, h + i, 0, 1); + for (g = 0; g < h; g++) { + this.d[g] = b.d[g]; + } + for (f = 0; f < i; f++) { + this.d[h + f] = c.d[f]; + } + if (b.e) { + this.e = Ru(b.e); + this.e.Mc(c); + if (c.e) { + for (e = c.e.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 233); + if (d == b) { + continue; + } else + this.e.Hc(d) ? --d.c : this.e.Fc(d); + } + } + } else if (c.e) { + this.e = Ru(c.e); + this.e.Mc(b); + } + this.f = b.f + c.f; + this.a = b.a + c.a; + this.a > 0 ? ZEc(this, this.f / this.a) : REc(b.g, b.d[0]).a != null && REc(c.g, c.d[0]).a != null ? ZEc(this, (Edb(REc(b.g, b.d[0]).a) + Edb(REc(c.g, c.d[0]).a)) / 2) : REc(b.g, b.d[0]).a != null ? ZEc(this, REc(b.g, b.d[0]).a) : REc(c.g, c.d[0]).a != null && ZEc(this, REc(c.g, c.d[0]).a); + } + function BUb(a, b) { + var c, d, e, f, g, h, i, j, k, l; + a.a = new dVb(oqb(t1)); + for (d = new olb(b.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 841); + h = new gVb(OC(GC(IP, 1), Uhe, 81, 0, [])); + Ekb(a.a.a, h); + for (j = new olb(c.d); j.a < j.c.c.length; ) { + i = BD(mlb(j), 110); + k = new GUb(a, i); + AUb(k, BD(vNb(c.c, (wtc(), Esc)), 21)); + if (!Mhb(a.g, c)) { + Rhb(a.g, c, new f7c(i.c, i.d)); + Rhb(a.f, c, k); + } + Ekb(a.a.b, k); + eVb(h, k); + } + for (g = new olb(c.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 594); + k = new GUb(a, f.kf()); + Rhb(a.b, f, new vgd(h, k)); + AUb(k, BD(vNb(c.c, (wtc(), Esc)), 21)); + if (f.hf()) { + l = new HUb(a, f.hf(), 1); + AUb(l, BD(vNb(c.c, Esc), 21)); + e = new gVb(OC(GC(IP, 1), Uhe, 81, 0, [])); + eVb(e, l); + Rc(a.c, f.gf(), new vgd(h, l)); + } + } + } + return a.a; + } + function oBc(a) { + var b; + this.a = a; + b = (j0b(), OC(GC(NQ, 1), Kie, 267, 0, [h0b, g0b, e0b, i0b, f0b, d0b])).length; + this.b = IC(Q3, [nie, zqe], [593, 146], 0, [b, b], 2); + this.c = IC(Q3, [nie, zqe], [593, 146], 0, [b, b], 2); + nBc(this, h0b, (Nyc(), vyc), wyc); + lBc(this, h0b, g0b, oyc, pyc); + kBc(this, h0b, i0b, oyc); + kBc(this, h0b, e0b, oyc); + lBc(this, h0b, f0b, vyc, wyc); + nBc(this, g0b, lyc, myc); + kBc(this, g0b, i0b, lyc); + kBc(this, g0b, e0b, lyc); + lBc(this, g0b, f0b, oyc, pyc); + mBc(this, i0b, lyc); + kBc(this, i0b, e0b, lyc); + kBc(this, i0b, f0b, syc); + mBc(this, e0b, zyc); + lBc(this, e0b, f0b, uyc, tyc); + nBc(this, f0b, lyc, lyc); + nBc(this, d0b, lyc, myc); + lBc(this, d0b, h0b, oyc, pyc); + lBc(this, d0b, f0b, oyc, pyc); + lBc(this, d0b, g0b, oyc, pyc); + } + function _2d(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + g = c.ak(); + if (JD(g, 99) && (BD(g, 18).Bb & Tje) != 0) { + m = BD(c.dd(), 49); + p = xid(a.e, m); + if (p != m) { + k = R6d(g, p); + mud(a, b, t3d(a, b, k)); + l = null; + if (oid(a.e)) { + d = e1d((O6d(), M6d), a.e.Tg(), g); + if (d != XKd(a.e.Tg(), a.c)) { + q = S6d(a.e.Tg(), g); + h = 0; + f = BD(a.g, 119); + for (i = 0; i < b; ++i) { + e = f[i]; + q.rl(e.ak()) && ++h; + } + l = new O7d(a.e, 9, d, m, p, h, false); + l.Ei(new pSd(a.e, 9, a.c, c, k, b, false)); + } + } + o2 = BD(g, 18); + n = zUd(o2); + if (n) { + l = m.ih(a.e, bLd(m.Tg(), n), null, l); + l = BD(p, 49).gh(a.e, bLd(p.Tg(), n), null, l); + } else if ((o2.Bb & ote) != 0) { + j = -1 - bLd(a.e.Tg(), o2); + l = m.ih(a.e, j, null, null); + !BD(p, 49).eh() && (l = BD(p, 49).gh(a.e, j, null, l)); + } + !!l && l.Fi(); + return k; + } + } + return c; + } + function yUb(a) { + var b, c, d, e, f, g, h, i; + for (f = new olb(a.a.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 81); + e.b.c = e.g.c; + e.b.d = e.g.d; + } + i = new f7c(Pje, Pje); + b = new f7c(Qje, Qje); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 81); + i.a = $wnd.Math.min(i.a, c.g.c); + i.b = $wnd.Math.min(i.b, c.g.d); + b.a = $wnd.Math.max(b.a, c.g.c + c.g.b); + b.b = $wnd.Math.max(b.b, c.g.d + c.g.a); + } + for (h = Uc(a.c).a.nc(); h.Ob(); ) { + g = BD(h.Pb(), 46); + c = BD(g.b, 81); + i.a = $wnd.Math.min(i.a, c.g.c); + i.b = $wnd.Math.min(i.b, c.g.d); + b.a = $wnd.Math.max(b.a, c.g.c + c.g.b); + b.b = $wnd.Math.max(b.b, c.g.d + c.g.a); + } + a.d = V6c(new f7c(i.a, i.b)); + a.e = c7c(new f7c(b.a, b.b), i); + a.a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + } + function svd(a) { + var b, c, d; + l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new Z9c()])); + c = new xB(a); + for (d = 0; d < c.a.length; ++d) { + b = tB(c, d).je().a; + dfb(b, "layered") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new kwc()])) : dfb(b, "force") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new TRb()])) : dfb(b, "stress") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new PSb()])) : dfb(b, "mrtree") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new sTc()])) : dfb(b, "radial") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new IWc()])) : dfb(b, "disco") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new gFb(), new oPb()])) : dfb(b, "sporeOverlap") || dfb(b, "sporeCompaction") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new B0c()])) : dfb(b, "rectpacking") && l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new PYc()])); + } + } + function j_b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + m = new g7c(a.o); + r = b.a / m.a; + h = b.b / m.b; + p = b.a - m.a; + f = b.b - m.b; + if (c) { + e = PD(vNb(a, (Nyc(), Vxc))) === PD((dcd(), $bd)); + for (o2 = new olb(a.j); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + switch (n.j.g) { + case 1: + e || (n.n.a *= r); + break; + case 2: + n.n.a += p; + e || (n.n.b *= h); + break; + case 3: + e || (n.n.a *= r); + n.n.b += f; + break; + case 4: + e || (n.n.b *= h); + } + } + } + for (j = new olb(a.b); j.a < j.c.c.length; ) { + i = BD(mlb(j), 70); + k = i.n.a + i.o.a / 2; + l = i.n.b + i.o.b / 2; + q = k / m.a; + g = l / m.b; + if (q + g >= 1) { + if (q - g > 0 && l >= 0) { + i.n.a += p; + i.n.b += f * g; + } else if (q - g < 0 && k >= 0) { + i.n.a += p * q; + i.n.b += f; + } + } + } + a.o.a = b.a; + a.o.b = b.b; + yNb(a, (Nyc(), Fxc), (tdd(), d = BD(gdb(I1), 9), new xqb(d, BD(_Bb(d, d.length), 9), 0))); + } + function iFd(a, b, c, d, e, f) { + var g; + if (!(b == null || !OEd(b, zEd, AEd))) { + throw vbb(new Wdb("invalid scheme: " + b)); + } + if (!a && !(c != null && hfb(c, wfb(35)) == -1 && c.length > 0 && (BCb(0, c.length), c.charCodeAt(0) != 47))) { + throw vbb(new Wdb("invalid opaquePart: " + c)); + } + if (a && !(b != null && hnb(GEd, b.toLowerCase())) && !(c == null || !OEd(c, CEd, DEd))) { + throw vbb(new Wdb(mve + c)); + } + if (a && b != null && hnb(GEd, b.toLowerCase()) && !eFd(c)) { + throw vbb(new Wdb(mve + c)); + } + if (!fFd(d)) { + throw vbb(new Wdb("invalid device: " + d)); + } + if (!hFd(e)) { + g = e == null ? "invalid segments: null" : "invalid segment: " + VEd(e); + throw vbb(new Wdb(g)); + } + if (!(f == null || hfb(f, wfb(35)) == -1)) { + throw vbb(new Wdb("invalid query: " + f)); + } + } + function nVc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + Odd(b, "Calculate Graph Size", 1); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + h = dme; + i = dme; + f = ere; + g = ere; + for (l = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); l.e != l.i.gc(); ) { + j = BD(Dyd(l), 33); + o2 = j.i; + p = j.j; + r = j.g; + d = j.f; + e = BD(hkd(j, (Y9c(), S8c)), 142); + h = $wnd.Math.min(h, o2 - e.b); + i = $wnd.Math.min(i, p - e.d); + f = $wnd.Math.max(f, o2 + r + e.c); + g = $wnd.Math.max(g, p + d + e.a); + } + n = BD(hkd(a, (Y9c(), f9c)), 116); + m = new f7c(h - n.b, i - n.d); + for (k = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); k.e != k.i.gc(); ) { + j = BD(Dyd(k), 33); + dld(j, j.i - m.a); + eld(j, j.j - m.b); + } + q = f - h + (n.b + n.c); + c = g - i + (n.d + n.a); + cld(a, q); + ald(a, c); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + } + function rGb(a) { + var b, c, d, e, f, g, h, i, j, k; + d = new Rkb(); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 121); + k = 0; + e.k.c = KC(SI, Uhe, 1, 0, 5, 1); + for (c = new olb(LFb(e)); c.a < c.c.c.length; ) { + b = BD(mlb(c), 213); + if (b.f) { + Ekb(e.k, b); + ++k; + } + } + k == 1 && (d.c[d.c.length] = e, true); + } + for (f = new olb(d); f.a < f.c.c.length; ) { + e = BD(mlb(f), 121); + while (e.k.c.length == 1) { + j = BD(mlb(new olb(e.k)), 213); + a.b[j.c] = j.g; + h = j.d; + i = j.e; + for (c = new olb(LFb(e)); c.a < c.c.c.length; ) { + b = BD(mlb(c), 213); + pb(b, j) || (b.f ? h == b.d || i == b.e ? a.b[j.c] -= a.b[b.c] - b.g : a.b[j.c] += a.b[b.c] - b.g : e == h ? b.d == e ? a.b[j.c] += b.g : a.b[j.c] -= b.g : b.d == e ? a.b[j.c] -= b.g : a.b[j.c] += b.g); + } + Lkb(h.k, j); + Lkb(i.k, j); + h == e ? e = j.e : e = j.d; + } + } + } + function k4c(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + if (b == null || b.length == 0) { + return null; + } + f = BD(Phb(a.f, b), 23); + if (!f) { + for (e = (n = new $ib(a.d).a.vc().Kc(), new djb(n)); e.a.Ob(); ) { + c = (g = BD(e.a.Pb(), 42), BD(g.dd(), 23)); + h = c.f; + o2 = b.length; + if (dfb(h.substr(h.length - o2, o2), b) && (b.length == h.length || bfb(h, h.length - b.length - 1) == 46)) { + if (f) { + return null; + } + f = c; + } + } + if (!f) { + for (d = (m = new $ib(a.d).a.vc().Kc(), new djb(m)); d.a.Ob(); ) { + c = (g = BD(d.a.Pb(), 42), BD(g.dd(), 23)); + l = c.g; + if (l != null) { + for (i = l, j = 0, k = i.length; j < k; ++j) { + h = i[j]; + o2 = b.length; + if (dfb(h.substr(h.length - o2, o2), b) && (b.length == h.length || bfb(h, h.length - b.length - 1) == 46)) { + if (f) { + return null; + } + f = c; + } + } + } + } + } + !!f && Shb(a.f, b, f); + } + return f; + } + function sA(a, b) { + var c, d, e, f, g; + c = new Vfb(); + g = false; + for (f = 0; f < b.length; f++) { + d = (BCb(f, b.length), b.charCodeAt(f)); + if (d == 32) { + gA(a, c, 0); + c.a += " "; + gA(a, c, 0); + while (f + 1 < b.length && (BCb(f + 1, b.length), b.charCodeAt(f + 1) == 32)) { + ++f; + } + continue; + } + if (g) { + if (d == 39) { + if (f + 1 < b.length && (BCb(f + 1, b.length), b.charCodeAt(f + 1) == 39)) { + c.a += String.fromCharCode(d); + ++f; + } else { + g = false; + } + } else { + c.a += String.fromCharCode(d); + } + continue; + } + if (hfb("GyMLdkHmsSEcDahKzZv", wfb(d)) > 0) { + gA(a, c, 0); + c.a += String.fromCharCode(d); + e = lA(b, f); + gA(a, c, e); + f += e - 1; + continue; + } + if (d == 39) { + if (f + 1 < b.length && (BCb(f + 1, b.length), b.charCodeAt(f + 1) == 39)) { + c.a += "'"; + ++f; + } else { + g = true; + } + } else { + c.a += String.fromCharCode(d); + } + } + gA(a, c, 0); + mA(a); + } + function wDc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + Odd(c, "Network simplex layering", 1); + a.b = b; + r = BD(vNb(b, (Nyc(), Ayc)), 19).a * 4; + q = a.b.a; + if (q.c.length < 1) { + Qdd(c); + return; + } + f = sDc(a, q); + p = null; + for (e = Jsb(f, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 15); + h = r * QD($wnd.Math.sqrt(d.gc())); + g = vDc(d); + uGb(HGb(JGb(IGb(LGb(g), h), p), true), Udd(c, 1)); + m = a.b.b; + for (o2 = new olb(g.a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 121); + while (m.c.length <= n.e) { + Dkb(m, m.c.length, new H1b(a.b)); + } + k = BD(n.f, 10); + $_b(k, BD(Ikb(m, n.e), 29)); + } + if (f.b > 1) { + p = KC(WD, oje, 25, a.b.b.c.length, 15, 1); + l = 0; + for (j = new olb(a.b.b); j.a < j.c.c.length; ) { + i = BD(mlb(j), 29); + p[l++] = i.a.c.length; + } + } + } + q.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = null; + a.b = null; + a.c = null; + Qdd(c); + } + function OUb(a) { + var b, c, d, e, f, g, h; + b = 0; + for (f = new olb(a.b.a); f.a < f.c.c.length; ) { + d = BD(mlb(f), 189); + d.b = 0; + d.c = 0; + } + NUb(a, 0); + MUb(a, a.g); + sVb(a.c); + wVb(a.c); + c = (ead(), aad); + uVb(oVb(tVb(uVb(oVb(tVb(uVb(tVb(a.c, c)), had(c)))), c))); + tVb(a.c, aad); + RUb(a, a.g); + SUb(a, 0); + TUb(a, 0); + UUb(a, 1); + NUb(a, 1); + MUb(a, a.d); + sVb(a.c); + for (g = new olb(a.b.a); g.a < g.c.c.length; ) { + d = BD(mlb(g), 189); + b += $wnd.Math.abs(d.c); + } + for (h = new olb(a.b.a); h.a < h.c.c.length; ) { + d = BD(mlb(h), 189); + d.b = 0; + d.c = 0; + } + c = dad; + uVb(oVb(tVb(uVb(oVb(tVb(uVb(wVb(tVb(a.c, c))), had(c)))), c))); + tVb(a.c, aad); + RUb(a, a.d); + SUb(a, 1); + TUb(a, 1); + UUb(a, 0); + wVb(a.c); + for (e = new olb(a.b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 189); + b += $wnd.Math.abs(d.c); + } + return b; + } + function Wfe(a, b) { + var c, d, e, f, g, h, i, j, k; + j = b; + if (j.b == null || a.b == null) + return; + Yfe(a); + Vfe(a); + Yfe(j); + Vfe(j); + c = KC(WD, oje, 25, a.b.length + j.b.length, 15, 1); + k = 0; + d = 0; + g = 0; + while (d < a.b.length && g < j.b.length) { + e = a.b[d]; + f = a.b[d + 1]; + h = j.b[g]; + i = j.b[g + 1]; + if (f < h) { + d += 2; + } else if (f >= h && e <= i) { + if (h <= e && f <= i) { + c[k++] = e; + c[k++] = f; + d += 2; + } else if (h <= e) { + c[k++] = e; + c[k++] = i; + a.b[d] = i + 1; + g += 2; + } else if (f <= i) { + c[k++] = h; + c[k++] = f; + d += 2; + } else { + c[k++] = h; + c[k++] = i; + a.b[d] = i + 1; + } + } else if (i < e) { + g += 2; + } else { + throw vbb(new hz("Token#intersectRanges(): Internal Error: [" + a.b[d] + "," + a.b[d + 1] + "] & [" + j.b[g] + "," + j.b[g + 1] + "]")); + } + } + while (d < a.b.length) { + c[k++] = a.b[d++]; + c[k++] = a.b[d++]; + } + a.b = KC(WD, oje, 25, k, 15, 1); + $fb(c, 0, a.b, 0, k); + } + function PUb(a) { + var b, c, d, e, f, g, h; + b = new Rkb(); + a.g = new Rkb(); + a.d = new Rkb(); + for (g = new nib(new eib(a.f.b).a); g.b; ) { + f = lib(g); + Ekb(b, BD(BD(f.dd(), 46).b, 81)); + fad(BD(f.cd(), 594).gf()) ? Ekb(a.d, BD(f.dd(), 46)) : Ekb(a.g, BD(f.dd(), 46)); + } + MUb(a, a.d); + MUb(a, a.g); + a.c = new CVb(a.b); + AVb(a.c, (xUb(), wUb)); + RUb(a, a.d); + RUb(a, a.g); + Gkb(b, a.c.a.b); + a.e = new f7c(Pje, Pje); + a.a = new f7c(Qje, Qje); + for (d = new olb(b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 81); + a.e.a = $wnd.Math.min(a.e.a, c.g.c); + a.e.b = $wnd.Math.min(a.e.b, c.g.d); + a.a.a = $wnd.Math.max(a.a.a, c.g.c + c.g.b); + a.a.b = $wnd.Math.max(a.a.b, c.g.d + c.g.a); + } + zVb(a.c, new YUb()); + h = 0; + do { + e = OUb(a); + ++h; + } while ((h < 2 || e > Qie) && h < 10); + zVb(a.c, new _Ub()); + OUb(a); + vVb(a.c); + yUb(a.f); + } + function sZb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + if (!Ccb(DD(vNb(c, (Nyc(), fxc))))) { + return; + } + for (h = new olb(c.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + m = k_b(g.g); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i = j[k]; + f = i.d.i == c; + e = f && Ccb(DD(vNb(i, gxc))); + if (e) { + o2 = i.c; + n = BD(Ohb(a.b, o2), 10); + if (!n) { + n = Z$b(o2, (dcd(), bcd), o2.j, -1, null, null, o2.o, BD(vNb(b, Lwc), 103), b); + yNb(n, (wtc(), $sc), o2); + Rhb(a.b, o2, n); + Ekb(b.a, n); + } + q = i.d; + p = BD(Ohb(a.b, q), 10); + if (!p) { + p = Z$b(q, (dcd(), bcd), q.j, 1, null, null, q.o, BD(vNb(b, Lwc), 103), b); + yNb(p, (wtc(), $sc), q); + Rhb(a.b, q, p); + Ekb(b.a, p); + } + d = kZb(i); + QZb(d, BD(Ikb(n.j, 0), 11)); + RZb(d, BD(Ikb(p.j, 0), 11)); + Rc(a.a, i, new BZb(d, b, (KAc(), IAc))); + BD(vNb(b, (wtc(), Ksc)), 21).Fc((Orc(), Hrc)); + } + } + } + } + function W9b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2; + Odd(c, "Label dummy switching", 1); + d = BD(vNb(b, (Nyc(), Owc)), 227); + J9b(b); + e = T9b(b, d); + a.a = KC(UD, Vje, 25, b.b.c.length, 15, 1); + for (h = (Apc(), OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc])), k = 0, n = h.length; k < n; ++k) { + f = h[k]; + if ((f == zpc || f == upc || f == xpc) && !BD(uqb(e.a, f) ? e.b[f.g] : null, 15).dc()) { + M9b(a, b); + break; + } + } + for (i = OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]), l = 0, o2 = i.length; l < o2; ++l) { + f = i[l]; + f == zpc || f == upc || f == xpc || X9b(a, BD(uqb(e.a, f) ? e.b[f.g] : null, 15)); + } + for (g = OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]), j = 0, m = g.length; j < m; ++j) { + f = g[j]; + (f == zpc || f == upc || f == xpc) && X9b(a, BD(uqb(e.a, f) ? e.b[f.g] : null, 15)); + } + a.a = null; + Qdd(c); + } + function AFc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + switch (a.k.g) { + case 1: + d = BD(vNb(a, (wtc(), $sc)), 17); + c = BD(vNb(d, _sc), 74); + !c ? c = new s7c() : Ccb(DD(vNb(d, ltc))) && (c = w7c(c)); + j = BD(vNb(a, Vsc), 11); + if (j) { + k = l7c(OC(GC(m1, 1), nie, 8, 0, [j.i.n, j.n, j.a])); + if (b <= k.a) { + return k.b; + } + Gsb(c, k, c.a, c.a.a); + } + l = BD(vNb(a, Wsc), 11); + if (l) { + m = l7c(OC(GC(m1, 1), nie, 8, 0, [l.i.n, l.n, l.a])); + if (m.a <= b) { + return m.b; + } + Gsb(c, m, c.c.b, c.c); + } + if (c.b >= 2) { + i = Jsb(c, 0); + g = BD(Xsb(i), 8); + h = BD(Xsb(i), 8); + while (h.a < b && i.b != i.d.c) { + g = h; + h = BD(Xsb(i), 8); + } + return g.b + (b - g.a) / (h.a - g.a) * (h.b - g.b); + } + break; + case 3: + f = BD(vNb(BD(Ikb(a.j, 0), 11), (wtc(), $sc)), 11); + e = f.i; + switch (f.j.g) { + case 1: + return e.n.b; + case 3: + return e.n.b + e.o.b; + } + } + return T_b(a).b; + } + function Wgc(a) { + var b, c, d, e, f, g, h, i, j, k, l; + for (g = new olb(a.d.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 29); + for (i = new olb(f.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + if (Ccb(DD(vNb(h, (Nyc(), pwc))))) { + if (!Qq(O_b(h))) { + d = BD(Oq(O_b(h)), 17); + k = d.c.i; + k == h && (k = d.d.i); + l = new vgd(k, c7c(R6c(h.n), k.n)); + Rhb(a.b, h, l); + continue; + } + } + e = new J6c(h.n.a - h.d.b, h.n.b - h.d.d, h.o.a + h.d.b + h.d.c, h.o.b + h.d.d + h.d.a); + b = vDb(yDb(wDb(xDb(new zDb(), h), e), Fgc), a.a); + pDb(qDb(rDb(new sDb(), OC(GC(PM, 1), Uhe, 57, 0, [b])), b), a.a); + j = new lEb(); + Rhb(a.e, b, j); + c = sr(new Sr(ur(R_b(h).a.Kc(), new Sq()))) - sr(new Sr(ur(U_b(h).a.Kc(), new Sq()))); + c < 0 ? jEb(j, true, (ead(), aad)) : c > 0 && jEb(j, true, (ead(), bad)); + h.k == (j0b(), e0b) && kEb(j); + Rhb(a.f, h, b); + } + } + } + function Bbc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + Odd(c, "Node promotion heuristic", 1); + a.g = b; + Abc(a); + a.q = BD(vNb(b, (Nyc(), rxc)), 260); + k = BD(vNb(a.g, qxc), 19).a; + f = new Jbc(); + switch (a.q.g) { + case 2: + case 1: + Dbc(a, f); + break; + case 3: + a.q = (kAc(), jAc); + Dbc(a, f); + i = 0; + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 19); + i = $wnd.Math.max(i, g.a); + } + if (i > a.j) { + a.q = dAc; + Dbc(a, f); + } + break; + case 4: + a.q = (kAc(), jAc); + Dbc(a, f); + j = 0; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = ED(mlb(e)); + j = $wnd.Math.max(j, (uCb(d), d)); + } + if (j > a.k) { + a.q = gAc; + Dbc(a, f); + } + break; + case 6: + m = QD($wnd.Math.ceil(a.f.length * k / 100)); + Dbc(a, new Mbc(m)); + break; + case 5: + l = QD($wnd.Math.ceil(a.d * k / 100)); + Dbc(a, new Pbc(l)); + break; + default: + Dbc(a, f); + } + Ebc(a, b); + Qdd(c); + } + function fFc(a, b, c) { + var d, e, f, g; + this.j = a; + this.e = WZb(a); + this.o = this.j.e; + this.i = !!this.o; + this.p = this.i ? BD(Ikb(c, Q_b(this.o).p), 214) : null; + e = BD(vNb(a, (wtc(), Ksc)), 21); + this.g = e.Hc((Orc(), Hrc)); + this.b = new Rkb(); + this.d = new rHc(this.e); + g = BD(vNb(this.j, jtc), 230); + this.q = wFc(b, g, this.e); + this.k = new BGc(this); + f = Ou(OC(GC(qY, 1), Uhe, 225, 0, [this, this.d, this.k, this.q])); + if (b == (rGc(), oGc) && !Ccb(DD(vNb(a, (Nyc(), Awc))))) { + d = new SEc(this.e); + f.c[f.c.length] = d; + this.c = new uEc(d, g, BD(this.q, 402)); + } else if (b == oGc && Ccb(DD(vNb(a, (Nyc(), Awc))))) { + d = new SEc(this.e); + f.c[f.c.length] = d; + this.c = new XGc(d, g, BD(this.q, 402)); + } else { + this.c = new Oic(b, this); + } + Ekb(f, this.c); + $Ic(f, this.e); + this.s = AGc(this.k); + } + function xUc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + l = BD(pr((g = Jsb(new ZRc(b).a.d, 0), new aSc(g))), 86); + o2 = l ? BD(vNb(l, (mTc(), _Sc)), 86) : null; + e = 1; + while (!!l && !!o2) { + i = 0; + u = 0; + c = l; + d = o2; + for (h = 0; h < e; h++) { + c = VRc(c); + d = VRc(d); + u += Edb(ED(vNb(c, (mTc(), cTc)))); + i += Edb(ED(vNb(d, cTc))); + } + t = Edb(ED(vNb(o2, (mTc(), fTc)))); + s = Edb(ED(vNb(l, fTc))); + m = zUc(l, o2); + n = t + i + a.a + m - s - u; + if (0 < n) { + j = b; + k = 0; + while (!!j && j != d) { + ++k; + j = BD(vNb(j, aTc), 86); + } + if (j) { + r = n / k; + j = b; + while (j != d) { + q = Edb(ED(vNb(j, fTc))) + n; + yNb(j, fTc, q); + p = Edb(ED(vNb(j, cTc))) + n; + yNb(j, cTc, p); + n -= r; + j = BD(vNb(j, aTc), 86); + } + } else { + return; + } + } + ++e; + l.d.b == 0 ? l = JRc(new ZRc(b), e) : l = BD(pr((f = Jsb(new ZRc(l).a.d, 0), new aSc(f))), 86); + o2 = l ? BD(vNb(l, _Sc), 86) : null; + } + } + function Cbc(a, b) { + var c, d, e, f, g, h, i, j, k, l; + i = true; + e = 0; + j = a.f[b.p]; + k = b.o.b + a.n; + c = a.c[b.p][2]; + Nkb(a.a, j, meb(BD(Ikb(a.a, j), 19).a - 1 + c)); + Nkb(a.b, j, Edb(ED(Ikb(a.b, j))) - k + c * a.e); + ++j; + if (j >= a.i) { + ++a.i; + Ekb(a.a, meb(1)); + Ekb(a.b, k); + } else { + d = a.c[b.p][1]; + Nkb(a.a, j, meb(BD(Ikb(a.a, j), 19).a + 1 - d)); + Nkb(a.b, j, Edb(ED(Ikb(a.b, j))) + k - d * a.e); + } + (a.q == (kAc(), dAc) && (BD(Ikb(a.a, j), 19).a > a.j || BD(Ikb(a.a, j - 1), 19).a > a.j) || a.q == gAc && (Edb(ED(Ikb(a.b, j))) > a.k || Edb(ED(Ikb(a.b, j - 1))) > a.k)) && (i = false); + for (g = new Sr(ur(R_b(b).a.Kc(), new Sq())); Qr(g); ) { + f = BD(Rr(g), 17); + h = f.c.i; + if (a.f[h.p] == j) { + l = Cbc(a, h); + e = e + BD(l.a, 19).a; + i = i && Ccb(DD(l.b)); + } + } + a.f[b.p] = j; + e = e + a.c[b.p][0]; + return new vgd(meb(e), (Bcb(), i ? true : false)); + } + function sPc(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r; + l = new Lqb(); + g = new Rkb(); + qPc(a, c, a.d.fg(), g, l); + qPc(a, d, a.d.gg(), g, l); + a.b = 0.2 * (p = rPc(LAb(new YAb(null, new Kub(g, 16)), new xPc())), q = rPc(LAb(new YAb(null, new Kub(g, 16)), new zPc())), $wnd.Math.min(p, q)); + f = 0; + for (h = 0; h < g.c.length - 1; h++) { + i = (tCb(h, g.c.length), BD(g.c[h], 112)); + for (o2 = h + 1; o2 < g.c.length; o2++) { + f += pPc(a, i, (tCb(o2, g.c.length), BD(g.c[o2], 112))); + } + } + m = BD(vNb(b, (wtc(), jtc)), 230); + f >= 2 && (r = WNc(g, true, m), !a.e && (a.e = new ZOc(a)), VOc(a.e, r, g, a.b), void 0); + uPc(g, m); + wPc(g); + n = -1; + for (k = new olb(g); k.a < k.c.c.length; ) { + j = BD(mlb(k), 112); + if ($wnd.Math.abs(j.s - j.c) < qme) { + continue; + } + n = $wnd.Math.max(n, j.o); + a.d.dg(j, e, a.c); + } + a.d.a.a.$b(); + return n + 1; + } + function aUb(a, b) { + var c, d, e, f, g; + c = Edb(ED(vNb(b, (Nyc(), lyc)))); + c < 2 && yNb(b, lyc, 2); + d = BD(vNb(b, Lwc), 103); + d == (ead(), cad) && yNb(b, Lwc, a_b(b)); + e = BD(vNb(b, fyc), 19); + e.a == 0 ? yNb(b, (wtc(), jtc), new Gub()) : yNb(b, (wtc(), jtc), new Hub(e.a)); + f = DD(vNb(b, Axc)); + f == null && yNb(b, Axc, (Bcb(), PD(vNb(b, Swc)) === PD((Aad(), wad)) ? true : false)); + MAb(new YAb(null, new Kub(b.a, 16)), new dUb(a)); + MAb(LAb(new YAb(null, new Kub(b.b, 16)), new fUb()), new hUb(a)); + g = new oBc(b); + yNb(b, (wtc(), otc), g); + H2c(a.a); + K2c(a.a, (qUb(), lUb), BD(vNb(b, Jwc), 246)); + K2c(a.a, mUb, BD(vNb(b, sxc), 246)); + K2c(a.a, nUb, BD(vNb(b, Iwc), 246)); + K2c(a.a, oUb, BD(vNb(b, Exc), 246)); + K2c(a.a, pUb, kNc(BD(vNb(b, Swc), 218))); + E2c(a.a, _Tb(b)); + yNb(b, itc, F2c(a.a, b)); + } + function fjc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + if (m = a.c[b], n = a.c[c], (o2 = BD(vNb(m, (wtc(), Qsc)), 15), !!o2 && o2.gc() != 0 && o2.Hc(n)) || (p = m.k != (j0b(), g0b) && n.k != g0b, q = BD(vNb(m, Psc), 10), r = BD(vNb(n, Psc), 10), s = q != r, t = !!q && q != m || !!r && r != n, u = gjc(m, (Ucd(), Acd)), v = gjc(n, Rcd), t = t | (gjc(m, Rcd) || gjc(n, Acd)), w = t && s || u || v, p && w) || m.k == (j0b(), i0b) && n.k == h0b || n.k == (j0b(), i0b) && m.k == h0b) { + return false; + } + k = a.c[b]; + f = a.c[c]; + e = LHc(a.e, k, f, (Ucd(), Tcd)); + i = LHc(a.i, k, f, zcd); + Yic(a.f, k, f); + j = Hic(a.b, k, f) + BD(e.a, 19).a + BD(i.a, 19).a + a.f.d; + h = Hic(a.b, f, k) + BD(e.b, 19).a + BD(i.b, 19).a + a.f.b; + if (a.a) { + l = BD(vNb(k, $sc), 11); + g = BD(vNb(f, $sc), 11); + d = JHc(a.g, l, g); + j += BD(d.a, 19).a; + h += BD(d.b, 19).a; + } + return j > h; + } + function k6b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + c = BD(vNb(a, (Nyc(), Vxc)), 98); + g = a.f; + f = a.d; + h = g.a + f.b + f.c; + i = 0 - f.d - a.c.b; + k = g.b + f.d + f.a - a.c.b; + j = new Rkb(); + l = new Rkb(); + for (e = new olb(b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + switch (c.g) { + case 1: + case 2: + case 3: + a6b(d); + break; + case 4: + m = BD(vNb(d, Txc), 8); + n = !m ? 0 : m.a; + d.n.a = h * Edb(ED(vNb(d, (wtc(), htc)))) - n; + M_b(d, true, false); + break; + case 5: + o2 = BD(vNb(d, Txc), 8); + p = !o2 ? 0 : o2.a; + d.n.a = Edb(ED(vNb(d, (wtc(), htc)))) - p; + M_b(d, true, false); + g.a = $wnd.Math.max(g.a, d.n.a + d.o.a / 2); + } + switch (BD(vNb(d, (wtc(), Hsc)), 61).g) { + case 1: + d.n.b = i; + j.c[j.c.length] = d; + break; + case 3: + d.n.b = k; + l.c[l.c.length] = d; + } + } + switch (c.g) { + case 1: + case 2: + c6b(j, a); + c6b(l, a); + break; + case 3: + i6b(j, a); + i6b(l, a); + } + } + function VHc(a, b) { + var c, d, e, f, g, h, i, j, k, l; + k = new Rkb(); + l = new jkb(); + f = null; + e = 0; + for (d = 0; d < b.length; ++d) { + c = b[d]; + XHc(f, c) && (e = QHc(a, l, k, EHc, e)); + wNb(c, (wtc(), Psc)) && (f = BD(vNb(c, Psc), 10)); + switch (c.k.g) { + case 0: + for (i = Vq(Nq(V_b(c, (Ucd(), Acd)), new GIc())); xc(i); ) { + g = BD(yc(i), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + e = QHc(a, l, k, EHc, e); + for (j = Vq(Nq(V_b(c, Rcd), new GIc())); xc(j); ) { + g = BD(yc(j), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + break; + case 3: + if (!V_b(c, DHc).dc()) { + g = BD(V_b(c, DHc).Xb(0), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + V_b(c, EHc).dc() || Wjb(l, c); + break; + case 1: + for (h = V_b(c, (Ucd(), Tcd)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + V_b(c, zcd).Jc(new EIc(l, c)); + } + } + QHc(a, l, k, EHc, e); + return k; + } + function y$c(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s; + j = Pje; + k = Pje; + h = Qje; + i = Qje; + for (m = new olb(b.i); m.a < m.c.c.length; ) { + l = BD(mlb(m), 65); + e = BD(BD(Ohb(a.g, l.a), 46).b, 33); + bld(e, l.b.c, l.b.d); + j = $wnd.Math.min(j, e.i); + k = $wnd.Math.min(k, e.j); + h = $wnd.Math.max(h, e.i + e.g); + i = $wnd.Math.max(i, e.j + e.f); + } + n = BD(hkd(a.c, (d0c(), W_c)), 116); + Afd(a.c, h - j + (n.b + n.c), i - k + (n.d + n.a), true, true); + Efd(a.c, -j + n.b, -k + n.d); + for (d = new Fyd(Wod(a.c)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 79); + g = itd(c, true, true); + o2 = jtd(c); + q = ltd(c); + p = new f7c(o2.i + o2.g / 2, o2.j + o2.f / 2); + f = new f7c(q.i + q.g / 2, q.j + q.f / 2); + r = c7c(new f7c(f.a, f.b), p); + l6c(r, o2.g, o2.f); + P6c(p, r); + s = c7c(new f7c(p.a, p.b), f); + l6c(s, q.g, q.f); + P6c(f, s); + nmd(g, p.a, p.b); + gmd(g, f.a, f.b); + } + } + function EYb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + a.c = a.d; + o2 = DD(vNb(b, (Nyc(), gyc))); + n = o2 == null || (uCb(o2), o2); + f = BD(vNb(b, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)); + e = BD(vNb(b, Vxc), 98); + c = !(e == (dcd(), Zbd) || e == _bd || e == $bd); + if (n && (c || !f)) { + for (l = new olb(b.a); l.a < l.c.c.length; ) { + j = BD(mlb(l), 10); + j.p = 0; + } + m = new Rkb(); + for (k = new olb(b.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + d = DYb(a, j, null); + if (d) { + i = new XZb(); + tNb(i, b); + yNb(i, Esc, BD(d.b, 21)); + u_b(i.d, b.d); + yNb(i, Hxc, null); + for (h = BD(d.a, 15).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + Ekb(i.a, g); + g.a = i; + } + m.Fc(i); + } + } + f && (PD(vNb(b, twc)) === PD((RXb(), OXb)) ? a.c = a.b : a.c = a.a); + } else { + m = new amb(OC(GC(KQ, 1), cne, 37, 0, [b])); + } + PD(vNb(b, twc)) !== PD((RXb(), QXb)) && (mmb(), m.ad(new HYb())); + return m; + } + function KTc(a) { + r4c(a, new E3c(Q3c(L3c(P3c(M3c(O3c(N3c(new R3c(), are), "ELK Mr. Tree"), "Tree-based algorithm provided by the Eclipse Layout Kernel. Computes a spanning tree of the input graph and arranges all nodes according to the resulting parent-children hierarchy. I pity the fool who doesn't use Mr. Tree Layout."), new NTc()), bre), pqb((Csd(), wsd))))); + p4c(a, are, ame, CTc); + p4c(a, are, wme, 20); + p4c(a, are, _le, tme); + p4c(a, are, vme, meb(1)); + p4c(a, are, zme, (Bcb(), true)); + p4c(a, are, Zpe, Ksd(vTc)); + p4c(a, are, Fme, Ksd(xTc)); + p4c(a, are, Tme, Ksd(yTc)); + p4c(a, are, Eme, Ksd(zTc)); + p4c(a, are, Gme, Ksd(wTc)); + p4c(a, are, Dme, Ksd(ATc)); + p4c(a, are, Hme, Ksd(DTc)); + p4c(a, are, Zqe, Ksd(ITc)); + p4c(a, are, $qe, Ksd(FTc)); + } + function zod(a) { + if (a.q) + return; + a.q = true; + a.p = Lnd(a, 0); + a.a = Lnd(a, 1); + Qnd(a.a, 0); + a.f = Lnd(a, 2); + Qnd(a.f, 1); + Knd(a.f, 2); + a.n = Lnd(a, 3); + Knd(a.n, 3); + Knd(a.n, 4); + Knd(a.n, 5); + Knd(a.n, 6); + a.g = Lnd(a, 4); + Qnd(a.g, 7); + Knd(a.g, 8); + a.c = Lnd(a, 5); + Qnd(a.c, 7); + Qnd(a.c, 8); + a.i = Lnd(a, 6); + Qnd(a.i, 9); + Qnd(a.i, 10); + Qnd(a.i, 11); + Qnd(a.i, 12); + Knd(a.i, 13); + a.j = Lnd(a, 7); + Qnd(a.j, 9); + a.d = Lnd(a, 8); + Qnd(a.d, 3); + Qnd(a.d, 4); + Qnd(a.d, 5); + Qnd(a.d, 6); + Knd(a.d, 7); + Knd(a.d, 8); + Knd(a.d, 9); + Knd(a.d, 10); + a.b = Lnd(a, 9); + Knd(a.b, 0); + Knd(a.b, 1); + a.e = Lnd(a, 10); + Knd(a.e, 1); + Knd(a.e, 2); + Knd(a.e, 3); + Knd(a.e, 4); + Qnd(a.e, 5); + Qnd(a.e, 6); + Qnd(a.e, 7); + Qnd(a.e, 8); + Qnd(a.e, 9); + Qnd(a.e, 10); + Knd(a.e, 11); + a.k = Lnd(a, 11); + Knd(a.k, 0); + Knd(a.k, 1); + a.o = Mnd(a, 12); + a.s = Mnd(a, 13); + } + function AUb(a, b) { + b.dc() && HVb(a.j, true, true, true, true); + pb(b, (Ucd(), Gcd)) && HVb(a.j, true, true, true, false); + pb(b, Bcd) && HVb(a.j, false, true, true, true); + pb(b, Ocd) && HVb(a.j, true, true, false, true); + pb(b, Qcd) && HVb(a.j, true, false, true, true); + pb(b, Hcd) && HVb(a.j, false, true, true, false); + pb(b, Ccd) && HVb(a.j, false, true, false, true); + pb(b, Pcd) && HVb(a.j, true, false, false, true); + pb(b, Ncd) && HVb(a.j, true, false, true, false); + pb(b, Lcd) && HVb(a.j, true, true, true, true); + pb(b, Ecd) && HVb(a.j, true, true, true, true); + pb(b, Lcd) && HVb(a.j, true, true, true, true); + pb(b, Dcd) && HVb(a.j, true, true, true, true); + pb(b, Mcd) && HVb(a.j, true, true, true, true); + pb(b, Kcd) && HVb(a.j, true, true, true, true); + pb(b, Jcd) && HVb(a.j, true, true, true, true); + } + function rZb(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q; + f = new Rkb(); + for (j = new olb(d); j.a < j.c.c.length; ) { + h = BD(mlb(j), 441); + g = null; + if (h.f == (KAc(), IAc)) { + for (o2 = new olb(h.e); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 17); + q = n.d.i; + if (Q_b(q) == b) { + iZb(a, b, h, n, h.b, n.d); + } else if (!c || f_b(q, c)) { + jZb(a, b, h, d, n); + } else { + m = oZb(a, b, c, n, h.b, IAc, g); + m != g && (f.c[f.c.length] = m, true); + m.c && (g = m); + } + } + } else { + for (l = new olb(h.e); l.a < l.c.c.length; ) { + k = BD(mlb(l), 17); + p = k.c.i; + if (Q_b(p) == b) { + iZb(a, b, h, k, k.c, h.b); + } else if (!c || f_b(p, c)) { + continue; + } else { + m = oZb(a, b, c, k, h.b, HAc, g); + m != g && (f.c[f.c.length] = m, true); + m.c && (g = m); + } + } + } + } + for (i = new olb(f); i.a < i.c.c.length; ) { + h = BD(mlb(i), 441); + Jkb(b.a, h.a, 0) != -1 || Ekb(b.a, h.a); + h.c && (e.c[e.c.length] = h, true); + } + } + function SJc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + j = new Rkb(); + for (i = new olb(b.a); i.a < i.c.c.length; ) { + g = BD(mlb(i), 10); + for (m = V_b(g, (Ucd(), zcd)).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 11); + for (e = new olb(l.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (!OZb(d) && d.c.i.c == d.d.i.c || OZb(d) || d.d.i.c != c) { + continue; + } + j.c[j.c.length] = d; + } + } + } + for (h = Su(c.a).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + for (m = V_b(g, (Ucd(), Tcd)).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 11); + for (e = new olb(l.e); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (!OZb(d) && d.c.i.c == d.d.i.c || OZb(d) || d.c.i.c != b) { + continue; + } + k = new Bib(j, j.c.length); + f = (sCb(k.b > 0), BD(k.a.Xb(k.c = --k.b), 17)); + while (f != d && k.b > 0) { + a.a[f.p] = true; + a.a[d.p] = true; + f = (sCb(k.b > 0), BD(k.a.Xb(k.c = --k.b), 17)); + } + k.b > 0 && uib(k); + } + } + } + } + function Vmd(b, c, d) { + var e, f, g, h, i, j, k, l, m; + if (b.a != c.Aj()) { + throw vbb(new Wdb(tte + c.ne() + ute)); + } + e = o1d((O6d(), M6d), c).$k(); + if (e) { + return e.Aj().Nh().Ih(e, d); + } + h = o1d(M6d, c).al(); + if (h) { + if (d == null) { + return null; + } + i = BD(d, 15); + if (i.dc()) { + return ""; + } + m = new Hfb(); + for (g = i.Kc(); g.Ob(); ) { + f = g.Pb(); + Efb(m, h.Aj().Nh().Ih(h, f)); + m.a += " "; + } + return lcb(m, m.a.length - 1); + } + l = o1d(M6d, c).bl(); + if (!l.dc()) { + for (k = l.Kc(); k.Ob(); ) { + j = BD(k.Pb(), 148); + if (j.wj(d)) { + try { + m = j.Aj().Nh().Ih(j, d); + if (m != null) { + return m; + } + } catch (a) { + a = ubb(a); + if (!JD(a, 102)) + throw vbb(a); + } + } + } + throw vbb(new Wdb("Invalid value: '" + d + "' for datatype :" + c.ne())); + } + BD(c, 834).Fj(); + return d == null ? null : JD(d, 172) ? "" + BD(d, 172).a : rb(d) == $J ? CQd(Pmd[0], BD(d, 199)) : fcb(d); + } + function zQc(a) { + var b, c, d, e, f, g, h, i, j, k; + j = new Psb(); + h = new Psb(); + for (f = new olb(a); f.a < f.c.c.length; ) { + d = BD(mlb(f), 128); + d.v = 0; + d.n = d.i.c.length; + d.u = d.t.c.length; + d.n == 0 && (Gsb(j, d, j.c.b, j.c), true); + d.u == 0 && d.r.a.gc() == 0 && (Gsb(h, d, h.c.b, h.c), true); + } + g = -1; + while (j.b != 0) { + d = BD(Vt(j, 0), 128); + for (c = new olb(d.t); c.a < c.c.c.length; ) { + b = BD(mlb(c), 268); + k = b.b; + k.v = $wnd.Math.max(k.v, d.v + 1); + g = $wnd.Math.max(g, k.v); + --k.n; + k.n == 0 && (Gsb(j, k, j.c.b, j.c), true); + } + } + if (g > -1) { + for (e = Jsb(h, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 128); + d.v = g; + } + while (h.b != 0) { + d = BD(Vt(h, 0), 128); + for (c = new olb(d.i); c.a < c.c.c.length; ) { + b = BD(mlb(c), 268); + i = b.a; + if (i.r.a.gc() != 0) { + continue; + } + i.v = $wnd.Math.min(i.v, d.v - 1); + --i.u; + i.u == 0 && (Gsb(h, i, h.c.b, h.c), true); + } + } + } + } + function A6c(a, b, c, d, e) { + var f, g, h, i; + i = Pje; + g = false; + h = v6c(a, c7c(new f7c(b.a, b.b), a), P6c(new f7c(c.a, c.b), e), c7c(new f7c(d.a, d.b), c)); + f = !!h && !($wnd.Math.abs(h.a - a.a) <= nse && $wnd.Math.abs(h.b - a.b) <= nse || $wnd.Math.abs(h.a - b.a) <= nse && $wnd.Math.abs(h.b - b.b) <= nse); + h = v6c(a, c7c(new f7c(b.a, b.b), a), c, e); + !!h && (($wnd.Math.abs(h.a - a.a) <= nse && $wnd.Math.abs(h.b - a.b) <= nse) == ($wnd.Math.abs(h.a - b.a) <= nse && $wnd.Math.abs(h.b - b.b) <= nse) || f ? i = $wnd.Math.min(i, U6c(c7c(h, c))) : g = true); + h = v6c(a, c7c(new f7c(b.a, b.b), a), d, e); + !!h && (g || ($wnd.Math.abs(h.a - a.a) <= nse && $wnd.Math.abs(h.b - a.b) <= nse) == ($wnd.Math.abs(h.a - b.a) <= nse && $wnd.Math.abs(h.b - b.b) <= nse) || f) && (i = $wnd.Math.min(i, U6c(c7c(h, d)))); + return i; + } + function cTb(a) { + r4c(a, new E3c(L3c(P3c(M3c(O3c(N3c(new R3c(), Rme), Sme), "Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."), new fTb()), ume))); + p4c(a, Rme, Ame, Ksd(VSb)); + p4c(a, Rme, Cme, (Bcb(), true)); + p4c(a, Rme, Fme, Ksd(YSb)); + p4c(a, Rme, Tme, Ksd(ZSb)); + p4c(a, Rme, Eme, Ksd($Sb)); + p4c(a, Rme, Gme, Ksd(XSb)); + p4c(a, Rme, Dme, Ksd(_Sb)); + p4c(a, Rme, Hme, Ksd(aTb)); + p4c(a, Rme, Mme, Ksd(USb)); + p4c(a, Rme, Ome, Ksd(SSb)); + p4c(a, Rme, Pme, Ksd(TSb)); + p4c(a, Rme, Qme, Ksd(WSb)); + p4c(a, Rme, Nme, Ksd(RSb)); + } + function BFc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + Odd(b, "Interactive crossing minimization", 1); + g = 0; + for (f = new olb(a.b); f.a < f.c.c.length; ) { + d = BD(mlb(f), 29); + d.p = g++; + } + m = WZb(a); + q = new iHc(m.length); + $Ic(new amb(OC(GC(qY, 1), Uhe, 225, 0, [q])), m); + p = 0; + g = 0; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + c = 0; + l = 0; + for (k = new olb(d.a); k.a < k.c.c.length; ) { + i = BD(mlb(k), 10); + if (i.n.a > 0) { + c += i.n.a + i.o.a / 2; + ++l; + } + for (o2 = new olb(i.j); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + n.p = p++; + } + } + l > 0 && (c /= l); + r = KC(UD, Vje, 25, d.a.c.length, 15, 1); + h = 0; + for (j = new olb(d.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + i.p = h++; + r[i.p] = AFc(i, c); + i.k == (j0b(), g0b) && yNb(i, (wtc(), atc), r[i.p]); + } + mmb(); + Okb(d.a, new GFc(r)); + YDc(q, m, g, true); + ++g; + } + Qdd(b); + } + function Zfe(a, b) { + var c, d, e, f, g, h, i, j, k; + if (b.e == 5) { + Wfe(a, b); + return; + } + j = b; + if (j.b == null || a.b == null) + return; + Yfe(a); + Vfe(a); + Yfe(j); + Vfe(j); + c = KC(WD, oje, 25, a.b.length + j.b.length, 15, 1); + k = 0; + d = 0; + g = 0; + while (d < a.b.length && g < j.b.length) { + e = a.b[d]; + f = a.b[d + 1]; + h = j.b[g]; + i = j.b[g + 1]; + if (f < h) { + c[k++] = a.b[d++]; + c[k++] = a.b[d++]; + } else if (f >= h && e <= i) { + if (h <= e && f <= i) { + d += 2; + } else if (h <= e) { + a.b[d] = i + 1; + g += 2; + } else if (f <= i) { + c[k++] = e; + c[k++] = h - 1; + d += 2; + } else { + c[k++] = e; + c[k++] = h - 1; + a.b[d] = i + 1; + g += 2; + } + } else if (i < e) { + g += 2; + } else { + throw vbb(new hz("Token#subtractRanges(): Internal Error: [" + a.b[d] + "," + a.b[d + 1] + "] - [" + j.b[g] + "," + j.b[g + 1] + "]")); + } + } + while (d < a.b.length) { + c[k++] = a.b[d++]; + c[k++] = a.b[d++]; + } + a.b = KC(WD, oje, 25, k, 15, 1); + $fb(c, 0, a.b, 0, k); + } + function BJb(a) { + var b, c, d, e, f, g, h; + if (a.A.dc()) { + return; + } + if (a.A.Hc((tdd(), rdd))) { + BD(Mpb(a.b, (Ucd(), Acd)), 124).k = true; + BD(Mpb(a.b, Rcd), 124).k = true; + b = a.q != (dcd(), _bd) && a.q != $bd; + ZGb(BD(Mpb(a.b, zcd), 124), b); + ZGb(BD(Mpb(a.b, Tcd), 124), b); + ZGb(a.g, b); + if (a.A.Hc(sdd)) { + BD(Mpb(a.b, Acd), 124).j = true; + BD(Mpb(a.b, Rcd), 124).j = true; + BD(Mpb(a.b, zcd), 124).k = true; + BD(Mpb(a.b, Tcd), 124).k = true; + a.g.k = true; + } + } + if (a.A.Hc(qdd)) { + a.a.j = true; + a.a.k = true; + a.g.j = true; + a.g.k = true; + h = a.B.Hc((Idd(), Edd)); + for (e = wJb(), f = 0, g = e.length; f < g; ++f) { + d = e[f]; + c = BD(Mpb(a.i, d), 306); + if (c) { + if (sJb(d)) { + c.j = true; + c.k = true; + } else { + c.j = !h; + c.k = !h; + } + } + } + } + if (a.A.Hc(pdd) && a.B.Hc((Idd(), Ddd))) { + a.g.j = true; + a.g.j = true; + if (!a.a.j) { + a.a.j = true; + a.a.k = true; + a.a.e = true; + } + } + } + function GJc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + for (d = new olb(a.e.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + for (f = new olb(c.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + n = a.i[e.p]; + j = n.a.e; + i = n.d.e; + e.n.b = j; + r = i - j - e.o.b; + b = bKc(e); + m = (Izc(), (!e.q ? (mmb(), mmb(), kmb) : e.q)._b((Nyc(), Cxc)) ? l = BD(vNb(e, Cxc), 197) : l = BD(vNb(Q_b(e), Dxc), 197), l); + b && (m == Fzc || m == Ezc) && (e.o.b += r); + if (b && (m == Hzc || m == Fzc || m == Ezc)) { + for (p = new olb(e.j); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 11); + if ((Ucd(), Ecd).Hc(o2.j)) { + k = BD(Ohb(a.k, o2), 121); + o2.n.b = k.e - j; + } + } + for (h = new olb(e.b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 70); + q = BD(vNb(e, xxc), 21); + q.Hc((Hbd(), Ebd)) ? g.n.b += r : q.Hc(Fbd) && (g.n.b += r / 2); + } + (m == Fzc || m == Ezc) && V_b(e, (Ucd(), Rcd)).Jc(new $Kc(r)); + } + } + } + } + function Lwb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + if (!a.b) { + return false; + } + g = null; + m = null; + i = new exb(null, null); + e = 1; + i.a[1] = a.b; + l = i; + while (l.a[e]) { + j = e; + h = m; + m = l; + l = l.a[e]; + d = a.a.ue(b, l.d); + e = d < 0 ? 0 : 1; + d == 0 && (!c.c || wtb(l.e, c.d)) && (g = l); + if (!(!!l && l.b) && !Hwb(l.a[e])) { + if (Hwb(l.a[1 - e])) { + m = m.a[j] = Owb(l, e); + } else if (!Hwb(l.a[1 - e])) { + n = m.a[1 - j]; + if (n) { + if (!Hwb(n.a[1 - j]) && !Hwb(n.a[j])) { + m.b = false; + n.b = true; + l.b = true; + } else { + f = h.a[1] == m ? 1 : 0; + Hwb(n.a[j]) ? h.a[f] = Nwb(m, j) : Hwb(n.a[1 - j]) && (h.a[f] = Owb(m, j)); + l.b = h.a[f].b = true; + h.a[f].a[0].b = false; + h.a[f].a[1].b = false; + } + } + } + } + } + if (g) { + c.b = true; + c.d = g.e; + if (l != g) { + k = new exb(l.d, l.e); + Mwb(a, i, g, k); + m == g && (m = k); + } + m.a[m.a[1] == l ? 1 : 0] = l.a[!l.a[0] ? 1 : 0]; + --a.c; + } + a.b = i.a[1]; + !!a.b && (a.b.b = false); + return c.b; + } + function cic(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + for (e = new olb(a.a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + for (i = d.c.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 57); + if (d.a == h.a) { + continue; + } + fad(a.a.d) ? l = a.a.g.Oe(d, h) : l = a.a.g.Pe(d, h); + f = d.b.a + d.d.b + l - h.b.a; + f = $wnd.Math.ceil(f); + f = $wnd.Math.max(0, f); + if (vgc(d, h)) { + g = nGb(new pGb(), a.d); + j = QD($wnd.Math.ceil(h.b.a - d.b.a)); + b = j - (h.b.a - d.b.a); + k = ugc(d).a; + c = d; + if (!k) { + k = ugc(h).a; + b = -b; + c = h; + } + if (k) { + c.b.a -= b; + k.n.a -= b; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), $wnd.Math.max(0, j)), 1), g), a.c[d.a.d])); + AFb(DFb(CFb(EFb(BFb(new FFb(), $wnd.Math.max(0, -j)), 1), g), a.c[h.a.d])); + } else { + m = 1; + (JD(d.g, 145) && JD(h.g, 10) || JD(h.g, 145) && JD(d.g, 10)) && (m = 2); + AFb(DFb(CFb(EFb(BFb(new FFb(), QD(f)), m), a.c[d.a.d]), a.c[h.a.d])); + } + } + } + } + function pEc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + if (c) { + d = -1; + k = new Bib(b, 0); + while (k.b < k.d.gc()) { + h = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 10)); + l = a.c[h.c.p][h.p].a; + if (l == null) { + g = d + 1; + f = new Bib(b, k.b); + while (f.b < f.d.gc()) { + m = tEc(a, (sCb(f.b < f.d.gc()), BD(f.d.Xb(f.c = f.b++), 10))).a; + if (m != null) { + g = (uCb(m), m); + break; + } + } + l = (d + g) / 2; + a.c[h.c.p][h.p].a = l; + a.c[h.c.p][h.p].d = (uCb(l), l); + a.c[h.c.p][h.p].b = 1; + } + d = (uCb(l), l); + } + } else { + e = 0; + for (j = new olb(b); j.a < j.c.c.length; ) { + h = BD(mlb(j), 10); + a.c[h.c.p][h.p].a != null && (e = $wnd.Math.max(e, Edb(a.c[h.c.p][h.p].a))); + } + e += 2; + for (i = new olb(b); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + if (a.c[h.c.p][h.p].a == null) { + l = Cub(a.i, 24) * lke * e - 1; + a.c[h.c.p][h.p].a = l; + a.c[h.c.p][h.p].d = l; + a.c[h.c.p][h.p].b = 1; + } + } + } + } + function CZd() { + rEd(b5, new i$d()); + rEd(a5, new P$d()); + rEd(c5, new u_d()); + rEd(d5, new M_d()); + rEd(f5, new P_d()); + rEd(h5, new S_d()); + rEd(g5, new V_d()); + rEd(i5, new Y_d()); + rEd(k5, new GZd()); + rEd(l5, new JZd()); + rEd(m5, new MZd()); + rEd(n5, new PZd()); + rEd(o5, new SZd()); + rEd(p5, new VZd()); + rEd(q5, new YZd()); + rEd(t5, new _Zd()); + rEd(v5, new c$d()); + rEd(x6, new f$d()); + rEd(j5, new l$d()); + rEd(u5, new o$d()); + rEd(wI, new r$d()); + rEd(GC(SD, 1), new u$d()); + rEd(xI, new x$d()); + rEd(yI, new A$d()); + rEd($J, new D$d()); + rEd(O4, new G$d()); + rEd(BI, new J$d()); + rEd(T4, new M$d()); + rEd(U4, new S$d()); + rEd(O9, new V$d()); + rEd(E9, new Y$d()); + rEd(FI, new _$d()); + rEd(JI, new c_d()); + rEd(AI, new f_d()); + rEd(MI, new i_d()); + rEd(DK, new l_d()); + rEd(v8, new o_d()); + rEd(u8, new r_d()); + rEd(UI, new x_d()); + rEd(ZI, new A_d()); + rEd(X4, new D_d()); + rEd(V4, new G_d()); + } + function hA(a, b, c) { + var d, e, f, g, h, i, j, k, l; + !c && (c = TA(b.q.getTimezoneOffset())); + e = (b.q.getTimezoneOffset() - c.a) * 6e4; + h = new gB(wbb(Cbb(b.q.getTime()), e)); + i = h; + if (h.q.getTimezoneOffset() != b.q.getTimezoneOffset()) { + e > 0 ? e -= 864e5 : e += 864e5; + i = new gB(wbb(Cbb(b.q.getTime()), e)); + } + k = new Vfb(); + j = a.a.length; + for (f = 0; f < j; ) { + d = bfb(a.a, f); + if (d >= 97 && d <= 122 || d >= 65 && d <= 90) { + for (g = f + 1; g < j && bfb(a.a, g) == d; ++g) + ; + vA(k, d, g - f, h, i, c); + f = g; + } else if (d == 39) { + ++f; + if (f < j && bfb(a.a, f) == 39) { + k.a += "'"; + ++f; + continue; + } + l = false; + while (!l) { + g = f; + while (g < j && bfb(a.a, g) != 39) { + ++g; + } + if (g >= j) { + throw vbb(new Wdb("Missing trailing '")); + } + g + 1 < j && bfb(a.a, g + 1) == 39 ? ++g : l = true; + Qfb(k, qfb(a.a, f, g)); + f = g + 1; + } + } else { + k.a += String.fromCharCode(d); + ++f; + } + } + return k.a; + } + function MEc(a) { + var b, c, d, e, f, g, h, i; + b = null; + for (d = new olb(a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 233); + Edb(REc(c.g, c.d[0]).a); + c.b = null; + if (!!c.e && c.e.gc() > 0 && c.c == 0) { + !b && (b = new Rkb()); + b.c[b.c.length] = c; + } + } + if (b) { + while (b.c.length != 0) { + c = BD(Kkb(b, 0), 233); + if (!!c.b && c.b.c.length > 0) { + for (f = (!c.b && (c.b = new Rkb()), new olb(c.b)); f.a < f.c.c.length; ) { + e = BD(mlb(f), 233); + if (Gdb(REc(e.g, e.d[0]).a) == Gdb(REc(c.g, c.d[0]).a)) { + if (Jkb(a, e, 0) > Jkb(a, c, 0)) { + return new vgd(e, c); + } + } else if (Edb(REc(e.g, e.d[0]).a) > Edb(REc(c.g, c.d[0]).a)) { + return new vgd(e, c); + } + } + } + for (h = (!c.e && (c.e = new Rkb()), c.e).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 233); + i = (!g.b && (g.b = new Rkb()), g.b); + wCb(0, i.c.length); + aCb(i.c, 0, c); + g.c == i.c.length && (b.c[b.c.length] = g, true); + } + } + } + return null; + } + function wlb(a, b) { + var c, d, e, f, g, h, i, j, k; + if (a == null) { + return Xhe; + } + i = b.a.zc(a, b); + if (i != null) { + return "[...]"; + } + c = new xwb(She, "[", "]"); + for (e = a, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + if (d != null && (rb(d).i & 4) != 0) { + if (Array.isArray(d) && (k = HC(d), !(k >= 14 && k <= 16))) { + if (b.a._b(d)) { + !c.a ? c.a = new Wfb(c.d) : Qfb(c.a, c.b); + Nfb(c.a, "[...]"); + } else { + h = CD(d); + j = new Vqb(b); + uwb(c, wlb(h, j)); + } + } else + JD(d, 177) ? uwb(c, Xlb(BD(d, 177))) : JD(d, 190) ? uwb(c, Qlb(BD(d, 190))) : JD(d, 195) ? uwb(c, Rlb(BD(d, 195))) : JD(d, 2012) ? uwb(c, Wlb(BD(d, 2012))) : JD(d, 48) ? uwb(c, Ulb(BD(d, 48))) : JD(d, 364) ? uwb(c, Vlb(BD(d, 364))) : JD(d, 832) ? uwb(c, Tlb(BD(d, 832))) : JD(d, 104) && uwb(c, Slb(BD(d, 104))); + } else { + uwb(c, d == null ? Xhe : fcb(d)); + } + } + return !c.a ? c.c : c.e.length == 0 ? c.a.a : c.a.a + ("" + c.e); + } + function xQb(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + h = itd(b, false, false); + r = ofd(h); + d && (r = w7c(r)); + t = Edb(ED(hkd(b, (CPb(), vPb)))); + q = (sCb(r.b != 0), BD(r.a.a.c, 8)); + l = BD(Ut(r, 1), 8); + if (r.b > 2) { + k = new Rkb(); + Gkb(k, new Jib(r, 1, r.b)); + f = sQb(k, t + a.a); + s = new XOb(f); + tNb(s, b); + c.c[c.c.length] = s; + } else { + d ? s = BD(Ohb(a.b, jtd(b)), 266) : s = BD(Ohb(a.b, ltd(b)), 266); + } + i = jtd(b); + d && (i = ltd(b)); + g = zQb(q, i); + j = t + a.a; + if (g.a) { + j += $wnd.Math.abs(q.b - l.b); + p = new f7c(l.a, (l.b + q.b) / 2); + } else { + j += $wnd.Math.abs(q.a - l.a); + p = new f7c((l.a + q.a) / 2, l.b); + } + d ? Rhb(a.d, b, new ZOb(s, g, p, j)) : Rhb(a.c, b, new ZOb(s, g, p, j)); + Rhb(a.b, b, s); + o2 = (!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n); + for (n = new Fyd(o2); n.e != n.i.gc(); ) { + m = BD(Dyd(n), 137); + e = wQb(a, m, true, 0, 0); + c.c[c.c.length] = e; + } + } + function wPc(a) { + var b, c, d, e, f, g, h, i, j, k; + j = new Rkb(); + h = new Rkb(); + for (g = new olb(a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 112); + pOc(e, e.f.c.length); + qOc(e, e.k.c.length); + e.d == 0 && (j.c[j.c.length] = e, true); + e.i == 0 && e.e.b == 0 && (h.c[h.c.length] = e, true); + } + d = -1; + while (j.c.length != 0) { + e = BD(Kkb(j, 0), 112); + for (c = new olb(e.k); c.a < c.c.c.length; ) { + b = BD(mlb(c), 129); + k = b.b; + rOc(k, $wnd.Math.max(k.o, e.o + 1)); + d = $wnd.Math.max(d, k.o); + pOc(k, k.d - 1); + k.d == 0 && (j.c[j.c.length] = k, true); + } + } + if (d > -1) { + for (f = new olb(h); f.a < f.c.c.length; ) { + e = BD(mlb(f), 112); + e.o = d; + } + while (h.c.length != 0) { + e = BD(Kkb(h, 0), 112); + for (c = new olb(e.f); c.a < c.c.c.length; ) { + b = BD(mlb(c), 129); + i = b.a; + if (i.e.b > 0) { + continue; + } + rOc(i, $wnd.Math.min(i.o, e.o - 1)); + qOc(i, i.i - 1); + i.i == 0 && (h.c[h.c.length] = i, true); + } + } + } + } + function QQd(a, b, c) { + var d, e, f, g, h, i, j; + j = a.c; + !b && (b = FQd); + a.c = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + i = new nSd(a, 1, 2, j, a.c); + !c ? c = i : c.Ei(i); + } + if (j != b) { + if (JD(a.Cb, 284)) { + if (a.Db >> 16 == -10) { + c = BD(a.Cb, 284).nk(b, c); + } else if (a.Db >> 16 == -15) { + !b && (b = (jGd(), YFd)); + !j && (j = (jGd(), YFd)); + if (a.Cb.nh()) { + i = new pSd(a.Cb, 1, 13, j, b, HLd(QSd(BD(a.Cb, 59)), a), false); + !c ? c = i : c.Ei(i); + } + } + } else if (JD(a.Cb, 88)) { + if (a.Db >> 16 == -23) { + JD(b, 88) || (b = (jGd(), _Fd)); + JD(j, 88) || (j = (jGd(), _Fd)); + if (a.Cb.nh()) { + i = new pSd(a.Cb, 1, 10, j, b, HLd(VKd(BD(a.Cb, 26)), a), false); + !c ? c = i : c.Ei(i); + } + } + } else if (JD(a.Cb, 444)) { + h = BD(a.Cb, 836); + g = (!h.b && (h.b = new RYd(new NYd())), h.b); + for (f = (d = new nib(new eib(g.a).a), new ZYd(d)); f.a.b; ) { + e = BD(lib(f.a).cd(), 87); + c = QQd(e, MQd(e, h), c); + } + } + } + return c; + } + function O1b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + g = Ccb(DD(hkd(a, (Nyc(), fxc)))); + m = BD(hkd(a, Yxc), 21); + i = false; + j = false; + l = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); + while (l.e != l.i.gc() && (!i || !j)) { + f = BD(Dyd(l), 118); + h = 0; + for (e = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!f.d && (f.d = new y5d(B2, f, 8, 5)), f.d), (!f.e && (f.e = new y5d(B2, f, 7, 4)), f.e)]))); Qr(e); ) { + d = BD(Rr(e), 79); + k = g && Qld(d) && Ccb(DD(hkd(d, gxc))); + c = ELd((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b), f) ? a == Xod(atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))) : a == Xod(atd(BD(qud((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b), 0), 82))); + if (k || c) { + ++h; + if (h > 1) { + break; + } + } + } + h > 0 ? i = true : m.Hc((rcd(), ncd)) && (!f.n && (f.n = new cUd(D2, f, 1, 7)), f.n).i > 0 && (i = true); + h > 1 && (j = true); + } + i && b.Fc((Orc(), Hrc)); + j && b.Fc((Orc(), Irc)); + } + function zfd(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + m = BD(hkd(a, (Y9c(), Y8c)), 21); + if (m.dc()) { + return null; + } + h = 0; + g = 0; + if (m.Hc((tdd(), rdd))) { + k = BD(hkd(a, t9c), 98); + d = 2; + c = 2; + e = 2; + f = 2; + b = !Xod(a) ? BD(hkd(a, z8c), 103) : BD(hkd(Xod(a), z8c), 103); + for (j = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); j.e != j.i.gc(); ) { + i = BD(Dyd(j), 118); + l = BD(hkd(i, A9c), 61); + if (l == (Ucd(), Scd)) { + l = lfd(i, b); + jkd(i, A9c, l); + } + if (k == (dcd(), $bd)) { + switch (l.g) { + case 1: + d = $wnd.Math.max(d, i.i + i.g); + break; + case 2: + c = $wnd.Math.max(c, i.j + i.f); + break; + case 3: + e = $wnd.Math.max(e, i.i + i.g); + break; + case 4: + f = $wnd.Math.max(f, i.j + i.f); + } + } else { + switch (l.g) { + case 1: + d += i.g + 2; + break; + case 2: + c += i.f + 2; + break; + case 3: + e += i.g + 2; + break; + case 4: + f += i.f + 2; + } + } + } + h = $wnd.Math.max(d, e); + g = $wnd.Math.max(c, f); + } + return Afd(a, h, g, true, true); + } + function lnc(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + s = BD(GAb(VAb(JAb(new YAb(null, new Kub(b.d, 16)), new pnc(c)), new rnc(c)), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + l = Ohe; + k = Rie; + for (i = new olb(b.b.j); i.a < i.c.c.length; ) { + h = BD(mlb(i), 11); + if (h.j == c) { + l = $wnd.Math.min(l, h.p); + k = $wnd.Math.max(k, h.p); + } + } + if (l == Ohe) { + for (g = 0; g < s.gc(); g++) { + ojc(BD(s.Xb(g), 101), c, g); + } + } else { + t = KC(WD, oje, 25, e.length, 15, 1); + Elb(t, t.length); + for (r = s.Kc(); r.Ob(); ) { + q = BD(r.Pb(), 101); + f = BD(Ohb(a.b, q), 177); + j = 0; + for (p = l; p <= k; p++) { + f[p] && (j = $wnd.Math.max(j, d[p])); + } + if (q.i) { + n = q.i.c; + u = new Tqb(); + for (m = 0; m < e.length; m++) { + e[n][m] && Qqb(u, meb(t[m])); + } + while (Rqb(u, meb(j))) { + ++j; + } + } + ojc(q, c, j); + for (o2 = l; o2 <= k; o2++) { + f[o2] && (d[o2] = j + 1); + } + !!q.i && (t[q.i.c] = j); + } + } + } + function YJc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + e = null; + for (d = new olb(b.a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + bKc(c) ? f = (h = nGb(oGb(new pGb(), c), a.f), i = nGb(oGb(new pGb(), c), a.f), j = new rKc(c, true, h, i), k = c.o.b, l = (Izc(), (!c.q ? (mmb(), mmb(), kmb) : c.q)._b((Nyc(), Cxc)) ? m = BD(vNb(c, Cxc), 197) : m = BD(vNb(Q_b(c), Dxc), 197), m), n = 1e4, l == Ezc && (n = 1), o2 = AFb(DFb(CFb(BFb(EFb(new FFb(), n), QD($wnd.Math.ceil(k))), h), i)), l == Fzc && Qqb(a.d, o2), ZJc(a, Su(V_b(c, (Ucd(), Tcd))), j), ZJc(a, V_b(c, zcd), j), j) : f = (p = nGb(oGb(new pGb(), c), a.f), MAb(JAb(new YAb(null, new Kub(c.j, 16)), new EKc()), new GKc(a, p)), new rKc(c, false, p, p)); + a.i[c.p] = f; + if (e) { + g = e.c.d.a + jBc(a.n, e.c, c) + c.d.d; + e.b || (g += e.c.o.b); + AFb(DFb(CFb(EFb(BFb(new FFb(), QD($wnd.Math.ceil(g))), 0), e.d), f.a)); + } + e = f; + } + } + function s9b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + Odd(b, "Label dummy insertions", 1); + l = new Rkb(); + g = Edb(ED(vNb(a, (Nyc(), nyc)))); + j = Edb(ED(vNb(a, ryc))); + k = BD(vNb(a, Lwc), 103); + for (n = new olb(a.a); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + for (f = new Sr(ur(U_b(m).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + if (e.c.i != e.d.i && Lq(e.b, p9b)) { + p = t9b(e); + o2 = Pu(e.b.c.length); + c = r9b(a, e, p, o2); + l.c[l.c.length] = c; + d = c.o; + h = new Bib(e.b, 0); + while (h.b < h.d.gc()) { + i = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 70)); + if (PD(vNb(i, Qwc)) === PD((qad(), nad))) { + if (k == (ead(), dad) || k == _9c) { + d.a += i.o.a + j; + d.b = $wnd.Math.max(d.b, i.o.b); + } else { + d.a = $wnd.Math.max(d.a, i.o.a); + d.b += i.o.b + j; + } + o2.c[o2.c.length] = i; + uib(h); + } + } + if (k == (ead(), dad) || k == _9c) { + d.a -= j; + d.b += g + p; + } else { + d.b += g - j + p; + } + } + } + } + Gkb(a.a, l); + Qdd(b); + } + function eYb(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n; + f = new qYb(b); + l = _Xb(a, b, f); + n = $wnd.Math.max(Edb(ED(vNb(b, (Nyc(), Zwc)))), 1); + for (k = new olb(l.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 46); + i = dYb(BD(j.a, 8), BD(j.b, 8), n); + o = true; + o = o & iYb(c, new f7c(i.c, i.d)); + o = o & iYb(c, O6c(new f7c(i.c, i.d), i.b, 0)); + o = o & iYb(c, O6c(new f7c(i.c, i.d), 0, i.a)); + o & iYb(c, O6c(new f7c(i.c, i.d), i.b, i.a)); + } + m = f.d; + h = dYb(BD(l.b.a, 8), BD(l.b.b, 8), n); + if (m == (Ucd(), Tcd) || m == zcd) { + d.c[m.g] = $wnd.Math.min(d.c[m.g], h.d); + d.b[m.g] = $wnd.Math.max(d.b[m.g], h.d + h.a); + } else { + d.c[m.g] = $wnd.Math.min(d.c[m.g], h.c); + d.b[m.g] = $wnd.Math.max(d.b[m.g], h.c + h.b); + } + e = Qje; + g = f.c.i.d; + switch (m.g) { + case 4: + e = g.c; + break; + case 2: + e = g.b; + break; + case 1: + e = g.a; + break; + case 3: + e = g.d; + } + d.a[m.g] = $wnd.Math.max(d.a[m.g], e); + return f; + } + function eKd(b) { + var c, d, e, f; + d = b.D != null ? b.D : b.B; + c = hfb(d, wfb(91)); + if (c != -1) { + e = d.substr(0, c); + f = new Hfb(); + do + f.a += "["; + while ((c = gfb(d, 91, ++c)) != -1); + if (dfb(e, Khe)) + f.a += "Z"; + else if (dfb(e, Eve)) + f.a += "B"; + else if (dfb(e, Fve)) + f.a += "C"; + else if (dfb(e, Gve)) + f.a += "D"; + else if (dfb(e, Hve)) + f.a += "F"; + else if (dfb(e, Ive)) + f.a += "I"; + else if (dfb(e, Jve)) + f.a += "J"; + else if (dfb(e, Kve)) + f.a += "S"; + else { + f.a += "L"; + f.a += "" + e; + f.a += ";"; + } + try { + return null; + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } else if (hfb(d, wfb(46)) == -1) { + if (dfb(d, Khe)) + return sbb; + else if (dfb(d, Eve)) + return SD; + else if (dfb(d, Fve)) + return TD; + else if (dfb(d, Gve)) + return UD; + else if (dfb(d, Hve)) + return VD; + else if (dfb(d, Ive)) + return WD; + else if (dfb(d, Jve)) + return XD; + else if (dfb(d, Kve)) + return rbb; + } + return null; + } + function $1b(a, b, c) { + var d, e, f, g, h, i, j, k; + j = new b0b(c); + tNb(j, b); + yNb(j, (wtc(), $sc), b); + j.o.a = b.g; + j.o.b = b.f; + j.n.a = b.i; + j.n.b = b.j; + Ekb(c.a, j); + Rhb(a.a, b, j); + ((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i != 0 || Ccb(DD(hkd(b, (Nyc(), fxc))))) && yNb(j, wsc, (Bcb(), true)); + i = BD(vNb(c, Ksc), 21); + k = BD(vNb(j, (Nyc(), Vxc)), 98); + k == (dcd(), ccd) ? yNb(j, Vxc, bcd) : k != bcd && i.Fc((Orc(), Krc)); + d = BD(vNb(c, Lwc), 103); + for (h = new Fyd((!b.c && (b.c = new cUd(F2, b, 9, 9)), b.c)); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 118); + Ccb(DD(hkd(g, Jxc))) || _1b(a, g, j, i, d, k); + } + for (f = new Fyd((!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n)); f.e != f.i.gc(); ) { + e = BD(Dyd(f), 137); + !Ccb(DD(hkd(e, Jxc))) && !!e.a && Ekb(j.b, Z1b(e)); + } + Ccb(DD(vNb(j, pwc))) && i.Fc((Orc(), Frc)); + if (Ccb(DD(vNb(j, exc)))) { + i.Fc((Orc(), Jrc)); + i.Fc(Irc); + yNb(j, Vxc, bcd); + } + return j; + } + function F4b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D; + h = BD(Ohb(b.c, a), 459); + s = b.a.c; + i = b.a.c + b.a.b; + C = h.f; + D = h.a; + g = C < D; + p = new f7c(s, C); + t = new f7c(i, D); + e = (s + i) / 2; + q = new f7c(e, C); + u = new f7c(e, D); + f = G4b(a, C, D); + w = A0b(b.B); + A = new f7c(e, f); + B = A0b(b.D); + c = j6c(OC(GC(m1, 1), nie, 8, 0, [w, A, B])); + n = false; + r = b.B.i; + if (!!r && !!r.c && h.d) { + j = g && r.p < r.c.a.c.length - 1 || !g && r.p > 0; + if (j) { + if (j) { + m = r.p; + g ? ++m : --m; + l = BD(Ikb(r.c.a, m), 10); + d = I4b(l); + n = !(s6c(d, w, c[0]) || n6c(d, w, c[0])); + } + } else { + n = true; + } + } + o2 = false; + v = b.D.i; + if (!!v && !!v.c && h.e) { + k = g && v.p > 0 || !g && v.p < v.c.a.c.length - 1; + if (k) { + m = v.p; + g ? --m : ++m; + l = BD(Ikb(v.c.a, m), 10); + d = I4b(l); + o2 = !(s6c(d, c[0], B) || n6c(d, c[0], B)); + } else { + o2 = true; + } + } + n && o2 && Dsb(a.a, A); + n || n7c(a.a, OC(GC(m1, 1), nie, 8, 0, [p, q])); + o2 || n7c(a.a, OC(GC(m1, 1), nie, 8, 0, [u, t])); + } + function yfd(a, b) { + var c, d, e, f, g, h, i, j; + if (JD(a.Ug(), 160)) { + yfd(BD(a.Ug(), 160), b); + b.a += " > "; + } else { + b.a += "Root "; + } + c = a.Tg().zb; + dfb(c.substr(0, 3), "Elk") ? Qfb(b, c.substr(3)) : (b.a += "" + c, b); + e = a.zg(); + if (e) { + Qfb((b.a += " ", b), e); + return; + } + if (JD(a, 354)) { + j = BD(a, 137).a; + if (j) { + Qfb((b.a += " ", b), j); + return; + } + } + for (g = new Fyd(a.Ag()); g.e != g.i.gc(); ) { + f = BD(Dyd(g), 137); + j = f.a; + if (j) { + Qfb((b.a += " ", b), j); + return; + } + } + if (JD(a, 352)) { + d = BD(a, 79); + !d.b && (d.b = new y5d(z2, d, 4, 7)); + if (d.b.i != 0 && (!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c.i != 0)) { + b.a += " ("; + h = new Oyd((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b)); + while (h.e != h.i.gc()) { + h.e > 0 && (b.a += She, b); + yfd(BD(Dyd(h), 160), b); + } + b.a += gne; + i = new Oyd((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c)); + while (i.e != i.i.gc()) { + i.e > 0 && (b.a += She, b); + yfd(BD(Dyd(i), 160), b); + } + b.a += ")"; + } + } + } + function y2b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + f = BD(vNb(a, (wtc(), $sc)), 79); + if (!f) { + return; + } + d = a.a; + e = new g7c(c); + P6c(e, C2b(a)); + if (f_b(a.d.i, a.c.i)) { + m = a.c; + l = l7c(OC(GC(m1, 1), nie, 8, 0, [m.n, m.a])); + c7c(l, c); + } else { + l = A0b(a.c); + } + Gsb(d, l, d.a, d.a.a); + n = A0b(a.d); + vNb(a, utc) != null && P6c(n, BD(vNb(a, utc), 8)); + Gsb(d, n, d.c.b, d.c); + q7c(d, e); + g = itd(f, true, true); + kmd(g, BD(qud((!f.b && (f.b = new y5d(z2, f, 4, 7)), f.b), 0), 82)); + lmd(g, BD(qud((!f.c && (f.c = new y5d(z2, f, 5, 8)), f.c), 0), 82)); + ifd(d, g); + for (k = new olb(a.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 70); + h = BD(vNb(j, $sc), 137); + cld(h, j.o.a); + ald(h, j.o.b); + bld(h, j.n.a + e.a, j.n.b + e.b); + jkd(h, (I9b(), H9b), DD(vNb(j, H9b))); + } + i = BD(vNb(a, (Nyc(), jxc)), 74); + if (i) { + q7c(i, e); + jkd(f, jxc, i); + } else { + jkd(f, jxc, null); + } + b == (Aad(), yad) ? jkd(f, Swc, yad) : jkd(f, Swc, null); + } + function mJc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s; + n = b.c.length; + m = 0; + for (l = new olb(a.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 29); + r = k.a; + if (r.c.length == 0) { + continue; + } + q = new olb(r); + j = 0; + s = null; + e = BD(mlb(q), 10); + f = null; + while (e) { + f = BD(Ikb(b, e.p), 257); + if (f.c >= 0) { + i = null; + h = new Bib(k.a, j + 1); + while (h.b < h.d.gc()) { + g = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 10)); + i = BD(Ikb(b, g.p), 257); + if (i.d == f.d && i.c < f.c) { + break; + } else { + i = null; + } + } + if (i) { + if (s) { + Nkb(d, e.p, meb(BD(Ikb(d, e.p), 19).a - 1)); + BD(Ikb(c, s.p), 15).Mc(f); + } + f = yJc(f, e, n++); + b.c[b.c.length] = f; + Ekb(c, new Rkb()); + if (s) { + BD(Ikb(c, s.p), 15).Fc(f); + Ekb(d, meb(1)); + } else { + Ekb(d, meb(0)); + } + } + } + o2 = null; + if (q.a < q.c.c.length) { + o2 = BD(mlb(q), 10); + p = BD(Ikb(b, o2.p), 257); + BD(Ikb(c, e.p), 15).Fc(p); + Nkb(d, o2.p, meb(BD(Ikb(d, o2.p), 19).a + 1)); + } + f.d = m; + f.c = j++; + s = e; + e = o2; + } + ++m; + } + } + function u6c(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + i = a; + k = c7c(new f7c(b.a, b.b), a); + j = c; + l = c7c(new f7c(d.a, d.b), c); + m = i.a; + q = i.b; + o2 = j.a; + s = j.b; + n = k.a; + r = k.b; + p = l.a; + t = l.b; + e = p * r - n * t; + Iy(); + My(Jqe); + if ($wnd.Math.abs(0 - e) <= Jqe || 0 == e || isNaN(0) && isNaN(e)) { + return false; + } + g = 1 / e * ((m - o2) * r - (q - s) * n); + h = 1 / e * -(-(m - o2) * t + (q - s) * p); + f = (My(Jqe), ($wnd.Math.abs(0 - g) <= Jqe || 0 == g || isNaN(0) && isNaN(g) ? 0 : 0 < g ? -1 : 0 > g ? 1 : Ny(isNaN(0), isNaN(g))) < 0 && (My(Jqe), ($wnd.Math.abs(g - 1) <= Jqe || g == 1 || isNaN(g) && isNaN(1) ? 0 : g < 1 ? -1 : g > 1 ? 1 : Ny(isNaN(g), isNaN(1))) < 0) && (My(Jqe), ($wnd.Math.abs(0 - h) <= Jqe || 0 == h || isNaN(0) && isNaN(h) ? 0 : 0 < h ? -1 : 0 > h ? 1 : Ny(isNaN(0), isNaN(h))) < 0) && (My(Jqe), ($wnd.Math.abs(h - 1) <= Jqe || h == 1 || isNaN(h) && isNaN(1) ? 0 : h < 1 ? -1 : h > 1 ? 1 : Ny(isNaN(h), isNaN(1))) < 0)); + return f; + } + function z6d(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + for (l = new usb(new nsb(a)); l.b != l.c.a.d; ) { + k = tsb(l); + h = BD(k.d, 56); + b = BD(k.e, 56); + g = h.Tg(); + for (p = 0, u = (g.i == null && TKd(g), g.i).length; p < u; ++p) { + j = (f = (g.i == null && TKd(g), g.i), p >= 0 && p < f.length ? f[p] : null); + if (j.Ij() && !j.Jj()) { + if (JD(j, 99)) { + i = BD(j, 18); + (i.Bb & ote) == 0 && (w = zUd(i), !(!!w && (w.Bb & ote) != 0)) && y6d(a, i, h, b); + } else { + Q6d(); + if (BD(j, 66).Oj()) { + c = (v = j, BD(!v ? null : BD(b, 49).xh(v), 153)); + if (c) { + n = BD(h.ah(j), 153); + d = c.gc(); + for (q = 0, o2 = n.gc(); q < o2; ++q) { + m = n.il(q); + if (JD(m, 99)) { + t = n.jl(q); + e = Wrb(a, t); + if (e == null && t != null) { + s = BD(m, 18); + if (!a.b || (s.Bb & ote) != 0 || !!zUd(s)) { + continue; + } + e = t; + } + if (!c.dl(m, e)) { + for (r = 0; r < d; ++r) { + if (c.il(r) == m && PD(c.jl(r)) === PD(e)) { + c.ii(c.gc() - 1, r); + --d; + break; + } + } + } + } else { + c.dl(n.il(q), n.jl(q)); + } + } + } + } + } + } + } + } + } + function CZc(a, b, c, d, e, f, g) { + var h, i, j, k, l, m, n, o2, p, q, r, s, t; + r = xZc(b, c, a.g); + e.n && e.n && !!f && Tdd(e, i6d(f), (pgd(), mgd)); + if (a.b) { + for (q = 0; q < r.c.length; q++) { + l = (tCb(q, r.c.length), BD(r.c[q], 200)); + if (q != 0) { + n = (tCb(q - 1, r.c.length), BD(r.c[q - 1], 200)); + w$c(l, n.f + n.b + a.g); + } + tZc(q, r, c, a.g); + AZc(a, l); + e.n && !!f && Tdd(e, i6d(f), (pgd(), mgd)); + } + } else { + for (p = new olb(r); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 200); + for (k = new olb(o2.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 187); + s = new b$c(j.s, j.t, a.g); + WZc(s, j); + Ekb(o2.d, s); + } + } + } + BZc(a, r); + e.n && e.n && !!f && Tdd(e, i6d(f), (pgd(), mgd)); + t = $wnd.Math.max(a.d, d.a - (g.b + g.c)); + m = $wnd.Math.max(a.c, d.b - (g.d + g.a)); + h = m - a.c; + if (a.e && a.f) { + i = t / m; + i < a.a ? t = m * a.a : h += t / a.a - m; + } + a.e && zZc(r, t, h); + e.n && e.n && !!f && Tdd(e, i6d(f), (pgd(), mgd)); + return new d$c(a.a, t, a.c + h, (k$c(), j$c)); + } + function UJc(a) { + var b, c, d, e, f, g, h, i, j, k, l; + a.j = KC(WD, oje, 25, a.g, 15, 1); + a.o = new Rkb(); + MAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new aLc()), new cLc(a)); + a.a = KC(sbb, dle, 25, a.b, 16, 1); + TAb(new YAb(null, new Kub(a.e.b, 16)), new rLc(a)); + d = (l = new Rkb(), MAb(JAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new hLc()), new jLc(a)), new lLc(a, l)), l); + for (i = new olb(d); i.a < i.c.c.length; ) { + h = BD(mlb(i), 508); + if (h.c.length <= 1) { + continue; + } + if (h.c.length == 2) { + uKc(h); + bKc((tCb(0, h.c.length), BD(h.c[0], 17)).d.i) || Ekb(a.o, h); + continue; + } + if (tKc(h) || sKc(h, new fLc())) { + continue; + } + j = new olb(h); + e = null; + while (j.a < j.c.c.length) { + b = BD(mlb(j), 17); + c = a.c[b.p]; + !e || j.a >= j.c.c.length ? k = JJc((j0b(), h0b), g0b) : k = JJc((j0b(), g0b), g0b); + k *= 2; + f = c.a.g; + c.a.g = $wnd.Math.max(f, f + (k - f)); + g = c.b.g; + c.b.g = $wnd.Math.max(g, g + (k - g)); + e = b; + } + } + } + function VNc(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v; + v = Hx(a); + k = new Rkb(); + h = a.c.length; + l = h - 1; + m = h + 1; + while (v.a.c != 0) { + while (c.b != 0) { + t = (sCb(c.b != 0), BD(Nsb(c, c.a.a), 112)); + Jwb(v.a, t) != null; + t.g = l--; + YNc(t, b, c, d); + } + while (b.b != 0) { + u = (sCb(b.b != 0), BD(Nsb(b, b.a.a), 112)); + Jwb(v.a, u) != null; + u.g = m++; + YNc(u, b, c, d); + } + j = Rie; + for (r = (g = new Ywb(new cxb(new Gjb(v.a).a).b), new Njb(g)); sib(r.a.a); ) { + q = (f = Wwb(r.a), BD(f.cd(), 112)); + if (!d && q.b > 0 && q.a <= 0) { + k.c = KC(SI, Uhe, 1, 0, 5, 1); + k.c[k.c.length] = q; + break; + } + p = q.i - q.d; + if (p >= j) { + if (p > j) { + k.c = KC(SI, Uhe, 1, 0, 5, 1); + j = p; + } + k.c[k.c.length] = q; + } + } + if (k.c.length != 0) { + i = BD(Ikb(k, Bub(e, k.c.length)), 112); + Jwb(v.a, i) != null; + i.g = m++; + YNc(i, b, c, d); + k.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + s = a.c.length + 1; + for (o2 = new olb(a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 112); + n.g < h && (n.g = n.g + s); + } + } + function SDb(a, b) { + var c; + if (a.e) { + throw vbb(new Zdb((fdb(TM), Jke + TM.k + Kke))); + } + if (!lDb(a.a, b)) { + throw vbb(new hz(Lke + b + Mke)); + } + if (b == a.d) { + return a; + } + c = a.d; + a.d = b; + switch (c.g) { + case 0: + switch (b.g) { + case 2: + PDb(a); + break; + case 1: + XDb(a); + PDb(a); + break; + case 4: + bEb(a); + PDb(a); + break; + case 3: + bEb(a); + XDb(a); + PDb(a); + } + break; + case 2: + switch (b.g) { + case 1: + XDb(a); + YDb(a); + break; + case 4: + bEb(a); + PDb(a); + break; + case 3: + bEb(a); + XDb(a); + PDb(a); + } + break; + case 1: + switch (b.g) { + case 2: + XDb(a); + YDb(a); + break; + case 4: + XDb(a); + bEb(a); + PDb(a); + break; + case 3: + XDb(a); + bEb(a); + XDb(a); + PDb(a); + } + break; + case 4: + switch (b.g) { + case 2: + bEb(a); + PDb(a); + break; + case 1: + bEb(a); + XDb(a); + PDb(a); + break; + case 3: + XDb(a); + YDb(a); + } + break; + case 3: + switch (b.g) { + case 2: + XDb(a); + bEb(a); + PDb(a); + break; + case 1: + XDb(a); + bEb(a); + XDb(a); + PDb(a); + break; + case 4: + XDb(a); + YDb(a); + } + } + return a; + } + function tVb(a, b) { + var c; + if (a.d) { + throw vbb(new Zdb((fdb(LP), Jke + LP.k + Kke))); + } + if (!cVb(a.a, b)) { + throw vbb(new hz(Lke + b + Mke)); + } + if (b == a.c) { + return a; + } + c = a.c; + a.c = b; + switch (c.g) { + case 0: + switch (b.g) { + case 2: + qVb(a); + break; + case 1: + xVb(a); + qVb(a); + break; + case 4: + BVb(a); + qVb(a); + break; + case 3: + BVb(a); + xVb(a); + qVb(a); + } + break; + case 2: + switch (b.g) { + case 1: + xVb(a); + yVb(a); + break; + case 4: + BVb(a); + qVb(a); + break; + case 3: + BVb(a); + xVb(a); + qVb(a); + } + break; + case 1: + switch (b.g) { + case 2: + xVb(a); + yVb(a); + break; + case 4: + xVb(a); + BVb(a); + qVb(a); + break; + case 3: + xVb(a); + BVb(a); + xVb(a); + qVb(a); + } + break; + case 4: + switch (b.g) { + case 2: + BVb(a); + qVb(a); + break; + case 1: + BVb(a); + xVb(a); + qVb(a); + break; + case 3: + xVb(a); + yVb(a); + } + break; + case 3: + switch (b.g) { + case 2: + xVb(a); + BVb(a); + qVb(a); + break; + case 1: + xVb(a); + BVb(a); + xVb(a); + qVb(a); + break; + case 4: + xVb(a); + yVb(a); + } + } + return a; + } + function UQb(a, b, c) { + var d, e, f, g, h, i, j, k; + for (i = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); i.e != i.i.gc(); ) { + h = BD(Dyd(i), 33); + for (e = new Sr(ur(_sd(h).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 79); + !d.b && (d.b = new y5d(z2, d, 4, 7)); + if (!(d.b.i <= 1 && (!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c.i <= 1))) { + throw vbb(new z2c("Graph must not contain hyperedges.")); + } + if (!Pld(d) && h != atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))) { + j = new gRb(); + tNb(j, d); + yNb(j, (HSb(), FSb), d); + dRb(j, BD(Wd(irb(c.f, h)), 144)); + eRb(j, BD(Ohb(c, atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))), 144)); + Ekb(b.c, j); + for (g = new Fyd((!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n)); g.e != g.i.gc(); ) { + f = BD(Dyd(g), 137); + k = new mRb(j, f.a); + tNb(k, f); + yNb(k, FSb, f); + k.e.a = $wnd.Math.max(f.g, 1); + k.e.b = $wnd.Math.max(f.f, 1); + lRb(k); + Ekb(b.d, k); + } + } + } + } + } + function OGb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + l = new LIb(a); + iKb(l, !(b == (ead(), dad) || b == _9c)); + k = l.a; + m = new p0b(); + for (e = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), g = 0, i = e.length; g < i; ++g) { + c = e[g]; + j = xHb(k, dHb, c); + !!j && (m.d = $wnd.Math.max(m.d, j.Re())); + } + for (d = OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]), f = 0, h = d.length; f < h; ++f) { + c = d[f]; + j = xHb(k, fHb, c); + !!j && (m.a = $wnd.Math.max(m.a, j.Re())); + } + for (p = OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]), r = 0, t = p.length; r < t; ++r) { + n = p[r]; + j = xHb(k, n, dHb); + !!j && (m.b = $wnd.Math.max(m.b, j.Se())); + } + for (o2 = OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]), q = 0, s = o2.length; q < s; ++q) { + n = o2[q]; + j = xHb(k, n, fHb); + !!j && (m.c = $wnd.Math.max(m.c, j.Se())); + } + if (m.d > 0) { + m.d += k.n.d; + m.d += k.d; + } + if (m.a > 0) { + m.a += k.n.a; + m.a += k.d; + } + if (m.b > 0) { + m.b += k.n.b; + m.b += k.d; + } + if (m.c > 0) { + m.c += k.n.c; + m.c += k.d; + } + return m; + } + function d6b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2; + m = c.d; + l = c.c; + f = new f7c(c.f.a + c.d.b + c.d.c, c.f.b + c.d.d + c.d.a); + g = f.b; + for (j = new olb(a.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 10); + if (h.k != (j0b(), e0b)) { + continue; + } + d = BD(vNb(h, (wtc(), Hsc)), 61); + e = BD(vNb(h, Isc), 8); + k = h.n; + switch (d.g) { + case 2: + k.a = c.f.a + m.c - l.a; + break; + case 4: + k.a = -l.a - m.b; + } + o2 = 0; + switch (d.g) { + case 2: + case 4: + if (b == (dcd(), _bd)) { + n = Edb(ED(vNb(h, htc))); + k.b = f.b * n - BD(vNb(h, (Nyc(), Txc)), 8).b; + o2 = k.b + e.b; + M_b(h, false, true); + } else if (b == $bd) { + k.b = Edb(ED(vNb(h, htc))) - BD(vNb(h, (Nyc(), Txc)), 8).b; + o2 = k.b + e.b; + M_b(h, false, true); + } + } + g = $wnd.Math.max(g, o2); + } + c.f.b += g - f.b; + for (i = new olb(a.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + if (h.k != (j0b(), e0b)) { + continue; + } + d = BD(vNb(h, (wtc(), Hsc)), 61); + k = h.n; + switch (d.g) { + case 1: + k.b = -l.b - m.d; + break; + case 3: + k.b = c.f.b + m.a - l.b; + } + } + } + function nRc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B; + e = BD(vNb(a, (mTc(), dTc)), 33); + j = Ohe; + k = Ohe; + h = Rie; + i = Rie; + for (w = Jsb(a.b, 0); w.b != w.d.c; ) { + u = BD(Xsb(w), 86); + p = u.e; + q = u.f; + j = $wnd.Math.min(j, p.a - q.a / 2); + k = $wnd.Math.min(k, p.b - q.b / 2); + h = $wnd.Math.max(h, p.a + q.a / 2); + i = $wnd.Math.max(i, p.b + q.b / 2); + } + o2 = BD(hkd(e, (JTc(), BTc)), 116); + n = new f7c(o2.b - j, o2.d - k); + for (v = Jsb(a.b, 0); v.b != v.d.c; ) { + u = BD(Xsb(v), 86); + m = vNb(u, dTc); + if (JD(m, 239)) { + f = BD(m, 33); + l = P6c(u.e, n); + bld(f, l.a - f.g / 2, l.b - f.f / 2); + } + } + for (t = Jsb(a.a, 0); t.b != t.d.c; ) { + s = BD(Xsb(t), 188); + d = BD(vNb(s, dTc), 79); + if (d) { + b = s.a; + r = new g7c(s.b.e); + Gsb(b, r, b.a, b.a.a); + A = new g7c(s.c.e); + Gsb(b, A, b.c.b, b.c); + qRc(r, BD(Ut(b, 1), 8), s.b.f); + qRc(A, BD(Ut(b, b.b - 2), 8), s.c.f); + c = itd(d, true, true); + ifd(b, c); + } + } + B = h - j + (o2.b + o2.c); + g = i - k + (o2.d + o2.a); + Afd(e, B, g, false, false); + } + function xoc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + l = a.b; + k = new Bib(l, 0); + Aib(k, new H1b(a)); + s = false; + g = 1; + while (k.b < k.d.gc()) { + j = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 29)); + p = (tCb(g, l.c.length), BD(l.c[g], 29)); + q = Mu(j.a); + r = q.c.length; + for (o2 = new olb(q); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 10); + $_b(m, p); + } + if (s) { + for (n = av(new ov(q), 0); n.c.Sb(); ) { + m = BD(pv(n), 10); + for (f = new olb(Mu(R_b(m))); f.a < f.c.c.length; ) { + e = BD(mlb(f), 17); + PZb(e, true); + yNb(a, (wtc(), Asc), (Bcb(), true)); + d = Noc(a, e, r); + c = BD(vNb(m, usc), 305); + t = BD(Ikb(d, d.c.length - 1), 17); + c.k = t.c.i; + c.n = t; + c.b = e.d.i; + c.c = e; + } + } + s = false; + } else { + if (q.c.length != 0) { + b = (tCb(0, q.c.length), BD(q.c[0], 10)); + if (b.k == (j0b(), d0b)) { + s = true; + g = -1; + } + } + } + ++g; + } + h = new Bib(a.b, 0); + while (h.b < h.d.gc()) { + i = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29)); + i.a.c.length == 0 && uib(h); + } + } + function wKb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + k = BD(BD(Qc(a.r, b), 21), 84); + if (k.gc() <= 2 || b == (Ucd(), zcd) || b == (Ucd(), Tcd)) { + AKb(a, b); + return; + } + p = a.u.Hc((rcd(), qcd)); + c = b == (Ucd(), Acd) ? (vLb(), uLb) : (vLb(), rLb); + r = b == Acd ? (EIb(), BIb) : (EIb(), DIb); + d = dLb(iLb(c), a.s); + q = b == Acd ? Pje : Qje; + for (j = k.Kc(); j.Ob(); ) { + h = BD(j.Pb(), 111); + if (!h.c || h.c.d.c.length <= 0) { + continue; + } + o2 = h.b.rf(); + n = h.e; + l = h.c; + m = l.i; + m.b = (f = l.n, l.e.a + f.b + f.c); + m.a = (g = l.n, l.e.b + g.d + g.a); + if (p) { + m.c = n.a - (e = l.n, l.e.a + e.b + e.c) - a.s; + p = false; + } else { + m.c = n.a + o2.a + a.s; + } + ytb(r, lle); + l.f = r; + $Hb(l, (NHb(), MHb)); + Ekb(d.d, new BLb(m, bLb(d, m))); + q = b == Acd ? $wnd.Math.min(q, n.b) : $wnd.Math.max(q, n.b + h.b.rf().b); + } + q += b == Acd ? -a.t : a.t; + cLb((d.e = q, d)); + for (i = k.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 111); + if (!h.c || h.c.d.c.length <= 0) { + continue; + } + m = h.c.i; + m.c -= h.e.a; + m.d -= h.e.b; + } + } + function IDc(a, b, c) { + var d; + Odd(c, "StretchWidth layering", 1); + if (b.a.c.length == 0) { + Qdd(c); + return; + } + a.c = b; + a.t = 0; + a.u = 0; + a.i = Pje; + a.g = Qje; + a.d = Edb(ED(vNb(b, (Nyc(), lyc)))); + CDc(a); + DDc(a); + ADc(a); + HDc(a); + BDc(a); + a.i = $wnd.Math.max(1, a.i); + a.g = $wnd.Math.max(1, a.g); + a.d = a.d / a.i; + a.f = a.g / a.i; + a.s = FDc(a); + d = new H1b(a.c); + Ekb(a.c.b, d); + a.r = Mu(a.p); + a.n = tlb(a.k, a.k.length); + while (a.r.c.length != 0) { + a.o = JDc(a); + if (!a.o || EDc(a) && a.b.a.gc() != 0) { + KDc(a, d); + d = new H1b(a.c); + Ekb(a.c.b, d); + ye(a.a, a.b); + a.b.a.$b(); + a.t = a.u; + a.u = 0; + } else { + if (EDc(a)) { + a.c.b.c = KC(SI, Uhe, 1, 0, 5, 1); + d = new H1b(a.c); + Ekb(a.c.b, d); + a.t = 0; + a.u = 0; + a.b.a.$b(); + a.a.a.$b(); + ++a.f; + a.r = Mu(a.p); + a.n = tlb(a.k, a.k.length); + } else { + $_b(a.o, d); + Lkb(a.r, a.o); + Qqb(a.b, a.o); + a.t = a.t - a.k[a.o.p] * a.d + a.j[a.o.p]; + a.u += a.e[a.o.p] * a.d; + } + } + } + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + smb(b.b); + Qdd(c); + } + function Mgc(a) { + var b, c, d, e; + MAb(JAb(new YAb(null, new Kub(a.a.b, 16)), new khc()), new mhc()); + Kgc(a); + MAb(JAb(new YAb(null, new Kub(a.a.b, 16)), new ohc()), new qhc()); + if (a.c == (Aad(), yad)) { + MAb(JAb(LAb(new YAb(null, new Kub(new Pib(a.f), 1)), new yhc()), new Ahc()), new Chc(a)); + MAb(JAb(NAb(LAb(LAb(new YAb(null, new Kub(a.d.b, 16)), new Ghc()), new Ihc()), new Khc()), new Mhc()), new Ohc(a)); + } + e = new f7c(Pje, Pje); + b = new f7c(Qje, Qje); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 57); + e.a = $wnd.Math.min(e.a, c.d.c); + e.b = $wnd.Math.min(e.b, c.d.d); + b.a = $wnd.Math.max(b.a, c.d.c + c.d.b); + b.b = $wnd.Math.max(b.b, c.d.d + c.d.a); + } + P6c(X6c(a.d.c), V6c(new f7c(e.a, e.b))); + P6c(X6c(a.d.f), c7c(new f7c(b.a, b.b), e)); + Lgc(a, e, b); + Uhb(a.f); + Uhb(a.b); + Uhb(a.g); + Uhb(a.e); + a.a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = null; + a.d = null; + } + function vZb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + e = new Rkb(); + for (p = new olb(b.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + n = o2.e; + if (n) { + d = vZb(a, n, o2); + Gkb(e, d); + sZb(a, n, o2); + if (BD(vNb(n, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + s = BD(vNb(o2, (Nyc(), Vxc)), 98); + m = BD(vNb(o2, Yxc), 174).Hc((rcd(), ncd)); + for (r = new olb(o2.j); r.a < r.c.c.length; ) { + q = BD(mlb(r), 11); + f = BD(Ohb(a.b, q), 10); + if (!f) { + f = Z$b(q, s, q.j, -(q.e.c.length - q.g.c.length), null, new d7c(), q.o, BD(vNb(n, Lwc), 103), n); + yNb(f, $sc, q); + Rhb(a.b, q, f); + Ekb(n.a, f); + } + g = BD(Ikb(f.j, 0), 11); + for (k = new olb(q.f); k.a < k.c.c.length; ) { + j = BD(mlb(k), 70); + h = new p_b(); + h.o.a = j.o.a; + h.o.b = j.o.b; + Ekb(g.f, h); + if (!m) { + t = q.j; + l = 0; + tcd(BD(vNb(o2, Yxc), 21)) && (l = mfd(j.n, j.o, q.o, 0, t)); + s == (dcd(), bcd) || (Ucd(), Ecd).Hc(t) ? h.o.a = l : h.o.b = l; + } + } + } + } + } + } + i = new Rkb(); + rZb(a, b, c, e, i); + !!c && tZb(a, b, c, i); + return i; + } + function nEc(a, b, c) { + var d, e, f, g, h, i, j, k, l; + if (a.c[b.c.p][b.p].e) { + return; + } else { + a.c[b.c.p][b.p].e = true; + } + a.c[b.c.p][b.p].b = 0; + a.c[b.c.p][b.p].d = 0; + a.c[b.c.p][b.p].a = null; + for (k = new olb(b.j); k.a < k.c.c.length; ) { + j = BD(mlb(k), 11); + l = c ? new J0b(j) : new R0b(j); + for (i = l.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 11); + g = h.i; + if (g.c == b.c) { + if (g != b) { + nEc(a, g, c); + a.c[b.c.p][b.p].b += a.c[g.c.p][g.p].b; + a.c[b.c.p][b.p].d += a.c[g.c.p][g.p].d; + } + } else { + a.c[b.c.p][b.p].d += a.g[h.p]; + ++a.c[b.c.p][b.p].b; + } + } + } + f = BD(vNb(b, (wtc(), ssc)), 15); + if (f) { + for (e = f.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + if (b.c == d.c) { + nEc(a, d, c); + a.c[b.c.p][b.p].b += a.c[d.c.p][d.p].b; + a.c[b.c.p][b.p].d += a.c[d.c.p][d.p].d; + } + } + } + if (a.c[b.c.p][b.p].b > 0) { + a.c[b.c.p][b.p].d += Cub(a.i, 24) * lke * 0.07000000029802322 - 0.03500000014901161; + a.c[b.c.p][b.p].a = a.c[b.c.p][b.p].d / a.c[b.c.p][b.p].b; + } + } + function m5b(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + for (o2 = new olb(a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 10); + n5b(n.n); + n5b(n.o); + o5b(n.f); + r5b(n); + t5b(n); + for (q = new olb(n.j); q.a < q.c.c.length; ) { + p = BD(mlb(q), 11); + n5b(p.n); + n5b(p.a); + n5b(p.o); + G0b(p, s5b(p.j)); + f = BD(vNb(p, (Nyc(), Wxc)), 19); + !!f && yNb(p, Wxc, meb(-f.a)); + for (e = new olb(p.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + for (c = Jsb(d.a, 0); c.b != c.d.c; ) { + b = BD(Xsb(c), 8); + n5b(b); + } + i = BD(vNb(d, jxc), 74); + if (i) { + for (h = Jsb(i, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 8); + n5b(g); + } + } + for (l = new olb(d.b); l.a < l.c.c.length; ) { + j = BD(mlb(l), 70); + n5b(j.n); + n5b(j.o); + } + } + for (m = new olb(p.f); m.a < m.c.c.length; ) { + j = BD(mlb(m), 70); + n5b(j.n); + n5b(j.o); + } + } + if (n.k == (j0b(), e0b)) { + yNb(n, (wtc(), Hsc), s5b(BD(vNb(n, Hsc), 61))); + q5b(n); + } + for (k = new olb(n.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 70); + r5b(j); + n5b(j.o); + n5b(j.n); + } + } + } + function yQb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A; + a.e = b; + h = $Pb(b); + w = new Rkb(); + for (d = new olb(h); d.a < d.c.c.length; ) { + c = BD(mlb(d), 15); + A = new Rkb(); + w.c[w.c.length] = A; + i = new Tqb(); + for (o2 = c.Kc(); o2.Ob(); ) { + n = BD(o2.Pb(), 33); + f = wQb(a, n, true, 0, 0); + A.c[A.c.length] = f; + p = n.i; + q = n.j; + m = (!n.n && (n.n = new cUd(D2, n, 1, 7)), n.n); + for (l = new Fyd(m); l.e != l.i.gc(); ) { + j = BD(Dyd(l), 137); + e = wQb(a, j, false, p, q); + A.c[A.c.length] = e; + } + v = (!n.c && (n.c = new cUd(F2, n, 9, 9)), n.c); + for (s = new Fyd(v); s.e != s.i.gc(); ) { + r = BD(Dyd(s), 118); + g = wQb(a, r, false, p, q); + A.c[A.c.length] = g; + t = r.i + p; + u = r.j + q; + m = (!r.n && (r.n = new cUd(D2, r, 1, 7)), r.n); + for (k = new Fyd(m); k.e != k.i.gc(); ) { + j = BD(Dyd(k), 137); + e = wQb(a, j, false, t, u); + A.c[A.c.length] = e; + } + } + ye(i, Dx(pl(OC(GC(KI, 1), Uhe, 20, 0, [_sd(n), $sd(n)])))); + } + vQb(a, i, A); + } + a.f = new aPb(w); + tNb(a.f, b); + return a.f; + } + function Kqd(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G; + D = Ohb(a.e, d); + if (D == null) { + D = new eC(); + n = BD(D, 183); + s = b + "_s"; + t = s + e; + m = new yC(t); + cC(n, Vte, m); + } + C = BD(D, 183); + Qpd(c, C); + G = new eC(); + Spd(G, "x", d.j); + Spd(G, "y", d.k); + cC(C, Yte, G); + A = new eC(); + Spd(A, "x", d.b); + Spd(A, "y", d.c); + cC(C, "endPoint", A); + l = Fhe((!d.a && (d.a = new xMd(y2, d, 5)), d.a)); + o2 = !l; + if (o2) { + w = new wB(); + f = new Srd(w); + reb((!d.a && (d.a = new xMd(y2, d, 5)), d.a), f); + cC(C, Ote, w); + } + i = dmd(d); + u = !!i; + u && Tpd(a.a, C, Qte, kqd(a, dmd(d))); + r = emd(d); + v = !!r; + v && Tpd(a.a, C, Pte, kqd(a, emd(d))); + j = (!d.e && (d.e = new y5d(A2, d, 10, 9)), d.e).i == 0; + p = !j; + if (p) { + B = new wB(); + g = new Urd(a, B); + reb((!d.e && (d.e = new y5d(A2, d, 10, 9)), d.e), g); + cC(C, Ste, B); + } + k = (!d.g && (d.g = new y5d(A2, d, 9, 10)), d.g).i == 0; + q = !k; + if (q) { + F = new wB(); + h = new Wrd(a, F); + reb((!d.g && (d.g = new y5d(A2, d, 9, 10)), d.g), h); + cC(C, Rte, F); + } + } + function eKb(a) { + $Jb(); + var b, c, d, e, f, g, h; + d = a.f.n; + for (g = ci(a.r).a.nc(); g.Ob(); ) { + f = BD(g.Pb(), 111); + e = 0; + if (f.b.Xe((Y9c(), s9c))) { + e = Edb(ED(f.b.We(s9c))); + if (e < 0) { + switch (f.b.Hf().g) { + case 1: + d.d = $wnd.Math.max(d.d, -e); + break; + case 3: + d.a = $wnd.Math.max(d.a, -e); + break; + case 2: + d.c = $wnd.Math.max(d.c, -e); + break; + case 4: + d.b = $wnd.Math.max(d.b, -e); + } + } + } + if (tcd(a.u)) { + b = nfd(f.b, e); + h = !BD(a.e.We(b9c), 174).Hc((Idd(), zdd)); + c = false; + switch (f.b.Hf().g) { + case 1: + c = b > d.d; + d.d = $wnd.Math.max(d.d, b); + if (h && c) { + d.d = $wnd.Math.max(d.d, d.a); + d.a = d.d + e; + } + break; + case 3: + c = b > d.a; + d.a = $wnd.Math.max(d.a, b); + if (h && c) { + d.a = $wnd.Math.max(d.a, d.d); + d.d = d.a + e; + } + break; + case 2: + c = b > d.c; + d.c = $wnd.Math.max(d.c, b); + if (h && c) { + d.c = $wnd.Math.max(d.b, d.c); + d.b = d.c + e; + } + break; + case 4: + c = b > d.b; + d.b = $wnd.Math.max(d.b, b); + if (h && c) { + d.b = $wnd.Math.max(d.b, d.c); + d.c = d.b + e; + } + } + } + } + } + function l3b(a) { + var b, c, d, e, f, g, h, i, j, k, l; + for (j = new olb(a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + g = BD(vNb(i, (Nyc(), mxc)), 163); + f = null; + switch (g.g) { + case 1: + case 2: + f = (Gqc(), Fqc); + break; + case 3: + case 4: + f = (Gqc(), Dqc); + } + if (f) { + yNb(i, (wtc(), Bsc), (Gqc(), Fqc)); + f == Dqc ? o3b(i, g, (KAc(), HAc)) : f == Fqc && o3b(i, g, (KAc(), IAc)); + } else { + if (fcd(BD(vNb(i, Vxc), 98)) && i.j.c.length != 0) { + b = true; + for (l = new olb(i.j); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + if (!(k.j == (Ucd(), zcd) && k.e.c.length - k.g.c.length > 0 || k.j == Tcd && k.e.c.length - k.g.c.length < 0)) { + b = false; + break; + } + for (e = new olb(k.g); e.a < e.c.c.length; ) { + c = BD(mlb(e), 17); + h = BD(vNb(c.d.i, mxc), 163); + if (h == (Ctc(), ztc) || h == Atc) { + b = false; + break; + } + } + for (d = new olb(k.e); d.a < d.c.c.length; ) { + c = BD(mlb(d), 17); + h = BD(vNb(c.c.i, mxc), 163); + if (h == (Ctc(), xtc) || h == ytc) { + b = false; + break; + } + } + } + b && o3b(i, g, (KAc(), JAc)); + } + } + } + } + function lJc(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + w = 0; + n = 0; + for (l = new olb(b.e); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + m = 0; + h = 0; + i = c ? BD(vNb(k, hJc), 19).a : Rie; + r = d ? BD(vNb(k, iJc), 19).a : Rie; + j = $wnd.Math.max(i, r); + for (t = new olb(k.j); t.a < t.c.c.length; ) { + s = BD(mlb(t), 11); + u = k.n.b + s.n.b + s.a.b; + if (d) { + for (g = new olb(s.g); g.a < g.c.c.length; ) { + f = BD(mlb(g), 17); + p = f.d; + o2 = p.i; + if (b != a.a[o2.p]) { + q = $wnd.Math.max(BD(vNb(o2, hJc), 19).a, BD(vNb(o2, iJc), 19).a); + v = BD(vNb(f, (Nyc(), eyc)), 19).a; + if (v >= j && v >= q) { + m += o2.n.b + p.n.b + p.a.b - u; + ++h; + } + } + } + } + if (c) { + for (g = new olb(s.e); g.a < g.c.c.length; ) { + f = BD(mlb(g), 17); + p = f.c; + o2 = p.i; + if (b != a.a[o2.p]) { + q = $wnd.Math.max(BD(vNb(o2, hJc), 19).a, BD(vNb(o2, iJc), 19).a); + v = BD(vNb(f, (Nyc(), eyc)), 19).a; + if (v >= j && v >= q) { + m += o2.n.b + p.n.b + p.a.b - u; + ++h; + } + } + } + } + } + if (h > 0) { + w += m / h; + ++n; + } + } + if (n > 0) { + b.a = e * w / n; + b.g = n; + } else { + b.a = 0; + b.g = 0; + } + } + function oMc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + c = BD(mlb(e), 29); + for (i = new olb(c.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + b.j[h.p] = h; + b.i[h.p] = b.o == (eMc(), dMc) ? Qje : Pje; + } + } + Uhb(a.c); + g = a.a.b; + b.c == (YLc(), WLc) && (g = JD(g, 152) ? km(BD(g, 152)) : JD(g, 131) ? BD(g, 131).a : JD(g, 54) ? new ov(g) : new dv(g)); + UMc(a.e, b, a.b); + Alb(b.p, null); + for (f = g.Kc(); f.Ob(); ) { + c = BD(f.Pb(), 29); + j = c.a; + b.o == (eMc(), dMc) && (j = JD(j, 152) ? km(BD(j, 152)) : JD(j, 131) ? BD(j, 131).a : JD(j, 54) ? new ov(j) : new dv(j)); + for (m = j.Kc(); m.Ob(); ) { + l = BD(m.Pb(), 10); + b.g[l.p] == l && pMc(a, l, b); + } + } + qMc(a, b); + for (d = g.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 29); + for (m = new olb(c.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + b.p[l.p] = b.p[b.g[l.p].p]; + if (l == b.g[l.p]) { + k = Edb(b.i[b.j[l.p].p]); + (b.o == (eMc(), dMc) && k > Qje || b.o == cMc && k < Pje) && (b.p[l.p] = Edb(b.p[l.p]) + k); + } + } + } + a.e.cg(); + } + function PGb(a, b, c, d) { + var e, f, g, h, i; + h = new LIb(b); + rKb(h, d); + e = true; + if (!!a && a.Xe((Y9c(), z8c))) { + f = BD(a.We((Y9c(), z8c)), 103); + e = f == (ead(), cad) || f == aad || f == bad; + } + hKb(h, false); + Hkb(h.e.wf(), new mKb(h, false, e)); + NJb(h, h.f, (gHb(), dHb), (Ucd(), Acd)); + NJb(h, h.f, fHb, Rcd); + NJb(h, h.g, dHb, Tcd); + NJb(h, h.g, fHb, zcd); + PJb(h, Acd); + PJb(h, Rcd); + OJb(h, zcd); + OJb(h, Tcd); + $Jb(); + g = h.A.Hc((tdd(), pdd)) && h.B.Hc((Idd(), Ddd)) ? _Jb(h) : null; + !!g && DHb(h.a, g); + eKb(h); + GJb(h); + PKb(h); + BJb(h); + pKb(h); + HKb(h); + xKb(h, Acd); + xKb(h, Rcd); + CJb(h); + oKb(h); + if (!c) { + return h.o; + } + cKb(h); + LKb(h); + xKb(h, zcd); + xKb(h, Tcd); + i = h.B.Hc((Idd(), Edd)); + RJb(h, i, Acd); + RJb(h, i, Rcd); + SJb(h, i, zcd); + SJb(h, i, Tcd); + MAb(new YAb(null, new Kub(new $ib(h.i), 0)), new TJb()); + MAb(JAb(new YAb(null, ci(h.r).a.oc()), new VJb()), new XJb()); + dKb(h); + h.e.uf(h.o); + MAb(new YAb(null, ci(h.r).a.oc()), new fKb()); + return h.o; + } + function JVb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + j = Pje; + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 81); + j = $wnd.Math.min(j, b.d.f.g.c + b.e.a); + } + n = new Psb(); + for (g = new olb(a.a.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 189); + f.i = j; + f.e == 0 && (Gsb(n, f, n.c.b, n.c), true); + } + while (n.b != 0) { + f = BD(n.b == 0 ? null : (sCb(n.b != 0), Nsb(n, n.a.a)), 189); + e = f.f.g.c; + for (m = f.a.a.ec().Kc(); m.Ob(); ) { + k = BD(m.Pb(), 81); + p = f.i + k.e.a; + k.d.g || k.g.c < p ? k.o = p : k.o = k.g.c; + } + e -= f.f.o; + f.b += e; + a.c == (ead(), bad) || a.c == _9c ? f.c += e : f.c -= e; + for (l = f.a.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 81); + for (i = k.f.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 81); + fad(a.c) ? o2 = a.f.ef(k, h) : o2 = a.f.ff(k, h); + h.d.i = $wnd.Math.max(h.d.i, k.o + k.g.b + o2 - h.e.a); + h.k || (h.d.i = $wnd.Math.max(h.d.i, h.g.c - h.e.a)); + --h.d.e; + h.d.e == 0 && Dsb(n, h.d); + } + } + } + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 81); + b.g.c = b.o; + } + } + function ELb(a) { + var b, c, d, e, f, g, h, i; + h = a.b; + b = a.a; + switch (BD(vNb(a, (fFb(), bFb)), 427).g) { + case 0: + Okb(h, new tpb(new bMb())); + break; + case 1: + default: + Okb(h, new tpb(new gMb())); + } + switch (BD(vNb(a, _Eb), 428).g) { + case 1: + Okb(h, new YLb()); + Okb(h, new lMb()); + Okb(h, new GLb()); + break; + case 0: + default: + Okb(h, new YLb()); + Okb(h, new RLb()); + } + switch (BD(vNb(a, dFb), 250).g) { + case 0: + i = new FMb(); + break; + case 1: + i = new zMb(); + break; + case 2: + i = new CMb(); + break; + case 3: + i = new wMb(); + break; + case 5: + i = new JMb(new CMb()); + break; + case 4: + i = new JMb(new zMb()); + break; + case 7: + i = new tMb(new JMb(new zMb()), new JMb(new CMb())); + break; + case 8: + i = new tMb(new JMb(new wMb()), new JMb(new CMb())); + break; + case 6: + default: + i = new JMb(new wMb()); + } + for (g = new olb(h); g.a < g.c.c.length; ) { + f = BD(mlb(g), 167); + d = 0; + e = 0; + c = new vgd(meb(d), meb(e)); + while (gNb(b, f, d, e)) { + c = BD(i.Ce(c, f), 46); + d = BD(c.a, 19).a; + e = BD(c.b, 19).a; + } + dNb(b, f, d, e); + } + } + function qQb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A; + f = a.f.b; + m = f.a; + k = f.b; + o2 = a.e.g; + n = a.e.f; + _kd(a.e, f.a, f.b); + w = m / o2; + A = k / n; + for (j = new Fyd(Kkd(a.e)); j.e != j.i.gc(); ) { + i = BD(Dyd(j), 137); + dld(i, i.i * w); + eld(i, i.j * A); + } + for (s = new Fyd(Yod(a.e)); s.e != s.i.gc(); ) { + r = BD(Dyd(s), 118); + u = r.i; + v = r.j; + u > 0 && dld(r, u * w); + v > 0 && eld(r, v * A); + } + stb(a.b, new CQb()); + b = new Rkb(); + for (h = new nib(new eib(a.c).a); h.b; ) { + g = lib(h); + d = BD(g.cd(), 79); + c = BD(g.dd(), 395).a; + e = itd(d, false, false); + l = oQb(jtd(d), ofd(e), c); + ifd(l, e); + t = ktd(d); + if (!!t && Jkb(b, t, 0) == -1) { + b.c[b.c.length] = t; + pQb(t, (sCb(l.b != 0), BD(l.a.a.c, 8)), c); + } + } + for (q = new nib(new eib(a.d).a); q.b; ) { + p = lib(q); + d = BD(p.cd(), 79); + c = BD(p.dd(), 395).a; + e = itd(d, false, false); + l = oQb(ltd(d), w7c(ofd(e)), c); + l = w7c(l); + ifd(l, e); + t = mtd(d); + if (!!t && Jkb(b, t, 0) == -1) { + b.c[b.c.length] = t; + pQb(t, (sCb(l.b != 0), BD(l.c.b.c, 8)), c); + } + } + } + function _Vc(a, b, c, d) { + var e, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B; + if (c.c.length != 0) { + o2 = new Rkb(); + for (n = new olb(c); n.a < n.c.c.length; ) { + m = BD(mlb(n), 33); + Ekb(o2, new f7c(m.i, m.j)); + } + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + while (CVc(a, c)) { + AVc(a, c, false); + } + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + h = 0; + i = 0; + e = null; + if (c.c.length != 0) { + e = (tCb(0, c.c.length), BD(c.c[0], 33)); + h = e.i - (tCb(0, o2.c.length), BD(o2.c[0], 8)).a; + i = e.j - (tCb(0, o2.c.length), BD(o2.c[0], 8)).b; + } + g = $wnd.Math.sqrt(h * h + i * i); + l = cVc(c); + while (l.a.gc() != 0) { + for (k = l.a.ec().Kc(); k.Ob(); ) { + j = BD(k.Pb(), 33); + p = a.f; + q = p.i + p.g / 2; + r = p.j + p.f / 2; + s = j.i + j.g / 2; + t = j.j + j.f / 2; + u = s - q; + v = t - r; + w = $wnd.Math.sqrt(u * u + v * v); + A = u / w; + B = v / w; + dld(j, j.i + A * g); + eld(j, j.j + B * g); + } + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + l = cVc(new Tkb(l)); + } + !!a.a && a.a.lg(new Tkb(l)); + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + _Vc(a, b, new Tkb(l), d); + } + } + function $2b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + p = a.n; + q = a.o; + m = a.d; + l = Edb(ED(pBc(a, (Nyc(), iyc)))); + if (b) { + k = l * (b.gc() - 1); + n = 0; + for (i = b.Kc(); i.Ob(); ) { + g = BD(i.Pb(), 10); + k += g.o.a; + n = $wnd.Math.max(n, g.o.b); + } + r = p.a - (k - q.a) / 2; + f = p.b - m.d + n; + d = q.a / (b.gc() + 1); + e = d; + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + g.n.a = r; + g.n.b = f - g.o.b; + r += g.o.a + l; + j = Y2b(g); + j.n.a = g.o.a / 2 - j.a.a; + j.n.b = g.o.b; + o2 = BD(vNb(g, (wtc(), vsc)), 11); + if (o2.e.c.length + o2.g.c.length == 1) { + o2.n.a = e - o2.a.a; + o2.n.b = 0; + F0b(o2, a); + } + e += d; + } + } + if (c) { + k = l * (c.gc() - 1); + n = 0; + for (i = c.Kc(); i.Ob(); ) { + g = BD(i.Pb(), 10); + k += g.o.a; + n = $wnd.Math.max(n, g.o.b); + } + r = p.a - (k - q.a) / 2; + f = p.b + q.b + m.a - n; + d = q.a / (c.gc() + 1); + e = d; + for (h = c.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + g.n.a = r; + g.n.b = f; + r += g.o.a + l; + j = Y2b(g); + j.n.a = g.o.a / 2 - j.a.a; + j.n.b = 0; + o2 = BD(vNb(g, (wtc(), vsc)), 11); + if (o2.e.c.length + o2.g.c.length == 1) { + o2.n.a = e - o2.a.a; + o2.n.b = q.b; + F0b(o2, a); + } + e += d; + } + } + } + function q7b(a, b) { + var c, d, e, f, g, h; + if (!BD(vNb(b, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + return; + } + for (h = new olb(b.a); h.a < h.c.c.length; ) { + f = BD(mlb(h), 10); + if (f.k == (j0b(), h0b)) { + e = BD(vNb(f, (Nyc(), txc)), 142); + a.c = $wnd.Math.min(a.c, f.n.a - e.b); + a.a = $wnd.Math.max(a.a, f.n.a + f.o.a + e.c); + a.d = $wnd.Math.min(a.d, f.n.b - e.d); + a.b = $wnd.Math.max(a.b, f.n.b + f.o.b + e.a); + } + } + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + if (f.k != (j0b(), h0b)) { + switch (f.k.g) { + case 2: + d = BD(vNb(f, (Nyc(), mxc)), 163); + if (d == (Ctc(), ytc)) { + f.n.a = a.c - 10; + p7b(f, new x7b()).Jb(new A7b(f)); + break; + } + if (d == Atc) { + f.n.a = a.a + 10; + p7b(f, new D7b()).Jb(new G7b(f)); + break; + } + c = BD(vNb(f, Osc), 303); + if (c == (esc(), dsc)) { + o7b(f).Jb(new J7b(f)); + f.n.b = a.d - 10; + break; + } + if (c == bsc) { + o7b(f).Jb(new M7b(f)); + f.n.b = a.b + 10; + break; + } + break; + default: + throw vbb(new Wdb("The node type " + f.k + " is not supported by the " + zS)); + } + } + } + } + function Y1b(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q; + i = new f7c(d.i + d.g / 2, d.j + d.f / 2); + n = M1b(d); + o2 = BD(hkd(b, (Nyc(), Vxc)), 98); + q = BD(hkd(d, $xc), 61); + if (!hCd(gkd(d), Uxc)) { + d.i == 0 && d.j == 0 ? p = 0 : p = kfd(d, q); + jkd(d, Uxc, p); + } + j = new f7c(b.g, b.f); + e = Z$b(d, o2, q, n, j, i, new f7c(d.g, d.f), BD(vNb(c, Lwc), 103), c); + yNb(e, (wtc(), $sc), d); + f = BD(Ikb(e.j, 0), 11); + E0b(f, W1b(d)); + yNb(e, Yxc, (rcd(), pqb(pcd))); + l = BD(hkd(b, Yxc), 174).Hc(ncd); + for (h = new Fyd((!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n)); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 137); + if (!Ccb(DD(hkd(g, Jxc))) && !!g.a) { + m = Z1b(g); + Ekb(f.f, m); + if (!l) { + k = 0; + tcd(BD(hkd(b, Yxc), 21)) && (k = mfd(new f7c(g.i, g.j), new f7c(g.g, g.f), new f7c(d.g, d.f), 0, q)); + switch (q.g) { + case 2: + case 4: + m.o.a = k; + break; + case 1: + case 3: + m.o.b = k; + } + } + } + } + yNb(e, tyc, ED(hkd(Xod(b), tyc))); + yNb(e, uyc, ED(hkd(Xod(b), uyc))); + yNb(e, ryc, ED(hkd(Xod(b), ryc))); + Ekb(c.a, e); + Rhb(a.a, d, e); + } + function qUc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v; + Odd(c, "Processor arrange level", 1); + k = 0; + mmb(); + ktb(b, new Wsd((mTc(), ZSc))); + f = b.b; + h = Jsb(b, b.b); + j = true; + while (j && h.b.b != h.d.a) { + r = BD(Ysb(h), 86); + BD(vNb(r, ZSc), 19).a == 0 ? --f : j = false; + } + v = new Jib(b, 0, f); + g = new Qsb(v); + v = new Jib(b, f, b.b); + i = new Qsb(v); + if (g.b == 0) { + for (o2 = Jsb(i, 0); o2.b != o2.d.c; ) { + n = BD(Xsb(o2), 86); + yNb(n, eTc, meb(k++)); + } + } else { + l = g.b; + for (u = Jsb(g, 0); u.b != u.d.c; ) { + t = BD(Xsb(u), 86); + yNb(t, eTc, meb(k++)); + d = URc(t); + qUc(a, d, Udd(c, 1 / l | 0)); + ktb(d, tmb(new Wsd(eTc))); + m = new Psb(); + for (s = Jsb(d, 0); s.b != s.d.c; ) { + r = BD(Xsb(s), 86); + for (q = Jsb(t.d, 0); q.b != q.d.c; ) { + p = BD(Xsb(q), 188); + p.c == r && (Gsb(m, p, m.c.b, m.c), true); + } + } + Osb(t.d); + ye(t.d, m); + h = Jsb(i, i.b); + e = t.d.b; + j = true; + while (0 < e && j && h.b.b != h.d.a) { + r = BD(Ysb(h), 86); + if (BD(vNb(r, ZSc), 19).a == 0) { + yNb(r, eTc, meb(k++)); + --e; + Zsb(h); + } else { + j = false; + } + } + } + } + Qdd(c); + } + function _8b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + Odd(b, "Inverted port preprocessing", 1); + k = a.b; + j = new Bib(k, 0); + c = null; + t = new Rkb(); + while (j.b < j.d.gc()) { + s = c; + c = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 29)); + for (n = new olb(t); n.a < n.c.c.length; ) { + l = BD(mlb(n), 10); + $_b(l, s); + } + t.c = KC(SI, Uhe, 1, 0, 5, 1); + for (o2 = new olb(c.a); o2.a < o2.c.c.length; ) { + l = BD(mlb(o2), 10); + if (l.k != (j0b(), h0b)) { + continue; + } + if (!fcd(BD(vNb(l, (Nyc(), Vxc)), 98))) { + continue; + } + for (r = X_b(l, (KAc(), HAc), (Ucd(), zcd)).Kc(); r.Ob(); ) { + p = BD(r.Pb(), 11); + i = p.e; + h = BD(Qkb(i, KC(AQ, jne, 17, i.c.length, 0, 1)), 474); + for (e = h, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + Z8b(a, p, d, t); + } + } + for (q = X_b(l, IAc, Tcd).Kc(); q.Ob(); ) { + p = BD(q.Pb(), 11); + i = p.g; + h = BD(Qkb(i, KC(AQ, jne, 17, i.c.length, 0, 1)), 474); + for (e = h, f = 0, g = e.length; f < g; ++f) { + d = e[f]; + $8b(a, p, d, t); + } + } + } + } + for (m = new olb(t); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + $_b(l, c); + } + Qdd(b); + } + function _1b(a, b, c, d, e, f) { + var g, h, i, j, k, l; + j = new H0b(); + tNb(j, b); + G0b(j, BD(hkd(b, (Nyc(), $xc)), 61)); + yNb(j, (wtc(), $sc), b); + F0b(j, c); + l = j.o; + l.a = b.g; + l.b = b.f; + k = j.n; + k.a = b.i; + k.b = b.j; + Rhb(a.a, b, j); + g = FAb(NAb(LAb(new YAb(null, (!b.e && (b.e = new y5d(B2, b, 7, 4)), new Kub(b.e, 16))), new m2b()), new e2b()), new o2b(b)); + g || (g = FAb(NAb(LAb(new YAb(null, (!b.d && (b.d = new y5d(B2, b, 8, 5)), new Kub(b.d, 16))), new q2b()), new g2b()), new s2b(b))); + g || (g = FAb(new YAb(null, (!b.e && (b.e = new y5d(B2, b, 7, 4)), new Kub(b.e, 16))), new u2b())); + yNb(j, Nsc, (Bcb(), g ? true : false)); + e_b(j, f, e, BD(hkd(b, Txc), 8)); + for (i = new Fyd((!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n)); i.e != i.i.gc(); ) { + h = BD(Dyd(i), 137); + !Ccb(DD(hkd(h, Jxc))) && !!h.a && Ekb(j.f, Z1b(h)); + } + switch (e.g) { + case 2: + case 1: + (j.j == (Ucd(), Acd) || j.j == Rcd) && d.Fc((Orc(), Lrc)); + break; + case 4: + case 3: + (j.j == (Ucd(), zcd) || j.j == Tcd) && d.Fc((Orc(), Lrc)); + } + return j; + } + function nQc(a, b, c, d, e, f, g) { + var h, i, j, k, l, m, n, o2, p, q, r, s, t; + m = null; + d == (FQc(), DQc) ? m = b : d == EQc && (m = c); + for (p = m.a.ec().Kc(); p.Ob(); ) { + o2 = BD(p.Pb(), 11); + q = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).b; + t = new Tqb(); + h = new Tqb(); + for (j = new b1b(o2.b); llb(j.a) || llb(j.b); ) { + i = BD(llb(j.a) ? mlb(j.a) : mlb(j.b), 17); + if (Ccb(DD(vNb(i, (wtc(), ltc)))) != e) { + continue; + } + if (Jkb(f, i, 0) != -1) { + i.d == o2 ? r = i.c : r = i.d; + s = l7c(OC(GC(m1, 1), nie, 8, 0, [r.i.n, r.n, r.a])).b; + if ($wnd.Math.abs(s - q) < 0.2) { + continue; + } + s < q ? b.a._b(r) ? Qqb(t, new vgd(DQc, i)) : Qqb(t, new vgd(EQc, i)) : b.a._b(r) ? Qqb(h, new vgd(DQc, i)) : Qqb(h, new vgd(EQc, i)); + } + } + if (t.a.gc() > 1) { + n = new ZQc(o2, t, d); + reb(t, new PQc(a, n)); + g.c[g.c.length] = n; + for (l = t.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 46); + Lkb(f, k.b); + } + } + if (h.a.gc() > 1) { + n = new ZQc(o2, h, d); + reb(h, new RQc(a, n)); + g.c[g.c.length] = n; + for (l = h.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 46); + Lkb(f, k.b); + } + } + } + } + function $Wc(a) { + r4c(a, new E3c(L3c(P3c(M3c(O3c(N3c(new R3c(), sre), "ELK Radial"), 'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'), new bXc()), sre))); + p4c(a, sre, uqe, Ksd(UWc)); + p4c(a, sre, wme, Ksd(XWc)); + p4c(a, sre, Fme, Ksd(NWc)); + p4c(a, sre, Tme, Ksd(OWc)); + p4c(a, sre, Eme, Ksd(PWc)); + p4c(a, sre, Gme, Ksd(MWc)); + p4c(a, sre, Dme, Ksd(QWc)); + p4c(a, sre, Hme, Ksd(TWc)); + p4c(a, sre, ore, Ksd(KWc)); + p4c(a, sre, nre, Ksd(LWc)); + p4c(a, sre, rre, Ksd(RWc)); + p4c(a, sre, lre, Ksd(SWc)); + p4c(a, sre, mre, Ksd(VWc)); + p4c(a, sre, pre, Ksd(WWc)); + p4c(a, sre, qre, Ksd(YWc)); + } + function LIb(a) { + var b; + this.r = Cy(new OIb(), new SIb()); + this.b = new Rpb(BD(Qb(F1), 290)); + this.p = new Rpb(BD(Qb(F1), 290)); + this.i = new Rpb(BD(Qb(DN), 290)); + this.e = a; + this.o = new g7c(a.rf()); + this.D = a.Df() || Ccb(DD(a.We((Y9c(), M8c)))); + this.A = BD(a.We((Y9c(), Y8c)), 21); + this.B = BD(a.We(b9c), 21); + this.q = BD(a.We(t9c), 98); + this.u = BD(a.We(x9c), 21); + if (!ucd(this.u)) { + throw vbb(new y2c("Invalid port label placement: " + this.u)); + } + this.v = Ccb(DD(a.We(z9c))); + this.j = BD(a.We(W8c), 21); + if (!Jbd(this.j)) { + throw vbb(new y2c("Invalid node label placement: " + this.j)); + } + this.n = BD(bgd(a, U8c), 116); + this.k = Edb(ED(bgd(a, Q9c))); + this.d = Edb(ED(bgd(a, P9c))); + this.w = Edb(ED(bgd(a, X9c))); + this.s = Edb(ED(bgd(a, R9c))); + this.t = Edb(ED(bgd(a, S9c))); + this.C = BD(bgd(a, V9c), 142); + this.c = 2 * this.d; + b = !this.B.Hc((Idd(), zdd)); + this.f = new mIb(0, b, 0); + this.g = new mIb(1, b, 0); + lIb(this.f, (gHb(), eHb), this.g); + } + function Lgd(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D; + t = 0; + o2 = 0; + n = 0; + m = 1; + for (s = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); s.e != s.i.gc(); ) { + q = BD(Dyd(s), 33); + m += sr(new Sr(ur(_sd(q).a.Kc(), new Sq()))); + B = q.g; + o2 = $wnd.Math.max(o2, B); + l = q.f; + n = $wnd.Math.max(n, l); + t += B * l; + } + p = (!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a).i; + g = t + 2 * d * d * m * p; + f = $wnd.Math.sqrt(g); + i = $wnd.Math.max(f * c, o2); + h = $wnd.Math.max(f / c, n); + for (r = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); r.e != r.i.gc(); ) { + q = BD(Dyd(r), 33); + C = e.b + (Cub(b, 26) * ike + Cub(b, 27) * jke) * (i - q.g); + D = e.b + (Cub(b, 26) * ike + Cub(b, 27) * jke) * (h - q.f); + dld(q, C); + eld(q, D); + } + A = i + (e.b + e.c); + w = h + (e.d + e.a); + for (v = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); v.e != v.i.gc(); ) { + u = BD(Dyd(v), 33); + for (k = new Sr(ur(_sd(u).a.Kc(), new Sq())); Qr(k); ) { + j = BD(Rr(k), 79); + Pld(j) || Kgd(j, b, A, w); + } + } + A += e.b + e.c; + w += e.d + e.a; + Afd(a, A, w, false, true); + } + function Jcb(a) { + var b, c, d, e, f, g, h, i, j, k, l; + if (a == null) { + throw vbb(new Oeb(Xhe)); + } + j = a; + f = a.length; + i = false; + if (f > 0) { + b = (BCb(0, a.length), a.charCodeAt(0)); + if (b == 45 || b == 43) { + a = a.substr(1); + --f; + i = b == 45; + } + } + if (f == 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + while (a.length > 0 && (BCb(0, a.length), a.charCodeAt(0) == 48)) { + a = a.substr(1); + --f; + } + if (f > (Neb(), Leb)[10]) { + throw vbb(new Oeb(Oje + j + '"')); + } + for (e = 0; e < f; e++) { + if (Zcb((BCb(e, a.length), a.charCodeAt(e))) == -1) { + throw vbb(new Oeb(Oje + j + '"')); + } + } + l = 0; + g = Jeb[10]; + k = Keb[10]; + h = Jbb(Meb[10]); + c = true; + d = f % g; + if (d > 0) { + l = -parseInt(a.substr(0, d), 10); + a = a.substr(d); + f -= d; + c = false; + } + while (f >= g) { + d = parseInt(a.substr(0, g), 10); + a = a.substr(g); + f -= g; + if (c) { + c = false; + } else { + if (ybb(l, h) < 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + l = Ibb(l, k); + } + l = Qbb(l, d); + } + if (ybb(l, 0) > 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + if (!i) { + l = Jbb(l); + if (ybb(l, 0) < 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + } + return l; + } + function Z6d(a, b) { + X6d(); + var c, d, e, f, g, h, i; + this.a = new a7d(this); + this.b = a; + this.c = b; + this.f = c2d(q1d((O6d(), M6d), b)); + if (this.f.dc()) { + if ((h = t1d(M6d, a)) == b) { + this.e = true; + this.d = new Rkb(); + this.f = new oFd(); + this.f.Fc(Ewe); + BD(V1d(p1d(M6d, bKd(a)), ""), 26) == a && this.f.Fc(u1d(M6d, bKd(a))); + for (e = g1d(M6d, a).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 170); + switch ($1d(q1d(M6d, d))) { + case 4: { + this.d.Fc(d); + break; + } + case 5: { + this.f.Gc(c2d(q1d(M6d, d))); + break; + } + } + } + } else { + Q6d(); + if (BD(b, 66).Oj()) { + this.e = true; + this.f = null; + this.d = new Rkb(); + for (g = 0, i = (a.i == null && TKd(a), a.i).length; g < i; ++g) { + d = (c = (a.i == null && TKd(a), a.i), g >= 0 && g < c.length ? c[g] : null); + for (f = _1d(q1d(M6d, d)); f; f = _1d(q1d(M6d, f))) { + f == b && this.d.Fc(d); + } + } + } else if ($1d(q1d(M6d, b)) == 1 && !!h) { + this.f = null; + this.d = (m8d(), l8d); + } else { + this.f = null; + this.e = true; + this.d = (mmb(), new anb(b)); + } + } + } else { + this.e = $1d(q1d(M6d, b)) == 5; + this.f.Fb(W6d) && (this.f = W6d); + } + } + function zKb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + c = 0; + d = yKb(a, b); + m = a.s; + n = a.t; + for (j = BD(BD(Qc(a.r, b), 21), 84).Kc(); j.Ob(); ) { + i = BD(j.Pb(), 111); + if (!i.c || i.c.d.c.length <= 0) { + continue; + } + o2 = i.b.rf(); + h = i.b.Xe((Y9c(), s9c)) ? Edb(ED(i.b.We(s9c))) : 0; + k = i.c; + l = k.i; + l.b = (g = k.n, k.e.a + g.b + g.c); + l.a = (f = k.n, k.e.b + f.d + f.a); + switch (b.g) { + case 1: + l.c = i.a ? (o2.a - l.b) / 2 : o2.a + m; + l.d = o2.b + h + d; + $Hb(k, (NHb(), KHb)); + _Hb(k, (EIb(), DIb)); + break; + case 3: + l.c = i.a ? (o2.a - l.b) / 2 : o2.a + m; + l.d = -h - d - l.a; + $Hb(k, (NHb(), KHb)); + _Hb(k, (EIb(), BIb)); + break; + case 2: + l.c = -h - d - l.b; + if (i.a) { + e = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (o2.b - e) / 2; + } else { + l.d = o2.b + n; + } + $Hb(k, (NHb(), MHb)); + _Hb(k, (EIb(), CIb)); + break; + case 4: + l.c = o2.a + h + d; + if (i.a) { + e = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (o2.b - e) / 2; + } else { + l.d = o2.b + n; + } + $Hb(k, (NHb(), LHb)); + _Hb(k, (EIb(), CIb)); + } + (b == (Ucd(), Acd) || b == Rcd) && (c = $wnd.Math.max(c, l.a)); + } + c > 0 && (BD(Mpb(a.b, b), 124).a.b = c); + } + function b3b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + Odd(b, "Comment pre-processing", 1); + c = 0; + i = new olb(a.a); + while (i.a < i.c.c.length) { + h = BD(mlb(i), 10); + if (Ccb(DD(vNb(h, (Nyc(), pwc))))) { + ++c; + e = 0; + d = null; + j = null; + for (o2 = new olb(h.j); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 11); + e += m.e.c.length + m.g.c.length; + if (m.e.c.length == 1) { + d = BD(Ikb(m.e, 0), 17); + j = d.c; + } + if (m.g.c.length == 1) { + d = BD(Ikb(m.g, 0), 17); + j = d.d; + } + } + if (e == 1 && j.e.c.length + j.g.c.length == 1 && !Ccb(DD(vNb(j.i, pwc)))) { + c3b(h, d, j, j.i); + nlb(i); + } else { + r = new Rkb(); + for (n = new olb(h.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + for (l = new olb(m.g); l.a < l.c.c.length; ) { + k = BD(mlb(l), 17); + k.d.g.c.length == 0 || (r.c[r.c.length] = k, true); + } + for (g = new olb(m.e); g.a < g.c.c.length; ) { + f = BD(mlb(g), 17); + f.c.e.c.length == 0 || (r.c[r.c.length] = f, true); + } + } + for (q = new olb(r); q.a < q.c.c.length; ) { + p = BD(mlb(q), 17); + PZb(p, true); + } + } + } + } + b.n && Sdd(b, "Found " + c + " comment boxes"); + Qdd(b); + } + function f9b(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p; + m = Edb(ED(vNb(a, (Nyc(), tyc)))); + n = Edb(ED(vNb(a, uyc))); + l = Edb(ED(vNb(a, ryc))); + h = a.o; + f = BD(Ikb(a.j, 0), 11); + g = f.n; + p = d9b(f, l); + if (!p) { + return; + } + if (b.Hc((rcd(), ncd))) { + switch (BD(vNb(a, (wtc(), Hsc)), 61).g) { + case 1: + p.c = (h.a - p.b) / 2 - g.a; + p.d = n; + break; + case 3: + p.c = (h.a - p.b) / 2 - g.a; + p.d = -n - p.a; + break; + case 2: + if (c && f.e.c.length == 0 && f.g.c.length == 0) { + k = d ? p.a : BD(Ikb(f.f, 0), 70).o.b; + p.d = (h.b - k) / 2 - g.b; + } else { + p.d = h.b + n - g.b; + } + p.c = -m - p.b; + break; + case 4: + if (c && f.e.c.length == 0 && f.g.c.length == 0) { + k = d ? p.a : BD(Ikb(f.f, 0), 70).o.b; + p.d = (h.b - k) / 2 - g.b; + } else { + p.d = h.b + n - g.b; + } + p.c = m; + } + } else if (b.Hc(pcd)) { + switch (BD(vNb(a, (wtc(), Hsc)), 61).g) { + case 1: + case 3: + p.c = g.a + m; + break; + case 2: + case 4: + if (c && !f.c) { + k = d ? p.a : BD(Ikb(f.f, 0), 70).o.b; + p.d = (h.b - k) / 2 - g.b; + } else { + p.d = g.b + n; + } + } + } + e = p.d; + for (j = new olb(f.f); j.a < j.c.c.length; ) { + i = BD(mlb(j), 70); + o2 = i.n; + o2.a = p.c; + o2.b = e; + e += i.o.b + l; + } + } + function eae() { + rEd(Q9, new Lae()); + rEd(S9, new qbe()); + rEd(T9, new Xbe()); + rEd(U9, new Cce()); + rEd(ZI, new Oce()); + rEd(GC(SD, 1), new Rce()); + rEd(wI, new Uce()); + rEd(xI, new Xce()); + rEd(ZI, new hae()); + rEd(ZI, new kae()); + rEd(ZI, new nae()); + rEd(BI, new qae()); + rEd(ZI, new tae()); + rEd(yK, new wae()); + rEd(yK, new zae()); + rEd(ZI, new Cae()); + rEd(FI, new Fae()); + rEd(ZI, new Iae()); + rEd(ZI, new Oae()); + rEd(ZI, new Rae()); + rEd(ZI, new Uae()); + rEd(ZI, new Xae()); + rEd(GC(SD, 1), new $ae()); + rEd(ZI, new bbe()); + rEd(ZI, new ebe()); + rEd(yK, new hbe()); + rEd(yK, new kbe()); + rEd(ZI, new nbe()); + rEd(JI, new tbe()); + rEd(ZI, new wbe()); + rEd(MI, new zbe()); + rEd(ZI, new Cbe()); + rEd(ZI, new Fbe()); + rEd(ZI, new Ibe()); + rEd(ZI, new Lbe()); + rEd(yK, new Obe()); + rEd(yK, new Rbe()); + rEd(ZI, new Ube()); + rEd(ZI, new $be()); + rEd(ZI, new bce()); + rEd(ZI, new ece()); + rEd(ZI, new hce()); + rEd(ZI, new kce()); + rEd(UI, new nce()); + rEd(ZI, new qce()); + rEd(ZI, new tce()); + rEd(ZI, new wce()); + rEd(UI, new zce()); + rEd(MI, new Fce()); + rEd(ZI, new Ice()); + rEd(JI, new Lce()); + } + function Bmd(b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + n = c.length; + if (n > 0) { + j = (BCb(0, c.length), c.charCodeAt(0)); + if (j != 64) { + if (j == 37) { + m = c.lastIndexOf("%"); + k = false; + if (m != 0 && (m == n - 1 || (k = (BCb(m + 1, c.length), c.charCodeAt(m + 1) == 46)))) { + h = c.substr(1, m - 1); + u = dfb("%", h) ? null : QEd(h); + e = 0; + if (k) { + try { + e = Icb(c.substr(m + 2), Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + i = a; + throw vbb(new rFd(i)); + } else + throw vbb(a); + } + } + for (r = pRd(b.Wg()); r.Ob(); ) { + p = MRd(r); + if (JD(p, 510)) { + f = BD(p, 590); + t = f.d; + if ((u == null ? t == null : dfb(u, t)) && e-- == 0) { + return f; + } + } + } + return null; + } + } + l = c.lastIndexOf("."); + o2 = l == -1 ? c : c.substr(0, l); + d = 0; + if (l != -1) { + try { + d = Icb(c.substr(l + 1), Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + o2 = c; + } else + throw vbb(a); + } + } + o2 = dfb("%", o2) ? null : QEd(o2); + for (q = pRd(b.Wg()); q.Ob(); ) { + p = MRd(q); + if (JD(p, 191)) { + g = BD(p, 191); + s = g.ne(); + if ((o2 == null ? s == null : dfb(o2, s)) && d-- == 0) { + return g; + } + } + } + return null; + } + } + return rid(b, c); + } + function f6b(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F; + w = new Rkb(); + for (o2 = new olb(a.b); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 29); + for (r = new olb(n.a); r.a < r.c.c.length; ) { + p = BD(mlb(r), 10); + if (p.k != (j0b(), e0b)) { + continue; + } + if (!wNb(p, (wtc(), Gsc))) { + continue; + } + s = null; + u = null; + t = null; + for (C = new olb(p.j); C.a < C.c.c.length; ) { + B = BD(mlb(C), 11); + switch (B.j.g) { + case 4: + s = B; + break; + case 2: + u = B; + break; + default: + t = B; + } + } + v = BD(Ikb(t.g, 0), 17); + k = new t7c(v.a); + j = new g7c(t.n); + P6c(j, p.n); + l = Jsb(k, 0); + Vsb(l, j); + A = w7c(v.a); + m = new g7c(t.n); + P6c(m, p.n); + Gsb(A, m, A.c.b, A.c); + D = BD(vNb(p, Gsc), 10); + F = BD(Ikb(D.j, 0), 11); + i = BD(Qkb(s.e, KC(AQ, jne, 17, 0, 0, 1)), 474); + for (d = i, f = 0, h = d.length; f < h; ++f) { + b = d[f]; + RZb(b, F); + o7c(b.a, b.a.b, k); + } + i = k_b(u.g); + for (c = i, e = 0, g = c.length; e < g; ++e) { + b = c[e]; + QZb(b, F); + o7c(b.a, 0, A); + } + QZb(v, null); + RZb(v, null); + w.c[w.c.length] = p; + } + } + for (q = new olb(w); q.a < q.c.c.length; ) { + p = BD(mlb(q), 10); + $_b(p, null); + } + } + function lgb() { + lgb = ccb; + var a, b, c; + new sgb(1, 0); + new sgb(10, 0); + new sgb(0, 0); + dgb = KC(bJ, nie, 240, 11, 0, 1); + egb = KC(TD, $ie, 25, 100, 15, 1); + fgb = OC(GC(UD, 1), Vje, 25, 15, [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 152587890625, 762939453125, 3814697265625, 19073486328125, 95367431640625, 476837158203125, 2384185791015625]); + ggb = KC(WD, oje, 25, fgb.length, 15, 1); + hgb = OC(GC(UD, 1), Vje, 25, 15, [1, 10, 100, _ie, 1e4, Wje, 1e6, 1e7, 1e8, Jje, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16]); + igb = KC(WD, oje, 25, hgb.length, 15, 1); + jgb = KC(bJ, nie, 240, 11, 0, 1); + a = 0; + for (; a < jgb.length; a++) { + dgb[a] = new sgb(a, 0); + jgb[a] = new sgb(0, a); + egb[a] = 48; + } + for (; a < egb.length; a++) { + egb[a] = 48; + } + for (c = 0; c < ggb.length; c++) { + ggb[c] = ugb(fgb[c]); + } + for (b = 0; b < igb.length; b++) { + igb[b] = ugb(hgb[b]); + } + Dhb(); + } + function zrb() { + function e() { + this.obj = this.createObject(); + } + e.prototype.createObject = function(a) { + return /* @__PURE__ */ Object.create(null); + }; + e.prototype.get = function(a) { + return this.obj[a]; + }; + e.prototype.set = function(a, b) { + this.obj[a] = b; + }; + e.prototype[hke] = function(a) { + delete this.obj[a]; + }; + e.prototype.keys = function() { + return Object.getOwnPropertyNames(this.obj); + }; + e.prototype.entries = function() { + var b = this.keys(); + var c = this; + var d = 0; + return { next: function() { + if (d >= b.length) + return { done: true }; + var a = b[d++]; + return { value: [a, c.get(a)], done: false }; + } }; + }; + if (!xrb()) { + e.prototype.createObject = function() { + return {}; + }; + e.prototype.get = function(a) { + return this.obj[":" + a]; + }; + e.prototype.set = function(a, b) { + this.obj[":" + a] = b; + }; + e.prototype[hke] = function(a) { + delete this.obj[":" + a]; + }; + e.prototype.keys = function() { + var a = []; + for (var b in this.obj) { + b.charCodeAt(0) == 58 && a.push(b.substring(1)); + } + return a; + }; + } + return e; + } + function cde(a) { + ade(); + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + if (a == null) + return null; + l = a.length * 8; + if (l == 0) { + return ""; + } + h = l % 24; + n = l / 24 | 0; + m = h != 0 ? n + 1 : n; + f = null; + f = KC(TD, $ie, 25, m * 4, 15, 1); + j = 0; + k = 0; + b = 0; + c = 0; + d = 0; + g = 0; + e = 0; + for (i = 0; i < n; i++) { + b = a[e++]; + c = a[e++]; + d = a[e++]; + k = (c & 15) << 24 >> 24; + j = (b & 3) << 24 >> 24; + o2 = (b & -128) == 0 ? b >> 2 << 24 >> 24 : (b >> 2 ^ 192) << 24 >> 24; + p = (c & -128) == 0 ? c >> 4 << 24 >> 24 : (c >> 4 ^ 240) << 24 >> 24; + q = (d & -128) == 0 ? d >> 6 << 24 >> 24 : (d >> 6 ^ 252) << 24 >> 24; + f[g++] = _ce[o2]; + f[g++] = _ce[p | j << 4]; + f[g++] = _ce[k << 2 | q]; + f[g++] = _ce[d & 63]; + } + if (h == 8) { + b = a[e]; + j = (b & 3) << 24 >> 24; + o2 = (b & -128) == 0 ? b >> 2 << 24 >> 24 : (b >> 2 ^ 192) << 24 >> 24; + f[g++] = _ce[o2]; + f[g++] = _ce[j << 4]; + f[g++] = 61; + f[g++] = 61; + } else if (h == 16) { + b = a[e]; + c = a[e + 1]; + k = (c & 15) << 24 >> 24; + j = (b & 3) << 24 >> 24; + o2 = (b & -128) == 0 ? b >> 2 << 24 >> 24 : (b >> 2 ^ 192) << 24 >> 24; + p = (c & -128) == 0 ? c >> 4 << 24 >> 24 : (c >> 4 ^ 240) << 24 >> 24; + f[g++] = _ce[o2]; + f[g++] = _ce[p | j << 4]; + f[g++] = _ce[k << 2]; + f[g++] = 61; + } + return zfb(f, 0, f.length); + } + function mB(a, b) { + var c, d, e, f, g, h, i; + a.e == 0 && a.p > 0 && (a.p = -(a.p - 1)); + a.p > Rie && dB(b, a.p - nje); + g = b.q.getDate(); + ZA(b, 1); + a.k >= 0 && aB(b, a.k); + if (a.c >= 0) { + ZA(b, a.c); + } else if (a.k >= 0) { + i = new fB(b.q.getFullYear() - nje, b.q.getMonth(), 35); + d = 35 - i.q.getDate(); + ZA(b, $wnd.Math.min(d, g)); + } else { + ZA(b, g); + } + a.f < 0 && (a.f = b.q.getHours()); + a.b > 0 && a.f < 12 && (a.f += 12); + $A(b, a.f == 24 && a.g ? 0 : a.f); + a.j >= 0 && _A(b, a.j); + a.n >= 0 && bB(b, a.n); + a.i >= 0 && cB(b, wbb(Ibb(Abb(Cbb(b.q.getTime()), _ie), _ie), a.i)); + if (a.a) { + e = new eB(); + dB(e, e.q.getFullYear() - nje - 80); + Gbb(Cbb(b.q.getTime()), Cbb(e.q.getTime())) && dB(b, e.q.getFullYear() - nje + 100); + } + if (a.d >= 0) { + if (a.c == -1) { + c = (7 + a.d - b.q.getDay()) % 7; + c > 3 && (c -= 7); + h = b.q.getMonth(); + ZA(b, b.q.getDate() + c); + b.q.getMonth() != h && ZA(b, b.q.getDate() + (c > 0 ? -7 : 7)); + } else { + if (b.q.getDay() != a.d) { + return false; + } + } + } + if (a.o > Rie) { + f = b.q.getTimezoneOffset(); + cB(b, wbb(Cbb(b.q.getTime()), (a.o - f) * 60 * _ie)); + } + return true; + } + function z2b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + e = vNb(b, (wtc(), $sc)); + if (!JD(e, 239)) { + return; + } + o2 = BD(e, 33); + p = b.e; + m = new g7c(b.c); + f = b.d; + m.a += f.b; + m.b += f.d; + u = BD(hkd(o2, (Nyc(), Ixc)), 174); + if (uqb(u, (Idd(), Add))) { + n = BD(hkd(o2, Kxc), 116); + w_b(n, f.a); + z_b(n, f.d); + x_b(n, f.b); + y_b(n, f.c); + } + c = new Rkb(); + for (k = new olb(b.a); k.a < k.c.c.length; ) { + i = BD(mlb(k), 10); + if (JD(vNb(i, $sc), 239)) { + A2b(i, m); + } else if (JD(vNb(i, $sc), 186) && !p) { + d = BD(vNb(i, $sc), 118); + s = b_b(b, i, d.g, d.f); + bld(d, s.a, s.b); + } + for (r = new olb(i.j); r.a < r.c.c.length; ) { + q = BD(mlb(r), 11); + MAb(JAb(new YAb(null, new Kub(q.g, 16)), new G2b(i)), new I2b(c)); + } + } + if (p) { + for (r = new olb(p.j); r.a < r.c.c.length; ) { + q = BD(mlb(r), 11); + MAb(JAb(new YAb(null, new Kub(q.g, 16)), new K2b(p)), new M2b(c)); + } + } + t = BD(hkd(o2, Swc), 218); + for (h = new olb(c); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + y2b(g, t, m); + } + B2b(b); + for (j = new olb(b.a); j.a < j.c.c.length; ) { + i = BD(mlb(j), 10); + l = i.e; + !!l && z2b(a, l); + } + } + function xSb(a) { + r4c(a, new E3c(Q3c(L3c(P3c(M3c(O3c(N3c(new R3c(), ume), "ELK Force"), "Force-based algorithm provided by the Eclipse Layout Kernel. Implements methods that follow physical analogies by simulating forces that move the nodes into a balanced distribution. Currently the original Eades model and the Fruchterman - Reingold model are supported."), new ASb()), ume), qqb((Csd(), zsd), OC(GC(O3, 1), Kie, 237, 0, [xsd]))))); + p4c(a, ume, vme, meb(1)); + p4c(a, ume, wme, 80); + p4c(a, ume, xme, 5); + p4c(a, ume, _le, tme); + p4c(a, ume, yme, meb(1)); + p4c(a, ume, zme, (Bcb(), true)); + p4c(a, ume, ame, lSb); + p4c(a, ume, Ame, Ksd(dSb)); + p4c(a, ume, Bme, Ksd(mSb)); + p4c(a, ume, Cme, false); + p4c(a, ume, Dme, Ksd(jSb)); + p4c(a, ume, Eme, Ksd(iSb)); + p4c(a, ume, Fme, Ksd(hSb)); + p4c(a, ume, Gme, Ksd(gSb)); + p4c(a, ume, Hme, Ksd(nSb)); + p4c(a, ume, mme, Ksd(fSb)); + p4c(a, ume, pme, Ksd(vSb)); + p4c(a, ume, nme, Ksd(eSb)); + p4c(a, ume, rme, Ksd(qSb)); + p4c(a, ume, ome, Ksd(rSb)); + } + function GKb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + return; + } + g = BD(Mpb(a.b, b), 124); + i = g.i; + h = g.n; + k = KIb(a, b); + d = i.b - h.b - h.c; + e = g.a.a; + f = i.c + h.b; + n = a.w; + if ((k == (Tbd(), Qbd) || k == Sbd) && BD(BD(Qc(a.r, b), 21), 84).gc() == 1) { + e = k == Qbd ? e - 2 * a.w : e; + k = Pbd; + } + if (d < e && !a.B.Hc((Idd(), Fdd))) { + if (k == Qbd) { + n += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + f += n; + } else { + n += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + } + } else { + if (d < e) { + e = k == Qbd ? e - 2 * a.w : e; + k = Pbd; + } + switch (k.g) { + case 3: + f += (d - e) / 2; + break; + case 4: + f += d - e; + break; + case 0: + c = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + n += $wnd.Math.max(0, c); + f += n; + break; + case 1: + c = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + n += $wnd.Math.max(0, c); + } + } + for (m = BD(BD(Qc(a.r, b), 21), 84).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 111); + l.e.a = f + l.d.b; + l.e.b = (j = l.b, j.Xe((Y9c(), s9c)) ? j.Hf() == (Ucd(), Acd) ? -j.rf().b - Edb(ED(j.We(s9c))) : Edb(ED(j.We(s9c))) : j.Hf() == (Ucd(), Acd) ? -j.rf().b : 0); + f += l.d.b + l.b.rf().a + l.d.c + n; + } + } + function KKb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + return; + } + g = BD(Mpb(a.b, b), 124); + i = g.i; + h = g.n; + l = KIb(a, b); + d = i.a - h.d - h.a; + e = g.a.b; + f = i.d + h.d; + o2 = a.w; + j = a.o.a; + if ((l == (Tbd(), Qbd) || l == Sbd) && BD(BD(Qc(a.r, b), 21), 84).gc() == 1) { + e = l == Qbd ? e - 2 * a.w : e; + l = Pbd; + } + if (d < e && !a.B.Hc((Idd(), Fdd))) { + if (l == Qbd) { + o2 += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + f += o2; + } else { + o2 += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + } + } else { + if (d < e) { + e = l == Qbd ? e - 2 * a.w : e; + l = Pbd; + } + switch (l.g) { + case 3: + f += (d - e) / 2; + break; + case 4: + f += d - e; + break; + case 0: + c = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + o2 += $wnd.Math.max(0, c); + f += o2; + break; + case 1: + c = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + o2 += $wnd.Math.max(0, c); + } + } + for (n = BD(BD(Qc(a.r, b), 21), 84).Kc(); n.Ob(); ) { + m = BD(n.Pb(), 111); + m.e.a = (k = m.b, k.Xe((Y9c(), s9c)) ? k.Hf() == (Ucd(), Tcd) ? -k.rf().a - Edb(ED(k.We(s9c))) : j + Edb(ED(k.We(s9c))) : k.Hf() == (Ucd(), Tcd) ? -k.rf().a : j); + m.e.b = f + m.d.d; + f += m.d.d + m.b.rf().b + m.d.a + o2; + } + } + function Abc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + a.n = Edb(ED(vNb(a.g, (Nyc(), vyc)))); + a.e = Edb(ED(vNb(a.g, pyc))); + a.i = a.g.b.c.length; + h = a.i - 1; + m = 0; + a.j = 0; + a.k = 0; + a.a = Ou(KC(JI, nie, 19, a.i, 0, 1)); + a.b = Ou(KC(BI, nie, 333, a.i, 7, 1)); + for (g = new olb(a.g.b); g.a < g.c.c.length; ) { + e = BD(mlb(g), 29); + e.p = h; + for (l = new olb(e.a); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + k.p = m; + ++m; + } + --h; + } + a.f = KC(WD, oje, 25, m, 15, 1); + a.c = IC(WD, [nie, oje], [48, 25], 15, [m, 3], 2); + a.o = new Rkb(); + a.p = new Rkb(); + b = 0; + a.d = 0; + for (f = new olb(a.g.b); f.a < f.c.c.length; ) { + e = BD(mlb(f), 29); + h = e.p; + d = 0; + p = 0; + i = e.a.c.length; + j = 0; + for (l = new olb(e.a); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + m = k.p; + a.f[m] = k.c.p; + j += k.o.b + a.n; + c = sr(new Sr(ur(R_b(k).a.Kc(), new Sq()))); + o2 = sr(new Sr(ur(U_b(k).a.Kc(), new Sq()))); + a.c[m][0] = o2 - c; + a.c[m][1] = c; + a.c[m][2] = o2; + d += c; + p += o2; + c > 0 && Ekb(a.p, k); + Ekb(a.o, k); + } + b -= d; + n = i + b; + j += b * a.e; + Nkb(a.a, h, meb(n)); + Nkb(a.b, h, j); + a.j = $wnd.Math.max(a.j, n); + a.k = $wnd.Math.max(a.k, j); + a.d += b; + b += p; + } + } + function Ucd() { + Ucd = ccb; + var a; + Scd = new Ycd(ole, 0); + Acd = new Ycd(xle, 1); + zcd = new Ycd(yle, 2); + Rcd = new Ycd(zle, 3); + Tcd = new Ycd(Ale, 4); + Fcd = (mmb(), new zob((a = BD(gdb(F1), 9), new xqb(a, BD(_Bb(a, a.length), 9), 0)))); + Gcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, []))); + Bcd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, []))); + Ocd = Up(qqb(Rcd, OC(GC(F1, 1), bne, 61, 0, []))); + Qcd = Up(qqb(Tcd, OC(GC(F1, 1), bne, 61, 0, []))); + Lcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [Rcd]))); + Ecd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, [Tcd]))); + Ncd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [Tcd]))); + Hcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd]))); + Pcd = Up(qqb(Rcd, OC(GC(F1, 1), bne, 61, 0, [Tcd]))); + Ccd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, [Rcd]))); + Kcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd, Tcd]))); + Dcd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, [Rcd, Tcd]))); + Mcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [Rcd, Tcd]))); + Icd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd, Rcd]))); + Jcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd, Rcd, Tcd]))); + } + function fSc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + if (b.b != 0) { + n = new Psb(); + h = null; + o2 = null; + d = QD($wnd.Math.floor($wnd.Math.log(b.b) * $wnd.Math.LOG10E) + 1); + i = 0; + for (t = Jsb(b, 0); t.b != t.d.c; ) { + r = BD(Xsb(t), 86); + if (PD(o2) !== PD(vNb(r, (mTc(), $Sc)))) { + o2 = GD(vNb(r, $Sc)); + i = 0; + } + o2 != null ? h = o2 + iSc(i++, d) : h = iSc(i++, d); + yNb(r, $Sc, h); + for (q = (e = Jsb(new ZRc(r).a.d, 0), new aSc(e)); Wsb(q.a); ) { + p = BD(Xsb(q.a), 188).c; + Gsb(n, p, n.c.b, n.c); + yNb(p, $Sc, h); + } + } + m = new Lqb(); + for (g = 0; g < h.length - d; g++) { + for (s = Jsb(b, 0); s.b != s.d.c; ) { + r = BD(Xsb(s), 86); + j = qfb(GD(vNb(r, (mTc(), $Sc))), 0, g + 1); + c = (j == null ? Wd(irb(m.f, null)) : Crb(m.g, j)) != null ? BD(j == null ? Wd(irb(m.f, null)) : Crb(m.g, j), 19).a + 1 : 1; + Shb(m, j, meb(c)); + } + } + for (l = new nib(new eib(m).a); l.b; ) { + k = lib(l); + f = meb(Ohb(a.a, k.cd()) != null ? BD(Ohb(a.a, k.cd()), 19).a : 0); + Shb(a.a, GD(k.cd()), meb(BD(k.dd(), 19).a + f.a)); + f = BD(Ohb(a.b, k.cd()), 19); + (!f || f.a < BD(k.dd(), 19).a) && Shb(a.b, GD(k.cd()), BD(k.dd(), 19)); + } + fSc(a, n); + } + } + function PCc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + Odd(c, "Interactive node layering", 1); + d = new Rkb(); + for (n = new olb(b.a); n.a < n.c.c.length; ) { + l = BD(mlb(n), 10); + j = l.n.a; + i = j + l.o.a; + i = $wnd.Math.max(j + 1, i); + r = new Bib(d, 0); + e = null; + while (r.b < r.d.gc()) { + p = (sCb(r.b < r.d.gc()), BD(r.d.Xb(r.c = r.b++), 569)); + if (p.c >= i) { + sCb(r.b > 0); + r.a.Xb(r.c = --r.b); + break; + } else if (p.a > j) { + if (!e) { + Ekb(p.b, l); + p.c = $wnd.Math.min(p.c, j); + p.a = $wnd.Math.max(p.a, i); + e = p; + } else { + Gkb(e.b, p.b); + e.a = $wnd.Math.max(e.a, p.a); + uib(r); + } + } + } + if (!e) { + e = new TCc(); + e.c = j; + e.a = i; + Aib(r, e); + Ekb(e.b, l); + } + } + h = b.b; + k = 0; + for (q = new olb(d); q.a < q.c.c.length; ) { + p = BD(mlb(q), 569); + f = new H1b(b); + f.p = k++; + h.c[h.c.length] = f; + for (o2 = new olb(p.b); o2.a < o2.c.c.length; ) { + l = BD(mlb(o2), 10); + $_b(l, f); + l.p = 0; + } + } + for (m = new olb(b.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + l.p == 0 && OCc(a, l, b); + } + g = new Bib(h, 0); + while (g.b < g.d.gc()) { + (sCb(g.b < g.d.gc()), BD(g.d.Xb(g.c = g.b++), 29)).a.c.length == 0 && uib(g); + } + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c); + } + function Snc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + if (b.e.c.length != 0 && c.e.c.length != 0) { + d = BD(Ikb(b.e, 0), 17).c.i; + g = BD(Ikb(c.e, 0), 17).c.i; + if (d == g) { + return beb(BD(vNb(BD(Ikb(b.e, 0), 17), (wtc(), Zsc)), 19).a, BD(vNb(BD(Ikb(c.e, 0), 17), Zsc), 19).a); + } + for (k = a.a, l = 0, m = k.length; l < m; ++l) { + j = k[l]; + if (j == d) { + return 1; + } else if (j == g) { + return -1; + } + } + } + if (b.g.c.length != 0 && c.g.c.length != 0) { + f = BD(vNb(b, (wtc(), Xsc)), 10); + i = BD(vNb(c, Xsc), 10); + e = 0; + h = 0; + wNb(BD(Ikb(b.g, 0), 17), Zsc) && (e = BD(vNb(BD(Ikb(b.g, 0), 17), Zsc), 19).a); + wNb(BD(Ikb(c.g, 0), 17), Zsc) && (h = BD(vNb(BD(Ikb(b.g, 0), 17), Zsc), 19).a); + if (!!f && f == i) { + if (Ccb(DD(vNb(BD(Ikb(b.g, 0), 17), ltc))) && !Ccb(DD(vNb(BD(Ikb(c.g, 0), 17), ltc)))) { + return 1; + } else if (!Ccb(DD(vNb(BD(Ikb(b.g, 0), 17), ltc))) && Ccb(DD(vNb(BD(Ikb(c.g, 0), 17), ltc)))) { + return -1; + } + return e < h ? -1 : e > h ? 1 : 0; + } + if (a.b) { + a.b._b(f) && (e = BD(a.b.xc(f), 19).a); + a.b._b(i) && (h = BD(a.b.xc(i), 19).a); + } + return e < h ? -1 : e > h ? 1 : 0; + } + return b.e.c.length != 0 && c.g.c.length != 0 ? 1 : -1; + } + function acc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A; + Odd(b, Ine, 1); + p = new Rkb(); + w = new Rkb(); + for (j = new olb(a.b); j.a < j.c.c.length; ) { + i = BD(mlb(j), 29); + r = -1; + o2 = l_b(i.a); + for (l = o2, m = 0, n = l.length; m < n; ++m) { + k = l[m]; + ++r; + if (!(k.k == (j0b(), h0b) && fcd(BD(vNb(k, (Nyc(), Vxc)), 98)))) { + continue; + } + ecd(BD(vNb(k, (Nyc(), Vxc)), 98)) || bcc(k); + yNb(k, (wtc(), Psc), k); + p.c = KC(SI, Uhe, 1, 0, 5, 1); + w.c = KC(SI, Uhe, 1, 0, 5, 1); + c = new Rkb(); + u = new Psb(); + Jq(u, Y_b(k, (Ucd(), Acd))); + $bc(a, u, p, w, c); + h = r; + A = k; + for (f = new olb(p); f.a < f.c.c.length; ) { + d = BD(mlb(f), 10); + Z_b(d, h, i); + ++r; + yNb(d, Psc, k); + g = BD(Ikb(d.j, 0), 11); + q = BD(vNb(g, $sc), 11); + Ccb(DD(vNb(q, nwc))) || BD(vNb(d, Qsc), 15).Fc(A); + } + Osb(u); + for (t = Y_b(k, Rcd).Kc(); t.Ob(); ) { + s = BD(t.Pb(), 11); + Gsb(u, s, u.a, u.a.a); + } + $bc(a, u, w, null, c); + v = k; + for (e = new olb(w); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + Z_b(d, ++r, i); + yNb(d, Psc, k); + g = BD(Ikb(d.j, 0), 11); + q = BD(vNb(g, $sc), 11); + Ccb(DD(vNb(q, nwc))) || BD(vNb(v, Qsc), 15).Fc(d); + } + c.c.length == 0 || yNb(k, ssc, c); + } + } + Qdd(b); + } + function SQb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I; + l = BD(vNb(a, (HSb(), FSb)), 33); + r = Ohe; + s = Ohe; + p = Rie; + q = Rie; + for (u = new olb(a.e); u.a < u.c.c.length; ) { + t = BD(mlb(u), 144); + C = t.d; + D = t.e; + r = $wnd.Math.min(r, C.a - D.a / 2); + s = $wnd.Math.min(s, C.b - D.b / 2); + p = $wnd.Math.max(p, C.a + D.a / 2); + q = $wnd.Math.max(q, C.b + D.b / 2); + } + B = BD(hkd(l, (wSb(), kSb)), 116); + A = new f7c(B.b - r, B.d - s); + for (h = new olb(a.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 144); + w = vNb(g, FSb); + if (JD(w, 239)) { + n = BD(w, 33); + v = P6c(g.d, A); + bld(n, v.a - n.g / 2, v.b - n.f / 2); + } + } + for (d = new olb(a.c); d.a < d.c.c.length; ) { + c = BD(mlb(d), 282); + j = BD(vNb(c, FSb), 79); + k = itd(j, true, true); + F = (H = c7c(R6c(c.d.d), c.c.d), l6c(H, c.c.e.a, c.c.e.b), P6c(H, c.c.d)); + nmd(k, F.a, F.b); + b = (I = c7c(R6c(c.c.d), c.d.d), l6c(I, c.d.e.a, c.d.e.b), P6c(I, c.d.d)); + gmd(k, b.a, b.b); + } + for (f = new olb(a.d); f.a < f.c.c.length; ) { + e = BD(mlb(f), 447); + m = BD(vNb(e, FSb), 137); + o2 = P6c(e.d, A); + bld(m, o2.a, o2.b); + } + G = p - r + (B.b + B.c); + i = q - s + (B.d + B.a); + Afd(l, G, i, false, true); + } + function bmc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + c = null; + i = null; + e = BD(vNb(a.b, (Nyc(), Wwc)), 376); + if (e == (_Ac(), ZAc)) { + c = new Rkb(); + i = new Rkb(); + } + for (h = new olb(a.d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f = g.i; + if (!f) { + continue; + } + switch (g.e.g) { + case 0: + b = BD(Fqb(new Gqb(g.b)), 61); + e == ZAc && b == (Ucd(), Acd) ? (c.c[c.c.length] = g, true) : e == ZAc && b == (Ucd(), Rcd) ? (i.c[i.c.length] = g, true) : _lc(g, b); + break; + case 1: + j = g.a.d.j; + k = g.c.d.j; + j == (Ucd(), Acd) ? amc(g, Acd, (Ajc(), xjc), g.a) : k == Acd ? amc(g, Acd, (Ajc(), yjc), g.c) : j == Rcd ? amc(g, Rcd, (Ajc(), yjc), g.a) : k == Rcd && amc(g, Rcd, (Ajc(), xjc), g.c); + break; + case 2: + case 3: + d = g.b; + uqb(d, (Ucd(), Acd)) ? uqb(d, Rcd) ? uqb(d, Tcd) ? uqb(d, zcd) || amc(g, Acd, (Ajc(), yjc), g.c) : amc(g, Acd, (Ajc(), xjc), g.a) : amc(g, Acd, (Ajc(), wjc), null) : amc(g, Rcd, (Ajc(), wjc), null); + break; + case 4: + l = g.a.d.j; + m = g.a.d.j; + l == (Ucd(), Acd) || m == Acd ? amc(g, Rcd, (Ajc(), wjc), null) : amc(g, Acd, (Ajc(), wjc), null); + } + } + if (c) { + c.c.length == 0 || $lc(c, (Ucd(), Acd)); + i.c.length == 0 || $lc(i, (Ucd(), Rcd)); + } + } + function A2b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + d = BD(vNb(a, (wtc(), $sc)), 33); + o2 = BD(vNb(a, (Nyc(), Gwc)), 19).a; + f = BD(vNb(a, nxc), 19).a; + jkd(d, Gwc, meb(o2)); + jkd(d, nxc, meb(f)); + dld(d, a.n.a + b.a); + eld(d, a.n.b + b.b); + if (BD(hkd(d, Fxc), 174).gc() != 0 || !!a.e || PD(vNb(Q_b(a), Exc)) === PD((Vzc(), Tzc)) && Jzc((Izc(), (!a.q ? (mmb(), mmb(), kmb) : a.q)._b(Cxc) ? m = BD(vNb(a, Cxc), 197) : m = BD(vNb(Q_b(a), Dxc), 197), m))) { + cld(d, a.o.a); + ald(d, a.o.b); + } + for (l = new olb(a.j); l.a < l.c.c.length; ) { + j = BD(mlb(l), 11); + p = vNb(j, $sc); + if (JD(p, 186)) { + e = BD(p, 118); + bld(e, j.n.a, j.n.b); + jkd(e, $xc, j.j); + } + } + n = BD(vNb(a, xxc), 174).gc() != 0; + for (i = new olb(a.b); i.a < i.c.c.length; ) { + g = BD(mlb(i), 70); + if (n || BD(vNb(g, xxc), 174).gc() != 0) { + c = BD(vNb(g, $sc), 137); + _kd(c, g.o.a, g.o.b); + bld(c, g.n.a, g.n.b); + } + } + if (!tcd(BD(vNb(a, Yxc), 21))) { + for (k = new olb(a.j); k.a < k.c.c.length; ) { + j = BD(mlb(k), 11); + for (h = new olb(j.f); h.a < h.c.c.length; ) { + g = BD(mlb(h), 70); + c = BD(vNb(g, $sc), 137); + cld(c, g.o.a); + ald(c, g.o.b); + bld(c, g.n.a, g.n.b); + } + } + } + } + function gtd(a) { + var b, c, d, e, f; + ytb(a, hue); + switch ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i + (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i) { + case 0: + throw vbb(new Wdb("The edge must have at least one source or target.")); + case 1: + return (!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i == 0 ? Xod(atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82))) : Xod(atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82))); + } + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i == 1 && (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i == 1) { + e = atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)); + f = atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)); + if (Xod(e) == Xod(f)) { + return Xod(e); + } else if (e == Xod(f)) { + return e; + } else if (f == Xod(e)) { + return f; + } + } + d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)]))); + b = atd(BD(Rr(d), 82)); + while (Qr(d)) { + c = atd(BD(Rr(d), 82)); + if (c != b && !ntd(c, b)) { + if (Xod(c) == Xod(b)) { + b = Xod(c); + } else { + b = htd(b, c); + if (!b) { + return null; + } + } + } + } + return b; + } + function KNc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + Odd(c, "Polyline edge routing", 1); + q = Edb(ED(vNb(b, (Nyc(), Uwc)))); + n = Edb(ED(vNb(b, wyc))); + e = Edb(ED(vNb(b, myc))); + d = $wnd.Math.min(1, e / n); + t = 0; + i = 0; + if (b.b.c.length != 0) { + u = HNc(BD(Ikb(b.b, 0), 29)); + t = 0.4 * d * u; + } + h = new Bib(b.b, 0); + while (h.b < h.d.gc()) { + g = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29)); + f = Kq(g, DNc); + f && t > 0 && (t -= n); + h_b(g, t); + k = 0; + for (m = new olb(g.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + j = 0; + for (p = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(p); ) { + o2 = BD(Rr(p), 17); + r = A0b(o2.c).b; + s = A0b(o2.d).b; + if (g == o2.d.i.c && !OZb(o2)) { + LNc(o2, t, 0.4 * d * $wnd.Math.abs(r - s)); + if (o2.c.j == (Ucd(), Tcd)) { + r = 0; + s = 0; + } + } + j = $wnd.Math.max(j, $wnd.Math.abs(s - r)); + } + switch (l.k.g) { + case 0: + case 4: + case 1: + case 3: + case 5: + MNc(a, l, t, q); + } + k = $wnd.Math.max(k, j); + } + if (h.b < h.d.gc()) { + u = HNc((sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29))); + k = $wnd.Math.max(k, u); + sCb(h.b > 0); + h.a.Xb(h.c = --h.b); + } + i = 0.4 * d * k; + !f && h.b < h.d.gc() && (i += n); + t += g.c.a + i; + } + a.a.a.$b(); + b.f.a = t; + Qdd(c); + } + function bic(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s; + k = new Lqb(); + i = new Hp(); + for (d = new olb(a.a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 57); + j = tgc(b); + if (j) { + jrb(k.f, j, b); + } else { + s = ugc(b); + if (s) { + for (f = new olb(s.k); f.a < f.c.c.length; ) { + e = BD(mlb(f), 17); + Rc(i, e, b); + } + } + } + } + for (c = new olb(a.a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + j = tgc(b); + if (j) { + for (h = new Sr(ur(U_b(j).a.Kc(), new Sq())); Qr(h); ) { + g = BD(Rr(h), 17); + if (OZb(g)) { + continue; + } + o2 = g.c; + r = g.d; + if ((Ucd(), Lcd).Hc(g.c.j) && Lcd.Hc(g.d.j)) { + continue; + } + p = BD(Ohb(k, g.d.i), 57); + AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 100), a.c[b.a.d]), a.c[p.a.d])); + if (o2.j == Tcd && l1b((z0b(), o2))) { + for (m = BD(Qc(i, g), 21).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 57); + if (l.d.c < b.d.c) { + n = a.c[l.a.d]; + q = a.c[b.a.d]; + if (n == q) { + continue; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), 1), 100), n), q)); + } + } + } + if (r.j == zcd && g1b((z0b(), r))) { + for (m = BD(Qc(i, g), 21).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 57); + if (l.d.c > b.d.c) { + n = a.c[b.a.d]; + q = a.c[l.a.d]; + if (n == q) { + continue; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), 1), 100), n), q)); + } + } + } + } + } + } + } + function QEd(a) { + IEd(); + var b, c, d, e, f, g, h, i; + if (a == null) + return null; + e = hfb(a, wfb(37)); + if (e < 0) { + return a; + } else { + i = new Wfb(a.substr(0, e)); + b = KC(SD, wte, 25, 4, 15, 1); + h = 0; + d = 0; + for (g = a.length; e < g; e++) { + BCb(e, a.length); + if (a.charCodeAt(e) == 37 && a.length > e + 2 && _Ed((BCb(e + 1, a.length), a.charCodeAt(e + 1)), xEd, yEd) && _Ed((BCb(e + 2, a.length), a.charCodeAt(e + 2)), xEd, yEd)) { + c = dFd((BCb(e + 1, a.length), a.charCodeAt(e + 1)), (BCb(e + 2, a.length), a.charCodeAt(e + 2))); + e += 2; + if (d > 0) { + (c & 192) == 128 ? b[h++] = c << 24 >> 24 : d = 0; + } else if (c >= 128) { + if ((c & 224) == 192) { + b[h++] = c << 24 >> 24; + d = 2; + } else if ((c & 240) == 224) { + b[h++] = c << 24 >> 24; + d = 3; + } else if ((c & 248) == 240) { + b[h++] = c << 24 >> 24; + d = 4; + } + } + if (d > 0) { + if (h == d) { + switch (h) { + case 2: { + Kfb(i, ((b[0] & 31) << 6 | b[1] & 63) & aje); + break; + } + case 3: { + Kfb(i, ((b[0] & 15) << 12 | (b[1] & 63) << 6 | b[2] & 63) & aje); + break; + } + } + h = 0; + d = 0; + } + } else { + for (f = 0; f < h; ++f) { + Kfb(i, b[f] & aje); + } + h = 0; + i.a += String.fromCharCode(c); + } + } else { + for (f = 0; f < h; ++f) { + Kfb(i, b[f] & aje); + } + h = 0; + Kfb(i, (BCb(e, a.length), a.charCodeAt(e))); + } + } + return i.a; + } + } + function wA(a, b, c, d, e) { + var f, g, h; + uA(a, b); + g = b[0]; + f = bfb(c.c, 0); + h = -1; + if (nA(c)) { + if (d > 0) { + if (g + d > a.length) { + return false; + } + h = rA(a.substr(0, g + d), b); + } else { + h = rA(a, b); + } + } + switch (f) { + case 71: + h = oA(a, g, OC(GC(ZI, 1), nie, 2, 6, [pje, qje]), b); + e.e = h; + return true; + case 77: + return zA(a, b, e, h, g); + case 76: + return BA(a, b, e, h, g); + case 69: + return xA(a, b, g, e); + case 99: + return AA(a, b, g, e); + case 97: + h = oA(a, g, OC(GC(ZI, 1), nie, 2, 6, ["AM", "PM"]), b); + e.b = h; + return true; + case 121: + return DA(a, b, g, h, c, e); + case 100: + if (h <= 0) { + return false; + } + e.c = h; + return true; + case 83: + if (h < 0) { + return false; + } + return yA(h, g, b[0], e); + case 104: + h == 12 && (h = 0); + case 75: + case 72: + if (h < 0) { + return false; + } + e.f = h; + e.g = false; + return true; + case 107: + if (h < 0) { + return false; + } + e.f = h; + e.g = true; + return true; + case 109: + if (h < 0) { + return false; + } + e.j = h; + return true; + case 115: + if (h < 0) { + return false; + } + e.n = h; + return true; + case 90: + if (g < a.length && (BCb(g, a.length), a.charCodeAt(g) == 90)) { + ++b[0]; + e.o = 0; + return true; + } + case 122: + case 118: + return CA(a, g, b, e); + default: + return false; + } + } + function vKb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + m = BD(BD(Qc(a.r, b), 21), 84); + if (b == (Ucd(), zcd) || b == Tcd) { + zKb(a, b); + return; + } + f = b == Acd ? (vLb(), rLb) : (vLb(), uLb); + u = b == Acd ? (EIb(), DIb) : (EIb(), BIb); + c = BD(Mpb(a.b, b), 124); + d = c.i; + e = d.c + w6c(OC(GC(UD, 1), Vje, 25, 15, [c.n.b, a.C.b, a.k])); + r = d.c + d.b - w6c(OC(GC(UD, 1), Vje, 25, 15, [c.n.c, a.C.c, a.k])); + g = dLb(iLb(f), a.t); + s = b == Acd ? Qje : Pje; + for (l = m.Kc(); l.Ob(); ) { + j = BD(l.Pb(), 111); + if (!j.c || j.c.d.c.length <= 0) { + continue; + } + q = j.b.rf(); + p = j.e; + n = j.c; + o2 = n.i; + o2.b = (i = n.n, n.e.a + i.b + i.c); + o2.a = (h = n.n, n.e.b + h.d + h.a); + ytb(u, lle); + n.f = u; + $Hb(n, (NHb(), MHb)); + o2.c = p.a - (o2.b - q.a) / 2; + v = $wnd.Math.min(e, p.a); + w = $wnd.Math.max(r, p.a + q.a); + o2.c < v ? o2.c = v : o2.c + o2.b > w && (o2.c = w - o2.b); + Ekb(g.d, new BLb(o2, bLb(g, o2))); + s = b == Acd ? $wnd.Math.max(s, p.b + j.b.rf().b) : $wnd.Math.min(s, p.b); + } + s += b == Acd ? a.t : -a.t; + t = cLb((g.e = s, g)); + t > 0 && (BD(Mpb(a.b, b), 124).a.b = t); + for (k = m.Kc(); k.Ob(); ) { + j = BD(k.Pb(), 111); + if (!j.c || j.c.d.c.length <= 0) { + continue; + } + o2 = j.c.i; + o2.c -= j.e.a; + o2.d -= j.e.b; + } + } + function SPb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n; + b = new Lqb(); + for (i = new Fyd(a); i.e != i.i.gc(); ) { + h = BD(Dyd(i), 33); + c = new Tqb(); + Rhb(OPb, h, c); + n = new aQb(); + e = BD(GAb(new YAb(null, new Lub(new Sr(ur($sd(h).a.Kc(), new Sq())))), Wyb(n, Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)])))), 83); + RPb(c, BD(e.xc((Bcb(), true)), 14), new cQb()); + d = BD(GAb(JAb(BD(e.xc(false), 15).Lc(), new eQb()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [Dyb]))), 15); + for (g = d.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 79); + m = ktd(f); + if (m) { + j = BD(Wd(irb(b.f, m)), 21); + if (!j) { + j = UPb(m); + jrb(b.f, m, j); + } + ye(c, j); + } + } + e = BD(GAb(new YAb(null, new Lub(new Sr(ur(_sd(h).a.Kc(), new Sq())))), Wyb(n, Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [Dyb])))), 83); + RPb(c, BD(e.xc(true), 14), new gQb()); + d = BD(GAb(JAb(BD(e.xc(false), 15).Lc(), new iQb()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [Dyb]))), 15); + for (l = d.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 79); + m = mtd(k); + if (m) { + j = BD(Wd(irb(b.f, m)), 21); + if (!j) { + j = UPb(m); + jrb(b.f, m, j); + } + ye(c, j); + } + } + } + } + function rhb(a, b) { + phb(); + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + i = ybb(a, 0) < 0; + i && (a = Jbb(a)); + if (ybb(a, 0) == 0) { + switch (b) { + case 0: + return "0"; + case 1: + return $je; + case 2: + return "0.00"; + case 3: + return "0.000"; + case 4: + return "0.0000"; + case 5: + return "0.00000"; + case 6: + return "0.000000"; + default: + n = new Ufb(); + b < 0 ? (n.a += "0E+", n) : (n.a += "0E", n); + n.a += b == Rie ? "2147483648" : "" + -b; + return n.a; + } + } + k = 18; + l = KC(TD, $ie, 25, k + 1, 15, 1); + c = k; + p = a; + do { + j = p; + p = Abb(p, 10); + l[--c] = Tbb(wbb(48, Qbb(j, Ibb(p, 10)))) & aje; + } while (ybb(p, 0) != 0); + e = Qbb(Qbb(Qbb(k, c), b), 1); + if (b == 0) { + i && (l[--c] = 45); + return zfb(l, c, k - c); + } + if (b > 0 && ybb(e, -6) >= 0) { + if (ybb(e, 0) >= 0) { + f = c + Tbb(e); + for (h = k - 1; h >= f; h--) { + l[h + 1] = l[h]; + } + l[++f] = 46; + i && (l[--c] = 45); + return zfb(l, c, k - c + 1); + } + for (g = 2; Gbb(g, wbb(Jbb(e), 1)); g++) { + l[--c] = 48; + } + l[--c] = 46; + l[--c] = 48; + i && (l[--c] = 45); + return zfb(l, c, k - c); + } + o2 = c + 1; + d = k; + m = new Vfb(); + i && (m.a += "-", m); + if (d - o2 >= 1) { + Kfb(m, l[c]); + m.a += "."; + m.a += zfb(l, c + 1, k - c - 1); + } else { + m.a += zfb(l, c, k - c); + } + m.a += "E"; + ybb(e, 0) > 0 && (m.a += "+", m); + m.a += "" + Ubb(e); + return m.a; + } + function iQc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + a.e.a.$b(); + a.f.a.$b(); + a.c.c = KC(SI, Uhe, 1, 0, 5, 1); + a.i.c = KC(SI, Uhe, 1, 0, 5, 1); + a.g.a.$b(); + if (b) { + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + for (l = Y_b(f, (Ucd(), zcd)).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + Qqb(a.e, k); + for (e = new olb(k.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (OZb(d)) { + continue; + } + Ekb(a.c, d); + oQc(a, d); + h = d.c.i.k; + (h == (j0b(), h0b) || h == i0b || h == e0b || h == d0b) && Ekb(a.j, d); + n = d.d; + m = n.i.c; + m == c ? Qqb(a.f, n) : m == b ? Qqb(a.e, n) : Lkb(a.c, d); + } + } + } + } + if (c) { + for (g = new olb(c.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 10); + for (j = new olb(f.j); j.a < j.c.c.length; ) { + i = BD(mlb(j), 11); + for (e = new olb(i.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + OZb(d) && Qqb(a.g, d); + } + } + for (l = Y_b(f, (Ucd(), Tcd)).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + Qqb(a.f, k); + for (e = new olb(k.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (OZb(d)) { + continue; + } + Ekb(a.c, d); + oQc(a, d); + h = d.c.i.k; + (h == (j0b(), h0b) || h == i0b || h == e0b || h == d0b) && Ekb(a.j, d); + n = d.d; + m = n.i.c; + m == c ? Qqb(a.f, n) : m == b ? Qqb(a.e, n) : Lkb(a.c, d); + } + } + } + } + } + function Afd(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + q = new f7c(a.g, a.f); + p = rfd(a); + p.a = $wnd.Math.max(p.a, b); + p.b = $wnd.Math.max(p.b, c); + w = p.a / q.a; + k = p.b / q.b; + u = p.a - q.a; + i = p.b - q.b; + if (d) { + g = !Xod(a) ? BD(hkd(a, (Y9c(), z8c)), 103) : BD(hkd(Xod(a), (Y9c(), z8c)), 103); + h = PD(hkd(a, (Y9c(), t9c))) === PD((dcd(), $bd)); + for (s = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); s.e != s.i.gc(); ) { + r = BD(Dyd(s), 118); + t = BD(hkd(r, A9c), 61); + if (t == (Ucd(), Scd)) { + t = lfd(r, g); + jkd(r, A9c, t); + } + switch (t.g) { + case 1: + h || dld(r, r.i * w); + break; + case 2: + dld(r, r.i + u); + h || eld(r, r.j * k); + break; + case 3: + h || dld(r, r.i * w); + eld(r, r.j + i); + break; + case 4: + h || eld(r, r.j * k); + } + } + } + _kd(a, p.a, p.b); + if (e) { + for (m = new Fyd((!a.n && (a.n = new cUd(D2, a, 1, 7)), a.n)); m.e != m.i.gc(); ) { + l = BD(Dyd(m), 137); + n = l.i + l.g / 2; + o2 = l.j + l.f / 2; + v = n / q.a; + j = o2 / q.b; + if (v + j >= 1) { + if (v - j > 0 && o2 >= 0) { + dld(l, l.i + u); + eld(l, l.j + i * j); + } else if (v - j < 0 && n >= 0) { + dld(l, l.i + u * v); + eld(l, l.j + i); + } + } + } + } + jkd(a, (Y9c(), Y8c), (tdd(), f = BD(gdb(I1), 9), new xqb(f, BD(_Bb(f, f.length), 9), 0))); + return new f7c(w, k); + } + function Yfd(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2; + n = Xod(atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82))); + o2 = Xod(atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82))); + l = n == o2; + h = new d7c(); + b = BD(hkd(a, (Zad(), Sad)), 74); + if (!!b && b.b >= 2) { + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i == 0) { + c = (Fhd(), e = new rmd(), e); + wtd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), c); + } else if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i > 1) { + m = new Oyd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a)); + while (m.e != m.i.gc()) { + Eyd(m); + } + } + ifd(b, BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202)); + } + if (l) { + for (d = new Fyd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a)); d.e != d.i.gc(); ) { + c = BD(Dyd(d), 202); + for (j = new Fyd((!c.a && (c.a = new xMd(y2, c, 5)), c.a)); j.e != j.i.gc(); ) { + i = BD(Dyd(j), 469); + h.a = $wnd.Math.max(h.a, i.a); + h.b = $wnd.Math.max(h.b, i.b); + } + } + } + for (g = new Fyd((!a.n && (a.n = new cUd(D2, a, 1, 7)), a.n)); g.e != g.i.gc(); ) { + f = BD(Dyd(g), 137); + k = BD(hkd(f, Yad), 8); + !!k && bld(f, k.a, k.b); + if (l) { + h.a = $wnd.Math.max(h.a, f.i + f.g); + h.b = $wnd.Math.max(h.b, f.j + f.f); + } + } + return h; + } + function yMc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B; + t = b.c.length; + e = new ULc(a.a, c, null, null); + B = KC(UD, Vje, 25, t, 15, 1); + p = KC(UD, Vje, 25, t, 15, 1); + o2 = KC(UD, Vje, 25, t, 15, 1); + q = 0; + for (h = 0; h < t; h++) { + p[h] = Ohe; + o2[h] = Rie; + } + for (i = 0; i < t; i++) { + d = (tCb(i, b.c.length), BD(b.c[i], 180)); + B[i] = SLc(d); + B[q] > B[i] && (q = i); + for (l = new olb(a.a.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 29); + for (s = new olb(k.a); s.a < s.c.c.length; ) { + r = BD(mlb(s), 10); + w = Edb(d.p[r.p]) + Edb(d.d[r.p]); + p[i] = $wnd.Math.min(p[i], w); + o2[i] = $wnd.Math.max(o2[i], w + r.o.b); + } + } + } + A = KC(UD, Vje, 25, t, 15, 1); + for (j = 0; j < t; j++) { + (tCb(j, b.c.length), BD(b.c[j], 180)).o == (eMc(), cMc) ? A[j] = p[q] - p[j] : A[j] = o2[q] - o2[j]; + } + f = KC(UD, Vje, 25, t, 15, 1); + for (n = new olb(a.a.b); n.a < n.c.c.length; ) { + m = BD(mlb(n), 29); + for (v = new olb(m.a); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + for (g = 0; g < t; g++) { + f[g] = Edb((tCb(g, b.c.length), BD(b.c[g], 180)).p[u.p]) + Edb((tCb(g, b.c.length), BD(b.c[g], 180)).d[u.p]) + A[g]; + } + f.sort(dcb(Ylb.prototype.te, Ylb, [])); + e.p[u.p] = (f[1] + f[2]) / 2; + e.d[u.p] = 0; + } + } + return e; + } + function G3b(a, b, c) { + var d, e, f, g, h; + d = b.i; + f = a.i.o; + e = a.i.d; + h = a.n; + g = l7c(OC(GC(m1, 1), nie, 8, 0, [h, a.a])); + switch (a.j.g) { + case 1: + _Hb(b, (EIb(), BIb)); + d.d = -e.d - c - d.a; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + $Hb(b, (NHb(), MHb)); + d.c = g.a - Edb(ED(vNb(a, Ysc))) - c - d.b; + } else { + $Hb(b, (NHb(), LHb)); + d.c = g.a + Edb(ED(vNb(a, Ysc))) + c; + } + break; + case 2: + $Hb(b, (NHb(), LHb)); + d.c = f.a + e.c + c; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + _Hb(b, (EIb(), BIb)); + d.d = g.b - Edb(ED(vNb(a, Ysc))) - c - d.a; + } else { + _Hb(b, (EIb(), DIb)); + d.d = g.b + Edb(ED(vNb(a, Ysc))) + c; + } + break; + case 3: + _Hb(b, (EIb(), DIb)); + d.d = f.b + e.a + c; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + $Hb(b, (NHb(), MHb)); + d.c = g.a - Edb(ED(vNb(a, Ysc))) - c - d.b; + } else { + $Hb(b, (NHb(), LHb)); + d.c = g.a + Edb(ED(vNb(a, Ysc))) + c; + } + break; + case 4: + $Hb(b, (NHb(), MHb)); + d.c = -e.b - c - d.b; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + _Hb(b, (EIb(), BIb)); + d.d = g.b - Edb(ED(vNb(a, Ysc))) - c - d.a; + } else { + _Hb(b, (EIb(), DIb)); + d.d = g.b + Edb(ED(vNb(a, Ysc))) + c; + } + } + } + function ded(a, b, c, d, e, f, g) { + var h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I; + n = 0; + D = 0; + for (i = new olb(a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 33); + zfd(h); + n = $wnd.Math.max(n, h.g); + D += h.g * h.f; + } + o2 = D / a.c.length; + C = $dd(a, o2); + D += a.c.length * C; + n = $wnd.Math.max(n, $wnd.Math.sqrt(D * g)) + c.b; + H = c.b; + I = c.d; + m = 0; + k = c.b + c.c; + B = new Psb(); + Dsb(B, meb(0)); + w = new Psb(); + j = new Bib(a, 0); + while (j.b < j.d.gc()) { + h = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 33)); + G = h.g; + l = h.f; + if (H + G > n) { + if (f) { + Fsb(w, m); + Fsb(B, meb(j.b - 1)); + } + H = c.b; + I += m + b; + m = 0; + k = $wnd.Math.max(k, c.b + c.c + G); + } + dld(h, H); + eld(h, I); + k = $wnd.Math.max(k, H + G + c.c); + m = $wnd.Math.max(m, l); + H += G + b; + } + k = $wnd.Math.max(k, d); + F = I + m + c.a; + if (F < e) { + m += e - F; + F = e; + } + if (f) { + H = c.b; + j = new Bib(a, 0); + Fsb(B, meb(a.c.length)); + A = Jsb(B, 0); + r = BD(Xsb(A), 19).a; + Fsb(w, m); + v = Jsb(w, 0); + u = 0; + while (j.b < j.d.gc()) { + if (j.b == r) { + H = c.b; + u = Edb(ED(Xsb(v))); + r = BD(Xsb(A), 19).a; + } + h = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 33)); + s = h.f; + ald(h, u); + p = u; + if (j.b == r) { + q = k - H - c.c; + t = h.g; + cld(h, q); + Ffd(h, new f7c(q, p), new f7c(t, s)); + } + H += h.g + b; + } + } + return new f7c(k, F); + } + function _Yb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C; + Odd(b, "Compound graph postprocessor", 1); + c = Ccb(DD(vNb(a, (Nyc(), Byc)))); + h = BD(vNb(a, (wtc(), zsc)), 224); + k = new Tqb(); + for (r = h.ec().Kc(); r.Ob(); ) { + q = BD(r.Pb(), 17); + g = new Tkb(h.cc(q)); + mmb(); + Okb(g, new EZb(a)); + v = zZb((tCb(0, g.c.length), BD(g.c[0], 243))); + A = AZb(BD(Ikb(g, g.c.length - 1), 243)); + t = v.i; + f_b(A.i, t) ? s = t.e : s = Q_b(t); + l = aZb(q, g); + Osb(q.a); + m = null; + for (f = new olb(g); f.a < f.c.c.length; ) { + e = BD(mlb(f), 243); + p = new d7c(); + Y$b(p, e.a, s); + n = e.b; + d = new s7c(); + o7c(d, 0, n.a); + q7c(d, p); + u = new g7c(A0b(n.c)); + w = new g7c(A0b(n.d)); + P6c(u, p); + P6c(w, p); + if (m) { + d.b == 0 ? o2 = w : o2 = (sCb(d.b != 0), BD(d.a.a.c, 8)); + B = $wnd.Math.abs(m.a - o2.a) > qme; + C = $wnd.Math.abs(m.b - o2.b) > qme; + (!c && B && C || c && (B || C)) && Dsb(q.a, u); + } + ye(q.a, d); + d.b == 0 ? m = u : m = (sCb(d.b != 0), BD(d.c.b.c, 8)); + bZb(n, l, p); + if (AZb(e) == A) { + if (Q_b(A.i) != e.a) { + p = new d7c(); + Y$b(p, Q_b(A.i), s); + } + yNb(q, utc, p); + } + cZb(n, q, s); + k.a.zc(n, k); + } + QZb(q, v); + RZb(q, A); + } + for (j = k.a.ec().Kc(); j.Ob(); ) { + i = BD(j.Pb(), 17); + QZb(i, null); + RZb(i, null); + } + Qdd(b); + } + function KQb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + if (a.gc() == 1) { + return BD(a.Xb(0), 231); + } else if (a.gc() <= 0) { + return new kRb(); + } + for (e = a.Kc(); e.Ob(); ) { + c = BD(e.Pb(), 231); + o2 = 0; + k = Ohe; + l = Ohe; + i = Rie; + j = Rie; + for (n = new olb(c.e); n.a < n.c.c.length; ) { + m = BD(mlb(n), 144); + o2 += BD(vNb(m, (wSb(), oSb)), 19).a; + k = $wnd.Math.min(k, m.d.a - m.e.a / 2); + l = $wnd.Math.min(l, m.d.b - m.e.b / 2); + i = $wnd.Math.max(i, m.d.a + m.e.a / 2); + j = $wnd.Math.max(j, m.d.b + m.e.b / 2); + } + yNb(c, (wSb(), oSb), meb(o2)); + yNb(c, (HSb(), ESb), new f7c(k, l)); + yNb(c, DSb, new f7c(i, j)); + } + mmb(); + a.ad(new OQb()); + p = new kRb(); + tNb(p, BD(a.Xb(0), 94)); + h = 0; + s = 0; + for (f = a.Kc(); f.Ob(); ) { + c = BD(f.Pb(), 231); + q = c7c(R6c(BD(vNb(c, (HSb(), DSb)), 8)), BD(vNb(c, ESb), 8)); + h = $wnd.Math.max(h, q.a); + s += q.a * q.b; + } + h = $wnd.Math.max(h, $wnd.Math.sqrt(s) * Edb(ED(vNb(p, (wSb(), bSb))))); + r = Edb(ED(vNb(p, uSb))); + t = 0; + u = 0; + g = 0; + b = r; + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 231); + q = c7c(R6c(BD(vNb(c, (HSb(), DSb)), 8)), BD(vNb(c, ESb), 8)); + if (t + q.a > h) { + t = 0; + u += g + r; + g = 0; + } + JQb(p, c, t, u); + b = $wnd.Math.max(b, t + q.a); + g = $wnd.Math.max(g, q.b); + t += q.a + r; + } + return p; + } + function Ioc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + k = new s7c(); + switch (a.a.g) { + case 3: + m = BD(vNb(b.e, (wtc(), rtc)), 15); + n = BD(vNb(b.j, rtc), 15); + o2 = BD(vNb(b.f, rtc), 15); + c = BD(vNb(b.e, ptc), 15); + d = BD(vNb(b.j, ptc), 15); + e = BD(vNb(b.f, ptc), 15); + g = new Rkb(); + Gkb(g, m); + n.Jc(new Loc()); + Gkb(g, JD(n, 152) ? km(BD(n, 152)) : JD(n, 131) ? BD(n, 131).a : JD(n, 54) ? new ov(n) : new dv(n)); + Gkb(g, o2); + f = new Rkb(); + Gkb(f, c); + Gkb(f, JD(d, 152) ? km(BD(d, 152)) : JD(d, 131) ? BD(d, 131).a : JD(d, 54) ? new ov(d) : new dv(d)); + Gkb(f, e); + yNb(b.f, rtc, g); + yNb(b.f, ptc, f); + yNb(b.f, stc, b.f); + yNb(b.e, rtc, null); + yNb(b.e, ptc, null); + yNb(b.j, rtc, null); + yNb(b.j, ptc, null); + break; + case 1: + ye(k, b.e.a); + Dsb(k, b.i.n); + ye(k, Su(b.j.a)); + Dsb(k, b.a.n); + ye(k, b.f.a); + break; + default: + ye(k, b.e.a); + ye(k, Su(b.j.a)); + ye(k, b.f.a); + } + Osb(b.f.a); + ye(b.f.a, k); + QZb(b.f, b.e.c); + h = BD(vNb(b.e, (Nyc(), jxc)), 74); + j = BD(vNb(b.j, jxc), 74); + i = BD(vNb(b.f, jxc), 74); + if (!!h || !!j || !!i) { + l = new s7c(); + Goc(l, i); + Goc(l, j); + Goc(l, h); + yNb(b.f, jxc, l); + } + QZb(b.j, null); + RZb(b.j, null); + QZb(b.e, null); + RZb(b.e, null); + $_b(b.a, null); + $_b(b.i, null); + !!b.g && Ioc(a, b.g); + } + function bde(a) { + ade(); + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + if (a == null) + return null; + f = rfb(a); + o2 = ede(f); + if (o2 % 4 != 0) { + return null; + } + p = o2 / 4 | 0; + if (p == 0) + return KC(SD, wte, 25, 0, 15, 1); + l = null; + b = 0; + c = 0; + d = 0; + e = 0; + g = 0; + h = 0; + i = 0; + j = 0; + n = 0; + m = 0; + k = 0; + l = KC(SD, wte, 25, p * 3, 15, 1); + for (; n < p - 1; n++) { + if (!dde(g = f[k++]) || !dde(h = f[k++]) || !dde(i = f[k++]) || !dde(j = f[k++])) + return null; + b = $ce[g]; + c = $ce[h]; + d = $ce[i]; + e = $ce[j]; + l[m++] = (b << 2 | c >> 4) << 24 >> 24; + l[m++] = ((c & 15) << 4 | d >> 2 & 15) << 24 >> 24; + l[m++] = (d << 6 | e) << 24 >> 24; + } + if (!dde(g = f[k++]) || !dde(h = f[k++])) { + return null; + } + b = $ce[g]; + c = $ce[h]; + i = f[k++]; + j = f[k++]; + if ($ce[i] == -1 || $ce[j] == -1) { + if (i == 61 && j == 61) { + if ((c & 15) != 0) + return null; + q = KC(SD, wte, 25, n * 3 + 1, 15, 1); + $fb(l, 0, q, 0, n * 3); + q[m] = (b << 2 | c >> 4) << 24 >> 24; + return q; + } else if (i != 61 && j == 61) { + d = $ce[i]; + if ((d & 3) != 0) + return null; + q = KC(SD, wte, 25, n * 3 + 2, 15, 1); + $fb(l, 0, q, 0, n * 3); + q[m++] = (b << 2 | c >> 4) << 24 >> 24; + q[m] = ((c & 15) << 4 | d >> 2 & 15) << 24 >> 24; + return q; + } else { + return null; + } + } else { + d = $ce[i]; + e = $ce[j]; + l[m++] = (b << 2 | c >> 4) << 24 >> 24; + l[m++] = ((c & 15) << 4 | d >> 2 & 15) << 24 >> 24; + l[m++] = (d << 6 | e) << 24 >> 24; + } + return l; + } + function Sbc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v; + Odd(b, Ine, 1); + o2 = BD(vNb(a, (Nyc(), Swc)), 218); + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + j = l_b(d.a); + for (g = j, h = 0, i = g.length; h < i; ++h) { + f = g[h]; + if (f.k != (j0b(), i0b)) { + continue; + } + if (o2 == (Aad(), yad)) { + for (l = new olb(f.j); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + k.e.c.length == 0 || Vbc(k); + k.g.c.length == 0 || Wbc(k); + } + } else if (JD(vNb(f, (wtc(), $sc)), 17)) { + q = BD(vNb(f, $sc), 17); + r = BD(Y_b(f, (Ucd(), Tcd)).Kc().Pb(), 11); + s = BD(Y_b(f, zcd).Kc().Pb(), 11); + t = BD(vNb(r, $sc), 11); + u = BD(vNb(s, $sc), 11); + QZb(q, u); + RZb(q, t); + v = new g7c(s.i.n); + v.a = l7c(OC(GC(m1, 1), nie, 8, 0, [u.i.n, u.n, u.a])).a; + Dsb(q.a, v); + v = new g7c(r.i.n); + v.a = l7c(OC(GC(m1, 1), nie, 8, 0, [t.i.n, t.n, t.a])).a; + Dsb(q.a, v); + } else { + if (f.j.c.length >= 2) { + p = true; + m = new olb(f.j); + c = BD(mlb(m), 11); + n = null; + while (m.a < m.c.c.length) { + n = c; + c = BD(mlb(m), 11); + if (!pb(vNb(n, $sc), vNb(c, $sc))) { + p = false; + break; + } + } + } else { + p = false; + } + for (l = new olb(f.j); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + k.e.c.length == 0 || Tbc(k, p); + k.g.c.length == 0 || Ubc(k, p); + } + } + $_b(f, null); + } + } + Qdd(b); + } + function KJc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B; + t = a.c[(tCb(0, b.c.length), BD(b.c[0], 17)).p]; + A = a.c[(tCb(1, b.c.length), BD(b.c[1], 17)).p]; + if (t.a.e.e - t.a.a - (t.b.e.e - t.b.a) == 0 && A.a.e.e - A.a.a - (A.b.e.e - A.b.a) == 0) { + return false; + } + r = t.b.e.f; + if (!JD(r, 10)) { + return false; + } + q = BD(r, 10); + v = a.i[q.p]; + w = !q.c ? -1 : Jkb(q.c.a, q, 0); + f = Pje; + if (w > 0) { + e = BD(Ikb(q.c.a, w - 1), 10); + g = a.i[e.p]; + B = $wnd.Math.ceil(jBc(a.n, e, q)); + f = v.a.e - q.d.d - (g.a.e + e.o.b + e.d.a) - B; + } + j = Pje; + if (w < q.c.a.c.length - 1) { + i = BD(Ikb(q.c.a, w + 1), 10); + k = a.i[i.p]; + B = $wnd.Math.ceil(jBc(a.n, i, q)); + j = k.a.e - i.d.d - (v.a.e + q.o.b + q.d.a) - B; + } + if (c && (Iy(), My(Jqe), $wnd.Math.abs(f - j) <= Jqe || f == j || isNaN(f) && isNaN(j))) { + return true; + } + d = gKc(t.a); + h = -gKc(t.b); + l = -gKc(A.a); + s = gKc(A.b); + p = t.a.e.e - t.a.a - (t.b.e.e - t.b.a) > 0 && A.a.e.e - A.a.a - (A.b.e.e - A.b.a) < 0; + o2 = t.a.e.e - t.a.a - (t.b.e.e - t.b.a) < 0 && A.a.e.e - A.a.a - (A.b.e.e - A.b.a) > 0; + n = t.a.e.e + t.b.a < A.b.e.e + A.a.a; + m = t.a.e.e + t.b.a > A.b.e.e + A.a.a; + u = 0; + !p && !o2 && (m ? f + l > 0 ? u = l : j - d > 0 && (u = d) : n && (f + h > 0 ? u = h : j - s > 0 && (u = s))); + v.a.e += u; + v.b && (v.d.e += u); + return false; + } + function XGb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + d = new J6c(b.qf().a, b.qf().b, b.rf().a, b.rf().b); + e = new I6c(); + if (a.c) { + for (g = new olb(b.wf()); g.a < g.c.c.length; ) { + f = BD(mlb(g), 181); + e.c = f.qf().a + b.qf().a; + e.d = f.qf().b + b.qf().b; + e.b = f.rf().a; + e.a = f.rf().b; + H6c(d, e); + } + } + for (j = new olb(b.Cf()); j.a < j.c.c.length; ) { + i = BD(mlb(j), 838); + k = i.qf().a + b.qf().a; + l = i.qf().b + b.qf().b; + if (a.e) { + e.c = k; + e.d = l; + e.b = i.rf().a; + e.a = i.rf().b; + H6c(d, e); + } + if (a.d) { + for (g = new olb(i.wf()); g.a < g.c.c.length; ) { + f = BD(mlb(g), 181); + e.c = f.qf().a + k; + e.d = f.qf().b + l; + e.b = f.rf().a; + e.a = f.rf().b; + H6c(d, e); + } + } + if (a.b) { + m = new f7c(-c, -c); + if (BD(b.We((Y9c(), x9c)), 174).Hc((rcd(), pcd))) { + for (g = new olb(i.wf()); g.a < g.c.c.length; ) { + f = BD(mlb(g), 181); + m.a += f.rf().a + c; + m.b += f.rf().b + c; + } + } + m.a = $wnd.Math.max(m.a, 0); + m.b = $wnd.Math.max(m.b, 0); + VGb(d, i.Bf(), i.zf(), b, i, m, c); + } + } + a.b && VGb(d, b.Bf(), b.zf(), b, null, null, c); + h = new K_b(b.Af()); + h.d = $wnd.Math.max(0, b.qf().b - d.d); + h.a = $wnd.Math.max(0, d.d + d.a - (b.qf().b + b.rf().b)); + h.b = $wnd.Math.max(0, b.qf().a - d.c); + h.c = $wnd.Math.max(0, d.c + d.b - (b.qf().a + b.rf().a)); + b.Ef(h); + } + function wz() { + var a = ["\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000B", "\\f", "\\r", "\\u000E", "\\u000F", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D", "\\u001E", "\\u001F"]; + a[34] = '\\"'; + a[92] = "\\\\"; + a[173] = "\\u00ad"; + a[1536] = "\\u0600"; + a[1537] = "\\u0601"; + a[1538] = "\\u0602"; + a[1539] = "\\u0603"; + a[1757] = "\\u06dd"; + a[1807] = "\\u070f"; + a[6068] = "\\u17b4"; + a[6069] = "\\u17b5"; + a[8203] = "\\u200b"; + a[8204] = "\\u200c"; + a[8205] = "\\u200d"; + a[8206] = "\\u200e"; + a[8207] = "\\u200f"; + a[8232] = "\\u2028"; + a[8233] = "\\u2029"; + a[8234] = "\\u202a"; + a[8235] = "\\u202b"; + a[8236] = "\\u202c"; + a[8237] = "\\u202d"; + a[8238] = "\\u202e"; + a[8288] = "\\u2060"; + a[8289] = "\\u2061"; + a[8290] = "\\u2062"; + a[8291] = "\\u2063"; + a[8292] = "\\u2064"; + a[8298] = "\\u206a"; + a[8299] = "\\u206b"; + a[8300] = "\\u206c"; + a[8301] = "\\u206d"; + a[8302] = "\\u206e"; + a[8303] = "\\u206f"; + a[65279] = "\\ufeff"; + a[65529] = "\\ufff9"; + a[65530] = "\\ufffa"; + a[65531] = "\\ufffb"; + return a; + } + function pid(a, b, c) { + var d, e, f, g, h, i, j, k, l, m; + i = new Rkb(); + l = b.length; + g = AUd(c); + for (j = 0; j < l; ++j) { + k = ifb(b, wfb(61), j); + d = $hd(g, b.substr(j, k - j)); + e = KJd(d); + f = e.Aj().Nh(); + switch (bfb(b, ++k)) { + case 39: { + h = gfb(b, 39, ++k); + Ekb(i, new kGd(d, Pid(b.substr(k, h - k), f, e))); + j = h + 1; + break; + } + case 34: { + h = gfb(b, 34, ++k); + Ekb(i, new kGd(d, Pid(b.substr(k, h - k), f, e))); + j = h + 1; + break; + } + case 91: { + m = new Rkb(); + Ekb(i, new kGd(d, m)); + n: + for (; ; ) { + switch (bfb(b, ++k)) { + case 39: { + h = gfb(b, 39, ++k); + Ekb(m, Pid(b.substr(k, h - k), f, e)); + k = h + 1; + break; + } + case 34: { + h = gfb(b, 34, ++k); + Ekb(m, Pid(b.substr(k, h - k), f, e)); + k = h + 1; + break; + } + case 110: { + ++k; + if (b.indexOf("ull", k) == k) { + m.c[m.c.length] = null; + } else { + throw vbb(new hz(kte)); + } + k += 3; + break; + } + } + if (k < l) { + switch (BCb(k, b.length), b.charCodeAt(k)) { + case 44: { + break; + } + case 93: { + break n; + } + default: { + throw vbb(new hz("Expecting , or ]")); + } + } + } else { + break; + } + } + j = k + 1; + break; + } + case 110: { + ++k; + if (b.indexOf("ull", k) == k) { + Ekb(i, new kGd(d, null)); + } else { + throw vbb(new hz(kte)); + } + j = k + 3; + break; + } + } + if (j < l) { + BCb(j, b.length); + if (b.charCodeAt(j) != 44) { + throw vbb(new hz("Expecting ,")); + } + } else { + break; + } + } + return qid(a, i, c); + } + function AKb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + j = BD(BD(Qc(a.r, b), 21), 84); + g = bKb(a, b); + c = a.u.Hc((rcd(), lcd)); + for (i = j.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 111); + if (!h.c || h.c.d.c.length <= 0) { + continue; + } + m = h.b.rf(); + k = h.c; + l = k.i; + l.b = (f = k.n, k.e.a + f.b + f.c); + l.a = (e = k.n, k.e.b + e.d + e.a); + switch (b.g) { + case 1: + if (h.a) { + l.c = (m.a - l.b) / 2; + $Hb(k, (NHb(), KHb)); + } else if (g || c) { + l.c = -l.b - a.s; + $Hb(k, (NHb(), MHb)); + } else { + l.c = m.a + a.s; + $Hb(k, (NHb(), LHb)); + } + l.d = -l.a - a.t; + _Hb(k, (EIb(), BIb)); + break; + case 3: + if (h.a) { + l.c = (m.a - l.b) / 2; + $Hb(k, (NHb(), KHb)); + } else if (g || c) { + l.c = -l.b - a.s; + $Hb(k, (NHb(), MHb)); + } else { + l.c = m.a + a.s; + $Hb(k, (NHb(), LHb)); + } + l.d = m.b + a.t; + _Hb(k, (EIb(), DIb)); + break; + case 2: + if (h.a) { + d = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (m.b - d) / 2; + _Hb(k, (EIb(), CIb)); + } else if (g || c) { + l.d = -l.a - a.t; + _Hb(k, (EIb(), BIb)); + } else { + l.d = m.b + a.t; + _Hb(k, (EIb(), DIb)); + } + l.c = m.a + a.s; + $Hb(k, (NHb(), LHb)); + break; + case 4: + if (h.a) { + d = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (m.b - d) / 2; + _Hb(k, (EIb(), CIb)); + } else if (g || c) { + l.d = -l.a - a.t; + _Hb(k, (EIb(), BIb)); + } else { + l.d = m.b + a.t; + _Hb(k, (EIb(), DIb)); + } + l.c = -l.b - a.s; + $Hb(k, (NHb(), MHb)); + } + g = false; + } + } + function Kfe(a, b) { + wfe(); + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + if (Vhb(Zee) == 0) { + l = KC(lbb, nie, 117, _ee.length, 0, 1); + for (g = 0; g < l.length; g++) { + l[g] = new $fe(4); + } + d = new Ifb(); + for (f = 0; f < Yee.length; f++) { + k = new $fe(4); + if (f < 84) { + h = f * 2; + n = (BCb(h, wxe.length), wxe.charCodeAt(h)); + m = (BCb(h + 1, wxe.length), wxe.charCodeAt(h + 1)); + Ufe(k, n, m); + } else { + h = (f - 84) * 2; + Ufe(k, afe[h], afe[h + 1]); + } + i = Yee[f]; + dfb(i, "Specials") && Ufe(k, 65520, 65533); + if (dfb(i, uxe)) { + Ufe(k, 983040, 1048573); + Ufe(k, 1048576, 1114109); + } + Shb(Zee, i, k); + Shb($ee, i, _fe(k)); + j = d.a.length; + 0 < j ? d.a = d.a.substr(0, 0) : 0 > j && (d.a += yfb(KC(TD, $ie, 25, -j, 15, 1))); + d.a += "Is"; + if (hfb(i, wfb(32)) >= 0) { + for (e = 0; e < i.length; e++) { + BCb(e, i.length); + i.charCodeAt(e) != 32 && Afb(d, (BCb(e, i.length), i.charCodeAt(e))); + } + } else { + d.a += "" + i; + } + Ofe(d.a, i, true); + } + Ofe(vxe, "Cn", false); + Ofe(xxe, "Cn", true); + c = new $fe(4); + Ufe(c, 0, lxe); + Shb(Zee, "ALL", c); + Shb($ee, "ALL", _fe(c)); + !bfe && (bfe = new Lqb()); + Shb(bfe, vxe, vxe); + !bfe && (bfe = new Lqb()); + Shb(bfe, xxe, xxe); + !bfe && (bfe = new Lqb()); + Shb(bfe, "ALL", "ALL"); + } + o2 = b ? BD(Phb(Zee, a), 136) : BD(Phb($ee, a), 136); + return o2; + } + function c3b(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s; + m = false; + l = false; + if (fcd(BD(vNb(d, (Nyc(), Vxc)), 98))) { + g = false; + h = false; + t: + for (o2 = new olb(d.j); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + for (q = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(n), new R0b(n)]))); Qr(q); ) { + p = BD(Rr(q), 11); + if (!Ccb(DD(vNb(p.i, pwc)))) { + if (n.j == (Ucd(), Acd)) { + g = true; + break t; + } + if (n.j == Rcd) { + h = true; + break t; + } + } + } + } + m = h && !g; + l = g && !h; + } + if (!m && !l && d.b.c.length != 0) { + k = 0; + for (j = new olb(d.b); j.a < j.c.c.length; ) { + i = BD(mlb(j), 70); + k += i.n.b + i.o.b / 2; + } + k /= d.b.c.length; + s = k >= d.o.b / 2; + } else { + s = !l; + } + if (s) { + r = BD(vNb(d, (wtc(), vtc)), 15); + if (!r) { + f = new Rkb(); + yNb(d, vtc, f); + } else if (m) { + f = r; + } else { + e = BD(vNb(d, tsc), 15); + if (!e) { + f = new Rkb(); + yNb(d, tsc, f); + } else { + r.gc() <= e.gc() ? f = r : f = e; + } + } + } else { + e = BD(vNb(d, (wtc(), tsc)), 15); + if (!e) { + f = new Rkb(); + yNb(d, tsc, f); + } else if (l) { + f = e; + } else { + r = BD(vNb(d, vtc), 15); + if (!r) { + f = new Rkb(); + yNb(d, vtc, f); + } else { + e.gc() <= r.gc() ? f = e : f = r; + } + } + } + f.Fc(a); + yNb(a, (wtc(), vsc), c); + if (b.d == c) { + RZb(b, null); + c.e.c.length + c.g.c.length == 0 && F0b(c, null); + d3b(c); + } else { + QZb(b, null); + c.e.c.length + c.g.c.length == 0 && F0b(c, null); + } + Osb(b.a); + } + function aoc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H; + s = new Bib(a.b, 0); + k = b.Kc(); + o2 = 0; + j = BD(k.Pb(), 19).a; + v = 0; + c = new Tqb(); + A = new zsb(); + while (s.b < s.d.gc()) { + r = (sCb(s.b < s.d.gc()), BD(s.d.Xb(s.c = s.b++), 29)); + for (u = new olb(r.a); u.a < u.c.c.length; ) { + t = BD(mlb(u), 10); + for (n = new Sr(ur(U_b(t).a.Kc(), new Sq())); Qr(n); ) { + l = BD(Rr(n), 17); + A.a.zc(l, A); + } + for (m = new Sr(ur(R_b(t).a.Kc(), new Sq())); Qr(m); ) { + l = BD(Rr(m), 17); + A.a.Bc(l) != null; + } + } + if (o2 + 1 == j) { + e = new H1b(a); + Aib(s, e); + f = new H1b(a); + Aib(s, f); + for (C = A.a.ec().Kc(); C.Ob(); ) { + B = BD(C.Pb(), 17); + if (!c.a._b(B)) { + ++v; + c.a.zc(B, c); + } + g = new b0b(a); + yNb(g, (Nyc(), Vxc), (dcd(), acd)); + $_b(g, e); + __b(g, (j0b(), d0b)); + p = new H0b(); + F0b(p, g); + G0b(p, (Ucd(), Tcd)); + D = new H0b(); + F0b(D, g); + G0b(D, zcd); + d = new b0b(a); + yNb(d, Vxc, acd); + $_b(d, f); + __b(d, d0b); + q = new H0b(); + F0b(q, d); + G0b(q, Tcd); + F = new H0b(); + F0b(F, d); + G0b(F, zcd); + w = new UZb(); + QZb(w, B.c); + RZb(w, p); + H = new UZb(); + QZb(H, D); + RZb(H, q); + QZb(B, F); + h = new goc(g, d, w, H, B); + yNb(g, (wtc(), usc), h); + yNb(d, usc, h); + G = w.c.i; + if (G.k == d0b) { + i = BD(vNb(G, usc), 305); + i.d = h; + h.g = i; + } + } + if (k.Ob()) { + j = BD(k.Pb(), 19).a; + } else { + break; + } + } + ++o2; + } + return meb(v); + } + function T1b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p; + l = 0; + for (e = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + if (!Ccb(DD(hkd(d, (Nyc(), Jxc))))) { + if ((PD(hkd(b, ywc)) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) && !Ccb(DD(hkd(d, xwc)))) { + jkd(d, (wtc(), Zsc), meb(l)); + ++l; + } + $1b(a, d, c); + } + } + l = 0; + for (j = new Fyd((!b.b && (b.b = new cUd(B2, b, 12, 3)), b.b)); j.e != j.i.gc(); ) { + h = BD(Dyd(j), 79); + if (PD(hkd(b, (Nyc(), ywc))) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) { + jkd(h, (wtc(), Zsc), meb(l)); + ++l; + } + o2 = jtd(h); + p = ltd(h); + k = Ccb(DD(hkd(o2, fxc))); + n = !Ccb(DD(hkd(h, Jxc))); + m = k && Qld(h) && Ccb(DD(hkd(h, gxc))); + f = Xod(o2) == b && Xod(o2) == Xod(p); + g = (Xod(o2) == b && p == b) ^ (Xod(p) == b && o2 == b); + n && !m && (g || f) && X1b(a, h, b, c); + } + if (Xod(b)) { + for (i = new Fyd(Wod(Xod(b))); i.e != i.i.gc(); ) { + h = BD(Dyd(i), 79); + o2 = jtd(h); + if (o2 == b && Qld(h)) { + m = Ccb(DD(hkd(o2, (Nyc(), fxc)))) && Ccb(DD(hkd(h, gxc))); + m && X1b(a, h, b, c); + } + } + } + } + function gDc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I; + Odd(c, "MinWidth layering", 1); + n = b.b; + A = b.a; + I = BD(vNb(b, (Nyc(), oxc)), 19).a; + h = BD(vNb(b, pxc), 19).a; + a.b = Edb(ED(vNb(b, lyc))); + a.d = Pje; + for (u = new olb(A); u.a < u.c.c.length; ) { + s = BD(mlb(u), 10); + if (s.k != (j0b(), h0b)) { + continue; + } + D = s.o.b; + a.d = $wnd.Math.min(a.d, D); + } + a.d = $wnd.Math.max(1, a.d); + B = A.c.length; + a.c = KC(WD, oje, 25, B, 15, 1); + a.f = KC(WD, oje, 25, B, 15, 1); + a.e = KC(UD, Vje, 25, B, 15, 1); + j = 0; + a.a = 0; + for (v = new olb(A); v.a < v.c.c.length; ) { + s = BD(mlb(v), 10); + s.p = j++; + a.c[s.p] = eDc(R_b(s)); + a.f[s.p] = eDc(U_b(s)); + a.e[s.p] = s.o.b / a.d; + a.a += a.e[s.p]; + } + a.b /= a.d; + a.a /= B; + w = fDc(A); + Okb(A, tmb(new mDc(a))); + p = Pje; + o2 = Ohe; + g = null; + H = I; + G = I; + f = h; + e = h; + if (I < 0) { + H = BD(bDc.a.zd(), 19).a; + G = BD(bDc.b.zd(), 19).a; + } + if (h < 0) { + f = BD(aDc.a.zd(), 19).a; + e = BD(aDc.b.zd(), 19).a; + } + for (F = H; F <= G; F++) { + for (d = f; d <= e; d++) { + C = dDc(a, F, d, A, w); + r = Edb(ED(C.a)); + m = BD(C.b, 15); + q = m.gc(); + if (r < p || r == p && q < o2) { + p = r; + o2 = q; + g = m; + } + } + } + for (l = g.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 15); + i = new H1b(b); + for (t = k.Kc(); t.Ob(); ) { + s = BD(t.Pb(), 10); + $_b(s, i); + } + n.c[n.c.length] = i; + } + smb(n); + A.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c); + } + function I6b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D; + a.b = b; + a.a = BD(vNb(b, (Nyc(), bxc)), 19).a; + a.c = BD(vNb(b, dxc), 19).a; + a.c == 0 && (a.c = Ohe); + q = new Bib(b.b, 0); + while (q.b < q.d.gc()) { + p = (sCb(q.b < q.d.gc()), BD(q.d.Xb(q.c = q.b++), 29)); + h = new Rkb(); + k = -1; + u = -1; + for (t = new olb(p.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + if (sr((D6b(), new Sr(ur(O_b(s).a.Kc(), new Sq())))) >= a.a) { + d = E6b(a, s); + k = $wnd.Math.max(k, d.b); + u = $wnd.Math.max(u, d.d); + Ekb(h, new vgd(s, d)); + } + } + B = new Rkb(); + for (j = 0; j < k; ++j) { + Dkb(B, 0, (sCb(q.b > 0), q.a.Xb(q.c = --q.b), C = new H1b(a.b), Aib(q, C), sCb(q.b < q.d.gc()), q.d.Xb(q.c = q.b++), C)); + } + for (g = new olb(h); g.a < g.c.c.length; ) { + e = BD(mlb(g), 46); + n = BD(e.b, 571).a; + if (!n) { + continue; + } + for (m = new olb(n); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + H6b(a, l, B6b, B); + } + } + c = new Rkb(); + for (i = 0; i < u; ++i) { + Ekb(c, (D = new H1b(a.b), Aib(q, D), D)); + } + for (f = new olb(h); f.a < f.c.c.length; ) { + e = BD(mlb(f), 46); + A = BD(e.b, 571).c; + if (!A) { + continue; + } + for (w = new olb(A); w.a < w.c.c.length; ) { + v = BD(mlb(w), 10); + H6b(a, v, C6b, c); + } + } + } + r = new Bib(b.b, 0); + while (r.b < r.d.gc()) { + o2 = (sCb(r.b < r.d.gc()), BD(r.d.Xb(r.c = r.b++), 29)); + o2.a.c.length == 0 && uib(r); + } + } + function uQc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G; + Odd(c, "Spline edge routing", 1); + if (b.b.c.length == 0) { + b.f.a = 0; + Qdd(c); + return; + } + s = Edb(ED(vNb(b, (Nyc(), wyc)))); + h = Edb(ED(vNb(b, pyc))); + g = Edb(ED(vNb(b, myc))); + r = BD(vNb(b, Xwc), 336); + B = r == (tBc(), sBc); + A = Edb(ED(vNb(b, Ywc))); + a.d = b; + a.j.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Uhb(a.k); + i = BD(Ikb(b.b, 0), 29); + k = Kq(i.a, (FNc(), DNc)); + o2 = BD(Ikb(b.b, b.b.c.length - 1), 29); + l = Kq(o2.a, DNc); + p = new olb(b.b); + q = null; + G = 0; + do { + t = p.a < p.c.c.length ? BD(mlb(p), 29) : null; + iQc(a, q, t); + lQc(a); + C = Vtb(uAb(PAb(JAb(new YAb(null, new Kub(a.i, 16)), new LQc()), new NQc()))); + F = 0; + u = G; + m = !q || k && q == i; + n = !t || l && t == o2; + if (C > 0) { + j = 0; + !!q && (j += h); + j += (C - 1) * g; + !!t && (j += h); + B && !!t && (j = $wnd.Math.max(j, jQc(t, g, s, A))); + if (j < s && !m && !n) { + F = (s - j) / 2; + j = s; + } + u += j; + } else + !m && !n && (u += s); + !!t && h_b(t, u); + for (w = new olb(a.i); w.a < w.c.c.length; ) { + v = BD(mlb(w), 128); + v.a.c = G; + v.a.b = u - G; + v.F = F; + v.p = !q; + } + Gkb(a.a, a.i); + G = u; + !!t && (G += t.c.a); + q = t; + m = n; + } while (t); + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + f = pQc(a, d); + yNb(d, (wtc(), ptc), f); + D = rQc(a, d); + yNb(d, rtc, D); + } + b.f.a = G; + a.d = null; + Qdd(c); + } + function Yxd(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + p = a.i != 0; + t = false; + r = null; + if (oid(a.e)) { + k = b.gc(); + if (k > 0) { + m = k < 100 ? null : new Ixd(k); + j = new Aud(b); + o2 = j.g; + r = KC(WD, oje, 25, k, 15, 1); + d = 0; + u = new zud(k); + for (e = 0; e < a.i; ++e) { + h = a.g[e]; + n = h; + v: + for (s = 0; s < 2; ++s) { + for (i = k; --i >= 0; ) { + if (n != null ? pb(n, o2[i]) : PD(n) === PD(o2[i])) { + if (r.length <= d) { + q = r; + r = KC(WD, oje, 25, 2 * r.length, 15, 1); + $fb(q, 0, r, 0, d); + } + r[d++] = e; + wtd(u, o2[i]); + break v; + } + } + n = n; + if (PD(n) === PD(h)) { + break; + } + } + } + j = u; + o2 = u.g; + k = d; + if (d > r.length) { + q = r; + r = KC(WD, oje, 25, d, 15, 1); + $fb(q, 0, r, 0, d); + } + if (d > 0) { + t = true; + for (f = 0; f < d; ++f) { + n = o2[f]; + m = k3d(a, BD(n, 72), m); + } + for (g = d; --g >= 0; ) { + tud(a, r[g]); + } + if (d != k) { + for (e = k; --e >= d; ) { + tud(j, e); + } + q = r; + r = KC(WD, oje, 25, d, 15, 1); + $fb(q, 0, r, 0, d); + } + b = j; + } + } + } else { + b = Ctd(a, b); + for (e = a.i; --e >= 0; ) { + if (b.Hc(a.g[e])) { + tud(a, e); + t = true; + } + } + } + if (t) { + if (r != null) { + c = b.gc(); + l = c == 1 ? FLd(a, 4, b.Kc().Pb(), null, r[0], p) : FLd(a, 6, b, r, r[0], p); + m = c < 100 ? null : new Ixd(c); + for (e = b.Kc(); e.Ob(); ) { + n = e.Pb(); + m = Q2d(a, BD(n, 72), m); + } + if (!m) { + Uhd(a.e, l); + } else { + m.Ei(l); + m.Fi(); + } + } else { + m = Vxd(b.gc()); + for (e = b.Kc(); e.Ob(); ) { + n = e.Pb(); + m = Q2d(a, BD(n, 72), m); + } + !!m && m.Fi(); + } + return true; + } else { + return false; + } + } + function fYb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + c = new mYb(b); + c.a || $Xb(b); + j = ZXb(b); + i = new Hp(); + q = new AYb(); + for (p = new olb(b.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + for (e = new Sr(ur(U_b(o2).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (d.c.i.k == (j0b(), e0b) || d.d.i.k == e0b) { + k = eYb(a, d, j, q); + Rc(i, cYb(k.d), k.a); + } + } + } + g = new Rkb(); + for (t = BD(vNb(c.c, (wtc(), Esc)), 21).Kc(); t.Ob(); ) { + s = BD(t.Pb(), 61); + n = q.c[s.g]; + m = q.b[s.g]; + h = q.a[s.g]; + f = null; + r = null; + switch (s.g) { + case 4: + f = new J6c(a.d.a, n, j.b.a - a.d.a, m - n); + r = new J6c(a.d.a, n, h, m - n); + iYb(j, new f7c(f.c + f.b, f.d)); + iYb(j, new f7c(f.c + f.b, f.d + f.a)); + break; + case 2: + f = new J6c(j.a.a, n, a.c.a - j.a.a, m - n); + r = new J6c(a.c.a - h, n, h, m - n); + iYb(j, new f7c(f.c, f.d)); + iYb(j, new f7c(f.c, f.d + f.a)); + break; + case 1: + f = new J6c(n, a.d.b, m - n, j.b.b - a.d.b); + r = new J6c(n, a.d.b, m - n, h); + iYb(j, new f7c(f.c, f.d + f.a)); + iYb(j, new f7c(f.c + f.b, f.d + f.a)); + break; + case 3: + f = new J6c(n, j.a.b, m - n, a.c.b - j.a.b); + r = new J6c(n, a.c.b - h, m - n, h); + iYb(j, new f7c(f.c, f.d)); + iYb(j, new f7c(f.c + f.b, f.d)); + } + if (f) { + l = new vYb(); + l.d = s; + l.b = f; + l.c = r; + l.a = Dx(BD(Qc(i, cYb(s)), 21)); + g.c[g.c.length] = l; + } + } + Gkb(c.b, g); + c.d = BWb(JWb(j)); + return c; + } + function pMc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p; + if (c.p[b.p] != null) { + return; + } + h = true; + c.p[b.p] = 0; + g = b; + p = c.o == (eMc(), cMc) ? Qje : Pje; + do { + e = a.b.e[g.p]; + f = g.c.a.c.length; + if (c.o == cMc && e > 0 || c.o == dMc && e < f - 1) { + i = null; + j = null; + c.o == dMc ? i = BD(Ikb(g.c.a, e + 1), 10) : i = BD(Ikb(g.c.a, e - 1), 10); + j = c.g[i.p]; + pMc(a, j, c); + p = a.e.bg(p, b, g); + c.j[b.p] == b && (c.j[b.p] = c.j[j.p]); + if (c.j[b.p] == c.j[j.p]) { + o2 = jBc(a.d, g, i); + if (c.o == dMc) { + d = Edb(c.p[b.p]); + l = Edb(c.p[j.p]) + Edb(c.d[i.p]) - i.d.d - o2 - g.d.a - g.o.b - Edb(c.d[g.p]); + if (h) { + h = false; + c.p[b.p] = $wnd.Math.min(l, p); + } else { + c.p[b.p] = $wnd.Math.min(d, $wnd.Math.min(l, p)); + } + } else { + d = Edb(c.p[b.p]); + l = Edb(c.p[j.p]) + Edb(c.d[i.p]) + i.o.b + i.d.a + o2 + g.d.d - Edb(c.d[g.p]); + if (h) { + h = false; + c.p[b.p] = $wnd.Math.max(l, p); + } else { + c.p[b.p] = $wnd.Math.max(d, $wnd.Math.max(l, p)); + } + } + } else { + o2 = Edb(ED(vNb(a.a, (Nyc(), vyc)))); + n = nMc(a, c.j[b.p]); + k = nMc(a, c.j[j.p]); + if (c.o == dMc) { + m = Edb(c.p[b.p]) + Edb(c.d[g.p]) + g.o.b + g.d.a + o2 - (Edb(c.p[j.p]) + Edb(c.d[i.p]) - i.d.d); + tMc(n, k, m); + } else { + m = Edb(c.p[b.p]) + Edb(c.d[g.p]) - g.d.d - Edb(c.p[j.p]) - Edb(c.d[i.p]) - i.o.b - i.d.a - o2; + tMc(n, k, m); + } + } + } else { + p = a.e.bg(p, b, g); + } + g = c.a[g.p]; + } while (g != b); + SMc(a.e, b); + } + function _qd(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G; + t = b; + s = new Hp(); + u = new Hp(); + k = Ypd(t, Nte); + d = new ord(a, c, s, u); + qqd(d.a, d.b, d.c, d.d, k); + i = (A = s.i, !A ? s.i = new zf(s, s.c) : A); + for (C = i.Kc(); C.Ob(); ) { + B = BD(C.Pb(), 202); + e = BD(Qc(s, B), 21); + for (p = e.Kc(); p.Ob(); ) { + o2 = p.Pb(); + v = BD(oo(a.d, o2), 202); + if (v) { + h = (!B.e && (B.e = new y5d(A2, B, 10, 9)), B.e); + wtd(h, v); + } else { + g = _pd(t, Vte); + m = _te + o2 + aue + g; + n = m + $te; + throw vbb(new cqd(n)); + } + } + } + j = (w = u.i, !w ? u.i = new zf(u, u.c) : w); + for (F = j.Kc(); F.Ob(); ) { + D = BD(F.Pb(), 202); + f = BD(Qc(u, D), 21); + for (r = f.Kc(); r.Ob(); ) { + q = r.Pb(); + v = BD(oo(a.d, q), 202); + if (v) { + l = (!D.g && (D.g = new y5d(A2, D, 9, 10)), D.g); + wtd(l, v); + } else { + g = _pd(t, Vte); + m = _te + q + aue + g; + n = m + $te; + throw vbb(new cqd(n)); + } + } + } + !c.b && (c.b = new y5d(z2, c, 4, 7)); + if (c.b.i != 0 && (!c.c && (c.c = new y5d(z2, c, 5, 8)), c.c.i != 0) && (!c.b && (c.b = new y5d(z2, c, 4, 7)), c.b.i <= 1 && (!c.c && (c.c = new y5d(z2, c, 5, 8)), c.c.i <= 1)) && (!c.a && (c.a = new cUd(A2, c, 6, 6)), c.a).i == 1) { + G = BD(qud((!c.a && (c.a = new cUd(A2, c, 6, 6)), c.a), 0), 202); + if (!dmd(G) && !emd(G)) { + kmd(G, BD(qud((!c.b && (c.b = new y5d(z2, c, 4, 7)), c.b), 0), 82)); + lmd(G, BD(qud((!c.c && (c.c = new y5d(z2, c, 5, 8)), c.c), 0), 82)); + } + } + } + function qJc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D; + for (t = a.a, u = 0, v = t.length; u < v; ++u) { + s = t[u]; + j = Ohe; + k = Ohe; + for (o2 = new olb(s.e); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 10); + g = !m.c ? -1 : Jkb(m.c.a, m, 0); + if (g > 0) { + l = BD(Ikb(m.c.a, g - 1), 10); + B = jBc(a.b, m, l); + q = m.n.b - m.d.d - (l.n.b + l.o.b + l.d.a + B); + } else { + q = m.n.b - m.d.d; + } + j = $wnd.Math.min(q, j); + if (g < m.c.a.c.length - 1) { + l = BD(Ikb(m.c.a, g + 1), 10); + B = jBc(a.b, m, l); + r = l.n.b - l.d.d - (m.n.b + m.o.b + m.d.a + B); + } else { + r = 2 * m.n.b; + } + k = $wnd.Math.min(r, k); + } + i = Ohe; + f = false; + e = BD(Ikb(s.e, 0), 10); + for (D = new olb(e.j); D.a < D.c.c.length; ) { + C = BD(mlb(D), 11); + p = e.n.b + C.n.b + C.a.b; + for (d = new olb(C.e); d.a < d.c.c.length; ) { + c = BD(mlb(d), 17); + w = c.c; + b = w.i.n.b + w.n.b + w.a.b - p; + if ($wnd.Math.abs(b) < $wnd.Math.abs(i) && $wnd.Math.abs(b) < (b < 0 ? j : k)) { + i = b; + f = true; + } + } + } + h = BD(Ikb(s.e, s.e.c.length - 1), 10); + for (A = new olb(h.j); A.a < A.c.c.length; ) { + w = BD(mlb(A), 11); + p = h.n.b + w.n.b + w.a.b; + for (d = new olb(w.g); d.a < d.c.c.length; ) { + c = BD(mlb(d), 17); + C = c.d; + b = C.i.n.b + C.n.b + C.a.b - p; + if ($wnd.Math.abs(b) < $wnd.Math.abs(i) && $wnd.Math.abs(b) < (b < 0 ? j : k)) { + i = b; + f = true; + } + } + } + if (f && i != 0) { + for (n = new olb(s.e); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + m.n.b += i; + } + } + } + } + function ync(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + if (Mhb(a.a, b)) { + if (Rqb(BD(Ohb(a.a, b), 53), c)) { + return 1; + } + } else { + Rhb(a.a, b, new Tqb()); + } + if (Mhb(a.a, c)) { + if (Rqb(BD(Ohb(a.a, c), 53), b)) { + return -1; + } + } else { + Rhb(a.a, c, new Tqb()); + } + if (Mhb(a.e, b)) { + if (Rqb(BD(Ohb(a.e, b), 53), c)) { + return -1; + } + } else { + Rhb(a.e, b, new Tqb()); + } + if (Mhb(a.e, c)) { + if (Rqb(BD(Ohb(a.a, c), 53), b)) { + return 1; + } + } else { + Rhb(a.e, c, new Tqb()); + } + if (a.c == (tAc(), sAc) || !wNb(b, (wtc(), Zsc)) || !wNb(c, (wtc(), Zsc))) { + i = BD(Etb(Dtb(KAb(JAb(new YAb(null, new Kub(b.j, 16)), new Hnc())), new Jnc())), 11); + k = BD(Etb(Dtb(KAb(JAb(new YAb(null, new Kub(c.j, 16)), new Lnc())), new Nnc())), 11); + if (!!i && !!k) { + h = i.i; + j = k.i; + if (!!h && h == j) { + for (m = new olb(h.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + if (l == i) { + Anc(a, c, b); + return -1; + } else if (l == k) { + Anc(a, b, c); + return 1; + } + } + return beb(znc(a, b), znc(a, c)); + } + for (o2 = a.d, p = 0, q = o2.length; p < q; ++p) { + n = o2[p]; + if (n == h) { + Anc(a, c, b); + return -1; + } else if (n == j) { + Anc(a, b, c); + return 1; + } + } + } + if (!wNb(b, (wtc(), Zsc)) || !wNb(c, Zsc)) { + e = znc(a, b); + g = znc(a, c); + e > g ? Anc(a, b, c) : Anc(a, c, b); + return e < g ? -1 : e > g ? 1 : 0; + } + } + d = BD(vNb(b, (wtc(), Zsc)), 19).a; + f = BD(vNb(c, Zsc), 19).a; + d > f ? Anc(a, b, c) : Anc(a, c, b); + return d < f ? -1 : d > f ? 1 : 0; + } + function u2c(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s; + if (Ccb(DD(hkd(b, (Y9c(), d9c))))) { + return mmb(), mmb(), jmb; + } + j = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i != 0; + l = s2c(b); + k = !l.dc(); + if (j || k) { + e = BD(hkd(b, F9c), 149); + if (!e) { + throw vbb(new y2c("Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout.")); + } + s = D3c(e, (Csd(), ysd)); + q2c(b); + if (!j && k && !s) { + return mmb(), mmb(), jmb; + } + i = new Rkb(); + if (PD(hkd(b, J8c)) === PD((hbd(), ebd)) && (D3c(e, vsd) || D3c(e, usd))) { + n = p2c(a, b); + o2 = new Psb(); + ye(o2, (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); + while (o2.b != 0) { + m = BD(o2.b == 0 ? null : (sCb(o2.b != 0), Nsb(o2, o2.a.a)), 33); + q2c(m); + r = PD(hkd(m, J8c)) === PD(gbd); + if (r || ikd(m, o8c) && !C3c(e, hkd(m, F9c))) { + h = u2c(a, m, c, d); + Gkb(i, h); + jkd(m, J8c, gbd); + hfd(m); + } else { + ye(o2, (!m.a && (m.a = new cUd(E2, m, 10, 11)), m.a)); + } + } + } else { + n = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i; + for (g = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); g.e != g.i.gc(); ) { + f = BD(Dyd(g), 33); + h = u2c(a, f, c, d); + Gkb(i, h); + hfd(f); + } + } + for (q = new olb(i); q.a < q.c.c.length; ) { + p = BD(mlb(q), 79); + jkd(p, d9c, (Bcb(), true)); + } + r2c(b, e, Udd(d, n)); + v2c(i); + return k && s ? l : (mmb(), mmb(), jmb); + } else { + return mmb(), mmb(), jmb; + } + } + function Z$b(a, b, c, d, e, f, g, h, i) { + var j, k, l, m, n, o2, p; + n = c; + k = new b0b(i); + __b(k, (j0b(), e0b)); + yNb(k, (wtc(), Isc), g); + yNb(k, (Nyc(), Vxc), (dcd(), $bd)); + p = Edb(ED(a.We(Uxc))); + yNb(k, Uxc, p); + l = new H0b(); + F0b(l, k); + if (!(b != bcd && b != ccd)) { + d >= 0 ? n = Zcd(h) : n = Wcd(Zcd(h)); + a.Ye($xc, n); + } + j = new d7c(); + m = false; + if (a.Xe(Txc)) { + a7c(j, BD(a.We(Txc), 8)); + m = true; + } else { + _6c(j, g.a / 2, g.b / 2); + } + switch (n.g) { + case 4: + yNb(k, mxc, (Ctc(), ytc)); + yNb(k, Bsc, (Gqc(), Fqc)); + k.o.b = g.b; + p < 0 && (k.o.a = -p); + G0b(l, (Ucd(), zcd)); + m || (j.a = g.a); + j.a -= g.a; + break; + case 2: + yNb(k, mxc, (Ctc(), Atc)); + yNb(k, Bsc, (Gqc(), Dqc)); + k.o.b = g.b; + p < 0 && (k.o.a = -p); + G0b(l, (Ucd(), Tcd)); + m || (j.a = 0); + break; + case 1: + yNb(k, Osc, (esc(), dsc)); + k.o.a = g.a; + p < 0 && (k.o.b = -p); + G0b(l, (Ucd(), Rcd)); + m || (j.b = g.b); + j.b -= g.b; + break; + case 3: + yNb(k, Osc, (esc(), bsc)); + k.o.a = g.a; + p < 0 && (k.o.b = -p); + G0b(l, (Ucd(), Acd)); + m || (j.b = 0); + } + a7c(l.n, j); + yNb(k, Txc, j); + if (b == Zbd || b == _bd || b == $bd) { + o2 = 0; + if (b == Zbd && a.Xe(Wxc)) { + switch (n.g) { + case 1: + case 2: + o2 = BD(a.We(Wxc), 19).a; + break; + case 3: + case 4: + o2 = -BD(a.We(Wxc), 19).a; + } + } else { + switch (n.g) { + case 4: + case 2: + o2 = f.b; + b == _bd && (o2 /= e.b); + break; + case 1: + case 3: + o2 = f.a; + b == _bd && (o2 /= e.a); + } + } + yNb(k, htc, o2); + } + yNb(k, Hsc, n); + return k; + } + function AGc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C; + c = Edb(ED(vNb(a.a.j, (Nyc(), Ewc)))); + if (c < -1 || !a.a.i || ecd(BD(vNb(a.a.o, Vxc), 98)) || V_b(a.a.o, (Ucd(), zcd)).gc() < 2 && V_b(a.a.o, Tcd).gc() < 2) { + return true; + } + if (a.a.c.Rf()) { + return false; + } + v = 0; + u = 0; + t = new Rkb(); + for (i = a.a.e, j = 0, k = i.length; j < k; ++j) { + h = i[j]; + for (m = h, n = 0, p = m.length; n < p; ++n) { + l = m[n]; + if (l.k == (j0b(), i0b)) { + t.c[t.c.length] = l; + continue; + } + d = a.b[l.c.p][l.p]; + if (l.k == e0b) { + d.b = 1; + BD(vNb(l, (wtc(), $sc)), 11).j == (Ucd(), zcd) && (u += d.a); + } else { + C = V_b(l, (Ucd(), Tcd)); + C.dc() || !Lq(C, new NGc()) ? d.c = 1 : (e = V_b(l, zcd), (e.dc() || !Lq(e, new JGc())) && (v += d.a)); + } + for (g = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(g); ) { + f = BD(Rr(g), 17); + v += d.c; + u += d.b; + B = f.d.i; + zGc(a, d, B); + } + r = pl(OC(GC(KI, 1), Uhe, 20, 0, [V_b(l, (Ucd(), Acd)), V_b(l, Rcd)])); + for (A = new Sr(new xl(r.a.length, r.a)); Qr(A); ) { + w = BD(Rr(A), 11); + s = BD(vNb(w, (wtc(), gtc)), 10); + if (s) { + v += d.c; + u += d.b; + zGc(a, d, s); + } + } + } + for (o2 = new olb(t); o2.a < o2.c.c.length; ) { + l = BD(mlb(o2), 10); + d = a.b[l.c.p][l.p]; + for (g = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(g); ) { + f = BD(Rr(g), 17); + v += d.c; + u += d.b; + B = f.d.i; + zGc(a, d, B); + } + } + t.c = KC(SI, Uhe, 1, 0, 5, 1); + } + b = v + u; + q = b == 0 ? Pje : (v - u) / b; + return q >= c; + } + function ovd() { + mvd(); + function h(f) { + var g = this; + this.dispatch = function(a) { + var b = a.data; + switch (b.cmd) { + case "algorithms": + var c = pvd((mmb(), new lnb(new $ib(lvd.b)))); + f.postMessage({ id: b.id, data: c }); + break; + case "categories": + var d = pvd((mmb(), new lnb(new $ib(lvd.c)))); + f.postMessage({ id: b.id, data: d }); + break; + case "options": + var e = pvd((mmb(), new lnb(new $ib(lvd.d)))); + f.postMessage({ id: b.id, data: e }); + break; + case "register": + svd(b.algorithms); + f.postMessage({ id: b.id }); + break; + case "layout": + qvd(b.graph, b.layoutOptions || {}, b.options || {}); + f.postMessage({ id: b.id, data: b.graph }); + break; + } + }; + this.saveDispatch = function(b) { + try { + g.dispatch(b); + } catch (a) { + f.postMessage({ id: b.data.id, error: a }); + } + }; + } + function j(b) { + var c = this; + this.dispatcher = new h({ postMessage: function(a) { + c.onmessage({ data: a }); + } }); + this.postMessage = function(a) { + setTimeout(function() { + c.dispatcher.saveDispatch({ data: a }); + }, 0); + }; + } + if (typeof document === uke && typeof self !== uke) { + var i = new h(self); + self.onmessage = i.saveDispatch; + } else if (typeof module2 !== uke && module2.exports) { + Object.defineProperty(exports2, "__esModule", { value: true }); + module2.exports = { "default": j, Worker: j }; + } + } + function aae(a) { + if (a.N) + return; + a.N = true; + a.b = Lnd(a, 0); + Knd(a.b, 0); + Knd(a.b, 1); + Knd(a.b, 2); + a.bb = Lnd(a, 1); + Knd(a.bb, 0); + Knd(a.bb, 1); + a.fb = Lnd(a, 2); + Knd(a.fb, 3); + Knd(a.fb, 4); + Qnd(a.fb, 5); + a.qb = Lnd(a, 3); + Knd(a.qb, 0); + Qnd(a.qb, 1); + Qnd(a.qb, 2); + Knd(a.qb, 3); + Knd(a.qb, 4); + Qnd(a.qb, 5); + Knd(a.qb, 6); + a.a = Mnd(a, 4); + a.c = Mnd(a, 5); + a.d = Mnd(a, 6); + a.e = Mnd(a, 7); + a.f = Mnd(a, 8); + a.g = Mnd(a, 9); + a.i = Mnd(a, 10); + a.j = Mnd(a, 11); + a.k = Mnd(a, 12); + a.n = Mnd(a, 13); + a.o = Mnd(a, 14); + a.p = Mnd(a, 15); + a.q = Mnd(a, 16); + a.s = Mnd(a, 17); + a.r = Mnd(a, 18); + a.t = Mnd(a, 19); + a.u = Mnd(a, 20); + a.v = Mnd(a, 21); + a.w = Mnd(a, 22); + a.B = Mnd(a, 23); + a.A = Mnd(a, 24); + a.C = Mnd(a, 25); + a.D = Mnd(a, 26); + a.F = Mnd(a, 27); + a.G = Mnd(a, 28); + a.H = Mnd(a, 29); + a.J = Mnd(a, 30); + a.I = Mnd(a, 31); + a.K = Mnd(a, 32); + a.M = Mnd(a, 33); + a.L = Mnd(a, 34); + a.P = Mnd(a, 35); + a.Q = Mnd(a, 36); + a.R = Mnd(a, 37); + a.S = Mnd(a, 38); + a.T = Mnd(a, 39); + a.U = Mnd(a, 40); + a.V = Mnd(a, 41); + a.X = Mnd(a, 42); + a.W = Mnd(a, 43); + a.Y = Mnd(a, 44); + a.Z = Mnd(a, 45); + a.$ = Mnd(a, 46); + a._ = Mnd(a, 47); + a.ab = Mnd(a, 48); + a.cb = Mnd(a, 49); + a.db = Mnd(a, 50); + a.eb = Mnd(a, 51); + a.gb = Mnd(a, 52); + a.hb = Mnd(a, 53); + a.ib = Mnd(a, 54); + a.jb = Mnd(a, 55); + a.kb = Mnd(a, 56); + a.lb = Mnd(a, 57); + a.mb = Mnd(a, 58); + a.nb = Mnd(a, 59); + a.ob = Mnd(a, 60); + a.pb = Mnd(a, 61); + } + function f5b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + s = 0; + if (b.f.a == 0) { + for (q = new olb(a); q.a < q.c.c.length; ) { + o2 = BD(mlb(q), 10); + s = $wnd.Math.max(s, o2.n.a + o2.o.a + o2.d.c); + } + } else { + s = b.f.a - b.c.a; + } + s -= b.c.a; + for (p = new olb(a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + g5b(o2.n, s - o2.o.a); + h5b(o2.f); + d5b(o2); + (!o2.q ? (mmb(), mmb(), kmb) : o2.q)._b((Nyc(), ayc)) && g5b(BD(vNb(o2, ayc), 8), s - o2.o.a); + switch (BD(vNb(o2, mwc), 248).g) { + case 1: + yNb(o2, mwc, (F7c(), D7c)); + break; + case 2: + yNb(o2, mwc, (F7c(), C7c)); + } + r = o2.o; + for (u = new olb(o2.j); u.a < u.c.c.length; ) { + t = BD(mlb(u), 11); + g5b(t.n, r.a - t.o.a); + g5b(t.a, t.o.a); + G0b(t, Z4b(t.j)); + g = BD(vNb(t, Wxc), 19); + !!g && yNb(t, Wxc, meb(-g.a)); + for (f = new olb(t.g); f.a < f.c.c.length; ) { + e = BD(mlb(f), 17); + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 8); + c.a = s - c.a; + } + j = BD(vNb(e, jxc), 74); + if (j) { + for (i = Jsb(j, 0); i.b != i.d.c; ) { + h = BD(Xsb(i), 8); + h.a = s - h.a; + } + } + for (m = new olb(e.b); m.a < m.c.c.length; ) { + k = BD(mlb(m), 70); + g5b(k.n, s - k.o.a); + } + } + for (n = new olb(t.f); n.a < n.c.c.length; ) { + k = BD(mlb(n), 70); + g5b(k.n, t.o.a - k.o.a); + } + } + if (o2.k == (j0b(), e0b)) { + yNb(o2, (wtc(), Hsc), Z4b(BD(vNb(o2, Hsc), 61))); + c5b(o2); + } + for (l = new olb(o2.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 70); + d5b(k); + g5b(k.n, r.a - k.o.a); + } + } + } + function i5b(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + s = 0; + if (b.f.b == 0) { + for (q = new olb(a); q.a < q.c.c.length; ) { + o2 = BD(mlb(q), 10); + s = $wnd.Math.max(s, o2.n.b + o2.o.b + o2.d.a); + } + } else { + s = b.f.b - b.c.b; + } + s -= b.c.b; + for (p = new olb(a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + j5b(o2.n, s - o2.o.b); + k5b(o2.f); + e5b(o2); + (!o2.q ? (mmb(), mmb(), kmb) : o2.q)._b((Nyc(), ayc)) && j5b(BD(vNb(o2, ayc), 8), s - o2.o.b); + switch (BD(vNb(o2, mwc), 248).g) { + case 3: + yNb(o2, mwc, (F7c(), A7c)); + break; + case 4: + yNb(o2, mwc, (F7c(), E7c)); + } + r = o2.o; + for (u = new olb(o2.j); u.a < u.c.c.length; ) { + t = BD(mlb(u), 11); + j5b(t.n, r.b - t.o.b); + j5b(t.a, t.o.b); + G0b(t, $4b(t.j)); + g = BD(vNb(t, Wxc), 19); + !!g && yNb(t, Wxc, meb(-g.a)); + for (f = new olb(t.g); f.a < f.c.c.length; ) { + e = BD(mlb(f), 17); + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 8); + c.b = s - c.b; + } + j = BD(vNb(e, jxc), 74); + if (j) { + for (i = Jsb(j, 0); i.b != i.d.c; ) { + h = BD(Xsb(i), 8); + h.b = s - h.b; + } + } + for (m = new olb(e.b); m.a < m.c.c.length; ) { + k = BD(mlb(m), 70); + j5b(k.n, s - k.o.b); + } + } + for (n = new olb(t.f); n.a < n.c.c.length; ) { + k = BD(mlb(n), 70); + j5b(k.n, t.o.b - k.o.b); + } + } + if (o2.k == (j0b(), e0b)) { + yNb(o2, (wtc(), Hsc), $4b(BD(vNb(o2, Hsc), 61))); + b5b(o2); + } + for (l = new olb(o2.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 70); + e5b(k); + j5b(k.n, r.b - k.o.b); + } + } + } + function tZc(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n; + l = false; + j = a + 1; + k = (tCb(a, b.c.length), BD(b.c[a], 200)); + g = k.a; + h = null; + for (f = 0; f < k.a.c.length; f++) { + e = (tCb(f, g.c.length), BD(g.c[f], 187)); + if (e.c) { + continue; + } + if (e.b.c.length == 0) { + Zfb(); + v$c(k, e); + --f; + l = true; + continue; + } + if (!e.k) { + !!h && a$c(h); + h = new b$c(!h ? 0 : h.e + h.d + d, k.f, d); + OZc(e, h.e + h.d, k.f); + Ekb(k.d, h); + WZc(h, e); + e.k = true; + } + i = null; + i = (n = null, f < k.a.c.length - 1 ? n = BD(Ikb(k.a, f + 1), 187) : j < b.c.length && (tCb(j, b.c.length), BD(b.c[j], 200)).a.c.length != 0 && (n = BD(Ikb((tCb(j, b.c.length), BD(b.c[j], 200)).a, 0), 187)), n); + m = false; + !!i && (m = !pb(i.j, k)); + if (i) { + if (i.b.c.length == 0) { + v$c(k, i); + break; + } else { + KZc(e, c - e.s); + a$c(e.q); + l = l | sZc(k, e, i, c, d); + } + if (i.b.c.length == 0) { + v$c((tCb(j, b.c.length), BD(b.c[j], 200)), i); + i = null; + while (b.c.length > j && (tCb(j, b.c.length), BD(b.c[j], 200)).a.c.length == 0) { + Lkb(b, (tCb(j, b.c.length), b.c[j])); + } + } + if (!i) { + --f; + continue; + } + if (uZc(b, k, e, i, m, c, j, d)) { + l = true; + continue; + } + if (m) { + if (vZc(b, k, e, i, c, j, d)) { + l = true; + continue; + } else if (wZc(k, e)) { + e.c = true; + l = true; + continue; + } + } else if (wZc(k, e)) { + e.c = true; + l = true; + continue; + } + if (l) { + continue; + } + } + if (wZc(k, e)) { + e.c = true; + l = true; + !!i && (i.k = false); + continue; + } else { + a$c(e.q); + } + } + return l; + } + function fed(a, b, c, d, e, f, g) { + var h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I; + p = 0; + D = 0; + for (j = new olb(a.b); j.a < j.c.c.length; ) { + i = BD(mlb(j), 157); + !!i.c && zfd(i.c); + p = $wnd.Math.max(p, red(i)); + D += red(i) * qed(i); + } + q = D / a.b.c.length; + C = _dd(a.b, q); + D += a.b.c.length * C; + p = $wnd.Math.max(p, $wnd.Math.sqrt(D * g)) + c.b; + H = c.b; + I = c.d; + n = 0; + l = c.b + c.c; + B = new Psb(); + Dsb(B, meb(0)); + w = new Psb(); + k = new Bib(a.b, 0); + o2 = null; + h = new Rkb(); + while (k.b < k.d.gc()) { + i = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 157)); + G = red(i); + m = qed(i); + if (H + G > p) { + if (f) { + Fsb(w, n); + Fsb(B, meb(k.b - 1)); + Ekb(a.d, o2); + h.c = KC(SI, Uhe, 1, 0, 5, 1); + } + H = c.b; + I += n + b; + n = 0; + l = $wnd.Math.max(l, c.b + c.c + G); + } + h.c[h.c.length] = i; + ued(i, H, I); + l = $wnd.Math.max(l, H + G + c.c); + n = $wnd.Math.max(n, m); + H += G + b; + o2 = i; + } + Gkb(a.a, h); + Ekb(a.d, BD(Ikb(h, h.c.length - 1), 157)); + l = $wnd.Math.max(l, d); + F = I + n + c.a; + if (F < e) { + n += e - F; + F = e; + } + if (f) { + H = c.b; + k = new Bib(a.b, 0); + Fsb(B, meb(a.b.c.length)); + A = Jsb(B, 0); + s = BD(Xsb(A), 19).a; + Fsb(w, n); + v = Jsb(w, 0); + u = 0; + while (k.b < k.d.gc()) { + if (k.b == s) { + H = c.b; + u = Edb(ED(Xsb(v))); + s = BD(Xsb(A), 19).a; + } + i = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 157)); + sed(i, u); + if (k.b == s) { + r = l - H - c.c; + t = red(i); + ted(i, r); + ved(i, (r - t) / 2, 0); + } + H += red(i) + b; + } + } + return new f7c(l, F); + } + function pde(a) { + var b, c, d, e, f; + b = a.c; + f = null; + switch (b) { + case 6: + return a.Vl(); + case 13: + return a.Wl(); + case 23: + return a.Nl(); + case 22: + return a.Sl(); + case 18: + return a.Pl(); + case 8: + nde(a); + f = (wfe(), efe); + break; + case 9: + return a.vl(true); + case 19: + return a.wl(); + case 10: + switch (a.a) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + f = a.ul(a.a); + nde(a); + return f; + case 101: + case 102: + case 110: + case 114: + case 116: + case 117: + case 118: + case 120: + { + c = a.tl(); + c < Tje ? f = (wfe(), wfe(), new ige(0, c)) : f = Ffe(Tee(c)); + } + break; + case 99: + return a.Fl(); + case 67: + return a.Al(); + case 105: + return a.Il(); + case 73: + return a.Bl(); + case 103: + return a.Gl(); + case 88: + return a.Cl(); + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return a.xl(); + case 80: + case 112: + f = tde(a, a.a); + if (!f) + throw vbb(new mde(tvd((h0d(), Iue)))); + break; + default: + f = zfe(a.a); + } + nde(a); + break; + case 0: + if (a.a == 93 || a.a == 123 || a.a == 125) + throw vbb(new mde(tvd((h0d(), Hue)))); + f = zfe(a.a); + d = a.a; + nde(a); + if ((d & 64512) == Uje && a.c == 0 && (a.a & 64512) == 56320) { + e = KC(TD, $ie, 25, 2, 15, 1); + e[0] = d & aje; + e[1] = a.a & aje; + f = Efe(Ffe(zfb(e, 0, e.length)), 0); + nde(a); + } + break; + default: + throw vbb(new mde(tvd((h0d(), Hue)))); + } + return f; + } + function e7b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + d = new Rkb(); + e = Ohe; + f = Ohe; + g = Ohe; + if (c) { + e = a.f.a; + for (p = new olb(b.j); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 11); + for (i = new olb(o2.g); i.a < i.c.c.length; ) { + h = BD(mlb(i), 17); + if (h.a.b != 0) { + k = BD(Hsb(h.a), 8); + if (k.a < e) { + f = e - k.a; + g = Ohe; + d.c = KC(SI, Uhe, 1, 0, 5, 1); + e = k.a; + } + if (k.a <= e) { + d.c[d.c.length] = h; + h.a.b > 1 && (g = $wnd.Math.min(g, $wnd.Math.abs(BD(Ut(h.a, 1), 8).b - k.b))); + } + } + } + } + } else { + for (p = new olb(b.j); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 11); + for (i = new olb(o2.e); i.a < i.c.c.length; ) { + h = BD(mlb(i), 17); + if (h.a.b != 0) { + m = BD(Isb(h.a), 8); + if (m.a > e) { + f = m.a - e; + g = Ohe; + d.c = KC(SI, Uhe, 1, 0, 5, 1); + e = m.a; + } + if (m.a >= e) { + d.c[d.c.length] = h; + h.a.b > 1 && (g = $wnd.Math.min(g, $wnd.Math.abs(BD(Ut(h.a, h.a.b - 2), 8).b - m.b))); + } + } + } + } + } + if (d.c.length != 0 && f > b.o.a / 2 && g > b.o.b / 2) { + n = new H0b(); + F0b(n, b); + G0b(n, (Ucd(), Acd)); + n.n.a = b.o.a / 2; + r = new H0b(); + F0b(r, b); + G0b(r, Rcd); + r.n.a = b.o.a / 2; + r.n.b = b.o.b; + for (i = new olb(d); i.a < i.c.c.length; ) { + h = BD(mlb(i), 17); + if (c) { + j = BD(Lsb(h.a), 8); + q = h.a.b == 0 ? A0b(h.d) : BD(Hsb(h.a), 8); + q.b >= j.b ? QZb(h, r) : QZb(h, n); + } else { + j = BD(Msb(h.a), 8); + q = h.a.b == 0 ? A0b(h.c) : BD(Isb(h.a), 8); + q.b >= j.b ? RZb(h, r) : RZb(h, n); + } + l = BD(vNb(h, (Nyc(), jxc)), 74); + !!l && ze(l, j, true); + } + b.n.a = e - b.o.a / 2; + } + } + function erd(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I, J, K; + D = null; + G = b; + F = Rqd(a, dtd(c), G); + Lkd(F, _pd(G, Vte)); + H = BD(oo(a.g, Vpd(aC(G, Cte))), 33); + m = aC(G, "sourcePort"); + d = null; + !!m && (d = Vpd(m)); + I = BD(oo(a.j, d), 118); + if (!H) { + h = Wpd(G); + o2 = "An edge must have a source node (edge id: '" + h; + p = o2 + $te; + throw vbb(new cqd(p)); + } + if (!!I && !Hb(mpd(I), H)) { + i = _pd(G, Vte); + q = "The source port of an edge must be a port of the edge's source node (edge id: '" + i; + r = q + $te; + throw vbb(new cqd(r)); + } + B = (!F.b && (F.b = new y5d(z2, F, 4, 7)), F.b); + f = null; + I ? f = I : f = H; + wtd(B, f); + J = BD(oo(a.g, Vpd(aC(G, bue))), 33); + n = aC(G, "targetPort"); + e = null; + !!n && (e = Vpd(n)); + K = BD(oo(a.j, e), 118); + if (!J) { + l = Wpd(G); + s = "An edge must have a target node (edge id: '" + l; + t = s + $te; + throw vbb(new cqd(t)); + } + if (!!K && !Hb(mpd(K), J)) { + j = _pd(G, Vte); + u = "The target port of an edge must be a port of the edge's target node (edge id: '" + j; + v = u + $te; + throw vbb(new cqd(v)); + } + C = (!F.c && (F.c = new y5d(z2, F, 5, 8)), F.c); + g = null; + K ? g = K : g = J; + wtd(C, g); + if ((!F.b && (F.b = new y5d(z2, F, 4, 7)), F.b).i == 0 || (!F.c && (F.c = new y5d(z2, F, 5, 8)), F.c).i == 0) { + k = _pd(G, Vte); + w = Zte + k; + A = w + $te; + throw vbb(new cqd(A)); + } + grd(G, F); + frd(G, F); + D = crd(a, G, F); + return D; + } + function DXb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D; + l = FXb(zXb(a, (Ucd(), Fcd)), b); + o2 = EXb(zXb(a, Gcd), b); + u = EXb(zXb(a, Ocd), b); + B = GXb(zXb(a, Qcd), b); + m = GXb(zXb(a, Bcd), b); + s = EXb(zXb(a, Ncd), b); + p = EXb(zXb(a, Hcd), b); + w = EXb(zXb(a, Pcd), b); + v = EXb(zXb(a, Ccd), b); + C = GXb(zXb(a, Ecd), b); + r = EXb(zXb(a, Lcd), b); + t = EXb(zXb(a, Kcd), b); + A = EXb(zXb(a, Dcd), b); + D = GXb(zXb(a, Mcd), b); + n = GXb(zXb(a, Icd), b); + q = EXb(zXb(a, Jcd), b); + c = w6c(OC(GC(UD, 1), Vje, 25, 15, [s.a, B.a, w.a, D.a])); + d = w6c(OC(GC(UD, 1), Vje, 25, 15, [o2.a, l.a, u.a, q.a])); + e = r.a; + f = w6c(OC(GC(UD, 1), Vje, 25, 15, [p.a, m.a, v.a, n.a])); + j = w6c(OC(GC(UD, 1), Vje, 25, 15, [s.b, o2.b, p.b, t.b])); + i = w6c(OC(GC(UD, 1), Vje, 25, 15, [B.b, l.b, m.b, q.b])); + k = C.b; + h = w6c(OC(GC(UD, 1), Vje, 25, 15, [w.b, u.b, v.b, A.b])); + vXb(zXb(a, Fcd), c + e, j + k); + vXb(zXb(a, Jcd), c + e, j + k); + vXb(zXb(a, Gcd), c + e, 0); + vXb(zXb(a, Ocd), c + e, j + k + i); + vXb(zXb(a, Qcd), 0, j + k); + vXb(zXb(a, Bcd), c + e + d, j + k); + vXb(zXb(a, Hcd), c + e + d, 0); + vXb(zXb(a, Pcd), 0, j + k + i); + vXb(zXb(a, Ccd), c + e + d, j + k + i); + vXb(zXb(a, Ecd), 0, j); + vXb(zXb(a, Lcd), c, 0); + vXb(zXb(a, Dcd), 0, j + k + i); + vXb(zXb(a, Icd), c + e + d, 0); + g = new d7c(); + g.a = w6c(OC(GC(UD, 1), Vje, 25, 15, [c + d + e + f, C.a, t.a, A.a])); + g.b = w6c(OC(GC(UD, 1), Vje, 25, 15, [j + i + k + h, r.b, D.b, n.b])); + return g; + } + function Ngc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + p = new Rkb(); + for (m = new olb(a.d.b); m.a < m.c.c.length; ) { + l = BD(mlb(m), 29); + for (o2 = new olb(l.a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 10); + e = BD(Ohb(a.f, n), 57); + for (i = new Sr(ur(U_b(n).a.Kc(), new Sq())); Qr(i); ) { + g = BD(Rr(i), 17); + d = Jsb(g.a, 0); + j = true; + k = null; + if (d.b != d.d.c) { + b = BD(Xsb(d), 8); + c = null; + if (g.c.j == (Ucd(), Acd)) { + q = new hic(b, new f7c(b.a, e.d.d), e, g); + q.f.a = true; + q.a = g.c; + p.c[p.c.length] = q; + } + if (g.c.j == Rcd) { + q = new hic(b, new f7c(b.a, e.d.d + e.d.a), e, g); + q.f.d = true; + q.a = g.c; + p.c[p.c.length] = q; + } + while (d.b != d.d.c) { + c = BD(Xsb(d), 8); + if (!ADb(b.b, c.b)) { + k = new hic(b, c, null, g); + p.c[p.c.length] = k; + if (j) { + j = false; + if (c.b < e.d.d) { + k.f.a = true; + } else if (c.b > e.d.d + e.d.a) { + k.f.d = true; + } else { + k.f.d = true; + k.f.a = true; + } + } + } + d.b != d.d.c && (b = c); + } + if (k) { + f = BD(Ohb(a.f, g.d.i), 57); + if (b.b < f.d.d) { + k.f.a = true; + } else if (b.b > f.d.d + f.d.a) { + k.f.d = true; + } else { + k.f.d = true; + k.f.a = true; + } + } + } + } + for (h = new Sr(ur(R_b(n).a.Kc(), new Sq())); Qr(h); ) { + g = BD(Rr(h), 17); + if (g.a.b != 0) { + b = BD(Isb(g.a), 8); + if (g.d.j == (Ucd(), Acd)) { + q = new hic(b, new f7c(b.a, e.d.d), e, g); + q.f.a = true; + q.a = g.d; + p.c[p.c.length] = q; + } + if (g.d.j == Rcd) { + q = new hic(b, new f7c(b.a, e.d.d + e.d.a), e, g); + q.f.d = true; + q.a = g.d; + p.c[p.c.length] = q; + } + } + } + } + } + return p; + } + function WJc(a, b, c) { + var d, e, f, g, h, i, j, k, l; + Odd(c, "Network simplex node placement", 1); + a.e = b; + a.n = BD(vNb(b, (wtc(), otc)), 304); + VJc(a); + HJc(a); + MAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new KKc()), new MKc(a)); + MAb(JAb(LAb(JAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new zLc()), new BLc()), new DLc()), new FLc()), new IKc(a)); + if (Ccb(DD(vNb(a.e, (Nyc(), Axc))))) { + g = Udd(c, 1); + Odd(g, "Straight Edges Pre-Processing", 1); + UJc(a); + Qdd(g); + } + JFb(a.f); + f = BD(vNb(b, Ayc), 19).a * a.f.a.c.length; + uGb(HGb(IGb(LGb(a.f), f), false), Udd(c, 1)); + if (a.d.a.gc() != 0) { + g = Udd(c, 1); + Odd(g, "Flexible Where Space Processing", 1); + h = BD(Btb(RAb(NAb(new YAb(null, new Kub(a.f.a, 16)), new OKc()), new iKc())), 19).a; + i = BD(Btb(QAb(NAb(new YAb(null, new Kub(a.f.a, 16)), new QKc()), new mKc())), 19).a; + j = i - h; + k = nGb(new pGb(), a.f); + l = nGb(new pGb(), a.f); + AFb(DFb(CFb(BFb(EFb(new FFb(), 2e4), j), k), l)); + MAb(JAb(JAb(Plb(a.i), new SKc()), new UKc()), new WKc(h, k, j, l)); + for (e = a.d.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 213); + d.g = 1; + } + uGb(HGb(IGb(LGb(a.f), f), false), Udd(g, 1)); + Qdd(g); + } + if (Ccb(DD(vNb(b, Axc)))) { + g = Udd(c, 1); + Odd(g, "Straight Edges Post-Processing", 1); + TJc(a); + Qdd(g); + } + GJc(a); + a.e = null; + a.f = null; + a.i = null; + a.c = null; + Uhb(a.k); + a.j = null; + a.a = null; + a.o = null; + a.d.a.$b(); + Qdd(c); + } + function lMc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v; + for (h = new olb(a.a.b); h.a < h.c.c.length; ) { + f = BD(mlb(h), 29); + for (t = new olb(f.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + b.g[s.p] = s; + b.a[s.p] = s; + b.d[s.p] = 0; + } + } + i = a.a.b; + b.c == (YLc(), WLc) && (i = JD(i, 152) ? km(BD(i, 152)) : JD(i, 131) ? BD(i, 131).a : JD(i, 54) ? new ov(i) : new dv(i)); + for (g = i.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 29); + n = -1; + m = f.a; + if (b.o == (eMc(), dMc)) { + n = Ohe; + m = JD(m, 152) ? km(BD(m, 152)) : JD(m, 131) ? BD(m, 131).a : JD(m, 54) ? new ov(m) : new dv(m); + } + for (v = m.Kc(); v.Ob(); ) { + u = BD(v.Pb(), 10); + l = null; + b.c == WLc ? l = BD(Ikb(a.b.f, u.p), 15) : l = BD(Ikb(a.b.b, u.p), 15); + if (l.gc() > 0) { + d = l.gc(); + j = QD($wnd.Math.floor((d + 1) / 2)) - 1; + e = QD($wnd.Math.ceil((d + 1) / 2)) - 1; + if (b.o == dMc) { + for (k = e; k >= j; k--) { + if (b.a[u.p] == u) { + p = BD(l.Xb(k), 46); + o2 = BD(p.a, 10); + if (!Rqb(c, p.b) && n > a.b.e[o2.p]) { + b.a[o2.p] = u; + b.g[u.p] = b.g[o2.p]; + b.a[u.p] = b.g[u.p]; + b.f[b.g[u.p].p] = (Bcb(), Ccb(b.f[b.g[u.p].p]) & u.k == (j0b(), g0b) ? true : false); + n = a.b.e[o2.p]; + } + } + } + } else { + for (k = j; k <= e; k++) { + if (b.a[u.p] == u) { + r = BD(l.Xb(k), 46); + q = BD(r.a, 10); + if (!Rqb(c, r.b) && n < a.b.e[q.p]) { + b.a[q.p] = u; + b.g[u.p] = b.g[q.p]; + b.a[u.p] = b.g[u.p]; + b.f[b.g[u.p].p] = (Bcb(), Ccb(b.f[b.g[u.p].p]) & u.k == (j0b(), g0b) ? true : false); + n = a.b.e[q.p]; + } + } + } + } + } + } + } + } + function Thd() { + Thd = ccb; + Hhd(); + Shd = Ghd.a; + BD(qud(ZKd(Ghd.a), 0), 18); + Mhd = Ghd.f; + BD(qud(ZKd(Ghd.f), 0), 18); + BD(qud(ZKd(Ghd.f), 1), 34); + Rhd = Ghd.n; + BD(qud(ZKd(Ghd.n), 0), 34); + BD(qud(ZKd(Ghd.n), 1), 34); + BD(qud(ZKd(Ghd.n), 2), 34); + BD(qud(ZKd(Ghd.n), 3), 34); + Nhd = Ghd.g; + BD(qud(ZKd(Ghd.g), 0), 18); + BD(qud(ZKd(Ghd.g), 1), 34); + Jhd = Ghd.c; + BD(qud(ZKd(Ghd.c), 0), 18); + BD(qud(ZKd(Ghd.c), 1), 18); + Ohd = Ghd.i; + BD(qud(ZKd(Ghd.i), 0), 18); + BD(qud(ZKd(Ghd.i), 1), 18); + BD(qud(ZKd(Ghd.i), 2), 18); + BD(qud(ZKd(Ghd.i), 3), 18); + BD(qud(ZKd(Ghd.i), 4), 34); + Phd = Ghd.j; + BD(qud(ZKd(Ghd.j), 0), 18); + Khd = Ghd.d; + BD(qud(ZKd(Ghd.d), 0), 18); + BD(qud(ZKd(Ghd.d), 1), 18); + BD(qud(ZKd(Ghd.d), 2), 18); + BD(qud(ZKd(Ghd.d), 3), 18); + BD(qud(ZKd(Ghd.d), 4), 34); + BD(qud(ZKd(Ghd.d), 5), 34); + BD(qud(ZKd(Ghd.d), 6), 34); + BD(qud(ZKd(Ghd.d), 7), 34); + Ihd = Ghd.b; + BD(qud(ZKd(Ghd.b), 0), 34); + BD(qud(ZKd(Ghd.b), 1), 34); + Lhd = Ghd.e; + BD(qud(ZKd(Ghd.e), 0), 34); + BD(qud(ZKd(Ghd.e), 1), 34); + BD(qud(ZKd(Ghd.e), 2), 34); + BD(qud(ZKd(Ghd.e), 3), 34); + BD(qud(ZKd(Ghd.e), 4), 18); + BD(qud(ZKd(Ghd.e), 5), 18); + BD(qud(ZKd(Ghd.e), 6), 18); + BD(qud(ZKd(Ghd.e), 7), 18); + BD(qud(ZKd(Ghd.e), 8), 18); + BD(qud(ZKd(Ghd.e), 9), 18); + BD(qud(ZKd(Ghd.e), 10), 34); + Qhd = Ghd.k; + BD(qud(ZKd(Ghd.k), 0), 34); + BD(qud(ZKd(Ghd.k), 1), 34); + } + function wQc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F; + C = new Psb(); + w = new Psb(); + q = -1; + for (i = new olb(a); i.a < i.c.c.length; ) { + g = BD(mlb(i), 128); + g.s = q--; + k = 0; + t = 0; + for (f = new olb(g.t); f.a < f.c.c.length; ) { + d = BD(mlb(f), 268); + t += d.c; + } + for (e = new olb(g.i); e.a < e.c.c.length; ) { + d = BD(mlb(e), 268); + k += d.c; + } + g.n = k; + g.u = t; + t == 0 ? (Gsb(w, g, w.c.b, w.c), true) : k == 0 && (Gsb(C, g, C.c.b, C.c), true); + } + F = Gx(a); + l = a.c.length; + p = l + 1; + r = l - 1; + n = new Rkb(); + while (F.a.gc() != 0) { + while (w.b != 0) { + v = (sCb(w.b != 0), BD(Nsb(w, w.a.a), 128)); + F.a.Bc(v) != null; + v.s = r--; + AQc(v, C, w); + } + while (C.b != 0) { + A = (sCb(C.b != 0), BD(Nsb(C, C.a.a), 128)); + F.a.Bc(A) != null; + A.s = p++; + AQc(A, C, w); + } + o2 = Rie; + for (j = F.a.ec().Kc(); j.Ob(); ) { + g = BD(j.Pb(), 128); + s = g.u - g.n; + if (s >= o2) { + if (s > o2) { + n.c = KC(SI, Uhe, 1, 0, 5, 1); + o2 = s; + } + n.c[n.c.length] = g; + } + } + if (n.c.length != 0) { + m = BD(Ikb(n, Bub(b, n.c.length)), 128); + F.a.Bc(m) != null; + m.s = p++; + AQc(m, C, w); + n.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + u = a.c.length + 1; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 128); + g.s < l && (g.s += u); + } + for (B = new olb(a); B.a < B.c.c.length; ) { + A = BD(mlb(B), 128); + c = new Bib(A.t, 0); + while (c.b < c.d.gc()) { + d = (sCb(c.b < c.d.gc()), BD(c.d.Xb(c.c = c.b++), 268)); + D = d.b; + if (A.s > D.s) { + uib(c); + Lkb(D.i, d); + if (d.c > 0) { + d.a = D; + Ekb(D.t, d); + d.b = A; + Ekb(A.i, d); + } + } + } + } + } + function qde(a) { + var b, c, d, e, f; + b = a.c; + switch (b) { + case 11: + return a.Ml(); + case 12: + return a.Ol(); + case 14: + return a.Ql(); + case 15: + return a.Tl(); + case 16: + return a.Rl(); + case 17: + return a.Ul(); + case 21: + nde(a); + return wfe(), wfe(), ffe; + case 10: + switch (a.a) { + case 65: + return a.yl(); + case 90: + return a.Dl(); + case 122: + return a.Kl(); + case 98: + return a.El(); + case 66: + return a.zl(); + case 60: + return a.Jl(); + case 62: + return a.Hl(); + } + } + f = pde(a); + b = a.c; + switch (b) { + case 3: + return a.Zl(f); + case 4: + return a.Xl(f); + case 5: + return a.Yl(f); + case 0: + if (a.a == 123 && a.d < a.j) { + e = a.d; + d = 0; + c = -1; + if ((b = bfb(a.i, e++)) >= 48 && b <= 57) { + d = b - 48; + while (e < a.j && (b = bfb(a.i, e++)) >= 48 && b <= 57) { + d = d * 10 + b - 48; + if (d < 0) + throw vbb(new mde(tvd((h0d(), bve)))); + } + } else { + throw vbb(new mde(tvd((h0d(), Zue)))); + } + c = d; + if (b == 44) { + if (e >= a.j) { + throw vbb(new mde(tvd((h0d(), _ue)))); + } else if ((b = bfb(a.i, e++)) >= 48 && b <= 57) { + c = b - 48; + while (e < a.j && (b = bfb(a.i, e++)) >= 48 && b <= 57) { + c = c * 10 + b - 48; + if (c < 0) + throw vbb(new mde(tvd((h0d(), bve)))); + } + if (d > c) + throw vbb(new mde(tvd((h0d(), ave)))); + } else { + c = -1; + } + } + if (b != 125) + throw vbb(new mde(tvd((h0d(), $ue)))); + if (a.sl(e)) { + f = (wfe(), wfe(), new lge(9, f)); + a.d = e + 1; + } else { + f = (wfe(), wfe(), new lge(3, f)); + a.d = e; + } + f.dm(d); + f.cm(c); + nde(a); + } + } + return f; + } + function $bc(a, b, c, d, e) { + var f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F; + p = new Skb(b.b); + u = new Skb(b.b); + m = new Skb(b.b); + B = new Skb(b.b); + q = new Skb(b.b); + for (A = Jsb(b, 0); A.b != A.d.c; ) { + v = BD(Xsb(A), 11); + for (h = new olb(v.g); h.a < h.c.c.length; ) { + f = BD(mlb(h), 17); + if (f.c.i == f.d.i) { + if (v.j == f.d.j) { + B.c[B.c.length] = f; + continue; + } else if (v.j == (Ucd(), Acd) && f.d.j == Rcd) { + q.c[q.c.length] = f; + continue; + } + } + } + } + for (i = new olb(q); i.a < i.c.c.length; ) { + f = BD(mlb(i), 17); + _bc(a, f, c, d, (Ucd(), zcd)); + } + for (g = new olb(B); g.a < g.c.c.length; ) { + f = BD(mlb(g), 17); + C = new b0b(a); + __b(C, (j0b(), i0b)); + yNb(C, (Nyc(), Vxc), (dcd(), $bd)); + yNb(C, (wtc(), $sc), f); + D = new H0b(); + yNb(D, $sc, f.d); + G0b(D, (Ucd(), Tcd)); + F0b(D, C); + F = new H0b(); + yNb(F, $sc, f.c); + G0b(F, zcd); + F0b(F, C); + yNb(f.c, gtc, C); + yNb(f.d, gtc, C); + QZb(f, null); + RZb(f, null); + c.c[c.c.length] = C; + yNb(C, ysc, meb(2)); + } + for (w = Jsb(b, 0); w.b != w.d.c; ) { + v = BD(Xsb(w), 11); + j = v.e.c.length > 0; + r = v.g.c.length > 0; + j && r ? (m.c[m.c.length] = v, true) : j ? (p.c[p.c.length] = v, true) : r && (u.c[u.c.length] = v, true); + } + for (o2 = new olb(p); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + Ekb(e, Zbc(a, n, null, c)); + } + for (t = new olb(u); t.a < t.c.c.length; ) { + s = BD(mlb(t), 11); + Ekb(e, Zbc(a, null, s, c)); + } + for (l = new olb(m); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + Ekb(e, Zbc(a, k, k, c)); + } + } + function NCb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D; + s = new f7c(Pje, Pje); + b = new f7c(Qje, Qje); + for (B = new olb(a); B.a < B.c.c.length; ) { + A = BD(mlb(B), 8); + s.a = $wnd.Math.min(s.a, A.a); + s.b = $wnd.Math.min(s.b, A.b); + b.a = $wnd.Math.max(b.a, A.a); + b.b = $wnd.Math.max(b.b, A.b); + } + m = new f7c(b.a - s.a, b.b - s.b); + j = new f7c(s.a - 50, s.b - m.a - 50); + k = new f7c(s.a - 50, b.b + m.a + 50); + l = new f7c(b.a + m.b / 2 + 50, s.b + m.b / 2); + n = new eDb(j, k, l); + w = new Tqb(); + f = new Rkb(); + c = new Rkb(); + w.a.zc(n, w); + for (D = new olb(a); D.a < D.c.c.length; ) { + C = BD(mlb(D), 8); + f.c = KC(SI, Uhe, 1, 0, 5, 1); + for (v = w.a.ec().Kc(); v.Ob(); ) { + t = BD(v.Pb(), 308); + d = t.d; + S6c(d, t.a); + Jy(S6c(t.d, C), S6c(t.d, t.a)) < 0 && (f.c[f.c.length] = t, true); + } + c.c = KC(SI, Uhe, 1, 0, 5, 1); + for (u = new olb(f); u.a < u.c.c.length; ) { + t = BD(mlb(u), 308); + for (q = new olb(t.e); q.a < q.c.c.length; ) { + o2 = BD(mlb(q), 168); + g = true; + for (i = new olb(f); i.a < i.c.c.length; ) { + h = BD(mlb(i), 308); + h != t && (wtb(o2, Ikb(h.e, 0)) || wtb(o2, Ikb(h.e, 1)) || wtb(o2, Ikb(h.e, 2))) && (g = false); + } + g && (c.c[c.c.length] = o2, true); + } + } + Ve(w, f); + reb(w, new OCb()); + for (p = new olb(c); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 168); + Qqb(w, new eDb(C, o2.a, o2.b)); + } + } + r = new Tqb(); + reb(w, new QCb(r)); + e = r.a.ec().Kc(); + while (e.Ob()) { + o2 = BD(e.Pb(), 168); + (dDb(n, o2.a) || dDb(n, o2.b)) && e.Qb(); + } + reb(r, new SCb()); + return r; + } + function _Tb(a) { + var b, c, d, e, f; + c = BD(vNb(a, (wtc(), Ksc)), 21); + b = k3c(WTb); + e = BD(vNb(a, (Nyc(), axc)), 334); + e == (hbd(), ebd) && d3c(b, XTb); + Ccb(DD(vNb(a, $wc))) ? e3c(b, (qUb(), lUb), (S8b(), I8b)) : e3c(b, (qUb(), nUb), (S8b(), I8b)); + vNb(a, (g6c(), f6c)) != null && d3c(b, YTb); + (Ccb(DD(vNb(a, hxc))) || Ccb(DD(vNb(a, _wc)))) && c3c(b, (qUb(), pUb), (S8b(), W7b)); + switch (BD(vNb(a, Lwc), 103).g) { + case 2: + case 3: + case 4: + c3c(e3c(b, (qUb(), lUb), (S8b(), Y7b)), pUb, X7b); + } + c.Hc((Orc(), Frc)) && c3c(e3c(e3c(b, (qUb(), lUb), (S8b(), V7b)), oUb, T7b), pUb, U7b); + PD(vNb(a, rxc)) !== PD((kAc(), iAc)) && e3c(b, (qUb(), nUb), (S8b(), A8b)); + if (c.Hc(Mrc)) { + e3c(b, (qUb(), lUb), (S8b(), G8b)); + e3c(b, mUb, E8b); + e3c(b, nUb, F8b); + } + PD(vNb(a, swc)) !== PD((yrc(), wrc)) && PD(vNb(a, Swc)) !== PD((Aad(), xad)) && c3c(b, (qUb(), pUb), (S8b(), j8b)); + Ccb(DD(vNb(a, cxc))) && e3c(b, (qUb(), nUb), (S8b(), i8b)); + Ccb(DD(vNb(a, Hwc))) && e3c(b, (qUb(), nUb), (S8b(), O8b)); + if (cUb(a)) { + PD(vNb(a, axc)) === PD(ebd) ? d = BD(vNb(a, Cwc), 292) : d = BD(vNb(a, Dwc), 292); + f = d == (Xrc(), Vrc) ? (S8b(), D8b) : (S8b(), R8b); + e3c(b, (qUb(), oUb), f); + } + switch (BD(vNb(a, Kyc), 377).g) { + case 1: + e3c(b, (qUb(), oUb), (S8b(), P8b)); + break; + case 2: + c3c(e3c(e3c(b, (qUb(), nUb), (S8b(), P7b)), oUb, Q7b), pUb, R7b); + } + PD(vNb(a, ywc)) !== PD((tAc(), rAc)) && e3c(b, (qUb(), nUb), (S8b(), Q8b)); + return b; + } + function mZc(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Kre), "ELK Rectangle Packing"), "Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces."), new pZc()))); + p4c(a, Kre, _le, 1.3); + p4c(a, Kre, Jre, Ksd(VYc)); + p4c(a, Kre, ame, gZc); + p4c(a, Kre, wme, 15); + p4c(a, Kre, lqe, Ksd(SYc)); + p4c(a, Kre, Fme, Ksd(_Yc)); + p4c(a, Kre, Tme, Ksd(aZc)); + p4c(a, Kre, Eme, Ksd(bZc)); + p4c(a, Kre, Gme, Ksd($Yc)); + p4c(a, Kre, Dme, Ksd(cZc)); + p4c(a, Kre, Hme, Ksd(hZc)); + p4c(a, Kre, Bre, Ksd(eZc)); + p4c(a, Kre, Cre, Ksd(ZYc)); + p4c(a, Kre, Fre, Ksd(dZc)); + p4c(a, Kre, Gre, Ksd(iZc)); + p4c(a, Kre, Hre, Ksd(WYc)); + p4c(a, Kre, Ame, Ksd(XYc)); + p4c(a, Kre, xqe, Ksd(YYc)); + p4c(a, Kre, Ere, Ksd(UYc)); + p4c(a, Kre, Dre, Ksd(TYc)); + p4c(a, Kre, Ire, Ksd(kZc)); + } + function Wmd(b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + if (d == null) { + return null; + } + if (b.a != c.Aj()) { + throw vbb(new Wdb(tte + c.ne() + ute)); + } + if (JD(c, 457)) { + r = _Pd(BD(c, 671), d); + if (!r) { + throw vbb(new Wdb(vte + d + "' is not a valid enumerator of '" + c.ne() + "'")); + } + return r; + } + switch (o1d((O6d(), M6d), c).cl()) { + case 2: { + d = Qge(d, false); + break; + } + case 3: { + d = Qge(d, true); + break; + } + } + e = o1d(M6d, c).$k(); + if (e) { + return e.Aj().Nh().Kh(e, d); + } + n = o1d(M6d, c).al(); + if (n) { + r = new Rkb(); + for (k = Zmd(d), l = 0, m = k.length; l < m; ++l) { + j = k[l]; + Ekb(r, n.Aj().Nh().Kh(n, j)); + } + return r; + } + q = o1d(M6d, c).bl(); + if (!q.dc()) { + for (p = q.Kc(); p.Ob(); ) { + o2 = BD(p.Pb(), 148); + try { + r = o2.Aj().Nh().Kh(o2, d); + if (r != null) { + return r; + } + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } + throw vbb(new Wdb(vte + d + "' does not match any member types of the union datatype '" + c.ne() + "'")); + } + BD(c, 834).Fj(); + f = r6d(c.Bj()); + if (!f) + return null; + if (f == yI) { + h = 0; + try { + h = Icb(d, Rie, Ohe) & aje; + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + g = rfb(d); + h = g[0]; + } else + throw vbb(a); + } + return bdb(h); + } + if (f == $J) { + for (i = 0; i < Pmd.length; ++i) { + try { + return DQd(Pmd[i], d); + } catch (a) { + a = ubb(a); + if (!JD(a, 32)) + throw vbb(a); + } + } + throw vbb(new Wdb(vte + d + "' is not a date formatted string of the form yyyy-MM-dd'T'HH:mm:ss'.'SSSZ or a valid subset thereof")); + } + throw vbb(new Wdb(vte + d + "' is invalid. ")); + } + function ngb(a, b) { + var c, d, e, f, g, h, i, j; + c = 0; + g = 0; + f = b.length; + h = null; + j = new Vfb(); + if (g < f && (BCb(g, b.length), b.charCodeAt(g) == 43)) { + ++g; + ++c; + if (g < f && (BCb(g, b.length), b.charCodeAt(g) == 43 || (BCb(g, b.length), b.charCodeAt(g) == 45))) { + throw vbb(new Oeb(Oje + b + '"')); + } + } + while (g < f && (BCb(g, b.length), b.charCodeAt(g) != 46) && (BCb(g, b.length), b.charCodeAt(g) != 101) && (BCb(g, b.length), b.charCodeAt(g) != 69)) { + ++g; + } + j.a += "" + qfb(b == null ? Xhe : (uCb(b), b), c, g); + if (g < f && (BCb(g, b.length), b.charCodeAt(g) == 46)) { + ++g; + c = g; + while (g < f && (BCb(g, b.length), b.charCodeAt(g) != 101) && (BCb(g, b.length), b.charCodeAt(g) != 69)) { + ++g; + } + a.e = g - c; + j.a += "" + qfb(b == null ? Xhe : (uCb(b), b), c, g); + } else { + a.e = 0; + } + if (g < f && (BCb(g, b.length), b.charCodeAt(g) == 101 || (BCb(g, b.length), b.charCodeAt(g) == 69))) { + ++g; + c = g; + if (g < f && (BCb(g, b.length), b.charCodeAt(g) == 43)) { + ++g; + g < f && (BCb(g, b.length), b.charCodeAt(g) != 45) && ++c; + } + h = b.substr(c, f - c); + a.e = a.e - Icb(h, Rie, Ohe); + if (a.e != QD(a.e)) { + throw vbb(new Oeb("Scale out of range.")); + } + } + i = j.a; + if (i.length < 16) { + a.f = (kgb == null && (kgb = new RegExp("^[+-]?\\d*$", "i")), kgb.test(i) ? parseInt(i, 10) : NaN); + if (isNaN(a.f)) { + throw vbb(new Oeb(Oje + b + '"')); + } + a.a = ugb(a.f); + } else { + ogb(a, new Ygb(i)); + } + a.d = j.a.length; + for (e = 0; e < j.a.length; ++e) { + d = bfb(j.a, e); + if (d != 45 && d != 48) { + break; + } + --a.d; + } + a.d == 0 && (a.d = 1); + } + function xXb() { + xXb = ccb; + wXb = new Hp(); + Rc(wXb, (Ucd(), Fcd), Jcd); + Rc(wXb, Qcd, Jcd); + Rc(wXb, Qcd, Mcd); + Rc(wXb, Bcd, Icd); + Rc(wXb, Bcd, Jcd); + Rc(wXb, Gcd, Jcd); + Rc(wXb, Gcd, Kcd); + Rc(wXb, Ocd, Dcd); + Rc(wXb, Ocd, Jcd); + Rc(wXb, Lcd, Ecd); + Rc(wXb, Lcd, Jcd); + Rc(wXb, Lcd, Kcd); + Rc(wXb, Lcd, Dcd); + Rc(wXb, Ecd, Lcd); + Rc(wXb, Ecd, Mcd); + Rc(wXb, Ecd, Icd); + Rc(wXb, Ecd, Jcd); + Rc(wXb, Ncd, Ncd); + Rc(wXb, Ncd, Kcd); + Rc(wXb, Ncd, Mcd); + Rc(wXb, Hcd, Hcd); + Rc(wXb, Hcd, Kcd); + Rc(wXb, Hcd, Icd); + Rc(wXb, Pcd, Pcd); + Rc(wXb, Pcd, Dcd); + Rc(wXb, Pcd, Mcd); + Rc(wXb, Ccd, Ccd); + Rc(wXb, Ccd, Dcd); + Rc(wXb, Ccd, Icd); + Rc(wXb, Kcd, Gcd); + Rc(wXb, Kcd, Lcd); + Rc(wXb, Kcd, Ncd); + Rc(wXb, Kcd, Hcd); + Rc(wXb, Kcd, Jcd); + Rc(wXb, Kcd, Kcd); + Rc(wXb, Kcd, Mcd); + Rc(wXb, Kcd, Icd); + Rc(wXb, Dcd, Ocd); + Rc(wXb, Dcd, Lcd); + Rc(wXb, Dcd, Pcd); + Rc(wXb, Dcd, Ccd); + Rc(wXb, Dcd, Dcd); + Rc(wXb, Dcd, Mcd); + Rc(wXb, Dcd, Icd); + Rc(wXb, Dcd, Jcd); + Rc(wXb, Mcd, Qcd); + Rc(wXb, Mcd, Ecd); + Rc(wXb, Mcd, Ncd); + Rc(wXb, Mcd, Pcd); + Rc(wXb, Mcd, Kcd); + Rc(wXb, Mcd, Dcd); + Rc(wXb, Mcd, Mcd); + Rc(wXb, Mcd, Jcd); + Rc(wXb, Icd, Bcd); + Rc(wXb, Icd, Ecd); + Rc(wXb, Icd, Hcd); + Rc(wXb, Icd, Ccd); + Rc(wXb, Icd, Kcd); + Rc(wXb, Icd, Dcd); + Rc(wXb, Icd, Icd); + Rc(wXb, Icd, Jcd); + Rc(wXb, Jcd, Fcd); + Rc(wXb, Jcd, Qcd); + Rc(wXb, Jcd, Bcd); + Rc(wXb, Jcd, Gcd); + Rc(wXb, Jcd, Ocd); + Rc(wXb, Jcd, Lcd); + Rc(wXb, Jcd, Ecd); + Rc(wXb, Jcd, Kcd); + Rc(wXb, Jcd, Dcd); + Rc(wXb, Jcd, Mcd); + Rc(wXb, Jcd, Icd); + Rc(wXb, Jcd, Jcd); + } + function YXb(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B; + a.d = new f7c(Pje, Pje); + a.c = new f7c(Qje, Qje); + for (m = b.Kc(); m.Ob(); ) { + k = BD(m.Pb(), 37); + for (t = new olb(k.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + a.d.a = $wnd.Math.min(a.d.a, s.n.a - s.d.b); + a.d.b = $wnd.Math.min(a.d.b, s.n.b - s.d.d); + a.c.a = $wnd.Math.max(a.c.a, s.n.a + s.o.a + s.d.c); + a.c.b = $wnd.Math.max(a.c.b, s.n.b + s.o.b + s.d.a); + } + } + h = new nYb(); + for (l = b.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 37); + d = fYb(a, k); + Ekb(h.a, d); + d.a = d.a | !BD(vNb(d.c, (wtc(), Esc)), 21).dc(); + } + a.b = (LUb(), B = new VUb(), B.f = new CUb(c), B.b = BUb(B.f, h), B); + PUb((o2 = a.b, new Zdd(), o2)); + a.e = new d7c(); + a.a = a.b.f.e; + for (g = new olb(h.a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 841); + u = QUb(a.b, e); + g_b(e.c, u.a, u.b); + for (q = new olb(e.c.a); q.a < q.c.c.length; ) { + p = BD(mlb(q), 10); + if (p.k == (j0b(), e0b)) { + r = aYb(a, p.n, BD(vNb(p, (wtc(), Hsc)), 61)); + P6c(X6c(p.n), r); + } + } + } + for (f = new olb(h.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 841); + for (j = new olb(lYb(e)); j.a < j.c.c.length; ) { + i = BD(mlb(j), 17); + A = new t7c(i.a); + St(A, 0, A0b(i.c)); + Dsb(A, A0b(i.d)); + n = null; + for (w = Jsb(A, 0); w.b != w.d.c; ) { + v = BD(Xsb(w), 8); + if (!n) { + n = v; + continue; + } + if (Ky(n.a, v.a)) { + a.e.a = $wnd.Math.min(a.e.a, n.a); + a.a.a = $wnd.Math.max(a.a.a, n.a); + } else if (Ky(n.b, v.b)) { + a.e.b = $wnd.Math.min(a.e.b, n.b); + a.a.b = $wnd.Math.max(a.a.b, n.b); + } + n = v; + } + } + } + V6c(a.e); + P6c(a.a, a.e); + } + function wZd(a) { + Bnd(a.b, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ConsistentTransient"])); + Bnd(a.a, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedSourceURI"])); + Bnd(a.o, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "InterfaceIsAbstract AtMostOneID UniqueFeatureNames UniqueOperationSignatures NoCircularSuperTypes WellFormedMapEntryClass ConsistentSuperTypes DisjointFeatureAndOperationSignatures"])); + Bnd(a.p, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedInstanceTypeName UniqueTypeParameterNames"])); + Bnd(a.v, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "UniqueEnumeratorNames UniqueEnumeratorLiterals"])); + Bnd(a.R, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedName"])); + Bnd(a.T, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "UniqueParameterNames UniqueTypeParameterNames NoRepeatingVoid"])); + Bnd(a.U, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedNsURI WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames UniqueNsURIs"])); + Bnd(a.W, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ConsistentOpposite SingleContainer ConsistentKeys ConsistentUnique ConsistentContainer"])); + Bnd(a.bb, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ValidDefaultValueLiteral"])); + Bnd(a.eb, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ValidLowerBound ValidUpperBound ConsistentBounds ValidType"])); + Bnd(a.H, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ConsistentType ConsistentBounds ConsistentArguments"])); + } + function B4b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C; + if (b.dc()) { + return; + } + e = new s7c(); + h = c ? c : BD(b.Xb(0), 17); + o2 = h.c; + hQc(); + m = o2.i.k; + if (!(m == (j0b(), h0b) || m == i0b || m == e0b || m == d0b)) { + throw vbb(new Wdb("The target node of the edge must be a normal node or a northSouthPort.")); + } + Fsb(e, l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a]))); + if ((Ucd(), Lcd).Hc(o2.j)) { + q = Edb(ED(vNb(o2, (wtc(), qtc)))); + l = new f7c(l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).a, q); + Gsb(e, l, e.c.b, e.c); + } + k = null; + d = false; + i = b.Kc(); + while (i.Ob()) { + g = BD(i.Pb(), 17); + f = g.a; + if (f.b != 0) { + if (d) { + j = Y6c(P6c(k, (sCb(f.b != 0), BD(f.a.a.c, 8))), 0.5); + Gsb(e, j, e.c.b, e.c); + d = false; + } else { + d = true; + } + k = R6c((sCb(f.b != 0), BD(f.c.b.c, 8))); + ye(e, f); + Osb(f); + } + } + p = h.d; + if (Lcd.Hc(p.j)) { + q = Edb(ED(vNb(p, (wtc(), qtc)))); + l = new f7c(l7c(OC(GC(m1, 1), nie, 8, 0, [p.i.n, p.n, p.a])).a, q); + Gsb(e, l, e.c.b, e.c); + } + Fsb(e, l7c(OC(GC(m1, 1), nie, 8, 0, [p.i.n, p.n, p.a]))); + a.d == (tBc(), qBc) && (r = (sCb(e.b != 0), BD(e.a.a.c, 8)), s = BD(Ut(e, 1), 8), t = new e7c(bRc(o2.j)), t.a *= 5, t.b *= 5, u = c7c(new f7c(s.a, s.b), r), v = new f7c(A4b(t.a, u.a), A4b(t.b, u.b)), P6c(v, r), w = Jsb(e, 1), Vsb(w, v), A = (sCb(e.b != 0), BD(e.c.b.c, 8)), B = BD(Ut(e, e.b - 2), 8), t = new e7c(bRc(p.j)), t.a *= 5, t.b *= 5, u = c7c(new f7c(B.a, B.b), A), C = new f7c(A4b(t.a, u.a), A4b(t.b, u.b)), P6c(C, A), St(e, e.b - 1, C), void 0); + n = new YPc(e); + ye(h.a, UPc(n)); + } + function Kgd(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I, J, K, L, M, N, O, P; + t = BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82); + v = t.Dg(); + w = t.Eg(); + u = t.Cg() / 2; + p = t.Bg() / 2; + if (JD(t, 186)) { + s = BD(t, 118); + v += mpd(s).i; + v += mpd(s).i; + } + v += u; + w += p; + F = BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82); + H = F.Dg(); + I = F.Eg(); + G = F.Cg() / 2; + A = F.Bg() / 2; + if (JD(F, 186)) { + D = BD(F, 118); + H += mpd(D).i; + H += mpd(D).i; + } + H += G; + I += A; + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i == 0) { + h = (Fhd(), j = new rmd(), j); + wtd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), h); + } else if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i > 1) { + o2 = new Oyd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a)); + while (o2.e != o2.i.gc()) { + Eyd(o2); + } + } + g = BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202); + q = H; + H > v + u ? q = v + u : H < v - u && (q = v - u); + r = I; + I > w + p ? r = w + p : I < w - p && (r = w - p); + q > v - u && q < v + u && r > w - p && r < w + p && (q = v + u); + omd(g, q); + pmd(g, r); + B = v; + v > H + G ? B = H + G : v < H - G && (B = H - G); + C = w; + w > I + A ? C = I + A : w < I - A && (C = I - A); + B > H - G && B < H + G && C > I - A && C < I + A && (C = I + A); + hmd(g, B); + imd(g, C); + Uxd((!g.a && (g.a = new xMd(y2, g, 5)), g.a)); + f = Bub(b, 5); + t == F && ++f; + L = B - q; + O = C - r; + J = $wnd.Math.sqrt(L * L + O * O); + l = J * 0.20000000298023224; + M = L / (f + 1); + P = O / (f + 1); + K = q; + N = r; + for (k = 0; k < f; k++) { + K += M; + N += P; + m = K + Cub(b, 24) * lke * l - l / 2; + m < 0 ? m = 1 : m > c && (m = c - 1); + n = N + Cub(b, 24) * lke * l - l / 2; + n < 0 ? n = 1 : n > d && (n = d - 1); + e = (Fhd(), i = new xkd(), i); + vkd(e, m); + wkd(e, n); + wtd((!g.a && (g.a = new xMd(y2, g, 5)), g.a), e); + } + } + function Nyc() { + Nyc = ccb; + iyc = (Y9c(), I9c); + jyc = J9c; + kyc = K9c; + lyc = L9c; + nyc = M9c; + oyc = N9c; + ryc = P9c; + tyc = R9c; + uyc = S9c; + syc = Q9c; + vyc = T9c; + xyc = U9c; + zyc = X9c; + qyc = O9c; + hyc = (jwc(), Bvc); + myc = Cvc; + pyc = Dvc; + wyc = Evc; + byc = new Osd(D9c, meb(0)); + cyc = yvc; + dyc = zvc; + eyc = Avc; + Kyc = awc; + Cyc = Hvc; + Dyc = Kvc; + Gyc = Svc; + Eyc = Nvc; + Fyc = Pvc; + Myc = fwc; + Lyc = cwc; + Iyc = Yvc; + Hyc = Wvc; + Jyc = $vc; + Cxc = pvc; + Dxc = qvc; + Xwc = Auc; + Ywc = Duc; + Lxc = new q0b(12); + Kxc = new Osd(f9c, Lxc); + Twc = (Aad(), wad); + Swc = new Osd(E8c, Twc); + Uxc = new Osd(s9c, 0); + fyc = new Osd(E9c, meb(1)); + owc = new Osd(r8c, tme); + Jxc = d9c; + Vxc = t9c; + $xc = A9c; + Kwc = y8c; + mwc = p8c; + axc = J8c; + gyc = new Osd(H9c, (Bcb(), true)); + fxc = M8c; + gxc = N8c; + Fxc = Y8c; + Ixc = b9c; + Gxc = $8c; + Nwc = (ead(), cad); + Lwc = new Osd(z8c, Nwc); + xxc = W8c; + wxc = U8c; + Yxc = x9c; + Xxc = w9c; + Zxc = z9c; + Oxc = (Tbd(), Sbd); + new Osd(l9c, Oxc); + Qxc = o9c; + Rxc = p9c; + Sxc = q9c; + Pxc = n9c; + Byc = Gvc; + sxc = avc; + rxc = $uc; + Ayc = Fvc; + mxc = Suc; + Jwc = muc; + Iwc = kuc; + Awc = Xtc; + Bwc = Ytc; + Dwc = buc; + Cwc = Ztc; + Hwc = iuc; + uxc = cvc; + vxc = dvc; + ixc = Luc; + Exc = uvc; + zxc = hvc; + $wc = Guc; + Bxc = nvc; + Vwc = wuc; + Wwc = yuc; + zwc = w8c; + yxc = evc; + swc = Mtc; + rwc = Ktc; + qwc = Jtc; + cxc = Juc; + bxc = Iuc; + dxc = Kuc; + Hxc = _8c; + jxc = Q8c; + Zwc = G8c; + Qwc = C8c; + Pwc = B8c; + Ewc = euc; + Wxc = v9c; + pwc = v8c; + exc = L8c; + Txc = r9c; + Mxc = h9c; + Nxc = j9c; + oxc = Vuc; + pxc = Xuc; + ayc = C9c; + nwc = Itc; + qxc = Zuc; + Rwc = suc; + Owc = quc; + txc = S8c; + kxc = Puc; + Axc = kvc; + yyc = V9c; + Mwc = ouc; + _xc = wvc; + Uwc = uuc; + lxc = Ruc; + Fwc = guc; + hxc = P8c; + nxc = Uuc; + Gwc = huc; + ywc = Vtc; + wwc = Stc; + uwc = Qtc; + vwc = Rtc; + xwc = Utc; + twc = Otc; + _wc = Huc; + } + function shb(a, b) { + phb(); + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H; + B = a.e; + o2 = a.d; + e = a.a; + if (B == 0) { + switch (b) { + case 0: + return "0"; + case 1: + return $je; + case 2: + return "0.00"; + case 3: + return "0.000"; + case 4: + return "0.0000"; + case 5: + return "0.00000"; + case 6: + return "0.000000"; + default: + w = new Ufb(); + b < 0 ? (w.a += "0E+", w) : (w.a += "0E", w); + w.a += -b; + return w.a; + } + } + t = o2 * 10 + 1 + 7; + u = KC(TD, $ie, 25, t + 1, 15, 1); + c = t; + if (o2 == 1) { + h = e[0]; + if (h < 0) { + H = xbb(h, Yje); + do { + p = H; + H = Abb(H, 10); + u[--c] = 48 + Tbb(Qbb(p, Ibb(H, 10))) & aje; + } while (ybb(H, 0) != 0); + } else { + H = h; + do { + p = H; + H = H / 10 | 0; + u[--c] = 48 + (p - H * 10) & aje; + } while (H != 0); + } + } else { + D = KC(WD, oje, 25, o2, 15, 1); + G = o2; + $fb(e, 0, D, 0, G); + I: + while (true) { + A = 0; + for (j = G - 1; j >= 0; j--) { + F = wbb(Nbb(A, 32), xbb(D[j], Yje)); + r = qhb(F); + D[j] = Tbb(r); + A = Tbb(Obb(r, 32)); + } + s = Tbb(A); + q = c; + do { + u[--c] = 48 + s % 10 & aje; + } while ((s = s / 10 | 0) != 0 && c != 0); + d = 9 - q + c; + for (i = 0; i < d && c > 0; i++) { + u[--c] = 48; + } + l = G - 1; + for (; D[l] == 0; l--) { + if (l == 0) { + break I; + } + } + G = l + 1; + } + while (u[c] == 48) { + ++c; + } + } + n = B < 0; + g = t - c - b - 1; + if (b == 0) { + n && (u[--c] = 45); + return zfb(u, c, t - c); + } + if (b > 0 && g >= -6) { + if (g >= 0) { + k = c + g; + for (m = t - 1; m >= k; m--) { + u[m + 1] = u[m]; + } + u[++k] = 46; + n && (u[--c] = 45); + return zfb(u, c, t - c + 1); + } + for (l = 2; l < -g + 1; l++) { + u[--c] = 48; + } + u[--c] = 46; + u[--c] = 48; + n && (u[--c] = 45); + return zfb(u, c, t - c); + } + C = c + 1; + f = t; + v = new Vfb(); + n && (v.a += "-", v); + if (f - C >= 1) { + Kfb(v, u[c]); + v.a += "."; + v.a += zfb(u, c + 1, t - c - 1); + } else { + v.a += zfb(u, c, t - c); + } + v.a += "E"; + g > 0 && (v.a += "+", v); + v.a += "" + g; + return v.a; + } + function z$c(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + a.c = b; + a.g = new Lqb(); + c = (Pgd(), new bhd(a.c)); + d = new YGb(c); + UGb(d); + t = GD(hkd(a.c, (d0c(), Y_c))); + i = BD(hkd(a.c, $_c), 316); + v = BD(hkd(a.c, __c), 429); + g = BD(hkd(a.c, T_c), 482); + u = BD(hkd(a.c, Z_c), 430); + a.j = Edb(ED(hkd(a.c, a0c))); + h = a.a; + switch (i.g) { + case 0: + h = a.a; + break; + case 1: + h = a.b; + break; + case 2: + h = a.i; + break; + case 3: + h = a.e; + break; + case 4: + h = a.f; + break; + default: + throw vbb(new Wdb(Mre + (i.f != null ? i.f : "" + i.g))); + } + a.d = new g_c(h, v, g); + yNb(a.d, (XNb(), VNb), DD(hkd(a.c, V_c))); + a.d.c = Ccb(DD(hkd(a.c, U_c))); + if (Vod(a.c).i == 0) { + return a.d; + } + for (l = new Fyd(Vod(a.c)); l.e != l.i.gc(); ) { + k = BD(Dyd(l), 33); + n = k.g / 2; + m = k.f / 2; + w = new f7c(k.i + n, k.j + m); + while (Mhb(a.g, w)) { + O6c(w, ($wnd.Math.random() - 0.5) * qme, ($wnd.Math.random() - 0.5) * qme); + } + p = BD(hkd(k, (Y9c(), S8c)), 142); + q = new aOb(w, new J6c(w.a - n - a.j / 2 - p.b, w.b - m - a.j / 2 - p.d, k.g + a.j + (p.b + p.c), k.f + a.j + (p.d + p.a))); + Ekb(a.d.i, q); + Rhb(a.g, w, new vgd(q, k)); + } + switch (u.g) { + case 0: + if (t == null) { + a.d.d = BD(Ikb(a.d.i, 0), 65); + } else { + for (s = new olb(a.d.i); s.a < s.c.c.length; ) { + q = BD(mlb(s), 65); + o2 = BD(BD(Ohb(a.g, q.a), 46).b, 33).zg(); + o2 != null && dfb(o2, t) && (a.d.d = q); + } + } + break; + case 1: + e = new f7c(a.c.g, a.c.f); + e.a *= 0.5; + e.b *= 0.5; + O6c(e, a.c.i, a.c.j); + f = Pje; + for (r = new olb(a.d.i); r.a < r.c.c.length; ) { + q = BD(mlb(r), 65); + j = S6c(q.a, e); + if (j < f) { + f = j; + a.d.d = q; + } + } + break; + default: + throw vbb(new Wdb(Mre + (u.f != null ? u.f : "" + u.g))); + } + return a.d; + } + function qfd(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + v = BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202); + k = new s7c(); + u = new Lqb(); + w = tfd(v); + jrb(u.f, v, w); + m = new Lqb(); + d = new Psb(); + for (o2 = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!b.d && (b.d = new y5d(B2, b, 8, 5)), b.d), (!b.e && (b.e = new y5d(B2, b, 7, 4)), b.e)]))); Qr(o2); ) { + n = BD(Rr(o2), 79); + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i != 1) { + throw vbb(new Wdb(Tse + (!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i)); + } + if (n != a) { + q = BD(qud((!n.a && (n.a = new cUd(A2, n, 6, 6)), n.a), 0), 202); + Gsb(d, q, d.c.b, d.c); + p = BD(Wd(irb(u.f, q)), 12); + if (!p) { + p = tfd(q); + jrb(u.f, q, p); + } + l = c ? c7c(new g7c(BD(Ikb(w, w.c.length - 1), 8)), BD(Ikb(p, p.c.length - 1), 8)) : c7c(new g7c((tCb(0, w.c.length), BD(w.c[0], 8))), (tCb(0, p.c.length), BD(p.c[0], 8))); + jrb(m.f, q, l); + } + } + if (d.b != 0) { + r = BD(Ikb(w, c ? w.c.length - 1 : 0), 8); + for (j = 1; j < w.c.length; j++) { + s = BD(Ikb(w, c ? w.c.length - 1 - j : j), 8); + e = Jsb(d, 0); + while (e.b != e.d.c) { + q = BD(Xsb(e), 202); + p = BD(Wd(irb(u.f, q)), 12); + if (p.c.length <= j) { + Zsb(e); + } else { + t = P6c(new g7c(BD(Ikb(p, c ? p.c.length - 1 - j : j), 8)), BD(Wd(irb(m.f, q)), 8)); + if (s.a != t.a || s.b != t.b) { + f = s.a - r.a; + h = s.b - r.b; + g = t.a - r.a; + i = t.b - r.b; + g * h == i * f && (f == 0 || isNaN(f) ? f : f < 0 ? -1 : 1) == (g == 0 || isNaN(g) ? g : g < 0 ? -1 : 1) && (h == 0 || isNaN(h) ? h : h < 0 ? -1 : 1) == (i == 0 || isNaN(i) ? i : i < 0 ? -1 : 1) ? ($wnd.Math.abs(f) < $wnd.Math.abs(g) || $wnd.Math.abs(h) < $wnd.Math.abs(i)) && (Gsb(k, s, k.c.b, k.c), true) : j > 1 && (Gsb(k, r, k.c.b, k.c), true); + Zsb(e); + } + } + } + r = s; + } + } + return k; + } + function $Bc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I, J, K, L; + Odd(c, "Greedy cycle removal", 1); + t = b.a; + L = t.c.length; + a.a = KC(WD, oje, 25, L, 15, 1); + a.c = KC(WD, oje, 25, L, 15, 1); + a.b = KC(WD, oje, 25, L, 15, 1); + j = 0; + for (r = new olb(t); r.a < r.c.c.length; ) { + p = BD(mlb(r), 10); + p.p = j; + for (C = new olb(p.j); C.a < C.c.c.length; ) { + w = BD(mlb(C), 11); + for (h = new olb(w.e); h.a < h.c.c.length; ) { + d = BD(mlb(h), 17); + if (d.c.i == p) { + continue; + } + G = BD(vNb(d, (Nyc(), cyc)), 19).a; + a.a[j] += G > 0 ? G + 1 : 1; + } + for (g = new olb(w.g); g.a < g.c.c.length; ) { + d = BD(mlb(g), 17); + if (d.d.i == p) { + continue; + } + G = BD(vNb(d, (Nyc(), cyc)), 19).a; + a.c[j] += G > 0 ? G + 1 : 1; + } + } + a.c[j] == 0 ? Dsb(a.e, p) : a.a[j] == 0 && Dsb(a.f, p); + ++j; + } + o2 = -1; + n = 1; + l = new Rkb(); + a.d = BD(vNb(b, (wtc(), jtc)), 230); + while (L > 0) { + while (a.e.b != 0) { + I = BD(Lsb(a.e), 10); + a.b[I.p] = o2--; + _Bc(a, I); + --L; + } + while (a.f.b != 0) { + J = BD(Lsb(a.f), 10); + a.b[J.p] = n++; + _Bc(a, J); + --L; + } + if (L > 0) { + m = Rie; + for (s = new olb(t); s.a < s.c.c.length; ) { + p = BD(mlb(s), 10); + if (a.b[p.p] == 0) { + u = a.c[p.p] - a.a[p.p]; + if (u >= m) { + if (u > m) { + l.c = KC(SI, Uhe, 1, 0, 5, 1); + m = u; + } + l.c[l.c.length] = p; + } + } + } + k = a.Zf(l); + a.b[k.p] = n++; + _Bc(a, k); + --L; + } + } + H = t.c.length + 1; + for (j = 0; j < t.c.length; j++) { + a.b[j] < 0 && (a.b[j] += H); + } + for (q = new olb(t); q.a < q.c.c.length; ) { + p = BD(mlb(q), 10); + F = m_b(p.j); + for (A = F, B = 0, D = A.length; B < D; ++B) { + w = A[B]; + v = k_b(w.g); + for (e = v, f = 0, i = e.length; f < i; ++f) { + d = e[f]; + K = d.d.i.p; + if (a.b[p.p] > a.b[K]) { + PZb(d, true); + yNb(b, Asc, (Bcb(), true)); + } + } + } + } + a.a = null; + a.c = null; + a.b = null; + Osb(a.f); + Osb(a.e); + Qdd(c); + } + function sQb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + d = new Rkb(); + h = new Rkb(); + q = b / 2; + n = a.gc(); + e = BD(a.Xb(0), 8); + r = BD(a.Xb(1), 8); + o2 = tQb(e.a, e.b, r.a, r.b, q); + Ekb(d, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + Ekb(h, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + for (j = 2; j < n; j++) { + p = e; + e = r; + r = BD(a.Xb(j), 8); + o2 = tQb(e.a, e.b, p.a, p.b, q); + Ekb(d, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + Ekb(h, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + o2 = tQb(e.a, e.b, r.a, r.b, q); + Ekb(d, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + Ekb(h, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + } + o2 = tQb(r.a, r.b, e.a, e.b, q); + Ekb(d, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + Ekb(h, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + c = new s7c(); + g = new Rkb(); + Dsb(c, (tCb(0, d.c.length), BD(d.c[0], 8))); + for (k = 1; k < d.c.length - 2; k += 2) { + f = (tCb(k, d.c.length), BD(d.c[k], 8)); + m = rQb((tCb(k - 1, d.c.length), BD(d.c[k - 1], 8)), f, (tCb(k + 1, d.c.length), BD(d.c[k + 1], 8)), (tCb(k + 2, d.c.length), BD(d.c[k + 2], 8))); + !isFinite(m.a) || !isFinite(m.b) ? (Gsb(c, f, c.c.b, c.c), true) : (Gsb(c, m, c.c.b, c.c), true); + } + Dsb(c, BD(Ikb(d, d.c.length - 1), 8)); + Ekb(g, (tCb(0, h.c.length), BD(h.c[0], 8))); + for (l = 1; l < h.c.length - 2; l += 2) { + f = (tCb(l, h.c.length), BD(h.c[l], 8)); + m = rQb((tCb(l - 1, h.c.length), BD(h.c[l - 1], 8)), f, (tCb(l + 1, h.c.length), BD(h.c[l + 1], 8)), (tCb(l + 2, h.c.length), BD(h.c[l + 2], 8))); + !isFinite(m.a) || !isFinite(m.b) ? (g.c[g.c.length] = f, true) : (g.c[g.c.length] = m, true); + } + Ekb(g, BD(Ikb(h, h.c.length - 1), 8)); + for (i = g.c.length - 1; i >= 0; i--) { + Dsb(c, (tCb(i, g.c.length), BD(g.c[i], 8))); + } + return c; + } + function aFd(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n; + g = true; + l = null; + d = null; + e = null; + b = false; + n = BEd; + j = null; + f = null; + h = 0; + i = UEd(a, h, zEd, AEd); + if (i < a.length && (BCb(i, a.length), a.charCodeAt(i) == 58)) { + l = a.substr(h, i - h); + h = i + 1; + } + c = l != null && hnb(GEd, l.toLowerCase()); + if (c) { + i = a.lastIndexOf("!/"); + if (i == -1) { + throw vbb(new Wdb("no archive separator")); + } + g = true; + d = qfb(a, h, ++i); + h = i; + } else if (h >= 0 && dfb(a.substr(h, "//".length), "//")) { + h += 2; + i = UEd(a, h, CEd, DEd); + d = a.substr(h, i - h); + h = i; + } else if (l != null && (h == a.length || (BCb(h, a.length), a.charCodeAt(h) != 47))) { + g = false; + i = ifb(a, wfb(35), h); + i == -1 && (i = a.length); + d = a.substr(h, i - h); + h = i; + } + if (!c && h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 47)) { + i = UEd(a, h + 1, CEd, DEd); + k = a.substr(h + 1, i - (h + 1)); + if (k.length > 0 && bfb(k, k.length - 1) == 58) { + e = k; + h = i; + } + } + if (h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 47)) { + ++h; + b = true; + } + if (h < a.length && (BCb(h, a.length), a.charCodeAt(h) != 63) && (BCb(h, a.length), a.charCodeAt(h) != 35)) { + m = new Rkb(); + while (h < a.length && (BCb(h, a.length), a.charCodeAt(h) != 63) && (BCb(h, a.length), a.charCodeAt(h) != 35)) { + i = UEd(a, h, CEd, DEd); + Ekb(m, a.substr(h, i - h)); + h = i; + h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 47) && (bFd(a, ++h) || (m.c[m.c.length] = "", true)); + } + n = KC(ZI, nie, 2, m.c.length, 6, 1); + Qkb(m, n); + } + if (h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 63)) { + i = gfb(a, 35, ++h); + i == -1 && (i = a.length); + j = a.substr(h, i - h); + h = i; + } + h < a.length && (f = pfb(a, ++h)); + iFd(g, l, d, e, n, j); + return new NEd(g, l, d, e, b, n, j, f); + } + function sJc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I, J, K; + I = new Rkb(); + for (o2 = new olb(b.b); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 29); + for (v = new olb(m.a); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + u.p = -1; + l = Rie; + B = Rie; + for (D = new olb(u.j); D.a < D.c.c.length; ) { + C = BD(mlb(D), 11); + for (e = new olb(C.e); e.a < e.c.c.length; ) { + c = BD(mlb(e), 17); + F = BD(vNb(c, (Nyc(), eyc)), 19).a; + l = $wnd.Math.max(l, F); + } + for (d = new olb(C.g); d.a < d.c.c.length; ) { + c = BD(mlb(d), 17); + F = BD(vNb(c, (Nyc(), eyc)), 19).a; + B = $wnd.Math.max(B, F); + } + } + yNb(u, hJc, meb(l)); + yNb(u, iJc, meb(B)); + } + } + r = 0; + for (n = new olb(b.b); n.a < n.c.c.length; ) { + m = BD(mlb(n), 29); + for (v = new olb(m.a); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + if (u.p < 0) { + H = new zJc(); + H.b = r++; + oJc(a, u, H); + I.c[I.c.length] = H; + } + } + } + A = Pu(I.c.length); + k = Pu(I.c.length); + for (g = 0; g < I.c.length; g++) { + Ekb(A, new Rkb()); + Ekb(k, meb(0)); + } + mJc(b, I, A, k); + J = BD(Qkb(I, KC(sY, Iqe, 257, I.c.length, 0, 1)), 840); + w = BD(Qkb(A, KC(yK, eme, 15, A.c.length, 0, 1)), 192); + j = KC(WD, oje, 25, k.c.length, 15, 1); + for (h = 0; h < j.length; h++) { + j[h] = (tCb(h, k.c.length), BD(k.c[h], 19)).a; + } + s = 0; + t = new Rkb(); + for (i = 0; i < J.length; i++) { + j[i] == 0 && Ekb(t, J[i]); + } + q = KC(WD, oje, 25, J.length, 15, 1); + while (t.c.length != 0) { + H = BD(Kkb(t, 0), 257); + q[H.b] = s++; + while (!w[H.b].dc()) { + K = BD(w[H.b].$c(0), 257); + --j[K.b]; + j[K.b] == 0 && (t.c[t.c.length] = K, true); + } + } + a.a = KC(sY, Iqe, 257, J.length, 0, 1); + for (f = 0; f < J.length; f++) { + p = J[f]; + G = q[f]; + a.a[G] = p; + p.b = G; + for (v = new olb(p.e); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + u.p = G; + } + } + return a.a; + } + function nde(a) { + var b, c, d; + if (a.d >= a.j) { + a.a = -1; + a.c = 1; + return; + } + b = bfb(a.i, a.d++); + a.a = b; + if (a.b == 1) { + switch (b) { + case 92: + d = 10; + if (a.d >= a.j) + throw vbb(new mde(tvd((h0d(), uue)))); + a.a = bfb(a.i, a.d++); + break; + case 45: + if ((a.e & 512) == 512 && a.d < a.j && bfb(a.i, a.d) == 91) { + ++a.d; + d = 24; + } else + d = 0; + break; + case 91: + if ((a.e & 512) != 512 && a.d < a.j && bfb(a.i, a.d) == 58) { + ++a.d; + d = 20; + break; + } + default: + if ((b & 64512) == Uje && a.d < a.j) { + c = bfb(a.i, a.d); + if ((c & 64512) == 56320) { + a.a = Tje + (b - Uje << 10) + c - 56320; + ++a.d; + } + } + d = 0; + } + a.c = d; + return; + } + switch (b) { + case 124: + d = 2; + break; + case 42: + d = 3; + break; + case 43: + d = 4; + break; + case 63: + d = 5; + break; + case 41: + d = 7; + break; + case 46: + d = 8; + break; + case 91: + d = 9; + break; + case 94: + d = 11; + break; + case 36: + d = 12; + break; + case 40: + d = 6; + if (a.d >= a.j) + break; + if (bfb(a.i, a.d) != 63) + break; + if (++a.d >= a.j) + throw vbb(new mde(tvd((h0d(), vue)))); + b = bfb(a.i, a.d++); + switch (b) { + case 58: + d = 13; + break; + case 61: + d = 14; + break; + case 33: + d = 15; + break; + case 91: + d = 19; + break; + case 62: + d = 18; + break; + case 60: + if (a.d >= a.j) + throw vbb(new mde(tvd((h0d(), vue)))); + b = bfb(a.i, a.d++); + if (b == 61) { + d = 16; + } else if (b == 33) { + d = 17; + } else + throw vbb(new mde(tvd((h0d(), wue)))); + break; + case 35: + while (a.d < a.j) { + b = bfb(a.i, a.d++); + if (b == 41) + break; + } + if (b != 41) + throw vbb(new mde(tvd((h0d(), xue)))); + d = 21; + break; + default: + if (b == 45 || 97 <= b && b <= 122 || 65 <= b && b <= 90) { + --a.d; + d = 22; + break; + } else if (b == 40) { + d = 23; + break; + } + throw vbb(new mde(tvd((h0d(), vue)))); + } + break; + case 92: + d = 10; + if (a.d >= a.j) + throw vbb(new mde(tvd((h0d(), uue)))); + a.a = bfb(a.i, a.d++); + break; + default: + d = 0; + } + a.c = d; + } + function P5b(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G; + A = BD(vNb(a, (Nyc(), Vxc)), 98); + if (!(A != (dcd(), bcd) && A != ccd)) { + return; + } + o2 = a.b; + n = o2.c.length; + k = new Skb((Xj(n + 2, Mie), Oy(wbb(wbb(5, n + 2), (n + 2) / 10 | 0)))); + p = new Skb((Xj(n + 2, Mie), Oy(wbb(wbb(5, n + 2), (n + 2) / 10 | 0)))); + Ekb(k, new Lqb()); + Ekb(k, new Lqb()); + Ekb(p, new Rkb()); + Ekb(p, new Rkb()); + w = new Rkb(); + for (b = 0; b < n; b++) { + c = (tCb(b, o2.c.length), BD(o2.c[b], 29)); + B = (tCb(b, k.c.length), BD(k.c[b], 83)); + q = new Lqb(); + k.c[k.c.length] = q; + D = (tCb(b, p.c.length), BD(p.c[b], 15)); + s = new Rkb(); + p.c[p.c.length] = s; + for (e = new olb(c.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + if (L5b(d)) { + w.c[w.c.length] = d; + continue; + } + for (j = new Sr(ur(R_b(d).a.Kc(), new Sq())); Qr(j); ) { + h = BD(Rr(j), 17); + F = h.c.i; + if (!L5b(F)) { + continue; + } + C = BD(B.xc(vNb(F, (wtc(), $sc))), 10); + if (!C) { + C = K5b(a, F); + B.zc(vNb(F, $sc), C); + D.Fc(C); + } + QZb(h, BD(Ikb(C.j, 1), 11)); + } + for (i = new Sr(ur(U_b(d).a.Kc(), new Sq())); Qr(i); ) { + h = BD(Rr(i), 17); + G = h.d.i; + if (!L5b(G)) { + continue; + } + r = BD(Ohb(q, vNb(G, (wtc(), $sc))), 10); + if (!r) { + r = K5b(a, G); + Rhb(q, vNb(G, $sc), r); + s.c[s.c.length] = r; + } + RZb(h, BD(Ikb(r.j, 0), 11)); + } + } + } + for (l = 0; l < p.c.length; l++) { + t = (tCb(l, p.c.length), BD(p.c[l], 15)); + if (t.dc()) { + continue; + } + m = null; + if (l == 0) { + m = new H1b(a); + wCb(0, o2.c.length); + aCb(o2.c, 0, m); + } else if (l == k.c.length - 1) { + m = new H1b(a); + o2.c[o2.c.length] = m; + } else { + m = (tCb(l - 1, o2.c.length), BD(o2.c[l - 1], 29)); + } + for (g = t.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 10); + $_b(f, m); + } + } + for (v = new olb(w); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + $_b(u, null); + } + yNb(a, (wtc(), Fsc), w); + } + function BCc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v; + Odd(c, "Coffman-Graham Layering", 1); + if (b.a.c.length == 0) { + Qdd(c); + return; + } + v = BD(vNb(b, (Nyc(), kxc)), 19).a; + i = 0; + g = 0; + for (m = new olb(b.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + l.p = i++; + for (f = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + e.p = g++; + } + } + a.d = KC(sbb, dle, 25, i, 16, 1); + a.a = KC(sbb, dle, 25, g, 16, 1); + a.b = KC(WD, oje, 25, i, 15, 1); + a.e = KC(WD, oje, 25, i, 15, 1); + a.f = KC(WD, oje, 25, i, 15, 1); + Nc(a.c); + CCc(a, b); + o2 = new gub(new GCc(a)); + for (u = new olb(b.a); u.a < u.c.c.length; ) { + s = BD(mlb(u), 10); + for (f = new Sr(ur(R_b(s).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + a.a[e.p] || ++a.b[s.p]; + } + a.b[s.p] == 0 && (zCb(cub(o2, s)), true); + } + h = 0; + while (o2.b.c.length != 0) { + s = BD(dub(o2), 10); + a.f[s.p] = h++; + for (f = new Sr(ur(U_b(s).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + if (a.a[e.p]) { + continue; + } + q = e.d.i; + --a.b[q.p]; + Rc(a.c, q, meb(a.f[s.p])); + a.b[q.p] == 0 && (zCb(cub(o2, q)), true); + } + } + n = new gub(new KCc(a)); + for (t = new olb(b.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + for (f = new Sr(ur(U_b(s).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + a.a[e.p] || ++a.e[s.p]; + } + a.e[s.p] == 0 && (zCb(cub(n, s)), true); + } + k = new Rkb(); + d = yCc(b, k); + while (n.b.c.length != 0) { + r = BD(dub(n), 10); + (d.a.c.length >= v || !wCc(r, d)) && (d = yCc(b, k)); + $_b(r, d); + for (f = new Sr(ur(R_b(r).a.Kc(), new Sq())); Qr(f); ) { + e = BD(Rr(f), 17); + if (a.a[e.p]) { + continue; + } + p = e.c.i; + --a.e[p.p]; + a.e[p.p] == 0 && (zCb(cub(n, p)), true); + } + } + for (j = k.c.length - 1; j >= 0; --j) { + Ekb(b.b, (tCb(j, k.c.length), BD(k.c[j], 29))); + } + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c); + } + function gee(a) { + var b, c, d, e, f, g, h, i, j; + a.b = 1; + nde(a); + b = null; + if (a.c == 0 && a.a == 94) { + nde(a); + b = (wfe(), wfe(), new $fe(4)); + Ufe(b, 0, lxe); + h = new $fe(4); + } else { + h = (wfe(), wfe(), new $fe(4)); + } + e = true; + while ((j = a.c) != 1) { + if (j == 0 && a.a == 93 && !e) { + if (b) { + Zfe(b, h); + h = b; + } + break; + } + c = a.a; + d = false; + if (j == 10) { + switch (c) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + Xfe(h, fee(c)); + d = true; + break; + case 105: + case 73: + case 99: + case 67: + c = (Xfe(h, fee(c)), -1); + c < 0 && (d = true); + break; + case 112: + case 80: + i = tde(a, c); + if (!i) + throw vbb(new mde(tvd((h0d(), Iue)))); + Xfe(h, i); + d = true; + break; + default: + c = eee(a); + } + } else if (j == 24 && !e) { + if (b) { + Zfe(b, h); + h = b; + } + f = gee(a); + Zfe(h, f); + if (a.c != 0 || a.a != 93) + throw vbb(new mde(tvd((h0d(), Mue)))); + break; + } + nde(a); + if (!d) { + if (j == 0) { + if (c == 91) + throw vbb(new mde(tvd((h0d(), Nue)))); + if (c == 93) + throw vbb(new mde(tvd((h0d(), Oue)))); + if (c == 45 && !e && a.a != 93) + throw vbb(new mde(tvd((h0d(), Pue)))); + } + if (a.c != 0 || a.a != 45 || c == 45 && e) { + Ufe(h, c, c); + } else { + nde(a); + if ((j = a.c) == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + if (j == 0 && a.a == 93) { + Ufe(h, c, c); + Ufe(h, 45, 45); + } else if (j == 0 && a.a == 93 || j == 24) { + throw vbb(new mde(tvd((h0d(), Pue)))); + } else { + g = a.a; + if (j == 0) { + if (g == 91) + throw vbb(new mde(tvd((h0d(), Nue)))); + if (g == 93) + throw vbb(new mde(tvd((h0d(), Oue)))); + if (g == 45) + throw vbb(new mde(tvd((h0d(), Pue)))); + } else + j == 10 && (g = eee(a)); + nde(a); + if (c > g) + throw vbb(new mde(tvd((h0d(), Sue)))); + Ufe(h, c, g); + } + } + } + e = false; + } + if (a.c == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + Yfe(h); + Vfe(h); + a.b = 0; + nde(a); + return h; + } + function xZd(a) { + Bnd(a.c, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#decimal"])); + Bnd(a.d, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#integer"])); + Bnd(a.e, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#boolean"])); + Bnd(a.f, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EBoolean", fue, "EBoolean:Object"])); + Bnd(a.i, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#byte"])); + Bnd(a.g, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#hexBinary"])); + Bnd(a.j, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EByte", fue, "EByte:Object"])); + Bnd(a.n, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EChar", fue, "EChar:Object"])); + Bnd(a.t, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#double"])); + Bnd(a.u, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EDouble", fue, "EDouble:Object"])); + Bnd(a.F, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#float"])); + Bnd(a.G, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EFloat", fue, "EFloat:Object"])); + Bnd(a.I, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#int"])); + Bnd(a.J, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EInt", fue, "EInt:Object"])); + Bnd(a.N, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#long"])); + Bnd(a.O, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "ELong", fue, "ELong:Object"])); + Bnd(a.Z, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#short"])); + Bnd(a.$, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EShort", fue, "EShort:Object"])); + Bnd(a._, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#string"])); + } + function fRc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G; + if (a.c.length == 1) { + return tCb(0, a.c.length), BD(a.c[0], 135); + } else if (a.c.length <= 0) { + return new SRc(); + } + for (i = new olb(a); i.a < i.c.c.length; ) { + g = BD(mlb(i), 135); + s = 0; + o2 = Ohe; + p = Ohe; + m = Rie; + n = Rie; + for (r = Jsb(g.b, 0); r.b != r.d.c; ) { + q = BD(Xsb(r), 86); + s += BD(vNb(q, (JTc(), ETc)), 19).a; + o2 = $wnd.Math.min(o2, q.e.a); + p = $wnd.Math.min(p, q.e.b); + m = $wnd.Math.max(m, q.e.a + q.f.a); + n = $wnd.Math.max(n, q.e.b + q.f.b); + } + yNb(g, (JTc(), ETc), meb(s)); + yNb(g, (mTc(), WSc), new f7c(o2, p)); + yNb(g, VSc, new f7c(m, n)); + } + mmb(); + Okb(a, new jRc()); + v = new SRc(); + tNb(v, (tCb(0, a.c.length), BD(a.c[0], 94))); + l = 0; + D = 0; + for (j = new olb(a); j.a < j.c.c.length; ) { + g = BD(mlb(j), 135); + w = c7c(R6c(BD(vNb(g, (mTc(), VSc)), 8)), BD(vNb(g, WSc), 8)); + l = $wnd.Math.max(l, w.a); + D += w.a * w.b; + } + l = $wnd.Math.max(l, $wnd.Math.sqrt(D) * Edb(ED(vNb(v, (JTc(), uTc))))); + A = Edb(ED(vNb(v, HTc))); + F = 0; + G = 0; + k = 0; + b = A; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 135); + w = c7c(R6c(BD(vNb(g, (mTc(), VSc)), 8)), BD(vNb(g, WSc), 8)); + if (F + w.a > l) { + F = 0; + G += k + A; + k = 0; + } + eRc(v, g, F, G); + b = $wnd.Math.max(b, F + w.a); + k = $wnd.Math.max(k, w.b); + F += w.a + A; + } + u = new Lqb(); + c = new Lqb(); + for (C = new olb(a); C.a < C.c.c.length; ) { + B = BD(mlb(C), 135); + d = Ccb(DD(vNb(B, (Y9c(), y8c)))); + t = !B.q ? kmb : B.q; + for (f = t.vc().Kc(); f.Ob(); ) { + e = BD(f.Pb(), 42); + if (Mhb(u, e.cd())) { + if (PD(BD(e.cd(), 146).wg()) !== PD(e.dd())) { + if (d && Mhb(c, e.cd())) { + Zfb(); + "Found different values for property " + BD(e.cd(), 146).tg() + " in components."; + } else { + Rhb(u, BD(e.cd(), 146), e.dd()); + yNb(v, BD(e.cd(), 146), e.dd()); + d && Rhb(c, BD(e.cd(), 146), e.dd()); + } + } + } else { + Rhb(u, BD(e.cd(), 146), e.dd()); + yNb(v, BD(e.cd(), 146), e.dd()); + } + } + } + return v; + } + function MYb() { + MYb = ccb; + xXb(); + LYb = new Hp(); + Rc(LYb, (Ucd(), Gcd), Fcd); + Rc(LYb, Qcd, Fcd); + Rc(LYb, Hcd, Fcd); + Rc(LYb, Ncd, Fcd); + Rc(LYb, Mcd, Fcd); + Rc(LYb, Kcd, Fcd); + Rc(LYb, Ncd, Gcd); + Rc(LYb, Fcd, Bcd); + Rc(LYb, Gcd, Bcd); + Rc(LYb, Qcd, Bcd); + Rc(LYb, Hcd, Bcd); + Rc(LYb, Lcd, Bcd); + Rc(LYb, Ncd, Bcd); + Rc(LYb, Mcd, Bcd); + Rc(LYb, Kcd, Bcd); + Rc(LYb, Ecd, Bcd); + Rc(LYb, Fcd, Ocd); + Rc(LYb, Gcd, Ocd); + Rc(LYb, Bcd, Ocd); + Rc(LYb, Qcd, Ocd); + Rc(LYb, Hcd, Ocd); + Rc(LYb, Lcd, Ocd); + Rc(LYb, Ncd, Ocd); + Rc(LYb, Ecd, Ocd); + Rc(LYb, Pcd, Ocd); + Rc(LYb, Mcd, Ocd); + Rc(LYb, Icd, Ocd); + Rc(LYb, Kcd, Ocd); + Rc(LYb, Gcd, Qcd); + Rc(LYb, Hcd, Qcd); + Rc(LYb, Ncd, Qcd); + Rc(LYb, Kcd, Qcd); + Rc(LYb, Gcd, Hcd); + Rc(LYb, Qcd, Hcd); + Rc(LYb, Ncd, Hcd); + Rc(LYb, Hcd, Hcd); + Rc(LYb, Mcd, Hcd); + Rc(LYb, Fcd, Ccd); + Rc(LYb, Gcd, Ccd); + Rc(LYb, Bcd, Ccd); + Rc(LYb, Ocd, Ccd); + Rc(LYb, Qcd, Ccd); + Rc(LYb, Hcd, Ccd); + Rc(LYb, Lcd, Ccd); + Rc(LYb, Ncd, Ccd); + Rc(LYb, Pcd, Ccd); + Rc(LYb, Ecd, Ccd); + Rc(LYb, Kcd, Ccd); + Rc(LYb, Mcd, Ccd); + Rc(LYb, Jcd, Ccd); + Rc(LYb, Fcd, Pcd); + Rc(LYb, Gcd, Pcd); + Rc(LYb, Bcd, Pcd); + Rc(LYb, Qcd, Pcd); + Rc(LYb, Hcd, Pcd); + Rc(LYb, Lcd, Pcd); + Rc(LYb, Ncd, Pcd); + Rc(LYb, Ecd, Pcd); + Rc(LYb, Kcd, Pcd); + Rc(LYb, Icd, Pcd); + Rc(LYb, Jcd, Pcd); + Rc(LYb, Gcd, Ecd); + Rc(LYb, Qcd, Ecd); + Rc(LYb, Hcd, Ecd); + Rc(LYb, Ncd, Ecd); + Rc(LYb, Pcd, Ecd); + Rc(LYb, Kcd, Ecd); + Rc(LYb, Mcd, Ecd); + Rc(LYb, Fcd, Dcd); + Rc(LYb, Gcd, Dcd); + Rc(LYb, Bcd, Dcd); + Rc(LYb, Qcd, Dcd); + Rc(LYb, Hcd, Dcd); + Rc(LYb, Lcd, Dcd); + Rc(LYb, Ncd, Dcd); + Rc(LYb, Ecd, Dcd); + Rc(LYb, Kcd, Dcd); + Rc(LYb, Gcd, Mcd); + Rc(LYb, Bcd, Mcd); + Rc(LYb, Ocd, Mcd); + Rc(LYb, Hcd, Mcd); + Rc(LYb, Fcd, Icd); + Rc(LYb, Gcd, Icd); + Rc(LYb, Ocd, Icd); + Rc(LYb, Qcd, Icd); + Rc(LYb, Hcd, Icd); + Rc(LYb, Lcd, Icd); + Rc(LYb, Ncd, Icd); + Rc(LYb, Ncd, Jcd); + Rc(LYb, Hcd, Jcd); + Rc(LYb, Ecd, Fcd); + Rc(LYb, Ecd, Qcd); + Rc(LYb, Ecd, Bcd); + Rc(LYb, Lcd, Fcd); + Rc(LYb, Lcd, Gcd); + Rc(LYb, Lcd, Ocd); + } + function HVd(a, b) { + switch (a.e) { + case 0: + case 2: + case 4: + case 6: + case 42: + case 44: + case 46: + case 48: + case 8: + case 10: + case 12: + case 14: + case 16: + case 18: + case 20: + case 22: + case 24: + case 26: + case 28: + case 30: + case 32: + case 34: + case 36: + case 38: + return new U5d(a.b, a.a, b, a.c); + case 1: + return new BMd(a.a, b, bLd(b.Tg(), a.c)); + case 43: + return new N4d(a.a, b, bLd(b.Tg(), a.c)); + case 3: + return new xMd(a.a, b, bLd(b.Tg(), a.c)); + case 45: + return new K4d(a.a, b, bLd(b.Tg(), a.c)); + case 41: + return new dId(BD(wId(a.c), 26), a.a, b, bLd(b.Tg(), a.c)); + case 50: + return new c6d(BD(wId(a.c), 26), a.a, b, bLd(b.Tg(), a.c)); + case 5: + return new Q4d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 47: + return new U4d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 7: + return new cUd(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 49: + return new gUd(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 9: + return new I4d(a.a, b, bLd(b.Tg(), a.c)); + case 11: + return new G4d(a.a, b, bLd(b.Tg(), a.c)); + case 13: + return new C4d(a.a, b, bLd(b.Tg(), a.c)); + case 15: + return new k2d(a.a, b, bLd(b.Tg(), a.c)); + case 17: + return new c5d(a.a, b, bLd(b.Tg(), a.c)); + case 19: + return new _4d(a.a, b, bLd(b.Tg(), a.c)); + case 21: + return new X4d(a.a, b, bLd(b.Tg(), a.c)); + case 23: + return new pMd(a.a, b, bLd(b.Tg(), a.c)); + case 25: + return new D5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 27: + return new y5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 29: + return new t5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 31: + return new n5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 33: + return new A5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 35: + return new v5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 37: + return new p5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 39: + return new i5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 40: + return new u3d(b, bLd(b.Tg(), a.c)); + default: + throw vbb(new hz("Unknown feature style: " + a.e)); + } + } + function BMc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + Odd(c, "Brandes & Koepf node placement", 1); + a.a = b; + a.c = KMc(b); + d = BD(vNb(b, (Nyc(), zxc)), 274); + n = Ccb(DD(vNb(b, Axc))); + a.d = d == (lrc(), irc) && !n || d == frc; + AMc(a, b); + v = null; + w = null; + r = null; + s = null; + q = (Xj(4, Jie), new Skb(4)); + switch (BD(vNb(b, zxc), 274).g) { + case 3: + r = new ULc(b, a.c.d, (eMc(), cMc), (YLc(), WLc)); + q.c[q.c.length] = r; + break; + case 1: + s = new ULc(b, a.c.d, (eMc(), dMc), (YLc(), WLc)); + q.c[q.c.length] = s; + break; + case 4: + v = new ULc(b, a.c.d, (eMc(), cMc), (YLc(), XLc)); + q.c[q.c.length] = v; + break; + case 2: + w = new ULc(b, a.c.d, (eMc(), dMc), (YLc(), XLc)); + q.c[q.c.length] = w; + break; + default: + r = new ULc(b, a.c.d, (eMc(), cMc), (YLc(), WLc)); + s = new ULc(b, a.c.d, dMc, WLc); + v = new ULc(b, a.c.d, cMc, XLc); + w = new ULc(b, a.c.d, dMc, XLc); + q.c[q.c.length] = v; + q.c[q.c.length] = w; + q.c[q.c.length] = r; + q.c[q.c.length] = s; + } + e = new mMc(b, a.c); + for (h = new olb(q); h.a < h.c.c.length; ) { + f = BD(mlb(h), 180); + lMc(e, f, a.b); + kMc(f); + } + m = new rMc(b, a.c); + for (i = new olb(q); i.a < i.c.c.length; ) { + f = BD(mlb(i), 180); + oMc(m, f); + } + if (c.n) { + for (j = new olb(q); j.a < j.c.c.length; ) { + f = BD(mlb(j), 180); + Sdd(c, f + " size is " + SLc(f)); + } + } + l = null; + if (a.d) { + k = yMc(a, q, a.c.d); + xMc(b, k, c) && (l = k); + } + if (!l) { + for (j = new olb(q); j.a < j.c.c.length; ) { + f = BD(mlb(j), 180); + xMc(b, f, c) && (!l || SLc(l) > SLc(f)) && (l = f); + } + } + !l && (l = (tCb(0, q.c.length), BD(q.c[0], 180))); + for (p = new olb(b.b); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 29); + for (u = new olb(o2.a); u.a < u.c.c.length; ) { + t = BD(mlb(u), 10); + t.n.b = Edb(l.p[t.p]) + Edb(l.d[t.p]); + } + } + if (c.n) { + Sdd(c, "Chosen node placement: " + l); + Sdd(c, "Blocks: " + DMc(l)); + Sdd(c, "Classes: " + EMc(l, c)); + Sdd(c, "Marked edges: " + a.b); + } + for (g = new olb(q); g.a < g.c.c.length; ) { + f = BD(mlb(g), 180); + f.g = null; + f.b = null; + f.a = null; + f.d = null; + f.j = null; + f.i = null; + f.p = null; + } + IMc(a.c); + a.b.a.$b(); + Qdd(c); + } + function V1b(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F; + g = new Psb(); + v = BD(vNb(c, (Nyc(), Lwc)), 103); + o2 = 0; + ye(g, (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); + while (g.b != 0) { + j = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 33); + (PD(hkd(b, ywc)) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) && !Ccb(DD(hkd(j, xwc))) && jkd(j, (wtc(), Zsc), meb(o2++)); + q = !Ccb(DD(hkd(j, Jxc))); + if (q) { + l = (!j.a && (j.a = new cUd(E2, j, 10, 11)), j.a).i != 0; + n = S1b(j); + m = PD(hkd(j, axc)) === PD((hbd(), ebd)); + F = !ikd(j, (Y9c(), o8c)) || dfb(GD(hkd(j, o8c)), sne); + t = null; + if (F && m && (l || n)) { + t = P1b(j); + yNb(t, Lwc, v); + wNb(t, hyc) && Wyc(new ezc(Edb(ED(vNb(t, hyc)))), t); + if (BD(hkd(j, Fxc), 174).gc() != 0) { + k = t; + MAb(new YAb(null, (!j.c && (j.c = new cUd(F2, j, 9, 9)), new Kub(j.c, 16))), new k2b(k)); + L1b(j, t); + } + } + w = c; + A = BD(Ohb(a.a, Xod(j)), 10); + !!A && (w = A.e); + s = $1b(a, j, w); + if (t) { + s.e = t; + t.e = s; + ye(g, (!j.a && (j.a = new cUd(E2, j, 10, 11)), j.a)); + } + } + } + o2 = 0; + Gsb(g, b, g.c.b, g.c); + while (g.b != 0) { + f = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 33); + for (i = new Fyd((!f.b && (f.b = new cUd(B2, f, 12, 3)), f.b)); i.e != i.i.gc(); ) { + h = BD(Dyd(i), 79); + N1b(h); + (PD(hkd(b, ywc)) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) && jkd(h, (wtc(), Zsc), meb(o2++)); + C = atd(BD(qud((!h.b && (h.b = new y5d(z2, h, 4, 7)), h.b), 0), 82)); + D = atd(BD(qud((!h.c && (h.c = new y5d(z2, h, 5, 8)), h.c), 0), 82)); + if (Ccb(DD(hkd(h, Jxc))) || Ccb(DD(hkd(C, Jxc))) || Ccb(DD(hkd(D, Jxc)))) { + continue; + } + p = Qld(h) && Ccb(DD(hkd(C, fxc))) && Ccb(DD(hkd(h, gxc))); + u = f; + p || ntd(D, C) ? u = C : ntd(C, D) && (u = D); + w = c; + A = BD(Ohb(a.a, u), 10); + !!A && (w = A.e); + r = X1b(a, h, u, w); + yNb(r, (wtc(), xsc), R1b(a, h, b, c)); + } + m = PD(hkd(f, axc)) === PD((hbd(), ebd)); + if (m) { + for (e = new Fyd((!f.a && (f.a = new cUd(E2, f, 10, 11)), f.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + F = !ikd(d, (Y9c(), o8c)) || dfb(GD(hkd(d, o8c)), sne); + B = PD(hkd(d, axc)) === PD(ebd); + F && B && (Gsb(g, d, g.c.b, g.c), true); + } + } + } + } + function vA(a, b, c, d, e, f) { + var g, h, i, j, k, l, m, n, o2, p, q, r; + switch (b) { + case 71: + h = d.q.getFullYear() - nje >= -1900 ? 1 : 0; + c >= 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [pje, qje])[h]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["BC", "AD"])[h]); + break; + case 121: + kA(a, c, d); + break; + case 77: + jA(a, c, d); + break; + case 107: + i = e.q.getHours(); + i == 0 ? EA(a, 24, c) : EA(a, i, c); + break; + case 83: + iA(a, c, e); + break; + case 69: + k = d.q.getDay(); + c == 5 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["S", "M", "T", "W", "T", "F", "S"])[k]) : c == 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje])[k]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"])[k]); + break; + case 97: + e.q.getHours() >= 12 && e.q.getHours() < 24 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["AM", "PM"])[1]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["AM", "PM"])[0]); + break; + case 104: + l = e.q.getHours() % 12; + l == 0 ? EA(a, 12, c) : EA(a, l, c); + break; + case 75: + m = e.q.getHours() % 12; + EA(a, m, c); + break; + case 72: + n = e.q.getHours(); + EA(a, n, c); + break; + case 99: + o2 = d.q.getDay(); + c == 5 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["S", "M", "T", "W", "T", "F", "S"])[o2]) : c == 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje])[o2]) : c == 3 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"])[o2]) : EA(a, o2, 1); + break; + case 76: + p = d.q.getMonth(); + c == 5 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"])[p]) : c == 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje])[p]) : c == 3 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])[p]) : EA(a, p + 1, c); + break; + case 81: + q = d.q.getMonth() / 3 | 0; + c < 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Q1", "Q2", "Q3", "Q4"])[q]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"])[q]); + break; + case 100: + r = d.q.getDate(); + EA(a, r, c); + break; + case 109: + j = e.q.getMinutes(); + EA(a, j, c); + break; + case 115: + g = e.q.getSeconds(); + EA(a, g, c); + break; + case 122: + c < 4 ? Qfb(a, f.c[0]) : Qfb(a, f.c[1]); + break; + case 118: + Qfb(a, f.b); + break; + case 90: + c < 3 ? Qfb(a, OA(f)) : c == 3 ? Qfb(a, NA(f)) : Qfb(a, QA(f.a)); + break; + default: + return false; + } + return true; + } + function X1b(a, b, c, d) { + var e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H; + N1b(b); + i = BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82); + k = BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82); + h = atd(i); + j = atd(k); + g = (!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a).i == 0 ? null : BD(qud((!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a), 0), 202); + A = BD(Ohb(a.a, h), 10); + F = BD(Ohb(a.a, j), 10); + B = null; + G = null; + if (JD(i, 186)) { + w = BD(Ohb(a.a, i), 299); + if (JD(w, 11)) { + B = BD(w, 11); + } else if (JD(w, 10)) { + A = BD(w, 10); + B = BD(Ikb(A.j, 0), 11); + } + } + if (JD(k, 186)) { + D = BD(Ohb(a.a, k), 299); + if (JD(D, 11)) { + G = BD(D, 11); + } else if (JD(D, 10)) { + F = BD(D, 10); + G = BD(Ikb(F.j, 0), 11); + } + } + if (!A || !F) { + throw vbb(new z2c("The source or the target of edge " + b + " could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN.")); + } + p = new UZb(); + tNb(p, b); + yNb(p, (wtc(), $sc), b); + yNb(p, (Nyc(), jxc), null); + n = BD(vNb(d, Ksc), 21); + A == F && n.Fc((Orc(), Nrc)); + if (!B) { + v = (KAc(), IAc); + C = null; + if (!!g && fcd(BD(vNb(A, Vxc), 98))) { + C = new f7c(g.j, g.k); + Bfd(C, Mld(b)); + Cfd(C, c); + if (ntd(j, h)) { + v = HAc; + P6c(C, A.n); + } + } + B = $$b(A, C, v, d); + } + if (!G) { + v = (KAc(), HAc); + H = null; + if (!!g && fcd(BD(vNb(F, Vxc), 98))) { + H = new f7c(g.b, g.c); + Bfd(H, Mld(b)); + Cfd(H, c); + } + G = $$b(F, H, v, Q_b(F)); + } + QZb(p, B); + RZb(p, G); + (B.e.c.length > 1 || B.g.c.length > 1 || G.e.c.length > 1 || G.g.c.length > 1) && n.Fc((Orc(), Irc)); + for (m = new Fyd((!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n)); m.e != m.i.gc(); ) { + l = BD(Dyd(m), 137); + if (!Ccb(DD(hkd(l, Jxc))) && !!l.a) { + q = Z1b(l); + Ekb(p.b, q); + switch (BD(vNb(q, Qwc), 272).g) { + case 1: + case 2: + n.Fc((Orc(), Grc)); + break; + case 0: + n.Fc((Orc(), Erc)); + yNb(q, Qwc, (qad(), nad)); + } + } + } + f = BD(vNb(d, Iwc), 314); + r = BD(vNb(d, Exc), 315); + e = f == (Rpc(), Opc) || r == (Vzc(), Rzc); + if (!!g && (!g.a && (g.a = new xMd(y2, g, 5)), g.a).i != 0 && e) { + s = ofd(g); + o2 = new s7c(); + for (u = Jsb(s, 0); u.b != u.d.c; ) { + t = BD(Xsb(u), 8); + Dsb(o2, new g7c(t)); + } + yNb(p, _sc, o2); + } + return p; + } + function yZd(a) { + if (a.gb) + return; + a.gb = true; + a.b = Lnd(a, 0); + Knd(a.b, 18); + Qnd(a.b, 19); + a.a = Lnd(a, 1); + Knd(a.a, 1); + Qnd(a.a, 2); + Qnd(a.a, 3); + Qnd(a.a, 4); + Qnd(a.a, 5); + a.o = Lnd(a, 2); + Knd(a.o, 8); + Knd(a.o, 9); + Qnd(a.o, 10); + Qnd(a.o, 11); + Qnd(a.o, 12); + Qnd(a.o, 13); + Qnd(a.o, 14); + Qnd(a.o, 15); + Qnd(a.o, 16); + Qnd(a.o, 17); + Qnd(a.o, 18); + Qnd(a.o, 19); + Qnd(a.o, 20); + Qnd(a.o, 21); + Qnd(a.o, 22); + Qnd(a.o, 23); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + a.p = Lnd(a, 3); + Knd(a.p, 2); + Knd(a.p, 3); + Knd(a.p, 4); + Knd(a.p, 5); + Qnd(a.p, 6); + Qnd(a.p, 7); + Pnd(a.p); + Pnd(a.p); + a.q = Lnd(a, 4); + Knd(a.q, 8); + a.v = Lnd(a, 5); + Qnd(a.v, 9); + Pnd(a.v); + Pnd(a.v); + Pnd(a.v); + a.w = Lnd(a, 6); + Knd(a.w, 2); + Knd(a.w, 3); + Knd(a.w, 4); + Qnd(a.w, 5); + a.B = Lnd(a, 7); + Qnd(a.B, 1); + Pnd(a.B); + Pnd(a.B); + Pnd(a.B); + a.Q = Lnd(a, 8); + Qnd(a.Q, 0); + Pnd(a.Q); + a.R = Lnd(a, 9); + Knd(a.R, 1); + a.S = Lnd(a, 10); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + a.T = Lnd(a, 11); + Qnd(a.T, 10); + Qnd(a.T, 11); + Qnd(a.T, 12); + Qnd(a.T, 13); + Qnd(a.T, 14); + Pnd(a.T); + Pnd(a.T); + a.U = Lnd(a, 12); + Knd(a.U, 2); + Knd(a.U, 3); + Qnd(a.U, 4); + Qnd(a.U, 5); + Qnd(a.U, 6); + Qnd(a.U, 7); + Pnd(a.U); + a.V = Lnd(a, 13); + Qnd(a.V, 10); + a.W = Lnd(a, 14); + Knd(a.W, 18); + Knd(a.W, 19); + Knd(a.W, 20); + Qnd(a.W, 21); + Qnd(a.W, 22); + Qnd(a.W, 23); + a.bb = Lnd(a, 15); + Knd(a.bb, 10); + Knd(a.bb, 11); + Knd(a.bb, 12); + Knd(a.bb, 13); + Knd(a.bb, 14); + Knd(a.bb, 15); + Knd(a.bb, 16); + Qnd(a.bb, 17); + Pnd(a.bb); + Pnd(a.bb); + a.eb = Lnd(a, 16); + Knd(a.eb, 2); + Knd(a.eb, 3); + Knd(a.eb, 4); + Knd(a.eb, 5); + Knd(a.eb, 6); + Knd(a.eb, 7); + Qnd(a.eb, 8); + Qnd(a.eb, 9); + a.ab = Lnd(a, 17); + Knd(a.ab, 0); + Knd(a.ab, 1); + a.H = Lnd(a, 18); + Qnd(a.H, 0); + Qnd(a.H, 1); + Qnd(a.H, 2); + Qnd(a.H, 3); + Qnd(a.H, 4); + Qnd(a.H, 5); + Pnd(a.H); + a.db = Lnd(a, 19); + Qnd(a.db, 2); + a.c = Mnd(a, 20); + a.d = Mnd(a, 21); + a.e = Mnd(a, 22); + a.f = Mnd(a, 23); + a.i = Mnd(a, 24); + a.g = Mnd(a, 25); + a.j = Mnd(a, 26); + a.k = Mnd(a, 27); + a.n = Mnd(a, 28); + a.r = Mnd(a, 29); + a.s = Mnd(a, 30); + a.t = Mnd(a, 31); + a.u = Mnd(a, 32); + a.fb = Mnd(a, 33); + a.A = Mnd(a, 34); + a.C = Mnd(a, 35); + a.D = Mnd(a, 36); + a.F = Mnd(a, 37); + a.G = Mnd(a, 38); + a.I = Mnd(a, 39); + a.J = Mnd(a, 40); + a.L = Mnd(a, 41); + a.M = Mnd(a, 42); + a.N = Mnd(a, 43); + a.O = Mnd(a, 44); + a.P = Mnd(a, 45); + a.X = Mnd(a, 46); + a.Y = Mnd(a, 47); + a.Z = Mnd(a, 48); + a.$ = Mnd(a, 49); + a._ = Mnd(a, 50); + a.cb = Mnd(a, 51); + a.K = Mnd(a, 52); + } + function Y9c() { + Y9c = ccb; + var a, b; + o8c = new Lsd(sse); + F9c = new Lsd(tse); + q8c = (F7c(), z7c); + p8c = new Nsd($pe, q8c); + r8c = new Nsd(_le, null); + s8c = new Lsd(use); + x8c = (i8c(), qqb(h8c, OC(GC(r1, 1), Kie, 291, 0, [d8c]))); + w8c = new Nsd(lqe, x8c); + y8c = new Nsd(Zpe, (Bcb(), false)); + A8c = (ead(), cad); + z8c = new Nsd(cqe, A8c); + F8c = (Aad(), zad); + E8c = new Nsd(ype, F8c); + I8c = new Nsd(Jre, false); + K8c = (hbd(), fbd); + J8c = new Nsd(tpe, K8c); + g9c = new q0b(12); + f9c = new Nsd(ame, g9c); + O8c = new Nsd(Ame, false); + P8c = new Nsd(xqe, false); + e9c = new Nsd(Dme, false); + u9c = (dcd(), ccd); + t9c = new Nsd(Bme, u9c); + C9c = new Lsd(uqe); + D9c = new Lsd(vme); + E9c = new Lsd(yme); + H9c = new Lsd(zme); + R8c = new s7c(); + Q8c = new Nsd(mqe, R8c); + v8c = new Nsd(pqe, false); + L8c = new Nsd(qqe, false); + T8c = new H_b(); + S8c = new Nsd(vqe, T8c); + d9c = new Nsd(Xpe, false); + G9c = new Nsd(wse, 1); + new Nsd(xse, true); + meb(0); + new Nsd(yse, meb(100)); + new Nsd(zse, false); + meb(0); + new Nsd(Ase, meb(4e3)); + meb(0); + new Nsd(Bse, meb(400)); + new Nsd(Cse, false); + new Nsd(Dse, false); + new Nsd(Ese, true); + new Nsd(Fse, false); + u8c = (Ded(), Ced); + t8c = new Nsd(rse, u8c); + I9c = new Nsd(Lpe, 10); + J9c = new Nsd(Mpe, 10); + K9c = new Nsd(Zle, 20); + L9c = new Nsd(Npe, 10); + M9c = new Nsd(xme, 2); + N9c = new Nsd(Ope, 10); + P9c = new Nsd(Ppe, 0); + Q9c = new Nsd(Spe, 5); + R9c = new Nsd(Qpe, 1); + S9c = new Nsd(Rpe, 1); + T9c = new Nsd(wme, 20); + U9c = new Nsd(Tpe, 10); + X9c = new Nsd(Upe, 10); + O9c = new Lsd(Vpe); + W9c = new I_b(); + V9c = new Nsd(wqe, W9c); + j9c = new Lsd(tqe); + i9c = false; + h9c = new Nsd(sqe, i9c); + V8c = new q0b(5); + U8c = new Nsd(dqe, V8c); + X8c = (Hbd(), b = BD(gdb(B1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + W8c = new Nsd(Gme, X8c); + m9c = (Tbd(), Qbd); + l9c = new Nsd(gqe, m9c); + o9c = new Lsd(hqe); + p9c = new Lsd(iqe); + q9c = new Lsd(jqe); + n9c = new Lsd(kqe); + Z8c = (a = BD(gdb(I1), 9), new xqb(a, BD(_Bb(a, a.length), 9), 0)); + Y8c = new Nsd(Fme, Z8c); + c9c = pqb((Idd(), Bdd)); + b9c = new Nsd(Eme, c9c); + a9c = new f7c(0, 0); + _8c = new Nsd(Tme, a9c); + $8c = new Nsd(bqe, false); + D8c = (qad(), nad); + C8c = new Nsd(nqe, D8c); + B8c = new Nsd(Cme, false); + meb(1); + new Nsd(Hse, null); + r9c = new Lsd(rqe); + v9c = new Lsd(oqe); + B9c = (Ucd(), Scd); + A9c = new Nsd(Ype, B9c); + s9c = new Lsd(Wpe); + y9c = (rcd(), pqb(pcd)); + x9c = new Nsd(Hme, y9c); + w9c = new Nsd(eqe, false); + z9c = new Nsd(fqe, true); + M8c = new Nsd(_pe, false); + N8c = new Nsd(aqe, false); + G8c = new Nsd($le, 1); + H8c = (Mad(), Kad); + new Nsd(Ise, H8c); + k9c = true; + } + function wtc() { + wtc = ccb; + var a, b; + $sc = new Lsd(Ime); + xsc = new Lsd("coordinateOrigin"); + itc = new Lsd("processors"); + wsc = new Msd("compoundNode", (Bcb(), false)); + Nsc = new Msd("insideConnections", false); + _sc = new Lsd("originalBendpoints"); + atc = new Lsd("originalDummyNodePosition"); + btc = new Lsd("originalLabelEdge"); + ktc = new Lsd("representedLabels"); + Csc = new Lsd("endLabels"); + Dsc = new Lsd("endLabel.origin"); + Ssc = new Msd("labelSide", (rbd(), qbd)); + Ysc = new Msd("maxEdgeThickness", 0); + ltc = new Msd("reversed", false); + jtc = new Lsd(Jme); + Vsc = new Msd("longEdgeSource", null); + Wsc = new Msd("longEdgeTarget", null); + Usc = new Msd("longEdgeHasLabelDummies", false); + Tsc = new Msd("longEdgeBeforeLabelDummy", false); + Bsc = new Msd("edgeConstraint", (Gqc(), Eqc)); + Psc = new Lsd("inLayerLayoutUnit"); + Osc = new Msd("inLayerConstraint", (esc(), csc)); + Qsc = new Msd("inLayerSuccessorConstraint", new Rkb()); + Rsc = new Msd("inLayerSuccessorConstraintBetweenNonDummies", false); + gtc = new Lsd("portDummy"); + ysc = new Msd("crossingHint", meb(0)); + Ksc = new Msd("graphProperties", (b = BD(gdb(PW), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0))); + Hsc = new Msd("externalPortSide", (Ucd(), Scd)); + Isc = new Msd("externalPortSize", new d7c()); + Fsc = new Lsd("externalPortReplacedDummies"); + Gsc = new Lsd("externalPortReplacedDummy"); + Esc = new Msd("externalPortConnections", (a = BD(gdb(F1), 9), new xqb(a, BD(_Bb(a, a.length), 9), 0))); + htc = new Msd(tle, 0); + ssc = new Lsd("barycenterAssociates"); + vtc = new Lsd("TopSideComments"); + tsc = new Lsd("BottomSideComments"); + vsc = new Lsd("CommentConnectionPort"); + Msc = new Msd("inputCollect", false); + etc = new Msd("outputCollect", false); + Asc = new Msd("cyclic", false); + zsc = new Lsd("crossHierarchyMap"); + utc = new Lsd("targetOffset"); + new Msd("splineLabelSize", new d7c()); + otc = new Lsd("spacings"); + ftc = new Msd("partitionConstraint", false); + usc = new Lsd("breakingPoint.info"); + stc = new Lsd("splines.survivingEdge"); + rtc = new Lsd("splines.route.start"); + ptc = new Lsd("splines.edgeChain"); + dtc = new Lsd("originalPortConstraints"); + ntc = new Lsd("selfLoopHolder"); + qtc = new Lsd("splines.nsPortY"); + Zsc = new Lsd("modelOrder"); + Xsc = new Lsd("longEdgeTargetNode"); + Jsc = new Msd(Xne, false); + mtc = new Msd(Xne, false); + Lsc = new Lsd("layerConstraints.hiddenNodes"); + ctc = new Lsd("layerConstraints.opposidePort"); + ttc = new Lsd("targetNode.modelOrder"); + } + function jwc() { + jwc = ccb; + puc = (xqc(), vqc); + ouc = new Nsd(Yne, puc); + Guc = new Nsd(Zne, (Bcb(), false)); + Muc = (msc(), ksc); + Luc = new Nsd($ne, Muc); + cvc = new Nsd(_ne, false); + dvc = new Nsd(aoe, true); + Itc = new Nsd(boe, false); + xvc = (BAc(), zAc); + wvc = new Nsd(coe, xvc); + meb(1); + Fvc = new Nsd(doe, meb(7)); + Gvc = new Nsd(eoe, false); + Huc = new Nsd(foe, false); + nuc = (mqc(), iqc); + muc = new Nsd(goe, nuc); + bvc = (lzc(), jzc); + avc = new Nsd(hoe, bvc); + Tuc = (Ctc(), Btc); + Suc = new Nsd(ioe, Tuc); + meb(-1); + Ruc = new Nsd(joe, meb(-1)); + meb(-1); + Uuc = new Nsd(koe, meb(-1)); + meb(-1); + Vuc = new Nsd(loe, meb(4)); + meb(-1); + Xuc = new Nsd(moe, meb(2)); + _uc = (kAc(), iAc); + $uc = new Nsd(noe, _uc); + meb(0); + Zuc = new Nsd(ooe, meb(0)); + Puc = new Nsd(poe, meb(Ohe)); + luc = (Rpc(), Ppc); + kuc = new Nsd(qoe, luc); + Xtc = new Nsd(roe, false); + euc = new Nsd(soe, 0.1); + iuc = new Nsd(toe, false); + meb(-1); + guc = new Nsd(uoe, meb(-1)); + meb(-1); + huc = new Nsd(voe, meb(-1)); + meb(0); + Ytc = new Nsd(woe, meb(40)); + cuc = (Xrc(), Wrc); + buc = new Nsd(xoe, cuc); + $tc = Urc; + Ztc = new Nsd(yoe, $tc); + vvc = (Vzc(), Qzc); + uvc = new Nsd(zoe, vvc); + kvc = new Lsd(Aoe); + fvc = (_qc(), Zqc); + evc = new Nsd(Boe, fvc); + ivc = (lrc(), irc); + hvc = new Nsd(Coe, ivc); + nvc = new Nsd(Doe, 0.3); + pvc = new Lsd(Eoe); + rvc = (Izc(), Gzc); + qvc = new Nsd(Foe, rvc); + xuc = (TAc(), RAc); + wuc = new Nsd(Goe, xuc); + zuc = (_Ac(), $Ac); + yuc = new Nsd(Hoe, zuc); + Buc = (tBc(), sBc); + Auc = new Nsd(Ioe, Buc); + Duc = new Nsd(Joe, 0.2); + uuc = new Nsd(Koe, 2); + Bvc = new Nsd(Loe, null); + Dvc = new Nsd(Moe, 10); + Cvc = new Nsd(Noe, 10); + Evc = new Nsd(Ooe, 20); + meb(0); + yvc = new Nsd(Poe, meb(0)); + meb(0); + zvc = new Nsd(Qoe, meb(0)); + meb(0); + Avc = new Nsd(Roe, meb(0)); + Jtc = new Nsd(Soe, false); + Ntc = (yrc(), wrc); + Mtc = new Nsd(Toe, Ntc); + Ltc = (Ipc(), Hpc); + Ktc = new Nsd(Uoe, Ltc); + Juc = new Nsd(Voe, false); + meb(0); + Iuc = new Nsd(Woe, meb(16)); + meb(0); + Kuc = new Nsd(Xoe, meb(5)); + bwc = (LBc(), JBc); + awc = new Nsd(Yoe, bwc); + Hvc = new Nsd(Zoe, 10); + Kvc = new Nsd($oe, 1); + Tvc = (bqc(), aqc); + Svc = new Nsd(_oe, Tvc); + Nvc = new Lsd(ape); + Qvc = meb(1); + meb(0); + Pvc = new Nsd(bpe, Qvc); + gwc = (CBc(), zBc); + fwc = new Nsd(cpe, gwc); + cwc = new Lsd(dpe); + Yvc = new Nsd(epe, true); + Wvc = new Nsd(fpe, 2); + $vc = new Nsd(gpe, true); + tuc = (Sqc(), Qqc); + suc = new Nsd(hpe, tuc); + ruc = (Apc(), wpc); + quc = new Nsd(ipe, ruc); + Wtc = (tAc(), rAc); + Vtc = new Nsd(jpe, Wtc); + Utc = new Nsd(kpe, false); + Ptc = (RXb(), QXb); + Otc = new Nsd(lpe, Ptc); + Ttc = (xzc(), uzc); + Stc = new Nsd(mpe, Ttc); + Qtc = new Nsd(npe, 0); + Rtc = new Nsd(ope, 0); + Ouc = kqc; + Nuc = Opc; + Wuc = izc; + Yuc = izc; + Quc = fzc; + fuc = (hbd(), ebd); + juc = Ppc; + duc = Ppc; + _tc = Ppc; + auc = ebd; + lvc = Tzc; + mvc = Qzc; + gvc = Qzc; + jvc = Qzc; + ovc = Szc; + tvc = Tzc; + svc = Tzc; + Cuc = (Aad(), yad); + Euc = yad; + Fuc = sBc; + vuc = xad; + Ivc = KBc; + Jvc = IBc; + Lvc = KBc; + Mvc = IBc; + Uvc = KBc; + Vvc = IBc; + Ovc = _pc; + Rvc = aqc; + hwc = KBc; + iwc = IBc; + dwc = KBc; + ewc = IBc; + Zvc = IBc; + Xvc = IBc; + _vc = IBc; + } + function S8b() { + S8b = ccb; + Y7b = new T8b("DIRECTION_PREPROCESSOR", 0); + V7b = new T8b("COMMENT_PREPROCESSOR", 1); + Z7b = new T8b("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER", 2); + n8b = new T8b("INTERACTIVE_EXTERNAL_PORT_POSITIONER", 3); + G8b = new T8b("PARTITION_PREPROCESSOR", 4); + r8b = new T8b("LABEL_DUMMY_INSERTER", 5); + M8b = new T8b("SELF_LOOP_PREPROCESSOR", 6); + w8b = new T8b("LAYER_CONSTRAINT_PREPROCESSOR", 7); + E8b = new T8b("PARTITION_MIDPROCESSOR", 8); + i8b = new T8b("HIGH_DEGREE_NODE_LAYER_PROCESSOR", 9); + A8b = new T8b("NODE_PROMOTION", 10); + v8b = new T8b("LAYER_CONSTRAINT_POSTPROCESSOR", 11); + F8b = new T8b("PARTITION_POSTPROCESSOR", 12); + e8b = new T8b("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR", 13); + O8b = new T8b("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR", 14); + P7b = new T8b("BREAKING_POINT_INSERTER", 15); + z8b = new T8b("LONG_EDGE_SPLITTER", 16); + I8b = new T8b("PORT_SIDE_PROCESSOR", 17); + o8b = new T8b("INVERTED_PORT_PROCESSOR", 18); + H8b = new T8b("PORT_LIST_SORTER", 19); + Q8b = new T8b("SORT_BY_INPUT_ORDER_OF_MODEL", 20); + C8b = new T8b("NORTH_SOUTH_PORT_PREPROCESSOR", 21); + Q7b = new T8b("BREAKING_POINT_PROCESSOR", 22); + D8b = new T8b(Bne, 23); + R8b = new T8b(Cne, 24); + K8b = new T8b("SELF_LOOP_PORT_RESTORER", 25); + P8b = new T8b("SINGLE_EDGE_GRAPH_WRAPPER", 26); + p8b = new T8b("IN_LAYER_CONSTRAINT_PROCESSOR", 27); + b8b = new T8b("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR", 28); + q8b = new T8b("LABEL_AND_NODE_SIZE_PROCESSOR", 29); + m8b = new T8b("INNERMOST_NODE_MARGIN_CALCULATOR", 30); + N8b = new T8b("SELF_LOOP_ROUTER", 31); + T7b = new T8b("COMMENT_NODE_MARGIN_CALCULATOR", 32); + _7b = new T8b("END_LABEL_PREPROCESSOR", 33); + t8b = new T8b("LABEL_DUMMY_SWITCHER", 34); + S7b = new T8b("CENTER_LABEL_MANAGEMENT_PROCESSOR", 35); + u8b = new T8b("LABEL_SIDE_SELECTOR", 36); + k8b = new T8b("HYPEREDGE_DUMMY_MERGER", 37); + f8b = new T8b("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR", 38); + x8b = new T8b("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR", 39); + h8b = new T8b("HIERARCHICAL_PORT_POSITION_PROCESSOR", 40); + W7b = new T8b("CONSTRAINTS_POSTPROCESSOR", 41); + U7b = new T8b("COMMENT_POSTPROCESSOR", 42); + l8b = new T8b("HYPERNODE_PROCESSOR", 43); + g8b = new T8b("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER", 44); + y8b = new T8b("LONG_EDGE_JOINER", 45); + L8b = new T8b("SELF_LOOP_POSTPROCESSOR", 46); + R7b = new T8b("BREAKING_POINT_REMOVER", 47); + B8b = new T8b("NORTH_SOUTH_PORT_POSTPROCESSOR", 48); + j8b = new T8b("HORIZONTAL_COMPACTOR", 49); + s8b = new T8b("LABEL_DUMMY_REMOVER", 50); + c8b = new T8b("FINAL_SPLINE_BENDPOINTS_CALCULATOR", 51); + a8b = new T8b("END_LABEL_SORTER", 52); + J8b = new T8b("REVERSED_EDGE_RESTORER", 53); + $7b = new T8b("END_LABEL_POSTPROCESSOR", 54); + d8b = new T8b("HIERARCHICAL_NODE_RESIZER", 55); + X7b = new T8b("DIRECTION_POSTPROCESSOR", 56); + } + function KIc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, $, ab, bb, cb, db2, eb, fb, gb, hb, ib, jb, kb, lb; + cb = 0; + for (H = b, K = 0, N = H.length; K < N; ++K) { + F = H[K]; + for (V = new olb(F.j); V.a < V.c.c.length; ) { + U = BD(mlb(V), 11); + X = 0; + for (h = new olb(U.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + F.c != g.d.i.c && ++X; + } + X > 0 && (a.a[U.p] = cb++); + } + } + hb = 0; + for (I = c, L = 0, O = I.length; L < O; ++L) { + F = I[L]; + P = 0; + for (V = new olb(F.j); V.a < V.c.c.length; ) { + U = BD(mlb(V), 11); + if (U.j == (Ucd(), Acd)) { + for (h = new olb(U.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (F.c != g.c.i.c) { + ++P; + break; + } + } + } else { + break; + } + } + R = 0; + Y = new Bib(F.j, F.j.c.length); + while (Y.b > 0) { + U = (sCb(Y.b > 0), BD(Y.a.Xb(Y.c = --Y.b), 11)); + X = 0; + for (h = new olb(U.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + F.c != g.c.i.c && ++X; + } + if (X > 0) { + if (U.j == (Ucd(), Acd)) { + a.a[U.p] = hb; + ++hb; + } else { + a.a[U.p] = hb + P + R; + ++R; + } + } + } + hb += R; + } + W = new Lqb(); + o2 = new zsb(); + for (G = b, J = 0, M = G.length; J < M; ++J) { + F = G[J]; + for (fb = new olb(F.j); fb.a < fb.c.c.length; ) { + eb = BD(mlb(fb), 11); + for (h = new olb(eb.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + jb = g.d; + if (F.c != jb.i.c) { + db2 = BD(Wd(irb(W.f, eb)), 467); + ib = BD(Wd(irb(W.f, jb)), 467); + if (!db2 && !ib) { + n = new NIc(); + o2.a.zc(n, o2); + Ekb(n.a, g); + Ekb(n.d, eb); + jrb(W.f, eb, n); + Ekb(n.d, jb); + jrb(W.f, jb, n); + } else if (!db2) { + Ekb(ib.a, g); + Ekb(ib.d, eb); + jrb(W.f, eb, ib); + } else if (!ib) { + Ekb(db2.a, g); + Ekb(db2.d, jb); + jrb(W.f, jb, db2); + } else if (db2 == ib) { + Ekb(db2.a, g); + } else { + Ekb(db2.a, g); + for (T = new olb(ib.d); T.a < T.c.c.length; ) { + S = BD(mlb(T), 11); + jrb(W.f, S, db2); + } + Gkb(db2.a, ib.a); + Gkb(db2.d, ib.d); + o2.a.Bc(ib) != null; + } + } + } + } + } + p = BD(Ee(o2, KC(oY, { 3: 1, 4: 1, 5: 1, 1946: 1 }, 467, o2.a.gc(), 0, 1)), 1946); + D = b[0].c; + bb = c[0].c; + for (k = p, l = 0, m = k.length; l < m; ++l) { + j = k[l]; + j.e = cb; + j.f = hb; + for (V = new olb(j.d); V.a < V.c.c.length; ) { + U = BD(mlb(V), 11); + Z = a.a[U.p]; + if (U.i.c == D) { + Z < j.e && (j.e = Z); + Z > j.b && (j.b = Z); + } else if (U.i.c == bb) { + Z < j.f && (j.f = Z); + Z > j.c && (j.c = Z); + } + } + } + Klb(p, 0, p.length, null); + gb = KC(WD, oje, 25, p.length, 15, 1); + d = KC(WD, oje, 25, hb + 1, 15, 1); + for (r = 0; r < p.length; r++) { + gb[r] = p[r].f; + d[gb[r]] = 1; + } + f = 0; + for (s = 0; s < d.length; s++) { + d[s] == 1 ? d[s] = f : --f; + } + $ = 0; + for (t = 0; t < gb.length; t++) { + gb[t] += d[gb[t]]; + $ = $wnd.Math.max($, gb[t] + 1); + } + i = 1; + while (i < $) { + i *= 2; + } + lb = 2 * i - 1; + i -= 1; + kb = KC(WD, oje, 25, lb, 15, 1); + e = 0; + for (B = 0; B < gb.length; B++) { + A = gb[B] + i; + ++kb[A]; + while (A > 0) { + A % 2 > 0 && (e += kb[A + 1]); + A = (A - 1) / 2 | 0; + ++kb[A]; + } + } + C = KC(nY, Uhe, 362, p.length * 2, 0, 1); + for (u = 0; u < p.length; u++) { + C[2 * u] = new QIc(p[u], p[u].e, p[u].b, (UIc(), TIc)); + C[2 * u + 1] = new QIc(p[u], p[u].b, p[u].e, SIc); + } + Klb(C, 0, C.length, null); + Q = 0; + for (v = 0; v < C.length; v++) { + switch (C[v].d.g) { + case 0: + ++Q; + break; + case 1: + --Q; + e += Q; + } + } + ab = KC(nY, Uhe, 362, p.length * 2, 0, 1); + for (w = 0; w < p.length; w++) { + ab[2 * w] = new QIc(p[w], p[w].f, p[w].c, (UIc(), TIc)); + ab[2 * w + 1] = new QIc(p[w], p[w].c, p[w].f, SIc); + } + Klb(ab, 0, ab.length, null); + Q = 0; + for (q = 0; q < ab.length; q++) { + switch (ab[q].d.g) { + case 0: + ++Q; + break; + case 1: + --Q; + e += Q; + } + } + return e; + } + function wfe() { + wfe = ccb; + ffe = new xfe(7); + hfe = new ige(8, 94); + new ige(8, 64); + ife = new ige(8, 36); + ofe = new ige(8, 65); + pfe = new ige(8, 122); + qfe = new ige(8, 90); + tfe = new ige(8, 98); + mfe = new ige(8, 66); + rfe = new ige(8, 60); + ufe = new ige(8, 62); + efe = new xfe(11); + cfe = new $fe(4); + Ufe(cfe, 48, 57); + sfe = new $fe(4); + Ufe(sfe, 48, 57); + Ufe(sfe, 65, 90); + Ufe(sfe, 95, 95); + Ufe(sfe, 97, 122); + nfe = new $fe(4); + Ufe(nfe, 9, 9); + Ufe(nfe, 10, 10); + Ufe(nfe, 12, 12); + Ufe(nfe, 13, 13); + Ufe(nfe, 32, 32); + jfe = _fe(cfe); + lfe = _fe(sfe); + kfe = _fe(nfe); + Zee = new Lqb(); + $ee = new Lqb(); + _ee = OC(GC(ZI, 1), nie, 2, 6, ["Cn", "Lu", "Ll", "Lt", "Lm", "Lo", "Mn", "Me", "Mc", "Nd", "Nl", "No", "Zs", "Zl", "Zp", "Cc", "Cf", null, "Co", "Cs", "Pd", "Ps", "Pe", "Pc", "Po", "Sm", "Sc", "Sk", "So", "Pi", "Pf", "L", "M", "N", "Z", "C", "P", "S"]); + Yee = OC(GC(ZI, 1), nie, 2, 6, ["Basic Latin", "Latin-1 Supplement", "Latin Extended-A", "Latin Extended-B", "IPA Extensions", "Spacing Modifier Letters", "Combining Diacritical Marks", "Greek", "Cyrillic", "Armenian", "Hebrew", "Arabic", "Syriac", "Thaana", "Devanagari", "Bengali", "Gurmukhi", "Gujarati", "Oriya", "Tamil", "Telugu", "Kannada", "Malayalam", "Sinhala", "Thai", "Lao", "Tibetan", "Myanmar", "Georgian", "Hangul Jamo", "Ethiopic", "Cherokee", "Unified Canadian Aboriginal Syllabics", "Ogham", "Runic", "Khmer", "Mongolian", "Latin Extended Additional", "Greek Extended", "General Punctuation", "Superscripts and Subscripts", "Currency Symbols", "Combining Marks for Symbols", "Letterlike Symbols", "Number Forms", "Arrows", "Mathematical Operators", "Miscellaneous Technical", "Control Pictures", "Optical Character Recognition", "Enclosed Alphanumerics", "Box Drawing", "Block Elements", "Geometric Shapes", "Miscellaneous Symbols", "Dingbats", "Braille Patterns", "CJK Radicals Supplement", "Kangxi Radicals", "Ideographic Description Characters", "CJK Symbols and Punctuation", "Hiragana", "Katakana", "Bopomofo", "Hangul Compatibility Jamo", "Kanbun", "Bopomofo Extended", "Enclosed CJK Letters and Months", "CJK Compatibility", "CJK Unified Ideographs Extension A", "CJK Unified Ideographs", "Yi Syllables", "Yi Radicals", "Hangul Syllables", uxe, "CJK Compatibility Ideographs", "Alphabetic Presentation Forms", "Arabic Presentation Forms-A", "Combining Half Marks", "CJK Compatibility Forms", "Small Form Variants", "Arabic Presentation Forms-B", "Specials", "Halfwidth and Fullwidth Forms", "Old Italic", "Gothic", "Deseret", "Byzantine Musical Symbols", "Musical Symbols", "Mathematical Alphanumeric Symbols", "CJK Unified Ideographs Extension B", "CJK Compatibility Ideographs Supplement", "Tags"]); + afe = OC(GC(WD, 1), oje, 25, 15, [66304, 66351, 66352, 66383, 66560, 66639, 118784, 119039, 119040, 119295, 119808, 120831, 131072, 173782, 194560, 195103, 917504, 917631]); + } + function qJb() { + qJb = ccb; + nJb = new tJb("OUT_T_L", 0, (NHb(), LHb), (EIb(), BIb), (gHb(), dHb), dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb((Hbd(), Dbd), OC(GC(B1, 1), Kie, 93, 0, [Gbd, zbd]))])); + mJb = new tJb("OUT_T_C", 1, KHb, BIb, dHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd, Abd]))])); + oJb = new tJb("OUT_T_R", 2, MHb, BIb, dHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, Bbd]))])); + eJb = new tJb("OUT_B_L", 3, LHb, DIb, fHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, zbd]))])); + dJb = new tJb("OUT_B_C", 4, KHb, DIb, fHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd, Abd]))])); + fJb = new tJb("OUT_B_R", 5, MHb, DIb, fHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, Bbd]))])); + iJb = new tJb("OUT_L_T", 6, MHb, DIb, dHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Gbd, Abd]))])); + hJb = new tJb("OUT_L_C", 7, MHb, CIb, eHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Fbd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Fbd, Abd]))])); + gJb = new tJb("OUT_L_B", 8, MHb, BIb, fHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Ebd, Abd]))])); + lJb = new tJb("OUT_R_T", 9, LHb, DIb, dHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Gbd, Abd]))])); + kJb = new tJb("OUT_R_C", 10, LHb, CIb, eHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Fbd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Fbd, Abd]))])); + jJb = new tJb("OUT_R_B", 11, LHb, BIb, fHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Ebd, Abd]))])); + bJb = new tJb("IN_T_L", 12, LHb, DIb, dHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, zbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, zbd, Abd]))])); + aJb = new tJb("IN_T_C", 13, KHb, DIb, dHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd, Abd]))])); + cJb = new tJb("IN_T_R", 14, MHb, DIb, dHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, Bbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, Bbd, Abd]))])); + $Ib = new tJb("IN_C_L", 15, LHb, CIb, eHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, zbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, zbd, Abd]))])); + ZIb = new tJb("IN_C_C", 16, KHb, CIb, eHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, ybd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, ybd, Abd]))])); + _Ib = new tJb("IN_C_R", 17, MHb, CIb, eHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, Bbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, Bbd, Abd]))])); + XIb = new tJb("IN_B_L", 18, LHb, BIb, fHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, zbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, zbd, Abd]))])); + WIb = new tJb("IN_B_C", 19, KHb, BIb, fHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd, Abd]))])); + YIb = new tJb("IN_B_R", 20, MHb, BIb, fHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, Bbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, Bbd, Abd]))])); + pJb = new tJb(ole, 21, null, null, null, null, OC(GC(LK, 1), Uhe, 21, 0, [])); + } + function jGd() { + jGd = ccb; + PFd = (NFd(), MFd).b; + BD(qud(ZKd(MFd.b), 0), 34); + BD(qud(ZKd(MFd.b), 1), 18); + OFd = MFd.a; + BD(qud(ZKd(MFd.a), 0), 34); + BD(qud(ZKd(MFd.a), 1), 18); + BD(qud(ZKd(MFd.a), 2), 18); + BD(qud(ZKd(MFd.a), 3), 18); + BD(qud(ZKd(MFd.a), 4), 18); + QFd = MFd.o; + BD(qud(ZKd(MFd.o), 0), 34); + BD(qud(ZKd(MFd.o), 1), 34); + SFd = BD(qud(ZKd(MFd.o), 2), 18); + BD(qud(ZKd(MFd.o), 3), 18); + BD(qud(ZKd(MFd.o), 4), 18); + BD(qud(ZKd(MFd.o), 5), 18); + BD(qud(ZKd(MFd.o), 6), 18); + BD(qud(ZKd(MFd.o), 7), 18); + BD(qud(ZKd(MFd.o), 8), 18); + BD(qud(ZKd(MFd.o), 9), 18); + BD(qud(ZKd(MFd.o), 10), 18); + BD(qud(ZKd(MFd.o), 11), 18); + BD(qud(ZKd(MFd.o), 12), 18); + BD(qud(ZKd(MFd.o), 13), 18); + BD(qud(ZKd(MFd.o), 14), 18); + BD(qud(ZKd(MFd.o), 15), 18); + BD(qud(WKd(MFd.o), 0), 59); + BD(qud(WKd(MFd.o), 1), 59); + BD(qud(WKd(MFd.o), 2), 59); + BD(qud(WKd(MFd.o), 3), 59); + BD(qud(WKd(MFd.o), 4), 59); + BD(qud(WKd(MFd.o), 5), 59); + BD(qud(WKd(MFd.o), 6), 59); + BD(qud(WKd(MFd.o), 7), 59); + BD(qud(WKd(MFd.o), 8), 59); + BD(qud(WKd(MFd.o), 9), 59); + RFd = MFd.p; + BD(qud(ZKd(MFd.p), 0), 34); + BD(qud(ZKd(MFd.p), 1), 34); + BD(qud(ZKd(MFd.p), 2), 34); + BD(qud(ZKd(MFd.p), 3), 34); + BD(qud(ZKd(MFd.p), 4), 18); + BD(qud(ZKd(MFd.p), 5), 18); + BD(qud(WKd(MFd.p), 0), 59); + BD(qud(WKd(MFd.p), 1), 59); + TFd = MFd.q; + BD(qud(ZKd(MFd.q), 0), 34); + UFd = MFd.v; + BD(qud(ZKd(MFd.v), 0), 18); + BD(qud(WKd(MFd.v), 0), 59); + BD(qud(WKd(MFd.v), 1), 59); + BD(qud(WKd(MFd.v), 2), 59); + VFd = MFd.w; + BD(qud(ZKd(MFd.w), 0), 34); + BD(qud(ZKd(MFd.w), 1), 34); + BD(qud(ZKd(MFd.w), 2), 34); + BD(qud(ZKd(MFd.w), 3), 18); + WFd = MFd.B; + BD(qud(ZKd(MFd.B), 0), 18); + BD(qud(WKd(MFd.B), 0), 59); + BD(qud(WKd(MFd.B), 1), 59); + BD(qud(WKd(MFd.B), 2), 59); + ZFd = MFd.Q; + BD(qud(ZKd(MFd.Q), 0), 18); + BD(qud(WKd(MFd.Q), 0), 59); + $Fd = MFd.R; + BD(qud(ZKd(MFd.R), 0), 34); + _Fd = MFd.S; + BD(qud(WKd(MFd.S), 0), 59); + BD(qud(WKd(MFd.S), 1), 59); + BD(qud(WKd(MFd.S), 2), 59); + BD(qud(WKd(MFd.S), 3), 59); + BD(qud(WKd(MFd.S), 4), 59); + BD(qud(WKd(MFd.S), 5), 59); + BD(qud(WKd(MFd.S), 6), 59); + BD(qud(WKd(MFd.S), 7), 59); + BD(qud(WKd(MFd.S), 8), 59); + BD(qud(WKd(MFd.S), 9), 59); + BD(qud(WKd(MFd.S), 10), 59); + BD(qud(WKd(MFd.S), 11), 59); + BD(qud(WKd(MFd.S), 12), 59); + BD(qud(WKd(MFd.S), 13), 59); + BD(qud(WKd(MFd.S), 14), 59); + aGd = MFd.T; + BD(qud(ZKd(MFd.T), 0), 18); + BD(qud(ZKd(MFd.T), 2), 18); + bGd = BD(qud(ZKd(MFd.T), 3), 18); + BD(qud(ZKd(MFd.T), 4), 18); + BD(qud(WKd(MFd.T), 0), 59); + BD(qud(WKd(MFd.T), 1), 59); + BD(qud(ZKd(MFd.T), 1), 18); + cGd = MFd.U; + BD(qud(ZKd(MFd.U), 0), 34); + BD(qud(ZKd(MFd.U), 1), 34); + BD(qud(ZKd(MFd.U), 2), 18); + BD(qud(ZKd(MFd.U), 3), 18); + BD(qud(ZKd(MFd.U), 4), 18); + BD(qud(ZKd(MFd.U), 5), 18); + BD(qud(WKd(MFd.U), 0), 59); + dGd = MFd.V; + BD(qud(ZKd(MFd.V), 0), 18); + eGd = MFd.W; + BD(qud(ZKd(MFd.W), 0), 34); + BD(qud(ZKd(MFd.W), 1), 34); + BD(qud(ZKd(MFd.W), 2), 34); + BD(qud(ZKd(MFd.W), 3), 18); + BD(qud(ZKd(MFd.W), 4), 18); + BD(qud(ZKd(MFd.W), 5), 18); + gGd = MFd.bb; + BD(qud(ZKd(MFd.bb), 0), 34); + BD(qud(ZKd(MFd.bb), 1), 34); + BD(qud(ZKd(MFd.bb), 2), 34); + BD(qud(ZKd(MFd.bb), 3), 34); + BD(qud(ZKd(MFd.bb), 4), 34); + BD(qud(ZKd(MFd.bb), 5), 34); + BD(qud(ZKd(MFd.bb), 6), 34); + BD(qud(ZKd(MFd.bb), 7), 18); + BD(qud(WKd(MFd.bb), 0), 59); + BD(qud(WKd(MFd.bb), 1), 59); + hGd = MFd.eb; + BD(qud(ZKd(MFd.eb), 0), 34); + BD(qud(ZKd(MFd.eb), 1), 34); + BD(qud(ZKd(MFd.eb), 2), 34); + BD(qud(ZKd(MFd.eb), 3), 34); + BD(qud(ZKd(MFd.eb), 4), 34); + BD(qud(ZKd(MFd.eb), 5), 34); + BD(qud(ZKd(MFd.eb), 6), 18); + BD(qud(ZKd(MFd.eb), 7), 18); + fGd = MFd.ab; + BD(qud(ZKd(MFd.ab), 0), 34); + BD(qud(ZKd(MFd.ab), 1), 34); + XFd = MFd.H; + BD(qud(ZKd(MFd.H), 0), 18); + BD(qud(ZKd(MFd.H), 1), 18); + BD(qud(ZKd(MFd.H), 2), 18); + BD(qud(ZKd(MFd.H), 3), 18); + BD(qud(ZKd(MFd.H), 4), 18); + BD(qud(ZKd(MFd.H), 5), 18); + BD(qud(WKd(MFd.H), 0), 59); + iGd = MFd.db; + BD(qud(ZKd(MFd.db), 0), 18); + YFd = MFd.M; + } + function bae(a) { + var b; + if (a.O) + return; + a.O = true; + pnd(a, "type"); + cod(a, "ecore.xml.type"); + dod(a, Ewe); + b = BD(nUd((yFd(), xFd), Ewe), 1945); + wtd(_Kd(a.fb), a.b); + Xnd(a.b, Q9, "AnyType", false, false, true); + Vnd(BD(qud(ZKd(a.b), 0), 34), a.wb.D, Qve, null, 0, -1, Q9, false, false, true, false, false, false); + Vnd(BD(qud(ZKd(a.b), 1), 34), a.wb.D, "any", null, 0, -1, Q9, true, true, true, false, false, true); + Vnd(BD(qud(ZKd(a.b), 2), 34), a.wb.D, "anyAttribute", null, 0, -1, Q9, false, false, true, false, false, false); + Xnd(a.bb, S9, Jwe, false, false, true); + Vnd(BD(qud(ZKd(a.bb), 0), 34), a.gb, "data", null, 0, 1, S9, false, false, true, false, true, false); + Vnd(BD(qud(ZKd(a.bb), 1), 34), a.gb, bue, null, 1, 1, S9, false, false, true, false, true, false); + Xnd(a.fb, T9, Kwe, false, false, true); + Vnd(BD(qud(ZKd(a.fb), 0), 34), b.gb, "rawValue", null, 0, 1, T9, true, true, true, false, true, true); + Vnd(BD(qud(ZKd(a.fb), 1), 34), b.a, Bte, null, 0, 1, T9, true, true, true, false, true, true); + _nd(BD(qud(ZKd(a.fb), 2), 18), a.wb.q, null, "instanceType", 1, 1, T9, false, false, true, false, false, false, false); + Xnd(a.qb, U9, Lwe, false, false, true); + Vnd(BD(qud(ZKd(a.qb), 0), 34), a.wb.D, Qve, null, 0, -1, null, false, false, true, false, false, false); + _nd(BD(qud(ZKd(a.qb), 1), 18), a.wb.ab, null, "xMLNSPrefixMap", 0, -1, null, true, false, true, true, false, false, false); + _nd(BD(qud(ZKd(a.qb), 2), 18), a.wb.ab, null, "xSISchemaLocation", 0, -1, null, true, false, true, true, false, false, false); + Vnd(BD(qud(ZKd(a.qb), 3), 34), a.gb, "cDATA", null, 0, -2, null, true, true, true, false, false, true); + Vnd(BD(qud(ZKd(a.qb), 4), 34), a.gb, "comment", null, 0, -2, null, true, true, true, false, false, true); + _nd(BD(qud(ZKd(a.qb), 5), 18), a.bb, null, jxe, 0, -2, null, true, true, true, true, false, false, true); + Vnd(BD(qud(ZKd(a.qb), 6), 34), a.gb, Ite, null, 0, -2, null, true, true, true, false, false, true); + Znd(a.a, SI, "AnySimpleType", true); + Znd(a.c, ZI, "AnyURI", true); + Znd(a.d, GC(SD, 1), "Base64Binary", true); + Znd(a.e, sbb, "Boolean", true); + Znd(a.f, wI, "BooleanObject", true); + Znd(a.g, SD, "Byte", true); + Znd(a.i, xI, "ByteObject", true); + Znd(a.j, ZI, "Date", true); + Znd(a.k, ZI, "DateTime", true); + Znd(a.n, bJ, "Decimal", true); + Znd(a.o, UD, "Double", true); + Znd(a.p, BI, "DoubleObject", true); + Znd(a.q, ZI, "Duration", true); + Znd(a.s, yK, "ENTITIES", true); + Znd(a.r, yK, "ENTITIESBase", true); + Znd(a.t, ZI, Rwe, true); + Znd(a.u, VD, "Float", true); + Znd(a.v, FI, "FloatObject", true); + Znd(a.w, ZI, "GDay", true); + Znd(a.B, ZI, "GMonth", true); + Znd(a.A, ZI, "GMonthDay", true); + Znd(a.C, ZI, "GYear", true); + Znd(a.D, ZI, "GYearMonth", true); + Znd(a.F, GC(SD, 1), "HexBinary", true); + Znd(a.G, ZI, "ID", true); + Znd(a.H, ZI, "IDREF", true); + Znd(a.J, yK, "IDREFS", true); + Znd(a.I, yK, "IDREFSBase", true); + Znd(a.K, WD, "Int", true); + Znd(a.M, cJ, "Integer", true); + Znd(a.L, JI, "IntObject", true); + Znd(a.P, ZI, "Language", true); + Znd(a.Q, XD, "Long", true); + Znd(a.R, MI, "LongObject", true); + Znd(a.S, ZI, "Name", true); + Znd(a.T, ZI, Swe, true); + Znd(a.U, cJ, "NegativeInteger", true); + Znd(a.V, ZI, axe, true); + Znd(a.X, yK, "NMTOKENS", true); + Znd(a.W, yK, "NMTOKENSBase", true); + Znd(a.Y, cJ, "NonNegativeInteger", true); + Znd(a.Z, cJ, "NonPositiveInteger", true); + Znd(a.$, ZI, "NormalizedString", true); + Znd(a._, ZI, "NOTATION", true); + Znd(a.ab, ZI, "PositiveInteger", true); + Znd(a.cb, ZI, "QName", true); + Znd(a.db, rbb, "Short", true); + Znd(a.eb, UI, "ShortObject", true); + Znd(a.gb, ZI, Vie, true); + Znd(a.hb, ZI, "Time", true); + Znd(a.ib, ZI, "Token", true); + Znd(a.jb, rbb, "UnsignedByte", true); + Znd(a.kb, UI, "UnsignedByteObject", true); + Znd(a.lb, XD, "UnsignedInt", true); + Znd(a.mb, MI, "UnsignedIntObject", true); + Znd(a.nb, cJ, "UnsignedLong", true); + Znd(a.ob, WD, "UnsignedShort", true); + Znd(a.pb, JI, "UnsignedShortObject", true); + Rnd(a, Ewe); + _9d(a); + } + function Oyc(a) { + r4c(a, new E3c(Q3c(L3c(P3c(M3c(O3c(N3c(new R3c(), sne), "ELK Layered"), "Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level."), new Ryc()), sne), qqb((Csd(), Bsd), OC(GC(O3, 1), Kie, 237, 0, [ysd, zsd, xsd, Asd, vsd, usd]))))); + p4c(a, sne, Lpe, Ksd(iyc)); + p4c(a, sne, Mpe, Ksd(jyc)); + p4c(a, sne, Zle, Ksd(kyc)); + p4c(a, sne, Npe, Ksd(lyc)); + p4c(a, sne, xme, Ksd(nyc)); + p4c(a, sne, Ope, Ksd(oyc)); + p4c(a, sne, Ppe, Ksd(ryc)); + p4c(a, sne, Qpe, Ksd(tyc)); + p4c(a, sne, Rpe, Ksd(uyc)); + p4c(a, sne, Spe, Ksd(syc)); + p4c(a, sne, wme, Ksd(vyc)); + p4c(a, sne, Tpe, Ksd(xyc)); + p4c(a, sne, Upe, Ksd(zyc)); + p4c(a, sne, Vpe, Ksd(qyc)); + p4c(a, sne, Loe, Ksd(hyc)); + p4c(a, sne, Noe, Ksd(myc)); + p4c(a, sne, Moe, Ksd(pyc)); + p4c(a, sne, Ooe, Ksd(wyc)); + p4c(a, sne, vme, meb(0)); + p4c(a, sne, Poe, Ksd(cyc)); + p4c(a, sne, Qoe, Ksd(dyc)); + p4c(a, sne, Roe, Ksd(eyc)); + p4c(a, sne, Yoe, Ksd(Kyc)); + p4c(a, sne, Zoe, Ksd(Cyc)); + p4c(a, sne, $oe, Ksd(Dyc)); + p4c(a, sne, _oe, Ksd(Gyc)); + p4c(a, sne, ape, Ksd(Eyc)); + p4c(a, sne, bpe, Ksd(Fyc)); + p4c(a, sne, cpe, Ksd(Myc)); + p4c(a, sne, dpe, Ksd(Lyc)); + p4c(a, sne, epe, Ksd(Iyc)); + p4c(a, sne, fpe, Ksd(Hyc)); + p4c(a, sne, gpe, Ksd(Jyc)); + p4c(a, sne, Eoe, Ksd(Cxc)); + p4c(a, sne, Foe, Ksd(Dxc)); + p4c(a, sne, Ioe, Ksd(Xwc)); + p4c(a, sne, Joe, Ksd(Ywc)); + p4c(a, sne, ame, Lxc); + p4c(a, sne, ype, Twc); + p4c(a, sne, Wpe, 0); + p4c(a, sne, yme, meb(1)); + p4c(a, sne, _le, tme); + p4c(a, sne, Xpe, Ksd(Jxc)); + p4c(a, sne, Bme, Ksd(Vxc)); + p4c(a, sne, Ype, Ksd($xc)); + p4c(a, sne, Zpe, Ksd(Kwc)); + p4c(a, sne, $pe, Ksd(mwc)); + p4c(a, sne, tpe, Ksd(axc)); + p4c(a, sne, zme, (Bcb(), true)); + p4c(a, sne, _pe, Ksd(fxc)); + p4c(a, sne, aqe, Ksd(gxc)); + p4c(a, sne, Fme, Ksd(Fxc)); + p4c(a, sne, Eme, Ksd(Ixc)); + p4c(a, sne, bqe, Ksd(Gxc)); + p4c(a, sne, cqe, Nwc); + p4c(a, sne, Gme, Ksd(xxc)); + p4c(a, sne, dqe, Ksd(wxc)); + p4c(a, sne, Hme, Ksd(Yxc)); + p4c(a, sne, eqe, Ksd(Xxc)); + p4c(a, sne, fqe, Ksd(Zxc)); + p4c(a, sne, gqe, Oxc); + p4c(a, sne, hqe, Ksd(Qxc)); + p4c(a, sne, iqe, Ksd(Rxc)); + p4c(a, sne, jqe, Ksd(Sxc)); + p4c(a, sne, kqe, Ksd(Pxc)); + p4c(a, sne, eoe, Ksd(Byc)); + p4c(a, sne, hoe, Ksd(sxc)); + p4c(a, sne, noe, Ksd(rxc)); + p4c(a, sne, doe, Ksd(Ayc)); + p4c(a, sne, ioe, Ksd(mxc)); + p4c(a, sne, goe, Ksd(Jwc)); + p4c(a, sne, qoe, Ksd(Iwc)); + p4c(a, sne, roe, Ksd(Awc)); + p4c(a, sne, woe, Ksd(Bwc)); + p4c(a, sne, xoe, Ksd(Dwc)); + p4c(a, sne, yoe, Ksd(Cwc)); + p4c(a, sne, toe, Ksd(Hwc)); + p4c(a, sne, _ne, Ksd(uxc)); + p4c(a, sne, aoe, Ksd(vxc)); + p4c(a, sne, $ne, Ksd(ixc)); + p4c(a, sne, zoe, Ksd(Exc)); + p4c(a, sne, Coe, Ksd(zxc)); + p4c(a, sne, Zne, Ksd($wc)); + p4c(a, sne, Doe, Ksd(Bxc)); + p4c(a, sne, Goe, Ksd(Vwc)); + p4c(a, sne, Hoe, Ksd(Wwc)); + p4c(a, sne, lqe, Ksd(zwc)); + p4c(a, sne, Boe, Ksd(yxc)); + p4c(a, sne, Toe, Ksd(swc)); + p4c(a, sne, Uoe, Ksd(rwc)); + p4c(a, sne, Soe, Ksd(qwc)); + p4c(a, sne, Voe, Ksd(cxc)); + p4c(a, sne, Woe, Ksd(bxc)); + p4c(a, sne, Xoe, Ksd(dxc)); + p4c(a, sne, Tme, Ksd(Hxc)); + p4c(a, sne, mqe, Ksd(jxc)); + p4c(a, sne, $le, Ksd(Zwc)); + p4c(a, sne, nqe, Ksd(Qwc)); + p4c(a, sne, Cme, Ksd(Pwc)); + p4c(a, sne, soe, Ksd(Ewc)); + p4c(a, sne, oqe, Ksd(Wxc)); + p4c(a, sne, pqe, Ksd(pwc)); + p4c(a, sne, qqe, Ksd(exc)); + p4c(a, sne, rqe, Ksd(Txc)); + p4c(a, sne, sqe, Ksd(Mxc)); + p4c(a, sne, tqe, Ksd(Nxc)); + p4c(a, sne, loe, Ksd(oxc)); + p4c(a, sne, moe, Ksd(pxc)); + p4c(a, sne, uqe, Ksd(ayc)); + p4c(a, sne, boe, Ksd(nwc)); + p4c(a, sne, ooe, Ksd(qxc)); + p4c(a, sne, hpe, Ksd(Rwc)); + p4c(a, sne, ipe, Ksd(Owc)); + p4c(a, sne, vqe, Ksd(txc)); + p4c(a, sne, poe, Ksd(kxc)); + p4c(a, sne, Aoe, Ksd(Axc)); + p4c(a, sne, wqe, Ksd(yyc)); + p4c(a, sne, Yne, Ksd(Mwc)); + p4c(a, sne, coe, Ksd(_xc)); + p4c(a, sne, Koe, Ksd(Uwc)); + p4c(a, sne, joe, Ksd(lxc)); + p4c(a, sne, uoe, Ksd(Fwc)); + p4c(a, sne, xqe, Ksd(hxc)); + p4c(a, sne, koe, Ksd(nxc)); + p4c(a, sne, voe, Ksd(Gwc)); + p4c(a, sne, jpe, Ksd(ywc)); + p4c(a, sne, mpe, Ksd(wwc)); + p4c(a, sne, npe, Ksd(uwc)); + p4c(a, sne, ope, Ksd(vwc)); + p4c(a, sne, kpe, Ksd(xwc)); + p4c(a, sne, lpe, Ksd(twc)); + p4c(a, sne, foe, Ksd(_wc)); + } + function kee(a, b) { + var c, d; + if (!cee) { + cee = new Lqb(); + dee = new Lqb(); + d = (wfe(), wfe(), new $fe(4)); + Ree(d, " \n\r\r "); + Shb(cee, pxe, d); + Shb(dee, pxe, _fe(d)); + d = new $fe(4); + Ree(d, sxe); + Shb(cee, nxe, d); + Shb(dee, nxe, _fe(d)); + d = new $fe(4); + Ree(d, sxe); + Shb(cee, nxe, d); + Shb(dee, nxe, _fe(d)); + d = new $fe(4); + Ree(d, txe); + Xfe(d, BD(Phb(cee, nxe), 117)); + Shb(cee, oxe, d); + Shb(dee, oxe, _fe(d)); + d = new $fe(4); + Ree(d, "-.0:AZ__az··ÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁːˑ̀͠͡ͅΆΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁ҃҆ҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆֹֻֽֿֿׁׂ֑֣֡ׄׄאתװײءغـْ٠٩ٰڷںھۀێېۓە۪ۭۨ۰۹ँःअह़्॑॔क़ॣ०९ঁঃঅঌএঐওনপরললশহ়়াৄেৈো্ৗৗড়ঢ়য়ৣ০ৱਂਂਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹ਼਼ਾੂੇੈੋ੍ਖ਼ੜਫ਼ਫ਼੦ੴઁઃઅઋઍઍએઑઓનપરલળવહ઼ૅેૉો્ૠૠ૦૯ଁଃଅଌଏଐଓନପରଲଳଶହ଼ୃେୈୋ୍ୖୗଡ଼ଢ଼ୟୡ୦୯ஂஃஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹாூெைொ்ௗௗ௧௯ఁఃఅఌఎఐఒనపళవహాౄెైొ్ౕౖౠౡ౦౯ಂಃಅಌಎಐಒನಪಳವಹಾೄೆೈೊ್ೕೖೞೞೠೡ೦೯ംഃഅഌഎഐഒനപഹാൃെൈൊ്ൗൗൠൡ൦൯กฮะฺเ๎๐๙ກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະູົຽເໄໆໆ່ໍ໐໙༘༙༠༩༹༹༵༵༷༷༾ཇཉཀྵ྄ཱ྆ྋྐྕྗྗྙྭྱྷྐྵྐྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼ⃐⃜⃡⃡ΩΩKÅ℮℮ↀↂ々々〇〇〡〯〱〵ぁゔ゙゚ゝゞァヺーヾㄅㄬ一龥가힣"); + Shb(cee, qxe, d); + Shb(dee, qxe, _fe(d)); + d = new $fe(4); + Ree(d, txe); + Ufe(d, 95, 95); + Ufe(d, 58, 58); + Shb(cee, rxe, d); + Shb(dee, rxe, _fe(d)); + } + c = b ? BD(Phb(cee, a), 136) : BD(Phb(dee, a), 136); + return c; + } + function _9d(a) { + Bnd(a.a, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "anySimpleType"])); + Bnd(a.b, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "anyType", Sve, Qve])); + Bnd(BD(qud(ZKd(a.b), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, xwe, fue, ":mixed"])); + Bnd(BD(qud(ZKd(a.b), 1), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, xwe, Dwe, Fwe, fue, ":1", Owe, "lax"])); + Bnd(BD(qud(ZKd(a.b), 2), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, vwe, Dwe, Fwe, fue, ":2", Owe, "lax"])); + Bnd(a.c, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "anyURI", Cwe, ywe])); + Bnd(a.d, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "base64Binary", Cwe, ywe])); + Bnd(a.e, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Khe, Cwe, ywe])); + Bnd(a.f, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "boolean:Object", cwe, Khe])); + Bnd(a.g, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Eve])); + Bnd(a.i, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "byte:Object", cwe, Eve])); + Bnd(a.j, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "date", Cwe, ywe])); + Bnd(a.k, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "dateTime", Cwe, ywe])); + Bnd(a.n, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "decimal", Cwe, ywe])); + Bnd(a.o, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Gve, Cwe, ywe])); + Bnd(a.p, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "double:Object", cwe, Gve])); + Bnd(a.q, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "duration", Cwe, ywe])); + Bnd(a.s, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "ENTITIES", cwe, Pwe, Qwe, "1"])); + Bnd(a.r, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Pwe, zwe, Rwe])); + Bnd(a.t, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Rwe, cwe, Swe])); + Bnd(a.u, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Hve, Cwe, ywe])); + Bnd(a.v, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "float:Object", cwe, Hve])); + Bnd(a.w, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gDay", Cwe, ywe])); + Bnd(a.B, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gMonth", Cwe, ywe])); + Bnd(a.A, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gMonthDay", Cwe, ywe])); + Bnd(a.C, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gYear", Cwe, ywe])); + Bnd(a.D, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gYearMonth", Cwe, ywe])); + Bnd(a.F, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "hexBinary", Cwe, ywe])); + Bnd(a.G, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "ID", cwe, Swe])); + Bnd(a.H, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "IDREF", cwe, Swe])); + Bnd(a.J, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "IDREFS", cwe, Twe, Qwe, "1"])); + Bnd(a.I, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Twe, zwe, "IDREF"])); + Bnd(a.K, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Ive])); + Bnd(a.M, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Uwe])); + Bnd(a.L, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "int:Object", cwe, Ive])); + Bnd(a.P, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "language", cwe, Vwe, Wwe, Xwe])); + Bnd(a.Q, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Jve])); + Bnd(a.R, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "long:Object", cwe, Jve])); + Bnd(a.S, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "Name", cwe, Vwe, Wwe, Ywe])); + Bnd(a.T, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Swe, cwe, "Name", Wwe, Zwe])); + Bnd(a.U, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "negativeInteger", cwe, $we, _we, "-1"])); + Bnd(a.V, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, axe, cwe, Vwe, Wwe, "\\c+"])); + Bnd(a.X, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "NMTOKENS", cwe, bxe, Qwe, "1"])); + Bnd(a.W, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, bxe, zwe, axe])); + Bnd(a.Y, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, cxe, cwe, Uwe, dxe, "0"])); + Bnd(a.Z, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, $we, cwe, Uwe, _we, "0"])); + Bnd(a.$, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, exe, cwe, Mhe, Cwe, "replace"])); + Bnd(a._, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "NOTATION", Cwe, ywe])); + Bnd(a.ab, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "positiveInteger", cwe, cxe, dxe, "1"])); + Bnd(a.bb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "processingInstruction_._type", Sve, "empty"])); + Bnd(BD(qud(ZKd(a.bb), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, "data"])); + Bnd(BD(qud(ZKd(a.bb), 1), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, bue])); + Bnd(a.cb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "QName", Cwe, ywe])); + Bnd(a.db, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Kve])); + Bnd(a.eb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "short:Object", cwe, Kve])); + Bnd(a.fb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "simpleAnyType", Sve, twe])); + Bnd(BD(qud(ZKd(a.fb), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ":3", Sve, twe])); + Bnd(BD(qud(ZKd(a.fb), 1), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ":4", Sve, twe])); + Bnd(BD(qud(ZKd(a.fb), 2), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ":5", Sve, twe])); + Bnd(a.gb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Mhe, Cwe, "preserve"])); + Bnd(a.hb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "time", Cwe, ywe])); + Bnd(a.ib, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Vwe, cwe, exe, Cwe, ywe])); + Bnd(a.jb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, fxe, _we, "255", dxe, "0"])); + Bnd(a.kb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedByte:Object", cwe, fxe])); + Bnd(a.lb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, gxe, _we, "4294967295", dxe, "0"])); + Bnd(a.mb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedInt:Object", cwe, gxe])); + Bnd(a.nb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedLong", cwe, cxe, _we, hxe, dxe, "0"])); + Bnd(a.ob, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ixe, _we, "65535", dxe, "0"])); + Bnd(a.pb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedShort:Object", cwe, ixe])); + Bnd(a.qb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "", Sve, Qve])); + Bnd(BD(qud(ZKd(a.qb), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, xwe, fue, ":mixed"])); + Bnd(BD(qud(ZKd(a.qb), 1), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, "xmlns:prefix"])); + Bnd(BD(qud(ZKd(a.qb), 2), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, "xsi:schemaLocation"])); + Bnd(BD(qud(ZKd(a.qb), 3), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, "cDATA", Awe, Bwe])); + Bnd(BD(qud(ZKd(a.qb), 4), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, "comment", Awe, Bwe])); + Bnd(BD(qud(ZKd(a.qb), 5), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, jxe, Awe, Bwe])); + Bnd(BD(qud(ZKd(a.qb), 6), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, Ite, Awe, Bwe])); + } + function tvd(a) { + return dfb("_UI_EMFDiagnostic_marker", a) ? "EMF Problem" : dfb("_UI_CircularContainment_diagnostic", a) ? "An object may not circularly contain itself" : dfb(sue, a) ? "Wrong character." : dfb(tue, a) ? "Invalid reference number." : dfb(uue, a) ? "A character is required after \\." : dfb(vue, a) ? "'?' is not expected. '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?" : dfb(wue, a) ? "'(?<' or '(? toIndex: ", zke = ", toIndex: ", Ake = "Index: ", Bke = ", Size: ", Cke = "org.eclipse.elk.alg.common", Dke = { 62: 1 }, Eke = "org.eclipse.elk.alg.common.compaction", Fke = "Scanline/EventHandler", Gke = "org.eclipse.elk.alg.common.compaction.oned", Hke = "CNode belongs to another CGroup.", Ike = "ISpacingsHandler/1", Jke = "The ", Kke = " instance has been finished already.", Lke = "The direction ", Mke = " is not supported by the CGraph instance.", Nke = "OneDimensionalCompactor", Oke = "OneDimensionalCompactor/lambda$0$Type", Pke = "Quadruplet", Qke = "ScanlineConstraintCalculator", Rke = "ScanlineConstraintCalculator/ConstraintsScanlineHandler", Ske = "ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type", Tke = "ScanlineConstraintCalculator/Timestamp", Uke = "ScanlineConstraintCalculator/lambda$0$Type", Vke = { 169: 1, 45: 1 }, Wke = "org.eclipse.elk.alg.common.compaction.options", Xke = "org.eclipse.elk.core.data", Yke = "org.eclipse.elk.polyomino.traversalStrategy", Zke = "org.eclipse.elk.polyomino.lowLevelSort", $ke = "org.eclipse.elk.polyomino.highLevelSort", _ke = "org.eclipse.elk.polyomino.fill", ale = { 130: 1 }, ble = "polyomino", cle = "org.eclipse.elk.alg.common.networksimplex", dle = { 177: 1, 3: 1, 4: 1 }, ele = "org.eclipse.elk.alg.common.nodespacing", fle = "org.eclipse.elk.alg.common.nodespacing.cellsystem", gle = "CENTER", hle = { 212: 1, 326: 1 }, ile = { 3: 1, 4: 1, 5: 1, 595: 1 }, jle = "LEFT", kle = "RIGHT", lle = "Vertical alignment cannot be null", mle = "BOTTOM", nle = "org.eclipse.elk.alg.common.nodespacing.internal", ole = "UNDEFINED", ple = 0.01, qle = "org.eclipse.elk.alg.common.nodespacing.internal.algorithm", rle = "LabelPlacer/lambda$0$Type", sle = "LabelPlacer/lambda$1$Type", tle = "portRatioOrPosition", ule = "org.eclipse.elk.alg.common.overlaps", vle = "DOWN", wle = "org.eclipse.elk.alg.common.polyomino", xle = "NORTH", yle = "EAST", zle = "SOUTH", Ale = "WEST", Ble = "org.eclipse.elk.alg.common.polyomino.structures", Cle = "Direction", Dle = "Grid is only of size ", Ele = ". Requested point (", Fle = ") is out of bounds.", Gle = " Given center based coordinates were (", Hle = "org.eclipse.elk.graph.properties", Ile = "IPropertyHolder", Jle = { 3: 1, 94: 1, 134: 1 }, Kle = "org.eclipse.elk.alg.common.spore", Lle = "org.eclipse.elk.alg.common.utils", Mle = { 209: 1 }, Nle = "org.eclipse.elk.core", Ole = "Connected Components Compaction", Ple = "org.eclipse.elk.alg.disco", Qle = "org.eclipse.elk.alg.disco.graph", Rle = "org.eclipse.elk.alg.disco.options", Sle = "CompactionStrategy", Tle = "org.eclipse.elk.disco.componentCompaction.strategy", Ule = "org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm", Vle = "org.eclipse.elk.disco.debug.discoGraph", Wle = "org.eclipse.elk.disco.debug.discoPolys", Xle = "componentCompaction", Yle = "org.eclipse.elk.disco", Zle = "org.eclipse.elk.spacing.componentComponent", $le = "org.eclipse.elk.edge.thickness", _le = "org.eclipse.elk.aspectRatio", ame = "org.eclipse.elk.padding", bme = "org.eclipse.elk.alg.disco.transform", cme = 1.5707963267948966, dme = 17976931348623157e292, eme = { 3: 1, 4: 1, 5: 1, 192: 1 }, fme = { 3: 1, 6: 1, 4: 1, 5: 1, 106: 1, 120: 1 }, gme = "org.eclipse.elk.alg.force", hme = "ComponentsProcessor", ime = "ComponentsProcessor/1", jme = "org.eclipse.elk.alg.force.graph", kme = "Component Layout", lme = "org.eclipse.elk.alg.force.model", mme = "org.eclipse.elk.force.model", nme = "org.eclipse.elk.force.iterations", ome = "org.eclipse.elk.force.repulsivePower", pme = "org.eclipse.elk.force.temperature", qme = 1e-3, rme = "org.eclipse.elk.force.repulsion", sme = "org.eclipse.elk.alg.force.options", tme = 1.600000023841858, ume = "org.eclipse.elk.force", vme = "org.eclipse.elk.priority", wme = "org.eclipse.elk.spacing.nodeNode", xme = "org.eclipse.elk.spacing.edgeLabel", yme = "org.eclipse.elk.randomSeed", zme = "org.eclipse.elk.separateConnectedComponents", Ame = "org.eclipse.elk.interactive", Bme = "org.eclipse.elk.portConstraints", Cme = "org.eclipse.elk.edgeLabels.inline", Dme = "org.eclipse.elk.omitNodeMicroLayout", Eme = "org.eclipse.elk.nodeSize.options", Fme = "org.eclipse.elk.nodeSize.constraints", Gme = "org.eclipse.elk.nodeLabels.placement", Hme = "org.eclipse.elk.portLabels.placement", Ime = "origin", Jme = "random", Kme = "boundingBox.upLeft", Lme = "boundingBox.lowRight", Mme = "org.eclipse.elk.stress.fixed", Nme = "org.eclipse.elk.stress.desiredEdgeLength", Ome = "org.eclipse.elk.stress.dimension", Pme = "org.eclipse.elk.stress.epsilon", Qme = "org.eclipse.elk.stress.iterationLimit", Rme = "org.eclipse.elk.stress", Sme = "ELK Stress", Tme = "org.eclipse.elk.nodeSize.minimum", Ume = "org.eclipse.elk.alg.force.stress", Vme = "Layered layout", Wme = "org.eclipse.elk.alg.layered", Xme = "org.eclipse.elk.alg.layered.compaction.components", Yme = "org.eclipse.elk.alg.layered.compaction.oned", Zme = "org.eclipse.elk.alg.layered.compaction.oned.algs", $me = "org.eclipse.elk.alg.layered.compaction.recthull", _me = "org.eclipse.elk.alg.layered.components", ane = "NONE", bne = { 3: 1, 6: 1, 4: 1, 9: 1, 5: 1, 122: 1 }, cne = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 106: 1, 120: 1 }, dne = "org.eclipse.elk.alg.layered.compound", ene = { 51: 1 }, fne = "org.eclipse.elk.alg.layered.graph", gne = " -> ", hne = "Not supported by LGraph", ine = "Port side is undefined", jne = { 3: 1, 6: 1, 4: 1, 5: 1, 474: 1, 141: 1, 106: 1, 120: 1 }, kne = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 193: 1, 203: 1, 106: 1, 120: 1 }, lne = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 1943: 1, 203: 1, 106: 1, 120: 1 }, mne = `([{"' \r +`, nne = `)]}"' \r +`, one = "The given string contains parts that cannot be parsed as numbers.", pne = "org.eclipse.elk.core.math", qne = { 3: 1, 4: 1, 142: 1, 207: 1, 414: 1 }, rne = { 3: 1, 4: 1, 116: 1, 207: 1, 414: 1 }, sne = "org.eclipse.elk.layered", tne = "org.eclipse.elk.alg.layered.graph.transform", une = "ElkGraphImporter", vne = "ElkGraphImporter/lambda$0$Type", wne = "ElkGraphImporter/lambda$1$Type", xne = "ElkGraphImporter/lambda$2$Type", yne = "ElkGraphImporter/lambda$4$Type", zne = "Node margin calculation", Ane = "org.eclipse.elk.alg.layered.intermediate", Bne = "ONE_SIDED_GREEDY_SWITCH", Cne = "TWO_SIDED_GREEDY_SWITCH", Dne = "No implementation is available for the layout processor ", Ene = "IntermediateProcessorStrategy", Fne = "Node '", Gne = "FIRST_SEPARATE", Hne = "LAST_SEPARATE", Ine = "Odd port side processing", Jne = "org.eclipse.elk.alg.layered.intermediate.compaction", Kne = "org.eclipse.elk.alg.layered.intermediate.greedyswitch", Lne = "org.eclipse.elk.alg.layered.p3order.counting", Mne = { 225: 1 }, Nne = "org.eclipse.elk.alg.layered.intermediate.loops", One = "org.eclipse.elk.alg.layered.intermediate.loops.ordering", Pne = "org.eclipse.elk.alg.layered.intermediate.loops.routing", Qne = "org.eclipse.elk.alg.layered.intermediate.preserveorder", Rne = "org.eclipse.elk.alg.layered.intermediate.wrapping", Sne = "org.eclipse.elk.alg.layered.options", Tne = "INTERACTIVE", Une = "DEPTH_FIRST", Vne = "EDGE_LENGTH", Wne = "SELF_LOOPS", Xne = "firstTryWithInitialOrder", Yne = "org.eclipse.elk.layered.directionCongruency", Zne = "org.eclipse.elk.layered.feedbackEdges", $ne = "org.eclipse.elk.layered.interactiveReferencePoint", _ne = "org.eclipse.elk.layered.mergeEdges", aoe = "org.eclipse.elk.layered.mergeHierarchyEdges", boe = "org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides", coe = "org.eclipse.elk.layered.portSortingStrategy", doe = "org.eclipse.elk.layered.thoroughness", eoe = "org.eclipse.elk.layered.unnecessaryBendpoints", foe = "org.eclipse.elk.layered.generatePositionAndLayerIds", goe = "org.eclipse.elk.layered.cycleBreaking.strategy", hoe = "org.eclipse.elk.layered.layering.strategy", ioe = "org.eclipse.elk.layered.layering.layerConstraint", joe = "org.eclipse.elk.layered.layering.layerChoiceConstraint", koe = "org.eclipse.elk.layered.layering.layerId", loe = "org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth", moe = "org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor", noe = "org.eclipse.elk.layered.layering.nodePromotion.strategy", ooe = "org.eclipse.elk.layered.layering.nodePromotion.maxIterations", poe = "org.eclipse.elk.layered.layering.coffmanGraham.layerBound", qoe = "org.eclipse.elk.layered.crossingMinimization.strategy", roe = "org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder", soe = "org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness", toe = "org.eclipse.elk.layered.crossingMinimization.semiInteractive", uoe = "org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint", voe = "org.eclipse.elk.layered.crossingMinimization.positionId", woe = "org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold", xoe = "org.eclipse.elk.layered.crossingMinimization.greedySwitch.type", yoe = "org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type", zoe = "org.eclipse.elk.layered.nodePlacement.strategy", Aoe = "org.eclipse.elk.layered.nodePlacement.favorStraightEdges", Boe = "org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening", Coe = "org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment", Doe = "org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening", Eoe = "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility", Foe = "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default", Goe = "org.eclipse.elk.layered.edgeRouting.selfLoopDistribution", Hoe = "org.eclipse.elk.layered.edgeRouting.selfLoopOrdering", Ioe = "org.eclipse.elk.layered.edgeRouting.splines.mode", Joe = "org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor", Koe = "org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth", Loe = "org.eclipse.elk.layered.spacing.baseValue", Moe = "org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers", Noe = "org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers", Ooe = "org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers", Poe = "org.eclipse.elk.layered.priority.direction", Qoe = "org.eclipse.elk.layered.priority.shortness", Roe = "org.eclipse.elk.layered.priority.straightness", Soe = "org.eclipse.elk.layered.compaction.connectedComponents", Toe = "org.eclipse.elk.layered.compaction.postCompaction.strategy", Uoe = "org.eclipse.elk.layered.compaction.postCompaction.constraints", Voe = "org.eclipse.elk.layered.highDegreeNodes.treatment", Woe = "org.eclipse.elk.layered.highDegreeNodes.threshold", Xoe = "org.eclipse.elk.layered.highDegreeNodes.treeHeight", Yoe = "org.eclipse.elk.layered.wrapping.strategy", Zoe = "org.eclipse.elk.layered.wrapping.additionalEdgeSpacing", $oe = "org.eclipse.elk.layered.wrapping.correctionFactor", _oe = "org.eclipse.elk.layered.wrapping.cutting.strategy", ape = "org.eclipse.elk.layered.wrapping.cutting.cuts", bpe = "org.eclipse.elk.layered.wrapping.cutting.msd.freedom", cpe = "org.eclipse.elk.layered.wrapping.validify.strategy", dpe = "org.eclipse.elk.layered.wrapping.validify.forbiddenIndices", epe = "org.eclipse.elk.layered.wrapping.multiEdge.improveCuts", fpe = "org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty", gpe = "org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges", hpe = "org.eclipse.elk.layered.edgeLabels.sideSelection", ipe = "org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy", jpe = "org.eclipse.elk.layered.considerModelOrder.strategy", kpe = "org.eclipse.elk.layered.considerModelOrder.noModelOrder", lpe = "org.eclipse.elk.layered.considerModelOrder.components", mpe = "org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy", npe = "org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence", ope = "org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence", ppe = "layering", qpe = "layering.minWidth", rpe = "layering.nodePromotion", spe = "crossingMinimization", tpe = "org.eclipse.elk.hierarchyHandling", upe = "crossingMinimization.greedySwitch", vpe = "nodePlacement", wpe = "nodePlacement.bk", xpe = "edgeRouting", ype = "org.eclipse.elk.edgeRouting", zpe = "spacing", Ape = "priority", Bpe = "compaction", Cpe = "compaction.postCompaction", Dpe = "Specifies whether and how post-process compaction is applied.", Epe = "highDegreeNodes", Fpe = "wrapping", Gpe = "wrapping.cutting", Hpe = "wrapping.validify", Ipe = "wrapping.multiEdge", Jpe = "edgeLabels", Kpe = "considerModelOrder", Lpe = "org.eclipse.elk.spacing.commentComment", Mpe = "org.eclipse.elk.spacing.commentNode", Npe = "org.eclipse.elk.spacing.edgeEdge", Ope = "org.eclipse.elk.spacing.edgeNode", Ppe = "org.eclipse.elk.spacing.labelLabel", Qpe = "org.eclipse.elk.spacing.labelPortHorizontal", Rpe = "org.eclipse.elk.spacing.labelPortVertical", Spe = "org.eclipse.elk.spacing.labelNode", Tpe = "org.eclipse.elk.spacing.nodeSelfLoop", Upe = "org.eclipse.elk.spacing.portPort", Vpe = "org.eclipse.elk.spacing.individual", Wpe = "org.eclipse.elk.port.borderOffset", Xpe = "org.eclipse.elk.noLayout", Ype = "org.eclipse.elk.port.side", Zpe = "org.eclipse.elk.debugMode", $pe = "org.eclipse.elk.alignment", _pe = "org.eclipse.elk.insideSelfLoops.activate", aqe = "org.eclipse.elk.insideSelfLoops.yo", bqe = "org.eclipse.elk.nodeSize.fixedGraphSize", cqe = "org.eclipse.elk.direction", dqe = "org.eclipse.elk.nodeLabels.padding", eqe = "org.eclipse.elk.portLabels.nextToPortIfPossible", fqe = "org.eclipse.elk.portLabels.treatAsGroup", gqe = "org.eclipse.elk.portAlignment.default", hqe = "org.eclipse.elk.portAlignment.north", iqe = "org.eclipse.elk.portAlignment.south", jqe = "org.eclipse.elk.portAlignment.west", kqe = "org.eclipse.elk.portAlignment.east", lqe = "org.eclipse.elk.contentAlignment", mqe = "org.eclipse.elk.junctionPoints", nqe = "org.eclipse.elk.edgeLabels.placement", oqe = "org.eclipse.elk.port.index", pqe = "org.eclipse.elk.commentBox", qqe = "org.eclipse.elk.hypernode", rqe = "org.eclipse.elk.port.anchor", sqe = "org.eclipse.elk.partitioning.activate", tqe = "org.eclipse.elk.partitioning.partition", uqe = "org.eclipse.elk.position", vqe = "org.eclipse.elk.margins", wqe = "org.eclipse.elk.spacing.portsSurrounding", xqe = "org.eclipse.elk.interactiveLayout", yqe = "org.eclipse.elk.core.util", zqe = { 3: 1, 4: 1, 5: 1, 593: 1 }, Aqe = "NETWORK_SIMPLEX", Bqe = { 123: 1, 51: 1 }, Cqe = "org.eclipse.elk.alg.layered.p1cycles", Dqe = "org.eclipse.elk.alg.layered.p2layers", Eqe = { 402: 1, 225: 1 }, Fqe = { 832: 1, 3: 1, 4: 1 }, Gqe = "org.eclipse.elk.alg.layered.p3order", Hqe = "org.eclipse.elk.alg.layered.p4nodes", Iqe = { 3: 1, 4: 1, 5: 1, 840: 1 }, Jqe = 1e-5, Kqe = "org.eclipse.elk.alg.layered.p4nodes.bk", Lqe = "org.eclipse.elk.alg.layered.p5edges", Mqe = "org.eclipse.elk.alg.layered.p5edges.orthogonal", Nqe = "org.eclipse.elk.alg.layered.p5edges.orthogonal.direction", Oqe = 1e-6, Pqe = "org.eclipse.elk.alg.layered.p5edges.splines", Qqe = 0.09999999999999998, Rqe = 1e-8, Sqe = 4.71238898038469, Tqe = 3.141592653589793, Uqe = "org.eclipse.elk.alg.mrtree", Vqe = "org.eclipse.elk.alg.mrtree.graph", Wqe = "org.eclipse.elk.alg.mrtree.intermediate", Xqe = "Set neighbors in level", Yqe = "DESCENDANTS", Zqe = "org.eclipse.elk.mrtree.weighting", $qe = "org.eclipse.elk.mrtree.searchOrder", _qe = "org.eclipse.elk.alg.mrtree.options", are = "org.eclipse.elk.mrtree", bre = "org.eclipse.elk.tree", cre = "org.eclipse.elk.alg.radial", dre = 6.283185307179586, ere = 5e-324, fre = "org.eclipse.elk.alg.radial.intermediate", gre = "org.eclipse.elk.alg.radial.intermediate.compaction", hre = { 3: 1, 4: 1, 5: 1, 106: 1 }, ire = "org.eclipse.elk.alg.radial.intermediate.optimization", jre = "No implementation is available for the layout option ", kre = "org.eclipse.elk.alg.radial.options", lre = "org.eclipse.elk.radial.orderId", mre = "org.eclipse.elk.radial.radius", nre = "org.eclipse.elk.radial.compactor", ore = "org.eclipse.elk.radial.compactionStepSize", pre = "org.eclipse.elk.radial.sorter", qre = "org.eclipse.elk.radial.wedgeCriteria", rre = "org.eclipse.elk.radial.optimizationCriteria", sre = "org.eclipse.elk.radial", tre = "org.eclipse.elk.alg.radial.p1position.wedge", ure = "org.eclipse.elk.alg.radial.sorting", vre = 5.497787143782138, wre = 3.9269908169872414, xre = 2.356194490192345, yre = "org.eclipse.elk.alg.rectpacking", zre = "org.eclipse.elk.alg.rectpacking.firstiteration", Are = "org.eclipse.elk.alg.rectpacking.options", Bre = "org.eclipse.elk.rectpacking.optimizationGoal", Cre = "org.eclipse.elk.rectpacking.lastPlaceShift", Dre = "org.eclipse.elk.rectpacking.currentPosition", Ere = "org.eclipse.elk.rectpacking.desiredPosition", Fre = "org.eclipse.elk.rectpacking.onlyFirstIteration", Gre = "org.eclipse.elk.rectpacking.rowCompaction", Hre = "org.eclipse.elk.rectpacking.expandToAspectRatio", Ire = "org.eclipse.elk.rectpacking.targetWidth", Jre = "org.eclipse.elk.expandNodes", Kre = "org.eclipse.elk.rectpacking", Lre = "org.eclipse.elk.alg.rectpacking.util", Mre = "No implementation available for ", Nre = "org.eclipse.elk.alg.spore", Ore = "org.eclipse.elk.alg.spore.options", Pre = "org.eclipse.elk.sporeCompaction", Qre = "org.eclipse.elk.underlyingLayoutAlgorithm", Rre = "org.eclipse.elk.processingOrder.treeConstruction", Sre = "org.eclipse.elk.processingOrder.spanningTreeCostFunction", Tre = "org.eclipse.elk.processingOrder.preferredRoot", Ure = "org.eclipse.elk.processingOrder.rootSelection", Vre = "org.eclipse.elk.structure.structureExtractionStrategy", Wre = "org.eclipse.elk.compaction.compactionStrategy", Xre = "org.eclipse.elk.compaction.orthogonal", Yre = "org.eclipse.elk.overlapRemoval.maxIterations", Zre = "org.eclipse.elk.overlapRemoval.runScanline", $re = "processingOrder", _re = "overlapRemoval", ase = "org.eclipse.elk.sporeOverlap", bse = "org.eclipse.elk.alg.spore.p1structure", cse = "org.eclipse.elk.alg.spore.p2processingorder", dse = "org.eclipse.elk.alg.spore.p3execution", ese = "Invalid index: ", fse = "org.eclipse.elk.core.alg", gse = { 331: 1 }, hse = { 288: 1 }, ise = "Make sure its type is registered with the ", jse = " utility class.", kse = "true", lse = "false", mse = "Couldn't clone property '", nse = 0.05, ose = "org.eclipse.elk.core.options", pse = 1.2999999523162842, qse = "org.eclipse.elk.box", rse = "org.eclipse.elk.box.packingMode", sse = "org.eclipse.elk.algorithm", tse = "org.eclipse.elk.resolvedAlgorithm", use = "org.eclipse.elk.bendPoints", vse = "org.eclipse.elk.labelManager", wse = "org.eclipse.elk.scaleFactor", xse = "org.eclipse.elk.animate", yse = "org.eclipse.elk.animTimeFactor", zse = "org.eclipse.elk.layoutAncestors", Ase = "org.eclipse.elk.maxAnimTime", Bse = "org.eclipse.elk.minAnimTime", Cse = "org.eclipse.elk.progressBar", Dse = "org.eclipse.elk.validateGraph", Ese = "org.eclipse.elk.validateOptions", Fse = "org.eclipse.elk.zoomToFit", Gse = "org.eclipse.elk.font.name", Hse = "org.eclipse.elk.font.size", Ise = "org.eclipse.elk.edge.type", Jse = "partitioning", Kse = "nodeLabels", Lse = "portAlignment", Mse = "nodeSize", Nse = "port", Ose = "portLabels", Pse = "insideSelfLoops", Qse = "org.eclipse.elk.fixed", Rse = "org.eclipse.elk.random", Sse = "port must have a parent node to calculate the port side", Tse = "The edge needs to have exactly one edge section. Found: ", Use = "org.eclipse.elk.core.util.adapters", Vse = "org.eclipse.emf.ecore", Wse = "org.eclipse.elk.graph", Xse = "EMapPropertyHolder", Yse = "ElkBendPoint", Zse = "ElkGraphElement", $se = "ElkConnectableShape", _se = "ElkEdge", ate = "ElkEdgeSection", bte = "EModelElement", cte = "ENamedElement", dte = "ElkLabel", ete = "ElkNode", fte = "ElkPort", gte = { 92: 1, 90: 1 }, hte = "org.eclipse.emf.common.notify.impl", ite = "The feature '", jte = "' is not a valid changeable feature", kte = "Expecting null", lte = "' is not a valid feature", mte = "The feature ID", nte = " is not a valid feature ID", ote = 32768, pte = { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1 }, qte = "org.eclipse.emf.ecore.impl", rte = "org.eclipse.elk.graph.impl", ste = "Recursive containment not allowed for ", tte = "The datatype '", ute = "' is not a valid classifier", vte = "The value '", wte = { 190: 1, 3: 1, 4: 1 }, xte = "The class '", yte = "http://www.eclipse.org/elk/ElkGraph", zte = 1024, Ate = "property", Bte = "value", Cte = "source", Dte = "properties", Ete = "identifier", Fte = "height", Gte = "width", Hte = "parent", Ite = "text", Jte = "children", Kte = "hierarchical", Lte = "sources", Mte = "targets", Nte = "sections", Ote = "bendPoints", Pte = "outgoingShape", Qte = "incomingShape", Rte = "outgoingSections", Ste = "incomingSections", Tte = "org.eclipse.emf.common.util", Ute = "Severe implementation error in the Json to ElkGraph importer.", Vte = "id", Wte = "org.eclipse.elk.graph.json", Xte = "Unhandled parameter types: ", Yte = "startPoint", Zte = "An edge must have at least one source and one target (edge id: '", $te = "').", _te = "Referenced edge section does not exist: ", aue = " (edge id: '", bue = "target", cue = "sourcePoint", due = "targetPoint", eue = "group", fue = "name", gue = "connectableShape cannot be null", hue = "edge cannot be null", iue = "Passed edge is not 'simple'.", jue = "org.eclipse.elk.graph.util", kue = "The 'no duplicates' constraint is violated", lue = "targetIndex=", mue = ", size=", nue = "sourceIndex=", oue = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1 }, pue = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 47: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 588: 1 }, que = "logging", rue = "measureExecutionTime", sue = "parser.parse.1", tue = "parser.parse.2", uue = "parser.next.1", vue = "parser.next.2", wue = "parser.next.3", xue = "parser.next.4", yue = "parser.factor.1", zue = "parser.factor.2", Aue = "parser.factor.3", Bue = "parser.factor.4", Cue = "parser.factor.5", Due = "parser.factor.6", Eue = "parser.atom.1", Fue = "parser.atom.2", Gue = "parser.atom.3", Hue = "parser.atom.4", Iue = "parser.atom.5", Jue = "parser.cc.1", Kue = "parser.cc.2", Lue = "parser.cc.3", Mue = "parser.cc.5", Nue = "parser.cc.6", Oue = "parser.cc.7", Pue = "parser.cc.8", Que = "parser.ope.1", Rue = "parser.ope.2", Sue = "parser.ope.3", Tue = "parser.descape.1", Uue = "parser.descape.2", Vue = "parser.descape.3", Wue = "parser.descape.4", Xue = "parser.descape.5", Yue = "parser.process.1", Zue = "parser.quantifier.1", $ue = "parser.quantifier.2", _ue = "parser.quantifier.3", ave = "parser.quantifier.4", bve = "parser.quantifier.5", cve = "org.eclipse.emf.common.notify", dve = { 415: 1, 672: 1 }, eve = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1 }, fve = { 366: 1, 143: 1 }, gve = "index=", hve = { 3: 1, 4: 1, 5: 1, 126: 1 }, ive = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 58: 1 }, jve = { 3: 1, 6: 1, 4: 1, 5: 1, 192: 1 }, kve = { 3: 1, 4: 1, 5: 1, 165: 1, 367: 1 }, lve = ";/?:@&=+$,", mve = "invalid authority: ", nve = "EAnnotation", ove = "ETypedElement", pve = "EStructuralFeature", qve = "EAttribute", rve = "EClassifier", sve = "EEnumLiteral", tve = "EGenericType", uve = "EOperation", vve = "EParameter", wve = "EReference", xve = "ETypeParameter", yve = "org.eclipse.emf.ecore.util", zve = { 76: 1 }, Ave = { 3: 1, 20: 1, 14: 1, 15: 1, 58: 1, 589: 1, 76: 1, 69: 1, 95: 1 }, Bve = "org.eclipse.emf.ecore.util.FeatureMap$Entry", Cve = 8192, Dve = 2048, Eve = "byte", Fve = "char", Gve = "double", Hve = "float", Ive = "int", Jve = "long", Kve = "short", Lve = "java.lang.Object", Mve = { 3: 1, 4: 1, 5: 1, 247: 1 }, Nve = { 3: 1, 4: 1, 5: 1, 673: 1 }, Ove = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 69: 1 }, Pve = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, Qve = "mixed", Rve = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData", Sve = "kind", Tve = { 3: 1, 4: 1, 5: 1, 674: 1 }, Uve = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, Vve = { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 69: 1 }, Wve = { 47: 1, 125: 1, 279: 1 }, Xve = { 72: 1, 332: 1 }, Yve = "The value of type '", Zve = "' must be of type '", $ve = 1316, _ve = "http://www.eclipse.org/emf/2002/Ecore", awe = -32768, bwe = "constraints", cwe = "baseType", dwe = "getEStructuralFeature", ewe = "getFeatureID", fwe = "feature", gwe = "getOperationID", hwe = "operation", iwe = "defaultValue", jwe = "eTypeParameters", kwe = "isInstance", lwe = "getEEnumLiteral", mwe = "eContainingClass", nwe = { 55: 1 }, owe = { 3: 1, 4: 1, 5: 1, 119: 1 }, pwe = "org.eclipse.emf.ecore.resource", qwe = { 92: 1, 90: 1, 591: 1, 1935: 1 }, rwe = "org.eclipse.emf.ecore.resource.impl", swe = "unspecified", twe = "simple", uwe = "attribute", vwe = "attributeWildcard", wwe = "element", xwe = "elementWildcard", ywe = "collapse", zwe = "itemType", Awe = "namespace", Bwe = "##targetNamespace", Cwe = "whiteSpace", Dwe = "wildcards", Ewe = "http://www.eclipse.org/emf/2003/XMLType", Fwe = "##any", Gwe = "uninitialized", Hwe = "The multiplicity constraint is violated", Iwe = "org.eclipse.emf.ecore.xml.type", Jwe = "ProcessingInstruction", Kwe = "SimpleAnyType", Lwe = "XMLTypeDocumentRoot", Mwe = "org.eclipse.emf.ecore.xml.type.impl", Nwe = "INF", Owe = "processing", Pwe = "ENTITIES_._base", Qwe = "minLength", Rwe = "ENTITY", Swe = "NCName", Twe = "IDREFS_._base", Uwe = "integer", Vwe = "token", Wwe = "pattern", Xwe = "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*", Ywe = "\\i\\c*", Zwe = "[\\i-[:]][\\c-[:]]*", $we = "nonPositiveInteger", _we = "maxInclusive", axe = "NMTOKEN", bxe = "NMTOKENS_._base", cxe = "nonNegativeInteger", dxe = "minInclusive", exe = "normalizedString", fxe = "unsignedByte", gxe = "unsignedInt", hxe = "18446744073709551615", ixe = "unsignedShort", jxe = "processingInstruction", kxe = "org.eclipse.emf.ecore.xml.type.internal", lxe = 1114111, mxe = "Internal Error: shorthands: \\u", nxe = "xml:isDigit", oxe = "xml:isWord", pxe = "xml:isSpace", qxe = "xml:isNameChar", rxe = "xml:isInitialNameChar", sxe = "09٠٩۰۹०९০৯੦੯૦૯୦୯௧௯౦౯೦೯൦൯๐๙໐໙༠༩", txe = "AZazÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁΆΆΈΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆאתװײءغفيٱڷںھۀێېۓەەۥۦअहऽऽक़ॡঅঌএঐওনপরললশহড়ঢ়য়ৡৰৱਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹਖ਼ੜਫ਼ਫ਼ੲੴઅઋઍઍએઑઓનપરલળવહઽઽૠૠଅଌଏଐଓନପରଲଳଶହଽଽଡ଼ଢ଼ୟୡஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹఅఌఎఐఒనపళవహౠౡಅಌಎಐಒನಪಳವಹೞೞೠೡഅഌഎഐഒനപഹൠൡกฮะะาำเๅກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະະາຳຽຽເໄཀཇཉཀྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼΩΩKÅ℮℮ↀↂ〇〇〡〩ぁゔァヺㄅㄬ一龥가힣", uxe = "Private Use", vxe = "ASSIGNED", wxe = "\0€ÿĀſƀɏɐʯʰ˿̀ͯͰϿЀӿ԰֏֐׿؀ۿ܀ݏހ޿ऀॿঀ৿਀੿઀૿଀୿஀௿ఀ౿ಀ೿ഀൿ඀෿฀๿຀໿ༀ࿿က႟Ⴀჿᄀᇿሀ፿Ꭰ᏿᐀ᙿ ᚟ᚠ᛿ក៿᠀᢯Ḁỿἀ῿ ⁰₟₠⃏⃐⃿℀⅏⅐↏←⇿∀⋿⌀⏿␀␿⑀⑟①⓿─╿▀▟■◿☀⛿✀➿⠀⣿⺀⻿⼀⿟⿰⿿ 〿぀ゟ゠ヿ㄀ㄯ㄰㆏㆐㆟ㆠㆿ㈀㋿㌀㏿㐀䶵一鿿ꀀ꒏꒐꓏가힣豈﫿ffﭏﭐ﷿︠︯︰﹏﹐﹯ﹰ﻾\uFEFF\uFEFF＀￯", xxe = "UNASSIGNED", yxe = { 3: 1, 117: 1 }, zxe = "org.eclipse.emf.ecore.xml.type.util", Axe = { 3: 1, 4: 1, 5: 1, 368: 1 }, Bxe = "org.eclipse.xtext.xbase.lib", Cxe = "Cannot add elements to a Range", Dxe = "Cannot set elements in a Range", Exe = "Cannot remove elements from a Range", Fxe = "locale", Gxe = "default", Hxe = "user.agent"; + var _, _bb, Wbb; + $wnd.goog = $wnd.goog || {}; + $wnd.goog.global = $wnd.goog.global || $wnd; + acb(); + bcb(1, null, {}, nb); + _.Fb = function ob(a) { + return mb(this, a); + }; + _.Gb = function qb() { + return this.gm; + }; + _.Hb = function sb() { + return FCb(this); + }; + _.Ib = function ub() { + var a; + return hdb(rb(this)) + "@" + (a = tb(this) >>> 0, a.toString(16)); + }; + _.equals = function(a) { + return this.Fb(a); + }; + _.hashCode = function() { + return this.Hb(); + }; + _.toString = function() { + return this.Ib(); + }; + var xD, yD, zD; + bcb(290, 1, { 290: 1, 2026: 1 }, jdb); + _.le = function kdb(a) { + var b; + b = new jdb(); + b.i = 4; + a > 1 ? b.c = rdb(this, a - 1) : b.c = this; + return b; + }; + _.me = function qdb() { + fdb(this); + return this.b; + }; + _.ne = function sdb() { + return hdb(this); + }; + _.oe = function udb() { + return fdb(this), this.k; + }; + _.pe = function wdb() { + return (this.i & 4) != 0; + }; + _.qe = function xdb() { + return (this.i & 1) != 0; + }; + _.Ib = function Adb() { + return idb(this); + }; + _.i = 0; + var SI = mdb(Phe, "Object", 1); + var AI = mdb(Phe, "Class", 290); + bcb(1998, 1, Qhe); + mdb(Rhe, "Optional", 1998); + bcb(1170, 1998, Qhe, xb); + _.Fb = function yb(a) { + return a === this; + }; + _.Hb = function zb() { + return 2040732332; + }; + _.Ib = function Ab() { + return "Optional.absent()"; + }; + _.Jb = function Bb(a) { + Qb(a); + return wb(), vb; + }; + var vb; + mdb(Rhe, "Absent", 1170); + bcb(628, 1, {}, Gb); + mdb(Rhe, "Joiner", 628); + var _D = odb(Rhe, "Predicate"); + bcb(582, 1, { 169: 1, 582: 1, 3: 1, 45: 1 }, Yb); + _.Mb = function ac(a) { + return Xb(this, a); + }; + _.Lb = function Zb(a) { + return Xb(this, a); + }; + _.Fb = function $b(a) { + var b; + if (JD(a, 582)) { + b = BD(a, 582); + return At(this.a, b.a); + } + return false; + }; + _.Hb = function _b() { + return qmb(this.a) + 306654252; + }; + _.Ib = function bc() { + return Wb(this.a); + }; + mdb(Rhe, "Predicates/AndPredicate", 582); + bcb(408, 1998, { 408: 1, 3: 1 }, cc); + _.Fb = function dc(a) { + var b; + if (JD(a, 408)) { + b = BD(a, 408); + return pb(this.a, b.a); + } + return false; + }; + _.Hb = function ec() { + return 1502476572 + tb(this.a); + }; + _.Ib = function fc() { + return Whe + this.a + ")"; + }; + _.Jb = function gc(a) { + return new cc(Rb(a.Kb(this.a), "the Function passed to Optional.transform() must not return null.")); + }; + mdb(Rhe, "Present", 408); + bcb(198, 1, Yhe); + _.Nb = function kc(a) { + Rrb(this, a); + }; + _.Qb = function lc() { + jc(); + }; + mdb(Zhe, "UnmodifiableIterator", 198); + bcb(1978, 198, $he); + _.Qb = function nc() { + jc(); + }; + _.Rb = function mc(a) { + throw vbb(new bgb()); + }; + _.Wb = function oc(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "UnmodifiableListIterator", 1978); + bcb(386, 1978, $he); + _.Ob = function rc() { + return this.c < this.d; + }; + _.Sb = function sc() { + return this.c > 0; + }; + _.Pb = function tc() { + if (this.c >= this.d) { + throw vbb(new utb()); + } + return this.Xb(this.c++); + }; + _.Tb = function uc() { + return this.c; + }; + _.Ub = function vc() { + if (this.c <= 0) { + throw vbb(new utb()); + } + return this.Xb(--this.c); + }; + _.Vb = function wc() { + return this.c - 1; + }; + _.c = 0; + _.d = 0; + mdb(Zhe, "AbstractIndexedListIterator", 386); + bcb(699, 198, Yhe); + _.Ob = function Ac() { + return xc(this); + }; + _.Pb = function Bc() { + return yc(this); + }; + _.e = 1; + mdb(Zhe, "AbstractIterator", 699); + bcb(1986, 1, { 224: 1 }); + _.Zb = function Hc() { + var a; + return a = this.f, !a ? this.f = this.ac() : a; + }; + _.Fb = function Ic(a) { + return hw(this, a); + }; + _.Hb = function Jc() { + return tb(this.Zb()); + }; + _.dc = function Kc() { + return this.gc() == 0; + }; + _.ec = function Lc() { + return Ec(this); + }; + _.Ib = function Mc() { + return fcb(this.Zb()); + }; + mdb(Zhe, "AbstractMultimap", 1986); + bcb(726, 1986, _he); + _.$b = function Xc() { + Nc(this); + }; + _._b = function Yc(a) { + return Oc(this, a); + }; + _.ac = function Zc() { + return new ne(this, this.c); + }; + _.ic = function $c(a) { + return this.hc(); + }; + _.bc = function _c() { + return new zf(this, this.c); + }; + _.jc = function ad() { + return this.mc(this.hc()); + }; + _.kc = function bd() { + return new Hd(this); + }; + _.lc = function cd() { + return Yj(this.c.vc().Nc(), new $g(), 64, this.d); + }; + _.cc = function dd(a) { + return Qc(this, a); + }; + _.fc = function gd(a) { + return Sc(this, a); + }; + _.gc = function hd() { + return this.d; + }; + _.mc = function jd(a) { + return mmb(), new lnb(a); + }; + _.nc = function kd() { + return new Dd(this); + }; + _.oc = function ld() { + return Yj(this.c.Cc().Nc(), new Fd(), 64, this.d); + }; + _.pc = function md(a, b) { + return new dg(this, a, b, null); + }; + _.d = 0; + mdb(Zhe, "AbstractMapBasedMultimap", 726); + bcb(1631, 726, _he); + _.hc = function pd() { + return new Skb(this.a); + }; + _.jc = function qd() { + return mmb(), mmb(), jmb; + }; + _.cc = function sd(a) { + return BD(Qc(this, a), 15); + }; + _.fc = function ud(a) { + return BD(Sc(this, a), 15); + }; + _.Zb = function od() { + return nd(this); + }; + _.Fb = function rd(a) { + return hw(this, a); + }; + _.qc = function td(a) { + return BD(Qc(this, a), 15); + }; + _.rc = function vd(a) { + return BD(Sc(this, a), 15); + }; + _.mc = function wd(a) { + return vmb(BD(a, 15)); + }; + _.pc = function xd(a, b) { + return Vc(this, a, BD(b, 15), null); + }; + mdb(Zhe, "AbstractListMultimap", 1631); + bcb(732, 1, aie); + _.Nb = function zd(a) { + Rrb(this, a); + }; + _.Ob = function Ad() { + return this.c.Ob() || this.e.Ob(); + }; + _.Pb = function Bd() { + var a; + if (!this.e.Ob()) { + a = BD(this.c.Pb(), 42); + this.b = a.cd(); + this.a = BD(a.dd(), 14); + this.e = this.a.Kc(); + } + return this.sc(this.b, this.e.Pb()); + }; + _.Qb = function Cd() { + this.e.Qb(); + this.a.dc() && this.c.Qb(); + --this.d.d; + }; + mdb(Zhe, "AbstractMapBasedMultimap/Itr", 732); + bcb(1099, 732, aie, Dd); + _.sc = function Ed(a, b) { + return b; + }; + mdb(Zhe, "AbstractMapBasedMultimap/1", 1099); + bcb(1100, 1, {}, Fd); + _.Kb = function Gd(a) { + return BD(a, 14).Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/1methodref$spliterator$Type", 1100); + bcb(1101, 732, aie, Hd); + _.sc = function Id(a, b) { + return new Wo(a, b); + }; + mdb(Zhe, "AbstractMapBasedMultimap/2", 1101); + var DK = odb(bie, "Map"); + bcb(1967, 1, cie); + _.wc = function Td(a) { + stb(this, a); + }; + _.yc = function $d(a, b, c) { + return ttb(this, a, b, c); + }; + _.$b = function Od() { + this.vc().$b(); + }; + _.tc = function Pd(a) { + return Jd(this, a); + }; + _._b = function Qd(a) { + return !!Kd(this, a, false); + }; + _.uc = function Rd(a) { + var b, c, d; + for (c = this.vc().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 42); + d = b.dd(); + if (PD(a) === PD(d) || a != null && pb(a, d)) { + return true; + } + } + return false; + }; + _.Fb = function Sd(a) { + var b, c, d; + if (a === this) { + return true; + } + if (!JD(a, 83)) { + return false; + } + d = BD(a, 83); + if (this.gc() != d.gc()) { + return false; + } + for (c = d.vc().Kc(); c.Ob(); ) { + b = BD(c.Pb(), 42); + if (!this.tc(b)) { + return false; + } + } + return true; + }; + _.xc = function Ud(a) { + return Wd(Kd(this, a, false)); + }; + _.Hb = function Xd() { + return pmb(this.vc()); + }; + _.dc = function Yd() { + return this.gc() == 0; + }; + _.ec = function Zd() { + return new Pib(this); + }; + _.zc = function _d(a, b) { + throw vbb(new cgb("Put not supported on this map")); + }; + _.Ac = function ae(a) { + Ld(this, a); + }; + _.Bc = function be(a) { + return Wd(Kd(this, a, true)); + }; + _.gc = function ce() { + return this.vc().gc(); + }; + _.Ib = function de() { + return Md(this); + }; + _.Cc = function ee() { + return new $ib(this); + }; + mdb(bie, "AbstractMap", 1967); + bcb(1987, 1967, cie); + _.bc = function ge() { + return new rf(this); + }; + _.vc = function he() { + return fe(this); + }; + _.ec = function ie() { + var a; + a = this.g; + return !a ? this.g = this.bc() : a; + }; + _.Cc = function je() { + var a; + a = this.i; + return !a ? this.i = new Zv(this) : a; + }; + mdb(Zhe, "Maps/ViewCachingAbstractMap", 1987); + bcb(389, 1987, cie, ne); + _.xc = function se(a) { + return ke(this, a); + }; + _.Bc = function ve(a) { + return le(this, a); + }; + _.$b = function oe() { + this.d == this.e.c ? this.e.$b() : ir(new mf(this)); + }; + _._b = function pe(a) { + return Gv(this.d, a); + }; + _.Ec = function qe() { + return new df(this); + }; + _.Dc = function() { + return this.Ec(); + }; + _.Fb = function re(a) { + return this === a || pb(this.d, a); + }; + _.Hb = function te() { + return tb(this.d); + }; + _.ec = function ue() { + return this.e.ec(); + }; + _.gc = function we() { + return this.d.gc(); + }; + _.Ib = function xe() { + return fcb(this.d); + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap", 389); + var KI = odb(Phe, "Iterable"); + bcb(28, 1, die); + _.Jc = function Le(a) { + reb(this, a); + }; + _.Lc = function Ne() { + return this.Oc(); + }; + _.Nc = function Pe() { + return new Kub(this, 0); + }; + _.Oc = function Qe() { + return new YAb(null, this.Nc()); + }; + _.Fc = function Ge(a) { + throw vbb(new cgb("Add not supported on this collection")); + }; + _.Gc = function He(a) { + return ye(this, a); + }; + _.$b = function Ie() { + Ae(this); + }; + _.Hc = function Je(a) { + return ze(this, a, false); + }; + _.Ic = function Ke(a) { + return Be(this, a); + }; + _.dc = function Me() { + return this.gc() == 0; + }; + _.Mc = function Oe(a) { + return ze(this, a, true); + }; + _.Pc = function Re() { + return De(this); + }; + _.Qc = function Se(a) { + return Ee(this, a); + }; + _.Ib = function Te() { + return Fe(this); + }; + mdb(bie, "AbstractCollection", 28); + var LK = odb(bie, "Set"); + bcb(eie, 28, fie); + _.Nc = function Ye() { + return new Kub(this, 1); + }; + _.Fb = function We(a) { + return Ue(this, a); + }; + _.Hb = function Xe() { + return pmb(this); + }; + mdb(bie, "AbstractSet", eie); + bcb(1970, eie, fie); + mdb(Zhe, "Sets/ImprovedAbstractSet", 1970); + bcb(1971, 1970, fie); + _.$b = function $e() { + this.Rc().$b(); + }; + _.Hc = function _e(a) { + return Ze(this, a); + }; + _.dc = function af() { + return this.Rc().dc(); + }; + _.Mc = function bf(a) { + var b; + if (this.Hc(a)) { + b = BD(a, 42); + return this.Rc().ec().Mc(b.cd()); + } + return false; + }; + _.gc = function cf() { + return this.Rc().gc(); + }; + mdb(Zhe, "Maps/EntrySet", 1971); + bcb(1097, 1971, fie, df); + _.Hc = function ef(a) { + return Ck(this.a.d.vc(), a); + }; + _.Kc = function ff() { + return new mf(this.a); + }; + _.Rc = function gf() { + return this.a; + }; + _.Mc = function hf(a) { + var b; + if (!Ck(this.a.d.vc(), a)) { + return false; + } + b = BD(a, 42); + Tc(this.a.e, b.cd()); + return true; + }; + _.Nc = function jf() { + return $j(this.a.d.vc().Nc(), new kf(this.a)); + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap/AsMapEntries", 1097); + bcb(1098, 1, {}, kf); + _.Kb = function lf(a) { + return me(this.a, BD(a, 42)); + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type", 1098); + bcb(730, 1, aie, mf); + _.Nb = function nf(a) { + Rrb(this, a); + }; + _.Pb = function pf() { + var a; + return a = BD(this.b.Pb(), 42), this.a = BD(a.dd(), 14), me(this.c, a); + }; + _.Ob = function of() { + return this.b.Ob(); + }; + _.Qb = function qf() { + Vb(!!this.a); + this.b.Qb(); + this.c.e.d -= this.a.gc(); + this.a.$b(); + this.a = null; + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap/AsMapIterator", 730); + bcb(532, 1970, fie, rf); + _.$b = function sf() { + this.b.$b(); + }; + _.Hc = function tf(a) { + return this.b._b(a); + }; + _.Jc = function uf(a) { + Qb(a); + this.b.wc(new Xv(a)); + }; + _.dc = function vf() { + return this.b.dc(); + }; + _.Kc = function wf() { + return new Mv(this.b.vc().Kc()); + }; + _.Mc = function xf(a) { + if (this.b._b(a)) { + this.b.Bc(a); + return true; + } + return false; + }; + _.gc = function yf() { + return this.b.gc(); + }; + mdb(Zhe, "Maps/KeySet", 532); + bcb(318, 532, fie, zf); + _.$b = function Af() { + var a; + ir((a = this.b.vc().Kc(), new Hf(this, a))); + }; + _.Ic = function Bf(a) { + return this.b.ec().Ic(a); + }; + _.Fb = function Cf(a) { + return this === a || pb(this.b.ec(), a); + }; + _.Hb = function Df() { + return tb(this.b.ec()); + }; + _.Kc = function Ef() { + var a; + return a = this.b.vc().Kc(), new Hf(this, a); + }; + _.Mc = function Ff(a) { + var b, c; + c = 0; + b = BD(this.b.Bc(a), 14); + if (b) { + c = b.gc(); + b.$b(); + this.a.d -= c; + } + return c > 0; + }; + _.Nc = function Gf() { + return this.b.ec().Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/KeySet", 318); + bcb(731, 1, aie, Hf); + _.Nb = function If(a) { + Rrb(this, a); + }; + _.Ob = function Jf() { + return this.c.Ob(); + }; + _.Pb = function Kf() { + this.a = BD(this.c.Pb(), 42); + return this.a.cd(); + }; + _.Qb = function Lf() { + var a; + Vb(!!this.a); + a = BD(this.a.dd(), 14); + this.c.Qb(); + this.b.a.d -= a.gc(); + a.$b(); + this.a = null; + }; + mdb(Zhe, "AbstractMapBasedMultimap/KeySet/1", 731); + bcb(491, 389, { 83: 1, 161: 1 }, Mf); + _.bc = function Nf() { + return this.Sc(); + }; + _.ec = function Pf() { + return this.Tc(); + }; + _.Sc = function Of() { + return new Yf(this.c, this.Uc()); + }; + _.Tc = function Qf() { + var a; + return a = this.b, !a ? this.b = this.Sc() : a; + }; + _.Uc = function Rf() { + return BD(this.d, 161); + }; + mdb(Zhe, "AbstractMapBasedMultimap/SortedAsMap", 491); + bcb(542, 491, gie, Sf); + _.bc = function Tf() { + return new $f(this.a, BD(BD(this.d, 161), 171)); + }; + _.Sc = function Uf() { + return new $f(this.a, BD(BD(this.d, 161), 171)); + }; + _.ec = function Vf() { + var a; + return a = this.b, BD(!a ? this.b = new $f(this.a, BD(BD(this.d, 161), 171)) : a, 271); + }; + _.Tc = function Wf() { + var a; + return a = this.b, BD(!a ? this.b = new $f(this.a, BD(BD(this.d, 161), 171)) : a, 271); + }; + _.Uc = function Xf() { + return BD(BD(this.d, 161), 171); + }; + mdb(Zhe, "AbstractMapBasedMultimap/NavigableAsMap", 542); + bcb(490, 318, hie, Yf); + _.Nc = function Zf() { + return this.b.ec().Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/SortedKeySet", 490); + bcb(388, 490, iie, $f); + mdb(Zhe, "AbstractMapBasedMultimap/NavigableKeySet", 388); + bcb(541, 28, die, dg); + _.Fc = function eg(a) { + var b, c; + ag(this); + c = this.d.dc(); + b = this.d.Fc(a); + if (b) { + ++this.f.d; + c && _f(this); + } + return b; + }; + _.Gc = function fg(a) { + var b, c, d; + if (a.dc()) { + return false; + } + d = (ag(this), this.d.gc()); + b = this.d.Gc(a); + if (b) { + c = this.d.gc(); + this.f.d += c - d; + d == 0 && _f(this); + } + return b; + }; + _.$b = function gg() { + var a; + a = (ag(this), this.d.gc()); + if (a == 0) { + return; + } + this.d.$b(); + this.f.d -= a; + bg(this); + }; + _.Hc = function hg(a) { + ag(this); + return this.d.Hc(a); + }; + _.Ic = function ig(a) { + ag(this); + return this.d.Ic(a); + }; + _.Fb = function jg(a) { + if (a === this) { + return true; + } + ag(this); + return pb(this.d, a); + }; + _.Hb = function kg() { + ag(this); + return tb(this.d); + }; + _.Kc = function lg() { + ag(this); + return new Gg(this); + }; + _.Mc = function mg(a) { + var b; + ag(this); + b = this.d.Mc(a); + if (b) { + --this.f.d; + bg(this); + } + return b; + }; + _.gc = function ng() { + return cg(this); + }; + _.Nc = function og() { + return ag(this), this.d.Nc(); + }; + _.Ib = function pg() { + ag(this); + return fcb(this.d); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedCollection", 541); + var yK = odb(bie, "List"); + bcb(728, 541, { 20: 1, 28: 1, 14: 1, 15: 1 }, qg); + _.ad = function zg(a) { + ktb(this, a); + }; + _.Nc = function Ag() { + return ag(this), this.d.Nc(); + }; + _.Vc = function rg(a, b) { + var c; + ag(this); + c = this.d.dc(); + BD(this.d, 15).Vc(a, b); + ++this.a.d; + c && _f(this); + }; + _.Wc = function sg(a, b) { + var c, d, e; + if (b.dc()) { + return false; + } + e = (ag(this), this.d.gc()); + c = BD(this.d, 15).Wc(a, b); + if (c) { + d = this.d.gc(); + this.a.d += d - e; + e == 0 && _f(this); + } + return c; + }; + _.Xb = function tg(a) { + ag(this); + return BD(this.d, 15).Xb(a); + }; + _.Xc = function ug(a) { + ag(this); + return BD(this.d, 15).Xc(a); + }; + _.Yc = function vg() { + ag(this); + return new Mg(this); + }; + _.Zc = function wg(a) { + ag(this); + return new Ng(this, a); + }; + _.$c = function xg(a) { + var b; + ag(this); + b = BD(this.d, 15).$c(a); + --this.a.d; + bg(this); + return b; + }; + _._c = function yg(a, b) { + ag(this); + return BD(this.d, 15)._c(a, b); + }; + _.bd = function Bg(a, b) { + ag(this); + return Vc(this.a, this.e, BD(this.d, 15).bd(a, b), !this.b ? this : this.b); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedList", 728); + bcb(1096, 728, { 20: 1, 28: 1, 14: 1, 15: 1, 54: 1 }, Cg); + mdb(Zhe, "AbstractMapBasedMultimap/RandomAccessWrappedList", 1096); + bcb(620, 1, aie, Gg); + _.Nb = function Ig(a) { + Rrb(this, a); + }; + _.Ob = function Jg() { + Fg(this); + return this.b.Ob(); + }; + _.Pb = function Kg() { + Fg(this); + return this.b.Pb(); + }; + _.Qb = function Lg() { + Eg(this); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedCollection/WrappedIterator", 620); + bcb(729, 620, jie, Mg, Ng); + _.Qb = function Tg() { + Eg(this); + }; + _.Rb = function Og(a) { + var b; + b = cg(this.a) == 0; + (Fg(this), BD(this.b, 125)).Rb(a); + ++this.a.a.d; + b && _f(this.a); + }; + _.Sb = function Pg() { + return (Fg(this), BD(this.b, 125)).Sb(); + }; + _.Tb = function Qg() { + return (Fg(this), BD(this.b, 125)).Tb(); + }; + _.Ub = function Rg() { + return (Fg(this), BD(this.b, 125)).Ub(); + }; + _.Vb = function Sg() { + return (Fg(this), BD(this.b, 125)).Vb(); + }; + _.Wb = function Ug(a) { + (Fg(this), BD(this.b, 125)).Wb(a); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedList/WrappedListIterator", 729); + bcb(727, 541, hie, Vg); + _.Nc = function Wg() { + return ag(this), this.d.Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedSortedSet", 727); + bcb(1095, 727, iie, Xg); + mdb(Zhe, "AbstractMapBasedMultimap/WrappedNavigableSet", 1095); + bcb(1094, 541, fie, Yg); + _.Nc = function Zg() { + return ag(this), this.d.Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedSet", 1094); + bcb(1103, 1, {}, $g); + _.Kb = function _g(a) { + return fd(BD(a, 42)); + }; + mdb(Zhe, "AbstractMapBasedMultimap/lambda$1$Type", 1103); + bcb(1102, 1, {}, ah); + _.Kb = function bh(a) { + return new Wo(this.a, a); + }; + mdb(Zhe, "AbstractMapBasedMultimap/lambda$2$Type", 1102); + var CK = odb(bie, "Map/Entry"); + bcb(345, 1, kie); + _.Fb = function dh(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Hb(this.cd(), b.cd()) && Hb(this.dd(), b.dd()); + } + return false; + }; + _.Hb = function eh() { + var a, b; + a = this.cd(); + b = this.dd(); + return (a == null ? 0 : tb(a)) ^ (b == null ? 0 : tb(b)); + }; + _.ed = function fh(a) { + throw vbb(new bgb()); + }; + _.Ib = function gh() { + return this.cd() + "=" + this.dd(); + }; + mdb(Zhe, lie, 345); + bcb(1988, 28, die); + _.$b = function hh() { + this.fd().$b(); + }; + _.Hc = function ih(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Cc(this.fd(), b.cd(), b.dd()); + } + return false; + }; + _.Mc = function jh(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Gc(this.fd(), b.cd(), b.dd()); + } + return false; + }; + _.gc = function kh() { + return this.fd().d; + }; + mdb(Zhe, "Multimaps/Entries", 1988); + bcb(733, 1988, die, lh); + _.Kc = function mh() { + return this.a.kc(); + }; + _.fd = function nh() { + return this.a; + }; + _.Nc = function oh() { + return this.a.lc(); + }; + mdb(Zhe, "AbstractMultimap/Entries", 733); + bcb(734, 733, fie, ph); + _.Nc = function sh() { + return this.a.lc(); + }; + _.Fb = function qh(a) { + return Ax(this, a); + }; + _.Hb = function rh() { + return Bx(this); + }; + mdb(Zhe, "AbstractMultimap/EntrySet", 734); + bcb(735, 28, die, th); + _.$b = function uh() { + this.a.$b(); + }; + _.Hc = function vh(a) { + return Dc(this.a, a); + }; + _.Kc = function wh() { + return this.a.nc(); + }; + _.gc = function xh() { + return this.a.d; + }; + _.Nc = function yh() { + return this.a.oc(); + }; + mdb(Zhe, "AbstractMultimap/Values", 735); + bcb(1989, 28, { 835: 1, 20: 1, 28: 1, 14: 1 }); + _.Jc = function Gh(a) { + Qb(a); + Ah(this).Jc(new Xw(a)); + }; + _.Nc = function Kh() { + var a; + return a = Ah(this).Nc(), Yj(a, new cx(), 64 | a.qd() & 1296, this.a.d); + }; + _.Fc = function Ch(a) { + zh(); + return true; + }; + _.Gc = function Dh(a) { + return Qb(this), Qb(a), JD(a, 543) ? Zw(BD(a, 835)) : !a.dc() && fr(this, a.Kc()); + }; + _.Hc = function Eh(a) { + var b; + return b = BD(Hv(nd(this.a), a), 14), (!b ? 0 : b.gc()) > 0; + }; + _.Fb = function Fh(a) { + return $w(this, a); + }; + _.Hb = function Hh() { + return tb(Ah(this)); + }; + _.dc = function Ih() { + return Ah(this).dc(); + }; + _.Mc = function Jh(a) { + return Bw(this, a, 1) > 0; + }; + _.Ib = function Lh() { + return fcb(Ah(this)); + }; + mdb(Zhe, "AbstractMultiset", 1989); + bcb(1991, 1970, fie); + _.$b = function Mh() { + Nc(this.a.a); + }; + _.Hc = function Nh(a) { + var b, c; + if (JD(a, 492)) { + c = BD(a, 416); + if (BD(c.a.dd(), 14).gc() <= 0) { + return false; + } + b = Aw(this.a, c.a.cd()); + return b == BD(c.a.dd(), 14).gc(); + } + return false; + }; + _.Mc = function Oh(a) { + var b, c, d, e; + if (JD(a, 492)) { + c = BD(a, 416); + b = c.a.cd(); + d = BD(c.a.dd(), 14).gc(); + if (d != 0) { + e = this.a; + return ax(e, b, d); + } + } + return false; + }; + mdb(Zhe, "Multisets/EntrySet", 1991); + bcb(1109, 1991, fie, Ph); + _.Kc = function Qh() { + return new Lw(fe(nd(this.a.a)).Kc()); + }; + _.gc = function Rh() { + return nd(this.a.a).gc(); + }; + mdb(Zhe, "AbstractMultiset/EntrySet", 1109); + bcb(619, 726, _he); + _.hc = function Uh() { + return this.gd(); + }; + _.jc = function Vh() { + return this.hd(); + }; + _.cc = function Yh(a) { + return this.jd(a); + }; + _.fc = function $h(a) { + return this.kd(a); + }; + _.Zb = function Th() { + var a; + return a = this.f, !a ? this.f = this.ac() : a; + }; + _.hd = function Wh() { + return mmb(), mmb(), lmb; + }; + _.Fb = function Xh(a) { + return hw(this, a); + }; + _.jd = function Zh(a) { + return BD(Qc(this, a), 21); + }; + _.kd = function _h(a) { + return BD(Sc(this, a), 21); + }; + _.mc = function ai(a) { + return mmb(), new zob(BD(a, 21)); + }; + _.pc = function bi(a, b) { + return new Yg(this, a, BD(b, 21)); + }; + mdb(Zhe, "AbstractSetMultimap", 619); + bcb(1657, 619, _he); + _.hc = function ei() { + return new Hxb(this.b); + }; + _.gd = function fi() { + return new Hxb(this.b); + }; + _.jc = function gi() { + return Ix(new Hxb(this.b)); + }; + _.hd = function hi() { + return Ix(new Hxb(this.b)); + }; + _.cc = function ii(a) { + return BD(BD(Qc(this, a), 21), 84); + }; + _.jd = function ji(a) { + return BD(BD(Qc(this, a), 21), 84); + }; + _.fc = function ki(a) { + return BD(BD(Sc(this, a), 21), 84); + }; + _.kd = function li(a) { + return BD(BD(Sc(this, a), 21), 84); + }; + _.mc = function mi(a) { + return JD(a, 271) ? Ix(BD(a, 271)) : (mmb(), new Zob(BD(a, 84))); + }; + _.Zb = function di() { + var a; + return a = this.f, !a ? this.f = JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c) : a; + }; + _.pc = function ni(a, b) { + return JD(b, 271) ? new Xg(this, a, BD(b, 271)) : new Vg(this, a, BD(b, 84)); + }; + mdb(Zhe, "AbstractSortedSetMultimap", 1657); + bcb(1658, 1657, _he); + _.Zb = function pi() { + var a; + return a = this.f, BD(BD(!a ? this.f = JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c) : a, 161), 171); + }; + _.ec = function ri() { + var a; + return a = this.i, BD(BD(!a ? this.i = JD(this.c, 171) ? new $f(this, BD(this.c, 171)) : JD(this.c, 161) ? new Yf(this, BD(this.c, 161)) : new zf(this, this.c) : a, 84), 271); + }; + _.bc = function qi() { + return JD(this.c, 171) ? new $f(this, BD(this.c, 171)) : JD(this.c, 161) ? new Yf(this, BD(this.c, 161)) : new zf(this, this.c); + }; + mdb(Zhe, "AbstractSortedKeySortedSetMultimap", 1658); + bcb(2010, 1, { 1947: 1 }); + _.Fb = function si(a) { + return zy(this, a); + }; + _.Hb = function ti() { + var a; + return pmb((a = this.g, !a ? this.g = new vi(this) : a)); + }; + _.Ib = function ui() { + var a; + return Md((a = this.f, !a ? this.f = new Rj(this) : a)); + }; + mdb(Zhe, "AbstractTable", 2010); + bcb(665, eie, fie, vi); + _.$b = function wi() { + Pi(); + }; + _.Hc = function xi(a) { + var b, c; + if (JD(a, 468)) { + b = BD(a, 682); + c = BD(Hv(Vi(this.a), Em(b.c.e, b.b)), 83); + return !!c && Ck(c.vc(), new Wo(Em(b.c.c, b.a), Mi(b.c, b.b, b.a))); + } + return false; + }; + _.Kc = function yi() { + return Ni(this.a); + }; + _.Mc = function zi(a) { + var b, c; + if (JD(a, 468)) { + b = BD(a, 682); + c = BD(Hv(Vi(this.a), Em(b.c.e, b.b)), 83); + return !!c && Dk(c.vc(), new Wo(Em(b.c.c, b.a), Mi(b.c, b.b, b.a))); + } + return false; + }; + _.gc = function Ai() { + return Xi(this.a); + }; + _.Nc = function Bi() { + return Oi(this.a); + }; + mdb(Zhe, "AbstractTable/CellSet", 665); + bcb(1928, 28, die, Ci); + _.$b = function Di() { + Pi(); + }; + _.Hc = function Ei(a) { + return Qi(this.a, a); + }; + _.Kc = function Fi() { + return Zi(this.a); + }; + _.gc = function Gi() { + return Xi(this.a); + }; + _.Nc = function Hi() { + return $i(this.a); + }; + mdb(Zhe, "AbstractTable/Values", 1928); + bcb(1632, 1631, _he); + mdb(Zhe, "ArrayListMultimapGwtSerializationDependencies", 1632); + bcb(513, 1632, _he, Ji, Ki); + _.hc = function Li() { + return new Skb(this.a); + }; + _.a = 0; + mdb(Zhe, "ArrayListMultimap", 513); + bcb(664, 2010, { 664: 1, 1947: 1, 3: 1 }, _i); + mdb(Zhe, "ArrayTable", 664); + bcb(1924, 386, $he, aj); + _.Xb = function bj(a) { + return new hj(this.a, a); + }; + mdb(Zhe, "ArrayTable/1", 1924); + bcb(1925, 1, {}, cj); + _.ld = function dj(a) { + return new hj(this.a, a); + }; + mdb(Zhe, "ArrayTable/1methodref$getCell$Type", 1925); + bcb(2011, 1, { 682: 1 }); + _.Fb = function ej(a) { + var b; + if (a === this) { + return true; + } + if (JD(a, 468)) { + b = BD(a, 682); + return Hb(Em(this.c.e, this.b), Em(b.c.e, b.b)) && Hb(Em(this.c.c, this.a), Em(b.c.c, b.a)) && Hb(Mi(this.c, this.b, this.a), Mi(b.c, b.b, b.a)); + } + return false; + }; + _.Hb = function fj() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [Em(this.c.e, this.b), Em(this.c.c, this.a), Mi(this.c, this.b, this.a)])); + }; + _.Ib = function gj() { + return "(" + Em(this.c.e, this.b) + "," + Em(this.c.c, this.a) + ")=" + Mi(this.c, this.b, this.a); + }; + mdb(Zhe, "Tables/AbstractCell", 2011); + bcb(468, 2011, { 468: 1, 682: 1 }, hj); + _.a = 0; + _.b = 0; + _.d = 0; + mdb(Zhe, "ArrayTable/2", 468); + bcb(1927, 1, {}, ij); + _.ld = function jj(a) { + return Ti(this.a, a); + }; + mdb(Zhe, "ArrayTable/2methodref$getValue$Type", 1927); + bcb(1926, 386, $he, kj); + _.Xb = function lj(a) { + return Ti(this.a, a); + }; + mdb(Zhe, "ArrayTable/3", 1926); + bcb(1979, 1967, cie); + _.$b = function nj() { + ir(this.kc()); + }; + _.vc = function oj() { + return new Sv(this); + }; + _.lc = function pj() { + return new Mub(this.kc(), this.gc()); + }; + mdb(Zhe, "Maps/IteratorBasedAbstractMap", 1979); + bcb(828, 1979, cie); + _.$b = function tj() { + throw vbb(new bgb()); + }; + _._b = function uj(a) { + return sn(this.c, a); + }; + _.kc = function vj() { + return new Jj(this, this.c.b.c.gc()); + }; + _.lc = function wj() { + return Zj(this.c.b.c.gc(), 16, new Dj(this)); + }; + _.xc = function xj(a) { + var b; + b = BD(tn(this.c, a), 19); + return !b ? null : this.nd(b.a); + }; + _.dc = function yj() { + return this.c.b.c.dc(); + }; + _.ec = function zj() { + return Xm(this.c); + }; + _.zc = function Aj(a, b) { + var c; + c = BD(tn(this.c, a), 19); + if (!c) { + throw vbb(new Wdb(this.md() + " " + a + " not in " + Xm(this.c))); + } + return this.od(c.a, b); + }; + _.Bc = function Bj(a) { + throw vbb(new bgb()); + }; + _.gc = function Cj() { + return this.c.b.c.gc(); + }; + mdb(Zhe, "ArrayTable/ArrayMap", 828); + bcb(1923, 1, {}, Dj); + _.ld = function Ej(a) { + return qj(this.a, a); + }; + mdb(Zhe, "ArrayTable/ArrayMap/0methodref$getEntry$Type", 1923); + bcb(1921, 345, kie, Fj); + _.cd = function Gj() { + return rj(this.a, this.b); + }; + _.dd = function Hj() { + return this.a.nd(this.b); + }; + _.ed = function Ij(a) { + return this.a.od(this.b, a); + }; + _.b = 0; + mdb(Zhe, "ArrayTable/ArrayMap/1", 1921); + bcb(1922, 386, $he, Jj); + _.Xb = function Kj(a) { + return qj(this.a, a); + }; + mdb(Zhe, "ArrayTable/ArrayMap/2", 1922); + bcb(1920, 828, cie, Lj); + _.md = function Mj() { + return "Column"; + }; + _.nd = function Nj(a) { + return Mi(this.b, this.a, a); + }; + _.od = function Oj(a, b) { + return Wi(this.b, this.a, a, b); + }; + _.a = 0; + mdb(Zhe, "ArrayTable/Row", 1920); + bcb(829, 828, cie, Rj); + _.nd = function Tj(a) { + return new Lj(this.a, a); + }; + _.zc = function Uj(a, b) { + return BD(b, 83), Pj(); + }; + _.od = function Vj(a, b) { + return BD(b, 83), Qj(); + }; + _.md = function Sj() { + return "Row"; + }; + mdb(Zhe, "ArrayTable/RowMap", 829); + bcb(1120, 1, pie, _j); + _.qd = function ak() { + return this.a.qd() & -262; + }; + _.rd = function bk() { + return this.a.rd(); + }; + _.Nb = function ck(a) { + this.a.Nb(new gk(a, this.b)); + }; + _.sd = function dk(a) { + return this.a.sd(new ek(a, this.b)); + }; + mdb(Zhe, "CollectSpliterators/1", 1120); + bcb(1121, 1, qie, ek); + _.td = function fk(a) { + this.a.td(this.b.Kb(a)); + }; + mdb(Zhe, "CollectSpliterators/1/lambda$0$Type", 1121); + bcb(1122, 1, qie, gk); + _.td = function hk(a) { + this.a.td(this.b.Kb(a)); + }; + mdb(Zhe, "CollectSpliterators/1/lambda$1$Type", 1122); + bcb(1123, 1, pie, jk); + _.qd = function kk() { + return this.a; + }; + _.rd = function lk() { + !!this.d && (this.b = Deb(this.b, this.d.rd())); + return Deb(this.b, 0); + }; + _.Nb = function mk(a) { + if (this.d) { + this.d.Nb(a); + this.d = null; + } + this.c.Nb(new rk(this.e, a)); + this.b = 0; + }; + _.sd = function ok(a) { + while (true) { + if (!!this.d && this.d.sd(a)) { + Kbb(this.b, rie) && (this.b = Qbb(this.b, 1)); + return true; + } else { + this.d = null; + } + if (!this.c.sd(new pk(this, this.e))) { + return false; + } + } + }; + _.a = 0; + _.b = 0; + mdb(Zhe, "CollectSpliterators/1FlatMapSpliterator", 1123); + bcb(1124, 1, qie, pk); + _.td = function qk(a) { + ik(this.a, this.b, a); + }; + mdb(Zhe, "CollectSpliterators/1FlatMapSpliterator/lambda$0$Type", 1124); + bcb(1125, 1, qie, rk); + _.td = function sk(a) { + nk(this.b, this.a, a); + }; + mdb(Zhe, "CollectSpliterators/1FlatMapSpliterator/lambda$1$Type", 1125); + bcb(1117, 1, pie, tk); + _.qd = function uk() { + return 16464 | this.b; + }; + _.rd = function vk() { + return this.a.rd(); + }; + _.Nb = function wk(a) { + this.a.xe(new Ak(a, this.c)); + }; + _.sd = function xk(a) { + return this.a.ye(new yk(a, this.c)); + }; + _.b = 0; + mdb(Zhe, "CollectSpliterators/1WithCharacteristics", 1117); + bcb(1118, 1, sie, yk); + _.ud = function zk(a) { + this.a.td(this.b.ld(a)); + }; + mdb(Zhe, "CollectSpliterators/1WithCharacteristics/lambda$0$Type", 1118); + bcb(1119, 1, sie, Ak); + _.ud = function Bk(a) { + this.a.td(this.b.ld(a)); + }; + mdb(Zhe, "CollectSpliterators/1WithCharacteristics/lambda$1$Type", 1119); + bcb(245, 1, tie); + _.wd = function Hk(a) { + return this.vd(BD(a, 245)); + }; + _.vd = function Gk(a) { + var b; + if (a == (_k(), $k)) { + return 1; + } + if (a == (Lk(), Kk)) { + return -1; + } + b = (ex(), Fcb(this.a, a.a)); + if (b != 0) { + return b; + } + return JD(this, 519) == JD(a, 519) ? 0 : JD(this, 519) ? 1 : -1; + }; + _.zd = function Ik() { + return this.a; + }; + _.Fb = function Jk(a) { + return Ek(this, a); + }; + mdb(Zhe, "Cut", 245); + bcb(1761, 245, tie, Mk); + _.vd = function Nk(a) { + return a == this ? 0 : 1; + }; + _.xd = function Ok(a) { + throw vbb(new xcb()); + }; + _.yd = function Pk(a) { + a.a += "+∞)"; + }; + _.zd = function Qk() { + throw vbb(new Zdb(uie)); + }; + _.Hb = function Rk() { + return Zfb(), kCb(this); + }; + _.Ad = function Sk(a) { + return false; + }; + _.Ib = function Tk() { + return "+∞"; + }; + var Kk; + mdb(Zhe, "Cut/AboveAll", 1761); + bcb(519, 245, { 245: 1, 519: 1, 3: 1, 35: 1 }, Uk); + _.xd = function Vk(a) { + Pfb((a.a += "(", a), this.a); + }; + _.yd = function Wk(a) { + Kfb(Pfb(a, this.a), 93); + }; + _.Hb = function Xk() { + return ~tb(this.a); + }; + _.Ad = function Yk(a) { + return ex(), Fcb(this.a, a) < 0; + }; + _.Ib = function Zk() { + return "/" + this.a + "\\"; + }; + mdb(Zhe, "Cut/AboveValue", 519); + bcb(1760, 245, tie, al); + _.vd = function bl(a) { + return a == this ? 0 : -1; + }; + _.xd = function cl(a) { + a.a += "(-∞"; + }; + _.yd = function dl(a) { + throw vbb(new xcb()); + }; + _.zd = function el() { + throw vbb(new Zdb(uie)); + }; + _.Hb = function fl() { + return Zfb(), kCb(this); + }; + _.Ad = function gl(a) { + return true; + }; + _.Ib = function hl() { + return "-∞"; + }; + var $k; + mdb(Zhe, "Cut/BelowAll", 1760); + bcb(1762, 245, tie, il); + _.xd = function jl(a) { + Pfb((a.a += "[", a), this.a); + }; + _.yd = function kl(a) { + Kfb(Pfb(a, this.a), 41); + }; + _.Hb = function ll() { + return tb(this.a); + }; + _.Ad = function ml(a) { + return ex(), Fcb(this.a, a) <= 0; + }; + _.Ib = function nl() { + return "\\" + this.a + "/"; + }; + mdb(Zhe, "Cut/BelowValue", 1762); + bcb(537, 1, vie); + _.Jc = function ql(a) { + reb(this, a); + }; + _.Ib = function rl() { + return tr(BD(Rb(this, "use Optional.orNull() instead of Optional.or(null)"), 20).Kc()); + }; + mdb(Zhe, "FluentIterable", 537); + bcb(433, 537, vie, sl); + _.Kc = function tl() { + return new Sr(ur(this.a.Kc(), new Sq())); + }; + mdb(Zhe, "FluentIterable/2", 433); + bcb(1046, 537, vie, vl); + _.Kc = function wl() { + return ul(this); + }; + mdb(Zhe, "FluentIterable/3", 1046); + bcb(708, 386, $he, xl); + _.Xb = function yl(a) { + return this.a[a].Kc(); + }; + mdb(Zhe, "FluentIterable/3/1", 708); + bcb(1972, 1, {}); + _.Ib = function zl() { + return fcb(this.Bd().b); + }; + mdb(Zhe, "ForwardingObject", 1972); + bcb(1973, 1972, wie); + _.Bd = function Fl() { + return this.Cd(); + }; + _.Jc = function Gl(a) { + reb(this, a); + }; + _.Lc = function Jl() { + return this.Oc(); + }; + _.Nc = function Ml() { + return new Kub(this, 0); + }; + _.Oc = function Nl() { + return new YAb(null, this.Nc()); + }; + _.Fc = function Al(a) { + return this.Cd(), enb(); + }; + _.Gc = function Bl(a) { + return this.Cd(), fnb(); + }; + _.$b = function Cl() { + this.Cd(), gnb(); + }; + _.Hc = function Dl(a) { + return this.Cd().Hc(a); + }; + _.Ic = function El(a) { + return this.Cd().Ic(a); + }; + _.dc = function Hl() { + return this.Cd().b.dc(); + }; + _.Kc = function Il() { + return this.Cd().Kc(); + }; + _.Mc = function Kl(a) { + return this.Cd(), jnb(); + }; + _.gc = function Ll() { + return this.Cd().b.gc(); + }; + _.Pc = function Ol() { + return this.Cd().Pc(); + }; + _.Qc = function Pl(a) { + return this.Cd().Qc(a); + }; + mdb(Zhe, "ForwardingCollection", 1973); + bcb(1980, 28, xie); + _.Kc = function Xl() { + return this.Ed(); + }; + _.Fc = function Sl(a) { + throw vbb(new bgb()); + }; + _.Gc = function Tl(a) { + throw vbb(new bgb()); + }; + _.$b = function Ul() { + throw vbb(new bgb()); + }; + _.Hc = function Vl(a) { + return a != null && ze(this, a, false); + }; + _.Dd = function Wl() { + switch (this.gc()) { + case 0: + return im(), im(), hm; + case 1: + return im(), new my(Qb(this.Ed().Pb())); + default: + return new px(this, this.Pc()); + } + }; + _.Mc = function Yl(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "ImmutableCollection", 1980); + bcb(712, 1980, xie, Zl); + _.Kc = function cm() { + return vr(this.a.Kc()); + }; + _.Hc = function $l(a) { + return a != null && this.a.Hc(a); + }; + _.Ic = function _l(a) { + return this.a.Ic(a); + }; + _.dc = function am() { + return this.a.dc(); + }; + _.Ed = function bm() { + return vr(this.a.Kc()); + }; + _.gc = function dm() { + return this.a.gc(); + }; + _.Pc = function em() { + return this.a.Pc(); + }; + _.Qc = function fm(a) { + return this.a.Qc(a); + }; + _.Ib = function gm() { + return fcb(this.a); + }; + mdb(Zhe, "ForwardingImmutableCollection", 712); + bcb(152, 1980, yie); + _.Kc = function sm() { + return this.Ed(); + }; + _.Yc = function tm() { + return this.Fd(0); + }; + _.Zc = function vm(a) { + return this.Fd(a); + }; + _.ad = function zm(a) { + ktb(this, a); + }; + _.Nc = function Am() { + return new Kub(this, 16); + }; + _.bd = function Cm(a, b) { + return this.Gd(a, b); + }; + _.Vc = function lm(a, b) { + throw vbb(new bgb()); + }; + _.Wc = function mm(a, b) { + throw vbb(new bgb()); + }; + _.Fb = function om(a) { + return Ju(this, a); + }; + _.Hb = function pm() { + return Ku(this); + }; + _.Xc = function qm(a) { + return a == null ? -1 : Lu(this, a); + }; + _.Ed = function rm() { + return this.Fd(0); + }; + _.Fd = function um(a) { + return jm(this, a); + }; + _.$c = function xm(a) { + throw vbb(new bgb()); + }; + _._c = function ym(a, b) { + throw vbb(new bgb()); + }; + _.Gd = function Bm(a, b) { + var c; + return Dm((c = new $u(this), new Jib(c, a, b))); + }; + var hm; + mdb(Zhe, "ImmutableList", 152); + bcb(2006, 152, yie); + _.Kc = function Nm() { + return vr(this.Hd().Kc()); + }; + _.bd = function Qm(a, b) { + return Dm(this.Hd().bd(a, b)); + }; + _.Hc = function Fm(a) { + return a != null && this.Hd().Hc(a); + }; + _.Ic = function Gm(a) { + return this.Hd().Ic(a); + }; + _.Fb = function Hm(a) { + return pb(this.Hd(), a); + }; + _.Xb = function Im(a) { + return Em(this, a); + }; + _.Hb = function Jm() { + return tb(this.Hd()); + }; + _.Xc = function Km(a) { + return this.Hd().Xc(a); + }; + _.dc = function Lm() { + return this.Hd().dc(); + }; + _.Ed = function Mm() { + return vr(this.Hd().Kc()); + }; + _.gc = function Om() { + return this.Hd().gc(); + }; + _.Gd = function Pm(a, b) { + return Dm(this.Hd().bd(a, b)); + }; + _.Pc = function Rm() { + return this.Hd().Qc(KC(SI, Uhe, 1, this.Hd().gc(), 5, 1)); + }; + _.Qc = function Sm(a) { + return this.Hd().Qc(a); + }; + _.Ib = function Tm() { + return fcb(this.Hd()); + }; + mdb(Zhe, "ForwardingImmutableList", 2006); + bcb(714, 1, Aie); + _.vc = function cn() { + return Wm(this); + }; + _.wc = function en(a) { + stb(this, a); + }; + _.ec = function jn() { + return Xm(this); + }; + _.yc = function kn(a, b, c) { + return ttb(this, a, b, c); + }; + _.Cc = function rn() { + return this.Ld(); + }; + _.$b = function Zm() { + throw vbb(new bgb()); + }; + _._b = function $m(a) { + return this.xc(a) != null; + }; + _.uc = function _m(a) { + return this.Ld().Hc(a); + }; + _.Jd = function an() { + return new jq(this); + }; + _.Kd = function bn() { + return new sq(this); + }; + _.Fb = function dn(a) { + return Dv(this, a); + }; + _.Hb = function gn() { + return Wm(this).Hb(); + }; + _.dc = function hn() { + return this.gc() == 0; + }; + _.zc = function nn(a, b) { + return Ym(); + }; + _.Bc = function on(a) { + throw vbb(new bgb()); + }; + _.Ib = function pn() { + return Jv(this); + }; + _.Ld = function qn() { + if (this.e) { + return this.e; + } + return this.e = this.Kd(); + }; + _.c = null; + _.d = null; + _.e = null; + var Um; + mdb(Zhe, "ImmutableMap", 714); + bcb(715, 714, Aie); + _._b = function vn(a) { + return sn(this, a); + }; + _.uc = function wn(a) { + return dob(this.b, a); + }; + _.Id = function xn() { + return Vn(new Ln(this)); + }; + _.Jd = function yn() { + return Vn(gob(this.b)); + }; + _.Kd = function zn() { + return Ql(), new Zl(hob(this.b)); + }; + _.Fb = function An(a) { + return fob(this.b, a); + }; + _.xc = function Bn(a) { + return tn(this, a); + }; + _.Hb = function Cn() { + return tb(this.b.c); + }; + _.dc = function Dn() { + return this.b.c.dc(); + }; + _.gc = function En() { + return this.b.c.gc(); + }; + _.Ib = function Fn() { + return fcb(this.b.c); + }; + mdb(Zhe, "ForwardingImmutableMap", 715); + bcb(1974, 1973, Bie); + _.Bd = function Gn() { + return this.Md(); + }; + _.Cd = function Hn() { + return this.Md(); + }; + _.Nc = function Kn() { + return new Kub(this, 1); + }; + _.Fb = function In(a) { + return a === this || this.Md().Fb(a); + }; + _.Hb = function Jn() { + return this.Md().Hb(); + }; + mdb(Zhe, "ForwardingSet", 1974); + bcb(1069, 1974, Bie, Ln); + _.Bd = function Nn() { + return eob(this.a.b); + }; + _.Cd = function On() { + return eob(this.a.b); + }; + _.Hc = function Mn(b) { + if (JD(b, 42) && BD(b, 42).cd() == null) { + return false; + } + try { + return Dob(eob(this.a.b), b); + } catch (a) { + a = ubb(a); + if (JD(a, 205)) { + return false; + } else + throw vbb(a); + } + }; + _.Md = function Pn() { + return eob(this.a.b); + }; + _.Qc = function Qn(a) { + var b; + b = Eob(eob(this.a.b), a); + eob(this.a.b).b.gc() < b.length && NC(b, eob(this.a.b).b.gc(), null); + return b; + }; + mdb(Zhe, "ForwardingImmutableMap/1", 1069); + bcb(1981, 1980, Cie); + _.Kc = function Tn() { + return this.Ed(); + }; + _.Nc = function Un() { + return new Kub(this, 1); + }; + _.Fb = function Rn(a) { + return Ax(this, a); + }; + _.Hb = function Sn() { + return Bx(this); + }; + mdb(Zhe, "ImmutableSet", 1981); + bcb(703, 1981, Cie); + _.Kc = function ao() { + return vr(new Dnb(this.a.b.Kc())); + }; + _.Hc = function Xn(a) { + return a != null && hnb(this.a, a); + }; + _.Ic = function Yn(a) { + return inb(this.a, a); + }; + _.Hb = function Zn() { + return tb(this.a.b); + }; + _.dc = function $n() { + return this.a.b.dc(); + }; + _.Ed = function _n() { + return vr(new Dnb(this.a.b.Kc())); + }; + _.gc = function bo() { + return this.a.b.gc(); + }; + _.Pc = function co() { + return this.a.b.Pc(); + }; + _.Qc = function eo(a) { + return knb(this.a, a); + }; + _.Ib = function fo() { + return fcb(this.a.b); + }; + mdb(Zhe, "ForwardingImmutableSet", 703); + bcb(1975, 1974, Die); + _.Bd = function go() { + return this.b; + }; + _.Cd = function ho() { + return this.b; + }; + _.Md = function io() { + return this.b; + }; + _.Nc = function jo() { + return new Rub(this); + }; + mdb(Zhe, "ForwardingSortedSet", 1975); + bcb(533, 1979, Aie, wo); + _.Ac = function Fo(a) { + Ld(this, a); + }; + _.Cc = function Io() { + var a; + return a = this.d, new up(!a ? this.d = new ap(this) : a); + }; + _.$b = function xo() { + ko(this); + }; + _._b = function yo(a) { + return !!uo(this, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + }; + _.uc = function zo(a) { + return lo(this, a); + }; + _.kc = function Ao() { + return new Qo(this, this); + }; + _.wc = function Bo(a) { + no(this, a); + }; + _.xc = function Co(a) { + return oo(this, a); + }; + _.ec = function Do() { + return new Bp(this); + }; + _.zc = function Eo(a, b) { + return ro(this, a, b); + }; + _.Bc = function Go(a) { + var b; + b = uo(this, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return null; + } else { + mo(this, b); + b.e = null; + b.c = null; + return b.i; + } + }; + _.gc = function Ho() { + return this.i; + }; + _.pd = function Jo() { + var a; + return a = this.d, new up(!a ? this.d = new ap(this) : a); + }; + _.f = 0; + _.g = 0; + _.i = 0; + mdb(Zhe, "HashBiMap", 533); + bcb(534, 1, aie); + _.Nb = function Mo(a) { + Rrb(this, a); + }; + _.Ob = function No() { + return Ko(this); + }; + _.Pb = function Oo() { + var a; + if (!Ko(this)) { + throw vbb(new utb()); + } + a = this.c; + this.c = a.c; + this.f = a; + --this.d; + return this.Nd(a); + }; + _.Qb = function Po() { + if (this.e.g != this.b) { + throw vbb(new Apb()); + } + Vb(!!this.f); + mo(this.e, this.f); + this.b = this.e.g; + this.f = null; + }; + _.b = 0; + _.d = 0; + _.f = null; + mdb(Zhe, "HashBiMap/Itr", 534); + bcb(1011, 534, aie, Qo); + _.Nd = function Ro(a) { + return new So(this, a); + }; + mdb(Zhe, "HashBiMap/1", 1011); + bcb(1012, 345, kie, So); + _.cd = function To() { + return this.a.g; + }; + _.dd = function Uo() { + return this.a.i; + }; + _.ed = function Vo(a) { + var b, c, d; + c = this.a.i; + d = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + if (d == this.a.f && (PD(a) === PD(c) || a != null && pb(a, c))) { + return a; + } + Nb(!vo(this.b.a, a, d), a); + mo(this.b.a, this.a); + b = new $o(this.a.g, this.a.a, a, d); + po(this.b.a, b, this.a); + this.a.e = null; + this.a.c = null; + this.b.b = this.b.a.g; + this.b.f == this.a && (this.b.f = b); + this.a = b; + return c; + }; + mdb(Zhe, "HashBiMap/1/MapEntry", 1012); + bcb(238, 345, { 345: 1, 238: 1, 3: 1, 42: 1 }, Wo); + _.cd = function Xo() { + return this.g; + }; + _.dd = function Yo() { + return this.i; + }; + _.ed = function Zo(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "ImmutableEntry", 238); + bcb(317, 238, { 345: 1, 317: 1, 238: 1, 3: 1, 42: 1 }, $o); + _.a = 0; + _.f = 0; + var GF = mdb(Zhe, "HashBiMap/BiEntry", 317); + bcb(610, 1979, Aie, ap); + _.Ac = function jp(a) { + Ld(this, a); + }; + _.Cc = function mp() { + return new Bp(this.a); + }; + _.$b = function bp() { + ko(this.a); + }; + _._b = function cp(a) { + return lo(this.a, a); + }; + _.kc = function dp() { + return new op(this, this.a); + }; + _.wc = function ep(a) { + Qb(a); + no(this.a, new zp(a)); + }; + _.xc = function fp(a) { + return _o(this, a); + }; + _.ec = function gp() { + return new up(this); + }; + _.zc = function ip(a, b) { + return so(this.a, a, b, false); + }; + _.Bc = function kp(a) { + var b; + b = vo(this.a, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return null; + } else { + mo(this.a, b); + b.e = null; + b.c = null; + return b.g; + } + }; + _.gc = function lp() { + return this.a.i; + }; + _.pd = function np() { + return new Bp(this.a); + }; + mdb(Zhe, "HashBiMap/Inverse", 610); + bcb(1008, 534, aie, op); + _.Nd = function pp(a) { + return new qp(this, a); + }; + mdb(Zhe, "HashBiMap/Inverse/1", 1008); + bcb(1009, 345, kie, qp); + _.cd = function rp() { + return this.a.i; + }; + _.dd = function sp() { + return this.a.g; + }; + _.ed = function tp(a) { + var b, c, d; + d = this.a.g; + b = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + if (b == this.a.a && (PD(a) === PD(d) || a != null && pb(a, d))) { + return a; + } + Nb(!uo(this.b.a.a, a, b), a); + mo(this.b.a.a, this.a); + c = new $o(a, b, this.a.i, this.a.f); + this.a = c; + po(this.b.a.a, c, null); + this.b.b = this.b.a.a.g; + return d; + }; + mdb(Zhe, "HashBiMap/Inverse/1/InverseEntry", 1009); + bcb(611, 532, fie, up); + _.Kc = function vp() { + return new xp(this.a.a); + }; + _.Mc = function wp(a) { + var b; + b = vo(this.a.a, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return false; + } else { + mo(this.a.a, b); + return true; + } + }; + mdb(Zhe, "HashBiMap/Inverse/InverseKeySet", 611); + bcb(1007, 534, aie, xp); + _.Nd = function yp(a) { + return a.i; + }; + mdb(Zhe, "HashBiMap/Inverse/InverseKeySet/1", 1007); + bcb(1010, 1, {}, zp); + _.Od = function Ap(a, b) { + hp(this.a, a, b); + }; + mdb(Zhe, "HashBiMap/Inverse/lambda$0$Type", 1010); + bcb(609, 532, fie, Bp); + _.Kc = function Cp() { + return new Ep(this.a); + }; + _.Mc = function Dp(a) { + var b; + b = uo(this.a, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return false; + } else { + mo(this.a, b); + b.e = null; + b.c = null; + return true; + } + }; + mdb(Zhe, "HashBiMap/KeySet", 609); + bcb(1006, 534, aie, Ep); + _.Nd = function Fp(a) { + return a.g; + }; + mdb(Zhe, "HashBiMap/KeySet/1", 1006); + bcb(1093, 619, _he); + mdb(Zhe, "HashMultimapGwtSerializationDependencies", 1093); + bcb(265, 1093, _he, Hp); + _.hc = function Ip() { + return new Uqb(Cv(this.a)); + }; + _.gd = function Jp() { + return new Uqb(Cv(this.a)); + }; + _.a = 2; + mdb(Zhe, "HashMultimap", 265); + bcb(1999, 152, yie); + _.Hc = function Mp(a) { + return this.Pd().Hc(a); + }; + _.dc = function Np() { + return this.Pd().dc(); + }; + _.gc = function Op() { + return this.Pd().gc(); + }; + mdb(Zhe, "ImmutableAsList", 1999); + bcb(1931, 715, Aie); + _.Ld = function Qp() { + return Ql(), new oy(this.a); + }; + _.Cc = function Rp() { + return Ql(), new oy(this.a); + }; + _.pd = function Sp() { + return Ql(), new oy(this.a); + }; + mdb(Zhe, "ImmutableBiMap", 1931); + bcb(1977, 1, {}); + mdb(Zhe, "ImmutableCollection/Builder", 1977); + bcb(1022, 703, Cie, Tp); + mdb(Zhe, "ImmutableEnumSet", 1022); + bcb(969, 386, $he, Vp); + _.Xb = function Wp(a) { + return this.a.Xb(a); + }; + mdb(Zhe, "ImmutableList/1", 969); + bcb(968, 1977, {}, Xp); + mdb(Zhe, "ImmutableList/Builder", 968); + bcb(614, 198, Yhe, Yp); + _.Ob = function Zp() { + return this.a.Ob(); + }; + _.Pb = function $p() { + return BD(this.a.Pb(), 42).cd(); + }; + mdb(Zhe, "ImmutableMap/1", 614); + bcb(1041, 1, {}, _p); + _.Kb = function aq(a) { + return BD(a, 42).cd(); + }; + mdb(Zhe, "ImmutableMap/2methodref$getKey$Type", 1041); + bcb(1040, 1, {}, cq); + mdb(Zhe, "ImmutableMap/Builder", 1040); + bcb(2e3, 1981, Cie); + _.Kc = function gq() { + var a; + return a = Wm(this.a).Ed(), new Yp(a); + }; + _.Dd = function dq() { + return new Fq(this); + }; + _.Jc = function eq(a) { + var b, c; + Qb(a); + c = this.gc(); + for (b = 0; b < c; b++) { + a.td(BD(Rl(Wm(this.a)).Xb(b), 42).cd()); + } + }; + _.Ed = function fq() { + var a; + return (a = this.c, !a ? this.c = new Fq(this) : a).Ed(); + }; + _.Nc = function hq() { + return Zj(this.gc(), 1296, new Dq(this)); + }; + mdb(Zhe, "IndexedImmutableSet", 2e3); + bcb(1180, 2e3, Cie, jq); + _.Kc = function nq() { + var a; + return a = Wm(this.a).Ed(), new Yp(a); + }; + _.Hc = function kq(a) { + return this.a._b(a); + }; + _.Jc = function lq(a) { + Qb(a); + stb(this.a, new qq(a)); + }; + _.Ed = function mq() { + var a; + return a = Wm(this.a).Ed(), new Yp(a); + }; + _.gc = function oq() { + return this.a.gc(); + }; + _.Nc = function pq() { + return $j(Wm(this.a).Nc(), new _p()); + }; + mdb(Zhe, "ImmutableMapKeySet", 1180); + bcb(1181, 1, {}, qq); + _.Od = function rq(a, b) { + Ql(); + this.a.td(a); + }; + mdb(Zhe, "ImmutableMapKeySet/lambda$0$Type", 1181); + bcb(1178, 1980, xie, sq); + _.Kc = function vq() { + return new Aq(this); + }; + _.Hc = function tq(a) { + return a != null && jr(new Aq(this), a); + }; + _.Ed = function uq() { + return new Aq(this); + }; + _.gc = function wq() { + return this.a.gc(); + }; + _.Nc = function xq() { + return $j(Wm(this.a).Nc(), new yq()); + }; + mdb(Zhe, "ImmutableMapValues", 1178); + bcb(1179, 1, {}, yq); + _.Kb = function zq(a) { + return BD(a, 42).dd(); + }; + mdb(Zhe, "ImmutableMapValues/0methodref$getValue$Type", 1179); + bcb(626, 198, Yhe, Aq); + _.Ob = function Bq() { + return this.a.Ob(); + }; + _.Pb = function Cq() { + return BD(this.a.Pb(), 42).dd(); + }; + mdb(Zhe, "ImmutableMapValues/1", 626); + bcb(1182, 1, {}, Dq); + _.ld = function Eq(a) { + return iq(this.a, a); + }; + mdb(Zhe, "IndexedImmutableSet/0methodref$get$Type", 1182); + bcb(752, 1999, yie, Fq); + _.Pd = function Gq() { + return this.a; + }; + _.Xb = function Hq(a) { + return iq(this.a, a); + }; + _.gc = function Iq() { + return this.a.a.gc(); + }; + mdb(Zhe, "IndexedImmutableSet/1", 752); + bcb(44, 1, {}, Sq); + _.Kb = function Tq(a) { + return BD(a, 20).Kc(); + }; + _.Fb = function Uq(a) { + return this === a; + }; + mdb(Zhe, "Iterables/10", 44); + bcb(1042, 537, vie, Wq); + _.Jc = function Xq(a) { + Qb(a); + this.b.Jc(new $q(this.a, a)); + }; + _.Kc = function Yq() { + return Vq(this); + }; + mdb(Zhe, "Iterables/4", 1042); + bcb(1043, 1, qie, $q); + _.td = function _q(a) { + Zq(this.b, this.a, a); + }; + mdb(Zhe, "Iterables/4/lambda$0$Type", 1043); + bcb(1044, 537, vie, ar); + _.Jc = function br(a) { + Qb(a); + reb(this.a, new dr(a, this.b)); + }; + _.Kc = function cr() { + return ur(new Fyd(this.a), this.b); + }; + mdb(Zhe, "Iterables/5", 1044); + bcb(1045, 1, qie, dr); + _.td = function er(a) { + this.a.td(Gfd(a)); + }; + mdb(Zhe, "Iterables/5/lambda$0$Type", 1045); + bcb(1071, 198, Yhe, wr); + _.Ob = function xr() { + return this.a.Ob(); + }; + _.Pb = function yr() { + return this.a.Pb(); + }; + mdb(Zhe, "Iterators/1", 1071); + bcb(1072, 699, Yhe, zr); + _.Yb = function Ar() { + var a; + while (this.b.Ob()) { + a = this.b.Pb(); + if (this.a.Lb(a)) { + return a; + } + } + return this.e = 2, null; + }; + mdb(Zhe, "Iterators/5", 1072); + bcb(487, 1, aie); + _.Nb = function Cr(a) { + Rrb(this, a); + }; + _.Ob = function Dr() { + return this.b.Ob(); + }; + _.Pb = function Er() { + return this.Qd(this.b.Pb()); + }; + _.Qb = function Fr() { + this.b.Qb(); + }; + mdb(Zhe, "TransformedIterator", 487); + bcb(1073, 487, aie, Gr); + _.Qd = function Hr(a) { + return this.a.Kb(a); + }; + mdb(Zhe, "Iterators/6", 1073); + bcb(717, 198, Yhe, Ir); + _.Ob = function Jr() { + return !this.a; + }; + _.Pb = function Kr() { + if (this.a) { + throw vbb(new utb()); + } + this.a = true; + return this.b; + }; + _.a = false; + mdb(Zhe, "Iterators/9", 717); + bcb(1070, 386, $he, Nr); + _.Xb = function Or(a) { + return this.a[this.b + a]; + }; + _.b = 0; + var Lr; + mdb(Zhe, "Iterators/ArrayItr", 1070); + bcb(39, 1, { 39: 1, 47: 1 }, Sr); + _.Nb = function Tr(a) { + Rrb(this, a); + }; + _.Ob = function Ur() { + return Qr(this); + }; + _.Pb = function Vr() { + return Rr(this); + }; + _.Qb = function Wr() { + Vb(!!this.c); + this.c.Qb(); + this.c = null; + }; + mdb(Zhe, "Iterators/ConcatenatedIterator", 39); + bcb(22, 1, { 3: 1, 35: 1, 22: 1 }); + _.wd = function _r(a) { + return Xr(this, BD(a, 22)); + }; + _.Fb = function bs(a) { + return this === a; + }; + _.Hb = function cs() { + return FCb(this); + }; + _.Ib = function ds() { + return Zr(this); + }; + _.g = 0; + var CI = mdb(Phe, "Enum", 22); + bcb(538, 22, { 538: 1, 3: 1, 35: 1, 22: 1, 47: 1 }, is); + _.Nb = function js(a) { + Rrb(this, a); + }; + _.Ob = function ks() { + return false; + }; + _.Pb = function ls() { + throw vbb(new utb()); + }; + _.Qb = function ms() { + Vb(false); + }; + var gs; + var yG = ndb(Zhe, "Iterators/EmptyModifiableIterator", 538, CI, os, ns); + var ps; + bcb(1834, 619, _he); + mdb(Zhe, "LinkedHashMultimapGwtSerializationDependencies", 1834); + bcb(1835, 1834, _he, ss); + _.hc = function us() { + return new Asb(Cv(this.b)); + }; + _.$b = function ts() { + Nc(this); + As(this.a, this.a); + }; + _.gd = function vs() { + return new Asb(Cv(this.b)); + }; + _.ic = function ws(a) { + return new Ss(this, a, this.b); + }; + _.kc = function xs() { + return new Hs(this); + }; + _.lc = function ys() { + var a; + return new Kub((a = this.g, BD(!a ? this.g = new ph(this) : a, 21)), 17); + }; + _.ec = function zs() { + var a; + return a = this.i, !a ? this.i = new zf(this, this.c) : a; + }; + _.nc = function Cs() { + return new Ov(new Hs(this)); + }; + _.oc = function Ds() { + var a; + return $j(new Kub((a = this.g, BD(!a ? this.g = new ph(this) : a, 21)), 17), new Es()); + }; + _.b = 2; + mdb(Zhe, "LinkedHashMultimap", 1835); + bcb(1838, 1, {}, Es); + _.Kb = function Fs(a) { + return BD(a, 42).dd(); + }; + mdb(Zhe, "LinkedHashMultimap/0methodref$getValue$Type", 1838); + bcb(824, 1, aie, Hs); + _.Nb = function Is(a) { + Rrb(this, a); + }; + _.Pb = function Ks() { + return Gs(this); + }; + _.Ob = function Js() { + return this.a != this.b.a; + }; + _.Qb = function Ls() { + Vb(!!this.c); + Gc(this.b, this.c.g, this.c.i); + this.c = null; + }; + mdb(Zhe, "LinkedHashMultimap/1", 824); + bcb(330, 238, { 345: 1, 238: 1, 330: 1, 2020: 1, 3: 1, 42: 1 }, Ms); + _.Rd = function Ns() { + return this.f; + }; + _.Sd = function Os(a) { + this.c = a; + }; + _.Td = function Ps(a) { + this.f = a; + }; + _.d = 0; + var BG = mdb(Zhe, "LinkedHashMultimap/ValueEntry", 330); + bcb(1836, 1970, { 2020: 1, 20: 1, 28: 1, 14: 1, 21: 1 }, Ss); + _.Fc = function Ts(a) { + var b, c, d, e, f; + f = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + b = f & this.b.length - 1; + e = this.b[b]; + for (c = e; c; c = c.a) { + if (c.d == f && Hb(c.i, a)) { + return false; + } + } + d = new Ms(this.c, a, f, e); + Bs(this.d, d); + d.f = this; + this.d = d; + As(this.g.a.b, d); + As(d, this.g.a); + this.b[b] = d; + ++this.f; + ++this.e; + Qs(this); + return true; + }; + _.$b = function Us() { + var a, b; + Alb(this.b, null); + this.f = 0; + for (a = this.a; a != this; a = a.Rd()) { + b = BD(a, 330); + As(b.b, b.e); + } + this.a = this; + this.d = this; + ++this.e; + }; + _.Hc = function Vs(a) { + var b, c; + c = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + for (b = this.b[c & this.b.length - 1]; b; b = b.a) { + if (b.d == c && Hb(b.i, a)) { + return true; + } + } + return false; + }; + _.Jc = function Ws(a) { + var b; + Qb(a); + for (b = this.a; b != this; b = b.Rd()) { + a.td(BD(b, 330).i); + } + }; + _.Rd = function Xs() { + return this.a; + }; + _.Kc = function Ys() { + return new ct(this); + }; + _.Mc = function Zs(a) { + return Rs(this, a); + }; + _.Sd = function $s(a) { + this.d = a; + }; + _.Td = function _s(a) { + this.a = a; + }; + _.gc = function at() { + return this.f; + }; + _.e = 0; + _.f = 0; + mdb(Zhe, "LinkedHashMultimap/ValueSet", 1836); + bcb(1837, 1, aie, ct); + _.Nb = function dt(a) { + Rrb(this, a); + }; + _.Ob = function et() { + return bt(this), this.b != this.c; + }; + _.Pb = function ft() { + var a, b; + bt(this); + if (this.b == this.c) { + throw vbb(new utb()); + } + a = BD(this.b, 330); + b = a.i; + this.d = a; + this.b = a.f; + return b; + }; + _.Qb = function gt() { + bt(this); + Vb(!!this.d); + Rs(this.c, this.d.i); + this.a = this.c.e; + this.d = null; + }; + _.a = 0; + mdb(Zhe, "LinkedHashMultimap/ValueSet/1", 1837); + bcb(766, 1986, _he, mt); + _.Zb = function nt() { + var a; + return a = this.f, !a ? this.f = new jw(this) : a; + }; + _.Fb = function tt(a) { + return hw(this, a); + }; + _.cc = function ut(a) { + return new bu(this, a); + }; + _.fc = function xt(a) { + return kt(this, a); + }; + _.$b = function pt() { + it(this); + }; + _._b = function qt(a) { + return jt(this, a); + }; + _.ac = function rt() { + return new jw(this); + }; + _.bc = function st() { + return new eu(this); + }; + _.qc = function vt(a) { + return new bu(this, a); + }; + _.dc = function wt() { + return !this.a; + }; + _.rc = function yt(a) { + return kt(this, a); + }; + _.gc = function zt() { + return this.d; + }; + _.c = 0; + _.d = 0; + mdb(Zhe, "LinkedListMultimap", 766); + bcb(52, 28, Lie); + _.ad = function Pt(a) { + ktb(this, a); + }; + _.Nc = function Qt() { + return new Kub(this, 16); + }; + _.Vc = function Ct(a, b) { + throw vbb(new cgb("Add not supported on this list")); + }; + _.Fc = function Dt(a) { + this.Vc(this.gc(), a); + return true; + }; + _.Wc = function Et(a, b) { + var c, d, e; + uCb(b); + c = false; + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + this.Vc(a++, d); + c = true; + } + return c; + }; + _.$b = function Ft() { + this.Ud(0, this.gc()); + }; + _.Fb = function Gt(a) { + return At(this, a); + }; + _.Hb = function Ht() { + return qmb(this); + }; + _.Xc = function It(a) { + return Bt(this, a); + }; + _.Kc = function Jt() { + return new vib(this); + }; + _.Yc = function Kt() { + return this.Zc(0); + }; + _.Zc = function Lt(a) { + return new Bib(this, a); + }; + _.$c = function Mt(a) { + throw vbb(new cgb("Remove not supported on this list")); + }; + _.Ud = function Nt(a, b) { + var c, d; + d = this.Zc(a); + for (c = a; c < b; ++c) { + d.Pb(); + d.Qb(); + } + }; + _._c = function Ot(a, b) { + throw vbb(new cgb("Set not supported on this list")); + }; + _.bd = function Rt(a, b) { + return new Jib(this, a, b); + }; + _.j = 0; + mdb(bie, "AbstractList", 52); + bcb(1964, 52, Lie); + _.Vc = function Wt(a, b) { + St(this, a, b); + }; + _.Wc = function Xt(a, b) { + return Tt(this, a, b); + }; + _.Xb = function Yt(a) { + return Ut(this, a); + }; + _.Kc = function Zt() { + return this.Zc(0); + }; + _.$c = function $t(a) { + return Vt(this, a); + }; + _._c = function _t(b, c) { + var d, e; + d = this.Zc(b); + try { + e = d.Pb(); + d.Wb(c); + return e; + } catch (a) { + a = ubb(a); + if (JD(a, 109)) { + throw vbb(new qcb("Can't set element " + b)); + } else + throw vbb(a); + } + }; + mdb(bie, "AbstractSequentialList", 1964); + bcb(636, 1964, Lie, bu); + _.Zc = function cu(a) { + return au(this, a); + }; + _.gc = function du() { + var a; + a = BD(Ohb(this.a.b, this.b), 283); + return !a ? 0 : a.a; + }; + mdb(Zhe, "LinkedListMultimap/1", 636); + bcb(1297, 1970, fie, eu); + _.Hc = function fu(a) { + return jt(this.a, a); + }; + _.Kc = function gu() { + return new ku(this.a); + }; + _.Mc = function hu(a) { + return !kt(this.a, a).a.dc(); + }; + _.gc = function iu() { + return Vhb(this.a.b); + }; + mdb(Zhe, "LinkedListMultimap/1KeySetImpl", 1297); + bcb(1296, 1, aie, ku); + _.Nb = function lu(a) { + Rrb(this, a); + }; + _.Ob = function mu() { + ju(this); + return !!this.c; + }; + _.Pb = function nu() { + ju(this); + ot(this.c); + this.a = this.c; + Qqb(this.d, this.a.a); + do { + this.c = this.c.b; + } while (!!this.c && !Qqb(this.d, this.c.a)); + return this.a.a; + }; + _.Qb = function ou() { + ju(this); + Vb(!!this.a); + ir(new wu(this.e, this.a.a)); + this.a = null; + this.b = this.e.c; + }; + _.b = 0; + mdb(Zhe, "LinkedListMultimap/DistinctKeyIterator", 1296); + bcb(283, 1, { 283: 1 }, pu); + _.a = 0; + mdb(Zhe, "LinkedListMultimap/KeyList", 283); + bcb(1295, 345, kie, qu); + _.cd = function ru() { + return this.a; + }; + _.dd = function su() { + return this.f; + }; + _.ed = function tu(a) { + var b; + b = this.f; + this.f = a; + return b; + }; + mdb(Zhe, "LinkedListMultimap/Node", 1295); + bcb(560, 1, jie, wu, xu); + _.Nb = function zu(a) { + Rrb(this, a); + }; + _.Rb = function yu(a) { + this.e = ht(this.f, this.b, a, this.c); + ++this.d; + this.a = null; + }; + _.Ob = function Au() { + return !!this.c; + }; + _.Sb = function Bu() { + return !!this.e; + }; + _.Pb = function Cu() { + return uu(this); + }; + _.Tb = function Du() { + return this.d; + }; + _.Ub = function Eu() { + return vu(this); + }; + _.Vb = function Fu() { + return this.d - 1; + }; + _.Qb = function Gu() { + Vb(!!this.a); + if (this.a != this.c) { + this.e = this.a.e; + --this.d; + } else { + this.c = this.a.c; + } + lt(this.f, this.a); + this.a = null; + }; + _.Wb = function Hu(a) { + Ub(!!this.a); + this.a.f = a; + }; + _.d = 0; + mdb(Zhe, "LinkedListMultimap/ValueForKeyIterator", 560); + bcb(1018, 52, Lie); + _.Vc = function Tu(a, b) { + this.a.Vc(a, b); + }; + _.Wc = function Uu(a, b) { + return this.a.Wc(a, b); + }; + _.Hc = function Vu(a) { + return this.a.Hc(a); + }; + _.Xb = function Wu(a) { + return this.a.Xb(a); + }; + _.$c = function Xu(a) { + return this.a.$c(a); + }; + _._c = function Yu(a, b) { + return this.a._c(a, b); + }; + _.gc = function Zu() { + return this.a.gc(); + }; + mdb(Zhe, "Lists/AbstractListWrapper", 1018); + bcb(1019, 1018, Nie); + mdb(Zhe, "Lists/RandomAccessListWrapper", 1019); + bcb(1021, 1019, Nie, $u); + _.Zc = function _u(a) { + return this.a.Zc(a); + }; + mdb(Zhe, "Lists/1", 1021); + bcb(131, 52, { 131: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1 }, dv); + _.Vc = function ev(a, b) { + this.a.Vc(cv(this, a), b); + }; + _.$b = function fv() { + this.a.$b(); + }; + _.Xb = function gv(a) { + return this.a.Xb(bv(this, a)); + }; + _.Kc = function hv() { + return av(this, 0); + }; + _.Zc = function iv(a) { + return av(this, a); + }; + _.$c = function jv(a) { + return this.a.$c(bv(this, a)); + }; + _.Ud = function kv(a, b) { + (Tb(a, b, this.a.gc()), Su(this.a.bd(cv(this, b), cv(this, a)))).$b(); + }; + _._c = function lv(a, b) { + return this.a._c(bv(this, a), b); + }; + _.gc = function mv() { + return this.a.gc(); + }; + _.bd = function nv(a, b) { + return Tb(a, b, this.a.gc()), Su(this.a.bd(cv(this, b), cv(this, a))); + }; + mdb(Zhe, "Lists/ReverseList", 131); + bcb(280, 131, { 131: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1 }, ov); + mdb(Zhe, "Lists/RandomAccessReverseList", 280); + bcb(1020, 1, jie, qv); + _.Nb = function sv(a) { + Rrb(this, a); + }; + _.Rb = function rv(a) { + this.c.Rb(a); + this.c.Ub(); + this.a = false; + }; + _.Ob = function tv() { + return this.c.Sb(); + }; + _.Sb = function uv() { + return this.c.Ob(); + }; + _.Pb = function vv() { + return pv(this); + }; + _.Tb = function wv() { + return cv(this.b, this.c.Tb()); + }; + _.Ub = function xv() { + if (!this.c.Ob()) { + throw vbb(new utb()); + } + this.a = true; + return this.c.Pb(); + }; + _.Vb = function yv() { + return cv(this.b, this.c.Tb()) - 1; + }; + _.Qb = function zv() { + Vb(this.a); + this.c.Qb(); + this.a = false; + }; + _.Wb = function Av(a) { + Ub(this.a); + this.c.Wb(a); + }; + _.a = false; + mdb(Zhe, "Lists/ReverseList/1", 1020); + bcb(432, 487, aie, Mv); + _.Qd = function Nv(a) { + return Lv(a); + }; + mdb(Zhe, "Maps/1", 432); + bcb(698, 487, aie, Ov); + _.Qd = function Pv(a) { + return BD(a, 42).dd(); + }; + mdb(Zhe, "Maps/2", 698); + bcb(962, 487, aie, Qv); + _.Qd = function Rv(a) { + return new Wo(a, ww(this.a, a)); + }; + mdb(Zhe, "Maps/3", 962); + bcb(959, 1971, fie, Sv); + _.Jc = function Tv(a) { + mj(this.a, a); + }; + _.Kc = function Uv() { + return this.a.kc(); + }; + _.Rc = function Vv() { + return this.a; + }; + _.Nc = function Wv() { + return this.a.lc(); + }; + mdb(Zhe, "Maps/IteratorBasedAbstractMap/1", 959); + bcb(960, 1, {}, Xv); + _.Od = function Yv(a, b) { + this.a.td(a); + }; + mdb(Zhe, "Maps/KeySet/lambda$0$Type", 960); + bcb(958, 28, die, Zv); + _.$b = function $v() { + this.a.$b(); + }; + _.Hc = function _v(a) { + return this.a.uc(a); + }; + _.Jc = function aw(a) { + Qb(a); + this.a.wc(new fw(a)); + }; + _.dc = function bw() { + return this.a.dc(); + }; + _.Kc = function cw() { + return new Ov(this.a.vc().Kc()); + }; + _.Mc = function dw(b) { + var c, d; + try { + return ze(this, b, true); + } catch (a) { + a = ubb(a); + if (JD(a, 41)) { + for (d = this.a.vc().Kc(); d.Ob(); ) { + c = BD(d.Pb(), 42); + if (Hb(b, c.dd())) { + this.a.Bc(c.cd()); + return true; + } + } + return false; + } else + throw vbb(a); + } + }; + _.gc = function ew() { + return this.a.gc(); + }; + mdb(Zhe, "Maps/Values", 958); + bcb(961, 1, {}, fw); + _.Od = function gw(a, b) { + this.a.td(b); + }; + mdb(Zhe, "Maps/Values/lambda$0$Type", 961); + bcb(736, 1987, cie, jw); + _.xc = function nw(a) { + return this.a._b(a) ? this.a.cc(a) : null; + }; + _.Bc = function qw(a) { + return this.a._b(a) ? this.a.fc(a) : null; + }; + _.$b = function kw() { + this.a.$b(); + }; + _._b = function lw(a) { + return this.a._b(a); + }; + _.Ec = function mw() { + return new sw(this); + }; + _.Dc = function() { + return this.Ec(); + }; + _.dc = function ow() { + return this.a.dc(); + }; + _.ec = function pw() { + return this.a.ec(); + }; + _.gc = function rw() { + return this.a.ec().gc(); + }; + mdb(Zhe, "Multimaps/AsMap", 736); + bcb(1104, 1971, fie, sw); + _.Kc = function tw() { + return Bv(this.a.a.ec(), new xw(this)); + }; + _.Rc = function uw() { + return this.a; + }; + _.Mc = function vw(a) { + var b; + if (!Ze(this, a)) { + return false; + } + b = BD(a, 42); + iw(this.a, b.cd()); + return true; + }; + mdb(Zhe, "Multimaps/AsMap/EntrySet", 1104); + bcb(1108, 1, {}, xw); + _.Kb = function yw(a) { + return ww(this, a); + }; + _.Fb = function zw(a) { + return this === a; + }; + mdb(Zhe, "Multimaps/AsMap/EntrySet/1", 1108); + bcb(543, 1989, { 543: 1, 835: 1, 20: 1, 28: 1, 14: 1 }, Cw); + _.$b = function Dw() { + Nc(this.a); + }; + _.Hc = function Ew(a) { + return Oc(this.a, a); + }; + _.Jc = function Fw(a) { + Qb(a); + reb(Pc(this.a), new Rw(a)); + }; + _.Kc = function Gw() { + return new Mv(Pc(this.a).a.kc()); + }; + _.gc = function Hw() { + return this.a.d; + }; + _.Nc = function Iw() { + return $j(Pc(this.a).Nc(), new Jw()); + }; + mdb(Zhe, "Multimaps/Keys", 543); + bcb(1106, 1, {}, Jw); + _.Kb = function Kw(a) { + return BD(a, 42).cd(); + }; + mdb(Zhe, "Multimaps/Keys/0methodref$getKey$Type", 1106); + bcb(1105, 487, aie, Lw); + _.Qd = function Mw(a) { + return new Qw(BD(a, 42)); + }; + mdb(Zhe, "Multimaps/Keys/1", 1105); + bcb(1990, 1, { 416: 1 }); + _.Fb = function Nw(a) { + var b; + if (JD(a, 492)) { + b = BD(a, 416); + return BD(this.a.dd(), 14).gc() == BD(b.a.dd(), 14).gc() && Hb(this.a.cd(), b.a.cd()); + } + return false; + }; + _.Hb = function Ow() { + var a; + a = this.a.cd(); + return (a == null ? 0 : tb(a)) ^ BD(this.a.dd(), 14).gc(); + }; + _.Ib = function Pw() { + var a, b; + b = xfb(this.a.cd()); + a = BD(this.a.dd(), 14).gc(); + return a == 1 ? b : b + " x " + a; + }; + mdb(Zhe, "Multisets/AbstractEntry", 1990); + bcb(492, 1990, { 492: 1, 416: 1 }, Qw); + mdb(Zhe, "Multimaps/Keys/1/1", 492); + bcb(1107, 1, qie, Rw); + _.td = function Sw(a) { + this.a.td(BD(a, 42).cd()); + }; + mdb(Zhe, "Multimaps/Keys/lambda$1$Type", 1107); + bcb(1110, 1, qie, Vw); + _.td = function Ww(a) { + Tw(BD(a, 416)); + }; + mdb(Zhe, "Multiset/lambda$0$Type", 1110); + bcb(737, 1, qie, Xw); + _.td = function Yw(a) { + Uw(this.a, BD(a, 416)); + }; + mdb(Zhe, "Multiset/lambda$1$Type", 737); + bcb(1111, 1, {}, bx); + mdb(Zhe, "Multisets/0methodref$add$Type", 1111); + bcb(738, 1, {}, cx); + _.Kb = function dx(a) { + return _w(BD(a, 416)); + }; + mdb(Zhe, "Multisets/lambda$3$Type", 738); + bcb(2008, 1, Qhe); + mdb(Zhe, "RangeGwtSerializationDependencies", 2008); + bcb(514, 2008, { 169: 1, 514: 1, 3: 1, 45: 1 }, gx); + _.Lb = function hx(a) { + return fx(this, BD(a, 35)); + }; + _.Mb = function lx(a) { + return fx(this, BD(a, 35)); + }; + _.Fb = function jx(a) { + var b; + if (JD(a, 514)) { + b = BD(a, 514); + return Ek(this.a, b.a) && Ek(this.b, b.b); + } + return false; + }; + _.Hb = function kx() { + return this.a.Hb() * 31 + this.b.Hb(); + }; + _.Ib = function mx() { + return nx(this.a, this.b); + }; + mdb(Zhe, "Range", 514); + bcb(778, 1999, yie, px); + _.Zc = function tx(a) { + return jm(this.b, a); + }; + _.Pd = function qx() { + return this.a; + }; + _.Xb = function rx(a) { + return Em(this.b, a); + }; + _.Fd = function sx(a) { + return jm(this.b, a); + }; + mdb(Zhe, "RegularImmutableAsList", 778); + bcb(646, 2006, yie, ux); + _.Hd = function vx() { + return this.a; + }; + mdb(Zhe, "RegularImmutableList", 646); + bcb(616, 715, Aie, wx); + mdb(Zhe, "RegularImmutableMap", 616); + bcb(716, 703, Cie, zx); + var xx; + mdb(Zhe, "RegularImmutableSet", 716); + bcb(1976, eie, fie); + _.Kc = function Mx() { + return new Xx(this.a, this.b); + }; + _.Fc = function Jx(a) { + throw vbb(new bgb()); + }; + _.Gc = function Kx(a) { + throw vbb(new bgb()); + }; + _.$b = function Lx() { + throw vbb(new bgb()); + }; + _.Mc = function Nx(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "Sets/SetView", 1976); + bcb(963, 1976, fie, Px); + _.Kc = function Tx() { + return new Xx(this.a, this.b); + }; + _.Hc = function Qx(a) { + return tqb(this.a, a) && this.b.Hc(a); + }; + _.Ic = function Rx(a) { + return Be(this.a, a) && this.b.Ic(a); + }; + _.dc = function Sx() { + return omb(this.b, this.a); + }; + _.Lc = function Ux() { + return JAb(new YAb(null, new Kub(this.a, 1)), new _x(this.b)); + }; + _.gc = function Vx() { + return Ox(this); + }; + _.Oc = function Wx() { + return JAb(new YAb(null, new Kub(this.a, 1)), new Zx(this.b)); + }; + mdb(Zhe, "Sets/2", 963); + bcb(700, 699, Yhe, Xx); + _.Yb = function Yx() { + var a; + while (Eqb(this.a)) { + a = Fqb(this.a); + if (this.c.Hc(a)) { + return a; + } + } + return this.e = 2, null; + }; + mdb(Zhe, "Sets/2/1", 700); + bcb(964, 1, Oie, Zx); + _.Mb = function $x(a) { + return this.a.Hc(a); + }; + mdb(Zhe, "Sets/2/4methodref$contains$Type", 964); + bcb(965, 1, Oie, _x); + _.Mb = function ay(a) { + return this.a.Hc(a); + }; + mdb(Zhe, "Sets/2/5methodref$contains$Type", 965); + bcb(607, 1975, { 607: 1, 3: 1, 20: 1, 14: 1, 271: 1, 21: 1, 84: 1 }, by); + _.Bd = function cy() { + return this.b; + }; + _.Cd = function dy() { + return this.b; + }; + _.Md = function ey() { + return this.b; + }; + _.Jc = function fy(a) { + this.a.Jc(a); + }; + _.Lc = function gy() { + return this.a.Lc(); + }; + _.Oc = function hy() { + return this.a.Oc(); + }; + mdb(Zhe, "Sets/UnmodifiableNavigableSet", 607); + bcb(1932, 1931, Aie, iy); + _.Ld = function jy() { + return Ql(), new oy(this.a); + }; + _.Cc = function ky() { + return Ql(), new oy(this.a); + }; + _.pd = function ly() { + return Ql(), new oy(this.a); + }; + mdb(Zhe, "SingletonImmutableBiMap", 1932); + bcb(647, 2006, yie, my); + _.Hd = function ny() { + return this.a; + }; + mdb(Zhe, "SingletonImmutableList", 647); + bcb(350, 1981, Cie, oy); + _.Kc = function ry() { + return new Ir(this.a); + }; + _.Hc = function py(a) { + return pb(this.a, a); + }; + _.Ed = function qy() { + return new Ir(this.a); + }; + _.gc = function sy() { + return 1; + }; + mdb(Zhe, "SingletonImmutableSet", 350); + bcb(1115, 1, {}, vy); + _.Kb = function wy(a) { + return BD(a, 164); + }; + mdb(Zhe, "Streams/lambda$0$Type", 1115); + bcb(1116, 1, Pie, xy); + _.Vd = function yy() { + uy(this.a); + }; + mdb(Zhe, "Streams/lambda$1$Type", 1116); + bcb(1659, 1658, _he, Ay); + _.Zb = function By() { + var a; + return a = this.f, BD(BD(!a ? this.f = JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c) : a, 161), 171); + }; + _.hc = function Ey() { + return new Hxb(this.b); + }; + _.gd = function Fy() { + return new Hxb(this.b); + }; + _.ec = function Hy() { + var a; + return a = this.i, BD(BD(!a ? this.i = JD(this.c, 171) ? new $f(this, BD(this.c, 171)) : JD(this.c, 161) ? new Yf(this, BD(this.c, 161)) : new zf(this, this.c) : a, 84), 271); + }; + _.ac = function Dy() { + return JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c); + }; + _.ic = function Gy(a) { + a == null && this.a.ue(a, a); + return new Hxb(this.b); + }; + mdb(Zhe, "TreeMultimap", 1659); + bcb(78, 1, { 3: 1, 78: 1 }); + _.Wd = function $y(a) { + return new Error(a); + }; + _.Xd = function az() { + return this.e; + }; + _.Yd = function bz() { + return XAb(NAb(Plb((this.k == null && (this.k = KC(_I, nie, 78, 0, 0, 1)), this.k)), new _fb())); + }; + _.Zd = function cz() { + return this.f; + }; + _.$d = function dz() { + return this.g; + }; + _._d = function ez() { + Vy(this, _y(this.Wd(Wy(this, this.g)))); + Sz(this); + }; + _.Ib = function fz() { + return Wy(this, this.$d()); + }; + _.e = Sie; + _.i = false; + _.n = true; + var _I = mdb(Phe, "Throwable", 78); + bcb(102, 78, { 3: 1, 102: 1, 78: 1 }); + mdb(Phe, "Exception", 102); + bcb(60, 102, Tie, gz, hz); + mdb(Phe, "RuntimeException", 60); + bcb(598, 60, Tie); + mdb(Phe, "JsException", 598); + bcb(863, 598, Tie); + mdb(Uie, "JavaScriptExceptionBase", 863); + bcb(477, 863, { 477: 1, 3: 1, 102: 1, 60: 1, 78: 1 }, lz); + _.$d = function oz() { + kz(this); + return this.c; + }; + _.ae = function pz() { + return PD(this.b) === PD(iz) ? null : this.b; + }; + var iz; + mdb(Wie, "JavaScriptException", 477); + var PH = mdb(Wie, "JavaScriptObject$", 0); + var tz; + bcb(1948, 1, {}); + mdb(Wie, "Scheduler", 1948); + var xz = 0, yz = 0, zz = -1; + bcb(890, 1948, {}, Nz); + var Jz; + mdb(Uie, "SchedulerImpl", 890); + var Qz; + bcb(1960, 1, {}); + mdb(Uie, "StackTraceCreator/Collector", 1960); + bcb(864, 1960, {}, Yz); + _.be = function Zz(a) { + var b = {}; + var c = []; + a[Yie] = c; + var d = arguments.callee.caller; + while (d) { + var e = (Rz(), d.name || (d.name = Uz(d.toString()))); + c.push(e); + var f = ":" + e; + var g = b[f]; + if (g) { + var h, i; + for (h = 0, i = g.length; h < i; h++) { + if (g[h] === d) { + return; + } + } + } + (g || (b[f] = [])).push(d); + d = d.caller; + } + }; + _.ce = function $z(a) { + var b, c, d, e; + d = (Rz(), a && a[Yie] ? a[Yie] : []); + c = d.length; + e = KC(VI, nie, 310, c, 0, 1); + for (b = 0; b < c; b++) { + e[b] = new Zeb(d[b], null, -1); + } + return e; + }; + mdb(Uie, "StackTraceCreator/CollectorLegacy", 864); + bcb(1961, 1960, {}); + _.be = function aA(a) { + }; + _.de = function bA(a, b, c, d) { + return new Zeb(b, a + "@" + d, c < 0 ? -1 : c); + }; + _.ce = function cA(a) { + var b, c, d, e, f, g; + e = Wz(a); + f = KC(VI, nie, 310, 0, 0, 1); + b = 0; + d = e.length; + if (d == 0) { + return f; + } + g = _z(this, e[0]); + dfb(g.d, Xie) || (f[b++] = g); + for (c = 1; c < d; c++) { + f[b++] = _z(this, e[c]); + } + return f; + }; + mdb(Uie, "StackTraceCreator/CollectorModern", 1961); + bcb(865, 1961, {}, dA); + _.de = function eA(a, b, c, d) { + return new Zeb(b, a, -1); + }; + mdb(Uie, "StackTraceCreator/CollectorModernNoSourceMap", 865); + bcb(1050, 1, {}); + mdb(yje, zje, 1050); + bcb(615, 1050, { 615: 1 }, HA); + var FA; + mdb(Aje, zje, 615); + bcb(2001, 1, {}); + mdb(yje, Bje, 2001); + bcb(2002, 2001, {}); + mdb(Aje, Bje, 2002); + bcb(1090, 1, {}, MA); + var JA; + mdb(Aje, "LocaleInfo", 1090); + bcb(1918, 1, {}, PA); + _.a = 0; + mdb(Aje, "TimeZone", 1918); + bcb(1258, 2002, {}, VA); + mdb("com.google.gwt.i18n.client.impl.cldr", "DateTimeFormatInfoImpl", 1258); + bcb(434, 1, { 434: 1 }, WA); + _.a = false; + _.b = 0; + mdb(yje, "DateTimeFormat/PatternPart", 434); + bcb(199, 1, Cje, eB, fB, gB); + _.wd = function hB(a) { + return XA(this, BD(a, 199)); + }; + _.Fb = function iB(a) { + return JD(a, 199) && Bbb(Cbb(this.q.getTime()), Cbb(BD(a, 199).q.getTime())); + }; + _.Hb = function jB() { + var a; + a = Cbb(this.q.getTime()); + return Tbb(Vbb(a, Pbb(a, 32))); + }; + _.Ib = function lB() { + var a, b, c; + c = -this.q.getTimezoneOffset(); + a = (c >= 0 ? "+" : "") + (c / 60 | 0); + b = kB($wnd.Math.abs(c) % 60); + return (Dpb(), Bpb)[this.q.getDay()] + " " + Cpb[this.q.getMonth()] + " " + kB(this.q.getDate()) + " " + kB(this.q.getHours()) + ":" + kB(this.q.getMinutes()) + ":" + kB(this.q.getSeconds()) + " GMT" + a + b + " " + this.q.getFullYear(); + }; + var $J = mdb(bie, "Date", 199); + bcb(1915, 199, Cje, nB); + _.a = false; + _.b = 0; + _.c = 0; + _.d = 0; + _.e = 0; + _.f = 0; + _.g = false; + _.i = 0; + _.j = 0; + _.k = 0; + _.n = 0; + _.o = 0; + _.p = 0; + mdb("com.google.gwt.i18n.shared.impl", "DateRecord", 1915); + bcb(1966, 1, {}); + _.fe = function oB() { + return null; + }; + _.ge = function pB() { + return null; + }; + _.he = function qB() { + return null; + }; + _.ie = function rB() { + return null; + }; + _.je = function sB() { + return null; + }; + mdb(Dje, "JSONValue", 1966); + bcb(216, 1966, { 216: 1 }, wB, xB); + _.Fb = function yB(a) { + if (!JD(a, 216)) { + return false; + } + return qz(this.a, BD(a, 216).a); + }; + _.ee = function zB() { + return DB; + }; + _.Hb = function AB() { + return rz(this.a); + }; + _.fe = function BB() { + return this; + }; + _.Ib = function CB() { + var a, b, c; + c = new Wfb("["); + for (b = 0, a = this.a.length; b < a; b++) { + b > 0 && (c.a += ",", c); + Pfb(c, tB(this, b)); + } + c.a += "]"; + return c.a; + }; + mdb(Dje, "JSONArray", 216); + bcb(483, 1966, { 483: 1 }, HB); + _.ee = function IB() { + return LB; + }; + _.ge = function JB() { + return this; + }; + _.Ib = function KB() { + return Bcb(), "" + this.a; + }; + _.a = false; + var EB, FB; + mdb(Dje, "JSONBoolean", 483); + bcb(985, 60, Tie, MB); + mdb(Dje, "JSONException", 985); + bcb(1023, 1966, {}, PB); + _.ee = function QB() { + return SB; + }; + _.Ib = function RB() { + return Xhe; + }; + var NB; + mdb(Dje, "JSONNull", 1023); + bcb(258, 1966, { 258: 1 }, TB); + _.Fb = function UB(a) { + if (!JD(a, 258)) { + return false; + } + return this.a == BD(a, 258).a; + }; + _.ee = function VB() { + return ZB; + }; + _.Hb = function WB() { + return Hdb(this.a); + }; + _.he = function XB() { + return this; + }; + _.Ib = function YB() { + return this.a + ""; + }; + _.a = 0; + mdb(Dje, "JSONNumber", 258); + bcb(183, 1966, { 183: 1 }, eC, fC); + _.Fb = function gC(a) { + if (!JD(a, 183)) { + return false; + } + return qz(this.a, BD(a, 183).a); + }; + _.ee = function hC() { + return lC; + }; + _.Hb = function iC() { + return rz(this.a); + }; + _.ie = function jC() { + return this; + }; + _.Ib = function kC() { + var a, b, c, d, e, f, g; + g = new Wfb("{"); + a = true; + f = $B(this, KC(ZI, nie, 2, 0, 6, 1)); + for (c = f, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + a ? a = false : (g.a += She, g); + Qfb(g, vz(b)); + g.a += ":"; + Pfb(g, aC(this, b)); + } + g.a += "}"; + return g.a; + }; + mdb(Dje, "JSONObject", 183); + bcb(596, eie, fie, mC); + _.Hc = function nC(a) { + return ND(a) && _B(this.a, GD(a)); + }; + _.Kc = function oC() { + return new vib(new amb(this.b)); + }; + _.gc = function pC() { + return this.b.length; + }; + mdb(Dje, "JSONObject/1", 596); + var qC; + bcb(204, 1966, { 204: 1 }, yC); + _.Fb = function zC(a) { + if (!JD(a, 204)) { + return false; + } + return dfb(this.a, BD(a, 204).a); + }; + _.ee = function AC() { + return EC; + }; + _.Hb = function BC() { + return LCb(this.a); + }; + _.je = function CC() { + return this; + }; + _.Ib = function DC() { + return vz(this.a); + }; + mdb(Dje, "JSONString", 204); + var QC; + var sD, tD, uD, vD; + bcb(1962, 1, { 525: 1 }); + mdb(Lje, "OutputStream", 1962); + bcb(1963, 1962, { 525: 1 }); + mdb(Lje, "FilterOutputStream", 1963); + bcb(866, 1963, { 525: 1 }, jcb); + mdb(Lje, "PrintStream", 866); + bcb(418, 1, { 475: 1 }); + _.Ib = function ncb() { + return this.a; + }; + mdb(Phe, "AbstractStringBuilder", 418); + bcb(529, 60, Tie, ocb); + mdb(Phe, "ArithmeticException", 529); + bcb(73, 60, Mje, pcb, qcb); + mdb(Phe, "IndexOutOfBoundsException", 73); + bcb(320, 73, { 3: 1, 320: 1, 102: 1, 73: 1, 60: 1, 78: 1 }, rcb, scb); + mdb(Phe, "ArrayIndexOutOfBoundsException", 320); + bcb(528, 60, Tie, tcb, ucb); + mdb(Phe, "ArrayStoreException", 528); + bcb(289, 78, Nje, vcb); + mdb(Phe, "Error", 289); + bcb(194, 289, Nje, xcb, ycb); + mdb(Phe, "AssertionError", 194); + xD = { 3: 1, 476: 1, 35: 1 }; + var zcb, Acb; + var wI = mdb(Phe, "Boolean", 476); + bcb(236, 1, { 3: 1, 236: 1 }); + var Gcb; + mdb(Phe, "Number", 236); + bcb(217, 236, { 3: 1, 217: 1, 35: 1, 236: 1 }, Mcb); + _.wd = function Ncb(a) { + return Lcb(this, BD(a, 217)); + }; + _.ke = function Ocb() { + return this.a; + }; + _.Fb = function Pcb(a) { + return JD(a, 217) && BD(a, 217).a == this.a; + }; + _.Hb = function Qcb() { + return this.a; + }; + _.Ib = function Rcb() { + return "" + this.a; + }; + _.a = 0; + var xI = mdb(Phe, "Byte", 217); + var Tcb; + bcb(172, 1, { 3: 1, 172: 1, 35: 1 }, Xcb); + _.wd = function Ycb(a) { + return Wcb(this, BD(a, 172)); + }; + _.Fb = function $cb(a) { + return JD(a, 172) && BD(a, 172).a == this.a; + }; + _.Hb = function _cb() { + return this.a; + }; + _.Ib = function adb() { + return String.fromCharCode(this.a); + }; + _.a = 0; + var Vcb; + var yI = mdb(Phe, "Character", 172); + var cdb; + bcb(205, 60, { 3: 1, 205: 1, 102: 1, 60: 1, 78: 1 }, Bdb, Cdb); + mdb(Phe, "ClassCastException", 205); + yD = { 3: 1, 35: 1, 333: 1, 236: 1 }; + var BI = mdb(Phe, "Double", 333); + bcb(155, 236, { 3: 1, 35: 1, 155: 1, 236: 1 }, Ndb, Odb); + _.wd = function Pdb(a) { + return Mdb(this, BD(a, 155)); + }; + _.ke = function Qdb() { + return this.a; + }; + _.Fb = function Rdb(a) { + return JD(a, 155) && Fdb(this.a, BD(a, 155).a); + }; + _.Hb = function Sdb() { + return QD(this.a); + }; + _.Ib = function Udb() { + return "" + this.a; + }; + _.a = 0; + var FI = mdb(Phe, "Float", 155); + bcb(32, 60, { 3: 1, 102: 1, 32: 1, 60: 1, 78: 1 }, Vdb, Wdb, Xdb); + mdb(Phe, "IllegalArgumentException", 32); + bcb(71, 60, Tie, Ydb, Zdb); + mdb(Phe, "IllegalStateException", 71); + bcb(19, 236, { 3: 1, 35: 1, 19: 1, 236: 1 }, _db); + _.wd = function ceb(a) { + return $db(this, BD(a, 19)); + }; + _.ke = function deb() { + return this.a; + }; + _.Fb = function eeb(a) { + return JD(a, 19) && BD(a, 19).a == this.a; + }; + _.Hb = function feb() { + return this.a; + }; + _.Ib = function leb() { + return "" + this.a; + }; + _.a = 0; + var JI = mdb(Phe, "Integer", 19); + var neb; + var peb; + bcb(162, 236, { 3: 1, 35: 1, 162: 1, 236: 1 }, teb); + _.wd = function veb(a) { + return seb(this, BD(a, 162)); + }; + _.ke = function web() { + return Sbb(this.a); + }; + _.Fb = function xeb(a) { + return JD(a, 162) && Bbb(BD(a, 162).a, this.a); + }; + _.Hb = function yeb() { + return Tbb(this.a); + }; + _.Ib = function zeb() { + return "" + Ubb(this.a); + }; + _.a = 0; + var MI = mdb(Phe, "Long", 162); + var Beb; + bcb(2039, 1, {}); + bcb(1831, 60, Tie, Feb); + mdb(Phe, "NegativeArraySizeException", 1831); + bcb(173, 598, { 3: 1, 102: 1, 173: 1, 60: 1, 78: 1 }, Geb, Heb); + _.Wd = function Ieb(a) { + return new TypeError(a); + }; + mdb(Phe, "NullPointerException", 173); + var Jeb, Keb, Leb, Meb; + bcb(127, 32, { 3: 1, 102: 1, 32: 1, 127: 1, 60: 1, 78: 1 }, Oeb); + mdb(Phe, "NumberFormatException", 127); + bcb(184, 236, { 3: 1, 35: 1, 236: 1, 184: 1 }, Qeb); + _.wd = function Reb(a) { + return Peb(this, BD(a, 184)); + }; + _.ke = function Seb() { + return this.a; + }; + _.Fb = function Teb(a) { + return JD(a, 184) && BD(a, 184).a == this.a; + }; + _.Hb = function Ueb() { + return this.a; + }; + _.Ib = function Veb() { + return "" + this.a; + }; + _.a = 0; + var UI = mdb(Phe, "Short", 184); + var Xeb; + bcb(310, 1, { 3: 1, 310: 1 }, Zeb); + _.Fb = function $eb(a) { + var b; + if (JD(a, 310)) { + b = BD(a, 310); + return this.c == b.c && this.d == b.d && this.a == b.a && this.b == b.b; + } + return false; + }; + _.Hb = function _eb() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [meb(this.c), this.a, this.d, this.b])); + }; + _.Ib = function afb() { + return this.a + "." + this.d + "(" + (this.b != null ? this.b : "Unknown Source") + (this.c >= 0 ? ":" + this.c : "") + ")"; + }; + _.c = 0; + var VI = mdb(Phe, "StackTraceElement", 310); + zD = { 3: 1, 475: 1, 35: 1, 2: 1 }; + var ZI = mdb(Phe, Vie, 2); + bcb(107, 418, { 475: 1 }, Hfb, Ifb, Jfb); + mdb(Phe, "StringBuffer", 107); + bcb(100, 418, { 475: 1 }, Ufb, Vfb, Wfb); + mdb(Phe, "StringBuilder", 100); + bcb(687, 73, Mje, Xfb); + mdb(Phe, "StringIndexOutOfBoundsException", 687); + bcb(2043, 1, {}); + var Yfb; + bcb(844, 1, {}, _fb); + _.Kb = function agb(a) { + return BD(a, 78).e; + }; + mdb(Phe, "Throwable/lambda$0$Type", 844); + bcb(41, 60, { 3: 1, 102: 1, 60: 1, 78: 1, 41: 1 }, bgb, cgb); + mdb(Phe, "UnsupportedOperationException", 41); + bcb(240, 236, { 3: 1, 35: 1, 236: 1, 240: 1 }, sgb, tgb); + _.wd = function wgb(a) { + return mgb(this, BD(a, 240)); + }; + _.ke = function xgb() { + return Hcb(rgb(this)); + }; + _.Fb = function ygb(a) { + var b; + if (this === a) { + return true; + } + if (JD(a, 240)) { + b = BD(a, 240); + return this.e == b.e && mgb(this, b) == 0; + } + return false; + }; + _.Hb = function zgb() { + var a; + if (this.b != 0) { + return this.b; + } + if (this.a < 54) { + a = Cbb(this.f); + this.b = Tbb(xbb(a, -1)); + this.b = 33 * this.b + Tbb(xbb(Obb(a, 32), -1)); + this.b = 17 * this.b + QD(this.e); + return this.b; + } + this.b = 17 * Ngb(this.c) + QD(this.e); + return this.b; + }; + _.Ib = function Agb() { + return rgb(this); + }; + _.a = 0; + _.b = 0; + _.d = 0; + _.e = 0; + _.f = 0; + var dgb, egb, fgb, ggb, hgb, igb, jgb, kgb; + var bJ = mdb("java.math", "BigDecimal", 240); + bcb(91, 236, { 3: 1, 35: 1, 236: 1, 91: 1 }, Tgb, Ugb, Vgb, Wgb, Xgb, Ygb); + _.wd = function $gb(a) { + return Igb(this, BD(a, 91)); + }; + _.ke = function _gb() { + return Hcb(shb(this, 0)); + }; + _.Fb = function ahb(a) { + return Kgb(this, a); + }; + _.Hb = function chb() { + return Ngb(this); + }; + _.Ib = function ehb() { + return shb(this, 0); + }; + _.b = -2; + _.c = 0; + _.d = 0; + _.e = 0; + var Bgb, Cgb, Dgb, Egb, Fgb, Ggb; + var cJ = mdb("java.math", "BigInteger", 91); + var nhb, ohb; + var Bhb, Chb; + bcb(488, 1967, cie); + _.$b = function Xhb() { + Uhb(this); + }; + _._b = function Yhb(a) { + return Mhb(this, a); + }; + _.uc = function Zhb(a) { + return Nhb(this, a, this.g) || Nhb(this, a, this.f); + }; + _.vc = function $hb() { + return new eib(this); + }; + _.xc = function _hb(a) { + return Ohb(this, a); + }; + _.zc = function aib(a, b) { + return Rhb(this, a, b); + }; + _.Bc = function bib(a) { + return Thb(this, a); + }; + _.gc = function cib() { + return Vhb(this); + }; + mdb(bie, "AbstractHashMap", 488); + bcb(261, eie, fie, eib); + _.$b = function fib() { + this.a.$b(); + }; + _.Hc = function gib(a) { + return dib(this, a); + }; + _.Kc = function hib() { + return new nib(this.a); + }; + _.Mc = function iib(a) { + var b; + if (dib(this, a)) { + b = BD(a, 42).cd(); + this.a.Bc(b); + return true; + } + return false; + }; + _.gc = function jib() { + return this.a.gc(); + }; + mdb(bie, "AbstractHashMap/EntrySet", 261); + bcb(262, 1, aie, nib); + _.Nb = function oib(a) { + Rrb(this, a); + }; + _.Pb = function qib() { + return lib(this); + }; + _.Ob = function pib() { + return this.b; + }; + _.Qb = function rib() { + mib(this); + }; + _.b = false; + mdb(bie, "AbstractHashMap/EntrySetIterator", 262); + bcb(417, 1, aie, vib); + _.Nb = function wib(a) { + Rrb(this, a); + }; + _.Ob = function xib() { + return sib(this); + }; + _.Pb = function yib() { + return tib(this); + }; + _.Qb = function zib() { + uib(this); + }; + _.b = 0; + _.c = -1; + mdb(bie, "AbstractList/IteratorImpl", 417); + bcb(96, 417, jie, Bib); + _.Qb = function Hib() { + uib(this); + }; + _.Rb = function Cib(a) { + Aib(this, a); + }; + _.Sb = function Dib() { + return this.b > 0; + }; + _.Tb = function Eib() { + return this.b; + }; + _.Ub = function Fib() { + return sCb(this.b > 0), this.a.Xb(this.c = --this.b); + }; + _.Vb = function Gib() { + return this.b - 1; + }; + _.Wb = function Iib(a) { + yCb(this.c != -1); + this.a._c(this.c, a); + }; + mdb(bie, "AbstractList/ListIteratorImpl", 96); + bcb(219, 52, Lie, Jib); + _.Vc = function Kib(a, b) { + wCb(a, this.b); + this.c.Vc(this.a + a, b); + ++this.b; + }; + _.Xb = function Lib(a) { + tCb(a, this.b); + return this.c.Xb(this.a + a); + }; + _.$c = function Mib(a) { + var b; + tCb(a, this.b); + b = this.c.$c(this.a + a); + --this.b; + return b; + }; + _._c = function Nib(a, b) { + tCb(a, this.b); + return this.c._c(this.a + a, b); + }; + _.gc = function Oib() { + return this.b; + }; + _.a = 0; + _.b = 0; + mdb(bie, "AbstractList/SubList", 219); + bcb(384, eie, fie, Pib); + _.$b = function Qib() { + this.a.$b(); + }; + _.Hc = function Rib(a) { + return this.a._b(a); + }; + _.Kc = function Sib() { + var a; + return a = this.a.vc().Kc(), new Vib(a); + }; + _.Mc = function Tib(a) { + if (this.a._b(a)) { + this.a.Bc(a); + return true; + } + return false; + }; + _.gc = function Uib() { + return this.a.gc(); + }; + mdb(bie, "AbstractMap/1", 384); + bcb(691, 1, aie, Vib); + _.Nb = function Wib(a) { + Rrb(this, a); + }; + _.Ob = function Xib() { + return this.a.Ob(); + }; + _.Pb = function Yib() { + var a; + return a = BD(this.a.Pb(), 42), a.cd(); + }; + _.Qb = function Zib() { + this.a.Qb(); + }; + mdb(bie, "AbstractMap/1/1", 691); + bcb(226, 28, die, $ib); + _.$b = function _ib() { + this.a.$b(); + }; + _.Hc = function ajb(a) { + return this.a.uc(a); + }; + _.Kc = function bjb() { + var a; + return a = this.a.vc().Kc(), new djb(a); + }; + _.gc = function cjb() { + return this.a.gc(); + }; + mdb(bie, "AbstractMap/2", 226); + bcb(294, 1, aie, djb); + _.Nb = function ejb(a) { + Rrb(this, a); + }; + _.Ob = function fjb() { + return this.a.Ob(); + }; + _.Pb = function gjb() { + var a; + return a = BD(this.a.Pb(), 42), a.dd(); + }; + _.Qb = function hjb() { + this.a.Qb(); + }; + mdb(bie, "AbstractMap/2/1", 294); + bcb(484, 1, { 484: 1, 42: 1 }); + _.Fb = function jjb(a) { + var b; + if (!JD(a, 42)) { + return false; + } + b = BD(a, 42); + return wtb(this.d, b.cd()) && wtb(this.e, b.dd()); + }; + _.cd = function kjb() { + return this.d; + }; + _.dd = function ljb() { + return this.e; + }; + _.Hb = function mjb() { + return xtb(this.d) ^ xtb(this.e); + }; + _.ed = function njb(a) { + return ijb(this, a); + }; + _.Ib = function ojb() { + return this.d + "=" + this.e; + }; + mdb(bie, "AbstractMap/AbstractEntry", 484); + bcb(383, 484, { 484: 1, 383: 1, 42: 1 }, pjb); + mdb(bie, "AbstractMap/SimpleEntry", 383); + bcb(1984, 1, _je); + _.Fb = function qjb(a) { + var b; + if (!JD(a, 42)) { + return false; + } + b = BD(a, 42); + return wtb(this.cd(), b.cd()) && wtb(this.dd(), b.dd()); + }; + _.Hb = function rjb() { + return xtb(this.cd()) ^ xtb(this.dd()); + }; + _.Ib = function sjb() { + return this.cd() + "=" + this.dd(); + }; + mdb(bie, lie, 1984); + bcb(1992, 1967, gie); + _.tc = function vjb(a) { + return tjb(this, a); + }; + _._b = function wjb(a) { + return ujb(this, a); + }; + _.vc = function xjb() { + return new Bjb(this); + }; + _.xc = function yjb(a) { + var b; + b = a; + return Wd(Awb(this, b)); + }; + _.ec = function Ajb() { + return new Gjb(this); + }; + mdb(bie, "AbstractNavigableMap", 1992); + bcb(739, eie, fie, Bjb); + _.Hc = function Cjb(a) { + return JD(a, 42) && tjb(this.b, BD(a, 42)); + }; + _.Kc = function Djb() { + return new Ywb(this.b); + }; + _.Mc = function Ejb(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Kwb(this.b, b); + } + return false; + }; + _.gc = function Fjb() { + return this.b.c; + }; + mdb(bie, "AbstractNavigableMap/EntrySet", 739); + bcb(493, eie, iie, Gjb); + _.Nc = function Mjb() { + return new Rub(this); + }; + _.$b = function Hjb() { + zwb(this.a); + }; + _.Hc = function Ijb(a) { + return ujb(this.a, a); + }; + _.Kc = function Jjb() { + var a; + return a = new Ywb(new cxb(this.a).b), new Njb(a); + }; + _.Mc = function Kjb(a) { + if (ujb(this.a, a)) { + Jwb(this.a, a); + return true; + } + return false; + }; + _.gc = function Ljb() { + return this.a.c; + }; + mdb(bie, "AbstractNavigableMap/NavigableKeySet", 493); + bcb(494, 1, aie, Njb); + _.Nb = function Ojb(a) { + Rrb(this, a); + }; + _.Ob = function Pjb() { + return sib(this.a.a); + }; + _.Pb = function Qjb() { + var a; + return a = Wwb(this.a), a.cd(); + }; + _.Qb = function Rjb() { + Xwb(this.a); + }; + mdb(bie, "AbstractNavigableMap/NavigableKeySet/1", 494); + bcb(2004, 28, die); + _.Fc = function Sjb(a) { + return zCb(cub(this, a)), true; + }; + _.Gc = function Tjb(a) { + uCb(a); + mCb(a != this, "Can't add a queue to itself"); + return ye(this, a); + }; + _.$b = function Ujb() { + while (dub(this) != null) + ; + }; + mdb(bie, "AbstractQueue", 2004); + bcb(302, 28, { 4: 1, 20: 1, 28: 1, 14: 1 }, jkb, kkb); + _.Fc = function lkb(a) { + return Xjb(this, a), true; + }; + _.$b = function nkb() { + Yjb(this); + }; + _.Hc = function okb(a) { + return Zjb(new xkb(this), a); + }; + _.dc = function pkb() { + return akb(this); + }; + _.Kc = function qkb() { + return new xkb(this); + }; + _.Mc = function rkb(a) { + return dkb(new xkb(this), a); + }; + _.gc = function skb() { + return this.c - this.b & this.a.length - 1; + }; + _.Nc = function tkb() { + return new Kub(this, 272); + }; + _.Qc = function ukb(a) { + var b; + b = this.c - this.b & this.a.length - 1; + a.length < b && (a = eCb(new Array(b), a)); + $jb(this, a, b); + a.length > b && NC(a, b, null); + return a; + }; + _.b = 0; + _.c = 0; + mdb(bie, "ArrayDeque", 302); + bcb(446, 1, aie, xkb); + _.Nb = function ykb(a) { + Rrb(this, a); + }; + _.Ob = function zkb() { + return this.a != this.b; + }; + _.Pb = function Akb() { + return vkb(this); + }; + _.Qb = function Bkb() { + wkb(this); + }; + _.a = 0; + _.b = 0; + _.c = -1; + mdb(bie, "ArrayDeque/IteratorImpl", 446); + bcb(12, 52, ake, Rkb, Skb, Tkb); + _.Vc = function Ukb(a, b) { + Dkb(this, a, b); + }; + _.Fc = function Vkb(a) { + return Ekb(this, a); + }; + _.Wc = function Wkb(a, b) { + return Fkb(this, a, b); + }; + _.Gc = function Xkb(a) { + return Gkb(this, a); + }; + _.$b = function Ykb() { + this.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _.Hc = function Zkb(a) { + return Jkb(this, a, 0) != -1; + }; + _.Jc = function $kb(a) { + Hkb(this, a); + }; + _.Xb = function _kb(a) { + return Ikb(this, a); + }; + _.Xc = function alb(a) { + return Jkb(this, a, 0); + }; + _.dc = function blb() { + return this.c.length == 0; + }; + _.Kc = function clb() { + return new olb(this); + }; + _.$c = function dlb(a) { + return Kkb(this, a); + }; + _.Mc = function elb(a) { + return Lkb(this, a); + }; + _.Ud = function flb(a, b) { + Mkb(this, a, b); + }; + _._c = function glb(a, b) { + return Nkb(this, a, b); + }; + _.gc = function hlb() { + return this.c.length; + }; + _.ad = function ilb(a) { + Okb(this, a); + }; + _.Pc = function jlb() { + return Pkb(this); + }; + _.Qc = function klb(a) { + return Qkb(this, a); + }; + var DJ = mdb(bie, "ArrayList", 12); + bcb(7, 1, aie, olb); + _.Nb = function plb(a) { + Rrb(this, a); + }; + _.Ob = function qlb() { + return llb(this); + }; + _.Pb = function rlb() { + return mlb(this); + }; + _.Qb = function slb() { + nlb(this); + }; + _.a = 0; + _.b = -1; + mdb(bie, "ArrayList/1", 7); + bcb(2013, $wnd.Function, {}, Ylb); + _.te = function Zlb(a, b) { + return Kdb(a, b); + }; + bcb(154, 52, bke, amb); + _.Hc = function bmb(a) { + return Bt(this, a) != -1; + }; + _.Jc = function cmb(a) { + var b, c, d, e; + uCb(a); + for (c = this.a, d = 0, e = c.length; d < e; ++d) { + b = c[d]; + a.td(b); + } + }; + _.Xb = function dmb(a) { + return $lb(this, a); + }; + _._c = function emb(a, b) { + var c; + c = (tCb(a, this.a.length), this.a[a]); + NC(this.a, a, b); + return c; + }; + _.gc = function fmb() { + return this.a.length; + }; + _.ad = function gmb(a) { + Mlb(this.a, this.a.length, a); + }; + _.Pc = function hmb() { + return _lb(this, KC(SI, Uhe, 1, this.a.length, 5, 1)); + }; + _.Qc = function imb(a) { + return _lb(this, a); + }; + mdb(bie, "Arrays/ArrayList", 154); + var jmb, kmb, lmb; + bcb(940, 52, bke, xmb); + _.Hc = function ymb(a) { + return false; + }; + _.Xb = function zmb(a) { + return wmb(a); + }; + _.Kc = function Amb() { + return mmb(), Emb(), Dmb; + }; + _.Yc = function Bmb() { + return mmb(), Emb(), Dmb; + }; + _.gc = function Cmb() { + return 0; + }; + mdb(bie, "Collections/EmptyList", 940); + bcb(941, 1, jie, Fmb); + _.Nb = function Hmb(a) { + Rrb(this, a); + }; + _.Rb = function Gmb(a) { + throw vbb(new bgb()); + }; + _.Ob = function Imb() { + return false; + }; + _.Sb = function Jmb() { + return false; + }; + _.Pb = function Kmb() { + throw vbb(new utb()); + }; + _.Tb = function Lmb() { + return 0; + }; + _.Ub = function Mmb() { + throw vbb(new utb()); + }; + _.Vb = function Nmb() { + return -1; + }; + _.Qb = function Omb() { + throw vbb(new Ydb()); + }; + _.Wb = function Pmb(a) { + throw vbb(new Ydb()); + }; + var Dmb; + mdb(bie, "Collections/EmptyListIterator", 941); + bcb(943, 1967, Aie, Qmb); + _._b = function Rmb(a) { + return false; + }; + _.uc = function Smb(a) { + return false; + }; + _.vc = function Tmb() { + return mmb(), lmb; + }; + _.xc = function Umb(a) { + return null; + }; + _.ec = function Vmb() { + return mmb(), lmb; + }; + _.gc = function Wmb() { + return 0; + }; + _.Cc = function Xmb() { + return mmb(), jmb; + }; + mdb(bie, "Collections/EmptyMap", 943); + bcb(942, eie, Cie, Ymb); + _.Hc = function Zmb(a) { + return false; + }; + _.Kc = function $mb() { + return mmb(), Emb(), Dmb; + }; + _.gc = function _mb() { + return 0; + }; + mdb(bie, "Collections/EmptySet", 942); + bcb(599, 52, { 3: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1 }, anb); + _.Hc = function bnb(a) { + return wtb(this.a, a); + }; + _.Xb = function cnb(a) { + tCb(a, 1); + return this.a; + }; + _.gc = function dnb() { + return 1; + }; + mdb(bie, "Collections/SingletonList", 599); + bcb(372, 1, wie, lnb); + _.Jc = function rnb(a) { + reb(this, a); + }; + _.Lc = function unb() { + return new YAb(null, this.Nc()); + }; + _.Nc = function xnb() { + return new Kub(this, 0); + }; + _.Oc = function ynb() { + return new YAb(null, this.Nc()); + }; + _.Fc = function mnb(a) { + return enb(); + }; + _.Gc = function nnb(a) { + return fnb(); + }; + _.$b = function onb() { + gnb(); + }; + _.Hc = function pnb(a) { + return hnb(this, a); + }; + _.Ic = function qnb(a) { + return inb(this, a); + }; + _.dc = function snb() { + return this.b.dc(); + }; + _.Kc = function tnb() { + return new Dnb(this.b.Kc()); + }; + _.Mc = function vnb(a) { + return jnb(); + }; + _.gc = function wnb() { + return this.b.gc(); + }; + _.Pc = function znb() { + return this.b.Pc(); + }; + _.Qc = function Anb(a) { + return knb(this, a); + }; + _.Ib = function Bnb() { + return fcb(this.b); + }; + mdb(bie, "Collections/UnmodifiableCollection", 372); + bcb(371, 1, aie, Dnb); + _.Nb = function Enb(a) { + Rrb(this, a); + }; + _.Ob = function Fnb() { + return this.b.Ob(); + }; + _.Pb = function Gnb() { + return this.b.Pb(); + }; + _.Qb = function Hnb() { + Cnb(); + }; + mdb(bie, "Collections/UnmodifiableCollectionIterator", 371); + bcb(531, 372, cke, Inb); + _.Nc = function Vnb() { + return new Kub(this, 16); + }; + _.Vc = function Jnb(a, b) { + throw vbb(new bgb()); + }; + _.Wc = function Knb(a, b) { + throw vbb(new bgb()); + }; + _.Fb = function Lnb(a) { + return pb(this.a, a); + }; + _.Xb = function Mnb(a) { + return this.a.Xb(a); + }; + _.Hb = function Nnb() { + return tb(this.a); + }; + _.Xc = function Onb(a) { + return this.a.Xc(a); + }; + _.dc = function Pnb() { + return this.a.dc(); + }; + _.Yc = function Qnb() { + return new Xnb(this.a.Zc(0)); + }; + _.Zc = function Rnb(a) { + return new Xnb(this.a.Zc(a)); + }; + _.$c = function Snb(a) { + throw vbb(new bgb()); + }; + _._c = function Tnb(a, b) { + throw vbb(new bgb()); + }; + _.ad = function Unb(a) { + throw vbb(new bgb()); + }; + _.bd = function Wnb(a, b) { + return new Inb(this.a.bd(a, b)); + }; + mdb(bie, "Collections/UnmodifiableList", 531); + bcb(690, 371, jie, Xnb); + _.Qb = function bob() { + Cnb(); + }; + _.Rb = function Ynb(a) { + throw vbb(new bgb()); + }; + _.Sb = function Znb() { + return this.a.Sb(); + }; + _.Tb = function $nb() { + return this.a.Tb(); + }; + _.Ub = function _nb() { + return this.a.Ub(); + }; + _.Vb = function aob() { + return this.a.Vb(); + }; + _.Wb = function cob(a) { + throw vbb(new bgb()); + }; + mdb(bie, "Collections/UnmodifiableListIterator", 690); + bcb(600, 1, cie, iob); + _.wc = function oob(a) { + stb(this, a); + }; + _.yc = function tob(a, b, c) { + return ttb(this, a, b, c); + }; + _.$b = function job() { + throw vbb(new bgb()); + }; + _._b = function kob(a) { + return this.c._b(a); + }; + _.uc = function lob(a) { + return dob(this, a); + }; + _.vc = function mob() { + return eob(this); + }; + _.Fb = function nob(a) { + return fob(this, a); + }; + _.xc = function pob(a) { + return this.c.xc(a); + }; + _.Hb = function qob() { + return tb(this.c); + }; + _.dc = function rob() { + return this.c.dc(); + }; + _.ec = function sob() { + return gob(this); + }; + _.zc = function uob(a, b) { + throw vbb(new bgb()); + }; + _.Bc = function vob(a) { + throw vbb(new bgb()); + }; + _.gc = function wob() { + return this.c.gc(); + }; + _.Ib = function xob() { + return fcb(this.c); + }; + _.Cc = function yob() { + return hob(this); + }; + mdb(bie, "Collections/UnmodifiableMap", 600); + bcb(382, 372, Bie, zob); + _.Nc = function Cob() { + return new Kub(this, 1); + }; + _.Fb = function Aob(a) { + return pb(this.b, a); + }; + _.Hb = function Bob() { + return tb(this.b); + }; + mdb(bie, "Collections/UnmodifiableSet", 382); + bcb(944, 382, Bie, Gob); + _.Hc = function Hob(a) { + return Dob(this, a); + }; + _.Ic = function Iob(a) { + return this.b.Ic(a); + }; + _.Kc = function Job() { + var a; + a = this.b.Kc(); + return new Mob(a); + }; + _.Pc = function Kob() { + var a; + a = this.b.Pc(); + Fob(a, a.length); + return a; + }; + _.Qc = function Lob(a) { + return Eob(this, a); + }; + mdb(bie, "Collections/UnmodifiableMap/UnmodifiableEntrySet", 944); + bcb(945, 1, aie, Mob); + _.Nb = function Nob(a) { + Rrb(this, a); + }; + _.Pb = function Pob() { + return new Rob(BD(this.a.Pb(), 42)); + }; + _.Ob = function Oob() { + return this.a.Ob(); + }; + _.Qb = function Qob() { + throw vbb(new bgb()); + }; + mdb(bie, "Collections/UnmodifiableMap/UnmodifiableEntrySet/1", 945); + bcb(688, 1, _je, Rob); + _.Fb = function Sob(a) { + return this.a.Fb(a); + }; + _.cd = function Tob() { + return this.a.cd(); + }; + _.dd = function Uob() { + return this.a.dd(); + }; + _.Hb = function Vob() { + return this.a.Hb(); + }; + _.ed = function Wob(a) { + throw vbb(new bgb()); + }; + _.Ib = function Xob() { + return fcb(this.a); + }; + mdb(bie, "Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry", 688); + bcb(601, 531, { 20: 1, 14: 1, 15: 1, 54: 1 }, Yob); + mdb(bie, "Collections/UnmodifiableRandomAccessList", 601); + bcb(689, 382, Die, Zob); + _.Nc = function apb() { + return new Rub(this); + }; + _.Fb = function $ob(a) { + return pb(this.a, a); + }; + _.Hb = function _ob() { + return tb(this.a); + }; + mdb(bie, "Collections/UnmodifiableSortedSet", 689); + bcb(847, 1, dke, bpb); + _.ue = function cpb(a, b) { + var c; + return c = Ucc(BD(a, 11), BD(b, 11)), c != 0 ? c : Wcc(BD(a, 11), BD(b, 11)); + }; + _.Fb = function dpb(a) { + return this === a; + }; + _.ve = function epb() { + return new tpb(this); + }; + mdb(bie, "Comparator/lambda$0$Type", 847); + var fpb, gpb, hpb; + bcb(751, 1, dke, kpb); + _.ue = function lpb(a, b) { + return jpb(BD(a, 35), BD(b, 35)); + }; + _.Fb = function mpb(a) { + return this === a; + }; + _.ve = function npb() { + return ipb(), hpb; + }; + mdb(bie, "Comparators/NaturalOrderComparator", 751); + bcb(1177, 1, dke, ppb); + _.ue = function qpb(a, b) { + return opb(BD(a, 35), BD(b, 35)); + }; + _.Fb = function rpb(a) { + return this === a; + }; + _.ve = function spb() { + return ipb(), gpb; + }; + mdb(bie, "Comparators/ReverseNaturalOrderComparator", 1177); + bcb(64, 1, dke, tpb); + _.Fb = function vpb(a) { + return this === a; + }; + _.ue = function upb(a, b) { + return this.a.ue(b, a); + }; + _.ve = function wpb() { + return this.a; + }; + mdb(bie, "Comparators/ReversedComparator", 64); + bcb(166, 60, Tie, Apb); + mdb(bie, "ConcurrentModificationException", 166); + var Bpb, Cpb; + bcb(1904, 1, eke, Gpb); + _.we = function Hpb(a) { + Epb(this, a); + }; + _.Ib = function Ipb() { + return "DoubleSummaryStatistics[count = " + Ubb(this.a) + ", avg = " + (Dbb(this.a, 0) ? Fpb(this) / Sbb(this.a) : 0) + ", min = " + this.c + ", max = " + this.b + ", sum = " + Fpb(this) + "]"; + }; + _.a = 0; + _.b = Qje; + _.c = Pje; + _.d = 0; + _.e = 0; + _.f = 0; + mdb(bie, "DoubleSummaryStatistics", 1904); + bcb(1805, 60, Tie, Jpb); + mdb(bie, "EmptyStackException", 1805); + bcb(451, 1967, cie, Rpb); + _.zc = function Xpb(a, b) { + return Opb(this, a, b); + }; + _.$b = function Spb() { + Kpb(this); + }; + _._b = function Tpb(a) { + return Lpb(this, a); + }; + _.uc = function Upb(a) { + var b, c; + for (c = new Gqb(this.a); c.a < c.c.a.length; ) { + b = Fqb(c); + if (wtb(a, this.b[b.g])) { + return true; + } + } + return false; + }; + _.vc = function Vpb() { + return new _pb(this); + }; + _.xc = function Wpb(a) { + return Mpb(this, a); + }; + _.Bc = function Ypb(a) { + return Ppb(this, a); + }; + _.gc = function Zpb() { + return this.a.c; + }; + mdb(bie, "EnumMap", 451); + bcb(1352, eie, fie, _pb); + _.$b = function aqb() { + Kpb(this.a); + }; + _.Hc = function bqb(a) { + return $pb(this, a); + }; + _.Kc = function cqb() { + return new fqb(this.a); + }; + _.Mc = function dqb(a) { + var b; + if ($pb(this, a)) { + b = BD(a, 42).cd(); + Ppb(this.a, b); + return true; + } + return false; + }; + _.gc = function eqb() { + return this.a.a.c; + }; + mdb(bie, "EnumMap/EntrySet", 1352); + bcb(1353, 1, aie, fqb); + _.Nb = function gqb(a) { + Rrb(this, a); + }; + _.Pb = function iqb() { + return this.b = Fqb(this.a), new kqb(this.c, this.b); + }; + _.Ob = function hqb() { + return Eqb(this.a); + }; + _.Qb = function jqb() { + yCb(!!this.b); + Ppb(this.c, this.b); + this.b = null; + }; + mdb(bie, "EnumMap/EntrySetIterator", 1353); + bcb(1354, 1984, _je, kqb); + _.cd = function lqb() { + return this.a; + }; + _.dd = function mqb() { + return this.b.b[this.a.g]; + }; + _.ed = function nqb(a) { + return Qpb(this.b, this.a.g, a); + }; + mdb(bie, "EnumMap/MapEntry", 1354); + bcb(174, eie, { 20: 1, 28: 1, 14: 1, 174: 1, 21: 1 }); + var hK = mdb(bie, "EnumSet", 174); + bcb(156, 174, { 20: 1, 28: 1, 14: 1, 174: 1, 156: 1, 21: 1 }, xqb); + _.Fc = function yqb(a) { + return rqb(this, BD(a, 22)); + }; + _.Hc = function zqb(a) { + return tqb(this, a); + }; + _.Kc = function Aqb() { + return new Gqb(this); + }; + _.Mc = function Bqb(a) { + return vqb(this, a); + }; + _.gc = function Cqb() { + return this.c; + }; + _.c = 0; + mdb(bie, "EnumSet/EnumSetImpl", 156); + bcb(343, 1, aie, Gqb); + _.Nb = function Hqb(a) { + Rrb(this, a); + }; + _.Pb = function Jqb() { + return Fqb(this); + }; + _.Ob = function Iqb() { + return Eqb(this); + }; + _.Qb = function Kqb() { + yCb(this.b != -1); + NC(this.c.b, this.b, null); + --this.c.c; + this.b = -1; + }; + _.a = -1; + _.b = -1; + mdb(bie, "EnumSet/EnumSetImpl/IteratorImpl", 343); + bcb(43, 488, fke, Lqb, Mqb, Nqb); + _.re = function Oqb(a, b) { + return PD(a) === PD(b) || a != null && pb(a, b); + }; + _.se = function Pqb(a) { + var b; + b = tb(a); + return b | 0; + }; + mdb(bie, "HashMap", 43); + bcb(53, eie, gke, Tqb, Uqb, Vqb); + _.Fc = function Xqb(a) { + return Qqb(this, a); + }; + _.$b = function Yqb() { + this.a.$b(); + }; + _.Hc = function Zqb(a) { + return Rqb(this, a); + }; + _.dc = function $qb() { + return this.a.gc() == 0; + }; + _.Kc = function _qb() { + return this.a.ec().Kc(); + }; + _.Mc = function arb(a) { + return Sqb(this, a); + }; + _.gc = function brb() { + return this.a.gc(); + }; + var jK = mdb(bie, "HashSet", 53); + bcb(1781, 1, sie, drb); + _.ud = function erb(a) { + crb(this, a); + }; + _.Ib = function frb() { + return "IntSummaryStatistics[count = " + Ubb(this.a) + ", avg = " + (Dbb(this.a, 0) ? Sbb(this.d) / Sbb(this.a) : 0) + ", min = " + this.c + ", max = " + this.b + ", sum = " + Ubb(this.d) + "]"; + }; + _.a = 0; + _.b = Rie; + _.c = Ohe; + _.d = 0; + mdb(bie, "IntSummaryStatistics", 1781); + bcb(1049, 1, vie, lrb); + _.Jc = function mrb(a) { + reb(this, a); + }; + _.Kc = function nrb() { + return new orb(this); + }; + _.c = 0; + mdb(bie, "InternalHashCodeMap", 1049); + bcb(711, 1, aie, orb); + _.Nb = function prb(a) { + Rrb(this, a); + }; + _.Pb = function rrb() { + return this.d = this.a[this.c++], this.d; + }; + _.Ob = function qrb() { + var a; + if (this.c < this.a.length) { + return true; + } + a = this.b.next(); + if (!a.done) { + this.a = a.value[1]; + this.c = 0; + return true; + } + return false; + }; + _.Qb = function srb() { + krb(this.e, this.d.cd()); + this.c != 0 && --this.c; + }; + _.c = 0; + _.d = null; + mdb(bie, "InternalHashCodeMap/1", 711); + var vrb; + bcb(1047, 1, vie, Frb); + _.Jc = function Grb(a) { + reb(this, a); + }; + _.Kc = function Hrb() { + return new Irb(this); + }; + _.c = 0; + _.d = 0; + mdb(bie, "InternalStringMap", 1047); + bcb(710, 1, aie, Irb); + _.Nb = function Jrb(a) { + Rrb(this, a); + }; + _.Pb = function Lrb() { + return this.c = this.a, this.a = this.b.next(), new Nrb(this.d, this.c, this.d.d); + }; + _.Ob = function Krb() { + return !this.a.done; + }; + _.Qb = function Mrb() { + Erb(this.d, this.c.value[0]); + }; + mdb(bie, "InternalStringMap/1", 710); + bcb(1048, 1984, _je, Nrb); + _.cd = function Orb() { + return this.b.value[0]; + }; + _.dd = function Prb() { + if (this.a.d != this.c) { + return Crb(this.a, this.b.value[0]); + } + return this.b.value[1]; + }; + _.ed = function Qrb(a) { + return Drb(this.a, this.b.value[0], a); + }; + _.c = 0; + mdb(bie, "InternalStringMap/2", 1048); + bcb(228, 43, fke, $rb, _rb); + _.$b = function asb() { + Urb(this); + }; + _._b = function bsb(a) { + return Vrb(this, a); + }; + _.uc = function csb(a) { + var b; + b = this.d.a; + while (b != this.d) { + if (wtb(b.e, a)) { + return true; + } + b = b.a; + } + return false; + }; + _.vc = function dsb() { + return new nsb(this); + }; + _.xc = function esb(a) { + return Wrb(this, a); + }; + _.zc = function fsb(a, b) { + return Xrb(this, a, b); + }; + _.Bc = function gsb(a) { + return Zrb(this, a); + }; + _.gc = function hsb() { + return Vhb(this.e); + }; + _.c = false; + mdb(bie, "LinkedHashMap", 228); + bcb(387, 383, { 484: 1, 383: 1, 387: 1, 42: 1 }, ksb, lsb); + mdb(bie, "LinkedHashMap/ChainEntry", 387); + bcb(701, eie, fie, nsb); + _.$b = function osb() { + Urb(this.a); + }; + _.Hc = function psb(a) { + return msb(this, a); + }; + _.Kc = function qsb() { + return new usb(this); + }; + _.Mc = function rsb(a) { + var b; + if (msb(this, a)) { + b = BD(a, 42).cd(); + Zrb(this.a, b); + return true; + } + return false; + }; + _.gc = function ssb() { + return Vhb(this.a.e); + }; + mdb(bie, "LinkedHashMap/EntrySet", 701); + bcb(702, 1, aie, usb); + _.Nb = function vsb(a) { + Rrb(this, a); + }; + _.Pb = function xsb() { + return tsb(this); + }; + _.Ob = function wsb() { + return this.b != this.c.a.d; + }; + _.Qb = function ysb() { + yCb(!!this.a); + xpb(this.c.a.e, this); + jsb(this.a); + Thb(this.c.a.e, this.a.d); + ypb(this.c.a.e, this); + this.a = null; + }; + mdb(bie, "LinkedHashMap/EntrySet/EntryIterator", 702); + bcb(178, 53, gke, zsb, Asb, Bsb); + var uK = mdb(bie, "LinkedHashSet", 178); + bcb(68, 1964, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 68: 1, 15: 1 }, Psb, Qsb); + _.Fc = function Rsb(a) { + return Dsb(this, a); + }; + _.$b = function Ssb() { + Osb(this); + }; + _.Zc = function Tsb(a) { + return Jsb(this, a); + }; + _.gc = function Usb() { + return this.b; + }; + _.b = 0; + var xK = mdb(bie, "LinkedList", 68); + bcb(970, 1, jie, $sb); + _.Nb = function atb(a) { + Rrb(this, a); + }; + _.Rb = function _sb(a) { + Vsb(this, a); + }; + _.Ob = function btb() { + return Wsb(this); + }; + _.Sb = function ctb() { + return this.b.b != this.d.a; + }; + _.Pb = function dtb() { + return Xsb(this); + }; + _.Tb = function etb() { + return this.a; + }; + _.Ub = function ftb() { + return Ysb(this); + }; + _.Vb = function gtb() { + return this.a - 1; + }; + _.Qb = function htb() { + Zsb(this); + }; + _.Wb = function itb(a) { + yCb(!!this.c); + this.c.c = a; + }; + _.a = 0; + _.c = null; + mdb(bie, "LinkedList/ListIteratorImpl", 970); + bcb(608, 1, {}, jtb); + mdb(bie, "LinkedList/Node", 608); + bcb(1959, 1, {}); + var ltb, mtb; + mdb(bie, "Locale", 1959); + bcb(861, 1959, {}, otb); + _.Ib = function ptb() { + return ""; + }; + mdb(bie, "Locale/1", 861); + bcb(862, 1959, {}, qtb); + _.Ib = function rtb() { + return "unknown"; + }; + mdb(bie, "Locale/4", 862); + bcb(109, 60, { 3: 1, 102: 1, 60: 1, 78: 1, 109: 1 }, utb, vtb); + mdb(bie, "NoSuchElementException", 109); + bcb(404, 1, { 404: 1 }, Ftb); + _.Fb = function Gtb(a) { + var b; + if (a === this) { + return true; + } + if (!JD(a, 404)) { + return false; + } + b = BD(a, 404); + return wtb(this.a, b.a); + }; + _.Hb = function Htb() { + return xtb(this.a); + }; + _.Ib = function Jtb() { + return this.a != null ? Whe + xfb(this.a) + ")" : "Optional.empty()"; + }; + var ztb; + mdb(bie, "Optional", 404); + bcb(463, 1, { 463: 1 }, Otb, Ptb); + _.Fb = function Qtb(a) { + var b; + if (a === this) { + return true; + } + if (!JD(a, 463)) { + return false; + } + b = BD(a, 463); + return this.a == b.a && Kdb(this.b, b.b) == 0; + }; + _.Hb = function Rtb() { + return this.a ? QD(this.b) : 0; + }; + _.Ib = function Stb() { + return this.a ? "OptionalDouble.of(" + ("" + this.b) + ")" : "OptionalDouble.empty()"; + }; + _.a = false; + _.b = 0; + var Ktb; + mdb(bie, "OptionalDouble", 463); + bcb(517, 1, { 517: 1 }, Wtb, Xtb); + _.Fb = function Ytb(a) { + var b; + if (a === this) { + return true; + } + if (!JD(a, 517)) { + return false; + } + b = BD(a, 517); + return this.a == b.a && beb(this.b, b.b) == 0; + }; + _.Hb = function Ztb() { + return this.a ? this.b : 0; + }; + _.Ib = function $tb() { + return this.a ? "OptionalInt.of(" + ("" + this.b) + ")" : "OptionalInt.empty()"; + }; + _.a = false; + _.b = 0; + var Ttb; + mdb(bie, "OptionalInt", 517); + bcb(503, 2004, die, gub); + _.Gc = function hub(a) { + return _tb(this, a); + }; + _.$b = function iub() { + this.b.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _.Hc = function jub(a) { + return (a == null ? -1 : Jkb(this.b, a, 0)) != -1; + }; + _.Kc = function kub() { + return new qub(this); + }; + _.Mc = function lub(a) { + return eub(this, a); + }; + _.gc = function mub() { + return this.b.c.length; + }; + _.Nc = function nub() { + return new Kub(this, 256); + }; + _.Pc = function oub() { + return Pkb(this.b); + }; + _.Qc = function pub(a) { + return Qkb(this.b, a); + }; + mdb(bie, "PriorityQueue", 503); + bcb(1277, 1, aie, qub); + _.Nb = function rub(a) { + Rrb(this, a); + }; + _.Ob = function tub() { + return this.a < this.c.b.c.length; + }; + _.Pb = function uub() { + sCb(this.a < this.c.b.c.length); + this.b = this.a++; + return Ikb(this.c.b, this.b); + }; + _.Qb = function vub() { + yCb(this.b != -1); + fub(this.c, this.a = this.b); + this.b = -1; + }; + _.a = 0; + _.b = -1; + mdb(bie, "PriorityQueue/1", 1277); + bcb(230, 1, { 230: 1 }, Gub, Hub); + _.a = 0; + _.b = 0; + var wub, xub, yub = 0; + mdb(bie, "Random", 230); + bcb(27, 1, pie, Kub, Lub, Mub); + _.qd = function Nub() { + return this.a; + }; + _.rd = function Oub() { + Iub(this); + return this.c; + }; + _.Nb = function Pub(a) { + Iub(this); + this.d.Nb(a); + }; + _.sd = function Qub(a) { + return Jub(this, a); + }; + _.a = 0; + _.c = 0; + mdb(bie, "Spliterators/IteratorSpliterator", 27); + bcb(485, 27, pie, Rub); + mdb(bie, "SortedSet/1", 485); + bcb(602, 1, eke, Tub); + _.we = function Uub(a) { + this.a.td(a); + }; + mdb(bie, "Spliterator/OfDouble/0methodref$accept$Type", 602); + bcb(603, 1, eke, Vub); + _.we = function Wub(a) { + this.a.td(a); + }; + mdb(bie, "Spliterator/OfDouble/1methodref$accept$Type", 603); + bcb(604, 1, sie, Xub); + _.ud = function Yub(a) { + this.a.td(meb(a)); + }; + mdb(bie, "Spliterator/OfInt/2methodref$accept$Type", 604); + bcb(605, 1, sie, Zub); + _.ud = function $ub(a) { + this.a.td(meb(a)); + }; + mdb(bie, "Spliterator/OfInt/3methodref$accept$Type", 605); + bcb(617, 1, pie); + _.Nb = function evb(a) { + Sub(this, a); + }; + _.qd = function cvb() { + return this.d; + }; + _.rd = function dvb() { + return this.e; + }; + _.d = 0; + _.e = 0; + mdb(bie, "Spliterators/BaseSpliterator", 617); + bcb(721, 617, pie); + _.xe = function gvb(a) { + _ub(this, a); + }; + _.Nb = function hvb(a) { + JD(a, 182) ? _ub(this, BD(a, 182)) : _ub(this, new Vub(a)); + }; + _.sd = function ivb(a) { + return JD(a, 182) ? this.ye(BD(a, 182)) : this.ye(new Tub(a)); + }; + mdb(bie, "Spliterators/AbstractDoubleSpliterator", 721); + bcb(720, 617, pie); + _.xe = function kvb(a) { + _ub(this, a); + }; + _.Nb = function lvb(a) { + JD(a, 196) ? _ub(this, BD(a, 196)) : _ub(this, new Zub(a)); + }; + _.sd = function mvb(a) { + return JD(a, 196) ? this.ye(BD(a, 196)) : this.ye(new Xub(a)); + }; + mdb(bie, "Spliterators/AbstractIntSpliterator", 720); + bcb(540, 617, pie); + mdb(bie, "Spliterators/AbstractSpliterator", 540); + bcb(692, 1, pie); + _.Nb = function tvb(a) { + Sub(this, a); + }; + _.qd = function rvb() { + return this.b; + }; + _.rd = function svb() { + return this.d - this.c; + }; + _.b = 0; + _.c = 0; + _.d = 0; + mdb(bie, "Spliterators/BaseArraySpliterator", 692); + bcb(947, 692, pie, vvb); + _.ze = function wvb(a, b) { + uvb(this, BD(a, 38), b); + }; + _.Nb = function xvb(a) { + ovb(this, a); + }; + _.sd = function yvb(a) { + return pvb(this, a); + }; + mdb(bie, "Spliterators/ArraySpliterator", 947); + bcb(693, 692, pie, Avb); + _.ze = function Cvb(a, b) { + zvb(this, BD(a, 182), b); + }; + _.xe = function Dvb(a) { + ovb(this, a); + }; + _.Nb = function Evb(a) { + JD(a, 182) ? ovb(this, BD(a, 182)) : ovb(this, new Vub(a)); + }; + _.ye = function Fvb(a) { + return pvb(this, a); + }; + _.sd = function Gvb(a) { + return JD(a, 182) ? pvb(this, BD(a, 182)) : pvb(this, new Tub(a)); + }; + mdb(bie, "Spliterators/DoubleArraySpliterator", 693); + bcb(1968, 1, pie); + _.Nb = function Lvb(a) { + Sub(this, a); + }; + _.qd = function Jvb() { + return 16448; + }; + _.rd = function Kvb() { + return 0; + }; + var Hvb; + mdb(bie, "Spliterators/EmptySpliterator", 1968); + bcb(946, 1968, pie, Ovb); + _.xe = function Pvb(a) { + Mvb(a); + }; + _.Nb = function Qvb(a) { + JD(a, 196) ? Mvb(BD(a, 196)) : Mvb(new Zub(a)); + }; + _.ye = function Rvb(a) { + return Nvb(a); + }; + _.sd = function Svb(a) { + return JD(a, 196) ? Nvb(BD(a, 196)) : Nvb(new Xub(a)); + }; + mdb(bie, "Spliterators/EmptySpliterator/OfInt", 946); + bcb(580, 52, pke, Wvb); + _.Vc = function Xvb(a, b) { + _vb(a, this.a.c.length + 1); + Dkb(this.a, a, b); + }; + _.Fc = function Yvb(a) { + return Ekb(this.a, a); + }; + _.Wc = function Zvb(a, b) { + _vb(a, this.a.c.length + 1); + return Fkb(this.a, a, b); + }; + _.Gc = function $vb(a) { + return Gkb(this.a, a); + }; + _.$b = function awb() { + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _.Hc = function bwb(a) { + return Jkb(this.a, a, 0) != -1; + }; + _.Ic = function cwb(a) { + return Be(this.a, a); + }; + _.Jc = function dwb(a) { + Hkb(this.a, a); + }; + _.Xb = function ewb(a) { + return _vb(a, this.a.c.length), Ikb(this.a, a); + }; + _.Xc = function fwb(a) { + return Jkb(this.a, a, 0); + }; + _.dc = function gwb() { + return this.a.c.length == 0; + }; + _.Kc = function hwb() { + return new olb(this.a); + }; + _.$c = function iwb(a) { + return _vb(a, this.a.c.length), Kkb(this.a, a); + }; + _.Ud = function jwb(a, b) { + Mkb(this.a, a, b); + }; + _._c = function kwb(a, b) { + return _vb(a, this.a.c.length), Nkb(this.a, a, b); + }; + _.gc = function lwb() { + return this.a.c.length; + }; + _.ad = function mwb(a) { + Okb(this.a, a); + }; + _.bd = function nwb(a, b) { + return new Jib(this.a, a, b); + }; + _.Pc = function owb() { + return Pkb(this.a); + }; + _.Qc = function pwb(a) { + return Qkb(this.a, a); + }; + _.Ib = function qwb() { + return Fe(this.a); + }; + mdb(bie, "Vector", 580); + bcb(809, 580, pke, twb); + mdb(bie, "Stack", 809); + bcb(206, 1, { 206: 1 }, xwb); + _.Ib = function ywb() { + return wwb(this); + }; + mdb(bie, "StringJoiner", 206); + bcb(544, 1992, { 3: 1, 83: 1, 171: 1, 161: 1 }, Pwb, Qwb); + _.$b = function Rwb() { + zwb(this); + }; + _.vc = function Swb() { + return new cxb(this); + }; + _.zc = function Twb(a, b) { + return Iwb(this, a, b); + }; + _.Bc = function Uwb(a) { + return Jwb(this, a); + }; + _.gc = function Vwb() { + return this.c; + }; + _.c = 0; + mdb(bie, "TreeMap", 544); + bcb(390, 1, aie, Ywb); + _.Nb = function $wb(a) { + Rrb(this, a); + }; + _.Pb = function axb() { + return Wwb(this); + }; + _.Ob = function _wb() { + return sib(this.a); + }; + _.Qb = function bxb() { + Xwb(this); + }; + mdb(bie, "TreeMap/EntryIterator", 390); + bcb(435, 739, fie, cxb); + _.$b = function dxb() { + zwb(this.a); + }; + mdb(bie, "TreeMap/EntrySet", 435); + bcb(436, 383, { 484: 1, 383: 1, 42: 1, 436: 1 }, exb); + _.b = false; + var dL = mdb(bie, "TreeMap/Node", 436); + bcb(621, 1, {}, fxb); + _.Ib = function gxb() { + return "State: mv=" + this.c + " value=" + this.d + " done=" + this.a + " found=" + this.b; + }; + _.a = false; + _.b = false; + _.c = false; + mdb(bie, "TreeMap/State", 621); + bcb(297, 22, qke, mxb); + _.Ae = function nxb() { + return false; + }; + _.Be = function oxb() { + return false; + }; + var hxb, ixb, jxb, kxb; + var iL = ndb(bie, "TreeMap/SubMapType", 297, CI, qxb, pxb); + bcb(1112, 297, qke, rxb); + _.Be = function sxb() { + return true; + }; + ndb(bie, "TreeMap/SubMapType/1", 1112, iL, null, null); + bcb(1113, 297, qke, txb); + _.Ae = function uxb() { + return true; + }; + _.Be = function vxb() { + return true; + }; + ndb(bie, "TreeMap/SubMapType/2", 1113, iL, null, null); + bcb(1114, 297, qke, wxb); + _.Ae = function xxb() { + return true; + }; + ndb(bie, "TreeMap/SubMapType/3", 1114, iL, null, null); + var yxb; + bcb(208, eie, { 3: 1, 20: 1, 28: 1, 14: 1, 271: 1, 21: 1, 84: 1, 208: 1 }, Gxb, Hxb); + _.Nc = function Oxb() { + return new Rub(this); + }; + _.Fc = function Ixb(a) { + return Axb(this, a); + }; + _.$b = function Jxb() { + zwb(this.a); + }; + _.Hc = function Kxb(a) { + return ujb(this.a, a); + }; + _.Kc = function Lxb() { + var a; + return a = new Ywb(new cxb(new Gjb(this.a).a).b), new Njb(a); + }; + _.Mc = function Mxb(a) { + return Fxb(this, a); + }; + _.gc = function Nxb() { + return this.a.c; + }; + var kL = mdb(bie, "TreeSet", 208); + bcb(966, 1, {}, Rxb); + _.Ce = function Sxb(a, b) { + return Pxb(this.a, a, b); + }; + mdb(rke, "BinaryOperator/lambda$0$Type", 966); + bcb(967, 1, {}, Txb); + _.Ce = function Uxb(a, b) { + return Qxb(this.a, a, b); + }; + mdb(rke, "BinaryOperator/lambda$1$Type", 967); + bcb(846, 1, {}, Vxb); + _.Kb = function Wxb(a) { + return a; + }; + mdb(rke, "Function/lambda$0$Type", 846); + bcb(431, 1, Oie, Xxb); + _.Mb = function Yxb(a) { + return !this.a.Mb(a); + }; + mdb(rke, "Predicate/lambda$2$Type", 431); + bcb(572, 1, { 572: 1 }); + var qL = mdb(ske, "Handler", 572); + bcb(2007, 1, Qhe); + _.ne = function _xb() { + return "DUMMY"; + }; + _.Ib = function ayb() { + return this.ne(); + }; + var Zxb; + mdb(ske, "Level", 2007); + bcb(1621, 2007, Qhe, byb); + _.ne = function cyb() { + return "INFO"; + }; + mdb(ske, "Level/LevelInfo", 1621); + bcb(1640, 1, {}, gyb); + var dyb; + mdb(ske, "LogManager", 1640); + bcb(1780, 1, Qhe, iyb); + _.b = null; + mdb(ske, "LogRecord", 1780); + bcb(512, 1, { 512: 1 }, wyb); + _.e = false; + var jyb = false, kyb = false, lyb = false, myb = false, nyb = false; + mdb(ske, "Logger", 512); + bcb(819, 572, { 572: 1 }, zyb); + mdb(ske, "SimpleConsoleLogHandler", 819); + bcb(132, 22, { 3: 1, 35: 1, 22: 1, 132: 1 }, Gyb); + var Cyb, Dyb, Eyb; + var xL = ndb(vke, "Collector/Characteristics", 132, CI, Iyb, Hyb); + var Jyb; + bcb(744, 1, {}, Lyb); + mdb(vke, "CollectorImpl", 744); + bcb(1060, 1, {}, Zyb); + _.Ce = function $yb(a, b) { + return vwb(BD(a, 206), BD(b, 206)); + }; + mdb(vke, "Collectors/10methodref$merge$Type", 1060); + bcb(1061, 1, {}, _yb); + _.Kb = function azb(a) { + return wwb(BD(a, 206)); + }; + mdb(vke, "Collectors/11methodref$toString$Type", 1061); + bcb(1062, 1, {}, bzb); + _.Kb = function czb(a) { + return Bcb(), _Pb(a) ? true : false; + }; + mdb(vke, "Collectors/12methodref$test$Type", 1062); + bcb(251, 1, {}, dzb); + _.Od = function ezb(a, b) { + BD(a, 14).Fc(b); + }; + mdb(vke, "Collectors/20methodref$add$Type", 251); + bcb(253, 1, {}, fzb); + _.Ee = function gzb() { + return new Rkb(); + }; + mdb(vke, "Collectors/21methodref$ctor$Type", 253); + bcb(346, 1, {}, hzb); + _.Ee = function izb() { + return new Tqb(); + }; + mdb(vke, "Collectors/23methodref$ctor$Type", 346); + bcb(347, 1, {}, jzb); + _.Od = function kzb(a, b) { + Qqb(BD(a, 53), b); + }; + mdb(vke, "Collectors/24methodref$add$Type", 347); + bcb(1055, 1, {}, lzb); + _.Ce = function mzb(a, b) { + return Myb(BD(a, 15), BD(b, 14)); + }; + mdb(vke, "Collectors/4methodref$addAll$Type", 1055); + bcb(1059, 1, {}, nzb); + _.Od = function ozb(a, b) { + uwb(BD(a, 206), BD(b, 475)); + }; + mdb(vke, "Collectors/9methodref$add$Type", 1059); + bcb(1058, 1, {}, pzb); + _.Ee = function qzb() { + return new xwb(this.a, this.b, this.c); + }; + mdb(vke, "Collectors/lambda$15$Type", 1058); + bcb(1063, 1, {}, rzb); + _.Ee = function szb() { + var a; + return a = new $rb(), Xrb(a, (Bcb(), false), new Rkb()), Xrb(a, true, new Rkb()), a; + }; + mdb(vke, "Collectors/lambda$22$Type", 1063); + bcb(1064, 1, {}, tzb); + _.Ee = function uzb() { + return OC(GC(SI, 1), Uhe, 1, 5, [this.a]); + }; + mdb(vke, "Collectors/lambda$25$Type", 1064); + bcb(1065, 1, {}, vzb); + _.Od = function wzb(a, b) { + Oyb(this.a, CD(a)); + }; + mdb(vke, "Collectors/lambda$26$Type", 1065); + bcb(1066, 1, {}, xzb); + _.Ce = function yzb(a, b) { + return Pyb(this.a, CD(a), CD(b)); + }; + mdb(vke, "Collectors/lambda$27$Type", 1066); + bcb(1067, 1, {}, zzb); + _.Kb = function Azb(a) { + return CD(a)[0]; + }; + mdb(vke, "Collectors/lambda$28$Type", 1067); + bcb(713, 1, {}, Czb); + _.Ce = function Dzb(a, b) { + return Bzb(a, b); + }; + mdb(vke, "Collectors/lambda$4$Type", 713); + bcb(252, 1, {}, Ezb); + _.Ce = function Fzb(a, b) { + return Ryb(BD(a, 14), BD(b, 14)); + }; + mdb(vke, "Collectors/lambda$42$Type", 252); + bcb(348, 1, {}, Gzb); + _.Ce = function Hzb(a, b) { + return Syb(BD(a, 53), BD(b, 53)); + }; + mdb(vke, "Collectors/lambda$50$Type", 348); + bcb(349, 1, {}, Izb); + _.Kb = function Jzb(a) { + return BD(a, 53); + }; + mdb(vke, "Collectors/lambda$51$Type", 349); + bcb(1054, 1, {}, Kzb); + _.Od = function Lzb(a, b) { + Tyb(this.a, BD(a, 83), b); + }; + mdb(vke, "Collectors/lambda$7$Type", 1054); + bcb(1056, 1, {}, Mzb); + _.Ce = function Nzb(a, b) { + return Vyb(BD(a, 83), BD(b, 83), new lzb()); + }; + mdb(vke, "Collectors/lambda$8$Type", 1056); + bcb(1057, 1, {}, Ozb); + _.Kb = function Pzb(a) { + return Uyb(this.a, BD(a, 83)); + }; + mdb(vke, "Collectors/lambda$9$Type", 1057); + bcb(539, 1, {}); + _.He = function Wzb() { + Qzb(this); + }; + _.d = false; + mdb(vke, "TerminatableStream", 539); + bcb(812, 539, wke, bAb); + _.He = function cAb() { + Qzb(this); + }; + mdb(vke, "DoubleStreamImpl", 812); + bcb(1784, 721, pie, fAb); + _.ye = function hAb(a) { + return eAb(this, BD(a, 182)); + }; + _.a = null; + mdb(vke, "DoubleStreamImpl/2", 1784); + bcb(1785, 1, eke, iAb); + _.we = function jAb(a) { + gAb(this.a, a); + }; + mdb(vke, "DoubleStreamImpl/2/lambda$0$Type", 1785); + bcb(1782, 1, eke, kAb); + _.we = function lAb(a) { + dAb(this.a, a); + }; + mdb(vke, "DoubleStreamImpl/lambda$0$Type", 1782); + bcb(1783, 1, eke, mAb); + _.we = function nAb(a) { + Epb(this.a, a); + }; + mdb(vke, "DoubleStreamImpl/lambda$2$Type", 1783); + bcb(1358, 720, pie, rAb); + _.ye = function sAb(a) { + return qAb(this, BD(a, 196)); + }; + _.a = 0; + _.b = 0; + _.c = 0; + mdb(vke, "IntStream/5", 1358); + bcb(787, 539, wke, vAb); + _.He = function wAb() { + Qzb(this); + }; + _.Ie = function xAb() { + return Tzb(this), this.a; + }; + mdb(vke, "IntStreamImpl", 787); + bcb(788, 539, wke, yAb); + _.He = function zAb() { + Qzb(this); + }; + _.Ie = function AAb() { + return Tzb(this), Ivb(), Hvb; + }; + mdb(vke, "IntStreamImpl/Empty", 788); + bcb(1463, 1, sie, BAb); + _.ud = function CAb(a) { + crb(this.a, a); + }; + mdb(vke, "IntStreamImpl/lambda$4$Type", 1463); + var xM = odb(vke, "Stream"); + bcb(30, 539, { 525: 1, 670: 1, 833: 1 }, YAb); + _.He = function ZAb() { + Qzb(this); + }; + var DAb; + mdb(vke, "StreamImpl", 30); + bcb(845, 1, {}, bBb); + _.ld = function cBb(a) { + return aBb(a); + }; + mdb(vke, "StreamImpl/0methodref$lambda$2$Type", 845); + bcb(1084, 540, pie, fBb); + _.sd = function gBb(a) { + while (dBb(this)) { + if (this.a.sd(a)) { + return true; + } else { + Qzb(this.b); + this.b = null; + this.a = null; + } + } + return false; + }; + mdb(vke, "StreamImpl/1", 1084); + bcb(1085, 1, qie, hBb); + _.td = function iBb(a) { + eBb(this.a, BD(a, 833)); + }; + mdb(vke, "StreamImpl/1/lambda$0$Type", 1085); + bcb(1086, 1, Oie, jBb); + _.Mb = function kBb(a) { + return Qqb(this.a, a); + }; + mdb(vke, "StreamImpl/1methodref$add$Type", 1086); + bcb(1087, 540, pie, lBb); + _.sd = function mBb(a) { + var b; + if (!this.a) { + b = new Rkb(); + this.b.a.Nb(new nBb(b)); + mmb(); + Okb(b, this.c); + this.a = new Kub(b, 16); + } + return Jub(this.a, a); + }; + _.a = null; + mdb(vke, "StreamImpl/5", 1087); + bcb(1088, 1, qie, nBb); + _.td = function oBb(a) { + Ekb(this.a, a); + }; + mdb(vke, "StreamImpl/5/2methodref$add$Type", 1088); + bcb(722, 540, pie, qBb); + _.sd = function rBb(a) { + this.b = false; + while (!this.b && this.c.sd(new sBb(this, a))) + ; + return this.b; + }; + _.b = false; + mdb(vke, "StreamImpl/FilterSpliterator", 722); + bcb(1079, 1, qie, sBb); + _.td = function tBb(a) { + pBb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/FilterSpliterator/lambda$0$Type", 1079); + bcb(1075, 721, pie, wBb); + _.ye = function xBb(a) { + return vBb(this, BD(a, 182)); + }; + mdb(vke, "StreamImpl/MapToDoubleSpliterator", 1075); + bcb(1078, 1, qie, yBb); + _.td = function zBb(a) { + uBb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/MapToDoubleSpliterator/lambda$0$Type", 1078); + bcb(1074, 720, pie, CBb); + _.ye = function DBb(a) { + return BBb(this, BD(a, 196)); + }; + mdb(vke, "StreamImpl/MapToIntSpliterator", 1074); + bcb(1077, 1, qie, EBb); + _.td = function FBb(a) { + ABb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/MapToIntSpliterator/lambda$0$Type", 1077); + bcb(719, 540, pie, IBb); + _.sd = function JBb(a) { + return HBb(this, a); + }; + mdb(vke, "StreamImpl/MapToObjSpliterator", 719); + bcb(1076, 1, qie, KBb); + _.td = function LBb(a) { + GBb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/MapToObjSpliterator/lambda$0$Type", 1076); + bcb(618, 1, qie, NBb); + _.td = function OBb(a) { + MBb(this, a); + }; + mdb(vke, "StreamImpl/ValueConsumer", 618); + bcb(1080, 1, qie, PBb); + _.td = function QBb(a) { + EAb(); + }; + mdb(vke, "StreamImpl/lambda$0$Type", 1080); + bcb(1081, 1, qie, RBb); + _.td = function SBb(a) { + EAb(); + }; + mdb(vke, "StreamImpl/lambda$1$Type", 1081); + bcb(1082, 1, {}, TBb); + _.Ce = function UBb(a, b) { + return $Ab(this.a, a, b); + }; + mdb(vke, "StreamImpl/lambda$4$Type", 1082); + bcb(1083, 1, qie, VBb); + _.td = function WBb(a) { + _Ab(this.b, this.a, a); + }; + mdb(vke, "StreamImpl/lambda$5$Type", 1083); + bcb(1089, 1, qie, XBb); + _.td = function YBb(a) { + Xzb(this.a, BD(a, 365)); + }; + mdb(vke, "TerminatableStream/lambda$0$Type", 1089); + bcb(2041, 1, {}); + bcb(1914, 1, {}, iCb); + mdb("javaemul.internal", "ConsoleLogger", 1914); + bcb(2038, 1, {}); + var ECb = 0; + var GCb, HCb = 0, ICb; + bcb(1768, 1, qie, OCb); + _.td = function PCb(a) { + BD(a, 308); + }; + mdb(Cke, "BowyerWatsonTriangulation/lambda$0$Type", 1768); + bcb(1769, 1, qie, QCb); + _.td = function RCb(a) { + ye(this.a, BD(a, 308).e); + }; + mdb(Cke, "BowyerWatsonTriangulation/lambda$1$Type", 1769); + bcb(1770, 1, qie, SCb); + _.td = function TCb(a) { + BD(a, 168); + }; + mdb(Cke, "BowyerWatsonTriangulation/lambda$2$Type", 1770); + bcb(1765, 1, Dke, WCb); + _.ue = function XCb(a, b) { + return VCb(this.a, BD(a, 168), BD(b, 168)); + }; + _.Fb = function YCb(a) { + return this === a; + }; + _.ve = function ZCb() { + return new tpb(this); + }; + mdb(Cke, "NaiveMinST/lambda$0$Type", 1765); + bcb(499, 1, {}, _Cb); + mdb(Cke, "NodeMicroLayout", 499); + bcb(168, 1, { 168: 1 }, aDb); + _.Fb = function bDb(a) { + var b; + if (JD(a, 168)) { + b = BD(a, 168); + return wtb(this.a, b.a) && wtb(this.b, b.b) || wtb(this.a, b.b) && wtb(this.b, b.a); + } else { + return false; + } + }; + _.Hb = function cDb() { + return xtb(this.a) + xtb(this.b); + }; + var GM = mdb(Cke, "TEdge", 168); + bcb(308, 1, { 308: 1 }, eDb); + _.Fb = function fDb(a) { + var b; + if (JD(a, 308)) { + b = BD(a, 308); + return dDb(this, b.a) && dDb(this, b.b) && dDb(this, b.c); + } else { + return false; + } + }; + _.Hb = function gDb() { + return xtb(this.a) + xtb(this.b) + xtb(this.c); + }; + mdb(Cke, "TTriangle", 308); + bcb(221, 1, { 221: 1 }, hDb); + mdb(Cke, "Tree", 221); + bcb(1254, 1, {}, jDb); + mdb(Eke, "Scanline", 1254); + var JM = odb(Eke, Fke); + bcb(1692, 1, {}, mDb); + mdb(Gke, "CGraph", 1692); + bcb(307, 1, { 307: 1 }, oDb); + _.b = 0; + _.c = 0; + _.d = 0; + _.g = 0; + _.i = 0; + _.k = Qje; + mdb(Gke, "CGroup", 307); + bcb(815, 1, {}, sDb); + mdb(Gke, "CGroup/CGroupBuilder", 815); + bcb(57, 1, { 57: 1 }, tDb); + _.Ib = function uDb() { + var a; + if (this.j) { + return GD(this.j.Kb(this)); + } + return fdb(PM), PM.o + "@" + (a = FCb(this) >>> 0, a.toString(16)); + }; + _.f = 0; + _.i = Qje; + var PM = mdb(Gke, "CNode", 57); + bcb(814, 1, {}, zDb); + mdb(Gke, "CNode/CNodeBuilder", 814); + var EDb; + bcb(1525, 1, {}, GDb); + _.Oe = function HDb(a, b) { + return 0; + }; + _.Pe = function IDb(a, b) { + return 0; + }; + mdb(Gke, Ike, 1525); + bcb(1790, 1, {}, JDb); + _.Le = function KDb(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p; + j = Pje; + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 57); + j = $wnd.Math.min(j, b.a.j.d.c + b.b.a); + } + n = new Psb(); + for (g = new olb(a.a.a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 307); + f.k = j; + f.g == 0 && (Gsb(n, f, n.c.b, n.c), true); + } + while (n.b != 0) { + f = BD(n.b == 0 ? null : (sCb(n.b != 0), Nsb(n, n.a.a)), 307); + e = f.j.d.c; + for (m = f.a.a.ec().Kc(); m.Ob(); ) { + k = BD(m.Pb(), 57); + p = f.k + k.b.a; + !UDb(a, f, a.d) || k.d.c < p ? k.i = p : k.i = k.d.c; + } + e -= f.j.i; + f.b += e; + a.d == (ead(), bad) || a.d == _9c ? f.c += e : f.c -= e; + for (l = f.a.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 57); + for (i = k.c.Kc(); i.Ob(); ) { + h = BD(i.Pb(), 57); + fad(a.d) ? o2 = a.g.Oe(k, h) : o2 = a.g.Pe(k, h); + h.a.k = $wnd.Math.max(h.a.k, k.i + k.d.b + o2 - h.b.a); + VDb(a, h, a.d) && (h.a.k = $wnd.Math.max(h.a.k, h.d.c - h.b.a)); + --h.a.g; + h.a.g == 0 && Dsb(n, h.a); + } + } + } + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + b.d.c = b.i; + } + }; + mdb(Gke, "LongestPathCompaction", 1790); + bcb(1690, 1, {}, cEb); + _.e = false; + var LDb, MDb, NDb; + var TM = mdb(Gke, Nke, 1690); + bcb(1691, 1, qie, dEb); + _.td = function eEb(a) { + WDb(this.a, BD(a, 46)); + }; + mdb(Gke, Oke, 1691); + bcb(1791, 1, {}, fEb); + _.Me = function gEb(a) { + var b, c, d, e, f, g, h; + for (c = new olb(a.a.b); c.a < c.c.c.length; ) { + b = BD(mlb(c), 57); + b.c.$b(); + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + for (g = new olb(a.a.b); g.a < g.c.c.length; ) { + f = BD(mlb(g), 57); + if (d == f) { + continue; + } + if (!!d.a && d.a == f.a) { + continue; + } + fad(a.d) ? h = a.g.Pe(d, f) : h = a.g.Oe(d, f); + (f.d.c > d.d.c || d.d.c == f.d.c && d.d.b < f.d.b) && BDb(f.d.d + f.d.a + h, d.d.d) && DDb(f.d.d, d.d.d + d.d.a + h) && d.c.Fc(f); + } + } + }; + mdb(Gke, "QuadraticConstraintCalculation", 1791); + bcb(522, 1, { 522: 1 }, lEb); + _.a = false; + _.b = false; + _.c = false; + _.d = false; + mdb(Gke, Pke, 522); + bcb(803, 1, {}, oEb); + _.Me = function pEb(a) { + this.c = a; + nEb(this, new GEb()); + }; + mdb(Gke, Qke, 803); + bcb(1718, 1, { 679: 1 }, uEb); + _.Ke = function vEb(a) { + rEb(this, BD(a, 464)); + }; + mdb(Gke, Rke, 1718); + bcb(1719, 1, Dke, xEb); + _.ue = function yEb(a, b) { + return wEb(BD(a, 57), BD(b, 57)); + }; + _.Fb = function zEb(a) { + return this === a; + }; + _.ve = function AEb() { + return new tpb(this); + }; + mdb(Gke, Ske, 1719); + bcb(464, 1, { 464: 1 }, BEb); + _.a = false; + mdb(Gke, Tke, 464); + bcb(1720, 1, Dke, CEb); + _.ue = function DEb(a, b) { + return qEb(BD(a, 464), BD(b, 464)); + }; + _.Fb = function EEb(a) { + return this === a; + }; + _.ve = function FEb() { + return new tpb(this); + }; + mdb(Gke, Uke, 1720); + bcb(1721, 1, Vke, GEb); + _.Lb = function HEb(a) { + return BD(a, 57), true; + }; + _.Fb = function IEb(a) { + return this === a; + }; + _.Mb = function JEb(a) { + return BD(a, 57), true; + }; + mdb(Gke, "ScanlineConstraintCalculator/lambda$1$Type", 1721); + bcb(428, 22, { 3: 1, 35: 1, 22: 1, 428: 1 }, NEb); + var KEb, LEb; + var aN = ndb(Wke, "HighLevelSortingCriterion", 428, CI, PEb, OEb); + var QEb; + bcb(427, 22, { 3: 1, 35: 1, 22: 1, 427: 1 }, VEb); + var SEb, TEb; + var bN = ndb(Wke, "LowLevelSortingCriterion", 427, CI, XEb, WEb); + var YEb; + var C0 = odb(Xke, "ILayoutMetaDataProvider"); + bcb(853, 1, ale, gFb); + _.Qe = function hFb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yke), ble), "Polyomino Traversal Strategy"), "Traversal strategy for trying different candidate positions for polyominoes."), eFb), (_5c(), V5c)), dN), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zke), ble), "Polyomino Secondary Sorting Criterion"), "Possible secondary sorting criteria for the processing order of polyominoes. They are used when polyominoes are equal according to the primary sorting criterion HighLevelSortingCriterion."), cFb), V5c), bN), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $ke), ble), "Polyomino Primary Sorting Criterion"), "Possible primary sorting criteria for the processing order of polyominoes."), aFb), V5c), aN), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _ke), ble), "Fill Polyominoes"), "Use the Profile Fill algorithm to fill polyominoes to prevent small polyominoes from being placed inside of big polyominoes with large holes. Might increase packing area."), (Bcb(), true)), T5c), wI), pqb(L5c)))); + }; + var $Eb, _Eb, aFb, bFb, cFb, dFb, eFb; + mdb(Wke, "PolyominoOptions", 853); + bcb(250, 22, { 3: 1, 35: 1, 22: 1, 250: 1 }, sFb); + var iFb, jFb, kFb, lFb, mFb, nFb, oFb, pFb, qFb; + var dN = ndb(Wke, "TraversalStrategy", 250, CI, uFb, tFb); + var vFb; + bcb(213, 1, { 213: 1 }, yFb); + _.Ib = function zFb() { + return "NEdge[id=" + this.b + " w=" + this.g + " d=" + this.a + "]"; + }; + _.a = 1; + _.b = 0; + _.c = 0; + _.f = false; + _.g = 0; + var fN = mdb(cle, "NEdge", 213); + bcb(176, 1, {}, FFb); + mdb(cle, "NEdge/NEdgeBuilder", 176); + bcb(653, 1, {}, KFb); + mdb(cle, "NGraph", 653); + bcb(121, 1, { 121: 1 }, MFb); + _.c = -1; + _.d = 0; + _.e = 0; + _.i = -1; + _.j = false; + var jN = mdb(cle, "NNode", 121); + bcb(795, 1, cke, PFb); + _.Jc = function XFb(a) { + reb(this, a); + }; + _.Lc = function cGb() { + return new YAb(null, new Kub(this, 16)); + }; + _.ad = function hGb(a) { + ktb(this, a); + }; + _.Nc = function iGb() { + return new Kub(this, 16); + }; + _.Oc = function jGb() { + return new YAb(null, new Kub(this, 16)); + }; + _.Vc = function QFb(a, b) { + ++this.b; + Dkb(this.a, a, b); + }; + _.Fc = function RFb(a) { + return NFb(this, a); + }; + _.Wc = function SFb(a, b) { + ++this.b; + return Fkb(this.a, a, b); + }; + _.Gc = function TFb(a) { + ++this.b; + return Gkb(this.a, a); + }; + _.$b = function UFb() { + ++this.b; + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _.Hc = function VFb(a) { + return Jkb(this.a, a, 0) != -1; + }; + _.Ic = function WFb(a) { + return Be(this.a, a); + }; + _.Xb = function YFb(a) { + return Ikb(this.a, a); + }; + _.Xc = function ZFb(a) { + return Jkb(this.a, a, 0); + }; + _.dc = function $Fb() { + return this.a.c.length == 0; + }; + _.Kc = function _Fb() { + return vr(new olb(this.a)); + }; + _.Yc = function aGb() { + throw vbb(new bgb()); + }; + _.Zc = function bGb(a) { + throw vbb(new bgb()); + }; + _.$c = function dGb(a) { + ++this.b; + return Kkb(this.a, a); + }; + _.Mc = function eGb(a) { + return OFb(this, a); + }; + _._c = function fGb(a, b) { + ++this.b; + return Nkb(this.a, a, b); + }; + _.gc = function gGb() { + return this.a.c.length; + }; + _.bd = function kGb(a, b) { + return new Jib(this.a, a, b); + }; + _.Pc = function lGb() { + return Pkb(this.a); + }; + _.Qc = function mGb(a) { + return Qkb(this.a, a); + }; + _.b = 0; + mdb(cle, "NNode/ChangeAwareArrayList", 795); + bcb(269, 1, {}, pGb); + mdb(cle, "NNode/NNodeBuilder", 269); + bcb(1630, 1, {}, KGb); + _.a = false; + _.f = Ohe; + _.j = 0; + mdb(cle, "NetworkSimplex", 1630); + bcb(1294, 1, qie, QGb); + _.td = function RGb(a) { + PGb(this.a, BD(a, 680), true, false); + }; + mdb(ele, "NodeLabelAndSizeCalculator/lambda$0$Type", 1294); + bcb(558, 1, {}, YGb); + _.b = true; + _.c = true; + _.d = true; + _.e = true; + mdb(ele, "NodeMarginCalculator", 558); + bcb(212, 1, { 212: 1 }); + _.j = false; + _.k = false; + var oN = mdb(fle, "Cell", 212); + bcb(124, 212, { 124: 1, 212: 1 }, aHb); + _.Re = function bHb() { + return _Gb(this); + }; + _.Se = function cHb() { + var a; + a = this.n; + return this.a.a + a.b + a.c; + }; + mdb(fle, "AtomicCell", 124); + bcb(232, 22, { 3: 1, 35: 1, 22: 1, 232: 1 }, hHb); + var dHb, eHb, fHb; + var pN = ndb(fle, "ContainerArea", 232, CI, jHb, iHb); + var kHb; + bcb(326, 212, hle); + mdb(fle, "ContainerCell", 326); + bcb(1473, 326, hle, FHb); + _.Re = function GHb() { + var a; + a = 0; + this.e ? this.b ? a = this.b.b : !!this.a[1][1] && (a = this.a[1][1].Re()) : a = EHb(this, AHb(this, true)); + return a > 0 ? a + this.n.d + this.n.a : 0; + }; + _.Se = function HHb() { + var a, b, c, d, e; + e = 0; + if (this.e) { + this.b ? e = this.b.a : !!this.a[1][1] && (e = this.a[1][1].Se()); + } else if (this.g) { + e = EHb(this, yHb(this, null, true)); + } else { + for (b = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), c = 0, d = b.length; c < d; ++c) { + a = b[c]; + e = $wnd.Math.max(e, EHb(this, yHb(this, a, true))); + } + } + return e > 0 ? e + this.n.b + this.n.c : 0; + }; + _.Te = function IHb() { + var a, b, c, d, e; + if (this.g) { + a = yHb(this, null, false); + for (c = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + wHb(this, b, a); + } + } else { + for (c = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), d = 0, e = c.length; d < e; ++d) { + b = c[d]; + a = yHb(this, b, false); + wHb(this, b, a); + } + } + }; + _.Ue = function JHb() { + var a, b, c, d; + b = this.i; + a = this.n; + d = AHb(this, false); + uHb(this, (gHb(), dHb), b.d + a.d, d); + uHb(this, fHb, b.d + b.a - a.a - d[2], d); + c = b.a - a.d - a.a; + if (d[0] > 0) { + d[0] += this.d; + c -= d[0]; + } + if (d[2] > 0) { + d[2] += this.d; + c -= d[2]; + } + this.c.a = $wnd.Math.max(0, c); + this.c.d = b.d + a.d + (this.c.a - c) / 2; + d[1] = $wnd.Math.max(d[1], c); + uHb(this, eHb, b.d + a.d + d[0] - (d[1] - c) / 2, d); + }; + _.b = null; + _.d = 0; + _.e = false; + _.f = false; + _.g = false; + var rHb = 0, sHb = 0; + mdb(fle, "GridContainerCell", 1473); + bcb(461, 22, { 3: 1, 35: 1, 22: 1, 461: 1 }, OHb); + var KHb, LHb, MHb; + var sN = ndb(fle, "HorizontalLabelAlignment", 461, CI, QHb, PHb); + var RHb; + bcb(306, 212, { 212: 1, 306: 1 }, aIb, bIb, cIb); + _.Re = function dIb() { + return YHb(this); + }; + _.Se = function eIb() { + return ZHb(this); + }; + _.a = 0; + _.c = false; + var tN = mdb(fle, "LabelCell", 306); + bcb(244, 326, { 212: 1, 326: 1, 244: 1 }, mIb); + _.Re = function nIb() { + return fIb(this); + }; + _.Se = function oIb() { + return gIb(this); + }; + _.Te = function rIb() { + hIb(this); + }; + _.Ue = function sIb() { + iIb(this); + }; + _.b = 0; + _.c = 0; + _.d = false; + mdb(fle, "StripContainerCell", 244); + bcb(1626, 1, Oie, tIb); + _.Mb = function uIb(a) { + return pIb(BD(a, 212)); + }; + mdb(fle, "StripContainerCell/lambda$0$Type", 1626); + bcb(1627, 1, {}, vIb); + _.Fe = function wIb(a) { + return BD(a, 212).Se(); + }; + mdb(fle, "StripContainerCell/lambda$1$Type", 1627); + bcb(1628, 1, Oie, xIb); + _.Mb = function yIb(a) { + return qIb(BD(a, 212)); + }; + mdb(fle, "StripContainerCell/lambda$2$Type", 1628); + bcb(1629, 1, {}, zIb); + _.Fe = function AIb(a) { + return BD(a, 212).Re(); + }; + mdb(fle, "StripContainerCell/lambda$3$Type", 1629); + bcb(462, 22, { 3: 1, 35: 1, 22: 1, 462: 1 }, FIb); + var BIb, CIb, DIb; + var zN = ndb(fle, "VerticalLabelAlignment", 462, CI, HIb, GIb); + var IIb; + bcb(789, 1, {}, LIb); + _.c = 0; + _.d = 0; + _.k = 0; + _.s = 0; + _.t = 0; + _.v = false; + _.w = 0; + _.D = false; + mdb(nle, "NodeContext", 789); + bcb(1471, 1, Dke, OIb); + _.ue = function PIb(a, b) { + return NIb(BD(a, 61), BD(b, 61)); + }; + _.Fb = function QIb(a) { + return this === a; + }; + _.ve = function RIb() { + return new tpb(this); + }; + mdb(nle, "NodeContext/0methodref$comparePortSides$Type", 1471); + bcb(1472, 1, Dke, SIb); + _.ue = function TIb(a, b) { + return MIb(BD(a, 111), BD(b, 111)); + }; + _.Fb = function UIb(a) { + return this === a; + }; + _.ve = function VIb() { + return new tpb(this); + }; + mdb(nle, "NodeContext/1methodref$comparePortContexts$Type", 1472); + bcb(159, 22, { 3: 1, 35: 1, 22: 1, 159: 1 }, tJb); + var WIb, XIb, YIb, ZIb, $Ib, _Ib, aJb, bJb, cJb, dJb, eJb, fJb, gJb, hJb, iJb, jJb, kJb, lJb, mJb, nJb, oJb, pJb; + var DN = ndb(nle, "NodeLabelLocation", 159, CI, wJb, vJb); + var xJb; + bcb(111, 1, { 111: 1 }, AJb); + _.a = false; + mdb(nle, "PortContext", 111); + bcb(1476, 1, qie, TJb); + _.td = function UJb(a) { + WHb(BD(a, 306)); + }; + mdb(qle, rle, 1476); + bcb(1477, 1, Oie, VJb); + _.Mb = function WJb(a) { + return !!BD(a, 111).c; + }; + mdb(qle, sle, 1477); + bcb(1478, 1, qie, XJb); + _.td = function YJb(a) { + WHb(BD(a, 111).c); + }; + mdb(qle, "LabelPlacer/lambda$2$Type", 1478); + var ZJb; + bcb(1475, 1, qie, fKb); + _.td = function gKb(a) { + $Jb(); + zJb(BD(a, 111)); + }; + mdb(qle, "NodeLabelAndSizeUtilities/lambda$0$Type", 1475); + bcb(790, 1, qie, mKb); + _.td = function nKb(a) { + kKb(this.b, this.c, this.a, BD(a, 181)); + }; + _.a = false; + _.c = false; + mdb(qle, "NodeLabelCellCreator/lambda$0$Type", 790); + bcb(1474, 1, qie, tKb); + _.td = function uKb(a) { + sKb(this.a, BD(a, 181)); + }; + mdb(qle, "PortContextCreator/lambda$0$Type", 1474); + var BKb; + bcb(1829, 1, {}, VKb); + mdb(ule, "GreedyRectangleStripOverlapRemover", 1829); + bcb(1830, 1, Dke, XKb); + _.ue = function YKb(a, b) { + return WKb(BD(a, 222), BD(b, 222)); + }; + _.Fb = function ZKb(a) { + return this === a; + }; + _.ve = function $Kb() { + return new tpb(this); + }; + mdb(ule, "GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type", 1830); + bcb(1786, 1, {}, fLb); + _.a = 5; + _.e = 0; + mdb(ule, "RectangleStripOverlapRemover", 1786); + bcb(1787, 1, Dke, jLb); + _.ue = function kLb(a, b) { + return gLb(BD(a, 222), BD(b, 222)); + }; + _.Fb = function lLb(a) { + return this === a; + }; + _.ve = function mLb() { + return new tpb(this); + }; + mdb(ule, "RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type", 1787); + bcb(1789, 1, Dke, nLb); + _.ue = function oLb(a, b) { + return hLb(BD(a, 222), BD(b, 222)); + }; + _.Fb = function pLb(a) { + return this === a; + }; + _.ve = function qLb() { + return new tpb(this); + }; + mdb(ule, "RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type", 1789); + bcb(406, 22, { 3: 1, 35: 1, 22: 1, 406: 1 }, wLb); + var rLb, sLb, tLb, uLb; + var PN = ndb(ule, "RectangleStripOverlapRemover/OverlapRemovalDirection", 406, CI, yLb, xLb); + var zLb; + bcb(222, 1, { 222: 1 }, BLb); + mdb(ule, "RectangleStripOverlapRemover/RectangleNode", 222); + bcb(1788, 1, qie, CLb); + _.td = function DLb(a) { + aLb(this.a, BD(a, 222)); + }; + mdb(ule, "RectangleStripOverlapRemover/lambda$1$Type", 1788); + bcb(1304, 1, Dke, GLb); + _.ue = function HLb(a, b) { + return FLb(BD(a, 167), BD(b, 167)); + }; + _.Fb = function ILb(a) { + return this === a; + }; + _.ve = function JLb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator", 1304); + bcb(1307, 1, {}, KLb); + _.Kb = function LLb(a) { + return BD(a, 324).a; + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type", 1307); + bcb(1308, 1, Oie, MLb); + _.Mb = function NLb(a) { + return BD(a, 323).a; + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type", 1308); + bcb(1309, 1, Oie, OLb); + _.Mb = function PLb(a) { + return BD(a, 323).a; + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type", 1309); + bcb(1302, 1, Dke, RLb); + _.ue = function SLb(a, b) { + return QLb(BD(a, 167), BD(b, 167)); + }; + _.Fb = function TLb(a) { + return this === a; + }; + _.ve = function ULb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinNumOfExtensionDirectionsComparator", 1302); + bcb(1305, 1, {}, VLb); + _.Kb = function WLb(a) { + return BD(a, 324).a; + }; + mdb(wle, "PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type", 1305); + bcb(767, 1, Dke, YLb); + _.ue = function ZLb(a, b) { + return XLb(BD(a, 167), BD(b, 167)); + }; + _.Fb = function $Lb(a) { + return this === a; + }; + _.ve = function _Lb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinNumOfExtensionsComparator", 767); + bcb(1300, 1, Dke, bMb); + _.ue = function cMb(a, b) { + return aMb(BD(a, 321), BD(b, 321)); + }; + _.Fb = function dMb(a) { + return this === a; + }; + _.ve = function eMb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinPerimeterComparator", 1300); + bcb(1301, 1, Dke, gMb); + _.ue = function hMb(a, b) { + return fMb(BD(a, 321), BD(b, 321)); + }; + _.Fb = function iMb(a) { + return this === a; + }; + _.ve = function jMb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinPerimeterComparatorWithShape", 1301); + bcb(1303, 1, Dke, lMb); + _.ue = function mMb(a, b) { + return kMb(BD(a, 167), BD(b, 167)); + }; + _.Fb = function nMb(a) { + return this === a; + }; + _.ve = function oMb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator", 1303); + bcb(1306, 1, {}, pMb); + _.Kb = function qMb(a) { + return BD(a, 324).a; + }; + mdb(wle, "PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type", 1306); + bcb(777, 1, {}, tMb); + _.Ce = function uMb(a, b) { + return sMb(this, BD(a, 46), BD(b, 167)); + }; + mdb(wle, "SuccessorCombination", 777); + bcb(644, 1, {}, wMb); + _.Ce = function xMb(a, b) { + var c; + return vMb((c = BD(a, 46), BD(b, 167), c)); + }; + mdb(wle, "SuccessorJitter", 644); + bcb(643, 1, {}, zMb); + _.Ce = function AMb(a, b) { + var c; + return yMb((c = BD(a, 46), BD(b, 167), c)); + }; + mdb(wle, "SuccessorLineByLine", 643); + bcb(568, 1, {}, CMb); + _.Ce = function DMb(a, b) { + var c; + return BMb((c = BD(a, 46), BD(b, 167), c)); + }; + mdb(wle, "SuccessorManhattan", 568); + bcb(1356, 1, {}, FMb); + _.Ce = function GMb(a, b) { + var c; + return EMb((c = BD(a, 46), BD(b, 167), c)); + }; + mdb(wle, "SuccessorMaxNormWindingInMathPosSense", 1356); + bcb(400, 1, {}, JMb); + _.Ce = function KMb(a, b) { + return HMb(this, a, b); + }; + _.c = false; + _.d = false; + _.e = false; + _.f = false; + mdb(wle, "SuccessorQuadrantsGeneric", 400); + bcb(1357, 1, {}, LMb); + _.Kb = function MMb(a) { + return BD(a, 324).a; + }; + mdb(wle, "SuccessorQuadrantsGeneric/lambda$0$Type", 1357); + bcb(323, 22, { 3: 1, 35: 1, 22: 1, 323: 1 }, SMb); + _.a = false; + var NMb, OMb, PMb, QMb; + var jO = ndb(Ble, Cle, 323, CI, UMb, TMb); + var VMb; + bcb(1298, 1, {}); + _.Ib = function bNb() { + var a, b, c, d, e, f; + c = " "; + a = meb(0); + for (e = 0; e < this.o; e++) { + c += "" + a.a; + a = meb(XMb(a.a)); + } + c += "\n"; + a = meb(0); + for (f = 0; f < this.p; f++) { + c += "" + a.a; + a = meb(XMb(a.a)); + for (d = 0; d < this.o; d++) { + b = _Mb(this, d, f); + ybb(b, 0) == 0 ? c += "_" : ybb(b, 1) == 0 ? c += "X" : c += "0"; + } + c += "\n"; + } + return qfb(c, 0, c.length - 1); + }; + _.o = 0; + _.p = 0; + mdb(Ble, "TwoBitGrid", 1298); + bcb(321, 1298, { 321: 1 }, pNb); + _.j = 0; + _.k = 0; + mdb(Ble, "PlanarGrid", 321); + bcb(167, 321, { 321: 1, 167: 1 }); + _.g = 0; + _.i = 0; + mdb(Ble, "Polyomino", 167); + var P3 = odb(Hle, Ile); + bcb(134, 1, Jle, zNb); + _.Ye = function DNb(a, b) { + return xNb(this, a, b); + }; + _.Ve = function ANb() { + return uNb(this); + }; + _.We = function BNb(a) { + return vNb(this, a); + }; + _.Xe = function CNb(a) { + return wNb(this, a); + }; + mdb(Hle, "MapPropertyHolder", 134); + bcb(1299, 134, Jle, ENb); + mdb(Ble, "Polyominoes", 1299); + var FNb = false, GNb, HNb; + bcb(1766, 1, qie, PNb); + _.td = function QNb(a) { + JNb(BD(a, 221)); + }; + mdb(Kle, "DepthFirstCompaction/0methodref$compactTree$Type", 1766); + bcb(810, 1, qie, RNb); + _.td = function SNb(a) { + MNb(this.a, BD(a, 221)); + }; + mdb(Kle, "DepthFirstCompaction/lambda$1$Type", 810); + bcb(1767, 1, qie, TNb); + _.td = function UNb(a) { + NNb(this.a, this.b, this.c, BD(a, 221)); + }; + mdb(Kle, "DepthFirstCompaction/lambda$2$Type", 1767); + var VNb, WNb; + bcb(65, 1, { 65: 1 }, aOb); + mdb(Kle, "Node", 65); + bcb(1250, 1, {}, dOb); + mdb(Kle, "ScanlineOverlapCheck", 1250); + bcb(1251, 1, { 679: 1 }, hOb); + _.Ke = function iOb(a) { + fOb(this, BD(a, 440)); + }; + mdb(Kle, "ScanlineOverlapCheck/OverlapsScanlineHandler", 1251); + bcb(1252, 1, Dke, kOb); + _.ue = function lOb(a, b) { + return jOb(BD(a, 65), BD(b, 65)); + }; + _.Fb = function mOb(a) { + return this === a; + }; + _.ve = function nOb() { + return new tpb(this); + }; + mdb(Kle, "ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type", 1252); + bcb(440, 1, { 440: 1 }, oOb); + _.a = false; + mdb(Kle, "ScanlineOverlapCheck/Timestamp", 440); + bcb(1253, 1, Dke, pOb); + _.ue = function qOb(a, b) { + return eOb(BD(a, 440), BD(b, 440)); + }; + _.Fb = function rOb(a) { + return this === a; + }; + _.ve = function sOb() { + return new tpb(this); + }; + mdb(Kle, "ScanlineOverlapCheck/lambda$0$Type", 1253); + bcb(550, 1, {}, tOb); + mdb(Lle, "SVGImage", 550); + bcb(324, 1, { 324: 1 }, uOb); + _.Ib = function vOb() { + return "(" + this.a + She + this.b + She + this.c + ")"; + }; + mdb(Lle, "UniqueTriple", 324); + bcb(209, 1, Mle); + mdb(Nle, "AbstractLayoutProvider", 209); + bcb(1132, 209, Mle, yOb); + _.Ze = function zOb(a, b) { + var c, d, e, f; + Odd(b, Ole, 1); + this.a = Edb(ED(hkd(a, (CPb(), BPb)))); + if (ikd(a, rPb)) { + e = GD(hkd(a, rPb)); + c = h4c(n4c(), e); + if (c) { + d = BD(hgd(c.f), 209); + d.Ze(a, Udd(b, 1)); + } + } + f = new AQb(this.a); + this.b = yQb(f, a); + switch (BD(hkd(a, (nPb(), jPb)), 481).g) { + case 0: + BOb(new FOb(), this.b); + jkd(a, uPb, vNb(this.b, uPb)); + break; + default: + Zfb(); + } + qQb(f); + jkd(a, tPb, this.b); + Qdd(b); + }; + _.a = 0; + mdb(Ple, "DisCoLayoutProvider", 1132); + bcb(1244, 1, {}, FOb); + _.c = false; + _.e = 0; + _.f = 0; + mdb(Ple, "DisCoPolyominoCompactor", 1244); + bcb(561, 1, { 561: 1 }, MOb); + _.b = true; + mdb(Qle, "DCComponent", 561); + bcb(394, 22, { 3: 1, 35: 1, 22: 1, 394: 1 }, SOb); + _.a = false; + var NOb, OOb, POb, QOb; + var CO = ndb(Qle, "DCDirection", 394, CI, UOb, TOb); + var VOb; + bcb(266, 134, { 3: 1, 266: 1, 94: 1, 134: 1 }, XOb); + mdb(Qle, "DCElement", 266); + bcb(395, 1, { 395: 1 }, ZOb); + _.c = 0; + mdb(Qle, "DCExtension", 395); + bcb(755, 134, Jle, aPb); + mdb(Qle, "DCGraph", 755); + bcb(481, 22, { 3: 1, 35: 1, 22: 1, 481: 1 }, dPb); + var bPb; + var GO = ndb(Rle, Sle, 481, CI, fPb, ePb); + var gPb; + bcb(854, 1, ale, oPb); + _.Qe = function pPb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tle), Xle), "Connected Components Compaction Strategy"), "Strategy for packing different connected components in order to save space and enhance readability of a graph."), kPb), (_5c(), V5c)), GO), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Ule), Xle), "Connected Components Layout Algorithm"), "A layout algorithm that is to be applied to each connected component before the components themselves are compacted. If unspecified, the positions of the components' nodes are not altered."), Z5c), ZI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Vle), "debug"), "DCGraph"), "Access to the DCGraph is intended for the debug view,"), Y5c), SI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Wle), "debug"), "List of Polyominoes"), "Access to the polyominoes is intended for the debug view,"), Y5c), SI), pqb(L5c)))); + DPb((new EPb(), a)); + }; + var iPb, jPb, kPb, lPb, mPb; + mdb(Rle, "DisCoMetaDataProvider", 854); + bcb(998, 1, ale, EPb); + _.Qe = function FPb(a) { + DPb(a); + }; + var qPb, rPb, sPb, tPb, uPb, vPb, wPb, xPb, yPb, zPb, APb, BPb; + mdb(Rle, "DisCoOptions", 998); + bcb(999, 1, {}, GPb); + _.$e = function HPb() { + var a; + return a = new yOb(), a; + }; + _._e = function IPb(a) { + }; + mdb(Rle, "DisCoOptions/DiscoFactory", 999); + bcb(562, 167, { 321: 1, 167: 1, 562: 1 }, MPb); + _.a = 0; + _.b = 0; + _.c = 0; + _.d = 0; + mdb("org.eclipse.elk.alg.disco.structures", "DCPolyomino", 562); + var NPb, OPb, PPb; + bcb(1268, 1, Oie, aQb); + _.Mb = function bQb(a) { + return _Pb(a); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$0$Type", 1268); + bcb(1269, 1, {}, cQb); + _.Kb = function dQb(a) { + return QPb(), jtd(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$1$Type", 1269); + bcb(1270, 1, Oie, eQb); + _.Mb = function fQb(a) { + return WPb(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$2$Type", 1270); + bcb(1271, 1, {}, gQb); + _.Kb = function hQb(a) { + return QPb(), ltd(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$3$Type", 1271); + bcb(1272, 1, Oie, iQb); + _.Mb = function jQb(a) { + return XPb(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$4$Type", 1272); + bcb(1273, 1, Oie, kQb); + _.Mb = function lQb(a) { + return YPb(this.a, BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$5$Type", 1273); + bcb(1274, 1, {}, mQb); + _.Kb = function nQb(a) { + return ZPb(this.a, BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$6$Type", 1274); + bcb(1241, 1, {}, AQb); + _.a = 0; + mdb(bme, "ElkGraphTransformer", 1241); + bcb(1242, 1, {}, CQb); + _.Od = function DQb(a, b) { + BQb(this, BD(a, 160), BD(b, 266)); + }; + mdb(bme, "ElkGraphTransformer/OffsetApplier", 1242); + bcb(1243, 1, qie, FQb); + _.td = function GQb(a) { + EQb(this, BD(a, 8)); + }; + mdb(bme, "ElkGraphTransformer/OffsetApplier/OffSetToChainApplier", 1243); + bcb(753, 1, {}, MQb); + mdb(gme, hme, 753); + bcb(1232, 1, Dke, OQb); + _.ue = function PQb(a, b) { + return NQb(BD(a, 231), BD(b, 231)); + }; + _.Fb = function QQb(a) { + return this === a; + }; + _.ve = function RQb() { + return new tpb(this); + }; + mdb(gme, ime, 1232); + bcb(740, 209, Mle, ZQb); + _.Ze = function $Qb(a, b) { + WQb(this, a, b); + }; + mdb(gme, "ForceLayoutProvider", 740); + bcb(357, 134, { 3: 1, 357: 1, 94: 1, 134: 1 }); + mdb(jme, "FParticle", 357); + bcb(559, 357, { 3: 1, 559: 1, 357: 1, 94: 1, 134: 1 }, aRb); + _.Ib = function bRb() { + var a; + if (this.a) { + a = Jkb(this.a.a, this, 0); + return a >= 0 ? "b" + a + "[" + fRb(this.a) + "]" : "b[" + fRb(this.a) + "]"; + } + return "b_" + FCb(this); + }; + mdb(jme, "FBendpoint", 559); + bcb(282, 134, { 3: 1, 282: 1, 94: 1, 134: 1 }, gRb); + _.Ib = function hRb() { + return fRb(this); + }; + mdb(jme, "FEdge", 282); + bcb(231, 134, { 3: 1, 231: 1, 94: 1, 134: 1 }, kRb); + var $O = mdb(jme, "FGraph", 231); + bcb(447, 357, { 3: 1, 447: 1, 357: 1, 94: 1, 134: 1 }, mRb); + _.Ib = function nRb() { + return this.b == null || this.b.length == 0 ? "l[" + fRb(this.a) + "]" : "l_" + this.b; + }; + mdb(jme, "FLabel", 447); + bcb(144, 357, { 3: 1, 144: 1, 357: 1, 94: 1, 134: 1 }, pRb); + _.Ib = function qRb() { + return oRb(this); + }; + _.b = 0; + mdb(jme, "FNode", 144); + bcb(2003, 1, {}); + _.bf = function vRb(a) { + rRb(this, a); + }; + _.cf = function wRb() { + sRb(this); + }; + _.d = 0; + mdb(lme, "AbstractForceModel", 2003); + bcb(631, 2003, { 631: 1 }, xRb); + _.af = function zRb(a, b) { + var c, d, e, f, g; + uRb(this.f, a, b); + e = c7c(R6c(b.d), a.d); + g = $wnd.Math.sqrt(e.a * e.a + e.b * e.b); + d = $wnd.Math.max(0, g - U6c(a.e) / 2 - U6c(b.e) / 2); + c = jRb(this.e, a, b); + c > 0 ? f = -yRb(d, this.c) * c : f = CRb(d, this.b) * BD(vNb(a, (wSb(), oSb)), 19).a; + Y6c(e, f / g); + return e; + }; + _.bf = function ARb(a) { + rRb(this, a); + this.a = BD(vNb(a, (wSb(), eSb)), 19).a; + this.c = Edb(ED(vNb(a, uSb))); + this.b = Edb(ED(vNb(a, qSb))); + }; + _.df = function BRb(a) { + return a < this.a; + }; + _.a = 0; + _.b = 0; + _.c = 0; + mdb(lme, "EadesModel", 631); + bcb(632, 2003, { 632: 1 }, DRb); + _.af = function FRb(a, b) { + var c, d, e, f, g; + uRb(this.f, a, b); + e = c7c(R6c(b.d), a.d); + g = $wnd.Math.sqrt(e.a * e.a + e.b * e.b); + d = $wnd.Math.max(0, g - U6c(a.e) / 2 - U6c(b.e) / 2); + f = JRb(d, this.a) * BD(vNb(a, (wSb(), oSb)), 19).a; + c = jRb(this.e, a, b); + c > 0 && (f -= ERb(d, this.a) * c); + Y6c(e, f * this.b / g); + return e; + }; + _.bf = function GRb(a) { + var b, c, d, e, f, g, h; + rRb(this, a); + this.b = Edb(ED(vNb(a, (wSb(), vSb)))); + this.c = this.b / BD(vNb(a, eSb), 19).a; + d = a.e.c.length; + f = 0; + e = 0; + for (h = new olb(a.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 144); + f += g.e.a; + e += g.e.b; + } + b = f * e; + c = Edb(ED(vNb(a, uSb))) * ple; + this.a = $wnd.Math.sqrt(b / (2 * d)) * c; + }; + _.cf = function HRb() { + sRb(this); + this.b -= this.c; + }; + _.df = function IRb(a) { + return this.b > 0; + }; + _.a = 0; + _.b = 0; + _.c = 0; + mdb(lme, "FruchtermanReingoldModel", 632); + bcb(849, 1, ale, TRb); + _.Qe = function URb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mme), ""), "Force Model"), "Determines the model for force calculation."), MRb), (_5c(), V5c)), gP), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), nme), ""), "Iterations"), "The number of iterations on the force model."), meb(300)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ome), ""), "Repulsive Power"), "Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), pme), ""), "FR Temperature"), "The temperature is used as a scaling factor for particle displacements."), qme), U5c), BI), pqb(L5c)))); + o4c(a, pme, mme, RRb); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), rme), ""), "Eades Repulsion"), "Factor for repulsive forces in Eades' model."), 5), U5c), BI), pqb(L5c)))); + o4c(a, rme, mme, ORb); + xSb((new ySb(), a)); + }; + var KRb, LRb, MRb, NRb, ORb, PRb, QRb, RRb; + mdb(sme, "ForceMetaDataProvider", 849); + bcb(424, 22, { 3: 1, 35: 1, 22: 1, 424: 1 }, YRb); + var VRb, WRb; + var gP = ndb(sme, "ForceModelStrategy", 424, CI, $Rb, ZRb); + var _Rb; + bcb(988, 1, ale, ySb); + _.Qe = function zSb(a) { + xSb(a); + }; + var bSb, cSb, dSb, eSb, fSb, gSb, hSb, iSb, jSb, kSb, lSb, mSb, nSb, oSb, pSb, qSb, rSb, sSb, tSb, uSb, vSb; + mdb(sme, "ForceOptions", 988); + bcb(989, 1, {}, ASb); + _.$e = function BSb() { + var a; + return a = new ZQb(), a; + }; + _._e = function CSb(a) { + }; + mdb(sme, "ForceOptions/ForceFactory", 989); + var DSb, ESb, FSb, GSb; + bcb(850, 1, ale, PSb); + _.Qe = function QSb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Mme), ""), "Fixed Position"), "Prevent that the node is moved by the layout algorithm."), (Bcb(), false)), (_5c(), T5c)), wI), pqb((N5c(), K5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Nme), ""), "Desired Edge Length"), "Either specified for parent nodes or for individual edges, where the latter takes higher precedence."), 100), U5c), BI), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [I5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ome), ""), "Layout Dimension"), "Dimensions that are permitted to be altered during layout."), KSb), V5c), oP), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Pme), ""), "Stress Epsilon"), "Termination criterion for the iterative process."), qme), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Qme), ""), "Iteration Limit"), "Maximum number of performed iterations. Takes higher precedence than 'epsilon'."), meb(Ohe)), X5c), JI), pqb(L5c)))); + cTb((new dTb(), a)); + }; + var ISb, JSb, KSb, LSb, MSb, NSb; + mdb(sme, "StressMetaDataProvider", 850); + bcb(992, 1, ale, dTb); + _.Qe = function eTb(a) { + cTb(a); + }; + var RSb, SSb, TSb, USb, VSb, WSb, XSb, YSb, ZSb, $Sb, _Sb, aTb; + mdb(sme, "StressOptions", 992); + bcb(993, 1, {}, fTb); + _.$e = function gTb() { + var a; + return a = new iTb(), a; + }; + _._e = function hTb(a) { + }; + mdb(sme, "StressOptions/StressFactory", 993); + bcb(1128, 209, Mle, iTb); + _.Ze = function jTb(a, b) { + var c, d, e, f, g; + Odd(b, Sme, 1); + Ccb(DD(hkd(a, (bTb(), VSb)))) ? Ccb(DD(hkd(a, _Sb))) || $Cb((c = new _Cb((Pgd(), new bhd(a))), c)) : WQb(new ZQb(), a, Udd(b, 1)); + e = TQb(a); + d = LQb(this.a, e); + for (g = d.Kc(); g.Ob(); ) { + f = BD(g.Pb(), 231); + if (f.e.c.length <= 1) { + continue; + } + sTb(this.b, f); + qTb(this.b); + Hkb(f.d, new kTb()); + } + e = KQb(d); + SQb(e); + Qdd(b); + }; + mdb(Ume, "StressLayoutProvider", 1128); + bcb(1129, 1, qie, kTb); + _.td = function lTb(a) { + lRb(BD(a, 447)); + }; + mdb(Ume, "StressLayoutProvider/lambda$0$Type", 1129); + bcb(990, 1, {}, tTb); + _.c = 0; + _.e = 0; + _.g = 0; + mdb(Ume, "StressMajorization", 990); + bcb(379, 22, { 3: 1, 35: 1, 22: 1, 379: 1 }, zTb); + var vTb, wTb, xTb; + var oP = ndb(Ume, "StressMajorization/Dimension", 379, CI, BTb, ATb); + var CTb; + bcb(991, 1, Dke, ETb); + _.ue = function FTb(a, b) { + return uTb(this.a, BD(a, 144), BD(b, 144)); + }; + _.Fb = function GTb(a) { + return this === a; + }; + _.ve = function HTb() { + return new tpb(this); + }; + mdb(Ume, "StressMajorization/lambda$0$Type", 991); + bcb(1229, 1, {}, PTb); + mdb(Wme, "ElkLayered", 1229); + bcb(1230, 1, qie, STb); + _.td = function TTb(a) { + QTb(BD(a, 37)); + }; + mdb(Wme, "ElkLayered/lambda$0$Type", 1230); + bcb(1231, 1, qie, UTb); + _.td = function VTb(a) { + RTb(this.a, BD(a, 37)); + }; + mdb(Wme, "ElkLayered/lambda$1$Type", 1231); + bcb(1263, 1, {}, bUb); + var WTb, XTb, YTb; + mdb(Wme, "GraphConfigurator", 1263); + bcb(759, 1, qie, dUb); + _.td = function eUb(a) { + $Tb(this.a, BD(a, 10)); + }; + mdb(Wme, "GraphConfigurator/lambda$0$Type", 759); + bcb(760, 1, {}, fUb); + _.Kb = function gUb(a) { + return ZTb(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Wme, "GraphConfigurator/lambda$1$Type", 760); + bcb(761, 1, qie, hUb); + _.td = function iUb(a) { + $Tb(this.a, BD(a, 10)); + }; + mdb(Wme, "GraphConfigurator/lambda$2$Type", 761); + bcb(1127, 209, Mle, jUb); + _.Ze = function kUb(a, b) { + var c; + c = U1b(new a2b(), a); + PD(hkd(a, (Nyc(), axc))) === PD((hbd(), ebd)) ? JTb(this.a, c, b) : KTb(this.a, c, b); + z2b(new D2b(), c); + }; + mdb(Wme, "LayeredLayoutProvider", 1127); + bcb(356, 22, { 3: 1, 35: 1, 22: 1, 356: 1 }, rUb); + var lUb, mUb, nUb, oUb, pUb; + var zP = ndb(Wme, "LayeredPhases", 356, CI, tUb, sUb); + var uUb; + bcb(1651, 1, {}, CUb); + _.i = 0; + var wUb; + mdb(Xme, "ComponentsToCGraphTransformer", 1651); + var hVb; + bcb(1652, 1, {}, DUb); + _.ef = function EUb(a, b) { + return $wnd.Math.min(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + _.ff = function FUb(a, b) { + return $wnd.Math.min(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + mdb(Xme, "ComponentsToCGraphTransformer/1", 1652); + bcb(81, 1, { 81: 1 }); + _.i = 0; + _.k = true; + _.o = Qje; + var IP = mdb(Yme, "CNode", 81); + bcb(460, 81, { 460: 1, 81: 1 }, GUb, HUb); + _.Ib = function IUb() { + return ""; + }; + mdb(Xme, "ComponentsToCGraphTransformer/CRectNode", 460); + bcb(1623, 1, {}, VUb); + var JUb, KUb; + mdb(Xme, "OneDimensionalComponentsCompaction", 1623); + bcb(1624, 1, {}, YUb); + _.Kb = function ZUb(a) { + return WUb(BD(a, 46)); + }; + _.Fb = function $Ub(a) { + return this === a; + }; + mdb(Xme, "OneDimensionalComponentsCompaction/lambda$0$Type", 1624); + bcb(1625, 1, {}, _Ub); + _.Kb = function aVb(a) { + return XUb(BD(a, 46)); + }; + _.Fb = function bVb(a) { + return this === a; + }; + mdb(Xme, "OneDimensionalComponentsCompaction/lambda$1$Type", 1625); + bcb(1654, 1, {}, dVb); + mdb(Yme, "CGraph", 1654); + bcb(189, 1, { 189: 1 }, gVb); + _.b = 0; + _.c = 0; + _.e = 0; + _.g = true; + _.i = Qje; + mdb(Yme, "CGroup", 189); + bcb(1653, 1, {}, jVb); + _.ef = function kVb(a, b) { + return $wnd.Math.max(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + _.ff = function lVb(a, b) { + return $wnd.Math.max(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + mdb(Yme, Ike, 1653); + bcb(1655, 1, {}, CVb); + _.d = false; + var mVb; + var LP = mdb(Yme, Nke, 1655); + bcb(1656, 1, {}, DVb); + _.Kb = function EVb(a) { + return nVb(), Bcb(), BD(BD(a, 46).a, 81).d.e != 0 ? true : false; + }; + _.Fb = function FVb(a) { + return this === a; + }; + mdb(Yme, Oke, 1656); + bcb(823, 1, {}, IVb); + _.a = false; + _.b = false; + _.c = false; + _.d = false; + mdb(Yme, Pke, 823); + bcb(1825, 1, {}, OVb); + mdb(Zme, Qke, 1825); + var bQ = odb($me, Fke); + bcb(1826, 1, { 369: 1 }, SVb); + _.Ke = function TVb(a) { + QVb(this, BD(a, 466)); + }; + mdb(Zme, Rke, 1826); + bcb(1827, 1, Dke, VVb); + _.ue = function WVb(a, b) { + return UVb(BD(a, 81), BD(b, 81)); + }; + _.Fb = function XVb(a) { + return this === a; + }; + _.ve = function YVb() { + return new tpb(this); + }; + mdb(Zme, Ske, 1827); + bcb(466, 1, { 466: 1 }, ZVb); + _.a = false; + mdb(Zme, Tke, 466); + bcb(1828, 1, Dke, $Vb); + _.ue = function _Vb(a, b) { + return PVb(BD(a, 466), BD(b, 466)); + }; + _.Fb = function aWb(a) { + return this === a; + }; + _.ve = function bWb() { + return new tpb(this); + }; + mdb(Zme, Uke, 1828); + bcb(140, 1, { 140: 1 }, cWb, dWb); + _.Fb = function eWb(a) { + var b; + if (a == null) { + return false; + } + if (TP != rb(a)) { + return false; + } + b = BD(a, 140); + return wtb(this.c, b.c) && wtb(this.d, b.d); + }; + _.Hb = function fWb() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [this.c, this.d])); + }; + _.Ib = function gWb() { + return "(" + this.c + She + this.d + (this.a ? "cx" : "") + this.b + ")"; + }; + _.a = true; + _.c = 0; + _.d = 0; + var TP = mdb($me, "Point", 140); + bcb(405, 22, { 3: 1, 35: 1, 22: 1, 405: 1 }, oWb); + var hWb, iWb, jWb, kWb; + var SP = ndb($me, "Point/Quadrant", 405, CI, sWb, rWb); + var tWb; + bcb(1642, 1, {}, CWb); + _.b = null; + _.c = null; + _.d = null; + _.e = null; + _.f = null; + var vWb, wWb, xWb, yWb, zWb; + mdb($me, "RectilinearConvexHull", 1642); + bcb(574, 1, { 369: 1 }, NWb); + _.Ke = function OWb(a) { + MWb(this, BD(a, 140)); + }; + _.b = 0; + var KWb; + mdb($me, "RectilinearConvexHull/MaximalElementsEventHandler", 574); + bcb(1644, 1, Dke, QWb); + _.ue = function RWb(a, b) { + return PWb(ED(a), ED(b)); + }; + _.Fb = function SWb(a) { + return this === a; + }; + _.ve = function TWb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type", 1644); + bcb(1643, 1, { 369: 1 }, VWb); + _.Ke = function WWb(a) { + UWb(this, BD(a, 140)); + }; + _.a = 0; + _.b = null; + _.c = null; + _.d = null; + _.e = null; + mdb($me, "RectilinearConvexHull/RectangleEventHandler", 1643); + bcb(1645, 1, Dke, XWb); + _.ue = function YWb(a, b) { + return EWb(BD(a, 140), BD(b, 140)); + }; + _.Fb = function ZWb(a) { + return this === a; + }; + _.ve = function $Wb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$0$Type", 1645); + bcb(1646, 1, Dke, _Wb); + _.ue = function aXb(a, b) { + return FWb(BD(a, 140), BD(b, 140)); + }; + _.Fb = function bXb(a) { + return this === a; + }; + _.ve = function cXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$1$Type", 1646); + bcb(1647, 1, Dke, dXb); + _.ue = function eXb(a, b) { + return GWb(BD(a, 140), BD(b, 140)); + }; + _.Fb = function fXb(a) { + return this === a; + }; + _.ve = function gXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$2$Type", 1647); + bcb(1648, 1, Dke, hXb); + _.ue = function iXb(a, b) { + return HWb(BD(a, 140), BD(b, 140)); + }; + _.Fb = function jXb(a) { + return this === a; + }; + _.ve = function kXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$3$Type", 1648); + bcb(1649, 1, Dke, lXb); + _.ue = function mXb(a, b) { + return IWb(BD(a, 140), BD(b, 140)); + }; + _.Fb = function nXb(a) { + return this === a; + }; + _.ve = function oXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$4$Type", 1649); + bcb(1650, 1, {}, qXb); + mdb($me, "Scanline", 1650); + bcb(2005, 1, {}); + mdb(_me, "AbstractGraphPlacer", 2005); + bcb(325, 1, { 325: 1 }, AXb); + _.mf = function BXb(a) { + if (this.nf(a)) { + Rc(this.b, BD(vNb(a, (wtc(), Esc)), 21), a); + return true; + } else { + return false; + } + }; + _.nf = function CXb(a) { + var b, c, d, e; + b = BD(vNb(a, (wtc(), Esc)), 21); + e = BD(Qc(wXb, b), 21); + for (d = e.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 21); + if (!BD(Qc(this.b, c), 15).dc()) { + return false; + } + } + return true; + }; + var wXb; + mdb(_me, "ComponentGroup", 325); + bcb(765, 2005, {}, HXb); + _.of = function IXb(a) { + var b, c; + for (c = new olb(this.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 325); + if (b.mf(a)) { + return; + } + } + Ekb(this.a, new AXb(a)); + }; + _.lf = function JXb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2; + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + if (a.dc()) { + b.f.a = 0; + b.f.b = 0; + return; + } + g = BD(a.Xb(0), 37); + tNb(b, g); + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + this.of(d); + } + o2 = new d7c(); + f = Edb(ED(vNb(g, (Nyc(), kyc)))); + for (j = new olb(this.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 325); + k = DXb(h, f); + vXb(Uc(h.b), o2.a, o2.b); + o2.a += k.a; + o2.b += k.b; + } + b.f.a = o2.a - f; + b.f.b = o2.b - f; + if (Ccb(DD(vNb(g, qwc))) && PD(vNb(g, Swc)) === PD((Aad(), wad))) { + for (n = a.Kc(); n.Ob(); ) { + l = BD(n.Pb(), 37); + uXb(l, l.c.a, l.c.b); + } + c = new gYb(); + YXb(c, a, f); + for (m = a.Kc(); m.Ob(); ) { + l = BD(m.Pb(), 37); + P6c(X6c(l.c), c.e); + } + P6c(X6c(b.f), c.a); + } + for (i = new olb(this.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 325); + tXb(b, Uc(h.b)); + } + }; + mdb(_me, "ComponentGroupGraphPlacer", 765); + bcb(1293, 765, {}, LXb); + _.of = function MXb(a) { + KXb(this, a); + }; + _.lf = function NXb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t; + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + if (a.dc()) { + b.f.a = 0; + b.f.b = 0; + return; + } + g = BD(a.Xb(0), 37); + tNb(b, g); + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + KXb(this, d); + } + t = new d7c(); + s = new d7c(); + p = new d7c(); + o2 = new d7c(); + f = Edb(ED(vNb(g, (Nyc(), kyc)))); + for (j = new olb(this.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 325); + if (fad(BD(vNb(b, (Y9c(), z8c)), 103))) { + p.a = t.a; + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), Acd))) { + p.a = s.a; + break; + } + } + } else if (gad(BD(vNb(b, z8c), 103))) { + p.b = t.b; + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), Tcd))) { + p.b = s.b; + break; + } + } + } + k = DXb(BD(h, 570), f); + vXb(Uc(h.b), p.a, p.b); + if (fad(BD(vNb(b, z8c), 103))) { + s.a = p.a + k.a; + o2.a = $wnd.Math.max(o2.a, s.a); + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), Rcd))) { + t.a = p.a + k.a; + break; + } + } + s.b = p.b + k.b; + p.b = s.b; + o2.b = $wnd.Math.max(o2.b, p.b); + } else if (gad(BD(vNb(b, z8c), 103))) { + s.b = p.b + k.b; + o2.b = $wnd.Math.max(o2.b, s.b); + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), zcd))) { + t.b = p.b + k.b; + break; + } + } + s.a = p.a + k.a; + p.a = s.a; + o2.a = $wnd.Math.max(o2.a, p.a); + } + } + b.f.a = o2.a - f; + b.f.b = o2.b - f; + if (Ccb(DD(vNb(g, qwc))) && PD(vNb(g, Swc)) === PD((Aad(), wad))) { + for (n = a.Kc(); n.Ob(); ) { + l = BD(n.Pb(), 37); + uXb(l, l.c.a, l.c.b); + } + c = new gYb(); + YXb(c, a, f); + for (m = a.Kc(); m.Ob(); ) { + l = BD(m.Pb(), 37); + P6c(X6c(l.c), c.e); + } + P6c(X6c(b.f), c.a); + } + for (i = new olb(this.a); i.a < i.c.c.length; ) { + h = BD(mlb(i), 325); + tXb(b, Uc(h.b)); + } + }; + mdb(_me, "ComponentGroupModelOrderGraphPlacer", 1293); + bcb(423, 22, { 3: 1, 35: 1, 22: 1, 423: 1 }, SXb); + var OXb, PXb, QXb; + var hQ = ndb(_me, "ComponentOrderingStrategy", 423, CI, UXb, TXb); + var VXb; + bcb(650, 1, {}, gYb); + mdb(_me, "ComponentsCompactor", 650); + bcb(1468, 12, ake, jYb); + _.Fc = function kYb(a) { + return hYb(this, BD(a, 140)); + }; + mdb(_me, "ComponentsCompactor/Hullpoints", 1468); + bcb(1465, 1, { 841: 1 }, mYb); + _.a = false; + mdb(_me, "ComponentsCompactor/InternalComponent", 1465); + bcb(1464, 1, vie, nYb); + _.Jc = function oYb(a) { + reb(this, a); + }; + _.Kc = function pYb() { + return new olb(this.a); + }; + mdb(_me, "ComponentsCompactor/InternalConnectedComponents", 1464); + bcb(1467, 1, { 594: 1 }, qYb); + _.hf = function sYb() { + return null; + }; + _.jf = function tYb() { + return this.a; + }; + _.gf = function rYb() { + return cYb(this.d); + }; + _.kf = function uYb() { + return this.b; + }; + mdb(_me, "ComponentsCompactor/InternalExternalExtension", 1467); + bcb(1466, 1, { 594: 1 }, vYb); + _.jf = function yYb() { + return this.a; + }; + _.gf = function wYb() { + return cYb(this.d); + }; + _.hf = function xYb() { + return this.c; + }; + _.kf = function zYb() { + return this.b; + }; + mdb(_me, "ComponentsCompactor/InternalUnionExternalExtension", 1466); + bcb(1470, 1, {}, AYb); + mdb(_me, "ComponentsCompactor/OuterSegments", 1470); + bcb(1469, 1, {}, BYb); + mdb(_me, "ComponentsCompactor/Segments", 1469); + bcb(1264, 1, {}, FYb); + mdb(_me, hme, 1264); + bcb(1265, 1, Dke, HYb); + _.ue = function IYb(a, b) { + return GYb(BD(a, 37), BD(b, 37)); + }; + _.Fb = function JYb(a) { + return this === a; + }; + _.ve = function KYb() { + return new tpb(this); + }; + mdb(_me, "ComponentsProcessor/lambda$0$Type", 1265); + bcb(570, 325, { 325: 1, 570: 1 }, PYb); + _.mf = function QYb(a) { + return NYb(this, a); + }; + _.nf = function RYb(a) { + return OYb(this, a); + }; + var LYb; + mdb(_me, "ModelOrderComponentGroup", 570); + bcb(1291, 2005, {}, SYb); + _.lf = function TYb(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w; + if (a.gc() == 1) { + t = BD(a.Xb(0), 37); + if (t != b) { + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + sXb(b, t, 0, 0); + tNb(b, t); + u_b(b.d, t.d); + b.f.a = t.f.a; + b.f.b = t.f.b; + } + return; + } else if (a.dc()) { + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + b.f.a = 0; + b.f.b = 0; + return; + } + if (PD(vNb(b, (Nyc(), twc))) === PD((RXb(), QXb))) { + for (i = a.Kc(); i.Ob(); ) { + g = BD(i.Pb(), 37); + r = 0; + for (p = new olb(g.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + r += BD(vNb(o2, byc), 19).a; + } + g.p = r; + } + mmb(); + a.ad(new VYb()); + } + f = BD(a.Xb(0), 37); + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + tNb(b, f); + n = 0; + u = 0; + for (j = a.Kc(); j.Ob(); ) { + g = BD(j.Pb(), 37); + s = g.f; + n = $wnd.Math.max(n, s.a); + u += s.a * s.b; + } + n = $wnd.Math.max(n, $wnd.Math.sqrt(u) * Edb(ED(vNb(b, owc)))); + e = Edb(ED(vNb(b, kyc))); + v = 0; + w = 0; + m = 0; + c = e; + for (h = a.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 37); + s = g.f; + if (v + s.a > n) { + v = 0; + w += m + e; + m = 0; + } + q = g.c; + uXb(g, v + q.a, w + q.b); + X6c(q); + c = $wnd.Math.max(c, v + s.a); + m = $wnd.Math.max(m, s.b); + v += s.a + e; + } + b.f.a = c; + b.f.b = w + m; + if (Ccb(DD(vNb(f, qwc)))) { + d = new gYb(); + YXb(d, a, e); + for (l = a.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 37); + P6c(X6c(k.c), d.e); + } + P6c(X6c(b.f), d.a); + } + tXb(b, a); + }; + mdb(_me, "SimpleRowGraphPlacer", 1291); + bcb(1292, 1, Dke, VYb); + _.ue = function WYb(a, b) { + return UYb(BD(a, 37), BD(b, 37)); + }; + _.Fb = function XYb(a) { + return this === a; + }; + _.ve = function YYb() { + return new tpb(this); + }; + mdb(_me, "SimpleRowGraphPlacer/1", 1292); + var ZYb; + bcb(1262, 1, Vke, dZb); + _.Lb = function eZb(a) { + var b; + return b = BD(vNb(BD(a, 243).b, (Nyc(), jxc)), 74), !!b && b.b != 0; + }; + _.Fb = function fZb(a) { + return this === a; + }; + _.Mb = function gZb(a) { + var b; + return b = BD(vNb(BD(a, 243).b, (Nyc(), jxc)), 74), !!b && b.b != 0; + }; + mdb(dne, "CompoundGraphPostprocessor/1", 1262); + bcb(1261, 1, ene, wZb); + _.pf = function xZb(a, b) { + qZb(this, BD(a, 37), b); + }; + mdb(dne, "CompoundGraphPreprocessor", 1261); + bcb(441, 1, { 441: 1 }, yZb); + _.c = false; + mdb(dne, "CompoundGraphPreprocessor/ExternalPort", 441); + bcb(243, 1, { 243: 1 }, BZb); + _.Ib = function CZb() { + return Zr(this.c) + ":" + TZb(this.b); + }; + mdb(dne, "CrossHierarchyEdge", 243); + bcb(763, 1, Dke, EZb); + _.ue = function FZb(a, b) { + return DZb(this, BD(a, 243), BD(b, 243)); + }; + _.Fb = function GZb(a) { + return this === a; + }; + _.ve = function IZb() { + return new tpb(this); + }; + mdb(dne, "CrossHierarchyEdgeComparator", 763); + bcb(299, 134, { 3: 1, 299: 1, 94: 1, 134: 1 }); + _.p = 0; + mdb(fne, "LGraphElement", 299); + bcb(17, 299, { 3: 1, 17: 1, 299: 1, 94: 1, 134: 1 }, UZb); + _.Ib = function VZb() { + return TZb(this); + }; + var AQ = mdb(fne, "LEdge", 17); + bcb(37, 299, { 3: 1, 20: 1, 37: 1, 299: 1, 94: 1, 134: 1 }, XZb); + _.Jc = function YZb(a) { + reb(this, a); + }; + _.Kc = function ZZb() { + return new olb(this.b); + }; + _.Ib = function $Zb() { + if (this.b.c.length == 0) { + return "G-unlayered" + Fe(this.a); + } else if (this.a.c.length == 0) { + return "G-layered" + Fe(this.b); + } + return "G[layerless" + Fe(this.a) + ", layers" + Fe(this.b) + "]"; + }; + var KQ = mdb(fne, "LGraph", 37); + var _Zb; + bcb(657, 1, {}); + _.qf = function b$b() { + return this.e.n; + }; + _.We = function c$b(a) { + return vNb(this.e, a); + }; + _.rf = function d$b() { + return this.e.o; + }; + _.sf = function e$b() { + return this.e.p; + }; + _.Xe = function f$b(a) { + return wNb(this.e, a); + }; + _.tf = function g$b(a) { + this.e.n.a = a.a; + this.e.n.b = a.b; + }; + _.uf = function h$b(a) { + this.e.o.a = a.a; + this.e.o.b = a.b; + }; + _.vf = function i$b(a) { + this.e.p = a; + }; + mdb(fne, "LGraphAdapters/AbstractLShapeAdapter", 657); + bcb(577, 1, { 839: 1 }, j$b); + _.wf = function k$b() { + var a, b; + if (!this.b) { + this.b = Pu(this.a.b.c.length); + for (b = new olb(this.a.b); b.a < b.c.c.length; ) { + a = BD(mlb(b), 70); + Ekb(this.b, new v$b(a)); + } + } + return this.b; + }; + _.b = null; + mdb(fne, "LGraphAdapters/LEdgeAdapter", 577); + bcb(656, 1, {}, l$b); + _.xf = function m$b() { + var a, b, c, d, e, f; + if (!this.b) { + this.b = new Rkb(); + for (d = new olb(this.a.b); d.a < d.c.c.length; ) { + c = BD(mlb(d), 29); + for (f = new olb(c.a); f.a < f.c.c.length; ) { + e = BD(mlb(f), 10); + if (this.c.Mb(e)) { + Ekb(this.b, new x$b(this, e, this.e)); + if (this.d) { + if (wNb(e, (wtc(), vtc))) { + for (b = BD(vNb(e, vtc), 15).Kc(); b.Ob(); ) { + a = BD(b.Pb(), 10); + Ekb(this.b, new x$b(this, a, false)); + } + } + if (wNb(e, tsc)) { + for (b = BD(vNb(e, tsc), 15).Kc(); b.Ob(); ) { + a = BD(b.Pb(), 10); + Ekb(this.b, new x$b(this, a, false)); + } + } + } + } + } + } + } + return this.b; + }; + _.qf = function n$b() { + throw vbb(new cgb(hne)); + }; + _.We = function o$b(a) { + return vNb(this.a, a); + }; + _.rf = function p$b() { + return this.a.f; + }; + _.sf = function q$b() { + return this.a.p; + }; + _.Xe = function r$b(a) { + return wNb(this.a, a); + }; + _.tf = function s$b(a) { + throw vbb(new cgb(hne)); + }; + _.uf = function t$b(a) { + this.a.f.a = a.a; + this.a.f.b = a.b; + }; + _.vf = function u$b(a) { + this.a.p = a; + }; + _.b = null; + _.d = false; + _.e = false; + mdb(fne, "LGraphAdapters/LGraphAdapter", 656); + bcb(576, 657, { 181: 1 }, v$b); + mdb(fne, "LGraphAdapters/LLabelAdapter", 576); + bcb(575, 657, { 680: 1 }, x$b); + _.yf = function y$b() { + return this.b; + }; + _.zf = function z$b() { + return mmb(), mmb(), jmb; + }; + _.wf = function A$b() { + var a, b; + if (!this.a) { + this.a = Pu(BD(this.e, 10).b.c.length); + for (b = new olb(BD(this.e, 10).b); b.a < b.c.c.length; ) { + a = BD(mlb(b), 70); + Ekb(this.a, new v$b(a)); + } + } + return this.a; + }; + _.Af = function B$b() { + var a; + a = BD(this.e, 10).d; + return new J_b(a.d, a.c, a.a, a.b); + }; + _.Bf = function C$b() { + return mmb(), mmb(), jmb; + }; + _.Cf = function D$b() { + var a, b; + if (!this.c) { + this.c = Pu(BD(this.e, 10).j.c.length); + for (b = new olb(BD(this.e, 10).j); b.a < b.c.c.length; ) { + a = BD(mlb(b), 11); + Ekb(this.c, new I$b(a, this.d)); + } + } + return this.c; + }; + _.Df = function E$b() { + return Ccb(DD(vNb(BD(this.e, 10), (wtc(), wsc)))); + }; + _.Ef = function F$b(a) { + BD(this.e, 10).d.b = a.b; + BD(this.e, 10).d.d = a.d; + BD(this.e, 10).d.c = a.c; + BD(this.e, 10).d.a = a.a; + }; + _.Ff = function G$b(a) { + BD(this.e, 10).f.b = a.b; + BD(this.e, 10).f.d = a.d; + BD(this.e, 10).f.c = a.c; + BD(this.e, 10).f.a = a.a; + }; + _.Gf = function H$b() { + w$b(this, (a$b(), _Zb)); + }; + _.a = null; + _.b = null; + _.c = null; + _.d = false; + mdb(fne, "LGraphAdapters/LNodeAdapter", 575); + bcb(1722, 657, { 838: 1 }, I$b); + _.zf = function J$b() { + var a, b, c, d; + if (this.d && BD(this.e, 11).i.k == (j0b(), i0b)) { + return mmb(), mmb(), jmb; + } else if (!this.a) { + this.a = new Rkb(); + for (c = new olb(BD(this.e, 11).e); c.a < c.c.c.length; ) { + a = BD(mlb(c), 17); + Ekb(this.a, new j$b(a)); + } + if (this.d) { + d = BD(vNb(BD(this.e, 11), (wtc(), gtc)), 10); + if (d) { + for (b = new Sr(ur(R_b(d).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 17); + Ekb(this.a, new j$b(a)); + } + } + } + } + return this.a; + }; + _.wf = function K$b() { + var a, b; + if (!this.b) { + this.b = Pu(BD(this.e, 11).f.c.length); + for (b = new olb(BD(this.e, 11).f); b.a < b.c.c.length; ) { + a = BD(mlb(b), 70); + Ekb(this.b, new v$b(a)); + } + } + return this.b; + }; + _.Bf = function L$b() { + var a, b, c, d; + if (this.d && BD(this.e, 11).i.k == (j0b(), i0b)) { + return mmb(), mmb(), jmb; + } else if (!this.c) { + this.c = new Rkb(); + for (c = new olb(BD(this.e, 11).g); c.a < c.c.c.length; ) { + a = BD(mlb(c), 17); + Ekb(this.c, new j$b(a)); + } + if (this.d) { + d = BD(vNb(BD(this.e, 11), (wtc(), gtc)), 10); + if (d) { + for (b = new Sr(ur(U_b(d).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 17); + Ekb(this.c, new j$b(a)); + } + } + } + } + return this.c; + }; + _.Hf = function M$b() { + return BD(this.e, 11).j; + }; + _.If = function N$b() { + return Ccb(DD(vNb(BD(this.e, 11), (wtc(), Nsc)))); + }; + _.a = null; + _.b = null; + _.c = null; + _.d = false; + mdb(fne, "LGraphAdapters/LPortAdapter", 1722); + bcb(1723, 1, Dke, P$b); + _.ue = function Q$b(a, b) { + return O$b(BD(a, 11), BD(b, 11)); + }; + _.Fb = function R$b(a) { + return this === a; + }; + _.ve = function S$b() { + return new tpb(this); + }; + mdb(fne, "LGraphAdapters/PortComparator", 1723); + bcb(804, 1, Oie, T$b); + _.Mb = function U$b(a) { + return BD(a, 10), a$b(), true; + }; + mdb(fne, "LGraphAdapters/lambda$0$Type", 804); + bcb(392, 299, { 3: 1, 299: 1, 392: 1, 94: 1, 134: 1 }); + mdb(fne, "LShape", 392); + bcb(70, 392, { 3: 1, 299: 1, 70: 1, 392: 1, 94: 1, 134: 1 }, p_b, q_b); + _.Ib = function r_b() { + var a; + a = o_b(this); + return a == null ? "label" : "l_" + a; + }; + mdb(fne, "LLabel", 70); + bcb(207, 1, { 3: 1, 4: 1, 207: 1, 414: 1 }); + _.Fb = function C_b(a) { + var b; + if (JD(a, 207)) { + b = BD(a, 207); + return this.d == b.d && this.a == b.a && this.b == b.b && this.c == b.c; + } else { + return false; + } + }; + _.Hb = function D_b() { + var a, b; + a = Hdb(this.b) << 16; + a |= Hdb(this.a) & aje; + b = Hdb(this.c) << 16; + b |= Hdb(this.d) & aje; + return a ^ b; + }; + _.Jf = function F_b(b) { + var c, d, e, f, g, h, i, j, k, l, m; + g = 0; + while (g < b.length && E_b((BCb(g, b.length), b.charCodeAt(g)), mne)) { + ++g; + } + c = b.length; + while (c > 0 && E_b((BCb(c - 1, b.length), b.charCodeAt(c - 1)), nne)) { + --c; + } + if (g < c) { + l = mfb(b.substr(g, c - g), ",|;"); + try { + for (i = l, j = 0, k = i.length; j < k; ++j) { + h = i[j]; + f = mfb(h, "="); + if (f.length != 2) { + throw vbb(new Wdb("Expecting a list of key-value pairs.")); + } + e = ufb(f[0]); + m = Hcb(ufb(f[1])); + dfb(e, "top") ? this.d = m : dfb(e, "left") ? this.b = m : dfb(e, "bottom") ? this.a = m : dfb(e, "right") && (this.c = m); + } + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + d = a; + throw vbb(new Wdb(one + d)); + } else + throw vbb(a); + } + } + }; + _.Ib = function G_b() { + return "[top=" + this.d + ",left=" + this.b + ",bottom=" + this.a + ",right=" + this.c + "]"; + }; + _.a = 0; + _.b = 0; + _.c = 0; + _.d = 0; + mdb(pne, "Spacing", 207); + bcb(142, 207, qne, H_b, I_b, J_b, K_b); + var i1 = mdb(pne, "ElkMargin", 142); + bcb(651, 142, qne, L_b); + mdb(fne, "LMargin", 651); + bcb(10, 392, { 3: 1, 299: 1, 10: 1, 392: 1, 94: 1, 134: 1 }, b0b); + _.Ib = function c0b() { + return a0b(this); + }; + _.i = false; + var OQ = mdb(fne, "LNode", 10); + bcb(267, 22, { 3: 1, 35: 1, 22: 1, 267: 1 }, k0b); + var d0b, e0b, f0b, g0b, h0b, i0b; + var NQ = ndb(fne, "LNode/NodeType", 267, CI, m0b, l0b); + var n0b; + bcb(116, 207, rne, p0b, q0b, r0b); + var j1 = mdb(pne, "ElkPadding", 116); + bcb(764, 116, rne, s0b); + mdb(fne, "LPadding", 764); + bcb(11, 392, { 3: 1, 299: 1, 11: 1, 392: 1, 94: 1, 134: 1 }, H0b); + _.Ib = function I0b() { + var a, b, c; + a = new Ufb(); + Qfb((a.a += "p_", a), C0b(this)); + !!this.i && Qfb(Pfb((a.a += "[", a), this.i), "]"); + if (this.e.c.length == 1 && this.g.c.length == 0 && BD(Ikb(this.e, 0), 17).c != this) { + b = BD(Ikb(this.e, 0), 17).c; + Qfb((a.a += " << ", a), C0b(b)); + Qfb(Pfb((a.a += "[", a), b.i), "]"); + } + if (this.e.c.length == 0 && this.g.c.length == 1 && BD(Ikb(this.g, 0), 17).d != this) { + c = BD(Ikb(this.g, 0), 17).d; + Qfb((a.a += " >> ", a), C0b(c)); + Qfb(Pfb((a.a += "[", a), c.i), "]"); + } + return a.a; + }; + _.c = true; + _.d = false; + var t0b, u0b, v0b, w0b, x0b, y0b; + var aR = mdb(fne, "LPort", 11); + bcb(397, 1, vie, J0b); + _.Jc = function K0b(a) { + reb(this, a); + }; + _.Kc = function L0b() { + var a; + a = new olb(this.a.e); + return new M0b(a); + }; + mdb(fne, "LPort/1", 397); + bcb(1290, 1, aie, M0b); + _.Nb = function N0b(a) { + Rrb(this, a); + }; + _.Pb = function P0b() { + return BD(mlb(this.a), 17).c; + }; + _.Ob = function O0b() { + return llb(this.a); + }; + _.Qb = function Q0b() { + nlb(this.a); + }; + mdb(fne, "LPort/1/1", 1290); + bcb(359, 1, vie, R0b); + _.Jc = function S0b(a) { + reb(this, a); + }; + _.Kc = function T0b() { + var a; + return a = new olb(this.a.g), new U0b(a); + }; + mdb(fne, "LPort/2", 359); + bcb(762, 1, aie, U0b); + _.Nb = function V0b(a) { + Rrb(this, a); + }; + _.Pb = function X0b() { + return BD(mlb(this.a), 17).d; + }; + _.Ob = function W0b() { + return llb(this.a); + }; + _.Qb = function Y0b() { + nlb(this.a); + }; + mdb(fne, "LPort/2/1", 762); + bcb(1283, 1, vie, Z0b); + _.Jc = function $0b(a) { + reb(this, a); + }; + _.Kc = function _0b() { + return new b1b(this); + }; + mdb(fne, "LPort/CombineIter", 1283); + bcb(201, 1, aie, b1b); + _.Nb = function c1b(a) { + Rrb(this, a); + }; + _.Qb = function f1b() { + Srb(); + }; + _.Ob = function d1b() { + return a1b(this); + }; + _.Pb = function e1b() { + return llb(this.a) ? mlb(this.a) : mlb(this.b); + }; + mdb(fne, "LPort/CombineIter/1", 201); + bcb(1285, 1, Vke, h1b); + _.Lb = function i1b(a) { + return g1b(a); + }; + _.Fb = function j1b(a) { + return this === a; + }; + _.Mb = function k1b(a) { + return z0b(), BD(a, 11).e.c.length != 0; + }; + mdb(fne, "LPort/lambda$0$Type", 1285); + bcb(1284, 1, Vke, m1b); + _.Lb = function n1b(a) { + return l1b(a); + }; + _.Fb = function o1b(a) { + return this === a; + }; + _.Mb = function p1b(a) { + return z0b(), BD(a, 11).g.c.length != 0; + }; + mdb(fne, "LPort/lambda$1$Type", 1284); + bcb(1286, 1, Vke, q1b); + _.Lb = function r1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Acd); + }; + _.Fb = function s1b(a) { + return this === a; + }; + _.Mb = function t1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Acd); + }; + mdb(fne, "LPort/lambda$2$Type", 1286); + bcb(1287, 1, Vke, u1b); + _.Lb = function v1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), zcd); + }; + _.Fb = function w1b(a) { + return this === a; + }; + _.Mb = function x1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), zcd); + }; + mdb(fne, "LPort/lambda$3$Type", 1287); + bcb(1288, 1, Vke, y1b); + _.Lb = function z1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Rcd); + }; + _.Fb = function A1b(a) { + return this === a; + }; + _.Mb = function B1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Rcd); + }; + mdb(fne, "LPort/lambda$4$Type", 1288); + bcb(1289, 1, Vke, C1b); + _.Lb = function D1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Tcd); + }; + _.Fb = function E1b(a) { + return this === a; + }; + _.Mb = function F1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Tcd); + }; + mdb(fne, "LPort/lambda$5$Type", 1289); + bcb(29, 299, { 3: 1, 20: 1, 299: 1, 29: 1, 94: 1, 134: 1 }, H1b); + _.Jc = function I1b(a) { + reb(this, a); + }; + _.Kc = function J1b() { + return new olb(this.a); + }; + _.Ib = function K1b() { + return "L_" + Jkb(this.b.b, this, 0) + Fe(this.a); + }; + mdb(fne, "Layer", 29); + bcb(1342, 1, {}, a2b); + mdb(tne, une, 1342); + bcb(1346, 1, {}, e2b); + _.Kb = function f2b(a) { + return atd(BD(a, 82)); + }; + mdb(tne, "ElkGraphImporter/0methodref$connectableShapeToNode$Type", 1346); + bcb(1349, 1, {}, g2b); + _.Kb = function h2b(a) { + return atd(BD(a, 82)); + }; + mdb(tne, "ElkGraphImporter/1methodref$connectableShapeToNode$Type", 1349); + bcb(1343, 1, qie, i2b); + _.td = function j2b(a) { + Q1b(this.a, BD(a, 118)); + }; + mdb(tne, vne, 1343); + bcb(1344, 1, qie, k2b); + _.td = function l2b(a) { + Q1b(this.a, BD(a, 118)); + }; + mdb(tne, wne, 1344); + bcb(1345, 1, {}, m2b); + _.Kb = function n2b(a) { + return new YAb(null, new Kub(Old(BD(a, 79)), 16)); + }; + mdb(tne, xne, 1345); + bcb(1347, 1, Oie, o2b); + _.Mb = function p2b(a) { + return b2b(this.a, BD(a, 33)); + }; + mdb(tne, yne, 1347); + bcb(1348, 1, {}, q2b); + _.Kb = function r2b(a) { + return new YAb(null, new Kub(Nld(BD(a, 79)), 16)); + }; + mdb(tne, "ElkGraphImporter/lambda$5$Type", 1348); + bcb(1350, 1, Oie, s2b); + _.Mb = function t2b(a) { + return c2b(this.a, BD(a, 33)); + }; + mdb(tne, "ElkGraphImporter/lambda$7$Type", 1350); + bcb(1351, 1, Oie, u2b); + _.Mb = function v2b(a) { + return d2b(BD(a, 79)); + }; + mdb(tne, "ElkGraphImporter/lambda$8$Type", 1351); + bcb(1278, 1, {}, D2b); + var w2b; + mdb(tne, "ElkGraphLayoutTransferrer", 1278); + bcb(1279, 1, Oie, G2b); + _.Mb = function H2b(a) { + return E2b(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$0$Type", 1279); + bcb(1280, 1, qie, I2b); + _.td = function J2b(a) { + x2b(); + Ekb(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$1$Type", 1280); + bcb(1281, 1, Oie, K2b); + _.Mb = function L2b(a) { + return F2b(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$2$Type", 1281); + bcb(1282, 1, qie, M2b); + _.td = function N2b(a) { + x2b(); + Ekb(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$3$Type", 1282); + bcb(1485, 1, ene, S2b); + _.pf = function T2b(a, b) { + Q2b(BD(a, 37), b); + }; + mdb(Ane, "CommentNodeMarginCalculator", 1485); + bcb(1486, 1, {}, U2b); + _.Kb = function V2b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "CommentNodeMarginCalculator/lambda$0$Type", 1486); + bcb(1487, 1, qie, W2b); + _.td = function X2b(a) { + R2b(BD(a, 10)); + }; + mdb(Ane, "CommentNodeMarginCalculator/lambda$1$Type", 1487); + bcb(1488, 1, ene, _2b); + _.pf = function a3b(a, b) { + Z2b(BD(a, 37), b); + }; + mdb(Ane, "CommentPostprocessor", 1488); + bcb(1489, 1, ene, e3b); + _.pf = function f3b(a, b) { + b3b(BD(a, 37), b); + }; + mdb(Ane, "CommentPreprocessor", 1489); + bcb(1490, 1, ene, h3b); + _.pf = function i3b(a, b) { + g3b(BD(a, 37), b); + }; + mdb(Ane, "ConstraintsPostprocessor", 1490); + bcb(1491, 1, ene, p3b); + _.pf = function q3b(a, b) { + n3b(BD(a, 37), b); + }; + mdb(Ane, "EdgeAndLayerConstraintEdgeReverser", 1491); + bcb(1492, 1, ene, t3b); + _.pf = function v3b(a, b) { + r3b(BD(a, 37), b); + }; + mdb(Ane, "EndLabelPostprocessor", 1492); + bcb(1493, 1, {}, w3b); + _.Kb = function x3b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "EndLabelPostprocessor/lambda$0$Type", 1493); + bcb(1494, 1, Oie, y3b); + _.Mb = function z3b(a) { + return u3b(BD(a, 10)); + }; + mdb(Ane, "EndLabelPostprocessor/lambda$1$Type", 1494); + bcb(1495, 1, qie, A3b); + _.td = function B3b(a) { + s3b(BD(a, 10)); + }; + mdb(Ane, "EndLabelPostprocessor/lambda$2$Type", 1495); + bcb(1496, 1, ene, M3b); + _.pf = function P3b(a, b) { + I3b(BD(a, 37), b); + }; + mdb(Ane, "EndLabelPreprocessor", 1496); + bcb(1497, 1, {}, Q3b); + _.Kb = function R3b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$0$Type", 1497); + bcb(1498, 1, qie, S3b); + _.td = function T3b(a) { + E3b(this.a, this.b, this.c, BD(a, 10)); + }; + _.a = 0; + _.b = 0; + _.c = false; + mdb(Ane, "EndLabelPreprocessor/lambda$1$Type", 1498); + bcb(1499, 1, Oie, U3b); + _.Mb = function V3b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), pad)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$2$Type", 1499); + bcb(1500, 1, qie, W3b); + _.td = function X3b(a) { + Dsb(this.a, BD(a, 70)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$3$Type", 1500); + bcb(1501, 1, Oie, Y3b); + _.Mb = function Z3b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), oad)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$4$Type", 1501); + bcb(1502, 1, qie, $3b); + _.td = function _3b(a) { + Dsb(this.a, BD(a, 70)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$5$Type", 1502); + bcb(1551, 1, ene, i4b); + _.pf = function j4b(a, b) { + f4b(BD(a, 37), b); + }; + var a4b; + mdb(Ane, "EndLabelSorter", 1551); + bcb(1552, 1, Dke, l4b); + _.ue = function m4b(a, b) { + return k4b(BD(a, 456), BD(b, 456)); + }; + _.Fb = function n4b(a) { + return this === a; + }; + _.ve = function o4b() { + return new tpb(this); + }; + mdb(Ane, "EndLabelSorter/1", 1552); + bcb(456, 1, { 456: 1 }, p4b); + mdb(Ane, "EndLabelSorter/LabelGroup", 456); + bcb(1553, 1, {}, q4b); + _.Kb = function r4b(a) { + return b4b(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "EndLabelSorter/lambda$0$Type", 1553); + bcb(1554, 1, Oie, s4b); + _.Mb = function t4b(a) { + return b4b(), BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "EndLabelSorter/lambda$1$Type", 1554); + bcb(1555, 1, qie, u4b); + _.td = function v4b(a) { + g4b(BD(a, 10)); + }; + mdb(Ane, "EndLabelSorter/lambda$2$Type", 1555); + bcb(1556, 1, Oie, w4b); + _.Mb = function x4b(a) { + return b4b(), PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), oad)); + }; + mdb(Ane, "EndLabelSorter/lambda$3$Type", 1556); + bcb(1557, 1, Oie, y4b); + _.Mb = function z4b(a) { + return b4b(), PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), pad)); + }; + mdb(Ane, "EndLabelSorter/lambda$4$Type", 1557); + bcb(1503, 1, ene, L4b); + _.pf = function M4b(a, b) { + J4b(this, BD(a, 37)); + }; + _.b = 0; + _.c = 0; + mdb(Ane, "FinalSplineBendpointsCalculator", 1503); + bcb(1504, 1, {}, N4b); + _.Kb = function O4b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$0$Type", 1504); + bcb(1505, 1, {}, P4b); + _.Kb = function Q4b(a) { + return new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$1$Type", 1505); + bcb(1506, 1, Oie, R4b); + _.Mb = function S4b(a) { + return !OZb(BD(a, 17)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$2$Type", 1506); + bcb(1507, 1, Oie, T4b); + _.Mb = function U4b(a) { + return wNb(BD(a, 17), (wtc(), rtc)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$3$Type", 1507); + bcb(1508, 1, qie, V4b); + _.td = function W4b(a) { + C4b(this.a, BD(a, 128)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$4$Type", 1508); + bcb(1509, 1, qie, X4b); + _.td = function Y4b(a) { + smb(BD(a, 17).a); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$5$Type", 1509); + bcb(792, 1, ene, u5b); + _.pf = function v5b(a, b) { + l5b(this, BD(a, 37), b); + }; + mdb(Ane, "GraphTransformer", 792); + bcb(511, 22, { 3: 1, 35: 1, 22: 1, 511: 1 }, z5b); + var w5b, x5b; + var ZR = ndb(Ane, "GraphTransformer/Mode", 511, CI, B5b, A5b); + var C5b; + bcb(1510, 1, ene, I5b); + _.pf = function J5b(a, b) { + F5b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalNodeResizingProcessor", 1510); + bcb(1511, 1, ene, Q5b); + _.pf = function R5b(a, b) { + M5b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalPortConstraintProcessor", 1511); + bcb(1512, 1, Dke, T5b); + _.ue = function U5b(a, b) { + return S5b(BD(a, 10), BD(b, 10)); + }; + _.Fb = function V5b(a) { + return this === a; + }; + _.ve = function W5b() { + return new tpb(this); + }; + mdb(Ane, "HierarchicalPortConstraintProcessor/NodeComparator", 1512); + bcb(1513, 1, ene, Z5b); + _.pf = function $5b(a, b) { + X5b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalPortDummySizeProcessor", 1513); + bcb(1514, 1, ene, l6b); + _.pf = function m6b(a, b) { + e6b(this, BD(a, 37), b); + }; + _.a = 0; + mdb(Ane, "HierarchicalPortOrthogonalEdgeRouter", 1514); + bcb(1515, 1, Dke, o6b); + _.ue = function p6b(a, b) { + return n6b(BD(a, 10), BD(b, 10)); + }; + _.Fb = function q6b(a) { + return this === a; + }; + _.ve = function r6b() { + return new tpb(this); + }; + mdb(Ane, "HierarchicalPortOrthogonalEdgeRouter/1", 1515); + bcb(1516, 1, Dke, t6b); + _.ue = function u6b(a, b) { + return s6b(BD(a, 10), BD(b, 10)); + }; + _.Fb = function v6b(a) { + return this === a; + }; + _.ve = function w6b() { + return new tpb(this); + }; + mdb(Ane, "HierarchicalPortOrthogonalEdgeRouter/2", 1516); + bcb(1517, 1, ene, z6b); + _.pf = function A6b(a, b) { + y6b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalPortPositionProcessor", 1517); + bcb(1518, 1, ene, J6b); + _.pf = function K6b(a, b) { + I6b(this, BD(a, 37)); + }; + _.a = 0; + _.c = 0; + var B6b, C6b; + mdb(Ane, "HighDegreeNodeLayeringProcessor", 1518); + bcb(571, 1, { 571: 1 }, L6b); + _.b = -1; + _.d = -1; + mdb(Ane, "HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation", 571); + bcb(1519, 1, {}, M6b); + _.Kb = function N6b(a) { + return D6b(), R_b(BD(a, 10)); + }; + _.Fb = function O6b(a) { + return this === a; + }; + mdb(Ane, "HighDegreeNodeLayeringProcessor/lambda$0$Type", 1519); + bcb(1520, 1, {}, P6b); + _.Kb = function Q6b(a) { + return D6b(), U_b(BD(a, 10)); + }; + _.Fb = function R6b(a) { + return this === a; + }; + mdb(Ane, "HighDegreeNodeLayeringProcessor/lambda$1$Type", 1520); + bcb(1526, 1, ene, X6b); + _.pf = function Y6b(a, b) { + W6b(this, BD(a, 37), b); + }; + mdb(Ane, "HyperedgeDummyMerger", 1526); + bcb(793, 1, {}, Z6b); + _.a = false; + _.b = false; + _.c = false; + mdb(Ane, "HyperedgeDummyMerger/MergeState", 793); + bcb(1527, 1, {}, $6b); + _.Kb = function _6b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "HyperedgeDummyMerger/lambda$0$Type", 1527); + bcb(1528, 1, {}, a7b); + _.Kb = function b7b(a) { + return new YAb(null, new Kub(BD(a, 10).j, 16)); + }; + mdb(Ane, "HyperedgeDummyMerger/lambda$1$Type", 1528); + bcb(1529, 1, qie, c7b); + _.td = function d7b(a) { + BD(a, 11).p = -1; + }; + mdb(Ane, "HyperedgeDummyMerger/lambda$2$Type", 1529); + bcb(1530, 1, ene, g7b); + _.pf = function h7b(a, b) { + f7b(BD(a, 37), b); + }; + mdb(Ane, "HypernodesProcessor", 1530); + bcb(1531, 1, ene, j7b); + _.pf = function k7b(a, b) { + i7b(BD(a, 37), b); + }; + mdb(Ane, "InLayerConstraintProcessor", 1531); + bcb(1532, 1, ene, m7b); + _.pf = function n7b(a, b) { + l7b(BD(a, 37), b); + }; + mdb(Ane, "InnermostNodeMarginCalculator", 1532); + bcb(1533, 1, ene, r7b); + _.pf = function w7b(a, b) { + q7b(this, BD(a, 37)); + }; + _.a = Qje; + _.b = Qje; + _.c = Pje; + _.d = Pje; + var zS = mdb(Ane, "InteractiveExternalPortPositioner", 1533); + bcb(1534, 1, {}, x7b); + _.Kb = function y7b(a) { + return BD(a, 17).d.i; + }; + _.Fb = function z7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$0$Type", 1534); + bcb(1535, 1, {}, A7b); + _.Kb = function B7b(a) { + return s7b(this.a, ED(a)); + }; + _.Fb = function C7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$1$Type", 1535); + bcb(1536, 1, {}, D7b); + _.Kb = function E7b(a) { + return BD(a, 17).c.i; + }; + _.Fb = function F7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$2$Type", 1536); + bcb(1537, 1, {}, G7b); + _.Kb = function H7b(a) { + return t7b(this.a, ED(a)); + }; + _.Fb = function I7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$3$Type", 1537); + bcb(1538, 1, {}, J7b); + _.Kb = function K7b(a) { + return u7b(this.a, ED(a)); + }; + _.Fb = function L7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$4$Type", 1538); + bcb(1539, 1, {}, M7b); + _.Kb = function N7b(a) { + return v7b(this.a, ED(a)); + }; + _.Fb = function O7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$5$Type", 1539); + bcb(77, 22, { 3: 1, 35: 1, 22: 1, 77: 1, 234: 1 }, T8b); + _.Kf = function U8b() { + switch (this.g) { + case 15: + return new eoc(); + case 22: + return new Aoc(); + case 47: + return new Joc(); + case 28: + case 35: + return new uac(); + case 32: + return new S2b(); + case 42: + return new _2b(); + case 1: + return new e3b(); + case 41: + return new h3b(); + case 56: + return new u5b((y5b(), x5b)); + case 0: + return new u5b((y5b(), w5b)); + case 2: + return new p3b(); + case 54: + return new t3b(); + case 33: + return new M3b(); + case 51: + return new L4b(); + case 55: + return new I5b(); + case 13: + return new Q5b(); + case 38: + return new Z5b(); + case 44: + return new l6b(); + case 40: + return new z6b(); + case 9: + return new J6b(); + case 49: + return new sgc(); + case 37: + return new X6b(); + case 43: + return new g7b(); + case 27: + return new j7b(); + case 30: + return new m7b(); + case 3: + return new r7b(); + case 18: + return new b9b(); + case 29: + return new h9b(); + case 5: + return new u9b(); + case 50: + return new D9b(); + case 34: + return new $9b(); + case 36: + return new Iac(); + case 52: + return new i4b(); + case 11: + return new Sac(); + case 7: + return new abc(); + case 39: + return new obc(); + case 45: + return new rbc(); + case 16: + return new vbc(); + case 10: + return new Fbc(); + case 48: + return new Xbc(); + case 21: + return new ccc(); + case 23: + return new fGc((rGc(), pGc)); + case 8: + return new lcc(); + case 12: + return new tcc(); + case 4: + return new ycc(); + case 19: + return new Tcc(); + case 17: + return new pdc(); + case 53: + return new sdc(); + case 6: + return new hec(); + case 25: + return new wdc(); + case 46: + return new Ndc(); + case 31: + return new sec(); + case 14: + return new Fec(); + case 26: + return new ppc(); + case 20: + return new Uec(); + case 24: + return new fGc((rGc(), qGc)); + default: + throw vbb(new Wdb(Dne + (this.f != null ? this.f : "" + this.g))); + } + }; + var P7b, Q7b, R7b, S7b, T7b, U7b, V7b, W7b, X7b, Y7b, Z7b, $7b, _7b, a8b, b8b, c8b, d8b, e8b, f8b, g8b, h8b, i8b, j8b, k8b, l8b, m8b, n8b, o8b, p8b, q8b, r8b, s8b, t8b, u8b, v8b, w8b, x8b, y8b, z8b, A8b, B8b, C8b, D8b, E8b, F8b, G8b, H8b, I8b, J8b, K8b, L8b, M8b, N8b, O8b, P8b, Q8b, R8b; + var AS = ndb(Ane, Ene, 77, CI, W8b, V8b); + var X8b; + bcb(1540, 1, ene, b9b); + _.pf = function c9b(a, b) { + _8b(BD(a, 37), b); + }; + mdb(Ane, "InvertedPortProcessor", 1540); + bcb(1541, 1, ene, h9b); + _.pf = function i9b(a, b) { + g9b(BD(a, 37), b); + }; + mdb(Ane, "LabelAndNodeSizeProcessor", 1541); + bcb(1542, 1, Oie, j9b); + _.Mb = function k9b(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "LabelAndNodeSizeProcessor/lambda$0$Type", 1542); + bcb(1543, 1, Oie, l9b); + _.Mb = function m9b(a) { + return BD(a, 10).k == (j0b(), e0b); + }; + mdb(Ane, "LabelAndNodeSizeProcessor/lambda$1$Type", 1543); + bcb(1544, 1, qie, n9b); + _.td = function o9b(a) { + e9b(this.b, this.a, this.c, BD(a, 10)); + }; + _.a = false; + _.c = false; + mdb(Ane, "LabelAndNodeSizeProcessor/lambda$2$Type", 1544); + bcb(1545, 1, ene, u9b); + _.pf = function v9b(a, b) { + s9b(BD(a, 37), b); + }; + var p9b; + mdb(Ane, "LabelDummyInserter", 1545); + bcb(1546, 1, Vke, w9b); + _.Lb = function x9b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), nad)); + }; + _.Fb = function y9b(a) { + return this === a; + }; + _.Mb = function z9b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), nad)); + }; + mdb(Ane, "LabelDummyInserter/1", 1546); + bcb(1547, 1, ene, D9b); + _.pf = function E9b(a, b) { + C9b(BD(a, 37), b); + }; + mdb(Ane, "LabelDummyRemover", 1547); + bcb(1548, 1, Oie, F9b); + _.Mb = function G9b(a) { + return Ccb(DD(vNb(BD(a, 70), (Nyc(), Pwc)))); + }; + mdb(Ane, "LabelDummyRemover/lambda$0$Type", 1548); + bcb(1359, 1, ene, $9b); + _.pf = function cac(a, b) { + W9b(this, BD(a, 37), b); + }; + _.a = null; + var H9b; + mdb(Ane, "LabelDummySwitcher", 1359); + bcb(286, 1, { 286: 1 }, gac); + _.c = 0; + _.d = null; + _.f = 0; + mdb(Ane, "LabelDummySwitcher/LabelDummyInfo", 286); + bcb(1360, 1, {}, hac); + _.Kb = function iac(a) { + return I9b(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "LabelDummySwitcher/lambda$0$Type", 1360); + bcb(1361, 1, Oie, jac); + _.Mb = function kac(a) { + return I9b(), BD(a, 10).k == (j0b(), f0b); + }; + mdb(Ane, "LabelDummySwitcher/lambda$1$Type", 1361); + bcb(1362, 1, {}, lac); + _.Kb = function mac(a) { + return _9b(this.a, BD(a, 10)); + }; + mdb(Ane, "LabelDummySwitcher/lambda$2$Type", 1362); + bcb(1363, 1, qie, nac); + _.td = function oac(a) { + aac(this.a, BD(a, 286)); + }; + mdb(Ane, "LabelDummySwitcher/lambda$3$Type", 1363); + bcb(1364, 1, Dke, pac); + _.ue = function qac(a, b) { + return bac(BD(a, 286), BD(b, 286)); + }; + _.Fb = function rac(a) { + return this === a; + }; + _.ve = function sac() { + return new tpb(this); + }; + mdb(Ane, "LabelDummySwitcher/lambda$4$Type", 1364); + bcb(791, 1, ene, uac); + _.pf = function vac(a, b) { + tac(BD(a, 37), b); + }; + mdb(Ane, "LabelManagementProcessor", 791); + bcb(1549, 1, ene, Iac); + _.pf = function Jac(a, b) { + Cac(BD(a, 37), b); + }; + mdb(Ane, "LabelSideSelector", 1549); + bcb(1550, 1, Oie, Kac); + _.Mb = function Lac(a) { + return Ccb(DD(vNb(BD(a, 70), (Nyc(), Pwc)))); + }; + mdb(Ane, "LabelSideSelector/lambda$0$Type", 1550); + bcb(1558, 1, ene, Sac); + _.pf = function Tac(a, b) { + Oac(BD(a, 37), b); + }; + mdb(Ane, "LayerConstraintPostprocessor", 1558); + bcb(1559, 1, ene, abc); + _.pf = function bbc(a, b) { + $ac(BD(a, 37), b); + }; + var Uac; + mdb(Ane, "LayerConstraintPreprocessor", 1559); + bcb(360, 22, { 3: 1, 35: 1, 22: 1, 360: 1 }, ibc); + var cbc, dbc, ebc, fbc; + var VS = ndb(Ane, "LayerConstraintPreprocessor/HiddenNodeConnections", 360, CI, kbc, jbc); + var lbc; + bcb(1560, 1, ene, obc); + _.pf = function pbc(a, b) { + nbc(BD(a, 37), b); + }; + mdb(Ane, "LayerSizeAndGraphHeightCalculator", 1560); + bcb(1561, 1, ene, rbc); + _.pf = function tbc(a, b) { + qbc(BD(a, 37), b); + }; + mdb(Ane, "LongEdgeJoiner", 1561); + bcb(1562, 1, ene, vbc); + _.pf = function xbc(a, b) { + ubc(BD(a, 37), b); + }; + mdb(Ane, "LongEdgeSplitter", 1562); + bcb(1563, 1, ene, Fbc); + _.pf = function Ibc(a, b) { + Bbc(this, BD(a, 37), b); + }; + _.d = 0; + _.e = 0; + _.i = 0; + _.j = 0; + _.k = 0; + _.n = 0; + mdb(Ane, "NodePromotion", 1563); + bcb(1564, 1, {}, Jbc); + _.Kb = function Kbc(a) { + return BD(a, 46), Bcb(), true; + }; + _.Fb = function Lbc(a) { + return this === a; + }; + mdb(Ane, "NodePromotion/lambda$0$Type", 1564); + bcb(1565, 1, {}, Mbc); + _.Kb = function Nbc(a) { + return Gbc(this.a, BD(a, 46)); + }; + _.Fb = function Obc(a) { + return this === a; + }; + _.a = 0; + mdb(Ane, "NodePromotion/lambda$1$Type", 1565); + bcb(1566, 1, {}, Pbc); + _.Kb = function Qbc(a) { + return Hbc(this.a, BD(a, 46)); + }; + _.Fb = function Rbc(a) { + return this === a; + }; + _.a = 0; + mdb(Ane, "NodePromotion/lambda$2$Type", 1566); + bcb(1567, 1, ene, Xbc); + _.pf = function Ybc(a, b) { + Sbc(BD(a, 37), b); + }; + mdb(Ane, "NorthSouthPortPostprocessor", 1567); + bcb(1568, 1, ene, ccc); + _.pf = function ecc(a, b) { + acc(BD(a, 37), b); + }; + mdb(Ane, "NorthSouthPortPreprocessor", 1568); + bcb(1569, 1, Dke, fcc); + _.ue = function gcc(a, b) { + return dcc(BD(a, 11), BD(b, 11)); + }; + _.Fb = function hcc(a) { + return this === a; + }; + _.ve = function icc() { + return new tpb(this); + }; + mdb(Ane, "NorthSouthPortPreprocessor/lambda$0$Type", 1569); + bcb(1570, 1, ene, lcc); + _.pf = function ncc(a, b) { + kcc(BD(a, 37), b); + }; + mdb(Ane, "PartitionMidprocessor", 1570); + bcb(1571, 1, Oie, occ); + _.Mb = function pcc(a) { + return wNb(BD(a, 10), (Nyc(), Nxc)); + }; + mdb(Ane, "PartitionMidprocessor/lambda$0$Type", 1571); + bcb(1572, 1, qie, qcc); + _.td = function rcc(a) { + mcc(this.a, BD(a, 10)); + }; + mdb(Ane, "PartitionMidprocessor/lambda$1$Type", 1572); + bcb(1573, 1, ene, tcc); + _.pf = function ucc(a, b) { + scc(BD(a, 37), b); + }; + mdb(Ane, "PartitionPostprocessor", 1573); + bcb(1574, 1, ene, ycc); + _.pf = function zcc(a, b) { + wcc(BD(a, 37), b); + }; + mdb(Ane, "PartitionPreprocessor", 1574); + bcb(1575, 1, Oie, Acc); + _.Mb = function Bcc(a) { + return wNb(BD(a, 10), (Nyc(), Nxc)); + }; + mdb(Ane, "PartitionPreprocessor/lambda$0$Type", 1575); + bcb(1576, 1, {}, Ccc); + _.Kb = function Dcc(a) { + return new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Ane, "PartitionPreprocessor/lambda$1$Type", 1576); + bcb(1577, 1, Oie, Ecc); + _.Mb = function Fcc(a) { + return vcc(BD(a, 17)); + }; + mdb(Ane, "PartitionPreprocessor/lambda$2$Type", 1577); + bcb(1578, 1, qie, Gcc); + _.td = function Hcc(a) { + xcc(BD(a, 17)); + }; + mdb(Ane, "PartitionPreprocessor/lambda$3$Type", 1578); + bcb(1579, 1, ene, Tcc); + _.pf = function Xcc(a, b) { + Qcc(BD(a, 37), b); + }; + var Icc, Jcc, Kcc, Lcc, Mcc, Ncc; + mdb(Ane, "PortListSorter", 1579); + bcb(1580, 1, {}, Zcc); + _.Kb = function $cc(a) { + return Occ(), BD(a, 11).e; + }; + mdb(Ane, "PortListSorter/lambda$0$Type", 1580); + bcb(1581, 1, {}, _cc); + _.Kb = function adc(a) { + return Occ(), BD(a, 11).g; + }; + mdb(Ane, "PortListSorter/lambda$1$Type", 1581); + bcb(1582, 1, Dke, bdc); + _.ue = function cdc(a, b) { + return Ucc(BD(a, 11), BD(b, 11)); + }; + _.Fb = function ddc(a) { + return this === a; + }; + _.ve = function edc() { + return new tpb(this); + }; + mdb(Ane, "PortListSorter/lambda$2$Type", 1582); + bcb(1583, 1, Dke, fdc); + _.ue = function gdc(a, b) { + return Vcc(BD(a, 11), BD(b, 11)); + }; + _.Fb = function hdc(a) { + return this === a; + }; + _.ve = function idc() { + return new tpb(this); + }; + mdb(Ane, "PortListSorter/lambda$3$Type", 1583); + bcb(1584, 1, Dke, jdc); + _.ue = function kdc(a, b) { + return Wcc(BD(a, 11), BD(b, 11)); + }; + _.Fb = function ldc(a) { + return this === a; + }; + _.ve = function mdc() { + return new tpb(this); + }; + mdb(Ane, "PortListSorter/lambda$4$Type", 1584); + bcb(1585, 1, ene, pdc); + _.pf = function qdc(a, b) { + ndc(BD(a, 37), b); + }; + mdb(Ane, "PortSideProcessor", 1585); + bcb(1586, 1, ene, sdc); + _.pf = function tdc(a, b) { + rdc(BD(a, 37), b); + }; + mdb(Ane, "ReversedEdgeRestorer", 1586); + bcb(1591, 1, ene, wdc); + _.pf = function xdc(a, b) { + udc(this, BD(a, 37), b); + }; + mdb(Ane, "SelfLoopPortRestorer", 1591); + bcb(1592, 1, {}, ydc); + _.Kb = function zdc(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$0$Type", 1592); + bcb(1593, 1, Oie, Adc); + _.Mb = function Bdc(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$1$Type", 1593); + bcb(1594, 1, Oie, Cdc); + _.Mb = function Ddc(a) { + return wNb(BD(a, 10), (wtc(), ntc)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$2$Type", 1594); + bcb(1595, 1, {}, Edc); + _.Kb = function Fdc(a) { + return BD(vNb(BD(a, 10), (wtc(), ntc)), 403); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$3$Type", 1595); + bcb(1596, 1, qie, Gdc); + _.td = function Hdc(a) { + vdc(this.a, BD(a, 403)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$4$Type", 1596); + bcb(794, 1, qie, Idc); + _.td = function Jdc(a) { + ljc(BD(a, 101)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$5$Type", 794); + bcb(1597, 1, ene, Ndc); + _.pf = function Pdc(a, b) { + Kdc(BD(a, 37), b); + }; + mdb(Ane, "SelfLoopPostProcessor", 1597); + bcb(1598, 1, {}, Qdc); + _.Kb = function Rdc(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$0$Type", 1598); + bcb(1599, 1, Oie, Sdc); + _.Mb = function Tdc(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$1$Type", 1599); + bcb(1600, 1, Oie, Udc); + _.Mb = function Vdc(a) { + return wNb(BD(a, 10), (wtc(), ntc)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$2$Type", 1600); + bcb(1601, 1, qie, Wdc); + _.td = function Xdc(a) { + Ldc(BD(a, 10)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$3$Type", 1601); + bcb(1602, 1, {}, Ydc); + _.Kb = function Zdc(a) { + return new YAb(null, new Kub(BD(a, 101).f, 1)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$4$Type", 1602); + bcb(1603, 1, qie, $dc); + _.td = function _dc(a) { + Mdc(this.a, BD(a, 409)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$5$Type", 1603); + bcb(1604, 1, Oie, aec); + _.Mb = function bec(a) { + return !!BD(a, 101).i; + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$6$Type", 1604); + bcb(1605, 1, qie, cec); + _.td = function dec(a) { + Odc(this.a, BD(a, 101)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$7$Type", 1605); + bcb(1587, 1, ene, hec); + _.pf = function iec(a, b) { + gec(BD(a, 37), b); + }; + mdb(Ane, "SelfLoopPreProcessor", 1587); + bcb(1588, 1, {}, jec); + _.Kb = function kec(a) { + return new YAb(null, new Kub(BD(a, 101).f, 1)); + }; + mdb(Ane, "SelfLoopPreProcessor/lambda$0$Type", 1588); + bcb(1589, 1, {}, lec); + _.Kb = function mec(a) { + return BD(a, 409).a; + }; + mdb(Ane, "SelfLoopPreProcessor/lambda$1$Type", 1589); + bcb(1590, 1, qie, nec); + _.td = function oec(a) { + fec(BD(a, 17)); + }; + mdb(Ane, "SelfLoopPreProcessor/lambda$2$Type", 1590); + bcb(1606, 1, ene, sec); + _.pf = function tec(a, b) { + qec(this, BD(a, 37), b); + }; + mdb(Ane, "SelfLoopRouter", 1606); + bcb(1607, 1, {}, uec); + _.Kb = function vec(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "SelfLoopRouter/lambda$0$Type", 1607); + bcb(1608, 1, Oie, wec); + _.Mb = function xec(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SelfLoopRouter/lambda$1$Type", 1608); + bcb(1609, 1, Oie, yec); + _.Mb = function zec(a) { + return wNb(BD(a, 10), (wtc(), ntc)); + }; + mdb(Ane, "SelfLoopRouter/lambda$2$Type", 1609); + bcb(1610, 1, {}, Aec); + _.Kb = function Bec(a) { + return BD(vNb(BD(a, 10), (wtc(), ntc)), 403); + }; + mdb(Ane, "SelfLoopRouter/lambda$3$Type", 1610); + bcb(1611, 1, qie, Cec); + _.td = function Dec(a) { + pec(this.a, this.b, BD(a, 403)); + }; + mdb(Ane, "SelfLoopRouter/lambda$4$Type", 1611); + bcb(1612, 1, ene, Fec); + _.pf = function Iec(a, b) { + Eec(BD(a, 37), b); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor", 1612); + bcb(1613, 1, Oie, Jec); + _.Mb = function Kec(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$0$Type", 1613); + bcb(1614, 1, Oie, Lec); + _.Mb = function Mec(a) { + return uNb(BD(a, 10))._b((Nyc(), ayc)); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$1$Type", 1614); + bcb(1615, 1, Dke, Nec); + _.ue = function Oec(a, b) { + return Gec(BD(a, 10), BD(b, 10)); + }; + _.Fb = function Pec(a) { + return this === a; + }; + _.ve = function Qec() { + return new tpb(this); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$2$Type", 1615); + bcb(1616, 1, {}, Rec); + _.Ce = function Sec(a, b) { + return Hec(BD(a, 10), BD(b, 10)); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$3$Type", 1616); + bcb(1618, 1, ene, Uec); + _.pf = function Yec(a, b) { + Tec(BD(a, 37), b); + }; + mdb(Ane, "SortByInputModelProcessor", 1618); + bcb(1619, 1, Oie, Zec); + _.Mb = function $ec(a) { + return BD(a, 11).g.c.length != 0; + }; + mdb(Ane, "SortByInputModelProcessor/lambda$0$Type", 1619); + bcb(1620, 1, qie, _ec); + _.td = function afc(a) { + Wec(this.a, BD(a, 11)); + }; + mdb(Ane, "SortByInputModelProcessor/lambda$1$Type", 1620); + bcb(1693, 803, {}, jfc); + _.Me = function kfc(a) { + var b, c, d, e; + this.c = a; + switch (this.a.g) { + case 2: + b = new Rkb(); + MAb(JAb(new YAb(null, new Kub(this.c.a.b, 16)), new lgc()), new ngc(this, b)); + nEb(this, new tfc()); + Hkb(b, new xfc()); + b.c = KC(SI, Uhe, 1, 0, 5, 1); + MAb(JAb(new YAb(null, new Kub(this.c.a.b, 16)), new zfc()), new Bfc(b)); + nEb(this, new Ffc()); + Hkb(b, new Jfc()); + b.c = KC(SI, Uhe, 1, 0, 5, 1); + c = Ntb($zb(OAb(new YAb(null, new Kub(this.c.a.b, 16)), new Lfc(this))), new Nfc()); + MAb(new YAb(null, new Kub(this.c.a.a, 16)), new Rfc(c, b)); + nEb(this, new Vfc()); + Hkb(b, new Zfc()); + b.c = KC(SI, Uhe, 1, 0, 5, 1); + break; + case 3: + d = new Rkb(); + nEb(this, new lfc()); + e = Ntb($zb(OAb(new YAb(null, new Kub(this.c.a.b, 16)), new pfc(this))), new Pfc()); + MAb(JAb(new YAb(null, new Kub(this.c.a.b, 16)), new _fc()), new bgc(e, d)); + nEb(this, new fgc()); + Hkb(d, new jgc()); + d.c = KC(SI, Uhe, 1, 0, 5, 1); + break; + default: + throw vbb(new x2c()); + } + }; + _.b = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation", 1693); + bcb(1694, 1, Vke, lfc); + _.Lb = function mfc(a) { + return JD(BD(a, 57).g, 145); + }; + _.Fb = function nfc(a) { + return this === a; + }; + _.Mb = function ofc(a) { + return JD(BD(a, 57).g, 145); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$0$Type", 1694); + bcb(1695, 1, {}, pfc); + _.Fe = function qfc(a) { + return dfc(this.a, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$1$Type", 1695); + bcb(1703, 1, Pie, rfc); + _.Vd = function sfc() { + cfc(this.a, this.b, -1); + }; + _.b = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$10$Type", 1703); + bcb(1705, 1, Vke, tfc); + _.Lb = function ufc(a) { + return JD(BD(a, 57).g, 145); + }; + _.Fb = function vfc(a) { + return this === a; + }; + _.Mb = function wfc(a) { + return JD(BD(a, 57).g, 145); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$11$Type", 1705); + bcb(1706, 1, qie, xfc); + _.td = function yfc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$12$Type", 1706); + bcb(1707, 1, Oie, zfc); + _.Mb = function Afc(a) { + return JD(BD(a, 57).g, 10); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$13$Type", 1707); + bcb(1709, 1, qie, Bfc); + _.td = function Cfc(a) { + efc(this.a, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$14$Type", 1709); + bcb(1708, 1, Pie, Dfc); + _.Vd = function Efc() { + cfc(this.b, this.a, -1); + }; + _.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$15$Type", 1708); + bcb(1710, 1, Vke, Ffc); + _.Lb = function Gfc(a) { + return JD(BD(a, 57).g, 10); + }; + _.Fb = function Hfc(a) { + return this === a; + }; + _.Mb = function Ifc(a) { + return JD(BD(a, 57).g, 10); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$16$Type", 1710); + bcb(1711, 1, qie, Jfc); + _.td = function Kfc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$17$Type", 1711); + bcb(1712, 1, {}, Lfc); + _.Fe = function Mfc(a) { + return ffc(this.a, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$18$Type", 1712); + bcb(1713, 1, {}, Nfc); + _.De = function Ofc() { + return 0; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$19$Type", 1713); + bcb(1696, 1, {}, Pfc); + _.De = function Qfc() { + return 0; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$2$Type", 1696); + bcb(1715, 1, qie, Rfc); + _.td = function Sfc(a) { + gfc(this.a, this.b, BD(a, 307)); + }; + _.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$20$Type", 1715); + bcb(1714, 1, Pie, Tfc); + _.Vd = function Ufc() { + bfc(this.a, this.b, -1); + }; + _.b = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$21$Type", 1714); + bcb(1716, 1, Vke, Vfc); + _.Lb = function Wfc(a) { + return BD(a, 57), true; + }; + _.Fb = function Xfc(a) { + return this === a; + }; + _.Mb = function Yfc(a) { + return BD(a, 57), true; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$22$Type", 1716); + bcb(1717, 1, qie, Zfc); + _.td = function $fc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$23$Type", 1717); + bcb(1697, 1, Oie, _fc); + _.Mb = function agc(a) { + return JD(BD(a, 57).g, 10); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$3$Type", 1697); + bcb(1699, 1, qie, bgc); + _.td = function cgc(a) { + hfc(this.a, this.b, BD(a, 57)); + }; + _.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$4$Type", 1699); + bcb(1698, 1, Pie, dgc); + _.Vd = function egc() { + cfc(this.b, this.a, -1); + }; + _.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$5$Type", 1698); + bcb(1700, 1, Vke, fgc); + _.Lb = function ggc(a) { + return BD(a, 57), true; + }; + _.Fb = function hgc(a) { + return this === a; + }; + _.Mb = function igc(a) { + return BD(a, 57), true; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$6$Type", 1700); + bcb(1701, 1, qie, jgc); + _.td = function kgc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$7$Type", 1701); + bcb(1702, 1, Oie, lgc); + _.Mb = function mgc(a) { + return JD(BD(a, 57).g, 145); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$8$Type", 1702); + bcb(1704, 1, qie, ngc); + _.td = function ogc(a) { + ifc(this.a, this.b, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$9$Type", 1704); + bcb(1521, 1, ene, sgc); + _.pf = function xgc(a, b) { + rgc(this, BD(a, 37), b); + }; + var pgc; + mdb(Jne, "HorizontalGraphCompactor", 1521); + bcb(1522, 1, {}, ygc); + _.Oe = function zgc(a, b) { + var c, d, e; + if (vgc(a, b)) { + return 0; + } + c = tgc(a); + d = tgc(b); + if (!!c && c.k == (j0b(), e0b) || !!d && d.k == (j0b(), e0b)) { + return 0; + } + e = BD(vNb(this.a.a, (wtc(), otc)), 304); + return fBc(e, c ? c.k : (j0b(), g0b), d ? d.k : (j0b(), g0b)); + }; + _.Pe = function Agc(a, b) { + var c, d, e; + if (vgc(a, b)) { + return 1; + } + c = tgc(a); + d = tgc(b); + e = BD(vNb(this.a.a, (wtc(), otc)), 304); + return iBc(e, c ? c.k : (j0b(), g0b), d ? d.k : (j0b(), g0b)); + }; + mdb(Jne, "HorizontalGraphCompactor/1", 1522); + bcb(1523, 1, {}, Bgc); + _.Ne = function Cgc(a, b) { + return qgc(), a.a.i == 0; + }; + mdb(Jne, "HorizontalGraphCompactor/lambda$0$Type", 1523); + bcb(1524, 1, {}, Dgc); + _.Ne = function Egc(a, b) { + return wgc(this.a, a, b); + }; + mdb(Jne, "HorizontalGraphCompactor/lambda$1$Type", 1524); + bcb(1664, 1, {}, Ygc); + var Fgc, Ggc; + mdb(Jne, "LGraphToCGraphTransformer", 1664); + bcb(1672, 1, Oie, ehc); + _.Mb = function fhc(a) { + return a != null; + }; + mdb(Jne, "LGraphToCGraphTransformer/0methodref$nonNull$Type", 1672); + bcb(1665, 1, {}, ghc); + _.Kb = function hhc(a) { + return Hgc(), fcb(vNb(BD(BD(a, 57).g, 10), (wtc(), $sc))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$0$Type", 1665); + bcb(1666, 1, {}, ihc); + _.Kb = function jhc(a) { + return Hgc(), gic(BD(BD(a, 57).g, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$1$Type", 1666); + bcb(1675, 1, Oie, khc); + _.Mb = function lhc(a) { + return Hgc(), JD(BD(a, 57).g, 10); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$10$Type", 1675); + bcb(1676, 1, qie, mhc); + _.td = function nhc(a) { + Zgc(BD(a, 57)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$11$Type", 1676); + bcb(1677, 1, Oie, ohc); + _.Mb = function phc(a) { + return Hgc(), JD(BD(a, 57).g, 145); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$12$Type", 1677); + bcb(1681, 1, qie, qhc); + _.td = function rhc(a) { + $gc(BD(a, 57)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$13$Type", 1681); + bcb(1678, 1, qie, shc); + _.td = function thc(a) { + _gc(this.a, BD(a, 8)); + }; + _.a = 0; + mdb(Jne, "LGraphToCGraphTransformer/lambda$14$Type", 1678); + bcb(1679, 1, qie, uhc); + _.td = function vhc(a) { + ahc(this.a, BD(a, 110)); + }; + _.a = 0; + mdb(Jne, "LGraphToCGraphTransformer/lambda$15$Type", 1679); + bcb(1680, 1, qie, whc); + _.td = function xhc(a) { + bhc(this.a, BD(a, 8)); + }; + _.a = 0; + mdb(Jne, "LGraphToCGraphTransformer/lambda$16$Type", 1680); + bcb(1682, 1, {}, yhc); + _.Kb = function zhc(a) { + return Hgc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$17$Type", 1682); + bcb(1683, 1, Oie, Ahc); + _.Mb = function Bhc(a) { + return Hgc(), OZb(BD(a, 17)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$18$Type", 1683); + bcb(1684, 1, qie, Chc); + _.td = function Dhc(a) { + Qgc(this.a, BD(a, 17)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$19$Type", 1684); + bcb(1668, 1, qie, Ehc); + _.td = function Fhc(a) { + Rgc(this.a, BD(a, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$2$Type", 1668); + bcb(1685, 1, {}, Ghc); + _.Kb = function Hhc(a) { + return Hgc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$20$Type", 1685); + bcb(1686, 1, {}, Ihc); + _.Kb = function Jhc(a) { + return Hgc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$21$Type", 1686); + bcb(1687, 1, {}, Khc); + _.Kb = function Lhc(a) { + return Hgc(), BD(vNb(BD(a, 17), (wtc(), rtc)), 15); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$22$Type", 1687); + bcb(1688, 1, Oie, Mhc); + _.Mb = function Nhc(a) { + return chc(BD(a, 15)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$23$Type", 1688); + bcb(1689, 1, qie, Ohc); + _.td = function Phc(a) { + Jgc(this.a, BD(a, 15)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$24$Type", 1689); + bcb(1667, 1, qie, Qhc); + _.td = function Rhc(a) { + Sgc(this.a, this.b, BD(a, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$3$Type", 1667); + bcb(1669, 1, {}, Shc); + _.Kb = function Thc(a) { + return Hgc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$4$Type", 1669); + bcb(1670, 1, {}, Uhc); + _.Kb = function Vhc(a) { + return Hgc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$5$Type", 1670); + bcb(1671, 1, {}, Whc); + _.Kb = function Xhc(a) { + return Hgc(), BD(vNb(BD(a, 17), (wtc(), rtc)), 15); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$6$Type", 1671); + bcb(1673, 1, qie, Yhc); + _.td = function Zhc(a) { + dhc(this.a, BD(a, 15)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$8$Type", 1673); + bcb(1674, 1, qie, $hc); + _.td = function _hc(a) { + Tgc(this.a, this.b, BD(a, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$9$Type", 1674); + bcb(1663, 1, {}, dic); + _.Le = function eic(a) { + var b, c, d, e, f; + this.a = a; + this.d = new KFb(); + this.c = KC(jN, Uhe, 121, this.a.a.a.c.length, 0, 1); + this.b = 0; + for (c = new olb(this.a.a.a); c.a < c.c.c.length; ) { + b = BD(mlb(c), 307); + b.d = this.b; + f = nGb(oGb(new pGb(), b), this.d); + this.c[this.b] = f; + ++this.b; + } + cic(this); + bic(this); + aic(this); + uGb(LGb(this.d), new Zdd()); + for (e = new olb(this.a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + d.d.c = this.c[d.a.d].e + d.b.a; + } + }; + _.b = 0; + mdb(Jne, "NetworkSimplexCompaction", 1663); + bcb(145, 1, { 35: 1, 145: 1 }, hic); + _.wd = function iic(a) { + return fic(this, BD(a, 145)); + }; + _.Ib = function jic() { + return gic(this); + }; + mdb(Jne, "VerticalSegment", 145); + bcb(827, 1, {}, sic); + _.c = 0; + _.e = 0; + _.i = 0; + mdb(Kne, "BetweenLayerEdgeTwoNodeCrossingsCounter", 827); + bcb(663, 1, { 663: 1 }, zic); + _.Ib = function Aic() { + return "AdjacencyList [node=" + this.d + ", adjacencies= " + this.a + "]"; + }; + _.b = 0; + _.c = 0; + _.f = 0; + mdb(Kne, "BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList", 663); + bcb(287, 1, { 35: 1, 287: 1 }, Dic); + _.wd = function Eic(a) { + return Bic(this, BD(a, 287)); + }; + _.Ib = function Fic() { + return "Adjacency [position=" + this.c + ", cardinality=" + this.a + ", currentCardinality=" + this.b + "]"; + }; + _.a = 0; + _.b = 0; + _.c = 0; + mdb(Kne, "BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency", 287); + bcb(1929, 1, {}, Iic); + _.b = 0; + _.e = false; + mdb(Kne, "CrossingMatrixFiller", 1929); + var qY = odb(Lne, "IInitializable"); + bcb(1804, 1, Mne, Oic); + _.Nf = function Ric(a, b, c, d, e, f) { + }; + _.Pf = function Tic(a, b, c) { + }; + _.Lf = function Pic() { + return this.c != (rGc(), pGc); + }; + _.Mf = function Qic() { + this.e = KC(WD, oje, 25, this.d, 15, 1); + }; + _.Of = function Sic(a, b) { + b[a][0].c.p = a; + }; + _.Qf = function Uic(a, b, c, d) { + ++this.d; + }; + _.Rf = function Vic() { + return true; + }; + _.Sf = function Wic(a, b, c, d) { + Kic(this, a, b, c); + return Jic(this, b); + }; + _.Tf = function Xic(a, b) { + var c; + c = Lic(b, a.length); + Kic(this, a, c, b); + return Mic(this, c); + }; + _.d = 0; + mdb(Kne, "GreedySwitchHeuristic", 1804); + bcb(1930, 1, {}, ejc); + _.b = 0; + _.d = 0; + mdb(Kne, "NorthSouthEdgeNeighbouringNodeCrossingsCounter", 1930); + bcb(1917, 1, {}, jjc); + _.a = false; + mdb(Kne, "SwitchDecider", 1917); + bcb(101, 1, { 101: 1 }, pjc); + _.a = null; + _.c = null; + _.i = null; + mdb(Nne, "SelfHyperLoop", 101); + bcb(1916, 1, {}, vjc); + _.c = 0; + _.e = 0; + mdb(Nne, "SelfHyperLoopLabels", 1916); + bcb(411, 22, { 3: 1, 35: 1, 22: 1, 411: 1 }, Bjc); + var wjc, xjc, yjc, zjc; + var mV = ndb(Nne, "SelfHyperLoopLabels/Alignment", 411, CI, Djc, Cjc); + var Ejc; + bcb(409, 1, { 409: 1 }, Gjc); + mdb(Nne, "SelfLoopEdge", 409); + bcb(403, 1, { 403: 1 }, Kjc); + _.a = false; + mdb(Nne, "SelfLoopHolder", 403); + bcb(1724, 1, Oie, Mjc); + _.Mb = function Njc(a) { + return OZb(BD(a, 17)); + }; + mdb(Nne, "SelfLoopHolder/lambda$0$Type", 1724); + bcb(113, 1, { 113: 1 }, Pjc); + _.a = false; + _.c = false; + mdb(Nne, "SelfLoopPort", 113); + bcb(1792, 1, Oie, Qjc); + _.Mb = function Rjc(a) { + return OZb(BD(a, 17)); + }; + mdb(Nne, "SelfLoopPort/lambda$0$Type", 1792); + bcb(363, 22, { 3: 1, 35: 1, 22: 1, 363: 1 }, Yjc); + var Sjc, Tjc, Ujc, Vjc, Wjc; + var uV = ndb(Nne, "SelfLoopType", 363, CI, _jc, $jc); + var akc; + bcb(1732, 1, {}, xkc); + var ckc, dkc, ekc, fkc; + mdb(One, "PortRestorer", 1732); + bcb(361, 22, { 3: 1, 35: 1, 22: 1, 361: 1 }, Gkc); + var Ckc, Dkc, Ekc; + var vV = ndb(One, "PortRestorer/PortSideArea", 361, CI, Ikc, Hkc); + var Jkc; + bcb(1733, 1, {}, Lkc); + _.Kb = function Mkc(a) { + return gkc(), BD(a, 15).Oc(); + }; + mdb(One, "PortRestorer/lambda$0$Type", 1733); + bcb(1734, 1, qie, Nkc); + _.td = function Okc(a) { + gkc(); + BD(a, 113).c = false; + }; + mdb(One, "PortRestorer/lambda$1$Type", 1734); + bcb(1743, 1, Oie, Pkc); + _.Mb = function Qkc(a) { + return gkc(), BD(a, 11).j == (Ucd(), Tcd); + }; + mdb(One, "PortRestorer/lambda$10$Type", 1743); + bcb(1744, 1, {}, Rkc); + _.Kb = function Skc(a) { + return gkc(), BD(a, 113).d; + }; + mdb(One, "PortRestorer/lambda$11$Type", 1744); + bcb(1745, 1, qie, Tkc); + _.td = function Ukc(a) { + ykc(this.a, BD(a, 11)); + }; + mdb(One, "PortRestorer/lambda$12$Type", 1745); + bcb(1735, 1, qie, Vkc); + _.td = function Wkc(a) { + zkc(this.a, BD(a, 101)); + }; + mdb(One, "PortRestorer/lambda$2$Type", 1735); + bcb(1736, 1, Dke, Xkc); + _.ue = function Ykc(a, b) { + return Akc(BD(a, 113), BD(b, 113)); + }; + _.Fb = function Zkc(a) { + return this === a; + }; + _.ve = function $kc() { + return new tpb(this); + }; + mdb(One, "PortRestorer/lambda$3$Type", 1736); + bcb(1737, 1, Oie, _kc); + _.Mb = function alc(a) { + return gkc(), BD(a, 113).c; + }; + mdb(One, "PortRestorer/lambda$4$Type", 1737); + bcb(1738, 1, Oie, blc); + _.Mb = function clc(a) { + return nkc(BD(a, 11)); + }; + mdb(One, "PortRestorer/lambda$5$Type", 1738); + bcb(1739, 1, Oie, dlc); + _.Mb = function elc(a) { + return gkc(), BD(a, 11).j == (Ucd(), Acd); + }; + mdb(One, "PortRestorer/lambda$6$Type", 1739); + bcb(1740, 1, Oie, flc); + _.Mb = function glc(a) { + return gkc(), BD(a, 11).j == (Ucd(), zcd); + }; + mdb(One, "PortRestorer/lambda$7$Type", 1740); + bcb(1741, 1, Oie, hlc); + _.Mb = function ilc(a) { + return okc(BD(a, 11)); + }; + mdb(One, "PortRestorer/lambda$8$Type", 1741); + bcb(1742, 1, Oie, jlc); + _.Mb = function klc(a) { + return gkc(), BD(a, 11).j == (Ucd(), Rcd); + }; + mdb(One, "PortRestorer/lambda$9$Type", 1742); + bcb(270, 22, { 3: 1, 35: 1, 22: 1, 270: 1 }, Blc); + var slc, tlc, ulc, vlc, wlc, xlc, ylc, zlc; + var KV = ndb(One, "PortSideAssigner/Target", 270, CI, Dlc, Clc); + var Elc; + bcb(1725, 1, {}, Glc); + _.Kb = function Hlc(a) { + return JAb(new YAb(null, new Kub(BD(a, 101).j, 16)), new Ylc()); + }; + mdb(One, "PortSideAssigner/lambda$1$Type", 1725); + bcb(1726, 1, {}, Ilc); + _.Kb = function Jlc(a) { + return BD(a, 113).d; + }; + mdb(One, "PortSideAssigner/lambda$2$Type", 1726); + bcb(1727, 1, qie, Klc); + _.td = function Llc(a) { + G0b(BD(a, 11), (Ucd(), Acd)); + }; + mdb(One, "PortSideAssigner/lambda$3$Type", 1727); + bcb(1728, 1, {}, Mlc); + _.Kb = function Nlc(a) { + return BD(a, 113).d; + }; + mdb(One, "PortSideAssigner/lambda$4$Type", 1728); + bcb(1729, 1, qie, Olc); + _.td = function Plc(a) { + plc(this.a, BD(a, 11)); + }; + mdb(One, "PortSideAssigner/lambda$5$Type", 1729); + bcb(1730, 1, Dke, Qlc); + _.ue = function Rlc(a, b) { + return qlc(BD(a, 101), BD(b, 101)); + }; + _.Fb = function Slc(a) { + return this === a; + }; + _.ve = function Tlc() { + return new tpb(this); + }; + mdb(One, "PortSideAssigner/lambda$6$Type", 1730); + bcb(1731, 1, Dke, Ulc); + _.ue = function Vlc(a, b) { + return rlc(BD(a, 113), BD(b, 113)); + }; + _.Fb = function Wlc(a) { + return this === a; + }; + _.ve = function Xlc() { + return new tpb(this); + }; + mdb(One, "PortSideAssigner/lambda$7$Type", 1731); + bcb(805, 1, Oie, Ylc); + _.Mb = function Zlc(a) { + return BD(a, 113).c; + }; + mdb(One, "PortSideAssigner/lambda$8$Type", 805); + bcb(2009, 1, {}); + mdb(Pne, "AbstractSelfLoopRouter", 2009); + bcb(1750, 1, Dke, gmc); + _.ue = function hmc(a, b) { + return emc(BD(a, 101), BD(b, 101)); + }; + _.Fb = function imc(a) { + return this === a; + }; + _.ve = function jmc() { + return new tpb(this); + }; + mdb(Pne, rle, 1750); + bcb(1751, 1, Dke, kmc); + _.ue = function lmc(a, b) { + return fmc(BD(a, 101), BD(b, 101)); + }; + _.Fb = function mmc(a) { + return this === a; + }; + _.ve = function nmc() { + return new tpb(this); + }; + mdb(Pne, sle, 1751); + bcb(1793, 2009, {}, zmc); + _.Uf = function Amc(a, b, c) { + return c; + }; + mdb(Pne, "OrthogonalSelfLoopRouter", 1793); + bcb(1795, 1, qie, Bmc); + _.td = function Cmc(a) { + ymc(this.b, this.a, BD(a, 8)); + }; + mdb(Pne, "OrthogonalSelfLoopRouter/lambda$0$Type", 1795); + bcb(1794, 1793, {}, Fmc); + _.Uf = function Gmc(a, b, c) { + var d, e; + d = a.c.d; + St(c, 0, P6c(R6c(d.n), d.a)); + e = a.d.d; + Dsb(c, P6c(R6c(e.n), e.a)); + return Dmc(c); + }; + mdb(Pne, "PolylineSelfLoopRouter", 1794); + bcb(1746, 1, {}, Umc); + _.a = null; + var Hmc; + mdb(Pne, "RoutingDirector", 1746); + bcb(1747, 1, Dke, Wmc); + _.ue = function Xmc(a, b) { + return Vmc(BD(a, 113), BD(b, 113)); + }; + _.Fb = function Ymc(a) { + return this === a; + }; + _.ve = function Zmc() { + return new tpb(this); + }; + mdb(Pne, "RoutingDirector/lambda$0$Type", 1747); + bcb(1748, 1, {}, $mc); + _.Kb = function _mc(a) { + return Imc(), BD(a, 101).j; + }; + mdb(Pne, "RoutingDirector/lambda$1$Type", 1748); + bcb(1749, 1, qie, anc); + _.td = function bnc(a) { + Imc(); + BD(a, 15).ad(Hmc); + }; + mdb(Pne, "RoutingDirector/lambda$2$Type", 1749); + bcb(1752, 1, {}, mnc); + mdb(Pne, "RoutingSlotAssigner", 1752); + bcb(1753, 1, Oie, pnc); + _.Mb = function qnc(a) { + return nnc(this.a, BD(a, 101)); + }; + mdb(Pne, "RoutingSlotAssigner/lambda$0$Type", 1753); + bcb(1754, 1, Dke, rnc); + _.ue = function snc(a, b) { + return onc(this.a, BD(a, 101), BD(b, 101)); + }; + _.Fb = function tnc(a) { + return this === a; + }; + _.ve = function unc() { + return new tpb(this); + }; + mdb(Pne, "RoutingSlotAssigner/lambda$1$Type", 1754); + bcb(1796, 1793, {}, wnc); + _.Uf = function xnc(a, b, c) { + var d, e, f, g; + d = Edb(ED(c_b(a.b.g.b, (Nyc(), nyc)))); + g = new u7c(OC(GC(m1, 1), nie, 8, 0, [(f = a.c.d, P6c(new g7c(f.n), f.a))])); + vnc(a, b, c, g, d); + Dsb(g, (e = a.d.d, P6c(new g7c(e.n), e.a))); + return UPc(new YPc(g)); + }; + mdb(Pne, "SplineSelfLoopRouter", 1796); + bcb(578, 1, Dke, Bnc, Dnc); + _.ue = function Enc(a, b) { + return ync(this, BD(a, 10), BD(b, 10)); + }; + _.Fb = function Fnc(a) { + return this === a; + }; + _.ve = function Gnc() { + return new tpb(this); + }; + mdb(Qne, "ModelOrderNodeComparator", 578); + bcb(1755, 1, Oie, Hnc); + _.Mb = function Inc(a) { + return BD(a, 11).e.c.length != 0; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$0$Type", 1755); + bcb(1756, 1, {}, Jnc); + _.Kb = function Knc(a) { + return BD(Ikb(BD(a, 11).e, 0), 17).c; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$1$Type", 1756); + bcb(1757, 1, Oie, Lnc); + _.Mb = function Mnc(a) { + return BD(a, 11).e.c.length != 0; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$2$Type", 1757); + bcb(1758, 1, {}, Nnc); + _.Kb = function Onc(a) { + return BD(Ikb(BD(a, 11).e, 0), 17).c; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$3$Type", 1758); + bcb(1759, 1, Oie, Pnc); + _.Mb = function Qnc(a) { + return BD(a, 11).e.c.length != 0; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$4$Type", 1759); + bcb(806, 1, Dke, Tnc, Unc); + _.ue = function Vnc(a, b) { + return Rnc(this, a, b); + }; + _.Fb = function Wnc(a) { + return this === a; + }; + _.ve = function Xnc() { + return new tpb(this); + }; + mdb(Qne, "ModelOrderPortComparator", 806); + bcb(801, 1, {}, Ync); + _.Vf = function $nc(a, b) { + var c, d, e, f; + e = Znc(b); + c = new Rkb(); + f = b.f / e; + for (d = 1; d < e; ++d) { + Ekb(c, meb(Tbb(Cbb($wnd.Math.round(d * f))))); + } + return c; + }; + _.Wf = function _nc() { + return false; + }; + mdb(Rne, "ARDCutIndexHeuristic", 801); + bcb(1479, 1, ene, eoc); + _.pf = function foc(a, b) { + doc(BD(a, 37), b); + }; + mdb(Rne, "BreakingPointInserter", 1479); + bcb(305, 1, { 305: 1 }, goc); + _.Ib = function joc() { + var a; + a = new Ufb(); + a.a += "BPInfo["; + a.a += "\n start="; + Pfb(a, this.i); + a.a += "\n end="; + Pfb(a, this.a); + a.a += "\n nodeStartEdge="; + Pfb(a, this.e); + a.a += "\n startEndEdge="; + Pfb(a, this.j); + a.a += "\n originalEdge="; + Pfb(a, this.f); + a.a += "\n startInLayerDummy="; + Pfb(a, this.k); + a.a += "\n startInLayerEdge="; + Pfb(a, this.n); + a.a += "\n endInLayerDummy="; + Pfb(a, this.b); + a.a += "\n endInLayerEdge="; + Pfb(a, this.c); + return a.a; + }; + mdb(Rne, "BreakingPointInserter/BPInfo", 305); + bcb(652, 1, { 652: 1 }, qoc); + _.a = false; + _.b = 0; + _.c = 0; + mdb(Rne, "BreakingPointInserter/Cut", 652); + bcb(1480, 1, ene, Aoc); + _.pf = function Boc(a, b) { + yoc(BD(a, 37), b); + }; + mdb(Rne, "BreakingPointProcessor", 1480); + bcb(1481, 1, Oie, Coc); + _.Mb = function Doc(a) { + return hoc(BD(a, 10)); + }; + mdb(Rne, "BreakingPointProcessor/0methodref$isEnd$Type", 1481); + bcb(1482, 1, Oie, Eoc); + _.Mb = function Foc(a) { + return ioc(BD(a, 10)); + }; + mdb(Rne, "BreakingPointProcessor/1methodref$isStart$Type", 1482); + bcb(1483, 1, ene, Joc); + _.pf = function Koc(a, b) { + Hoc(this, BD(a, 37), b); + }; + mdb(Rne, "BreakingPointRemover", 1483); + bcb(1484, 1, qie, Loc); + _.td = function Moc(a) { + BD(a, 128).k = true; + }; + mdb(Rne, "BreakingPointRemover/lambda$0$Type", 1484); + bcb(797, 1, {}, Xoc); + _.b = 0; + _.e = 0; + _.f = 0; + _.j = 0; + mdb(Rne, "GraphStats", 797); + bcb(798, 1, {}, Zoc); + _.Ce = function $oc(a, b) { + return $wnd.Math.max(Edb(ED(a)), Edb(ED(b))); + }; + mdb(Rne, "GraphStats/0methodref$max$Type", 798); + bcb(799, 1, {}, _oc); + _.Ce = function apc(a, b) { + return $wnd.Math.max(Edb(ED(a)), Edb(ED(b))); + }; + mdb(Rne, "GraphStats/2methodref$max$Type", 799); + bcb(1660, 1, {}, bpc); + _.Ce = function cpc(a, b) { + return Yoc(ED(a), ED(b)); + }; + mdb(Rne, "GraphStats/lambda$1$Type", 1660); + bcb(1661, 1, {}, dpc); + _.Kb = function epc(a) { + return Roc(this.a, BD(a, 29)); + }; + mdb(Rne, "GraphStats/lambda$2$Type", 1661); + bcb(1662, 1, {}, fpc); + _.Kb = function gpc(a) { + return Qoc(this.a, BD(a, 29)); + }; + mdb(Rne, "GraphStats/lambda$6$Type", 1662); + bcb(800, 1, {}, hpc); + _.Vf = function ipc(a, b) { + var c; + c = BD(vNb(a, (Nyc(), Eyc)), 15); + return c ? c : (mmb(), mmb(), jmb); + }; + _.Wf = function jpc() { + return false; + }; + mdb(Rne, "ICutIndexCalculator/ManualCutIndexCalculator", 800); + bcb(802, 1, {}, kpc); + _.Vf = function lpc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u; + u = (b.n == null && Uoc(b), b.n); + i = (b.d == null && Uoc(b), b.d); + t = KC(UD, Vje, 25, u.length, 15, 1); + t[0] = u[0]; + r = u[0]; + for (j = 1; j < u.length; j++) { + t[j] = t[j - 1] + u[j]; + r += u[j]; + } + e = Znc(b) - 1; + g = BD(vNb(a, (Nyc(), Fyc)), 19).a; + d = Qje; + c = new Rkb(); + for (m = $wnd.Math.max(0, e - g); m <= $wnd.Math.min(b.f - 1, e + g); m++) { + p = r / (m + 1); + q = 0; + k = 1; + f = new Rkb(); + s = Qje; + l = 0; + h = 0; + o2 = i[0]; + if (m == 0) { + s = r; + h = (b.g == null && (b.g = Poc(b, new _oc())), Edb(b.g)); + } else { + while (k < b.f) { + if (t[k - 1] - q >= p) { + Ekb(f, meb(k)); + s = $wnd.Math.max(s, t[k - 1] - l); + h += o2; + q += t[k - 1] - q; + l = t[k - 1]; + o2 = i[k]; + } + o2 = $wnd.Math.max(o2, i[k]); + ++k; + } + h += o2; + } + n = $wnd.Math.min(1 / s, 1 / b.b / h); + if (n > d) { + d = n; + c = f; + } + } + return c; + }; + _.Wf = function mpc() { + return false; + }; + mdb(Rne, "MSDCutIndexHeuristic", 802); + bcb(1617, 1, ene, ppc); + _.pf = function qpc(a, b) { + opc(BD(a, 37), b); + }; + mdb(Rne, "SingleEdgeGraphWrapper", 1617); + bcb(227, 22, { 3: 1, 35: 1, 22: 1, 227: 1 }, Bpc); + var upc, vpc, wpc, xpc, ypc, zpc; + var EW = ndb(Sne, "CenterEdgeLabelPlacementStrategy", 227, CI, Dpc, Cpc); + var Epc; + bcb(422, 22, { 3: 1, 35: 1, 22: 1, 422: 1 }, Jpc); + var Gpc, Hpc; + var FW = ndb(Sne, "ConstraintCalculationStrategy", 422, CI, Lpc, Kpc); + var Mpc; + bcb(314, 22, { 3: 1, 35: 1, 22: 1, 314: 1, 246: 1, 234: 1 }, Tpc); + _.Kf = function Vpc() { + return Spc(this); + }; + _.Xf = function Upc() { + return Spc(this); + }; + var Opc, Ppc, Qpc; + var GW = ndb(Sne, "CrossingMinimizationStrategy", 314, CI, Xpc, Wpc); + var Ypc; + bcb(337, 22, { 3: 1, 35: 1, 22: 1, 337: 1 }, cqc); + var $pc, _pc, aqc; + var HW = ndb(Sne, "CuttingStrategy", 337, CI, eqc, dqc); + var fqc; + bcb(335, 22, { 3: 1, 35: 1, 22: 1, 335: 1, 246: 1, 234: 1 }, oqc); + _.Kf = function qqc() { + return nqc(this); + }; + _.Xf = function pqc() { + return nqc(this); + }; + var hqc, iqc, jqc, kqc, lqc; + var IW = ndb(Sne, "CycleBreakingStrategy", 335, CI, sqc, rqc); + var tqc; + bcb(419, 22, { 3: 1, 35: 1, 22: 1, 419: 1 }, yqc); + var vqc, wqc; + var JW = ndb(Sne, "DirectionCongruency", 419, CI, Aqc, zqc); + var Bqc; + bcb(450, 22, { 3: 1, 35: 1, 22: 1, 450: 1 }, Hqc); + var Dqc, Eqc, Fqc; + var KW = ndb(Sne, "EdgeConstraint", 450, CI, Jqc, Iqc); + var Kqc; + bcb(276, 22, { 3: 1, 35: 1, 22: 1, 276: 1 }, Uqc); + var Mqc, Nqc, Oqc, Pqc, Qqc, Rqc; + var LW = ndb(Sne, "EdgeLabelSideSelection", 276, CI, Wqc, Vqc); + var Xqc; + bcb(479, 22, { 3: 1, 35: 1, 22: 1, 479: 1 }, arc); + var Zqc, $qc; + var MW = ndb(Sne, "EdgeStraighteningStrategy", 479, CI, crc, brc); + var drc; + bcb(274, 22, { 3: 1, 35: 1, 22: 1, 274: 1 }, mrc); + var frc, grc, hrc, irc, jrc, krc; + var NW = ndb(Sne, "FixedAlignment", 274, CI, orc, nrc); + var prc; + bcb(275, 22, { 3: 1, 35: 1, 22: 1, 275: 1 }, zrc); + var rrc, trc, urc, vrc, wrc, xrc; + var OW = ndb(Sne, "GraphCompactionStrategy", 275, CI, Brc, Arc); + var Crc; + bcb(256, 22, { 3: 1, 35: 1, 22: 1, 256: 1 }, Prc); + var Erc, Frc, Grc, Hrc, Irc, Jrc, Krc, Lrc, Mrc, Nrc; + var PW = ndb(Sne, "GraphProperties", 256, CI, Rrc, Qrc); + var Src; + bcb(292, 22, { 3: 1, 35: 1, 22: 1, 292: 1 }, Yrc); + var Urc, Vrc, Wrc; + var QW = ndb(Sne, "GreedySwitchType", 292, CI, $rc, Zrc); + var _rc; + bcb(303, 22, { 3: 1, 35: 1, 22: 1, 303: 1 }, fsc); + var bsc, csc, dsc; + var RW = ndb(Sne, "InLayerConstraint", 303, CI, hsc, gsc); + var isc; + bcb(420, 22, { 3: 1, 35: 1, 22: 1, 420: 1 }, nsc); + var ksc, lsc; + var SW = ndb(Sne, "InteractiveReferencePoint", 420, CI, psc, osc); + var qsc; + var ssc, tsc, usc, vsc, wsc, xsc, ysc, zsc, Asc, Bsc, Csc, Dsc, Esc, Fsc, Gsc, Hsc, Isc, Jsc, Ksc, Lsc, Msc, Nsc, Osc, Psc, Qsc, Rsc, Ssc, Tsc, Usc, Vsc, Wsc, Xsc, Ysc, Zsc, $sc, _sc, atc, btc, ctc, dtc, etc, ftc, gtc, htc, itc, jtc, ktc, ltc, mtc, ntc, otc, ptc, qtc, rtc, stc, ttc, utc, vtc; + bcb(163, 22, { 3: 1, 35: 1, 22: 1, 163: 1 }, Dtc); + var xtc, ytc, ztc, Atc, Btc; + var TW = ndb(Sne, "LayerConstraint", 163, CI, Ftc, Etc); + var Gtc; + bcb(848, 1, ale, kwc); + _.Qe = function lwc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yne), ""), "Direction Congruency"), "Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."), puc), (_5c(), V5c)), JW), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zne), ""), "Feedback Edges"), "Whether feedback edges should be highlighted by routing around the nodes."), (Bcb(), false)), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $ne), ""), "Interactive Reference Point"), "Determines which point of a node is considered by interactive layout phases."), Muc), V5c), SW), pqb(L5c)))); + o4c(a, $ne, goe, Ouc); + o4c(a, $ne, qoe, Nuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _ne), ""), "Merge Edges"), "Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), aoe), ""), "Merge Hierarchy-Crossing Edges"), "If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."), true), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(C5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), boe), ""), "Allow Non-Flow Ports To Switch Sides"), "Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."), false), T5c), wI), pqb(M5c)), OC(GC(ZI, 1), nie, 2, 6, ["org.eclipse.elk.layered.northOrSouthPort"])))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), coe), ""), "Port Sorting Strategy"), "Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."), xvc), V5c), cX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), doe), ""), "Thoroughness"), "How much effort should be spent to produce a nice layout."), meb(7)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), eoe), ""), "Add Unnecessary Bendpoints"), "Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), foe), ""), "Generate Position and Layer IDs"), "If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), goe), "cycleBreaking"), "Cycle Breaking Strategy"), "Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."), nuc), V5c), IW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), hoe), ppe), "Node Layering Strategy"), "Strategy for node layering."), bvc), V5c), YW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ioe), ppe), "Layer Constraint"), "Determines a constraint on the placement of the node regarding the layering."), Tuc), V5c), TW), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), joe), ppe), "Layer Choice Constraint"), "Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), koe), ppe), "Layer ID"), "Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), loe), qpe), "Upper Bound On Width [MinWidth Layerer]"), "Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."), meb(4)), X5c), JI), pqb(L5c)))); + o4c(a, loe, hoe, Wuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), moe), qpe), "Upper Layer Estimation Scaling Factor [MinWidth Layerer]"), "Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."), meb(2)), X5c), JI), pqb(L5c)))); + o4c(a, moe, hoe, Yuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), noe), rpe), "Node Promotion Strategy"), "Reduces number of dummy nodes after layering phase (if possible)."), _uc), V5c), aX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ooe), rpe), "Max Node Promotion Iterations"), "Limits the number of iterations for node promotion."), meb(0)), X5c), JI), pqb(L5c)))); + o4c(a, ooe, noe, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), poe), "layering.coffmanGraham"), "Layer Bound"), "The maximum number of nodes allowed per layer."), meb(Ohe)), X5c), JI), pqb(L5c)))); + o4c(a, poe, hoe, Quc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), qoe), spe), "Crossing Minimization Strategy"), "Strategy for crossing minimization."), luc), V5c), GW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), roe), spe), "Force Node Model Order"), "The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), soe), spe), "Hierarchical Sweepiness"), "How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."), 0.1), U5c), BI), pqb(L5c)))); + o4c(a, soe, tpe, fuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), toe), spe), "Semi-Interactive Crossing Minimization"), "Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."), false), T5c), wI), pqb(L5c)))); + o4c(a, toe, qoe, juc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), uoe), spe), "Position Choice Constraint"), "Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), voe), spe), "Position ID"), "Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), woe), upe), "Greedy Switch Activation Threshold"), "By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."), meb(40)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xoe), upe), "Greedy Switch Crossing Minimization"), "Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."), cuc), V5c), QW), pqb(L5c)))); + o4c(a, xoe, qoe, duc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), yoe), "crossingMinimization.greedySwitchHierarchical"), "Greedy Switch Crossing Minimization (hierarchical)"), "Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."), $tc), V5c), QW), pqb(L5c)))); + o4c(a, yoe, qoe, _tc); + o4c(a, yoe, tpe, auc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), zoe), vpe), "Node Placement Strategy"), "Strategy for node placement."), vvc), V5c), _W), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Aoe), vpe), "Favor Straight Edges Over Balancing"), "Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."), T5c), wI), pqb(L5c)))); + o4c(a, Aoe, zoe, lvc); + o4c(a, Aoe, zoe, mvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Boe), wpe), "BK Edge Straightening"), "Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."), fvc), V5c), MW), pqb(L5c)))); + o4c(a, Boe, zoe, gvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Coe), wpe), "BK Fixed Alignment"), "Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."), ivc), V5c), NW), pqb(L5c)))); + o4c(a, Coe, zoe, jvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Doe), "nodePlacement.linearSegments"), "Linear Segments Deflection Dampening"), "Dampens the movement of nodes to keep the diagram from getting too large."), 0.3), U5c), BI), pqb(L5c)))); + o4c(a, Doe, zoe, ovc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Eoe), "nodePlacement.networkSimplex"), "Node Flexibility"), "Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."), V5c), $W), pqb(K5c)))); + o4c(a, Eoe, zoe, tvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Foe), "nodePlacement.networkSimplex.nodeFlexibility"), "Node Flexibility Default"), "Default value of the 'nodeFlexibility' option for the children of a hierarchical node."), rvc), V5c), $W), pqb(L5c)))); + o4c(a, Foe, zoe, svc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Goe), xpe), "Self-Loop Distribution"), "Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."), xuc), V5c), eX), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Hoe), xpe), "Self-Loop Ordering"), "Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."), zuc), V5c), fX), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ioe), "edgeRouting.splines"), "Spline Routing Mode"), "Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."), Buc), V5c), hX), pqb(L5c)))); + o4c(a, Ioe, ype, Cuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Joe), "edgeRouting.splines.sloppy"), "Sloppy Spline Layer Spacing Factor"), "Spacing factor for routing area between layers when using sloppy spline routing."), 0.2), U5c), BI), pqb(L5c)))); + o4c(a, Joe, ype, Euc); + o4c(a, Joe, Ioe, Fuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Koe), "edgeRouting.polyline"), "Sloped Edge Zone Width"), "Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."), 2), U5c), BI), pqb(L5c)))); + o4c(a, Koe, ype, vuc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Loe), zpe), "Spacing Base Value"), "An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Moe), zpe), "Edge Node Between Layers Spacing"), "The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Noe), zpe), "Edge Edge Between Layer Spacing"), "Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ooe), zpe), "Node Node Between Layers Spacing"), "The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."), 20), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Poe), Ape), "Direction Priority"), "Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Qoe), Ape), "Shortness Priority"), "Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Roe), Ape), "Straightness Priority"), "Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Soe), Bpe), Ole), "Tries to further compact components (disconnected sub-graphs)."), false), T5c), wI), pqb(L5c)))); + o4c(a, Soe, zme, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Toe), Cpe), "Post Compaction Strategy"), Dpe), Ntc), V5c), OW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Uoe), Cpe), "Post Compaction Constraint Calculation"), Dpe), Ltc), V5c), FW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Voe), Epe), "High Degree Node Treatment"), "Makes room around high degree nodes to place leafs and trees."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Woe), Epe), "High Degree Node Threshold"), "Whether a node is considered to have a high degree."), meb(16)), X5c), JI), pqb(L5c)))); + o4c(a, Woe, Voe, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Xoe), Epe), "High Degree Node Maximum Tree Height"), "Maximum height of a subtree connected to a high degree node to be moved to separate layers."), meb(5)), X5c), JI), pqb(L5c)))); + o4c(a, Xoe, Voe, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yoe), Fpe), "Graph Wrapping Strategy"), "For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."), bwc), V5c), jX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zoe), Fpe), "Additional Wrapped Edges Spacing"), "To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."), 10), U5c), BI), pqb(L5c)))); + o4c(a, Zoe, Yoe, Ivc); + o4c(a, Zoe, Yoe, Jvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $oe), Fpe), "Correction Factor for Wrapping"), "At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."), 1), U5c), BI), pqb(L5c)))); + o4c(a, $oe, Yoe, Lvc); + o4c(a, $oe, Yoe, Mvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _oe), Gpe), "Cutting Strategy"), "The strategy by which the layer indexes are determined at which the layering crumbles into chunks."), Tvc), V5c), HW), pqb(L5c)))); + o4c(a, _oe, Yoe, Uvc); + o4c(a, _oe, Yoe, Vvc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), ape), Gpe), "Manually Specified Cuts"), "Allows the user to specify her own cuts for a certain graph."), Y5c), yK), pqb(L5c)))); + o4c(a, ape, _oe, Ovc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), bpe), "wrapping.cutting.msd"), "MSD Freedom"), "The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."), Qvc), X5c), JI), pqb(L5c)))); + o4c(a, bpe, _oe, Rvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), cpe), Hpe), "Validification Strategy"), "When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."), gwc), V5c), iX), pqb(L5c)))); + o4c(a, cpe, Yoe, hwc); + o4c(a, cpe, Yoe, iwc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), dpe), Hpe), "Valid Indices for Wrapping"), null), Y5c), yK), pqb(L5c)))); + o4c(a, dpe, Yoe, dwc); + o4c(a, dpe, Yoe, ewc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), epe), Ipe), "Improve Cuts"), "For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."), true), T5c), wI), pqb(L5c)))); + o4c(a, epe, Yoe, Zvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), fpe), Ipe), "Distance Penalty When Improving Cuts"), null), 2), U5c), BI), pqb(L5c)))); + o4c(a, fpe, Yoe, Xvc); + o4c(a, fpe, epe, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), gpe), Ipe), "Improve Wrapped Edges"), "The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."), true), T5c), wI), pqb(L5c)))); + o4c(a, gpe, Yoe, _vc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), hpe), Jpe), "Edge Label Side Selection"), "Method to decide on edge label sides."), tuc), V5c), LW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ipe), Jpe), "Edge Center Label Placement Strategy"), "Determines in which layer center labels of long edges should be placed."), ruc), V5c), EW), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), jpe), Kpe), "Consider Model Order"), "Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."), Wtc), V5c), bX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), kpe), Kpe), "No Model Order"), "Set on a node to not set a model order for this node even though it is a real node."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), lpe), Kpe), "Consider Model Order for Components"), "If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."), Ptc), V5c), hQ), pqb(L5c)))); + o4c(a, lpe, zme, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mpe), Kpe), "Long Edge Ordering Strategy"), "Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."), Ttc), V5c), ZW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), npe), Kpe), "Crossing Counter Node Order Influence"), "Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."), 0), U5c), BI), pqb(L5c)))); + o4c(a, npe, jpe, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ope), Kpe), "Crossing Counter Port Order Influence"), "Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."), 0), U5c), BI), pqb(L5c)))); + o4c(a, ope, jpe, null); + Oyc((new Pyc(), a)); + }; + var Itc, Jtc, Ktc, Ltc, Mtc, Ntc, Otc, Ptc, Qtc, Rtc, Stc, Ttc, Utc, Vtc, Wtc, Xtc, Ytc, Ztc, $tc, _tc, auc, buc, cuc, duc, euc, fuc, guc, huc, iuc, juc, kuc, luc, muc, nuc, ouc, puc, quc, ruc, suc, tuc, uuc, vuc, wuc, xuc, yuc, zuc, Auc, Buc, Cuc, Duc, Euc, Fuc, Guc, Huc, Iuc, Juc, Kuc, Luc, Muc, Nuc, Ouc, Puc, Quc, Ruc, Suc, Tuc, Uuc, Vuc, Wuc, Xuc, Yuc, Zuc, $uc, _uc, avc, bvc, cvc, dvc, evc, fvc, gvc, hvc, ivc, jvc, kvc, lvc, mvc, nvc, ovc, pvc, qvc, rvc, svc, tvc, uvc, vvc, wvc, xvc, yvc, zvc, Avc, Bvc, Cvc, Dvc, Evc, Fvc, Gvc, Hvc, Ivc, Jvc, Kvc, Lvc, Mvc, Nvc, Ovc, Pvc, Qvc, Rvc, Svc, Tvc, Uvc, Vvc, Wvc, Xvc, Yvc, Zvc, $vc, _vc, awc, bwc, cwc, dwc, ewc, fwc, gwc, hwc, iwc; + mdb(Sne, "LayeredMetaDataProvider", 848); + bcb(986, 1, ale, Pyc); + _.Qe = function Qyc(a) { + Oyc(a); + }; + var mwc, nwc, owc, pwc, qwc, rwc, swc, twc, uwc, vwc, wwc, xwc, ywc, zwc, Awc, Bwc, Cwc, Dwc, Ewc, Fwc, Gwc, Hwc, Iwc, Jwc, Kwc, Lwc, Mwc, Nwc, Owc, Pwc, Qwc, Rwc, Swc, Twc, Uwc, Vwc, Wwc, Xwc, Ywc, Zwc, $wc, _wc, axc, bxc, cxc, dxc, exc, fxc, gxc, hxc, ixc, jxc, kxc, lxc, mxc, nxc, oxc, pxc, qxc, rxc, sxc, txc, uxc, vxc, wxc, xxc, yxc, zxc, Axc, Bxc, Cxc, Dxc, Exc, Fxc, Gxc, Hxc, Ixc, Jxc, Kxc, Lxc, Mxc, Nxc, Oxc, Pxc, Qxc, Rxc, Sxc, Txc, Uxc, Vxc, Wxc, Xxc, Yxc, Zxc, $xc, _xc, ayc, byc, cyc, dyc, eyc, fyc, gyc, hyc, iyc, jyc, kyc, lyc, myc, nyc, oyc, pyc, qyc, ryc, syc, tyc, uyc, vyc, wyc, xyc, yyc, zyc, Ayc, Byc, Cyc, Dyc, Eyc, Fyc, Gyc, Hyc, Iyc, Jyc, Kyc, Lyc, Myc; + mdb(Sne, "LayeredOptions", 986); + bcb(987, 1, {}, Ryc); + _.$e = function Syc() { + var a; + return a = new jUb(), a; + }; + _._e = function Tyc(a) { + }; + mdb(Sne, "LayeredOptions/LayeredFactory", 987); + bcb(1372, 1, {}); + _.a = 0; + var Uyc; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder", 1372); + bcb(779, 1372, {}, ezc); + var bzc, czc; + mdb(Sne, "LayeredSpacings/LayeredSpacingsBuilder", 779); + bcb(313, 22, { 3: 1, 35: 1, 22: 1, 313: 1, 246: 1, 234: 1 }, nzc); + _.Kf = function pzc() { + return mzc(this); + }; + _.Xf = function ozc() { + return mzc(this); + }; + var fzc, gzc, hzc, izc, jzc, kzc; + var YW = ndb(Sne, "LayeringStrategy", 313, CI, rzc, qzc); + var szc; + bcb(378, 22, { 3: 1, 35: 1, 22: 1, 378: 1 }, zzc); + var uzc, vzc, wzc; + var ZW = ndb(Sne, "LongEdgeOrderingStrategy", 378, CI, Bzc, Azc); + var Czc; + bcb(197, 22, { 3: 1, 35: 1, 22: 1, 197: 1 }, Kzc); + var Ezc, Fzc, Gzc, Hzc; + var $W = ndb(Sne, "NodeFlexibility", 197, CI, Nzc, Mzc); + var Ozc; + bcb(315, 22, { 3: 1, 35: 1, 22: 1, 315: 1, 246: 1, 234: 1 }, Xzc); + _.Kf = function Zzc() { + return Wzc(this); + }; + _.Xf = function Yzc() { + return Wzc(this); + }; + var Qzc, Rzc, Szc, Tzc, Uzc; + var _W = ndb(Sne, "NodePlacementStrategy", 315, CI, _zc, $zc); + var aAc; + bcb(260, 22, { 3: 1, 35: 1, 22: 1, 260: 1 }, lAc); + var cAc, dAc, eAc, fAc, gAc, hAc, iAc, jAc; + var aX = ndb(Sne, "NodePromotionStrategy", 260, CI, nAc, mAc); + var oAc; + bcb(339, 22, { 3: 1, 35: 1, 22: 1, 339: 1 }, uAc); + var qAc, rAc, sAc; + var bX = ndb(Sne, "OrderingStrategy", 339, CI, wAc, vAc); + var xAc; + bcb(421, 22, { 3: 1, 35: 1, 22: 1, 421: 1 }, CAc); + var zAc, AAc; + var cX = ndb(Sne, "PortSortingStrategy", 421, CI, EAc, DAc); + var FAc; + bcb(452, 22, { 3: 1, 35: 1, 22: 1, 452: 1 }, LAc); + var HAc, IAc, JAc; + var dX = ndb(Sne, "PortType", 452, CI, NAc, MAc); + var OAc; + bcb(375, 22, { 3: 1, 35: 1, 22: 1, 375: 1 }, UAc); + var QAc, RAc, SAc; + var eX = ndb(Sne, "SelfLoopDistributionStrategy", 375, CI, WAc, VAc); + var XAc; + bcb(376, 22, { 3: 1, 35: 1, 22: 1, 376: 1 }, aBc); + var ZAc, $Ac; + var fX = ndb(Sne, "SelfLoopOrderingStrategy", 376, CI, cBc, bBc); + var dBc; + bcb(304, 1, { 304: 1 }, oBc); + mdb(Sne, "Spacings", 304); + bcb(336, 22, { 3: 1, 35: 1, 22: 1, 336: 1 }, uBc); + var qBc, rBc, sBc; + var hX = ndb(Sne, "SplineRoutingMode", 336, CI, wBc, vBc); + var xBc; + bcb(338, 22, { 3: 1, 35: 1, 22: 1, 338: 1 }, DBc); + var zBc, ABc, BBc; + var iX = ndb(Sne, "ValidifyStrategy", 338, CI, FBc, EBc); + var GBc; + bcb(377, 22, { 3: 1, 35: 1, 22: 1, 377: 1 }, MBc); + var IBc, JBc, KBc; + var jX = ndb(Sne, "WrappingStrategy", 377, CI, OBc, NBc); + var PBc; + bcb(1383, 1, Bqe, VBc); + _.Yf = function WBc(a) { + return BD(a, 37), RBc; + }; + _.pf = function XBc(a, b) { + UBc(this, BD(a, 37), b); + }; + var RBc; + mdb(Cqe, "DepthFirstCycleBreaker", 1383); + bcb(782, 1, Bqe, aCc); + _.Yf = function cCc(a) { + return BD(a, 37), YBc; + }; + _.pf = function dCc(a, b) { + $Bc(this, BD(a, 37), b); + }; + _.Zf = function bCc(a) { + return BD(Ikb(a, Bub(this.d, a.c.length)), 10); + }; + var YBc; + mdb(Cqe, "GreedyCycleBreaker", 782); + bcb(1386, 782, Bqe, eCc); + _.Zf = function fCc(a) { + var b, c, d, e; + e = null; + b = Ohe; + for (d = new olb(a); d.a < d.c.c.length; ) { + c = BD(mlb(d), 10); + if (wNb(c, (wtc(), Zsc)) && BD(vNb(c, Zsc), 19).a < b) { + b = BD(vNb(c, Zsc), 19).a; + e = c; + } + } + if (!e) { + return BD(Ikb(a, Bub(this.d, a.c.length)), 10); + } + return e; + }; + mdb(Cqe, "GreedyModelOrderCycleBreaker", 1386); + bcb(1384, 1, Bqe, kCc); + _.Yf = function lCc(a) { + return BD(a, 37), gCc; + }; + _.pf = function mCc(a, b) { + jCc(this, BD(a, 37), b); + }; + var gCc; + mdb(Cqe, "InteractiveCycleBreaker", 1384); + bcb(1385, 1, Bqe, rCc); + _.Yf = function sCc(a) { + return BD(a, 37), nCc; + }; + _.pf = function tCc(a, b) { + qCc(this, BD(a, 37), b); + }; + _.a = 0; + _.b = 0; + var nCc; + mdb(Cqe, "ModelOrderCycleBreaker", 1385); + bcb(1389, 1, Bqe, DCc); + _.Yf = function ECc(a) { + return BD(a, 37), uCc; + }; + _.pf = function FCc(a, b) { + BCc(this, BD(a, 37), b); + }; + var uCc; + mdb(Dqe, "CoffmanGrahamLayerer", 1389); + bcb(1390, 1, Dke, GCc); + _.ue = function HCc(a, b) { + return xCc(this.a, BD(a, 10), BD(b, 10)); + }; + _.Fb = function ICc(a) { + return this === a; + }; + _.ve = function JCc() { + return new tpb(this); + }; + mdb(Dqe, "CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type", 1390); + bcb(1391, 1, Dke, KCc); + _.ue = function LCc(a, b) { + return ACc(this.a, BD(a, 10), BD(b, 10)); + }; + _.Fb = function MCc(a) { + return this === a; + }; + _.ve = function NCc() { + return new tpb(this); + }; + mdb(Dqe, "CoffmanGrahamLayerer/lambda$1$Type", 1391); + bcb(1392, 1, Bqe, QCc); + _.Yf = function RCc(a) { + return BD(a, 37), e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), n8b)), mUb, w8b), nUb, v8b); + }; + _.pf = function SCc(a, b) { + PCc(this, BD(a, 37), b); + }; + mdb(Dqe, "InteractiveLayerer", 1392); + bcb(569, 1, { 569: 1 }, TCc); + _.a = 0; + _.c = 0; + mdb(Dqe, "InteractiveLayerer/LayerSpan", 569); + bcb(1388, 1, Bqe, ZCc); + _.Yf = function $Cc(a) { + return BD(a, 37), UCc; + }; + _.pf = function _Cc(a, b) { + WCc(this, BD(a, 37), b); + }; + var UCc; + mdb(Dqe, "LongestPathLayerer", 1388); + bcb(1395, 1, Bqe, iDc); + _.Yf = function jDc(a) { + return BD(a, 37), e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + }; + _.pf = function kDc(a, b) { + gDc(this, BD(a, 37), b); + }; + _.a = 0; + _.b = 0; + _.d = 0; + var aDc, bDc; + mdb(Dqe, "MinWidthLayerer", 1395); + bcb(1396, 1, Dke, mDc); + _.ue = function nDc(a, b) { + return lDc(this, BD(a, 10), BD(b, 10)); + }; + _.Fb = function oDc(a) { + return this === a; + }; + _.ve = function pDc() { + return new tpb(this); + }; + mdb(Dqe, "MinWidthLayerer/MinOutgoingEdgesComparator", 1396); + bcb(1387, 1, Bqe, xDc); + _.Yf = function yDc(a) { + return BD(a, 37), qDc; + }; + _.pf = function zDc(a, b) { + wDc(this, BD(a, 37), b); + }; + var qDc; + mdb(Dqe, "NetworkSimplexLayerer", 1387); + bcb(1393, 1, Bqe, LDc); + _.Yf = function MDc(a) { + return BD(a, 37), e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + }; + _.pf = function NDc(a, b) { + IDc(this, BD(a, 37), b); + }; + _.d = 0; + _.f = 0; + _.g = 0; + _.i = 0; + _.s = 0; + _.t = 0; + _.u = 0; + mdb(Dqe, "StretchWidthLayerer", 1393); + bcb(1394, 1, Dke, PDc); + _.ue = function QDc(a, b) { + return ODc(BD(a, 10), BD(b, 10)); + }; + _.Fb = function RDc(a) { + return this === a; + }; + _.ve = function SDc() { + return new tpb(this); + }; + mdb(Dqe, "StretchWidthLayerer/1", 1394); + bcb(402, 1, Eqe); + _.Nf = function fEc(a, b, c, d, e, f) { + }; + _._f = function dEc(a, b, c) { + return YDc(this, a, b, c); + }; + _.Mf = function eEc() { + this.g = KC(VD, Fqe, 25, this.d, 15, 1); + this.f = KC(VD, Fqe, 25, this.d, 15, 1); + }; + _.Of = function gEc(a, b) { + this.e[a] = KC(WD, oje, 25, b[a].length, 15, 1); + }; + _.Pf = function hEc(a, b, c) { + var d; + d = c[a][b]; + d.p = b; + this.e[a][b] = b; + }; + _.Qf = function iEc(a, b, c, d) { + BD(Ikb(d[a][b].j, c), 11).p = this.d++; + }; + _.b = 0; + _.c = 0; + _.d = 0; + mdb(Gqe, "AbstractBarycenterPortDistributor", 402); + bcb(1633, 1, Dke, jEc); + _.ue = function kEc(a, b) { + return _Dc(this.a, BD(a, 11), BD(b, 11)); + }; + _.Fb = function lEc(a) { + return this === a; + }; + _.ve = function mEc() { + return new tpb(this); + }; + mdb(Gqe, "AbstractBarycenterPortDistributor/lambda$0$Type", 1633); + bcb(817, 1, Mne, uEc); + _.Nf = function xEc(a, b, c, d, e, f) { + }; + _.Pf = function zEc(a, b, c) { + }; + _.Qf = function AEc(a, b, c, d) { + }; + _.Lf = function vEc() { + return false; + }; + _.Mf = function wEc() { + this.c = this.e.a; + this.g = this.f.g; + }; + _.Of = function yEc(a, b) { + b[a][0].c.p = a; + }; + _.Rf = function BEc() { + return false; + }; + _.ag = function CEc(a, b, c, d) { + if (c) { + rEc(this, a); + } else { + oEc(this, a, d); + pEc(this, a, b); + } + if (a.c.length > 1) { + Ccb(DD(vNb(Q_b((tCb(0, a.c.length), BD(a.c[0], 10))), (Nyc(), Awc)))) ? YGc(a, this.d, BD(this, 660)) : (mmb(), Okb(a, this.d)); + PEc(this.e, a); + } + }; + _.Sf = function DEc(a, b, c, d) { + var e, f, g, h, i, j, k; + if (b != sEc(c, a.length)) { + f = a[b - (c ? 1 : -1)]; + UDc(this.f, f, c ? (KAc(), IAc) : (KAc(), HAc)); + } + e = a[b][0]; + k = !d || e.k == (j0b(), e0b); + j = Ou(a[b]); + this.ag(j, k, false, c); + g = 0; + for (i = new olb(j); i.a < i.c.c.length; ) { + h = BD(mlb(i), 10); + a[b][g++] = h; + } + return false; + }; + _.Tf = function EEc(a, b) { + var c, d, e, f, g; + g = sEc(b, a.length); + f = Ou(a[g]); + this.ag(f, false, true, b); + c = 0; + for (e = new olb(f); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + a[g][c++] = d; + } + return false; + }; + mdb(Gqe, "BarycenterHeuristic", 817); + bcb(658, 1, { 658: 1 }, FEc); + _.Ib = function GEc() { + return "BarycenterState [node=" + this.c + ", summedWeight=" + this.d + ", degree=" + this.b + ", barycenter=" + this.a + ", visited=" + this.e + "]"; + }; + _.b = 0; + _.d = 0; + _.e = false; + var CX = mdb(Gqe, "BarycenterHeuristic/BarycenterState", 658); + bcb(1802, 1, Dke, HEc); + _.ue = function IEc(a, b) { + return qEc(this.a, BD(a, 10), BD(b, 10)); + }; + _.Fb = function JEc(a) { + return this === a; + }; + _.ve = function KEc() { + return new tpb(this); + }; + mdb(Gqe, "BarycenterHeuristic/lambda$0$Type", 1802); + bcb(816, 1, Mne, SEc); + _.Mf = function TEc() { + }; + _.Nf = function UEc(a, b, c, d, e, f) { + }; + _.Qf = function XEc(a, b, c, d) { + }; + _.Of = function VEc(a, b) { + this.a[a] = KC(CX, { 3: 1, 4: 1, 5: 1, 2018: 1 }, 658, b[a].length, 0, 1); + this.b[a] = KC(FX, { 3: 1, 4: 1, 5: 1, 2019: 1 }, 233, b[a].length, 0, 1); + }; + _.Pf = function WEc(a, b, c) { + OEc(this, c[a][b], true); + }; + _.c = false; + mdb(Gqe, "ForsterConstraintResolver", 816); + bcb(233, 1, { 233: 1 }, $Ec, _Ec); + _.Ib = function aFc() { + var a, b; + b = new Ufb(); + b.a += "["; + for (a = 0; a < this.d.length; a++) { + Qfb(b, a0b(this.d[a])); + REc(this.g, this.d[0]).a != null && Qfb(Qfb((b.a += "<", b), Jdb(REc(this.g, this.d[0]).a)), ">"); + a < this.d.length - 1 && (b.a += She, b); + } + return (b.a += "]", b).a; + }; + _.a = 0; + _.c = 0; + _.f = 0; + var FX = mdb(Gqe, "ForsterConstraintResolver/ConstraintGroup", 233); + bcb(1797, 1, qie, bFc); + _.td = function cFc(a) { + OEc(this.a, BD(a, 10), false); + }; + mdb(Gqe, "ForsterConstraintResolver/lambda$0$Type", 1797); + bcb(214, 1, { 214: 1, 225: 1 }, fFc); + _.Nf = function hFc(a, b, c, d, e, f) { + }; + _.Of = function iFc(a, b) { + }; + _.Mf = function gFc() { + this.r = KC(WD, oje, 25, this.n, 15, 1); + }; + _.Pf = function jFc(a, b, c) { + var d, e; + e = c[a][b]; + d = e.e; + !!d && Ekb(this.b, d); + }; + _.Qf = function kFc(a, b, c, d) { + ++this.n; + }; + _.Ib = function lFc() { + return wlb(this.e, new Tqb()); + }; + _.g = false; + _.i = false; + _.n = 0; + _.s = false; + mdb(Gqe, "GraphInfoHolder", 214); + bcb(1832, 1, Mne, pFc); + _.Nf = function sFc(a, b, c, d, e, f) { + }; + _.Of = function tFc(a, b) { + }; + _.Qf = function vFc(a, b, c, d) { + }; + _._f = function qFc(a, b, c) { + c && b > 0 ? (RHc(this.a, a[b - 1], a[b]), void 0) : !c && b < a.length - 1 ? (RHc(this.a, a[b], a[b + 1]), void 0) : THc(this.a, a[b], c ? (Ucd(), Tcd) : (Ucd(), zcd)); + return mFc(this, a, b, c); + }; + _.Mf = function rFc() { + this.d = KC(WD, oje, 25, this.c, 15, 1); + this.a = new dIc(this.d); + }; + _.Pf = function uFc(a, b, c) { + var d; + d = c[a][b]; + this.c += d.j.c.length; + }; + _.c = 0; + mdb(Gqe, "GreedyPortDistributor", 1832); + bcb(1401, 1, Bqe, CFc); + _.Yf = function DFc(a) { + return zFc(BD(a, 37)); + }; + _.pf = function EFc(a, b) { + BFc(BD(a, 37), b); + }; + var xFc; + mdb(Gqe, "InteractiveCrossingMinimizer", 1401); + bcb(1402, 1, Dke, GFc); + _.ue = function HFc(a, b) { + return FFc(this, BD(a, 10), BD(b, 10)); + }; + _.Fb = function IFc(a) { + return this === a; + }; + _.ve = function JFc() { + return new tpb(this); + }; + mdb(Gqe, "InteractiveCrossingMinimizer/1", 1402); + bcb(507, 1, { 507: 1, 123: 1, 51: 1 }, fGc); + _.Yf = function gGc(a) { + var b; + return BD(a, 37), b = k3c(KFc), e3c(b, (qUb(), nUb), (S8b(), H8b)), b; + }; + _.pf = function hGc(a, b) { + YFc(this, BD(a, 37), b); + }; + _.e = 0; + var KFc; + mdb(Gqe, "LayerSweepCrossingMinimizer", 507); + bcb(1398, 1, qie, iGc); + _.td = function jGc(a) { + MFc(this.a, BD(a, 214)); + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/0methodref$compareDifferentRandomizedLayouts$Type", 1398); + bcb(1399, 1, qie, kGc); + _.td = function lGc(a) { + VFc(this.a, BD(a, 214)); + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/1methodref$minimizeCrossingsNoCounter$Type", 1399); + bcb(1400, 1, qie, mGc); + _.td = function nGc(a) { + XFc(this.a, BD(a, 214)); + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/2methodref$minimizeCrossingsWithCounter$Type", 1400); + bcb(454, 22, { 3: 1, 35: 1, 22: 1, 454: 1 }, sGc); + var oGc, pGc, qGc; + var PX = ndb(Gqe, "LayerSweepCrossingMinimizer/CrossMinType", 454, CI, uGc, tGc); + var vGc; + bcb(1397, 1, Oie, xGc); + _.Mb = function yGc(a) { + return LFc(), BD(a, 29).a.c.length == 0; + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/lambda$0$Type", 1397); + bcb(1799, 1, Mne, BGc); + _.Mf = function CGc() { + }; + _.Nf = function DGc(a, b, c, d, e, f) { + }; + _.Qf = function GGc(a, b, c, d) { + }; + _.Of = function EGc(a, b) { + b[a][0].c.p = a; + this.b[a] = KC(SX, { 3: 1, 4: 1, 5: 1, 1944: 1 }, 659, b[a].length, 0, 1); + }; + _.Pf = function FGc(a, b, c) { + var d; + d = c[a][b]; + d.p = b; + NC(this.b[a], b, new HGc()); + }; + mdb(Gqe, "LayerSweepTypeDecider", 1799); + bcb(659, 1, { 659: 1 }, HGc); + _.Ib = function IGc() { + return "NodeInfo [connectedEdges=" + this.a + ", hierarchicalInfluence=" + this.b + ", randomInfluence=" + this.c + "]"; + }; + _.a = 0; + _.b = 0; + _.c = 0; + var SX = mdb(Gqe, "LayerSweepTypeDecider/NodeInfo", 659); + bcb(1800, 1, Vke, JGc); + _.Lb = function KGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + _.Fb = function LGc(a) { + return this === a; + }; + _.Mb = function MGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + mdb(Gqe, "LayerSweepTypeDecider/lambda$0$Type", 1800); + bcb(1801, 1, Vke, NGc); + _.Lb = function OGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + _.Fb = function PGc(a) { + return this === a; + }; + _.Mb = function QGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + mdb(Gqe, "LayerSweepTypeDecider/lambda$1$Type", 1801); + bcb(1833, 402, Eqe, RGc); + _.$f = function SGc(a, b, c) { + var d, e, f, g, h, i, j, k, l; + j = this.g; + switch (c.g) { + case 1: { + d = 0; + e = 0; + for (i = new olb(a.j); i.a < i.c.c.length; ) { + g = BD(mlb(i), 11); + if (g.e.c.length != 0) { + ++d; + g.j == (Ucd(), Acd) && ++e; + } + } + f = b + e; + l = b + d; + for (h = W_b(a, (KAc(), HAc)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + if (g.j == (Ucd(), Acd)) { + j[g.p] = f; + --f; + } else { + j[g.p] = l; + --l; + } + } + return d; + } + case 2: { + k = 0; + for (h = W_b(a, (KAc(), IAc)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + ++k; + j[g.p] = b + k; + } + return k; + } + default: + throw vbb(new Vdb()); + } + }; + mdb(Gqe, "LayerTotalPortDistributor", 1833); + bcb(660, 817, { 660: 1, 225: 1 }, XGc); + _.ag = function ZGc(a, b, c, d) { + if (c) { + rEc(this, a); + } else { + oEc(this, a, d); + pEc(this, a, b); + } + if (a.c.length > 1) { + Ccb(DD(vNb(Q_b((tCb(0, a.c.length), BD(a.c[0], 10))), (Nyc(), Awc)))) ? YGc(a, this.d, this) : (mmb(), Okb(a, this.d)); + Ccb(DD(vNb(Q_b((tCb(0, a.c.length), BD(a.c[0], 10))), Awc))) || PEc(this.e, a); + } + }; + mdb(Gqe, "ModelOrderBarycenterHeuristic", 660); + bcb(1803, 1, Dke, $Gc); + _.ue = function _Gc(a, b) { + return VGc(this.a, BD(a, 10), BD(b, 10)); + }; + _.Fb = function aHc(a) { + return this === a; + }; + _.ve = function bHc() { + return new tpb(this); + }; + mdb(Gqe, "ModelOrderBarycenterHeuristic/lambda$0$Type", 1803); + bcb(1403, 1, Bqe, fHc); + _.Yf = function gHc(a) { + var b; + return BD(a, 37), b = k3c(cHc), e3c(b, (qUb(), nUb), (S8b(), H8b)), b; + }; + _.pf = function hHc(a, b) { + eHc((BD(a, 37), b)); + }; + var cHc; + mdb(Gqe, "NoCrossingMinimizer", 1403); + bcb(796, 402, Eqe, iHc); + _.$f = function jHc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n; + l = this.g; + switch (c.g) { + case 1: { + e = 0; + f = 0; + for (k = new olb(a.j); k.a < k.c.c.length; ) { + i = BD(mlb(k), 11); + if (i.e.c.length != 0) { + ++e; + i.j == (Ucd(), Acd) && ++f; + } + } + d = 1 / (e + 1); + g = b + f * d; + n = b + 1 - d; + for (j = W_b(a, (KAc(), HAc)).Kc(); j.Ob(); ) { + i = BD(j.Pb(), 11); + if (i.j == (Ucd(), Acd)) { + l[i.p] = g; + g -= d; + } else { + l[i.p] = n; + n -= d; + } + } + break; + } + case 2: { + h = 0; + for (k = new olb(a.j); k.a < k.c.c.length; ) { + i = BD(mlb(k), 11); + i.g.c.length == 0 || ++h; + } + d = 1 / (h + 1); + m = b + d; + for (j = W_b(a, (KAc(), IAc)).Kc(); j.Ob(); ) { + i = BD(j.Pb(), 11); + l[i.p] = m; + m += d; + } + break; + } + default: + throw vbb(new Wdb("Port type is undefined")); + } + return 1; + }; + mdb(Gqe, "NodeRelativePortDistributor", 796); + bcb(807, 1, {}, nHc, oHc); + mdb(Gqe, "SweepCopy", 807); + bcb(1798, 1, Mne, rHc); + _.Of = function uHc(a, b) { + }; + _.Mf = function sHc() { + var a; + a = KC(WD, oje, 25, this.f, 15, 1); + this.d = new LIc(a); + this.a = new dIc(a); + }; + _.Nf = function tHc(a, b, c, d, e, f) { + var g; + g = BD(Ikb(f[a][b].j, c), 11); + e.c == g && e.c.i.c == e.d.i.c && ++this.e[a]; + }; + _.Pf = function vHc(a, b, c) { + var d; + d = c[a][b]; + this.c[a] = this.c[a] | d.k == (j0b(), i0b); + }; + _.Qf = function wHc(a, b, c, d) { + var e; + e = BD(Ikb(d[a][b].j, c), 11); + e.p = this.f++; + e.g.c.length + e.e.c.length > 1 && (e.j == (Ucd(), zcd) ? this.b[a] = true : e.j == Tcd && a > 0 && (this.b[a - 1] = true)); + }; + _.f = 0; + mdb(Lne, "AllCrossingsCounter", 1798); + bcb(587, 1, {}, BHc); + _.b = 0; + _.d = 0; + mdb(Lne, "BinaryIndexedTree", 587); + bcb(524, 1, {}, dIc); + var DHc, EHc; + mdb(Lne, "CrossingsCounter", 524); + bcb(1906, 1, Dke, hIc); + _.ue = function iIc(a, b) { + return YHc(this.a, BD(a, 11), BD(b, 11)); + }; + _.Fb = function jIc(a) { + return this === a; + }; + _.ve = function kIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$0$Type", 1906); + bcb(1907, 1, Dke, lIc); + _.ue = function mIc(a, b) { + return ZHc(this.a, BD(a, 11), BD(b, 11)); + }; + _.Fb = function nIc(a) { + return this === a; + }; + _.ve = function oIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$1$Type", 1907); + bcb(1908, 1, Dke, pIc); + _.ue = function qIc(a, b) { + return $Hc(this.a, BD(a, 11), BD(b, 11)); + }; + _.Fb = function rIc(a) { + return this === a; + }; + _.ve = function sIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$2$Type", 1908); + bcb(1909, 1, Dke, tIc); + _.ue = function uIc(a, b) { + return _Hc(this.a, BD(a, 11), BD(b, 11)); + }; + _.Fb = function vIc(a) { + return this === a; + }; + _.ve = function wIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$3$Type", 1909); + bcb(1910, 1, qie, xIc); + _.td = function yIc(a) { + eIc(this.a, BD(a, 11)); + }; + mdb(Lne, "CrossingsCounter/lambda$4$Type", 1910); + bcb(1911, 1, Oie, zIc); + _.Mb = function AIc(a) { + return fIc(this.a, BD(a, 11)); + }; + mdb(Lne, "CrossingsCounter/lambda$5$Type", 1911); + bcb(1912, 1, qie, CIc); + _.td = function DIc(a) { + BIc(this, a); + }; + mdb(Lne, "CrossingsCounter/lambda$6$Type", 1912); + bcb(1913, 1, qie, EIc); + _.td = function FIc(a) { + var b; + FHc(); + Wjb(this.b, (b = this.a, BD(a, 11), b)); + }; + mdb(Lne, "CrossingsCounter/lambda$7$Type", 1913); + bcb(826, 1, Vke, GIc); + _.Lb = function HIc(a) { + return FHc(), wNb(BD(a, 11), (wtc(), gtc)); + }; + _.Fb = function IIc(a) { + return this === a; + }; + _.Mb = function JIc(a) { + return FHc(), wNb(BD(a, 11), (wtc(), gtc)); + }; + mdb(Lne, "CrossingsCounter/lambda$8$Type", 826); + bcb(1905, 1, {}, LIc); + mdb(Lne, "HyperedgeCrossingsCounter", 1905); + bcb(467, 1, { 35: 1, 467: 1 }, NIc); + _.wd = function OIc(a) { + return MIc(this, BD(a, 467)); + }; + _.b = 0; + _.c = 0; + _.e = 0; + _.f = 0; + var oY = mdb(Lne, "HyperedgeCrossingsCounter/Hyperedge", 467); + bcb(362, 1, { 35: 1, 362: 1 }, QIc); + _.wd = function RIc(a) { + return PIc(this, BD(a, 362)); + }; + _.b = 0; + _.c = 0; + var nY = mdb(Lne, "HyperedgeCrossingsCounter/HyperedgeCorner", 362); + bcb(523, 22, { 3: 1, 35: 1, 22: 1, 523: 1 }, VIc); + var SIc, TIc; + var mY = ndb(Lne, "HyperedgeCrossingsCounter/HyperedgeCorner/Type", 523, CI, XIc, WIc); + var YIc; + bcb(1405, 1, Bqe, dJc); + _.Yf = function eJc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? _Ic : null; + }; + _.pf = function fJc(a, b) { + cJc(this, BD(a, 37), b); + }; + var _Ic; + mdb(Hqe, "InteractiveNodePlacer", 1405); + bcb(1406, 1, Bqe, tJc); + _.Yf = function uJc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? gJc : null; + }; + _.pf = function vJc(a, b) { + rJc(this, BD(a, 37), b); + }; + var gJc, hJc, iJc; + mdb(Hqe, "LinearSegmentsNodePlacer", 1406); + bcb(257, 1, { 35: 1, 257: 1 }, zJc); + _.wd = function AJc(a) { + return wJc(this, BD(a, 257)); + }; + _.Fb = function BJc(a) { + var b; + if (JD(a, 257)) { + b = BD(a, 257); + return this.b == b.b; + } + return false; + }; + _.Hb = function CJc() { + return this.b; + }; + _.Ib = function DJc() { + return "ls" + Fe(this.e); + }; + _.a = 0; + _.b = 0; + _.c = -1; + _.d = -1; + _.g = 0; + var sY = mdb(Hqe, "LinearSegmentsNodePlacer/LinearSegment", 257); + bcb(1408, 1, Bqe, $Jc); + _.Yf = function _Jc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? EJc : null; + }; + _.pf = function hKc(a, b) { + WJc(this, BD(a, 37), b); + }; + _.b = 0; + _.g = 0; + var EJc; + mdb(Hqe, "NetworkSimplexPlacer", 1408); + bcb(1427, 1, Dke, iKc); + _.ue = function jKc(a, b) { + return beb(BD(a, 19).a, BD(b, 19).a); + }; + _.Fb = function kKc(a) { + return this === a; + }; + _.ve = function lKc() { + return new tpb(this); + }; + mdb(Hqe, "NetworkSimplexPlacer/0methodref$compare$Type", 1427); + bcb(1429, 1, Dke, mKc); + _.ue = function nKc(a, b) { + return beb(BD(a, 19).a, BD(b, 19).a); + }; + _.Fb = function oKc(a) { + return this === a; + }; + _.ve = function pKc() { + return new tpb(this); + }; + mdb(Hqe, "NetworkSimplexPlacer/1methodref$compare$Type", 1429); + bcb(649, 1, { 649: 1 }, qKc); + var wY = mdb(Hqe, "NetworkSimplexPlacer/EdgeRep", 649); + bcb(401, 1, { 401: 1 }, rKc); + _.b = false; + var xY = mdb(Hqe, "NetworkSimplexPlacer/NodeRep", 401); + bcb(508, 12, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 12: 1, 14: 1, 15: 1, 54: 1, 508: 1 }, vKc); + mdb(Hqe, "NetworkSimplexPlacer/Path", 508); + bcb(1409, 1, {}, wKc); + _.Kb = function xKc(a) { + return BD(a, 17).d.i.k; + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$0$Type", 1409); + bcb(1410, 1, Oie, yKc); + _.Mb = function zKc(a) { + return BD(a, 267) == (j0b(), g0b); + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$1$Type", 1410); + bcb(1411, 1, {}, AKc); + _.Kb = function BKc(a) { + return BD(a, 17).d.i; + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$2$Type", 1411); + bcb(1412, 1, Oie, CKc); + _.Mb = function DKc(a) { + return eLc(Lzc(BD(a, 10))); + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$3$Type", 1412); + bcb(1413, 1, Oie, EKc); + _.Mb = function FKc(a) { + return dKc(BD(a, 11)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$0$Type", 1413); + bcb(1414, 1, qie, GKc); + _.td = function HKc(a) { + LJc(this.a, this.b, BD(a, 11)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$1$Type", 1414); + bcb(1423, 1, qie, IKc); + _.td = function JKc(a) { + MJc(this.a, BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$10$Type", 1423); + bcb(1424, 1, {}, KKc); + _.Kb = function LKc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$11$Type", 1424); + bcb(1425, 1, qie, MKc); + _.td = function NKc(a) { + NJc(this.a, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$12$Type", 1425); + bcb(1426, 1, {}, OKc); + _.Kb = function PKc(a) { + return FJc(), meb(BD(a, 121).e); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$13$Type", 1426); + bcb(1428, 1, {}, QKc); + _.Kb = function RKc(a) { + return FJc(), meb(BD(a, 121).e); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$15$Type", 1428); + bcb(1430, 1, Oie, SKc); + _.Mb = function TKc(a) { + return FJc(), BD(a, 401).c.k == (j0b(), h0b); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$17$Type", 1430); + bcb(1431, 1, Oie, UKc); + _.Mb = function VKc(a) { + return FJc(), BD(a, 401).c.j.c.length > 1; + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$18$Type", 1431); + bcb(1432, 1, qie, WKc); + _.td = function XKc(a) { + eKc(this.c, this.b, this.d, this.a, BD(a, 401)); + }; + _.c = 0; + _.d = 0; + mdb(Hqe, "NetworkSimplexPlacer/lambda$19$Type", 1432); + bcb(1415, 1, {}, YKc); + _.Kb = function ZKc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$2$Type", 1415); + bcb(1433, 1, qie, $Kc); + _.td = function _Kc(a) { + fKc(this.a, BD(a, 11)); + }; + _.a = 0; + mdb(Hqe, "NetworkSimplexPlacer/lambda$20$Type", 1433); + bcb(1434, 1, {}, aLc); + _.Kb = function bLc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$21$Type", 1434); + bcb(1435, 1, qie, cLc); + _.td = function dLc(a) { + OJc(this.a, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$22$Type", 1435); + bcb(1436, 1, Oie, fLc); + _.Mb = function gLc(a) { + return eLc(a); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$23$Type", 1436); + bcb(1437, 1, {}, hLc); + _.Kb = function iLc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$24$Type", 1437); + bcb(1438, 1, Oie, jLc); + _.Mb = function kLc(a) { + return PJc(this.a, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$25$Type", 1438); + bcb(1439, 1, qie, lLc); + _.td = function mLc(a) { + QJc(this.a, this.b, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$26$Type", 1439); + bcb(1440, 1, Oie, nLc); + _.Mb = function oLc(a) { + return FJc(), !OZb(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$27$Type", 1440); + bcb(1441, 1, Oie, pLc); + _.Mb = function qLc(a) { + return FJc(), !OZb(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$28$Type", 1441); + bcb(1442, 1, {}, rLc); + _.Ce = function sLc(a, b) { + return RJc(this.a, BD(a, 29), BD(b, 29)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$29$Type", 1442); + bcb(1416, 1, {}, tLc); + _.Kb = function uLc(a) { + return FJc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$3$Type", 1416); + bcb(1417, 1, Oie, vLc); + _.Mb = function wLc(a) { + return FJc(), cKc(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$4$Type", 1417); + bcb(1418, 1, qie, xLc); + _.td = function yLc(a) { + XJc(this.a, BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$5$Type", 1418); + bcb(1419, 1, {}, zLc); + _.Kb = function ALc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$6$Type", 1419); + bcb(1420, 1, Oie, BLc); + _.Mb = function CLc(a) { + return FJc(), BD(a, 10).k == (j0b(), h0b); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$7$Type", 1420); + bcb(1421, 1, {}, DLc); + _.Kb = function ELc(a) { + return FJc(), new YAb(null, new Lub(new Sr(ur(O_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$8$Type", 1421); + bcb(1422, 1, Oie, FLc); + _.Mb = function GLc(a) { + return FJc(), NZb(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$9$Type", 1422); + bcb(1404, 1, Bqe, KLc); + _.Yf = function LLc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? HLc : null; + }; + _.pf = function MLc(a, b) { + JLc(BD(a, 37), b); + }; + var HLc; + mdb(Hqe, "SimpleNodePlacer", 1404); + bcb(180, 1, { 180: 1 }, ULc); + _.Ib = function VLc() { + var a; + a = ""; + this.c == (YLc(), XLc) ? a += kle : this.c == WLc && (a += jle); + this.o == (eMc(), cMc) ? a += vle : this.o == dMc ? a += "UP" : a += "BALANCED"; + return a; + }; + mdb(Kqe, "BKAlignedLayout", 180); + bcb(516, 22, { 3: 1, 35: 1, 22: 1, 516: 1 }, ZLc); + var WLc, XLc; + var fZ = ndb(Kqe, "BKAlignedLayout/HDirection", 516, CI, _Lc, $Lc); + var aMc; + bcb(515, 22, { 3: 1, 35: 1, 22: 1, 515: 1 }, fMc); + var cMc, dMc; + var gZ = ndb(Kqe, "BKAlignedLayout/VDirection", 515, CI, hMc, gMc); + var iMc; + bcb(1634, 1, {}, mMc); + mdb(Kqe, "BKAligner", 1634); + bcb(1637, 1, {}, rMc); + mdb(Kqe, "BKCompactor", 1637); + bcb(654, 1, { 654: 1 }, sMc); + _.a = 0; + mdb(Kqe, "BKCompactor/ClassEdge", 654); + bcb(458, 1, { 458: 1 }, uMc); + _.a = null; + _.b = 0; + mdb(Kqe, "BKCompactor/ClassNode", 458); + bcb(1407, 1, Bqe, CMc); + _.Yf = function GMc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? vMc : null; + }; + _.pf = function HMc(a, b) { + BMc(this, BD(a, 37), b); + }; + _.d = false; + var vMc; + mdb(Kqe, "BKNodePlacer", 1407); + bcb(1635, 1, {}, JMc); + _.d = 0; + mdb(Kqe, "NeighborhoodInformation", 1635); + bcb(1636, 1, Dke, OMc); + _.ue = function PMc(a, b) { + return NMc(this, BD(a, 46), BD(b, 46)); + }; + _.Fb = function QMc(a) { + return this === a; + }; + _.ve = function RMc() { + return new tpb(this); + }; + mdb(Kqe, "NeighborhoodInformation/NeighborComparator", 1636); + bcb(808, 1, {}); + mdb(Kqe, "ThresholdStrategy", 808); + bcb(1763, 808, {}, WMc); + _.bg = function XMc(a, b, c) { + return this.a.o == (eMc(), dMc) ? Pje : Qje; + }; + _.cg = function YMc() { + }; + mdb(Kqe, "ThresholdStrategy/NullThresholdStrategy", 1763); + bcb(579, 1, { 579: 1 }, ZMc); + _.c = false; + _.d = false; + mdb(Kqe, "ThresholdStrategy/Postprocessable", 579); + bcb(1764, 808, {}, bNc); + _.bg = function cNc(a, b, c) { + var d, e, f; + e = b == c; + d = this.a.a[c.p] == b; + if (!(e || d)) { + return a; + } + f = a; + if (this.a.c == (YLc(), XLc)) { + e && (f = $Mc(this, b, true)); + !isNaN(f) && !isFinite(f) && d && (f = $Mc(this, c, false)); + } else { + e && (f = $Mc(this, b, true)); + !isNaN(f) && !isFinite(f) && d && (f = $Mc(this, c, false)); + } + return f; + }; + _.cg = function dNc() { + var a, b, c, d, e; + while (this.d.b != 0) { + e = BD(Ksb(this.d), 579); + d = _Mc(this, e); + if (!d.a) { + continue; + } + a = d.a; + c = Ccb(this.a.f[this.a.g[e.b.p].p]); + if (!c && !OZb(a) && a.c.i.c == a.d.i.c) { + continue; + } + b = aNc(this, e); + b || swb(this.e, e); + } + while (this.e.a.c.length != 0) { + aNc(this, BD(rwb(this.e), 579)); + } + }; + mdb(Kqe, "ThresholdStrategy/SimpleThresholdStrategy", 1764); + bcb(635, 1, { 635: 1, 246: 1, 234: 1 }, hNc); + _.Kf = function jNc() { + return gNc(this); + }; + _.Xf = function iNc() { + return gNc(this); + }; + var eNc; + mdb(Lqe, "EdgeRouterFactory", 635); + bcb(1458, 1, Bqe, wNc); + _.Yf = function xNc(a) { + return uNc(BD(a, 37)); + }; + _.pf = function yNc(a, b) { + vNc(BD(a, 37), b); + }; + var lNc, mNc, nNc, oNc, pNc, qNc, rNc, sNc; + mdb(Lqe, "OrthogonalEdgeRouter", 1458); + bcb(1451, 1, Bqe, NNc); + _.Yf = function ONc(a) { + return INc(BD(a, 37)); + }; + _.pf = function PNc(a, b) { + KNc(this, BD(a, 37), b); + }; + var zNc, ANc, BNc, CNc, DNc, ENc; + mdb(Lqe, "PolylineEdgeRouter", 1451); + bcb(1452, 1, Vke, RNc); + _.Lb = function SNc(a) { + return QNc(BD(a, 10)); + }; + _.Fb = function TNc(a) { + return this === a; + }; + _.Mb = function UNc(a) { + return QNc(BD(a, 10)); + }; + mdb(Lqe, "PolylineEdgeRouter/1", 1452); + bcb(1809, 1, Oie, ZNc); + _.Mb = function $Nc(a) { + return BD(a, 129).c == (HOc(), FOc); + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$0$Type", 1809); + bcb(1810, 1, {}, _Nc); + _.Ge = function aOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$1$Type", 1810); + bcb(1811, 1, Oie, bOc); + _.Mb = function cOc(a) { + return BD(a, 129).c == (HOc(), FOc); + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$2$Type", 1811); + bcb(1812, 1, {}, dOc); + _.Ge = function eOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$3$Type", 1812); + bcb(1813, 1, {}, fOc); + _.Ge = function gOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$4$Type", 1813); + bcb(1814, 1, {}, hOc); + _.Ge = function iOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$5$Type", 1814); + bcb(112, 1, { 35: 1, 112: 1 }, uOc); + _.wd = function vOc(a) { + return kOc(this, BD(a, 112)); + }; + _.Fb = function wOc(a) { + var b; + if (JD(a, 112)) { + b = BD(a, 112); + return this.g == b.g; + } + return false; + }; + _.Hb = function xOc() { + return this.g; + }; + _.Ib = function zOc() { + var a, b, c, d; + a = new Wfb("{"); + d = new olb(this.n); + while (d.a < d.c.c.length) { + c = BD(mlb(d), 11); + b = P_b(c.i); + b == null && (b = "n" + S_b(c.i)); + a.a += "" + b; + d.a < d.c.c.length && (a.a += ",", a); + } + a.a += "}"; + return a.a; + }; + _.a = 0; + _.b = 0; + _.c = NaN; + _.d = 0; + _.g = 0; + _.i = 0; + _.o = 0; + _.s = NaN; + mdb(Mqe, "HyperEdgeSegment", 112); + bcb(129, 1, { 129: 1 }, DOc); + _.Ib = function EOc() { + return this.a + "->" + this.b + " (" + Yr(this.c) + ")"; + }; + _.d = 0; + mdb(Mqe, "HyperEdgeSegmentDependency", 129); + bcb(520, 22, { 3: 1, 35: 1, 22: 1, 520: 1 }, IOc); + var FOc, GOc; + var DZ = ndb(Mqe, "HyperEdgeSegmentDependency/DependencyType", 520, CI, KOc, JOc); + var LOc; + bcb(1815, 1, {}, ZOc); + mdb(Mqe, "HyperEdgeSegmentSplitter", 1815); + bcb(1816, 1, {}, aPc); + _.a = 0; + _.b = 0; + mdb(Mqe, "HyperEdgeSegmentSplitter/AreaRating", 1816); + bcb(329, 1, { 329: 1 }, bPc); + _.a = 0; + _.b = 0; + _.c = 0; + mdb(Mqe, "HyperEdgeSegmentSplitter/FreeArea", 329); + bcb(1817, 1, Dke, cPc); + _.ue = function dPc(a, b) { + return _Oc(BD(a, 112), BD(b, 112)); + }; + _.Fb = function ePc(a) { + return this === a; + }; + _.ve = function fPc() { + return new tpb(this); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$0$Type", 1817); + bcb(1818, 1, qie, gPc); + _.td = function hPc(a) { + TOc(this.a, this.d, this.c, this.b, BD(a, 112)); + }; + _.b = 0; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$1$Type", 1818); + bcb(1819, 1, {}, iPc); + _.Kb = function jPc(a) { + return new YAb(null, new Kub(BD(a, 112).e, 16)); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$2$Type", 1819); + bcb(1820, 1, {}, kPc); + _.Kb = function lPc(a) { + return new YAb(null, new Kub(BD(a, 112).j, 16)); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$3$Type", 1820); + bcb(1821, 1, {}, mPc); + _.Fe = function nPc(a) { + return Edb(ED(a)); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$4$Type", 1821); + bcb(655, 1, {}, tPc); + _.a = 0; + _.b = 0; + _.c = 0; + mdb(Mqe, "OrthogonalRoutingGenerator", 655); + bcb(1638, 1, {}, xPc); + _.Kb = function yPc(a) { + return new YAb(null, new Kub(BD(a, 112).e, 16)); + }; + mdb(Mqe, "OrthogonalRoutingGenerator/lambda$0$Type", 1638); + bcb(1639, 1, {}, zPc); + _.Kb = function APc(a) { + return new YAb(null, new Kub(BD(a, 112).j, 16)); + }; + mdb(Mqe, "OrthogonalRoutingGenerator/lambda$1$Type", 1639); + bcb(661, 1, {}); + mdb(Nqe, "BaseRoutingDirectionStrategy", 661); + bcb(1807, 661, {}, EPc); + _.dg = function FPc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p; + if (!!a.r && !a.q) { + return; + } + k = b + a.o * c; + for (j = new olb(a.n); j.a < j.c.c.length; ) { + i = BD(mlb(j), 11); + l = l7c(OC(GC(m1, 1), nie, 8, 0, [i.i.n, i.n, i.a])).a; + for (h = new olb(i.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (!OZb(g)) { + o2 = g.d; + p = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).a; + if ($wnd.Math.abs(l - p) > qme) { + f = k; + e = a; + d = new f7c(l, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + m = a.r; + if (m) { + n = Edb(ED(Ut(m.e, 0))); + d = new f7c(n, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + f = b + m.o * c; + e = m; + d = new f7c(n, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + d = new f7c(p, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + } + } + } + }; + _.eg = function GPc(a) { + return a.i.n.a + a.n.a + a.a.a; + }; + _.fg = function HPc() { + return Ucd(), Rcd; + }; + _.gg = function IPc() { + return Ucd(), Acd; + }; + mdb(Nqe, "NorthToSouthRoutingStrategy", 1807); + bcb(1808, 661, {}, JPc); + _.dg = function KPc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p; + if (!!a.r && !a.q) { + return; + } + k = b - a.o * c; + for (j = new olb(a.n); j.a < j.c.c.length; ) { + i = BD(mlb(j), 11); + l = l7c(OC(GC(m1, 1), nie, 8, 0, [i.i.n, i.n, i.a])).a; + for (h = new olb(i.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (!OZb(g)) { + o2 = g.d; + p = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).a; + if ($wnd.Math.abs(l - p) > qme) { + f = k; + e = a; + d = new f7c(l, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + m = a.r; + if (m) { + n = Edb(ED(Ut(m.e, 0))); + d = new f7c(n, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + f = b - m.o * c; + e = m; + d = new f7c(n, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + d = new f7c(p, f); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + } + } + } + }; + _.eg = function LPc(a) { + return a.i.n.a + a.n.a + a.a.a; + }; + _.fg = function MPc() { + return Ucd(), Acd; + }; + _.gg = function NPc() { + return Ucd(), Rcd; + }; + mdb(Nqe, "SouthToNorthRoutingStrategy", 1808); + bcb(1806, 661, {}, OPc); + _.dg = function PPc(a, b, c) { + var d, e, f, g, h, i, j, k, l, m, n, o2, p; + if (!!a.r && !a.q) { + return; + } + k = b + a.o * c; + for (j = new olb(a.n); j.a < j.c.c.length; ) { + i = BD(mlb(j), 11); + l = l7c(OC(GC(m1, 1), nie, 8, 0, [i.i.n, i.n, i.a])).b; + for (h = new olb(i.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (!OZb(g)) { + o2 = g.d; + p = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).b; + if ($wnd.Math.abs(l - p) > qme) { + f = k; + e = a; + d = new f7c(f, l); + Dsb(g.a, d); + BPc(this, g, e, d, true); + m = a.r; + if (m) { + n = Edb(ED(Ut(m.e, 0))); + d = new f7c(f, n); + Dsb(g.a, d); + BPc(this, g, e, d, true); + f = b + m.o * c; + e = m; + d = new f7c(f, n); + Dsb(g.a, d); + BPc(this, g, e, d, true); + } + d = new f7c(f, p); + Dsb(g.a, d); + BPc(this, g, e, d, true); + } + } + } + } + }; + _.eg = function QPc(a) { + return a.i.n.b + a.n.b + a.a.b; + }; + _.fg = function RPc() { + return Ucd(), zcd; + }; + _.gg = function SPc() { + return Ucd(), Tcd; + }; + mdb(Nqe, "WestToEastRoutingStrategy", 1806); + bcb(813, 1, {}, YPc); + _.Ib = function ZPc() { + return Fe(this.a); + }; + _.b = 0; + _.c = false; + _.d = false; + _.f = 0; + mdb(Pqe, "NubSpline", 813); + bcb(407, 1, { 407: 1 }, aQc, bQc); + mdb(Pqe, "NubSpline/PolarCP", 407); + bcb(1453, 1, Bqe, vQc); + _.Yf = function xQc(a) { + return qQc(BD(a, 37)); + }; + _.pf = function yQc(a, b) { + uQc(this, BD(a, 37), b); + }; + var cQc, dQc, eQc, fQc, gQc; + mdb(Pqe, "SplineEdgeRouter", 1453); + bcb(268, 1, { 268: 1 }, BQc); + _.Ib = function CQc() { + return this.a + " ->(" + this.c + ") " + this.b; + }; + _.c = 0; + mdb(Pqe, "SplineEdgeRouter/Dependency", 268); + bcb(455, 22, { 3: 1, 35: 1, 22: 1, 455: 1 }, GQc); + var DQc, EQc; + var YZ = ndb(Pqe, "SplineEdgeRouter/SideToProcess", 455, CI, IQc, HQc); + var JQc; + bcb(1454, 1, Oie, LQc); + _.Mb = function MQc(a) { + return hQc(), !BD(a, 128).o; + }; + mdb(Pqe, "SplineEdgeRouter/lambda$0$Type", 1454); + bcb(1455, 1, {}, NQc); + _.Ge = function OQc(a) { + return hQc(), BD(a, 128).v + 1; + }; + mdb(Pqe, "SplineEdgeRouter/lambda$1$Type", 1455); + bcb(1456, 1, qie, PQc); + _.td = function QQc(a) { + sQc(this.a, this.b, BD(a, 46)); + }; + mdb(Pqe, "SplineEdgeRouter/lambda$2$Type", 1456); + bcb(1457, 1, qie, RQc); + _.td = function SQc(a) { + tQc(this.a, this.b, BD(a, 46)); + }; + mdb(Pqe, "SplineEdgeRouter/lambda$3$Type", 1457); + bcb(128, 1, { 35: 1, 128: 1 }, YQc, ZQc); + _.wd = function $Qc(a) { + return WQc(this, BD(a, 128)); + }; + _.b = 0; + _.e = false; + _.f = 0; + _.g = 0; + _.j = false; + _.k = false; + _.n = 0; + _.o = false; + _.p = false; + _.q = false; + _.s = 0; + _.u = 0; + _.v = 0; + _.F = 0; + mdb(Pqe, "SplineSegment", 128); + bcb(459, 1, { 459: 1 }, _Qc); + _.a = 0; + _.b = false; + _.c = false; + _.d = false; + _.e = false; + _.f = 0; + mdb(Pqe, "SplineSegment/EdgeInformation", 459); + bcb(1234, 1, {}, hRc); + mdb(Uqe, hme, 1234); + bcb(1235, 1, Dke, jRc); + _.ue = function kRc(a, b) { + return iRc(BD(a, 135), BD(b, 135)); + }; + _.Fb = function lRc(a) { + return this === a; + }; + _.ve = function mRc() { + return new tpb(this); + }; + mdb(Uqe, ime, 1235); + bcb(1233, 1, {}, tRc); + mdb(Uqe, "MrTree", 1233); + bcb(393, 22, { 3: 1, 35: 1, 22: 1, 393: 1, 246: 1, 234: 1 }, ARc); + _.Kf = function CRc() { + return zRc(this); + }; + _.Xf = function BRc() { + return zRc(this); + }; + var uRc, vRc, wRc, xRc; + var h$ = ndb(Uqe, "TreeLayoutPhases", 393, CI, ERc, DRc); + var FRc; + bcb(1130, 209, Mle, HRc); + _.Ze = function IRc(a, b) { + var c, d, e, f, g, h, i; + Ccb(DD(hkd(a, (JTc(), ATc)))) || $Cb((c = new _Cb((Pgd(), new bhd(a))), c)); + g = (h = new SRc(), tNb(h, a), yNb(h, (mTc(), dTc), a), i = new Lqb(), pRc(a, h, i), oRc(a, h, i), h); + f = gRc(this.a, g); + for (e = new olb(f); e.a < e.c.c.length; ) { + d = BD(mlb(e), 135); + rRc(this.b, d, Udd(b, 1 / f.c.length)); + } + g = fRc(f); + nRc(g); + }; + mdb(Uqe, "TreeLayoutProvider", 1130); + bcb(1847, 1, vie, KRc); + _.Jc = function LRc(a) { + reb(this, a); + }; + _.Kc = function MRc() { + return mmb(), Emb(), Dmb; + }; + mdb(Uqe, "TreeUtil/1", 1847); + bcb(1848, 1, vie, NRc); + _.Jc = function ORc(a) { + reb(this, a); + }; + _.Kc = function PRc() { + return mmb(), Emb(), Dmb; + }; + mdb(Uqe, "TreeUtil/2", 1848); + bcb(502, 134, { 3: 1, 502: 1, 94: 1, 134: 1 }); + _.g = 0; + mdb(Vqe, "TGraphElement", 502); + bcb(188, 502, { 3: 1, 188: 1, 502: 1, 94: 1, 134: 1 }, QRc); + _.Ib = function RRc() { + return !!this.b && !!this.c ? WRc(this.b) + "->" + WRc(this.c) : "e_" + tb(this); + }; + mdb(Vqe, "TEdge", 188); + bcb(135, 134, { 3: 1, 135: 1, 94: 1, 134: 1 }, SRc); + _.Ib = function TRc() { + var a, b, c, d, e; + e = null; + for (d = Jsb(this.b, 0); d.b != d.d.c; ) { + c = BD(Xsb(d), 86); + e += (c.c == null || c.c.length == 0 ? "n_" + c.g : "n_" + c.c) + "\n"; + } + for (b = Jsb(this.a, 0); b.b != b.d.c; ) { + a = BD(Xsb(b), 188); + e += (!!a.b && !!a.c ? WRc(a.b) + "->" + WRc(a.c) : "e_" + tb(a)) + "\n"; + } + return e; + }; + var n$ = mdb(Vqe, "TGraph", 135); + bcb(633, 502, { 3: 1, 502: 1, 633: 1, 94: 1, 134: 1 }); + mdb(Vqe, "TShape", 633); + bcb(86, 633, { 3: 1, 502: 1, 86: 1, 633: 1, 94: 1, 134: 1 }, XRc); + _.Ib = function YRc() { + return WRc(this); + }; + var q$ = mdb(Vqe, "TNode", 86); + bcb(255, 1, vie, ZRc); + _.Jc = function $Rc(a) { + reb(this, a); + }; + _.Kc = function _Rc() { + var a; + return a = Jsb(this.a.d, 0), new aSc(a); + }; + mdb(Vqe, "TNode/2", 255); + bcb(358, 1, aie, aSc); + _.Nb = function bSc(a) { + Rrb(this, a); + }; + _.Pb = function dSc() { + return BD(Xsb(this.a), 188).c; + }; + _.Ob = function cSc() { + return Wsb(this.a); + }; + _.Qb = function eSc() { + Zsb(this.a); + }; + mdb(Vqe, "TNode/2/1", 358); + bcb(1840, 1, ene, hSc); + _.pf = function jSc(a, b) { + gSc(this, BD(a, 135), b); + }; + mdb(Wqe, "FanProcessor", 1840); + bcb(327, 22, { 3: 1, 35: 1, 22: 1, 327: 1, 234: 1 }, rSc); + _.Kf = function sSc() { + switch (this.g) { + case 0: + return new QSc(); + case 1: + return new hSc(); + case 2: + return new GSc(); + case 3: + return new zSc(); + case 4: + return new NSc(); + case 5: + return new TSc(); + default: + throw vbb(new Wdb(Dne + (this.f != null ? this.f : "" + this.g))); + } + }; + var kSc, lSc, mSc, nSc, oSc, pSc; + var t$ = ndb(Wqe, Ene, 327, CI, uSc, tSc); + var vSc; + bcb(1843, 1, ene, zSc); + _.pf = function ASc(a, b) { + xSc(this, BD(a, 135), b); + }; + _.a = 0; + mdb(Wqe, "LevelHeightProcessor", 1843); + bcb(1844, 1, vie, BSc); + _.Jc = function CSc(a) { + reb(this, a); + }; + _.Kc = function DSc() { + return mmb(), Emb(), Dmb; + }; + mdb(Wqe, "LevelHeightProcessor/1", 1844); + bcb(1841, 1, ene, GSc); + _.pf = function HSc(a, b) { + ESc(this, BD(a, 135), b); + }; + _.a = 0; + mdb(Wqe, "NeighborsProcessor", 1841); + bcb(1842, 1, vie, ISc); + _.Jc = function JSc(a) { + reb(this, a); + }; + _.Kc = function KSc() { + return mmb(), Emb(), Dmb; + }; + mdb(Wqe, "NeighborsProcessor/1", 1842); + bcb(1845, 1, ene, NSc); + _.pf = function OSc(a, b) { + LSc(this, BD(a, 135), b); + }; + _.a = 0; + mdb(Wqe, "NodePositionProcessor", 1845); + bcb(1839, 1, ene, QSc); + _.pf = function RSc(a, b) { + PSc(this, BD(a, 135)); + }; + mdb(Wqe, "RootProcessor", 1839); + bcb(1846, 1, ene, TSc); + _.pf = function USc(a, b) { + SSc(BD(a, 135)); + }; + mdb(Wqe, "Untreeifyer", 1846); + var VSc, WSc, XSc, YSc, ZSc, $Sc, _Sc, aTc, bTc, cTc, dTc, eTc, fTc, gTc, hTc, iTc, jTc, kTc, lTc; + bcb(851, 1, ale, sTc); + _.Qe = function tTc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zqe), ""), "Weighting of Nodes"), "Which weighting to use when computing a node order."), qTc), (_5c(), V5c)), E$), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $qe), ""), "Search Order"), "Which search order to use when computing a spanning tree."), oTc), V5c), F$), pqb(L5c)))); + KTc((new LTc(), a)); + }; + var nTc, oTc, pTc, qTc; + mdb(_qe, "MrTreeMetaDataProvider", 851); + bcb(994, 1, ale, LTc); + _.Qe = function MTc(a) { + KTc(a); + }; + var uTc, vTc, wTc, xTc, yTc, zTc, ATc, BTc, CTc, DTc, ETc, FTc, GTc, HTc, ITc; + mdb(_qe, "MrTreeOptions", 994); + bcb(995, 1, {}, NTc); + _.$e = function OTc() { + var a; + return a = new HRc(), a; + }; + _._e = function PTc(a) { + }; + mdb(_qe, "MrTreeOptions/MrtreeFactory", 995); + bcb(480, 22, { 3: 1, 35: 1, 22: 1, 480: 1 }, TTc); + var QTc, RTc; + var E$ = ndb(_qe, "OrderWeighting", 480, CI, VTc, UTc); + var WTc; + bcb(425, 22, { 3: 1, 35: 1, 22: 1, 425: 1 }, _Tc); + var YTc, ZTc; + var F$ = ndb(_qe, "TreeifyingOrder", 425, CI, bUc, aUc); + var cUc; + bcb(1459, 1, Bqe, lUc); + _.Yf = function mUc(a) { + return BD(a, 135), eUc; + }; + _.pf = function nUc(a, b) { + kUc(this, BD(a, 135), b); + }; + var eUc; + mdb("org.eclipse.elk.alg.mrtree.p1treeify", "DFSTreeifyer", 1459); + bcb(1460, 1, Bqe, sUc); + _.Yf = function tUc(a) { + return BD(a, 135), oUc; + }; + _.pf = function uUc(a, b) { + rUc(this, BD(a, 135), b); + }; + var oUc; + mdb("org.eclipse.elk.alg.mrtree.p2order", "NodeOrderer", 1460); + bcb(1461, 1, Bqe, CUc); + _.Yf = function DUc(a) { + return BD(a, 135), vUc; + }; + _.pf = function EUc(a, b) { + AUc(this, BD(a, 135), b); + }; + _.a = 0; + var vUc; + mdb("org.eclipse.elk.alg.mrtree.p3place", "NodePlacer", 1461); + bcb(1462, 1, Bqe, IUc); + _.Yf = function JUc(a) { + return BD(a, 135), FUc; + }; + _.pf = function KUc(a, b) { + HUc(BD(a, 135), b); + }; + var FUc; + mdb("org.eclipse.elk.alg.mrtree.p4route", "EdgeRouter", 1462); + var LUc; + bcb(495, 22, { 3: 1, 35: 1, 22: 1, 495: 1, 246: 1, 234: 1 }, RUc); + _.Kf = function TUc() { + return QUc(this); + }; + _.Xf = function SUc() { + return QUc(this); + }; + var NUc, OUc; + var K$ = ndb(cre, "RadialLayoutPhases", 495, CI, VUc, UUc); + var WUc; + bcb(1131, 209, Mle, ZUc); + _.Ze = function $Uc(a, b) { + var c, d, e, f, g, h; + c = YUc(this, a); + Odd(b, "Radial layout", c.c.length); + Ccb(DD(hkd(a, (ZWc(), QWc)))) || $Cb((d = new _Cb((Pgd(), new bhd(a))), d)); + h = aVc(a); + jkd(a, (MUc(), LUc), h); + if (!h) { + throw vbb(new Wdb("The given graph is not a tree!")); + } + e = Edb(ED(hkd(a, VWc))); + e == 0 && (e = _Uc(a)); + jkd(a, VWc, e); + for (g = new olb(YUc(this, a)); g.a < g.c.c.length; ) { + f = BD(mlb(g), 51); + f.pf(a, Udd(b, 1)); + } + Qdd(b); + }; + mdb(cre, "RadialLayoutProvider", 1131); + bcb(549, 1, Dke, jVc); + _.ue = function kVc(a, b) { + return iVc(this.a, this.b, BD(a, 33), BD(b, 33)); + }; + _.Fb = function lVc(a) { + return this === a; + }; + _.ve = function mVc() { + return new tpb(this); + }; + _.a = 0; + _.b = 0; + mdb(cre, "RadialUtil/lambda$0$Type", 549); + bcb(1375, 1, ene, oVc); + _.pf = function pVc(a, b) { + nVc(BD(a, 33), b); + }; + mdb(fre, "CalculateGraphSize", 1375); + bcb(442, 22, { 3: 1, 35: 1, 22: 1, 442: 1, 234: 1 }, uVc); + _.Kf = function vVc() { + switch (this.g) { + case 0: + return new bWc(); + case 1: + return new NVc(); + case 2: + return new oVc(); + default: + throw vbb(new Wdb(Dne + (this.f != null ? this.f : "" + this.g))); + } + }; + var qVc, rVc, sVc; + var O$ = ndb(fre, Ene, 442, CI, xVc, wVc); + var yVc; + bcb(645, 1, {}); + _.e = 1; + _.g = 0; + mdb(gre, "AbstractRadiusExtensionCompaction", 645); + bcb(1772, 645, {}, KVc); + _.hg = function LVc(a) { + var b, c, d, e, f, g, h, i, j; + this.c = BD(hkd(a, (MUc(), LUc)), 33); + EVc(this, this.c); + this.d = tXc(BD(hkd(a, (ZWc(), WWc)), 293)); + i = BD(hkd(a, KWc), 19); + !!i && DVc(this, i.a); + h = ED(hkd(a, (Y9c(), T9c))); + FVc(this, (uCb(h), h)); + j = gVc(this.c); + !!this.d && this.d.lg(j); + GVc(this, j); + g = new amb(OC(GC(E2, 1), hre, 33, 0, [this.c])); + for (c = 0; c < 2; c++) { + for (b = 0; b < j.c.length; b++) { + e = new amb(OC(GC(E2, 1), hre, 33, 0, [(tCb(b, j.c.length), BD(j.c[b], 33))])); + f = b < j.c.length - 1 ? (tCb(b + 1, j.c.length), BD(j.c[b + 1], 33)) : (tCb(0, j.c.length), BD(j.c[0], 33)); + d = b == 0 ? BD(Ikb(j, j.c.length - 1), 33) : (tCb(b - 1, j.c.length), BD(j.c[b - 1], 33)); + IVc(this, (tCb(b, j.c.length), BD(j.c[b], 33), g), d, f, e); + } + } + }; + mdb(gre, "AnnulusWedgeCompaction", 1772); + bcb(1374, 1, ene, NVc); + _.pf = function OVc(a, b) { + MVc(BD(a, 33), b); + }; + mdb(gre, "GeneralCompactor", 1374); + bcb(1771, 645, {}, SVc); + _.hg = function TVc(a) { + var b, c, d, e; + c = BD(hkd(a, (MUc(), LUc)), 33); + this.f = c; + this.b = tXc(BD(hkd(a, (ZWc(), WWc)), 293)); + e = BD(hkd(a, KWc), 19); + !!e && DVc(this, e.a); + d = ED(hkd(a, (Y9c(), T9c))); + FVc(this, (uCb(d), d)); + b = gVc(c); + !!this.b && this.b.lg(b); + QVc(this, b); + }; + _.a = 0; + mdb(gre, "RadialCompaction", 1771); + bcb(1779, 1, {}, VVc); + _.ig = function WVc(a) { + var b, c, d, e, f, g; + this.a = a; + b = 0; + g = gVc(a); + d = 0; + for (f = new olb(g); f.a < f.c.c.length; ) { + e = BD(mlb(f), 33); + ++d; + for (c = d; c < g.c.length; c++) { + UVc(this, e, (tCb(c, g.c.length), BD(g.c[c], 33))) && (b += 1); + } + } + return b; + }; + mdb(ire, "CrossingMinimizationPosition", 1779); + bcb(1777, 1, {}, XVc); + _.ig = function YVc(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n; + d = 0; + for (c = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 79); + h = atd(BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82)); + j = h.i + h.g / 2; + k = h.j + h.f / 2; + e = a.i + a.g / 2; + f = a.j + a.f / 2; + l = new d7c(); + l.a = j - e; + l.b = k - f; + g = new f7c(l.a, l.b); + l6c(g, a.g, a.f); + l.a -= g.a; + l.b -= g.b; + e = j - l.a; + f = k - l.b; + i = new f7c(l.a, l.b); + l6c(i, h.g, h.f); + l.a -= i.a; + l.b -= i.b; + j = e + l.a; + k = f + l.b; + m = j - e; + n = k - f; + d += $wnd.Math.sqrt(m * m + n * n); + } + return d; + }; + mdb(ire, "EdgeLengthOptimization", 1777); + bcb(1778, 1, {}, ZVc); + _.ig = function $Vc(a) { + var b, c, d, e, f, g, h, i, j, k, l; + d = 0; + for (c = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c); ) { + b = BD(Rr(c), 79); + h = atd(BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82)); + i = h.i + h.g / 2; + j = h.j + h.f / 2; + e = BD(hkd(h, (Y9c(), C9c)), 8); + f = a.i + e.a + a.g / 2; + g = a.j + e.b + a.f; + k = i - f; + l = j - g; + d += $wnd.Math.sqrt(k * k + l * l); + } + return d; + }; + mdb(ire, "EdgeLengthPositionOptimization", 1778); + bcb(1373, 645, ene, bWc); + _.pf = function cWc(a, b) { + aWc(this, BD(a, 33), b); + }; + mdb("org.eclipse.elk.alg.radial.intermediate.overlaps", "RadiusExtensionOverlapRemoval", 1373); + bcb(426, 22, { 3: 1, 35: 1, 22: 1, 426: 1 }, hWc); + var dWc, eWc; + var X$ = ndb(kre, "AnnulusWedgeCriteria", 426, CI, jWc, iWc); + var kWc; + bcb(380, 22, { 3: 1, 35: 1, 22: 1, 380: 1 }, rWc); + var mWc, nWc, oWc; + var Y$ = ndb(kre, Sle, 380, CI, tWc, sWc); + var uWc; + bcb(852, 1, ale, IWc); + _.Qe = function JWc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), lre), ""), "Order ID"), "The id can be used to define an order for nodes of one radius. This can be used to sort them in the layer accordingly."), meb(0)), (_5c(), X5c)), JI), pqb((N5c(), K5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mre), ""), "Radius"), "The radius option can be used to set the initial radius for the radial layouter."), 0), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), nre), ""), "Compaction"), "With the compacter option it can be determined how compaction on the graph is done. It can be chosen between none, the radial compaction or the compaction of wedges separately."), yWc), V5c), Y$), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ore), ""), "Compaction Step Size"), "Determine the size of steps with which the compaction is done. Step size 1 correlates to a compaction of 1 pixel per Iteration."), meb(1)), X5c), JI), pqb(L5c)))); + o4c(a, ore, nre, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), pre), ""), "Sorter"), "Sort the nodes per radius according to the sorting algorithm. The strategies are none, by the given order id, or sorting them by polar coordinates."), EWc), V5c), b_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), qre), ""), "Annulus Wedge Criteria"), "Determine how the wedge for the node placement is calculated. It can be chosen between wedge determination by the number of leaves or by the maximum sum of diagonals."), GWc), V5c), X$), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), rre), ""), "Translation Optimization"), "Find the optimal translation of the nodes of the first radii according to this criteria. For example edge crossings can be minimized."), AWc), V5c), a_), pqb(L5c)))); + $Wc((new _Wc(), a)); + }; + var wWc, xWc, yWc, zWc, AWc, BWc, CWc, DWc, EWc, FWc, GWc; + mdb(kre, "RadialMetaDataProvider", 852); + bcb(996, 1, ale, _Wc); + _.Qe = function aXc(a) { + $Wc(a); + }; + var KWc, LWc, MWc, NWc, OWc, PWc, QWc, RWc, SWc, TWc, UWc, VWc, WWc, XWc, YWc; + mdb(kre, "RadialOptions", 996); + bcb(997, 1, {}, bXc); + _.$e = function cXc() { + var a; + return a = new ZUc(), a; + }; + _._e = function dXc(a) { + }; + mdb(kre, "RadialOptions/RadialFactory", 997); + bcb(340, 22, { 3: 1, 35: 1, 22: 1, 340: 1 }, kXc); + var eXc, fXc, gXc, hXc; + var a_ = ndb(kre, "RadialTranslationStrategy", 340, CI, mXc, lXc); + var nXc; + bcb(293, 22, { 3: 1, 35: 1, 22: 1, 293: 1 }, uXc); + var pXc, qXc, rXc; + var b_ = ndb(kre, "SortingStrategy", 293, CI, wXc, vXc); + var xXc; + bcb(1449, 1, Bqe, CXc); + _.Yf = function DXc(a) { + return BD(a, 33), null; + }; + _.pf = function EXc(a, b) { + AXc(this, BD(a, 33), b); + }; + _.c = 0; + mdb("org.eclipse.elk.alg.radial.p1position", "EadesRadial", 1449); + bcb(1775, 1, {}, FXc); + _.jg = function GXc(a) { + return eVc(a); + }; + mdb(tre, "AnnulusWedgeByLeafs", 1775); + bcb(1776, 1, {}, IXc); + _.jg = function JXc(a) { + return HXc(this, a); + }; + mdb(tre, "AnnulusWedgeByNodeSpace", 1776); + bcb(1450, 1, Bqe, MXc); + _.Yf = function NXc(a) { + return BD(a, 33), null; + }; + _.pf = function OXc(a, b) { + KXc(this, BD(a, 33), b); + }; + mdb("org.eclipse.elk.alg.radial.p2routing", "StraightLineEdgeRouter", 1450); + bcb(811, 1, {}, QXc); + _.kg = function RXc(a) { + }; + _.lg = function TXc(a) { + PXc(this, a); + }; + mdb(ure, "IDSorter", 811); + bcb(1774, 1, Dke, UXc); + _.ue = function VXc(a, b) { + return SXc(BD(a, 33), BD(b, 33)); + }; + _.Fb = function WXc(a) { + return this === a; + }; + _.ve = function XXc() { + return new tpb(this); + }; + mdb(ure, "IDSorter/lambda$0$Type", 1774); + bcb(1773, 1, {}, $Xc); + _.kg = function _Xc(a) { + YXc(this, a); + }; + _.lg = function aYc(a) { + var b; + if (!a.dc()) { + if (!this.e) { + b = bVc(BD(a.Xb(0), 33)); + YXc(this, b); + } + PXc(this.e, a); + } + }; + mdb(ure, "PolarCoordinateSorter", 1773); + bcb(1136, 209, Mle, bYc); + _.Ze = function eYc(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B, C, D, F; + Odd(b, "Rectangle Packing", 1); + b.n && b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + c = Edb(ED(hkd(a, (lZc(), RYc)))); + p = BD(hkd(a, eZc), 381); + s = Ccb(DD(hkd(a, ZYc))); + w = Ccb(DD(hkd(a, dZc))); + l = Ccb(DD(hkd(a, VYc))); + A = BD(hkd(a, fZc), 116); + v = Edb(ED(hkd(a, jZc))); + e = Ccb(DD(hkd(a, iZc))); + m = Ccb(DD(hkd(a, WYc))); + r = Ccb(DD(hkd(a, XYc))); + F = Edb(ED(hkd(a, kZc))); + C = (!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a); + r$c(C); + if (r) { + o2 = new Rkb(); + for (i = new Fyd(C); i.e != i.i.gc(); ) { + g = BD(Dyd(i), 33); + ikd(g, UYc) && (o2.c[o2.c.length] = g, true); + } + for (j = new olb(o2); j.a < j.c.c.length; ) { + g = BD(mlb(j), 33); + Ftd(C, g); + } + mmb(); + Okb(o2, new fYc()); + for (k = new olb(o2); k.a < k.c.c.length; ) { + g = BD(mlb(k), 33); + B = BD(hkd(g, UYc), 19).a; + B = $wnd.Math.min(B, C.i); + vtd(C, B, g); + } + q = 0; + for (h = new Fyd(C); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 33); + jkd(g, TYc, meb(q)); + ++q; + } + } + u = rfd(a); + u.a -= A.b + A.c; + u.b -= A.d + A.a; + t = u.a; + if (F < 0 || F < u.a) { + n = new nYc(c, p, s); + f = jYc(n, C, v, A); + b.n && b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + } else { + f = new d$c(c, F, 0, (k$c(), j$c)); + } + u.a += A.b + A.c; + u.b += A.d + A.a; + if (!w) { + r$c(C); + D = new DZc(c, l, m, e, v); + t = $wnd.Math.max(u.a, f.c); + f = CZc(D, C, t, u, b, a, A); + } + cYc(C, A); + Afd(a, f.c + (A.b + A.c), f.b + (A.d + A.a), false, true); + Ccb(DD(hkd(a, cZc))) || $Cb((d = new _Cb((Pgd(), new bhd(a))), d)); + b.n && b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + Qdd(b); + }; + mdb(yre, "RectPackingLayoutProvider", 1136); + bcb(1137, 1, Dke, fYc); + _.ue = function gYc(a, b) { + return dYc(BD(a, 33), BD(b, 33)); + }; + _.Fb = function hYc(a) { + return this === a; + }; + _.ve = function iYc() { + return new tpb(this); + }; + mdb(yre, "RectPackingLayoutProvider/lambda$0$Type", 1137); + bcb(1256, 1, {}, nYc); + _.a = 0; + _.c = false; + mdb(zre, "AreaApproximation", 1256); + var o_ = odb(zre, "BestCandidateFilter"); + bcb(638, 1, { 526: 1 }, oYc); + _.mg = function pYc(a, b, c) { + var d, e, f, g, h, i; + i = new Rkb(); + f = Pje; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 220); + f = $wnd.Math.min(f, (g.c + (c.b + c.c)) * (g.b + (c.d + c.a))); + } + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 220); + (d.c + (c.b + c.c)) * (d.b + (c.d + c.a)) == f && (i.c[i.c.length] = d, true); + } + return i; + }; + mdb(zre, "AreaFilter", 638); + bcb(639, 1, { 526: 1 }, qYc); + _.mg = function rYc(a, b, c) { + var d, e, f, g, h, i; + h = new Rkb(); + i = Pje; + for (g = new olb(a); g.a < g.c.c.length; ) { + f = BD(mlb(g), 220); + i = $wnd.Math.min(i, $wnd.Math.abs((f.c + (c.b + c.c)) / (f.b + (c.d + c.a)) - b)); + } + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 220); + $wnd.Math.abs((d.c + (c.b + c.c)) / (d.b + (c.d + c.a)) - b) == i && (h.c[h.c.length] = d, true); + } + return h; + }; + mdb(zre, "AspectRatioFilter", 639); + bcb(637, 1, { 526: 1 }, uYc); + _.mg = function vYc(a, b, c) { + var d, e, f, g, h, i; + i = new Rkb(); + f = Qje; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 220); + f = $wnd.Math.max(f, q$c(g.c + (c.b + c.c), g.b + (c.d + c.a), g.a)); + } + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 220); + q$c(d.c + (c.b + c.c), d.b + (c.d + c.a), d.a) == f && (i.c[i.c.length] = d, true); + } + return i; + }; + mdb(zre, "ScaleMeasureFilter", 637); + bcb(381, 22, { 3: 1, 35: 1, 22: 1, 381: 1 }, AYc); + var wYc, xYc, yYc; + var q_ = ndb(Are, "OptimizationGoal", 381, CI, CYc, BYc); + var DYc; + bcb(856, 1, ale, PYc); + _.Qe = function QYc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Bre), ""), "Optimization Goal"), "Optimization goal for approximation of the bounding box given by the first iteration. Determines whether layout is sorted by the maximum scaling, aspect ratio, or area. Depending on the strategy the aspect ratio might be nearly ignored."), LYc), (_5c(), V5c)), q_), pqb((N5c(), K5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Cre), ""), "Shift Last Placed."), "When placing a rectangle behind or below the last placed rectangle in the first iteration, it is sometimes possible to shift the rectangle further to the left or right, resulting in less whitespace. True (default) enables the shift and false disables it. Disabling the shift produces a greater approximated area by the first iteration and a layout, when using ONLY the first iteration (default not the case), where it is sometimes impossible to implement a size transformation of rectangles that will fill the bounding box and eliminate empty spaces."), (Bcb(), true)), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Dre), ""), "Current position of a node in the order of nodes"), "The rectangles are ordered. Normally according to their definition the the model. This option specifies the current position of a node."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ere), ""), "Desired index of node"), "The rectangles are ordered. Normally according to their definition the the model. This option allows to specify a desired position that has preference over the original position."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Fre), ""), "Only Area Approximation"), "If enabled only the width approximation step is executed and the nodes are placed accordingly. The nodes are layouted according to the packingStrategy. If set to true not expansion of nodes is taking place."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Gre), ""), "Compact Rows"), "Enables compaction. Compacts blocks if they do not use the full height of the row. This option allows to have a smaller drawing. If this option is disabled all nodes are placed next to each other in rows."), true), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Hre), ""), "Fit Aspect Ratio"), "Expands nodes if expandNodes is true to fit the aspect ratio instead of only in their bounds. The option is only useful if the used packingStrategy is ASPECT_RATIO_DRIVEN, otherwise this may result in unreasonable ndoe expansion."), false), T5c), wI), pqb(K5c)))); + o4c(a, Hre, Jre, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ire), ""), "Target Width"), "Option to place the rectangles in the given target width instead of approximating the width using the desired aspect ratio. The padding is not included in this. Meaning a drawing will have width of targetwidth + horizontal padding."), -1), U5c), BI), pqb(K5c)))); + mZc((new nZc(), a)); + }; + var FYc, GYc, HYc, IYc, JYc, KYc, LYc, MYc, NYc; + mdb(Are, "RectPackingMetaDataProvider", 856); + bcb(1004, 1, ale, nZc); + _.Qe = function oZc(a) { + mZc(a); + }; + var RYc, SYc, TYc, UYc, VYc, WYc, XYc, YYc, ZYc, $Yc, _Yc, aZc, bZc, cZc, dZc, eZc, fZc, gZc, hZc, iZc, jZc, kZc; + mdb(Are, "RectPackingOptions", 1004); + bcb(1005, 1, {}, pZc); + _.$e = function qZc() { + var a; + return a = new bYc(), a; + }; + _._e = function rZc(a) { + }; + mdb(Are, "RectPackingOptions/RectpackingFactory", 1005); + bcb(1257, 1, {}, DZc); + _.a = 0; + _.b = false; + _.c = 0; + _.d = 0; + _.e = false; + _.f = false; + _.g = 0; + mdb("org.eclipse.elk.alg.rectpacking.seconditeration", "RowFillingAndCompaction", 1257); + bcb(187, 1, { 187: 1 }, PZc); + _.a = 0; + _.c = false; + _.d = 0; + _.e = 0; + _.f = 0; + _.g = 0; + _.i = 0; + _.k = false; + _.o = Pje; + _.p = Pje; + _.r = 0; + _.s = 0; + _.t = 0; + mdb(Lre, "Block", 187); + bcb(211, 1, { 211: 1 }, VZc); + _.a = 0; + _.b = 0; + _.d = 0; + _.e = 0; + _.f = 0; + mdb(Lre, "BlockRow", 211); + bcb(443, 1, { 443: 1 }, b$c); + _.b = 0; + _.c = 0; + _.d = 0; + _.e = 0; + _.f = 0; + mdb(Lre, "BlockStack", 443); + bcb(220, 1, { 220: 1 }, d$c, e$c); + _.a = 0; + _.b = 0; + _.c = 0; + _.d = 0; + _.e = 0; + var z_ = mdb(Lre, "DrawingData", 220); + bcb(355, 22, { 3: 1, 35: 1, 22: 1, 355: 1 }, l$c); + var f$c, g$c, h$c, i$c, j$c; + var y_ = ndb(Lre, "DrawingDataDescriptor", 355, CI, n$c, m$c); + var o$c; + bcb(200, 1, { 200: 1 }, x$c); + _.b = 0; + _.c = 0; + _.e = 0; + _.f = 0; + mdb(Lre, "RectRow", 200); + bcb(756, 1, {}, F$c); + _.j = 0; + mdb(Nre, une, 756); + bcb(1245, 1, {}, G$c); + _.Je = function H$c(a) { + return S6c(a.a, a.b); + }; + mdb(Nre, vne, 1245); + bcb(1246, 1, {}, I$c); + _.Je = function J$c(a) { + return A$c(this.a, a); + }; + mdb(Nre, wne, 1246); + bcb(1247, 1, {}, K$c); + _.Je = function L$c(a) { + return B$c(this.a, a); + }; + mdb(Nre, xne, 1247); + bcb(1248, 1, {}, M$c); + _.Je = function N$c(a) { + return C$c(this.a, a); + }; + mdb(Nre, "ElkGraphImporter/lambda$3$Type", 1248); + bcb(1249, 1, {}, O$c); + _.Je = function P$c(a) { + return D$c(this.a, a); + }; + mdb(Nre, yne, 1249); + bcb(1133, 209, Mle, Q$c); + _.Ze = function S$c(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n; + if (ikd(a, (d0c(), c0c))) { + n = GD(hkd(a, (J0c(), I0c))); + f = h4c(n4c(), n); + if (f) { + g = BD(hgd(f.f), 209); + g.Ze(a, Udd(b, 1)); + } + } + jkd(a, Z_c, (C_c(), A_c)); + jkd(a, $_c, (N_c(), K_c)); + jkd(a, __c, (a1c(), _0c)); + h = BD(hkd(a, (J0c(), E0c)), 19).a; + Odd(b, "Overlap removal", 1); + Ccb(DD(hkd(a, D0c))) && "null45scanlineOverlaps"; + i = new Tqb(); + j = new U$c(i); + d = new F$c(); + c = z$c(d, a); + k = true; + e = 0; + while (e < h && k) { + if (Ccb(DD(hkd(a, F0c)))) { + i.a.$b(); + cOb(new dOb(j), c.i); + if (i.a.gc() == 0) { + break; + } + c.e = i; + } + H2c(this.b); + K2c(this.b, (Y$c(), V$c), (R0c(), Q0c)); + K2c(this.b, W$c, c.g); + K2c(this.b, X$c, (s_c(), r_c)); + this.a = F2c(this.b, c); + for (m = new olb(this.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 51); + l.pf(c, Udd(b, 1)); + } + E$c(d, c); + k = Ccb(DD(vNb(c, (XNb(), WNb)))); + ++e; + } + y$c(d, c); + Qdd(b); + }; + mdb(Nre, "OverlapRemovalLayoutProvider", 1133); + bcb(1134, 1, {}, U$c); + mdb(Nre, "OverlapRemovalLayoutProvider/lambda$0$Type", 1134); + bcb(437, 22, { 3: 1, 35: 1, 22: 1, 437: 1 }, Z$c); + var V$c, W$c, X$c; + var J_ = ndb(Nre, "SPOrEPhases", 437, CI, _$c, $$c); + var a_c; + bcb(1255, 1, {}, d_c); + mdb(Nre, "ShrinkTree", 1255); + bcb(1135, 209, Mle, e_c); + _.Ze = function f_c(a, b) { + var c, d, e, f, g; + if (ikd(a, (d0c(), c0c))) { + g = GD(hkd(a, c0c)); + e = h4c(n4c(), g); + if (e) { + f = BD(hgd(e.f), 209); + f.Ze(a, Udd(b, 1)); + } + } + d = new F$c(); + c = z$c(d, a); + c_c(this.a, c, Udd(b, 1)); + y$c(d, c); + }; + mdb(Nre, "ShrinkTreeLayoutProvider", 1135); + bcb(300, 134, { 3: 1, 300: 1, 94: 1, 134: 1 }, g_c); + _.c = false; + mdb("org.eclipse.elk.alg.spore.graph", "Graph", 300); + bcb(482, 22, { 3: 1, 35: 1, 22: 1, 482: 1, 246: 1, 234: 1 }, k_c); + _.Kf = function m_c() { + return j_c(this); + }; + _.Xf = function l_c() { + return j_c(this); + }; + var h_c; + var N_ = ndb(Ore, Sle, 482, CI, o_c, n_c); + var p_c; + bcb(551, 22, { 3: 1, 35: 1, 22: 1, 551: 1, 246: 1, 234: 1 }, t_c); + _.Kf = function v_c() { + return new I1c(); + }; + _.Xf = function u_c() { + return new I1c(); + }; + var r_c; + var O_ = ndb(Ore, "OverlapRemovalStrategy", 551, CI, x_c, w_c); + var y_c; + bcb(430, 22, { 3: 1, 35: 1, 22: 1, 430: 1 }, D_c); + var A_c, B_c; + var P_ = ndb(Ore, "RootSelection", 430, CI, F_c, E_c); + var G_c; + bcb(316, 22, { 3: 1, 35: 1, 22: 1, 316: 1 }, O_c); + var I_c, J_c, K_c, L_c, M_c; + var Q_ = ndb(Ore, "SpanningTreeCostFunction", 316, CI, Q_c, P_c); + var R_c; + bcb(1002, 1, ale, f0c); + _.Qe = function g0c(a) { + e0c(a); + }; + var T_c, U_c, V_c, W_c, X_c, Y_c, Z_c, $_c, __c, a0c, b0c, c0c; + mdb(Ore, "SporeCompactionOptions", 1002); + bcb(1003, 1, {}, h0c); + _.$e = function i0c() { + var a; + return a = new e_c(), a; + }; + _._e = function j0c(a) { + }; + mdb(Ore, "SporeCompactionOptions/SporeCompactionFactory", 1003); + bcb(855, 1, ale, B0c); + _.Qe = function C0c(a) { + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Qre), ""), "Underlying Layout Algorithm"), "A layout algorithm that is applied to the graph before it is compacted. If this is null, nothing is applied before compaction."), (_5c(), Z5c)), ZI), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Vre), "structure"), "Structure Extraction Strategy"), "This option defines what kind of triangulation or other partitioning of the plane is applied to the vertices."), y0c), V5c), W_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Rre), $re), "Tree Construction Strategy"), "Whether a minimum spanning tree or a maximum spanning tree should be constructed."), w0c), V5c), X_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Sre), $re), "Cost Function for Spanning Tree"), "The cost function is used in the creation of the spanning tree."), u0c), V5c), Q_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tre), $re), "Root node for spanning tree construction"), "The identifier of the node that is preferred as the root of the spanning tree. If this is null, the first node is chosen."), null), Z5c), ZI), pqb(L5c)))); + o4c(a, Tre, Ure, q0c); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ure), $re), "Root selection for spanning tree"), "This sets the method used to select a root node for the construction of a spanning tree"), s0c), V5c), P_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Wre), Bpe), "Compaction Strategy"), "This option defines how the compaction is applied."), l0c), V5c), N_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Xre), Bpe), "Orthogonal Compaction"), "Restricts the translation of nodes to orthogonal directions in the compaction phase."), (Bcb(), false)), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yre), _re), "Upper limit for iterations of overlap removal"), null), meb(64)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zre), _re), "Whether to run a supplementary scanline overlap check."), null), true), T5c), wI), pqb(L5c)))); + K0c((new L0c(), a)); + e0c((new f0c(), a)); + }; + var k0c, l0c, m0c, n0c, o0c, p0c, q0c, r0c, s0c, t0c, u0c, v0c, w0c, x0c, y0c, z0c; + mdb(Ore, "SporeMetaDataProvider", 855); + bcb(_ie, 1, ale, L0c); + _.Qe = function M0c(a) { + K0c(a); + }; + var D0c, E0c, F0c, G0c, H0c, I0c; + mdb(Ore, "SporeOverlapRemovalOptions", _ie); + bcb(1001, 1, {}, N0c); + _.$e = function O0c() { + var a; + return a = new Q$c(), a; + }; + _._e = function P0c(a) { + }; + mdb(Ore, "SporeOverlapRemovalOptions/SporeOverlapFactory", 1001); + bcb(530, 22, { 3: 1, 35: 1, 22: 1, 530: 1, 246: 1, 234: 1 }, T0c); + _.Kf = function V0c() { + return S0c(this); + }; + _.Xf = function U0c() { + return S0c(this); + }; + var Q0c; + var W_ = ndb(Ore, "StructureExtractionStrategy", 530, CI, X0c, W0c); + var Y0c; + bcb(429, 22, { 3: 1, 35: 1, 22: 1, 429: 1, 246: 1, 234: 1 }, c1c); + _.Kf = function e1c() { + return b1c(this); + }; + _.Xf = function d1c() { + return b1c(this); + }; + var $0c, _0c; + var X_ = ndb(Ore, "TreeConstructionStrategy", 429, CI, g1c, f1c); + var h1c; + bcb(1443, 1, Bqe, k1c); + _.Yf = function l1c(a) { + return BD(a, 300), new j3c(); + }; + _.pf = function m1c(a, b) { + j1c(BD(a, 300), b); + }; + mdb(bse, "DelaunayTriangulationPhase", 1443); + bcb(1444, 1, qie, n1c); + _.td = function o1c(a) { + Ekb(this.a, BD(a, 65).a); + }; + mdb(bse, "DelaunayTriangulationPhase/lambda$0$Type", 1444); + bcb(783, 1, Bqe, s1c); + _.Yf = function t1c(a) { + return BD(a, 300), new j3c(); + }; + _.pf = function u1c(a, b) { + this.ng(BD(a, 300), b); + }; + _.ng = function v1c(a, b) { + var c, d, e; + Odd(b, "Minimum spanning tree construction", 1); + a.d ? d = a.d.a : d = BD(Ikb(a.i, 0), 65).a; + Ccb(DD(vNb(a, (XNb(), VNb)))) ? e = UCb(a.e, d, (c = a.b, c)) : e = UCb(a.e, d, a.b); + q1c(this, e, a); + Qdd(b); + }; + mdb(cse, "MinSTPhase", 783); + bcb(1446, 783, Bqe, w1c); + _.ng = function y1c(a, b) { + var c, d, e, f; + Odd(b, "Maximum spanning tree construction", 1); + c = new z1c(a); + a.d ? e = a.d.c : e = BD(Ikb(a.i, 0), 65).c; + Ccb(DD(vNb(a, (XNb(), VNb)))) ? f = UCb(a.e, e, (d = c, d)) : f = UCb(a.e, e, c); + q1c(this, f, a); + Qdd(b); + }; + mdb(cse, "MaxSTPhase", 1446); + bcb(1447, 1, {}, z1c); + _.Je = function A1c(a) { + return x1c(this.a, a); + }; + mdb(cse, "MaxSTPhase/lambda$0$Type", 1447); + bcb(1445, 1, qie, B1c); + _.td = function C1c(a) { + r1c(this.a, BD(a, 65)); + }; + mdb(cse, "MinSTPhase/lambda$0$Type", 1445); + bcb(785, 1, Bqe, I1c); + _.Yf = function J1c(a) { + return BD(a, 300), new j3c(); + }; + _.pf = function K1c(a, b) { + H1c(this, BD(a, 300), b); + }; + _.a = false; + mdb(dse, "GrowTreePhase", 785); + bcb(786, 1, qie, L1c); + _.td = function M1c(a) { + G1c(this.a, this.b, this.c, BD(a, 221)); + }; + mdb(dse, "GrowTreePhase/lambda$0$Type", 786); + bcb(1448, 1, Bqe, Q1c); + _.Yf = function R1c(a) { + return BD(a, 300), new j3c(); + }; + _.pf = function S1c(a, b) { + P1c(this, BD(a, 300), b); + }; + mdb(dse, "ShrinkTreeCompactionPhase", 1448); + bcb(784, 1, qie, T1c); + _.td = function U1c(a) { + O1c(this.a, this.b, this.c, BD(a, 221)); + }; + mdb(dse, "ShrinkTreeCompactionPhase/lambda$0$Type", 784); + var g2 = odb(yqe, "IGraphElementVisitor"); + bcb(860, 1, { 527: 1 }, b2c); + _.og = function e2c(a) { + var b; + b = a2c(this, a); + tNb(b, BD(Ohb(this.b, a), 94)); + $1c(this, a, b); + }; + var V1c, W1c; + mdb(Nle, "LayoutConfigurator", 860); + var h0 = odb(Nle, "LayoutConfigurator/IPropertyHolderOptionFilter"); + bcb(932, 1, { 1933: 1 }, f2c); + _.pg = function g2c(a, b) { + return Y1c(), !a.Xe(b); + }; + mdb(Nle, "LayoutConfigurator/lambda$0$Type", 932); + bcb(933, 1, { 1933: 1 }, i2c); + _.pg = function j2c(a, b) { + return h2c(a, b); + }; + mdb(Nle, "LayoutConfigurator/lambda$1$Type", 933); + bcb(931, 1, { 831: 1 }, k2c); + _.qg = function l2c(a, b) { + return Y1c(), !a.Xe(b); + }; + mdb(Nle, "LayoutConfigurator/lambda$2$Type", 931); + bcb(934, 1, Oie, m2c); + _.Mb = function n2c(a) { + return d2c(this.a, this.b, BD(a, 1933)); + }; + mdb(Nle, "LayoutConfigurator/lambda$3$Type", 934); + bcb(858, 1, {}, w2c); + mdb(Nle, "RecursiveGraphLayoutEngine", 858); + bcb(296, 60, Tie, x2c, y2c); + mdb(Nle, "UnsupportedConfigurationException", 296); + bcb(453, 60, Tie, z2c); + mdb(Nle, "UnsupportedGraphException", 453); + bcb(754, 1, {}); + mdb(yqe, "AbstractRandomListAccessor", 754); + bcb(500, 754, {}, L2c); + _.rg = function N2c() { + return null; + }; + _.d = true; + _.e = true; + _.f = 0; + mdb(fse, "AlgorithmAssembler", 500); + bcb(1236, 1, Oie, O2c); + _.Mb = function P2c(a) { + return !!BD(a, 123); + }; + mdb(fse, "AlgorithmAssembler/lambda$0$Type", 1236); + bcb(1237, 1, {}, Q2c); + _.Kb = function R2c(a) { + return M2c(this.a, BD(a, 123)); + }; + mdb(fse, "AlgorithmAssembler/lambda$1$Type", 1237); + bcb(1238, 1, Oie, S2c); + _.Mb = function T2c(a) { + return !!BD(a, 80); + }; + mdb(fse, "AlgorithmAssembler/lambda$2$Type", 1238); + bcb(1239, 1, qie, U2c); + _.td = function V2c(a) { + d3c(this.a, BD(a, 80)); + }; + mdb(fse, "AlgorithmAssembler/lambda$3$Type", 1239); + bcb(1240, 1, qie, W2c); + _.td = function X2c(a) { + G2c(this.a, this.b, BD(a, 234)); + }; + mdb(fse, "AlgorithmAssembler/lambda$4$Type", 1240); + bcb(1355, 1, Dke, Z2c); + _.ue = function $2c(a, b) { + return Y2c(BD(a, 234), BD(b, 234)); + }; + _.Fb = function _2c(a) { + return this === a; + }; + _.ve = function a3c() { + return new tpb(this); + }; + mdb(fse, "EnumBasedFactoryComparator", 1355); + bcb(80, 754, { 80: 1 }, j3c); + _.rg = function l3c() { + return new Tqb(); + }; + _.a = 0; + mdb(fse, "LayoutProcessorConfiguration", 80); + bcb(1013, 1, { 527: 1 }, q3c); + _.og = function u3c(a) { + stb(n3c, new z3c(a)); + }; + var m3c, n3c, o3c; + mdb(Xke, "DeprecatedLayoutOptionReplacer", 1013); + bcb(1014, 1, qie, v3c); + _.td = function w3c(a) { + r3c(BD(a, 160)); + }; + mdb(Xke, "DeprecatedLayoutOptionReplacer/lambda$0$Type", 1014); + bcb(1015, 1, qie, x3c); + _.td = function y3c(a) { + s3c(BD(a, 160)); + }; + mdb(Xke, "DeprecatedLayoutOptionReplacer/lambda$1$Type", 1015); + bcb(1016, 1, {}, z3c); + _.Od = function A3c(a, b) { + t3c(this.a, BD(a, 146), BD(b, 38)); + }; + mdb(Xke, "DeprecatedLayoutOptionReplacer/lambda$2$Type", 1016); + bcb(149, 1, { 686: 1, 149: 1 }, E3c); + _.Fb = function F3c(a) { + return C3c(this, a); + }; + _.sg = function G3c() { + return this.b; + }; + _.tg = function H3c() { + return this.c; + }; + _.ne = function I3c() { + return this.e; + }; + _.Hb = function J3c() { + return LCb(this.c); + }; + _.Ib = function K3c() { + return "Layout Algorithm: " + this.c; + }; + var E0 = mdb(Xke, "LayoutAlgorithmData", 149); + bcb(263, 1, {}, R3c); + mdb(Xke, "LayoutAlgorithmData/Builder", 263); + bcb(1017, 1, { 527: 1 }, U3c); + _.og = function V3c(a) { + JD(a, 239) && !Ccb(DD(a.We((Y9c(), d9c)))) && S3c(BD(a, 33)); + }; + mdb(Xke, "LayoutAlgorithmResolver", 1017); + bcb(229, 1, { 686: 1, 229: 1 }, W3c); + _.Fb = function X3c(a) { + if (JD(a, 229)) { + return dfb(this.b, BD(a, 229).b); + } + return false; + }; + _.sg = function Y3c() { + return this.a; + }; + _.tg = function Z3c() { + return this.b; + }; + _.ne = function $3c() { + return this.d; + }; + _.Hb = function _3c() { + return LCb(this.b); + }; + _.Ib = function a4c() { + return "Layout Type: " + this.b; + }; + mdb(Xke, "LayoutCategoryData", 229); + bcb(344, 1, {}, e4c); + mdb(Xke, "LayoutCategoryData/Builder", 344); + bcb(867, 1, {}, m4c); + var f4c; + mdb(Xke, "LayoutMetaDataService", 867); + bcb(868, 1, {}, v4c); + mdb(Xke, "LayoutMetaDataService/Registry", 868); + bcb(478, 1, { 478: 1 }, w4c); + mdb(Xke, "LayoutMetaDataService/Registry/Triple", 478); + bcb(869, 1, gse, x4c); + _.ug = function y4c() { + return new d7c(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$0$Type", 869); + bcb(870, 1, hse, z4c); + _.vg = function A4c(a) { + return R6c(BD(a, 8)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$1$Type", 870); + bcb(879, 1, gse, B4c); + _.ug = function C4c() { + return new Rkb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$10$Type", 879); + bcb(880, 1, hse, D4c); + _.vg = function E4c(a) { + return new Tkb(BD(a, 12)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$11$Type", 880); + bcb(881, 1, gse, F4c); + _.ug = function G4c() { + return new Psb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$12$Type", 881); + bcb(882, 1, hse, H4c); + _.vg = function I4c(a) { + return Ru(BD(a, 68)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$13$Type", 882); + bcb(883, 1, gse, J4c); + _.ug = function K4c() { + return new Tqb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$14$Type", 883); + bcb(884, 1, hse, L4c); + _.vg = function M4c(a) { + return Dx(BD(a, 53)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$15$Type", 884); + bcb(885, 1, gse, N4c); + _.ug = function O4c() { + return new zsb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$16$Type", 885); + bcb(886, 1, hse, P4c); + _.vg = function Q4c(a) { + return Gx(BD(a, 53)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$17$Type", 886); + bcb(887, 1, gse, R4c); + _.ug = function S4c() { + return new Gxb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$18$Type", 887); + bcb(888, 1, hse, T4c); + _.vg = function U4c(a) { + return Hx(BD(a, 208)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$19$Type", 888); + bcb(871, 1, gse, V4c); + _.ug = function W4c() { + return new s7c(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$2$Type", 871); + bcb(872, 1, hse, X4c); + _.vg = function Y4c(a) { + return new t7c(BD(a, 74)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$3$Type", 872); + bcb(873, 1, gse, Z4c); + _.ug = function $4c() { + return new H_b(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$4$Type", 873); + bcb(874, 1, hse, _4c); + _.vg = function a5c(a) { + return new K_b(BD(a, 142)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$5$Type", 874); + bcb(875, 1, gse, b5c); + _.ug = function c5c() { + return new p0b(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$6$Type", 875); + bcb(876, 1, hse, d5c); + _.vg = function e5c(a) { + return new r0b(BD(a, 116)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$7$Type", 876); + bcb(877, 1, gse, f5c); + _.ug = function g5c() { + return new _fd(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$8$Type", 877); + bcb(878, 1, hse, h5c); + _.vg = function i5c(a) { + return new agd(BD(a, 373)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$9$Type", 878); + var Q3 = odb(Hle, "IProperty"); + bcb(23, 1, { 35: 1, 686: 1, 23: 1, 146: 1 }, p5c); + _.wd = function q5c(a) { + return k5c(this, BD(a, 146)); + }; + _.Fb = function r5c(a) { + return JD(a, 23) ? dfb(this.f, BD(a, 23).f) : JD(a, 146) && dfb(this.f, BD(a, 146).tg()); + }; + _.wg = function s5c() { + var a; + if (JD(this.b, 4)) { + a = fvd(this.b); + if (a == null) { + throw vbb(new Zdb(mse + this.f + "'. Make sure it's type is registered with the " + (fdb(Y3), Y3.k) + jse)); + } + return a; + } else { + return this.b; + } + }; + _.sg = function t5c() { + return this.d; + }; + _.tg = function u5c() { + return this.f; + }; + _.ne = function v5c() { + return this.i; + }; + _.Hb = function w5c() { + return LCb(this.f); + }; + _.Ib = function x5c() { + return "Layout Option: " + this.f; + }; + mdb(Xke, "LayoutOptionData", 23); + bcb(24, 1, {}, H5c); + mdb(Xke, "LayoutOptionData/Builder", 24); + bcb(175, 22, { 3: 1, 35: 1, 22: 1, 175: 1 }, O5c); + var I5c, J5c, K5c, L5c, M5c; + var e1 = ndb(Xke, "LayoutOptionData/Target", 175, CI, Q5c, P5c); + var R5c; + bcb(277, 22, { 3: 1, 35: 1, 22: 1, 277: 1 }, a6c); + var T5c, U5c, V5c, W5c, X5c, Y5c, Z5c, $5c; + var f1 = ndb(Xke, "LayoutOptionData/Type", 277, CI, c6c, b6c); + var d6c; + var f6c; + var h6c; + bcb(110, 1, { 110: 1 }, I6c, J6c, K6c); + _.Fb = function L6c(a) { + var b; + if (a == null || !JD(a, 110)) { + return false; + } + b = BD(a, 110); + return wtb(this.c, b.c) && wtb(this.d, b.d) && wtb(this.b, b.b) && wtb(this.a, b.a); + }; + _.Hb = function M6c() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [this.c, this.d, this.b, this.a])); + }; + _.Ib = function N6c() { + return "Rect[x=" + this.c + ",y=" + this.d + ",w=" + this.b + ",h=" + this.a + "]"; + }; + _.a = 0; + _.b = 0; + _.c = 0; + _.d = 0; + mdb(pne, "ElkRectangle", 110); + bcb(8, 1, { 3: 1, 4: 1, 8: 1, 414: 1 }, d7c, e7c, f7c, g7c); + _.Fb = function h7c(a) { + return T6c(this, a); + }; + _.Hb = function i7c() { + return Hdb(this.a) + jeb(Hdb(this.b)); + }; + _.Jf = function k7c(b) { + var c, d, e, f; + e = 0; + while (e < b.length && j7c((BCb(e, b.length), b.charCodeAt(e)), mne)) { + ++e; + } + c = b.length; + while (c > 0 && j7c((BCb(c - 1, b.length), b.charCodeAt(c - 1)), nne)) { + --c; + } + if (e >= c) { + throw vbb(new Wdb("The given string does not contain any numbers.")); + } + f = mfb(b.substr(e, c - e), ",|;|\r|\n"); + if (f.length != 2) { + throw vbb(new Wdb("Exactly two numbers are expected, " + f.length + " were found.")); + } + try { + this.a = Hcb(ufb(f[0])); + this.b = Hcb(ufb(f[1])); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + d = a; + throw vbb(new Wdb(one + d)); + } else + throw vbb(a); + } + }; + _.Ib = function m7c() { + return "(" + this.a + "," + this.b + ")"; + }; + _.a = 0; + _.b = 0; + var m1 = mdb(pne, "KVector", 8); + bcb(74, 68, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 68: 1, 15: 1, 74: 1, 414: 1 }, s7c, t7c, u7c); + _.Pc = function x7c() { + return r7c(this); + }; + _.Jf = function v7c(b) { + var c, d, e, f, g, h; + e = mfb(b, ",|;|\\(|\\)|\\[|\\]|\\{|\\}| | |\n"); + Osb(this); + try { + d = 0; + g = 0; + f = 0; + h = 0; + while (d < e.length) { + if (e[d] != null && ufb(e[d]).length > 0) { + g % 2 == 0 ? f = Hcb(e[d]) : h = Hcb(e[d]); + g > 0 && g % 2 != 0 && Dsb(this, new f7c(f, h)); + ++g; + } + ++d; + } + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + c = a; + throw vbb(new Wdb("The given string does not match the expected format for vectors." + c)); + } else + throw vbb(a); + } + }; + _.Ib = function y7c() { + var a, b, c; + a = new Wfb("("); + b = Jsb(this, 0); + while (b.b != b.d.c) { + c = BD(Xsb(b), 8); + Qfb(a, c.a + "," + c.b); + b.b != b.d.c && (a.a += "; ", a); + } + return (a.a += ")", a).a; + }; + var l1 = mdb(pne, "KVectorChain", 74); + bcb(248, 22, { 3: 1, 35: 1, 22: 1, 248: 1 }, G7c); + var z7c, A7c, B7c, C7c, D7c, E7c; + var o1 = ndb(ose, "Alignment", 248, CI, I7c, H7c); + var J7c; + bcb(979, 1, ale, Z7c); + _.Qe = function $7c(a) { + Y7c(a); + }; + var L7c, M7c, N7c, O7c, P7c, Q7c, R7c, S7c, T7c, U7c, V7c, W7c; + mdb(ose, "BoxLayouterOptions", 979); + bcb(980, 1, {}, _7c); + _.$e = function a8c() { + var a; + return a = new ged(), a; + }; + _._e = function b8c(a) { + }; + mdb(ose, "BoxLayouterOptions/BoxFactory", 980); + bcb(291, 22, { 3: 1, 35: 1, 22: 1, 291: 1 }, j8c); + var c8c, d8c, e8c, f8c, g8c, h8c; + var r1 = ndb(ose, "ContentAlignment", 291, CI, l8c, k8c); + var m8c; + bcb(684, 1, ale, Z9c); + _.Qe = function $9c(a) { + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), sse), ""), "Layout Algorithm"), "Select a specific layout algorithm."), (_5c(), Z5c)), ZI), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), tse), ""), "Resolved Layout Algorithm"), "Meta data associated with the selected algorithm."), Y5c), E0), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $pe), ""), "Alignment"), "Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."), q8c), V5c), o1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), _le), ""), "Aspect Ratio"), "The desired aspect ratio of the drawing, that is the quotient of width by height."), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), use), ""), "Bend Points"), "A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."), Y5c), l1), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), lqe), ""), "Content Alignment"), "Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."), x8c), W5c), r1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zpe), ""), "Debug Mode"), "Whether additional debug information shall be generated."), (Bcb(), false)), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), cqe), ""), Cle), "Overall direction of edges: horizontal (right / left) or vertical (down / up)."), A8c), V5c), t1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ype), ""), "Edge Routing"), "What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."), F8c), V5c), v1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Jre), ""), "Expand Nodes"), "If active, nodes are expanded to fill the area of their parent."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), tpe), ""), "Hierarchy Handling"), "Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."), K8c), V5c), z1), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ame), ""), "Padding"), "The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."), g9c), Y5c), j1), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ame), ""), "Interactive"), "Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xqe), ""), "interactive Layout"), "Whether the graph should be changeable interactively and by setting constraints"), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Dme), ""), "Omit Node Micro Layout"), "Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Bme), ""), "Port Constraints"), "Defines constraints of the position of the ports of a node."), u9c), V5c), D1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), uqe), ""), "Position"), "The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."), Y5c), m1), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [M5c, J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), vme), ""), "Priority"), "Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."), X5c), JI), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [I5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), yme), ""), "Randomization Seed"), "Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), zme), ""), "Separate Connected Components"), "Whether each connected component should be processed separately."), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mqe), ""), "Junction Points"), "This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."), R8c), Y5c), l1), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), pqe), ""), "Comment Box"), "Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), qqe), ""), "Hypernode"), "Whether the node should be handled as a hypernode."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), vse), ""), "Label Manager"), "Label managers can shorten labels upon a layout algorithm's request."), Y5c), h1), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), vqe), ""), "Margins"), "Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."), T8c), Y5c), i1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Xpe), ""), "No Layout"), "No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."), false), T5c), wI), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [I5c, M5c, J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), wse), ""), "Scale Factor"), "The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."), 1), U5c), BI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xse), ""), "Animate"), "Whether the shift from the old layout to the new computed layout shall be animated."), true), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), yse), ""), "Animation Time Factor"), "Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."), meb(100)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), zse), ""), "Layout Ancestors"), "Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ase), ""), "Maximal Animation Time"), "The maximal time for animations, in milliseconds."), meb(4e3)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Bse), ""), "Minimal Animation Time"), "The minimal time for animations, in milliseconds."), meb(400)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Cse), ""), "Progress Bar"), "Whether a progress bar shall be displayed during layout computations."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Dse), ""), "Validate Graph"), "Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ese), ""), "Validate Options"), "Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."), true), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Fse), ""), "Zoom to Fit"), "Whether the zoom level shall be set to view the whole diagram after layout."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), rse), "box"), "Box Layout Mode"), "Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."), u8c), V5c), O1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Lpe), zpe), "Comment Comment Spacing"), "Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Mpe), zpe), "Comment Node Spacing"), "Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zle), zpe), "Components Spacing"), "Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."), 20), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Npe), zpe), "Edge Spacing"), "Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xme), zpe), "Edge Label Spacing"), "The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."), 2), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ope), zpe), "Edge Node Spacing"), "Spacing to be preserved between nodes and edges."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ppe), zpe), "Label Spacing"), "Determines the amount of space to be left between two labels of the same graph element."), 0), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Spe), zpe), "Label Node Spacing"), "Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."), 5), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Qpe), zpe), "Horizontal spacing between Label and Port"), "Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Rpe), zpe), "Vertical spacing between Label and Port"), "Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), wme), zpe), "Node Spacing"), "The minimal distance to be preserved between each two nodes."), 20), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tpe), zpe), "Node Self Loop Spacing"), "Spacing to be preserved between a node and its self loops."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Upe), zpe), "Port Spacing"), "Spacing between pairs of ports of the same node."), 10), U5c), BI), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Vpe), zpe), "Individual Spacing"), "Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."), Y5c), i2), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [I5c, M5c, J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), wqe), zpe), "Additional Port Space"), "Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."), W9c), Y5c), i1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), tqe), Jse), "Layout Partition"), "Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."), X5c), JI), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + o4c(a, tqe, sqe, k9c); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), sqe), Jse), "Layout Partitioning"), "Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."), i9c), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), dqe), Kse), "Node Label Padding"), "Define padding for node labels that are placed inside of a node."), V8c), Y5c), j1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Gme), Kse), "Node Label Placement"), "Hints for where node labels are to be placed; if empty, the node label's position is not modified."), X8c), W5c), B1), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), gqe), Lse), "Port Alignment"), "Defines the default port distribution for a node. May be overridden for each side individually."), m9c), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), hqe), Lse), "Port Alignment (North)"), "Defines how ports on the northern side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), iqe), Lse), "Port Alignment (South)"), "Defines how ports on the southern side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), jqe), Lse), "Port Alignment (West)"), "Defines how ports on the western side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), kqe), Lse), "Port Alignment (East)"), "Defines how ports on the eastern side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Fme), Mse), "Node Size Constraints"), "What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."), Z8c), W5c), I1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Eme), Mse), "Node Size Options"), "Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."), c9c), W5c), J1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tme), Mse), "Node Size Minimum"), "The minimal size to which a node can be reduced."), a9c), Y5c), m1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), bqe), Mse), "Fixed Graph Size"), "By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), nqe), Jpe), "Edge Label Placement"), "Gives a hint on where to put edge labels."), D8c), V5c), u1), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Cme), Jpe), "Inline Edge Labels"), "If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."), false), T5c), wI), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Gse), "font"), "Font Name"), "Font name used for a label."), Z5c), ZI), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Hse), "font"), "Font Size"), "Font size used for a label."), X5c), JI), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), rqe), Nse), "Port Anchor Offset"), "The offset to the port position where connections shall be attached."), Y5c), m1), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), oqe), Nse), "Port Index"), "The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."), X5c), JI), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ype), Nse), "Port Side"), "The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."), B9c), V5c), F1), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Wpe), Nse), "Port Border Offset"), "The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."), U5c), BI), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Hme), Ose), "Port Label Placement"), "Decides on a placement method for port labels; if empty, the node label's position is not modified."), y9c), W5c), E1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), eqe), Ose), "Port Labels Next to Port"), "Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), fqe), Ose), "Treat Port Labels as Group"), "If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."), true), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _pe), Pse), "Activate Inside Self Loops"), "Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), aqe), Pse), "Inside Self Loop"), "Whether a self loop should be routed inside a node instead of around that node."), false), T5c), wI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $le), "edge"), "Edge Thickness"), "The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."), 1), U5c), BI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ise), "edge"), "Edge Type"), "The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."), H8c), V5c), w1), pqb(I5c)))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), sne), "Layered"), 'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), "org.eclipse.elk.orthogonal"), "Orthogonal"), `Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), ume), "Force"), "Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), "org.eclipse.elk.circle"), "Circle"), "Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), bre), "Tree"), "Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), "org.eclipse.elk.planar"), "Planar"), "Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), sre), "Radial"), "Radial layout algorithms usually position the nodes of the graph on concentric circles."))); + $ad((new _ad(), a)); + Y7c((new Z7c(), a)); + jdd((new kdd(), a)); + }; + var o8c, p8c, q8c, r8c, s8c, t8c, u8c, v8c, w8c, x8c, y8c, z8c, A8c, B8c, C8c, D8c, E8c, F8c, G8c, H8c, I8c, J8c, K8c, L8c, M8c, N8c, O8c, P8c, Q8c, R8c, S8c, T8c, U8c, V8c, W8c, X8c, Y8c, Z8c, $8c, _8c, a9c, b9c, c9c, d9c, e9c, f9c, g9c, h9c, i9c, j9c, k9c, l9c, m9c, n9c, o9c, p9c, q9c, r9c, s9c, t9c, u9c, v9c, w9c, x9c, y9c, z9c, A9c, B9c, C9c, D9c, E9c, F9c, G9c, H9c, I9c, J9c, K9c, L9c, M9c, N9c, O9c, P9c, Q9c, R9c, S9c, T9c, U9c, V9c, W9c, X9c; + mdb(ose, "CoreOptions", 684); + bcb(103, 22, { 3: 1, 35: 1, 22: 1, 103: 1 }, iad); + var _9c, aad, bad, cad, dad; + var t1 = ndb(ose, Cle, 103, CI, kad, jad); + var lad; + bcb(272, 22, { 3: 1, 35: 1, 22: 1, 272: 1 }, rad); + var nad, oad, pad; + var u1 = ndb(ose, "EdgeLabelPlacement", 272, CI, tad, sad); + var uad; + bcb(218, 22, { 3: 1, 35: 1, 22: 1, 218: 1 }, Bad); + var wad, xad, yad, zad; + var v1 = ndb(ose, "EdgeRouting", 218, CI, Dad, Cad); + var Ead; + bcb(312, 22, { 3: 1, 35: 1, 22: 1, 312: 1 }, Nad); + var Gad, Had, Iad, Jad, Kad, Lad; + var w1 = ndb(ose, "EdgeType", 312, CI, Pad, Oad); + var Qad; + bcb(977, 1, ale, _ad); + _.Qe = function abd(a) { + $ad(a); + }; + var Sad, Tad, Uad, Vad, Wad, Xad, Yad; + mdb(ose, "FixedLayouterOptions", 977); + bcb(978, 1, {}, bbd); + _.$e = function cbd() { + var a; + return a = new Zfd(), a; + }; + _._e = function dbd(a) { + }; + mdb(ose, "FixedLayouterOptions/FixedFactory", 978); + bcb(334, 22, { 3: 1, 35: 1, 22: 1, 334: 1 }, ibd); + var ebd, fbd, gbd; + var z1 = ndb(ose, "HierarchyHandling", 334, CI, kbd, jbd); + var lbd; + bcb(285, 22, { 3: 1, 35: 1, 22: 1, 285: 1 }, tbd); + var nbd, obd, pbd, qbd; + var A1 = ndb(ose, "LabelSide", 285, CI, vbd, ubd); + var wbd; + bcb(93, 22, { 3: 1, 35: 1, 22: 1, 93: 1 }, Ibd); + var ybd, zbd, Abd, Bbd, Cbd, Dbd, Ebd, Fbd, Gbd; + var B1 = ndb(ose, "NodeLabelPlacement", 93, CI, Lbd, Kbd); + var Mbd; + bcb(249, 22, { 3: 1, 35: 1, 22: 1, 249: 1 }, Ubd); + var Obd, Pbd, Qbd, Rbd, Sbd; + var C1 = ndb(ose, "PortAlignment", 249, CI, Wbd, Vbd); + var Xbd; + bcb(98, 22, { 3: 1, 35: 1, 22: 1, 98: 1 }, gcd); + var Zbd, $bd, _bd, acd, bcd, ccd; + var D1 = ndb(ose, "PortConstraints", 98, CI, icd, hcd); + var jcd; + bcb(273, 22, { 3: 1, 35: 1, 22: 1, 273: 1 }, scd); + var lcd, mcd, ncd, ocd, pcd, qcd; + var E1 = ndb(ose, "PortLabelPlacement", 273, CI, wcd, vcd); + var xcd; + bcb(61, 22, { 3: 1, 35: 1, 22: 1, 61: 1 }, Ycd); + var zcd, Acd, Bcd, Ccd, Dcd, Ecd, Fcd, Gcd, Hcd, Icd, Jcd, Kcd, Lcd, Mcd, Ncd, Ocd, Pcd, Qcd, Rcd, Scd, Tcd; + var F1 = ndb(ose, "PortSide", 61, CI, _cd, $cd); + var bdd; + bcb(981, 1, ale, kdd); + _.Qe = function ldd(a) { + jdd(a); + }; + var ddd, edd, fdd, gdd, hdd; + mdb(ose, "RandomLayouterOptions", 981); + bcb(982, 1, {}, mdd); + _.$e = function ndd() { + var a; + return a = new Mgd(), a; + }; + _._e = function odd(a) { + }; + mdb(ose, "RandomLayouterOptions/RandomFactory", 982); + bcb(374, 22, { 3: 1, 35: 1, 22: 1, 374: 1 }, udd); + var pdd, qdd, rdd, sdd; + var I1 = ndb(ose, "SizeConstraint", 374, CI, wdd, vdd); + var xdd; + bcb(259, 22, { 3: 1, 35: 1, 22: 1, 259: 1 }, Jdd); + var zdd, Add, Bdd, Cdd, Ddd, Edd, Fdd, Gdd, Hdd; + var J1 = ndb(ose, "SizeOptions", 259, CI, Ldd, Kdd); + var Mdd; + bcb(370, 1, { 1949: 1 }, Zdd); + _.b = false; + _.c = 0; + _.d = -1; + _.e = null; + _.f = null; + _.g = -1; + _.j = false; + _.k = false; + _.n = false; + _.o = 0; + _.q = 0; + _.r = 0; + mdb(yqe, "BasicProgressMonitor", 370); + bcb(972, 209, Mle, ged); + _.Ze = function ked(a, b) { + var c, d, e, f, g, h, i, j, k; + Odd(b, "Box layout", 2); + e = Gdb(ED(hkd(a, (X7c(), W7c)))); + f = BD(hkd(a, T7c), 116); + c = Ccb(DD(hkd(a, O7c))); + d = Ccb(DD(hkd(a, P7c))); + switch (BD(hkd(a, M7c), 311).g) { + case 0: + g = (h = new Tkb((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)), mmb(), Okb(h, new med(d)), h); + i = rfd(a); + j = ED(hkd(a, L7c)); + (j == null || (uCb(j), j) <= 0) && (j = 1.3); + k = ded(g, e, f, i.a, i.b, c, (uCb(j), j)); + Afd(a, k.a, k.b, false, true); + break; + default: + eed(a, e, f, c); + } + Qdd(b); + }; + mdb(yqe, "BoxLayoutProvider", 972); + bcb(973, 1, Dke, med); + _.ue = function ned(a, b) { + return led(this, BD(a, 33), BD(b, 33)); + }; + _.Fb = function oed(a) { + return this === a; + }; + _.ve = function ped() { + return new tpb(this); + }; + _.a = false; + mdb(yqe, "BoxLayoutProvider/1", 973); + bcb(157, 1, { 157: 1 }, wed, xed); + _.Ib = function yed() { + return this.c ? _od(this.c) : Fe(this.b); + }; + mdb(yqe, "BoxLayoutProvider/Group", 157); + bcb(311, 22, { 3: 1, 35: 1, 22: 1, 311: 1 }, Eed); + var zed, Aed, Bed, Ced; + var O1 = ndb(yqe, "BoxLayoutProvider/PackingMode", 311, CI, Ged, Fed); + var Hed; + bcb(974, 1, Dke, Jed); + _.ue = function Ked(a, b) { + return hed(BD(a, 157), BD(b, 157)); + }; + _.Fb = function Led(a) { + return this === a; + }; + _.ve = function Med() { + return new tpb(this); + }; + mdb(yqe, "BoxLayoutProvider/lambda$0$Type", 974); + bcb(975, 1, Dke, Ned); + _.ue = function Oed(a, b) { + return ied(BD(a, 157), BD(b, 157)); + }; + _.Fb = function Ped(a) { + return this === a; + }; + _.ve = function Qed() { + return new tpb(this); + }; + mdb(yqe, "BoxLayoutProvider/lambda$1$Type", 975); + bcb(976, 1, Dke, Red); + _.ue = function Sed(a, b) { + return jed(BD(a, 157), BD(b, 157)); + }; + _.Fb = function Ted(a) { + return this === a; + }; + _.ve = function Ued() { + return new tpb(this); + }; + mdb(yqe, "BoxLayoutProvider/lambda$2$Type", 976); + bcb(1365, 1, { 831: 1 }, Ved); + _.qg = function Wed(a, b) { + return Vyc(), !JD(b, 160) || h2c((Y1c(), BD(a, 160)), b); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type", 1365); + bcb(1366, 1, qie, Xed); + _.td = function Yed(a) { + Yyc(this.a, BD(a, 146)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type", 1366); + bcb(1367, 1, qie, Zed); + _.td = function $ed(a) { + BD(a, 94); + Vyc(); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type", 1367); + bcb(1371, 1, qie, _ed); + _.td = function afd(a) { + Zyc(this.a, BD(a, 94)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type", 1371); + bcb(1369, 1, Oie, bfd); + _.Mb = function cfd(a) { + return $yc(this.a, this.b, BD(a, 146)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type", 1369); + bcb(1368, 1, Oie, dfd); + _.Mb = function efd(a) { + return azc(this.a, this.b, BD(a, 831)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type", 1368); + bcb(1370, 1, qie, ffd); + _.td = function gfd(a) { + _yc(this.a, this.b, BD(a, 146)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type", 1370); + bcb(935, 1, {}, Hfd); + _.Kb = function Ifd(a) { + return Gfd(a); + }; + _.Fb = function Jfd(a) { + return this === a; + }; + mdb(yqe, "ElkUtil/lambda$0$Type", 935); + bcb(936, 1, qie, Kfd); + _.td = function Lfd(a) { + ufd(this.a, this.b, BD(a, 79)); + }; + _.a = 0; + _.b = 0; + mdb(yqe, "ElkUtil/lambda$1$Type", 936); + bcb(937, 1, qie, Mfd); + _.td = function Nfd(a) { + vfd(this.a, this.b, BD(a, 202)); + }; + _.a = 0; + _.b = 0; + mdb(yqe, "ElkUtil/lambda$2$Type", 937); + bcb(938, 1, qie, Ofd); + _.td = function Pfd(a) { + wfd(this.a, this.b, BD(a, 137)); + }; + _.a = 0; + _.b = 0; + mdb(yqe, "ElkUtil/lambda$3$Type", 938); + bcb(939, 1, qie, Qfd); + _.td = function Rfd(a) { + xfd(this.a, BD(a, 469)); + }; + mdb(yqe, "ElkUtil/lambda$4$Type", 939); + bcb(342, 1, { 35: 1, 342: 1 }, Tfd); + _.wd = function Ufd(a) { + return Sfd(this, BD(a, 236)); + }; + _.Fb = function Vfd(a) { + var b; + if (JD(a, 342)) { + b = BD(a, 342); + return this.a == b.a; + } + return false; + }; + _.Hb = function Wfd() { + return QD(this.a); + }; + _.Ib = function Xfd() { + return this.a + " (exclusive)"; + }; + _.a = 0; + mdb(yqe, "ExclusiveBounds/ExclusiveLowerBound", 342); + bcb(1138, 209, Mle, Zfd); + _.Ze = function $fd(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r, s, t, u, v, w, A, B; + Odd(b, "Fixed Layout", 1); + f = BD(hkd(a, (Y9c(), E8c)), 218); + l = 0; + m = 0; + for (s = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); s.e != s.i.gc(); ) { + q = BD(Dyd(s), 33); + B = BD(hkd(q, (Zad(), Yad)), 8); + if (B) { + bld(q, B.a, B.b); + if (BD(hkd(q, Tad), 174).Hc((tdd(), pdd))) { + n = BD(hkd(q, Vad), 8); + n.a > 0 && n.b > 0 && Afd(q, n.a, n.b, true, true); + } + } + l = $wnd.Math.max(l, q.i + q.g); + m = $wnd.Math.max(m, q.j + q.f); + for (j = new Fyd((!q.n && (q.n = new cUd(D2, q, 1, 7)), q.n)); j.e != j.i.gc(); ) { + h = BD(Dyd(j), 137); + B = BD(hkd(h, Yad), 8); + !!B && bld(h, B.a, B.b); + l = $wnd.Math.max(l, q.i + h.i + h.g); + m = $wnd.Math.max(m, q.j + h.j + h.f); + } + for (v = new Fyd((!q.c && (q.c = new cUd(F2, q, 9, 9)), q.c)); v.e != v.i.gc(); ) { + u = BD(Dyd(v), 118); + B = BD(hkd(u, Yad), 8); + !!B && bld(u, B.a, B.b); + w = q.i + u.i; + A = q.j + u.j; + l = $wnd.Math.max(l, w + u.g); + m = $wnd.Math.max(m, A + u.f); + for (i = new Fyd((!u.n && (u.n = new cUd(D2, u, 1, 7)), u.n)); i.e != i.i.gc(); ) { + h = BD(Dyd(i), 137); + B = BD(hkd(h, Yad), 8); + !!B && bld(h, B.a, B.b); + l = $wnd.Math.max(l, w + h.i + h.g); + m = $wnd.Math.max(m, A + h.j + h.f); + } + } + for (e = new Sr(ur(_sd(q).a.Kc(), new Sq())); Qr(e); ) { + c = BD(Rr(e), 79); + k = Yfd(c); + l = $wnd.Math.max(l, k.a); + m = $wnd.Math.max(m, k.b); + } + for (d = new Sr(ur($sd(q).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 79); + if (Xod(jtd(c)) != a) { + k = Yfd(c); + l = $wnd.Math.max(l, k.a); + m = $wnd.Math.max(m, k.b); + } + } + } + if (f == (Aad(), wad)) { + for (r = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); r.e != r.i.gc(); ) { + q = BD(Dyd(r), 33); + for (d = new Sr(ur(_sd(q).a.Kc(), new Sq())); Qr(d); ) { + c = BD(Rr(d), 79); + g = pfd(c); + g.b == 0 ? jkd(c, Q8c, null) : jkd(c, Q8c, g); + } + } + } + if (!Ccb(DD(hkd(a, (Zad(), Uad))))) { + t = BD(hkd(a, Wad), 116); + p = l + t.b + t.c; + o2 = m + t.d + t.a; + Afd(a, p, o2, true, true); + } + Qdd(b); + }; + mdb(yqe, "FixedLayoutProvider", 1138); + bcb(373, 134, { 3: 1, 414: 1, 373: 1, 94: 1, 134: 1 }, _fd, agd); + _.Jf = function dgd(b) { + var c, d, e, f, g, h, i, j, k; + if (!b) { + return; + } + try { + j = mfb(b, ";,;"); + for (g = j, h = 0, i = g.length; h < i; ++h) { + f = g[h]; + d = mfb(f, "\\:"); + e = k4c(n4c(), d[0]); + if (!e) { + throw vbb(new Wdb("Invalid option id: " + d[0])); + } + k = o5c(e, d[1]); + if (k == null) { + throw vbb(new Wdb("Invalid option value: " + d[1])); + } + k == null ? (!this.q && (this.q = new Lqb()), Thb(this.q, e)) : (!this.q && (this.q = new Lqb()), Rhb(this.q, e, k)); + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + c = a; + throw vbb(new Xdb(c)); + } else + throw vbb(a); + } + }; + _.Ib = function egd() { + var a; + a = GD(GAb(NAb((!this.q ? (mmb(), mmb(), kmb) : this.q).vc().Oc(), new fgd()), Ayb(new pzb(), new nzb(), new Zyb(), new _yb(), OC(GC(xL, 1), Kie, 132, 0, [])))); + return a; + }; + var i2 = mdb(yqe, "IndividualSpacings", 373); + bcb(971, 1, {}, fgd); + _.Kb = function ggd(a) { + return cgd(BD(a, 42)); + }; + mdb(yqe, "IndividualSpacings/lambda$0$Type", 971); + bcb(709, 1, {}, jgd); + _.c = 0; + mdb(yqe, "InstancePool", 709); + bcb(1275, 1, {}, kgd); + mdb(yqe, "LoggedGraph", 1275); + bcb(396, 22, { 3: 1, 35: 1, 22: 1, 396: 1 }, qgd); + var lgd, mgd, ngd, ogd; + var k2 = ndb(yqe, "LoggedGraph/Type", 396, CI, sgd, rgd); + var tgd; + bcb(46, 1, { 20: 1, 46: 1 }, vgd); + _.Jc = function xgd(a) { + reb(this, a); + }; + _.Fb = function wgd(a) { + var b, c, d; + if (JD(a, 46)) { + c = BD(a, 46); + b = this.a == null ? c.a == null : pb(this.a, c.a); + d = this.b == null ? c.b == null : pb(this.b, c.b); + return b && d; + } else { + return false; + } + }; + _.Hb = function ygd() { + var a, b, c, d, e, f; + c = this.a == null ? 0 : tb(this.a); + a = c & aje; + b = c & -65536; + f = this.b == null ? 0 : tb(this.b); + d = f & aje; + e = f & -65536; + return a ^ e >> 16 & aje | b ^ d << 16; + }; + _.Kc = function zgd() { + return new Bgd(this); + }; + _.Ib = function Agd() { + return this.a == null && this.b == null ? "pair(null,null)" : this.a == null ? "pair(null," + fcb(this.b) + ")" : this.b == null ? "pair(" + fcb(this.a) + ",null)" : "pair(" + fcb(this.a) + "," + fcb(this.b) + ")"; + }; + mdb(yqe, "Pair", 46); + bcb(983, 1, aie, Bgd); + _.Nb = function Cgd(a) { + Rrb(this, a); + }; + _.Ob = function Dgd() { + return !this.c && (!this.b && this.a.a != null || this.a.b != null); + }; + _.Pb = function Egd() { + if (!this.c && !this.b && this.a.a != null) { + this.b = true; + return this.a.a; + } else if (!this.c && this.a.b != null) { + this.c = true; + return this.a.b; + } + throw vbb(new utb()); + }; + _.Qb = function Fgd() { + this.c && this.a.b != null ? this.a.b = null : this.b && this.a.a != null && (this.a.a = null); + throw vbb(new Ydb()); + }; + _.b = false; + _.c = false; + mdb(yqe, "Pair/1", 983); + bcb(448, 1, { 448: 1 }, Ggd); + _.Fb = function Hgd(a) { + return wtb(this.a, BD(a, 448).a) && wtb(this.c, BD(a, 448).c) && wtb(this.d, BD(a, 448).d) && wtb(this.b, BD(a, 448).b); + }; + _.Hb = function Igd() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [this.a, this.c, this.d, this.b])); + }; + _.Ib = function Jgd() { + return "(" + this.a + She + this.c + She + this.d + She + this.b + ")"; + }; + mdb(yqe, "Quadruple", 448); + bcb(1126, 209, Mle, Mgd); + _.Ze = function Ngd(a, b) { + var c, d, e, f, g; + Odd(b, "Random Layout", 1); + if ((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a).i == 0) { + Qdd(b); + return; + } + f = BD(hkd(a, (idd(), gdd)), 19); + !!f && f.a != 0 ? e = new Hub(f.a) : e = new Gub(); + c = Gdb(ED(hkd(a, ddd))); + g = Gdb(ED(hkd(a, hdd))); + d = BD(hkd(a, edd), 116); + Lgd(a, e, c, g, d); + Qdd(b); + }; + mdb(yqe, "RandomLayoutProvider", 1126); + var Ogd; + bcb(553, 1, {}); + _.qf = function Sgd() { + return new f7c(this.f.i, this.f.j); + }; + _.We = function Tgd(a) { + if (Jsd(a, (Y9c(), s9c))) { + return hkd(this.f, Qgd); + } + return hkd(this.f, a); + }; + _.rf = function Ugd() { + return new f7c(this.f.g, this.f.f); + }; + _.sf = function Vgd() { + return this.g; + }; + _.Xe = function Wgd(a) { + return ikd(this.f, a); + }; + _.tf = function Xgd(a) { + dld(this.f, a.a); + eld(this.f, a.b); + }; + _.uf = function Ygd(a) { + cld(this.f, a.a); + ald(this.f, a.b); + }; + _.vf = function Zgd(a) { + this.g = a; + }; + _.g = 0; + var Qgd; + mdb(Use, "ElkGraphAdapters/AbstractElkGraphElementAdapter", 553); + bcb(554, 1, { 839: 1 }, $gd); + _.wf = function _gd() { + var a, b; + if (!this.b) { + this.b = Qu(Kkd(this.a).i); + for (b = new Fyd(Kkd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 137); + Ekb(this.b, new dhd(a)); + } + } + return this.b; + }; + _.b = null; + mdb(Use, "ElkGraphAdapters/ElkEdgeAdapter", 554); + bcb(301, 553, {}, bhd); + _.xf = function chd() { + return ahd(this); + }; + _.a = null; + mdb(Use, "ElkGraphAdapters/ElkGraphAdapter", 301); + bcb(630, 553, { 181: 1 }, dhd); + mdb(Use, "ElkGraphAdapters/ElkLabelAdapter", 630); + bcb(629, 553, { 680: 1 }, hhd); + _.wf = function khd() { + return ehd(this); + }; + _.Af = function lhd() { + var a; + return a = BD(hkd(this.f, (Y9c(), S8c)), 142), !a && (a = new H_b()), a; + }; + _.Cf = function nhd() { + return fhd(this); + }; + _.Ef = function phd(a) { + var b; + b = new K_b(a); + jkd(this.f, (Y9c(), S8c), b); + }; + _.Ff = function qhd(a) { + jkd(this.f, (Y9c(), f9c), new r0b(a)); + }; + _.yf = function ihd() { + return this.d; + }; + _.zf = function jhd() { + var a, b; + if (!this.a) { + this.a = new Rkb(); + for (b = new Sr(ur($sd(BD(this.f, 33)).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 79); + Ekb(this.a, new $gd(a)); + } + } + return this.a; + }; + _.Bf = function mhd() { + var a, b; + if (!this.c) { + this.c = new Rkb(); + for (b = new Sr(ur(_sd(BD(this.f, 33)).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 79); + Ekb(this.c, new $gd(a)); + } + } + return this.c; + }; + _.Df = function ohd() { + return Vod(BD(this.f, 33)).i != 0 || Ccb(DD(BD(this.f, 33).We((Y9c(), M8c)))); + }; + _.Gf = function rhd() { + ghd(this, (Pgd(), Ogd)); + }; + _.a = null; + _.b = null; + _.c = null; + _.d = null; + _.e = null; + mdb(Use, "ElkGraphAdapters/ElkNodeAdapter", 629); + bcb(1266, 553, { 838: 1 }, thd); + _.wf = function vhd() { + return shd(this); + }; + _.zf = function uhd() { + var a, b; + if (!this.a) { + this.a = Pu(BD(this.f, 118).xg().i); + for (b = new Fyd(BD(this.f, 118).xg()); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 79); + Ekb(this.a, new $gd(a)); + } + } + return this.a; + }; + _.Bf = function whd() { + var a, b; + if (!this.c) { + this.c = Pu(BD(this.f, 118).yg().i); + for (b = new Fyd(BD(this.f, 118).yg()); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 79); + Ekb(this.c, new $gd(a)); + } + } + return this.c; + }; + _.Hf = function xhd() { + return BD(BD(this.f, 118).We((Y9c(), A9c)), 61); + }; + _.If = function yhd() { + var a, b, c, d, e, f, g, h; + d = mpd(BD(this.f, 118)); + for (c = new Fyd(BD(this.f, 118).yg()); c.e != c.i.gc(); ) { + a = BD(Dyd(c), 79); + for (h = new Fyd((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 82); + if (ntd(atd(g), d)) { + return true; + } else if (atd(g) == d && Ccb(DD(hkd(a, (Y9c(), N8c))))) { + return true; + } + } + } + for (b = new Fyd(BD(this.f, 118).xg()); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 79); + for (f = new Fyd((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b)); f.e != f.i.gc(); ) { + e = BD(Dyd(f), 82); + if (ntd(atd(e), d)) { + return true; + } + } + } + return false; + }; + _.a = null; + _.b = null; + _.c = null; + mdb(Use, "ElkGraphAdapters/ElkPortAdapter", 1266); + bcb(1267, 1, Dke, Ahd); + _.ue = function Bhd(a, b) { + return zhd(BD(a, 118), BD(b, 118)); + }; + _.Fb = function Chd(a) { + return this === a; + }; + _.ve = function Dhd() { + return new tpb(this); + }; + mdb(Use, "ElkGraphAdapters/PortComparator", 1267); + var m5 = odb(Vse, "EObject"); + var x2 = odb(Wse, Xse); + var y2 = odb(Wse, Yse); + var C2 = odb(Wse, Zse); + var G2 = odb(Wse, "ElkShape"); + var z2 = odb(Wse, $se); + var B2 = odb(Wse, _se); + var A2 = odb(Wse, ate); + var k5 = odb(Vse, bte); + var i5 = odb(Vse, "EFactory"); + var Ehd; + var l5 = odb(Vse, cte); + var o5 = odb(Vse, "EPackage"); + var Ghd; + var Ihd, Jhd, Khd, Lhd, Mhd, Nhd, Ohd, Phd, Qhd, Rhd, Shd; + var D2 = odb(Wse, dte); + var E2 = odb(Wse, ete); + var F2 = odb(Wse, fte); + bcb(90, 1, gte); + _.Jg = function Vhd() { + this.Kg(); + return null; + }; + _.Kg = function Whd() { + return null; + }; + _.Lg = function Xhd() { + return this.Kg(), false; + }; + _.Mg = function Yhd() { + return false; + }; + _.Ng = function Zhd(a) { + Uhd(this, a); + }; + mdb(hte, "BasicNotifierImpl", 90); + bcb(97, 90, pte); + _.nh = function fjd() { + return oid(this); + }; + _.Og = function Fid(a, b) { + return a; + }; + _.Pg = function Gid() { + throw vbb(new bgb()); + }; + _.Qg = function Hid(a) { + var b; + return b = zUd(BD(XKd(this.Tg(), this.Vg()), 18)), this.eh().ih(this, b.n, b.f, a); + }; + _.Rg = function Iid(a, b) { + throw vbb(new bgb()); + }; + _.Sg = function Jid(a, b, c) { + return _hd(this, a, b, c); + }; + _.Tg = function Kid() { + var a; + if (this.Pg()) { + a = this.Pg().ck(); + if (a) { + return a; + } + } + return this.zh(); + }; + _.Ug = function Lid() { + return aid(this); + }; + _.Vg = function Mid() { + throw vbb(new bgb()); + }; + _.Wg = function Oid() { + var a, b; + b = this.ph().dk(); + !b && this.Pg().ik(b = (nRd(), a = pNd(TKd(this.Tg())), a == null ? mRd : new qRd(this, a))); + return b; + }; + _.Xg = function Qid(a, b) { + return a; + }; + _.Yg = function Rid(a) { + var b; + b = a.Gj(); + return !b ? bLd(this.Tg(), a) : a.aj(); + }; + _.Zg = function Sid() { + var a; + a = this.Pg(); + return !a ? null : a.fk(); + }; + _.$g = function Tid() { + return !this.Pg() ? null : this.Pg().ck(); + }; + _._g = function Uid(a, b, c) { + return fid(this, a, b, c); + }; + _.ah = function Vid(a) { + return gid(this, a); + }; + _.bh = function Wid(a, b) { + return hid(this, a, b); + }; + _.dh = function Xid() { + var a; + a = this.Pg(); + return !!a && a.gk(); + }; + _.eh = function Yid() { + throw vbb(new bgb()); + }; + _.fh = function Zid() { + return jid(this); + }; + _.gh = function $id(a, b, c, d) { + return kid(this, a, b, d); + }; + _.hh = function _id(a, b, c) { + var d; + return d = BD(XKd(this.Tg(), b), 66), d.Nj().Qj(this, this.yh(), b - this.Ah(), a, c); + }; + _.ih = function ajd(a, b, c, d) { + return lid(this, a, b, d); + }; + _.jh = function bjd(a, b, c) { + var d; + return d = BD(XKd(this.Tg(), b), 66), d.Nj().Rj(this, this.yh(), b - this.Ah(), a, c); + }; + _.kh = function cjd() { + return !!this.Pg() && !!this.Pg().ek(); + }; + _.lh = function djd(a) { + return mid(this, a); + }; + _.mh = function ejd(a) { + return nid(this, a); + }; + _.oh = function gjd(a) { + return rid(this, a); + }; + _.ph = function hjd() { + throw vbb(new bgb()); + }; + _.qh = function ijd() { + return !this.Pg() ? null : this.Pg().ek(); + }; + _.rh = function jjd() { + return jid(this); + }; + _.sh = function kjd(a, b) { + yid(this, a, b); + }; + _.th = function ljd(a) { + this.ph().hk(a); + }; + _.uh = function mjd(a) { + this.ph().kk(a); + }; + _.vh = function njd(a) { + this.ph().jk(a); + }; + _.wh = function ojd(a, b) { + var c, d, e, f; + f = this.Zg(); + if (!!f && !!a) { + b = Txd(f.Vk(), this, b); + f.Zk(this); + } + d = this.eh(); + if (d) { + if ((Nid(this, this.eh(), this.Vg()).Bb & Tje) != 0) { + e = d.fh(); + !!e && (!a ? e.Yk(this) : !f && e.Zk(this)); + } else { + b = (c = this.Vg(), c >= 0 ? this.Qg(b) : this.eh().ih(this, -1 - c, null, b)); + b = this.Sg(null, -1, b); + } + } + this.uh(a); + return b; + }; + _.xh = function pjd(a) { + var b, c, d, e, f, g, h, i; + c = this.Tg(); + f = bLd(c, a); + b = this.Ah(); + if (f >= b) { + return BD(a, 66).Nj().Uj(this, this.yh(), f - b); + } else if (f <= -1) { + g = e1d((O6d(), M6d), c, a); + if (g) { + Q6d(); + BD(g, 66).Oj() || (g = _1d(q1d(M6d, g))); + e = (d = this.Yg(g), BD(d >= 0 ? this._g(d, true, true) : sid(this, g, true), 153)); + i = g.Zj(); + if (i > 1 || i == -1) { + return BD(BD(e, 215).hl(a, false), 76); + } + } else { + throw vbb(new Wdb(ite + a.ne() + lte)); + } + } else if (a.$j()) { + return d = this.Yg(a), BD(d >= 0 ? this._g(d, false, true) : sid(this, a, false), 76); + } + h = new nGd(this, a); + return h; + }; + _.yh = function qjd() { + return Aid(this); + }; + _.zh = function rjd() { + return (NFd(), MFd).S; + }; + _.Ah = function sjd() { + return aLd(this.zh()); + }; + _.Bh = function tjd(a) { + Cid(this, a); + }; + _.Ib = function ujd() { + return Eid(this); + }; + mdb(qte, "BasicEObjectImpl", 97); + var zFd; + bcb(114, 97, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1 }); + _.Ch = function Djd(a) { + var b; + b = xjd(this); + return b[a]; + }; + _.Dh = function Ejd(a, b) { + var c; + c = xjd(this); + NC(c, a, b); + }; + _.Eh = function Fjd(a) { + var b; + b = xjd(this); + NC(b, a, null); + }; + _.Jg = function Gjd() { + return BD(Ajd(this, 4), 126); + }; + _.Kg = function Hjd() { + throw vbb(new bgb()); + }; + _.Lg = function Ijd() { + return (this.Db & 4) != 0; + }; + _.Pg = function Jjd() { + throw vbb(new bgb()); + }; + _.Fh = function Kjd(a) { + Cjd(this, 2, a); + }; + _.Rg = function Ljd(a, b) { + this.Db = b << 16 | this.Db & 255; + this.Fh(a); + }; + _.Tg = function Mjd() { + return wjd(this); + }; + _.Vg = function Njd() { + return this.Db >> 16; + }; + _.Wg = function Ojd() { + var a, b; + return nRd(), b = pNd(TKd((a = BD(Ajd(this, 16), 26), !a ? this.zh() : a))), b == null ? mRd : new qRd(this, b); + }; + _.Mg = function Pjd() { + return (this.Db & 1) == 0; + }; + _.Zg = function Qjd() { + return BD(Ajd(this, 128), 1935); + }; + _.$g = function Rjd() { + return BD(Ajd(this, 16), 26); + }; + _.dh = function Sjd() { + return (this.Db & 32) != 0; + }; + _.eh = function Tjd() { + return BD(Ajd(this, 2), 49); + }; + _.kh = function Ujd() { + return (this.Db & 64) != 0; + }; + _.ph = function Vjd() { + throw vbb(new bgb()); + }; + _.qh = function Wjd() { + return BD(Ajd(this, 64), 281); + }; + _.th = function Xjd(a) { + Cjd(this, 16, a); + }; + _.uh = function Yjd(a) { + Cjd(this, 128, a); + }; + _.vh = function Zjd(a) { + Cjd(this, 64, a); + }; + _.yh = function $jd() { + return yjd(this); + }; + _.Db = 0; + mdb(qte, "MinimalEObjectImpl", 114); + bcb(115, 114, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _.Fh = function _jd(a) { + this.Cb = a; + }; + _.eh = function akd() { + return this.Cb; + }; + mdb(qte, "MinimalEObjectImpl/Container", 115); + bcb(1985, 115, { 105: 1, 413: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _._g = function kkd(a, b, c) { + return bkd(this, a, b, c); + }; + _.jh = function lkd(a, b, c) { + return ckd(this, a, b, c); + }; + _.lh = function mkd(a) { + return dkd(this, a); + }; + _.sh = function nkd(a, b) { + ekd(this, a, b); + }; + _.zh = function okd() { + return Thd(), Shd; + }; + _.Bh = function pkd(a) { + fkd(this, a); + }; + _.Ve = function qkd() { + return gkd(this); + }; + _.We = function rkd(a) { + return hkd(this, a); + }; + _.Xe = function skd(a) { + return ikd(this, a); + }; + _.Ye = function tkd(a, b) { + return jkd(this, a, b); + }; + mdb(rte, "EMapPropertyHolderImpl", 1985); + bcb(567, 115, { 105: 1, 469: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, xkd); + _._g = function ykd(a, b, c) { + switch (a) { + case 0: + return this.a; + case 1: + return this.b; + } + return fid(this, a, b, c); + }; + _.lh = function zkd(a) { + switch (a) { + case 0: + return this.a != 0; + case 1: + return this.b != 0; + } + return mid(this, a); + }; + _.sh = function Akd(a, b) { + switch (a) { + case 0: + vkd(this, Edb(ED(b))); + return; + case 1: + wkd(this, Edb(ED(b))); + return; + } + yid(this, a, b); + }; + _.zh = function Bkd() { + return Thd(), Ihd; + }; + _.Bh = function Ckd(a) { + switch (a) { + case 0: + vkd(this, 0); + return; + case 1: + wkd(this, 0); + return; + } + Cid(this, a); + }; + _.Ib = function Dkd() { + var a; + if ((this.Db & 64) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (x: "; + Bfb(a, this.a); + a.a += ", y: "; + Bfb(a, this.b); + a.a += ")"; + return a.a; + }; + _.a = 0; + _.b = 0; + mdb(rte, "ElkBendPointImpl", 567); + bcb(723, 1985, { 105: 1, 413: 1, 160: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _._g = function Nkd(a, b, c) { + return Ekd(this, a, b, c); + }; + _.hh = function Okd(a, b, c) { + return Fkd(this, a, b, c); + }; + _.jh = function Pkd(a, b, c) { + return Gkd(this, a, b, c); + }; + _.lh = function Qkd(a) { + return Hkd(this, a); + }; + _.sh = function Rkd(a, b) { + Ikd(this, a, b); + }; + _.zh = function Skd() { + return Thd(), Mhd; + }; + _.Bh = function Tkd(a) { + Jkd(this, a); + }; + _.zg = function Ukd() { + return this.k; + }; + _.Ag = function Vkd() { + return Kkd(this); + }; + _.Ib = function Wkd() { + return Mkd(this); + }; + _.k = null; + mdb(rte, "ElkGraphElementImpl", 723); + bcb(724, 723, { 105: 1, 413: 1, 160: 1, 470: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _._g = function gld(a, b, c) { + return Xkd(this, a, b, c); + }; + _.lh = function hld(a) { + return Ykd(this, a); + }; + _.sh = function ild(a, b) { + Zkd(this, a, b); + }; + _.zh = function jld() { + return Thd(), Rhd; + }; + _.Bh = function kld(a) { + $kd(this, a); + }; + _.Bg = function lld() { + return this.f; + }; + _.Cg = function mld() { + return this.g; + }; + _.Dg = function nld() { + return this.i; + }; + _.Eg = function old() { + return this.j; + }; + _.Fg = function pld(a, b) { + _kd(this, a, b); + }; + _.Gg = function qld(a, b) { + bld(this, a, b); + }; + _.Hg = function rld(a) { + dld(this, a); + }; + _.Ig = function sld(a) { + eld(this, a); + }; + _.Ib = function tld() { + return fld(this); + }; + _.f = 0; + _.g = 0; + _.i = 0; + _.j = 0; + mdb(rte, "ElkShapeImpl", 724); + bcb(725, 724, { 105: 1, 413: 1, 82: 1, 160: 1, 470: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _._g = function Bld(a, b, c) { + return uld(this, a, b, c); + }; + _.hh = function Cld(a, b, c) { + return vld(this, a, b, c); + }; + _.jh = function Dld(a, b, c) { + return wld(this, a, b, c); + }; + _.lh = function Eld(a) { + return xld(this, a); + }; + _.sh = function Fld(a, b) { + yld(this, a, b); + }; + _.zh = function Gld() { + return Thd(), Jhd; + }; + _.Bh = function Hld(a) { + zld(this, a); + }; + _.xg = function Ild() { + return !this.d && (this.d = new y5d(B2, this, 8, 5)), this.d; + }; + _.yg = function Jld() { + return !this.e && (this.e = new y5d(B2, this, 7, 4)), this.e; + }; + mdb(rte, "ElkConnectableShapeImpl", 725); + bcb(352, 723, { 105: 1, 413: 1, 79: 1, 160: 1, 352: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Tld); + _.Qg = function Uld(a) { + return Lld(this, a); + }; + _._g = function Vld(a, b, c) { + switch (a) { + case 3: + return Mld(this); + case 4: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b; + case 5: + return !this.c && (this.c = new y5d(z2, this, 5, 8)), this.c; + case 6: + return !this.a && (this.a = new cUd(A2, this, 6, 6)), this.a; + case 7: + return Bcb(), !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b.i <= 1 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i <= 1) ? false : true; + case 8: + return Bcb(), Pld(this) ? true : false; + case 9: + return Bcb(), Qld(this) ? true : false; + case 10: + return Bcb(), !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b.i != 0 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i != 0) ? true : false; + } + return Ekd(this, a, b, c); + }; + _.hh = function Wld(a, b, c) { + var d; + switch (b) { + case 3: + !!this.Cb && (c = (d = this.Db >> 16, d >= 0 ? Lld(this, c) : this.Cb.ih(this, -1 - d, null, c))); + return Kld(this, BD(a, 33), c); + case 4: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), Sxd(this.b, a, c); + case 5: + return !this.c && (this.c = new y5d(z2, this, 5, 8)), Sxd(this.c, a, c); + case 6: + return !this.a && (this.a = new cUd(A2, this, 6, 6)), Sxd(this.a, a, c); + } + return Fkd(this, a, b, c); + }; + _.jh = function Xld(a, b, c) { + switch (b) { + case 3: + return Kld(this, null, c); + case 4: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), Txd(this.b, a, c); + case 5: + return !this.c && (this.c = new y5d(z2, this, 5, 8)), Txd(this.c, a, c); + case 6: + return !this.a && (this.a = new cUd(A2, this, 6, 6)), Txd(this.a, a, c); + } + return Gkd(this, a, b, c); + }; + _.lh = function Yld(a) { + switch (a) { + case 3: + return !!Mld(this); + case 4: + return !!this.b && this.b.i != 0; + case 5: + return !!this.c && this.c.i != 0; + case 6: + return !!this.a && this.a.i != 0; + case 7: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), !(this.b.i <= 1 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i <= 1)); + case 8: + return Pld(this); + case 9: + return Qld(this); + case 10: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b.i != 0 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i != 0); + } + return Hkd(this, a); + }; + _.sh = function Zld(a, b) { + switch (a) { + case 3: + Rld(this, BD(b, 33)); + return; + case 4: + !this.b && (this.b = new y5d(z2, this, 4, 7)); + Uxd(this.b); + !this.b && (this.b = new y5d(z2, this, 4, 7)); + ytd(this.b, BD(b, 14)); + return; + case 5: + !this.c && (this.c = new y5d(z2, this, 5, 8)); + Uxd(this.c); + !this.c && (this.c = new y5d(z2, this, 5, 8)); + ytd(this.c, BD(b, 14)); + return; + case 6: + !this.a && (this.a = new cUd(A2, this, 6, 6)); + Uxd(this.a); + !this.a && (this.a = new cUd(A2, this, 6, 6)); + ytd(this.a, BD(b, 14)); + return; + } + Ikd(this, a, b); + }; + _.zh = function $ld() { + return Thd(), Khd; + }; + _.Bh = function _ld(a) { + switch (a) { + case 3: + Rld(this, null); + return; + case 4: + !this.b && (this.b = new y5d(z2, this, 4, 7)); + Uxd(this.b); + return; + case 5: + !this.c && (this.c = new y5d(z2, this, 5, 8)); + Uxd(this.c); + return; + case 6: + !this.a && (this.a = new cUd(A2, this, 6, 6)); + Uxd(this.a); + return; + } + Jkd(this, a); + }; + _.Ib = function amd() { + return Sld(this); + }; + mdb(rte, "ElkEdgeImpl", 352); + bcb(439, 1985, { 105: 1, 413: 1, 202: 1, 439: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, rmd); + _.Qg = function smd(a) { + return cmd(this, a); + }; + _._g = function tmd(a, b, c) { + switch (a) { + case 1: + return this.j; + case 2: + return this.k; + case 3: + return this.b; + case 4: + return this.c; + case 5: + return !this.a && (this.a = new xMd(y2, this, 5)), this.a; + case 6: + return fmd(this); + case 7: + if (b) + return emd(this); + return this.i; + case 8: + if (b) + return dmd(this); + return this.f; + case 9: + return !this.g && (this.g = new y5d(A2, this, 9, 10)), this.g; + case 10: + return !this.e && (this.e = new y5d(A2, this, 10, 9)), this.e; + case 11: + return this.d; + } + return bkd(this, a, b, c); + }; + _.hh = function umd(a, b, c) { + var d, e, f; + switch (b) { + case 6: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? cmd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return bmd(this, BD(a, 79), c); + case 9: + return !this.g && (this.g = new y5d(A2, this, 9, 10)), Sxd(this.g, a, c); + case 10: + return !this.e && (this.e = new y5d(A2, this, 10, 9)), Sxd(this.e, a, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (Thd(), Lhd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((Thd(), Lhd)), a, c); + }; + _.jh = function vmd(a, b, c) { + switch (b) { + case 5: + return !this.a && (this.a = new xMd(y2, this, 5)), Txd(this.a, a, c); + case 6: + return bmd(this, null, c); + case 9: + return !this.g && (this.g = new y5d(A2, this, 9, 10)), Txd(this.g, a, c); + case 10: + return !this.e && (this.e = new y5d(A2, this, 10, 9)), Txd(this.e, a, c); + } + return ckd(this, a, b, c); + }; + _.lh = function wmd(a) { + switch (a) { + case 1: + return this.j != 0; + case 2: + return this.k != 0; + case 3: + return this.b != 0; + case 4: + return this.c != 0; + case 5: + return !!this.a && this.a.i != 0; + case 6: + return !!fmd(this); + case 7: + return !!this.i; + case 8: + return !!this.f; + case 9: + return !!this.g && this.g.i != 0; + case 10: + return !!this.e && this.e.i != 0; + case 11: + return this.d != null; + } + return dkd(this, a); + }; + _.sh = function xmd(a, b) { + switch (a) { + case 1: + omd(this, Edb(ED(b))); + return; + case 2: + pmd(this, Edb(ED(b))); + return; + case 3: + hmd(this, Edb(ED(b))); + return; + case 4: + imd(this, Edb(ED(b))); + return; + case 5: + !this.a && (this.a = new xMd(y2, this, 5)); + Uxd(this.a); + !this.a && (this.a = new xMd(y2, this, 5)); + ytd(this.a, BD(b, 14)); + return; + case 6: + mmd(this, BD(b, 79)); + return; + case 7: + lmd(this, BD(b, 82)); + return; + case 8: + kmd(this, BD(b, 82)); + return; + case 9: + !this.g && (this.g = new y5d(A2, this, 9, 10)); + Uxd(this.g); + !this.g && (this.g = new y5d(A2, this, 9, 10)); + ytd(this.g, BD(b, 14)); + return; + case 10: + !this.e && (this.e = new y5d(A2, this, 10, 9)); + Uxd(this.e); + !this.e && (this.e = new y5d(A2, this, 10, 9)); + ytd(this.e, BD(b, 14)); + return; + case 11: + jmd(this, GD(b)); + return; + } + ekd(this, a, b); + }; + _.zh = function ymd() { + return Thd(), Lhd; + }; + _.Bh = function zmd(a) { + switch (a) { + case 1: + omd(this, 0); + return; + case 2: + pmd(this, 0); + return; + case 3: + hmd(this, 0); + return; + case 4: + imd(this, 0); + return; + case 5: + !this.a && (this.a = new xMd(y2, this, 5)); + Uxd(this.a); + return; + case 6: + mmd(this, null); + return; + case 7: + lmd(this, null); + return; + case 8: + kmd(this, null); + return; + case 9: + !this.g && (this.g = new y5d(A2, this, 9, 10)); + Uxd(this.g); + return; + case 10: + !this.e && (this.e = new y5d(A2, this, 10, 9)); + Uxd(this.e); + return; + case 11: + jmd(this, null); + return; + } + fkd(this, a); + }; + _.Ib = function Amd() { + return qmd(this); + }; + _.b = 0; + _.c = 0; + _.d = null; + _.j = 0; + _.k = 0; + mdb(rte, "ElkEdgeSectionImpl", 439); + bcb(150, 115, { 105: 1, 92: 1, 90: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }); + _._g = function Emd(a, b, c) { + var d; + if (a == 0) { + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c); + }; + _.hh = function Fmd(a, b, c) { + var d, e; + if (b == 0) { + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Qj(this, yjd(this), b - aLd(this.zh()), a, c); + }; + _.jh = function Gmd(a, b, c) { + var d, e; + if (b == 0) { + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c); + }; + _.lh = function Hmd(a) { + var b; + if (a == 0) { + return !!this.Ab && this.Ab.i != 0; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.oh = function Imd(a) { + return Bmd(this, a); + }; + _.sh = function Jmd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + } + did(this, a - aLd(this.zh()), XKd((c = BD(Ajd(this, 16), 26), !c ? this.zh() : c), a), b); + }; + _.uh = function Kmd(a) { + Cjd(this, 128, a); + }; + _.zh = function Lmd() { + return jGd(), ZFd; + }; + _.Bh = function Mmd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.Gh = function Nmd() { + this.Bb |= 1; + }; + _.Hh = function Omd(a) { + return Dmd(this, a); + }; + _.Bb = 0; + mdb(qte, "EModelElementImpl", 150); + bcb(704, 150, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, $md); + _.Ih = function _md(a, b) { + return Vmd(this, a, b); + }; + _.Jh = function and(a) { + var b, c, d, e, f; + if (this.a != bKd(a) || (a.Bb & 256) != 0) { + throw vbb(new Wdb(xte + a.zb + ute)); + } + for (d = _Kd(a); VKd(d.a).i != 0; ) { + c = BD(nOd(d, 0, (b = BD(qud(VKd(d.a), 0), 87), f = b.c, JD(f, 88) ? BD(f, 26) : (jGd(), _Fd))), 26); + if (dKd(c)) { + e = bKd(c).Nh().Jh(c); + BD(e, 49).th(a); + return e; + } + d = _Kd(c); + } + return (a.D != null ? a.D : a.B) == "java.util.Map$Entry" ? new lHd(a) : new _Gd(a); + }; + _.Kh = function bnd(a, b) { + return Wmd(this, a, b); + }; + _._g = function cnd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.a; + } + return bid(this, a - aLd((jGd(), WFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? WFd : d), a), b, c); + }; + _.hh = function dnd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 1: + !!this.a && (c = BD(this.a, 49).ih(this, 4, o5, c)); + return Tmd(this, BD(a, 235), c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), WFd) : d), b), 66), e.Nj().Qj(this, yjd(this), b - aLd((jGd(), WFd)), a, c); + }; + _.jh = function end(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 1: + return Tmd(this, null, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), WFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), WFd)), a, c); + }; + _.lh = function fnd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return !!this.a; + } + return cid(this, a - aLd((jGd(), WFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? WFd : b), a)); + }; + _.sh = function gnd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + Ymd(this, BD(b, 235)); + return; + } + did(this, a - aLd((jGd(), WFd)), XKd((c = BD(Ajd(this, 16), 26), !c ? WFd : c), a), b); + }; + _.zh = function hnd() { + return jGd(), WFd; + }; + _.Bh = function ind(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + Ymd(this, null); + return; + } + eid(this, a - aLd((jGd(), WFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? WFd : b), a)); + }; + var Pmd, Qmd, Rmd; + mdb(qte, "EFactoryImpl", 704); + bcb(zte, 704, { 105: 1, 2014: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, knd); + _.Ih = function lnd(a, b) { + switch (a.yj()) { + case 12: + return BD(b, 146).tg(); + case 13: + return fcb(b); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + _.Jh = function mnd(a) { + var b, c, d, e, f, g, h, i; + switch (a.G == -1 && (a.G = (b = bKd(a), b ? HLd(b.Mh(), a) : -1)), a.G) { + case 4: + return f = new Jod(), f; + case 6: + return g = new apd(), g; + case 7: + return h = new ppd(), h; + case 8: + return d = new Tld(), d; + case 9: + return c = new xkd(), c; + case 10: + return e = new rmd(), e; + case 11: + return i = new Bpd(), i; + default: + throw vbb(new Wdb(xte + a.zb + ute)); + } + }; + _.Kh = function nnd(a, b) { + switch (a.yj()) { + case 13: + case 12: + return null; + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + mdb(rte, "ElkGraphFactoryImpl", zte); + bcb(438, 150, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }); + _.Wg = function rnd() { + var a, b; + b = (a = BD(Ajd(this, 16), 26), pNd(TKd(!a ? this.zh() : a))); + return b == null ? (nRd(), nRd(), mRd) : new GRd(this, b); + }; + _._g = function snd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.ne(); + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c); + }; + _.lh = function tnd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.sh = function und(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + this.Lh(GD(b)); + return; + } + did(this, a - aLd(this.zh()), XKd((c = BD(Ajd(this, 16), 26), !c ? this.zh() : c), a), b); + }; + _.zh = function vnd() { + return jGd(), $Fd; + }; + _.Bh = function wnd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + this.Lh(null); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.ne = function xnd() { + return this.zb; + }; + _.Lh = function ynd(a) { + pnd(this, a); + }; + _.Ib = function znd() { + return qnd(this); + }; + _.zb = null; + mdb(qte, "ENamedElementImpl", 438); + bcb(179, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1 }, eod); + _.Qg = function god(a) { + return Snd(this, a); + }; + _._g = function hod(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.yb; + case 3: + return this.xb; + case 4: + return this.sb; + case 5: + return !this.rb && (this.rb = new jUd(this, d5, this)), this.rb; + case 6: + return !this.vb && (this.vb = new gUd(o5, this, 6, 7)), this.vb; + case 7: + if (b) + return this.Db >> 16 == 7 ? BD(this.Cb, 235) : null; + return Ind(this); + } + return bid(this, a - aLd((jGd(), cGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? cGd : d), a), b, c); + }; + _.hh = function iod(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 4: + !!this.sb && (c = BD(this.sb, 49).ih(this, 1, i5, c)); + return Jnd(this, BD(a, 471), c); + case 5: + return !this.rb && (this.rb = new jUd(this, d5, this)), Sxd(this.rb, a, c); + case 6: + return !this.vb && (this.vb = new gUd(o5, this, 6, 7)), Sxd(this.vb, a, c); + case 7: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? Snd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 7, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), cGd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((jGd(), cGd)), a, c); + }; + _.jh = function jod(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 4: + return Jnd(this, null, c); + case 5: + return !this.rb && (this.rb = new jUd(this, d5, this)), Txd(this.rb, a, c); + case 6: + return !this.vb && (this.vb = new gUd(o5, this, 6, 7)), Txd(this.vb, a, c); + case 7: + return _hd(this, null, 7, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), cGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), cGd)), a, c); + }; + _.lh = function kod(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.yb != null; + case 3: + return this.xb != null; + case 4: + return !!this.sb; + case 5: + return !!this.rb && this.rb.i != 0; + case 6: + return !!this.vb && this.vb.i != 0; + case 7: + return !!Ind(this); + } + return cid(this, a - aLd((jGd(), cGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? cGd : b), a)); + }; + _.oh = function lod(a) { + var b; + b = Und(this, a); + return b ? b : Bmd(this, a); + }; + _.sh = function mod(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + dod(this, GD(b)); + return; + case 3: + cod(this, GD(b)); + return; + case 4: + bod(this, BD(b, 471)); + return; + case 5: + !this.rb && (this.rb = new jUd(this, d5, this)); + Uxd(this.rb); + !this.rb && (this.rb = new jUd(this, d5, this)); + ytd(this.rb, BD(b, 14)); + return; + case 6: + !this.vb && (this.vb = new gUd(o5, this, 6, 7)); + Uxd(this.vb); + !this.vb && (this.vb = new gUd(o5, this, 6, 7)); + ytd(this.vb, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), cGd)), XKd((c = BD(Ajd(this, 16), 26), !c ? cGd : c), a), b); + }; + _.vh = function nod(a) { + var b, c; + if (!!a && !!this.rb) { + for (c = new Fyd(this.rb); c.e != c.i.gc(); ) { + b = Dyd(c); + JD(b, 351) && (BD(b, 351).w = null); + } + } + Cjd(this, 64, a); + }; + _.zh = function ood() { + return jGd(), cGd; + }; + _.Bh = function pod(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + dod(this, null); + return; + case 3: + cod(this, null); + return; + case 4: + bod(this, null); + return; + case 5: + !this.rb && (this.rb = new jUd(this, d5, this)); + Uxd(this.rb); + return; + case 6: + !this.vb && (this.vb = new gUd(o5, this, 6, 7)); + Uxd(this.vb); + return; + } + eid(this, a - aLd((jGd(), cGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? cGd : b), a)); + }; + _.Gh = function qod() { + Tnd(this); + }; + _.Mh = function rod() { + return !this.rb && (this.rb = new jUd(this, d5, this)), this.rb; + }; + _.Nh = function sod() { + return this.sb; + }; + _.Oh = function tod() { + return this.ub; + }; + _.Ph = function uod() { + return this.xb; + }; + _.Qh = function vod() { + return this.yb; + }; + _.Rh = function wod(a) { + this.ub = a; + }; + _.Ib = function xod() { + var a; + if ((this.Db & 64) != 0) + return qnd(this); + a = new Jfb(qnd(this)); + a.a += " (nsURI: "; + Efb(a, this.yb); + a.a += ", nsPrefix: "; + Efb(a, this.xb); + a.a += ")"; + return a.a; + }; + _.xb = null; + _.yb = null; + mdb(qte, "EPackageImpl", 179); + bcb(555, 179, { 105: 1, 2016: 1, 555: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1 }, Bod); + _.q = false; + _.r = false; + var yod = false; + mdb(rte, "ElkGraphPackageImpl", 555); + bcb(354, 724, { 105: 1, 413: 1, 160: 1, 137: 1, 470: 1, 354: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Jod); + _.Qg = function Kod(a) { + return Eod(this, a); + }; + _._g = function Lod(a, b, c) { + switch (a) { + case 7: + return Fod(this); + case 8: + return this.a; + } + return Xkd(this, a, b, c); + }; + _.hh = function Mod(a, b, c) { + var d; + switch (b) { + case 7: + !!this.Cb && (c = (d = this.Db >> 16, d >= 0 ? Eod(this, c) : this.Cb.ih(this, -1 - d, null, c))); + return Dod(this, BD(a, 160), c); + } + return Fkd(this, a, b, c); + }; + _.jh = function Nod(a, b, c) { + if (b == 7) { + return Dod(this, null, c); + } + return Gkd(this, a, b, c); + }; + _.lh = function Ood(a) { + switch (a) { + case 7: + return !!Fod(this); + case 8: + return !dfb("", this.a); + } + return Ykd(this, a); + }; + _.sh = function Pod(a, b) { + switch (a) { + case 7: + God(this, BD(b, 160)); + return; + case 8: + Hod(this, GD(b)); + return; + } + Zkd(this, a, b); + }; + _.zh = function Qod() { + return Thd(), Nhd; + }; + _.Bh = function Rod(a) { + switch (a) { + case 7: + God(this, null); + return; + case 8: + Hod(this, ""); + return; + } + $kd(this, a); + }; + _.Ib = function Sod() { + return Iod(this); + }; + _.a = ""; + mdb(rte, "ElkLabelImpl", 354); + bcb(239, 725, { 105: 1, 413: 1, 82: 1, 160: 1, 33: 1, 470: 1, 239: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, apd); + _.Qg = function bpd(a) { + return Uod(this, a); + }; + _._g = function cpd(a, b, c) { + switch (a) { + case 9: + return !this.c && (this.c = new cUd(F2, this, 9, 9)), this.c; + case 10: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), this.a; + case 11: + return Xod(this); + case 12: + return !this.b && (this.b = new cUd(B2, this, 12, 3)), this.b; + case 13: + return Bcb(), !this.a && (this.a = new cUd(E2, this, 10, 11)), this.a.i > 0 ? true : false; + } + return uld(this, a, b, c); + }; + _.hh = function dpd(a, b, c) { + var d; + switch (b) { + case 9: + return !this.c && (this.c = new cUd(F2, this, 9, 9)), Sxd(this.c, a, c); + case 10: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), Sxd(this.a, a, c); + case 11: + !!this.Cb && (c = (d = this.Db >> 16, d >= 0 ? Uod(this, c) : this.Cb.ih(this, -1 - d, null, c))); + return Tod(this, BD(a, 33), c); + case 12: + return !this.b && (this.b = new cUd(B2, this, 12, 3)), Sxd(this.b, a, c); + } + return vld(this, a, b, c); + }; + _.jh = function epd(a, b, c) { + switch (b) { + case 9: + return !this.c && (this.c = new cUd(F2, this, 9, 9)), Txd(this.c, a, c); + case 10: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), Txd(this.a, a, c); + case 11: + return Tod(this, null, c); + case 12: + return !this.b && (this.b = new cUd(B2, this, 12, 3)), Txd(this.b, a, c); + } + return wld(this, a, b, c); + }; + _.lh = function fpd(a) { + switch (a) { + case 9: + return !!this.c && this.c.i != 0; + case 10: + return !!this.a && this.a.i != 0; + case 11: + return !!Xod(this); + case 12: + return !!this.b && this.b.i != 0; + case 13: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), this.a.i > 0; + } + return xld(this, a); + }; + _.sh = function gpd(a, b) { + switch (a) { + case 9: + !this.c && (this.c = new cUd(F2, this, 9, 9)); + Uxd(this.c); + !this.c && (this.c = new cUd(F2, this, 9, 9)); + ytd(this.c, BD(b, 14)); + return; + case 10: + !this.a && (this.a = new cUd(E2, this, 10, 11)); + Uxd(this.a); + !this.a && (this.a = new cUd(E2, this, 10, 11)); + ytd(this.a, BD(b, 14)); + return; + case 11: + $od(this, BD(b, 33)); + return; + case 12: + !this.b && (this.b = new cUd(B2, this, 12, 3)); + Uxd(this.b); + !this.b && (this.b = new cUd(B2, this, 12, 3)); + ytd(this.b, BD(b, 14)); + return; + } + yld(this, a, b); + }; + _.zh = function hpd() { + return Thd(), Ohd; + }; + _.Bh = function ipd(a) { + switch (a) { + case 9: + !this.c && (this.c = new cUd(F2, this, 9, 9)); + Uxd(this.c); + return; + case 10: + !this.a && (this.a = new cUd(E2, this, 10, 11)); + Uxd(this.a); + return; + case 11: + $od(this, null); + return; + case 12: + !this.b && (this.b = new cUd(B2, this, 12, 3)); + Uxd(this.b); + return; + } + zld(this, a); + }; + _.Ib = function jpd() { + return _od(this); + }; + mdb(rte, "ElkNodeImpl", 239); + bcb(186, 725, { 105: 1, 413: 1, 82: 1, 160: 1, 118: 1, 470: 1, 186: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, ppd); + _.Qg = function qpd(a) { + return lpd(this, a); + }; + _._g = function rpd(a, b, c) { + if (a == 9) { + return mpd(this); + } + return uld(this, a, b, c); + }; + _.hh = function spd(a, b, c) { + var d; + switch (b) { + case 9: + !!this.Cb && (c = (d = this.Db >> 16, d >= 0 ? lpd(this, c) : this.Cb.ih(this, -1 - d, null, c))); + return kpd(this, BD(a, 33), c); + } + return vld(this, a, b, c); + }; + _.jh = function tpd(a, b, c) { + if (b == 9) { + return kpd(this, null, c); + } + return wld(this, a, b, c); + }; + _.lh = function upd(a) { + if (a == 9) { + return !!mpd(this); + } + return xld(this, a); + }; + _.sh = function vpd(a, b) { + switch (a) { + case 9: + npd(this, BD(b, 33)); + return; + } + yld(this, a, b); + }; + _.zh = function wpd() { + return Thd(), Phd; + }; + _.Bh = function xpd(a) { + switch (a) { + case 9: + npd(this, null); + return; + } + zld(this, a); + }; + _.Ib = function ypd() { + return opd(this); + }; + mdb(rte, "ElkPortImpl", 186); + var J4 = odb(Tte, "BasicEMap/Entry"); + bcb(1092, 115, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Bpd); + _.Fb = function Hpd(a) { + return this === a; + }; + _.cd = function Jpd() { + return this.b; + }; + _.Hb = function Lpd() { + return FCb(this); + }; + _.Uh = function Npd(a) { + zpd(this, BD(a, 146)); + }; + _._g = function Cpd(a, b, c) { + switch (a) { + case 0: + return this.b; + case 1: + return this.c; + } + return fid(this, a, b, c); + }; + _.lh = function Dpd(a) { + switch (a) { + case 0: + return !!this.b; + case 1: + return this.c != null; + } + return mid(this, a); + }; + _.sh = function Epd(a, b) { + switch (a) { + case 0: + zpd(this, BD(b, 146)); + return; + case 1: + Apd(this, b); + return; + } + yid(this, a, b); + }; + _.zh = function Fpd() { + return Thd(), Qhd; + }; + _.Bh = function Gpd(a) { + switch (a) { + case 0: + zpd(this, null); + return; + case 1: + Apd(this, null); + return; + } + Cid(this, a); + }; + _.Sh = function Ipd() { + var a; + if (this.a == -1) { + a = this.b; + this.a = !a ? 0 : tb(a); + } + return this.a; + }; + _.dd = function Kpd() { + return this.c; + }; + _.Th = function Mpd(a) { + this.a = a; + }; + _.ed = function Opd(a) { + var b; + b = this.c; + Apd(this, a); + return b; + }; + _.Ib = function Ppd() { + var a; + if ((this.Db & 64) != 0) + return Eid(this); + a = new Ufb(); + Qfb(Qfb(Qfb(a, this.b ? this.b.tg() : Xhe), gne), xfb(this.c)); + return a.a; + }; + _.a = -1; + _.c = null; + var S2 = mdb(rte, "ElkPropertyToValueMapEntryImpl", 1092); + bcb(984, 1, {}, bqd); + mdb(Wte, "JsonAdapter", 984); + bcb(210, 60, Tie, cqd); + mdb(Wte, "JsonImportException", 210); + bcb(857, 1, {}, ird); + mdb(Wte, "JsonImporter", 857); + bcb(891, 1, {}, jrd); + mdb(Wte, "JsonImporter/lambda$0$Type", 891); + bcb(892, 1, {}, krd); + mdb(Wte, "JsonImporter/lambda$1$Type", 892); + bcb(900, 1, {}, lrd); + mdb(Wte, "JsonImporter/lambda$10$Type", 900); + bcb(902, 1, {}, mrd); + mdb(Wte, "JsonImporter/lambda$11$Type", 902); + bcb(903, 1, {}, nrd); + mdb(Wte, "JsonImporter/lambda$12$Type", 903); + bcb(909, 1, {}, ord); + mdb(Wte, "JsonImporter/lambda$13$Type", 909); + bcb(908, 1, {}, prd); + mdb(Wte, "JsonImporter/lambda$14$Type", 908); + bcb(904, 1, {}, qrd); + mdb(Wte, "JsonImporter/lambda$15$Type", 904); + bcb(905, 1, {}, rrd); + mdb(Wte, "JsonImporter/lambda$16$Type", 905); + bcb(906, 1, {}, srd); + mdb(Wte, "JsonImporter/lambda$17$Type", 906); + bcb(907, 1, {}, trd); + mdb(Wte, "JsonImporter/lambda$18$Type", 907); + bcb(912, 1, {}, urd); + mdb(Wte, "JsonImporter/lambda$19$Type", 912); + bcb(893, 1, {}, vrd); + mdb(Wte, "JsonImporter/lambda$2$Type", 893); + bcb(910, 1, {}, wrd); + mdb(Wte, "JsonImporter/lambda$20$Type", 910); + bcb(911, 1, {}, xrd); + mdb(Wte, "JsonImporter/lambda$21$Type", 911); + bcb(915, 1, {}, yrd); + mdb(Wte, "JsonImporter/lambda$22$Type", 915); + bcb(913, 1, {}, zrd); + mdb(Wte, "JsonImporter/lambda$23$Type", 913); + bcb(914, 1, {}, Ard); + mdb(Wte, "JsonImporter/lambda$24$Type", 914); + bcb(917, 1, {}, Brd); + mdb(Wte, "JsonImporter/lambda$25$Type", 917); + bcb(916, 1, {}, Crd); + mdb(Wte, "JsonImporter/lambda$26$Type", 916); + bcb(918, 1, qie, Drd); + _.td = function Erd(a) { + Bqd(this.b, this.a, GD(a)); + }; + mdb(Wte, "JsonImporter/lambda$27$Type", 918); + bcb(919, 1, qie, Frd); + _.td = function Grd(a) { + Cqd(this.b, this.a, GD(a)); + }; + mdb(Wte, "JsonImporter/lambda$28$Type", 919); + bcb(920, 1, {}, Hrd); + mdb(Wte, "JsonImporter/lambda$29$Type", 920); + bcb(896, 1, {}, Ird); + mdb(Wte, "JsonImporter/lambda$3$Type", 896); + bcb(921, 1, {}, Jrd); + mdb(Wte, "JsonImporter/lambda$30$Type", 921); + bcb(922, 1, {}, Krd); + mdb(Wte, "JsonImporter/lambda$31$Type", 922); + bcb(923, 1, {}, Lrd); + mdb(Wte, "JsonImporter/lambda$32$Type", 923); + bcb(924, 1, {}, Mrd); + mdb(Wte, "JsonImporter/lambda$33$Type", 924); + bcb(925, 1, {}, Nrd); + mdb(Wte, "JsonImporter/lambda$34$Type", 925); + bcb(859, 1, {}, Prd); + mdb(Wte, "JsonImporter/lambda$35$Type", 859); + bcb(929, 1, {}, Rrd); + mdb(Wte, "JsonImporter/lambda$36$Type", 929); + bcb(926, 1, qie, Srd); + _.td = function Trd(a) { + Lqd(this.a, BD(a, 469)); + }; + mdb(Wte, "JsonImporter/lambda$37$Type", 926); + bcb(927, 1, qie, Urd); + _.td = function Vrd(a) { + Mqd(this.a, this.b, BD(a, 202)); + }; + mdb(Wte, "JsonImporter/lambda$38$Type", 927); + bcb(928, 1, qie, Wrd); + _.td = function Xrd(a) { + Nqd(this.a, this.b, BD(a, 202)); + }; + mdb(Wte, "JsonImporter/lambda$39$Type", 928); + bcb(894, 1, {}, Yrd); + mdb(Wte, "JsonImporter/lambda$4$Type", 894); + bcb(930, 1, qie, Zrd); + _.td = function $rd(a) { + Oqd(this.a, BD(a, 8)); + }; + mdb(Wte, "JsonImporter/lambda$40$Type", 930); + bcb(895, 1, {}, _rd); + mdb(Wte, "JsonImporter/lambda$5$Type", 895); + bcb(899, 1, {}, asd); + mdb(Wte, "JsonImporter/lambda$6$Type", 899); + bcb(897, 1, {}, bsd); + mdb(Wte, "JsonImporter/lambda$7$Type", 897); + bcb(898, 1, {}, csd); + mdb(Wte, "JsonImporter/lambda$8$Type", 898); + bcb(901, 1, {}, dsd); + mdb(Wte, "JsonImporter/lambda$9$Type", 901); + bcb(948, 1, qie, msd); + _.td = function nsd(a) { + Qpd(this.a, new yC(GD(a))); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$0$Type", 948); + bcb(949, 1, qie, osd); + _.td = function psd(a) { + isd(this.a, BD(a, 237)); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$1$Type", 949); + bcb(950, 1, qie, qsd); + _.td = function rsd(a) { + jsd(this.a, BD(a, 149)); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$2$Type", 950); + bcb(951, 1, qie, ssd); + _.td = function tsd(a) { + ksd(this.a, BD(a, 175)); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$3$Type", 951); + bcb(237, 22, { 3: 1, 35: 1, 22: 1, 237: 1 }, Dsd); + var usd, vsd, wsd, xsd, ysd, zsd, Asd, Bsd; + var O3 = ndb(Hle, "GraphFeature", 237, CI, Fsd, Esd); + var Gsd; + bcb(13, 1, { 35: 1, 146: 1 }, Lsd, Msd, Nsd, Osd); + _.wd = function Psd(a) { + return Isd(this, BD(a, 146)); + }; + _.Fb = function Qsd(a) { + return Jsd(this, a); + }; + _.wg = function Rsd() { + return Ksd(this); + }; + _.tg = function Ssd() { + return this.b; + }; + _.Hb = function Tsd() { + return LCb(this.b); + }; + _.Ib = function Usd() { + return this.b; + }; + mdb(Hle, "Property", 13); + bcb(818, 1, Dke, Wsd); + _.ue = function Xsd(a, b) { + return Vsd(this, BD(a, 94), BD(b, 94)); + }; + _.Fb = function Ysd(a) { + return this === a; + }; + _.ve = function Zsd() { + return new tpb(this); + }; + mdb(Hle, "PropertyHolderComparator", 818); + bcb(695, 1, aie, qtd); + _.Nb = function rtd(a) { + Rrb(this, a); + }; + _.Pb = function ttd() { + return ptd(this); + }; + _.Qb = function utd() { + Srb(); + }; + _.Ob = function std() { + return !!this.a; + }; + mdb(jue, "ElkGraphUtil/AncestorIterator", 695); + var T4 = odb(Tte, "EList"); + bcb(67, 52, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1 }); + _.Vc = function Jtd(a, b) { + vtd(this, a, b); + }; + _.Fc = function Ktd(a) { + return wtd(this, a); + }; + _.Wc = function Ltd(a, b) { + return xtd(this, a, b); + }; + _.Gc = function Mtd(a) { + return ytd(this, a); + }; + _.Zh = function Ntd() { + return new $yd(this); + }; + _.$h = function Otd() { + return new bzd(this); + }; + _._h = function Ptd(a) { + return ztd(this, a); + }; + _.ai = function Qtd() { + return true; + }; + _.bi = function Rtd(a, b) { + }; + _.ci = function Std() { + }; + _.di = function Ttd(a, b) { + Atd(this, a, b); + }; + _.ei = function Utd(a, b, c) { + }; + _.fi = function Vtd(a, b) { + }; + _.gi = function Wtd(a, b, c) { + }; + _.Fb = function Xtd(a) { + return Btd(this, a); + }; + _.Hb = function Ytd() { + return Etd(this); + }; + _.hi = function Ztd() { + return false; + }; + _.Kc = function $td() { + return new Fyd(this); + }; + _.Yc = function _td() { + return new Oyd(this); + }; + _.Zc = function aud(a) { + var b; + b = this.gc(); + if (a < 0 || a > b) + throw vbb(new Cyd(a, b)); + return new Pyd(this, a); + }; + _.ji = function bud(a, b) { + this.ii(a, this.Xc(b)); + }; + _.Mc = function cud(a) { + return Ftd(this, a); + }; + _.li = function dud(a, b) { + return b; + }; + _._c = function eud(a, b) { + return Gtd(this, a, b); + }; + _.Ib = function fud() { + return Htd(this); + }; + _.ni = function gud() { + return true; + }; + _.oi = function hud(a, b) { + return Itd(this, b); + }; + mdb(Tte, "AbstractEList", 67); + bcb(63, 67, oue, yud, zud, Aud); + _.Vh = function Bud(a, b) { + return iud(this, a, b); + }; + _.Wh = function Cud(a) { + return jud(this, a); + }; + _.Xh = function Dud(a, b) { + kud(this, a, b); + }; + _.Yh = function Eud(a) { + lud(this, a); + }; + _.pi = function Fud(a) { + return nud(this, a); + }; + _.$b = function Gud() { + oud(this); + }; + _.Hc = function Hud(a) { + return pud(this, a); + }; + _.Xb = function Iud(a) { + return qud(this, a); + }; + _.qi = function Jud(a) { + var b, c, d; + ++this.j; + c = this.g == null ? 0 : this.g.length; + if (a > c) { + d = this.g; + b = c + (c / 2 | 0) + 4; + b < a && (b = a); + this.g = this.ri(b); + d != null && $fb(d, 0, this.g, 0, this.i); + } + }; + _.Xc = function Kud(a) { + return rud(this, a); + }; + _.dc = function Lud() { + return this.i == 0; + }; + _.ii = function Mud(a, b) { + return sud(this, a, b); + }; + _.ri = function Nud(a) { + return KC(SI, Uhe, 1, a, 5, 1); + }; + _.ki = function Oud(a) { + return this.g[a]; + }; + _.$c = function Pud(a) { + return tud(this, a); + }; + _.mi = function Qud(a, b) { + return uud(this, a, b); + }; + _.gc = function Rud() { + return this.i; + }; + _.Pc = function Sud() { + return wud(this); + }; + _.Qc = function Tud(a) { + return xud(this, a); + }; + _.i = 0; + var y4 = mdb(Tte, "BasicEList", 63); + var X4 = odb(Tte, "TreeIterator"); + bcb(694, 63, pue); + _.Nb = function Xud(a) { + Rrb(this, a); + }; + _.Ob = function Yud() { + return this.g == null && !this.c ? Uud(this) : this.g == null || this.i != 0 && BD(this.g[this.i - 1], 47).Ob(); + }; + _.Pb = function Zud() { + return Vud(this); + }; + _.Qb = function $ud() { + if (!this.e) { + throw vbb(new Zdb("There is no valid object to remove.")); + } + this.e.Qb(); + }; + _.c = false; + mdb(Tte, "AbstractTreeIterator", 694); + bcb(685, 694, pue, _ud); + _.si = function avd(a) { + var b; + b = BD(a, 56).Wg().Kc(); + JD(b, 279) && BD(b, 279).Nk(new bvd()); + return b; + }; + mdb(jue, "ElkGraphUtil/PropertiesSkippingTreeIterator", 685); + bcb(952, 1, {}, bvd); + mdb(jue, "ElkGraphUtil/PropertiesSkippingTreeIterator/1", 952); + var cvd, dvd; + var Y3 = mdb(jue, "ElkReflect", null); + bcb(889, 1, hse, jvd); + _.vg = function kvd(a) { + return evd(), sqb(BD(a, 174)); + }; + mdb(jue, "ElkReflect/lambda$0$Type", 889); + var lvd; + odb(Tte, "ResourceLocator"); + bcb(1051, 1, {}); + mdb(Tte, "DelegatingResourceLocator", 1051); + bcb(1052, 1051, {}); + mdb("org.eclipse.emf.common", "EMFPlugin", 1052); + var $3 = odb(cve, "Adapter"); + var _3 = odb(cve, "Notification"); + bcb(1153, 1, dve); + _.ti = function vvd() { + return this.d; + }; + _.ui = function wvd(a) { + }; + _.vi = function xvd(a) { + this.d = a; + }; + _.wi = function yvd(a) { + this.d == a && (this.d = null); + }; + _.d = null; + mdb(hte, "AdapterImpl", 1153); + bcb(1995, 67, eve); + _.Vh = function Fvd(a, b) { + return zvd(this, a, b); + }; + _.Wh = function Gvd(a) { + var b, c, d; + ++this.j; + if (a.dc()) { + return false; + } else { + b = this.Vi(); + for (d = a.Kc(); d.Ob(); ) { + c = d.Pb(); + this.Ii(this.oi(b, c)); + ++b; + } + return true; + } + }; + _.Xh = function Hvd(a, b) { + Avd(this, a, b); + }; + _.Yh = function Ivd(a) { + Bvd(this, a); + }; + _.Gi = function Jvd() { + return this.Ji(); + }; + _.$b = function Kvd() { + Cvd(this, this.Vi(), this.Wi()); + }; + _.Hc = function Lvd(a) { + return this.Li(a); + }; + _.Ic = function Mvd(a) { + return this.Mi(a); + }; + _.Hi = function Nvd(a, b) { + this.Si().jm(); + }; + _.Ii = function Ovd(a) { + this.Si().jm(); + }; + _.Ji = function Pvd() { + return this.Si(); + }; + _.Ki = function Qvd() { + this.Si().jm(); + }; + _.Li = function Rvd(a) { + return this.Si().jm(); + }; + _.Mi = function Svd(a) { + return this.Si().jm(); + }; + _.Ni = function Tvd(a) { + return this.Si().jm(); + }; + _.Oi = function Uvd(a) { + return this.Si().jm(); + }; + _.Pi = function Vvd() { + return this.Si().jm(); + }; + _.Qi = function Wvd(a) { + return this.Si().jm(); + }; + _.Ri = function Xvd() { + return this.Si().jm(); + }; + _.Ti = function Yvd(a) { + return this.Si().jm(); + }; + _.Ui = function Zvd(a, b) { + return this.Si().jm(); + }; + _.Vi = function $vd() { + return this.Si().jm(); + }; + _.Wi = function _vd() { + return this.Si().jm(); + }; + _.Xi = function awd(a) { + return this.Si().jm(); + }; + _.Yi = function bwd() { + return this.Si().jm(); + }; + _.Fb = function cwd(a) { + return this.Ni(a); + }; + _.Xb = function dwd(a) { + return this.li(a, this.Oi(a)); + }; + _.Hb = function ewd() { + return this.Pi(); + }; + _.Xc = function fwd(a) { + return this.Qi(a); + }; + _.dc = function gwd() { + return this.Ri(); + }; + _.ii = function hwd(a, b) { + return Dvd(this, a, b); + }; + _.ki = function iwd(a) { + return this.Oi(a); + }; + _.$c = function jwd(a) { + return Evd(this, a); + }; + _.Mc = function kwd(a) { + var b; + b = this.Xc(a); + if (b >= 0) { + this.$c(b); + return true; + } else { + return false; + } + }; + _.mi = function lwd(a, b) { + return this.Ui(a, this.oi(a, b)); + }; + _.gc = function mwd() { + return this.Vi(); + }; + _.Pc = function nwd() { + return this.Wi(); + }; + _.Qc = function owd(a) { + return this.Xi(a); + }; + _.Ib = function pwd() { + return this.Yi(); + }; + mdb(Tte, "DelegatingEList", 1995); + bcb(1996, 1995, eve); + _.Vh = function xwd(a, b) { + return qwd(this, a, b); + }; + _.Wh = function ywd(a) { + return this.Vh(this.Vi(), a); + }; + _.Xh = function zwd(a, b) { + rwd(this, a, b); + }; + _.Yh = function Awd(a) { + swd(this, a); + }; + _.ai = function Bwd() { + return !this.bj(); + }; + _.$b = function Cwd() { + vwd(this); + }; + _.Zi = function Dwd(a, b, c, d, e) { + return new Cxd(this, a, b, c, d, e); + }; + _.$i = function Ewd(a) { + Uhd(this.Ai(), a); + }; + _._i = function Fwd() { + return null; + }; + _.aj = function Gwd() { + return -1; + }; + _.Ai = function Hwd() { + return null; + }; + _.bj = function Iwd() { + return false; + }; + _.cj = function Jwd(a, b) { + return b; + }; + _.dj = function Kwd(a, b) { + return b; + }; + _.ej = function Lwd() { + return false; + }; + _.fj = function Mwd() { + return !this.Ri(); + }; + _.ii = function Nwd(a, b) { + var c, d; + if (this.ej()) { + d = this.fj(); + c = Dvd(this, a, b); + this.$i(this.Zi(7, meb(b), c, a, d)); + return c; + } else { + return Dvd(this, a, b); + } + }; + _.$c = function Owd(a) { + var b, c, d, e; + if (this.ej()) { + c = null; + d = this.fj(); + b = this.Zi(4, e = Evd(this, a), null, a, d); + if (this.bj() && !!e) { + c = this.dj(e, c); + if (!c) { + this.$i(b); + } else { + c.Ei(b); + c.Fi(); + } + } else { + if (!c) { + this.$i(b); + } else { + c.Ei(b); + c.Fi(); + } + } + return e; + } else { + e = Evd(this, a); + if (this.bj() && !!e) { + c = this.dj(e, null); + !!c && c.Fi(); + } + return e; + } + }; + _.mi = function Pwd(a, b) { + return wwd(this, a, b); + }; + mdb(hte, "DelegatingNotifyingListImpl", 1996); + bcb(143, 1, fve); + _.Ei = function pxd(a) { + return Qwd(this, a); + }; + _.Fi = function qxd() { + Rwd(this); + }; + _.xi = function rxd() { + return this.d; + }; + _._i = function sxd() { + return null; + }; + _.gj = function txd() { + return null; + }; + _.yi = function uxd(a) { + return -1; + }; + _.zi = function vxd() { + return $wd(this); + }; + _.Ai = function wxd() { + return null; + }; + _.Bi = function xxd() { + return hxd(this); + }; + _.Ci = function yxd() { + return this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o; + }; + _.hj = function zxd() { + return false; + }; + _.Di = function Axd(a) { + var b, c, d, e, f, g, h, i, j, k, l; + switch (this.d) { + case 1: + case 2: { + e = a.xi(); + switch (e) { + case 1: + case 2: { + f = a.Ai(); + if (PD(f) === PD(this.Ai()) && this.yi(null) == a.yi(null)) { + this.g = a.zi(); + a.xi() == 1 && (this.d = 1); + return true; + } + } + } + } + case 4: { + e = a.xi(); + switch (e) { + case 4: { + f = a.Ai(); + if (PD(f) === PD(this.Ai()) && this.yi(null) == a.yi(null)) { + j = jxd(this); + i = this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o; + g = a.Ci(); + this.d = 6; + l = new zud(2); + if (i <= g) { + wtd(l, this.n); + wtd(l, a.Bi()); + this.g = OC(GC(WD, 1), oje, 25, 15, [this.o = i, g + 1]); + } else { + wtd(l, a.Bi()); + wtd(l, this.n); + this.g = OC(GC(WD, 1), oje, 25, 15, [this.o = g, i]); + } + this.n = l; + j || (this.o = -2 - this.o - 1); + return true; + } + break; + } + } + break; + } + case 6: { + e = a.xi(); + switch (e) { + case 4: { + f = a.Ai(); + if (PD(f) === PD(this.Ai()) && this.yi(null) == a.yi(null)) { + j = jxd(this); + g = a.Ci(); + k = BD(this.g, 48); + d = KC(WD, oje, 25, k.length + 1, 15, 1); + b = 0; + while (b < k.length) { + h = k[b]; + if (h <= g) { + d[b++] = h; + ++g; + } else { + break; + } + } + c = BD(this.n, 15); + c.Vc(b, a.Bi()); + d[b] = g; + while (++b < d.length) { + d[b] = k[b - 1]; + } + this.g = d; + j || (this.o = -2 - d[0]); + return true; + } + break; + } + } + break; + } + } + return false; + }; + _.Ib = function Bxd() { + var a, b, c, d; + d = new Jfb(hdb(this.gm) + "@" + (b = tb(this) >>> 0, b.toString(16))); + d.a += " (eventType: "; + switch (this.d) { + case 1: { + d.a += "SET"; + break; + } + case 2: { + d.a += "UNSET"; + break; + } + case 3: { + d.a += "ADD"; + break; + } + case 5: { + d.a += "ADD_MANY"; + break; + } + case 4: { + d.a += "REMOVE"; + break; + } + case 6: { + d.a += "REMOVE_MANY"; + break; + } + case 7: { + d.a += "MOVE"; + break; + } + case 8: { + d.a += "REMOVING_ADAPTER"; + break; + } + case 9: { + d.a += "RESOLVE"; + break; + } + default: { + Cfb(d, this.d); + break; + } + } + ixd(this) && (d.a += ", touch: true", d); + d.a += ", position: "; + Cfb(d, this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o); + d.a += ", notifier: "; + Dfb(d, this.Ai()); + d.a += ", feature: "; + Dfb(d, this._i()); + d.a += ", oldValue: "; + Dfb(d, hxd(this)); + d.a += ", newValue: "; + if (this.d == 6 && JD(this.g, 48)) { + c = BD(this.g, 48); + d.a += "["; + for (a = 0; a < c.length; ) { + d.a += c[a]; + ++a < c.length && (d.a += She, d); + } + d.a += "]"; + } else { + Dfb(d, $wd(this)); + } + d.a += ", isTouch: "; + Ffb(d, ixd(this)); + d.a += ", wasSet: "; + Ffb(d, jxd(this)); + d.a += ")"; + return d.a; + }; + _.d = 0; + _.e = 0; + _.f = 0; + _.j = 0; + _.k = 0; + _.o = 0; + _.p = 0; + mdb(hte, "NotificationImpl", 143); + bcb(1167, 143, fve, Cxd); + _._i = function Dxd() { + return this.a._i(); + }; + _.yi = function Exd(a) { + return this.a.aj(); + }; + _.Ai = function Fxd() { + return this.a.Ai(); + }; + mdb(hte, "DelegatingNotifyingListImpl/1", 1167); + bcb(242, 63, oue, Hxd, Ixd); + _.Fc = function Jxd(a) { + return Gxd(this, BD(a, 366)); + }; + _.Ei = function Kxd(a) { + return Gxd(this, a); + }; + _.Fi = function Lxd() { + var a, b, c; + for (a = 0; a < this.i; ++a) { + b = BD(this.g[a], 366); + c = b.Ai(); + c != null && b.xi() != -1 && BD(c, 92).Ng(b); + } + }; + _.ri = function Mxd(a) { + return KC(_3, Uhe, 366, a, 0, 1); + }; + mdb(hte, "NotificationChainImpl", 242); + bcb(1378, 90, gte); + _.Kg = function Nxd() { + return this.e; + }; + _.Mg = function Oxd() { + return (this.f & 1) != 0; + }; + _.f = 1; + mdb(hte, "NotifierImpl", 1378); + bcb(1993, 63, oue); + _.Vh = function $xd(a, b) { + return Pxd(this, a, b); + }; + _.Wh = function _xd(a) { + return this.Vh(this.i, a); + }; + _.Xh = function ayd(a, b) { + Qxd(this, a, b); + }; + _.Yh = function byd(a) { + Rxd(this, a); + }; + _.ai = function cyd() { + return !this.bj(); + }; + _.$b = function dyd() { + Uxd(this); + }; + _.Zi = function eyd(a, b, c, d, e) { + return new vyd(this, a, b, c, d, e); + }; + _.$i = function fyd(a) { + Uhd(this.Ai(), a); + }; + _._i = function gyd() { + return null; + }; + _.aj = function hyd() { + return -1; + }; + _.Ai = function iyd() { + return null; + }; + _.bj = function jyd() { + return false; + }; + _.ij = function kyd() { + return false; + }; + _.cj = function lyd(a, b) { + return b; + }; + _.dj = function myd(a, b) { + return b; + }; + _.ej = function nyd() { + return false; + }; + _.fj = function oyd() { + return this.i != 0; + }; + _.ii = function pyd(a, b) { + return Wxd(this, a, b); + }; + _.$c = function qyd(a) { + return Xxd(this, a); + }; + _.mi = function ryd(a, b) { + return Zxd(this, a, b); + }; + _.jj = function syd(a, b) { + return b; + }; + _.kj = function tyd(a, b) { + return b; + }; + _.lj = function uyd(a, b, c) { + return c; + }; + mdb(hte, "NotifyingListImpl", 1993); + bcb(1166, 143, fve, vyd); + _._i = function wyd() { + return this.a._i(); + }; + _.yi = function xyd(a) { + return this.a.aj(); + }; + _.Ai = function yyd() { + return this.a.Ai(); + }; + mdb(hte, "NotifyingListImpl/1", 1166); + bcb(953, 63, oue, zyd); + _.Hc = function Ayd(a) { + if (this.i > 10) { + if (!this.b || this.c.j != this.a) { + this.b = new Vqb(this); + this.a = this.j; + } + return Rqb(this.b, a); + } else { + return pud(this, a); + } + }; + _.ni = function Byd() { + return true; + }; + _.a = 0; + mdb(Tte, "AbstractEList/1", 953); + bcb(295, 73, Mje, Cyd); + mdb(Tte, "AbstractEList/BasicIndexOutOfBoundsException", 295); + bcb(40, 1, aie, Fyd); + _.Nb = function Iyd(a) { + Rrb(this, a); + }; + _.mj = function Gyd() { + if (this.i.j != this.f) { + throw vbb(new Apb()); + } + }; + _.nj = function Hyd() { + return Dyd(this); + }; + _.Ob = function Jyd() { + return this.e != this.i.gc(); + }; + _.Pb = function Kyd() { + return this.nj(); + }; + _.Qb = function Lyd() { + Eyd(this); + }; + _.e = 0; + _.f = 0; + _.g = -1; + mdb(Tte, "AbstractEList/EIterator", 40); + bcb(278, 40, jie, Oyd, Pyd); + _.Qb = function Xyd() { + Eyd(this); + }; + _.Rb = function Qyd(a) { + Myd(this, a); + }; + _.oj = function Ryd() { + var b; + try { + b = this.d.Xb(--this.e); + this.mj(); + this.g = this.e; + return b; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + this.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + }; + _.pj = function Syd(a) { + Nyd(this, a); + }; + _.Sb = function Tyd() { + return this.e != 0; + }; + _.Tb = function Uyd() { + return this.e; + }; + _.Ub = function Vyd() { + return this.oj(); + }; + _.Vb = function Wyd() { + return this.e - 1; + }; + _.Wb = function Yyd(a) { + this.pj(a); + }; + mdb(Tte, "AbstractEList/EListIterator", 278); + bcb(341, 40, aie, $yd); + _.nj = function _yd() { + return Zyd(this); + }; + _.Qb = function azd() { + throw vbb(new bgb()); + }; + mdb(Tte, "AbstractEList/NonResolvingEIterator", 341); + bcb(385, 278, jie, bzd, czd); + _.Rb = function dzd(a) { + throw vbb(new bgb()); + }; + _.nj = function ezd() { + var b; + try { + b = this.c.ki(this.e); + this.mj(); + this.g = this.e++; + return b; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + this.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + }; + _.oj = function fzd() { + var b; + try { + b = this.c.ki(--this.e); + this.mj(); + this.g = this.e; + return b; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + this.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + }; + _.Qb = function gzd() { + throw vbb(new bgb()); + }; + _.Wb = function hzd(a) { + throw vbb(new bgb()); + }; + mdb(Tte, "AbstractEList/NonResolvingEListIterator", 385); + bcb(1982, 67, ive); + _.Vh = function pzd(a, b) { + var c, d, e, f, g, h, i, j, k, l, m; + e = b.gc(); + if (e != 0) { + j = BD(Ajd(this.a, 4), 126); + k = j == null ? 0 : j.length; + m = k + e; + d = nzd(this, m); + l = k - a; + l > 0 && $fb(j, a, d, a + e, l); + i = b.Kc(); + for (g = 0; g < e; ++g) { + h = i.Pb(); + c = a + g; + lzd(d, c, Itd(this, h)); + } + b0d(this, d); + for (f = 0; f < e; ++f) { + h = d[a]; + this.bi(a, h); + ++a; + } + return true; + } else { + ++this.j; + return false; + } + }; + _.Wh = function qzd(a) { + var b, c, d, e, f, g, h, i, j; + d = a.gc(); + if (d != 0) { + i = (c = BD(Ajd(this.a, 4), 126), c == null ? 0 : c.length); + j = i + d; + b = nzd(this, j); + h = a.Kc(); + for (f = i; f < j; ++f) { + g = h.Pb(); + lzd(b, f, Itd(this, g)); + } + b0d(this, b); + for (e = i; e < j; ++e) { + g = b[e]; + this.bi(e, g); + } + return true; + } else { + ++this.j; + return false; + } + }; + _.Xh = function rzd(a, b) { + var c, d, e, f; + d = BD(Ajd(this.a, 4), 126); + e = d == null ? 0 : d.length; + c = nzd(this, e + 1); + f = Itd(this, b); + a != e && $fb(d, a, c, a + 1, e - a); + NC(c, a, f); + b0d(this, c); + this.bi(a, b); + }; + _.Yh = function szd(a) { + var b, c, d; + d = (c = BD(Ajd(this.a, 4), 126), c == null ? 0 : c.length); + b = nzd(this, d + 1); + lzd(b, d, Itd(this, a)); + b0d(this, b); + this.bi(d, a); + }; + _.Zh = function tzd() { + return new Uzd(this); + }; + _.$h = function uzd() { + return new Xzd(this); + }; + _._h = function vzd(a) { + var b, c; + c = (b = BD(Ajd(this.a, 4), 126), b == null ? 0 : b.length); + if (a < 0 || a > c) + throw vbb(new Cyd(a, c)); + return new Yzd(this, a); + }; + _.$b = function wzd() { + var a, b; + ++this.j; + a = BD(Ajd(this.a, 4), 126); + b = a == null ? 0 : a.length; + b0d(this, null); + Atd(this, b, a); + }; + _.Hc = function xzd(a) { + var b, c, d, e, f; + b = BD(Ajd(this.a, 4), 126); + if (b != null) { + if (a != null) { + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + if (pb(a, c)) { + return true; + } + } + } else { + for (d = b, e = 0, f = d.length; e < f; ++e) { + c = d[e]; + if (PD(c) === PD(a)) { + return true; + } + } + } + } + return false; + }; + _.Xb = function yzd(a) { + var b, c; + b = BD(Ajd(this.a, 4), 126); + c = b == null ? 0 : b.length; + if (a >= c) + throw vbb(new Cyd(a, c)); + return b[a]; + }; + _.Xc = function zzd(a) { + var b, c, d; + b = BD(Ajd(this.a, 4), 126); + if (b != null) { + if (a != null) { + for (c = 0, d = b.length; c < d; ++c) { + if (pb(a, b[c])) { + return c; + } + } + } else { + for (c = 0, d = b.length; c < d; ++c) { + if (PD(b[c]) === PD(a)) { + return c; + } + } + } + } + return -1; + }; + _.dc = function Azd() { + return BD(Ajd(this.a, 4), 126) == null; + }; + _.Kc = function Bzd() { + return new Lzd(this); + }; + _.Yc = function Czd() { + return new Pzd(this); + }; + _.Zc = function Dzd(a) { + var b, c; + c = (b = BD(Ajd(this.a, 4), 126), b == null ? 0 : b.length); + if (a < 0 || a > c) + throw vbb(new Cyd(a, c)); + return new Qzd(this, a); + }; + _.ii = function Ezd(a, b) { + var c, d, e; + c = mzd(this); + e = c == null ? 0 : c.length; + if (a >= e) + throw vbb(new qcb(lue + a + mue + e)); + if (b >= e) + throw vbb(new qcb(nue + b + mue + e)); + d = c[b]; + if (a != b) { + a < b ? $fb(c, a, c, a + 1, b - a) : $fb(c, b + 1, c, b, a - b); + NC(c, a, d); + b0d(this, c); + } + return d; + }; + _.ki = function Fzd(a) { + return BD(Ajd(this.a, 4), 126)[a]; + }; + _.$c = function Gzd(a) { + return ozd(this, a); + }; + _.mi = function Hzd(a, b) { + var c, d; + c = mzd(this); + d = c[a]; + lzd(c, a, Itd(this, b)); + b0d(this, c); + return d; + }; + _.gc = function Izd() { + var a; + return a = BD(Ajd(this.a, 4), 126), a == null ? 0 : a.length; + }; + _.Pc = function Jzd() { + var a, b, c; + a = BD(Ajd(this.a, 4), 126); + c = a == null ? 0 : a.length; + b = KC($3, hve, 415, c, 0, 1); + c > 0 && $fb(a, 0, b, 0, c); + return b; + }; + _.Qc = function Kzd(a) { + var b, c, d; + b = BD(Ajd(this.a, 4), 126); + d = b == null ? 0 : b.length; + if (d > 0) { + if (a.length < d) { + c = izd(rb(a).c, d); + a = c; + } + $fb(b, 0, a, 0, d); + } + a.length > d && NC(a, d, null); + return a; + }; + var jzd; + mdb(Tte, "ArrayDelegatingEList", 1982); + bcb(1038, 40, aie, Lzd); + _.mj = function Mzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + _.Qb = function Nzd() { + Eyd(this); + this.a = BD(Ajd(this.b.a, 4), 126); + }; + mdb(Tte, "ArrayDelegatingEList/EIterator", 1038); + bcb(706, 278, jie, Pzd, Qzd); + _.mj = function Rzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + _.pj = function Szd(a) { + Nyd(this, a); + this.a = BD(Ajd(this.b.a, 4), 126); + }; + _.Qb = function Tzd() { + Eyd(this); + this.a = BD(Ajd(this.b.a, 4), 126); + }; + mdb(Tte, "ArrayDelegatingEList/EListIterator", 706); + bcb(1039, 341, aie, Uzd); + _.mj = function Vzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + mdb(Tte, "ArrayDelegatingEList/NonResolvingEIterator", 1039); + bcb(707, 385, jie, Xzd, Yzd); + _.mj = function Zzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + mdb(Tte, "ArrayDelegatingEList/NonResolvingEListIterator", 707); + bcb(606, 295, Mje, $zd); + mdb(Tte, "BasicEList/BasicIndexOutOfBoundsException", 606); + bcb(696, 63, oue, _zd); + _.Vc = function aAd(a, b) { + throw vbb(new bgb()); + }; + _.Fc = function bAd(a) { + throw vbb(new bgb()); + }; + _.Wc = function cAd(a, b) { + throw vbb(new bgb()); + }; + _.Gc = function dAd(a) { + throw vbb(new bgb()); + }; + _.$b = function eAd() { + throw vbb(new bgb()); + }; + _.qi = function fAd(a) { + throw vbb(new bgb()); + }; + _.Kc = function gAd() { + return this.Zh(); + }; + _.Yc = function hAd() { + return this.$h(); + }; + _.Zc = function iAd(a) { + return this._h(a); + }; + _.ii = function jAd(a, b) { + throw vbb(new bgb()); + }; + _.ji = function kAd(a, b) { + throw vbb(new bgb()); + }; + _.$c = function lAd(a) { + throw vbb(new bgb()); + }; + _.Mc = function mAd(a) { + throw vbb(new bgb()); + }; + _._c = function nAd(a, b) { + throw vbb(new bgb()); + }; + mdb(Tte, "BasicEList/UnmodifiableEList", 696); + bcb(705, 1, { 3: 1, 20: 1, 14: 1, 15: 1, 58: 1, 589: 1 }); + _.Vc = function OAd(a, b) { + oAd(this, a, BD(b, 42)); + }; + _.Fc = function PAd(a) { + return pAd(this, BD(a, 42)); + }; + _.Jc = function XAd(a) { + reb(this, a); + }; + _.Xb = function YAd(a) { + return BD(qud(this.c, a), 133); + }; + _.ii = function fBd(a, b) { + return BD(this.c.ii(a, b), 42); + }; + _.ji = function gBd(a, b) { + GAd(this, a, BD(b, 42)); + }; + _.Lc = function jBd() { + return new YAb(null, new Kub(this, 16)); + }; + _.$c = function kBd(a) { + return BD(this.c.$c(a), 42); + }; + _._c = function mBd(a, b) { + return MAd(this, a, BD(b, 42)); + }; + _.ad = function oBd(a) { + ktb(this, a); + }; + _.Nc = function pBd() { + return new Kub(this, 16); + }; + _.Oc = function qBd() { + return new YAb(null, new Kub(this, 16)); + }; + _.Wc = function QAd(a, b) { + return this.c.Wc(a, b); + }; + _.Gc = function RAd(a) { + return this.c.Gc(a); + }; + _.$b = function SAd() { + this.c.$b(); + }; + _.Hc = function TAd(a) { + return this.c.Hc(a); + }; + _.Ic = function UAd(a) { + return Be(this.c, a); + }; + _.qj = function VAd() { + var a, b, c; + if (this.d == null) { + this.d = KC(y4, jve, 63, 2 * this.f + 1, 0, 1); + c = this.e; + this.f = 0; + for (b = this.c.Kc(); b.e != b.i.gc(); ) { + a = BD(b.nj(), 133); + uAd(this, a); + } + this.e = c; + } + }; + _.Fb = function WAd(a) { + return zAd(this, a); + }; + _.Hb = function ZAd() { + return Etd(this.c); + }; + _.Xc = function $Ad(a) { + return this.c.Xc(a); + }; + _.rj = function _Ad() { + this.c = new yBd(this); + }; + _.dc = function aBd() { + return this.f == 0; + }; + _.Kc = function bBd() { + return this.c.Kc(); + }; + _.Yc = function cBd() { + return this.c.Yc(); + }; + _.Zc = function dBd(a) { + return this.c.Zc(a); + }; + _.sj = function eBd() { + return FAd(this); + }; + _.tj = function hBd(a, b, c) { + return new zCd(a, b, c); + }; + _.uj = function iBd() { + return new EBd(); + }; + _.Mc = function lBd(a) { + return JAd(this, a); + }; + _.gc = function nBd() { + return this.f; + }; + _.bd = function rBd(a, b) { + return new Jib(this.c, a, b); + }; + _.Pc = function sBd() { + return this.c.Pc(); + }; + _.Qc = function tBd(a) { + return this.c.Qc(a); + }; + _.Ib = function uBd() { + return Htd(this.c); + }; + _.e = 0; + _.f = 0; + mdb(Tte, "BasicEMap", 705); + bcb(1033, 63, oue, yBd); + _.bi = function zBd(a, b) { + vBd(this, BD(b, 133)); + }; + _.ei = function BBd(a, b, c) { + var d; + ++(d = this, BD(b, 133), d).a.e; + }; + _.fi = function CBd(a, b) { + wBd(this, BD(b, 133)); + }; + _.gi = function DBd(a, b, c) { + xBd(this, BD(b, 133), BD(c, 133)); + }; + _.di = function ABd(a, b) { + tAd(this.a); + }; + mdb(Tte, "BasicEMap/1", 1033); + bcb(1034, 63, oue, EBd); + _.ri = function FBd(a) { + return KC(I4, kve, 612, a, 0, 1); + }; + mdb(Tte, "BasicEMap/2", 1034); + bcb(1035, eie, fie, GBd); + _.$b = function HBd() { + this.a.c.$b(); + }; + _.Hc = function IBd(a) { + return qAd(this.a, a); + }; + _.Kc = function JBd() { + return this.a.f == 0 ? (LCd(), KCd.a) : new dCd(this.a); + }; + _.Mc = function KBd(a) { + var b; + b = this.a.f; + LAd(this.a, a); + return this.a.f != b; + }; + _.gc = function LBd() { + return this.a.f; + }; + mdb(Tte, "BasicEMap/3", 1035); + bcb(1036, 28, die, MBd); + _.$b = function NBd() { + this.a.c.$b(); + }; + _.Hc = function OBd(a) { + return rAd(this.a, a); + }; + _.Kc = function PBd() { + return this.a.f == 0 ? (LCd(), KCd.a) : new fCd(this.a); + }; + _.gc = function QBd() { + return this.a.f; + }; + mdb(Tte, "BasicEMap/4", 1036); + bcb(1037, eie, fie, SBd); + _.$b = function TBd() { + this.a.c.$b(); + }; + _.Hc = function UBd(a) { + var b, c, d, e, f, g, h, i, j; + if (this.a.f > 0 && JD(a, 42)) { + this.a.qj(); + i = BD(a, 42); + h = i.cd(); + e = h == null ? 0 : tb(h); + f = DAd(this.a, e); + b = this.a.d[f]; + if (b) { + c = BD(b.g, 367); + j = b.i; + for (g = 0; g < j; ++g) { + d = c[g]; + if (d.Sh() == e && d.Fb(i)) { + return true; + } + } + } + } + return false; + }; + _.Kc = function VBd() { + return this.a.f == 0 ? (LCd(), KCd.a) : new ZBd(this.a); + }; + _.Mc = function WBd(a) { + return RBd(this, a); + }; + _.gc = function XBd() { + return this.a.f; + }; + mdb(Tte, "BasicEMap/5", 1037); + bcb(613, 1, aie, ZBd); + _.Nb = function $Bd(a) { + Rrb(this, a); + }; + _.Ob = function _Bd() { + return this.b != -1; + }; + _.Pb = function aCd() { + var a; + if (this.f.e != this.c) { + throw vbb(new Apb()); + } + if (this.b == -1) { + throw vbb(new utb()); + } + this.d = this.a; + this.e = this.b; + YBd(this); + a = BD(this.f.d[this.d].g[this.e], 133); + return this.vj(a); + }; + _.Qb = function bCd() { + if (this.f.e != this.c) { + throw vbb(new Apb()); + } + if (this.e == -1) { + throw vbb(new Ydb()); + } + this.f.c.Mc(qud(this.f.d[this.d], this.e)); + this.c = this.f.e; + this.e = -1; + this.a == this.d && this.b != -1 && --this.b; + }; + _.vj = function cCd(a) { + return a; + }; + _.a = 0; + _.b = -1; + _.c = 0; + _.d = 0; + _.e = 0; + mdb(Tte, "BasicEMap/BasicEMapIterator", 613); + bcb(1031, 613, aie, dCd); + _.vj = function eCd(a) { + return a.cd(); + }; + mdb(Tte, "BasicEMap/BasicEMapKeyIterator", 1031); + bcb(1032, 613, aie, fCd); + _.vj = function gCd(a) { + return a.dd(); + }; + mdb(Tte, "BasicEMap/BasicEMapValueIterator", 1032); + bcb(1030, 1, cie, iCd); + _.wc = function oCd(a) { + stb(this, a); + }; + _.yc = function tCd(a, b, c) { + return ttb(this, a, b, c); + }; + _.$b = function jCd() { + this.a.c.$b(); + }; + _._b = function kCd(a) { + return hCd(this, a); + }; + _.uc = function lCd(a) { + return rAd(this.a, a); + }; + _.vc = function mCd() { + return yAd(this.a); + }; + _.Fb = function nCd(a) { + return zAd(this.a, a); + }; + _.xc = function pCd(a) { + return AAd(this.a, a); + }; + _.Hb = function qCd() { + return Etd(this.a.c); + }; + _.dc = function rCd() { + return this.a.f == 0; + }; + _.ec = function sCd() { + return EAd(this.a); + }; + _.zc = function uCd(a, b) { + return HAd(this.a, a, b); + }; + _.Bc = function vCd(a) { + return LAd(this.a, a); + }; + _.gc = function wCd() { + return this.a.f; + }; + _.Ib = function xCd() { + return Htd(this.a.c); + }; + _.Cc = function yCd() { + return NAd(this.a); + }; + mdb(Tte, "BasicEMap/DelegatingMap", 1030); + bcb(612, 1, { 42: 1, 133: 1, 612: 1 }, zCd); + _.Fb = function ACd(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return (this.b != null ? pb(this.b, b.cd()) : PD(this.b) === PD(b.cd())) && (this.c != null ? pb(this.c, b.dd()) : PD(this.c) === PD(b.dd())); + } else { + return false; + } + }; + _.Sh = function BCd() { + return this.a; + }; + _.cd = function CCd() { + return this.b; + }; + _.dd = function DCd() { + return this.c; + }; + _.Hb = function ECd() { + return this.a ^ (this.c == null ? 0 : tb(this.c)); + }; + _.Th = function FCd(a) { + this.a = a; + }; + _.Uh = function GCd(a) { + throw vbb(new gz()); + }; + _.ed = function HCd(a) { + var b; + b = this.c; + this.c = a; + return b; + }; + _.Ib = function ICd() { + return this.b + "->" + this.c; + }; + _.a = 0; + var I4 = mdb(Tte, "BasicEMap/EntryImpl", 612); + bcb(536, 1, {}, JCd); + mdb(Tte, "BasicEMap/View", 536); + var KCd; + bcb(768, 1, {}); + _.Fb = function ZCd(a) { + return At((mmb(), jmb), a); + }; + _.Hb = function $Cd() { + return qmb((mmb(), jmb)); + }; + _.Ib = function _Cd() { + return Fe((mmb(), jmb)); + }; + mdb(Tte, "ECollections/BasicEmptyUnmodifiableEList", 768); + bcb(1312, 1, jie, aDd); + _.Nb = function cDd(a) { + Rrb(this, a); + }; + _.Rb = function bDd(a) { + throw vbb(new bgb()); + }; + _.Ob = function dDd() { + return false; + }; + _.Sb = function eDd() { + return false; + }; + _.Pb = function fDd() { + throw vbb(new utb()); + }; + _.Tb = function gDd() { + return 0; + }; + _.Ub = function hDd() { + throw vbb(new utb()); + }; + _.Vb = function iDd() { + return -1; + }; + _.Qb = function jDd() { + throw vbb(new bgb()); + }; + _.Wb = function kDd(a) { + throw vbb(new bgb()); + }; + mdb(Tte, "ECollections/BasicEmptyUnmodifiableEList/1", 1312); + bcb(1310, 768, { 20: 1, 14: 1, 15: 1, 58: 1 }, lDd); + _.Vc = function mDd(a, b) { + OCd(); + }; + _.Fc = function nDd(a) { + return PCd(); + }; + _.Wc = function oDd(a, b) { + return QCd(); + }; + _.Gc = function pDd(a) { + return RCd(); + }; + _.$b = function qDd() { + SCd(); + }; + _.Hc = function rDd(a) { + return false; + }; + _.Ic = function sDd(a) { + return false; + }; + _.Jc = function tDd(a) { + reb(this, a); + }; + _.Xb = function uDd(a) { + return wmb((mmb(), a)), null; + }; + _.Xc = function vDd(a) { + return -1; + }; + _.dc = function wDd() { + return true; + }; + _.Kc = function xDd() { + return this.a; + }; + _.Yc = function yDd() { + return this.a; + }; + _.Zc = function zDd(a) { + return this.a; + }; + _.ii = function ADd(a, b) { + return TCd(); + }; + _.ji = function BDd(a, b) { + UCd(); + }; + _.Lc = function CDd() { + return new YAb(null, new Kub(this, 16)); + }; + _.$c = function DDd(a) { + return VCd(); + }; + _.Mc = function EDd(a) { + return WCd(); + }; + _._c = function FDd(a, b) { + return XCd(); + }; + _.gc = function GDd() { + return 0; + }; + _.ad = function HDd(a) { + ktb(this, a); + }; + _.Nc = function IDd() { + return new Kub(this, 16); + }; + _.Oc = function JDd() { + return new YAb(null, new Kub(this, 16)); + }; + _.bd = function KDd(a, b) { + return mmb(), new Jib(jmb, a, b); + }; + _.Pc = function LDd() { + return De((mmb(), jmb)); + }; + _.Qc = function MDd(a) { + return mmb(), Ee(jmb, a); + }; + mdb(Tte, "ECollections/EmptyUnmodifiableEList", 1310); + bcb(1311, 768, { 20: 1, 14: 1, 15: 1, 58: 1, 589: 1 }, NDd); + _.Vc = function ODd(a, b) { + OCd(); + }; + _.Fc = function PDd(a) { + return PCd(); + }; + _.Wc = function QDd(a, b) { + return QCd(); + }; + _.Gc = function RDd(a) { + return RCd(); + }; + _.$b = function SDd() { + SCd(); + }; + _.Hc = function TDd(a) { + return false; + }; + _.Ic = function UDd(a) { + return false; + }; + _.Jc = function VDd(a) { + reb(this, a); + }; + _.Xb = function WDd(a) { + return wmb((mmb(), a)), null; + }; + _.Xc = function XDd(a) { + return -1; + }; + _.dc = function YDd() { + return true; + }; + _.Kc = function ZDd() { + return this.a; + }; + _.Yc = function $Dd() { + return this.a; + }; + _.Zc = function _Dd(a) { + return this.a; + }; + _.ii = function bEd(a, b) { + return TCd(); + }; + _.ji = function cEd(a, b) { + UCd(); + }; + _.Lc = function dEd() { + return new YAb(null, new Kub(this, 16)); + }; + _.$c = function eEd(a) { + return VCd(); + }; + _.Mc = function fEd(a) { + return WCd(); + }; + _._c = function gEd(a, b) { + return XCd(); + }; + _.gc = function hEd() { + return 0; + }; + _.ad = function iEd(a) { + ktb(this, a); + }; + _.Nc = function jEd() { + return new Kub(this, 16); + }; + _.Oc = function kEd() { + return new YAb(null, new Kub(this, 16)); + }; + _.bd = function lEd(a, b) { + return mmb(), new Jib(jmb, a, b); + }; + _.Pc = function mEd() { + return De((mmb(), jmb)); + }; + _.Qc = function nEd(a) { + return mmb(), Ee(jmb, a); + }; + _.sj = function aEd() { + return mmb(), mmb(), kmb; + }; + mdb(Tte, "ECollections/EmptyUnmodifiableEMap", 1311); + var U4 = odb(Tte, "Enumerator"); + var oEd; + bcb(281, 1, { 281: 1 }, NEd); + _.Fb = function REd(a) { + var b; + if (this === a) + return true; + if (!JD(a, 281)) + return false; + b = BD(a, 281); + return this.f == b.f && TEd(this.i, b.i) && SEd(this.a, (this.f & 256) != 0 ? (b.f & 256) != 0 ? b.a : null : (b.f & 256) != 0 ? null : b.a) && SEd(this.d, b.d) && SEd(this.g, b.g) && SEd(this.e, b.e) && KEd(this, b); + }; + _.Hb = function WEd() { + return this.f; + }; + _.Ib = function cFd() { + return LEd(this); + }; + _.f = 0; + var sEd = 0, tEd = 0, uEd = 0, vEd = 0, wEd = 0, xEd = 0, yEd = 0, zEd = 0, AEd = 0, BEd, CEd = 0, DEd = 0, EEd = 0, FEd = 0, GEd, HEd; + mdb(Tte, "URI", 281); + bcb(1091, 43, fke, mFd); + _.zc = function nFd(a, b) { + return BD(Shb(this, GD(a), BD(b, 281)), 281); + }; + mdb(Tte, "URI/URICache", 1091); + bcb(497, 63, oue, oFd, pFd); + _.hi = function qFd() { + return true; + }; + mdb(Tte, "UniqueEList", 497); + bcb(581, 60, Tie, rFd); + mdb(Tte, "WrappedException", 581); + var a5 = odb(Vse, nve); + var v5 = odb(Vse, ove); + var t5 = odb(Vse, pve); + var b5 = odb(Vse, qve); + var d5 = odb(Vse, rve); + var c5 = odb(Vse, "EClass"); + var f5 = odb(Vse, "EDataType"); + var sFd; + bcb(1183, 43, fke, vFd); + _.xc = function wFd(a) { + return ND(a) ? Phb(this, a) : Wd(irb(this.f, a)); + }; + mdb(Vse, "EDataType/Internal/ConversionDelegate/Factory/Registry/Impl", 1183); + var h5 = odb(Vse, "EEnum"); + var g5 = odb(Vse, sve); + var j5 = odb(Vse, tve); + var n5 = odb(Vse, uve); + var xFd; + var p5 = odb(Vse, vve); + var q5 = odb(Vse, wve); + bcb(1029, 1, {}, BFd); + _.Ib = function CFd() { + return "NIL"; + }; + mdb(Vse, "EStructuralFeature/Internal/DynamicValueHolder/1", 1029); + var DFd; + bcb(1028, 43, fke, GFd); + _.xc = function HFd(a) { + return ND(a) ? Phb(this, a) : Wd(irb(this.f, a)); + }; + mdb(Vse, "EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl", 1028); + var u5 = odb(Vse, xve); + var w5 = odb(Vse, "EValidator/PatternMatcher"); + var IFd; + var KFd; + var MFd; + var OFd, PFd, QFd, RFd, SFd, TFd, UFd, VFd, WFd, XFd, YFd, ZFd, $Fd, _Fd, aGd, bGd, cGd, dGd, eGd, fGd, gGd, hGd, iGd; + var E9 = odb(yve, "FeatureMap/Entry"); + bcb(535, 1, { 72: 1 }, kGd); + _.ak = function lGd() { + return this.a; + }; + _.dd = function mGd() { + return this.b; + }; + mdb(qte, "BasicEObjectImpl/1", 535); + bcb(1027, 1, zve, nGd); + _.Wj = function oGd(a) { + return hid(this.a, this.b, a); + }; + _.fj = function pGd() { + return nid(this.a, this.b); + }; + _.Wb = function qGd(a) { + zid(this.a, this.b, a); + }; + _.Xj = function rGd() { + Did(this.a, this.b); + }; + mdb(qte, "BasicEObjectImpl/4", 1027); + bcb(1983, 1, { 108: 1 }); + _.bk = function uGd(a) { + this.e = a == 0 ? sGd : KC(SI, Uhe, 1, a, 5, 1); + }; + _.Ch = function vGd(a) { + return this.e[a]; + }; + _.Dh = function wGd(a, b) { + this.e[a] = b; + }; + _.Eh = function xGd(a) { + this.e[a] = null; + }; + _.ck = function yGd() { + return this.c; + }; + _.dk = function zGd() { + throw vbb(new bgb()); + }; + _.ek = function AGd() { + throw vbb(new bgb()); + }; + _.fk = function BGd() { + return this.d; + }; + _.gk = function CGd() { + return this.e != null; + }; + _.hk = function DGd(a) { + this.c = a; + }; + _.ik = function EGd(a) { + throw vbb(new bgb()); + }; + _.jk = function FGd(a) { + throw vbb(new bgb()); + }; + _.kk = function GGd(a) { + this.d = a; + }; + var sGd; + mdb(qte, "BasicEObjectImpl/EPropertiesHolderBaseImpl", 1983); + bcb(185, 1983, { 108: 1 }, HGd); + _.dk = function IGd() { + return this.a; + }; + _.ek = function JGd() { + return this.b; + }; + _.ik = function KGd(a) { + this.a = a; + }; + _.jk = function LGd(a) { + this.b = a; + }; + mdb(qte, "BasicEObjectImpl/EPropertiesHolderImpl", 185); + bcb(506, 97, pte, MGd); + _.Kg = function NGd() { + return this.f; + }; + _.Pg = function OGd() { + return this.k; + }; + _.Rg = function PGd(a, b) { + this.g = a; + this.i = b; + }; + _.Tg = function QGd() { + return (this.j & 2) == 0 ? this.zh() : this.ph().ck(); + }; + _.Vg = function RGd() { + return this.i; + }; + _.Mg = function SGd() { + return (this.j & 1) != 0; + }; + _.eh = function TGd() { + return this.g; + }; + _.kh = function UGd() { + return (this.j & 4) != 0; + }; + _.ph = function VGd() { + return !this.k && (this.k = new HGd()), this.k; + }; + _.th = function WGd(a) { + this.ph().hk(a); + a ? this.j |= 2 : this.j &= -3; + }; + _.vh = function XGd(a) { + this.ph().jk(a); + a ? this.j |= 4 : this.j &= -5; + }; + _.zh = function YGd() { + return (NFd(), MFd).S; + }; + _.i = 0; + _.j = 1; + mdb(qte, "EObjectImpl", 506); + bcb(780, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1 }, _Gd); + _.Ch = function aHd(a) { + return this.e[a]; + }; + _.Dh = function bHd(a, b) { + this.e[a] = b; + }; + _.Eh = function cHd(a) { + this.e[a] = null; + }; + _.Tg = function dHd() { + return this.d; + }; + _.Yg = function eHd(a) { + return bLd(this.d, a); + }; + _.$g = function fHd() { + return this.d; + }; + _.dh = function gHd() { + return this.e != null; + }; + _.ph = function hHd() { + !this.k && (this.k = new vHd()); + return this.k; + }; + _.th = function iHd(a) { + this.d = a; + }; + _.yh = function jHd() { + var a; + if (this.e == null) { + a = aLd(this.d); + this.e = a == 0 ? ZGd : KC(SI, Uhe, 1, a, 5, 1); + } + return this; + }; + _.Ah = function kHd() { + return 0; + }; + var ZGd; + mdb(qte, "DynamicEObjectImpl", 780); + bcb(1376, 780, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1 }, lHd); + _.Fb = function nHd(a) { + return this === a; + }; + _.Hb = function rHd() { + return FCb(this); + }; + _.th = function mHd(a) { + this.d = a; + this.b = YKd(a, "key"); + this.c = YKd(a, Bte); + }; + _.Sh = function oHd() { + var a; + if (this.a == -1) { + a = iid(this, this.b); + this.a = a == null ? 0 : tb(a); + } + return this.a; + }; + _.cd = function pHd() { + return iid(this, this.b); + }; + _.dd = function qHd() { + return iid(this, this.c); + }; + _.Th = function sHd(a) { + this.a = a; + }; + _.Uh = function tHd(a) { + zid(this, this.b, a); + }; + _.ed = function uHd(a) { + var b; + b = iid(this, this.c); + zid(this, this.c, a); + return b; + }; + _.a = 0; + mdb(qte, "DynamicEObjectImpl/BasicEMapEntry", 1376); + bcb(1377, 1, { 108: 1 }, vHd); + _.bk = function wHd(a) { + throw vbb(new bgb()); + }; + _.Ch = function xHd(a) { + throw vbb(new bgb()); + }; + _.Dh = function yHd(a, b) { + throw vbb(new bgb()); + }; + _.Eh = function zHd(a) { + throw vbb(new bgb()); + }; + _.ck = function AHd() { + throw vbb(new bgb()); + }; + _.dk = function BHd() { + return this.a; + }; + _.ek = function CHd() { + return this.b; + }; + _.fk = function DHd() { + return this.c; + }; + _.gk = function EHd() { + throw vbb(new bgb()); + }; + _.hk = function FHd(a) { + throw vbb(new bgb()); + }; + _.ik = function GHd(a) { + this.a = a; + }; + _.jk = function HHd(a) { + this.b = a; + }; + _.kk = function IHd(a) { + this.c = a; + }; + mdb(qte, "DynamicEObjectImpl/DynamicEPropertiesHolderImpl", 1377); + bcb(510, 150, { 105: 1, 92: 1, 90: 1, 590: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 510: 1, 150: 1, 114: 1, 115: 1 }, RHd); + _.Qg = function SHd(a) { + return KHd(this, a); + }; + _._g = function THd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.d; + case 2: + return c ? (!this.b && (this.b = new sId((jGd(), fGd), x6, this)), this.b) : (!this.b && (this.b = new sId((jGd(), fGd), x6, this)), FAd(this.b)); + case 3: + return MHd(this); + case 4: + return !this.a && (this.a = new xMd(m5, this, 4)), this.a; + case 5: + return !this.c && (this.c = new _4d(m5, this, 5)), this.c; + } + return bid(this, a - aLd((jGd(), OFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? OFd : d), a), b, c); + }; + _.hh = function UHd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 3: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? KHd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return JHd(this, BD(a, 147), c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), OFd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((jGd(), OFd)), a, c); + }; + _.jh = function VHd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 2: + return !this.b && (this.b = new sId((jGd(), fGd), x6, this)), bId(this.b, a, c); + case 3: + return JHd(this, null, c); + case 4: + return !this.a && (this.a = new xMd(m5, this, 4)), Txd(this.a, a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), OFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), OFd)), a, c); + }; + _.lh = function WHd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.d != null; + case 2: + return !!this.b && this.b.f != 0; + case 3: + return !!MHd(this); + case 4: + return !!this.a && this.a.i != 0; + case 5: + return !!this.c && this.c.i != 0; + } + return cid(this, a - aLd((jGd(), OFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? OFd : b), a)); + }; + _.sh = function XHd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + OHd(this, GD(b)); + return; + case 2: + !this.b && (this.b = new sId((jGd(), fGd), x6, this)); + cId(this.b, b); + return; + case 3: + NHd(this, BD(b, 147)); + return; + case 4: + !this.a && (this.a = new xMd(m5, this, 4)); + Uxd(this.a); + !this.a && (this.a = new xMd(m5, this, 4)); + ytd(this.a, BD(b, 14)); + return; + case 5: + !this.c && (this.c = new _4d(m5, this, 5)); + Uxd(this.c); + !this.c && (this.c = new _4d(m5, this, 5)); + ytd(this.c, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), OFd)), XKd((c = BD(Ajd(this, 16), 26), !c ? OFd : c), a), b); + }; + _.zh = function YHd() { + return jGd(), OFd; + }; + _.Bh = function ZHd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + PHd(this, null); + return; + case 2: + !this.b && (this.b = new sId((jGd(), fGd), x6, this)); + this.b.c.$b(); + return; + case 3: + NHd(this, null); + return; + case 4: + !this.a && (this.a = new xMd(m5, this, 4)); + Uxd(this.a); + return; + case 5: + !this.c && (this.c = new _4d(m5, this, 5)); + Uxd(this.c); + return; + } + eid(this, a - aLd((jGd(), OFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? OFd : b), a)); + }; + _.Ib = function $Hd() { + return QHd(this); + }; + _.d = null; + mdb(qte, "EAnnotationImpl", 510); + bcb(151, 705, Ave, dId); + _.Xh = function eId(a, b) { + _Hd(this, a, BD(b, 42)); + }; + _.lk = function fId(a, b) { + return aId(this, BD(a, 42), b); + }; + _.pi = function gId(a) { + return BD(BD(this.c, 69).pi(a), 133); + }; + _.Zh = function hId() { + return BD(this.c, 69).Zh(); + }; + _.$h = function iId() { + return BD(this.c, 69).$h(); + }; + _._h = function jId(a) { + return BD(this.c, 69)._h(a); + }; + _.mk = function kId(a, b) { + return bId(this, a, b); + }; + _.Wj = function lId(a) { + return BD(this.c, 76).Wj(a); + }; + _.rj = function mId() { + }; + _.fj = function nId() { + return BD(this.c, 76).fj(); + }; + _.tj = function oId(a, b, c) { + var d; + d = BD(bKd(this.b).Nh().Jh(this.b), 133); + d.Th(a); + d.Uh(b); + d.ed(c); + return d; + }; + _.uj = function pId() { + return new W5d(this); + }; + _.Wb = function qId(a) { + cId(this, a); + }; + _.Xj = function rId() { + BD(this.c, 76).Xj(); + }; + mdb(yve, "EcoreEMap", 151); + bcb(158, 151, Ave, sId); + _.qj = function tId() { + var a, b, c, d, e, f; + if (this.d == null) { + f = KC(y4, jve, 63, 2 * this.f + 1, 0, 1); + for (c = this.c.Kc(); c.e != c.i.gc(); ) { + b = BD(c.nj(), 133); + d = b.Sh(); + e = (d & Ohe) % f.length; + a = f[e]; + !a && (a = f[e] = new W5d(this)); + a.Fc(b); + } + this.d = f; + } + }; + mdb(qte, "EAnnotationImpl/1", 158); + bcb(284, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 284: 1, 114: 1, 115: 1 }); + _._g = function GId(a, b, c) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), this.$j() ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c); + }; + _.jh = function HId(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 9: + return vId(this, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c); + }; + _.lh = function IId(a) { + var b, c; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return this.$j(); + case 7: + return c = this.s, c >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.sh = function JId(a, b) { + var c, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + this.Lh(GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + this.ok(BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + } + did(this, a - aLd(this.zh()), XKd((c = BD(Ajd(this, 16), 26), !c ? this.zh() : c), a), b); + }; + _.zh = function KId() { + return jGd(), hGd; + }; + _.Bh = function LId(a) { + var b, c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + this.Lh(null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + this.ok(1); + return; + case 8: + yId(this, null); + return; + case 9: + c = xId(this, null, null); + !!c && c.Fi(); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.Gh = function MId() { + wId(this); + this.Bb |= 1; + }; + _.Yj = function NId() { + return wId(this); + }; + _.Zj = function OId() { + return this.t; + }; + _.$j = function PId() { + var a; + return a = this.t, a > 1 || a == -1; + }; + _.hi = function QId() { + return (this.Bb & 512) != 0; + }; + _.nk = function RId(a, b) { + return zId(this, a, b); + }; + _.ok = function SId(a) { + DId(this, a); + }; + _.Ib = function TId() { + return EId(this); + }; + _.s = 0; + _.t = 1; + mdb(qte, "ETypedElementImpl", 284); + bcb(449, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }); + _.Qg = function iJd(a) { + return UId(this, a); + }; + _._g = function jJd(a, b, c) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), this.$j() ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return Bcb(), (this.Bb & zte) != 0 ? true : false; + case 11: + return Bcb(), (this.Bb & Dve) != 0 ? true : false; + case 12: + return Bcb(), (this.Bb & Rje) != 0 ? true : false; + case 13: + return this.j; + case 14: + return VId(this); + case 15: + return Bcb(), (this.Bb & Cve) != 0 ? true : false; + case 16: + return Bcb(), (this.Bb & oie) != 0 ? true : false; + case 17: + return WId(this); + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c); + }; + _.hh = function kJd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 17: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? UId(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 17, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd(this.zh()), a, c); + }; + _.jh = function lJd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 9: + return vId(this, c); + case 17: + return _hd(this, null, 17, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c); + }; + _.lh = function mJd(a) { + var b, c; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return this.$j(); + case 7: + return c = this.s, c >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return (this.Bb & zte) == 0; + case 11: + return (this.Bb & Dve) != 0; + case 12: + return (this.Bb & Rje) != 0; + case 13: + return this.j != null; + case 14: + return VId(this) != null; + case 15: + return (this.Bb & Cve) != 0; + case 16: + return (this.Bb & oie) != 0; + case 17: + return !!WId(this); + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.sh = function nJd(a, b) { + var c, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + cJd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + this.ok(BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 10: + ZId(this, Ccb(DD(b))); + return; + case 11: + fJd(this, Ccb(DD(b))); + return; + case 12: + dJd(this, Ccb(DD(b))); + return; + case 13: + $Id(this, GD(b)); + return; + case 15: + eJd(this, Ccb(DD(b))); + return; + case 16: + aJd(this, Ccb(DD(b))); + return; + } + did(this, a - aLd(this.zh()), XKd((c = BD(Ajd(this, 16), 26), !c ? this.zh() : c), a), b); + }; + _.zh = function oJd() { + return jGd(), gGd; + }; + _.Bh = function pJd(a) { + var b, c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 4); + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + this.ok(1); + return; + case 8: + yId(this, null); + return; + case 9: + c = xId(this, null, null); + !!c && c.Fi(); + return; + case 10: + ZId(this, true); + return; + case 11: + fJd(this, false); + return; + case 12: + dJd(this, false); + return; + case 13: + this.i = null; + _Id(this, null); + return; + case 15: + eJd(this, false); + return; + case 16: + aJd(this, false); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.Gh = function qJd() { + a2d(q1d((O6d(), M6d), this)); + wId(this); + this.Bb |= 1; + }; + _.Gj = function rJd() { + return this.f; + }; + _.zj = function sJd() { + return VId(this); + }; + _.Hj = function tJd() { + return WId(this); + }; + _.Lj = function uJd() { + return null; + }; + _.pk = function vJd() { + return this.k; + }; + _.aj = function wJd() { + return this.n; + }; + _.Mj = function xJd() { + return XId(this); + }; + _.Nj = function yJd() { + var a, b, c, d, e, f, g, h, i; + if (!this.p) { + c = WId(this); + (c.i == null && TKd(c), c.i).length; + d = this.Lj(); + !!d && aLd(WId(d)); + e = wId(this); + g = e.Bj(); + a = !g ? null : (g.i & 1) != 0 ? g == sbb ? wI : g == WD ? JI : g == VD ? FI : g == UD ? BI : g == XD ? MI : g == rbb ? UI : g == SD ? xI : yI : g; + b = VId(this); + h = e.zj(); + n6d(this); + (this.Bb & oie) != 0 && (!!(f = t1d((O6d(), M6d), c)) && f != this || !!(f = _1d(q1d(M6d, this)))) ? this.p = new zVd(this, f) : this.$j() ? this.rk() ? !d ? (this.Bb & Cve) != 0 ? !a ? this.sk() ? this.p = new KVd(42, this) : this.p = new KVd(0, this) : a == CK ? this.p = new IVd(50, J4, this) : this.sk() ? this.p = new IVd(43, a, this) : this.p = new IVd(1, a, this) : !a ? this.sk() ? this.p = new KVd(44, this) : this.p = new KVd(2, this) : a == CK ? this.p = new IVd(41, J4, this) : this.sk() ? this.p = new IVd(45, a, this) : this.p = new IVd(3, a, this) : (this.Bb & Cve) != 0 ? !a ? this.sk() ? this.p = new LVd(46, this, d) : this.p = new LVd(4, this, d) : this.sk() ? this.p = new JVd(47, a, this, d) : this.p = new JVd(5, a, this, d) : !a ? this.sk() ? this.p = new LVd(48, this, d) : this.p = new LVd(6, this, d) : this.sk() ? this.p = new JVd(49, a, this, d) : this.p = new JVd(7, a, this, d) : JD(e, 148) ? a == E9 ? this.p = new KVd(40, this) : (this.Bb & 512) != 0 ? (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(8, this) : this.p = new IVd(9, a, this) : !a ? this.p = new KVd(10, this) : this.p = new IVd(11, a, this) : (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(12, this) : this.p = new IVd(13, a, this) : !a ? this.p = new KVd(14, this) : this.p = new IVd(15, a, this) : !d ? this.sk() ? (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(16, this) : this.p = new IVd(17, a, this) : !a ? this.p = new KVd(18, this) : this.p = new IVd(19, a, this) : (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(20, this) : this.p = new IVd(21, a, this) : !a ? this.p = new KVd(22, this) : this.p = new IVd(23, a, this) : (i = d.t, i > 1 || i == -1 ? this.sk() ? (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(24, this, d) : this.p = new JVd(25, a, this, d) : !a ? this.p = new LVd(26, this, d) : this.p = new JVd(27, a, this, d) : (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(28, this, d) : this.p = new JVd(29, a, this, d) : !a ? this.p = new LVd(30, this, d) : this.p = new JVd(31, a, this, d) : this.sk() ? (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(32, this, d) : this.p = new JVd(33, a, this, d) : !a ? this.p = new LVd(34, this, d) : this.p = new JVd(35, a, this, d) : (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(36, this, d) : this.p = new JVd(37, a, this, d) : !a ? this.p = new LVd(38, this, d) : this.p = new JVd(39, a, this, d)) : this.qk() ? this.sk() ? this.p = new kWd(BD(e, 26), this, d) : this.p = new cWd(BD(e, 26), this, d) : JD(e, 148) ? a == E9 ? this.p = new KVd(40, this) : (this.Bb & Cve) != 0 ? !a ? this.p = new jXd(BD(e, 148), b, h, this) : this.p = new lXd(b, h, this, (CWd(), g == WD ? yWd : g == sbb ? tWd : g == XD ? zWd : g == VD ? xWd : g == UD ? wWd : g == rbb ? BWd : g == SD ? uWd : g == TD ? vWd : AWd)) : !a ? this.p = new cXd(BD(e, 148), b, h, this) : this.p = new eXd(b, h, this, (CWd(), g == WD ? yWd : g == sbb ? tWd : g == XD ? zWd : g == VD ? xWd : g == UD ? wWd : g == rbb ? BWd : g == SD ? uWd : g == TD ? vWd : AWd)) : this.rk() ? !d ? (this.Bb & Cve) != 0 ? this.sk() ? this.p = new FXd(BD(e, 26), this) : this.p = new DXd(BD(e, 26), this) : this.sk() ? this.p = new BXd(BD(e, 26), this) : this.p = new zXd(BD(e, 26), this) : (this.Bb & Cve) != 0 ? this.sk() ? this.p = new NXd(BD(e, 26), this, d) : this.p = new LXd(BD(e, 26), this, d) : this.sk() ? this.p = new JXd(BD(e, 26), this, d) : this.p = new HXd(BD(e, 26), this, d) : this.sk() ? !d ? (this.Bb & Cve) != 0 ? this.p = new RXd(BD(e, 26), this) : this.p = new PXd(BD(e, 26), this) : (this.Bb & Cve) != 0 ? this.p = new VXd(BD(e, 26), this, d) : this.p = new TXd(BD(e, 26), this, d) : !d ? (this.Bb & Cve) != 0 ? this.p = new XXd(BD(e, 26), this) : this.p = new nXd(BD(e, 26), this) : (this.Bb & Cve) != 0 ? this.p = new _Xd(BD(e, 26), this, d) : this.p = new ZXd(BD(e, 26), this, d); + } + return this.p; + }; + _.Ij = function zJd() { + return (this.Bb & zte) != 0; + }; + _.qk = function AJd() { + return false; + }; + _.rk = function BJd() { + return false; + }; + _.Jj = function CJd() { + return (this.Bb & oie) != 0; + }; + _.Oj = function DJd() { + return YId(this); + }; + _.sk = function EJd() { + return false; + }; + _.Kj = function FJd() { + return (this.Bb & Cve) != 0; + }; + _.tk = function GJd(a) { + this.k = a; + }; + _.Lh = function HJd(a) { + cJd(this, a); + }; + _.Ib = function IJd() { + return gJd(this); + }; + _.e = false; + _.n = 0; + mdb(qte, "EStructuralFeatureImpl", 449); + bcb(322, 449, { 105: 1, 92: 1, 90: 1, 34: 1, 147: 1, 191: 1, 56: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 322: 1, 150: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }, OJd); + _._g = function PJd(a, b, c) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), LJd(this) ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return Bcb(), (this.Bb & zte) != 0 ? true : false; + case 11: + return Bcb(), (this.Bb & Dve) != 0 ? true : false; + case 12: + return Bcb(), (this.Bb & Rje) != 0 ? true : false; + case 13: + return this.j; + case 14: + return VId(this); + case 15: + return Bcb(), (this.Bb & Cve) != 0 ? true : false; + case 16: + return Bcb(), (this.Bb & oie) != 0 ? true : false; + case 17: + return WId(this); + case 18: + return Bcb(), (this.Bb & ote) != 0 ? true : false; + case 19: + if (b) + return KJd(this); + return JJd(this); + } + return bid(this, a - aLd((jGd(), PFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? PFd : d), a), b, c); + }; + _.lh = function QJd(a) { + var b, c; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return LJd(this); + case 7: + return c = this.s, c >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return (this.Bb & zte) == 0; + case 11: + return (this.Bb & Dve) != 0; + case 12: + return (this.Bb & Rje) != 0; + case 13: + return this.j != null; + case 14: + return VId(this) != null; + case 15: + return (this.Bb & Cve) != 0; + case 16: + return (this.Bb & oie) != 0; + case 17: + return !!WId(this); + case 18: + return (this.Bb & ote) != 0; + case 19: + return !!JJd(this); + } + return cid(this, a - aLd((jGd(), PFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? PFd : b), a)); + }; + _.sh = function RJd(a, b) { + var c, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + cJd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + NJd(this, BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 10: + ZId(this, Ccb(DD(b))); + return; + case 11: + fJd(this, Ccb(DD(b))); + return; + case 12: + dJd(this, Ccb(DD(b))); + return; + case 13: + $Id(this, GD(b)); + return; + case 15: + eJd(this, Ccb(DD(b))); + return; + case 16: + aJd(this, Ccb(DD(b))); + return; + case 18: + MJd(this, Ccb(DD(b))); + return; + } + did(this, a - aLd((jGd(), PFd)), XKd((c = BD(Ajd(this, 16), 26), !c ? PFd : c), a), b); + }; + _.zh = function SJd() { + return jGd(), PFd; + }; + _.Bh = function TJd(a) { + var b, c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 4); + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + this.b = 0; + DId(this, 1); + return; + case 8: + yId(this, null); + return; + case 9: + c = xId(this, null, null); + !!c && c.Fi(); + return; + case 10: + ZId(this, true); + return; + case 11: + fJd(this, false); + return; + case 12: + dJd(this, false); + return; + case 13: + this.i = null; + _Id(this, null); + return; + case 15: + eJd(this, false); + return; + case 16: + aJd(this, false); + return; + case 18: + MJd(this, false); + return; + } + eid(this, a - aLd((jGd(), PFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? PFd : b), a)); + }; + _.Gh = function UJd() { + KJd(this); + a2d(q1d((O6d(), M6d), this)); + wId(this); + this.Bb |= 1; + }; + _.$j = function VJd() { + return LJd(this); + }; + _.nk = function WJd(a, b) { + this.b = 0; + this.a = null; + return zId(this, a, b); + }; + _.ok = function XJd(a) { + NJd(this, a); + }; + _.Ib = function YJd() { + var a; + if ((this.Db & 64) != 0) + return gJd(this); + a = new Jfb(gJd(this)); + a.a += " (iD: "; + Ffb(a, (this.Bb & ote) != 0); + a.a += ")"; + return a.a; + }; + _.b = 0; + mdb(qte, "EAttributeImpl", 322); + bcb(351, 438, { 105: 1, 92: 1, 90: 1, 138: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 150: 1, 114: 1, 115: 1, 676: 1 }); + _.uk = function nKd(a) { + return a.Tg() == this; + }; + _.Qg = function oKd(a) { + return aKd(this, a); + }; + _.Rg = function pKd(a, b) { + this.w = null; + this.Db = b << 16 | this.Db & 255; + this.Cb = a; + }; + _._g = function qKd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return this.zj(); + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c); + }; + _.hh = function rKd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 6: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? aKd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 6, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd(this.zh()), a, c); + }; + _.jh = function sKd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 6: + return _hd(this, null, 6, c); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), Txd(this.A, a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c); + }; + _.lh = function tKd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return this.zj() != null; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.sh = function uKd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + } + did(this, a - aLd(this.zh()), XKd((c = BD(Ajd(this, 16), 26), !c ? this.zh() : c), a), b); + }; + _.zh = function vKd() { + return jGd(), RFd; + }; + _.Bh = function wKd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.yj = function xKd() { + var a; + return this.G == -1 && (this.G = (a = bKd(this), a ? HLd(a.Mh(), this) : -1)), this.G; + }; + _.zj = function yKd() { + return null; + }; + _.Aj = function zKd() { + return bKd(this); + }; + _.vk = function AKd() { + return this.v; + }; + _.Bj = function BKd() { + return dKd(this); + }; + _.Cj = function CKd() { + return this.D != null ? this.D : this.B; + }; + _.Dj = function DKd() { + return this.F; + }; + _.wj = function EKd(a) { + return fKd(this, a); + }; + _.wk = function FKd(a) { + this.v = a; + }; + _.xk = function GKd(a) { + gKd(this, a); + }; + _.yk = function HKd(a) { + this.C = a; + }; + _.Lh = function IKd(a) { + lKd(this, a); + }; + _.Ib = function JKd() { + return mKd(this); + }; + _.C = null; + _.D = null; + _.G = -1; + mdb(qte, "EClassifierImpl", 351); + bcb(88, 351, { 105: 1, 92: 1, 90: 1, 26: 1, 138: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 88: 1, 351: 1, 150: 1, 473: 1, 114: 1, 115: 1, 676: 1 }, hLd); + _.uk = function iLd(a) { + return dLd(this, a.Tg()); + }; + _._g = function jLd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return null; + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + case 8: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 9: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 10: + return _Kd(this); + case 11: + return !this.q && (this.q = new cUd(n5, this, 11, 10)), this.q; + case 12: + return OKd(this); + case 13: + return SKd(this); + case 14: + return SKd(this), this.r; + case 15: + return OKd(this), this.k; + case 16: + return PKd(this); + case 17: + return RKd(this); + case 18: + return TKd(this); + case 19: + return UKd(this); + case 20: + return OKd(this), this.o; + case 21: + return !this.s && (this.s = new cUd(t5, this, 21, 17)), this.s; + case 22: + return VKd(this); + case 23: + return QKd(this); + } + return bid(this, a - aLd((jGd(), QFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? QFd : d), a), b, c); + }; + _.hh = function kLd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 6: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? aKd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 6, c); + case 11: + return !this.q && (this.q = new cUd(n5, this, 11, 10)), Sxd(this.q, a, c); + case 21: + return !this.s && (this.s = new cUd(t5, this, 21, 17)), Sxd(this.s, a, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), QFd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((jGd(), QFd)), a, c); + }; + _.jh = function lLd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 6: + return _hd(this, null, 6, c); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), Txd(this.A, a, c); + case 11: + return !this.q && (this.q = new cUd(n5, this, 11, 10)), Txd(this.q, a, c); + case 21: + return !this.s && (this.s = new cUd(t5, this, 21, 17)), Txd(this.s, a, c); + case 22: + return Txd(VKd(this), a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), QFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), QFd)), a, c); + }; + _.lh = function mLd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return false; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) != 0; + case 9: + return (this.Bb & 512) != 0; + case 10: + return !!this.u && VKd(this.u.a).i != 0 && !(!!this.n && FMd(this.n)); + case 11: + return !!this.q && this.q.i != 0; + case 12: + return OKd(this).i != 0; + case 13: + return SKd(this).i != 0; + case 14: + return SKd(this), this.r.i != 0; + case 15: + return OKd(this), this.k.i != 0; + case 16: + return PKd(this).i != 0; + case 17: + return RKd(this).i != 0; + case 18: + return TKd(this).i != 0; + case 19: + return UKd(this).i != 0; + case 20: + return OKd(this), !!this.o; + case 21: + return !!this.s && this.s.i != 0; + case 22: + return !!this.n && FMd(this.n); + case 23: + return QKd(this).i != 0; + } + return cid(this, a - aLd((jGd(), QFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? QFd : b), a)); + }; + _.oh = function nLd(a) { + var b; + b = this.i == null || !!this.q && this.q.i != 0 ? null : YKd(this, a); + return b ? b : Bmd(this, a); + }; + _.sh = function oLd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + case 8: + eLd(this, Ccb(DD(b))); + return; + case 9: + fLd(this, Ccb(DD(b))); + return; + case 10: + vwd(_Kd(this)); + ytd(_Kd(this), BD(b, 14)); + return; + case 11: + !this.q && (this.q = new cUd(n5, this, 11, 10)); + Uxd(this.q); + !this.q && (this.q = new cUd(n5, this, 11, 10)); + ytd(this.q, BD(b, 14)); + return; + case 21: + !this.s && (this.s = new cUd(t5, this, 21, 17)); + Uxd(this.s); + !this.s && (this.s = new cUd(t5, this, 21, 17)); + ytd(this.s, BD(b, 14)); + return; + case 22: + Uxd(VKd(this)); + ytd(VKd(this), BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), QFd)), XKd((c = BD(Ajd(this, 16), 26), !c ? QFd : c), a), b); + }; + _.zh = function pLd() { + return jGd(), QFd; + }; + _.Bh = function qLd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + case 8: + eLd(this, false); + return; + case 9: + fLd(this, false); + return; + case 10: + !!this.u && vwd(this.u); + return; + case 11: + !this.q && (this.q = new cUd(n5, this, 11, 10)); + Uxd(this.q); + return; + case 21: + !this.s && (this.s = new cUd(t5, this, 21, 17)); + Uxd(this.s); + return; + case 22: + !!this.n && Uxd(this.n); + return; + } + eid(this, a - aLd((jGd(), QFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? QFd : b), a)); + }; + _.Gh = function rLd() { + var a, b; + OKd(this); + SKd(this); + PKd(this); + RKd(this); + TKd(this); + UKd(this); + QKd(this); + oud(SMd($Kd(this))); + if (this.s) { + for (a = 0, b = this.s.i; a < b; ++a) { + Cmd(qud(this.s, a)); + } + } + if (this.q) { + for (a = 0, b = this.q.i; a < b; ++a) { + Cmd(qud(this.q, a)); + } + } + o1d((O6d(), M6d), this).ne(); + this.Bb |= 1; + }; + _.Ib = function sLd() { + return gLd(this); + }; + _.k = null; + _.r = null; + var KKd, LKd, MKd; + mdb(qte, "EClassImpl", 88); + bcb(1994, 1993, Ove); + _.Vh = function tLd(a, b) { + return Pxd(this, a, b); + }; + _.Wh = function uLd(a) { + return Pxd(this, this.i, a); + }; + _.Xh = function vLd(a, b) { + Qxd(this, a, b); + }; + _.Yh = function wLd(a) { + Rxd(this, a); + }; + _.lk = function xLd(a, b) { + return Sxd(this, a, b); + }; + _.pi = function yLd(a) { + return nud(this, a); + }; + _.mk = function CLd(a, b) { + return Txd(this, a, b); + }; + _.mi = function DLd(a, b) { + return Zxd(this, a, b); + }; + _.Zh = function zLd() { + return new $yd(this); + }; + _.$h = function ALd() { + return new bzd(this); + }; + _._h = function BLd(a) { + return ztd(this, a); + }; + mdb(yve, "NotifyingInternalEListImpl", 1994); + bcb(622, 1994, Pve); + _.Hc = function NLd(a) { + return ELd(this, a); + }; + _.Zi = function OLd(a, b, c, d, e) { + return FLd(this, a, b, c, d, e); + }; + _.$i = function PLd(a) { + GLd(this, a); + }; + _.Wj = function QLd(a) { + return this; + }; + _.ak = function RLd() { + return XKd(this.e.Tg(), this.aj()); + }; + _._i = function SLd() { + return this.ak(); + }; + _.aj = function TLd() { + return bLd(this.e.Tg(), this.ak()); + }; + _.zk = function ULd() { + return BD(this.ak().Yj(), 26).Bj(); + }; + _.Ak = function VLd() { + return zUd(BD(this.ak(), 18)).n; + }; + _.Ai = function WLd() { + return this.e; + }; + _.Bk = function XLd() { + return true; + }; + _.Ck = function YLd() { + return false; + }; + _.Dk = function ZLd() { + return false; + }; + _.Ek = function $Ld() { + return false; + }; + _.Xc = function _Ld(a) { + return HLd(this, a); + }; + _.cj = function aMd(a, b) { + var c; + return c = BD(a, 49), this.Dk() ? this.Bk() ? c.gh(this.e, this.Ak(), this.zk(), b) : c.gh(this.e, bLd(c.Tg(), zUd(BD(this.ak(), 18))), null, b) : c.gh(this.e, -1 - this.aj(), null, b); + }; + _.dj = function bMd(a, b) { + var c; + return c = BD(a, 49), this.Dk() ? this.Bk() ? c.ih(this.e, this.Ak(), this.zk(), b) : c.ih(this.e, bLd(c.Tg(), zUd(BD(this.ak(), 18))), null, b) : c.ih(this.e, -1 - this.aj(), null, b); + }; + _.rk = function cMd() { + return false; + }; + _.Fk = function dMd() { + return true; + }; + _.wj = function eMd(a) { + return qEd(this.d, a); + }; + _.ej = function fMd() { + return oid(this.e); + }; + _.fj = function gMd() { + return this.i != 0; + }; + _.ri = function hMd(a) { + return izd(this.d, a); + }; + _.li = function iMd(a, b) { + return this.Fk() && this.Ek() ? ILd(this, a, BD(b, 56)) : b; + }; + _.Gk = function jMd(a) { + return a.kh() ? xid(this.e, BD(a, 49)) : a; + }; + _.Wb = function kMd(a) { + JLd(this, a); + }; + _.Pc = function lMd() { + return KLd(this); + }; + _.Qc = function mMd(a) { + var b; + if (this.Ek()) { + for (b = this.i - 1; b >= 0; --b) { + qud(this, b); + } + } + return xud(this, a); + }; + _.Xj = function nMd() { + Uxd(this); + }; + _.oi = function oMd(a, b) { + return LLd(this, a, b); + }; + mdb(yve, "EcoreEList", 622); + bcb(496, 622, Pve, pMd); + _.ai = function qMd() { + return false; + }; + _.aj = function rMd() { + return this.c; + }; + _.bj = function sMd() { + return false; + }; + _.Fk = function tMd() { + return true; + }; + _.hi = function uMd() { + return true; + }; + _.li = function vMd(a, b) { + return b; + }; + _.ni = function wMd() { + return false; + }; + _.c = 0; + mdb(yve, "EObjectEList", 496); + bcb(85, 496, Pve, xMd); + _.bj = function yMd() { + return true; + }; + _.Dk = function zMd() { + return false; + }; + _.rk = function AMd() { + return true; + }; + mdb(yve, "EObjectContainmentEList", 85); + bcb(545, 85, Pve, BMd); + _.ci = function CMd() { + this.b = true; + }; + _.fj = function DMd() { + return this.b; + }; + _.Xj = function EMd() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.b; + this.b = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.b = false; + } + }; + _.b = false; + mdb(yve, "EObjectContainmentEList/Unsettable", 545); + bcb(1140, 545, Pve, JMd); + _.ii = function NMd(a, b) { + var c, d; + return c = BD(Wxd(this, a, b), 87), oid(this.e) && GLd(this, new ESd(this.a, 7, (jGd(), SFd), meb(b), (d = c.c, JD(d, 88) ? BD(d, 26) : _Fd), a)), c; + }; + _.jj = function OMd(a, b) { + return GMd(this, BD(a, 87), b); + }; + _.kj = function PMd(a, b) { + return HMd(this, BD(a, 87), b); + }; + _.lj = function QMd(a, b, c) { + return IMd(this, BD(a, 87), BD(b, 87), c); + }; + _.Zi = function KMd(a, b, c, d, e) { + switch (a) { + case 3: { + return FLd(this, a, b, c, d, this.i > 1); + } + case 5: { + return FLd(this, a, b, c, d, this.i - BD(c, 15).gc() > 0); + } + default: { + return new pSd(this.e, a, this.c, b, c, d, true); + } + } + }; + _.ij = function LMd() { + return true; + }; + _.fj = function MMd() { + return FMd(this); + }; + _.Xj = function RMd() { + Uxd(this); + }; + mdb(qte, "EClassImpl/1", 1140); + bcb(1154, 1153, dve); + _.ui = function VMd(a) { + var b, c, d, e, f, g, h; + c = a.xi(); + if (c != 8) { + d = UMd(a); + if (d == 0) { + switch (c) { + case 1: + case 9: { + h = a.Bi(); + if (h != null) { + b = $Kd(BD(h, 473)); + !b.c && (b.c = new xYd()); + Ftd(b.c, a.Ai()); + } + g = a.zi(); + if (g != null) { + e = BD(g, 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + wtd(b.c, BD(a.Ai(), 26)); + } + } + break; + } + case 3: { + g = a.zi(); + if (g != null) { + e = BD(g, 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + wtd(b.c, BD(a.Ai(), 26)); + } + } + break; + } + case 5: { + g = a.zi(); + if (g != null) { + for (f = BD(g, 14).Kc(); f.Ob(); ) { + e = BD(f.Pb(), 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + wtd(b.c, BD(a.Ai(), 26)); + } + } + } + break; + } + case 4: { + h = a.Bi(); + if (h != null) { + e = BD(h, 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + Ftd(b.c, a.Ai()); + } + } + break; + } + case 6: { + h = a.Bi(); + if (h != null) { + for (f = BD(h, 14).Kc(); f.Ob(); ) { + e = BD(f.Pb(), 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + Ftd(b.c, a.Ai()); + } + } + } + break; + } + } + } + this.Hk(d); + } + }; + _.Hk = function WMd(a) { + TMd(this, a); + }; + _.b = 63; + mdb(qte, "ESuperAdapter", 1154); + bcb(1155, 1154, dve, YMd); + _.Hk = function ZMd(a) { + XMd(this, a); + }; + mdb(qte, "EClassImpl/10", 1155); + bcb(1144, 696, Pve); + _.Vh = function $Md(a, b) { + return iud(this, a, b); + }; + _.Wh = function _Md(a) { + return jud(this, a); + }; + _.Xh = function aNd(a, b) { + kud(this, a, b); + }; + _.Yh = function bNd(a) { + lud(this, a); + }; + _.pi = function dNd(a) { + return nud(this, a); + }; + _.mi = function lNd(a, b) { + return uud(this, a, b); + }; + _.lk = function cNd(a, b) { + throw vbb(new bgb()); + }; + _.Zh = function eNd() { + return new $yd(this); + }; + _.$h = function fNd() { + return new bzd(this); + }; + _._h = function gNd(a) { + return ztd(this, a); + }; + _.mk = function hNd(a, b) { + throw vbb(new bgb()); + }; + _.Wj = function iNd(a) { + return this; + }; + _.fj = function jNd() { + return this.i != 0; + }; + _.Wb = function kNd(a) { + throw vbb(new bgb()); + }; + _.Xj = function mNd() { + throw vbb(new bgb()); + }; + mdb(yve, "EcoreEList/UnmodifiableEList", 1144); + bcb(319, 1144, Pve, nNd); + _.ni = function oNd() { + return false; + }; + mdb(yve, "EcoreEList/UnmodifiableEList/FastCompare", 319); + bcb(1147, 319, Pve, rNd); + _.Xc = function sNd(a) { + var b, c, d; + if (JD(a, 170)) { + b = BD(a, 170); + c = b.aj(); + if (c != -1) { + for (d = this.i; c < d; ++c) { + if (PD(this.g[c]) === PD(a)) { + return c; + } + } + } + } + return -1; + }; + mdb(qte, "EClassImpl/1EAllStructuralFeaturesList", 1147); + bcb(1141, 497, oue, wNd); + _.ri = function xNd(a) { + return KC(j5, Tve, 87, a, 0, 1); + }; + _.ni = function yNd() { + return false; + }; + mdb(qte, "EClassImpl/1EGenericSuperTypeEList", 1141); + bcb(623, 497, oue, zNd); + _.ri = function ANd(a) { + return KC(t5, Mve, 170, a, 0, 1); + }; + _.ni = function BNd() { + return false; + }; + mdb(qte, "EClassImpl/1EStructuralFeatureUniqueEList", 623); + bcb(741, 497, oue, CNd); + _.ri = function DNd(a) { + return KC(q5, Mve, 18, a, 0, 1); + }; + _.ni = function ENd() { + return false; + }; + mdb(qte, "EClassImpl/1ReferenceList", 741); + bcb(1142, 497, oue, GNd); + _.bi = function HNd(a, b) { + FNd(this, BD(b, 34)); + }; + _.ri = function INd(a) { + return KC(b5, Mve, 34, a, 0, 1); + }; + _.ni = function JNd() { + return false; + }; + mdb(qte, "EClassImpl/2", 1142); + bcb(1143, 497, oue, KNd); + _.ri = function LNd(a) { + return KC(b5, Mve, 34, a, 0, 1); + }; + _.ni = function MNd() { + return false; + }; + mdb(qte, "EClassImpl/3", 1143); + bcb(1145, 319, Pve, PNd); + _.Fc = function QNd(a) { + return NNd(this, BD(a, 34)); + }; + _.Yh = function RNd(a) { + ONd(this, BD(a, 34)); + }; + mdb(qte, "EClassImpl/4", 1145); + bcb(1146, 319, Pve, UNd); + _.Fc = function VNd(a) { + return SNd(this, BD(a, 18)); + }; + _.Yh = function WNd(a) { + TNd(this, BD(a, 18)); + }; + mdb(qte, "EClassImpl/5", 1146); + bcb(1148, 497, oue, XNd); + _.ri = function YNd(a) { + return KC(n5, Nve, 59, a, 0, 1); + }; + _.ni = function ZNd() { + return false; + }; + mdb(qte, "EClassImpl/6", 1148); + bcb(1149, 497, oue, $Nd); + _.ri = function _Nd(a) { + return KC(q5, Mve, 18, a, 0, 1); + }; + _.ni = function aOd() { + return false; + }; + mdb(qte, "EClassImpl/7", 1149); + bcb(1997, 1996, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1, 69: 1 }); + _.Vh = function bOd(a, b) { + return qwd(this, a, b); + }; + _.Wh = function cOd(a) { + return qwd(this, this.Vi(), a); + }; + _.Xh = function dOd(a, b) { + rwd(this, a, b); + }; + _.Yh = function eOd(a) { + swd(this, a); + }; + _.lk = function fOd(a, b) { + return twd(this, a, b); + }; + _.mk = function lOd(a, b) { + return uwd(this, a, b); + }; + _.mi = function mOd(a, b) { + return wwd(this, a, b); + }; + _.pi = function gOd(a) { + return this.Oi(a); + }; + _.Zh = function hOd() { + return new $yd(this); + }; + _.Gi = function iOd() { + return this.Ji(); + }; + _.$h = function jOd() { + return new bzd(this); + }; + _._h = function kOd(a) { + return ztd(this, a); + }; + mdb(yve, "DelegatingNotifyingInternalEListImpl", 1997); + bcb(742, 1997, Uve); + _.ai = function rOd() { + var a; + a = XKd(wjd(this.b), this.aj()).Yj(); + return JD(a, 148) && !JD(a, 457) && (a.Bj().i & 1) == 0; + }; + _.Hc = function sOd(a) { + var b, c, d, e, f, g, h, i; + if (this.Fk()) { + i = this.Vi(); + if (i > 4) { + if (this.wj(a)) { + if (this.rk()) { + d = BD(a, 49); + c = d.Ug(); + h = c == this.b && (this.Dk() ? d.Og(d.Vg(), BD(XKd(wjd(this.b), this.aj()).Yj(), 26).Bj()) == zUd(BD(XKd(wjd(this.b), this.aj()), 18)).n : -1 - d.Vg() == this.aj()); + if (this.Ek() && !h && !c && !!d.Zg()) { + for (e = 0; e < i; ++e) { + b = oOd(this, this.Oi(e)); + if (PD(b) === PD(a)) { + return true; + } + } + } + return h; + } else if (this.Dk() && !this.Ck()) { + f = BD(a, 56).ah(zUd(BD(XKd(wjd(this.b), this.aj()), 18))); + if (PD(f) === PD(this.b)) { + return true; + } else if (f == null || !BD(f, 56).kh()) { + return false; + } + } + } else { + return false; + } + } + g = this.Li(a); + if (this.Ek() && !g) { + for (e = 0; e < i; ++e) { + d = oOd(this, this.Oi(e)); + if (PD(d) === PD(a)) { + return true; + } + } + } + return g; + } else { + return this.Li(a); + } + }; + _.Zi = function tOd(a, b, c, d, e) { + return new pSd(this.b, a, this.aj(), b, c, d, e); + }; + _.$i = function uOd(a) { + Uhd(this.b, a); + }; + _.Wj = function vOd(a) { + return this; + }; + _._i = function wOd() { + return XKd(wjd(this.b), this.aj()); + }; + _.aj = function xOd() { + return bLd(wjd(this.b), XKd(wjd(this.b), this.aj())); + }; + _.Ai = function yOd() { + return this.b; + }; + _.Bk = function zOd() { + return !!XKd(wjd(this.b), this.aj()).Yj().Bj(); + }; + _.bj = function AOd() { + var a, b; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + return (a.Bb & ote) != 0 || !!zUd(BD(b, 18)); + } else { + return false; + } + }; + _.Ck = function BOd() { + var a, b, c, d; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + c = zUd(a); + return !!c && (d = c.t, d > 1 || d == -1); + } else { + return false; + } + }; + _.Dk = function COd() { + var a, b, c; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + c = zUd(a); + return !!c; + } else { + return false; + } + }; + _.Ek = function DOd() { + var a, b; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + return (a.Bb & Tje) != 0; + } else { + return false; + } + }; + _.Xc = function EOd(a) { + var b, c, d, e; + d = this.Qi(a); + if (d >= 0) + return d; + if (this.Fk()) { + for (c = 0, e = this.Vi(); c < e; ++c) { + b = oOd(this, this.Oi(c)); + if (PD(b) === PD(a)) { + return c; + } + } + } + return -1; + }; + _.cj = function FOd(a, b) { + var c; + return c = BD(a, 49), this.Dk() ? this.Bk() ? c.gh(this.b, zUd(BD(XKd(wjd(this.b), this.aj()), 18)).n, BD(XKd(wjd(this.b), this.aj()).Yj(), 26).Bj(), b) : c.gh(this.b, bLd(c.Tg(), zUd(BD(XKd(wjd(this.b), this.aj()), 18))), null, b) : c.gh(this.b, -1 - this.aj(), null, b); + }; + _.dj = function GOd(a, b) { + var c; + return c = BD(a, 49), this.Dk() ? this.Bk() ? c.ih(this.b, zUd(BD(XKd(wjd(this.b), this.aj()), 18)).n, BD(XKd(wjd(this.b), this.aj()).Yj(), 26).Bj(), b) : c.ih(this.b, bLd(c.Tg(), zUd(BD(XKd(wjd(this.b), this.aj()), 18))), null, b) : c.ih(this.b, -1 - this.aj(), null, b); + }; + _.rk = function HOd() { + var a, b; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + return (a.Bb & ote) != 0; + } else { + return false; + } + }; + _.Fk = function IOd() { + return JD(XKd(wjd(this.b), this.aj()).Yj(), 88); + }; + _.wj = function JOd(a) { + return XKd(wjd(this.b), this.aj()).Yj().wj(a); + }; + _.ej = function KOd() { + return oid(this.b); + }; + _.fj = function LOd() { + return !this.Ri(); + }; + _.hi = function MOd() { + return XKd(wjd(this.b), this.aj()).hi(); + }; + _.li = function NOd(a, b) { + return nOd(this, a, b); + }; + _.Wb = function OOd(a) { + vwd(this); + ytd(this, BD(a, 15)); + }; + _.Pc = function POd() { + var a; + if (this.Ek()) { + for (a = this.Vi() - 1; a >= 0; --a) { + nOd(this, a, this.Oi(a)); + } + } + return this.Wi(); + }; + _.Qc = function QOd(a) { + var b; + if (this.Ek()) { + for (b = this.Vi() - 1; b >= 0; --b) { + nOd(this, b, this.Oi(b)); + } + } + return this.Xi(a); + }; + _.Xj = function ROd() { + vwd(this); + }; + _.oi = function SOd(a, b) { + return pOd(this, a, b); + }; + mdb(yve, "DelegatingEcoreEList", 742); + bcb(1150, 742, Uve, YOd); + _.Hi = function _Od(a, b) { + TOd(this, a, BD(b, 26)); + }; + _.Ii = function aPd(a) { + UOd(this, BD(a, 26)); + }; + _.Oi = function gPd(a) { + var b, c; + return b = BD(qud(VKd(this.a), a), 87), c = b.c, JD(c, 88) ? BD(c, 26) : (jGd(), _Fd); + }; + _.Ti = function lPd(a) { + var b, c; + return b = BD(Xxd(VKd(this.a), a), 87), c = b.c, JD(c, 88) ? BD(c, 26) : (jGd(), _Fd); + }; + _.Ui = function mPd(a, b) { + return WOd(this, a, BD(b, 26)); + }; + _.ai = function ZOd() { + return false; + }; + _.Zi = function $Od(a, b, c, d, e) { + return null; + }; + _.Ji = function bPd() { + return new EPd(this); + }; + _.Ki = function cPd() { + Uxd(VKd(this.a)); + }; + _.Li = function dPd(a) { + return VOd(this, a); + }; + _.Mi = function ePd(a) { + var b, c; + for (c = a.Kc(); c.Ob(); ) { + b = c.Pb(); + if (!VOd(this, b)) { + return false; + } + } + return true; + }; + _.Ni = function fPd(a) { + var b, c, d; + if (JD(a, 15)) { + d = BD(a, 15); + if (d.gc() == VKd(this.a).i) { + for (b = d.Kc(), c = new Fyd(this); b.Ob(); ) { + if (PD(b.Pb()) !== PD(Dyd(c))) { + return false; + } + } + return true; + } + } + return false; + }; + _.Pi = function hPd() { + var a, b, c, d, e; + c = 1; + for (b = new Fyd(VKd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + d = (e = a.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)); + c = 31 * c + (!d ? 0 : FCb(d)); + } + return c; + }; + _.Qi = function iPd(a) { + var b, c, d, e; + d = 0; + for (c = new Fyd(VKd(this.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 87); + if (PD(a) === PD((e = b.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)))) { + return d; + } + ++d; + } + return -1; + }; + _.Ri = function jPd() { + return VKd(this.a).i == 0; + }; + _.Si = function kPd() { + return null; + }; + _.Vi = function nPd() { + return VKd(this.a).i; + }; + _.Wi = function oPd() { + var a, b, c, d, e, f; + f = VKd(this.a).i; + e = KC(SI, Uhe, 1, f, 5, 1); + c = 0; + for (b = new Fyd(VKd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + e[c++] = (d = a.c, JD(d, 88) ? BD(d, 26) : (jGd(), _Fd)); + } + return e; + }; + _.Xi = function pPd(a) { + var b, c, d, e, f, g, h; + h = VKd(this.a).i; + if (a.length < h) { + e = izd(rb(a).c, h); + a = e; + } + a.length > h && NC(a, h, null); + d = 0; + for (c = new Fyd(VKd(this.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 87); + f = (g = b.c, JD(g, 88) ? BD(g, 26) : (jGd(), _Fd)); + NC(a, d++, f); + } + return a; + }; + _.Yi = function qPd() { + var a, b, c, d, e; + e = new Hfb(); + e.a += "["; + a = VKd(this.a); + for (b = 0, d = VKd(this.a).i; b < d; ) { + Efb(e, xfb((c = BD(qud(a, b), 87).c, JD(c, 88) ? BD(c, 26) : (jGd(), _Fd)))); + ++b < d && (e.a += She, e); + } + e.a += "]"; + return e.a; + }; + _.$i = function rPd(a) { + }; + _.aj = function sPd() { + return 10; + }; + _.Bk = function tPd() { + return true; + }; + _.bj = function uPd() { + return false; + }; + _.Ck = function vPd() { + return false; + }; + _.Dk = function wPd() { + return false; + }; + _.Ek = function xPd() { + return true; + }; + _.rk = function yPd() { + return false; + }; + _.Fk = function zPd() { + return true; + }; + _.wj = function APd(a) { + return JD(a, 88); + }; + _.fj = function BPd() { + return cLd(this.a); + }; + _.hi = function CPd() { + return true; + }; + _.ni = function DPd() { + return true; + }; + mdb(qte, "EClassImpl/8", 1150); + bcb(1151, 1964, Lie, EPd); + _.Zc = function FPd(a) { + return ztd(this.a, a); + }; + _.gc = function GPd() { + return VKd(this.a.a).i; + }; + mdb(qte, "EClassImpl/8/1", 1151); + bcb(1152, 497, oue, HPd); + _.ri = function IPd(a) { + return KC(d5, Uhe, 138, a, 0, 1); + }; + _.ni = function JPd() { + return false; + }; + mdb(qte, "EClassImpl/9", 1152); + bcb(1139, 53, gke, KPd); + mdb(qte, "EClassImpl/MyHashSet", 1139); + bcb(566, 351, { 105: 1, 92: 1, 90: 1, 138: 1, 148: 1, 834: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 150: 1, 114: 1, 115: 1, 676: 1 }, MPd); + _._g = function NPd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return this.zj(); + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + case 8: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c); + }; + _.lh = function OPd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return this.zj() != null; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) == 0; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.sh = function PPd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + case 8: + LPd(this, Ccb(DD(b))); + return; + } + did(this, a - aLd(this.zh()), XKd((c = BD(Ajd(this, 16), 26), !c ? this.zh() : c), a), b); + }; + _.zh = function QPd() { + return jGd(), TFd; + }; + _.Bh = function RPd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + case 8: + LPd(this, true); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _.Gh = function SPd() { + o1d((O6d(), M6d), this).ne(); + this.Bb |= 1; + }; + _.Fj = function TPd() { + var a, b, c; + if (!this.c) { + a = l6d(bKd(this)); + if (!a.dc()) { + for (c = a.Kc(); c.Ob(); ) { + b = GD(c.Pb()); + !!Dmd(this, b) && k6d(this); + } + } + } + return this.b; + }; + _.zj = function UPd() { + var b; + if (!this.e) { + b = null; + try { + b = dKd(this); + } catch (a) { + a = ubb(a); + if (!JD(a, 102)) + throw vbb(a); + } + this.d = null; + !!b && (b.i & 1) != 0 && (b == sbb ? this.d = (Bcb(), zcb) : b == WD ? this.d = meb(0) : b == VD ? this.d = new Ndb(0) : b == UD ? this.d = 0 : b == XD ? this.d = Aeb(0) : b == rbb ? this.d = Web(0) : b == SD ? this.d = Scb(0) : this.d = bdb(0)); + this.e = true; + } + return this.d; + }; + _.Ej = function VPd() { + return (this.Bb & 256) != 0; + }; + _.Ik = function WPd(a) { + a && (this.D = "org.eclipse.emf.common.util.AbstractEnumerator"); + }; + _.xk = function XPd(a) { + gKd(this, a); + this.Ik(a); + }; + _.yk = function YPd(a) { + this.C = a; + this.e = false; + }; + _.Ib = function ZPd() { + var a; + if ((this.Db & 64) != 0) + return mKd(this); + a = new Jfb(mKd(this)); + a.a += " (serializable: "; + Ffb(a, (this.Bb & 256) != 0); + a.a += ")"; + return a.a; + }; + _.c = false; + _.d = null; + _.e = false; + mdb(qte, "EDataTypeImpl", 566); + bcb(457, 566, { 105: 1, 92: 1, 90: 1, 138: 1, 148: 1, 834: 1, 671: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 457: 1, 150: 1, 114: 1, 115: 1, 676: 1 }, aQd); + _._g = function bQd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return $Pd(this); + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + case 8: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 9: + return !this.a && (this.a = new cUd(g5, this, 9, 5)), this.a; + } + return bid(this, a - aLd((jGd(), UFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? UFd : d), a), b, c); + }; + _.hh = function cQd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 6: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? aKd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 6, c); + case 9: + return !this.a && (this.a = new cUd(g5, this, 9, 5)), Sxd(this.a, a, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), UFd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((jGd(), UFd)), a, c); + }; + _.jh = function dQd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 6: + return _hd(this, null, 6, c); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), Txd(this.A, a, c); + case 9: + return !this.a && (this.a = new cUd(g5, this, 9, 5)), Txd(this.a, a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), UFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), UFd)), a, c); + }; + _.lh = function eQd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return !!$Pd(this); + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) == 0; + case 9: + return !!this.a && this.a.i != 0; + } + return cid(this, a - aLd((jGd(), UFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? UFd : b), a)); + }; + _.sh = function fQd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + case 8: + LPd(this, Ccb(DD(b))); + return; + case 9: + !this.a && (this.a = new cUd(g5, this, 9, 5)); + Uxd(this.a); + !this.a && (this.a = new cUd(g5, this, 9, 5)); + ytd(this.a, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), UFd)), XKd((c = BD(Ajd(this, 16), 26), !c ? UFd : c), a), b); + }; + _.zh = function gQd() { + return jGd(), UFd; + }; + _.Bh = function hQd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + case 8: + LPd(this, true); + return; + case 9: + !this.a && (this.a = new cUd(g5, this, 9, 5)); + Uxd(this.a); + return; + } + eid(this, a - aLd((jGd(), UFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? UFd : b), a)); + }; + _.Gh = function iQd() { + var a, b; + if (this.a) { + for (a = 0, b = this.a.i; a < b; ++a) { + Cmd(qud(this.a, a)); + } + } + o1d((O6d(), M6d), this).ne(); + this.Bb |= 1; + }; + _.zj = function jQd() { + return $Pd(this); + }; + _.wj = function kQd(a) { + if (a != null) { + return true; + } + return false; + }; + _.Ik = function lQd(a) { + }; + mdb(qte, "EEnumImpl", 457); + bcb(573, 438, { 105: 1, 92: 1, 90: 1, 1940: 1, 678: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 573: 1, 150: 1, 114: 1, 115: 1 }, rQd); + _.ne = function AQd() { + return this.zb; + }; + _.Qg = function sQd(a) { + return mQd(this, a); + }; + _._g = function tQd(a, b, c) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return meb(this.d); + case 3: + return this.b ? this.b : this.a; + case 4: + return e = this.c, e == null ? this.zb : e; + case 5: + return this.Db >> 16 == 5 ? BD(this.Cb, 671) : null; + } + return bid(this, a - aLd((jGd(), VFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? VFd : d), a), b, c); + }; + _.hh = function uQd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 5: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? mQd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 5, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), VFd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((jGd(), VFd)), a, c); + }; + _.jh = function vQd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 5: + return _hd(this, null, 5, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), VFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), VFd)), a, c); + }; + _.lh = function wQd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.d != 0; + case 3: + return !!this.b; + case 4: + return this.c != null; + case 5: + return !!(this.Db >> 16 == 5 ? BD(this.Cb, 671) : null); + } + return cid(this, a - aLd((jGd(), VFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? VFd : b), a)); + }; + _.sh = function xQd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + qQd(this, BD(b, 19).a); + return; + case 3: + oQd(this, BD(b, 1940)); + return; + case 4: + pQd(this, GD(b)); + return; + } + did(this, a - aLd((jGd(), VFd)), XKd((c = BD(Ajd(this, 16), 26), !c ? VFd : c), a), b); + }; + _.zh = function yQd() { + return jGd(), VFd; + }; + _.Bh = function zQd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + qQd(this, 0); + return; + case 3: + oQd(this, null); + return; + case 4: + pQd(this, null); + return; + } + eid(this, a - aLd((jGd(), VFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? VFd : b), a)); + }; + _.Ib = function BQd() { + var a; + return a = this.c, a == null ? this.zb : a; + }; + _.b = null; + _.c = null; + _.d = 0; + mdb(qte, "EEnumLiteralImpl", 573); + var c6 = odb(qte, "EFactoryImpl/InternalEDateTimeFormat"); + bcb(489, 1, { 2015: 1 }, EQd); + mdb(qte, "EFactoryImpl/1ClientInternalEDateTimeFormat", 489); + bcb(241, 115, { 105: 1, 92: 1, 90: 1, 87: 1, 56: 1, 108: 1, 49: 1, 97: 1, 241: 1, 114: 1, 115: 1 }, UQd); + _.Sg = function VQd(a, b, c) { + var d; + c = _hd(this, a, b, c); + if (!!this.e && JD(a, 170)) { + d = MQd(this, this.e); + d != this.c && (c = QQd(this, d, c)); + } + return c; + }; + _._g = function WQd(a, b, c) { + var d; + switch (a) { + case 0: + return this.f; + case 1: + return !this.d && (this.d = new xMd(j5, this, 1)), this.d; + case 2: + if (b) + return KQd(this); + return this.c; + case 3: + return this.b; + case 4: + return this.e; + case 5: + if (b) + return JQd(this); + return this.a; + } + return bid(this, a - aLd((jGd(), XFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? XFd : d), a), b, c); + }; + _.jh = function XQd(a, b, c) { + var d, e; + switch (b) { + case 0: + return IQd(this, null, c); + case 1: + return !this.d && (this.d = new xMd(j5, this, 1)), Txd(this.d, a, c); + case 3: + return GQd(this, null, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), XFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), XFd)), a, c); + }; + _.lh = function YQd(a) { + var b; + switch (a) { + case 0: + return !!this.f; + case 1: + return !!this.d && this.d.i != 0; + case 2: + return !!this.c; + case 3: + return !!this.b; + case 4: + return !!this.e; + case 5: + return !!this.a; + } + return cid(this, a - aLd((jGd(), XFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? XFd : b), a)); + }; + _.sh = function ZQd(a, b) { + var c; + switch (a) { + case 0: + SQd(this, BD(b, 87)); + return; + case 1: + !this.d && (this.d = new xMd(j5, this, 1)); + Uxd(this.d); + !this.d && (this.d = new xMd(j5, this, 1)); + ytd(this.d, BD(b, 14)); + return; + case 3: + PQd(this, BD(b, 87)); + return; + case 4: + RQd(this, BD(b, 836)); + return; + case 5: + NQd(this, BD(b, 138)); + return; + } + did(this, a - aLd((jGd(), XFd)), XKd((c = BD(Ajd(this, 16), 26), !c ? XFd : c), a), b); + }; + _.zh = function $Qd() { + return jGd(), XFd; + }; + _.Bh = function _Qd(a) { + var b; + switch (a) { + case 0: + SQd(this, null); + return; + case 1: + !this.d && (this.d = new xMd(j5, this, 1)); + Uxd(this.d); + return; + case 3: + PQd(this, null); + return; + case 4: + RQd(this, null); + return; + case 5: + NQd(this, null); + return; + } + eid(this, a - aLd((jGd(), XFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? XFd : b), a)); + }; + _.Ib = function aRd() { + var a; + a = new Wfb(Eid(this)); + a.a += " (expression: "; + TQd(this, a); + a.a += ")"; + return a.a; + }; + var FQd; + mdb(qte, "EGenericTypeImpl", 241); + bcb(1969, 1964, Vve); + _.Xh = function cRd(a, b) { + bRd(this, a, b); + }; + _.lk = function dRd(a, b) { + bRd(this, this.gc(), a); + return b; + }; + _.pi = function eRd(a) { + return Ut(this.Gi(), a); + }; + _.Zh = function fRd() { + return this.$h(); + }; + _.Gi = function gRd() { + return new O0d(this); + }; + _.$h = function hRd() { + return this._h(0); + }; + _._h = function iRd(a) { + return this.Gi().Zc(a); + }; + _.mk = function jRd(a, b) { + ze(this, a, true); + return b; + }; + _.ii = function kRd(a, b) { + var c, d; + d = Vt(this, b); + c = this.Zc(a); + c.Rb(d); + return d; + }; + _.ji = function lRd(a, b) { + var c; + ze(this, b, true); + c = this.Zc(a); + c.Rb(b); + }; + mdb(yve, "AbstractSequentialInternalEList", 1969); + bcb(486, 1969, Vve, qRd); + _.pi = function rRd(a) { + return Ut(this.Gi(), a); + }; + _.Zh = function sRd() { + if (this.b == null) { + return LRd(), LRd(), KRd; + } + return this.Jk(); + }; + _.Gi = function tRd() { + return new w4d(this.a, this.b); + }; + _.$h = function uRd() { + if (this.b == null) { + return LRd(), LRd(), KRd; + } + return this.Jk(); + }; + _._h = function vRd(a) { + var b, c; + if (this.b == null) { + if (a < 0 || a > 1) { + throw vbb(new qcb(gve + a + ", size=0")); + } + return LRd(), LRd(), KRd; + } + c = this.Jk(); + for (b = 0; b < a; ++b) { + MRd(c); + } + return c; + }; + _.dc = function wRd() { + var a, b, c, d, e, f; + if (this.b != null) { + for (c = 0; c < this.b.length; ++c) { + a = this.b[c]; + if (!this.Mk() || this.a.mh(a)) { + f = this.a.bh(a, false); + Q6d(); + if (BD(a, 66).Oj()) { + b = BD(f, 153); + for (d = 0, e = b.gc(); d < e; ++d) { + if (oRd(b.il(d)) && b.jl(d) != null) { + return false; + } + } + } else if (a.$j()) { + if (!BD(f, 14).dc()) { + return false; + } + } else if (f != null) { + return false; + } + } + } + } + return true; + }; + _.Kc = function xRd() { + return pRd(this); + }; + _.Zc = function yRd(a) { + var b, c; + if (this.b == null) { + if (a != 0) { + throw vbb(new qcb(gve + a + ", size=0")); + } + return LRd(), LRd(), KRd; + } + c = this.Lk() ? this.Kk() : this.Jk(); + for (b = 0; b < a; ++b) { + MRd(c); + } + return c; + }; + _.ii = function zRd(a, b) { + throw vbb(new bgb()); + }; + _.ji = function ARd(a, b) { + throw vbb(new bgb()); + }; + _.Jk = function BRd() { + return new RRd(this.a, this.b); + }; + _.Kk = function CRd() { + return new dSd(this.a, this.b); + }; + _.Lk = function DRd() { + return true; + }; + _.gc = function ERd() { + var a, b, c, d, e, f, g; + e = 0; + if (this.b != null) { + for (c = 0; c < this.b.length; ++c) { + a = this.b[c]; + if (!this.Mk() || this.a.mh(a)) { + g = this.a.bh(a, false); + Q6d(); + if (BD(a, 66).Oj()) { + b = BD(g, 153); + for (d = 0, f = b.gc(); d < f; ++d) { + oRd(b.il(d)) && b.jl(d) != null && ++e; + } + } else + a.$j() ? e += BD(g, 14).gc() : g != null && ++e; + } + } + } + return e; + }; + _.Mk = function FRd() { + return true; + }; + var mRd; + mdb(yve, "EContentsEList", 486); + bcb(1156, 486, Vve, GRd); + _.Jk = function HRd() { + return new hSd(this.a, this.b); + }; + _.Kk = function IRd() { + return new fSd(this.a, this.b); + }; + _.Mk = function JRd() { + return false; + }; + mdb(qte, "ENamedElementImpl/1", 1156); + bcb(279, 1, Wve, RRd); + _.Nb = function URd(a) { + Rrb(this, a); + }; + _.Rb = function SRd(a) { + throw vbb(new bgb()); + }; + _.Nk = function TRd(a) { + if (this.g != 0 || !!this.e) { + throw vbb(new Zdb("Iterator already in use or already filtered")); + } + this.e = a; + }; + _.Ob = function VRd() { + var a, b, c, d, e, f; + switch (this.g) { + case 3: + case 2: { + return true; + } + case 1: { + return false; + } + case -3: { + !this.p ? ++this.n : this.p.Pb(); + } + default: { + if (!this.k || (!this.p ? !NRd(this) : !ORd(this, this.p))) { + while (this.d < this.c.length) { + b = this.c[this.d++]; + if ((!this.e || b.Gj() != x2 || b.aj() != 0) && (!this.Mk() || this.b.mh(b))) { + f = this.b.bh(b, this.Lk()); + this.f = (Q6d(), BD(b, 66).Oj()); + if (this.f || b.$j()) { + if (this.Lk()) { + d = BD(f, 15); + this.k = d; + } else { + d = BD(f, 69); + this.k = this.j = d; + } + if (JD(this.k, 54)) { + this.p = null; + this.o = this.k.gc(); + this.n = 0; + } else { + this.p = !this.j ? this.k.Yc() : this.j.$h(); + } + if (!this.p ? NRd(this) : ORd(this, this.p)) { + e = !this.p ? !this.j ? this.k.Xb(this.n++) : this.j.pi(this.n++) : this.p.Pb(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c = a.dd(); + this.i = c; + } else { + c = e; + this.i = c; + } + this.g = 3; + return true; + } + } else if (f != null) { + this.k = null; + this.p = null; + c = f; + this.i = c; + this.g = 2; + return true; + } + } + } + this.k = null; + this.p = null; + this.f = false; + this.g = 1; + return false; + } else { + e = !this.p ? !this.j ? this.k.Xb(this.n++) : this.j.pi(this.n++) : this.p.Pb(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c = a.dd(); + this.i = c; + } else { + c = e; + this.i = c; + } + this.g = 3; + return true; + } + } + } + }; + _.Sb = function WRd() { + var a, b, c, d, e, f; + switch (this.g) { + case -3: + case -2: { + return true; + } + case -1: { + return false; + } + case 3: { + !this.p ? --this.n : this.p.Ub(); + } + default: { + if (!this.k || (!this.p ? !PRd(this) : !QRd(this, this.p))) { + while (this.d > 0) { + b = this.c[--this.d]; + if ((!this.e || b.Gj() != x2 || b.aj() != 0) && (!this.Mk() || this.b.mh(b))) { + f = this.b.bh(b, this.Lk()); + this.f = (Q6d(), BD(b, 66).Oj()); + if (this.f || b.$j()) { + if (this.Lk()) { + d = BD(f, 15); + this.k = d; + } else { + d = BD(f, 69); + this.k = this.j = d; + } + if (JD(this.k, 54)) { + this.o = this.k.gc(); + this.n = this.o; + } else { + this.p = !this.j ? this.k.Zc(this.k.gc()) : this.j._h(this.k.gc()); + } + if (!this.p ? PRd(this) : QRd(this, this.p)) { + e = !this.p ? !this.j ? this.k.Xb(--this.n) : this.j.pi(--this.n) : this.p.Ub(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c = a.dd(); + this.i = c; + } else { + c = e; + this.i = c; + } + this.g = -3; + return true; + } + } else if (f != null) { + this.k = null; + this.p = null; + c = f; + this.i = c; + this.g = -2; + return true; + } + } + } + this.k = null; + this.p = null; + this.g = -1; + return false; + } else { + e = !this.p ? !this.j ? this.k.Xb(--this.n) : this.j.pi(--this.n) : this.p.Ub(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c = a.dd(); + this.i = c; + } else { + c = e; + this.i = c; + } + this.g = -3; + return true; + } + } + } + }; + _.Pb = function XRd() { + return MRd(this); + }; + _.Tb = function YRd() { + return this.a; + }; + _.Ub = function ZRd() { + var a; + if (this.g < -1 || this.Sb()) { + --this.a; + this.g = 0; + a = this.i; + this.Sb(); + return a; + } else { + throw vbb(new utb()); + } + }; + _.Vb = function $Rd() { + return this.a - 1; + }; + _.Qb = function _Rd() { + throw vbb(new bgb()); + }; + _.Lk = function aSd() { + return false; + }; + _.Wb = function bSd(a) { + throw vbb(new bgb()); + }; + _.Mk = function cSd() { + return true; + }; + _.a = 0; + _.d = 0; + _.f = false; + _.g = 0; + _.n = 0; + _.o = 0; + var KRd; + mdb(yve, "EContentsEList/FeatureIteratorImpl", 279); + bcb(697, 279, Wve, dSd); + _.Lk = function eSd() { + return true; + }; + mdb(yve, "EContentsEList/ResolvingFeatureIteratorImpl", 697); + bcb(1157, 697, Wve, fSd); + _.Mk = function gSd() { + return false; + }; + mdb(qte, "ENamedElementImpl/1/1", 1157); + bcb(1158, 279, Wve, hSd); + _.Mk = function iSd() { + return false; + }; + mdb(qte, "ENamedElementImpl/1/2", 1158); + bcb(36, 143, fve, lSd, mSd, nSd, oSd, pSd, qSd, rSd, sSd, tSd, uSd, vSd, wSd, xSd, ySd, zSd, ASd, BSd, CSd, DSd, ESd, FSd, GSd, HSd, ISd, JSd); + _._i = function KSd() { + return kSd(this); + }; + _.gj = function LSd() { + var a; + a = kSd(this); + if (a) { + return a.zj(); + } + return null; + }; + _.yi = function MSd(a) { + this.b == -1 && !!this.a && (this.b = this.c.Xg(this.a.aj(), this.a.Gj())); + return this.c.Og(this.b, a); + }; + _.Ai = function NSd() { + return this.c; + }; + _.hj = function OSd() { + var a; + a = kSd(this); + if (a) { + return a.Kj(); + } + return false; + }; + _.b = -1; + mdb(qte, "ENotificationImpl", 36); + bcb(399, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 59: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 399: 1, 284: 1, 114: 1, 115: 1 }, SSd); + _.Qg = function TSd(a) { + return PSd(this, a); + }; + _._g = function USd(a, b, c) { + var d, e, f; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), f = this.t, f > 1 || f == -1 ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return this.Db >> 16 == 10 ? BD(this.Cb, 26) : null; + case 11: + return !this.d && (this.d = new K4d(u5, this, 11)), this.d; + case 12: + return !this.c && (this.c = new cUd(p5, this, 12, 10)), this.c; + case 13: + return !this.a && (this.a = new fTd(this, this)), this.a; + case 14: + return QSd(this); + } + return bid(this, a - aLd((jGd(), aGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? aGd : d), a), b, c); + }; + _.hh = function VSd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 10: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? PSd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 10, c); + case 12: + return !this.c && (this.c = new cUd(p5, this, 12, 10)), Sxd(this.c, a, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), aGd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((jGd(), aGd)), a, c); + }; + _.jh = function WSd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 9: + return vId(this, c); + case 10: + return _hd(this, null, 10, c); + case 11: + return !this.d && (this.d = new K4d(u5, this, 11)), Txd(this.d, a, c); + case 12: + return !this.c && (this.c = new cUd(p5, this, 12, 10)), Txd(this.c, a, c); + case 14: + return Txd(QSd(this), a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), aGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), aGd)), a, c); + }; + _.lh = function XSd(a) { + var b, c, d; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return d = this.t, d > 1 || d == -1; + case 7: + return c = this.s, c >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return !!(this.Db >> 16 == 10 ? BD(this.Cb, 26) : null); + case 11: + return !!this.d && this.d.i != 0; + case 12: + return !!this.c && this.c.i != 0; + case 13: + return !!this.a && QSd(this.a.a).i != 0 && !(!!this.b && QTd(this.b)); + case 14: + return !!this.b && QTd(this.b); + } + return cid(this, a - aLd((jGd(), aGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? aGd : b), a)); + }; + _.sh = function YSd(a, b) { + var c, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + DId(this, BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 11: + !this.d && (this.d = new K4d(u5, this, 11)); + Uxd(this.d); + !this.d && (this.d = new K4d(u5, this, 11)); + ytd(this.d, BD(b, 14)); + return; + case 12: + !this.c && (this.c = new cUd(p5, this, 12, 10)); + Uxd(this.c); + !this.c && (this.c = new cUd(p5, this, 12, 10)); + ytd(this.c, BD(b, 14)); + return; + case 13: + !this.a && (this.a = new fTd(this, this)); + vwd(this.a); + !this.a && (this.a = new fTd(this, this)); + ytd(this.a, BD(b, 14)); + return; + case 14: + Uxd(QSd(this)); + ytd(QSd(this), BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), aGd)), XKd((c = BD(Ajd(this, 16), 26), !c ? aGd : c), a), b); + }; + _.zh = function ZSd() { + return jGd(), aGd; + }; + _.Bh = function $Sd(a) { + var b, c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + DId(this, 1); + return; + case 8: + yId(this, null); + return; + case 9: + c = xId(this, null, null); + !!c && c.Fi(); + return; + case 11: + !this.d && (this.d = new K4d(u5, this, 11)); + Uxd(this.d); + return; + case 12: + !this.c && (this.c = new cUd(p5, this, 12, 10)); + Uxd(this.c); + return; + case 13: + !!this.a && vwd(this.a); + return; + case 14: + !!this.b && Uxd(this.b); + return; + } + eid(this, a - aLd((jGd(), aGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? aGd : b), a)); + }; + _.Gh = function _Sd() { + var a, b; + if (this.c) { + for (a = 0, b = this.c.i; a < b; ++a) { + Cmd(qud(this.c, a)); + } + } + wId(this); + this.Bb |= 1; + }; + mdb(qte, "EOperationImpl", 399); + bcb(505, 742, Uve, fTd); + _.Hi = function iTd(a, b) { + aTd(this, a, BD(b, 138)); + }; + _.Ii = function jTd(a) { + bTd(this, BD(a, 138)); + }; + _.Oi = function pTd(a) { + var b, c; + return b = BD(qud(QSd(this.a), a), 87), c = b.c, c ? c : (jGd(), YFd); + }; + _.Ti = function uTd(a) { + var b, c; + return b = BD(Xxd(QSd(this.a), a), 87), c = b.c, c ? c : (jGd(), YFd); + }; + _.Ui = function vTd(a, b) { + return dTd(this, a, BD(b, 138)); + }; + _.ai = function gTd() { + return false; + }; + _.Zi = function hTd(a, b, c, d, e) { + return null; + }; + _.Ji = function kTd() { + return new NTd(this); + }; + _.Ki = function lTd() { + Uxd(QSd(this.a)); + }; + _.Li = function mTd(a) { + return cTd(this, a); + }; + _.Mi = function nTd(a) { + var b, c; + for (c = a.Kc(); c.Ob(); ) { + b = c.Pb(); + if (!cTd(this, b)) { + return false; + } + } + return true; + }; + _.Ni = function oTd(a) { + var b, c, d; + if (JD(a, 15)) { + d = BD(a, 15); + if (d.gc() == QSd(this.a).i) { + for (b = d.Kc(), c = new Fyd(this); b.Ob(); ) { + if (PD(b.Pb()) !== PD(Dyd(c))) { + return false; + } + } + return true; + } + } + return false; + }; + _.Pi = function qTd() { + var a, b, c, d, e; + c = 1; + for (b = new Fyd(QSd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + d = (e = a.c, e ? e : (jGd(), YFd)); + c = 31 * c + (!d ? 0 : tb(d)); + } + return c; + }; + _.Qi = function rTd(a) { + var b, c, d, e; + d = 0; + for (c = new Fyd(QSd(this.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 87); + if (PD(a) === PD((e = b.c, e ? e : (jGd(), YFd)))) { + return d; + } + ++d; + } + return -1; + }; + _.Ri = function sTd() { + return QSd(this.a).i == 0; + }; + _.Si = function tTd() { + return null; + }; + _.Vi = function wTd() { + return QSd(this.a).i; + }; + _.Wi = function xTd() { + var a, b, c, d, e, f; + f = QSd(this.a).i; + e = KC(SI, Uhe, 1, f, 5, 1); + c = 0; + for (b = new Fyd(QSd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + e[c++] = (d = a.c, d ? d : (jGd(), YFd)); + } + return e; + }; + _.Xi = function yTd(a) { + var b, c, d, e, f, g, h; + h = QSd(this.a).i; + if (a.length < h) { + e = izd(rb(a).c, h); + a = e; + } + a.length > h && NC(a, h, null); + d = 0; + for (c = new Fyd(QSd(this.a)); c.e != c.i.gc(); ) { + b = BD(Dyd(c), 87); + f = (g = b.c, g ? g : (jGd(), YFd)); + NC(a, d++, f); + } + return a; + }; + _.Yi = function zTd() { + var a, b, c, d, e; + e = new Hfb(); + e.a += "["; + a = QSd(this.a); + for (b = 0, d = QSd(this.a).i; b < d; ) { + Efb(e, xfb((c = BD(qud(a, b), 87).c, c ? c : (jGd(), YFd)))); + ++b < d && (e.a += She, e); + } + e.a += "]"; + return e.a; + }; + _.$i = function ATd(a) { + }; + _.aj = function BTd() { + return 13; + }; + _.Bk = function CTd() { + return true; + }; + _.bj = function DTd() { + return false; + }; + _.Ck = function ETd() { + return false; + }; + _.Dk = function FTd() { + return false; + }; + _.Ek = function GTd() { + return true; + }; + _.rk = function HTd() { + return false; + }; + _.Fk = function ITd() { + return true; + }; + _.wj = function JTd(a) { + return JD(a, 138); + }; + _.fj = function KTd() { + return RSd(this.a); + }; + _.hi = function LTd() { + return true; + }; + _.ni = function MTd() { + return true; + }; + mdb(qte, "EOperationImpl/1", 505); + bcb(1340, 1964, Lie, NTd); + _.Zc = function OTd(a) { + return ztd(this.a, a); + }; + _.gc = function PTd() { + return QSd(this.a.a).i; + }; + mdb(qte, "EOperationImpl/1/1", 1340); + bcb(1341, 545, Pve, UTd); + _.ii = function YTd(a, b) { + var c, d; + return c = BD(Wxd(this, a, b), 87), oid(this.e) && GLd(this, new ESd(this.a, 7, (jGd(), bGd), meb(b), (d = c.c, d ? d : YFd), a)), c; + }; + _.jj = function ZTd(a, b) { + return RTd(this, BD(a, 87), b); + }; + _.kj = function $Td(a, b) { + return STd(this, BD(a, 87), b); + }; + _.lj = function _Td(a, b, c) { + return TTd(this, BD(a, 87), BD(b, 87), c); + }; + _.Zi = function VTd(a, b, c, d, e) { + switch (a) { + case 3: { + return FLd(this, a, b, c, d, this.i > 1); + } + case 5: { + return FLd(this, a, b, c, d, this.i - BD(c, 15).gc() > 0); + } + default: { + return new pSd(this.e, a, this.c, b, c, d, true); + } + } + }; + _.ij = function WTd() { + return true; + }; + _.fj = function XTd() { + return QTd(this); + }; + _.Xj = function aUd() { + Uxd(this); + }; + mdb(qte, "EOperationImpl/2", 1341); + bcb(498, 1, { 1938: 1, 498: 1 }, bUd); + mdb(qte, "EPackageImpl/1", 498); + bcb(16, 85, Pve, cUd); + _.zk = function dUd() { + return this.d; + }; + _.Ak = function eUd() { + return this.b; + }; + _.Dk = function fUd() { + return true; + }; + _.b = 0; + mdb(yve, "EObjectContainmentWithInverseEList", 16); + bcb(353, 16, Pve, gUd); + _.Ek = function hUd() { + return true; + }; + _.li = function iUd(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentWithInverseEList/Resolving", 353); + bcb(298, 353, Pve, jUd); + _.ci = function kUd() { + this.a.tb = null; + }; + mdb(qte, "EPackageImpl/2", 298); + bcb(1228, 1, {}, lUd); + mdb(qte, "EPackageImpl/3", 1228); + bcb(718, 43, fke, oUd); + _._b = function pUd(a) { + return ND(a) ? Qhb(this, a) : !!irb(this.f, a); + }; + mdb(qte, "EPackageRegistryImpl", 718); + bcb(509, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 2017: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 509: 1, 284: 1, 114: 1, 115: 1 }, rUd); + _.Qg = function sUd(a) { + return qUd(this, a); + }; + _._g = function tUd(a, b, c) { + var d, e, f; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), f = this.t, f > 1 || f == -1 ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return this.Db >> 16 == 10 ? BD(this.Cb, 59) : null; + } + return bid(this, a - aLd((jGd(), dGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? dGd : d), a), b, c); + }; + _.hh = function uUd(a, b, c) { + var d, e, f; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c); + case 10: + !!this.Cb && (c = (e = this.Db >> 16, e >= 0 ? qUd(this, c) : this.Cb.ih(this, -1 - e, null, c))); + return _hd(this, a, 10, c); + } + return f = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), dGd) : d), b), 66), f.Nj().Qj(this, yjd(this), b - aLd((jGd(), dGd)), a, c); + }; + _.jh = function vUd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 9: + return vId(this, c); + case 10: + return _hd(this, null, 10, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), dGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), dGd)), a, c); + }; + _.lh = function wUd(a) { + var b, c, d; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return d = this.t, d > 1 || d == -1; + case 7: + return c = this.s, c >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return !!(this.Db >> 16 == 10 ? BD(this.Cb, 59) : null); + } + return cid(this, a - aLd((jGd(), dGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? dGd : b), a)); + }; + _.zh = function xUd() { + return jGd(), dGd; + }; + mdb(qte, "EParameterImpl", 509); + bcb(99, 449, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 18: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 99: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }, FUd); + _._g = function GUd(a, b, c) { + var d, e, f, g; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), g = this.t, g > 1 || g == -1 ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return Bcb(), (this.Bb & zte) != 0 ? true : false; + case 11: + return Bcb(), (this.Bb & Dve) != 0 ? true : false; + case 12: + return Bcb(), (this.Bb & Rje) != 0 ? true : false; + case 13: + return this.j; + case 14: + return VId(this); + case 15: + return Bcb(), (this.Bb & Cve) != 0 ? true : false; + case 16: + return Bcb(), (this.Bb & oie) != 0 ? true : false; + case 17: + return WId(this); + case 18: + return Bcb(), (this.Bb & ote) != 0 ? true : false; + case 19: + return Bcb(), f = zUd(this), !!f && (f.Bb & ote) != 0 ? true : false; + case 20: + return Bcb(), (this.Bb & Tje) != 0 ? true : false; + case 21: + if (b) + return zUd(this); + return this.b; + case 22: + if (b) + return AUd(this); + return yUd(this); + case 23: + return !this.a && (this.a = new _4d(b5, this, 23)), this.a; + } + return bid(this, a - aLd((jGd(), eGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? eGd : d), a), b, c); + }; + _.lh = function HUd(a) { + var b, c, d, e; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return e = this.t, e > 1 || e == -1; + case 7: + return c = this.s, c >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return (this.Bb & zte) == 0; + case 11: + return (this.Bb & Dve) != 0; + case 12: + return (this.Bb & Rje) != 0; + case 13: + return this.j != null; + case 14: + return VId(this) != null; + case 15: + return (this.Bb & Cve) != 0; + case 16: + return (this.Bb & oie) != 0; + case 17: + return !!WId(this); + case 18: + return (this.Bb & ote) != 0; + case 19: + return d = zUd(this), !!d && (d.Bb & ote) != 0; + case 20: + return (this.Bb & Tje) == 0; + case 21: + return !!this.b; + case 22: + return !!yUd(this); + case 23: + return !!this.a && this.a.i != 0; + } + return cid(this, a - aLd((jGd(), eGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? eGd : b), a)); + }; + _.sh = function IUd(a, b) { + var c, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + cJd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + DId(this, BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 10: + ZId(this, Ccb(DD(b))); + return; + case 11: + fJd(this, Ccb(DD(b))); + return; + case 12: + dJd(this, Ccb(DD(b))); + return; + case 13: + $Id(this, GD(b)); + return; + case 15: + eJd(this, Ccb(DD(b))); + return; + case 16: + aJd(this, Ccb(DD(b))); + return; + case 18: + BUd(this, Ccb(DD(b))); + return; + case 20: + EUd(this, Ccb(DD(b))); + return; + case 21: + DUd(this, BD(b, 18)); + return; + case 23: + !this.a && (this.a = new _4d(b5, this, 23)); + Uxd(this.a); + !this.a && (this.a = new _4d(b5, this, 23)); + ytd(this.a, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), eGd)), XKd((c = BD(Ajd(this, 16), 26), !c ? eGd : c), a), b); + }; + _.zh = function JUd() { + return jGd(), eGd; + }; + _.Bh = function KUd(a) { + var b, c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 4); + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + DId(this, 1); + return; + case 8: + yId(this, null); + return; + case 9: + c = xId(this, null, null); + !!c && c.Fi(); + return; + case 10: + ZId(this, true); + return; + case 11: + fJd(this, false); + return; + case 12: + dJd(this, false); + return; + case 13: + this.i = null; + _Id(this, null); + return; + case 15: + eJd(this, false); + return; + case 16: + aJd(this, false); + return; + case 18: + CUd(this, false); + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 2); + return; + case 20: + EUd(this, true); + return; + case 21: + DUd(this, null); + return; + case 23: + !this.a && (this.a = new _4d(b5, this, 23)); + Uxd(this.a); + return; + } + eid(this, a - aLd((jGd(), eGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? eGd : b), a)); + }; + _.Gh = function LUd() { + AUd(this); + a2d(q1d((O6d(), M6d), this)); + wId(this); + this.Bb |= 1; + }; + _.Lj = function MUd() { + return zUd(this); + }; + _.qk = function NUd() { + var a; + return a = zUd(this), !!a && (a.Bb & ote) != 0; + }; + _.rk = function OUd() { + return (this.Bb & ote) != 0; + }; + _.sk = function PUd() { + return (this.Bb & Tje) != 0; + }; + _.nk = function QUd(a, b) { + this.c = null; + return zId(this, a, b); + }; + _.Ib = function RUd() { + var a; + if ((this.Db & 64) != 0) + return gJd(this); + a = new Jfb(gJd(this)); + a.a += " (containment: "; + Ffb(a, (this.Bb & ote) != 0); + a.a += ", resolveProxies: "; + Ffb(a, (this.Bb & Tje) != 0); + a.a += ")"; + return a.a; + }; + mdb(qte, "EReferenceImpl", 99); + bcb(548, 115, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1, 548: 1, 114: 1, 115: 1 }, XUd); + _.Fb = function bVd(a) { + return this === a; + }; + _.cd = function dVd() { + return this.b; + }; + _.dd = function eVd() { + return this.c; + }; + _.Hb = function fVd() { + return FCb(this); + }; + _.Uh = function hVd(a) { + SUd(this, GD(a)); + }; + _.ed = function iVd(a) { + return WUd(this, GD(a)); + }; + _._g = function YUd(a, b, c) { + var d; + switch (a) { + case 0: + return this.b; + case 1: + return this.c; + } + return bid(this, a - aLd((jGd(), fGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? fGd : d), a), b, c); + }; + _.lh = function ZUd(a) { + var b; + switch (a) { + case 0: + return this.b != null; + case 1: + return this.c != null; + } + return cid(this, a - aLd((jGd(), fGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? fGd : b), a)); + }; + _.sh = function $Ud(a, b) { + var c; + switch (a) { + case 0: + TUd(this, GD(b)); + return; + case 1: + VUd(this, GD(b)); + return; + } + did(this, a - aLd((jGd(), fGd)), XKd((c = BD(Ajd(this, 16), 26), !c ? fGd : c), a), b); + }; + _.zh = function _Ud() { + return jGd(), fGd; + }; + _.Bh = function aVd(a) { + var b; + switch (a) { + case 0: + UUd(this, null); + return; + case 1: + VUd(this, null); + return; + } + eid(this, a - aLd((jGd(), fGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? fGd : b), a)); + }; + _.Sh = function cVd() { + var a; + if (this.a == -1) { + a = this.b; + this.a = a == null ? 0 : LCb(a); + } + return this.a; + }; + _.Th = function gVd(a) { + this.a = a; + }; + _.Ib = function jVd() { + var a; + if ((this.Db & 64) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (key: "; + Efb(a, this.b); + a.a += ", value: "; + Efb(a, this.c); + a.a += ")"; + return a.a; + }; + _.a = -1; + _.b = null; + _.c = null; + var x6 = mdb(qte, "EStringToStringMapEntryImpl", 548); + var D9 = odb(yve, "FeatureMap/Entry/Internal"); + bcb(565, 1, Xve); + _.Ok = function mVd(a) { + return this.Pk(BD(a, 49)); + }; + _.Pk = function nVd(a) { + return this.Ok(a); + }; + _.Fb = function oVd(a) { + var b, c; + if (this === a) { + return true; + } else if (JD(a, 72)) { + b = BD(a, 72); + if (b.ak() == this.c) { + c = this.dd(); + return c == null ? b.dd() == null : pb(c, b.dd()); + } else { + return false; + } + } else { + return false; + } + }; + _.ak = function pVd() { + return this.c; + }; + _.Hb = function qVd() { + var a; + a = this.dd(); + return tb(this.c) ^ (a == null ? 0 : tb(a)); + }; + _.Ib = function rVd() { + var a, b; + a = this.c; + b = bKd(a.Hj()).Ph(); + a.ne(); + return (b != null && b.length != 0 ? b + ":" + a.ne() : a.ne()) + "=" + this.dd(); + }; + mdb(qte, "EStructuralFeatureImpl/BasicFeatureMapEntry", 565); + bcb(776, 565, Xve, uVd); + _.Pk = function vVd(a) { + return new uVd(this.c, a); + }; + _.dd = function wVd() { + return this.a; + }; + _.Qk = function xVd(a, b, c) { + return sVd(this, a, this.a, b, c); + }; + _.Rk = function yVd(a, b, c) { + return tVd(this, a, this.a, b, c); + }; + mdb(qte, "EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry", 776); + bcb(1314, 1, {}, zVd); + _.Pj = function AVd(a, b, c, d, e) { + var f; + f = BD(gid(a, this.b), 215); + return f.nl(this.a).Wj(d); + }; + _.Qj = function BVd(a, b, c, d, e) { + var f; + f = BD(gid(a, this.b), 215); + return f.el(this.a, d, e); + }; + _.Rj = function CVd(a, b, c, d, e) { + var f; + f = BD(gid(a, this.b), 215); + return f.fl(this.a, d, e); + }; + _.Sj = function DVd(a, b, c) { + var d; + d = BD(gid(a, this.b), 215); + return d.nl(this.a).fj(); + }; + _.Tj = function EVd(a, b, c, d) { + var e; + e = BD(gid(a, this.b), 215); + e.nl(this.a).Wb(d); + }; + _.Uj = function FVd(a, b, c) { + return BD(gid(a, this.b), 215).nl(this.a); + }; + _.Vj = function GVd(a, b, c) { + var d; + d = BD(gid(a, this.b), 215); + d.nl(this.a).Xj(); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator", 1314); + bcb(89, 1, {}, IVd, JVd, KVd, LVd); + _.Pj = function MVd(a, b, c, d, e) { + var f; + f = b.Ch(c); + f == null && b.Dh(c, f = HVd(this, a)); + if (!e) { + switch (this.e) { + case 50: + case 41: + return BD(f, 589).sj(); + case 40: + return BD(f, 215).kl(); + } + } + return f; + }; + _.Qj = function NVd(a, b, c, d, e) { + var f, g; + g = b.Ch(c); + g == null && b.Dh(c, g = HVd(this, a)); + f = BD(g, 69).lk(d, e); + return f; + }; + _.Rj = function OVd(a, b, c, d, e) { + var f; + f = b.Ch(c); + f != null && (e = BD(f, 69).mk(d, e)); + return e; + }; + _.Sj = function PVd(a, b, c) { + var d; + d = b.Ch(c); + return d != null && BD(d, 76).fj(); + }; + _.Tj = function QVd(a, b, c, d) { + var e; + e = BD(b.Ch(c), 76); + !e && b.Dh(c, e = HVd(this, a)); + e.Wb(d); + }; + _.Uj = function RVd(a, b, c) { + var d, e; + e = b.Ch(c); + e == null && b.Dh(c, e = HVd(this, a)); + if (JD(e, 76)) { + return BD(e, 76); + } else { + d = BD(b.Ch(c), 15); + return new iYd(d); + } + }; + _.Vj = function SVd(a, b, c) { + var d; + d = BD(b.Ch(c), 76); + !d && b.Dh(c, d = HVd(this, a)); + d.Xj(); + }; + _.b = 0; + _.e = 0; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateMany", 89); + bcb(504, 1, {}); + _.Qj = function WVd(a, b, c, d, e) { + throw vbb(new bgb()); + }; + _.Rj = function XVd(a, b, c, d, e) { + throw vbb(new bgb()); + }; + _.Uj = function YVd(a, b, c) { + return new ZVd(this, a, b, c); + }; + var TVd; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingle", 504); + bcb(1331, 1, zve, ZVd); + _.Wj = function $Vd(a) { + return this.a.Pj(this.c, this.d, this.b, a, true); + }; + _.fj = function _Vd() { + return this.a.Sj(this.c, this.d, this.b); + }; + _.Wb = function aWd(a) { + this.a.Tj(this.c, this.d, this.b, a); + }; + _.Xj = function bWd() { + this.a.Vj(this.c, this.d, this.b); + }; + _.b = 0; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingle/1", 1331); + bcb(769, 504, {}, cWd); + _.Pj = function dWd(a, b, c, d, e) { + return Nid(a, a.eh(), a.Vg()) == this.b ? this.sk() && d ? aid(a) : a.eh() : null; + }; + _.Qj = function eWd(a, b, c, d, e) { + var f, g; + !!a.eh() && (e = (f = a.Vg(), f >= 0 ? a.Qg(e) : a.eh().ih(a, -1 - f, null, e))); + g = bLd(a.Tg(), this.e); + return a.Sg(d, g, e); + }; + _.Rj = function fWd(a, b, c, d, e) { + var f; + f = bLd(a.Tg(), this.e); + return a.Sg(null, f, e); + }; + _.Sj = function gWd(a, b, c) { + var d; + d = bLd(a.Tg(), this.e); + return !!a.eh() && a.Vg() == d; + }; + _.Tj = function hWd(a, b, c, d) { + var e, f, g, h, i; + if (d != null && !fKd(this.a, d)) { + throw vbb(new Cdb(Yve + (JD(d, 56) ? gLd(BD(d, 56).Tg()) : idb(rb(d))) + Zve + this.a + "'")); + } + e = a.eh(); + g = bLd(a.Tg(), this.e); + if (PD(d) !== PD(e) || a.Vg() != g && d != null) { + if (p6d(a, BD(d, 56))) + throw vbb(new Wdb(ste + a.Ib())); + i = null; + !!e && (i = (f = a.Vg(), f >= 0 ? a.Qg(i) : a.eh().ih(a, -1 - f, null, i))); + h = BD(d, 49); + !!h && (i = h.gh(a, bLd(h.Tg(), this.b), null, i)); + i = a.Sg(h, g, i); + !!i && i.Fi(); + } else { + a.Lg() && a.Mg() && Uhd(a, new nSd(a, 1, g, d, d)); + } + }; + _.Vj = function iWd(a, b, c) { + var d, e, f, g; + d = a.eh(); + if (d) { + g = (e = a.Vg(), e >= 0 ? a.Qg(null) : a.eh().ih(a, -1 - e, null, null)); + f = bLd(a.Tg(), this.e); + g = a.Sg(null, f, g); + !!g && g.Fi(); + } else { + a.Lg() && a.Mg() && Uhd(a, new DSd(a, 1, this.e, null, null)); + } + }; + _.sk = function jWd() { + return false; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleContainer", 769); + bcb(1315, 769, {}, kWd); + _.sk = function lWd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving", 1315); + bcb(563, 504, {}); + _.Pj = function oWd(a, b, c, d, e) { + var f; + return f = b.Ch(c), f == null ? this.b : PD(f) === PD(TVd) ? null : f; + }; + _.Sj = function pWd(a, b, c) { + var d; + d = b.Ch(c); + return d != null && (PD(d) === PD(TVd) || !pb(d, this.b)); + }; + _.Tj = function qWd(a, b, c, d) { + var e, f; + if (a.Lg() && a.Mg()) { + e = (f = b.Ch(c), f == null ? this.b : PD(f) === PD(TVd) ? null : f); + if (d == null) { + if (this.c != null) { + b.Dh(c, null); + d = this.b; + } else + this.b != null ? b.Dh(c, TVd) : b.Dh(c, null); + } else { + this.Sk(d); + b.Dh(c, d); + } + Uhd(a, this.d.Tk(a, 1, this.e, e, d)); + } else { + if (d == null) { + this.c != null ? b.Dh(c, null) : this.b != null ? b.Dh(c, TVd) : b.Dh(c, null); + } else { + this.Sk(d); + b.Dh(c, d); + } + } + }; + _.Vj = function rWd(a, b, c) { + var d, e; + if (a.Lg() && a.Mg()) { + d = (e = b.Ch(c), e == null ? this.b : PD(e) === PD(TVd) ? null : e); + b.Eh(c); + Uhd(a, this.d.Tk(a, 1, this.e, d, this.b)); + } else { + b.Eh(c); + } + }; + _.Sk = function sWd(a) { + throw vbb(new Bdb()); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData", 563); + bcb($ve, 1, {}, DWd); + _.Tk = function EWd(a, b, c, d, e) { + return new DSd(a, b, c, d, e); + }; + _.Uk = function FWd(a, b, c, d, e, f) { + return new FSd(a, b, c, d, e, f); + }; + var tWd, uWd, vWd, wWd, xWd, yWd, zWd, AWd, BWd; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator", $ve); + bcb(1332, $ve, {}, GWd); + _.Tk = function HWd(a, b, c, d, e) { + return new ISd(a, b, c, Ccb(DD(d)), Ccb(DD(e))); + }; + _.Uk = function IWd(a, b, c, d, e, f) { + return new JSd(a, b, c, Ccb(DD(d)), Ccb(DD(e)), f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1", 1332); + bcb(1333, $ve, {}, JWd); + _.Tk = function KWd(a, b, c, d, e) { + return new rSd(a, b, c, BD(d, 217).a, BD(e, 217).a); + }; + _.Uk = function LWd(a, b, c, d, e, f) { + return new sSd(a, b, c, BD(d, 217).a, BD(e, 217).a, f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2", 1333); + bcb(1334, $ve, {}, MWd); + _.Tk = function NWd(a, b, c, d, e) { + return new tSd(a, b, c, BD(d, 172).a, BD(e, 172).a); + }; + _.Uk = function OWd(a, b, c, d, e, f) { + return new uSd(a, b, c, BD(d, 172).a, BD(e, 172).a, f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3", 1334); + bcb(1335, $ve, {}, PWd); + _.Tk = function QWd(a, b, c, d, e) { + return new vSd(a, b, c, Edb(ED(d)), Edb(ED(e))); + }; + _.Uk = function RWd(a, b, c, d, e, f) { + return new wSd(a, b, c, Edb(ED(d)), Edb(ED(e)), f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4", 1335); + bcb(1336, $ve, {}, SWd); + _.Tk = function TWd(a, b, c, d, e) { + return new xSd(a, b, c, BD(d, 155).a, BD(e, 155).a); + }; + _.Uk = function UWd(a, b, c, d, e, f) { + return new ySd(a, b, c, BD(d, 155).a, BD(e, 155).a, f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5", 1336); + bcb(1337, $ve, {}, VWd); + _.Tk = function WWd(a, b, c, d, e) { + return new zSd(a, b, c, BD(d, 19).a, BD(e, 19).a); + }; + _.Uk = function XWd(a, b, c, d, e, f) { + return new ASd(a, b, c, BD(d, 19).a, BD(e, 19).a, f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6", 1337); + bcb(1338, $ve, {}, YWd); + _.Tk = function ZWd(a, b, c, d, e) { + return new BSd(a, b, c, BD(d, 162).a, BD(e, 162).a); + }; + _.Uk = function $Wd(a, b, c, d, e, f) { + return new CSd(a, b, c, BD(d, 162).a, BD(e, 162).a, f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7", 1338); + bcb(1339, $ve, {}, _Wd); + _.Tk = function aXd(a, b, c, d, e) { + return new GSd(a, b, c, BD(d, 184).a, BD(e, 184).a); + }; + _.Uk = function bXd(a, b, c, d, e, f) { + return new HSd(a, b, c, BD(d, 184).a, BD(e, 184).a, f); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8", 1339); + bcb(1317, 563, {}, cXd); + _.Sk = function dXd(a) { + if (!this.a.wj(a)) { + throw vbb(new Cdb(Yve + rb(a) + Zve + this.a + "'")); + } + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic", 1317); + bcb(1318, 563, {}, eXd); + _.Sk = function fXd(a) { + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic", 1318); + bcb(770, 563, {}); + _.Sj = function gXd(a, b, c) { + var d; + d = b.Ch(c); + return d != null; + }; + _.Tj = function hXd(a, b, c, d) { + var e, f; + if (a.Lg() && a.Mg()) { + e = true; + f = b.Ch(c); + if (f == null) { + e = false; + f = this.b; + } else + PD(f) === PD(TVd) && (f = null); + if (d == null) { + if (this.c != null) { + b.Dh(c, null); + d = this.b; + } else { + b.Dh(c, TVd); + } + } else { + this.Sk(d); + b.Dh(c, d); + } + Uhd(a, this.d.Uk(a, 1, this.e, f, d, !e)); + } else { + if (d == null) { + this.c != null ? b.Dh(c, null) : b.Dh(c, TVd); + } else { + this.Sk(d); + b.Dh(c, d); + } + } + }; + _.Vj = function iXd(a, b, c) { + var d, e; + if (a.Lg() && a.Mg()) { + d = true; + e = b.Ch(c); + if (e == null) { + d = false; + e = this.b; + } else + PD(e) === PD(TVd) && (e = null); + b.Eh(c); + Uhd(a, this.d.Uk(a, 2, this.e, e, this.b, d)); + } else { + b.Eh(c); + } + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable", 770); + bcb(1319, 770, {}, jXd); + _.Sk = function kXd(a) { + if (!this.a.wj(a)) { + throw vbb(new Cdb(Yve + rb(a) + Zve + this.a + "'")); + } + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic", 1319); + bcb(1320, 770, {}, lXd); + _.Sk = function mXd(a) { + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic", 1320); + bcb(398, 504, {}, nXd); + _.Pj = function pXd(a, b, c, d, e) { + var f, g, h, i, j; + j = b.Ch(c); + if (this.Kj() && PD(j) === PD(TVd)) { + return null; + } else if (this.sk() && d && j != null) { + h = BD(j, 49); + if (h.kh()) { + i = xid(a, h); + if (h != i) { + if (!fKd(this.a, i)) { + throw vbb(new Cdb(Yve + rb(i) + Zve + this.a + "'")); + } + b.Dh(c, j = i); + if (this.rk()) { + f = BD(i, 49); + g = h.ih(a, !this.b ? -1 - bLd(a.Tg(), this.e) : bLd(h.Tg(), this.b), null, null); + !f.eh() && (g = f.gh(a, !this.b ? -1 - bLd(a.Tg(), this.e) : bLd(f.Tg(), this.b), null, g)); + !!g && g.Fi(); + } + a.Lg() && a.Mg() && Uhd(a, new DSd(a, 9, this.e, h, i)); + } + } + return j; + } else { + return j; + } + }; + _.Qj = function qXd(a, b, c, d, e) { + var f, g; + g = b.Ch(c); + PD(g) === PD(TVd) && (g = null); + b.Dh(c, d); + if (this.bj()) { + if (PD(g) !== PD(d) && g != null) { + f = BD(g, 49); + e = f.ih(a, bLd(f.Tg(), this.b), null, e); + } + } else + this.rk() && g != null && (e = BD(g, 49).ih(a, -1 - bLd(a.Tg(), this.e), null, e)); + if (a.Lg() && a.Mg()) { + !e && (e = new Ixd(4)); + e.Ei(new DSd(a, 1, this.e, g, d)); + } + return e; + }; + _.Rj = function rXd(a, b, c, d, e) { + var f; + f = b.Ch(c); + PD(f) === PD(TVd) && (f = null); + b.Eh(c); + if (a.Lg() && a.Mg()) { + !e && (e = new Ixd(4)); + this.Kj() ? e.Ei(new DSd(a, 2, this.e, f, null)) : e.Ei(new DSd(a, 1, this.e, f, null)); + } + return e; + }; + _.Sj = function sXd(a, b, c) { + var d; + d = b.Ch(c); + return d != null; + }; + _.Tj = function tXd(a, b, c, d) { + var e, f, g, h, i; + if (d != null && !fKd(this.a, d)) { + throw vbb(new Cdb(Yve + (JD(d, 56) ? gLd(BD(d, 56).Tg()) : idb(rb(d))) + Zve + this.a + "'")); + } + i = b.Ch(c); + h = i != null; + this.Kj() && PD(i) === PD(TVd) && (i = null); + g = null; + if (this.bj()) { + if (PD(i) !== PD(d)) { + if (i != null) { + e = BD(i, 49); + g = e.ih(a, bLd(e.Tg(), this.b), null, g); + } + if (d != null) { + e = BD(d, 49); + g = e.gh(a, bLd(e.Tg(), this.b), null, g); + } + } + } else if (this.rk()) { + if (PD(i) !== PD(d)) { + i != null && (g = BD(i, 49).ih(a, -1 - bLd(a.Tg(), this.e), null, g)); + d != null && (g = BD(d, 49).gh(a, -1 - bLd(a.Tg(), this.e), null, g)); + } + } + d == null && this.Kj() ? b.Dh(c, TVd) : b.Dh(c, d); + if (a.Lg() && a.Mg()) { + f = new FSd(a, 1, this.e, i, d, this.Kj() && !h); + if (!g) { + Uhd(a, f); + } else { + g.Ei(f); + g.Fi(); + } + } else + !!g && g.Fi(); + }; + _.Vj = function uXd(a, b, c) { + var d, e, f, g, h; + h = b.Ch(c); + g = h != null; + this.Kj() && PD(h) === PD(TVd) && (h = null); + f = null; + if (h != null) { + if (this.bj()) { + d = BD(h, 49); + f = d.ih(a, bLd(d.Tg(), this.b), null, f); + } else + this.rk() && (f = BD(h, 49).ih(a, -1 - bLd(a.Tg(), this.e), null, f)); + } + b.Eh(c); + if (a.Lg() && a.Mg()) { + e = new FSd(a, this.Kj() ? 2 : 1, this.e, h, null, g); + if (!f) { + Uhd(a, e); + } else { + f.Ei(e); + f.Fi(); + } + } else + !!f && f.Fi(); + }; + _.bj = function vXd() { + return false; + }; + _.rk = function wXd() { + return false; + }; + _.sk = function xXd() { + return false; + }; + _.Kj = function yXd() { + return false; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObject", 398); + bcb(564, 398, {}, zXd); + _.rk = function AXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment", 564); + bcb(1323, 564, {}, BXd); + _.sk = function CXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving", 1323); + bcb(772, 564, {}, DXd); + _.Kj = function EXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable", 772); + bcb(1325, 772, {}, FXd); + _.sk = function GXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving", 1325); + bcb(640, 564, {}, HXd); + _.bj = function IXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse", 640); + bcb(1324, 640, {}, JXd); + _.sk = function KXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving", 1324); + bcb(773, 640, {}, LXd); + _.Kj = function MXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable", 773); + bcb(1326, 773, {}, NXd); + _.sk = function OXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving", 1326); + bcb(641, 398, {}, PXd); + _.sk = function QXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving", 641); + bcb(1327, 641, {}, RXd); + _.Kj = function SXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable", 1327); + bcb(774, 641, {}, TXd); + _.bj = function UXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse", 774); + bcb(1328, 774, {}, VXd); + _.Kj = function WXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable", 1328); + bcb(1321, 398, {}, XXd); + _.Kj = function YXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable", 1321); + bcb(771, 398, {}, ZXd); + _.bj = function $Xd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse", 771); + bcb(1322, 771, {}, _Xd); + _.Kj = function aYd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable", 1322); + bcb(775, 565, Xve, dYd); + _.Pk = function eYd(a) { + return new dYd(this.a, this.c, a); + }; + _.dd = function fYd() { + return this.b; + }; + _.Qk = function gYd(a, b, c) { + return bYd(this, a, this.b, c); + }; + _.Rk = function hYd(a, b, c) { + return cYd(this, a, this.b, c); + }; + mdb(qte, "EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry", 775); + bcb(1329, 1, zve, iYd); + _.Wj = function jYd(a) { + return this.a; + }; + _.fj = function kYd() { + return JD(this.a, 95) ? BD(this.a, 95).fj() : !this.a.dc(); + }; + _.Wb = function lYd(a) { + this.a.$b(); + this.a.Gc(BD(a, 15)); + }; + _.Xj = function mYd() { + JD(this.a, 95) ? BD(this.a, 95).Xj() : this.a.$b(); + }; + mdb(qte, "EStructuralFeatureImpl/SettingMany", 1329); + bcb(1330, 565, Xve, nYd); + _.Ok = function oYd(a) { + return new sYd((Q8d(), P8d), this.b.Ih(this.a, a)); + }; + _.dd = function pYd() { + return null; + }; + _.Qk = function qYd(a, b, c) { + return c; + }; + _.Rk = function rYd(a, b, c) { + return c; + }; + mdb(qte, "EStructuralFeatureImpl/SimpleContentFeatureMapEntry", 1330); + bcb(642, 565, Xve, sYd); + _.Ok = function tYd(a) { + return new sYd(this.c, a); + }; + _.dd = function uYd() { + return this.a; + }; + _.Qk = function vYd(a, b, c) { + return c; + }; + _.Rk = function wYd(a, b, c) { + return c; + }; + mdb(qte, "EStructuralFeatureImpl/SimpleFeatureMapEntry", 642); + bcb(391, 497, oue, xYd); + _.ri = function yYd(a) { + return KC(c5, Uhe, 26, a, 0, 1); + }; + _.ni = function zYd() { + return false; + }; + mdb(qte, "ESuperAdapter/1", 391); + bcb(444, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 836: 1, 49: 1, 97: 1, 150: 1, 444: 1, 114: 1, 115: 1 }, BYd); + _._g = function CYd(a, b, c) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return !this.a && (this.a = new KYd(this, j5, this)), this.a; + } + return bid(this, a - aLd((jGd(), iGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? iGd : d), a), b, c); + }; + _.jh = function DYd(a, b, c) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c); + case 2: + return !this.a && (this.a = new KYd(this, j5, this)), Txd(this.a, a, c); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), iGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), iGd)), a, c); + }; + _.lh = function EYd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return !!this.a && this.a.i != 0; + } + return cid(this, a - aLd((jGd(), iGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? iGd : b), a)); + }; + _.sh = function FYd(a, b) { + var c; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + !this.a && (this.a = new KYd(this, j5, this)); + Uxd(this.a); + !this.a && (this.a = new KYd(this, j5, this)); + ytd(this.a, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), iGd)), XKd((c = BD(Ajd(this, 16), 26), !c ? iGd : c), a), b); + }; + _.zh = function GYd() { + return jGd(), iGd; + }; + _.Bh = function HYd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + !this.a && (this.a = new KYd(this, j5, this)); + Uxd(this.a); + return; + } + eid(this, a - aLd((jGd(), iGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? iGd : b), a)); + }; + mdb(qte, "ETypeParameterImpl", 444); + bcb(445, 85, Pve, KYd); + _.cj = function LYd(a, b) { + return IYd(this, BD(a, 87), b); + }; + _.dj = function MYd(a, b) { + return JYd(this, BD(a, 87), b); + }; + mdb(qte, "ETypeParameterImpl/1", 445); + bcb(634, 43, fke, NYd); + _.ec = function OYd() { + return new RYd(this); + }; + mdb(qte, "ETypeParameterImpl/2", 634); + bcb(556, eie, fie, RYd); + _.Fc = function SYd(a) { + return PYd(this, BD(a, 87)); + }; + _.Gc = function TYd(a) { + var b, c, d; + d = false; + for (c = a.Kc(); c.Ob(); ) { + b = BD(c.Pb(), 87); + Rhb(this.a, b, "") == null && (d = true); + } + return d; + }; + _.$b = function UYd() { + Uhb(this.a); + }; + _.Hc = function VYd(a) { + return Mhb(this.a, a); + }; + _.Kc = function WYd() { + var a; + return a = new nib(new eib(this.a).a), new ZYd(a); + }; + _.Mc = function XYd(a) { + return QYd(this, a); + }; + _.gc = function YYd() { + return Vhb(this.a); + }; + mdb(qte, "ETypeParameterImpl/2/1", 556); + bcb(557, 1, aie, ZYd); + _.Nb = function $Yd(a) { + Rrb(this, a); + }; + _.Pb = function aZd() { + return BD(lib(this.a).cd(), 87); + }; + _.Ob = function _Yd() { + return this.a.b; + }; + _.Qb = function bZd() { + mib(this.a); + }; + mdb(qte, "ETypeParameterImpl/2/1/1", 557); + bcb(1276, 43, fke, cZd); + _._b = function dZd(a) { + return ND(a) ? Qhb(this, a) : !!irb(this.f, a); + }; + _.xc = function eZd(a) { + var b, c; + b = ND(a) ? Phb(this, a) : Wd(irb(this.f, a)); + if (JD(b, 837)) { + c = BD(b, 837); + b = c._j(); + Rhb(this, BD(a, 235), b); + return b; + } else + return b != null ? b : a == null ? (g5d(), f5d) : null; + }; + mdb(qte, "EValidatorRegistryImpl", 1276); + bcb(1313, 704, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 1941: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, mZd); + _.Ih = function nZd(a, b) { + switch (a.yj()) { + case 21: + case 22: + case 23: + case 24: + case 26: + case 31: + case 32: + case 37: + case 38: + case 39: + case 40: + case 43: + case 44: + case 48: + case 49: + case 20: + return b == null ? null : fcb(b); + case 25: + return gZd(b); + case 27: + return hZd(b); + case 28: + return iZd(b); + case 29: + return b == null ? null : CQd(Pmd[0], BD(b, 199)); + case 41: + return b == null ? "" : hdb(BD(b, 290)); + case 42: + return fcb(b); + case 50: + return GD(b); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + _.Jh = function oZd(a) { + var b, c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q; + switch (a.G == -1 && (a.G = (m = bKd(a), m ? HLd(m.Mh(), a) : -1)), a.G) { + case 0: + return c = new OJd(), c; + case 1: + return b = new RHd(), b; + case 2: + return d = new hLd(), d; + case 4: + return e = new MPd(), e; + case 5: + return f = new aQd(), f; + case 6: + return g = new rQd(), g; + case 7: + return h = new $md(), h; + case 10: + return j = new MGd(), j; + case 11: + return k = new SSd(), k; + case 12: + return l = new eod(), l; + case 13: + return n = new rUd(), n; + case 14: + return o2 = new FUd(), o2; + case 17: + return p = new XUd(), p; + case 18: + return i = new UQd(), i; + case 19: + return q = new BYd(), q; + default: + throw vbb(new Wdb(xte + a.zb + ute)); + } + }; + _.Kh = function pZd(a, b) { + switch (a.yj()) { + case 20: + return b == null ? null : new tgb(b); + case 21: + return b == null ? null : new Ygb(b); + case 23: + case 22: + return b == null ? null : fZd(b); + case 26: + case 24: + return b == null ? null : Scb(Icb(b, -128, 127) << 24 >> 24); + case 25: + return Xmd(b); + case 27: + return jZd(b); + case 28: + return kZd(b); + case 29: + return lZd(b); + case 32: + case 31: + return b == null ? null : Hcb(b); + case 38: + case 37: + return b == null ? null : new Odb(b); + case 40: + case 39: + return b == null ? null : meb(Icb(b, Rie, Ohe)); + case 41: + return null; + case 42: + return b == null ? null : null; + case 44: + case 43: + return b == null ? null : Aeb(Jcb(b)); + case 49: + case 48: + return b == null ? null : Web(Icb(b, awe, 32767) << 16 >> 16); + case 50: + return b; + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + mdb(qte, "EcoreFactoryImpl", 1313); + bcb(547, 179, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 1939: 1, 49: 1, 97: 1, 150: 1, 179: 1, 547: 1, 114: 1, 115: 1, 675: 1 }, AZd); + _.gb = false; + _.hb = false; + var rZd, sZd = false; + mdb(qte, "EcorePackageImpl", 547); + bcb(1184, 1, { 837: 1 }, EZd); + _._j = function FZd() { + return I6d(), H6d; + }; + mdb(qte, "EcorePackageImpl/1", 1184); + bcb(1193, 1, nwe, GZd); + _.wj = function HZd(a) { + return JD(a, 147); + }; + _.xj = function IZd(a) { + return KC(k5, Uhe, 147, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/10", 1193); + bcb(1194, 1, nwe, JZd); + _.wj = function KZd(a) { + return JD(a, 191); + }; + _.xj = function LZd(a) { + return KC(l5, Uhe, 191, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/11", 1194); + bcb(1195, 1, nwe, MZd); + _.wj = function NZd(a) { + return JD(a, 56); + }; + _.xj = function OZd(a) { + return KC(m5, Uhe, 56, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/12", 1195); + bcb(1196, 1, nwe, PZd); + _.wj = function QZd(a) { + return JD(a, 399); + }; + _.xj = function RZd(a) { + return KC(n5, Nve, 59, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/13", 1196); + bcb(1197, 1, nwe, SZd); + _.wj = function TZd(a) { + return JD(a, 235); + }; + _.xj = function UZd(a) { + return KC(o5, Uhe, 235, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/14", 1197); + bcb(1198, 1, nwe, VZd); + _.wj = function WZd(a) { + return JD(a, 509); + }; + _.xj = function XZd(a) { + return KC(p5, Uhe, 2017, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/15", 1198); + bcb(1199, 1, nwe, YZd); + _.wj = function ZZd(a) { + return JD(a, 99); + }; + _.xj = function $Zd(a) { + return KC(q5, Mve, 18, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/16", 1199); + bcb(1200, 1, nwe, _Zd); + _.wj = function a$d(a) { + return JD(a, 170); + }; + _.xj = function b$d(a) { + return KC(t5, Mve, 170, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/17", 1200); + bcb(1201, 1, nwe, c$d); + _.wj = function d$d(a) { + return JD(a, 472); + }; + _.xj = function e$d(a) { + return KC(v5, Uhe, 472, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/18", 1201); + bcb(1202, 1, nwe, f$d); + _.wj = function g$d(a) { + return JD(a, 548); + }; + _.xj = function h$d(a) { + return KC(x6, kve, 548, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/19", 1202); + bcb(1185, 1, nwe, i$d); + _.wj = function j$d(a) { + return JD(a, 322); + }; + _.xj = function k$d(a) { + return KC(b5, Mve, 34, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/2", 1185); + bcb(1203, 1, nwe, l$d); + _.wj = function m$d(a) { + return JD(a, 241); + }; + _.xj = function n$d(a) { + return KC(j5, Tve, 87, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/20", 1203); + bcb(1204, 1, nwe, o$d); + _.wj = function p$d(a) { + return JD(a, 444); + }; + _.xj = function q$d(a) { + return KC(u5, Uhe, 836, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/21", 1204); + bcb(1205, 1, nwe, r$d); + _.wj = function s$d(a) { + return KD(a); + }; + _.xj = function t$d(a) { + return KC(wI, nie, 476, a, 8, 1); + }; + mdb(qte, "EcorePackageImpl/22", 1205); + bcb(1206, 1, nwe, u$d); + _.wj = function v$d(a) { + return JD(a, 190); + }; + _.xj = function w$d(a) { + return KC(SD, nie, 190, a, 0, 2); + }; + mdb(qte, "EcorePackageImpl/23", 1206); + bcb(1207, 1, nwe, x$d); + _.wj = function y$d(a) { + return JD(a, 217); + }; + _.xj = function z$d(a) { + return KC(xI, nie, 217, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/24", 1207); + bcb(1208, 1, nwe, A$d); + _.wj = function B$d(a) { + return JD(a, 172); + }; + _.xj = function C$d(a) { + return KC(yI, nie, 172, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/25", 1208); + bcb(1209, 1, nwe, D$d); + _.wj = function E$d(a) { + return JD(a, 199); + }; + _.xj = function F$d(a) { + return KC($J, nie, 199, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/26", 1209); + bcb(1210, 1, nwe, G$d); + _.wj = function H$d(a) { + return false; + }; + _.xj = function I$d(a) { + return KC(O4, Uhe, 2110, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/27", 1210); + bcb(1211, 1, nwe, J$d); + _.wj = function K$d(a) { + return LD(a); + }; + _.xj = function L$d(a) { + return KC(BI, nie, 333, a, 7, 1); + }; + mdb(qte, "EcorePackageImpl/28", 1211); + bcb(1212, 1, nwe, M$d); + _.wj = function N$d(a) { + return JD(a, 58); + }; + _.xj = function O$d(a) { + return KC(T4, eme, 58, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/29", 1212); + bcb(1186, 1, nwe, P$d); + _.wj = function Q$d(a) { + return JD(a, 510); + }; + _.xj = function R$d(a) { + return KC(a5, { 3: 1, 4: 1, 5: 1, 1934: 1 }, 590, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/3", 1186); + bcb(1213, 1, nwe, S$d); + _.wj = function T$d(a) { + return JD(a, 573); + }; + _.xj = function U$d(a) { + return KC(U4, Uhe, 1940, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/30", 1213); + bcb(1214, 1, nwe, V$d); + _.wj = function W$d(a) { + return JD(a, 153); + }; + _.xj = function X$d(a) { + return KC(O9, eme, 153, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/31", 1214); + bcb(1215, 1, nwe, Y$d); + _.wj = function Z$d(a) { + return JD(a, 72); + }; + _.xj = function $$d(a) { + return KC(E9, owe, 72, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/32", 1215); + bcb(1216, 1, nwe, _$d); + _.wj = function a_d(a) { + return JD(a, 155); + }; + _.xj = function b_d(a) { + return KC(FI, nie, 155, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/33", 1216); + bcb(1217, 1, nwe, c_d); + _.wj = function d_d(a) { + return JD(a, 19); + }; + _.xj = function e_d(a) { + return KC(JI, nie, 19, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/34", 1217); + bcb(1218, 1, nwe, f_d); + _.wj = function g_d(a) { + return JD(a, 290); + }; + _.xj = function h_d(a) { + return KC(AI, Uhe, 290, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/35", 1218); + bcb(1219, 1, nwe, i_d); + _.wj = function j_d(a) { + return JD(a, 162); + }; + _.xj = function k_d(a) { + return KC(MI, nie, 162, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/36", 1219); + bcb(1220, 1, nwe, l_d); + _.wj = function m_d(a) { + return JD(a, 83); + }; + _.xj = function n_d(a) { + return KC(DK, Uhe, 83, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/37", 1220); + bcb(1221, 1, nwe, o_d); + _.wj = function p_d(a) { + return JD(a, 591); + }; + _.xj = function q_d(a) { + return KC(v8, Uhe, 591, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/38", 1221); + bcb(1222, 1, nwe, r_d); + _.wj = function s_d(a) { + return false; + }; + _.xj = function t_d(a) { + return KC(u8, Uhe, 2111, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/39", 1222); + bcb(1187, 1, nwe, u_d); + _.wj = function v_d(a) { + return JD(a, 88); + }; + _.xj = function w_d(a) { + return KC(c5, Uhe, 26, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/4", 1187); + bcb(1223, 1, nwe, x_d); + _.wj = function y_d(a) { + return JD(a, 184); + }; + _.xj = function z_d(a) { + return KC(UI, nie, 184, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/40", 1223); + bcb(1224, 1, nwe, A_d); + _.wj = function B_d(a) { + return ND(a); + }; + _.xj = function C_d(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(qte, "EcorePackageImpl/41", 1224); + bcb(1225, 1, nwe, D_d); + _.wj = function E_d(a) { + return JD(a, 588); + }; + _.xj = function F_d(a) { + return KC(X4, Uhe, 588, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/42", 1225); + bcb(1226, 1, nwe, G_d); + _.wj = function H_d(a) { + return false; + }; + _.xj = function I_d(a) { + return KC(V4, nie, 2112, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/43", 1226); + bcb(1227, 1, nwe, J_d); + _.wj = function K_d(a) { + return JD(a, 42); + }; + _.xj = function L_d(a) { + return KC(CK, zie, 42, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/44", 1227); + bcb(1188, 1, nwe, M_d); + _.wj = function N_d(a) { + return JD(a, 138); + }; + _.xj = function O_d(a) { + return KC(d5, Uhe, 138, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/5", 1188); + bcb(1189, 1, nwe, P_d); + _.wj = function Q_d(a) { + return JD(a, 148); + }; + _.xj = function R_d(a) { + return KC(f5, Uhe, 148, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/6", 1189); + bcb(1190, 1, nwe, S_d); + _.wj = function T_d(a) { + return JD(a, 457); + }; + _.xj = function U_d(a) { + return KC(h5, Uhe, 671, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/7", 1190); + bcb(1191, 1, nwe, V_d); + _.wj = function W_d(a) { + return JD(a, 573); + }; + _.xj = function X_d(a) { + return KC(g5, Uhe, 678, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/8", 1191); + bcb(1192, 1, nwe, Y_d); + _.wj = function Z_d(a) { + return JD(a, 471); + }; + _.xj = function $_d(a) { + return KC(i5, Uhe, 471, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/9", 1192); + bcb(1025, 1982, ive, c0d); + _.bi = function d0d(a, b) { + __d(this, BD(b, 415)); + }; + _.fi = function e0d(a, b) { + a0d(this, a, BD(b, 415)); + }; + mdb(qte, "MinimalEObjectImpl/1ArrayDelegatingAdapterList", 1025); + bcb(1026, 143, fve, f0d); + _.Ai = function g0d() { + return this.a.a; + }; + mdb(qte, "MinimalEObjectImpl/1ArrayDelegatingAdapterList/1", 1026); + bcb(1053, 1052, {}, i0d); + mdb("org.eclipse.emf.ecore.plugin", "EcorePlugin", 1053); + var v8 = odb(pwe, "Resource"); + bcb(781, 1378, qwe); + _.Yk = function m0d(a) { + }; + _.Zk = function n0d(a) { + }; + _.Vk = function o0d() { + return !this.a && (this.a = new z0d(this)), this.a; + }; + _.Wk = function p0d(a) { + var b, c, d, e, f; + d = a.length; + if (d > 0) { + BCb(0, a.length); + if (a.charCodeAt(0) == 47) { + f = new Skb(4); + e = 1; + for (b = 1; b < d; ++b) { + BCb(b, a.length); + if (a.charCodeAt(b) == 47) { + Ekb(f, e == b ? "" : a.substr(e, b - e)); + e = b + 1; + } + } + Ekb(f, a.substr(e)); + return j0d(this, f); + } else { + BCb(d - 1, a.length); + if (a.charCodeAt(d - 1) == 63) { + c = lfb(a, wfb(63), d - 2); + c > 0 && (a = a.substr(0, c)); + } + } + } + return k0d(this, a); + }; + _.Xk = function q0d() { + return this.c; + }; + _.Ib = function r0d() { + var a; + return hdb(this.gm) + "@" + (a = tb(this) >>> 0, a.toString(16)) + " uri='" + this.d + "'"; + }; + _.b = false; + mdb(rwe, "ResourceImpl", 781); + bcb(1379, 781, qwe, s0d); + mdb(rwe, "BinaryResourceImpl", 1379); + bcb(1169, 694, pue); + _.si = function v0d(a) { + return JD(a, 56) ? t0d(this, BD(a, 56)) : JD(a, 591) ? new Fyd(BD(a, 591).Vk()) : PD(a) === PD(this.f) ? BD(a, 14).Kc() : (LCd(), KCd.a); + }; + _.Ob = function w0d() { + return u0d(this); + }; + _.a = false; + mdb(yve, "EcoreUtil/ContentTreeIterator", 1169); + bcb(1380, 1169, pue, x0d); + _.si = function y0d(a) { + return PD(a) === PD(this.f) ? BD(a, 15).Kc() : new C6d(BD(a, 56)); + }; + mdb(rwe, "ResourceImpl/5", 1380); + bcb(648, 1994, Ove, z0d); + _.Hc = function A0d(a) { + return this.i <= 4 ? pud(this, a) : JD(a, 49) && BD(a, 49).Zg() == this.a; + }; + _.bi = function B0d(a, b) { + a == this.i - 1 && (this.a.b || (this.a.b = true, null)); + }; + _.di = function C0d(a, b) { + a == 0 ? this.a.b || (this.a.b = true, null) : Atd(this, a, b); + }; + _.fi = function D0d(a, b) { + }; + _.gi = function E0d(a, b, c) { + }; + _.aj = function F0d() { + return 2; + }; + _.Ai = function G0d() { + return this.a; + }; + _.bj = function H0d() { + return true; + }; + _.cj = function I0d(a, b) { + var c; + c = BD(a, 49); + b = c.wh(this.a, b); + return b; + }; + _.dj = function J0d(a, b) { + var c; + c = BD(a, 49); + return c.wh(null, b); + }; + _.ej = function K0d() { + return false; + }; + _.hi = function L0d() { + return true; + }; + _.ri = function M0d(a) { + return KC(m5, Uhe, 56, a, 0, 1); + }; + _.ni = function N0d() { + return false; + }; + mdb(rwe, "ResourceImpl/ContentsEList", 648); + bcb(957, 1964, Lie, O0d); + _.Zc = function P0d(a) { + return this.a._h(a); + }; + _.gc = function Q0d() { + return this.a.gc(); + }; + mdb(yve, "AbstractSequentialInternalEList/1", 957); + var K6d, L6d, M6d, N6d; + bcb(624, 1, {}, y1d); + var R0d, S0d; + mdb(yve, "BasicExtendedMetaData", 624); + bcb(1160, 1, {}, C1d); + _.$k = function D1d() { + return null; + }; + _._k = function E1d() { + this.a == -2 && A1d(this, W0d(this.d, this.b)); + return this.a; + }; + _.al = function F1d() { + return null; + }; + _.bl = function G1d() { + return mmb(), mmb(), jmb; + }; + _.ne = function H1d() { + this.c == Gwe && B1d(this, _0d(this.d, this.b)); + return this.c; + }; + _.cl = function I1d() { + return 0; + }; + _.a = -2; + _.c = Gwe; + mdb(yve, "BasicExtendedMetaData/EClassExtendedMetaDataImpl", 1160); + bcb(1161, 1, {}, O1d); + _.$k = function P1d() { + this.a == (T0d(), R0d) && J1d(this, V0d(this.f, this.b)); + return this.a; + }; + _._k = function Q1d() { + return 0; + }; + _.al = function R1d() { + this.c == (T0d(), R0d) && K1d(this, Z0d(this.f, this.b)); + return this.c; + }; + _.bl = function S1d() { + !this.d && L1d(this, $0d(this.f, this.b)); + return this.d; + }; + _.ne = function T1d() { + this.e == Gwe && M1d(this, _0d(this.f, this.b)); + return this.e; + }; + _.cl = function U1d() { + this.g == -2 && N1d(this, c1d(this.f, this.b)); + return this.g; + }; + _.e = Gwe; + _.g = -2; + mdb(yve, "BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl", 1161); + bcb(1159, 1, {}, Y1d); + _.b = false; + _.c = false; + mdb(yve, "BasicExtendedMetaData/EPackageExtendedMetaDataImpl", 1159); + bcb(1162, 1, {}, j2d); + _.c = -2; + _.e = Gwe; + _.f = Gwe; + mdb(yve, "BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl", 1162); + bcb(585, 622, Pve, k2d); + _.aj = function l2d() { + return this.c; + }; + _.Fk = function m2d() { + return false; + }; + _.li = function n2d(a, b) { + return b; + }; + _.c = 0; + mdb(yve, "EDataTypeEList", 585); + var O9 = odb(yve, "FeatureMap"); + bcb(75, 585, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 76: 1, 153: 1, 215: 1, 1937: 1, 69: 1, 95: 1 }, u3d); + _.Vc = function v3d(a, b) { + o2d(this, a, BD(b, 72)); + }; + _.Fc = function w3d(a) { + return r2d(this, BD(a, 72)); + }; + _.Yh = function B3d(a) { + w2d(this, BD(a, 72)); + }; + _.cj = function M3d(a, b) { + return O2d(this, BD(a, 72), b); + }; + _.dj = function N3d(a, b) { + return Q2d(this, BD(a, 72), b); + }; + _.ii = function P3d(a, b) { + return W2d(this, a, b); + }; + _.li = function R3d(a, b) { + return _2d(this, a, BD(b, 72)); + }; + _._c = function T3d(a, b) { + return c3d(this, a, BD(b, 72)); + }; + _.jj = function X3d(a, b) { + return i3d(this, BD(a, 72), b); + }; + _.kj = function Y3d(a, b) { + return k3d(this, BD(a, 72), b); + }; + _.lj = function Z3d(a, b, c) { + return l3d(this, BD(a, 72), BD(b, 72), c); + }; + _.oi = function _3d(a, b) { + return t3d(this, a, BD(b, 72)); + }; + _.dl = function x3d(a, b) { + return q2d(this, a, b); + }; + _.Wc = function y3d(a, b) { + var c, d, e, f, g, h, i, j, k; + j = new zud(b.gc()); + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 72); + f = d.ak(); + if (T6d(this.e, f)) { + (!f.hi() || !E2d(this, f, d.dd()) && !pud(j, d)) && wtd(j, d); + } else { + k = S6d(this.e.Tg(), f); + c = BD(this.g, 119); + g = true; + for (h = 0; h < this.i; ++h) { + i = c[h]; + if (k.rl(i.ak())) { + BD(Gtd(this, h, d), 72); + g = false; + break; + } + } + g && wtd(j, d); + } + } + return xtd(this, a, j); + }; + _.Gc = function z3d(a) { + var b, c, d, e, f, g, h, i, j; + i = new zud(a.gc()); + for (d = a.Kc(); d.Ob(); ) { + c = BD(d.Pb(), 72); + e = c.ak(); + if (T6d(this.e, e)) { + (!e.hi() || !E2d(this, e, c.dd()) && !pud(i, c)) && wtd(i, c); + } else { + j = S6d(this.e.Tg(), e); + b = BD(this.g, 119); + f = true; + for (g = 0; g < this.i; ++g) { + h = b[g]; + if (j.rl(h.ak())) { + BD(Gtd(this, g, c), 72); + f = false; + break; + } + } + f && wtd(i, c); + } + } + return ytd(this, i); + }; + _.Wh = function A3d(a) { + this.j = -1; + return Pxd(this, this.i, a); + }; + _.el = function C3d(a, b, c) { + return x2d(this, a, b, c); + }; + _.mk = function D3d(a, b) { + return B2d(this, a, b); + }; + _.fl = function E3d(a, b, c) { + return C2d(this, a, b, c); + }; + _.gl = function F3d() { + return this; + }; + _.hl = function G3d(a, b) { + return K2d(this, a, b); + }; + _.il = function H3d(a) { + return BD(qud(this, a), 72).ak(); + }; + _.jl = function I3d(a) { + return BD(qud(this, a), 72).dd(); + }; + _.kl = function J3d() { + return this.b; + }; + _.bj = function K3d() { + return true; + }; + _.ij = function L3d() { + return true; + }; + _.ll = function O3d(a) { + return !R2d(this, a); + }; + _.ri = function Q3d(a) { + return KC(D9, owe, 332, a, 0, 1); + }; + _.Gk = function S3d(a) { + return a3d(this, a); + }; + _.Wb = function U3d(a) { + d3d(this, a); + }; + _.ml = function V3d(a, b) { + f3d(this, a, b); + }; + _.nl = function W3d(a) { + return g3d(this, a); + }; + _.ol = function $3d(a) { + s3d(this, a); + }; + mdb(yve, "BasicFeatureMap", 75); + bcb(1851, 1, jie); + _.Nb = function f4d(a) { + Rrb(this, a); + }; + _.Rb = function e4d(b) { + if (this.g == -1) { + throw vbb(new Ydb()); + } + a4d(this); + try { + p2d(this.e, this.b, this.a, b); + this.d = this.e.j; + d4d(this); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + }; + _.Ob = function g4d() { + return b4d(this); + }; + _.Sb = function h4d() { + return c4d(this); + }; + _.Pb = function i4d() { + return d4d(this); + }; + _.Tb = function j4d() { + return this.a; + }; + _.Ub = function k4d() { + var a; + if (c4d(this)) { + a4d(this); + this.g = --this.a; + if (this.Lk()) { + a = b3d(this.e, this.b, this.c, this.a, this.j); + this.j = a; + } + this.i = 0; + return this.j; + } else { + throw vbb(new utb()); + } + }; + _.Vb = function l4d() { + return this.a - 1; + }; + _.Qb = function m4d() { + if (this.g == -1) { + throw vbb(new Ydb()); + } + a4d(this); + try { + Z2d(this.e, this.b, this.g); + this.d = this.e.j; + if (this.g < this.a) { + --this.a; + --this.c; + } + --this.g; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + }; + _.Lk = function n4d() { + return false; + }; + _.Wb = function o4d(b) { + if (this.g == -1) { + throw vbb(new Ydb()); + } + a4d(this); + try { + e3d(this.e, this.b, this.g, b); + this.d = this.e.j; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + }; + _.a = 0; + _.c = 0; + _.d = 0; + _.f = false; + _.g = 0; + _.i = 0; + mdb(yve, "FeatureMapUtil/BasicFeatureEIterator", 1851); + bcb(410, 1851, jie, p4d); + _.pl = function q4d() { + var a, b, c; + c = this.e.i; + a = BD(this.e.g, 119); + while (this.c < c) { + b = a[this.c]; + if (this.k.rl(b.ak())) { + this.j = this.f ? b : b.dd(); + this.i = 2; + return true; + } + ++this.c; + } + this.i = 1; + this.g = -1; + return false; + }; + _.ql = function r4d() { + var a, b; + a = BD(this.e.g, 119); + while (--this.c >= 0) { + b = a[this.c]; + if (this.k.rl(b.ak())) { + this.j = this.f ? b : b.dd(); + this.i = -2; + return true; + } + } + this.i = -1; + this.g = -1; + return false; + }; + mdb(yve, "BasicFeatureMap/FeatureEIterator", 410); + bcb(662, 410, jie, s4d); + _.Lk = function t4d() { + return true; + }; + mdb(yve, "BasicFeatureMap/ResolvingFeatureEIterator", 662); + bcb(955, 486, Vve, u4d); + _.Gi = function v4d() { + return this; + }; + mdb(yve, "EContentsEList/1", 955); + bcb(956, 486, Vve, w4d); + _.Lk = function x4d() { + return false; + }; + mdb(yve, "EContentsEList/2", 956); + bcb(954, 279, Wve, y4d); + _.Nk = function z4d(a) { + }; + _.Ob = function A4d() { + return false; + }; + _.Sb = function B4d() { + return false; + }; + mdb(yve, "EContentsEList/FeatureIteratorImpl/1", 954); + bcb(825, 585, Pve, C4d); + _.ci = function D4d() { + this.a = true; + }; + _.fj = function E4d() { + return this.a; + }; + _.Xj = function F4d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _.a = false; + mdb(yve, "EDataTypeEList/Unsettable", 825); + bcb(1849, 585, Pve, G4d); + _.hi = function H4d() { + return true; + }; + mdb(yve, "EDataTypeUniqueEList", 1849); + bcb(1850, 825, Pve, I4d); + _.hi = function J4d() { + return true; + }; + mdb(yve, "EDataTypeUniqueEList/Unsettable", 1850); + bcb(139, 85, Pve, K4d); + _.Ek = function L4d() { + return true; + }; + _.li = function M4d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentEList/Resolving", 139); + bcb(1163, 545, Pve, N4d); + _.Ek = function O4d() { + return true; + }; + _.li = function P4d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentEList/Unsettable/Resolving", 1163); + bcb(748, 16, Pve, Q4d); + _.ci = function R4d() { + this.a = true; + }; + _.fj = function S4d() { + return this.a; + }; + _.Xj = function T4d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _.a = false; + mdb(yve, "EObjectContainmentWithInverseEList/Unsettable", 748); + bcb(1173, 748, Pve, U4d); + _.Ek = function V4d() { + return true; + }; + _.li = function W4d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentWithInverseEList/Unsettable/Resolving", 1173); + bcb(743, 496, Pve, X4d); + _.ci = function Y4d() { + this.a = true; + }; + _.fj = function Z4d() { + return this.a; + }; + _.Xj = function $4d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _.a = false; + mdb(yve, "EObjectEList/Unsettable", 743); + bcb(328, 496, Pve, _4d); + _.Ek = function a5d() { + return true; + }; + _.li = function b5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectResolvingEList", 328); + bcb(1641, 743, Pve, c5d); + _.Ek = function d5d() { + return true; + }; + _.li = function e5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectResolvingEList/Unsettable", 1641); + bcb(1381, 1, {}, h5d); + var f5d; + mdb(yve, "EObjectValidator", 1381); + bcb(546, 496, Pve, i5d); + _.zk = function j5d() { + return this.d; + }; + _.Ak = function k5d() { + return this.b; + }; + _.bj = function l5d() { + return true; + }; + _.Dk = function m5d() { + return true; + }; + _.b = 0; + mdb(yve, "EObjectWithInverseEList", 546); + bcb(1176, 546, Pve, n5d); + _.Ck = function o5d() { + return true; + }; + mdb(yve, "EObjectWithInverseEList/ManyInverse", 1176); + bcb(625, 546, Pve, p5d); + _.ci = function q5d() { + this.a = true; + }; + _.fj = function r5d() { + return this.a; + }; + _.Xj = function s5d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _.a = false; + mdb(yve, "EObjectWithInverseEList/Unsettable", 625); + bcb(1175, 625, Pve, t5d); + _.Ck = function u5d() { + return true; + }; + mdb(yve, "EObjectWithInverseEList/Unsettable/ManyInverse", 1175); + bcb(749, 546, Pve, v5d); + _.Ek = function w5d() { + return true; + }; + _.li = function x5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectWithInverseResolvingEList", 749); + bcb(31, 749, Pve, y5d); + _.Ck = function z5d() { + return true; + }; + mdb(yve, "EObjectWithInverseResolvingEList/ManyInverse", 31); + bcb(750, 625, Pve, A5d); + _.Ek = function B5d() { + return true; + }; + _.li = function C5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectWithInverseResolvingEList/Unsettable", 750); + bcb(1174, 750, Pve, D5d); + _.Ck = function E5d() { + return true; + }; + mdb(yve, "EObjectWithInverseResolvingEList/Unsettable/ManyInverse", 1174); + bcb(1164, 622, Pve); + _.ai = function F5d() { + return (this.b & 1792) == 0; + }; + _.ci = function G5d() { + this.b |= 1; + }; + _.Bk = function H5d() { + return (this.b & 4) != 0; + }; + _.bj = function I5d() { + return (this.b & 40) != 0; + }; + _.Ck = function J5d() { + return (this.b & 16) != 0; + }; + _.Dk = function K5d() { + return (this.b & 8) != 0; + }; + _.Ek = function L5d() { + return (this.b & Dve) != 0; + }; + _.rk = function M5d() { + return (this.b & 32) != 0; + }; + _.Fk = function N5d() { + return (this.b & zte) != 0; + }; + _.wj = function O5d(a) { + return !this.d ? this.ak().Yj().wj(a) : qEd(this.d, a); + }; + _.fj = function P5d() { + return (this.b & 2) != 0 ? (this.b & 1) != 0 : this.i != 0; + }; + _.hi = function Q5d() { + return (this.b & 128) != 0; + }; + _.Xj = function S5d() { + var a; + Uxd(this); + if ((this.b & 2) != 0) { + if (oid(this.e)) { + a = (this.b & 1) != 0; + this.b &= -2; + GLd(this, new qSd(this.e, 2, bLd(this.e.Tg(), this.ak()), a, false)); + } else { + this.b &= -2; + } + } + }; + _.ni = function T5d() { + return (this.b & 1536) == 0; + }; + _.b = 0; + mdb(yve, "EcoreEList/Generic", 1164); + bcb(1165, 1164, Pve, U5d); + _.ak = function V5d() { + return this.a; + }; + mdb(yve, "EcoreEList/Dynamic", 1165); + bcb(747, 63, oue, W5d); + _.ri = function X5d(a) { + return izd(this.a.a, a); + }; + mdb(yve, "EcoreEMap/1", 747); + bcb(746, 85, Pve, Y5d); + _.bi = function Z5d(a, b) { + uAd(this.b, BD(b, 133)); + }; + _.di = function $5d(a, b) { + tAd(this.b); + }; + _.ei = function _5d(a, b, c) { + var d; + ++(d = this.b, BD(b, 133), d).e; + }; + _.fi = function a6d(a, b) { + vAd(this.b, BD(b, 133)); + }; + _.gi = function b6d(a, b, c) { + vAd(this.b, BD(c, 133)); + PD(c) === PD(b) && BD(c, 133).Th(CAd(BD(b, 133).cd())); + uAd(this.b, BD(b, 133)); + }; + mdb(yve, "EcoreEMap/DelegateEObjectContainmentEList", 746); + bcb(1171, 151, Ave, c6d); + mdb(yve, "EcoreEMap/Unsettable", 1171); + bcb(1172, 746, Pve, d6d); + _.ci = function e6d() { + this.a = true; + }; + _.fj = function f6d() { + return this.a; + }; + _.Xj = function g6d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _.a = false; + mdb(yve, "EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList", 1172); + bcb(1168, 228, fke, A6d); + _.a = false; + _.b = false; + mdb(yve, "EcoreUtil/Copier", 1168); + bcb(745, 1, aie, C6d); + _.Nb = function D6d(a) { + Rrb(this, a); + }; + _.Ob = function E6d() { + return B6d(this); + }; + _.Pb = function F6d() { + var a; + B6d(this); + a = this.b; + this.b = null; + return a; + }; + _.Qb = function G6d() { + this.a.Qb(); + }; + mdb(yve, "EcoreUtil/ProperContentIterator", 745); + bcb(1382, 1381, {}, J6d); + var H6d; + mdb(yve, "EcoreValidator", 1382); + var P6d; + odb(yve, "FeatureMapUtil/Validator"); + bcb(1260, 1, { 1942: 1 }, U6d); + _.rl = function V6d(a) { + return true; + }; + mdb(yve, "FeatureMapUtil/1", 1260); + bcb(757, 1, { 1942: 1 }, Z6d); + _.rl = function $6d(a) { + var b; + if (this.c == a) + return true; + b = DD(Ohb(this.a, a)); + if (b == null) { + if (Y6d(this, a)) { + _6d(this.a, a, (Bcb(), Acb)); + return true; + } else { + _6d(this.a, a, (Bcb(), zcb)); + return false; + } + } else { + return b == (Bcb(), Acb); + } + }; + _.e = false; + var W6d; + mdb(yve, "FeatureMapUtil/BasicValidator", 757); + bcb(758, 43, fke, a7d); + mdb(yve, "FeatureMapUtil/BasicValidator/Cache", 758); + bcb(501, 52, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, f7d); + _.Vc = function g7d(a, b) { + p2d(this.c, this.b, a, b); + }; + _.Fc = function h7d(a) { + return q2d(this.c, this.b, a); + }; + _.Wc = function i7d(a, b) { + return s2d(this.c, this.b, a, b); + }; + _.Gc = function j7d(a) { + return b7d(this, a); + }; + _.Xh = function k7d(a, b) { + u2d(this.c, this.b, a, b); + }; + _.lk = function l7d(a, b) { + return x2d(this.c, this.b, a, b); + }; + _.pi = function m7d(a) { + return J2d(this.c, this.b, a, false); + }; + _.Zh = function n7d() { + return y2d(this.c, this.b); + }; + _.$h = function o7d() { + return z2d(this.c, this.b); + }; + _._h = function p7d(a) { + return A2d(this.c, this.b, a); + }; + _.mk = function q7d(a, b) { + return c7d(this, a, b); + }; + _.$b = function r7d() { + d7d(this); + }; + _.Hc = function s7d(a) { + return E2d(this.c, this.b, a); + }; + _.Ic = function t7d(a) { + return G2d(this.c, this.b, a); + }; + _.Xb = function u7d(a) { + return J2d(this.c, this.b, a, true); + }; + _.Wj = function v7d(a) { + return this; + }; + _.Xc = function w7d(a) { + return L2d(this.c, this.b, a); + }; + _.dc = function x7d() { + return e7d(this); + }; + _.fj = function y7d() { + return !R2d(this.c, this.b); + }; + _.Kc = function z7d() { + return S2d(this.c, this.b); + }; + _.Yc = function A7d() { + return U2d(this.c, this.b); + }; + _.Zc = function B7d(a) { + return V2d(this.c, this.b, a); + }; + _.ii = function C7d(a, b) { + return X2d(this.c, this.b, a, b); + }; + _.ji = function D7d(a, b) { + Y2d(this.c, this.b, a, b); + }; + _.$c = function E7d(a) { + return Z2d(this.c, this.b, a); + }; + _.Mc = function F7d(a) { + return $2d(this.c, this.b, a); + }; + _._c = function G7d(a, b) { + return e3d(this.c, this.b, a, b); + }; + _.Wb = function H7d(a) { + D2d(this.c, this.b); + b7d(this, BD(a, 15)); + }; + _.gc = function I7d() { + return n3d(this.c, this.b); + }; + _.Pc = function J7d() { + return o3d(this.c, this.b); + }; + _.Qc = function K7d(a) { + return q3d(this.c, this.b, a); + }; + _.Ib = function L7d() { + var a, b; + b = new Hfb(); + b.a += "["; + for (a = y2d(this.c, this.b); b4d(a); ) { + Efb(b, xfb(d4d(a))); + b4d(a) && (b.a += She, b); + } + b.a += "]"; + return b.a; + }; + _.Xj = function M7d() { + D2d(this.c, this.b); + }; + mdb(yve, "FeatureMapUtil/FeatureEList", 501); + bcb(627, 36, fve, O7d); + _.yi = function P7d(a) { + return N7d(this, a); + }; + _.Di = function Q7d(a) { + var b, c, d, e, f, g, h; + switch (this.d) { + case 1: + case 2: { + f = a.Ai(); + if (PD(f) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.g = a.zi(); + a.xi() == 1 && (this.d = 1); + return true; + } + break; + } + case 3: { + e = a.xi(); + switch (e) { + case 3: { + f = a.Ai(); + if (PD(f) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.d = 5; + b = new zud(2); + wtd(b, this.g); + wtd(b, a.zi()); + this.g = b; + return true; + } + break; + } + } + break; + } + case 5: { + e = a.xi(); + switch (e) { + case 3: { + f = a.Ai(); + if (PD(f) === PD(this.c) && N7d(this, null) == a.yi(null)) { + c = BD(this.g, 14); + c.Fc(a.zi()); + return true; + } + break; + } + } + break; + } + case 4: { + e = a.xi(); + switch (e) { + case 3: { + f = a.Ai(); + if (PD(f) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.d = 1; + this.g = a.zi(); + return true; + } + break; + } + case 4: { + f = a.Ai(); + if (PD(f) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.d = 6; + h = new zud(2); + wtd(h, this.n); + wtd(h, a.Bi()); + this.n = h; + g = OC(GC(WD, 1), oje, 25, 15, [this.o, a.Ci()]); + this.g = g; + return true; + } + break; + } + } + break; + } + case 6: { + e = a.xi(); + switch (e) { + case 4: { + f = a.Ai(); + if (PD(f) === PD(this.c) && N7d(this, null) == a.yi(null)) { + c = BD(this.n, 14); + c.Fc(a.Bi()); + g = BD(this.g, 48); + d = KC(WD, oje, 25, g.length + 1, 15, 1); + $fb(g, 0, d, 0, g.length); + d[g.length] = a.Ci(); + this.g = d; + return true; + } + break; + } + } + break; + } + } + return false; + }; + mdb(yve, "FeatureMapUtil/FeatureENotificationImpl", 627); + bcb(552, 501, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 76: 1, 153: 1, 215: 1, 1937: 1, 69: 1, 95: 1 }, R7d); + _.dl = function S7d(a, b) { + return q2d(this.c, a, b); + }; + _.el = function T7d(a, b, c) { + return x2d(this.c, a, b, c); + }; + _.fl = function U7d(a, b, c) { + return C2d(this.c, a, b, c); + }; + _.gl = function V7d() { + return this; + }; + _.hl = function W7d(a, b) { + return K2d(this.c, a, b); + }; + _.il = function X7d(a) { + return BD(J2d(this.c, this.b, a, false), 72).ak(); + }; + _.jl = function Y7d(a) { + return BD(J2d(this.c, this.b, a, false), 72).dd(); + }; + _.kl = function Z7d() { + return this.a; + }; + _.ll = function $7d(a) { + return !R2d(this.c, a); + }; + _.ml = function _7d(a, b) { + f3d(this.c, a, b); + }; + _.nl = function a8d(a) { + return g3d(this.c, a); + }; + _.ol = function b8d(a) { + s3d(this.c, a); + }; + mdb(yve, "FeatureMapUtil/FeatureFeatureMap", 552); + bcb(1259, 1, zve, c8d); + _.Wj = function d8d(a) { + return J2d(this.b, this.a, -1, a); + }; + _.fj = function e8d() { + return !R2d(this.b, this.a); + }; + _.Wb = function f8d(a) { + f3d(this.b, this.a, a); + }; + _.Xj = function g8d() { + D2d(this.b, this.a); + }; + mdb(yve, "FeatureMapUtil/FeatureValue", 1259); + var h8d, i8d, j8d, k8d, l8d; + var Q9 = odb(Iwe, "AnyType"); + bcb(666, 60, Tie, n8d); + mdb(Iwe, "InvalidDatatypeValueException", 666); + var S9 = odb(Iwe, Jwe); + var T9 = odb(Iwe, Kwe); + var U9 = odb(Iwe, Lwe); + var o8d; + var q8d; + var s8d, t8d, u8d, v8d, w8d, x8d, y8d, z8d, A8d, B8d, C8d, D8d, E8d, F8d, G8d, H8d, I8d, J8d, K8d, L8d, M8d, N8d, O8d, P8d; + bcb(830, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 843: 1 }, R8d); + _._g = function S8d(a, b, c) { + switch (a) { + case 0: + if (c) + return !this.c && (this.c = new u3d(this, 0)), this.c; + return !this.c && (this.c = new u3d(this, 0)), this.c.b; + case 1: + if (c) + return !this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153); + return (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).kl(); + case 2: + if (c) + return !this.b && (this.b = new u3d(this, 2)), this.b; + return !this.b && (this.b = new u3d(this, 2)), this.b.b; + } + return bid(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c); + }; + _.jh = function T8d(a, b, c) { + var d; + switch (b) { + case 0: + return !this.c && (this.c = new u3d(this, 0)), B2d(this.c, a, c); + case 1: + return (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 69)).mk(a, c); + case 2: + return !this.b && (this.b = new u3d(this, 2)), B2d(this.b, a, c); + } + return d = BD(XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), b), 66), d.Nj().Rj(this, Aid(this), b - aLd(this.zh()), a, c); + }; + _.lh = function U8d(a) { + switch (a) { + case 0: + return !!this.c && this.c.i != 0; + case 1: + return !(!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).dc(); + case 2: + return !!this.b && this.b.i != 0; + } + return cid(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _.sh = function V8d(a, b) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + d3d(this.c, b); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).Wb(b); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + d3d(this.b, b); + return; + } + did(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _.zh = function W8d() { + return Q8d(), s8d; + }; + _.Bh = function X8d(a) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + Uxd(this.c); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).$b(); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + Uxd(this.b); + return; + } + eid(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _.Ib = function Y8d() { + var a; + if ((this.j & 4) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (mixed: "; + Dfb(a, this.c); + a.a += ", anyAttribute: "; + Dfb(a, this.b); + a.a += ")"; + return a.a; + }; + mdb(Mwe, "AnyTypeImpl", 830); + bcb(667, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 2021: 1, 667: 1 }, _8d); + _._g = function a9d(a, b, c) { + switch (a) { + case 0: + return this.a; + case 1: + return this.b; + } + return bid(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c); + }; + _.lh = function b9d(a) { + switch (a) { + case 0: + return this.a != null; + case 1: + return this.b != null; + } + return cid(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _.sh = function c9d(a, b) { + switch (a) { + case 0: + Z8d(this, GD(b)); + return; + case 1: + $8d(this, GD(b)); + return; + } + did(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _.zh = function d9d() { + return Q8d(), F8d; + }; + _.Bh = function e9d(a) { + switch (a) { + case 0: + this.a = null; + return; + case 1: + this.b = null; + return; + } + eid(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _.Ib = function f9d() { + var a; + if ((this.j & 4) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (data: "; + Efb(a, this.a); + a.a += ", target: "; + Efb(a, this.b); + a.a += ")"; + return a.a; + }; + _.a = null; + _.b = null; + mdb(Mwe, "ProcessingInstructionImpl", 667); + bcb(668, 830, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 843: 1, 2022: 1, 668: 1 }, i9d); + _._g = function j9d(a, b, c) { + switch (a) { + case 0: + if (c) + return !this.c && (this.c = new u3d(this, 0)), this.c; + return !this.c && (this.c = new u3d(this, 0)), this.c.b; + case 1: + if (c) + return !this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153); + return (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).kl(); + case 2: + if (c) + return !this.b && (this.b = new u3d(this, 2)), this.b; + return !this.b && (this.b = new u3d(this, 2)), this.b.b; + case 3: + return !this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)); + case 4: + return j6d(this.a, (!this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)))); + case 5: + return this.a; + } + return bid(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c); + }; + _.lh = function k9d(a) { + switch (a) { + case 0: + return !!this.c && this.c.i != 0; + case 1: + return !(!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).dc(); + case 2: + return !!this.b && this.b.i != 0; + case 3: + return !this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)) != null; + case 4: + return j6d(this.a, (!this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)))) != null; + case 5: + return !!this.a; + } + return cid(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _.sh = function l9d(a, b) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + d3d(this.c, b); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).Wb(b); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + d3d(this.b, b); + return; + case 3: + h9d(this, GD(b)); + return; + case 4: + h9d(this, h6d(this.a, b)); + return; + case 5: + g9d(this, BD(b, 148)); + return; + } + did(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _.zh = function m9d() { + return Q8d(), H8d; + }; + _.Bh = function n9d(a) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + Uxd(this.c); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).$b(); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + Uxd(this.b); + return; + case 3: + !this.c && (this.c = new u3d(this, 0)); + f3d(this.c, (Q8d(), I8d), null); + return; + case 4: + h9d(this, h6d(this.a, null)); + return; + case 5: + this.a = null; + return; + } + eid(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + mdb(Mwe, "SimpleAnyTypeImpl", 668); + bcb(669, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 2023: 1, 669: 1 }, o9d); + _._g = function p9d(a, b, c) { + switch (a) { + case 0: + if (c) + return !this.a && (this.a = new u3d(this, 0)), this.a; + return !this.a && (this.a = new u3d(this, 0)), this.a.b; + case 1: + return c ? (!this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)), this.b) : (!this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)), FAd(this.b)); + case 2: + return c ? (!this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)), this.c) : (!this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)), FAd(this.c)); + case 3: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), L8d)); + case 4: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), M8d)); + case 5: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), O8d)); + case 6: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), P8d)); + } + return bid(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c); + }; + _.jh = function q9d(a, b, c) { + var d; + switch (b) { + case 0: + return !this.a && (this.a = new u3d(this, 0)), B2d(this.a, a, c); + case 1: + return !this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)), bId(this.b, a, c); + case 2: + return !this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)), bId(this.c, a, c); + case 5: + return !this.a && (this.a = new u3d(this, 0)), c7d(T2d(this.a, (Q8d(), O8d)), a, c); + } + return d = BD(XKd((this.j & 2) == 0 ? (Q8d(), K8d) : (!this.k && (this.k = new HGd()), this.k).ck(), b), 66), d.Nj().Rj(this, Aid(this), b - aLd((Q8d(), K8d)), a, c); + }; + _.lh = function r9d(a) { + switch (a) { + case 0: + return !!this.a && this.a.i != 0; + case 1: + return !!this.b && this.b.f != 0; + case 2: + return !!this.c && this.c.f != 0; + case 3: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), L8d))); + case 4: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), M8d))); + case 5: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), O8d))); + case 6: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), P8d))); + } + return cid(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _.sh = function s9d(a, b) { + switch (a) { + case 0: + !this.a && (this.a = new u3d(this, 0)); + d3d(this.a, b); + return; + case 1: + !this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)); + cId(this.b, b); + return; + case 2: + !this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)); + cId(this.c, b); + return; + case 3: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), L8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, L8d), BD(b, 14)); + return; + case 4: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), M8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, M8d), BD(b, 14)); + return; + case 5: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), O8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, O8d), BD(b, 14)); + return; + case 6: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), P8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, P8d), BD(b, 14)); + return; + } + did(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _.zh = function t9d() { + return Q8d(), K8d; + }; + _.Bh = function u9d(a) { + switch (a) { + case 0: + !this.a && (this.a = new u3d(this, 0)); + Uxd(this.a); + return; + case 1: + !this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)); + this.b.c.$b(); + return; + case 2: + !this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)); + this.c.c.$b(); + return; + case 3: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), L8d))); + return; + case 4: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), M8d))); + return; + case 5: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), O8d))); + return; + case 6: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), P8d))); + return; + } + eid(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _.Ib = function v9d() { + var a; + if ((this.j & 4) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (mixed: "; + Dfb(a, this.a); + a.a += ")"; + return a.a; + }; + mdb(Mwe, "XMLTypeDocumentRootImpl", 669); + bcb(1919, 704, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1, 2024: 1 }, U9d); + _.Ih = function V9d(a, b) { + switch (a.yj()) { + case 7: + case 8: + case 9: + case 10: + case 16: + case 22: + case 23: + case 24: + case 25: + case 26: + case 32: + case 33: + case 34: + case 36: + case 37: + case 44: + case 45: + case 50: + case 51: + case 53: + case 55: + case 56: + case 57: + case 58: + case 60: + case 61: + case 4: + return b == null ? null : fcb(b); + case 19: + case 28: + case 29: + case 35: + case 38: + case 39: + case 41: + case 46: + case 52: + case 54: + case 5: + return GD(b); + case 6: + return C9d(BD(b, 190)); + case 12: + case 47: + case 49: + case 11: + return Vmd(this, a, b); + case 13: + return b == null ? null : qgb(BD(b, 240)); + case 15: + case 14: + return b == null ? null : D9d(Edb(ED(b))); + case 17: + return E9d((Q8d(), b)); + case 18: + return E9d(b); + case 21: + case 20: + return b == null ? null : F9d(BD(b, 155).a); + case 27: + return G9d(BD(b, 190)); + case 30: + return H9d((Q8d(), BD(b, 15))); + case 31: + return H9d(BD(b, 15)); + case 40: + return K9d((Q8d(), b)); + case 42: + return I9d((Q8d(), b)); + case 43: + return I9d(b); + case 59: + case 48: + return J9d((Q8d(), b)); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + _.Jh = function W9d(a) { + var b, c, d, e, f; + switch (a.G == -1 && (a.G = (c = bKd(a), c ? HLd(c.Mh(), a) : -1)), a.G) { + case 0: + return b = new R8d(), b; + case 1: + return d = new _8d(), d; + case 2: + return e = new i9d(), e; + case 3: + return f = new o9d(), f; + default: + throw vbb(new Wdb(xte + a.zb + ute)); + } + }; + _.Kh = function X9d(a, b) { + var c, d, e, f, g, h, i, j, k, l, m, n, o2, p, q, r; + switch (a.yj()) { + case 5: + case 52: + case 4: + return b; + case 6: + return L9d(b); + case 8: + case 7: + return b == null ? null : B9d(b); + case 9: + return b == null ? null : Scb(Icb((d = Qge(b, true), d.length > 0 && (BCb(0, d.length), d.charCodeAt(0) == 43) ? d.substr(1) : d), -128, 127) << 24 >> 24); + case 10: + return b == null ? null : Scb(Icb((e = Qge(b, true), e.length > 0 && (BCb(0, e.length), e.charCodeAt(0) == 43) ? e.substr(1) : e), -128, 127) << 24 >> 24); + case 11: + return GD(Wmd(this, (Q8d(), w8d), b)); + case 12: + return GD(Wmd(this, (Q8d(), x8d), b)); + case 13: + return b == null ? null : new tgb(Qge(b, true)); + case 15: + case 14: + return M9d(b); + case 16: + return GD(Wmd(this, (Q8d(), y8d), b)); + case 17: + return N9d((Q8d(), b)); + case 18: + return N9d(b); + case 28: + case 29: + case 35: + case 38: + case 39: + case 41: + case 54: + case 19: + return Qge(b, true); + case 21: + case 20: + return O9d(b); + case 22: + return GD(Wmd(this, (Q8d(), z8d), b)); + case 23: + return GD(Wmd(this, (Q8d(), A8d), b)); + case 24: + return GD(Wmd(this, (Q8d(), B8d), b)); + case 25: + return GD(Wmd(this, (Q8d(), C8d), b)); + case 26: + return GD(Wmd(this, (Q8d(), D8d), b)); + case 27: + return P9d(b); + case 30: + return Q9d((Q8d(), b)); + case 31: + return Q9d(b); + case 32: + return b == null ? null : meb(Icb((k = Qge(b, true), k.length > 0 && (BCb(0, k.length), k.charCodeAt(0) == 43) ? k.substr(1) : k), Rie, Ohe)); + case 33: + return b == null ? null : new Ygb((l = Qge(b, true), l.length > 0 && (BCb(0, l.length), l.charCodeAt(0) == 43) ? l.substr(1) : l)); + case 34: + return b == null ? null : meb(Icb((m = Qge(b, true), m.length > 0 && (BCb(0, m.length), m.charCodeAt(0) == 43) ? m.substr(1) : m), Rie, Ohe)); + case 36: + return b == null ? null : Aeb(Jcb((n = Qge(b, true), n.length > 0 && (BCb(0, n.length), n.charCodeAt(0) == 43) ? n.substr(1) : n))); + case 37: + return b == null ? null : Aeb(Jcb((o2 = Qge(b, true), o2.length > 0 && (BCb(0, o2.length), o2.charCodeAt(0) == 43) ? o2.substr(1) : o2))); + case 40: + return T9d((Q8d(), b)); + case 42: + return R9d((Q8d(), b)); + case 43: + return R9d(b); + case 44: + return b == null ? null : new Ygb((p = Qge(b, true), p.length > 0 && (BCb(0, p.length), p.charCodeAt(0) == 43) ? p.substr(1) : p)); + case 45: + return b == null ? null : new Ygb((q = Qge(b, true), q.length > 0 && (BCb(0, q.length), q.charCodeAt(0) == 43) ? q.substr(1) : q)); + case 46: + return Qge(b, false); + case 47: + return GD(Wmd(this, (Q8d(), E8d), b)); + case 59: + case 48: + return S9d((Q8d(), b)); + case 49: + return GD(Wmd(this, (Q8d(), G8d), b)); + case 50: + return b == null ? null : Web(Icb((r = Qge(b, true), r.length > 0 && (BCb(0, r.length), r.charCodeAt(0) == 43) ? r.substr(1) : r), awe, 32767) << 16 >> 16); + case 51: + return b == null ? null : Web(Icb((f = Qge(b, true), f.length > 0 && (BCb(0, f.length), f.charCodeAt(0) == 43) ? f.substr(1) : f), awe, 32767) << 16 >> 16); + case 53: + return GD(Wmd(this, (Q8d(), J8d), b)); + case 55: + return b == null ? null : Web(Icb((g = Qge(b, true), g.length > 0 && (BCb(0, g.length), g.charCodeAt(0) == 43) ? g.substr(1) : g), awe, 32767) << 16 >> 16); + case 56: + return b == null ? null : Web(Icb((h = Qge(b, true), h.length > 0 && (BCb(0, h.length), h.charCodeAt(0) == 43) ? h.substr(1) : h), awe, 32767) << 16 >> 16); + case 57: + return b == null ? null : Aeb(Jcb((i = Qge(b, true), i.length > 0 && (BCb(0, i.length), i.charCodeAt(0) == 43) ? i.substr(1) : i))); + case 58: + return b == null ? null : Aeb(Jcb((j = Qge(b, true), j.length > 0 && (BCb(0, j.length), j.charCodeAt(0) == 43) ? j.substr(1) : j))); + case 60: + return b == null ? null : meb(Icb((c = Qge(b, true), c.length > 0 && (BCb(0, c.length), c.charCodeAt(0) == 43) ? c.substr(1) : c), Rie, Ohe)); + case 61: + return b == null ? null : meb(Icb(Qge(b, true), Rie, Ohe)); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + var w9d, x9d, y9d, z9d; + mdb(Mwe, "XMLTypeFactoryImpl", 1919); + bcb(586, 179, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1, 1945: 1, 586: 1 }, cae); + _.N = false; + _.O = false; + var Z9d = false; + mdb(Mwe, "XMLTypePackageImpl", 586); + bcb(1852, 1, { 837: 1 }, fae); + _._j = function gae() { + return Uge(), Tge; + }; + mdb(Mwe, "XMLTypePackageImpl/1", 1852); + bcb(1861, 1, nwe, hae); + _.wj = function iae(a) { + return ND(a); + }; + _.xj = function jae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/10", 1861); + bcb(1862, 1, nwe, kae); + _.wj = function lae(a) { + return ND(a); + }; + _.xj = function mae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/11", 1862); + bcb(1863, 1, nwe, nae); + _.wj = function oae(a) { + return ND(a); + }; + _.xj = function pae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/12", 1863); + bcb(1864, 1, nwe, qae); + _.wj = function rae(a) { + return LD(a); + }; + _.xj = function sae(a) { + return KC(BI, nie, 333, a, 7, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/13", 1864); + bcb(1865, 1, nwe, tae); + _.wj = function uae(a) { + return ND(a); + }; + _.xj = function vae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/14", 1865); + bcb(1866, 1, nwe, wae); + _.wj = function xae(a) { + return JD(a, 15); + }; + _.xj = function yae(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/15", 1866); + bcb(1867, 1, nwe, zae); + _.wj = function Aae(a) { + return JD(a, 15); + }; + _.xj = function Bae(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/16", 1867); + bcb(1868, 1, nwe, Cae); + _.wj = function Dae(a) { + return ND(a); + }; + _.xj = function Eae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/17", 1868); + bcb(1869, 1, nwe, Fae); + _.wj = function Gae(a) { + return JD(a, 155); + }; + _.xj = function Hae(a) { + return KC(FI, nie, 155, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/18", 1869); + bcb(1870, 1, nwe, Iae); + _.wj = function Jae(a) { + return ND(a); + }; + _.xj = function Kae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/19", 1870); + bcb(1853, 1, nwe, Lae); + _.wj = function Mae(a) { + return JD(a, 843); + }; + _.xj = function Nae(a) { + return KC(Q9, Uhe, 843, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/2", 1853); + bcb(1871, 1, nwe, Oae); + _.wj = function Pae(a) { + return ND(a); + }; + _.xj = function Qae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/20", 1871); + bcb(1872, 1, nwe, Rae); + _.wj = function Sae(a) { + return ND(a); + }; + _.xj = function Tae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/21", 1872); + bcb(1873, 1, nwe, Uae); + _.wj = function Vae(a) { + return ND(a); + }; + _.xj = function Wae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/22", 1873); + bcb(1874, 1, nwe, Xae); + _.wj = function Yae(a) { + return ND(a); + }; + _.xj = function Zae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/23", 1874); + bcb(1875, 1, nwe, $ae); + _.wj = function _ae(a) { + return JD(a, 190); + }; + _.xj = function abe(a) { + return KC(SD, nie, 190, a, 0, 2); + }; + mdb(Mwe, "XMLTypePackageImpl/24", 1875); + bcb(1876, 1, nwe, bbe); + _.wj = function cbe(a) { + return ND(a); + }; + _.xj = function dbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/25", 1876); + bcb(1877, 1, nwe, ebe); + _.wj = function fbe(a) { + return ND(a); + }; + _.xj = function gbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/26", 1877); + bcb(1878, 1, nwe, hbe); + _.wj = function ibe(a) { + return JD(a, 15); + }; + _.xj = function jbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/27", 1878); + bcb(1879, 1, nwe, kbe); + _.wj = function lbe(a) { + return JD(a, 15); + }; + _.xj = function mbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/28", 1879); + bcb(1880, 1, nwe, nbe); + _.wj = function obe(a) { + return ND(a); + }; + _.xj = function pbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/29", 1880); + bcb(1854, 1, nwe, qbe); + _.wj = function rbe(a) { + return JD(a, 667); + }; + _.xj = function sbe(a) { + return KC(S9, Uhe, 2021, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/3", 1854); + bcb(1881, 1, nwe, tbe); + _.wj = function ube(a) { + return JD(a, 19); + }; + _.xj = function vbe(a) { + return KC(JI, nie, 19, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/30", 1881); + bcb(1882, 1, nwe, wbe); + _.wj = function xbe(a) { + return ND(a); + }; + _.xj = function ybe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/31", 1882); + bcb(1883, 1, nwe, zbe); + _.wj = function Abe(a) { + return JD(a, 162); + }; + _.xj = function Bbe(a) { + return KC(MI, nie, 162, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/32", 1883); + bcb(1884, 1, nwe, Cbe); + _.wj = function Dbe(a) { + return ND(a); + }; + _.xj = function Ebe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/33", 1884); + bcb(1885, 1, nwe, Fbe); + _.wj = function Gbe(a) { + return ND(a); + }; + _.xj = function Hbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/34", 1885); + bcb(1886, 1, nwe, Ibe); + _.wj = function Jbe(a) { + return ND(a); + }; + _.xj = function Kbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/35", 1886); + bcb(1887, 1, nwe, Lbe); + _.wj = function Mbe(a) { + return ND(a); + }; + _.xj = function Nbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/36", 1887); + bcb(1888, 1, nwe, Obe); + _.wj = function Pbe(a) { + return JD(a, 15); + }; + _.xj = function Qbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/37", 1888); + bcb(1889, 1, nwe, Rbe); + _.wj = function Sbe(a) { + return JD(a, 15); + }; + _.xj = function Tbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/38", 1889); + bcb(1890, 1, nwe, Ube); + _.wj = function Vbe(a) { + return ND(a); + }; + _.xj = function Wbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/39", 1890); + bcb(1855, 1, nwe, Xbe); + _.wj = function Ybe(a) { + return JD(a, 668); + }; + _.xj = function Zbe(a) { + return KC(T9, Uhe, 2022, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/4", 1855); + bcb(1891, 1, nwe, $be); + _.wj = function _be(a) { + return ND(a); + }; + _.xj = function ace(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/40", 1891); + bcb(1892, 1, nwe, bce); + _.wj = function cce(a) { + return ND(a); + }; + _.xj = function dce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/41", 1892); + bcb(1893, 1, nwe, ece); + _.wj = function fce(a) { + return ND(a); + }; + _.xj = function gce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/42", 1893); + bcb(1894, 1, nwe, hce); + _.wj = function ice(a) { + return ND(a); + }; + _.xj = function jce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/43", 1894); + bcb(1895, 1, nwe, kce); + _.wj = function lce(a) { + return ND(a); + }; + _.xj = function mce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/44", 1895); + bcb(1896, 1, nwe, nce); + _.wj = function oce(a) { + return JD(a, 184); + }; + _.xj = function pce(a) { + return KC(UI, nie, 184, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/45", 1896); + bcb(1897, 1, nwe, qce); + _.wj = function rce(a) { + return ND(a); + }; + _.xj = function sce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/46", 1897); + bcb(1898, 1, nwe, tce); + _.wj = function uce(a) { + return ND(a); + }; + _.xj = function vce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/47", 1898); + bcb(1899, 1, nwe, wce); + _.wj = function xce(a) { + return ND(a); + }; + _.xj = function yce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/48", 1899); + bcb(nje, 1, nwe, zce); + _.wj = function Ace(a) { + return JD(a, 184); + }; + _.xj = function Bce(a) { + return KC(UI, nie, 184, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/49", nje); + bcb(1856, 1, nwe, Cce); + _.wj = function Dce(a) { + return JD(a, 669); + }; + _.xj = function Ece(a) { + return KC(U9, Uhe, 2023, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/5", 1856); + bcb(1901, 1, nwe, Fce); + _.wj = function Gce(a) { + return JD(a, 162); + }; + _.xj = function Hce(a) { + return KC(MI, nie, 162, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/50", 1901); + bcb(1902, 1, nwe, Ice); + _.wj = function Jce(a) { + return ND(a); + }; + _.xj = function Kce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/51", 1902); + bcb(1903, 1, nwe, Lce); + _.wj = function Mce(a) { + return JD(a, 19); + }; + _.xj = function Nce(a) { + return KC(JI, nie, 19, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/52", 1903); + bcb(1857, 1, nwe, Oce); + _.wj = function Pce(a) { + return ND(a); + }; + _.xj = function Qce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/6", 1857); + bcb(1858, 1, nwe, Rce); + _.wj = function Sce(a) { + return JD(a, 190); + }; + _.xj = function Tce(a) { + return KC(SD, nie, 190, a, 0, 2); + }; + mdb(Mwe, "XMLTypePackageImpl/7", 1858); + bcb(1859, 1, nwe, Uce); + _.wj = function Vce(a) { + return KD(a); + }; + _.xj = function Wce(a) { + return KC(wI, nie, 476, a, 8, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/8", 1859); + bcb(1860, 1, nwe, Xce); + _.wj = function Yce(a) { + return JD(a, 217); + }; + _.xj = function Zce(a) { + return KC(xI, nie, 217, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/9", 1860); + var $ce, _ce; + var fde, gde; + var kde; + bcb(50, 60, Tie, mde); + mdb(kxe, "RegEx/ParseException", 50); + bcb(820, 1, {}, ude); + _.sl = function vde(a) { + return a < this.j && bfb(this.i, a) == 63; + }; + _.tl = function wde() { + var a, b, c, d, e; + if (this.c != 10) + throw vbb(new mde(tvd((h0d(), uue)))); + a = this.a; + switch (a) { + case 101: + a = 27; + break; + case 102: + a = 12; + break; + case 110: + a = 10; + break; + case 114: + a = 13; + break; + case 116: + a = 9; + break; + case 120: + nde(this); + if (this.c != 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + if (this.a == 123) { + e = 0; + c = 0; + do { + nde(this); + if (this.c != 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + if ((e = yde(this.a)) < 0) + break; + if (c > c * 16) + throw vbb(new mde(tvd((h0d(), Uue)))); + c = c * 16 + e; + } while (true); + if (this.a != 125) + throw vbb(new mde(tvd((h0d(), Vue)))); + if (c > lxe) + throw vbb(new mde(tvd((h0d(), Wue)))); + a = c; + } else { + e = 0; + if (this.c != 0 || (e = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + c = e; + nde(this); + if (this.c != 0 || (e = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + c = c * 16 + e; + a = c; + } + break; + case 117: + d = 0; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + a = b; + break; + case 118: + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + if (b > lxe) + throw vbb(new mde(tvd((h0d(), "parser.descappe.4")))); + a = b; + break; + case 65: + case 90: + case 122: + throw vbb(new mde(tvd((h0d(), Xue)))); + } + return a; + }; + _.ul = function xde(a) { + var b, c; + switch (a) { + case 100: + c = (this.e & 32) == 32 ? Kfe("Nd", true) : (wfe(), cfe); + break; + case 68: + c = (this.e & 32) == 32 ? Kfe("Nd", false) : (wfe(), jfe); + break; + case 119: + c = (this.e & 32) == 32 ? Kfe("IsWord", true) : (wfe(), sfe); + break; + case 87: + c = (this.e & 32) == 32 ? Kfe("IsWord", false) : (wfe(), lfe); + break; + case 115: + c = (this.e & 32) == 32 ? Kfe("IsSpace", true) : (wfe(), nfe); + break; + case 83: + c = (this.e & 32) == 32 ? Kfe("IsSpace", false) : (wfe(), kfe); + break; + default: + throw vbb(new hz((b = a, mxe + b.toString(16)))); + } + return c; + }; + _.vl = function zde(a) { + var b, c, d, e, f, g, h, i, j, k, l, m; + this.b = 1; + nde(this); + b = null; + if (this.c == 0 && this.a == 94) { + nde(this); + if (a) { + k = (wfe(), wfe(), new $fe(5)); + } else { + b = (wfe(), wfe(), new $fe(4)); + Ufe(b, 0, lxe); + k = new $fe(4); + } + } else { + k = (wfe(), wfe(), new $fe(4)); + } + e = true; + while ((m = this.c) != 1) { + if (m == 0 && this.a == 93 && !e) + break; + e = false; + c = this.a; + d = false; + if (m == 10) { + switch (c) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + Xfe(k, this.ul(c)); + d = true; + break; + case 105: + case 73: + case 99: + case 67: + c = this.Ll(k, c); + c < 0 && (d = true); + break; + case 112: + case 80: + l = tde(this, c); + if (!l) + throw vbb(new mde(tvd((h0d(), Iue)))); + Xfe(k, l); + d = true; + break; + default: + c = this.tl(); + } + } else if (m == 20) { + g = gfb(this.i, 58, this.d); + if (g < 0) + throw vbb(new mde(tvd((h0d(), Jue)))); + h = true; + if (bfb(this.i, this.d) == 94) { + ++this.d; + h = false; + } + f = qfb(this.i, this.d, g); + i = Lfe(f, h, (this.e & 512) == 512); + if (!i) + throw vbb(new mde(tvd((h0d(), Lue)))); + Xfe(k, i); + d = true; + if (g + 1 >= this.j || bfb(this.i, g + 1) != 93) + throw vbb(new mde(tvd((h0d(), Jue)))); + this.d = g + 2; + } + nde(this); + if (!d) { + if (this.c != 0 || this.a != 45) { + Ufe(k, c, c); + } else { + nde(this); + if ((m = this.c) == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + if (m == 0 && this.a == 93) { + Ufe(k, c, c); + Ufe(k, 45, 45); + } else { + j = this.a; + m == 10 && (j = this.tl()); + nde(this); + Ufe(k, c, j); + } + } + } + (this.e & zte) == zte && this.c == 0 && this.a == 44 && nde(this); + } + if (this.c == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + if (b) { + Zfe(b, k); + k = b; + } + Yfe(k); + Vfe(k); + this.b = 0; + nde(this); + return k; + }; + _.wl = function Ade() { + var a, b, c, d; + c = this.vl(false); + while ((d = this.c) != 7) { + a = this.a; + if (d == 0 && (a == 45 || a == 38) || d == 4) { + nde(this); + if (this.c != 9) + throw vbb(new mde(tvd((h0d(), Que)))); + b = this.vl(false); + if (d == 4) + Xfe(c, b); + else if (a == 45) + Zfe(c, b); + else if (a == 38) + Wfe(c, b); + else + throw vbb(new hz("ASSERT")); + } else { + throw vbb(new mde(tvd((h0d(), Rue)))); + } + } + nde(this); + return c; + }; + _.xl = function Bde() { + var a, b; + a = this.a - 48; + b = (wfe(), wfe(), new Hge(12, null, a)); + !this.g && (this.g = new Wvb()); + Tvb(this.g, new cge(a)); + nde(this); + return b; + }; + _.yl = function Cde() { + nde(this); + return wfe(), ofe; + }; + _.zl = function Dde() { + nde(this); + return wfe(), mfe; + }; + _.Al = function Ede() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Bl = function Fde() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Cl = function Gde() { + nde(this); + return Ife(); + }; + _.Dl = function Hde() { + nde(this); + return wfe(), qfe; + }; + _.El = function Ide() { + nde(this); + return wfe(), tfe; + }; + _.Fl = function Jde() { + var a; + if (this.d >= this.j || ((a = bfb(this.i, this.d++)) & 65504) != 64) + throw vbb(new mde(tvd((h0d(), Eue)))); + nde(this); + return wfe(), wfe(), new ige(0, a - 64); + }; + _.Gl = function Kde() { + nde(this); + return Jfe(); + }; + _.Hl = function Lde() { + nde(this); + return wfe(), ufe; + }; + _.Il = function Mde() { + var a; + a = (wfe(), wfe(), new ige(0, 105)); + nde(this); + return a; + }; + _.Jl = function Nde() { + nde(this); + return wfe(), rfe; + }; + _.Kl = function Ode() { + nde(this); + return wfe(), pfe; + }; + _.Ll = function Pde(a, b) { + return this.tl(); + }; + _.Ml = function Qde() { + nde(this); + return wfe(), hfe; + }; + _.Nl = function Rde() { + var a, b, c, d, e; + if (this.d + 1 >= this.j) + throw vbb(new mde(tvd((h0d(), Bue)))); + d = -1; + b = null; + a = bfb(this.i, this.d); + if (49 <= a && a <= 57) { + d = a - 48; + !this.g && (this.g = new Wvb()); + Tvb(this.g, new cge(d)); + ++this.d; + if (bfb(this.i, this.d) != 41) + throw vbb(new mde(tvd((h0d(), yue)))); + ++this.d; + } else { + a == 63 && --this.d; + nde(this); + b = qde(this); + switch (b.e) { + case 20: + case 21: + case 22: + case 23: + break; + case 8: + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + break; + default: + throw vbb(new mde(tvd((h0d(), Cue)))); + } + } + nde(this); + e = rde(this); + c = null; + if (e.e == 2) { + if (e.em() != 2) + throw vbb(new mde(tvd((h0d(), Due)))); + c = e.am(1); + e = e.am(0); + } + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return wfe(), wfe(), new vge(d, b, e, c); + }; + _.Ol = function Sde() { + nde(this); + return wfe(), ife; + }; + _.Pl = function Tde() { + var a; + nde(this); + a = Cfe(24, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _.Ql = function Ude() { + var a; + nde(this); + a = Cfe(20, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _.Rl = function Vde() { + var a; + nde(this); + a = Cfe(22, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _.Sl = function Wde() { + var a, b, c, d, e; + a = 0; + c = 0; + b = -1; + while (this.d < this.j) { + b = bfb(this.i, this.d); + e = Uee(b); + if (e == 0) + break; + a |= e; + ++this.d; + } + if (this.d >= this.j) + throw vbb(new mde(tvd((h0d(), zue)))); + if (b == 45) { + ++this.d; + while (this.d < this.j) { + b = bfb(this.i, this.d); + e = Uee(b); + if (e == 0) + break; + c |= e; + ++this.d; + } + if (this.d >= this.j) + throw vbb(new mde(tvd((h0d(), zue)))); + } + if (b == 58) { + ++this.d; + nde(this); + d = Dfe(rde(this), a, c); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + } else if (b == 41) { + ++this.d; + nde(this); + d = Dfe(rde(this), a, c); + } else + throw vbb(new mde(tvd((h0d(), Aue)))); + return d; + }; + _.Tl = function Xde() { + var a; + nde(this); + a = Cfe(21, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _.Ul = function Yde() { + var a; + nde(this); + a = Cfe(23, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _.Vl = function Zde() { + var a, b; + nde(this); + a = this.f++; + b = Efe(rde(this), a); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return b; + }; + _.Wl = function $de() { + var a; + nde(this); + a = Efe(rde(this), 0); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _.Xl = function _de(a) { + nde(this); + if (this.c == 5) { + nde(this); + return Bfe(a, (wfe(), wfe(), new lge(9, a))); + } else + return Bfe(a, (wfe(), wfe(), new lge(3, a))); + }; + _.Yl = function aee(a) { + var b; + nde(this); + b = (wfe(), wfe(), new Lge(2)); + if (this.c == 5) { + nde(this); + Kge(b, ffe); + Kge(b, a); + } else { + Kge(b, a); + Kge(b, ffe); + } + return b; + }; + _.Zl = function bee(a) { + nde(this); + if (this.c == 5) { + nde(this); + return wfe(), wfe(), new lge(9, a); + } else + return wfe(), wfe(), new lge(3, a); + }; + _.a = 0; + _.b = 0; + _.c = 0; + _.d = 0; + _.e = 0; + _.f = 1; + _.g = null; + _.j = 0; + mdb(kxe, "RegEx/RegexParser", 820); + bcb(1824, 820, {}, hee); + _.sl = function iee(a) { + return false; + }; + _.tl = function jee() { + return eee(this); + }; + _.ul = function lee(a) { + return fee(a); + }; + _.vl = function mee(a) { + return gee(this); + }; + _.wl = function nee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.xl = function oee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.yl = function pee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.zl = function qee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Al = function ree() { + nde(this); + return fee(67); + }; + _.Bl = function see() { + nde(this); + return fee(73); + }; + _.Cl = function tee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Dl = function uee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.El = function vee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Fl = function wee() { + nde(this); + return fee(99); + }; + _.Gl = function xee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Hl = function yee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Il = function zee() { + nde(this); + return fee(105); + }; + _.Jl = function Aee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Kl = function Bee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Ll = function Cee(a, b) { + return Xfe(a, fee(b)), -1; + }; + _.Ml = function Dee() { + nde(this); + return wfe(), wfe(), new ige(0, 94); + }; + _.Nl = function Eee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Ol = function Fee() { + nde(this); + return wfe(), wfe(), new ige(0, 36); + }; + _.Pl = function Gee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Ql = function Hee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Rl = function Iee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Sl = function Jee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Tl = function Kee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Ul = function Lee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Vl = function Mee() { + var a; + nde(this); + a = Efe(rde(this), 0); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _.Wl = function Nee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _.Xl = function Oee(a) { + nde(this); + return Bfe(a, (wfe(), wfe(), new lge(3, a))); + }; + _.Yl = function Pee(a) { + var b; + nde(this); + b = (wfe(), wfe(), new Lge(2)); + Kge(b, a); + Kge(b, ffe); + return b; + }; + _.Zl = function Qee(a) { + nde(this); + return wfe(), wfe(), new lge(3, a); + }; + var cee = null, dee = null; + mdb(kxe, "RegEx/ParserForXMLSchema", 1824); + bcb(117, 1, yxe, xfe); + _.$l = function yfe(a) { + throw vbb(new hz("Not supported.")); + }; + _._l = function Gfe() { + return -1; + }; + _.am = function Hfe(a) { + return null; + }; + _.bm = function Mfe() { + return null; + }; + _.cm = function Pfe(a) { + }; + _.dm = function Qfe(a) { + }; + _.em = function Rfe() { + return 0; + }; + _.Ib = function Sfe() { + return this.fm(0); + }; + _.fm = function Tfe(a) { + return this.e == 11 ? "." : ""; + }; + _.e = 0; + var Yee, Zee, $ee, _ee, afe, bfe = null, cfe, dfe = null, efe, ffe, gfe = null, hfe, ife, jfe, kfe, lfe, mfe, nfe, ofe, pfe, qfe, rfe, sfe, tfe, ufe; + var lbb = mdb(kxe, "RegEx/Token", 117); + bcb(136, 117, { 3: 1, 136: 1, 117: 1 }, $fe); + _.fm = function bge(a) { + var b, c, d; + if (this.e == 4) { + if (this == efe) + c = "."; + else if (this == cfe) + c = "\\d"; + else if (this == sfe) + c = "\\w"; + else if (this == nfe) + c = "\\s"; + else { + d = new Hfb(); + d.a += "["; + for (b = 0; b < this.b.length; b += 2) { + (a & zte) != 0 && b > 0 && (d.a += ",", d); + if (this.b[b] === this.b[b + 1]) { + Efb(d, age(this.b[b])); + } else { + Efb(d, age(this.b[b])); + d.a += "-"; + Efb(d, age(this.b[b + 1])); + } + } + d.a += "]"; + c = d.a; + } + } else { + if (this == jfe) + c = "\\D"; + else if (this == lfe) + c = "\\W"; + else if (this == kfe) + c = "\\S"; + else { + d = new Hfb(); + d.a += "[^"; + for (b = 0; b < this.b.length; b += 2) { + (a & zte) != 0 && b > 0 && (d.a += ",", d); + if (this.b[b] === this.b[b + 1]) { + Efb(d, age(this.b[b])); + } else { + Efb(d, age(this.b[b])); + d.a += "-"; + Efb(d, age(this.b[b + 1])); + } + } + d.a += "]"; + c = d.a; + } + } + return c; + }; + _.a = false; + _.c = false; + mdb(kxe, "RegEx/RangeToken", 136); + bcb(584, 1, { 584: 1 }, cge); + _.a = 0; + mdb(kxe, "RegEx/RegexParser/ReferencePosition", 584); + bcb(583, 1, { 3: 1, 583: 1 }, ege); + _.Fb = function fge(a) { + var b; + if (a == null) + return false; + if (!JD(a, 583)) + return false; + b = BD(a, 583); + return dfb(this.b, b.b) && this.a == b.a; + }; + _.Hb = function gge() { + return LCb(this.b + "/" + See(this.a)); + }; + _.Ib = function hge() { + return this.c.fm(this.a); + }; + _.a = 0; + mdb(kxe, "RegEx/RegularExpression", 583); + bcb(223, 117, yxe, ige); + _._l = function jge() { + return this.a; + }; + _.fm = function kge(a) { + var b, c, d; + switch (this.e) { + case 0: + switch (this.a) { + case 124: + case 42: + case 43: + case 63: + case 40: + case 41: + case 46: + case 91: + case 123: + case 92: + d = "\\" + HD(this.a & aje); + break; + case 12: + d = "\\f"; + break; + case 10: + d = "\\n"; + break; + case 13: + d = "\\r"; + break; + case 9: + d = "\\t"; + break; + case 27: + d = "\\e"; + break; + default: + if (this.a >= Tje) { + c = (b = this.a >>> 0, "0" + b.toString(16)); + d = "\\v" + qfb(c, c.length - 6, c.length); + } else + d = "" + HD(this.a & aje); + } + break; + case 8: + this == hfe || this == ife ? d = "" + HD(this.a & aje) : d = "\\" + HD(this.a & aje); + break; + default: + d = null; + } + return d; + }; + _.a = 0; + mdb(kxe, "RegEx/Token/CharToken", 223); + bcb(309, 117, yxe, lge); + _.am = function mge(a) { + return this.a; + }; + _.cm = function nge(a) { + this.b = a; + }; + _.dm = function oge(a) { + this.c = a; + }; + _.em = function pge() { + return 1; + }; + _.fm = function qge(a) { + var b; + if (this.e == 3) { + if (this.c < 0 && this.b < 0) { + b = this.a.fm(a) + "*"; + } else if (this.c == this.b) { + b = this.a.fm(a) + "{" + this.c + "}"; + } else if (this.c >= 0 && this.b >= 0) { + b = this.a.fm(a) + "{" + this.c + "," + this.b + "}"; + } else if (this.c >= 0 && this.b < 0) { + b = this.a.fm(a) + "{" + this.c + ",}"; + } else + throw vbb(new hz("Token#toString(): CLOSURE " + this.c + She + this.b)); + } else { + if (this.c < 0 && this.b < 0) { + b = this.a.fm(a) + "*?"; + } else if (this.c == this.b) { + b = this.a.fm(a) + "{" + this.c + "}?"; + } else if (this.c >= 0 && this.b >= 0) { + b = this.a.fm(a) + "{" + this.c + "," + this.b + "}?"; + } else if (this.c >= 0 && this.b < 0) { + b = this.a.fm(a) + "{" + this.c + ",}?"; + } else + throw vbb(new hz("Token#toString(): NONGREEDYCLOSURE " + this.c + She + this.b)); + } + return b; + }; + _.b = 0; + _.c = 0; + mdb(kxe, "RegEx/Token/ClosureToken", 309); + bcb(821, 117, yxe, rge); + _.am = function sge(a) { + return a == 0 ? this.a : this.b; + }; + _.em = function tge() { + return 2; + }; + _.fm = function uge(a) { + var b; + this.b.e == 3 && this.b.am(0) == this.a ? b = this.a.fm(a) + "+" : this.b.e == 9 && this.b.am(0) == this.a ? b = this.a.fm(a) + "+?" : b = this.a.fm(a) + ("" + this.b.fm(a)); + return b; + }; + mdb(kxe, "RegEx/Token/ConcatToken", 821); + bcb(1822, 117, yxe, vge); + _.am = function wge(a) { + if (a == 0) + return this.d; + if (a == 1) + return this.b; + throw vbb(new hz("Internal Error: " + a)); + }; + _.em = function xge() { + return !this.b ? 1 : 2; + }; + _.fm = function yge(a) { + var b; + this.c > 0 ? b = "(?(" + this.c + ")" : this.a.e == 8 ? b = "(?(" + this.a + ")" : b = "(?" + this.a; + !this.b ? b += this.d + ")" : b += this.d + "|" + this.b + ")"; + return b; + }; + _.c = 0; + mdb(kxe, "RegEx/Token/ConditionToken", 1822); + bcb(1823, 117, yxe, zge); + _.am = function Age(a) { + return this.b; + }; + _.em = function Bge() { + return 1; + }; + _.fm = function Cge(a) { + return "(?" + (this.a == 0 ? "" : See(this.a)) + (this.c == 0 ? "" : See(this.c)) + ":" + this.b.fm(a) + ")"; + }; + _.a = 0; + _.c = 0; + mdb(kxe, "RegEx/Token/ModifierToken", 1823); + bcb(822, 117, yxe, Dge); + _.am = function Ege(a) { + return this.a; + }; + _.em = function Fge() { + return 1; + }; + _.fm = function Gge(a) { + var b; + b = null; + switch (this.e) { + case 6: + this.b == 0 ? b = "(?:" + this.a.fm(a) + ")" : b = "(" + this.a.fm(a) + ")"; + break; + case 20: + b = "(?=" + this.a.fm(a) + ")"; + break; + case 21: + b = "(?!" + this.a.fm(a) + ")"; + break; + case 22: + b = "(?<=" + this.a.fm(a) + ")"; + break; + case 23: + b = "(?" + this.a.fm(a) + ")"; + } + return b; + }; + _.b = 0; + mdb(kxe, "RegEx/Token/ParenToken", 822); + bcb(521, 117, { 3: 1, 117: 1, 521: 1 }, Hge); + _.bm = function Ige() { + return this.b; + }; + _.fm = function Jge(a) { + return this.e == 12 ? "\\" + this.a : Wee(this.b); + }; + _.a = 0; + mdb(kxe, "RegEx/Token/StringToken", 521); + bcb(465, 117, yxe, Lge); + _.$l = function Mge(a) { + Kge(this, a); + }; + _.am = function Nge(a) { + return BD(Uvb(this.a, a), 117); + }; + _.em = function Oge() { + return !this.a ? 0 : this.a.a.c.length; + }; + _.fm = function Pge(a) { + var b, c, d, e, f; + if (this.e == 1) { + if (this.a.a.c.length == 2) { + b = BD(Uvb(this.a, 0), 117); + c = BD(Uvb(this.a, 1), 117); + c.e == 3 && c.am(0) == b ? e = b.fm(a) + "+" : c.e == 9 && c.am(0) == b ? e = b.fm(a) + "+?" : e = b.fm(a) + ("" + c.fm(a)); + } else { + f = new Hfb(); + for (d = 0; d < this.a.a.c.length; d++) { + Efb(f, BD(Uvb(this.a, d), 117).fm(a)); + } + e = f.a; + } + return e; + } + if (this.a.a.c.length == 2 && BD(Uvb(this.a, 1), 117).e == 7) { + e = BD(Uvb(this.a, 0), 117).fm(a) + "?"; + } else if (this.a.a.c.length == 2 && BD(Uvb(this.a, 0), 117).e == 7) { + e = BD(Uvb(this.a, 1), 117).fm(a) + "??"; + } else { + f = new Hfb(); + Efb(f, BD(Uvb(this.a, 0), 117).fm(a)); + for (d = 1; d < this.a.a.c.length; d++) { + f.a += "|"; + Efb(f, BD(Uvb(this.a, d), 117).fm(a)); + } + e = f.a; + } + return e; + }; + mdb(kxe, "RegEx/Token/UnionToken", 465); + bcb(518, 1, { 592: 1 }, Rge); + _.Ib = function Sge() { + return this.a.b; + }; + mdb(zxe, "XMLTypeUtil/PatternMatcherImpl", 518); + bcb(1622, 1381, {}, Vge); + var Tge; + mdb(zxe, "XMLTypeValidator", 1622); + bcb(264, 1, vie, Yge); + _.Jc = function Zge(a) { + reb(this, a); + }; + _.Kc = function $ge() { + return (this.b - this.a) * this.c < 0 ? Wge : new she(this); + }; + _.a = 0; + _.b = 0; + _.c = 0; + var Wge; + mdb(Bxe, "ExclusiveRange", 264); + bcb(1068, 1, jie, dhe); + _.Rb = function ehe(a) { + BD(a, 19); + _ge(); + }; + _.Nb = function fhe(a) { + Rrb(this, a); + }; + _.Pb = function ihe() { + return ahe(); + }; + _.Ub = function khe() { + return bhe(); + }; + _.Wb = function nhe(a) { + BD(a, 19); + che(); + }; + _.Ob = function ghe() { + return false; + }; + _.Sb = function hhe() { + return false; + }; + _.Tb = function jhe() { + return -1; + }; + _.Vb = function lhe() { + return -1; + }; + _.Qb = function mhe() { + throw vbb(new cgb(Exe)); + }; + mdb(Bxe, "ExclusiveRange/1", 1068); + bcb(254, 1, jie, she); + _.Rb = function the(a) { + BD(a, 19); + ohe(); + }; + _.Nb = function uhe(a) { + Rrb(this, a); + }; + _.Pb = function xhe() { + return phe(this); + }; + _.Ub = function zhe() { + return qhe(this); + }; + _.Wb = function Che(a) { + BD(a, 19); + rhe(); + }; + _.Ob = function vhe() { + return this.c.c < 0 ? this.a >= this.c.b : this.a <= this.c.b; + }; + _.Sb = function whe() { + return this.b > 0; + }; + _.Tb = function yhe() { + return this.b; + }; + _.Vb = function Ahe() { + return this.b - 1; + }; + _.Qb = function Bhe() { + throw vbb(new cgb(Exe)); + }; + _.a = 0; + _.b = 0; + mdb(Bxe, "ExclusiveRange/RangeIterator", 254); + var TD = pdb(Fve, "C"); + var WD = pdb(Ive, "I"); + var sbb = pdb(Khe, "Z"); + var XD = pdb(Jve, "J"); + var SD = pdb(Eve, "B"); + var UD = pdb(Gve, "D"); + var VD = pdb(Hve, "F"); + var rbb = pdb(Kve, "S"); + var h1 = odb("org.eclipse.elk.core.labels", "ILabelManager"); + var O4 = odb(Tte, "DiagnosticChain"); + var u8 = odb(pwe, "ResourceSet"); + var V4 = mdb(Tte, "InvocationTargetException", null); + var Ihe = (Az(), Dz); + var gwtOnLoad = gwtOnLoad = Zbb; + Xbb(hcb); + $bb("permProps", [[[Fxe, Gxe], [Hxe, "gecko1_8"]], [[Fxe, Gxe], [Hxe, "ie10"]], [[Fxe, Gxe], [Hxe, "ie8"]], [[Fxe, Gxe], [Hxe, "ie9"]], [[Fxe, Gxe], [Hxe, "safari"]]]); + gwtOnLoad(null, "elk", null); + }).call(this); + }).call(this, typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, {}], 3: [function(require2, module2, exports2) { + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _possibleConstructorReturn(self2, call) { + if (!self2) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === "object" || typeof call === "function") ? call : self2; + } + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); + if (superClass) + Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + } + var ELK2 = require2("./elk-api.js").default; + var ELKNode = function(_ELK) { + _inherits(ELKNode2, _ELK); + function ELKNode2() { + var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + _classCallCheck(this, ELKNode2); + var optionsClone = Object.assign({}, options); + var workerThreadsExist = false; + try { + require2.resolve("web-worker"); + workerThreadsExist = true; + } catch (e) { + } + if (options.workerUrl) { + if (workerThreadsExist) { + var Worker2 = require2("web-worker"); + optionsClone.workerFactory = function(url) { + return new Worker2(url); + }; + } else { + console.warn("Web worker requested but 'web-worker' package not installed. \nConsider installing the package or pass your own 'workerFactory' to ELK's constructor.\n... Falling back to non-web worker version."); + } + } + if (!optionsClone.workerFactory) { + var _require = require2("./elk-worker.min.js"), _Worker = _require.Worker; + optionsClone.workerFactory = function(url) { + return new _Worker(url); + }; + } + return _possibleConstructorReturn(this, (ELKNode2.__proto__ || Object.getPrototypeOf(ELKNode2)).call(this, optionsClone)); + } + return ELKNode2; + }(ELK2); + Object.defineProperty(module2.exports, "__esModule", { + value: true + }); + module2.exports = ELKNode; + ELKNode.default = ELKNode; + }, { "./elk-api.js": 1, "./elk-worker.min.js": 2, "web-worker": 4 }], 4: [function(require2, module2, exports2) { + module2.exports = Worker; + }, {}] }, {}, [3])(3); + }); +})(elk_bundled); +var elk_bundledExports = elk_bundled.exports; +const ELK = /* @__PURE__ */ getDefaultExportFromCjs(elk_bundledExports); +const elk = new ELK(); +let portPos = {}; +const conf = {}; +let nodeDb = {}; +const addVertices = async function(vert, svgId, root, doc, diagObj, parentLookupDb, graph) { + const svg = root.select(`[id="${svgId}"]`); + const nodes = svg.insert("g").attr("class", "nodes"); + const keys = Object.keys(vert); + await Promise.all( + keys.map(async function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles2 = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + const labelData = { width: 0, height: 0 }; + const ports = [ + { + id: vertex.id + "-west", + layoutOptions: { + "port.side": "WEST" + } + }, + { + id: vertex.id + "-east", + layoutOptions: { + "port.side": "EAST" + } + }, + { + id: vertex.id + "-south", + layoutOptions: { + "port.side": "SOUTH" + } + }, + { + id: vertex.id + "-north", + layoutOptions: { + "port.side": "NORTH" + } + } + ]; + let radious = 0; + let _shape = ""; + let layoutOptions = {}; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + layoutOptions = { + portConstraints: "FIXED_SIDE" + }; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const node = { + labelStyle: styles2.labelStyle, + shape: _shape, + labelText: vertexText, + labelType: vertex.labelType, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: getConfig().flowchart.padding + }; + let boundingBox; + let nodeEl; + if (node.type !== "group") { + nodeEl = await insertNode(nodes, node, vertex.dir); + boundingBox = nodeEl.node().getBBox(); + } else { + doc.createElementNS("http://www.w3.org/2000/svg", "text"); + const { shapeSvg, bbox } = await labelHelper(nodes, node, void 0, true); + labelData.width = bbox.width; + labelData.wrappingWidth = getConfig().flowchart.wrappingWidth; + labelData.height = bbox.height; + labelData.labelNode = shapeSvg.node(); + node.labelData = labelData; + } + const data = { + id: vertex.id, + ports: vertex.type === "diamond" ? ports : [], + // labelStyle: styles.labelStyle, + // shape: _shape, + layoutOptions, + labelText: vertexText, + labelData, + // labels: [{ text: vertexText }], + // rx: radius, + // ry: radius, + // class: classStr, + // style: styles.style, + // link: vertex.link, + // linkTarget: vertex.linkTarget, + // tooltip: diagObj.db.getTooltip(vertex.id) || '', + domId: diagObj.db.lookUpDomId(vertex.id), + // haveCallback: vertex.haveCallback, + width: boundingBox == null ? void 0 : boundingBox.width, + height: boundingBox == null ? void 0 : boundingBox.height, + // dir: vertex.dir, + type: vertex.type, + // props: vertex.props, + // padding: getConfig().flowchart.padding, + // boundingBox, + el: nodeEl, + parent: parentLookupDb.parentById[vertex.id] + }; + nodeDb[node.id] = data; + }) + ); + return graph; +}; +const getNextPosition = (position, edgeDirection, graphDirection) => { + const portPos2 = { + TB: { + in: { + north: "north" + }, + out: { + south: "west", + west: "east", + east: "south" + } + }, + LR: { + in: { + west: "west" + }, + out: { + east: "south", + south: "north", + north: "east" + } + }, + RL: { + in: { + east: "east" + }, + out: { + west: "north", + north: "south", + south: "west" + } + }, + BT: { + in: { + south: "south" + }, + out: { + north: "east", + east: "west", + west: "north" + } + } + }; + portPos2.TD = portPos2.TB; + log.info("abc88", graphDirection, edgeDirection, position); + return portPos2[graphDirection][edgeDirection][position]; +}; +const getNextPort = (node, edgeDirection, graphDirection) => { + log.info("getNextPort abc88", { node, edgeDirection, graphDirection }); + if (!portPos[node]) { + switch (graphDirection) { + case "TB": + case "TD": + portPos[node] = { + inPosition: "north", + outPosition: "south" + }; + break; + case "BT": + portPos[node] = { + inPosition: "south", + outPosition: "north" + }; + break; + case "RL": + portPos[node] = { + inPosition: "east", + outPosition: "west" + }; + break; + case "LR": + portPos[node] = { + inPosition: "west", + outPosition: "east" + }; + break; + } + } + const result = edgeDirection === "in" ? portPos[node].inPosition : portPos[node].outPosition; + if (edgeDirection === "in") { + portPos[node].inPosition = getNextPosition( + portPos[node].inPosition, + edgeDirection, + graphDirection + ); + } else { + portPos[node].outPosition = getNextPosition( + portPos[node].outPosition, + edgeDirection, + graphDirection + ); + } + return result; +}; +const getEdgeStartEndPoint = (edge, dir) => { + let source = edge.start; + let target = edge.end; + const sourceId = source; + const targetId = target; + const startNode = nodeDb[source]; + const endNode = nodeDb[target]; + if (!startNode || !endNode) { + return { source, target }; + } + if (startNode.type === "diamond") { + source = `${source}-${getNextPort(source, "out", dir)}`; + } + if (endNode.type === "diamond") { + target = `${target}-${getNextPort(target, "in", dir)}`; + } + return { source, target, sourceId, targetId }; +}; +const addEdges = function(edges, diagObj, graph, svg) { + log.info("abc78 edges = ", edges); + const labelsEl = svg.insert("g").attr("class", "edgeLabels"); + let linkIdCnt = {}; + let dir = diagObj.db.getDirection(); + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + log.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + const labelEl = insertEdgeLabel(labelsEl, edgeData); + const { source, target, sourceId, targetId } = getEdgeStartEndPoint(edge, dir); + log.debug("abc78 source and target", source, target); + graph.edges.push({ + id: "e" + edge.start + edge.end, + sources: [source], + targets: [target], + sourceId, + targetId, + labelEl, + labels: [ + { + width: edgeData.width, + height: edgeData.height, + orgWidth: edgeData.width, + orgHeight: edgeData.height, + text: edgeData.label, + layoutOptions: { + "edgeLabels.inline": "true", + "edgeLabels.placement": "CENTER" + } + } + ], + edgeData + }); + }); + return graph; +}; +const addMarkersToEdge = function(svgPath, edgeData, diagramType, arrowMarkerAbsolute, id) { + let url = ""; + if (arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (edgeData.arrowTypeStart) { + case "arrow_cross": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-crossStart)" + ); + break; + case "arrow_point": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-pointStart)" + ); + break; + case "arrow_barb": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-barbStart)" + ); + break; + case "arrow_circle": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-circleStart)" + ); + break; + case "aggregation": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationStart)" + ); + break; + case "extension": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-extensionStart)" + ); + break; + case "composition": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-compositionStart)" + ); + break; + case "dependency": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyStart)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopStart)" + ); + break; + } + switch (edgeData.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + id + "_" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-aggregationEnd)" + ); + break; + case "extension": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-extensionEnd)" + ); + break; + case "composition": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-compositionEnd)" + ); + break; + case "dependency": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-dependencyEnd)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id + "_" + diagramType + "-lollipopEnd)" + ); + break; + } +}; +const getClasses = function(text, diagObj) { + log.info("Extracting classes"); + return diagObj.db.getClasses(); +}; +const addSubGraphs = function(db2) { + const parentLookupDb = { parentById: {}, childrenById: {} }; + const subgraphs = db2.getSubGraphs(); + log.info("Subgraphs - ", subgraphs); + subgraphs.forEach(function(subgraph) { + subgraph.nodes.forEach(function(node) { + parentLookupDb.parentById[node] = subgraph.id; + if (parentLookupDb.childrenById[subgraph.id] === void 0) { + parentLookupDb.childrenById[subgraph.id] = []; + } + parentLookupDb.childrenById[subgraph.id].push(node); + }); + }); + subgraphs.forEach(function(subgraph) { + ({ id: subgraph.id }); + if (parentLookupDb.parentById[subgraph.id] !== void 0) { + parentLookupDb.parentById[subgraph.id]; + } + }); + return parentLookupDb; +}; +const calcOffset = function(src, dest, parentLookupDb) { + const ancestor = findCommonAncestor(src, dest, parentLookupDb); + if (ancestor === void 0 || ancestor === "root") { + return { x: 0, y: 0 }; + } + const ancestorOffset = nodeDb[ancestor].offset; + return { x: ancestorOffset.posX, y: ancestorOffset.posY }; +}; +const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb, id) { + const offset = calcOffset(edge.sourceId, edge.targetId, parentLookupDb); + const src = edge.sections[0].startPoint; + const dest = edge.sections[0].endPoint; + const segments = edge.sections[0].bendPoints ? edge.sections[0].bendPoints : []; + const segPoints = segments.map((segment) => [segment.x + offset.x, segment.y + offset.y]); + const points = [ + [src.x + offset.x, src.y + offset.y], + ...segPoints, + [dest.x + offset.x, dest.y + offset.y] + ]; + const { x, y } = getLineFunctionsWithOffset(edge.edgeData); + const curve = line().x(x).y(y).curve(curveLinear); + const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path " + edgeData.classes).attr("fill", "none"); + const edgeG = edgesEl.insert("g").attr("class", "edgeLabel"); + const edgeWithLabel = d3select(edgeG.node().appendChild(edge.labelEl)); + const box = edgeWithLabel.node().firstChild.getBoundingClientRect(); + edgeWithLabel.attr("width", box.width); + edgeWithLabel.attr("height", box.height); + edgeG.attr( + "transform", + `translate(${edge.labels[0].x + offset.x}, ${edge.labels[0].y + offset.y})` + ); + addMarkersToEdge(edgePath, edgeData, diagObj.type, diagObj.arrowMarkerAbsolute, id); +}; +const insertChildren = (nodeArray, parentLookupDb) => { + nodeArray.forEach((node) => { + if (!node.children) { + node.children = []; + } + const childIds = parentLookupDb.childrenById[node.id]; + if (childIds) { + childIds.forEach((childId) => { + node.children.push(nodeDb[childId]); + }); + } + insertChildren(node.children, parentLookupDb); + }); +}; +const draw = async function(text, id, _version, diagObj) { + var _a; + nodeDb = {}; + portPos = {}; + const renderEl = d3select("body").append("div").attr("style", "height:400px").attr("id", "cy"); + let graph = { + id: "root", + layoutOptions: { + "elk.hierarchyHandling": "INCLUDE_CHILDREN", + "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", + "elk.layered.spacing.edgeNodeBetweenLayers": "30", + // 'elk.layered.mergeEdges': 'true', + "elk.direction": "DOWN" + // 'elk.ports.sameLayerEdges': true, + // 'nodePlacement.strategy': 'SIMPLE', + }, + children: [], + edges: [] + }; + log.info("Drawing flowchart using v3 renderer", elk); + let dir = diagObj.db.getDirection(); + switch (dir) { + case "BT": + graph.layoutOptions["elk.direction"] = "UP"; + break; + case "TB": + graph.layoutOptions["elk.direction"] = "DOWN"; + break; + case "LR": + graph.layoutOptions["elk.direction"] = "RIGHT"; + break; + case "RL": + graph.layoutOptions["elk.direction"] = "LEFT"; + break; + } + const { securityLevel, flowchart: conf2 } = getConfig(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const svg = root.select(`[id="${id}"]`); + const markers = ["point", "circle", "cross"]; + insertMarkers(svg, markers, diagObj.type, id); + const vert = diagObj.db.getVertices(); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + log.info("Subgraphs - ", subGraphs); + for (let i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const subGraphsEl = svg.insert("g").attr("class", "subgraphs"); + const parentLookupDb = addSubGraphs(diagObj.db); + graph = await addVertices(vert, id, root, doc, diagObj, parentLookupDb, graph); + const edgesEl = svg.insert("g").attr("class", "edges edgePath"); + const edges = diagObj.db.getEdges(); + graph = addEdges(edges, diagObj, graph, svg); + const nodes = Object.keys(nodeDb); + nodes.forEach((nodeId) => { + const node = nodeDb[nodeId]; + if (!node.parent) { + graph.children.push(node); + } + if (parentLookupDb.childrenById[nodeId] !== void 0) { + node.labels = [ + { + text: node.labelText, + layoutOptions: { + "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" + }, + width: node.labelData.width, + height: node.labelData.height + // width: 100, + // height: 100, + } + ]; + delete node.x; + delete node.y; + delete node.width; + delete node.height; + } + }); + insertChildren(graph.children, parentLookupDb); + log.info("after layout", JSON.stringify(graph, null, 2)); + const g = await elk.layout(graph); + drawNodes(0, 0, g.children, svg, subGraphsEl, diagObj, 0); + log.info("after layout", g); + (_a = g.edges) == null ? void 0 : _a.map((edge) => { + insertEdge(edgesEl, edge, edge.edgeData, diagObj, parentLookupDb, id); + }); + setupGraphViewbox({}, svg, conf2.diagramPadding, conf2.useMaxWidth); + renderEl.remove(); +}; +const drawNodes = (relX, relY, nodeArray, svg, subgraphsEl, diagObj, depth) => { + nodeArray.forEach(function(node) { + if (node) { + nodeDb[node.id].offset = { + posX: node.x + relX, + posY: node.y + relY, + x: relX, + y: relY, + depth, + width: node.width, + height: node.height + }; + if (node.type === "group") { + const subgraphEl = subgraphsEl.insert("g").attr("class", "subgraph"); + subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node.x + relX).attr("y", node.y + relY).attr("width", node.width).attr("height", node.height); + const label = subgraphEl.insert("g").attr("class", "label"); + const labelCentering = getConfig().flowchart.htmlLabels ? node.labelData.width / 2 : 0; + label.attr( + "transform", + `translate(${node.labels[0].x + relX + node.x + labelCentering}, ${node.labels[0].y + relY + node.y + 3})` + ); + label.node().appendChild(node.labelData.labelNode); + log.info("Id (UGH)= ", node.type, node.labels); + } else { + log.info("Id (UGH)= ", node.id); + node.el.attr( + "transform", + `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})` + ); + } + } + }); + nodeArray.forEach(function(node) { + if (node && node.type === "group") { + drawNodes(relX + node.x, relY + node.y, node.children, svg, subgraphsEl, diagObj, depth + 1); + } + }); +}; +const renderer = { + getClasses, + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < 5; i++) { + sections += ` + .subgraph-lvl-${i} { + fill: ${options[`surface${i}`]}; + stroke: ${options[`surfacePeer${i}`]}; + } + `; + } + return sections; +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span { + color: ${options.titleColor}; + } + + .label text,span { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.85; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + + .flowchart-label text { + text-anchor: middle; + } + + ${genSections(options)} +`; +const styles = getStyles; +const diagram = { + db, + renderer, + parser, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/ganttDiagram-6a1a118f.js b/webroot/js/node_modules/mermaid/dist/ganttDiagram-6a1a118f.js new file mode 100644 index 0000000..e993d90 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/ganttDiagram-6a1a118f.js @@ -0,0 +1,2062 @@ +import { sanitizeUrl } from "@braintree/sanitize-url"; +import dayjs from "dayjs"; +import dayjsIsoWeek from "dayjs/plugin/isoWeek.js"; +import dayjsCustomParseFormat from "dayjs/plugin/customParseFormat.js"; +import dayjsAdvancedFormat from "dayjs/plugin/advancedFormat.js"; +import { c as getConfig, s as setAccTitle, g as getAccTitle, q as setDiagramTitle, r as getDiagramTitle, b as setAccDescription, a as getAccDescription, t as clear$1, u as utils, l as log, i as configureSvgSize, e as common } from "./mermaid-0d192ec3.js"; +import { select, scaleTime, min, max, scaleLinear, interpolateHcl, axisBottom, timeFormat, timeMonth, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond, axisTop, timeMonday, timeTuesday, timeWednesday, timeThursday, timeFriday, timeSaturday, timeSunday } from "d3"; +import "ts-dedent"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 29], $V6 = [1, 30], $V7 = [1, 31], $V8 = [1, 9], $V9 = [1, 10], $Va = [1, 11], $Vb = [1, 12], $Vc = [1, 13], $Vd = [1, 14], $Ve = [1, 15], $Vf = [1, 16], $Vg = [1, 18], $Vh = [1, 19], $Vi = [1, 20], $Vj = [1, 21], $Vk = [1, 22], $Vl = [1, 24], $Vm = [1, 32]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "weekday": 11, "weekday_monday": 12, "weekday_tuesday": 13, "weekday_wednesday": 14, "weekday_thursday": 15, "weekday_friday": 16, "weekday_saturday": 17, "weekday_sunday": 18, "dateFormat": 19, "inclusiveEndDates": 20, "topAxis": 21, "axisFormat": 22, "tickInterval": 23, "excludes": 24, "includes": 25, "todayMarker": 26, "title": 27, "acc_title": 28, "acc_title_value": 29, "acc_descr": 30, "acc_descr_value": 31, "acc_descr_multiline_value": 32, "section": 33, "clickStatement": 34, "taskTxt": 35, "taskData": 36, "click": 37, "callbackname": 38, "callbackargs": 39, "href": 40, "clickStatementDebug": 41, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setWeekday("monday"); + break; + case 9: + yy.setWeekday("tuesday"); + break; + case 10: + yy.setWeekday("wednesday"); + break; + case 11: + yy.setWeekday("thursday"); + break; + case 12: + yy.setWeekday("friday"); + break; + case 13: + yy.setWeekday("saturday"); + break; + case 14: + yy.setWeekday("sunday"); + break; + case 15: + yy.setDateFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 16: + yy.enableInclusiveEndDates(); + this.$ = $$[$0].substr(18); + break; + case 17: + yy.TopAxis(); + this.$ = $$[$0].substr(8); + break; + case 18: + yy.setAxisFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 19: + yy.setTickInterval($$[$0].substr(13)); + this.$ = $$[$0].substr(13); + break; + case 20: + yy.setExcludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 21: + yy.setIncludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 22: + yy.setTodayMarker($$[$0].substr(12)); + this.$ = $$[$0].substr(12); + break; + case 24: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 25: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 26: + case 27: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 30: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + case 31: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0], null); + break; + case 32: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 33: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null); + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 34: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setLink($$[$0 - 3], $$[$0]); + break; + case 35: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0], null); + yy.setLink($$[$0 - 2], $$[$0 - 1]); + break; + case 36: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]); + yy.setLink($$[$0 - 3], $$[$0 - 2]); + break; + case 37: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 38: + case 44: + this.$ = $$[$0 - 1] + " " + $$[$0]; + break; + case 39: + case 40: + case 42: + this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + case 41: + case 43: + this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 33, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), { 36: [1, 36] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), { 38: [1, 37], 40: [1, 38] }, o($V0, [2, 4]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 30]), o($V0, [2, 31], { 39: [1, 39], 40: [1, 40] }), o($V0, [2, 37], { 38: [1, 41] }), o($V0, [2, 32], { 40: [1, 42] }), o($V0, [2, 33]), o($V0, [2, 35], { 39: [1, 43] }), o($V0, [2, 34]), o($V0, [2, 36])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("open_directive"); + return "open_directive"; + case 1: + this.begin("acc_title"); + return 28; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 30; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + return 10; + case 12: + break; + case 13: + break; + case 14: + break; + case 15: + this.begin("href"); + break; + case 16: + this.popState(); + break; + case 17: + return 40; + case 18: + this.begin("callbackname"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callbackargs"); + break; + case 21: + return 38; + case 22: + this.popState(); + break; + case 23: + return 39; + case 24: + this.begin("click"); + break; + case 25: + this.popState(); + break; + case 26: + return 37; + case 27: + return 4; + case 28: + return 19; + case 29: + return 20; + case 30: + return 21; + case 31: + return 22; + case 32: + return 23; + case 33: + return 25; + case 34: + return 24; + case 35: + return 26; + case 36: + return 12; + case 37: + return 13; + case 38: + return 14; + case 39: + return 15; + case 40: + return 16; + case 41: + return 17; + case 42: + return 18; + case 43: + return "date"; + case 44: + return 27; + case 45: + return "accDescription"; + case 46: + return 33; + case 47: + return 35; + case 48: + return 36; + case 49: + return ":"; + case 50: + return 6; + case 51: + return "INVALID"; + } + }, + rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [22, 23], "inclusive": false }, "callbackname": { "rules": [19, 20, 21], "inclusive": false }, "href": { "rules": [16, 17], "inclusive": false }, "click": { "rules": [25, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 18, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const ganttParser = parser; +dayjs.extend(dayjsIsoWeek); +dayjs.extend(dayjsCustomParseFormat); +dayjs.extend(dayjsAdvancedFormat); +let dateFormat = ""; +let axisFormat = ""; +let tickInterval = void 0; +let todayMarker = ""; +let includes = []; +let excludes = []; +let links = {}; +let sections = []; +let tasks = []; +let currentSection = ""; +let displayMode = ""; +const tags = ["active", "done", "crit", "milestone"]; +let funs = []; +let inclusiveEndDates = false; +let topAxis = false; +let weekday = "sunday"; +let lastOrder = 0; +const clear = function() { + sections = []; + tasks = []; + currentSection = ""; + funs = []; + taskCnt = 0; + lastTask = void 0; + lastTaskID = void 0; + rawTasks = []; + dateFormat = ""; + axisFormat = ""; + displayMode = ""; + tickInterval = void 0; + todayMarker = ""; + includes = []; + excludes = []; + inclusiveEndDates = false; + topAxis = false; + lastOrder = 0; + links = {}; + clear$1(); + weekday = "sunday"; +}; +const setAxisFormat = function(txt) { + axisFormat = txt; +}; +const getAxisFormat = function() { + return axisFormat; +}; +const setTickInterval = function(txt) { + tickInterval = txt; +}; +const getTickInterval = function() { + return tickInterval; +}; +const setTodayMarker = function(txt) { + todayMarker = txt; +}; +const getTodayMarker = function() { + return todayMarker; +}; +const setDateFormat = function(txt) { + dateFormat = txt; +}; +const enableInclusiveEndDates = function() { + inclusiveEndDates = true; +}; +const endDatesAreInclusive = function() { + return inclusiveEndDates; +}; +const enableTopAxis = function() { + topAxis = true; +}; +const topAxisEnabled = function() { + return topAxis; +}; +const setDisplayMode = function(txt) { + displayMode = txt; +}; +const getDisplayMode = function() { + return displayMode; +}; +const getDateFormat = function() { + return dateFormat; +}; +const setIncludes = function(txt) { + includes = txt.toLowerCase().split(/[\s,]+/); +}; +const getIncludes = function() { + return includes; +}; +const setExcludes = function(txt) { + excludes = txt.toLowerCase().split(/[\s,]+/); +}; +const getExcludes = function() { + return excludes; +}; +const getLinks = function() { + return links; +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 10; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks = rawTasks; + return tasks; +}; +const isInvalidDate = function(date, dateFormat2, excludes2, includes2) { + if (includes2.includes(date.format(dateFormat2.trim()))) { + return false; + } + if (date.isoWeekday() >= 6 && excludes2.includes("weekends")) { + return true; + } + if (excludes2.includes(date.format("dddd").toLowerCase())) { + return true; + } + return excludes2.includes(date.format(dateFormat2.trim())); +}; +const setWeekday = function(txt) { + weekday = txt; +}; +const getWeekday = function() { + return weekday; +}; +const checkTaskDates = function(task, dateFormat2, excludes2, includes2) { + if (!excludes2.length || task.manualEndTime) { + return; + } + let startTime; + if (task.startTime instanceof Date) { + startTime = dayjs(task.startTime); + } else { + startTime = dayjs(task.startTime, dateFormat2, true); + } + startTime = startTime.add(1, "d"); + let originalEndTime; + if (task.endTime instanceof Date) { + originalEndTime = dayjs(task.endTime); + } else { + originalEndTime = dayjs(task.endTime, dateFormat2, true); + } + const [fixedEndTime, renderEndTime] = fixTaskDates( + startTime, + originalEndTime, + dateFormat2, + excludes2, + includes2 + ); + task.endTime = fixedEndTime.toDate(); + task.renderEndTime = renderEndTime; +}; +const fixTaskDates = function(startTime, endTime, dateFormat2, excludes2, includes2) { + let invalid = false; + let renderEndTime = null; + while (startTime <= endTime) { + if (!invalid) { + renderEndTime = endTime.toDate(); + } + invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2); + if (invalid) { + endTime = endTime.add(1, "d"); + } + startTime = startTime.add(1, "d"); + } + return [endTime, renderEndTime]; +}; +const getStartDate = function(prevTime, dateFormat2, str) { + str = str.trim(); + const re = /^after\s+([\d\w- ]+)/; + const afterStatement = re.exec(str.trim()); + if (afterStatement !== null) { + let latestEndingTask = null; + afterStatement[1].split(" ").forEach(function(id) { + let task = findTaskById(id); + if (task !== void 0) { + if (!latestEndingTask) { + latestEndingTask = task; + } else { + if (task.endTime > latestEndingTask.endTime) { + latestEndingTask = task; + } + } + } + }); + if (!latestEndingTask) { + const dt = /* @__PURE__ */ new Date(); + dt.setHours(0, 0, 0, 0); + return dt; + } else { + return latestEndingTask.endTime; + } + } + let mDate = dayjs(str, dateFormat2.trim(), true); + if (mDate.isValid()) { + return mDate.toDate(); + } else { + log.debug("Invalid date:" + str); + log.debug("With date format:" + dateFormat2.trim()); + const d = new Date(str); + if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously + // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304. + // This can cause virtually infinite loops while rendering, so for the + // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as + // invalid. + d.getFullYear() < -1e4 || d.getFullYear() > 1e4) { + throw new Error("Invalid date:" + str); + } + return d; + } +}; +const parseDuration = function(str) { + const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim()); + if (statement !== null) { + return [Number.parseFloat(statement[1]), statement[2]]; + } + return [NaN, "ms"]; +}; +const getEndDate = function(prevTime, dateFormat2, str, inclusive = false) { + str = str.trim(); + let mDate = dayjs(str, dateFormat2.trim(), true); + if (mDate.isValid()) { + if (inclusive) { + mDate = mDate.add(1, "d"); + } + return mDate.toDate(); + } + let endTime = dayjs(prevTime); + const [durationValue, durationUnit] = parseDuration(str); + if (!Number.isNaN(durationValue)) { + const newEndTime = endTime.add(durationValue, durationUnit); + if (newEndTime.isValid()) { + endTime = newEndTime; + } + } + return endTime.toDate(); +}; +let taskCnt = 0; +const parseId = function(idStr) { + if (idStr === void 0) { + taskCnt = taskCnt + 1; + return "task" + taskCnt; + } + return idStr; +}; +const compileData = function(prevTask, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i = 0; i < data.length; i++) { + data[i] = data[i].trim(); + } + let endTimeData = ""; + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = prevTask.endTime; + endTimeData = data[0]; + break; + case 2: + task.id = parseId(); + task.startTime = getStartDate(void 0, dateFormat, data[0]); + endTimeData = data[1]; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = getStartDate(void 0, dateFormat, data[1]); + endTimeData = data[2]; + break; + } + if (endTimeData) { + task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates); + task.manualEndTime = dayjs(endTimeData, "YYYY-MM-DD", true).isValid(); + checkTaskDates(task, dateFormat, excludes, includes); + } + return task; +}; +const parseData = function(prevTaskId, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i = 0; i < data.length; i++) { + data[i] = data[i].trim(); + } + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = { + type: "prevTaskEnd", + id: prevTaskId + }; + task.endTime = { + data: data[0] + }; + break; + case 2: + task.id = parseId(); + task.startTime = { + type: "getStartDate", + startData: data[0] + }; + task.endTime = { + data: data[1] + }; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = { + type: "getStartDate", + startData: data[1] + }; + task.endTime = { + data: data[2] + }; + break; + } + return task; +}; +let lastTask; +let lastTaskID; +let rawTasks = []; +const taskDb = {}; +const addTask = function(descr, data) { + const rawTask = { + section: currentSection, + type: currentSection, + processed: false, + manualEndTime: false, + renderEndTime: null, + raw: { data }, + task: descr, + classes: [] + }; + const taskInfo = parseData(lastTaskID, data); + rawTask.raw.startTime = taskInfo.startTime; + rawTask.raw.endTime = taskInfo.endTime; + rawTask.id = taskInfo.id; + rawTask.prevTaskId = lastTaskID; + rawTask.active = taskInfo.active; + rawTask.done = taskInfo.done; + rawTask.crit = taskInfo.crit; + rawTask.milestone = taskInfo.milestone; + rawTask.order = lastOrder; + lastOrder++; + const pos = rawTasks.push(rawTask); + lastTaskID = rawTask.id; + taskDb[rawTask.id] = pos - 1; +}; +const findTaskById = function(id) { + const pos = taskDb[id]; + return rawTasks[pos]; +}; +const addTaskOrg = function(descr, data) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + const taskInfo = compileData(lastTask, data); + newTask.startTime = taskInfo.startTime; + newTask.endTime = taskInfo.endTime; + newTask.id = taskInfo.id; + newTask.active = taskInfo.active; + newTask.done = taskInfo.done; + newTask.crit = taskInfo.crit; + newTask.milestone = taskInfo.milestone; + lastTask = newTask; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + const task = rawTasks[pos]; + let startTime = ""; + switch (rawTasks[pos].raw.startTime.type) { + case "prevTaskEnd": { + const prevTask = findTaskById(task.prevTaskId); + task.startTime = prevTask.endTime; + break; + } + case "getStartDate": + startTime = getStartDate(void 0, dateFormat, rawTasks[pos].raw.startTime.startData); + if (startTime) { + rawTasks[pos].startTime = startTime; + } + break; + } + if (rawTasks[pos].startTime) { + rawTasks[pos].endTime = getEndDate( + rawTasks[pos].startTime, + dateFormat, + rawTasks[pos].raw.endTime.data, + inclusiveEndDates + ); + if (rawTasks[pos].endTime) { + rawTasks[pos].processed = true; + rawTasks[pos].manualEndTime = dayjs( + rawTasks[pos].raw.endTime.data, + "YYYY-MM-DD", + true + ).isValid(); + checkTaskDates(rawTasks[pos], dateFormat, excludes, includes); + } + } + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const setLink = function(ids, _linkStr) { + let linkStr = _linkStr; + if (getConfig().securityLevel !== "loose") { + linkStr = sanitizeUrl(_linkStr); + } + ids.split(",").forEach(function(id) { + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + pushFun(id, () => { + window.open(linkStr, "_self"); + }); + links[id] = linkStr; + } + }); + setClass(ids, "clickable"); +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(id) { + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + rawTask.classes.push(className); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + if (getConfig().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + pushFun(id, () => { + utils.runFunc(functionName, ...argList); + }); + } +}; +const pushFun = function(id, callbackFunction) { + funs.push( + function() { + const elem = document.querySelector(`[id="${id}"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + }, + function() { + const elem = document.querySelector(`[id="${id}-text"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + } + ); +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const ganttDb = { + getConfig: () => getConfig().gantt, + clear, + setDateFormat, + getDateFormat, + enableInclusiveEndDates, + endDatesAreInclusive, + enableTopAxis, + topAxisEnabled, + setAxisFormat, + getAxisFormat, + setTickInterval, + getTickInterval, + setTodayMarker, + getTodayMarker, + setAccTitle, + getAccTitle, + setDiagramTitle, + getDiagramTitle, + setDisplayMode, + getDisplayMode, + setAccDescription, + getAccDescription, + addSection, + getSections, + getTasks, + addTask, + findTaskById, + addTaskOrg, + setIncludes, + getIncludes, + setExcludes, + getExcludes, + setClickEvent, + setLink, + getLinks, + bindFunctions, + parseDuration, + isInvalidDate, + setWeekday, + getWeekday +}; +function getTaskTags(data, task, tags2) { + let matchFound = true; + while (matchFound) { + matchFound = false; + tags2.forEach(function(t) { + const pattern = "^\\s*" + t + "\\s*$"; + const regex = new RegExp(pattern); + if (data[0].match(regex)) { + task[t] = true; + data.shift(1); + matchFound = true; + } + }); + } +} +const setConf = function() { + log.debug("Something is calling, setConf, remove the call"); +}; +const mapWeekdayToTimeFunction = { + monday: timeMonday, + tuesday: timeTuesday, + wednesday: timeWednesday, + thursday: timeThursday, + friday: timeFriday, + saturday: timeSaturday, + sunday: timeSunday +}; +const getMaxIntersections = (tasks2, orderOffset) => { + let timeline = [...tasks2].map(() => -Infinity); + let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order); + let maxIntersections = 0; + for (const element of sorted) { + for (let j = 0; j < timeline.length; j++) { + if (element.startTime >= timeline[j]) { + timeline[j] = element.endTime; + element.order = j + orderOffset; + if (j > maxIntersections) { + maxIntersections = j; + } + break; + } + } + } + return maxIntersections; +}; +let w; +const draw = function(text, id, version, diagObj) { + const conf = getConfig().gantt; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const elem = doc.getElementById(id); + w = elem.parentElement.offsetWidth; + if (w === void 0) { + w = 1200; + } + if (conf.useWidth !== void 0) { + w = conf.useWidth; + } + const taskArray = diagObj.db.getTasks(); + let categories = []; + for (const element of taskArray) { + categories.push(element.type); + } + categories = checkUnique(categories); + const categoryHeights = {}; + let h = 2 * conf.topPadding; + if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") { + const categoryElements = {}; + for (const element of taskArray) { + if (categoryElements[element.section] === void 0) { + categoryElements[element.section] = [element]; + } else { + categoryElements[element.section].push(element); + } + } + let intersections = 0; + for (const category of Object.keys(categoryElements)) { + const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1; + intersections += categoryHeight; + h += categoryHeight * (conf.barHeight + conf.barGap); + categoryHeights[category] = categoryHeight; + } + } else { + h += taskArray.length * (conf.barHeight + conf.barGap); + for (const category of categories) { + categoryHeights[category] = taskArray.filter((task) => task.type === category).length; + } + } + elem.setAttribute("viewBox", "0 0 " + w + " " + h); + const svg = root.select(`[id="${id}"]`); + const timeScale = scaleTime().domain([ + min(taskArray, function(d) { + return d.startTime; + }), + max(taskArray, function(d) { + return d.endTime; + }) + ]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]); + function taskCompare(a, b) { + const taskA = a.startTime; + const taskB = b.startTime; + let result = 0; + if (taskA > taskB) { + result = 1; + } else if (taskA < taskB) { + result = -1; + } + return result; + } + taskArray.sort(taskCompare); + makeGant(taskArray, w, h); + configureSvgSize(svg, h, w, conf.useMaxWidth); + svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText"); + function makeGant(tasks2, pageWidth, pageHeight) { + const barHeight = conf.barHeight; + const gap = barHeight + conf.barGap; + const topPadding = conf.topPadding; + const leftPadding = conf.leftPadding; + const colorScale = scaleLinear().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(interpolateHcl); + drawExcludeDays( + gap, + topPadding, + leftPadding, + pageWidth, + pageHeight, + tasks2, + diagObj.db.getExcludes(), + diagObj.db.getIncludes() + ); + makeGrid(leftPadding, topPadding, pageWidth, pageHeight); + drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth); + vertLabels(gap, topPadding); + drawToday(leftPadding, topPadding, pageWidth, pageHeight); + } + function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) { + const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))]; + const uniqueTasks = uniqueTaskOrderIds.map((id2) => theArray.find((item) => item.order === id2)); + svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) { + i = d.order; + return i * theGap + theTopPad - 2; + }).attr("width", function() { + return w2 - conf.rightPadding / 2; + }).attr("height", theGap).attr("class", function(d) { + for (const [i, category] of categories.entries()) { + if (d.type === category) { + return "section section" + i % conf.numberSectionStyles; + } + } + return "section section0"; + }); + const rectangles = svg.append("g").selectAll("rect").data(theArray).enter(); + const links2 = diagObj.db.getLinks(); + rectangles.append("rect").attr("id", function(d) { + return d.id; + }).attr("rx", 3).attr("ry", 3).attr("x", function(d) { + if (d.milestone) { + return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + return timeScale(d.startTime) + theSidePad; + }).attr("y", function(d, i) { + i = d.order; + return i * theGap + theTopPad; + }).attr("width", function(d) { + if (d.milestone) { + return theBarHeight; + } + return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); + }).attr("height", theBarHeight).attr("transform-origin", function(d, i) { + i = d.order; + return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px"; + }).attr("class", function(d) { + const res = "task"; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i, category] of categories.entries()) { + if (d.type === category) { + secNum = i % conf.numberSectionStyles; + } + } + let taskClass = ""; + if (d.active) { + if (d.crit) { + taskClass += " activeCrit"; + } else { + taskClass = " active"; + } + } else if (d.done) { + if (d.crit) { + taskClass = " doneCrit"; + } else { + taskClass = " done"; + } + } else { + if (d.crit) { + taskClass += " crit"; + } + } + if (taskClass.length === 0) { + taskClass = " task"; + } + if (d.milestone) { + taskClass = " milestone " + taskClass; + } + taskClass += secNum; + taskClass += " " + classStr; + return res + taskClass; + }); + rectangles.append("text").attr("id", function(d) { + return d.id + "-text"; + }).text(function(d) { + return d.task; + }).attr("font-size", conf.fontSize).attr("x", function(d) { + let startX = timeScale(d.startTime); + let endX = timeScale(d.renderEndTime || d.endTime); + if (d.milestone) { + startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf.leftPadding > w2) { + return startX + theSidePad - 5; + } else { + return endX + theSidePad + 5; + } + } else { + return (endX - startX) / 2 + startX + theSidePad; + } + }).attr("y", function(d, i) { + i = d.order; + return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad; + }).attr("text-height", theBarHeight).attr("class", function(d) { + const startX = timeScale(d.startTime); + let endX = timeScale(d.endTime); + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i, category] of categories.entries()) { + if (d.type === category) { + secNum = i % conf.numberSectionStyles; + } + } + let taskType = ""; + if (d.active) { + if (d.crit) { + taskType = "activeCritText" + secNum; + } else { + taskType = "activeText" + secNum; + } + } + if (d.done) { + if (d.crit) { + taskType = taskType + " doneCritText" + secNum; + } else { + taskType = taskType + " doneText" + secNum; + } + } else { + if (d.crit) { + taskType = taskType + " critText" + secNum; + } + } + if (d.milestone) { + taskType += " milestoneText"; + } + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf.leftPadding > w2) { + return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType; + } else { + return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth; + } + } else { + return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth; + } + }); + const securityLevel2 = getConfig().securityLevel; + if (securityLevel2 === "sandbox") { + let sandboxElement2; + sandboxElement2 = select("#i" + id); + const doc2 = sandboxElement2.nodes()[0].contentDocument; + rectangles.filter(function(d) { + return links2[d.id] !== void 0; + }).each(function(o) { + var taskRect = doc2.querySelector("#" + o.id); + var taskText = doc2.querySelector("#" + o.id + "-text"); + const oldParent = taskRect.parentNode; + var Link = doc2.createElement("a"); + Link.setAttribute("xlink:href", links2[o.id]); + Link.setAttribute("target", "_top"); + oldParent.appendChild(Link); + Link.appendChild(taskRect); + Link.appendChild(taskText); + }); + } + } + function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) { + if (excludes2.length === 0 && includes2.length === 0) { + return; + } + let minTime; + let maxTime; + for (const { startTime, endTime } of tasks2) { + if (minTime === void 0 || startTime < minTime) { + minTime = startTime; + } + if (maxTime === void 0 || endTime > maxTime) { + maxTime = endTime; + } + } + if (!minTime || !maxTime) { + return; + } + if (dayjs(maxTime).diff(dayjs(minTime), "year") > 5) { + log.warn( + "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days." + ); + return; + } + const dateFormat2 = diagObj.db.getDateFormat(); + const excludeRanges = []; + let range = null; + let d = dayjs(minTime); + while (d.valueOf() <= maxTime) { + if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) { + if (!range) { + range = { + start: d, + end: d + }; + } else { + range.end = d; + } + } else { + if (range) { + excludeRanges.push(range); + range = null; + } + } + d = d.add(1, "d"); + } + const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter(); + rectangles.append("rect").attr("id", function(d2) { + return "exclude-" + d2.start.format("YYYY-MM-DD"); + }).attr("x", function(d2) { + return timeScale(d2.start) + theSidePad; + }).attr("y", conf.gridLineStartPadding).attr("width", function(d2) { + const renderEnd = d2.end.add(1, "day"); + return timeScale(renderEnd) - timeScale(d2.start); + }).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) { + return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px"; + }).attr("class", "exclude-range"); + } + function makeGrid(theSidePad, theTopPad, w2, h2) { + let bottomXAxis = axisBottom(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); + const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/; + const resultTickInterval = reTickInterval.exec( + diagObj.db.getTickInterval() || conf.tickInterval + ); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf.weekday; + switch (interval) { + case "millisecond": + bottomXAxis.ticks(timeMillisecond.every(every)); + break; + case "second": + bottomXAxis.ticks(timeSecond.every(every)); + break; + case "minute": + bottomXAxis.ticks(timeMinute.every(every)); + break; + case "hour": + bottomXAxis.ticks(timeHour.every(every)); + break; + case "day": + bottomXAxis.ticks(timeDay.every(every)); + break; + case "week": + bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + bottomXAxis.ticks(timeMonth.every(every)); + break; + } + } + svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"); + if (diagObj.db.topAxisEnabled() || conf.topAxis) { + let topXAxis = axisTop(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf.weekday; + switch (interval) { + case "millisecond": + topXAxis.ticks(timeMillisecond.every(every)); + break; + case "second": + topXAxis.ticks(timeSecond.every(every)); + break; + case "minute": + topXAxis.ticks(timeMinute.every(every)); + break; + case "hour": + topXAxis.ticks(timeHour.every(every)); + break; + case "day": + topXAxis.ticks(timeDay.every(every)); + break; + case "week": + topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + topXAxis.ticks(timeMonth.every(every)); + break; + } + } + svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10); + } + } + function vertLabels(theGap, theTopPad) { + let prevGap = 0; + const numOccurances = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]); + svg.append("g").selectAll("text").data(numOccurances).enter().append(function(d) { + const rows = d[0].split(common.lineBreakRegex); + const dy = -(rows.length - 1) / 2; + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("dy", dy + "em"); + for (const [j, row] of rows.entries()) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttribute("alignment-baseline", "central"); + tspan.setAttribute("x", "10"); + if (j > 0) { + tspan.setAttribute("dy", "1em"); + } + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + return svgLabel; + }).attr("x", 10).attr("y", function(d, i) { + if (i > 0) { + for (let j = 0; j < i; j++) { + prevGap += numOccurances[i - 1][1]; + return d[1] * theGap / 2 + prevGap * theGap + theTopPad; + } + } else { + return d[1] * theGap / 2 + theTopPad; + } + }).attr("font-size", conf.sectionFontSize).attr("class", function(d) { + for (const [i, category] of categories.entries()) { + if (d[0] === category) { + return "sectionTitle sectionTitle" + i % conf.numberSectionStyles; + } + } + return "sectionTitle"; + }); + } + function drawToday(theSidePad, theTopPad, w2, h2) { + const todayMarker2 = diagObj.db.getTodayMarker(); + if (todayMarker2 === "off") { + return; + } + const todayG = svg.append("g").attr("class", "today"); + const today = /* @__PURE__ */ new Date(); + const todayLine = todayG.append("line"); + todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today"); + if (todayMarker2 !== "") { + todayLine.attr("style", todayMarker2.replace(/,/g, ";")); + } + } + function checkUnique(arr) { + const hash = {}; + const result = []; + for (let i = 0, l = arr.length; i < l; ++i) { + if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) { + hash[arr[i]] = true; + result.push(arr[i]); + } + } + return result; + } +}; +const ganttRenderer = { + setConf, + draw +}; +const getStyles = (options) => ` + .mermaid-main-font { + font-family: "trebuchet ms", verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + .exclude-range { + fill: ${options.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${options.sectionBkgColor}; + } + + .section2 { + fill: ${options.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${options.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${options.titleColor}; + } + + .sectionTitle1 { + fill: ${options.titleColor}; + } + + .sectionTitle2 { + fill: ${options.titleColor}; + } + + .sectionTitle3 { + fill: ${options.titleColor}; + } + + .sectionTitle { + text-anchor: start; + // font-size: ${options.ganttFontSize}; + // text-height: 14px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${options.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + text { + font-family: ${options.fontFamily}; + fill: ${options.textColor}; + } + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${options.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + // .taskText:not([font-size]) { + // font-size: ${options.ganttFontSize}; + // } + + .taskTextOutsideRight { + fill: ${options.taskTextDarkColor}; + text-anchor: start; + // font-size: ${options.ganttFontSize}; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + .taskTextOutsideLeft { + fill: ${options.taskTextDarkColor}; + text-anchor: end; + // font-size: ${options.ganttFontSize}; + } + + /* Special case clickable */ + .task.clickable { + cursor: pointer; + } + .taskText.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${options.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${options.taskBkgColor}; + stroke: ${options.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${options.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${options.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${options.activeTaskBkgColor}; + stroke: ${options.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${options.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${options.doneTaskBorderColor}; + fill: ${options.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${options.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${options.critBorderColor}; + fill: ${options.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${options.critBorderColor}; + fill: ${options.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${options.critBorderColor}; + fill: ${options.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${options.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${options.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor} ; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } +`; +const ganttStyles = getStyles; +const diagram = { + parser: ganttParser, + db: ganttDb, + renderer: ganttRenderer, + styles: ganttStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/ganttDiagram-9d08f276.js b/webroot/js/node_modules/mermaid/dist/ganttDiagram-9d08f276.js new file mode 100644 index 0000000..729b378 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/ganttDiagram-9d08f276.js @@ -0,0 +1,2544 @@ +import { K as Xe, L as qe, R as Ge, M as je, N as An, O as Kt, P as In, Q as ke, T as pe, c as vt, s as Wn, g as On, B as zn, D as Nn, b as Hn, a as Vn, U as et, E as Pn, e as Rn, z as Bn, l as Rt, j as zt, k as Zn, f as Xn } from "./mermaid-e4a58915.js"; +import { b as qn, t as Ue, c as Gn, a as jn, l as Qn } from "./linear-9f666eb0.js"; +import { i as $n } from "./init-f9637058.js"; +function Jn(t, e) { + let n; + if (e === void 0) + for (const r of t) + r != null && (n < r || n === void 0 && r >= r) && (n = r); + else { + let r = -1; + for (let i of t) + (i = e(i, ++r, t)) != null && (n < i || n === void 0 && i >= i) && (n = i); + } + return n; +} +function Kn(t, e) { + let n; + if (e === void 0) + for (const r of t) + r != null && (n > r || n === void 0 && r >= r) && (n = r); + else { + let r = -1; + for (let i of t) + (i = e(i, ++r, t)) != null && (n > i || n === void 0 && i >= i) && (n = i); + } + return n; +} +function tr(t) { + return t; +} +var Ht = 1, te = 2, le = 3, Nt = 4, Le = 1e-6; +function er(t) { + return "translate(" + t + ",0)"; +} +function nr(t) { + return "translate(0," + t + ")"; +} +function rr(t) { + return (e) => +t(e); +} +function ir(t, e) { + return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e; +} +function ar() { + return !this.__axis; +} +function Qe(t, e) { + var n = [], r = null, i = null, a = 6, s = 6, y = 3, _ = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, k = t === Ht || t === Nt ? -1 : 1, D = t === Nt || t === te ? "x" : "y", U = t === Ht || t === le ? er : nr; + function w(x) { + var q = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), g = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : tr), L = Math.max(a, 0) + y, O = e.range(), W = +O[0] + _, B = +O[O.length - 1] + _, Z = (e.bandwidth ? ir : rr)(e.copy(), _), Q = x.selection ? x.selection() : x, v = Q.selectAll(".domain").data([null]), A = Q.selectAll(".tick").data(q, e).order(), T = A.exit(), F = A.enter().append("g").attr("class", "tick"), C = A.select("line"), b = A.select("text"); + v = v.merge(v.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), A = A.merge(F), C = C.merge(F.append("line").attr("stroke", "currentColor").attr(D + "2", k * a)), b = b.merge(F.append("text").attr("fill", "currentColor").attr(D, k * L).attr("dy", t === Ht ? "0em" : t === le ? "0.71em" : "0.32em")), x !== Q && (v = v.transition(x), A = A.transition(x), C = C.transition(x), b = b.transition(x), T = T.transition(x).attr("opacity", Le).attr("transform", function(o) { + return isFinite(o = Z(o)) ? U(o + _) : this.getAttribute("transform"); + }), F.attr("opacity", Le).attr("transform", function(o) { + var d = this.parentNode.__axis; + return U((d && isFinite(d = d(o)) ? d : Z(o)) + _); + })), T.remove(), v.attr("d", t === Nt || t === te ? s ? "M" + k * s + "," + W + "H" + _ + "V" + B + "H" + k * s : "M" + _ + "," + W + "V" + B : s ? "M" + W + "," + k * s + "V" + _ + "H" + B + "V" + k * s : "M" + W + "," + _ + "H" + B), A.attr("opacity", 1).attr("transform", function(o) { + return U(Z(o) + _); + }), C.attr(D + "2", k * a), b.attr(D, k * L).text(g), Q.filter(ar).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === te ? "start" : t === Nt ? "end" : "middle"), Q.each(function() { + this.__axis = Z; + }); + } + return w.scale = function(x) { + return arguments.length ? (e = x, w) : e; + }, w.ticks = function() { + return n = Array.from(arguments), w; + }, w.tickArguments = function(x) { + return arguments.length ? (n = x == null ? [] : Array.from(x), w) : n.slice(); + }, w.tickValues = function(x) { + return arguments.length ? (r = x == null ? null : Array.from(x), w) : r && r.slice(); + }, w.tickFormat = function(x) { + return arguments.length ? (i = x, w) : i; + }, w.tickSize = function(x) { + return arguments.length ? (a = s = +x, w) : a; + }, w.tickSizeInner = function(x) { + return arguments.length ? (a = +x, w) : a; + }, w.tickSizeOuter = function(x) { + return arguments.length ? (s = +x, w) : s; + }, w.tickPadding = function(x) { + return arguments.length ? (y = +x, w) : y; + }, w.offset = function(x) { + return arguments.length ? (_ = +x, w) : _; + }, w; +} +function sr(t) { + return Qe(Ht, t); +} +function or(t) { + return Qe(le, t); +} +const cr = Math.PI / 180, ur = 180 / Math.PI, Bt = 18, $e = 0.96422, Je = 1, Ke = 0.82521, tn = 4 / 29, bt = 6 / 29, en = 3 * bt * bt, lr = bt * bt * bt; +function nn(t) { + if (t instanceof ot) + return new ot(t.l, t.a, t.b, t.opacity); + if (t instanceof lt) + return rn(t); + t instanceof Ge || (t = An(t)); + var e = ie(t.r), n = ie(t.g), r = ie(t.b), i = ee((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / Je), a, s; + return e === n && n === r ? a = s = i : (a = ee((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / $e), s = ee((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / Ke)), new ot(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity); +} +function fr(t, e, n, r) { + return arguments.length === 1 ? nn(t) : new ot(t, e, n, r ?? 1); +} +function ot(t, e, n, r) { + this.l = +t, this.a = +e, this.b = +n, this.opacity = +r; +} +Xe(ot, fr, qe(je, { + brighter(t) { + return new ot(this.l + Bt * (t ?? 1), this.a, this.b, this.opacity); + }, + darker(t) { + return new ot(this.l - Bt * (t ?? 1), this.a, this.b, this.opacity); + }, + rgb() { + var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200; + return e = $e * ne(e), t = Je * ne(t), n = Ke * ne(n), new Ge( + re(3.1338561 * e - 1.6168667 * t - 0.4906146 * n), + re(-0.9787684 * e + 1.9161415 * t + 0.033454 * n), + re(0.0719453 * e - 0.2289914 * t + 1.4052427 * n), + this.opacity + ); + } +})); +function ee(t) { + return t > lr ? Math.pow(t, 1 / 3) : t / en + tn; +} +function ne(t) { + return t > bt ? t * t * t : en * (t - tn); +} +function re(t) { + return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055); +} +function ie(t) { + return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4); +} +function hr(t) { + if (t instanceof lt) + return new lt(t.h, t.c, t.l, t.opacity); + if (t instanceof ot || (t = nn(t)), t.a === 0 && t.b === 0) + return new lt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity); + var e = Math.atan2(t.b, t.a) * ur; + return new lt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity); +} +function fe(t, e, n, r) { + return arguments.length === 1 ? hr(t) : new lt(t, e, n, r ?? 1); +} +function lt(t, e, n, r) { + this.h = +t, this.c = +e, this.l = +n, this.opacity = +r; +} +function rn(t) { + if (isNaN(t.h)) + return new ot(t.l, 0, 0, t.opacity); + var e = t.h * cr; + return new ot(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity); +} +Xe(lt, fe, qe(je, { + brighter(t) { + return new lt(this.h, this.c, this.l + Bt * (t ?? 1), this.opacity); + }, + darker(t) { + return new lt(this.h, this.c, this.l - Bt * (t ?? 1), this.opacity); + }, + rgb() { + return rn(this).rgb(); + } +})); +function dr(t) { + return function(e, n) { + var r = t((e = fe(e)).h, (n = fe(n)).h), i = Kt(e.c, n.c), a = Kt(e.l, n.l), s = Kt(e.opacity, n.opacity); + return function(y) { + return e.h = r(y), e.c = i(y), e.l = a(y), e.opacity = s(y), e + ""; + }; + }; +} +const mr = dr(In); +function gr(t, e) { + t = t.slice(); + var n = 0, r = t.length - 1, i = t[n], a = t[r], s; + return a < i && (s = n, n = r, r = s, s = i, i = a, a = s), t[n] = e.floor(i), t[r] = e.ceil(a), t; +} +var ae = /* @__PURE__ */ new Date(), se = /* @__PURE__ */ new Date(); +function nt(t, e, n, r) { + function i(a) { + return t(a = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+a)), a; + } + return i.floor = function(a) { + return t(a = /* @__PURE__ */ new Date(+a)), a; + }, i.ceil = function(a) { + return t(a = new Date(a - 1)), e(a, 1), t(a), a; + }, i.round = function(a) { + var s = i(a), y = i.ceil(a); + return a - s < y - a ? s : y; + }, i.offset = function(a, s) { + return e(a = /* @__PURE__ */ new Date(+a), s == null ? 1 : Math.floor(s)), a; + }, i.range = function(a, s, y) { + var _ = [], k; + if (a = i.ceil(a), y = y == null ? 1 : Math.floor(y), !(a < s) || !(y > 0)) + return _; + do + _.push(k = /* @__PURE__ */ new Date(+a)), e(a, y), t(a); + while (k < a && a < s); + return _; + }, i.filter = function(a) { + return nt(function(s) { + if (s >= s) + for (; t(s), !a(s); ) + s.setTime(s - 1); + }, function(s, y) { + if (s >= s) + if (y < 0) + for (; ++y <= 0; ) + for (; e(s, -1), !a(s); ) + ; + else + for (; --y >= 0; ) + for (; e(s, 1), !a(s); ) + ; + }); + }, n && (i.count = function(a, s) { + return ae.setTime(+a), se.setTime(+s), t(ae), t(se), Math.floor(n(ae, se)); + }, i.every = function(a) { + return a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(r ? function(s) { + return r(s) % a === 0; + } : function(s) { + return i.count(0, s) % a === 0; + }) : i; + }), i; +} +var Zt = nt(function() { +}, function(t, e) { + t.setTime(+t + e); +}, function(t, e) { + return e - t; +}); +Zt.every = function(t) { + return t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? nt(function(e) { + e.setTime(Math.floor(e / t) * t); + }, function(e, n) { + e.setTime(+e + n * t); + }, function(e, n) { + return (n - e) / t; + }) : Zt; +}; +const he = Zt; +Zt.range; +const ft = 1e3, at = ft * 60, ht = at * 60, mt = ht * 24, Te = mt * 7, Ee = mt * 30, oe = mt * 365; +var an = nt(function(t) { + t.setTime(t - t.getMilliseconds()); +}, function(t, e) { + t.setTime(+t + e * ft); +}, function(t, e) { + return (e - t) / ft; +}, function(t) { + return t.getUTCSeconds(); +}); +const dt = an; +an.range; +var sn = nt(function(t) { + t.setTime(t - t.getMilliseconds() - t.getSeconds() * ft); +}, function(t, e) { + t.setTime(+t + e * at); +}, function(t, e) { + return (e - t) / at; +}, function(t) { + return t.getMinutes(); +}); +const Xt = sn; +sn.range; +var on = nt(function(t) { + t.setTime(t - t.getMilliseconds() - t.getSeconds() * ft - t.getMinutes() * at); +}, function(t, e) { + t.setTime(+t + e * ht); +}, function(t, e) { + return (e - t) / ht; +}, function(t) { + return t.getHours(); +}); +const qt = on; +on.range; +var cn = nt( + (t) => t.setHours(0, 0, 0, 0), + (t, e) => t.setDate(t.getDate() + e), + (t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * at) / mt, + (t) => t.getDate() - 1 +); +const wt = cn; +cn.range; +function kt(t) { + return nt(function(e) { + e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0); + }, function(e, n) { + e.setDate(e.getDate() + n * 7); + }, function(e, n) { + return (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * at) / Te; + }); +} +var Et = kt(0), Ut = kt(1), un = kt(2), ln = kt(3), gt = kt(4), fn = kt(5), hn = kt(6); +Et.range; +Ut.range; +un.range; +ln.range; +gt.range; +fn.range; +hn.range; +var dn = nt(function(t) { + t.setDate(1), t.setHours(0, 0, 0, 0); +}, function(t, e) { + t.setMonth(t.getMonth() + e); +}, function(t, e) { + return e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12; +}, function(t) { + return t.getMonth(); +}); +const Gt = dn; +dn.range; +var ve = nt(function(t) { + t.setMonth(0, 1), t.setHours(0, 0, 0, 0); +}, function(t, e) { + t.setFullYear(t.getFullYear() + e); +}, function(t, e) { + return e.getFullYear() - t.getFullYear(); +}, function(t) { + return t.getFullYear(); +}); +ve.every = function(t) { + return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : nt(function(e) { + e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0); + }, function(e, n) { + e.setFullYear(e.getFullYear() + n * t); + }); +}; +const yt = ve; +ve.range; +var mn = nt(function(t) { + t.setUTCHours(0, 0, 0, 0); +}, function(t, e) { + t.setUTCDate(t.getUTCDate() + e); +}, function(t, e) { + return (e - t) / mt; +}, function(t) { + return t.getUTCDate() - 1; +}); +const gn = mn; +mn.range; +function pt(t) { + return nt(function(e) { + e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0); + }, function(e, n) { + e.setUTCDate(e.getUTCDate() + n * 7); + }, function(e, n) { + return (n - e) / Te; + }); +} +var yn = pt(0), jt = pt(1), yr = pt(2), kr = pt(3), Dt = pt(4), pr = pt(5), Tr = pt(6); +yn.range; +jt.range; +yr.range; +kr.range; +Dt.range; +pr.range; +Tr.range; +var be = nt(function(t) { + t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0); +}, function(t, e) { + t.setUTCFullYear(t.getUTCFullYear() + e); +}, function(t, e) { + return e.getUTCFullYear() - t.getUTCFullYear(); +}, function(t) { + return t.getUTCFullYear(); +}); +be.every = function(t) { + return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : nt(function(e) { + e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0); + }, function(e, n) { + e.setUTCFullYear(e.getUTCFullYear() + n * t); + }); +}; +const Lt = be; +be.range; +function vr(t, e, n, r, i, a) { + const s = [ + [dt, 1, ft], + [dt, 5, 5 * ft], + [dt, 15, 15 * ft], + [dt, 30, 30 * ft], + [a, 1, at], + [a, 5, 5 * at], + [a, 15, 15 * at], + [a, 30, 30 * at], + [i, 1, ht], + [i, 3, 3 * ht], + [i, 6, 6 * ht], + [i, 12, 12 * ht], + [r, 1, mt], + [r, 2, 2 * mt], + [n, 1, Te], + [e, 1, Ee], + [e, 3, 3 * Ee], + [t, 1, oe] + ]; + function y(k, D, U) { + const w = D < k; + w && ([k, D] = [D, k]); + const x = U && typeof U.range == "function" ? U : _(k, D, U), q = x ? x.range(k, +D + 1) : []; + return w ? q.reverse() : q; + } + function _(k, D, U) { + const w = Math.abs(D - k) / U, x = qn(([, , L]) => L).right(s, w); + if (x === s.length) + return t.every(Ue(k / oe, D / oe, U)); + if (x === 0) + return he.every(Math.max(Ue(k, D, U), 1)); + const [q, g] = s[w / s[x - 1][2] < s[x][2] / w ? x - 1 : x]; + return q.every(g); + } + return [y, _]; +} +const [br, xr] = vr(yt, Gt, Et, wt, qt, Xt); +function ce(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 ue(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 _t(t, e, n) { + return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 }; +} +function wr(t) { + var e = t.dateTime, n = t.date, r = t.time, i = t.periods, a = t.days, s = t.shortDays, y = t.months, _ = t.shortMonths, k = Yt(i), D = Ft(i), U = Yt(a), w = Ft(a), x = Yt(s), q = Ft(s), g = Yt(y), L = Ft(y), O = Yt(_), W = Ft(_), B = { + a: c, + A: X, + b: f, + B: h, + c: null, + d: Ne, + e: Ne, + f: Xr, + g: ni, + G: ii, + H: Rr, + I: Br, + j: Zr, + L: kn, + m: qr, + M: Gr, + p: Y, + q: G, + Q: Pe, + s: Re, + S: jr, + u: Qr, + U: $r, + V: Jr, + w: Kr, + W: ti, + x: null, + X: null, + y: ei, + Y: ri, + Z: ai, + "%": Ve + }, Z = { + a: z, + A: H, + b: I, + B: V, + c: null, + d: He, + e: He, + f: ui, + g: Ti, + G: bi, + H: si, + I: oi, + j: ci, + L: Tn, + m: li, + M: fi, + p: it, + q: rt, + Q: Pe, + s: Re, + S: hi, + u: di, + U: mi, + V: gi, + w: yi, + W: ki, + x: null, + X: null, + y: pi, + Y: vi, + Z: xi, + "%": Ve + }, Q = { + a: C, + A: b, + b: o, + B: d, + c: m, + d: Oe, + e: Oe, + f: Nr, + g: We, + G: Ie, + H: ze, + I: ze, + j: Ir, + L: zr, + m: Ar, + M: Wr, + p: F, + q: Er, + Q: Vr, + s: Pr, + S: Or, + u: _r, + U: Yr, + V: Fr, + w: Sr, + W: Ur, + x: l, + X: S, + y: We, + Y: Ie, + Z: Lr, + "%": Hr + }; + B.x = v(n, B), B.X = v(r, B), B.c = v(e, B), Z.x = v(n, Z), Z.X = v(r, Z), Z.c = v(e, Z); + function v(p, E) { + return function(M) { + var u = [], R = -1, N = 0, j = p.length, $, tt, St; + for (M instanceof Date || (M = /* @__PURE__ */ new Date(+M)); ++R < j; ) + p.charCodeAt(R) === 37 && (u.push(p.slice(N, R)), (tt = Ae[$ = p.charAt(++R)]) != null ? $ = p.charAt(++R) : tt = $ === "e" ? " " : "0", (St = E[$]) && ($ = St(M, tt)), u.push($), N = R + 1); + return u.push(p.slice(N, R)), u.join(""); + }; + } + function A(p, E) { + return function(M) { + var u = _t(1900, void 0, 1), R = T(u, p, M += "", 0), N, j; + if (R != M.length) + return null; + if ("Q" in u) + return new Date(u.Q); + if ("s" in u) + return new Date(u.s * 1e3 + ("L" in u ? u.L : 0)); + if (E && !("Z" in u) && (u.Z = 0), "p" in u && (u.H = u.H % 12 + u.p * 12), u.m === void 0 && (u.m = "q" in u ? u.q : 0), "V" in u) { + if (u.V < 1 || u.V > 53) + return null; + "w" in u || (u.w = 1), "Z" in u ? (N = ue(_t(u.y, 0, 1)), j = N.getUTCDay(), N = j > 4 || j === 0 ? jt.ceil(N) : jt(N), N = gn.offset(N, (u.V - 1) * 7), u.y = N.getUTCFullYear(), u.m = N.getUTCMonth(), u.d = N.getUTCDate() + (u.w + 6) % 7) : (N = ce(_t(u.y, 0, 1)), j = N.getDay(), N = j > 4 || j === 0 ? Ut.ceil(N) : Ut(N), N = wt.offset(N, (u.V - 1) * 7), u.y = N.getFullYear(), u.m = N.getMonth(), u.d = N.getDate() + (u.w + 6) % 7); + } else + ("W" in u || "U" in u) && ("w" in u || (u.w = "u" in u ? u.u % 7 : "W" in u ? 1 : 0), j = "Z" in u ? ue(_t(u.y, 0, 1)).getUTCDay() : ce(_t(u.y, 0, 1)).getDay(), u.m = 0, u.d = "W" in u ? (u.w + 6) % 7 + u.W * 7 - (j + 5) % 7 : u.w + u.U * 7 - (j + 6) % 7); + return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, ue(u)) : ce(u); + }; + } + function T(p, E, M, u) { + for (var R = 0, N = E.length, j = M.length, $, tt; R < N; ) { + if (u >= j) + return -1; + if ($ = E.charCodeAt(R++), $ === 37) { + if ($ = E.charAt(R++), tt = Q[$ in Ae ? E.charAt(R++) : $], !tt || (u = tt(p, M, u)) < 0) + return -1; + } else if ($ != M.charCodeAt(u++)) + return -1; + } + return u; + } + function F(p, E, M) { + var u = k.exec(E.slice(M)); + return u ? (p.p = D.get(u[0].toLowerCase()), M + u[0].length) : -1; + } + function C(p, E, M) { + var u = x.exec(E.slice(M)); + return u ? (p.w = q.get(u[0].toLowerCase()), M + u[0].length) : -1; + } + function b(p, E, M) { + var u = U.exec(E.slice(M)); + return u ? (p.w = w.get(u[0].toLowerCase()), M + u[0].length) : -1; + } + function o(p, E, M) { + var u = O.exec(E.slice(M)); + return u ? (p.m = W.get(u[0].toLowerCase()), M + u[0].length) : -1; + } + function d(p, E, M) { + var u = g.exec(E.slice(M)); + return u ? (p.m = L.get(u[0].toLowerCase()), M + u[0].length) : -1; + } + function m(p, E, M) { + return T(p, e, E, M); + } + function l(p, E, M) { + return T(p, n, E, M); + } + function S(p, E, M) { + return T(p, r, E, M); + } + function c(p) { + return s[p.getDay()]; + } + function X(p) { + return a[p.getDay()]; + } + function f(p) { + return _[p.getMonth()]; + } + function h(p) { + return y[p.getMonth()]; + } + function Y(p) { + return i[+(p.getHours() >= 12)]; + } + function G(p) { + return 1 + ~~(p.getMonth() / 3); + } + function z(p) { + return s[p.getUTCDay()]; + } + function H(p) { + return a[p.getUTCDay()]; + } + function I(p) { + return _[p.getUTCMonth()]; + } + function V(p) { + return y[p.getUTCMonth()]; + } + function it(p) { + return i[+(p.getUTCHours() >= 12)]; + } + function rt(p) { + return 1 + ~~(p.getUTCMonth() / 3); + } + return { + format: function(p) { + var E = v(p += "", B); + return E.toString = function() { + return p; + }, E; + }, + parse: function(p) { + var E = A(p += "", !1); + return E.toString = function() { + return p; + }, E; + }, + utcFormat: function(p) { + var E = v(p += "", Z); + return E.toString = function() { + return p; + }, E; + }, + utcParse: function(p) { + var E = A(p += "", !0); + return E.toString = function() { + return p; + }, E; + } + }; +} +var Ae = { "-": "", _: " ", 0: "0" }, K = /^\s*\d+/, Dr = /^%/, Cr = /[\\^$*+?|[\]().{}]/g; +function P(t, e, n) { + var r = t < 0 ? "-" : "", i = (r ? -t : t) + "", a = i.length; + return r + (a < n ? new Array(n - a + 1).join(e) + i : i); +} +function Mr(t) { + return t.replace(Cr, "\\$&"); +} +function Yt(t) { + return new RegExp("^(?:" + t.map(Mr).join("|") + ")", "i"); +} +function Ft(t) { + return new Map(t.map((e, n) => [e.toLowerCase(), n])); +} +function Sr(t, e, n) { + var r = K.exec(e.slice(n, n + 1)); + return r ? (t.w = +r[0], n + r[0].length) : -1; +} +function _r(t, e, n) { + var r = K.exec(e.slice(n, n + 1)); + return r ? (t.u = +r[0], n + r[0].length) : -1; +} +function Yr(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.U = +r[0], n + r[0].length) : -1; +} +function Fr(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.V = +r[0], n + r[0].length) : -1; +} +function Ur(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.W = +r[0], n + r[0].length) : -1; +} +function Ie(t, e, n) { + var r = K.exec(e.slice(n, n + 4)); + return r ? (t.y = +r[0], n + r[0].length) : -1; +} +function We(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1; +} +function Lr(t, e, n) { + var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6)); + return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1; +} +function Er(t, e, n) { + var r = K.exec(e.slice(n, n + 1)); + return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1; +} +function Ar(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.m = r[0] - 1, n + r[0].length) : -1; +} +function Oe(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.d = +r[0], n + r[0].length) : -1; +} +function Ir(t, e, n) { + var r = K.exec(e.slice(n, n + 3)); + return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1; +} +function ze(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.H = +r[0], n + r[0].length) : -1; +} +function Wr(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.M = +r[0], n + r[0].length) : -1; +} +function Or(t, e, n) { + var r = K.exec(e.slice(n, n + 2)); + return r ? (t.S = +r[0], n + r[0].length) : -1; +} +function zr(t, e, n) { + var r = K.exec(e.slice(n, n + 3)); + return r ? (t.L = +r[0], n + r[0].length) : -1; +} +function Nr(t, e, n) { + var r = K.exec(e.slice(n, n + 6)); + return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1; +} +function Hr(t, e, n) { + var r = Dr.exec(e.slice(n, n + 1)); + return r ? n + r[0].length : -1; +} +function Vr(t, e, n) { + var r = K.exec(e.slice(n)); + return r ? (t.Q = +r[0], n + r[0].length) : -1; +} +function Pr(t, e, n) { + var r = K.exec(e.slice(n)); + return r ? (t.s = +r[0], n + r[0].length) : -1; +} +function Ne(t, e) { + return P(t.getDate(), e, 2); +} +function Rr(t, e) { + return P(t.getHours(), e, 2); +} +function Br(t, e) { + return P(t.getHours() % 12 || 12, e, 2); +} +function Zr(t, e) { + return P(1 + wt.count(yt(t), t), e, 3); +} +function kn(t, e) { + return P(t.getMilliseconds(), e, 3); +} +function Xr(t, e) { + return kn(t, e) + "000"; +} +function qr(t, e) { + return P(t.getMonth() + 1, e, 2); +} +function Gr(t, e) { + return P(t.getMinutes(), e, 2); +} +function jr(t, e) { + return P(t.getSeconds(), e, 2); +} +function Qr(t) { + var e = t.getDay(); + return e === 0 ? 7 : e; +} +function $r(t, e) { + return P(Et.count(yt(t) - 1, t), e, 2); +} +function pn(t) { + var e = t.getDay(); + return e >= 4 || e === 0 ? gt(t) : gt.ceil(t); +} +function Jr(t, e) { + return t = pn(t), P(gt.count(yt(t), t) + (yt(t).getDay() === 4), e, 2); +} +function Kr(t) { + return t.getDay(); +} +function ti(t, e) { + return P(Ut.count(yt(t) - 1, t), e, 2); +} +function ei(t, e) { + return P(t.getFullYear() % 100, e, 2); +} +function ni(t, e) { + return t = pn(t), P(t.getFullYear() % 100, e, 2); +} +function ri(t, e) { + return P(t.getFullYear() % 1e4, e, 4); +} +function ii(t, e) { + var n = t.getDay(); + return t = n >= 4 || n === 0 ? gt(t) : gt.ceil(t), P(t.getFullYear() % 1e4, e, 4); +} +function ai(t) { + var e = t.getTimezoneOffset(); + return (e > 0 ? "-" : (e *= -1, "+")) + P(e / 60 | 0, "0", 2) + P(e % 60, "0", 2); +} +function He(t, e) { + return P(t.getUTCDate(), e, 2); +} +function si(t, e) { + return P(t.getUTCHours(), e, 2); +} +function oi(t, e) { + return P(t.getUTCHours() % 12 || 12, e, 2); +} +function ci(t, e) { + return P(1 + gn.count(Lt(t), t), e, 3); +} +function Tn(t, e) { + return P(t.getUTCMilliseconds(), e, 3); +} +function ui(t, e) { + return Tn(t, e) + "000"; +} +function li(t, e) { + return P(t.getUTCMonth() + 1, e, 2); +} +function fi(t, e) { + return P(t.getUTCMinutes(), e, 2); +} +function hi(t, e) { + return P(t.getUTCSeconds(), e, 2); +} +function di(t) { + var e = t.getUTCDay(); + return e === 0 ? 7 : e; +} +function mi(t, e) { + return P(yn.count(Lt(t) - 1, t), e, 2); +} +function vn(t) { + var e = t.getUTCDay(); + return e >= 4 || e === 0 ? Dt(t) : Dt.ceil(t); +} +function gi(t, e) { + return t = vn(t), P(Dt.count(Lt(t), t) + (Lt(t).getUTCDay() === 4), e, 2); +} +function yi(t) { + return t.getUTCDay(); +} +function ki(t, e) { + return P(jt.count(Lt(t) - 1, t), e, 2); +} +function pi(t, e) { + return P(t.getUTCFullYear() % 100, e, 2); +} +function Ti(t, e) { + return t = vn(t), P(t.getUTCFullYear() % 100, e, 2); +} +function vi(t, e) { + return P(t.getUTCFullYear() % 1e4, e, 4); +} +function bi(t, e) { + var n = t.getUTCDay(); + return t = n >= 4 || n === 0 ? Dt(t) : Dt.ceil(t), P(t.getUTCFullYear() % 1e4, e, 4); +} +function xi() { + return "+0000"; +} +function Ve() { + return "%"; +} +function Pe(t) { + return +t; +} +function Re(t) { + return Math.floor(+t / 1e3); +} +var Tt, Qt; +wi({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] +}); +function wi(t) { + return Tt = wr(t), Qt = Tt.format, Tt.parse, Tt.utcFormat, Tt.utcParse, Tt; +} +function Di(t) { + return new Date(t); +} +function Ci(t) { + return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t); +} +function bn(t, e, n, r, i, a, s, y, _, k) { + var D = Gn(), U = D.invert, w = D.domain, x = k(".%L"), q = k(":%S"), g = k("%I:%M"), L = k("%I %p"), O = k("%a %d"), W = k("%b %d"), B = k("%B"), Z = k("%Y"); + function Q(v) { + return (_(v) < v ? x : y(v) < v ? q : s(v) < v ? g : a(v) < v ? L : r(v) < v ? i(v) < v ? O : W : n(v) < v ? B : Z)(v); + } + return D.invert = function(v) { + return new Date(U(v)); + }, D.domain = function(v) { + return arguments.length ? w(Array.from(v, Ci)) : w().map(Di); + }, D.ticks = function(v) { + var A = w(); + return t(A[0], A[A.length - 1], v ?? 10); + }, D.tickFormat = function(v, A) { + return A == null ? Q : k(A); + }, D.nice = function(v) { + var A = w(); + return (!v || typeof v.range != "function") && (v = e(A[0], A[A.length - 1], v ?? 10)), v ? w(gr(A, v)) : D; + }, D.copy = function() { + return jn(D, bn(t, e, n, r, i, a, s, y, _, k)); + }, D; +} +function Mi() { + return $n.apply(bn(br, xr, yt, Gt, Et, wt, qt, Xt, dt, Qt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments); +} +var de = function() { + var t = function(b, o, d, m) { + for (d = d || {}, m = b.length; m--; d[b[m]] = o) + ; + return d; + }, e = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], n = [1, 25], r = [1, 26], i = [1, 27], a = [1, 28], s = [1, 29], y = [1, 30], _ = [1, 31], k = [1, 9], D = [1, 10], U = [1, 11], w = [1, 12], x = [1, 13], q = [1, 14], g = [1, 15], L = [1, 16], O = [1, 18], W = [1, 19], B = [1, 20], Z = [1, 21], Q = [1, 22], v = [1, 24], A = [1, 32], T = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, gantt: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NL: 10, weekday: 11, weekday_monday: 12, weekday_tuesday: 13, weekday_wednesday: 14, weekday_thursday: 15, weekday_friday: 16, weekday_saturday: 17, weekday_sunday: 18, dateFormat: 19, inclusiveEndDates: 20, topAxis: 21, axisFormat: 22, tickInterval: 23, excludes: 24, includes: 25, todayMarker: 26, title: 27, acc_title: 28, acc_title_value: 29, acc_descr: 30, acc_descr_value: 31, acc_descr_multiline_value: 32, section: 33, clickStatement: 34, taskTxt: 35, taskData: 36, click: 37, callbackname: 38, callbackargs: 39, href: 40, clickStatementDebug: 41, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]], + performAction: function(o, d, m, l, S, c, X) { + var f = c.length - 1; + switch (S) { + case 1: + return c[f - 1]; + case 2: + this.$ = []; + break; + case 3: + c[f - 1].push(c[f]), this.$ = c[f - 1]; + break; + case 4: + case 5: + this.$ = c[f]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + l.setWeekday("monday"); + break; + case 9: + l.setWeekday("tuesday"); + break; + case 10: + l.setWeekday("wednesday"); + break; + case 11: + l.setWeekday("thursday"); + break; + case 12: + l.setWeekday("friday"); + break; + case 13: + l.setWeekday("saturday"); + break; + case 14: + l.setWeekday("sunday"); + break; + case 15: + l.setDateFormat(c[f].substr(11)), this.$ = c[f].substr(11); + break; + case 16: + l.enableInclusiveEndDates(), this.$ = c[f].substr(18); + break; + case 17: + l.TopAxis(), this.$ = c[f].substr(8); + break; + case 18: + l.setAxisFormat(c[f].substr(11)), this.$ = c[f].substr(11); + break; + case 19: + l.setTickInterval(c[f].substr(13)), this.$ = c[f].substr(13); + break; + case 20: + l.setExcludes(c[f].substr(9)), this.$ = c[f].substr(9); + break; + case 21: + l.setIncludes(c[f].substr(9)), this.$ = c[f].substr(9); + break; + case 22: + l.setTodayMarker(c[f].substr(12)), this.$ = c[f].substr(12); + break; + case 24: + l.setDiagramTitle(c[f].substr(6)), this.$ = c[f].substr(6); + break; + case 25: + this.$ = c[f].trim(), l.setAccTitle(this.$); + break; + case 26: + case 27: + this.$ = c[f].trim(), l.setAccDescription(this.$); + break; + case 28: + l.addSection(c[f].substr(8)), this.$ = c[f].substr(8); + break; + case 30: + l.addTask(c[f - 1], c[f]), this.$ = "task"; + break; + case 31: + this.$ = c[f - 1], l.setClickEvent(c[f - 1], c[f], null); + break; + case 32: + this.$ = c[f - 2], l.setClickEvent(c[f - 2], c[f - 1], c[f]); + break; + case 33: + this.$ = c[f - 2], l.setClickEvent(c[f - 2], c[f - 1], null), l.setLink(c[f - 2], c[f]); + break; + case 34: + this.$ = c[f - 3], l.setClickEvent(c[f - 3], c[f - 2], c[f - 1]), l.setLink(c[f - 3], c[f]); + break; + case 35: + this.$ = c[f - 2], l.setClickEvent(c[f - 2], c[f], null), l.setLink(c[f - 2], c[f - 1]); + break; + case 36: + this.$ = c[f - 3], l.setClickEvent(c[f - 3], c[f - 1], c[f]), l.setLink(c[f - 3], c[f - 2]); + break; + case 37: + this.$ = c[f - 1], l.setLink(c[f - 1], c[f]); + break; + case 38: + case 44: + this.$ = c[f - 1] + " " + c[f]; + break; + case 39: + case 40: + case 42: + this.$ = c[f - 2] + " " + c[f - 1] + " " + c[f]; + break; + case 41: + case 43: + this.$ = c[f - 3] + " " + c[f - 2] + " " + c[f - 1] + " " + c[f]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: n, 13: r, 14: i, 15: a, 16: s, 17: y, 18: _, 19: k, 20: D, 21: U, 22: w, 23: x, 24: q, 25: g, 26: L, 27: O, 28: W, 30: B, 32: Z, 33: Q, 34: 23, 35: v, 37: A }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 33, 11: 17, 12: n, 13: r, 14: i, 15: a, 16: s, 17: y, 18: _, 19: k, 20: D, 21: U, 22: w, 23: x, 24: q, 25: g, 26: L, 27: O, 28: W, 30: B, 32: Z, 33: Q, 34: 23, 35: v, 37: A }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 15]), t(e, [2, 16]), t(e, [2, 17]), t(e, [2, 18]), t(e, [2, 19]), t(e, [2, 20]), t(e, [2, 21]), t(e, [2, 22]), t(e, [2, 23]), t(e, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, t(e, [2, 27]), t(e, [2, 28]), t(e, [2, 29]), { 36: [1, 36] }, t(e, [2, 8]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 11]), t(e, [2, 12]), t(e, [2, 13]), t(e, [2, 14]), { 38: [1, 37], 40: [1, 38] }, t(e, [2, 4]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 30]), t(e, [2, 31], { 39: [1, 39], 40: [1, 40] }), t(e, [2, 37], { 38: [1, 41] }), t(e, [2, 32], { 40: [1, 42] }), t(e, [2, 33]), t(e, [2, 35], { 39: [1, 43] }), t(e, [2, 34]), t(e, [2, 36])], + defaultActions: {}, + parseError: function(o, d) { + if (d.recoverable) + this.trace(o); + else { + var m = new Error(o); + throw m.hash = d, m; + } + }, + parse: function(o) { + var d = this, m = [0], l = [], S = [null], c = [], X = this.table, f = "", h = 0, Y = 0, G = 2, z = 1, H = c.slice.call(arguments, 1), I = Object.create(this.lexer), V = { yy: {} }; + for (var it in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, it) && (V.yy[it] = this.yy[it]); + I.setInput(o, V.yy), V.yy.lexer = I, V.yy.parser = this, typeof I.yylloc > "u" && (I.yylloc = {}); + var rt = I.yylloc; + c.push(rt); + var p = I.options && I.options.ranges; + typeof V.yy.parseError == "function" ? this.parseError = V.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function E() { + var ct; + return ct = l.pop() || I.lex() || z, typeof ct != "number" && (ct instanceof Array && (l = ct, ct = l.pop()), ct = d.symbols_[ct] || ct), ct; + } + for (var M, u, R, N, j = {}, $, tt, St, Ot; ; ) { + if (u = m[m.length - 1], this.defaultActions[u] ? R = this.defaultActions[u] : ((M === null || typeof M > "u") && (M = E()), R = X[u] && X[u][M]), typeof R > "u" || !R.length || !R[0]) { + var Jt = ""; + Ot = []; + for ($ in X[u]) + this.terminals_[$] && $ > G && Ot.push("'" + this.terminals_[$] + "'"); + I.showPosition ? Jt = "Parse error on line " + (h + 1) + `: +` + I.showPosition() + ` +Expecting ` + Ot.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : Jt = "Parse error on line " + (h + 1) + ": Unexpected " + (M == z ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(Jt, { + text: I.match, + token: this.terminals_[M] || M, + line: I.yylineno, + loc: rt, + expected: Ot + }); + } + if (R[0] instanceof Array && R.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + u + ", token: " + M); + switch (R[0]) { + case 1: + m.push(M), S.push(I.yytext), c.push(I.yylloc), m.push(R[1]), M = null, Y = I.yyleng, f = I.yytext, h = I.yylineno, rt = I.yylloc; + break; + case 2: + if (tt = this.productions_[R[1]][1], j.$ = S[S.length - tt], j._$ = { + first_line: c[c.length - (tt || 1)].first_line, + last_line: c[c.length - 1].last_line, + first_column: c[c.length - (tt || 1)].first_column, + last_column: c[c.length - 1].last_column + }, p && (j._$.range = [ + c[c.length - (tt || 1)].range[0], + c[c.length - 1].range[1] + ]), N = this.performAction.apply(j, [ + f, + Y, + h, + V.yy, + R[1], + S, + c + ].concat(H)), typeof N < "u") + return N; + tt && (m = m.slice(0, -1 * tt * 2), S = S.slice(0, -1 * tt), c = c.slice(0, -1 * tt)), m.push(this.productions_[R[1]][0]), S.push(j.$), c.push(j._$), St = X[m[m.length - 2]][m[m.length - 1]], m.push(St); + break; + case 3: + return !0; + } + } + return !0; + } + }, F = function() { + var b = { + EOF: 1, + parseError: function(d, m) { + if (this.yy.parser) + this.yy.parser.parseError(d, m); + else + throw new Error(d); + }, + // resets the lexer, sets new input + setInput: function(o, d) { + return this.yy = d || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var o = this._input[0]; + this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o; + var d = o.match(/(?:\r\n?|\n).*/g); + return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o; + }, + // unshifts one char (or a string) into the input + unput: function(o) { + var d = o.length, m = o.split(/(?:\r\n?|\n)/g); + this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d; + var l = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), m.length - 1 && (this.yylineno -= m.length - 1); + var S = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: m ? (m.length === l.length ? this.yylloc.first_column : 0) + l[l.length - m.length].length - m[0].length : this.yylloc.first_column - d + }, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(o) { + this.unput(this.match.slice(o)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var o = this.matched.substr(0, this.matched.length - this.match.length); + return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var o = this.match; + return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var o = this.pastInput(), d = new Array(o.length + 1).join("-"); + return o + this.upcomingInput() + ` +` + d + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(o, d) { + var m, l, S; + if (this.options.backtrack_lexer && (S = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (S.yylloc.range = this.yylloc.range.slice(0))), l = o[0].match(/(?:\r\n?|\n).*/g), l && (this.yylineno += l.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: l ? l[l.length - 1].length - l[l.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length + }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], m = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), m) + return m; + if (this._backtrack) { + for (var c in S) + this[c] = S[c]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var o, d, m, l; + this._more || (this.yytext = "", this.match = ""); + for (var S = this._currentRules(), c = 0; c < S.length; c++) + if (m = this._input.match(this.rules[S[c]]), m && (!d || m[0].length > d[0].length)) { + if (d = m, l = c, this.options.backtrack_lexer) { + if (o = this.test_match(m, S[c]), o !== !1) + return o; + if (this._backtrack) { + d = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return d ? (o = this.test_match(d, S[l]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var d = this.next(); + return d || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(d) { + this.conditionStack.push(d); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var d = this.conditionStack.length - 1; + return d > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(d) { + return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(d) { + this.begin(d); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(d, m, l, S) { + switch (l) { + case 0: + return this.begin("open_directive"), "open_directive"; + case 1: + return this.begin("acc_title"), 28; + case 2: + return this.popState(), "acc_title_value"; + case 3: + return this.begin("acc_descr"), 30; + case 4: + return this.popState(), "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + return 10; + case 12: + break; + case 13: + break; + case 14: + break; + case 15: + this.begin("href"); + break; + case 16: + this.popState(); + break; + case 17: + return 40; + case 18: + this.begin("callbackname"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(), this.begin("callbackargs"); + break; + case 21: + return 38; + case 22: + this.popState(); + break; + case 23: + return 39; + case 24: + this.begin("click"); + break; + case 25: + this.popState(); + break; + case 26: + return 37; + case 27: + return 4; + case 28: + return 19; + case 29: + return 20; + case 30: + return 21; + case 31: + return 22; + case 32: + return 23; + case 33: + return 25; + case 34: + return 24; + case 35: + return 26; + case 36: + return 12; + case 37: + return 13; + case 38: + return 14; + case 39: + return 15; + case 40: + return 16; + case 41: + return 17; + case 42: + return 18; + case 43: + return "date"; + case 44: + return 27; + case 45: + return "accDescription"; + case 46: + return 33; + case 47: + return 35; + case 48: + return 36; + case 49: + return ":"; + case 50: + return 6; + case 51: + return "INVALID"; + } + }, + rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, callbackargs: { rules: [22, 23], inclusive: !1 }, callbackname: { rules: [19, 20, 21], inclusive: !1 }, href: { rules: [16, 17], inclusive: !1 }, click: { rules: [25, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 18, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], inclusive: !0 } } + }; + return b; + }(); + T.lexer = F; + function C() { + this.yy = {}; + } + return C.prototype = T, T.Parser = C, new C(); +}(); +de.parser = de; +const Si = de; +var xn = { exports: {} }; +(function(t, e) { + (function(n, r) { + t.exports = r(); + })(ke, function() { + var n = "day"; + return function(r, i, a) { + var s = function(k) { + return k.add(4 - k.isoWeekday(), n); + }, y = i.prototype; + y.isoWeekYear = function() { + return s(this).year(); + }, y.isoWeek = function(k) { + if (!this.$utils().u(k)) + return this.add(7 * (k - this.isoWeek()), n); + var D, U, w, x, q = s(this), g = (D = this.isoWeekYear(), U = this.$u, w = (U ? a.utc : a)().year(D).startOf("year"), x = 4 - w.isoWeekday(), w.isoWeekday() > 4 && (x += 7), w.add(x, n)); + return q.diff(g, "week") + 1; + }, y.isoWeekday = function(k) { + return this.$utils().u(k) ? this.day() || 7 : this.day(this.day() % 7 ? k : k - 7); + }; + var _ = y.startOf; + y.startOf = function(k, D) { + var U = this.$utils(), w = !!U.u(D) || D; + return U.p(k) === "isoweek" ? w ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : _.bind(this)(k, D); + }; + }; + }); +})(xn); +var _i = xn.exports; +const Yi = /* @__PURE__ */ pe(_i); +var wn = { exports: {} }; +(function(t, e) { + (function(n, r) { + t.exports = r(); + })(ke, function() { + var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, i = /\d\d/, a = /\d\d?/, s = /\d*[^-_:/,()\s\d]+/, y = {}, _ = function(g) { + return (g = +g) + (g > 68 ? 1900 : 2e3); + }, k = function(g) { + return function(L) { + this[g] = +L; + }; + }, D = [/[+-]\d\d:?(\d\d)?|Z/, function(g) { + (this.zone || (this.zone = {})).offset = function(L) { + if (!L || L === "Z") + return 0; + var O = L.match(/([+-]|\d\d)/g), W = 60 * O[1] + (+O[2] || 0); + return W === 0 ? 0 : O[0] === "+" ? -W : W; + }(g); + }], U = function(g) { + var L = y[g]; + return L && (L.indexOf ? L : L.s.concat(L.f)); + }, w = function(g, L) { + var O, W = y.meridiem; + if (W) { + for (var B = 1; B <= 24; B += 1) + if (g.indexOf(W(B, 0, L)) > -1) { + O = B > 12; + break; + } + } else + O = g === (L ? "pm" : "PM"); + return O; + }, x = { A: [s, function(g) { + this.afternoon = w(g, !1); + }], a: [s, function(g) { + this.afternoon = w(g, !0); + }], S: [/\d/, function(g) { + this.milliseconds = 100 * +g; + }], SS: [i, function(g) { + this.milliseconds = 10 * +g; + }], SSS: [/\d{3}/, function(g) { + this.milliseconds = +g; + }], s: [a, k("seconds")], ss: [a, k("seconds")], m: [a, k("minutes")], mm: [a, k("minutes")], H: [a, k("hours")], h: [a, k("hours")], HH: [a, k("hours")], hh: [a, k("hours")], D: [a, k("day")], DD: [i, k("day")], Do: [s, function(g) { + var L = y.ordinal, O = g.match(/\d+/); + if (this.day = O[0], L) + for (var W = 1; W <= 31; W += 1) + L(W).replace(/\[|\]/g, "") === g && (this.day = W); + }], M: [a, k("month")], MM: [i, k("month")], MMM: [s, function(g) { + var L = U("months"), O = (U("monthsShort") || L.map(function(W) { + return W.slice(0, 3); + })).indexOf(g) + 1; + if (O < 1) + throw new Error(); + this.month = O % 12 || O; + }], MMMM: [s, function(g) { + var L = U("months").indexOf(g) + 1; + if (L < 1) + throw new Error(); + this.month = L % 12 || L; + }], Y: [/[+-]?\d+/, k("year")], YY: [i, function(g) { + this.year = _(g); + }], YYYY: [/\d{4}/, k("year")], Z: D, ZZ: D }; + function q(g) { + var L, O; + L = g, O = y && y.formats; + for (var W = (g = L.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(F, C, b) { + var o = b && b.toUpperCase(); + return C || O[b] || n[b] || O[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(d, m, l) { + return m || l.slice(1); + }); + })).match(r), B = W.length, Z = 0; Z < B; Z += 1) { + var Q = W[Z], v = x[Q], A = v && v[0], T = v && v[1]; + W[Z] = T ? { regex: A, parser: T } : Q.replace(/^\[|\]$/g, ""); + } + return function(F) { + for (var C = {}, b = 0, o = 0; b < B; b += 1) { + var d = W[b]; + if (typeof d == "string") + o += d.length; + else { + var m = d.regex, l = d.parser, S = F.slice(o), c = m.exec(S)[0]; + l.call(C, c), F = F.replace(c, ""); + } + } + return function(X) { + var f = X.afternoon; + if (f !== void 0) { + var h = X.hours; + f ? h < 12 && (X.hours += 12) : h === 12 && (X.hours = 0), delete X.afternoon; + } + }(C), C; + }; + } + return function(g, L, O) { + O.p.customParseFormat = !0, g && g.parseTwoDigitYear && (_ = g.parseTwoDigitYear); + var W = L.prototype, B = W.parse; + W.parse = function(Z) { + var Q = Z.date, v = Z.utc, A = Z.args; + this.$u = v; + var T = A[1]; + if (typeof T == "string") { + var F = A[2] === !0, C = A[3] === !0, b = F || C, o = A[2]; + C && (o = A[2]), y = this.$locale(), !F && o && (y = O.Ls[o]), this.$d = function(S, c, X) { + try { + if (["x", "X"].indexOf(c) > -1) + return new Date((c === "X" ? 1e3 : 1) * S); + var f = q(c)(S), h = f.year, Y = f.month, G = f.day, z = f.hours, H = f.minutes, I = f.seconds, V = f.milliseconds, it = f.zone, rt = /* @__PURE__ */ new Date(), p = G || (h || Y ? 1 : rt.getDate()), E = h || rt.getFullYear(), M = 0; + h && !Y || (M = Y > 0 ? Y - 1 : rt.getMonth()); + var u = z || 0, R = H || 0, N = I || 0, j = V || 0; + return it ? new Date(Date.UTC(E, M, p, u, R, N, j + 60 * it.offset * 1e3)) : X ? new Date(Date.UTC(E, M, p, u, R, N, j)) : new Date(E, M, p, u, R, N, j); + } catch { + return /* @__PURE__ */ new Date(""); + } + }(Q, T, v), this.init(), o && o !== !0 && (this.$L = this.locale(o).$L), b && Q != this.format(T) && (this.$d = /* @__PURE__ */ new Date("")), y = {}; + } else if (T instanceof Array) + for (var d = T.length, m = 1; m <= d; m += 1) { + A[1] = T[m - 1]; + var l = O.apply(this, A); + if (l.isValid()) { + this.$d = l.$d, this.$L = l.$L, this.init(); + break; + } + m === d && (this.$d = /* @__PURE__ */ new Date("")); + } + else + B.call(this, Z); + }; + }; + }); +})(wn); +var Fi = wn.exports; +const Ui = /* @__PURE__ */ pe(Fi); +var Dn = { exports: {} }; +(function(t, e) { + (function(n, r) { + t.exports = r(); + })(ke, function() { + return function(n, r) { + var i = r.prototype, a = i.format; + i.format = function(s) { + var y = this, _ = this.$locale(); + if (!this.isValid()) + return a.bind(this)(s); + var k = this.$utils(), D = (s || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(U) { + switch (U) { + case "Q": + return Math.ceil((y.$M + 1) / 3); + case "Do": + return _.ordinal(y.$D); + case "gggg": + return y.weekYear(); + case "GGGG": + return y.isoWeekYear(); + case "wo": + return _.ordinal(y.week(), "W"); + case "w": + case "ww": + return k.s(y.week(), U === "w" ? 1 : 2, "0"); + case "W": + case "WW": + return k.s(y.isoWeek(), U === "W" ? 1 : 2, "0"); + case "k": + case "kk": + return k.s(String(y.$H === 0 ? 24 : y.$H), U === "k" ? 1 : 2, "0"); + case "X": + return Math.floor(y.$d.getTime() / 1e3); + case "x": + return y.$d.getTime(); + case "z": + return "[" + y.offsetName() + "]"; + case "zzz": + return "[" + y.offsetName("long") + "]"; + default: + return U; + } + }); + return a.bind(this)(D); + }; + }; + }); +})(Dn); +var Li = Dn.exports; +const Ei = /* @__PURE__ */ pe(Li); +et.extend(Yi); +et.extend(Ui); +et.extend(Ei); +let st = "", xe = "", we, De = "", At = [], It = [], Ce = {}, Me = [], $t = [], Ct = "", Se = ""; +const Cn = ["active", "done", "crit", "milestone"]; +let _e = [], Wt = !1, Ye = !1, Fe = "sunday", me = 0; +const Ai = function() { + Me = [], $t = [], Ct = "", _e = [], Vt = 0, ye = void 0, Pt = void 0, J = [], st = "", xe = "", Se = "", we = void 0, De = "", At = [], It = [], Wt = !1, Ye = !1, me = 0, Ce = {}, Pn(), Fe = "sunday"; +}, Ii = function(t) { + xe = t; +}, Wi = function() { + return xe; +}, Oi = function(t) { + we = t; +}, zi = function() { + return we; +}, Ni = function(t) { + De = t; +}, Hi = function() { + return De; +}, Vi = function(t) { + st = t; +}, Pi = function() { + Wt = !0; +}, Ri = function() { + return Wt; +}, Bi = function() { + Ye = !0; +}, Zi = function() { + return Ye; +}, Xi = function(t) { + Se = t; +}, qi = function() { + return Se; +}, Gi = function() { + return st; +}, ji = function(t) { + At = t.toLowerCase().split(/[\s,]+/); +}, Qi = function() { + return At; +}, $i = function(t) { + It = t.toLowerCase().split(/[\s,]+/); +}, Ji = function() { + return It; +}, Ki = function() { + return Ce; +}, ta = function(t) { + Ct = t, Me.push(t); +}, ea = function() { + return Me; +}, na = function() { + let t = Be(); + const e = 10; + let n = 0; + for (; !t && n < e; ) + t = Be(), n++; + return $t = J, $t; +}, Mn = function(t, e, n, r) { + return r.includes(t.format(e.trim())) ? !1 : t.isoWeekday() >= 6 && n.includes("weekends") || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(t.format(e.trim())); +}, ra = function(t) { + Fe = t; +}, ia = function() { + return Fe; +}, Sn = function(t, e, n, r) { + if (!n.length || t.manualEndTime) + return; + let i; + t.startTime instanceof Date ? i = et(t.startTime) : i = et(t.startTime, e, !0), i = i.add(1, "d"); + let a; + t.endTime instanceof Date ? a = et(t.endTime) : a = et(t.endTime, e, !0); + const [s, y] = aa( + i, + a, + e, + n, + r + ); + t.endTime = s.toDate(), t.renderEndTime = y; +}, aa = function(t, e, n, r, i) { + let a = !1, s = null; + for (; t <= e; ) + a || (s = e.toDate()), a = Mn(t, n, r, i), a && (e = e.add(1, "d")), t = t.add(1, "d"); + return [e, s]; +}, ge = function(t, e, n) { + n = n.trim(); + const i = /^after\s+([\d\w- ]+)/.exec(n.trim()); + if (i !== null) { + let s = null; + if (i[1].split(" ").forEach(function(y) { + let _ = Mt(y); + _ !== void 0 && (s ? _.endTime > s.endTime && (s = _) : s = _); + }), s) + return s.endTime; + { + const y = /* @__PURE__ */ new Date(); + return y.setHours(0, 0, 0, 0), y; + } + } + let a = et(n, e.trim(), !0); + if (a.isValid()) + return a.toDate(); + { + Rt.debug("Invalid date:" + n), Rt.debug("With date format:" + e.trim()); + const s = new Date(n); + if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously + // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304. + // This can cause virtually infinite loops while rendering, so for the + // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as + // invalid. + s.getFullYear() < -1e4 || s.getFullYear() > 1e4) + throw new Error("Invalid date:" + n); + return s; + } +}, _n = function(t) { + const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim()); + return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"]; +}, Yn = function(t, e, n, r = !1) { + n = n.trim(); + let i = et(n, e.trim(), !0); + if (i.isValid()) + return r && (i = i.add(1, "d")), i.toDate(); + let a = et(t); + const [s, y] = _n(n); + if (!Number.isNaN(s)) { + const _ = a.add(s, y); + _.isValid() && (a = _); + } + return a.toDate(); +}; +let Vt = 0; +const xt = function(t) { + return t === void 0 ? (Vt = Vt + 1, "task" + Vt) : t; +}, sa = function(t, e) { + let n; + e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e; + const r = n.split(","), i = {}; + En(r, i, Cn); + for (let s = 0; s < r.length; s++) + r[s] = r[s].trim(); + let a = ""; + switch (r.length) { + case 1: + i.id = xt(), i.startTime = t.endTime, a = r[0]; + break; + case 2: + i.id = xt(), i.startTime = ge(void 0, st, r[0]), a = r[1]; + break; + case 3: + i.id = xt(r[0]), i.startTime = ge(void 0, st, r[1]), a = r[2]; + break; + } + return a && (i.endTime = Yn(i.startTime, st, a, Wt), i.manualEndTime = et(a, "YYYY-MM-DD", !0).isValid(), Sn(i, st, It, At)), i; +}, oa = function(t, e) { + let n; + e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e; + const r = n.split(","), i = {}; + En(r, i, Cn); + for (let a = 0; a < r.length; a++) + r[a] = r[a].trim(); + switch (r.length) { + case 1: + i.id = xt(), i.startTime = { + type: "prevTaskEnd", + id: t + }, i.endTime = { + data: r[0] + }; + break; + case 2: + i.id = xt(), i.startTime = { + type: "getStartDate", + startData: r[0] + }, i.endTime = { + data: r[1] + }; + break; + case 3: + i.id = xt(r[0]), i.startTime = { + type: "getStartDate", + startData: r[1] + }, i.endTime = { + data: r[2] + }; + break; + } + return i; +}; +let ye, Pt, J = []; +const Fn = {}, ca = function(t, e) { + const n = { + section: Ct, + type: Ct, + processed: !1, + manualEndTime: !1, + renderEndTime: null, + raw: { data: e }, + task: t, + classes: [] + }, r = oa(Pt, e); + n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = Pt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.order = me, me++; + const i = J.push(n); + Pt = n.id, Fn[n.id] = i - 1; +}, Mt = function(t) { + const e = Fn[t]; + return J[e]; +}, ua = function(t, e) { + const n = { + section: Ct, + type: Ct, + description: t, + task: t, + classes: [] + }, r = sa(ye, e); + n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, ye = n, $t.push(n); +}, Be = function() { + const t = function(n) { + const r = J[n]; + let i = ""; + switch (J[n].raw.startTime.type) { + case "prevTaskEnd": { + const a = Mt(r.prevTaskId); + r.startTime = a.endTime; + break; + } + case "getStartDate": + i = ge(void 0, st, J[n].raw.startTime.startData), i && (J[n].startTime = i); + break; + } + return J[n].startTime && (J[n].endTime = Yn( + J[n].startTime, + st, + J[n].raw.endTime.data, + Wt + ), J[n].endTime && (J[n].processed = !0, J[n].manualEndTime = et( + J[n].raw.endTime.data, + "YYYY-MM-DD", + !0 + ).isValid(), Sn(J[n], st, It, At))), J[n].processed; + }; + let e = !0; + for (const [n, r] of J.entries()) + t(n), e = e && r.processed; + return e; +}, la = function(t, e) { + let n = e; + vt().securityLevel !== "loose" && (n = Rn(e)), t.split(",").forEach(function(r) { + Mt(r) !== void 0 && (Ln(r, () => { + window.open(n, "_self"); + }), Ce[r] = n); + }), Un(t, "clickable"); +}, Un = function(t, e) { + t.split(",").forEach(function(n) { + let r = Mt(n); + r !== void 0 && r.classes.push(e); + }); +}, fa = function(t, e, n) { + if (vt().securityLevel !== "loose" || e === void 0) + return; + let r = []; + if (typeof n == "string") { + r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let a = 0; a < r.length; a++) { + let s = r[a].trim(); + s.charAt(0) === '"' && s.charAt(s.length - 1) === '"' && (s = s.substr(1, s.length - 2)), r[a] = s; + } + } + r.length === 0 && r.push(t), Mt(t) !== void 0 && Ln(t, () => { + Bn.runFunc(e, ...r); + }); +}, Ln = function(t, e) { + _e.push( + function() { + const n = document.querySelector(`[id="${t}"]`); + n !== null && n.addEventListener("click", function() { + e(); + }); + }, + function() { + const n = document.querySelector(`[id="${t}-text"]`); + n !== null && n.addEventListener("click", function() { + e(); + }); + } + ); +}, ha = function(t, e, n) { + t.split(",").forEach(function(r) { + fa(r, e, n); + }), Un(t, "clickable"); +}, da = function(t) { + _e.forEach(function(e) { + e(t); + }); +}, ma = { + getConfig: () => vt().gantt, + clear: Ai, + setDateFormat: Vi, + getDateFormat: Gi, + enableInclusiveEndDates: Pi, + endDatesAreInclusive: Ri, + enableTopAxis: Bi, + topAxisEnabled: Zi, + setAxisFormat: Ii, + getAxisFormat: Wi, + setTickInterval: Oi, + getTickInterval: zi, + setTodayMarker: Ni, + getTodayMarker: Hi, + setAccTitle: Wn, + getAccTitle: On, + setDiagramTitle: zn, + getDiagramTitle: Nn, + setDisplayMode: Xi, + getDisplayMode: qi, + setAccDescription: Hn, + getAccDescription: Vn, + addSection: ta, + getSections: ea, + getTasks: na, + addTask: ca, + findTaskById: Mt, + addTaskOrg: ua, + setIncludes: ji, + getIncludes: Qi, + setExcludes: $i, + getExcludes: Ji, + setClickEvent: ha, + setLink: la, + getLinks: Ki, + bindFunctions: da, + parseDuration: _n, + isInvalidDate: Mn, + setWeekday: ra, + getWeekday: ia +}; +function En(t, e, n) { + let r = !0; + for (; r; ) + r = !1, n.forEach(function(i) { + const a = "^\\s*" + i + "\\s*$", s = new RegExp(a); + t[0].match(s) && (e[i] = !0, t.shift(1), r = !0); + }); +} +const ga = function() { + Rt.debug("Something is calling, setConf, remove the call"); +}, Ze = { + monday: Ut, + tuesday: un, + wednesday: ln, + thursday: gt, + friday: fn, + saturday: hn, + sunday: Et +}, ya = (t, e) => { + let n = [...t].map(() => -1 / 0), r = [...t].sort((a, s) => a.startTime - s.startTime || a.order - s.order), i = 0; + for (const a of r) + for (let s = 0; s < n.length; s++) + if (a.startTime >= n[s]) { + n[s] = a.endTime, a.order = s + e, s > i && (i = s); + break; + } + return i; +}; +let ut; +const ka = function(t, e, n, r) { + const i = vt().gantt, a = vt().securityLevel; + let s; + a === "sandbox" && (s = zt("#i" + e)); + const y = a === "sandbox" ? zt(s.nodes()[0].contentDocument.body) : zt("body"), _ = a === "sandbox" ? s.nodes()[0].contentDocument : document, k = _.getElementById(e); + ut = k.parentElement.offsetWidth, ut === void 0 && (ut = 1200), i.useWidth !== void 0 && (ut = i.useWidth); + const D = r.db.getTasks(); + let U = []; + for (const T of D) + U.push(T.type); + U = A(U); + const w = {}; + let x = 2 * i.topPadding; + if (r.db.getDisplayMode() === "compact" || i.displayMode === "compact") { + const T = {}; + for (const C of D) + T[C.section] === void 0 ? T[C.section] = [C] : T[C.section].push(C); + let F = 0; + for (const C of Object.keys(T)) { + const b = ya(T[C], F) + 1; + F += b, x += b * (i.barHeight + i.barGap), w[C] = b; + } + } else { + x += D.length * (i.barHeight + i.barGap); + for (const T of U) + w[T] = D.filter((F) => F.type === T).length; + } + k.setAttribute("viewBox", "0 0 " + ut + " " + x); + const q = y.select(`[id="${e}"]`), g = Mi().domain([ + Kn(D, function(T) { + return T.startTime; + }), + Jn(D, function(T) { + return T.endTime; + }) + ]).rangeRound([0, ut - i.leftPadding - i.rightPadding]); + function L(T, F) { + const C = T.startTime, b = F.startTime; + let o = 0; + return C > b ? o = 1 : C < b && (o = -1), o; + } + D.sort(L), O(D, ut, x), Zn(q, x, ut, i.useMaxWidth), q.append("text").text(r.db.getDiagramTitle()).attr("x", ut / 2).attr("y", i.titleTopMargin).attr("class", "titleText"); + function O(T, F, C) { + const b = i.barHeight, o = b + i.barGap, d = i.topPadding, m = i.leftPadding, l = Qn().domain([0, U.length]).range(["#00B9FA", "#F95002"]).interpolate(mr); + B( + o, + d, + m, + F, + C, + T, + r.db.getExcludes(), + r.db.getIncludes() + ), Z(m, d, F, C), W(T, o, d, m, b, l, F), Q(o, d), v(m, d, F, C); + } + function W(T, F, C, b, o, d, m) { + const S = [...new Set(T.map((h) => h.order))].map((h) => T.find((Y) => Y.order === h)); + q.append("g").selectAll("rect").data(S).enter().append("rect").attr("x", 0).attr("y", function(h, Y) { + return Y = h.order, Y * F + C - 2; + }).attr("width", function() { + return m - i.rightPadding / 2; + }).attr("height", F).attr("class", function(h) { + for (const [Y, G] of U.entries()) + if (h.type === G) + return "section section" + Y % i.numberSectionStyles; + return "section section0"; + }); + const c = q.append("g").selectAll("rect").data(T).enter(), X = r.db.getLinks(); + if (c.append("rect").attr("id", function(h) { + return h.id; + }).attr("rx", 3).attr("ry", 3).attr("x", function(h) { + return h.milestone ? g(h.startTime) + b + 0.5 * (g(h.endTime) - g(h.startTime)) - 0.5 * o : g(h.startTime) + b; + }).attr("y", function(h, Y) { + return Y = h.order, Y * F + C; + }).attr("width", function(h) { + return h.milestone ? o : g(h.renderEndTime || h.endTime) - g(h.startTime); + }).attr("height", o).attr("transform-origin", function(h, Y) { + return Y = h.order, (g(h.startTime) + b + 0.5 * (g(h.endTime) - g(h.startTime))).toString() + "px " + (Y * F + C + 0.5 * o).toString() + "px"; + }).attr("class", function(h) { + const Y = "task"; + let G = ""; + h.classes.length > 0 && (G = h.classes.join(" ")); + let z = 0; + for (const [I, V] of U.entries()) + h.type === V && (z = I % i.numberSectionStyles); + let H = ""; + return h.active ? h.crit ? H += " activeCrit" : H = " active" : h.done ? h.crit ? H = " doneCrit" : H = " done" : h.crit && (H += " crit"), H.length === 0 && (H = " task"), h.milestone && (H = " milestone " + H), H += z, H += " " + G, Y + H; + }), c.append("text").attr("id", function(h) { + return h.id + "-text"; + }).text(function(h) { + return h.task; + }).attr("font-size", i.fontSize).attr("x", function(h) { + let Y = g(h.startTime), G = g(h.renderEndTime || h.endTime); + h.milestone && (Y += 0.5 * (g(h.endTime) - g(h.startTime)) - 0.5 * o), h.milestone && (G = Y + o); + const z = this.getBBox().width; + return z > G - Y ? G + z + 1.5 * i.leftPadding > m ? Y + b - 5 : G + b + 5 : (G - Y) / 2 + Y + b; + }).attr("y", function(h, Y) { + return Y = h.order, Y * F + i.barHeight / 2 + (i.fontSize / 2 - 2) + C; + }).attr("text-height", o).attr("class", function(h) { + const Y = g(h.startTime); + let G = g(h.endTime); + h.milestone && (G = Y + o); + const z = this.getBBox().width; + let H = ""; + h.classes.length > 0 && (H = h.classes.join(" ")); + let I = 0; + for (const [it, rt] of U.entries()) + h.type === rt && (I = it % i.numberSectionStyles); + let V = ""; + return h.active && (h.crit ? V = "activeCritText" + I : V = "activeText" + I), h.done ? h.crit ? V = V + " doneCritText" + I : V = V + " doneText" + I : h.crit && (V = V + " critText" + I), h.milestone && (V += " milestoneText"), z > G - Y ? G + z + 1.5 * i.leftPadding > m ? H + " taskTextOutsideLeft taskTextOutside" + I + " " + V : H + " taskTextOutsideRight taskTextOutside" + I + " " + V + " width-" + z : H + " taskText taskText" + I + " " + V + " width-" + z; + }), vt().securityLevel === "sandbox") { + let h; + h = zt("#i" + e); + const Y = h.nodes()[0].contentDocument; + c.filter(function(G) { + return X[G.id] !== void 0; + }).each(function(G) { + var z = Y.querySelector("#" + G.id), H = Y.querySelector("#" + G.id + "-text"); + const I = z.parentNode; + var V = Y.createElement("a"); + V.setAttribute("xlink:href", X[G.id]), V.setAttribute("target", "_top"), I.appendChild(V), V.appendChild(z), V.appendChild(H); + }); + } + } + function B(T, F, C, b, o, d, m, l) { + if (m.length === 0 && l.length === 0) + return; + let S, c; + for (const { startTime: z, endTime: H } of d) + (S === void 0 || z < S) && (S = z), (c === void 0 || H > c) && (c = H); + if (!S || !c) + return; + if (et(c).diff(et(S), "year") > 5) { + Rt.warn( + "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days." + ); + return; + } + const X = r.db.getDateFormat(), f = []; + let h = null, Y = et(S); + for (; Y.valueOf() <= c; ) + r.db.isInvalidDate(Y, X, m, l) ? h ? h.end = Y : h = { + start: Y, + end: Y + } : h && (f.push(h), h = null), Y = Y.add(1, "d"); + q.append("g").selectAll("rect").data(f).enter().append("rect").attr("id", function(z) { + return "exclude-" + z.start.format("YYYY-MM-DD"); + }).attr("x", function(z) { + return g(z.start) + C; + }).attr("y", i.gridLineStartPadding).attr("width", function(z) { + const H = z.end.add(1, "day"); + return g(H) - g(z.start); + }).attr("height", o - F - i.gridLineStartPadding).attr("transform-origin", function(z, H) { + return (g(z.start) + C + 0.5 * (g(z.end) - g(z.start))).toString() + "px " + (H * T + 0.5 * o).toString() + "px"; + }).attr("class", "exclude-range"); + } + function Z(T, F, C, b) { + let o = or(g).tickSize(-b + F + i.gridLineStartPadding).tickFormat(Qt(r.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d")); + const m = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec( + r.db.getTickInterval() || i.tickInterval + ); + if (m !== null) { + const l = m[1], S = m[2], c = r.db.getWeekday() || i.weekday; + switch (S) { + case "millisecond": + o.ticks(he.every(l)); + break; + case "second": + o.ticks(dt.every(l)); + break; + case "minute": + o.ticks(Xt.every(l)); + break; + case "hour": + o.ticks(qt.every(l)); + break; + case "day": + o.ticks(wt.every(l)); + break; + case "week": + o.ticks(Ze[c].every(l)); + break; + case "month": + o.ticks(Gt.every(l)); + break; + } + } + if (q.append("g").attr("class", "grid").attr("transform", "translate(" + T + ", " + (b - 50) + ")").call(o).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || i.topAxis) { + let l = sr(g).tickSize(-b + F + i.gridLineStartPadding).tickFormat(Qt(r.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d")); + if (m !== null) { + const S = m[1], c = m[2], X = r.db.getWeekday() || i.weekday; + switch (c) { + case "millisecond": + l.ticks(he.every(S)); + break; + case "second": + l.ticks(dt.every(S)); + break; + case "minute": + l.ticks(Xt.every(S)); + break; + case "hour": + l.ticks(qt.every(S)); + break; + case "day": + l.ticks(wt.every(S)); + break; + case "week": + l.ticks(Ze[X].every(S)); + break; + case "month": + l.ticks(Gt.every(S)); + break; + } + } + q.append("g").attr("class", "grid").attr("transform", "translate(" + T + ", " + F + ")").call(l).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10); + } + } + function Q(T, F) { + let C = 0; + const b = Object.keys(w).map((o) => [o, w[o]]); + q.append("g").selectAll("text").data(b).enter().append(function(o) { + const d = o[0].split(Xn.lineBreakRegex), m = -(d.length - 1) / 2, l = _.createElementNS("http://www.w3.org/2000/svg", "text"); + l.setAttribute("dy", m + "em"); + for (const [S, c] of d.entries()) { + const X = _.createElementNS("http://www.w3.org/2000/svg", "tspan"); + X.setAttribute("alignment-baseline", "central"), X.setAttribute("x", "10"), S > 0 && X.setAttribute("dy", "1em"), X.textContent = c, l.appendChild(X); + } + return l; + }).attr("x", 10).attr("y", function(o, d) { + if (d > 0) + for (let m = 0; m < d; m++) + return C += b[d - 1][1], o[1] * T / 2 + C * T + F; + else + return o[1] * T / 2 + F; + }).attr("font-size", i.sectionFontSize).attr("class", function(o) { + for (const [d, m] of U.entries()) + if (o[0] === m) + return "sectionTitle sectionTitle" + d % i.numberSectionStyles; + return "sectionTitle"; + }); + } + function v(T, F, C, b) { + const o = r.db.getTodayMarker(); + if (o === "off") + return; + const d = q.append("g").attr("class", "today"), m = /* @__PURE__ */ new Date(), l = d.append("line"); + l.attr("x1", g(m) + T).attr("x2", g(m) + T).attr("y1", i.titleTopMargin).attr("y2", b - i.titleTopMargin).attr("class", "today"), o !== "" && l.attr("style", o.replace(/,/g, ";")); + } + function A(T) { + const F = {}, C = []; + for (let b = 0, o = T.length; b < o; ++b) + Object.prototype.hasOwnProperty.call(F, T[b]) || (F[T[b]] = !0, C.push(T[b])); + return C; + } +}, pa = { + setConf: ga, + draw: ka +}, Ta = (t) => ` + .mermaid-main-font { + font-family: "trebuchet ms", verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + // font-size: ${t.ganttFontSize}; + // text-height: 14px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + // .taskText:not([font-size]) { + // font-size: ${t.ganttFontSize}; + // } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + // font-size: ${t.ganttFontSize}; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + // font-size: ${t.ganttFontSize}; + } + + /* Special case clickable */ + .task.clickable { + cursor: pointer; + } + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor} ; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } +`, va = Ta, Da = { + parser: Si, + db: ma, + renderer: pa, + styles: va +}; +export { + Da as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/ganttDiagram-dc1fbbc4.js b/webroot/js/node_modules/mermaid/dist/ganttDiagram-dc1fbbc4.js new file mode 100644 index 0000000..bd9f864 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/ganttDiagram-dc1fbbc4.js @@ -0,0 +1,3417 @@ +import { K as define, L as extend, R as Rgb, M as Color, N as rgbConvert, O as nogamma, P as hue, Q as commonjsGlobal, T as getDefaultExportFromCjs, c as getConfig, s as setAccTitle, g as getAccTitle, B as setDiagramTitle, D as getDiagramTitle, b as setAccDescription, a as getAccDescription, U as dayjs, E as clear$1, e as sanitizeUrl_1, z as utils, l as log, j as d3select, k as configureSvgSize, f as common } from "./mermaid-491db2d9.js"; +import { b as bisector, t as tickStep, c as continuous, a as copy, l as linear } from "./linear-1a8511e4.js"; +import { i as initRange } from "./init-cc95ec8e.js"; +function max(values, valueof) { + let max2; + if (valueof === void 0) { + for (const value of values) { + if (value != null && (max2 < value || max2 === void 0 && value >= value)) { + max2 = value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (max2 < value || max2 === void 0 && value >= value)) { + max2 = value; + } + } + } + return max2; +} +function min(values, valueof) { + let min2; + if (valueof === void 0) { + for (const value of values) { + if (value != null && (min2 > value || min2 === void 0 && value >= value)) { + min2 = value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (min2 > value || min2 === void 0 && value >= value)) { + min2 = value; + } + } + } + return min2; +} +function identity(x) { + return x; +} +var top = 1, right = 2, bottom = 3, left = 4, epsilon = 1e-6; +function translateX(x) { + return "translate(" + x + ",0)"; +} +function translateY(y) { + return "translate(0," + y + ")"; +} +function number$1(scale) { + return (d) => +scale(d); +} +function center(scale, offset) { + offset = Math.max(0, scale.bandwidth() - offset * 2) / 2; + if (scale.round()) + offset = Math.round(offset); + return (d) => +scale(d) + offset; +} +function entering() { + return !this.__axis; +} +function axis(orient, scale) { + var tickArguments = [], tickValues = null, tickFormat = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient === top || orient === left ? -1 : 1, x = orient === left || orient === right ? "x" : "y", transform = orient === top || orient === bottom ? translateX : translateY; + function axis2(context) { + var values = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain() : tickValues, format = tickFormat == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity : tickFormat, spacing = Math.max(tickSizeInner, 0) + tickPadding, range = scale.range(), range0 = +range[0] + offset, range1 = +range[range.length - 1] + offset, position = (scale.bandwidth ? center : number$1)(scale.copy(), offset), selection = context.selection ? context.selection() : context, path = selection.selectAll(".domain").data([null]), tick = selection.selectAll(".tick").data(values, scale).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line = tick.select("line"), text = tick.select("text"); + path = path.merge(path.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")); + tick = tick.merge(tickEnter); + line = line.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x + "2", k * tickSizeInner)); + text = text.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x, k * spacing).attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); + if (context !== selection) { + path = path.transition(context); + tick = tick.transition(context); + line = line.transition(context); + text = text.transition(context); + tickExit = tickExit.transition(context).attr("opacity", epsilon).attr("transform", function(d) { + return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute("transform"); + }); + tickEnter.attr("opacity", epsilon).attr("transform", function(d) { + var p = this.parentNode.__axis; + return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); + }); + } + tickExit.remove(); + path.attr("d", orient === left || orient === right ? tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1); + tick.attr("opacity", 1).attr("transform", function(d) { + return transform(position(d) + offset); + }); + line.attr(x + "2", k * tickSizeInner); + text.attr(x, k * spacing).text(format); + selection.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); + selection.each(function() { + this.__axis = position; + }); + } + axis2.scale = function(_) { + return arguments.length ? (scale = _, axis2) : scale; + }; + axis2.ticks = function() { + return tickArguments = Array.from(arguments), axis2; + }; + axis2.tickArguments = function(_) { + return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis2) : tickArguments.slice(); + }; + axis2.tickValues = function(_) { + return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis2) : tickValues && tickValues.slice(); + }; + axis2.tickFormat = function(_) { + return arguments.length ? (tickFormat = _, axis2) : tickFormat; + }; + axis2.tickSize = function(_) { + return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis2) : tickSizeInner; + }; + axis2.tickSizeInner = function(_) { + return arguments.length ? (tickSizeInner = +_, axis2) : tickSizeInner; + }; + axis2.tickSizeOuter = function(_) { + return arguments.length ? (tickSizeOuter = +_, axis2) : tickSizeOuter; + }; + axis2.tickPadding = function(_) { + return arguments.length ? (tickPadding = +_, axis2) : tickPadding; + }; + axis2.offset = function(_) { + return arguments.length ? (offset = +_, axis2) : offset; + }; + return axis2; +} +function axisTop(scale) { + return axis(top, scale); +} +function axisBottom(scale) { + return axis(bottom, scale); +} +const radians = Math.PI / 180; +const degrees = 180 / Math.PI; +const K = 18, Xn = 0.96422, Yn = 1, Zn = 0.82521, t0$1 = 4 / 29, t1$1 = 6 / 29, t2 = 3 * t1$1 * t1$1, t3 = t1$1 * t1$1 * t1$1; +function labConvert(o) { + if (o instanceof Lab) + return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) + return hcl2lab(o); + if (!(o instanceof Rgb)) + o = rgbConvert(o); + var r = rgb2lrgb(o.r), g = rgb2lrgb(o.g), b = rgb2lrgb(o.b), y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; + if (r === g && g === b) + x = z = y; + else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); +} +function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); +} +function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; +} +define(Lab, lab, extend(Color, { + brighter(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb() { + var y = (this.l + 16) / 116, x = isNaN(this.a) ? y : y + this.a / 500, z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new Rgb( + lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.033454 * z), + lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z), + this.opacity + ); + } +})); +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0$1; +} +function lab2xyz(t) { + return t > t1$1 ? t * t * t : t2 * (t - t0$1); +} +function lrgb2rgb(x) { + return 255 * (x <= 31308e-7 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} +function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} +function hclConvert(o) { + if (o instanceof Hcl) + return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) + o = labConvert(o); + if (o.a === 0 && o.b === 0) + return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * degrees; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); +} +function hcl$1(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} +function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; +} +function hcl2lab(o) { + if (isNaN(o.h)) + return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * radians; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); +} +define(Hcl, hcl$1, extend(Color, { + brighter(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb() { + return hcl2lab(this).rgb(); + } +})); +function hcl(hue2) { + return function(start, end) { + var h = hue2((start = hcl$1(start)).h, (end = hcl$1(end)).h), c = nogamma(start.c, end.c), l = nogamma(start.l, end.l), opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.c = c(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + }; +} +const interpolateHcl = hcl(hue); +function nice(domain, interval) { + domain = domain.slice(); + var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], t; + if (x1 < x0) { + t = i0, i0 = i1, i1 = t; + t = x0, x0 = x1, x1 = t; + } + domain[i0] = interval.floor(x0); + domain[i1] = interval.ceil(x1); + return domain; +} +var t0 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date(); +function newInterval(floori, offseti, count, field) { + function interval(date2) { + return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2; + } + interval.floor = function(date2) { + return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2; + }; + interval.ceil = function(date2) { + return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2; + }; + interval.round = function(date2) { + var d0 = interval(date2), d1 = interval.ceil(date2); + return date2 - d0 < d1 - date2 ? d0 : d1; + }; + interval.offset = function(date2, step) { + return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2; + }; + interval.range = function(start, stop, step) { + var range = [], previous; + start = interval.ceil(start); + step = step == null ? 1 : Math.floor(step); + if (!(start < stop) || !(step > 0)) + return range; + do + range.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start); + while (previous < start && start < stop); + return range; + }; + interval.filter = function(test) { + return newInterval(function(date2) { + if (date2 >= date2) + while (floori(date2), !test(date2)) + date2.setTime(date2 - 1); + }, function(date2, step) { + if (date2 >= date2) { + if (step < 0) + while (++step <= 0) { + while (offseti(date2, -1), !test(date2)) { + } + } + else + while (--step >= 0) { + while (offseti(date2, 1), !test(date2)) { + } + } + } + }); + }; + if (count) { + interval.count = function(start, end) { + t0.setTime(+start), t1.setTime(+end); + floori(t0), floori(t1); + return Math.floor(count(t0, t1)); + }; + interval.every = function(step) { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function(d) { + return field(d) % step === 0; + } : function(d) { + return interval.count(0, d) % step === 0; + }); + }; + } + return interval; +} +var millisecond = newInterval(function() { +}, function(date2, step) { + date2.setTime(+date2 + step); +}, function(start, end) { + return end - start; +}); +millisecond.every = function(k) { + k = Math.floor(k); + if (!isFinite(k) || !(k > 0)) + return null; + if (!(k > 1)) + return millisecond; + return newInterval(function(date2) { + date2.setTime(Math.floor(date2 / k) * k); + }, function(date2, step) { + date2.setTime(+date2 + step * k); + }, function(start, end) { + return (end - start) / k; + }); +}; +const timeMillisecond = millisecond; +millisecond.range; +const durationSecond = 1e3; +const durationMinute = durationSecond * 60; +const durationHour = durationMinute * 60; +const durationDay = durationHour * 24; +const durationWeek = durationDay * 7; +const durationMonth = durationDay * 30; +const durationYear = durationDay * 365; +var second = newInterval(function(date2) { + date2.setTime(date2 - date2.getMilliseconds()); +}, function(date2, step) { + date2.setTime(+date2 + step * durationSecond); +}, function(start, end) { + return (end - start) / durationSecond; +}, function(date2) { + return date2.getUTCSeconds(); +}); +const timeSecond = second; +second.range; +var minute = newInterval(function(date2) { + date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond); +}, function(date2, step) { + date2.setTime(+date2 + step * durationMinute); +}, function(start, end) { + return (end - start) / durationMinute; +}, function(date2) { + return date2.getMinutes(); +}); +const timeMinute = minute; +minute.range; +var hour = newInterval(function(date2) { + date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond - date2.getMinutes() * durationMinute); +}, function(date2, step) { + date2.setTime(+date2 + step * durationHour); +}, function(start, end) { + return (end - start) / durationHour; +}, function(date2) { + return date2.getHours(); +}); +const timeHour = hour; +hour.range; +var day = newInterval( + (date2) => date2.setHours(0, 0, 0, 0), + (date2, step) => date2.setDate(date2.getDate() + step), + (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, + (date2) => date2.getDate() - 1 +); +const timeDay = day; +day.range; +function weekday$1(i) { + return newInterval(function(date2) { + date2.setDate(date2.getDate() - (date2.getDay() + 7 - i) % 7); + date2.setHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setDate(date2.getDate() + step * 7); + }, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; + }); +} +var sunday = weekday$1(0); +var monday = weekday$1(1); +var tuesday = weekday$1(2); +var wednesday = weekday$1(3); +var thursday = weekday$1(4); +var friday = weekday$1(5); +var saturday = weekday$1(6); +sunday.range; +monday.range; +tuesday.range; +wednesday.range; +thursday.range; +friday.range; +saturday.range; +var month = newInterval(function(date2) { + date2.setDate(1); + date2.setHours(0, 0, 0, 0); +}, function(date2, step) { + date2.setMonth(date2.getMonth() + step); +}, function(start, end) { + return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; +}, function(date2) { + return date2.getMonth(); +}); +const timeMonth = month; +month.range; +var year = newInterval(function(date2) { + date2.setMonth(0, 1); + date2.setHours(0, 0, 0, 0); +}, function(date2, step) { + date2.setFullYear(date2.getFullYear() + step); +}, function(start, end) { + return end.getFullYear() - start.getFullYear(); +}, function(date2) { + return date2.getFullYear(); +}); +year.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date2) { + date2.setFullYear(Math.floor(date2.getFullYear() / k) * k); + date2.setMonth(0, 1); + date2.setHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setFullYear(date2.getFullYear() + step * k); + }); +}; +const timeYear = year; +year.range; +var utcDay = newInterval(function(date2) { + date2.setUTCHours(0, 0, 0, 0); +}, function(date2, step) { + date2.setUTCDate(date2.getUTCDate() + step); +}, function(start, end) { + return (end - start) / durationDay; +}, function(date2) { + return date2.getUTCDate() - 1; +}); +const utcDay$1 = utcDay; +utcDay.range; +function utcWeekday(i) { + return newInterval(function(date2) { + date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i) % 7); + date2.setUTCHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setUTCDate(date2.getUTCDate() + step * 7); + }, function(start, end) { + return (end - start) / durationWeek; + }); +} +var utcSunday = utcWeekday(0); +var utcMonday = utcWeekday(1); +var utcTuesday = utcWeekday(2); +var utcWednesday = utcWeekday(3); +var utcThursday = utcWeekday(4); +var utcFriday = utcWeekday(5); +var utcSaturday = utcWeekday(6); +utcSunday.range; +utcMonday.range; +utcTuesday.range; +utcWednesday.range; +utcThursday.range; +utcFriday.range; +utcSaturday.range; +var utcYear = newInterval(function(date2) { + date2.setUTCMonth(0, 1); + date2.setUTCHours(0, 0, 0, 0); +}, function(date2, step) { + date2.setUTCFullYear(date2.getUTCFullYear() + step); +}, function(start, end) { + return end.getUTCFullYear() - start.getUTCFullYear(); +}, function(date2) { + return date2.getUTCFullYear(); +}); +utcYear.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date2) { + date2.setUTCFullYear(Math.floor(date2.getUTCFullYear() / k) * k); + date2.setUTCMonth(0, 1); + date2.setUTCHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setUTCFullYear(date2.getUTCFullYear() + step * k); + }); +}; +const utcYear$1 = utcYear; +utcYear.range; +function ticker(year2, month2, week, day2, hour2, minute2) { + const tickIntervals = [ + [timeSecond, 1, durationSecond], + [timeSecond, 5, 5 * durationSecond], + [timeSecond, 15, 15 * durationSecond], + [timeSecond, 30, 30 * durationSecond], + [minute2, 1, durationMinute], + [minute2, 5, 5 * durationMinute], + [minute2, 15, 15 * durationMinute], + [minute2, 30, 30 * durationMinute], + [hour2, 1, durationHour], + [hour2, 3, 3 * durationHour], + [hour2, 6, 6 * durationHour], + [hour2, 12, 12 * durationHour], + [day2, 1, durationDay], + [day2, 2, 2 * durationDay], + [week, 1, durationWeek], + [month2, 1, durationMonth], + [month2, 3, 3 * durationMonth], + [year2, 1, durationYear] + ]; + function ticks(start, stop, count) { + const reverse = stop < start; + if (reverse) + [start, stop] = [stop, start]; + const interval = count && typeof count.range === "function" ? count : tickInterval2(start, stop, count); + const ticks2 = interval ? interval.range(start, +stop + 1) : []; + return reverse ? ticks2.reverse() : ticks2; + } + function tickInterval2(start, stop, count) { + const target = Math.abs(stop - start) / count; + const i = bisector(([, , step2]) => step2).right(tickIntervals, target); + if (i === tickIntervals.length) + return year2.every(tickStep(start / durationYear, stop / durationYear, count)); + if (i === 0) + return timeMillisecond.every(Math.max(tickStep(start, stop, count), 1)); + const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; + return t.every(step); + } + return [ticks, tickInterval2]; +} +const [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, sunday, timeDay, timeHour, timeMinute); +function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date2 = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date2.setFullYear(d.y); + return date2; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); +} +function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date2 = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date2.setUTCFullYear(d.y); + return date2; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); +} +function newDate(y, m, d) { + return { y, m, d, H: 0, M: 0, S: 0, L: 0 }; +} +function formatLocale(locale2) { + var locale_dateTime = locale2.dateTime, locale_date = locale2.date, locale_time = locale2.time, locale_periods = locale2.periods, locale_weekdays = locale2.days, locale_shortWeekdays = locale2.shortDays, locale_months = locale2.months, locale_shortMonths = locale2.shortMonths; + var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths); + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "g": formatYearISO, + "G": formatFullYearISO, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "q": formatQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "g": formatUTCYearISO, + "G": formatUTCFullYearISO, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "q": formatUTCQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent + }; + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "g": parseYear, + "G": parseFullYear, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "q": parseQuarter, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent + }; + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + function newFormat(specifier, formats2) { + return function(date2) { + var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format; + if (!(date2 instanceof Date)) + date2 = /* @__PURE__ */ new Date(+date2); + while (++i < n) { + if (specifier.charCodeAt(i) === 37) { + string.push(specifier.slice(j, i)); + if ((pad2 = pads[c = specifier.charAt(++i)]) != null) + c = specifier.charAt(++i); + else + pad2 = c === "e" ? " " : "0"; + if (format = formats2[c]) + c = format(date2, pad2); + string.push(c); + j = i + 1; + } + } + string.push(specifier.slice(j, i)); + return string.join(""); + }; + } + function newParse(specifier, Z) { + return function(string) { + var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day2; + if (i != string.length) + return null; + if ("Q" in d) + return new Date(d.Q); + if ("s" in d) + return new Date(d.s * 1e3 + ("L" in d ? d.L : 0)); + if (Z && !("Z" in d)) + d.Z = 0; + if ("p" in d) + d.H = d.H % 12 + d.p * 12; + if (d.m === void 0) + d.m = "q" in d ? d.q : 0; + if ("V" in d) { + if (d.V < 1 || d.V > 53) + return null; + if (!("w" in d)) + d.w = 1; + if ("Z" in d) { + week = utcDate(newDate(d.y, 0, 1)), day2 = week.getUTCDay(); + week = day2 > 4 || day2 === 0 ? utcMonday.ceil(week) : utcMonday(week); + week = utcDay$1.offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = localDate(newDate(d.y, 0, 1)), day2 = week.getDay(); + week = day2 > 4 || day2 === 0 ? monday.ceil(week) : monday(week); + week = timeDay.offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) + d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day2 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day2 + 5) % 7 : d.w + d.U * 7 - (day2 + 6) % 7; + } + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } + return localDate(d); + }; + } + function parseSpecifier(d, specifier, string, j) { + var i = 0, n = specifier.length, m = string.length, c, parse; + while (i < n) { + if (j >= m) + return -1; + c = specifier.charCodeAt(i++); + if (c === 37) { + c = specifier.charAt(i++); + parse = parses[c in pads ? specifier.charAt(i++) : c]; + if (!parse || (j = parse(d, string, j)) < 0) + return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + return j; + } + function parsePeriod(d, string, i) { + var n = periodRe.exec(string.slice(i)); + return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseShortWeekday(d, string, i) { + var n = shortWeekdayRe.exec(string.slice(i)); + return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseWeekday(d, string, i) { + var n = weekdayRe.exec(string.slice(i)); + return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseShortMonth(d, string, i) { + var n = shortMonthRe.exec(string.slice(i)); + return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseMonth(d, string, i) { + var n = monthRe.exec(string.slice(i)); + return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; + } + function parseLocaleDateTime(d, string, i) { + return parseSpecifier(d, locale_dateTime, string, i); + } + function parseLocaleDate(d, string, i) { + return parseSpecifier(d, locale_date, string, i); + } + function parseLocaleTime(d, string, i) { + return parseSpecifier(d, locale_time, string, i); + } + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; + } + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } + function formatMonth(d) { + return locale_months[d.getMonth()]; + } + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } + function formatQuarter(d) { + return 1 + ~~(d.getMonth() / 3); + } + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; + } + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + function formatUTCQuarter(d) { + return 1 + ~~(d.getUTCMonth() / 3); + } + return { + format: function(specifier) { + var f = newFormat(specifier += "", formats); + f.toString = function() { + return specifier; + }; + return f; + }, + parse: function(specifier) { + var p = newParse(specifier += "", false); + p.toString = function() { + return specifier; + }; + return p; + }, + utcFormat: function(specifier) { + var f = newFormat(specifier += "", utcFormats); + f.toString = function() { + return specifier; + }; + return f; + }, + utcParse: function(specifier) { + var p = newParse(specifier += "", true); + p.toString = function() { + return specifier; + }; + return p; + } + }; +} +var pads = { "-": "", "_": " ", "0": "0" }, numberRe = /^\s*\d+/, percentRe = /^%/, requoteRe = /[\\^$*+?|[\]().{}]/g; +function pad(value, fill, width) { + var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); +} +function requote(s) { + return s.replace(requoteRe, "\\$&"); +} +function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); +} +function formatLookup(names) { + return new Map(names.map((name, i) => [name.toLowerCase(), i])); +} +function parseWeekdayNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.w = +n[0], i + n[0].length) : -1; +} +function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.U = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; +} +function parseWeekNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.W = +n[0], i + n[0].length) : -1; +} +function parseFullYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 4)); + return n ? (d.y = +n[0], i + n[0].length) : -1; +} +function parseYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1; +} +function parseZone(d, string, i) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; +} +function parseQuarter(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; +} +function parseMonthNumber(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.m = n[0] - 1, i + n[0].length) : -1; +} +function parseDayOfMonth(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.d = +n[0], i + n[0].length) : -1; +} +function parseDayOfYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; +} +function parseHour24(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.H = +n[0], i + n[0].length) : -1; +} +function parseMinutes(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.M = +n[0], i + n[0].length) : -1; +} +function parseSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.S = +n[0], i + n[0].length) : -1; +} +function parseMilliseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.L = +n[0], i + n[0].length) : -1; +} +function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1; +} +function parseLiteralPercent(d, string, i) { + var n = percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; +} +function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; +} +function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.s = +n[0], i + n[0].length) : -1; +} +function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); +} +function formatHour24(d, p) { + return pad(d.getHours(), p, 2); +} +function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); +} +function formatDayOfYear(d, p) { + return pad(1 + timeDay.count(timeYear(d), d), p, 3); +} +function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); +} +function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; +} +function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); +} +function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); +} +function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); +} +function formatWeekdayNumberMonday(d) { + var day2 = d.getDay(); + return day2 === 0 ? 7 : day2; +} +function formatWeekNumberSunday(d, p) { + return pad(sunday.count(timeYear(d) - 1, d), p, 2); +} +function dISO(d) { + var day2 = d.getDay(); + return day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d); +} +function formatWeekNumberISO(d, p) { + d = dISO(d); + return pad(thursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2); +} +function formatWeekdayNumberSunday(d) { + return d.getDay(); +} +function formatWeekNumberMonday(d, p) { + return pad(monday.count(timeYear(d) - 1, d), p, 2); +} +function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); +} +function formatYearISO(d, p) { + d = dISO(d); + return pad(d.getFullYear() % 100, p, 2); +} +function formatFullYear(d, p) { + return pad(d.getFullYear() % 1e4, p, 4); +} +function formatFullYearISO(d, p) { + var day2 = d.getDay(); + d = day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d); + return pad(d.getFullYear() % 1e4, p, 4); +} +function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2); +} +function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); +} +function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); +} +function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); +} +function formatUTCDayOfYear(d, p) { + return pad(1 + utcDay$1.count(utcYear$1(d), d), p, 3); +} +function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); +} +function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; +} +function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); +} +function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); +} +function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); +} +function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; +} +function formatUTCWeekNumberSunday(d, p) { + return pad(utcSunday.count(utcYear$1(d) - 1, d), p, 2); +} +function UTCdISO(d) { + var day2 = d.getUTCDay(); + return day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d); +} +function formatUTCWeekNumberISO(d, p) { + d = UTCdISO(d); + return pad(utcThursday.count(utcYear$1(d), d) + (utcYear$1(d).getUTCDay() === 4), p, 2); +} +function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); +} +function formatUTCWeekNumberMonday(d, p) { + return pad(utcMonday.count(utcYear$1(d) - 1, d), p, 2); +} +function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); +} +function formatUTCYearISO(d, p) { + d = UTCdISO(d); + return pad(d.getUTCFullYear() % 100, p, 2); +} +function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 1e4, p, 4); +} +function formatUTCFullYearISO(d, p) { + var day2 = d.getUTCDay(); + d = day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d); + return pad(d.getUTCFullYear() % 1e4, p, 4); +} +function formatUTCZone() { + return "+0000"; +} +function formatLiteralPercent() { + return "%"; +} +function formatUnixTimestamp(d) { + return +d; +} +function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1e3); +} +var locale; +var timeFormat; +defaultLocale({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] +}); +function defaultLocale(definition) { + locale = formatLocale(definition); + timeFormat = locale.format; + locale.parse; + locale.utcFormat; + locale.utcParse; + return locale; +} +function date(t) { + return new Date(t); +} +function number(t) { + return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t); +} +function calendar(ticks, tickInterval2, year2, month2, week, day2, hour2, minute2, second2, format) { + var scale = continuous(), invert = scale.invert, domain = scale.domain; + var formatMillisecond = format(".%L"), formatSecond = format(":%S"), formatMinute = format("%I:%M"), formatHour = format("%I %p"), formatDay = format("%a %d"), formatWeek = format("%b %d"), formatMonth = format("%B"), formatYear2 = format("%Y"); + function tickFormat(date2) { + return (second2(date2) < date2 ? formatMillisecond : minute2(date2) < date2 ? formatSecond : hour2(date2) < date2 ? formatMinute : day2(date2) < date2 ? formatHour : month2(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year2(date2) < date2 ? formatMonth : formatYear2)(date2); + } + scale.invert = function(y) { + return new Date(invert(y)); + }; + scale.domain = function(_) { + return arguments.length ? domain(Array.from(_, number)) : domain().map(date); + }; + scale.ticks = function(interval) { + var d = domain(); + return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval); + }; + scale.tickFormat = function(count, specifier) { + return specifier == null ? tickFormat : format(specifier); + }; + scale.nice = function(interval) { + var d = domain(); + if (!interval || typeof interval.range !== "function") + interval = tickInterval2(d[0], d[d.length - 1], interval == null ? 10 : interval); + return interval ? domain(nice(d, interval)) : scale; + }; + scale.copy = function() { + return copy(scale, calendar(ticks, tickInterval2, year2, month2, week, day2, hour2, minute2, second2, format)); + }; + return scale; +} +function time() { + return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, sunday, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments); +} +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 29], $V6 = [1, 30], $V7 = [1, 31], $V8 = [1, 9], $V9 = [1, 10], $Va = [1, 11], $Vb = [1, 12], $Vc = [1, 13], $Vd = [1, 14], $Ve = [1, 15], $Vf = [1, 16], $Vg = [1, 18], $Vh = [1, 19], $Vi = [1, 20], $Vj = [1, 21], $Vk = [1, 22], $Vl = [1, 24], $Vm = [1, 32]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "weekday": 11, "weekday_monday": 12, "weekday_tuesday": 13, "weekday_wednesday": 14, "weekday_thursday": 15, "weekday_friday": 16, "weekday_saturday": 17, "weekday_sunday": 18, "dateFormat": 19, "inclusiveEndDates": 20, "topAxis": 21, "axisFormat": 22, "tickInterval": 23, "excludes": 24, "includes": 25, "todayMarker": 26, "title": 27, "acc_title": 28, "acc_title_value": 29, "acc_descr": 30, "acc_descr_value": 31, "acc_descr_multiline_value": 32, "section": 33, "clickStatement": 34, "taskTxt": 35, "taskData": 36, "click": 37, "callbackname": 38, "callbackargs": 39, "href": 40, "clickStatementDebug": 41, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setWeekday("monday"); + break; + case 9: + yy.setWeekday("tuesday"); + break; + case 10: + yy.setWeekday("wednesday"); + break; + case 11: + yy.setWeekday("thursday"); + break; + case 12: + yy.setWeekday("friday"); + break; + case 13: + yy.setWeekday("saturday"); + break; + case 14: + yy.setWeekday("sunday"); + break; + case 15: + yy.setDateFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 16: + yy.enableInclusiveEndDates(); + this.$ = $$[$0].substr(18); + break; + case 17: + yy.TopAxis(); + this.$ = $$[$0].substr(8); + break; + case 18: + yy.setAxisFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 19: + yy.setTickInterval($$[$0].substr(13)); + this.$ = $$[$0].substr(13); + break; + case 20: + yy.setExcludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 21: + yy.setIncludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 22: + yy.setTodayMarker($$[$0].substr(12)); + this.$ = $$[$0].substr(12); + break; + case 24: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 25: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 26: + case 27: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 30: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + case 31: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0], null); + break; + case 32: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 33: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null); + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 34: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setLink($$[$0 - 3], $$[$0]); + break; + case 35: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0], null); + yy.setLink($$[$0 - 2], $$[$0 - 1]); + break; + case 36: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]); + yy.setLink($$[$0 - 3], $$[$0 - 2]); + break; + case 37: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 38: + case 44: + this.$ = $$[$0 - 1] + " " + $$[$0]; + break; + case 39: + case 40: + case 42: + this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + case 41: + case 43: + this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 33, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), { 36: [1, 36] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), { 38: [1, 37], 40: [1, 38] }, o($V0, [2, 4]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 30]), o($V0, [2, 31], { 39: [1, 39], 40: [1, 40] }), o($V0, [2, 37], { 38: [1, 41] }), o($V0, [2, 32], { 40: [1, 42] }), o($V0, [2, 33]), o($V0, [2, 35], { 39: [1, 43] }), o($V0, [2, 34]), o($V0, [2, 36])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("open_directive"); + return "open_directive"; + case 1: + this.begin("acc_title"); + return 28; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 30; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + return 10; + case 12: + break; + case 13: + break; + case 14: + break; + case 15: + this.begin("href"); + break; + case 16: + this.popState(); + break; + case 17: + return 40; + case 18: + this.begin("callbackname"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callbackargs"); + break; + case 21: + return 38; + case 22: + this.popState(); + break; + case 23: + return 39; + case 24: + this.begin("click"); + break; + case 25: + this.popState(); + break; + case 26: + return 37; + case 27: + return 4; + case 28: + return 19; + case 29: + return 20; + case 30: + return 21; + case 31: + return 22; + case 32: + return 23; + case 33: + return 25; + case 34: + return 24; + case 35: + return 26; + case 36: + return 12; + case 37: + return 13; + case 38: + return 14; + case 39: + return 15; + case 40: + return 16; + case 41: + return 17; + case 42: + return 18; + case 43: + return "date"; + case 44: + return 27; + case 45: + return "accDescription"; + case 46: + return 33; + case 47: + return 35; + case 48: + return 36; + case 49: + return ":"; + case 50: + return 6; + case 51: + return "INVALID"; + } + }, + rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [22, 23], "inclusive": false }, "callbackname": { "rules": [19, 20, 21], "inclusive": false }, "href": { "rules": [16, 17], "inclusive": false }, "click": { "rules": [25, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 18, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const ganttParser = parser; +var isoWeek = { exports: {} }; +(function(module, exports) { + !function(e, t) { + module.exports = t(); + }(commonjsGlobal, function() { + var e = "day"; + return function(t, i, s) { + var a = function(t4) { + return t4.add(4 - t4.isoWeekday(), e); + }, d = i.prototype; + d.isoWeekYear = function() { + return a(this).year(); + }, d.isoWeek = function(t4) { + if (!this.$utils().u(t4)) + return this.add(7 * (t4 - this.isoWeek()), e); + var i2, d2, n2, o, r = a(this), u = (i2 = this.isoWeekYear(), d2 = this.$u, n2 = (d2 ? s.utc : s)().year(i2).startOf("year"), o = 4 - n2.isoWeekday(), n2.isoWeekday() > 4 && (o += 7), n2.add(o, e)); + return r.diff(u, "week") + 1; + }, d.isoWeekday = function(e2) { + return this.$utils().u(e2) ? this.day() || 7 : this.day(this.day() % 7 ? e2 : e2 - 7); + }; + var n = d.startOf; + d.startOf = function(e2, t4) { + var i2 = this.$utils(), s2 = !!i2.u(t4) || t4; + return "isoweek" === i2.p(e2) ? s2 ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : n.bind(this)(e2, t4); + }; + }; + }); +})(isoWeek); +var isoWeekExports = isoWeek.exports; +const dayjsIsoWeek = /* @__PURE__ */ getDefaultExportFromCjs(isoWeekExports); +var customParseFormat = { exports: {} }; +(function(module, exports) { + !function(e, t) { + module.exports = t(); + }(commonjsGlobal, function() { + var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d\d/, r = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, o = {}, s = function(e2) { + return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3); + }; + var a = function(e2) { + return function(t4) { + this[e2] = +t4; + }; + }, f = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) { + (this.zone || (this.zone = {})).offset = function(e3) { + if (!e3) + return 0; + if ("Z" === e3) + return 0; + var t4 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t4[1] + (+t4[2] || 0); + return 0 === n2 ? 0 : "+" === t4[0] ? -n2 : n2; + }(e2); + }], h = function(e2) { + var t4 = o[e2]; + return t4 && (t4.indexOf ? t4 : t4.s.concat(t4.f)); + }, u = function(e2, t4) { + var n2, r2 = o.meridiem; + if (r2) { + for (var i2 = 1; i2 <= 24; i2 += 1) + if (e2.indexOf(r2(i2, 0, t4)) > -1) { + n2 = i2 > 12; + break; + } + } else + n2 = e2 === (t4 ? "pm" : "PM"); + return n2; + }, d = { A: [i, function(e2) { + this.afternoon = u(e2, false); + }], a: [i, function(e2) { + this.afternoon = u(e2, true); + }], S: [/\d/, function(e2) { + this.milliseconds = 100 * +e2; + }], SS: [n, function(e2) { + this.milliseconds = 10 * +e2; + }], SSS: [/\d{3}/, function(e2) { + this.milliseconds = +e2; + }], s: [r, a("seconds")], ss: [r, a("seconds")], m: [r, a("minutes")], mm: [r, a("minutes")], H: [r, a("hours")], h: [r, a("hours")], HH: [r, a("hours")], hh: [r, a("hours")], D: [r, a("day")], DD: [n, a("day")], Do: [i, function(e2) { + var t4 = o.ordinal, n2 = e2.match(/\d+/); + if (this.day = n2[0], t4) + for (var r2 = 1; r2 <= 31; r2 += 1) + t4(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2); + }], M: [r, a("month")], MM: [n, a("month")], MMM: [i, function(e2) { + var t4 = h("months"), n2 = (h("monthsShort") || t4.map(function(e3) { + return e3.slice(0, 3); + })).indexOf(e2) + 1; + if (n2 < 1) + throw new Error(); + this.month = n2 % 12 || n2; + }], MMMM: [i, function(e2) { + var t4 = h("months").indexOf(e2) + 1; + if (t4 < 1) + throw new Error(); + this.month = t4 % 12 || t4; + }], Y: [/[+-]?\d+/, a("year")], YY: [n, function(e2) { + this.year = s(e2); + }], YYYY: [/\d{4}/, a("year")], Z: f, ZZ: f }; + function c(n2) { + var r2, i2; + r2 = n2, i2 = o && o.formats; + for (var s2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t4, n3, r3) { + var o2 = r3 && r3.toUpperCase(); + return n3 || i2[r3] || e[r3] || i2[o2].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t5, n4) { + return t5 || n4.slice(1); + }); + })).match(t), a2 = s2.length, f2 = 0; f2 < a2; f2 += 1) { + var h2 = s2[f2], u2 = d[h2], c2 = u2 && u2[0], l = u2 && u2[1]; + s2[f2] = l ? { regex: c2, parser: l } : h2.replace(/^\[|\]$/g, ""); + } + return function(e2) { + for (var t4 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) { + var i3 = s2[n3]; + if ("string" == typeof i3) + r3 += i3.length; + else { + var o2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = o2.exec(h3)[0]; + f3.call(t4, u3), e2 = e2.replace(u3, ""); + } + } + return function(e3) { + var t5 = e3.afternoon; + if (void 0 !== t5) { + var n4 = e3.hours; + t5 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon; + } + }(t4), t4; + }; + } + return function(e2, t4, n2) { + n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (s = e2.parseTwoDigitYear); + var r2 = t4.prototype, i2 = r2.parse; + r2.parse = function(e3) { + var t5 = e3.date, r3 = e3.utc, s2 = e3.args; + this.$u = r3; + var a2 = s2[1]; + if ("string" == typeof a2) { + var f2 = true === s2[2], h2 = true === s2[3], u2 = f2 || h2, d2 = s2[2]; + h2 && (d2 = s2[2]), o = this.$locale(), !f2 && d2 && (o = n2.Ls[d2]), this.$d = function(e4, t6, n3) { + try { + if (["x", "X"].indexOf(t6) > -1) + return new Date(("X" === t6 ? 1e3 : 1) * e4); + var r4 = c(t6)(e4), i3 = r4.year, o2 = r4.month, s3 = r4.day, a3 = r4.hours, f3 = r4.minutes, h3 = r4.seconds, u3 = r4.milliseconds, d3 = r4.zone, l2 = /* @__PURE__ */ new Date(), m2 = s3 || (i3 || o2 ? 1 : l2.getDate()), M2 = i3 || l2.getFullYear(), Y = 0; + i3 && !o2 || (Y = o2 > 0 ? o2 - 1 : l2.getMonth()); + var p = a3 || 0, v = f3 || 0, D = h3 || 0, g = u3 || 0; + return d3 ? new Date(Date.UTC(M2, Y, m2, p, v, D, g + 60 * d3.offset * 1e3)) : n3 ? new Date(Date.UTC(M2, Y, m2, p, v, D, g)) : new Date(M2, Y, m2, p, v, D, g); + } catch (e5) { + return /* @__PURE__ */ new Date(""); + } + }(t5, a2, r3), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t5 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), o = {}; + } else if (a2 instanceof Array) + for (var l = a2.length, m = 1; m <= l; m += 1) { + s2[1] = a2[m - 1]; + var M = n2.apply(this, s2); + if (M.isValid()) { + this.$d = M.$d, this.$L = M.$L, this.init(); + break; + } + m === l && (this.$d = /* @__PURE__ */ new Date("")); + } + else + i2.call(this, e3); + }; + }; + }); +})(customParseFormat); +var customParseFormatExports = customParseFormat.exports; +const dayjsCustomParseFormat = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports); +var advancedFormat = { exports: {} }; +(function(module, exports) { + !function(e, t) { + module.exports = t(); + }(commonjsGlobal, function() { + return function(e, t) { + var r = t.prototype, n = r.format; + r.format = function(e2) { + var t4 = this, r2 = this.$locale(); + if (!this.isValid()) + return n.bind(this)(e2); + var s = this.$utils(), a = (e2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(e3) { + switch (e3) { + case "Q": + return Math.ceil((t4.$M + 1) / 3); + case "Do": + return r2.ordinal(t4.$D); + case "gggg": + return t4.weekYear(); + case "GGGG": + return t4.isoWeekYear(); + case "wo": + return r2.ordinal(t4.week(), "W"); + case "w": + case "ww": + return s.s(t4.week(), "w" === e3 ? 1 : 2, "0"); + case "W": + case "WW": + return s.s(t4.isoWeek(), "W" === e3 ? 1 : 2, "0"); + case "k": + case "kk": + return s.s(String(0 === t4.$H ? 24 : t4.$H), "k" === e3 ? 1 : 2, "0"); + case "X": + return Math.floor(t4.$d.getTime() / 1e3); + case "x": + return t4.$d.getTime(); + case "z": + return "[" + t4.offsetName() + "]"; + case "zzz": + return "[" + t4.offsetName("long") + "]"; + default: + return e3; + } + }); + return n.bind(this)(a); + }; + }; + }); +})(advancedFormat); +var advancedFormatExports = advancedFormat.exports; +const dayjsAdvancedFormat = /* @__PURE__ */ getDefaultExportFromCjs(advancedFormatExports); +dayjs.extend(dayjsIsoWeek); +dayjs.extend(dayjsCustomParseFormat); +dayjs.extend(dayjsAdvancedFormat); +let dateFormat = ""; +let axisFormat = ""; +let tickInterval = void 0; +let todayMarker = ""; +let includes = []; +let excludes = []; +let links = {}; +let sections = []; +let tasks = []; +let currentSection = ""; +let displayMode = ""; +const tags = ["active", "done", "crit", "milestone"]; +let funs = []; +let inclusiveEndDates = false; +let topAxis = false; +let weekday = "sunday"; +let lastOrder = 0; +const clear = function() { + sections = []; + tasks = []; + currentSection = ""; + funs = []; + taskCnt = 0; + lastTask = void 0; + lastTaskID = void 0; + rawTasks = []; + dateFormat = ""; + axisFormat = ""; + displayMode = ""; + tickInterval = void 0; + todayMarker = ""; + includes = []; + excludes = []; + inclusiveEndDates = false; + topAxis = false; + lastOrder = 0; + links = {}; + clear$1(); + weekday = "sunday"; +}; +const setAxisFormat = function(txt) { + axisFormat = txt; +}; +const getAxisFormat = function() { + return axisFormat; +}; +const setTickInterval = function(txt) { + tickInterval = txt; +}; +const getTickInterval = function() { + return tickInterval; +}; +const setTodayMarker = function(txt) { + todayMarker = txt; +}; +const getTodayMarker = function() { + return todayMarker; +}; +const setDateFormat = function(txt) { + dateFormat = txt; +}; +const enableInclusiveEndDates = function() { + inclusiveEndDates = true; +}; +const endDatesAreInclusive = function() { + return inclusiveEndDates; +}; +const enableTopAxis = function() { + topAxis = true; +}; +const topAxisEnabled = function() { + return topAxis; +}; +const setDisplayMode = function(txt) { + displayMode = txt; +}; +const getDisplayMode = function() { + return displayMode; +}; +const getDateFormat = function() { + return dateFormat; +}; +const setIncludes = function(txt) { + includes = txt.toLowerCase().split(/[\s,]+/); +}; +const getIncludes = function() { + return includes; +}; +const setExcludes = function(txt) { + excludes = txt.toLowerCase().split(/[\s,]+/); +}; +const getExcludes = function() { + return excludes; +}; +const getLinks = function() { + return links; +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 10; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks = rawTasks; + return tasks; +}; +const isInvalidDate = function(date2, dateFormat2, excludes2, includes2) { + if (includes2.includes(date2.format(dateFormat2.trim()))) { + return false; + } + if (date2.isoWeekday() >= 6 && excludes2.includes("weekends")) { + return true; + } + if (excludes2.includes(date2.format("dddd").toLowerCase())) { + return true; + } + return excludes2.includes(date2.format(dateFormat2.trim())); +}; +const setWeekday = function(txt) { + weekday = txt; +}; +const getWeekday = function() { + return weekday; +}; +const checkTaskDates = function(task, dateFormat2, excludes2, includes2) { + if (!excludes2.length || task.manualEndTime) { + return; + } + let startTime; + if (task.startTime instanceof Date) { + startTime = dayjs(task.startTime); + } else { + startTime = dayjs(task.startTime, dateFormat2, true); + } + startTime = startTime.add(1, "d"); + let originalEndTime; + if (task.endTime instanceof Date) { + originalEndTime = dayjs(task.endTime); + } else { + originalEndTime = dayjs(task.endTime, dateFormat2, true); + } + const [fixedEndTime, renderEndTime] = fixTaskDates( + startTime, + originalEndTime, + dateFormat2, + excludes2, + includes2 + ); + task.endTime = fixedEndTime.toDate(); + task.renderEndTime = renderEndTime; +}; +const fixTaskDates = function(startTime, endTime, dateFormat2, excludes2, includes2) { + let invalid = false; + let renderEndTime = null; + while (startTime <= endTime) { + if (!invalid) { + renderEndTime = endTime.toDate(); + } + invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2); + if (invalid) { + endTime = endTime.add(1, "d"); + } + startTime = startTime.add(1, "d"); + } + return [endTime, renderEndTime]; +}; +const getStartDate = function(prevTime, dateFormat2, str) { + str = str.trim(); + const re = /^after\s+([\d\w- ]+)/; + const afterStatement = re.exec(str.trim()); + if (afterStatement !== null) { + let latestEndingTask = null; + afterStatement[1].split(" ").forEach(function(id) { + let task = findTaskById(id); + if (task !== void 0) { + if (!latestEndingTask) { + latestEndingTask = task; + } else { + if (task.endTime > latestEndingTask.endTime) { + latestEndingTask = task; + } + } + } + }); + if (!latestEndingTask) { + const dt = /* @__PURE__ */ new Date(); + dt.setHours(0, 0, 0, 0); + return dt; + } else { + return latestEndingTask.endTime; + } + } + let mDate = dayjs(str, dateFormat2.trim(), true); + if (mDate.isValid()) { + return mDate.toDate(); + } else { + log.debug("Invalid date:" + str); + log.debug("With date format:" + dateFormat2.trim()); + const d = new Date(str); + if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously + // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304. + // This can cause virtually infinite loops while rendering, so for the + // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as + // invalid. + d.getFullYear() < -1e4 || d.getFullYear() > 1e4) { + throw new Error("Invalid date:" + str); + } + return d; + } +}; +const parseDuration = function(str) { + const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim()); + if (statement !== null) { + return [Number.parseFloat(statement[1]), statement[2]]; + } + return [NaN, "ms"]; +}; +const getEndDate = function(prevTime, dateFormat2, str, inclusive = false) { + str = str.trim(); + let mDate = dayjs(str, dateFormat2.trim(), true); + if (mDate.isValid()) { + if (inclusive) { + mDate = mDate.add(1, "d"); + } + return mDate.toDate(); + } + let endTime = dayjs(prevTime); + const [durationValue, durationUnit] = parseDuration(str); + if (!Number.isNaN(durationValue)) { + const newEndTime = endTime.add(durationValue, durationUnit); + if (newEndTime.isValid()) { + endTime = newEndTime; + } + } + return endTime.toDate(); +}; +let taskCnt = 0; +const parseId = function(idStr) { + if (idStr === void 0) { + taskCnt = taskCnt + 1; + return "task" + taskCnt; + } + return idStr; +}; +const compileData = function(prevTask, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i = 0; i < data.length; i++) { + data[i] = data[i].trim(); + } + let endTimeData = ""; + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = prevTask.endTime; + endTimeData = data[0]; + break; + case 2: + task.id = parseId(); + task.startTime = getStartDate(void 0, dateFormat, data[0]); + endTimeData = data[1]; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = getStartDate(void 0, dateFormat, data[1]); + endTimeData = data[2]; + break; + } + if (endTimeData) { + task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates); + task.manualEndTime = dayjs(endTimeData, "YYYY-MM-DD", true).isValid(); + checkTaskDates(task, dateFormat, excludes, includes); + } + return task; +}; +const parseData = function(prevTaskId, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i = 0; i < data.length; i++) { + data[i] = data[i].trim(); + } + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = { + type: "prevTaskEnd", + id: prevTaskId + }; + task.endTime = { + data: data[0] + }; + break; + case 2: + task.id = parseId(); + task.startTime = { + type: "getStartDate", + startData: data[0] + }; + task.endTime = { + data: data[1] + }; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = { + type: "getStartDate", + startData: data[1] + }; + task.endTime = { + data: data[2] + }; + break; + } + return task; +}; +let lastTask; +let lastTaskID; +let rawTasks = []; +const taskDb = {}; +const addTask = function(descr, data) { + const rawTask = { + section: currentSection, + type: currentSection, + processed: false, + manualEndTime: false, + renderEndTime: null, + raw: { data }, + task: descr, + classes: [] + }; + const taskInfo = parseData(lastTaskID, data); + rawTask.raw.startTime = taskInfo.startTime; + rawTask.raw.endTime = taskInfo.endTime; + rawTask.id = taskInfo.id; + rawTask.prevTaskId = lastTaskID; + rawTask.active = taskInfo.active; + rawTask.done = taskInfo.done; + rawTask.crit = taskInfo.crit; + rawTask.milestone = taskInfo.milestone; + rawTask.order = lastOrder; + lastOrder++; + const pos = rawTasks.push(rawTask); + lastTaskID = rawTask.id; + taskDb[rawTask.id] = pos - 1; +}; +const findTaskById = function(id) { + const pos = taskDb[id]; + return rawTasks[pos]; +}; +const addTaskOrg = function(descr, data) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + const taskInfo = compileData(lastTask, data); + newTask.startTime = taskInfo.startTime; + newTask.endTime = taskInfo.endTime; + newTask.id = taskInfo.id; + newTask.active = taskInfo.active; + newTask.done = taskInfo.done; + newTask.crit = taskInfo.crit; + newTask.milestone = taskInfo.milestone; + lastTask = newTask; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + const task = rawTasks[pos]; + let startTime = ""; + switch (rawTasks[pos].raw.startTime.type) { + case "prevTaskEnd": { + const prevTask = findTaskById(task.prevTaskId); + task.startTime = prevTask.endTime; + break; + } + case "getStartDate": + startTime = getStartDate(void 0, dateFormat, rawTasks[pos].raw.startTime.startData); + if (startTime) { + rawTasks[pos].startTime = startTime; + } + break; + } + if (rawTasks[pos].startTime) { + rawTasks[pos].endTime = getEndDate( + rawTasks[pos].startTime, + dateFormat, + rawTasks[pos].raw.endTime.data, + inclusiveEndDates + ); + if (rawTasks[pos].endTime) { + rawTasks[pos].processed = true; + rawTasks[pos].manualEndTime = dayjs( + rawTasks[pos].raw.endTime.data, + "YYYY-MM-DD", + true + ).isValid(); + checkTaskDates(rawTasks[pos], dateFormat, excludes, includes); + } + } + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const setLink = function(ids, _linkStr) { + let linkStr = _linkStr; + if (getConfig().securityLevel !== "loose") { + linkStr = sanitizeUrl_1(_linkStr); + } + ids.split(",").forEach(function(id) { + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + pushFun(id, () => { + window.open(linkStr, "_self"); + }); + links[id] = linkStr; + } + }); + setClass(ids, "clickable"); +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(id) { + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + rawTask.classes.push(className); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + if (getConfig().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + pushFun(id, () => { + utils.runFunc(functionName, ...argList); + }); + } +}; +const pushFun = function(id, callbackFunction) { + funs.push( + function() { + const elem = document.querySelector(`[id="${id}"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + }, + function() { + const elem = document.querySelector(`[id="${id}-text"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + } + ); +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const ganttDb = { + getConfig: () => getConfig().gantt, + clear, + setDateFormat, + getDateFormat, + enableInclusiveEndDates, + endDatesAreInclusive, + enableTopAxis, + topAxisEnabled, + setAxisFormat, + getAxisFormat, + setTickInterval, + getTickInterval, + setTodayMarker, + getTodayMarker, + setAccTitle, + getAccTitle, + setDiagramTitle, + getDiagramTitle, + setDisplayMode, + getDisplayMode, + setAccDescription, + getAccDescription, + addSection, + getSections, + getTasks, + addTask, + findTaskById, + addTaskOrg, + setIncludes, + getIncludes, + setExcludes, + getExcludes, + setClickEvent, + setLink, + getLinks, + bindFunctions, + parseDuration, + isInvalidDate, + setWeekday, + getWeekday +}; +function getTaskTags(data, task, tags2) { + let matchFound = true; + while (matchFound) { + matchFound = false; + tags2.forEach(function(t) { + const pattern = "^\\s*" + t + "\\s*$"; + const regex = new RegExp(pattern); + if (data[0].match(regex)) { + task[t] = true; + data.shift(1); + matchFound = true; + } + }); + } +} +const setConf = function() { + log.debug("Something is calling, setConf, remove the call"); +}; +const mapWeekdayToTimeFunction = { + monday, + tuesday, + wednesday, + thursday, + friday, + saturday, + sunday +}; +const getMaxIntersections = (tasks2, orderOffset) => { + let timeline = [...tasks2].map(() => -Infinity); + let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order); + let maxIntersections = 0; + for (const element of sorted) { + for (let j = 0; j < timeline.length; j++) { + if (element.startTime >= timeline[j]) { + timeline[j] = element.endTime; + element.order = j + orderOffset; + if (j > maxIntersections) { + maxIntersections = j; + } + break; + } + } + } + return maxIntersections; +}; +let w; +const draw = function(text, id, version, diagObj) { + const conf = getConfig().gantt; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const elem = doc.getElementById(id); + w = elem.parentElement.offsetWidth; + if (w === void 0) { + w = 1200; + } + if (conf.useWidth !== void 0) { + w = conf.useWidth; + } + const taskArray = diagObj.db.getTasks(); + let categories = []; + for (const element of taskArray) { + categories.push(element.type); + } + categories = checkUnique(categories); + const categoryHeights = {}; + let h = 2 * conf.topPadding; + if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") { + const categoryElements = {}; + for (const element of taskArray) { + if (categoryElements[element.section] === void 0) { + categoryElements[element.section] = [element]; + } else { + categoryElements[element.section].push(element); + } + } + let intersections = 0; + for (const category of Object.keys(categoryElements)) { + const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1; + intersections += categoryHeight; + h += categoryHeight * (conf.barHeight + conf.barGap); + categoryHeights[category] = categoryHeight; + } + } else { + h += taskArray.length * (conf.barHeight + conf.barGap); + for (const category of categories) { + categoryHeights[category] = taskArray.filter((task) => task.type === category).length; + } + } + elem.setAttribute("viewBox", "0 0 " + w + " " + h); + const svg = root.select(`[id="${id}"]`); + const timeScale = time().domain([ + min(taskArray, function(d) { + return d.startTime; + }), + max(taskArray, function(d) { + return d.endTime; + }) + ]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]); + function taskCompare(a, b) { + const taskA = a.startTime; + const taskB = b.startTime; + let result = 0; + if (taskA > taskB) { + result = 1; + } else if (taskA < taskB) { + result = -1; + } + return result; + } + taskArray.sort(taskCompare); + makeGant(taskArray, w, h); + configureSvgSize(svg, h, w, conf.useMaxWidth); + svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText"); + function makeGant(tasks2, pageWidth, pageHeight) { + const barHeight = conf.barHeight; + const gap = barHeight + conf.barGap; + const topPadding = conf.topPadding; + const leftPadding = conf.leftPadding; + const colorScale = linear().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(interpolateHcl); + drawExcludeDays( + gap, + topPadding, + leftPadding, + pageWidth, + pageHeight, + tasks2, + diagObj.db.getExcludes(), + diagObj.db.getIncludes() + ); + makeGrid(leftPadding, topPadding, pageWidth, pageHeight); + drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth); + vertLabels(gap, topPadding); + drawToday(leftPadding, topPadding, pageWidth, pageHeight); + } + function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) { + const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))]; + const uniqueTasks = uniqueTaskOrderIds.map((id2) => theArray.find((item) => item.order === id2)); + svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) { + i = d.order; + return i * theGap + theTopPad - 2; + }).attr("width", function() { + return w2 - conf.rightPadding / 2; + }).attr("height", theGap).attr("class", function(d) { + for (const [i, category] of categories.entries()) { + if (d.type === category) { + return "section section" + i % conf.numberSectionStyles; + } + } + return "section section0"; + }); + const rectangles = svg.append("g").selectAll("rect").data(theArray).enter(); + const links2 = diagObj.db.getLinks(); + rectangles.append("rect").attr("id", function(d) { + return d.id; + }).attr("rx", 3).attr("ry", 3).attr("x", function(d) { + if (d.milestone) { + return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + return timeScale(d.startTime) + theSidePad; + }).attr("y", function(d, i) { + i = d.order; + return i * theGap + theTopPad; + }).attr("width", function(d) { + if (d.milestone) { + return theBarHeight; + } + return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); + }).attr("height", theBarHeight).attr("transform-origin", function(d, i) { + i = d.order; + return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px"; + }).attr("class", function(d) { + const res = "task"; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i, category] of categories.entries()) { + if (d.type === category) { + secNum = i % conf.numberSectionStyles; + } + } + let taskClass = ""; + if (d.active) { + if (d.crit) { + taskClass += " activeCrit"; + } else { + taskClass = " active"; + } + } else if (d.done) { + if (d.crit) { + taskClass = " doneCrit"; + } else { + taskClass = " done"; + } + } else { + if (d.crit) { + taskClass += " crit"; + } + } + if (taskClass.length === 0) { + taskClass = " task"; + } + if (d.milestone) { + taskClass = " milestone " + taskClass; + } + taskClass += secNum; + taskClass += " " + classStr; + return res + taskClass; + }); + rectangles.append("text").attr("id", function(d) { + return d.id + "-text"; + }).text(function(d) { + return d.task; + }).attr("font-size", conf.fontSize).attr("x", function(d) { + let startX = timeScale(d.startTime); + let endX = timeScale(d.renderEndTime || d.endTime); + if (d.milestone) { + startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf.leftPadding > w2) { + return startX + theSidePad - 5; + } else { + return endX + theSidePad + 5; + } + } else { + return (endX - startX) / 2 + startX + theSidePad; + } + }).attr("y", function(d, i) { + i = d.order; + return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad; + }).attr("text-height", theBarHeight).attr("class", function(d) { + const startX = timeScale(d.startTime); + let endX = timeScale(d.endTime); + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i, category] of categories.entries()) { + if (d.type === category) { + secNum = i % conf.numberSectionStyles; + } + } + let taskType = ""; + if (d.active) { + if (d.crit) { + taskType = "activeCritText" + secNum; + } else { + taskType = "activeText" + secNum; + } + } + if (d.done) { + if (d.crit) { + taskType = taskType + " doneCritText" + secNum; + } else { + taskType = taskType + " doneText" + secNum; + } + } else { + if (d.crit) { + taskType = taskType + " critText" + secNum; + } + } + if (d.milestone) { + taskType += " milestoneText"; + } + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf.leftPadding > w2) { + return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType; + } else { + return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth; + } + } else { + return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth; + } + }); + const securityLevel2 = getConfig().securityLevel; + if (securityLevel2 === "sandbox") { + let sandboxElement2; + sandboxElement2 = d3select("#i" + id); + const doc2 = sandboxElement2.nodes()[0].contentDocument; + rectangles.filter(function(d) { + return links2[d.id] !== void 0; + }).each(function(o) { + var taskRect = doc2.querySelector("#" + o.id); + var taskText = doc2.querySelector("#" + o.id + "-text"); + const oldParent = taskRect.parentNode; + var Link = doc2.createElement("a"); + Link.setAttribute("xlink:href", links2[o.id]); + Link.setAttribute("target", "_top"); + oldParent.appendChild(Link); + Link.appendChild(taskRect); + Link.appendChild(taskText); + }); + } + } + function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) { + if (excludes2.length === 0 && includes2.length === 0) { + return; + } + let minTime; + let maxTime; + for (const { startTime, endTime } of tasks2) { + if (minTime === void 0 || startTime < minTime) { + minTime = startTime; + } + if (maxTime === void 0 || endTime > maxTime) { + maxTime = endTime; + } + } + if (!minTime || !maxTime) { + return; + } + if (dayjs(maxTime).diff(dayjs(minTime), "year") > 5) { + log.warn( + "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days." + ); + return; + } + const dateFormat2 = diagObj.db.getDateFormat(); + const excludeRanges = []; + let range = null; + let d = dayjs(minTime); + while (d.valueOf() <= maxTime) { + if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) { + if (!range) { + range = { + start: d, + end: d + }; + } else { + range.end = d; + } + } else { + if (range) { + excludeRanges.push(range); + range = null; + } + } + d = d.add(1, "d"); + } + const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter(); + rectangles.append("rect").attr("id", function(d2) { + return "exclude-" + d2.start.format("YYYY-MM-DD"); + }).attr("x", function(d2) { + return timeScale(d2.start) + theSidePad; + }).attr("y", conf.gridLineStartPadding).attr("width", function(d2) { + const renderEnd = d2.end.add(1, "day"); + return timeScale(renderEnd) - timeScale(d2.start); + }).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) { + return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px"; + }).attr("class", "exclude-range"); + } + function makeGrid(theSidePad, theTopPad, w2, h2) { + let bottomXAxis = axisBottom(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); + const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/; + const resultTickInterval = reTickInterval.exec( + diagObj.db.getTickInterval() || conf.tickInterval + ); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf.weekday; + switch (interval) { + case "millisecond": + bottomXAxis.ticks(timeMillisecond.every(every)); + break; + case "second": + bottomXAxis.ticks(timeSecond.every(every)); + break; + case "minute": + bottomXAxis.ticks(timeMinute.every(every)); + break; + case "hour": + bottomXAxis.ticks(timeHour.every(every)); + break; + case "day": + bottomXAxis.ticks(timeDay.every(every)); + break; + case "week": + bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + bottomXAxis.ticks(timeMonth.every(every)); + break; + } + } + svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"); + if (diagObj.db.topAxisEnabled() || conf.topAxis) { + let topXAxis = axisTop(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf.weekday; + switch (interval) { + case "millisecond": + topXAxis.ticks(timeMillisecond.every(every)); + break; + case "second": + topXAxis.ticks(timeSecond.every(every)); + break; + case "minute": + topXAxis.ticks(timeMinute.every(every)); + break; + case "hour": + topXAxis.ticks(timeHour.every(every)); + break; + case "day": + topXAxis.ticks(timeDay.every(every)); + break; + case "week": + topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + topXAxis.ticks(timeMonth.every(every)); + break; + } + } + svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10); + } + } + function vertLabels(theGap, theTopPad) { + let prevGap = 0; + const numOccurances = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]); + svg.append("g").selectAll("text").data(numOccurances).enter().append(function(d) { + const rows = d[0].split(common.lineBreakRegex); + const dy = -(rows.length - 1) / 2; + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("dy", dy + "em"); + for (const [j, row] of rows.entries()) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttribute("alignment-baseline", "central"); + tspan.setAttribute("x", "10"); + if (j > 0) { + tspan.setAttribute("dy", "1em"); + } + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + return svgLabel; + }).attr("x", 10).attr("y", function(d, i) { + if (i > 0) { + for (let j = 0; j < i; j++) { + prevGap += numOccurances[i - 1][1]; + return d[1] * theGap / 2 + prevGap * theGap + theTopPad; + } + } else { + return d[1] * theGap / 2 + theTopPad; + } + }).attr("font-size", conf.sectionFontSize).attr("class", function(d) { + for (const [i, category] of categories.entries()) { + if (d[0] === category) { + return "sectionTitle sectionTitle" + i % conf.numberSectionStyles; + } + } + return "sectionTitle"; + }); + } + function drawToday(theSidePad, theTopPad, w2, h2) { + const todayMarker2 = diagObj.db.getTodayMarker(); + if (todayMarker2 === "off") { + return; + } + const todayG = svg.append("g").attr("class", "today"); + const today = /* @__PURE__ */ new Date(); + const todayLine = todayG.append("line"); + todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today"); + if (todayMarker2 !== "") { + todayLine.attr("style", todayMarker2.replace(/,/g, ";")); + } + } + function checkUnique(arr) { + const hash = {}; + const result = []; + for (let i = 0, l = arr.length; i < l; ++i) { + if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) { + hash[arr[i]] = true; + result.push(arr[i]); + } + } + return result; + } +}; +const ganttRenderer = { + setConf, + draw +}; +const getStyles = (options) => ` + .mermaid-main-font { + font-family: "trebuchet ms", verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + .exclude-range { + fill: ${options.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${options.sectionBkgColor}; + } + + .section2 { + fill: ${options.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${options.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${options.titleColor}; + } + + .sectionTitle1 { + fill: ${options.titleColor}; + } + + .sectionTitle2 { + fill: ${options.titleColor}; + } + + .sectionTitle3 { + fill: ${options.titleColor}; + } + + .sectionTitle { + text-anchor: start; + // font-size: ${options.ganttFontSize}; + // text-height: 14px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${options.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + text { + font-family: ${options.fontFamily}; + fill: ${options.textColor}; + } + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${options.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + // .taskText:not([font-size]) { + // font-size: ${options.ganttFontSize}; + // } + + .taskTextOutsideRight { + fill: ${options.taskTextDarkColor}; + text-anchor: start; + // font-size: ${options.ganttFontSize}; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + .taskTextOutsideLeft { + fill: ${options.taskTextDarkColor}; + text-anchor: end; + // font-size: ${options.ganttFontSize}; + } + + /* Special case clickable */ + .task.clickable { + cursor: pointer; + } + .taskText.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${options.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${options.taskBkgColor}; + stroke: ${options.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${options.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${options.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${options.activeTaskBkgColor}; + stroke: ${options.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${options.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${options.doneTaskBorderColor}; + fill: ${options.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${options.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${options.critBorderColor}; + fill: ${options.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${options.critBorderColor}; + fill: ${options.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${options.critBorderColor}; + fill: ${options.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${options.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${options.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor} ; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } +`; +const ganttStyles = getStyles; +const diagram = { + parser: ganttParser, + db: ganttDb, + renderer: ganttRenderer, + styles: ganttStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-0775767f.js b/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-0775767f.js new file mode 100644 index 0000000..be932e0 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-0775767f.js @@ -0,0 +1,1223 @@ +import { c as O, s as vt, g as At, a as Ot, b as St, B as It, D as Gt, l as G, f as D, E as Pt, H as Ht, I as ut, j as Nt, z as Bt, J as Vt } from "./mermaid-e4a58915.js"; +var mt = function() { + var r = function(q, h, b, k) { + for (b = b || {}, k = q.length; k--; b[q[k]] = h) + ; + return b; + }, a = [1, 3], o = [1, 6], u = [1, 4], n = [1, 5], c = [2, 5], m = [1, 12], l = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39, 46], E = [7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], _ = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], i = [7, 13, 46], g = [1, 42], f = [1, 41], x = [7, 13, 29, 32, 34, 37, 46], p = [1, 55], d = [1, 56], y = [1, 57], N = [7, 13, 32, 34, 41, 46], w = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, eol: 4, GG: 5, document: 6, EOF: 7, ":": 8, DIR: 9, options: 10, body: 11, OPT: 12, NL: 13, line: 14, statement: 15, commitStatement: 16, mergeStatement: 17, cherryPickStatement: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, section: 24, branchStatement: 25, CHECKOUT: 26, ref: 27, BRANCH: 28, ORDER: 29, NUM: 30, CHERRY_PICK: 31, COMMIT_ID: 32, STR: 33, COMMIT_TAG: 34, EMPTYSTR: 35, MERGE: 36, COMMIT_TYPE: 37, commitType: 38, COMMIT: 39, commit_arg: 40, COMMIT_MSG: 41, NORMAL: 42, REVERSE: 43, HIGHLIGHT: 44, ID: 45, ";": 46, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "COMMIT_TAG", 35: "EMPTYSTR", 36: "MERGE", 37: "COMMIT_TYPE", 39: "COMMIT", 41: "COMMIT_MSG", 42: "NORMAL", 43: "REVERSE", 44: "HIGHLIGHT", 45: "ID", 46: ";" }, + productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 5], [18, 5], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [40, 0], [40, 1], [38, 1], [38, 1], [38, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]], + performAction: function(h, b, k, s, T, t, W) { + var e = t.length - 1; + switch (T) { + case 2: + return t[e]; + case 3: + return t[e - 1]; + case 4: + return s.setDirection(t[e - 3]), t[e - 1]; + case 6: + s.setOptions(t[e - 1]), this.$ = t[e]; + break; + case 7: + t[e - 1] += t[e], this.$ = t[e - 1]; + break; + case 9: + this.$ = []; + break; + case 10: + t[e - 1].push(t[e]), this.$ = t[e - 1]; + break; + case 11: + this.$ = t[e - 1]; + break; + case 16: + this.$ = t[e].trim(), s.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = t[e].trim(), s.setAccDescription(this.$); + break; + case 19: + s.addSection(t[e].substr(8)), this.$ = t[e].substr(8); + break; + case 21: + s.checkout(t[e]); + break; + case 22: + s.branch(t[e]); + break; + case 23: + s.branch(t[e - 2], t[e]); + break; + case 24: + s.cherryPick(t[e], "", void 0); + break; + case 25: + s.cherryPick(t[e - 2], "", t[e]); + break; + case 26: + case 28: + s.cherryPick(t[e - 2], "", ""); + break; + case 27: + s.cherryPick(t[e], "", t[e - 2]); + break; + case 29: + s.merge(t[e], "", "", ""); + break; + case 30: + s.merge(t[e - 2], t[e], "", ""); + break; + case 31: + s.merge(t[e - 2], "", t[e], ""); + break; + case 32: + s.merge(t[e - 2], "", "", t[e]); + break; + case 33: + s.merge(t[e - 4], t[e], "", t[e - 2]); + break; + case 34: + s.merge(t[e - 4], "", t[e], t[e - 2]); + break; + case 35: + s.merge(t[e - 4], "", t[e - 2], t[e]); + break; + case 36: + s.merge(t[e - 4], t[e - 2], t[e], ""); + break; + case 37: + s.merge(t[e - 4], t[e - 2], "", t[e]); + break; + case 38: + s.merge(t[e - 4], t[e], t[e - 2], ""); + break; + case 39: + s.merge(t[e - 6], t[e - 4], t[e - 2], t[e]); + break; + case 40: + s.merge(t[e - 6], t[e], t[e - 4], t[e - 2]); + break; + case 41: + s.merge(t[e - 6], t[e - 4], t[e], t[e - 2]); + break; + case 42: + s.merge(t[e - 6], t[e - 2], t[e - 4], t[e]); + break; + case 43: + s.merge(t[e - 6], t[e], t[e - 2], t[e - 4]); + break; + case 44: + s.merge(t[e - 6], t[e - 2], t[e], t[e - 4]); + break; + case 45: + s.commit(t[e]); + break; + case 46: + s.commit("", "", s.commitType.NORMAL, t[e]); + break; + case 47: + s.commit("", "", t[e], ""); + break; + case 48: + s.commit("", "", t[e], t[e - 2]); + break; + case 49: + s.commit("", "", t[e - 2], t[e]); + break; + case 50: + s.commit("", t[e], s.commitType.NORMAL, ""); + break; + case 51: + s.commit("", t[e - 2], s.commitType.NORMAL, t[e]); + break; + case 52: + s.commit("", t[e], s.commitType.NORMAL, t[e - 2]); + break; + case 53: + s.commit("", t[e - 2], t[e], ""); + break; + case 54: + s.commit("", t[e], t[e - 2], ""); + break; + case 55: + s.commit("", t[e - 4], t[e - 2], t[e]); + break; + case 56: + s.commit("", t[e - 4], t[e], t[e - 2]); + break; + case 57: + s.commit("", t[e - 2], t[e - 4], t[e]); + break; + case 58: + s.commit("", t[e], t[e - 4], t[e - 2]); + break; + case 59: + s.commit("", t[e], t[e - 2], t[e - 4]); + break; + case 60: + s.commit("", t[e - 2], t[e], t[e - 4]); + break; + case 61: + s.commit(t[e], "", s.commitType.NORMAL, ""); + break; + case 62: + s.commit(t[e], "", s.commitType.NORMAL, t[e - 2]); + break; + case 63: + s.commit(t[e - 2], "", s.commitType.NORMAL, t[e]); + break; + case 64: + s.commit(t[e - 2], "", t[e], ""); + break; + case 65: + s.commit(t[e], "", t[e - 2], ""); + break; + case 66: + s.commit(t[e], t[e - 2], s.commitType.NORMAL, ""); + break; + case 67: + s.commit(t[e - 2], t[e], s.commitType.NORMAL, ""); + break; + case 68: + s.commit(t[e - 4], "", t[e - 2], t[e]); + break; + case 69: + s.commit(t[e - 4], "", t[e], t[e - 2]); + break; + case 70: + s.commit(t[e - 2], "", t[e - 4], t[e]); + break; + case 71: + s.commit(t[e], "", t[e - 4], t[e - 2]); + break; + case 72: + s.commit(t[e], "", t[e - 2], t[e - 4]); + break; + case 73: + s.commit(t[e - 2], "", t[e], t[e - 4]); + break; + case 74: + s.commit(t[e - 4], t[e], t[e - 2], ""); + break; + case 75: + s.commit(t[e - 4], t[e - 2], t[e], ""); + break; + case 76: + s.commit(t[e - 2], t[e], t[e - 4], ""); + break; + case 77: + s.commit(t[e], t[e - 2], t[e - 4], ""); + break; + case 78: + s.commit(t[e], t[e - 4], t[e - 2], ""); + break; + case 79: + s.commit(t[e - 2], t[e - 4], t[e], ""); + break; + case 80: + s.commit(t[e - 4], t[e], s.commitType.NORMAL, t[e - 2]); + break; + case 81: + s.commit(t[e - 4], t[e - 2], s.commitType.NORMAL, t[e]); + break; + case 82: + s.commit(t[e - 2], t[e], s.commitType.NORMAL, t[e - 4]); + break; + case 83: + s.commit(t[e], t[e - 2], s.commitType.NORMAL, t[e - 4]); + break; + case 84: + s.commit(t[e], t[e - 4], s.commitType.NORMAL, t[e - 2]); + break; + case 85: + s.commit(t[e - 2], t[e - 4], s.commitType.NORMAL, t[e]); + break; + case 86: + s.commit(t[e - 6], t[e - 4], t[e - 2], t[e]); + break; + case 87: + s.commit(t[e - 6], t[e - 4], t[e], t[e - 2]); + break; + case 88: + s.commit(t[e - 6], t[e - 2], t[e - 4], t[e]); + break; + case 89: + s.commit(t[e - 6], t[e], t[e - 4], t[e - 2]); + break; + case 90: + s.commit(t[e - 6], t[e - 2], t[e], t[e - 4]); + break; + case 91: + s.commit(t[e - 6], t[e], t[e - 2], t[e - 4]); + break; + case 92: + s.commit(t[e - 4], t[e - 6], t[e - 2], t[e]); + break; + case 93: + s.commit(t[e - 4], t[e - 6], t[e], t[e - 2]); + break; + case 94: + s.commit(t[e - 2], t[e - 6], t[e - 4], t[e]); + break; + case 95: + s.commit(t[e], t[e - 6], t[e - 4], t[e - 2]); + break; + case 96: + s.commit(t[e - 2], t[e - 6], t[e], t[e - 4]); + break; + case 97: + s.commit(t[e], t[e - 6], t[e - 2], t[e - 4]); + break; + case 98: + s.commit(t[e], t[e - 4], t[e - 2], t[e - 6]); + break; + case 99: + s.commit(t[e - 2], t[e - 4], t[e], t[e - 6]); + break; + case 100: + s.commit(t[e], t[e - 2], t[e - 4], t[e - 6]); + break; + case 101: + s.commit(t[e - 2], t[e], t[e - 4], t[e - 6]); + break; + case 102: + s.commit(t[e - 4], t[e - 2], t[e], t[e - 6]); + break; + case 103: + s.commit(t[e - 4], t[e], t[e - 2], t[e - 6]); + break; + case 104: + s.commit(t[e - 2], t[e - 4], t[e - 6], t[e]); + break; + case 105: + s.commit(t[e], t[e - 4], t[e - 6], t[e - 2]); + break; + case 106: + s.commit(t[e - 2], t[e], t[e - 6], t[e - 4]); + break; + case 107: + s.commit(t[e], t[e - 2], t[e - 6], t[e - 4]); + break; + case 108: + s.commit(t[e - 4], t[e - 2], t[e - 6], t[e]); + break; + case 109: + s.commit(t[e - 4], t[e], t[e - 6], t[e - 2]); + break; + case 110: + this.$ = ""; + break; + case 111: + this.$ = t[e]; + break; + case 112: + this.$ = s.commitType.NORMAL; + break; + case 113: + this.$ = s.commitType.REVERSE; + break; + case 114: + this.$ = s.commitType.HIGHLIGHT; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: a, 7: o, 13: u, 46: n }, { 1: [3] }, { 3: 7, 4: 2, 5: a, 7: o, 13: u, 46: n }, { 6: 8, 7: c, 8: [1, 9], 9: [1, 10], 10: 11, 13: m }, r(l, [2, 117]), r(l, [2, 118]), r(l, [2, 119]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: c, 10: 11, 13: m }, { 8: [1, 15] }, r(E, [2, 9], { 11: 16, 12: [1, 17] }), r(_, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: c, 10: 11, 13: m }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 36: [1, 33], 39: [1, 32] }, r(_, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, r(E, [2, 10]), { 4: 37, 7: o, 13: u, 46: n }, r(E, [2, 12]), r(i, [2, 13]), r(i, [2, 14]), r(i, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, r(i, [2, 18]), r(i, [2, 19]), r(i, [2, 20]), { 27: 40, 33: g, 45: f }, r(i, [2, 110], { 40: 43, 32: [1, 46], 33: [1, 48], 34: [1, 44], 37: [1, 45], 41: [1, 47] }), { 27: 49, 33: g, 45: f }, { 32: [1, 50], 34: [1, 51] }, { 27: 52, 33: g, 45: f }, { 1: [2, 4] }, r(E, [2, 11]), r(i, [2, 16]), r(i, [2, 17]), r(i, [2, 21]), r(x, [2, 115]), r(x, [2, 116]), r(i, [2, 45]), { 33: [1, 53] }, { 38: 54, 42: p, 43: d, 44: y }, { 33: [1, 58] }, { 33: [1, 59] }, r(i, [2, 111]), r(i, [2, 29], { 32: [1, 60], 34: [1, 62], 37: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 35: [1, 65] }, r(i, [2, 22], { 29: [1, 66] }), r(i, [2, 46], { 32: [1, 68], 37: [1, 67], 41: [1, 69] }), r(i, [2, 47], { 32: [1, 71], 34: [1, 70], 41: [1, 72] }), r(N, [2, 112]), r(N, [2, 113]), r(N, [2, 114]), r(i, [2, 50], { 34: [1, 73], 37: [1, 74], 41: [1, 75] }), r(i, [2, 61], { 32: [1, 78], 34: [1, 76], 37: [1, 77] }), { 33: [1, 79] }, { 38: 80, 42: p, 43: d, 44: y }, { 33: [1, 81] }, r(i, [2, 24], { 34: [1, 82] }), { 32: [1, 83] }, { 32: [1, 84] }, { 30: [1, 85] }, { 38: 86, 42: p, 43: d, 44: y }, { 33: [1, 87] }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 38: 93, 42: p, 43: d, 44: y }, { 33: [1, 94] }, { 33: [1, 95] }, { 38: 96, 42: p, 43: d, 44: y }, { 33: [1, 97] }, r(i, [2, 30], { 34: [1, 99], 37: [1, 98] }), r(i, [2, 31], { 32: [1, 101], 34: [1, 100] }), r(i, [2, 32], { 32: [1, 102], 37: [1, 103] }), { 33: [1, 104], 35: [1, 105] }, { 33: [1, 106] }, { 33: [1, 107] }, r(i, [2, 23]), r(i, [2, 48], { 32: [1, 108], 41: [1, 109] }), r(i, [2, 52], { 37: [1, 110], 41: [1, 111] }), r(i, [2, 62], { 32: [1, 113], 37: [1, 112] }), r(i, [2, 49], { 32: [1, 114], 41: [1, 115] }), r(i, [2, 54], { 34: [1, 116], 41: [1, 117] }), r(i, [2, 65], { 32: [1, 119], 34: [1, 118] }), r(i, [2, 51], { 37: [1, 120], 41: [1, 121] }), r(i, [2, 53], { 34: [1, 122], 41: [1, 123] }), r(i, [2, 66], { 34: [1, 125], 37: [1, 124] }), r(i, [2, 63], { 32: [1, 127], 37: [1, 126] }), r(i, [2, 64], { 32: [1, 129], 34: [1, 128] }), r(i, [2, 67], { 34: [1, 131], 37: [1, 130] }), { 38: 132, 42: p, 43: d, 44: y }, { 33: [1, 133] }, { 33: [1, 134] }, { 33: [1, 135] }, { 33: [1, 136] }, { 38: 137, 42: p, 43: d, 44: y }, r(i, [2, 25]), r(i, [2, 26]), r(i, [2, 27]), r(i, [2, 28]), { 33: [1, 138] }, { 33: [1, 139] }, { 38: 140, 42: p, 43: d, 44: y }, { 33: [1, 141] }, { 38: 142, 42: p, 43: d, 44: y }, { 33: [1, 143] }, { 33: [1, 144] }, { 33: [1, 145] }, { 33: [1, 146] }, { 33: [1, 147] }, { 33: [1, 148] }, { 33: [1, 149] }, { 38: 150, 42: p, 43: d, 44: y }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 38: 154, 42: p, 43: d, 44: y }, { 33: [1, 155] }, { 38: 156, 42: p, 43: d, 44: y }, { 33: [1, 157] }, { 33: [1, 158] }, { 33: [1, 159] }, { 38: 160, 42: p, 43: d, 44: y }, { 33: [1, 161] }, r(i, [2, 36], { 34: [1, 162] }), r(i, [2, 37], { 37: [1, 163] }), r(i, [2, 35], { 32: [1, 164] }), r(i, [2, 38], { 34: [1, 165] }), r(i, [2, 33], { 37: [1, 166] }), r(i, [2, 34], { 32: [1, 167] }), r(i, [2, 59], { 41: [1, 168] }), r(i, [2, 72], { 32: [1, 169] }), r(i, [2, 60], { 41: [1, 170] }), r(i, [2, 83], { 37: [1, 171] }), r(i, [2, 73], { 32: [1, 172] }), r(i, [2, 82], { 37: [1, 173] }), r(i, [2, 58], { 41: [1, 174] }), r(i, [2, 71], { 32: [1, 175] }), r(i, [2, 57], { 41: [1, 176] }), r(i, [2, 77], { 34: [1, 177] }), r(i, [2, 70], { 32: [1, 178] }), r(i, [2, 76], { 34: [1, 179] }), r(i, [2, 56], { 41: [1, 180] }), r(i, [2, 84], { 37: [1, 181] }), r(i, [2, 55], { 41: [1, 182] }), r(i, [2, 78], { 34: [1, 183] }), r(i, [2, 79], { 34: [1, 184] }), r(i, [2, 85], { 37: [1, 185] }), r(i, [2, 69], { 32: [1, 186] }), r(i, [2, 80], { 37: [1, 187] }), r(i, [2, 68], { 32: [1, 188] }), r(i, [2, 74], { 34: [1, 189] }), r(i, [2, 75], { 34: [1, 190] }), r(i, [2, 81], { 37: [1, 191] }), { 33: [1, 192] }, { 38: 193, 42: p, 43: d, 44: y }, { 33: [1, 194] }, { 33: [1, 195] }, { 38: 196, 42: p, 43: d, 44: y }, { 33: [1, 197] }, { 33: [1, 198] }, { 33: [1, 199] }, { 33: [1, 200] }, { 38: 201, 42: p, 43: d, 44: y }, { 33: [1, 202] }, { 38: 203, 42: p, 43: d, 44: y }, { 33: [1, 204] }, { 33: [1, 205] }, { 33: [1, 206] }, { 33: [1, 207] }, { 33: [1, 208] }, { 33: [1, 209] }, { 33: [1, 210] }, { 38: 211, 42: p, 43: d, 44: y }, { 33: [1, 212] }, { 33: [1, 213] }, { 33: [1, 214] }, { 38: 215, 42: p, 43: d, 44: y }, { 33: [1, 216] }, { 38: 217, 42: p, 43: d, 44: y }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 38: 221, 42: p, 43: d, 44: y }, r(i, [2, 39]), r(i, [2, 41]), r(i, [2, 40]), r(i, [2, 42]), r(i, [2, 44]), r(i, [2, 43]), r(i, [2, 100]), r(i, [2, 101]), r(i, [2, 98]), r(i, [2, 99]), r(i, [2, 103]), r(i, [2, 102]), r(i, [2, 107]), r(i, [2, 106]), r(i, [2, 105]), r(i, [2, 104]), r(i, [2, 109]), r(i, [2, 108]), r(i, [2, 97]), r(i, [2, 96]), r(i, [2, 95]), r(i, [2, 94]), r(i, [2, 92]), r(i, [2, 93]), r(i, [2, 91]), r(i, [2, 90]), r(i, [2, 89]), r(i, [2, 88]), r(i, [2, 86]), r(i, [2, 87])], + defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] }, + parseError: function(h, b) { + if (b.recoverable) + this.trace(h); + else { + var k = new Error(h); + throw k.hash = b, k; + } + }, + parse: function(h) { + var b = this, k = [0], s = [], T = [null], t = [], W = this.table, e = "", rt = 0, pt = 0, Lt = 2, bt = 1, Rt = t.slice.call(arguments, 1), M = Object.create(this.lexer), Y = { yy: {} }; + for (var ct in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, ct) && (Y.yy[ct] = this.yy[ct]); + M.setInput(h, Y.yy), Y.yy.lexer = M, Y.yy.parser = this, typeof M.yylloc > "u" && (M.yylloc = {}); + var ot = M.yylloc; + t.push(ot); + var Mt = M.options && M.options.ranges; + typeof Y.yy.parseError == "function" ? this.parseError = Y.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function Ct() { + var j; + return j = s.pop() || M.lex() || bt, typeof j != "number" && (j instanceof Array && (s = j, j = s.pop()), j = b.symbols_[j] || j), j; + } + for (var I, K, V, lt, J = {}, it, z, gt, st; ; ) { + if (K = k[k.length - 1], this.defaultActions[K] ? V = this.defaultActions[K] : ((I === null || typeof I > "u") && (I = Ct()), V = W[K] && W[K][I]), typeof V > "u" || !V.length || !V[0]) { + var ht = ""; + st = []; + for (it in W[K]) + this.terminals_[it] && it > Lt && st.push("'" + this.terminals_[it] + "'"); + M.showPosition ? ht = "Parse error on line " + (rt + 1) + `: +` + M.showPosition() + ` +Expecting ` + st.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : ht = "Parse error on line " + (rt + 1) + ": Unexpected " + (I == bt ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(ht, { + text: M.match, + token: this.terminals_[I] || I, + line: M.yylineno, + loc: ot, + expected: st + }); + } + if (V[0] instanceof Array && V.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + K + ", token: " + I); + switch (V[0]) { + case 1: + k.push(I), T.push(M.yytext), t.push(M.yylloc), k.push(V[1]), I = null, pt = M.yyleng, e = M.yytext, rt = M.yylineno, ot = M.yylloc; + break; + case 2: + if (z = this.productions_[V[1]][1], J.$ = T[T.length - z], J._$ = { + first_line: t[t.length - (z || 1)].first_line, + last_line: t[t.length - 1].last_line, + first_column: t[t.length - (z || 1)].first_column, + last_column: t[t.length - 1].last_column + }, Mt && (J._$.range = [ + t[t.length - (z || 1)].range[0], + t[t.length - 1].range[1] + ]), lt = this.performAction.apply(J, [ + e, + pt, + rt, + Y.yy, + V[1], + T, + t + ].concat(Rt)), typeof lt < "u") + return lt; + z && (k = k.slice(0, -1 * z * 2), T = T.slice(0, -1 * z), t = t.slice(0, -1 * z)), k.push(this.productions_[V[1]][0]), T.push(J.$), t.push(J._$), gt = W[k[k.length - 2]][k[k.length - 1]], k.push(gt); + break; + case 3: + return !0; + } + } + return !0; + } + }, B = function() { + var q = { + EOF: 1, + parseError: function(b, k) { + if (this.yy.parser) + this.yy.parser.parseError(b, k); + else + throw new Error(b); + }, + // resets the lexer, sets new input + setInput: function(h, b) { + return this.yy = b || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var h = this._input[0]; + this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h; + var b = h.match(/(?:\r\n?|\n).*/g); + return b ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h; + }, + // unshifts one char (or a string) into the input + unput: function(h) { + var b = h.length, k = h.split(/(?:\r\n?|\n)/g); + this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - b), this.offset -= b; + var s = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), k.length - 1 && (this.yylineno -= k.length - 1); + var T = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: k ? (k.length === s.length ? this.yylloc.first_column : 0) + s[s.length - k.length].length - k[0].length : this.yylloc.first_column - b + }, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - b]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(h) { + this.unput(this.match.slice(h)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var h = this.matched.substr(0, this.matched.length - this.match.length); + return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var h = this.match; + return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var h = this.pastInput(), b = new Array(h.length + 1).join("-"); + return h + this.upcomingInput() + ` +` + b + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(h, b) { + var k, s, T; + if (this.options.backtrack_lexer && (T = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), s = h[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length + }, this.yytext += h[0], this.match += h[0], this.matches = h, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(h[0].length), this.matched += h[0], k = this.performAction.call(this, this.yy, this, b, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), k) + return k; + if (this._backtrack) { + for (var t in T) + this[t] = T[t]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var h, b, k, s; + this._more || (this.yytext = "", this.match = ""); + for (var T = this._currentRules(), t = 0; t < T.length; t++) + if (k = this._input.match(this.rules[T[t]]), k && (!b || k[0].length > b[0].length)) { + if (b = k, s = t, this.options.backtrack_lexer) { + if (h = this.test_match(k, T[t]), h !== !1) + return h; + if (this._backtrack) { + b = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return b ? (h = this.test_match(b, T[s]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var b = this.next(); + return b || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(b) { + this.conditionStack.push(b); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var b = this.conditionStack.length - 1; + return b > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(b) { + return b = this.conditionStack.length - 1 - Math.abs(b || 0), b >= 0 ? this.conditionStack[b] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(b) { + this.begin(b); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(b, k, s, T) { + switch (s) { + case 0: + return this.begin("acc_title"), 19; + case 1: + return this.popState(), "acc_title_value"; + case 2: + return this.begin("acc_descr"), 21; + case 3: + return this.popState(), "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 13; + case 8: + break; + case 9: + break; + case 10: + return 5; + case 11: + return 39; + case 12: + return 32; + case 13: + return 37; + case 14: + return 41; + case 15: + return 42; + case 16: + return 43; + case 17: + return 44; + case 18: + return 34; + case 19: + return 28; + case 20: + return 29; + case 21: + return 36; + case 22: + return 31; + case 23: + return 26; + case 24: + return 9; + case 25: + return 9; + case 26: + return 8; + case 27: + return "CARET"; + case 28: + this.begin("options"); + break; + case 29: + this.popState(); + break; + case 30: + return 12; + case 31: + return 35; + case 32: + this.begin("string"); + break; + case 33: + this.popState(); + break; + case 34: + return 33; + case 35: + return 30; + case 36: + return 45; + case 37: + return 7; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i], + conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, options: { rules: [29, 30], inclusive: !1 }, string: { rules: [33, 34], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 35, 36, 37, 38], inclusive: !0 } } + }; + return q; + }(); + w.lexer = B; + function P() { + this.yy = {}; + } + return P.prototype = w, w.Parser = P, new P(); +}(); +mt.parser = mt; +const Dt = mt; +let at = O().gitGraph.mainBranchName, zt = O().gitGraph.mainBranchOrder, R = {}, S = null, Z = {}; +Z[at] = { name: at, order: zt }; +let L = {}; +L[at] = S; +let v = at, xt = "LR", U = 0; +function ft() { + return Ht({ length: 7 }); +} +function jt(r, a) { + const o = /* @__PURE__ */ Object.create(null); + return r.reduce((u, n) => { + const c = a(n); + return o[c] || (o[c] = !0, u.push(n)), u; + }, []); +} +const qt = function(r) { + xt = r; +}; +let yt = {}; +const Yt = function(r) { + G.debug("options str", r), r = r && r.trim(), r = r || "{}"; + try { + yt = JSON.parse(r); + } catch (a) { + G.error("error while parsing gitGraph options", a.message); + } +}, Kt = function() { + return yt; +}, Ft = function(r, a, o, u) { + G.debug("Entering commit:", r, a, o, u), a = D.sanitizeText(a, O()), r = D.sanitizeText(r, O()), u = D.sanitizeText(u, O()); + const n = { + id: a || U + "-" + ft(), + message: r, + seq: U++, + type: o || $.NORMAL, + tag: u || "", + parents: S == null ? [] : [S.id], + branch: v + }; + S = n, R[n.id] = n, L[v] = n.id, G.debug("in pushCommit " + n.id); +}, Ut = function(r, a) { + if (r = D.sanitizeText(r, O()), L[r] === void 0) + L[r] = S != null ? S.id : null, Z[r] = { name: r, order: a ? parseInt(a, 10) : null }, _t(r), G.debug("in createBranch"); + else { + let o = new Error( + 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + r + '")' + ); + throw o.hash = { + text: "branch " + r, + token: "branch " + r, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + r + '"'] + }, o; + } +}, Jt = function(r, a, o, u) { + r = D.sanitizeText(r, O()), a = D.sanitizeText(a, O()); + const n = R[L[v]], c = R[L[r]]; + if (v === r) { + let l = new Error('Incorrect usage of "merge". Cannot merge a branch to itself'); + throw l.hash = { + text: "merge " + r, + token: "merge " + r, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }, l; + } else if (n === void 0 || !n) { + let l = new Error( + 'Incorrect usage of "merge". Current branch (' + v + ")has no commits" + ); + throw l.hash = { + text: "merge " + r, + token: "merge " + r, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["commit"] + }, l; + } else if (L[r] === void 0) { + let l = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist" + ); + throw l.hash = { + text: "merge " + r, + token: "merge " + r, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch " + r] + }, l; + } else if (c === void 0 || !c) { + let l = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits" + ); + throw l.hash = { + text: "merge " + r, + token: "merge " + r, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"commit"'] + }, l; + } else if (n === c) { + let l = new Error('Incorrect usage of "merge". Both branches have same head'); + throw l.hash = { + text: "merge " + r, + token: "merge " + r, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }, l; + } else if (a && R[a] !== void 0) { + let l = new Error( + 'Incorrect usage of "merge". Commit with id:' + a + " already exists, use different custom Id" + ); + throw l.hash = { + text: "merge " + r + a + o + u, + token: "merge " + r + a + o + u, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: [ + "merge " + r + " " + a + "_UNIQUE " + o + " " + u + ] + }, l; + } + const m = { + id: a || U + "-" + ft(), + message: "merged branch " + r + " into " + v, + seq: U++, + parents: [S == null ? null : S.id, L[r]], + branch: v, + type: $.MERGE, + customType: o, + customId: !!a, + tag: u || "" + }; + S = m, R[m.id] = m, L[v] = m.id, G.debug(L), G.debug("in mergeBranch"); +}, Wt = function(r, a, o) { + if (G.debug("Entering cherryPick:", r, a, o), r = D.sanitizeText(r, O()), a = D.sanitizeText(a, O()), o = D.sanitizeText(o, O()), !r || R[r] === void 0) { + let c = new Error( + 'Incorrect usage of "cherryPick". Source commit id should exist and provided' + ); + throw c.hash = { + text: "cherryPick " + r + " " + a, + token: "cherryPick " + r + " " + a, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }, c; + } + let u = R[r], n = u.branch; + if (u.type === $.MERGE) { + let c = new Error( + 'Incorrect usage of "cherryPick". Source commit should not be a merge commit' + ); + throw c.hash = { + text: "cherryPick " + r + " " + a, + token: "cherryPick " + r + " " + a, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }, c; + } + if (!a || R[a] === void 0) { + if (n === v) { + let l = new Error( + 'Incorrect usage of "cherryPick". Source commit is already on current branch' + ); + throw l.hash = { + text: "cherryPick " + r + " " + a, + token: "cherryPick " + r + " " + a, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }, l; + } + const c = R[L[v]]; + if (c === void 0 || !c) { + let l = new Error( + 'Incorrect usage of "cherry-pick". Current branch (' + v + ")has no commits" + ); + throw l.hash = { + text: "cherryPick " + r + " " + a, + token: "cherryPick " + r + " " + a, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }, l; + } + const m = { + id: U + "-" + ft(), + message: "cherry-picked " + u + " into " + v, + seq: U++, + parents: [S == null ? null : S.id, u.id], + branch: v, + type: $.CHERRY_PICK, + tag: o ?? "cherry-pick:" + u.id + }; + S = m, R[m.id] = m, L[v] = m.id, G.debug(L), G.debug("in cherryPick"); + } +}, _t = function(r) { + if (r = D.sanitizeText(r, O()), L[r] === void 0) { + let a = new Error( + 'Trying to checkout branch which is not yet created. (Help try using "branch ' + r + '")' + ); + throw a.hash = { + text: "checkout " + r, + token: "checkout " + r, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"branch ' + r + '"'] + }, a; + } else { + v = r; + const a = L[v]; + S = R[a]; + } +}; +function dt(r, a, o) { + const u = r.indexOf(a); + u === -1 ? r.push(o) : r.splice(u, 1, o); +} +function Et(r) { + const a = r.reduce((n, c) => n.seq > c.seq ? n : c, r[0]); + let o = ""; + r.forEach(function(n) { + n === a ? o += " *" : o += " |"; + }); + const u = [o, a.id, a.seq]; + for (let n in L) + L[n] === a.id && u.push(n); + if (G.debug(u.join(" ")), a.parents && a.parents.length == 2) { + const n = R[a.parents[0]]; + dt(r, a, n), r.push(R[a.parents[1]]); + } else { + if (a.parents.length == 0) + return; + { + const n = R[a.parents]; + dt(r, a, n); + } + } + r = jt(r, (n) => n.id), Et(r); +} +const Xt = function() { + G.debug(R); + const r = wt()[0]; + Et([r]); +}, Qt = function() { + R = {}, S = null; + let r = O().gitGraph.mainBranchName, a = O().gitGraph.mainBranchOrder; + L = {}, L[r] = null, Z = {}, Z[r] = { name: r, order: a }, v = r, U = 0, Pt(); +}, Zt = function() { + return Object.values(Z).map((a, o) => a.order !== null ? a : { + ...a, + order: parseFloat(`0.${o}`, 10) + }).sort((a, o) => a.order - o.order).map(({ name: a }) => ({ name: a })); +}, $t = function() { + return L; +}, te = function() { + return R; +}, wt = function() { + const r = Object.keys(R).map(function(a) { + return R[a]; + }); + return r.forEach(function(a) { + G.debug(a.id); + }), r.sort((a, o) => a.seq - o.seq), r; +}, ee = function() { + return v; +}, re = function() { + return xt; +}, ie = function() { + return S; +}, $ = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}, se = { + getConfig: () => O().gitGraph, + setDirection: qt, + setOptions: Yt, + getOptions: Kt, + commit: Ft, + branch: Ut, + merge: Jt, + cherryPick: Wt, + checkout: _t, + //reset, + prettyPrint: Xt, + clear: Qt, + getBranchesAsObjArray: Zt, + getBranches: $t, + getCommits: te, + getCommitsArray: wt, + getCurrentBranch: ee, + getDirection: re, + getHead: ie, + setAccTitle: vt, + getAccTitle: At, + getAccDescription: Ot, + setAccDescription: St, + setDiagramTitle: It, + getDiagramTitle: Gt, + commitType: $ +}; +let X = {}; +const H = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}, F = 8; +let C = {}, tt = {}, nt = [], et = 0, A = "LR"; +const ae = () => { + C = {}, tt = {}, X = {}, et = 0, nt = [], A = "LR"; +}, Tt = (r) => { + const a = document.createElementNS("http://www.w3.org/2000/svg", "text"); + let o = []; + typeof r == "string" ? o = r.split(/\\n|\n|/gi) : Array.isArray(r) ? o = r : o = []; + for (const u of o) { + const n = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + n.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), n.setAttribute("dy", "1em"), n.setAttribute("x", "0"), n.setAttribute("class", "row"), n.textContent = u.trim(), a.appendChild(n); + } + return a; +}, kt = (r, a, o) => { + const u = ut().gitGraph, n = r.append("g").attr("class", "commit-bullets"), c = r.append("g").attr("class", "commit-labels"); + let m = 0; + A === "TB" && (m = 30), Object.keys(a).sort((_, i) => a[_].seq - a[i].seq).forEach((_) => { + const i = a[_], g = A === "TB" ? m + 10 : C[i.branch].pos, f = A === "TB" ? C[i.branch].pos : m + 10; + if (o) { + let x, p = i.customType !== void 0 && i.customType !== "" ? i.customType : i.type; + switch (p) { + case H.NORMAL: + x = "commit-normal"; + break; + case H.REVERSE: + x = "commit-reverse"; + break; + case H.HIGHLIGHT: + x = "commit-highlight"; + break; + case H.MERGE: + x = "commit-merge"; + break; + case H.CHERRY_PICK: + x = "commit-cherry-pick"; + break; + default: + x = "commit-normal"; + } + if (p === H.HIGHLIGHT) { + const d = n.append("rect"); + d.attr("x", f - 10), d.attr("y", g - 10), d.attr("height", 20), d.attr("width", 20), d.attr( + "class", + `commit ${i.id} commit-highlight${C[i.branch].index % F} ${x}-outer` + ), n.append("rect").attr("x", f - 6).attr("y", g - 6).attr("height", 12).attr("width", 12).attr( + "class", + `commit ${i.id} commit${C[i.branch].index % F} ${x}-inner` + ); + } else if (p === H.CHERRY_PICK) + n.append("circle").attr("cx", f).attr("cy", g).attr("r", 10).attr("class", `commit ${i.id} ${x}`), n.append("circle").attr("cx", f - 3).attr("cy", g + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${i.id} ${x}`), n.append("circle").attr("cx", f + 3).attr("cy", g + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${i.id} ${x}`), n.append("line").attr("x1", f + 3).attr("y1", g + 1).attr("x2", f).attr("y2", g - 5).attr("stroke", "#fff").attr("class", `commit ${i.id} ${x}`), n.append("line").attr("x1", f - 3).attr("y1", g + 1).attr("x2", f).attr("y2", g - 5).attr("stroke", "#fff").attr("class", `commit ${i.id} ${x}`); + else { + const d = n.append("circle"); + if (d.attr("cx", f), d.attr("cy", g), d.attr("r", i.type === H.MERGE ? 9 : 10), d.attr( + "class", + `commit ${i.id} commit${C[i.branch].index % F}` + ), p === H.MERGE) { + const y = n.append("circle"); + y.attr("cx", f), y.attr("cy", g), y.attr("r", 6), y.attr( + "class", + `commit ${x} ${i.id} commit${C[i.branch].index % F}` + ); + } + p === H.REVERSE && n.append("path").attr("d", `M ${f - 5},${g - 5}L${f + 5},${g + 5}M${f - 5},${g + 5}L${f + 5},${g - 5}`).attr( + "class", + `commit ${x} ${i.id} commit${C[i.branch].index % F}` + ); + } + } + if (A === "TB" ? tt[i.id] = { x: f, y: m + 10 } : tt[i.id] = { x: m + 10, y: g }, o) { + if (i.type !== H.CHERRY_PICK && (i.customId && i.type === H.MERGE || i.type !== H.MERGE) && u.showCommitLabel) { + const d = c.append("g"), y = d.insert("rect").attr("class", "commit-label-bkg"), N = d.append("text").attr("x", m).attr("y", g + 25).attr("class", "commit-label").text(i.id); + let w = N.node().getBBox(); + if (y.attr("x", m + 10 - w.width / 2 - 2).attr("y", g + 13.5).attr("width", w.width + 2 * 2).attr("height", w.height + 2 * 2), A === "TB" && (y.attr("x", f - (w.width + 4 * 4 + 5)).attr("y", g - 12), N.attr("x", f - (w.width + 4 * 4)).attr("y", g + w.height - 12)), A !== "TB" && N.attr("x", m + 10 - w.width / 2), u.rotateCommitLabel) + if (A === "TB") + N.attr("transform", "rotate(-45, " + f + ", " + g + ")"), y.attr("transform", "rotate(-45, " + f + ", " + g + ")"); + else { + let B = -7.5 - (w.width + 10) / 25 * 9.5, P = 10 + w.width / 25 * 8.5; + d.attr( + "transform", + "translate(" + B + ", " + P + ") rotate(-45, " + m + ", " + g + ")" + ); + } + } + if (i.tag) { + const d = c.insert("polygon"), y = c.append("circle"), N = c.append("text").attr("y", g - 16).attr("class", "tag-label").text(i.tag); + let w = N.node().getBBox(); + N.attr("x", m + 10 - w.width / 2); + const B = w.height / 2, P = g - 19.2; + d.attr("class", "tag-label-bkg").attr( + "points", + ` + ${m - w.width / 2 - 4 / 2},${P + 2} + ${m - w.width / 2 - 4 / 2},${P - 2} + ${m + 10 - w.width / 2 - 4},${P - B - 2} + ${m + 10 + w.width / 2 + 4},${P - B - 2} + ${m + 10 + w.width / 2 + 4},${P + B + 2} + ${m + 10 - w.width / 2 - 4},${P + B + 2}` + ), y.attr("cx", m - w.width / 2 + 4 / 2).attr("cy", P).attr("r", 1.5).attr("class", "tag-hole"), A === "TB" && (d.attr("class", "tag-label-bkg").attr( + "points", + ` + ${f},${m + 2} + ${f},${m - 2} + ${f + 10},${m - B - 2} + ${f + 10 + w.width + 4},${m - B - 2} + ${f + 10 + w.width + 4},${m + B + 2} + ${f + 10},${m + B + 2}` + ).attr("transform", "translate(12,12) rotate(45, " + f + "," + m + ")"), y.attr("cx", f + 4 / 2).attr("cy", m).attr("transform", "translate(12,12) rotate(45, " + f + "," + m + ")"), N.attr("x", f + 5).attr("y", m + 3).attr("transform", "translate(14,14) rotate(45, " + f + "," + m + ")")); + } + } + m += 50, m > et && (et = m); + }); +}, ne = (r, a, o) => Object.keys(o).filter((c) => o[c].branch === a.branch && o[c].seq > r.seq && o[c].seq < a.seq).length > 0, Q = (r, a, o = 0) => { + const u = r + Math.abs(r - a) / 2; + if (o > 5) + return u; + if (nt.every((m) => Math.abs(m - u) >= 10)) + return nt.push(u), u; + const c = Math.abs(r - a); + return Q(r, a - c / 5, o + 1); +}, ce = (r, a, o, u) => { + const n = tt[a.id], c = tt[o.id], m = ne(a, o, u); + let l = "", E = "", _ = 0, i = 0, g = C[o.branch].index, f; + if (m) { + l = "A 10 10, 0, 0, 0,", E = "A 10 10, 0, 0, 1,", _ = 10, i = 10, g = C[o.branch].index; + const x = n.y < c.y ? Q(n.y, c.y) : Q(c.y, n.y), p = n.x < c.x ? Q(n.x, c.x) : Q(c.x, n.x); + A === "TB" ? n.x < c.x ? f = `M ${n.x} ${n.y} L ${p - _} ${n.y} ${E} ${p} ${n.y + i} L ${p} ${c.y - _} ${l} ${p + i} ${c.y} L ${c.x} ${c.y}` : f = `M ${n.x} ${n.y} L ${p + _} ${n.y} ${l} ${p} ${n.y + i} L ${p} ${c.y - _} ${E} ${p - i} ${c.y} L ${c.x} ${c.y}` : n.y < c.y ? f = `M ${n.x} ${n.y} L ${n.x} ${x - _} ${l} ${n.x + i} ${x} L ${c.x - _} ${x} ${E} ${c.x} ${x + i} L ${c.x} ${c.y}` : f = `M ${n.x} ${n.y} L ${n.x} ${x + _} ${E} ${n.x + i} ${x} L ${c.x - _} ${x} ${l} ${c.x} ${x - i} L ${c.x} ${c.y}`; + } else + A === "TB" ? (n.x < c.x && (l = "A 20 20, 0, 0, 0,", E = "A 20 20, 0, 0, 1,", _ = 20, i = 20, g = C[o.branch].index, f = `M ${n.x} ${n.y} L ${c.x - _} ${n.y} ${E} ${c.x} ${n.y + i} L ${c.x} ${c.y}`), n.x > c.x && (l = "A 20 20, 0, 0, 0,", E = "A 20 20, 0, 0, 1,", _ = 20, i = 20, g = C[a.branch].index, f = `M ${n.x} ${n.y} L ${n.x} ${c.y - _} ${E} ${n.x - i} ${c.y} L ${c.x} ${c.y}`), n.x === c.x && (g = C[a.branch].index, f = `M ${n.x} ${n.y} L ${n.x + _} ${n.y} ${l} ${n.x + i} ${c.y + _} L ${c.x} ${c.y}`)) : (n.y < c.y && (l = "A 20 20, 0, 0, 0,", _ = 20, i = 20, g = C[o.branch].index, f = `M ${n.x} ${n.y} L ${n.x} ${c.y - _} ${l} ${n.x + i} ${c.y} L ${c.x} ${c.y}`), n.y > c.y && (l = "A 20 20, 0, 0, 0,", _ = 20, i = 20, g = C[a.branch].index, f = `M ${n.x} ${n.y} L ${c.x - _} ${n.y} ${l} ${c.x} ${n.y - i} L ${c.x} ${c.y}`), n.y === c.y && (g = C[a.branch].index, f = `M ${n.x} ${n.y} L ${n.x} ${c.y - _} ${l} ${n.x + i} ${c.y} L ${c.x} ${c.y}`)); + r.append("path").attr("d", f).attr("class", "arrow arrow" + g % F); +}, oe = (r, a) => { + const o = r.append("g").attr("class", "commit-arrows"); + Object.keys(a).forEach((u) => { + const n = a[u]; + n.parents && n.parents.length > 0 && n.parents.forEach((c) => { + ce(o, a[c], n, a); + }); + }); +}, le = (r, a) => { + const o = ut().gitGraph, u = r.append("g"); + a.forEach((n, c) => { + const m = c % F, l = C[n.name].pos, E = u.append("line"); + E.attr("x1", 0), E.attr("y1", l), E.attr("x2", et), E.attr("y2", l), E.attr("class", "branch branch" + m), A === "TB" && (E.attr("y1", 30), E.attr("x1", l), E.attr("y2", et), E.attr("x2", l)), nt.push(l); + let _ = n.name; + const i = Tt(_), g = u.insert("rect"), x = u.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + m); + x.node().appendChild(i); + let p = i.getBBox(); + g.attr("class", "branchLabelBkg label" + m).attr("rx", 4).attr("ry", 4).attr("x", -p.width - 4 - (o.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -p.height / 2 + 8).attr("width", p.width + 18).attr("height", p.height + 4), x.attr( + "transform", + "translate(" + (-p.width - 14 - (o.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (l - p.height / 2 - 1) + ")" + ), A === "TB" && (g.attr("x", l - p.width / 2 - 10).attr("y", 0), x.attr("transform", "translate(" + (l - p.width / 2 - 5) + ", 0)")), A !== "TB" && g.attr("transform", "translate(-19, " + (l - p.height / 2) + ")"); + }); +}, he = function(r, a, o, u) { + ae(); + const n = ut(), c = n.gitGraph; + G.debug("in gitgraph renderer", r + ` +`, "id:", a, o), X = u.db.getCommits(); + const m = u.db.getBranchesAsObjArray(); + A = u.db.getDirection(); + const l = Nt(`[id="${a}"]`); + let E = 0; + m.forEach((_, i) => { + const g = Tt(_.name), f = l.append("g"), x = f.insert("g").attr("class", "branchLabel"), p = x.insert("g").attr("class", "label branch-label"); + p.node().appendChild(g); + let d = g.getBBox(); + C[_.name] = { pos: E, index: i }, E += 50 + (c.rotateCommitLabel ? 40 : 0) + (A === "TB" ? d.width / 2 : 0), p.remove(), x.remove(), f.remove(); + }), kt(l, X, !1), c.showBranches && le(l, m), oe(l, X), kt(l, X, !0), Bt.insertTitle( + l, + "gitTitleText", + c.titleTopMargin, + u.db.getDiagramTitle() + ), Vt( + void 0, + l, + c.diagramPadding, + c.useMaxWidth ?? n.useMaxWidth + ); +}, me = { + draw: he +}, ue = (r) => ` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0, 1, 2, 3, 4, 5, 6, 7].map( + (a) => ` + .branch-label${a} { fill: ${r["gitBranchLabel" + a]}; } + .commit${a} { stroke: ${r["git" + a]}; fill: ${r["git" + a]}; } + .commit-highlight${a} { stroke: ${r["gitInv" + a]}; fill: ${r["gitInv" + a]}; } + .label${a} { fill: ${r["git" + a]}; } + .arrow${a} { stroke: ${r["git" + a]}; } + ` +).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${r.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};} + .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};} + .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; } + .tag-hole { fill: ${r.textColor}; } + + .commit-merge { + stroke: ${r.primaryColor}; + fill: ${r.primaryColor}; + } + .commit-reverse { + stroke: ${r.primaryColor}; + fill: ${r.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${r.primaryColor}; + fill: ${r.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${r.textColor}; + } +`, fe = ue, be = { + parser: Dt, + db: se, + renderer: me, + styles: fe +}; +export { + be as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-2139c8c6.js b/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-2139c8c6.js new file mode 100644 index 0000000..dd835b9 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-2139c8c6.js @@ -0,0 +1,1738 @@ +import { c as getConfig, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, q as setDiagramTitle, r as getDiagramTitle, l as log, e as common, t as clear$2, x as random, y as getConfig$1, u as utils, z as setupGraphViewbox } from "./mermaid-0d192ec3.js"; +import { select } from "d3"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 6], $V2 = [1, 4], $V3 = [1, 5], $V4 = [2, 5], $V5 = [1, 12], $V6 = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39, 46], $V7 = [7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], $V8 = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], $V9 = [7, 13, 46], $Va = [1, 42], $Vb = [1, 41], $Vc = [7, 13, 29, 32, 34, 37, 46], $Vd = [1, 55], $Ve = [1, 56], $Vf = [1, 57], $Vg = [7, 13, 32, 34, 41, 46]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "GG": 5, "document": 6, "EOF": 7, ":": 8, "DIR": 9, "options": 10, "body": 11, "OPT": 12, "NL": 13, "line": 14, "statement": 15, "commitStatement": 16, "mergeStatement": 17, "cherryPickStatement": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "section": 24, "branchStatement": 25, "CHECKOUT": 26, "ref": 27, "BRANCH": 28, "ORDER": 29, "NUM": 30, "CHERRY_PICK": 31, "COMMIT_ID": 32, "STR": 33, "COMMIT_TAG": 34, "EMPTYSTR": 35, "MERGE": 36, "COMMIT_TYPE": 37, "commitType": 38, "COMMIT": 39, "commit_arg": 40, "COMMIT_MSG": 41, "NORMAL": 42, "REVERSE": 43, "HIGHLIGHT": 44, "ID": 45, ";": 46, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "COMMIT_TAG", 35: "EMPTYSTR", 36: "MERGE", 37: "COMMIT_TYPE", 39: "COMMIT", 41: "COMMIT_MSG", 42: "NORMAL", 43: "REVERSE", 44: "HIGHLIGHT", 45: "ID", 46: ";" }, + productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 5], [18, 5], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [40, 0], [40, 1], [38, 1], [38, 1], [38, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + return $$[$0]; + case 3: + return $$[$0 - 1]; + case 4: + yy.setDirection($$[$0 - 3]); + return $$[$0 - 1]; + case 6: + yy.setOptions($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 7: + $$[$0 - 1] += $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 9: + this.$ = []; + break; + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 11: + this.$ = $$[$0 - 1]; + break; + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 21: + yy.checkout($$[$0]); + break; + case 22: + yy.branch($$[$0]); + break; + case 23: + yy.branch($$[$0 - 2], $$[$0]); + break; + case 24: + yy.cherryPick($$[$0], "", void 0); + break; + case 25: + yy.cherryPick($$[$0 - 2], "", $$[$0]); + break; + case 26: + case 28: + yy.cherryPick($$[$0 - 2], "", ""); + break; + case 27: + yy.cherryPick($$[$0], "", $$[$0 - 2]); + break; + case 29: + yy.merge($$[$0], "", "", ""); + break; + case 30: + yy.merge($$[$0 - 2], $$[$0], "", ""); + break; + case 31: + yy.merge($$[$0 - 2], "", $$[$0], ""); + break; + case 32: + yy.merge($$[$0 - 2], "", "", $$[$0]); + break; + case 33: + yy.merge($$[$0 - 4], $$[$0], "", $$[$0 - 2]); + break; + case 34: + yy.merge($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 35: + yy.merge($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 36: + yy.merge($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 37: + yy.merge($$[$0 - 4], $$[$0 - 2], "", $$[$0]); + break; + case 38: + yy.merge($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 39: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 40: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 41: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 42: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 43: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 44: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 45: + yy.commit($$[$0]); + break; + case 46: + yy.commit("", "", yy.commitType.NORMAL, $$[$0]); + break; + case 47: + yy.commit("", "", $$[$0], ""); + break; + case 48: + yy.commit("", "", $$[$0], $$[$0 - 2]); + break; + case 49: + yy.commit("", "", $$[$0 - 2], $$[$0]); + break; + case 50: + yy.commit("", $$[$0], yy.commitType.NORMAL, ""); + break; + case 51: + yy.commit("", $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 52: + yy.commit("", $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 53: + yy.commit("", $$[$0 - 2], $$[$0], ""); + break; + case 54: + yy.commit("", $$[$0], $$[$0 - 2], ""); + break; + case 55: + yy.commit("", $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 56: + yy.commit("", $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 57: + yy.commit("", $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 58: + yy.commit("", $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 59: + yy.commit("", $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 60: + yy.commit("", $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 61: + yy.commit($$[$0], "", yy.commitType.NORMAL, ""); + break; + case 62: + yy.commit($$[$0], "", yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 63: + yy.commit($$[$0 - 2], "", yy.commitType.NORMAL, $$[$0]); + break; + case 64: + yy.commit($$[$0 - 2], "", $$[$0], ""); + break; + case 65: + yy.commit($$[$0], "", $$[$0 - 2], ""); + break; + case 66: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, ""); + break; + case 67: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, ""); + break; + case 68: + yy.commit($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 69: + yy.commit($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 70: + yy.commit($$[$0 - 2], "", $$[$0 - 4], $$[$0]); + break; + case 71: + yy.commit($$[$0], "", $$[$0 - 4], $$[$0 - 2]); + break; + case 72: + yy.commit($$[$0], "", $$[$0 - 2], $$[$0 - 4]); + break; + case 73: + yy.commit($$[$0 - 2], "", $$[$0], $$[$0 - 4]); + break; + case 74: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 75: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 76: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], ""); + break; + case 77: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], ""); + break; + case 78: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], ""); + break; + case 79: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], ""); + break; + case 80: + yy.commit($$[$0 - 4], $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 81: + yy.commit($$[$0 - 4], $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 82: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 83: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 84: + yy.commit($$[$0], $$[$0 - 4], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 85: + yy.commit($$[$0 - 2], $$[$0 - 4], yy.commitType.NORMAL, $$[$0]); + break; + case 86: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 87: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 88: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 89: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 90: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 91: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 92: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0 - 2], $$[$0]); + break; + case 93: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0], $$[$0 - 2]); + break; + case 94: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0 - 4], $$[$0]); + break; + case 95: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 4], $$[$0 - 2]); + break; + case 96: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0], $$[$0 - 4]); + break; + case 97: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 2], $$[$0 - 4]); + break; + case 98: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], $$[$0 - 6]); + break; + case 99: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], $$[$0 - 6]); + break; + case 100: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], $$[$0 - 6]); + break; + case 101: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], $$[$0 - 6]); + break; + case 102: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], $$[$0 - 6]); + break; + case 103: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 6]); + break; + case 104: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0 - 6], $$[$0]); + break; + case 105: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 6], $$[$0 - 2]); + break; + case 106: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 6], $$[$0 - 4]); + break; + case 107: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 6], $$[$0 - 4]); + break; + case 108: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0 - 6], $$[$0]); + break; + case 109: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = ""; + break; + case 111: + this.$ = $$[$0]; + break; + case 112: + this.$ = yy.commitType.NORMAL; + break; + case 113: + this.$ = yy.commitType.REVERSE; + break; + case 114: + this.$ = yy.commitType.HIGHLIGHT; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 7: $V1, 13: $V2, 46: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 7: $V1, 13: $V2, 46: $V3 }, { 6: 8, 7: $V4, 8: [1, 9], 9: [1, 10], 10: 11, 13: $V5 }, o($V6, [2, 117]), o($V6, [2, 118]), o($V6, [2, 119]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: $V4, 10: 11, 13: $V5 }, { 8: [1, 15] }, o($V7, [2, 9], { 11: 16, 12: [1, 17] }), o($V8, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: $V4, 10: 11, 13: $V5 }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 36: [1, 33], 39: [1, 32] }, o($V8, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, o($V7, [2, 10]), { 4: 37, 7: $V1, 13: $V2, 46: $V3 }, o($V7, [2, 12]), o($V9, [2, 13]), o($V9, [2, 14]), o($V9, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), { 27: 40, 33: $Va, 45: $Vb }, o($V9, [2, 110], { 40: 43, 32: [1, 46], 33: [1, 48], 34: [1, 44], 37: [1, 45], 41: [1, 47] }), { 27: 49, 33: $Va, 45: $Vb }, { 32: [1, 50], 34: [1, 51] }, { 27: 52, 33: $Va, 45: $Vb }, { 1: [2, 4] }, o($V7, [2, 11]), o($V9, [2, 16]), o($V9, [2, 17]), o($V9, [2, 21]), o($Vc, [2, 115]), o($Vc, [2, 116]), o($V9, [2, 45]), { 33: [1, 53] }, { 38: 54, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 58] }, { 33: [1, 59] }, o($V9, [2, 111]), o($V9, [2, 29], { 32: [1, 60], 34: [1, 62], 37: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 35: [1, 65] }, o($V9, [2, 22], { 29: [1, 66] }), o($V9, [2, 46], { 32: [1, 68], 37: [1, 67], 41: [1, 69] }), o($V9, [2, 47], { 32: [1, 71], 34: [1, 70], 41: [1, 72] }), o($Vg, [2, 112]), o($Vg, [2, 113]), o($Vg, [2, 114]), o($V9, [2, 50], { 34: [1, 73], 37: [1, 74], 41: [1, 75] }), o($V9, [2, 61], { 32: [1, 78], 34: [1, 76], 37: [1, 77] }), { 33: [1, 79] }, { 38: 80, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 81] }, o($V9, [2, 24], { 34: [1, 82] }), { 32: [1, 83] }, { 32: [1, 84] }, { 30: [1, 85] }, { 38: 86, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 87] }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 38: 93, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 94] }, { 33: [1, 95] }, { 38: 96, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 97] }, o($V9, [2, 30], { 34: [1, 99], 37: [1, 98] }), o($V9, [2, 31], { 32: [1, 101], 34: [1, 100] }), o($V9, [2, 32], { 32: [1, 102], 37: [1, 103] }), { 33: [1, 104], 35: [1, 105] }, { 33: [1, 106] }, { 33: [1, 107] }, o($V9, [2, 23]), o($V9, [2, 48], { 32: [1, 108], 41: [1, 109] }), o($V9, [2, 52], { 37: [1, 110], 41: [1, 111] }), o($V9, [2, 62], { 32: [1, 113], 37: [1, 112] }), o($V9, [2, 49], { 32: [1, 114], 41: [1, 115] }), o($V9, [2, 54], { 34: [1, 116], 41: [1, 117] }), o($V9, [2, 65], { 32: [1, 119], 34: [1, 118] }), o($V9, [2, 51], { 37: [1, 120], 41: [1, 121] }), o($V9, [2, 53], { 34: [1, 122], 41: [1, 123] }), o($V9, [2, 66], { 34: [1, 125], 37: [1, 124] }), o($V9, [2, 63], { 32: [1, 127], 37: [1, 126] }), o($V9, [2, 64], { 32: [1, 129], 34: [1, 128] }), o($V9, [2, 67], { 34: [1, 131], 37: [1, 130] }), { 38: 132, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 133] }, { 33: [1, 134] }, { 33: [1, 135] }, { 33: [1, 136] }, { 38: 137, 42: $Vd, 43: $Ve, 44: $Vf }, o($V9, [2, 25]), o($V9, [2, 26]), o($V9, [2, 27]), o($V9, [2, 28]), { 33: [1, 138] }, { 33: [1, 139] }, { 38: 140, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 141] }, { 38: 142, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 143] }, { 33: [1, 144] }, { 33: [1, 145] }, { 33: [1, 146] }, { 33: [1, 147] }, { 33: [1, 148] }, { 33: [1, 149] }, { 38: 150, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 38: 154, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 155] }, { 38: 156, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 157] }, { 33: [1, 158] }, { 33: [1, 159] }, { 38: 160, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 161] }, o($V9, [2, 36], { 34: [1, 162] }), o($V9, [2, 37], { 37: [1, 163] }), o($V9, [2, 35], { 32: [1, 164] }), o($V9, [2, 38], { 34: [1, 165] }), o($V9, [2, 33], { 37: [1, 166] }), o($V9, [2, 34], { 32: [1, 167] }), o($V9, [2, 59], { 41: [1, 168] }), o($V9, [2, 72], { 32: [1, 169] }), o($V9, [2, 60], { 41: [1, 170] }), o($V9, [2, 83], { 37: [1, 171] }), o($V9, [2, 73], { 32: [1, 172] }), o($V9, [2, 82], { 37: [1, 173] }), o($V9, [2, 58], { 41: [1, 174] }), o($V9, [2, 71], { 32: [1, 175] }), o($V9, [2, 57], { 41: [1, 176] }), o($V9, [2, 77], { 34: [1, 177] }), o($V9, [2, 70], { 32: [1, 178] }), o($V9, [2, 76], { 34: [1, 179] }), o($V9, [2, 56], { 41: [1, 180] }), o($V9, [2, 84], { 37: [1, 181] }), o($V9, [2, 55], { 41: [1, 182] }), o($V9, [2, 78], { 34: [1, 183] }), o($V9, [2, 79], { 34: [1, 184] }), o($V9, [2, 85], { 37: [1, 185] }), o($V9, [2, 69], { 32: [1, 186] }), o($V9, [2, 80], { 37: [1, 187] }), o($V9, [2, 68], { 32: [1, 188] }), o($V9, [2, 74], { 34: [1, 189] }), o($V9, [2, 75], { 34: [1, 190] }), o($V9, [2, 81], { 37: [1, 191] }), { 33: [1, 192] }, { 38: 193, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 194] }, { 33: [1, 195] }, { 38: 196, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 197] }, { 33: [1, 198] }, { 33: [1, 199] }, { 33: [1, 200] }, { 38: 201, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 202] }, { 38: 203, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 204] }, { 33: [1, 205] }, { 33: [1, 206] }, { 33: [1, 207] }, { 33: [1, 208] }, { 33: [1, 209] }, { 33: [1, 210] }, { 38: 211, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 212] }, { 33: [1, 213] }, { 33: [1, 214] }, { 38: 215, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 216] }, { 38: 217, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 38: 221, 42: $Vd, 43: $Ve, 44: $Vf }, o($V9, [2, 39]), o($V9, [2, 41]), o($V9, [2, 40]), o($V9, [2, 42]), o($V9, [2, 44]), o($V9, [2, 43]), o($V9, [2, 100]), o($V9, [2, 101]), o($V9, [2, 98]), o($V9, [2, 99]), o($V9, [2, 103]), o($V9, [2, 102]), o($V9, [2, 107]), o($V9, [2, 106]), o($V9, [2, 105]), o($V9, [2, 104]), o($V9, [2, 109]), o($V9, [2, 108]), o($V9, [2, 97]), o($V9, [2, 96]), o($V9, [2, 95]), o($V9, [2, 94]), o($V9, [2, 92]), o($V9, [2, 93]), o($V9, [2, 91]), o($V9, [2, 90]), o($V9, [2, 89]), o($V9, [2, 88]), o($V9, [2, 86]), o($V9, [2, 87])], + defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 19; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 21; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 13; + case 8: + break; + case 9: + break; + case 10: + return 5; + case 11: + return 39; + case 12: + return 32; + case 13: + return 37; + case 14: + return 41; + case 15: + return 42; + case 16: + return 43; + case 17: + return 44; + case 18: + return 34; + case 19: + return 28; + case 20: + return 29; + case 21: + return 36; + case 22: + return 31; + case 23: + return 26; + case 24: + return 9; + case 25: + return 9; + case 26: + return 8; + case 27: + return "CARET"; + case 28: + this.begin("options"); + break; + case 29: + this.popState(); + break; + case 30: + return 12; + case 31: + return 35; + case 32: + this.begin("string"); + break; + case 33: + this.popState(); + break; + case 34: + return 33; + case 35: + return 30; + case 36: + return 45; + case 37: + return 7; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i], + conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "options": { "rules": [29, 30], "inclusive": false }, "string": { "rules": [33, 34], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 35, 36, 37, 38], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const gitGraphParser = parser; +let mainBranchName = getConfig().gitGraph.mainBranchName; +let mainBranchOrder = getConfig().gitGraph.mainBranchOrder; +let commits = {}; +let head = null; +let branchesConfig = {}; +branchesConfig[mainBranchName] = { name: mainBranchName, order: mainBranchOrder }; +let branches = {}; +branches[mainBranchName] = head; +let curBranch = mainBranchName; +let direction = "LR"; +let seq = 0; +function getId() { + return random({ length: 7 }); +} +function uniqBy(list, fn) { + const recordMap = /* @__PURE__ */ Object.create(null); + return list.reduce((out, item) => { + const key = fn(item); + if (!recordMap[key]) { + recordMap[key] = true; + out.push(item); + } + return out; + }, []); +} +const setDirection = function(dir2) { + direction = dir2; +}; +let options = {}; +const setOptions = function(rawOptString) { + log.debug("options str", rawOptString); + rawOptString = rawOptString && rawOptString.trim(); + rawOptString = rawOptString || "{}"; + try { + options = JSON.parse(rawOptString); + } catch (e) { + log.error("error while parsing gitGraph options", e.message); + } +}; +const getOptions = function() { + return options; +}; +const commit = function(msg, id, type, tag) { + log.debug("Entering commit:", msg, id, type, tag); + id = common.sanitizeText(id, getConfig()); + msg = common.sanitizeText(msg, getConfig()); + tag = common.sanitizeText(tag, getConfig()); + const commit2 = { + id: id ? id : seq + "-" + getId(), + message: msg, + seq: seq++, + type: type ? type : commitType$1.NORMAL, + tag: tag ? tag : "", + parents: head == null ? [] : [head.id], + branch: curBranch + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log.debug("in pushCommit " + commit2.id); +}; +const branch = function(name, order) { + name = common.sanitizeText(name, getConfig()); + if (branches[name] === void 0) { + branches[name] = head != null ? head.id : null; + branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null }; + checkout(name); + log.debug("in createBranch"); + } else { + let error = new Error( + 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + name + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } +}; +const merge = function(otherBranch, custom_id, override_type, custom_tag) { + otherBranch = common.sanitizeText(otherBranch, getConfig()); + custom_id = common.sanitizeText(custom_id, getConfig()); + const currentCommit = commits[branches[curBranch]]; + const otherCommit = commits[branches[otherBranch]]; + if (curBranch === otherBranch) { + let error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["commit"] + }; + throw error; + } else if (branches[otherBranch] === void 0) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch " + otherBranch] + }; + throw error; + } else if (otherCommit === void 0 || !otherCommit) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"commit"'] + }; + throw error; + } else if (currentCommit === otherCommit) { + let error = new Error('Incorrect usage of "merge". Both branches have same head'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (custom_id && commits[custom_id] !== void 0) { + let error = new Error( + 'Incorrect usage of "merge". Commit with id:' + custom_id + " already exists, use different custom Id" + ); + error.hash = { + text: "merge " + otherBranch + custom_id + override_type + custom_tag, + token: "merge " + otherBranch + custom_id + override_type + custom_tag, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: [ + "merge " + otherBranch + " " + custom_id + "_UNIQUE " + override_type + " " + custom_tag + ] + }; + throw error; + } + const commit2 = { + id: custom_id ? custom_id : seq + "-" + getId(), + message: "merged branch " + otherBranch + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, branches[otherBranch]], + branch: curBranch, + type: commitType$1.MERGE, + customType: override_type, + customId: custom_id ? true : false, + tag: custom_tag ? custom_tag : "" + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log.debug(branches); + log.debug("in mergeBranch"); +}; +const cherryPick = function(sourceId, targetId, tag) { + log.debug("Entering cherryPick:", sourceId, targetId, tag); + sourceId = common.sanitizeText(sourceId, getConfig()); + targetId = common.sanitizeText(targetId, getConfig()); + tag = common.sanitizeText(tag, getConfig()); + if (!sourceId || commits[sourceId] === void 0) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit id should exist and provided' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + let sourceCommit = commits[sourceId]; + let sourceCommitBranch = sourceCommit.branch; + if (sourceCommit.type === commitType$1.MERGE) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit should not be a merge commit' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + if (!targetId || commits[targetId] === void 0) { + if (sourceCommitBranch === curBranch) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit is already on current branch' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const currentCommit = commits[branches[curBranch]]; + if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "cherry-pick". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const commit2 = { + id: seq + "-" + getId(), + message: "cherry-picked " + sourceCommit + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, sourceCommit.id], + branch: curBranch, + type: commitType$1.CHERRY_PICK, + tag: tag ?? "cherry-pick:" + sourceCommit.id + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log.debug(branches); + log.debug("in cherryPick"); + } +}; +const checkout = function(branch2) { + branch2 = common.sanitizeText(branch2, getConfig()); + if (branches[branch2] === void 0) { + let error = new Error( + 'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch2 + '")' + ); + error.hash = { + text: "checkout " + branch2, + token: "checkout " + branch2, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"branch ' + branch2 + '"'] + }; + throw error; + } else { + curBranch = branch2; + const id = branches[curBranch]; + head = commits[id]; + } +}; +function upsert(arr, key, newVal) { + const index = arr.indexOf(key); + if (index === -1) { + arr.push(newVal); + } else { + arr.splice(index, 1, newVal); + } +} +function prettyPrintCommitHistory(commitArr) { + const commit2 = commitArr.reduce((out, commit3) => { + if (out.seq > commit3.seq) { + return out; + } + return commit3; + }, commitArr[0]); + let line = ""; + commitArr.forEach(function(c) { + if (c === commit2) { + line += " *"; + } else { + line += " |"; + } + }); + const label = [line, commit2.id, commit2.seq]; + for (let branch2 in branches) { + if (branches[branch2] === commit2.id) { + label.push(branch2); + } + } + log.debug(label.join(" ")); + if (commit2.parents && commit2.parents.length == 2) { + const newCommit = commits[commit2.parents[0]]; + upsert(commitArr, commit2, newCommit); + commitArr.push(commits[commit2.parents[1]]); + } else if (commit2.parents.length == 0) { + return; + } else { + const nextCommit = commits[commit2.parents]; + upsert(commitArr, commit2, nextCommit); + } + commitArr = uniqBy(commitArr, (c) => c.id); + prettyPrintCommitHistory(commitArr); +} +const prettyPrint = function() { + log.debug(commits); + const node = getCommitsArray()[0]; + prettyPrintCommitHistory([node]); +}; +const clear$1 = function() { + commits = {}; + head = null; + let mainBranch = getConfig().gitGraph.mainBranchName; + let mainBranchOrder2 = getConfig().gitGraph.mainBranchOrder; + branches = {}; + branches[mainBranch] = null; + branchesConfig = {}; + branchesConfig[mainBranch] = { name: mainBranch, order: mainBranchOrder2 }; + curBranch = mainBranch; + seq = 0; + clear$2(); +}; +const getBranchesAsObjArray = function() { + const branchesArray = Object.values(branchesConfig).map((branchConfig, i) => { + if (branchConfig.order !== null) { + return branchConfig; + } + return { + ...branchConfig, + order: parseFloat(`0.${i}`, 10) + }; + }).sort((a, b) => a.order - b.order).map(({ name }) => ({ name })); + return branchesArray; +}; +const getBranches = function() { + return branches; +}; +const getCommits = function() { + return commits; +}; +const getCommitsArray = function() { + const commitArr = Object.keys(commits).map(function(key) { + return commits[key]; + }); + commitArr.forEach(function(o) { + log.debug(o.id); + }); + commitArr.sort((a, b) => a.seq - b.seq); + return commitArr; +}; +const getCurrentBranch = function() { + return curBranch; +}; +const getDirection = function() { + return direction; +}; +const getHead = function() { + return head; +}; +const commitType$1 = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}; +const gitGraphDb = { + getConfig: () => getConfig().gitGraph, + setDirection, + setOptions, + getOptions, + commit, + branch, + merge, + cherryPick, + checkout, + //reset, + prettyPrint, + clear: clear$1, + getBranchesAsObjArray, + getBranches, + getCommits, + getCommitsArray, + getCurrentBranch, + getDirection, + getHead, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + setDiagramTitle, + getDiagramTitle, + commitType: commitType$1 +}; +let allCommitsDict = {}; +const commitType = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}; +const THEME_COLOR_LIMIT = 8; +let branchPos = {}; +let commitPos = {}; +let lanes = []; +let maxPos = 0; +let dir = "LR"; +const clear = () => { + branchPos = {}; + commitPos = {}; + allCommitsDict = {}; + maxPos = 0; + lanes = []; + dir = "LR"; +}; +const drawText = (txt) => { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + let rows = []; + if (typeof txt === "string") { + rows = txt.split(/\\n|\n|/gi); + } else if (Array.isArray(txt)) { + rows = txt; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + tspan.setAttribute("class", "row"); + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; +}; +const drawCommits = (svg, commits2, modifyGraph) => { + const gitGraphConfig = getConfig$1().gitGraph; + const gBullets = svg.append("g").attr("class", "commit-bullets"); + const gLabels = svg.append("g").attr("class", "commit-labels"); + let pos = 0; + if (dir === "TB") { + pos = 30; + } + const keys = Object.keys(commits2); + const sortedKeys = keys.sort((a, b) => { + return commits2[a].seq - commits2[b].seq; + }); + sortedKeys.forEach((key) => { + const commit2 = commits2[key]; + const y = dir === "TB" ? pos + 10 : branchPos[commit2.branch].pos; + const x = dir === "TB" ? branchPos[commit2.branch].pos : pos + 10; + if (modifyGraph) { + let typeClass; + let commitSymbolType = commit2.customType !== void 0 && commit2.customType !== "" ? commit2.customType : commit2.type; + switch (commitSymbolType) { + case commitType.NORMAL: + typeClass = "commit-normal"; + break; + case commitType.REVERSE: + typeClass = "commit-reverse"; + break; + case commitType.HIGHLIGHT: + typeClass = "commit-highlight"; + break; + case commitType.MERGE: + typeClass = "commit-merge"; + break; + case commitType.CHERRY_PICK: + typeClass = "commit-cherry-pick"; + break; + default: + typeClass = "commit-normal"; + } + if (commitSymbolType === commitType.HIGHLIGHT) { + const circle = gBullets.append("rect"); + circle.attr("x", x - 10); + circle.attr("y", y - 10); + circle.attr("height", 20); + circle.attr("width", 20); + circle.attr( + "class", + `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer` + ); + gBullets.append("rect").attr("x", x - 6).attr("y", y - 6).attr("height", 12).attr("width", 12).attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner` + ); + } else if (commitSymbolType === commitType.CHERRY_PICK) { + gBullets.append("circle").attr("cx", x).attr("cy", y).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x - 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x + 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x + 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x - 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + } else { + const circle = gBullets.append("circle"); + circle.attr("cx", x); + circle.attr("cy", y); + circle.attr("r", commit2.type === commitType.MERGE ? 9 : 10); + circle.attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + if (commitSymbolType === commitType.MERGE) { + const circle2 = gBullets.append("circle"); + circle2.attr("cx", x); + circle2.attr("cy", y); + circle2.attr("r", 6); + circle2.attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + if (commitSymbolType === commitType.REVERSE) { + const cross = gBullets.append("path"); + cross.attr("d", `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`).attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + } + } + if (dir === "TB") { + commitPos[commit2.id] = { x, y: pos + 10 }; + } else { + commitPos[commit2.id] = { x: pos + 10, y }; + } + if (modifyGraph) { + const px = 4; + const py = 2; + if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && gitGraphConfig.showCommitLabel) { + const wrapper = gLabels.append("g"); + const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg"); + const text = wrapper.append("text").attr("x", pos).attr("y", y + 25).attr("class", "commit-label").text(commit2.id); + let bbox = text.node().getBBox(); + labelBkg.attr("x", pos + 10 - bbox.width / 2 - py).attr("y", y + 13.5).attr("width", bbox.width + 2 * py).attr("height", bbox.height + 2 * py); + if (dir === "TB") { + labelBkg.attr("x", x - (bbox.width + 4 * px + 5)).attr("y", y - 12); + text.attr("x", x - (bbox.width + 4 * px)).attr("y", y + bbox.height - 12); + } + if (dir !== "TB") { + text.attr("x", pos + 10 - bbox.width / 2); + } + if (gitGraphConfig.rotateCommitLabel) { + if (dir === "TB") { + text.attr("transform", "rotate(-45, " + x + ", " + y + ")"); + labelBkg.attr("transform", "rotate(-45, " + x + ", " + y + ")"); + } else { + let r_x = -7.5 - (bbox.width + 10) / 25 * 9.5; + let r_y = 10 + bbox.width / 25 * 8.5; + wrapper.attr( + "transform", + "translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + y + ")" + ); + } + } + } + if (commit2.tag) { + const rect = gLabels.insert("polygon"); + const hole = gLabels.append("circle"); + const tag = gLabels.append("text").attr("y", y - 16).attr("class", "tag-label").text(commit2.tag); + let tagBbox = tag.node().getBBox(); + tag.attr("x", pos + 10 - tagBbox.width / 2); + const h2 = tagBbox.height / 2; + const ly = y - 19.2; + rect.attr("class", "tag-label-bkg").attr( + "points", + ` + ${pos - tagBbox.width / 2 - px / 2},${ly + py} + ${pos - tagBbox.width / 2 - px / 2},${ly - py} + ${pos + 10 - tagBbox.width / 2 - px},${ly - h2 - py} + ${pos + 10 + tagBbox.width / 2 + px},${ly - h2 - py} + ${pos + 10 + tagBbox.width / 2 + px},${ly + h2 + py} + ${pos + 10 - tagBbox.width / 2 - px},${ly + h2 + py}` + ); + hole.attr("cx", pos - tagBbox.width / 2 + px / 2).attr("cy", ly).attr("r", 1.5).attr("class", "tag-hole"); + if (dir === "TB") { + rect.attr("class", "tag-label-bkg").attr( + "points", + ` + ${x},${pos + py} + ${x},${pos - py} + ${x + 10},${pos - h2 - py} + ${x + 10 + tagBbox.width + px},${pos - h2 - py} + ${x + 10 + tagBbox.width + px},${pos + h2 + py} + ${x + 10},${pos + h2 + py}` + ).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); + hole.attr("cx", x + px / 2).attr("cy", pos).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); + tag.attr("x", x + 5).attr("y", pos + 3).attr("transform", "translate(14,14) rotate(45, " + x + "," + pos + ")"); + } + } + } + pos += 50; + if (pos > maxPos) { + maxPos = pos; + } + }); +}; +const hasOverlappingCommits = (commit1, commit2, allCommits) => { + const keys = Object.keys(allCommits); + const overlappingComits = keys.filter((key) => { + return allCommits[key].branch === commit2.branch && allCommits[key].seq > commit1.seq && allCommits[key].seq < commit2.seq; + }); + return overlappingComits.length > 0; +}; +const findLane = (y1, y2, depth = 0) => { + const candidate = y1 + Math.abs(y1 - y2) / 2; + if (depth > 5) { + return candidate; + } + let ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10); + if (ok) { + lanes.push(candidate); + return candidate; + } + const diff = Math.abs(y1 - y2); + return findLane(y1, y2 - diff / 5, depth + 1); +}; +const drawArrow = (svg, commit1, commit2, allCommits) => { + const p1 = commitPos[commit1.id]; + const p2 = commitPos[commit2.id]; + const overlappingCommits = hasOverlappingCommits(commit1, commit2, allCommits); + let arc = ""; + let arc2 = ""; + let radius = 0; + let offset = 0; + let colorClassNum = branchPos[commit2.branch].index; + let lineDef; + if (overlappingCommits) { + arc = "A 10 10, 0, 0, 0,"; + arc2 = "A 10 10, 0, 0, 1,"; + radius = 10; + offset = 10; + colorClassNum = branchPos[commit2.branch].index; + const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y); + const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x); + if (dir === "TB") { + if (p1.x < p2.x) { + lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`; + } + } + } else { + if (dir === "TB") { + if (p1.x < p2.x) { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit2.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; + } + if (p1.x > p2.x) { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + if (p1.x === p2.x) { + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x + radius} ${p1.y} ${arc} ${p1.x + offset} ${p2.y + radius} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + arc = "A 20 20, 0, 0, 0,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit2.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + if (p1.y > p2.y) { + arc = "A 20 20, 0, 0, 0,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`; + } + if (p1.y === p2.y) { + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } + } + svg.append("path").attr("d", lineDef).attr("class", "arrow arrow" + colorClassNum % THEME_COLOR_LIMIT); +}; +const drawArrows = (svg, commits2) => { + const gArrows = svg.append("g").attr("class", "commit-arrows"); + Object.keys(commits2).forEach((key) => { + const commit2 = commits2[key]; + if (commit2.parents && commit2.parents.length > 0) { + commit2.parents.forEach((parent) => { + drawArrow(gArrows, commits2[parent], commit2, commits2); + }); + } + }); +}; +const drawBranches = (svg, branches2) => { + const gitGraphConfig = getConfig$1().gitGraph; + const g = svg.append("g"); + branches2.forEach((branch2, index) => { + const adjustIndexForTheme = index % THEME_COLOR_LIMIT; + const pos = branchPos[branch2.name].pos; + const line = g.append("line"); + line.attr("x1", 0); + line.attr("y1", pos); + line.attr("x2", maxPos); + line.attr("y2", pos); + line.attr("class", "branch branch" + adjustIndexForTheme); + if (dir === "TB") { + line.attr("y1", 30); + line.attr("x1", pos); + line.attr("y2", maxPos); + line.attr("x2", pos); + } + lanes.push(pos); + let name = branch2.name; + const labelElement = drawText(name); + const bkg = g.insert("rect"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr("rx", 4).attr("ry", 4).attr("x", -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)).attr("y", -bbox.height / 2 + 8).attr("width", bbox.width + 18).attr("height", bbox.height + 4); + label.attr( + "transform", + "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")" + ); + if (dir === "TB") { + bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0); + label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)"); + } + if (dir !== "TB") { + bkg.attr("transform", "translate(-19, " + (pos - bbox.height / 2) + ")"); + } + }); +}; +const draw = function(txt, id, ver, diagObj) { + clear(); + const conf = getConfig$1(); + const gitGraphConfig = conf.gitGraph; + log.debug("in gitgraph renderer", txt + "\n", "id:", id, ver); + allCommitsDict = diagObj.db.getCommits(); + const branches2 = diagObj.db.getBranchesAsObjArray(); + dir = diagObj.db.getDirection(); + const diagram2 = select(`[id="${id}"]`); + let pos = 0; + branches2.forEach((branch2, index) => { + const labelElement = drawText(branch2.name); + const g = diagram2.append("g"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + branchPos[branch2.name] = { pos, index }; + pos += 50 + (gitGraphConfig.rotateCommitLabel ? 40 : 0) + (dir === "TB" ? bbox.width / 2 : 0); + label.remove(); + branchLabel.remove(); + g.remove(); + }); + drawCommits(diagram2, allCommitsDict, false); + if (gitGraphConfig.showBranches) { + drawBranches(diagram2, branches2); + } + drawArrows(diagram2, allCommitsDict); + drawCommits(diagram2, allCommitsDict, true); + utils.insertTitle( + diagram2, + "gitTitleText", + gitGraphConfig.titleTopMargin, + diagObj.db.getDiagramTitle() + ); + setupGraphViewbox( + void 0, + diagram2, + gitGraphConfig.diagramPadding, + gitGraphConfig.useMaxWidth ?? conf.useMaxWidth + ); +}; +const gitGraphRenderer = { + draw +}; +const getStyles = (options2) => ` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0, 1, 2, 3, 4, 5, 6, 7].map( + (i) => ` + .branch-label${i} { fill: ${options2["gitBranchLabel" + i]}; } + .commit${i} { stroke: ${options2["git" + i]}; fill: ${options2["git" + i]}; } + .commit-highlight${i} { stroke: ${options2["gitInv" + i]}; fill: ${options2["gitInv" + i]}; } + .label${i} { fill: ${options2["git" + i]}; } + .arrow${i} { stroke: ${options2["git" + i]}; } + ` +).join("\n")} + + .branch { + stroke-width: 1; + stroke: ${options2.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelColor};} + .commit-label-bkg { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${options2.tagLabelFontSize}; fill: ${options2.tagLabelColor};} + .tag-label-bkg { fill: ${options2.tagLabelBackground}; stroke: ${options2.tagLabelBorder}; } + .tag-hole { fill: ${options2.textColor}; } + + .commit-merge { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + .commit-reverse { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; + } +`; +const gitGraphStyles = getStyles; +const diagram = { + parser: gitGraphParser, + db: gitGraphDb, + renderer: gitGraphRenderer, + styles: gitGraphStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-baba4d84.js b/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-baba4d84.js new file mode 100644 index 0000000..b55dbba --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/gitGraphDiagram-baba4d84.js @@ -0,0 +1,1728 @@ +import { c as getConfig, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, B as setDiagramTitle, D as getDiagramTitle, l as log, f as common, E as clear$2, H as random, I as getConfig$1, j as d3select, z as utils, J as setupGraphViewbox } from "./mermaid-491db2d9.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 6], $V2 = [1, 4], $V3 = [1, 5], $V4 = [2, 5], $V5 = [1, 12], $V6 = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39, 46], $V7 = [7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], $V8 = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], $V9 = [7, 13, 46], $Va = [1, 42], $Vb = [1, 41], $Vc = [7, 13, 29, 32, 34, 37, 46], $Vd = [1, 55], $Ve = [1, 56], $Vf = [1, 57], $Vg = [7, 13, 32, 34, 41, 46]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "GG": 5, "document": 6, "EOF": 7, ":": 8, "DIR": 9, "options": 10, "body": 11, "OPT": 12, "NL": 13, "line": 14, "statement": 15, "commitStatement": 16, "mergeStatement": 17, "cherryPickStatement": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "section": 24, "branchStatement": 25, "CHECKOUT": 26, "ref": 27, "BRANCH": 28, "ORDER": 29, "NUM": 30, "CHERRY_PICK": 31, "COMMIT_ID": 32, "STR": 33, "COMMIT_TAG": 34, "EMPTYSTR": 35, "MERGE": 36, "COMMIT_TYPE": 37, "commitType": 38, "COMMIT": 39, "commit_arg": 40, "COMMIT_MSG": 41, "NORMAL": 42, "REVERSE": 43, "HIGHLIGHT": 44, "ID": 45, ";": 46, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "COMMIT_TAG", 35: "EMPTYSTR", 36: "MERGE", 37: "COMMIT_TYPE", 39: "COMMIT", 41: "COMMIT_MSG", 42: "NORMAL", 43: "REVERSE", 44: "HIGHLIGHT", 45: "ID", 46: ";" }, + productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 5], [18, 5], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [40, 0], [40, 1], [38, 1], [38, 1], [38, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + return $$[$0]; + case 3: + return $$[$0 - 1]; + case 4: + yy.setDirection($$[$0 - 3]); + return $$[$0 - 1]; + case 6: + yy.setOptions($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 7: + $$[$0 - 1] += $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 9: + this.$ = []; + break; + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 11: + this.$ = $$[$0 - 1]; + break; + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 21: + yy.checkout($$[$0]); + break; + case 22: + yy.branch($$[$0]); + break; + case 23: + yy.branch($$[$0 - 2], $$[$0]); + break; + case 24: + yy.cherryPick($$[$0], "", void 0); + break; + case 25: + yy.cherryPick($$[$0 - 2], "", $$[$0]); + break; + case 26: + case 28: + yy.cherryPick($$[$0 - 2], "", ""); + break; + case 27: + yy.cherryPick($$[$0], "", $$[$0 - 2]); + break; + case 29: + yy.merge($$[$0], "", "", ""); + break; + case 30: + yy.merge($$[$0 - 2], $$[$0], "", ""); + break; + case 31: + yy.merge($$[$0 - 2], "", $$[$0], ""); + break; + case 32: + yy.merge($$[$0 - 2], "", "", $$[$0]); + break; + case 33: + yy.merge($$[$0 - 4], $$[$0], "", $$[$0 - 2]); + break; + case 34: + yy.merge($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 35: + yy.merge($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 36: + yy.merge($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 37: + yy.merge($$[$0 - 4], $$[$0 - 2], "", $$[$0]); + break; + case 38: + yy.merge($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 39: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 40: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 41: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 42: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 43: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 44: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 45: + yy.commit($$[$0]); + break; + case 46: + yy.commit("", "", yy.commitType.NORMAL, $$[$0]); + break; + case 47: + yy.commit("", "", $$[$0], ""); + break; + case 48: + yy.commit("", "", $$[$0], $$[$0 - 2]); + break; + case 49: + yy.commit("", "", $$[$0 - 2], $$[$0]); + break; + case 50: + yy.commit("", $$[$0], yy.commitType.NORMAL, ""); + break; + case 51: + yy.commit("", $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 52: + yy.commit("", $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 53: + yy.commit("", $$[$0 - 2], $$[$0], ""); + break; + case 54: + yy.commit("", $$[$0], $$[$0 - 2], ""); + break; + case 55: + yy.commit("", $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 56: + yy.commit("", $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 57: + yy.commit("", $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 58: + yy.commit("", $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 59: + yy.commit("", $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 60: + yy.commit("", $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 61: + yy.commit($$[$0], "", yy.commitType.NORMAL, ""); + break; + case 62: + yy.commit($$[$0], "", yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 63: + yy.commit($$[$0 - 2], "", yy.commitType.NORMAL, $$[$0]); + break; + case 64: + yy.commit($$[$0 - 2], "", $$[$0], ""); + break; + case 65: + yy.commit($$[$0], "", $$[$0 - 2], ""); + break; + case 66: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, ""); + break; + case 67: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, ""); + break; + case 68: + yy.commit($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 69: + yy.commit($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 70: + yy.commit($$[$0 - 2], "", $$[$0 - 4], $$[$0]); + break; + case 71: + yy.commit($$[$0], "", $$[$0 - 4], $$[$0 - 2]); + break; + case 72: + yy.commit($$[$0], "", $$[$0 - 2], $$[$0 - 4]); + break; + case 73: + yy.commit($$[$0 - 2], "", $$[$0], $$[$0 - 4]); + break; + case 74: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 75: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 76: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], ""); + break; + case 77: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], ""); + break; + case 78: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], ""); + break; + case 79: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], ""); + break; + case 80: + yy.commit($$[$0 - 4], $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 81: + yy.commit($$[$0 - 4], $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 82: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 83: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 84: + yy.commit($$[$0], $$[$0 - 4], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 85: + yy.commit($$[$0 - 2], $$[$0 - 4], yy.commitType.NORMAL, $$[$0]); + break; + case 86: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 87: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 88: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 89: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 90: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 91: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 92: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0 - 2], $$[$0]); + break; + case 93: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0], $$[$0 - 2]); + break; + case 94: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0 - 4], $$[$0]); + break; + case 95: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 4], $$[$0 - 2]); + break; + case 96: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0], $$[$0 - 4]); + break; + case 97: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 2], $$[$0 - 4]); + break; + case 98: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], $$[$0 - 6]); + break; + case 99: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], $$[$0 - 6]); + break; + case 100: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], $$[$0 - 6]); + break; + case 101: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], $$[$0 - 6]); + break; + case 102: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], $$[$0 - 6]); + break; + case 103: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 6]); + break; + case 104: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0 - 6], $$[$0]); + break; + case 105: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 6], $$[$0 - 2]); + break; + case 106: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 6], $$[$0 - 4]); + break; + case 107: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 6], $$[$0 - 4]); + break; + case 108: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0 - 6], $$[$0]); + break; + case 109: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = ""; + break; + case 111: + this.$ = $$[$0]; + break; + case 112: + this.$ = yy.commitType.NORMAL; + break; + case 113: + this.$ = yy.commitType.REVERSE; + break; + case 114: + this.$ = yy.commitType.HIGHLIGHT; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 7: $V1, 13: $V2, 46: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 7: $V1, 13: $V2, 46: $V3 }, { 6: 8, 7: $V4, 8: [1, 9], 9: [1, 10], 10: 11, 13: $V5 }, o($V6, [2, 117]), o($V6, [2, 118]), o($V6, [2, 119]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: $V4, 10: 11, 13: $V5 }, { 8: [1, 15] }, o($V7, [2, 9], { 11: 16, 12: [1, 17] }), o($V8, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: $V4, 10: 11, 13: $V5 }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 36: [1, 33], 39: [1, 32] }, o($V8, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, o($V7, [2, 10]), { 4: 37, 7: $V1, 13: $V2, 46: $V3 }, o($V7, [2, 12]), o($V9, [2, 13]), o($V9, [2, 14]), o($V9, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), { 27: 40, 33: $Va, 45: $Vb }, o($V9, [2, 110], { 40: 43, 32: [1, 46], 33: [1, 48], 34: [1, 44], 37: [1, 45], 41: [1, 47] }), { 27: 49, 33: $Va, 45: $Vb }, { 32: [1, 50], 34: [1, 51] }, { 27: 52, 33: $Va, 45: $Vb }, { 1: [2, 4] }, o($V7, [2, 11]), o($V9, [2, 16]), o($V9, [2, 17]), o($V9, [2, 21]), o($Vc, [2, 115]), o($Vc, [2, 116]), o($V9, [2, 45]), { 33: [1, 53] }, { 38: 54, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 58] }, { 33: [1, 59] }, o($V9, [2, 111]), o($V9, [2, 29], { 32: [1, 60], 34: [1, 62], 37: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 35: [1, 65] }, o($V9, [2, 22], { 29: [1, 66] }), o($V9, [2, 46], { 32: [1, 68], 37: [1, 67], 41: [1, 69] }), o($V9, [2, 47], { 32: [1, 71], 34: [1, 70], 41: [1, 72] }), o($Vg, [2, 112]), o($Vg, [2, 113]), o($Vg, [2, 114]), o($V9, [2, 50], { 34: [1, 73], 37: [1, 74], 41: [1, 75] }), o($V9, [2, 61], { 32: [1, 78], 34: [1, 76], 37: [1, 77] }), { 33: [1, 79] }, { 38: 80, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 81] }, o($V9, [2, 24], { 34: [1, 82] }), { 32: [1, 83] }, { 32: [1, 84] }, { 30: [1, 85] }, { 38: 86, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 87] }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 38: 93, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 94] }, { 33: [1, 95] }, { 38: 96, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 97] }, o($V9, [2, 30], { 34: [1, 99], 37: [1, 98] }), o($V9, [2, 31], { 32: [1, 101], 34: [1, 100] }), o($V9, [2, 32], { 32: [1, 102], 37: [1, 103] }), { 33: [1, 104], 35: [1, 105] }, { 33: [1, 106] }, { 33: [1, 107] }, o($V9, [2, 23]), o($V9, [2, 48], { 32: [1, 108], 41: [1, 109] }), o($V9, [2, 52], { 37: [1, 110], 41: [1, 111] }), o($V9, [2, 62], { 32: [1, 113], 37: [1, 112] }), o($V9, [2, 49], { 32: [1, 114], 41: [1, 115] }), o($V9, [2, 54], { 34: [1, 116], 41: [1, 117] }), o($V9, [2, 65], { 32: [1, 119], 34: [1, 118] }), o($V9, [2, 51], { 37: [1, 120], 41: [1, 121] }), o($V9, [2, 53], { 34: [1, 122], 41: [1, 123] }), o($V9, [2, 66], { 34: [1, 125], 37: [1, 124] }), o($V9, [2, 63], { 32: [1, 127], 37: [1, 126] }), o($V9, [2, 64], { 32: [1, 129], 34: [1, 128] }), o($V9, [2, 67], { 34: [1, 131], 37: [1, 130] }), { 38: 132, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 133] }, { 33: [1, 134] }, { 33: [1, 135] }, { 33: [1, 136] }, { 38: 137, 42: $Vd, 43: $Ve, 44: $Vf }, o($V9, [2, 25]), o($V9, [2, 26]), o($V9, [2, 27]), o($V9, [2, 28]), { 33: [1, 138] }, { 33: [1, 139] }, { 38: 140, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 141] }, { 38: 142, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 143] }, { 33: [1, 144] }, { 33: [1, 145] }, { 33: [1, 146] }, { 33: [1, 147] }, { 33: [1, 148] }, { 33: [1, 149] }, { 38: 150, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 38: 154, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 155] }, { 38: 156, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 157] }, { 33: [1, 158] }, { 33: [1, 159] }, { 38: 160, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 161] }, o($V9, [2, 36], { 34: [1, 162] }), o($V9, [2, 37], { 37: [1, 163] }), o($V9, [2, 35], { 32: [1, 164] }), o($V9, [2, 38], { 34: [1, 165] }), o($V9, [2, 33], { 37: [1, 166] }), o($V9, [2, 34], { 32: [1, 167] }), o($V9, [2, 59], { 41: [1, 168] }), o($V9, [2, 72], { 32: [1, 169] }), o($V9, [2, 60], { 41: [1, 170] }), o($V9, [2, 83], { 37: [1, 171] }), o($V9, [2, 73], { 32: [1, 172] }), o($V9, [2, 82], { 37: [1, 173] }), o($V9, [2, 58], { 41: [1, 174] }), o($V9, [2, 71], { 32: [1, 175] }), o($V9, [2, 57], { 41: [1, 176] }), o($V9, [2, 77], { 34: [1, 177] }), o($V9, [2, 70], { 32: [1, 178] }), o($V9, [2, 76], { 34: [1, 179] }), o($V9, [2, 56], { 41: [1, 180] }), o($V9, [2, 84], { 37: [1, 181] }), o($V9, [2, 55], { 41: [1, 182] }), o($V9, [2, 78], { 34: [1, 183] }), o($V9, [2, 79], { 34: [1, 184] }), o($V9, [2, 85], { 37: [1, 185] }), o($V9, [2, 69], { 32: [1, 186] }), o($V9, [2, 80], { 37: [1, 187] }), o($V9, [2, 68], { 32: [1, 188] }), o($V9, [2, 74], { 34: [1, 189] }), o($V9, [2, 75], { 34: [1, 190] }), o($V9, [2, 81], { 37: [1, 191] }), { 33: [1, 192] }, { 38: 193, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 194] }, { 33: [1, 195] }, { 38: 196, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 197] }, { 33: [1, 198] }, { 33: [1, 199] }, { 33: [1, 200] }, { 38: 201, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 202] }, { 38: 203, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 204] }, { 33: [1, 205] }, { 33: [1, 206] }, { 33: [1, 207] }, { 33: [1, 208] }, { 33: [1, 209] }, { 33: [1, 210] }, { 38: 211, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 212] }, { 33: [1, 213] }, { 33: [1, 214] }, { 38: 215, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 216] }, { 38: 217, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 38: 221, 42: $Vd, 43: $Ve, 44: $Vf }, o($V9, [2, 39]), o($V9, [2, 41]), o($V9, [2, 40]), o($V9, [2, 42]), o($V9, [2, 44]), o($V9, [2, 43]), o($V9, [2, 100]), o($V9, [2, 101]), o($V9, [2, 98]), o($V9, [2, 99]), o($V9, [2, 103]), o($V9, [2, 102]), o($V9, [2, 107]), o($V9, [2, 106]), o($V9, [2, 105]), o($V9, [2, 104]), o($V9, [2, 109]), o($V9, [2, 108]), o($V9, [2, 97]), o($V9, [2, 96]), o($V9, [2, 95]), o($V9, [2, 94]), o($V9, [2, 92]), o($V9, [2, 93]), o($V9, [2, 91]), o($V9, [2, 90]), o($V9, [2, 89]), o($V9, [2, 88]), o($V9, [2, 86]), o($V9, [2, 87])], + defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 19; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 21; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 13; + case 8: + break; + case 9: + break; + case 10: + return 5; + case 11: + return 39; + case 12: + return 32; + case 13: + return 37; + case 14: + return 41; + case 15: + return 42; + case 16: + return 43; + case 17: + return 44; + case 18: + return 34; + case 19: + return 28; + case 20: + return 29; + case 21: + return 36; + case 22: + return 31; + case 23: + return 26; + case 24: + return 9; + case 25: + return 9; + case 26: + return 8; + case 27: + return "CARET"; + case 28: + this.begin("options"); + break; + case 29: + this.popState(); + break; + case 30: + return 12; + case 31: + return 35; + case 32: + this.begin("string"); + break; + case 33: + this.popState(); + break; + case 34: + return 33; + case 35: + return 30; + case 36: + return 45; + case 37: + return 7; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i], + conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "options": { "rules": [29, 30], "inclusive": false }, "string": { "rules": [33, 34], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 35, 36, 37, 38], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const gitGraphParser = parser; +let mainBranchName = getConfig().gitGraph.mainBranchName; +let mainBranchOrder = getConfig().gitGraph.mainBranchOrder; +let commits = {}; +let head = null; +let branchesConfig = {}; +branchesConfig[mainBranchName] = { name: mainBranchName, order: mainBranchOrder }; +let branches = {}; +branches[mainBranchName] = head; +let curBranch = mainBranchName; +let direction = "LR"; +let seq = 0; +function getId() { + return random({ length: 7 }); +} +function uniqBy(list, fn) { + const recordMap = /* @__PURE__ */ Object.create(null); + return list.reduce((out, item) => { + const key = fn(item); + if (!recordMap[key]) { + recordMap[key] = true; + out.push(item); + } + return out; + }, []); +} +const setDirection = function(dir2) { + direction = dir2; +}; +let options = {}; +const setOptions = function(rawOptString) { + log.debug("options str", rawOptString); + rawOptString = rawOptString && rawOptString.trim(); + rawOptString = rawOptString || "{}"; + try { + options = JSON.parse(rawOptString); + } catch (e) { + log.error("error while parsing gitGraph options", e.message); + } +}; +const getOptions = function() { + return options; +}; +const commit = function(msg, id, type, tag) { + log.debug("Entering commit:", msg, id, type, tag); + id = common.sanitizeText(id, getConfig()); + msg = common.sanitizeText(msg, getConfig()); + tag = common.sanitizeText(tag, getConfig()); + const commit2 = { + id: id ? id : seq + "-" + getId(), + message: msg, + seq: seq++, + type: type ? type : commitType$1.NORMAL, + tag: tag ? tag : "", + parents: head == null ? [] : [head.id], + branch: curBranch + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log.debug("in pushCommit " + commit2.id); +}; +const branch = function(name, order) { + name = common.sanitizeText(name, getConfig()); + if (branches[name] === void 0) { + branches[name] = head != null ? head.id : null; + branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null }; + checkout(name); + log.debug("in createBranch"); + } else { + let error = new Error( + 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + name + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } +}; +const merge = function(otherBranch, custom_id, override_type, custom_tag) { + otherBranch = common.sanitizeText(otherBranch, getConfig()); + custom_id = common.sanitizeText(custom_id, getConfig()); + const currentCommit = commits[branches[curBranch]]; + const otherCommit = commits[branches[otherBranch]]; + if (curBranch === otherBranch) { + let error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["commit"] + }; + throw error; + } else if (branches[otherBranch] === void 0) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch " + otherBranch] + }; + throw error; + } else if (otherCommit === void 0 || !otherCommit) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"commit"'] + }; + throw error; + } else if (currentCommit === otherCommit) { + let error = new Error('Incorrect usage of "merge". Both branches have same head'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (custom_id && commits[custom_id] !== void 0) { + let error = new Error( + 'Incorrect usage of "merge". Commit with id:' + custom_id + " already exists, use different custom Id" + ); + error.hash = { + text: "merge " + otherBranch + custom_id + override_type + custom_tag, + token: "merge " + otherBranch + custom_id + override_type + custom_tag, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: [ + "merge " + otherBranch + " " + custom_id + "_UNIQUE " + override_type + " " + custom_tag + ] + }; + throw error; + } + const commit2 = { + id: custom_id ? custom_id : seq + "-" + getId(), + message: "merged branch " + otherBranch + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, branches[otherBranch]], + branch: curBranch, + type: commitType$1.MERGE, + customType: override_type, + customId: custom_id ? true : false, + tag: custom_tag ? custom_tag : "" + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log.debug(branches); + log.debug("in mergeBranch"); +}; +const cherryPick = function(sourceId, targetId, tag) { + log.debug("Entering cherryPick:", sourceId, targetId, tag); + sourceId = common.sanitizeText(sourceId, getConfig()); + targetId = common.sanitizeText(targetId, getConfig()); + tag = common.sanitizeText(tag, getConfig()); + if (!sourceId || commits[sourceId] === void 0) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit id should exist and provided' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + let sourceCommit = commits[sourceId]; + let sourceCommitBranch = sourceCommit.branch; + if (sourceCommit.type === commitType$1.MERGE) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit should not be a merge commit' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + if (!targetId || commits[targetId] === void 0) { + if (sourceCommitBranch === curBranch) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit is already on current branch' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const currentCommit = commits[branches[curBranch]]; + if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "cherry-pick". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const commit2 = { + id: seq + "-" + getId(), + message: "cherry-picked " + sourceCommit + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, sourceCommit.id], + branch: curBranch, + type: commitType$1.CHERRY_PICK, + tag: tag ?? "cherry-pick:" + sourceCommit.id + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log.debug(branches); + log.debug("in cherryPick"); + } +}; +const checkout = function(branch2) { + branch2 = common.sanitizeText(branch2, getConfig()); + if (branches[branch2] === void 0) { + let error = new Error( + 'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch2 + '")' + ); + error.hash = { + text: "checkout " + branch2, + token: "checkout " + branch2, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"branch ' + branch2 + '"'] + }; + throw error; + } else { + curBranch = branch2; + const id = branches[curBranch]; + head = commits[id]; + } +}; +function upsert(arr, key, newVal) { + const index = arr.indexOf(key); + if (index === -1) { + arr.push(newVal); + } else { + arr.splice(index, 1, newVal); + } +} +function prettyPrintCommitHistory(commitArr) { + const commit2 = commitArr.reduce((out, commit3) => { + if (out.seq > commit3.seq) { + return out; + } + return commit3; + }, commitArr[0]); + let line = ""; + commitArr.forEach(function(c) { + if (c === commit2) { + line += " *"; + } else { + line += " |"; + } + }); + const label = [line, commit2.id, commit2.seq]; + for (let branch2 in branches) { + if (branches[branch2] === commit2.id) { + label.push(branch2); + } + } + log.debug(label.join(" ")); + if (commit2.parents && commit2.parents.length == 2) { + const newCommit = commits[commit2.parents[0]]; + upsert(commitArr, commit2, newCommit); + commitArr.push(commits[commit2.parents[1]]); + } else if (commit2.parents.length == 0) { + return; + } else { + const nextCommit = commits[commit2.parents]; + upsert(commitArr, commit2, nextCommit); + } + commitArr = uniqBy(commitArr, (c) => c.id); + prettyPrintCommitHistory(commitArr); +} +const prettyPrint = function() { + log.debug(commits); + const node = getCommitsArray()[0]; + prettyPrintCommitHistory([node]); +}; +const clear$1 = function() { + commits = {}; + head = null; + let mainBranch = getConfig().gitGraph.mainBranchName; + let mainBranchOrder2 = getConfig().gitGraph.mainBranchOrder; + branches = {}; + branches[mainBranch] = null; + branchesConfig = {}; + branchesConfig[mainBranch] = { name: mainBranch, order: mainBranchOrder2 }; + curBranch = mainBranch; + seq = 0; + clear$2(); +}; +const getBranchesAsObjArray = function() { + const branchesArray = Object.values(branchesConfig).map((branchConfig, i) => { + if (branchConfig.order !== null) { + return branchConfig; + } + return { + ...branchConfig, + order: parseFloat(`0.${i}`, 10) + }; + }).sort((a, b) => a.order - b.order).map(({ name }) => ({ name })); + return branchesArray; +}; +const getBranches = function() { + return branches; +}; +const getCommits = function() { + return commits; +}; +const getCommitsArray = function() { + const commitArr = Object.keys(commits).map(function(key) { + return commits[key]; + }); + commitArr.forEach(function(o) { + log.debug(o.id); + }); + commitArr.sort((a, b) => a.seq - b.seq); + return commitArr; +}; +const getCurrentBranch = function() { + return curBranch; +}; +const getDirection = function() { + return direction; +}; +const getHead = function() { + return head; +}; +const commitType$1 = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}; +const gitGraphDb = { + getConfig: () => getConfig().gitGraph, + setDirection, + setOptions, + getOptions, + commit, + branch, + merge, + cherryPick, + checkout, + //reset, + prettyPrint, + clear: clear$1, + getBranchesAsObjArray, + getBranches, + getCommits, + getCommitsArray, + getCurrentBranch, + getDirection, + getHead, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + setDiagramTitle, + getDiagramTitle, + commitType: commitType$1 +}; +let allCommitsDict = {}; +const commitType = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}; +const THEME_COLOR_LIMIT = 8; +let branchPos = {}; +let commitPos = {}; +let lanes = []; +let maxPos = 0; +let dir = "LR"; +const clear = () => { + branchPos = {}; + commitPos = {}; + allCommitsDict = {}; + maxPos = 0; + lanes = []; + dir = "LR"; +}; +const drawText = (txt) => { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + let rows = []; + if (typeof txt === "string") { + rows = txt.split(/\\n|\n|/gi); + } else if (Array.isArray(txt)) { + rows = txt; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + tspan.setAttribute("class", "row"); + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; +}; +const drawCommits = (svg, commits2, modifyGraph) => { + const gitGraphConfig = getConfig$1().gitGraph; + const gBullets = svg.append("g").attr("class", "commit-bullets"); + const gLabels = svg.append("g").attr("class", "commit-labels"); + let pos = 0; + if (dir === "TB") { + pos = 30; + } + const keys = Object.keys(commits2); + const sortedKeys = keys.sort((a, b) => { + return commits2[a].seq - commits2[b].seq; + }); + sortedKeys.forEach((key) => { + const commit2 = commits2[key]; + const y = dir === "TB" ? pos + 10 : branchPos[commit2.branch].pos; + const x = dir === "TB" ? branchPos[commit2.branch].pos : pos + 10; + if (modifyGraph) { + let typeClass; + let commitSymbolType = commit2.customType !== void 0 && commit2.customType !== "" ? commit2.customType : commit2.type; + switch (commitSymbolType) { + case commitType.NORMAL: + typeClass = "commit-normal"; + break; + case commitType.REVERSE: + typeClass = "commit-reverse"; + break; + case commitType.HIGHLIGHT: + typeClass = "commit-highlight"; + break; + case commitType.MERGE: + typeClass = "commit-merge"; + break; + case commitType.CHERRY_PICK: + typeClass = "commit-cherry-pick"; + break; + default: + typeClass = "commit-normal"; + } + if (commitSymbolType === commitType.HIGHLIGHT) { + const circle = gBullets.append("rect"); + circle.attr("x", x - 10); + circle.attr("y", y - 10); + circle.attr("height", 20); + circle.attr("width", 20); + circle.attr( + "class", + `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer` + ); + gBullets.append("rect").attr("x", x - 6).attr("y", y - 6).attr("height", 12).attr("width", 12).attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner` + ); + } else if (commitSymbolType === commitType.CHERRY_PICK) { + gBullets.append("circle").attr("cx", x).attr("cy", y).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x - 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x + 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x + 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x - 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + } else { + const circle = gBullets.append("circle"); + circle.attr("cx", x); + circle.attr("cy", y); + circle.attr("r", commit2.type === commitType.MERGE ? 9 : 10); + circle.attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + if (commitSymbolType === commitType.MERGE) { + const circle2 = gBullets.append("circle"); + circle2.attr("cx", x); + circle2.attr("cy", y); + circle2.attr("r", 6); + circle2.attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + if (commitSymbolType === commitType.REVERSE) { + const cross = gBullets.append("path"); + cross.attr("d", `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`).attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + } + } + if (dir === "TB") { + commitPos[commit2.id] = { x, y: pos + 10 }; + } else { + commitPos[commit2.id] = { x: pos + 10, y }; + } + if (modifyGraph) { + const px = 4; + const py = 2; + if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && gitGraphConfig.showCommitLabel) { + const wrapper = gLabels.append("g"); + const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg"); + const text = wrapper.append("text").attr("x", pos).attr("y", y + 25).attr("class", "commit-label").text(commit2.id); + let bbox = text.node().getBBox(); + labelBkg.attr("x", pos + 10 - bbox.width / 2 - py).attr("y", y + 13.5).attr("width", bbox.width + 2 * py).attr("height", bbox.height + 2 * py); + if (dir === "TB") { + labelBkg.attr("x", x - (bbox.width + 4 * px + 5)).attr("y", y - 12); + text.attr("x", x - (bbox.width + 4 * px)).attr("y", y + bbox.height - 12); + } + if (dir !== "TB") { + text.attr("x", pos + 10 - bbox.width / 2); + } + if (gitGraphConfig.rotateCommitLabel) { + if (dir === "TB") { + text.attr("transform", "rotate(-45, " + x + ", " + y + ")"); + labelBkg.attr("transform", "rotate(-45, " + x + ", " + y + ")"); + } else { + let r_x = -7.5 - (bbox.width + 10) / 25 * 9.5; + let r_y = 10 + bbox.width / 25 * 8.5; + wrapper.attr( + "transform", + "translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + y + ")" + ); + } + } + } + if (commit2.tag) { + const rect = gLabels.insert("polygon"); + const hole = gLabels.append("circle"); + const tag = gLabels.append("text").attr("y", y - 16).attr("class", "tag-label").text(commit2.tag); + let tagBbox = tag.node().getBBox(); + tag.attr("x", pos + 10 - tagBbox.width / 2); + const h2 = tagBbox.height / 2; + const ly = y - 19.2; + rect.attr("class", "tag-label-bkg").attr( + "points", + ` + ${pos - tagBbox.width / 2 - px / 2},${ly + py} + ${pos - tagBbox.width / 2 - px / 2},${ly - py} + ${pos + 10 - tagBbox.width / 2 - px},${ly - h2 - py} + ${pos + 10 + tagBbox.width / 2 + px},${ly - h2 - py} + ${pos + 10 + tagBbox.width / 2 + px},${ly + h2 + py} + ${pos + 10 - tagBbox.width / 2 - px},${ly + h2 + py}` + ); + hole.attr("cx", pos - tagBbox.width / 2 + px / 2).attr("cy", ly).attr("r", 1.5).attr("class", "tag-hole"); + if (dir === "TB") { + rect.attr("class", "tag-label-bkg").attr( + "points", + ` + ${x},${pos + py} + ${x},${pos - py} + ${x + 10},${pos - h2 - py} + ${x + 10 + tagBbox.width + px},${pos - h2 - py} + ${x + 10 + tagBbox.width + px},${pos + h2 + py} + ${x + 10},${pos + h2 + py}` + ).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); + hole.attr("cx", x + px / 2).attr("cy", pos).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); + tag.attr("x", x + 5).attr("y", pos + 3).attr("transform", "translate(14,14) rotate(45, " + x + "," + pos + ")"); + } + } + } + pos += 50; + if (pos > maxPos) { + maxPos = pos; + } + }); +}; +const hasOverlappingCommits = (commit1, commit2, allCommits) => { + const keys = Object.keys(allCommits); + const overlappingComits = keys.filter((key) => { + return allCommits[key].branch === commit2.branch && allCommits[key].seq > commit1.seq && allCommits[key].seq < commit2.seq; + }); + return overlappingComits.length > 0; +}; +const findLane = (y1, y2, depth = 0) => { + const candidate = y1 + Math.abs(y1 - y2) / 2; + if (depth > 5) { + return candidate; + } + let ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10); + if (ok) { + lanes.push(candidate); + return candidate; + } + const diff = Math.abs(y1 - y2); + return findLane(y1, y2 - diff / 5, depth + 1); +}; +const drawArrow = (svg, commit1, commit2, allCommits) => { + const p1 = commitPos[commit1.id]; + const p2 = commitPos[commit2.id]; + const overlappingCommits = hasOverlappingCommits(commit1, commit2, allCommits); + let arc = ""; + let arc2 = ""; + let radius = 0; + let offset = 0; + let colorClassNum = branchPos[commit2.branch].index; + let lineDef; + if (overlappingCommits) { + arc = "A 10 10, 0, 0, 0,"; + arc2 = "A 10 10, 0, 0, 1,"; + radius = 10; + offset = 10; + colorClassNum = branchPos[commit2.branch].index; + const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y); + const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x); + if (dir === "TB") { + if (p1.x < p2.x) { + lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`; + } + } + } else { + if (dir === "TB") { + if (p1.x < p2.x) { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit2.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; + } + if (p1.x > p2.x) { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + if (p1.x === p2.x) { + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x + radius} ${p1.y} ${arc} ${p1.x + offset} ${p2.y + radius} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + arc = "A 20 20, 0, 0, 0,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit2.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + if (p1.y > p2.y) { + arc = "A 20 20, 0, 0, 0,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`; + } + if (p1.y === p2.y) { + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } + } + svg.append("path").attr("d", lineDef).attr("class", "arrow arrow" + colorClassNum % THEME_COLOR_LIMIT); +}; +const drawArrows = (svg, commits2) => { + const gArrows = svg.append("g").attr("class", "commit-arrows"); + Object.keys(commits2).forEach((key) => { + const commit2 = commits2[key]; + if (commit2.parents && commit2.parents.length > 0) { + commit2.parents.forEach((parent) => { + drawArrow(gArrows, commits2[parent], commit2, commits2); + }); + } + }); +}; +const drawBranches = (svg, branches2) => { + const gitGraphConfig = getConfig$1().gitGraph; + const g = svg.append("g"); + branches2.forEach((branch2, index) => { + const adjustIndexForTheme = index % THEME_COLOR_LIMIT; + const pos = branchPos[branch2.name].pos; + const line = g.append("line"); + line.attr("x1", 0); + line.attr("y1", pos); + line.attr("x2", maxPos); + line.attr("y2", pos); + line.attr("class", "branch branch" + adjustIndexForTheme); + if (dir === "TB") { + line.attr("y1", 30); + line.attr("x1", pos); + line.attr("y2", maxPos); + line.attr("x2", pos); + } + lanes.push(pos); + let name = branch2.name; + const labelElement = drawText(name); + const bkg = g.insert("rect"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr("rx", 4).attr("ry", 4).attr("x", -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)).attr("y", -bbox.height / 2 + 8).attr("width", bbox.width + 18).attr("height", bbox.height + 4); + label.attr( + "transform", + "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")" + ); + if (dir === "TB") { + bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0); + label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)"); + } + if (dir !== "TB") { + bkg.attr("transform", "translate(-19, " + (pos - bbox.height / 2) + ")"); + } + }); +}; +const draw = function(txt, id, ver, diagObj) { + clear(); + const conf = getConfig$1(); + const gitGraphConfig = conf.gitGraph; + log.debug("in gitgraph renderer", txt + "\n", "id:", id, ver); + allCommitsDict = diagObj.db.getCommits(); + const branches2 = diagObj.db.getBranchesAsObjArray(); + dir = diagObj.db.getDirection(); + const diagram2 = d3select(`[id="${id}"]`); + let pos = 0; + branches2.forEach((branch2, index) => { + const labelElement = drawText(branch2.name); + const g = diagram2.append("g"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + branchPos[branch2.name] = { pos, index }; + pos += 50 + (gitGraphConfig.rotateCommitLabel ? 40 : 0) + (dir === "TB" ? bbox.width / 2 : 0); + label.remove(); + branchLabel.remove(); + g.remove(); + }); + drawCommits(diagram2, allCommitsDict, false); + if (gitGraphConfig.showBranches) { + drawBranches(diagram2, branches2); + } + drawArrows(diagram2, allCommitsDict); + drawCommits(diagram2, allCommitsDict, true); + utils.insertTitle( + diagram2, + "gitTitleText", + gitGraphConfig.titleTopMargin, + diagObj.db.getDiagramTitle() + ); + setupGraphViewbox( + void 0, + diagram2, + gitGraphConfig.diagramPadding, + gitGraphConfig.useMaxWidth ?? conf.useMaxWidth + ); +}; +const gitGraphRenderer = { + draw +}; +const getStyles = (options2) => ` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0, 1, 2, 3, 4, 5, 6, 7].map( + (i) => ` + .branch-label${i} { fill: ${options2["gitBranchLabel" + i]}; } + .commit${i} { stroke: ${options2["git" + i]}; fill: ${options2["git" + i]}; } + .commit-highlight${i} { stroke: ${options2["gitInv" + i]}; fill: ${options2["gitInv" + i]}; } + .label${i} { fill: ${options2["git" + i]}; } + .arrow${i} { stroke: ${options2["git" + i]}; } + ` +).join("\n")} + + .branch { + stroke-width: 1; + stroke: ${options2.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelColor};} + .commit-label-bkg { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${options2.tagLabelFontSize}; fill: ${options2.tagLabelColor};} + .tag-label-bkg { fill: ${options2.tagLabelBackground}; stroke: ${options2.tagLabelBorder}; } + .tag-hole { fill: ${options2.textColor}; } + + .commit-merge { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + .commit-reverse { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; + } +`; +const gitGraphStyles = getStyles; +const diagram = { + parser: gitGraphParser, + db: gitGraphDb, + renderer: gitGraphRenderer, + styles: gitGraphStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/index-5f5016a9.js b/webroot/js/node_modules/mermaid/dist/index-5f5016a9.js new file mode 100644 index 0000000..1ce1f8a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/index-5f5016a9.js @@ -0,0 +1,347 @@ +import { b as G, i as b, m as O, G as A, l as M } from "./layout-545b2d5b.js"; +import { c as L, i as C, a as _, b as $, d as H, u as V, s as U, e as W, f as Y, p as D, g as q, h as z } from "./edges-020bfa8c.js"; +import { l as i, p as N, c as S, j as T } from "./mermaid-e4a58915.js"; +import { c as K } from "./createText-4be7776a.js"; +var Q = 4; +function Z(e) { + return G(e, Q); +} +function x(e) { + var t = { + options: { + directed: e.isDirected(), + multigraph: e.isMultigraph(), + compound: e.isCompound() + }, + nodes: I(e), + edges: tt(e) + }; + return b(e.graph()) || (t.value = Z(e.graph())), t; +} +function I(e) { + return O(e.nodes(), function(t) { + var n = e.node(t), r = e.parent(t), s = { v: t }; + return b(n) || (s.value = n), b(r) || (s.parent = r), s; + }); +} +function tt(e) { + return O(e.edges(), function(t) { + var n = e.edge(t), r = { v: t.v, w: t.w }; + return b(t.name) || (r.name = t.name), b(n) || (r.value = n), r; + }); +} +let f = {}, g = {}, J = {}; +const et = () => { + g = {}, J = {}, f = {}; +}, X = (e, t) => (i.trace("In isDecendant", t, " ", e, " = ", g[t].includes(e)), !!g[t].includes(e)), nt = (e, t) => (i.info("Decendants of ", t, " is ", g[t]), i.info("Edge is ", e), e.v === t || e.w === t ? !1 : g[t] ? g[t].includes(e.v) || X(e.v, t) || X(e.w, t) || g[t].includes(e.w) : (i.debug("Tilt, ", t, ",not in decendants"), !1)), R = (e, t, n, r) => { + i.warn( + "Copying children of ", + e, + "root", + r, + "data", + t.node(e), + r + ); + const s = t.children(e) || []; + e !== r && s.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", s), s.forEach((c) => { + if (t.children(c).length > 0) + R(c, t, n, r); + else { + const d = t.node(c); + i.info("cp ", c, " to ", r, " with parent ", e), n.setNode(c, d), r !== t.parent(c) && (i.warn("Setting parent", c, t.parent(c)), n.setParent(c, t.parent(c))), e !== r && c !== e ? (i.debug("Setting parent", c, e), n.setParent(c, e)) : (i.info("In copy ", e, "root", r, "data", t.node(e), r), i.debug( + "Not Setting parent for node=", + c, + "cluster!==rootId", + e !== r, + "node!==clusterId", + c !== e + )); + const l = t.edges(c); + i.debug("Copying Edges", l), l.forEach((u) => { + i.info("Edge", u); + const h = t.edge(u.v, u.w, u.name); + i.info("Edge data", h, r); + try { + nt(u, r) ? (i.info("Copying as ", u.v, u.w, h, u.name), n.setEdge(u.v, u.w, h, u.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info( + "Skipping copy of edge ", + u.v, + "-->", + u.w, + " rootId: ", + r, + " clusterId:", + e + ); + } catch (w) { + i.error(w); + } + }); + } + i.debug("Removing node", c), t.removeNode(c); + }); +}, p = (e, t) => { + const n = t.children(e); + let r = [...n]; + for (const s of n) + J[s] = e, r = [...r, ...p(s, t)]; + return r; +}, v = (e, t) => { + i.trace("Searching", e); + const n = t.children(e); + if (i.trace("Searching children of id ", e, n), n.length < 1) + return i.trace("This is a valid node", e), e; + for (const r of n) { + const s = v(r, t); + if (s) + return i.trace("Found replacement for", e, " => ", s), s; + } +}, E = (e) => !f[e] || !f[e].externalConnections ? e : f[e] ? f[e].id : e, it = (e, t) => { + if (!e || t > 10) { + i.debug("Opting out, no graph "); + return; + } else + i.debug("Opting in, graph "); + e.nodes().forEach(function(n) { + e.children(n).length > 0 && (i.warn( + "Cluster identified", + n, + " Replacement id in edges: ", + v(n, e) + ), g[n] = p(n, e), f[n] = { id: v(n, e), clusterData: e.node(n) }); + }), e.nodes().forEach(function(n) { + const r = e.children(n), s = e.edges(); + r.length > 0 ? (i.debug("Cluster identified", n, g), s.forEach((c) => { + if (c.v !== n && c.w !== n) { + const d = X(c.v, n), l = X(c.w, n); + d ^ l && (i.warn("Edge: ", c, " leaves cluster ", n), i.warn("Decendants of XXX ", n, ": ", g[n]), f[n].externalConnections = !0); + } + })) : i.debug("Not a cluster ", n, g); + }), e.edges().forEach(function(n) { + const r = e.edge(n); + i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n))); + let s = n.v, c = n.w; + if (i.warn( + "Fix XXX", + f, + "ids:", + n.v, + n.w, + "Translating: ", + f[n.v], + " --- ", + f[n.w] + ), f[n.v] && f[n.w] && f[n.v] === f[n.w]) { + i.warn("Fixing and trixing link to self - removing XXX", n.v, n.w, n.name), i.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), s = E(n.v), c = E(n.w), e.removeEdge(n.v, n.w, n.name); + const d = n.w + "---" + n.v; + e.setNode(d, { + domId: d, + id: d, + labelStyle: "", + labelText: r.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const l = structuredClone(r), u = structuredClone(r); + l.label = "", l.arrowTypeEnd = "none", u.label = "", l.fromCluster = n.v, u.toCluster = n.v, e.setEdge(s, d, l, n.name + "-cyclic-special"), e.setEdge(d, c, u, n.name + "-cyclic-special"); + } else + (f[n.v] || f[n.w]) && (i.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), s = E(n.v), c = E(n.w), e.removeEdge(n.v, n.w, n.name), s !== n.v && (r.fromCluster = n.v), c !== n.w && (r.toCluster = n.w), i.warn("Fix Replacing with XXX", s, c, n.name), e.setEdge(s, c, r, n.name)); + }), i.warn("Adjusted Graph", x(e)), P(e, 0), i.trace(f); +}, P = (e, t) => { + if (i.warn("extractor - ", t, x(e), e.children("D")), t > 10) { + i.error("Bailing out"); + return; + } + let n = e.nodes(), r = !1; + for (const s of n) { + const c = e.children(s); + r = r || c.length > 0; + } + if (!r) { + i.debug("Done, no node has children", e.nodes()); + return; + } + i.debug("Nodes = ", n, t); + for (const s of n) + if (i.debug( + "Extracting node", + s, + f, + f[s] && !f[s].externalConnections, + !e.parent(s), + e.node(s), + e.children("D"), + " Depth ", + t + ), !f[s]) + i.debug("Not a cluster", s, t); + else if (!f[s].externalConnections && // !graph.parent(node) && + e.children(s) && e.children(s).length > 0) { + i.warn( + "Cluster without external connections, without a parent and with children", + s, + t + ); + let d = e.graph().rankdir === "TB" ? "LR" : "TB"; + f[s] && f[s].clusterData && f[s].clusterData.dir && (d = f[s].clusterData.dir, i.warn("Fixing dir", f[s].clusterData.dir, d)); + const l = new A({ + multigraph: !0, + compound: !0 + }).setGraph({ + rankdir: d, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + i.warn("Old graph before copy", x(e)), R(s, e, l, s), e.setNode(s, { + clusterNode: !0, + id: s, + clusterData: f[s].clusterData, + labelText: f[s].labelText, + graph: l + }), i.warn("New graph after copy node: (", s, ")", x(l)), i.debug("Old graph after copy", x(e)); + } else + i.warn( + "Cluster ** ", + s, + " **not meeting the criteria !externalConnections:", + !f[s].externalConnections, + " no parent: ", + !e.parent(s), + " children ", + e.children(s) && e.children(s).length > 0, + e.children("D"), + t + ), i.debug(f); + n = e.nodes(), i.warn("New list of nodes", n); + for (const s of n) { + const c = e.node(s); + i.warn(" Now next level", s, c), c.clusterNode && P(c.graph, t + 1); + } +}, F = (e, t) => { + if (t.length === 0) + return []; + let n = Object.assign(t); + return t.forEach((r) => { + const s = e.children(r), c = F(e, s); + n = [...n, ...c]; + }), n; +}, st = (e) => F(e, e.children()), rt = (e, t) => { + i.info("Creating subgraph rect for ", t.id, t); + const n = e.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), r = n.insert("rect", ":first-child"), s = N(S().flowchart.htmlLabels), c = n.insert("g").attr("class", "cluster-label"), d = t.labelType === "markdown" ? K(c, t.labelText, { style: t.labelStyle, useHtmlLabels: s }) : c.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0)); + let l = d.getBBox(); + if (N(S().flowchart.htmlLabels)) { + const a = d.children[0], o = T(d); + l = a.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height); + } + const u = 0 * t.padding, h = u / 2, w = t.width <= l.width + u ? l.width + u : t.width; + t.width <= l.width + u ? t.diff = (l.width - t.width) / 2 - t.padding / 2 : t.diff = -t.padding / 2, i.trace("Data ", t, JSON.stringify(t)), r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - w / 2).attr("y", t.y - t.height / 2 - h).attr("width", w).attr("height", t.height + u), s ? c.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + (t.x - l.width / 2) + ", " + (t.y - t.height / 2) + ")" + ) : c.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + t.x + ", " + (t.y - t.height / 2) + ")" + ); + const m = r.node().getBBox(); + return t.width = m.width, t.height = m.height, t.intersect = function(a) { + return C(t, a); + }, n; +}, at = (e, t) => { + const n = e.insert("g").attr("class", "note-cluster").attr("id", t.id), r = n.insert("rect", ":first-child"), s = 0 * t.padding, c = s / 2; + r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - c).attr("y", t.y - t.height / 2 - c).attr("width", t.width + s).attr("height", t.height + s).attr("fill", "none"); + const d = r.node().getBBox(); + return t.width = d.width, t.height = d.height, t.intersect = function(l) { + return C(t, l); + }, n; +}, ct = (e, t) => { + const n = e.insert("g").attr("class", t.classes).attr("id", t.id), r = n.insert("rect", ":first-child"), s = n.insert("g").attr("class", "cluster-label"), c = n.append("rect"), d = s.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0)); + let l = d.getBBox(); + if (N(S().flowchart.htmlLabels)) { + const a = d.children[0], o = T(d); + l = a.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height); + } + l = d.getBBox(); + const u = 0 * t.padding, h = u / 2, w = t.width <= l.width + t.padding ? l.width + t.padding : t.width; + t.width <= l.width + t.padding ? t.diff = (l.width + t.padding * 0 - t.width) / 2 : t.diff = -t.padding / 2, r.attr("class", "outer").attr("x", t.x - w / 2 - h).attr("y", t.y - t.height / 2 - h).attr("width", w + u).attr("height", t.height + u), c.attr("class", "inner").attr("x", t.x - w / 2 - h).attr("y", t.y - t.height / 2 - h + l.height - 1).attr("width", w + u).attr("height", t.height + u - l.height - 3), s.attr( + "transform", + "translate(" + (t.x - l.width / 2) + ", " + (t.y - t.height / 2 - t.padding / 3 + (N(S().flowchart.htmlLabels) ? 5 : 3)) + ")" + ); + const m = r.node().getBBox(); + return t.height = m.height, t.intersect = function(a) { + return C(t, a); + }, n; +}, ot = (e, t) => { + const n = e.insert("g").attr("class", t.classes).attr("id", t.id), r = n.insert("rect", ":first-child"), s = 0 * t.padding, c = s / 2; + r.attr("class", "divider").attr("x", t.x - t.width / 2 - c).attr("y", t.y - t.height / 2).attr("width", t.width + s).attr("height", t.height + s); + const d = r.node().getBBox(); + return t.width = d.width, t.height = d.height, t.diff = -t.padding / 2, t.intersect = function(l) { + return C(t, l); + }, n; +}, lt = { rect: rt, roundedWithTitle: ct, noteGroup: at, divider: ot }; +let k = {}; +const ft = (e, t) => { + i.trace("Inserting cluster"); + const n = t.shape || "rect"; + k[t.id] = lt[n](e, t); +}, dt = () => { + k = {}; +}, j = async (e, t, n, r, s) => { + i.info("Graph in recursive render: XXX", x(t), s); + const c = t.graph().rankdir; + i.trace("Dir in recursive render - dir:", c); + const d = e.insert("g").attr("class", "root"); + t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.trace("Recursive edges", t.edge(t.edges()[0])); + const l = d.insert("g").attr("class", "clusters"), u = d.insert("g").attr("class", "edgePaths"), h = d.insert("g").attr("class", "edgeLabels"), w = d.insert("g").attr("class", "nodes"); + await Promise.all( + t.nodes().map(async function(a) { + const o = t.node(a); + if (s !== void 0) { + const y = JSON.parse(JSON.stringify(s.clusterData)); + i.info("Setting data for cluster XXX (", a, ") ", y, s), t.setNode(s.id, y), t.parent(a) || (i.trace("Setting parent", a, s.id), t.setParent(a, s.id, y)); + } + if (i.info("(Insert) Node XXX" + a + ": " + JSON.stringify(t.node(a))), o && o.clusterNode) { + i.info("Cluster identified", a, o.width, t.node(a)); + const y = await j(w, o.graph, n, r, t.node(a)), B = y.elem; + V(o, B), o.diff = y.diff || 0, i.info("Node bounds (abc123)", a, o, o.width, o.x, o.y), U(B, o), i.warn("Recursive render complete ", B, o); + } else + t.children(a).length > 0 ? (i.info("Cluster - the non recursive path XXX", a, o.id, o, t), i.info(v(o.id, t)), f[o.id] = { id: v(o.id, t), node: o }) : (i.info("Node - the non recursive path", a, o.id, o), await W(w, t.node(a), c)); + }) + ), t.edges().forEach(function(a) { + const o = t.edge(a.v, a.w, a.name); + i.info("Edge " + a.v + " -> " + a.w + ": " + JSON.stringify(a)), i.info("Edge " + a.v + " -> " + a.w + ": ", a, " ", JSON.stringify(t.edge(a))), i.info("Fix", f, "ids:", a.v, a.w, "Translateing: ", f[a.v], f[a.w]), Y(h, o); + }), t.edges().forEach(function(a) { + i.info("Edge " + a.v + " -> " + a.w + ": " + JSON.stringify(a)); + }), i.info("#############################################"), i.info("### Layout ###"), i.info("#############################################"), i.info(t), M(t), i.info("Graph after layout:", x(t)); + let m = 0; + return st(t).forEach(function(a) { + const o = t.node(a); + i.info("Position " + a + ": " + JSON.stringify(t.node(a))), i.info( + "Position " + a + ": (" + o.x, + "," + o.y, + ") width: ", + o.width, + " height: ", + o.height + ), o && o.clusterNode ? D(o) : t.children(a).length > 0 ? (ft(l, o), f[o.id].node = o) : D(o); + }), t.edges().forEach(function(a) { + const o = t.edge(a); + i.info("Edge " + a.v + " -> " + a.w + ": " + JSON.stringify(o), o); + const y = q(u, a, o, f, n, t, r); + z(o, y); + }), t.nodes().forEach(function(a) { + const o = t.node(a); + i.info(a, o.type, o.diff), o.type === "group" && (m = o.diff); + }), { elem: d, diff: m }; +}, xt = async (e, t, n, r, s) => { + _(e, n, r, s), $(), H(), dt(), et(), i.warn("Graph at first:", JSON.stringify(x(t))), it(t), i.warn("Graph after:", JSON.stringify(x(t))), await j(e, t, r, s); +}; +export { + xt as r +}; diff --git a/webroot/js/node_modules/mermaid/dist/index-cc269c15.js b/webroot/js/node_modules/mermaid/dist/index-cc269c15.js new file mode 100644 index 0000000..e5514c4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/index-cc269c15.js @@ -0,0 +1,637 @@ +import { b as baseClone, i as isUndefined, m as map, G as Graph, l as layout } from "./layout-a7b9ff07.js"; +import { c as createLabel, i as intersectRect, a as insertMarkers, b as clear$2, d as clear$3, u as updateNodeBounds, s as setNodeElem, e as insertNode, f as insertEdgeLabel, p as positionNode, g as insertEdge, h as positionEdgeLabel } from "./edges-9bf94b2d.js"; +import { l as log, p as evaluate, c as getConfig, j as d3select } from "./mermaid-491db2d9.js"; +import { c as createText } from "./createText-2660bae1.js"; +var CLONE_SYMBOLS_FLAG = 4; +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} +function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound() + }, + nodes: writeNodes(g), + edges: writeEdges(g) + }; + if (!isUndefined(g.graph())) { + json.value = clone(g.graph()); + } + return json; +} +function writeNodes(g) { + return map(g.nodes(), function(v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node = { v }; + if (!isUndefined(nodeValue)) { + node.value = nodeValue; + } + if (!isUndefined(parent)) { + node.parent = parent; + } + return node; + }); +} +function writeEdges(g) { + return map(g.edges(), function(e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!isUndefined(e.name)) { + edge.name = e.name; + } + if (!isUndefined(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); +} +let clusterDb = {}; +let descendants = {}; +let parents = {}; +const clear$1 = () => { + descendants = {}; + parents = {}; + clusterDb = {}; +}; +const isDescendant = (id, ancenstorId) => { + log.trace("In isDecendant", ancenstorId, " ", id, " = ", descendants[ancenstorId].includes(id)); + if (descendants[ancenstorId].includes(id)) { + return true; + } + return false; +}; +const edgeInCluster = (edge, clusterId) => { + log.info("Decendants of ", clusterId, " is ", descendants[clusterId]); + log.info("Edge is ", edge); + if (edge.v === clusterId) { + return false; + } + if (edge.w === clusterId) { + return false; + } + if (!descendants[clusterId]) { + log.debug("Tilt, ", clusterId, ",not in decendants"); + return false; + } + return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); +}; +const copy = (clusterId, graph, newGraph, rootId) => { + log.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); + const nodes = graph.children(clusterId) || []; + if (clusterId !== rootId) { + nodes.push(clusterId); + } + log.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); + nodes.forEach((node) => { + if (graph.children(node).length > 0) { + copy(node, graph, newGraph, rootId); + } else { + const data = graph.node(node); + log.info("cp ", node, " to ", rootId, " with parent ", clusterId); + newGraph.setNode(node, data); + if (rootId !== graph.parent(node)) { + log.warn("Setting parent", node, graph.parent(node)); + newGraph.setParent(node, graph.parent(node)); + } + if (clusterId !== rootId && node !== clusterId) { + log.debug("Setting parent", node, clusterId); + newGraph.setParent(node, clusterId); + } else { + log.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + log.debug( + "Not Setting parent for node=", + node, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node !== clusterId + ); + } + const edges = graph.edges(node); + log.debug("Copying Edges", edges); + edges.forEach((edge) => { + log.info("Edge", edge); + const data2 = graph.edge(edge.v, edge.w, edge.name); + log.info("Edge data", data2, rootId); + try { + if (edgeInCluster(edge, rootId)) { + log.info("Copying as ", edge.v, edge.w, data2, edge.name); + newGraph.setEdge(edge.v, edge.w, data2, edge.name); + log.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + log.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); + } + } catch (e) { + log.error(e); + } + }); + } + log.debug("Removing node", node); + graph.removeNode(node); + }); +}; +const extractDescendants = (id, graph) => { + const children = graph.children(id); + let res = [...children]; + for (const child of children) { + parents[child] = id; + res = [...res, ...extractDescendants(child, graph)]; + } + return res; +}; +const findNonClusterChild = (id, graph) => { + log.trace("Searching", id); + const children = graph.children(id); + log.trace("Searching children of id ", id, children); + if (children.length < 1) { + log.trace("This is a valid node", id); + return id; + } + for (const child of children) { + const _id = findNonClusterChild(child, graph); + if (_id) { + log.trace("Found replacement for", id, " => ", _id); + return _id; + } + } +}; +const getAnchorId = (id) => { + if (!clusterDb[id]) { + return id; + } + if (!clusterDb[id].externalConnections) { + return id; + } + if (clusterDb[id]) { + return clusterDb[id].id; + } + return id; +}; +const adjustClustersAndEdges = (graph, depth) => { + if (!graph || depth > 10) { + log.debug("Opting out, no graph "); + return; + } else { + log.debug("Opting in, graph "); + } + graph.nodes().forEach(function(id) { + const children = graph.children(id); + if (children.length > 0) { + log.warn( + "Cluster identified", + id, + " Replacement id in edges: ", + findNonClusterChild(id, graph) + ); + descendants[id] = extractDescendants(id, graph); + clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; + } + }); + graph.nodes().forEach(function(id) { + const children = graph.children(id); + const edges = graph.edges(); + if (children.length > 0) { + log.debug("Cluster identified", id, descendants); + edges.forEach((edge) => { + if (edge.v !== id && edge.w !== id) { + const d1 = isDescendant(edge.v, id); + const d2 = isDescendant(edge.w, id); + if (d1 ^ d2) { + log.warn("Edge: ", edge, " leaves cluster ", id); + log.warn("Decendants of XXX ", id, ": ", descendants[id]); + clusterDb[id].externalConnections = true; + } + } + }); + } else { + log.debug("Not a cluster ", id, descendants); + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + log.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + log.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + let v = e.v; + let w = e.w; + log.warn( + "Fix XXX", + clusterDb, + "ids:", + e.v, + e.w, + "Translating: ", + clusterDb[e.v], + " --- ", + clusterDb[e.w] + ); + if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { + log.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); + log.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + const specialId = e.w + "---" + e.v; + graph.setNode(specialId, { + domId: specialId, + id: specialId, + labelStyle: "", + labelText: edge.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const edge1 = structuredClone(edge); + const edge2 = structuredClone(edge); + edge1.label = ""; + edge1.arrowTypeEnd = "none"; + edge2.label = ""; + edge1.fromCluster = e.v; + edge2.toCluster = e.v; + graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); + graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); + } else if (clusterDb[e.v] || clusterDb[e.w]) { + log.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) { + edge.fromCluster = e.v; + } + if (w !== e.w) { + edge.toCluster = e.w; + } + log.warn("Fix Replacing with XXX", v, w, e.name); + graph.setEdge(v, w, edge, e.name); + } + }); + log.warn("Adjusted Graph", write(graph)); + extractor(graph, 0); + log.trace(clusterDb); +}; +const extractor = (graph, depth) => { + log.warn("extractor - ", depth, write(graph), graph.children("D")); + if (depth > 10) { + log.error("Bailing out"); + return; + } + let nodes = graph.nodes(); + let hasChildren = false; + for (const node of nodes) { + const children = graph.children(node); + hasChildren = hasChildren || children.length > 0; + } + if (!hasChildren) { + log.debug("Done, no node has children", graph.nodes()); + return; + } + log.debug("Nodes = ", nodes, depth); + for (const node of nodes) { + log.debug( + "Extracting node", + node, + clusterDb, + clusterDb[node] && !clusterDb[node].externalConnections, + !graph.parent(node), + graph.node(node), + graph.children("D"), + " Depth ", + depth + ); + if (!clusterDb[node]) { + log.debug("Not a cluster", node, depth); + } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && + graph.children(node) && graph.children(node).length > 0) { + log.warn( + "Cluster without external connections, without a parent and with children", + node, + depth + ); + const graphSettings = graph.graph(); + let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; + if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { + dir = clusterDb[node].clusterData.dir; + log.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); + } + const clusterGraph = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + log.warn("Old graph before copy", write(graph)); + copy(node, graph, clusterGraph, node); + graph.setNode(node, { + clusterNode: true, + id: node, + clusterData: clusterDb[node].clusterData, + labelText: clusterDb[node].labelText, + graph: clusterGraph + }); + log.warn("New graph after copy node: (", node, ")", write(clusterGraph)); + log.debug("Old graph after copy", write(graph)); + } else { + log.warn( + "Cluster ** ", + node, + " **not meeting the criteria !externalConnections:", + !clusterDb[node].externalConnections, + " no parent: ", + !graph.parent(node), + " children ", + graph.children(node) && graph.children(node).length > 0, + graph.children("D"), + depth + ); + log.debug(clusterDb); + } + } + nodes = graph.nodes(); + log.warn("New list of nodes", nodes); + for (const node of nodes) { + const data = graph.node(node); + log.warn(" Now next level", node, data); + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } +}; +const sorter = (graph, nodes) => { + if (nodes.length === 0) { + return []; + } + let result = Object.assign(nodes); + nodes.forEach((node) => { + const children = graph.children(node); + const sorted = sorter(graph, children); + result = [...result, ...sorted]; + }); + return result; +}; +const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); +const rect = (parent, node) => { + log.info("Creating subgraph rect for ", node.id, node); + const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const text = node.labelType === "markdown" ? createText(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild(createLabel(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = d3select(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; + if (node.width <= bbox.width + padding) { + node.diff = (bbox.width - node.width) / 2 - node.padding / 2; + } else { + node.diff = -node.padding / 2; + } + log.trace("Data ", node, JSON.stringify(node)); + rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); + if (useHtmlLabels) { + label.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2) + ")" + ); + } else { + label.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + node.x + ", " + (node.y - node.height / 2) + ")" + ); + } + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const noteGroup = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const roundedWithTitle = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const innerRect = shapeSvg.append("rect"); + const text = label.node().appendChild(createLabel(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = d3select(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + bbox = text.getBBox(); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; + if (node.width <= bbox.width + node.padding) { + node.diff = (bbox.width + node.padding * 0 - node.width) / 2; + } else { + node.diff = -node.padding / 2; + } + rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); + innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); + label.attr( + "transform", + "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2 - node.padding / 3 + (evaluate(getConfig().flowchart.htmlLabels) ? 5 : 3)) + ")" + ); + const rectBox = rect2.node().getBBox(); + node.height = rectBox.height; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const divider = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.diff = -node.padding / 2; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const shapes = { rect, roundedWithTitle, noteGroup, divider }; +let clusterElems = {}; +const insertCluster = (elem, node) => { + log.trace("Inserting cluster"); + const shape = node.shape || "rect"; + clusterElems[node.id] = shapes[shape](elem, node); +}; +const clear = () => { + clusterElems = {}; +}; +const recursiveRender = async (_elem, graph, diagramtype, id, parentCluster) => { + log.info("Graph in recursive render: XXX", write(graph), parentCluster); + const dir = graph.graph().rankdir; + log.trace("Dir in recursive render - dir:", dir); + const elem = _elem.insert("g").attr("class", "root"); + if (!graph.nodes()) { + log.info("No nodes found for", graph); + } else { + log.info("Recursive render XXX", graph.nodes()); + } + if (graph.edges().length > 0) { + log.trace("Recursive edges", graph.edge(graph.edges()[0])); + } + const clusters = elem.insert("g").attr("class", "clusters"); + const edgePaths = elem.insert("g").attr("class", "edgePaths"); + const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); + const nodes = elem.insert("g").attr("class", "nodes"); + await Promise.all( + graph.nodes().map(async function(v) { + const node = graph.node(v); + if (parentCluster !== void 0) { + const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); + log.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); + graph.setNode(parentCluster.id, data); + if (!graph.parent(v)) { + log.trace("Setting parent", v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } + log.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); + if (node && node.clusterNode) { + log.info("Cluster identified", v, node.width, graph.node(v)); + const o = await recursiveRender(nodes, node.graph, diagramtype, id, graph.node(v)); + const newEl = o.elem; + updateNodeBounds(node, newEl); + node.diff = o.diff || 0; + log.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); + setNodeElem(newEl, node); + log.warn("Recursive render complete ", newEl, node); + } else { + if (graph.children(v).length > 0) { + log.info("Cluster - the non recursive path XXX", v, node.id, node, graph); + log.info(findNonClusterChild(node.id, graph)); + clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; + } else { + log.info("Node - the non recursive path", v, node.id, node); + await insertNode(nodes, graph.node(v), dir); + } + } + }) + ); + graph.edges().forEach(function(e) { + const edge = graph.edge(e.v, e.w, e.name); + log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + log.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); + log.info("Fix", clusterDb, "ids:", e.v, e.w, "Translateing: ", clusterDb[e.v], clusterDb[e.w]); + insertEdgeLabel(edgeLabels, edge); + }); + graph.edges().forEach(function(e) { + log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + }); + log.info("#############################################"); + log.info("### Layout ###"); + log.info("#############################################"); + log.info(graph); + layout(graph); + log.info("Graph after layout:", write(graph)); + let diff = 0; + sortNodesByHierarchy(graph).forEach(function(v) { + const node = graph.node(v); + log.info("Position " + v + ": " + JSON.stringify(graph.node(v))); + log.info( + "Position " + v + ": (" + node.x, + "," + node.y, + ") width: ", + node.width, + " height: ", + node.height + ); + if (node && node.clusterNode) { + positionNode(node); + } else { + if (graph.children(v).length > 0) { + insertCluster(clusters, node); + clusterDb[node.id].node = node; + } else { + positionNode(node); + } + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); + const paths = insertEdge(edgePaths, e, edge, clusterDb, diagramtype, graph, id); + positionEdgeLabel(edge, paths); + }); + graph.nodes().forEach(function(v) { + const n = graph.node(v); + log.info(v, n.type, n.diff); + if (n.type === "group") { + diff = n.diff; + } + }); + return { elem, diff }; +}; +const render = async (elem, graph, markers, diagramtype, id) => { + insertMarkers(elem, markers, diagramtype, id); + clear$2(); + clear$3(); + clear(); + clear$1(); + log.warn("Graph at first:", JSON.stringify(write(graph))); + adjustClustersAndEdges(graph); + log.warn("Graph after:", JSON.stringify(write(graph))); + await recursiveRender(elem, graph, diagramtype, id); +}; +export { + render as r +}; diff --git a/webroot/js/node_modules/mermaid/dist/index-f9462f3f.js b/webroot/js/node_modules/mermaid/dist/index-f9462f3f.js new file mode 100644 index 0000000..9086a74 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/index-f9462f3f.js @@ -0,0 +1,594 @@ +import { layout } from "dagre-d3-es/src/dagre/index.js"; +import * as graphlibJson from "dagre-d3-es/src/graphlib/json.js"; +import { c as createLabel, i as intersectRect, a as insertMarkers, b as clear$2, d as clear$3, u as updateNodeBounds, s as setNodeElem, e as insertNode, f as insertEdgeLabel, p as positionNode, g as insertEdge, h as positionEdgeLabel } from "./edges-f15a7e05.js"; +import { l as log, m as evaluate, c as getConfig } from "./mermaid-0d192ec3.js"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { c as createText } from "./createText-80c3befb.js"; +import { select } from "d3"; +let clusterDb = {}; +let descendants = {}; +let parents = {}; +const clear$1 = () => { + descendants = {}; + parents = {}; + clusterDb = {}; +}; +const isDescendant = (id, ancenstorId) => { + log.trace("In isDecendant", ancenstorId, " ", id, " = ", descendants[ancenstorId].includes(id)); + if (descendants[ancenstorId].includes(id)) { + return true; + } + return false; +}; +const edgeInCluster = (edge, clusterId) => { + log.info("Decendants of ", clusterId, " is ", descendants[clusterId]); + log.info("Edge is ", edge); + if (edge.v === clusterId) { + return false; + } + if (edge.w === clusterId) { + return false; + } + if (!descendants[clusterId]) { + log.debug("Tilt, ", clusterId, ",not in decendants"); + return false; + } + return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); +}; +const copy = (clusterId, graph, newGraph, rootId) => { + log.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); + const nodes = graph.children(clusterId) || []; + if (clusterId !== rootId) { + nodes.push(clusterId); + } + log.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); + nodes.forEach((node) => { + if (graph.children(node).length > 0) { + copy(node, graph, newGraph, rootId); + } else { + const data = graph.node(node); + log.info("cp ", node, " to ", rootId, " with parent ", clusterId); + newGraph.setNode(node, data); + if (rootId !== graph.parent(node)) { + log.warn("Setting parent", node, graph.parent(node)); + newGraph.setParent(node, graph.parent(node)); + } + if (clusterId !== rootId && node !== clusterId) { + log.debug("Setting parent", node, clusterId); + newGraph.setParent(node, clusterId); + } else { + log.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + log.debug( + "Not Setting parent for node=", + node, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node !== clusterId + ); + } + const edges = graph.edges(node); + log.debug("Copying Edges", edges); + edges.forEach((edge) => { + log.info("Edge", edge); + const data2 = graph.edge(edge.v, edge.w, edge.name); + log.info("Edge data", data2, rootId); + try { + if (edgeInCluster(edge, rootId)) { + log.info("Copying as ", edge.v, edge.w, data2, edge.name); + newGraph.setEdge(edge.v, edge.w, data2, edge.name); + log.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + log.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); + } + } catch (e) { + log.error(e); + } + }); + } + log.debug("Removing node", node); + graph.removeNode(node); + }); +}; +const extractDescendants = (id, graph) => { + const children = graph.children(id); + let res = [...children]; + for (const child of children) { + parents[child] = id; + res = [...res, ...extractDescendants(child, graph)]; + } + return res; +}; +const findNonClusterChild = (id, graph) => { + log.trace("Searching", id); + const children = graph.children(id); + log.trace("Searching children of id ", id, children); + if (children.length < 1) { + log.trace("This is a valid node", id); + return id; + } + for (const child of children) { + const _id = findNonClusterChild(child, graph); + if (_id) { + log.trace("Found replacement for", id, " => ", _id); + return _id; + } + } +}; +const getAnchorId = (id) => { + if (!clusterDb[id]) { + return id; + } + if (!clusterDb[id].externalConnections) { + return id; + } + if (clusterDb[id]) { + return clusterDb[id].id; + } + return id; +}; +const adjustClustersAndEdges = (graph, depth) => { + if (!graph || depth > 10) { + log.debug("Opting out, no graph "); + return; + } else { + log.debug("Opting in, graph "); + } + graph.nodes().forEach(function(id) { + const children = graph.children(id); + if (children.length > 0) { + log.warn( + "Cluster identified", + id, + " Replacement id in edges: ", + findNonClusterChild(id, graph) + ); + descendants[id] = extractDescendants(id, graph); + clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; + } + }); + graph.nodes().forEach(function(id) { + const children = graph.children(id); + const edges = graph.edges(); + if (children.length > 0) { + log.debug("Cluster identified", id, descendants); + edges.forEach((edge) => { + if (edge.v !== id && edge.w !== id) { + const d1 = isDescendant(edge.v, id); + const d2 = isDescendant(edge.w, id); + if (d1 ^ d2) { + log.warn("Edge: ", edge, " leaves cluster ", id); + log.warn("Decendants of XXX ", id, ": ", descendants[id]); + clusterDb[id].externalConnections = true; + } + } + }); + } else { + log.debug("Not a cluster ", id, descendants); + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + log.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + log.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + let v = e.v; + let w = e.w; + log.warn( + "Fix XXX", + clusterDb, + "ids:", + e.v, + e.w, + "Translating: ", + clusterDb[e.v], + " --- ", + clusterDb[e.w] + ); + if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { + log.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); + log.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + const specialId = e.w + "---" + e.v; + graph.setNode(specialId, { + domId: specialId, + id: specialId, + labelStyle: "", + labelText: edge.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const edge1 = structuredClone(edge); + const edge2 = structuredClone(edge); + edge1.label = ""; + edge1.arrowTypeEnd = "none"; + edge2.label = ""; + edge1.fromCluster = e.v; + edge2.toCluster = e.v; + graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); + graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); + } else if (clusterDb[e.v] || clusterDb[e.w]) { + log.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) { + edge.fromCluster = e.v; + } + if (w !== e.w) { + edge.toCluster = e.w; + } + log.warn("Fix Replacing with XXX", v, w, e.name); + graph.setEdge(v, w, edge, e.name); + } + }); + log.warn("Adjusted Graph", graphlibJson.write(graph)); + extractor(graph, 0); + log.trace(clusterDb); +}; +const extractor = (graph, depth) => { + log.warn("extractor - ", depth, graphlibJson.write(graph), graph.children("D")); + if (depth > 10) { + log.error("Bailing out"); + return; + } + let nodes = graph.nodes(); + let hasChildren = false; + for (const node of nodes) { + const children = graph.children(node); + hasChildren = hasChildren || children.length > 0; + } + if (!hasChildren) { + log.debug("Done, no node has children", graph.nodes()); + return; + } + log.debug("Nodes = ", nodes, depth); + for (const node of nodes) { + log.debug( + "Extracting node", + node, + clusterDb, + clusterDb[node] && !clusterDb[node].externalConnections, + !graph.parent(node), + graph.node(node), + graph.children("D"), + " Depth ", + depth + ); + if (!clusterDb[node]) { + log.debug("Not a cluster", node, depth); + } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && + graph.children(node) && graph.children(node).length > 0) { + log.warn( + "Cluster without external connections, without a parent and with children", + node, + depth + ); + const graphSettings = graph.graph(); + let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; + if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { + dir = clusterDb[node].clusterData.dir; + log.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); + } + const clusterGraph = new graphlib.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + log.warn("Old graph before copy", graphlibJson.write(graph)); + copy(node, graph, clusterGraph, node); + graph.setNode(node, { + clusterNode: true, + id: node, + clusterData: clusterDb[node].clusterData, + labelText: clusterDb[node].labelText, + graph: clusterGraph + }); + log.warn("New graph after copy node: (", node, ")", graphlibJson.write(clusterGraph)); + log.debug("Old graph after copy", graphlibJson.write(graph)); + } else { + log.warn( + "Cluster ** ", + node, + " **not meeting the criteria !externalConnections:", + !clusterDb[node].externalConnections, + " no parent: ", + !graph.parent(node), + " children ", + graph.children(node) && graph.children(node).length > 0, + graph.children("D"), + depth + ); + log.debug(clusterDb); + } + } + nodes = graph.nodes(); + log.warn("New list of nodes", nodes); + for (const node of nodes) { + const data = graph.node(node); + log.warn(" Now next level", node, data); + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } +}; +const sorter = (graph, nodes) => { + if (nodes.length === 0) { + return []; + } + let result = Object.assign(nodes); + nodes.forEach((node) => { + const children = graph.children(node); + const sorted = sorter(graph, children); + result = [...result, ...sorted]; + }); + return result; +}; +const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); +const rect = (parent, node) => { + log.info("Creating subgraph rect for ", node.id, node); + const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const text = node.labelType === "markdown" ? createText(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild(createLabel(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = select(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; + if (node.width <= bbox.width + padding) { + node.diff = (bbox.width - node.width) / 2 - node.padding / 2; + } else { + node.diff = -node.padding / 2; + } + log.trace("Data ", node, JSON.stringify(node)); + rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); + if (useHtmlLabels) { + label.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2) + ")" + ); + } else { + label.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + node.x + ", " + (node.y - node.height / 2) + ")" + ); + } + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const noteGroup = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const roundedWithTitle = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const innerRect = shapeSvg.append("rect"); + const text = label.node().appendChild(createLabel(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if (evaluate(getConfig().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = select(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + bbox = text.getBBox(); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; + if (node.width <= bbox.width + node.padding) { + node.diff = (bbox.width + node.padding * 0 - node.width) / 2; + } else { + node.diff = -node.padding / 2; + } + rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); + innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); + label.attr( + "transform", + "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2 - node.padding / 3 + (evaluate(getConfig().flowchart.htmlLabels) ? 5 : 3)) + ")" + ); + const rectBox = rect2.node().getBBox(); + node.height = rectBox.height; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const divider = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.diff = -node.padding / 2; + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +}; +const shapes = { rect, roundedWithTitle, noteGroup, divider }; +let clusterElems = {}; +const insertCluster = (elem, node) => { + log.trace("Inserting cluster"); + const shape = node.shape || "rect"; + clusterElems[node.id] = shapes[shape](elem, node); +}; +const clear = () => { + clusterElems = {}; +}; +const recursiveRender = async (_elem, graph, diagramtype, id, parentCluster) => { + log.info("Graph in recursive render: XXX", graphlibJson.write(graph), parentCluster); + const dir = graph.graph().rankdir; + log.trace("Dir in recursive render - dir:", dir); + const elem = _elem.insert("g").attr("class", "root"); + if (!graph.nodes()) { + log.info("No nodes found for", graph); + } else { + log.info("Recursive render XXX", graph.nodes()); + } + if (graph.edges().length > 0) { + log.trace("Recursive edges", graph.edge(graph.edges()[0])); + } + const clusters = elem.insert("g").attr("class", "clusters"); + const edgePaths = elem.insert("g").attr("class", "edgePaths"); + const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); + const nodes = elem.insert("g").attr("class", "nodes"); + await Promise.all( + graph.nodes().map(async function(v) { + const node = graph.node(v); + if (parentCluster !== void 0) { + const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); + log.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); + graph.setNode(parentCluster.id, data); + if (!graph.parent(v)) { + log.trace("Setting parent", v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } + log.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); + if (node && node.clusterNode) { + log.info("Cluster identified", v, node.width, graph.node(v)); + const o = await recursiveRender(nodes, node.graph, diagramtype, id, graph.node(v)); + const newEl = o.elem; + updateNodeBounds(node, newEl); + node.diff = o.diff || 0; + log.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); + setNodeElem(newEl, node); + log.warn("Recursive render complete ", newEl, node); + } else { + if (graph.children(v).length > 0) { + log.info("Cluster - the non recursive path XXX", v, node.id, node, graph); + log.info(findNonClusterChild(node.id, graph)); + clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; + } else { + log.info("Node - the non recursive path", v, node.id, node); + await insertNode(nodes, graph.node(v), dir); + } + } + }) + ); + graph.edges().forEach(function(e) { + const edge = graph.edge(e.v, e.w, e.name); + log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + log.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); + log.info("Fix", clusterDb, "ids:", e.v, e.w, "Translateing: ", clusterDb[e.v], clusterDb[e.w]); + insertEdgeLabel(edgeLabels, edge); + }); + graph.edges().forEach(function(e) { + log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + }); + log.info("#############################################"); + log.info("### Layout ###"); + log.info("#############################################"); + log.info(graph); + layout(graph); + log.info("Graph after layout:", graphlibJson.write(graph)); + let diff = 0; + sortNodesByHierarchy(graph).forEach(function(v) { + const node = graph.node(v); + log.info("Position " + v + ": " + JSON.stringify(graph.node(v))); + log.info( + "Position " + v + ": (" + node.x, + "," + node.y, + ") width: ", + node.width, + " height: ", + node.height + ); + if (node && node.clusterNode) { + positionNode(node); + } else { + if (graph.children(v).length > 0) { + insertCluster(clusters, node); + clusterDb[node.id].node = node; + } else { + positionNode(node); + } + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); + const paths = insertEdge(edgePaths, e, edge, clusterDb, diagramtype, graph, id); + positionEdgeLabel(edge, paths); + }); + graph.nodes().forEach(function(v) { + const n = graph.node(v); + log.info(v, n.type, n.diff); + if (n.type === "group") { + diff = n.diff; + } + }); + return { elem, diff }; +}; +const render = async (elem, graph, markers, diagramtype, id) => { + insertMarkers(elem, markers, diagramtype, id); + clear$2(); + clear$3(); + clear(); + clear$1(); + log.warn("Graph at first:", JSON.stringify(graphlibJson.write(graph))); + adjustClustersAndEdges(graph); + log.warn("Graph after:", JSON.stringify(graphlibJson.write(graph))); + await recursiveRender(elem, graph, diagramtype, id); +}; +export { + render as r +}; diff --git a/webroot/js/node_modules/mermaid/dist/infoDiagram-121d662e.js b/webroot/js/node_modules/mermaid/dist/infoDiagram-121d662e.js new file mode 100644 index 0000000..e49cede --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/infoDiagram-121d662e.js @@ -0,0 +1,319 @@ +import { l as Y, V as D, k as M } from "./mermaid-e4a58915.js"; +var O = function() { + var a = function(u, t, e, n) { + for (e = e || {}, n = u.length; n--; e[u[n]] = t) + ; + return e; + }, f = [6, 9, 10], m = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, info: 4, document: 5, EOF: 6, line: 7, statement: 8, NL: 9, showInfo: 10, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]], + performAction: function(t, e, n, s, r, i, d) { + switch (i.length - 1, r) { + case 1: + return s; + case 4: + break; + case 6: + s.setInfo(!0); + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, a(f, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, a(f, [2, 3]), a(f, [2, 4]), a(f, [2, 5]), a(f, [2, 6])], + defaultActions: { 4: [2, 1] }, + parseError: function(t, e) { + if (e.recoverable) + this.trace(t); + else { + var n = new Error(t); + throw n.hash = e, n; + } + }, + parse: function(t) { + var e = this, n = [0], s = [], r = [null], i = [], d = this.table, $ = "", v = 0, L = 0, N = 2, T = 1, R = i.slice.call(arguments, 1), o = Object.create(this.lexer), p = { yy: {} }; + for (var E in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, E) && (p.yy[E] = this.yy[E]); + o.setInput(t, p.yy), p.yy.lexer = o, p.yy.parser = this, typeof o.yylloc > "u" && (o.yylloc = {}); + var I = o.yylloc; + i.push(I); + var z = o.options && o.options.ranges; + typeof p.yy.parseError == "function" ? this.parseError = p.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function U() { + var y; + return y = s.pop() || o.lex() || T, typeof y != "number" && (y instanceof Array && (s = y, y = s.pop()), y = e.symbols_[y] || y), y; + } + for (var l, g, h, w, _ = {}, b, c, F, S; ; ) { + if (g = n[n.length - 1], this.defaultActions[g] ? h = this.defaultActions[g] : ((l === null || typeof l > "u") && (l = U()), h = d[g] && d[g][l]), typeof h > "u" || !h.length || !h[0]) { + var A = ""; + S = []; + for (b in d[g]) + this.terminals_[b] && b > N && S.push("'" + this.terminals_[b] + "'"); + o.showPosition ? A = "Parse error on line " + (v + 1) + `: +` + o.showPosition() + ` +Expecting ` + S.join(", ") + ", got '" + (this.terminals_[l] || l) + "'" : A = "Parse error on line " + (v + 1) + ": Unexpected " + (l == T ? "end of input" : "'" + (this.terminals_[l] || l) + "'"), this.parseError(A, { + text: o.match, + token: this.terminals_[l] || l, + line: o.yylineno, + loc: I, + expected: S + }); + } + if (h[0] instanceof Array && h.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + g + ", token: " + l); + switch (h[0]) { + case 1: + n.push(l), r.push(o.yytext), i.push(o.yylloc), n.push(h[1]), l = null, L = o.yyleng, $ = o.yytext, v = o.yylineno, I = o.yylloc; + break; + case 2: + if (c = this.productions_[h[1]][1], _.$ = r[r.length - c], _._$ = { + first_line: i[i.length - (c || 1)].first_line, + last_line: i[i.length - 1].last_line, + first_column: i[i.length - (c || 1)].first_column, + last_column: i[i.length - 1].last_column + }, z && (_._$.range = [ + i[i.length - (c || 1)].range[0], + i[i.length - 1].range[1] + ]), w = this.performAction.apply(_, [ + $, + L, + v, + p.yy, + h[1], + r, + i + ].concat(R)), typeof w < "u") + return w; + c && (n = n.slice(0, -1 * c * 2), r = r.slice(0, -1 * c), i = i.slice(0, -1 * c)), n.push(this.productions_[h[1]][0]), r.push(_.$), i.push(_._$), F = d[n[n.length - 2]][n[n.length - 1]], n.push(F); + break; + case 3: + return !0; + } + } + return !0; + } + }, k = function() { + var u = { + EOF: 1, + parseError: function(e, n) { + if (this.yy.parser) + this.yy.parser.parseError(e, n); + else + throw new Error(e); + }, + // resets the lexer, sets new input + setInput: function(t, e) { + return this.yy = e || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var t = this._input[0]; + this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t; + var e = t.match(/(?:\r\n?|\n).*/g); + return e ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t; + }, + // unshifts one char (or a string) into the input + unput: function(t) { + var e = t.length, n = t.split(/(?:\r\n?|\n)/g); + this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - e), this.offset -= e; + var s = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1); + var r = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: n ? (n.length === s.length ? this.yylloc.first_column : 0) + s[s.length - n.length].length - n[0].length : this.yylloc.first_column - e + }, this.options.ranges && (this.yylloc.range = [r[0], r[0] + this.yyleng - e]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(t) { + this.unput(this.match.slice(t)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var t = this.matched.substr(0, this.matched.length - this.match.length); + return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var t = this.match; + return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var t = this.pastInput(), e = new Array(t.length + 1).join("-"); + return t + this.upcomingInput() + ` +` + e + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(t, e) { + var n, s, r; + if (this.options.backtrack_lexer && (r = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (r.yylloc.range = this.yylloc.range.slice(0))), s = t[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length + }, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, e, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) + return n; + if (this._backtrack) { + for (var i in r) + this[i] = r[i]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var t, e, n, s; + this._more || (this.yytext = "", this.match = ""); + for (var r = this._currentRules(), i = 0; i < r.length; i++) + if (n = this._input.match(this.rules[r[i]]), n && (!e || n[0].length > e[0].length)) { + if (e = n, s = i, this.options.backtrack_lexer) { + if (t = this.test_match(n, r[i]), t !== !1) + return t; + if (this._backtrack) { + e = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return e ? (t = this.test_match(e, r[s]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var e = this.next(); + return e || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(e) { + this.conditionStack.push(e); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var e = this.conditionStack.length - 1; + return e > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(e) { + return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(e) { + this.begin(e); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(e, n, s, r) { + switch (s) { + case 0: + return 4; + case 1: + return 9; + case 2: + return "space"; + case 3: + return 10; + case 4: + return 6; + case 5: + return "TXT"; + } + }, + rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5], inclusive: !0 } } + }; + return u; + }(); + m.lexer = k; + function x() { + this.yy = {}; + } + return x.prototype = m, m.Parser = x, new x(); +}(); +O.parser = O; +const V = O, j = { + info: !1 +}; +let P = j.info; +const B = (a) => { + P = a; +}, X = () => P, q = () => { + P = j.info; +}, C = { + clear: q, + setInfo: B, + getInfo: X +}, G = (a, f, m) => { + Y.debug(`rendering info diagram +` + a); + const k = D(f); + M(k, 100, 400, !0), k.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${m}`); +}, H = { draw: G }, K = { + parser: V, + db: C, + renderer: H +}; +export { + K as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/infoDiagram-2064d999.js b/webroot/js/node_modules/mermaid/dist/infoDiagram-2064d999.js new file mode 100644 index 0000000..5582d29 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/infoDiagram-2064d999.js @@ -0,0 +1,520 @@ +import { l as log, A as selectSvgElement, i as configureSvgSize } from "./mermaid-0d192ec3.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "d3"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 9, 10]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "info": 4, "document": 5, "EOF": 6, "line": 7, "statement": 8, "NL": 9, "showInfo": 10, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + $$.length - 1; + switch (yystate) { + case 1: + return yy; + case 4: + break; + case 6: + yy.setInfo(true); + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6])], + defaultActions: { 4: [2, 1] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 4; + case 1: + return 9; + case 2: + return "space"; + case 3: + return 10; + case 4: + return 6; + case 5: + return "TXT"; + } + }, + rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_INFO_DB = { + info: false +}; +let info = DEFAULT_INFO_DB.info; +const setInfo = (toggle) => { + info = toggle; +}; +const getInfo = () => info; +const clear = () => { + info = DEFAULT_INFO_DB.info; +}; +const db = { + clear, + setInfo, + getInfo +}; +const draw = (text, id, version) => { + log.debug("rendering info diagram\n" + text); + const svg = selectSvgElement(id); + configureSvgSize(svg, 100, 400, true); + const group = svg.append("g"); + group.append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${version}`); +}; +const renderer = { draw }; +const diagram = { + parser: parser$1, + db, + renderer +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/infoDiagram-9585b70e.js b/webroot/js/node_modules/mermaid/dist/infoDiagram-9585b70e.js new file mode 100644 index 0000000..b4c7b24 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/infoDiagram-9585b70e.js @@ -0,0 +1,510 @@ +import { l as log, V as selectSvgElement, k as configureSvgSize } from "./mermaid-491db2d9.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 9, 10]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "info": 4, "document": 5, "EOF": 6, "line": 7, "statement": 8, "NL": 9, "showInfo": 10, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + $$.length - 1; + switch (yystate) { + case 1: + return yy; + case 4: + break; + case 6: + yy.setInfo(true); + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6])], + defaultActions: { 4: [2, 1] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 4; + case 1: + return 9; + case 2: + return "space"; + case 3: + return 10; + case 4: + return 6; + case 5: + return "TXT"; + } + }, + rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_INFO_DB = { + info: false +}; +let info = DEFAULT_INFO_DB.info; +const setInfo = (toggle) => { + info = toggle; +}; +const getInfo = () => info; +const clear = () => { + info = DEFAULT_INFO_DB.info; +}; +const db = { + clear, + setInfo, + getInfo +}; +const draw = (text, id, version) => { + log.debug("rendering info diagram\n" + text); + const svg = selectSvgElement(id); + configureSvgSize(svg, 100, 400, true); + const group = svg.append("g"); + group.append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${version}`); +}; +const renderer = { draw }; +const diagram = { + parser: parser$1, + db, + renderer +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/init-cc95ec8e.js b/webroot/js/node_modules/mermaid/dist/init-cc95ec8e.js new file mode 100644 index 0000000..dde6dc8 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/init-cc95ec8e.js @@ -0,0 +1,16 @@ +function initRange(domain, range) { + switch (arguments.length) { + case 0: + break; + case 1: + this.range(domain); + break; + default: + this.range(range).domain(domain); + break; + } + return this; +} +export { + initRange as i +}; diff --git a/webroot/js/node_modules/mermaid/dist/init-f9637058.js b/webroot/js/node_modules/mermaid/dist/init-f9637058.js new file mode 100644 index 0000000..8230841 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/init-f9637058.js @@ -0,0 +1,16 @@ +function t(e, a) { + switch (arguments.length) { + case 0: + break; + case 1: + this.range(e); + break; + default: + this.range(a).domain(e); + break; + } + return this; +} +export { + t as i +}; diff --git a/webroot/js/node_modules/mermaid/dist/interactionDb.d.ts b/webroot/js/node_modules/mermaid/dist/interactionDb.d.ts new file mode 100644 index 0000000..aad64b1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/interactionDb.d.ts @@ -0,0 +1,2 @@ +export declare const addFunction: (func: () => void) => void; +export declare const attachFunctions: () => void; diff --git a/webroot/js/node_modules/mermaid/dist/journeyDiagram-6df70039.js b/webroot/js/node_modules/mermaid/dist/journeyDiagram-6df70039.js new file mode 100644 index 0000000..8ca8282 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/journeyDiagram-6df70039.js @@ -0,0 +1,1191 @@ +import { c as getConfig, q as setDiagramTitle, r as getDiagramTitle, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, t as clear$1, i as configureSvgSize } from "./mermaid-0d192ec3.js"; +import { arc, select } from "d3"; +import { d as drawRect$1, f as drawText$1, a as drawBackgroundRect$1, g as getNoteRect } from "./svgDrawCommon-057d45d0.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 13: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 18; + case 16: + return 19; + case 17: + return ":"; + case 18: + return 6; + case 19: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +const sections = []; +const tasks = []; +const rawTasks = []; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + clear$1(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const updateActors = function() { + const tempActors = []; + tasks.forEach((task) => { + if (task.people) { + tempActors.push(...task.people); + } + }); + const unique = new Set(tempActors); + return [...unique].sort(); +}; +const addTask = function(descr, taskData) { + const pieces = taskData.substr(1).split(":"); + let score = 0; + let peeps = []; + if (pieces.length === 1) { + score = Number(pieces[0]); + peeps = []; + } else { + score = Number(pieces[0]); + peeps = pieces[1].split(","); + } + const peopleList = peeps.map((s) => s.trim()); + const rawTask = { + section: currentSection, + type: currentSection, + people: peopleList, + task: descr, + score + }; + rawTasks.push(rawTask); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const getActors = function() { + return updateActors(); +}; +const db = { + getConfig: () => getConfig().journey, + clear, + setDiagramTitle, + getDiagramTitle, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + getActors +}; +const getStyles = (options) => `.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${options.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${options.textColor} + } + + .legend { + fill: ${options.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${options.textColor} + } + + .face { + ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${options.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${options.fillType0 ? `fill: ${options.fillType0}` : ""}; + } + .task-type-1, .section-type-1 { + ${options.fillType0 ? `fill: ${options.fillType1}` : ""}; + } + .task-type-2, .section-type-2 { + ${options.fillType0 ? `fill: ${options.fillType2}` : ""}; + } + .task-type-3, .section-type-3 { + ${options.fillType0 ? `fill: ${options.fillType3}` : ""}; + } + .task-type-4, .section-type-4 { + ${options.fillType0 ? `fill: ${options.fillType4}` : ""}; + } + .task-type-5, .section-type-5 { + ${options.fillType0 ? `fill: ${options.fillType5}` : ""}; + } + .task-type-6, .section-type-6 { + ${options.fillType0 ? `fill: ${options.fillType6}` : ""}; + } + .task-type-7, .section-type-7 { + ${options.fillType0 ? `fill: ${options.fillType7}` : ""}; + } + + .actor-0 { + ${options.actor0 ? `fill: ${options.actor0}` : ""}; + } + .actor-1 { + ${options.actor1 ? `fill: ${options.actor1}` : ""}; + } + .actor-2 { + ${options.actor2 ? `fill: ${options.actor2}` : ""}; + } + .actor-3 { + ${options.actor3 ? `fill: ${options.actor3}` : ""}; + } + .actor-4 { + ${options.actor4 ? `fill: ${options.actor4}` : ""}; + } + .actor-5 { + ${options.actor5 ? `fill: ${options.actor5}` : ""}; + } +`; +const styles = getStyles; +const drawRect = function(elem, rectData) { + return drawRect$1(elem, rectData); +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc$1 = arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc$1 = arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + return drawText$1(elem, textData); +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf2) { + const g = elem.append("g"); + const rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf2.width * section.taskCount + // width of the tasks + conf2.diagramMarginX * (section.taskCount - 1); + rect.height = conf2.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf2)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf2) { + const center = task.x + conf2.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf2.width; + rect.height = conf2.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + let xPos = task.x + 14; + task.people.forEach((person) => { + const colour = task.actors[person].color; + const circle = { + cx: xPos, + cy: task.y, + r: 7, + fill: colour, + stroke: "#000", + title: person, + pos: task.actors[person].position + }; + drawCircle(g, circle); + xPos += 10; + }); + _drawTextCandidateFunc(conf2)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf2, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds2) { + drawBackgroundRect$1(elem, bounds2); +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) { + const { taskFontSize, taskFontFamily } = conf2; + const lines = content.split(//gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + initGraphics +}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + keys.forEach(function(key) { + conf[key] = cnf[key]; + }); +}; +const actors = {}; +function drawActorLegend(diagram2) { + const conf2 = getConfig().journey; + let yPos = 60; + Object.keys(actors).forEach((person) => { + const colour = actors[person].color; + const circleData = { + cx: 20, + cy: yPos, + r: 7, + fill: colour, + stroke: "#000", + pos: actors[person].position + }; + svgDraw.drawCircle(diagram2, circleData); + const labelData = { + x: 40, + y: yPos + 7, + fill: "#666", + text: person, + textMargin: conf2.boxTextMargin | 5 + }; + svgDraw.drawText(diagram2, labelData); + yPos += 20; + }); +} +const conf = getConfig().journey; +const LEFT_MARGIN = conf.leftMargin; +const draw = function(text, id, version, diagObj) { + const conf2 = getConfig().journey; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + bounds.init(); + const diagram2 = root.select("#" + id); + svgDraw.initGraphics(diagram2); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getDiagramTitle(); + const actorNames = diagObj.db.getActors(); + for (const member in actors) { + delete actors[member]; + } + let actorPos = 0; + actorNames.forEach((actorName) => { + actors[actorName] = { + color: conf2.actorColours[actorPos % conf2.actorColours.length], + position: actorPos + }; + actorPos++; + }); + drawActorLegend(diagram2); + bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50); + drawTasks(diagram2, tasks2, 0); + const box = bounds.getBounds(); + if (title) { + diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25); + } + const height = box.stopy - box.starty + 2 * conf2.diagramMarginY; + const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX; + configureSvgSize(diagram2, height, width, conf2.useMaxWidth); + diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + const extraVertForTitle = title ? 70 : 0; + diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`); + diagram2.attr("preserveAspectRatio", "xMinYMin meet"); + diagram2.attr("height", height + extraVertForTitle + 25); +}; +const bounds = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + init: function() { + this.sequenceItems = []; + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const conf2 = getConfig().journey; + const _self = this; + let cnt = 0; + function updateFn(type) { + return function updateItemBounds(item) { + cnt++; + const n = _self.sequenceItems.length - cnt + 1; + _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max); + if (!(type === "activation")) { + _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = Math.min(startx, stopx); + const _stopx = Math.max(startx, stopx); + const _starty = Math.min(starty, stopy); + const _stopy = Math.max(starty, stopy); + this.updateVal(bounds.data, "startx", _startx, Math.min); + this.updateVal(bounds.data, "starty", _starty, Math.min); + this.updateVal(bounds.data, "stopx", _stopx, Math.max); + this.updateVal(bounds.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = this.verticalPos; + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return this.data; + } +}; +const fills = conf.sectionFills; +const textColours = conf.sectionColours; +const drawTasks = function(diagram2, tasks2, verticalPos) { + const conf2 = getConfig().journey; + let lastSection = ""; + const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY; + const taskPos = verticalPos + sectionVHeight; + let sectionNumber = 0; + let fill = "#CCC"; + let colour = "black"; + let num = 0; + for (const [i, task] of tasks2.entries()) { + if (lastSection !== task.section) { + fill = fills[sectionNumber % fills.length]; + num = sectionNumber % fills.length; + colour = textColours[sectionNumber % textColours.length]; + let taskInSectionCount = 0; + const currentSection2 = task.section; + for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) { + if (tasks2[taskIndex].section == currentSection2) { + taskInSectionCount = taskInSectionCount + 1; + } else { + break; + } + } + const section = { + x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN, + y: 50, + text: task.section, + fill, + num, + colour, + taskCount: taskInSectionCount + }; + svgDraw.drawSection(diagram2, section, conf2); + lastSection = task.section; + sectionNumber++; + } + const taskActors = task.people.reduce((acc, actorName) => { + if (actors[actorName]) { + acc[actorName] = actors[actorName]; + } + return acc; + }, {}); + task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN; + task.y = taskPos; + task.width = conf2.diagramMarginX; + task.height = conf2.diagramMarginY; + task.colour = colour; + task.fill = fill; + task.num = num; + task.actors = taskActors; + svgDraw.drawTask(diagram2, task, conf2); + bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30); + } +}; +const renderer = { + setConf, + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: (cnf) => { + renderer.setConf(cnf.journey); + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/journeyDiagram-7dbbd928.js b/webroot/js/node_modules/mermaid/dist/journeyDiagram-7dbbd928.js new file mode 100644 index 0000000..e6a075f --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/journeyDiagram-7dbbd928.js @@ -0,0 +1,1183 @@ +import { c as getConfig, B as setDiagramTitle, D as getDiagramTitle, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, E as clear$1, j as d3select, k as configureSvgSize } from "./mermaid-491db2d9.js"; +import { d as drawRect$1, f as drawText$1, a as drawBackgroundRect$1, g as getNoteRect } from "./svgDrawCommon-6f1271c3.js"; +import { d as d3arc } from "./arc-947d8396.js"; +import "./constant-b644328d.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 13: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 18; + case 16: + return 19; + case 17: + return ":"; + case 18: + return 6; + case 19: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +const sections = []; +const tasks = []; +const rawTasks = []; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + clear$1(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const updateActors = function() { + const tempActors = []; + tasks.forEach((task) => { + if (task.people) { + tempActors.push(...task.people); + } + }); + const unique = new Set(tempActors); + return [...unique].sort(); +}; +const addTask = function(descr, taskData) { + const pieces = taskData.substr(1).split(":"); + let score = 0; + let peeps = []; + if (pieces.length === 1) { + score = Number(pieces[0]); + peeps = []; + } else { + score = Number(pieces[0]); + peeps = pieces[1].split(","); + } + const peopleList = peeps.map((s) => s.trim()); + const rawTask = { + section: currentSection, + type: currentSection, + people: peopleList, + task: descr, + score + }; + rawTasks.push(rawTask); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const getActors = function() { + return updateActors(); +}; +const db = { + getConfig: () => getConfig().journey, + clear, + setDiagramTitle, + getDiagramTitle, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + getActors +}; +const getStyles = (options) => `.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${options.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${options.textColor} + } + + .legend { + fill: ${options.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${options.textColor} + } + + .face { + ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${options.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${options.fillType0 ? `fill: ${options.fillType0}` : ""}; + } + .task-type-1, .section-type-1 { + ${options.fillType0 ? `fill: ${options.fillType1}` : ""}; + } + .task-type-2, .section-type-2 { + ${options.fillType0 ? `fill: ${options.fillType2}` : ""}; + } + .task-type-3, .section-type-3 { + ${options.fillType0 ? `fill: ${options.fillType3}` : ""}; + } + .task-type-4, .section-type-4 { + ${options.fillType0 ? `fill: ${options.fillType4}` : ""}; + } + .task-type-5, .section-type-5 { + ${options.fillType0 ? `fill: ${options.fillType5}` : ""}; + } + .task-type-6, .section-type-6 { + ${options.fillType0 ? `fill: ${options.fillType6}` : ""}; + } + .task-type-7, .section-type-7 { + ${options.fillType0 ? `fill: ${options.fillType7}` : ""}; + } + + .actor-0 { + ${options.actor0 ? `fill: ${options.actor0}` : ""}; + } + .actor-1 { + ${options.actor1 ? `fill: ${options.actor1}` : ""}; + } + .actor-2 { + ${options.actor2 ? `fill: ${options.actor2}` : ""}; + } + .actor-3 { + ${options.actor3 ? `fill: ${options.actor3}` : ""}; + } + .actor-4 { + ${options.actor4 ? `fill: ${options.actor4}` : ""}; + } + .actor-5 { + ${options.actor5 ? `fill: ${options.actor5}` : ""}; + } +`; +const styles = getStyles; +const drawRect = function(elem, rectData) { + return drawRect$1(elem, rectData); +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc = d3arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc = d3arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + return drawText$1(elem, textData); +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf2) { + const g = elem.append("g"); + const rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf2.width * section.taskCount + // width of the tasks + conf2.diagramMarginX * (section.taskCount - 1); + rect.height = conf2.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf2)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf2) { + const center = task.x + conf2.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf2.width; + rect.height = conf2.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + let xPos = task.x + 14; + task.people.forEach((person) => { + const colour = task.actors[person].color; + const circle = { + cx: xPos, + cy: task.y, + r: 7, + fill: colour, + stroke: "#000", + title: person, + pos: task.actors[person].position + }; + drawCircle(g, circle); + xPos += 10; + }); + _drawTextCandidateFunc(conf2)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf2, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds2) { + drawBackgroundRect$1(elem, bounds2); +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) { + const { taskFontSize, taskFontFamily } = conf2; + const lines = content.split(//gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + initGraphics +}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + keys.forEach(function(key) { + conf[key] = cnf[key]; + }); +}; +const actors = {}; +function drawActorLegend(diagram2) { + const conf2 = getConfig().journey; + let yPos = 60; + Object.keys(actors).forEach((person) => { + const colour = actors[person].color; + const circleData = { + cx: 20, + cy: yPos, + r: 7, + fill: colour, + stroke: "#000", + pos: actors[person].position + }; + svgDraw.drawCircle(diagram2, circleData); + const labelData = { + x: 40, + y: yPos + 7, + fill: "#666", + text: person, + textMargin: conf2.boxTextMargin | 5 + }; + svgDraw.drawText(diagram2, labelData); + yPos += 20; + }); +} +const conf = getConfig().journey; +const LEFT_MARGIN = conf.leftMargin; +const draw = function(text, id, version, diagObj) { + const conf2 = getConfig().journey; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + bounds.init(); + const diagram2 = root.select("#" + id); + svgDraw.initGraphics(diagram2); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getDiagramTitle(); + const actorNames = diagObj.db.getActors(); + for (const member in actors) { + delete actors[member]; + } + let actorPos = 0; + actorNames.forEach((actorName) => { + actors[actorName] = { + color: conf2.actorColours[actorPos % conf2.actorColours.length], + position: actorPos + }; + actorPos++; + }); + drawActorLegend(diagram2); + bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50); + drawTasks(diagram2, tasks2, 0); + const box = bounds.getBounds(); + if (title) { + diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25); + } + const height = box.stopy - box.starty + 2 * conf2.diagramMarginY; + const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX; + configureSvgSize(diagram2, height, width, conf2.useMaxWidth); + diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + const extraVertForTitle = title ? 70 : 0; + diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`); + diagram2.attr("preserveAspectRatio", "xMinYMin meet"); + diagram2.attr("height", height + extraVertForTitle + 25); +}; +const bounds = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + init: function() { + this.sequenceItems = []; + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const conf2 = getConfig().journey; + const _self = this; + let cnt = 0; + function updateFn(type) { + return function updateItemBounds(item) { + cnt++; + const n = _self.sequenceItems.length - cnt + 1; + _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max); + if (!(type === "activation")) { + _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = Math.min(startx, stopx); + const _stopx = Math.max(startx, stopx); + const _starty = Math.min(starty, stopy); + const _stopy = Math.max(starty, stopy); + this.updateVal(bounds.data, "startx", _startx, Math.min); + this.updateVal(bounds.data, "starty", _starty, Math.min); + this.updateVal(bounds.data, "stopx", _stopx, Math.max); + this.updateVal(bounds.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = this.verticalPos; + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return this.data; + } +}; +const fills = conf.sectionFills; +const textColours = conf.sectionColours; +const drawTasks = function(diagram2, tasks2, verticalPos) { + const conf2 = getConfig().journey; + let lastSection = ""; + const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY; + const taskPos = verticalPos + sectionVHeight; + let sectionNumber = 0; + let fill = "#CCC"; + let colour = "black"; + let num = 0; + for (const [i, task] of tasks2.entries()) { + if (lastSection !== task.section) { + fill = fills[sectionNumber % fills.length]; + num = sectionNumber % fills.length; + colour = textColours[sectionNumber % textColours.length]; + let taskInSectionCount = 0; + const currentSection2 = task.section; + for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) { + if (tasks2[taskIndex].section == currentSection2) { + taskInSectionCount = taskInSectionCount + 1; + } else { + break; + } + } + const section = { + x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN, + y: 50, + text: task.section, + fill, + num, + colour, + taskCount: taskInSectionCount + }; + svgDraw.drawSection(diagram2, section, conf2); + lastSection = task.section; + sectionNumber++; + } + const taskActors = task.people.reduce((acc, actorName) => { + if (actors[actorName]) { + acc[actorName] = actors[actorName]; + } + return acc; + }, {}); + task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN; + task.y = taskPos; + task.width = conf2.diagramMarginX; + task.height = conf2.diagramMarginY; + task.colour = colour; + task.fill = fill; + task.num = num; + task.actors = taskActors; + svgDraw.drawTask(diagram2, task, conf2); + bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30); + } +}; +const renderer = { + setConf, + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: (cnf) => { + renderer.setConf(cnf.journey); + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/journeyDiagram-943d6037.js b/webroot/js/node_modules/mermaid/dist/journeyDiagram-943d6037.js new file mode 100644 index 0000000..c8d24da --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/journeyDiagram-943d6037.js @@ -0,0 +1,804 @@ +import { c as I, B as yt, D as dt, s as ft, g as pt, b as gt, a as mt, E as xt, j as W, k as kt } from "./mermaid-e4a58915.js"; +import { d as _t, f as bt, a as vt, g as it } from "./svgDrawCommon-1021982e.js"; +import { d as Q } from "./arc-dcf06dea.js"; +import "./constant-2fe7eae5.js"; +var G = function() { + var t = function(p, s, r, a) { + for (r = r || {}, a = p.length; a--; r[p[a]] = s) + ; + return r; + }, e = [6, 8, 10, 11, 12, 14, 16, 17, 18], i = [1, 9], o = [1, 10], n = [1, 11], h = [1, 12], c = [1, 13], d = [1, 14], y = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, taskName: 18, taskData: 19, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]], + performAction: function(s, r, a, u, f, l, w) { + var k = l.length - 1; + switch (f) { + case 1: + return l[k - 1]; + case 2: + this.$ = []; + break; + case 3: + l[k - 1].push(l[k]), this.$ = l[k - 1]; + break; + case 4: + case 5: + this.$ = l[k]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + u.setDiagramTitle(l[k].substr(6)), this.$ = l[k].substr(6); + break; + case 9: + this.$ = l[k].trim(), u.setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = l[k].trim(), u.setAccDescription(this.$); + break; + case 12: + u.addSection(l[k].substr(8)), this.$ = l[k].substr(8); + break; + case 13: + u.addTask(l[k - 1], l[k]), this.$ = "task"; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: i, 12: o, 14: n, 16: h, 17: c, 18: d }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: i, 12: o, 14: n, 16: h, 17: c, 18: d }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])], + defaultActions: {}, + parseError: function(s, r) { + if (r.recoverable) + this.trace(s); + else { + var a = new Error(s); + throw a.hash = r, a; + } + }, + parse: function(s) { + var r = this, a = [0], u = [], f = [null], l = [], w = this.table, k = "", R = 0, Z = 0, ot = 2, J = 1, ct = l.slice.call(arguments, 1), x = Object.create(this.lexer), S = { yy: {} }; + for (var z in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, z) && (S.yy[z] = this.yy[z]); + x.setInput(s, S.yy), S.yy.lexer = x, S.yy.parser = this, typeof x.yylloc > "u" && (x.yylloc = {}); + var Y = x.yylloc; + l.push(Y); + var ht = x.options && x.options.ranges; + typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function ut() { + var $; + return $ = u.pop() || x.lex() || J, typeof $ != "number" && ($ instanceof Array && (u = $, $ = u.pop()), $ = r.symbols_[$] || $), $; + } + for (var _, E, b, O, A = {}, N, T, K, B; ; ) { + if (E = a[a.length - 1], this.defaultActions[E] ? b = this.defaultActions[E] : ((_ === null || typeof _ > "u") && (_ = ut()), b = w[E] && w[E][_]), typeof b > "u" || !b.length || !b[0]) { + var q = ""; + B = []; + for (N in w[E]) + this.terminals_[N] && N > ot && B.push("'" + this.terminals_[N] + "'"); + x.showPosition ? q = "Parse error on line " + (R + 1) + `: +` + x.showPosition() + ` +Expecting ` + B.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : q = "Parse error on line " + (R + 1) + ": Unexpected " + (_ == J ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(q, { + text: x.match, + token: this.terminals_[_] || _, + line: x.yylineno, + loc: Y, + expected: B + }); + } + if (b[0] instanceof Array && b.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + E + ", token: " + _); + switch (b[0]) { + case 1: + a.push(_), f.push(x.yytext), l.push(x.yylloc), a.push(b[1]), _ = null, Z = x.yyleng, k = x.yytext, R = x.yylineno, Y = x.yylloc; + break; + case 2: + if (T = this.productions_[b[1]][1], A.$ = f[f.length - T], A._$ = { + first_line: l[l.length - (T || 1)].first_line, + last_line: l[l.length - 1].last_line, + first_column: l[l.length - (T || 1)].first_column, + last_column: l[l.length - 1].last_column + }, ht && (A._$.range = [ + l[l.length - (T || 1)].range[0], + l[l.length - 1].range[1] + ]), O = this.performAction.apply(A, [ + k, + Z, + R, + S.yy, + b[1], + f, + l + ].concat(ct)), typeof O < "u") + return O; + T && (a = a.slice(0, -1 * T * 2), f = f.slice(0, -1 * T), l = l.slice(0, -1 * T)), a.push(this.productions_[b[1]][0]), f.push(A.$), l.push(A._$), K = w[a[a.length - 2]][a[a.length - 1]], a.push(K); + break; + case 3: + return !0; + } + } + return !0; + } + }, m = function() { + var p = { + EOF: 1, + parseError: function(r, a) { + if (this.yy.parser) + this.yy.parser.parseError(r, a); + else + throw new Error(r); + }, + // resets the lexer, sets new input + setInput: function(s, r) { + return this.yy = r || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var s = this._input[0]; + this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s; + var r = s.match(/(?:\r\n?|\n).*/g); + return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s; + }, + // unshifts one char (or a string) into the input + unput: function(s) { + var r = s.length, a = s.split(/(?:\r\n?|\n)/g); + this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r; + var u = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1); + var f = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: a ? (a.length === u.length ? this.yylloc.first_column : 0) + u[u.length - a.length].length - a[0].length : this.yylloc.first_column - r + }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(s) { + this.unput(this.match.slice(s)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var s = this.matched.substr(0, this.matched.length - this.match.length); + return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var s = this.match; + return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var s = this.pastInput(), r = new Array(s.length + 1).join("-"); + return s + this.upcomingInput() + ` +` + r + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(s, r) { + var a, u, f; + if (this.options.backtrack_lexer && (f = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), u = s[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length + }, this.yytext += s[0], this.match += s[0], this.matches = s, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a) + return a; + if (this._backtrack) { + for (var l in f) + this[l] = f[l]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var s, r, a, u; + this._more || (this.yytext = "", this.match = ""); + for (var f = this._currentRules(), l = 0; l < f.length; l++) + if (a = this._input.match(this.rules[f[l]]), a && (!r || a[0].length > r[0].length)) { + if (r = a, u = l, this.options.backtrack_lexer) { + if (s = this.test_match(a, f[l]), s !== !1) + return s; + if (this._backtrack) { + r = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return r ? (s = this.test_match(r, f[u]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var r = this.next(); + return r || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(r) { + this.conditionStack.push(r); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var r = this.conditionStack.length - 1; + return r > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(r) { + return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(r) { + this.begin(r); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(r, a, u, f) { + switch (u) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + return this.begin("acc_title"), 12; + case 8: + return this.popState(), "acc_title_value"; + case 9: + return this.begin("acc_descr"), 14; + case 10: + return this.popState(), "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 18; + case 16: + return 19; + case 17: + return ":"; + case 18: + return 6; + case 19: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], inclusive: !0 } } + }; + return p; + }(); + y.lexer = m; + function g() { + this.yy = {}; + } + return g.prototype = y, y.Parser = g, new g(); +}(); +G.parser = G; +const wt = G; +let C = ""; +const H = [], V = [], F = [], Tt = function() { + H.length = 0, V.length = 0, C = "", F.length = 0, xt(); +}, $t = function(t) { + C = t, H.push(t); +}, Mt = function() { + return H; +}, St = function() { + let t = D(); + const e = 100; + let i = 0; + for (; !t && i < e; ) + t = D(), i++; + return V.push(...F), V; +}, Et = function() { + const t = []; + return V.forEach((i) => { + i.people && t.push(...i.people); + }), [...new Set(t)].sort(); +}, Pt = function(t, e) { + const i = e.substr(1).split(":"); + let o = 0, n = []; + i.length === 1 ? (o = Number(i[0]), n = []) : (o = Number(i[0]), n = i[1].split(",")); + const h = n.map((d) => d.trim()), c = { + section: C, + type: C, + people: h, + task: t, + score: o + }; + F.push(c); +}, It = function(t) { + const e = { + section: C, + type: C, + description: t, + task: t, + classes: [] + }; + V.push(e); +}, D = function() { + const t = function(i) { + return F[i].processed; + }; + let e = !0; + for (const [i, o] of F.entries()) + t(i), e = e && o.processed; + return e; +}, At = function() { + return Et(); +}, tt = { + getConfig: () => I().journey, + clear: Tt, + setDiagramTitle: yt, + getDiagramTitle: dt, + setAccTitle: ft, + getAccTitle: pt, + setAccDescription: gt, + getAccDescription: mt, + addSection: $t, + getSections: Mt, + getTasks: St, + addTask: Pt, + addTaskOrg: It, + getActors: At +}, Ct = (t) => `.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0 ? `fill: ${t.fillType0}` : ""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0 ? `fill: ${t.fillType1}` : ""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0 ? `fill: ${t.fillType2}` : ""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0 ? `fill: ${t.fillType3}` : ""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0 ? `fill: ${t.fillType4}` : ""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0 ? `fill: ${t.fillType5}` : ""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0 ? `fill: ${t.fillType6}` : ""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0 ? `fill: ${t.fillType7}` : ""}; + } + + .actor-0 { + ${t.actor0 ? `fill: ${t.actor0}` : ""}; + } + .actor-1 { + ${t.actor1 ? `fill: ${t.actor1}` : ""}; + } + .actor-2 { + ${t.actor2 ? `fill: ${t.actor2}` : ""}; + } + .actor-3 { + ${t.actor3 ? `fill: ${t.actor3}` : ""}; + } + .actor-4 { + ${t.actor4 ? `fill: ${t.actor4}` : ""}; + } + .actor-5 { + ${t.actor5 ? `fill: ${t.actor5}` : ""}; + } +`, Vt = Ct, U = function(t, e) { + return _t(t, e); +}, Ft = function(t, e) { + const o = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), n = t.append("g"); + n.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), n.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function h(y) { + const m = Q().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175); + y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")"); + } + function c(y) { + const m = Q().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175); + y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")"); + } + function d(y) { + y.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + return e.score > 3 ? h(n) : e.score < 3 ? c(n) : d(n), o; +}, rt = function(t, e) { + const i = t.append("circle"); + return i.attr("cx", e.cx), i.attr("cy", e.cy), i.attr("class", "actor-" + e.pos), i.attr("fill", e.fill), i.attr("stroke", e.stroke), i.attr("r", e.r), i.class !== void 0 && i.attr("class", i.class), e.title !== void 0 && i.append("title").text(e.title), i; +}, at = function(t, e) { + return bt(t, e); +}, Lt = function(t, e) { + function i(n, h, c, d, y) { + return n + "," + h + " " + (n + c) + "," + h + " " + (n + c) + "," + (h + d - y) + " " + (n + c - y * 1.2) + "," + (h + d) + " " + n + "," + (h + d); + } + const o = t.append("polygon"); + o.attr("points", i(e.x, e.y, 50, 20, 7)), o.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, at(t, e); +}, Rt = function(t, e, i) { + const o = t.append("g"), n = it(); + n.x = e.x, n.y = e.y, n.fill = e.fill, n.width = i.width * e.taskCount + // width of the tasks + i.diagramMarginX * (e.taskCount - 1), n.height = i.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3, U(o, n), lt(i)( + e.text, + o, + n.x, + n.y, + n.width, + n.height, + { class: "journey-section section-type-" + e.num }, + i, + e.colour + ); +}; +let et = -1; +const Nt = function(t, e, i) { + const o = e.x + i.width / 2, n = t.append("g"); + et++; + const h = 300 + 5 * 30; + n.append("line").attr("id", "task" + et).attr("x1", o).attr("y1", e.y).attr("x2", o).attr("y2", h).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Ft(n, { + cx: o, + cy: 300 + (5 - e.score) * 30, + score: e.score + }); + const c = it(); + c.x = e.x, c.y = e.y, c.fill = e.fill, c.width = i.width, c.height = i.height, c.class = "task task-type-" + e.num, c.rx = 3, c.ry = 3, U(n, c); + let d = e.x + 14; + e.people.forEach((y) => { + const m = e.actors[y].color, g = { + cx: d, + cy: e.y, + r: 7, + fill: m, + stroke: "#000", + title: y, + pos: e.actors[y].position + }; + rt(n, g), d += 10; + }), lt(i)( + e.task, + n, + c.x, + c.y, + c.width, + c.height, + { class: "task" }, + i, + e.colour + ); +}, Bt = function(t, e) { + vt(t, e); +}, lt = function() { + function t(n, h, c, d, y, m, g, p) { + const s = h.append("text").attr("x", c + y / 2).attr("y", d + m / 2 + 5).style("font-color", p).style("text-anchor", "middle").text(n); + o(s, g); + } + function e(n, h, c, d, y, m, g, p, s) { + const { taskFontSize: r, taskFontFamily: a } = p, u = n.split(//gi); + for (let f = 0; f < u.length; f++) { + const l = f * r - r * (u.length - 1) / 2, w = h.append("text").attr("x", c + y / 2).attr("y", d).attr("fill", s).style("text-anchor", "middle").style("font-size", r).style("font-family", a); + w.append("tspan").attr("x", c + y / 2).attr("dy", l).text(u[f]), w.attr("y", d + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), o(w, g); + } + } + function i(n, h, c, d, y, m, g, p) { + const s = h.append("switch"), a = s.append("foreignObject").attr("x", c).attr("y", d).attr("width", y).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, s, c, d, y, m, g, p), o(a, g); + } + function o(n, h) { + for (const c in h) + c in h && n.attr(c, h[c]); + } + return function(n) { + return n.textPlacement === "fo" ? i : n.textPlacement === "old" ? t : e; + }; +}(), jt = function(t) { + t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}, L = { + drawRect: U, + drawCircle: rt, + drawSection: Rt, + drawText: at, + drawLabel: Lt, + drawTask: Nt, + drawBackgroundRect: Bt, + initGraphics: jt +}, zt = function(t) { + Object.keys(t).forEach(function(i) { + j[i] = t[i]; + }); +}, M = {}; +function Yt(t) { + const e = I().journey; + let i = 60; + Object.keys(M).forEach((o) => { + const n = M[o].color, h = { + cx: 20, + cy: i, + r: 7, + fill: n, + stroke: "#000", + pos: M[o].position + }; + L.drawCircle(t, h); + const c = { + x: 40, + y: i + 7, + fill: "#666", + text: o, + textMargin: e.boxTextMargin | 5 + }; + L.drawText(t, c), i += 20; + }); +} +const j = I().journey, P = j.leftMargin, Ot = function(t, e, i, o) { + const n = I().journey, h = I().securityLevel; + let c; + h === "sandbox" && (c = W("#i" + e)); + const d = h === "sandbox" ? W(c.nodes()[0].contentDocument.body) : W("body"); + v.init(); + const y = d.select("#" + e); + L.initGraphics(y); + const m = o.db.getTasks(), g = o.db.getDiagramTitle(), p = o.db.getActors(); + for (const l in M) + delete M[l]; + let s = 0; + p.forEach((l) => { + M[l] = { + color: n.actorColours[s % n.actorColours.length], + position: s + }, s++; + }), Yt(y), v.insert(0, 0, P, Object.keys(M).length * 50), qt(y, m, 0); + const r = v.getBounds(); + g && y.append("text").text(g).attr("x", P).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25); + const a = r.stopy - r.starty + 2 * n.diagramMarginY, u = P + r.stopx + 2 * n.diagramMarginX; + kt(y, a, u, n.useMaxWidth), y.append("line").attr("x1", P).attr("y1", n.height * 4).attr("x2", u - P - 4).attr("y2", n.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + const f = g ? 70 : 0; + y.attr("viewBox", `${r.startx} -25 ${u} ${a + f}`), y.attr("preserveAspectRatio", "xMinYMin meet"), y.attr("height", a + f + 25); +}, v = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + init: function() { + this.sequenceItems = [], this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, this.verticalPos = 0; + }, + updateVal: function(t, e, i, o) { + t[e] === void 0 ? t[e] = i : t[e] = o(i, t[e]); + }, + updateBounds: function(t, e, i, o) { + const n = I().journey, h = this; + let c = 0; + function d(y) { + return function(g) { + c++; + const p = h.sequenceItems.length - c + 1; + h.updateVal(g, "starty", e - p * n.boxMargin, Math.min), h.updateVal(g, "stopy", o + p * n.boxMargin, Math.max), h.updateVal(v.data, "startx", t - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopx", i + p * n.boxMargin, Math.max), y !== "activation" && (h.updateVal(g, "startx", t - p * n.boxMargin, Math.min), h.updateVal(g, "stopx", i + p * n.boxMargin, Math.max), h.updateVal(v.data, "starty", e - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopy", o + p * n.boxMargin, Math.max)); + }; + } + this.sequenceItems.forEach(d()); + }, + insert: function(t, e, i, o) { + const n = Math.min(t, i), h = Math.max(t, i), c = Math.min(e, o), d = Math.max(e, o); + this.updateVal(v.data, "startx", n, Math.min), this.updateVal(v.data, "starty", c, Math.min), this.updateVal(v.data, "stopx", h, Math.max), this.updateVal(v.data, "stopy", d, Math.max), this.updateBounds(n, c, h, d); + }, + bumpVerticalPos: function(t) { + this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos; + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return this.data; + } +}, X = j.sectionFills, st = j.sectionColours, qt = function(t, e, i) { + const o = I().journey; + let n = ""; + const h = o.height * 2 + o.diagramMarginY, c = i + h; + let d = 0, y = "#CCC", m = "black", g = 0; + for (const [p, s] of e.entries()) { + if (n !== s.section) { + y = X[d % X.length], g = d % X.length, m = st[d % st.length]; + let a = 0; + const u = s.section; + for (let l = p; l < e.length && e[l].section == u; l++) + a = a + 1; + const f = { + x: p * o.taskMargin + p * o.width + P, + y: 50, + text: s.section, + fill: y, + num: g, + colour: m, + taskCount: a + }; + L.drawSection(t, f, o), n = s.section, d++; + } + const r = s.people.reduce((a, u) => (M[u] && (a[u] = M[u]), a), {}); + s.x = p * o.taskMargin + p * o.width + P, s.y = c, s.width = o.diagramMarginX, s.height = o.diagramMarginY, s.colour = m, s.fill = y, s.num = g, s.actors = r, L.drawTask(t, s, o), v.insert(s.x, s.y, s.x + s.width + o.taskMargin, 300 + 5 * 30); + } +}, nt = { + setConf: zt, + draw: Ot +}, Ut = { + parser: wt, + db: tt, + renderer: nt, + styles: Vt, + init: (t) => { + nt.setConf(t.journey), tt.clear(); + } +}; +export { + Ut as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/layout-545b2d5b.js b/webroot/js/node_modules/mermaid/dist/layout-545b2d5b.js new file mode 100644 index 0000000..ab0ac88 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/layout-545b2d5b.js @@ -0,0 +1,2396 @@ +import { a8 as q, a9 as fr, aa as O, ab as x, ac as F, ad as fn, ae as dr, af as cr, ag as hr, ah as Te, ai as lr, aj as vr, ak as dn, al as X, am as gr, an as Le, ao as pr, ap as H, aq as an, ar as Cn, as as br, at as Ln, au as wr, av as mr, aw as U, ax as In, ay as _r, az as Ae, aA as Kn, aB as Er, aC as yr, aD as Ne, aE as V, aF as Oe, aG as xr, aH as Pn, aI as on, aJ as Tr, aK as bn, aL as Lr, aM as B, y as Xn, aN as Vn, aO as An } from "./mermaid-e4a58915.js"; +var Ar = "[object Symbol]"; +function $(n) { + return typeof n == "symbol" || q(n) && fr(n) == Ar; +} +function R(n, e) { + for (var r = -1, t = n == null ? 0 : n.length, i = Array(t); ++r < t; ) + i[r] = e(n[r], r, n); + return i; +} +var Nr = 1 / 0, Zn = O ? O.prototype : void 0, Jn = Zn ? Zn.toString : void 0; +function Ce(n) { + if (typeof n == "string") + return n; + if (x(n)) + return R(n, Ce) + ""; + if ($(n)) + return Jn ? Jn.call(n) : ""; + var e = n + ""; + return e == "0" && 1 / n == -Nr ? "-0" : e; +} +var Or = /\s/; +function Cr(n) { + for (var e = n.length; e-- && Or.test(n.charAt(e)); ) + ; + return e; +} +var Ir = /^\s+/; +function Pr(n) { + return n && n.slice(0, Cr(n) + 1).replace(Ir, ""); +} +var Qn = 0 / 0, $r = /^[-+]0x[0-9a-f]+$/i, Sr = /^0b[01]+$/i, Mr = /^0o[0-7]+$/i, Rr = parseInt; +function Fr(n) { + if (typeof n == "number") + return n; + if ($(n)) + return Qn; + if (F(n)) { + var e = typeof n.valueOf == "function" ? n.valueOf() : n; + n = F(e) ? e + "" : e; + } + if (typeof n != "string") + return n === 0 ? n : +n; + n = Pr(n); + var r = Sr.test(n); + return r || Mr.test(n) ? Rr(n.slice(2), r ? 2 : 8) : $r.test(n) ? Qn : +n; +} +var zn = 1 / 0, Dr = 17976931348623157e292; +function rn(n) { + if (!n) + return n === 0 ? n : 0; + if (n = Fr(n), n === zn || n === -zn) { + var e = n < 0 ? -1 : 1; + return e * Dr; + } + return n === n ? n : 0; +} +function kr(n) { + var e = rn(n), r = e % 1; + return e === e ? r ? e - r : e : 0; +} +function Gr() { +} +function Ie(n, e) { + for (var r = -1, t = n == null ? 0 : n.length; ++r < t && e(n[r], r, n) !== !1; ) + ; + return n; +} +function Pe(n, e, r, t) { + for (var i = n.length, a = r + (t ? 1 : -1); t ? a-- : ++a < i; ) + if (e(n[a], a, n)) + return a; + return -1; +} +function Br(n) { + return n !== n; +} +function Yr(n, e, r) { + for (var t = r - 1, i = n.length; ++t < i; ) + if (n[t] === e) + return t; + return -1; +} +function Ur(n, e, r) { + return e === e ? Yr(n, e, r) : Pe(n, Br, r); +} +function qr(n, e) { + var r = n == null ? 0 : n.length; + return !!r && Ur(n, e, 0) > -1; +} +function T(n) { + return fn(n) ? dr(n) : cr(n); +} +var Hr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, jr = /^\w*$/; +function $n(n, e) { + if (x(n)) + return !1; + var r = typeof n; + return r == "number" || r == "symbol" || r == "boolean" || n == null || $(n) ? !0 : jr.test(n) || !Hr.test(n) || e != null && n in Object(e); +} +var Wr = 500; +function Kr(n) { + var e = hr(n, function(t) { + return r.size === Wr && r.clear(), t; + }), r = e.cache; + return e; +} +var Xr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Vr = /\\(\\)?/g, Zr = Kr(function(n) { + var e = []; + return n.charCodeAt(0) === 46 && e.push(""), n.replace(Xr, function(r, t, i, a) { + e.push(i ? a.replace(Vr, "$1") : t || r); + }), e; +}); +const Jr = Zr; +function $e(n) { + return n == null ? "" : Ce(n); +} +function cn(n, e) { + return x(n) ? n : $n(n, e) ? [n] : Jr($e(n)); +} +var Qr = 1 / 0; +function Z(n) { + if (typeof n == "string" || $(n)) + return n; + var e = n + ""; + return e == "0" && 1 / n == -Qr ? "-0" : e; +} +function hn(n, e) { + e = cn(e, n); + for (var r = 0, t = e.length; n != null && r < t; ) + n = n[Z(e[r++])]; + return r && r == t ? n : void 0; +} +function zr(n, e, r) { + var t = n == null ? void 0 : hn(n, e); + return t === void 0 ? r : t; +} +function Sn(n, e) { + for (var r = -1, t = e.length, i = n.length; ++r < t; ) + n[i + r] = e[r]; + return n; +} +var ne = O ? O.isConcatSpreadable : void 0; +function nt(n) { + return x(n) || Te(n) || !!(ne && n && n[ne]); +} +function ln(n, e, r, t, i) { + var a = -1, o = n.length; + for (r || (r = nt), i || (i = []); ++a < o; ) { + var s = n[a]; + e > 0 && r(s) ? e > 1 ? ln(s, e - 1, r, t, i) : Sn(i, s) : t || (i[i.length] = s); + } + return i; +} +function k(n) { + var e = n == null ? 0 : n.length; + return e ? ln(n, 1) : []; +} +function et(n) { + return lr(vr(n, void 0, k), n + ""); +} +function rt(n, e, r, t) { + var i = -1, a = n == null ? 0 : n.length; + for (t && a && (r = n[++i]); ++i < a; ) + r = e(r, n[i], i, n); + return r; +} +function tt(n, e) { + return n && dn(e, T(e), n); +} +function it(n, e) { + return n && dn(e, X(e), n); +} +function Se(n, e) { + for (var r = -1, t = n == null ? 0 : n.length, i = 0, a = []; ++r < t; ) { + var o = n[r]; + e(o, r, n) && (a[i++] = o); + } + return a; +} +function Me() { + return []; +} +var at = Object.prototype, ot = at.propertyIsEnumerable, ee = Object.getOwnPropertySymbols, st = ee ? function(n) { + return n == null ? [] : (n = Object(n), Se(ee(n), function(e) { + return ot.call(n, e); + })); +} : Me; +const Mn = st; +function ut(n, e) { + return dn(n, Mn(n), e); +} +var ft = Object.getOwnPropertySymbols, dt = ft ? function(n) { + for (var e = []; n; ) + Sn(e, Mn(n)), n = gr(n); + return e; +} : Me; +const Re = dt; +function ct(n, e) { + return dn(n, Re(n), e); +} +function Fe(n, e, r) { + var t = e(n); + return x(n) ? t : Sn(t, r(n)); +} +function Nn(n) { + return Fe(n, T, Mn); +} +function ht(n) { + return Fe(n, X, Re); +} +var lt = Object.prototype, vt = lt.hasOwnProperty; +function gt(n) { + var e = n.length, r = new n.constructor(e); + return e && typeof n[0] == "string" && vt.call(n, "index") && (r.index = n.index, r.input = n.input), r; +} +function pt(n, e) { + var r = e ? Le(n.buffer) : n.buffer; + return new n.constructor(r, n.byteOffset, n.byteLength); +} +var bt = /\w*$/; +function wt(n) { + var e = new n.constructor(n.source, bt.exec(n)); + return e.lastIndex = n.lastIndex, e; +} +var re = O ? O.prototype : void 0, te = re ? re.valueOf : void 0; +function mt(n) { + return te ? Object(te.call(n)) : {}; +} +var _t = "[object Boolean]", Et = "[object Date]", yt = "[object Map]", xt = "[object Number]", Tt = "[object RegExp]", Lt = "[object Set]", At = "[object String]", Nt = "[object Symbol]", Ot = "[object ArrayBuffer]", Ct = "[object DataView]", It = "[object Float32Array]", Pt = "[object Float64Array]", $t = "[object Int8Array]", St = "[object Int16Array]", Mt = "[object Int32Array]", Rt = "[object Uint8Array]", Ft = "[object Uint8ClampedArray]", Dt = "[object Uint16Array]", kt = "[object Uint32Array]"; +function Gt(n, e, r) { + var t = n.constructor; + switch (e) { + case Ot: + return Le(n); + case _t: + case Et: + return new t(+n); + case Ct: + return pt(n, r); + case It: + case Pt: + case $t: + case St: + case Mt: + case Rt: + case Ft: + case Dt: + case kt: + return pr(n, r); + case yt: + return new t(); + case xt: + case At: + return new t(n); + case Tt: + return wt(n); + case Lt: + return new t(); + case Nt: + return mt(n); + } +} +var Bt = "[object Map]"; +function Yt(n) { + return q(n) && H(n) == Bt; +} +var ie = an && an.isMap, Ut = ie ? Cn(ie) : Yt; +const qt = Ut; +var Ht = "[object Set]"; +function jt(n) { + return q(n) && H(n) == Ht; +} +var ae = an && an.isSet, Wt = ae ? Cn(ae) : jt; +const Kt = Wt; +var Xt = 1, Vt = 2, Zt = 4, De = "[object Arguments]", Jt = "[object Array]", Qt = "[object Boolean]", zt = "[object Date]", ni = "[object Error]", ke = "[object Function]", ei = "[object GeneratorFunction]", ri = "[object Map]", ti = "[object Number]", Ge = "[object Object]", ii = "[object RegExp]", ai = "[object Set]", oi = "[object String]", si = "[object Symbol]", ui = "[object WeakMap]", fi = "[object ArrayBuffer]", di = "[object DataView]", ci = "[object Float32Array]", hi = "[object Float64Array]", li = "[object Int8Array]", vi = "[object Int16Array]", gi = "[object Int32Array]", pi = "[object Uint8Array]", bi = "[object Uint8ClampedArray]", wi = "[object Uint16Array]", mi = "[object Uint32Array]", w = {}; +w[De] = w[Jt] = w[fi] = w[di] = w[Qt] = w[zt] = w[ci] = w[hi] = w[li] = w[vi] = w[gi] = w[ri] = w[ti] = w[Ge] = w[ii] = w[ai] = w[oi] = w[si] = w[pi] = w[bi] = w[wi] = w[mi] = !0; +w[ni] = w[ke] = w[ui] = !1; +function tn(n, e, r, t, i, a) { + var o, s = e & Xt, u = e & Vt, f = e & Zt; + if (r && (o = i ? r(n, t, i, a) : r(n)), o !== void 0) + return o; + if (!F(n)) + return n; + var d = x(n); + if (d) { + if (o = gt(n), !s) + return br(n, o); + } else { + var h = H(n), l = h == ke || h == ei; + if (Ln(n)) + return wr(n, s); + if (h == Ge || h == De || l && !i) { + if (o = u || l ? {} : mr(n), !s) + return u ? ct(n, it(o, n)) : ut(n, tt(o, n)); + } else { + if (!w[h]) + return i ? n : {}; + o = Gt(n, h, s); + } + } + a || (a = new U()); + var g = a.get(n); + if (g) + return g; + a.set(n, o), Kt(n) ? n.forEach(function(m) { + o.add(tn(m, e, r, m, n, a)); + }) : qt(n) && n.forEach(function(m, _) { + o.set(_, tn(m, e, r, _, n, a)); + }); + var v = f ? u ? ht : Nn : u ? X : T, p = d ? void 0 : v(n); + return Ie(p || n, function(m, _) { + p && (_ = m, m = n[_]), In(o, _, tn(m, e, r, _, n, a)); + }), o; +} +var _i = 1, Ei = 4; +function yi(n) { + return tn(n, _i | Ei); +} +var xi = "__lodash_hash_undefined__"; +function Ti(n) { + return this.__data__.set(n, xi), this; +} +function Li(n) { + return this.__data__.has(n); +} +function j(n) { + var e = -1, r = n == null ? 0 : n.length; + for (this.__data__ = new _r(); ++e < r; ) + this.add(n[e]); +} +j.prototype.add = j.prototype.push = Ti; +j.prototype.has = Li; +function Ai(n, e) { + for (var r = -1, t = n == null ? 0 : n.length; ++r < t; ) + if (e(n[r], r, n)) + return !0; + return !1; +} +function Be(n, e) { + return n.has(e); +} +var Ni = 1, Oi = 2; +function Ye(n, e, r, t, i, a) { + var o = r & Ni, s = n.length, u = e.length; + if (s != u && !(o && u > s)) + return !1; + var f = a.get(n), d = a.get(e); + if (f && d) + return f == e && d == n; + var h = -1, l = !0, g = r & Oi ? new j() : void 0; + for (a.set(n, e), a.set(e, n); ++h < s; ) { + var v = n[h], p = e[h]; + if (t) + var m = o ? t(p, v, h, e, n, a) : t(v, p, h, n, e, a); + if (m !== void 0) { + if (m) + continue; + l = !1; + break; + } + if (g) { + if (!Ai(e, function(_, I) { + if (!Be(g, I) && (v === _ || i(v, _, r, t, a))) + return g.push(I); + })) { + l = !1; + break; + } + } else if (!(v === p || i(v, p, r, t, a))) { + l = !1; + break; + } + } + return a.delete(n), a.delete(e), l; +} +function Ci(n) { + var e = -1, r = Array(n.size); + return n.forEach(function(t, i) { + r[++e] = [i, t]; + }), r; +} +function Rn(n) { + var e = -1, r = Array(n.size); + return n.forEach(function(t) { + r[++e] = t; + }), r; +} +var Ii = 1, Pi = 2, $i = "[object Boolean]", Si = "[object Date]", Mi = "[object Error]", Ri = "[object Map]", Fi = "[object Number]", Di = "[object RegExp]", ki = "[object Set]", Gi = "[object String]", Bi = "[object Symbol]", Yi = "[object ArrayBuffer]", Ui = "[object DataView]", oe = O ? O.prototype : void 0, wn = oe ? oe.valueOf : void 0; +function qi(n, e, r, t, i, a, o) { + switch (r) { + case Ui: + if (n.byteLength != e.byteLength || n.byteOffset != e.byteOffset) + return !1; + n = n.buffer, e = e.buffer; + case Yi: + return !(n.byteLength != e.byteLength || !a(new Kn(n), new Kn(e))); + case $i: + case Si: + case Fi: + return Ae(+n, +e); + case Mi: + return n.name == e.name && n.message == e.message; + case Di: + case Gi: + return n == e + ""; + case Ri: + var s = Ci; + case ki: + var u = t & Ii; + if (s || (s = Rn), n.size != e.size && !u) + return !1; + var f = o.get(n); + if (f) + return f == e; + t |= Pi, o.set(n, e); + var d = Ye(s(n), s(e), t, i, a, o); + return o.delete(n), d; + case Bi: + if (wn) + return wn.call(n) == wn.call(e); + } + return !1; +} +var Hi = 1, ji = Object.prototype, Wi = ji.hasOwnProperty; +function Ki(n, e, r, t, i, a) { + var o = r & Hi, s = Nn(n), u = s.length, f = Nn(e), d = f.length; + if (u != d && !o) + return !1; + for (var h = u; h--; ) { + var l = s[h]; + if (!(o ? l in e : Wi.call(e, l))) + return !1; + } + var g = a.get(n), v = a.get(e); + if (g && v) + return g == e && v == n; + var p = !0; + a.set(n, e), a.set(e, n); + for (var m = o; ++h < u; ) { + l = s[h]; + var _ = n[l], I = e[l]; + if (t) + var Wn = o ? t(I, _, l, e, n, a) : t(_, I, l, n, e, a); + if (!(Wn === void 0 ? _ === I || i(_, I, r, t, a) : Wn)) { + p = !1; + break; + } + m || (m = l == "constructor"); + } + if (p && !m) { + var z = n.constructor, nn = e.constructor; + z != nn && "constructor" in n && "constructor" in e && !(typeof z == "function" && z instanceof z && typeof nn == "function" && nn instanceof nn) && (p = !1); + } + return a.delete(n), a.delete(e), p; +} +var Xi = 1, se = "[object Arguments]", ue = "[object Array]", en = "[object Object]", Vi = Object.prototype, fe = Vi.hasOwnProperty; +function Zi(n, e, r, t, i, a) { + var o = x(n), s = x(e), u = o ? ue : H(n), f = s ? ue : H(e); + u = u == se ? en : u, f = f == se ? en : f; + var d = u == en, h = f == en, l = u == f; + if (l && Ln(n)) { + if (!Ln(e)) + return !1; + o = !0, d = !1; + } + if (l && !d) + return a || (a = new U()), o || Er(n) ? Ye(n, e, r, t, i, a) : qi(n, e, u, r, t, i, a); + if (!(r & Xi)) { + var g = d && fe.call(n, "__wrapped__"), v = h && fe.call(e, "__wrapped__"); + if (g || v) { + var p = g ? n.value() : n, m = v ? e.value() : e; + return a || (a = new U()), i(p, m, r, t, a); + } + } + return l ? (a || (a = new U()), Ki(n, e, r, t, i, a)) : !1; +} +function Fn(n, e, r, t, i) { + return n === e ? !0 : n == null || e == null || !q(n) && !q(e) ? n !== n && e !== e : Zi(n, e, r, t, Fn, i); +} +var Ji = 1, Qi = 2; +function zi(n, e, r, t) { + var i = r.length, a = i, o = !t; + if (n == null) + return !a; + for (n = Object(n); i--; ) { + var s = r[i]; + if (o && s[2] ? s[1] !== n[s[0]] : !(s[0] in n)) + return !1; + } + for (; ++i < a; ) { + s = r[i]; + var u = s[0], f = n[u], d = s[1]; + if (o && s[2]) { + if (f === void 0 && !(u in n)) + return !1; + } else { + var h = new U(); + if (t) + var l = t(f, d, u, n, e, h); + if (!(l === void 0 ? Fn(d, f, Ji | Qi, t, h) : l)) + return !1; + } + } + return !0; +} +function Ue(n) { + return n === n && !F(n); +} +function na(n) { + for (var e = T(n), r = e.length; r--; ) { + var t = e[r], i = n[t]; + e[r] = [t, i, Ue(i)]; + } + return e; +} +function qe(n, e) { + return function(r) { + return r == null ? !1 : r[n] === e && (e !== void 0 || n in Object(r)); + }; +} +function ea(n) { + var e = na(n); + return e.length == 1 && e[0][2] ? qe(e[0][0], e[0][1]) : function(r) { + return r === n || zi(r, n, e); + }; +} +function ra(n, e) { + return n != null && e in Object(n); +} +function He(n, e, r) { + e = cn(e, n); + for (var t = -1, i = e.length, a = !1; ++t < i; ) { + var o = Z(e[t]); + if (!(a = n != null && r(n, o))) + break; + n = n[o]; + } + return a || ++t != i ? a : (i = n == null ? 0 : n.length, !!i && yr(i) && Ne(o, i) && (x(n) || Te(n))); +} +function je(n, e) { + return n != null && He(n, e, ra); +} +var ta = 1, ia = 2; +function aa(n, e) { + return $n(n) && Ue(e) ? qe(Z(n), e) : function(r) { + var t = zr(r, n); + return t === void 0 && t === e ? je(r, n) : Fn(e, t, ta | ia); + }; +} +function oa(n) { + return function(e) { + return e == null ? void 0 : e[n]; + }; +} +function sa(n) { + return function(e) { + return hn(e, n); + }; +} +function ua(n) { + return $n(n) ? oa(Z(n)) : sa(n); +} +function C(n) { + return typeof n == "function" ? n : n == null ? V : typeof n == "object" ? x(n) ? aa(n[0], n[1]) : ea(n) : ua(n); +} +function Dn(n, e) { + return n && Oe(n, e, T); +} +function fa(n, e) { + return function(r, t) { + if (r == null) + return r; + if (!fn(r)) + return n(r, t); + for (var i = r.length, a = e ? i : -1, o = Object(r); (e ? a-- : ++a < i) && t(o[a], a, o) !== !1; ) + ; + return r; + }; +} +var da = fa(Dn); +const vn = da; +var ca = function() { + return xr.Date.now(); +}; +const de = ca; +var We = Object.prototype, ha = We.hasOwnProperty, la = Pn(function(n, e) { + n = Object(n); + var r = -1, t = e.length, i = t > 2 ? e[2] : void 0; + for (i && on(e[0], e[1], i) && (t = 1); ++r < t; ) + for (var a = e[r], o = X(a), s = -1, u = o.length; ++s < u; ) { + var f = o[s], d = n[f]; + (d === void 0 || Ae(d, We[f]) && !ha.call(n, f)) && (n[f] = a[f]); + } + return n; +}); +const va = la; +function ga(n, e, r) { + for (var t = -1, i = n == null ? 0 : n.length; ++t < i; ) + if (r(e, n[t])) + return !0; + return !1; +} +function sn(n) { + var e = n == null ? 0 : n.length; + return e ? n[e - 1] : void 0; +} +function kn(n) { + return typeof n == "function" ? n : V; +} +function c(n, e) { + var r = x(n) ? Ie : vn; + return r(n, kn(e)); +} +function pa(n, e) { + var r = []; + return vn(n, function(t, i, a) { + e(t, i, a) && r.push(t); + }), r; +} +function A(n, e) { + var r = x(n) ? Se : pa; + return r(n, C(e)); +} +function ba(n) { + return function(e, r, t) { + var i = Object(e); + if (!fn(e)) { + var a = C(r); + e = T(e), r = function(s) { + return a(i[s], s, i); + }; + } + var o = n(e, r, t); + return o > -1 ? i[a ? e[o] : o] : void 0; + }; +} +var wa = Math.max; +function ma(n, e, r) { + var t = n == null ? 0 : n.length; + if (!t) + return -1; + var i = r == null ? 0 : kr(r); + return i < 0 && (i = wa(t + i, 0)), Pe(n, C(e), i); +} +var _a = ba(ma); +const Gn = _a; +function Ke(n, e) { + var r = -1, t = fn(n) ? Array(n.length) : []; + return vn(n, function(i, a, o) { + t[++r] = e(i, a, o); + }), t; +} +function E(n, e) { + var r = x(n) ? R : Ke; + return r(n, C(e)); +} +function Ea(n, e) { + return n == null ? n : Oe(n, kn(e), X); +} +function ya(n, e) { + return n && Dn(n, kn(e)); +} +function xa(n, e) { + return n > e; +} +var Ta = Object.prototype, La = Ta.hasOwnProperty; +function Aa(n, e) { + return n != null && La.call(n, e); +} +function b(n, e) { + return n != null && He(n, e, Aa); +} +function Na(n, e) { + return R(e, function(r) { + return n[r]; + }); +} +function N(n) { + return n == null ? [] : Na(n, T(n)); +} +function y(n) { + return n === void 0; +} +function Xe(n, e) { + return n < e; +} +function gn(n, e) { + var r = {}; + return e = C(e), Dn(n, function(t, i, a) { + Tr(r, i, e(t, i, a)); + }), r; +} +function Bn(n, e, r) { + for (var t = -1, i = n.length; ++t < i; ) { + var a = n[t], o = e(a); + if (o != null && (s === void 0 ? o === o && !$(o) : r(o, s))) + var s = o, u = a; + } + return u; +} +function S(n) { + return n && n.length ? Bn(n, V, xa) : void 0; +} +function W(n) { + return n && n.length ? Bn(n, V, Xe) : void 0; +} +function Yn(n, e) { + return n && n.length ? Bn(n, C(e), Xe) : void 0; +} +function Oa(n, e, r, t) { + if (!F(n)) + return n; + e = cn(e, n); + for (var i = -1, a = e.length, o = a - 1, s = n; s != null && ++i < a; ) { + var u = Z(e[i]), f = r; + if (u === "__proto__" || u === "constructor" || u === "prototype") + return n; + if (i != o) { + var d = s[u]; + f = t ? t(d, u, s) : void 0, f === void 0 && (f = F(d) ? d : Ne(e[i + 1]) ? [] : {}); + } + In(s, u, f), s = s[u]; + } + return n; +} +function Ca(n, e, r) { + for (var t = -1, i = e.length, a = {}; ++t < i; ) { + var o = e[t], s = hn(n, o); + r(s, o) && Oa(a, cn(o, n), s); + } + return a; +} +function Ia(n, e) { + var r = n.length; + for (n.sort(e); r--; ) + n[r] = n[r].value; + return n; +} +function Pa(n, e) { + if (n !== e) { + var r = n !== void 0, t = n === null, i = n === n, a = $(n), o = e !== void 0, s = e === null, u = e === e, f = $(e); + if (!s && !f && !a && n > e || a && o && u && !s && !f || t && o && u || !r && u || !i) + return 1; + if (!t && !a && !f && n < e || f && r && i && !t && !a || s && r && i || !o && i || !u) + return -1; + } + return 0; +} +function $a(n, e, r) { + for (var t = -1, i = n.criteria, a = e.criteria, o = i.length, s = r.length; ++t < o; ) { + var u = Pa(i[t], a[t]); + if (u) { + if (t >= s) + return u; + var f = r[t]; + return u * (f == "desc" ? -1 : 1); + } + } + return n.index - e.index; +} +function Sa(n, e, r) { + e.length ? e = R(e, function(a) { + return x(a) ? function(o) { + return hn(o, a.length === 1 ? a[0] : a); + } : a; + }) : e = [V]; + var t = -1; + e = R(e, Cn(C)); + var i = Ke(n, function(a, o, s) { + var u = R(e, function(f) { + return f(a); + }); + return { criteria: u, index: ++t, value: a }; + }); + return Ia(i, function(a, o) { + return $a(a, o, r); + }); +} +function Ma(n, e) { + return Ca(n, e, function(r, t) { + return je(n, t); + }); +} +var Ra = et(function(n, e) { + return n == null ? {} : Ma(n, e); +}); +const un = Ra; +var Fa = Math.ceil, Da = Math.max; +function ka(n, e, r, t) { + for (var i = -1, a = Da(Fa((e - n) / (r || 1)), 0), o = Array(a); a--; ) + o[t ? a : ++i] = n, n += r; + return o; +} +function Ga(n) { + return function(e, r, t) { + return t && typeof t != "number" && on(e, r, t) && (r = t = void 0), e = rn(e), r === void 0 ? (r = e, e = 0) : r = rn(r), t = t === void 0 ? e < r ? 1 : -1 : rn(t), ka(e, r, t, n); + }; +} +var Ba = Ga(); +const D = Ba; +function Ya(n, e, r, t, i) { + return i(n, function(a, o, s) { + r = t ? (t = !1, a) : e(r, a, o, s); + }), r; +} +function J(n, e, r) { + var t = x(n) ? rt : Ya, i = arguments.length < 3; + return t(n, C(e), r, i, vn); +} +var Ua = Pn(function(n, e) { + if (n == null) + return []; + var r = e.length; + return r > 1 && on(n, e[0], e[1]) ? e = [] : r > 2 && on(e[0], e[1], e[2]) && (e = [e[0]]), Sa(n, ln(e, 1), []); +}); +const Q = Ua; +var qa = 1 / 0, Ha = bn && 1 / Rn(new bn([, -0]))[1] == qa ? function(n) { + return new bn(n); +} : Gr; +const ja = Ha; +var Wa = 200; +function Ka(n, e, r) { + var t = -1, i = qr, a = n.length, o = !0, s = [], u = s; + if (r) + o = !1, i = ga; + else if (a >= Wa) { + var f = e ? null : ja(n); + if (f) + return Rn(f); + o = !1, i = Be, u = new j(); + } else + u = e ? [] : s; + n: + for (; ++t < a; ) { + var d = n[t], h = e ? e(d) : d; + if (d = r || d !== 0 ? d : 0, o && h === h) { + for (var l = u.length; l--; ) + if (u[l] === h) + continue n; + e && u.push(h), s.push(d); + } else + i(u, h, r) || (u !== s && u.push(h), s.push(d)); + } + return s; +} +var Xa = Pn(function(n) { + return Ka(ln(n, 1, Lr, !0)); +}); +const Va = Xa; +var Za = 0; +function Un(n) { + var e = ++Za; + return $e(n) + e; +} +function Ja(n, e, r) { + for (var t = -1, i = n.length, a = e.length, o = {}; ++t < i; ) { + var s = t < a ? e[t] : void 0; + r(o, n[t], s); + } + return o; +} +function Qa(n, e) { + return Ja(n || [], e || [], In); +} +var za = "\0", P = "\0", ce = ""; +class L { + constructor(e = {}) { + this._isDirected = b(e, "directed") ? e.directed : !0, this._isMultigraph = b(e, "multigraph") ? e.multigraph : !1, this._isCompound = b(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = B(void 0), this._defaultEdgeLabelFn = B(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[P] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(e) { + return this._label = e, this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(e) { + return Xn(e) || (e = B(e)), this._defaultNodeLabelFn = e, this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return T(this._nodes); + } + sources() { + var e = this; + return A(this.nodes(), function(r) { + return Vn(e._in[r]); + }); + } + sinks() { + var e = this; + return A(this.nodes(), function(r) { + return Vn(e._out[r]); + }); + } + setNodes(e, r) { + var t = arguments, i = this; + return c(e, function(a) { + t.length > 1 ? i.setNode(a, r) : i.setNode(a); + }), this; + } + setNode(e, r) { + return b(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = r), this) : (this._nodes[e] = arguments.length > 1 ? r : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = P, this._children[e] = {}, this._children[P][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this); + } + node(e) { + return this._nodes[e]; + } + hasNode(e) { + return b(this._nodes, e); + } + removeNode(e) { + var r = this; + if (b(this._nodes, e)) { + var t = function(i) { + r.removeEdge(r._edgeObjs[i]); + }; + delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], c(this.children(e), function(i) { + r.setParent(i); + }), delete this._children[e]), c(T(this._in[e]), t), delete this._in[e], delete this._preds[e], c(T(this._out[e]), t), delete this._out[e], delete this._sucs[e], --this._nodeCount; + } + return this; + } + setParent(e, r) { + if (!this._isCompound) + throw new Error("Cannot set parent in a non-compound graph"); + if (y(r)) + r = P; + else { + r += ""; + for (var t = r; !y(t); t = this.parent(t)) + if (t === e) + throw new Error("Setting " + r + " as parent of " + e + " would create a cycle"); + this.setNode(r); + } + return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = r, this._children[r][e] = !0, this; + } + _removeFromParentsChildList(e) { + delete this._children[this._parent[e]][e]; + } + parent(e) { + if (this._isCompound) { + var r = this._parent[e]; + if (r !== P) + return r; + } + } + children(e) { + if (y(e) && (e = P), this._isCompound) { + var r = this._children[e]; + if (r) + return T(r); + } else { + if (e === P) + return this.nodes(); + if (this.hasNode(e)) + return []; + } + } + predecessors(e) { + var r = this._preds[e]; + if (r) + return T(r); + } + successors(e) { + var r = this._sucs[e]; + if (r) + return T(r); + } + neighbors(e) { + var r = this.predecessors(e); + if (r) + return Va(r, this.successors(e)); + } + isLeaf(e) { + var r; + return this.isDirected() ? r = this.successors(e) : r = this.neighbors(e), r.length === 0; + } + filterNodes(e) { + var r = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound + }); + r.setGraph(this.graph()); + var t = this; + c(this._nodes, function(o, s) { + e(s) && r.setNode(s, o); + }), c(this._edgeObjs, function(o) { + r.hasNode(o.v) && r.hasNode(o.w) && r.setEdge(o, t.edge(o)); + }); + var i = {}; + function a(o) { + var s = t.parent(o); + return s === void 0 || r.hasNode(s) ? (i[o] = s, s) : s in i ? i[s] : a(s); + } + return this._isCompound && c(r.nodes(), function(o) { + r.setParent(o, a(o)); + }), r; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(e) { + return Xn(e) || (e = B(e)), this._defaultEdgeLabelFn = e, this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return N(this._edgeObjs); + } + setPath(e, r) { + var t = this, i = arguments; + return J(e, function(a, o) { + return i.length > 1 ? t.setEdge(a, o, r) : t.setEdge(a, o), o; + }), this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var e, r, t, i, a = !1, o = arguments[0]; + typeof o == "object" && o !== null && "v" in o ? (e = o.v, r = o.w, t = o.name, arguments.length === 2 && (i = arguments[1], a = !0)) : (e = o, r = arguments[1], t = arguments[3], arguments.length > 2 && (i = arguments[2], a = !0)), e = "" + e, r = "" + r, y(t) || (t = "" + t); + var s = Y(this._isDirected, e, r, t); + if (b(this._edgeLabels, s)) + return a && (this._edgeLabels[s] = i), this; + if (!y(t) && !this._isMultigraph) + throw new Error("Cannot set a named edge when isMultigraph = false"); + this.setNode(e), this.setNode(r), this._edgeLabels[s] = a ? i : this._defaultEdgeLabelFn(e, r, t); + var u = no(this._isDirected, e, r, t); + return e = u.v, r = u.w, Object.freeze(u), this._edgeObjs[s] = u, he(this._preds[r], e), he(this._sucs[e], r), this._in[r][s] = u, this._out[e][s] = u, this._edgeCount++, this; + } + edge(e, r, t) { + var i = arguments.length === 1 ? mn(this._isDirected, arguments[0]) : Y(this._isDirected, e, r, t); + return this._edgeLabels[i]; + } + hasEdge(e, r, t) { + var i = arguments.length === 1 ? mn(this._isDirected, arguments[0]) : Y(this._isDirected, e, r, t); + return b(this._edgeLabels, i); + } + removeEdge(e, r, t) { + var i = arguments.length === 1 ? mn(this._isDirected, arguments[0]) : Y(this._isDirected, e, r, t), a = this._edgeObjs[i]; + return a && (e = a.v, r = a.w, delete this._edgeLabels[i], delete this._edgeObjs[i], le(this._preds[r], e), le(this._sucs[e], r), delete this._in[r][i], delete this._out[e][i], this._edgeCount--), this; + } + inEdges(e, r) { + var t = this._in[e]; + if (t) { + var i = N(t); + return r ? A(i, function(a) { + return a.v === r; + }) : i; + } + } + outEdges(e, r) { + var t = this._out[e]; + if (t) { + var i = N(t); + return r ? A(i, function(a) { + return a.w === r; + }) : i; + } + } + nodeEdges(e, r) { + var t = this.inEdges(e, r); + if (t) + return t.concat(this.outEdges(e, r)); + } +} +L.prototype._nodeCount = 0; +L.prototype._edgeCount = 0; +function he(n, e) { + n[e] ? n[e]++ : n[e] = 1; +} +function le(n, e) { + --n[e] || delete n[e]; +} +function Y(n, e, r, t) { + var i = "" + e, a = "" + r; + if (!n && i > a) { + var o = i; + i = a, a = o; + } + return i + ce + a + ce + (y(t) ? za : t); +} +function no(n, e, r, t) { + var i = "" + e, a = "" + r; + if (!n && i > a) { + var o = i; + i = a, a = o; + } + var s = { v: i, w: a }; + return t && (s.name = t), s; +} +function mn(n, e) { + return Y(n, e.v, e.w, e.name); +} +class eo { + constructor() { + var e = {}; + e._next = e._prev = e, this._sentinel = e; + } + dequeue() { + var e = this._sentinel, r = e._prev; + if (r !== e) + return ve(r), r; + } + enqueue(e) { + var r = this._sentinel; + e._prev && e._next && ve(e), e._next = r._next, r._next._prev = e, r._next = e, e._prev = r; + } + toString() { + for (var e = [], r = this._sentinel, t = r._prev; t !== r; ) + e.push(JSON.stringify(t, ro)), t = t._prev; + return "[" + e.join(", ") + "]"; + } +} +function ve(n) { + n._prev._next = n._next, n._next._prev = n._prev, delete n._next, delete n._prev; +} +function ro(n, e) { + if (n !== "_next" && n !== "_prev") + return e; +} +var to = B(1); +function io(n, e) { + if (n.nodeCount() <= 1) + return []; + var r = oo(n, e || to), t = ao(r.graph, r.buckets, r.zeroIdx); + return k( + E(t, function(i) { + return n.outEdges(i.v, i.w); + }) + ); +} +function ao(n, e, r) { + for (var t = [], i = e[e.length - 1], a = e[0], o; n.nodeCount(); ) { + for (; o = a.dequeue(); ) + _n(n, e, r, o); + for (; o = i.dequeue(); ) + _n(n, e, r, o); + if (n.nodeCount()) { + for (var s = e.length - 2; s > 0; --s) + if (o = e[s].dequeue(), o) { + t = t.concat(_n(n, e, r, o, !0)); + break; + } + } + } + return t; +} +function _n(n, e, r, t, i) { + var a = i ? [] : void 0; + return c(n.inEdges(t.v), function(o) { + var s = n.edge(o), u = n.node(o.v); + i && a.push({ v: o.v, w: o.w }), u.out -= s, On(e, r, u); + }), c(n.outEdges(t.v), function(o) { + var s = n.edge(o), u = o.w, f = n.node(u); + f.in -= s, On(e, r, f); + }), n.removeNode(t.v), a; +} +function oo(n, e) { + var r = new L(), t = 0, i = 0; + c(n.nodes(), function(s) { + r.setNode(s, { v: s, in: 0, out: 0 }); + }), c(n.edges(), function(s) { + var u = r.edge(s.v, s.w) || 0, f = e(s), d = u + f; + r.setEdge(s.v, s.w, d), i = Math.max(i, r.node(s.v).out += f), t = Math.max(t, r.node(s.w).in += f); + }); + var a = D(i + t + 3).map(function() { + return new eo(); + }), o = t + 1; + return c(r.nodes(), function(s) { + On(a, o, r.node(s)); + }), { graph: r, buckets: a, zeroIdx: o }; +} +function On(n, e, r) { + r.out ? r.in ? n[r.out - r.in + e].enqueue(r) : n[n.length - 1].enqueue(r) : n[0].enqueue(r); +} +function so(n) { + var e = n.graph().acyclicer === "greedy" ? io(n, r(n)) : uo(n); + c(e, function(t) { + var i = n.edge(t); + n.removeEdge(t), i.forwardName = t.name, i.reversed = !0, n.setEdge(t.w, t.v, i, Un("rev")); + }); + function r(t) { + return function(i) { + return t.edge(i).weight; + }; + } +} +function uo(n) { + var e = [], r = {}, t = {}; + function i(a) { + b(t, a) || (t[a] = !0, r[a] = !0, c(n.outEdges(a), function(o) { + b(r, o.w) ? e.push(o) : i(o.w); + }), delete r[a]); + } + return c(n.nodes(), i), e; +} +function fo(n) { + c(n.edges(), function(e) { + var r = n.edge(e); + if (r.reversed) { + n.removeEdge(e); + var t = r.forwardName; + delete r.reversed, delete r.forwardName, n.setEdge(e.w, e.v, r, t); + } + }); +} +function G(n, e, r, t) { + var i; + do + i = Un(t); + while (n.hasNode(i)); + return r.dummy = e, n.setNode(i, r), i; +} +function co(n) { + var e = new L().setGraph(n.graph()); + return c(n.nodes(), function(r) { + e.setNode(r, n.node(r)); + }), c(n.edges(), function(r) { + var t = e.edge(r.v, r.w) || { weight: 0, minlen: 1 }, i = n.edge(r); + e.setEdge(r.v, r.w, { + weight: t.weight + i.weight, + minlen: Math.max(t.minlen, i.minlen) + }); + }), e; +} +function Ve(n) { + var e = new L({ multigraph: n.isMultigraph() }).setGraph(n.graph()); + return c(n.nodes(), function(r) { + n.children(r).length || e.setNode(r, n.node(r)); + }), c(n.edges(), function(r) { + e.setEdge(r, n.edge(r)); + }), e; +} +function ge(n, e) { + var r = n.x, t = n.y, i = e.x - r, a = e.y - t, o = n.width / 2, s = n.height / 2; + if (!i && !a) + throw new Error("Not possible to find intersection inside of the rectangle"); + var u, f; + return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), u = s * i / a, f = s) : (i < 0 && (o = -o), u = o, f = o * a / i), { x: r + u, y: t + f }; +} +function pn(n) { + var e = E(D(Ze(n) + 1), function() { + return []; + }); + return c(n.nodes(), function(r) { + var t = n.node(r), i = t.rank; + y(i) || (e[i][t.order] = r); + }), e; +} +function ho(n) { + var e = W( + E(n.nodes(), function(r) { + return n.node(r).rank; + }) + ); + c(n.nodes(), function(r) { + var t = n.node(r); + b(t, "rank") && (t.rank -= e); + }); +} +function lo(n) { + var e = W( + E(n.nodes(), function(a) { + return n.node(a).rank; + }) + ), r = []; + c(n.nodes(), function(a) { + var o = n.node(a).rank - e; + r[o] || (r[o] = []), r[o].push(a); + }); + var t = 0, i = n.graph().nodeRankFactor; + c(r, function(a, o) { + y(a) && o % i !== 0 ? --t : t && c(a, function(s) { + n.node(s).rank += t; + }); + }); +} +function pe(n, e, r, t) { + var i = { + width: 0, + height: 0 + }; + return arguments.length >= 4 && (i.rank = r, i.order = t), G(n, "border", i, e); +} +function Ze(n) { + return S( + E(n.nodes(), function(e) { + var r = n.node(e).rank; + if (!y(r)) + return r; + }) + ); +} +function vo(n, e) { + var r = { lhs: [], rhs: [] }; + return c(n, function(t) { + e(t) ? r.lhs.push(t) : r.rhs.push(t); + }), r; +} +function go(n, e) { + var r = de(); + try { + return e(); + } finally { + console.log(n + " time: " + (de() - r) + "ms"); + } +} +function po(n, e) { + return e(); +} +function bo(n) { + function e(r) { + var t = n.children(r), i = n.node(r); + if (t.length && c(t, e), b(i, "minRank")) { + i.borderLeft = [], i.borderRight = []; + for (var a = i.minRank, o = i.maxRank + 1; a < o; ++a) + be(n, "borderLeft", "_bl", r, i, a), be(n, "borderRight", "_br", r, i, a); + } + } + c(n.children(), e); +} +function be(n, e, r, t, i, a) { + var o = { width: 0, height: 0, rank: a, borderType: e }, s = i[e][a - 1], u = G(n, "border", o, r); + i[e][a] = u, n.setParent(u, t), s && n.setEdge(s, u, { weight: 1 }); +} +function wo(n) { + var e = n.graph().rankdir.toLowerCase(); + (e === "lr" || e === "rl") && Je(n); +} +function mo(n) { + var e = n.graph().rankdir.toLowerCase(); + (e === "bt" || e === "rl") && _o(n), (e === "lr" || e === "rl") && (Eo(n), Je(n)); +} +function Je(n) { + c(n.nodes(), function(e) { + we(n.node(e)); + }), c(n.edges(), function(e) { + we(n.edge(e)); + }); +} +function we(n) { + var e = n.width; + n.width = n.height, n.height = e; +} +function _o(n) { + c(n.nodes(), function(e) { + En(n.node(e)); + }), c(n.edges(), function(e) { + var r = n.edge(e); + c(r.points, En), b(r, "y") && En(r); + }); +} +function En(n) { + n.y = -n.y; +} +function Eo(n) { + c(n.nodes(), function(e) { + yn(n.node(e)); + }), c(n.edges(), function(e) { + var r = n.edge(e); + c(r.points, yn), b(r, "x") && yn(r); + }); +} +function yn(n) { + var e = n.x; + n.x = n.y, n.y = e; +} +function yo(n) { + n.graph().dummyChains = [], c(n.edges(), function(e) { + xo(n, e); + }); +} +function xo(n, e) { + var r = e.v, t = n.node(r).rank, i = e.w, a = n.node(i).rank, o = e.name, s = n.edge(e), u = s.labelRank; + if (a !== t + 1) { + n.removeEdge(e); + var f, d, h; + for (h = 0, ++t; t < a; ++h, ++t) + s.points = [], d = { + width: 0, + height: 0, + edgeLabel: s, + edgeObj: e, + rank: t + }, f = G(n, "edge", d, "_d"), t === u && (d.width = s.width, d.height = s.height, d.dummy = "edge-label", d.labelpos = s.labelpos), n.setEdge(r, f, { weight: s.weight }, o), h === 0 && n.graph().dummyChains.push(f), r = f; + n.setEdge(r, i, { weight: s.weight }, o); + } +} +function To(n) { + c(n.graph().dummyChains, function(e) { + var r = n.node(e), t = r.edgeLabel, i; + for (n.setEdge(r.edgeObj, t); r.dummy; ) + i = n.successors(e)[0], n.removeNode(e), t.points.push({ x: r.x, y: r.y }), r.dummy === "edge-label" && (t.x = r.x, t.y = r.y, t.width = r.width, t.height = r.height), e = i, r = n.node(e); + }); +} +function qn(n) { + var e = {}; + function r(t) { + var i = n.node(t); + if (b(e, t)) + return i.rank; + e[t] = !0; + var a = W( + E(n.outEdges(t), function(o) { + return r(o.w) - n.edge(o).minlen; + }) + ); + return (a === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + a === void 0 || // return value of _.map([]) for Lodash 4 + a === null) && (a = 0), i.rank = a; + } + c(n.sources(), r); +} +function K(n, e) { + return n.node(e.w).rank - n.node(e.v).rank - n.edge(e).minlen; +} +function Qe(n) { + var e = new L({ directed: !1 }), r = n.nodes()[0], t = n.nodeCount(); + e.setNode(r, {}); + for (var i, a; Lo(e, n) < t; ) + i = Ao(e, n), a = e.hasNode(i.v) ? K(n, i) : -K(n, i), No(e, n, a); + return e; +} +function Lo(n, e) { + function r(t) { + c(e.nodeEdges(t), function(i) { + var a = i.v, o = t === a ? i.w : a; + !n.hasNode(o) && !K(e, i) && (n.setNode(o, {}), n.setEdge(t, o, {}), r(o)); + }); + } + return c(n.nodes(), r), n.nodeCount(); +} +function Ao(n, e) { + return Yn(e.edges(), function(r) { + if (n.hasNode(r.v) !== n.hasNode(r.w)) + return K(e, r); + }); +} +function No(n, e, r) { + c(n.nodes(), function(t) { + e.node(t).rank += r; + }); +} +function Oo() { +} +Oo.prototype = new Error(); +function ze(n, e, r) { + x(e) || (e = [e]); + var t = (n.isDirected() ? n.successors : n.neighbors).bind(n), i = [], a = {}; + return c(e, function(o) { + if (!n.hasNode(o)) + throw new Error("Graph does not have node: " + o); + nr(n, o, r === "post", a, t, i); + }), i; +} +function nr(n, e, r, t, i, a) { + b(t, e) || (t[e] = !0, r || a.push(e), c(i(e), function(o) { + nr(n, o, r, t, i, a); + }), r && a.push(e)); +} +function Co(n, e) { + return ze(n, e, "post"); +} +function Io(n, e) { + return ze(n, e, "pre"); +} +M.initLowLimValues = jn; +M.initCutValues = Hn; +M.calcCutValue = er; +M.leaveEdge = tr; +M.enterEdge = ir; +M.exchangeEdges = ar; +function M(n) { + n = co(n), qn(n); + var e = Qe(n); + jn(e), Hn(e, n); + for (var r, t; r = tr(e); ) + t = ir(e, n, r), ar(e, n, r, t); +} +function Hn(n, e) { + var r = Co(n, n.nodes()); + r = r.slice(0, r.length - 1), c(r, function(t) { + Po(n, e, t); + }); +} +function Po(n, e, r) { + var t = n.node(r), i = t.parent; + n.edge(r, i).cutvalue = er(n, e, r); +} +function er(n, e, r) { + var t = n.node(r), i = t.parent, a = !0, o = e.edge(r, i), s = 0; + return o || (a = !1, o = e.edge(i, r)), s = o.weight, c(e.nodeEdges(r), function(u) { + var f = u.v === r, d = f ? u.w : u.v; + if (d !== i) { + var h = f === a, l = e.edge(u).weight; + if (s += h ? l : -l, So(n, r, d)) { + var g = n.edge(r, d).cutvalue; + s += h ? -g : g; + } + } + }), s; +} +function jn(n, e) { + arguments.length < 2 && (e = n.nodes()[0]), rr(n, {}, 1, e); +} +function rr(n, e, r, t, i) { + var a = r, o = n.node(t); + return e[t] = !0, c(n.neighbors(t), function(s) { + b(e, s) || (r = rr(n, e, r, s, t)); + }), o.low = a, o.lim = r++, i ? o.parent = i : delete o.parent, r; +} +function tr(n) { + return Gn(n.edges(), function(e) { + return n.edge(e).cutvalue < 0; + }); +} +function ir(n, e, r) { + var t = r.v, i = r.w; + e.hasEdge(t, i) || (t = r.w, i = r.v); + var a = n.node(t), o = n.node(i), s = a, u = !1; + a.lim > o.lim && (s = o, u = !0); + var f = A(e.edges(), function(d) { + return u === me(n, n.node(d.v), s) && u !== me(n, n.node(d.w), s); + }); + return Yn(f, function(d) { + return K(e, d); + }); +} +function ar(n, e, r, t) { + var i = r.v, a = r.w; + n.removeEdge(i, a), n.setEdge(t.v, t.w, {}), jn(n), Hn(n, e), $o(n, e); +} +function $o(n, e) { + var r = Gn(n.nodes(), function(i) { + return !e.node(i).parent; + }), t = Io(n, r); + t = t.slice(1), c(t, function(i) { + var a = n.node(i).parent, o = e.edge(i, a), s = !1; + o || (o = e.edge(a, i), s = !0), e.node(i).rank = e.node(a).rank + (s ? o.minlen : -o.minlen); + }); +} +function So(n, e, r) { + return n.hasEdge(e, r); +} +function me(n, e, r) { + return r.low <= e.lim && e.lim <= r.lim; +} +function Mo(n) { + switch (n.graph().ranker) { + case "network-simplex": + _e(n); + break; + case "tight-tree": + Fo(n); + break; + case "longest-path": + Ro(n); + break; + default: + _e(n); + } +} +var Ro = qn; +function Fo(n) { + qn(n), Qe(n); +} +function _e(n) { + M(n); +} +function Do(n) { + var e = G(n, "root", {}, "_root"), r = ko(n), t = S(N(r)) - 1, i = 2 * t + 1; + n.graph().nestingRoot = e, c(n.edges(), function(o) { + n.edge(o).minlen *= i; + }); + var a = Go(n) + 1; + c(n.children(), function(o) { + or(n, e, i, a, t, r, o); + }), n.graph().nodeRankFactor = i; +} +function or(n, e, r, t, i, a, o) { + var s = n.children(o); + if (!s.length) { + o !== e && n.setEdge(e, o, { weight: 0, minlen: r }); + return; + } + var u = pe(n, "_bt"), f = pe(n, "_bb"), d = n.node(o); + n.setParent(u, o), d.borderTop = u, n.setParent(f, o), d.borderBottom = f, c(s, function(h) { + or(n, e, r, t, i, a, h); + var l = n.node(h), g = l.borderTop ? l.borderTop : h, v = l.borderBottom ? l.borderBottom : h, p = l.borderTop ? t : 2 * t, m = g !== v ? 1 : i - a[o] + 1; + n.setEdge(u, g, { + weight: p, + minlen: m, + nestingEdge: !0 + }), n.setEdge(v, f, { + weight: p, + minlen: m, + nestingEdge: !0 + }); + }), n.parent(o) || n.setEdge(e, u, { weight: 0, minlen: i + a[o] }); +} +function ko(n) { + var e = {}; + function r(t, i) { + var a = n.children(t); + a && a.length && c(a, function(o) { + r(o, i + 1); + }), e[t] = i; + } + return c(n.children(), function(t) { + r(t, 1); + }), e; +} +function Go(n) { + return J( + n.edges(), + function(e, r) { + return e + n.edge(r).weight; + }, + 0 + ); +} +function Bo(n) { + var e = n.graph(); + n.removeNode(e.nestingRoot), delete e.nestingRoot, c(n.edges(), function(r) { + var t = n.edge(r); + t.nestingEdge && n.removeEdge(r); + }); +} +function Yo(n, e, r) { + var t = {}, i; + c(r, function(a) { + for (var o = n.parent(a), s, u; o; ) { + if (s = n.parent(o), s ? (u = t[s], t[s] = o) : (u = i, i = o), u && u !== o) { + e.setEdge(u, o); + return; + } + o = s; + } + }); +} +function Uo(n, e, r) { + var t = qo(n), i = new L({ compound: !0 }).setGraph({ root: t }).setDefaultNodeLabel(function(a) { + return n.node(a); + }); + return c(n.nodes(), function(a) { + var o = n.node(a), s = n.parent(a); + (o.rank === e || o.minRank <= e && e <= o.maxRank) && (i.setNode(a), i.setParent(a, s || t), c(n[r](a), function(u) { + var f = u.v === a ? u.w : u.v, d = i.edge(f, a), h = y(d) ? 0 : d.weight; + i.setEdge(f, a, { weight: n.edge(u).weight + h }); + }), b(o, "minRank") && i.setNode(a, { + borderLeft: o.borderLeft[e], + borderRight: o.borderRight[e] + })); + }), i; +} +function qo(n) { + for (var e; n.hasNode(e = Un("_root")); ) + ; + return e; +} +function Ho(n, e) { + for (var r = 0, t = 1; t < e.length; ++t) + r += jo(n, e[t - 1], e[t]); + return r; +} +function jo(n, e, r) { + for (var t = Qa( + r, + E(r, function(f, d) { + return d; + }) + ), i = k( + E(e, function(f) { + return Q( + E(n.outEdges(f), function(d) { + return { pos: t[d.w], weight: n.edge(d).weight }; + }), + "pos" + ); + }) + ), a = 1; a < r.length; ) + a <<= 1; + var o = 2 * a - 1; + a -= 1; + var s = E(new Array(o), function() { + return 0; + }), u = 0; + return c( + // @ts-expect-error + i.forEach(function(f) { + var d = f.pos + a; + s[d] += f.weight; + for (var h = 0; d > 0; ) + d % 2 && (h += s[d + 1]), d = d - 1 >> 1, s[d] += f.weight; + u += f.weight * h; + }) + ), u; +} +function Wo(n) { + var e = {}, r = A(n.nodes(), function(s) { + return !n.children(s).length; + }), t = S( + E(r, function(s) { + return n.node(s).rank; + }) + ), i = E(D(t + 1), function() { + return []; + }); + function a(s) { + if (!b(e, s)) { + e[s] = !0; + var u = n.node(s); + i[u.rank].push(s), c(n.successors(s), a); + } + } + var o = Q(r, function(s) { + return n.node(s).rank; + }); + return c(o, a), i; +} +function Ko(n, e) { + return E(e, function(r) { + var t = n.inEdges(r); + if (t.length) { + var i = J( + t, + function(a, o) { + var s = n.edge(o), u = n.node(o.v); + return { + sum: a.sum + s.weight * u.order, + weight: a.weight + s.weight + }; + }, + { sum: 0, weight: 0 } + ); + return { + v: r, + barycenter: i.sum / i.weight, + weight: i.weight + }; + } else + return { v: r }; + }); +} +function Xo(n, e) { + var r = {}; + c(n, function(i, a) { + var o = r[i.v] = { + indegree: 0, + in: [], + out: [], + vs: [i.v], + i: a + }; + y(i.barycenter) || (o.barycenter = i.barycenter, o.weight = i.weight); + }), c(e.edges(), function(i) { + var a = r[i.v], o = r[i.w]; + !y(a) && !y(o) && (o.indegree++, a.out.push(r[i.w])); + }); + var t = A(r, function(i) { + return !i.indegree; + }); + return Vo(t); +} +function Vo(n) { + var e = []; + function r(a) { + return function(o) { + o.merged || (y(o.barycenter) || y(a.barycenter) || o.barycenter >= a.barycenter) && Zo(a, o); + }; + } + function t(a) { + return function(o) { + o.in.push(a), --o.indegree === 0 && n.push(o); + }; + } + for (; n.length; ) { + var i = n.pop(); + e.push(i), c(i.in.reverse(), r(i)), c(i.out, t(i)); + } + return E( + A(e, function(a) { + return !a.merged; + }), + function(a) { + return un(a, ["vs", "i", "barycenter", "weight"]); + } + ); +} +function Zo(n, e) { + var r = 0, t = 0; + n.weight && (r += n.barycenter * n.weight, t += n.weight), e.weight && (r += e.barycenter * e.weight, t += e.weight), n.vs = e.vs.concat(n.vs), n.barycenter = r / t, n.weight = t, n.i = Math.min(e.i, n.i), e.merged = !0; +} +function Jo(n, e) { + var r = vo(n, function(d) { + return b(d, "barycenter"); + }), t = r.lhs, i = Q(r.rhs, function(d) { + return -d.i; + }), a = [], o = 0, s = 0, u = 0; + t.sort(Qo(!!e)), u = Ee(a, i, u), c(t, function(d) { + u += d.vs.length, a.push(d.vs), o += d.barycenter * d.weight, s += d.weight, u = Ee(a, i, u); + }); + var f = { vs: k(a) }; + return s && (f.barycenter = o / s, f.weight = s), f; +} +function Ee(n, e, r) { + for (var t; e.length && (t = sn(e)).i <= r; ) + e.pop(), n.push(t.vs), r++; + return r; +} +function Qo(n) { + return function(e, r) { + return e.barycenter < r.barycenter ? -1 : e.barycenter > r.barycenter ? 1 : n ? r.i - e.i : e.i - r.i; + }; +} +function sr(n, e, r, t) { + var i = n.children(e), a = n.node(e), o = a ? a.borderLeft : void 0, s = a ? a.borderRight : void 0, u = {}; + o && (i = A(i, function(v) { + return v !== o && v !== s; + })); + var f = Ko(n, i); + c(f, function(v) { + if (n.children(v.v).length) { + var p = sr(n, v.v, r, t); + u[v.v] = p, b(p, "barycenter") && ns(v, p); + } + }); + var d = Xo(f, r); + zo(d, u); + var h = Jo(d, t); + if (o && (h.vs = k([o, h.vs, s]), n.predecessors(o).length)) { + var l = n.node(n.predecessors(o)[0]), g = n.node(n.predecessors(s)[0]); + b(h, "barycenter") || (h.barycenter = 0, h.weight = 0), h.barycenter = (h.barycenter * h.weight + l.order + g.order) / (h.weight + 2), h.weight += 2; + } + return h; +} +function zo(n, e) { + c(n, function(r) { + r.vs = k( + r.vs.map(function(t) { + return e[t] ? e[t].vs : t; + }) + ); + }); +} +function ns(n, e) { + y(n.barycenter) ? (n.barycenter = e.barycenter, n.weight = e.weight) : (n.barycenter = (n.barycenter * n.weight + e.barycenter * e.weight) / (n.weight + e.weight), n.weight += e.weight); +} +function es(n) { + var e = Ze(n), r = ye(n, D(1, e + 1), "inEdges"), t = ye(n, D(e - 1, -1, -1), "outEdges"), i = Wo(n); + xe(n, i); + for (var a = Number.POSITIVE_INFINITY, o, s = 0, u = 0; u < 4; ++s, ++u) { + rs(s % 2 ? r : t, s % 4 >= 2), i = pn(n); + var f = Ho(n, i); + f < a && (u = 0, o = yi(i), a = f); + } + xe(n, o); +} +function ye(n, e, r) { + return E(e, function(t) { + return Uo(n, t, r); + }); +} +function rs(n, e) { + var r = new L(); + c(n, function(t) { + var i = t.graph().root, a = sr(t, i, r, e); + c(a.vs, function(o, s) { + t.node(o).order = s; + }), Yo(t, r, a.vs); + }); +} +function xe(n, e) { + c(e, function(r) { + c(r, function(t, i) { + n.node(t).order = i; + }); + }); +} +function ts(n) { + var e = as(n); + c(n.graph().dummyChains, function(r) { + for (var t = n.node(r), i = t.edgeObj, a = is(n, e, i.v, i.w), o = a.path, s = a.lca, u = 0, f = o[u], d = !0; r !== i.w; ) { + if (t = n.node(r), d) { + for (; (f = o[u]) !== s && n.node(f).maxRank < t.rank; ) + u++; + f === s && (d = !1); + } + if (!d) { + for (; u < o.length - 1 && n.node(f = o[u + 1]).minRank <= t.rank; ) + u++; + f = o[u]; + } + n.setParent(r, f), r = n.successors(r)[0]; + } + }); +} +function is(n, e, r, t) { + var i = [], a = [], o = Math.min(e[r].low, e[t].low), s = Math.max(e[r].lim, e[t].lim), u, f; + u = r; + do + u = n.parent(u), i.push(u); + while (u && (e[u].low > o || s > e[u].lim)); + for (f = u, u = t; (u = n.parent(u)) !== f; ) + a.push(u); + return { path: i.concat(a.reverse()), lca: f }; +} +function as(n) { + var e = {}, r = 0; + function t(i) { + var a = r; + c(n.children(i), t), e[i] = { low: a, lim: r++ }; + } + return c(n.children(), t), e; +} +function os(n, e) { + var r = {}; + function t(i, a) { + var o = 0, s = 0, u = i.length, f = sn(a); + return c(a, function(d, h) { + var l = us(n, d), g = l ? n.node(l).order : u; + (l || d === f) && (c(a.slice(s, h + 1), function(v) { + c(n.predecessors(v), function(p) { + var m = n.node(p), _ = m.order; + (_ < o || g < _) && !(m.dummy && n.node(v).dummy) && ur(r, p, v); + }); + }), s = h + 1, o = g); + }), a; + } + return J(e, t), r; +} +function ss(n, e) { + var r = {}; + function t(a, o, s, u, f) { + var d; + c(D(o, s), function(h) { + d = a[h], n.node(d).dummy && c(n.predecessors(d), function(l) { + var g = n.node(l); + g.dummy && (g.order < u || g.order > f) && ur(r, l, d); + }); + }); + } + function i(a, o) { + var s = -1, u, f = 0; + return c(o, function(d, h) { + if (n.node(d).dummy === "border") { + var l = n.predecessors(d); + l.length && (u = n.node(l[0]).order, t(o, f, h, s, u), f = h, s = u); + } + t(o, f, o.length, u, a.length); + }), o; + } + return J(e, i), r; +} +function us(n, e) { + if (n.node(e).dummy) + return Gn(n.predecessors(e), function(r) { + return n.node(r).dummy; + }); +} +function ur(n, e, r) { + if (e > r) { + var t = e; + e = r, r = t; + } + var i = n[e]; + i || (n[e] = i = {}), i[r] = !0; +} +function fs(n, e, r) { + if (e > r) { + var t = e; + e = r, r = t; + } + return b(n[e], r); +} +function ds(n, e, r, t) { + var i = {}, a = {}, o = {}; + return c(e, function(s) { + c(s, function(u, f) { + i[u] = u, a[u] = u, o[u] = f; + }); + }), c(e, function(s) { + var u = -1; + c(s, function(f) { + var d = t(f); + if (d.length) { + d = Q(d, function(p) { + return o[p]; + }); + for (var h = (d.length - 1) / 2, l = Math.floor(h), g = Math.ceil(h); l <= g; ++l) { + var v = d[l]; + a[f] === f && u < o[v] && !fs(r, f, v) && (a[v] = f, a[f] = i[f] = i[v], u = o[v]); + } + } + }); + }), { root: i, align: a }; +} +function cs(n, e, r, t, i) { + var a = {}, o = hs(n, e, r, i), s = i ? "borderLeft" : "borderRight"; + function u(h, l) { + for (var g = o.nodes(), v = g.pop(), p = {}; v; ) + p[v] ? h(v) : (p[v] = !0, g.push(v), g = g.concat(l(v))), v = g.pop(); + } + function f(h) { + a[h] = o.inEdges(h).reduce(function(l, g) { + return Math.max(l, a[g.v] + o.edge(g)); + }, 0); + } + function d(h) { + var l = o.outEdges(h).reduce(function(v, p) { + return Math.min(v, a[p.w] - o.edge(p)); + }, Number.POSITIVE_INFINITY), g = n.node(h); + l !== Number.POSITIVE_INFINITY && g.borderType !== s && (a[h] = Math.max(a[h], l)); + } + return u(f, o.predecessors.bind(o)), u(d, o.successors.bind(o)), c(t, function(h) { + a[h] = a[r[h]]; + }), a; +} +function hs(n, e, r, t) { + var i = new L(), a = n.graph(), o = bs(a.nodesep, a.edgesep, t); + return c(e, function(s) { + var u; + c(s, function(f) { + var d = r[f]; + if (i.setNode(d), u) { + var h = r[u], l = i.edge(h, d); + i.setEdge(h, d, Math.max(o(n, f, u), l || 0)); + } + u = f; + }); + }), i; +} +function ls(n, e) { + return Yn(N(e), function(r) { + var t = Number.NEGATIVE_INFINITY, i = Number.POSITIVE_INFINITY; + return Ea(r, function(a, o) { + var s = ws(n, o) / 2; + t = Math.max(a + s, t), i = Math.min(a - s, i); + }), t - i; + }); +} +function vs(n, e) { + var r = N(e), t = W(r), i = S(r); + c(["u", "d"], function(a) { + c(["l", "r"], function(o) { + var s = a + o, u = n[s], f; + if (u !== e) { + var d = N(u); + f = o === "l" ? t - W(d) : i - S(d), f && (n[s] = gn(u, function(h) { + return h + f; + })); + } + }); + }); +} +function gs(n, e) { + return gn(n.ul, function(r, t) { + if (e) + return n[e.toLowerCase()][t]; + var i = Q(E(n, t)); + return (i[1] + i[2]) / 2; + }); +} +function ps(n) { + var e = pn(n), r = An(os(n, e), ss(n, e)), t = {}, i; + c(["u", "d"], function(o) { + i = o === "u" ? e : N(e).reverse(), c(["l", "r"], function(s) { + s === "r" && (i = E(i, function(h) { + return N(h).reverse(); + })); + var u = (o === "u" ? n.predecessors : n.successors).bind(n), f = ds(n, i, r, u), d = cs(n, i, f.root, f.align, s === "r"); + s === "r" && (d = gn(d, function(h) { + return -h; + })), t[o + s] = d; + }); + }); + var a = ls(n, t); + return vs(t, a), gs(t, n.graph().align); +} +function bs(n, e, r) { + return function(t, i, a) { + var o = t.node(i), s = t.node(a), u = 0, f; + if (u += o.width / 2, b(o, "labelpos")) + switch (o.labelpos.toLowerCase()) { + case "l": + f = -o.width / 2; + break; + case "r": + f = o.width / 2; + break; + } + if (f && (u += r ? f : -f), f = 0, u += (o.dummy ? e : n) / 2, u += (s.dummy ? e : n) / 2, u += s.width / 2, b(s, "labelpos")) + switch (s.labelpos.toLowerCase()) { + case "l": + f = s.width / 2; + break; + case "r": + f = -s.width / 2; + break; + } + return f && (u += r ? f : -f), f = 0, u; + }; +} +function ws(n, e) { + return n.node(e).width; +} +function ms(n) { + n = Ve(n), _s(n), ya(ps(n), function(e, r) { + n.node(r).x = e; + }); +} +function _s(n) { + var e = pn(n), r = n.graph().ranksep, t = 0; + c(e, function(i) { + var a = S( + E(i, function(o) { + return n.node(o).height; + }) + ); + c(i, function(o) { + n.node(o).y = t + a / 2; + }), t += a + r; + }); +} +function js(n, e) { + var r = e && e.debugTiming ? go : po; + r("layout", function() { + var t = r(" buildLayoutGraph", function() { + return Ps(n); + }); + r(" runLayout", function() { + Es(t, r); + }), r(" updateInputGraph", function() { + ys(n, t); + }); + }); +} +function Es(n, e) { + e(" makeSpaceForEdgeLabels", function() { + $s(n); + }), e(" removeSelfEdges", function() { + Ys(n); + }), e(" acyclic", function() { + so(n); + }), e(" nestingGraph.run", function() { + Do(n); + }), e(" rank", function() { + Mo(Ve(n)); + }), e(" injectEdgeLabelProxies", function() { + Ss(n); + }), e(" removeEmptyRanks", function() { + lo(n); + }), e(" nestingGraph.cleanup", function() { + Bo(n); + }), e(" normalizeRanks", function() { + ho(n); + }), e(" assignRankMinMax", function() { + Ms(n); + }), e(" removeEdgeLabelProxies", function() { + Rs(n); + }), e(" normalize.run", function() { + yo(n); + }), e(" parentDummyChains", function() { + ts(n); + }), e(" addBorderSegments", function() { + bo(n); + }), e(" order", function() { + es(n); + }), e(" insertSelfEdges", function() { + Us(n); + }), e(" adjustCoordinateSystem", function() { + wo(n); + }), e(" position", function() { + ms(n); + }), e(" positionSelfEdges", function() { + qs(n); + }), e(" removeBorderNodes", function() { + Bs(n); + }), e(" normalize.undo", function() { + To(n); + }), e(" fixupEdgeLabelCoords", function() { + ks(n); + }), e(" undoCoordinateSystem", function() { + mo(n); + }), e(" translateGraph", function() { + Fs(n); + }), e(" assignNodeIntersects", function() { + Ds(n); + }), e(" reversePoints", function() { + Gs(n); + }), e(" acyclic.undo", function() { + fo(n); + }); +} +function ys(n, e) { + c(n.nodes(), function(r) { + var t = n.node(r), i = e.node(r); + t && (t.x = i.x, t.y = i.y, e.children(r).length && (t.width = i.width, t.height = i.height)); + }), c(n.edges(), function(r) { + var t = n.edge(r), i = e.edge(r); + t.points = i.points, b(i, "x") && (t.x = i.x, t.y = i.y); + }), n.graph().width = e.graph().width, n.graph().height = e.graph().height; +} +var xs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Ts = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Ls = ["acyclicer", "ranker", "rankdir", "align"], As = ["width", "height"], Ns = { width: 0, height: 0 }, Os = ["minlen", "weight", "width", "height", "labeloffset"], Cs = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: "r" +}, Is = ["labelpos"]; +function Ps(n) { + var e = new L({ multigraph: !0, compound: !0 }), r = Tn(n.graph()); + return e.setGraph( + An({}, Ts, xn(r, xs), un(r, Ls)) + ), c(n.nodes(), function(t) { + var i = Tn(n.node(t)); + e.setNode(t, va(xn(i, As), Ns)), e.setParent(t, n.parent(t)); + }), c(n.edges(), function(t) { + var i = Tn(n.edge(t)); + e.setEdge( + t, + An({}, Cs, xn(i, Os), un(i, Is)) + ); + }), e; +} +function $s(n) { + var e = n.graph(); + e.ranksep /= 2, c(n.edges(), function(r) { + var t = n.edge(r); + t.minlen *= 2, t.labelpos.toLowerCase() !== "c" && (e.rankdir === "TB" || e.rankdir === "BT" ? t.width += t.labeloffset : t.height += t.labeloffset); + }); +} +function Ss(n) { + c(n.edges(), function(e) { + var r = n.edge(e); + if (r.width && r.height) { + var t = n.node(e.v), i = n.node(e.w), a = { rank: (i.rank - t.rank) / 2 + t.rank, e }; + G(n, "edge-proxy", a, "_ep"); + } + }); +} +function Ms(n) { + var e = 0; + c(n.nodes(), function(r) { + var t = n.node(r); + t.borderTop && (t.minRank = n.node(t.borderTop).rank, t.maxRank = n.node(t.borderBottom).rank, e = S(e, t.maxRank)); + }), n.graph().maxRank = e; +} +function Rs(n) { + c(n.nodes(), function(e) { + var r = n.node(e); + r.dummy === "edge-proxy" && (n.edge(r.e).labelRank = r.rank, n.removeNode(e)); + }); +} +function Fs(n) { + var e = Number.POSITIVE_INFINITY, r = 0, t = Number.POSITIVE_INFINITY, i = 0, a = n.graph(), o = a.marginx || 0, s = a.marginy || 0; + function u(f) { + var d = f.x, h = f.y, l = f.width, g = f.height; + e = Math.min(e, d - l / 2), r = Math.max(r, d + l / 2), t = Math.min(t, h - g / 2), i = Math.max(i, h + g / 2); + } + c(n.nodes(), function(f) { + u(n.node(f)); + }), c(n.edges(), function(f) { + var d = n.edge(f); + b(d, "x") && u(d); + }), e -= o, t -= s, c(n.nodes(), function(f) { + var d = n.node(f); + d.x -= e, d.y -= t; + }), c(n.edges(), function(f) { + var d = n.edge(f); + c(d.points, function(h) { + h.x -= e, h.y -= t; + }), b(d, "x") && (d.x -= e), b(d, "y") && (d.y -= t); + }), a.width = r - e + o, a.height = i - t + s; +} +function Ds(n) { + c(n.edges(), function(e) { + var r = n.edge(e), t = n.node(e.v), i = n.node(e.w), a, o; + r.points ? (a = r.points[0], o = r.points[r.points.length - 1]) : (r.points = [], a = i, o = t), r.points.unshift(ge(t, a)), r.points.push(ge(i, o)); + }); +} +function ks(n) { + c(n.edges(), function(e) { + var r = n.edge(e); + if (b(r, "x")) + switch ((r.labelpos === "l" || r.labelpos === "r") && (r.width -= r.labeloffset), r.labelpos) { + case "l": + r.x -= r.width / 2 + r.labeloffset; + break; + case "r": + r.x += r.width / 2 + r.labeloffset; + break; + } + }); +} +function Gs(n) { + c(n.edges(), function(e) { + var r = n.edge(e); + r.reversed && r.points.reverse(); + }); +} +function Bs(n) { + c(n.nodes(), function(e) { + if (n.children(e).length) { + var r = n.node(e), t = n.node(r.borderTop), i = n.node(r.borderBottom), a = n.node(sn(r.borderLeft)), o = n.node(sn(r.borderRight)); + r.width = Math.abs(o.x - a.x), r.height = Math.abs(i.y - t.y), r.x = a.x + r.width / 2, r.y = t.y + r.height / 2; + } + }), c(n.nodes(), function(e) { + n.node(e).dummy === "border" && n.removeNode(e); + }); +} +function Ys(n) { + c(n.edges(), function(e) { + if (e.v === e.w) { + var r = n.node(e.v); + r.selfEdges || (r.selfEdges = []), r.selfEdges.push({ e, label: n.edge(e) }), n.removeEdge(e); + } + }); +} +function Us(n) { + var e = pn(n); + c(e, function(r) { + var t = 0; + c(r, function(i, a) { + var o = n.node(i); + o.order = a + t, c(o.selfEdges, function(s) { + G( + n, + "selfedge", + { + width: s.label.width, + height: s.label.height, + rank: o.rank, + order: a + ++t, + e: s.e, + label: s.label + }, + "_se" + ); + }), delete o.selfEdges; + }); + }); +} +function qs(n) { + c(n.nodes(), function(e) { + var r = n.node(e); + if (r.dummy === "selfedge") { + var t = n.node(r.e.v), i = t.x + t.width / 2, a = t.y, o = r.x - i, s = t.height / 2; + n.setEdge(r.e, r.label), n.removeNode(e), r.label.points = [ + { x: i + 2 * o / 3, y: a - s }, + { x: i + 5 * o / 6, y: a - s }, + { x: i + o, y: a }, + { x: i + 5 * o / 6, y: a + s }, + { x: i + 2 * o / 3, y: a + s } + ], r.label.x = r.x, r.label.y = r.y; + } + }); +} +function xn(n, e) { + return gn(un(n, e), Number); +} +function Tn(n) { + var e = {}; + return c(n, function(r, t) { + e[t.toLowerCase()] = r; + }), e; +} +export { + L as G, + tn as b, + va as d, + c as f, + b as h, + y as i, + js as l, + E as m, + un as p, + D as r, + Un as u +}; diff --git a/webroot/js/node_modules/mermaid/dist/layout-a7b9ff07.js b/webroot/js/node_modules/mermaid/dist/layout-a7b9ff07.js new file mode 100644 index 0000000..d66d035 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/layout-a7b9ff07.js @@ -0,0 +1,3578 @@ +import { a8 as isObjectLike, a9 as baseGetTag, aa as Symbol$1, ab as isArray, ac as isObject, ad as isArrayLike, ae as arrayLikeKeys, af as baseKeys, ag as memoize, ah as isArguments, ai as setToString, aj as overRest, ak as copyObject, al as keysIn, am as getPrototype, an as cloneArrayBuffer, ao as cloneTypedArray, ap as getTag, aq as nodeUtil, ar as baseUnary, as as copyArray, at as isBuffer, au as cloneBuffer, av as initCloneObject, aw as Stack, ax as assignValue, ay as MapCache, az as eq, aA as Uint8Array, aB as isTypedArray, aC as isLength, aD as isIndex, aE as identity, aF as baseFor, aG as root, aH as baseRest, aI as isIterateeCall, aJ as baseAssignValue, aK as Set, aL as isArrayLikeObject, aM as constant, y as isFunction, aN as isEmpty, aO as merge } from "./mermaid-491db2d9.js"; +var symbolTag$3 = "[object Symbol]"; +function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3; +} +function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} +var INFINITY$3 = 1 / 0; +var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0; +function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY$3 ? "-0" : result; +} +var reWhitespace = /\s/; +function trimmedEndIndex(string) { + var index = string.length; + while (index-- && reWhitespace.test(string.charAt(index))) { + } + return index; +} +var reTrimStart = /^\s+/; +function baseTrim(string) { + return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; +} +var NAN = 0 / 0; +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; +var reIsBinary = /^0b[01]+$/i; +var reIsOctal = /^0o[0-7]+$/i; +var freeParseInt = parseInt; +function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; +} +var INFINITY$2 = 1 / 0, MAX_INTEGER = 17976931348623157e292; +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY$2 || value === -INFINITY$2) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} +function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; +} +function noop() { +} +function arrayEach(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} +function baseIsNaN(value) { + return value !== value; +} +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} +function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); +} +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); +} +var MAX_MEMOIZE_SIZE = 500; +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; +} +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +var reEscapeChar = /\\(\\)?/g; +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result; +}); +const stringToPath$1 = stringToPath; +function toString(value) { + return value == null ? "" : baseToString(value); +} +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath$1(toString(value)); +} +var INFINITY$1 = 1 / 0; +function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result; +} +function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; +} +function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; +} +function arrayPush(array, values2) { + var index = -1, length = values2.length, offset = array.length; + while (++index < length) { + array[offset + index] = values2[index]; + } + return array; +} +var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0; +function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); +} +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} +function flatRest(func) { + return setToString(overRest(func, void 0, flatten), func + ""); +} +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} +function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} +function stubArray() { + return []; +} +var objectProto$5 = Object.prototype; +var propertyIsEnumerable = objectProto$5.propertyIsEnumerable; +var nativeGetSymbols$1 = Object.getOwnPropertySymbols; +var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols$1(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; +const getSymbols$1 = getSymbols; +function copySymbols(source, object) { + return copyObject(source, getSymbols$1(source), object); +} +var nativeGetSymbols = Object.getOwnPropertySymbols; +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols$1(object)); + object = getPrototype(object); + } + return result; +}; +const getSymbolsIn$1 = getSymbolsIn; +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn$1(source), object); +} +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols$1); +} +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn$1); +} +var objectProto$4 = Object.prototype; +var hasOwnProperty$4 = objectProto$4.hasOwnProperty; +function initCloneArray(array) { + var length = array.length, result = new array.constructor(length); + if (length && typeof array[0] == "string" && hasOwnProperty$4.call(array, "index")) { + result.index = array.index; + result.input = array.input; + } + return result; +} +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} +var reFlags = /\w*$/; +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} +var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0; +function cloneSymbol(symbol) { + return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {}; +} +var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]"; +var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]"; +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag$2: + return cloneArrayBuffer(object); + case boolTag$2: + case dateTag$2: + return new Ctor(+object); + case dataViewTag$2: + return cloneDataView(object, isDeep); + case float32Tag$1: + case float64Tag$1: + case int8Tag$1: + case int16Tag$1: + case int32Tag$1: + case uint8Tag$1: + case uint8ClampedTag$1: + case uint16Tag$1: + case uint32Tag$1: + return cloneTypedArray(object, isDeep); + case mapTag$3: + return new Ctor(); + case numberTag$2: + case stringTag$2: + return new Ctor(object); + case regexpTag$2: + return cloneRegExp(object); + case setTag$3: + return new Ctor(); + case symbolTag$2: + return cloneSymbol(object); + } +} +var mapTag$2 = "[object Map]"; +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag$2; +} +var nodeIsMap = nodeUtil && nodeUtil.isMap; +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; +const isMap$1 = isMap; +var setTag$2 = "[object Set]"; +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag$2; +} +var nodeIsSet = nodeUtil && nodeUtil.isSet; +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; +const isSet$1 = isSet; +var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4; +var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]"; +var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; +var cloneableTags = {}; +cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== void 0) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + if (isSet$1(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap$1(value)) { + value.forEach(function(subValue, key2) { + result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? void 0 : keysFunc(value); + arrayEach(props || value, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value[key2]; + } + assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + return result; +} +var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} +var HASH_UNDEFINED = "__lodash_hash_undefined__"; +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} +function setCacheHas(value) { + return this.__data__.has(value); +} +function SetCache(values2) { + var index = -1, length = values2 == null ? 0 : values2.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values2[index]); + } +} +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; +function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} +function cacheHas(cache, key) { + return cache.has(key); +} +var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2; +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result; +} +function mapToArray(map2) { + var index = -1, result = Array(map2.size); + map2.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} +function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} +var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2; +var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]"; +var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]"; +var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG$2; + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} +var COMPARE_PARTIAL_FLAG$3 = 1; +var objectProto$3 = Object.prototype; +var hasOwnProperty$3 = objectProto$3.hasOwnProperty; +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty$3.call(other, key))) { + return false; + } + } + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result; +} +var COMPARE_PARTIAL_FLAG$2 = 1; +var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]"; +var objectProto$2 = Object.prototype; +var hasOwnProperty$2 = objectProto$2.hasOwnProperty; +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) { + var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$2.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} +var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2; +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) { + return false; + } + } + } + return true; +} +function isStrictComparable(value) { + return value === value && !isObject(value); +} +function getMatchData(object) { + var result = keys(object), length = result.length; + while (length--) { + var key = result[length], value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); + }; +} +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} +function baseHasIn(object, key) { + return object != null && key in Object(object); +} +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); +} +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} +var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} +function baseProperty(key) { + return function(object) { + return object == null ? void 0 : object[key]; + }; +} +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} +function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); +} +function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); +} +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} +var baseEach = createBaseEach(baseForOwn); +const baseEach$1 = baseEach; +var now = function() { + return root.Date.now(); +}; +const now$1 = now; +var objectProto$1 = Object.prototype; +var hasOwnProperty$1 = objectProto$1.hasOwnProperty; +var defaults = baseRest(function(object, sources) { + object = Object(object); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + if (value === void 0 || eq(value, objectProto$1[key]) && !hasOwnProperty$1.call(object, key)) { + object[key] = source[key]; + } + } + } + return object; +}); +const defaults$1 = defaults; +function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : void 0; +} +function castFunction(value) { + return typeof value == "function" ? value : identity; +} +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach$1; + return func(collection, castFunction(iteratee)); +} +function baseFilter(collection, predicate) { + var result = []; + baseEach$1(collection, function(value, index, collection2) { + if (predicate(value, index, collection2)) { + result.push(value); + } + }); + return result; +} +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate)); +} +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate); + collection = keys(collection); + predicate = function(key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : void 0; + }; +} +var nativeMax$1 = Math.max; +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax$1(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate), index); +} +var find = createFind(findIndex); +const find$1 = find; +function baseMap(collection, iteratee) { + var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; + baseEach$1(collection, function(value, key, collection2) { + result[++index] = iteratee(value, key, collection2); + }); + return result; +} +function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee)); +} +function forIn(object, iteratee) { + return object == null ? object : baseFor(object, castFunction(iteratee), keysIn); +} +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} +function baseGt(value, other) { + return value > other; +} +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} +function values(object) { + return object == null ? [] : baseValues(object, keys(object)); +} +function isUndefined(value) { + return value === void 0; +} +function baseLt(value, other) { + return value < other; +} +function mapValues(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee); + baseForOwn(object, function(value, key, object2) { + baseAssignValue(result, key, iteratee(value, key, object2)); + }); + return result; +} +function baseExtremum(array, iteratee, comparator) { + var index = -1, length = array.length; + while (++index < length) { + var value = array[index], current = iteratee(value); + if (current != null && (computed === void 0 ? current === current && !isSymbol(current) : comparator(current, computed))) { + var computed = current, result = value; + } + } + return result; +} +function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : void 0; +} +function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : void 0; +} +function minBy(array, iteratee) { + return array && array.length ? baseExtremum(array, baseIteratee(iteratee), baseLt) : void 0; +} +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + var index = -1, length = path.length, lastIndex = length - 1, nested = object; + while (nested != null && ++index < length) { + var key = toKey(path[index]), newValue = value; + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return object; + } + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : void 0; + if (newValue === void 0) { + newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} +function basePickBy(object, paths, predicate) { + var index = -1, length = paths.length, result = {}; + while (++index < length) { + var path = paths[index], value = baseGet(object, path); + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} +function baseSortBy(array, comparer) { + var length = array.length; + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); + var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); + if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { + return 1; + } + if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { + return -1; + } + } + return 0; +} +function compareMultiple(object, other, orders) { + var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order2 = orders[index]; + return result * (order2 == "desc" ? -1 : 1); + } + } + return object.index - other.index; +} +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + }; + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + var result = baseMap(collection, function(value, key, collection2) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { "criteria": criteria, "index": ++index, "value": value }; + }); + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} +var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); +}); +const pick$1 = pick; +var nativeCeil = Math.ceil, nativeMax = Math.max; +function baseRange(start, end, step, fromRight) { + var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result = Array(length); + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != "number" && isIterateeCall(start, end, step)) { + end = step = void 0; + } + start = toFinite(start); + if (end === void 0) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === void 0 ? start < end ? 1 : -1 : toFinite(step); + return baseRange(start, end, step, fromRight); + }; +} +var range = createRange(); +const range$1 = range; +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection2) { + accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2); + }); + return accumulator; +} +function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; + return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1); +} +var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); +}); +const sortBy$1 = sortBy; +var INFINITY = 1 / 0; +var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) { + return new Set(values2); +}; +const createSet$1 = createSet; +var LARGE_ARRAY_SIZE = 200; +function baseUniq(array, iteratee, comparator) { + var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet$1(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} +var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); +}); +const union$1 = union; +var idCounter = 0; +function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; +} +function baseZipObject(props, values2, assignFunc) { + var index = -1, length = props.length, valsLength = values2.length, result = {}; + while (++index < length) { + var value = index < valsLength ? values2[index] : void 0; + assignFunc(result, props[index], value); + } + return result; +} +function zipObject(props, values2) { + return baseZipObject(props || [], values2 || [], assignValue); +} +var DEFAULT_EDGE_NAME = "\0"; +var GRAPH_NODE = "\0"; +var EDGE_KEY_DELIM = ""; +class Graph { + constructor(opts = {}) { + this._isDirected = has(opts, "directed") ? opts.directed : true; + this._isMultigraph = has(opts, "multigraph") ? opts.multigraph : false; + this._isCompound = has(opts, "compound") ? opts.compound : false; + this._label = void 0; + this._defaultNodeLabelFn = constant(void 0); + this._defaultEdgeLabelFn = constant(void 0); + this._nodes = {}; + if (this._isCompound) { + this._parent = {}; + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + this._in = {}; + this._preds = {}; + this._out = {}; + this._sucs = {}; + this._edgeObjs = {}; + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction(newDefault)) { + newDefault = constant(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys(this._nodes); + } + sources() { + var self = this; + return filter(this.nodes(), function(v) { + return isEmpty(self._in[v]); + }); + } + sinks() { + var self = this; + return filter(this.nodes(), function(v) { + return isEmpty(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach(vs, function(v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has(this._nodes, v)) { + var removeEdge = function(e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach(this.children(v), function(child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach(keys(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach(keys(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error("Cannot set parent in a non-compound graph"); + } + if (isUndefined(parent)) { + parent = GRAPH_NODE; + } else { + parent += ""; + for (var ancestor = parent; !isUndefined(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error("Setting " + parent + " as parent of " + v + " would create a cycle"); + } + } + this.setNode(parent); + } + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined(v)) { + v = GRAPH_NODE; + } + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return union$1(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter2) { + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound + }); + copy.setGraph(this.graph()); + var self = this; + forEach(this._nodes, function(value, v) { + if (filter2(v)) { + copy.setNode(v, value); + } + }); + forEach(this._edgeObjs, function(e) { + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === void 0 || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + if (this._isCompound) { + forEach(copy.nodes(), function(v) { + copy.setParent(v, findParent(v)); + }); + } + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction(newDefault)) { + newDefault = constant(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce(vs, function(v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + v = "" + v; + w = "" + w; + if (!isUndefined(name)) { + name = "" + name; + } + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + if (!isUndefined(name) && !this._isMultigraph) { + throw new Error("Cannot set a named edge when isMultigraph = false"); + } + this.setNode(v); + this.setNode(w); + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + v = edgeObj.v; + w = edgeObj.w; + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); + return has(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values(inV); + if (!u) { + return edges; + } + return filter(edges, function(edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values(outV); + if (!w) { + return edges; + } + return filter(edges, function(edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} +Graph.prototype._nodeCount = 0; +Graph.prototype._edgeCount = 0; +function incrementOrInitEntry(map2, k) { + if (map2[k]) { + map2[k]++; + } else { + map2[k] = 1; + } +} +function decrementOrRemoveEntry(map2, k) { + if (!--map2[k]) { + delete map2[k]; + } +} +function edgeArgsToId(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined(name) ? DEFAULT_EDGE_NAME : name); +} +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v, w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return "[" + strs.join(", ") + "]"; + } +} +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} +function filterOutLinks(k, v) { + if (k !== "_next" && k !== "_prev") { + return v; + } +} +var DEFAULT_WEIGHT_FN = constant(1); +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + return flatten( + map(results, function(e) { + return g.outEdges(e.v, e.w); + }) + ); +} +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + var entry; + while (g.nodeCount()) { + while (entry = sinks.dequeue()) { + removeNode(g, buckets, zeroIdx, entry); + } + while (entry = sources.dequeue()) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + return results; +} +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : void 0; + forEach(g.inEdges(entry.v), function(edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + forEach(g.outEdges(entry.v), function(edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry["in"] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + g.removeNode(entry.v); + return results; +} +function buildState(g, weightFn) { + var fasGraph = new Graph(); + var maxIn = 0; + var maxOut = 0; + forEach(g.nodes(), function(v) { + fasGraph.setNode(v, { v, in: 0, out: 0 }); + }); + forEach(g.edges(), function(e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); + maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight); + }); + var buckets = range$1(maxOut + maxIn + 3).map(function() { + return new List(); + }); + var zeroIdx = maxIn + 1; + forEach(fasGraph.nodes(), function(v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + return { graph: fasGraph, buckets, zeroIdx }; +} +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry["in"]) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry); + } +} +function run$2(g) { + var fas = g.graph().acyclicer === "greedy" ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach(fas, function(e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId("rev")); + }); + function weightFn(g2) { + return function(e) { + return g2.edge(e).weight; + }; + } +} +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + function dfs2(v) { + if (has(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach(g.outEdges(v), function(e) { + if (has(stack, e.w)) { + fas.push(e); + } else { + dfs2(e.w); + } + }); + delete stack[v]; + } + forEach(g.nodes(), dfs2); + return fas; +} +function undo$2(g) { + forEach(g.edges(), function(e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId(name); + } while (g.hasNode(v)); + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} +function simplify(g) { + var simplified = new Graph().setGraph(g.graph()); + forEach(g.nodes(), function(v) { + simplified.setNode(v, g.node(v)); + }); + forEach(g.edges(), function(e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen) + }); + }); + return simplified; +} +function asNonCompoundGraph(g) { + var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach(g.nodes(), function(v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach(g.edges(), function(e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + if (!dx && !dy) { + throw new Error("Not possible to find intersection inside of the rectangle"); + } + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = w * dy / dx; + } + return { x: x + sx, y: y + sy }; +} +function buildLayerMatrix(g) { + var layering = map(range$1(maxRank(g) + 1), function() { + return []; + }); + forEach(g.nodes(), function(v) { + var node = g.node(v); + var rank2 = node.rank; + if (!isUndefined(rank2)) { + layering[rank2][node.order] = v; + } + }); + return layering; +} +function normalizeRanks(g) { + var min$1 = min( + map(g.nodes(), function(v) { + return g.node(v).rank; + }) + ); + forEach(g.nodes(), function(v) { + var node = g.node(v); + if (has(node, "rank")) { + node.rank -= min$1; + } + }); +} +function removeEmptyRanks(g) { + var offset = min( + map(g.nodes(), function(v) { + return g.node(v).rank; + }) + ); + var layers = []; + forEach(g.nodes(), function(v) { + var rank2 = g.node(v).rank - offset; + if (!layers[rank2]) { + layers[rank2] = []; + } + layers[rank2].push(v); + }); + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach(layers, function(vs, i) { + if (isUndefined(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach(vs, function(v) { + g.node(v).rank += delta; + }); + } + }); +} +function addBorderNode$1(g, prefix, rank2, order2) { + var node = { + width: 0, + height: 0 + }; + if (arguments.length >= 4) { + node.rank = rank2; + node.order = order2; + } + return addDummyNode(g, "border", node, prefix); +} +function maxRank(g) { + return max( + map(g.nodes(), function(v) { + var rank2 = g.node(v).rank; + if (!isUndefined(rank2)) { + return rank2; + } + }) + ); +} +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach(collection, function(value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} +function time(name, fn) { + var start = now$1(); + try { + return fn(); + } finally { + console.log(name + " time: " + (now$1() - start) + "ms"); + } +} +function notime(name, fn) { + return fn(); +} +function addBorderSegments(g) { + function dfs2(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach(children, dfs2); + } + if (has(node, "minRank")) { + node.borderLeft = []; + node.borderRight = []; + for (var rank2 = node.minRank, maxRank2 = node.maxRank + 1; rank2 < maxRank2; ++rank2) { + addBorderNode(g, "borderLeft", "_bl", v, node, rank2); + addBorderNode(g, "borderRight", "_br", v, node, rank2); + } + } + } + forEach(g.children(), dfs2); +} +function addBorderNode(g, prop, prefix, sg, sgNode, rank2) { + var label = { width: 0, height: 0, rank: rank2, borderType: prop }; + var prev = sgNode[prop][rank2 - 1]; + var curr = addDummyNode(g, "border", label, prefix); + sgNode[prop][rank2] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "lr" || rankDir === "rl") { + swapWidthHeight(g); + } +} +function undo$1(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "bt" || rankDir === "rl") { + reverseY(g); + } + if (rankDir === "lr" || rankDir === "rl") { + swapXY(g); + swapWidthHeight(g); + } +} +function swapWidthHeight(g) { + forEach(g.nodes(), function(v) { + swapWidthHeightOne(g.node(v)); + }); + forEach(g.edges(), function(e) { + swapWidthHeightOne(g.edge(e)); + }); +} +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} +function reverseY(g) { + forEach(g.nodes(), function(v) { + reverseYOne(g.node(v)); + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + forEach(edge.points, reverseYOne); + if (has(edge, "y")) { + reverseYOne(edge); + } + }); +} +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} +function swapXY(g) { + forEach(g.nodes(), function(v) { + swapXYOne(g.node(v)); + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + forEach(edge.points, swapXYOne); + if (has(edge, "x")) { + swapXYOne(edge); + } + }); +} +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} +function run$1(g) { + g.graph().dummyChains = []; + forEach(g.edges(), function(edge) { + normalizeEdge(g, edge); + }); +} +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + if (wRank === vRank + 1) + return; + g.removeEdge(e); + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel, + edgeObj: e, + rank: vRank + }; + dummy = addDummyNode(g, "edge", attrs, "_d"); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + attrs.dummy = "edge-label"; + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} +function undo(g) { + forEach(g.graph().dummyChains, function(v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === "edge-label") { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} +function longestPath(g) { + var visited = {}; + function dfs2(v) { + var label = g.node(v); + if (has(visited, v)) { + return label.rank; + } + visited[v] = true; + var rank2 = min( + map(g.outEdges(v), function(e) { + return dfs2(e.w) - g.edge(e).minlen; + }) + ); + if (rank2 === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank2 === void 0 || // return value of _.map([]) for Lodash 4 + rank2 === null) { + rank2 = 0; + } + return label.rank = rank2; + } + forEach(g.sources(), dfs2); +} +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} +function feasibleTree(g) { + var t = new Graph({ directed: false }); + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + return t; +} +function tightTree(t, g) { + function dfs2(v) { + forEach(g.nodeEdges(v), function(e) { + var edgeV = e.v, w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs2(w); + } + }); + } + forEach(t.nodes(), dfs2); + return t.nodeCount(); +} +function findMinSlackEdge(t, g) { + return minBy(g.edges(), function(e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} +function shiftRanks(t, g, delta) { + forEach(t.nodes(), function(v) { + g.node(v).rank += delta; + }); +} +function CycleException() { +} +CycleException.prototype = new Error(); +function dfs$1(g, vs, order2) { + if (!isArray(vs)) { + vs = [vs]; + } + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + var acc = []; + var visited = {}; + forEach(vs, function(v) { + if (!g.hasNode(v)) { + throw new Error("Graph does not have node: " + v); + } + doDfs(g, v, order2 === "post", visited, navigation, acc); + }); + return acc; +} +function doDfs(g, v, postorder2, visited, navigation, acc) { + if (!has(visited, v)) { + visited[v] = true; + if (!postorder2) { + acc.push(v); + } + forEach(navigation(v), function(w) { + doDfs(g, w, postorder2, visited, navigation, acc); + }); + if (postorder2) { + acc.push(v); + } + } +} +function postorder$1(g, vs) { + return dfs$1(g, vs, "post"); +} +function preorder(g, vs) { + return dfs$1(g, vs, "pre"); +} +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + var e, f; + while (e = leaveEdge(t)) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} +function initCutValues(t, g) { + var vs = postorder$1(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach(vs, function(v) { + assignCutValue(t, g, v); + }); +} +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + var childIsTail = true; + var graphEdge = g.edge(child, parent); + var cutValue = 0; + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + cutValue = graphEdge.weight; + forEach(g.nodeEdges(child), function(e) { + var isOutEdge = e.v === child, other = isOutEdge ? e.w : e.v; + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, otherWeight = g.edge(e).weight; + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + return cutValue; +} +function initLowLimValues(tree, root2) { + if (arguments.length < 2) { + root2 = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root2); +} +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + visited[v] = true; + forEach(tree.neighbors(v), function(w) { + if (!has(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + delete label.parent; + } + return nextLim; +} +function leaveEdge(tree) { + return find$1(tree.edges(), function(e) { + return tree.edge(e).cutvalue < 0; + }); +} +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + var candidates = filter(g.edges(), function(edge2) { + return flip === isDescendant(t, t.node(edge2.v), tailLabel) && flip !== isDescendant(t, t.node(edge2.w), tailLabel); + }); + return minBy(candidates, function(edge2) { + return slack(g, edge2); + }); +} +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} +function updateRanks(t, g) { + var root2 = find$1(t.nodes(), function(v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root2); + vs = vs.slice(1); + forEach(vs, function(v) { + var parent = t.node(v).parent, edge = g.edge(v, parent), flipped = false; + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} +function rank(g) { + switch (g.graph().ranker) { + case "network-simplex": + networkSimplexRanker(g); + break; + case "tight-tree": + tightTreeRanker(g); + break; + case "longest-path": + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} +var longestPathRanker = longestPath; +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} +function networkSimplexRanker(g) { + networkSimplex(g); +} +function run(g) { + var root2 = addDummyNode(g, "root", {}, "_root"); + var depths = treeDepths(g); + var height = max(values(depths)) - 1; + var nodeSep = 2 * height + 1; + g.graph().nestingRoot = root2; + forEach(g.edges(), function(e) { + g.edge(e).minlen *= nodeSep; + }); + var weight = sumWeights(g) + 1; + forEach(g.children(), function(child) { + dfs(g, root2, nodeSep, weight, height, depths, child); + }); + g.graph().nodeRankFactor = nodeSep; +} +function dfs(g, root2, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root2) { + g.setEdge(root2, v, { weight: 0, minlen: nodeSep }); + } + return; + } + var top = addBorderNode$1(g, "_bt"); + var bottom = addBorderNode$1(g, "_bb"); + var label = g.node(v); + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + forEach(children, function(child) { + dfs(g, root2, nodeSep, weight, height, depths, child); + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + g.setEdge(top, childTop, { + weight: thisWeight, + minlen, + nestingEdge: true + }); + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen, + nestingEdge: true + }); + }); + if (!g.parent(v)) { + g.setEdge(root2, top, { weight: 0, minlen: height + depths[v] }); + } +} +function treeDepths(g) { + var depths = {}; + function dfs2(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach(children, function(child) { + dfs2(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach(g.children(), function(v) { + dfs2(v, 1); + }); + return depths; +} +function sumWeights(g) { + return reduce( + g.edges(), + function(acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, rootPrev; + forEach(vs, function(v) { + var child = g.parent(v), parent, prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); +} +function buildLayerGraph(g, rank2, relationship) { + var root2 = createRootNode(g), result = new Graph({ compound: true }).setGraph({ root: root2 }).setDefaultNodeLabel(function(v) { + return g.node(v); + }); + forEach(g.nodes(), function(v) { + var node = g.node(v), parent = g.parent(v); + if (node.rank === rank2 || node.minRank <= rank2 && rank2 <= node.maxRank) { + result.setNode(v); + result.setParent(v, parent || root2); + forEach(g[relationship](v), function(e) { + var u = e.v === v ? e.w : e.v, edge = result.edge(u, v), weight = !isUndefined(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + if (has(node, "minRank")) { + result.setNode(v, { + borderLeft: node.borderLeft[rank2], + borderRight: node.borderRight[rank2] + }); + } + } + }); + return result; +} +function createRootNode(g) { + var v; + while (g.hasNode(v = uniqueId("_root"))) + ; + return v; +} +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} +function twoLayerCrossCount(g, northLayer, southLayer) { + var southPos = zipObject( + southLayer, + map(southLayer, function(v, i) { + return i; + }) + ); + var southEntries = flatten( + map(northLayer, function(v) { + return sortBy$1( + map(g.outEdges(v), function(e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + "pos" + ); + }) + ); + var firstIndex = 1; + while (firstIndex < southLayer.length) + firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map(new Array(treeSize), function() { + return 0; + }); + var cc = 0; + forEach( + // @ts-expect-error + southEntries.forEach(function(entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + while (index > 0) { + if (index % 2) { + weightSum += tree[index + 1]; + } + index = index - 1 >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + return cc; +} +function initOrder(g) { + var visited = {}; + var simpleNodes = filter(g.nodes(), function(v) { + return !g.children(v).length; + }); + var maxRank2 = max( + map(simpleNodes, function(v) { + return g.node(v).rank; + }) + ); + var layers = map(range$1(maxRank2 + 1), function() { + return []; + }); + function dfs2(v) { + if (has(visited, v)) + return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach(g.successors(v), dfs2); + } + var orderedVs = sortBy$1(simpleNodes, function(v) { + return g.node(v).rank; + }); + forEach(orderedVs, dfs2); + return layers; +} +function barycenter(g, movable) { + return map(movable, function(v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v }; + } else { + var result = reduce( + inV, + function(acc, e) { + var edge = g.edge(e), nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight + }; + }, + { sum: 0, weight: 0 } + ); + return { + v, + barycenter: result.sum / result.weight, + weight: result.weight + }; + } + }); +} +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach(entries, function(entry, i) { + var tmp = mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i + }; + if (!isUndefined(entry.barycenter)) { + tmp.barycenter = entry.barycenter; + tmp.weight = entry.weight; + } + }); + forEach(cg.edges(), function(e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined(entryV) && !isUndefined(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + var sourceSet = filter(mappedEntries, function(entry) { + return !entry.indegree; + }); + return doResolveConflicts(sourceSet); +} +function doResolveConflicts(sourceSet) { + var entries = []; + function handleIn(vEntry) { + return function(uEntry) { + if (uEntry.merged) { + return; + } + if (isUndefined(uEntry.barycenter) || isUndefined(vEntry.barycenter) || uEntry.barycenter >= vEntry.barycenter) { + mergeEntries(vEntry, uEntry); + } + }; + } + function handleOut(vEntry) { + return function(wEntry) { + wEntry["in"].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach(entry["in"].reverse(), handleIn(entry)); + forEach(entry.out, handleOut(entry)); + } + return map( + filter(entries, function(entry2) { + return !entry2.merged; + }), + function(entry2) { + return pick$1(entry2, ["vs", "i", "barycenter", "weight"]); + } + ); +} +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} +function sort(entries, biasRight) { + var parts = partition(entries, function(entry) { + return has(entry, "barycenter"); + }); + var sortable = parts.lhs, unsortable = sortBy$1(parts.rhs, function(entry) { + return -entry.i; + }), vs = [], sum = 0, weight = 0, vsIndex = 0; + sortable.sort(compareWithBias(!!biasRight)); + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + forEach(sortable, function(entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + var result = { vs: flatten(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} +function consumeUnsortable(vs, unsortable, index) { + var last$1; + while (unsortable.length && (last$1 = last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last$1.vs); + index++; + } + return index; +} +function compareWithBias(bias) { + return function(entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : void 0; + var br = node ? node.borderRight : void 0; + var subgraphs = {}; + if (bl) { + movable = filter(movable, function(w) { + return w !== bl && w !== br; + }); + } + var barycenters = barycenter(g, movable); + forEach(barycenters, function(entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has(subgraphResult, "barycenter")) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + var result = sort(entries, biasRight); + if (bl) { + result.vs = flatten([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), brPred = g.node(g.predecessors(br)[0]); + if (!has(result, "barycenter")) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + return result; +} +function expandSubgraphs(entries, subgraphs) { + forEach(entries, function(entry) { + entry.vs = flatten( + entry.vs.map(function(v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} +function mergeBarycenters(target, other) { + if (!isUndefined(target.barycenter)) { + target.barycenter = (target.barycenter * target.weight + other.barycenter * other.weight) / (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} +function order(g) { + var maxRank$1 = maxRank(g), downLayerGraphs = buildLayerGraphs(g, range$1(1, maxRank$1 + 1), "inEdges"), upLayerGraphs = buildLayerGraphs(g, range$1(maxRank$1 - 1, -1, -1), "outEdges"); + var layering = initOrder(g); + assignOrder(g, layering); + var bestCC = Number.POSITIVE_INFINITY, best; + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = cloneDeep(layering); + bestCC = cc; + } + } + assignOrder(g, best); +} +function buildLayerGraphs(g, ranks, relationship) { + return map(ranks, function(rank2) { + return buildLayerGraph(g, rank2, relationship); + }); +} +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new Graph(); + forEach(layerGraphs, function(lg) { + var root2 = lg.graph().root; + var sorted = sortSubgraph(lg, root2, cg, biasRight); + forEach(sorted.vs, function(v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} +function assignOrder(g, layering) { + forEach(layering, function(layer) { + forEach(layer, function(v, i) { + g.node(v).order = i; + }); + }); +} +function parentDummyChains(g) { + var postorderNums = postorder(g); + forEach(g.graph().dummyChains, function(v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + while (v !== edgeObj.w) { + node = g.node(v); + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + if (pathV === lca) { + ascending = false; + } + } + if (!ascending) { + while (pathIdx < path.length - 1 && g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) { + pathIdx++; + } + pathV = path[pathIdx]; + } + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + return { path: vPath.concat(wPath.reverse()), lca }; +} +function postorder(g) { + var result = {}; + var lim = 0; + function dfs2(v) { + var low = lim; + forEach(g.children(v), dfs2); + result[v] = { low, lim: lim++ }; + } + forEach(g.children(), dfs2); + return result; +} +function findType1Conflicts(g, layering) { + var conflicts = {}; + function visitLayer(prevLayer, layer) { + var k0 = 0, scanPos = 0, prevLayerLength = prevLayer.length, lastNode = last(layer); + forEach(layer, function(v, i) { + var w = findOtherInnerSegmentNode(g, v), k1 = w ? g.node(w).order : prevLayerLength; + if (w || v === lastNode) { + forEach(layer.slice(scanPos, i + 1), function(scanNode) { + forEach(g.predecessors(scanNode), function(u) { + var uLabel = g.node(u), uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + scanPos = i + 1; + k0 = k1; + } + }); + return layer; + } + reduce(layering, visitLayer); + return conflicts; +} +function findType2Conflicts(g, layering) { + var conflicts = {}; + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach(range$1(southPos, southEnd), function(i) { + v = south[i]; + if (g.node(v).dummy) { + forEach(g.predecessors(v), function(u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + function visitLayer(north, south) { + var prevNorthPos = -1, nextNorthPos, southPos = 0; + forEach(south, function(v, southLookahead) { + if (g.node(v).dummy === "border") { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + return south; + } + reduce(layering, visitLayer); + return conflicts; +} +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return find$1(g.predecessors(v), function(u) { + return g.node(u).dummy; + }); + } +} +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has(conflicts[v], w); +} +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root2 = {}, align = {}, pos = {}; + forEach(layering, function(layer) { + forEach(layer, function(v, order2) { + root2[v] = v; + align[v] = v; + pos[v] = order2; + }); + }); + forEach(layering, function(layer) { + var prevIdx = -1; + forEach(layer, function(v) { + var ws = neighborFn(v); + if (ws.length) { + ws = sortBy$1(ws, function(w2) { + return pos[w2]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root2[v] = root2[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + return { root: root2, align }; +} +function horizontalCompaction(g, layering, root2, align, reverseSep) { + var xs = {}, blockG = buildBlockGraph(g, layering, root2, reverseSep), borderType = reverseSep ? "borderLeft" : "borderRight"; + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + elem = stack.pop(); + } + } + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + function pass2(elem) { + var min2 = blockG.outEdges(elem).reduce(function(acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + var node = g.node(elem); + if (min2 !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min2); + } + } + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + forEach(align, function(v) { + xs[v] = xs[root2[v]]; + }); + return xs; +} +function buildBlockGraph(g, layering, root2, reverseSep) { + var blockGraph = new Graph(), graphLabel = g.graph(), sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + forEach(layering, function(layer) { + var u; + forEach(layer, function(v) { + var vRoot = root2[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root2[u], prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + return blockGraph; +} +function findSmallestWidthAlignment(g, xss) { + return minBy(values(xss), function(xs) { + var max2 = Number.NEGATIVE_INFINITY; + var min2 = Number.POSITIVE_INFINITY; + forIn(xs, function(x, v) { + var halfWidth = width(g, v) / 2; + max2 = Math.max(x + halfWidth, max2); + min2 = Math.min(x - halfWidth, min2); + }); + return max2 - min2; + }); +} +function alignCoordinates(xss, alignTo) { + var alignToVals = values(alignTo), alignToMin = min(alignToVals), alignToMax = max(alignToVals); + forEach(["u", "d"], function(vert) { + forEach(["l", "r"], function(horiz) { + var alignment = vert + horiz, xs = xss[alignment], delta; + if (xs === alignTo) + return; + var xsVals = values(xs); + delta = horiz === "l" ? alignToMin - min(xsVals) : alignToMax - max(xsVals); + if (delta) { + xss[alignment] = mapValues(xs, function(x) { + return x + delta; + }); + } + }); + }); +} +function balance(xss, align) { + return mapValues(xss.ul, function(ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = sortBy$1(map(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + var xss = {}; + var adjustedLayering; + forEach(["u", "d"], function(vert) { + adjustedLayering = vert === "u" ? layering : values(layering).reverse(); + forEach(["l", "r"], function(horiz) { + if (horiz === "r") { + adjustedLayering = map(adjustedLayering, function(inner) { + return values(inner).reverse(); + }); + } + var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === "r"); + if (horiz === "r") { + xs = mapValues(xs, function(x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} +function sep(nodeSep, edgeSep, reverseSep) { + return function(g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + sum += vLabel.width / 2; + if (has(vLabel, "labelpos")) { + switch (vLabel.labelpos.toLowerCase()) { + case "l": + delta = -vLabel.width / 2; + break; + case "r": + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + sum += wLabel.width / 2; + if (has(wLabel, "labelpos")) { + switch (wLabel.labelpos.toLowerCase()) { + case "l": + delta = wLabel.width / 2; + break; + case "r": + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + return sum; + }; +} +function width(g, v) { + return g.node(v).width; +} +function position(g) { + g = asNonCompoundGraph(g); + positionY(g); + forOwn(positionX(g), function(x, v) { + g.node(v).x = x; + }); +} +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach(layering, function(layer) { + var maxHeight = max( + map(layer, function(v) { + return g.node(v).height; + }) + ); + forEach(layer, function(v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} +function layout(g, opts) { + var time$1 = opts && opts.debugTiming ? time : notime; + time$1("layout", function() { + var layoutGraph = time$1(" buildLayoutGraph", function() { + return buildLayoutGraph(g); + }); + time$1(" runLayout", function() { + runLayout(layoutGraph, time$1); + }); + time$1(" updateInputGraph", function() { + updateInputGraph(g, layoutGraph); + }); + }); +} +function runLayout(g, time2) { + time2(" makeSpaceForEdgeLabels", function() { + makeSpaceForEdgeLabels(g); + }); + time2(" removeSelfEdges", function() { + removeSelfEdges(g); + }); + time2(" acyclic", function() { + run$2(g); + }); + time2(" nestingGraph.run", function() { + run(g); + }); + time2(" rank", function() { + rank(asNonCompoundGraph(g)); + }); + time2(" injectEdgeLabelProxies", function() { + injectEdgeLabelProxies(g); + }); + time2(" removeEmptyRanks", function() { + removeEmptyRanks(g); + }); + time2(" nestingGraph.cleanup", function() { + cleanup(g); + }); + time2(" normalizeRanks", function() { + normalizeRanks(g); + }); + time2(" assignRankMinMax", function() { + assignRankMinMax(g); + }); + time2(" removeEdgeLabelProxies", function() { + removeEdgeLabelProxies(g); + }); + time2(" normalize.run", function() { + run$1(g); + }); + time2(" parentDummyChains", function() { + parentDummyChains(g); + }); + time2(" addBorderSegments", function() { + addBorderSegments(g); + }); + time2(" order", function() { + order(g); + }); + time2(" insertSelfEdges", function() { + insertSelfEdges(g); + }); + time2(" adjustCoordinateSystem", function() { + adjust(g); + }); + time2(" position", function() { + position(g); + }); + time2(" positionSelfEdges", function() { + positionSelfEdges(g); + }); + time2(" removeBorderNodes", function() { + removeBorderNodes(g); + }); + time2(" normalize.undo", function() { + undo(g); + }); + time2(" fixupEdgeLabelCoords", function() { + fixupEdgeLabelCoords(g); + }); + time2(" undoCoordinateSystem", function() { + undo$1(g); + }); + time2(" translateGraph", function() { + translateGraph(g); + }); + time2(" assignNodeIntersects", function() { + assignNodeIntersects(g); + }); + time2(" reversePoints", function() { + reversePointsForReversedEdges(g); + }); + time2(" acyclic.undo", function() { + undo$2(g); + }); +} +function updateInputGraph(inputGraph, layoutGraph) { + forEach(inputGraph.nodes(), function(v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + forEach(inputGraph.edges(), function(e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + inputLabel.points = layoutLabel.points; + if (has(layoutLabel, "x")) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} +var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"]; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }; +var graphAttrs = ["acyclicer", "ranker", "rankdir", "align"]; +var nodeNumAttrs = ["width", "height"]; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"]; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: "r" +}; +var edgeAttrs = ["labelpos"]; +function buildLayoutGraph(inputGraph) { + var g = new Graph({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + g.setGraph( + merge({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick$1(graph, graphAttrs)) + ); + forEach(inputGraph.nodes(), function(v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults$1(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + forEach(inputGraph.edges(), function(e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick$1(edge, edgeAttrs)) + ); + }); + return g; +} +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach(g.edges(), function(e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== "c") { + if (graph.rankdir === "TB" || graph.rankdir === "BT") { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} +function injectEdgeLabelProxies(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e }; + addDummyNode(g, "edge-proxy", label, "_ep"); + } + }); +} +function assignRankMinMax(g) { + var maxRank2 = 0; + forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + maxRank2 = max(maxRank2, node.maxRank); + } + }); + g.graph().maxRank = maxRank2; +} +function removeEdgeLabelProxies(g) { + forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.dummy === "edge-proxy") { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + forEach(g.nodes(), function(v) { + getExtremes(g.node(v)); + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (has(edge, "x")) { + getExtremes(edge); + } + }); + minX -= marginX; + minY -= marginY; + forEach(g.nodes(), function(v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + forEach(edge.points, function(p) { + p.x -= minX; + p.y -= minY; + }); + if (has(edge, "x")) { + edge.x -= minX; + } + if (has(edge, "y")) { + edge.y -= minY; + } + }); + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} +function assignNodeIntersects(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} +function fixupEdgeLabelCoords(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (has(edge, "x")) { + if (edge.labelpos === "l" || edge.labelpos === "r") { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case "l": + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case "r": + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} +function reversePointsForReversedEdges(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} +function removeBorderNodes(g) { + forEach(g.nodes(), function(v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(last(node.borderLeft)); + var r = g.node(last(node.borderRight)); + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + forEach(g.nodes(), function(v) { + if (g.node(v).dummy === "border") { + g.removeNode(v); + } + }); +} +function removeSelfEdges(g) { + forEach(g.edges(), function(e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach(layers, function(layer) { + var orderShift = 0; + forEach(layer, function(v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach(node.selfEdges, function(selfEdge) { + addDummyNode( + g, + "selfedge", + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label + }, + "_se" + ); + }); + delete node.selfEdges; + }); + }); +} +function positionSelfEdges(g) { + forEach(g.nodes(), function(v) { + var node = g.node(v); + if (node.dummy === "selfedge") { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + 2 * dx / 3, y: y - dy }, + { x: x + 5 * dx / 6, y: y - dy }, + { x: x + dx, y }, + { x: x + 5 * dx / 6, y: y + dy }, + { x: x + 2 * dx / 3, y: y + dy } + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} +function selectNumberAttrs(obj, attrs) { + return mapValues(pick$1(obj, attrs), Number); +} +function canonicalize(attrs) { + var newAttrs = {}; + forEach(attrs, function(v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} +export { + Graph as G, + baseClone as b, + defaults$1 as d, + forEach as f, + has as h, + isUndefined as i, + layout as l, + map as m, + pick$1 as p, + range$1 as r, + uniqueId as u +}; diff --git a/webroot/js/node_modules/mermaid/dist/line-4ba3c4fa.js b/webroot/js/node_modules/mermaid/dist/line-4ba3c4fa.js new file mode 100644 index 0000000..c02b470 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/line-4ba3c4fa.js @@ -0,0 +1,34 @@ +import { a } from "./array-2ff2c7a6.js"; +import { c as o, p as d } from "./constant-2fe7eae5.js"; +import { n as h } from "./mermaid-e4a58915.js"; +function v(e) { + return e[0]; +} +function b(e) { + return e[1]; +} +function S(e, u) { + var p = o(!0), i = null, l = h, r = null; + e = typeof e == "function" ? e : e === void 0 ? v : o(e), u = typeof u == "function" ? u : u === void 0 ? b : o(u); + function t(n) { + var f, m = (n = a(n)).length, s, c = !1, g; + for (i == null && (r = l(g = d())), f = 0; f <= m; ++f) + !(f < m && p(s = n[f], f, n)) === c && ((c = !c) ? r.lineStart() : r.lineEnd()), c && r.point(+e(s, f, n), +u(s, f, n)); + if (g) + return r = null, g + "" || null; + } + return t.x = function(n) { + return arguments.length ? (e = typeof n == "function" ? n : o(+n), t) : e; + }, t.y = function(n) { + return arguments.length ? (u = typeof n == "function" ? n : o(+n), t) : u; + }, t.defined = function(n) { + return arguments.length ? (p = typeof n == "function" ? n : o(!!n), t) : p; + }, t.curve = function(n) { + return arguments.length ? (l = n, i != null && (r = l(i)), t) : l; + }, t.context = function(n) { + return arguments.length ? (n == null ? i = r = null : r = l(i = n), t) : i; + }, t; +} +export { + S as l +}; diff --git a/webroot/js/node_modules/mermaid/dist/line-8fd2bd69.js b/webroot/js/node_modules/mermaid/dist/line-8fd2bd69.js new file mode 100644 index 0000000..c1d0eac --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/line-8fd2bd69.js @@ -0,0 +1,50 @@ +import { a as array } from "./array-b7dcf730.js"; +import { c as constant, p as path } from "./constant-b644328d.js"; +import { n as curveLinear } from "./mermaid-491db2d9.js"; +function x(p) { + return p[0]; +} +function y(p) { + return p[1]; +} +function line(x$1, y$1) { + var defined = constant(true), context = null, curve = curveLinear, output = null; + x$1 = typeof x$1 === "function" ? x$1 : x$1 === void 0 ? x : constant(x$1); + y$1 = typeof y$1 === "function" ? y$1 : y$1 === void 0 ? y : constant(y$1); + function line2(data) { + var i, n = (data = array(data)).length, d, defined0 = false, buffer; + if (context == null) + output = curve(buffer = path()); + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) + output.lineStart(); + else + output.lineEnd(); + } + if (defined0) + output.point(+x$1(d, i, data), +y$1(d, i, data)); + } + if (buffer) + return output = null, buffer + "" || null; + } + line2.x = function(_) { + return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line2) : x$1; + }; + line2.y = function(_) { + return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line2) : y$1; + }; + line2.defined = function(_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line2) : defined; + }; + line2.curve = function(_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), line2) : curve; + }; + line2.context = function(_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line2) : context; + }; + return line2; +} +export { + line as l +}; diff --git a/webroot/js/node_modules/mermaid/dist/linear-1a8511e4.js b/webroot/js/node_modules/mermaid/dist/linear-1a8511e4.js new file mode 100644 index 0000000..b35557f --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/linear-1a8511e4.js @@ -0,0 +1,581 @@ +import { a0 as constant, a1 as interpolateNumber, a2 as color, a3 as interpolateRgb, a4 as interpolateString } from "./mermaid-491db2d9.js"; +import { i as initRange } from "./init-cc95ec8e.js"; +function ascending(a, b) { + return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +} +function descending(a, b) { + return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +} +function bisector(f) { + let compare1, compare2, delta; + if (f.length !== 2) { + compare1 = ascending; + compare2 = (d, x) => ascending(f(d), x); + delta = (d, x) => f(d) - x; + } else { + compare1 = f === ascending || f === descending ? f : zero; + compare2 = f; + delta = f; + } + function left(a, x, lo = 0, hi = a.length) { + if (lo < hi) { + if (compare1(x, x) !== 0) + return hi; + do { + const mid = lo + hi >>> 1; + if (compare2(a[mid], x) < 0) + lo = mid + 1; + else + hi = mid; + } while (lo < hi); + } + return lo; + } + function right(a, x, lo = 0, hi = a.length) { + if (lo < hi) { + if (compare1(x, x) !== 0) + return hi; + do { + const mid = lo + hi >>> 1; + if (compare2(a[mid], x) <= 0) + lo = mid + 1; + else + hi = mid; + } while (lo < hi); + } + return lo; + } + function center(a, x, lo = 0, hi = a.length) { + const i = left(a, x, lo, hi - 1); + return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; + } + return { left, center, right }; +} +function zero() { + return 0; +} +function number$1(x) { + return x === null ? NaN : +x; +} +const ascendingBisect = bisector(ascending); +const bisectRight = ascendingBisect.right; +bisector(number$1).center; +const bisect = bisectRight; +var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2); +function ticks(start, stop, count) { + var reverse, i = -1, n, ticks2, step; + stop = +stop, start = +start, count = +count; + if (start === stop && count > 0) + return [start]; + if (reverse = stop < start) + n = start, start = stop, stop = n; + if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) + return []; + if (step > 0) { + let r0 = Math.round(start / step), r1 = Math.round(stop / step); + if (r0 * step < start) + ++r0; + if (r1 * step > stop) + --r1; + ticks2 = new Array(n = r1 - r0 + 1); + while (++i < n) + ticks2[i] = (r0 + i) * step; + } else { + step = -step; + let r0 = Math.round(start * step), r1 = Math.round(stop * step); + if (r0 / step < start) + ++r0; + if (r1 / step > stop) + --r1; + ticks2 = new Array(n = r1 - r0 + 1); + while (++i < n) + ticks2[i] = (r0 + i) / step; + } + if (reverse) + ticks2.reverse(); + return ticks2; +} +function tickIncrement(start, stop, count) { + var step = (stop - start) / Math.max(0, count), power = Math.floor(Math.log(step) / Math.LN10), error = step / Math.pow(10, power); + return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); +} +function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error = step0 / step1; + if (error >= e10) + step1 *= 10; + else if (error >= e5) + step1 *= 5; + else if (error >= e2) + step1 *= 2; + return stop < start ? -step1 : step1; +} +function numberArray(a, b) { + if (!b) + b = []; + var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i; + return function(t) { + for (i = 0; i < n; ++i) + c[i] = a[i] * (1 - t) + b[i] * t; + return c; + }; +} +function isNumberArray(x) { + return ArrayBuffer.isView(x) && !(x instanceof DataView); +} +function genericArray(a, b) { + var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i; + for (i = 0; i < na; ++i) + x[i] = interpolate(a[i], b[i]); + for (; i < nb; ++i) + c[i] = b[i]; + return function(t) { + for (i = 0; i < na; ++i) + c[i] = x[i](t); + return c; + }; +} +function date(a, b) { + var d = /* @__PURE__ */ new Date(); + return a = +a, b = +b, function(t) { + return d.setTime(a * (1 - t) + b * t), d; + }; +} +function object(a, b) { + var i = {}, c = {}, k; + if (a === null || typeof a !== "object") + a = {}; + if (b === null || typeof b !== "object") + b = {}; + for (k in b) { + if (k in a) { + i[k] = interpolate(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + return function(t) { + for (k in i) + c[k] = i[k](t); + return c; + }; +} +function interpolate(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? constant(b) : (t === "number" ? interpolateNumber : t === "string" ? (c = color(b)) ? (b = c, interpolateRgb) : interpolateString : b instanceof color ? interpolateRgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b); +} +function interpolateRound(a, b) { + return a = +a, b = +b, function(t) { + return Math.round(a * (1 - t) + b * t); + }; +} +function formatDecimal(x) { + return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10); +} +function formatDecimalParts(x, p) { + if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) + return null; + var i, coefficient = x.slice(0, i); + return [ + coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, + +x.slice(i + 1) + ]; +} +function exponent(x) { + return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN; +} +function formatGroup(grouping, thousands) { + return function(value, width) { + var i = value.length, t = [], j = 0, g = grouping[0], length = 0; + while (i > 0 && g > 0) { + if (length + g + 1 > width) + g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) + break; + g = grouping[j = (j + 1) % grouping.length]; + } + return t.reverse().join(thousands); + }; +} +function formatNumerals(numerals) { + return function(value) { + return value.replace(/[0-9]/g, function(i) { + return numerals[+i]; + }); + }; +} +var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; +function formatSpecifier(specifier) { + if (!(match = re.exec(specifier))) + throw new Error("invalid format: " + specifier); + var match; + return new FormatSpecifier({ + fill: match[1], + align: match[2], + sign: match[3], + symbol: match[4], + zero: match[5], + width: match[6], + comma: match[7], + precision: match[8] && match[8].slice(1), + trim: match[9], + type: match[10] + }); +} +formatSpecifier.prototype = FormatSpecifier.prototype; +function FormatSpecifier(specifier) { + this.fill = specifier.fill === void 0 ? " " : specifier.fill + ""; + this.align = specifier.align === void 0 ? ">" : specifier.align + ""; + this.sign = specifier.sign === void 0 ? "-" : specifier.sign + ""; + this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + ""; + this.zero = !!specifier.zero; + this.width = specifier.width === void 0 ? void 0 : +specifier.width; + this.comma = !!specifier.comma; + this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision; + this.trim = !!specifier.trim; + this.type = specifier.type === void 0 ? "" : specifier.type + ""; +} +FormatSpecifier.prototype.toString = function() { + return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type; +}; +function formatTrim(s) { + out: + for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { + switch (s[i]) { + case ".": + i0 = i1 = i; + break; + case "0": + if (i0 === 0) + i0 = i; + i1 = i; + break; + default: + if (!+s[i]) + break out; + if (i0 > 0) + i0 = 0; + break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; +} +var prefixExponent; +function formatPrefixAuto(x, p) { + var d = formatDecimalParts(x, p); + if (!d) + return x + ""; + var coefficient = d[0], exponent2 = d[1], i = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length; + return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; +} +function formatRounded(x, p) { + var d = formatDecimalParts(x, p); + if (!d) + return x + ""; + var coefficient = d[0], exponent2 = d[1]; + return exponent2 < 0 ? "0." + new Array(-exponent2).join("0") + coefficient : coefficient.length > exponent2 + 1 ? coefficient.slice(0, exponent2 + 1) + "." + coefficient.slice(exponent2 + 1) : coefficient + new Array(exponent2 - coefficient.length + 2).join("0"); +} +const formatTypes = { + "%": (x, p) => (x * 100).toFixed(p), + "b": (x) => Math.round(x).toString(2), + "c": (x) => x + "", + "d": formatDecimal, + "e": (x, p) => x.toExponential(p), + "f": (x, p) => x.toFixed(p), + "g": (x, p) => x.toPrecision(p), + "o": (x) => Math.round(x).toString(8), + "p": (x, p) => formatRounded(x * 100, p), + "r": formatRounded, + "s": formatPrefixAuto, + "X": (x) => Math.round(x).toString(16).toUpperCase(), + "x": (x) => Math.round(x).toString(16) +}; +function identity$1(x) { + return x; +} +var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"]; +function formatLocale(locale2) { + var group = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity$1 : formatGroup(map.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity$1 : formatNumerals(map.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "−" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + ""; + function newFormat(specifier) { + specifier = formatSpecifier(specifier); + var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero2 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type; + if (type === "n") + comma = true, type = "g"; + else if (!formatTypes[type]) + precision === void 0 && (precision = 12), trim = true, type = "g"; + if (zero2 || fill === "0" && align === "=") + zero2 = true, fill = "0", align = "="; + var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; + var formatType = formatTypes[type], maybeSuffix = /[defgprs%]/.test(type); + precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision)); + function format2(value) { + var valuePrefix = prefix, valueSuffix = suffix, i, n, c; + if (type === "c") { + valueSuffix = formatType(value) + valueSuffix; + value = ""; + } else { + value = +value; + var valueNegative = value < 0 || 1 / value < 0; + value = isNaN(value) ? nan : formatType(Math.abs(value), precision); + if (trim) + value = formatTrim(value); + if (valueNegative && +value === 0 && sign !== "+") + valueNegative = false; + valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; + valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); + if (maybeSuffix) { + i = -1, n = value.length; + while (++i < n) { + if (c = value.charCodeAt(i), 48 > c || c > 57) { + valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; + value = value.slice(0, i); + break; + } + } + } + } + if (comma && !zero2) + value = group(value, Infinity); + var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : ""; + if (comma && zero2) + value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; + switch (align) { + case "<": + value = valuePrefix + value + valueSuffix + padding; + break; + case "=": + value = valuePrefix + padding + value + valueSuffix; + break; + case "^": + value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); + break; + default: + value = padding + valuePrefix + value + valueSuffix; + break; + } + return numerals(value); + } + format2.toString = function() { + return specifier + ""; + }; + return format2; + } + function formatPrefix2(specifier, value) { + var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3]; + return function(value2) { + return f(k * value2) + prefix; + }; + } + return { + format: newFormat, + formatPrefix: formatPrefix2 + }; +} +var locale; +var format; +var formatPrefix; +defaultLocale({ + thousands: ",", + grouping: [3], + currency: ["$", ""] +}); +function defaultLocale(definition) { + locale = formatLocale(definition); + format = locale.format; + formatPrefix = locale.formatPrefix; + return locale; +} +function precisionFixed(step) { + return Math.max(0, -exponent(Math.abs(step))); +} +function precisionPrefix(step, value) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step))); +} +function precisionRound(step, max) { + step = Math.abs(step), max = Math.abs(max) - step; + return Math.max(0, exponent(max) - exponent(step)) + 1; +} +function constants(x) { + return function() { + return x; + }; +} +function number(x) { + return +x; +} +var unit = [0, 1]; +function identity(x) { + return x; +} +function normalize(a, b) { + return (b -= a = +a) ? function(x) { + return (x - a) / b; + } : constants(isNaN(b) ? NaN : 0.5); +} +function clamper(a, b) { + var t; + if (a > b) + t = a, a = b, b = t; + return function(x) { + return Math.max(a, Math.min(b, x)); + }; +} +function bimap(domain, range, interpolate2) { + var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; + if (d1 < d0) + d0 = normalize(d1, d0), r0 = interpolate2(r1, r0); + else + d0 = normalize(d0, d1), r0 = interpolate2(r0, r1); + return function(x) { + return r0(d0(x)); + }; +} +function polymap(domain, range, interpolate2) { + var j = Math.min(domain.length, range.length) - 1, d = new Array(j), r = new Array(j), i = -1; + if (domain[j] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); + } + while (++i < j) { + d[i] = normalize(domain[i], domain[i + 1]); + r[i] = interpolate2(range[i], range[i + 1]); + } + return function(x) { + var i2 = bisect(domain, x, 1, j) - 1; + return r[i2](d[i2](x)); + }; +} +function copy(source, target) { + return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown()); +} +function transformer() { + var domain = unit, range = unit, interpolate$1 = interpolate, transform, untransform, unknown, clamp = identity, piecewise, output, input; + function rescale() { + var n = Math.min(domain.length, range.length); + if (clamp !== identity) + clamp = clamper(domain[0], domain[n - 1]); + piecewise = n > 2 ? polymap : bimap; + output = input = null; + return scale; + } + function scale(x) { + return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x))); + } + scale.invert = function(y) { + return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y))); + }; + scale.domain = function(_) { + return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice(); + }; + scale.range = function(_) { + return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); + }; + scale.rangeRound = function(_) { + return range = Array.from(_), interpolate$1 = interpolateRound, rescale(); + }; + scale.clamp = function(_) { + return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; + }; + scale.interpolate = function(_) { + return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1; + }; + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + return function(t, u) { + transform = t, untransform = u; + return rescale(); + }; +} +function continuous() { + return transformer()(identity, identity); +} +function tickFormat(start, stop, count, specifier) { + var step = tickStep(start, stop, count), precision; + specifier = formatSpecifier(specifier == null ? ",f" : specifier); + switch (specifier.type) { + case "s": { + var value = Math.max(Math.abs(start), Math.abs(stop)); + if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) + specifier.precision = precision; + return formatPrefix(specifier, value); + } + case "": + case "e": + case "g": + case "p": + case "r": { + if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) + specifier.precision = precision - (specifier.type === "e"); + break; + } + case "f": + case "%": { + if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) + specifier.precision = precision - (specifier.type === "%") * 2; + break; + } + } + return format(specifier); +} +function linearish(scale) { + var domain = scale.domain; + scale.ticks = function(count) { + var d = domain(); + return ticks(d[0], d[d.length - 1], count == null ? 10 : count); + }; + scale.tickFormat = function(count, specifier) { + var d = domain(); + return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier); + }; + scale.nice = function(count) { + if (count == null) + count = 10; + var d = domain(); + var i0 = 0; + var i1 = d.length - 1; + var start = d[i0]; + var stop = d[i1]; + var prestep; + var step; + var maxIter = 10; + if (stop < start) { + step = start, start = stop, stop = step; + step = i0, i0 = i1, i1 = step; + } + while (maxIter-- > 0) { + step = tickIncrement(start, stop, count); + if (step === prestep) { + d[i0] = start; + d[i1] = stop; + return domain(d); + } else if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + } else { + break; + } + prestep = step; + } + return scale; + }; + return scale; +} +function linear() { + var scale = continuous(); + scale.copy = function() { + return copy(scale, linear()); + }; + initRange.apply(scale, arguments); + return linearish(scale); +} +export { + copy as a, + bisector as b, + continuous as c, + linear as l, + tickStep as t +}; diff --git a/webroot/js/node_modules/mermaid/dist/linear-9f666eb0.js b/webroot/js/node_modules/mermaid/dist/linear-9f666eb0.js new file mode 100644 index 0000000..028e0d5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/linear-9f666eb0.js @@ -0,0 +1,437 @@ +import { a0 as cn, a1 as D, a2 as Y, a3 as Z, a4 as hn } from "./mermaid-e4a58915.js"; +import { i as sn } from "./init-f9637058.js"; +function $(n, t) { + return n == null || t == null ? NaN : n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN; +} +function mn(n, t) { + return n == null || t == null ? NaN : t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN; +} +function nn(n) { + let t, e, r; + n.length !== 2 ? (t = $, e = (u, h) => $(n(u), h), r = (u, h) => n(u) - h) : (t = n === $ || n === mn ? n : ln, e = n, r = n); + function i(u, h, f = 0, l = u.length) { + if (f < l) { + if (t(h, h) !== 0) + return l; + do { + const c = f + l >>> 1; + e(u[c], h) < 0 ? f = c + 1 : l = c; + } while (f < l); + } + return f; + } + function a(u, h, f = 0, l = u.length) { + if (f < l) { + if (t(h, h) !== 0) + return l; + do { + const c = f + l >>> 1; + e(u[c], h) <= 0 ? f = c + 1 : l = c; + } while (f < l); + } + return f; + } + function o(u, h, f = 0, l = u.length) { + const c = i(u, h, f, l - 1); + return c > f && r(u[c - 1], h) > -r(u[c], h) ? c - 1 : c; + } + return { left: i, center: o, right: a }; +} +function ln() { + return 0; +} +function dn(n) { + return n === null ? NaN : +n; +} +const gn = nn($), Mn = gn.right; +nn(dn).center; +const yn = Mn; +var T = Math.sqrt(50), I = Math.sqrt(10), q = Math.sqrt(2); +function pn(n, t, e) { + var r, i = -1, a, o, u; + if (t = +t, n = +n, e = +e, n === t && e > 0) + return [n]; + if ((r = t < n) && (a = n, n = t, t = a), (u = tn(n, t, e)) === 0 || !isFinite(u)) + return []; + if (u > 0) { + let h = Math.round(n / u), f = Math.round(t / u); + for (h * u < n && ++h, f * u > t && --f, o = new Array(a = f - h + 1); ++i < a; ) + o[i] = (h + i) * u; + } else { + u = -u; + let h = Math.round(n * u), f = Math.round(t * u); + for (h / u < n && ++h, f / u > t && --f, o = new Array(a = f - h + 1); ++i < a; ) + o[i] = (h + i) / u; + } + return r && o.reverse(), o; +} +function tn(n, t, e) { + var r = (t - n) / Math.max(0, e), i = Math.floor(Math.log(r) / Math.LN10), a = r / Math.pow(10, i); + return i >= 0 ? (a >= T ? 10 : a >= I ? 5 : a >= q ? 2 : 1) * Math.pow(10, i) : -Math.pow(10, -i) / (a >= T ? 10 : a >= I ? 5 : a >= q ? 2 : 1); +} +function wn(n, t, e) { + var r = Math.abs(t - n) / Math.max(0, e), i = Math.pow(10, Math.floor(Math.log(r) / Math.LN10)), a = r / i; + return a >= T ? i *= 10 : a >= I ? i *= 5 : a >= q && (i *= 2), t < n ? -i : i; +} +function Nn(n, t) { + t || (t = []); + var e = n ? Math.min(t.length, n.length) : 0, r = t.slice(), i; + return function(a) { + for (i = 0; i < e; ++i) + r[i] = n[i] * (1 - a) + t[i] * a; + return r; + }; +} +function kn(n) { + return ArrayBuffer.isView(n) && !(n instanceof DataView); +} +function vn(n, t) { + var e = t ? t.length : 0, r = n ? Math.min(e, n.length) : 0, i = new Array(r), a = new Array(e), o; + for (o = 0; o < r; ++o) + i[o] = B(n[o], t[o]); + for (; o < e; ++o) + a[o] = t[o]; + return function(u) { + for (o = 0; o < r; ++o) + a[o] = i[o](u); + return a; + }; +} +function xn(n, t) { + var e = /* @__PURE__ */ new Date(); + return n = +n, t = +t, function(r) { + return e.setTime(n * (1 - r) + t * r), e; + }; +} +function An(n, t) { + var e = {}, r = {}, i; + (n === null || typeof n != "object") && (n = {}), (t === null || typeof t != "object") && (t = {}); + for (i in t) + i in n ? e[i] = B(n[i], t[i]) : r[i] = t[i]; + return function(a) { + for (i in e) + r[i] = e[i](a); + return r; + }; +} +function B(n, t) { + var e = typeof t, r; + return t == null || e === "boolean" ? cn(t) : (e === "number" ? D : e === "string" ? (r = Y(t)) ? (t = r, Z) : hn : t instanceof Y ? Z : t instanceof Date ? xn : kn(t) ? Nn : Array.isArray(t) ? vn : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? An : D)(n, t); +} +function Sn(n, t) { + return n = +n, t = +t, function(e) { + return Math.round(n * (1 - e) + t * e); + }; +} +function bn(n) { + return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10); +} +function R(n, t) { + if ((e = (n = t ? n.toExponential(t - 1) : n.toExponential()).indexOf("e")) < 0) + return null; + var e, r = n.slice(0, e); + return [ + r.length > 1 ? r[0] + r.slice(2) : r, + +n.slice(e + 1) + ]; +} +function A(n) { + return n = R(Math.abs(n)), n ? n[1] : NaN; +} +function jn(n, t) { + return function(e, r) { + for (var i = e.length, a = [], o = 0, u = n[0], h = 0; i > 0 && u > 0 && (h + u + 1 > r && (u = Math.max(1, r - h)), a.push(e.substring(i -= u, i + u)), !((h += u + 1) > r)); ) + u = n[o = (o + 1) % n.length]; + return a.reverse().join(t); + }; +} +function Pn(n) { + return function(t) { + return t.replace(/[0-9]/g, function(e) { + return n[+e]; + }); + }; +} +var zn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; +function E(n) { + if (!(t = zn.exec(n))) + throw new Error("invalid format: " + n); + var t; + return new G({ + fill: t[1], + align: t[2], + sign: t[3], + symbol: t[4], + zero: t[5], + width: t[6], + comma: t[7], + precision: t[8] && t[8].slice(1), + trim: t[9], + type: t[10] + }); +} +E.prototype = G.prototype; +function G(n) { + this.fill = n.fill === void 0 ? " " : n.fill + "", this.align = n.align === void 0 ? ">" : n.align + "", this.sign = n.sign === void 0 ? "-" : n.sign + "", this.symbol = n.symbol === void 0 ? "" : n.symbol + "", this.zero = !!n.zero, this.width = n.width === void 0 ? void 0 : +n.width, this.comma = !!n.comma, this.precision = n.precision === void 0 ? void 0 : +n.precision, this.trim = !!n.trim, this.type = n.type === void 0 ? "" : n.type + ""; +} +G.prototype.toString = function() { + return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type; +}; +function Fn(n) { + n: + for (var t = n.length, e = 1, r = -1, i; e < t; ++e) + switch (n[e]) { + case ".": + r = i = e; + break; + case "0": + r === 0 && (r = e), i = e; + break; + default: + if (!+n[e]) + break n; + r > 0 && (r = 0); + break; + } + return r > 0 ? n.slice(0, r) + n.slice(i + 1) : n; +} +var rn; +function $n(n, t) { + var e = R(n, t); + if (!e) + return n + ""; + var r = e[0], i = e[1], a = i - (rn = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length; + return a === o ? r : a > o ? r + new Array(a - o + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + R(n, Math.max(0, t + a - 1))[0]; +} +function H(n, t) { + var e = R(n, t); + if (!e) + return n + ""; + var r = e[0], i = e[1]; + return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0"); +} +const J = { + "%": (n, t) => (n * 100).toFixed(t), + b: (n) => Math.round(n).toString(2), + c: (n) => n + "", + d: bn, + e: (n, t) => n.toExponential(t), + f: (n, t) => n.toFixed(t), + g: (n, t) => n.toPrecision(t), + o: (n) => Math.round(n).toString(8), + p: (n, t) => H(n * 100, t), + r: H, + s: $n, + X: (n) => Math.round(n).toString(16).toUpperCase(), + x: (n) => Math.round(n).toString(16) +}; +function K(n) { + return n; +} +var Q = Array.prototype.map, W = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"]; +function Rn(n) { + var t = n.grouping === void 0 || n.thousands === void 0 ? K : jn(Q.call(n.grouping, Number), n.thousands + ""), e = n.currency === void 0 ? "" : n.currency[0] + "", r = n.currency === void 0 ? "" : n.currency[1] + "", i = n.decimal === void 0 ? "." : n.decimal + "", a = n.numerals === void 0 ? K : Pn(Q.call(n.numerals, String)), o = n.percent === void 0 ? "%" : n.percent + "", u = n.minus === void 0 ? "−" : n.minus + "", h = n.nan === void 0 ? "NaN" : n.nan + ""; + function f(c) { + c = E(c); + var m = c.fill, p = c.align, M = c.sign, S = c.symbol, k = c.zero, b = c.width, L = c.comma, w = c.precision, O = c.trim, d = c.type; + d === "n" ? (L = !0, d = "g") : J[d] || (w === void 0 && (w = 12), O = !0, d = "g"), (k || m === "0" && p === "=") && (k = !0, m = "0", p = "="); + var on = S === "$" ? e : S === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : "", un = S === "$" ? r : /[%p]/.test(d) ? o : "", V = J[d], fn = /[defgprs%]/.test(d); + w = w === void 0 ? 6 : /[gprs]/.test(d) ? Math.max(1, Math.min(21, w)) : Math.max(0, Math.min(20, w)); + function X(s) { + var N = on, g = un, v, U, j; + if (d === "c") + g = V(s) + g, s = ""; + else { + s = +s; + var P = s < 0 || 1 / s < 0; + if (s = isNaN(s) ? h : V(Math.abs(s), w), O && (s = Fn(s)), P && +s == 0 && M !== "+" && (P = !1), N = (P ? M === "(" ? M : u : M === "-" || M === "(" ? "" : M) + N, g = (d === "s" ? W[8 + rn / 3] : "") + g + (P && M === "(" ? ")" : ""), fn) { + for (v = -1, U = s.length; ++v < U; ) + if (j = s.charCodeAt(v), 48 > j || j > 57) { + g = (j === 46 ? i + s.slice(v + 1) : s.slice(v)) + g, s = s.slice(0, v); + break; + } + } + } + L && !k && (s = t(s, 1 / 0)); + var z = N.length + s.length + g.length, y = z < b ? new Array(b - z + 1).join(m) : ""; + switch (L && k && (s = t(y + s, y.length ? b - g.length : 1 / 0), y = ""), p) { + case "<": + s = N + s + g + y; + break; + case "=": + s = N + y + s + g; + break; + case "^": + s = y.slice(0, z = y.length >> 1) + N + s + g + y.slice(z); + break; + default: + s = y + N + s + g; + break; + } + return a(s); + } + return X.toString = function() { + return c + ""; + }, X; + } + function l(c, m) { + var p = f((c = E(c), c.type = "f", c)), M = Math.max(-8, Math.min(8, Math.floor(A(m) / 3))) * 3, S = Math.pow(10, -M), k = W[8 + M / 3]; + return function(b) { + return p(S * b) + k; + }; + } + return { + format: f, + formatPrefix: l + }; +} +var F, en, an; +En({ + thousands: ",", + grouping: [3], + currency: ["$", ""] +}); +function En(n) { + return F = Rn(n), en = F.format, an = F.formatPrefix, F; +} +function Ln(n) { + return Math.max(0, -A(Math.abs(n))); +} +function Dn(n, t) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(A(t) / 3))) * 3 - A(Math.abs(n))); +} +function Tn(n, t) { + return n = Math.abs(n), t = Math.abs(t) - n, Math.max(0, A(t) - A(n)) + 1; +} +function In(n) { + return function() { + return n; + }; +} +function qn(n) { + return +n; +} +var _ = [0, 1]; +function x(n) { + return n; +} +function C(n, t) { + return (t -= n = +n) ? function(e) { + return (e - n) / t; + } : In(isNaN(t) ? NaN : 0.5); +} +function Cn(n, t) { + var e; + return n > t && (e = n, n = t, t = e), function(r) { + return Math.max(n, Math.min(t, r)); + }; +} +function Bn(n, t, e) { + var r = n[0], i = n[1], a = t[0], o = t[1]; + return i < r ? (r = C(i, r), a = e(o, a)) : (r = C(r, i), a = e(a, o)), function(u) { + return a(r(u)); + }; +} +function Gn(n, t, e) { + var r = Math.min(n.length, t.length) - 1, i = new Array(r), a = new Array(r), o = -1; + for (n[r] < n[0] && (n = n.slice().reverse(), t = t.slice().reverse()); ++o < r; ) + i[o] = C(n[o], n[o + 1]), a[o] = e(t[o], t[o + 1]); + return function(u) { + var h = yn(n, u, 1, r) - 1; + return a[h](i[h](u)); + }; +} +function On(n, t) { + return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown()); +} +function Vn() { + var n = _, t = _, e = B, r, i, a, o = x, u, h, f; + function l() { + var m = Math.min(n.length, t.length); + return o !== x && (o = Cn(n[0], n[m - 1])), u = m > 2 ? Gn : Bn, h = f = null, c; + } + function c(m) { + return m == null || isNaN(m = +m) ? a : (h || (h = u(n.map(r), t, e)))(r(o(m))); + } + return c.invert = function(m) { + return o(i((f || (f = u(t, n.map(r), D)))(m))); + }, c.domain = function(m) { + return arguments.length ? (n = Array.from(m, qn), l()) : n.slice(); + }, c.range = function(m) { + return arguments.length ? (t = Array.from(m), l()) : t.slice(); + }, c.rangeRound = function(m) { + return t = Array.from(m), e = Sn, l(); + }, c.clamp = function(m) { + return arguments.length ? (o = m ? !0 : x, l()) : o !== x; + }, c.interpolate = function(m) { + return arguments.length ? (e = m, l()) : e; + }, c.unknown = function(m) { + return arguments.length ? (a = m, c) : a; + }, function(m, p) { + return r = m, i = p, l(); + }; +} +function Xn() { + return Vn()(x, x); +} +function Un(n, t, e, r) { + var i = wn(n, t, e), a; + switch (r = E(r ?? ",f"), r.type) { + case "s": { + var o = Math.max(Math.abs(n), Math.abs(t)); + return r.precision == null && !isNaN(a = Dn(i, o)) && (r.precision = a), an(r, o); + } + case "": + case "e": + case "g": + case "p": + case "r": { + r.precision == null && !isNaN(a = Tn(i, Math.max(Math.abs(n), Math.abs(t)))) && (r.precision = a - (r.type === "e")); + break; + } + case "f": + case "%": { + r.precision == null && !isNaN(a = Ln(i)) && (r.precision = a - (r.type === "%") * 2); + break; + } + } + return en(r); +} +function Yn(n) { + var t = n.domain; + return n.ticks = function(e) { + var r = t(); + return pn(r[0], r[r.length - 1], e ?? 10); + }, n.tickFormat = function(e, r) { + var i = t(); + return Un(i[0], i[i.length - 1], e ?? 10, r); + }, n.nice = function(e) { + e == null && (e = 10); + var r = t(), i = 0, a = r.length - 1, o = r[i], u = r[a], h, f, l = 10; + for (u < o && (f = o, o = u, u = f, f = i, i = a, a = f); l-- > 0; ) { + if (f = tn(o, u, e), f === h) + return r[i] = o, r[a] = u, t(r); + if (f > 0) + o = Math.floor(o / f) * f, u = Math.ceil(u / f) * f; + else if (f < 0) + o = Math.ceil(o * f) / f, u = Math.floor(u * f) / f; + else + break; + h = f; + } + return n; + }, n; +} +function Zn() { + var n = Xn(); + return n.copy = function() { + return On(n, Zn()); + }, sn.apply(n, arguments), Yn(n); +} +export { + On as a, + nn as b, + Xn as c, + Zn as l, + wn as t +}; diff --git a/webroot/js/node_modules/mermaid/dist/logger.d.ts b/webroot/js/node_modules/mermaid/dist/logger.d.ts new file mode 100644 index 0000000..16166f7 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/logger.d.ts @@ -0,0 +1,9 @@ +export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'; +export declare const LEVELS: Record; +export declare const log: Record; +/** + * Sets a log level + * + * @param level - The level to set the logging to. Default is `"fatal"` + */ +export declare const setLogLevel: (level?: keyof typeof LEVELS | number | string) => void; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid-0d192ec3.js b/webroot/js/node_modules/mermaid/dist/mermaid-0d192ec3.js new file mode 100644 index 0000000..b15c05e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid-0d192ec3.js @@ -0,0 +1,6231 @@ +import { dedent } from "ts-dedent"; +import dayjs from "dayjs"; +import { sanitizeUrl } from "@braintree/sanitize-url"; +import { select, curveBasis, curveBasisClosed, curveBasisOpen, curveBumpX, curveBumpY, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinear, curveLinearClosed, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore } from "d3"; +import DOMPurify from "dompurify"; +import { adjust, invert, darken, lighten, isDark, rgba } from "khroma"; +import memoize from "lodash-es/memoize.js"; +import merge$1 from "lodash-es/merge.js"; +import { serialize, compile, stringify } from "stylis"; +import isEmpty from "lodash-es/isEmpty.js"; +const LEVELS = { + trace: 0, + debug: 1, + info: 2, + warn: 3, + error: 4, + fatal: 5 +}; +const log$1 = { + trace: (..._args) => { + }, + debug: (..._args) => { + }, + info: (..._args) => { + }, + warn: (..._args) => { + }, + error: (..._args) => { + }, + fatal: (..._args) => { + } +}; +const setLogLevel$1 = function(level = "fatal") { + let numericLevel = LEVELS.fatal; + if (typeof level === "string") { + level = level.toLowerCase(); + if (level in LEVELS) { + numericLevel = LEVELS[level]; + } + } else if (typeof level === "number") { + numericLevel = level; + } + log$1.trace = () => { + }; + log$1.debug = () => { + }; + log$1.info = () => { + }; + log$1.warn = () => { + }; + log$1.error = () => { + }; + log$1.fatal = () => { + }; + if (numericLevel <= LEVELS.fatal) { + log$1.fatal = console.error ? console.error.bind(console, format("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format("FATAL")); + } + if (numericLevel <= LEVELS.error) { + log$1.error = console.error ? console.error.bind(console, format("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format("ERROR")); + } + if (numericLevel <= LEVELS.warn) { + log$1.warn = console.warn ? console.warn.bind(console, format("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format("WARN")); + } + if (numericLevel <= LEVELS.info) { + log$1.info = console.info ? console.info.bind(console, format("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format("INFO")); + } + if (numericLevel <= LEVELS.debug) { + log$1.debug = console.debug ? console.debug.bind(console, format("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("DEBUG")); + } + if (numericLevel <= LEVELS.trace) { + log$1.trace = console.debug ? console.debug.bind(console, format("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("TRACE")); + } +}; +const format = (level) => { + const time = dayjs().format("ss.SSS"); + return `%c${time} : ${level} : `; +}; +const lineBreakRegex = //gi; +const getRows = (s) => { + if (!s) { + return [""]; + } + const str2 = breakToPlaceholder(s).replace(/\\n/g, "#br#"); + return str2.split("#br#"); +}; +const removeScript = (txt) => { + return DOMPurify.sanitize(txt); +}; +const sanitizeMore = (text, config2) => { + var _a; + if (((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels) !== false) { + const level = config2.securityLevel; + if (level === "antiscript" || level === "strict") { + text = removeScript(text); + } else if (level !== "loose") { + text = breakToPlaceholder(text); + text = text.replace(//g, ">"); + text = text.replace(/=/g, "="); + text = placeholderToBreak(text); + } + } + return text; +}; +const sanitizeText$2 = (text, config2) => { + if (!text) { + return text; + } + if (config2.dompurifyConfig) { + text = DOMPurify.sanitize(sanitizeMore(text, config2), config2.dompurifyConfig).toString(); + } else { + text = DOMPurify.sanitize(sanitizeMore(text, config2), { + FORBID_TAGS: ["style"] + }).toString(); + } + return text; +}; +const sanitizeTextOrArray = (a, config2) => { + if (typeof a === "string") { + return sanitizeText$2(a, config2); + } + return a.flat().map((x) => sanitizeText$2(x, config2)); +}; +const hasBreaks = (text) => { + return lineBreakRegex.test(text); +}; +const splitBreaks = (text) => { + return text.split(lineBreakRegex); +}; +const placeholderToBreak = (s) => { + return s.replace(/#br#/g, "
"); +}; +const breakToPlaceholder = (s) => { + return s.replace(lineBreakRegex, "#br#"); +}; +const getUrl = (useAbsolute) => { + let url = ""; + if (useAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replaceAll(/\(/g, "\\("); + url = url.replaceAll(/\)/g, "\\)"); + } + return url; +}; +const evaluate = (val) => val === false || ["false", "null", "0"].includes(String(val).trim().toLowerCase()) ? false : true; +const getMax = function(...values) { + const newValues = values.filter((value) => { + return !isNaN(value); + }); + return Math.max(...newValues); +}; +const getMin = function(...values) { + const newValues = values.filter((value) => { + return !isNaN(value); + }); + return Math.min(...newValues); +}; +const parseGenericTypes = function(input) { + const inputSets = input.split(/(,)/); + const output = []; + for (let i = 0; i < inputSets.length; i++) { + let thisSet = inputSets[i]; + if (thisSet === "," && i > 0 && i + 1 < inputSets.length) { + const previousSet = inputSets[i - 1]; + const nextSet = inputSets[i + 1]; + if (shouldCombineSets(previousSet, nextSet)) { + thisSet = previousSet + "," + nextSet; + i++; + output.pop(); + } + } + output.push(processSet(thisSet)); + } + return output.join(""); +}; +const countOccurrence = (string, substring) => { + return Math.max(0, string.split(substring).length - 1); +}; +const shouldCombineSets = (previousSet, nextSet) => { + const prevCount = countOccurrence(previousSet, "~"); + const nextCount = countOccurrence(nextSet, "~"); + return prevCount === 1 && nextCount === 1; +}; +const processSet = (input) => { + const tildeCount = countOccurrence(input, "~"); + let hasStartingTilde = false; + if (tildeCount <= 1) { + return input; + } + if (tildeCount % 2 !== 0 && input.startsWith("~")) { + input = input.substring(1); + hasStartingTilde = true; + } + const chars = [...input]; + let first = chars.indexOf("~"); + let last = chars.lastIndexOf("~"); + while (first !== -1 && last !== -1 && first !== last) { + chars[first] = "<"; + chars[last] = ">"; + first = chars.indexOf("~"); + last = chars.lastIndexOf("~"); + } + if (hasStartingTilde) { + chars.unshift("~"); + } + return chars.join(""); +}; +const common$1 = { + getRows, + sanitizeText: sanitizeText$2, + sanitizeTextOrArray, + hasBreaks, + splitBreaks, + lineBreakRegex, + removeScript, + getUrl, + evaluate, + getMax, + getMin +}; +const mkBorder = (col, darkMode) => darkMode ? adjust(col, { s: -40, l: 10 }) : adjust(col, { s: -40, l: -10 }); +const oldAttributeBackgroundColorOdd = "#ffffff"; +const oldAttributeBackgroundColorEven = "#f2f2f2"; +let Theme$4 = class Theme { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#fff4dd"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "#333"; + this.THEME_COLOR_LIMIT = 12; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + } + updateColors() { + this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333"); + this.secondaryColor = this.secondaryColor || adjust(this.primaryColor, { h: -120 }); + this.tertiaryColor = this.tertiaryColor || adjust(this.primaryColor, { h: 180, l: 5 }); + this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode); + this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode); + this.noteBkgColor = this.noteBkgColor || "#fff5ad"; + this.noteTextColor = this.noteTextColor || "#333"; + this.secondaryTextColor = this.secondaryTextColor || invert(this.secondaryColor); + this.tertiaryTextColor = this.tertiaryTextColor || invert(this.tertiaryColor); + this.lineColor = this.lineColor || invert(this.background); + this.arrowheadColor = this.arrowheadColor || invert(this.background); + this.textColor = this.textColor || this.primaryTextColor; + this.border2 = this.border2 || this.tertiaryBorderColor; + this.nodeBkg = this.nodeBkg || this.primaryColor; + this.mainBkg = this.mainBkg || this.primaryColor; + this.nodeBorder = this.nodeBorder || this.primaryBorderColor; + this.clusterBkg = this.clusterBkg || this.tertiaryColor; + this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor; + this.defaultLinkColor = this.defaultLinkColor || this.lineColor; + this.titleColor = this.titleColor || this.tertiaryTextColor; + this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor); + this.nodeTextColor = this.nodeTextColor || this.primaryTextColor; + this.actorBorder = this.actorBorder || this.primaryBorderColor; + this.actorBkg = this.actorBkg || this.mainBkg; + this.actorTextColor = this.actorTextColor || this.primaryTextColor; + this.actorLineColor = this.actorLineColor || "grey"; + this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg; + this.signalColor = this.signalColor || this.textColor; + this.signalTextColor = this.signalTextColor || this.textColor; + this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder; + this.labelTextColor = this.labelTextColor || this.actorTextColor; + this.loopTextColor = this.loopTextColor || this.actorTextColor; + this.activationBorderColor = this.activationBorderColor || darken(this.secondaryColor, 10); + this.activationBkgColor = this.activationBkgColor || this.secondaryColor; + this.sequenceNumberColor = this.sequenceNumberColor || invert(this.lineColor); + this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor; + this.altSectionBkgColor = this.altSectionBkgColor || "white"; + this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor; + this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor; + this.excludeBkgColor = this.excludeBkgColor || "#eeeeee"; + this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor; + this.taskBkgColor = this.taskBkgColor || this.primaryColor; + this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor; + this.activeTaskBkgColor = this.activeTaskBkgColor || lighten(this.primaryColor, 23); + this.gridColor = this.gridColor || "lightgrey"; + this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey"; + this.doneTaskBorderColor = this.doneTaskBorderColor || "grey"; + this.critBorderColor = this.critBorderColor || "#ff8888"; + this.critBkgColor = this.critBkgColor || "red"; + this.todayLineColor = this.todayLineColor || "red"; + this.taskTextColor = this.taskTextColor || this.textColor; + this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor; + this.taskTextLightColor = this.taskTextLightColor || this.textColor; + this.taskTextColor = this.taskTextColor || this.primaryTextColor; + this.taskTextDarkColor = this.taskTextDarkColor || this.textColor; + this.taskTextClickableColor = this.taskTextClickableColor || "#003163"; + this.personBorder = this.personBorder || this.primaryBorderColor; + this.personBkg = this.personBkg || this.mainBkg; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || this.tertiaryColor; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.nodeBorder; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.specialStateColor = this.lineColor; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210, l: 150 }); + this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 }); + if (this.darkMode) { + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken(this["cScale" + i], 75); + } + } else { + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken(this["cScale" + i], 25); + } + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || invert(this["cScale" + i]); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + if (this.darkMode) { + this["cScalePeer" + i] = this["cScalePeer" + i] || lighten(this["cScale" + i], 10); + } else { + this["cScalePeer" + i] = this["cScalePeer" + i] || darken(this["cScale" + i], 10); + } + } + this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + const multiplier = this.darkMode ? -4 : -1; + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) }); + } + this.classText = this.classText || this.textColor; + this.fillType0 = this.fillType0 || this.primaryColor; + this.fillType1 = this.fillType1 || this.secondaryColor; + this.fillType2 = this.fillType2 || adjust(this.primaryColor, { h: 64 }); + this.fillType3 = this.fillType3 || adjust(this.secondaryColor, { h: 64 }); + this.fillType4 = this.fillType4 || adjust(this.primaryColor, { h: -64 }); + this.fillType5 = this.fillType5 || adjust(this.secondaryColor, { h: -64 }); + this.fillType6 = this.fillType6 || adjust(this.primaryColor, { h: 128 }); + this.fillType7 = this.fillType7 || adjust(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || this.tertiaryColor; + this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 }); + this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 }); + this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 }); + this.pie7 = this.pie7 || adjust(this.primaryColor, { h: 60, l: -10 }); + this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 }); + this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 }); + this.pie10 = this.pie10 || adjust(this.primaryColor, { h: 60, l: -20 }); + this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 }); + this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark(this.quadrant1Fill) ? lighten(this.quadrant1Fill) : darken(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor); + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten(this.git0, 25); + this.git1 = lighten(this.git1, 25); + this.git2 = lighten(this.git2, 25); + this.git3 = lighten(this.git3, 25); + this.git4 = lighten(this.git4, 25); + this.git5 = lighten(this.git5, 25); + this.git6 = lighten(this.git6, 25); + this.git7 = lighten(this.git7, 25); + } else { + this.git0 = darken(this.git0, 25); + this.git1 = darken(this.git1, 25); + this.git2 = darken(this.git2, 25); + this.git3 = darken(this.git3, 25); + this.git4 = darken(this.git4, 25); + this.git5 = darken(this.git5, 25); + this.git6 = darken(this.git6, 25); + this.git7 = darken(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || invert(this.git0); + this.gitInv1 = this.gitInv1 || invert(this.git1); + this.gitInv2 = this.gitInv2 || invert(this.git2); + this.gitInv3 = this.gitInv3 || invert(this.git3); + this.gitInv4 = this.gitInv4 || invert(this.git4); + this.gitInv5 = this.gitInv5 || invert(this.git5); + this.gitInv6 = this.gitInv6 || invert(this.git6); + this.gitInv7 = this.gitInv7 || invert(this.git7); + this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor); + this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor; + this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor; + this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$4 = (userOverrides) => { + const theme2 = new Theme$4(); + theme2.calculate(userOverrides); + return theme2; +}; +let Theme$3 = class Theme2 { + constructor() { + this.background = "#333"; + this.primaryColor = "#1f2020"; + this.secondaryColor = lighten(this.primaryColor, 16); + this.tertiaryColor = adjust(this.primaryColor, { h: -160 }); + this.primaryBorderColor = invert(this.background); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert(this.primaryColor); + this.secondaryTextColor = invert(this.secondaryColor); + this.tertiaryTextColor = invert(this.tertiaryColor); + this.lineColor = invert(this.background); + this.textColor = invert(this.background); + this.mainBkg = "#1f2020"; + this.secondBkg = "calculated"; + this.mainContrastColor = "lightgrey"; + this.darkTextColor = lighten(invert("#323D47"), 10); + this.lineColor = "calculated"; + this.border1 = "#81B1DB"; + this.border2 = rgba(255, 255, 255, 0.25); + this.arrowheadColor = "calculated"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.labelBackground = "#181818"; + this.textColor = "#ccc"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "#F9FFFE"; + this.edgeLabelBackground = "calculated"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "calculated"; + this.actorLineColor = "calculated"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "calculated"; + this.activationBkgColor = "calculated"; + this.sequenceNumberColor = "black"; + this.sectionBkgColor = darken("#EAE8D9", 30); + this.altSectionBkgColor = "calculated"; + this.sectionBkgColor2 = "#EAE8D9"; + this.excludeBkgColor = darken(this.sectionBkgColor, 10); + this.taskBorderColor = rgba(255, 255, 255, 70); + this.taskBkgColor = "calculated"; + this.taskTextColor = "calculated"; + this.taskTextLightColor = "calculated"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = rgba(255, 255, 255, 50); + this.activeTaskBkgColor = "#81B1DB"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#E83737"; + this.critBkgColor = "#E83737"; + this.taskTextDarkColor = "calculated"; + this.todayLineColor = "#DB5757"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "calculated"; + this.errorBkgColor = "#a44141"; + this.errorTextColor = "#ddd"; + } + updateColors() { + this.secondBkg = lighten(this.mainBkg, 16); + this.lineColor = this.mainContrastColor; + this.arrowheadColor = this.mainContrastColor; + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.edgeLabelBackground = lighten(this.labelBackground, 25); + this.actorBorder = this.border1; + this.actorBkg = this.mainBkg; + this.actorTextColor = this.mainContrastColor; + this.actorLineColor = this.mainContrastColor; + this.signalColor = this.mainContrastColor; + this.signalTextColor = this.mainContrastColor; + this.labelBoxBkgColor = this.actorBkg; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.mainContrastColor; + this.loopTextColor = this.mainContrastColor; + this.noteBorderColor = this.secondaryBorderColor; + this.noteBkgColor = this.secondBkg; + this.noteTextColor = this.secondaryTextColor; + this.activationBorderColor = this.border1; + this.activationBkgColor = this.secondBkg; + this.altSectionBkgColor = this.background; + this.taskBkgColor = lighten(this.mainBkg, 23); + this.taskTextColor = this.darkTextColor; + this.taskTextLightColor = this.mainContrastColor; + this.taskTextOutsideColor = this.taskTextLightColor; + this.gridColor = this.mainContrastColor; + this.doneTaskBkgColor = this.mainContrastColor; + this.taskTextDarkColor = this.darkTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#555"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = "#f4f4f4"; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust(this.primaryColor, { h: 64 }); + this.fillType3 = adjust(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust(this.primaryColor, { h: -64 }); + this.fillType5 = adjust(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust(this.primaryColor, { h: 128 }); + this.fillType7 = adjust(this.secondaryColor, { h: 128 }); + this.cScale1 = this.cScale1 || "#0b0000"; + this.cScale2 = this.cScale2 || "#4d1037"; + this.cScale3 = this.cScale3 || "#3f5258"; + this.cScale4 = this.cScale4 || "#4f2f1b"; + this.cScale5 = this.cScale5 || "#6e0a0a"; + this.cScale6 = this.cScale6 || "#3b0048"; + this.cScale7 = this.cScale7 || "#995a01"; + this.cScale8 = this.cScale8 || "#154706"; + this.cScale9 = this.cScale9 || "#161722"; + this.cScale10 = this.cScale10 || "#00296f"; + this.cScale11 = this.cScale11 || "#01629c"; + this.cScale12 = this.cScale12 || "#010029"; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 }); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || invert(this["cScale" + i]); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScalePeer" + i] = this["cScalePeer" + i] || lighten(this["cScale" + i], 10); + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) }); + } + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["pie" + i] = this["cScale" + i]; + } + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark(this.quadrant1Fill) ? lighten(this.quadrant1Fill) : darken(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.classText = this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor); + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = lighten(this.secondaryColor, 20); + this.git1 = lighten(this.pie2 || this.secondaryColor, 20); + this.git2 = lighten(this.pie3 || this.tertiaryColor, 20); + this.git3 = lighten(this.pie4 || adjust(this.primaryColor, { h: -30 }), 20); + this.git4 = lighten(this.pie5 || adjust(this.primaryColor, { h: -60 }), 20); + this.git5 = lighten(this.pie6 || adjust(this.primaryColor, { h: -90 }), 10); + this.git6 = lighten(this.pie7 || adjust(this.primaryColor, { h: 60 }), 10); + this.git7 = lighten(this.pie8 || adjust(this.primaryColor, { h: 120 }), 20); + this.gitInv0 = this.gitInv0 || invert(this.git0); + this.gitInv1 = this.gitInv1 || invert(this.git1); + this.gitInv2 = this.gitInv2 || invert(this.git2); + this.gitInv3 = this.gitInv3 || invert(this.git3); + this.gitInv4 = this.gitInv4 || invert(this.git4); + this.gitInv5 = this.gitInv5 || invert(this.git5); + this.gitInv6 = this.gitInv6 || invert(this.git6); + this.gitInv7 = this.gitInv7 || invert(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || lighten(this.background, 12); + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || lighten(this.background, 2); + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$3 = (userOverrides) => { + const theme2 = new Theme$3(); + theme2.calculate(userOverrides); + return theme2; +}; +let Theme$2 = class Theme3 { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#ECECFF"; + this.secondaryColor = adjust(this.primaryColor, { h: 120 }); + this.secondaryColor = "#ffffde"; + this.tertiaryColor = adjust(this.primaryColor, { h: -160 }); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert(this.primaryColor); + this.secondaryTextColor = invert(this.secondaryColor); + this.tertiaryTextColor = invert(this.tertiaryColor); + this.lineColor = invert(this.background); + this.textColor = invert(this.background); + this.background = "white"; + this.mainBkg = "#ECECFF"; + this.secondBkg = "#ffffde"; + this.lineColor = "#333333"; + this.border1 = "#9370DB"; + this.border2 = "#aaaa33"; + this.arrowheadColor = "#333333"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.labelBackground = "#e8e8e8"; + this.textColor = "#333"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "calculated"; + this.edgeLabelBackground = "calculated"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "black"; + this.actorLineColor = "grey"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "calculated"; + this.altSectionBkgColor = "calculated"; + this.sectionBkgColor2 = "calculated"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "calculated"; + this.taskTextLightColor = "calculated"; + this.taskTextColor = this.taskTextLightColor; + this.taskTextDarkColor = "calculated"; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.taskTextClickableColor = "calculated"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "calculated"; + this.critBorderColor = "calculated"; + this.critBkgColor = "calculated"; + this.todayLineColor = "calculated"; + this.sectionBkgColor = rgba(102, 102, 255, 0.49); + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "#fff400"; + this.taskBorderColor = "#534fbc"; + this.taskBkgColor = "#8a90dd"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "black"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "#534fbc"; + this.activeTaskBkgColor = "#bfc7ff"; + this.gridColor = "lightgrey"; + this.doneTaskBkgColor = "lightgrey"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#ff8888"; + this.critBkgColor = "red"; + this.todayLineColor = "red"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + this.updateColors(); + } + updateColors() { + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 }); + this["cScalePeer1"] = this["cScalePeer1"] || darken(this.secondaryColor, 45); + this["cScalePeer2"] = this["cScalePeer2"] || darken(this.tertiaryColor, 40); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken(this["cScale" + i], 10); + this["cScalePeer" + i] = this["cScalePeer" + i] || darken(this["cScale" + i], 25); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || adjust(this["cScale" + i], { h: 180 }); + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust(this.mainBkg, { h: 30, l: -(5 + i * 5) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust(this.mainBkg, { h: 30, l: -(7 + i * 5) }); + } + this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; + if (this.labelTextColor !== "calculated") { + this.cScaleLabel0 = this.cScaleLabel0 || invert(this.labelTextColor); + this.cScaleLabel3 = this.cScaleLabel3 || invert(this.labelTextColor); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.labelTextColor; + } + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.titleColor = this.textColor; + this.edgeLabelBackground = this.labelBackground; + this.actorBorder = lighten(this.border1, 23); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.signalColor = this.textColor; + this.signalTextColor = this.textColor; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f0f0f0"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.nodeBorder; + this.specialStateColor = this.lineColor; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust(this.primaryColor, { h: 64 }); + this.fillType3 = adjust(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust(this.primaryColor, { h: -64 }); + this.fillType5 = adjust(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust(this.primaryColor, { h: 128 }); + this.fillType7 = adjust(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || adjust(this.tertiaryColor, { l: -40 }); + this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 }); + this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 }); + this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -20 }); + this.pie7 = this.pie7 || adjust(this.primaryColor, { h: 60, l: -20 }); + this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -40 }); + this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: -40 }); + this.pie10 = this.pie10 || adjust(this.primaryColor, { h: 60, l: -40 }); + this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -90, l: -40 }); + this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -30 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark(this.quadrant1Fill) ? lighten(this.quadrant1Fill) : darken(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.labelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten(this.git0, 25); + this.git1 = lighten(this.git1, 25); + this.git2 = lighten(this.git2, 25); + this.git3 = lighten(this.git3, 25); + this.git4 = lighten(this.git4, 25); + this.git5 = lighten(this.git5, 25); + this.git6 = lighten(this.git6, 25); + this.git7 = lighten(this.git7, 25); + } else { + this.git0 = darken(this.git0, 25); + this.git1 = darken(this.git1, 25); + this.git2 = darken(this.git2, 25); + this.git3 = darken(this.git3, 25); + this.git4 = darken(this.git4, 25); + this.git5 = darken(this.git5, 25); + this.git6 = darken(this.git6, 25); + this.git7 = darken(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || darken(invert(this.git0), 25); + this.gitInv1 = this.gitInv1 || invert(this.git1); + this.gitInv2 = this.gitInv2 || invert(this.git2); + this.gitInv3 = this.gitInv3 || invert(this.git3); + this.gitInv4 = this.gitInv4 || invert(this.git4); + this.gitInv5 = this.gitInv5 || invert(this.git5); + this.gitInv6 = this.gitInv6 || invert(this.git6); + this.gitInv7 = this.gitInv7 || invert(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$2 = (userOverrides) => { + const theme2 = new Theme$2(); + theme2.calculate(userOverrides); + return theme2; +}; +let Theme$1 = class Theme4 { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#cde498"; + this.secondaryColor = "#cdffb2"; + this.background = "white"; + this.mainBkg = "#cde498"; + this.secondBkg = "#cdffb2"; + this.lineColor = "green"; + this.border1 = "#13540c"; + this.border2 = "#6eaa49"; + this.arrowheadColor = "green"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.tertiaryColor = lighten("#cde498", 10); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert(this.primaryColor); + this.secondaryTextColor = invert(this.secondaryColor); + this.tertiaryTextColor = invert(this.primaryColor); + this.lineColor = invert(this.background); + this.textColor = invert(this.background); + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "#333"; + this.edgeLabelBackground = "#e8e8e8"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "black"; + this.actorLineColor = "grey"; + this.signalColor = "#333"; + this.signalTextColor = "#333"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "#326932"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "#6eaa49"; + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "#6eaa49"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "#487e3a"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "black"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "lightgrey"; + this.doneTaskBkgColor = "lightgrey"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#ff8888"; + this.critBkgColor = "red"; + this.todayLineColor = "red"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + } + updateColors() { + this.actorBorder = darken(this.mainBkg, 20); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 }); + this["cScalePeer1"] = this["cScalePeer1"] || darken(this.secondaryColor, 45); + this["cScalePeer2"] = this["cScalePeer2"] || darken(this.tertiaryColor, 40); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken(this["cScale" + i], 10); + this["cScalePeer" + i] = this["cScalePeer" + i] || darken(this["cScale" + i], 25); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || adjust(this["cScale" + i], { h: 180 }); + } + this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) }); + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.taskBorderColor = this.border1; + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.activeTaskBorderColor = this.taskBorderColor; + this.activeTaskBkgColor = this.mainBkg; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f0f0f0"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = this.lineColor; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust(this.primaryColor, { h: 64 }); + this.fillType3 = adjust(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust(this.primaryColor, { h: -64 }); + this.fillType5 = adjust(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust(this.primaryColor, { h: 128 }); + this.fillType7 = adjust(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || this.tertiaryColor; + this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -30 }); + this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 }); + this.pie6 = this.pie6 || adjust(this.tertiaryColor, { h: 40, l: -40 }); + this.pie7 = this.pie7 || adjust(this.primaryColor, { h: 60, l: -10 }); + this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 }); + this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 }); + this.pie10 = this.pie10 || adjust(this.primaryColor, { h: 60, l: -50 }); + this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -50 }); + this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -50 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark(this.quadrant1Fill) ? lighten(this.quadrant1Fill) : darken(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten(this.git0, 25); + this.git1 = lighten(this.git1, 25); + this.git2 = lighten(this.git2, 25); + this.git3 = lighten(this.git3, 25); + this.git4 = lighten(this.git4, 25); + this.git5 = lighten(this.git5, 25); + this.git6 = lighten(this.git6, 25); + this.git7 = lighten(this.git7, 25); + } else { + this.git0 = darken(this.git0, 25); + this.git1 = darken(this.git1, 25); + this.git2 = darken(this.git2, 25); + this.git3 = darken(this.git3, 25); + this.git4 = darken(this.git4, 25); + this.git5 = darken(this.git5, 25); + this.git6 = darken(this.git6, 25); + this.git7 = darken(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || invert(this.git0); + this.gitInv1 = this.gitInv1 || invert(this.git1); + this.gitInv2 = this.gitInv2 || invert(this.git2); + this.gitInv3 = this.gitInv3 || invert(this.git3); + this.gitInv4 = this.gitInv4 || invert(this.git4); + this.gitInv5 = this.gitInv5 || invert(this.git5); + this.gitInv6 = this.gitInv6 || invert(this.git6); + this.gitInv7 = this.gitInv7 || invert(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$1 = (userOverrides) => { + const theme2 = new Theme$1(); + theme2.calculate(userOverrides); + return theme2; +}; +class Theme5 { + constructor() { + this.primaryColor = "#eee"; + this.contrast = "#707070"; + this.secondaryColor = lighten(this.contrast, 55); + this.background = "#ffffff"; + this.tertiaryColor = adjust(this.primaryColor, { h: -160 }); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert(this.primaryColor); + this.secondaryTextColor = invert(this.secondaryColor); + this.tertiaryTextColor = invert(this.tertiaryColor); + this.lineColor = invert(this.background); + this.textColor = invert(this.background); + this.mainBkg = "#eee"; + this.secondBkg = "calculated"; + this.lineColor = "#666"; + this.border1 = "#999"; + this.border2 = "calculated"; + this.note = "#ffa"; + this.text = "#333"; + this.critical = "#d42"; + this.done = "#bbb"; + this.arrowheadColor = "#333333"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "calculated"; + this.edgeLabelBackground = "white"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "calculated"; + this.actorLineColor = "calculated"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "calculated"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "calculated"; + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "calculated"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "calculated"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "calculated"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "calculated"; + this.critBkgColor = "calculated"; + this.critBorderColor = "calculated"; + this.todayLineColor = "calculated"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + } + updateColors() { + this.secondBkg = lighten(this.contrast, 55); + this.border2 = this.contrast; + this.actorBorder = lighten(this.border1, 23); + this.actorBkg = this.mainBkg; + this.actorTextColor = this.text; + this.actorLineColor = this.lineColor; + this.signalColor = this.text; + this.signalTextColor = this.text; + this.labelBoxBkgColor = this.actorBkg; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.text; + this.loopTextColor = this.text; + this.noteBorderColor = "#999"; + this.noteBkgColor = "#666"; + this.noteTextColor = "#fff"; + this.cScale0 = this.cScale0 || "#555"; + this.cScale1 = this.cScale1 || "#F4F4F4"; + this.cScale2 = this.cScale2 || "#555"; + this.cScale3 = this.cScale3 || "#BBB"; + this.cScale4 = this.cScale4 || "#777"; + this.cScale5 = this.cScale5 || "#999"; + this.cScale6 = this.cScale6 || "#DDD"; + this.cScale7 = this.cScale7 || "#FFF"; + this.cScale8 = this.cScale8 || "#DDD"; + this.cScale9 = this.cScale9 || "#BBB"; + this.cScale10 = this.cScale10 || "#999"; + this.cScale11 = this.cScale11 || "#777"; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || invert(this["cScale" + i]); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + if (this.darkMode) { + this["cScalePeer" + i] = this["cScalePeer" + i] || lighten(this["cScale" + i], 10); + } else { + this["cScalePeer" + i] = this["cScalePeer" + i] || darken(this["cScale" + i], 10); + } + } + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); + this["cScaleLabel0"] = this["cScaleLabel0"] || this.cScale1; + this["cScaleLabel2"] = this["cScaleLabel2"] || this.cScale1; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust(this.mainBkg, { l: -(5 + i * 5) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust(this.mainBkg, { l: -(8 + i * 5) }); + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.titleColor = this.text; + this.sectionBkgColor = lighten(this.contrast, 30); + this.sectionBkgColor2 = lighten(this.contrast, 30); + this.taskBorderColor = darken(this.contrast, 10); + this.taskBkgColor = this.contrast; + this.taskTextColor = this.taskTextLightColor; + this.taskTextDarkColor = this.text; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.activeTaskBorderColor = this.taskBorderColor; + this.activeTaskBkgColor = this.mainBkg; + this.gridColor = lighten(this.border1, 30); + this.doneTaskBkgColor = this.done; + this.doneTaskBorderColor = this.lineColor; + this.critBkgColor = this.critical; + this.critBorderColor = darken(this.critBkgColor, 10); + this.todayLineColor = this.critBkgColor; + this.transitionColor = this.transitionColor || "#000"; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f4f4f4"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.stateBorder = this.stateBorder || "#000"; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = "#222"; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust(this.primaryColor, { h: 64 }); + this.fillType3 = adjust(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust(this.primaryColor, { h: -64 }); + this.fillType5 = adjust(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust(this.primaryColor, { h: 128 }); + this.fillType7 = adjust(this.secondaryColor, { h: 128 }); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["pie" + i] = this["cScale" + i]; + } + this.pie12 = this.pie0; + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark(this.quadrant1Fill) ? lighten(this.quadrant1Fill) : darken(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = darken(this.pie1, 25) || this.primaryColor; + this.git1 = this.pie2 || this.secondaryColor; + this.git2 = this.pie3 || this.tertiaryColor; + this.git3 = this.pie4 || adjust(this.primaryColor, { h: -30 }); + this.git4 = this.pie5 || adjust(this.primaryColor, { h: -60 }); + this.git5 = this.pie6 || adjust(this.primaryColor, { h: -90 }); + this.git6 = this.pie7 || adjust(this.primaryColor, { h: 60 }); + this.git7 = this.pie8 || adjust(this.primaryColor, { h: 120 }); + this.gitInv0 = this.gitInv0 || invert(this.git0); + this.gitInv1 = this.gitInv1 || invert(this.git1); + this.gitInv2 = this.gitInv2 || invert(this.git2); + this.gitInv3 = this.gitInv3 || invert(this.git3); + this.gitInv4 = this.gitInv4 || invert(this.git4); + this.gitInv5 = this.gitInv5 || invert(this.git5); + this.gitInv6 = this.gitInv6 || invert(this.git6); + this.gitInv7 = this.gitInv7 || invert(this.git7); + this.branchLabelColor = this.branchLabelColor || this.labelTextColor; + this.gitBranchLabel0 = this.branchLabelColor; + this.gitBranchLabel1 = "white"; + this.gitBranchLabel2 = this.branchLabelColor; + this.gitBranchLabel3 = "white"; + this.gitBranchLabel4 = this.branchLabelColor; + this.gitBranchLabel5 = this.branchLabelColor; + this.gitBranchLabel6 = this.branchLabelColor; + this.gitBranchLabel7 = this.branchLabelColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +} +const getThemeVariables = (userOverrides) => { + const theme2 = new Theme5(); + theme2.calculate(userOverrides); + return theme2; +}; +const theme = { + base: { + getThemeVariables: getThemeVariables$4 + }, + dark: { + getThemeVariables: getThemeVariables$3 + }, + default: { + getThemeVariables: getThemeVariables$2 + }, + forest: { + getThemeVariables: getThemeVariables$1 + }, + neutral: { + getThemeVariables + } +}; +const defaultConfigJson = { + "flowchart": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 8, + "htmlLabels": true, + "nodeSpacing": 50, + "rankSpacing": 50, + "curve": "basis", + "padding": 15, + "defaultRenderer": "dagre-wrapper", + "wrappingWidth": 200 + }, + "sequence": { + "useMaxWidth": true, + "hideUnusedParticipants": false, + "activationWidth": 10, + "diagramMarginX": 50, + "diagramMarginY": 10, + "actorMargin": 50, + "width": 150, + "height": 65, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "mirrorActors": true, + "forceMenus": false, + "bottomMarginAdj": 1, + "rightAngles": false, + "showSequenceNumbers": false, + "actorFontSize": 14, + "actorFontFamily": '"Open Sans", sans-serif', + "actorFontWeight": 400, + "noteFontSize": 14, + "noteFontFamily": '"trebuchet ms", verdana, arial, sans-serif', + "noteFontWeight": 400, + "noteAlign": "center", + "messageFontSize": 16, + "messageFontFamily": '"trebuchet ms", verdana, arial, sans-serif', + "messageFontWeight": 400, + "wrap": false, + "wrapPadding": 10, + "labelBoxWidth": 50, + "labelBoxHeight": 20 + }, + "gantt": { + "useMaxWidth": true, + "titleTopMargin": 25, + "barHeight": 20, + "barGap": 4, + "topPadding": 50, + "rightPadding": 75, + "leftPadding": 75, + "gridLineStartPadding": 35, + "fontSize": 11, + "sectionFontSize": 11, + "numberSectionStyles": 4, + "axisFormat": "%Y-%m-%d", + "topAxis": false, + "displayMode": "", + "weekday": "sunday" + }, + "journey": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "leftMargin": 150, + "width": 150, + "height": 50, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "bottomMarginAdj": 1, + "rightAngles": false, + "taskFontSize": 14, + "taskFontFamily": '"Open Sans", sans-serif', + "taskMargin": 50, + "activationWidth": 10, + "textPlacement": "fo", + "actorColours": [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + "sectionFills": [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + "sectionColours": [ + "#fff" + ] + }, + "class": { + "useMaxWidth": true, + "titleTopMargin": 25, + "arrowMarkerAbsolute": false, + "dividerMargin": 10, + "padding": 5, + "textHeight": 10, + "defaultRenderer": "dagre-wrapper", + "htmlLabels": false + }, + "state": { + "useMaxWidth": true, + "titleTopMargin": 25, + "dividerMargin": 10, + "sizeUnit": 5, + "padding": 8, + "textHeight": 10, + "titleShift": -15, + "noteMargin": 10, + "forkWidth": 70, + "forkHeight": 7, + "miniPadding": 2, + "fontSizeFactor": 5.02, + "fontSize": 24, + "labelHeight": 16, + "edgeLengthFactor": "20", + "compositTitleSize": 35, + "radius": 5, + "defaultRenderer": "dagre-wrapper" + }, + "er": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 20, + "layoutDirection": "TB", + "minEntityWidth": 100, + "minEntityHeight": 75, + "entityPadding": 15, + "stroke": "gray", + "fill": "honeydew", + "fontSize": 12 + }, + "pie": { + "useMaxWidth": true, + "textPosition": 0.75 + }, + "quadrantChart": { + "useMaxWidth": true, + "chartWidth": 500, + "chartHeight": 500, + "titleFontSize": 20, + "titlePadding": 10, + "quadrantPadding": 5, + "xAxisLabelPadding": 5, + "yAxisLabelPadding": 5, + "xAxisLabelFontSize": 16, + "yAxisLabelFontSize": 16, + "quadrantLabelFontSize": 16, + "quadrantTextTopPadding": 5, + "pointTextPadding": 5, + "pointLabelFontSize": 12, + "pointRadius": 5, + "xAxisPosition": "top", + "yAxisPosition": "left", + "quadrantInternalBorderStrokeWidth": 1, + "quadrantExternalBorderStrokeWidth": 2 + }, + "requirement": { + "useMaxWidth": true, + "rect_fill": "#f9f9f9", + "text_color": "#333", + "rect_border_size": "0.5px", + "rect_border_color": "#bbb", + "rect_min_width": 200, + "rect_min_height": 200, + "fontSize": 14, + "rect_padding": 10, + "line_height": 20 + }, + "mindmap": { + "useMaxWidth": true, + "padding": 10, + "maxNodeWidth": 200 + }, + "timeline": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "leftMargin": 150, + "width": 150, + "height": 50, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "bottomMarginAdj": 1, + "rightAngles": false, + "taskFontSize": 14, + "taskFontFamily": '"Open Sans", sans-serif', + "taskMargin": 50, + "activationWidth": 10, + "textPlacement": "fo", + "actorColours": [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + "sectionFills": [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + "sectionColours": [ + "#fff" + ], + "disableMulticolor": false + }, + "gitGraph": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 8, + "nodeLabel": { + "width": 75, + "height": 100, + "x": -25, + "y": 0 + }, + "mainBranchName": "main", + "mainBranchOrder": 0, + "showCommitLabel": true, + "showBranches": true, + "rotateCommitLabel": true, + "arrowMarkerAbsolute": false + }, + "c4": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "c4ShapeMargin": 50, + "c4ShapePadding": 20, + "width": 216, + "height": 60, + "boxMargin": 10, + "c4ShapeInRow": 4, + "nextLinePaddingX": 0, + "c4BoundaryInRow": 2, + "personFontSize": 14, + "personFontFamily": '"Open Sans", sans-serif', + "personFontWeight": "normal", + "external_personFontSize": 14, + "external_personFontFamily": '"Open Sans", sans-serif', + "external_personFontWeight": "normal", + "systemFontSize": 14, + "systemFontFamily": '"Open Sans", sans-serif', + "systemFontWeight": "normal", + "external_systemFontSize": 14, + "external_systemFontFamily": '"Open Sans", sans-serif', + "external_systemFontWeight": "normal", + "system_dbFontSize": 14, + "system_dbFontFamily": '"Open Sans", sans-serif', + "system_dbFontWeight": "normal", + "external_system_dbFontSize": 14, + "external_system_dbFontFamily": '"Open Sans", sans-serif', + "external_system_dbFontWeight": "normal", + "system_queueFontSize": 14, + "system_queueFontFamily": '"Open Sans", sans-serif', + "system_queueFontWeight": "normal", + "external_system_queueFontSize": 14, + "external_system_queueFontFamily": '"Open Sans", sans-serif', + "external_system_queueFontWeight": "normal", + "boundaryFontSize": 14, + "boundaryFontFamily": '"Open Sans", sans-serif', + "boundaryFontWeight": "normal", + "messageFontSize": 12, + "messageFontFamily": '"Open Sans", sans-serif', + "messageFontWeight": "normal", + "containerFontSize": 14, + "containerFontFamily": '"Open Sans", sans-serif', + "containerFontWeight": "normal", + "external_containerFontSize": 14, + "external_containerFontFamily": '"Open Sans", sans-serif', + "external_containerFontWeight": "normal", + "container_dbFontSize": 14, + "container_dbFontFamily": '"Open Sans", sans-serif', + "container_dbFontWeight": "normal", + "external_container_dbFontSize": 14, + "external_container_dbFontFamily": '"Open Sans", sans-serif', + "external_container_dbFontWeight": "normal", + "container_queueFontSize": 14, + "container_queueFontFamily": '"Open Sans", sans-serif', + "container_queueFontWeight": "normal", + "external_container_queueFontSize": 14, + "external_container_queueFontFamily": '"Open Sans", sans-serif', + "external_container_queueFontWeight": "normal", + "componentFontSize": 14, + "componentFontFamily": '"Open Sans", sans-serif', + "componentFontWeight": "normal", + "external_componentFontSize": 14, + "external_componentFontFamily": '"Open Sans", sans-serif', + "external_componentFontWeight": "normal", + "component_dbFontSize": 14, + "component_dbFontFamily": '"Open Sans", sans-serif', + "component_dbFontWeight": "normal", + "external_component_dbFontSize": 14, + "external_component_dbFontFamily": '"Open Sans", sans-serif', + "external_component_dbFontWeight": "normal", + "component_queueFontSize": 14, + "component_queueFontFamily": '"Open Sans", sans-serif', + "component_queueFontWeight": "normal", + "external_component_queueFontSize": 14, + "external_component_queueFontFamily": '"Open Sans", sans-serif', + "external_component_queueFontWeight": "normal", + "wrap": true, + "wrapPadding": 10, + "person_bg_color": "#08427B", + "person_border_color": "#073B6F", + "external_person_bg_color": "#686868", + "external_person_border_color": "#8A8A8A", + "system_bg_color": "#1168BD", + "system_border_color": "#3C7FC0", + "system_db_bg_color": "#1168BD", + "system_db_border_color": "#3C7FC0", + "system_queue_bg_color": "#1168BD", + "system_queue_border_color": "#3C7FC0", + "external_system_bg_color": "#999999", + "external_system_border_color": "#8A8A8A", + "external_system_db_bg_color": "#999999", + "external_system_db_border_color": "#8A8A8A", + "external_system_queue_bg_color": "#999999", + "external_system_queue_border_color": "#8A8A8A", + "container_bg_color": "#438DD5", + "container_border_color": "#3C7FC0", + "container_db_bg_color": "#438DD5", + "container_db_border_color": "#3C7FC0", + "container_queue_bg_color": "#438DD5", + "container_queue_border_color": "#3C7FC0", + "external_container_bg_color": "#B3B3B3", + "external_container_border_color": "#A6A6A6", + "external_container_db_bg_color": "#B3B3B3", + "external_container_db_border_color": "#A6A6A6", + "external_container_queue_bg_color": "#B3B3B3", + "external_container_queue_border_color": "#A6A6A6", + "component_bg_color": "#85BBF0", + "component_border_color": "#78A8D8", + "component_db_bg_color": "#85BBF0", + "component_db_border_color": "#78A8D8", + "component_queue_bg_color": "#85BBF0", + "component_queue_border_color": "#78A8D8", + "external_component_bg_color": "#CCCCCC", + "external_component_border_color": "#BFBFBF", + "external_component_db_bg_color": "#CCCCCC", + "external_component_db_border_color": "#BFBFBF", + "external_component_queue_bg_color": "#CCCCCC", + "external_component_queue_border_color": "#BFBFBF" + }, + "sankey": { + "useMaxWidth": true, + "width": 600, + "height": 400, + "linkColor": "gradient", + "nodeAlignment": "justify", + "showValues": true, + "prefix": "", + "suffix": "" + }, + "theme": "default", + "maxTextSize": 5e4, + "darkMode": false, + "fontFamily": '"trebuchet ms", verdana, arial, sans-serif;', + "logLevel": 5, + "securityLevel": "strict", + "startOnLoad": true, + "arrowMarkerAbsolute": false, + "secure": [ + "secure", + "securityLevel", + "startOnLoad", + "maxTextSize" + ], + "deterministicIds": false, + "fontSize": 16 +}; +const config = { + ...defaultConfigJson, + // Set, even though they're `undefined` so that `configKeys` finds these keys + // TODO: Should we replace these with `null` so that they can go in the JSON Schema? + deterministicIDSeed: void 0, + themeCSS: void 0, + // add non-JSON default config values + themeVariables: theme["default"].getThemeVariables(), + sequence: { + ...defaultConfigJson.sequence, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + }, + noteFont: function() { + return { + fontFamily: this.noteFontFamily, + fontSize: this.noteFontSize, + fontWeight: this.noteFontWeight + }; + }, + actorFont: function() { + return { + fontFamily: this.actorFontFamily, + fontSize: this.actorFontSize, + fontWeight: this.actorFontWeight + }; + } + }, + gantt: { + ...defaultConfigJson.gantt, + tickInterval: void 0, + useWidth: void 0 + // can probably be removed since `configKeys` already includes this + }, + c4: { + ...defaultConfigJson.c4, + useWidth: void 0, + personFont: function() { + return { + fontFamily: this.personFontFamily, + fontSize: this.personFontSize, + fontWeight: this.personFontWeight + }; + }, + external_personFont: function() { + return { + fontFamily: this.external_personFontFamily, + fontSize: this.external_personFontSize, + fontWeight: this.external_personFontWeight + }; + }, + systemFont: function() { + return { + fontFamily: this.systemFontFamily, + fontSize: this.systemFontSize, + fontWeight: this.systemFontWeight + }; + }, + external_systemFont: function() { + return { + fontFamily: this.external_systemFontFamily, + fontSize: this.external_systemFontSize, + fontWeight: this.external_systemFontWeight + }; + }, + system_dbFont: function() { + return { + fontFamily: this.system_dbFontFamily, + fontSize: this.system_dbFontSize, + fontWeight: this.system_dbFontWeight + }; + }, + external_system_dbFont: function() { + return { + fontFamily: this.external_system_dbFontFamily, + fontSize: this.external_system_dbFontSize, + fontWeight: this.external_system_dbFontWeight + }; + }, + system_queueFont: function() { + return { + fontFamily: this.system_queueFontFamily, + fontSize: this.system_queueFontSize, + fontWeight: this.system_queueFontWeight + }; + }, + external_system_queueFont: function() { + return { + fontFamily: this.external_system_queueFontFamily, + fontSize: this.external_system_queueFontSize, + fontWeight: this.external_system_queueFontWeight + }; + }, + containerFont: function() { + return { + fontFamily: this.containerFontFamily, + fontSize: this.containerFontSize, + fontWeight: this.containerFontWeight + }; + }, + external_containerFont: function() { + return { + fontFamily: this.external_containerFontFamily, + fontSize: this.external_containerFontSize, + fontWeight: this.external_containerFontWeight + }; + }, + container_dbFont: function() { + return { + fontFamily: this.container_dbFontFamily, + fontSize: this.container_dbFontSize, + fontWeight: this.container_dbFontWeight + }; + }, + external_container_dbFont: function() { + return { + fontFamily: this.external_container_dbFontFamily, + fontSize: this.external_container_dbFontSize, + fontWeight: this.external_container_dbFontWeight + }; + }, + container_queueFont: function() { + return { + fontFamily: this.container_queueFontFamily, + fontSize: this.container_queueFontSize, + fontWeight: this.container_queueFontWeight + }; + }, + external_container_queueFont: function() { + return { + fontFamily: this.external_container_queueFontFamily, + fontSize: this.external_container_queueFontSize, + fontWeight: this.external_container_queueFontWeight + }; + }, + componentFont: function() { + return { + fontFamily: this.componentFontFamily, + fontSize: this.componentFontSize, + fontWeight: this.componentFontWeight + }; + }, + external_componentFont: function() { + return { + fontFamily: this.external_componentFontFamily, + fontSize: this.external_componentFontSize, + fontWeight: this.external_componentFontWeight + }; + }, + component_dbFont: function() { + return { + fontFamily: this.component_dbFontFamily, + fontSize: this.component_dbFontSize, + fontWeight: this.component_dbFontWeight + }; + }, + external_component_dbFont: function() { + return { + fontFamily: this.external_component_dbFontFamily, + fontSize: this.external_component_dbFontSize, + fontWeight: this.external_component_dbFontWeight + }; + }, + component_queueFont: function() { + return { + fontFamily: this.component_queueFontFamily, + fontSize: this.component_queueFontSize, + fontWeight: this.component_queueFontWeight + }; + }, + external_component_queueFont: function() { + return { + fontFamily: this.external_component_queueFontFamily, + fontSize: this.external_component_queueFontSize, + fontWeight: this.external_component_queueFontWeight + }; + }, + boundaryFont: function() { + return { + fontFamily: this.boundaryFontFamily, + fontSize: this.boundaryFontSize, + fontWeight: this.boundaryFontWeight + }; + }, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + } + }, + pie: { + ...defaultConfigJson.pie, + useWidth: 984 + }, + requirement: { + ...defaultConfigJson.requirement, + useWidth: void 0 + }, + gitGraph: { + ...defaultConfigJson.gitGraph, + // TODO: This is a temporary override for `gitGraph`, since every other + // diagram does have `useMaxWidth`, but instead sets it to `true`. + // Should we set this to `true` instead? + useMaxWidth: false + }, + sankey: { + ...defaultConfigJson.sankey, + // this is false, unlike every other diagram (other than gitGraph) + // TODO: can we make this default to `true` instead? + useMaxWidth: false + } +}; +const keyify = (obj, prefix = "") => Object.keys(obj).reduce((res, el) => { + if (Array.isArray(obj[el])) { + return res; + } else if (typeof obj[el] === "object" && obj[el] !== null) { + return [...res, prefix + el, ...keyify(obj[el], "")]; + } + return [...res, prefix + el]; +}, []); +const configKeys = new Set(keyify(config, "")); +const defaultConfig$1 = config; +const sanitizeDirective = (args) => { + log$1.debug("sanitizeDirective called with", args); + if (typeof args !== "object" || args == null) { + return; + } + if (Array.isArray(args)) { + args.forEach((arg) => sanitizeDirective(arg)); + return; + } + for (const key of Object.keys(args)) { + log$1.debug("Checking key", key); + if (key.startsWith("__") || key.includes("proto") || key.includes("constr") || !configKeys.has(key) || args[key] == null) { + log$1.debug("sanitize deleting key: ", key); + delete args[key]; + continue; + } + if (typeof args[key] === "object") { + log$1.debug("sanitizing object", key); + sanitizeDirective(args[key]); + continue; + } + const cssMatchers = ["themeCSS", "fontFamily", "altFontFamily"]; + for (const cssKey of cssMatchers) { + if (key.includes(cssKey)) { + log$1.debug("sanitizing css option", key); + args[key] = sanitizeCss(args[key]); + } + } + } + if (args.themeVariables) { + for (const k of Object.keys(args.themeVariables)) { + const val = args.themeVariables[k]; + if ((val == null ? void 0 : val.match) && !val.match(/^[\d "#%(),.;A-Za-z]+$/)) { + args.themeVariables[k] = ""; + } + } + } + log$1.debug("After sanitization", args); +}; +const sanitizeCss = (str2) => { + let startCnt = 0; + let endCnt = 0; + for (const element of str2) { + if (startCnt < endCnt) { + return "{ /* ERROR: Unbalanced CSS */ }"; + } + if (element === "{") { + startCnt++; + } else if (element === "}") { + endCnt++; + } + } + if (startCnt !== endCnt) { + return "{ /* ERROR: Unbalanced CSS */ }"; + } + return str2; +}; +const frontMatterRegex = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s; +const directiveRegex = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; +const anyCommentRegex = /\s*%%.*\n/gm; +class UnknownDiagramError extends Error { + constructor(message) { + super(message); + this.name = "UnknownDiagramError"; + } +} +const detectors = {}; +const detectType = function(text, config2) { + text = text.replace(frontMatterRegex, "").replace(directiveRegex, "").replace(anyCommentRegex, "\n"); + for (const [key, { detector: detector2 }] of Object.entries(detectors)) { + const diagram2 = detector2(text, config2); + if (diagram2) { + return key; + } + } + throw new UnknownDiagramError( + `No diagram type detected matching given configuration for text: ${text}` + ); +}; +const registerLazyLoadedDiagrams = (...diagrams2) => { + for (const { id: id2, detector: detector2, loader: loader2 } of diagrams2) { + addDetector(id2, detector2, loader2); + } +}; +const addDetector = (key, detector2, loader2) => { + if (detectors[key]) { + log$1.error(`Detector with key ${key} already exists`); + } else { + detectors[key] = { detector: detector2, loader: loader2 }; + } + log$1.debug(`Detector with key ${key} added${loader2 ? " with loader" : ""}`); +}; +const getDiagramLoader = (key) => { + return detectors[key].loader; +}; +const assignWithDepth = (dst, src, { depth = 2, clobber = false } = {}) => { + const config2 = { depth, clobber }; + if (Array.isArray(src) && !Array.isArray(dst)) { + src.forEach((s) => assignWithDepth(dst, s, config2)); + return dst; + } else if (Array.isArray(src) && Array.isArray(dst)) { + src.forEach((s) => { + if (!dst.includes(s)) { + dst.push(s); + } + }); + return dst; + } + if (dst === void 0 || depth <= 0) { + if (dst !== void 0 && dst !== null && typeof dst === "object" && typeof src === "object") { + return Object.assign(dst, src); + } else { + return src; + } + } + if (src !== void 0 && typeof dst === "object" && typeof src === "object") { + Object.keys(src).forEach((key) => { + if (typeof src[key] === "object" && (dst[key] === void 0 || typeof dst[key] === "object")) { + if (dst[key] === void 0) { + dst[key] = Array.isArray(src[key]) ? [] : {}; + } + dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber }); + } else if (clobber || typeof dst[key] !== "object" && typeof src[key] !== "object") { + dst[key] = src[key]; + } + }); + } + return dst; +}; +const assignWithDepth$1 = assignWithDepth; +const ZERO_WIDTH_SPACE = "​"; +const d3CurveTypes = { + curveBasis, + curveBasisClosed, + curveBasisOpen, + curveBumpX, + curveBumpY, + curveBundle, + curveCardinalClosed, + curveCardinalOpen, + curveCardinal, + curveCatmullRomClosed, + curveCatmullRomOpen, + curveCatmullRom, + curveLinear, + curveLinearClosed, + curveMonotoneX, + curveMonotoneY, + curveNatural, + curveStep, + curveStepAfter, + curveStepBefore +}; +const directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; +const detectInit = function(text, config2) { + const inits = detectDirective(text, /(?:init\b)|(?:initialize\b)/); + let results = {}; + if (Array.isArray(inits)) { + const args = inits.map((init2) => init2.args); + sanitizeDirective(args); + results = assignWithDepth$1(results, [...args]); + } else { + results = inits.args; + } + if (!results) { + return; + } + let type2 = detectType(text, config2); + const prop = "config"; + if (results[prop] !== void 0) { + if (type2 === "flowchart-v2") { + type2 = "flowchart"; + } + results[type2] = results[prop]; + delete results[prop]; + } + return results; +}; +const detectDirective = function(text, type2 = null) { + try { + const commentWithoutDirectives = new RegExp( + `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).* +`, + "ig" + ); + text = text.trim().replace(commentWithoutDirectives, "").replace(/'/gm, '"'); + log$1.debug( + `Detecting diagram directive${type2 !== null ? " type:" + type2 : ""} based on the text:${text}` + ); + let match; + const result = []; + while ((match = directiveRegex.exec(text)) !== null) { + if (match.index === directiveRegex.lastIndex) { + directiveRegex.lastIndex++; + } + if (match && !type2 || type2 && match[1] && match[1].match(type2) || type2 && match[2] && match[2].match(type2)) { + const type22 = match[1] ? match[1] : match[2]; + const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null; + result.push({ type: type22, args }); + } + } + if (result.length === 0) { + return { type: text, args: null }; + } + return result.length === 1 ? result[0] : result; + } catch (error) { + log$1.error( + `ERROR: ${error.message} - Unable to parse directive type: '${type2}' based on the text: '${text}'` + ); + return { type: void 0, args: null }; + } +}; +const removeDirectives = function(text) { + return text.replace(directiveRegex, ""); +}; +const isSubstringInArray = function(str2, arr) { + for (const [i, element] of arr.entries()) { + if (element.match(str2)) { + return i; + } + } + return -1; +}; +function interpolateToCurve(interpolate, defaultCurve) { + if (!interpolate) { + return defaultCurve; + } + const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`; + return d3CurveTypes[curveName] ?? defaultCurve; +} +function formatUrl(linkStr, config2) { + const url = linkStr.trim(); + if (!url) { + return void 0; + } + if (config2.securityLevel !== "loose") { + return sanitizeUrl(url); + } + return url; +} +const runFunc = (functionName, ...params) => { + const arrPaths = functionName.split("."); + const len = arrPaths.length - 1; + const fnName = arrPaths[len]; + let obj = window; + for (let i = 0; i < len; i++) { + obj = obj[arrPaths[i]]; + if (!obj) { + log$1.error(`Function name: ${functionName} not found in window`); + return; + } + } + obj[fnName](...params); +}; +function distance(p1, p2) { + if (!p1 || !p2) { + return 0; + } + return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); +} +function traverseEdge(points) { + let prevPoint; + let totalDistance = 0; + points.forEach((point) => { + totalDistance += distance(point, prevPoint); + prevPoint = point; + }); + const remainingDistance = totalDistance / 2; + return calculatePoint(points, remainingDistance); +} +function calcLabelPosition(points) { + if (points.length === 1) { + return points[0]; + } + return traverseEdge(points); +} +const roundNumber = (num, precision = 2) => { + const factor = Math.pow(10, precision); + return Math.round(num * factor) / factor; +}; +const calculatePoint = (points, distanceToTraverse) => { + let prevPoint = void 0; + let remainingDistance = distanceToTraverse; + for (const point of points) { + if (prevPoint) { + const vectorDistance = distance(point, prevPoint); + if (vectorDistance < remainingDistance) { + remainingDistance -= vectorDistance; + } else { + const distanceRatio = remainingDistance / vectorDistance; + if (distanceRatio <= 0) { + return prevPoint; + } + if (distanceRatio >= 1) { + return { x: point.x, y: point.y }; + } + if (distanceRatio > 0 && distanceRatio < 1) { + return { + x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, 5), + y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point.y, 5) + }; + } + } + } + prevPoint = point; + } + throw new Error("Could not find a suitable point for the given distance"); +}; +const calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => { + log$1.info(`our points ${JSON.stringify(points)}`); + if (points[0] !== initialPosition) { + points = points.reverse(); + } + const distanceToCardinalityPoint = 25; + const center = calculatePoint(points, distanceToCardinalityPoint); + const d = isRelationTypePresent ? 10 : 5; + const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x); + const cardinalityPosition = { x: 0, y: 0 }; + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2; + return cardinalityPosition; +}; +function calcTerminalLabelPosition(terminalMarkerSize, position, _points) { + const points = structuredClone(_points); + log$1.info("our points", points); + if (position !== "start_left" && position !== "start_right") { + points.reverse(); + } + const distanceToCardinalityPoint = 25 + terminalMarkerSize; + const center = calculatePoint(points, distanceToCardinalityPoint); + const d = 10 + terminalMarkerSize * 0.5; + const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x); + const cardinalityPosition = { x: 0, y: 0 }; + if (position === "start_left") { + cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2; + cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2; + } else if (position === "end_right") { + cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5; + cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5; + } else if (position === "end_left") { + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5; + } else { + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2; + } + return cardinalityPosition; +} +function getStylesFromArray(arr) { + let style = ""; + let labelStyle = ""; + for (const element of arr) { + if (element !== void 0) { + if (element.startsWith("color:") || element.startsWith("text-align:")) { + labelStyle = labelStyle + element + ";"; + } else { + style = style + element + ";"; + } + } + } + return { style, labelStyle }; +} +let cnt = 0; +const generateId = () => { + cnt++; + return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt; +}; +function makeRandomHex(length) { + let result = ""; + const characters = "0123456789abcdef"; + const charactersLength = characters.length; + for (let i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +} +const random = (options) => { + return makeRandomHex(options.length); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: "start", + style: "#666", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0, + valign: void 0, + text: "" + }; +}; +const drawSimpleText = function(elem, textData) { + const nText = textData.text.replace(common$1.lineBreakRegex, " "); + const [, _fontSizePx] = parseFontSize(textData.fontSize); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.style("text-anchor", textData.anchor); + textElem.style("font-family", textData.fontFamily); + textElem.style("font-size", _fontSizePx); + textElem.style("font-weight", textData.fontWeight); + textElem.attr("fill", textData.fill); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.attr("fill", textData.fill); + span.text(nText); + return textElem; +}; +const wrapLabel = memoize( + (label, maxWidth, config2) => { + if (!label) { + return label; + } + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" }, + config2 + ); + if (common$1.lineBreakRegex.test(label)) { + return label; + } + const words = label.split(" "); + const completedLines = []; + let nextLine = ""; + words.forEach((word, index) => { + const wordLength = calculateTextWidth(`${word} `, config2); + const nextLineLength = calculateTextWidth(nextLine, config2); + if (wordLength > maxWidth) { + const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config2); + completedLines.push(nextLine, ...hyphenatedStrings); + nextLine = remainingWord; + } else if (nextLineLength + wordLength >= maxWidth) { + completedLines.push(nextLine); + nextLine = word; + } else { + nextLine = [nextLine, word].filter(Boolean).join(" "); + } + const currentWord = index + 1; + const isLastWord = currentWord === words.length; + if (isLastWord) { + completedLines.push(nextLine); + } + }); + return completedLines.filter((line) => line !== "").join(config2.joinWith); + }, + (label, maxWidth, config2) => `${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}` +); +const breakString = memoize( + (word, maxWidth, hyphenCharacter = "-", config2) => { + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, + config2 + ); + const characters = [...word]; + const lines = []; + let currentLine = ""; + characters.forEach((character, index) => { + const nextLine = `${currentLine}${character}`; + const lineWidth = calculateTextWidth(nextLine, config2); + if (lineWidth >= maxWidth) { + const currentCharacter = index + 1; + const isLastLine = characters.length === currentCharacter; + const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`; + lines.push(isLastLine ? nextLine : hyphenatedNextLine); + currentLine = ""; + } else { + currentLine = nextLine; + } + }); + return { hyphenatedStrings: lines, remainingWord: currentLine }; + }, + (word, maxWidth, hyphenCharacter = "-", config2) => `${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` +); +function calculateTextHeight(text, config2) { + return calculateTextDimensions(text, config2).height; +} +function calculateTextWidth(text, config2) { + return calculateTextDimensions(text, config2).width; +} +const calculateTextDimensions = memoize( + (text, config2) => { + const { fontSize = 12, fontFamily = "Arial", fontWeight = 400 } = config2; + if (!text) { + return { width: 0, height: 0 }; + } + const [, _fontSizePx] = parseFontSize(fontSize); + const fontFamilies = ["sans-serif", fontFamily]; + const lines = text.split(common$1.lineBreakRegex); + const dims = []; + const body = select("body"); + if (!body.remove) { + return { width: 0, height: 0, lineHeight: 0 }; + } + const g = body.append("svg"); + for (const fontFamily2 of fontFamilies) { + let cHeight = 0; + const dim = { width: 0, height: 0, lineHeight: 0 }; + for (const line of lines) { + const textObj = getTextObj(); + textObj.text = line || ZERO_WIDTH_SPACE; + const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2); + const bBox = (textElem._groups || textElem)[0][0].getBBox(); + if (bBox.width === 0 && bBox.height === 0) { + throw new Error("svg element not in render tree"); + } + dim.width = Math.round(Math.max(dim.width, bBox.width)); + cHeight = Math.round(bBox.height); + dim.height += cHeight; + dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight)); + } + dims.push(dim); + } + g.remove(); + const index = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1; + return dims[index]; + }, + (text, config2) => `${text}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` +); +class InitIDGenerator { + constructor(deterministic = false, seed) { + this.count = 0; + this.count = seed ? seed.length : 0; + this.next = deterministic ? () => this.count++ : () => Date.now(); + } +} +let decoder; +const entityDecode = function(html) { + decoder = decoder || document.createElement("div"); + html = escape(html).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"); + decoder.innerHTML = html; + return unescape(decoder.textContent); +}; +function isDetailedError(error) { + return "str" in error; +} +const insertTitle = (parent, cssClass, titleTopMargin, title) => { + var _a; + if (!title) { + return; + } + const bounds = (_a = parent.node()) == null ? void 0 : _a.getBBox(); + if (!bounds) { + return; + } + parent.append("text").text(title).attr("x", bounds.x + bounds.width / 2).attr("y", -titleTopMargin).attr("class", cssClass); +}; +const parseFontSize = (fontSize) => { + if (typeof fontSize === "number") { + return [fontSize, fontSize + "px"]; + } + const fontSizeNumber = parseInt(fontSize ?? "", 10); + if (Number.isNaN(fontSizeNumber)) { + return [void 0, void 0]; + } else if (fontSize === String(fontSizeNumber)) { + return [fontSizeNumber, fontSize + "px"]; + } else { + return [fontSizeNumber, fontSize]; + } +}; +function cleanAndMerge(defaultData, data) { + return merge$1({}, defaultData, data); +} +const utils = { + assignWithDepth: assignWithDepth$1, + wrapLabel, + calculateTextHeight, + calculateTextWidth, + calculateTextDimensions, + cleanAndMerge, + detectInit, + detectDirective, + isSubstringInArray, + interpolateToCurve, + calcLabelPosition, + calcCardinalityPosition, + calcTerminalLabelPosition, + formatUrl, + getStylesFromArray, + generateId, + random, + runFunc, + entityDecode, + insertTitle, + parseFontSize, + InitIDGenerator +}; +const version = "10.5.0"; +const defaultConfig = Object.freeze(defaultConfig$1); +let siteConfig = assignWithDepth$1({}, defaultConfig); +let configFromInitialize; +let directives = []; +let currentConfig = assignWithDepth$1({}, defaultConfig); +const updateCurrentConfig = (siteCfg, _directives) => { + let cfg = assignWithDepth$1({}, siteCfg); + let sumOfDirectives = {}; + for (const d of _directives) { + sanitize(d); + sumOfDirectives = assignWithDepth$1(sumOfDirectives, d); + } + cfg = assignWithDepth$1(cfg, sumOfDirectives); + if (sumOfDirectives.theme && sumOfDirectives.theme in theme) { + const tmpConfigFromInitialize = assignWithDepth$1({}, configFromInitialize); + const themeVariables = assignWithDepth$1( + tmpConfigFromInitialize.themeVariables || {}, + sumOfDirectives.themeVariables + ); + if (cfg.theme && cfg.theme in theme) { + cfg.themeVariables = theme[cfg.theme].getThemeVariables(themeVariables); + } + } + currentConfig = cfg; + checkConfig(currentConfig); + return currentConfig; +}; +const setSiteConfig = (conf) => { + siteConfig = assignWithDepth$1({}, defaultConfig); + siteConfig = assignWithDepth$1(siteConfig, conf); + if (conf.theme && theme[conf.theme]) { + siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables); + } + updateCurrentConfig(siteConfig, directives); + return siteConfig; +}; +const saveConfigFromInitialize = (conf) => { + configFromInitialize = assignWithDepth$1({}, conf); +}; +const updateSiteConfig = (conf) => { + siteConfig = assignWithDepth$1(siteConfig, conf); + updateCurrentConfig(siteConfig, directives); + return siteConfig; +}; +const getSiteConfig = () => { + return assignWithDepth$1({}, siteConfig); +}; +const setConfig = (conf) => { + checkConfig(conf); + assignWithDepth$1(currentConfig, conf); + return getConfig$1(); +}; +const getConfig$1 = () => { + return assignWithDepth$1({}, currentConfig); +}; +const sanitize = (options) => { + if (!options) { + return; + } + ["secure", ...siteConfig.secure ?? []].forEach((key) => { + if (Object.hasOwn(options, key)) { + log$1.debug(`Denied attempt to modify a secure key ${key}`, options[key]); + delete options[key]; + } + }); + Object.keys(options).forEach((key) => { + if (key.startsWith("__")) { + delete options[key]; + } + }); + Object.keys(options).forEach((key) => { + if (typeof options[key] === "string" && (options[key].includes("<") || options[key].includes(">") || options[key].includes("url(data:"))) { + delete options[key]; + } + if (typeof options[key] === "object") { + sanitize(options[key]); + } + }); +}; +const addDirective = (directive) => { + sanitizeDirective(directive); + if (directive.fontFamily && (!directive.themeVariables || !directive.themeVariables.fontFamily)) { + directive.themeVariables = { fontFamily: directive.fontFamily }; + } + directives.push(directive); + updateCurrentConfig(siteConfig, directives); +}; +const reset = (config2 = siteConfig) => { + directives = []; + updateCurrentConfig(config2, directives); +}; +const ConfigWarning = { + LAZY_LOAD_DEPRECATED: "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead." +}; +const issuedWarnings = {}; +const issueWarning = (warning) => { + if (issuedWarnings[warning]) { + return; + } + log$1.warn(ConfigWarning[warning]); + issuedWarnings[warning] = true; +}; +const checkConfig = (config2) => { + if (!config2) { + return; + } + if (config2.lazyLoadedDiagrams || config2.loadExternalDiagramsAtStartup) { + issueWarning("LAZY_LOAD_DEPRECATED"); + } +}; +const id$j = "c4"; +const detector$j = (txt) => { + return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt); +}; +const loader$k = async () => { + const { diagram: diagram2 } = await import("./c4Diagram-7ff6304f.js"); + return { id: id$j, diagram: diagram2 }; +}; +const plugin$h = { + id: id$j, + detector: detector$j, + loader: loader$k +}; +const c4 = plugin$h; +const id$i = "flowchart"; +const detector$i = (txt, config2) => { + var _a, _b; + if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { + return false; + } + return /^\s*graph/.test(txt); +}; +const loader$j = async () => { + const { diagram: diagram2 } = await import("./flowDiagram-f303bdd6.js"); + return { id: id$i, diagram: diagram2 }; +}; +const plugin$g = { + id: id$i, + detector: detector$i, + loader: loader$j +}; +const flowchart = plugin$g; +const id$h = "flowchart-v2"; +const detector$h = (txt, config2) => { + var _a, _b, _c; + if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-d3" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { + return false; + } + if (/^\s*graph/.test(txt) && ((_c = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _c.defaultRenderer) === "dagre-wrapper") { + return true; + } + return /^\s*flowchart/.test(txt); +}; +const loader$i = async () => { + const { diagram: diagram2 } = await import("./flowDiagram-v2-34644886.js"); + return { id: id$h, diagram: diagram2 }; +}; +const plugin$f = { + id: id$h, + detector: detector$h, + loader: loader$i +}; +const flowchartV2 = plugin$f; +const id$g = "er"; +const detector$g = (txt) => { + return /^\s*erDiagram/.test(txt); +}; +const loader$h = async () => { + const { diagram: diagram2 } = await import("./erDiagram-a995d1fe.js"); + return { id: id$g, diagram: diagram2 }; +}; +const plugin$e = { + id: id$g, + detector: detector$g, + loader: loader$h +}; +const er = plugin$e; +const id$f = "gitGraph"; +const detector$f = (txt) => { + return /^\s*gitGraph/.test(txt); +}; +const loader$g = async () => { + const { diagram: diagram2 } = await import("./gitGraphDiagram-2139c8c6.js"); + return { id: id$f, diagram: diagram2 }; +}; +const plugin$d = { + id: id$f, + detector: detector$f, + loader: loader$g +}; +const git = plugin$d; +const id$e = "gantt"; +const detector$e = (txt) => { + return /^\s*gantt/.test(txt); +}; +const loader$f = async () => { + const { diagram: diagram2 } = await import("./ganttDiagram-6a1a118f.js"); + return { id: id$e, diagram: diagram2 }; +}; +const plugin$c = { + id: id$e, + detector: detector$e, + loader: loader$f +}; +const gantt = plugin$c; +const id$d = "info"; +const detector$d = (txt) => { + return /^\s*info/.test(txt); +}; +const loader$e = async () => { + const { diagram: diagram2 } = await import("./infoDiagram-2064d999.js"); + return { id: id$d, diagram: diagram2 }; +}; +const info = { + id: id$d, + detector: detector$d, + loader: loader$e +}; +const id$c = "pie"; +const detector$c = (txt) => { + return /^\s*pie/.test(txt); +}; +const loader$d = async () => { + const { diagram: diagram2 } = await import("./pieDiagram-ed51bc52.js"); + return { id: id$c, diagram: diagram2 }; +}; +const pie = { + id: id$c, + detector: detector$c, + loader: loader$d +}; +const id$b = "quadrantChart"; +const detector$b = (txt) => { + return /^\s*quadrantChart/.test(txt); +}; +const loader$c = async () => { + const { diagram: diagram2 } = await import("./quadrantDiagram-3a393d1c.js"); + return { id: id$b, diagram: diagram2 }; +}; +const plugin$b = { + id: id$b, + detector: detector$b, + loader: loader$c +}; +const quadrantChart = plugin$b; +const id$a = "requirement"; +const detector$a = (txt) => { + return /^\s*requirement(Diagram)?/.test(txt); +}; +const loader$b = async () => { + const { diagram: diagram2 } = await import("./requirementDiagram-e12f1d97.js"); + return { id: id$a, diagram: diagram2 }; +}; +const plugin$a = { + id: id$a, + detector: detector$a, + loader: loader$b +}; +const requirement = plugin$a; +const id$9 = "sequence"; +const detector$9 = (txt) => { + return /^\s*sequenceDiagram/.test(txt); +}; +const loader$a = async () => { + const { diagram: diagram2 } = await import("./sequenceDiagram-d89d0f25.js"); + return { id: id$9, diagram: diagram2 }; +}; +const plugin$9 = { + id: id$9, + detector: detector$9, + loader: loader$a +}; +const sequence = plugin$9; +const id$8 = "class"; +const detector$8 = (txt, config2) => { + var _a; + if (((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return false; + } + return /^\s*classDiagram/.test(txt); +}; +const loader$9 = async () => { + const { diagram: diagram2 } = await import("./classDiagram-04f04946.js"); + return { id: id$8, diagram: diagram2 }; +}; +const plugin$8 = { + id: id$8, + detector: detector$8, + loader: loader$9 +}; +const classDiagram = plugin$8; +const id$7 = "classDiagram"; +const detector$7 = (txt, config2) => { + var _a; + if (/^\s*classDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return true; + } + return /^\s*classDiagram-v2/.test(txt); +}; +const loader$8 = async () => { + const { diagram: diagram2 } = await import("./classDiagram-v2-d4efdcc3.js"); + return { id: id$7, diagram: diagram2 }; +}; +const plugin$7 = { + id: id$7, + detector: detector$7, + loader: loader$8 +}; +const classDiagramV2 = plugin$7; +const id$6 = "state"; +const detector$6 = (txt, config2) => { + var _a; + if (((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return false; + } + return /^\s*stateDiagram/.test(txt); +}; +const loader$7 = async () => { + const { diagram: diagram2 } = await import("./stateDiagram-0d589c85.js"); + return { id: id$6, diagram: diagram2 }; +}; +const plugin$6 = { + id: id$6, + detector: detector$6, + loader: loader$7 +}; +const state = plugin$6; +const id$5 = "stateDiagram"; +const detector$5 = (txt, config2) => { + var _a; + if (/^\s*stateDiagram-v2/.test(txt)) { + return true; + } + if (/^\s*stateDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return true; + } + return false; +}; +const loader$6 = async () => { + const { diagram: diagram2 } = await import("./stateDiagram-v2-8bb05ecb.js"); + return { id: id$5, diagram: diagram2 }; +}; +const plugin$5 = { + id: id$5, + detector: detector$5, + loader: loader$6 +}; +const stateV2 = plugin$5; +const id$4 = "journey"; +const detector$4 = (txt) => { + return /^\s*journey/.test(txt); +}; +const loader$5 = async () => { + const { diagram: diagram2 } = await import("./journeyDiagram-6df70039.js"); + return { id: id$4, diagram: diagram2 }; +}; +const plugin$4 = { + id: id$4, + detector: detector$4, + loader: loader$5 +}; +const journey = plugin$4; +const selectSvgElement = (id2) => { + var _a; + const { securityLevel } = getConfig$1(); + let root = select("body"); + if (securityLevel === "sandbox") { + const sandboxElement = select(`#i${id2}`); + const doc = ((_a = sandboxElement.node()) == null ? void 0 : _a.contentDocument) ?? document; + root = select(doc.body); + } + const svg = root.select(`#${id2}`); + return svg; +}; +const d3Attrs = function(d3Elem, attrs) { + for (let attr of attrs) { + d3Elem.attr(attr[0], attr[1]); + } +}; +const calculateSvgSizeAttrs = function(height, width, useMaxWidth) { + let attrs = /* @__PURE__ */ new Map(); + if (useMaxWidth) { + attrs.set("width", "100%"); + attrs.set("style", `max-width: ${width}px;`); + } else { + attrs.set("height", height); + attrs.set("width", width); + } + return attrs; +}; +const configureSvgSize = function(svgElem, height, width, useMaxWidth) { + const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth); + d3Attrs(svgElem, attrs); +}; +const setupGraphViewbox$1 = function(graph, svgElem, padding, useMaxWidth) { + const svgBounds = svgElem.node().getBBox(); + const sWidth = svgBounds.width; + const sHeight = svgBounds.height; + log$1.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds); + let width = 0; + let height = 0; + log$1.info(`Graph bounds: ${width}x${height}`, graph); + width = sWidth + padding * 2; + height = sHeight + padding * 2; + log$1.info(`Calculated bounds: ${width}x${height}`); + configureSvgSize(svgElem, height, width, useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${svgBounds.width + 2 * padding} ${svgBounds.height + 2 * padding}`; + svgElem.attr("viewBox", vBox); +}; +const draw = (_text, id2, version2) => { + log$1.debug("renering svg for syntax error\n"); + const svg = selectSvgElement(id2); + svg.attr("viewBox", "0 0 2412 512"); + configureSvgSize(svg, 100, 512, true); + const g = svg.append("g"); + g.append("path").attr("class", "error-icon").attr( + "d", + "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z" + ); + g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"); + g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`); +}; +const renderer = { draw }; +const errorRenderer = renderer; +const diagram = { + db: {}, + renderer, + parser: { + parser: { yy: {} }, + parse: () => { + return; + } + } +}; +const errorDiagram = diagram; +const id$3 = "flowchart-elk"; +const detector$3 = (txt, config2) => { + var _a; + if ( + // If diagram explicitly states flowchart-elk + /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk + /^\s*flowchart|graph/.test(txt) && ((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "elk" + ) { + return true; + } + return false; +}; +const loader$4 = async () => { + const { diagram: diagram2 } = await import("./flowchart-elk-definition-b487ab79.js"); + return { id: id$3, diagram: diagram2 }; +}; +const plugin$3 = { + id: id$3, + detector: detector$3, + loader: loader$4 +}; +const flowchartElk = plugin$3; +const id$2 = "timeline"; +const detector$2 = (txt) => { + return /^\s*timeline/.test(txt); +}; +const loader$3 = async () => { + const { diagram: diagram2 } = await import("./timeline-definition-8b56e66a.js"); + return { id: id$2, diagram: diagram2 }; +}; +const plugin$2 = { + id: id$2, + detector: detector$2, + loader: loader$3 +}; +const timeline = plugin$2; +const id$1 = "mindmap"; +const detector$1 = (txt) => { + return /^\s*mindmap/.test(txt); +}; +const loader$2 = async () => { + const { diagram: diagram2 } = await import("./mindmap-definition-7f612c4b.js"); + return { id: id$1, diagram: diagram2 }; +}; +const plugin$1 = { + id: id$1, + detector: detector$1, + loader: loader$2 +}; +const mindmap = plugin$1; +const id = "sankey"; +const detector = (txt) => { + return /^\s*sankey-beta/.test(txt); +}; +const loader$1 = async () => { + const { diagram: diagram2 } = await import("./sankeyDiagram-6de1f9fe.js"); + return { id, diagram: diagram2 }; +}; +const plugin = { + id, + detector, + loader: loader$1 +}; +const sankey = plugin; +const themes = {}; +const getStyles = (type2, userStyles, options) => { + let diagramStyles = ""; + if (type2 in themes && themes[type2]) { + diagramStyles = themes[type2](options); + } else { + log$1.warn(`No theme found for ${type2}`); + } + return ` & { + font-family: ${options.fontFamily}; + font-size: ${options.fontSize}; + fill: ${options.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${options.errorBkgColor}; + } + & .error-text { + fill: ${options.errorTextColor}; + stroke: ${options.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 2px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${options.lineColor}; + stroke: ${options.lineColor}; + } + & .marker.cross { + stroke: ${options.lineColor}; + } + + & svg { + font-family: ${options.fontFamily}; + font-size: ${options.fontSize}; + } + + ${diagramStyles} + + ${userStyles} +`; +}; +const addStylesForDiagram = (type2, diagramTheme) => { + if (diagramTheme !== void 0) { + themes[type2] = diagramTheme; + } +}; +const getStyles$1 = getStyles; +let accTitle = ""; +let diagramTitle = ""; +let accDescription = ""; +const sanitizeText$1 = (txt) => sanitizeText$2(txt, getConfig$1()); +const clear = () => { + accTitle = ""; + accDescription = ""; + diagramTitle = ""; +}; +const setAccTitle = (txt) => { + accTitle = sanitizeText$1(txt).replace(/^\s+/g, ""); +}; +const getAccTitle = () => accTitle; +const setAccDescription = (txt) => { + accDescription = sanitizeText$1(txt).replace(/\n\s+/g, "\n"); +}; +const getAccDescription = () => accDescription; +const setDiagramTitle = (txt) => { + diagramTitle = sanitizeText$1(txt); +}; +const getDiagramTitle = () => diagramTitle; +const commonDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + clear, + getAccDescription, + getAccTitle, + getDiagramTitle, + setAccDescription, + setAccTitle, + setDiagramTitle +}, Symbol.toStringTag, { value: "Module" })); +const log = log$1; +const setLogLevel = setLogLevel$1; +const getConfig = getConfig$1; +const sanitizeText = (text) => sanitizeText$2(text, getConfig()); +const setupGraphViewbox = setupGraphViewbox$1; +const getCommonDb = () => { + return commonDb; +}; +const diagrams = {}; +const registerDiagram = (id2, diagram2, detector2) => { + var _a; + if (diagrams[id2]) { + throw new Error(`Diagram ${id2} already registered.`); + } + diagrams[id2] = diagram2; + if (detector2) { + addDetector(id2, detector2); + } + addStylesForDiagram(id2, diagram2.styles); + (_a = diagram2.injectUtils) == null ? void 0 : _a.call( + diagram2, + log, + setLogLevel, + getConfig, + sanitizeText, + setupGraphViewbox, + getCommonDb(), + () => { + } + ); +}; +const getDiagram = (name) => { + if (name in diagrams) { + return diagrams[name]; + } + throw new DiagramNotFoundError(name); +}; +class DiagramNotFoundError extends Error { + constructor(name) { + super(`Diagram ${name} not found.`); + } +} +let hasLoadedDiagrams = false; +const addDiagrams = () => { + if (hasLoadedDiagrams) { + return; + } + hasLoadedDiagrams = true; + registerDiagram("error", errorDiagram, (text) => { + return text.toLowerCase().trim() === "error"; + }); + registerDiagram( + "---", + // --- diagram type may appear if YAML front-matter is not parsed correctly + { + db: { + clear: () => { + } + }, + styles: {}, + // should never be used + renderer: { + draw: () => { + } + }, + parser: { + parser: { yy: {} }, + parse: () => { + throw new Error( + "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks" + ); + } + }, + init: () => null + // no op + }, + (text) => { + return text.toLowerCase().trimStart().startsWith("---"); + } + ); + registerLazyLoadedDiagrams( + c4, + classDiagramV2, + classDiagram, + er, + gantt, + info, + pie, + requirement, + sequence, + flowchartElk, + flowchartV2, + flowchart, + mindmap, + timeline, + git, + stateV2, + state, + journey, + quadrantChart, + sankey + ); +}; +class Diagram { + constructor(text, metadata = {}) { + this.text = text; + this.metadata = metadata; + this.type = "graph"; + this.text += "\n"; + const cnf = getConfig$1(); + try { + this.type = detectType(text, cnf); + } catch (e) { + this.type = "error"; + this.detectError = e; + } + const diagram2 = getDiagram(this.type); + log$1.debug("Type " + this.type); + this.db = diagram2.db; + this.renderer = diagram2.renderer; + this.parser = diagram2.parser; + this.parser.parser.yy = this.db; + this.init = diagram2.init; + this.parse(); + } + parse() { + var _a, _b, _c, _d, _e; + if (this.detectError) { + throw this.detectError; + } + (_b = (_a = this.db).clear) == null ? void 0 : _b.call(_a); + const config2 = getConfig$1(); + (_c = this.init) == null ? void 0 : _c.call(this, config2); + if (this.metadata.title) { + (_e = (_d = this.db).setDiagramTitle) == null ? void 0 : _e.call(_d, this.metadata.title); + } + this.parser.parse(this.text); + } + async render(id2, version2) { + await this.renderer.draw(this.text, id2, version2, this); + } + getParser() { + return this.parser; + } + getType() { + return this.type; + } +} +const getDiagramFromText = async (text, metadata = {}) => { + const type2 = detectType(text, getConfig$1()); + try { + getDiagram(type2); + } catch (error) { + const loader2 = getDiagramLoader(type2); + if (!loader2) { + throw new UnknownDiagramError(`Diagram ${type2} not found.`); + } + const { id: id2, diagram: diagram2 } = await loader2(); + registerDiagram(id2, diagram2); + } + return new Diagram(text, metadata); +}; +let interactionFunctions = []; +const addFunction = (func) => { + interactionFunctions.push(func); +}; +const attachFunctions = () => { + interactionFunctions.forEach((f) => { + f(); + }); + interactionFunctions = []; +}; +const SVG_ROLE = "graphics-document document"; +function setA11yDiagramInfo(svg, diagramType) { + svg.attr("role", SVG_ROLE); + if (diagramType !== "") { + svg.attr("aria-roledescription", diagramType); + } +} +function addSVGa11yTitleDescription(svg, a11yTitle, a11yDesc, baseId) { + if (svg.insert === void 0) { + return; + } + if (a11yDesc) { + const descId = `chart-desc-${baseId}`; + svg.attr("aria-describedby", descId); + svg.insert("desc", ":first-child").attr("id", descId).text(a11yDesc); + } + if (a11yTitle) { + const titleId = `chart-title-${baseId}`; + svg.attr("aria-labelledby", titleId); + svg.insert("title", ":first-child").attr("id", titleId).text(a11yTitle); + } +} +const cleanupComments = (text) => { + return text.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(); +}; +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +function isNothing(subject) { + return typeof subject === "undefined" || subject === null; +} +function isObject(subject) { + return typeof subject === "object" && subject !== null; +} +function toArray(sequence2) { + if (Array.isArray(sequence2)) + return sequence2; + else if (isNothing(sequence2)) + return []; + return [sequence2]; +} +function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; +} +function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; +} +function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; +} +var isNothing_1 = isNothing; +var isObject_1 = isObject; +var toArray_1 = toArray; +var repeat_1 = repeat; +var isNegativeZero_1 = isNegativeZero; +var extend_1 = extend; +var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 +}; +function formatError(exception2, compact) { + var where = "", message = exception2.reason || "(unknown reason)"; + if (!exception2.mark) + return message; + if (exception2.mark.name) { + where += 'in "' + exception2.mark.name + '" '; + } + where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; + if (!compact && exception2.mark.snippet) { + where += "\n\n" + exception2.mark.snippet; + } + return message + " " + where; +} +function YAMLException$1(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } +} +YAMLException$1.prototype = Object.create(Error.prototype); +YAMLException$1.prototype.constructor = YAMLException$1; +YAMLException$1.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); +}; +var exception = YAMLException$1; +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, + pos: position - lineStart + head.length + // relative position + }; +} +function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; +} +function makeSnippet(mark, options) { + options = Object.create(options || null); + if (!mark.buffer) + return null; + if (!options.maxLength) + options.maxLength = 79; + if (typeof options.indent !== "number") + options.indent = 1; + if (typeof options.linesBefore !== "number") + options.linesBefore = 3; + if (typeof options.linesAfter !== "number") + options.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) + foundLineNo = lineStarts.length - 1; + var result = "", i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) + break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) + break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + } + return result.replace(/\n$/, ""); +} +var snippet = makeSnippet; +var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" +]; +var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" +]; +function compileStyleAliases(map2) { + var result = {}; + if (map2 !== null) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; +} +function Type$1(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.options = options; + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} +var type = Type$1; +function compileList(schema2, name) { + var result = []; + schema2[name].forEach(function(currentType) { + var newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + newIndex = previousIndex; + } + }); + result[newIndex] = currentType; + }); + return result; +} +function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type2) { + if (type2.multi) { + result.multi[type2.kind].push(type2); + result.multi["fallback"].push(type2); + } else { + result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; + } + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} +function Schema$1(definition) { + return this.extend(definition); +} +Schema$1.prototype.extend = function extend2(definition) { + var implicit = []; + var explicit = []; + if (definition instanceof type) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) + implicit = implicit.concat(definition.implicit); + if (definition.explicit) + explicit = explicit.concat(definition.explicit); + } else { + throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type$1.loadKind && type$1.loadKind !== "scalar") { + throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type$1.multi) { + throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema$1.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit"); + result.compiledExplicit = compileList(result, "explicit"); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; +}; +var schema = Schema$1; +var str = new type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } +}); +var seq = new type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } +}); +var map = new type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } +}); +var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] +}); +function resolveYamlNull(data) { + if (data === null) + return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); +} +function constructYamlNull() { + return null; +} +function isNull(object) { + return object === null; +} +var _null = new type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" +}); +function resolveYamlBoolean(data) { + if (data === null) + return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); +} +function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; +} +function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; +} +var bool = new type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" +}); +function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; +} +function isOctCode(c) { + return 48 <= c && c <= 55; +} +function isDecCode(c) { + return 48 <= c && c <= 57; +} +function resolveYamlInteger(data) { + if (data === null) + return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) + return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) + return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") + return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + return true; +} +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") + return 0; + if (ch === "0") { + if (value[1] === "b") + return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") + return sign * parseInt(value.slice(2), 16); + if (value[1] === "o") + return sign * parseInt(value.slice(2), 8); + } + return sign * parseInt(value, 10); +} +function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); +} +var int = new type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } +}); +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" +); +function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; +} +function constructYamlFloat(data) { + var value, sign; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } + return sign * parseFloat(value, 10); +} +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; +function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; +} +function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); +} +var float = new type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" +}); +var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] +}); +var core = json; +var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" +); +var YAML_TIMESTAMP_REGEXP = 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]))?))?$" +); +function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; +} +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) + date.setTime(date.getTime() - delta); + return date; +} +function representYamlTimestamp(object) { + return object.toISOString(); +} +var timestamp = new type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); +function resolveYamlMerge(data) { + return data === "<<" || data === null; +} +var merge = new type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge +}); +var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; +function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; +} +function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map2.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); +} +function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; +} +function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; +} +var binary = new type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); +var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; +var _toString$2 = Object.prototype.toString; +function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString$2.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; +} +function constructYamlOmap(data) { + return data !== null ? data : []; +} +var omap = new type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); +var _toString$1 = Object.prototype.toString; +function resolveYamlPairs(data) { + if (data === null) + return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString$1.call(pair) !== "[object Object]") + return false; + keys = Object.keys(pair); + if (keys.length !== 1) + return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; +} +function constructYamlPairs(data) { + if (data === null) + return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; +} +var pairs = new type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); +var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; +function resolveYamlSet(data) { + if (data === null) + return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) + return false; + } + } + return true; +} +function constructYamlSet(data) { + return data !== null ? data : {}; +} +var set = new type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet +}); +var _default = core.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] +}); +var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; +function _class(obj) { + return Object.prototype.toString.call(obj); +} +function is_EOL(c) { + return c === 10 || c === 13; +} +function is_WHITE_SPACE(c) { + return c === 9 || c === 32; +} +function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; +} +function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; +} +function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; +} +function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; +} +function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; +} +function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "…" : c === 95 ? " " : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; +} +function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode( + (c - 65536 >> 10) + 55296, + (c - 65536 & 1023) + 56320 + ); +} +var simpleEscapeCheck = new Array(256); +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} +function State$1(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || _default; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; +} +function generateError(state2, message) { + var mark = { + name: state2.filename, + buffer: state2.input.slice(0, -1), + // omit trailing \0 + position: state2.position, + line: state2.line, + column: state2.position - state2.lineStart + }; + mark.snippet = snippet(mark); + return new exception(message, mark); +} +function throwError(state2, message) { + throw generateError(state2, message); +} +function throwWarning(state2, message) { + if (state2.onWarning) { + state2.onWarning.call(null, generateError(state2, message)); + } +} +var directiveHandlers = { + YAML: function handleYamlDirective(state2, name, args) { + var match, major, minor; + if (state2.version !== null) { + throwError(state2, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError(state2, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) { + throwError(state2, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state2, "unacceptable YAML version of the document"); + } + state2.version = args[0]; + state2.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state2, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state2, name, args) { + var handle, prefix; + if (args.length !== 2) { + throwError(state2, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state2, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty$1.call(state2.tagMap, handle)) { + throwError(state2, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state2, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state2, "tag prefix is malformed: " + prefix); + } + state2.tagMap[handle] = prefix; + } +}; +function captureSegment(state2, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state2.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state2, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state2, "the stream contains non-printable characters"); + } + state2.result += _result; + } +} +function mergeMappings(state2, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state2, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} +function storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state2, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state2, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state2, _result, valueNode, overridableKeys); + } + } else { + if (!state2.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { + state2.line = startLine || state2.line; + state2.lineStart = startLineStart || state2.lineStart; + state2.position = startPos || state2.position; + throwError(state2, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; +} +function readLineBreak(state2) { + var ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 10) { + state2.position++; + } else if (ch === 13) { + state2.position++; + if (state2.input.charCodeAt(state2.position) === 10) { + state2.position++; + } + } else { + throwError(state2, "a line break is expected"); + } + state2.line += 1; + state2.lineStart = state2.position; + state2.firstTabInLine = -1; +} +function skipSeparationSpace(state2, allowComments, checkIndent) { + var lineBreaks = 0, ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state2.firstTabInLine === -1) { + state2.firstTabInLine = state2.position; + } + ch = state2.input.charCodeAt(++state2.position); + } + if (allowComments && ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state2); + ch = state2.input.charCodeAt(state2.position); + lineBreaks++; + state2.lineIndent = 0; + while (ch === 32) { + state2.lineIndent++; + ch = state2.input.charCodeAt(++state2.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state2.lineIndent < checkIndent) { + throwWarning(state2, "deficient indentation"); + } + return lineBreaks; +} +function testDocumentSeparator(state2) { + var _position = state2.position, ch; + ch = state2.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state2.input.charCodeAt(_position + 1) && ch === state2.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state2.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; +} +function writeFoldedLines(state2, count) { + if (count === 1) { + state2.result += " "; + } else if (count > 1) { + state2.result += common.repeat("\n", count - 1); + } +} +function readPlainScalar(state2, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state2.kind, _result = state2.result, ch; + ch = state2.input.charCodeAt(state2.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state2.kind = "scalar"; + state2.result = ""; + captureStart = captureEnd = state2.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state2.input.charCodeAt(state2.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state2.line; + _lineStart = state2.lineStart; + _lineIndent = state2.lineIndent; + skipSeparationSpace(state2, false, -1); + if (state2.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state2.input.charCodeAt(state2.position); + continue; + } else { + state2.position = captureEnd; + state2.line = _line; + state2.lineStart = _lineStart; + state2.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state2, captureStart, captureEnd, false); + writeFoldedLines(state2, state2.line - _line); + captureStart = captureEnd = state2.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state2.position + 1; + } + ch = state2.input.charCodeAt(++state2.position); + } + captureSegment(state2, captureStart, captureEnd, false); + if (state2.result) { + return true; + } + state2.kind = _kind; + state2.result = _result; + return false; +} +function readSingleQuotedScalar(state2, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 39) { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + state2.position++; + captureStart = captureEnd = state2.position; + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + if (ch === 39) { + captureSegment(state2, captureStart, state2.position, true); + ch = state2.input.charCodeAt(++state2.position); + if (ch === 39) { + captureStart = state2.position; + state2.position++; + captureEnd = state2.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state2, captureStart, captureEnd, true); + writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); + captureStart = captureEnd = state2.position; + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + throwError(state2, "unexpected end of the document within a single quoted scalar"); + } else { + state2.position++; + captureEnd = state2.position; + } + } + throwError(state2, "unexpected end of the stream within a single quoted scalar"); +} +function readDoubleQuotedScalar(state2, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 34) { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + state2.position++; + captureStart = captureEnd = state2.position; + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + if (ch === 34) { + captureSegment(state2, captureStart, state2.position, true); + state2.position++; + return true; + } else if (ch === 92) { + captureSegment(state2, captureStart, state2.position, true); + ch = state2.input.charCodeAt(++state2.position); + if (is_EOL(ch)) { + skipSeparationSpace(state2, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state2.result += simpleEscapeMap[ch]; + state2.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state2.input.charCodeAt(++state2.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state2, "expected hexadecimal character"); + } + } + state2.result += charFromCodepoint(hexResult); + state2.position++; + } else { + throwError(state2, "unknown escape sequence"); + } + captureStart = captureEnd = state2.position; + } else if (is_EOL(ch)) { + captureSegment(state2, captureStart, captureEnd, true); + writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); + captureStart = captureEnd = state2.position; + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + throwError(state2, "unexpected end of the document within a double quoted scalar"); + } else { + state2.position++; + captureEnd = state2.position; + } + } + throwError(state2, "unexpected end of the stream within a double quoted scalar"); +} +function readFlowCollection(state2, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state2.tag, _result, _anchor = state2.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(++state2.position); + while (ch !== 0) { + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if (ch === terminator) { + state2.position++; + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = isMapping ? "mapping" : "sequence"; + state2.result = _result; + return true; + } else if (!readNext) { + throwError(state2, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError(state2, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state2.position++; + skipSeparationSpace(state2, true, nodeIndent); + } + } + _line = state2.line; + _lineStart = state2.lineStart; + _pos = state2.position; + composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state2.tag; + keyNode = state2.result; + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if ((isExplicitPair || state2.line === _line) && ch === 58) { + isPair = true; + ch = state2.input.charCodeAt(++state2.position); + skipSeparationSpace(state2, true, nodeIndent); + composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state2.result; + } + if (isMapping) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state2, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if (ch === 44) { + readNext = true; + ch = state2.input.charCodeAt(++state2.position); + } else { + readNext = false; + } + } + throwError(state2, "unexpected end of the stream within a flow collection"); +} +function readBlockScalar(state2, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + while (ch !== 0) { + ch = state2.input.charCodeAt(++state2.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state2, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state2, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state2, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state2); + state2.lineIndent = 0; + ch = state2.input.charCodeAt(state2.position); + while ((!detectedIndent || state2.lineIndent < textIndent) && ch === 32) { + state2.lineIndent++; + ch = state2.input.charCodeAt(++state2.position); + } + if (!detectedIndent && state2.lineIndent > textIndent) { + textIndent = state2.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state2.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state2.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state2.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state2.result += " "; + } + } else { + state2.result += common.repeat("\n", emptyLines); + } + } else { + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state2.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state2.input.charCodeAt(++state2.position); + } + captureSegment(state2, captureStart, state2.position, false); + } + return true; +} +function readBlockSequence(state2, nodeIndent) { + var _line, _tag = state2.tag, _anchor = state2.anchor, _result = [], following, detected = false, ch; + if (state2.firstTabInLine !== -1) + return false; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + if (state2.firstTabInLine !== -1) { + state2.position = state2.firstTabInLine; + throwError(state2, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state2.input.charCodeAt(state2.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state2.position++; + if (skipSeparationSpace(state2, true, -1)) { + if (state2.lineIndent <= nodeIndent) { + _result.push(null); + ch = state2.input.charCodeAt(state2.position); + continue; + } + } + _line = state2.line; + composeNode(state2, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state2.result); + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { + throwError(state2, "bad indentation of a sequence entry"); + } else if (state2.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = "sequence"; + state2.result = _result; + return true; + } + return false; +} +function readBlockMapping(state2, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state2.tag, _anchor = state2.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state2.firstTabInLine !== -1) + return false; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + if (!atExplicitKey && state2.firstTabInLine !== -1) { + state2.position = state2.firstTabInLine; + throwError(state2, "tab characters must not be used in indentation"); + } + following = state2.input.charCodeAt(state2.position + 1); + _line = state2.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state2, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state2.position += 1; + ch = following; + } else { + _keyLine = state2.line; + _keyLineStart = state2.lineStart; + _keyPos = state2.position; + if (!composeNode(state2, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + break; + } + if (state2.line === _line) { + ch = state2.input.charCodeAt(state2.position); + while (is_WHITE_SPACE(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (ch === 58) { + ch = state2.input.charCodeAt(++state2.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state2, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state2.tag; + keyNode = state2.result; + } else if (detected) { + throwError(state2, "can not read an implicit mapping pair; a colon is missed"); + } else { + state2.tag = _tag; + state2.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state2, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state2.tag = _tag; + state2.anchor = _anchor; + return true; + } + } + if (state2.line === _line || state2.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state2.line; + _keyLineStart = state2.lineStart; + _keyPos = state2.position; + } + if (composeNode(state2, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state2.result; + } else { + valueNode = state2.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + } + if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { + throwError(state2, "bad indentation of a mapping entry"); + } else if (state2.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = "mapping"; + state2.result = _result; + } + return detected; +} +function readTagProperty(state2) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 33) + return false; + if (state2.tag !== null) { + throwError(state2, "duplication of a tag property"); + } + ch = state2.input.charCodeAt(++state2.position); + if (ch === 60) { + isVerbatim = true; + ch = state2.input.charCodeAt(++state2.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state2.input.charCodeAt(++state2.position); + } else { + tagHandle = "!"; + } + _position = state2.position; + if (isVerbatim) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 0 && ch !== 62); + if (state2.position < state2.length) { + tagName = state2.input.slice(_position, state2.position); + ch = state2.input.charCodeAt(++state2.position); + } else { + throwError(state2, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state2.input.slice(_position - 1, state2.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state2, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state2.position + 1; + } else { + throwError(state2, "tag suffix cannot contain exclamation marks"); + } + } + ch = state2.input.charCodeAt(++state2.position); + } + tagName = state2.input.slice(_position, state2.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state2, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state2, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state2, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state2.tag = tagName; + } else if (_hasOwnProperty$1.call(state2.tagMap, tagHandle)) { + state2.tag = state2.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state2.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state2.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state2, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; +} +function readAnchorProperty(state2) { + var _position, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 38) + return false; + if (state2.anchor !== null) { + throwError(state2, "duplication of an anchor property"); + } + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (state2.position === _position) { + throwError(state2, "name of an anchor node must contain at least one character"); + } + state2.anchor = state2.input.slice(_position, state2.position); + return true; +} +function readAlias(state2) { + var _position, alias, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 42) + return false; + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (state2.position === _position) { + throwError(state2, "name of an alias node must contain at least one character"); + } + alias = state2.input.slice(_position, state2.position); + if (!_hasOwnProperty$1.call(state2.anchorMap, alias)) { + throwError(state2, 'unidentified alias "' + alias + '"'); + } + state2.result = state2.anchorMap[alias]; + skipSeparationSpace(state2, true, -1); + return true; +} +function composeNode(state2, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; + if (state2.listener !== null) { + state2.listener("open", state2); + } + state2.tag = null; + state2.anchor = null; + state2.kind = null; + state2.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state2, true, -1)) { + atNewLine = true; + if (state2.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state2.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state2.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state2) || readAnchorProperty(state2)) { + if (skipSeparationSpace(state2, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state2.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state2.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state2.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state2.position - state2.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state2, blockIndent) || readBlockMapping(state2, blockIndent, flowIndent)) || readFlowCollection(state2, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state2, flowIndent) || readSingleQuotedScalar(state2, flowIndent) || readDoubleQuotedScalar(state2, flowIndent)) { + hasContent = true; + } else if (readAlias(state2)) { + hasContent = true; + if (state2.tag !== null || state2.anchor !== null) { + throwError(state2, "alias node should not have any properties"); + } + } else if (readPlainScalar(state2, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state2.tag === null) { + state2.tag = "?"; + } + } + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state2, blockIndent); + } + } + if (state2.tag === null) { + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } else if (state2.tag === "?") { + if (state2.result !== null && state2.kind !== "scalar") { + throwError(state2, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state2.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state2.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type2 = state2.implicitTypes[typeIndex]; + if (type2.resolve(state2.result)) { + state2.result = type2.construct(state2.result); + state2.tag = type2.tag; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + break; + } + } + } else if (state2.tag !== "!") { + if (_hasOwnProperty$1.call(state2.typeMap[state2.kind || "fallback"], state2.tag)) { + type2 = state2.typeMap[state2.kind || "fallback"][state2.tag]; + } else { + type2 = null; + typeList = state2.typeMap.multi[state2.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state2.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type2 = typeList[typeIndex]; + break; + } + } + } + if (!type2) { + throwError(state2, "unknown tag !<" + state2.tag + ">"); + } + if (state2.result !== null && type2.kind !== state2.kind) { + throwError(state2, "unacceptable node kind for !<" + state2.tag + '> tag; it should be "' + type2.kind + '", not "' + state2.kind + '"'); + } + if (!type2.resolve(state2.result, state2.tag)) { + throwError(state2, "cannot resolve a node with !<" + state2.tag + "> explicit tag"); + } else { + state2.result = type2.construct(state2.result, state2.tag); + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } + } + if (state2.listener !== null) { + state2.listener("close", state2); + } + return state2.tag !== null || state2.anchor !== null || hasContent; +} +function readDocument(state2) { + var documentStart = state2.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state2.version = null; + state2.checkLineBreaks = state2.legacy; + state2.tagMap = /* @__PURE__ */ Object.create(null); + state2.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + if (state2.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + directiveName = state2.input.slice(_position, state2.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state2, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + directiveArgs.push(state2.input.slice(_position, state2.position)); + } + if (ch !== 0) + readLineBreak(state2); + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state2, directiveName, directiveArgs); + } else { + throwWarning(state2, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state2, true, -1); + if (state2.lineIndent === 0 && state2.input.charCodeAt(state2.position) === 45 && state2.input.charCodeAt(state2.position + 1) === 45 && state2.input.charCodeAt(state2.position + 2) === 45) { + state2.position += 3; + skipSeparationSpace(state2, true, -1); + } else if (hasDirectives) { + throwError(state2, "directives end mark is expected"); + } + composeNode(state2, state2.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state2, true, -1); + if (state2.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state2.input.slice(documentStart, state2.position))) { + throwWarning(state2, "non-ASCII line breaks are interpreted as content"); + } + state2.documents.push(state2.result); + if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + if (state2.input.charCodeAt(state2.position) === 46) { + state2.position += 3; + skipSeparationSpace(state2, true, -1); + } + return; + } + if (state2.position < state2.length - 1) { + throwError(state2, "end of the stream or a document separator is expected"); + } else { + return; + } +} +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state2 = new State$1(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state2.position = nullpos; + throwError(state2, "null byte is not allowed in input"); + } + state2.input += "\0"; + while (state2.input.charCodeAt(state2.position) === 32) { + state2.lineIndent += 1; + state2.position += 1; + } + while (state2.position < state2.length - 1) { + readDocument(state2); + } + return state2.documents; +} +function loadAll$1(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} +function load$1(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception("expected a single document in the stream, but found more"); +} +var loadAll_1 = loadAll$1; +var load_1 = load$1; +var loader = { + loadAll: loadAll_1, + load: load_1 +}; +var JSON_SCHEMA = json; +var load = loader.load; +function extractFrontMatter(text) { + const matches = text.match(frontMatterRegex); + if (!matches) { + return { + text, + metadata: {} + }; + } + let parsed = load(matches[1], { + // To support config, we need JSON schema. + // https://www.yaml.org/spec/1.2/spec.html#id2803231 + schema: JSON_SCHEMA + }) ?? {}; + parsed = typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {}; + const metadata = {}; + if (parsed.displayMode) { + metadata.displayMode = parsed.displayMode.toString(); + } + if (parsed.title) { + metadata.title = parsed.title.toString(); + } + if (parsed.config) { + metadata.config = parsed.config; + } + return { + text: text.slice(matches[0].length), + metadata + }; +} +const cleanupText = (code) => { + return code.replace(/\r\n?/g, "\n").replace( + /<(\w+)([^>]*)>/g, + (match, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">" + ); +}; +const processFrontmatter = (code) => { + const { text, metadata } = extractFrontMatter(code); + const { displayMode, title, config: config2 = {} } = metadata; + if (displayMode) { + if (!config2.gantt) { + config2.gantt = {}; + } + config2.gantt.displayMode = displayMode; + } + return { title, config: config2, text }; +}; +const processDirectives = (code) => { + const initDirective = utils.detectInit(code) ?? {}; + const wrapDirectives = utils.detectDirective(code, "wrap"); + if (Array.isArray(wrapDirectives)) { + initDirective.wrap = wrapDirectives.some(({ type: type2 }) => { + }); + } else if ((wrapDirectives == null ? void 0 : wrapDirectives.type) === "wrap") { + initDirective.wrap = true; + } + return { + text: removeDirectives(code), + directive: initDirective + }; +}; +function preprocessDiagram(code) { + const cleanedCode = cleanupText(code); + const frontMatterResult = processFrontmatter(cleanedCode); + const directiveResult = processDirectives(frontMatterResult.text); + const config2 = cleanAndMerge(frontMatterResult.config, directiveResult.directive); + code = cleanupComments(directiveResult.text); + return { + code, + title: frontMatterResult.title, + config: config2 + }; +} +const MAX_TEXTLENGTH = 5e4; +const MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"; +const SECURITY_LVL_SANDBOX = "sandbox"; +const SECURITY_LVL_LOOSE = "loose"; +const XMLNS_SVG_STD = "http://www.w3.org/2000/svg"; +const XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink"; +const XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml"; +const IFRAME_WIDTH = "100%"; +const IFRAME_HEIGHT = "100%"; +const IFRAME_STYLES = "border:0;margin:0;"; +const IFRAME_BODY_STYLE = "margin:0"; +const IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups"; +const IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.'; +const DOMPURIFY_TAGS = ["foreignobject"]; +const DOMPURIFY_ATTR = ["dominant-baseline"]; +function processAndSetConfigs(text) { + const processed = preprocessDiagram(text); + reset(); + addDirective(processed.config ?? {}); + return processed; +} +async function parse$1(text, parseOptions) { + addDiagrams(); + text = processAndSetConfigs(text).code; + try { + await getDiagramFromText(text); + } catch (error) { + if (parseOptions == null ? void 0 : parseOptions.suppressErrors) { + return false; + } + throw error; + } + return true; +} +const encodeEntities = function(text) { + let txt = text; + txt = txt.replace(/style.*:\S*#.*;/g, function(s) { + return s.substring(0, s.length - 1); + }); + txt = txt.replace(/classDef.*:\S*#.*;/g, function(s) { + return s.substring(0, s.length - 1); + }); + txt = txt.replace(/#\w+;/g, function(s) { + const innerTxt = s.substring(1, s.length - 1); + const isInt = /^\+?\d+$/.test(innerTxt); + if (isInt) { + return "fl°°" + innerTxt + "¶ß"; + } else { + return "fl°" + innerTxt + "¶ß"; + } + }); + return txt; +}; +const decodeEntities = function(text) { + return text.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";"); +}; +const cssImportantStyles = (cssClass, element, cssClasses = []) => { + return ` +.${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`; +}; +const createCssStyles = (config2, classDefs = {}) => { + var _a; + let cssStyles = ""; + if (config2.themeCSS !== void 0) { + cssStyles += ` +${config2.themeCSS}`; + } + if (config2.fontFamily !== void 0) { + cssStyles += ` +:root { --mermaid-font-family: ${config2.fontFamily}}`; + } + if (config2.altFontFamily !== void 0) { + cssStyles += ` +:root { --mermaid-alt-font-family: ${config2.altFontFamily}}`; + } + if (!isEmpty(classDefs)) { + const htmlLabels = config2.htmlLabels || ((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels); + const cssHtmlElements = ["> *", "span"]; + const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"]; + const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements; + for (const classId in classDefs) { + const styleClassDef = classDefs[classId]; + if (!isEmpty(styleClassDef.styles)) { + cssElements.forEach((cssElement) => { + cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles); + }); + } + if (!isEmpty(styleClassDef.textStyles)) { + cssStyles += cssImportantStyles(styleClassDef.id, "tspan", styleClassDef.textStyles); + } + } + } + return cssStyles; +}; +const createUserStyles = (config2, graphType, classDefs, svgId) => { + const userCSSstyles = createCssStyles(config2, classDefs); + const allStyles = getStyles$1(graphType, userCSSstyles, config2.themeVariables); + return serialize(compile(`${svgId}{${allStyles}}`), stringify); +}; +const cleanUpSvgCode = (svgCode = "", inSandboxMode, useArrowMarkerUrls) => { + let cleanedUpSvg = svgCode; + if (!useArrowMarkerUrls && !inSandboxMode) { + cleanedUpSvg = cleanedUpSvg.replace( + /marker-end="url\([\d+./:=?A-Za-z-]*?#/g, + 'marker-end="url(#' + ); + } + cleanedUpSvg = decodeEntities(cleanedUpSvg); + cleanedUpSvg = cleanedUpSvg.replace(/
/g, "
"); + return cleanedUpSvg; +}; +const putIntoIFrame = (svgCode = "", svgElement) => { + var _a, _b; + const height = ((_b = (_a = svgElement == null ? void 0 : svgElement.viewBox) == null ? void 0 : _a.baseVal) == null ? void 0 : _b.height) ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT; + const base64encodedSrc = btoa('' + svgCode + ""); + return ``; +}; +const appendDivSvgG = (parentRoot, id2, enclosingDivId, divStyle, svgXlink) => { + const enclosingDiv = parentRoot.append("div"); + enclosingDiv.attr("id", enclosingDivId); + if (divStyle) { + enclosingDiv.attr("style", divStyle); + } + const svgNode = enclosingDiv.append("svg").attr("id", id2).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD); + if (svgXlink) { + svgNode.attr("xmlns:xlink", svgXlink); + } + svgNode.append("g"); + return parentRoot; +}; +function sandboxedIframe(parentNode, iFrameId) { + return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", ""); +} +const removeExistingElements = (doc, id2, divId, iFrameId) => { + var _a, _b, _c; + (_a = doc.getElementById(id2)) == null ? void 0 : _a.remove(); + (_b = doc.getElementById(divId)) == null ? void 0 : _b.remove(); + (_c = doc.getElementById(iFrameId)) == null ? void 0 : _c.remove(); +}; +const render$1 = async function(id2, text, svgContainingElement) { + var _a, _b, _c, _d, _e, _f; + addDiagrams(); + const processed = processAndSetConfigs(text); + text = processed.code; + const config2 = getConfig$1(); + log$1.debug(config2); + if (text.length > ((config2 == null ? void 0 : config2.maxTextSize) ?? MAX_TEXTLENGTH)) { + text = MAX_TEXTLENGTH_EXCEEDED_MSG; + } + const idSelector = "#" + id2; + const iFrameID = "i" + id2; + const iFrameID_selector = "#" + iFrameID; + const enclosingDivID = "d" + id2; + const enclosingDivID_selector = "#" + enclosingDivID; + let root = select("body"); + const isSandboxed = config2.securityLevel === SECURITY_LVL_SANDBOX; + const isLooseSecurityLevel = config2.securityLevel === SECURITY_LVL_LOOSE; + const fontFamily = config2.fontFamily; + if (svgContainingElement !== void 0) { + if (svgContainingElement) { + svgContainingElement.innerHTML = ""; + } + if (isSandboxed) { + const iframe = sandboxedIframe(select(svgContainingElement), iFrameID); + root = select(iframe.nodes()[0].contentDocument.body); + root.node().style.margin = 0; + } else { + root = select(svgContainingElement); + } + appendDivSvgG(root, id2, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD); + } else { + removeExistingElements(document, id2, enclosingDivID, iFrameID); + if (isSandboxed) { + const iframe = sandboxedIframe(select("body"), iFrameID); + root = select(iframe.nodes()[0].contentDocument.body); + root.node().style.margin = 0; + } else { + root = select("body"); + } + appendDivSvgG(root, id2, enclosingDivID); + } + text = encodeEntities(text); + let diag; + let parseEncounteredException; + try { + diag = await getDiagramFromText(text, { title: processed.title }); + } catch (error) { + diag = new Diagram("error"); + parseEncounteredException = error; + } + const element = root.select(enclosingDivID_selector).node(); + const diagramType = diag.type; + const svg = element.firstChild; + const firstChild = svg.firstChild; + const diagramClassDefs = (_b = (_a = diag.renderer).getClasses) == null ? void 0 : _b.call(_a, text, diag); + const rules = createUserStyles(config2, diagramType, diagramClassDefs, idSelector); + const style1 = document.createElement("style"); + style1.innerHTML = rules; + svg.insertBefore(style1, firstChild); + try { + await diag.renderer.draw(text, id2, version, diag); + } catch (e) { + errorRenderer.draw(text, id2, version); + throw e; + } + const svgNode = root.select(`${enclosingDivID_selector} svg`); + const a11yTitle = (_d = (_c = diag.db).getAccTitle) == null ? void 0 : _d.call(_c); + const a11yDescr = (_f = (_e = diag.db).getAccDescription) == null ? void 0 : _f.call(_e); + addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr); + root.select(`[id="${id2}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD); + let svgCode = root.select(enclosingDivID_selector).node().innerHTML; + log$1.debug("config.arrowMarkerAbsolute", config2.arrowMarkerAbsolute); + svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config2.arrowMarkerAbsolute)); + if (isSandboxed) { + const svgEl = root.select(enclosingDivID_selector + " svg").node(); + svgCode = putIntoIFrame(svgCode, svgEl); + } else if (!isLooseSecurityLevel) { + svgCode = DOMPurify.sanitize(svgCode, { + ADD_TAGS: DOMPURIFY_TAGS, + ADD_ATTR: DOMPURIFY_ATTR + }); + } + attachFunctions(); + if (parseEncounteredException) { + throw parseEncounteredException; + } + const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector; + const node = select(tmpElementSelector).node(); + if (node && "remove" in node) { + node.remove(); + } + return { + svg: svgCode, + bindFunctions: diag.db.bindFunctions + }; +}; +function initialize$1(options = {}) { + var _a; + if ((options == null ? void 0 : options.fontFamily) && !((_a = options.themeVariables) == null ? void 0 : _a.fontFamily)) { + if (!options.themeVariables) { + options.themeVariables = {}; + } + options.themeVariables.fontFamily = options.fontFamily; + } + saveConfigFromInitialize(options); + if ((options == null ? void 0 : options.theme) && options.theme in theme) { + options.themeVariables = theme[options.theme].getThemeVariables( + options.themeVariables + ); + } else if (options) { + options.themeVariables = theme.default.getThemeVariables(options.themeVariables); + } + const config2 = typeof options === "object" ? setSiteConfig(options) : getSiteConfig(); + setLogLevel$1(config2.logLevel); + addDiagrams(); +} +function addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr) { + setA11yDiagramInfo(svgNode, diagramType); + addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr("id")); +} +const mermaidAPI = Object.freeze({ + render: render$1, + parse: parse$1, + getDiagramFromText, + initialize: initialize$1, + getConfig: getConfig$1, + setConfig, + getSiteConfig, + updateSiteConfig, + reset: () => { + reset(); + }, + globalReset: () => { + reset(defaultConfig); + }, + defaultConfig +}); +setLogLevel$1(getConfig$1().logLevel); +reset(getConfig$1()); +const loadRegisteredDiagrams = async () => { + log$1.debug(`Loading registered diagrams`); + const results = await Promise.allSettled( + Object.entries(detectors).map(async ([key, { detector: detector2, loader: loader2 }]) => { + if (loader2) { + try { + getDiagram(key); + } catch (error) { + try { + const { diagram: diagram2, id: id2 } = await loader2(); + registerDiagram(id2, diagram2, detector2); + } catch (err) { + log$1.error(`Failed to load external diagram with key ${key}. Removing from detectors.`); + delete detectors[key]; + throw err; + } + } + } + }) + ); + const failed = results.filter((result) => result.status === "rejected"); + if (failed.length > 0) { + log$1.error(`Failed to load ${failed.length} external diagrams`); + for (const res of failed) { + log$1.error(res); + } + throw new Error(`Failed to load ${failed.length} external diagrams`); + } +}; +const handleError = (error, errors, parseError) => { + log$1.warn(error); + if (isDetailedError(error)) { + if (parseError) { + parseError(error.str, error.hash); + } + errors.push({ ...error, message: error.str, error }); + } else { + if (parseError) { + parseError(error); + } + if (error instanceof Error) { + errors.push({ + str: error.message, + message: error.message, + hash: error.name, + error + }); + } + } +}; +const run = async function(options = { + querySelector: ".mermaid" +}) { + try { + await runThrowsErrors(options); + } catch (e) { + if (isDetailedError(e)) { + log$1.error(e.str); + } + if (mermaid.parseError) { + mermaid.parseError(e); + } + if (!options.suppressErrors) { + log$1.error("Use the suppressErrors option to suppress these errors"); + throw e; + } + } +}; +const runThrowsErrors = async function({ postRenderCallback, querySelector, nodes } = { + querySelector: ".mermaid" +}) { + const conf = mermaidAPI.getConfig(); + log$1.debug(`${!postRenderCallback ? "No " : ""}Callback function found`); + let nodesToProcess; + if (nodes) { + nodesToProcess = nodes; + } else if (querySelector) { + nodesToProcess = document.querySelectorAll(querySelector); + } else { + throw new Error("Nodes and querySelector are both undefined"); + } + log$1.debug(`Found ${nodesToProcess.length} diagrams`); + if ((conf == null ? void 0 : conf.startOnLoad) !== void 0) { + log$1.debug("Start On Load: " + (conf == null ? void 0 : conf.startOnLoad)); + mermaidAPI.updateSiteConfig({ startOnLoad: conf == null ? void 0 : conf.startOnLoad }); + } + const idGenerator = new utils.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed); + let txt; + const errors = []; + for (const element of Array.from(nodesToProcess)) { + log$1.info("Rendering diagram: " + element.id); + /*! Check if previously processed */ + if (element.getAttribute("data-processed")) { + continue; + } + element.setAttribute("data-processed", "true"); + const id2 = `mermaid-${idGenerator.next()}`; + txt = element.innerHTML; + txt = dedent(utils.entityDecode(txt)).trim().replace(//gi, "
"); + const init2 = utils.detectInit(txt); + if (init2) { + log$1.debug("Detected early reinit: ", init2); + } + try { + const { svg, bindFunctions } = await render(id2, txt, element); + element.innerHTML = svg; + if (postRenderCallback) { + await postRenderCallback(id2); + } + if (bindFunctions) { + bindFunctions(element); + } + } catch (error) { + handleError(error, errors, mermaid.parseError); + } + } + if (errors.length > 0) { + throw errors[0]; + } +}; +const initialize = function(config2) { + mermaidAPI.initialize(config2); +}; +const init = async function(config2, nodes, callback) { + log$1.warn("mermaid.init is deprecated. Please use run instead."); + if (config2) { + initialize(config2); + } + const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" }; + if (typeof nodes === "string") { + runOptions.querySelector = nodes; + } else if (nodes) { + if (nodes instanceof HTMLElement) { + runOptions.nodes = [nodes]; + } else { + runOptions.nodes = nodes; + } + } + await run(runOptions); +}; +const registerExternalDiagrams = async (diagrams2, { + lazyLoad = true +} = {}) => { + registerLazyLoadedDiagrams(...diagrams2); + if (lazyLoad === false) { + await loadRegisteredDiagrams(); + } +}; +const contentLoaded = function() { + if (mermaid.startOnLoad) { + const { startOnLoad } = mermaidAPI.getConfig(); + if (startOnLoad) { + mermaid.run().catch((err) => log$1.error("Mermaid failed to initialize", err)); + } + } +}; +if (typeof document !== "undefined") { + /*! + * Wait for document loaded before starting the execution + */ + window.addEventListener("load", contentLoaded, false); +} +const setParseErrorHandler = function(parseErrorHandler) { + mermaid.parseError = parseErrorHandler; +}; +const executionQueue = []; +let executionQueueRunning = false; +const executeQueue = async () => { + if (executionQueueRunning) { + return; + } + executionQueueRunning = true; + while (executionQueue.length > 0) { + const f = executionQueue.shift(); + if (f) { + try { + await f(); + } catch (e) { + log$1.error("Error executing queue", e); + } + } + } + executionQueueRunning = false; +}; +const parse = async (text, parseOptions) => { + return new Promise((resolve, reject) => { + const performCall = () => new Promise((res, rej) => { + mermaidAPI.parse(text, parseOptions).then( + (r) => { + res(r); + resolve(r); + }, + (e) => { + var _a; + log$1.error("Error parsing", e); + (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); + rej(e); + reject(e); + } + ); + }); + executionQueue.push(performCall); + executeQueue().catch(reject); + }); +}; +const render = (id2, text, container) => { + return new Promise((resolve, reject) => { + const performCall = () => new Promise((res, rej) => { + mermaidAPI.render(id2, text, container).then( + (r) => { + res(r); + resolve(r); + }, + (e) => { + var _a; + log$1.error("Error parsing", e); + (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); + rej(e); + reject(e); + } + ); + }); + executionQueue.push(performCall); + executeQueue().catch(reject); + }); +}; +const mermaid = { + startOnLoad: true, + mermaidAPI, + parse, + render, + init, + run, + registerExternalDiagrams, + initialize, + parseError: void 0, + contentLoaded, + setParseErrorHandler, + detectType +}; +export { + selectSvgElement as A, + defaultConfig$1 as B, + cleanAndMerge as C, + parseFontSize as D, + getThemeVariables$2 as E, + addFunction as F, + generateId as G, + lineBreakRegex as H, + defaultConfig as I, + decodeEntities as J, + commonDb as K, + mermaid as L, + ZERO_WIDTH_SPACE as Z, + getAccDescription as a, + setAccDescription as b, + getConfig$1 as c, + sanitizeText$2 as d, + common$1 as e, + assignWithDepth$1 as f, + getAccTitle as g, + calculateTextWidth as h, + configureSvgSize as i, + calculateTextHeight as j, + getStylesFromArray as k, + log$1 as l, + evaluate as m, + interpolateToCurve as n, + setupGraphViewbox$1 as o, + setConfig as p, + setDiagramTitle as q, + getDiagramTitle as r, + setAccTitle as s, + clear as t, + utils as u, + parseGenericTypes as v, + wrapLabel as w, + random as x, + getConfig as y, + setupGraphViewbox as z +}; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid-491db2d9.js b/webroot/js/node_modules/mermaid/dist/mermaid-491db2d9.js new file mode 100644 index 0000000..f3599a9 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid-491db2d9.js @@ -0,0 +1,12451 @@ +function dedent(templ) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + var strings = Array.from(typeof templ === "string" ? [templ] : templ); + strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, ""); + var indentLengths = strings.reduce(function(arr, str2) { + var matches = str2.match(/\n([\t ]+|(?!\s).)/g); + if (matches) { + return arr.concat(matches.map(function(match) { + var _a, _b; + return (_b = (_a = match.match(/[\t ]/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; + })); + } + return arr; + }, []); + if (indentLengths.length) { + var pattern_1 = new RegExp("\n[ ]{" + Math.min.apply(Math, indentLengths) + "}", "g"); + strings = strings.map(function(str2) { + return str2.replace(pattern_1, "\n"); + }); + } + strings[0] = strings[0].replace(/^\r?\n/, ""); + var string = strings[0]; + values.forEach(function(value, i) { + var endentations = string.match(/(?:^|\n)( *)$/); + var endentation = endentations ? endentations[1] : ""; + var indentedValue = value; + if (typeof value === "string" && value.includes("\n")) { + indentedValue = String(value).split("\n").map(function(str2, i2) { + return i2 === 0 ? str2 : "" + endentation + str2; + }).join("\n"); + } + string += indentedValue + strings[i + 1]; + }); + return string; +} +var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; +function getDefaultExportFromCjs(x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; +} +var dayjs_min = { exports: {} }; +(function(module2, exports2) { + !function(t, e) { + module2.exports = e(); + }(commonjsGlobal, function() { + var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", f = "month", h = "quarter", c = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) { + var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100; + return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]"; + } }, m = function(t2, e2, n2) { + var r2 = String(t2); + return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2; + }, v = { s: m, z: function(t2) { + var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60; + return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0"); + }, m: function t2(e2, n2) { + if (e2.date() < n2.date()) + return -t2(n2, e2); + var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, f), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), f); + return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0); + }, a: function(t2) { + return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2); + }, p: function(t2) { + return { M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h }[t2] || String(t2 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t2) { + return void 0 === t2; + } }, g = "en", D = {}; + D[g] = M; + var p = function(t2) { + return t2 instanceof _2; + }, S = function t2(e2, n2, r2) { + var i2; + if (!e2) + return g; + if ("string" == typeof e2) { + var s2 = e2.toLowerCase(); + D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2); + var u2 = e2.split("-"); + if (!i2 && u2.length > 1) + return t2(u2[0]); + } else { + var a2 = e2.name; + D[a2] = e2, i2 = a2; + } + return !r2 && i2 && (g = i2), i2 || !r2 && g; + }, w = function(t2, e2) { + if (p(t2)) + return t2.clone(); + var n2 = "object" == typeof e2 ? e2 : {}; + return n2.date = t2, n2.args = arguments, new _2(n2); + }, O = v; + O.l = S, O.i = p, O.w = function(t2, e2) { + return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset }); + }; + var _2 = function() { + function M2(t2) { + this.$L = S(t2.locale, null, true), this.parse(t2); + } + var m2 = M2.prototype; + return m2.parse = function(t2) { + this.$d = function(t3) { + var e2 = t3.date, n2 = t3.utc; + if (null === e2) + return /* @__PURE__ */ new Date(NaN); + if (O.u(e2)) + return /* @__PURE__ */ new Date(); + if (e2 instanceof Date) + return new Date(e2); + if ("string" == typeof e2 && !/Z$/i.test(e2)) { + var r2 = e2.match($); + if (r2) { + var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3); + return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2); + } + } + return new Date(e2); + }(t2), this.$x = t2.x || {}, this.init(); + }, m2.init = function() { + var t2 = this.$d; + this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds(); + }, m2.$utils = function() { + return O; + }, m2.isValid = function() { + return !(this.$d.toString() === l); + }, m2.isSame = function(t2, e2) { + var n2 = w(t2); + return this.startOf(e2) <= n2 && n2 <= this.endOf(e2); + }, m2.isAfter = function(t2, e2) { + return w(t2) < this.startOf(e2); + }, m2.isBefore = function(t2, e2) { + return this.endOf(e2) < w(t2); + }, m2.$g = function(t2, e2, n2) { + return O.u(t2) ? this[e2] : this.set(n2, t2); + }, m2.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m2.valueOf = function() { + return this.$d.getTime(); + }, m2.startOf = function(t2, e2) { + var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) { + var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2); + return r2 ? i2 : i2.endOf(a); + }, $2 = function(t3, e3) { + return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2); + }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : ""); + switch (h2) { + case c: + return r2 ? l2(1, 0) : l2(31, 11); + case f: + return r2 ? l2(1, M3) : l2(0, M3 + 1); + case o: + var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2; + return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3); + case a: + case d: + return $2(v2 + "Hours", 0); + case u: + return $2(v2 + "Minutes", 1); + case s: + return $2(v2 + "Seconds", 2); + case i: + return $2(v2 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m2.endOf = function(t2) { + return this.startOf(t2, false); + }, m2.$set = function(t2, e2) { + var n2, o2 = O.p(t2), h2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = h2 + "Date", n2[d] = h2 + "Date", n2[f] = h2 + "Month", n2[c] = h2 + "FullYear", n2[u] = h2 + "Hours", n2[s] = h2 + "Minutes", n2[i] = h2 + "Seconds", n2[r] = h2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2; + if (o2 === f || o2 === c) { + var y2 = this.clone().set(d, 1); + y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d; + } else + l2 && this.$d[l2]($2); + return this.init(), this; + }, m2.set = function(t2, e2) { + return this.clone().$set(t2, e2); + }, m2.get = function(t2) { + return this[O.p(t2)](); + }, m2.add = function(r2, h2) { + var d2, l2 = this; + r2 = Number(r2); + var $2 = O.p(h2), y2 = function(t2) { + var e2 = w(l2); + return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2); + }; + if ($2 === f) + return this.set(f, this.$M + r2); + if ($2 === c) + return this.set(c, this.$y + r2); + if ($2 === a) + return y2(1); + if ($2 === o) + return y2(7); + var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3; + return O.w(m3, this); + }, m2.subtract = function(t2, e2) { + return this.add(-1 * t2, e2); + }, m2.format = function(t2) { + var e2 = this, n2 = this.$locale(); + if (!this.isValid()) + return n2.invalidDate || l; + var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, f2 = n2.months, h2 = function(t3, n3, i3, s3) { + return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3); + }, c2 = function(t3) { + return O.s(s2 % 12 || 12, t3, "0"); + }, d2 = n2.meridiem || function(t3, e3, n3) { + var r3 = t3 < 12 ? "AM" : "PM"; + return n3 ? r3.toLowerCase() : r3; + }, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h2(n2.monthsShort, a2, f2, 3), MMMM: h2(f2, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h2(n2.weekdaysMin, this.$W, o2, 2), ddd: h2(n2.weekdaysShort, this.$W, o2, 3), dddd: o2[this.$W], H: String(s2), HH: O.s(s2, 2, "0"), h: c2(1), hh: c2(2), a: d2(s2, u2, true), A: d2(s2, u2, false), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i2 }; + return r2.replace(y, function(t3, e3) { + return e3 || $2[t3] || i2.replace(":", ""); + }); + }, m2.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m2.diff = function(r2, d2, l2) { + var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3); + return g2 = ($2 = {}, $2[c] = g2 / 12, $2[f] = g2, $2[h] = g2 / 3, $2[o] = (v2 - m3) / 6048e5, $2[a] = (v2 - m3) / 864e5, $2[u] = v2 / n, $2[s] = v2 / e, $2[i] = v2 / t, $2)[y2] || v2, l2 ? g2 : O.a(g2); + }, m2.daysInMonth = function() { + return this.endOf(f).$D; + }, m2.$locale = function() { + return D[this.$L]; + }, m2.locale = function(t2, e2) { + if (!t2) + return this.$L; + var n2 = this.clone(), r2 = S(t2, e2, true); + return r2 && (n2.$L = r2), n2; + }, m2.clone = function() { + return O.w(this.$d, this); + }, m2.toDate = function() { + return new Date(this.valueOf()); + }, m2.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m2.toISOString = function() { + return this.$d.toISOString(); + }, m2.toString = function() { + return this.$d.toUTCString(); + }, M2; + }(), T = _2.prototype; + return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) { + T[t2[1]] = function(e2) { + return this.$g(e2, t2[0], t2[1]); + }; + }), w.extend = function(t2, e2) { + return t2.$i || (t2(e2, _2, w), t2.$i = true), w; + }, w.locale = S, w.isDayjs = p, w.unix = function(t2) { + return w(1e3 * t2); + }, w.en = D[g], w.Ls = D, w.p = {}, w; + }); +})(dayjs_min); +var dayjs_minExports = dayjs_min.exports; +const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports); +const LEVELS = { + trace: 0, + debug: 1, + info: 2, + warn: 3, + error: 4, + fatal: 5 +}; +const log$1 = { + trace: (..._args) => { + }, + debug: (..._args) => { + }, + info: (..._args) => { + }, + warn: (..._args) => { + }, + error: (..._args) => { + }, + fatal: (..._args) => { + } +}; +const setLogLevel$1 = function(level = "fatal") { + let numericLevel = LEVELS.fatal; + if (typeof level === "string") { + level = level.toLowerCase(); + if (level in LEVELS) { + numericLevel = LEVELS[level]; + } + } else if (typeof level === "number") { + numericLevel = level; + } + log$1.trace = () => { + }; + log$1.debug = () => { + }; + log$1.info = () => { + }; + log$1.warn = () => { + }; + log$1.error = () => { + }; + log$1.fatal = () => { + }; + if (numericLevel <= LEVELS.fatal) { + log$1.fatal = console.error ? console.error.bind(console, format("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format("FATAL")); + } + if (numericLevel <= LEVELS.error) { + log$1.error = console.error ? console.error.bind(console, format("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format("ERROR")); + } + if (numericLevel <= LEVELS.warn) { + log$1.warn = console.warn ? console.warn.bind(console, format("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format("WARN")); + } + if (numericLevel <= LEVELS.info) { + log$1.info = console.info ? console.info.bind(console, format("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format("INFO")); + } + if (numericLevel <= LEVELS.debug) { + log$1.debug = console.debug ? console.debug.bind(console, format("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("DEBUG")); + } + if (numericLevel <= LEVELS.trace) { + log$1.trace = console.debug ? console.debug.bind(console, format("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("TRACE")); + } +}; +const format = (level) => { + const time = dayjs().format("ss.SSS"); + return `%c${time} : ${level} : `; +}; +var dist = {}; +Object.defineProperty(dist, "__esModule", { value: true }); +var sanitizeUrl_1 = dist.sanitizeUrl = void 0; +var invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im; +var htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g; +var htmlCtrlEntityRegex = /&(newline|tab);/gi; +var ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim; +var urlSchemeRegex = /^.+(:|:)/gim; +var relativeFirstCharacters = [".", "/"]; +function isRelativeUrlWithoutProtocol(url) { + return relativeFirstCharacters.indexOf(url[0]) > -1; +} +function decodeHtmlCharacters(str2) { + return str2.replace(htmlEntitiesRegex, function(match, dec) { + return String.fromCharCode(dec); + }); +} +function sanitizeUrl(url) { + var sanitizedUrl = decodeHtmlCharacters(url || "").replace(htmlCtrlEntityRegex, "").replace(ctrlCharactersRegex, "").trim(); + if (!sanitizedUrl) { + return "about:blank"; + } + if (isRelativeUrlWithoutProtocol(sanitizedUrl)) { + return sanitizedUrl; + } + var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex); + if (!urlSchemeParseResults) { + return sanitizedUrl; + } + var urlScheme = urlSchemeParseResults[0]; + if (invalidProtocolRegex.test(urlScheme)) { + return "about:blank"; + } + return sanitizedUrl; +} +sanitizeUrl_1 = dist.sanitizeUrl = sanitizeUrl; +var noop$1 = { value: () => { +} }; +function dispatch() { + for (var i = 0, n = arguments.length, _2 = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || t in _2 || /[\s.]/.test(t)) + throw new Error("illegal type: " + t); + _2[t] = []; + } + return new Dispatch(_2); +} +function Dispatch(_2) { + this._ = _2; +} +function parseTypenames$1(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) + name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) + throw new Error("unknown type: " + t); + return { type: t, name }; + }); +} +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _2 = this._, T = parseTypenames$1(typename + "", _2), t, i = -1, n = T.length; + if (arguments.length < 2) { + while (++i < n) + if ((t = (typename = T[i]).type) && (t = get$1(_2[t], typename.name))) + return t; + return; + } + if (callback != null && typeof callback !== "function") + throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) + _2[t] = set$2(_2[t], typename.name, callback); + else if (callback == null) + for (t in _2) + _2[t] = set$2(_2[t], typename.name, null); + } + return this; + }, + copy: function() { + var copy = {}, _2 = this._; + for (var t in _2) + copy[t] = _2[t].slice(); + return new Dispatch(copy); + }, + call: function(type2, that) { + if ((n = arguments.length - 2) > 0) + for (var args = new Array(n), i = 0, n, t; i < n; ++i) + args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type2)) + throw new Error("unknown type: " + type2); + for (t = this._[type2], i = 0, n = t.length; i < n; ++i) + t[i].value.apply(that, args); + }, + apply: function(type2, that, args) { + if (!this._.hasOwnProperty(type2)) + throw new Error("unknown type: " + type2); + for (var t = this._[type2], i = 0, n = t.length; i < n; ++i) + t[i].value.apply(that, args); + } +}; +function get$1(type2, name) { + for (var i = 0, n = type2.length, c; i < n; ++i) { + if ((c = type2[i]).name === name) { + return c.value; + } + } +} +function set$2(type2, name, callback) { + for (var i = 0, n = type2.length; i < n; ++i) { + if (type2[i].name === name) { + type2[i] = noop$1, type2 = type2.slice(0, i).concat(type2.slice(i + 1)); + break; + } + } + if (callback != null) + type2.push({ name, value: callback }); + return type2; +} +var xhtml = "http://www.w3.org/1999/xhtml"; +const namespaces = { + svg: "http://www.w3.org/2000/svg", + xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" +}; +function namespace(name) { + var prefix = name += "", i = prefix.indexOf(":"); + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") + name = name.slice(i + 1); + return namespaces.hasOwnProperty(prefix) ? { space: namespaces[prefix], local: name } : name; +} +function creatorInherit(name) { + return function() { + var document2 = this.ownerDocument, uri = this.namespaceURI; + return uri === xhtml && document2.documentElement.namespaceURI === xhtml ? document2.createElement(name) : document2.createElementNS(uri, name); + }; +} +function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; +} +function creator(name) { + var fullname = namespace(name); + return (fullname.local ? creatorFixed : creatorInherit)(fullname); +} +function none() { +} +function selector(selector2) { + return selector2 == null ? none : function() { + return this.querySelector(selector2); + }; +} +function selection_select(select) { + if (typeof select !== "function") + select = selector(select); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) { + if ((node2 = group[i]) && (subnode = select.call(node2, node2.__data__, i, group))) { + if ("__data__" in node2) + subnode.__data__ = node2.__data__; + subgroup[i] = subnode; + } + } + } + return new Selection$1(subgroups, this._parents); +} +function array(x) { + return x == null ? [] : Array.isArray(x) ? x : Array.from(x); +} +function empty() { + return []; +} +function selectorAll(selector2) { + return selector2 == null ? empty : function() { + return this.querySelectorAll(selector2); + }; +} +function arrayAll(select) { + return function() { + return array(select.apply(this, arguments)); + }; +} +function selection_selectAll(select) { + if (typeof select === "function") + select = arrayAll(select); + else + select = selectorAll(select); + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) { + if (node2 = group[i]) { + subgroups.push(select.call(node2, node2.__data__, i, group)); + parents.push(node2); + } + } + } + return new Selection$1(subgroups, parents); +} +function matcher(selector2) { + return function() { + return this.matches(selector2); + }; +} +function childMatcher(selector2) { + return function(node2) { + return node2.matches(selector2); + }; +} +var find = Array.prototype.find; +function childFind(match) { + return function() { + return find.call(this.children, match); + }; +} +function childFirst() { + return this.firstElementChild; +} +function selection_selectChild(match) { + return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match))); +} +var filter = Array.prototype.filter; +function children() { + return Array.from(this.children); +} +function childrenFilter(match) { + return function() { + return filter.call(this.children, match); + }; +} +function selection_selectChildren(match) { + return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match))); +} +function selection_filter(match) { + if (typeof match !== "function") + match = matcher(match); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) { + if ((node2 = group[i]) && match.call(node2, node2.__data__, i, group)) { + subgroup.push(node2); + } + } + } + return new Selection$1(subgroups, this._parents); +} +function sparse(update) { + return new Array(update.length); +} +function selection_enter() { + return new Selection$1(this._enter || this._groups.map(sparse), this._parents); +} +function EnterNode(parent, datum2) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum2; +} +EnterNode.prototype = { + constructor: EnterNode, + appendChild: function(child) { + return this._parent.insertBefore(child, this._next); + }, + insertBefore: function(child, next2) { + return this._parent.insertBefore(child, next2); + }, + querySelector: function(selector2) { + return this._parent.querySelector(selector2); + }, + querySelectorAll: function(selector2) { + return this._parent.querySelectorAll(selector2); + } +}; +function constant$2(x) { + return function() { + return x; + }; +} +function bindIndex(parent, group, enter, update, exit, data) { + var i = 0, node2, groupLength = group.length, dataLength = data.length; + for (; i < dataLength; ++i) { + if (node2 = group[i]) { + node2.__data__ = data[i]; + update[i] = node2; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + for (; i < groupLength; ++i) { + if (node2 = group[i]) { + exit[i] = node2; + } + } +} +function bindKey(parent, group, enter, update, exit, data, key) { + var i, node2, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; + for (i = 0; i < groupLength; ++i) { + if (node2 = group[i]) { + keyValues[i] = keyValue = key.call(node2, node2.__data__, i, group) + ""; + if (nodeByKeyValue.has(keyValue)) { + exit[i] = node2; + } else { + nodeByKeyValue.set(keyValue, node2); + } + } + } + for (i = 0; i < dataLength; ++i) { + keyValue = key.call(parent, data[i], i, data) + ""; + if (node2 = nodeByKeyValue.get(keyValue)) { + update[i] = node2; + node2.__data__ = data[i]; + nodeByKeyValue.delete(keyValue); + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + for (i = 0; i < groupLength; ++i) { + if ((node2 = group[i]) && nodeByKeyValue.get(keyValues[i]) === node2) { + exit[i] = node2; + } + } +} +function datum(node2) { + return node2.__data__; +} +function selection_data(value, key) { + if (!arguments.length) + return Array.from(this, datum); + var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups; + if (typeof value !== "function") + value = constant$2(value); + for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { + var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength); + bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); + for (var i0 = 0, i1 = 0, previous, next2; i0 < dataLength; ++i0) { + if (previous = enterGroup[i0]) { + if (i0 >= i1) + i1 = i0 + 1; + while (!(next2 = updateGroup[i1]) && ++i1 < dataLength) + ; + previous._next = next2 || null; + } + } + } + update = new Selection$1(update, parents); + update._enter = enter; + update._exit = exit; + return update; +} +function arraylike(data) { + return typeof data === "object" && "length" in data ? data : Array.from(data); +} +function selection_exit() { + return new Selection$1(this._exit || this._groups.map(sparse), this._parents); +} +function selection_join(onenter, onupdate, onexit) { + var enter = this.enter(), update = this, exit = this.exit(); + if (typeof onenter === "function") { + enter = onenter(enter); + if (enter) + enter = enter.selection(); + } else { + enter = enter.append(onenter + ""); + } + if (onupdate != null) { + update = onupdate(update); + if (update) + update = update.selection(); + } + if (onexit == null) + exit.remove(); + else + onexit(exit); + return enter && update ? enter.merge(update).order() : update; +} +function selection_merge(context) { + var selection2 = context.selection ? context.selection() : context; + for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge2 = merges[j] = new Array(n), node2, i = 0; i < n; ++i) { + if (node2 = group0[i] || group1[i]) { + merge2[i] = node2; + } + } + } + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + return new Selection$1(merges, this._parents); +} +function selection_order() { + for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) { + for (var group = groups[j], i = group.length - 1, next2 = group[i], node2; --i >= 0; ) { + if (node2 = group[i]) { + if (next2 && node2.compareDocumentPosition(next2) ^ 4) + next2.parentNode.insertBefore(node2, next2); + next2 = node2; + } + } + } + return this; +} +function selection_sort(compare) { + if (!compare) + compare = ascending; + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node2, i = 0; i < n; ++i) { + if (node2 = group[i]) { + sortgroup[i] = node2; + } + } + sortgroup.sort(compareNode); + } + return new Selection$1(sortgroups, this._parents).order(); +} +function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +} +function selection_call() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; +} +function selection_nodes() { + return Array.from(this); +} +function selection_node() { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { + var node2 = group[i]; + if (node2) + return node2; + } + } + return null; +} +function selection_size() { + let size = 0; + for (const node2 of this) + ++size; + return size; +} +function selection_empty() { + return !this.node(); +} +function selection_each(callback) { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length, node2; i < n; ++i) { + if (node2 = group[i]) + callback.call(node2, node2.__data__, i, group); + } + } + return this; +} +function attrRemove$1(name) { + return function() { + this.removeAttribute(name); + }; +} +function attrRemoveNS$1(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} +function attrConstant$1(name, value) { + return function() { + this.setAttribute(name, value); + }; +} +function attrConstantNS$1(fullname, value) { + return function() { + this.setAttributeNS(fullname.space, fullname.local, value); + }; +} +function attrFunction$1(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + this.removeAttribute(name); + else + this.setAttribute(name, v); + }; +} +function attrFunctionNS$1(fullname, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + this.removeAttributeNS(fullname.space, fullname.local); + else + this.setAttributeNS(fullname.space, fullname.local, v); + }; +} +function selection_attr(name, value) { + var fullname = namespace(name); + if (arguments.length < 2) { + var node2 = this.node(); + return fullname.local ? node2.getAttributeNS(fullname.space, fullname.local) : node2.getAttribute(fullname); + } + return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value === "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value)); +} +function defaultView(node2) { + return node2.ownerDocument && node2.ownerDocument.defaultView || node2.document && node2 || node2.defaultView; +} +function styleRemove$1(name) { + return function() { + this.style.removeProperty(name); + }; +} +function styleConstant$1(name, value, priority) { + return function() { + this.style.setProperty(name, value, priority); + }; +} +function styleFunction$1(name, value, priority) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + this.style.removeProperty(name); + else + this.style.setProperty(name, v, priority); + }; +} +function selection_style(name, value, priority) { + return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value === "function" ? styleFunction$1 : styleConstant$1)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name); +} +function styleValue(node2, name) { + return node2.style.getPropertyValue(name) || defaultView(node2).getComputedStyle(node2, null).getPropertyValue(name); +} +function propertyRemove(name) { + return function() { + delete this[name]; + }; +} +function propertyConstant(name, value) { + return function() { + this[name] = value; + }; +} +function propertyFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) + delete this[name]; + else + this[name] = v; + }; +} +function selection_property(name, value) { + return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name]; +} +function classArray(string) { + return string.trim().split(/^|\s+/); +} +function classList(node2) { + return node2.classList || new ClassList(node2); +} +function ClassList(node2) { + this._node = node2; + this._names = classArray(node2.getAttribute("class") || ""); +} +ClassList.prototype = { + add: function(name) { + var i = this._names.indexOf(name); + if (i < 0) { + this._names.push(name); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + remove: function(name) { + var i = this._names.indexOf(name); + if (i >= 0) { + this._names.splice(i, 1); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + contains: function(name) { + return this._names.indexOf(name) >= 0; + } +}; +function classedAdd(node2, names) { + var list = classList(node2), i = -1, n = names.length; + while (++i < n) + list.add(names[i]); +} +function classedRemove(node2, names) { + var list = classList(node2), i = -1, n = names.length; + while (++i < n) + list.remove(names[i]); +} +function classedTrue(names) { + return function() { + classedAdd(this, names); + }; +} +function classedFalse(names) { + return function() { + classedRemove(this, names); + }; +} +function classedFunction(names, value) { + return function() { + (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); + }; +} +function selection_classed(name, value) { + var names = classArray(name + ""); + if (arguments.length < 2) { + var list = classList(this.node()), i = -1, n = names.length; + while (++i < n) + if (!list.contains(names[i])) + return false; + return true; + } + return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value)); +} +function textRemove() { + this.textContent = ""; +} +function textConstant$1(value) { + return function() { + this.textContent = value; + }; +} +function textFunction$1(value) { + return function() { + var v = value.apply(this, arguments); + this.textContent = v == null ? "" : v; + }; +} +function selection_text(value) { + return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent; +} +function htmlRemove() { + this.innerHTML = ""; +} +function htmlConstant(value) { + return function() { + this.innerHTML = value; + }; +} +function htmlFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + }; +} +function selection_html(value) { + return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML; +} +function raise() { + if (this.nextSibling) + this.parentNode.appendChild(this); +} +function selection_raise() { + return this.each(raise); +} +function lower() { + if (this.previousSibling) + this.parentNode.insertBefore(this, this.parentNode.firstChild); +} +function selection_lower() { + return this.each(lower); +} +function selection_append(name) { + var create2 = typeof name === "function" ? name : creator(name); + return this.select(function() { + return this.appendChild(create2.apply(this, arguments)); + }); +} +function constantNull() { + return null; +} +function selection_insert(name, before) { + var create2 = typeof name === "function" ? name : creator(name), select = before == null ? constantNull : typeof before === "function" ? before : selector(before); + return this.select(function() { + return this.insertBefore(create2.apply(this, arguments), select.apply(this, arguments) || null); + }); +} +function remove() { + var parent = this.parentNode; + if (parent) + parent.removeChild(this); +} +function selection_remove() { + return this.each(remove); +} +function selection_cloneShallow() { + var clone2 = this.cloneNode(false), parent = this.parentNode; + return parent ? parent.insertBefore(clone2, this.nextSibling) : clone2; +} +function selection_cloneDeep() { + var clone2 = this.cloneNode(true), parent = this.parentNode; + return parent ? parent.insertBefore(clone2, this.nextSibling) : clone2; +} +function selection_clone(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); +} +function selection_datum(value) { + return arguments.length ? this.property("__data__", value) : this.node().__data__; +} +function contextListener(listener) { + return function(event) { + listener.call(this, event, this.__data__); + }; +} +function parseTypenames(typenames) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) + name = t.slice(i + 1), t = t.slice(0, i); + return { type: t, name }; + }); +} +function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) + return; + for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.options); + } else { + on[++i] = o; + } + } + if (++i) + on.length = i; + else + delete this.__on; + }; +} +function onAdd(typename, value, options) { + return function() { + var on = this.__on, o, listener = contextListener(value); + if (on) + for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.options); + this.addEventListener(o.type, o.listener = listener, o.options = options); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, options); + o = { type: typename.type, name: typename.name, value, listener, options }; + if (!on) + this.__on = [o]; + else + on.push(o); + }; +} +function selection_on(typename, value, options) { + var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; + if (arguments.length < 2) { + var on = this.node().__on; + if (on) + for (var j = 0, m = on.length, o; j < m; ++j) { + for (i = 0, o = on[j]; i < n; ++i) { + if ((t = typenames[i]).type === o.type && t.name === o.name) { + return o.value; + } + } + } + return; + } + on = value ? onAdd : onRemove; + for (i = 0; i < n; ++i) + this.each(on(typenames[i], value, options)); + return this; +} +function dispatchEvent(node2, type2, params) { + var window2 = defaultView(node2), event = window2.CustomEvent; + if (typeof event === "function") { + event = new event(type2, params); + } else { + event = window2.document.createEvent("Event"); + if (params) + event.initEvent(type2, params.bubbles, params.cancelable), event.detail = params.detail; + else + event.initEvent(type2, false, false); + } + node2.dispatchEvent(event); +} +function dispatchConstant(type2, params) { + return function() { + return dispatchEvent(this, type2, params); + }; +} +function dispatchFunction(type2, params) { + return function() { + return dispatchEvent(this, type2, params.apply(this, arguments)); + }; +} +function selection_dispatch(type2, params) { + return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type2, params)); +} +function* selection_iterator() { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length, node2; i < n; ++i) { + if (node2 = group[i]) + yield node2; + } + } +} +var root$2 = [null]; +function Selection$1(groups, parents) { + this._groups = groups; + this._parents = parents; +} +function selection() { + return new Selection$1([[document.documentElement]], root$2); +} +function selection_selection() { + return this; +} +Selection$1.prototype = selection.prototype = { + constructor: Selection$1, + select: selection_select, + selectAll: selection_selectAll, + selectChild: selection_selectChild, + selectChildren: selection_selectChildren, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + selection: selection_selection, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch, + [Symbol.iterator]: selection_iterator +}; +function d3select(selector2) { + return typeof selector2 === "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root$2); +} +function define(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +} +function extend$1(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) + prototype[key] = definition[key]; + return prototype; +} +function Color$2() { +} +var darker = 0.7; +var brighter = 1 / darker; +var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`); +var named = { + aliceblue: 15792383, + antiquewhite: 16444375, + aqua: 65535, + aquamarine: 8388564, + azure: 15794175, + beige: 16119260, + bisque: 16770244, + black: 0, + blanchedalmond: 16772045, + blue: 255, + blueviolet: 9055202, + brown: 10824234, + burlywood: 14596231, + cadetblue: 6266528, + chartreuse: 8388352, + chocolate: 13789470, + coral: 16744272, + cornflowerblue: 6591981, + cornsilk: 16775388, + crimson: 14423100, + cyan: 65535, + darkblue: 139, + darkcyan: 35723, + darkgoldenrod: 12092939, + darkgray: 11119017, + darkgreen: 25600, + darkgrey: 11119017, + darkkhaki: 12433259, + darkmagenta: 9109643, + darkolivegreen: 5597999, + darkorange: 16747520, + darkorchid: 10040012, + darkred: 9109504, + darksalmon: 15308410, + darkseagreen: 9419919, + darkslateblue: 4734347, + darkslategray: 3100495, + darkslategrey: 3100495, + darkturquoise: 52945, + darkviolet: 9699539, + deeppink: 16716947, + deepskyblue: 49151, + dimgray: 6908265, + dimgrey: 6908265, + dodgerblue: 2003199, + firebrick: 11674146, + floralwhite: 16775920, + forestgreen: 2263842, + fuchsia: 16711935, + gainsboro: 14474460, + ghostwhite: 16316671, + gold: 16766720, + goldenrod: 14329120, + gray: 8421504, + green: 32768, + greenyellow: 11403055, + grey: 8421504, + honeydew: 15794160, + hotpink: 16738740, + indianred: 13458524, + indigo: 4915330, + ivory: 16777200, + khaki: 15787660, + lavender: 15132410, + lavenderblush: 16773365, + lawngreen: 8190976, + lemonchiffon: 16775885, + lightblue: 11393254, + lightcoral: 15761536, + lightcyan: 14745599, + lightgoldenrodyellow: 16448210, + lightgray: 13882323, + lightgreen: 9498256, + lightgrey: 13882323, + lightpink: 16758465, + lightsalmon: 16752762, + lightseagreen: 2142890, + lightskyblue: 8900346, + lightslategray: 7833753, + lightslategrey: 7833753, + lightsteelblue: 11584734, + lightyellow: 16777184, + lime: 65280, + limegreen: 3329330, + linen: 16445670, + magenta: 16711935, + maroon: 8388608, + mediumaquamarine: 6737322, + mediumblue: 205, + mediumorchid: 12211667, + mediumpurple: 9662683, + mediumseagreen: 3978097, + mediumslateblue: 8087790, + mediumspringgreen: 64154, + mediumturquoise: 4772300, + mediumvioletred: 13047173, + midnightblue: 1644912, + mintcream: 16121850, + mistyrose: 16770273, + moccasin: 16770229, + navajowhite: 16768685, + navy: 128, + oldlace: 16643558, + olive: 8421376, + olivedrab: 7048739, + orange: 16753920, + orangered: 16729344, + orchid: 14315734, + palegoldenrod: 15657130, + palegreen: 10025880, + paleturquoise: 11529966, + palevioletred: 14381203, + papayawhip: 16773077, + peachpuff: 16767673, + peru: 13468991, + pink: 16761035, + plum: 14524637, + powderblue: 11591910, + purple: 8388736, + rebeccapurple: 6697881, + red: 16711680, + rosybrown: 12357519, + royalblue: 4286945, + saddlebrown: 9127187, + salmon: 16416882, + sandybrown: 16032864, + seagreen: 3050327, + seashell: 16774638, + sienna: 10506797, + silver: 12632256, + skyblue: 8900331, + slateblue: 6970061, + slategray: 7372944, + slategrey: 7372944, + snow: 16775930, + springgreen: 65407, + steelblue: 4620980, + tan: 13808780, + teal: 32896, + thistle: 14204888, + tomato: 16737095, + turquoise: 4251856, + violet: 15631086, + wheat: 16113331, + white: 16777215, + whitesmoke: 16119285, + yellow: 16776960, + yellowgreen: 10145074 +}; +define(Color$2, color, { + copy(channels2) { + return Object.assign(new this.constructor(), this, channels2); + }, + displayable() { + return this.rgb().displayable(); + }, + hex: color_formatHex, + // Deprecated! Use color.formatHex. + formatHex: color_formatHex, + formatHex8: color_formatHex8, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb +}); +function color_formatHex() { + return this.rgb().formatHex(); +} +function color_formatHex8() { + return this.rgb().formatHex8(); +} +function color_formatHsl() { + return hslConvert(this).formatHsl(); +} +function color_formatRgb() { + return this.rgb().formatRgb(); +} +function color(format2) { + var m, l; + format2 = (format2 + "").trim().toLowerCase(); + return (m = reHex.exec(format2)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba$2(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba$2(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format2)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format2)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format2)) ? rgba$2(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format2)) ? rgba$2(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format2) ? rgbn(named[format2]) : format2 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; +} +function rgbn(n) { + return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1); +} +function rgba$2(r, g, b, a) { + if (a <= 0) + r = g = b = NaN; + return new Rgb(r, g, b, a); +} +function rgbConvert(o) { + if (!(o instanceof Color$2)) + o = color(o); + if (!o) + return new Rgb(); + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} +define(Rgb, rgb, extend$1(Color$2, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb() { + return this; + }, + clamp() { + return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity)); + }, + displayable() { + return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1); + }, + hex: rgb_formatHex, + // Deprecated! Use color.formatHex. + formatHex: rgb_formatHex, + formatHex8: rgb_formatHex8, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb +})); +function rgb_formatHex() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`; +} +function rgb_formatHex8() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; +} +function rgb_formatRgb() { + const a = clampa(this.opacity); + return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`; +} +function clampa(opacity) { + return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity)); +} +function clampi(value) { + return Math.max(0, Math.min(255, Math.round(value) || 0)); +} +function hex(value) { + value = clampi(value); + return (value < 16 ? "0" : "") + value.toString(16); +} +function hsla(h, s, l, a) { + if (a <= 0) + h = s = l = NaN; + else if (l <= 0 || l >= 1) + h = s = NaN; + else if (s <= 0) + h = NaN; + return new Hsl(h, s, l, a); +} +function hslConvert(o) { + if (o instanceof Hsl) + return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color$2)) + o = color(o); + if (!o) + return new Hsl(); + if (o instanceof Hsl) + return o; + o = o.rgb(); + var r = o.r / 255, g = o.g / 255, b = o.b / 255, min2 = Math.min(r, g, b), max2 = Math.max(r, g, b), h = NaN, s = max2 - min2, l = (max2 + min2) / 2; + if (s) { + if (r === max2) + h = (g - b) / s + (g < b) * 6; + else if (g === max2) + h = (b - r) / s + 2; + else + h = (r - g) / s + 4; + s /= l < 0.5 ? max2 + min2 : 2 - max2 - min2; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); +} +function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); +} +function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} +define(Hsl, hsl, extend$1(Color$2, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb() { + var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + this.opacity + ); + }, + clamp() { + return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity)); + }, + displayable() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1); + }, + formatHsl() { + const a = clampa(this.opacity); + return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`; + } +})); +function clamph(value) { + value = (value || 0) % 360; + return value < 0 ? value + 360 : value; +} +function clampt(value) { + return Math.max(0, Math.min(1, value || 0)); +} +function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; +} +const constant$1 = (x) => () => x; +function linear(a, d) { + return function(t) { + return a + t * d; + }; +} +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; +} +function hue(a, b) { + var d = b - a; + return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant$1(isNaN(a) ? b : a); +} +function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : constant$1(isNaN(a) ? b : a); + }; +} +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant$1(isNaN(a) ? b : a); +} +const interpolateRgb = function rgbGamma(y) { + var color2 = gamma(y); + function rgb$1(start2, end) { + var r = color2((start2 = rgb(start2)).r, (end = rgb(end)).r), g = color2(start2.g, end.g), b = color2(start2.b, end.b), opacity = nogamma(start2.opacity, end.opacity); + return function(t) { + start2.r = r(t); + start2.g = g(t); + start2.b = b(t); + start2.opacity = opacity(t); + return start2 + ""; + }; + } + rgb$1.gamma = rgbGamma; + return rgb$1; +}(1); +function interpolateNumber(a, b) { + return a = +a, b = +b, function(t) { + return a * (1 - t) + b * t; + }; +} +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g"); +function zero(b) { + return function() { + return b; + }; +} +function one(b) { + return function(t) { + return b(t) + ""; + }; +} +function interpolateString(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = []; + a = a + "", b = b + ""; + while ((am = reA.exec(a)) && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { + bs = b.slice(bi, bs); + if (s[i]) + s[i] += bs; + else + s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { + if (s[i]) + s[i] += bm; + else + s[++i] = bm; + } else { + s[++i] = null; + q.push({ i, x: interpolateNumber(am, bm) }); + } + bi = reB.lastIndex; + } + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) + s[i] += bs; + else + s[++i] = bs; + } + return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) { + for (var i2 = 0, o; i2 < b; ++i2) + s[(o = q[i2]).i] = o.x(t); + return s.join(""); + }); +} +var degrees = 180 / Math.PI; +var identity$1 = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; +function decompose(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) + a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) + c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) + c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) + a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX, + scaleY + }; +} +var svgNode; +function parseCss(value) { + const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); + return m.isIdentity ? identity$1 : decompose(m.a, m.b, m.c, m.d, m.e, m.f); +} +function parseSvg(value) { + if (value == null) + return identity$1; + if (!svgNode) + svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) + return identity$1; + value = value.matrix; + return decompose(value.a, value.b, value.c, value.d, value.e, value.f); +} +function interpolateTransform(parse2, pxComma, pxParen, degParen) { + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({ i: i - 4, x: interpolateNumber(xa, xb) }, { i: i - 2, x: interpolateNumber(ya, yb) }); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) + b += 360; + else if (b - a > 180) + a += 360; + q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b) }); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + function skewX(a, b, s, q) { + if (a !== b) { + q.push({ i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: interpolateNumber(a, b) }); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({ i: i - 4, x: interpolateNumber(xa, xb) }, { i: i - 2, x: interpolateNumber(ya, yb) }); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + return function(a, b) { + var s = [], q = []; + a = parse2(a), b = parse2(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) + s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; +} +var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); +var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); +var frame = 0, timeout$1 = 0, interval = 0, pokeDelay = 1e3, taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance === "object" && performance.now ? performance : Date, setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { + setTimeout(f, 17); +}; +function now() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); +} +function clearNow() { + clockNow = 0; +} +function Timer() { + this._call = this._time = this._next = null; +} +Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time) { + if (typeof callback !== "function") + throw new TypeError("callback is not a function"); + time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) + taskTail._next = this; + else + taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } +}; +function timer(callback, delay, time) { + var t = new Timer(); + t.restart(callback, delay, time); + return t; +} +function timerFlush() { + now(); + ++frame; + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) + t._call.call(void 0, e); + t = t._next; + } + --frame; +} +function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + frame = timeout$1 = 0; + try { + timerFlush(); + } finally { + frame = 0; + nap(); + clockNow = 0; + } +} +function poke() { + var now2 = clock.now(), delay = now2 - clockLast; + if (delay > pokeDelay) + clockSkew -= delay, clockLast = now2; +} +function nap() { + var t0, t1 = taskHead, t2, time = Infinity; + while (t1) { + if (t1._call) { + if (time > t1._time) + time = t1._time; + t0 = t1, t1 = t1._next; + } else { + t2 = t1._next, t1._next = null; + t1 = t0 ? t0._next = t2 : taskHead = t2; + } + } + taskTail = t0; + sleep(time); +} +function sleep(time) { + if (frame) + return; + if (timeout$1) + timeout$1 = clearTimeout(timeout$1); + var delay = time - clockNow; + if (delay > 24) { + if (time < Infinity) + timeout$1 = setTimeout(wake, time - clock.now() - clockSkew); + if (interval) + interval = clearInterval(interval); + } else { + if (!interval) + clockLast = clock.now(), interval = setInterval(poke, pokeDelay); + frame = 1, setFrame(wake); + } +} +function timeout(callback, delay, time) { + var t = new Timer(); + delay = delay == null ? 0 : +delay; + t.restart((elapsed) => { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; +} +var emptyOn = dispatch("start", "end", "cancel", "interrupt"); +var emptyTween = []; +var CREATED = 0; +var SCHEDULED = 1; +var STARTING = 2; +var STARTED = 3; +var RUNNING = 4; +var ENDING = 5; +var ENDED = 6; +function schedule(node2, name, id2, index, group, timing) { + var schedules = node2.__transition; + if (!schedules) + node2.__transition = {}; + else if (id2 in schedules) + return; + create$1(node2, id2, { + name, + index, + // For context during callback. + group, + // For context during callback. + on: emptyOn, + tween: emptyTween, + time: timing.time, + delay: timing.delay, + duration: timing.duration, + ease: timing.ease, + timer: null, + state: CREATED + }); +} +function init$1(node2, id2) { + var schedule2 = get(node2, id2); + if (schedule2.state > CREATED) + throw new Error("too late; already scheduled"); + return schedule2; +} +function set$1(node2, id2) { + var schedule2 = get(node2, id2); + if (schedule2.state > STARTED) + throw new Error("too late; already running"); + return schedule2; +} +function get(node2, id2) { + var schedule2 = node2.__transition; + if (!schedule2 || !(schedule2 = schedule2[id2])) + throw new Error("transition not found"); + return schedule2; +} +function create$1(node2, id2, self2) { + var schedules = node2.__transition, tween; + schedules[id2] = self2; + self2.timer = timer(schedule2, 0, self2.time); + function schedule2(elapsed) { + self2.state = SCHEDULED; + self2.timer.restart(start2, self2.delay, self2.time); + if (self2.delay <= elapsed) + start2(elapsed - self2.delay); + } + function start2(elapsed) { + var i, j, n, o; + if (self2.state !== SCHEDULED) + return stop(); + for (i in schedules) { + o = schedules[i]; + if (o.name !== self2.name) + continue; + if (o.state === STARTED) + return timeout(start2); + if (o.state === RUNNING) { + o.state = ENDED; + o.timer.stop(); + o.on.call("interrupt", node2, node2.__data__, o.index, o.group); + delete schedules[i]; + } else if (+i < id2) { + o.state = ENDED; + o.timer.stop(); + o.on.call("cancel", node2, node2.__data__, o.index, o.group); + delete schedules[i]; + } + } + timeout(function() { + if (self2.state === STARTED) { + self2.state = RUNNING; + self2.timer.restart(tick, self2.delay, self2.time); + tick(elapsed); + } + }); + self2.state = STARTING; + self2.on.call("start", node2, node2.__data__, self2.index, self2.group); + if (self2.state !== STARTING) + return; + self2.state = STARTED; + tween = new Array(n = self2.tween.length); + for (i = 0, j = -1; i < n; ++i) { + if (o = self2.tween[i].value.call(node2, node2.__data__, self2.index, self2.group)) { + tween[++j] = o; + } + } + tween.length = j + 1; + } + function tick(elapsed) { + var t = elapsed < self2.duration ? self2.ease.call(null, elapsed / self2.duration) : (self2.timer.restart(stop), self2.state = ENDING, 1), i = -1, n = tween.length; + while (++i < n) { + tween[i].call(node2, t); + } + if (self2.state === ENDING) { + self2.on.call("end", node2, node2.__data__, self2.index, self2.group); + stop(); + } + } + function stop() { + self2.state = ENDED; + self2.timer.stop(); + delete schedules[id2]; + for (var i in schedules) + return; + delete node2.__transition; + } +} +function interrupt(node2, name) { + var schedules = node2.__transition, schedule2, active, empty2 = true, i; + if (!schedules) + return; + name = name == null ? null : name + ""; + for (i in schedules) { + if ((schedule2 = schedules[i]).name !== name) { + empty2 = false; + continue; + } + active = schedule2.state > STARTING && schedule2.state < ENDING; + schedule2.state = ENDED; + schedule2.timer.stop(); + schedule2.on.call(active ? "interrupt" : "cancel", node2, node2.__data__, schedule2.index, schedule2.group); + delete schedules[i]; + } + if (empty2) + delete node2.__transition; +} +function selection_interrupt(name) { + return this.each(function() { + interrupt(this, name); + }); +} +function tweenRemove(id2, name) { + var tween0, tween1; + return function() { + var schedule2 = set$1(this, id2), tween = schedule2.tween; + if (tween !== tween0) { + tween1 = tween0 = tween; + for (var i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1 = tween1.slice(); + tween1.splice(i, 1); + break; + } + } + } + schedule2.tween = tween1; + }; +} +function tweenFunction(id2, name, value) { + var tween0, tween1; + if (typeof value !== "function") + throw new Error(); + return function() { + var schedule2 = set$1(this, id2), tween = schedule2.tween; + if (tween !== tween0) { + tween1 = (tween0 = tween).slice(); + for (var t = { name, value }, i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1[i] = t; + break; + } + } + if (i === n) + tween1.push(t); + } + schedule2.tween = tween1; + }; +} +function transition_tween(name, value) { + var id2 = this._id; + name += ""; + if (arguments.length < 2) { + var tween = get(this.node(), id2).tween; + for (var i = 0, n = tween.length, t; i < n; ++i) { + if ((t = tween[i]).name === name) { + return t.value; + } + } + return null; + } + return this.each((value == null ? tweenRemove : tweenFunction)(id2, name, value)); +} +function tweenValue(transition, name, value) { + var id2 = transition._id; + transition.each(function() { + var schedule2 = set$1(this, id2); + (schedule2.value || (schedule2.value = {}))[name] = value.apply(this, arguments); + }); + return function(node2) { + return get(node2, id2).value[name]; + }; +} +function interpolate(a, b) { + var c; + return (typeof b === "number" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(a, b); +} +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} +function attrConstant(name, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = this.getAttribute(name); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; +} +function attrConstantNS(fullname, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = this.getAttributeNS(fullname.space, fullname.local); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; +} +function attrFunction(name, interpolate2, value) { + var string00, string10, interpolate0; + return function() { + var string0, value1 = value(this), string1; + if (value1 == null) + return void this.removeAttribute(name); + string0 = this.getAttribute(name); + string1 = value1 + ""; + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; +} +function attrFunctionNS(fullname, interpolate2, value) { + var string00, string10, interpolate0; + return function() { + var string0, value1 = value(this), string1; + if (value1 == null) + return void this.removeAttributeNS(fullname.space, fullname.local); + string0 = this.getAttributeNS(fullname.space, fullname.local); + string1 = value1 + ""; + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; +} +function transition_attr(name, value) { + var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate; + return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); +} +function attrInterpolate(name, i) { + return function(t) { + this.setAttribute(name, i.call(this, t)); + }; +} +function attrInterpolateNS(fullname, i) { + return function(t) { + this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); + }; +} +function attrTweenNS(fullname, value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t0 = (i0 = i) && attrInterpolateNS(fullname, i); + return t0; + } + tween._value = value; + return tween; +} +function attrTween(name, value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t0 = (i0 = i) && attrInterpolate(name, i); + return t0; + } + tween._value = value; + return tween; +} +function transition_attrTween(name, value) { + var key = "attr." + name; + if (arguments.length < 2) + return (key = this.tween(key)) && key._value; + if (value == null) + return this.tween(key, null); + if (typeof value !== "function") + throw new Error(); + var fullname = namespace(name); + return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); +} +function delayFunction(id2, value) { + return function() { + init$1(this, id2).delay = +value.apply(this, arguments); + }; +} +function delayConstant(id2, value) { + return value = +value, function() { + init$1(this, id2).delay = value; + }; +} +function transition_delay(value) { + var id2 = this._id; + return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id2, value)) : get(this.node(), id2).delay; +} +function durationFunction(id2, value) { + return function() { + set$1(this, id2).duration = +value.apply(this, arguments); + }; +} +function durationConstant(id2, value) { + return value = +value, function() { + set$1(this, id2).duration = value; + }; +} +function transition_duration(value) { + var id2 = this._id; + return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id2, value)) : get(this.node(), id2).duration; +} +function easeConstant(id2, value) { + if (typeof value !== "function") + throw new Error(); + return function() { + set$1(this, id2).ease = value; + }; +} +function transition_ease(value) { + var id2 = this._id; + return arguments.length ? this.each(easeConstant(id2, value)) : get(this.node(), id2).ease; +} +function easeVarying(id2, value) { + return function() { + var v = value.apply(this, arguments); + if (typeof v !== "function") + throw new Error(); + set$1(this, id2).ease = v; + }; +} +function transition_easeVarying(value) { + if (typeof value !== "function") + throw new Error(); + return this.each(easeVarying(this._id, value)); +} +function transition_filter(match) { + if (typeof match !== "function") + match = matcher(match); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) { + if ((node2 = group[i]) && match.call(node2, node2.__data__, i, group)) { + subgroup.push(node2); + } + } + } + return new Transition(subgroups, this._parents, this._name, this._id); +} +function transition_merge(transition) { + if (transition._id !== this._id) + throw new Error(); + for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge2 = merges[j] = new Array(n), node2, i = 0; i < n; ++i) { + if (node2 = group0[i] || group1[i]) { + merge2[i] = node2; + } + } + } + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + return new Transition(merges, this._parents, this._name, this._id); +} +function start(name) { + return (name + "").trim().split(/^|\s+/).every(function(t) { + var i = t.indexOf("."); + if (i >= 0) + t = t.slice(0, i); + return !t || t === "start"; + }); +} +function onFunction(id2, name, listener) { + var on0, on1, sit = start(name) ? init$1 : set$1; + return function() { + var schedule2 = sit(this, id2), on = schedule2.on; + if (on !== on0) + (on1 = (on0 = on).copy()).on(name, listener); + schedule2.on = on1; + }; +} +function transition_on(name, listener) { + var id2 = this._id; + return arguments.length < 2 ? get(this.node(), id2).on.on(name) : this.each(onFunction(id2, name, listener)); +} +function removeFunction(id2) { + return function() { + var parent = this.parentNode; + for (var i in this.__transition) + if (+i !== id2) + return; + if (parent) + parent.removeChild(this); + }; +} +function transition_remove() { + return this.on("end.remove", removeFunction(this._id)); +} +function transition_select(select) { + var name = this._name, id2 = this._id; + if (typeof select !== "function") + select = selector(select); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) { + if ((node2 = group[i]) && (subnode = select.call(node2, node2.__data__, i, group))) { + if ("__data__" in node2) + subnode.__data__ = node2.__data__; + subgroup[i] = subnode; + schedule(subgroup[i], name, id2, i, subgroup, get(node2, id2)); + } + } + } + return new Transition(subgroups, this._parents, name, id2); +} +function transition_selectAll(select) { + var name = this._name, id2 = this._id; + if (typeof select !== "function") + select = selectorAll(select); + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) { + if (node2 = group[i]) { + for (var children2 = select.call(node2, node2.__data__, i, group), child, inherit2 = get(node2, id2), k = 0, l = children2.length; k < l; ++k) { + if (child = children2[k]) { + schedule(child, name, id2, k, children2, inherit2); + } + } + subgroups.push(children2); + parents.push(node2); + } + } + } + return new Transition(subgroups, parents, name, id2); +} +var Selection = selection.prototype.constructor; +function transition_selection() { + return new Selection(this._groups, this._parents); +} +function styleNull(name, interpolate2) { + var string00, string10, interpolate0; + return function() { + var string0 = styleValue(this, name), string1 = (this.style.removeProperty(name), styleValue(this, name)); + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 = string1); + }; +} +function styleRemove(name) { + return function() { + this.style.removeProperty(name); + }; +} +function styleConstant(name, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = styleValue(this, name); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; +} +function styleFunction(name, interpolate2, value) { + var string00, string10, interpolate0; + return function() { + var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + ""; + if (value1 == null) + string1 = value1 = (this.style.removeProperty(name), styleValue(this, name)); + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; +} +function styleMaybeRemove(id2, name) { + var on0, on1, listener0, key = "style." + name, event = "end." + key, remove2; + return function() { + var schedule2 = set$1(this, id2), on = schedule2.on, listener = schedule2.value[key] == null ? remove2 || (remove2 = styleRemove(name)) : void 0; + if (on !== on0 || listener0 !== listener) + (on1 = (on0 = on).copy()).on(event, listener0 = listener); + schedule2.on = on1; + }; +} +function transition_style(name, value, priority) { + var i = (name += "") === "transform" ? interpolateTransformCss : interpolate; + return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on("end.style." + name, null); +} +function styleInterpolate(name, i, priority) { + return function(t) { + this.style.setProperty(name, i.call(this, t), priority); + }; +} +function styleTween(name, value, priority) { + var t, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t = (i0 = i) && styleInterpolate(name, i, priority); + return t; + } + tween._value = value; + return tween; +} +function transition_styleTween(name, value, priority) { + var key = "style." + (name += ""); + if (arguments.length < 2) + return (key = this.tween(key)) && key._value; + if (value == null) + return this.tween(key, null); + if (typeof value !== "function") + throw new Error(); + return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); +} +function textConstant(value) { + return function() { + this.textContent = value; + }; +} +function textFunction(value) { + return function() { + var value1 = value(this); + this.textContent = value1 == null ? "" : value1; + }; +} +function transition_text(value) { + return this.tween("text", typeof value === "function" ? textFunction(tweenValue(this, "text", value)) : textConstant(value == null ? "" : value + "")); +} +function textInterpolate(i) { + return function(t) { + this.textContent = i.call(this, t); + }; +} +function textTween(value) { + var t0, i0; + function tween() { + var i = value.apply(this, arguments); + if (i !== i0) + t0 = (i0 = i) && textInterpolate(i); + return t0; + } + tween._value = value; + return tween; +} +function transition_textTween(value) { + var key = "text"; + if (arguments.length < 1) + return (key = this.tween(key)) && key._value; + if (value == null) + return this.tween(key, null); + if (typeof value !== "function") + throw new Error(); + return this.tween(key, textTween(value)); +} +function transition_transition() { + var name = this._name, id0 = this._id, id1 = newId(); + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) { + if (node2 = group[i]) { + var inherit2 = get(node2, id0); + schedule(node2, name, id1, i, group, { + time: inherit2.time + inherit2.delay + inherit2.duration, + delay: 0, + duration: inherit2.duration, + ease: inherit2.ease + }); + } + } + } + return new Transition(groups, this._parents, name, id1); +} +function transition_end() { + var on0, on1, that = this, id2 = that._id, size = that.size(); + return new Promise(function(resolve, reject) { + var cancel = { value: reject }, end = { value: function() { + if (--size === 0) + resolve(); + } }; + that.each(function() { + var schedule2 = set$1(this, id2), on = schedule2.on; + if (on !== on0) { + on1 = (on0 = on).copy(); + on1._.cancel.push(cancel); + on1._.interrupt.push(cancel); + on1._.end.push(end); + } + schedule2.on = on1; + }); + if (size === 0) + resolve(); + }); +} +var id$k = 0; +function Transition(groups, parents, name, id2) { + this._groups = groups; + this._parents = parents; + this._name = name; + this._id = id2; +} +function newId() { + return ++id$k; +} +var selection_prototype = selection.prototype; +Transition.prototype = { + constructor: Transition, + select: transition_select, + selectAll: transition_selectAll, + selectChild: selection_prototype.selectChild, + selectChildren: selection_prototype.selectChildren, + filter: transition_filter, + merge: transition_merge, + selection: transition_selection, + transition: transition_transition, + call: selection_prototype.call, + nodes: selection_prototype.nodes, + node: selection_prototype.node, + size: selection_prototype.size, + empty: selection_prototype.empty, + each: selection_prototype.each, + on: transition_on, + attr: transition_attr, + attrTween: transition_attrTween, + style: transition_style, + styleTween: transition_styleTween, + text: transition_text, + textTween: transition_textTween, + remove: transition_remove, + tween: transition_tween, + delay: transition_delay, + duration: transition_duration, + ease: transition_ease, + easeVarying: transition_easeVarying, + end: transition_end, + [Symbol.iterator]: selection_prototype[Symbol.iterator] +}; +function cubicInOut(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; +} +var defaultTiming = { + time: null, + // Set on use. + delay: 0, + duration: 250, + ease: cubicInOut +}; +function inherit(node2, id2) { + var timing; + while (!(timing = node2.__transition) || !(timing = timing[id2])) { + if (!(node2 = node2.parentNode)) { + throw new Error(`transition ${id2} not found`); + } + } + return timing; +} +function selection_transition(name) { + var id2, timing; + if (name instanceof Transition) { + id2 = name._id, name = name._name; + } else { + id2 = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + ""; + } + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) { + if (node2 = group[i]) { + schedule(node2, name, id2, i, group, timing || inherit(node2, id2)); + } + } + } + return new Transition(groups, this._parents, name, id2); +} +selection.prototype.interrupt = selection_interrupt; +selection.prototype.transition = selection_transition; +const abs$1 = Math.abs; +const atan2 = Math.atan2; +const cos = Math.cos; +const max = Math.max; +const min = Math.min; +const sin = Math.sin; +const sqrt = Math.sqrt; +const epsilon = 1e-12; +const pi = Math.PI; +const halfPi = pi / 2; +const tau = 2 * pi; +function acos(x) { + return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); +} +function asin(x) { + return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); +} +function Linear(context) { + this._context = context; +} +Linear.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + default: + this._context.lineTo(x, y); + break; + } + } +}; +function curveLinear(context) { + return new Linear(context); +} +class Bump { + constructor(context, x) { + this._context = context; + this._x = x; + } + areaStart() { + this._line = 0; + } + areaEnd() { + this._line = NaN; + } + lineStart() { + this._point = 0; + } + lineEnd() { + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + } + point(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: { + this._point = 1; + if (this._line) + this._context.lineTo(x, y); + else + this._context.moveTo(x, y); + break; + } + case 1: + this._point = 2; + default: { + if (this._x) + this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y); + else + this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y); + break; + } + } + this._x0 = x, this._y0 = y; + } +} +function bumpX(context) { + return new Bump(context, true); +} +function bumpY(context) { + return new Bump(context, false); +} +function noop() { +} +function point$3(that, x, y) { + that._context.bezierCurveTo( + (2 * that._x0 + that._x1) / 3, + (2 * that._y0 + that._y1) / 3, + (that._x0 + 2 * that._x1) / 3, + (that._y0 + 2 * that._y1) / 3, + (that._x0 + 4 * that._x1 + x) / 6, + (that._y0 + 4 * that._y1 + y) / 6 + ); +} +function Basis(context) { + this._context = context; +} +Basis.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 3: + point$3(this, this._x1, this._y1); + case 2: + this._context.lineTo(this._x1, this._y1); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); + default: + point$3(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +function curveBasis(context) { + return new Basis(context); +} +function BasisClosed(context) { + this._context = context; +} +BasisClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x2, this._y2); + this._context.closePath(); + break; + } + case 2: { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); + this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x2, this._y2); + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._x2 = x, this._y2 = y; + break; + case 1: + this._point = 2; + this._x3 = x, this._y3 = y; + break; + case 2: + this._point = 3; + this._x4 = x, this._y4 = y; + this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); + break; + default: + point$3(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +function curveBasisClosed(context) { + return new BasisClosed(context); +} +function BasisOpen(context) { + this._context = context; +} +BasisOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 3) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; + this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); + break; + case 3: + this._point = 4; + default: + point$3(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; +function curveBasisOpen(context) { + return new BasisOpen(context); +} +function Bundle(context, beta) { + this._basis = new Basis(context); + this._beta = beta; +} +Bundle.prototype = { + lineStart: function() { + this._x = []; + this._y = []; + this._basis.lineStart(); + }, + lineEnd: function() { + var x = this._x, y = this._y, j = x.length - 1; + if (j > 0) { + var x0 = x[0], y0 = y[0], dx = x[j] - x0, dy = y[j] - y0, i = -1, t; + while (++i <= j) { + t = i / j; + this._basis.point( + this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), + this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) + ); + } + } + this._x = this._y = null; + this._basis.lineEnd(); + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; +const curveBundle = function custom(beta) { + function bundle(context) { + return beta === 1 ? new Basis(context) : new Bundle(context, beta); + } + bundle.beta = function(beta2) { + return custom(+beta2); + }; + return bundle; +}(0.85); +function point$2(that, x, y) { + that._context.bezierCurveTo( + that._x1 + that._k * (that._x2 - that._x0), + that._y1 + that._k * (that._y2 - that._y0), + that._x2 + that._k * (that._x1 - x), + that._y2 + that._k * (that._y1 - y), + that._x2, + that._y2 + ); +} +function Cardinal(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} +Cardinal.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + point$2(this, this._x1, this._y1); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + this._x1 = x, this._y1 = y; + break; + case 2: + this._point = 3; + default: + point$2(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +const curveCardinal = function custom2(tension) { + function cardinal(context) { + return new Cardinal(context, tension); + } + cardinal.tension = function(tension2) { + return custom2(+tension2); + }; + return cardinal; +}(0); +function CardinalClosed(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} +CardinalClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._x3 = x, this._y3 = y; + break; + case 1: + this._point = 2; + this._context.moveTo(this._x4 = x, this._y4 = y); + break; + case 2: + this._point = 3; + this._x5 = x, this._y5 = y; + break; + default: + point$2(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +const curveCardinalClosed = function custom3(tension) { + function cardinal(context) { + return new CardinalClosed(context, tension); + } + cardinal.tension = function(tension2) { + return custom3(+tension2); + }; + return cardinal; +}(0); +function CardinalOpen(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} +CardinalOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 3) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + default: + point$2(this, x, y); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +const curveCardinalOpen = function custom4(tension) { + function cardinal(context) { + return new CardinalOpen(context, tension); + } + cardinal.tension = function(tension2) { + return custom4(+tension2); + }; + return cardinal; +}(0); +function point$1(that, x, y) { + var x1 = that._x1, y1 = that._y1, x2 = that._x2, y2 = that._y2; + if (that._l01_a > epsilon) { + var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a); + x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; + y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; + } + if (that._l23_a > epsilon) { + var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a); + x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; + y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; + } + that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); +} +function CatmullRom(context, alpha) { + this._context = context; + this._alpha = alpha; +} +CatmullRom.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + this.point(this._x2, this._y2); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + if (this._point) { + var x23 = this._x2 - x, y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + default: + point$1(this, x, y); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +const curveCatmullRom = function custom5(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0); + } + catmullRom.alpha = function(alpha2) { + return custom5(+alpha2); + }; + return catmullRom; +}(0.5); +function CatmullRomClosed(context, alpha) { + this._context = context; + this._alpha = alpha; +} +CatmullRomClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + if (this._point) { + var x23 = this._x2 - x, y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + this._x3 = x, this._y3 = y; + break; + case 1: + this._point = 2; + this._context.moveTo(this._x4 = x, this._y4 = y); + break; + case 2: + this._point = 3; + this._x5 = x, this._y5 = y; + break; + default: + point$1(this, x, y); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +const curveCatmullRomClosed = function custom6(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0); + } + catmullRom.alpha = function(alpha2) { + return custom6(+alpha2); + }; + return catmullRom; +}(0.5); +function CatmullRomOpen(context, alpha) { + this._context = context; + this._alpha = alpha; +} +CatmullRomOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 3) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + if (this._point) { + var x23 = this._x2 - x, y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + default: + point$1(this, x, y); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; +const curveCatmullRomOpen = function custom7(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0); + } + catmullRom.alpha = function(alpha2) { + return custom7(+alpha2); + }; + return catmullRom; +}(0.5); +function LinearClosed(context) { + this._context = context; +} +LinearClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._point) + this._context.closePath(); + }, + point: function(x, y) { + x = +x, y = +y; + if (this._point) + this._context.lineTo(x, y); + else + this._point = 1, this._context.moveTo(x, y); + } +}; +function curveLinearClosed(context) { + return new LinearClosed(context); +} +function sign(x) { + return x < 0 ? -1 : 1; +} +function slope3(that, x2, y2) { + var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1); + return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; +} +function slope2(that, t) { + var h = that._x1 - that._x0; + return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; +} +function point(that, t0, t1) { + var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3; + that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); +} +function MonotoneX(context) { + this._context = context; +} +MonotoneX.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x1, this._y1); + break; + case 3: + point(this, this._t0, slope2(this, this._t0)); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + var t1 = NaN; + x = +x, y = +y; + if (x === this._x1 && y === this._y1) + return; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + point(this, slope2(this, t1 = slope3(this, x, y)), t1); + break; + default: + point(this, this._t0, t1 = slope3(this, x, y)); + break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + this._t0 = t1; + } +}; +function MonotoneY(context) { + this._context = new ReflectContext(context); +} +(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { + MonotoneX.prototype.point.call(this, y, x); +}; +function ReflectContext(context) { + this._context = context; +} +ReflectContext.prototype = { + moveTo: function(x, y) { + this._context.moveTo(y, x); + }, + closePath: function() { + this._context.closePath(); + }, + lineTo: function(x, y) { + this._context.lineTo(y, x); + }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { + this._context.bezierCurveTo(y1, x1, y2, x2, y, x); + } +}; +function monotoneX(context) { + return new MonotoneX(context); +} +function monotoneY(context) { + return new MonotoneY(context); +} +function Natural(context) { + this._context = context; +} +Natural.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = []; + this._y = []; + }, + lineEnd: function() { + var x = this._x, y = this._y, n = x.length; + if (n) { + this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); + if (n === 2) { + this._context.lineTo(x[1], y[1]); + } else { + var px = controlPoints(x), py = controlPoints(y); + for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { + this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); + } + } + } + if (this._line || this._line !== 0 && n === 1) + this._context.closePath(); + this._line = 1 - this._line; + this._x = this._y = null; + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; +function controlPoints(x) { + var i, n = x.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n); + a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; + for (i = 1; i < n - 1; ++i) + a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; + a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; + for (i = 1; i < n; ++i) + m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; + a[n - 1] = r[n - 1] / b[n - 1]; + for (i = n - 2; i >= 0; --i) + a[i] = (r[i] - a[i + 1]) / b[i]; + b[n - 1] = (x[n] + a[n - 1]) / 2; + for (i = 0; i < n - 1; ++i) + b[i] = 2 * x[i + 1] - a[i + 1]; + return [a, b]; +} +function curveNatural(context) { + return new Natural(context); +} +function Step(context, t) { + this._context = context; + this._t = t; +} +Step.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = this._y = NaN; + this._point = 0; + }, + lineEnd: function() { + if (0 < this._t && this._t < 1 && this._point === 2) + this._context.lineTo(this._x, this._y); + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + if (this._line >= 0) + this._t = 1 - this._t, this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); + break; + case 1: + this._point = 2; + default: { + if (this._t <= 0) { + this._context.lineTo(this._x, y); + this._context.lineTo(x, y); + } else { + var x1 = this._x * (1 - this._t) + x * this._t; + this._context.lineTo(x1, this._y); + this._context.lineTo(x1, y); + } + break; + } + } + this._x = x, this._y = y; + } +}; +function curveStep(context) { + return new Step(context, 0.5); +} +function stepBefore(context) { + return new Step(context, 0); +} +function stepAfter(context) { + return new Step(context, 1); +} +function Transform(k, x, y) { + this.k = k; + this.x = x; + this.y = y; +} +Transform.prototype = { + constructor: Transform, + scale: function(k) { + return k === 1 ? this : new Transform(this.k * k, this.x, this.y); + }, + translate: function(x, y) { + return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); + }, + apply: function(point2) { + return [point2[0] * this.k + this.x, point2[1] * this.k + this.y]; + }, + applyX: function(x) { + return x * this.k + this.x; + }, + applyY: function(y) { + return y * this.k + this.y; + }, + invert: function(location) { + return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; + }, + invertX: function(x) { + return (x - this.x) / this.k; + }, + invertY: function(y) { + return (y - this.y) / this.k; + }, + rescaleX: function(x) { + return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); + }, + rescaleY: function(y) { + return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); + }, + toString: function() { + return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; + } +}; +Transform.prototype; +/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */ +const { + entries, + setPrototypeOf, + isFrozen, + getPrototypeOf, + getOwnPropertyDescriptor +} = Object; +let { + freeze, + seal, + create +} = Object; +let { + apply: apply$1, + construct +} = typeof Reflect !== "undefined" && Reflect; +if (!apply$1) { + apply$1 = function apply2(fun, thisValue, args) { + return fun.apply(thisValue, args); + }; +} +if (!freeze) { + freeze = function freeze2(x) { + return x; + }; +} +if (!seal) { + seal = function seal2(x) { + return x; + }; +} +if (!construct) { + construct = function construct2(Func, args) { + return new Func(...args); + }; +} +const arrayForEach = unapply(Array.prototype.forEach); +const arrayPop = unapply(Array.prototype.pop); +const arrayPush = unapply(Array.prototype.push); +const stringToLowerCase = unapply(String.prototype.toLowerCase); +const stringToString = unapply(String.prototype.toString); +const stringMatch = unapply(String.prototype.match); +const stringReplace = unapply(String.prototype.replace); +const stringIndexOf = unapply(String.prototype.indexOf); +const stringTrim = unapply(String.prototype.trim); +const regExpTest = unapply(RegExp.prototype.test); +const typeErrorCreate = unconstruct(TypeError); +function unapply(func) { + return function(thisArg) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return apply$1(func, thisArg, args); + }; +} +function unconstruct(func) { + return function() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + return construct(func, args); + }; +} +function addToSet(set2, array2, transformCaseFunc) { + var _transformCaseFunc; + transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase; + if (setPrototypeOf) { + setPrototypeOf(set2, null); + } + let l = array2.length; + while (l--) { + let element = array2[l]; + if (typeof element === "string") { + const lcElement = transformCaseFunc(element); + if (lcElement !== element) { + if (!isFrozen(array2)) { + array2[l] = lcElement; + } + element = lcElement; + } + } + set2[element] = true; + } + return set2; +} +function clone(object) { + const newObject = create(null); + for (const [property, value] of entries(object)) { + newObject[property] = value; + } + return newObject; +} +function lookupGetter(object, prop) { + while (object !== null) { + const desc = getOwnPropertyDescriptor(object, prop); + if (desc) { + if (desc.get) { + return unapply(desc.get); + } + if (typeof desc.value === "function") { + return unapply(desc.value); + } + } + object = getPrototypeOf(object); + } + function fallbackValue(element) { + console.warn("fallback value for", element); + return null; + } + return fallbackValue; +} +const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]); +const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]); +const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]); +const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]); +const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]); +const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]); +const text = freeze(["#text"]); +const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]); +const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]); +const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]); +const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]); +const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); +const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); +const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm); +const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); +const ARIA_ATTR = seal(/^aria-[\-\w]+$/); +const IS_ALLOWED_URI = seal( + /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i + // eslint-disable-line no-useless-escape +); +const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); +const ATTR_WHITESPACE = seal( + /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g + // eslint-disable-line no-control-regex +); +const DOCTYPE_NAME = seal(/^html$/i); +var EXPRESSIONS = /* @__PURE__ */ Object.freeze({ + __proto__: null, + MUSTACHE_EXPR, + ERB_EXPR, + TMPLIT_EXPR, + DATA_ATTR, + ARIA_ATTR, + IS_ALLOWED_URI, + IS_SCRIPT_OR_DATA, + ATTR_WHITESPACE, + DOCTYPE_NAME +}); +const getGlobal = () => typeof window === "undefined" ? null : window; +const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) { + if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") { + return null; + } + let suffix = null; + const ATTR_NAME = "data-tt-policy-suffix"; + if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) { + suffix = purifyHostElement.getAttribute(ATTR_NAME); + } + const policyName = "dompurify" + (suffix ? "#" + suffix : ""); + try { + return trustedTypes.createPolicy(policyName, { + createHTML(html2) { + return html2; + }, + createScriptURL(scriptUrl) { + return scriptUrl; + } + }); + } catch (_2) { + console.warn("TrustedTypes policy " + policyName + " could not be created."); + return null; + } +}; +function createDOMPurify() { + let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(); + const DOMPurify = (root2) => createDOMPurify(root2); + DOMPurify.version = "3.0.5"; + DOMPurify.removed = []; + if (!window2 || !window2.document || window2.document.nodeType !== 9) { + DOMPurify.isSupported = false; + return DOMPurify; + } + const originalDocument = window2.document; + const currentScript = originalDocument.currentScript; + let { + document: document2 + } = window2; + const { + DocumentFragment, + HTMLTemplateElement, + Node, + Element, + NodeFilter, + NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap, + HTMLFormElement, + DOMParser, + trustedTypes + } = window2; + const ElementPrototype = Element.prototype; + const cloneNode = lookupGetter(ElementPrototype, "cloneNode"); + const getNextSibling = lookupGetter(ElementPrototype, "nextSibling"); + const getChildNodes = lookupGetter(ElementPrototype, "childNodes"); + const getParentNode = lookupGetter(ElementPrototype, "parentNode"); + if (typeof HTMLTemplateElement === "function") { + const template = document2.createElement("template"); + if (template.content && template.content.ownerDocument) { + document2 = template.content.ownerDocument; + } + } + let trustedTypesPolicy; + let emptyHTML = ""; + const { + implementation, + createNodeIterator, + createDocumentFragment, + getElementsByTagName + } = document2; + const { + importNode + } = originalDocument; + let hooks = {}; + DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0; + const { + MUSTACHE_EXPR: MUSTACHE_EXPR2, + ERB_EXPR: ERB_EXPR2, + TMPLIT_EXPR: TMPLIT_EXPR2, + DATA_ATTR: DATA_ATTR2, + ARIA_ATTR: ARIA_ATTR2, + IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2, + ATTR_WHITESPACE: ATTR_WHITESPACE2 + } = EXPRESSIONS; + let { + IS_ALLOWED_URI: IS_ALLOWED_URI$1 + } = EXPRESSIONS; + let ALLOWED_TAGS = null; + const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]); + let ALLOWED_ATTR = null; + const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]); + let CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(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 + } + })); + let FORBID_TAGS = null; + let FORBID_ATTR = null; + let ALLOW_ARIA_ATTR = true; + let ALLOW_DATA_ATTR = true; + let ALLOW_UNKNOWN_PROTOCOLS = false; + let ALLOW_SELF_CLOSE_IN_ATTR = true; + let SAFE_FOR_TEMPLATES = false; + let WHOLE_DOCUMENT = false; + let SET_CONFIG = false; + let FORCE_BODY = false; + let RETURN_DOM = false; + let RETURN_DOM_FRAGMENT = false; + let RETURN_TRUSTED_TYPE = false; + let SANITIZE_DOM = true; + let SANITIZE_NAMED_PROPS = false; + const SANITIZE_NAMED_PROPS_PREFIX = "user-content-"; + let KEEP_CONTENT = true; + let IN_PLACE = false; + let USE_PROFILES = {}; + let FORBID_CONTENTS = null; + const DEFAULT_FORBID_CONTENTS = addToSet({}, ["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 DATA_URI_TAGS = null; + const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]); + let URI_SAFE_ATTRIBUTES = null; + const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]); + const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML"; + const SVG_NAMESPACE = "http://www.w3.org/2000/svg"; + const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + let NAMESPACE = HTML_NAMESPACE; + let IS_EMPTY_INPUT = false; + let ALLOWED_NAMESPACES = null; + const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString); + let PARSER_MEDIA_TYPE; + const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"]; + const DEFAULT_PARSER_MEDIA_TYPE = "text/html"; + let transformCaseFunc; + let CONFIG = null; + const formElement = document2.createElement("form"); + const isRegexOrFunction = function isRegexOrFunction2(testValue) { + return testValue instanceof RegExp || testValue instanceof Function; + }; + const _parseConfig = function _parseConfig2(cfg) { + if (CONFIG && CONFIG === cfg) { + return; + } + if (!cfg || typeof cfg !== "object") { + cfg = {}; + } + cfg = clone(cfg); + PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes + SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; + transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase; + ALLOWED_TAGS = "ALLOWED_TAGS" in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS; + ALLOWED_ATTR = "ALLOWED_ATTR" in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR; + ALLOWED_NAMESPACES = "ALLOWED_NAMESPACES" in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES; + URI_SAFE_ATTRIBUTES = "ADD_URI_SAFE_ATTR" in cfg ? addToSet( + clone(DEFAULT_URI_SAFE_ATTRIBUTES), + // eslint-disable-line indent + cfg.ADD_URI_SAFE_ATTR, + // eslint-disable-line indent + transformCaseFunc + // eslint-disable-line indent + ) : DEFAULT_URI_SAFE_ATTRIBUTES; + DATA_URI_TAGS = "ADD_DATA_URI_TAGS" in cfg ? addToSet( + clone(DEFAULT_DATA_URI_TAGS), + // eslint-disable-line indent + cfg.ADD_DATA_URI_TAGS, + // eslint-disable-line indent + transformCaseFunc + // eslint-disable-line indent + ) : DEFAULT_DATA_URI_TAGS; + FORBID_CONTENTS = "FORBID_CONTENTS" in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS; + FORBID_TAGS = "FORBID_TAGS" in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {}; + FORBID_ATTR = "FORBID_ATTR" in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {}; + USE_PROFILES = "USE_PROFILES" in cfg ? cfg.USE_PROFILES : false; + ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; + ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; + ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; + ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; + SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; + WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; + RETURN_DOM = cfg.RETURN_DOM || false; + RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; + RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; + FORCE_BODY = cfg.FORCE_BODY || false; + SANITIZE_DOM = cfg.SANITIZE_DOM !== false; + SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; + KEEP_CONTENT = cfg.KEEP_CONTENT !== false; + IN_PLACE = cfg.IN_PLACE || false; + IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI; + NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; + CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {}; + if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { + CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck; + } + if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { + CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; + } + if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") { + CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; + } + if (SAFE_FOR_TEMPLATES) { + ALLOW_DATA_ATTR = false; + } + if (RETURN_DOM_FRAGMENT) { + RETURN_DOM = true; + } + if (USE_PROFILES) { + ALLOWED_TAGS = addToSet({}, [...text]); + ALLOWED_ATTR = []; + if (USE_PROFILES.html === true) { + addToSet(ALLOWED_TAGS, html$1); + addToSet(ALLOWED_ATTR, html); + } + if (USE_PROFILES.svg === true) { + addToSet(ALLOWED_TAGS, svg$1); + addToSet(ALLOWED_ATTR, svg); + addToSet(ALLOWED_ATTR, xml); + } + if (USE_PROFILES.svgFilters === true) { + addToSet(ALLOWED_TAGS, svgFilters); + addToSet(ALLOWED_ATTR, svg); + addToSet(ALLOWED_ATTR, xml); + } + if (USE_PROFILES.mathMl === true) { + addToSet(ALLOWED_TAGS, mathMl$1); + addToSet(ALLOWED_ATTR, mathMl); + addToSet(ALLOWED_ATTR, xml); + } + } + if (cfg.ADD_TAGS) { + if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { + ALLOWED_TAGS = clone(ALLOWED_TAGS); + } + addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); + } + if (cfg.ADD_ATTR) { + if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { + ALLOWED_ATTR = clone(ALLOWED_ATTR); + } + addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); + } + if (cfg.ADD_URI_SAFE_ATTR) { + addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); + } + if (cfg.FORBID_CONTENTS) { + if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { + FORBID_CONTENTS = clone(FORBID_CONTENTS); + } + addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); + } + if (KEEP_CONTENT) { + ALLOWED_TAGS["#text"] = true; + } + if (WHOLE_DOCUMENT) { + addToSet(ALLOWED_TAGS, ["html", "head", "body"]); + } + if (ALLOWED_TAGS.table) { + addToSet(ALLOWED_TAGS, ["tbody"]); + delete FORBID_TAGS.tbody; + } + if (cfg.TRUSTED_TYPES_POLICY) { + if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") { + throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); + } + if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") { + throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); + } + trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; + emptyHTML = trustedTypesPolicy.createHTML(""); + } else { + if (trustedTypesPolicy === void 0) { + trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript); + } + if (trustedTypesPolicy !== null && typeof emptyHTML === "string") { + emptyHTML = trustedTypesPolicy.createHTML(""); + } + } + if (freeze) { + freeze(cfg); + } + CONFIG = cfg; + }; + const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]); + const HTML_INTEGRATION_POINTS = addToSet({}, ["foreignobject", "desc", "title", "annotation-xml"]); + const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]); + const ALL_SVG_TAGS = addToSet({}, svg$1); + addToSet(ALL_SVG_TAGS, svgFilters); + addToSet(ALL_SVG_TAGS, svgDisallowed); + const ALL_MATHML_TAGS = addToSet({}, mathMl$1); + addToSet(ALL_MATHML_TAGS, mathMlDisallowed); + const _checkValidNamespace = function _checkValidNamespace2(element) { + let parent = getParentNode(element); + if (!parent || !parent.tagName) { + parent = { + namespaceURI: NAMESPACE, + tagName: "template" + }; + } + const tagName = stringToLowerCase(element.tagName); + const parentTagName = stringToLowerCase(parent.tagName); + if (!ALLOWED_NAMESPACES[element.namespaceURI]) { + return false; + } + if (element.namespaceURI === SVG_NAMESPACE) { + if (parent.namespaceURI === HTML_NAMESPACE) { + return tagName === "svg"; + } + if (parent.namespaceURI === MATHML_NAMESPACE) { + return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); + } + return Boolean(ALL_SVG_TAGS[tagName]); + } + if (element.namespaceURI === MATHML_NAMESPACE) { + if (parent.namespaceURI === HTML_NAMESPACE) { + return tagName === "math"; + } + if (parent.namespaceURI === SVG_NAMESPACE) { + return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName]; + } + return Boolean(ALL_MATHML_TAGS[tagName]); + } + if (element.namespaceURI === HTML_NAMESPACE) { + if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { + return false; + } + if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { + return false; + } + return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]); + } + if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) { + return true; + } + return false; + }; + const _forceRemove = function _forceRemove2(node2) { + arrayPush(DOMPurify.removed, { + element: node2 + }); + try { + node2.parentNode.removeChild(node2); + } catch (_2) { + node2.remove(); + } + }; + const _removeAttribute = function _removeAttribute2(name, node2) { + try { + arrayPush(DOMPurify.removed, { + attribute: node2.getAttributeNode(name), + from: node2 + }); + } catch (_2) { + arrayPush(DOMPurify.removed, { + attribute: null, + from: node2 + }); + } + node2.removeAttribute(name); + if (name === "is" && !ALLOWED_ATTR[name]) { + if (RETURN_DOM || RETURN_DOM_FRAGMENT) { + try { + _forceRemove(node2); + } catch (_2) { + } + } else { + try { + node2.setAttribute(name, ""); + } catch (_2) { + } + } + } + }; + const _initDocument = function _initDocument2(dirty) { + let doc; + let leadingWhitespace; + if (FORCE_BODY) { + dirty = "" + dirty; + } else { + const matches = stringMatch(dirty, /^[\r\n\t ]+/); + leadingWhitespace = matches && matches[0]; + } + if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) { + dirty = '' + dirty + ""; + } + const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; + if (NAMESPACE === HTML_NAMESPACE) { + try { + doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE); + } catch (_2) { + } + } + if (!doc || !doc.documentElement) { + doc = implementation.createDocument(NAMESPACE, "template", null); + try { + doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload; + } catch (_2) { + } + } + const body = doc.body || doc.documentElement; + if (dirty && leadingWhitespace) { + body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null); + } + if (NAMESPACE === HTML_NAMESPACE) { + return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0]; + } + return WHOLE_DOCUMENT ? doc.documentElement : body; + }; + const _createIterator = function _createIterator2(root2) { + return createNodeIterator.call( + root2.ownerDocument || root2, + root2, + // eslint-disable-next-line no-bitwise + NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, + null, + false + ); + }; + const _isClobbered = function _isClobbered2(elm) { + return elm instanceof HTMLFormElement && (typeof elm.nodeName !== "string" || typeof elm.textContent !== "string" || typeof elm.removeChild !== "function" || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== "function" || typeof elm.setAttribute !== "function" || typeof elm.namespaceURI !== "string" || typeof elm.insertBefore !== "function" || typeof elm.hasChildNodes !== "function"); + }; + const _isNode = function _isNode2(object) { + return typeof Node === "object" ? object instanceof Node : object && typeof object === "object" && typeof object.nodeType === "number" && typeof object.nodeName === "string"; + }; + const _executeHook = function _executeHook2(entryPoint, currentNode, data) { + if (!hooks[entryPoint]) { + return; + } + arrayForEach(hooks[entryPoint], (hook) => { + hook.call(DOMPurify, currentNode, data, CONFIG); + }); + }; + const _sanitizeElements = function _sanitizeElements2(currentNode) { + let content; + _executeHook("beforeSanitizeElements", currentNode, null); + if (_isClobbered(currentNode)) { + _forceRemove(currentNode); + return true; + } + const tagName = transformCaseFunc(currentNode.nodeName); + _executeHook("uponSanitizeElement", currentNode, { + tagName, + allowedTags: ALLOWED_TAGS + }); + if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) { + _forceRemove(currentNode); + return true; + } + if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { + if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) { + if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) + return false; + if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) + return false; + } + if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) { + const parentNode = getParentNode(currentNode) || currentNode.parentNode; + const childNodes = getChildNodes(currentNode) || currentNode.childNodes; + if (childNodes && parentNode) { + const childCount = childNodes.length; + for (let i = childCount - 1; i >= 0; --i) { + parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode)); + } + } + } + _forceRemove(currentNode); + return true; + } + if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) { + _forceRemove(currentNode); + return true; + } + if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) { + _forceRemove(currentNode); + return true; + } + if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) { + content = currentNode.textContent; + content = stringReplace(content, MUSTACHE_EXPR2, " "); + content = stringReplace(content, ERB_EXPR2, " "); + content = stringReplace(content, TMPLIT_EXPR2, " "); + if (currentNode.textContent !== content) { + arrayPush(DOMPurify.removed, { + element: currentNode.cloneNode() + }); + currentNode.textContent = content; + } + } + _executeHook("afterSanitizeElements", currentNode, null); + return false; + }; + const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) { + if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) { + return false; + } + if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) + ; + else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) + ; + else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { + if ( + // First condition does a very basic check if a) it's basically a valid custom element tagname AND + // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck + // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck + _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND + // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck + lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value)) + ) + ; + else { + return false; + } + } else if (URI_SAFE_ATTRIBUTES[lcName]) + ; + else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, ""))) + ; + else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) + ; + else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, ""))) + ; + else if (value) { + return false; + } else + ; + return true; + }; + const _basicCustomElementTest = function _basicCustomElementTest2(tagName) { + return tagName.indexOf("-") > 0; + }; + const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) { + let attr; + let value; + let lcName; + let l; + _executeHook("beforeSanitizeAttributes", currentNode, null); + const { + attributes + } = currentNode; + if (!attributes) { + return; + } + const hookEvent = { + attrName: "", + attrValue: "", + keepAttr: true, + allowedAttributes: ALLOWED_ATTR + }; + l = attributes.length; + while (l--) { + attr = attributes[l]; + const { + name, + namespaceURI + } = attr; + value = name === "value" ? attr.value : stringTrim(attr.value); + lcName = transformCaseFunc(name); + hookEvent.attrName = lcName; + hookEvent.attrValue = value; + hookEvent.keepAttr = true; + hookEvent.forceKeepAttr = void 0; + _executeHook("uponSanitizeAttribute", currentNode, hookEvent); + value = hookEvent.attrValue; + if (hookEvent.forceKeepAttr) { + continue; + } + _removeAttribute(name, currentNode); + if (!hookEvent.keepAttr) { + continue; + } + if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) { + _removeAttribute(name, currentNode); + continue; + } + if (SAFE_FOR_TEMPLATES) { + value = stringReplace(value, MUSTACHE_EXPR2, " "); + value = stringReplace(value, ERB_EXPR2, " "); + value = stringReplace(value, TMPLIT_EXPR2, " "); + } + const lcTag = transformCaseFunc(currentNode.nodeName); + if (!_isValidAttribute(lcTag, lcName, value)) { + continue; + } + if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) { + _removeAttribute(name, currentNode); + value = SANITIZE_NAMED_PROPS_PREFIX + value; + } + if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") { + if (namespaceURI) + ; + else { + switch (trustedTypes.getAttributeType(lcTag, lcName)) { + case "TrustedHTML": { + value = trustedTypesPolicy.createHTML(value); + break; + } + case "TrustedScriptURL": { + value = trustedTypesPolicy.createScriptURL(value); + break; + } + } + } + } + try { + if (namespaceURI) { + currentNode.setAttributeNS(namespaceURI, name, value); + } else { + currentNode.setAttribute(name, value); + } + arrayPop(DOMPurify.removed); + } catch (_2) { + } + } + _executeHook("afterSanitizeAttributes", currentNode, null); + }; + const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) { + let shadowNode; + const shadowIterator = _createIterator(fragment); + _executeHook("beforeSanitizeShadowDOM", fragment, null); + while (shadowNode = shadowIterator.nextNode()) { + _executeHook("uponSanitizeShadowNode", shadowNode, null); + if (_sanitizeElements(shadowNode)) { + continue; + } + if (shadowNode.content instanceof DocumentFragment) { + _sanitizeShadowDOM2(shadowNode.content); + } + _sanitizeAttributes(shadowNode); + } + _executeHook("afterSanitizeShadowDOM", fragment, null); + }; + DOMPurify.sanitize = function(dirty) { + let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + let body; + let importedNode; + let currentNode; + let returnNode; + IS_EMPTY_INPUT = !dirty; + if (IS_EMPTY_INPUT) { + dirty = ""; + } + if (typeof dirty !== "string" && !_isNode(dirty)) { + if (typeof dirty.toString === "function") { + dirty = dirty.toString(); + if (typeof dirty !== "string") { + throw typeErrorCreate("dirty is not a string, aborting"); + } + } else { + throw typeErrorCreate("toString is not a function"); + } + } + if (!DOMPurify.isSupported) { + return dirty; + } + if (!SET_CONFIG) { + _parseConfig(cfg); + } + DOMPurify.removed = []; + if (typeof dirty === "string") { + IN_PLACE = false; + } + if (IN_PLACE) { + if (dirty.nodeName) { + const tagName = transformCaseFunc(dirty.nodeName); + if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { + throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place"); + } + } + } else if (dirty instanceof Node) { + body = _initDocument(""); + importedNode = body.ownerDocument.importNode(dirty, true); + if (importedNode.nodeType === 1 && importedNode.nodeName === "BODY") { + body = importedNode; + } else if (importedNode.nodeName === "HTML") { + body = importedNode; + } else { + body.appendChild(importedNode); + } + } else { + if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes + dirty.indexOf("<") === -1) { + return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty; + } + body = _initDocument(dirty); + if (!body) { + return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : ""; + } + } + if (body && FORCE_BODY) { + _forceRemove(body.firstChild); + } + const nodeIterator = _createIterator(IN_PLACE ? dirty : body); + while (currentNode = nodeIterator.nextNode()) { + if (_sanitizeElements(currentNode)) { + continue; + } + if (currentNode.content instanceof DocumentFragment) { + _sanitizeShadowDOM(currentNode.content); + } + _sanitizeAttributes(currentNode); + } + if (IN_PLACE) { + return dirty; + } + if (RETURN_DOM) { + if (RETURN_DOM_FRAGMENT) { + returnNode = createDocumentFragment.call(body.ownerDocument); + while (body.firstChild) { + returnNode.appendChild(body.firstChild); + } + } else { + returnNode = body; + } + if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) { + returnNode = importNode.call(originalDocument, returnNode, true); + } + return returnNode; + } + let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML; + if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) { + serializedHTML = "\n" + serializedHTML; + } + if (SAFE_FOR_TEMPLATES) { + serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR2, " "); + serializedHTML = stringReplace(serializedHTML, ERB_EXPR2, " "); + serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR2, " "); + } + return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML; + }; + DOMPurify.setConfig = function(cfg) { + _parseConfig(cfg); + SET_CONFIG = true; + }; + DOMPurify.clearConfig = function() { + CONFIG = null; + SET_CONFIG = false; + }; + DOMPurify.isValidAttribute = function(tag, attr, value) { + if (!CONFIG) { + _parseConfig({}); + } + const lcTag = transformCaseFunc(tag); + const lcName = transformCaseFunc(attr); + return _isValidAttribute(lcTag, lcName, value); + }; + DOMPurify.addHook = function(entryPoint, hookFunction) { + if (typeof hookFunction !== "function") { + return; + } + hooks[entryPoint] = hooks[entryPoint] || []; + arrayPush(hooks[entryPoint], hookFunction); + }; + DOMPurify.removeHook = function(entryPoint) { + if (hooks[entryPoint]) { + return arrayPop(hooks[entryPoint]); + } + }; + DOMPurify.removeHooks = function(entryPoint) { + if (hooks[entryPoint]) { + hooks[entryPoint] = []; + } + }; + DOMPurify.removeAllHooks = function() { + hooks = {}; + }; + return DOMPurify; +} +var purify = createDOMPurify(); +const lineBreakRegex = //gi; +const getRows = (s) => { + if (!s) { + return [""]; + } + const str2 = breakToPlaceholder(s).replace(/\\n/g, "#br#"); + return str2.split("#br#"); +}; +const removeScript = (txt) => { + return purify.sanitize(txt); +}; +const sanitizeMore = (text2, config2) => { + var _a; + if (((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels) !== false) { + const level = config2.securityLevel; + if (level === "antiscript" || level === "strict") { + text2 = removeScript(text2); + } else if (level !== "loose") { + text2 = breakToPlaceholder(text2); + text2 = text2.replace(//g, ">"); + text2 = text2.replace(/=/g, "="); + text2 = placeholderToBreak(text2); + } + } + return text2; +}; +const sanitizeText$2 = (text2, config2) => { + if (!text2) { + return text2; + } + if (config2.dompurifyConfig) { + text2 = purify.sanitize(sanitizeMore(text2, config2), config2.dompurifyConfig).toString(); + } else { + text2 = purify.sanitize(sanitizeMore(text2, config2), { + FORBID_TAGS: ["style"] + }).toString(); + } + return text2; +}; +const sanitizeTextOrArray = (a, config2) => { + if (typeof a === "string") { + return sanitizeText$2(a, config2); + } + return a.flat().map((x) => sanitizeText$2(x, config2)); +}; +const hasBreaks = (text2) => { + return lineBreakRegex.test(text2); +}; +const splitBreaks = (text2) => { + return text2.split(lineBreakRegex); +}; +const placeholderToBreak = (s) => { + return s.replace(/#br#/g, "
"); +}; +const breakToPlaceholder = (s) => { + return s.replace(lineBreakRegex, "#br#"); +}; +const getUrl = (useAbsolute) => { + let url = ""; + if (useAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replaceAll(/\(/g, "\\("); + url = url.replaceAll(/\)/g, "\\)"); + } + return url; +}; +const evaluate = (val) => val === false || ["false", "null", "0"].includes(String(val).trim().toLowerCase()) ? false : true; +const getMax = function(...values) { + const newValues = values.filter((value) => { + return !isNaN(value); + }); + return Math.max(...newValues); +}; +const getMin = function(...values) { + const newValues = values.filter((value) => { + return !isNaN(value); + }); + return Math.min(...newValues); +}; +const parseGenericTypes = function(input) { + const inputSets = input.split(/(,)/); + const output = []; + for (let i = 0; i < inputSets.length; i++) { + let thisSet = inputSets[i]; + if (thisSet === "," && i > 0 && i + 1 < inputSets.length) { + const previousSet = inputSets[i - 1]; + const nextSet = inputSets[i + 1]; + if (shouldCombineSets(previousSet, nextSet)) { + thisSet = previousSet + "," + nextSet; + i++; + output.pop(); + } + } + output.push(processSet(thisSet)); + } + return output.join(""); +}; +const countOccurrence = (string, substring) => { + return Math.max(0, string.split(substring).length - 1); +}; +const shouldCombineSets = (previousSet, nextSet) => { + const prevCount = countOccurrence(previousSet, "~"); + const nextCount = countOccurrence(nextSet, "~"); + return prevCount === 1 && nextCount === 1; +}; +const processSet = (input) => { + const tildeCount = countOccurrence(input, "~"); + let hasStartingTilde = false; + if (tildeCount <= 1) { + return input; + } + if (tildeCount % 2 !== 0 && input.startsWith("~")) { + input = input.substring(1); + hasStartingTilde = true; + } + const chars = [...input]; + let first = chars.indexOf("~"); + let last = chars.lastIndexOf("~"); + while (first !== -1 && last !== -1 && first !== last) { + chars[first] = "<"; + chars[last] = ">"; + first = chars.indexOf("~"); + last = chars.lastIndexOf("~"); + } + if (hasStartingTilde) { + chars.unshift("~"); + } + return chars.join(""); +}; +const common$1 = { + getRows, + sanitizeText: sanitizeText$2, + sanitizeTextOrArray, + hasBreaks, + splitBreaks, + lineBreakRegex, + removeScript, + getUrl, + evaluate, + getMax, + getMin +}; +const Channel = { + /* CLAMP */ + min: { + r: 0, + g: 0, + b: 0, + s: 0, + l: 0, + a: 0 + }, + max: { + r: 255, + g: 255, + b: 255, + h: 360, + s: 100, + l: 100, + a: 1 + }, + clamp: { + r: (r) => r >= 255 ? 255 : r < 0 ? 0 : r, + g: (g) => g >= 255 ? 255 : g < 0 ? 0 : g, + b: (b) => b >= 255 ? 255 : b < 0 ? 0 : b, + h: (h) => h % 360, + s: (s) => s >= 100 ? 100 : s < 0 ? 0 : s, + l: (l) => l >= 100 ? 100 : l < 0 ? 0 : l, + a: (a) => a >= 1 ? 1 : a < 0 ? 0 : a + }, + /* CONVERSION */ + //SOURCE: https://planetcalc.com/7779 + toLinear: (c) => { + const n = c / 255; + return c > 0.03928 ? Math.pow((n + 0.055) / 1.055, 2.4) : n / 12.92; + }, + //SOURCE: https://gist.github.com/mjackson/5311256 + hue2rgb: (p, q, t) => { + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p + (q - p) * 6 * t; + if (t < 1 / 2) + return q; + if (t < 2 / 3) + return p + (q - p) * (2 / 3 - t) * 6; + return p; + }, + hsl2rgb: ({ h, s, l }, channel2) => { + if (!s) + return l * 2.55; + h /= 360; + s /= 100; + l /= 100; + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p = 2 * l - q; + switch (channel2) { + case "r": + return Channel.hue2rgb(p, q, h + 1 / 3) * 255; + case "g": + return Channel.hue2rgb(p, q, h) * 255; + case "b": + return Channel.hue2rgb(p, q, h - 1 / 3) * 255; + } + }, + rgb2hsl: ({ r, g, b }, channel2) => { + r /= 255; + g /= 255; + b /= 255; + const max2 = Math.max(r, g, b); + const min2 = Math.min(r, g, b); + const l = (max2 + min2) / 2; + if (channel2 === "l") + return l * 100; + if (max2 === min2) + return 0; + const d = max2 - min2; + const s = l > 0.5 ? d / (2 - max2 - min2) : d / (max2 + min2); + if (channel2 === "s") + return s * 100; + switch (max2) { + case r: + return ((g - b) / d + (g < b ? 6 : 0)) * 60; + case g: + return ((b - r) / d + 2) * 60; + case b: + return ((r - g) / d + 4) * 60; + default: + return -1; + } + } +}; +const channel = Channel; +const Lang = { + /* API */ + clamp: (number, lower2, upper) => { + if (lower2 > upper) + return Math.min(lower2, Math.max(upper, number)); + return Math.min(upper, Math.max(lower2, number)); + }, + round: (number) => { + return Math.round(number * 1e10) / 1e10; + } +}; +const lang = Lang; +const Unit = { + /* API */ + dec2hex: (dec) => { + const hex2 = Math.round(dec).toString(16); + return hex2.length > 1 ? hex2 : `0${hex2}`; + } +}; +const unit = Unit; +const Utils = { + channel, + lang, + unit +}; +const _ = Utils; +const DEC2HEX = {}; +for (let i = 0; i <= 255; i++) + DEC2HEX[i] = _.unit.dec2hex(i); +const TYPE = { + ALL: 0, + RGB: 1, + HSL: 2 +}; +class Type { + constructor() { + this.type = TYPE.ALL; + } + /* API */ + get() { + return this.type; + } + set(type2) { + if (this.type && this.type !== type2) + throw new Error("Cannot change both RGB and HSL channels at the same time"); + this.type = type2; + } + reset() { + this.type = TYPE.ALL; + } + is(type2) { + return this.type === type2; + } +} +const Type$2 = Type; +class Channels { + /* CONSTRUCTOR */ + constructor(data, color2) { + this.color = color2; + this.changed = false; + this.data = data; + this.type = new Type$2(); + } + /* API */ + set(data, color2) { + this.color = color2; + this.changed = false; + this.data = data; + this.type.type = TYPE.ALL; + return this; + } + /* HELPERS */ + _ensureHSL() { + const data = this.data; + const { h, s, l } = data; + if (h === void 0) + data.h = _.channel.rgb2hsl(data, "h"); + if (s === void 0) + data.s = _.channel.rgb2hsl(data, "s"); + if (l === void 0) + data.l = _.channel.rgb2hsl(data, "l"); + } + _ensureRGB() { + const data = this.data; + const { r, g, b } = data; + if (r === void 0) + data.r = _.channel.hsl2rgb(data, "r"); + if (g === void 0) + data.g = _.channel.hsl2rgb(data, "g"); + if (b === void 0) + data.b = _.channel.hsl2rgb(data, "b"); + } + /* GETTERS */ + get r() { + const data = this.data; + const r = data.r; + if (!this.type.is(TYPE.HSL) && r !== void 0) + return r; + this._ensureHSL(); + return _.channel.hsl2rgb(data, "r"); + } + get g() { + const data = this.data; + const g = data.g; + if (!this.type.is(TYPE.HSL) && g !== void 0) + return g; + this._ensureHSL(); + return _.channel.hsl2rgb(data, "g"); + } + get b() { + const data = this.data; + const b = data.b; + if (!this.type.is(TYPE.HSL) && b !== void 0) + return b; + this._ensureHSL(); + return _.channel.hsl2rgb(data, "b"); + } + get h() { + const data = this.data; + const h = data.h; + if (!this.type.is(TYPE.RGB) && h !== void 0) + return h; + this._ensureRGB(); + return _.channel.rgb2hsl(data, "h"); + } + get s() { + const data = this.data; + const s = data.s; + if (!this.type.is(TYPE.RGB) && s !== void 0) + return s; + this._ensureRGB(); + return _.channel.rgb2hsl(data, "s"); + } + get l() { + const data = this.data; + const l = data.l; + if (!this.type.is(TYPE.RGB) && l !== void 0) + return l; + this._ensureRGB(); + return _.channel.rgb2hsl(data, "l"); + } + get a() { + return this.data.a; + } + /* SETTERS */ + set r(r) { + this.type.set(TYPE.RGB); + this.changed = true; + this.data.r = r; + } + set g(g) { + this.type.set(TYPE.RGB); + this.changed = true; + this.data.g = g; + } + set b(b) { + this.type.set(TYPE.RGB); + this.changed = true; + this.data.b = b; + } + set h(h) { + this.type.set(TYPE.HSL); + this.changed = true; + this.data.h = h; + } + set s(s) { + this.type.set(TYPE.HSL); + this.changed = true; + this.data.s = s; + } + set l(l) { + this.type.set(TYPE.HSL); + this.changed = true; + this.data.l = l; + } + set a(a) { + this.changed = true; + this.data.a = a; + } +} +const Channels$1 = Channels; +const channels = new Channels$1({ r: 0, g: 0, b: 0, a: 0 }, "transparent"); +const ChannelsReusable = channels; +const Hex = { + /* VARIABLES */ + re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i, + /* API */ + parse: (color2) => { + if (color2.charCodeAt(0) !== 35) + return; + const match = color2.match(Hex.re); + if (!match) + return; + const hex2 = match[1]; + const dec = parseInt(hex2, 16); + const length2 = hex2.length; + const hasAlpha = length2 % 4 === 0; + const isFullLength = length2 > 4; + const multiplier = isFullLength ? 1 : 17; + const bits = isFullLength ? 8 : 4; + const bitsOffset = hasAlpha ? 0 : -1; + const mask = isFullLength ? 255 : 15; + return ChannelsReusable.set({ + r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier, + g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier, + b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier, + a: hasAlpha ? (dec & mask) * multiplier / 255 : 1 + }, color2); + }, + stringify: (channels2) => { + const { r, g, b, a } = channels2; + if (a < 1) { + return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`; + } else { + return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`; + } + } +}; +const Hex$1 = Hex; +const HSL = { + /* VARIABLES */ + re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i, + hueRe: /^(.+?)(deg|grad|rad|turn)$/i, + /* HELPERS */ + _hue2deg: (hue2) => { + const match = hue2.match(HSL.hueRe); + if (match) { + const [, number, unit2] = match; + switch (unit2) { + case "grad": + return _.channel.clamp.h(parseFloat(number) * 0.9); + case "rad": + return _.channel.clamp.h(parseFloat(number) * 180 / Math.PI); + case "turn": + return _.channel.clamp.h(parseFloat(number) * 360); + } + } + return _.channel.clamp.h(parseFloat(hue2)); + }, + /* API */ + parse: (color2) => { + const charCode = color2.charCodeAt(0); + if (charCode !== 104 && charCode !== 72) + return; + const match = color2.match(HSL.re); + if (!match) + return; + const [, h, s, l, a, isAlphaPercentage] = match; + return ChannelsReusable.set({ + h: HSL._hue2deg(h), + s: _.channel.clamp.s(parseFloat(s)), + l: _.channel.clamp.l(parseFloat(l)), + a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 + }, color2); + }, + stringify: (channels2) => { + const { h, s, l, a } = channels2; + if (a < 1) { + return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`; + } else { + return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`; + } + } +}; +const HSL$1 = HSL; +const Keyword = { + /* VARIABLES */ + colors: { + aliceblue: "#f0f8ff", + antiquewhite: "#faebd7", + aqua: "#00ffff", + aquamarine: "#7fffd4", + azure: "#f0ffff", + beige: "#f5f5dc", + bisque: "#ffe4c4", + black: "#000000", + blanchedalmond: "#ffebcd", + blue: "#0000ff", + blueviolet: "#8a2be2", + brown: "#a52a2a", + burlywood: "#deb887", + cadetblue: "#5f9ea0", + chartreuse: "#7fff00", + chocolate: "#d2691e", + coral: "#ff7f50", + cornflowerblue: "#6495ed", + cornsilk: "#fff8dc", + crimson: "#dc143c", + cyanaqua: "#00ffff", + darkblue: "#00008b", + darkcyan: "#008b8b", + darkgoldenrod: "#b8860b", + darkgray: "#a9a9a9", + darkgreen: "#006400", + darkgrey: "#a9a9a9", + darkkhaki: "#bdb76b", + darkmagenta: "#8b008b", + darkolivegreen: "#556b2f", + darkorange: "#ff8c00", + darkorchid: "#9932cc", + darkred: "#8b0000", + darksalmon: "#e9967a", + darkseagreen: "#8fbc8f", + darkslateblue: "#483d8b", + darkslategray: "#2f4f4f", + darkslategrey: "#2f4f4f", + darkturquoise: "#00ced1", + darkviolet: "#9400d3", + deeppink: "#ff1493", + deepskyblue: "#00bfff", + dimgray: "#696969", + dimgrey: "#696969", + dodgerblue: "#1e90ff", + firebrick: "#b22222", + floralwhite: "#fffaf0", + forestgreen: "#228b22", + fuchsia: "#ff00ff", + gainsboro: "#dcdcdc", + ghostwhite: "#f8f8ff", + gold: "#ffd700", + goldenrod: "#daa520", + gray: "#808080", + green: "#008000", + greenyellow: "#adff2f", + grey: "#808080", + honeydew: "#f0fff0", + hotpink: "#ff69b4", + indianred: "#cd5c5c", + indigo: "#4b0082", + ivory: "#fffff0", + khaki: "#f0e68c", + lavender: "#e6e6fa", + lavenderblush: "#fff0f5", + lawngreen: "#7cfc00", + lemonchiffon: "#fffacd", + lightblue: "#add8e6", + lightcoral: "#f08080", + lightcyan: "#e0ffff", + lightgoldenrodyellow: "#fafad2", + lightgray: "#d3d3d3", + lightgreen: "#90ee90", + lightgrey: "#d3d3d3", + lightpink: "#ffb6c1", + lightsalmon: "#ffa07a", + lightseagreen: "#20b2aa", + lightskyblue: "#87cefa", + lightslategray: "#778899", + lightslategrey: "#778899", + lightsteelblue: "#b0c4de", + lightyellow: "#ffffe0", + lime: "#00ff00", + limegreen: "#32cd32", + linen: "#faf0e6", + magenta: "#ff00ff", + maroon: "#800000", + mediumaquamarine: "#66cdaa", + mediumblue: "#0000cd", + mediumorchid: "#ba55d3", + mediumpurple: "#9370db", + mediumseagreen: "#3cb371", + mediumslateblue: "#7b68ee", + mediumspringgreen: "#00fa9a", + mediumturquoise: "#48d1cc", + mediumvioletred: "#c71585", + midnightblue: "#191970", + mintcream: "#f5fffa", + mistyrose: "#ffe4e1", + moccasin: "#ffe4b5", + navajowhite: "#ffdead", + navy: "#000080", + oldlace: "#fdf5e6", + olive: "#808000", + olivedrab: "#6b8e23", + orange: "#ffa500", + orangered: "#ff4500", + orchid: "#da70d6", + palegoldenrod: "#eee8aa", + palegreen: "#98fb98", + paleturquoise: "#afeeee", + palevioletred: "#db7093", + papayawhip: "#ffefd5", + peachpuff: "#ffdab9", + peru: "#cd853f", + pink: "#ffc0cb", + plum: "#dda0dd", + powderblue: "#b0e0e6", + purple: "#800080", + rebeccapurple: "#663399", + red: "#ff0000", + rosybrown: "#bc8f8f", + royalblue: "#4169e1", + saddlebrown: "#8b4513", + salmon: "#fa8072", + sandybrown: "#f4a460", + seagreen: "#2e8b57", + seashell: "#fff5ee", + sienna: "#a0522d", + silver: "#c0c0c0", + skyblue: "#87ceeb", + slateblue: "#6a5acd", + slategray: "#708090", + slategrey: "#708090", + snow: "#fffafa", + springgreen: "#00ff7f", + tan: "#d2b48c", + teal: "#008080", + thistle: "#d8bfd8", + transparent: "#00000000", + turquoise: "#40e0d0", + violet: "#ee82ee", + wheat: "#f5deb3", + white: "#ffffff", + whitesmoke: "#f5f5f5", + yellow: "#ffff00", + yellowgreen: "#9acd32" + }, + /* API */ + parse: (color2) => { + color2 = color2.toLowerCase(); + const hex2 = Keyword.colors[color2]; + if (!hex2) + return; + return Hex$1.parse(hex2); + }, + stringify: (channels2) => { + const hex2 = Hex$1.stringify(channels2); + for (const name in Keyword.colors) { + if (Keyword.colors[name] === hex2) + return name; + } + return; + } +}; +const Keyword$1 = Keyword; +const RGB = { + /* VARIABLES */ + re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i, + /* API */ + parse: (color2) => { + const charCode = color2.charCodeAt(0); + if (charCode !== 114 && charCode !== 82) + return; + const match = color2.match(RGB.re); + if (!match) + return; + const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match; + return ChannelsReusable.set({ + r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)), + g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)), + b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)), + a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 + }, color2); + }, + stringify: (channels2) => { + const { r, g, b, a } = channels2; + if (a < 1) { + return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`; + } else { + return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`; + } + } +}; +const RGB$1 = RGB; +const Color = { + /* VARIABLES */ + format: { + keyword: Keyword$1, + hex: Hex$1, + rgb: RGB$1, + rgba: RGB$1, + hsl: HSL$1, + hsla: HSL$1 + }, + /* API */ + parse: (color2) => { + if (typeof color2 !== "string") + return color2; + const channels2 = Hex$1.parse(color2) || RGB$1.parse(color2) || HSL$1.parse(color2) || Keyword$1.parse(color2); + if (channels2) + return channels2; + throw new Error(`Unsupported color format: "${color2}"`); + }, + stringify: (channels2) => { + if (!channels2.changed && channels2.color) + return channels2.color; + if (channels2.type.is(TYPE.HSL) || channels2.data.r === void 0) { + return HSL$1.stringify(channels2); + } else if (channels2.a < 1 || !Number.isInteger(channels2.r) || !Number.isInteger(channels2.g) || !Number.isInteger(channels2.b)) { + return RGB$1.stringify(channels2); + } else { + return Hex$1.stringify(channels2); + } + } +}; +const Color$1 = Color; +const change = (color2, channels2) => { + const ch = Color$1.parse(color2); + for (const c in channels2) { + ch[c] = _.channel.clamp[c](channels2[c]); + } + return Color$1.stringify(ch); +}; +const change$1 = change; +const rgba = (r, g, b = 0, a = 1) => { + if (typeof r !== "number") + return change$1(r, { a: g }); + const channels2 = ChannelsReusable.set({ + r: _.channel.clamp.r(r), + g: _.channel.clamp.g(g), + b: _.channel.clamp.b(b), + a: _.channel.clamp.a(a) + }); + return Color$1.stringify(channels2); +}; +const rgba$1 = rgba; +const luminance = (color2) => { + const { r, g, b } = Color$1.parse(color2); + const luminance2 = 0.2126 * _.channel.toLinear(r) + 0.7152 * _.channel.toLinear(g) + 0.0722 * _.channel.toLinear(b); + return _.lang.round(luminance2); +}; +const luminance$1 = luminance; +const isLight = (color2) => { + return luminance$1(color2) >= 0.5; +}; +const isLight$1 = isLight; +const isDark = (color2) => { + return !isLight$1(color2); +}; +const isDark$1 = isDark; +const adjustChannel = (color2, channel2, amount) => { + const channels2 = Color$1.parse(color2); + const amountCurrent = channels2[channel2]; + const amountNext = _.channel.clamp[channel2](amountCurrent + amount); + if (amountCurrent !== amountNext) + channels2[channel2] = amountNext; + return Color$1.stringify(channels2); +}; +const adjustChannel$1 = adjustChannel; +const lighten = (color2, amount) => { + return adjustChannel$1(color2, "l", amount); +}; +const lighten$1 = lighten; +const darken = (color2, amount) => { + return adjustChannel$1(color2, "l", -amount); +}; +const darken$1 = darken; +const adjust = (color2, channels2) => { + const ch = Color$1.parse(color2); + const changes = {}; + for (const c in channels2) { + if (!channels2[c]) + continue; + changes[c] = ch[c] + channels2[c]; + } + return change$1(color2, changes); +}; +const adjust$1 = adjust; +const mix = (color1, color2, weight = 50) => { + const { r: r1, g: g1, b: b1, a: a1 } = Color$1.parse(color1); + const { r: r2, g: g2, b: b2, a: a2 } = Color$1.parse(color2); + const weightScale = weight / 100; + const weightNormalized = weightScale * 2 - 1; + const alphaDelta = a1 - a2; + const weight1combined = weightNormalized * alphaDelta === -1 ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta); + const weight1 = (weight1combined + 1) / 2; + const weight2 = 1 - weight1; + const r = r1 * weight1 + r2 * weight2; + const g = g1 * weight1 + g2 * weight2; + const b = b1 * weight1 + b2 * weight2; + const a = a1 * weightScale + a2 * (1 - weightScale); + return rgba$1(r, g, b, a); +}; +const mix$1 = mix; +const invert = (color2, weight = 100) => { + const inverse = Color$1.parse(color2); + inverse.r = 255 - inverse.r; + inverse.g = 255 - inverse.g; + inverse.b = 255 - inverse.b; + return mix$1(inverse, color2, weight); +}; +const invert$1 = invert; +const mkBorder = (col, darkMode) => darkMode ? adjust$1(col, { s: -40, l: 10 }) : adjust$1(col, { s: -40, l: -10 }); +const oldAttributeBackgroundColorOdd = "#ffffff"; +const oldAttributeBackgroundColorEven = "#f2f2f2"; +let Theme$4 = class Theme { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#fff4dd"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "#333"; + this.THEME_COLOR_LIMIT = 12; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + } + updateColors() { + this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333"); + this.secondaryColor = this.secondaryColor || adjust$1(this.primaryColor, { h: -120 }); + this.tertiaryColor = this.tertiaryColor || adjust$1(this.primaryColor, { h: 180, l: 5 }); + this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode); + this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode); + this.noteBkgColor = this.noteBkgColor || "#fff5ad"; + this.noteTextColor = this.noteTextColor || "#333"; + this.secondaryTextColor = this.secondaryTextColor || invert$1(this.secondaryColor); + this.tertiaryTextColor = this.tertiaryTextColor || invert$1(this.tertiaryColor); + this.lineColor = this.lineColor || invert$1(this.background); + this.arrowheadColor = this.arrowheadColor || invert$1(this.background); + this.textColor = this.textColor || this.primaryTextColor; + this.border2 = this.border2 || this.tertiaryBorderColor; + this.nodeBkg = this.nodeBkg || this.primaryColor; + this.mainBkg = this.mainBkg || this.primaryColor; + this.nodeBorder = this.nodeBorder || this.primaryBorderColor; + this.clusterBkg = this.clusterBkg || this.tertiaryColor; + this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor; + this.defaultLinkColor = this.defaultLinkColor || this.lineColor; + this.titleColor = this.titleColor || this.tertiaryTextColor; + this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? darken$1(this.secondaryColor, 30) : this.secondaryColor); + this.nodeTextColor = this.nodeTextColor || this.primaryTextColor; + this.actorBorder = this.actorBorder || this.primaryBorderColor; + this.actorBkg = this.actorBkg || this.mainBkg; + this.actorTextColor = this.actorTextColor || this.primaryTextColor; + this.actorLineColor = this.actorLineColor || "grey"; + this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg; + this.signalColor = this.signalColor || this.textColor; + this.signalTextColor = this.signalTextColor || this.textColor; + this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder; + this.labelTextColor = this.labelTextColor || this.actorTextColor; + this.loopTextColor = this.loopTextColor || this.actorTextColor; + this.activationBorderColor = this.activationBorderColor || darken$1(this.secondaryColor, 10); + this.activationBkgColor = this.activationBkgColor || this.secondaryColor; + this.sequenceNumberColor = this.sequenceNumberColor || invert$1(this.lineColor); + this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor; + this.altSectionBkgColor = this.altSectionBkgColor || "white"; + this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor; + this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor; + this.excludeBkgColor = this.excludeBkgColor || "#eeeeee"; + this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor; + this.taskBkgColor = this.taskBkgColor || this.primaryColor; + this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor; + this.activeTaskBkgColor = this.activeTaskBkgColor || lighten$1(this.primaryColor, 23); + this.gridColor = this.gridColor || "lightgrey"; + this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey"; + this.doneTaskBorderColor = this.doneTaskBorderColor || "grey"; + this.critBorderColor = this.critBorderColor || "#ff8888"; + this.critBkgColor = this.critBkgColor || "red"; + this.todayLineColor = this.todayLineColor || "red"; + this.taskTextColor = this.taskTextColor || this.textColor; + this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor; + this.taskTextLightColor = this.taskTextLightColor || this.textColor; + this.taskTextColor = this.taskTextColor || this.primaryTextColor; + this.taskTextDarkColor = this.taskTextDarkColor || this.textColor; + this.taskTextClickableColor = this.taskTextClickableColor || "#003163"; + this.personBorder = this.personBorder || this.primaryBorderColor; + this.personBkg = this.personBkg || this.mainBkg; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || this.tertiaryColor; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.nodeBorder; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.specialStateColor = this.lineColor; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$1(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$1(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$1(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$1(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$1(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$1(this.primaryColor, { h: 210, l: 150 }); + this.cScale9 = this.cScale9 || adjust$1(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$1(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$1(this.primaryColor, { h: 330 }); + if (this.darkMode) { + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken$1(this["cScale" + i], 75); + } + } else { + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken$1(this["cScale" + i], 25); + } + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || invert$1(this["cScale" + i]); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + if (this.darkMode) { + this["cScalePeer" + i] = this["cScalePeer" + i] || lighten$1(this["cScale" + i], 10); + } else { + this["cScalePeer" + i] = this["cScalePeer" + i] || darken$1(this["cScale" + i], 10); + } + } + this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + const multiplier = this.darkMode ? -4 : -1; + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust$1(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust$1(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) }); + } + this.classText = this.classText || this.textColor; + this.fillType0 = this.fillType0 || this.primaryColor; + this.fillType1 = this.fillType1 || this.secondaryColor; + this.fillType2 = this.fillType2 || adjust$1(this.primaryColor, { h: 64 }); + this.fillType3 = this.fillType3 || adjust$1(this.secondaryColor, { h: 64 }); + this.fillType4 = this.fillType4 || adjust$1(this.primaryColor, { h: -64 }); + this.fillType5 = this.fillType5 || adjust$1(this.secondaryColor, { h: -64 }); + this.fillType6 = this.fillType6 || adjust$1(this.primaryColor, { h: 128 }); + this.fillType7 = this.fillType7 || adjust$1(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || this.tertiaryColor; + this.pie4 = this.pie4 || adjust$1(this.primaryColor, { l: -10 }); + this.pie5 = this.pie5 || adjust$1(this.secondaryColor, { l: -10 }); + this.pie6 = this.pie6 || adjust$1(this.tertiaryColor, { l: -10 }); + this.pie7 = this.pie7 || adjust$1(this.primaryColor, { h: 60, l: -10 }); + this.pie8 = this.pie8 || adjust$1(this.primaryColor, { h: -60, l: -10 }); + this.pie9 = this.pie9 || adjust$1(this.primaryColor, { h: 120, l: 0 }); + this.pie10 = this.pie10 || adjust$1(this.primaryColor, { h: 60, l: -20 }); + this.pie11 = this.pie11 || adjust$1(this.primaryColor, { h: -60, l: -20 }); + this.pie12 = this.pie12 || adjust$1(this.primaryColor, { h: 120, l: -10 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$1(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$1(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$1(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$1(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$1(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$1(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken$1(this.secondaryColor, 30) : this.secondaryColor); + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust$1(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust$1(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust$1(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust$1(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust$1(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten$1(this.git0, 25); + this.git1 = lighten$1(this.git1, 25); + this.git2 = lighten$1(this.git2, 25); + this.git3 = lighten$1(this.git3, 25); + this.git4 = lighten$1(this.git4, 25); + this.git5 = lighten$1(this.git5, 25); + this.git6 = lighten$1(this.git6, 25); + this.git7 = lighten$1(this.git7, 25); + } else { + this.git0 = darken$1(this.git0, 25); + this.git1 = darken$1(this.git1, 25); + this.git2 = darken$1(this.git2, 25); + this.git3 = darken$1(this.git3, 25); + this.git4 = darken$1(this.git4, 25); + this.git5 = darken$1(this.git5, 25); + this.git6 = darken$1(this.git6, 25); + this.git7 = darken$1(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor); + this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor; + this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor; + this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$4 = (userOverrides) => { + const theme2 = new Theme$4(); + theme2.calculate(userOverrides); + return theme2; +}; +let Theme$3 = class Theme2 { + constructor() { + this.background = "#333"; + this.primaryColor = "#1f2020"; + this.secondaryColor = lighten$1(this.primaryColor, 16); + this.tertiaryColor = adjust$1(this.primaryColor, { h: -160 }); + this.primaryBorderColor = invert$1(this.background); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.tertiaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.mainBkg = "#1f2020"; + this.secondBkg = "calculated"; + this.mainContrastColor = "lightgrey"; + this.darkTextColor = lighten$1(invert$1("#323D47"), 10); + this.lineColor = "calculated"; + this.border1 = "#81B1DB"; + this.border2 = rgba$1(255, 255, 255, 0.25); + this.arrowheadColor = "calculated"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.labelBackground = "#181818"; + this.textColor = "#ccc"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "#F9FFFE"; + this.edgeLabelBackground = "calculated"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "calculated"; + this.actorLineColor = "calculated"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "calculated"; + this.activationBkgColor = "calculated"; + this.sequenceNumberColor = "black"; + this.sectionBkgColor = darken$1("#EAE8D9", 30); + this.altSectionBkgColor = "calculated"; + this.sectionBkgColor2 = "#EAE8D9"; + this.excludeBkgColor = darken$1(this.sectionBkgColor, 10); + this.taskBorderColor = rgba$1(255, 255, 255, 70); + this.taskBkgColor = "calculated"; + this.taskTextColor = "calculated"; + this.taskTextLightColor = "calculated"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = rgba$1(255, 255, 255, 50); + this.activeTaskBkgColor = "#81B1DB"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#E83737"; + this.critBkgColor = "#E83737"; + this.taskTextDarkColor = "calculated"; + this.todayLineColor = "#DB5757"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "calculated"; + this.errorBkgColor = "#a44141"; + this.errorTextColor = "#ddd"; + } + updateColors() { + this.secondBkg = lighten$1(this.mainBkg, 16); + this.lineColor = this.mainContrastColor; + this.arrowheadColor = this.mainContrastColor; + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.edgeLabelBackground = lighten$1(this.labelBackground, 25); + this.actorBorder = this.border1; + this.actorBkg = this.mainBkg; + this.actorTextColor = this.mainContrastColor; + this.actorLineColor = this.mainContrastColor; + this.signalColor = this.mainContrastColor; + this.signalTextColor = this.mainContrastColor; + this.labelBoxBkgColor = this.actorBkg; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.mainContrastColor; + this.loopTextColor = this.mainContrastColor; + this.noteBorderColor = this.secondaryBorderColor; + this.noteBkgColor = this.secondBkg; + this.noteTextColor = this.secondaryTextColor; + this.activationBorderColor = this.border1; + this.activationBkgColor = this.secondBkg; + this.altSectionBkgColor = this.background; + this.taskBkgColor = lighten$1(this.mainBkg, 23); + this.taskTextColor = this.darkTextColor; + this.taskTextLightColor = this.mainContrastColor; + this.taskTextOutsideColor = this.taskTextLightColor; + this.gridColor = this.mainContrastColor; + this.doneTaskBkgColor = this.mainContrastColor; + this.taskTextDarkColor = this.darkTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#555"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = "#f4f4f4"; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$1(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$1(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$1(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$1(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$1(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$1(this.secondaryColor, { h: 128 }); + this.cScale1 = this.cScale1 || "#0b0000"; + this.cScale2 = this.cScale2 || "#4d1037"; + this.cScale3 = this.cScale3 || "#3f5258"; + this.cScale4 = this.cScale4 || "#4f2f1b"; + this.cScale5 = this.cScale5 || "#6e0a0a"; + this.cScale6 = this.cScale6 || "#3b0048"; + this.cScale7 = this.cScale7 || "#995a01"; + this.cScale8 = this.cScale8 || "#154706"; + this.cScale9 = this.cScale9 || "#161722"; + this.cScale10 = this.cScale10 || "#00296f"; + this.cScale11 = this.cScale11 || "#01629c"; + this.cScale12 = this.cScale12 || "#010029"; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$1(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$1(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$1(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$1(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$1(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$1(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust$1(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$1(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$1(this.primaryColor, { h: 330 }); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || invert$1(this["cScale" + i]); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScalePeer" + i] = this["cScalePeer" + i] || lighten$1(this["cScale" + i], 10); + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust$1(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust$1(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) }); + } + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["pie" + i] = this["cScale" + i]; + } + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$1(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$1(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$1(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$1(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$1(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$1(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.classText = this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken$1(this.secondaryColor, 30) : this.secondaryColor); + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = lighten$1(this.secondaryColor, 20); + this.git1 = lighten$1(this.pie2 || this.secondaryColor, 20); + this.git2 = lighten$1(this.pie3 || this.tertiaryColor, 20); + this.git3 = lighten$1(this.pie4 || adjust$1(this.primaryColor, { h: -30 }), 20); + this.git4 = lighten$1(this.pie5 || adjust$1(this.primaryColor, { h: -60 }), 20); + this.git5 = lighten$1(this.pie6 || adjust$1(this.primaryColor, { h: -90 }), 10); + this.git6 = lighten$1(this.pie7 || adjust$1(this.primaryColor, { h: 60 }), 10); + this.git7 = lighten$1(this.pie8 || adjust$1(this.primaryColor, { h: 120 }), 20); + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert$1(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert$1(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || lighten$1(this.background, 12); + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || lighten$1(this.background, 2); + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$3 = (userOverrides) => { + const theme2 = new Theme$3(); + theme2.calculate(userOverrides); + return theme2; +}; +let Theme$2 = class Theme3 { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#ECECFF"; + this.secondaryColor = adjust$1(this.primaryColor, { h: 120 }); + this.secondaryColor = "#ffffde"; + this.tertiaryColor = adjust$1(this.primaryColor, { h: -160 }); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.tertiaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.background = "white"; + this.mainBkg = "#ECECFF"; + this.secondBkg = "#ffffde"; + this.lineColor = "#333333"; + this.border1 = "#9370DB"; + this.border2 = "#aaaa33"; + this.arrowheadColor = "#333333"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.labelBackground = "#e8e8e8"; + this.textColor = "#333"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "calculated"; + this.edgeLabelBackground = "calculated"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "black"; + this.actorLineColor = "grey"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "calculated"; + this.altSectionBkgColor = "calculated"; + this.sectionBkgColor2 = "calculated"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "calculated"; + this.taskTextLightColor = "calculated"; + this.taskTextColor = this.taskTextLightColor; + this.taskTextDarkColor = "calculated"; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.taskTextClickableColor = "calculated"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "calculated"; + this.critBorderColor = "calculated"; + this.critBkgColor = "calculated"; + this.todayLineColor = "calculated"; + this.sectionBkgColor = rgba$1(102, 102, 255, 0.49); + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "#fff400"; + this.taskBorderColor = "#534fbc"; + this.taskBkgColor = "#8a90dd"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "black"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "#534fbc"; + this.activeTaskBkgColor = "#bfc7ff"; + this.gridColor = "lightgrey"; + this.doneTaskBkgColor = "lightgrey"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#ff8888"; + this.critBkgColor = "red"; + this.todayLineColor = "red"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + this.updateColors(); + } + updateColors() { + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$1(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$1(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$1(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$1(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$1(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$1(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust$1(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$1(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$1(this.primaryColor, { h: 330 }); + this["cScalePeer1"] = this["cScalePeer1"] || darken$1(this.secondaryColor, 45); + this["cScalePeer2"] = this["cScalePeer2"] || darken$1(this.tertiaryColor, 40); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken$1(this["cScale" + i], 10); + this["cScalePeer" + i] = this["cScalePeer" + i] || darken$1(this["cScale" + i], 25); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || adjust$1(this["cScale" + i], { h: 180 }); + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust$1(this.mainBkg, { h: 30, l: -(5 + i * 5) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust$1(this.mainBkg, { h: 30, l: -(7 + i * 5) }); + } + this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; + if (this.labelTextColor !== "calculated") { + this.cScaleLabel0 = this.cScaleLabel0 || invert$1(this.labelTextColor); + this.cScaleLabel3 = this.cScaleLabel3 || invert$1(this.labelTextColor); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.labelTextColor; + } + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.titleColor = this.textColor; + this.edgeLabelBackground = this.labelBackground; + this.actorBorder = lighten$1(this.border1, 23); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.signalColor = this.textColor; + this.signalTextColor = this.textColor; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f0f0f0"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.nodeBorder; + this.specialStateColor = this.lineColor; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$1(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$1(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$1(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$1(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$1(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$1(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || adjust$1(this.tertiaryColor, { l: -40 }); + this.pie4 = this.pie4 || adjust$1(this.primaryColor, { l: -10 }); + this.pie5 = this.pie5 || adjust$1(this.secondaryColor, { l: -30 }); + this.pie6 = this.pie6 || adjust$1(this.tertiaryColor, { l: -20 }); + this.pie7 = this.pie7 || adjust$1(this.primaryColor, { h: 60, l: -20 }); + this.pie8 = this.pie8 || adjust$1(this.primaryColor, { h: -60, l: -40 }); + this.pie9 = this.pie9 || adjust$1(this.primaryColor, { h: 120, l: -40 }); + this.pie10 = this.pie10 || adjust$1(this.primaryColor, { h: 60, l: -40 }); + this.pie11 = this.pie11 || adjust$1(this.primaryColor, { h: -90, l: -40 }); + this.pie12 = this.pie12 || adjust$1(this.primaryColor, { h: 120, l: -30 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$1(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$1(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$1(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$1(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$1(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$1(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.labelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust$1(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust$1(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust$1(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust$1(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust$1(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten$1(this.git0, 25); + this.git1 = lighten$1(this.git1, 25); + this.git2 = lighten$1(this.git2, 25); + this.git3 = lighten$1(this.git3, 25); + this.git4 = lighten$1(this.git4, 25); + this.git5 = lighten$1(this.git5, 25); + this.git6 = lighten$1(this.git6, 25); + this.git7 = lighten$1(this.git7, 25); + } else { + this.git0 = darken$1(this.git0, 25); + this.git1 = darken$1(this.git1, 25); + this.git2 = darken$1(this.git2, 25); + this.git3 = darken$1(this.git3, 25); + this.git4 = darken$1(this.git4, 25); + this.git5 = darken$1(this.git5, 25); + this.git6 = darken$1(this.git6, 25); + this.git7 = darken$1(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || darken$1(invert$1(this.git0), 25); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert$1(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert$1(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$2 = (userOverrides) => { + const theme2 = new Theme$2(); + theme2.calculate(userOverrides); + return theme2; +}; +let Theme$1 = class Theme4 { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#cde498"; + this.secondaryColor = "#cdffb2"; + this.background = "white"; + this.mainBkg = "#cde498"; + this.secondBkg = "#cdffb2"; + this.lineColor = "green"; + this.border1 = "#13540c"; + this.border2 = "#6eaa49"; + this.arrowheadColor = "green"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.tertiaryColor = lighten$1("#cde498", 10); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.primaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "#333"; + this.edgeLabelBackground = "#e8e8e8"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "black"; + this.actorLineColor = "grey"; + this.signalColor = "#333"; + this.signalTextColor = "#333"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "#326932"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "#6eaa49"; + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "#6eaa49"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "#487e3a"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "black"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "lightgrey"; + this.doneTaskBkgColor = "lightgrey"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#ff8888"; + this.critBkgColor = "red"; + this.todayLineColor = "red"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + } + updateColors() { + this.actorBorder = darken$1(this.mainBkg, 20); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$1(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$1(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$1(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$1(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$1(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$1(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust$1(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$1(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$1(this.primaryColor, { h: 330 }); + this["cScalePeer1"] = this["cScalePeer1"] || darken$1(this.secondaryColor, 45); + this["cScalePeer2"] = this["cScalePeer2"] || darken$1(this.tertiaryColor, 40); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScale" + i] = darken$1(this["cScale" + i], 10); + this["cScalePeer" + i] = this["cScalePeer" + i] || darken$1(this["cScale" + i], 25); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || adjust$1(this["cScale" + i], { h: 180 }); + } + this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust$1(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust$1(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) }); + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.taskBorderColor = this.border1; + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.activeTaskBorderColor = this.taskBorderColor; + this.activeTaskBkgColor = this.mainBkg; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f0f0f0"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = this.lineColor; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$1(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$1(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$1(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$1(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$1(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$1(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || this.tertiaryColor; + this.pie4 = this.pie4 || adjust$1(this.primaryColor, { l: -30 }); + this.pie5 = this.pie5 || adjust$1(this.secondaryColor, { l: -30 }); + this.pie6 = this.pie6 || adjust$1(this.tertiaryColor, { h: 40, l: -40 }); + this.pie7 = this.pie7 || adjust$1(this.primaryColor, { h: 60, l: -10 }); + this.pie8 = this.pie8 || adjust$1(this.primaryColor, { h: -60, l: -10 }); + this.pie9 = this.pie9 || adjust$1(this.primaryColor, { h: 120, l: 0 }); + this.pie10 = this.pie10 || adjust$1(this.primaryColor, { h: 60, l: -50 }); + this.pie11 = this.pie11 || adjust$1(this.primaryColor, { h: -60, l: -50 }); + this.pie12 = this.pie12 || adjust$1(this.primaryColor, { h: 120, l: -50 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$1(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$1(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$1(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$1(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$1(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$1(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust$1(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust$1(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust$1(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust$1(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust$1(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten$1(this.git0, 25); + this.git1 = lighten$1(this.git1, 25); + this.git2 = lighten$1(this.git2, 25); + this.git3 = lighten$1(this.git3, 25); + this.git4 = lighten$1(this.git4, 25); + this.git5 = lighten$1(this.git5, 25); + this.git6 = lighten$1(this.git6, 25); + this.git7 = lighten$1(this.git7, 25); + } else { + this.git0 = darken$1(this.git0, 25); + this.git1 = darken$1(this.git1, 25); + this.git2 = darken$1(this.git2, 25); + this.git3 = darken$1(this.git3, 25); + this.git4 = darken$1(this.git4, 25); + this.git5 = darken$1(this.git5, 25); + this.git6 = darken$1(this.git6, 25); + this.git7 = darken$1(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert$1(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert$1(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +}; +const getThemeVariables$1 = (userOverrides) => { + const theme2 = new Theme$1(); + theme2.calculate(userOverrides); + return theme2; +}; +class Theme5 { + constructor() { + this.primaryColor = "#eee"; + this.contrast = "#707070"; + this.secondaryColor = lighten$1(this.contrast, 55); + this.background = "#ffffff"; + this.tertiaryColor = adjust$1(this.primaryColor, { h: -160 }); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.tertiaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.mainBkg = "#eee"; + this.secondBkg = "calculated"; + this.lineColor = "#666"; + this.border1 = "#999"; + this.border2 = "calculated"; + this.note = "#ffa"; + this.text = "#333"; + this.critical = "#d42"; + this.done = "#bbb"; + this.arrowheadColor = "#333333"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "calculated"; + this.edgeLabelBackground = "white"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "calculated"; + this.actorLineColor = "calculated"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "calculated"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "calculated"; + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "calculated"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "calculated"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "calculated"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "calculated"; + this.critBkgColor = "calculated"; + this.critBorderColor = "calculated"; + this.todayLineColor = "calculated"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + } + updateColors() { + this.secondBkg = lighten$1(this.contrast, 55); + this.border2 = this.contrast; + this.actorBorder = lighten$1(this.border1, 23); + this.actorBkg = this.mainBkg; + this.actorTextColor = this.text; + this.actorLineColor = this.lineColor; + this.signalColor = this.text; + this.signalTextColor = this.text; + this.labelBoxBkgColor = this.actorBkg; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.text; + this.loopTextColor = this.text; + this.noteBorderColor = "#999"; + this.noteBkgColor = "#666"; + this.noteTextColor = "#fff"; + this.cScale0 = this.cScale0 || "#555"; + this.cScale1 = this.cScale1 || "#F4F4F4"; + this.cScale2 = this.cScale2 || "#555"; + this.cScale3 = this.cScale3 || "#BBB"; + this.cScale4 = this.cScale4 || "#777"; + this.cScale5 = this.cScale5 || "#999"; + this.cScale6 = this.cScale6 || "#DDD"; + this.cScale7 = this.cScale7 || "#FFF"; + this.cScale8 = this.cScale8 || "#DDD"; + this.cScale9 = this.cScale9 || "#BBB"; + this.cScale10 = this.cScale10 || "#999"; + this.cScale11 = this.cScale11 || "#777"; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleInv" + i] = this["cScaleInv" + i] || invert$1(this["cScale" + i]); + } + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + if (this.darkMode) { + this["cScalePeer" + i] = this["cScalePeer" + i] || lighten$1(this["cScale" + i], 10); + } else { + this["cScalePeer" + i] = this["cScalePeer" + i] || darken$1(this["cScale" + i], 10); + } + } + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); + this["cScaleLabel0"] = this["cScaleLabel0"] || this.cScale1; + this["cScaleLabel2"] = this["cScaleLabel2"] || this.cScale1; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + } + for (let i = 0; i < 5; i++) { + this["surface" + i] = this["surface" + i] || adjust$1(this.mainBkg, { l: -(5 + i * 5) }); + this["surfacePeer" + i] = this["surfacePeer" + i] || adjust$1(this.mainBkg, { l: -(8 + i * 5) }); + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.titleColor = this.text; + this.sectionBkgColor = lighten$1(this.contrast, 30); + this.sectionBkgColor2 = lighten$1(this.contrast, 30); + this.taskBorderColor = darken$1(this.contrast, 10); + this.taskBkgColor = this.contrast; + this.taskTextColor = this.taskTextLightColor; + this.taskTextDarkColor = this.text; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.activeTaskBorderColor = this.taskBorderColor; + this.activeTaskBkgColor = this.mainBkg; + this.gridColor = lighten$1(this.border1, 30); + this.doneTaskBkgColor = this.done; + this.doneTaskBorderColor = this.lineColor; + this.critBkgColor = this.critical; + this.critBorderColor = darken$1(this.critBkgColor, 10); + this.todayLineColor = this.critBkgColor; + this.transitionColor = this.transitionColor || "#000"; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f4f4f4"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.stateBorder = this.stateBorder || "#000"; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = "#222"; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$1(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$1(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$1(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$1(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$1(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$1(this.secondaryColor, { h: 128 }); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) { + this["pie" + i] = this["cScale" + i]; + } + this.pie12 = this.pie0; + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$1(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$1(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$1(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$1(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$1(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$1(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = darken$1(this.pie1, 25) || this.primaryColor; + this.git1 = this.pie2 || this.secondaryColor; + this.git2 = this.pie3 || this.tertiaryColor; + this.git3 = this.pie4 || adjust$1(this.primaryColor, { h: -30 }); + this.git4 = this.pie5 || adjust$1(this.primaryColor, { h: -60 }); + this.git5 = this.pie6 || adjust$1(this.primaryColor, { h: -90 }); + this.git6 = this.pie7 || adjust$1(this.primaryColor, { h: 60 }); + this.git7 = this.pie8 || adjust$1(this.primaryColor, { h: 120 }); + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.branchLabelColor = this.branchLabelColor || this.labelTextColor; + this.gitBranchLabel0 = this.branchLabelColor; + this.gitBranchLabel1 = "white"; + this.gitBranchLabel2 = this.branchLabelColor; + this.gitBranchLabel3 = "white"; + this.gitBranchLabel4 = this.branchLabelColor; + this.gitBranchLabel5 = this.branchLabelColor; + this.gitBranchLabel6 = this.branchLabelColor; + this.gitBranchLabel7 = this.branchLabelColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys = Object.keys(overrides); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys.forEach((k) => { + this[k] = overrides[k]; + }); + } +} +const getThemeVariables = (userOverrides) => { + const theme2 = new Theme5(); + theme2.calculate(userOverrides); + return theme2; +}; +const theme = { + base: { + getThemeVariables: getThemeVariables$4 + }, + dark: { + getThemeVariables: getThemeVariables$3 + }, + default: { + getThemeVariables: getThemeVariables$2 + }, + forest: { + getThemeVariables: getThemeVariables$1 + }, + neutral: { + getThemeVariables + } +}; +const defaultConfigJson = { + "flowchart": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 8, + "htmlLabels": true, + "nodeSpacing": 50, + "rankSpacing": 50, + "curve": "basis", + "padding": 15, + "defaultRenderer": "dagre-wrapper", + "wrappingWidth": 200 + }, + "sequence": { + "useMaxWidth": true, + "hideUnusedParticipants": false, + "activationWidth": 10, + "diagramMarginX": 50, + "diagramMarginY": 10, + "actorMargin": 50, + "width": 150, + "height": 65, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "mirrorActors": true, + "forceMenus": false, + "bottomMarginAdj": 1, + "rightAngles": false, + "showSequenceNumbers": false, + "actorFontSize": 14, + "actorFontFamily": '"Open Sans", sans-serif', + "actorFontWeight": 400, + "noteFontSize": 14, + "noteFontFamily": '"trebuchet ms", verdana, arial, sans-serif', + "noteFontWeight": 400, + "noteAlign": "center", + "messageFontSize": 16, + "messageFontFamily": '"trebuchet ms", verdana, arial, sans-serif', + "messageFontWeight": 400, + "wrap": false, + "wrapPadding": 10, + "labelBoxWidth": 50, + "labelBoxHeight": 20 + }, + "gantt": { + "useMaxWidth": true, + "titleTopMargin": 25, + "barHeight": 20, + "barGap": 4, + "topPadding": 50, + "rightPadding": 75, + "leftPadding": 75, + "gridLineStartPadding": 35, + "fontSize": 11, + "sectionFontSize": 11, + "numberSectionStyles": 4, + "axisFormat": "%Y-%m-%d", + "topAxis": false, + "displayMode": "", + "weekday": "sunday" + }, + "journey": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "leftMargin": 150, + "width": 150, + "height": 50, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "bottomMarginAdj": 1, + "rightAngles": false, + "taskFontSize": 14, + "taskFontFamily": '"Open Sans", sans-serif', + "taskMargin": 50, + "activationWidth": 10, + "textPlacement": "fo", + "actorColours": [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + "sectionFills": [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + "sectionColours": [ + "#fff" + ] + }, + "class": { + "useMaxWidth": true, + "titleTopMargin": 25, + "arrowMarkerAbsolute": false, + "dividerMargin": 10, + "padding": 5, + "textHeight": 10, + "defaultRenderer": "dagre-wrapper", + "htmlLabels": false + }, + "state": { + "useMaxWidth": true, + "titleTopMargin": 25, + "dividerMargin": 10, + "sizeUnit": 5, + "padding": 8, + "textHeight": 10, + "titleShift": -15, + "noteMargin": 10, + "forkWidth": 70, + "forkHeight": 7, + "miniPadding": 2, + "fontSizeFactor": 5.02, + "fontSize": 24, + "labelHeight": 16, + "edgeLengthFactor": "20", + "compositTitleSize": 35, + "radius": 5, + "defaultRenderer": "dagre-wrapper" + }, + "er": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 20, + "layoutDirection": "TB", + "minEntityWidth": 100, + "minEntityHeight": 75, + "entityPadding": 15, + "stroke": "gray", + "fill": "honeydew", + "fontSize": 12 + }, + "pie": { + "useMaxWidth": true, + "textPosition": 0.75 + }, + "quadrantChart": { + "useMaxWidth": true, + "chartWidth": 500, + "chartHeight": 500, + "titleFontSize": 20, + "titlePadding": 10, + "quadrantPadding": 5, + "xAxisLabelPadding": 5, + "yAxisLabelPadding": 5, + "xAxisLabelFontSize": 16, + "yAxisLabelFontSize": 16, + "quadrantLabelFontSize": 16, + "quadrantTextTopPadding": 5, + "pointTextPadding": 5, + "pointLabelFontSize": 12, + "pointRadius": 5, + "xAxisPosition": "top", + "yAxisPosition": "left", + "quadrantInternalBorderStrokeWidth": 1, + "quadrantExternalBorderStrokeWidth": 2 + }, + "requirement": { + "useMaxWidth": true, + "rect_fill": "#f9f9f9", + "text_color": "#333", + "rect_border_size": "0.5px", + "rect_border_color": "#bbb", + "rect_min_width": 200, + "rect_min_height": 200, + "fontSize": 14, + "rect_padding": 10, + "line_height": 20 + }, + "mindmap": { + "useMaxWidth": true, + "padding": 10, + "maxNodeWidth": 200 + }, + "timeline": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "leftMargin": 150, + "width": 150, + "height": 50, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "bottomMarginAdj": 1, + "rightAngles": false, + "taskFontSize": 14, + "taskFontFamily": '"Open Sans", sans-serif', + "taskMargin": 50, + "activationWidth": 10, + "textPlacement": "fo", + "actorColours": [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + "sectionFills": [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + "sectionColours": [ + "#fff" + ], + "disableMulticolor": false + }, + "gitGraph": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 8, + "nodeLabel": { + "width": 75, + "height": 100, + "x": -25, + "y": 0 + }, + "mainBranchName": "main", + "mainBranchOrder": 0, + "showCommitLabel": true, + "showBranches": true, + "rotateCommitLabel": true, + "arrowMarkerAbsolute": false + }, + "c4": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "c4ShapeMargin": 50, + "c4ShapePadding": 20, + "width": 216, + "height": 60, + "boxMargin": 10, + "c4ShapeInRow": 4, + "nextLinePaddingX": 0, + "c4BoundaryInRow": 2, + "personFontSize": 14, + "personFontFamily": '"Open Sans", sans-serif', + "personFontWeight": "normal", + "external_personFontSize": 14, + "external_personFontFamily": '"Open Sans", sans-serif', + "external_personFontWeight": "normal", + "systemFontSize": 14, + "systemFontFamily": '"Open Sans", sans-serif', + "systemFontWeight": "normal", + "external_systemFontSize": 14, + "external_systemFontFamily": '"Open Sans", sans-serif', + "external_systemFontWeight": "normal", + "system_dbFontSize": 14, + "system_dbFontFamily": '"Open Sans", sans-serif', + "system_dbFontWeight": "normal", + "external_system_dbFontSize": 14, + "external_system_dbFontFamily": '"Open Sans", sans-serif', + "external_system_dbFontWeight": "normal", + "system_queueFontSize": 14, + "system_queueFontFamily": '"Open Sans", sans-serif', + "system_queueFontWeight": "normal", + "external_system_queueFontSize": 14, + "external_system_queueFontFamily": '"Open Sans", sans-serif', + "external_system_queueFontWeight": "normal", + "boundaryFontSize": 14, + "boundaryFontFamily": '"Open Sans", sans-serif', + "boundaryFontWeight": "normal", + "messageFontSize": 12, + "messageFontFamily": '"Open Sans", sans-serif', + "messageFontWeight": "normal", + "containerFontSize": 14, + "containerFontFamily": '"Open Sans", sans-serif', + "containerFontWeight": "normal", + "external_containerFontSize": 14, + "external_containerFontFamily": '"Open Sans", sans-serif', + "external_containerFontWeight": "normal", + "container_dbFontSize": 14, + "container_dbFontFamily": '"Open Sans", sans-serif', + "container_dbFontWeight": "normal", + "external_container_dbFontSize": 14, + "external_container_dbFontFamily": '"Open Sans", sans-serif', + "external_container_dbFontWeight": "normal", + "container_queueFontSize": 14, + "container_queueFontFamily": '"Open Sans", sans-serif', + "container_queueFontWeight": "normal", + "external_container_queueFontSize": 14, + "external_container_queueFontFamily": '"Open Sans", sans-serif', + "external_container_queueFontWeight": "normal", + "componentFontSize": 14, + "componentFontFamily": '"Open Sans", sans-serif', + "componentFontWeight": "normal", + "external_componentFontSize": 14, + "external_componentFontFamily": '"Open Sans", sans-serif', + "external_componentFontWeight": "normal", + "component_dbFontSize": 14, + "component_dbFontFamily": '"Open Sans", sans-serif', + "component_dbFontWeight": "normal", + "external_component_dbFontSize": 14, + "external_component_dbFontFamily": '"Open Sans", sans-serif', + "external_component_dbFontWeight": "normal", + "component_queueFontSize": 14, + "component_queueFontFamily": '"Open Sans", sans-serif', + "component_queueFontWeight": "normal", + "external_component_queueFontSize": 14, + "external_component_queueFontFamily": '"Open Sans", sans-serif', + "external_component_queueFontWeight": "normal", + "wrap": true, + "wrapPadding": 10, + "person_bg_color": "#08427B", + "person_border_color": "#073B6F", + "external_person_bg_color": "#686868", + "external_person_border_color": "#8A8A8A", + "system_bg_color": "#1168BD", + "system_border_color": "#3C7FC0", + "system_db_bg_color": "#1168BD", + "system_db_border_color": "#3C7FC0", + "system_queue_bg_color": "#1168BD", + "system_queue_border_color": "#3C7FC0", + "external_system_bg_color": "#999999", + "external_system_border_color": "#8A8A8A", + "external_system_db_bg_color": "#999999", + "external_system_db_border_color": "#8A8A8A", + "external_system_queue_bg_color": "#999999", + "external_system_queue_border_color": "#8A8A8A", + "container_bg_color": "#438DD5", + "container_border_color": "#3C7FC0", + "container_db_bg_color": "#438DD5", + "container_db_border_color": "#3C7FC0", + "container_queue_bg_color": "#438DD5", + "container_queue_border_color": "#3C7FC0", + "external_container_bg_color": "#B3B3B3", + "external_container_border_color": "#A6A6A6", + "external_container_db_bg_color": "#B3B3B3", + "external_container_db_border_color": "#A6A6A6", + "external_container_queue_bg_color": "#B3B3B3", + "external_container_queue_border_color": "#A6A6A6", + "component_bg_color": "#85BBF0", + "component_border_color": "#78A8D8", + "component_db_bg_color": "#85BBF0", + "component_db_border_color": "#78A8D8", + "component_queue_bg_color": "#85BBF0", + "component_queue_border_color": "#78A8D8", + "external_component_bg_color": "#CCCCCC", + "external_component_border_color": "#BFBFBF", + "external_component_db_bg_color": "#CCCCCC", + "external_component_db_border_color": "#BFBFBF", + "external_component_queue_bg_color": "#CCCCCC", + "external_component_queue_border_color": "#BFBFBF" + }, + "sankey": { + "useMaxWidth": true, + "width": 600, + "height": 400, + "linkColor": "gradient", + "nodeAlignment": "justify", + "showValues": true, + "prefix": "", + "suffix": "" + }, + "theme": "default", + "maxTextSize": 5e4, + "darkMode": false, + "fontFamily": '"trebuchet ms", verdana, arial, sans-serif;', + "logLevel": 5, + "securityLevel": "strict", + "startOnLoad": true, + "arrowMarkerAbsolute": false, + "secure": [ + "secure", + "securityLevel", + "startOnLoad", + "maxTextSize" + ], + "deterministicIds": false, + "fontSize": 16 +}; +const config = { + ...defaultConfigJson, + // Set, even though they're `undefined` so that `configKeys` finds these keys + // TODO: Should we replace these with `null` so that they can go in the JSON Schema? + deterministicIDSeed: void 0, + themeCSS: void 0, + // add non-JSON default config values + themeVariables: theme["default"].getThemeVariables(), + sequence: { + ...defaultConfigJson.sequence, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + }, + noteFont: function() { + return { + fontFamily: this.noteFontFamily, + fontSize: this.noteFontSize, + fontWeight: this.noteFontWeight + }; + }, + actorFont: function() { + return { + fontFamily: this.actorFontFamily, + fontSize: this.actorFontSize, + fontWeight: this.actorFontWeight + }; + } + }, + gantt: { + ...defaultConfigJson.gantt, + tickInterval: void 0, + useWidth: void 0 + // can probably be removed since `configKeys` already includes this + }, + c4: { + ...defaultConfigJson.c4, + useWidth: void 0, + personFont: function() { + return { + fontFamily: this.personFontFamily, + fontSize: this.personFontSize, + fontWeight: this.personFontWeight + }; + }, + external_personFont: function() { + return { + fontFamily: this.external_personFontFamily, + fontSize: this.external_personFontSize, + fontWeight: this.external_personFontWeight + }; + }, + systemFont: function() { + return { + fontFamily: this.systemFontFamily, + fontSize: this.systemFontSize, + fontWeight: this.systemFontWeight + }; + }, + external_systemFont: function() { + return { + fontFamily: this.external_systemFontFamily, + fontSize: this.external_systemFontSize, + fontWeight: this.external_systemFontWeight + }; + }, + system_dbFont: function() { + return { + fontFamily: this.system_dbFontFamily, + fontSize: this.system_dbFontSize, + fontWeight: this.system_dbFontWeight + }; + }, + external_system_dbFont: function() { + return { + fontFamily: this.external_system_dbFontFamily, + fontSize: this.external_system_dbFontSize, + fontWeight: this.external_system_dbFontWeight + }; + }, + system_queueFont: function() { + return { + fontFamily: this.system_queueFontFamily, + fontSize: this.system_queueFontSize, + fontWeight: this.system_queueFontWeight + }; + }, + external_system_queueFont: function() { + return { + fontFamily: this.external_system_queueFontFamily, + fontSize: this.external_system_queueFontSize, + fontWeight: this.external_system_queueFontWeight + }; + }, + containerFont: function() { + return { + fontFamily: this.containerFontFamily, + fontSize: this.containerFontSize, + fontWeight: this.containerFontWeight + }; + }, + external_containerFont: function() { + return { + fontFamily: this.external_containerFontFamily, + fontSize: this.external_containerFontSize, + fontWeight: this.external_containerFontWeight + }; + }, + container_dbFont: function() { + return { + fontFamily: this.container_dbFontFamily, + fontSize: this.container_dbFontSize, + fontWeight: this.container_dbFontWeight + }; + }, + external_container_dbFont: function() { + return { + fontFamily: this.external_container_dbFontFamily, + fontSize: this.external_container_dbFontSize, + fontWeight: this.external_container_dbFontWeight + }; + }, + container_queueFont: function() { + return { + fontFamily: this.container_queueFontFamily, + fontSize: this.container_queueFontSize, + fontWeight: this.container_queueFontWeight + }; + }, + external_container_queueFont: function() { + return { + fontFamily: this.external_container_queueFontFamily, + fontSize: this.external_container_queueFontSize, + fontWeight: this.external_container_queueFontWeight + }; + }, + componentFont: function() { + return { + fontFamily: this.componentFontFamily, + fontSize: this.componentFontSize, + fontWeight: this.componentFontWeight + }; + }, + external_componentFont: function() { + return { + fontFamily: this.external_componentFontFamily, + fontSize: this.external_componentFontSize, + fontWeight: this.external_componentFontWeight + }; + }, + component_dbFont: function() { + return { + fontFamily: this.component_dbFontFamily, + fontSize: this.component_dbFontSize, + fontWeight: this.component_dbFontWeight + }; + }, + external_component_dbFont: function() { + return { + fontFamily: this.external_component_dbFontFamily, + fontSize: this.external_component_dbFontSize, + fontWeight: this.external_component_dbFontWeight + }; + }, + component_queueFont: function() { + return { + fontFamily: this.component_queueFontFamily, + fontSize: this.component_queueFontSize, + fontWeight: this.component_queueFontWeight + }; + }, + external_component_queueFont: function() { + return { + fontFamily: this.external_component_queueFontFamily, + fontSize: this.external_component_queueFontSize, + fontWeight: this.external_component_queueFontWeight + }; + }, + boundaryFont: function() { + return { + fontFamily: this.boundaryFontFamily, + fontSize: this.boundaryFontSize, + fontWeight: this.boundaryFontWeight + }; + }, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + } + }, + pie: { + ...defaultConfigJson.pie, + useWidth: 984 + }, + requirement: { + ...defaultConfigJson.requirement, + useWidth: void 0 + }, + gitGraph: { + ...defaultConfigJson.gitGraph, + // TODO: This is a temporary override for `gitGraph`, since every other + // diagram does have `useMaxWidth`, but instead sets it to `true`. + // Should we set this to `true` instead? + useMaxWidth: false + }, + sankey: { + ...defaultConfigJson.sankey, + // this is false, unlike every other diagram (other than gitGraph) + // TODO: can we make this default to `true` instead? + useMaxWidth: false + } +}; +const keyify = (obj, prefix = "") => Object.keys(obj).reduce((res, el) => { + if (Array.isArray(obj[el])) { + return res; + } else if (typeof obj[el] === "object" && obj[el] !== null) { + return [...res, prefix + el, ...keyify(obj[el], "")]; + } + return [...res, prefix + el]; +}, []); +const configKeys = new Set(keyify(config, "")); +const defaultConfig$1 = config; +const sanitizeDirective = (args) => { + log$1.debug("sanitizeDirective called with", args); + if (typeof args !== "object" || args == null) { + return; + } + if (Array.isArray(args)) { + args.forEach((arg) => sanitizeDirective(arg)); + return; + } + for (const key of Object.keys(args)) { + log$1.debug("Checking key", key); + if (key.startsWith("__") || key.includes("proto") || key.includes("constr") || !configKeys.has(key) || args[key] == null) { + log$1.debug("sanitize deleting key: ", key); + delete args[key]; + continue; + } + if (typeof args[key] === "object") { + log$1.debug("sanitizing object", key); + sanitizeDirective(args[key]); + continue; + } + const cssMatchers = ["themeCSS", "fontFamily", "altFontFamily"]; + for (const cssKey of cssMatchers) { + if (key.includes(cssKey)) { + log$1.debug("sanitizing css option", key); + args[key] = sanitizeCss(args[key]); + } + } + } + if (args.themeVariables) { + for (const k of Object.keys(args.themeVariables)) { + const val = args.themeVariables[k]; + if ((val == null ? void 0 : val.match) && !val.match(/^[\d "#%(),.;A-Za-z]+$/)) { + args.themeVariables[k] = ""; + } + } + } + log$1.debug("After sanitization", args); +}; +const sanitizeCss = (str2) => { + let startCnt = 0; + let endCnt = 0; + for (const element of str2) { + if (startCnt < endCnt) { + return "{ /* ERROR: Unbalanced CSS */ }"; + } + if (element === "{") { + startCnt++; + } else if (element === "}") { + endCnt++; + } + } + if (startCnt !== endCnt) { + return "{ /* ERROR: Unbalanced CSS */ }"; + } + return str2; +}; +const frontMatterRegex = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s; +const directiveRegex = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; +const anyCommentRegex = /\s*%%.*\n/gm; +class UnknownDiagramError extends Error { + constructor(message) { + super(message); + this.name = "UnknownDiagramError"; + } +} +const detectors = {}; +const detectType = function(text2, config2) { + text2 = text2.replace(frontMatterRegex, "").replace(directiveRegex, "").replace(anyCommentRegex, "\n"); + for (const [key, { detector: detector2 }] of Object.entries(detectors)) { + const diagram2 = detector2(text2, config2); + if (diagram2) { + return key; + } + } + throw new UnknownDiagramError( + `No diagram type detected matching given configuration for text: ${text2}` + ); +}; +const registerLazyLoadedDiagrams = (...diagrams2) => { + for (const { id: id2, detector: detector2, loader: loader2 } of diagrams2) { + addDetector(id2, detector2, loader2); + } +}; +const addDetector = (key, detector2, loader2) => { + if (detectors[key]) { + log$1.error(`Detector with key ${key} already exists`); + } else { + detectors[key] = { detector: detector2, loader: loader2 }; + } + log$1.debug(`Detector with key ${key} added${loader2 ? " with loader" : ""}`); +}; +const getDiagramLoader = (key) => { + return detectors[key].loader; +}; +const assignWithDepth = (dst, src, { depth = 2, clobber = false } = {}) => { + const config2 = { depth, clobber }; + if (Array.isArray(src) && !Array.isArray(dst)) { + src.forEach((s) => assignWithDepth(dst, s, config2)); + return dst; + } else if (Array.isArray(src) && Array.isArray(dst)) { + src.forEach((s) => { + if (!dst.includes(s)) { + dst.push(s); + } + }); + return dst; + } + if (dst === void 0 || depth <= 0) { + if (dst !== void 0 && dst !== null && typeof dst === "object" && typeof src === "object") { + return Object.assign(dst, src); + } else { + return src; + } + } + if (src !== void 0 && typeof dst === "object" && typeof src === "object") { + Object.keys(src).forEach((key) => { + if (typeof src[key] === "object" && (dst[key] === void 0 || typeof dst[key] === "object")) { + if (dst[key] === void 0) { + dst[key] = Array.isArray(src[key]) ? [] : {}; + } + dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber }); + } else if (clobber || typeof dst[key] !== "object" && typeof src[key] !== "object") { + dst[key] = src[key]; + } + }); + } + return dst; +}; +const assignWithDepth$1 = assignWithDepth; +var freeGlobal = typeof global == "object" && global && global.Object === Object && global; +const freeGlobal$1 = freeGlobal; +var freeSelf = typeof self == "object" && self && self.Object === Object && self; +var root = freeGlobal$1 || freeSelf || Function("return this")(); +const root$1 = root; +var Symbol$1 = root$1.Symbol; +const Symbol$2 = Symbol$1; +var objectProto$c = Object.prototype; +var hasOwnProperty$a = objectProto$c.hasOwnProperty; +var nativeObjectToString$1 = objectProto$c.toString; +var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0; +function getRawTag(value) { + var isOwn = hasOwnProperty$a.call(value, symToStringTag$1), tag = value[symToStringTag$1]; + try { + value[symToStringTag$1] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString$1.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; +} +var objectProto$b = Object.prototype; +var nativeObjectToString = objectProto$b.toString; +function objectToString(value) { + return nativeObjectToString.call(value); +} +var nullTag = "[object Null]", undefinedTag = "[object Undefined]"; +var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0; +function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); +} +function isObject$1(value) { + var type2 = typeof value; + return value != null && (type2 == "object" || type2 == "function"); +} +var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; +function isFunction(value) { + if (!isObject$1(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag; +} +var coreJsData = root$1["__core-js_shared__"]; +const coreJsData$1 = coreJsData; +var maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; +}(); +function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; +} +var funcProto$2 = Function.prototype; +var funcToString$2 = funcProto$2.toString; +function toSource(func) { + if (func != null) { + try { + return funcToString$2.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; +} +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; +var reIsHostCtor = /^\[object .+?Constructor\]$/; +var funcProto$1 = Function.prototype, objectProto$a = Object.prototype; +var funcToString$1 = funcProto$1.toString; +var hasOwnProperty$9 = objectProto$a.hasOwnProperty; +var reIsNative = RegExp( + "^" + funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +); +function baseIsNative(value) { + if (!isObject$1(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} +function getValue(object, key) { + return object == null ? void 0 : object[key]; +} +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; +} +var nativeCreate = getNative(Object, "create"); +const nativeCreate$1 = nativeCreate; +function hashClear() { + this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {}; + this.size = 0; +} +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} +var HASH_UNDEFINED$1 = "__lodash_hash_undefined__"; +var objectProto$9 = Object.prototype; +var hasOwnProperty$8 = objectProto$9.hasOwnProperty; +function hashGet(key) { + var data = this.__data__; + if (nativeCreate$1) { + var result = data[key]; + return result === HASH_UNDEFINED$1 ? void 0 : result; + } + return hasOwnProperty$8.call(data, key) ? data[key] : void 0; +} +var objectProto$8 = Object.prototype; +var hasOwnProperty$7 = objectProto$8.hasOwnProperty; +function hashHas(key) { + var data = this.__data__; + return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$7.call(data, key); +} +var HASH_UNDEFINED = "__lodash_hash_undefined__"; +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED : value; + return this; +} +function Hash(entries2) { + var index = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index < length2) { + var entry = entries2[index]; + this.set(entry[0], entry[1]); + } +} +Hash.prototype.clear = hashClear; +Hash.prototype["delete"] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} +function eq(value, other) { + return value === other || value !== value && other !== other; +} +function assocIndexOf(array2, key) { + var length2 = array2.length; + while (length2--) { + if (eq(array2[length2][0], key)) { + return length2; + } + } + return -1; +} +var arrayProto = Array.prototype; +var splice = arrayProto.splice; +function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} +function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; +} +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} +function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} +function ListCache(entries2) { + var index = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index < length2) { + var entry = entries2[index]; + this.set(entry[0], entry[1]); + } +} +ListCache.prototype.clear = listCacheClear; +ListCache.prototype["delete"] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; +var Map$1 = getNative(root$1, "Map"); +const Map$2 = Map$1; +function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map$2 || ListCache)(), + "string": new Hash() + }; +} +function isKeyable(value) { + var type2 = typeof value; + return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null; +} +function getMapData(map2, key) { + var data = map2.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; +} +function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; +} +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} +function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} +function MapCache(entries2) { + var index = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index < length2) { + var entry = entries2[index]; + this.set(entry[0], entry[1]); + } +} +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype["delete"] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; +var FUNC_ERROR_TEXT = "Expected a function"; +function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; +} +memoize.Cache = MapCache; +function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; +} +function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; +} +function stackGet(key) { + return this.__data__.get(key); +} +function stackHas(key) { + return this.__data__.has(key); +} +var LARGE_ARRAY_SIZE = 200; +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs2 = data.__data__; + if (!Map$2 || pairs2.length < LARGE_ARRAY_SIZE - 1) { + pairs2.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs2); + } + data.set(key, value); + this.size = data.size; + return this; +} +function Stack(entries2) { + var data = this.__data__ = new ListCache(entries2); + this.size = data.size; +} +Stack.prototype.clear = stackClear; +Stack.prototype["delete"] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; +var defineProperty = function() { + try { + var func = getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } +}(); +const defineProperty$1 = defineProperty; +function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty$1) { + defineProperty$1(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } +} +function assignMergeValue(object, key, value) { + if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } +} +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, iterable = Object(object), props = keysFunc(object), length2 = props.length; + while (length2--) { + var key = props[fromRight ? length2 : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} +var baseFor = createBaseFor(); +const baseFor$1 = baseFor; +var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports; +var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module; +var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2; +var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0, allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : void 0; +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length2 = buffer.length, result = allocUnsafe ? allocUnsafe(length2) : new buffer.constructor(length2); + buffer.copy(result); + return result; +} +var Uint8Array$1 = root$1.Uint8Array; +const Uint8Array$2 = Uint8Array$1; +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array$2(result).set(new Uint8Array$2(arrayBuffer)); + return result; +} +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} +function copyArray(source, array2) { + var index = -1, length2 = source.length; + array2 || (array2 = Array(length2)); + while (++index < length2) { + array2[index] = source[index]; + } + return array2; +} +var objectCreate = Object.create; +var baseCreate = function() { + function object() { + } + return function(proto) { + if (!isObject$1(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = void 0; + return result; + }; +}(); +const baseCreate$1 = baseCreate; +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} +var getPrototype = overArg(Object.getPrototypeOf, Object); +const getPrototype$1 = getPrototype; +var objectProto$7 = Object.prototype; +function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$7; + return value === proto; +} +function initCloneObject(object) { + return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {}; +} +function isObjectLike(value) { + return value != null && typeof value == "object"; +} +var argsTag$1 = "[object Arguments]"; +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag$1; +} +var objectProto$6 = Object.prototype; +var hasOwnProperty$6 = objectProto$6.hasOwnProperty; +var propertyIsEnumerable = objectProto$6.propertyIsEnumerable; +var isArguments = baseIsArguments(function() { + return arguments; +}()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty$6.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); +}; +const isArguments$1 = isArguments; +var isArray = Array.isArray; +const isArray$1 = isArray; +var MAX_SAFE_INTEGER$1 = 9007199254740991; +function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1; +} +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} +function stubFalse() { + return false; +} +var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports; +var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module; +var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; +var Buffer = moduleExports$1 ? root$1.Buffer : void 0; +var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0; +var isBuffer = nativeIsBuffer || stubFalse; +const isBuffer$1 = isBuffer; +var objectTag$2 = "[object Object]"; +var funcProto = Function.prototype, objectProto$5 = Object.prototype; +var funcToString = funcProto.toString; +var hasOwnProperty$5 = objectProto$5.hasOwnProperty; +var objectCtorString = funcToString.call(Object); +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag$2) { + return false; + } + var proto = getPrototype$1(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty$5.call(proto, "constructor") && proto.constructor; + return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; +} +var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag = "[object Number]", objectTag$1 = "[object Object]", regexpTag = "[object RegExp]", setTag$2 = "[object Set]", stringTag = "[object String]", weakMapTag$1 = "[object WeakMap]"; +var arrayBufferTag = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag] = typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] = typedArrayTags[setTag$2] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false; +function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} +function baseUnary(func) { + return function(value) { + return func(value); + }; +} +var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports; +var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module; +var moduleExports = freeModule && freeModule.exports === freeExports; +var freeProcess = moduleExports && freeGlobal$1.process; +var nodeUtil = function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } +}(); +const nodeUtil$1 = nodeUtil; +var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray; +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; +const isTypedArray$1 = isTypedArray; +function safeGet(object, key) { + if (key === "constructor" && typeof object[key] === "function") { + return; + } + if (key == "__proto__") { + return; + } + return object[key]; +} +var objectProto$4 = Object.prototype; +var hasOwnProperty$4 = objectProto$4.hasOwnProperty; +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty$4.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } +} +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, length2 = props.length; + while (++index < length2) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + if (newValue === void 0) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} +function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} +var MAX_SAFE_INTEGER = 9007199254740991; +var reIsUint = /^(?:0|[1-9]\d*)$/; +function isIndex(value, length2) { + var type2 = typeof value; + length2 = length2 == null ? MAX_SAFE_INTEGER : length2; + return !!length2 && (type2 == "number" || type2 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length2); +} +var objectProto$3 = Object.prototype; +var hasOwnProperty$3 = objectProto$3.hasOwnProperty; +function arrayLikeKeys(value, inherited) { + var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length2 = result.length; + for (var key in value) { + if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length2)))) { + result.push(key); + } + } + return result; +} +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} +var objectProto$2 = Object.prototype; +var hasOwnProperty$2 = objectProto$2.hasOwnProperty; +function baseKeysIn(object) { + if (!isObject$1(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty$2.call(object, key)))) { + result.push(key); + } + } + return result; +} +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0; + var isCommon = newValue === void 0; + if (isCommon) { + var isArr = isArray$1(srcValue), isBuff = !isArr && isBuffer$1(srcValue), isTyped = !isArr && !isBuff && isTypedArray$1(srcValue); + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray$1(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments$1(srcValue)) { + newValue = objValue; + if (isArguments$1(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject$1(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack["delete"](srcValue); + } + assignMergeValue(object, key, newValue); +} +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor$1(source, function(srcValue, key) { + stack || (stack = new Stack()); + if (isObject$1(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0; + if (newValue === void 0) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} +function identity(value) { + return value; +} +function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} +var nativeMax = Math.max; +function overRest(func, start2, transform) { + start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0); + return function() { + var args = arguments, index = -1, length2 = nativeMax(args.length - start2, 0), array2 = Array(length2); + while (++index < length2) { + array2[index] = args[start2 + index]; + } + index = -1; + var otherArgs = Array(start2 + 1); + while (++index < start2) { + otherArgs[index] = args[index]; + } + otherArgs[start2] = transform(array2); + return apply(func, this, otherArgs); + }; +} +function constant(value) { + return function() { + return value; + }; +} +var baseSetToString = !defineProperty$1 ? identity : function(func, string) { + return defineProperty$1(func, "toString", { + "configurable": true, + "enumerable": false, + "value": constant(string), + "writable": true + }); +}; +const baseSetToString$1 = baseSetToString; +var HOT_COUNT = 800, HOT_SPAN = 16; +var nativeNow = Date.now; +function shortOut(func) { + var count = 0, lastCalled = 0; + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(void 0, arguments); + }; +} +var setToString = shortOut(baseSetToString$1); +const setToString$1 = setToString; +function baseRest(func, start2) { + return setToString$1(overRest(func, start2, identity), func + ""); +} +function isIterateeCall(value, index, object) { + if (!isObject$1(object)) { + return false; + } + var type2 = typeof index; + if (type2 == "number" ? isArrayLike(object) && isIndex(index, object.length) : type2 == "string" && index in object) { + return eq(object[index], value); + } + return false; +} +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, length2 = sources.length, customizer = length2 > 1 ? sources[length2 - 1] : void 0, guard = length2 > 2 ? sources[2] : void 0; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length2--, customizer) : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length2 < 3 ? void 0 : customizer; + length2 = 1; + } + object = Object(object); + while (++index < length2) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} +var merge$1 = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); +const merge$2 = merge$1; +const ZERO_WIDTH_SPACE = "​"; +const d3CurveTypes = { + curveBasis, + curveBasisClosed, + curveBasisOpen, + curveBumpX: bumpX, + curveBumpY: bumpY, + curveBundle, + curveCardinalClosed, + curveCardinalOpen, + curveCardinal, + curveCatmullRomClosed, + curveCatmullRomOpen, + curveCatmullRom, + curveLinear, + curveLinearClosed, + curveMonotoneX: monotoneX, + curveMonotoneY: monotoneY, + curveNatural, + curveStep, + curveStepAfter: stepAfter, + curveStepBefore: stepBefore +}; +const directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; +const detectInit = function(text2, config2) { + const inits = detectDirective(text2, /(?:init\b)|(?:initialize\b)/); + let results = {}; + if (Array.isArray(inits)) { + const args = inits.map((init2) => init2.args); + sanitizeDirective(args); + results = assignWithDepth$1(results, [...args]); + } else { + results = inits.args; + } + if (!results) { + return; + } + let type2 = detectType(text2, config2); + const prop = "config"; + if (results[prop] !== void 0) { + if (type2 === "flowchart-v2") { + type2 = "flowchart"; + } + results[type2] = results[prop]; + delete results[prop]; + } + return results; +}; +const detectDirective = function(text2, type2 = null) { + try { + const commentWithoutDirectives = new RegExp( + `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).* +`, + "ig" + ); + text2 = text2.trim().replace(commentWithoutDirectives, "").replace(/'/gm, '"'); + log$1.debug( + `Detecting diagram directive${type2 !== null ? " type:" + type2 : ""} based on the text:${text2}` + ); + let match; + const result = []; + while ((match = directiveRegex.exec(text2)) !== null) { + if (match.index === directiveRegex.lastIndex) { + directiveRegex.lastIndex++; + } + if (match && !type2 || type2 && match[1] && match[1].match(type2) || type2 && match[2] && match[2].match(type2)) { + const type22 = match[1] ? match[1] : match[2]; + const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null; + result.push({ type: type22, args }); + } + } + if (result.length === 0) { + return { type: text2, args: null }; + } + return result.length === 1 ? result[0] : result; + } catch (error) { + log$1.error( + `ERROR: ${error.message} - Unable to parse directive type: '${type2}' based on the text: '${text2}'` + ); + return { type: void 0, args: null }; + } +}; +const removeDirectives = function(text2) { + return text2.replace(directiveRegex, ""); +}; +const isSubstringInArray = function(str2, arr) { + for (const [i, element] of arr.entries()) { + if (element.match(str2)) { + return i; + } + } + return -1; +}; +function interpolateToCurve(interpolate2, defaultCurve) { + if (!interpolate2) { + return defaultCurve; + } + const curveName = `curve${interpolate2.charAt(0).toUpperCase() + interpolate2.slice(1)}`; + return d3CurveTypes[curveName] ?? defaultCurve; +} +function formatUrl(linkStr, config2) { + const url = linkStr.trim(); + if (!url) { + return void 0; + } + if (config2.securityLevel !== "loose") { + return sanitizeUrl_1(url); + } + return url; +} +const runFunc = (functionName, ...params) => { + const arrPaths = functionName.split("."); + const len = arrPaths.length - 1; + const fnName = arrPaths[len]; + let obj = window; + for (let i = 0; i < len; i++) { + obj = obj[arrPaths[i]]; + if (!obj) { + log$1.error(`Function name: ${functionName} not found in window`); + return; + } + } + obj[fnName](...params); +}; +function distance(p1, p2) { + if (!p1 || !p2) { + return 0; + } + return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); +} +function traverseEdge(points) { + let prevPoint; + let totalDistance = 0; + points.forEach((point2) => { + totalDistance += distance(point2, prevPoint); + prevPoint = point2; + }); + const remainingDistance = totalDistance / 2; + return calculatePoint(points, remainingDistance); +} +function calcLabelPosition(points) { + if (points.length === 1) { + return points[0]; + } + return traverseEdge(points); +} +const roundNumber = (num, precision = 2) => { + const factor = Math.pow(10, precision); + return Math.round(num * factor) / factor; +}; +const calculatePoint = (points, distanceToTraverse) => { + let prevPoint = void 0; + let remainingDistance = distanceToTraverse; + for (const point2 of points) { + if (prevPoint) { + const vectorDistance = distance(point2, prevPoint); + if (vectorDistance < remainingDistance) { + remainingDistance -= vectorDistance; + } else { + const distanceRatio = remainingDistance / vectorDistance; + if (distanceRatio <= 0) { + return prevPoint; + } + if (distanceRatio >= 1) { + return { x: point2.x, y: point2.y }; + } + if (distanceRatio > 0 && distanceRatio < 1) { + return { + x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point2.x, 5), + y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point2.y, 5) + }; + } + } + } + prevPoint = point2; + } + throw new Error("Could not find a suitable point for the given distance"); +}; +const calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => { + log$1.info(`our points ${JSON.stringify(points)}`); + if (points[0] !== initialPosition) { + points = points.reverse(); + } + const distanceToCardinalityPoint = 25; + const center = calculatePoint(points, distanceToCardinalityPoint); + const d = isRelationTypePresent ? 10 : 5; + const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x); + const cardinalityPosition = { x: 0, y: 0 }; + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2; + return cardinalityPosition; +}; +function calcTerminalLabelPosition(terminalMarkerSize, position2, _points) { + const points = structuredClone(_points); + log$1.info("our points", points); + if (position2 !== "start_left" && position2 !== "start_right") { + points.reverse(); + } + const distanceToCardinalityPoint = 25 + terminalMarkerSize; + const center = calculatePoint(points, distanceToCardinalityPoint); + const d = 10 + terminalMarkerSize * 0.5; + const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x); + const cardinalityPosition = { x: 0, y: 0 }; + if (position2 === "start_left") { + cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2; + cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2; + } else if (position2 === "end_right") { + cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5; + cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5; + } else if (position2 === "end_left") { + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5; + } else { + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2; + } + return cardinalityPosition; +} +function getStylesFromArray(arr) { + let style = ""; + let labelStyle = ""; + for (const element of arr) { + if (element !== void 0) { + if (element.startsWith("color:") || element.startsWith("text-align:")) { + labelStyle = labelStyle + element + ";"; + } else { + style = style + element + ";"; + } + } + } + return { style, labelStyle }; +} +let cnt = 0; +const generateId = () => { + cnt++; + return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt; +}; +function makeRandomHex(length2) { + let result = ""; + const characters2 = "0123456789abcdef"; + const charactersLength = characters2.length; + for (let i = 0; i < length2; i++) { + result += characters2.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +} +const random = (options) => { + return makeRandomHex(options.length); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: "start", + style: "#666", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0, + valign: void 0, + text: "" + }; +}; +const drawSimpleText = function(elem, textData) { + const nText = textData.text.replace(common$1.lineBreakRegex, " "); + const [, _fontSizePx] = parseFontSize(textData.fontSize); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.style("text-anchor", textData.anchor); + textElem.style("font-family", textData.fontFamily); + textElem.style("font-size", _fontSizePx); + textElem.style("font-weight", textData.fontWeight); + textElem.attr("fill", textData.fill); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.attr("fill", textData.fill); + span.text(nText); + return textElem; +}; +const wrapLabel = memoize( + (label, maxWidth, config2) => { + if (!label) { + return label; + } + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" }, + config2 + ); + if (common$1.lineBreakRegex.test(label)) { + return label; + } + const words = label.split(" "); + const completedLines = []; + let nextLine = ""; + words.forEach((word, index) => { + const wordLength = calculateTextWidth(`${word} `, config2); + const nextLineLength = calculateTextWidth(nextLine, config2); + if (wordLength > maxWidth) { + const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config2); + completedLines.push(nextLine, ...hyphenatedStrings); + nextLine = remainingWord; + } else if (nextLineLength + wordLength >= maxWidth) { + completedLines.push(nextLine); + nextLine = word; + } else { + nextLine = [nextLine, word].filter(Boolean).join(" "); + } + const currentWord = index + 1; + const isLastWord = currentWord === words.length; + if (isLastWord) { + completedLines.push(nextLine); + } + }); + return completedLines.filter((line2) => line2 !== "").join(config2.joinWith); + }, + (label, maxWidth, config2) => `${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}` +); +const breakString = memoize( + (word, maxWidth, hyphenCharacter = "-", config2) => { + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, + config2 + ); + const characters2 = [...word]; + const lines = []; + let currentLine = ""; + characters2.forEach((character2, index) => { + const nextLine = `${currentLine}${character2}`; + const lineWidth = calculateTextWidth(nextLine, config2); + if (lineWidth >= maxWidth) { + const currentCharacter = index + 1; + const isLastLine = characters2.length === currentCharacter; + const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`; + lines.push(isLastLine ? nextLine : hyphenatedNextLine); + currentLine = ""; + } else { + currentLine = nextLine; + } + }); + return { hyphenatedStrings: lines, remainingWord: currentLine }; + }, + (word, maxWidth, hyphenCharacter = "-", config2) => `${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` +); +function calculateTextHeight(text2, config2) { + return calculateTextDimensions(text2, config2).height; +} +function calculateTextWidth(text2, config2) { + return calculateTextDimensions(text2, config2).width; +} +const calculateTextDimensions = memoize( + (text2, config2) => { + const { fontSize = 12, fontFamily = "Arial", fontWeight = 400 } = config2; + if (!text2) { + return { width: 0, height: 0 }; + } + const [, _fontSizePx] = parseFontSize(fontSize); + const fontFamilies = ["sans-serif", fontFamily]; + const lines = text2.split(common$1.lineBreakRegex); + const dims = []; + const body = d3select("body"); + if (!body.remove) { + return { width: 0, height: 0, lineHeight: 0 }; + } + const g = body.append("svg"); + for (const fontFamily2 of fontFamilies) { + let cHeight = 0; + const dim = { width: 0, height: 0, lineHeight: 0 }; + for (const line2 of lines) { + const textObj = getTextObj(); + textObj.text = line2 || ZERO_WIDTH_SPACE; + const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2); + const bBox = (textElem._groups || textElem)[0][0].getBBox(); + if (bBox.width === 0 && bBox.height === 0) { + throw new Error("svg element not in render tree"); + } + dim.width = Math.round(Math.max(dim.width, bBox.width)); + cHeight = Math.round(bBox.height); + dim.height += cHeight; + dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight)); + } + dims.push(dim); + } + g.remove(); + const index = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1; + return dims[index]; + }, + (text2, config2) => `${text2}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` +); +class InitIDGenerator { + constructor(deterministic = false, seed) { + this.count = 0; + this.count = seed ? seed.length : 0; + this.next = deterministic ? () => this.count++ : () => Date.now(); + } +} +let decoder; +const entityDecode = function(html2) { + decoder = decoder || document.createElement("div"); + html2 = escape(html2).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"); + decoder.innerHTML = html2; + return unescape(decoder.textContent); +}; +function isDetailedError(error) { + return "str" in error; +} +const insertTitle = (parent, cssClass, titleTopMargin, title) => { + var _a; + if (!title) { + return; + } + const bounds = (_a = parent.node()) == null ? void 0 : _a.getBBox(); + if (!bounds) { + return; + } + parent.append("text").text(title).attr("x", bounds.x + bounds.width / 2).attr("y", -titleTopMargin).attr("class", cssClass); +}; +const parseFontSize = (fontSize) => { + if (typeof fontSize === "number") { + return [fontSize, fontSize + "px"]; + } + const fontSizeNumber = parseInt(fontSize ?? "", 10); + if (Number.isNaN(fontSizeNumber)) { + return [void 0, void 0]; + } else if (fontSize === String(fontSizeNumber)) { + return [fontSizeNumber, fontSize + "px"]; + } else { + return [fontSizeNumber, fontSize]; + } +}; +function cleanAndMerge(defaultData, data) { + return merge$2({}, defaultData, data); +} +const utils = { + assignWithDepth: assignWithDepth$1, + wrapLabel, + calculateTextHeight, + calculateTextWidth, + calculateTextDimensions, + cleanAndMerge, + detectInit, + detectDirective, + isSubstringInArray, + interpolateToCurve, + calcLabelPosition, + calcCardinalityPosition, + calcTerminalLabelPosition, + formatUrl, + getStylesFromArray, + generateId, + random, + runFunc, + entityDecode, + insertTitle, + parseFontSize, + InitIDGenerator +}; +var COMMENT = "comm"; +var RULESET = "rule"; +var DECLARATION = "decl"; +var IMPORT = "@import"; +var KEYFRAMES = "@keyframes"; +var abs = Math.abs; +var from = String.fromCharCode; +function trim(value) { + return value.trim(); +} +function replace(value, pattern, replacement) { + return value.replace(pattern, replacement); +} +function indexof(value, search) { + return value.indexOf(search); +} +function charat(value, index) { + return value.charCodeAt(index) | 0; +} +function substr(value, begin, end) { + return value.slice(begin, end); +} +function strlen(value) { + return value.length; +} +function sizeof(value) { + return value.length; +} +function append(value, array2) { + return array2.push(value), value; +} +var line = 1; +var column = 1; +var length = 0; +var position = 0; +var character = 0; +var characters = ""; +function node(value, root2, parent, type2, props, children2, length2) { + return { value, root: root2, parent, type: type2, props, children: children2, line, column, length: length2, return: "" }; +} +function char() { + return character; +} +function prev() { + character = position > 0 ? charat(characters, --position) : 0; + if (column--, character === 10) + column = 1, line--; + return character; +} +function next() { + character = position < length ? charat(characters, position++) : 0; + if (column++, character === 10) + column = 1, line++; + return character; +} +function peek() { + return charat(characters, position); +} +function caret() { + return position; +} +function slice(begin, end) { + return substr(characters, begin, end); +} +function token(type2) { + switch (type2) { + case 0: + case 9: + case 10: + case 13: + case 32: + return 5; + case 33: + case 43: + case 44: + case 47: + case 62: + case 64: + case 126: + case 59: + case 123: + case 125: + return 4; + case 58: + return 3; + case 34: + case 39: + case 40: + case 91: + return 2; + case 41: + case 93: + return 1; + } + return 0; +} +function alloc(value) { + return line = column = 1, length = strlen(characters = value), position = 0, []; +} +function dealloc(value) { + return characters = "", value; +} +function delimit(type2) { + return trim(slice(position - 1, delimiter(type2 === 91 ? type2 + 2 : type2 === 40 ? type2 + 1 : type2))); +} +function whitespace(type2) { + while (character = peek()) + if (character < 33) + next(); + else + break; + return token(type2) > 2 || token(character) > 3 ? "" : " "; +} +function escaping(index, count) { + while (--count && next()) + if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) + break; + return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32)); +} +function delimiter(type2) { + while (next()) + switch (character) { + case type2: + return position; + case 34: + case 39: + if (type2 !== 34 && type2 !== 39) + delimiter(character); + break; + case 40: + if (type2 === 41) + delimiter(type2); + break; + case 92: + next(); + break; + } + return position; +} +function commenter(type2, index) { + while (next()) + if (type2 + character === 47 + 10) + break; + else if (type2 + character === 42 + 42 && peek() === 47) + break; + return "/*" + slice(index, position - 1) + "*" + from(type2 === 47 ? type2 : next()); +} +function identifier(index) { + while (!token(peek())) + next(); + return slice(index, position); +} +function compile(value) { + return dealloc(parse$2("", null, null, null, [""], value = alloc(value), 0, [0], value)); +} +function parse$2(value, root2, parent, rule, rules, rulesets, pseudo, points, declarations) { + var index = 0; + var offset = 0; + var length2 = pseudo; + var atrule = 0; + var property = 0; + var previous = 0; + var variable = 1; + var scanning = 1; + var ampersand = 1; + var character2 = 0; + var type2 = ""; + var props = rules; + var children2 = rulesets; + var reference = rule; + var characters2 = type2; + while (scanning) + switch (previous = character2, character2 = next()) { + case 40: + if (previous != 108 && charat(characters2, length2 - 1) == 58) { + if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1) + ampersand = -1; + break; + } + case 34: + case 39: + case 91: + characters2 += delimit(character2); + break; + case 9: + case 10: + case 13: + case 32: + characters2 += whitespace(previous); + break; + case 92: + characters2 += escaping(caret() - 1, 7); + continue; + case 47: + switch (peek()) { + case 42: + case 47: + append(comment(commenter(next(), caret()), root2, parent), declarations); + break; + default: + characters2 += "/"; + } + break; + case 123 * variable: + points[index++] = strlen(characters2) * ampersand; + case 125 * variable: + case 59: + case 0: + switch (character2) { + case 0: + case 125: + scanning = 0; + case 59 + offset: + if (property > 0 && strlen(characters2) - length2) + append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations); + break; + case 59: + characters2 += ";"; + default: + append(reference = ruleset(characters2, root2, parent, index, offset, rules, points, type2, props = [], children2 = [], length2), rulesets); + if (character2 === 123) + if (offset === 0) + parse$2(characters2, root2, reference, reference, props, rulesets, length2, points, children2); + else + switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) { + case 100: + case 109: + case 115: + parse$2(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type2, rules, props = [], length2), children2), rules, children2, length2, points, rule ? props : children2); + break; + default: + parse$2(characters2, reference, reference, reference, [""], children2, 0, points, children2); + } + } + index = offset = property = 0, variable = ampersand = 1, type2 = characters2 = "", length2 = pseudo; + break; + case 58: + length2 = 1 + strlen(characters2), property = previous; + default: + if (variable < 1) { + if (character2 == 123) + --variable; + else if (character2 == 125 && variable++ == 0 && prev() == 125) + continue; + } + switch (characters2 += from(character2), character2 * variable) { + case 38: + ampersand = offset > 0 ? 1 : (characters2 += "\f", -1); + break; + case 44: + points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1; + break; + case 64: + if (peek() === 45) + characters2 += delimit(next()); + atrule = peek(), offset = length2 = strlen(type2 = characters2 += identifier(caret())), character2++; + break; + case 45: + if (previous === 45 && strlen(characters2) == 2) + variable = 0; + } + } + return rulesets; +} +function ruleset(value, root2, parent, index, offset, rules, points, type2, props, children2, length2) { + var post = offset - 1; + var rule = offset === 0 ? rules : [""]; + var size = sizeof(rule); + for (var i = 0, j = 0, k = 0; i < index; ++i) + for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) + if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) + props[k++] = z; + return node(value, root2, parent, offset === 0 ? RULESET : type2, props, children2, length2); +} +function comment(value, root2, parent) { + return node(value, root2, parent, COMMENT, from(char()), substr(value, 2, -2), 0); +} +function declaration(value, root2, parent, length2) { + return node(value, root2, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2); +} +function serialize(children2, callback) { + var output = ""; + var length2 = sizeof(children2); + for (var i = 0; i < length2; i++) + output += callback(children2[i], i, children2, callback) || ""; + return output; +} +function stringify(element, index, children2, callback) { + switch (element.type) { + case IMPORT: + case DECLARATION: + return element.return = element.return || element.value; + case COMMENT: + return ""; + case KEYFRAMES: + return element.return = element.value + "{" + serialize(element.children, callback) + "}"; + case RULESET: + element.value = element.props.join(","); + } + return strlen(children2 = serialize(element.children, callback)) ? element.return = element.value + "{" + children2 + "}" : ""; +} +const version = "10.5.0"; +const defaultConfig = Object.freeze(defaultConfig$1); +let siteConfig = assignWithDepth$1({}, defaultConfig); +let configFromInitialize; +let directives = []; +let currentConfig = assignWithDepth$1({}, defaultConfig); +const updateCurrentConfig = (siteCfg, _directives) => { + let cfg = assignWithDepth$1({}, siteCfg); + let sumOfDirectives = {}; + for (const d of _directives) { + sanitize(d); + sumOfDirectives = assignWithDepth$1(sumOfDirectives, d); + } + cfg = assignWithDepth$1(cfg, sumOfDirectives); + if (sumOfDirectives.theme && sumOfDirectives.theme in theme) { + const tmpConfigFromInitialize = assignWithDepth$1({}, configFromInitialize); + const themeVariables = assignWithDepth$1( + tmpConfigFromInitialize.themeVariables || {}, + sumOfDirectives.themeVariables + ); + if (cfg.theme && cfg.theme in theme) { + cfg.themeVariables = theme[cfg.theme].getThemeVariables(themeVariables); + } + } + currentConfig = cfg; + checkConfig(currentConfig); + return currentConfig; +}; +const setSiteConfig = (conf) => { + siteConfig = assignWithDepth$1({}, defaultConfig); + siteConfig = assignWithDepth$1(siteConfig, conf); + if (conf.theme && theme[conf.theme]) { + siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables); + } + updateCurrentConfig(siteConfig, directives); + return siteConfig; +}; +const saveConfigFromInitialize = (conf) => { + configFromInitialize = assignWithDepth$1({}, conf); +}; +const updateSiteConfig = (conf) => { + siteConfig = assignWithDepth$1(siteConfig, conf); + updateCurrentConfig(siteConfig, directives); + return siteConfig; +}; +const getSiteConfig = () => { + return assignWithDepth$1({}, siteConfig); +}; +const setConfig = (conf) => { + checkConfig(conf); + assignWithDepth$1(currentConfig, conf); + return getConfig$1(); +}; +const getConfig$1 = () => { + return assignWithDepth$1({}, currentConfig); +}; +const sanitize = (options) => { + if (!options) { + return; + } + ["secure", ...siteConfig.secure ?? []].forEach((key) => { + if (Object.hasOwn(options, key)) { + log$1.debug(`Denied attempt to modify a secure key ${key}`, options[key]); + delete options[key]; + } + }); + Object.keys(options).forEach((key) => { + if (key.startsWith("__")) { + delete options[key]; + } + }); + Object.keys(options).forEach((key) => { + if (typeof options[key] === "string" && (options[key].includes("<") || options[key].includes(">") || options[key].includes("url(data:"))) { + delete options[key]; + } + if (typeof options[key] === "object") { + sanitize(options[key]); + } + }); +}; +const addDirective = (directive) => { + sanitizeDirective(directive); + if (directive.fontFamily && (!directive.themeVariables || !directive.themeVariables.fontFamily)) { + directive.themeVariables = { fontFamily: directive.fontFamily }; + } + directives.push(directive); + updateCurrentConfig(siteConfig, directives); +}; +const reset = (config2 = siteConfig) => { + directives = []; + updateCurrentConfig(config2, directives); +}; +const ConfigWarning = { + LAZY_LOAD_DEPRECATED: "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead." +}; +const issuedWarnings = {}; +const issueWarning = (warning) => { + if (issuedWarnings[warning]) { + return; + } + log$1.warn(ConfigWarning[warning]); + issuedWarnings[warning] = true; +}; +const checkConfig = (config2) => { + if (!config2) { + return; + } + if (config2.lazyLoadedDiagrams || config2.loadExternalDiagramsAtStartup) { + issueWarning("LAZY_LOAD_DEPRECATED"); + } +}; +const id$j = "c4"; +const detector$j = (txt) => { + return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt); +}; +const loader$k = async () => { + const { diagram: diagram2 } = await import("./c4Diagram-ef5e9216.js"); + return { id: id$j, diagram: diagram2 }; +}; +const plugin$h = { + id: id$j, + detector: detector$j, + loader: loader$k +}; +const c4 = plugin$h; +const id$i = "flowchart"; +const detector$i = (txt, config2) => { + var _a, _b; + if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { + return false; + } + return /^\s*graph/.test(txt); +}; +const loader$j = async () => { + const { diagram: diagram2 } = await import("./flowDiagram-70296b2d.js"); + return { id: id$i, diagram: diagram2 }; +}; +const plugin$g = { + id: id$i, + detector: detector$i, + loader: loader$j +}; +const flowchart = plugin$g; +const id$h = "flowchart-v2"; +const detector$h = (txt, config2) => { + var _a, _b, _c; + if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-d3" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { + return false; + } + if (/^\s*graph/.test(txt) && ((_c = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _c.defaultRenderer) === "dagre-wrapper") { + return true; + } + return /^\s*flowchart/.test(txt); +}; +const loader$i = async () => { + const { diagram: diagram2 } = await import("./flowDiagram-v2-7f59114e.js"); + return { id: id$h, diagram: diagram2 }; +}; +const plugin$f = { + id: id$h, + detector: detector$h, + loader: loader$i +}; +const flowchartV2 = plugin$f; +const id$g = "er"; +const detector$g = (txt) => { + return /^\s*erDiagram/.test(txt); +}; +const loader$h = async () => { + const { diagram: diagram2 } = await import("./erDiagram-4c5cab4a.js"); + return { id: id$g, diagram: diagram2 }; +}; +const plugin$e = { + id: id$g, + detector: detector$g, + loader: loader$h +}; +const er = plugin$e; +const id$f = "gitGraph"; +const detector$f = (txt) => { + return /^\s*gitGraph/.test(txt); +}; +const loader$g = async () => { + const { diagram: diagram2 } = await import("./gitGraphDiagram-baba4d84.js"); + return { id: id$f, diagram: diagram2 }; +}; +const plugin$d = { + id: id$f, + detector: detector$f, + loader: loader$g +}; +const git = plugin$d; +const id$e = "gantt"; +const detector$e = (txt) => { + return /^\s*gantt/.test(txt); +}; +const loader$f = async () => { + const { diagram: diagram2 } = await import("./ganttDiagram-dc1fbbc4.js"); + return { id: id$e, diagram: diagram2 }; +}; +const plugin$c = { + id: id$e, + detector: detector$e, + loader: loader$f +}; +const gantt = plugin$c; +const id$d = "info"; +const detector$d = (txt) => { + return /^\s*info/.test(txt); +}; +const loader$e = async () => { + const { diagram: diagram2 } = await import("./infoDiagram-9585b70e.js"); + return { id: id$d, diagram: diagram2 }; +}; +const info = { + id: id$d, + detector: detector$d, + loader: loader$e +}; +const id$c = "pie"; +const detector$c = (txt) => { + return /^\s*pie/.test(txt); +}; +const loader$d = async () => { + const { diagram: diagram2 } = await import("./pieDiagram-697bd9be.js"); + return { id: id$c, diagram: diagram2 }; +}; +const pie = { + id: id$c, + detector: detector$c, + loader: loader$d +}; +const id$b = "quadrantChart"; +const detector$b = (txt) => { + return /^\s*quadrantChart/.test(txt); +}; +const loader$c = async () => { + const { diagram: diagram2 } = await import("./quadrantDiagram-354b0825.js"); + return { id: id$b, diagram: diagram2 }; +}; +const plugin$b = { + id: id$b, + detector: detector$b, + loader: loader$c +}; +const quadrantChart = plugin$b; +const id$a = "requirement"; +const detector$a = (txt) => { + return /^\s*requirement(Diagram)?/.test(txt); +}; +const loader$b = async () => { + const { diagram: diagram2 } = await import("./requirementDiagram-65cd3fda.js"); + return { id: id$a, diagram: diagram2 }; +}; +const plugin$a = { + id: id$a, + detector: detector$a, + loader: loader$b +}; +const requirement = plugin$a; +const id$9 = "sequence"; +const detector$9 = (txt) => { + return /^\s*sequenceDiagram/.test(txt); +}; +const loader$a = async () => { + const { diagram: diagram2 } = await import("./sequenceDiagram-db5e53fe.js"); + return { id: id$9, diagram: diagram2 }; +}; +const plugin$9 = { + id: id$9, + detector: detector$9, + loader: loader$a +}; +const sequence = plugin$9; +const id$8 = "class"; +const detector$8 = (txt, config2) => { + var _a; + if (((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return false; + } + return /^\s*classDiagram/.test(txt); +}; +const loader$9 = async () => { + const { diagram: diagram2 } = await import("./classDiagram-4226ab0c.js"); + return { id: id$8, diagram: diagram2 }; +}; +const plugin$8 = { + id: id$8, + detector: detector$8, + loader: loader$9 +}; +const classDiagram = plugin$8; +const id$7 = "classDiagram"; +const detector$7 = (txt, config2) => { + var _a; + if (/^\s*classDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return true; + } + return /^\s*classDiagram-v2/.test(txt); +}; +const loader$8 = async () => { + const { diagram: diagram2 } = await import("./classDiagram-v2-481a852c.js"); + return { id: id$7, diagram: diagram2 }; +}; +const plugin$7 = { + id: id$7, + detector: detector$7, + loader: loader$8 +}; +const classDiagramV2 = plugin$7; +const id$6 = "state"; +const detector$6 = (txt, config2) => { + var _a; + if (((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return false; + } + return /^\s*stateDiagram/.test(txt); +}; +const loader$7 = async () => { + const { diagram: diagram2 } = await import("./stateDiagram-5a3782be.js"); + return { id: id$6, diagram: diagram2 }; +}; +const plugin$6 = { + id: id$6, + detector: detector$6, + loader: loader$7 +}; +const state = plugin$6; +const id$5 = "stateDiagram"; +const detector$5 = (txt, config2) => { + var _a; + if (/^\s*stateDiagram-v2/.test(txt)) { + return true; + } + if (/^\s*stateDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return true; + } + return false; +}; +const loader$6 = async () => { + const { diagram: diagram2 } = await import("./stateDiagram-v2-4231742e.js"); + return { id: id$5, diagram: diagram2 }; +}; +const plugin$5 = { + id: id$5, + detector: detector$5, + loader: loader$6 +}; +const stateV2 = plugin$5; +const id$4 = "journey"; +const detector$4 = (txt) => { + return /^\s*journey/.test(txt); +}; +const loader$5 = async () => { + const { diagram: diagram2 } = await import("./journeyDiagram-7dbbd928.js"); + return { id: id$4, diagram: diagram2 }; +}; +const plugin$4 = { + id: id$4, + detector: detector$4, + loader: loader$5 +}; +const journey = plugin$4; +const selectSvgElement = (id2) => { + var _a; + const { securityLevel } = getConfig$1(); + let root2 = d3select("body"); + if (securityLevel === "sandbox") { + const sandboxElement = d3select(`#i${id2}`); + const doc = ((_a = sandboxElement.node()) == null ? void 0 : _a.contentDocument) ?? document; + root2 = d3select(doc.body); + } + const svg2 = root2.select(`#${id2}`); + return svg2; +}; +const d3Attrs = function(d3Elem, attrs) { + for (let attr of attrs) { + d3Elem.attr(attr[0], attr[1]); + } +}; +const calculateSvgSizeAttrs = function(height, width, useMaxWidth) { + let attrs = /* @__PURE__ */ new Map(); + if (useMaxWidth) { + attrs.set("width", "100%"); + attrs.set("style", `max-width: ${width}px;`); + } else { + attrs.set("height", height); + attrs.set("width", width); + } + return attrs; +}; +const configureSvgSize = function(svgElem, height, width, useMaxWidth) { + const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth); + d3Attrs(svgElem, attrs); +}; +const setupGraphViewbox$1 = function(graph, svgElem, padding, useMaxWidth) { + const svgBounds = svgElem.node().getBBox(); + const sWidth = svgBounds.width; + const sHeight = svgBounds.height; + log$1.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds); + let width = 0; + let height = 0; + log$1.info(`Graph bounds: ${width}x${height}`, graph); + width = sWidth + padding * 2; + height = sHeight + padding * 2; + log$1.info(`Calculated bounds: ${width}x${height}`); + configureSvgSize(svgElem, height, width, useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${svgBounds.width + 2 * padding} ${svgBounds.height + 2 * padding}`; + svgElem.attr("viewBox", vBox); +}; +const draw = (_text, id2, version2) => { + log$1.debug("renering svg for syntax error\n"); + const svg2 = selectSvgElement(id2); + svg2.attr("viewBox", "0 0 2412 512"); + configureSvgSize(svg2, 100, 512, true); + const g = svg2.append("g"); + g.append("path").attr("class", "error-icon").attr( + "d", + "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z" + ); + g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"); + g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`); +}; +const renderer = { draw }; +const errorRenderer = renderer; +const diagram = { + db: {}, + renderer, + parser: { + parser: { yy: {} }, + parse: () => { + return; + } + } +}; +const errorDiagram = diagram; +const id$3 = "flowchart-elk"; +const detector$3 = (txt, config2) => { + var _a; + if ( + // If diagram explicitly states flowchart-elk + /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk + /^\s*flowchart|graph/.test(txt) && ((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "elk" + ) { + return true; + } + return false; +}; +const loader$4 = async () => { + const { diagram: diagram2 } = await import("./flowchart-elk-definition-ee4ab33c.js"); + return { id: id$3, diagram: diagram2 }; +}; +const plugin$3 = { + id: id$3, + detector: detector$3, + loader: loader$4 +}; +const flowchartElk = plugin$3; +const id$2 = "timeline"; +const detector$2 = (txt) => { + return /^\s*timeline/.test(txt); +}; +const loader$3 = async () => { + const { diagram: diagram2 } = await import("./timeline-definition-a4255305.js"); + return { id: id$2, diagram: diagram2 }; +}; +const plugin$2 = { + id: id$2, + detector: detector$2, + loader: loader$3 +}; +const timeline = plugin$2; +const id$1 = "mindmap"; +const detector$1 = (txt) => { + return /^\s*mindmap/.test(txt); +}; +const loader$2 = async () => { + const { diagram: diagram2 } = await import("./mindmap-definition-ad8e8e4e.js"); + return { id: id$1, diagram: diagram2 }; +}; +const plugin$1 = { + id: id$1, + detector: detector$1, + loader: loader$2 +}; +const mindmap = plugin$1; +const id = "sankey"; +const detector = (txt) => { + return /^\s*sankey-beta/.test(txt); +}; +const loader$1 = async () => { + const { diagram: diagram2 } = await import("./sankeyDiagram-73d1d724.js"); + return { id, diagram: diagram2 }; +}; +const plugin = { + id, + detector, + loader: loader$1 +}; +const sankey = plugin; +const themes = {}; +const getStyles = (type2, userStyles, options) => { + let diagramStyles = ""; + if (type2 in themes && themes[type2]) { + diagramStyles = themes[type2](options); + } else { + log$1.warn(`No theme found for ${type2}`); + } + return ` & { + font-family: ${options.fontFamily}; + font-size: ${options.fontSize}; + fill: ${options.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${options.errorBkgColor}; + } + & .error-text { + fill: ${options.errorTextColor}; + stroke: ${options.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 2px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${options.lineColor}; + stroke: ${options.lineColor}; + } + & .marker.cross { + stroke: ${options.lineColor}; + } + + & svg { + font-family: ${options.fontFamily}; + font-size: ${options.fontSize}; + } + + ${diagramStyles} + + ${userStyles} +`; +}; +const addStylesForDiagram = (type2, diagramTheme) => { + if (diagramTheme !== void 0) { + themes[type2] = diagramTheme; + } +}; +const getStyles$1 = getStyles; +let accTitle = ""; +let diagramTitle = ""; +let accDescription = ""; +const sanitizeText$1 = (txt) => sanitizeText$2(txt, getConfig$1()); +const clear = () => { + accTitle = ""; + accDescription = ""; + diagramTitle = ""; +}; +const setAccTitle = (txt) => { + accTitle = sanitizeText$1(txt).replace(/^\s+/g, ""); +}; +const getAccTitle = () => accTitle; +const setAccDescription = (txt) => { + accDescription = sanitizeText$1(txt).replace(/\n\s+/g, "\n"); +}; +const getAccDescription = () => accDescription; +const setDiagramTitle = (txt) => { + diagramTitle = sanitizeText$1(txt); +}; +const getDiagramTitle = () => diagramTitle; +const commonDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + clear, + getAccDescription, + getAccTitle, + getDiagramTitle, + setAccDescription, + setAccTitle, + setDiagramTitle +}, Symbol.toStringTag, { value: "Module" })); +const log = log$1; +const setLogLevel = setLogLevel$1; +const getConfig = getConfig$1; +const sanitizeText = (text2) => sanitizeText$2(text2, getConfig()); +const setupGraphViewbox = setupGraphViewbox$1; +const getCommonDb = () => { + return commonDb; +}; +const diagrams = {}; +const registerDiagram = (id2, diagram2, detector2) => { + var _a; + if (diagrams[id2]) { + throw new Error(`Diagram ${id2} already registered.`); + } + diagrams[id2] = diagram2; + if (detector2) { + addDetector(id2, detector2); + } + addStylesForDiagram(id2, diagram2.styles); + (_a = diagram2.injectUtils) == null ? void 0 : _a.call( + diagram2, + log, + setLogLevel, + getConfig, + sanitizeText, + setupGraphViewbox, + getCommonDb(), + () => { + } + ); +}; +const getDiagram = (name) => { + if (name in diagrams) { + return diagrams[name]; + } + throw new DiagramNotFoundError(name); +}; +class DiagramNotFoundError extends Error { + constructor(name) { + super(`Diagram ${name} not found.`); + } +} +let hasLoadedDiagrams = false; +const addDiagrams = () => { + if (hasLoadedDiagrams) { + return; + } + hasLoadedDiagrams = true; + registerDiagram("error", errorDiagram, (text2) => { + return text2.toLowerCase().trim() === "error"; + }); + registerDiagram( + "---", + // --- diagram type may appear if YAML front-matter is not parsed correctly + { + db: { + clear: () => { + } + }, + styles: {}, + // should never be used + renderer: { + draw: () => { + } + }, + parser: { + parser: { yy: {} }, + parse: () => { + throw new Error( + "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks" + ); + } + }, + init: () => null + // no op + }, + (text2) => { + return text2.toLowerCase().trimStart().startsWith("---"); + } + ); + registerLazyLoadedDiagrams( + c4, + classDiagramV2, + classDiagram, + er, + gantt, + info, + pie, + requirement, + sequence, + flowchartElk, + flowchartV2, + flowchart, + mindmap, + timeline, + git, + stateV2, + state, + journey, + quadrantChart, + sankey + ); +}; +class Diagram { + constructor(text2, metadata = {}) { + this.text = text2; + this.metadata = metadata; + this.type = "graph"; + this.text += "\n"; + const cnf = getConfig$1(); + try { + this.type = detectType(text2, cnf); + } catch (e) { + this.type = "error"; + this.detectError = e; + } + const diagram2 = getDiagram(this.type); + log$1.debug("Type " + this.type); + this.db = diagram2.db; + this.renderer = diagram2.renderer; + this.parser = diagram2.parser; + this.parser.parser.yy = this.db; + this.init = diagram2.init; + this.parse(); + } + parse() { + var _a, _b, _c, _d, _e; + if (this.detectError) { + throw this.detectError; + } + (_b = (_a = this.db).clear) == null ? void 0 : _b.call(_a); + const config2 = getConfig$1(); + (_c = this.init) == null ? void 0 : _c.call(this, config2); + if (this.metadata.title) { + (_e = (_d = this.db).setDiagramTitle) == null ? void 0 : _e.call(_d, this.metadata.title); + } + this.parser.parse(this.text); + } + async render(id2, version2) { + await this.renderer.draw(this.text, id2, version2, this); + } + getParser() { + return this.parser; + } + getType() { + return this.type; + } +} +const getDiagramFromText = async (text2, metadata = {}) => { + const type2 = detectType(text2, getConfig$1()); + try { + getDiagram(type2); + } catch (error) { + const loader2 = getDiagramLoader(type2); + if (!loader2) { + throw new UnknownDiagramError(`Diagram ${type2} not found.`); + } + const { id: id2, diagram: diagram2 } = await loader2(); + registerDiagram(id2, diagram2); + } + return new Diagram(text2, metadata); +}; +let interactionFunctions = []; +const addFunction = (func) => { + interactionFunctions.push(func); +}; +const attachFunctions = () => { + interactionFunctions.forEach((f) => { + f(); + }); + interactionFunctions = []; +}; +var nativeKeys = overArg(Object.keys, Object); +const nativeKeys$1 = nativeKeys; +var objectProto$1 = Object.prototype; +var hasOwnProperty$1 = objectProto$1.hasOwnProperty; +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys$1(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty$1.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; +} +var DataView = getNative(root$1, "DataView"); +const DataView$1 = DataView; +var Promise$1 = getNative(root$1, "Promise"); +const Promise$2 = Promise$1; +var Set$1 = getNative(root$1, "Set"); +const Set$2 = Set$1; +var WeakMap = getNative(root$1, "WeakMap"); +const WeakMap$1 = WeakMap; +var mapTag$1 = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]"; +var dataViewTag = "[object DataView]"; +var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$2), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$1); +var getTag = baseGetTag; +if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag || Map$2 && getTag(new Map$2()) != mapTag$1 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$2 && getTag(new Set$2()) != setTag$1 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag) { + getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag$1; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag$1; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; +} +const getTag$1 = getTag; +var mapTag = "[object Map]", setTag = "[object Set]"; +var objectProto = Object.prototype; +var hasOwnProperty = objectProto.hasOwnProperty; +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray$1(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) { + return !value.length; + } + var tag = getTag$1(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} +const SVG_ROLE = "graphics-document document"; +function setA11yDiagramInfo(svg2, diagramType) { + svg2.attr("role", SVG_ROLE); + if (diagramType !== "") { + svg2.attr("aria-roledescription", diagramType); + } +} +function addSVGa11yTitleDescription(svg2, a11yTitle, a11yDesc, baseId) { + if (svg2.insert === void 0) { + return; + } + if (a11yDesc) { + const descId = `chart-desc-${baseId}`; + svg2.attr("aria-describedby", descId); + svg2.insert("desc", ":first-child").attr("id", descId).text(a11yDesc); + } + if (a11yTitle) { + const titleId = `chart-title-${baseId}`; + svg2.attr("aria-labelledby", titleId); + svg2.insert("title", ":first-child").attr("id", titleId).text(a11yTitle); + } +} +const cleanupComments = (text2) => { + return text2.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(); +}; +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +function isNothing(subject) { + return typeof subject === "undefined" || subject === null; +} +function isObject(subject) { + return typeof subject === "object" && subject !== null; +} +function toArray(sequence2) { + if (Array.isArray(sequence2)) + return sequence2; + else if (isNothing(sequence2)) + return []; + return [sequence2]; +} +function extend(target, source) { + var index, length2, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length2 = sourceKeys.length; index < length2; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; +} +function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; +} +function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; +} +var isNothing_1 = isNothing; +var isObject_1 = isObject; +var toArray_1 = toArray; +var repeat_1 = repeat; +var isNegativeZero_1 = isNegativeZero; +var extend_1 = extend; +var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 +}; +function formatError(exception2, compact) { + var where = "", message = exception2.reason || "(unknown reason)"; + if (!exception2.mark) + return message; + if (exception2.mark.name) { + where += 'in "' + exception2.mark.name + '" '; + } + where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; + if (!compact && exception2.mark.snippet) { + where += "\n\n" + exception2.mark.snippet; + } + return message + " " + where; +} +function YAMLException$1(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } +} +YAMLException$1.prototype = Object.create(Error.prototype); +YAMLException$1.prototype.constructor = YAMLException$1; +YAMLException$1.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); +}; +var exception = YAMLException$1; +function getLine(buffer, lineStart, lineEnd, position2, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position2 - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position2 - maxHalfLength + head.length; + } + if (lineEnd - position2 > maxHalfLength) { + tail = " ..."; + lineEnd = position2 + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, + pos: position2 - lineStart + head.length + // relative position + }; +} +function padStart(string, max2) { + return common.repeat(" ", max2 - string.length) + string; +} +function makeSnippet(mark, options) { + options = Object.create(options || null); + if (!mark.buffer) + return null; + if (!options.maxLength) + options.maxLength = 79; + if (typeof options.indent !== "number") + options.indent = 1; + if (typeof options.linesBefore !== "number") + options.linesBefore = 3; + if (typeof options.linesAfter !== "number") + options.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) + foundLineNo = lineStarts.length - 1; + var result = "", i, line2; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) + break; + line2 = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result; + } + line2 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line2.pos) + "^\n"; + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) + break; + line2 = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; + } + return result.replace(/\n$/, ""); +} +var snippet = makeSnippet; +var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" +]; +var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" +]; +function compileStyleAliases(map2) { + var result = {}; + if (map2 !== null) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; +} +function Type$1(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.options = options; + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} +var type = Type$1; +function compileList(schema2, name) { + var result = []; + schema2[name].forEach(function(currentType) { + var newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + newIndex = previousIndex; + } + }); + result[newIndex] = currentType; + }); + return result; +} +function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length2; + function collectType(type2) { + if (type2.multi) { + result.multi[type2.kind].push(type2); + result.multi["fallback"].push(type2); + } else { + result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; + } + } + for (index = 0, length2 = arguments.length; index < length2; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} +function Schema$1(definition) { + return this.extend(definition); +} +Schema$1.prototype.extend = function extend2(definition) { + var implicit = []; + var explicit = []; + if (definition instanceof type) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) + implicit = implicit.concat(definition.implicit); + if (definition.explicit) + explicit = explicit.concat(definition.explicit); + } else { + throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type$1.loadKind && type$1.loadKind !== "scalar") { + throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type$1.multi) { + throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema$1.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit"); + result.compiledExplicit = compileList(result, "explicit"); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; +}; +var schema = Schema$1; +var str = new type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } +}); +var seq = new type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } +}); +var map = new type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } +}); +var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] +}); +function resolveYamlNull(data) { + if (data === null) + return true; + var max2 = data.length; + return max2 === 1 && data === "~" || max2 === 4 && (data === "null" || data === "Null" || data === "NULL"); +} +function constructYamlNull() { + return null; +} +function isNull(object) { + return object === null; +} +var _null = new type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" +}); +function resolveYamlBoolean(data) { + if (data === null) + return false; + var max2 = data.length; + return max2 === 4 && (data === "true" || data === "True" || data === "TRUE") || max2 === 5 && (data === "false" || data === "False" || data === "FALSE"); +} +function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; +} +function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; +} +var bool = new type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" +}); +function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; +} +function isOctCode(c) { + return 48 <= c && c <= 55; +} +function isDecCode(c) { + return 48 <= c && c <= 57; +} +function resolveYamlInteger(data) { + if (data === null) + return false; + var max2 = data.length, index = 0, hasDigits = false, ch; + if (!max2) + return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max2) + return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max2; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max2; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max2; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") + return false; + for (; index < max2; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + return true; +} +function constructYamlInteger(data) { + var value = data, sign2 = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign2 = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") + return 0; + if (ch === "0") { + if (value[1] === "b") + return sign2 * parseInt(value.slice(2), 2); + if (value[1] === "x") + return sign2 * parseInt(value.slice(2), 16); + if (value[1] === "o") + return sign2 * parseInt(value.slice(2), 8); + } + return sign2 * parseInt(value, 10); +} +function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); +} +var int = new type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } +}); +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" +); +function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; +} +function constructYamlFloat(data) { + var value, sign2; + value = data.replace(/_/g, "").toLowerCase(); + sign2 = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign2 === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } + return sign2 * parseFloat(value, 10); +} +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; +function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; +} +function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); +} +var float = new type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" +}); +var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] +}); +var core = json; +var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" +); +var YAML_TIMESTAMP_REGEXP = 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]))?))?$" +); +function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; +} +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) + date.setTime(date.getTime() - delta); + return date; +} +function representYamlTimestamp(object) { + return object.toISOString(); +} +var timestamp = new type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); +function resolveYamlMerge(data) { + return data === "<<" || data === null; +} +var merge = new type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge +}); +var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; +function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max2 = data.length, map2 = BASE64_MAP; + for (idx = 0; idx < max2; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; +} +function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max2 = input.length, map2 = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max2; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map2.indexOf(input.charAt(idx)); + } + tailbits = max2 % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); +} +function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max2 = object.length, map2 = BASE64_MAP; + for (idx = 0; idx < max2; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max2 % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; +} +function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; +} +var binary = new type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); +var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; +var _toString$2 = Object.prototype.toString; +function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index, length2, pair, pairKey, pairHasKey, object = data; + for (index = 0, length2 = object.length; index < length2; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString$2.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; +} +function constructYamlOmap(data) { + return data !== null ? data : []; +} +var omap = new type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); +var _toString$1 = Object.prototype.toString; +function resolveYamlPairs(data) { + if (data === null) + return true; + var index, length2, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length2 = object.length; index < length2; index += 1) { + pair = object[index]; + if (_toString$1.call(pair) !== "[object Object]") + return false; + keys = Object.keys(pair); + if (keys.length !== 1) + return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; +} +function constructYamlPairs(data) { + if (data === null) + return []; + var index, length2, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length2 = object.length; index < length2; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; +} +var pairs = new type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); +var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; +function resolveYamlSet(data) { + if (data === null) + return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) + return false; + } + } + return true; +} +function constructYamlSet(data) { + return data !== null ? data : {}; +} +var set = new type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet +}); +var _default = core.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] +}); +var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; +function _class(obj) { + return Object.prototype.toString.call(obj); +} +function is_EOL(c) { + return c === 10 || c === 13; +} +function is_WHITE_SPACE(c) { + return c === 9 || c === 32; +} +function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; +} +function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; +} +function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; +} +function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; +} +function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; +} +function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "…" : c === 95 ? " " : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; +} +function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode( + (c - 65536 >> 10) + 55296, + (c - 65536 & 1023) + 56320 + ); +} +var simpleEscapeCheck = new Array(256); +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} +function State$1(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || _default; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; +} +function generateError(state2, message) { + var mark = { + name: state2.filename, + buffer: state2.input.slice(0, -1), + // omit trailing \0 + position: state2.position, + line: state2.line, + column: state2.position - state2.lineStart + }; + mark.snippet = snippet(mark); + return new exception(message, mark); +} +function throwError(state2, message) { + throw generateError(state2, message); +} +function throwWarning(state2, message) { + if (state2.onWarning) { + state2.onWarning.call(null, generateError(state2, message)); + } +} +var directiveHandlers = { + YAML: function handleYamlDirective(state2, name, args) { + var match, major, minor; + if (state2.version !== null) { + throwError(state2, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError(state2, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) { + throwError(state2, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state2, "unacceptable YAML version of the document"); + } + state2.version = args[0]; + state2.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state2, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state2, name, args) { + var handle, prefix; + if (args.length !== 2) { + throwError(state2, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state2, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty$1.call(state2.tagMap, handle)) { + throwError(state2, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state2, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state2, "tag prefix is malformed: " + prefix); + } + state2.tagMap[handle] = prefix; + } +}; +function captureSegment(state2, start2, end, checkJson) { + var _position, _length, _character, _result; + if (start2 < end) { + _result = state2.input.slice(start2, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state2, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state2, "the stream contains non-printable characters"); + } + state2.result += _result; + } +} +function mergeMappings(state2, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state2, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} +function storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state2, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state2, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state2, _result, valueNode, overridableKeys); + } + } else { + if (!state2.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { + state2.line = startLine || state2.line; + state2.lineStart = startLineStart || state2.lineStart; + state2.position = startPos || state2.position; + throwError(state2, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; +} +function readLineBreak(state2) { + var ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 10) { + state2.position++; + } else if (ch === 13) { + state2.position++; + if (state2.input.charCodeAt(state2.position) === 10) { + state2.position++; + } + } else { + throwError(state2, "a line break is expected"); + } + state2.line += 1; + state2.lineStart = state2.position; + state2.firstTabInLine = -1; +} +function skipSeparationSpace(state2, allowComments, checkIndent) { + var lineBreaks = 0, ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state2.firstTabInLine === -1) { + state2.firstTabInLine = state2.position; + } + ch = state2.input.charCodeAt(++state2.position); + } + if (allowComments && ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state2); + ch = state2.input.charCodeAt(state2.position); + lineBreaks++; + state2.lineIndent = 0; + while (ch === 32) { + state2.lineIndent++; + ch = state2.input.charCodeAt(++state2.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state2.lineIndent < checkIndent) { + throwWarning(state2, "deficient indentation"); + } + return lineBreaks; +} +function testDocumentSeparator(state2) { + var _position = state2.position, ch; + ch = state2.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state2.input.charCodeAt(_position + 1) && ch === state2.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state2.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; +} +function writeFoldedLines(state2, count) { + if (count === 1) { + state2.result += " "; + } else if (count > 1) { + state2.result += common.repeat("\n", count - 1); + } +} +function readPlainScalar(state2, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state2.kind, _result = state2.result, ch; + ch = state2.input.charCodeAt(state2.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state2.kind = "scalar"; + state2.result = ""; + captureStart = captureEnd = state2.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state2.input.charCodeAt(state2.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state2.line; + _lineStart = state2.lineStart; + _lineIndent = state2.lineIndent; + skipSeparationSpace(state2, false, -1); + if (state2.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state2.input.charCodeAt(state2.position); + continue; + } else { + state2.position = captureEnd; + state2.line = _line; + state2.lineStart = _lineStart; + state2.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state2, captureStart, captureEnd, false); + writeFoldedLines(state2, state2.line - _line); + captureStart = captureEnd = state2.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state2.position + 1; + } + ch = state2.input.charCodeAt(++state2.position); + } + captureSegment(state2, captureStart, captureEnd, false); + if (state2.result) { + return true; + } + state2.kind = _kind; + state2.result = _result; + return false; +} +function readSingleQuotedScalar(state2, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 39) { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + state2.position++; + captureStart = captureEnd = state2.position; + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + if (ch === 39) { + captureSegment(state2, captureStart, state2.position, true); + ch = state2.input.charCodeAt(++state2.position); + if (ch === 39) { + captureStart = state2.position; + state2.position++; + captureEnd = state2.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state2, captureStart, captureEnd, true); + writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); + captureStart = captureEnd = state2.position; + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + throwError(state2, "unexpected end of the document within a single quoted scalar"); + } else { + state2.position++; + captureEnd = state2.position; + } + } + throwError(state2, "unexpected end of the stream within a single quoted scalar"); +} +function readDoubleQuotedScalar(state2, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 34) { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + state2.position++; + captureStart = captureEnd = state2.position; + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + if (ch === 34) { + captureSegment(state2, captureStart, state2.position, true); + state2.position++; + return true; + } else if (ch === 92) { + captureSegment(state2, captureStart, state2.position, true); + ch = state2.input.charCodeAt(++state2.position); + if (is_EOL(ch)) { + skipSeparationSpace(state2, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state2.result += simpleEscapeMap[ch]; + state2.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state2.input.charCodeAt(++state2.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state2, "expected hexadecimal character"); + } + } + state2.result += charFromCodepoint(hexResult); + state2.position++; + } else { + throwError(state2, "unknown escape sequence"); + } + captureStart = captureEnd = state2.position; + } else if (is_EOL(ch)) { + captureSegment(state2, captureStart, captureEnd, true); + writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); + captureStart = captureEnd = state2.position; + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + throwError(state2, "unexpected end of the document within a double quoted scalar"); + } else { + state2.position++; + captureEnd = state2.position; + } + } + throwError(state2, "unexpected end of the stream within a double quoted scalar"); +} +function readFlowCollection(state2, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state2.tag, _result, _anchor = state2.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(++state2.position); + while (ch !== 0) { + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if (ch === terminator) { + state2.position++; + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = isMapping ? "mapping" : "sequence"; + state2.result = _result; + return true; + } else if (!readNext) { + throwError(state2, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError(state2, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state2.position++; + skipSeparationSpace(state2, true, nodeIndent); + } + } + _line = state2.line; + _lineStart = state2.lineStart; + _pos = state2.position; + composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state2.tag; + keyNode = state2.result; + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if ((isExplicitPair || state2.line === _line) && ch === 58) { + isPair = true; + ch = state2.input.charCodeAt(++state2.position); + skipSeparationSpace(state2, true, nodeIndent); + composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state2.result; + } + if (isMapping) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state2, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if (ch === 44) { + readNext = true; + ch = state2.input.charCodeAt(++state2.position); + } else { + readNext = false; + } + } + throwError(state2, "unexpected end of the stream within a flow collection"); +} +function readBlockScalar(state2, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + while (ch !== 0) { + ch = state2.input.charCodeAt(++state2.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state2, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state2, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state2, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state2); + state2.lineIndent = 0; + ch = state2.input.charCodeAt(state2.position); + while ((!detectedIndent || state2.lineIndent < textIndent) && ch === 32) { + state2.lineIndent++; + ch = state2.input.charCodeAt(++state2.position); + } + if (!detectedIndent && state2.lineIndent > textIndent) { + textIndent = state2.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state2.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state2.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state2.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state2.result += " "; + } + } else { + state2.result += common.repeat("\n", emptyLines); + } + } else { + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state2.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state2.input.charCodeAt(++state2.position); + } + captureSegment(state2, captureStart, state2.position, false); + } + return true; +} +function readBlockSequence(state2, nodeIndent) { + var _line, _tag = state2.tag, _anchor = state2.anchor, _result = [], following, detected = false, ch; + if (state2.firstTabInLine !== -1) + return false; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + if (state2.firstTabInLine !== -1) { + state2.position = state2.firstTabInLine; + throwError(state2, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state2.input.charCodeAt(state2.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state2.position++; + if (skipSeparationSpace(state2, true, -1)) { + if (state2.lineIndent <= nodeIndent) { + _result.push(null); + ch = state2.input.charCodeAt(state2.position); + continue; + } + } + _line = state2.line; + composeNode(state2, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state2.result); + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { + throwError(state2, "bad indentation of a sequence entry"); + } else if (state2.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = "sequence"; + state2.result = _result; + return true; + } + return false; +} +function readBlockMapping(state2, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state2.tag, _anchor = state2.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state2.firstTabInLine !== -1) + return false; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + if (!atExplicitKey && state2.firstTabInLine !== -1) { + state2.position = state2.firstTabInLine; + throwError(state2, "tab characters must not be used in indentation"); + } + following = state2.input.charCodeAt(state2.position + 1); + _line = state2.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state2, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state2.position += 1; + ch = following; + } else { + _keyLine = state2.line; + _keyLineStart = state2.lineStart; + _keyPos = state2.position; + if (!composeNode(state2, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + break; + } + if (state2.line === _line) { + ch = state2.input.charCodeAt(state2.position); + while (is_WHITE_SPACE(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (ch === 58) { + ch = state2.input.charCodeAt(++state2.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state2, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state2.tag; + keyNode = state2.result; + } else if (detected) { + throwError(state2, "can not read an implicit mapping pair; a colon is missed"); + } else { + state2.tag = _tag; + state2.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state2, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state2.tag = _tag; + state2.anchor = _anchor; + return true; + } + } + if (state2.line === _line || state2.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state2.line; + _keyLineStart = state2.lineStart; + _keyPos = state2.position; + } + if (composeNode(state2, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state2.result; + } else { + valueNode = state2.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + } + if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { + throwError(state2, "bad indentation of a mapping entry"); + } else if (state2.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = "mapping"; + state2.result = _result; + } + return detected; +} +function readTagProperty(state2) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 33) + return false; + if (state2.tag !== null) { + throwError(state2, "duplication of a tag property"); + } + ch = state2.input.charCodeAt(++state2.position); + if (ch === 60) { + isVerbatim = true; + ch = state2.input.charCodeAt(++state2.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state2.input.charCodeAt(++state2.position); + } else { + tagHandle = "!"; + } + _position = state2.position; + if (isVerbatim) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 0 && ch !== 62); + if (state2.position < state2.length) { + tagName = state2.input.slice(_position, state2.position); + ch = state2.input.charCodeAt(++state2.position); + } else { + throwError(state2, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state2.input.slice(_position - 1, state2.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state2, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state2.position + 1; + } else { + throwError(state2, "tag suffix cannot contain exclamation marks"); + } + } + ch = state2.input.charCodeAt(++state2.position); + } + tagName = state2.input.slice(_position, state2.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state2, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state2, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state2, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state2.tag = tagName; + } else if (_hasOwnProperty$1.call(state2.tagMap, tagHandle)) { + state2.tag = state2.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state2.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state2.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state2, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; +} +function readAnchorProperty(state2) { + var _position, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 38) + return false; + if (state2.anchor !== null) { + throwError(state2, "duplication of an anchor property"); + } + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (state2.position === _position) { + throwError(state2, "name of an anchor node must contain at least one character"); + } + state2.anchor = state2.input.slice(_position, state2.position); + return true; +} +function readAlias(state2) { + var _position, alias, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 42) + return false; + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (state2.position === _position) { + throwError(state2, "name of an alias node must contain at least one character"); + } + alias = state2.input.slice(_position, state2.position); + if (!_hasOwnProperty$1.call(state2.anchorMap, alias)) { + throwError(state2, 'unidentified alias "' + alias + '"'); + } + state2.result = state2.anchorMap[alias]; + skipSeparationSpace(state2, true, -1); + return true; +} +function composeNode(state2, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; + if (state2.listener !== null) { + state2.listener("open", state2); + } + state2.tag = null; + state2.anchor = null; + state2.kind = null; + state2.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state2, true, -1)) { + atNewLine = true; + if (state2.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state2.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state2.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state2) || readAnchorProperty(state2)) { + if (skipSeparationSpace(state2, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state2.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state2.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state2.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state2.position - state2.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state2, blockIndent) || readBlockMapping(state2, blockIndent, flowIndent)) || readFlowCollection(state2, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state2, flowIndent) || readSingleQuotedScalar(state2, flowIndent) || readDoubleQuotedScalar(state2, flowIndent)) { + hasContent = true; + } else if (readAlias(state2)) { + hasContent = true; + if (state2.tag !== null || state2.anchor !== null) { + throwError(state2, "alias node should not have any properties"); + } + } else if (readPlainScalar(state2, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state2.tag === null) { + state2.tag = "?"; + } + } + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state2, blockIndent); + } + } + if (state2.tag === null) { + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } else if (state2.tag === "?") { + if (state2.result !== null && state2.kind !== "scalar") { + throwError(state2, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state2.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state2.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type2 = state2.implicitTypes[typeIndex]; + if (type2.resolve(state2.result)) { + state2.result = type2.construct(state2.result); + state2.tag = type2.tag; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + break; + } + } + } else if (state2.tag !== "!") { + if (_hasOwnProperty$1.call(state2.typeMap[state2.kind || "fallback"], state2.tag)) { + type2 = state2.typeMap[state2.kind || "fallback"][state2.tag]; + } else { + type2 = null; + typeList = state2.typeMap.multi[state2.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state2.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type2 = typeList[typeIndex]; + break; + } + } + } + if (!type2) { + throwError(state2, "unknown tag !<" + state2.tag + ">"); + } + if (state2.result !== null && type2.kind !== state2.kind) { + throwError(state2, "unacceptable node kind for !<" + state2.tag + '> tag; it should be "' + type2.kind + '", not "' + state2.kind + '"'); + } + if (!type2.resolve(state2.result, state2.tag)) { + throwError(state2, "cannot resolve a node with !<" + state2.tag + "> explicit tag"); + } else { + state2.result = type2.construct(state2.result, state2.tag); + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } + } + if (state2.listener !== null) { + state2.listener("close", state2); + } + return state2.tag !== null || state2.anchor !== null || hasContent; +} +function readDocument(state2) { + var documentStart = state2.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state2.version = null; + state2.checkLineBreaks = state2.legacy; + state2.tagMap = /* @__PURE__ */ Object.create(null); + state2.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + if (state2.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + directiveName = state2.input.slice(_position, state2.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state2, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + directiveArgs.push(state2.input.slice(_position, state2.position)); + } + if (ch !== 0) + readLineBreak(state2); + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state2, directiveName, directiveArgs); + } else { + throwWarning(state2, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state2, true, -1); + if (state2.lineIndent === 0 && state2.input.charCodeAt(state2.position) === 45 && state2.input.charCodeAt(state2.position + 1) === 45 && state2.input.charCodeAt(state2.position + 2) === 45) { + state2.position += 3; + skipSeparationSpace(state2, true, -1); + } else if (hasDirectives) { + throwError(state2, "directives end mark is expected"); + } + composeNode(state2, state2.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state2, true, -1); + if (state2.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state2.input.slice(documentStart, state2.position))) { + throwWarning(state2, "non-ASCII line breaks are interpreted as content"); + } + state2.documents.push(state2.result); + if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + if (state2.input.charCodeAt(state2.position) === 46) { + state2.position += 3; + skipSeparationSpace(state2, true, -1); + } + return; + } + if (state2.position < state2.length - 1) { + throwError(state2, "end of the stream or a document separator is expected"); + } else { + return; + } +} +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state2 = new State$1(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state2.position = nullpos; + throwError(state2, "null byte is not allowed in input"); + } + state2.input += "\0"; + while (state2.input.charCodeAt(state2.position) === 32) { + state2.lineIndent += 1; + state2.position += 1; + } + while (state2.position < state2.length - 1) { + readDocument(state2); + } + return state2.documents; +} +function loadAll$1(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length2 = documents.length; index < length2; index += 1) { + iterator(documents[index]); + } +} +function load$1(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception("expected a single document in the stream, but found more"); +} +var loadAll_1 = loadAll$1; +var load_1 = load$1; +var loader = { + loadAll: loadAll_1, + load: load_1 +}; +var JSON_SCHEMA = json; +var load = loader.load; +function extractFrontMatter(text2) { + const matches = text2.match(frontMatterRegex); + if (!matches) { + return { + text: text2, + metadata: {} + }; + } + let parsed = load(matches[1], { + // To support config, we need JSON schema. + // https://www.yaml.org/spec/1.2/spec.html#id2803231 + schema: JSON_SCHEMA + }) ?? {}; + parsed = typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {}; + const metadata = {}; + if (parsed.displayMode) { + metadata.displayMode = parsed.displayMode.toString(); + } + if (parsed.title) { + metadata.title = parsed.title.toString(); + } + if (parsed.config) { + metadata.config = parsed.config; + } + return { + text: text2.slice(matches[0].length), + metadata + }; +} +const cleanupText = (code) => { + return code.replace(/\r\n?/g, "\n").replace( + /<(\w+)([^>]*)>/g, + (match, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">" + ); +}; +const processFrontmatter = (code) => { + const { text: text2, metadata } = extractFrontMatter(code); + const { displayMode, title, config: config2 = {} } = metadata; + if (displayMode) { + if (!config2.gantt) { + config2.gantt = {}; + } + config2.gantt.displayMode = displayMode; + } + return { title, config: config2, text: text2 }; +}; +const processDirectives = (code) => { + const initDirective = utils.detectInit(code) ?? {}; + const wrapDirectives = utils.detectDirective(code, "wrap"); + if (Array.isArray(wrapDirectives)) { + initDirective.wrap = wrapDirectives.some(({ type: type2 }) => { + }); + } else if ((wrapDirectives == null ? void 0 : wrapDirectives.type) === "wrap") { + initDirective.wrap = true; + } + return { + text: removeDirectives(code), + directive: initDirective + }; +}; +function preprocessDiagram(code) { + const cleanedCode = cleanupText(code); + const frontMatterResult = processFrontmatter(cleanedCode); + const directiveResult = processDirectives(frontMatterResult.text); + const config2 = cleanAndMerge(frontMatterResult.config, directiveResult.directive); + code = cleanupComments(directiveResult.text); + return { + code, + title: frontMatterResult.title, + config: config2 + }; +} +const MAX_TEXTLENGTH = 5e4; +const MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"; +const SECURITY_LVL_SANDBOX = "sandbox"; +const SECURITY_LVL_LOOSE = "loose"; +const XMLNS_SVG_STD = "http://www.w3.org/2000/svg"; +const XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink"; +const XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml"; +const IFRAME_WIDTH = "100%"; +const IFRAME_HEIGHT = "100%"; +const IFRAME_STYLES = "border:0;margin:0;"; +const IFRAME_BODY_STYLE = "margin:0"; +const IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups"; +const IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.'; +const DOMPURIFY_TAGS = ["foreignobject"]; +const DOMPURIFY_ATTR = ["dominant-baseline"]; +function processAndSetConfigs(text2) { + const processed = preprocessDiagram(text2); + reset(); + addDirective(processed.config ?? {}); + return processed; +} +async function parse$1(text2, parseOptions) { + addDiagrams(); + text2 = processAndSetConfigs(text2).code; + try { + await getDiagramFromText(text2); + } catch (error) { + if (parseOptions == null ? void 0 : parseOptions.suppressErrors) { + return false; + } + throw error; + } + return true; +} +const encodeEntities = function(text2) { + let txt = text2; + txt = txt.replace(/style.*:\S*#.*;/g, function(s) { + return s.substring(0, s.length - 1); + }); + txt = txt.replace(/classDef.*:\S*#.*;/g, function(s) { + return s.substring(0, s.length - 1); + }); + txt = txt.replace(/#\w+;/g, function(s) { + const innerTxt = s.substring(1, s.length - 1); + const isInt = /^\+?\d+$/.test(innerTxt); + if (isInt) { + return "fl°°" + innerTxt + "¶ß"; + } else { + return "fl°" + innerTxt + "¶ß"; + } + }); + return txt; +}; +const decodeEntities = function(text2) { + return text2.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";"); +}; +const cssImportantStyles = (cssClass, element, cssClasses = []) => { + return ` +.${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`; +}; +const createCssStyles = (config2, classDefs = {}) => { + var _a; + let cssStyles = ""; + if (config2.themeCSS !== void 0) { + cssStyles += ` +${config2.themeCSS}`; + } + if (config2.fontFamily !== void 0) { + cssStyles += ` +:root { --mermaid-font-family: ${config2.fontFamily}}`; + } + if (config2.altFontFamily !== void 0) { + cssStyles += ` +:root { --mermaid-alt-font-family: ${config2.altFontFamily}}`; + } + if (!isEmpty(classDefs)) { + const htmlLabels = config2.htmlLabels || ((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels); + const cssHtmlElements = ["> *", "span"]; + const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"]; + const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements; + for (const classId in classDefs) { + const styleClassDef = classDefs[classId]; + if (!isEmpty(styleClassDef.styles)) { + cssElements.forEach((cssElement) => { + cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles); + }); + } + if (!isEmpty(styleClassDef.textStyles)) { + cssStyles += cssImportantStyles(styleClassDef.id, "tspan", styleClassDef.textStyles); + } + } + } + return cssStyles; +}; +const createUserStyles = (config2, graphType, classDefs, svgId) => { + const userCSSstyles = createCssStyles(config2, classDefs); + const allStyles = getStyles$1(graphType, userCSSstyles, config2.themeVariables); + return serialize(compile(`${svgId}{${allStyles}}`), stringify); +}; +const cleanUpSvgCode = (svgCode = "", inSandboxMode, useArrowMarkerUrls) => { + let cleanedUpSvg = svgCode; + if (!useArrowMarkerUrls && !inSandboxMode) { + cleanedUpSvg = cleanedUpSvg.replace( + /marker-end="url\([\d+./:=?A-Za-z-]*?#/g, + 'marker-end="url(#' + ); + } + cleanedUpSvg = decodeEntities(cleanedUpSvg); + cleanedUpSvg = cleanedUpSvg.replace(/
/g, "
"); + return cleanedUpSvg; +}; +const putIntoIFrame = (svgCode = "", svgElement) => { + var _a, _b; + const height = ((_b = (_a = svgElement == null ? void 0 : svgElement.viewBox) == null ? void 0 : _a.baseVal) == null ? void 0 : _b.height) ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT; + const base64encodedSrc = btoa('' + svgCode + ""); + return ``; +}; +const appendDivSvgG = (parentRoot, id2, enclosingDivId, divStyle, svgXlink) => { + const enclosingDiv = parentRoot.append("div"); + enclosingDiv.attr("id", enclosingDivId); + if (divStyle) { + enclosingDiv.attr("style", divStyle); + } + const svgNode2 = enclosingDiv.append("svg").attr("id", id2).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD); + if (svgXlink) { + svgNode2.attr("xmlns:xlink", svgXlink); + } + svgNode2.append("g"); + return parentRoot; +}; +function sandboxedIframe(parentNode, iFrameId) { + return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", ""); +} +const removeExistingElements = (doc, id2, divId, iFrameId) => { + var _a, _b, _c; + (_a = doc.getElementById(id2)) == null ? void 0 : _a.remove(); + (_b = doc.getElementById(divId)) == null ? void 0 : _b.remove(); + (_c = doc.getElementById(iFrameId)) == null ? void 0 : _c.remove(); +}; +const render$1 = async function(id2, text2, svgContainingElement) { + var _a, _b, _c, _d, _e, _f; + addDiagrams(); + const processed = processAndSetConfigs(text2); + text2 = processed.code; + const config2 = getConfig$1(); + log$1.debug(config2); + if (text2.length > ((config2 == null ? void 0 : config2.maxTextSize) ?? MAX_TEXTLENGTH)) { + text2 = MAX_TEXTLENGTH_EXCEEDED_MSG; + } + const idSelector = "#" + id2; + const iFrameID = "i" + id2; + const iFrameID_selector = "#" + iFrameID; + const enclosingDivID = "d" + id2; + const enclosingDivID_selector = "#" + enclosingDivID; + let root2 = d3select("body"); + const isSandboxed = config2.securityLevel === SECURITY_LVL_SANDBOX; + const isLooseSecurityLevel = config2.securityLevel === SECURITY_LVL_LOOSE; + const fontFamily = config2.fontFamily; + if (svgContainingElement !== void 0) { + if (svgContainingElement) { + svgContainingElement.innerHTML = ""; + } + if (isSandboxed) { + const iframe = sandboxedIframe(d3select(svgContainingElement), iFrameID); + root2 = d3select(iframe.nodes()[0].contentDocument.body); + root2.node().style.margin = 0; + } else { + root2 = d3select(svgContainingElement); + } + appendDivSvgG(root2, id2, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD); + } else { + removeExistingElements(document, id2, enclosingDivID, iFrameID); + if (isSandboxed) { + const iframe = sandboxedIframe(d3select("body"), iFrameID); + root2 = d3select(iframe.nodes()[0].contentDocument.body); + root2.node().style.margin = 0; + } else { + root2 = d3select("body"); + } + appendDivSvgG(root2, id2, enclosingDivID); + } + text2 = encodeEntities(text2); + let diag; + let parseEncounteredException; + try { + diag = await getDiagramFromText(text2, { title: processed.title }); + } catch (error) { + diag = new Diagram("error"); + parseEncounteredException = error; + } + const element = root2.select(enclosingDivID_selector).node(); + const diagramType = diag.type; + const svg2 = element.firstChild; + const firstChild = svg2.firstChild; + const diagramClassDefs = (_b = (_a = diag.renderer).getClasses) == null ? void 0 : _b.call(_a, text2, diag); + const rules = createUserStyles(config2, diagramType, diagramClassDefs, idSelector); + const style1 = document.createElement("style"); + style1.innerHTML = rules; + svg2.insertBefore(style1, firstChild); + try { + await diag.renderer.draw(text2, id2, version, diag); + } catch (e) { + errorRenderer.draw(text2, id2, version); + throw e; + } + const svgNode2 = root2.select(`${enclosingDivID_selector} svg`); + const a11yTitle = (_d = (_c = diag.db).getAccTitle) == null ? void 0 : _d.call(_c); + const a11yDescr = (_f = (_e = diag.db).getAccDescription) == null ? void 0 : _f.call(_e); + addA11yInfo(diagramType, svgNode2, a11yTitle, a11yDescr); + root2.select(`[id="${id2}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD); + let svgCode = root2.select(enclosingDivID_selector).node().innerHTML; + log$1.debug("config.arrowMarkerAbsolute", config2.arrowMarkerAbsolute); + svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config2.arrowMarkerAbsolute)); + if (isSandboxed) { + const svgEl = root2.select(enclosingDivID_selector + " svg").node(); + svgCode = putIntoIFrame(svgCode, svgEl); + } else if (!isLooseSecurityLevel) { + svgCode = purify.sanitize(svgCode, { + ADD_TAGS: DOMPURIFY_TAGS, + ADD_ATTR: DOMPURIFY_ATTR + }); + } + attachFunctions(); + if (parseEncounteredException) { + throw parseEncounteredException; + } + const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector; + const node2 = d3select(tmpElementSelector).node(); + if (node2 && "remove" in node2) { + node2.remove(); + } + return { + svg: svgCode, + bindFunctions: diag.db.bindFunctions + }; +}; +function initialize$1(options = {}) { + var _a; + if ((options == null ? void 0 : options.fontFamily) && !((_a = options.themeVariables) == null ? void 0 : _a.fontFamily)) { + if (!options.themeVariables) { + options.themeVariables = {}; + } + options.themeVariables.fontFamily = options.fontFamily; + } + saveConfigFromInitialize(options); + if ((options == null ? void 0 : options.theme) && options.theme in theme) { + options.themeVariables = theme[options.theme].getThemeVariables( + options.themeVariables + ); + } else if (options) { + options.themeVariables = theme.default.getThemeVariables(options.themeVariables); + } + const config2 = typeof options === "object" ? setSiteConfig(options) : getSiteConfig(); + setLogLevel$1(config2.logLevel); + addDiagrams(); +} +function addA11yInfo(diagramType, svgNode2, a11yTitle, a11yDescr) { + setA11yDiagramInfo(svgNode2, diagramType); + addSVGa11yTitleDescription(svgNode2, a11yTitle, a11yDescr, svgNode2.attr("id")); +} +const mermaidAPI = Object.freeze({ + render: render$1, + parse: parse$1, + getDiagramFromText, + initialize: initialize$1, + getConfig: getConfig$1, + setConfig, + getSiteConfig, + updateSiteConfig, + reset: () => { + reset(); + }, + globalReset: () => { + reset(defaultConfig); + }, + defaultConfig +}); +setLogLevel$1(getConfig$1().logLevel); +reset(getConfig$1()); +const loadRegisteredDiagrams = async () => { + log$1.debug(`Loading registered diagrams`); + const results = await Promise.allSettled( + Object.entries(detectors).map(async ([key, { detector: detector2, loader: loader2 }]) => { + if (loader2) { + try { + getDiagram(key); + } catch (error) { + try { + const { diagram: diagram2, id: id2 } = await loader2(); + registerDiagram(id2, diagram2, detector2); + } catch (err) { + log$1.error(`Failed to load external diagram with key ${key}. Removing from detectors.`); + delete detectors[key]; + throw err; + } + } + } + }) + ); + const failed = results.filter((result) => result.status === "rejected"); + if (failed.length > 0) { + log$1.error(`Failed to load ${failed.length} external diagrams`); + for (const res of failed) { + log$1.error(res); + } + throw new Error(`Failed to load ${failed.length} external diagrams`); + } +}; +const handleError = (error, errors, parseError) => { + log$1.warn(error); + if (isDetailedError(error)) { + if (parseError) { + parseError(error.str, error.hash); + } + errors.push({ ...error, message: error.str, error }); + } else { + if (parseError) { + parseError(error); + } + if (error instanceof Error) { + errors.push({ + str: error.message, + message: error.message, + hash: error.name, + error + }); + } + } +}; +const run = async function(options = { + querySelector: ".mermaid" +}) { + try { + await runThrowsErrors(options); + } catch (e) { + if (isDetailedError(e)) { + log$1.error(e.str); + } + if (mermaid.parseError) { + mermaid.parseError(e); + } + if (!options.suppressErrors) { + log$1.error("Use the suppressErrors option to suppress these errors"); + throw e; + } + } +}; +const runThrowsErrors = async function({ postRenderCallback, querySelector, nodes } = { + querySelector: ".mermaid" +}) { + const conf = mermaidAPI.getConfig(); + log$1.debug(`${!postRenderCallback ? "No " : ""}Callback function found`); + let nodesToProcess; + if (nodes) { + nodesToProcess = nodes; + } else if (querySelector) { + nodesToProcess = document.querySelectorAll(querySelector); + } else { + throw new Error("Nodes and querySelector are both undefined"); + } + log$1.debug(`Found ${nodesToProcess.length} diagrams`); + if ((conf == null ? void 0 : conf.startOnLoad) !== void 0) { + log$1.debug("Start On Load: " + (conf == null ? void 0 : conf.startOnLoad)); + mermaidAPI.updateSiteConfig({ startOnLoad: conf == null ? void 0 : conf.startOnLoad }); + } + const idGenerator = new utils.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed); + let txt; + const errors = []; + for (const element of Array.from(nodesToProcess)) { + log$1.info("Rendering diagram: " + element.id); + /*! Check if previously processed */ + if (element.getAttribute("data-processed")) { + continue; + } + element.setAttribute("data-processed", "true"); + const id2 = `mermaid-${idGenerator.next()}`; + txt = element.innerHTML; + txt = dedent(utils.entityDecode(txt)).trim().replace(//gi, "
"); + const init2 = utils.detectInit(txt); + if (init2) { + log$1.debug("Detected early reinit: ", init2); + } + try { + const { svg: svg2, bindFunctions } = await render(id2, txt, element); + element.innerHTML = svg2; + if (postRenderCallback) { + await postRenderCallback(id2); + } + if (bindFunctions) { + bindFunctions(element); + } + } catch (error) { + handleError(error, errors, mermaid.parseError); + } + } + if (errors.length > 0) { + throw errors[0]; + } +}; +const initialize = function(config2) { + mermaidAPI.initialize(config2); +}; +const init = async function(config2, nodes, callback) { + log$1.warn("mermaid.init is deprecated. Please use run instead."); + if (config2) { + initialize(config2); + } + const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" }; + if (typeof nodes === "string") { + runOptions.querySelector = nodes; + } else if (nodes) { + if (nodes instanceof HTMLElement) { + runOptions.nodes = [nodes]; + } else { + runOptions.nodes = nodes; + } + } + await run(runOptions); +}; +const registerExternalDiagrams = async (diagrams2, { + lazyLoad = true +} = {}) => { + registerLazyLoadedDiagrams(...diagrams2); + if (lazyLoad === false) { + await loadRegisteredDiagrams(); + } +}; +const contentLoaded = function() { + if (mermaid.startOnLoad) { + const { startOnLoad } = mermaidAPI.getConfig(); + if (startOnLoad) { + mermaid.run().catch((err) => log$1.error("Mermaid failed to initialize", err)); + } + } +}; +if (typeof document !== "undefined") { + /*! + * Wait for document loaded before starting the execution + */ + window.addEventListener("load", contentLoaded, false); +} +const setParseErrorHandler = function(parseErrorHandler) { + mermaid.parseError = parseErrorHandler; +}; +const executionQueue = []; +let executionQueueRunning = false; +const executeQueue = async () => { + if (executionQueueRunning) { + return; + } + executionQueueRunning = true; + while (executionQueue.length > 0) { + const f = executionQueue.shift(); + if (f) { + try { + await f(); + } catch (e) { + log$1.error("Error executing queue", e); + } + } + } + executionQueueRunning = false; +}; +const parse = async (text2, parseOptions) => { + return new Promise((resolve, reject) => { + const performCall = () => new Promise((res, rej) => { + mermaidAPI.parse(text2, parseOptions).then( + (r) => { + res(r); + resolve(r); + }, + (e) => { + var _a; + log$1.error("Error parsing", e); + (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); + rej(e); + reject(e); + } + ); + }); + executionQueue.push(performCall); + executeQueue().catch(reject); + }); +}; +const render = (id2, text2, container) => { + return new Promise((resolve, reject) => { + const performCall = () => new Promise((res, rej) => { + mermaidAPI.render(id2, text2, container).then( + (r) => { + res(r); + resolve(r); + }, + (e) => { + var _a; + log$1.error("Error parsing", e); + (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); + rej(e); + reject(e); + } + ); + }); + executionQueue.push(performCall); + executeQueue().catch(reject); + }); +}; +const mermaid = { + startOnLoad: true, + mermaidAPI, + parse, + render, + init, + run, + registerExternalDiagrams, + initialize, + parseError: void 0, + contentLoaded, + setParseErrorHandler, + detectType +}; +export { + getThemeVariables$2 as $, + rgba$1 as A, + setDiagramTitle as B, + Color$1 as C, + getDiagramTitle as D, + clear as E, + curveBasis as F, + parseGenericTypes as G, + random as H, + getConfig as I, + setupGraphViewbox as J, + define as K, + extend$1 as L, + Color$2 as M, + rgbConvert as N, + nogamma as O, + hue as P, + commonjsGlobal as Q, + Rgb as R, + Selection$1 as S, + getDefaultExportFromCjs as T, + dayjs as U, + selectSvgElement as V, + tau as W, + defaultConfig$1 as X, + cleanAndMerge as Y, + parseFontSize as Z, + _, + getAccDescription as a, + sqrt as a$, + constant$1 as a0, + interpolateNumber as a1, + color as a2, + interpolateRgb as a3, + interpolateString as a4, + addFunction as a5, + ZERO_WIDTH_SPACE as a6, + generateId as a7, + isObjectLike as a8, + baseGetTag as a9, + Uint8Array$2 as aA, + isTypedArray$1 as aB, + isLength as aC, + isIndex as aD, + identity as aE, + baseFor$1 as aF, + root$1 as aG, + baseRest as aH, + isIterateeCall as aI, + baseAssignValue as aJ, + Set$2 as aK, + isArrayLikeObject as aL, + constant as aM, + isEmpty as aN, + merge$2 as aO, + lineBreakRegex as aP, + defaultConfig as aQ, + decodeEntities as aR, + commonDb as aS, + isDark$1 as aT, + lighten$1 as aU, + darken$1 as aV, + pi as aW, + cos as aX, + sin as aY, + halfPi as aZ, + epsilon as a_, + Symbol$2 as aa, + isArray$1 as ab, + isObject$1 as ac, + isArrayLike as ad, + arrayLikeKeys as ae, + baseKeys as af, + memoize as ag, + isArguments$1 as ah, + setToString$1 as ai, + overRest as aj, + copyObject as ak, + keysIn as al, + getPrototype$1 as am, + cloneArrayBuffer as an, + cloneTypedArray as ao, + getTag$1 as ap, + nodeUtil$1 as aq, + baseUnary as ar, + copyArray as as, + isBuffer$1 as at, + cloneBuffer as au, + initCloneObject as av, + Stack as aw, + assignValue as ax, + MapCache as ay, + eq as az, + setAccDescription as b, + min as b0, + abs$1 as b1, + atan2 as b2, + asin as b3, + acos as b4, + max as b5, + dedent as b6, + mermaid as b7, + getConfig$1 as c, + sanitizeText$2 as d, + sanitizeUrl_1 as e, + common$1 as f, + getAccTitle as g, + assignWithDepth$1 as h, + calculateTextWidth as i, + d3select as j, + configureSvgSize as k, + log$1 as l, + calculateTextHeight as m, + curveLinear as n, + getStylesFromArray as o, + evaluate as p, + interpolateToCurve as q, + setupGraphViewbox$1 as r, + setAccTitle as s, + setConfig as t, + root$2 as u, + array as v, + wrapLabel as w, + isPlainObject as x, + isFunction as y, + utils as z +}; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid-e4a58915.js b/webroot/js/node_modules/mermaid/dist/mermaid-e4a58915.js new file mode 100644 index 0000000..64c8675 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid-e4a58915.js @@ -0,0 +1,7827 @@ +function oh(t) { + for (var e = [], i = 1; i < arguments.length; i++) + e[i - 1] = arguments[i]; + var r = Array.from(typeof t == "string" ? [t] : t); + r[r.length - 1] = r[r.length - 1].replace(/\r?\n([\t ]*)$/, ""); + var n = r.reduce(function(a, l) { + var h = l.match(/\n([\t ]+|(?!\s).)/g); + return h ? a.concat(h.map(function(c) { + var f, g; + return (g = (f = c.match(/[\t ]/g)) === null || f === void 0 ? void 0 : f.length) !== null && g !== void 0 ? g : 0; + })) : a; + }, []); + if (n.length) { + var o = new RegExp(` +[ ]{` + Math.min.apply(Math, n) + "}", "g"); + r = r.map(function(a) { + return a.replace(o, ` +`); + }); + } + r[0] = r[0].replace(/^\r?\n/, ""); + var s = r[0]; + return e.forEach(function(a, l) { + var h = s.match(/(?:^|\n)( *)$/), c = h ? h[1] : "", f = a; + typeof a == "string" && a.includes(` +`) && (f = String(a).split(` +`).map(function(g, p) { + return p === 0 ? g : "" + c + g; + }).join(` +`)), s += f + r[l + 1]; + }), s; +} +var sh = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function ah(t) { + return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; +} +var As = { exports: {} }; +(function(t, e) { + (function(i, r) { + t.exports = r(); + })(sh, function() { + var i = 1e3, r = 6e4, n = 36e5, o = "millisecond", s = "second", a = "minute", l = "hour", h = "day", c = "week", f = "month", g = "quarter", p = "year", _ = "date", k = "Invalid Date", M = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, q = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(E) { + var S = ["th", "st", "nd", "rd"], C = E % 100; + return "[" + E + (S[(C - 20) % 10] || S[C] || S[0]) + "]"; + } }, z = function(E, S, C) { + var O = String(E); + return !O || O.length >= S ? E : "" + Array(S + 1 - O.length).join(C) + E; + }, Q = { s: z, z: function(E) { + var S = -E.utcOffset(), C = Math.abs(S), O = Math.floor(C / 60), x = C % 60; + return (S <= 0 ? "+" : "-") + z(O, 2, "0") + ":" + z(x, 2, "0"); + }, m: function E(S, C) { + if (S.date() < C.date()) + return -E(C, S); + var O = 12 * (C.year() - S.year()) + (C.month() - S.month()), x = S.clone().add(O, f), D = C - x < 0, T = S.clone().add(O + (D ? -1 : 1), f); + return +(-(O + (C - x) / (D ? x - T : T - x)) || 0); + }, a: function(E) { + return E < 0 ? Math.ceil(E) || 0 : Math.floor(E); + }, p: function(E) { + return { M: f, y: p, w: c, d: h, D: _, h: l, m: a, s, ms: o, Q: g }[E] || String(E || "").toLowerCase().replace(/s$/, ""); + }, u: function(E) { + return E === void 0; + } }, X = "en", G = {}; + G[X] = v; + var W = function(E) { + return E instanceof Nt; + }, Vt = function E(S, C, O) { + var x; + if (!S) + return X; + if (typeof S == "string") { + var D = S.toLowerCase(); + G[D] && (x = D), C && (G[D] = C, x = D); + var T = S.split("-"); + if (!x && T.length > 1) + return E(T[0]); + } else { + var H = S.name; + G[H] = S, x = H; + } + return !O && x && (X = x), x || !O && X; + }, K = function(E, S) { + if (W(E)) + return E.clone(); + var C = typeof S == "object" ? S : {}; + return C.date = E, C.args = arguments, new Nt(C); + }, I = Q; + I.l = Vt, I.i = W, I.w = function(E, S) { + return K(E, { locale: S.$L, utc: S.$u, x: S.$x, $offset: S.$offset }); + }; + var Nt = function() { + function E(C) { + this.$L = Vt(C.locale, null, !0), this.parse(C); + } + var S = E.prototype; + return S.parse = function(C) { + this.$d = function(O) { + var x = O.date, D = O.utc; + if (x === null) + return /* @__PURE__ */ new Date(NaN); + if (I.u(x)) + return /* @__PURE__ */ new Date(); + if (x instanceof Date) + return new Date(x); + if (typeof x == "string" && !/Z$/i.test(x)) { + var T = x.match(M); + if (T) { + var H = T[2] - 1 || 0, R = (T[7] || "0").substring(0, 3); + return D ? new Date(Date.UTC(T[1], H, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, R)) : new Date(T[1], H, T[3] || 1, T[4] || 0, T[5] || 0, T[6] || 0, R); + } + } + return new Date(x); + }(C), this.$x = C.x || {}, this.init(); + }, S.init = function() { + var C = this.$d; + this.$y = C.getFullYear(), this.$M = C.getMonth(), this.$D = C.getDate(), this.$W = C.getDay(), this.$H = C.getHours(), this.$m = C.getMinutes(), this.$s = C.getSeconds(), this.$ms = C.getMilliseconds(); + }, S.$utils = function() { + return I; + }, S.isValid = function() { + return this.$d.toString() !== k; + }, S.isSame = function(C, O) { + var x = K(C); + return this.startOf(O) <= x && x <= this.endOf(O); + }, S.isAfter = function(C, O) { + return K(C) < this.startOf(O); + }, S.isBefore = function(C, O) { + return this.endOf(O) < K(C); + }, S.$g = function(C, O, x) { + return I.u(C) ? this[O] : this.set(x, C); + }, S.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, S.valueOf = function() { + return this.$d.getTime(); + }, S.startOf = function(C, O) { + var x = this, D = !!I.u(O) || O, T = I.p(C), H = function(Pt, it) { + var st = I.w(x.$u ? Date.UTC(x.$y, it, Pt) : new Date(x.$y, it, Pt), x); + return D ? st : st.endOf(h); + }, R = function(Pt, it) { + return I.w(x.toDate()[Pt].apply(x.toDate("s"), (D ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(it)), x); + }, U = this.$W, P = this.$M, ct = this.$D, pt = "set" + (this.$u ? "UTC" : ""); + switch (T) { + case p: + return D ? H(1, 0) : H(31, 11); + case f: + return D ? H(1, P) : H(0, P + 1); + case c: + var Xt = this.$locale().weekStart || 0, Rt = (U < Xt ? U + 7 : U) - Xt; + return H(D ? ct - Rt : ct + (6 - Rt), P); + case h: + case _: + return R(pt + "Hours", 0); + case l: + return R(pt + "Minutes", 1); + case a: + return R(pt + "Seconds", 2); + case s: + return R(pt + "Milliseconds", 3); + default: + return this.clone(); + } + }, S.endOf = function(C) { + return this.startOf(C, !1); + }, S.$set = function(C, O) { + var x, D = I.p(C), T = "set" + (this.$u ? "UTC" : ""), H = (x = {}, x[h] = T + "Date", x[_] = T + "Date", x[f] = T + "Month", x[p] = T + "FullYear", x[l] = T + "Hours", x[a] = T + "Minutes", x[s] = T + "Seconds", x[o] = T + "Milliseconds", x)[D], R = D === h ? this.$D + (O - this.$W) : O; + if (D === f || D === p) { + var U = this.clone().set(_, 1); + U.$d[H](R), U.init(), this.$d = U.set(_, Math.min(this.$D, U.daysInMonth())).$d; + } else + H && this.$d[H](R); + return this.init(), this; + }, S.set = function(C, O) { + return this.clone().$set(C, O); + }, S.get = function(C) { + return this[I.p(C)](); + }, S.add = function(C, O) { + var x, D = this; + C = Number(C); + var T = I.p(O), H = function(P) { + var ct = K(D); + return I.w(ct.date(ct.date() + Math.round(P * C)), D); + }; + if (T === f) + return this.set(f, this.$M + C); + if (T === p) + return this.set(p, this.$y + C); + if (T === h) + return H(1); + if (T === c) + return H(7); + var R = (x = {}, x[a] = r, x[l] = n, x[s] = i, x)[T] || 1, U = this.$d.getTime() + C * R; + return I.w(U, this); + }, S.subtract = function(C, O) { + return this.add(-1 * C, O); + }, S.format = function(C) { + var O = this, x = this.$locale(); + if (!this.isValid()) + return x.invalidDate || k; + var D = C || "YYYY-MM-DDTHH:mm:ssZ", T = I.z(this), H = this.$H, R = this.$m, U = this.$M, P = x.weekdays, ct = x.months, pt = function(it, st, St, Kt) { + return it && (it[st] || it(O, D)) || St[st].slice(0, Kt); + }, Xt = function(it) { + return I.s(H % 12 || 12, it, "0"); + }, Rt = x.meridiem || function(it, st, St) { + var Kt = it < 12 ? "AM" : "PM"; + return St ? Kt.toLowerCase() : Kt; + }, Pt = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: U + 1, MM: I.s(U + 1, 2, "0"), MMM: pt(x.monthsShort, U, ct, 3), MMMM: pt(ct, U), D: this.$D, DD: I.s(this.$D, 2, "0"), d: String(this.$W), dd: pt(x.weekdaysMin, this.$W, P, 2), ddd: pt(x.weekdaysShort, this.$W, P, 3), dddd: P[this.$W], H: String(H), HH: I.s(H, 2, "0"), h: Xt(1), hh: Xt(2), a: Rt(H, R, !0), A: Rt(H, R, !1), m: String(R), mm: I.s(R, 2, "0"), s: String(this.$s), ss: I.s(this.$s, 2, "0"), SSS: I.s(this.$ms, 3, "0"), Z: T }; + return D.replace(q, function(it, st) { + return st || Pt[it] || T.replace(":", ""); + }); + }, S.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, S.diff = function(C, O, x) { + var D, T = I.p(O), H = K(C), R = (H.utcOffset() - this.utcOffset()) * r, U = this - H, P = I.m(this, H); + return P = (D = {}, D[p] = P / 12, D[f] = P, D[g] = P / 3, D[c] = (U - R) / 6048e5, D[h] = (U - R) / 864e5, D[l] = U / n, D[a] = U / r, D[s] = U / i, D)[T] || U, x ? P : I.a(P); + }, S.daysInMonth = function() { + return this.endOf(f).$D; + }, S.$locale = function() { + return G[this.$L]; + }, S.locale = function(C, O) { + if (!C) + return this.$L; + var x = this.clone(), D = Vt(C, O, !0); + return D && (x.$L = D), x; + }, S.clone = function() { + return I.w(this.$d, this); + }, S.toDate = function() { + return new Date(this.valueOf()); + }, S.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, S.toISOString = function() { + return this.$d.toISOString(); + }, S.toString = function() { + return this.$d.toUTCString(); + }, E; + }(), At = Nt.prototype; + return K.prototype = At, [["$ms", o], ["$s", s], ["$m", a], ["$H", l], ["$W", h], ["$M", f], ["$y", p], ["$D", _]].forEach(function(E) { + At[E[1]] = function(S) { + return this.$g(S, E[0], E[1]); + }; + }), K.extend = function(E, S) { + return E.$i || (E(S, Nt, K), E.$i = !0), K; + }, K.locale = Vt, K.isDayjs = W, K.unix = function(E) { + return K(1e3 * E); + }, K.en = G[X], K.Ls = G, K.p = {}, K; + }); +})(As); +var lh = As.exports; +const hh = /* @__PURE__ */ ah(lh), Wt = { + trace: 0, + debug: 1, + info: 2, + warn: 3, + error: 4, + fatal: 5 +}, L = { + trace: (...t) => { + }, + debug: (...t) => { + }, + info: (...t) => { + }, + warn: (...t) => { + }, + error: (...t) => { + }, + fatal: (...t) => { + } +}, bn = function(t = "fatal") { + let e = Wt.fatal; + typeof t == "string" ? (t = t.toLowerCase(), t in Wt && (e = Wt[t])) : typeof t == "number" && (e = t), L.trace = () => { + }, L.debug = () => { + }, L.info = () => { + }, L.warn = () => { + }, L.error = () => { + }, L.fatal = () => { + }, e <= Wt.fatal && (L.fatal = console.error ? console.error.bind(console, yt("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", yt("FATAL"))), e <= Wt.error && (L.error = console.error ? console.error.bind(console, yt("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", yt("ERROR"))), e <= Wt.warn && (L.warn = console.warn ? console.warn.bind(console, yt("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", yt("WARN"))), e <= Wt.info && (L.info = console.info ? console.info.bind(console, yt("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", yt("INFO"))), e <= Wt.debug && (L.debug = console.debug ? console.debug.bind(console, yt("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", yt("DEBUG"))), e <= Wt.trace && (L.trace = console.debug ? console.debug.bind(console, yt("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", yt("TRACE"))); +}, yt = (t) => `%c${hh().format("ss.SSS")} : ${t} : `; +var Tn = {}; +Object.defineProperty(Tn, "__esModule", { value: !0 }); +var Es = Tn.sanitizeUrl = void 0, ch = /^([^\w]*)(javascript|data|vbscript)/im, uh = /&#(\w+)(^\w|;)?/g, fh = /&(newline|tab);/gi, dh = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, ph = /^.+(:|:)/gim, gh = [".", "/"]; +function mh(t) { + return gh.indexOf(t[0]) > -1; +} +function _h(t) { + return t.replace(uh, function(e, i) { + return String.fromCharCode(i); + }); +} +function yh(t) { + var e = _h(t || "").replace(fh, "").replace(dh, "").trim(); + if (!e) + return "about:blank"; + if (mh(e)) + return e; + var i = e.match(ph); + if (!i) + return e; + var r = i[0]; + return ch.test(r) ? "about:blank" : e; +} +Es = Tn.sanitizeUrl = yh; +var Ch = { value: () => { +} }; +function Ms() { + for (var t = 0, e = arguments.length, i = {}, r; t < e; ++t) { + if (!(r = arguments[t] + "") || r in i || /[\s.]/.test(r)) + throw new Error("illegal type: " + r); + i[r] = []; + } + return new Fi(i); +} +function Fi(t) { + this._ = t; +} +function xh(t, e) { + return t.trim().split(/^|\s+/).map(function(i) { + var r = "", n = i.indexOf("."); + if (n >= 0 && (r = i.slice(n + 1), i = i.slice(0, n)), i && !e.hasOwnProperty(i)) + throw new Error("unknown type: " + i); + return { type: i, name: r }; + }); +} +Fi.prototype = Ms.prototype = { + constructor: Fi, + on: function(t, e) { + var i = this._, r = xh(t + "", i), n, o = -1, s = r.length; + if (arguments.length < 2) { + for (; ++o < s; ) + if ((n = (t = r[o]).type) && (n = bh(i[n], t.name))) + return n; + return; + } + if (e != null && typeof e != "function") + throw new Error("invalid callback: " + e); + for (; ++o < s; ) + if (n = (t = r[o]).type) + i[n] = yo(i[n], t.name, e); + else if (e == null) + for (n in i) + i[n] = yo(i[n], t.name, null); + return this; + }, + copy: function() { + var t = {}, e = this._; + for (var i in e) + t[i] = e[i].slice(); + return new Fi(t); + }, + call: function(t, e) { + if ((n = arguments.length - 2) > 0) + for (var i = new Array(n), r = 0, n, o; r < n; ++r) + i[r] = arguments[r + 2]; + if (!this._.hasOwnProperty(t)) + throw new Error("unknown type: " + t); + for (o = this._[t], r = 0, n = o.length; r < n; ++r) + o[r].value.apply(e, i); + }, + apply: function(t, e, i) { + if (!this._.hasOwnProperty(t)) + throw new Error("unknown type: " + t); + for (var r = this._[t], n = 0, o = r.length; n < o; ++n) + r[n].value.apply(e, i); + } +}; +function bh(t, e) { + for (var i = 0, r = t.length, n; i < r; ++i) + if ((n = t[i]).name === e) + return n.value; +} +function yo(t, e, i) { + for (var r = 0, n = t.length; r < n; ++r) + if (t[r].name === e) { + t[r] = Ch, t = t.slice(0, r).concat(t.slice(r + 1)); + break; + } + return i != null && t.push({ name: e, value: i }), t; +} +var Zr = "http://www.w3.org/1999/xhtml"; +const Co = { + svg: "http://www.w3.org/2000/svg", + xhtml: Zr, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" +}; +function ar(t) { + var e = t += "", i = e.indexOf(":"); + return i >= 0 && (e = t.slice(0, i)) !== "xmlns" && (t = t.slice(i + 1)), Co.hasOwnProperty(e) ? { space: Co[e], local: t } : t; +} +function Th(t) { + return function() { + var e = this.ownerDocument, i = this.namespaceURI; + return i === Zr && e.documentElement.namespaceURI === Zr ? e.createElement(t) : e.createElementNS(i, t); + }; +} +function Sh(t) { + return function() { + return this.ownerDocument.createElementNS(t.space, t.local); + }; +} +function Os(t) { + var e = ar(t); + return (e.local ? Sh : Th)(e); +} +function vh() { +} +function Sn(t) { + return t == null ? vh : function() { + return this.querySelector(t); + }; +} +function kh(t) { + typeof t != "function" && (t = Sn(t)); + for (var e = this._groups, i = e.length, r = new Array(i), n = 0; n < i; ++n) + for (var o = e[n], s = o.length, a = r[n] = new Array(s), l, h, c = 0; c < s; ++c) + (l = o[c]) && (h = t.call(l, l.__data__, c, o)) && ("__data__" in l && (h.__data__ = l.__data__), a[c] = h); + return new mt(r, this._parents); +} +function wh(t) { + return t == null ? [] : Array.isArray(t) ? t : Array.from(t); +} +function Bh() { + return []; +} +function $s(t) { + return t == null ? Bh : function() { + return this.querySelectorAll(t); + }; +} +function Fh(t) { + return function() { + return wh(t.apply(this, arguments)); + }; +} +function Lh(t) { + typeof t == "function" ? t = Fh(t) : t = $s(t); + for (var e = this._groups, i = e.length, r = [], n = [], o = 0; o < i; ++o) + for (var s = e[o], a = s.length, l, h = 0; h < a; ++h) + (l = s[h]) && (r.push(t.call(l, l.__data__, h, s)), n.push(l)); + return new mt(r, n); +} +function Is(t) { + return function() { + return this.matches(t); + }; +} +function Ds(t) { + return function(e) { + return e.matches(t); + }; +} +var Ah = Array.prototype.find; +function Eh(t) { + return function() { + return Ah.call(this.children, t); + }; +} +function Mh() { + return this.firstElementChild; +} +function Oh(t) { + return this.select(t == null ? Mh : Eh(typeof t == "function" ? t : Ds(t))); +} +var $h = Array.prototype.filter; +function Ih() { + return Array.from(this.children); +} +function Dh(t) { + return function() { + return $h.call(this.children, t); + }; +} +function Nh(t) { + return this.selectAll(t == null ? Ih : Dh(typeof t == "function" ? t : Ds(t))); +} +function Rh(t) { + typeof t != "function" && (t = Is(t)); + for (var e = this._groups, i = e.length, r = new Array(i), n = 0; n < i; ++n) + for (var o = e[n], s = o.length, a = r[n] = [], l, h = 0; h < s; ++h) + (l = o[h]) && t.call(l, l.__data__, h, o) && a.push(l); + return new mt(r, this._parents); +} +function Ns(t) { + return new Array(t.length); +} +function Ph() { + return new mt(this._enter || this._groups.map(Ns), this._parents); +} +function Ri(t, e) { + this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e; +} +Ri.prototype = { + constructor: Ri, + appendChild: function(t) { + return this._parent.insertBefore(t, this._next); + }, + insertBefore: function(t, e) { + return this._parent.insertBefore(t, e); + }, + querySelector: function(t) { + return this._parent.querySelector(t); + }, + querySelectorAll: function(t) { + return this._parent.querySelectorAll(t); + } +}; +function qh(t) { + return function() { + return t; + }; +} +function zh(t, e, i, r, n, o) { + for (var s = 0, a, l = e.length, h = o.length; s < h; ++s) + (a = e[s]) ? (a.__data__ = o[s], r[s] = a) : i[s] = new Ri(t, o[s]); + for (; s < l; ++s) + (a = e[s]) && (n[s] = a); +} +function Wh(t, e, i, r, n, o, s) { + var a, l, h = /* @__PURE__ */ new Map(), c = e.length, f = o.length, g = new Array(c), p; + for (a = 0; a < c; ++a) + (l = e[a]) && (g[a] = p = s.call(l, l.__data__, a, e) + "", h.has(p) ? n[a] = l : h.set(p, l)); + for (a = 0; a < f; ++a) + p = s.call(t, o[a], a, o) + "", (l = h.get(p)) ? (r[a] = l, l.__data__ = o[a], h.delete(p)) : i[a] = new Ri(t, o[a]); + for (a = 0; a < c; ++a) + (l = e[a]) && h.get(g[a]) === l && (n[a] = l); +} +function Hh(t) { + return t.__data__; +} +function jh(t, e) { + if (!arguments.length) + return Array.from(this, Hh); + var i = e ? Wh : zh, r = this._parents, n = this._groups; + typeof t != "function" && (t = qh(t)); + for (var o = n.length, s = new Array(o), a = new Array(o), l = new Array(o), h = 0; h < o; ++h) { + var c = r[h], f = n[h], g = f.length, p = Uh(t.call(c, c && c.__data__, h, r)), _ = p.length, k = a[h] = new Array(_), M = s[h] = new Array(_), q = l[h] = new Array(g); + i(c, f, k, M, q, p, e); + for (var v = 0, z = 0, Q, X; v < _; ++v) + if (Q = k[v]) { + for (v >= z && (z = v + 1); !(X = M[z]) && ++z < _; ) + ; + Q._next = X || null; + } + } + return s = new mt(s, r), s._enter = a, s._exit = l, s; +} +function Uh(t) { + return typeof t == "object" && "length" in t ? t : Array.from(t); +} +function Yh() { + return new mt(this._exit || this._groups.map(Ns), this._parents); +} +function Gh(t, e, i) { + var r = this.enter(), n = this, o = this.exit(); + return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (n = e(n), n && (n = n.selection())), i == null ? o.remove() : i(o), r && n ? r.merge(n).order() : n; +} +function Vh(t) { + for (var e = t.selection ? t.selection() : t, i = this._groups, r = e._groups, n = i.length, o = r.length, s = Math.min(n, o), a = new Array(n), l = 0; l < s; ++l) + for (var h = i[l], c = r[l], f = h.length, g = a[l] = new Array(f), p, _ = 0; _ < f; ++_) + (p = h[_] || c[_]) && (g[_] = p); + for (; l < n; ++l) + a[l] = i[l]; + return new mt(a, this._parents); +} +function Xh() { + for (var t = this._groups, e = -1, i = t.length; ++e < i; ) + for (var r = t[e], n = r.length - 1, o = r[n], s; --n >= 0; ) + (s = r[n]) && (o && s.compareDocumentPosition(o) ^ 4 && o.parentNode.insertBefore(s, o), o = s); + return this; +} +function Kh(t) { + t || (t = Zh); + function e(f, g) { + return f && g ? t(f.__data__, g.__data__) : !f - !g; + } + for (var i = this._groups, r = i.length, n = new Array(r), o = 0; o < r; ++o) { + for (var s = i[o], a = s.length, l = n[o] = new Array(a), h, c = 0; c < a; ++c) + (h = s[c]) && (l[c] = h); + l.sort(e); + } + return new mt(n, this._parents).order(); +} +function Zh(t, e) { + return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN; +} +function Jh() { + var t = arguments[0]; + return arguments[0] = this, t.apply(null, arguments), this; +} +function Qh() { + return Array.from(this); +} +function tc() { + for (var t = this._groups, e = 0, i = t.length; e < i; ++e) + for (var r = t[e], n = 0, o = r.length; n < o; ++n) { + var s = r[n]; + if (s) + return s; + } + return null; +} +function ec() { + let t = 0; + for (const e of this) + ++t; + return t; +} +function ic() { + return !this.node(); +} +function rc(t) { + for (var e = this._groups, i = 0, r = e.length; i < r; ++i) + for (var n = e[i], o = 0, s = n.length, a; o < s; ++o) + (a = n[o]) && t.call(a, a.__data__, o, n); + return this; +} +function nc(t) { + return function() { + this.removeAttribute(t); + }; +} +function oc(t) { + return function() { + this.removeAttributeNS(t.space, t.local); + }; +} +function sc(t, e) { + return function() { + this.setAttribute(t, e); + }; +} +function ac(t, e) { + return function() { + this.setAttributeNS(t.space, t.local, e); + }; +} +function lc(t, e) { + return function() { + var i = e.apply(this, arguments); + i == null ? this.removeAttribute(t) : this.setAttribute(t, i); + }; +} +function hc(t, e) { + return function() { + var i = e.apply(this, arguments); + i == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, i); + }; +} +function cc(t, e) { + var i = ar(t); + if (arguments.length < 2) { + var r = this.node(); + return i.local ? r.getAttributeNS(i.space, i.local) : r.getAttribute(i); + } + return this.each((e == null ? i.local ? oc : nc : typeof e == "function" ? i.local ? hc : lc : i.local ? ac : sc)(i, e)); +} +function Rs(t) { + return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView; +} +function uc(t) { + return function() { + this.style.removeProperty(t); + }; +} +function fc(t, e, i) { + return function() { + this.style.setProperty(t, e, i); + }; +} +function dc(t, e, i) { + return function() { + var r = e.apply(this, arguments); + r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, i); + }; +} +function pc(t, e, i) { + return arguments.length > 1 ? this.each((e == null ? uc : typeof e == "function" ? dc : fc)(t, e, i ?? "")) : Fe(this.node(), t); +} +function Fe(t, e) { + return t.style.getPropertyValue(e) || Rs(t).getComputedStyle(t, null).getPropertyValue(e); +} +function gc(t) { + return function() { + delete this[t]; + }; +} +function mc(t, e) { + return function() { + this[t] = e; + }; +} +function _c(t, e) { + return function() { + var i = e.apply(this, arguments); + i == null ? delete this[t] : this[t] = i; + }; +} +function yc(t, e) { + return arguments.length > 1 ? this.each((e == null ? gc : typeof e == "function" ? _c : mc)(t, e)) : this.node()[t]; +} +function Ps(t) { + return t.trim().split(/^|\s+/); +} +function vn(t) { + return t.classList || new qs(t); +} +function qs(t) { + this._node = t, this._names = Ps(t.getAttribute("class") || ""); +} +qs.prototype = { + add: function(t) { + var e = this._names.indexOf(t); + e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" "))); + }, + remove: function(t) { + var e = this._names.indexOf(t); + e >= 0 && (this._names.splice(e, 1), this._node.setAttribute("class", this._names.join(" "))); + }, + contains: function(t) { + return this._names.indexOf(t) >= 0; + } +}; +function zs(t, e) { + for (var i = vn(t), r = -1, n = e.length; ++r < n; ) + i.add(e[r]); +} +function Ws(t, e) { + for (var i = vn(t), r = -1, n = e.length; ++r < n; ) + i.remove(e[r]); +} +function Cc(t) { + return function() { + zs(this, t); + }; +} +function xc(t) { + return function() { + Ws(this, t); + }; +} +function bc(t, e) { + return function() { + (e.apply(this, arguments) ? zs : Ws)(this, t); + }; +} +function Tc(t, e) { + var i = Ps(t + ""); + if (arguments.length < 2) { + for (var r = vn(this.node()), n = -1, o = i.length; ++n < o; ) + if (!r.contains(i[n])) + return !1; + return !0; + } + return this.each((typeof e == "function" ? bc : e ? Cc : xc)(i, e)); +} +function Sc() { + this.textContent = ""; +} +function vc(t) { + return function() { + this.textContent = t; + }; +} +function kc(t) { + return function() { + var e = t.apply(this, arguments); + this.textContent = e ?? ""; + }; +} +function wc(t) { + return arguments.length ? this.each(t == null ? Sc : (typeof t == "function" ? kc : vc)(t)) : this.node().textContent; +} +function Bc() { + this.innerHTML = ""; +} +function Fc(t) { + return function() { + this.innerHTML = t; + }; +} +function Lc(t) { + return function() { + var e = t.apply(this, arguments); + this.innerHTML = e ?? ""; + }; +} +function Ac(t) { + return arguments.length ? this.each(t == null ? Bc : (typeof t == "function" ? Lc : Fc)(t)) : this.node().innerHTML; +} +function Ec() { + this.nextSibling && this.parentNode.appendChild(this); +} +function Mc() { + return this.each(Ec); +} +function Oc() { + this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild); +} +function $c() { + return this.each(Oc); +} +function Ic(t) { + var e = typeof t == "function" ? t : Os(t); + return this.select(function() { + return this.appendChild(e.apply(this, arguments)); + }); +} +function Dc() { + return null; +} +function Nc(t, e) { + var i = typeof t == "function" ? t : Os(t), r = e == null ? Dc : typeof e == "function" ? e : Sn(e); + return this.select(function() { + return this.insertBefore(i.apply(this, arguments), r.apply(this, arguments) || null); + }); +} +function Rc() { + var t = this.parentNode; + t && t.removeChild(this); +} +function Pc() { + return this.each(Rc); +} +function qc() { + var t = this.cloneNode(!1), e = this.parentNode; + return e ? e.insertBefore(t, this.nextSibling) : t; +} +function zc() { + var t = this.cloneNode(!0), e = this.parentNode; + return e ? e.insertBefore(t, this.nextSibling) : t; +} +function Wc(t) { + return this.select(t ? zc : qc); +} +function Hc(t) { + return arguments.length ? this.property("__data__", t) : this.node().__data__; +} +function jc(t) { + return function(e) { + t.call(this, e, this.__data__); + }; +} +function Uc(t) { + return t.trim().split(/^|\s+/).map(function(e) { + var i = "", r = e.indexOf("."); + return r >= 0 && (i = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: i }; + }); +} +function Yc(t) { + return function() { + var e = this.__on; + if (e) { + for (var i = 0, r = -1, n = e.length, o; i < n; ++i) + o = e[i], (!t.type || o.type === t.type) && o.name === t.name ? this.removeEventListener(o.type, o.listener, o.options) : e[++r] = o; + ++r ? e.length = r : delete this.__on; + } + }; +} +function Gc(t, e, i) { + return function() { + var r = this.__on, n, o = jc(e); + if (r) { + for (var s = 0, a = r.length; s < a; ++s) + if ((n = r[s]).type === t.type && n.name === t.name) { + this.removeEventListener(n.type, n.listener, n.options), this.addEventListener(n.type, n.listener = o, n.options = i), n.value = e; + return; + } + } + this.addEventListener(t.type, o, i), n = { type: t.type, name: t.name, value: e, listener: o, options: i }, r ? r.push(n) : this.__on = [n]; + }; +} +function Vc(t, e, i) { + var r = Uc(t + ""), n, o = r.length, s; + if (arguments.length < 2) { + var a = this.node().__on; + if (a) { + for (var l = 0, h = a.length, c; l < h; ++l) + for (n = 0, c = a[l]; n < o; ++n) + if ((s = r[n]).type === c.type && s.name === c.name) + return c.value; + } + return; + } + for (a = e ? Gc : Yc, n = 0; n < o; ++n) + this.each(a(r[n], e, i)); + return this; +} +function Hs(t, e, i) { + var r = Rs(t), n = r.CustomEvent; + typeof n == "function" ? n = new n(e, i) : (n = r.document.createEvent("Event"), i ? (n.initEvent(e, i.bubbles, i.cancelable), n.detail = i.detail) : n.initEvent(e, !1, !1)), t.dispatchEvent(n); +} +function Xc(t, e) { + return function() { + return Hs(this, t, e); + }; +} +function Kc(t, e) { + return function() { + return Hs(this, t, e.apply(this, arguments)); + }; +} +function Zc(t, e) { + return this.each((typeof e == "function" ? Kc : Xc)(t, e)); +} +function* Jc() { + for (var t = this._groups, e = 0, i = t.length; e < i; ++e) + for (var r = t[e], n = 0, o = r.length, s; n < o; ++n) + (s = r[n]) && (yield s); +} +var js = [null]; +function mt(t, e) { + this._groups = t, this._parents = e; +} +function li() { + return new mt([[document.documentElement]], js); +} +function Qc() { + return this; +} +mt.prototype = li.prototype = { + constructor: mt, + select: kh, + selectAll: Lh, + selectChild: Oh, + selectChildren: Nh, + filter: Rh, + data: jh, + enter: Ph, + exit: Yh, + join: Gh, + merge: Vh, + selection: Qc, + order: Xh, + sort: Kh, + call: Jh, + nodes: Qh, + node: tc, + size: ec, + empty: ic, + each: rc, + attr: cc, + style: pc, + property: yc, + classed: Tc, + text: wc, + html: Ac, + raise: Mc, + lower: $c, + append: Ic, + insert: Nc, + remove: Pc, + clone: Wc, + datum: Hc, + on: Vc, + dispatch: Zc, + [Symbol.iterator]: Jc +}; +function Ct(t) { + return typeof t == "string" ? new mt([[document.querySelector(t)]], [document.documentElement]) : new mt([[t]], js); +} +function kn(t, e, i) { + t.prototype = e.prototype = i, i.constructor = t; +} +function Us(t, e) { + var i = Object.create(t.prototype); + for (var r in e) + i[r] = e[r]; + return i; +} +function hi() { +} +var Ze = 0.7, Pi = 1 / Ze, Be = "\\s*([+-]?\\d+)\\s*", Je = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Mt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", tu = /^#([0-9a-f]{3,8})$/, eu = new RegExp(`^rgb\\(${Be},${Be},${Be}\\)$`), iu = new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`), ru = new RegExp(`^rgba\\(${Be},${Be},${Be},${Je}\\)$`), nu = new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${Je}\\)$`), ou = new RegExp(`^hsl\\(${Je},${Mt},${Mt}\\)$`), su = new RegExp(`^hsla\\(${Je},${Mt},${Mt},${Je}\\)$`), xo = { + aliceblue: 15792383, + antiquewhite: 16444375, + aqua: 65535, + aquamarine: 8388564, + azure: 15794175, + beige: 16119260, + bisque: 16770244, + black: 0, + blanchedalmond: 16772045, + blue: 255, + blueviolet: 9055202, + brown: 10824234, + burlywood: 14596231, + cadetblue: 6266528, + chartreuse: 8388352, + chocolate: 13789470, + coral: 16744272, + cornflowerblue: 6591981, + cornsilk: 16775388, + crimson: 14423100, + cyan: 65535, + darkblue: 139, + darkcyan: 35723, + darkgoldenrod: 12092939, + darkgray: 11119017, + darkgreen: 25600, + darkgrey: 11119017, + darkkhaki: 12433259, + darkmagenta: 9109643, + darkolivegreen: 5597999, + darkorange: 16747520, + darkorchid: 10040012, + darkred: 9109504, + darksalmon: 15308410, + darkseagreen: 9419919, + darkslateblue: 4734347, + darkslategray: 3100495, + darkslategrey: 3100495, + darkturquoise: 52945, + darkviolet: 9699539, + deeppink: 16716947, + deepskyblue: 49151, + dimgray: 6908265, + dimgrey: 6908265, + dodgerblue: 2003199, + firebrick: 11674146, + floralwhite: 16775920, + forestgreen: 2263842, + fuchsia: 16711935, + gainsboro: 14474460, + ghostwhite: 16316671, + gold: 16766720, + goldenrod: 14329120, + gray: 8421504, + green: 32768, + greenyellow: 11403055, + grey: 8421504, + honeydew: 15794160, + hotpink: 16738740, + indianred: 13458524, + indigo: 4915330, + ivory: 16777200, + khaki: 15787660, + lavender: 15132410, + lavenderblush: 16773365, + lawngreen: 8190976, + lemonchiffon: 16775885, + lightblue: 11393254, + lightcoral: 15761536, + lightcyan: 14745599, + lightgoldenrodyellow: 16448210, + lightgray: 13882323, + lightgreen: 9498256, + lightgrey: 13882323, + lightpink: 16758465, + lightsalmon: 16752762, + lightseagreen: 2142890, + lightskyblue: 8900346, + lightslategray: 7833753, + lightslategrey: 7833753, + lightsteelblue: 11584734, + lightyellow: 16777184, + lime: 65280, + limegreen: 3329330, + linen: 16445670, + magenta: 16711935, + maroon: 8388608, + mediumaquamarine: 6737322, + mediumblue: 205, + mediumorchid: 12211667, + mediumpurple: 9662683, + mediumseagreen: 3978097, + mediumslateblue: 8087790, + mediumspringgreen: 64154, + mediumturquoise: 4772300, + mediumvioletred: 13047173, + midnightblue: 1644912, + mintcream: 16121850, + mistyrose: 16770273, + moccasin: 16770229, + navajowhite: 16768685, + navy: 128, + oldlace: 16643558, + olive: 8421376, + olivedrab: 7048739, + orange: 16753920, + orangered: 16729344, + orchid: 14315734, + palegoldenrod: 15657130, + palegreen: 10025880, + paleturquoise: 11529966, + palevioletred: 14381203, + papayawhip: 16773077, + peachpuff: 16767673, + peru: 13468991, + pink: 16761035, + plum: 14524637, + powderblue: 11591910, + purple: 8388736, + rebeccapurple: 6697881, + red: 16711680, + rosybrown: 12357519, + royalblue: 4286945, + saddlebrown: 9127187, + salmon: 16416882, + sandybrown: 16032864, + seagreen: 3050327, + seashell: 16774638, + sienna: 10506797, + silver: 12632256, + skyblue: 8900331, + slateblue: 6970061, + slategray: 7372944, + slategrey: 7372944, + snow: 16775930, + springgreen: 65407, + steelblue: 4620980, + tan: 13808780, + teal: 32896, + thistle: 14204888, + tomato: 16737095, + turquoise: 4251856, + violet: 15631086, + wheat: 16113331, + white: 16777215, + whitesmoke: 16119285, + yellow: 16776960, + yellowgreen: 10145074 +}; +kn(hi, Qe, { + copy(t) { + return Object.assign(new this.constructor(), this, t); + }, + displayable() { + return this.rgb().displayable(); + }, + hex: bo, + // Deprecated! Use color.formatHex. + formatHex: bo, + formatHex8: au, + formatHsl: lu, + formatRgb: To, + toString: To +}); +function bo() { + return this.rgb().formatHex(); +} +function au() { + return this.rgb().formatHex8(); +} +function lu() { + return Ys(this).formatHsl(); +} +function To() { + return this.rgb().formatRgb(); +} +function Qe(t) { + var e, i; + return t = (t + "").trim().toLowerCase(), (e = tu.exec(t)) ? (i = e[1].length, e = parseInt(e[1], 16), i === 6 ? So(e) : i === 3 ? new ft(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : i === 8 ? Ci(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : i === 4 ? Ci(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = eu.exec(t)) ? new ft(e[1], e[2], e[3], 1) : (e = iu.exec(t)) ? new ft(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = ru.exec(t)) ? Ci(e[1], e[2], e[3], e[4]) : (e = nu.exec(t)) ? Ci(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = ou.exec(t)) ? wo(e[1], e[2] / 100, e[3] / 100, 1) : (e = su.exec(t)) ? wo(e[1], e[2] / 100, e[3] / 100, e[4]) : xo.hasOwnProperty(t) ? So(xo[t]) : t === "transparent" ? new ft(NaN, NaN, NaN, 0) : null; +} +function So(t) { + return new ft(t >> 16 & 255, t >> 8 & 255, t & 255, 1); +} +function Ci(t, e, i, r) { + return r <= 0 && (t = e = i = NaN), new ft(t, e, i, r); +} +function hu(t) { + return t instanceof hi || (t = Qe(t)), t ? (t = t.rgb(), new ft(t.r, t.g, t.b, t.opacity)) : new ft(); +} +function Jr(t, e, i, r) { + return arguments.length === 1 ? hu(t) : new ft(t, e, i, r ?? 1); +} +function ft(t, e, i, r) { + this.r = +t, this.g = +e, this.b = +i, this.opacity = +r; +} +kn(ft, Jr, Us(hi, { + brighter(t) { + return t = t == null ? Pi : Math.pow(Pi, t), new ft(this.r * t, this.g * t, this.b * t, this.opacity); + }, + darker(t) { + return t = t == null ? Ze : Math.pow(Ze, t), new ft(this.r * t, this.g * t, this.b * t, this.opacity); + }, + rgb() { + return this; + }, + clamp() { + return new ft(he(this.r), he(this.g), he(this.b), qi(this.opacity)); + }, + displayable() { + return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1; + }, + hex: vo, + // Deprecated! Use color.formatHex. + formatHex: vo, + formatHex8: cu, + formatRgb: ko, + toString: ko +})); +function vo() { + return `#${le(this.r)}${le(this.g)}${le(this.b)}`; +} +function cu() { + return `#${le(this.r)}${le(this.g)}${le(this.b)}${le((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; +} +function ko() { + const t = qi(this.opacity); + return `${t === 1 ? "rgb(" : "rgba("}${he(this.r)}, ${he(this.g)}, ${he(this.b)}${t === 1 ? ")" : `, ${t})`}`; +} +function qi(t) { + return isNaN(t) ? 1 : Math.max(0, Math.min(1, t)); +} +function he(t) { + return Math.max(0, Math.min(255, Math.round(t) || 0)); +} +function le(t) { + return t = he(t), (t < 16 ? "0" : "") + t.toString(16); +} +function wo(t, e, i, r) { + return r <= 0 ? t = e = i = NaN : i <= 0 || i >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new kt(t, e, i, r); +} +function Ys(t) { + if (t instanceof kt) + return new kt(t.h, t.s, t.l, t.opacity); + if (t instanceof hi || (t = Qe(t)), !t) + return new kt(); + if (t instanceof kt) + return t; + t = t.rgb(); + var e = t.r / 255, i = t.g / 255, r = t.b / 255, n = Math.min(e, i, r), o = Math.max(e, i, r), s = NaN, a = o - n, l = (o + n) / 2; + return a ? (e === o ? s = (i - r) / a + (i < r) * 6 : i === o ? s = (r - e) / a + 2 : s = (e - i) / a + 4, a /= l < 0.5 ? o + n : 2 - o - n, s *= 60) : a = l > 0 && l < 1 ? 0 : s, new kt(s, a, l, t.opacity); +} +function uu(t, e, i, r) { + return arguments.length === 1 ? Ys(t) : new kt(t, e, i, r ?? 1); +} +function kt(t, e, i, r) { + this.h = +t, this.s = +e, this.l = +i, this.opacity = +r; +} +kn(kt, uu, Us(hi, { + brighter(t) { + return t = t == null ? Pi : Math.pow(Pi, t), new kt(this.h, this.s, this.l * t, this.opacity); + }, + darker(t) { + return t = t == null ? Ze : Math.pow(Ze, t), new kt(this.h, this.s, this.l * t, this.opacity); + }, + rgb() { + var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, i = this.l, r = i + (i < 0.5 ? i : 1 - i) * e, n = 2 * i - r; + return new ft( + Ir(t >= 240 ? t - 240 : t + 120, n, r), + Ir(t, n, r), + Ir(t < 120 ? t + 240 : t - 120, n, r), + this.opacity + ); + }, + clamp() { + return new kt(Bo(this.h), xi(this.s), xi(this.l), qi(this.opacity)); + }, + displayable() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1; + }, + formatHsl() { + const t = qi(this.opacity); + return `${t === 1 ? "hsl(" : "hsla("}${Bo(this.h)}, ${xi(this.s) * 100}%, ${xi(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`; + } +})); +function Bo(t) { + return t = (t || 0) % 360, t < 0 ? t + 360 : t; +} +function xi(t) { + return Math.max(0, Math.min(1, t || 0)); +} +function Ir(t, e, i) { + return (t < 60 ? e + (i - e) * t / 60 : t < 180 ? i : t < 240 ? e + (i - e) * (240 - t) / 60 : e) * 255; +} +const wn = (t) => () => t; +function Gs(t, e) { + return function(i) { + return t + i * e; + }; +} +function fu(t, e, i) { + return t = Math.pow(t, i), e = Math.pow(e, i) - t, i = 1 / i, function(r) { + return Math.pow(t + r * e, i); + }; +} +function Zb(t, e) { + var i = e - t; + return i ? Gs(t, i > 180 || i < -180 ? i - 360 * Math.round(i / 360) : i) : wn(isNaN(t) ? e : t); +} +function du(t) { + return (t = +t) == 1 ? Vs : function(e, i) { + return i - e ? fu(e, i, t) : wn(isNaN(e) ? i : e); + }; +} +function Vs(t, e) { + var i = e - t; + return i ? Gs(t, i) : wn(isNaN(t) ? e : t); +} +const Fo = function t(e) { + var i = du(e); + function r(n, o) { + var s = i((n = Jr(n)).r, (o = Jr(o)).r), a = i(n.g, o.g), l = i(n.b, o.b), h = Vs(n.opacity, o.opacity); + return function(c) { + return n.r = s(c), n.g = a(c), n.b = l(c), n.opacity = h(c), n + ""; + }; + } + return r.gamma = t, r; +}(1); +function Qt(t, e) { + return t = +t, e = +e, function(i) { + return t * (1 - i) + e * i; + }; +} +var Qr = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Dr = new RegExp(Qr.source, "g"); +function pu(t) { + return function() { + return t; + }; +} +function gu(t) { + return function(e) { + return t(e) + ""; + }; +} +function mu(t, e) { + var i = Qr.lastIndex = Dr.lastIndex = 0, r, n, o, s = -1, a = [], l = []; + for (t = t + "", e = e + ""; (r = Qr.exec(t)) && (n = Dr.exec(e)); ) + (o = n.index) > i && (o = e.slice(i, o), a[s] ? a[s] += o : a[++s] = o), (r = r[0]) === (n = n[0]) ? a[s] ? a[s] += n : a[++s] = n : (a[++s] = null, l.push({ i: s, x: Qt(r, n) })), i = Dr.lastIndex; + return i < e.length && (o = e.slice(i), a[s] ? a[s] += o : a[++s] = o), a.length < 2 ? l[0] ? gu(l[0].x) : pu(e) : (e = l.length, function(h) { + for (var c = 0, f; c < e; ++c) + a[(f = l[c]).i] = f.x(h); + return a.join(""); + }); +} +var Lo = 180 / Math.PI, tn = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; +function Xs(t, e, i, r, n, o) { + var s, a, l; + return (s = Math.sqrt(t * t + e * e)) && (t /= s, e /= s), (l = t * i + e * r) && (i -= t * l, r -= e * l), (a = Math.sqrt(i * i + r * r)) && (i /= a, r /= a, l /= a), t * r < e * i && (t = -t, e = -e, l = -l, s = -s), { + translateX: n, + translateY: o, + rotate: Math.atan2(e, t) * Lo, + skewX: Math.atan(l) * Lo, + scaleX: s, + scaleY: a + }; +} +var bi; +function _u(t) { + const e = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + ""); + return e.isIdentity ? tn : Xs(e.a, e.b, e.c, e.d, e.e, e.f); +} +function yu(t) { + return t == null || (bi || (bi = document.createElementNS("http://www.w3.org/2000/svg", "g")), bi.setAttribute("transform", t), !(t = bi.transform.baseVal.consolidate())) ? tn : (t = t.matrix, Xs(t.a, t.b, t.c, t.d, t.e, t.f)); +} +function Ks(t, e, i, r) { + function n(h) { + return h.length ? h.pop() + " " : ""; + } + function o(h, c, f, g, p, _) { + if (h !== f || c !== g) { + var k = p.push("translate(", null, e, null, i); + _.push({ i: k - 4, x: Qt(h, f) }, { i: k - 2, x: Qt(c, g) }); + } else + (f || g) && p.push("translate(" + f + e + g + i); + } + function s(h, c, f, g) { + h !== c ? (h - c > 180 ? c += 360 : c - h > 180 && (h += 360), g.push({ i: f.push(n(f) + "rotate(", null, r) - 2, x: Qt(h, c) })) : c && f.push(n(f) + "rotate(" + c + r); + } + function a(h, c, f, g) { + h !== c ? g.push({ i: f.push(n(f) + "skewX(", null, r) - 2, x: Qt(h, c) }) : c && f.push(n(f) + "skewX(" + c + r); + } + function l(h, c, f, g, p, _) { + if (h !== f || c !== g) { + var k = p.push(n(p) + "scale(", null, ",", null, ")"); + _.push({ i: k - 4, x: Qt(h, f) }, { i: k - 2, x: Qt(c, g) }); + } else + (f !== 1 || g !== 1) && p.push(n(p) + "scale(" + f + "," + g + ")"); + } + return function(h, c) { + var f = [], g = []; + return h = t(h), c = t(c), o(h.translateX, h.translateY, c.translateX, c.translateY, f, g), s(h.rotate, c.rotate, f, g), a(h.skewX, c.skewX, f, g), l(h.scaleX, h.scaleY, c.scaleX, c.scaleY, f, g), h = c = null, function(p) { + for (var _ = -1, k = g.length, M; ++_ < k; ) + f[(M = g[_]).i] = M.x(p); + return f.join(""); + }; + }; +} +var Cu = Ks(_u, "px, ", "px)", "deg)"), xu = Ks(yu, ", ", ")", ")"), Le = 0, We = 0, Re = 0, Zs = 1e3, zi, He, Wi = 0, fe = 0, lr = 0, ti = typeof performance == "object" && performance.now ? performance : Date, Js = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) { + setTimeout(t, 17); +}; +function Bn() { + return fe || (Js(bu), fe = ti.now() + lr); +} +function bu() { + fe = 0; +} +function Hi() { + this._call = this._time = this._next = null; +} +Hi.prototype = Qs.prototype = { + constructor: Hi, + restart: function(t, e, i) { + if (typeof t != "function") + throw new TypeError("callback is not a function"); + i = (i == null ? Bn() : +i) + (e == null ? 0 : +e), !this._next && He !== this && (He ? He._next = this : zi = this, He = this), this._call = t, this._time = i, en(); + }, + stop: function() { + this._call && (this._call = null, this._time = 1 / 0, en()); + } +}; +function Qs(t, e, i) { + var r = new Hi(); + return r.restart(t, e, i), r; +} +function Tu() { + Bn(), ++Le; + for (var t = zi, e; t; ) + (e = fe - t._time) >= 0 && t._call.call(void 0, e), t = t._next; + --Le; +} +function Ao() { + fe = (Wi = ti.now()) + lr, Le = We = 0; + try { + Tu(); + } finally { + Le = 0, vu(), fe = 0; + } +} +function Su() { + var t = ti.now(), e = t - Wi; + e > Zs && (lr -= e, Wi = t); +} +function vu() { + for (var t, e = zi, i, r = 1 / 0; e; ) + e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (i = e._next, e._next = null, e = t ? t._next = i : zi = i); + He = t, en(r); +} +function en(t) { + if (!Le) { + We && (We = clearTimeout(We)); + var e = t - fe; + e > 24 ? (t < 1 / 0 && (We = setTimeout(Ao, t - ti.now() - lr)), Re && (Re = clearInterval(Re))) : (Re || (Wi = ti.now(), Re = setInterval(Su, Zs)), Le = 1, Js(Ao)); + } +} +function Eo(t, e, i) { + var r = new Hi(); + return e = e == null ? 0 : +e, r.restart((n) => { + r.stop(), t(n + e); + }, e, i), r; +} +var ku = Ms("start", "end", "cancel", "interrupt"), wu = [], ta = 0, Mo = 1, rn = 2, Li = 3, Oo = 4, nn = 5, Ai = 6; +function hr(t, e, i, r, n, o) { + var s = t.__transition; + if (!s) + t.__transition = {}; + else if (i in s) + return; + Bu(t, i, { + name: e, + index: r, + // For context during callback. + group: n, + // For context during callback. + on: ku, + tween: wu, + time: o.time, + delay: o.delay, + duration: o.duration, + ease: o.ease, + timer: null, + state: ta + }); +} +function Fn(t, e) { + var i = Lt(t, e); + if (i.state > ta) + throw new Error("too late; already scheduled"); + return i; +} +function It(t, e) { + var i = Lt(t, e); + if (i.state > Li) + throw new Error("too late; already running"); + return i; +} +function Lt(t, e) { + var i = t.__transition; + if (!i || !(i = i[e])) + throw new Error("transition not found"); + return i; +} +function Bu(t, e, i) { + var r = t.__transition, n; + r[e] = i, i.timer = Qs(o, 0, i.time); + function o(h) { + i.state = Mo, i.timer.restart(s, i.delay, i.time), i.delay <= h && s(h - i.delay); + } + function s(h) { + var c, f, g, p; + if (i.state !== Mo) + return l(); + for (c in r) + if (p = r[c], p.name === i.name) { + if (p.state === Li) + return Eo(s); + p.state === Oo ? (p.state = Ai, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete r[c]) : +c < e && (p.state = Ai, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete r[c]); + } + if (Eo(function() { + i.state === Li && (i.state = Oo, i.timer.restart(a, i.delay, i.time), a(h)); + }), i.state = rn, i.on.call("start", t, t.__data__, i.index, i.group), i.state === rn) { + for (i.state = Li, n = new Array(g = i.tween.length), c = 0, f = -1; c < g; ++c) + (p = i.tween[c].value.call(t, t.__data__, i.index, i.group)) && (n[++f] = p); + n.length = f + 1; + } + } + function a(h) { + for (var c = h < i.duration ? i.ease.call(null, h / i.duration) : (i.timer.restart(l), i.state = nn, 1), f = -1, g = n.length; ++f < g; ) + n[f].call(t, c); + i.state === nn && (i.on.call("end", t, t.__data__, i.index, i.group), l()); + } + function l() { + i.state = Ai, i.timer.stop(), delete r[e]; + for (var h in r) + return; + delete t.__transition; + } +} +function Fu(t, e) { + var i = t.__transition, r, n, o = !0, s; + if (i) { + e = e == null ? null : e + ""; + for (s in i) { + if ((r = i[s]).name !== e) { + o = !1; + continue; + } + n = r.state > rn && r.state < nn, r.state = Ai, r.timer.stop(), r.on.call(n ? "interrupt" : "cancel", t, t.__data__, r.index, r.group), delete i[s]; + } + o && delete t.__transition; + } +} +function Lu(t) { + return this.each(function() { + Fu(this, t); + }); +} +function Au(t, e) { + var i, r; + return function() { + var n = It(this, t), o = n.tween; + if (o !== i) { + r = i = o; + for (var s = 0, a = r.length; s < a; ++s) + if (r[s].name === e) { + r = r.slice(), r.splice(s, 1); + break; + } + } + n.tween = r; + }; +} +function Eu(t, e, i) { + var r, n; + if (typeof i != "function") + throw new Error(); + return function() { + var o = It(this, t), s = o.tween; + if (s !== r) { + n = (r = s).slice(); + for (var a = { name: e, value: i }, l = 0, h = n.length; l < h; ++l) + if (n[l].name === e) { + n[l] = a; + break; + } + l === h && n.push(a); + } + o.tween = n; + }; +} +function Mu(t, e) { + var i = this._id; + if (t += "", arguments.length < 2) { + for (var r = Lt(this.node(), i).tween, n = 0, o = r.length, s; n < o; ++n) + if ((s = r[n]).name === t) + return s.value; + return null; + } + return this.each((e == null ? Au : Eu)(i, t, e)); +} +function Ln(t, e, i) { + var r = t._id; + return t.each(function() { + var n = It(this, r); + (n.value || (n.value = {}))[e] = i.apply(this, arguments); + }), function(n) { + return Lt(n, r).value[e]; + }; +} +function ea(t, e) { + var i; + return (typeof e == "number" ? Qt : e instanceof Qe ? Fo : (i = Qe(e)) ? (e = i, Fo) : mu)(t, e); +} +function Ou(t) { + return function() { + this.removeAttribute(t); + }; +} +function $u(t) { + return function() { + this.removeAttributeNS(t.space, t.local); + }; +} +function Iu(t, e, i) { + var r, n = i + "", o; + return function() { + var s = this.getAttribute(t); + return s === n ? null : s === r ? o : o = e(r = s, i); + }; +} +function Du(t, e, i) { + var r, n = i + "", o; + return function() { + var s = this.getAttributeNS(t.space, t.local); + return s === n ? null : s === r ? o : o = e(r = s, i); + }; +} +function Nu(t, e, i) { + var r, n, o; + return function() { + var s, a = i(this), l; + return a == null ? void this.removeAttribute(t) : (s = this.getAttribute(t), l = a + "", s === l ? null : s === r && l === n ? o : (n = l, o = e(r = s, a))); + }; +} +function Ru(t, e, i) { + var r, n, o; + return function() { + var s, a = i(this), l; + return a == null ? void this.removeAttributeNS(t.space, t.local) : (s = this.getAttributeNS(t.space, t.local), l = a + "", s === l ? null : s === r && l === n ? o : (n = l, o = e(r = s, a))); + }; +} +function Pu(t, e) { + var i = ar(t), r = i === "transform" ? xu : ea; + return this.attrTween(t, typeof e == "function" ? (i.local ? Ru : Nu)(i, r, Ln(this, "attr." + t, e)) : e == null ? (i.local ? $u : Ou)(i) : (i.local ? Du : Iu)(i, r, e)); +} +function qu(t, e) { + return function(i) { + this.setAttribute(t, e.call(this, i)); + }; +} +function zu(t, e) { + return function(i) { + this.setAttributeNS(t.space, t.local, e.call(this, i)); + }; +} +function Wu(t, e) { + var i, r; + function n() { + var o = e.apply(this, arguments); + return o !== r && (i = (r = o) && zu(t, o)), i; + } + return n._value = e, n; +} +function Hu(t, e) { + var i, r; + function n() { + var o = e.apply(this, arguments); + return o !== r && (i = (r = o) && qu(t, o)), i; + } + return n._value = e, n; +} +function ju(t, e) { + var i = "attr." + t; + if (arguments.length < 2) + return (i = this.tween(i)) && i._value; + if (e == null) + return this.tween(i, null); + if (typeof e != "function") + throw new Error(); + var r = ar(t); + return this.tween(i, (r.local ? Wu : Hu)(r, e)); +} +function Uu(t, e) { + return function() { + Fn(this, t).delay = +e.apply(this, arguments); + }; +} +function Yu(t, e) { + return e = +e, function() { + Fn(this, t).delay = e; + }; +} +function Gu(t) { + var e = this._id; + return arguments.length ? this.each((typeof t == "function" ? Uu : Yu)(e, t)) : Lt(this.node(), e).delay; +} +function Vu(t, e) { + return function() { + It(this, t).duration = +e.apply(this, arguments); + }; +} +function Xu(t, e) { + return e = +e, function() { + It(this, t).duration = e; + }; +} +function Ku(t) { + var e = this._id; + return arguments.length ? this.each((typeof t == "function" ? Vu : Xu)(e, t)) : Lt(this.node(), e).duration; +} +function Zu(t, e) { + if (typeof e != "function") + throw new Error(); + return function() { + It(this, t).ease = e; + }; +} +function Ju(t) { + var e = this._id; + return arguments.length ? this.each(Zu(e, t)) : Lt(this.node(), e).ease; +} +function Qu(t, e) { + return function() { + var i = e.apply(this, arguments); + if (typeof i != "function") + throw new Error(); + It(this, t).ease = i; + }; +} +function tf(t) { + if (typeof t != "function") + throw new Error(); + return this.each(Qu(this._id, t)); +} +function ef(t) { + typeof t != "function" && (t = Is(t)); + for (var e = this._groups, i = e.length, r = new Array(i), n = 0; n < i; ++n) + for (var o = e[n], s = o.length, a = r[n] = [], l, h = 0; h < s; ++h) + (l = o[h]) && t.call(l, l.__data__, h, o) && a.push(l); + return new Yt(r, this._parents, this._name, this._id); +} +function rf(t) { + if (t._id !== this._id) + throw new Error(); + for (var e = this._groups, i = t._groups, r = e.length, n = i.length, o = Math.min(r, n), s = new Array(r), a = 0; a < o; ++a) + for (var l = e[a], h = i[a], c = l.length, f = s[a] = new Array(c), g, p = 0; p < c; ++p) + (g = l[p] || h[p]) && (f[p] = g); + for (; a < r; ++a) + s[a] = e[a]; + return new Yt(s, this._parents, this._name, this._id); +} +function nf(t) { + return (t + "").trim().split(/^|\s+/).every(function(e) { + var i = e.indexOf("."); + return i >= 0 && (e = e.slice(0, i)), !e || e === "start"; + }); +} +function of(t, e, i) { + var r, n, o = nf(e) ? Fn : It; + return function() { + var s = o(this, t), a = s.on; + a !== r && (n = (r = a).copy()).on(e, i), s.on = n; + }; +} +function sf(t, e) { + var i = this._id; + return arguments.length < 2 ? Lt(this.node(), i).on.on(t) : this.each(of(i, t, e)); +} +function af(t) { + return function() { + var e = this.parentNode; + for (var i in this.__transition) + if (+i !== t) + return; + e && e.removeChild(this); + }; +} +function lf() { + return this.on("end.remove", af(this._id)); +} +function hf(t) { + var e = this._name, i = this._id; + typeof t != "function" && (t = Sn(t)); + for (var r = this._groups, n = r.length, o = new Array(n), s = 0; s < n; ++s) + for (var a = r[s], l = a.length, h = o[s] = new Array(l), c, f, g = 0; g < l; ++g) + (c = a[g]) && (f = t.call(c, c.__data__, g, a)) && ("__data__" in c && (f.__data__ = c.__data__), h[g] = f, hr(h[g], e, i, g, h, Lt(c, i))); + return new Yt(o, this._parents, e, i); +} +function cf(t) { + var e = this._name, i = this._id; + typeof t != "function" && (t = $s(t)); + for (var r = this._groups, n = r.length, o = [], s = [], a = 0; a < n; ++a) + for (var l = r[a], h = l.length, c, f = 0; f < h; ++f) + if (c = l[f]) { + for (var g = t.call(c, c.__data__, f, l), p, _ = Lt(c, i), k = 0, M = g.length; k < M; ++k) + (p = g[k]) && hr(p, e, i, k, g, _); + o.push(g), s.push(c); + } + return new Yt(o, s, e, i); +} +var uf = li.prototype.constructor; +function ff() { + return new uf(this._groups, this._parents); +} +function df(t, e) { + var i, r, n; + return function() { + var o = Fe(this, t), s = (this.style.removeProperty(t), Fe(this, t)); + return o === s ? null : o === i && s === r ? n : n = e(i = o, r = s); + }; +} +function ia(t) { + return function() { + this.style.removeProperty(t); + }; +} +function pf(t, e, i) { + var r, n = i + "", o; + return function() { + var s = Fe(this, t); + return s === n ? null : s === r ? o : o = e(r = s, i); + }; +} +function gf(t, e, i) { + var r, n, o; + return function() { + var s = Fe(this, t), a = i(this), l = a + ""; + return a == null && (l = a = (this.style.removeProperty(t), Fe(this, t))), s === l ? null : s === r && l === n ? o : (n = l, o = e(r = s, a)); + }; +} +function mf(t, e) { + var i, r, n, o = "style." + e, s = "end." + o, a; + return function() { + var l = It(this, t), h = l.on, c = l.value[o] == null ? a || (a = ia(e)) : void 0; + (h !== i || n !== c) && (r = (i = h).copy()).on(s, n = c), l.on = r; + }; +} +function _f(t, e, i) { + var r = (t += "") == "transform" ? Cu : ea; + return e == null ? this.styleTween(t, df(t, r)).on("end.style." + t, ia(t)) : typeof e == "function" ? this.styleTween(t, gf(t, r, Ln(this, "style." + t, e))).each(mf(this._id, t)) : this.styleTween(t, pf(t, r, e), i).on("end.style." + t, null); +} +function yf(t, e, i) { + return function(r) { + this.style.setProperty(t, e.call(this, r), i); + }; +} +function Cf(t, e, i) { + var r, n; + function o() { + var s = e.apply(this, arguments); + return s !== n && (r = (n = s) && yf(t, s, i)), r; + } + return o._value = e, o; +} +function xf(t, e, i) { + var r = "style." + (t += ""); + if (arguments.length < 2) + return (r = this.tween(r)) && r._value; + if (e == null) + return this.tween(r, null); + if (typeof e != "function") + throw new Error(); + return this.tween(r, Cf(t, e, i ?? "")); +} +function bf(t) { + return function() { + this.textContent = t; + }; +} +function Tf(t) { + return function() { + var e = t(this); + this.textContent = e ?? ""; + }; +} +function Sf(t) { + return this.tween("text", typeof t == "function" ? Tf(Ln(this, "text", t)) : bf(t == null ? "" : t + "")); +} +function vf(t) { + return function(e) { + this.textContent = t.call(this, e); + }; +} +function kf(t) { + var e, i; + function r() { + var n = t.apply(this, arguments); + return n !== i && (e = (i = n) && vf(n)), e; + } + return r._value = t, r; +} +function wf(t) { + var e = "text"; + if (arguments.length < 1) + return (e = this.tween(e)) && e._value; + if (t == null) + return this.tween(e, null); + if (typeof t != "function") + throw new Error(); + return this.tween(e, kf(t)); +} +function Bf() { + for (var t = this._name, e = this._id, i = ra(), r = this._groups, n = r.length, o = 0; o < n; ++o) + for (var s = r[o], a = s.length, l, h = 0; h < a; ++h) + if (l = s[h]) { + var c = Lt(l, e); + hr(l, t, i, h, s, { + time: c.time + c.delay + c.duration, + delay: 0, + duration: c.duration, + ease: c.ease + }); + } + return new Yt(r, this._parents, t, i); +} +function Ff() { + var t, e, i = this, r = i._id, n = i.size(); + return new Promise(function(o, s) { + var a = { value: s }, l = { value: function() { + --n === 0 && o(); + } }; + i.each(function() { + var h = It(this, r), c = h.on; + c !== t && (e = (t = c).copy(), e._.cancel.push(a), e._.interrupt.push(a), e._.end.push(l)), h.on = e; + }), n === 0 && o(); + }); +} +var Lf = 0; +function Yt(t, e, i, r) { + this._groups = t, this._parents = e, this._name = i, this._id = r; +} +function ra() { + return ++Lf; +} +var Ht = li.prototype; +Yt.prototype = { + constructor: Yt, + select: hf, + selectAll: cf, + selectChild: Ht.selectChild, + selectChildren: Ht.selectChildren, + filter: ef, + merge: rf, + selection: ff, + transition: Bf, + call: Ht.call, + nodes: Ht.nodes, + node: Ht.node, + size: Ht.size, + empty: Ht.empty, + each: Ht.each, + on: sf, + attr: Pu, + attrTween: ju, + style: _f, + styleTween: xf, + text: Sf, + textTween: wf, + remove: lf, + tween: Mu, + delay: Gu, + duration: Ku, + ease: Ju, + easeVarying: tf, + end: Ff, + [Symbol.iterator]: Ht[Symbol.iterator] +}; +function Af(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; +} +var Ef = { + time: null, + // Set on use. + delay: 0, + duration: 250, + ease: Af +}; +function Mf(t, e) { + for (var i; !(i = t.__transition) || !(i = i[e]); ) + if (!(t = t.parentNode)) + throw new Error(`transition ${e} not found`); + return i; +} +function Of(t) { + var e, i; + t instanceof Yt ? (e = t._id, t = t._name) : (e = ra(), (i = Ef).time = Bn(), t = t == null ? null : t + ""); + for (var r = this._groups, n = r.length, o = 0; o < n; ++o) + for (var s = r[o], a = s.length, l, h = 0; h < a; ++h) + (l = s[h]) && hr(l, t, e, h, s, i || Mf(l, e)); + return new Yt(r, this._parents, t, e); +} +li.prototype.interrupt = Lu; +li.prototype.transition = Of; +const Jb = Math.abs, Qb = Math.atan2, t1 = Math.cos, e1 = Math.max, i1 = Math.min, r1 = Math.sin, n1 = Math.sqrt, $o = 1e-12, An = Math.PI, Io = An / 2, o1 = 2 * An; +function s1(t) { + return t > 1 ? 0 : t < -1 ? An : Math.acos(t); +} +function a1(t) { + return t >= 1 ? Io : t <= -1 ? -Io : Math.asin(t); +} +function na(t) { + this._context = t; +} +na.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e); + break; + case 1: + this._point = 2; + default: + this._context.lineTo(t, e); + break; + } + } +}; +function $f(t) { + return new na(t); +} +class oa { + constructor(e, i) { + this._context = e, this._x = i; + } + areaStart() { + this._line = 0; + } + areaEnd() { + this._line = NaN; + } + lineStart() { + this._point = 0; + } + lineEnd() { + (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; + } + point(e, i) { + switch (e = +e, i = +i, this._point) { + case 0: { + this._point = 1, this._line ? this._context.lineTo(e, i) : this._context.moveTo(e, i); + break; + } + case 1: + this._point = 2; + default: { + this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + e) / 2, this._y0, this._x0, i, e, i) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + i) / 2, e, this._y0, e, i); + break; + } + } + this._x0 = e, this._y0 = i; + } +} +function If(t) { + return new oa(t, !0); +} +function Df(t) { + return new oa(t, !1); +} +function ie() { +} +function ji(t, e, i) { + t._context.bezierCurveTo( + (2 * t._x0 + t._x1) / 3, + (2 * t._y0 + t._y1) / 3, + (t._x0 + 2 * t._x1) / 3, + (t._y0 + 2 * t._y1) / 3, + (t._x0 + 4 * t._x1 + e) / 6, + (t._y0 + 4 * t._y1 + i) / 6 + ); +} +function cr(t) { + this._context = t; +} +cr.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 3: + ji(this, this._x1, this._y1); + case 2: + this._context.lineTo(this._x1, this._y1); + break; + } + (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); + default: + ji(this, t, e); + break; + } + this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e; + } +}; +function Nf(t) { + return new cr(t); +} +function sa(t) { + this._context = t; +} +sa.prototype = { + areaStart: ie, + areaEnd: ie, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x2, this._y2), this._context.closePath(); + break; + } + case 2: { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath(); + break; + } + case 3: { + this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4); + break; + } + } + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1, this._x2 = t, this._y2 = e; + break; + case 1: + this._point = 2, this._x3 = t, this._y3 = e; + break; + case 2: + this._point = 3, this._x4 = t, this._y4 = e, this._context.moveTo((this._x0 + 4 * this._x1 + t) / 6, (this._y0 + 4 * this._y1 + e) / 6); + break; + default: + ji(this, t, e); + break; + } + this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e; + } +}; +function Rf(t) { + return new sa(t); +} +function aa(t) { + this._context = t; +} +aa.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0; + }, + lineEnd: function() { + (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + var i = (this._x0 + 4 * this._x1 + t) / 6, r = (this._y0 + 4 * this._y1 + e) / 6; + this._line ? this._context.lineTo(i, r) : this._context.moveTo(i, r); + break; + case 3: + this._point = 4; + default: + ji(this, t, e); + break; + } + this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e; + } +}; +function Pf(t) { + return new aa(t); +} +function la(t, e) { + this._basis = new cr(t), this._beta = e; +} +la.prototype = { + lineStart: function() { + this._x = [], this._y = [], this._basis.lineStart(); + }, + lineEnd: function() { + var t = this._x, e = this._y, i = t.length - 1; + if (i > 0) + for (var r = t[0], n = e[0], o = t[i] - r, s = e[i] - n, a = -1, l; ++a <= i; ) + l = a / i, this._basis.point( + this._beta * t[a] + (1 - this._beta) * (r + l * o), + this._beta * e[a] + (1 - this._beta) * (n + l * s) + ); + this._x = this._y = null, this._basis.lineEnd(); + }, + point: function(t, e) { + this._x.push(+t), this._y.push(+e); + } +}; +const qf = function t(e) { + function i(r) { + return e === 1 ? new cr(r) : new la(r, e); + } + return i.beta = function(r) { + return t(+r); + }, i; +}(0.85); +function Ui(t, e, i) { + t._context.bezierCurveTo( + t._x1 + t._k * (t._x2 - t._x0), + t._y1 + t._k * (t._y2 - t._y0), + t._x2 + t._k * (t._x1 - e), + t._y2 + t._k * (t._y1 - i), + t._x2, + t._y2 + ); +} +function En(t, e) { + this._context = t, this._k = (1 - e) / 6; +} +En.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + Ui(this, this._x1, this._y1); + break; + } + (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e); + break; + case 1: + this._point = 2, this._x1 = t, this._y1 = e; + break; + case 2: + this._point = 3; + default: + Ui(this, t, e); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; + } +}; +const zf = function t(e) { + function i(r) { + return new En(r, e); + } + return i.tension = function(r) { + return t(+r); + }, i; +}(0); +function Mn(t, e) { + this._context = t, this._k = (1 - e) / 6; +} +Mn.prototype = { + areaStart: ie, + areaEnd: ie, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3), this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3), this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5); + break; + } + } + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1, this._x3 = t, this._y3 = e; + break; + case 1: + this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = e); + break; + case 2: + this._point = 3, this._x5 = t, this._y5 = e; + break; + default: + Ui(this, t, e); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; + } +}; +const Wf = function t(e) { + function i(r) { + return new Mn(r, e); + } + return i.tension = function(r) { + return t(+r); + }, i; +}(0); +function On(t, e) { + this._context = t, this._k = (1 - e) / 6; +} +On.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0; + }, + lineEnd: function() { + (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + default: + Ui(this, t, e); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; + } +}; +const Hf = function t(e) { + function i(r) { + return new On(r, e); + } + return i.tension = function(r) { + return t(+r); + }, i; +}(0); +function $n(t, e, i) { + var r = t._x1, n = t._y1, o = t._x2, s = t._y2; + if (t._l01_a > $o) { + var a = 2 * t._l01_2a + 3 * t._l01_a * t._l12_a + t._l12_2a, l = 3 * t._l01_a * (t._l01_a + t._l12_a); + r = (r * a - t._x0 * t._l12_2a + t._x2 * t._l01_2a) / l, n = (n * a - t._y0 * t._l12_2a + t._y2 * t._l01_2a) / l; + } + if (t._l23_a > $o) { + var h = 2 * t._l23_2a + 3 * t._l23_a * t._l12_a + t._l12_2a, c = 3 * t._l23_a * (t._l23_a + t._l12_a); + o = (o * h + t._x1 * t._l23_2a - e * t._l12_2a) / c, s = (s * h + t._y1 * t._l23_2a - i * t._l12_2a) / c; + } + t._context.bezierCurveTo(r, n, o, s, t._x2, t._y2); +} +function ha(t, e) { + this._context = t, this._alpha = e; +} +ha.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + this.point(this._x2, this._y2); + break; + } + (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + if (t = +t, e = +e, this._point) { + var i = this._x2 - t, r = this._y2 - e; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(i * i + r * r, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + default: + $n(this, t, e); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; + } +}; +const jf = function t(e) { + function i(r) { + return e ? new ha(r, e) : new En(r, 0); + } + return i.alpha = function(r) { + return t(+r); + }, i; +}(0.5); +function ca(t, e) { + this._context = t, this._alpha = e; +} +ca.prototype = { + areaStart: ie, + areaEnd: ie, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3), this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3), this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5); + break; + } + } + }, + point: function(t, e) { + if (t = +t, e = +e, this._point) { + var i = this._x2 - t, r = this._y2 - e; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(i * i + r * r, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1, this._x3 = t, this._y3 = e; + break; + case 1: + this._point = 2, this._context.moveTo(this._x4 = t, this._y4 = e); + break; + case 2: + this._point = 3, this._x5 = t, this._y5 = e; + break; + default: + $n(this, t, e); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; + } +}; +const Uf = function t(e) { + function i(r) { + return e ? new ca(r, e) : new Mn(r, 0); + } + return i.alpha = function(r) { + return t(+r); + }, i; +}(0.5); +function ua(t, e) { + this._context = t, this._alpha = e; +} +ua.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + if (t = +t, e = +e, this._point) { + var i = this._x2 - t, r = this._y2 - e; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(i * i + r * r, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + default: + $n(this, t, e); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = e; + } +}; +const Yf = function t(e) { + function i(r) { + return e ? new ua(r, e) : new On(r, 0); + } + return i.alpha = function(r) { + return t(+r); + }, i; +}(0.5); +function fa(t) { + this._context = t; +} +fa.prototype = { + areaStart: ie, + areaEnd: ie, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + this._point && this._context.closePath(); + }, + point: function(t, e) { + t = +t, e = +e, this._point ? this._context.lineTo(t, e) : (this._point = 1, this._context.moveTo(t, e)); + } +}; +function Gf(t) { + return new fa(t); +} +function Do(t) { + return t < 0 ? -1 : 1; +} +function No(t, e, i) { + var r = t._x1 - t._x0, n = e - t._x1, o = (t._y1 - t._y0) / (r || n < 0 && -0), s = (i - t._y1) / (n || r < 0 && -0), a = (o * n + s * r) / (r + n); + return (Do(o) + Do(s)) * Math.min(Math.abs(o), Math.abs(s), 0.5 * Math.abs(a)) || 0; +} +function Ro(t, e) { + var i = t._x1 - t._x0; + return i ? (3 * (t._y1 - t._y0) / i - e) / 2 : e; +} +function Nr(t, e, i) { + var r = t._x0, n = t._y0, o = t._x1, s = t._y1, a = (o - r) / 3; + t._context.bezierCurveTo(r + a, n + a * e, o - a, s - a * i, o, s); +} +function Yi(t) { + this._context = t; +} +Yi.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x1, this._y1); + break; + case 3: + Nr(this, this._t0, Ro(this, this._t0)); + break; + } + (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line; + }, + point: function(t, e) { + var i = NaN; + if (t = +t, e = +e, !(t === this._x1 && e === this._y1)) { + switch (this._point) { + case 0: + this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3, Nr(this, Ro(this, i = No(this, t, e)), i); + break; + default: + Nr(this, this._t0, i = No(this, t, e)); + break; + } + this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = e, this._t0 = i; + } + } +}; +function da(t) { + this._context = new pa(t); +} +(da.prototype = Object.create(Yi.prototype)).point = function(t, e) { + Yi.prototype.point.call(this, e, t); +}; +function pa(t) { + this._context = t; +} +pa.prototype = { + moveTo: function(t, e) { + this._context.moveTo(e, t); + }, + closePath: function() { + this._context.closePath(); + }, + lineTo: function(t, e) { + this._context.lineTo(e, t); + }, + bezierCurveTo: function(t, e, i, r, n, o) { + this._context.bezierCurveTo(e, t, r, i, o, n); + } +}; +function Vf(t) { + return new Yi(t); +} +function Xf(t) { + return new da(t); +} +function ga(t) { + this._context = t; +} +ga.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = [], this._y = []; + }, + lineEnd: function() { + var t = this._x, e = this._y, i = t.length; + if (i) + if (this._line ? this._context.lineTo(t[0], e[0]) : this._context.moveTo(t[0], e[0]), i === 2) + this._context.lineTo(t[1], e[1]); + else + for (var r = Po(t), n = Po(e), o = 0, s = 1; s < i; ++o, ++s) + this._context.bezierCurveTo(r[0][o], n[0][o], r[1][o], n[1][o], t[s], e[s]); + (this._line || this._line !== 0 && i === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null; + }, + point: function(t, e) { + this._x.push(+t), this._y.push(+e); + } +}; +function Po(t) { + var e, i = t.length - 1, r, n = new Array(i), o = new Array(i), s = new Array(i); + for (n[0] = 0, o[0] = 2, s[0] = t[0] + 2 * t[1], e = 1; e < i - 1; ++e) + n[e] = 1, o[e] = 4, s[e] = 4 * t[e] + 2 * t[e + 1]; + for (n[i - 1] = 2, o[i - 1] = 7, s[i - 1] = 8 * t[i - 1] + t[i], e = 1; e < i; ++e) + r = n[e] / o[e - 1], o[e] -= r, s[e] -= r * s[e - 1]; + for (n[i - 1] = s[i - 1] / o[i - 1], e = i - 2; e >= 0; --e) + n[e] = (s[e] - n[e + 1]) / o[e]; + for (o[i - 1] = (t[i] + n[i - 1]) / 2, e = 0; e < i - 1; ++e) + o[e] = 2 * t[e + 1] - n[e + 1]; + return [n, o]; +} +function Kf(t) { + return new ga(t); +} +function ur(t, e) { + this._context = t, this._t = e; +} +ur.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = this._y = NaN, this._point = 0; + }, + lineEnd: function() { + 0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line); + }, + point: function(t, e) { + switch (t = +t, e = +e, this._point) { + case 0: + this._point = 1, this._line ? this._context.lineTo(t, e) : this._context.moveTo(t, e); + break; + case 1: + this._point = 2; + default: { + if (this._t <= 0) + this._context.lineTo(this._x, e), this._context.lineTo(t, e); + else { + var i = this._x * (1 - this._t) + t * this._t; + this._context.lineTo(i, this._y), this._context.lineTo(i, e); + } + break; + } + } + this._x = t, this._y = e; + } +}; +function Zf(t) { + return new ur(t, 0.5); +} +function Jf(t) { + return new ur(t, 0); +} +function Qf(t) { + return new ur(t, 1); +} +function je(t, e, i) { + this.k = t, this.x = e, this.y = i; +} +je.prototype = { + constructor: je, + scale: function(t) { + return t === 1 ? this : new je(this.k * t, this.x, this.y); + }, + translate: function(t, e) { + return t === 0 & e === 0 ? this : new je(this.k, this.x + this.k * t, this.y + this.k * e); + }, + apply: function(t) { + return [t[0] * this.k + this.x, t[1] * this.k + this.y]; + }, + applyX: function(t) { + return t * this.k + this.x; + }, + applyY: function(t) { + return t * this.k + this.y; + }, + invert: function(t) { + return [(t[0] - this.x) / this.k, (t[1] - this.y) / this.k]; + }, + invertX: function(t) { + return (t - this.x) / this.k; + }, + invertY: function(t) { + return (t - this.y) / this.k; + }, + rescaleX: function(t) { + return t.copy().domain(t.range().map(this.invertX, this).map(t.invert, t)); + }, + rescaleY: function(t) { + return t.copy().domain(t.range().map(this.invertY, this).map(t.invert, t)); + }, + toString: function() { + return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; + } +}; +je.prototype; +/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */ +const { + entries: ma, + setPrototypeOf: qo, + isFrozen: td, + getPrototypeOf: ed, + getOwnPropertyDescriptor: id +} = Object; +let { + freeze: ht, + seal: Bt, + create: rd +} = Object, { + apply: on, + construct: sn +} = typeof Reflect < "u" && Reflect; +on || (on = function(e, i, r) { + return e.apply(i, r); +}); +ht || (ht = function(e) { + return e; +}); +Bt || (Bt = function(e) { + return e; +}); +sn || (sn = function(e, i) { + return new e(...i); +}); +const nd = bt(Array.prototype.forEach), zo = bt(Array.prototype.pop), Pe = bt(Array.prototype.push), Ei = bt(String.prototype.toLowerCase), Rr = bt(String.prototype.toString), od = bt(String.prototype.match), vt = bt(String.prototype.replace), sd = bt(String.prototype.indexOf), ad = bt(String.prototype.trim), gt = bt(RegExp.prototype.test), qe = ld(TypeError); +function bt(t) { + return function(e) { + for (var i = arguments.length, r = new Array(i > 1 ? i - 1 : 0), n = 1; n < i; n++) + r[n - 1] = arguments[n]; + return on(t, e, r); + }; +} +function ld(t) { + return function() { + for (var e = arguments.length, i = new Array(e), r = 0; r < e; r++) + i[r] = arguments[r]; + return sn(t, i); + }; +} +function N(t, e, i) { + var r; + i = (r = i) !== null && r !== void 0 ? r : Ei, qo && qo(t, null); + let n = e.length; + for (; n--; ) { + let o = e[n]; + if (typeof o == "string") { + const s = i(o); + s !== o && (td(e) || (e[n] = s), o = s); + } + t[o] = !0; + } + return t; +} +function Se(t) { + const e = rd(null); + for (const [i, r] of ma(t)) + e[i] = r; + return e; +} +function Ti(t, e) { + for (; t !== null; ) { + const r = id(t, e); + if (r) { + if (r.get) + return bt(r.get); + if (typeof r.value == "function") + return bt(r.value); + } + t = ed(t); + } + function i(r) { + return console.warn("fallback value for", r), null; + } + return i; +} +const Wo = ht(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Pr = ht(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), qr = ht(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), hd = ht(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), zr = ht(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), cd = ht(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ho = ht(["#text"]), jo = ht(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), Wr = ht(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Uo = ht(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Si = ht(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ud = Bt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), fd = Bt(/<%[\w\W]*|[\w\W]*%>/gm), dd = Bt(/\${[\w\W]*}/gm), pd = Bt(/^data-[\-\w.\u00B7-\uFFFF]/), gd = Bt(/^aria-[\-\w]+$/), _a = Bt( + /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i + // eslint-disable-line no-useless-escape +), md = Bt(/^(?:\w+script|data):/i), _d = Bt( + /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g + // eslint-disable-line no-control-regex +), ya = Bt(/^html$/i); +var Yo = /* @__PURE__ */ Object.freeze({ + __proto__: null, + MUSTACHE_EXPR: ud, + ERB_EXPR: fd, + TMPLIT_EXPR: dd, + DATA_ATTR: pd, + ARIA_ATTR: gd, + IS_ALLOWED_URI: _a, + IS_SCRIPT_OR_DATA: md, + ATTR_WHITESPACE: _d, + DOCTYPE_NAME: ya +}); +const yd = () => typeof window > "u" ? null : window, Cd = function(e, i) { + if (typeof e != "object" || typeof e.createPolicy != "function") + return null; + let r = null; + const n = "data-tt-policy-suffix"; + i && i.hasAttribute(n) && (r = i.getAttribute(n)); + const o = "dompurify" + (r ? "#" + r : ""); + try { + return e.createPolicy(o, { + createHTML(s) { + return s; + }, + createScriptURL(s) { + return s; + } + }); + } catch { + return console.warn("TrustedTypes policy " + o + " could not be created."), null; + } +}; +function Ca() { + let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : yd(); + const e = (w) => Ca(w); + if (e.version = "3.0.5", e.removed = [], !t || !t.document || t.document.nodeType !== 9) + return e.isSupported = !1, e; + const i = t.document, r = i.currentScript; + let { + document: n + } = t; + const { + DocumentFragment: o, + HTMLTemplateElement: s, + Node: a, + Element: l, + NodeFilter: h, + NamedNodeMap: c = t.NamedNodeMap || t.MozNamedAttrMap, + HTMLFormElement: f, + DOMParser: g, + trustedTypes: p + } = t, _ = l.prototype, k = Ti(_, "cloneNode"), M = Ti(_, "nextSibling"), q = Ti(_, "childNodes"), v = Ti(_, "parentNode"); + if (typeof s == "function") { + const w = n.createElement("template"); + w.content && w.content.ownerDocument && (n = w.content.ownerDocument); + } + let z, Q = ""; + const { + implementation: X, + createNodeIterator: G, + createDocumentFragment: W, + getElementsByTagName: Vt + } = n, { + importNode: K + } = i; + let I = {}; + e.isSupported = typeof ma == "function" && typeof v == "function" && X && X.createHTMLDocument !== void 0; + const { + MUSTACHE_EXPR: Nt, + ERB_EXPR: At, + TMPLIT_EXPR: E, + DATA_ATTR: S, + ARIA_ATTR: C, + IS_SCRIPT_OR_DATA: O, + ATTR_WHITESPACE: x + } = Yo; + let { + IS_ALLOWED_URI: D + } = Yo, T = null; + const H = N({}, [...Wo, ...Pr, ...qr, ...zr, ...Ho]); + let R = null; + const U = N({}, [...jo, ...Wr, ...Uo, ...Si]); + let P = Object.seal(Object.create(null, { + tagNameCheck: { + writable: !0, + configurable: !1, + enumerable: !0, + value: null + }, + attributeNameCheck: { + writable: !0, + configurable: !1, + enumerable: !0, + value: null + }, + allowCustomizedBuiltInElements: { + writable: !0, + configurable: !1, + enumerable: !0, + value: !1 + } + })), ct = null, pt = null, Xt = !0, Rt = !0, Pt = !1, it = !0, st = !1, St = !1, Kt = !1, wr = !1, ye = !1, di = !1, pi = !1, eo = !0, io = !1; + const Kl = "user-content-"; + let Br = !0, Ne = !1, Ce = {}, xe = null; + const ro = N({}, ["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 no = null; + const oo = N({}, ["audio", "video", "img", "source", "image", "track"]); + let Fr = null; + const so = N({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), gi = "http://www.w3.org/1998/Math/MathML", mi = "http://www.w3.org/2000/svg", qt = "http://www.w3.org/1999/xhtml"; + let be = qt, Lr = !1, Ar = null; + const Zl = N({}, [gi, mi, qt], Rr); + let oe; + const Jl = ["application/xhtml+xml", "text/html"], Ql = "text/html"; + let tt, Te = null; + const th = n.createElement("form"), ao = function(u) { + return u instanceof RegExp || u instanceof Function; + }, Er = function(u) { + if (!(Te && Te === u)) { + if ((!u || typeof u != "object") && (u = {}), u = Se(u), oe = // eslint-disable-next-line unicorn/prefer-includes + Jl.indexOf(u.PARSER_MEDIA_TYPE) === -1 ? oe = Ql : oe = u.PARSER_MEDIA_TYPE, tt = oe === "application/xhtml+xml" ? Rr : Ei, T = "ALLOWED_TAGS" in u ? N({}, u.ALLOWED_TAGS, tt) : H, R = "ALLOWED_ATTR" in u ? N({}, u.ALLOWED_ATTR, tt) : U, Ar = "ALLOWED_NAMESPACES" in u ? N({}, u.ALLOWED_NAMESPACES, Rr) : Zl, Fr = "ADD_URI_SAFE_ATTR" in u ? N( + Se(so), + // eslint-disable-line indent + u.ADD_URI_SAFE_ATTR, + // eslint-disable-line indent + tt + // eslint-disable-line indent + ) : so, no = "ADD_DATA_URI_TAGS" in u ? N( + Se(oo), + // eslint-disable-line indent + u.ADD_DATA_URI_TAGS, + // eslint-disable-line indent + tt + // eslint-disable-line indent + ) : oo, xe = "FORBID_CONTENTS" in u ? N({}, u.FORBID_CONTENTS, tt) : ro, ct = "FORBID_TAGS" in u ? N({}, u.FORBID_TAGS, tt) : {}, pt = "FORBID_ATTR" in u ? N({}, u.FORBID_ATTR, tt) : {}, Ce = "USE_PROFILES" in u ? u.USE_PROFILES : !1, Xt = u.ALLOW_ARIA_ATTR !== !1, Rt = u.ALLOW_DATA_ATTR !== !1, Pt = u.ALLOW_UNKNOWN_PROTOCOLS || !1, it = u.ALLOW_SELF_CLOSE_IN_ATTR !== !1, st = u.SAFE_FOR_TEMPLATES || !1, St = u.WHOLE_DOCUMENT || !1, ye = u.RETURN_DOM || !1, di = u.RETURN_DOM_FRAGMENT || !1, pi = u.RETURN_TRUSTED_TYPE || !1, wr = u.FORCE_BODY || !1, eo = u.SANITIZE_DOM !== !1, io = u.SANITIZE_NAMED_PROPS || !1, Br = u.KEEP_CONTENT !== !1, Ne = u.IN_PLACE || !1, D = u.ALLOWED_URI_REGEXP || _a, be = u.NAMESPACE || qt, P = u.CUSTOM_ELEMENT_HANDLING || {}, u.CUSTOM_ELEMENT_HANDLING && ao(u.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (P.tagNameCheck = u.CUSTOM_ELEMENT_HANDLING.tagNameCheck), u.CUSTOM_ELEMENT_HANDLING && ao(u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (P.attributeNameCheck = u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), u.CUSTOM_ELEMENT_HANDLING && typeof u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), st && (Rt = !1), di && (ye = !0), Ce && (T = N({}, [...Ho]), R = [], Ce.html === !0 && (N(T, Wo), N(R, jo)), Ce.svg === !0 && (N(T, Pr), N(R, Wr), N(R, Si)), Ce.svgFilters === !0 && (N(T, qr), N(R, Wr), N(R, Si)), Ce.mathMl === !0 && (N(T, zr), N(R, Uo), N(R, Si))), u.ADD_TAGS && (T === H && (T = Se(T)), N(T, u.ADD_TAGS, tt)), u.ADD_ATTR && (R === U && (R = Se(R)), N(R, u.ADD_ATTR, tt)), u.ADD_URI_SAFE_ATTR && N(Fr, u.ADD_URI_SAFE_ATTR, tt), u.FORBID_CONTENTS && (xe === ro && (xe = Se(xe)), N(xe, u.FORBID_CONTENTS, tt)), Br && (T["#text"] = !0), St && N(T, ["html", "head", "body"]), T.table && (N(T, ["tbody"]), delete ct.tbody), u.TRUSTED_TYPES_POLICY) { + if (typeof u.TRUSTED_TYPES_POLICY.createHTML != "function") + throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); + if (typeof u.TRUSTED_TYPES_POLICY.createScriptURL != "function") + throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); + z = u.TRUSTED_TYPES_POLICY, Q = z.createHTML(""); + } else + z === void 0 && (z = Cd(p, r)), z !== null && typeof Q == "string" && (Q = z.createHTML("")); + ht && ht(u), Te = u; + } + }, lo = N({}, ["mi", "mo", "mn", "ms", "mtext"]), ho = N({}, ["foreignobject", "desc", "title", "annotation-xml"]), eh = N({}, ["title", "style", "font", "a", "script"]), _i = N({}, Pr); + N(_i, qr), N(_i, hd); + const Mr = N({}, zr); + N(Mr, cd); + const ih = function(u) { + let m = v(u); + (!m || !m.tagName) && (m = { + namespaceURI: be, + tagName: "template" + }); + const b = Ei(u.tagName), j = Ei(m.tagName); + return Ar[u.namespaceURI] ? u.namespaceURI === mi ? m.namespaceURI === qt ? b === "svg" : m.namespaceURI === gi ? b === "svg" && (j === "annotation-xml" || lo[j]) : !!_i[b] : u.namespaceURI === gi ? m.namespaceURI === qt ? b === "math" : m.namespaceURI === mi ? b === "math" && ho[j] : !!Mr[b] : u.namespaceURI === qt ? m.namespaceURI === mi && !ho[j] || m.namespaceURI === gi && !lo[j] ? !1 : !Mr[b] && (eh[b] || !_i[b]) : !!(oe === "application/xhtml+xml" && Ar[u.namespaceURI]) : !1; + }, se = function(u) { + Pe(e.removed, { + element: u + }); + try { + u.parentNode.removeChild(u); + } catch { + u.remove(); + } + }, Or = function(u, m) { + try { + Pe(e.removed, { + attribute: m.getAttributeNode(u), + from: m + }); + } catch { + Pe(e.removed, { + attribute: null, + from: m + }); + } + if (m.removeAttribute(u), u === "is" && !R[u]) + if (ye || di) + try { + se(m); + } catch { + } + else + try { + m.setAttribute(u, ""); + } catch { + } + }, co = function(u) { + let m, b; + if (wr) + u = "" + u; + else { + const _t = od(u, /^[\r\n\t ]+/); + b = _t && _t[0]; + } + oe === "application/xhtml+xml" && be === qt && (u = '' + u + ""); + const j = z ? z.createHTML(u) : u; + if (be === qt) + try { + m = new g().parseFromString(j, oe); + } catch { + } + if (!m || !m.documentElement) { + m = X.createDocument(be, "template", null); + try { + m.documentElement.innerHTML = Lr ? Q : j; + } catch { + } + } + const et = m.body || m.documentElement; + return u && b && et.insertBefore(n.createTextNode(b), et.childNodes[0] || null), be === qt ? Vt.call(m, St ? "html" : "body")[0] : St ? m.documentElement : et; + }, uo = function(u) { + return G.call( + u.ownerDocument || u, + u, + // eslint-disable-next-line no-bitwise + h.SHOW_ELEMENT | h.SHOW_COMMENT | h.SHOW_TEXT, + null, + !1 + ); + }, rh = function(u) { + return u instanceof f && (typeof u.nodeName != "string" || typeof u.textContent != "string" || typeof u.removeChild != "function" || !(u.attributes instanceof c) || typeof u.removeAttribute != "function" || typeof u.setAttribute != "function" || typeof u.namespaceURI != "string" || typeof u.insertBefore != "function" || typeof u.hasChildNodes != "function"); + }, yi = function(u) { + return typeof a == "object" ? u instanceof a : u && typeof u == "object" && typeof u.nodeType == "number" && typeof u.nodeName == "string"; + }, zt = function(u, m, b) { + I[u] && nd(I[u], (j) => { + j.call(e, m, b, Te); + }); + }, fo = function(u) { + let m; + if (zt("beforeSanitizeElements", u, null), rh(u)) + return se(u), !0; + const b = tt(u.nodeName); + if (zt("uponSanitizeElement", u, { + tagName: b, + allowedTags: T + }), u.hasChildNodes() && !yi(u.firstElementChild) && (!yi(u.content) || !yi(u.content.firstElementChild)) && gt(/<[/\w]/g, u.innerHTML) && gt(/<[/\w]/g, u.textContent)) + return se(u), !0; + if (!T[b] || ct[b]) { + if (!ct[b] && go(b) && (P.tagNameCheck instanceof RegExp && gt(P.tagNameCheck, b) || P.tagNameCheck instanceof Function && P.tagNameCheck(b))) + return !1; + if (Br && !xe[b]) { + const j = v(u) || u.parentNode, et = q(u) || u.childNodes; + if (et && j) { + const _t = et.length; + for (let V = _t - 1; V >= 0; --V) + j.insertBefore(k(et[V], !0), M(u)); + } + } + return se(u), !0; + } + return u instanceof l && !ih(u) || (b === "noscript" || b === "noembed" || b === "noframes") && gt(/<\/no(script|embed|frames)/i, u.innerHTML) ? (se(u), !0) : (st && u.nodeType === 3 && (m = u.textContent, m = vt(m, Nt, " "), m = vt(m, At, " "), m = vt(m, E, " "), u.textContent !== m && (Pe(e.removed, { + element: u.cloneNode() + }), u.textContent = m)), zt("afterSanitizeElements", u, null), !1); + }, po = function(u, m, b) { + if (eo && (m === "id" || m === "name") && (b in n || b in th)) + return !1; + if (!(Rt && !pt[m] && gt(S, m))) { + if (!(Xt && gt(C, m))) { + if (!R[m] || pt[m]) { + if ( + // First condition does a very basic check if a) it's basically a valid custom element tagname AND + // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck + // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck + !(go(u) && (P.tagNameCheck instanceof RegExp && gt(P.tagNameCheck, u) || P.tagNameCheck instanceof Function && P.tagNameCheck(u)) && (P.attributeNameCheck instanceof RegExp && gt(P.attributeNameCheck, m) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(m)) || // Alternative, second condition checks if it's an `is`-attribute, AND + // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck + m === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && gt(P.tagNameCheck, b) || P.tagNameCheck instanceof Function && P.tagNameCheck(b))) + ) + return !1; + } else if (!Fr[m]) { + if (!gt(D, vt(b, x, ""))) { + if (!((m === "src" || m === "xlink:href" || m === "href") && u !== "script" && sd(b, "data:") === 0 && no[u])) { + if (!(Pt && !gt(O, vt(b, x, "")))) { + if (b) + return !1; + } + } + } + } + } + } + return !0; + }, go = function(u) { + return u.indexOf("-") > 0; + }, mo = function(u) { + let m, b, j, et; + zt("beforeSanitizeAttributes", u, null); + const { + attributes: _t + } = u; + if (!_t) + return; + const V = { + attrName: "", + attrValue: "", + keepAttr: !0, + allowedAttributes: R + }; + for (et = _t.length; et--; ) { + m = _t[et]; + const { + name: Et, + namespaceURI: $r + } = m; + if (b = Et === "value" ? m.value : ad(m.value), j = tt(Et), V.attrName = j, V.attrValue = b, V.keepAttr = !0, V.forceKeepAttr = void 0, zt("uponSanitizeAttribute", u, V), b = V.attrValue, V.forceKeepAttr || (Or(Et, u), !V.keepAttr)) + continue; + if (!it && gt(/\/>/i, b)) { + Or(Et, u); + continue; + } + st && (b = vt(b, Nt, " "), b = vt(b, At, " "), b = vt(b, E, " ")); + const _o = tt(u.nodeName); + if (po(_o, j, b)) { + if (io && (j === "id" || j === "name") && (Or(Et, u), b = Kl + b), z && typeof p == "object" && typeof p.getAttributeType == "function" && !$r) + switch (p.getAttributeType(_o, j)) { + case "TrustedHTML": { + b = z.createHTML(b); + break; + } + case "TrustedScriptURL": { + b = z.createScriptURL(b); + break; + } + } + try { + $r ? u.setAttributeNS($r, Et, b) : u.setAttribute(Et, b), zo(e.removed); + } catch { + } + } + } + zt("afterSanitizeAttributes", u, null); + }, nh = function w(u) { + let m; + const b = uo(u); + for (zt("beforeSanitizeShadowDOM", u, null); m = b.nextNode(); ) + zt("uponSanitizeShadowNode", m, null), !fo(m) && (m.content instanceof o && w(m.content), mo(m)); + zt("afterSanitizeShadowDOM", u, null); + }; + return e.sanitize = function(w) { + let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m, b, j, et; + if (Lr = !w, Lr && (w = ""), typeof w != "string" && !yi(w)) + if (typeof w.toString == "function") { + if (w = w.toString(), typeof w != "string") + throw qe("dirty is not a string, aborting"); + } else + throw qe("toString is not a function"); + if (!e.isSupported) + return w; + if (Kt || Er(u), e.removed = [], typeof w == "string" && (Ne = !1), Ne) { + if (w.nodeName) { + const Et = tt(w.nodeName); + if (!T[Et] || ct[Et]) + throw qe("root node is forbidden and cannot be sanitized in-place"); + } + } else if (w instanceof a) + m = co(""), b = m.ownerDocument.importNode(w, !0), b.nodeType === 1 && b.nodeName === "BODY" || b.nodeName === "HTML" ? m = b : m.appendChild(b); + else { + if (!ye && !st && !St && // eslint-disable-next-line unicorn/prefer-includes + w.indexOf("<") === -1) + return z && pi ? z.createHTML(w) : w; + if (m = co(w), !m) + return ye ? null : pi ? Q : ""; + } + m && wr && se(m.firstChild); + const _t = uo(Ne ? w : m); + for (; j = _t.nextNode(); ) + fo(j) || (j.content instanceof o && nh(j.content), mo(j)); + if (Ne) + return w; + if (ye) { + if (di) + for (et = W.call(m.ownerDocument); m.firstChild; ) + et.appendChild(m.firstChild); + else + et = m; + return (R.shadowroot || R.shadowrootmode) && (et = K.call(i, et, !0)), et; + } + let V = St ? m.outerHTML : m.innerHTML; + return St && T["!doctype"] && m.ownerDocument && m.ownerDocument.doctype && m.ownerDocument.doctype.name && gt(ya, m.ownerDocument.doctype.name) && (V = " +` + V), st && (V = vt(V, Nt, " "), V = vt(V, At, " "), V = vt(V, E, " ")), z && pi ? z.createHTML(V) : V; + }, e.setConfig = function(w) { + Er(w), Kt = !0; + }, e.clearConfig = function() { + Te = null, Kt = !1; + }, e.isValidAttribute = function(w, u, m) { + Te || Er({}); + const b = tt(w), j = tt(u); + return po(b, j, m); + }, e.addHook = function(w, u) { + typeof u == "function" && (I[w] = I[w] || [], Pe(I[w], u)); + }, e.removeHook = function(w) { + if (I[w]) + return zo(I[w]); + }, e.removeHooks = function(w) { + I[w] && (I[w] = []); + }, e.removeAllHooks = function() { + I = {}; + }, e; +} +var Gi = Ca(); +const fr = //gi, xd = (t) => t ? ba(t).replace(/\\n/g, "#br#").split("#br#") : [""], xa = (t) => Gi.sanitize(t), Go = (t, e) => { + var i; + if (((i = e.flowchart) == null ? void 0 : i.htmlLabels) !== !1) { + const r = e.securityLevel; + r === "antiscript" || r === "strict" ? t = xa(t) : r !== "loose" && (t = ba(t), t = t.replace(//g, ">"), t = t.replace(/=/g, "="), t = vd(t)); + } + return t; +}, ei = (t, e) => t && (e.dompurifyConfig ? t = Gi.sanitize(Go(t, e), e.dompurifyConfig).toString() : t = Gi.sanitize(Go(t, e), { + FORBID_TAGS: ["style"] +}).toString(), t), bd = (t, e) => typeof t == "string" ? ei(t, e) : t.flat().map((i) => ei(i, e)), Td = (t) => fr.test(t), Sd = (t) => t.split(fr), vd = (t) => t.replace(/#br#/g, "
"), ba = (t) => t.replace(fr, "#br#"), kd = (t) => { + let e = ""; + return t && (e = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, e = e.replaceAll(/\(/g, "\\("), e = e.replaceAll(/\)/g, "\\)")), e; +}, Ta = (t) => !(t === !1 || ["false", "null", "0"].includes(String(t).trim().toLowerCase())), wd = function(...t) { + const e = t.filter((i) => !isNaN(i)); + return Math.max(...e); +}, Bd = function(...t) { + const e = t.filter((i) => !isNaN(i)); + return Math.min(...e); +}, l1 = function(t) { + const e = t.split(/(,)/), i = []; + for (let r = 0; r < e.length; r++) { + let n = e[r]; + if (n === "," && r > 0 && r + 1 < e.length) { + const o = e[r - 1], s = e[r + 1]; + Fd(o, s) && (n = o + "," + s, r++, i.pop()); + } + i.push(Ld(n)); + } + return i.join(""); +}, an = (t, e) => Math.max(0, t.split(e).length - 1), Fd = (t, e) => { + const i = an(t, "~"), r = an(e, "~"); + return i === 1 && r === 1; +}, Ld = (t) => { + const e = an(t, "~"); + let i = !1; + if (e <= 1) + return t; + e % 2 !== 0 && t.startsWith("~") && (t = t.substring(1), i = !0); + const r = [...t]; + let n = r.indexOf("~"), o = r.lastIndexOf("~"); + for (; n !== -1 && o !== -1 && n !== o; ) + r[n] = "<", r[o] = ">", n = r.indexOf("~"), o = r.lastIndexOf("~"); + return i && r.unshift("~"), r.join(""); +}, In = { + getRows: xd, + sanitizeText: ei, + sanitizeTextOrArray: bd, + hasBreaks: Td, + splitBreaks: Sd, + lineBreakRegex: fr, + removeScript: xa, + getUrl: kd, + evaluate: Ta, + getMax: wd, + getMin: Bd +}, Mi = { + /* CLAMP */ + min: { + r: 0, + g: 0, + b: 0, + s: 0, + l: 0, + a: 0 + }, + max: { + r: 255, + g: 255, + b: 255, + h: 360, + s: 100, + l: 100, + a: 1 + }, + clamp: { + r: (t) => t >= 255 ? 255 : t < 0 ? 0 : t, + g: (t) => t >= 255 ? 255 : t < 0 ? 0 : t, + b: (t) => t >= 255 ? 255 : t < 0 ? 0 : t, + h: (t) => t % 360, + s: (t) => t >= 100 ? 100 : t < 0 ? 0 : t, + l: (t) => t >= 100 ? 100 : t < 0 ? 0 : t, + a: (t) => t >= 1 ? 1 : t < 0 ? 0 : t + }, + /* CONVERSION */ + //SOURCE: https://planetcalc.com/7779 + toLinear: (t) => { + const e = t / 255; + return t > 0.03928 ? Math.pow((e + 0.055) / 1.055, 2.4) : e / 12.92; + }, + //SOURCE: https://gist.github.com/mjackson/5311256 + hue2rgb: (t, e, i) => (i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? t + (e - t) * 6 * i : i < 1 / 2 ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t), + hsl2rgb: ({ h: t, s: e, l: i }, r) => { + if (!e) + return i * 2.55; + t /= 360, e /= 100, i /= 100; + const n = i < 0.5 ? i * (1 + e) : i + e - i * e, o = 2 * i - n; + switch (r) { + case "r": + return Mi.hue2rgb(o, n, t + 1 / 3) * 255; + case "g": + return Mi.hue2rgb(o, n, t) * 255; + case "b": + return Mi.hue2rgb(o, n, t - 1 / 3) * 255; + } + }, + rgb2hsl: ({ r: t, g: e, b: i }, r) => { + t /= 255, e /= 255, i /= 255; + const n = Math.max(t, e, i), o = Math.min(t, e, i), s = (n + o) / 2; + if (r === "l") + return s * 100; + if (n === o) + return 0; + const a = n - o, l = s > 0.5 ? a / (2 - n - o) : a / (n + o); + if (r === "s") + return l * 100; + switch (n) { + case t: + return ((e - i) / a + (e < i ? 6 : 0)) * 60; + case e: + return ((i - t) / a + 2) * 60; + case i: + return ((t - e) / a + 4) * 60; + default: + return -1; + } + } +}, Ad = Mi, Ed = { + /* API */ + clamp: (t, e, i) => e > i ? Math.min(e, Math.max(i, t)) : Math.min(i, Math.max(e, t)), + round: (t) => Math.round(t * 1e10) / 1e10 +}, Md = Ed, Od = { + /* API */ + dec2hex: (t) => { + const e = Math.round(t).toString(16); + return e.length > 1 ? e : `0${e}`; + } +}, $d = Od, Id = { + channel: Ad, + lang: Md, + unit: $d +}, $ = Id, Jt = {}; +for (let t = 0; t <= 255; t++) + Jt[t] = $.unit.dec2hex(t); +const rt = { + ALL: 0, + RGB: 1, + HSL: 2 +}; +class Dd { + constructor() { + this.type = rt.ALL; + } + /* API */ + get() { + return this.type; + } + set(e) { + if (this.type && this.type !== e) + throw new Error("Cannot change both RGB and HSL channels at the same time"); + this.type = e; + } + reset() { + this.type = rt.ALL; + } + is(e) { + return this.type === e; + } +} +const Nd = Dd; +class Rd { + /* CONSTRUCTOR */ + constructor(e, i) { + this.color = i, this.changed = !1, this.data = e, this.type = new Nd(); + } + /* API */ + set(e, i) { + return this.color = i, this.changed = !1, this.data = e, this.type.type = rt.ALL, this; + } + /* HELPERS */ + _ensureHSL() { + const e = this.data, { h: i, s: r, l: n } = e; + i === void 0 && (e.h = $.channel.rgb2hsl(e, "h")), r === void 0 && (e.s = $.channel.rgb2hsl(e, "s")), n === void 0 && (e.l = $.channel.rgb2hsl(e, "l")); + } + _ensureRGB() { + const e = this.data, { r: i, g: r, b: n } = e; + i === void 0 && (e.r = $.channel.hsl2rgb(e, "r")), r === void 0 && (e.g = $.channel.hsl2rgb(e, "g")), n === void 0 && (e.b = $.channel.hsl2rgb(e, "b")); + } + /* GETTERS */ + get r() { + const e = this.data, i = e.r; + return !this.type.is(rt.HSL) && i !== void 0 ? i : (this._ensureHSL(), $.channel.hsl2rgb(e, "r")); + } + get g() { + const e = this.data, i = e.g; + return !this.type.is(rt.HSL) && i !== void 0 ? i : (this._ensureHSL(), $.channel.hsl2rgb(e, "g")); + } + get b() { + const e = this.data, i = e.b; + return !this.type.is(rt.HSL) && i !== void 0 ? i : (this._ensureHSL(), $.channel.hsl2rgb(e, "b")); + } + get h() { + const e = this.data, i = e.h; + return !this.type.is(rt.RGB) && i !== void 0 ? i : (this._ensureRGB(), $.channel.rgb2hsl(e, "h")); + } + get s() { + const e = this.data, i = e.s; + return !this.type.is(rt.RGB) && i !== void 0 ? i : (this._ensureRGB(), $.channel.rgb2hsl(e, "s")); + } + get l() { + const e = this.data, i = e.l; + return !this.type.is(rt.RGB) && i !== void 0 ? i : (this._ensureRGB(), $.channel.rgb2hsl(e, "l")); + } + get a() { + return this.data.a; + } + /* SETTERS */ + set r(e) { + this.type.set(rt.RGB), this.changed = !0, this.data.r = e; + } + set g(e) { + this.type.set(rt.RGB), this.changed = !0, this.data.g = e; + } + set b(e) { + this.type.set(rt.RGB), this.changed = !0, this.data.b = e; + } + set h(e) { + this.type.set(rt.HSL), this.changed = !0, this.data.h = e; + } + set s(e) { + this.type.set(rt.HSL), this.changed = !0, this.data.s = e; + } + set l(e) { + this.type.set(rt.HSL), this.changed = !0, this.data.l = e; + } + set a(e) { + this.changed = !0, this.data.a = e; + } +} +const Pd = Rd, qd = new Pd({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), dr = qd, Sa = { + /* VARIABLES */ + re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i, + /* API */ + parse: (t) => { + if (t.charCodeAt(0) !== 35) + return; + const e = t.match(Sa.re); + if (!e) + return; + const i = e[1], r = parseInt(i, 16), n = i.length, o = n % 4 === 0, s = n > 4, a = s ? 1 : 17, l = s ? 8 : 4, h = o ? 0 : -1, c = s ? 255 : 15; + return dr.set({ + r: (r >> l * (h + 3) & c) * a, + g: (r >> l * (h + 2) & c) * a, + b: (r >> l * (h + 1) & c) * a, + a: o ? (r & c) * a / 255 : 1 + }, t); + }, + stringify: (t) => { + const { r: e, g: i, b: r, a: n } = t; + return n < 1 ? `#${Jt[Math.round(e)]}${Jt[Math.round(i)]}${Jt[Math.round(r)]}${Jt[Math.round(n * 255)]}` : `#${Jt[Math.round(e)]}${Jt[Math.round(i)]}${Jt[Math.round(r)]}`; + } +}, Ue = Sa, Oi = { + /* VARIABLES */ + re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i, + hueRe: /^(.+?)(deg|grad|rad|turn)$/i, + /* HELPERS */ + _hue2deg: (t) => { + const e = t.match(Oi.hueRe); + if (e) { + const [, i, r] = e; + switch (r) { + case "grad": + return $.channel.clamp.h(parseFloat(i) * 0.9); + case "rad": + return $.channel.clamp.h(parseFloat(i) * 180 / Math.PI); + case "turn": + return $.channel.clamp.h(parseFloat(i) * 360); + } + } + return $.channel.clamp.h(parseFloat(t)); + }, + /* API */ + parse: (t) => { + const e = t.charCodeAt(0); + if (e !== 104 && e !== 72) + return; + const i = t.match(Oi.re); + if (!i) + return; + const [, r, n, o, s, a] = i; + return dr.set({ + h: Oi._hue2deg(r), + s: $.channel.clamp.s(parseFloat(n)), + l: $.channel.clamp.l(parseFloat(o)), + a: s ? $.channel.clamp.a(a ? parseFloat(s) / 100 : parseFloat(s)) : 1 + }, t); + }, + stringify: (t) => { + const { h: e, s: i, l: r, a: n } = t; + return n < 1 ? `hsla(${$.lang.round(e)}, ${$.lang.round(i)}%, ${$.lang.round(r)}%, ${n})` : `hsl(${$.lang.round(e)}, ${$.lang.round(i)}%, ${$.lang.round(r)}%)`; + } +}, vi = Oi, $i = { + /* VARIABLES */ + colors: { + aliceblue: "#f0f8ff", + antiquewhite: "#faebd7", + aqua: "#00ffff", + aquamarine: "#7fffd4", + azure: "#f0ffff", + beige: "#f5f5dc", + bisque: "#ffe4c4", + black: "#000000", + blanchedalmond: "#ffebcd", + blue: "#0000ff", + blueviolet: "#8a2be2", + brown: "#a52a2a", + burlywood: "#deb887", + cadetblue: "#5f9ea0", + chartreuse: "#7fff00", + chocolate: "#d2691e", + coral: "#ff7f50", + cornflowerblue: "#6495ed", + cornsilk: "#fff8dc", + crimson: "#dc143c", + cyanaqua: "#00ffff", + darkblue: "#00008b", + darkcyan: "#008b8b", + darkgoldenrod: "#b8860b", + darkgray: "#a9a9a9", + darkgreen: "#006400", + darkgrey: "#a9a9a9", + darkkhaki: "#bdb76b", + darkmagenta: "#8b008b", + darkolivegreen: "#556b2f", + darkorange: "#ff8c00", + darkorchid: "#9932cc", + darkred: "#8b0000", + darksalmon: "#e9967a", + darkseagreen: "#8fbc8f", + darkslateblue: "#483d8b", + darkslategray: "#2f4f4f", + darkslategrey: "#2f4f4f", + darkturquoise: "#00ced1", + darkviolet: "#9400d3", + deeppink: "#ff1493", + deepskyblue: "#00bfff", + dimgray: "#696969", + dimgrey: "#696969", + dodgerblue: "#1e90ff", + firebrick: "#b22222", + floralwhite: "#fffaf0", + forestgreen: "#228b22", + fuchsia: "#ff00ff", + gainsboro: "#dcdcdc", + ghostwhite: "#f8f8ff", + gold: "#ffd700", + goldenrod: "#daa520", + gray: "#808080", + green: "#008000", + greenyellow: "#adff2f", + grey: "#808080", + honeydew: "#f0fff0", + hotpink: "#ff69b4", + indianred: "#cd5c5c", + indigo: "#4b0082", + ivory: "#fffff0", + khaki: "#f0e68c", + lavender: "#e6e6fa", + lavenderblush: "#fff0f5", + lawngreen: "#7cfc00", + lemonchiffon: "#fffacd", + lightblue: "#add8e6", + lightcoral: "#f08080", + lightcyan: "#e0ffff", + lightgoldenrodyellow: "#fafad2", + lightgray: "#d3d3d3", + lightgreen: "#90ee90", + lightgrey: "#d3d3d3", + lightpink: "#ffb6c1", + lightsalmon: "#ffa07a", + lightseagreen: "#20b2aa", + lightskyblue: "#87cefa", + lightslategray: "#778899", + lightslategrey: "#778899", + lightsteelblue: "#b0c4de", + lightyellow: "#ffffe0", + lime: "#00ff00", + limegreen: "#32cd32", + linen: "#faf0e6", + magenta: "#ff00ff", + maroon: "#800000", + mediumaquamarine: "#66cdaa", + mediumblue: "#0000cd", + mediumorchid: "#ba55d3", + mediumpurple: "#9370db", + mediumseagreen: "#3cb371", + mediumslateblue: "#7b68ee", + mediumspringgreen: "#00fa9a", + mediumturquoise: "#48d1cc", + mediumvioletred: "#c71585", + midnightblue: "#191970", + mintcream: "#f5fffa", + mistyrose: "#ffe4e1", + moccasin: "#ffe4b5", + navajowhite: "#ffdead", + navy: "#000080", + oldlace: "#fdf5e6", + olive: "#808000", + olivedrab: "#6b8e23", + orange: "#ffa500", + orangered: "#ff4500", + orchid: "#da70d6", + palegoldenrod: "#eee8aa", + palegreen: "#98fb98", + paleturquoise: "#afeeee", + palevioletred: "#db7093", + papayawhip: "#ffefd5", + peachpuff: "#ffdab9", + peru: "#cd853f", + pink: "#ffc0cb", + plum: "#dda0dd", + powderblue: "#b0e0e6", + purple: "#800080", + rebeccapurple: "#663399", + red: "#ff0000", + rosybrown: "#bc8f8f", + royalblue: "#4169e1", + saddlebrown: "#8b4513", + salmon: "#fa8072", + sandybrown: "#f4a460", + seagreen: "#2e8b57", + seashell: "#fff5ee", + sienna: "#a0522d", + silver: "#c0c0c0", + skyblue: "#87ceeb", + slateblue: "#6a5acd", + slategray: "#708090", + slategrey: "#708090", + snow: "#fffafa", + springgreen: "#00ff7f", + tan: "#d2b48c", + teal: "#008080", + thistle: "#d8bfd8", + transparent: "#00000000", + turquoise: "#40e0d0", + violet: "#ee82ee", + wheat: "#f5deb3", + white: "#ffffff", + whitesmoke: "#f5f5f5", + yellow: "#ffff00", + yellowgreen: "#9acd32" + }, + /* API */ + parse: (t) => { + t = t.toLowerCase(); + const e = $i.colors[t]; + if (e) + return Ue.parse(e); + }, + stringify: (t) => { + const e = Ue.stringify(t); + for (const i in $i.colors) + if ($i.colors[i] === e) + return i; + } +}, Vo = $i, va = { + /* VARIABLES */ + re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i, + /* API */ + parse: (t) => { + const e = t.charCodeAt(0); + if (e !== 114 && e !== 82) + return; + const i = t.match(va.re); + if (!i) + return; + const [, r, n, o, s, a, l, h, c] = i; + return dr.set({ + r: $.channel.clamp.r(n ? parseFloat(r) * 2.55 : parseFloat(r)), + g: $.channel.clamp.g(s ? parseFloat(o) * 2.55 : parseFloat(o)), + b: $.channel.clamp.b(l ? parseFloat(a) * 2.55 : parseFloat(a)), + a: h ? $.channel.clamp.a(c ? parseFloat(h) / 100 : parseFloat(h)) : 1 + }, t); + }, + stringify: (t) => { + const { r: e, g: i, b: r, a: n } = t; + return n < 1 ? `rgba(${$.lang.round(e)}, ${$.lang.round(i)}, ${$.lang.round(r)}, ${$.lang.round(n)})` : `rgb(${$.lang.round(e)}, ${$.lang.round(i)}, ${$.lang.round(r)})`; + } +}, ki = va, zd = { + /* VARIABLES */ + format: { + keyword: Vo, + hex: Ue, + rgb: ki, + rgba: ki, + hsl: vi, + hsla: vi + }, + /* API */ + parse: (t) => { + if (typeof t != "string") + return t; + const e = Ue.parse(t) || ki.parse(t) || vi.parse(t) || Vo.parse(t); + if (e) + return e; + throw new Error(`Unsupported color format: "${t}"`); + }, + stringify: (t) => !t.changed && t.color ? t.color : t.type.is(rt.HSL) || t.data.r === void 0 ? vi.stringify(t) : t.a < 1 || !Number.isInteger(t.r) || !Number.isInteger(t.g) || !Number.isInteger(t.b) ? ki.stringify(t) : Ue.stringify(t) +}, $t = zd, Wd = (t, e) => { + const i = $t.parse(t); + for (const r in e) + i[r] = $.channel.clamp[r](e[r]); + return $t.stringify(i); +}, ka = Wd, Hd = (t, e, i = 0, r = 1) => { + if (typeof t != "number") + return ka(t, { a: e }); + const n = dr.set({ + r: $.channel.clamp.r(t), + g: $.channel.clamp.g(e), + b: $.channel.clamp.b(i), + a: $.channel.clamp.a(r) + }); + return $t.stringify(n); +}, Ye = Hd, jd = (t) => { + const { r: e, g: i, b: r } = $t.parse(t), n = 0.2126 * $.channel.toLinear(e) + 0.7152 * $.channel.toLinear(i) + 0.0722 * $.channel.toLinear(r); + return $.lang.round(n); +}, Ud = jd, Yd = (t) => Ud(t) >= 0.5, Gd = Yd, Vd = (t) => !Gd(t), ci = Vd, Xd = (t, e, i) => { + const r = $t.parse(t), n = r[e], o = $.channel.clamp[e](n + i); + return n !== o && (r[e] = o), $t.stringify(r); +}, wa = Xd, Kd = (t, e) => wa(t, "l", e), B = Kd, Zd = (t, e) => wa(t, "l", -e), A = Zd, Jd = (t, e) => { + const i = $t.parse(t), r = {}; + for (const n in e) + e[n] && (r[n] = i[n] + e[n]); + return ka(t, r); +}, d = Jd, Qd = (t, e, i = 50) => { + const { r, g: n, b: o, a: s } = $t.parse(t), { r: a, g: l, b: h, a: c } = $t.parse(e), f = i / 100, g = f * 2 - 1, p = s - c, k = ((g * p === -1 ? g : (g + p) / (1 + g * p)) + 1) / 2, M = 1 - k, q = r * k + a * M, v = n * k + l * M, z = o * k + h * M, Q = s * f + c * (1 - f); + return Ye(q, v, z, Q); +}, tp = Qd, ep = (t, e = 100) => { + const i = $t.parse(t); + return i.r = 255 - i.r, i.g = 255 - i.g, i.b = 255 - i.b, tp(i, t, e); +}, y = ep, lt = (t, e) => e ? d(t, { s: -40, l: 10 }) : d(t, { s: -40, l: -10 }), pr = "#ffffff", gr = "#f2f2f2"; +let ip = class { + constructor() { + this.background = "#f4f4f4", this.primaryColor = "#fff4dd", this.noteBkgColor = "#fff5ad", this.noteTextColor = "#333", this.THEME_COLOR_LIMIT = 12, this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px"; + } + updateColors() { + if (this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333"), this.secondaryColor = this.secondaryColor || d(this.primaryColor, { h: -120 }), this.tertiaryColor = this.tertiaryColor || d(this.primaryColor, { h: 180, l: 5 }), this.primaryBorderColor = this.primaryBorderColor || lt(this.primaryColor, this.darkMode), this.secondaryBorderColor = this.secondaryBorderColor || lt(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = this.tertiaryBorderColor || lt(this.tertiaryColor, this.darkMode), this.noteBorderColor = this.noteBorderColor || lt(this.noteBkgColor, this.darkMode), this.noteBkgColor = this.noteBkgColor || "#fff5ad", this.noteTextColor = this.noteTextColor || "#333", this.secondaryTextColor = this.secondaryTextColor || y(this.secondaryColor), this.tertiaryTextColor = this.tertiaryTextColor || y(this.tertiaryColor), this.lineColor = this.lineColor || y(this.background), this.arrowheadColor = this.arrowheadColor || y(this.background), this.textColor = this.textColor || this.primaryTextColor, this.border2 = this.border2 || this.tertiaryBorderColor, this.nodeBkg = this.nodeBkg || this.primaryColor, this.mainBkg = this.mainBkg || this.primaryColor, this.nodeBorder = this.nodeBorder || this.primaryBorderColor, this.clusterBkg = this.clusterBkg || this.tertiaryColor, this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor, this.defaultLinkColor = this.defaultLinkColor || this.lineColor, this.titleColor = this.titleColor || this.tertiaryTextColor, this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? A(this.secondaryColor, 30) : this.secondaryColor), this.nodeTextColor = this.nodeTextColor || this.primaryTextColor, this.actorBorder = this.actorBorder || this.primaryBorderColor, this.actorBkg = this.actorBkg || this.mainBkg, this.actorTextColor = this.actorTextColor || this.primaryTextColor, this.actorLineColor = this.actorLineColor || "grey", this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg, this.signalColor = this.signalColor || this.textColor, this.signalTextColor = this.signalTextColor || this.textColor, this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder, this.labelTextColor = this.labelTextColor || this.actorTextColor, this.loopTextColor = this.loopTextColor || this.actorTextColor, this.activationBorderColor = this.activationBorderColor || A(this.secondaryColor, 10), this.activationBkgColor = this.activationBkgColor || this.secondaryColor, this.sequenceNumberColor = this.sequenceNumberColor || y(this.lineColor), this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor, this.altSectionBkgColor = this.altSectionBkgColor || "white", this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor, this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor, this.excludeBkgColor = this.excludeBkgColor || "#eeeeee", this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor, this.taskBkgColor = this.taskBkgColor || this.primaryColor, this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor, this.activeTaskBkgColor = this.activeTaskBkgColor || B(this.primaryColor, 23), this.gridColor = this.gridColor || "lightgrey", this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey", this.doneTaskBorderColor = this.doneTaskBorderColor || "grey", this.critBorderColor = this.critBorderColor || "#ff8888", this.critBkgColor = this.critBkgColor || "red", this.todayLineColor = this.todayLineColor || "red", this.taskTextColor = this.taskTextColor || this.textColor, this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor, this.taskTextLightColor = this.taskTextLightColor || this.textColor, this.taskTextColor = this.taskTextColor || this.primaryTextColor, this.taskTextDarkColor = this.taskTextDarkColor || this.textColor, this.taskTextClickableColor = this.taskTextClickableColor || "#003163", this.personBorder = this.personBorder || this.primaryBorderColor, this.personBkg = this.personBkg || this.mainBkg, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || this.tertiaryColor, this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.nodeBorder, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.specialStateColor = this.lineColor, this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || d(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || d(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || d(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || d(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || d(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || d(this.primaryColor, { h: 210, l: 150 }), this.cScale9 = this.cScale9 || d(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || d(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || d(this.primaryColor, { h: 330 }), this.darkMode) + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) + this["cScale" + i] = A(this["cScale" + i], 75); + else + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) + this["cScale" + i] = A(this["cScale" + i], 25); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) + this["cScaleInv" + i] = this["cScaleInv" + i] || y(this["cScale" + i]); + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) + this.darkMode ? this["cScalePeer" + i] = this["cScalePeer" + i] || B(this["cScale" + i], 10) : this["cScalePeer" + i] = this["cScalePeer" + i] || A(this["cScale" + i], 10); + this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor; + for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) + this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor; + const e = this.darkMode ? -4 : -1; + for (let i = 0; i < 5; i++) + this["surface" + i] = this["surface" + i] || d(this.mainBkg, { h: 180, s: -15, l: e * (5 + i * 3) }), this["surfacePeer" + i] = this["surfacePeer" + i] || d(this.mainBkg, { h: 180, s: -15, l: e * (8 + i * 3) }); + this.classText = this.classText || this.textColor, this.fillType0 = this.fillType0 || this.primaryColor, this.fillType1 = this.fillType1 || this.secondaryColor, this.fillType2 = this.fillType2 || d(this.primaryColor, { h: 64 }), this.fillType3 = this.fillType3 || d(this.secondaryColor, { h: 64 }), this.fillType4 = this.fillType4 || d(this.primaryColor, { h: -64 }), this.fillType5 = this.fillType5 || d(this.secondaryColor, { h: -64 }), this.fillType6 = this.fillType6 || d(this.primaryColor, { h: 128 }), this.fillType7 = this.fillType7 || d(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || this.tertiaryColor, this.pie4 = this.pie4 || d(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || d(this.secondaryColor, { l: -10 }), this.pie6 = this.pie6 || d(this.tertiaryColor, { l: -10 }), this.pie7 = this.pie7 || d(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || d(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || d(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || d(this.primaryColor, { h: 60, l: -20 }), this.pie11 = this.pie11 || d(this.primaryColor, { h: -60, l: -20 }), this.pie12 = this.pie12 || d(this.primaryColor, { h: 120, l: -10 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px", this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black", this.pieOpacity = this.pieOpacity || "0.7", this.quadrant1Fill = this.quadrant1Fill || this.primaryColor, this.quadrant2Fill = this.quadrant2Fill || d(this.primaryColor, { r: 5, g: 5, b: 5 }), this.quadrant3Fill = this.quadrant3Fill || d(this.primaryColor, { r: 10, g: 10, b: 10 }), this.quadrant4Fill = this.quadrant4Fill || d(this.primaryColor, { r: 15, g: 15, b: 15 }), this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor, this.quadrant2TextFill = this.quadrant2TextFill || d(this.primaryTextColor, { r: -5, g: -5, b: -5 }), this.quadrant3TextFill = this.quadrant3TextFill || d(this.primaryTextColor, { r: -10, g: -10, b: -10 }), this.quadrant4TextFill = this.quadrant4TextFill || d(this.primaryTextColor, { r: -15, g: -15, b: -15 }), this.quadrantPointFill = this.quadrantPointFill || ci(this.quadrant1Fill) ? B(this.quadrant1Fill) : A(this.quadrant1Fill), this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor, this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor, this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor, this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor, this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor, this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor, this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || "1", this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? A(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || d(this.primaryColor, { h: -30 }), this.git4 = this.git4 || d(this.primaryColor, { h: -60 }), this.git5 = this.git5 || d(this.primaryColor, { h: -90 }), this.git6 = this.git6 || d(this.primaryColor, { h: 60 }), this.git7 = this.git7 || d(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = B(this.git0, 25), this.git1 = B(this.git1, 25), this.git2 = B(this.git2, 25), this.git3 = B(this.git3, 25), this.git4 = B(this.git4, 25), this.git5 = B(this.git5, 25), this.git6 = B(this.git6, 25), this.git7 = B(this.git7, 25)) : (this.git0 = A(this.git0, 25), this.git1 = A(this.git1, 25), this.git2 = A(this.git2, 25), this.git3 = A(this.git3, 25), this.git4 = A(this.git4, 25), this.git5 = A(this.git5, 25), this.git6 = A(this.git6, 25), this.git7 = A(this.git7, 25)), this.gitInv0 = this.gitInv0 || y(this.git0), this.gitInv1 = this.gitInv1 || y(this.git1), this.gitInv2 = this.gitInv2 || y(this.git2), this.gitInv3 = this.gitInv3 || y(this.git3), this.gitInv4 = this.gitInv4 || y(this.git4), this.gitInv5 = this.gitInv5 || y(this.git5), this.gitInv6 = this.gitInv6 || y(this.git6), this.gitInv7 = this.gitInv7 || y(this.git7), this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor), this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor, this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor, this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor, this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || pr, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gr; + } + calculate(e) { + if (typeof e != "object") { + this.updateColors(); + return; + } + const i = Object.keys(e); + i.forEach((r) => { + this[r] = e[r]; + }), this.updateColors(), i.forEach((r) => { + this[r] = e[r]; + }); + } +}; +const rp = (t) => { + const e = new ip(); + return e.calculate(t), e; +}; +let np = class { + constructor() { + this.background = "#333", this.primaryColor = "#1f2020", this.secondaryColor = B(this.primaryColor, 16), this.tertiaryColor = d(this.primaryColor, { h: -160 }), this.primaryBorderColor = y(this.background), this.secondaryBorderColor = lt(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = lt(this.tertiaryColor, this.darkMode), this.primaryTextColor = y(this.primaryColor), this.secondaryTextColor = y(this.secondaryColor), this.tertiaryTextColor = y(this.tertiaryColor), this.lineColor = y(this.background), this.textColor = y(this.background), this.mainBkg = "#1f2020", this.secondBkg = "calculated", this.mainContrastColor = "lightgrey", this.darkTextColor = B(y("#323D47"), 10), this.lineColor = "calculated", this.border1 = "#81B1DB", this.border2 = Ye(255, 255, 255, 0.25), this.arrowheadColor = "calculated", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.labelBackground = "#181818", this.textColor = "#ccc", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "#F9FFFE", this.edgeLabelBackground = "calculated", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "calculated", this.actorLineColor = "calculated", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "calculated", this.activationBkgColor = "calculated", this.sequenceNumberColor = "black", this.sectionBkgColor = A("#EAE8D9", 30), this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "#EAE8D9", this.excludeBkgColor = A(this.sectionBkgColor, 10), this.taskBorderColor = Ye(255, 255, 255, 70), this.taskBkgColor = "calculated", this.taskTextColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = Ye(255, 255, 255, 50), this.activeTaskBkgColor = "#81B1DB", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "grey", this.critBorderColor = "#E83737", this.critBkgColor = "#E83737", this.taskTextDarkColor = "calculated", this.todayLineColor = "#DB5757", this.personBorder = this.primaryBorderColor, this.personBkg = this.mainBkg, this.labelColor = "calculated", this.errorBkgColor = "#a44141", this.errorTextColor = "#ddd"; + } + updateColors() { + this.secondBkg = B(this.mainBkg, 16), this.lineColor = this.mainContrastColor, this.arrowheadColor = this.mainContrastColor, this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.edgeLabelBackground = B(this.labelBackground, 25), this.actorBorder = this.border1, this.actorBkg = this.mainBkg, this.actorTextColor = this.mainContrastColor, this.actorLineColor = this.mainContrastColor, this.signalColor = this.mainContrastColor, this.signalTextColor = this.mainContrastColor, this.labelBoxBkgColor = this.actorBkg, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.mainContrastColor, this.loopTextColor = this.mainContrastColor, this.noteBorderColor = this.secondaryBorderColor, this.noteBkgColor = this.secondBkg, this.noteTextColor = this.secondaryTextColor, this.activationBorderColor = this.border1, this.activationBkgColor = this.secondBkg, this.altSectionBkgColor = this.background, this.taskBkgColor = B(this.mainBkg, 23), this.taskTextColor = this.darkTextColor, this.taskTextLightColor = this.mainContrastColor, this.taskTextOutsideColor = this.taskTextLightColor, this.gridColor = this.mainContrastColor, this.doneTaskBkgColor = this.mainContrastColor, this.taskTextDarkColor = this.darkTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#555", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = "#f4f4f4", this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = d(this.primaryColor, { h: 64 }), this.fillType3 = d(this.secondaryColor, { h: 64 }), this.fillType4 = d(this.primaryColor, { h: -64 }), this.fillType5 = d(this.secondaryColor, { h: -64 }), this.fillType6 = d(this.primaryColor, { h: 128 }), this.fillType7 = d(this.secondaryColor, { h: 128 }), this.cScale1 = this.cScale1 || "#0b0000", this.cScale2 = this.cScale2 || "#4d1037", this.cScale3 = this.cScale3 || "#3f5258", this.cScale4 = this.cScale4 || "#4f2f1b", this.cScale5 = this.cScale5 || "#6e0a0a", this.cScale6 = this.cScale6 || "#3b0048", this.cScale7 = this.cScale7 || "#995a01", this.cScale8 = this.cScale8 || "#154706", this.cScale9 = this.cScale9 || "#161722", this.cScale10 = this.cScale10 || "#00296f", this.cScale11 = this.cScale11 || "#01629c", this.cScale12 = this.cScale12 || "#010029", this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || d(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || d(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || d(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || d(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || d(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || d(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || d(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || d(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || d(this.primaryColor, { h: 330 }); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleInv" + e] = this["cScaleInv" + e] || y(this["cScale" + e]); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScalePeer" + e] = this["cScalePeer" + e] || B(this["cScale" + e], 10); + for (let e = 0; e < 5; e++) + this["surface" + e] = this["surface" + e] || d(this.mainBkg, { h: 30, s: -30, l: -(-10 + e * 4) }), this["surfacePeer" + e] = this["surfacePeer" + e] || d(this.mainBkg, { h: 30, s: -30, l: -(-7 + e * 4) }); + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor; + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["pie" + e] = this["cScale" + e]; + this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px", this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black", this.pieOpacity = this.pieOpacity || "0.7", this.quadrant1Fill = this.quadrant1Fill || this.primaryColor, this.quadrant2Fill = this.quadrant2Fill || d(this.primaryColor, { r: 5, g: 5, b: 5 }), this.quadrant3Fill = this.quadrant3Fill || d(this.primaryColor, { r: 10, g: 10, b: 10 }), this.quadrant4Fill = this.quadrant4Fill || d(this.primaryColor, { r: 15, g: 15, b: 15 }), this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor, this.quadrant2TextFill = this.quadrant2TextFill || d(this.primaryTextColor, { r: -5, g: -5, b: -5 }), this.quadrant3TextFill = this.quadrant3TextFill || d(this.primaryTextColor, { r: -10, g: -10, b: -10 }), this.quadrant4TextFill = this.quadrant4TextFill || d(this.primaryTextColor, { r: -15, g: -15, b: -15 }), this.quadrantPointFill = this.quadrantPointFill || ci(this.quadrant1Fill) ? B(this.quadrant1Fill) : A(this.quadrant1Fill), this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor, this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor, this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor, this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor, this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor, this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor, this.classText = this.primaryTextColor, this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || "1", this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? A(this.secondaryColor, 30) : this.secondaryColor), this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = B(this.secondaryColor, 20), this.git1 = B(this.pie2 || this.secondaryColor, 20), this.git2 = B(this.pie3 || this.tertiaryColor, 20), this.git3 = B(this.pie4 || d(this.primaryColor, { h: -30 }), 20), this.git4 = B(this.pie5 || d(this.primaryColor, { h: -60 }), 20), this.git5 = B(this.pie6 || d(this.primaryColor, { h: -90 }), 10), this.git6 = B(this.pie7 || d(this.primaryColor, { h: 60 }), 10), this.git7 = B(this.pie8 || d(this.primaryColor, { h: 120 }), 20), this.gitInv0 = this.gitInv0 || y(this.git0), this.gitInv1 = this.gitInv1 || y(this.git1), this.gitInv2 = this.gitInv2 || y(this.git2), this.gitInv3 = this.gitInv3 || y(this.git3), this.gitInv4 = this.gitInv4 || y(this.git4), this.gitInv5 = this.gitInv5 || y(this.git5), this.gitInv6 = this.gitInv6 || y(this.git6), this.gitInv7 = this.gitInv7 || y(this.git7), this.gitBranchLabel0 = this.gitBranchLabel0 || y(this.labelTextColor), this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor, this.gitBranchLabel3 = this.gitBranchLabel3 || y(this.labelTextColor), this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || B(this.background, 12), this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || B(this.background, 2); + } + calculate(e) { + if (typeof e != "object") { + this.updateColors(); + return; + } + const i = Object.keys(e); + i.forEach((r) => { + this[r] = e[r]; + }), this.updateColors(), i.forEach((r) => { + this[r] = e[r]; + }); + } +}; +const op = (t) => { + const e = new np(); + return e.calculate(t), e; +}; +let sp = class { + constructor() { + this.background = "#f4f4f4", this.primaryColor = "#ECECFF", this.secondaryColor = d(this.primaryColor, { h: 120 }), this.secondaryColor = "#ffffde", this.tertiaryColor = d(this.primaryColor, { h: -160 }), this.primaryBorderColor = lt(this.primaryColor, this.darkMode), this.secondaryBorderColor = lt(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = lt(this.tertiaryColor, this.darkMode), this.primaryTextColor = y(this.primaryColor), this.secondaryTextColor = y(this.secondaryColor), this.tertiaryTextColor = y(this.tertiaryColor), this.lineColor = y(this.background), this.textColor = y(this.background), this.background = "white", this.mainBkg = "#ECECFF", this.secondBkg = "#ffffde", this.lineColor = "#333333", this.border1 = "#9370DB", this.border2 = "#aaaa33", this.arrowheadColor = "#333333", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.labelBackground = "#e8e8e8", this.textColor = "#333", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "calculated", this.edgeLabelBackground = "calculated", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "black", this.actorLineColor = "grey", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "calculated", this.altSectionBkgColor = "calculated", this.sectionBkgColor2 = "calculated", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "calculated", this.taskTextLightColor = "calculated", this.taskTextColor = this.taskTextLightColor, this.taskTextDarkColor = "calculated", this.taskTextOutsideColor = this.taskTextDarkColor, this.taskTextClickableColor = "calculated", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "calculated", this.critBorderColor = "calculated", this.critBkgColor = "calculated", this.todayLineColor = "calculated", this.sectionBkgColor = Ye(102, 102, 255, 0.49), this.altSectionBkgColor = "white", this.sectionBkgColor2 = "#fff400", this.taskBorderColor = "#534fbc", this.taskBkgColor = "#8a90dd", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "black", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "#534fbc", this.activeTaskBkgColor = "#bfc7ff", this.gridColor = "lightgrey", this.doneTaskBkgColor = "lightgrey", this.doneTaskBorderColor = "grey", this.critBorderColor = "#ff8888", this.critBkgColor = "red", this.todayLineColor = "red", this.personBorder = this.primaryBorderColor, this.personBkg = this.mainBkg, this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222", this.updateColors(); + } + updateColors() { + this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || d(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || d(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || d(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || d(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || d(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || d(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || d(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || d(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || d(this.primaryColor, { h: 330 }), this["cScalePeer1"] = this["cScalePeer1"] || A(this.secondaryColor, 45), this["cScalePeer2"] = this["cScalePeer2"] || A(this.tertiaryColor, 40); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScale" + e] = A(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || A(this["cScale" + e], 25); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleInv" + e] = this["cScaleInv" + e] || d(this["cScale" + e], { h: 180 }); + for (let e = 0; e < 5; e++) + this["surface" + e] = this["surface" + e] || d(this.mainBkg, { h: 30, l: -(5 + e * 5) }), this["surfacePeer" + e] = this["surfacePeer" + e] || d(this.mainBkg, { h: 30, l: -(7 + e * 5) }); + if (this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor, this.labelTextColor !== "calculated") { + this.cScaleLabel0 = this.cScaleLabel0 || y(this.labelTextColor), this.cScaleLabel3 = this.cScaleLabel3 || y(this.labelTextColor); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.labelTextColor; + } + this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.titleColor = this.textColor, this.edgeLabelBackground = this.labelBackground, this.actorBorder = B(this.border1, 23), this.actorBkg = this.mainBkg, this.labelBoxBkgColor = this.actorBkg, this.signalColor = this.textColor, this.signalTextColor = this.textColor, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.actorTextColor, this.loopTextColor = this.actorTextColor, this.noteBorderColor = this.border2, this.noteTextColor = this.actorTextColor, this.taskTextColor = this.taskTextLightColor, this.taskTextOutsideColor = this.taskTextDarkColor, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f0f0f0", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.nodeBorder, this.specialStateColor = this.lineColor, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = d(this.primaryColor, { h: 64 }), this.fillType3 = d(this.secondaryColor, { h: 64 }), this.fillType4 = d(this.primaryColor, { h: -64 }), this.fillType5 = d(this.secondaryColor, { h: -64 }), this.fillType6 = d(this.primaryColor, { h: 128 }), this.fillType7 = d(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || d(this.tertiaryColor, { l: -40 }), this.pie4 = this.pie4 || d(this.primaryColor, { l: -10 }), this.pie5 = this.pie5 || d(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || d(this.tertiaryColor, { l: -20 }), this.pie7 = this.pie7 || d(this.primaryColor, { h: 60, l: -20 }), this.pie8 = this.pie8 || d(this.primaryColor, { h: -60, l: -40 }), this.pie9 = this.pie9 || d(this.primaryColor, { h: 120, l: -40 }), this.pie10 = this.pie10 || d(this.primaryColor, { h: 60, l: -40 }), this.pie11 = this.pie11 || d(this.primaryColor, { h: -90, l: -40 }), this.pie12 = this.pie12 || d(this.primaryColor, { h: 120, l: -30 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px", this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black", this.pieOpacity = this.pieOpacity || "0.7", this.quadrant1Fill = this.quadrant1Fill || this.primaryColor, this.quadrant2Fill = this.quadrant2Fill || d(this.primaryColor, { r: 5, g: 5, b: 5 }), this.quadrant3Fill = this.quadrant3Fill || d(this.primaryColor, { r: 10, g: 10, b: 10 }), this.quadrant4Fill = this.quadrant4Fill || d(this.primaryColor, { r: 15, g: 15, b: 15 }), this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor, this.quadrant2TextFill = this.quadrant2TextFill || d(this.primaryTextColor, { r: -5, g: -5, b: -5 }), this.quadrant3TextFill = this.quadrant3TextFill || d(this.primaryTextColor, { r: -10, g: -10, b: -10 }), this.quadrant4TextFill = this.quadrant4TextFill || d(this.primaryTextColor, { r: -15, g: -15, b: -15 }), this.quadrantPointFill = this.quadrantPointFill || ci(this.quadrant1Fill) ? B(this.quadrant1Fill) : A(this.quadrant1Fill), this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor, this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor, this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor, this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor, this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor, this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor, this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || "1", this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.labelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || d(this.primaryColor, { h: -30 }), this.git4 = this.git4 || d(this.primaryColor, { h: -60 }), this.git5 = this.git5 || d(this.primaryColor, { h: -90 }), this.git6 = this.git6 || d(this.primaryColor, { h: 60 }), this.git7 = this.git7 || d(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = B(this.git0, 25), this.git1 = B(this.git1, 25), this.git2 = B(this.git2, 25), this.git3 = B(this.git3, 25), this.git4 = B(this.git4, 25), this.git5 = B(this.git5, 25), this.git6 = B(this.git6, 25), this.git7 = B(this.git7, 25)) : (this.git0 = A(this.git0, 25), this.git1 = A(this.git1, 25), this.git2 = A(this.git2, 25), this.git3 = A(this.git3, 25), this.git4 = A(this.git4, 25), this.git5 = A(this.git5, 25), this.git6 = A(this.git6, 25), this.git7 = A(this.git7, 25)), this.gitInv0 = this.gitInv0 || A(y(this.git0), 25), this.gitInv1 = this.gitInv1 || y(this.git1), this.gitInv2 = this.gitInv2 || y(this.git2), this.gitInv3 = this.gitInv3 || y(this.git3), this.gitInv4 = this.gitInv4 || y(this.git4), this.gitInv5 = this.gitInv5 || y(this.git5), this.gitInv6 = this.gitInv6 || y(this.git6), this.gitInv7 = this.gitInv7 || y(this.git7), this.gitBranchLabel0 = this.gitBranchLabel0 || y(this.labelTextColor), this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor, this.gitBranchLabel3 = this.gitBranchLabel3 || y(this.labelTextColor), this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || pr, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gr; + } + calculate(e) { + if (typeof e != "object") { + this.updateColors(); + return; + } + const i = Object.keys(e); + i.forEach((r) => { + this[r] = e[r]; + }), this.updateColors(), i.forEach((r) => { + this[r] = e[r]; + }); + } +}; +const ap = (t) => { + const e = new sp(); + return e.calculate(t), e; +}; +let lp = class { + constructor() { + this.background = "#f4f4f4", this.primaryColor = "#cde498", this.secondaryColor = "#cdffb2", this.background = "white", this.mainBkg = "#cde498", this.secondBkg = "#cdffb2", this.lineColor = "green", this.border1 = "#13540c", this.border2 = "#6eaa49", this.arrowheadColor = "green", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.tertiaryColor = B("#cde498", 10), this.primaryBorderColor = lt(this.primaryColor, this.darkMode), this.secondaryBorderColor = lt(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = lt(this.tertiaryColor, this.darkMode), this.primaryTextColor = y(this.primaryColor), this.secondaryTextColor = y(this.secondaryColor), this.tertiaryTextColor = y(this.primaryColor), this.lineColor = y(this.background), this.textColor = y(this.background), this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "#333", this.edgeLabelBackground = "#e8e8e8", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "black", this.actorLineColor = "grey", this.signalColor = "#333", this.signalTextColor = "#333", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "#326932", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "#fff5ad", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "#6eaa49", this.altSectionBkgColor = "white", this.sectionBkgColor2 = "#6eaa49", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "#487e3a", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "black", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "lightgrey", this.doneTaskBkgColor = "lightgrey", this.doneTaskBorderColor = "grey", this.critBorderColor = "#ff8888", this.critBkgColor = "red", this.todayLineColor = "red", this.personBorder = this.primaryBorderColor, this.personBkg = this.mainBkg, this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222"; + } + updateColors() { + this.actorBorder = A(this.mainBkg, 20), this.actorBkg = this.mainBkg, this.labelBoxBkgColor = this.actorBkg, this.labelTextColor = this.actorTextColor, this.loopTextColor = this.actorTextColor, this.noteBorderColor = this.border2, this.noteTextColor = this.actorTextColor, this.cScale0 = this.cScale0 || this.primaryColor, this.cScale1 = this.cScale1 || this.secondaryColor, this.cScale2 = this.cScale2 || this.tertiaryColor, this.cScale3 = this.cScale3 || d(this.primaryColor, { h: 30 }), this.cScale4 = this.cScale4 || d(this.primaryColor, { h: 60 }), this.cScale5 = this.cScale5 || d(this.primaryColor, { h: 90 }), this.cScale6 = this.cScale6 || d(this.primaryColor, { h: 120 }), this.cScale7 = this.cScale7 || d(this.primaryColor, { h: 150 }), this.cScale8 = this.cScale8 || d(this.primaryColor, { h: 210 }), this.cScale9 = this.cScale9 || d(this.primaryColor, { h: 270 }), this.cScale10 = this.cScale10 || d(this.primaryColor, { h: 300 }), this.cScale11 = this.cScale11 || d(this.primaryColor, { h: 330 }), this["cScalePeer1"] = this["cScalePeer1"] || A(this.secondaryColor, 45), this["cScalePeer2"] = this["cScalePeer2"] || A(this.tertiaryColor, 40); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScale" + e] = A(this["cScale" + e], 10), this["cScalePeer" + e] = this["cScalePeer" + e] || A(this["cScale" + e], 25); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleInv" + e] = this["cScaleInv" + e] || d(this["cScale" + e], { h: 180 }); + this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor; + for (let e = 0; e < 5; e++) + this["surface" + e] = this["surface" + e] || d(this.mainBkg, { h: 30, s: -30, l: -(5 + e * 5) }), this["surfacePeer" + e] = this["surfacePeer" + e] || d(this.mainBkg, { h: 30, s: -30, l: -(8 + e * 5) }); + this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.taskBorderColor = this.border1, this.taskTextColor = this.taskTextLightColor, this.taskTextOutsideColor = this.taskTextDarkColor, this.activeTaskBorderColor = this.taskBorderColor, this.activeTaskBkgColor = this.mainBkg, this.transitionColor = this.transitionColor || this.lineColor, this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f0f0f0", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.compositeBorder = this.compositeBorder || this.nodeBorder, this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = this.lineColor, this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.transitionColor = this.transitionColor || this.lineColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = d(this.primaryColor, { h: 64 }), this.fillType3 = d(this.secondaryColor, { h: 64 }), this.fillType4 = d(this.primaryColor, { h: -64 }), this.fillType5 = d(this.secondaryColor, { h: -64 }), this.fillType6 = d(this.primaryColor, { h: 128 }), this.fillType7 = d(this.secondaryColor, { h: 128 }), this.pie1 = this.pie1 || this.primaryColor, this.pie2 = this.pie2 || this.secondaryColor, this.pie3 = this.pie3 || this.tertiaryColor, this.pie4 = this.pie4 || d(this.primaryColor, { l: -30 }), this.pie5 = this.pie5 || d(this.secondaryColor, { l: -30 }), this.pie6 = this.pie6 || d(this.tertiaryColor, { h: 40, l: -40 }), this.pie7 = this.pie7 || d(this.primaryColor, { h: 60, l: -10 }), this.pie8 = this.pie8 || d(this.primaryColor, { h: -60, l: -10 }), this.pie9 = this.pie9 || d(this.primaryColor, { h: 120, l: 0 }), this.pie10 = this.pie10 || d(this.primaryColor, { h: 60, l: -50 }), this.pie11 = this.pie11 || d(this.primaryColor, { h: -60, l: -50 }), this.pie12 = this.pie12 || d(this.primaryColor, { h: 120, l: -50 }), this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px", this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black", this.pieOpacity = this.pieOpacity || "0.7", this.quadrant1Fill = this.quadrant1Fill || this.primaryColor, this.quadrant2Fill = this.quadrant2Fill || d(this.primaryColor, { r: 5, g: 5, b: 5 }), this.quadrant3Fill = this.quadrant3Fill || d(this.primaryColor, { r: 10, g: 10, b: 10 }), this.quadrant4Fill = this.quadrant4Fill || d(this.primaryColor, { r: 15, g: 15, b: 15 }), this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor, this.quadrant2TextFill = this.quadrant2TextFill || d(this.primaryTextColor, { r: -5, g: -5, b: -5 }), this.quadrant3TextFill = this.quadrant3TextFill || d(this.primaryTextColor, { r: -10, g: -10, b: -10 }), this.quadrant4TextFill = this.quadrant4TextFill || d(this.primaryTextColor, { r: -15, g: -15, b: -15 }), this.quadrantPointFill = this.quadrantPointFill || ci(this.quadrant1Fill) ? B(this.quadrant1Fill) : A(this.quadrant1Fill), this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor, this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor, this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor, this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor, this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor, this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor, this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || "1", this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = this.git0 || this.primaryColor, this.git1 = this.git1 || this.secondaryColor, this.git2 = this.git2 || this.tertiaryColor, this.git3 = this.git3 || d(this.primaryColor, { h: -30 }), this.git4 = this.git4 || d(this.primaryColor, { h: -60 }), this.git5 = this.git5 || d(this.primaryColor, { h: -90 }), this.git6 = this.git6 || d(this.primaryColor, { h: 60 }), this.git7 = this.git7 || d(this.primaryColor, { h: 120 }), this.darkMode ? (this.git0 = B(this.git0, 25), this.git1 = B(this.git1, 25), this.git2 = B(this.git2, 25), this.git3 = B(this.git3, 25), this.git4 = B(this.git4, 25), this.git5 = B(this.git5, 25), this.git6 = B(this.git6, 25), this.git7 = B(this.git7, 25)) : (this.git0 = A(this.git0, 25), this.git1 = A(this.git1, 25), this.git2 = A(this.git2, 25), this.git3 = A(this.git3, 25), this.git4 = A(this.git4, 25), this.git5 = A(this.git5, 25), this.git6 = A(this.git6, 25), this.git7 = A(this.git7, 25)), this.gitInv0 = this.gitInv0 || y(this.git0), this.gitInv1 = this.gitInv1 || y(this.git1), this.gitInv2 = this.gitInv2 || y(this.git2), this.gitInv3 = this.gitInv3 || y(this.git3), this.gitInv4 = this.gitInv4 || y(this.git4), this.gitInv5 = this.gitInv5 || y(this.git5), this.gitInv6 = this.gitInv6 || y(this.git6), this.gitInv7 = this.gitInv7 || y(this.git7), this.gitBranchLabel0 = this.gitBranchLabel0 || y(this.labelTextColor), this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor, this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor, this.gitBranchLabel3 = this.gitBranchLabel3 || y(this.labelTextColor), this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor, this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor, this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor, this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || pr, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gr; + } + calculate(e) { + if (typeof e != "object") { + this.updateColors(); + return; + } + const i = Object.keys(e); + i.forEach((r) => { + this[r] = e[r]; + }), this.updateColors(), i.forEach((r) => { + this[r] = e[r]; + }); + } +}; +const hp = (t) => { + const e = new lp(); + return e.calculate(t), e; +}; +class cp { + constructor() { + this.primaryColor = "#eee", this.contrast = "#707070", this.secondaryColor = B(this.contrast, 55), this.background = "#ffffff", this.tertiaryColor = d(this.primaryColor, { h: -160 }), this.primaryBorderColor = lt(this.primaryColor, this.darkMode), this.secondaryBorderColor = lt(this.secondaryColor, this.darkMode), this.tertiaryBorderColor = lt(this.tertiaryColor, this.darkMode), this.primaryTextColor = y(this.primaryColor), this.secondaryTextColor = y(this.secondaryColor), this.tertiaryTextColor = y(this.tertiaryColor), this.lineColor = y(this.background), this.textColor = y(this.background), this.mainBkg = "#eee", this.secondBkg = "calculated", this.lineColor = "#666", this.border1 = "#999", this.border2 = "calculated", this.note = "#ffa", this.text = "#333", this.critical = "#d42", this.done = "#bbb", this.arrowheadColor = "#333333", this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif', this.fontSize = "16px", this.THEME_COLOR_LIMIT = 12, this.nodeBkg = "calculated", this.nodeBorder = "calculated", this.clusterBkg = "calculated", this.clusterBorder = "calculated", this.defaultLinkColor = "calculated", this.titleColor = "calculated", this.edgeLabelBackground = "white", this.actorBorder = "calculated", this.actorBkg = "calculated", this.actorTextColor = "calculated", this.actorLineColor = "calculated", this.signalColor = "calculated", this.signalTextColor = "calculated", this.labelBoxBkgColor = "calculated", this.labelBoxBorderColor = "calculated", this.labelTextColor = "calculated", this.loopTextColor = "calculated", this.noteBorderColor = "calculated", this.noteBkgColor = "calculated", this.noteTextColor = "calculated", this.activationBorderColor = "#666", this.activationBkgColor = "#f4f4f4", this.sequenceNumberColor = "white", this.sectionBkgColor = "calculated", this.altSectionBkgColor = "white", this.sectionBkgColor2 = "calculated", this.excludeBkgColor = "#eeeeee", this.taskBorderColor = "calculated", this.taskBkgColor = "calculated", this.taskTextLightColor = "white", this.taskTextColor = "calculated", this.taskTextDarkColor = "calculated", this.taskTextOutsideColor = "calculated", this.taskTextClickableColor = "#003163", this.activeTaskBorderColor = "calculated", this.activeTaskBkgColor = "calculated", this.gridColor = "calculated", this.doneTaskBkgColor = "calculated", this.doneTaskBorderColor = "calculated", this.critBkgColor = "calculated", this.critBorderColor = "calculated", this.todayLineColor = "calculated", this.personBorder = this.primaryBorderColor, this.personBkg = this.mainBkg, this.labelColor = "black", this.errorBkgColor = "#552222", this.errorTextColor = "#552222"; + } + updateColors() { + this.secondBkg = B(this.contrast, 55), this.border2 = this.contrast, this.actorBorder = B(this.border1, 23), this.actorBkg = this.mainBkg, this.actorTextColor = this.text, this.actorLineColor = this.lineColor, this.signalColor = this.text, this.signalTextColor = this.text, this.labelBoxBkgColor = this.actorBkg, this.labelBoxBorderColor = this.actorBorder, this.labelTextColor = this.text, this.loopTextColor = this.text, this.noteBorderColor = "#999", this.noteBkgColor = "#666", this.noteTextColor = "#fff", this.cScale0 = this.cScale0 || "#555", this.cScale1 = this.cScale1 || "#F4F4F4", this.cScale2 = this.cScale2 || "#555", this.cScale3 = this.cScale3 || "#BBB", this.cScale4 = this.cScale4 || "#777", this.cScale5 = this.cScale5 || "#999", this.cScale6 = this.cScale6 || "#DDD", this.cScale7 = this.cScale7 || "#FFF", this.cScale8 = this.cScale8 || "#DDD", this.cScale9 = this.cScale9 || "#BBB", this.cScale10 = this.cScale10 || "#999", this.cScale11 = this.cScale11 || "#777"; + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleInv" + e] = this["cScaleInv" + e] || y(this["cScale" + e]); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this.darkMode ? this["cScalePeer" + e] = this["cScalePeer" + e] || B(this["cScale" + e], 10) : this["cScalePeer" + e] = this["cScalePeer" + e] || A(this["cScale" + e], 10); + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor), this.cScaleLabel0 = this.cScaleLabel0 || this.cScale1, this.cScaleLabel2 = this.cScaleLabel2 || this.cScale1; + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["cScaleLabel" + e] = this["cScaleLabel" + e] || this.scaleLabelColor; + for (let e = 0; e < 5; e++) + this["surface" + e] = this["surface" + e] || d(this.mainBkg, { l: -(5 + e * 5) }), this["surfacePeer" + e] = this["surfacePeer" + e] || d(this.mainBkg, { l: -(8 + e * 5) }); + this.nodeBkg = this.mainBkg, this.nodeBorder = this.border1, this.clusterBkg = this.secondBkg, this.clusterBorder = this.border2, this.defaultLinkColor = this.lineColor, this.titleColor = this.text, this.sectionBkgColor = B(this.contrast, 30), this.sectionBkgColor2 = B(this.contrast, 30), this.taskBorderColor = A(this.contrast, 10), this.taskBkgColor = this.contrast, this.taskTextColor = this.taskTextLightColor, this.taskTextDarkColor = this.text, this.taskTextOutsideColor = this.taskTextDarkColor, this.activeTaskBorderColor = this.taskBorderColor, this.activeTaskBkgColor = this.mainBkg, this.gridColor = B(this.border1, 30), this.doneTaskBkgColor = this.done, this.doneTaskBorderColor = this.lineColor, this.critBkgColor = this.critical, this.critBorderColor = A(this.critBkgColor, 10), this.todayLineColor = this.critBkgColor, this.transitionColor = this.transitionColor || "#000", this.transitionLabelColor = this.transitionLabelColor || this.textColor, this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor, this.stateBkg = this.stateBkg || this.mainBkg, this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg, this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor, this.altBackground = this.altBackground || "#f4f4f4", this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg, this.stateBorder = this.stateBorder || "#000", this.innerEndBackground = this.primaryBorderColor, this.specialStateColor = "#222", this.errorBkgColor = this.errorBkgColor || this.tertiaryColor, this.errorTextColor = this.errorTextColor || this.tertiaryTextColor, this.classText = this.primaryTextColor, this.fillType0 = this.primaryColor, this.fillType1 = this.secondaryColor, this.fillType2 = d(this.primaryColor, { h: 64 }), this.fillType3 = d(this.secondaryColor, { h: 64 }), this.fillType4 = d(this.primaryColor, { h: -64 }), this.fillType5 = d(this.secondaryColor, { h: -64 }), this.fillType6 = d(this.primaryColor, { h: 128 }), this.fillType7 = d(this.secondaryColor, { h: 128 }); + for (let e = 0; e < this.THEME_COLOR_LIMIT; e++) + this["pie" + e] = this["cScale" + e]; + this.pie12 = this.pie0, this.pieTitleTextSize = this.pieTitleTextSize || "25px", this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor, this.pieSectionTextSize = this.pieSectionTextSize || "17px", this.pieSectionTextColor = this.pieSectionTextColor || this.textColor, this.pieLegendTextSize = this.pieLegendTextSize || "17px", this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor, this.pieStrokeColor = this.pieStrokeColor || "black", this.pieStrokeWidth = this.pieStrokeWidth || "2px", this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px", this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black", this.pieOpacity = this.pieOpacity || "0.7", this.quadrant1Fill = this.quadrant1Fill || this.primaryColor, this.quadrant2Fill = this.quadrant2Fill || d(this.primaryColor, { r: 5, g: 5, b: 5 }), this.quadrant3Fill = this.quadrant3Fill || d(this.primaryColor, { r: 10, g: 10, b: 10 }), this.quadrant4Fill = this.quadrant4Fill || d(this.primaryColor, { r: 15, g: 15, b: 15 }), this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor, this.quadrant2TextFill = this.quadrant2TextFill || d(this.primaryTextColor, { r: -5, g: -5, b: -5 }), this.quadrant3TextFill = this.quadrant3TextFill || d(this.primaryTextColor, { r: -10, g: -10, b: -10 }), this.quadrant4TextFill = this.quadrant4TextFill || d(this.primaryTextColor, { r: -15, g: -15, b: -15 }), this.quadrantPointFill = this.quadrantPointFill || ci(this.quadrant1Fill) ? B(this.quadrant1Fill) : A(this.quadrant1Fill), this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor, this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor, this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor, this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor, this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor, this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor, this.requirementBackground = this.requirementBackground || this.primaryColor, this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor, this.requirementBorderSize = this.requirementBorderSize || "1", this.requirementTextColor = this.requirementTextColor || this.primaryTextColor, this.relationColor = this.relationColor || this.lineColor, this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground, this.relationLabelColor = this.relationLabelColor || this.actorTextColor, this.git0 = A(this.pie1, 25) || this.primaryColor, this.git1 = this.pie2 || this.secondaryColor, this.git2 = this.pie3 || this.tertiaryColor, this.git3 = this.pie4 || d(this.primaryColor, { h: -30 }), this.git4 = this.pie5 || d(this.primaryColor, { h: -60 }), this.git5 = this.pie6 || d(this.primaryColor, { h: -90 }), this.git6 = this.pie7 || d(this.primaryColor, { h: 60 }), this.git7 = this.pie8 || d(this.primaryColor, { h: 120 }), this.gitInv0 = this.gitInv0 || y(this.git0), this.gitInv1 = this.gitInv1 || y(this.git1), this.gitInv2 = this.gitInv2 || y(this.git2), this.gitInv3 = this.gitInv3 || y(this.git3), this.gitInv4 = this.gitInv4 || y(this.git4), this.gitInv5 = this.gitInv5 || y(this.git5), this.gitInv6 = this.gitInv6 || y(this.git6), this.gitInv7 = this.gitInv7 || y(this.git7), this.branchLabelColor = this.branchLabelColor || this.labelTextColor, this.gitBranchLabel0 = this.branchLabelColor, this.gitBranchLabel1 = "white", this.gitBranchLabel2 = this.branchLabelColor, this.gitBranchLabel3 = "white", this.gitBranchLabel4 = this.branchLabelColor, this.gitBranchLabel5 = this.branchLabelColor, this.gitBranchLabel6 = this.branchLabelColor, this.gitBranchLabel7 = this.branchLabelColor, this.tagLabelColor = this.tagLabelColor || this.primaryTextColor, this.tagLabelBackground = this.tagLabelBackground || this.primaryColor, this.tagLabelBorder = this.tagBorder || this.primaryBorderColor, this.tagLabelFontSize = this.tagLabelFontSize || "10px", this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor, this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor, this.commitLabelFontSize = this.commitLabelFontSize || "10px", this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || pr, this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || gr; + } + calculate(e) { + if (typeof e != "object") { + this.updateColors(); + return; + } + const i = Object.keys(e); + i.forEach((r) => { + this[r] = e[r]; + }), this.updateColors(), i.forEach((r) => { + this[r] = e[r]; + }); + } +} +const up = (t) => { + const e = new cp(); + return e.calculate(t), e; +}, Ut = { + base: { + getThemeVariables: rp + }, + dark: { + getThemeVariables: op + }, + default: { + getThemeVariables: ap + }, + forest: { + getThemeVariables: hp + }, + neutral: { + getThemeVariables: up + } +}, Zt = { + flowchart: { + useMaxWidth: !0, + titleTopMargin: 25, + diagramPadding: 8, + htmlLabels: !0, + nodeSpacing: 50, + rankSpacing: 50, + curve: "basis", + padding: 15, + defaultRenderer: "dagre-wrapper", + wrappingWidth: 200 + }, + sequence: { + useMaxWidth: !0, + hideUnusedParticipants: !1, + activationWidth: 10, + diagramMarginX: 50, + diagramMarginY: 10, + actorMargin: 50, + width: 150, + height: 65, + boxMargin: 10, + boxTextMargin: 5, + noteMargin: 10, + messageMargin: 35, + messageAlign: "center", + mirrorActors: !0, + forceMenus: !1, + bottomMarginAdj: 1, + rightAngles: !1, + showSequenceNumbers: !1, + actorFontSize: 14, + actorFontFamily: '"Open Sans", sans-serif', + actorFontWeight: 400, + noteFontSize: 14, + noteFontFamily: '"trebuchet ms", verdana, arial, sans-serif', + noteFontWeight: 400, + noteAlign: "center", + messageFontSize: 16, + messageFontFamily: '"trebuchet ms", verdana, arial, sans-serif', + messageFontWeight: 400, + wrap: !1, + wrapPadding: 10, + labelBoxWidth: 50, + labelBoxHeight: 20 + }, + gantt: { + useMaxWidth: !0, + titleTopMargin: 25, + barHeight: 20, + barGap: 4, + topPadding: 50, + rightPadding: 75, + leftPadding: 75, + gridLineStartPadding: 35, + fontSize: 11, + sectionFontSize: 11, + numberSectionStyles: 4, + axisFormat: "%Y-%m-%d", + topAxis: !1, + displayMode: "", + weekday: "sunday" + }, + journey: { + useMaxWidth: !0, + diagramMarginX: 50, + diagramMarginY: 10, + leftMargin: 150, + width: 150, + height: 50, + boxMargin: 10, + boxTextMargin: 5, + noteMargin: 10, + messageMargin: 35, + messageAlign: "center", + bottomMarginAdj: 1, + rightAngles: !1, + taskFontSize: 14, + taskFontFamily: '"Open Sans", sans-serif', + taskMargin: 50, + activationWidth: 10, + textPlacement: "fo", + actorColours: [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + sectionFills: [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + sectionColours: [ + "#fff" + ] + }, + class: { + useMaxWidth: !0, + titleTopMargin: 25, + arrowMarkerAbsolute: !1, + dividerMargin: 10, + padding: 5, + textHeight: 10, + defaultRenderer: "dagre-wrapper", + htmlLabels: !1 + }, + state: { + useMaxWidth: !0, + titleTopMargin: 25, + dividerMargin: 10, + sizeUnit: 5, + padding: 8, + textHeight: 10, + titleShift: -15, + noteMargin: 10, + forkWidth: 70, + forkHeight: 7, + miniPadding: 2, + fontSizeFactor: 5.02, + fontSize: 24, + labelHeight: 16, + edgeLengthFactor: "20", + compositTitleSize: 35, + radius: 5, + defaultRenderer: "dagre-wrapper" + }, + er: { + useMaxWidth: !0, + titleTopMargin: 25, + diagramPadding: 20, + layoutDirection: "TB", + minEntityWidth: 100, + minEntityHeight: 75, + entityPadding: 15, + stroke: "gray", + fill: "honeydew", + fontSize: 12 + }, + pie: { + useMaxWidth: !0, + textPosition: 0.75 + }, + quadrantChart: { + useMaxWidth: !0, + chartWidth: 500, + chartHeight: 500, + titleFontSize: 20, + titlePadding: 10, + quadrantPadding: 5, + xAxisLabelPadding: 5, + yAxisLabelPadding: 5, + xAxisLabelFontSize: 16, + yAxisLabelFontSize: 16, + quadrantLabelFontSize: 16, + quadrantTextTopPadding: 5, + pointTextPadding: 5, + pointLabelFontSize: 12, + pointRadius: 5, + xAxisPosition: "top", + yAxisPosition: "left", + quadrantInternalBorderStrokeWidth: 1, + quadrantExternalBorderStrokeWidth: 2 + }, + requirement: { + useMaxWidth: !0, + rect_fill: "#f9f9f9", + text_color: "#333", + rect_border_size: "0.5px", + rect_border_color: "#bbb", + rect_min_width: 200, + rect_min_height: 200, + fontSize: 14, + rect_padding: 10, + line_height: 20 + }, + mindmap: { + useMaxWidth: !0, + padding: 10, + maxNodeWidth: 200 + }, + timeline: { + useMaxWidth: !0, + diagramMarginX: 50, + diagramMarginY: 10, + leftMargin: 150, + width: 150, + height: 50, + boxMargin: 10, + boxTextMargin: 5, + noteMargin: 10, + messageMargin: 35, + messageAlign: "center", + bottomMarginAdj: 1, + rightAngles: !1, + taskFontSize: 14, + taskFontFamily: '"Open Sans", sans-serif', + taskMargin: 50, + activationWidth: 10, + textPlacement: "fo", + actorColours: [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + sectionFills: [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + sectionColours: [ + "#fff" + ], + disableMulticolor: !1 + }, + gitGraph: { + useMaxWidth: !0, + titleTopMargin: 25, + diagramPadding: 8, + nodeLabel: { + width: 75, + height: 100, + x: -25, + y: 0 + }, + mainBranchName: "main", + mainBranchOrder: 0, + showCommitLabel: !0, + showBranches: !0, + rotateCommitLabel: !0, + arrowMarkerAbsolute: !1 + }, + c4: { + useMaxWidth: !0, + diagramMarginX: 50, + diagramMarginY: 10, + c4ShapeMargin: 50, + c4ShapePadding: 20, + width: 216, + height: 60, + boxMargin: 10, + c4ShapeInRow: 4, + nextLinePaddingX: 0, + c4BoundaryInRow: 2, + personFontSize: 14, + personFontFamily: '"Open Sans", sans-serif', + personFontWeight: "normal", + external_personFontSize: 14, + external_personFontFamily: '"Open Sans", sans-serif', + external_personFontWeight: "normal", + systemFontSize: 14, + systemFontFamily: '"Open Sans", sans-serif', + systemFontWeight: "normal", + external_systemFontSize: 14, + external_systemFontFamily: '"Open Sans", sans-serif', + external_systemFontWeight: "normal", + system_dbFontSize: 14, + system_dbFontFamily: '"Open Sans", sans-serif', + system_dbFontWeight: "normal", + external_system_dbFontSize: 14, + external_system_dbFontFamily: '"Open Sans", sans-serif', + external_system_dbFontWeight: "normal", + system_queueFontSize: 14, + system_queueFontFamily: '"Open Sans", sans-serif', + system_queueFontWeight: "normal", + external_system_queueFontSize: 14, + external_system_queueFontFamily: '"Open Sans", sans-serif', + external_system_queueFontWeight: "normal", + boundaryFontSize: 14, + boundaryFontFamily: '"Open Sans", sans-serif', + boundaryFontWeight: "normal", + messageFontSize: 12, + messageFontFamily: '"Open Sans", sans-serif', + messageFontWeight: "normal", + containerFontSize: 14, + containerFontFamily: '"Open Sans", sans-serif', + containerFontWeight: "normal", + external_containerFontSize: 14, + external_containerFontFamily: '"Open Sans", sans-serif', + external_containerFontWeight: "normal", + container_dbFontSize: 14, + container_dbFontFamily: '"Open Sans", sans-serif', + container_dbFontWeight: "normal", + external_container_dbFontSize: 14, + external_container_dbFontFamily: '"Open Sans", sans-serif', + external_container_dbFontWeight: "normal", + container_queueFontSize: 14, + container_queueFontFamily: '"Open Sans", sans-serif', + container_queueFontWeight: "normal", + external_container_queueFontSize: 14, + external_container_queueFontFamily: '"Open Sans", sans-serif', + external_container_queueFontWeight: "normal", + componentFontSize: 14, + componentFontFamily: '"Open Sans", sans-serif', + componentFontWeight: "normal", + external_componentFontSize: 14, + external_componentFontFamily: '"Open Sans", sans-serif', + external_componentFontWeight: "normal", + component_dbFontSize: 14, + component_dbFontFamily: '"Open Sans", sans-serif', + component_dbFontWeight: "normal", + external_component_dbFontSize: 14, + external_component_dbFontFamily: '"Open Sans", sans-serif', + external_component_dbFontWeight: "normal", + component_queueFontSize: 14, + component_queueFontFamily: '"Open Sans", sans-serif', + component_queueFontWeight: "normal", + external_component_queueFontSize: 14, + external_component_queueFontFamily: '"Open Sans", sans-serif', + external_component_queueFontWeight: "normal", + wrap: !0, + wrapPadding: 10, + person_bg_color: "#08427B", + person_border_color: "#073B6F", + external_person_bg_color: "#686868", + external_person_border_color: "#8A8A8A", + system_bg_color: "#1168BD", + system_border_color: "#3C7FC0", + system_db_bg_color: "#1168BD", + system_db_border_color: "#3C7FC0", + system_queue_bg_color: "#1168BD", + system_queue_border_color: "#3C7FC0", + external_system_bg_color: "#999999", + external_system_border_color: "#8A8A8A", + external_system_db_bg_color: "#999999", + external_system_db_border_color: "#8A8A8A", + external_system_queue_bg_color: "#999999", + external_system_queue_border_color: "#8A8A8A", + container_bg_color: "#438DD5", + container_border_color: "#3C7FC0", + container_db_bg_color: "#438DD5", + container_db_border_color: "#3C7FC0", + container_queue_bg_color: "#438DD5", + container_queue_border_color: "#3C7FC0", + external_container_bg_color: "#B3B3B3", + external_container_border_color: "#A6A6A6", + external_container_db_bg_color: "#B3B3B3", + external_container_db_border_color: "#A6A6A6", + external_container_queue_bg_color: "#B3B3B3", + external_container_queue_border_color: "#A6A6A6", + component_bg_color: "#85BBF0", + component_border_color: "#78A8D8", + component_db_bg_color: "#85BBF0", + component_db_border_color: "#78A8D8", + component_queue_bg_color: "#85BBF0", + component_queue_border_color: "#78A8D8", + external_component_bg_color: "#CCCCCC", + external_component_border_color: "#BFBFBF", + external_component_db_bg_color: "#CCCCCC", + external_component_db_border_color: "#BFBFBF", + external_component_queue_bg_color: "#CCCCCC", + external_component_queue_border_color: "#BFBFBF" + }, + sankey: { + useMaxWidth: !0, + width: 600, + height: 400, + linkColor: "gradient", + nodeAlignment: "justify", + showValues: !0, + prefix: "", + suffix: "" + }, + theme: "default", + maxTextSize: 5e4, + darkMode: !1, + fontFamily: '"trebuchet ms", verdana, arial, sans-serif;', + logLevel: 5, + securityLevel: "strict", + startOnLoad: !0, + arrowMarkerAbsolute: !1, + secure: [ + "secure", + "securityLevel", + "startOnLoad", + "maxTextSize" + ], + deterministicIds: !1, + fontSize: 16 +}, Ba = { + ...Zt, + // Set, even though they're `undefined` so that `configKeys` finds these keys + // TODO: Should we replace these with `null` so that they can go in the JSON Schema? + deterministicIDSeed: void 0, + themeCSS: void 0, + // add non-JSON default config values + themeVariables: Ut.default.getThemeVariables(), + sequence: { + ...Zt.sequence, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + }, + noteFont: function() { + return { + fontFamily: this.noteFontFamily, + fontSize: this.noteFontSize, + fontWeight: this.noteFontWeight + }; + }, + actorFont: function() { + return { + fontFamily: this.actorFontFamily, + fontSize: this.actorFontSize, + fontWeight: this.actorFontWeight + }; + } + }, + gantt: { + ...Zt.gantt, + tickInterval: void 0, + useWidth: void 0 + // can probably be removed since `configKeys` already includes this + }, + c4: { + ...Zt.c4, + useWidth: void 0, + personFont: function() { + return { + fontFamily: this.personFontFamily, + fontSize: this.personFontSize, + fontWeight: this.personFontWeight + }; + }, + external_personFont: function() { + return { + fontFamily: this.external_personFontFamily, + fontSize: this.external_personFontSize, + fontWeight: this.external_personFontWeight + }; + }, + systemFont: function() { + return { + fontFamily: this.systemFontFamily, + fontSize: this.systemFontSize, + fontWeight: this.systemFontWeight + }; + }, + external_systemFont: function() { + return { + fontFamily: this.external_systemFontFamily, + fontSize: this.external_systemFontSize, + fontWeight: this.external_systemFontWeight + }; + }, + system_dbFont: function() { + return { + fontFamily: this.system_dbFontFamily, + fontSize: this.system_dbFontSize, + fontWeight: this.system_dbFontWeight + }; + }, + external_system_dbFont: function() { + return { + fontFamily: this.external_system_dbFontFamily, + fontSize: this.external_system_dbFontSize, + fontWeight: this.external_system_dbFontWeight + }; + }, + system_queueFont: function() { + return { + fontFamily: this.system_queueFontFamily, + fontSize: this.system_queueFontSize, + fontWeight: this.system_queueFontWeight + }; + }, + external_system_queueFont: function() { + return { + fontFamily: this.external_system_queueFontFamily, + fontSize: this.external_system_queueFontSize, + fontWeight: this.external_system_queueFontWeight + }; + }, + containerFont: function() { + return { + fontFamily: this.containerFontFamily, + fontSize: this.containerFontSize, + fontWeight: this.containerFontWeight + }; + }, + external_containerFont: function() { + return { + fontFamily: this.external_containerFontFamily, + fontSize: this.external_containerFontSize, + fontWeight: this.external_containerFontWeight + }; + }, + container_dbFont: function() { + return { + fontFamily: this.container_dbFontFamily, + fontSize: this.container_dbFontSize, + fontWeight: this.container_dbFontWeight + }; + }, + external_container_dbFont: function() { + return { + fontFamily: this.external_container_dbFontFamily, + fontSize: this.external_container_dbFontSize, + fontWeight: this.external_container_dbFontWeight + }; + }, + container_queueFont: function() { + return { + fontFamily: this.container_queueFontFamily, + fontSize: this.container_queueFontSize, + fontWeight: this.container_queueFontWeight + }; + }, + external_container_queueFont: function() { + return { + fontFamily: this.external_container_queueFontFamily, + fontSize: this.external_container_queueFontSize, + fontWeight: this.external_container_queueFontWeight + }; + }, + componentFont: function() { + return { + fontFamily: this.componentFontFamily, + fontSize: this.componentFontSize, + fontWeight: this.componentFontWeight + }; + }, + external_componentFont: function() { + return { + fontFamily: this.external_componentFontFamily, + fontSize: this.external_componentFontSize, + fontWeight: this.external_componentFontWeight + }; + }, + component_dbFont: function() { + return { + fontFamily: this.component_dbFontFamily, + fontSize: this.component_dbFontSize, + fontWeight: this.component_dbFontWeight + }; + }, + external_component_dbFont: function() { + return { + fontFamily: this.external_component_dbFontFamily, + fontSize: this.external_component_dbFontSize, + fontWeight: this.external_component_dbFontWeight + }; + }, + component_queueFont: function() { + return { + fontFamily: this.component_queueFontFamily, + fontSize: this.component_queueFontSize, + fontWeight: this.component_queueFontWeight + }; + }, + external_component_queueFont: function() { + return { + fontFamily: this.external_component_queueFontFamily, + fontSize: this.external_component_queueFontSize, + fontWeight: this.external_component_queueFontWeight + }; + }, + boundaryFont: function() { + return { + fontFamily: this.boundaryFontFamily, + fontSize: this.boundaryFontSize, + fontWeight: this.boundaryFontWeight + }; + }, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + } + }, + pie: { + ...Zt.pie, + useWidth: 984 + }, + requirement: { + ...Zt.requirement, + useWidth: void 0 + }, + gitGraph: { + ...Zt.gitGraph, + // TODO: This is a temporary override for `gitGraph`, since every other + // diagram does have `useMaxWidth`, but instead sets it to `true`. + // Should we set this to `true` instead? + useMaxWidth: !1 + }, + sankey: { + ...Zt.sankey, + // this is false, unlike every other diagram (other than gitGraph) + // TODO: can we make this default to `true` instead? + useMaxWidth: !1 + } +}, Fa = (t, e = "") => Object.keys(t).reduce((i, r) => Array.isArray(t[r]) ? i : typeof t[r] == "object" && t[r] !== null ? [...i, e + r, ...Fa(t[r], "")] : [...i, e + r], []), fp = new Set(Fa(Ba, "")), dp = Ba, Vi = (t) => { + if (L.debug("sanitizeDirective called with", t), !(typeof t != "object" || t == null)) { + if (Array.isArray(t)) { + t.forEach((e) => Vi(e)); + return; + } + for (const e of Object.keys(t)) { + if (L.debug("Checking key", e), e.startsWith("__") || e.includes("proto") || e.includes("constr") || !fp.has(e) || t[e] == null) { + L.debug("sanitize deleting key: ", e), delete t[e]; + continue; + } + if (typeof t[e] == "object") { + L.debug("sanitizing object", e), Vi(t[e]); + continue; + } + const i = ["themeCSS", "fontFamily", "altFontFamily"]; + for (const r of i) + e.includes(r) && (L.debug("sanitizing css option", e), t[e] = pp(t[e])); + } + if (t.themeVariables) + for (const e of Object.keys(t.themeVariables)) { + const i = t.themeVariables[e]; + i != null && i.match && !i.match(/^[\d "#%(),.;A-Za-z]+$/) && (t.themeVariables[e] = ""); + } + L.debug("After sanitization", t); + } +}, pp = (t) => { + let e = 0, i = 0; + for (const r of t) { + if (e < i) + return "{ /* ERROR: Unbalanced CSS */ }"; + r === "{" ? e++ : r === "}" && i++; + } + return e !== i ? "{ /* ERROR: Unbalanced CSS */ }" : t; +}, La = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s, Ge = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, gp = /\s*%%.*\n/gm; +class Aa extends Error { + constructor(e) { + super(e), this.name = "UnknownDiagramError"; + } +} +const Ae = {}, mr = function(t, e) { + t = t.replace(La, "").replace(Ge, "").replace(gp, ` +`); + for (const [i, { detector: r }] of Object.entries(Ae)) + if (r(t, e)) + return i; + throw new Aa( + `No diagram type detected matching given configuration for text: ${t}` + ); +}, Ea = (...t) => { + for (const { id: e, detector: i, loader: r } of t) + Ma(e, i, r); +}, Ma = (t, e, i) => { + Ae[t] ? L.error(`Detector with key ${t} already exists`) : Ae[t] = { detector: e, loader: i }, L.debug(`Detector with key ${t} added${i ? " with loader" : ""}`); +}, mp = (t) => Ae[t].loader, ln = (t, e, { depth: i = 2, clobber: r = !1 } = {}) => { + const n = { depth: i, clobber: r }; + return Array.isArray(e) && !Array.isArray(t) ? (e.forEach((o) => ln(t, o, n)), t) : Array.isArray(e) && Array.isArray(t) ? (e.forEach((o) => { + t.includes(o) || t.push(o); + }), t) : t === void 0 || i <= 0 ? t != null && typeof t == "object" && typeof e == "object" ? Object.assign(t, e) : e : (e !== void 0 && typeof t == "object" && typeof e == "object" && Object.keys(e).forEach((o) => { + typeof e[o] == "object" && (t[o] === void 0 || typeof t[o] == "object") ? (t[o] === void 0 && (t[o] = Array.isArray(e[o]) ? [] : {}), t[o] = ln(t[o], e[o], { depth: i - 1, clobber: r })) : (r || typeof t[o] != "object" && typeof e[o] != "object") && (t[o] = e[o]); + }), t); +}, nt = ln; +var _p = typeof global == "object" && global && global.Object === Object && global; +const Oa = _p; +var yp = typeof self == "object" && self && self.Object === Object && self, Cp = Oa || yp || Function("return this")(); +const Dt = Cp; +var xp = Dt.Symbol; +const Xi = xp; +var $a = Object.prototype, bp = $a.hasOwnProperty, Tp = $a.toString, ze = Xi ? Xi.toStringTag : void 0; +function Sp(t) { + var e = bp.call(t, ze), i = t[ze]; + try { + t[ze] = void 0; + var r = !0; + } catch { + } + var n = Tp.call(t); + return r && (e ? t[ze] = i : delete t[ze]), n; +} +var vp = Object.prototype, kp = vp.toString; +function wp(t) { + return kp.call(t); +} +var Bp = "[object Null]", Fp = "[object Undefined]", Xo = Xi ? Xi.toStringTag : void 0; +function $e(t) { + return t == null ? t === void 0 ? Fp : Bp : Xo && Xo in Object(t) ? Sp(t) : wp(t); +} +function ge(t) { + var e = typeof t; + return t != null && (e == "object" || e == "function"); +} +var Lp = "[object AsyncFunction]", Ap = "[object Function]", Ep = "[object GeneratorFunction]", Mp = "[object Proxy]"; +function Dn(t) { + if (!ge(t)) + return !1; + var e = $e(t); + return e == Ap || e == Ep || e == Lp || e == Mp; +} +var Op = Dt["__core-js_shared__"]; +const Hr = Op; +var Ko = function() { + var t = /[^.]+$/.exec(Hr && Hr.keys && Hr.keys.IE_PROTO || ""); + return t ? "Symbol(src)_1." + t : ""; +}(); +function $p(t) { + return !!Ko && Ko in t; +} +var Ip = Function.prototype, Dp = Ip.toString; +function me(t) { + if (t != null) { + try { + return Dp.call(t); + } catch { + } + try { + return t + ""; + } catch { + } + } + return ""; +} +var Np = /[\\^$.*+?()[\]{}|]/g, Rp = /^\[object .+?Constructor\]$/, Pp = Function.prototype, qp = Object.prototype, zp = Pp.toString, Wp = qp.hasOwnProperty, Hp = RegExp( + "^" + zp.call(Wp).replace(Np, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +); +function jp(t) { + if (!ge(t) || $p(t)) + return !1; + var e = Dn(t) ? Hp : Rp; + return e.test(me(t)); +} +function Up(t, e) { + return t == null ? void 0 : t[e]; +} +function _e(t, e) { + var i = Up(t, e); + return jp(i) ? i : void 0; +} +var Yp = _e(Object, "create"); +const ii = Yp; +function Gp() { + this.__data__ = ii ? ii(null) : {}, this.size = 0; +} +function Vp(t) { + var e = this.has(t) && delete this.__data__[t]; + return this.size -= e ? 1 : 0, e; +} +var Xp = "__lodash_hash_undefined__", Kp = Object.prototype, Zp = Kp.hasOwnProperty; +function Jp(t) { + var e = this.__data__; + if (ii) { + var i = e[t]; + return i === Xp ? void 0 : i; + } + return Zp.call(e, t) ? e[t] : void 0; +} +var Qp = Object.prototype, tg = Qp.hasOwnProperty; +function eg(t) { + var e = this.__data__; + return ii ? e[t] !== void 0 : tg.call(e, t); +} +var ig = "__lodash_hash_undefined__"; +function rg(t, e) { + var i = this.__data__; + return this.size += this.has(t) ? 0 : 1, i[t] = ii && e === void 0 ? ig : e, this; +} +function de(t) { + var e = -1, i = t == null ? 0 : t.length; + for (this.clear(); ++e < i; ) { + var r = t[e]; + this.set(r[0], r[1]); + } +} +de.prototype.clear = Gp; +de.prototype.delete = Vp; +de.prototype.get = Jp; +de.prototype.has = eg; +de.prototype.set = rg; +function ng() { + this.__data__ = [], this.size = 0; +} +function _r(t, e) { + return t === e || t !== t && e !== e; +} +function yr(t, e) { + for (var i = t.length; i--; ) + if (_r(t[i][0], e)) + return i; + return -1; +} +var og = Array.prototype, sg = og.splice; +function ag(t) { + var e = this.__data__, i = yr(e, t); + if (i < 0) + return !1; + var r = e.length - 1; + return i == r ? e.pop() : sg.call(e, i, 1), --this.size, !0; +} +function lg(t) { + var e = this.__data__, i = yr(e, t); + return i < 0 ? void 0 : e[i][1]; +} +function hg(t) { + return yr(this.__data__, t) > -1; +} +function cg(t, e) { + var i = this.__data__, r = yr(i, t); + return r < 0 ? (++this.size, i.push([t, e])) : i[r][1] = e, this; +} +function Gt(t) { + var e = -1, i = t == null ? 0 : t.length; + for (this.clear(); ++e < i; ) { + var r = t[e]; + this.set(r[0], r[1]); + } +} +Gt.prototype.clear = ng; +Gt.prototype.delete = ag; +Gt.prototype.get = lg; +Gt.prototype.has = hg; +Gt.prototype.set = cg; +var ug = _e(Dt, "Map"); +const ri = ug; +function fg() { + this.size = 0, this.__data__ = { + hash: new de(), + map: new (ri || Gt)(), + string: new de() + }; +} +function dg(t) { + var e = typeof t; + return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null; +} +function Cr(t, e) { + var i = t.__data__; + return dg(e) ? i[typeof e == "string" ? "string" : "hash"] : i.map; +} +function pg(t) { + var e = Cr(this, t).delete(t); + return this.size -= e ? 1 : 0, e; +} +function gg(t) { + return Cr(this, t).get(t); +} +function mg(t) { + return Cr(this, t).has(t); +} +function _g(t, e) { + var i = Cr(this, t), r = i.size; + return i.set(t, e), this.size += i.size == r ? 0 : 1, this; +} +function ne(t) { + var e = -1, i = t == null ? 0 : t.length; + for (this.clear(); ++e < i; ) { + var r = t[e]; + this.set(r[0], r[1]); + } +} +ne.prototype.clear = fg; +ne.prototype.delete = pg; +ne.prototype.get = gg; +ne.prototype.has = mg; +ne.prototype.set = _g; +var yg = "Expected a function"; +function ui(t, e) { + if (typeof t != "function" || e != null && typeof e != "function") + throw new TypeError(yg); + var i = function() { + var r = arguments, n = e ? e.apply(this, r) : r[0], o = i.cache; + if (o.has(n)) + return o.get(n); + var s = t.apply(this, r); + return i.cache = o.set(n, s) || o, s; + }; + return i.cache = new (ui.Cache || ne)(), i; +} +ui.Cache = ne; +function Cg() { + this.__data__ = new Gt(), this.size = 0; +} +function xg(t) { + var e = this.__data__, i = e.delete(t); + return this.size = e.size, i; +} +function bg(t) { + return this.__data__.get(t); +} +function Tg(t) { + return this.__data__.has(t); +} +var Sg = 200; +function vg(t, e) { + var i = this.__data__; + if (i instanceof Gt) { + var r = i.__data__; + if (!ri || r.length < Sg - 1) + return r.push([t, e]), this.size = ++i.size, this; + i = this.__data__ = new ne(r); + } + return i.set(t, e), this.size = i.size, this; +} +function Ie(t) { + var e = this.__data__ = new Gt(t); + this.size = e.size; +} +Ie.prototype.clear = Cg; +Ie.prototype.delete = xg; +Ie.prototype.get = bg; +Ie.prototype.has = Tg; +Ie.prototype.set = vg; +var kg = function() { + try { + var t = _e(Object, "defineProperty"); + return t({}, "", {}), t; + } catch { + } +}(); +const Ki = kg; +function Nn(t, e, i) { + e == "__proto__" && Ki ? Ki(t, e, { + configurable: !0, + enumerable: !0, + value: i, + writable: !0 + }) : t[e] = i; +} +function hn(t, e, i) { + (i !== void 0 && !_r(t[e], i) || i === void 0 && !(e in t)) && Nn(t, e, i); +} +function wg(t) { + return function(e, i, r) { + for (var n = -1, o = Object(e), s = r(e), a = s.length; a--; ) { + var l = s[t ? a : ++n]; + if (i(o[l], l, o) === !1) + break; + } + return e; + }; +} +var Bg = wg(); +const Fg = Bg; +var Ia = typeof exports == "object" && exports && !exports.nodeType && exports, Zo = Ia && typeof module == "object" && module && !module.nodeType && module, Lg = Zo && Zo.exports === Ia, Jo = Lg ? Dt.Buffer : void 0, Qo = Jo ? Jo.allocUnsafe : void 0; +function Ag(t, e) { + if (e) + return t.slice(); + var i = t.length, r = Qo ? Qo(i) : new t.constructor(i); + return t.copy(r), r; +} +var Eg = Dt.Uint8Array; +const ts = Eg; +function Mg(t) { + var e = new t.constructor(t.byteLength); + return new ts(e).set(new ts(t)), e; +} +function Og(t, e) { + var i = e ? Mg(t.buffer) : t.buffer; + return new t.constructor(i, t.byteOffset, t.length); +} +function $g(t, e) { + var i = -1, r = t.length; + for (e || (e = Array(r)); ++i < r; ) + e[i] = t[i]; + return e; +} +var es = Object.create, Ig = function() { + function t() { + } + return function(e) { + if (!ge(e)) + return {}; + if (es) + return es(e); + t.prototype = e; + var i = new t(); + return t.prototype = void 0, i; + }; +}(); +const Dg = Ig; +function Da(t, e) { + return function(i) { + return t(e(i)); + }; +} +var Ng = Da(Object.getPrototypeOf, Object); +const Na = Ng; +var Rg = Object.prototype; +function xr(t) { + var e = t && t.constructor, i = typeof e == "function" && e.prototype || Rg; + return t === i; +} +function Pg(t) { + return typeof t.constructor == "function" && !xr(t) ? Dg(Na(t)) : {}; +} +function fi(t) { + return t != null && typeof t == "object"; +} +var qg = "[object Arguments]"; +function is(t) { + return fi(t) && $e(t) == qg; +} +var Ra = Object.prototype, zg = Ra.hasOwnProperty, Wg = Ra.propertyIsEnumerable, Hg = is(function() { + return arguments; +}()) ? is : function(t) { + return fi(t) && zg.call(t, "callee") && !Wg.call(t, "callee"); +}; +const Zi = Hg; +var jg = Array.isArray; +const Ji = jg; +var Ug = 9007199254740991; +function Pa(t) { + return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Ug; +} +function br(t) { + return t != null && Pa(t.length) && !Dn(t); +} +function Yg(t) { + return fi(t) && br(t); +} +function Gg() { + return !1; +} +var qa = typeof exports == "object" && exports && !exports.nodeType && exports, rs = qa && typeof module == "object" && module && !module.nodeType && module, Vg = rs && rs.exports === qa, ns = Vg ? Dt.Buffer : void 0, Xg = ns ? ns.isBuffer : void 0, Kg = Xg || Gg; +const Rn = Kg; +var Zg = "[object Object]", Jg = Function.prototype, Qg = Object.prototype, za = Jg.toString, tm = Qg.hasOwnProperty, em = za.call(Object); +function im(t) { + if (!fi(t) || $e(t) != Zg) + return !1; + var e = Na(t); + if (e === null) + return !0; + var i = tm.call(e, "constructor") && e.constructor; + return typeof i == "function" && i instanceof i && za.call(i) == em; +} +var rm = "[object Arguments]", nm = "[object Array]", om = "[object Boolean]", sm = "[object Date]", am = "[object Error]", lm = "[object Function]", hm = "[object Map]", cm = "[object Number]", um = "[object Object]", fm = "[object RegExp]", dm = "[object Set]", pm = "[object String]", gm = "[object WeakMap]", mm = "[object ArrayBuffer]", _m = "[object DataView]", ym = "[object Float32Array]", Cm = "[object Float64Array]", xm = "[object Int8Array]", bm = "[object Int16Array]", Tm = "[object Int32Array]", Sm = "[object Uint8Array]", vm = "[object Uint8ClampedArray]", km = "[object Uint16Array]", wm = "[object Uint32Array]", Y = {}; +Y[ym] = Y[Cm] = Y[xm] = Y[bm] = Y[Tm] = Y[Sm] = Y[vm] = Y[km] = Y[wm] = !0; +Y[rm] = Y[nm] = Y[mm] = Y[om] = Y[_m] = Y[sm] = Y[am] = Y[lm] = Y[hm] = Y[cm] = Y[um] = Y[fm] = Y[dm] = Y[pm] = Y[gm] = !1; +function Bm(t) { + return fi(t) && Pa(t.length) && !!Y[$e(t)]; +} +function Fm(t) { + return function(e) { + return t(e); + }; +} +var Wa = typeof exports == "object" && exports && !exports.nodeType && exports, Ve = Wa && typeof module == "object" && module && !module.nodeType && module, Lm = Ve && Ve.exports === Wa, jr = Lm && Oa.process, Am = function() { + try { + var t = Ve && Ve.require && Ve.require("util").types; + return t || jr && jr.binding && jr.binding("util"); + } catch { + } +}(); +const os = Am; +var ss = os && os.isTypedArray, Em = ss ? Fm(ss) : Bm; +const Pn = Em; +function cn(t, e) { + if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__") + return t[e]; +} +var Mm = Object.prototype, Om = Mm.hasOwnProperty; +function $m(t, e, i) { + var r = t[e]; + (!(Om.call(t, e) && _r(r, i)) || i === void 0 && !(e in t)) && Nn(t, e, i); +} +function Im(t, e, i, r) { + var n = !i; + i || (i = {}); + for (var o = -1, s = e.length; ++o < s; ) { + var a = e[o], l = r ? r(i[a], t[a], a, i, t) : void 0; + l === void 0 && (l = t[a]), n ? Nn(i, a, l) : $m(i, a, l); + } + return i; +} +function Dm(t, e) { + for (var i = -1, r = Array(t); ++i < t; ) + r[i] = e(i); + return r; +} +var Nm = 9007199254740991, Rm = /^(?:0|[1-9]\d*)$/; +function Ha(t, e) { + var i = typeof t; + return e = e ?? Nm, !!e && (i == "number" || i != "symbol" && Rm.test(t)) && t > -1 && t % 1 == 0 && t < e; +} +var Pm = Object.prototype, qm = Pm.hasOwnProperty; +function zm(t, e) { + var i = Ji(t), r = !i && Zi(t), n = !i && !r && Rn(t), o = !i && !r && !n && Pn(t), s = i || r || n || o, a = s ? Dm(t.length, String) : [], l = a.length; + for (var h in t) + (e || qm.call(t, h)) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode. + (h == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + n && (h == "offset" || h == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + o && (h == "buffer" || h == "byteLength" || h == "byteOffset") || // Skip index properties. + Ha(h, l))) && a.push(h); + return a; +} +function Wm(t) { + var e = []; + if (t != null) + for (var i in Object(t)) + e.push(i); + return e; +} +var Hm = Object.prototype, jm = Hm.hasOwnProperty; +function Um(t) { + if (!ge(t)) + return Wm(t); + var e = xr(t), i = []; + for (var r in t) + r == "constructor" && (e || !jm.call(t, r)) || i.push(r); + return i; +} +function ja(t) { + return br(t) ? zm(t, !0) : Um(t); +} +function Ym(t) { + return Im(t, ja(t)); +} +function Gm(t, e, i, r, n, o, s) { + var a = cn(t, i), l = cn(e, i), h = s.get(l); + if (h) { + hn(t, i, h); + return; + } + var c = o ? o(a, l, i + "", t, e, s) : void 0, f = c === void 0; + if (f) { + var g = Ji(l), p = !g && Rn(l), _ = !g && !p && Pn(l); + c = l, g || p || _ ? Ji(a) ? c = a : Yg(a) ? c = $g(a) : p ? (f = !1, c = Ag(l, !0)) : _ ? (f = !1, c = Og(l, !0)) : c = [] : im(l) || Zi(l) ? (c = a, Zi(a) ? c = Ym(a) : (!ge(a) || Dn(a)) && (c = Pg(l))) : f = !1; + } + f && (s.set(l, c), n(c, l, r, o, s), s.delete(l)), hn(t, i, c); +} +function Ua(t, e, i, r, n) { + t !== e && Fg(e, function(o, s) { + if (n || (n = new Ie()), ge(o)) + Gm(t, e, s, i, Ua, r, n); + else { + var a = r ? r(cn(t, s), o, s + "", t, e, n) : void 0; + a === void 0 && (a = o), hn(t, s, a); + } + }, ja); +} +function Ya(t) { + return t; +} +function Vm(t, e, i) { + switch (i.length) { + case 0: + return t.call(e); + case 1: + return t.call(e, i[0]); + case 2: + return t.call(e, i[0], i[1]); + case 3: + return t.call(e, i[0], i[1], i[2]); + } + return t.apply(e, i); +} +var as = Math.max; +function Xm(t, e, i) { + return e = as(e === void 0 ? t.length - 1 : e, 0), function() { + for (var r = arguments, n = -1, o = as(r.length - e, 0), s = Array(o); ++n < o; ) + s[n] = r[e + n]; + n = -1; + for (var a = Array(e + 1); ++n < e; ) + a[n] = r[n]; + return a[e] = i(s), Vm(t, this, a); + }; +} +function Km(t) { + return function() { + return t; + }; +} +var Zm = Ki ? function(t, e) { + return Ki(t, "toString", { + configurable: !0, + enumerable: !1, + value: Km(e), + writable: !0 + }); +} : Ya; +const Jm = Zm; +var Qm = 800, t0 = 16, e0 = Date.now; +function i0(t) { + var e = 0, i = 0; + return function() { + var r = e0(), n = t0 - (r - i); + if (i = r, n > 0) { + if (++e >= Qm) + return arguments[0]; + } else + e = 0; + return t.apply(void 0, arguments); + }; +} +var r0 = i0(Jm); +const n0 = r0; +function o0(t, e) { + return n0(Xm(t, e, Ya), t + ""); +} +function s0(t, e, i) { + if (!ge(i)) + return !1; + var r = typeof e; + return (r == "number" ? br(i) && Ha(e, i.length) : r == "string" && e in i) ? _r(i[e], t) : !1; +} +function a0(t) { + return o0(function(e, i) { + var r = -1, n = i.length, o = n > 1 ? i[n - 1] : void 0, s = n > 2 ? i[2] : void 0; + for (o = t.length > 3 && typeof o == "function" ? (n--, o) : void 0, s && s0(i[0], i[1], s) && (o = n < 3 ? void 0 : o, n = 1), e = Object(e); ++r < n; ) { + var a = i[r]; + a && t(e, a, r, o); + } + return e; + }); +} +var l0 = a0(function(t, e, i) { + Ua(t, e, i); +}); +const h0 = l0, c0 = "​", u0 = { + curveBasis: Nf, + curveBasisClosed: Rf, + curveBasisOpen: Pf, + curveBumpX: If, + curveBumpY: Df, + curveBundle: qf, + curveCardinalClosed: Wf, + curveCardinalOpen: Hf, + curveCardinal: zf, + curveCatmullRomClosed: Uf, + curveCatmullRomOpen: Yf, + curveCatmullRom: jf, + curveLinear: $f, + curveLinearClosed: Gf, + curveMonotoneX: Vf, + curveMonotoneY: Xf, + curveNatural: Kf, + curveStep: Zf, + curveStepAfter: Qf, + curveStepBefore: Jf +}, f0 = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, d0 = function(t, e) { + const i = Ga(t, /(?:init\b)|(?:initialize\b)/); + let r = {}; + if (Array.isArray(i)) { + const s = i.map((a) => a.args); + Vi(s), r = nt(r, [...s]); + } else + r = i.args; + if (!r) + return; + let n = mr(t, e); + const o = "config"; + return r[o] !== void 0 && (n === "flowchart-v2" && (n = "flowchart"), r[n] = r[o], delete r[o]), r; +}, Ga = function(t, e = null) { + try { + const i = new RegExp( + `[%]{2}(?![{]${f0.source})(?=[}][%]{2}).* +`, + "ig" + ); + t = t.trim().replace(i, "").replace(/'/gm, '"'), L.debug( + `Detecting diagram directive${e !== null ? " type:" + e : ""} based on the text:${t}` + ); + let r; + const n = []; + for (; (r = Ge.exec(t)) !== null; ) + if (r.index === Ge.lastIndex && Ge.lastIndex++, r && !e || e && r[1] && r[1].match(e) || e && r[2] && r[2].match(e)) { + const o = r[1] ? r[1] : r[2], s = r[3] ? r[3].trim() : r[4] ? JSON.parse(r[4].trim()) : null; + n.push({ type: o, args: s }); + } + return n.length === 0 ? { type: t, args: null } : n.length === 1 ? n[0] : n; + } catch (i) { + return L.error( + `ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'` + ), { type: void 0, args: null }; + } +}, p0 = function(t) { + return t.replace(Ge, ""); +}, g0 = function(t, e) { + for (const [i, r] of e.entries()) + if (r.match(t)) + return i; + return -1; +}; +function m0(t, e) { + if (!t) + return e; + const i = `curve${t.charAt(0).toUpperCase() + t.slice(1)}`; + return u0[i] ?? e; +} +function _0(t, e) { + const i = t.trim(); + if (i) + return e.securityLevel !== "loose" ? Es(i) : i; +} +const y0 = (t, ...e) => { + const i = t.split("."), r = i.length - 1, n = i[r]; + let o = window; + for (let s = 0; s < r; s++) + if (o = o[i[s]], !o) { + L.error(`Function name: ${t} not found in window`); + return; + } + o[n](...e); +}; +function Va(t, e) { + return !t || !e ? 0 : Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2)); +} +function C0(t) { + let e, i = 0; + t.forEach((n) => { + i += Va(n, e), e = n; + }); + const r = i / 2; + return qn(t, r); +} +function x0(t) { + return t.length === 1 ? t[0] : C0(t); +} +const ls = (t, e = 2) => { + const i = Math.pow(10, e); + return Math.round(t * i) / i; +}, qn = (t, e) => { + let i, r = e; + for (const n of t) { + if (i) { + const o = Va(n, i); + if (o < r) + r -= o; + else { + const s = r / o; + if (s <= 0) + return i; + if (s >= 1) + return { x: n.x, y: n.y }; + if (s > 0 && s < 1) + return { + x: ls((1 - s) * i.x + s * n.x, 5), + y: ls((1 - s) * i.y + s * n.y, 5) + }; + } + } + i = n; + } + throw new Error("Could not find a suitable point for the given distance"); +}, b0 = (t, e, i) => { + L.info(`our points ${JSON.stringify(e)}`), e[0] !== i && (e = e.reverse()); + const n = qn(e, 25), o = t ? 10 : 5, s = Math.atan2(e[0].y - n.y, e[0].x - n.x), a = { x: 0, y: 0 }; + return a.x = Math.sin(s) * o + (e[0].x + n.x) / 2, a.y = -Math.cos(s) * o + (e[0].y + n.y) / 2, a; +}; +function T0(t, e, i) { + const r = structuredClone(i); + L.info("our points", r), e !== "start_left" && e !== "start_right" && r.reverse(); + const n = 25 + t, o = qn(r, n), s = 10 + t * 0.5, a = Math.atan2(r[0].y - o.y, r[0].x - o.x), l = { x: 0, y: 0 }; + return e === "start_left" ? (l.x = Math.sin(a + Math.PI) * s + (r[0].x + o.x) / 2, l.y = -Math.cos(a + Math.PI) * s + (r[0].y + o.y) / 2) : e === "end_right" ? (l.x = Math.sin(a - Math.PI) * s + (r[0].x + o.x) / 2 - 5, l.y = -Math.cos(a - Math.PI) * s + (r[0].y + o.y) / 2 - 5) : e === "end_left" ? (l.x = Math.sin(a) * s + (r[0].x + o.x) / 2 - 5, l.y = -Math.cos(a) * s + (r[0].y + o.y) / 2 - 5) : (l.x = Math.sin(a) * s + (r[0].x + o.x) / 2, l.y = -Math.cos(a) * s + (r[0].y + o.y) / 2), l; +} +function S0(t) { + let e = "", i = ""; + for (const r of t) + r !== void 0 && (r.startsWith("color:") || r.startsWith("text-align:") ? i = i + r + ";" : e = e + r + ";"); + return { style: e, labelStyle: i }; +} +let hs = 0; +const v0 = () => (hs++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + hs); +function k0(t) { + let e = ""; + const i = "0123456789abcdef", r = i.length; + for (let n = 0; n < t; n++) + e += i.charAt(Math.floor(Math.random() * r)); + return e; +} +const w0 = (t) => k0(t.length), B0 = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: "start", + style: "#666", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0, + valign: void 0, + text: "" + }; +}, F0 = function(t, e) { + const i = e.text.replace(In.lineBreakRegex, " "), [, r] = Wn(e.fontSize), n = t.append("text"); + n.attr("x", e.x), n.attr("y", e.y), n.style("text-anchor", e.anchor), n.style("font-family", e.fontFamily), n.style("font-size", r), n.style("font-weight", e.fontWeight), n.attr("fill", e.fill), e.class !== void 0 && n.attr("class", e.class); + const o = n.append("tspan"); + return o.attr("x", e.x + e.textMargin * 2), o.attr("fill", e.fill), o.text(i), n; +}, L0 = ui( + (t, e, i) => { + if (!t || (i = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" }, + i + ), In.lineBreakRegex.test(t))) + return t; + const r = t.split(" "), n = []; + let o = ""; + return r.forEach((s, a) => { + const l = Qi(`${s} `, i), h = Qi(o, i); + if (l > e) { + const { hyphenatedStrings: g, remainingWord: p } = A0(s, e, "-", i); + n.push(o, ...g), o = p; + } else + h + l >= e ? (n.push(o), o = s) : o = [o, s].filter(Boolean).join(" "); + a + 1 === r.length && n.push(o); + }), n.filter((s) => s !== "").join(i.joinWith); + }, + (t, e, i) => `${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}` +), A0 = ui( + (t, e, i = "-", r) => { + r = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, + r + ); + const n = [...t], o = []; + let s = ""; + return n.forEach((a, l) => { + const h = `${s}${a}`; + if (Qi(h, r) >= e) { + const f = l + 1, g = n.length === f, p = `${h}${i}`; + o.push(g ? h : p), s = ""; + } else + s = h; + }), { hyphenatedStrings: o, remainingWord: s }; + }, + (t, e, i = "-", r) => `${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}` +); +function E0(t, e) { + return zn(t, e).height; +} +function Qi(t, e) { + return zn(t, e).width; +} +const zn = ui( + (t, e) => { + const { fontSize: i = 12, fontFamily: r = "Arial", fontWeight: n = 400 } = e; + if (!t) + return { width: 0, height: 0 }; + const [, o] = Wn(i), s = ["sans-serif", r], a = t.split(In.lineBreakRegex), l = [], h = Ct("body"); + if (!h.remove) + return { width: 0, height: 0, lineHeight: 0 }; + const c = h.append("svg"); + for (const g of s) { + let p = 0; + const _ = { width: 0, height: 0, lineHeight: 0 }; + for (const k of a) { + const M = B0(); + M.text = k || c0; + const q = F0(c, M).style("font-size", o).style("font-weight", n).style("font-family", g), v = (q._groups || q)[0][0].getBBox(); + if (v.width === 0 && v.height === 0) + throw new Error("svg element not in render tree"); + _.width = Math.round(Math.max(_.width, v.width)), p = Math.round(v.height), _.height += p, _.lineHeight = Math.round(Math.max(_.lineHeight, p)); + } + l.push(_); + } + c.remove(); + const f = isNaN(l[1].height) || isNaN(l[1].width) || isNaN(l[1].lineHeight) || l[0].height > l[1].height && l[0].width > l[1].width && l[0].lineHeight > l[1].lineHeight ? 0 : 1; + return l[f]; + }, + (t, e) => `${t}${e.fontSize}${e.fontWeight}${e.fontFamily}` +); +class M0 { + constructor(e = !1, i) { + this.count = 0, this.count = i ? i.length : 0, this.next = e ? () => this.count++ : () => Date.now(); + } +} +let wi; +const O0 = function(t) { + return wi = wi || document.createElement("div"), t = escape(t).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), wi.innerHTML = t, unescape(wi.textContent); +}; +function Xa(t) { + return "str" in t; +} +const $0 = (t, e, i, r) => { + var o; + if (!r) + return; + const n = (o = t.node()) == null ? void 0 : o.getBBox(); + n && t.append("text").text(r).attr("x", n.x + n.width / 2).attr("y", -i).attr("class", e); +}, Wn = (t) => { + if (typeof t == "number") + return [t, t + "px"]; + const e = parseInt(t ?? "", 10); + return Number.isNaN(e) ? [void 0, void 0] : t === String(e) ? [e, t + "px"] : [e, t]; +}; +function Ka(t, e) { + return h0({}, t, e); +} +const Xe = { + assignWithDepth: nt, + wrapLabel: L0, + calculateTextHeight: E0, + calculateTextWidth: Qi, + calculateTextDimensions: zn, + cleanAndMerge: Ka, + detectInit: d0, + detectDirective: Ga, + isSubstringInArray: g0, + interpolateToCurve: m0, + calcLabelPosition: x0, + calcCardinalityPosition: b0, + calcTerminalLabelPosition: T0, + formatUrl: _0, + getStylesFromArray: S0, + generateId: v0, + random: w0, + runFunc: y0, + entityDecode: O0, + insertTitle: $0, + parseFontSize: Wn, + InitIDGenerator: M0 +}; +var Za = "comm", Ja = "rule", Qa = "decl", I0 = "@import", D0 = "@keyframes", N0 = Math.abs, Hn = String.fromCharCode; +function tl(t) { + return t.trim(); +} +function un(t, e, i) { + return t.replace(e, i); +} +function R0(t, e) { + return t.indexOf(e); +} +function ni(t, e) { + return t.charCodeAt(e) | 0; +} +function oi(t, e, i) { + return t.slice(e, i); +} +function te(t) { + return t.length; +} +function el(t) { + return t.length; +} +function Bi(t, e) { + return e.push(t), t; +} +var Tr = 1, Ee = 1, il = 0, Tt = 0, Z = 0, De = ""; +function jn(t, e, i, r, n, o, s) { + return { value: t, root: e, parent: i, type: r, props: n, children: o, line: Tr, column: Ee, length: s, return: "" }; +} +function P0() { + return Z; +} +function q0() { + return Z = Tt > 0 ? ni(De, --Tt) : 0, Ee--, Z === 10 && (Ee = 1, Tr--), Z; +} +function wt() { + return Z = Tt < il ? ni(De, Tt++) : 0, Ee++, Z === 10 && (Ee = 1, Tr++), Z; +} +function ce() { + return ni(De, Tt); +} +function Ii() { + return Tt; +} +function Sr(t, e) { + return oi(De, t, e); +} +function fn(t) { + switch (t) { + case 0: + case 9: + case 10: + case 13: + case 32: + return 5; + case 33: + case 43: + case 44: + case 47: + case 62: + case 64: + case 126: + case 59: + case 123: + case 125: + return 4; + case 58: + return 3; + case 34: + case 39: + case 40: + case 91: + return 2; + case 41: + case 93: + return 1; + } + return 0; +} +function z0(t) { + return Tr = Ee = 1, il = te(De = t), Tt = 0, []; +} +function W0(t) { + return De = "", t; +} +function Ur(t) { + return tl(Sr(Tt - 1, dn(t === 91 ? t + 2 : t === 40 ? t + 1 : t))); +} +function H0(t) { + for (; (Z = ce()) && Z < 33; ) + wt(); + return fn(t) > 2 || fn(Z) > 3 ? "" : " "; +} +function j0(t, e) { + for (; --e && wt() && !(Z < 48 || Z > 102 || Z > 57 && Z < 65 || Z > 70 && Z < 97); ) + ; + return Sr(t, Ii() + (e < 6 && ce() == 32 && wt() == 32)); +} +function dn(t) { + for (; wt(); ) + switch (Z) { + case t: + return Tt; + case 34: + case 39: + t !== 34 && t !== 39 && dn(Z); + break; + case 40: + t === 41 && dn(t); + break; + case 92: + wt(); + break; + } + return Tt; +} +function U0(t, e) { + for (; wt() && t + Z !== 47 + 10; ) + if (t + Z === 42 + 42 && ce() === 47) + break; + return "/*" + Sr(e, Tt - 1) + "*" + Hn(t === 47 ? t : wt()); +} +function Y0(t) { + for (; !fn(ce()); ) + wt(); + return Sr(t, Tt); +} +function G0(t) { + return W0(Di("", null, null, null, [""], t = z0(t), 0, [0], t)); +} +function Di(t, e, i, r, n, o, s, a, l) { + for (var h = 0, c = 0, f = s, g = 0, p = 0, _ = 0, k = 1, M = 1, q = 1, v = 0, z = "", Q = n, X = o, G = r, W = z; M; ) + switch (_ = v, v = wt()) { + case 40: + if (_ != 108 && ni(W, f - 1) == 58) { + R0(W += un(Ur(v), "&", "&\f"), "&\f") != -1 && (q = -1); + break; + } + case 34: + case 39: + case 91: + W += Ur(v); + break; + case 9: + case 10: + case 13: + case 32: + W += H0(_); + break; + case 92: + W += j0(Ii() - 1, 7); + continue; + case 47: + switch (ce()) { + case 42: + case 47: + Bi(V0(U0(wt(), Ii()), e, i), l); + break; + default: + W += "/"; + } + break; + case 123 * k: + a[h++] = te(W) * q; + case 125 * k: + case 59: + case 0: + switch (v) { + case 0: + case 125: + M = 0; + case 59 + c: + p > 0 && te(W) - f && Bi(p > 32 ? us(W + ";", r, i, f - 1) : us(un(W, " ", "") + ";", r, i, f - 2), l); + break; + case 59: + W += ";"; + default: + if (Bi(G = cs(W, e, i, h, c, n, a, z, Q = [], X = [], f), o), v === 123) + if (c === 0) + Di(W, e, G, G, Q, o, f, a, X); + else + switch (g === 99 && ni(W, 3) === 110 ? 100 : g) { + case 100: + case 109: + case 115: + Di(t, G, G, r && Bi(cs(t, G, G, 0, 0, n, a, z, n, Q = [], f), X), n, X, f, a, r ? Q : X); + break; + default: + Di(W, G, G, G, [""], X, 0, a, X); + } + } + h = c = p = 0, k = q = 1, z = W = "", f = s; + break; + case 58: + f = 1 + te(W), p = _; + default: + if (k < 1) { + if (v == 123) + --k; + else if (v == 125 && k++ == 0 && q0() == 125) + continue; + } + switch (W += Hn(v), v * k) { + case 38: + q = c > 0 ? 1 : (W += "\f", -1); + break; + case 44: + a[h++] = (te(W) - 1) * q, q = 1; + break; + case 64: + ce() === 45 && (W += Ur(wt())), g = ce(), c = f = te(z = W += Y0(Ii())), v++; + break; + case 45: + _ === 45 && te(W) == 2 && (k = 0); + } + } + return o; +} +function cs(t, e, i, r, n, o, s, a, l, h, c) { + for (var f = n - 1, g = n === 0 ? o : [""], p = el(g), _ = 0, k = 0, M = 0; _ < r; ++_) + for (var q = 0, v = oi(t, f + 1, f = N0(k = s[_])), z = t; q < p; ++q) + (z = tl(k > 0 ? g[q] + " " + v : un(v, /&\f/g, g[q]))) && (l[M++] = z); + return jn(t, e, i, n === 0 ? Ja : a, l, h, c); +} +function V0(t, e, i) { + return jn(t, e, i, Za, Hn(P0()), oi(t, 2, -2), 0); +} +function us(t, e, i, r) { + return jn(t, e, i, Qa, oi(t, 0, r), oi(t, r + 1, -1), r); +} +function pn(t, e) { + for (var i = "", r = el(t), n = 0; n < r; n++) + i += e(t[n], n, t, e) || ""; + return i; +} +function X0(t, e, i, r) { + switch (t.type) { + case I0: + case Qa: + return t.return = t.return || t.value; + case Za: + return ""; + case D0: + return t.return = t.value + "{" + pn(t.children, r) + "}"; + case Ja: + t.value = t.props.join(","); + } + return te(i = pn(t.children, r)) ? t.return = t.value + "{" + i + "}" : ""; +} +const fs = "10.5.0", si = Object.freeze(dp); +let ut = nt({}, si), rl, Me = [], Ke = nt({}, si); +const vr = (t, e) => { + let i = nt({}, t), r = {}; + for (const n of e) + ol(n), r = nt(r, n); + if (i = nt(i, r), r.theme && r.theme in Ut) { + const n = nt({}, rl), o = nt( + n.themeVariables || {}, + r.themeVariables + ); + i.theme && i.theme in Ut && (i.themeVariables = Ut[i.theme].getThemeVariables(o)); + } + return Ke = i, sl(Ke), Ke; +}, K0 = (t) => (ut = nt({}, si), ut = nt(ut, t), t.theme && Ut[t.theme] && (ut.themeVariables = Ut[t.theme].getThemeVariables(t.themeVariables)), vr(ut, Me), ut), Z0 = (t) => { + rl = nt({}, t); +}, J0 = (t) => (ut = nt(ut, t), vr(ut, Me), ut), nl = () => nt({}, ut), Q0 = (t) => (sl(t), nt(Ke, t), Ft()), Ft = () => nt({}, Ke), ol = (t) => { + t && (["secure", ...ut.secure ?? []].forEach((e) => { + Object.hasOwn(t, e) && (L.debug(`Denied attempt to modify a secure key ${e}`, t[e]), delete t[e]); + }), Object.keys(t).forEach((e) => { + e.startsWith("__") && delete t[e]; + }), Object.keys(t).forEach((e) => { + typeof t[e] == "string" && (t[e].includes("<") || t[e].includes(">") || t[e].includes("url(data:")) && delete t[e], typeof t[e] == "object" && ol(t[e]); + })); +}, t_ = (t) => { + Vi(t), t.fontFamily && (!t.themeVariables || !t.themeVariables.fontFamily) && (t.themeVariables = { fontFamily: t.fontFamily }), Me.push(t), vr(ut, Me); +}, tr = (t = ut) => { + Me = [], vr(t, Me); +}, e_ = { + LAZY_LOAD_DEPRECATED: "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead." +}, ds = {}, i_ = (t) => { + ds[t] || (L.warn(e_[t]), ds[t] = !0); +}, sl = (t) => { + t && (t.lazyLoadedDiagrams || t.loadExternalDiagramsAtStartup) && i_("LAZY_LOAD_DEPRECATED"); +}, al = "c4", r_ = (t) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t), n_ = async () => { + const { diagram: t } = await import("./c4Diagram-be6d31b5.js"); + return { id: al, diagram: t }; +}, o_ = { + id: al, + detector: r_, + loader: n_ +}, s_ = o_, ll = "flowchart", a_ = (t, e) => { + var i, r; + return ((i = e == null ? void 0 : e.flowchart) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" || ((r = e == null ? void 0 : e.flowchart) == null ? void 0 : r.defaultRenderer) === "elk" ? !1 : /^\s*graph/.test(t); +}, l_ = async () => { + const { diagram: t } = await import("./flowDiagram-2527b41f.js"); + return { id: ll, diagram: t }; +}, h_ = { + id: ll, + detector: a_, + loader: l_ +}, c_ = h_, hl = "flowchart-v2", u_ = (t, e) => { + var i, r, n; + return ((i = e == null ? void 0 : e.flowchart) == null ? void 0 : i.defaultRenderer) === "dagre-d3" || ((r = e == null ? void 0 : e.flowchart) == null ? void 0 : r.defaultRenderer) === "elk" ? !1 : /^\s*graph/.test(t) && ((n = e == null ? void 0 : e.flowchart) == null ? void 0 : n.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(t); +}, f_ = async () => { + const { diagram: t } = await import("./flowDiagram-v2-596664fa.js"); + return { id: hl, diagram: t }; +}, d_ = { + id: hl, + detector: u_, + loader: f_ +}, p_ = d_, cl = "er", g_ = (t) => /^\s*erDiagram/.test(t), m_ = async () => { + const { diagram: t } = await import("./erDiagram-5298a456.js"); + return { id: cl, diagram: t }; +}, __ = { + id: cl, + detector: g_, + loader: m_ +}, y_ = __, ul = "gitGraph", C_ = (t) => /^\s*gitGraph/.test(t), x_ = async () => { + const { diagram: t } = await import("./gitGraphDiagram-0775767f.js"); + return { id: ul, diagram: t }; +}, b_ = { + id: ul, + detector: C_, + loader: x_ +}, T_ = b_, fl = "gantt", S_ = (t) => /^\s*gantt/.test(t), v_ = async () => { + const { diagram: t } = await import("./ganttDiagram-9d08f276.js"); + return { id: fl, diagram: t }; +}, k_ = { + id: fl, + detector: S_, + loader: v_ +}, w_ = k_, dl = "info", B_ = (t) => /^\s*info/.test(t), F_ = async () => { + const { diagram: t } = await import("./infoDiagram-121d662e.js"); + return { id: dl, diagram: t }; +}, L_ = { + id: dl, + detector: B_, + loader: F_ +}, pl = "pie", A_ = (t) => /^\s*pie/.test(t), E_ = async () => { + const { diagram: t } = await import("./pieDiagram-eb4af4ec.js"); + return { id: pl, diagram: t }; +}, M_ = { + id: pl, + detector: A_, + loader: E_ +}, gl = "quadrantChart", O_ = (t) => /^\s*quadrantChart/.test(t), $_ = async () => { + const { diagram: t } = await import("./quadrantDiagram-d3fede19.js"); + return { id: gl, diagram: t }; +}, I_ = { + id: gl, + detector: O_, + loader: $_ +}, D_ = I_, ml = "requirement", N_ = (t) => /^\s*requirement(Diagram)?/.test(t), R_ = async () => { + const { diagram: t } = await import("./requirementDiagram-3865c41f.js"); + return { id: ml, diagram: t }; +}, P_ = { + id: ml, + detector: N_, + loader: R_ +}, q_ = P_, _l = "sequence", z_ = (t) => /^\s*sequenceDiagram/.test(t), W_ = async () => { + const { diagram: t } = await import("./sequenceDiagram-a000a341.js"); + return { id: _l, diagram: t }; +}, H_ = { + id: _l, + detector: z_, + loader: W_ +}, j_ = H_, yl = "class", U_ = (t, e) => { + var i; + return ((i = e == null ? void 0 : e.class) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*classDiagram/.test(t); +}, Y_ = async () => { + const { diagram: t } = await import("./classDiagram-ad76bf5a.js"); + return { id: yl, diagram: t }; +}, G_ = { + id: yl, + detector: U_, + loader: Y_ +}, V_ = G_, Cl = "classDiagram", X_ = (t, e) => { + var i; + return /^\s*classDiagram/.test(t) && ((i = e == null ? void 0 : e.class) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(t); +}, K_ = async () => { + const { diagram: t } = await import("./classDiagram-v2-6e58f5b0.js"); + return { id: Cl, diagram: t }; +}, Z_ = { + id: Cl, + detector: X_, + loader: K_ +}, J_ = Z_, xl = "state", Q_ = (t, e) => { + var i; + return ((i = e == null ? void 0 : e.state) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*stateDiagram/.test(t); +}, ty = async () => { + const { diagram: t } = await import("./stateDiagram-c0051853.js"); + return { id: xl, diagram: t }; +}, ey = { + id: xl, + detector: Q_, + loader: ty +}, iy = ey, bl = "stateDiagram", ry = (t, e) => { + var i; + return !!(/^\s*stateDiagram-v2/.test(t) || /^\s*stateDiagram/.test(t) && ((i = e == null ? void 0 : e.state) == null ? void 0 : i.defaultRenderer) === "dagre-wrapper"); +}, ny = async () => { + const { diagram: t } = await import("./stateDiagram-v2-056072cc.js"); + return { id: bl, diagram: t }; +}, oy = { + id: bl, + detector: ry, + loader: ny +}, sy = oy, Tl = "journey", ay = (t) => /^\s*journey/.test(t), ly = async () => { + const { diagram: t } = await import("./journeyDiagram-943d6037.js"); + return { id: Tl, diagram: t }; +}, hy = { + id: Tl, + detector: ay, + loader: ly +}, cy = hy, uy = (t) => { + var n; + const { securityLevel: e } = Ft(); + let i = Ct("body"); + if (e === "sandbox") { + const s = ((n = Ct(`#i${t}`).node()) == null ? void 0 : n.contentDocument) ?? document; + i = Ct(s.body); + } + return i.select(`#${t}`); +}, fy = function(t, e) { + for (let i of e) + t.attr(i[0], i[1]); +}, dy = function(t, e, i) { + let r = /* @__PURE__ */ new Map(); + return i ? (r.set("width", "100%"), r.set("style", `max-width: ${e}px;`)) : (r.set("height", t), r.set("width", e)), r; +}, Sl = function(t, e, i, r) { + const n = dy(e, i, r); + fy(t, n); +}, py = function(t, e, i, r) { + const n = e.node().getBBox(), o = n.width, s = n.height; + L.info(`SVG bounds: ${o}x${s}`, n); + let a = 0, l = 0; + L.info(`Graph bounds: ${a}x${l}`, t), a = o + i * 2, l = s + i * 2, L.info(`Calculated bounds: ${a}x${l}`), Sl(e, l, a, r); + const h = `${n.x - i} ${n.y - i} ${n.width + 2 * i} ${n.height + 2 * i}`; + e.attr("viewBox", h); +}, gy = (t, e, i) => { + L.debug(`renering svg for syntax error +`); + const r = uy(e); + r.attr("viewBox", "0 0 2412 512"), Sl(r, 100, 512, !0); + const n = r.append("g"); + n.append("path").attr("class", "error-icon").attr( + "d", + "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z" + ), n.append("path").attr("class", "error-icon").attr( + "d", + "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z" + ), n.append("path").attr("class", "error-icon").attr( + "d", + "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z" + ), n.append("path").attr("class", "error-icon").attr( + "d", + "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z" + ), n.append("path").attr("class", "error-icon").attr( + "d", + "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z" + ), n.append("path").attr("class", "error-icon").attr( + "d", + "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z" + ), n.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"), n.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${i}`); +}, vl = { draw: gy }, my = vl, _y = { + db: {}, + renderer: vl, + parser: { + parser: { yy: {} }, + parse: () => { + } + } +}, yy = _y, kl = "flowchart-elk", Cy = (t, e) => { + var i; + return ( + // If diagram explicitly states flowchart-elk + !!(/^\s*flowchart-elk/.test(t) || // If a flowchart/graph diagram has their default renderer set to elk + /^\s*flowchart|graph/.test(t) && ((i = e == null ? void 0 : e.flowchart) == null ? void 0 : i.defaultRenderer) === "elk") + ); +}, xy = async () => { + const { diagram: t } = await import("./flowchart-elk-definition-8cd0f1e2.js"); + return { id: kl, diagram: t }; +}, by = { + id: kl, + detector: Cy, + loader: xy +}, Ty = by, wl = "timeline", Sy = (t) => /^\s*timeline/.test(t), vy = async () => { + const { diagram: t } = await import("./timeline-definition-5dc05eb7.js"); + return { id: wl, diagram: t }; +}, ky = { + id: wl, + detector: Sy, + loader: vy +}, wy = ky, Bl = "mindmap", By = (t) => /^\s*mindmap/.test(t), Fy = async () => { + const { diagram: t } = await import("./mindmap-definition-5c6cc2b2.js"); + return { id: Bl, diagram: t }; +}, Ly = { + id: Bl, + detector: By, + loader: Fy +}, Ay = Ly, Fl = "sankey", Ey = (t) => /^\s*sankey-beta/.test(t), My = async () => { + const { diagram: t } = await import("./sankeyDiagram-f71fea45.js"); + return { id: Fl, diagram: t }; +}, Oy = { + id: Fl, + detector: Ey, + loader: My +}, $y = Oy, Ni = {}, Iy = (t, e, i) => { + let r = ""; + return t in Ni && Ni[t] ? r = Ni[t](i) : L.warn(`No theme found for ${t}`), ` & { + font-family: ${i.fontFamily}; + font-size: ${i.fontSize}; + fill: ${i.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${i.errorBkgColor}; + } + & .error-text { + fill: ${i.errorTextColor}; + stroke: ${i.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 2px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${i.lineColor}; + stroke: ${i.lineColor}; + } + & .marker.cross { + stroke: ${i.lineColor}; + } + + & svg { + font-family: ${i.fontFamily}; + font-size: ${i.fontSize}; + } + + ${r} + + ${e} +`; +}, Dy = (t, e) => { + e !== void 0 && (Ni[t] = e); +}, Ny = Iy; +let Un = "", Yn = "", Gn = ""; +const Vn = (t) => ei(t, Ft()), Ry = () => { + Un = "", Gn = "", Yn = ""; +}, Py = (t) => { + Un = Vn(t).replace(/^\s+/g, ""); +}, qy = () => Un, zy = (t) => { + Gn = Vn(t).replace(/\n\s+/g, ` +`); +}, Wy = () => Gn, Hy = (t) => { + Yn = Vn(t); +}, jy = () => Yn, Uy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + clear: Ry, + getAccDescription: Wy, + getAccTitle: qy, + getDiagramTitle: jy, + setAccDescription: zy, + setAccTitle: Py, + setDiagramTitle: Hy +}, Symbol.toStringTag, { value: "Module" })), Yy = L, Gy = bn, Ll = Ft, Vy = (t) => ei(t, Ll()), Xy = py, Ky = () => Uy, er = {}, ir = (t, e, i) => { + var r; + if (er[t]) + throw new Error(`Diagram ${t} already registered.`); + er[t] = e, i && Ma(t, i), Dy(t, e.styles), (r = e.injectUtils) == null || r.call( + e, + Yy, + Gy, + Ll, + Vy, + Xy, + Ky(), + () => { + } + ); +}, Xn = (t) => { + if (t in er) + return er[t]; + throw new Zy(t); +}; +class Zy extends Error { + constructor(e) { + super(`Diagram ${e} not found.`); + } +} +let ps = !1; +const Kn = () => { + ps || (ps = !0, ir("error", yy, (t) => t.toLowerCase().trim() === "error"), ir( + "---", + // --- diagram type may appear if YAML front-matter is not parsed correctly + { + db: { + clear: () => { + } + }, + styles: {}, + // should never be used + renderer: { + draw: () => { + } + }, + parser: { + parser: { yy: {} }, + parse: () => { + throw new Error( + "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks" + ); + } + }, + init: () => null + // no op + }, + (t) => t.toLowerCase().trimStart().startsWith("---") + ), Ea( + s_, + J_, + V_, + y_, + w_, + L_, + M_, + q_, + j_, + Ty, + p_, + c_, + Ay, + wy, + T_, + sy, + iy, + cy, + D_, + $y + )); +}; +class Al { + constructor(e, i = {}) { + this.text = e, this.metadata = i, this.type = "graph", this.text += ` +`; + const r = Ft(); + try { + this.type = mr(e, r); + } catch (o) { + this.type = "error", this.detectError = o; + } + const n = Xn(this.type); + L.debug("Type " + this.type), this.db = n.db, this.renderer = n.renderer, this.parser = n.parser, this.parser.parser.yy = this.db, this.init = n.init, this.parse(); + } + parse() { + var i, r, n, o, s; + if (this.detectError) + throw this.detectError; + (r = (i = this.db).clear) == null || r.call(i); + const e = Ft(); + (n = this.init) == null || n.call(this, e), this.metadata.title && ((s = (o = this.db).setDiagramTitle) == null || s.call(o, this.metadata.title)), this.parser.parse(this.text); + } + async render(e, i) { + await this.renderer.draw(this.text, e, i, this); + } + getParser() { + return this.parser; + } + getType() { + return this.type; + } +} +const Zn = async (t, e = {}) => { + const i = mr(t, Ft()); + try { + Xn(i); + } catch { + const n = mp(i); + if (!n) + throw new Aa(`Diagram ${i} not found.`); + const { id: o, diagram: s } = await n(); + ir(o, s); + } + return new Al(t, e); +}; +let gn = []; +const d1 = (t) => { + gn.push(t); +}, Jy = () => { + gn.forEach((t) => { + t(); + }), gn = []; +}; +var Qy = Da(Object.keys, Object); +const tC = Qy; +var eC = Object.prototype, iC = eC.hasOwnProperty; +function rC(t) { + if (!xr(t)) + return tC(t); + var e = []; + for (var i in Object(t)) + iC.call(t, i) && i != "constructor" && e.push(i); + return e; +} +var nC = _e(Dt, "DataView"); +const mn = nC; +var oC = _e(Dt, "Promise"); +const _n = oC; +var sC = _e(Dt, "Set"); +const yn = sC; +var aC = _e(Dt, "WeakMap"); +const Cn = aC; +var gs = "[object Map]", lC = "[object Object]", ms = "[object Promise]", _s = "[object Set]", ys = "[object WeakMap]", Cs = "[object DataView]", hC = me(mn), cC = me(ri), uC = me(_n), fC = me(yn), dC = me(Cn), ae = $e; +(mn && ae(new mn(new ArrayBuffer(1))) != Cs || ri && ae(new ri()) != gs || _n && ae(_n.resolve()) != ms || yn && ae(new yn()) != _s || Cn && ae(new Cn()) != ys) && (ae = function(t) { + var e = $e(t), i = e == lC ? t.constructor : void 0, r = i ? me(i) : ""; + if (r) + switch (r) { + case hC: + return Cs; + case cC: + return gs; + case uC: + return ms; + case fC: + return _s; + case dC: + return ys; + } + return e; +}); +const pC = ae; +var gC = "[object Map]", mC = "[object Set]", _C = Object.prototype, yC = _C.hasOwnProperty; +function Yr(t) { + if (t == null) + return !0; + if (br(t) && (Ji(t) || typeof t == "string" || typeof t.splice == "function" || Rn(t) || Pn(t) || Zi(t))) + return !t.length; + var e = pC(t); + if (e == gC || e == mC) + return !t.size; + if (xr(t)) + return !rC(t).length; + for (var i in t) + if (yC.call(t, i)) + return !1; + return !0; +} +const CC = "graphics-document document"; +function xC(t, e) { + t.attr("role", CC), e !== "" && t.attr("aria-roledescription", e); +} +function bC(t, e, i, r) { + if (t.insert !== void 0) { + if (i) { + const n = `chart-desc-${r}`; + t.attr("aria-describedby", n), t.insert("desc", ":first-child").attr("id", n).text(i); + } + if (e) { + const n = `chart-title-${r}`; + t.attr("aria-labelledby", n), t.insert("title", ":first-child").attr("id", n).text(e); + } + } +} +const TC = (t) => t.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(); +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +function El(t) { + return typeof t > "u" || t === null; +} +function SC(t) { + return typeof t == "object" && t !== null; +} +function vC(t) { + return Array.isArray(t) ? t : El(t) ? [] : [t]; +} +function kC(t, e) { + var i, r, n, o; + if (e) + for (o = Object.keys(e), i = 0, r = o.length; i < r; i += 1) + n = o[i], t[n] = e[n]; + return t; +} +function wC(t, e) { + var i = "", r; + for (r = 0; r < e; r += 1) + i += t; + return i; +} +function BC(t) { + return t === 0 && Number.NEGATIVE_INFINITY === 1 / t; +} +var FC = El, LC = SC, AC = vC, EC = wC, MC = BC, OC = kC, at = { + isNothing: FC, + isObject: LC, + toArray: AC, + repeat: EC, + isNegativeZero: MC, + extend: OC +}; +function Ml(t, e) { + var i = "", r = t.reason || "(unknown reason)"; + return t.mark ? (t.mark.name && (i += 'in "' + t.mark.name + '" '), i += "(" + (t.mark.line + 1) + ":" + (t.mark.column + 1) + ")", !e && t.mark.snippet && (i += ` + +` + t.mark.snippet), r + " " + i) : r; +} +function ai(t, e) { + Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = Ml(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; +} +ai.prototype = Object.create(Error.prototype); +ai.prototype.constructor = ai; +ai.prototype.toString = function(e) { + return this.name + ": " + Ml(this, e); +}; +var jt = ai; +function Gr(t, e, i, r, n) { + var o = "", s = "", a = Math.floor(n / 2) - 1; + return r - e > a && (o = " ... ", e = r - a + o.length), i - r > a && (s = " ...", i = r + a - s.length), { + str: o + t.slice(e, i).replace(/\t/g, "→") + s, + pos: r - e + o.length + // relative position + }; +} +function Vr(t, e) { + return at.repeat(" ", e - t.length) + t; +} +function $C(t, e) { + if (e = Object.create(e || null), !t.buffer) + return null; + e.maxLength || (e.maxLength = 79), typeof e.indent != "number" && (e.indent = 1), typeof e.linesBefore != "number" && (e.linesBefore = 3), typeof e.linesAfter != "number" && (e.linesAfter = 2); + for (var i = /\r?\n|\r|\0/g, r = [0], n = [], o, s = -1; o = i.exec(t.buffer); ) + n.push(o.index), r.push(o.index + o[0].length), t.position <= o.index && s < 0 && (s = r.length - 2); + s < 0 && (s = r.length - 1); + var a = "", l, h, c = Math.min(t.line + e.linesAfter, n.length).toString().length, f = e.maxLength - (e.indent + c + 3); + for (l = 1; l <= e.linesBefore && !(s - l < 0); l++) + h = Gr( + t.buffer, + r[s - l], + n[s - l], + t.position - (r[s] - r[s - l]), + f + ), a = at.repeat(" ", e.indent) + Vr((t.line - l + 1).toString(), c) + " | " + h.str + ` +` + a; + for (h = Gr(t.buffer, r[s], n[s], t.position, f), a += at.repeat(" ", e.indent) + Vr((t.line + 1).toString(), c) + " | " + h.str + ` +`, a += at.repeat("-", e.indent + c + 3 + h.pos) + `^ +`, l = 1; l <= e.linesAfter && !(s + l >= n.length); l++) + h = Gr( + t.buffer, + r[s + l], + n[s + l], + t.position - (r[s] - r[s + l]), + f + ), a += at.repeat(" ", e.indent) + Vr((t.line + l + 1).toString(), c) + " | " + h.str + ` +`; + return a.replace(/\n$/, ""); +} +var IC = $C, DC = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" +], NC = [ + "scalar", + "sequence", + "mapping" +]; +function RC(t) { + var e = {}; + return t !== null && Object.keys(t).forEach(function(i) { + t[i].forEach(function(r) { + e[String(r)] = i; + }); + }), e; +} +function PC(t, e) { + if (e = e || {}, Object.keys(e).forEach(function(i) { + if (DC.indexOf(i) === -1) + throw new jt('Unknown option "' + i + '" is met in definition of "' + t + '" YAML type.'); + }), this.options = e, this.tag = t, this.kind = e.kind || null, this.resolve = e.resolve || function() { + return !0; + }, this.construct = e.construct || function(i) { + return i; + }, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = RC(e.styleAliases || null), NC.indexOf(this.kind) === -1) + throw new jt('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.'); +} +var ot = PC; +function xs(t, e) { + var i = []; + return t[e].forEach(function(r) { + var n = i.length; + i.forEach(function(o, s) { + o.tag === r.tag && o.kind === r.kind && o.multi === r.multi && (n = s); + }), i[n] = r; + }), i; +} +function qC() { + var t = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, e, i; + function r(n) { + n.multi ? (t.multi[n.kind].push(n), t.multi.fallback.push(n)) : t[n.kind][n.tag] = t.fallback[n.tag] = n; + } + for (e = 0, i = arguments.length; e < i; e += 1) + arguments[e].forEach(r); + return t; +} +function xn(t) { + return this.extend(t); +} +xn.prototype.extend = function(e) { + var i = [], r = []; + if (e instanceof ot) + r.push(e); + else if (Array.isArray(e)) + r = r.concat(e); + else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit))) + e.implicit && (i = i.concat(e.implicit)), e.explicit && (r = r.concat(e.explicit)); + else + throw new jt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + i.forEach(function(o) { + if (!(o instanceof ot)) + throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object."); + if (o.loadKind && o.loadKind !== "scalar") + throw new jt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + if (o.multi) + throw new jt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + }), r.forEach(function(o) { + if (!(o instanceof ot)) + throw new jt("Specified list of YAML types (or a single Type object) contains a non-Type object."); + }); + var n = Object.create(xn.prototype); + return n.implicit = (this.implicit || []).concat(i), n.explicit = (this.explicit || []).concat(r), n.compiledImplicit = xs(n, "implicit"), n.compiledExplicit = xs(n, "explicit"), n.compiledTypeMap = qC(n.compiledImplicit, n.compiledExplicit), n; +}; +var zC = xn, WC = new ot("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(t) { + return t !== null ? t : ""; + } +}), HC = new ot("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(t) { + return t !== null ? t : []; + } +}), jC = new ot("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(t) { + return t !== null ? t : {}; + } +}), UC = new zC({ + explicit: [ + WC, + HC, + jC + ] +}); +function YC(t) { + if (t === null) + return !0; + var e = t.length; + return e === 1 && t === "~" || e === 4 && (t === "null" || t === "Null" || t === "NULL"); +} +function GC() { + return null; +} +function VC(t) { + return t === null; +} +var XC = new ot("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: YC, + construct: GC, + predicate: VC, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" +}); +function KC(t) { + if (t === null) + return !1; + var e = t.length; + return e === 4 && (t === "true" || t === "True" || t === "TRUE") || e === 5 && (t === "false" || t === "False" || t === "FALSE"); +} +function ZC(t) { + return t === "true" || t === "True" || t === "TRUE"; +} +function JC(t) { + return Object.prototype.toString.call(t) === "[object Boolean]"; +} +var QC = new ot("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: KC, + construct: ZC, + predicate: JC, + represent: { + lowercase: function(t) { + return t ? "true" : "false"; + }, + uppercase: function(t) { + return t ? "TRUE" : "FALSE"; + }, + camelcase: function(t) { + return t ? "True" : "False"; + } + }, + defaultStyle: "lowercase" +}); +function tx(t) { + return 48 <= t && t <= 57 || 65 <= t && t <= 70 || 97 <= t && t <= 102; +} +function ex(t) { + return 48 <= t && t <= 55; +} +function ix(t) { + return 48 <= t && t <= 57; +} +function rx(t) { + if (t === null) + return !1; + var e = t.length, i = 0, r = !1, n; + if (!e) + return !1; + if (n = t[i], (n === "-" || n === "+") && (n = t[++i]), n === "0") { + if (i + 1 === e) + return !0; + if (n = t[++i], n === "b") { + for (i++; i < e; i++) + if (n = t[i], n !== "_") { + if (n !== "0" && n !== "1") + return !1; + r = !0; + } + return r && n !== "_"; + } + if (n === "x") { + for (i++; i < e; i++) + if (n = t[i], n !== "_") { + if (!tx(t.charCodeAt(i))) + return !1; + r = !0; + } + return r && n !== "_"; + } + if (n === "o") { + for (i++; i < e; i++) + if (n = t[i], n !== "_") { + if (!ex(t.charCodeAt(i))) + return !1; + r = !0; + } + return r && n !== "_"; + } + } + if (n === "_") + return !1; + for (; i < e; i++) + if (n = t[i], n !== "_") { + if (!ix(t.charCodeAt(i))) + return !1; + r = !0; + } + return !(!r || n === "_"); +} +function nx(t) { + var e = t, i = 1, r; + if (e.indexOf("_") !== -1 && (e = e.replace(/_/g, "")), r = e[0], (r === "-" || r === "+") && (r === "-" && (i = -1), e = e.slice(1), r = e[0]), e === "0") + return 0; + if (r === "0") { + if (e[1] === "b") + return i * parseInt(e.slice(2), 2); + if (e[1] === "x") + return i * parseInt(e.slice(2), 16); + if (e[1] === "o") + return i * parseInt(e.slice(2), 8); + } + return i * parseInt(e, 10); +} +function ox(t) { + return Object.prototype.toString.call(t) === "[object Number]" && t % 1 === 0 && !at.isNegativeZero(t); +} +var sx = new ot("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: rx, + construct: nx, + predicate: ox, + represent: { + binary: function(t) { + return t >= 0 ? "0b" + t.toString(2) : "-0b" + t.toString(2).slice(1); + }, + octal: function(t) { + return t >= 0 ? "0o" + t.toString(8) : "-0o" + t.toString(8).slice(1); + }, + decimal: function(t) { + return t.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(t) { + return t >= 0 ? "0x" + t.toString(16).toUpperCase() : "-0x" + t.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } +}), ax = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" +); +function lx(t) { + return !(t === null || !ax.test(t) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + t[t.length - 1] === "_"); +} +function hx(t) { + var e, i; + return e = t.replace(/_/g, "").toLowerCase(), i = e[0] === "-" ? -1 : 1, "+-".indexOf(e[0]) >= 0 && (e = e.slice(1)), e === ".inf" ? i === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : e === ".nan" ? NaN : i * parseFloat(e, 10); +} +var cx = /^[-+]?[0-9]+e/; +function ux(t, e) { + var i; + if (isNaN(t)) + switch (e) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + else if (Number.POSITIVE_INFINITY === t) + switch (e) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + else if (Number.NEGATIVE_INFINITY === t) + switch (e) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + else if (at.isNegativeZero(t)) + return "-0.0"; + return i = t.toString(10), cx.test(i) ? i.replace("e", ".e") : i; +} +function fx(t) { + return Object.prototype.toString.call(t) === "[object Number]" && (t % 1 !== 0 || at.isNegativeZero(t)); +} +var dx = new ot("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: lx, + construct: hx, + predicate: fx, + represent: ux, + defaultStyle: "lowercase" +}), Ol = UC.extend({ + implicit: [ + XC, + QC, + sx, + dx + ] +}), px = Ol, $l = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" +), Il = 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]))?))?$" +); +function gx(t) { + return t === null ? !1 : $l.exec(t) !== null || Il.exec(t) !== null; +} +function mx(t) { + var e, i, r, n, o, s, a, l = 0, h = null, c, f, g; + if (e = $l.exec(t), e === null && (e = Il.exec(t)), e === null) + throw new Error("Date resolve error"); + if (i = +e[1], r = +e[2] - 1, n = +e[3], !e[4]) + return new Date(Date.UTC(i, r, n)); + if (o = +e[4], s = +e[5], a = +e[6], e[7]) { + for (l = e[7].slice(0, 3); l.length < 3; ) + l += "0"; + l = +l; + } + return e[9] && (c = +e[10], f = +(e[11] || 0), h = (c * 60 + f) * 6e4, e[9] === "-" && (h = -h)), g = new Date(Date.UTC(i, r, n, o, s, a, l)), h && g.setTime(g.getTime() - h), g; +} +function _x(t) { + return t.toISOString(); +} +var yx = new ot("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: gx, + construct: mx, + instanceOf: Date, + represent: _x +}); +function Cx(t) { + return t === "<<" || t === null; +} +var xx = new ot("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: Cx +}), Jn = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`; +function bx(t) { + if (t === null) + return !1; + var e, i, r = 0, n = t.length, o = Jn; + for (i = 0; i < n; i++) + if (e = o.indexOf(t.charAt(i)), !(e > 64)) { + if (e < 0) + return !1; + r += 6; + } + return r % 8 === 0; +} +function Tx(t) { + var e, i, r = t.replace(/[\r\n=]/g, ""), n = r.length, o = Jn, s = 0, a = []; + for (e = 0; e < n; e++) + e % 4 === 0 && e && (a.push(s >> 16 & 255), a.push(s >> 8 & 255), a.push(s & 255)), s = s << 6 | o.indexOf(r.charAt(e)); + return i = n % 4 * 6, i === 0 ? (a.push(s >> 16 & 255), a.push(s >> 8 & 255), a.push(s & 255)) : i === 18 ? (a.push(s >> 10 & 255), a.push(s >> 2 & 255)) : i === 12 && a.push(s >> 4 & 255), new Uint8Array(a); +} +function Sx(t) { + var e = "", i = 0, r, n, o = t.length, s = Jn; + for (r = 0; r < o; r++) + r % 3 === 0 && r && (e += s[i >> 18 & 63], e += s[i >> 12 & 63], e += s[i >> 6 & 63], e += s[i & 63]), i = (i << 8) + t[r]; + return n = o % 3, n === 0 ? (e += s[i >> 18 & 63], e += s[i >> 12 & 63], e += s[i >> 6 & 63], e += s[i & 63]) : n === 2 ? (e += s[i >> 10 & 63], e += s[i >> 4 & 63], e += s[i << 2 & 63], e += s[64]) : n === 1 && (e += s[i >> 2 & 63], e += s[i << 4 & 63], e += s[64], e += s[64]), e; +} +function vx(t) { + return Object.prototype.toString.call(t) === "[object Uint8Array]"; +} +var kx = new ot("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: bx, + construct: Tx, + predicate: vx, + represent: Sx +}), wx = Object.prototype.hasOwnProperty, Bx = Object.prototype.toString; +function Fx(t) { + if (t === null) + return !0; + var e = [], i, r, n, o, s, a = t; + for (i = 0, r = a.length; i < r; i += 1) { + if (n = a[i], s = !1, Bx.call(n) !== "[object Object]") + return !1; + for (o in n) + if (wx.call(n, o)) + if (!s) + s = !0; + else + return !1; + if (!s) + return !1; + if (e.indexOf(o) === -1) + e.push(o); + else + return !1; + } + return !0; +} +function Lx(t) { + return t !== null ? t : []; +} +var Ax = new ot("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: Fx, + construct: Lx +}), Ex = Object.prototype.toString; +function Mx(t) { + if (t === null) + return !0; + var e, i, r, n, o, s = t; + for (o = new Array(s.length), e = 0, i = s.length; e < i; e += 1) { + if (r = s[e], Ex.call(r) !== "[object Object]" || (n = Object.keys(r), n.length !== 1)) + return !1; + o[e] = [n[0], r[n[0]]]; + } + return !0; +} +function Ox(t) { + if (t === null) + return []; + var e, i, r, n, o, s = t; + for (o = new Array(s.length), e = 0, i = s.length; e < i; e += 1) + r = s[e], n = Object.keys(r), o[e] = [n[0], r[n[0]]]; + return o; +} +var $x = new ot("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: Mx, + construct: Ox +}), Ix = Object.prototype.hasOwnProperty; +function Dx(t) { + if (t === null) + return !0; + var e, i = t; + for (e in i) + if (Ix.call(i, e) && i[e] !== null) + return !1; + return !0; +} +function Nx(t) { + return t !== null ? t : {}; +} +var Rx = new ot("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: Dx, + construct: Nx +}), Px = px.extend({ + implicit: [ + yx, + xx + ], + explicit: [ + kx, + Ax, + $x, + Rx + ] +}), re = Object.prototype.hasOwnProperty, rr = 1, Dl = 2, Nl = 3, nr = 4, Xr = 1, qx = 2, bs = 3, zx = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Wx = /[\x85\u2028\u2029]/, Hx = /[,\[\]\{\}]/, Rl = /^(?:!|!!|![a-z\-]+!)$/i, Pl = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; +function Ts(t) { + return Object.prototype.toString.call(t); +} +function Ot(t) { + return t === 10 || t === 13; +} +function ue(t) { + return t === 9 || t === 32; +} +function dt(t) { + return t === 9 || t === 32 || t === 10 || t === 13; +} +function ke(t) { + return t === 44 || t === 91 || t === 93 || t === 123 || t === 125; +} +function jx(t) { + var e; + return 48 <= t && t <= 57 ? t - 48 : (e = t | 32, 97 <= e && e <= 102 ? e - 97 + 10 : -1); +} +function Ux(t) { + return t === 120 ? 2 : t === 117 ? 4 : t === 85 ? 8 : 0; +} +function Yx(t) { + return 48 <= t && t <= 57 ? t - 48 : -1; +} +function Ss(t) { + return t === 48 ? "\0" : t === 97 ? "\x07" : t === 98 ? "\b" : t === 116 || t === 9 ? " " : t === 110 ? ` +` : t === 118 ? "\v" : t === 102 ? "\f" : t === 114 ? "\r" : t === 101 ? "\x1B" : t === 32 ? " " : t === 34 ? '"' : t === 47 ? "/" : t === 92 ? "\\" : t === 78 ? "…" : t === 95 ? " " : t === 76 ? "\u2028" : t === 80 ? "\u2029" : ""; +} +function Gx(t) { + return t <= 65535 ? String.fromCharCode(t) : String.fromCharCode( + (t - 65536 >> 10) + 55296, + (t - 65536 & 1023) + 56320 + ); +} +var ql = new Array(256), zl = new Array(256); +for (var ve = 0; ve < 256; ve++) + ql[ve] = Ss(ve) ? 1 : 0, zl[ve] = Ss(ve); +function Vx(t, e) { + this.input = t, this.filename = e.filename || null, this.schema = e.schema || Px, this.onWarning = e.onWarning || null, this.legacy = e.legacy || !1, this.json = e.json || !1, this.listener = e.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = t.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = []; +} +function Wl(t, e) { + var i = { + name: t.filename, + buffer: t.input.slice(0, -1), + // omit trailing \0 + position: t.position, + line: t.line, + column: t.position - t.lineStart + }; + return i.snippet = IC(i), new jt(e, i); +} +function F(t, e) { + throw Wl(t, e); +} +function or(t, e) { + t.onWarning && t.onWarning.call(null, Wl(t, e)); +} +var vs = { + YAML: function(e, i, r) { + var n, o, s; + e.version !== null && F(e, "duplication of %YAML directive"), r.length !== 1 && F(e, "YAML directive accepts exactly one argument"), n = /^([0-9]+)\.([0-9]+)$/.exec(r[0]), n === null && F(e, "ill-formed argument of the YAML directive"), o = parseInt(n[1], 10), s = parseInt(n[2], 10), o !== 1 && F(e, "unacceptable YAML version of the document"), e.version = r[0], e.checkLineBreaks = s < 2, s !== 1 && s !== 2 && or(e, "unsupported YAML version of the document"); + }, + TAG: function(e, i, r) { + var n, o; + r.length !== 2 && F(e, "TAG directive accepts exactly two arguments"), n = r[0], o = r[1], Rl.test(n) || F(e, "ill-formed tag handle (first argument) of the TAG directive"), re.call(e.tagMap, n) && F(e, 'there is a previously declared suffix for "' + n + '" tag handle'), Pl.test(o) || F(e, "ill-formed tag prefix (second argument) of the TAG directive"); + try { + o = decodeURIComponent(o); + } catch { + F(e, "tag prefix is malformed: " + o); + } + e.tagMap[n] = o; + } +}; +function ee(t, e, i, r) { + var n, o, s, a; + if (e < i) { + if (a = t.input.slice(e, i), r) + for (n = 0, o = a.length; n < o; n += 1) + s = a.charCodeAt(n), s === 9 || 32 <= s && s <= 1114111 || F(t, "expected valid JSON character"); + else + zx.test(a) && F(t, "the stream contains non-printable characters"); + t.result += a; + } +} +function ks(t, e, i, r) { + var n, o, s, a; + for (at.isObject(i) || F(t, "cannot merge mappings; the provided source object is unacceptable"), n = Object.keys(i), s = 0, a = n.length; s < a; s += 1) + o = n[s], re.call(e, o) || (e[o] = i[o], r[o] = !0); +} +function we(t, e, i, r, n, o, s, a, l) { + var h, c; + if (Array.isArray(n)) + for (n = Array.prototype.slice.call(n), h = 0, c = n.length; h < c; h += 1) + Array.isArray(n[h]) && F(t, "nested arrays are not supported inside keys"), typeof n == "object" && Ts(n[h]) === "[object Object]" && (n[h] = "[object Object]"); + if (typeof n == "object" && Ts(n) === "[object Object]" && (n = "[object Object]"), n = String(n), e === null && (e = {}), r === "tag:yaml.org,2002:merge") + if (Array.isArray(o)) + for (h = 0, c = o.length; h < c; h += 1) + ks(t, e, o[h], i); + else + ks(t, e, o, i); + else + !t.json && !re.call(i, n) && re.call(e, n) && (t.line = s || t.line, t.lineStart = a || t.lineStart, t.position = l || t.position, F(t, "duplicated mapping key")), n === "__proto__" ? Object.defineProperty(e, n, { + configurable: !0, + enumerable: !0, + writable: !0, + value: o + }) : e[n] = o, delete i[n]; + return e; +} +function Qn(t) { + var e; + e = t.input.charCodeAt(t.position), e === 10 ? t.position++ : e === 13 ? (t.position++, t.input.charCodeAt(t.position) === 10 && t.position++) : F(t, "a line break is expected"), t.line += 1, t.lineStart = t.position, t.firstTabInLine = -1; +} +function J(t, e, i) { + for (var r = 0, n = t.input.charCodeAt(t.position); n !== 0; ) { + for (; ue(n); ) + n === 9 && t.firstTabInLine === -1 && (t.firstTabInLine = t.position), n = t.input.charCodeAt(++t.position); + if (e && n === 35) + do + n = t.input.charCodeAt(++t.position); + while (n !== 10 && n !== 13 && n !== 0); + if (Ot(n)) + for (Qn(t), n = t.input.charCodeAt(t.position), r++, t.lineIndent = 0; n === 32; ) + t.lineIndent++, n = t.input.charCodeAt(++t.position); + else + break; + } + return i !== -1 && r !== 0 && t.lineIndent < i && or(t, "deficient indentation"), r; +} +function kr(t) { + var e = t.position, i; + return i = t.input.charCodeAt(e), !!((i === 45 || i === 46) && i === t.input.charCodeAt(e + 1) && i === t.input.charCodeAt(e + 2) && (e += 3, i = t.input.charCodeAt(e), i === 0 || dt(i))); +} +function to(t, e) { + e === 1 ? t.result += " " : e > 1 && (t.result += at.repeat(` +`, e - 1)); +} +function Xx(t, e, i) { + var r, n, o, s, a, l, h, c, f = t.kind, g = t.result, p; + if (p = t.input.charCodeAt(t.position), dt(p) || ke(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (n = t.input.charCodeAt(t.position + 1), dt(n) || i && ke(n))) + return !1; + for (t.kind = "scalar", t.result = "", o = s = t.position, a = !1; p !== 0; ) { + if (p === 58) { + if (n = t.input.charCodeAt(t.position + 1), dt(n) || i && ke(n)) + break; + } else if (p === 35) { + if (r = t.input.charCodeAt(t.position - 1), dt(r)) + break; + } else { + if (t.position === t.lineStart && kr(t) || i && ke(p)) + break; + if (Ot(p)) + if (l = t.line, h = t.lineStart, c = t.lineIndent, J(t, !1, -1), t.lineIndent >= e) { + a = !0, p = t.input.charCodeAt(t.position); + continue; + } else { + t.position = s, t.line = l, t.lineStart = h, t.lineIndent = c; + break; + } + } + a && (ee(t, o, s, !1), to(t, t.line - l), o = s = t.position, a = !1), ue(p) || (s = t.position + 1), p = t.input.charCodeAt(++t.position); + } + return ee(t, o, s, !1), t.result ? !0 : (t.kind = f, t.result = g, !1); +} +function Kx(t, e) { + var i, r, n; + if (i = t.input.charCodeAt(t.position), i !== 39) + return !1; + for (t.kind = "scalar", t.result = "", t.position++, r = n = t.position; (i = t.input.charCodeAt(t.position)) !== 0; ) + if (i === 39) + if (ee(t, r, t.position, !0), i = t.input.charCodeAt(++t.position), i === 39) + r = t.position, t.position++, n = t.position; + else + return !0; + else + Ot(i) ? (ee(t, r, n, !0), to(t, J(t, !1, e)), r = n = t.position) : t.position === t.lineStart && kr(t) ? F(t, "unexpected end of the document within a single quoted scalar") : (t.position++, n = t.position); + F(t, "unexpected end of the stream within a single quoted scalar"); +} +function Zx(t, e) { + var i, r, n, o, s, a; + if (a = t.input.charCodeAt(t.position), a !== 34) + return !1; + for (t.kind = "scalar", t.result = "", t.position++, i = r = t.position; (a = t.input.charCodeAt(t.position)) !== 0; ) { + if (a === 34) + return ee(t, i, t.position, !0), t.position++, !0; + if (a === 92) { + if (ee(t, i, t.position, !0), a = t.input.charCodeAt(++t.position), Ot(a)) + J(t, !1, e); + else if (a < 256 && ql[a]) + t.result += zl[a], t.position++; + else if ((s = Ux(a)) > 0) { + for (n = s, o = 0; n > 0; n--) + a = t.input.charCodeAt(++t.position), (s = jx(a)) >= 0 ? o = (o << 4) + s : F(t, "expected hexadecimal character"); + t.result += Gx(o), t.position++; + } else + F(t, "unknown escape sequence"); + i = r = t.position; + } else + Ot(a) ? (ee(t, i, r, !0), to(t, J(t, !1, e)), i = r = t.position) : t.position === t.lineStart && kr(t) ? F(t, "unexpected end of the document within a double quoted scalar") : (t.position++, r = t.position); + } + F(t, "unexpected end of the stream within a double quoted scalar"); +} +function Jx(t, e) { + var i = !0, r, n, o, s = t.tag, a, l = t.anchor, h, c, f, g, p, _ = /* @__PURE__ */ Object.create(null), k, M, q, v; + if (v = t.input.charCodeAt(t.position), v === 91) + c = 93, p = !1, a = []; + else if (v === 123) + c = 125, p = !0, a = {}; + else + return !1; + for (t.anchor !== null && (t.anchorMap[t.anchor] = a), v = t.input.charCodeAt(++t.position); v !== 0; ) { + if (J(t, !0, e), v = t.input.charCodeAt(t.position), v === c) + return t.position++, t.tag = s, t.anchor = l, t.kind = p ? "mapping" : "sequence", t.result = a, !0; + i ? v === 44 && F(t, "expected the node content, but found ','") : F(t, "missed comma between flow collection entries"), M = k = q = null, f = g = !1, v === 63 && (h = t.input.charCodeAt(t.position + 1), dt(h) && (f = g = !0, t.position++, J(t, !0, e))), r = t.line, n = t.lineStart, o = t.position, Oe(t, e, rr, !1, !0), M = t.tag, k = t.result, J(t, !0, e), v = t.input.charCodeAt(t.position), (g || t.line === r) && v === 58 && (f = !0, v = t.input.charCodeAt(++t.position), J(t, !0, e), Oe(t, e, rr, !1, !0), q = t.result), p ? we(t, a, _, M, k, q, r, n, o) : f ? a.push(we(t, null, _, M, k, q, r, n, o)) : a.push(k), J(t, !0, e), v = t.input.charCodeAt(t.position), v === 44 ? (i = !0, v = t.input.charCodeAt(++t.position)) : i = !1; + } + F(t, "unexpected end of the stream within a flow collection"); +} +function Qx(t, e) { + var i, r, n = Xr, o = !1, s = !1, a = e, l = 0, h = !1, c, f; + if (f = t.input.charCodeAt(t.position), f === 124) + r = !1; + else if (f === 62) + r = !0; + else + return !1; + for (t.kind = "scalar", t.result = ""; f !== 0; ) + if (f = t.input.charCodeAt(++t.position), f === 43 || f === 45) + Xr === n ? n = f === 43 ? bs : qx : F(t, "repeat of a chomping mode identifier"); + else if ((c = Yx(f)) >= 0) + c === 0 ? F(t, "bad explicit indentation width of a block scalar; it cannot be less than one") : s ? F(t, "repeat of an indentation width identifier") : (a = e + c - 1, s = !0); + else + break; + if (ue(f)) { + do + f = t.input.charCodeAt(++t.position); + while (ue(f)); + if (f === 35) + do + f = t.input.charCodeAt(++t.position); + while (!Ot(f) && f !== 0); + } + for (; f !== 0; ) { + for (Qn(t), t.lineIndent = 0, f = t.input.charCodeAt(t.position); (!s || t.lineIndent < a) && f === 32; ) + t.lineIndent++, f = t.input.charCodeAt(++t.position); + if (!s && t.lineIndent > a && (a = t.lineIndent), Ot(f)) { + l++; + continue; + } + if (t.lineIndent < a) { + n === bs ? t.result += at.repeat(` +`, o ? 1 + l : l) : n === Xr && o && (t.result += ` +`); + break; + } + for (r ? ue(f) ? (h = !0, t.result += at.repeat(` +`, o ? 1 + l : l)) : h ? (h = !1, t.result += at.repeat(` +`, l + 1)) : l === 0 ? o && (t.result += " ") : t.result += at.repeat(` +`, l) : t.result += at.repeat(` +`, o ? 1 + l : l), o = !0, s = !0, l = 0, i = t.position; !Ot(f) && f !== 0; ) + f = t.input.charCodeAt(++t.position); + ee(t, i, t.position, !1); + } + return !0; +} +function ws(t, e) { + var i, r = t.tag, n = t.anchor, o = [], s, a = !1, l; + if (t.firstTabInLine !== -1) + return !1; + for (t.anchor !== null && (t.anchorMap[t.anchor] = o), l = t.input.charCodeAt(t.position); l !== 0 && (t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, F(t, "tab characters must not be used in indentation")), !(l !== 45 || (s = t.input.charCodeAt(t.position + 1), !dt(s)))); ) { + if (a = !0, t.position++, J(t, !0, -1) && t.lineIndent <= e) { + o.push(null), l = t.input.charCodeAt(t.position); + continue; + } + if (i = t.line, Oe(t, e, Nl, !1, !0), o.push(t.result), J(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === i || t.lineIndent > e) && l !== 0) + F(t, "bad indentation of a sequence entry"); + else if (t.lineIndent < e) + break; + } + return a ? (t.tag = r, t.anchor = n, t.kind = "sequence", t.result = o, !0) : !1; +} +function tb(t, e, i) { + var r, n, o, s, a, l, h = t.tag, c = t.anchor, f = {}, g = /* @__PURE__ */ Object.create(null), p = null, _ = null, k = null, M = !1, q = !1, v; + if (t.firstTabInLine !== -1) + return !1; + for (t.anchor !== null && (t.anchorMap[t.anchor] = f), v = t.input.charCodeAt(t.position); v !== 0; ) { + if (!M && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, F(t, "tab characters must not be used in indentation")), r = t.input.charCodeAt(t.position + 1), o = t.line, (v === 63 || v === 58) && dt(r)) + v === 63 ? (M && (we(t, f, g, p, _, null, s, a, l), p = _ = k = null), q = !0, M = !0, n = !0) : M ? (M = !1, n = !0) : F(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, v = r; + else { + if (s = t.line, a = t.lineStart, l = t.position, !Oe(t, i, Dl, !1, !0)) + break; + if (t.line === o) { + for (v = t.input.charCodeAt(t.position); ue(v); ) + v = t.input.charCodeAt(++t.position); + if (v === 58) + v = t.input.charCodeAt(++t.position), dt(v) || F(t, "a whitespace character is expected after the key-value separator within a block mapping"), M && (we(t, f, g, p, _, null, s, a, l), p = _ = k = null), q = !0, M = !1, n = !1, p = t.tag, _ = t.result; + else if (q) + F(t, "can not read an implicit mapping pair; a colon is missed"); + else + return t.tag = h, t.anchor = c, !0; + } else if (q) + F(t, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else + return t.tag = h, t.anchor = c, !0; + } + if ((t.line === o || t.lineIndent > e) && (M && (s = t.line, a = t.lineStart, l = t.position), Oe(t, e, nr, !0, n) && (M ? _ = t.result : k = t.result), M || (we(t, f, g, p, _, k, s, a, l), p = _ = k = null), J(t, !0, -1), v = t.input.charCodeAt(t.position)), (t.line === o || t.lineIndent > e) && v !== 0) + F(t, "bad indentation of a mapping entry"); + else if (t.lineIndent < e) + break; + } + return M && we(t, f, g, p, _, null, s, a, l), q && (t.tag = h, t.anchor = c, t.kind = "mapping", t.result = f), q; +} +function eb(t) { + var e, i = !1, r = !1, n, o, s; + if (s = t.input.charCodeAt(t.position), s !== 33) + return !1; + if (t.tag !== null && F(t, "duplication of a tag property"), s = t.input.charCodeAt(++t.position), s === 60 ? (i = !0, s = t.input.charCodeAt(++t.position)) : s === 33 ? (r = !0, n = "!!", s = t.input.charCodeAt(++t.position)) : n = "!", e = t.position, i) { + do + s = t.input.charCodeAt(++t.position); + while (s !== 0 && s !== 62); + t.position < t.length ? (o = t.input.slice(e, t.position), s = t.input.charCodeAt(++t.position)) : F(t, "unexpected end of the stream within a verbatim tag"); + } else { + for (; s !== 0 && !dt(s); ) + s === 33 && (r ? F(t, "tag suffix cannot contain exclamation marks") : (n = t.input.slice(e - 1, t.position + 1), Rl.test(n) || F(t, "named tag handle cannot contain such characters"), r = !0, e = t.position + 1)), s = t.input.charCodeAt(++t.position); + o = t.input.slice(e, t.position), Hx.test(o) && F(t, "tag suffix cannot contain flow indicator characters"); + } + o && !Pl.test(o) && F(t, "tag name cannot contain such characters: " + o); + try { + o = decodeURIComponent(o); + } catch { + F(t, "tag name is malformed: " + o); + } + return i ? t.tag = o : re.call(t.tagMap, n) ? t.tag = t.tagMap[n] + o : n === "!" ? t.tag = "!" + o : n === "!!" ? t.tag = "tag:yaml.org,2002:" + o : F(t, 'undeclared tag handle "' + n + '"'), !0; +} +function ib(t) { + var e, i; + if (i = t.input.charCodeAt(t.position), i !== 38) + return !1; + for (t.anchor !== null && F(t, "duplication of an anchor property"), i = t.input.charCodeAt(++t.position), e = t.position; i !== 0 && !dt(i) && !ke(i); ) + i = t.input.charCodeAt(++t.position); + return t.position === e && F(t, "name of an anchor node must contain at least one character"), t.anchor = t.input.slice(e, t.position), !0; +} +function rb(t) { + var e, i, r; + if (r = t.input.charCodeAt(t.position), r !== 42) + return !1; + for (r = t.input.charCodeAt(++t.position), e = t.position; r !== 0 && !dt(r) && !ke(r); ) + r = t.input.charCodeAt(++t.position); + return t.position === e && F(t, "name of an alias node must contain at least one character"), i = t.input.slice(e, t.position), re.call(t.anchorMap, i) || F(t, 'unidentified alias "' + i + '"'), t.result = t.anchorMap[i], J(t, !0, -1), !0; +} +function Oe(t, e, i, r, n) { + var o, s, a, l = 1, h = !1, c = !1, f, g, p, _, k, M; + if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, o = s = a = nr === i || Nl === i, r && J(t, !0, -1) && (h = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1) + for (; eb(t) || ib(t); ) + J(t, !0, -1) ? (h = !0, a = o, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)) : a = !1; + if (a && (a = h || n), (l === 1 || nr === i) && (rr === i || Dl === i ? k = e : k = e + 1, M = t.position - t.lineStart, l === 1 ? a && (ws(t, M) || tb(t, M, k)) || Jx(t, k) ? c = !0 : (s && Qx(t, k) || Kx(t, k) || Zx(t, k) ? c = !0 : rb(t) ? (c = !0, (t.tag !== null || t.anchor !== null) && F(t, "alias node should not have any properties")) : Xx(t, k, rr === i) && (c = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (c = a && ws(t, M))), t.tag === null) + t.anchor !== null && (t.anchorMap[t.anchor] = t.result); + else if (t.tag === "?") { + for (t.result !== null && t.kind !== "scalar" && F(t, 'unacceptable node kind for ! tag; it should be "scalar", not "' + t.kind + '"'), f = 0, g = t.implicitTypes.length; f < g; f += 1) + if (_ = t.implicitTypes[f], _.resolve(t.result)) { + t.result = _.construct(t.result), t.tag = _.tag, t.anchor !== null && (t.anchorMap[t.anchor] = t.result); + break; + } + } else if (t.tag !== "!") { + if (re.call(t.typeMap[t.kind || "fallback"], t.tag)) + _ = t.typeMap[t.kind || "fallback"][t.tag]; + else + for (_ = null, p = t.typeMap.multi[t.kind || "fallback"], f = 0, g = p.length; f < g; f += 1) + if (t.tag.slice(0, p[f].tag.length) === p[f].tag) { + _ = p[f]; + break; + } + _ || F(t, "unknown tag !<" + t.tag + ">"), t.result !== null && _.kind !== t.kind && F(t, "unacceptable node kind for !<" + t.tag + '> tag; it should be "' + _.kind + '", not "' + t.kind + '"'), _.resolve(t.result, t.tag) ? (t.result = _.construct(t.result, t.tag), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : F(t, "cannot resolve a node with !<" + t.tag + "> explicit tag"); + } + return t.listener !== null && t.listener("close", t), t.tag !== null || t.anchor !== null || c; +} +function nb(t) { + var e = t.position, i, r, n, o = !1, s; + for (t.version = null, t.checkLineBreaks = t.legacy, t.tagMap = /* @__PURE__ */ Object.create(null), t.anchorMap = /* @__PURE__ */ Object.create(null); (s = t.input.charCodeAt(t.position)) !== 0 && (J(t, !0, -1), s = t.input.charCodeAt(t.position), !(t.lineIndent > 0 || s !== 37)); ) { + for (o = !0, s = t.input.charCodeAt(++t.position), i = t.position; s !== 0 && !dt(s); ) + s = t.input.charCodeAt(++t.position); + for (r = t.input.slice(i, t.position), n = [], r.length < 1 && F(t, "directive name must not be less than one character in length"); s !== 0; ) { + for (; ue(s); ) + s = t.input.charCodeAt(++t.position); + if (s === 35) { + do + s = t.input.charCodeAt(++t.position); + while (s !== 0 && !Ot(s)); + break; + } + if (Ot(s)) + break; + for (i = t.position; s !== 0 && !dt(s); ) + s = t.input.charCodeAt(++t.position); + n.push(t.input.slice(i, t.position)); + } + s !== 0 && Qn(t), re.call(vs, r) ? vs[r](t, r, n) : or(t, 'unknown document directive "' + r + '"'); + } + if (J(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, J(t, !0, -1)) : o && F(t, "directives end mark is expected"), Oe(t, t.lineIndent - 1, nr, !1, !0), J(t, !0, -1), t.checkLineBreaks && Wx.test(t.input.slice(e, t.position)) && or(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && kr(t)) { + t.input.charCodeAt(t.position) === 46 && (t.position += 3, J(t, !0, -1)); + return; + } + if (t.position < t.length - 1) + F(t, "end of the stream or a document separator is expected"); + else + return; +} +function Hl(t, e) { + t = String(t), e = e || {}, t.length !== 0 && (t.charCodeAt(t.length - 1) !== 10 && t.charCodeAt(t.length - 1) !== 13 && (t += ` +`), t.charCodeAt(0) === 65279 && (t = t.slice(1))); + var i = new Vx(t, e), r = t.indexOf("\0"); + for (r !== -1 && (i.position = r, F(i, "null byte is not allowed in input")), i.input += "\0"; i.input.charCodeAt(i.position) === 32; ) + i.lineIndent += 1, i.position += 1; + for (; i.position < i.length - 1; ) + nb(i); + return i.documents; +} +function ob(t, e, i) { + e !== null && typeof e == "object" && typeof i > "u" && (i = e, e = null); + var r = Hl(t, i); + if (typeof e != "function") + return r; + for (var n = 0, o = r.length; n < o; n += 1) + e(r[n]); +} +function sb(t, e) { + var i = Hl(t, e); + if (i.length !== 0) { + if (i.length === 1) + return i[0]; + throw new jt("expected a single document in the stream, but found more"); + } +} +var ab = ob, lb = sb, hb = { + loadAll: ab, + load: lb +}, cb = Ol, ub = hb.load; +function fb(t) { + const e = t.match(La); + if (!e) + return { + text: t, + metadata: {} + }; + let i = ub(e[1], { + // To support config, we need JSON schema. + // https://www.yaml.org/spec/1.2/spec.html#id2803231 + schema: cb + }) ?? {}; + i = typeof i == "object" && !Array.isArray(i) ? i : {}; + const r = {}; + return i.displayMode && (r.displayMode = i.displayMode.toString()), i.title && (r.title = i.title.toString()), i.config && (r.config = i.config), { + text: t.slice(e[0].length), + metadata: r + }; +} +const db = (t) => t.replace(/\r\n?/g, ` +`).replace( + /<(\w+)([^>]*)>/g, + (e, i, r) => "<" + i + r.replace(/="([^"]*)"/g, "='$1'") + ">" +), pb = (t) => { + const { text: e, metadata: i } = fb(t), { displayMode: r, title: n, config: o = {} } = i; + return r && (o.gantt || (o.gantt = {}), o.gantt.displayMode = r), { title: n, config: o, text: e }; +}, gb = (t) => { + const e = Xe.detectInit(t) ?? {}, i = Xe.detectDirective(t, "wrap"); + return Array.isArray(i) ? e.wrap = i.some(({ type: r }) => { + }) : (i == null ? void 0 : i.type) === "wrap" && (e.wrap = !0), { + text: p0(t), + directive: e + }; +}; +function mb(t) { + const e = db(t), i = pb(e), r = gb(i.text), n = Ka(i.config, r.directive); + return t = TC(r.text), { + code: t, + title: i.title, + config: n + }; +} +const _b = 5e4, yb = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa", Cb = "sandbox", xb = "loose", bb = "http://www.w3.org/2000/svg", Tb = "http://www.w3.org/1999/xlink", Sb = "http://www.w3.org/1999/xhtml", vb = "100%", kb = "100%", wb = "border:0;margin:0;", Bb = "margin:0", Fb = "allow-top-navigation-by-user-activation allow-popups", Lb = 'The "iframe" tag is not supported by your browser.', Ab = ["foreignobject"], Eb = ["dominant-baseline"]; +function jl(t) { + const e = mb(t); + return tr(), t_(e.config ?? {}), e; +} +async function Mb(t, e) { + Kn(), t = jl(t).code; + try { + await Zn(t); + } catch (i) { + if (e != null && e.suppressErrors) + return !1; + throw i; + } + return !0; +} +const Ob = function(t) { + let e = t; + return e = e.replace(/style.*:\S*#.*;/g, function(i) { + return i.substring(0, i.length - 1); + }), e = e.replace(/classDef.*:\S*#.*;/g, function(i) { + return i.substring(0, i.length - 1); + }), e = e.replace(/#\w+;/g, function(i) { + const r = i.substring(1, i.length - 1); + return /^\+?\d+$/.test(r) ? "fl°°" + r + "¶ß" : "fl°" + r + "¶ß"; + }), e; +}, $b = function(t) { + return t.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";"); +}, Bs = (t, e, i = []) => ` +.${t} ${e} { ${i.join(" !important; ")} !important; }`, Ib = (t, e = {}) => { + var r; + let i = ""; + if (t.themeCSS !== void 0 && (i += ` +${t.themeCSS}`), t.fontFamily !== void 0 && (i += ` +:root { --mermaid-font-family: ${t.fontFamily}}`), t.altFontFamily !== void 0 && (i += ` +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`), !Yr(e)) { + const a = t.htmlLabels || ((r = t.flowchart) == null ? void 0 : r.htmlLabels) ? ["> *", "span"] : ["rect", "polygon", "ellipse", "circle", "path"]; + for (const l in e) { + const h = e[l]; + Yr(h.styles) || a.forEach((c) => { + i += Bs(h.id, c, h.styles); + }), Yr(h.textStyles) || (i += Bs(h.id, "tspan", h.textStyles)); + } + } + return i; +}, Db = (t, e, i, r) => { + const n = Ib(t, i), o = Ny(e, n, t.themeVariables); + return pn(G0(`${r}{${o}}`), X0); +}, Nb = (t = "", e, i) => { + let r = t; + return !i && !e && (r = r.replace( + /marker-end="url\([\d+./:=?A-Za-z-]*?#/g, + 'marker-end="url(#' + )), r = $b(r), r = r.replace(/
/g, "
"), r; +}, Rb = (t = "", e) => { + var n, o; + const i = (o = (n = e == null ? void 0 : e.viewBox) == null ? void 0 : n.baseVal) != null && o.height ? e.viewBox.baseVal.height + "px" : kb, r = btoa('' + t + ""); + return ``; +}, Fs = (t, e, i, r, n) => { + const o = t.append("div"); + o.attr("id", i), r && o.attr("style", r); + const s = o.append("svg").attr("id", e).attr("width", "100%").attr("xmlns", bb); + return n && s.attr("xmlns:xlink", n), s.append("g"), t; +}; +function Ls(t, e) { + return t.append("iframe").attr("id", e).attr("style", "width: 100%; height: 100%;").attr("sandbox", ""); +} +const Pb = (t, e, i, r) => { + var n, o, s; + (n = t.getElementById(e)) == null || n.remove(), (o = t.getElementById(i)) == null || o.remove(), (s = t.getElementById(r)) == null || s.remove(); +}, qb = async function(t, e, i) { + var E, S, C, O, x, D; + Kn(); + const r = jl(e); + e = r.code; + const n = Ft(); + L.debug(n), e.length > ((n == null ? void 0 : n.maxTextSize) ?? _b) && (e = yb); + const o = "#" + t, s = "i" + t, a = "#" + s, l = "d" + t, h = "#" + l; + let c = Ct("body"); + const f = n.securityLevel === Cb, g = n.securityLevel === xb, p = n.fontFamily; + if (i !== void 0) { + if (i && (i.innerHTML = ""), f) { + const T = Ls(Ct(i), s); + c = Ct(T.nodes()[0].contentDocument.body), c.node().style.margin = 0; + } else + c = Ct(i); + Fs(c, t, l, `font-family: ${p}`, Tb); + } else { + if (Pb(document, t, l, s), f) { + const T = Ls(Ct("body"), s); + c = Ct(T.nodes()[0].contentDocument.body), c.node().style.margin = 0; + } else + c = Ct("body"); + Fs(c, t, l); + } + e = Ob(e); + let _, k; + try { + _ = await Zn(e, { title: r.title }); + } catch (T) { + _ = new Al("error"), k = T; + } + const M = c.select(h).node(), q = _.type, v = M.firstChild, z = v.firstChild, Q = (S = (E = _.renderer).getClasses) == null ? void 0 : S.call(E, e, _), X = Db(n, q, Q, o), G = document.createElement("style"); + G.innerHTML = X, v.insertBefore(G, z); + try { + await _.renderer.draw(e, t, fs, _); + } catch (T) { + throw my.draw(e, t, fs), T; + } + const W = c.select(`${h} svg`), Vt = (O = (C = _.db).getAccTitle) == null ? void 0 : O.call(C), K = (D = (x = _.db).getAccDescription) == null ? void 0 : D.call(x); + Wb(q, W, Vt, K), c.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns", Sb); + let I = c.select(h).node().innerHTML; + if (L.debug("config.arrowMarkerAbsolute", n.arrowMarkerAbsolute), I = Nb(I, f, Ta(n.arrowMarkerAbsolute)), f) { + const T = c.select(h + " svg").node(); + I = Rb(I, T); + } else + g || (I = Gi.sanitize(I, { + ADD_TAGS: Ab, + ADD_ATTR: Eb + })); + if (Jy(), k) + throw k; + const At = Ct(f ? a : h).node(); + return At && "remove" in At && At.remove(), { + svg: I, + bindFunctions: _.db.bindFunctions + }; +}; +function zb(t = {}) { + var i; + t != null && t.fontFamily && !((i = t.themeVariables) != null && i.fontFamily) && (t.themeVariables || (t.themeVariables = {}), t.themeVariables.fontFamily = t.fontFamily), Z0(t), t != null && t.theme && t.theme in Ut ? t.themeVariables = Ut[t.theme].getThemeVariables( + t.themeVariables + ) : t && (t.themeVariables = Ut.default.getThemeVariables(t.themeVariables)); + const e = typeof t == "object" ? K0(t) : nl(); + bn(e.logLevel), Kn(); +} +function Wb(t, e, i, r) { + xC(e, t), bC(e, i, r, e.attr("id")); +} +const pe = Object.freeze({ + render: qb, + parse: Mb, + getDiagramFromText: Zn, + initialize: zb, + getConfig: Ft, + setConfig: Q0, + getSiteConfig: nl, + updateSiteConfig: J0, + reset: () => { + tr(); + }, + globalReset: () => { + tr(si); + }, + defaultConfig: si +}); +bn(Ft().logLevel); +tr(Ft()); +const Hb = async () => { + L.debug("Loading registered diagrams"); + const e = (await Promise.allSettled( + Object.entries(Ae).map(async ([i, { detector: r, loader: n }]) => { + if (n) + try { + Xn(i); + } catch { + try { + const { diagram: s, id: a } = await n(); + ir(a, s, r); + } catch (s) { + throw L.error(`Failed to load external diagram with key ${i}. Removing from detectors.`), delete Ae[i], s; + } + } + }) + )).filter((i) => i.status === "rejected"); + if (e.length > 0) { + L.error(`Failed to load ${e.length} external diagrams`); + for (const i of e) + L.error(i); + throw new Error(`Failed to load ${e.length} external diagrams`); + } +}, jb = (t, e, i) => { + L.warn(t), Xa(t) ? (i && i(t.str, t.hash), e.push({ ...t, message: t.str, error: t })) : (i && i(t), t instanceof Error && e.push({ + str: t.message, + message: t.message, + hash: t.name, + error: t + })); +}, Ul = async function(t = { + querySelector: ".mermaid" +}) { + try { + await Ub(t); + } catch (e) { + if (Xa(e) && L.error(e.str), xt.parseError && xt.parseError(e), !t.suppressErrors) + throw L.error("Use the suppressErrors option to suppress these errors"), e; + } +}, Ub = async function({ postRenderCallback: t, querySelector: e, nodes: i } = { + querySelector: ".mermaid" +}) { + const r = pe.getConfig(); + L.debug(`${t ? "" : "No "}Callback function found`); + let n; + if (i) + n = i; + else if (e) + n = document.querySelectorAll(e); + else + throw new Error("Nodes and querySelector are both undefined"); + L.debug(`Found ${n.length} diagrams`), (r == null ? void 0 : r.startOnLoad) !== void 0 && (L.debug("Start On Load: " + (r == null ? void 0 : r.startOnLoad)), pe.updateSiteConfig({ startOnLoad: r == null ? void 0 : r.startOnLoad })); + const o = new Xe.InitIDGenerator(r.deterministicIds, r.deterministicIDSeed); + let s; + const a = []; + for (const l of Array.from(n)) { + L.info("Rendering diagram: " + l.id); + /*! Check if previously processed */ + if (l.getAttribute("data-processed")) + continue; + l.setAttribute("data-processed", "true"); + const h = `mermaid-${o.next()}`; + s = l.innerHTML, s = oh(Xe.entityDecode(s)).trim().replace(//gi, "
"); + const c = Xe.detectInit(s); + c && L.debug("Detected early reinit: ", c); + try { + const { svg: f, bindFunctions: g } = await Xl(h, s, l); + l.innerHTML = f, t && await t(h), g && g(l); + } catch (f) { + jb(f, a, xt.parseError); + } + } + if (a.length > 0) + throw a[0]; +}, Yl = function(t) { + pe.initialize(t); +}, Yb = async function(t, e, i) { + L.warn("mermaid.init is deprecated. Please use run instead."), t && Yl(t); + const r = { postRenderCallback: i, querySelector: ".mermaid" }; + typeof e == "string" ? r.querySelector = e : e && (e instanceof HTMLElement ? r.nodes = [e] : r.nodes = e), await Ul(r); +}, Gb = async (t, { + lazyLoad: e = !0 +} = {}) => { + Ea(...t), e === !1 && await Hb(); +}, Gl = function() { + if (xt.startOnLoad) { + const { startOnLoad: t } = pe.getConfig(); + t && xt.run().catch((e) => L.error("Mermaid failed to initialize", e)); + } +}; +if (typeof document < "u") { + /*! + * Wait for document loaded before starting the execution + */ + window.addEventListener("load", Gl, !1); +} +const Vb = function(t) { + xt.parseError = t; +}, sr = []; +let Kr = !1; +const Vl = async () => { + if (!Kr) { + for (Kr = !0; sr.length > 0; ) { + const t = sr.shift(); + if (t) + try { + await t(); + } catch (e) { + L.error("Error executing queue", e); + } + } + Kr = !1; + } +}, Xb = async (t, e) => new Promise((i, r) => { + const n = () => new Promise((o, s) => { + pe.parse(t, e).then( + (a) => { + o(a), i(a); + }, + (a) => { + var l; + L.error("Error parsing", a), (l = xt.parseError) == null || l.call(xt, a), s(a), r(a); + } + ); + }); + sr.push(n), Vl().catch(r); +}), Xl = (t, e, i) => new Promise((r, n) => { + const o = () => new Promise((s, a) => { + pe.render(t, e, i).then( + (l) => { + s(l), r(l); + }, + (l) => { + var h; + L.error("Error parsing", l), (h = xt.parseError) == null || h.call(xt, l), a(l), n(l); + } + ); + }); + sr.push(o), Vl().catch(n); +}), xt = { + startOnLoad: !0, + mermaidAPI: pe, + parse: Xb, + render: Xl, + init: Yb, + run: Ul, + registerExternalDiagrams: Gb, + initialize: Yl, + parseError: void 0, + contentLoaded: Gl, + setParseErrorHandler: Vb, + detectType: mr +}; +export { + ap as $, + Ye as A, + Hy as B, + $t as C, + jy as D, + Ry as E, + Nf as F, + l1 as G, + w0 as H, + Ll as I, + Xy as J, + kn as K, + Us as L, + hi as M, + hu as N, + Vs as O, + Zb as P, + sh as Q, + ft as R, + mt as S, + ah as T, + hh as U, + uy as V, + o1 as W, + dp as X, + Ka as Y, + Wn as Z, + $ as _, + Wy as a, + n1 as a$, + wn as a0, + Qt as a1, + Qe as a2, + Fo as a3, + mu as a4, + d1 as a5, + c0 as a6, + v0 as a7, + fi as a8, + $e as a9, + ts as aA, + Pn as aB, + Pa as aC, + Ha as aD, + Ya as aE, + Fg as aF, + Dt as aG, + o0 as aH, + s0 as aI, + Nn as aJ, + yn as aK, + Yg as aL, + Km as aM, + Yr as aN, + h0 as aO, + fr as aP, + si as aQ, + $b as aR, + Uy as aS, + ci as aT, + B as aU, + A as aV, + An as aW, + t1 as aX, + r1 as aY, + Io as aZ, + $o as a_, + Xi as aa, + Ji as ab, + ge as ac, + br as ad, + zm as ae, + rC as af, + ui as ag, + Zi as ah, + n0 as ai, + Xm as aj, + Im as ak, + ja as al, + Na as am, + Mg as an, + Og as ao, + pC as ap, + os as aq, + Fm as ar, + $g as as, + Rn as at, + Ag as au, + Pg as av, + Ie as aw, + $m as ax, + ne as ay, + _r as az, + zy as b, + i1 as b0, + Jb as b1, + Qb as b2, + a1 as b3, + s1 as b4, + e1 as b5, + oh as b6, + xt as b7, + Ft as c, + ei as d, + Es as e, + In as f, + qy as g, + nt as h, + Qi as i, + Ct as j, + Sl as k, + L as l, + E0 as m, + $f as n, + S0 as o, + Ta as p, + m0 as q, + py as r, + Py as s, + Q0 as t, + js as u, + wh as v, + L0 as w, + im as x, + Dn as y, + Xe as z +}; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid.core.mjs b/webroot/js/node_modules/mermaid/dist/mermaid.core.mjs new file mode 100644 index 0000000..de5ea7e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid.core.mjs @@ -0,0 +1,14 @@ +import "ts-dedent"; +import { L } from "./mermaid-0d192ec3.js"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "d3"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +export { + L as default +}; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid.d.ts b/webroot/js/node_modules/mermaid/dist/mermaid.d.ts new file mode 100644 index 0000000..6e4e72c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid.d.ts @@ -0,0 +1,146 @@ +import type { MermaidConfig } from './config.type.js'; +import type { ParseOptions, RenderResult } from './mermaidAPI.js'; +import { mermaidAPI } from './mermaidAPI.js'; +import { detectType } from './diagram-api/detectType.js'; +import type { ParseErrorFunction } from './Diagram.js'; +import type { DetailedError } from './utils.js'; +import type { ExternalDiagramDefinition } from './diagram-api/types.js'; +import type { UnknownDiagramError } from './errors.js'; +export type { MermaidConfig, DetailedError, ExternalDiagramDefinition, ParseErrorFunction, RenderResult, ParseOptions, UnknownDiagramError, }; +export interface RunOptions { + /** + * The query selector to use when finding elements to render. Default: `".mermaid"`. + */ + querySelector?: string; + /** + * The nodes to render. If this is set, `querySelector` will be ignored. + */ + nodes?: ArrayLike; + /** + * A callback to call after each diagram is rendered. + */ + postRenderCallback?: (id: string) => unknown; + /** + * If `true`, errors will be logged to the console, but not thrown. Default: `false` + */ + suppressErrors?: boolean; +} +/** + * ## run + * + * Function that goes through the document to find the chart definitions in there and render them. + * + * The function tags the processed attributes with the attribute data-processed and ignores found + * elements with the attribute already set. This way the init function can be triggered several + * times. + * + * ```mermaid + * graph LR; + * a(Find elements)-->b{Processed} + * b-->|Yes|c(Leave element) + * b-->|No |d(Transform) + * ``` + * + * Renders the mermaid diagrams + * + * @param options - Optional runtime configs + */ +declare const run: (options?: RunOptions) => Promise; +/** + * Used to set configurations for mermaid. + * This function should be called before the run function. + * @param config - Configuration object for mermaid. + */ +declare const initialize: (config: MermaidConfig) => void; +/** + * ## init + * + * @deprecated Use {@link initialize} and {@link run} instead. + * + * Renders the mermaid diagrams + * + * @param config - **Deprecated**, please set configuration in {@link initialize}. + * @param nodes - **Default**: `.mermaid`. One of the following: + * - A DOM Node + * - An array of DOM nodes (as would come from a jQuery selector) + * - A W3C selector, a la `.mermaid` + * @param callback - Called once for each rendered diagram's id. + */ +declare const init: (config?: MermaidConfig, nodes?: string | HTMLElement | NodeListOf, callback?: ((id: string) => unknown) | undefined) => Promise; +/** + * Used to register external diagram types. + * @param diagrams - Array of {@link ExternalDiagramDefinition}. + * @param opts - If opts.lazyLoad is false, the diagrams will be loaded immediately. + */ +declare const registerExternalDiagrams: (diagrams: ExternalDiagramDefinition[], { lazyLoad, }?: { + lazyLoad?: boolean | undefined; +}) => Promise; +/** + * ##contentLoaded Callback function that is called when page is loaded. This functions fetches + * configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the + * page. + */ +declare const contentLoaded: () => void; +/** + * ## setParseErrorHandler Alternative to directly setting parseError using: + * + * ```js + * mermaid.parseError = function(err,hash){= + * forExampleDisplayErrorInGui(err); // do something with the error + * }; + * ``` + * + * This is provided for environments where the mermaid object can't directly have a new member added + * to it (eg. dart interop wrapper). (Initially there is no parseError member of mermaid). + * + * @param parseErrorHandler - New parseError() callback. + */ +declare const setParseErrorHandler: (parseErrorHandler: (err: any, hash: any) => void) => void; +/** + * Parse the text and validate the syntax. + * @param text - The mermaid diagram definition. + * @param parseOptions - Options for parsing. + * @returns true if the diagram is valid, false otherwise if parseOptions.suppressErrors is true. + * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false. + */ +declare const parse: (text: string, parseOptions?: ParseOptions) => Promise; +/** + * Function that renders an svg with a graph from a chart definition. Usage example below. + * + * ```javascript + * element = document.querySelector('#graphDiv'); + * const graphDefinition = 'graph TB\na-->b'; + * const { svg, bindFunctions } = await mermaid.render('graphDiv', graphDefinition); + * element.innerHTML = svg; + * bindFunctions?.(element); + * ``` + * + * @remarks + * Multiple calls to this function will be enqueued to run serially. + * + * @param id - The id for the SVG element (the element to be rendered) + * @param text - The text for the graph definition + * @param container - HTML element where the svg will be inserted. (Is usually element with the .mermaid class) + * If no svgContainingElement is provided then the SVG element will be appended to the body. + * Selector to element in which a div with the graph temporarily will be + * inserted. If one is provided a hidden div will be inserted in the body of the page instead. The + * element will be removed when rendering is completed. + * @returns Returns the SVG Definition and BindFunctions. + */ +declare const render: (id: string, text: string, container?: Element) => Promise; +export interface Mermaid { + startOnLoad: boolean; + parseError?: ParseErrorFunction; + mermaidAPI: typeof mermaidAPI; + parse: typeof parse; + render: typeof render; + init: typeof init; + run: typeof run; + registerExternalDiagrams: typeof registerExternalDiagrams; + initialize: typeof initialize; + contentLoaded: typeof contentLoaded; + setParseErrorHandler: typeof setParseErrorHandler; + detectType: typeof detectType; +} +declare const mermaid: Mermaid; +export default mermaid; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid.esm.min.mjs b/webroot/js/node_modules/mermaid/dist/mermaid.esm.min.mjs new file mode 100644 index 0000000..178567e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid.esm.min.mjs @@ -0,0 +1,4 @@ +import { b7 as f } from "./mermaid-e4a58915.js"; +export { + f as default +}; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid.esm.mjs b/webroot/js/node_modules/mermaid/dist/mermaid.esm.mjs new file mode 100644 index 0000000..9aca09b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid.esm.mjs @@ -0,0 +1,4 @@ +import { b7 } from "./mermaid-491db2d9.js"; +export { + b7 as default +}; diff --git a/webroot/js/node_modules/mermaid/dist/mermaid.js b/webroot/js/node_modules/mermaid/dist/mermaid.js new file mode 100644 index 0000000..e8c6c34 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid.js @@ -0,0 +1,172769 @@ +(function(global2, factory) { + typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.mermaid = factory()); +})(this, function() { + "use strict"; + function dedent(templ) { + var values2 = []; + for (var _i = 1; _i < arguments.length; _i++) { + values2[_i - 1] = arguments[_i]; + } + var strings = Array.from(typeof templ === "string" ? [templ] : templ); + strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, ""); + var indentLengths = strings.reduce(function(arr, str2) { + var matches = str2.match(/\n([\t ]+|(?!\s).)/g); + if (matches) { + return arr.concat(matches.map(function(match) { + var _a, _b; + return (_b = (_a = match.match(/[\t ]/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; + })); + } + return arr; + }, []); + if (indentLengths.length) { + var pattern_1 = new RegExp("\n[ ]{" + Math.min.apply(Math, indentLengths) + "}", "g"); + strings = strings.map(function(str2) { + return str2.replace(pattern_1, "\n"); + }); + } + strings[0] = strings[0].replace(/^\r?\n/, ""); + var string2 = strings[0]; + values2.forEach(function(value2, i2) { + var endentations = string2.match(/(?:^|\n)( *)$/); + var endentation = endentations ? endentations[1] : ""; + var indentedValue = value2; + if (typeof value2 === "string" && value2.includes("\n")) { + indentedValue = String(value2).split("\n").map(function(str2, i3) { + return i3 === 0 ? str2 : "" + endentation + str2; + }).join("\n"); + } + string2 += indentedValue + strings[i2 + 1]; + }); + return string2; + } + var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; + function getDefaultExportFromCjs(x2) { + return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2; + } + var dayjs_min = { exports: {} }; + (function(module2, exports2) { + !function(t, e) { + module2.exports = e(); + }(commonjsGlobal, function() { + var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i2 = "second", s = "minute", u = "hour", a = "day", o = "week", f2 = "month", h = "quarter", c2 = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t4) { + var e3 = ["th", "st", "nd", "rd"], n2 = t4 % 100; + return "[" + t4 + (e3[(n2 - 20) % 10] || e3[n2] || e3[0]) + "]"; + } }, m = function(t4, e3, n2) { + var r2 = String(t4); + return !r2 || r2.length >= e3 ? t4 : "" + Array(e3 + 1 - r2.length).join(n2) + t4; + }, v = { s: m, z: function(t4) { + var e3 = -t4.utcOffset(), n2 = Math.abs(e3), r2 = Math.floor(n2 / 60), i3 = n2 % 60; + return (e3 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i3, 2, "0"); + }, m: function t4(e3, n2) { + if (e3.date() < n2.date()) + return -t4(n2, e3); + var r2 = 12 * (n2.year() - e3.year()) + (n2.month() - e3.month()), i3 = e3.clone().add(r2, f2), s2 = n2 - i3 < 0, u2 = e3.clone().add(r2 + (s2 ? -1 : 1), f2); + return +(-(r2 + (n2 - i3) / (s2 ? i3 - u2 : u2 - i3)) || 0); + }, a: function(t4) { + return t4 < 0 ? Math.ceil(t4) || 0 : Math.floor(t4); + }, p: function(t4) { + return { M: f2, y: c2, w: o, d: a, D: d, h: u, m: s, s: i2, ms: r, Q: h }[t4] || String(t4 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t4) { + return void 0 === t4; + } }, g = "en", D = {}; + D[g] = M; + var p = function(t4) { + return t4 instanceof _2; + }, S = function t4(e3, n2, r2) { + var i3; + if (!e3) + return g; + if ("string" == typeof e3) { + var s2 = e3.toLowerCase(); + D[s2] && (i3 = s2), n2 && (D[s2] = n2, i3 = s2); + var u2 = e3.split("-"); + if (!i3 && u2.length > 1) + return t4(u2[0]); + } else { + var a2 = e3.name; + D[a2] = e3, i3 = a2; + } + return !r2 && i3 && (g = i3), i3 || !r2 && g; + }, w2 = function(t4, e3) { + if (p(t4)) + return t4.clone(); + var n2 = "object" == typeof e3 ? e3 : {}; + return n2.date = t4, n2.args = arguments, new _2(n2); + }, O = v; + O.l = S, O.i = p, O.w = function(t4, e3) { + return w2(t4, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset }); + }; + var _2 = function() { + function M2(t4) { + this.$L = S(t4.locale, null, true), this.parse(t4); + } + var m2 = M2.prototype; + return m2.parse = function(t4) { + this.$d = function(t5) { + var e3 = t5.date, n2 = t5.utc; + if (null === e3) + return /* @__PURE__ */ new Date(NaN); + if (O.u(e3)) + return /* @__PURE__ */ new Date(); + if (e3 instanceof Date) + return new Date(e3); + if ("string" == typeof e3 && !/Z$/i.test(e3)) { + var r2 = e3.match($); + if (r2) { + var i3 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3); + return n2 ? new Date(Date.UTC(r2[1], i3, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i3, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2); + } + } + return new Date(e3); + }(t4), this.$x = t4.x || {}, this.init(); + }, m2.init = function() { + var t4 = this.$d; + this.$y = t4.getFullYear(), this.$M = t4.getMonth(), this.$D = t4.getDate(), this.$W = t4.getDay(), this.$H = t4.getHours(), this.$m = t4.getMinutes(), this.$s = t4.getSeconds(), this.$ms = t4.getMilliseconds(); + }, m2.$utils = function() { + return O; + }, m2.isValid = function() { + return !(this.$d.toString() === l); + }, m2.isSame = function(t4, e3) { + var n2 = w2(t4); + return this.startOf(e3) <= n2 && n2 <= this.endOf(e3); + }, m2.isAfter = function(t4, e3) { + return w2(t4) < this.startOf(e3); + }, m2.isBefore = function(t4, e3) { + return this.endOf(e3) < w2(t4); + }, m2.$g = function(t4, e3, n2) { + return O.u(t4) ? this[e3] : this.set(n2, t4); + }, m2.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m2.valueOf = function() { + return this.$d.getTime(); + }, m2.startOf = function(t4, e3) { + var n2 = this, r2 = !!O.u(e3) || e3, h2 = O.p(t4), l2 = function(t5, e4) { + var i3 = O.w(n2.$u ? Date.UTC(n2.$y, e4, t5) : new Date(n2.$y, e4, t5), n2); + return r2 ? i3 : i3.endOf(a); + }, $2 = function(t5, e4) { + return O.w(n2.toDate()[t5].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2); + }, y3 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : ""); + switch (h2) { + case c2: + return r2 ? l2(1, 0) : l2(31, 11); + case f2: + return r2 ? l2(1, M3) : l2(0, M3 + 1); + case o: + var g2 = this.$locale().weekStart || 0, D2 = (y3 < g2 ? y3 + 7 : y3) - g2; + return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3); + case a: + case d: + return $2(v2 + "Hours", 0); + case u: + return $2(v2 + "Minutes", 1); + case s: + return $2(v2 + "Seconds", 2); + case i2: + return $2(v2 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m2.endOf = function(t4) { + return this.startOf(t4, false); + }, m2.$set = function(t4, e3) { + var n2, o2 = O.p(t4), h2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = h2 + "Date", n2[d] = h2 + "Date", n2[f2] = h2 + "Month", n2[c2] = h2 + "FullYear", n2[u] = h2 + "Hours", n2[s] = h2 + "Minutes", n2[i2] = h2 + "Seconds", n2[r] = h2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e3 - this.$W) : e3; + if (o2 === f2 || o2 === c2) { + var y3 = this.clone().set(d, 1); + y3.$d[l2]($2), y3.init(), this.$d = y3.set(d, Math.min(this.$D, y3.daysInMonth())).$d; + } else + l2 && this.$d[l2]($2); + return this.init(), this; + }, m2.set = function(t4, e3) { + return this.clone().$set(t4, e3); + }, m2.get = function(t4) { + return this[O.p(t4)](); + }, m2.add = function(r2, h2) { + var d2, l2 = this; + r2 = Number(r2); + var $2 = O.p(h2), y3 = function(t4) { + var e3 = w2(l2); + return O.w(e3.date(e3.date() + Math.round(t4 * r2)), l2); + }; + if ($2 === f2) + return this.set(f2, this.$M + r2); + if ($2 === c2) + return this.set(c2, this.$y + r2); + if ($2 === a) + return y3(1); + if ($2 === o) + return y3(7); + var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i2] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3; + return O.w(m3, this); + }, m2.subtract = function(t4, e3) { + return this.add(-1 * t4, e3); + }, m2.format = function(t4) { + var e3 = this, n2 = this.$locale(); + if (!this.isValid()) + return n2.invalidDate || l; + var r2 = t4 || "YYYY-MM-DDTHH:mm:ssZ", i3 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, f3 = n2.months, h2 = function(t5, n3, i4, s3) { + return t5 && (t5[n3] || t5(e3, r2)) || i4[n3].slice(0, s3); + }, c3 = function(t5) { + return O.s(s2 % 12 || 12, t5, "0"); + }, d2 = n2.meridiem || function(t5, e4, n3) { + var r3 = t5 < 12 ? "AM" : "PM"; + return n3 ? r3.toLowerCase() : r3; + }, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h2(n2.monthsShort, a2, f3, 3), MMMM: h2(f3, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h2(n2.weekdaysMin, this.$W, o2, 2), ddd: h2(n2.weekdaysShort, this.$W, o2, 3), dddd: o2[this.$W], H: String(s2), HH: O.s(s2, 2, "0"), h: c3(1), hh: c3(2), a: d2(s2, u2, true), A: d2(s2, u2, false), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i3 }; + return r2.replace(y2, function(t5, e4) { + return e4 || $2[t5] || i3.replace(":", ""); + }); + }, m2.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m2.diff = function(r2, d2, l2) { + var $2, y3 = O.p(d2), M3 = w2(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3); + return g2 = ($2 = {}, $2[c2] = g2 / 12, $2[f2] = g2, $2[h] = g2 / 3, $2[o] = (v2 - m3) / 6048e5, $2[a] = (v2 - m3) / 864e5, $2[u] = v2 / n, $2[s] = v2 / e, $2[i2] = v2 / t, $2)[y3] || v2, l2 ? g2 : O.a(g2); + }, m2.daysInMonth = function() { + return this.endOf(f2).$D; + }, m2.$locale = function() { + return D[this.$L]; + }, m2.locale = function(t4, e3) { + if (!t4) + return this.$L; + var n2 = this.clone(), r2 = S(t4, e3, true); + return r2 && (n2.$L = r2), n2; + }, m2.clone = function() { + return O.w(this.$d, this); + }, m2.toDate = function() { + return new Date(this.valueOf()); + }, m2.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m2.toISOString = function() { + return this.$d.toISOString(); + }, m2.toString = function() { + return this.$d.toUTCString(); + }, M2; + }(), T = _2.prototype; + return w2.prototype = T, [["$ms", r], ["$s", i2], ["$m", s], ["$H", u], ["$W", a], ["$M", f2], ["$y", c2], ["$D", d]].forEach(function(t4) { + T[t4[1]] = function(e3) { + return this.$g(e3, t4[0], t4[1]); + }; + }), w2.extend = function(t4, e3) { + return t4.$i || (t4(e3, _2, w2), t4.$i = true), w2; + }, w2.locale = S, w2.isDayjs = p, w2.unix = function(t4) { + return w2(1e3 * t4); + }, w2.en = D[g], w2.Ls = D, w2.p = {}, w2; + }); + })(dayjs_min); + var dayjs_minExports = dayjs_min.exports; + const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports); + const LEVELS = { + trace: 0, + debug: 1, + info: 2, + warn: 3, + error: 4, + fatal: 5 + }; + const log$1 = { + trace: (..._args) => { + }, + debug: (..._args) => { + }, + info: (..._args) => { + }, + warn: (..._args) => { + }, + error: (..._args) => { + }, + fatal: (..._args) => { + } + }; + const setLogLevel$1 = function(level = "fatal") { + let numericLevel = LEVELS.fatal; + if (typeof level === "string") { + level = level.toLowerCase(); + if (level in LEVELS) { + numericLevel = LEVELS[level]; + } + } else if (typeof level === "number") { + numericLevel = level; + } + log$1.trace = () => { + }; + log$1.debug = () => { + }; + log$1.info = () => { + }; + log$1.warn = () => { + }; + log$1.error = () => { + }; + log$1.fatal = () => { + }; + if (numericLevel <= LEVELS.fatal) { + log$1.fatal = console.error ? console.error.bind(console, format$1("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format$1("FATAL")); + } + if (numericLevel <= LEVELS.error) { + log$1.error = console.error ? console.error.bind(console, format$1("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format$1("ERROR")); + } + if (numericLevel <= LEVELS.warn) { + log$1.warn = console.warn ? console.warn.bind(console, format$1("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format$1("WARN")); + } + if (numericLevel <= LEVELS.info) { + log$1.info = console.info ? console.info.bind(console, format$1("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format$1("INFO")); + } + if (numericLevel <= LEVELS.debug) { + log$1.debug = console.debug ? console.debug.bind(console, format$1("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format$1("DEBUG")); + } + if (numericLevel <= LEVELS.trace) { + log$1.trace = console.debug ? console.debug.bind(console, format$1("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format$1("TRACE")); + } + }; + const format$1 = (level) => { + const time2 = dayjs().format("ss.SSS"); + return `%c${time2} : ${level} : `; + }; + var dist = {}; + Object.defineProperty(dist, "__esModule", { value: true }); + var sanitizeUrl_1 = dist.sanitizeUrl = void 0; + var invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im; + var htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g; + var htmlCtrlEntityRegex = /&(newline|tab);/gi; + var ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim; + var urlSchemeRegex = /^.+(:|:)/gim; + var relativeFirstCharacters = [".", "/"]; + function isRelativeUrlWithoutProtocol(url) { + return relativeFirstCharacters.indexOf(url[0]) > -1; + } + function decodeHtmlCharacters(str2) { + return str2.replace(htmlEntitiesRegex, function(match, dec) { + return String.fromCharCode(dec); + }); + } + function sanitizeUrl(url) { + var sanitizedUrl = decodeHtmlCharacters(url || "").replace(htmlCtrlEntityRegex, "").replace(ctrlCharactersRegex, "").trim(); + if (!sanitizedUrl) { + return "about:blank"; + } + if (isRelativeUrlWithoutProtocol(sanitizedUrl)) { + return sanitizedUrl; + } + var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex); + if (!urlSchemeParseResults) { + return sanitizedUrl; + } + var urlScheme = urlSchemeParseResults[0]; + if (invalidProtocolRegex.test(urlScheme)) { + return "about:blank"; + } + return sanitizedUrl; + } + sanitizeUrl_1 = dist.sanitizeUrl = sanitizeUrl; + function ascending$1(a, b) { + return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + function descending$1(a, b) { + return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; + } + function bisector(f2) { + let compare1, compare2, delta; + if (f2.length !== 2) { + compare1 = ascending$1; + compare2 = (d, x2) => ascending$1(f2(d), x2); + delta = (d, x2) => f2(d) - x2; + } else { + compare1 = f2 === ascending$1 || f2 === descending$1 ? f2 : zero$1; + compare2 = f2; + delta = f2; + } + function left2(a, x2, lo = 0, hi = a.length) { + if (lo < hi) { + if (compare1(x2, x2) !== 0) + return hi; + do { + const mid = lo + hi >>> 1; + if (compare2(a[mid], x2) < 0) + lo = mid + 1; + else + hi = mid; + } while (lo < hi); + } + return lo; + } + function right2(a, x2, lo = 0, hi = a.length) { + if (lo < hi) { + if (compare1(x2, x2) !== 0) + return hi; + do { + const mid = lo + hi >>> 1; + if (compare2(a[mid], x2) <= 0) + lo = mid + 1; + else + hi = mid; + } while (lo < hi); + } + return lo; + } + function center2(a, x2, lo = 0, hi = a.length) { + const i2 = left2(a, x2, lo, hi - 1); + return i2 > lo && delta(a[i2 - 1], x2) > -delta(a[i2], x2) ? i2 - 1 : i2; + } + return { left: left2, center: center2, right: right2 }; + } + function zero$1() { + return 0; + } + function number$3(x2) { + return x2 === null ? NaN : +x2; + } + const ascendingBisect = bisector(ascending$1); + const bisectRight = ascendingBisect.right; + bisector(number$3).center; + const bisect = bisectRight; + class InternMap extends Map { + constructor(entries2, key = keyof) { + super(); + Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } }); + if (entries2 != null) + for (const [key2, value2] of entries2) + this.set(key2, value2); + } + get(key) { + return super.get(intern_get(this, key)); + } + has(key) { + return super.has(intern_get(this, key)); + } + set(key, value2) { + return super.set(intern_set(this, key), value2); + } + delete(key) { + return super.delete(intern_delete(this, key)); + } + } + function intern_get({ _intern, _key }, value2) { + const key = _key(value2); + return _intern.has(key) ? _intern.get(key) : value2; + } + function intern_set({ _intern, _key }, value2) { + const key = _key(value2); + if (_intern.has(key)) + return _intern.get(key); + _intern.set(key, value2); + return value2; + } + function intern_delete({ _intern, _key }, value2) { + const key = _key(value2); + if (_intern.has(key)) { + value2 = _intern.get(key); + _intern.delete(key); + } + return value2; + } + function keyof(value2) { + return value2 !== null && typeof value2 === "object" ? value2.valueOf() : value2; + } + var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2); + function ticks(start2, stop, count) { + var reverse, i2 = -1, n, ticks2, step; + stop = +stop, start2 = +start2, count = +count; + if (start2 === stop && count > 0) + return [start2]; + if (reverse = stop < start2) + n = start2, start2 = stop, stop = n; + if ((step = tickIncrement(start2, stop, count)) === 0 || !isFinite(step)) + return []; + if (step > 0) { + let r0 = Math.round(start2 / step), r1 = Math.round(stop / step); + if (r0 * step < start2) + ++r0; + if (r1 * step > stop) + --r1; + ticks2 = new Array(n = r1 - r0 + 1); + while (++i2 < n) + ticks2[i2] = (r0 + i2) * step; + } else { + step = -step; + let r0 = Math.round(start2 * step), r1 = Math.round(stop * step); + if (r0 / step < start2) + ++r0; + if (r1 / step > stop) + --r1; + ticks2 = new Array(n = r1 - r0 + 1); + while (++i2 < n) + ticks2[i2] = (r0 + i2) / step; + } + if (reverse) + ticks2.reverse(); + return ticks2; + } + function tickIncrement(start2, stop, count) { + var step = (stop - start2) / Math.max(0, count), power = Math.floor(Math.log(step) / Math.LN10), error = step / Math.pow(10, power); + return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); + } + function tickStep(start2, stop, count) { + var step0 = Math.abs(stop - start2) / Math.max(0, count), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error = step0 / step1; + if (error >= e10) + step1 *= 10; + else if (error >= e5) + step1 *= 5; + else if (error >= e2) + step1 *= 2; + return stop < start2 ? -step1 : step1; + } + function max$3(values2, valueof) { + let max2; + if (valueof === void 0) { + for (const value2 of values2) { + if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) { + max2 = value2; + } + } + } else { + let index2 = -1; + for (let value2 of values2) { + if ((value2 = valueof(value2, ++index2, values2)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) { + max2 = value2; + } + } + } + return max2; + } + function min$3(values2, valueof) { + let min2; + if (valueof === void 0) { + for (const value2 of values2) { + if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) { + min2 = value2; + } + } + } else { + let index2 = -1; + for (let value2 of values2) { + if ((value2 = valueof(value2, ++index2, values2)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) { + min2 = value2; + } + } + } + return min2; + } + function identity$5(x2) { + return x2; + } + var top = 1, right$1 = 2, bottom = 3, left$1 = 4, epsilon$3 = 1e-6; + function translateX(x2) { + return "translate(" + x2 + ",0)"; + } + function translateY(y2) { + return "translate(0," + y2 + ")"; + } + function number$2(scale) { + return (d) => +scale(d); + } + function center$1(scale, offset) { + offset = Math.max(0, scale.bandwidth() - offset * 2) / 2; + if (scale.round()) + offset = Math.round(offset); + return (d) => +scale(d) + offset; + } + function entering() { + return !this.__axis; + } + function axis(orient, scale) { + var tickArguments = [], tickValues = null, tickFormat2 = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient === top || orient === left$1 ? -1 : 1, x2 = orient === left$1 || orient === right$1 ? "x" : "y", transform = orient === top || orient === bottom ? translateX : translateY; + function axis2(context) { + var values2 = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain() : tickValues, format2 = tickFormat2 == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity$5 : tickFormat2, spacing = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale.range(), range0 = +range2[0] + offset, range1 = +range2[range2.length - 1] + offset, position2 = (scale.bandwidth ? center$1 : number$2)(scale.copy(), offset), selection2 = context.selection ? context.selection() : context, path2 = selection2.selectAll(".domain").data([null]), tick = selection2.selectAll(".tick").data(values2, scale).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line2 = tick.select("line"), text2 = tick.select("text"); + path2 = path2.merge(path2.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")); + tick = tick.merge(tickEnter); + line2 = line2.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x2 + "2", k * tickSizeInner)); + text2 = text2.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x2, k * spacing).attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); + if (context !== selection2) { + path2 = path2.transition(context); + tick = tick.transition(context); + line2 = line2.transition(context); + text2 = text2.transition(context); + tickExit = tickExit.transition(context).attr("opacity", epsilon$3).attr("transform", function(d) { + return isFinite(d = position2(d)) ? transform(d + offset) : this.getAttribute("transform"); + }); + tickEnter.attr("opacity", epsilon$3).attr("transform", function(d) { + var p = this.parentNode.__axis; + return transform((p && isFinite(p = p(d)) ? p : position2(d)) + offset); + }); + } + tickExit.remove(); + path2.attr("d", orient === left$1 || orient === right$1 ? tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1); + tick.attr("opacity", 1).attr("transform", function(d) { + return transform(position2(d) + offset); + }); + line2.attr(x2 + "2", k * tickSizeInner); + text2.attr(x2, k * spacing).text(format2); + selection2.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right$1 ? "start" : orient === left$1 ? "end" : "middle"); + selection2.each(function() { + this.__axis = position2; + }); + } + axis2.scale = function(_2) { + return arguments.length ? (scale = _2, axis2) : scale; + }; + axis2.ticks = function() { + return tickArguments = Array.from(arguments), axis2; + }; + axis2.tickArguments = function(_2) { + return arguments.length ? (tickArguments = _2 == null ? [] : Array.from(_2), axis2) : tickArguments.slice(); + }; + axis2.tickValues = function(_2) { + return arguments.length ? (tickValues = _2 == null ? null : Array.from(_2), axis2) : tickValues && tickValues.slice(); + }; + axis2.tickFormat = function(_2) { + return arguments.length ? (tickFormat2 = _2, axis2) : tickFormat2; + }; + axis2.tickSize = function(_2) { + return arguments.length ? (tickSizeInner = tickSizeOuter = +_2, axis2) : tickSizeInner; + }; + axis2.tickSizeInner = function(_2) { + return arguments.length ? (tickSizeInner = +_2, axis2) : tickSizeInner; + }; + axis2.tickSizeOuter = function(_2) { + return arguments.length ? (tickSizeOuter = +_2, axis2) : tickSizeOuter; + }; + axis2.tickPadding = function(_2) { + return arguments.length ? (tickPadding = +_2, axis2) : tickPadding; + }; + axis2.offset = function(_2) { + return arguments.length ? (offset = +_2, axis2) : offset; + }; + return axis2; + } + function axisTop(scale) { + return axis(top, scale); + } + function axisBottom(scale) { + return axis(bottom, scale); + } + var noop$2 = { value: () => { + } }; + function dispatch() { + for (var i2 = 0, n = arguments.length, _2 = {}, t; i2 < n; ++i2) { + if (!(t = arguments[i2] + "") || t in _2 || /[\s.]/.test(t)) + throw new Error("illegal type: " + t); + _2[t] = []; + } + return new Dispatch(_2); + } + function Dispatch(_2) { + this._ = _2; + } + function parseTypenames$1(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name2 = "", i2 = t.indexOf("."); + if (i2 >= 0) + name2 = t.slice(i2 + 1), t = t.slice(0, i2); + if (t && !types.hasOwnProperty(t)) + throw new Error("unknown type: " + t); + return { type: t, name: name2 }; + }); + } + Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _2 = this._, T = parseTypenames$1(typename + "", _2), t, i2 = -1, n = T.length; + if (arguments.length < 2) { + while (++i2 < n) + if ((t = (typename = T[i2]).type) && (t = get$3(_2[t], typename.name))) + return t; + return; + } + if (callback != null && typeof callback !== "function") + throw new Error("invalid callback: " + callback); + while (++i2 < n) { + if (t = (typename = T[i2]).type) + _2[t] = set$3(_2[t], typename.name, callback); + else if (callback == null) + for (t in _2) + _2[t] = set$3(_2[t], typename.name, null); + } + return this; + }, + copy: function() { + var copy2 = {}, _2 = this._; + for (var t in _2) + copy2[t] = _2[t].slice(); + return new Dispatch(copy2); + }, + call: function(type2, that) { + if ((n = arguments.length - 2) > 0) + for (var args = new Array(n), i2 = 0, n, t; i2 < n; ++i2) + args[i2] = arguments[i2 + 2]; + if (!this._.hasOwnProperty(type2)) + throw new Error("unknown type: " + type2); + for (t = this._[type2], i2 = 0, n = t.length; i2 < n; ++i2) + t[i2].value.apply(that, args); + }, + apply: function(type2, that, args) { + if (!this._.hasOwnProperty(type2)) + throw new Error("unknown type: " + type2); + for (var t = this._[type2], i2 = 0, n = t.length; i2 < n; ++i2) + t[i2].value.apply(that, args); + } + }; + function get$3(type2, name2) { + for (var i2 = 0, n = type2.length, c2; i2 < n; ++i2) { + if ((c2 = type2[i2]).name === name2) { + return c2.value; + } + } + } + function set$3(type2, name2, callback) { + for (var i2 = 0, n = type2.length; i2 < n; ++i2) { + if (type2[i2].name === name2) { + type2[i2] = noop$2, type2 = type2.slice(0, i2).concat(type2.slice(i2 + 1)); + break; + } + } + if (callback != null) + type2.push({ name: name2, value: callback }); + return type2; + } + var xhtml = "http://www.w3.org/1999/xhtml"; + const namespaces$1 = { + svg: "http://www.w3.org/2000/svg", + xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" + }; + function namespace(name2) { + var prefix = name2 += "", i2 = prefix.indexOf(":"); + if (i2 >= 0 && (prefix = name2.slice(0, i2)) !== "xmlns") + name2 = name2.slice(i2 + 1); + return namespaces$1.hasOwnProperty(prefix) ? { space: namespaces$1[prefix], local: name2 } : name2; + } + function creatorInherit(name2) { + return function() { + var document2 = this.ownerDocument, uri = this.namespaceURI; + return uri === xhtml && document2.documentElement.namespaceURI === xhtml ? document2.createElement(name2) : document2.createElementNS(uri, name2); + }; + } + function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; + } + function creator(name2) { + var fullname = namespace(name2); + return (fullname.local ? creatorFixed : creatorInherit)(fullname); + } + function none() { + } + function selector(selector2) { + return selector2 == null ? none : function() { + return this.querySelector(selector2); + }; + } + function selection_select(select) { + if (typeof select !== "function") + select = selector(select); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i2 = 0; i2 < n; ++i2) { + if ((node2 = group[i2]) && (subnode = select.call(node2, node2.__data__, i2, group))) { + if ("__data__" in node2) + subnode.__data__ = node2.__data__; + subgroup[i2] = subnode; + } + } + } + return new Selection$1(subgroups, this._parents); + } + function array$1(x2) { + return x2 == null ? [] : Array.isArray(x2) ? x2 : Array.from(x2); + } + function empty() { + return []; + } + function selectorAll(selector2) { + return selector2 == null ? empty : function() { + return this.querySelectorAll(selector2); + }; + } + function arrayAll(select) { + return function() { + return array$1(select.apply(this, arguments)); + }; + } + function selection_selectAll(select) { + if (typeof select === "function") + select = arrayAll(select); + else + select = selectorAll(select); + for (var groups = this._groups, m = groups.length, subgroups = [], parents2 = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i2 = 0; i2 < n; ++i2) { + if (node2 = group[i2]) { + subgroups.push(select.call(node2, node2.__data__, i2, group)); + parents2.push(node2); + } + } + } + return new Selection$1(subgroups, parents2); + } + function matcher(selector2) { + return function() { + return this.matches(selector2); + }; + } + function childMatcher(selector2) { + return function(node2) { + return node2.matches(selector2); + }; + } + var find$3 = Array.prototype.find; + function childFind(match) { + return function() { + return find$3.call(this.children, match); + }; + } + function childFirst() { + return this.firstElementChild; + } + function selection_selectChild(match) { + return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match))); + } + var filter$1 = Array.prototype.filter; + function children() { + return Array.from(this.children); + } + function childrenFilter(match) { + return function() { + return filter$1.call(this.children, match); + }; + } + function selection_selectChildren(match) { + return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match))); + } + function selection_filter(match) { + if (typeof match !== "function") + match = matcher(match); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i2 = 0; i2 < n; ++i2) { + if ((node2 = group[i2]) && match.call(node2, node2.__data__, i2, group)) { + subgroup.push(node2); + } + } + } + return new Selection$1(subgroups, this._parents); + } + function sparse(update2) { + return new Array(update2.length); + } + function selection_enter() { + return new Selection$1(this._enter || this._groups.map(sparse), this._parents); + } + function EnterNode(parent, datum2) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum2; + } + EnterNode.prototype = { + constructor: EnterNode, + appendChild: function(child) { + return this._parent.insertBefore(child, this._next); + }, + insertBefore: function(child, next2) { + return this._parent.insertBefore(child, next2); + }, + querySelector: function(selector2) { + return this._parent.querySelector(selector2); + }, + querySelectorAll: function(selector2) { + return this._parent.querySelectorAll(selector2); + } + }; + function constant$5(x2) { + return function() { + return x2; + }; + } + function bindIndex(parent, group, enter2, update2, exit2, data) { + var i2 = 0, node2, groupLength = group.length, dataLength = data.length; + for (; i2 < dataLength; ++i2) { + if (node2 = group[i2]) { + node2.__data__ = data[i2]; + update2[i2] = node2; + } else { + enter2[i2] = new EnterNode(parent, data[i2]); + } + } + for (; i2 < groupLength; ++i2) { + if (node2 = group[i2]) { + exit2[i2] = node2; + } + } + } + function bindKey(parent, group, enter2, update2, exit2, data, key) { + var i2, node2, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; + for (i2 = 0; i2 < groupLength; ++i2) { + if (node2 = group[i2]) { + keyValues[i2] = keyValue = key.call(node2, node2.__data__, i2, group) + ""; + if (nodeByKeyValue.has(keyValue)) { + exit2[i2] = node2; + } else { + nodeByKeyValue.set(keyValue, node2); + } + } + } + for (i2 = 0; i2 < dataLength; ++i2) { + keyValue = key.call(parent, data[i2], i2, data) + ""; + if (node2 = nodeByKeyValue.get(keyValue)) { + update2[i2] = node2; + node2.__data__ = data[i2]; + nodeByKeyValue.delete(keyValue); + } else { + enter2[i2] = new EnterNode(parent, data[i2]); + } + } + for (i2 = 0; i2 < groupLength; ++i2) { + if ((node2 = group[i2]) && nodeByKeyValue.get(keyValues[i2]) === node2) { + exit2[i2] = node2; + } + } + } + function datum(node2) { + return node2.__data__; + } + function selection_data(value2, key) { + if (!arguments.length) + return Array.from(this, datum); + var bind = key ? bindKey : bindIndex, parents2 = this._parents, groups = this._groups; + if (typeof value2 !== "function") + value2 = constant$5(value2); + for (var m = groups.length, update2 = new Array(m), enter2 = new Array(m), exit2 = new Array(m), j = 0; j < m; ++j) { + var parent = parents2[j], group = groups[j], groupLength = group.length, data = arraylike(value2.call(parent, parent && parent.__data__, j, parents2)), dataLength = data.length, enterGroup = enter2[j] = new Array(dataLength), updateGroup = update2[j] = new Array(dataLength), exitGroup = exit2[j] = new Array(groupLength); + bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); + for (var i0 = 0, i1 = 0, previous2, next2; i0 < dataLength; ++i0) { + if (previous2 = enterGroup[i0]) { + if (i0 >= i1) + i1 = i0 + 1; + while (!(next2 = updateGroup[i1]) && ++i1 < dataLength) + ; + previous2._next = next2 || null; + } + } + } + update2 = new Selection$1(update2, parents2); + update2._enter = enter2; + update2._exit = exit2; + return update2; + } + function arraylike(data) { + return typeof data === "object" && "length" in data ? data : Array.from(data); + } + function selection_exit() { + return new Selection$1(this._exit || this._groups.map(sparse), this._parents); + } + function selection_join(onenter, onupdate, onexit) { + var enter2 = this.enter(), update2 = this, exit2 = this.exit(); + if (typeof onenter === "function") { + enter2 = onenter(enter2); + if (enter2) + enter2 = enter2.selection(); + } else { + enter2 = enter2.append(onenter + ""); + } + if (onupdate != null) { + update2 = onupdate(update2); + if (update2) + update2 = update2.selection(); + } + if (onexit == null) + exit2.remove(); + else + onexit(exit2); + return enter2 && update2 ? enter2.merge(update2).order() : update2; + } + function selection_merge(context) { + var selection2 = context.selection ? context.selection() : context; + for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge2 = merges[j] = new Array(n), node2, i2 = 0; i2 < n; ++i2) { + if (node2 = group0[i2] || group1[i2]) { + merge2[i2] = node2; + } + } + } + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + return new Selection$1(merges, this._parents); + } + function selection_order() { + for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) { + for (var group = groups[j], i2 = group.length - 1, next2 = group[i2], node2; --i2 >= 0; ) { + if (node2 = group[i2]) { + if (next2 && node2.compareDocumentPosition(next2) ^ 4) + next2.parentNode.insertBefore(node2, next2); + next2 = node2; + } + } + } + return this; + } + function selection_sort(compare) { + if (!compare) + compare = ascending; + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node2, i2 = 0; i2 < n; ++i2) { + if (node2 = group[i2]) { + sortgroup[i2] = node2; + } + } + sortgroup.sort(compareNode); + } + return new Selection$1(sortgroups, this._parents).order(); + } + function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + function selection_call() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; + } + function selection_nodes() { + return Array.from(this); + } + function selection_node() { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i2 = 0, n = group.length; i2 < n; ++i2) { + var node2 = group[i2]; + if (node2) + return node2; + } + } + return null; + } + function selection_size() { + let size2 = 0; + for (const node2 of this) + ++size2; + return size2; + } + function selection_empty() { + return !this.node(); + } + function selection_each(callback) { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i2 = 0, n = group.length, node2; i2 < n; ++i2) { + if (node2 = group[i2]) + callback.call(node2, node2.__data__, i2, group); + } + } + return this; + } + function attrRemove$1(name2) { + return function() { + this.removeAttribute(name2); + }; + } + function attrRemoveNS$1(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; + } + function attrConstant$1(name2, value2) { + return function() { + this.setAttribute(name2, value2); + }; + } + function attrConstantNS$1(fullname, value2) { + return function() { + this.setAttributeNS(fullname.space, fullname.local, value2); + }; + } + function attrFunction$1(name2, value2) { + return function() { + var v = value2.apply(this, arguments); + if (v == null) + this.removeAttribute(name2); + else + this.setAttribute(name2, v); + }; + } + function attrFunctionNS$1(fullname, value2) { + return function() { + var v = value2.apply(this, arguments); + if (v == null) + this.removeAttributeNS(fullname.space, fullname.local); + else + this.setAttributeNS(fullname.space, fullname.local, v); + }; + } + function selection_attr(name2, value2) { + var fullname = namespace(name2); + if (arguments.length < 2) { + var node2 = this.node(); + return fullname.local ? node2.getAttributeNS(fullname.space, fullname.local) : node2.getAttribute(fullname); + } + return this.each((value2 == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value2 === "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value2)); + } + function defaultView(node2) { + return node2.ownerDocument && node2.ownerDocument.defaultView || node2.document && node2 || node2.defaultView; + } + function styleRemove$1(name2) { + return function() { + this.style.removeProperty(name2); + }; + } + function styleConstant$1(name2, value2, priority) { + return function() { + this.style.setProperty(name2, value2, priority); + }; + } + function styleFunction$1(name2, value2, priority) { + return function() { + var v = value2.apply(this, arguments); + if (v == null) + this.style.removeProperty(name2); + else + this.style.setProperty(name2, v, priority); + }; + } + function selection_style(name2, value2, priority) { + return arguments.length > 1 ? this.each((value2 == null ? styleRemove$1 : typeof value2 === "function" ? styleFunction$1 : styleConstant$1)(name2, value2, priority == null ? "" : priority)) : styleValue(this.node(), name2); + } + function styleValue(node2, name2) { + return node2.style.getPropertyValue(name2) || defaultView(node2).getComputedStyle(node2, null).getPropertyValue(name2); + } + function propertyRemove(name2) { + return function() { + delete this[name2]; + }; + } + function propertyConstant(name2, value2) { + return function() { + this[name2] = value2; + }; + } + function propertyFunction(name2, value2) { + return function() { + var v = value2.apply(this, arguments); + if (v == null) + delete this[name2]; + else + this[name2] = v; + }; + } + function selection_property(name2, value2) { + return arguments.length > 1 ? this.each((value2 == null ? propertyRemove : typeof value2 === "function" ? propertyFunction : propertyConstant)(name2, value2)) : this.node()[name2]; + } + function classArray(string2) { + return string2.trim().split(/^|\s+/); + } + function classList(node2) { + return node2.classList || new ClassList(node2); + } + function ClassList(node2) { + this._node = node2; + this._names = classArray(node2.getAttribute("class") || ""); + } + ClassList.prototype = { + add: function(name2) { + var i2 = this._names.indexOf(name2); + if (i2 < 0) { + this._names.push(name2); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + remove: function(name2) { + var i2 = this._names.indexOf(name2); + if (i2 >= 0) { + this._names.splice(i2, 1); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + contains: function(name2) { + return this._names.indexOf(name2) >= 0; + } + }; + function classedAdd(node2, names) { + var list2 = classList(node2), i2 = -1, n = names.length; + while (++i2 < n) + list2.add(names[i2]); + } + function classedRemove(node2, names) { + var list2 = classList(node2), i2 = -1, n = names.length; + while (++i2 < n) + list2.remove(names[i2]); + } + function classedTrue(names) { + return function() { + classedAdd(this, names); + }; + } + function classedFalse(names) { + return function() { + classedRemove(this, names); + }; + } + function classedFunction(names, value2) { + return function() { + (value2.apply(this, arguments) ? classedAdd : classedRemove)(this, names); + }; + } + function selection_classed(name2, value2) { + var names = classArray(name2 + ""); + if (arguments.length < 2) { + var list2 = classList(this.node()), i2 = -1, n = names.length; + while (++i2 < n) + if (!list2.contains(names[i2])) + return false; + return true; + } + return this.each((typeof value2 === "function" ? classedFunction : value2 ? classedTrue : classedFalse)(names, value2)); + } + function textRemove() { + this.textContent = ""; + } + function textConstant$1(value2) { + return function() { + this.textContent = value2; + }; + } + function textFunction$1(value2) { + return function() { + var v = value2.apply(this, arguments); + this.textContent = v == null ? "" : v; + }; + } + function selection_text(value2) { + return arguments.length ? this.each(value2 == null ? textRemove : (typeof value2 === "function" ? textFunction$1 : textConstant$1)(value2)) : this.node().textContent; + } + function htmlRemove() { + this.innerHTML = ""; + } + function htmlConstant(value2) { + return function() { + this.innerHTML = value2; + }; + } + function htmlFunction(value2) { + return function() { + var v = value2.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + }; + } + function selection_html(value2) { + return arguments.length ? this.each(value2 == null ? htmlRemove : (typeof value2 === "function" ? htmlFunction : htmlConstant)(value2)) : this.node().innerHTML; + } + function raise() { + if (this.nextSibling) + this.parentNode.appendChild(this); + } + function selection_raise() { + return this.each(raise); + } + function lower() { + if (this.previousSibling) + this.parentNode.insertBefore(this, this.parentNode.firstChild); + } + function selection_lower() { + return this.each(lower); + } + function selection_append(name2) { + var create2 = typeof name2 === "function" ? name2 : creator(name2); + return this.select(function() { + return this.appendChild(create2.apply(this, arguments)); + }); + } + function constantNull() { + return null; + } + function selection_insert(name2, before) { + var create2 = typeof name2 === "function" ? name2 : creator(name2), select = before == null ? constantNull : typeof before === "function" ? before : selector(before); + return this.select(function() { + return this.insertBefore(create2.apply(this, arguments), select.apply(this, arguments) || null); + }); + } + function remove() { + var parent = this.parentNode; + if (parent) + parent.removeChild(this); + } + function selection_remove() { + return this.each(remove); + } + function selection_cloneShallow() { + var clone2 = this.cloneNode(false), parent = this.parentNode; + return parent ? parent.insertBefore(clone2, this.nextSibling) : clone2; + } + function selection_cloneDeep() { + var clone2 = this.cloneNode(true), parent = this.parentNode; + return parent ? parent.insertBefore(clone2, this.nextSibling) : clone2; + } + function selection_clone(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); + } + function selection_datum(value2) { + return arguments.length ? this.property("__data__", value2) : this.node().__data__; + } + function contextListener(listener) { + return function(event) { + listener.call(this, event, this.__data__); + }; + } + function parseTypenames(typenames) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name2 = "", i2 = t.indexOf("."); + if (i2 >= 0) + name2 = t.slice(i2 + 1), t = t.slice(0, i2); + return { type: t, name: name2 }; + }); + } + function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) + return; + for (var j = 0, i2 = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.options); + } else { + on[++i2] = o; + } + } + if (++i2) + on.length = i2; + else + delete this.__on; + }; + } + function onAdd(typename, value2, options2) { + return function() { + var on = this.__on, o, listener = contextListener(value2); + if (on) + for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.options); + this.addEventListener(o.type, o.listener = listener, o.options = options2); + o.value = value2; + return; + } + } + this.addEventListener(typename.type, listener, options2); + o = { type: typename.type, name: typename.name, value: value2, listener, options: options2 }; + if (!on) + this.__on = [o]; + else + on.push(o); + }; + } + function selection_on(typename, value2, options2) { + var typenames = parseTypenames(typename + ""), i2, n = typenames.length, t; + if (arguments.length < 2) { + var on = this.node().__on; + if (on) + for (var j = 0, m = on.length, o; j < m; ++j) { + for (i2 = 0, o = on[j]; i2 < n; ++i2) { + if ((t = typenames[i2]).type === o.type && t.name === o.name) { + return o.value; + } + } + } + return; + } + on = value2 ? onAdd : onRemove; + for (i2 = 0; i2 < n; ++i2) + this.each(on(typenames[i2], value2, options2)); + return this; + } + function dispatchEvent(node2, type2, params) { + var window2 = defaultView(node2), event = window2.CustomEvent; + if (typeof event === "function") { + event = new event(type2, params); + } else { + event = window2.document.createEvent("Event"); + if (params) + event.initEvent(type2, params.bubbles, params.cancelable), event.detail = params.detail; + else + event.initEvent(type2, false, false); + } + node2.dispatchEvent(event); + } + function dispatchConstant(type2, params) { + return function() { + return dispatchEvent(this, type2, params); + }; + } + function dispatchFunction(type2, params) { + return function() { + return dispatchEvent(this, type2, params.apply(this, arguments)); + }; + } + function selection_dispatch(type2, params) { + return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type2, params)); + } + function* selection_iterator() { + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i2 = 0, n = group.length, node2; i2 < n; ++i2) { + if (node2 = group[i2]) + yield node2; + } + } + } + var root$2 = [null]; + function Selection$1(groups, parents2) { + this._groups = groups; + this._parents = parents2; + } + function selection() { + return new Selection$1([[document.documentElement]], root$2); + } + function selection_selection() { + return this; + } + Selection$1.prototype = selection.prototype = { + constructor: Selection$1, + select: selection_select, + selectAll: selection_selectAll, + selectChild: selection_selectChild, + selectChildren: selection_selectChildren, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + selection: selection_selection, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch, + [Symbol.iterator]: selection_iterator + }; + function d3select(selector2) { + return typeof selector2 === "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root$2); + } + function selectAll(selector2) { + return typeof selector2 === "string" ? new Selection$1([document.querySelectorAll(selector2)], [document.documentElement]) : new Selection$1([array$1(selector2)], root$2); + } + function define2(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; + } + function extend$1(parent, definition2) { + var prototype = Object.create(parent.prototype); + for (var key in definition2) + prototype[key] = definition2[key]; + return prototype; + } + function Color$2() { + } + var darker = 0.7; + var brighter = 1 / darker; + var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`); + var named = { + aliceblue: 15792383, + antiquewhite: 16444375, + aqua: 65535, + aquamarine: 8388564, + azure: 15794175, + beige: 16119260, + bisque: 16770244, + black: 0, + blanchedalmond: 16772045, + blue: 255, + blueviolet: 9055202, + brown: 10824234, + burlywood: 14596231, + cadetblue: 6266528, + chartreuse: 8388352, + chocolate: 13789470, + coral: 16744272, + cornflowerblue: 6591981, + cornsilk: 16775388, + crimson: 14423100, + cyan: 65535, + darkblue: 139, + darkcyan: 35723, + darkgoldenrod: 12092939, + darkgray: 11119017, + darkgreen: 25600, + darkgrey: 11119017, + darkkhaki: 12433259, + darkmagenta: 9109643, + darkolivegreen: 5597999, + darkorange: 16747520, + darkorchid: 10040012, + darkred: 9109504, + darksalmon: 15308410, + darkseagreen: 9419919, + darkslateblue: 4734347, + darkslategray: 3100495, + darkslategrey: 3100495, + darkturquoise: 52945, + darkviolet: 9699539, + deeppink: 16716947, + deepskyblue: 49151, + dimgray: 6908265, + dimgrey: 6908265, + dodgerblue: 2003199, + firebrick: 11674146, + floralwhite: 16775920, + forestgreen: 2263842, + fuchsia: 16711935, + gainsboro: 14474460, + ghostwhite: 16316671, + gold: 16766720, + goldenrod: 14329120, + gray: 8421504, + green: 32768, + greenyellow: 11403055, + grey: 8421504, + honeydew: 15794160, + hotpink: 16738740, + indianred: 13458524, + indigo: 4915330, + ivory: 16777200, + khaki: 15787660, + lavender: 15132410, + lavenderblush: 16773365, + lawngreen: 8190976, + lemonchiffon: 16775885, + lightblue: 11393254, + lightcoral: 15761536, + lightcyan: 14745599, + lightgoldenrodyellow: 16448210, + lightgray: 13882323, + lightgreen: 9498256, + lightgrey: 13882323, + lightpink: 16758465, + lightsalmon: 16752762, + lightseagreen: 2142890, + lightskyblue: 8900346, + lightslategray: 7833753, + lightslategrey: 7833753, + lightsteelblue: 11584734, + lightyellow: 16777184, + lime: 65280, + limegreen: 3329330, + linen: 16445670, + magenta: 16711935, + maroon: 8388608, + mediumaquamarine: 6737322, + mediumblue: 205, + mediumorchid: 12211667, + mediumpurple: 9662683, + mediumseagreen: 3978097, + mediumslateblue: 8087790, + mediumspringgreen: 64154, + mediumturquoise: 4772300, + mediumvioletred: 13047173, + midnightblue: 1644912, + mintcream: 16121850, + mistyrose: 16770273, + moccasin: 16770229, + navajowhite: 16768685, + navy: 128, + oldlace: 16643558, + olive: 8421376, + olivedrab: 7048739, + orange: 16753920, + orangered: 16729344, + orchid: 14315734, + palegoldenrod: 15657130, + palegreen: 10025880, + paleturquoise: 11529966, + palevioletred: 14381203, + papayawhip: 16773077, + peachpuff: 16767673, + peru: 13468991, + pink: 16761035, + plum: 14524637, + powderblue: 11591910, + purple: 8388736, + rebeccapurple: 6697881, + red: 16711680, + rosybrown: 12357519, + royalblue: 4286945, + saddlebrown: 9127187, + salmon: 16416882, + sandybrown: 16032864, + seagreen: 3050327, + seashell: 16774638, + sienna: 10506797, + silver: 12632256, + skyblue: 8900331, + slateblue: 6970061, + slategray: 7372944, + slategrey: 7372944, + snow: 16775930, + springgreen: 65407, + steelblue: 4620980, + tan: 13808780, + teal: 32896, + thistle: 14204888, + tomato: 16737095, + turquoise: 4251856, + violet: 15631086, + wheat: 16113331, + white: 16777215, + whitesmoke: 16119285, + yellow: 16776960, + yellowgreen: 10145074 + }; + define2(Color$2, color, { + copy(channels2) { + return Object.assign(new this.constructor(), this, channels2); + }, + displayable() { + return this.rgb().displayable(); + }, + hex: color_formatHex, + // Deprecated! Use color.formatHex. + formatHex: color_formatHex, + formatHex8: color_formatHex8, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb + }); + function color_formatHex() { + return this.rgb().formatHex(); + } + function color_formatHex8() { + return this.rgb().formatHex8(); + } + function color_formatHsl() { + return hslConvert(this).formatHsl(); + } + function color_formatRgb() { + return this.rgb().formatRgb(); + } + function color(format2) { + var m, l; + format2 = (format2 + "").trim().toLowerCase(); + return (m = reHex.exec(format2)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba$2(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba$2(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format2)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format2)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format2)) ? rgba$2(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format2)) ? rgba$2(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format2) ? rgbn(named[format2]) : format2 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; + } + function rgbn(n) { + return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1); + } + function rgba$2(r, g, b, a) { + if (a <= 0) + r = g = b = NaN; + return new Rgb(r, g, b, a); + } + function rgbConvert(o) { + if (!(o instanceof Color$2)) + o = color(o); + if (!o) + return new Rgb(); + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); + } + function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); + } + function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; + } + define2(Rgb, rgb, extend$1(Color$2, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb() { + return this; + }, + clamp() { + return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity)); + }, + displayable() { + return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1); + }, + hex: rgb_formatHex, + // Deprecated! Use color.formatHex. + formatHex: rgb_formatHex, + formatHex8: rgb_formatHex8, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb + })); + function rgb_formatHex() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`; + } + function rgb_formatHex8() { + return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`; + } + function rgb_formatRgb() { + const a = clampa(this.opacity); + return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`; + } + function clampa(opacity) { + return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity)); + } + function clampi(value2) { + return Math.max(0, Math.min(255, Math.round(value2) || 0)); + } + function hex(value2) { + value2 = clampi(value2); + return (value2 < 16 ? "0" : "") + value2.toString(16); + } + function hsla(h, s, l, a) { + if (a <= 0) + h = s = l = NaN; + else if (l <= 0 || l >= 1) + h = s = NaN; + else if (s <= 0) + h = NaN; + return new Hsl(h, s, l, a); + } + function hslConvert(o) { + if (o instanceof Hsl) + return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color$2)) + o = color(o); + if (!o) + return new Hsl(); + if (o instanceof Hsl) + return o; + o = o.rgb(); + var r = o.r / 255, g = o.g / 255, b = o.b / 255, min2 = Math.min(r, g, b), max2 = Math.max(r, g, b), h = NaN, s = max2 - min2, l = (max2 + min2) / 2; + if (s) { + if (r === max2) + h = (g - b) / s + (g < b) * 6; + else if (g === max2) + h = (b - r) / s + 2; + else + h = (r - g) / s + 4; + s /= l < 0.5 ? max2 + min2 : 2 - max2 - min2; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); + } + function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); + } + function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; + } + define2(Hsl, hsl, extend$1(Color$2, { + brighter(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb() { + var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + this.opacity + ); + }, + clamp() { + return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity)); + }, + displayable() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1); + }, + formatHsl() { + const a = clampa(this.opacity); + return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`; + } + })); + function clamph(value2) { + value2 = (value2 || 0) % 360; + return value2 < 0 ? value2 + 360 : value2; + } + function clampt(value2) { + return Math.max(0, Math.min(1, value2 || 0)); + } + function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; + } + const radians = Math.PI / 180; + const degrees$1 = 180 / Math.PI; + const K = 18, Xn = 0.96422, Yn = 1, Zn = 0.82521, t0$1 = 4 / 29, t1$1 = 6 / 29, t2 = 3 * t1$1 * t1$1, t3 = t1$1 * t1$1 * t1$1; + function labConvert(o) { + if (o instanceof Lab) + return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) + return hcl2lab(o); + if (!(o instanceof Rgb)) + o = rgbConvert(o); + var r = rgb2lrgb(o.r), g = rgb2lrgb(o.g), b = rgb2lrgb(o.b), y2 = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x2, z; + if (r === g && g === b) + x2 = z = y2; + else { + x2 = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y2 - 16, 500 * (x2 - y2), 200 * (y2 - z), o.opacity); + } + function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); + } + function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; + } + define2(Lab, lab, extend$1(Color$2, { + brighter(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb() { + var y2 = (this.l + 16) / 116, x2 = isNaN(this.a) ? y2 : y2 + this.a / 500, z = isNaN(this.b) ? y2 : y2 - this.b / 200; + x2 = Xn * lab2xyz(x2); + y2 = Yn * lab2xyz(y2); + z = Zn * lab2xyz(z); + return new Rgb( + lrgb2rgb(3.1338561 * x2 - 1.6168667 * y2 - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x2 + 1.9161415 * y2 + 0.033454 * z), + lrgb2rgb(0.0719453 * x2 - 0.2289914 * y2 + 1.4052427 * z), + this.opacity + ); + } + })); + function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0$1; + } + function lab2xyz(t) { + return t > t1$1 ? t * t * t : t2 * (t - t0$1); + } + function lrgb2rgb(x2) { + return 255 * (x2 <= 31308e-7 ? 12.92 * x2 : 1.055 * Math.pow(x2, 1 / 2.4) - 0.055); + } + function rgb2lrgb(x2) { + return (x2 /= 255) <= 0.04045 ? x2 / 12.92 : Math.pow((x2 + 0.055) / 1.055, 2.4); + } + function hclConvert(o) { + if (o instanceof Hcl) + return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) + o = labConvert(o); + if (o.a === 0 && o.b === 0) + return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * degrees$1; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); + } + function hcl$1(h, c2, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c2, l, opacity == null ? 1 : opacity); + } + function Hcl(h, c2, l, opacity) { + this.h = +h; + this.c = +c2; + this.l = +l; + this.opacity = +opacity; + } + function hcl2lab(o) { + if (isNaN(o.h)) + return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * radians; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + define2(Hcl, hcl$1, extend$1(Color$2, { + brighter(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb() { + return hcl2lab(this).rgb(); + } + })); + const constant$4 = (x2) => () => x2; + function linear$1(a, d) { + return function(t) { + return a + t * d; + }; + } + function exponential(a, b, y2) { + return a = Math.pow(a, y2), b = Math.pow(b, y2) - a, y2 = 1 / y2, function(t) { + return Math.pow(a + t * b, y2); + }; + } + function hue(a, b) { + var d = b - a; + return d ? linear$1(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant$4(isNaN(a) ? b : a); + } + function gamma(y2) { + return (y2 = +y2) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y2) : constant$4(isNaN(a) ? b : a); + }; + } + function nogamma(a, b) { + var d = b - a; + return d ? linear$1(a, d) : constant$4(isNaN(a) ? b : a); + } + const interpolateRgb = function rgbGamma(y2) { + var color2 = gamma(y2); + function rgb$1(start2, end2) { + var r = color2((start2 = rgb(start2)).r, (end2 = rgb(end2)).r), g = color2(start2.g, end2.g), b = color2(start2.b, end2.b), opacity = nogamma(start2.opacity, end2.opacity); + return function(t) { + start2.r = r(t); + start2.g = g(t); + start2.b = b(t); + start2.opacity = opacity(t); + return start2 + ""; + }; + } + rgb$1.gamma = rgbGamma; + return rgb$1; + }(1); + function numberArray(a, b) { + if (!b) + b = []; + var n = a ? Math.min(b.length, a.length) : 0, c2 = b.slice(), i2; + return function(t) { + for (i2 = 0; i2 < n; ++i2) + c2[i2] = a[i2] * (1 - t) + b[i2] * t; + return c2; + }; + } + function isNumberArray(x2) { + return ArrayBuffer.isView(x2) && !(x2 instanceof DataView); + } + function genericArray(a, b) { + var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x2 = new Array(na), c2 = new Array(nb), i2; + for (i2 = 0; i2 < na; ++i2) + x2[i2] = interpolate$1(a[i2], b[i2]); + for (; i2 < nb; ++i2) + c2[i2] = b[i2]; + return function(t) { + for (i2 = 0; i2 < na; ++i2) + c2[i2] = x2[i2](t); + return c2; + }; + } + function date$1(a, b) { + var d = /* @__PURE__ */ new Date(); + return a = +a, b = +b, function(t) { + return d.setTime(a * (1 - t) + b * t), d; + }; + } + function interpolateNumber(a, b) { + return a = +a, b = +b, function(t) { + return a * (1 - t) + b * t; + }; + } + function object(a, b) { + var i2 = {}, c2 = {}, k; + if (a === null || typeof a !== "object") + a = {}; + if (b === null || typeof b !== "object") + b = {}; + for (k in b) { + if (k in a) { + i2[k] = interpolate$1(a[k], b[k]); + } else { + c2[k] = b[k]; + } + } + return function(t) { + for (k in i2) + c2[k] = i2[k](t); + return c2; + }; + } + var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g"); + function zero(b) { + return function() { + return b; + }; + } + function one$1(b) { + return function(t) { + return b(t) + ""; + }; + } + function interpolateString(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, am, bm, bs, i2 = -1, s = [], q = []; + a = a + "", b = b + ""; + while ((am = reA.exec(a)) && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { + bs = b.slice(bi, bs); + if (s[i2]) + s[i2] += bs; + else + s[++i2] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { + if (s[i2]) + s[i2] += bm; + else + s[++i2] = bm; + } else { + s[++i2] = null; + q.push({ i: i2, x: interpolateNumber(am, bm) }); + } + bi = reB.lastIndex; + } + if (bi < b.length) { + bs = b.slice(bi); + if (s[i2]) + s[i2] += bs; + else + s[++i2] = bs; + } + return s.length < 2 ? q[0] ? one$1(q[0].x) : zero(b) : (b = q.length, function(t) { + for (var i3 = 0, o; i3 < b; ++i3) + s[(o = q[i3]).i] = o.x(t); + return s.join(""); + }); + } + function interpolate$1(a, b) { + var t = typeof b, c2; + return b == null || t === "boolean" ? constant$4(b) : (t === "number" ? interpolateNumber : t === "string" ? (c2 = color(b)) ? (b = c2, interpolateRgb) : interpolateString : b instanceof color ? interpolateRgb : b instanceof Date ? date$1 : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b); + } + function interpolateRound(a, b) { + return a = +a, b = +b, function(t) { + return Math.round(a * (1 - t) + b * t); + }; + } + var degrees = 180 / Math.PI; + var identity$4 = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 + }; + function decompose(a, b, c2, d, e, f2) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) + a /= scaleX, b /= scaleX; + if (skewX = a * c2 + b * d) + c2 -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c2 * c2 + d * d)) + c2 /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c2) + a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f2, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX, + scaleY + }; + } + var svgNode; + function parseCss(value2) { + const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value2 + ""); + return m.isIdentity ? identity$4 : decompose(m.a, m.b, m.c, m.d, m.e, m.f); + } + function parseSvg(value2) { + if (value2 == null) + return identity$4; + if (!svgNode) + svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value2); + if (!(value2 = svgNode.transform.baseVal.consolidate())) + return identity$4; + value2 = value2.matrix; + return decompose(value2.a, value2.b, value2.c, value2.d, value2.e, value2.f); + } + function interpolateTransform(parse2, pxComma, pxParen, degParen) { + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i2 = s.push("translate(", null, pxComma, null, pxParen); + q.push({ i: i2 - 4, x: interpolateNumber(xa, xb) }, { i: i2 - 2, x: interpolateNumber(ya, yb) }); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) + b += 360; + else if (b - a > 180) + a += 360; + q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b) }); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + function skewX(a, b, s, q) { + if (a !== b) { + q.push({ i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: interpolateNumber(a, b) }); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i2 = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({ i: i2 - 4, x: interpolateNumber(xa, xb) }, { i: i2 - 2, x: interpolateNumber(ya, yb) }); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + return function(a, b) { + var s = [], q = []; + a = parse2(a), b = parse2(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; + return function(t) { + var i2 = -1, n = q.length, o; + while (++i2 < n) + s[(o = q[i2]).i] = o.x(t); + return s.join(""); + }; + }; + } + var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); + var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); + function hcl(hue2) { + return function(start2, end2) { + var h = hue2((start2 = hcl$1(start2)).h, (end2 = hcl$1(end2)).h), c2 = nogamma(start2.c, end2.c), l = nogamma(start2.l, end2.l), opacity = nogamma(start2.opacity, end2.opacity); + return function(t) { + start2.h = h(t); + start2.c = c2(t); + start2.l = l(t); + start2.opacity = opacity(t); + return start2 + ""; + }; + }; + } + const interpolateHcl = hcl(hue); + var frame = 0, timeout$1 = 0, interval = 0, pokeDelay = 1e3, taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance === "object" && performance.now ? performance : Date, setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f2) { + setTimeout(f2, 17); + }; + function now$2() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); + } + function clearNow() { + clockNow = 0; + } + function Timer() { + this._call = this._time = this._next = null; + } + Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time2) { + if (typeof callback !== "function") + throw new TypeError("callback is not a function"); + time2 = (time2 == null ? now$2() : +time2) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) + taskTail._next = this; + else + taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time2; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } + }; + function timer(callback, delay, time2) { + var t = new Timer(); + t.restart(callback, delay, time2); + return t; + } + function timerFlush() { + now$2(); + ++frame; + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) + t._call.call(void 0, e); + t = t._next; + } + --frame; + } + function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + frame = timeout$1 = 0; + try { + timerFlush(); + } finally { + frame = 0; + nap(); + clockNow = 0; + } + } + function poke() { + var now2 = clock.now(), delay = now2 - clockLast; + if (delay > pokeDelay) + clockSkew -= delay, clockLast = now2; + } + function nap() { + var t02, t12 = taskHead, t22, time2 = Infinity; + while (t12) { + if (t12._call) { + if (time2 > t12._time) + time2 = t12._time; + t02 = t12, t12 = t12._next; + } else { + t22 = t12._next, t12._next = null; + t12 = t02 ? t02._next = t22 : taskHead = t22; + } + } + taskTail = t02; + sleep(time2); + } + function sleep(time2) { + if (frame) + return; + if (timeout$1) + timeout$1 = clearTimeout(timeout$1); + var delay = time2 - clockNow; + if (delay > 24) { + if (time2 < Infinity) + timeout$1 = setTimeout(wake, time2 - clock.now() - clockSkew); + if (interval) + interval = clearInterval(interval); + } else { + if (!interval) + clockLast = clock.now(), interval = setInterval(poke, pokeDelay); + frame = 1, setFrame(wake); + } + } + function timeout(callback, delay, time2) { + var t = new Timer(); + delay = delay == null ? 0 : +delay; + t.restart((elapsed) => { + t.stop(); + callback(elapsed + delay); + }, delay, time2); + return t; + } + var emptyOn = dispatch("start", "end", "cancel", "interrupt"); + var emptyTween = []; + var CREATED = 0; + var SCHEDULED = 1; + var STARTING = 2; + var STARTED = 3; + var RUNNING = 4; + var ENDING = 5; + var ENDED = 6; + function schedule(node2, name2, id2, index2, group, timing) { + var schedules = node2.__transition; + if (!schedules) + node2.__transition = {}; + else if (id2 in schedules) + return; + create$1(node2, id2, { + name: name2, + index: index2, + // For context during callback. + group, + // For context during callback. + on: emptyOn, + tween: emptyTween, + time: timing.time, + delay: timing.delay, + duration: timing.duration, + ease: timing.ease, + timer: null, + state: CREATED + }); + } + function init$1(node2, id2) { + var schedule2 = get$2(node2, id2); + if (schedule2.state > CREATED) + throw new Error("too late; already scheduled"); + return schedule2; + } + function set$2(node2, id2) { + var schedule2 = get$2(node2, id2); + if (schedule2.state > STARTED) + throw new Error("too late; already running"); + return schedule2; + } + function get$2(node2, id2) { + var schedule2 = node2.__transition; + if (!schedule2 || !(schedule2 = schedule2[id2])) + throw new Error("transition not found"); + return schedule2; + } + function create$1(node2, id2, self2) { + var schedules = node2.__transition, tween; + schedules[id2] = self2; + self2.timer = timer(schedule2, 0, self2.time); + function schedule2(elapsed) { + self2.state = SCHEDULED; + self2.timer.restart(start2, self2.delay, self2.time); + if (self2.delay <= elapsed) + start2(elapsed - self2.delay); + } + function start2(elapsed) { + var i2, j, n, o; + if (self2.state !== SCHEDULED) + return stop(); + for (i2 in schedules) { + o = schedules[i2]; + if (o.name !== self2.name) + continue; + if (o.state === STARTED) + return timeout(start2); + if (o.state === RUNNING) { + o.state = ENDED; + o.timer.stop(); + o.on.call("interrupt", node2, node2.__data__, o.index, o.group); + delete schedules[i2]; + } else if (+i2 < id2) { + o.state = ENDED; + o.timer.stop(); + o.on.call("cancel", node2, node2.__data__, o.index, o.group); + delete schedules[i2]; + } + } + timeout(function() { + if (self2.state === STARTED) { + self2.state = RUNNING; + self2.timer.restart(tick, self2.delay, self2.time); + tick(elapsed); + } + }); + self2.state = STARTING; + self2.on.call("start", node2, node2.__data__, self2.index, self2.group); + if (self2.state !== STARTING) + return; + self2.state = STARTED; + tween = new Array(n = self2.tween.length); + for (i2 = 0, j = -1; i2 < n; ++i2) { + if (o = self2.tween[i2].value.call(node2, node2.__data__, self2.index, self2.group)) { + tween[++j] = o; + } + } + tween.length = j + 1; + } + function tick(elapsed) { + var t = elapsed < self2.duration ? self2.ease.call(null, elapsed / self2.duration) : (self2.timer.restart(stop), self2.state = ENDING, 1), i2 = -1, n = tween.length; + while (++i2 < n) { + tween[i2].call(node2, t); + } + if (self2.state === ENDING) { + self2.on.call("end", node2, node2.__data__, self2.index, self2.group); + stop(); + } + } + function stop() { + self2.state = ENDED; + self2.timer.stop(); + delete schedules[id2]; + for (var i2 in schedules) + return; + delete node2.__transition; + } + } + function interrupt(node2, name2) { + var schedules = node2.__transition, schedule2, active, empty2 = true, i2; + if (!schedules) + return; + name2 = name2 == null ? null : name2 + ""; + for (i2 in schedules) { + if ((schedule2 = schedules[i2]).name !== name2) { + empty2 = false; + continue; + } + active = schedule2.state > STARTING && schedule2.state < ENDING; + schedule2.state = ENDED; + schedule2.timer.stop(); + schedule2.on.call(active ? "interrupt" : "cancel", node2, node2.__data__, schedule2.index, schedule2.group); + delete schedules[i2]; + } + if (empty2) + delete node2.__transition; + } + function selection_interrupt(name2) { + return this.each(function() { + interrupt(this, name2); + }); + } + function tweenRemove(id2, name2) { + var tween0, tween1; + return function() { + var schedule2 = set$2(this, id2), tween = schedule2.tween; + if (tween !== tween0) { + tween1 = tween0 = tween; + for (var i2 = 0, n = tween1.length; i2 < n; ++i2) { + if (tween1[i2].name === name2) { + tween1 = tween1.slice(); + tween1.splice(i2, 1); + break; + } + } + } + schedule2.tween = tween1; + }; + } + function tweenFunction(id2, name2, value2) { + var tween0, tween1; + if (typeof value2 !== "function") + throw new Error(); + return function() { + var schedule2 = set$2(this, id2), tween = schedule2.tween; + if (tween !== tween0) { + tween1 = (tween0 = tween).slice(); + for (var t = { name: name2, value: value2 }, i2 = 0, n = tween1.length; i2 < n; ++i2) { + if (tween1[i2].name === name2) { + tween1[i2] = t; + break; + } + } + if (i2 === n) + tween1.push(t); + } + schedule2.tween = tween1; + }; + } + function transition_tween(name2, value2) { + var id2 = this._id; + name2 += ""; + if (arguments.length < 2) { + var tween = get$2(this.node(), id2).tween; + for (var i2 = 0, n = tween.length, t; i2 < n; ++i2) { + if ((t = tween[i2]).name === name2) { + return t.value; + } + } + return null; + } + return this.each((value2 == null ? tweenRemove : tweenFunction)(id2, name2, value2)); + } + function tweenValue(transition, name2, value2) { + var id2 = transition._id; + transition.each(function() { + var schedule2 = set$2(this, id2); + (schedule2.value || (schedule2.value = {}))[name2] = value2.apply(this, arguments); + }); + return function(node2) { + return get$2(node2, id2).value[name2]; + }; + } + function interpolate(a, b) { + var c2; + return (typeof b === "number" ? interpolateNumber : b instanceof color ? interpolateRgb : (c2 = color(b)) ? (b = c2, interpolateRgb) : interpolateString)(a, b); + } + function attrRemove(name2) { + return function() { + this.removeAttribute(name2); + }; + } + function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; + } + function attrConstant(name2, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = this.getAttribute(name2); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; + } + function attrConstantNS(fullname, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = this.getAttributeNS(fullname.space, fullname.local); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; + } + function attrFunction(name2, interpolate2, value2) { + var string00, string10, interpolate0; + return function() { + var string0, value1 = value2(this), string1; + if (value1 == null) + return void this.removeAttribute(name2); + string0 = this.getAttribute(name2); + string1 = value1 + ""; + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; + } + function attrFunctionNS(fullname, interpolate2, value2) { + var string00, string10, interpolate0; + return function() { + var string0, value1 = value2(this), string1; + if (value1 == null) + return void this.removeAttributeNS(fullname.space, fullname.local); + string0 = this.getAttributeNS(fullname.space, fullname.local); + string1 = value1 + ""; + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; + } + function transition_attr(name2, value2) { + var fullname = namespace(name2), i2 = fullname === "transform" ? interpolateTransformSvg : interpolate; + return this.attrTween(name2, typeof value2 === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i2, tweenValue(this, "attr." + name2, value2)) : value2 == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i2, value2)); + } + function attrInterpolate(name2, i2) { + return function(t) { + this.setAttribute(name2, i2.call(this, t)); + }; + } + function attrInterpolateNS(fullname, i2) { + return function(t) { + this.setAttributeNS(fullname.space, fullname.local, i2.call(this, t)); + }; + } + function attrTweenNS(fullname, value2) { + var t02, i0; + function tween() { + var i2 = value2.apply(this, arguments); + if (i2 !== i0) + t02 = (i0 = i2) && attrInterpolateNS(fullname, i2); + return t02; + } + tween._value = value2; + return tween; + } + function attrTween(name2, value2) { + var t02, i0; + function tween() { + var i2 = value2.apply(this, arguments); + if (i2 !== i0) + t02 = (i0 = i2) && attrInterpolate(name2, i2); + return t02; + } + tween._value = value2; + return tween; + } + function transition_attrTween(name2, value2) { + var key = "attr." + name2; + if (arguments.length < 2) + return (key = this.tween(key)) && key._value; + if (value2 == null) + return this.tween(key, null); + if (typeof value2 !== "function") + throw new Error(); + var fullname = namespace(name2); + return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value2)); + } + function delayFunction(id2, value2) { + return function() { + init$1(this, id2).delay = +value2.apply(this, arguments); + }; + } + function delayConstant(id2, value2) { + return value2 = +value2, function() { + init$1(this, id2).delay = value2; + }; + } + function transition_delay(value2) { + var id2 = this._id; + return arguments.length ? this.each((typeof value2 === "function" ? delayFunction : delayConstant)(id2, value2)) : get$2(this.node(), id2).delay; + } + function durationFunction(id2, value2) { + return function() { + set$2(this, id2).duration = +value2.apply(this, arguments); + }; + } + function durationConstant(id2, value2) { + return value2 = +value2, function() { + set$2(this, id2).duration = value2; + }; + } + function transition_duration(value2) { + var id2 = this._id; + return arguments.length ? this.each((typeof value2 === "function" ? durationFunction : durationConstant)(id2, value2)) : get$2(this.node(), id2).duration; + } + function easeConstant(id2, value2) { + if (typeof value2 !== "function") + throw new Error(); + return function() { + set$2(this, id2).ease = value2; + }; + } + function transition_ease(value2) { + var id2 = this._id; + return arguments.length ? this.each(easeConstant(id2, value2)) : get$2(this.node(), id2).ease; + } + function easeVarying(id2, value2) { + return function() { + var v = value2.apply(this, arguments); + if (typeof v !== "function") + throw new Error(); + set$2(this, id2).ease = v; + }; + } + function transition_easeVarying(value2) { + if (typeof value2 !== "function") + throw new Error(); + return this.each(easeVarying(this._id, value2)); + } + function transition_filter(match) { + if (typeof match !== "function") + match = matcher(match); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i2 = 0; i2 < n; ++i2) { + if ((node2 = group[i2]) && match.call(node2, node2.__data__, i2, group)) { + subgroup.push(node2); + } + } + } + return new Transition(subgroups, this._parents, this._name, this._id); + } + function transition_merge(transition) { + if (transition._id !== this._id) + throw new Error(); + for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge2 = merges[j] = new Array(n), node2, i2 = 0; i2 < n; ++i2) { + if (node2 = group0[i2] || group1[i2]) { + merge2[i2] = node2; + } + } + } + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + return new Transition(merges, this._parents, this._name, this._id); + } + function start$1(name2) { + return (name2 + "").trim().split(/^|\s+/).every(function(t) { + var i2 = t.indexOf("."); + if (i2 >= 0) + t = t.slice(0, i2); + return !t || t === "start"; + }); + } + function onFunction(id2, name2, listener) { + var on0, on1, sit = start$1(name2) ? init$1 : set$2; + return function() { + var schedule2 = sit(this, id2), on = schedule2.on; + if (on !== on0) + (on1 = (on0 = on).copy()).on(name2, listener); + schedule2.on = on1; + }; + } + function transition_on(name2, listener) { + var id2 = this._id; + return arguments.length < 2 ? get$2(this.node(), id2).on.on(name2) : this.each(onFunction(id2, name2, listener)); + } + function removeFunction(id2) { + return function() { + var parent = this.parentNode; + for (var i2 in this.__transition) + if (+i2 !== id2) + return; + if (parent) + parent.removeChild(this); + }; + } + function transition_remove() { + return this.on("end.remove", removeFunction(this._id)); + } + function transition_select(select) { + var name2 = this._name, id2 = this._id; + if (typeof select !== "function") + select = selector(select); + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i2 = 0; i2 < n; ++i2) { + if ((node2 = group[i2]) && (subnode = select.call(node2, node2.__data__, i2, group))) { + if ("__data__" in node2) + subnode.__data__ = node2.__data__; + subgroup[i2] = subnode; + schedule(subgroup[i2], name2, id2, i2, subgroup, get$2(node2, id2)); + } + } + } + return new Transition(subgroups, this._parents, name2, id2); + } + function transition_selectAll(select) { + var name2 = this._name, id2 = this._id; + if (typeof select !== "function") + select = selectorAll(select); + for (var groups = this._groups, m = groups.length, subgroups = [], parents2 = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i2 = 0; i2 < n; ++i2) { + if (node2 = group[i2]) { + for (var children2 = select.call(node2, node2.__data__, i2, group), child, inherit2 = get$2(node2, id2), k = 0, l = children2.length; k < l; ++k) { + if (child = children2[k]) { + schedule(child, name2, id2, k, children2, inherit2); + } + } + subgroups.push(children2); + parents2.push(node2); + } + } + } + return new Transition(subgroups, parents2, name2, id2); + } + var Selection = selection.prototype.constructor; + function transition_selection() { + return new Selection(this._groups, this._parents); + } + function styleNull(name2, interpolate2) { + var string00, string10, interpolate0; + return function() { + var string0 = styleValue(this, name2), string1 = (this.style.removeProperty(name2), styleValue(this, name2)); + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, string10 = string1); + }; + } + function styleRemove(name2) { + return function() { + this.style.removeProperty(name2); + }; + } + function styleConstant(name2, interpolate2, value1) { + var string00, string1 = value1 + "", interpolate0; + return function() { + var string0 = styleValue(this, name2); + return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate2(string00 = string0, value1); + }; + } + function styleFunction(name2, interpolate2, value2) { + var string00, string10, interpolate0; + return function() { + var string0 = styleValue(this, name2), value1 = value2(this), string1 = value1 + ""; + if (value1 == null) + string1 = value1 = (this.style.removeProperty(name2), styleValue(this, name2)); + return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1)); + }; + } + function styleMaybeRemove(id2, name2) { + var on0, on1, listener0, key = "style." + name2, event = "end." + key, remove2; + return function() { + var schedule2 = set$2(this, id2), on = schedule2.on, listener = schedule2.value[key] == null ? remove2 || (remove2 = styleRemove(name2)) : void 0; + if (on !== on0 || listener0 !== listener) + (on1 = (on0 = on).copy()).on(event, listener0 = listener); + schedule2.on = on1; + }; + } + function transition_style(name2, value2, priority) { + var i2 = (name2 += "") === "transform" ? interpolateTransformCss : interpolate; + return value2 == null ? this.styleTween(name2, styleNull(name2, i2)).on("end.style." + name2, styleRemove(name2)) : typeof value2 === "function" ? this.styleTween(name2, styleFunction(name2, i2, tweenValue(this, "style." + name2, value2))).each(styleMaybeRemove(this._id, name2)) : this.styleTween(name2, styleConstant(name2, i2, value2), priority).on("end.style." + name2, null); + } + function styleInterpolate(name2, i2, priority) { + return function(t) { + this.style.setProperty(name2, i2.call(this, t), priority); + }; + } + function styleTween(name2, value2, priority) { + var t, i0; + function tween() { + var i2 = value2.apply(this, arguments); + if (i2 !== i0) + t = (i0 = i2) && styleInterpolate(name2, i2, priority); + return t; + } + tween._value = value2; + return tween; + } + function transition_styleTween(name2, value2, priority) { + var key = "style." + (name2 += ""); + if (arguments.length < 2) + return (key = this.tween(key)) && key._value; + if (value2 == null) + return this.tween(key, null); + if (typeof value2 !== "function") + throw new Error(); + return this.tween(key, styleTween(name2, value2, priority == null ? "" : priority)); + } + function textConstant(value2) { + return function() { + this.textContent = value2; + }; + } + function textFunction(value2) { + return function() { + var value1 = value2(this); + this.textContent = value1 == null ? "" : value1; + }; + } + function transition_text(value2) { + return this.tween("text", typeof value2 === "function" ? textFunction(tweenValue(this, "text", value2)) : textConstant(value2 == null ? "" : value2 + "")); + } + function textInterpolate(i2) { + return function(t) { + this.textContent = i2.call(this, t); + }; + } + function textTween(value2) { + var t02, i0; + function tween() { + var i2 = value2.apply(this, arguments); + if (i2 !== i0) + t02 = (i0 = i2) && textInterpolate(i2); + return t02; + } + tween._value = value2; + return tween; + } + function transition_textTween(value2) { + var key = "text"; + if (arguments.length < 1) + return (key = this.tween(key)) && key._value; + if (value2 == null) + return this.tween(key, null); + if (typeof value2 !== "function") + throw new Error(); + return this.tween(key, textTween(value2)); + } + function transition_transition() { + var name2 = this._name, id0 = this._id, id1 = newId(); + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i2 = 0; i2 < n; ++i2) { + if (node2 = group[i2]) { + var inherit2 = get$2(node2, id0); + schedule(node2, name2, id1, i2, group, { + time: inherit2.time + inherit2.delay + inherit2.duration, + delay: 0, + duration: inherit2.duration, + ease: inherit2.ease + }); + } + } + } + return new Transition(groups, this._parents, name2, id1); + } + function transition_end() { + var on0, on1, that = this, id2 = that._id, size2 = that.size(); + return new Promise(function(resolve, reject) { + var cancel = { value: reject }, end2 = { value: function() { + if (--size2 === 0) + resolve(); + } }; + that.each(function() { + var schedule2 = set$2(this, id2), on = schedule2.on; + if (on !== on0) { + on1 = (on0 = on).copy(); + on1._.cancel.push(cancel); + on1._.interrupt.push(cancel); + on1._.end.push(end2); + } + schedule2.on = on1; + }); + if (size2 === 0) + resolve(); + }); + } + var id$k = 0; + function Transition(groups, parents2, name2, id2) { + this._groups = groups; + this._parents = parents2; + this._name = name2; + this._id = id2; + } + function newId() { + return ++id$k; + } + var selection_prototype = selection.prototype; + Transition.prototype = { + constructor: Transition, + select: transition_select, + selectAll: transition_selectAll, + selectChild: selection_prototype.selectChild, + selectChildren: selection_prototype.selectChildren, + filter: transition_filter, + merge: transition_merge, + selection: transition_selection, + transition: transition_transition, + call: selection_prototype.call, + nodes: selection_prototype.nodes, + node: selection_prototype.node, + size: selection_prototype.size, + empty: selection_prototype.empty, + each: selection_prototype.each, + on: transition_on, + attr: transition_attr, + attrTween: transition_attrTween, + style: transition_style, + styleTween: transition_styleTween, + text: transition_text, + textTween: transition_textTween, + remove: transition_remove, + tween: transition_tween, + delay: transition_delay, + duration: transition_duration, + ease: transition_ease, + easeVarying: transition_easeVarying, + end: transition_end, + [Symbol.iterator]: selection_prototype[Symbol.iterator] + }; + function cubicInOut(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; + } + var defaultTiming = { + time: null, + // Set on use. + delay: 0, + duration: 250, + ease: cubicInOut + }; + function inherit(node2, id2) { + var timing; + while (!(timing = node2.__transition) || !(timing = timing[id2])) { + if (!(node2 = node2.parentNode)) { + throw new Error(`transition ${id2} not found`); + } + } + return timing; + } + function selection_transition(name2) { + var id2, timing; + if (name2 instanceof Transition) { + id2 = name2._id, name2 = name2._name; + } else { + id2 = newId(), (timing = defaultTiming).time = now$2(), name2 = name2 == null ? null : name2 + ""; + } + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node2, i2 = 0; i2 < n; ++i2) { + if (node2 = group[i2]) { + schedule(node2, name2, id2, i2, group, timing || inherit(node2, id2)); + } + } + } + return new Transition(groups, this._parents, name2, id2); + } + selection.prototype.interrupt = selection_interrupt; + selection.prototype.transition = selection_transition; + const pi$2 = Math.PI, tau$2 = 2 * pi$2, epsilon$2 = 1e-6, tauEpsilon$1 = tau$2 - epsilon$2; + function Path$1() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; + this._ = ""; + } + function path$1() { + return new Path$1(); + } + Path$1.prototype = path$1.prototype = { + constructor: Path$1, + moveTo: function(x2, y2) { + this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x2, y2) { + this._ += "L" + (this._x1 = +x2) + "," + (this._y1 = +y2); + }, + quadraticCurveTo: function(x1, y1, x2, y2) { + this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x2) + "," + (this._y1 = +y2); + }, + bezierCurveTo: function(x1, y1, x2, y2, x3, y3) { + this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x3) + "," + (this._y1 = +y3); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } else if (!(l01_2 > epsilon$2)) + ; + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$2) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } else { + var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi$2 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21; + if (Math.abs(t01 - 1) > epsilon$2) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); + } + this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x2, y2, r, a0, a1, ccw) { + x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw; + var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } else if (Math.abs(this._x1 - x0) > epsilon$2 || Math.abs(this._y1 - y0) > epsilon$2) { + this._ += "L" + x0 + "," + y0; + } + if (!r) + return; + if (da < 0) + da = da % tau$2 + tau$2; + if (da > tauEpsilon$1) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x2 - dx) + "," + (y2 - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } else if (da > epsilon$2) { + this._ += "A" + r + "," + r + ",0," + +(da >= pi$2) + "," + cw + "," + (this._x1 = x2 + r * Math.cos(a1)) + "," + (this._y1 = y2 + r * Math.sin(a1)); + } + }, + rect: function(x2, y2, w2, h) { + this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2) + "h" + +w2 + "v" + +h + "h" + -w2 + "Z"; + }, + toString: function() { + return this._; + } + }; + function responseText(response) { + if (!response.ok) + throw new Error(response.status + " " + response.statusText); + return response.text(); + } + function text$3(input, init2) { + return fetch(input, init2).then(responseText); + } + function parser$s(type2) { + return (input, init2) => text$3(input, init2).then((text2) => new DOMParser().parseFromString(text2, type2)); + } + var svg$2 = parser$s("image/svg+xml"); + function formatDecimal(x2) { + return Math.abs(x2 = Math.round(x2)) >= 1e21 ? x2.toLocaleString("en").replace(/,/g, "") : x2.toString(10); + } + function formatDecimalParts(x2, p) { + if ((i2 = (x2 = p ? x2.toExponential(p - 1) : x2.toExponential()).indexOf("e")) < 0) + return null; + var i2, coefficient = x2.slice(0, i2); + return [ + coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, + +x2.slice(i2 + 1) + ]; + } + function exponent(x2) { + return x2 = formatDecimalParts(Math.abs(x2)), x2 ? x2[1] : NaN; + } + function formatGroup(grouping, thousands) { + return function(value2, width2) { + var i2 = value2.length, t = [], j = 0, g = grouping[0], length2 = 0; + while (i2 > 0 && g > 0) { + if (length2 + g + 1 > width2) + g = Math.max(1, width2 - length2); + t.push(value2.substring(i2 -= g, i2 + g)); + if ((length2 += g + 1) > width2) + break; + g = grouping[j = (j + 1) % grouping.length]; + } + return t.reverse().join(thousands); + }; + } + function formatNumerals(numerals) { + return function(value2) { + return value2.replace(/[0-9]/g, function(i2) { + return numerals[+i2]; + }); + }; + } + var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; + function formatSpecifier(specifier) { + if (!(match = re.exec(specifier))) + throw new Error("invalid format: " + specifier); + var match; + return new FormatSpecifier({ + fill: match[1], + align: match[2], + sign: match[3], + symbol: match[4], + zero: match[5], + width: match[6], + comma: match[7], + precision: match[8] && match[8].slice(1), + trim: match[9], + type: match[10] + }); + } + formatSpecifier.prototype = FormatSpecifier.prototype; + function FormatSpecifier(specifier) { + this.fill = specifier.fill === void 0 ? " " : specifier.fill + ""; + this.align = specifier.align === void 0 ? ">" : specifier.align + ""; + this.sign = specifier.sign === void 0 ? "-" : specifier.sign + ""; + this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + ""; + this.zero = !!specifier.zero; + this.width = specifier.width === void 0 ? void 0 : +specifier.width; + this.comma = !!specifier.comma; + this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision; + this.trim = !!specifier.trim; + this.type = specifier.type === void 0 ? "" : specifier.type + ""; + } + FormatSpecifier.prototype.toString = function() { + return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type; + }; + function formatTrim(s) { + out: + for (var n = s.length, i2 = 1, i0 = -1, i1; i2 < n; ++i2) { + switch (s[i2]) { + case ".": + i0 = i1 = i2; + break; + case "0": + if (i0 === 0) + i0 = i2; + i1 = i2; + break; + default: + if (!+s[i2]) + break out; + if (i0 > 0) + i0 = 0; + break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; + } + var prefixExponent; + function formatPrefixAuto(x2, p) { + var d = formatDecimalParts(x2, p); + if (!d) + return x2 + ""; + var coefficient = d[0], exponent2 = d[1], i2 = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length; + return i2 === n ? coefficient : i2 > n ? coefficient + new Array(i2 - n + 1).join("0") : i2 > 0 ? coefficient.slice(0, i2) + "." + coefficient.slice(i2) : "0." + new Array(1 - i2).join("0") + formatDecimalParts(x2, Math.max(0, p + i2 - 1))[0]; + } + function formatRounded(x2, p) { + var d = formatDecimalParts(x2, p); + if (!d) + return x2 + ""; + var coefficient = d[0], exponent2 = d[1]; + return exponent2 < 0 ? "0." + new Array(-exponent2).join("0") + coefficient : coefficient.length > exponent2 + 1 ? coefficient.slice(0, exponent2 + 1) + "." + coefficient.slice(exponent2 + 1) : coefficient + new Array(exponent2 - coefficient.length + 2).join("0"); + } + const formatTypes = { + "%": (x2, p) => (x2 * 100).toFixed(p), + "b": (x2) => Math.round(x2).toString(2), + "c": (x2) => x2 + "", + "d": formatDecimal, + "e": (x2, p) => x2.toExponential(p), + "f": (x2, p) => x2.toFixed(p), + "g": (x2, p) => x2.toPrecision(p), + "o": (x2) => Math.round(x2).toString(8), + "p": (x2, p) => formatRounded(x2 * 100, p), + "r": formatRounded, + "s": formatPrefixAuto, + "X": (x2) => Math.round(x2).toString(16).toUpperCase(), + "x": (x2) => Math.round(x2).toString(16) + }; + function identity$3(x2) { + return x2; + } + var map$2 = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"]; + function formatLocale$1(locale2) { + var group = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity$3 : formatGroup(map$2.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal === void 0 ? "." : locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity$3 : formatNumerals(map$2.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus === void 0 ? "−" : locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + ""; + function newFormat(specifier) { + specifier = formatSpecifier(specifier); + var fill = specifier.fill, align = specifier.align, sign2 = specifier.sign, symbol = specifier.symbol, zero2 = specifier.zero, width2 = specifier.width, comma = specifier.comma, precision = specifier.precision, trim2 = specifier.trim, type2 = specifier.type; + if (type2 === "n") + comma = true, type2 = "g"; + else if (!formatTypes[type2]) + precision === void 0 && (precision = 12), trim2 = true, type2 = "g"; + if (zero2 || fill === "0" && align === "=") + zero2 = true, fill = "0", align = "="; + var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type2) ? "0" + type2.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type2) ? percent : ""; + var formatType = formatTypes[type2], maybeSuffix = /[defgprs%]/.test(type2); + precision = precision === void 0 ? 6 : /[gprs]/.test(type2) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision)); + function format2(value2) { + var valuePrefix = prefix, valueSuffix = suffix, i2, n, c2; + if (type2 === "c") { + valueSuffix = formatType(value2) + valueSuffix; + value2 = ""; + } else { + value2 = +value2; + var valueNegative = value2 < 0 || 1 / value2 < 0; + value2 = isNaN(value2) ? nan : formatType(Math.abs(value2), precision); + if (trim2) + value2 = formatTrim(value2); + if (valueNegative && +value2 === 0 && sign2 !== "+") + valueNegative = false; + valuePrefix = (valueNegative ? sign2 === "(" ? sign2 : minus : sign2 === "-" || sign2 === "(" ? "" : sign2) + valuePrefix; + valueSuffix = (type2 === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign2 === "(" ? ")" : ""); + if (maybeSuffix) { + i2 = -1, n = value2.length; + while (++i2 < n) { + if (c2 = value2.charCodeAt(i2), 48 > c2 || c2 > 57) { + valueSuffix = (c2 === 46 ? decimal + value2.slice(i2 + 1) : value2.slice(i2)) + valueSuffix; + value2 = value2.slice(0, i2); + break; + } + } + } + } + if (comma && !zero2) + value2 = group(value2, Infinity); + var length2 = valuePrefix.length + value2.length + valueSuffix.length, padding2 = length2 < width2 ? new Array(width2 - length2 + 1).join(fill) : ""; + if (comma && zero2) + value2 = group(padding2 + value2, padding2.length ? width2 - valueSuffix.length : Infinity), padding2 = ""; + switch (align) { + case "<": + value2 = valuePrefix + value2 + valueSuffix + padding2; + break; + case "=": + value2 = valuePrefix + padding2 + value2 + valueSuffix; + break; + case "^": + value2 = padding2.slice(0, length2 = padding2.length >> 1) + valuePrefix + value2 + valueSuffix + padding2.slice(length2); + break; + default: + value2 = padding2 + valuePrefix + value2 + valueSuffix; + break; + } + return numerals(value2); + } + format2.toString = function() { + return specifier + ""; + }; + return format2; + } + function formatPrefix2(specifier, value2) { + var f2 = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent(value2) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3]; + return function(value3) { + return f2(k * value3) + prefix; + }; + } + return { + format: newFormat, + formatPrefix: formatPrefix2 + }; + } + var locale$1; + var format; + var formatPrefix; + defaultLocale$1({ + thousands: ",", + grouping: [3], + currency: ["$", ""] + }); + function defaultLocale$1(definition2) { + locale$1 = formatLocale$1(definition2); + format = locale$1.format; + formatPrefix = locale$1.formatPrefix; + return locale$1; + } + function precisionFixed(step) { + return Math.max(0, -exponent(Math.abs(step))); + } + function precisionPrefix(step, value2) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value2) / 3))) * 3 - exponent(Math.abs(step))); + } + function precisionRound(step, max2) { + step = Math.abs(step), max2 = Math.abs(max2) - step; + return Math.max(0, exponent(max2) - exponent(step)) + 1; + } + function initRange(domain, range2) { + switch (arguments.length) { + case 0: + break; + case 1: + this.range(domain); + break; + default: + this.range(range2).domain(domain); + break; + } + return this; + } + const implicit = Symbol("implicit"); + function ordinal() { + var index2 = new InternMap(), domain = [], range2 = [], unknown = implicit; + function scale(d) { + let i2 = index2.get(d); + if (i2 === void 0) { + if (unknown !== implicit) + return unknown; + index2.set(d, i2 = domain.push(d) - 1); + } + return range2[i2 % range2.length]; + } + scale.domain = function(_2) { + if (!arguments.length) + return domain.slice(); + domain = [], index2 = new InternMap(); + for (const value2 of _2) { + if (index2.has(value2)) + continue; + index2.set(value2, domain.push(value2) - 1); + } + return scale; + }; + scale.range = function(_2) { + return arguments.length ? (range2 = Array.from(_2), scale) : range2.slice(); + }; + scale.unknown = function(_2) { + return arguments.length ? (unknown = _2, scale) : unknown; + }; + scale.copy = function() { + return ordinal(domain, range2).unknown(unknown); + }; + initRange.apply(scale, arguments); + return scale; + } + function constants(x2) { + return function() { + return x2; + }; + } + function number$1(x2) { + return +x2; + } + var unit$1 = [0, 1]; + function identity$2(x2) { + return x2; + } + function normalize(a, b) { + return (b -= a = +a) ? function(x2) { + return (x2 - a) / b; + } : constants(isNaN(b) ? NaN : 0.5); + } + function clamper(a, b) { + var t; + if (a > b) + t = a, a = b, b = t; + return function(x2) { + return Math.max(a, Math.min(b, x2)); + }; + } + function bimap(domain, range2, interpolate2) { + var d0 = domain[0], d1 = domain[1], r0 = range2[0], r1 = range2[1]; + if (d1 < d0) + d0 = normalize(d1, d0), r0 = interpolate2(r1, r0); + else + d0 = normalize(d0, d1), r0 = interpolate2(r0, r1); + return function(x2) { + return r0(d0(x2)); + }; + } + function polymap(domain, range2, interpolate2) { + var j = Math.min(domain.length, range2.length) - 1, d = new Array(j), r = new Array(j), i2 = -1; + if (domain[j] < domain[0]) { + domain = domain.slice().reverse(); + range2 = range2.slice().reverse(); + } + while (++i2 < j) { + d[i2] = normalize(domain[i2], domain[i2 + 1]); + r[i2] = interpolate2(range2[i2], range2[i2 + 1]); + } + return function(x2) { + var i3 = bisect(domain, x2, 1, j) - 1; + return r[i3](d[i3](x2)); + }; + } + function copy$1(source, target) { + return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown()); + } + function transformer() { + var domain = unit$1, range2 = unit$1, interpolate2 = interpolate$1, transform, untransform, unknown, clamp = identity$2, piecewise, output, input; + function rescale() { + var n = Math.min(domain.length, range2.length); + if (clamp !== identity$2) + clamp = clamper(domain[0], domain[n - 1]); + piecewise = n > 2 ? polymap : bimap; + output = input = null; + return scale; + } + function scale(x2) { + return x2 == null || isNaN(x2 = +x2) ? unknown : (output || (output = piecewise(domain.map(transform), range2, interpolate2)))(transform(clamp(x2))); + } + scale.invert = function(y2) { + return clamp(untransform((input || (input = piecewise(range2, domain.map(transform), interpolateNumber)))(y2))); + }; + scale.domain = function(_2) { + return arguments.length ? (domain = Array.from(_2, number$1), rescale()) : domain.slice(); + }; + scale.range = function(_2) { + return arguments.length ? (range2 = Array.from(_2), rescale()) : range2.slice(); + }; + scale.rangeRound = function(_2) { + return range2 = Array.from(_2), interpolate2 = interpolateRound, rescale(); + }; + scale.clamp = function(_2) { + return arguments.length ? (clamp = _2 ? true : identity$2, rescale()) : clamp !== identity$2; + }; + scale.interpolate = function(_2) { + return arguments.length ? (interpolate2 = _2, rescale()) : interpolate2; + }; + scale.unknown = function(_2) { + return arguments.length ? (unknown = _2, scale) : unknown; + }; + return function(t, u) { + transform = t, untransform = u; + return rescale(); + }; + } + function continuous() { + return transformer()(identity$2, identity$2); + } + function tickFormat(start2, stop, count, specifier) { + var step = tickStep(start2, stop, count), precision; + specifier = formatSpecifier(specifier == null ? ",f" : specifier); + switch (specifier.type) { + case "s": { + var value2 = Math.max(Math.abs(start2), Math.abs(stop)); + if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value2))) + specifier.precision = precision; + return formatPrefix(specifier, value2); + } + case "": + case "e": + case "g": + case "p": + case "r": { + if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start2), Math.abs(stop))))) + specifier.precision = precision - (specifier.type === "e"); + break; + } + case "f": + case "%": { + if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) + specifier.precision = precision - (specifier.type === "%") * 2; + break; + } + } + return format(specifier); + } + function linearish(scale) { + var domain = scale.domain; + scale.ticks = function(count) { + var d = domain(); + return ticks(d[0], d[d.length - 1], count == null ? 10 : count); + }; + scale.tickFormat = function(count, specifier) { + var d = domain(); + return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier); + }; + scale.nice = function(count) { + if (count == null) + count = 10; + var d = domain(); + var i0 = 0; + var i1 = d.length - 1; + var start2 = d[i0]; + var stop = d[i1]; + var prestep; + var step; + var maxIter = 10; + if (stop < start2) { + step = start2, start2 = stop, stop = step; + step = i0, i0 = i1, i1 = step; + } + while (maxIter-- > 0) { + step = tickIncrement(start2, stop, count); + if (step === prestep) { + d[i0] = start2; + d[i1] = stop; + return domain(d); + } else if (step > 0) { + start2 = Math.floor(start2 / step) * step; + stop = Math.ceil(stop / step) * step; + } else if (step < 0) { + start2 = Math.ceil(start2 * step) / step; + stop = Math.floor(stop * step) / step; + } else { + break; + } + prestep = step; + } + return scale; + }; + return scale; + } + function linear() { + var scale = continuous(); + scale.copy = function() { + return copy$1(scale, linear()); + }; + initRange.apply(scale, arguments); + return linearish(scale); + } + function nice(domain, interval2) { + domain = domain.slice(); + var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], t; + if (x1 < x0) { + t = i0, i0 = i1, i1 = t; + t = x0, x0 = x1, x1 = t; + } + domain[i0] = interval2.floor(x0); + domain[i1] = interval2.ceil(x1); + return domain; + } + var t0 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date(); + function newInterval(floori, offseti, count, field) { + function interval2(date2) { + return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2; + } + interval2.floor = function(date2) { + return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2; + }; + interval2.ceil = function(date2) { + return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2; + }; + interval2.round = function(date2) { + var d0 = interval2(date2), d1 = interval2.ceil(date2); + return date2 - d0 < d1 - date2 ? d0 : d1; + }; + interval2.offset = function(date2, step) { + return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2; + }; + interval2.range = function(start2, stop, step) { + var range2 = [], previous2; + start2 = interval2.ceil(start2); + step = step == null ? 1 : Math.floor(step); + if (!(start2 < stop) || !(step > 0)) + return range2; + do + range2.push(previous2 = /* @__PURE__ */ new Date(+start2)), offseti(start2, step), floori(start2); + while (previous2 < start2 && start2 < stop); + return range2; + }; + interval2.filter = function(test) { + return newInterval(function(date2) { + if (date2 >= date2) + while (floori(date2), !test(date2)) + date2.setTime(date2 - 1); + }, function(date2, step) { + if (date2 >= date2) { + if (step < 0) + while (++step <= 0) { + while (offseti(date2, -1), !test(date2)) { + } + } + else + while (--step >= 0) { + while (offseti(date2, 1), !test(date2)) { + } + } + } + }); + }; + if (count) { + interval2.count = function(start2, end2) { + t0.setTime(+start2), t1.setTime(+end2); + floori(t0), floori(t1); + return Math.floor(count(t0, t1)); + }; + interval2.every = function(step) { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval2 : interval2.filter(field ? function(d) { + return field(d) % step === 0; + } : function(d) { + return interval2.count(0, d) % step === 0; + }); + }; + } + return interval2; + } + var millisecond = newInterval(function() { + }, function(date2, step) { + date2.setTime(+date2 + step); + }, function(start2, end2) { + return end2 - start2; + }); + millisecond.every = function(k) { + k = Math.floor(k); + if (!isFinite(k) || !(k > 0)) + return null; + if (!(k > 1)) + return millisecond; + return newInterval(function(date2) { + date2.setTime(Math.floor(date2 / k) * k); + }, function(date2, step) { + date2.setTime(+date2 + step * k); + }, function(start2, end2) { + return (end2 - start2) / k; + }); + }; + const timeMillisecond = millisecond; + millisecond.range; + const durationSecond = 1e3; + const durationMinute = durationSecond * 60; + const durationHour = durationMinute * 60; + const durationDay = durationHour * 24; + const durationWeek = durationDay * 7; + const durationMonth = durationDay * 30; + const durationYear = durationDay * 365; + var second = newInterval(function(date2) { + date2.setTime(date2 - date2.getMilliseconds()); + }, function(date2, step) { + date2.setTime(+date2 + step * durationSecond); + }, function(start2, end2) { + return (end2 - start2) / durationSecond; + }, function(date2) { + return date2.getUTCSeconds(); + }); + const timeSecond = second; + second.range; + var minute = newInterval(function(date2) { + date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond); + }, function(date2, step) { + date2.setTime(+date2 + step * durationMinute); + }, function(start2, end2) { + return (end2 - start2) / durationMinute; + }, function(date2) { + return date2.getMinutes(); + }); + const timeMinute = minute; + minute.range; + var hour = newInterval(function(date2) { + date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond - date2.getMinutes() * durationMinute); + }, function(date2, step) { + date2.setTime(+date2 + step * durationHour); + }, function(start2, end2) { + return (end2 - start2) / durationHour; + }, function(date2) { + return date2.getHours(); + }); + const timeHour = hour; + hour.range; + var day = newInterval( + (date2) => date2.setHours(0, 0, 0, 0), + (date2, step) => date2.setDate(date2.getDate() + step), + (start2, end2) => (end2 - start2 - (end2.getTimezoneOffset() - start2.getTimezoneOffset()) * durationMinute) / durationDay, + (date2) => date2.getDate() - 1 + ); + const timeDay = day; + day.range; + function weekday$1(i2) { + return newInterval(function(date2) { + date2.setDate(date2.getDate() - (date2.getDay() + 7 - i2) % 7); + date2.setHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setDate(date2.getDate() + step * 7); + }, function(start2, end2) { + return (end2 - start2 - (end2.getTimezoneOffset() - start2.getTimezoneOffset()) * durationMinute) / durationWeek; + }); + } + var sunday = weekday$1(0); + var monday = weekday$1(1); + var tuesday = weekday$1(2); + var wednesday = weekday$1(3); + var thursday = weekday$1(4); + var friday = weekday$1(5); + var saturday = weekday$1(6); + sunday.range; + monday.range; + tuesday.range; + wednesday.range; + thursday.range; + friday.range; + saturday.range; + var month = newInterval(function(date2) { + date2.setDate(1); + date2.setHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setMonth(date2.getMonth() + step); + }, function(start2, end2) { + return end2.getMonth() - start2.getMonth() + (end2.getFullYear() - start2.getFullYear()) * 12; + }, function(date2) { + return date2.getMonth(); + }); + const timeMonth = month; + month.range; + var year = newInterval(function(date2) { + date2.setMonth(0, 1); + date2.setHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setFullYear(date2.getFullYear() + step); + }, function(start2, end2) { + return end2.getFullYear() - start2.getFullYear(); + }, function(date2) { + return date2.getFullYear(); + }); + year.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date2) { + date2.setFullYear(Math.floor(date2.getFullYear() / k) * k); + date2.setMonth(0, 1); + date2.setHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setFullYear(date2.getFullYear() + step * k); + }); + }; + const timeYear = year; + year.range; + var utcDay = newInterval(function(date2) { + date2.setUTCHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setUTCDate(date2.getUTCDate() + step); + }, function(start2, end2) { + return (end2 - start2) / durationDay; + }, function(date2) { + return date2.getUTCDate() - 1; + }); + const utcDay$1 = utcDay; + utcDay.range; + function utcWeekday(i2) { + return newInterval(function(date2) { + date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i2) % 7); + date2.setUTCHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setUTCDate(date2.getUTCDate() + step * 7); + }, function(start2, end2) { + return (end2 - start2) / durationWeek; + }); + } + var utcSunday = utcWeekday(0); + var utcMonday = utcWeekday(1); + var utcTuesday = utcWeekday(2); + var utcWednesday = utcWeekday(3); + var utcThursday = utcWeekday(4); + var utcFriday = utcWeekday(5); + var utcSaturday = utcWeekday(6); + utcSunday.range; + utcMonday.range; + utcTuesday.range; + utcWednesday.range; + utcThursday.range; + utcFriday.range; + utcSaturday.range; + var utcYear = newInterval(function(date2) { + date2.setUTCMonth(0, 1); + date2.setUTCHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setUTCFullYear(date2.getUTCFullYear() + step); + }, function(start2, end2) { + return end2.getUTCFullYear() - start2.getUTCFullYear(); + }, function(date2) { + return date2.getUTCFullYear(); + }); + utcYear.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date2) { + date2.setUTCFullYear(Math.floor(date2.getUTCFullYear() / k) * k); + date2.setUTCMonth(0, 1); + date2.setUTCHours(0, 0, 0, 0); + }, function(date2, step) { + date2.setUTCFullYear(date2.getUTCFullYear() + step * k); + }); + }; + const utcYear$1 = utcYear; + utcYear.range; + function ticker(year2, month2, week, day2, hour2, minute2) { + const tickIntervals = [ + [timeSecond, 1, durationSecond], + [timeSecond, 5, 5 * durationSecond], + [timeSecond, 15, 15 * durationSecond], + [timeSecond, 30, 30 * durationSecond], + [minute2, 1, durationMinute], + [minute2, 5, 5 * durationMinute], + [minute2, 15, 15 * durationMinute], + [minute2, 30, 30 * durationMinute], + [hour2, 1, durationHour], + [hour2, 3, 3 * durationHour], + [hour2, 6, 6 * durationHour], + [hour2, 12, 12 * durationHour], + [day2, 1, durationDay], + [day2, 2, 2 * durationDay], + [week, 1, durationWeek], + [month2, 1, durationMonth], + [month2, 3, 3 * durationMonth], + [year2, 1, durationYear] + ]; + function ticks2(start2, stop, count) { + const reverse = stop < start2; + if (reverse) + [start2, stop] = [stop, start2]; + const interval2 = count && typeof count.range === "function" ? count : tickInterval2(start2, stop, count); + const ticks3 = interval2 ? interval2.range(start2, +stop + 1) : []; + return reverse ? ticks3.reverse() : ticks3; + } + function tickInterval2(start2, stop, count) { + const target = Math.abs(stop - start2) / count; + const i2 = bisector(([, , step2]) => step2).right(tickIntervals, target); + if (i2 === tickIntervals.length) + return year2.every(tickStep(start2 / durationYear, stop / durationYear, count)); + if (i2 === 0) + return timeMillisecond.every(Math.max(tickStep(start2, stop, count), 1)); + const [t, step] = tickIntervals[target / tickIntervals[i2 - 1][2] < tickIntervals[i2][2] / target ? i2 - 1 : i2]; + return t.every(step); + } + return [ticks2, tickInterval2]; + } + const [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, sunday, timeDay, timeHour, timeMinute); + function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date2 = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date2.setFullYear(d.y); + return date2; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); + } + function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date2 = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date2.setUTCFullYear(d.y); + return date2; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); + } + function newDate(y2, m, d) { + return { y: y2, m, d, H: 0, M: 0, S: 0, L: 0 }; + } + function formatLocale(locale2) { + var locale_dateTime = locale2.dateTime, locale_date = locale2.date, locale_time = locale2.time, locale_periods = locale2.periods, locale_weekdays = locale2.days, locale_shortWeekdays = locale2.shortDays, locale_months = locale2.months, locale_shortMonths = locale2.shortMonths; + var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths); + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "g": formatYearISO, + "G": formatFullYearISO, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "q": formatQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "g": formatUTCYearISO, + "G": formatUTCFullYearISO, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "q": formatUTCQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent + }; + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "g": parseYear, + "G": parseFullYear, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "q": parseQuarter, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent + }; + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + function newFormat(specifier, formats2) { + return function(date2) { + var string2 = [], i2 = -1, j = 0, n = specifier.length, c2, pad2, format2; + if (!(date2 instanceof Date)) + date2 = /* @__PURE__ */ new Date(+date2); + while (++i2 < n) { + if (specifier.charCodeAt(i2) === 37) { + string2.push(specifier.slice(j, i2)); + if ((pad2 = pads[c2 = specifier.charAt(++i2)]) != null) + c2 = specifier.charAt(++i2); + else + pad2 = c2 === "e" ? " " : "0"; + if (format2 = formats2[c2]) + c2 = format2(date2, pad2); + string2.push(c2); + j = i2 + 1; + } + } + string2.push(specifier.slice(j, i2)); + return string2.join(""); + }; + } + function newParse(specifier, Z) { + return function(string2) { + var d = newDate(1900, void 0, 1), i2 = parseSpecifier(d, specifier, string2 += "", 0), week, day2; + if (i2 != string2.length) + return null; + if ("Q" in d) + return new Date(d.Q); + if ("s" in d) + return new Date(d.s * 1e3 + ("L" in d ? d.L : 0)); + if (Z && !("Z" in d)) + d.Z = 0; + if ("p" in d) + d.H = d.H % 12 + d.p * 12; + if (d.m === void 0) + d.m = "q" in d ? d.q : 0; + if ("V" in d) { + if (d.V < 1 || d.V > 53) + return null; + if (!("w" in d)) + d.w = 1; + if ("Z" in d) { + week = utcDate(newDate(d.y, 0, 1)), day2 = week.getUTCDay(); + week = day2 > 4 || day2 === 0 ? utcMonday.ceil(week) : utcMonday(week); + week = utcDay$1.offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = localDate(newDate(d.y, 0, 1)), day2 = week.getDay(); + week = day2 > 4 || day2 === 0 ? monday.ceil(week) : monday(week); + week = timeDay.offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) + d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day2 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day2 + 5) % 7 : d.w + d.U * 7 - (day2 + 6) % 7; + } + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } + return localDate(d); + }; + } + function parseSpecifier(d, specifier, string2, j) { + var i2 = 0, n = specifier.length, m = string2.length, c2, parse2; + while (i2 < n) { + if (j >= m) + return -1; + c2 = specifier.charCodeAt(i2++); + if (c2 === 37) { + c2 = specifier.charAt(i2++); + parse2 = parses[c2 in pads ? specifier.charAt(i2++) : c2]; + if (!parse2 || (j = parse2(d, string2, j)) < 0) + return -1; + } else if (c2 != string2.charCodeAt(j++)) { + return -1; + } + } + return j; + } + function parsePeriod(d, string2, i2) { + var n = periodRe.exec(string2.slice(i2)); + return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i2 + n[0].length) : -1; + } + function parseShortWeekday(d, string2, i2) { + var n = shortWeekdayRe.exec(string2.slice(i2)); + return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i2 + n[0].length) : -1; + } + function parseWeekday(d, string2, i2) { + var n = weekdayRe.exec(string2.slice(i2)); + return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i2 + n[0].length) : -1; + } + function parseShortMonth(d, string2, i2) { + var n = shortMonthRe.exec(string2.slice(i2)); + return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i2 + n[0].length) : -1; + } + function parseMonth(d, string2, i2) { + var n = monthRe.exec(string2.slice(i2)); + return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i2 + n[0].length) : -1; + } + function parseLocaleDateTime(d, string2, i2) { + return parseSpecifier(d, locale_dateTime, string2, i2); + } + function parseLocaleDate(d, string2, i2) { + return parseSpecifier(d, locale_date, string2, i2); + } + function parseLocaleTime(d, string2, i2) { + return parseSpecifier(d, locale_time, string2, i2); + } + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; + } + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } + function formatMonth(d) { + return locale_months[d.getMonth()]; + } + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } + function formatQuarter(d) { + return 1 + ~~(d.getMonth() / 3); + } + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; + } + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + function formatUTCQuarter(d) { + return 1 + ~~(d.getUTCMonth() / 3); + } + return { + format: function(specifier) { + var f2 = newFormat(specifier += "", formats); + f2.toString = function() { + return specifier; + }; + return f2; + }, + parse: function(specifier) { + var p = newParse(specifier += "", false); + p.toString = function() { + return specifier; + }; + return p; + }, + utcFormat: function(specifier) { + var f2 = newFormat(specifier += "", utcFormats); + f2.toString = function() { + return specifier; + }; + return f2; + }, + utcParse: function(specifier) { + var p = newParse(specifier += "", true); + p.toString = function() { + return specifier; + }; + return p; + } + }; + } + var pads = { "-": "", "_": " ", "0": "0" }, numberRe = /^\s*\d+/, percentRe = /^%/, requoteRe = /[\\^$*+?|[\]().{}]/g; + function pad(value2, fill, width2) { + var sign2 = value2 < 0 ? "-" : "", string2 = (sign2 ? -value2 : value2) + "", length2 = string2.length; + return sign2 + (length2 < width2 ? new Array(width2 - length2 + 1).join(fill) + string2 : string2); + } + function requote(s) { + return s.replace(requoteRe, "\\$&"); + } + function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); + } + function formatLookup(names) { + return new Map(names.map((name2, i2) => [name2.toLowerCase(), i2])); + } + function parseWeekdayNumberSunday(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 1)); + return n ? (d.w = +n[0], i2 + n[0].length) : -1; + } + function parseWeekdayNumberMonday(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 1)); + return n ? (d.u = +n[0], i2 + n[0].length) : -1; + } + function parseWeekNumberSunday(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.U = +n[0], i2 + n[0].length) : -1; + } + function parseWeekNumberISO(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.V = +n[0], i2 + n[0].length) : -1; + } + function parseWeekNumberMonday(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.W = +n[0], i2 + n[0].length) : -1; + } + function parseFullYear(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 4)); + return n ? (d.y = +n[0], i2 + n[0].length) : -1; + } + function parseYear(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i2 + n[0].length) : -1; + } + function parseZone(d, string2, i2) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string2.slice(i2, i2 + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i2 + n[0].length) : -1; + } + function parseQuarter(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 1)); + return n ? (d.q = n[0] * 3 - 3, i2 + n[0].length) : -1; + } + function parseMonthNumber(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.m = n[0] - 1, i2 + n[0].length) : -1; + } + function parseDayOfMonth(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.d = +n[0], i2 + n[0].length) : -1; + } + function parseDayOfYear(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 3)); + return n ? (d.m = 0, d.d = +n[0], i2 + n[0].length) : -1; + } + function parseHour24(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.H = +n[0], i2 + n[0].length) : -1; + } + function parseMinutes(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.M = +n[0], i2 + n[0].length) : -1; + } + function parseSeconds(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 2)); + return n ? (d.S = +n[0], i2 + n[0].length) : -1; + } + function parseMilliseconds(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 3)); + return n ? (d.L = +n[0], i2 + n[0].length) : -1; + } + function parseMicroseconds(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2, i2 + 6)); + return n ? (d.L = Math.floor(n[0] / 1e3), i2 + n[0].length) : -1; + } + function parseLiteralPercent(d, string2, i2) { + var n = percentRe.exec(string2.slice(i2, i2 + 1)); + return n ? i2 + n[0].length : -1; + } + function parseUnixTimestamp(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2)); + return n ? (d.Q = +n[0], i2 + n[0].length) : -1; + } + function parseUnixTimestampSeconds(d, string2, i2) { + var n = numberRe.exec(string2.slice(i2)); + return n ? (d.s = +n[0], i2 + n[0].length) : -1; + } + function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); + } + function formatHour24(d, p) { + return pad(d.getHours(), p, 2); + } + function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); + } + function formatDayOfYear(d, p) { + return pad(1 + timeDay.count(timeYear(d), d), p, 3); + } + function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); + } + function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; + } + function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); + } + function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); + } + function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); + } + function formatWeekdayNumberMonday(d) { + var day2 = d.getDay(); + return day2 === 0 ? 7 : day2; + } + function formatWeekNumberSunday(d, p) { + return pad(sunday.count(timeYear(d) - 1, d), p, 2); + } + function dISO(d) { + var day2 = d.getDay(); + return day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d); + } + function formatWeekNumberISO(d, p) { + d = dISO(d); + return pad(thursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2); + } + function formatWeekdayNumberSunday(d) { + return d.getDay(); + } + function formatWeekNumberMonday(d, p) { + return pad(monday.count(timeYear(d) - 1, d), p, 2); + } + function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); + } + function formatYearISO(d, p) { + d = dISO(d); + return pad(d.getFullYear() % 100, p, 2); + } + function formatFullYear(d, p) { + return pad(d.getFullYear() % 1e4, p, 4); + } + function formatFullYearISO(d, p) { + var day2 = d.getDay(); + d = day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d); + return pad(d.getFullYear() % 1e4, p, 4); + } + function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2); + } + function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); + } + function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); + } + function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); + } + function formatUTCDayOfYear(d, p) { + return pad(1 + utcDay$1.count(utcYear$1(d), d), p, 3); + } + function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); + } + function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; + } + function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); + } + function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); + } + function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); + } + function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; + } + function formatUTCWeekNumberSunday(d, p) { + return pad(utcSunday.count(utcYear$1(d) - 1, d), p, 2); + } + function UTCdISO(d) { + var day2 = d.getUTCDay(); + return day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d); + } + function formatUTCWeekNumberISO(d, p) { + d = UTCdISO(d); + return pad(utcThursday.count(utcYear$1(d), d) + (utcYear$1(d).getUTCDay() === 4), p, 2); + } + function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); + } + function formatUTCWeekNumberMonday(d, p) { + return pad(utcMonday.count(utcYear$1(d) - 1, d), p, 2); + } + function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); + } + function formatUTCYearISO(d, p) { + d = UTCdISO(d); + return pad(d.getUTCFullYear() % 100, p, 2); + } + function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 1e4, p, 4); + } + function formatUTCFullYearISO(d, p) { + var day2 = d.getUTCDay(); + d = day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d); + return pad(d.getUTCFullYear() % 1e4, p, 4); + } + function formatUTCZone() { + return "+0000"; + } + function formatLiteralPercent() { + return "%"; + } + function formatUnixTimestamp(d) { + return +d; + } + function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1e3); + } + var locale; + var timeFormat; + defaultLocale({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] + }); + function defaultLocale(definition2) { + locale = formatLocale(definition2); + timeFormat = locale.format; + locale.parse; + locale.utcFormat; + locale.utcParse; + return locale; + } + function date(t) { + return new Date(t); + } + function number(t) { + return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t); + } + function calendar(ticks2, tickInterval2, year2, month2, week, day2, hour2, minute2, second2, format2) { + var scale = continuous(), invert2 = scale.invert, domain = scale.domain; + var formatMillisecond = format2(".%L"), formatSecond = format2(":%S"), formatMinute = format2("%I:%M"), formatHour = format2("%I %p"), formatDay = format2("%a %d"), formatWeek = format2("%b %d"), formatMonth = format2("%B"), formatYear2 = format2("%Y"); + function tickFormat2(date2) { + return (second2(date2) < date2 ? formatMillisecond : minute2(date2) < date2 ? formatSecond : hour2(date2) < date2 ? formatMinute : day2(date2) < date2 ? formatHour : month2(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year2(date2) < date2 ? formatMonth : formatYear2)(date2); + } + scale.invert = function(y2) { + return new Date(invert2(y2)); + }; + scale.domain = function(_2) { + return arguments.length ? domain(Array.from(_2, number)) : domain().map(date); + }; + scale.ticks = function(interval2) { + var d = domain(); + return ticks2(d[0], d[d.length - 1], interval2 == null ? 10 : interval2); + }; + scale.tickFormat = function(count, specifier) { + return specifier == null ? tickFormat2 : format2(specifier); + }; + scale.nice = function(interval2) { + var d = domain(); + if (!interval2 || typeof interval2.range !== "function") + interval2 = tickInterval2(d[0], d[d.length - 1], interval2 == null ? 10 : interval2); + return interval2 ? domain(nice(d, interval2)) : scale; + }; + scale.copy = function() { + return copy$1(scale, calendar(ticks2, tickInterval2, year2, month2, week, day2, hour2, minute2, second2, format2)); + }; + return scale; + } + function time$1() { + return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, sunday, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments); + } + function colors(specifier) { + var n = specifier.length / 6 | 0, colors2 = new Array(n), i2 = 0; + while (i2 < n) + colors2[i2] = "#" + specifier.slice(i2 * 6, ++i2 * 6); + return colors2; + } + const d3schemeTableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"); + function constant$3(x2) { + return function constant2() { + return x2; + }; + } + const abs$1 = Math.abs; + const atan2 = Math.atan2; + const cos = Math.cos; + const max$2 = Math.max; + const min$2 = Math.min; + const sin = Math.sin; + const sqrt = Math.sqrt; + const epsilon$1 = 1e-12; + const pi$1 = Math.PI; + const halfPi = pi$1 / 2; + const tau$1 = 2 * pi$1; + function acos(x2) { + return x2 > 1 ? 0 : x2 < -1 ? pi$1 : Math.acos(x2); + } + function asin(x2) { + return x2 >= 1 ? halfPi : x2 <= -1 ? -halfPi : Math.asin(x2); + } + function arcInnerRadius(d) { + return d.innerRadius; + } + function arcOuterRadius(d) { + return d.outerRadius; + } + function arcStartAngle(d) { + return d.startAngle; + } + function arcEndAngle(d) { + return d.endAngle; + } + function arcPadAngle(d) { + return d && d.padAngle; + } + function intersect$1(x0, y0, x1, y1, x2, y2, x3, y3) { + var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10; + if (t * t < epsilon$1) + return; + t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; + return [x0 + t * x10, y0 + t * y10]; + } + function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { + var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max$2(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00; + if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) + cx0 = cx1, cy0 = cy1; + return { + cx: cx0, + cy: cy0, + x01: -ox, + y01: -oy, + x11: cx0 * (r1 / r - 1), + y11: cy0 * (r1 / r - 1) + }; + } + function d3arc() { + var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant$3(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null; + function arc() { + var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs$1(a1 - a0), cw = a1 > a0; + if (!context) + context = buffer = path$1(); + if (r1 < r0) + r = r1, r1 = r0, r0 = r; + if (!(r1 > epsilon$1)) + context.moveTo(0, 0); + else if (da > tau$1 - epsilon$1) { + context.moveTo(r1 * cos(a0), r1 * sin(a0)); + context.arc(0, 0, r1, a0, a1, !cw); + if (r0 > epsilon$1) { + context.moveTo(r0 * cos(a1), r0 * sin(a1)); + context.arc(0, 0, r0, a1, a0, cw); + } + } else { + var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon$1 && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = min$2(abs$1(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t02, t12; + if (rp > epsilon$1) { + var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap)); + if ((da0 -= p0 * 2) > epsilon$1) + p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0; + else + da0 = 0, a00 = a10 = (a0 + a1) / 2; + if ((da1 -= p1 * 2) > epsilon$1) + p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1; + else + da1 = 0, a01 = a11 = (a0 + a1) / 2; + } + var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10); + if (rc > epsilon$1) { + var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc; + if (da < pi$1 && (oc = intersect$1(x01, y01, x00, y00, x11, y11, x10, y10))) { + var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]); + rc0 = min$2(rc, (r0 - lc) / (kc - 1)); + rc1 = min$2(rc, (r1 - lc) / (kc + 1)); + } + } + if (!(da1 > epsilon$1)) + context.moveTo(x01, y01); + else if (rc1 > epsilon$1) { + t02 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); + t12 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); + context.moveTo(t02.cx + t02.x01, t02.cy + t02.y01); + if (rc1 < rc) + context.arc(t02.cx, t02.cy, rc1, atan2(t02.y01, t02.x01), atan2(t12.y01, t12.x01), !cw); + else { + context.arc(t02.cx, t02.cy, rc1, atan2(t02.y01, t02.x01), atan2(t02.y11, t02.x11), !cw); + context.arc(0, 0, r1, atan2(t02.cy + t02.y11, t02.cx + t02.x11), atan2(t12.cy + t12.y11, t12.cx + t12.x11), !cw); + context.arc(t12.cx, t12.cy, rc1, atan2(t12.y11, t12.x11), atan2(t12.y01, t12.x01), !cw); + } + } else + context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); + if (!(r0 > epsilon$1) || !(da0 > epsilon$1)) + context.lineTo(x10, y10); + else if (rc0 > epsilon$1) { + t02 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); + t12 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); + context.lineTo(t02.cx + t02.x01, t02.cy + t02.y01); + if (rc0 < rc) + context.arc(t02.cx, t02.cy, rc0, atan2(t02.y01, t02.x01), atan2(t12.y01, t12.x01), !cw); + else { + context.arc(t02.cx, t02.cy, rc0, atan2(t02.y01, t02.x01), atan2(t02.y11, t02.x11), !cw); + context.arc(0, 0, r0, atan2(t02.cy + t02.y11, t02.cx + t02.x11), atan2(t12.cy + t12.y11, t12.cx + t12.x11), cw); + context.arc(t12.cx, t12.cy, rc0, atan2(t12.y11, t12.x11), atan2(t12.y01, t12.x01), !cw); + } + } else + context.arc(0, 0, r0, a10, a00, cw); + } + context.closePath(); + if (buffer) + return context = null, buffer + "" || null; + } + arc.centroid = function() { + var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi$1 / 2; + return [cos(a) * r, sin(a) * r]; + }; + arc.innerRadius = function(_2) { + return arguments.length ? (innerRadius = typeof _2 === "function" ? _2 : constant$3(+_2), arc) : innerRadius; + }; + arc.outerRadius = function(_2) { + return arguments.length ? (outerRadius = typeof _2 === "function" ? _2 : constant$3(+_2), arc) : outerRadius; + }; + arc.cornerRadius = function(_2) { + return arguments.length ? (cornerRadius = typeof _2 === "function" ? _2 : constant$3(+_2), arc) : cornerRadius; + }; + arc.padRadius = function(_2) { + return arguments.length ? (padRadius = _2 == null ? null : typeof _2 === "function" ? _2 : constant$3(+_2), arc) : padRadius; + }; + arc.startAngle = function(_2) { + return arguments.length ? (startAngle = typeof _2 === "function" ? _2 : constant$3(+_2), arc) : startAngle; + }; + arc.endAngle = function(_2) { + return arguments.length ? (endAngle = typeof _2 === "function" ? _2 : constant$3(+_2), arc) : endAngle; + }; + arc.padAngle = function(_2) { + return arguments.length ? (padAngle = typeof _2 === "function" ? _2 : constant$3(+_2), arc) : padAngle; + }; + arc.context = function(_2) { + return arguments.length ? (context = _2 == null ? null : _2, arc) : context; + }; + return arc; + } + function array(x2) { + return typeof x2 === "object" && "length" in x2 ? x2 : Array.from(x2); + } + function Linear(context) { + this._context = context; + } + Linear.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2); + break; + case 1: + this._point = 2; + default: + this._context.lineTo(x2, y2); + break; + } + } + }; + function curveLinear(context) { + return new Linear(context); + } + function x$1(p) { + return p[0]; + } + function y$1(p) { + return p[1]; + } + function line$1(x2, y2) { + var defined = constant$3(true), context = null, curve = curveLinear, output = null; + x2 = typeof x2 === "function" ? x2 : x2 === void 0 ? x$1 : constant$3(x2); + y2 = typeof y2 === "function" ? y2 : y2 === void 0 ? y$1 : constant$3(y2); + function line2(data) { + var i2, n = (data = array(data)).length, d, defined0 = false, buffer; + if (context == null) + output = curve(buffer = path$1()); + for (i2 = 0; i2 <= n; ++i2) { + if (!(i2 < n && defined(d = data[i2], i2, data)) === defined0) { + if (defined0 = !defined0) + output.lineStart(); + else + output.lineEnd(); + } + if (defined0) + output.point(+x2(d, i2, data), +y2(d, i2, data)); + } + if (buffer) + return output = null, buffer + "" || null; + } + line2.x = function(_2) { + return arguments.length ? (x2 = typeof _2 === "function" ? _2 : constant$3(+_2), line2) : x2; + }; + line2.y = function(_2) { + return arguments.length ? (y2 = typeof _2 === "function" ? _2 : constant$3(+_2), line2) : y2; + }; + line2.defined = function(_2) { + return arguments.length ? (defined = typeof _2 === "function" ? _2 : constant$3(!!_2), line2) : defined; + }; + line2.curve = function(_2) { + return arguments.length ? (curve = _2, context != null && (output = curve(context)), line2) : curve; + }; + line2.context = function(_2) { + return arguments.length ? (_2 == null ? context = output = null : output = curve(context = _2), line2) : context; + }; + return line2; + } + function descending(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; + } + function identity$1(d) { + return d; + } + function d3pie() { + var value2 = identity$1, sortValues = descending, sort2 = null, startAngle = constant$3(0), endAngle = constant$3(tau$1), padAngle = constant$3(0); + function pie2(data) { + var i2, n = (data = array(data)).length, j, k, sum2 = 0, index2 = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da = Math.min(tau$1, Math.max(-tau$1, endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), pa = p * (da < 0 ? -1 : 1), v; + for (i2 = 0; i2 < n; ++i2) { + if ((v = arcs[index2[i2] = i2] = +value2(data[i2], i2, data)) > 0) { + sum2 += v; + } + } + if (sortValues != null) + index2.sort(function(i3, j2) { + return sortValues(arcs[i3], arcs[j2]); + }); + else if (sort2 != null) + index2.sort(function(i3, j2) { + return sort2(data[i3], data[j2]); + }); + for (i2 = 0, k = sum2 ? (da - n * pa) / sum2 : 0; i2 < n; ++i2, a0 = a1) { + j = index2[i2], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { + data: data[j], + index: i2, + value: v, + startAngle: a0, + endAngle: a1, + padAngle: p + }; + } + return arcs; + } + pie2.value = function(_2) { + return arguments.length ? (value2 = typeof _2 === "function" ? _2 : constant$3(+_2), pie2) : value2; + }; + pie2.sortValues = function(_2) { + return arguments.length ? (sortValues = _2, sort2 = null, pie2) : sortValues; + }; + pie2.sort = function(_2) { + return arguments.length ? (sort2 = _2, sortValues = null, pie2) : sort2; + }; + pie2.startAngle = function(_2) { + return arguments.length ? (startAngle = typeof _2 === "function" ? _2 : constant$3(+_2), pie2) : startAngle; + }; + pie2.endAngle = function(_2) { + return arguments.length ? (endAngle = typeof _2 === "function" ? _2 : constant$3(+_2), pie2) : endAngle; + }; + pie2.padAngle = function(_2) { + return arguments.length ? (padAngle = typeof _2 === "function" ? _2 : constant$3(+_2), pie2) : padAngle; + }; + return pie2; + } + class Bump { + constructor(context, x2) { + this._context = context; + this._x = x2; + } + areaStart() { + this._line = 0; + } + areaEnd() { + this._line = NaN; + } + lineStart() { + this._point = 0; + } + lineEnd() { + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + } + point(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: { + this._point = 1; + if (this._line) + this._context.lineTo(x2, y2); + else + this._context.moveTo(x2, y2); + break; + } + case 1: + this._point = 2; + default: { + if (this._x) + this._context.bezierCurveTo(this._x0 = (this._x0 + x2) / 2, this._y0, this._x0, y2, x2, y2); + else + this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y2) / 2, x2, this._y0, x2, y2); + break; + } + } + this._x0 = x2, this._y0 = y2; + } + } + function bumpX(context) { + return new Bump(context, true); + } + function bumpY(context) { + return new Bump(context, false); + } + function noop$1() { + } + function point$6(that, x2, y2) { + that._context.bezierCurveTo( + (2 * that._x0 + that._x1) / 3, + (2 * that._y0 + that._y1) / 3, + (that._x0 + 2 * that._x1) / 3, + (that._y0 + 2 * that._y1) / 3, + (that._x0 + 4 * that._x1 + x2) / 6, + (that._y0 + 4 * that._y1 + y2) / 6 + ); + } + function Basis(context) { + this._context = context; + } + Basis.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 3: + point$6(this, this._x1, this._y1); + case 2: + this._context.lineTo(this._x1, this._y1); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); + default: + point$6(this, x2, y2); + break; + } + this._x0 = this._x1, this._x1 = x2; + this._y0 = this._y1, this._y1 = y2; + } + }; + function curveBasis(context) { + return new Basis(context); + } + function BasisClosed(context) { + this._context = context; + } + BasisClosed.prototype = { + areaStart: noop$1, + areaEnd: noop$1, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x2, this._y2); + this._context.closePath(); + break; + } + case 2: { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); + this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x2, this._y2); + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + break; + } + } + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + this._x2 = x2, this._y2 = y2; + break; + case 1: + this._point = 2; + this._x3 = x2, this._y3 = y2; + break; + case 2: + this._point = 3; + this._x4 = x2, this._y4 = y2; + this._context.moveTo((this._x0 + 4 * this._x1 + x2) / 6, (this._y0 + 4 * this._y1 + y2) / 6); + break; + default: + point$6(this, x2, y2); + break; + } + this._x0 = this._x1, this._x1 = x2; + this._y0 = this._y1, this._y1 = y2; + } + }; + function curveBasisClosed(context) { + return new BasisClosed(context); + } + function BasisOpen(context) { + this._context = context; + } + BasisOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 3) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + var x0 = (this._x0 + 4 * this._x1 + x2) / 6, y0 = (this._y0 + 4 * this._y1 + y2) / 6; + this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); + break; + case 3: + this._point = 4; + default: + point$6(this, x2, y2); + break; + } + this._x0 = this._x1, this._x1 = x2; + this._y0 = this._y1, this._y1 = y2; + } + }; + function curveBasisOpen(context) { + return new BasisOpen(context); + } + function Bundle(context, beta) { + this._basis = new Basis(context); + this._beta = beta; + } + Bundle.prototype = { + lineStart: function() { + this._x = []; + this._y = []; + this._basis.lineStart(); + }, + lineEnd: function() { + var x2 = this._x, y2 = this._y, j = x2.length - 1; + if (j > 0) { + var x0 = x2[0], y0 = y2[0], dx = x2[j] - x0, dy = y2[j] - y0, i2 = -1, t; + while (++i2 <= j) { + t = i2 / j; + this._basis.point( + this._beta * x2[i2] + (1 - this._beta) * (x0 + t * dx), + this._beta * y2[i2] + (1 - this._beta) * (y0 + t * dy) + ); + } + } + this._x = this._y = null; + this._basis.lineEnd(); + }, + point: function(x2, y2) { + this._x.push(+x2); + this._y.push(+y2); + } + }; + const curveBundle = function custom(beta) { + function bundle(context) { + return beta === 1 ? new Basis(context) : new Bundle(context, beta); + } + bundle.beta = function(beta2) { + return custom(+beta2); + }; + return bundle; + }(0.85); + function point$5(that, x2, y2) { + that._context.bezierCurveTo( + that._x1 + that._k * (that._x2 - that._x0), + that._y1 + that._k * (that._y2 - that._y0), + that._x2 + that._k * (that._x1 - x2), + that._y2 + that._k * (that._y1 - y2), + that._x2, + that._y2 + ); + } + function Cardinal(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; + } + Cardinal.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + point$5(this, this._x1, this._y1); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2); + break; + case 1: + this._point = 2; + this._x1 = x2, this._y1 = y2; + break; + case 2: + this._point = 3; + default: + point$5(this, x2, y2); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2; + } + }; + const curveCardinal = function custom(tension) { + function cardinal(context) { + return new Cardinal(context, tension); + } + cardinal.tension = function(tension2) { + return custom(+tension2); + }; + return cardinal; + }(0); + function CardinalClosed(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; + } + CardinalClosed.prototype = { + areaStart: noop$1, + areaEnd: noop$1, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + this._x3 = x2, this._y3 = y2; + break; + case 1: + this._point = 2; + this._context.moveTo(this._x4 = x2, this._y4 = y2); + break; + case 2: + this._point = 3; + this._x5 = x2, this._y5 = y2; + break; + default: + point$5(this, x2, y2); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2; + } + }; + const curveCardinalClosed = function custom(tension) { + function cardinal(context) { + return new CardinalClosed(context, tension); + } + cardinal.tension = function(tension2) { + return custom(+tension2); + }; + return cardinal; + }(0); + function CardinalOpen(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; + } + CardinalOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 3) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + default: + point$5(this, x2, y2); + break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2; + } + }; + const curveCardinalOpen = function custom(tension) { + function cardinal(context) { + return new CardinalOpen(context, tension); + } + cardinal.tension = function(tension2) { + return custom(+tension2); + }; + return cardinal; + }(0); + function point$4(that, x2, y2) { + var x1 = that._x1, y1 = that._y1, x22 = that._x2, y22 = that._y2; + if (that._l01_a > epsilon$1) { + var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a); + x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; + y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; + } + if (that._l23_a > epsilon$1) { + var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a); + x22 = (x22 * b + that._x1 * that._l23_2a - x2 * that._l12_2a) / m; + y22 = (y22 * b + that._y1 * that._l23_2a - y2 * that._l12_2a) / m; + } + that._context.bezierCurveTo(x1, y1, x22, y22, that._x2, that._y2); + } + function CatmullRom(context, alpha) { + this._context = context; + this._alpha = alpha; + } + CatmullRom.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x2, this._y2); + break; + case 3: + this.point(this._x2, this._y2); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + if (this._point) { + var x23 = this._x2 - x2, y23 = this._y2 - y2; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + default: + point$4(this, x2, y2); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2; + } + }; + const curveCatmullRom = function custom(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0); + } + catmullRom.alpha = function(alpha2) { + return custom(+alpha2); + }; + return catmullRom; + }(0.5); + function CatmullRomClosed(context, alpha) { + this._context = context; + this._alpha = alpha; + } + CatmullRomClosed.prototype = { + areaStart: noop$1, + areaEnd: noop$1, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + if (this._point) { + var x23 = this._x2 - x2, y23 = this._y2 - y2; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + this._x3 = x2, this._y3 = y2; + break; + case 1: + this._point = 2; + this._context.moveTo(this._x4 = x2, this._y4 = y2); + break; + case 2: + this._point = 3; + this._x5 = x2, this._y5 = y2; + break; + default: + point$4(this, x2, y2); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2; + } + }; + const curveCatmullRomClosed = function custom(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0); + } + catmullRom.alpha = function(alpha2) { + return custom(+alpha2); + }; + return catmullRom; + }(0.5); + function CatmullRomOpen(context, alpha) { + this._context = context; + this._alpha = alpha; + } + CatmullRomOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; + }, + lineEnd: function() { + if (this._line || this._line !== 0 && this._point === 3) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + if (this._point) { + var x23 = this._x2 - x2, y23 = this._y2 - y2; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + switch (this._point) { + case 0: + this._point = 1; + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); + break; + case 3: + this._point = 4; + default: + point$4(this, x2, y2); + break; + } + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2; + } + }; + const curveCatmullRomOpen = function custom(alpha) { + function catmullRom(context) { + return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0); + } + catmullRom.alpha = function(alpha2) { + return custom(+alpha2); + }; + return catmullRom; + }(0.5); + function LinearClosed(context) { + this._context = context; + } + LinearClosed.prototype = { + areaStart: noop$1, + areaEnd: noop$1, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._point) + this._context.closePath(); + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + if (this._point) + this._context.lineTo(x2, y2); + else + this._point = 1, this._context.moveTo(x2, y2); + } + }; + function curveLinearClosed(context) { + return new LinearClosed(context); + } + function sign(x2) { + return x2 < 0 ? -1 : 1; + } + function slope3(that, x2, y2) { + var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1); + return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; + } + function slope2(that, t) { + var h = that._x1 - that._x0; + return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; + } + function point$3(that, t02, t12) { + var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3; + that._context.bezierCurveTo(x0 + dx, y0 + dx * t02, x1 - dx, y1 - dx * t12, x1, y1); + } + function MonotoneX(context) { + this._context = context; + } + MonotoneX.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: + this._context.lineTo(this._x1, this._y1); + break; + case 3: + point$3(this, this._t0, slope2(this, this._t0)); + break; + } + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x2, y2) { + var t12 = NaN; + x2 = +x2, y2 = +y2; + if (x2 === this._x1 && y2 === this._y1) + return; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2); + break; + case 1: + this._point = 2; + break; + case 2: + this._point = 3; + point$3(this, slope2(this, t12 = slope3(this, x2, y2)), t12); + break; + default: + point$3(this, this._t0, t12 = slope3(this, x2, y2)); + break; + } + this._x0 = this._x1, this._x1 = x2; + this._y0 = this._y1, this._y1 = y2; + this._t0 = t12; + } + }; + function MonotoneY(context) { + this._context = new ReflectContext(context); + } + (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x2, y2) { + MonotoneX.prototype.point.call(this, y2, x2); + }; + function ReflectContext(context) { + this._context = context; + } + ReflectContext.prototype = { + moveTo: function(x2, y2) { + this._context.moveTo(y2, x2); + }, + closePath: function() { + this._context.closePath(); + }, + lineTo: function(x2, y2) { + this._context.lineTo(y2, x2); + }, + bezierCurveTo: function(x1, y1, x2, y2, x3, y3) { + this._context.bezierCurveTo(y1, x1, y2, x2, y3, x3); + } + }; + function monotoneX(context) { + return new MonotoneX(context); + } + function monotoneY(context) { + return new MonotoneY(context); + } + function Natural(context) { + this._context = context; + } + Natural.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = []; + this._y = []; + }, + lineEnd: function() { + var x2 = this._x, y2 = this._y, n = x2.length; + if (n) { + this._line ? this._context.lineTo(x2[0], y2[0]) : this._context.moveTo(x2[0], y2[0]); + if (n === 2) { + this._context.lineTo(x2[1], y2[1]); + } else { + var px = controlPoints(x2), py = controlPoints(y2); + for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { + this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x2[i1], y2[i1]); + } + } + } + if (this._line || this._line !== 0 && n === 1) + this._context.closePath(); + this._line = 1 - this._line; + this._x = this._y = null; + }, + point: function(x2, y2) { + this._x.push(+x2); + this._y.push(+y2); + } + }; + function controlPoints(x2) { + var i2, n = x2.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n); + a[0] = 0, b[0] = 2, r[0] = x2[0] + 2 * x2[1]; + for (i2 = 1; i2 < n - 1; ++i2) + a[i2] = 1, b[i2] = 4, r[i2] = 4 * x2[i2] + 2 * x2[i2 + 1]; + a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x2[n - 1] + x2[n]; + for (i2 = 1; i2 < n; ++i2) + m = a[i2] / b[i2 - 1], b[i2] -= m, r[i2] -= m * r[i2 - 1]; + a[n - 1] = r[n - 1] / b[n - 1]; + for (i2 = n - 2; i2 >= 0; --i2) + a[i2] = (r[i2] - a[i2 + 1]) / b[i2]; + b[n - 1] = (x2[n] + a[n - 1]) / 2; + for (i2 = 0; i2 < n - 1; ++i2) + b[i2] = 2 * x2[i2 + 1] - a[i2 + 1]; + return [a, b]; + } + function curveNatural(context) { + return new Natural(context); + } + function Step(context, t) { + this._context = context; + this._t = t; + } + Step.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = this._y = NaN; + this._point = 0; + }, + lineEnd: function() { + if (0 < this._t && this._t < 1 && this._point === 2) + this._context.lineTo(this._x, this._y); + if (this._line || this._line !== 0 && this._point === 1) + this._context.closePath(); + if (this._line >= 0) + this._t = 1 - this._t, this._line = 1 - this._line; + }, + point: function(x2, y2) { + x2 = +x2, y2 = +y2; + switch (this._point) { + case 0: + this._point = 1; + this._line ? this._context.lineTo(x2, y2) : this._context.moveTo(x2, y2); + break; + case 1: + this._point = 2; + default: { + if (this._t <= 0) { + this._context.lineTo(this._x, y2); + this._context.lineTo(x2, y2); + } else { + var x1 = this._x * (1 - this._t) + x2 * this._t; + this._context.lineTo(x1, this._y); + this._context.lineTo(x1, y2); + } + break; + } + } + this._x = x2, this._y = y2; + } + }; + function curveStep(context) { + return new Step(context, 0.5); + } + function stepBefore(context) { + return new Step(context, 0); + } + function stepAfter(context) { + return new Step(context, 1); + } + function Transform(k, x2, y2) { + this.k = k; + this.x = x2; + this.y = y2; + } + Transform.prototype = { + constructor: Transform, + scale: function(k) { + return k === 1 ? this : new Transform(this.k * k, this.x, this.y); + }, + translate: function(x2, y2) { + return x2 === 0 & y2 === 0 ? this : new Transform(this.k, this.x + this.k * x2, this.y + this.k * y2); + }, + apply: function(point2) { + return [point2[0] * this.k + this.x, point2[1] * this.k + this.y]; + }, + applyX: function(x2) { + return x2 * this.k + this.x; + }, + applyY: function(y2) { + return y2 * this.k + this.y; + }, + invert: function(location2) { + return [(location2[0] - this.x) / this.k, (location2[1] - this.y) / this.k]; + }, + invertX: function(x2) { + return (x2 - this.x) / this.k; + }, + invertY: function(y2) { + return (y2 - this.y) / this.k; + }, + rescaleX: function(x2) { + return x2.copy().domain(x2.range().map(this.invertX, this).map(x2.invert, x2)); + }, + rescaleY: function(y2) { + return y2.copy().domain(y2.range().map(this.invertY, this).map(y2.invert, y2)); + }, + toString: function() { + return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; + } + }; + Transform.prototype; + /*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */ + const { + entries, + setPrototypeOf, + isFrozen, + getPrototypeOf, + getOwnPropertyDescriptor + } = Object; + let { + freeze, + seal, + create + } = Object; + let { + apply: apply$2, + construct + } = typeof Reflect !== "undefined" && Reflect; + if (!apply$2) { + apply$2 = function apply2(fun, thisValue, args) { + return fun.apply(thisValue, args); + }; + } + if (!freeze) { + freeze = function freeze2(x2) { + return x2; + }; + } + if (!seal) { + seal = function seal2(x2) { + return x2; + }; + } + if (!construct) { + construct = function construct2(Func, args) { + return new Func(...args); + }; + } + const arrayForEach = unapply(Array.prototype.forEach); + const arrayPop = unapply(Array.prototype.pop); + const arrayPush$1 = unapply(Array.prototype.push); + const stringToLowerCase = unapply(String.prototype.toLowerCase); + const stringToString = unapply(String.prototype.toString); + const stringMatch = unapply(String.prototype.match); + const stringReplace = unapply(String.prototype.replace); + const stringIndexOf = unapply(String.prototype.indexOf); + const stringTrim = unapply(String.prototype.trim); + const regExpTest = unapply(RegExp.prototype.test); + const typeErrorCreate = unconstruct(TypeError); + function unapply(func) { + return function(thisArg) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return apply$2(func, thisArg, args); + }; + } + function unconstruct(func) { + return function() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + return construct(func, args); + }; + } + function addToSet(set2, array2, transformCaseFunc) { + var _transformCaseFunc; + transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase; + if (setPrototypeOf) { + setPrototypeOf(set2, null); + } + let l = array2.length; + while (l--) { + let element2 = array2[l]; + if (typeof element2 === "string") { + const lcElement = transformCaseFunc(element2); + if (lcElement !== element2) { + if (!isFrozen(array2)) { + array2[l] = lcElement; + } + element2 = lcElement; + } + } + set2[element2] = true; + } + return set2; + } + function clone$2(object2) { + const newObject = create(null); + for (const [property2, value2] of entries(object2)) { + newObject[property2] = value2; + } + return newObject; + } + function lookupGetter(object2, prop) { + while (object2 !== null) { + const desc = getOwnPropertyDescriptor(object2, prop); + if (desc) { + if (desc.get) { + return unapply(desc.get); + } + if (typeof desc.value === "function") { + return unapply(desc.value); + } + } + object2 = getPrototypeOf(object2); + } + function fallbackValue(element2) { + console.warn("fallback value for", element2); + return null; + } + return fallbackValue; + } + const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]); + const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]); + const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]); + const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]); + const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]); + const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]); + const text$2 = freeze(["#text"]); + const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]); + const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]); + const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]); + const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]); + const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); + const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); + const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm); + const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); + const ARIA_ATTR = seal(/^aria-[\-\w]+$/); + const IS_ALLOWED_URI = seal( + /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i + // eslint-disable-line no-useless-escape + ); + const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); + const ATTR_WHITESPACE = seal( + /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g + // eslint-disable-line no-control-regex + ); + const DOCTYPE_NAME = seal(/^html$/i); + var EXPRESSIONS = /* @__PURE__ */ Object.freeze({ + __proto__: null, + MUSTACHE_EXPR, + ERB_EXPR, + TMPLIT_EXPR, + DATA_ATTR, + ARIA_ATTR, + IS_ALLOWED_URI, + IS_SCRIPT_OR_DATA, + ATTR_WHITESPACE, + DOCTYPE_NAME + }); + const getGlobal = () => typeof window === "undefined" ? null : window; + const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) { + if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") { + return null; + } + let suffix = null; + const ATTR_NAME = "data-tt-policy-suffix"; + if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) { + suffix = purifyHostElement.getAttribute(ATTR_NAME); + } + const policyName = "dompurify" + (suffix ? "#" + suffix : ""); + try { + return trustedTypes.createPolicy(policyName, { + createHTML(html2) { + return html2; + }, + createScriptURL(scriptUrl) { + return scriptUrl; + } + }); + } catch (_2) { + console.warn("TrustedTypes policy " + policyName + " could not be created."); + return null; + } + }; + function createDOMPurify() { + let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(); + const DOMPurify = (root2) => createDOMPurify(root2); + DOMPurify.version = "3.0.5"; + DOMPurify.removed = []; + if (!window2 || !window2.document || window2.document.nodeType !== 9) { + DOMPurify.isSupported = false; + return DOMPurify; + } + const originalDocument = window2.document; + const currentScript = originalDocument.currentScript; + let { + document: document2 + } = window2; + const { + DocumentFragment, + HTMLTemplateElement, + Node, + Element, + NodeFilter, + NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap, + HTMLFormElement, + DOMParser: DOMParser2, + trustedTypes + } = window2; + const ElementPrototype = Element.prototype; + const cloneNode = lookupGetter(ElementPrototype, "cloneNode"); + const getNextSibling = lookupGetter(ElementPrototype, "nextSibling"); + const getChildNodes = lookupGetter(ElementPrototype, "childNodes"); + const getParentNode = lookupGetter(ElementPrototype, "parentNode"); + if (typeof HTMLTemplateElement === "function") { + const template = document2.createElement("template"); + if (template.content && template.content.ownerDocument) { + document2 = template.content.ownerDocument; + } + } + let trustedTypesPolicy; + let emptyHTML = ""; + const { + implementation, + createNodeIterator, + createDocumentFragment, + getElementsByTagName + } = document2; + const { + importNode + } = originalDocument; + let hooks = {}; + DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0; + const { + MUSTACHE_EXPR: MUSTACHE_EXPR2, + ERB_EXPR: ERB_EXPR2, + TMPLIT_EXPR: TMPLIT_EXPR2, + DATA_ATTR: DATA_ATTR2, + ARIA_ATTR: ARIA_ATTR2, + IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2, + ATTR_WHITESPACE: ATTR_WHITESPACE2 + } = EXPRESSIONS; + let { + IS_ALLOWED_URI: IS_ALLOWED_URI$1 + } = EXPRESSIONS; + let ALLOWED_TAGS = null; + const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text$2]); + let ALLOWED_ATTR = null; + const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]); + let CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(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 + } + })); + let FORBID_TAGS = null; + let FORBID_ATTR = null; + let ALLOW_ARIA_ATTR = true; + let ALLOW_DATA_ATTR = true; + let ALLOW_UNKNOWN_PROTOCOLS = false; + let ALLOW_SELF_CLOSE_IN_ATTR = true; + let SAFE_FOR_TEMPLATES = false; + let WHOLE_DOCUMENT = false; + let SET_CONFIG = false; + let FORCE_BODY = false; + let RETURN_DOM = false; + let RETURN_DOM_FRAGMENT = false; + let RETURN_TRUSTED_TYPE = false; + let SANITIZE_DOM = true; + let SANITIZE_NAMED_PROPS = false; + const SANITIZE_NAMED_PROPS_PREFIX = "user-content-"; + let KEEP_CONTENT = true; + let IN_PLACE = false; + let USE_PROFILES = {}; + let FORBID_CONTENTS = null; + const DEFAULT_FORBID_CONTENTS = addToSet({}, ["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 DATA_URI_TAGS = null; + const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]); + let URI_SAFE_ATTRIBUTES = null; + const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]); + const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML"; + const SVG_NAMESPACE = "http://www.w3.org/2000/svg"; + const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + let NAMESPACE = HTML_NAMESPACE; + let IS_EMPTY_INPUT = false; + let ALLOWED_NAMESPACES = null; + const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString); + let PARSER_MEDIA_TYPE; + const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"]; + const DEFAULT_PARSER_MEDIA_TYPE = "text/html"; + let transformCaseFunc; + let CONFIG = null; + const formElement = document2.createElement("form"); + const isRegexOrFunction = function isRegexOrFunction2(testValue) { + return testValue instanceof RegExp || testValue instanceof Function; + }; + const _parseConfig = function _parseConfig2(cfg) { + if (CONFIG && CONFIG === cfg) { + return; + } + if (!cfg || typeof cfg !== "object") { + cfg = {}; + } + cfg = clone$2(cfg); + PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes + SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; + transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase; + ALLOWED_TAGS = "ALLOWED_TAGS" in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS; + ALLOWED_ATTR = "ALLOWED_ATTR" in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR; + ALLOWED_NAMESPACES = "ALLOWED_NAMESPACES" in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES; + URI_SAFE_ATTRIBUTES = "ADD_URI_SAFE_ATTR" in cfg ? addToSet( + clone$2(DEFAULT_URI_SAFE_ATTRIBUTES), + // eslint-disable-line indent + cfg.ADD_URI_SAFE_ATTR, + // eslint-disable-line indent + transformCaseFunc + // eslint-disable-line indent + ) : DEFAULT_URI_SAFE_ATTRIBUTES; + DATA_URI_TAGS = "ADD_DATA_URI_TAGS" in cfg ? addToSet( + clone$2(DEFAULT_DATA_URI_TAGS), + // eslint-disable-line indent + cfg.ADD_DATA_URI_TAGS, + // eslint-disable-line indent + transformCaseFunc + // eslint-disable-line indent + ) : DEFAULT_DATA_URI_TAGS; + FORBID_CONTENTS = "FORBID_CONTENTS" in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS; + FORBID_TAGS = "FORBID_TAGS" in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {}; + FORBID_ATTR = "FORBID_ATTR" in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {}; + USE_PROFILES = "USE_PROFILES" in cfg ? cfg.USE_PROFILES : false; + ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; + ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; + ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; + ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; + SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; + WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; + RETURN_DOM = cfg.RETURN_DOM || false; + RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; + RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; + FORCE_BODY = cfg.FORCE_BODY || false; + SANITIZE_DOM = cfg.SANITIZE_DOM !== false; + SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; + KEEP_CONTENT = cfg.KEEP_CONTENT !== false; + IN_PLACE = cfg.IN_PLACE || false; + IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI; + NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; + CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {}; + if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) { + CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck; + } + if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) { + CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck; + } + if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") { + CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements; + } + if (SAFE_FOR_TEMPLATES) { + ALLOW_DATA_ATTR = false; + } + if (RETURN_DOM_FRAGMENT) { + RETURN_DOM = true; + } + if (USE_PROFILES) { + ALLOWED_TAGS = addToSet({}, [...text$2]); + ALLOWED_ATTR = []; + if (USE_PROFILES.html === true) { + addToSet(ALLOWED_TAGS, html$1); + addToSet(ALLOWED_ATTR, html); + } + if (USE_PROFILES.svg === true) { + addToSet(ALLOWED_TAGS, svg$1); + addToSet(ALLOWED_ATTR, svg); + addToSet(ALLOWED_ATTR, xml); + } + if (USE_PROFILES.svgFilters === true) { + addToSet(ALLOWED_TAGS, svgFilters); + addToSet(ALLOWED_ATTR, svg); + addToSet(ALLOWED_ATTR, xml); + } + if (USE_PROFILES.mathMl === true) { + addToSet(ALLOWED_TAGS, mathMl$1); + addToSet(ALLOWED_ATTR, mathMl); + addToSet(ALLOWED_ATTR, xml); + } + } + if (cfg.ADD_TAGS) { + if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { + ALLOWED_TAGS = clone$2(ALLOWED_TAGS); + } + addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); + } + if (cfg.ADD_ATTR) { + if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { + ALLOWED_ATTR = clone$2(ALLOWED_ATTR); + } + addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); + } + if (cfg.ADD_URI_SAFE_ATTR) { + addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); + } + if (cfg.FORBID_CONTENTS) { + if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { + FORBID_CONTENTS = clone$2(FORBID_CONTENTS); + } + addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); + } + if (KEEP_CONTENT) { + ALLOWED_TAGS["#text"] = true; + } + if (WHOLE_DOCUMENT) { + addToSet(ALLOWED_TAGS, ["html", "head", "body"]); + } + if (ALLOWED_TAGS.table) { + addToSet(ALLOWED_TAGS, ["tbody"]); + delete FORBID_TAGS.tbody; + } + if (cfg.TRUSTED_TYPES_POLICY) { + if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") { + throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); + } + if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") { + throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); + } + trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; + emptyHTML = trustedTypesPolicy.createHTML(""); + } else { + if (trustedTypesPolicy === void 0) { + trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript); + } + if (trustedTypesPolicy !== null && typeof emptyHTML === "string") { + emptyHTML = trustedTypesPolicy.createHTML(""); + } + } + if (freeze) { + freeze(cfg); + } + CONFIG = cfg; + }; + const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]); + const HTML_INTEGRATION_POINTS = addToSet({}, ["foreignobject", "desc", "title", "annotation-xml"]); + const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]); + const ALL_SVG_TAGS = addToSet({}, svg$1); + addToSet(ALL_SVG_TAGS, svgFilters); + addToSet(ALL_SVG_TAGS, svgDisallowed); + const ALL_MATHML_TAGS = addToSet({}, mathMl$1); + addToSet(ALL_MATHML_TAGS, mathMlDisallowed); + const _checkValidNamespace = function _checkValidNamespace2(element2) { + let parent = getParentNode(element2); + if (!parent || !parent.tagName) { + parent = { + namespaceURI: NAMESPACE, + tagName: "template" + }; + } + const tagName = stringToLowerCase(element2.tagName); + const parentTagName = stringToLowerCase(parent.tagName); + if (!ALLOWED_NAMESPACES[element2.namespaceURI]) { + return false; + } + if (element2.namespaceURI === SVG_NAMESPACE) { + if (parent.namespaceURI === HTML_NAMESPACE) { + return tagName === "svg"; + } + if (parent.namespaceURI === MATHML_NAMESPACE) { + return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); + } + return Boolean(ALL_SVG_TAGS[tagName]); + } + if (element2.namespaceURI === MATHML_NAMESPACE) { + if (parent.namespaceURI === HTML_NAMESPACE) { + return tagName === "math"; + } + if (parent.namespaceURI === SVG_NAMESPACE) { + return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName]; + } + return Boolean(ALL_MATHML_TAGS[tagName]); + } + if (element2.namespaceURI === HTML_NAMESPACE) { + if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { + return false; + } + if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { + return false; + } + return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]); + } + if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element2.namespaceURI]) { + return true; + } + return false; + }; + const _forceRemove = function _forceRemove2(node2) { + arrayPush$1(DOMPurify.removed, { + element: node2 + }); + try { + node2.parentNode.removeChild(node2); + } catch (_2) { + node2.remove(); + } + }; + const _removeAttribute = function _removeAttribute2(name2, node2) { + try { + arrayPush$1(DOMPurify.removed, { + attribute: node2.getAttributeNode(name2), + from: node2 + }); + } catch (_2) { + arrayPush$1(DOMPurify.removed, { + attribute: null, + from: node2 + }); + } + node2.removeAttribute(name2); + if (name2 === "is" && !ALLOWED_ATTR[name2]) { + if (RETURN_DOM || RETURN_DOM_FRAGMENT) { + try { + _forceRemove(node2); + } catch (_2) { + } + } else { + try { + node2.setAttribute(name2, ""); + } catch (_2) { + } + } + } + }; + const _initDocument = function _initDocument2(dirty) { + let doc; + let leadingWhitespace; + if (FORCE_BODY) { + dirty = "" + dirty; + } else { + const matches = stringMatch(dirty, /^[\r\n\t ]+/); + leadingWhitespace = matches && matches[0]; + } + if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) { + dirty = '' + dirty + ""; + } + const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; + if (NAMESPACE === HTML_NAMESPACE) { + try { + doc = new DOMParser2().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE); + } catch (_2) { + } + } + if (!doc || !doc.documentElement) { + doc = implementation.createDocument(NAMESPACE, "template", null); + try { + doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload; + } catch (_2) { + } + } + const body = doc.body || doc.documentElement; + if (dirty && leadingWhitespace) { + body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null); + } + if (NAMESPACE === HTML_NAMESPACE) { + return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0]; + } + return WHOLE_DOCUMENT ? doc.documentElement : body; + }; + const _createIterator = function _createIterator2(root2) { + return createNodeIterator.call( + root2.ownerDocument || root2, + root2, + // eslint-disable-next-line no-bitwise + NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, + null, + false + ); + }; + const _isClobbered = function _isClobbered2(elm) { + return elm instanceof HTMLFormElement && (typeof elm.nodeName !== "string" || typeof elm.textContent !== "string" || typeof elm.removeChild !== "function" || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== "function" || typeof elm.setAttribute !== "function" || typeof elm.namespaceURI !== "string" || typeof elm.insertBefore !== "function" || typeof elm.hasChildNodes !== "function"); + }; + const _isNode = function _isNode2(object2) { + return typeof Node === "object" ? object2 instanceof Node : object2 && typeof object2 === "object" && typeof object2.nodeType === "number" && typeof object2.nodeName === "string"; + }; + const _executeHook = function _executeHook2(entryPoint, currentNode, data) { + if (!hooks[entryPoint]) { + return; + } + arrayForEach(hooks[entryPoint], (hook) => { + hook.call(DOMPurify, currentNode, data, CONFIG); + }); + }; + const _sanitizeElements = function _sanitizeElements2(currentNode) { + let content2; + _executeHook("beforeSanitizeElements", currentNode, null); + if (_isClobbered(currentNode)) { + _forceRemove(currentNode); + return true; + } + const tagName = transformCaseFunc(currentNode.nodeName); + _executeHook("uponSanitizeElement", currentNode, { + tagName, + allowedTags: ALLOWED_TAGS + }); + if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) { + _forceRemove(currentNode); + return true; + } + if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { + if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) { + if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) + return false; + if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) + return false; + } + if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) { + const parentNode = getParentNode(currentNode) || currentNode.parentNode; + const childNodes = getChildNodes(currentNode) || currentNode.childNodes; + if (childNodes && parentNode) { + const childCount = childNodes.length; + for (let i2 = childCount - 1; i2 >= 0; --i2) { + parentNode.insertBefore(cloneNode(childNodes[i2], true), getNextSibling(currentNode)); + } + } + } + _forceRemove(currentNode); + return true; + } + if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) { + _forceRemove(currentNode); + return true; + } + if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) { + _forceRemove(currentNode); + return true; + } + if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) { + content2 = currentNode.textContent; + content2 = stringReplace(content2, MUSTACHE_EXPR2, " "); + content2 = stringReplace(content2, ERB_EXPR2, " "); + content2 = stringReplace(content2, TMPLIT_EXPR2, " "); + if (currentNode.textContent !== content2) { + arrayPush$1(DOMPurify.removed, { + element: currentNode.cloneNode() + }); + currentNode.textContent = content2; + } + } + _executeHook("afterSanitizeElements", currentNode, null); + return false; + }; + const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value2) { + if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value2 in document2 || value2 in formElement)) { + return false; + } + if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) + ; + else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) + ; + else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { + if ( + // First condition does a very basic check if a) it's basically a valid custom element tagname AND + // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck + // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck + _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND + // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck + lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value2) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value2)) + ) + ; + else { + return false; + } + } else if (URI_SAFE_ATTRIBUTES[lcName]) + ; + else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE2, ""))) + ; + else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value2, "data:") === 0 && DATA_URI_TAGS[lcTag]) + ; + else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value2, ATTR_WHITESPACE2, ""))) + ; + else if (value2) { + return false; + } else + ; + return true; + }; + const _basicCustomElementTest = function _basicCustomElementTest2(tagName) { + return tagName.indexOf("-") > 0; + }; + const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) { + let attr; + let value2; + let lcName; + let l; + _executeHook("beforeSanitizeAttributes", currentNode, null); + const { + attributes + } = currentNode; + if (!attributes) { + return; + } + const hookEvent = { + attrName: "", + attrValue: "", + keepAttr: true, + allowedAttributes: ALLOWED_ATTR + }; + l = attributes.length; + while (l--) { + attr = attributes[l]; + const { + name: name2, + namespaceURI + } = attr; + value2 = name2 === "value" ? attr.value : stringTrim(attr.value); + lcName = transformCaseFunc(name2); + hookEvent.attrName = lcName; + hookEvent.attrValue = value2; + hookEvent.keepAttr = true; + hookEvent.forceKeepAttr = void 0; + _executeHook("uponSanitizeAttribute", currentNode, hookEvent); + value2 = hookEvent.attrValue; + if (hookEvent.forceKeepAttr) { + continue; + } + _removeAttribute(name2, currentNode); + if (!hookEvent.keepAttr) { + continue; + } + if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value2)) { + _removeAttribute(name2, currentNode); + continue; + } + if (SAFE_FOR_TEMPLATES) { + value2 = stringReplace(value2, MUSTACHE_EXPR2, " "); + value2 = stringReplace(value2, ERB_EXPR2, " "); + value2 = stringReplace(value2, TMPLIT_EXPR2, " "); + } + const lcTag = transformCaseFunc(currentNode.nodeName); + if (!_isValidAttribute(lcTag, lcName, value2)) { + continue; + } + if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) { + _removeAttribute(name2, currentNode); + value2 = SANITIZE_NAMED_PROPS_PREFIX + value2; + } + if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") { + if (namespaceURI) + ; + else { + switch (trustedTypes.getAttributeType(lcTag, lcName)) { + case "TrustedHTML": { + value2 = trustedTypesPolicy.createHTML(value2); + break; + } + case "TrustedScriptURL": { + value2 = trustedTypesPolicy.createScriptURL(value2); + break; + } + } + } + } + try { + if (namespaceURI) { + currentNode.setAttributeNS(namespaceURI, name2, value2); + } else { + currentNode.setAttribute(name2, value2); + } + arrayPop(DOMPurify.removed); + } catch (_2) { + } + } + _executeHook("afterSanitizeAttributes", currentNode, null); + }; + const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) { + let shadowNode; + const shadowIterator = _createIterator(fragment); + _executeHook("beforeSanitizeShadowDOM", fragment, null); + while (shadowNode = shadowIterator.nextNode()) { + _executeHook("uponSanitizeShadowNode", shadowNode, null); + if (_sanitizeElements(shadowNode)) { + continue; + } + if (shadowNode.content instanceof DocumentFragment) { + _sanitizeShadowDOM2(shadowNode.content); + } + _sanitizeAttributes(shadowNode); + } + _executeHook("afterSanitizeShadowDOM", fragment, null); + }; + DOMPurify.sanitize = function(dirty) { + let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + let body; + let importedNode; + let currentNode; + let returnNode; + IS_EMPTY_INPUT = !dirty; + if (IS_EMPTY_INPUT) { + dirty = ""; + } + if (typeof dirty !== "string" && !_isNode(dirty)) { + if (typeof dirty.toString === "function") { + dirty = dirty.toString(); + if (typeof dirty !== "string") { + throw typeErrorCreate("dirty is not a string, aborting"); + } + } else { + throw typeErrorCreate("toString is not a function"); + } + } + if (!DOMPurify.isSupported) { + return dirty; + } + if (!SET_CONFIG) { + _parseConfig(cfg); + } + DOMPurify.removed = []; + if (typeof dirty === "string") { + IN_PLACE = false; + } + if (IN_PLACE) { + if (dirty.nodeName) { + const tagName = transformCaseFunc(dirty.nodeName); + if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { + throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place"); + } + } + } else if (dirty instanceof Node) { + body = _initDocument(""); + importedNode = body.ownerDocument.importNode(dirty, true); + if (importedNode.nodeType === 1 && importedNode.nodeName === "BODY") { + body = importedNode; + } else if (importedNode.nodeName === "HTML") { + body = importedNode; + } else { + body.appendChild(importedNode); + } + } else { + if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes + dirty.indexOf("<") === -1) { + return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty; + } + body = _initDocument(dirty); + if (!body) { + return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : ""; + } + } + if (body && FORCE_BODY) { + _forceRemove(body.firstChild); + } + const nodeIterator = _createIterator(IN_PLACE ? dirty : body); + while (currentNode = nodeIterator.nextNode()) { + if (_sanitizeElements(currentNode)) { + continue; + } + if (currentNode.content instanceof DocumentFragment) { + _sanitizeShadowDOM(currentNode.content); + } + _sanitizeAttributes(currentNode); + } + if (IN_PLACE) { + return dirty; + } + if (RETURN_DOM) { + if (RETURN_DOM_FRAGMENT) { + returnNode = createDocumentFragment.call(body.ownerDocument); + while (body.firstChild) { + returnNode.appendChild(body.firstChild); + } + } else { + returnNode = body; + } + if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) { + returnNode = importNode.call(originalDocument, returnNode, true); + } + return returnNode; + } + let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML; + if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) { + serializedHTML = "\n" + serializedHTML; + } + if (SAFE_FOR_TEMPLATES) { + serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR2, " "); + serializedHTML = stringReplace(serializedHTML, ERB_EXPR2, " "); + serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR2, " "); + } + return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML; + }; + DOMPurify.setConfig = function(cfg) { + _parseConfig(cfg); + SET_CONFIG = true; + }; + DOMPurify.clearConfig = function() { + CONFIG = null; + SET_CONFIG = false; + }; + DOMPurify.isValidAttribute = function(tag, attr, value2) { + if (!CONFIG) { + _parseConfig({}); + } + const lcTag = transformCaseFunc(tag); + const lcName = transformCaseFunc(attr); + return _isValidAttribute(lcTag, lcName, value2); + }; + DOMPurify.addHook = function(entryPoint, hookFunction) { + if (typeof hookFunction !== "function") { + return; + } + hooks[entryPoint] = hooks[entryPoint] || []; + arrayPush$1(hooks[entryPoint], hookFunction); + }; + DOMPurify.removeHook = function(entryPoint) { + if (hooks[entryPoint]) { + return arrayPop(hooks[entryPoint]); + } + }; + DOMPurify.removeHooks = function(entryPoint) { + if (hooks[entryPoint]) { + hooks[entryPoint] = []; + } + }; + DOMPurify.removeAllHooks = function() { + hooks = {}; + }; + return DOMPurify; + } + var purify = createDOMPurify(); + const lineBreakRegex = //gi; + const getRows = (s) => { + if (!s) { + return [""]; + } + const str2 = breakToPlaceholder(s).replace(/\\n/g, "#br#"); + return str2.split("#br#"); + }; + const removeScript = (txt) => { + return purify.sanitize(txt); + }; + const sanitizeMore = (text2, config2) => { + var _a; + if (((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels) !== false) { + const level = config2.securityLevel; + if (level === "antiscript" || level === "strict") { + text2 = removeScript(text2); + } else if (level !== "loose") { + text2 = breakToPlaceholder(text2); + text2 = text2.replace(//g, ">"); + text2 = text2.replace(/=/g, "="); + text2 = placeholderToBreak(text2); + } + } + return text2; + }; + const sanitizeText$6 = (text2, config2) => { + if (!text2) { + return text2; + } + if (config2.dompurifyConfig) { + text2 = purify.sanitize(sanitizeMore(text2, config2), config2.dompurifyConfig).toString(); + } else { + text2 = purify.sanitize(sanitizeMore(text2, config2), { + FORBID_TAGS: ["style"] + }).toString(); + } + return text2; + }; + const sanitizeTextOrArray = (a, config2) => { + if (typeof a === "string") { + return sanitizeText$6(a, config2); + } + return a.flat().map((x2) => sanitizeText$6(x2, config2)); + }; + const hasBreaks = (text2) => { + return lineBreakRegex.test(text2); + }; + const splitBreaks = (text2) => { + return text2.split(lineBreakRegex); + }; + const placeholderToBreak = (s) => { + return s.replace(/#br#/g, "
"); + }; + const breakToPlaceholder = (s) => { + return s.replace(lineBreakRegex, "#br#"); + }; + const getUrl = (useAbsolute) => { + let url = ""; + if (useAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replaceAll(/\(/g, "\\("); + url = url.replaceAll(/\)/g, "\\)"); + } + return url; + }; + const evaluate = (val) => val === false || ["false", "null", "0"].includes(String(val).trim().toLowerCase()) ? false : true; + const getMax = function(...values2) { + const newValues = values2.filter((value2) => { + return !isNaN(value2); + }); + return Math.max(...newValues); + }; + const getMin = function(...values2) { + const newValues = values2.filter((value2) => { + return !isNaN(value2); + }); + return Math.min(...newValues); + }; + const parseGenericTypes = function(input) { + const inputSets = input.split(/(,)/); + const output = []; + for (let i2 = 0; i2 < inputSets.length; i2++) { + let thisSet = inputSets[i2]; + if (thisSet === "," && i2 > 0 && i2 + 1 < inputSets.length) { + const previousSet = inputSets[i2 - 1]; + const nextSet = inputSets[i2 + 1]; + if (shouldCombineSets(previousSet, nextSet)) { + thisSet = previousSet + "," + nextSet; + i2++; + output.pop(); + } + } + output.push(processSet(thisSet)); + } + return output.join(""); + }; + const countOccurrence = (string2, substring) => { + return Math.max(0, string2.split(substring).length - 1); + }; + const shouldCombineSets = (previousSet, nextSet) => { + const prevCount = countOccurrence(previousSet, "~"); + const nextCount = countOccurrence(nextSet, "~"); + return prevCount === 1 && nextCount === 1; + }; + const processSet = (input) => { + const tildeCount = countOccurrence(input, "~"); + let hasStartingTilde = false; + if (tildeCount <= 1) { + return input; + } + if (tildeCount % 2 !== 0 && input.startsWith("~")) { + input = input.substring(1); + hasStartingTilde = true; + } + const chars = [...input]; + let first = chars.indexOf("~"); + let last2 = chars.lastIndexOf("~"); + while (first !== -1 && last2 !== -1 && first !== last2) { + chars[first] = "<"; + chars[last2] = ">"; + first = chars.indexOf("~"); + last2 = chars.lastIndexOf("~"); + } + if (hasStartingTilde) { + chars.unshift("~"); + } + return chars.join(""); + }; + const common$1 = { + getRows, + sanitizeText: sanitizeText$6, + sanitizeTextOrArray, + hasBreaks, + splitBreaks, + lineBreakRegex, + removeScript, + getUrl, + evaluate, + getMax, + getMin + }; + const Channel = { + /* CLAMP */ + min: { + r: 0, + g: 0, + b: 0, + s: 0, + l: 0, + a: 0 + }, + max: { + r: 255, + g: 255, + b: 255, + h: 360, + s: 100, + l: 100, + a: 1 + }, + clamp: { + r: (r) => r >= 255 ? 255 : r < 0 ? 0 : r, + g: (g) => g >= 255 ? 255 : g < 0 ? 0 : g, + b: (b) => b >= 255 ? 255 : b < 0 ? 0 : b, + h: (h) => h % 360, + s: (s) => s >= 100 ? 100 : s < 0 ? 0 : s, + l: (l) => l >= 100 ? 100 : l < 0 ? 0 : l, + a: (a) => a >= 1 ? 1 : a < 0 ? 0 : a + }, + /* CONVERSION */ + //SOURCE: https://planetcalc.com/7779 + toLinear: (c2) => { + const n = c2 / 255; + return c2 > 0.03928 ? Math.pow((n + 0.055) / 1.055, 2.4) : n / 12.92; + }, + //SOURCE: https://gist.github.com/mjackson/5311256 + hue2rgb: (p, q, t) => { + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p + (q - p) * 6 * t; + if (t < 1 / 2) + return q; + if (t < 2 / 3) + return p + (q - p) * (2 / 3 - t) * 6; + return p; + }, + hsl2rgb: ({ h, s, l }, channel2) => { + if (!s) + return l * 2.55; + h /= 360; + s /= 100; + l /= 100; + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p = 2 * l - q; + switch (channel2) { + case "r": + return Channel.hue2rgb(p, q, h + 1 / 3) * 255; + case "g": + return Channel.hue2rgb(p, q, h) * 255; + case "b": + return Channel.hue2rgb(p, q, h - 1 / 3) * 255; + } + }, + rgb2hsl: ({ r, g, b }, channel2) => { + r /= 255; + g /= 255; + b /= 255; + const max2 = Math.max(r, g, b); + const min2 = Math.min(r, g, b); + const l = (max2 + min2) / 2; + if (channel2 === "l") + return l * 100; + if (max2 === min2) + return 0; + const d = max2 - min2; + const s = l > 0.5 ? d / (2 - max2 - min2) : d / (max2 + min2); + if (channel2 === "s") + return s * 100; + switch (max2) { + case r: + return ((g - b) / d + (g < b ? 6 : 0)) * 60; + case g: + return ((b - r) / d + 2) * 60; + case b: + return ((r - g) / d + 4) * 60; + default: + return -1; + } + } + }; + const channel$2 = Channel; + const Lang = { + /* API */ + clamp: (number2, lower2, upper) => { + if (lower2 > upper) + return Math.min(lower2, Math.max(upper, number2)); + return Math.min(upper, Math.max(lower2, number2)); + }, + round: (number2) => { + return Math.round(number2 * 1e10) / 1e10; + } + }; + const lang = Lang; + const Unit = { + /* API */ + dec2hex: (dec) => { + const hex2 = Math.round(dec).toString(16); + return hex2.length > 1 ? hex2 : `0${hex2}`; + } + }; + const unit = Unit; + const Utils = { + channel: channel$2, + lang, + unit + }; + const _ = Utils; + const DEC2HEX = {}; + for (let i2 = 0; i2 <= 255; i2++) + DEC2HEX[i2] = _.unit.dec2hex(i2); + const TYPE = { + ALL: 0, + RGB: 1, + HSL: 2 + }; + class Type { + constructor() { + this.type = TYPE.ALL; + } + /* API */ + get() { + return this.type; + } + set(type2) { + if (this.type && this.type !== type2) + throw new Error("Cannot change both RGB and HSL channels at the same time"); + this.type = type2; + } + reset() { + this.type = TYPE.ALL; + } + is(type2) { + return this.type === type2; + } + } + const Type$2 = Type; + class Channels { + /* CONSTRUCTOR */ + constructor(data, color2) { + this.color = color2; + this.changed = false; + this.data = data; + this.type = new Type$2(); + } + /* API */ + set(data, color2) { + this.color = color2; + this.changed = false; + this.data = data; + this.type.type = TYPE.ALL; + return this; + } + /* HELPERS */ + _ensureHSL() { + const data = this.data; + const { h, s, l } = data; + if (h === void 0) + data.h = _.channel.rgb2hsl(data, "h"); + if (s === void 0) + data.s = _.channel.rgb2hsl(data, "s"); + if (l === void 0) + data.l = _.channel.rgb2hsl(data, "l"); + } + _ensureRGB() { + const data = this.data; + const { r, g, b } = data; + if (r === void 0) + data.r = _.channel.hsl2rgb(data, "r"); + if (g === void 0) + data.g = _.channel.hsl2rgb(data, "g"); + if (b === void 0) + data.b = _.channel.hsl2rgb(data, "b"); + } + /* GETTERS */ + get r() { + const data = this.data; + const r = data.r; + if (!this.type.is(TYPE.HSL) && r !== void 0) + return r; + this._ensureHSL(); + return _.channel.hsl2rgb(data, "r"); + } + get g() { + const data = this.data; + const g = data.g; + if (!this.type.is(TYPE.HSL) && g !== void 0) + return g; + this._ensureHSL(); + return _.channel.hsl2rgb(data, "g"); + } + get b() { + const data = this.data; + const b = data.b; + if (!this.type.is(TYPE.HSL) && b !== void 0) + return b; + this._ensureHSL(); + return _.channel.hsl2rgb(data, "b"); + } + get h() { + const data = this.data; + const h = data.h; + if (!this.type.is(TYPE.RGB) && h !== void 0) + return h; + this._ensureRGB(); + return _.channel.rgb2hsl(data, "h"); + } + get s() { + const data = this.data; + const s = data.s; + if (!this.type.is(TYPE.RGB) && s !== void 0) + return s; + this._ensureRGB(); + return _.channel.rgb2hsl(data, "s"); + } + get l() { + const data = this.data; + const l = data.l; + if (!this.type.is(TYPE.RGB) && l !== void 0) + return l; + this._ensureRGB(); + return _.channel.rgb2hsl(data, "l"); + } + get a() { + return this.data.a; + } + /* SETTERS */ + set r(r) { + this.type.set(TYPE.RGB); + this.changed = true; + this.data.r = r; + } + set g(g) { + this.type.set(TYPE.RGB); + this.changed = true; + this.data.g = g; + } + set b(b) { + this.type.set(TYPE.RGB); + this.changed = true; + this.data.b = b; + } + set h(h) { + this.type.set(TYPE.HSL); + this.changed = true; + this.data.h = h; + } + set s(s) { + this.type.set(TYPE.HSL); + this.changed = true; + this.data.s = s; + } + set l(l) { + this.type.set(TYPE.HSL); + this.changed = true; + this.data.l = l; + } + set a(a) { + this.changed = true; + this.data.a = a; + } + } + const Channels$1 = Channels; + const channels = new Channels$1({ r: 0, g: 0, b: 0, a: 0 }, "transparent"); + const ChannelsReusable = channels; + const Hex = { + /* VARIABLES */ + re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i, + /* API */ + parse: (color2) => { + if (color2.charCodeAt(0) !== 35) + return; + const match = color2.match(Hex.re); + if (!match) + return; + const hex2 = match[1]; + const dec = parseInt(hex2, 16); + const length2 = hex2.length; + const hasAlpha = length2 % 4 === 0; + const isFullLength = length2 > 4; + const multiplier = isFullLength ? 1 : 17; + const bits = isFullLength ? 8 : 4; + const bitsOffset = hasAlpha ? 0 : -1; + const mask = isFullLength ? 255 : 15; + return ChannelsReusable.set({ + r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier, + g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier, + b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier, + a: hasAlpha ? (dec & mask) * multiplier / 255 : 1 + }, color2); + }, + stringify: (channels2) => { + const { r, g, b, a } = channels2; + if (a < 1) { + return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`; + } else { + return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`; + } + } + }; + const Hex$1 = Hex; + const HSL = { + /* VARIABLES */ + re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i, + hueRe: /^(.+?)(deg|grad|rad|turn)$/i, + /* HELPERS */ + _hue2deg: (hue2) => { + const match = hue2.match(HSL.hueRe); + if (match) { + const [, number2, unit2] = match; + switch (unit2) { + case "grad": + return _.channel.clamp.h(parseFloat(number2) * 0.9); + case "rad": + return _.channel.clamp.h(parseFloat(number2) * 180 / Math.PI); + case "turn": + return _.channel.clamp.h(parseFloat(number2) * 360); + } + } + return _.channel.clamp.h(parseFloat(hue2)); + }, + /* API */ + parse: (color2) => { + const charCode = color2.charCodeAt(0); + if (charCode !== 104 && charCode !== 72) + return; + const match = color2.match(HSL.re); + if (!match) + return; + const [, h, s, l, a, isAlphaPercentage] = match; + return ChannelsReusable.set({ + h: HSL._hue2deg(h), + s: _.channel.clamp.s(parseFloat(s)), + l: _.channel.clamp.l(parseFloat(l)), + a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 + }, color2); + }, + stringify: (channels2) => { + const { h, s, l, a } = channels2; + if (a < 1) { + return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`; + } else { + return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`; + } + } + }; + const HSL$1 = HSL; + const Keyword = { + /* VARIABLES */ + colors: { + aliceblue: "#f0f8ff", + antiquewhite: "#faebd7", + aqua: "#00ffff", + aquamarine: "#7fffd4", + azure: "#f0ffff", + beige: "#f5f5dc", + bisque: "#ffe4c4", + black: "#000000", + blanchedalmond: "#ffebcd", + blue: "#0000ff", + blueviolet: "#8a2be2", + brown: "#a52a2a", + burlywood: "#deb887", + cadetblue: "#5f9ea0", + chartreuse: "#7fff00", + chocolate: "#d2691e", + coral: "#ff7f50", + cornflowerblue: "#6495ed", + cornsilk: "#fff8dc", + crimson: "#dc143c", + cyanaqua: "#00ffff", + darkblue: "#00008b", + darkcyan: "#008b8b", + darkgoldenrod: "#b8860b", + darkgray: "#a9a9a9", + darkgreen: "#006400", + darkgrey: "#a9a9a9", + darkkhaki: "#bdb76b", + darkmagenta: "#8b008b", + darkolivegreen: "#556b2f", + darkorange: "#ff8c00", + darkorchid: "#9932cc", + darkred: "#8b0000", + darksalmon: "#e9967a", + darkseagreen: "#8fbc8f", + darkslateblue: "#483d8b", + darkslategray: "#2f4f4f", + darkslategrey: "#2f4f4f", + darkturquoise: "#00ced1", + darkviolet: "#9400d3", + deeppink: "#ff1493", + deepskyblue: "#00bfff", + dimgray: "#696969", + dimgrey: "#696969", + dodgerblue: "#1e90ff", + firebrick: "#b22222", + floralwhite: "#fffaf0", + forestgreen: "#228b22", + fuchsia: "#ff00ff", + gainsboro: "#dcdcdc", + ghostwhite: "#f8f8ff", + gold: "#ffd700", + goldenrod: "#daa520", + gray: "#808080", + green: "#008000", + greenyellow: "#adff2f", + grey: "#808080", + honeydew: "#f0fff0", + hotpink: "#ff69b4", + indianred: "#cd5c5c", + indigo: "#4b0082", + ivory: "#fffff0", + khaki: "#f0e68c", + lavender: "#e6e6fa", + lavenderblush: "#fff0f5", + lawngreen: "#7cfc00", + lemonchiffon: "#fffacd", + lightblue: "#add8e6", + lightcoral: "#f08080", + lightcyan: "#e0ffff", + lightgoldenrodyellow: "#fafad2", + lightgray: "#d3d3d3", + lightgreen: "#90ee90", + lightgrey: "#d3d3d3", + lightpink: "#ffb6c1", + lightsalmon: "#ffa07a", + lightseagreen: "#20b2aa", + lightskyblue: "#87cefa", + lightslategray: "#778899", + lightslategrey: "#778899", + lightsteelblue: "#b0c4de", + lightyellow: "#ffffe0", + lime: "#00ff00", + limegreen: "#32cd32", + linen: "#faf0e6", + magenta: "#ff00ff", + maroon: "#800000", + mediumaquamarine: "#66cdaa", + mediumblue: "#0000cd", + mediumorchid: "#ba55d3", + mediumpurple: "#9370db", + mediumseagreen: "#3cb371", + mediumslateblue: "#7b68ee", + mediumspringgreen: "#00fa9a", + mediumturquoise: "#48d1cc", + mediumvioletred: "#c71585", + midnightblue: "#191970", + mintcream: "#f5fffa", + mistyrose: "#ffe4e1", + moccasin: "#ffe4b5", + navajowhite: "#ffdead", + navy: "#000080", + oldlace: "#fdf5e6", + olive: "#808000", + olivedrab: "#6b8e23", + orange: "#ffa500", + orangered: "#ff4500", + orchid: "#da70d6", + palegoldenrod: "#eee8aa", + palegreen: "#98fb98", + paleturquoise: "#afeeee", + palevioletred: "#db7093", + papayawhip: "#ffefd5", + peachpuff: "#ffdab9", + peru: "#cd853f", + pink: "#ffc0cb", + plum: "#dda0dd", + powderblue: "#b0e0e6", + purple: "#800080", + rebeccapurple: "#663399", + red: "#ff0000", + rosybrown: "#bc8f8f", + royalblue: "#4169e1", + saddlebrown: "#8b4513", + salmon: "#fa8072", + sandybrown: "#f4a460", + seagreen: "#2e8b57", + seashell: "#fff5ee", + sienna: "#a0522d", + silver: "#c0c0c0", + skyblue: "#87ceeb", + slateblue: "#6a5acd", + slategray: "#708090", + slategrey: "#708090", + snow: "#fffafa", + springgreen: "#00ff7f", + tan: "#d2b48c", + teal: "#008080", + thistle: "#d8bfd8", + transparent: "#00000000", + turquoise: "#40e0d0", + violet: "#ee82ee", + wheat: "#f5deb3", + white: "#ffffff", + whitesmoke: "#f5f5f5", + yellow: "#ffff00", + yellowgreen: "#9acd32" + }, + /* API */ + parse: (color2) => { + color2 = color2.toLowerCase(); + const hex2 = Keyword.colors[color2]; + if (!hex2) + return; + return Hex$1.parse(hex2); + }, + stringify: (channels2) => { + const hex2 = Hex$1.stringify(channels2); + for (const name2 in Keyword.colors) { + if (Keyword.colors[name2] === hex2) + return name2; + } + return; + } + }; + const Keyword$1 = Keyword; + const RGB = { + /* VARIABLES */ + re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i, + /* API */ + parse: (color2) => { + const charCode = color2.charCodeAt(0); + if (charCode !== 114 && charCode !== 82) + return; + const match = color2.match(RGB.re); + if (!match) + return; + const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match; + return ChannelsReusable.set({ + r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)), + g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)), + b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)), + a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1 + }, color2); + }, + stringify: (channels2) => { + const { r, g, b, a } = channels2; + if (a < 1) { + return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`; + } else { + return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`; + } + } + }; + const RGB$1 = RGB; + const Color = { + /* VARIABLES */ + format: { + keyword: Keyword$1, + hex: Hex$1, + rgb: RGB$1, + rgba: RGB$1, + hsl: HSL$1, + hsla: HSL$1 + }, + /* API */ + parse: (color2) => { + if (typeof color2 !== "string") + return color2; + const channels2 = Hex$1.parse(color2) || RGB$1.parse(color2) || HSL$1.parse(color2) || Keyword$1.parse(color2); + if (channels2) + return channels2; + throw new Error(`Unsupported color format: "${color2}"`); + }, + stringify: (channels2) => { + if (!channels2.changed && channels2.color) + return channels2.color; + if (channels2.type.is(TYPE.HSL) || channels2.data.r === void 0) { + return HSL$1.stringify(channels2); + } else if (channels2.a < 1 || !Number.isInteger(channels2.r) || !Number.isInteger(channels2.g) || !Number.isInteger(channels2.b)) { + return RGB$1.stringify(channels2); + } else { + return Hex$1.stringify(channels2); + } + } + }; + const Color$1 = Color; + const change = (color2, channels2) => { + const ch = Color$1.parse(color2); + for (const c2 in channels2) { + ch[c2] = _.channel.clamp[c2](channels2[c2]); + } + return Color$1.stringify(ch); + }; + const change$1 = change; + const rgba = (r, g, b = 0, a = 1) => { + if (typeof r !== "number") + return change$1(r, { a: g }); + const channels2 = ChannelsReusable.set({ + r: _.channel.clamp.r(r), + g: _.channel.clamp.g(g), + b: _.channel.clamp.b(b), + a: _.channel.clamp.a(a) + }); + return Color$1.stringify(channels2); + }; + const rgba$1 = rgba; + const channel = (color2, channel2) => { + return _.lang.round(Color$1.parse(color2)[channel2]); + }; + const channel$1 = channel; + const luminance = (color2) => { + const { r, g, b } = Color$1.parse(color2); + const luminance2 = 0.2126 * _.channel.toLinear(r) + 0.7152 * _.channel.toLinear(g) + 0.0722 * _.channel.toLinear(b); + return _.lang.round(luminance2); + }; + const luminance$1 = luminance; + const isLight = (color2) => { + return luminance$1(color2) >= 0.5; + }; + const isLight$1 = isLight; + const isDark = (color2) => { + return !isLight$1(color2); + }; + const isDark$1 = isDark; + const adjustChannel = (color2, channel2, amount) => { + const channels2 = Color$1.parse(color2); + const amountCurrent = channels2[channel2]; + const amountNext = _.channel.clamp[channel2](amountCurrent + amount); + if (amountCurrent !== amountNext) + channels2[channel2] = amountNext; + return Color$1.stringify(channels2); + }; + const adjustChannel$1 = adjustChannel; + const lighten = (color2, amount) => { + return adjustChannel$1(color2, "l", amount); + }; + const lighten$1 = lighten; + const darken = (color2, amount) => { + return adjustChannel$1(color2, "l", -amount); + }; + const darken$1 = darken; + const adjust$1 = (color2, channels2) => { + const ch = Color$1.parse(color2); + const changes = {}; + for (const c2 in channels2) { + if (!channels2[c2]) + continue; + changes[c2] = ch[c2] + channels2[c2]; + } + return change$1(color2, changes); + }; + const adjust$2 = adjust$1; + const mix = (color1, color2, weight = 50) => { + const { r: r1, g: g1, b: b1, a: a1 } = Color$1.parse(color1); + const { r: r2, g: g2, b: b2, a: a2 } = Color$1.parse(color2); + const weightScale = weight / 100; + const weightNormalized = weightScale * 2 - 1; + const alphaDelta = a1 - a2; + const weight1combined = weightNormalized * alphaDelta === -1 ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta); + const weight1 = (weight1combined + 1) / 2; + const weight2 = 1 - weight1; + const r = r1 * weight1 + r2 * weight2; + const g = g1 * weight1 + g2 * weight2; + const b = b1 * weight1 + b2 * weight2; + const a = a1 * weightScale + a2 * (1 - weightScale); + return rgba$1(r, g, b, a); + }; + const mix$1 = mix; + const invert = (color2, weight = 100) => { + const inverse = Color$1.parse(color2); + inverse.r = 255 - inverse.r; + inverse.g = 255 - inverse.g; + inverse.b = 255 - inverse.b; + return mix$1(inverse, color2, weight); + }; + const invert$1 = invert; + const mkBorder = (col, darkMode) => darkMode ? adjust$2(col, { s: -40, l: 10 }) : adjust$2(col, { s: -40, l: -10 }); + const oldAttributeBackgroundColorOdd = "#ffffff"; + const oldAttributeBackgroundColorEven = "#f2f2f2"; + let Theme$4 = class Theme { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#fff4dd"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "#333"; + this.THEME_COLOR_LIMIT = 12; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + } + updateColors() { + this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333"); + this.secondaryColor = this.secondaryColor || adjust$2(this.primaryColor, { h: -120 }); + this.tertiaryColor = this.tertiaryColor || adjust$2(this.primaryColor, { h: 180, l: 5 }); + this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode); + this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode); + this.noteBkgColor = this.noteBkgColor || "#fff5ad"; + this.noteTextColor = this.noteTextColor || "#333"; + this.secondaryTextColor = this.secondaryTextColor || invert$1(this.secondaryColor); + this.tertiaryTextColor = this.tertiaryTextColor || invert$1(this.tertiaryColor); + this.lineColor = this.lineColor || invert$1(this.background); + this.arrowheadColor = this.arrowheadColor || invert$1(this.background); + this.textColor = this.textColor || this.primaryTextColor; + this.border2 = this.border2 || this.tertiaryBorderColor; + this.nodeBkg = this.nodeBkg || this.primaryColor; + this.mainBkg = this.mainBkg || this.primaryColor; + this.nodeBorder = this.nodeBorder || this.primaryBorderColor; + this.clusterBkg = this.clusterBkg || this.tertiaryColor; + this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor; + this.defaultLinkColor = this.defaultLinkColor || this.lineColor; + this.titleColor = this.titleColor || this.tertiaryTextColor; + this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? darken$1(this.secondaryColor, 30) : this.secondaryColor); + this.nodeTextColor = this.nodeTextColor || this.primaryTextColor; + this.actorBorder = this.actorBorder || this.primaryBorderColor; + this.actorBkg = this.actorBkg || this.mainBkg; + this.actorTextColor = this.actorTextColor || this.primaryTextColor; + this.actorLineColor = this.actorLineColor || "grey"; + this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg; + this.signalColor = this.signalColor || this.textColor; + this.signalTextColor = this.signalTextColor || this.textColor; + this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder; + this.labelTextColor = this.labelTextColor || this.actorTextColor; + this.loopTextColor = this.loopTextColor || this.actorTextColor; + this.activationBorderColor = this.activationBorderColor || darken$1(this.secondaryColor, 10); + this.activationBkgColor = this.activationBkgColor || this.secondaryColor; + this.sequenceNumberColor = this.sequenceNumberColor || invert$1(this.lineColor); + this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor; + this.altSectionBkgColor = this.altSectionBkgColor || "white"; + this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor; + this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor; + this.excludeBkgColor = this.excludeBkgColor || "#eeeeee"; + this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor; + this.taskBkgColor = this.taskBkgColor || this.primaryColor; + this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor; + this.activeTaskBkgColor = this.activeTaskBkgColor || lighten$1(this.primaryColor, 23); + this.gridColor = this.gridColor || "lightgrey"; + this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey"; + this.doneTaskBorderColor = this.doneTaskBorderColor || "grey"; + this.critBorderColor = this.critBorderColor || "#ff8888"; + this.critBkgColor = this.critBkgColor || "red"; + this.todayLineColor = this.todayLineColor || "red"; + this.taskTextColor = this.taskTextColor || this.textColor; + this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor; + this.taskTextLightColor = this.taskTextLightColor || this.textColor; + this.taskTextColor = this.taskTextColor || this.primaryTextColor; + this.taskTextDarkColor = this.taskTextDarkColor || this.textColor; + this.taskTextClickableColor = this.taskTextClickableColor || "#003163"; + this.personBorder = this.personBorder || this.primaryBorderColor; + this.personBkg = this.personBkg || this.mainBkg; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || this.tertiaryColor; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.nodeBorder; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.specialStateColor = this.lineColor; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$2(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$2(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$2(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$2(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$2(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$2(this.primaryColor, { h: 210, l: 150 }); + this.cScale9 = this.cScale9 || adjust$2(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$2(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$2(this.primaryColor, { h: 330 }); + if (this.darkMode) { + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScale" + i2] = darken$1(this["cScale" + i2], 75); + } + } else { + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScale" + i2] = darken$1(this["cScale" + i2], 25); + } + } + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleInv" + i2] = this["cScaleInv" + i2] || invert$1(this["cScale" + i2]); + } + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + if (this.darkMode) { + this["cScalePeer" + i2] = this["cScalePeer" + i2] || lighten$1(this["cScale" + i2], 10); + } else { + this["cScalePeer" + i2] = this["cScalePeer" + i2] || darken$1(this["cScale" + i2], 10); + } + } + this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor; + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleLabel" + i2] = this["cScaleLabel" + i2] || this.scaleLabelColor; + } + const multiplier = this.darkMode ? -4 : -1; + for (let i2 = 0; i2 < 5; i2++) { + this["surface" + i2] = this["surface" + i2] || adjust$2(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i2 * 3) }); + this["surfacePeer" + i2] = this["surfacePeer" + i2] || adjust$2(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i2 * 3) }); + } + this.classText = this.classText || this.textColor; + this.fillType0 = this.fillType0 || this.primaryColor; + this.fillType1 = this.fillType1 || this.secondaryColor; + this.fillType2 = this.fillType2 || adjust$2(this.primaryColor, { h: 64 }); + this.fillType3 = this.fillType3 || adjust$2(this.secondaryColor, { h: 64 }); + this.fillType4 = this.fillType4 || adjust$2(this.primaryColor, { h: -64 }); + this.fillType5 = this.fillType5 || adjust$2(this.secondaryColor, { h: -64 }); + this.fillType6 = this.fillType6 || adjust$2(this.primaryColor, { h: 128 }); + this.fillType7 = this.fillType7 || adjust$2(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || this.tertiaryColor; + this.pie4 = this.pie4 || adjust$2(this.primaryColor, { l: -10 }); + this.pie5 = this.pie5 || adjust$2(this.secondaryColor, { l: -10 }); + this.pie6 = this.pie6 || adjust$2(this.tertiaryColor, { l: -10 }); + this.pie7 = this.pie7 || adjust$2(this.primaryColor, { h: 60, l: -10 }); + this.pie8 = this.pie8 || adjust$2(this.primaryColor, { h: -60, l: -10 }); + this.pie9 = this.pie9 || adjust$2(this.primaryColor, { h: 120, l: 0 }); + this.pie10 = this.pie10 || adjust$2(this.primaryColor, { h: 60, l: -20 }); + this.pie11 = this.pie11 || adjust$2(this.primaryColor, { h: -60, l: -20 }); + this.pie12 = this.pie12 || adjust$2(this.primaryColor, { h: 120, l: -10 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$2(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$2(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$2(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$2(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$2(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$2(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken$1(this.secondaryColor, 30) : this.secondaryColor); + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust$2(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust$2(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust$2(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust$2(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust$2(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten$1(this.git0, 25); + this.git1 = lighten$1(this.git1, 25); + this.git2 = lighten$1(this.git2, 25); + this.git3 = lighten$1(this.git3, 25); + this.git4 = lighten$1(this.git4, 25); + this.git5 = lighten$1(this.git5, 25); + this.git6 = lighten$1(this.git6, 25); + this.git7 = lighten$1(this.git7, 25); + } else { + this.git0 = darken$1(this.git0, 25); + this.git1 = darken$1(this.git1, 25); + this.git2 = darken$1(this.git2, 25); + this.git3 = darken$1(this.git3, 25); + this.git4 = darken$1(this.git4, 25); + this.git5 = darken$1(this.git5, 25); + this.git6 = darken$1(this.git6, 25); + this.git7 = darken$1(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor); + this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor; + this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor; + this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys2 = Object.keys(overrides); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + } + }; + const getThemeVariables$4 = (userOverrides) => { + const theme2 = new Theme$4(); + theme2.calculate(userOverrides); + return theme2; + }; + let Theme$3 = class Theme { + constructor() { + this.background = "#333"; + this.primaryColor = "#1f2020"; + this.secondaryColor = lighten$1(this.primaryColor, 16); + this.tertiaryColor = adjust$2(this.primaryColor, { h: -160 }); + this.primaryBorderColor = invert$1(this.background); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.tertiaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.mainBkg = "#1f2020"; + this.secondBkg = "calculated"; + this.mainContrastColor = "lightgrey"; + this.darkTextColor = lighten$1(invert$1("#323D47"), 10); + this.lineColor = "calculated"; + this.border1 = "#81B1DB"; + this.border2 = rgba$1(255, 255, 255, 0.25); + this.arrowheadColor = "calculated"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.labelBackground = "#181818"; + this.textColor = "#ccc"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "#F9FFFE"; + this.edgeLabelBackground = "calculated"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "calculated"; + this.actorLineColor = "calculated"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "calculated"; + this.activationBkgColor = "calculated"; + this.sequenceNumberColor = "black"; + this.sectionBkgColor = darken$1("#EAE8D9", 30); + this.altSectionBkgColor = "calculated"; + this.sectionBkgColor2 = "#EAE8D9"; + this.excludeBkgColor = darken$1(this.sectionBkgColor, 10); + this.taskBorderColor = rgba$1(255, 255, 255, 70); + this.taskBkgColor = "calculated"; + this.taskTextColor = "calculated"; + this.taskTextLightColor = "calculated"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = rgba$1(255, 255, 255, 50); + this.activeTaskBkgColor = "#81B1DB"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#E83737"; + this.critBkgColor = "#E83737"; + this.taskTextDarkColor = "calculated"; + this.todayLineColor = "#DB5757"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "calculated"; + this.errorBkgColor = "#a44141"; + this.errorTextColor = "#ddd"; + } + updateColors() { + this.secondBkg = lighten$1(this.mainBkg, 16); + this.lineColor = this.mainContrastColor; + this.arrowheadColor = this.mainContrastColor; + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.edgeLabelBackground = lighten$1(this.labelBackground, 25); + this.actorBorder = this.border1; + this.actorBkg = this.mainBkg; + this.actorTextColor = this.mainContrastColor; + this.actorLineColor = this.mainContrastColor; + this.signalColor = this.mainContrastColor; + this.signalTextColor = this.mainContrastColor; + this.labelBoxBkgColor = this.actorBkg; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.mainContrastColor; + this.loopTextColor = this.mainContrastColor; + this.noteBorderColor = this.secondaryBorderColor; + this.noteBkgColor = this.secondBkg; + this.noteTextColor = this.secondaryTextColor; + this.activationBorderColor = this.border1; + this.activationBkgColor = this.secondBkg; + this.altSectionBkgColor = this.background; + this.taskBkgColor = lighten$1(this.mainBkg, 23); + this.taskTextColor = this.darkTextColor; + this.taskTextLightColor = this.mainContrastColor; + this.taskTextOutsideColor = this.taskTextLightColor; + this.gridColor = this.mainContrastColor; + this.doneTaskBkgColor = this.mainContrastColor; + this.taskTextDarkColor = this.darkTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#555"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = "#f4f4f4"; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$2(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$2(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$2(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$2(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$2(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$2(this.secondaryColor, { h: 128 }); + this.cScale1 = this.cScale1 || "#0b0000"; + this.cScale2 = this.cScale2 || "#4d1037"; + this.cScale3 = this.cScale3 || "#3f5258"; + this.cScale4 = this.cScale4 || "#4f2f1b"; + this.cScale5 = this.cScale5 || "#6e0a0a"; + this.cScale6 = this.cScale6 || "#3b0048"; + this.cScale7 = this.cScale7 || "#995a01"; + this.cScale8 = this.cScale8 || "#154706"; + this.cScale9 = this.cScale9 || "#161722"; + this.cScale10 = this.cScale10 || "#00296f"; + this.cScale11 = this.cScale11 || "#01629c"; + this.cScale12 = this.cScale12 || "#010029"; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$2(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$2(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$2(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$2(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$2(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$2(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust$2(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$2(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$2(this.primaryColor, { h: 330 }); + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleInv" + i2] = this["cScaleInv" + i2] || invert$1(this["cScale" + i2]); + } + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScalePeer" + i2] = this["cScalePeer" + i2] || lighten$1(this["cScale" + i2], 10); + } + for (let i2 = 0; i2 < 5; i2++) { + this["surface" + i2] = this["surface" + i2] || adjust$2(this.mainBkg, { h: 30, s: -30, l: -(-10 + i2 * 4) }); + this["surfacePeer" + i2] = this["surfacePeer" + i2] || adjust$2(this.mainBkg, { h: 30, s: -30, l: -(-7 + i2 * 4) }); + } + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleLabel" + i2] = this["cScaleLabel" + i2] || this.scaleLabelColor; + } + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["pie" + i2] = this["cScale" + i2]; + } + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$2(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$2(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$2(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$2(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$2(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$2(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.classText = this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken$1(this.secondaryColor, 30) : this.secondaryColor); + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = lighten$1(this.secondaryColor, 20); + this.git1 = lighten$1(this.pie2 || this.secondaryColor, 20); + this.git2 = lighten$1(this.pie3 || this.tertiaryColor, 20); + this.git3 = lighten$1(this.pie4 || adjust$2(this.primaryColor, { h: -30 }), 20); + this.git4 = lighten$1(this.pie5 || adjust$2(this.primaryColor, { h: -60 }), 20); + this.git5 = lighten$1(this.pie6 || adjust$2(this.primaryColor, { h: -90 }), 10); + this.git6 = lighten$1(this.pie7 || adjust$2(this.primaryColor, { h: 60 }), 10); + this.git7 = lighten$1(this.pie8 || adjust$2(this.primaryColor, { h: 120 }), 20); + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert$1(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert$1(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || lighten$1(this.background, 12); + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || lighten$1(this.background, 2); + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys2 = Object.keys(overrides); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + } + }; + const getThemeVariables$3 = (userOverrides) => { + const theme2 = new Theme$3(); + theme2.calculate(userOverrides); + return theme2; + }; + let Theme$2 = class Theme { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#ECECFF"; + this.secondaryColor = adjust$2(this.primaryColor, { h: 120 }); + this.secondaryColor = "#ffffde"; + this.tertiaryColor = adjust$2(this.primaryColor, { h: -160 }); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.tertiaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.background = "white"; + this.mainBkg = "#ECECFF"; + this.secondBkg = "#ffffde"; + this.lineColor = "#333333"; + this.border1 = "#9370DB"; + this.border2 = "#aaaa33"; + this.arrowheadColor = "#333333"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.labelBackground = "#e8e8e8"; + this.textColor = "#333"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "calculated"; + this.edgeLabelBackground = "calculated"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "black"; + this.actorLineColor = "grey"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "calculated"; + this.altSectionBkgColor = "calculated"; + this.sectionBkgColor2 = "calculated"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "calculated"; + this.taskTextLightColor = "calculated"; + this.taskTextColor = this.taskTextLightColor; + this.taskTextDarkColor = "calculated"; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.taskTextClickableColor = "calculated"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "calculated"; + this.critBorderColor = "calculated"; + this.critBkgColor = "calculated"; + this.todayLineColor = "calculated"; + this.sectionBkgColor = rgba$1(102, 102, 255, 0.49); + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "#fff400"; + this.taskBorderColor = "#534fbc"; + this.taskBkgColor = "#8a90dd"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "black"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "#534fbc"; + this.activeTaskBkgColor = "#bfc7ff"; + this.gridColor = "lightgrey"; + this.doneTaskBkgColor = "lightgrey"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#ff8888"; + this.critBkgColor = "red"; + this.todayLineColor = "red"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + this.updateColors(); + } + updateColors() { + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$2(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$2(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$2(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$2(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$2(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$2(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust$2(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$2(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$2(this.primaryColor, { h: 330 }); + this["cScalePeer1"] = this["cScalePeer1"] || darken$1(this.secondaryColor, 45); + this["cScalePeer2"] = this["cScalePeer2"] || darken$1(this.tertiaryColor, 40); + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScale" + i2] = darken$1(this["cScale" + i2], 10); + this["cScalePeer" + i2] = this["cScalePeer" + i2] || darken$1(this["cScale" + i2], 25); + } + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleInv" + i2] = this["cScaleInv" + i2] || adjust$2(this["cScale" + i2], { h: 180 }); + } + for (let i2 = 0; i2 < 5; i2++) { + this["surface" + i2] = this["surface" + i2] || adjust$2(this.mainBkg, { h: 30, l: -(5 + i2 * 5) }); + this["surfacePeer" + i2] = this["surfacePeer" + i2] || adjust$2(this.mainBkg, { h: 30, l: -(7 + i2 * 5) }); + } + this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; + if (this.labelTextColor !== "calculated") { + this.cScaleLabel0 = this.cScaleLabel0 || invert$1(this.labelTextColor); + this.cScaleLabel3 = this.cScaleLabel3 || invert$1(this.labelTextColor); + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleLabel" + i2] = this["cScaleLabel" + i2] || this.labelTextColor; + } + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.titleColor = this.textColor; + this.edgeLabelBackground = this.labelBackground; + this.actorBorder = lighten$1(this.border1, 23); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.signalColor = this.textColor; + this.signalTextColor = this.textColor; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f0f0f0"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.nodeBorder; + this.specialStateColor = this.lineColor; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$2(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$2(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$2(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$2(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$2(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$2(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || adjust$2(this.tertiaryColor, { l: -40 }); + this.pie4 = this.pie4 || adjust$2(this.primaryColor, { l: -10 }); + this.pie5 = this.pie5 || adjust$2(this.secondaryColor, { l: -30 }); + this.pie6 = this.pie6 || adjust$2(this.tertiaryColor, { l: -20 }); + this.pie7 = this.pie7 || adjust$2(this.primaryColor, { h: 60, l: -20 }); + this.pie8 = this.pie8 || adjust$2(this.primaryColor, { h: -60, l: -40 }); + this.pie9 = this.pie9 || adjust$2(this.primaryColor, { h: 120, l: -40 }); + this.pie10 = this.pie10 || adjust$2(this.primaryColor, { h: 60, l: -40 }); + this.pie11 = this.pie11 || adjust$2(this.primaryColor, { h: -90, l: -40 }); + this.pie12 = this.pie12 || adjust$2(this.primaryColor, { h: 120, l: -30 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$2(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$2(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$2(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$2(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$2(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$2(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.labelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust$2(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust$2(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust$2(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust$2(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust$2(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten$1(this.git0, 25); + this.git1 = lighten$1(this.git1, 25); + this.git2 = lighten$1(this.git2, 25); + this.git3 = lighten$1(this.git3, 25); + this.git4 = lighten$1(this.git4, 25); + this.git5 = lighten$1(this.git5, 25); + this.git6 = lighten$1(this.git6, 25); + this.git7 = lighten$1(this.git7, 25); + } else { + this.git0 = darken$1(this.git0, 25); + this.git1 = darken$1(this.git1, 25); + this.git2 = darken$1(this.git2, 25); + this.git3 = darken$1(this.git3, 25); + this.git4 = darken$1(this.git4, 25); + this.git5 = darken$1(this.git5, 25); + this.git6 = darken$1(this.git6, 25); + this.git7 = darken$1(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || darken$1(invert$1(this.git0), 25); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert$1(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert$1(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys2 = Object.keys(overrides); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + } + }; + const getThemeVariables$2 = (userOverrides) => { + const theme2 = new Theme$2(); + theme2.calculate(userOverrides); + return theme2; + }; + let Theme$1 = class Theme { + constructor() { + this.background = "#f4f4f4"; + this.primaryColor = "#cde498"; + this.secondaryColor = "#cdffb2"; + this.background = "white"; + this.mainBkg = "#cde498"; + this.secondBkg = "#cdffb2"; + this.lineColor = "green"; + this.border1 = "#13540c"; + this.border2 = "#6eaa49"; + this.arrowheadColor = "green"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.tertiaryColor = lighten$1("#cde498", 10); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.primaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "#333"; + this.edgeLabelBackground = "#e8e8e8"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "black"; + this.actorLineColor = "grey"; + this.signalColor = "#333"; + this.signalTextColor = "#333"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "#326932"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "#fff5ad"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "#6eaa49"; + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "#6eaa49"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "#487e3a"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "black"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "lightgrey"; + this.doneTaskBkgColor = "lightgrey"; + this.doneTaskBorderColor = "grey"; + this.critBorderColor = "#ff8888"; + this.critBkgColor = "red"; + this.todayLineColor = "red"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + } + updateColors() { + this.actorBorder = darken$1(this.mainBkg, 20); + this.actorBkg = this.mainBkg; + this.labelBoxBkgColor = this.actorBkg; + this.labelTextColor = this.actorTextColor; + this.loopTextColor = this.actorTextColor; + this.noteBorderColor = this.border2; + this.noteTextColor = this.actorTextColor; + this.cScale0 = this.cScale0 || this.primaryColor; + this.cScale1 = this.cScale1 || this.secondaryColor; + this.cScale2 = this.cScale2 || this.tertiaryColor; + this.cScale3 = this.cScale3 || adjust$2(this.primaryColor, { h: 30 }); + this.cScale4 = this.cScale4 || adjust$2(this.primaryColor, { h: 60 }); + this.cScale5 = this.cScale5 || adjust$2(this.primaryColor, { h: 90 }); + this.cScale6 = this.cScale6 || adjust$2(this.primaryColor, { h: 120 }); + this.cScale7 = this.cScale7 || adjust$2(this.primaryColor, { h: 150 }); + this.cScale8 = this.cScale8 || adjust$2(this.primaryColor, { h: 210 }); + this.cScale9 = this.cScale9 || adjust$2(this.primaryColor, { h: 270 }); + this.cScale10 = this.cScale10 || adjust$2(this.primaryColor, { h: 300 }); + this.cScale11 = this.cScale11 || adjust$2(this.primaryColor, { h: 330 }); + this["cScalePeer1"] = this["cScalePeer1"] || darken$1(this.secondaryColor, 45); + this["cScalePeer2"] = this["cScalePeer2"] || darken$1(this.tertiaryColor, 40); + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScale" + i2] = darken$1(this["cScale" + i2], 10); + this["cScalePeer" + i2] = this["cScalePeer" + i2] || darken$1(this["cScale" + i2], 25); + } + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleInv" + i2] = this["cScaleInv" + i2] || adjust$2(this["cScale" + i2], { h: 180 }); + } + this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor; + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleLabel" + i2] = this["cScaleLabel" + i2] || this.scaleLabelColor; + } + for (let i2 = 0; i2 < 5; i2++) { + this["surface" + i2] = this["surface" + i2] || adjust$2(this.mainBkg, { h: 30, s: -30, l: -(5 + i2 * 5) }); + this["surfacePeer" + i2] = this["surfacePeer" + i2] || adjust$2(this.mainBkg, { h: 30, s: -30, l: -(8 + i2 * 5) }); + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.taskBorderColor = this.border1; + this.taskTextColor = this.taskTextLightColor; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.activeTaskBorderColor = this.taskBorderColor; + this.activeTaskBkgColor = this.mainBkg; + this.transitionColor = this.transitionColor || this.lineColor; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f0f0f0"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.compositeBorder = this.compositeBorder || this.nodeBorder; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = this.lineColor; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.transitionColor = this.transitionColor || this.lineColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$2(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$2(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$2(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$2(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$2(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$2(this.secondaryColor, { h: 128 }); + this.pie1 = this.pie1 || this.primaryColor; + this.pie2 = this.pie2 || this.secondaryColor; + this.pie3 = this.pie3 || this.tertiaryColor; + this.pie4 = this.pie4 || adjust$2(this.primaryColor, { l: -30 }); + this.pie5 = this.pie5 || adjust$2(this.secondaryColor, { l: -30 }); + this.pie6 = this.pie6 || adjust$2(this.tertiaryColor, { h: 40, l: -40 }); + this.pie7 = this.pie7 || adjust$2(this.primaryColor, { h: 60, l: -10 }); + this.pie8 = this.pie8 || adjust$2(this.primaryColor, { h: -60, l: -10 }); + this.pie9 = this.pie9 || adjust$2(this.primaryColor, { h: 120, l: 0 }); + this.pie10 = this.pie10 || adjust$2(this.primaryColor, { h: 60, l: -50 }); + this.pie11 = this.pie11 || adjust$2(this.primaryColor, { h: -60, l: -50 }); + this.pie12 = this.pie12 || adjust$2(this.primaryColor, { h: 120, l: -50 }); + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$2(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$2(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$2(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$2(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$2(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$2(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = this.git0 || this.primaryColor; + this.git1 = this.git1 || this.secondaryColor; + this.git2 = this.git2 || this.tertiaryColor; + this.git3 = this.git3 || adjust$2(this.primaryColor, { h: -30 }); + this.git4 = this.git4 || adjust$2(this.primaryColor, { h: -60 }); + this.git5 = this.git5 || adjust$2(this.primaryColor, { h: -90 }); + this.git6 = this.git6 || adjust$2(this.primaryColor, { h: 60 }); + this.git7 = this.git7 || adjust$2(this.primaryColor, { h: 120 }); + if (this.darkMode) { + this.git0 = lighten$1(this.git0, 25); + this.git1 = lighten$1(this.git1, 25); + this.git2 = lighten$1(this.git2, 25); + this.git3 = lighten$1(this.git3, 25); + this.git4 = lighten$1(this.git4, 25); + this.git5 = lighten$1(this.git5, 25); + this.git6 = lighten$1(this.git6, 25); + this.git7 = lighten$1(this.git7, 25); + } else { + this.git0 = darken$1(this.git0, 25); + this.git1 = darken$1(this.git1, 25); + this.git2 = darken$1(this.git2, 25); + this.git3 = darken$1(this.git3, 25); + this.git4 = darken$1(this.git4, 25); + this.git5 = darken$1(this.git5, 25); + this.git6 = darken$1(this.git6, 25); + this.git7 = darken$1(this.git7, 25); + } + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.gitBranchLabel0 = this.gitBranchLabel0 || invert$1(this.labelTextColor); + this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor; + this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor; + this.gitBranchLabel3 = this.gitBranchLabel3 || invert$1(this.labelTextColor); + this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor; + this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor; + this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor; + this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys2 = Object.keys(overrides); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + } + }; + const getThemeVariables$1 = (userOverrides) => { + const theme2 = new Theme$1(); + theme2.calculate(userOverrides); + return theme2; + }; + class Theme { + constructor() { + this.primaryColor = "#eee"; + this.contrast = "#707070"; + this.secondaryColor = lighten$1(this.contrast, 55); + this.background = "#ffffff"; + this.tertiaryColor = adjust$2(this.primaryColor, { h: -160 }); + this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode); + this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode); + this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode); + this.primaryTextColor = invert$1(this.primaryColor); + this.secondaryTextColor = invert$1(this.secondaryColor); + this.tertiaryTextColor = invert$1(this.tertiaryColor); + this.lineColor = invert$1(this.background); + this.textColor = invert$1(this.background); + this.mainBkg = "#eee"; + this.secondBkg = "calculated"; + this.lineColor = "#666"; + this.border1 = "#999"; + this.border2 = "calculated"; + this.note = "#ffa"; + this.text = "#333"; + this.critical = "#d42"; + this.done = "#bbb"; + this.arrowheadColor = "#333333"; + this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif'; + this.fontSize = "16px"; + this.THEME_COLOR_LIMIT = 12; + this.nodeBkg = "calculated"; + this.nodeBorder = "calculated"; + this.clusterBkg = "calculated"; + this.clusterBorder = "calculated"; + this.defaultLinkColor = "calculated"; + this.titleColor = "calculated"; + this.edgeLabelBackground = "white"; + this.actorBorder = "calculated"; + this.actorBkg = "calculated"; + this.actorTextColor = "calculated"; + this.actorLineColor = "calculated"; + this.signalColor = "calculated"; + this.signalTextColor = "calculated"; + this.labelBoxBkgColor = "calculated"; + this.labelBoxBorderColor = "calculated"; + this.labelTextColor = "calculated"; + this.loopTextColor = "calculated"; + this.noteBorderColor = "calculated"; + this.noteBkgColor = "calculated"; + this.noteTextColor = "calculated"; + this.activationBorderColor = "#666"; + this.activationBkgColor = "#f4f4f4"; + this.sequenceNumberColor = "white"; + this.sectionBkgColor = "calculated"; + this.altSectionBkgColor = "white"; + this.sectionBkgColor2 = "calculated"; + this.excludeBkgColor = "#eeeeee"; + this.taskBorderColor = "calculated"; + this.taskBkgColor = "calculated"; + this.taskTextLightColor = "white"; + this.taskTextColor = "calculated"; + this.taskTextDarkColor = "calculated"; + this.taskTextOutsideColor = "calculated"; + this.taskTextClickableColor = "#003163"; + this.activeTaskBorderColor = "calculated"; + this.activeTaskBkgColor = "calculated"; + this.gridColor = "calculated"; + this.doneTaskBkgColor = "calculated"; + this.doneTaskBorderColor = "calculated"; + this.critBkgColor = "calculated"; + this.critBorderColor = "calculated"; + this.todayLineColor = "calculated"; + this.personBorder = this.primaryBorderColor; + this.personBkg = this.mainBkg; + this.labelColor = "black"; + this.errorBkgColor = "#552222"; + this.errorTextColor = "#552222"; + } + updateColors() { + this.secondBkg = lighten$1(this.contrast, 55); + this.border2 = this.contrast; + this.actorBorder = lighten$1(this.border1, 23); + this.actorBkg = this.mainBkg; + this.actorTextColor = this.text; + this.actorLineColor = this.lineColor; + this.signalColor = this.text; + this.signalTextColor = this.text; + this.labelBoxBkgColor = this.actorBkg; + this.labelBoxBorderColor = this.actorBorder; + this.labelTextColor = this.text; + this.loopTextColor = this.text; + this.noteBorderColor = "#999"; + this.noteBkgColor = "#666"; + this.noteTextColor = "#fff"; + this.cScale0 = this.cScale0 || "#555"; + this.cScale1 = this.cScale1 || "#F4F4F4"; + this.cScale2 = this.cScale2 || "#555"; + this.cScale3 = this.cScale3 || "#BBB"; + this.cScale4 = this.cScale4 || "#777"; + this.cScale5 = this.cScale5 || "#999"; + this.cScale6 = this.cScale6 || "#DDD"; + this.cScale7 = this.cScale7 || "#FFF"; + this.cScale8 = this.cScale8 || "#DDD"; + this.cScale9 = this.cScale9 || "#BBB"; + this.cScale10 = this.cScale10 || "#999"; + this.cScale11 = this.cScale11 || "#777"; + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleInv" + i2] = this["cScaleInv" + i2] || invert$1(this["cScale" + i2]); + } + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + if (this.darkMode) { + this["cScalePeer" + i2] = this["cScalePeer" + i2] || lighten$1(this["cScale" + i2], 10); + } else { + this["cScalePeer" + i2] = this["cScalePeer" + i2] || darken$1(this["cScale" + i2], 10); + } + } + this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor); + this["cScaleLabel0"] = this["cScaleLabel0"] || this.cScale1; + this["cScaleLabel2"] = this["cScaleLabel2"] || this.cScale1; + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["cScaleLabel" + i2] = this["cScaleLabel" + i2] || this.scaleLabelColor; + } + for (let i2 = 0; i2 < 5; i2++) { + this["surface" + i2] = this["surface" + i2] || adjust$2(this.mainBkg, { l: -(5 + i2 * 5) }); + this["surfacePeer" + i2] = this["surfacePeer" + i2] || adjust$2(this.mainBkg, { l: -(8 + i2 * 5) }); + } + this.nodeBkg = this.mainBkg; + this.nodeBorder = this.border1; + this.clusterBkg = this.secondBkg; + this.clusterBorder = this.border2; + this.defaultLinkColor = this.lineColor; + this.titleColor = this.text; + this.sectionBkgColor = lighten$1(this.contrast, 30); + this.sectionBkgColor2 = lighten$1(this.contrast, 30); + this.taskBorderColor = darken$1(this.contrast, 10); + this.taskBkgColor = this.contrast; + this.taskTextColor = this.taskTextLightColor; + this.taskTextDarkColor = this.text; + this.taskTextOutsideColor = this.taskTextDarkColor; + this.activeTaskBorderColor = this.taskBorderColor; + this.activeTaskBkgColor = this.mainBkg; + this.gridColor = lighten$1(this.border1, 30); + this.doneTaskBkgColor = this.done; + this.doneTaskBorderColor = this.lineColor; + this.critBkgColor = this.critical; + this.critBorderColor = darken$1(this.critBkgColor, 10); + this.todayLineColor = this.critBkgColor; + this.transitionColor = this.transitionColor || "#000"; + this.transitionLabelColor = this.transitionLabelColor || this.textColor; + this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor; + this.stateBkg = this.stateBkg || this.mainBkg; + this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg; + this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor; + this.altBackground = this.altBackground || "#f4f4f4"; + this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg; + this.stateBorder = this.stateBorder || "#000"; + this.innerEndBackground = this.primaryBorderColor; + this.specialStateColor = "#222"; + this.errorBkgColor = this.errorBkgColor || this.tertiaryColor; + this.errorTextColor = this.errorTextColor || this.tertiaryTextColor; + this.classText = this.primaryTextColor; + this.fillType0 = this.primaryColor; + this.fillType1 = this.secondaryColor; + this.fillType2 = adjust$2(this.primaryColor, { h: 64 }); + this.fillType3 = adjust$2(this.secondaryColor, { h: 64 }); + this.fillType4 = adjust$2(this.primaryColor, { h: -64 }); + this.fillType5 = adjust$2(this.secondaryColor, { h: -64 }); + this.fillType6 = adjust$2(this.primaryColor, { h: 128 }); + this.fillType7 = adjust$2(this.secondaryColor, { h: 128 }); + for (let i2 = 0; i2 < this.THEME_COLOR_LIMIT; i2++) { + this["pie" + i2] = this["cScale" + i2]; + } + this.pie12 = this.pie0; + this.pieTitleTextSize = this.pieTitleTextSize || "25px"; + this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor; + this.pieSectionTextSize = this.pieSectionTextSize || "17px"; + this.pieSectionTextColor = this.pieSectionTextColor || this.textColor; + this.pieLegendTextSize = this.pieLegendTextSize || "17px"; + this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor; + this.pieStrokeColor = this.pieStrokeColor || "black"; + this.pieStrokeWidth = this.pieStrokeWidth || "2px"; + this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px"; + this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black"; + this.pieOpacity = this.pieOpacity || "0.7"; + this.quadrant1Fill = this.quadrant1Fill || this.primaryColor; + this.quadrant2Fill = this.quadrant2Fill || adjust$2(this.primaryColor, { r: 5, g: 5, b: 5 }); + this.quadrant3Fill = this.quadrant3Fill || adjust$2(this.primaryColor, { r: 10, g: 10, b: 10 }); + this.quadrant4Fill = this.quadrant4Fill || adjust$2(this.primaryColor, { r: 15, g: 15, b: 15 }); + this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor; + this.quadrant2TextFill = this.quadrant2TextFill || adjust$2(this.primaryTextColor, { r: -5, g: -5, b: -5 }); + this.quadrant3TextFill = this.quadrant3TextFill || adjust$2(this.primaryTextColor, { r: -10, g: -10, b: -10 }); + this.quadrant4TextFill = this.quadrant4TextFill || adjust$2(this.primaryTextColor, { r: -15, g: -15, b: -15 }); + this.quadrantPointFill = this.quadrantPointFill || isDark$1(this.quadrant1Fill) ? lighten$1(this.quadrant1Fill) : darken$1(this.quadrant1Fill); + this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor; + this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor; + this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor; + this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor; + this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor; + this.requirementBackground = this.requirementBackground || this.primaryColor; + this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor; + this.requirementBorderSize = this.requirementBorderSize || "1"; + this.requirementTextColor = this.requirementTextColor || this.primaryTextColor; + this.relationColor = this.relationColor || this.lineColor; + this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground; + this.relationLabelColor = this.relationLabelColor || this.actorTextColor; + this.git0 = darken$1(this.pie1, 25) || this.primaryColor; + this.git1 = this.pie2 || this.secondaryColor; + this.git2 = this.pie3 || this.tertiaryColor; + this.git3 = this.pie4 || adjust$2(this.primaryColor, { h: -30 }); + this.git4 = this.pie5 || adjust$2(this.primaryColor, { h: -60 }); + this.git5 = this.pie6 || adjust$2(this.primaryColor, { h: -90 }); + this.git6 = this.pie7 || adjust$2(this.primaryColor, { h: 60 }); + this.git7 = this.pie8 || adjust$2(this.primaryColor, { h: 120 }); + this.gitInv0 = this.gitInv0 || invert$1(this.git0); + this.gitInv1 = this.gitInv1 || invert$1(this.git1); + this.gitInv2 = this.gitInv2 || invert$1(this.git2); + this.gitInv3 = this.gitInv3 || invert$1(this.git3); + this.gitInv4 = this.gitInv4 || invert$1(this.git4); + this.gitInv5 = this.gitInv5 || invert$1(this.git5); + this.gitInv6 = this.gitInv6 || invert$1(this.git6); + this.gitInv7 = this.gitInv7 || invert$1(this.git7); + this.branchLabelColor = this.branchLabelColor || this.labelTextColor; + this.gitBranchLabel0 = this.branchLabelColor; + this.gitBranchLabel1 = "white"; + this.gitBranchLabel2 = this.branchLabelColor; + this.gitBranchLabel3 = "white"; + this.gitBranchLabel4 = this.branchLabelColor; + this.gitBranchLabel5 = this.branchLabelColor; + this.gitBranchLabel6 = this.branchLabelColor; + this.gitBranchLabel7 = this.branchLabelColor; + this.tagLabelColor = this.tagLabelColor || this.primaryTextColor; + this.tagLabelBackground = this.tagLabelBackground || this.primaryColor; + this.tagLabelBorder = this.tagBorder || this.primaryBorderColor; + this.tagLabelFontSize = this.tagLabelFontSize || "10px"; + this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor; + this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor; + this.commitLabelFontSize = this.commitLabelFontSize || "10px"; + this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd; + this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven; + } + calculate(overrides) { + if (typeof overrides !== "object") { + this.updateColors(); + return; + } + const keys2 = Object.keys(overrides); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + this.updateColors(); + keys2.forEach((k) => { + this[k] = overrides[k]; + }); + } + } + const getThemeVariables = (userOverrides) => { + const theme2 = new Theme(); + theme2.calculate(userOverrides); + return theme2; + }; + const theme = { + base: { + getThemeVariables: getThemeVariables$4 + }, + dark: { + getThemeVariables: getThemeVariables$3 + }, + default: { + getThemeVariables: getThemeVariables$2 + }, + forest: { + getThemeVariables: getThemeVariables$1 + }, + neutral: { + getThemeVariables + } + }; + const defaultConfigJson = { + "flowchart": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 8, + "htmlLabels": true, + "nodeSpacing": 50, + "rankSpacing": 50, + "curve": "basis", + "padding": 15, + "defaultRenderer": "dagre-wrapper", + "wrappingWidth": 200 + }, + "sequence": { + "useMaxWidth": true, + "hideUnusedParticipants": false, + "activationWidth": 10, + "diagramMarginX": 50, + "diagramMarginY": 10, + "actorMargin": 50, + "width": 150, + "height": 65, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "mirrorActors": true, + "forceMenus": false, + "bottomMarginAdj": 1, + "rightAngles": false, + "showSequenceNumbers": false, + "actorFontSize": 14, + "actorFontFamily": '"Open Sans", sans-serif', + "actorFontWeight": 400, + "noteFontSize": 14, + "noteFontFamily": '"trebuchet ms", verdana, arial, sans-serif', + "noteFontWeight": 400, + "noteAlign": "center", + "messageFontSize": 16, + "messageFontFamily": '"trebuchet ms", verdana, arial, sans-serif', + "messageFontWeight": 400, + "wrap": false, + "wrapPadding": 10, + "labelBoxWidth": 50, + "labelBoxHeight": 20 + }, + "gantt": { + "useMaxWidth": true, + "titleTopMargin": 25, + "barHeight": 20, + "barGap": 4, + "topPadding": 50, + "rightPadding": 75, + "leftPadding": 75, + "gridLineStartPadding": 35, + "fontSize": 11, + "sectionFontSize": 11, + "numberSectionStyles": 4, + "axisFormat": "%Y-%m-%d", + "topAxis": false, + "displayMode": "", + "weekday": "sunday" + }, + "journey": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "leftMargin": 150, + "width": 150, + "height": 50, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "bottomMarginAdj": 1, + "rightAngles": false, + "taskFontSize": 14, + "taskFontFamily": '"Open Sans", sans-serif', + "taskMargin": 50, + "activationWidth": 10, + "textPlacement": "fo", + "actorColours": [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + "sectionFills": [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + "sectionColours": [ + "#fff" + ] + }, + "class": { + "useMaxWidth": true, + "titleTopMargin": 25, + "arrowMarkerAbsolute": false, + "dividerMargin": 10, + "padding": 5, + "textHeight": 10, + "defaultRenderer": "dagre-wrapper", + "htmlLabels": false + }, + "state": { + "useMaxWidth": true, + "titleTopMargin": 25, + "dividerMargin": 10, + "sizeUnit": 5, + "padding": 8, + "textHeight": 10, + "titleShift": -15, + "noteMargin": 10, + "forkWidth": 70, + "forkHeight": 7, + "miniPadding": 2, + "fontSizeFactor": 5.02, + "fontSize": 24, + "labelHeight": 16, + "edgeLengthFactor": "20", + "compositTitleSize": 35, + "radius": 5, + "defaultRenderer": "dagre-wrapper" + }, + "er": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 20, + "layoutDirection": "TB", + "minEntityWidth": 100, + "minEntityHeight": 75, + "entityPadding": 15, + "stroke": "gray", + "fill": "honeydew", + "fontSize": 12 + }, + "pie": { + "useMaxWidth": true, + "textPosition": 0.75 + }, + "quadrantChart": { + "useMaxWidth": true, + "chartWidth": 500, + "chartHeight": 500, + "titleFontSize": 20, + "titlePadding": 10, + "quadrantPadding": 5, + "xAxisLabelPadding": 5, + "yAxisLabelPadding": 5, + "xAxisLabelFontSize": 16, + "yAxisLabelFontSize": 16, + "quadrantLabelFontSize": 16, + "quadrantTextTopPadding": 5, + "pointTextPadding": 5, + "pointLabelFontSize": 12, + "pointRadius": 5, + "xAxisPosition": "top", + "yAxisPosition": "left", + "quadrantInternalBorderStrokeWidth": 1, + "quadrantExternalBorderStrokeWidth": 2 + }, + "requirement": { + "useMaxWidth": true, + "rect_fill": "#f9f9f9", + "text_color": "#333", + "rect_border_size": "0.5px", + "rect_border_color": "#bbb", + "rect_min_width": 200, + "rect_min_height": 200, + "fontSize": 14, + "rect_padding": 10, + "line_height": 20 + }, + "mindmap": { + "useMaxWidth": true, + "padding": 10, + "maxNodeWidth": 200 + }, + "timeline": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "leftMargin": 150, + "width": 150, + "height": 50, + "boxMargin": 10, + "boxTextMargin": 5, + "noteMargin": 10, + "messageMargin": 35, + "messageAlign": "center", + "bottomMarginAdj": 1, + "rightAngles": false, + "taskFontSize": 14, + "taskFontFamily": '"Open Sans", sans-serif', + "taskMargin": 50, + "activationWidth": 10, + "textPlacement": "fo", + "actorColours": [ + "#8FBC8F", + "#7CFC00", + "#00FFFF", + "#20B2AA", + "#B0E0E6", + "#FFFFE0" + ], + "sectionFills": [ + "#191970", + "#8B008B", + "#4B0082", + "#2F4F4F", + "#800000", + "#8B4513", + "#00008B" + ], + "sectionColours": [ + "#fff" + ], + "disableMulticolor": false + }, + "gitGraph": { + "useMaxWidth": true, + "titleTopMargin": 25, + "diagramPadding": 8, + "nodeLabel": { + "width": 75, + "height": 100, + "x": -25, + "y": 0 + }, + "mainBranchName": "main", + "mainBranchOrder": 0, + "showCommitLabel": true, + "showBranches": true, + "rotateCommitLabel": true, + "arrowMarkerAbsolute": false + }, + "c4": { + "useMaxWidth": true, + "diagramMarginX": 50, + "diagramMarginY": 10, + "c4ShapeMargin": 50, + "c4ShapePadding": 20, + "width": 216, + "height": 60, + "boxMargin": 10, + "c4ShapeInRow": 4, + "nextLinePaddingX": 0, + "c4BoundaryInRow": 2, + "personFontSize": 14, + "personFontFamily": '"Open Sans", sans-serif', + "personFontWeight": "normal", + "external_personFontSize": 14, + "external_personFontFamily": '"Open Sans", sans-serif', + "external_personFontWeight": "normal", + "systemFontSize": 14, + "systemFontFamily": '"Open Sans", sans-serif', + "systemFontWeight": "normal", + "external_systemFontSize": 14, + "external_systemFontFamily": '"Open Sans", sans-serif', + "external_systemFontWeight": "normal", + "system_dbFontSize": 14, + "system_dbFontFamily": '"Open Sans", sans-serif', + "system_dbFontWeight": "normal", + "external_system_dbFontSize": 14, + "external_system_dbFontFamily": '"Open Sans", sans-serif', + "external_system_dbFontWeight": "normal", + "system_queueFontSize": 14, + "system_queueFontFamily": '"Open Sans", sans-serif', + "system_queueFontWeight": "normal", + "external_system_queueFontSize": 14, + "external_system_queueFontFamily": '"Open Sans", sans-serif', + "external_system_queueFontWeight": "normal", + "boundaryFontSize": 14, + "boundaryFontFamily": '"Open Sans", sans-serif', + "boundaryFontWeight": "normal", + "messageFontSize": 12, + "messageFontFamily": '"Open Sans", sans-serif', + "messageFontWeight": "normal", + "containerFontSize": 14, + "containerFontFamily": '"Open Sans", sans-serif', + "containerFontWeight": "normal", + "external_containerFontSize": 14, + "external_containerFontFamily": '"Open Sans", sans-serif', + "external_containerFontWeight": "normal", + "container_dbFontSize": 14, + "container_dbFontFamily": '"Open Sans", sans-serif', + "container_dbFontWeight": "normal", + "external_container_dbFontSize": 14, + "external_container_dbFontFamily": '"Open Sans", sans-serif', + "external_container_dbFontWeight": "normal", + "container_queueFontSize": 14, + "container_queueFontFamily": '"Open Sans", sans-serif', + "container_queueFontWeight": "normal", + "external_container_queueFontSize": 14, + "external_container_queueFontFamily": '"Open Sans", sans-serif', + "external_container_queueFontWeight": "normal", + "componentFontSize": 14, + "componentFontFamily": '"Open Sans", sans-serif', + "componentFontWeight": "normal", + "external_componentFontSize": 14, + "external_componentFontFamily": '"Open Sans", sans-serif', + "external_componentFontWeight": "normal", + "component_dbFontSize": 14, + "component_dbFontFamily": '"Open Sans", sans-serif', + "component_dbFontWeight": "normal", + "external_component_dbFontSize": 14, + "external_component_dbFontFamily": '"Open Sans", sans-serif', + "external_component_dbFontWeight": "normal", + "component_queueFontSize": 14, + "component_queueFontFamily": '"Open Sans", sans-serif', + "component_queueFontWeight": "normal", + "external_component_queueFontSize": 14, + "external_component_queueFontFamily": '"Open Sans", sans-serif', + "external_component_queueFontWeight": "normal", + "wrap": true, + "wrapPadding": 10, + "person_bg_color": "#08427B", + "person_border_color": "#073B6F", + "external_person_bg_color": "#686868", + "external_person_border_color": "#8A8A8A", + "system_bg_color": "#1168BD", + "system_border_color": "#3C7FC0", + "system_db_bg_color": "#1168BD", + "system_db_border_color": "#3C7FC0", + "system_queue_bg_color": "#1168BD", + "system_queue_border_color": "#3C7FC0", + "external_system_bg_color": "#999999", + "external_system_border_color": "#8A8A8A", + "external_system_db_bg_color": "#999999", + "external_system_db_border_color": "#8A8A8A", + "external_system_queue_bg_color": "#999999", + "external_system_queue_border_color": "#8A8A8A", + "container_bg_color": "#438DD5", + "container_border_color": "#3C7FC0", + "container_db_bg_color": "#438DD5", + "container_db_border_color": "#3C7FC0", + "container_queue_bg_color": "#438DD5", + "container_queue_border_color": "#3C7FC0", + "external_container_bg_color": "#B3B3B3", + "external_container_border_color": "#A6A6A6", + "external_container_db_bg_color": "#B3B3B3", + "external_container_db_border_color": "#A6A6A6", + "external_container_queue_bg_color": "#B3B3B3", + "external_container_queue_border_color": "#A6A6A6", + "component_bg_color": "#85BBF0", + "component_border_color": "#78A8D8", + "component_db_bg_color": "#85BBF0", + "component_db_border_color": "#78A8D8", + "component_queue_bg_color": "#85BBF0", + "component_queue_border_color": "#78A8D8", + "external_component_bg_color": "#CCCCCC", + "external_component_border_color": "#BFBFBF", + "external_component_db_bg_color": "#CCCCCC", + "external_component_db_border_color": "#BFBFBF", + "external_component_queue_bg_color": "#CCCCCC", + "external_component_queue_border_color": "#BFBFBF" + }, + "sankey": { + "useMaxWidth": true, + "width": 600, + "height": 400, + "linkColor": "gradient", + "nodeAlignment": "justify", + "showValues": true, + "prefix": "", + "suffix": "" + }, + "theme": "default", + "maxTextSize": 5e4, + "darkMode": false, + "fontFamily": '"trebuchet ms", verdana, arial, sans-serif;', + "logLevel": 5, + "securityLevel": "strict", + "startOnLoad": true, + "arrowMarkerAbsolute": false, + "secure": [ + "secure", + "securityLevel", + "startOnLoad", + "maxTextSize" + ], + "deterministicIds": false, + "fontSize": 16 + }; + const config$3 = { + ...defaultConfigJson, + // Set, even though they're `undefined` so that `configKeys` finds these keys + // TODO: Should we replace these with `null` so that they can go in the JSON Schema? + deterministicIDSeed: void 0, + themeCSS: void 0, + // add non-JSON default config values + themeVariables: theme["default"].getThemeVariables(), + sequence: { + ...defaultConfigJson.sequence, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + }, + noteFont: function() { + return { + fontFamily: this.noteFontFamily, + fontSize: this.noteFontSize, + fontWeight: this.noteFontWeight + }; + }, + actorFont: function() { + return { + fontFamily: this.actorFontFamily, + fontSize: this.actorFontSize, + fontWeight: this.actorFontWeight + }; + } + }, + gantt: { + ...defaultConfigJson.gantt, + tickInterval: void 0, + useWidth: void 0 + // can probably be removed since `configKeys` already includes this + }, + c4: { + ...defaultConfigJson.c4, + useWidth: void 0, + personFont: function() { + return { + fontFamily: this.personFontFamily, + fontSize: this.personFontSize, + fontWeight: this.personFontWeight + }; + }, + external_personFont: function() { + return { + fontFamily: this.external_personFontFamily, + fontSize: this.external_personFontSize, + fontWeight: this.external_personFontWeight + }; + }, + systemFont: function() { + return { + fontFamily: this.systemFontFamily, + fontSize: this.systemFontSize, + fontWeight: this.systemFontWeight + }; + }, + external_systemFont: function() { + return { + fontFamily: this.external_systemFontFamily, + fontSize: this.external_systemFontSize, + fontWeight: this.external_systemFontWeight + }; + }, + system_dbFont: function() { + return { + fontFamily: this.system_dbFontFamily, + fontSize: this.system_dbFontSize, + fontWeight: this.system_dbFontWeight + }; + }, + external_system_dbFont: function() { + return { + fontFamily: this.external_system_dbFontFamily, + fontSize: this.external_system_dbFontSize, + fontWeight: this.external_system_dbFontWeight + }; + }, + system_queueFont: function() { + return { + fontFamily: this.system_queueFontFamily, + fontSize: this.system_queueFontSize, + fontWeight: this.system_queueFontWeight + }; + }, + external_system_queueFont: function() { + return { + fontFamily: this.external_system_queueFontFamily, + fontSize: this.external_system_queueFontSize, + fontWeight: this.external_system_queueFontWeight + }; + }, + containerFont: function() { + return { + fontFamily: this.containerFontFamily, + fontSize: this.containerFontSize, + fontWeight: this.containerFontWeight + }; + }, + external_containerFont: function() { + return { + fontFamily: this.external_containerFontFamily, + fontSize: this.external_containerFontSize, + fontWeight: this.external_containerFontWeight + }; + }, + container_dbFont: function() { + return { + fontFamily: this.container_dbFontFamily, + fontSize: this.container_dbFontSize, + fontWeight: this.container_dbFontWeight + }; + }, + external_container_dbFont: function() { + return { + fontFamily: this.external_container_dbFontFamily, + fontSize: this.external_container_dbFontSize, + fontWeight: this.external_container_dbFontWeight + }; + }, + container_queueFont: function() { + return { + fontFamily: this.container_queueFontFamily, + fontSize: this.container_queueFontSize, + fontWeight: this.container_queueFontWeight + }; + }, + external_container_queueFont: function() { + return { + fontFamily: this.external_container_queueFontFamily, + fontSize: this.external_container_queueFontSize, + fontWeight: this.external_container_queueFontWeight + }; + }, + componentFont: function() { + return { + fontFamily: this.componentFontFamily, + fontSize: this.componentFontSize, + fontWeight: this.componentFontWeight + }; + }, + external_componentFont: function() { + return { + fontFamily: this.external_componentFontFamily, + fontSize: this.external_componentFontSize, + fontWeight: this.external_componentFontWeight + }; + }, + component_dbFont: function() { + return { + fontFamily: this.component_dbFontFamily, + fontSize: this.component_dbFontSize, + fontWeight: this.component_dbFontWeight + }; + }, + external_component_dbFont: function() { + return { + fontFamily: this.external_component_dbFontFamily, + fontSize: this.external_component_dbFontSize, + fontWeight: this.external_component_dbFontWeight + }; + }, + component_queueFont: function() { + return { + fontFamily: this.component_queueFontFamily, + fontSize: this.component_queueFontSize, + fontWeight: this.component_queueFontWeight + }; + }, + external_component_queueFont: function() { + return { + fontFamily: this.external_component_queueFontFamily, + fontSize: this.external_component_queueFontSize, + fontWeight: this.external_component_queueFontWeight + }; + }, + boundaryFont: function() { + return { + fontFamily: this.boundaryFontFamily, + fontSize: this.boundaryFontSize, + fontWeight: this.boundaryFontWeight + }; + }, + messageFont: function() { + return { + fontFamily: this.messageFontFamily, + fontSize: this.messageFontSize, + fontWeight: this.messageFontWeight + }; + } + }, + pie: { + ...defaultConfigJson.pie, + useWidth: 984 + }, + requirement: { + ...defaultConfigJson.requirement, + useWidth: void 0 + }, + gitGraph: { + ...defaultConfigJson.gitGraph, + // TODO: This is a temporary override for `gitGraph`, since every other + // diagram does have `useMaxWidth`, but instead sets it to `true`. + // Should we set this to `true` instead? + useMaxWidth: false + }, + sankey: { + ...defaultConfigJson.sankey, + // this is false, unlike every other diagram (other than gitGraph) + // TODO: can we make this default to `true` instead? + useMaxWidth: false + } + }; + const keyify = (obj, prefix = "") => Object.keys(obj).reduce((res, el) => { + if (Array.isArray(obj[el])) { + return res; + } else if (typeof obj[el] === "object" && obj[el] !== null) { + return [...res, prefix + el, ...keyify(obj[el], "")]; + } + return [...res, prefix + el]; + }, []); + const configKeys = new Set(keyify(config$3, "")); + const defaultConfig$1 = config$3; + const sanitizeDirective = (args) => { + log$1.debug("sanitizeDirective called with", args); + if (typeof args !== "object" || args == null) { + return; + } + if (Array.isArray(args)) { + args.forEach((arg) => sanitizeDirective(arg)); + return; + } + for (const key of Object.keys(args)) { + log$1.debug("Checking key", key); + if (key.startsWith("__") || key.includes("proto") || key.includes("constr") || !configKeys.has(key) || args[key] == null) { + log$1.debug("sanitize deleting key: ", key); + delete args[key]; + continue; + } + if (typeof args[key] === "object") { + log$1.debug("sanitizing object", key); + sanitizeDirective(args[key]); + continue; + } + const cssMatchers = ["themeCSS", "fontFamily", "altFontFamily"]; + for (const cssKey of cssMatchers) { + if (key.includes(cssKey)) { + log$1.debug("sanitizing css option", key); + args[key] = sanitizeCss(args[key]); + } + } + } + if (args.themeVariables) { + for (const k of Object.keys(args.themeVariables)) { + const val = args.themeVariables[k]; + if ((val == null ? void 0 : val.match) && !val.match(/^[\d "#%(),.;A-Za-z]+$/)) { + args.themeVariables[k] = ""; + } + } + } + log$1.debug("After sanitization", args); + }; + const sanitizeCss = (str2) => { + let startCnt = 0; + let endCnt = 0; + for (const element2 of str2) { + if (startCnt < endCnt) { + return "{ /* ERROR: Unbalanced CSS */ }"; + } + if (element2 === "{") { + startCnt++; + } else if (element2 === "}") { + endCnt++; + } + } + if (startCnt !== endCnt) { + return "{ /* ERROR: Unbalanced CSS */ }"; + } + return str2; + }; + const frontMatterRegex = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s; + const directiveRegex = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; + const anyCommentRegex = /\s*%%.*\n/gm; + class UnknownDiagramError extends Error { + constructor(message) { + super(message); + this.name = "UnknownDiagramError"; + } + } + const detectors = {}; + const detectType = function(text2, config2) { + text2 = text2.replace(frontMatterRegex, "").replace(directiveRegex, "").replace(anyCommentRegex, "\n"); + for (const [key, { detector: detector2 }] of Object.entries(detectors)) { + const diagram2 = detector2(text2, config2); + if (diagram2) { + return key; + } + } + throw new UnknownDiagramError( + `No diagram type detected matching given configuration for text: ${text2}` + ); + }; + const registerLazyLoadedDiagrams = (...diagrams2) => { + for (const { id: id2, detector: detector2, loader: loader2 } of diagrams2) { + addDetector(id2, detector2, loader2); + } + }; + const addDetector = (key, detector2, loader2) => { + if (detectors[key]) { + log$1.error(`Detector with key ${key} already exists`); + } else { + detectors[key] = { detector: detector2, loader: loader2 }; + } + log$1.debug(`Detector with key ${key} added${loader2 ? " with loader" : ""}`); + }; + const getDiagramLoader = (key) => { + return detectors[key].loader; + }; + const assignWithDepth = (dst, src, { depth = 2, clobber = false } = {}) => { + const config2 = { depth, clobber }; + if (Array.isArray(src) && !Array.isArray(dst)) { + src.forEach((s) => assignWithDepth(dst, s, config2)); + return dst; + } else if (Array.isArray(src) && Array.isArray(dst)) { + src.forEach((s) => { + if (!dst.includes(s)) { + dst.push(s); + } + }); + return dst; + } + if (dst === void 0 || depth <= 0) { + if (dst !== void 0 && dst !== null && typeof dst === "object" && typeof src === "object") { + return Object.assign(dst, src); + } else { + return src; + } + } + if (src !== void 0 && typeof dst === "object" && typeof src === "object") { + Object.keys(src).forEach((key) => { + if (typeof src[key] === "object" && (dst[key] === void 0 || typeof dst[key] === "object")) { + if (dst[key] === void 0) { + dst[key] = Array.isArray(src[key]) ? [] : {}; + } + dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber }); + } else if (clobber || typeof dst[key] !== "object" && typeof src[key] !== "object") { + dst[key] = src[key]; + } + }); + } + return dst; + }; + const assignWithDepth$1 = assignWithDepth; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + const freeGlobal$1 = freeGlobal; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal$1 || freeSelf || Function("return this")(); + const root$1 = root; + var Symbol$1 = root$1.Symbol; + const Symbol$2 = Symbol$1; + var objectProto$i = Object.prototype; + var hasOwnProperty$g = objectProto$i.hasOwnProperty; + var nativeObjectToString$1 = objectProto$i.toString; + var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0; + function getRawTag(value2) { + var isOwn = hasOwnProperty$g.call(value2, symToStringTag$1), tag = value2[symToStringTag$1]; + try { + value2[symToStringTag$1] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString$1.call(value2); + if (unmasked) { + if (isOwn) { + value2[symToStringTag$1] = tag; + } else { + delete value2[symToStringTag$1]; + } + } + return result; + } + var objectProto$h = Object.prototype; + var nativeObjectToString = objectProto$h.toString; + function objectToString(value2) { + return nativeObjectToString.call(value2); + } + var nullTag = "[object Null]", undefinedTag = "[object Undefined]"; + var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0; + function baseGetTag(value2) { + if (value2 == null) { + return value2 === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value2) ? getRawTag(value2) : objectToString(value2); + } + function isObject$1(value2) { + var type2 = typeof value2; + return value2 != null && (type2 == "object" || type2 == "function"); + } + var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; + function isFunction(value2) { + if (!isObject$1(value2)) { + return false; + } + var tag = baseGetTag(value2); + return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag; + } + var coreJsData = root$1["__core-js_shared__"]; + const coreJsData$1 = coreJsData; + var maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + var funcProto$2 = Function.prototype; + var funcToString$2 = funcProto$2.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString$2.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var funcProto$1 = Function.prototype, objectProto$g = Object.prototype; + var funcToString$1 = funcProto$1.toString; + var hasOwnProperty$f = objectProto$g.hasOwnProperty; + var reIsNative = RegExp( + "^" + funcToString$1.call(hasOwnProperty$f).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + function baseIsNative(value2) { + if (!isObject$1(value2) || isMasked(value2)) { + return false; + } + var pattern = isFunction(value2) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value2)); + } + function getValue(object2, key) { + return object2 == null ? void 0 : object2[key]; + } + function getNative(object2, key) { + var value2 = getValue(object2, key); + return baseIsNative(value2) ? value2 : void 0; + } + var nativeCreate = getNative(Object, "create"); + const nativeCreate$1 = nativeCreate; + function hashClear() { + this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {}; + this.size = 0; + } + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + var HASH_UNDEFINED$2 = "__lodash_hash_undefined__"; + var objectProto$f = Object.prototype; + var hasOwnProperty$e = objectProto$f.hasOwnProperty; + function hashGet(key) { + var data = this.__data__; + if (nativeCreate$1) { + var result = data[key]; + return result === HASH_UNDEFINED$2 ? void 0 : result; + } + return hasOwnProperty$e.call(data, key) ? data[key] : void 0; + } + var objectProto$e = Object.prototype; + var hasOwnProperty$d = objectProto$e.hasOwnProperty; + function hashHas(key) { + var data = this.__data__; + return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$d.call(data, key); + } + var HASH_UNDEFINED$1 = "__lodash_hash_undefined__"; + function hashSet(key, value2) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate$1 && value2 === void 0 ? HASH_UNDEFINED$1 : value2; + return this; + } + function Hash(entries2) { + var index2 = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index2 < length2) { + var entry = entries2[index2]; + this.set(entry[0], entry[1]); + } + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + function eq(value2, other) { + return value2 === other || value2 !== value2 && other !== other; + } + function assocIndexOf(array2, key) { + var length2 = array2.length; + while (length2--) { + if (eq(array2[length2][0], key)) { + return length2; + } + } + return -1; + } + var arrayProto = Array.prototype; + var splice$1 = arrayProto.splice; + function listCacheDelete(key) { + var data = this.__data__, index2 = assocIndexOf(data, key); + if (index2 < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index2 == lastIndex) { + data.pop(); + } else { + splice$1.call(data, index2, 1); + } + --this.size; + return true; + } + function listCacheGet(key) { + var data = this.__data__, index2 = assocIndexOf(data, key); + return index2 < 0 ? void 0 : data[index2][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value2) { + var data = this.__data__, index2 = assocIndexOf(data, key); + if (index2 < 0) { + ++this.size; + data.push([key, value2]); + } else { + data[index2][1] = value2; + } + return this; + } + function ListCache(entries2) { + var index2 = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index2 < length2) { + var entry = entries2[index2]; + this.set(entry[0], entry[1]); + } + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + var Map$1 = getNative(root$1, "Map"); + const Map$2 = Map$1; + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map$2 || ListCache)(), + "string": new Hash() + }; + } + function isKeyable(value2) { + var type2 = typeof value2; + return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value2 !== "__proto__" : value2 === null; + } + function getMapData(map2, key) { + var data = map2.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value2) { + var data = getMapData(this, key), size2 = data.size; + data.set(key, value2); + this.size += data.size == size2 ? 0 : 1; + return this; + } + function MapCache(entries2) { + var index2 = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index2 < length2) { + var entry = entries2[index2]; + this.set(entry[0], entry[1]); + } + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + var FUNC_ERROR_TEXT = "Expected a function"; + function memoize(func, resolver2) { + if (typeof func != "function" || resolver2 != null && typeof resolver2 != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver2 ? resolver2.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; + } + function stackGet(key) { + return this.__data__.get(key); + } + function stackHas(key) { + return this.__data__.has(key); + } + var LARGE_ARRAY_SIZE$1 = 200; + function stackSet(key, value2) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs2 = data.__data__; + if (!Map$2 || pairs2.length < LARGE_ARRAY_SIZE$1 - 1) { + pairs2.push([key, value2]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs2); + } + data.set(key, value2); + this.size = data.size; + return this; + } + function Stack(entries2) { + var data = this.__data__ = new ListCache(entries2); + this.size = data.size; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + var defineProperty = function() { + try { + var func = getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + const defineProperty$1 = defineProperty; + function baseAssignValue(object2, key, value2) { + if (key == "__proto__" && defineProperty$1) { + defineProperty$1(object2, key, { + "configurable": true, + "enumerable": true, + "value": value2, + "writable": true + }); + } else { + object2[key] = value2; + } + } + function assignMergeValue(object2, key, value2) { + if (value2 !== void 0 && !eq(object2[key], value2) || value2 === void 0 && !(key in object2)) { + baseAssignValue(object2, key, value2); + } + } + function createBaseFor(fromRight) { + return function(object2, iteratee, keysFunc) { + var index2 = -1, iterable = Object(object2), props = keysFunc(object2), length2 = props.length; + while (length2--) { + var key = props[fromRight ? length2 : ++index2]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object2; + }; + } + var baseFor = createBaseFor(); + const baseFor$1 = baseFor; + var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports; + var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module; + var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2; + var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0, allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : void 0; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length2 = buffer.length, result = allocUnsafe ? allocUnsafe(length2) : new buffer.constructor(length2); + buffer.copy(result); + return result; + } + var Uint8Array$1 = root$1.Uint8Array; + const Uint8Array$2 = Uint8Array$1; + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array$2(result).set(new Uint8Array$2(arrayBuffer)); + return result; + } + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + function copyArray(source, array2) { + var index2 = -1, length2 = source.length; + array2 || (array2 = Array(length2)); + while (++index2 < length2) { + array2[index2] = source[index2]; + } + return array2; + } + var objectCreate = Object.create; + var baseCreate = function() { + function object2() { + } + return function(proto) { + if (!isObject$1(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object2.prototype = proto; + var result = new object2(); + object2.prototype = void 0; + return result; + }; + }(); + const baseCreate$1 = baseCreate; + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + var getPrototype = overArg(Object.getPrototypeOf, Object); + const getPrototype$1 = getPrototype; + var objectProto$d = Object.prototype; + function isPrototype(value2) { + var Ctor = value2 && value2.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$d; + return value2 === proto; + } + function initCloneObject(object2) { + return typeof object2.constructor == "function" && !isPrototype(object2) ? baseCreate$1(getPrototype$1(object2)) : {}; + } + function isObjectLike(value2) { + return value2 != null && typeof value2 == "object"; + } + var argsTag$3 = "[object Arguments]"; + function baseIsArguments(value2) { + return isObjectLike(value2) && baseGetTag(value2) == argsTag$3; + } + var objectProto$c = Object.prototype; + var hasOwnProperty$c = objectProto$c.hasOwnProperty; + var propertyIsEnumerable$1 = objectProto$c.propertyIsEnumerable; + var isArguments = baseIsArguments(function() { + return arguments; + }()) ? baseIsArguments : function(value2) { + return isObjectLike(value2) && hasOwnProperty$c.call(value2, "callee") && !propertyIsEnumerable$1.call(value2, "callee"); + }; + const isArguments$1 = isArguments; + var isArray = Array.isArray; + const isArray$1 = isArray; + var MAX_SAFE_INTEGER$1 = 9007199254740991; + function isLength(value2) { + return typeof value2 == "number" && value2 > -1 && value2 % 1 == 0 && value2 <= MAX_SAFE_INTEGER$1; + } + function isArrayLike(value2) { + return value2 != null && isLength(value2.length) && !isFunction(value2); + } + function isArrayLikeObject(value2) { + return isObjectLike(value2) && isArrayLike(value2); + } + function stubFalse() { + return false; + } + var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports; + var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module; + var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; + var Buffer = moduleExports$1 ? root$1.Buffer : void 0; + var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0; + var isBuffer = nativeIsBuffer || stubFalse; + const isBuffer$1 = isBuffer; + var objectTag$4 = "[object Object]"; + var funcProto = Function.prototype, objectProto$b = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty$b = objectProto$b.hasOwnProperty; + var objectCtorString = funcToString.call(Object); + function isPlainObject(value2) { + if (!isObjectLike(value2) || baseGetTag(value2) != objectTag$4) { + return false; + } + var proto = getPrototype$1(value2); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty$b.call(proto, "constructor") && proto.constructor; + return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; + } + var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$6 = "[object Map]", numberTag$3 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$6 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]"; + var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]"; + var typedArrayTags = {}; + typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true; + typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$6] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$6] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false; + function baseIsTypedArray(value2) { + return isObjectLike(value2) && isLength(value2.length) && !!typedArrayTags[baseGetTag(value2)]; + } + function baseUnary(func) { + return function(value2) { + return func(value2); + }; + } + var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports; + var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal$1.process; + var nodeUtil = function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + }(); + const nodeUtil$1 = nodeUtil; + var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray; + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + const isTypedArray$1 = isTypedArray; + function safeGet(object2, key) { + if (key === "constructor" && typeof object2[key] === "function") { + return; + } + if (key == "__proto__") { + return; + } + return object2[key]; + } + var objectProto$a = Object.prototype; + var hasOwnProperty$a = objectProto$a.hasOwnProperty; + function assignValue(object2, key, value2) { + var objValue = object2[key]; + if (!(hasOwnProperty$a.call(object2, key) && eq(objValue, value2)) || value2 === void 0 && !(key in object2)) { + baseAssignValue(object2, key, value2); + } + } + function copyObject(source, props, object2, customizer) { + var isNew = !object2; + object2 || (object2 = {}); + var index2 = -1, length2 = props.length; + while (++index2 < length2) { + var key = props[index2]; + var newValue = customizer ? customizer(object2[key], source[key], key, object2, source) : void 0; + if (newValue === void 0) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object2, key, newValue); + } else { + assignValue(object2, key, newValue); + } + } + return object2; + } + function baseTimes(n, iteratee) { + var index2 = -1, result = Array(n); + while (++index2 < n) { + result[index2] = iteratee(index2); + } + return result; + } + var MAX_SAFE_INTEGER = 9007199254740991; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function isIndex(value2, length2) { + var type2 = typeof value2; + length2 = length2 == null ? MAX_SAFE_INTEGER : length2; + return !!length2 && (type2 == "number" || type2 != "symbol" && reIsUint.test(value2)) && (value2 > -1 && value2 % 1 == 0 && value2 < length2); + } + var objectProto$9 = Object.prototype; + var hasOwnProperty$9 = objectProto$9.hasOwnProperty; + function arrayLikeKeys(value2, inherited) { + var isArr = isArray$1(value2), isArg = !isArr && isArguments$1(value2), isBuff = !isArr && !isArg && isBuffer$1(value2), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value2), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value2.length, String) : [], length2 = result.length; + for (var key in value2) { + if ((inherited || hasOwnProperty$9.call(value2, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length2)))) { + result.push(key); + } + } + return result; + } + function nativeKeysIn(object2) { + var result = []; + if (object2 != null) { + for (var key in Object(object2)) { + result.push(key); + } + } + return result; + } + var objectProto$8 = Object.prototype; + var hasOwnProperty$8 = objectProto$8.hasOwnProperty; + function baseKeysIn(object2) { + if (!isObject$1(object2)) { + return nativeKeysIn(object2); + } + var isProto = isPrototype(object2), result = []; + for (var key in object2) { + if (!(key == "constructor" && (isProto || !hasOwnProperty$8.call(object2, key)))) { + result.push(key); + } + } + return result; + } + function keysIn(object2) { + return isArrayLike(object2) ? arrayLikeKeys(object2, true) : baseKeysIn(object2); + } + function toPlainObject(value2) { + return copyObject(value2, keysIn(value2)); + } + function baseMergeDeep(object2, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object2, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); + if (stacked) { + assignMergeValue(object2, key, stacked); + return; + } + var newValue = customizer ? customizer(objValue, srcValue, key + "", object2, source, stack) : void 0; + var isCommon = newValue === void 0; + if (isCommon) { + var isArr = isArray$1(srcValue), isBuff = !isArr && isBuffer$1(srcValue), isTyped = !isArr && !isBuff && isTypedArray$1(srcValue); + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray$1(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments$1(srcValue)) { + newValue = objValue; + if (isArguments$1(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject$1(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack["delete"](srcValue); + } + assignMergeValue(object2, key, newValue); + } + function baseMerge(object2, source, srcIndex, customizer, stack) { + if (object2 === source) { + return; + } + baseFor$1(source, function(srcValue, key) { + stack || (stack = new Stack()); + if (isObject$1(srcValue)) { + baseMergeDeep(object2, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer ? customizer(safeGet(object2, key), srcValue, key + "", object2, source, stack) : void 0; + if (newValue === void 0) { + newValue = srcValue; + } + assignMergeValue(object2, key, newValue); + } + }, keysIn); + } + function identity(value2) { + return value2; + } + function apply$1(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + var nativeMax$2 = Math.max; + function overRest(func, start2, transform) { + start2 = nativeMax$2(start2 === void 0 ? func.length - 1 : start2, 0); + return function() { + var args = arguments, index2 = -1, length2 = nativeMax$2(args.length - start2, 0), array2 = Array(length2); + while (++index2 < length2) { + array2[index2] = args[start2 + index2]; + } + index2 = -1; + var otherArgs = Array(start2 + 1); + while (++index2 < start2) { + otherArgs[index2] = args[index2]; + } + otherArgs[start2] = transform(array2); + return apply$1(func, this, otherArgs); + }; + } + function constant$2(value2) { + return function() { + return value2; + }; + } + var baseSetToString = !defineProperty$1 ? identity : function(func, string2) { + return defineProperty$1(func, "toString", { + "configurable": true, + "enumerable": false, + "value": constant$2(string2), + "writable": true + }); + }; + const baseSetToString$1 = baseSetToString; + var HOT_COUNT = 800, HOT_SPAN = 16; + var nativeNow = Date.now; + function shortOut(func) { + var count = 0, lastCalled = 0; + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(void 0, arguments); + }; + } + var setToString = shortOut(baseSetToString$1); + const setToString$1 = setToString; + function baseRest(func, start2) { + return setToString$1(overRest(func, start2, identity), func + ""); + } + function isIterateeCall(value2, index2, object2) { + if (!isObject$1(object2)) { + return false; + } + var type2 = typeof index2; + if (type2 == "number" ? isArrayLike(object2) && isIndex(index2, object2.length) : type2 == "string" && index2 in object2) { + return eq(object2[index2], value2); + } + return false; + } + function createAssigner(assigner) { + return baseRest(function(object2, sources) { + var index2 = -1, length2 = sources.length, customizer = length2 > 1 ? sources[length2 - 1] : void 0, guard = length2 > 2 ? sources[2] : void 0; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length2--, customizer) : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length2 < 3 ? void 0 : customizer; + length2 = 1; + } + object2 = Object(object2); + while (++index2 < length2) { + var source = sources[index2]; + if (source) { + assigner(object2, source, index2, customizer); + } + } + return object2; + }); + } + var merge$2 = createAssigner(function(object2, source, srcIndex) { + baseMerge(object2, source, srcIndex); + }); + const merge$3 = merge$2; + const ZERO_WIDTH_SPACE = "​"; + const d3CurveTypes = { + curveBasis, + curveBasisClosed, + curveBasisOpen, + curveBumpX: bumpX, + curveBumpY: bumpY, + curveBundle, + curveCardinalClosed, + curveCardinalOpen, + curveCardinal, + curveCatmullRomClosed, + curveCatmullRomOpen, + curveCatmullRom, + curveLinear, + curveLinearClosed, + curveMonotoneX: monotoneX, + curveMonotoneY: monotoneY, + curveNatural, + curveStep, + curveStepAfter: stepAfter, + curveStepBefore: stepBefore + }; + const directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi; + const detectInit = function(text2, config2) { + const inits = detectDirective(text2, /(?:init\b)|(?:initialize\b)/); + let results = {}; + if (Array.isArray(inits)) { + const args = inits.map((init2) => init2.args); + sanitizeDirective(args); + results = assignWithDepth$1(results, [...args]); + } else { + results = inits.args; + } + if (!results) { + return; + } + let type2 = detectType(text2, config2); + const prop = "config"; + if (results[prop] !== void 0) { + if (type2 === "flowchart-v2") { + type2 = "flowchart"; + } + results[type2] = results[prop]; + delete results[prop]; + } + return results; + }; + const detectDirective = function(text2, type2 = null) { + try { + const commentWithoutDirectives = new RegExp( + `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).* +`, + "ig" + ); + text2 = text2.trim().replace(commentWithoutDirectives, "").replace(/'/gm, '"'); + log$1.debug( + `Detecting diagram directive${type2 !== null ? " type:" + type2 : ""} based on the text:${text2}` + ); + let match; + const result = []; + while ((match = directiveRegex.exec(text2)) !== null) { + if (match.index === directiveRegex.lastIndex) { + directiveRegex.lastIndex++; + } + if (match && !type2 || type2 && match[1] && match[1].match(type2) || type2 && match[2] && match[2].match(type2)) { + const type22 = match[1] ? match[1] : match[2]; + const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null; + result.push({ type: type22, args }); + } + } + if (result.length === 0) { + return { type: text2, args: null }; + } + return result.length === 1 ? result[0] : result; + } catch (error) { + log$1.error( + `ERROR: ${error.message} - Unable to parse directive type: '${type2}' based on the text: '${text2}'` + ); + return { type: void 0, args: null }; + } + }; + const removeDirectives = function(text2) { + return text2.replace(directiveRegex, ""); + }; + const isSubstringInArray = function(str2, arr) { + for (const [i2, element2] of arr.entries()) { + if (element2.match(str2)) { + return i2; + } + } + return -1; + }; + function interpolateToCurve(interpolate2, defaultCurve) { + if (!interpolate2) { + return defaultCurve; + } + const curveName = `curve${interpolate2.charAt(0).toUpperCase() + interpolate2.slice(1)}`; + return d3CurveTypes[curveName] ?? defaultCurve; + } + function formatUrl(linkStr, config2) { + const url = linkStr.trim(); + if (!url) { + return void 0; + } + if (config2.securityLevel !== "loose") { + return sanitizeUrl_1(url); + } + return url; + } + const runFunc = (functionName, ...params) => { + const arrPaths = functionName.split("."); + const len = arrPaths.length - 1; + const fnName = arrPaths[len]; + let obj = window; + for (let i2 = 0; i2 < len; i2++) { + obj = obj[arrPaths[i2]]; + if (!obj) { + log$1.error(`Function name: ${functionName} not found in window`); + return; + } + } + obj[fnName](...params); + }; + function distance(p1, p2) { + if (!p1 || !p2) { + return 0; + } + return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); + } + function traverseEdge(points) { + let prevPoint; + let totalDistance = 0; + points.forEach((point2) => { + totalDistance += distance(point2, prevPoint); + prevPoint = point2; + }); + const remainingDistance = totalDistance / 2; + return calculatePoint(points, remainingDistance); + } + function calcLabelPosition(points) { + if (points.length === 1) { + return points[0]; + } + return traverseEdge(points); + } + const roundNumber = (num, precision = 2) => { + const factor = Math.pow(10, precision); + return Math.round(num * factor) / factor; + }; + const calculatePoint = (points, distanceToTraverse) => { + let prevPoint = void 0; + let remainingDistance = distanceToTraverse; + for (const point2 of points) { + if (prevPoint) { + const vectorDistance = distance(point2, prevPoint); + if (vectorDistance < remainingDistance) { + remainingDistance -= vectorDistance; + } else { + const distanceRatio = remainingDistance / vectorDistance; + if (distanceRatio <= 0) { + return prevPoint; + } + if (distanceRatio >= 1) { + return { x: point2.x, y: point2.y }; + } + if (distanceRatio > 0 && distanceRatio < 1) { + return { + x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point2.x, 5), + y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point2.y, 5) + }; + } + } + } + prevPoint = point2; + } + throw new Error("Could not find a suitable point for the given distance"); + }; + const calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => { + log$1.info(`our points ${JSON.stringify(points)}`); + if (points[0] !== initialPosition) { + points = points.reverse(); + } + const distanceToCardinalityPoint = 25; + const center2 = calculatePoint(points, distanceToCardinalityPoint); + const d = isRelationTypePresent ? 10 : 5; + const angle = Math.atan2(points[0].y - center2.y, points[0].x - center2.x); + const cardinalityPosition = { x: 0, y: 0 }; + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2; + return cardinalityPosition; + }; + function calcTerminalLabelPosition(terminalMarkerSize, position2, _points) { + const points = structuredClone(_points); + log$1.info("our points", points); + if (position2 !== "start_left" && position2 !== "start_right") { + points.reverse(); + } + const distanceToCardinalityPoint = 25 + terminalMarkerSize; + const center2 = calculatePoint(points, distanceToCardinalityPoint); + const d = 10 + terminalMarkerSize * 0.5; + const angle = Math.atan2(points[0].y - center2.y, points[0].x - center2.x); + const cardinalityPosition = { x: 0, y: 0 }; + if (position2 === "start_left") { + cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center2.x) / 2; + cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center2.y) / 2; + } else if (position2 === "end_right") { + cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center2.x) / 2 - 5; + cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center2.y) / 2 - 5; + } else if (position2 === "end_left") { + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2 - 5; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2 - 5; + } else { + cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2; + cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2; + } + return cardinalityPosition; + } + function getStylesFromArray(arr) { + let style = ""; + let labelStyle = ""; + for (const element2 of arr) { + if (element2 !== void 0) { + if (element2.startsWith("color:") || element2.startsWith("text-align:")) { + labelStyle = labelStyle + element2 + ";"; + } else { + style = style + element2 + ";"; + } + } + } + return { style, labelStyle }; + } + let cnt$1 = 0; + const generateId$1 = () => { + cnt$1++; + return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt$1; + }; + function makeRandomHex(length2) { + let result = ""; + const characters2 = "0123456789abcdef"; + const charactersLength = characters2.length; + for (let i2 = 0; i2 < length2; i2++) { + result += characters2.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; + } + const random = (options2) => { + return makeRandomHex(options2.length); + }; + const getTextObj$3 = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: "start", + style: "#666", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0, + valign: void 0, + text: "" + }; + }; + const drawSimpleText = function(elem, textData) { + const nText = textData.text.replace(common$1.lineBreakRegex, " "); + const [, _fontSizePx] = parseFontSize(textData.fontSize); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.style("text-anchor", textData.anchor); + textElem.style("font-family", textData.fontFamily); + textElem.style("font-size", _fontSizePx); + textElem.style("font-weight", textData.fontWeight); + textElem.attr("fill", textData.fill); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.attr("fill", textData.fill); + span.text(nText); + return textElem; + }; + const wrapLabel = memoize( + (label, maxWidth, config2) => { + if (!label) { + return label; + } + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
" }, + config2 + ); + if (common$1.lineBreakRegex.test(label)) { + return label; + } + const words = label.split(" "); + const completedLines = []; + let nextLine = ""; + words.forEach((word, index2) => { + const wordLength = calculateTextWidth(`${word} `, config2); + const nextLineLength = calculateTextWidth(nextLine, config2); + if (wordLength > maxWidth) { + const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config2); + completedLines.push(nextLine, ...hyphenatedStrings); + nextLine = remainingWord; + } else if (nextLineLength + wordLength >= maxWidth) { + completedLines.push(nextLine); + nextLine = word; + } else { + nextLine = [nextLine, word].filter(Boolean).join(" "); + } + const currentWord = index2 + 1; + const isLastWord = currentWord === words.length; + if (isLastWord) { + completedLines.push(nextLine); + } + }); + return completedLines.filter((line2) => line2 !== "").join(config2.joinWith); + }, + (label, maxWidth, config2) => `${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}` + ); + const breakString = memoize( + (word, maxWidth, hyphenCharacter = "-", config2) => { + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, + config2 + ); + const characters2 = [...word]; + const lines = []; + let currentLine = ""; + characters2.forEach((character2, index2) => { + const nextLine = `${currentLine}${character2}`; + const lineWidth = calculateTextWidth(nextLine, config2); + if (lineWidth >= maxWidth) { + const currentCharacter = index2 + 1; + const isLastLine = characters2.length === currentCharacter; + const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`; + lines.push(isLastLine ? nextLine : hyphenatedNextLine); + currentLine = ""; + } else { + currentLine = nextLine; + } + }); + return { hyphenatedStrings: lines, remainingWord: currentLine }; + }, + (word, maxWidth, hyphenCharacter = "-", config2) => `${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` + ); + function calculateTextHeight(text2, config2) { + return calculateTextDimensions(text2, config2).height; + } + function calculateTextWidth(text2, config2) { + return calculateTextDimensions(text2, config2).width; + } + const calculateTextDimensions = memoize( + (text2, config2) => { + const { fontSize = 12, fontFamily = "Arial", fontWeight = 400 } = config2; + if (!text2) { + return { width: 0, height: 0 }; + } + const [, _fontSizePx] = parseFontSize(fontSize); + const fontFamilies = ["sans-serif", fontFamily]; + const lines = text2.split(common$1.lineBreakRegex); + const dims = []; + const body = d3select("body"); + if (!body.remove) { + return { width: 0, height: 0, lineHeight: 0 }; + } + const g = body.append("svg"); + for (const fontFamily2 of fontFamilies) { + let cHeight = 0; + const dim = { width: 0, height: 0, lineHeight: 0 }; + for (const line2 of lines) { + const textObj = getTextObj$3(); + textObj.text = line2 || ZERO_WIDTH_SPACE; + const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2); + const bBox = (textElem._groups || textElem)[0][0].getBBox(); + if (bBox.width === 0 && bBox.height === 0) { + throw new Error("svg element not in render tree"); + } + dim.width = Math.round(Math.max(dim.width, bBox.width)); + cHeight = Math.round(bBox.height); + dim.height += cHeight; + dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight)); + } + dims.push(dim); + } + g.remove(); + const index2 = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1; + return dims[index2]; + }, + (text2, config2) => `${text2}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` + ); + class InitIDGenerator { + constructor(deterministic = false, seed) { + this.count = 0; + this.count = seed ? seed.length : 0; + this.next = deterministic ? () => this.count++ : () => Date.now(); + } + } + let decoder; + const entityDecode = function(html2) { + decoder = decoder || document.createElement("div"); + html2 = escape(html2).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"); + decoder.innerHTML = html2; + return unescape(decoder.textContent); + }; + function isDetailedError(error) { + return "str" in error; + } + const insertTitle = (parent, cssClass, titleTopMargin, title2) => { + var _a; + if (!title2) { + return; + } + const bounds2 = (_a = parent.node()) == null ? void 0 : _a.getBBox(); + if (!bounds2) { + return; + } + parent.append("text").text(title2).attr("x", bounds2.x + bounds2.width / 2).attr("y", -titleTopMargin).attr("class", cssClass); + }; + const parseFontSize = (fontSize) => { + if (typeof fontSize === "number") { + return [fontSize, fontSize + "px"]; + } + const fontSizeNumber = parseInt(fontSize ?? "", 10); + if (Number.isNaN(fontSizeNumber)) { + return [void 0, void 0]; + } else if (fontSize === String(fontSizeNumber)) { + return [fontSizeNumber, fontSize + "px"]; + } else { + return [fontSizeNumber, fontSize]; + } + }; + function cleanAndMerge(defaultData, data) { + return merge$3({}, defaultData, data); + } + const utils = { + assignWithDepth: assignWithDepth$1, + wrapLabel, + calculateTextHeight, + calculateTextWidth, + calculateTextDimensions, + cleanAndMerge, + detectInit, + detectDirective, + isSubstringInArray, + interpolateToCurve, + calcLabelPosition, + calcCardinalityPosition, + calcTerminalLabelPosition, + formatUrl, + getStylesFromArray, + generateId: generateId$1, + random, + runFunc, + entityDecode, + insertTitle, + parseFontSize, + InitIDGenerator + }; + var COMMENT = "comm"; + var RULESET = "rule"; + var DECLARATION = "decl"; + var IMPORT = "@import"; + var KEYFRAMES = "@keyframes"; + var abs = Math.abs; + var from = String.fromCharCode; + function trim(value2) { + return value2.trim(); + } + function replace(value2, pattern, replacement) { + return value2.replace(pattern, replacement); + } + function indexof(value2, search2) { + return value2.indexOf(search2); + } + function charat(value2, index2) { + return value2.charCodeAt(index2) | 0; + } + function substr(value2, begin, end2) { + return value2.slice(begin, end2); + } + function strlen(value2) { + return value2.length; + } + function sizeof(value2) { + return value2.length; + } + function append(value2, array2) { + return array2.push(value2), value2; + } + var line = 1; + var column = 1; + var length = 0; + var position$2 = 0; + var character = 0; + var characters = ""; + function node(value2, root2, parent, type2, props, children2, length2) { + return { value: value2, root: root2, parent, type: type2, props, children: children2, line, column, length: length2, return: "" }; + } + function char() { + return character; + } + function prev() { + character = position$2 > 0 ? charat(characters, --position$2) : 0; + if (column--, character === 10) + column = 1, line--; + return character; + } + function next$1() { + character = position$2 < length ? charat(characters, position$2++) : 0; + if (column++, character === 10) + column = 1, line++; + return character; + } + function peek() { + return charat(characters, position$2); + } + function caret() { + return position$2; + } + function slice$1(begin, end2) { + return substr(characters, begin, end2); + } + function token(type2) { + switch (type2) { + case 0: + case 9: + case 10: + case 13: + case 32: + return 5; + case 33: + case 43: + case 44: + case 47: + case 62: + case 64: + case 126: + case 59: + case 123: + case 125: + return 4; + case 58: + return 3; + case 34: + case 39: + case 40: + case 91: + return 2; + case 41: + case 93: + return 1; + } + return 0; + } + function alloc(value2) { + return line = column = 1, length = strlen(characters = value2), position$2 = 0, []; + } + function dealloc(value2) { + return characters = "", value2; + } + function delimit(type2) { + return trim(slice$1(position$2 - 1, delimiter(type2 === 91 ? type2 + 2 : type2 === 40 ? type2 + 1 : type2))); + } + function whitespace(type2) { + while (character = peek()) + if (character < 33) + next$1(); + else + break; + return token(type2) > 2 || token(character) > 3 ? "" : " "; + } + function escaping(index2, count) { + while (--count && next$1()) + if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) + break; + return slice$1(index2, caret() + (count < 6 && peek() == 32 && next$1() == 32)); + } + function delimiter(type2) { + while (next$1()) + switch (character) { + case type2: + return position$2; + case 34: + case 39: + if (type2 !== 34 && type2 !== 39) + delimiter(character); + break; + case 40: + if (type2 === 41) + delimiter(type2); + break; + case 92: + next$1(); + break; + } + return position$2; + } + function commenter(type2, index2) { + while (next$1()) + if (type2 + character === 47 + 10) + break; + else if (type2 + character === 42 + 42 && peek() === 47) + break; + return "/*" + slice$1(index2, position$2 - 1) + "*" + from(type2 === 47 ? type2 : next$1()); + } + function identifier(index2) { + while (!token(peek())) + next$1(); + return slice$1(index2, position$2); + } + function compile(value2) { + return dealloc(parse$4("", null, null, null, [""], value2 = alloc(value2), 0, [0], value2)); + } + function parse$4(value2, root2, parent, rule, rules, rulesets, pseudo, points, declarations) { + var index2 = 0; + var offset = 0; + var length2 = pseudo; + var atrule = 0; + var property2 = 0; + var previous2 = 0; + var variable = 1; + var scanning = 1; + var ampersand = 1; + var character2 = 0; + var type2 = ""; + var props = rules; + var children2 = rulesets; + var reference = rule; + var characters2 = type2; + while (scanning) + switch (previous2 = character2, character2 = next$1()) { + case 40: + if (previous2 != 108 && charat(characters2, length2 - 1) == 58) { + if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1) + ampersand = -1; + break; + } + case 34: + case 39: + case 91: + characters2 += delimit(character2); + break; + case 9: + case 10: + case 13: + case 32: + characters2 += whitespace(previous2); + break; + case 92: + characters2 += escaping(caret() - 1, 7); + continue; + case 47: + switch (peek()) { + case 42: + case 47: + append(comment(commenter(next$1(), caret()), root2, parent), declarations); + break; + default: + characters2 += "/"; + } + break; + case 123 * variable: + points[index2++] = strlen(characters2) * ampersand; + case 125 * variable: + case 59: + case 0: + switch (character2) { + case 0: + case 125: + scanning = 0; + case 59 + offset: + if (property2 > 0 && strlen(characters2) - length2) + append(property2 > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations); + break; + case 59: + characters2 += ";"; + default: + append(reference = ruleset(characters2, root2, parent, index2, offset, rules, points, type2, props = [], children2 = [], length2), rulesets); + if (character2 === 123) + if (offset === 0) + parse$4(characters2, root2, reference, reference, props, rulesets, length2, points, children2); + else + switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) { + case 100: + case 109: + case 115: + parse$4(value2, reference, reference, rule && append(ruleset(value2, reference, reference, 0, 0, rules, points, type2, rules, props = [], length2), children2), rules, children2, length2, points, rule ? props : children2); + break; + default: + parse$4(characters2, reference, reference, reference, [""], children2, 0, points, children2); + } + } + index2 = offset = property2 = 0, variable = ampersand = 1, type2 = characters2 = "", length2 = pseudo; + break; + case 58: + length2 = 1 + strlen(characters2), property2 = previous2; + default: + if (variable < 1) { + if (character2 == 123) + --variable; + else if (character2 == 125 && variable++ == 0 && prev() == 125) + continue; + } + switch (characters2 += from(character2), character2 * variable) { + case 38: + ampersand = offset > 0 ? 1 : (characters2 += "\f", -1); + break; + case 44: + points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1; + break; + case 64: + if (peek() === 45) + characters2 += delimit(next$1()); + atrule = peek(), offset = length2 = strlen(type2 = characters2 += identifier(caret())), character2++; + break; + case 45: + if (previous2 === 45 && strlen(characters2) == 2) + variable = 0; + } + } + return rulesets; + } + function ruleset(value2, root2, parent, index2, offset, rules, points, type2, props, children2, length2) { + var post = offset - 1; + var rule = offset === 0 ? rules : [""]; + var size2 = sizeof(rule); + for (var i2 = 0, j = 0, k = 0; i2 < index2; ++i2) + for (var x2 = 0, y2 = substr(value2, post + 1, post = abs(j = points[i2])), z = value2; x2 < size2; ++x2) + if (z = trim(j > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2]))) + props[k++] = z; + return node(value2, root2, parent, offset === 0 ? RULESET : type2, props, children2, length2); + } + function comment(value2, root2, parent) { + return node(value2, root2, parent, COMMENT, from(char()), substr(value2, 2, -2), 0); + } + function declaration(value2, root2, parent, length2) { + return node(value2, root2, parent, DECLARATION, substr(value2, 0, length2), substr(value2, length2 + 1, -1), length2); + } + function serialize(children2, callback) { + var output = ""; + var length2 = sizeof(children2); + for (var i2 = 0; i2 < length2; i2++) + output += callback(children2[i2], i2, children2, callback) || ""; + return output; + } + function stringify(element2, index2, children2, callback) { + switch (element2.type) { + case IMPORT: + case DECLARATION: + return element2.return = element2.return || element2.value; + case COMMENT: + return ""; + case KEYFRAMES: + return element2.return = element2.value + "{" + serialize(element2.children, callback) + "}"; + case RULESET: + element2.value = element2.props.join(","); + } + return strlen(children2 = serialize(element2.children, callback)) ? element2.return = element2.value + "{" + children2 + "}" : ""; + } + const version$1 = "10.5.0"; + const defaultConfig = Object.freeze(defaultConfig$1); + let siteConfig = assignWithDepth$1({}, defaultConfig); + let configFromInitialize; + let directives = []; + let currentConfig = assignWithDepth$1({}, defaultConfig); + const updateCurrentConfig = (siteCfg, _directives) => { + let cfg = assignWithDepth$1({}, siteCfg); + let sumOfDirectives = {}; + for (const d of _directives) { + sanitize(d); + sumOfDirectives = assignWithDepth$1(sumOfDirectives, d); + } + cfg = assignWithDepth$1(cfg, sumOfDirectives); + if (sumOfDirectives.theme && sumOfDirectives.theme in theme) { + const tmpConfigFromInitialize = assignWithDepth$1({}, configFromInitialize); + const themeVariables = assignWithDepth$1( + tmpConfigFromInitialize.themeVariables || {}, + sumOfDirectives.themeVariables + ); + if (cfg.theme && cfg.theme in theme) { + cfg.themeVariables = theme[cfg.theme].getThemeVariables(themeVariables); + } + } + currentConfig = cfg; + checkConfig(currentConfig); + return currentConfig; + }; + const setSiteConfig = (conf2) => { + siteConfig = assignWithDepth$1({}, defaultConfig); + siteConfig = assignWithDepth$1(siteConfig, conf2); + if (conf2.theme && theme[conf2.theme]) { + siteConfig.themeVariables = theme[conf2.theme].getThemeVariables(conf2.themeVariables); + } + updateCurrentConfig(siteConfig, directives); + return siteConfig; + }; + const saveConfigFromInitialize = (conf2) => { + configFromInitialize = assignWithDepth$1({}, conf2); + }; + const updateSiteConfig = (conf2) => { + siteConfig = assignWithDepth$1(siteConfig, conf2); + updateCurrentConfig(siteConfig, directives); + return siteConfig; + }; + const getSiteConfig = () => { + return assignWithDepth$1({}, siteConfig); + }; + const setConfig = (conf2) => { + checkConfig(conf2); + assignWithDepth$1(currentConfig, conf2); + return getConfig$2(); + }; + const getConfig$2 = () => { + return assignWithDepth$1({}, currentConfig); + }; + const sanitize = (options2) => { + if (!options2) { + return; + } + ["secure", ...siteConfig.secure ?? []].forEach((key) => { + if (Object.hasOwn(options2, key)) { + log$1.debug(`Denied attempt to modify a secure key ${key}`, options2[key]); + delete options2[key]; + } + }); + Object.keys(options2).forEach((key) => { + if (key.startsWith("__")) { + delete options2[key]; + } + }); + Object.keys(options2).forEach((key) => { + if (typeof options2[key] === "string" && (options2[key].includes("<") || options2[key].includes(">") || options2[key].includes("url(data:"))) { + delete options2[key]; + } + if (typeof options2[key] === "object") { + sanitize(options2[key]); + } + }); + }; + const addDirective = (directive) => { + sanitizeDirective(directive); + if (directive.fontFamily && (!directive.themeVariables || !directive.themeVariables.fontFamily)) { + directive.themeVariables = { fontFamily: directive.fontFamily }; + } + directives.push(directive); + updateCurrentConfig(siteConfig, directives); + }; + const reset = (config2 = siteConfig) => { + directives = []; + updateCurrentConfig(config2, directives); + }; + const ConfigWarning = { + LAZY_LOAD_DEPRECATED: "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead." + }; + const issuedWarnings = {}; + const issueWarning = (warning) => { + if (issuedWarnings[warning]) { + return; + } + log$1.warn(ConfigWarning[warning]); + issuedWarnings[warning] = true; + }; + const checkConfig = (config2) => { + if (!config2) { + return; + } + if (config2.lazyLoadedDiagrams || config2.loadExternalDiagramsAtStartup) { + issueWarning("LAZY_LOAD_DEPRECATED"); + } + }; + const id$j = "c4"; + const detector$j = (txt) => { + return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt); + }; + const loader$k = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => c4Diagram); + return { id: id$j, diagram: diagram2 }; + }; + const plugin$h = { + id: id$j, + detector: detector$j, + loader: loader$k + }; + const c4 = plugin$h; + const id$i = "flowchart"; + const detector$i = (txt, config2) => { + var _a, _b; + if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { + return false; + } + return /^\s*graph/.test(txt); + }; + const loader$j = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => flowDiagram); + return { id: id$i, diagram: diagram2 }; + }; + const plugin$g = { + id: id$i, + detector: detector$i, + loader: loader$j + }; + const flowchart = plugin$g; + const id$h = "flowchart-v2"; + const detector$h = (txt, config2) => { + var _a, _b, _c; + if (((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "dagre-d3" || ((_b = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _b.defaultRenderer) === "elk") { + return false; + } + if (/^\s*graph/.test(txt) && ((_c = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _c.defaultRenderer) === "dagre-wrapper") { + return true; + } + return /^\s*flowchart/.test(txt); + }; + const loader$i = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => flowDiagramV2); + return { id: id$h, diagram: diagram2 }; + }; + const plugin$f = { + id: id$h, + detector: detector$h, + loader: loader$i + }; + const flowchartV2 = plugin$f; + const id$g = "er"; + const detector$g = (txt) => { + return /^\s*erDiagram/.test(txt); + }; + const loader$h = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => erDiagram); + return { id: id$g, diagram: diagram2 }; + }; + const plugin$e = { + id: id$g, + detector: detector$g, + loader: loader$h + }; + const er = plugin$e; + const id$f = "gitGraph"; + const detector$f = (txt) => { + return /^\s*gitGraph/.test(txt); + }; + const loader$g = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => gitGraphDiagram); + return { id: id$f, diagram: diagram2 }; + }; + const plugin$d = { + id: id$f, + detector: detector$f, + loader: loader$g + }; + const git = plugin$d; + const id$e = "gantt"; + const detector$e = (txt) => { + return /^\s*gantt/.test(txt); + }; + const loader$f = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => ganttDiagram); + return { id: id$e, diagram: diagram2 }; + }; + const plugin$c = { + id: id$e, + detector: detector$e, + loader: loader$f + }; + const gantt = plugin$c; + const id$d = "info"; + const detector$d = (txt) => { + return /^\s*info/.test(txt); + }; + const loader$e = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => infoDiagram); + return { id: id$d, diagram: diagram2 }; + }; + const info$1 = { + id: id$d, + detector: detector$d, + loader: loader$e + }; + const id$c = "pie"; + const detector$c = (txt) => { + return /^\s*pie/.test(txt); + }; + const loader$d = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => pieDiagram); + return { id: id$c, diagram: diagram2 }; + }; + const pie = { + id: id$c, + detector: detector$c, + loader: loader$d + }; + const id$b = "quadrantChart"; + const detector$b = (txt) => { + return /^\s*quadrantChart/.test(txt); + }; + const loader$c = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => quadrantDiagram); + return { id: id$b, diagram: diagram2 }; + }; + const plugin$b = { + id: id$b, + detector: detector$b, + loader: loader$c + }; + const quadrantChart = plugin$b; + const id$a = "requirement"; + const detector$a = (txt) => { + return /^\s*requirement(Diagram)?/.test(txt); + }; + const loader$b = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => requirementDiagram); + return { id: id$a, diagram: diagram2 }; + }; + const plugin$a = { + id: id$a, + detector: detector$a, + loader: loader$b + }; + const requirement = plugin$a; + const id$9 = "sequence"; + const detector$9 = (txt) => { + return /^\s*sequenceDiagram/.test(txt); + }; + const loader$a = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => sequenceDiagram); + return { id: id$9, diagram: diagram2 }; + }; + const plugin$9 = { + id: id$9, + detector: detector$9, + loader: loader$a + }; + const sequence = plugin$9; + const id$8 = "class"; + const detector$8 = (txt, config2) => { + var _a; + if (((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return false; + } + return /^\s*classDiagram/.test(txt); + }; + const loader$9 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => classDiagram); + return { id: id$8, diagram: diagram2 }; + }; + const plugin$8 = { + id: id$8, + detector: detector$8, + loader: loader$9 + }; + const classDiagram$1 = plugin$8; + const id$7 = "classDiagram"; + const detector$7 = (txt, config2) => { + var _a; + if (/^\s*classDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.class) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return true; + } + return /^\s*classDiagram-v2/.test(txt); + }; + const loader$8 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => classDiagramV2); + return { id: id$7, diagram: diagram2 }; + }; + const plugin$7 = { + id: id$7, + detector: detector$7, + loader: loader$8 + }; + const classDiagramV2$1 = plugin$7; + const id$6 = "state"; + const detector$6 = (txt, config2) => { + var _a; + if (((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return false; + } + return /^\s*stateDiagram/.test(txt); + }; + const loader$7 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => stateDiagram); + return { id: id$6, diagram: diagram2 }; + }; + const plugin$6 = { + id: id$6, + detector: detector$6, + loader: loader$7 + }; + const state = plugin$6; + const id$5 = "stateDiagram"; + const detector$5 = (txt, config2) => { + var _a; + if (/^\s*stateDiagram-v2/.test(txt)) { + return true; + } + if (/^\s*stateDiagram/.test(txt) && ((_a = config2 == null ? void 0 : config2.state) == null ? void 0 : _a.defaultRenderer) === "dagre-wrapper") { + return true; + } + return false; + }; + const loader$6 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => stateDiagramV2); + return { id: id$5, diagram: diagram2 }; + }; + const plugin$5 = { + id: id$5, + detector: detector$5, + loader: loader$6 + }; + const stateV2 = plugin$5; + const id$4 = "journey"; + const detector$4 = (txt) => { + return /^\s*journey/.test(txt); + }; + const loader$5 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => journeyDiagram); + return { id: id$4, diagram: diagram2 }; + }; + const plugin$4 = { + id: id$4, + detector: detector$4, + loader: loader$5 + }; + const journey = plugin$4; + const selectSvgElement = (id2) => { + var _a; + const { securityLevel } = getConfig$2(); + let root2 = d3select("body"); + if (securityLevel === "sandbox") { + const sandboxElement = d3select(`#i${id2}`); + const doc = ((_a = sandboxElement.node()) == null ? void 0 : _a.contentDocument) ?? document; + root2 = d3select(doc.body); + } + const svg2 = root2.select(`#${id2}`); + return svg2; + }; + const d3Attrs = function(d3Elem, attrs) { + for (let attr of attrs) { + d3Elem.attr(attr[0], attr[1]); + } + }; + const calculateSvgSizeAttrs = function(height, width2, useMaxWidth) { + let attrs = /* @__PURE__ */ new Map(); + if (useMaxWidth) { + attrs.set("width", "100%"); + attrs.set("style", `max-width: ${width2}px;`); + } else { + attrs.set("height", height); + attrs.set("width", width2); + } + return attrs; + }; + const configureSvgSize = function(svgElem, height, width2, useMaxWidth) { + const attrs = calculateSvgSizeAttrs(height, width2, useMaxWidth); + d3Attrs(svgElem, attrs); + }; + const setupGraphViewbox$1 = function(graph, svgElem, padding2, useMaxWidth) { + const svgBounds = svgElem.node().getBBox(); + const sWidth = svgBounds.width; + const sHeight = svgBounds.height; + log$1.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds); + let width2 = 0; + let height = 0; + log$1.info(`Graph bounds: ${width2}x${height}`, graph); + width2 = sWidth + padding2 * 2; + height = sHeight + padding2 * 2; + log$1.info(`Calculated bounds: ${width2}x${height}`); + configureSvgSize(svgElem, height, width2, useMaxWidth); + const vBox = `${svgBounds.x - padding2} ${svgBounds.y - padding2} ${svgBounds.width + 2 * padding2} ${svgBounds.height + 2 * padding2}`; + svgElem.attr("viewBox", vBox); + }; + const draw$k = (_text, id2, version2) => { + log$1.debug("renering svg for syntax error\n"); + const svg2 = selectSvgElement(id2); + svg2.attr("viewBox", "0 0 2412 512"); + configureSvgSize(svg2, 100, 512, true); + const g = svg2.append("g"); + g.append("path").attr("class", "error-icon").attr( + "d", + "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z" + ); + g.append("path").attr("class", "error-icon").attr( + "d", + "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z" + ); + g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text"); + g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`); + }; + const renderer$e = { draw: draw$k }; + const errorRenderer = renderer$e; + const diagram$k = { + db: {}, + renderer: renderer$e, + parser: { + parser: { yy: {} }, + parse: () => { + return; + } + } + }; + const errorDiagram = diagram$k; + const id$3 = "flowchart-elk"; + const detector$3 = (txt, config2) => { + var _a; + if ( + // If diagram explicitly states flowchart-elk + /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk + /^\s*flowchart|graph/.test(txt) && ((_a = config2 == null ? void 0 : config2.flowchart) == null ? void 0 : _a.defaultRenderer) === "elk" + ) { + return true; + } + return false; + }; + const loader$4 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => flowchartElkDefinition); + return { id: id$3, diagram: diagram2 }; + }; + const plugin$3 = { + id: id$3, + detector: detector$3, + loader: loader$4 + }; + const flowchartElk = plugin$3; + const id$2 = "timeline"; + const detector$2 = (txt) => { + return /^\s*timeline/.test(txt); + }; + const loader$3 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => timelineDefinition); + return { id: id$2, diagram: diagram2 }; + }; + const plugin$2 = { + id: id$2, + detector: detector$2, + loader: loader$3 + }; + const timeline = plugin$2; + const id$1 = "mindmap"; + const detector$1 = (txt) => { + return /^\s*mindmap/.test(txt); + }; + const loader$2 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => mindmapDefinition); + return { id: id$1, diagram: diagram2 }; + }; + const plugin$1 = { + id: id$1, + detector: detector$1, + loader: loader$2 + }; + const mindmap = plugin$1; + const id = "sankey"; + const detector = (txt) => { + return /^\s*sankey-beta/.test(txt); + }; + const loader$1 = async () => { + const { diagram: diagram2 } = await Promise.resolve().then(() => sankeyDiagram); + return { id, diagram: diagram2 }; + }; + const plugin = { + id, + detector, + loader: loader$1 + }; + const sankey = plugin; + const themes = {}; + const getStyles$e = (type2, userStyles, options2) => { + let diagramStyles = ""; + if (type2 in themes && themes[type2]) { + diagramStyles = themes[type2](options2); + } else { + log$1.warn(`No theme found for ${type2}`); + } + return ` & { + font-family: ${options2.fontFamily}; + font-size: ${options2.fontSize}; + fill: ${options2.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${options2.errorBkgColor}; + } + & .error-text { + fill: ${options2.errorTextColor}; + stroke: ${options2.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 2px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${options2.lineColor}; + stroke: ${options2.lineColor}; + } + & .marker.cross { + stroke: ${options2.lineColor}; + } + + & svg { + font-family: ${options2.fontFamily}; + font-size: ${options2.fontSize}; + } + + ${diagramStyles} + + ${userStyles} +`; + }; + const addStylesForDiagram = (type2, diagramTheme) => { + if (diagramTheme !== void 0) { + themes[type2] = diagramTheme; + } + }; + const getStyles$f = getStyles$e; + let accTitle = ""; + let diagramTitle = ""; + let accDescription = ""; + const sanitizeText$5 = (txt) => sanitizeText$6(txt, getConfig$2()); + const clear$l = () => { + accTitle = ""; + accDescription = ""; + diagramTitle = ""; + }; + const setAccTitle = (txt) => { + accTitle = sanitizeText$5(txt).replace(/^\s+/g, ""); + }; + const getAccTitle = () => accTitle; + const setAccDescription = (txt) => { + accDescription = sanitizeText$5(txt).replace(/\n\s+/g, "\n"); + }; + const getAccDescription = () => accDescription; + const setDiagramTitle = (txt) => { + diagramTitle = sanitizeText$5(txt); + }; + const getDiagramTitle = () => diagramTitle; + const commonDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + clear: clear$l, + getAccDescription, + getAccTitle, + getDiagramTitle, + setAccDescription, + setAccTitle, + setDiagramTitle + }, Symbol.toStringTag, { value: "Module" })); + const log = log$1; + const setLogLevel = setLogLevel$1; + const getConfig$1 = getConfig$2; + const sanitizeText$4 = (text2) => sanitizeText$6(text2, getConfig$1()); + const setupGraphViewbox = setupGraphViewbox$1; + const getCommonDb$1 = () => { + return commonDb; + }; + const diagrams = {}; + const registerDiagram = (id2, diagram2, detector2) => { + var _a; + if (diagrams[id2]) { + throw new Error(`Diagram ${id2} already registered.`); + } + diagrams[id2] = diagram2; + if (detector2) { + addDetector(id2, detector2); + } + addStylesForDiagram(id2, diagram2.styles); + (_a = diagram2.injectUtils) == null ? void 0 : _a.call( + diagram2, + log, + setLogLevel, + getConfig$1, + sanitizeText$4, + setupGraphViewbox, + getCommonDb$1(), + () => { + } + ); + }; + const getDiagram = (name2) => { + if (name2 in diagrams) { + return diagrams[name2]; + } + throw new DiagramNotFoundError(name2); + }; + class DiagramNotFoundError extends Error { + constructor(name2) { + super(`Diagram ${name2} not found.`); + } + } + let hasLoadedDiagrams = false; + const addDiagrams = () => { + if (hasLoadedDiagrams) { + return; + } + hasLoadedDiagrams = true; + registerDiagram("error", errorDiagram, (text2) => { + return text2.toLowerCase().trim() === "error"; + }); + registerDiagram( + "---", + // --- diagram type may appear if YAML front-matter is not parsed correctly + { + db: { + clear: () => { + } + }, + styles: {}, + // should never be used + renderer: { + draw: () => { + } + }, + parser: { + parser: { yy: {} }, + parse: () => { + throw new Error( + "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks" + ); + } + }, + init: () => null + // no op + }, + (text2) => { + return text2.toLowerCase().trimStart().startsWith("---"); + } + ); + registerLazyLoadedDiagrams( + c4, + classDiagramV2$1, + classDiagram$1, + er, + gantt, + info$1, + pie, + requirement, + sequence, + flowchartElk, + flowchartV2, + flowchart, + mindmap, + timeline, + git, + stateV2, + state, + journey, + quadrantChart, + sankey + ); + }; + class Diagram { + constructor(text2, metadata = {}) { + this.text = text2; + this.metadata = metadata; + this.type = "graph"; + this.text += "\n"; + const cnf = getConfig$2(); + try { + this.type = detectType(text2, cnf); + } catch (e) { + this.type = "error"; + this.detectError = e; + } + const diagram2 = getDiagram(this.type); + log$1.debug("Type " + this.type); + this.db = diagram2.db; + this.renderer = diagram2.renderer; + this.parser = diagram2.parser; + this.parser.parser.yy = this.db; + this.init = diagram2.init; + this.parse(); + } + parse() { + var _a, _b, _c, _d, _e; + if (this.detectError) { + throw this.detectError; + } + (_b = (_a = this.db).clear) == null ? void 0 : _b.call(_a); + const config2 = getConfig$2(); + (_c = this.init) == null ? void 0 : _c.call(this, config2); + if (this.metadata.title) { + (_e = (_d = this.db).setDiagramTitle) == null ? void 0 : _e.call(_d, this.metadata.title); + } + this.parser.parse(this.text); + } + async render(id2, version2) { + await this.renderer.draw(this.text, id2, version2, this); + } + getParser() { + return this.parser; + } + getType() { + return this.type; + } + } + const getDiagramFromText = async (text2, metadata = {}) => { + const type2 = detectType(text2, getConfig$2()); + try { + getDiagram(type2); + } catch (error) { + const loader2 = getDiagramLoader(type2); + if (!loader2) { + throw new UnknownDiagramError(`Diagram ${type2} not found.`); + } + const { id: id2, diagram: diagram2 } = await loader2(); + registerDiagram(id2, diagram2); + } + return new Diagram(text2, metadata); + }; + let interactionFunctions = []; + const addFunction = (func) => { + interactionFunctions.push(func); + }; + const attachFunctions = () => { + interactionFunctions.forEach((f2) => { + f2(); + }); + interactionFunctions = []; + }; + var nativeKeys = overArg(Object.keys, Object); + const nativeKeys$1 = nativeKeys; + var objectProto$7 = Object.prototype; + var hasOwnProperty$7 = objectProto$7.hasOwnProperty; + function baseKeys(object2) { + if (!isPrototype(object2)) { + return nativeKeys$1(object2); + } + var result = []; + for (var key in Object(object2)) { + if (hasOwnProperty$7.call(object2, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + var DataView$1 = getNative(root$1, "DataView"); + const DataView$2 = DataView$1; + var Promise$1 = getNative(root$1, "Promise"); + const Promise$2 = Promise$1; + var Set$1 = getNative(root$1, "Set"); + const Set$2 = Set$1; + var WeakMap = getNative(root$1, "WeakMap"); + const WeakMap$1 = WeakMap; + var mapTag$5 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$5 = "[object Set]", weakMapTag$1 = "[object WeakMap]"; + var dataViewTag$3 = "[object DataView]"; + var dataViewCtorString = toSource(DataView$2), mapCtorString = toSource(Map$2), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$1); + var getTag = baseGetTag; + if (DataView$2 && getTag(new DataView$2(new ArrayBuffer(1))) != dataViewTag$3 || Map$2 && getTag(new Map$2()) != mapTag$5 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$2 && getTag(new Set$2()) != setTag$5 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) { + getTag = function(value2) { + var result = baseGetTag(value2), Ctor = result == objectTag$2 ? value2.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag$3; + case mapCtorString: + return mapTag$5; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag$5; + case weakMapCtorString: + return weakMapTag$1; + } + } + return result; + }; + } + const getTag$1 = getTag; + var mapTag$4 = "[object Map]", setTag$4 = "[object Set]"; + var objectProto$6 = Object.prototype; + var hasOwnProperty$6 = objectProto$6.hasOwnProperty; + function isEmpty(value2) { + if (value2 == null) { + return true; + } + if (isArrayLike(value2) && (isArray$1(value2) || typeof value2 == "string" || typeof value2.splice == "function" || isBuffer$1(value2) || isTypedArray$1(value2) || isArguments$1(value2))) { + return !value2.length; + } + var tag = getTag$1(value2); + if (tag == mapTag$4 || tag == setTag$4) { + return !value2.size; + } + if (isPrototype(value2)) { + return !baseKeys(value2).length; + } + for (var key in value2) { + if (hasOwnProperty$6.call(value2, key)) { + return false; + } + } + return true; + } + const SVG_ROLE = "graphics-document document"; + function setA11yDiagramInfo(svg2, diagramType) { + svg2.attr("role", SVG_ROLE); + if (diagramType !== "") { + svg2.attr("aria-roledescription", diagramType); + } + } + function addSVGa11yTitleDescription(svg2, a11yTitle, a11yDesc, baseId) { + if (svg2.insert === void 0) { + return; + } + if (a11yDesc) { + const descId = `chart-desc-${baseId}`; + svg2.attr("aria-describedby", descId); + svg2.insert("desc", ":first-child").attr("id", descId).text(a11yDesc); + } + if (a11yTitle) { + const titleId = `chart-title-${baseId}`; + svg2.attr("aria-labelledby", titleId); + svg2.insert("title", ":first-child").attr("id", titleId).text(a11yTitle); + } + } + const cleanupComments = (text2) => { + return text2.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart(); + }; + /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence2) { + if (Array.isArray(sequence2)) + return sequence2; + else if (isNothing(sequence2)) + return []; + return [sequence2]; + } + function extend(target, source) { + var index2, length2, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index2 = 0, length2 = sourceKeys.length; index2 < length2; index2 += 1) { + key = sourceKeys[index2]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string2, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string2; + } + return result; + } + function isNegativeZero(number2) { + return number2 === 0 && Number.NEGATIVE_INFINITY === 1 / number2; + } + var isNothing_1 = isNothing; + var isObject_1 = isObject; + var toArray_1 = toArray; + var repeat_1 = repeat; + var isNegativeZero_1 = isNegativeZero; + var extend_1 = extend; + var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 + }; + function formatError(exception2, compact) { + var where = "", message = exception2.reason || "(unknown reason)"; + if (!exception2.mark) + return message; + if (exception2.mark.name) { + where += 'in "' + exception2.mark.name + '" '; + } + where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; + if (!compact && exception2.mark.snippet) { + where += "\n\n" + exception2.mark.snippet; + } + return message + " " + where; + } + function YAMLException$1(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException$1.prototype = Object.create(Error.prototype); + YAMLException$1.prototype.constructor = YAMLException$1; + YAMLException$1.prototype.toString = function toString2(compact) { + return this.name + ": " + formatError(this, compact); + }; + var exception = YAMLException$1; + function getLine(buffer, lineStart, lineEnd, position2, maxLineLength) { + var head2 = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position2 - lineStart > maxHalfLength) { + head2 = " ... "; + lineStart = position2 - maxHalfLength + head2.length; + } + if (lineEnd - position2 > maxHalfLength) { + tail = " ..."; + lineEnd = position2 + maxHalfLength - tail.length; + } + return { + str: head2 + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, + pos: position2 - lineStart + head2.length + // relative position + }; + } + function padStart(string2, max2) { + return common.repeat(" ", max2 - string2.length) + string2; + } + function makeSnippet(mark, options2) { + options2 = Object.create(options2 || null); + if (!mark.buffer) + return null; + if (!options2.maxLength) + options2.maxLength = 79; + if (typeof options2.indent !== "number") + options2.indent = 1; + if (typeof options2.linesBefore !== "number") + options2.linesBefore = 3; + if (typeof options2.linesAfter !== "number") + options2.linesAfter = 2; + var re2 = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re2.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) + foundLineNo = lineStarts.length - 1; + var result = "", i2, line2; + var lineNoLength = Math.min(mark.line + options2.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options2.maxLength - (options2.indent + lineNoLength + 3); + for (i2 = 1; i2 <= options2.linesBefore; i2++) { + if (foundLineNo - i2 < 0) + break; + line2 = getLine( + mark.buffer, + lineStarts[foundLineNo - i2], + lineEnds[foundLineNo - i2], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]), + maxLineLength + ); + result = common.repeat(" ", options2.indent) + padStart((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result; + } + line2 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options2.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; + result += common.repeat("-", options2.indent + lineNoLength + 3 + line2.pos) + "^\n"; + for (i2 = 1; i2 <= options2.linesAfter; i2++) { + if (foundLineNo + i2 >= lineEnds.length) + break; + line2 = getLine( + mark.buffer, + lineStarts[foundLineNo + i2], + lineEnds[foundLineNo + i2], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]), + maxLineLength + ); + result += common.repeat(" ", options2.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; + } + return result.replace(/\n$/, ""); + } + var snippet = makeSnippet; + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map2) { + var result = {}; + if (map2 !== null) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type$1(tag, options2) { + options2 = options2 || {}; + Object.keys(options2).forEach(function(name2) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name2) === -1) { + throw new exception('Unknown option "' + name2 + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.options = options2; + this.tag = tag; + this.kind = options2["kind"] || null; + this.resolve = options2["resolve"] || function() { + return true; + }; + this.construct = options2["construct"] || function(data) { + return data; + }; + this.instanceOf = options2["instanceOf"] || null; + this.predicate = options2["predicate"] || null; + this.represent = options2["represent"] || null; + this.representName = options2["representName"] || null; + this.defaultStyle = options2["defaultStyle"] || null; + this.multi = options2["multi"] || false; + this.styleAliases = compileStyleAliases(options2["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + var type = Type$1; + function compileList(schema2, name2) { + var result = []; + schema2[name2].forEach(function(currentType) { + var newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + newIndex = previousIndex; + } + }); + result[newIndex] = currentType; + }); + return result; + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index2, length2; + function collectType(type2) { + if (type2.multi) { + result.multi[type2.kind].push(type2); + result.multi["fallback"].push(type2); + } else { + result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; + } + } + for (index2 = 0, length2 = arguments.length; index2 < length2; index2 += 1) { + arguments[index2].forEach(collectType); + } + return result; + } + function Schema$1(definition2) { + return this.extend(definition2); + } + Schema$1.prototype.extend = function extend2(definition2) { + var implicit2 = []; + var explicit = []; + if (definition2 instanceof type) { + explicit.push(definition2); + } else if (Array.isArray(definition2)) { + explicit = explicit.concat(definition2); + } else if (definition2 && (Array.isArray(definition2.implicit) || Array.isArray(definition2.explicit))) { + if (definition2.implicit) + implicit2 = implicit2.concat(definition2.implicit); + if (definition2.explicit) + explicit = explicit.concat(definition2.explicit); + } else { + throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit2.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type$1.loadKind && type$1.loadKind !== "scalar") { + throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type$1.multi) { + throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema$1.prototype); + result.implicit = (this.implicit || []).concat(implicit2); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit"); + result.compiledExplicit = compileList(result, "explicit"); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; + }; + var schema = Schema$1; + var str = new type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + var seq$1 = new type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + var map$1 = new type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + var failsafe = new schema({ + explicit: [ + str, + seq$1, + map$1 + ] + }); + function resolveYamlNull(data) { + if (data === null) + return true; + var max2 = data.length; + return max2 === 1 && data === "~" || max2 === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object2) { + return object2 === null; + } + var _null = new type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" + }); + function resolveYamlBoolean(data) { + if (data === null) + return false; + var max2 = data.length; + return max2 === 4 && (data === "true" || data === "True" || data === "TRUE") || max2 === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object2) { + return Object.prototype.toString.call(object2) === "[object Boolean]"; + } + var bool = new type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object2) { + return object2 ? "true" : "false"; + }, + uppercase: function(object2) { + return object2 ? "TRUE" : "FALSE"; + }, + camelcase: function(object2) { + return object2 ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + function isHexCode(c2) { + return 48 <= c2 && c2 <= 57 || 65 <= c2 && c2 <= 70 || 97 <= c2 && c2 <= 102; + } + function isOctCode(c2) { + return 48 <= c2 && c2 <= 55; + } + function isDecCode(c2) { + return 48 <= c2 && c2 <= 57; + } + function resolveYamlInteger(data) { + if (data === null) + return false; + var max2 = data.length, index2 = 0, hasDigits = false, ch; + if (!max2) + return false; + ch = data[index2]; + if (ch === "-" || ch === "+") { + ch = data[++index2]; + } + if (ch === "0") { + if (index2 + 1 === max2) + return true; + ch = data[++index2]; + if (ch === "b") { + index2++; + for (; index2 < max2; index2++) { + ch = data[index2]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index2++; + for (; index2 < max2; index2++) { + ch = data[index2]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index2))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index2++; + for (; index2 < max2; index2++) { + ch = data[index2]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index2))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") + return false; + for (; index2 < max2; index2++) { + ch = data[index2]; + if (ch === "_") + continue; + if (!isDecCode(data.charCodeAt(index2))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + return true; + } + function constructYamlInteger(data) { + var value2 = data, sign2 = 1, ch; + if (value2.indexOf("_") !== -1) { + value2 = value2.replace(/_/g, ""); + } + ch = value2[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign2 = -1; + value2 = value2.slice(1); + ch = value2[0]; + } + if (value2 === "0") + return 0; + if (ch === "0") { + if (value2[1] === "b") + return sign2 * parseInt(value2.slice(2), 2); + if (value2[1] === "x") + return sign2 * parseInt(value2.slice(2), 16); + if (value2[1] === "o") + return sign2 * parseInt(value2.slice(2), 8); + } + return sign2 * parseInt(value2, 10); + } + function isInteger(object2) { + return Object.prototype.toString.call(object2) === "[object Number]" && (object2 % 1 === 0 && !common.isNegativeZero(object2)); + } + var int = new type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" + ); + function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data) { + var value2, sign2; + value2 = data.replace(/_/g, "").toLowerCase(); + sign2 = value2[0] === "-" ? -1 : 1; + if ("+-".indexOf(value2[0]) >= 0) { + value2 = value2.slice(1); + } + if (value2 === ".inf") { + return sign2 === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value2 === ".nan") { + return NaN; + } + return sign2 * parseFloat(value2, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object2, style) { + var res; + if (isNaN(object2)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object2) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object2) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object2)) { + return "-0.0"; + } + res = object2.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object2) { + return Object.prototype.toString.call(object2) === "[object Number]" && (object2 % 1 !== 0 || common.isNegativeZero(object2)); + } + var float = new type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] + }); + var core = json; + var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" + ); + var YAML_TIMESTAMP_REGEXP = 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]))?))?$" + ); + function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year2, month2, day2, hour2, minute2, second2, fraction = 0, delta = null, tz_hour, tz_minute, date2; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year2 = +match[1]; + month2 = +match[2] - 1; + day2 = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year2, month2, day2)); + } + hour2 = +match[4]; + minute2 = +match[5]; + second2 = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date2 = new Date(Date.UTC(year2, month2, day2, hour2, minute2, second2, fraction)); + if (delta) + date2.setTime(date2.getTime() - delta); + return date2; + } + function representYamlTimestamp(object2) { + return object2.toISOString(); + } + var timestamp = new type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + var merge$1 = new type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max2 = data.length, map2 = BASE64_MAP; + for (idx = 0; idx < max2; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max2 = input.length, map2 = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max2; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map2.indexOf(input.charAt(idx)); + } + tailbits = max2 % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); + } + function representYamlBinary(object2) { + var result = "", bits = 0, idx, tail, max2 = object2.length, map2 = BASE64_MAP; + for (idx = 0; idx < max2; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object2[idx]; + } + tail = max2 % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; + } + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + var binary = new type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; + var _toString$2 = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index2, length2, pair, pairKey, pairHasKey, object2 = data; + for (index2 = 0, length2 = object2.length; index2 < length2; index2 += 1) { + pair = object2[index2]; + pairHasKey = false; + if (_toString$2.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + var omap = new type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + var _toString$1 = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) + return true; + var index2, length2, pair, keys2, result, object2 = data; + result = new Array(object2.length); + for (index2 = 0, length2 = object2.length; index2 < length2; index2 += 1) { + pair = object2[index2]; + if (_toString$1.call(pair) !== "[object Object]") + return false; + keys2 = Object.keys(pair); + if (keys2.length !== 1) + return false; + result[index2] = [keys2[0], pair[keys2[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) + return []; + var index2, length2, pair, keys2, result, object2 = data; + result = new Array(object2.length); + for (index2 = 0, length2 = object2.length; index2 < length2; index2 += 1) { + pair = object2[index2]; + keys2 = Object.keys(pair); + result[index2] = [keys2[0], pair[keys2[0]]]; + } + return result; + } + var pairs = new type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) + return true; + var key, object2 = data; + for (key in object2) { + if (_hasOwnProperty$2.call(object2, key)) { + if (object2[key] !== null) + return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + var set$1 = new type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + var _default = core.extend({ + implicit: [ + timestamp, + merge$1 + ], + explicit: [ + binary, + omap, + pairs, + set$1 + ] + }); + var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c2) { + return c2 === 10 || c2 === 13; + } + function is_WHITE_SPACE(c2) { + return c2 === 9 || c2 === 32; + } + function is_WS_OR_EOL(c2) { + return c2 === 9 || c2 === 32 || c2 === 10 || c2 === 13; + } + function is_FLOW_INDICATOR(c2) { + return c2 === 44 || c2 === 91 || c2 === 93 || c2 === 123 || c2 === 125; + } + function fromHexCode(c2) { + var lc; + if (48 <= c2 && c2 <= 57) { + return c2 - 48; + } + lc = c2 | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c2) { + if (c2 === 120) { + return 2; + } + if (c2 === 117) { + return 4; + } + if (c2 === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c2) { + if (48 <= c2 && c2 <= 57) { + return c2 - 48; + } + return -1; + } + function simpleEscapeSequence(c2) { + return c2 === 48 ? "\0" : c2 === 97 ? "\x07" : c2 === 98 ? "\b" : c2 === 116 ? " " : c2 === 9 ? " " : c2 === 110 ? "\n" : c2 === 118 ? "\v" : c2 === 102 ? "\f" : c2 === 114 ? "\r" : c2 === 101 ? "\x1B" : c2 === 32 ? " " : c2 === 34 ? '"' : c2 === 47 ? "/" : c2 === 92 ? "\\" : c2 === 78 ? "…" : c2 === 95 ? " " : c2 === 76 ? "\u2028" : c2 === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c2) { + if (c2 <= 65535) { + return String.fromCharCode(c2); + } + return String.fromCharCode( + (c2 - 65536 >> 10) + 55296, + (c2 - 65536 & 1023) + 56320 + ); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + function State$1(input, options2) { + this.input = input; + this.filename = options2["filename"] || null; + this.schema = options2["schema"] || _default; + this.onWarning = options2["onWarning"] || null; + this.legacy = options2["legacy"] || false; + this.json = options2["json"] || false; + this.listener = options2["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; + } + function generateError(state2, message) { + var mark = { + name: state2.filename, + buffer: state2.input.slice(0, -1), + // omit trailing \0 + position: state2.position, + line: state2.line, + column: state2.position - state2.lineStart + }; + mark.snippet = snippet(mark); + return new exception(message, mark); + } + function throwError(state2, message) { + throw generateError(state2, message); + } + function throwWarning(state2, message) { + if (state2.onWarning) { + state2.onWarning.call(null, generateError(state2, message)); + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state2, name2, args) { + var match, major, minor; + if (state2.version !== null) { + throwError(state2, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError(state2, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) { + throwError(state2, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state2, "unacceptable YAML version of the document"); + } + state2.version = args[0]; + state2.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state2, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state2, name2, args) { + var handle, prefix; + if (args.length !== 2) { + throwError(state2, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state2, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty$1.call(state2.tagMap, handle)) { + throwError(state2, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state2, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state2, "tag prefix is malformed: " + prefix); + } + state2.tagMap[handle] = prefix; + } + }; + function captureSegment(state2, start2, end2, checkJson) { + var _position, _length, _character, _result; + if (start2 < end2) { + _result = state2.input.slice(start2, end2); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state2, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state2, "the stream contains non-printable characters"); + } + state2.result += _result; + } + } + function mergeMappings(state2, destination, source, overridableKeys) { + var sourceKeys, key, index2, quantity; + if (!common.isObject(source)) { + throwError(state2, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index2 = 0, quantity = sourceKeys.length; index2 < quantity; index2 += 1) { + key = sourceKeys[index2]; + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index2, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index2 = 0, quantity = keyNode.length; index2 < quantity; index2 += 1) { + if (Array.isArray(keyNode[index2])) { + throwError(state2, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index2]) === "[object Object]") { + keyNode[index2] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index2 = 0, quantity = valueNode.length; index2 < quantity; index2 += 1) { + mergeMappings(state2, _result, valueNode[index2], overridableKeys); + } + } else { + mergeMappings(state2, _result, valueNode, overridableKeys); + } + } else { + if (!state2.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { + state2.line = startLine || state2.line; + state2.lineStart = startLineStart || state2.lineStart; + state2.position = startPos || state2.position; + throwError(state2, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state2) { + var ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 10) { + state2.position++; + } else if (ch === 13) { + state2.position++; + if (state2.input.charCodeAt(state2.position) === 10) { + state2.position++; + } + } else { + throwError(state2, "a line break is expected"); + } + state2.line += 1; + state2.lineStart = state2.position; + state2.firstTabInLine = -1; + } + function skipSeparationSpace(state2, allowComments, checkIndent) { + var lineBreaks = 0, ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state2.firstTabInLine === -1) { + state2.firstTabInLine = state2.position; + } + ch = state2.input.charCodeAt(++state2.position); + } + if (allowComments && ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state2); + ch = state2.input.charCodeAt(state2.position); + lineBreaks++; + state2.lineIndent = 0; + while (ch === 32) { + state2.lineIndent++; + ch = state2.input.charCodeAt(++state2.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state2.lineIndent < checkIndent) { + throwWarning(state2, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state2) { + var _position = state2.position, ch; + ch = state2.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state2.input.charCodeAt(_position + 1) && ch === state2.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state2.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state2, count) { + if (count === 1) { + state2.result += " "; + } else if (count > 1) { + state2.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state2, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state2.kind, _result = state2.result, ch; + ch = state2.input.charCodeAt(state2.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state2.kind = "scalar"; + state2.result = ""; + captureStart = captureEnd = state2.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state2.input.charCodeAt(state2.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state2.line; + _lineStart = state2.lineStart; + _lineIndent = state2.lineIndent; + skipSeparationSpace(state2, false, -1); + if (state2.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state2.input.charCodeAt(state2.position); + continue; + } else { + state2.position = captureEnd; + state2.line = _line; + state2.lineStart = _lineStart; + state2.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state2, captureStart, captureEnd, false); + writeFoldedLines(state2, state2.line - _line); + captureStart = captureEnd = state2.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state2.position + 1; + } + ch = state2.input.charCodeAt(++state2.position); + } + captureSegment(state2, captureStart, captureEnd, false); + if (state2.result) { + return true; + } + state2.kind = _kind; + state2.result = _result; + return false; + } + function readSingleQuotedScalar(state2, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 39) { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + state2.position++; + captureStart = captureEnd = state2.position; + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + if (ch === 39) { + captureSegment(state2, captureStart, state2.position, true); + ch = state2.input.charCodeAt(++state2.position); + if (ch === 39) { + captureStart = state2.position; + state2.position++; + captureEnd = state2.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state2, captureStart, captureEnd, true); + writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); + captureStart = captureEnd = state2.position; + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + throwError(state2, "unexpected end of the document within a single quoted scalar"); + } else { + state2.position++; + captureEnd = state2.position; + } + } + throwError(state2, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state2, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 34) { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + state2.position++; + captureStart = captureEnd = state2.position; + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + if (ch === 34) { + captureSegment(state2, captureStart, state2.position, true); + state2.position++; + return true; + } else if (ch === 92) { + captureSegment(state2, captureStart, state2.position, true); + ch = state2.input.charCodeAt(++state2.position); + if (is_EOL(ch)) { + skipSeparationSpace(state2, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state2.result += simpleEscapeMap[ch]; + state2.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state2.input.charCodeAt(++state2.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state2, "expected hexadecimal character"); + } + } + state2.result += charFromCodepoint(hexResult); + state2.position++; + } else { + throwError(state2, "unknown escape sequence"); + } + captureStart = captureEnd = state2.position; + } else if (is_EOL(ch)) { + captureSegment(state2, captureStart, captureEnd, true); + writeFoldedLines(state2, skipSeparationSpace(state2, false, nodeIndent)); + captureStart = captureEnd = state2.position; + } else if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + throwError(state2, "unexpected end of the document within a double quoted scalar"); + } else { + state2.position++; + captureEnd = state2.position; + } + } + throwError(state2, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state2, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state2.tag, _result, _anchor = state2.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(++state2.position); + while (ch !== 0) { + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if (ch === terminator) { + state2.position++; + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = isMapping ? "mapping" : "sequence"; + state2.result = _result; + return true; + } else if (!readNext) { + throwError(state2, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError(state2, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state2.input.charCodeAt(state2.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state2.position++; + skipSeparationSpace(state2, true, nodeIndent); + } + } + _line = state2.line; + _lineStart = state2.lineStart; + _pos = state2.position; + composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state2.tag; + keyNode = state2.result; + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if ((isExplicitPair || state2.line === _line) && ch === 58) { + isPair = true; + ch = state2.input.charCodeAt(++state2.position); + skipSeparationSpace(state2, true, nodeIndent); + composeNode(state2, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state2.result; + } + if (isMapping) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state2, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state2, true, nodeIndent); + ch = state2.input.charCodeAt(state2.position); + if (ch === 44) { + readNext = true; + ch = state2.input.charCodeAt(++state2.position); + } else { + readNext = false; + } + } + throwError(state2, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state2, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state2.kind = "scalar"; + state2.result = ""; + while (ch !== 0) { + ch = state2.input.charCodeAt(++state2.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state2, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state2, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state2, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state2); + state2.lineIndent = 0; + ch = state2.input.charCodeAt(state2.position); + while ((!detectedIndent || state2.lineIndent < textIndent) && ch === 32) { + state2.lineIndent++; + ch = state2.input.charCodeAt(++state2.position); + } + if (!detectedIndent && state2.lineIndent > textIndent) { + textIndent = state2.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state2.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state2.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state2.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state2.result += " "; + } + } else { + state2.result += common.repeat("\n", emptyLines); + } + } else { + state2.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state2.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state2.input.charCodeAt(++state2.position); + } + captureSegment(state2, captureStart, state2.position, false); + } + return true; + } + function readBlockSequence(state2, nodeIndent) { + var _line, _tag = state2.tag, _anchor = state2.anchor, _result = [], following, detected = false, ch; + if (state2.firstTabInLine !== -1) + return false; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + if (state2.firstTabInLine !== -1) { + state2.position = state2.firstTabInLine; + throwError(state2, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state2.input.charCodeAt(state2.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state2.position++; + if (skipSeparationSpace(state2, true, -1)) { + if (state2.lineIndent <= nodeIndent) { + _result.push(null); + ch = state2.input.charCodeAt(state2.position); + continue; + } + } + _line = state2.line; + composeNode(state2, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state2.result); + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { + throwError(state2, "bad indentation of a sequence entry"); + } else if (state2.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = "sequence"; + state2.result = _result; + return true; + } + return false; + } + function readBlockMapping(state2, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state2.tag, _anchor = state2.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state2.firstTabInLine !== -1) + return false; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = _result; + } + ch = state2.input.charCodeAt(state2.position); + while (ch !== 0) { + if (!atExplicitKey && state2.firstTabInLine !== -1) { + state2.position = state2.firstTabInLine; + throwError(state2, "tab characters must not be used in indentation"); + } + following = state2.input.charCodeAt(state2.position + 1); + _line = state2.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state2, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state2.position += 1; + ch = following; + } else { + _keyLine = state2.line; + _keyLineStart = state2.lineStart; + _keyPos = state2.position; + if (!composeNode(state2, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + break; + } + if (state2.line === _line) { + ch = state2.input.charCodeAt(state2.position); + while (is_WHITE_SPACE(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (ch === 58) { + ch = state2.input.charCodeAt(++state2.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state2, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state2.tag; + keyNode = state2.result; + } else if (detected) { + throwError(state2, "can not read an implicit mapping pair; a colon is missed"); + } else { + state2.tag = _tag; + state2.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state2, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state2.tag = _tag; + state2.anchor = _anchor; + return true; + } + } + if (state2.line === _line || state2.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state2.line; + _keyLineStart = state2.lineStart; + _keyPos = state2.position; + } + if (composeNode(state2, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state2.result; + } else { + valueNode = state2.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + } + if ((state2.line === _line || state2.lineIndent > nodeIndent) && ch !== 0) { + throwError(state2, "bad indentation of a mapping entry"); + } else if (state2.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state2, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state2.tag = _tag; + state2.anchor = _anchor; + state2.kind = "mapping"; + state2.result = _result; + } + return detected; + } + function readTagProperty(state2) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 33) + return false; + if (state2.tag !== null) { + throwError(state2, "duplication of a tag property"); + } + ch = state2.input.charCodeAt(++state2.position); + if (ch === 60) { + isVerbatim = true; + ch = state2.input.charCodeAt(++state2.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state2.input.charCodeAt(++state2.position); + } else { + tagHandle = "!"; + } + _position = state2.position; + if (isVerbatim) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 0 && ch !== 62); + if (state2.position < state2.length) { + tagName = state2.input.slice(_position, state2.position); + ch = state2.input.charCodeAt(++state2.position); + } else { + throwError(state2, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state2.input.slice(_position - 1, state2.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state2, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state2.position + 1; + } else { + throwError(state2, "tag suffix cannot contain exclamation marks"); + } + } + ch = state2.input.charCodeAt(++state2.position); + } + tagName = state2.input.slice(_position, state2.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state2, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state2, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state2, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state2.tag = tagName; + } else if (_hasOwnProperty$1.call(state2.tagMap, tagHandle)) { + state2.tag = state2.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state2.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state2.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state2, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state2) { + var _position, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 38) + return false; + if (state2.anchor !== null) { + throwError(state2, "duplication of an anchor property"); + } + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (state2.position === _position) { + throwError(state2, "name of an anchor node must contain at least one character"); + } + state2.anchor = state2.input.slice(_position, state2.position); + return true; + } + function readAlias(state2) { + var _position, alias, ch; + ch = state2.input.charCodeAt(state2.position); + if (ch !== 42) + return false; + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (state2.position === _position) { + throwError(state2, "name of an alias node must contain at least one character"); + } + alias = state2.input.slice(_position, state2.position); + if (!_hasOwnProperty$1.call(state2.anchorMap, alias)) { + throwError(state2, 'unidentified alias "' + alias + '"'); + } + state2.result = state2.anchorMap[alias]; + skipSeparationSpace(state2, true, -1); + return true; + } + function composeNode(state2, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; + if (state2.listener !== null) { + state2.listener("open", state2); + } + state2.tag = null; + state2.anchor = null; + state2.kind = null; + state2.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state2, true, -1)) { + atNewLine = true; + if (state2.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state2.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state2.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state2) || readAnchorProperty(state2)) { + if (skipSeparationSpace(state2, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state2.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state2.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state2.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state2.position - state2.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state2, blockIndent) || readBlockMapping(state2, blockIndent, flowIndent)) || readFlowCollection(state2, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state2, flowIndent) || readSingleQuotedScalar(state2, flowIndent) || readDoubleQuotedScalar(state2, flowIndent)) { + hasContent = true; + } else if (readAlias(state2)) { + hasContent = true; + if (state2.tag !== null || state2.anchor !== null) { + throwError(state2, "alias node should not have any properties"); + } + } else if (readPlainScalar(state2, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state2.tag === null) { + state2.tag = "?"; + } + } + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state2, blockIndent); + } + } + if (state2.tag === null) { + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } else if (state2.tag === "?") { + if (state2.result !== null && state2.kind !== "scalar") { + throwError(state2, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state2.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state2.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type2 = state2.implicitTypes[typeIndex]; + if (type2.resolve(state2.result)) { + state2.result = type2.construct(state2.result); + state2.tag = type2.tag; + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + break; + } + } + } else if (state2.tag !== "!") { + if (_hasOwnProperty$1.call(state2.typeMap[state2.kind || "fallback"], state2.tag)) { + type2 = state2.typeMap[state2.kind || "fallback"][state2.tag]; + } else { + type2 = null; + typeList = state2.typeMap.multi[state2.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state2.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type2 = typeList[typeIndex]; + break; + } + } + } + if (!type2) { + throwError(state2, "unknown tag !<" + state2.tag + ">"); + } + if (state2.result !== null && type2.kind !== state2.kind) { + throwError(state2, "unacceptable node kind for !<" + state2.tag + '> tag; it should be "' + type2.kind + '", not "' + state2.kind + '"'); + } + if (!type2.resolve(state2.result, state2.tag)) { + throwError(state2, "cannot resolve a node with !<" + state2.tag + "> explicit tag"); + } else { + state2.result = type2.construct(state2.result, state2.tag); + if (state2.anchor !== null) { + state2.anchorMap[state2.anchor] = state2.result; + } + } + } + if (state2.listener !== null) { + state2.listener("close", state2); + } + return state2.tag !== null || state2.anchor !== null || hasContent; + } + function readDocument(state2) { + var documentStart = state2.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state2.version = null; + state2.checkLineBreaks = state2.legacy; + state2.tagMap = /* @__PURE__ */ Object.create(null); + state2.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state2.input.charCodeAt(state2.position)) !== 0) { + skipSeparationSpace(state2, true, -1); + ch = state2.input.charCodeAt(state2.position); + if (state2.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state2.input.charCodeAt(++state2.position); + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + directiveName = state2.input.slice(_position, state2.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state2, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + if (ch === 35) { + do { + ch = state2.input.charCodeAt(++state2.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state2.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state2.input.charCodeAt(++state2.position); + } + directiveArgs.push(state2.input.slice(_position, state2.position)); + } + if (ch !== 0) + readLineBreak(state2); + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state2, directiveName, directiveArgs); + } else { + throwWarning(state2, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state2, true, -1); + if (state2.lineIndent === 0 && state2.input.charCodeAt(state2.position) === 45 && state2.input.charCodeAt(state2.position + 1) === 45 && state2.input.charCodeAt(state2.position + 2) === 45) { + state2.position += 3; + skipSeparationSpace(state2, true, -1); + } else if (hasDirectives) { + throwError(state2, "directives end mark is expected"); + } + composeNode(state2, state2.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state2, true, -1); + if (state2.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state2.input.slice(documentStart, state2.position))) { + throwWarning(state2, "non-ASCII line breaks are interpreted as content"); + } + state2.documents.push(state2.result); + if (state2.position === state2.lineStart && testDocumentSeparator(state2)) { + if (state2.input.charCodeAt(state2.position) === 46) { + state2.position += 3; + skipSeparationSpace(state2, true, -1); + } + return; + } + if (state2.position < state2.length - 1) { + throwError(state2, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options2) { + input = String(input); + options2 = options2 || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state2 = new State$1(input, options2); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state2.position = nullpos; + throwError(state2, "null byte is not allowed in input"); + } + state2.input += "\0"; + while (state2.input.charCodeAt(state2.position) === 32) { + state2.lineIndent += 1; + state2.position += 1; + } + while (state2.position < state2.length - 1) { + readDocument(state2); + } + return state2.documents; + } + function loadAll$1(input, iterator, options2) { + if (iterator !== null && typeof iterator === "object" && typeof options2 === "undefined") { + options2 = iterator; + iterator = null; + } + var documents2 = loadDocuments(input, options2); + if (typeof iterator !== "function") { + return documents2; + } + for (var index2 = 0, length2 = documents2.length; index2 < length2; index2 += 1) { + iterator(documents2[index2]); + } + } + function load$1(input, options2) { + var documents2 = loadDocuments(input, options2); + if (documents2.length === 0) { + return void 0; + } else if (documents2.length === 1) { + return documents2[0]; + } + throw new exception("expected a single document in the stream, but found more"); + } + var loadAll_1 = loadAll$1; + var load_1 = load$1; + var loader = { + loadAll: loadAll_1, + load: load_1 + }; + var JSON_SCHEMA = json; + var load = loader.load; + function extractFrontMatter(text2) { + const matches = text2.match(frontMatterRegex); + if (!matches) { + return { + text: text2, + metadata: {} + }; + } + let parsed = load(matches[1], { + // To support config, we need JSON schema. + // https://www.yaml.org/spec/1.2/spec.html#id2803231 + schema: JSON_SCHEMA + }) ?? {}; + parsed = typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {}; + const metadata = {}; + if (parsed.displayMode) { + metadata.displayMode = parsed.displayMode.toString(); + } + if (parsed.title) { + metadata.title = parsed.title.toString(); + } + if (parsed.config) { + metadata.config = parsed.config; + } + return { + text: text2.slice(matches[0].length), + metadata + }; + } + const cleanupText = (code) => { + return code.replace(/\r\n?/g, "\n").replace( + /<(\w+)([^>]*)>/g, + (match, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">" + ); + }; + const processFrontmatter = (code) => { + const { text: text2, metadata } = extractFrontMatter(code); + const { displayMode: displayMode2, title: title2, config: config2 = {} } = metadata; + if (displayMode2) { + if (!config2.gantt) { + config2.gantt = {}; + } + config2.gantt.displayMode = displayMode2; + } + return { title: title2, config: config2, text: text2 }; + }; + const processDirectives = (code) => { + const initDirective = utils.detectInit(code) ?? {}; + const wrapDirectives = utils.detectDirective(code, "wrap"); + if (Array.isArray(wrapDirectives)) { + initDirective.wrap = wrapDirectives.some(({ type: type2 }) => { + }); + } else if ((wrapDirectives == null ? void 0 : wrapDirectives.type) === "wrap") { + initDirective.wrap = true; + } + return { + text: removeDirectives(code), + directive: initDirective + }; + }; + function preprocessDiagram(code) { + const cleanedCode = cleanupText(code); + const frontMatterResult = processFrontmatter(cleanedCode); + const directiveResult = processDirectives(frontMatterResult.text); + const config2 = cleanAndMerge(frontMatterResult.config, directiveResult.directive); + code = cleanupComments(directiveResult.text); + return { + code, + title: frontMatterResult.title, + config: config2 + }; + } + const MAX_TEXTLENGTH = 5e4; + const MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"; + const SECURITY_LVL_SANDBOX = "sandbox"; + const SECURITY_LVL_LOOSE = "loose"; + const XMLNS_SVG_STD = "http://www.w3.org/2000/svg"; + const XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink"; + const XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml"; + const IFRAME_WIDTH = "100%"; + const IFRAME_HEIGHT = "100%"; + const IFRAME_STYLES = "border:0;margin:0;"; + const IFRAME_BODY_STYLE = "margin:0"; + const IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups"; + const IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.'; + const DOMPURIFY_TAGS = ["foreignobject"]; + const DOMPURIFY_ATTR = ["dominant-baseline"]; + function processAndSetConfigs(text2) { + const processed2 = preprocessDiagram(text2); + reset(); + addDirective(processed2.config ?? {}); + return processed2; + } + async function parse$3(text2, parseOptions) { + addDiagrams(); + text2 = processAndSetConfigs(text2).code; + try { + await getDiagramFromText(text2); + } catch (error) { + if (parseOptions == null ? void 0 : parseOptions.suppressErrors) { + return false; + } + throw error; + } + return true; + } + const encodeEntities = function(text2) { + let txt = text2; + txt = txt.replace(/style.*:\S*#.*;/g, function(s) { + return s.substring(0, s.length - 1); + }); + txt = txt.replace(/classDef.*:\S*#.*;/g, function(s) { + return s.substring(0, s.length - 1); + }); + txt = txt.replace(/#\w+;/g, function(s) { + const innerTxt = s.substring(1, s.length - 1); + const isInt = /^\+?\d+$/.test(innerTxt); + if (isInt) { + return "fl°°" + innerTxt + "¶ß"; + } else { + return "fl°" + innerTxt + "¶ß"; + } + }); + return txt; + }; + const decodeEntities = function(text2) { + return text2.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";"); + }; + const cssImportantStyles = (cssClass, element2, cssClasses = []) => { + return ` +.${cssClass} ${element2} { ${cssClasses.join(" !important; ")} !important; }`; + }; + const createCssStyles = (config2, classDefs = {}) => { + var _a; + let cssStyles = ""; + if (config2.themeCSS !== void 0) { + cssStyles += ` +${config2.themeCSS}`; + } + if (config2.fontFamily !== void 0) { + cssStyles += ` +:root { --mermaid-font-family: ${config2.fontFamily}}`; + } + if (config2.altFontFamily !== void 0) { + cssStyles += ` +:root { --mermaid-alt-font-family: ${config2.altFontFamily}}`; + } + if (!isEmpty(classDefs)) { + const htmlLabels = config2.htmlLabels || ((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels); + const cssHtmlElements = ["> *", "span"]; + const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"]; + const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements; + for (const classId in classDefs) { + const styleClassDef = classDefs[classId]; + if (!isEmpty(styleClassDef.styles)) { + cssElements.forEach((cssElement) => { + cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles); + }); + } + if (!isEmpty(styleClassDef.textStyles)) { + cssStyles += cssImportantStyles(styleClassDef.id, "tspan", styleClassDef.textStyles); + } + } + } + return cssStyles; + }; + const createUserStyles = (config2, graphType, classDefs, svgId) => { + const userCSSstyles = createCssStyles(config2, classDefs); + const allStyles = getStyles$f(graphType, userCSSstyles, config2.themeVariables); + return serialize(compile(`${svgId}{${allStyles}}`), stringify); + }; + const cleanUpSvgCode = (svgCode = "", inSandboxMode, useArrowMarkerUrls) => { + let cleanedUpSvg = svgCode; + if (!useArrowMarkerUrls && !inSandboxMode) { + cleanedUpSvg = cleanedUpSvg.replace( + /marker-end="url\([\d+./:=?A-Za-z-]*?#/g, + 'marker-end="url(#' + ); + } + cleanedUpSvg = decodeEntities(cleanedUpSvg); + cleanedUpSvg = cleanedUpSvg.replace(/
/g, "
"); + return cleanedUpSvg; + }; + const putIntoIFrame = (svgCode = "", svgElement) => { + var _a, _b; + const height = ((_b = (_a = svgElement == null ? void 0 : svgElement.viewBox) == null ? void 0 : _a.baseVal) == null ? void 0 : _b.height) ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT; + const base64encodedSrc = btoa('' + svgCode + ""); + return ``; + }; + const appendDivSvgG = (parentRoot, id2, enclosingDivId, divStyle, svgXlink) => { + const enclosingDiv = parentRoot.append("div"); + enclosingDiv.attr("id", enclosingDivId); + if (divStyle) { + enclosingDiv.attr("style", divStyle); + } + const svgNode2 = enclosingDiv.append("svg").attr("id", id2).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD); + if (svgXlink) { + svgNode2.attr("xmlns:xlink", svgXlink); + } + svgNode2.append("g"); + return parentRoot; + }; + function sandboxedIframe(parentNode, iFrameId) { + return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", ""); + } + const removeExistingElements = (doc, id2, divId, iFrameId) => { + var _a, _b, _c; + (_a = doc.getElementById(id2)) == null ? void 0 : _a.remove(); + (_b = doc.getElementById(divId)) == null ? void 0 : _b.remove(); + (_c = doc.getElementById(iFrameId)) == null ? void 0 : _c.remove(); + }; + const render$3 = async function(id2, text2, svgContainingElement) { + var _a, _b, _c, _d, _e, _f; + addDiagrams(); + const processed2 = processAndSetConfigs(text2); + text2 = processed2.code; + const config2 = getConfig$2(); + log$1.debug(config2); + if (text2.length > ((config2 == null ? void 0 : config2.maxTextSize) ?? MAX_TEXTLENGTH)) { + text2 = MAX_TEXTLENGTH_EXCEEDED_MSG; + } + const idSelector = "#" + id2; + const iFrameID = "i" + id2; + const iFrameID_selector = "#" + iFrameID; + const enclosingDivID = "d" + id2; + const enclosingDivID_selector = "#" + enclosingDivID; + let root2 = d3select("body"); + const isSandboxed = config2.securityLevel === SECURITY_LVL_SANDBOX; + const isLooseSecurityLevel = config2.securityLevel === SECURITY_LVL_LOOSE; + const fontFamily = config2.fontFamily; + if (svgContainingElement !== void 0) { + if (svgContainingElement) { + svgContainingElement.innerHTML = ""; + } + if (isSandboxed) { + const iframe = sandboxedIframe(d3select(svgContainingElement), iFrameID); + root2 = d3select(iframe.nodes()[0].contentDocument.body); + root2.node().style.margin = 0; + } else { + root2 = d3select(svgContainingElement); + } + appendDivSvgG(root2, id2, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD); + } else { + removeExistingElements(document, id2, enclosingDivID, iFrameID); + if (isSandboxed) { + const iframe = sandboxedIframe(d3select("body"), iFrameID); + root2 = d3select(iframe.nodes()[0].contentDocument.body); + root2.node().style.margin = 0; + } else { + root2 = d3select("body"); + } + appendDivSvgG(root2, id2, enclosingDivID); + } + text2 = encodeEntities(text2); + let diag; + let parseEncounteredException; + try { + diag = await getDiagramFromText(text2, { title: processed2.title }); + } catch (error) { + diag = new Diagram("error"); + parseEncounteredException = error; + } + const element2 = root2.select(enclosingDivID_selector).node(); + const diagramType = diag.type; + const svg2 = element2.firstChild; + const firstChild = svg2.firstChild; + const diagramClassDefs = (_b = (_a = diag.renderer).getClasses) == null ? void 0 : _b.call(_a, text2, diag); + const rules = createUserStyles(config2, diagramType, diagramClassDefs, idSelector); + const style1 = document.createElement("style"); + style1.innerHTML = rules; + svg2.insertBefore(style1, firstChild); + try { + await diag.renderer.draw(text2, id2, version$1, diag); + } catch (e) { + errorRenderer.draw(text2, id2, version$1); + throw e; + } + const svgNode2 = root2.select(`${enclosingDivID_selector} svg`); + const a11yTitle = (_d = (_c = diag.db).getAccTitle) == null ? void 0 : _d.call(_c); + const a11yDescr = (_f = (_e = diag.db).getAccDescription) == null ? void 0 : _f.call(_e); + addA11yInfo(diagramType, svgNode2, a11yTitle, a11yDescr); + root2.select(`[id="${id2}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD); + let svgCode = root2.select(enclosingDivID_selector).node().innerHTML; + log$1.debug("config.arrowMarkerAbsolute", config2.arrowMarkerAbsolute); + svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config2.arrowMarkerAbsolute)); + if (isSandboxed) { + const svgEl = root2.select(enclosingDivID_selector + " svg").node(); + svgCode = putIntoIFrame(svgCode, svgEl); + } else if (!isLooseSecurityLevel) { + svgCode = purify.sanitize(svgCode, { + ADD_TAGS: DOMPURIFY_TAGS, + ADD_ATTR: DOMPURIFY_ATTR + }); + } + attachFunctions(); + if (parseEncounteredException) { + throw parseEncounteredException; + } + const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector; + const node2 = d3select(tmpElementSelector).node(); + if (node2 && "remove" in node2) { + node2.remove(); + } + return { + svg: svgCode, + bindFunctions: diag.db.bindFunctions + }; + }; + function initialize$1(options2 = {}) { + var _a; + if ((options2 == null ? void 0 : options2.fontFamily) && !((_a = options2.themeVariables) == null ? void 0 : _a.fontFamily)) { + if (!options2.themeVariables) { + options2.themeVariables = {}; + } + options2.themeVariables.fontFamily = options2.fontFamily; + } + saveConfigFromInitialize(options2); + if ((options2 == null ? void 0 : options2.theme) && options2.theme in theme) { + options2.themeVariables = theme[options2.theme].getThemeVariables( + options2.themeVariables + ); + } else if (options2) { + options2.themeVariables = theme.default.getThemeVariables(options2.themeVariables); + } + const config2 = typeof options2 === "object" ? setSiteConfig(options2) : getSiteConfig(); + setLogLevel$1(config2.logLevel); + addDiagrams(); + } + function addA11yInfo(diagramType, svgNode2, a11yTitle, a11yDescr) { + setA11yDiagramInfo(svgNode2, diagramType); + addSVGa11yTitleDescription(svgNode2, a11yTitle, a11yDescr, svgNode2.attr("id")); + } + const mermaidAPI = Object.freeze({ + render: render$3, + parse: parse$3, + getDiagramFromText, + initialize: initialize$1, + getConfig: getConfig$2, + setConfig, + getSiteConfig, + updateSiteConfig, + reset: () => { + reset(); + }, + globalReset: () => { + reset(defaultConfig); + }, + defaultConfig + }); + setLogLevel$1(getConfig$2().logLevel); + reset(getConfig$2()); + const loadRegisteredDiagrams = async () => { + log$1.debug(`Loading registered diagrams`); + const results = await Promise.allSettled( + Object.entries(detectors).map(async ([key, { detector: detector2, loader: loader2 }]) => { + if (loader2) { + try { + getDiagram(key); + } catch (error) { + try { + const { diagram: diagram2, id: id2 } = await loader2(); + registerDiagram(id2, diagram2, detector2); + } catch (err) { + log$1.error(`Failed to load external diagram with key ${key}. Removing from detectors.`); + delete detectors[key]; + throw err; + } + } + } + }) + ); + const failed = results.filter((result) => result.status === "rejected"); + if (failed.length > 0) { + log$1.error(`Failed to load ${failed.length} external diagrams`); + for (const res of failed) { + log$1.error(res); + } + throw new Error(`Failed to load ${failed.length} external diagrams`); + } + }; + const handleError = (error, errors, parseError2) => { + log$1.warn(error); + if (isDetailedError(error)) { + if (parseError2) { + parseError2(error.str, error.hash); + } + errors.push({ ...error, message: error.str, error }); + } else { + if (parseError2) { + parseError2(error); + } + if (error instanceof Error) { + errors.push({ + str: error.message, + message: error.message, + hash: error.name, + error + }); + } + } + }; + const run$3 = async function(options2 = { + querySelector: ".mermaid" + }) { + try { + await runThrowsErrors(options2); + } catch (e) { + if (isDetailedError(e)) { + log$1.error(e.str); + } + if (mermaid.parseError) { + mermaid.parseError(e); + } + if (!options2.suppressErrors) { + log$1.error("Use the suppressErrors option to suppress these errors"); + throw e; + } + } + }; + const runThrowsErrors = async function({ postRenderCallback, querySelector, nodes: nodes2 } = { + querySelector: ".mermaid" + }) { + const conf2 = mermaidAPI.getConfig(); + log$1.debug(`${!postRenderCallback ? "No " : ""}Callback function found`); + let nodesToProcess; + if (nodes2) { + nodesToProcess = nodes2; + } else if (querySelector) { + nodesToProcess = document.querySelectorAll(querySelector); + } else { + throw new Error("Nodes and querySelector are both undefined"); + } + log$1.debug(`Found ${nodesToProcess.length} diagrams`); + if ((conf2 == null ? void 0 : conf2.startOnLoad) !== void 0) { + log$1.debug("Start On Load: " + (conf2 == null ? void 0 : conf2.startOnLoad)); + mermaidAPI.updateSiteConfig({ startOnLoad: conf2 == null ? void 0 : conf2.startOnLoad }); + } + const idGenerator = new utils.InitIDGenerator(conf2.deterministicIds, conf2.deterministicIDSeed); + let txt; + const errors = []; + for (const element2 of Array.from(nodesToProcess)) { + log$1.info("Rendering diagram: " + element2.id); + /*! Check if previously processed */ + if (element2.getAttribute("data-processed")) { + continue; + } + element2.setAttribute("data-processed", "true"); + const id2 = `mermaid-${idGenerator.next()}`; + txt = element2.innerHTML; + txt = dedent(utils.entityDecode(txt)).trim().replace(//gi, "
"); + const init2 = utils.detectInit(txt); + if (init2) { + log$1.debug("Detected early reinit: ", init2); + } + try { + const { svg: svg2, bindFunctions: bindFunctions2 } = await render$2(id2, txt, element2); + element2.innerHTML = svg2; + if (postRenderCallback) { + await postRenderCallback(id2); + } + if (bindFunctions2) { + bindFunctions2(element2); + } + } catch (error) { + handleError(error, errors, mermaid.parseError); + } + } + if (errors.length > 0) { + throw errors[0]; + } + }; + const initialize = function(config2) { + mermaidAPI.initialize(config2); + }; + const init = async function(config2, nodes2, callback) { + log$1.warn("mermaid.init is deprecated. Please use run instead."); + if (config2) { + initialize(config2); + } + const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" }; + if (typeof nodes2 === "string") { + runOptions.querySelector = nodes2; + } else if (nodes2) { + if (nodes2 instanceof HTMLElement) { + runOptions.nodes = [nodes2]; + } else { + runOptions.nodes = nodes2; + } + } + await run$3(runOptions); + }; + const registerExternalDiagrams = async (diagrams2, { + lazyLoad = true + } = {}) => { + registerLazyLoadedDiagrams(...diagrams2); + if (lazyLoad === false) { + await loadRegisteredDiagrams(); + } + }; + const contentLoaded = function() { + if (mermaid.startOnLoad) { + const { startOnLoad } = mermaidAPI.getConfig(); + if (startOnLoad) { + mermaid.run().catch((err) => log$1.error("Mermaid failed to initialize", err)); + } + } + }; + if (typeof document !== "undefined") { + /*! + * Wait for document loaded before starting the execution + */ + window.addEventListener("load", contentLoaded, false); + } + const setParseErrorHandler = function(parseErrorHandler) { + mermaid.parseError = parseErrorHandler; + }; + const executionQueue = []; + let executionQueueRunning = false; + const executeQueue = async () => { + if (executionQueueRunning) { + return; + } + executionQueueRunning = true; + while (executionQueue.length > 0) { + const f2 = executionQueue.shift(); + if (f2) { + try { + await f2(); + } catch (e) { + log$1.error("Error executing queue", e); + } + } + } + executionQueueRunning = false; + }; + const parse$2 = async (text2, parseOptions) => { + return new Promise((resolve, reject) => { + const performCall = () => new Promise((res, rej) => { + mermaidAPI.parse(text2, parseOptions).then( + (r) => { + res(r); + resolve(r); + }, + (e) => { + var _a; + log$1.error("Error parsing", e); + (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); + rej(e); + reject(e); + } + ); + }); + executionQueue.push(performCall); + executeQueue().catch(reject); + }); + }; + const render$2 = (id2, text2, container) => { + return new Promise((resolve, reject) => { + const performCall = () => new Promise((res, rej) => { + mermaidAPI.render(id2, text2, container).then( + (r) => { + res(r); + resolve(r); + }, + (e) => { + var _a; + log$1.error("Error parsing", e); + (_a = mermaid.parseError) == null ? void 0 : _a.call(mermaid, e); + rej(e); + reject(e); + } + ); + }); + executionQueue.push(performCall); + executeQueue().catch(reject); + }); + }; + const mermaid = { + startOnLoad: true, + mermaidAPI, + parse: parse$2, + render: render$2, + init, + run: run$3, + registerExternalDiagrams, + initialize, + parseError: void 0, + contentLoaded, + setParseErrorHandler, + detectType + }; + var parser$q = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" }, + productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setDirection("TB"); + break; + case 4: + yy.setDirection("BT"); + break; + case 5: + yy.setDirection("RL"); + break; + case 6: + yy.setDirection("LR"); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + yy.setC4Type($$[$0 - 3]); + break; + case 19: + yy.setTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 20: + yy.setAccDescription($$[$0].substring(15)); + this.$ = $$[$0].substring(15); + break; + case 21: + this.$ = $$[$0].trim(); + yy.setTitle(this.$); + break; + case 22: + case 23: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + case 29: + $$[$0].splice(2, 0, "ENTERPRISE"); + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 30: + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 31: + $$[$0].splice(2, 0, "CONTAINER"); + yy.addContainerBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 32: + yy.addDeploymentNode("node", ...$$[$0]); + this.$ = $$[$0]; + break; + case 33: + yy.addDeploymentNode("nodeL", ...$$[$0]); + this.$ = $$[$0]; + break; + case 34: + yy.addDeploymentNode("nodeR", ...$$[$0]); + this.$ = $$[$0]; + break; + case 35: + yy.popBoundaryParseStack(); + break; + case 39: + yy.addPersonOrSystem("person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 40: + yy.addPersonOrSystem("external_person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 41: + yy.addPersonOrSystem("system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 42: + yy.addPersonOrSystem("system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 43: + yy.addPersonOrSystem("system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 44: + yy.addPersonOrSystem("external_system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 45: + yy.addPersonOrSystem("external_system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 46: + yy.addPersonOrSystem("external_system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 47: + yy.addContainer("container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 48: + yy.addContainer("container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 49: + yy.addContainer("container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 50: + yy.addContainer("external_container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 51: + yy.addContainer("external_container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 52: + yy.addContainer("external_container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 53: + yy.addComponent("component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 54: + yy.addComponent("component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 55: + yy.addComponent("component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 56: + yy.addComponent("external_component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 57: + yy.addComponent("external_component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 58: + yy.addComponent("external_component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 60: + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 61: + yy.addRel("birel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 62: + yy.addRel("rel_u", ...$$[$0]); + this.$ = $$[$0]; + break; + case 63: + yy.addRel("rel_d", ...$$[$0]); + this.$ = $$[$0]; + break; + case 64: + yy.addRel("rel_l", ...$$[$0]); + this.$ = $$[$0]; + break; + case 65: + yy.addRel("rel_r", ...$$[$0]); + this.$ = $$[$0]; + break; + case 66: + yy.addRel("rel_b", ...$$[$0]); + this.$ = $$[$0]; + break; + case 67: + $$[$0].splice(0, 1); + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 68: + yy.updateElStyle("update_el_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 69: + yy.updateRelStyle("update_rel_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 70: + yy.updateLayoutConfig("update_layout_config", ...$$[$0]); + this.$ = $$[$0]; + break; + case 71: + this.$ = [$$[$0]]; + break; + case 72: + $$[$0].unshift($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 73: + case 75: + this.$ = $$[$0].trim(); + break; + case 74: + let kv = {}; + kv[$$[$0 - 1].trim()] = $$[$0].trim(); + this.$ = kv; + break; + case 76: + this.$ = ""; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 6; + case 1: + return 7; + case 2: + return 8; + case 3: + return 9; + case 4: + return 22; + case 5: + return 23; + case 6: + this.begin("acc_title"); + return 24; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 26; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + break; + case 14: + c; + break; + case 15: + return 12; + case 16: + break; + case 17: + return 11; + case 18: + return 15; + case 19: + return 16; + case 20: + return 17; + case 21: + return 18; + case 22: + this.begin("person_ext"); + return 45; + case 23: + this.begin("person"); + return 44; + case 24: + this.begin("system_ext_queue"); + return 51; + case 25: + this.begin("system_ext_db"); + return 50; + case 26: + this.begin("system_ext"); + return 49; + case 27: + this.begin("system_queue"); + return 48; + case 28: + this.begin("system_db"); + return 47; + case 29: + this.begin("system"); + return 46; + case 30: + this.begin("boundary"); + return 37; + case 31: + this.begin("enterprise_boundary"); + return 34; + case 32: + this.begin("system_boundary"); + return 36; + case 33: + this.begin("container_ext_queue"); + return 57; + case 34: + this.begin("container_ext_db"); + return 56; + case 35: + this.begin("container_ext"); + return 55; + case 36: + this.begin("container_queue"); + return 54; + case 37: + this.begin("container_db"); + return 53; + case 38: + this.begin("container"); + return 52; + case 39: + this.begin("container_boundary"); + return 38; + case 40: + this.begin("component_ext_queue"); + return 63; + case 41: + this.begin("component_ext_db"); + return 62; + case 42: + this.begin("component_ext"); + return 61; + case 43: + this.begin("component_queue"); + return 60; + case 44: + this.begin("component_db"); + return 59; + case 45: + this.begin("component"); + return 58; + case 46: + this.begin("node"); + return 39; + case 47: + this.begin("node"); + return 39; + case 48: + this.begin("node_l"); + return 40; + case 49: + this.begin("node_r"); + return 41; + case 50: + this.begin("rel"); + return 64; + case 51: + this.begin("birel"); + return 65; + case 52: + this.begin("rel_u"); + return 66; + case 53: + this.begin("rel_u"); + return 66; + case 54: + this.begin("rel_d"); + return 67; + case 55: + this.begin("rel_d"); + return 67; + case 56: + this.begin("rel_l"); + return 68; + case 57: + this.begin("rel_l"); + return 68; + case 58: + this.begin("rel_r"); + return 69; + case 59: + this.begin("rel_r"); + return 69; + case 60: + this.begin("rel_b"); + return 70; + case 61: + this.begin("rel_index"); + return 71; + case 62: + this.begin("update_el_style"); + return 72; + case 63: + this.begin("update_rel_style"); + return 73; + case 64: + this.begin("update_layout_config"); + return 74; + case 65: + return "EOF_IN_STRUCT"; + case 66: + this.begin("attribute"); + return "ATTRIBUTE_EMPTY"; + case 67: + this.begin("attribute"); + break; + case 68: + this.popState(); + this.popState(); + break; + case 69: + return 80; + case 70: + break; + case 71: + return 80; + case 72: + this.begin("string"); + break; + case 73: + this.popState(); + break; + case 74: + return "STR"; + case 75: + this.begin("string_kv"); + break; + case 76: + this.begin("string_kv_key"); + return "STR_KEY"; + case 77: + this.popState(); + this.begin("string_kv_value"); + break; + case 78: + return "STR_VALUE"; + case 79: + this.popState(); + this.popState(); + break; + case 80: + return "STR"; + case 81: + return "LBRACE"; + case 82: + return "RBRACE"; + case 83: + return "SPACE"; + case 84: + return "EOL"; + case 85: + return 14; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/], + conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$q.parser = parser$q; + const parser$r = parser$q; + let c4ShapeArray = []; + let boundaryParseStack = [""]; + let currentBoundaryParse = "global"; + let parentBoundaryParse = ""; + let boundarys = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } + ]; + let rels = []; + let title = ""; + let wrapEnabled$1 = false; + let c4ShapeInRow$1 = 4; + let c4BoundaryInRow$1 = 2; + var c4Type; + const getC4Type = function() { + return c4Type; + }; + const setC4Type = function(c4TypeParam) { + let sanitizedText = sanitizeText$6(c4TypeParam, getConfig$2()); + c4Type = sanitizedText; + }; + const addRel = function(type2, from2, to, label, techn, descr, sprite, tags2, link2) { + if (type2 === void 0 || type2 === null || from2 === void 0 || from2 === null || to === void 0 || to === null || label === void 0 || label === null) { + return; + } + let rel = {}; + const old = rels.find((rel2) => rel2.from === from2 && rel2.to === to); + if (old) { + rel = old; + } else { + rels.push(rel); + } + rel.type = type2; + rel.from = from2; + rel.to = to; + rel.label = { text: label }; + if (techn === void 0 || techn === null) { + rel.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value2] = Object.entries(techn)[0]; + rel[key] = { text: value2 }; + } else { + rel.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + rel.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value2] = Object.entries(descr)[0]; + rel[key] = { text: value2 }; + } else { + rel.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value2] = Object.entries(sprite)[0]; + rel[key] = value2; + } else { + rel.sprite = sprite; + } + if (typeof tags2 === "object") { + let [key, value2] = Object.entries(tags2)[0]; + rel[key] = value2; + } else { + rel.tags = tags2; + } + if (typeof link2 === "object") { + let [key, value2] = Object.entries(link2)[0]; + rel[key] = value2; + } else { + rel.link = link2; + } + rel.wrap = autoWrap$1(); + }; + const addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags2, link2) { + if (alias === null || label === null) { + return; + } + let personOrSystem = {}; + const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias); + if (old && alias === old.alias) { + personOrSystem = old; + } else { + personOrSystem.alias = alias; + c4ShapeArray.push(personOrSystem); + } + if (label === void 0 || label === null) { + personOrSystem.label = { text: "" }; + } else { + personOrSystem.label = { text: label }; + } + if (descr === void 0 || descr === null) { + personOrSystem.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value2] = Object.entries(descr)[0]; + personOrSystem[key] = { text: value2 }; + } else { + personOrSystem.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value2] = Object.entries(sprite)[0]; + personOrSystem[key] = value2; + } else { + personOrSystem.sprite = sprite; + } + if (typeof tags2 === "object") { + let [key, value2] = Object.entries(tags2)[0]; + personOrSystem[key] = value2; + } else { + personOrSystem.tags = tags2; + } + if (typeof link2 === "object") { + let [key, value2] = Object.entries(link2)[0]; + personOrSystem[key] = value2; + } else { + personOrSystem.link = link2; + } + personOrSystem.typeC4Shape = { text: typeC4Shape }; + personOrSystem.parentBoundary = currentBoundaryParse; + personOrSystem.wrap = autoWrap$1(); + }; + const addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags2, link2) { + if (alias === null || label === null) { + return; + } + let container = {}; + const old = c4ShapeArray.find((container2) => container2.alias === alias); + if (old && alias === old.alias) { + container = old; + } else { + container.alias = alias; + c4ShapeArray.push(container); + } + if (label === void 0 || label === null) { + container.label = { text: "" }; + } else { + container.label = { text: label }; + } + if (techn === void 0 || techn === null) { + container.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value2] = Object.entries(techn)[0]; + container[key] = { text: value2 }; + } else { + container.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + container.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value2] = Object.entries(descr)[0]; + container[key] = { text: value2 }; + } else { + container.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value2] = Object.entries(sprite)[0]; + container[key] = value2; + } else { + container.sprite = sprite; + } + if (typeof tags2 === "object") { + let [key, value2] = Object.entries(tags2)[0]; + container[key] = value2; + } else { + container.tags = tags2; + } + if (typeof link2 === "object") { + let [key, value2] = Object.entries(link2)[0]; + container[key] = value2; + } else { + container.link = link2; + } + container.wrap = autoWrap$1(); + container.typeC4Shape = { text: typeC4Shape }; + container.parentBoundary = currentBoundaryParse; + }; + const addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags2, link2) { + if (alias === null || label === null) { + return; + } + let component = {}; + const old = c4ShapeArray.find((component2) => component2.alias === alias); + if (old && alias === old.alias) { + component = old; + } else { + component.alias = alias; + c4ShapeArray.push(component); + } + if (label === void 0 || label === null) { + component.label = { text: "" }; + } else { + component.label = { text: label }; + } + if (techn === void 0 || techn === null) { + component.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value2] = Object.entries(techn)[0]; + component[key] = { text: value2 }; + } else { + component.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + component.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value2] = Object.entries(descr)[0]; + component[key] = { text: value2 }; + } else { + component.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value2] = Object.entries(sprite)[0]; + component[key] = value2; + } else { + component.sprite = sprite; + } + if (typeof tags2 === "object") { + let [key, value2] = Object.entries(tags2)[0]; + component[key] = value2; + } else { + component.tags = tags2; + } + if (typeof link2 === "object") { + let [key, value2] = Object.entries(link2)[0]; + component[key] = value2; + } else { + component.link = link2; + } + component.wrap = autoWrap$1(); + component.typeC4Shape = { text: typeC4Shape }; + component.parentBoundary = currentBoundaryParse; + }; + const addPersonOrSystemBoundary = function(alias, label, type2, tags2, link2) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type2 === void 0 || type2 === null) { + boundary.type = { text: "system" }; + } else { + if (typeof type2 === "object") { + let [key, value2] = Object.entries(type2)[0]; + boundary[key] = { text: value2 }; + } else { + boundary.type = { text: type2 }; + } + } + if (typeof tags2 === "object") { + let [key, value2] = Object.entries(tags2)[0]; + boundary[key] = value2; + } else { + boundary.tags = tags2; + } + if (typeof link2 === "object") { + let [key, value2] = Object.entries(link2)[0]; + boundary[key] = value2; + } else { + boundary.link = link2; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap$1(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); + }; + const addContainerBoundary = function(alias, label, type2, tags2, link2) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type2 === void 0 || type2 === null) { + boundary.type = { text: "container" }; + } else { + if (typeof type2 === "object") { + let [key, value2] = Object.entries(type2)[0]; + boundary[key] = { text: value2 }; + } else { + boundary.type = { text: type2 }; + } + } + if (typeof tags2 === "object") { + let [key, value2] = Object.entries(tags2)[0]; + boundary[key] = value2; + } else { + boundary.tags = tags2; + } + if (typeof link2 === "object") { + let [key, value2] = Object.entries(link2)[0]; + boundary[key] = value2; + } else { + boundary.link = link2; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap$1(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); + }; + const addDeploymentNode = function(nodeType2, alias, label, type2, descr, sprite, tags2, link2) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundarys.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundarys.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type2 === void 0 || type2 === null) { + boundary.type = { text: "node" }; + } else { + if (typeof type2 === "object") { + let [key, value2] = Object.entries(type2)[0]; + boundary[key] = { text: value2 }; + } else { + boundary.type = { text: type2 }; + } + } + if (descr === void 0 || descr === null) { + boundary.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value2] = Object.entries(descr)[0]; + boundary[key] = { text: value2 }; + } else { + boundary.descr = { text: descr }; + } + } + if (typeof tags2 === "object") { + let [key, value2] = Object.entries(tags2)[0]; + boundary[key] = value2; + } else { + boundary.tags = tags2; + } + if (typeof link2 === "object") { + let [key, value2] = Object.entries(link2)[0]; + boundary[key] = value2; + } else { + boundary.link = link2; + } + boundary.nodeType = nodeType2; + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap$1(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); + }; + const popBoundaryParseStack = function() { + currentBoundaryParse = parentBoundaryParse; + boundaryParseStack.pop(); + parentBoundaryParse = boundaryParseStack.pop(); + boundaryParseStack.push(parentBoundaryParse); + }; + const updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) { + let old = c4ShapeArray.find((element2) => element2.alias === elementName); + if (old === void 0) { + old = boundarys.find((element2) => element2.alias === elementName); + if (old === void 0) { + return; + } + } + if (bgColor !== void 0 && bgColor !== null) { + if (typeof bgColor === "object") { + let [key, value2] = Object.entries(bgColor)[0]; + old[key] = value2; + } else { + old.bgColor = bgColor; + } + } + if (fontColor !== void 0 && fontColor !== null) { + if (typeof fontColor === "object") { + let [key, value2] = Object.entries(fontColor)[0]; + old[key] = value2; + } else { + old.fontColor = fontColor; + } + } + if (borderColor !== void 0 && borderColor !== null) { + if (typeof borderColor === "object") { + let [key, value2] = Object.entries(borderColor)[0]; + old[key] = value2; + } else { + old.borderColor = borderColor; + } + } + if (shadowing !== void 0 && shadowing !== null) { + if (typeof shadowing === "object") { + let [key, value2] = Object.entries(shadowing)[0]; + old[key] = value2; + } else { + old.shadowing = shadowing; + } + } + if (shape !== void 0 && shape !== null) { + if (typeof shape === "object") { + let [key, value2] = Object.entries(shape)[0]; + old[key] = value2; + } else { + old.shape = shape; + } + } + if (sprite !== void 0 && sprite !== null) { + if (typeof sprite === "object") { + let [key, value2] = Object.entries(sprite)[0]; + old[key] = value2; + } else { + old.sprite = sprite; + } + } + if (techn !== void 0 && techn !== null) { + if (typeof techn === "object") { + let [key, value2] = Object.entries(techn)[0]; + old[key] = value2; + } else { + old.techn = techn; + } + } + if (legendText !== void 0 && legendText !== null) { + if (typeof legendText === "object") { + let [key, value2] = Object.entries(legendText)[0]; + old[key] = value2; + } else { + old.legendText = legendText; + } + } + if (legendSprite !== void 0 && legendSprite !== null) { + if (typeof legendSprite === "object") { + let [key, value2] = Object.entries(legendSprite)[0]; + old[key] = value2; + } else { + old.legendSprite = legendSprite; + } + } + }; + const updateRelStyle = function(typeC4Shape, from2, to, textColor, lineColor, offsetX, offsetY) { + const old = rels.find((rel) => rel.from === from2 && rel.to === to); + if (old === void 0) { + return; + } + if (textColor !== void 0 && textColor !== null) { + if (typeof textColor === "object") { + let [key, value2] = Object.entries(textColor)[0]; + old[key] = value2; + } else { + old.textColor = textColor; + } + } + if (lineColor !== void 0 && lineColor !== null) { + if (typeof lineColor === "object") { + let [key, value2] = Object.entries(lineColor)[0]; + old[key] = value2; + } else { + old.lineColor = lineColor; + } + } + if (offsetX !== void 0 && offsetX !== null) { + if (typeof offsetX === "object") { + let [key, value2] = Object.entries(offsetX)[0]; + old[key] = parseInt(value2); + } else { + old.offsetX = parseInt(offsetX); + } + } + if (offsetY !== void 0 && offsetY !== null) { + if (typeof offsetY === "object") { + let [key, value2] = Object.entries(offsetY)[0]; + old[key] = parseInt(value2); + } else { + old.offsetY = parseInt(offsetY); + } + } + }; + const updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) { + let c4ShapeInRowValue = c4ShapeInRow$1; + let c4BoundaryInRowValue = c4BoundaryInRow$1; + if (typeof c4ShapeInRowParam === "object") { + const value2 = Object.values(c4ShapeInRowParam)[0]; + c4ShapeInRowValue = parseInt(value2); + } else { + c4ShapeInRowValue = parseInt(c4ShapeInRowParam); + } + if (typeof c4BoundaryInRowParam === "object") { + const value2 = Object.values(c4BoundaryInRowParam)[0]; + c4BoundaryInRowValue = parseInt(value2); + } else { + c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); + } + if (c4ShapeInRowValue >= 1) { + c4ShapeInRow$1 = c4ShapeInRowValue; + } + if (c4BoundaryInRowValue >= 1) { + c4BoundaryInRow$1 = c4BoundaryInRowValue; + } + }; + const getC4ShapeInRow = function() { + return c4ShapeInRow$1; + }; + const getC4BoundaryInRow = function() { + return c4BoundaryInRow$1; + }; + const getCurrentBoundaryParse = function() { + return currentBoundaryParse; + }; + const getParentBoundaryParse = function() { + return parentBoundaryParse; + }; + const getC4ShapeArray = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return c4ShapeArray; + } else { + return c4ShapeArray.filter((personOrSystem) => { + return personOrSystem.parentBoundary === parentBoundary; + }); + } + }; + const getC4Shape = function(alias) { + return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias); + }; + const getC4ShapeKeys = function(parentBoundary) { + return Object.keys(getC4ShapeArray(parentBoundary)); + }; + const getBoundarys = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return boundarys; + } else { + return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary); + } + }; + const getRels = function() { + return rels; + }; + const getTitle = function() { + return title; + }; + const setWrap$1 = function(wrapSetting) { + wrapEnabled$1 = wrapSetting; + }; + const autoWrap$1 = function() { + return wrapEnabled$1; + }; + const clear$k = function() { + c4ShapeArray = []; + boundarys = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } + ]; + parentBoundaryParse = ""; + currentBoundaryParse = "global"; + boundaryParseStack = [""]; + rels = []; + boundaryParseStack = [""]; + title = ""; + wrapEnabled$1 = false; + c4ShapeInRow$1 = 4; + c4BoundaryInRow$1 = 2; + }; + const LINETYPE$1 = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25 + }; + const ARROWTYPE$1 = { + FILLED: 0, + OPEN: 1 + }; + const PLACEMENT$1 = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 + }; + const setTitle = function(txt) { + let sanitizedText = sanitizeText$6(txt, getConfig$2()); + title = sanitizedText; + }; + const db$b = { + addPersonOrSystem, + addPersonOrSystemBoundary, + addContainer, + addContainerBoundary, + addComponent, + addDeploymentNode, + popBoundaryParseStack, + addRel, + updateElStyle, + updateRelStyle, + updateLayoutConfig, + autoWrap: autoWrap$1, + setWrap: setWrap$1, + getC4ShapeArray, + getC4Shape, + getC4ShapeKeys, + getBoundarys, + getCurrentBoundaryParse, + getParentBoundaryParse, + getRels, + getTitle, + getC4Type, + getC4ShapeInRow, + getC4BoundaryInRow, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + getConfig: () => getConfig$2().c4, + clear: clear$k, + LINETYPE: LINETYPE$1, + ARROWTYPE: ARROWTYPE$1, + PLACEMENT: PLACEMENT$1, + setTitle, + setC4Type + // apply, + }; + const drawRect$4 = (element2, rectData) => { + const rectElement = element2.append("rect"); + rectElement.attr("x", rectData.x); + rectElement.attr("y", rectData.y); + rectElement.attr("fill", rectData.fill); + rectElement.attr("stroke", rectData.stroke); + rectElement.attr("width", rectData.width); + rectElement.attr("height", rectData.height); + rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); + rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); + if (rectData.attrs !== void 0) { + for (const attrKey in rectData.attrs) { + rectElement.attr(attrKey, rectData.attrs[attrKey]); + } + } + rectData.class !== void 0 && rectElement.attr("class", rectData.class); + return rectElement; + }; + const drawBackgroundRect$3 = (element2, bounds2) => { + const rectData = { + x: bounds2.startx, + y: bounds2.starty, + width: bounds2.stopx - bounds2.startx, + height: bounds2.stopy - bounds2.starty, + fill: bounds2.fill, + stroke: bounds2.stroke, + class: "rect" + }; + const rectElement = drawRect$4(element2, rectData); + rectElement.lower(); + }; + const drawText$4 = (element2, textData) => { + const nText = textData.text.replace(lineBreakRegex, " "); + const textElem = element2.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + textData.class !== void 0 && textElem.attr("class", textData.class); + const tspan = textElem.append("tspan"); + tspan.attr("x", textData.x + textData.textMargin * 2); + tspan.text(nText); + return textElem; + }; + const drawImage$1 = (elem, x2, y2, link2) => { + const imageElement = elem.append("image"); + imageElement.attr("x", x2); + imageElement.attr("y", y2); + const sanitizedLink = sanitizeUrl_1(link2); + imageElement.attr("xlink:href", sanitizedLink); + }; + const drawEmbeddedImage = (element2, x2, y2, link2) => { + const imageElement = element2.append("use"); + imageElement.attr("x", x2); + imageElement.attr("y", y2); + const sanitizedLink = sanitizeUrl_1(link2); + imageElement.attr("xlink:href", `#${sanitizedLink}`); + }; + const getNoteRect$2 = () => { + const noteRectData = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: "#EDF2AE", + stroke: "#666", + anchor: "start", + rx: 0, + ry: 0 + }; + return noteRectData; + }; + const getTextObj$2 = () => { + const testObject = { + x: 0, + y: 0, + width: 100, + height: 100, + "text-anchor": "start", + style: "#666", + textMargin: 0, + rx: 0, + ry: 0, + tspan: true + }; + return testObject; + }; + const drawRect$3 = function(elem, rectData) { + return drawRect$4(elem, rectData); + }; + const drawImage = function(elem, width2, height, x2, y2, link2) { + const imageElem = elem.append("image"); + imageElem.attr("width", width2); + imageElem.attr("height", height); + imageElem.attr("x", x2); + imageElem.attr("y", y2); + let sanitizedLink = link2.startsWith("data:image/png;base64") ? link2 : sanitizeUrl_1(link2); + imageElem.attr("xlink:href", sanitizedLink); + }; + const drawRels$1 = (elem, rels2, conf2) => { + const relsElem = elem.append("g"); + let i2 = 0; + for (let rel of rels2) { + let textColor = rel.textColor ? rel.textColor : "#444444"; + let strokeColor = rel.lineColor ? rel.lineColor : "#444444"; + let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0; + let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0; + let url = ""; + if (i2 === 0) { + let line2 = relsElem.append("line"); + line2.attr("x1", rel.startPoint.x); + line2.attr("y1", rel.startPoint.y); + line2.attr("x2", rel.endPoint.x); + line2.attr("y2", rel.endPoint.y); + line2.attr("stroke-width", "1"); + line2.attr("stroke", strokeColor); + line2.style("fill", "none"); + if (rel.type !== "rel_b") { + line2.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line2.attr("marker-start", "url(" + url + "#arrowend)"); + } + i2 = -1; + } else { + let line2 = relsElem.append("path"); + line2.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr( + "d", + "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll( + "controlx", + rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4 + ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y) + ); + if (rel.type !== "rel_b") { + line2.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line2.attr("marker-start", "url(" + url + "#arrowend)"); + } + } + let messageConf = conf2.messageFont(); + _drawTextCandidateFunc$3(conf2)( + rel.label.text, + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY, + rel.label.width, + rel.label.height, + { fill: textColor }, + messageConf + ); + if (rel.techn && rel.techn.text !== "") { + messageConf = conf2.messageFont(); + _drawTextCandidateFunc$3(conf2)( + "[" + rel.techn.text + "]", + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY, + Math.max(rel.label.width, rel.techn.width), + rel.techn.height, + { fill: textColor, "font-style": "italic" }, + messageConf + ); + } + } + }; + const drawBoundary$1 = function(elem, boundary, conf2) { + const boundaryElem = elem.append("g"); + let fillColor = boundary.bgColor ? boundary.bgColor : "none"; + let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444"; + let fontColor = boundary.fontColor ? boundary.fontColor : "black"; + let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" }; + if (boundary.nodeType) { + attrsValue = { "stroke-width": 1 }; + } + let rectData = { + x: boundary.x, + y: boundary.y, + fill: fillColor, + stroke: strokeColor, + width: boundary.width, + height: boundary.height, + rx: 2.5, + ry: 2.5, + attrs: attrsValue + }; + drawRect$3(boundaryElem, rectData); + let boundaryConf = conf2.boundaryFont(); + boundaryConf.fontWeight = "bold"; + boundaryConf.fontSize = boundaryConf.fontSize + 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc$3(conf2)( + boundary.label.text, + boundaryElem, + boundary.x, + boundary.y + boundary.label.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + if (boundary.type && boundary.type.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc$3(conf2)( + boundary.type.text, + boundaryElem, + boundary.x, + boundary.y + boundary.type.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } + if (boundary.descr && boundary.descr.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontSize = boundaryConf.fontSize - 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc$3(conf2)( + boundary.descr.text, + boundaryElem, + boundary.x, + boundary.y + boundary.descr.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } + }; + const drawC4Shape = function(elem, c4Shape, conf2) { + var _a; + let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"]; + let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"]; + let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF"; + let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + switch (c4Shape.typeC4Shape.text) { + case "person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + break; + case "external_person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="; + break; + } + const c4ShapeElem = elem.append("g"); + c4ShapeElem.attr("class", "person-man"); + const rect2 = getNoteRect$2(); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + case "system": + case "external_system": + case "container": + case "external_container": + case "component": + case "external_component": + rect2.x = c4Shape.x; + rect2.y = c4Shape.y; + rect2.fill = fillColor; + rect2.width = c4Shape.width; + rect2.height = c4Shape.height; + rect2.stroke = strokeColor; + rect2.rx = 2.5; + rect2.ry = 2.5; + rect2.attrs = { "stroke-width": 0.5 }; + drawRect$3(c4ShapeElem, rect2); + break; + case "system_db": + case "external_system_db": + case "container_db": + case "external_container_db": + case "component_db": + case "external_component_db": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2) + ); + break; + case "system_queue": + case "external_system_queue": + case "container_queue": + case "external_container_queue": + case "component_queue": + case "external_component_queue": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2) + ); + break; + } + let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text); + c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>"); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + drawImage( + c4ShapeElem, + 48, + 48, + c4Shape.x + c4Shape.width / 2 - 24, + c4Shape.y + c4Shape.image.Y, + personImg + ); + break; + } + let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontWeight = "bold"; + textFontConf.fontSize = textFontConf.fontSize + 2; + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc$3(conf2)( + c4Shape.label.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.label.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontColor = fontColor; + if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== "") { + _drawTextCandidateFunc$3(conf2)( + c4Shape.techn.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.techn.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } else if (c4Shape.type && c4Shape.type.text !== "") { + _drawTextCandidateFunc$3(conf2)( + c4Shape.type.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.type.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } + if (c4Shape.descr && c4Shape.descr.text !== "") { + textFontConf = conf2.personFont(); + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc$3(conf2)( + c4Shape.descr.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.descr.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + } + return c4Shape.height; + }; + const insertDatabaseIcon$1 = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); + }; + const insertComputerIcon$1 = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); + }; + const insertClockIcon$1 = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); + }; + const insertArrowHead$1 = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); + }; + const insertArrowEnd = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z"); + }; + const insertArrowFilledHead$1 = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); + }; + const insertDynamicNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); + }; + const insertArrowCrossHead$1 = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4); + marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7"); + }; + const getC4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; + }; + const _drawTextCandidateFunc$3 = function() { + function byText(content2, g, x2, y2, width2, height, textAttrs) { + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2 + height / 2 + 5).style("text-anchor", "middle").text(content2); + _setTextAttrs(text2, textAttrs); + } + function byTspan(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const { fontSize, fontFamily, fontWeight } = conf2; + const lines = content2.split(common$1.lineBreakRegex); + for (let i2 = 0; i2 < lines.length; i2++) { + const dy = i2 * fontSize - fontSize * (lines.length - 1) / 2; + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily); + text2.append("tspan").attr("dy", dy).text(lines[i2]).attr("alignment-baseline", "mathematical"); + _setTextAttrs(text2, textAttrs); + } + } + function byFo(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const s = g.append("switch"); + const f2 = s.append("foreignObject").attr("x", x2).attr("y", y2).attr("width", width2).attr("height", height); + const text2 = f2.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text2.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content2); + byTspan(content2, s, x2, y2, width2, height, textAttrs, conf2); + _setTextAttrs(text2, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; + }(); + const svgDraw$5 = { + drawRect: drawRect$3, + drawBoundary: drawBoundary$1, + drawC4Shape, + drawRels: drawRels$1, + drawImage, + insertArrowHead: insertArrowHead$1, + insertArrowEnd, + insertArrowFilledHead: insertArrowFilledHead$1, + insertDynamicNumber, + insertArrowCrossHead: insertArrowCrossHead$1, + insertDatabaseIcon: insertDatabaseIcon$1, + insertComputerIcon: insertComputerIcon$1, + insertClockIcon: insertClockIcon$1 + }; + let globalBoundaryMaxX = 0, globalBoundaryMaxY = 0; + let c4ShapeInRow = 4; + let c4BoundaryInRow = 2; + parser$q.yy = db$b; + let conf$9 = {}; + class Bounds { + constructor(diagObj) { + 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; + setConf$9(diagObj.db.getConfig()); + } + setData(startx, stopx, starty, stopy) { + this.nextData.startx = this.data.startx = startx; + this.nextData.stopx = this.data.stopx = stopx; + this.nextData.starty = this.data.starty = starty; + this.nextData.stopy = this.data.stopy = stopy; + } + updateVal(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + } + insert(c4Shape) { + this.nextData.cnt = this.nextData.cnt + 1; + let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2; + let _stopx = _startx + c4Shape.width; + let _starty = this.nextData.starty + c4Shape.margin * 2; + let _stopy = _starty + c4Shape.height; + if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) { + _startx = this.nextData.startx + c4Shape.margin + conf$9.nextLinePaddingX; + _starty = this.nextData.stopy + c4Shape.margin * 2; + this.nextData.stopx = _stopx = _startx + c4Shape.width; + this.nextData.starty = this.nextData.stopy; + this.nextData.stopy = _stopy = _starty + c4Shape.height; + this.nextData.cnt = 1; + } + c4Shape.x = _startx; + c4Shape.y = _starty; + this.updateVal(this.data, "startx", _startx, Math.min); + this.updateVal(this.data, "starty", _starty, Math.min); + this.updateVal(this.data, "stopx", _stopx, Math.max); + this.updateVal(this.data, "stopy", _stopy, Math.max); + this.updateVal(this.nextData, "startx", _startx, Math.min); + this.updateVal(this.nextData, "starty", _starty, Math.min); + this.updateVal(this.nextData, "stopx", _stopx, Math.max); + this.updateVal(this.nextData, "stopy", _stopy, Math.max); + } + init(diagObj) { + 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 + }; + setConf$9(diagObj.db.getConfig()); + } + bumpLastMargin(margin) { + this.data.stopx += margin; + this.data.stopy += margin; + } + } + const setConf$9 = function(cnf) { + assignWithDepth$1(conf$9, cnf); + if (cnf.fontFamily) { + conf$9.personFontFamily = conf$9.systemFontFamily = conf$9.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf$9.personFontSize = conf$9.systemFontSize = conf$9.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf$9.personFontWeight = conf$9.systemFontWeight = conf$9.messageFontWeight = cnf.fontWeight; + } + }; + const c4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; + }; + const boundaryFont = (cnf) => { + return { + fontFamily: cnf.boundaryFontFamily, + fontSize: cnf.boundaryFontSize, + fontWeight: cnf.boundaryFontWeight + }; + }; + const messageFont$1 = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; + }; + function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) { + if (!c4Shape[textType].width) { + if (c4ShapeTextWrap) { + c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf); + c4Shape[textType].textLines = c4Shape[textType].text.split(common$1.lineBreakRegex).length; + c4Shape[textType].width = textLimitWidth; + c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf); + } else { + let lines = c4Shape[textType].text.split(common$1.lineBreakRegex); + c4Shape[textType].textLines = lines.length; + let lineHeight = 0; + c4Shape[textType].height = 0; + c4Shape[textType].width = 0; + for (const line2 of lines) { + c4Shape[textType].width = Math.max( + calculateTextWidth(line2, textConf), + c4Shape[textType].width + ); + lineHeight = calculateTextHeight(line2, textConf); + c4Shape[textType].height = c4Shape[textType].height + lineHeight; + } + } + } + } + const drawBoundary = function(diagram2, boundary, bounds2) { + boundary.x = bounds2.data.startx; + boundary.y = bounds2.data.starty; + boundary.width = bounds2.data.stopx - bounds2.data.startx; + boundary.height = bounds2.data.stopy - bounds2.data.starty; + boundary.label.y = conf$9.c4ShapeMargin - 35; + let boundaryTextWrap = boundary.wrap && conf$9.wrap; + let boundaryLabelConf = boundaryFont(conf$9); + boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2; + boundaryLabelConf.fontWeight = "bold"; + let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf); + calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth); + svgDraw$5.drawBoundary(diagram2, boundary, conf$9); + }; + const drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) { + let Y = 0; + for (const c4ShapeKey of c4ShapeKeys) { + Y = 0; + const c4Shape = c4ShapeArray2[c4ShapeKey]; + let c4ShapeTypeConf = c4ShapeFont(conf$9, c4Shape.typeC4Shape.text); + c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2; + c4Shape.typeC4Shape.width = calculateTextWidth( + "«" + c4Shape.typeC4Shape.text + "»", + c4ShapeTypeConf + ); + c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2; + c4Shape.typeC4Shape.Y = conf$9.c4ShapePadding; + Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4; + c4Shape.image = { width: 0, height: 0, Y: 0 }; + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + break; + } + if (c4Shape.sprite) { + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + } + let c4ShapeTextWrap = c4Shape.wrap && conf$9.wrap; + let textLimitWidth = conf$9.width - conf$9.c4ShapePadding * 2; + let c4ShapeLabelConf = c4ShapeFont(conf$9, c4Shape.typeC4Shape.text); + c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2; + c4ShapeLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth); + c4Shape["label"].Y = Y + 8; + Y = c4Shape["label"].Y + c4Shape["label"].height; + if (c4Shape.type && c4Shape.type.text !== "") { + c4Shape.type.text = "[" + c4Shape.type.text + "]"; + let c4ShapeTypeConf2 = c4ShapeFont(conf$9, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth); + c4Shape["type"].Y = Y + 5; + Y = c4Shape["type"].Y + c4Shape["type"].height; + } else if (c4Shape.techn && c4Shape.techn.text !== "") { + c4Shape.techn.text = "[" + c4Shape.techn.text + "]"; + let c4ShapeTechnConf = c4ShapeFont(conf$9, c4Shape.techn.text); + calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth); + c4Shape["techn"].Y = Y + 5; + Y = c4Shape["techn"].Y + c4Shape["techn"].height; + } + let rectHeight = Y; + let rectWidth = c4Shape.label.width; + if (c4Shape.descr && c4Shape.descr.text !== "") { + let c4ShapeDescrConf = c4ShapeFont(conf$9, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth); + c4Shape["descr"].Y = Y + 20; + Y = c4Shape["descr"].Y + c4Shape["descr"].height; + rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width); + rectHeight = Y - c4Shape["descr"].textLines * 5; + } + rectWidth = rectWidth + conf$9.c4ShapePadding; + c4Shape.width = Math.max(c4Shape.width || conf$9.width, rectWidth, conf$9.width); + c4Shape.height = Math.max(c4Shape.height || conf$9.height, rectHeight, conf$9.height); + c4Shape.margin = c4Shape.margin || conf$9.c4ShapeMargin; + currentBounds.insert(c4Shape); + svgDraw$5.drawC4Shape(diagram2, c4Shape, conf$9); + } + currentBounds.bumpLastMargin(conf$9.c4ShapeMargin); + }; + let Point$1 = class Point { + constructor(x2, y2) { + this.x = x2; + this.y = y2; + } + }; + let getIntersectPoint = function(fromNode, endPoint) { + let x1 = fromNode.x; + let y1 = fromNode.y; + let x2 = endPoint.x; + let y2 = endPoint.y; + let fromCenterX = x1 + fromNode.width / 2; + let fromCenterY = y1 + fromNode.height / 2; + let dx = Math.abs(x1 - x2); + let dy = Math.abs(y1 - y2); + let tanDYX = dy / dx; + let fromDYX = fromNode.height / fromNode.width; + let returnPoint = null; + if (y1 == y2 && x1 < x2) { + returnPoint = new Point$1(x1 + fromNode.width, fromCenterY); + } else if (y1 == y2 && x1 > x2) { + returnPoint = new Point$1(x1, fromCenterY); + } else if (x1 == x2 && y1 < y2) { + returnPoint = new Point$1(fromCenterX, y1 + fromNode.height); + } else if (x1 == x2 && y1 > y2) { + returnPoint = new Point$1(fromCenterX, y1); + } + if (x1 > x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point$1(x1, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point$1( + fromCenterX - dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point$1(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point$1( + fromCenterX + dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point$1(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point$1(fromCenterX + fromNode.height / 2 * dx / dy, y1); + } + } else if (x1 > x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point$1(x1, fromCenterY - fromNode.width / 2 * tanDYX); + } else { + returnPoint = new Point$1(fromCenterX - fromNode.height / 2 * dx / dy, y1); + } + } + return returnPoint; + }; + let getIntersectPoints = function(fromNode, endNode) { + let endIntersectPoint = { x: 0, y: 0 }; + endIntersectPoint.x = endNode.x + endNode.width / 2; + endIntersectPoint.y = endNode.y + endNode.height / 2; + let startPoint = getIntersectPoint(fromNode, endIntersectPoint); + endIntersectPoint.x = fromNode.x + fromNode.width / 2; + endIntersectPoint.y = fromNode.y + fromNode.height / 2; + let endPoint = getIntersectPoint(endNode, endIntersectPoint); + return { startPoint, endPoint }; + }; + const drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) { + let i2 = 0; + for (let rel of rels2) { + i2 = i2 + 1; + let relTextWrap = rel.wrap && conf$9.wrap; + let relConf = messageFont$1(conf$9); + let diagramType = diagObj.db.getC4Type(); + if (diagramType === "C4Dynamic") { + rel.label.text = i2 + ": " + rel.label.text; + } + let textLimitWidth = calculateTextWidth(rel.label.text, relConf); + calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth); + if (rel.techn && rel.techn.text !== "") { + textLimitWidth = calculateTextWidth(rel.techn.text, relConf); + calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth); + } + if (rel.descr && rel.descr.text !== "") { + textLimitWidth = calculateTextWidth(rel.descr.text, relConf); + calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth); + } + let fromNode = getC4ShapeObj(rel.from); + let endNode = getC4ShapeObj(rel.to); + let points = getIntersectPoints(fromNode, endNode); + rel.startPoint = points.startPoint; + rel.endPoint = points.endPoint; + } + svgDraw$5.drawRels(diagram2, rels2, conf$9); + }; + function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) { + let currentBounds = new Bounds(diagObj); + currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length); + for (let [i2, currentBoundary] of currentBoundaries.entries()) { + let Y = 0; + currentBoundary.image = { width: 0, height: 0, Y: 0 }; + if (currentBoundary.sprite) { + currentBoundary.image.width = 48; + currentBoundary.image.height = 48; + currentBoundary.image.Y = Y; + Y = currentBoundary.image.Y + currentBoundary.image.height; + } + let currentBoundaryTextWrap = currentBoundary.wrap && conf$9.wrap; + let currentBoundaryLabelConf = boundaryFont(conf$9); + currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2; + currentBoundaryLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH( + "label", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryLabelConf, + currentBounds.data.widthLimit + ); + currentBoundary["label"].Y = Y + 8; + Y = currentBoundary["label"].Y + currentBoundary["label"].height; + if (currentBoundary.type && currentBoundary.type.text !== "") { + currentBoundary.type.text = "[" + currentBoundary.type.text + "]"; + let currentBoundaryTypeConf = boundaryFont(conf$9); + calcC4ShapeTextWH( + "type", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryTypeConf, + currentBounds.data.widthLimit + ); + currentBoundary["type"].Y = Y + 5; + Y = currentBoundary["type"].Y + currentBoundary["type"].height; + } + if (currentBoundary.descr && currentBoundary.descr.text !== "") { + let currentBoundaryDescrConf = boundaryFont(conf$9); + currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2; + calcC4ShapeTextWH( + "descr", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryDescrConf, + currentBounds.data.widthLimit + ); + currentBoundary["descr"].Y = Y + 20; + Y = currentBoundary["descr"].Y + currentBoundary["descr"].height; + } + if (i2 == 0 || i2 % c4BoundaryInRow === 0) { + let _x = parentBounds.data.startx + conf$9.diagramMarginX; + let _y = parentBounds.data.stopy + conf$9.diagramMarginY + Y; + currentBounds.setData(_x, _x, _y, _y); + } else { + let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf$9.diagramMarginX : currentBounds.data.startx; + let _y = currentBounds.data.starty; + currentBounds.setData(_x, _x, _y, _y); + } + currentBounds.name = currentBoundary.alias; + let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias); + let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias); + if (currentPersonOrSystemKeys.length > 0) { + drawC4ShapeArray( + currentBounds, + diagram2, + currentPersonOrSystemArray, + currentPersonOrSystemKeys + ); + } + parentBoundaryAlias = currentBoundary.alias; + let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias); + if (nextCurrentBoundarys.length > 0) { + drawInsideBoundary( + diagram2, + parentBoundaryAlias, + currentBounds, + nextCurrentBoundarys, + diagObj + ); + } + if (currentBoundary.alias !== "global") { + drawBoundary(diagram2, currentBoundary, currentBounds); + } + parentBounds.data.stopy = Math.max( + currentBounds.data.stopy + conf$9.c4ShapeMargin, + parentBounds.data.stopy + ); + parentBounds.data.stopx = Math.max( + currentBounds.data.stopx + conf$9.c4ShapeMargin, + parentBounds.data.stopx + ); + globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx); + globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy); + } + } + const draw$j = function(_text, id2, _version, diagObj) { + conf$9 = getConfig$2().c4; + const securityLevel = getConfig$2().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + let db2 = diagObj.db; + diagObj.db.setWrap(conf$9.wrap); + c4ShapeInRow = db2.getC4ShapeInRow(); + c4BoundaryInRow = db2.getC4BoundaryInRow(); + log$1.debug(`C:${JSON.stringify(conf$9, null, 2)}`); + const diagram2 = securityLevel === "sandbox" ? root2.select(`[id="${id2}"]`) : d3select(`[id="${id2}"]`); + svgDraw$5.insertComputerIcon(diagram2); + svgDraw$5.insertDatabaseIcon(diagram2); + svgDraw$5.insertClockIcon(diagram2); + let screenBounds = new Bounds(diagObj); + screenBounds.setData( + conf$9.diagramMarginX, + conf$9.diagramMarginX, + conf$9.diagramMarginY, + conf$9.diagramMarginY + ); + screenBounds.data.widthLimit = screen.availWidth; + globalBoundaryMaxX = conf$9.diagramMarginX; + globalBoundaryMaxY = conf$9.diagramMarginY; + const title2 = diagObj.db.getTitle(); + let currentBoundaries = diagObj.db.getBoundarys(""); + drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj); + svgDraw$5.insertArrowHead(diagram2); + svgDraw$5.insertArrowEnd(diagram2); + svgDraw$5.insertArrowCrossHead(diagram2); + svgDraw$5.insertArrowFilledHead(diagram2); + drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj); + screenBounds.data.stopx = globalBoundaryMaxX; + screenBounds.data.stopy = globalBoundaryMaxY; + const box = screenBounds.data; + let boxHeight = box.stopy - box.starty; + let height = boxHeight + 2 * conf$9.diagramMarginY; + let boxWidth = box.stopx - box.startx; + const width2 = boxWidth + 2 * conf$9.diagramMarginX; + if (title2) { + diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf$9.diagramMarginX).attr("y", box.starty + conf$9.diagramMarginY); + } + configureSvgSize(diagram2, height, width2, conf$9.useMaxWidth); + const extraVertForTitle = title2 ? 60 : 0; + diagram2.attr( + "viewBox", + box.startx - conf$9.diagramMarginX + " -" + (conf$9.diagramMarginY + extraVertForTitle) + " " + width2 + " " + (height + extraVertForTitle) + ); + log$1.debug(`models:`, box); + }; + const renderer$d = { + drawPersonOrSystemArray: drawC4ShapeArray, + drawBoundary, + setConf: setConf$9, + draw: draw$j + }; + const getStyles$d = (options2) => `.person { + stroke: ${options2.personBorder}; + fill: ${options2.personBkg}; + } +`; + const styles$8 = getStyles$d; + const diagram$j = { + parser: parser$r, + db: db$b, + renderer: renderer$d, + styles: styles$8, + init: ({ c4: c42, wrap: wrap2 }) => { + renderer$d.setConf(c42); + db$b.setWrap(wrap2); + } + }; + const c4Diagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$j + }, Symbol.toStringTag, { value: "Module" })); + var parser$o = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [1, 8, 9, 10, 11, 27, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [8, 9, 10, 11, 29, 42, 44, 46, 48, 50, 52, 54, 56, 58, 61, 63, 65, 66, 68, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 42, 58, 81, 82, 83, 84, 85, 86, 99, 102, 103, 106, 108, 111, 112, 113, 118, 119, 120, 121], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [8, 9, 10, 11, 12, 14, 27, 29, 32, 42, 58, 73, 81, 82, 83, 84, 85, 86, 87, 102, 106, 108, 111, 112, 113], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "graphConfig": 4, "document": 5, "line": 6, "statement": 7, "SEMI": 8, "NEWLINE": 9, "SPACE": 10, "EOF": 11, "GRAPH": 12, "NODIR": 13, "DIR": 14, "FirstStmtSeperator": 15, "ending": 16, "endToken": 17, "spaceList": 18, "spaceListNewline": 19, "verticeStatement": 20, "separator": 21, "styleStatement": 22, "linkStyleStatement": 23, "classDefStatement": 24, "classStatement": 25, "clickStatement": 26, "subgraph": 27, "textNoTags": 28, "SQS": 29, "text": 30, "SQE": 31, "end": 32, "direction": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "link": 39, "node": 40, "styledVertex": 41, "AMP": 42, "vertex": 43, "STYLE_SEPARATOR": 44, "idString": 45, "DOUBLECIRCLESTART": 46, "DOUBLECIRCLEEND": 47, "PS": 48, "PE": 49, "(-": 50, "-)": 51, "STADIUMSTART": 52, "STADIUMEND": 53, "SUBROUTINESTART": 54, "SUBROUTINEEND": 55, "VERTEX_WITH_PROPS_START": 56, "NODE_STRING[field]": 57, "COLON": 58, "NODE_STRING[value]": 59, "PIPE": 60, "CYLINDERSTART": 61, "CYLINDEREND": 62, "DIAMOND_START": 63, "DIAMOND_STOP": 64, "TAGEND": 65, "TRAPSTART": 66, "TRAPEND": 67, "INVTRAPSTART": 68, "INVTRAPEND": 69, "linkStatement": 70, "arrowText": 71, "TESTSTR": 72, "START_LINK": 73, "edgeText": 74, "LINK": 75, "edgeTextToken": 76, "STR": 77, "MD_STR": 78, "textToken": 79, "keywords": 80, "STYLE": 81, "LINKSTYLE": 82, "CLASSDEF": 83, "CLASS": 84, "CLICK": 85, "DOWN": 86, "UP": 87, "textNoTagsToken": 88, "stylesOpt": 89, "idString[vertex]": 90, "idString[class]": 91, "CALLBACKNAME": 92, "CALLBACKARGS": 93, "HREF": 94, "LINK_TARGET": 95, "STR[link]": 96, "STR[tooltip]": 97, "alphaNum": 98, "DEFAULT": 99, "numList": 100, "INTERPOLATE": 101, "NUM": 102, "COMMA": 103, "style": 104, "styleComponent": 105, "NODE_STRING": 106, "UNIT": 107, "BRKT": 108, "PCT": 109, "idStringToken": 110, "MINUS": 111, "MULT": 112, "UNICODE_TEXT": 113, "TEXT": 114, "TAGSTART": 115, "EDGE_TEXT": 116, "alphaNumToken": 117, "direction_tb": 118, "direction_bt": 119, "direction_rl": 120, "direction_lr": 121, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 8: "SEMI", 9: "NEWLINE", 10: "SPACE", 11: "EOF", 12: "GRAPH", 13: "NODIR", 14: "DIR", 27: "subgraph", 29: "SQS", 31: "SQE", 32: "end", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 42: "AMP", 44: "STYLE_SEPARATOR", 46: "DOUBLECIRCLESTART", 47: "DOUBLECIRCLEEND", 48: "PS", 49: "PE", 50: "(-", 51: "-)", 52: "STADIUMSTART", 53: "STADIUMEND", 54: "SUBROUTINESTART", 55: "SUBROUTINEEND", 56: "VERTEX_WITH_PROPS_START", 57: "NODE_STRING[field]", 58: "COLON", 59: "NODE_STRING[value]", 60: "PIPE", 61: "CYLINDERSTART", 62: "CYLINDEREND", 63: "DIAMOND_START", 64: "DIAMOND_STOP", 65: "TAGEND", 66: "TRAPSTART", 67: "TRAPEND", 68: "INVTRAPSTART", 69: "INVTRAPEND", 72: "TESTSTR", 73: "START_LINK", 75: "LINK", 77: "STR", 78: "MD_STR", 81: "STYLE", 82: "LINKSTYLE", 83: "CLASSDEF", 84: "CLASS", 85: "CLICK", 86: "DOWN", 87: "UP", 90: "idString[vertex]", 91: "idString[class]", 92: "CALLBACKNAME", 93: "CALLBACKARGS", 94: "HREF", 95: "LINK_TARGET", 96: "STR[link]", 97: "STR[tooltip]", 99: "DEFAULT", 101: "INTERPOLATE", 102: "NUM", 103: "COMMA", 106: "NODE_STRING", 107: "UNIT", 108: "BRKT", 109: "PCT", 111: "MINUS", 112: "MULT", 113: "UNICODE_TEXT", 114: "TEXT", 115: "TAGSTART", 116: "EDGE_TEXT", 118: "direction_tb", 119: "direction_bt", 120: "direction_rl", 121: "direction_lr" }, + productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 2], [4, 3], [16, 2], [16, 1], [17, 1], [17, 1], [17, 1], [15, 1], [15, 1], [15, 2], [19, 2], [19, 2], [19, 1], [19, 1], [18, 2], [18, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 4], [7, 1], [7, 2], [7, 2], [7, 1], [21, 1], [21, 1], [21, 1], [20, 3], [20, 4], [20, 2], [20, 1], [40, 1], [40, 5], [41, 1], [41, 3], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 8], [43, 4], [43, 4], [43, 4], [43, 6], [43, 4], [43, 4], [43, 4], [43, 4], [43, 4], [43, 1], [39, 2], [39, 3], [39, 3], [39, 1], [39, 3], [74, 1], [74, 2], [74, 1], [74, 1], [70, 1], [71, 3], [30, 1], [30, 2], [30, 1], [30, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [80, 1], [28, 1], [28, 2], [28, 1], [28, 1], [24, 5], [25, 5], [26, 2], [26, 4], [26, 3], [26, 5], [26, 3], [26, 5], [26, 5], [26, 7], [26, 2], [26, 4], [26, 2], [26, 4], [26, 4], [26, 6], [22, 5], [23, 5], [23, 5], [23, 9], [23, 9], [23, 7], [23, 7], [100, 1], [100, 3], [89, 1], [89, 3], [104, 1], [104, 2], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [105, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [110, 1], [79, 1], [79, 1], [79, 1], [79, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [76, 1], [76, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [117, 1], [45, 1], [45, 2], [98, 1], [98, 2], [33, 1], [33, 1], [33, 1], [33, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + this.$ = []; + break; + case 3: + if (!Array.isArray($$[$0]) || $$[$0].length > 0) { + $$[$0 - 1].push($$[$0]); + } + this.$ = $$[$0 - 1]; + break; + case 4: + case 176: + this.$ = $$[$0]; + break; + case 11: + yy.setDirection("TB"); + this.$ = "TB"; + break; + case 12: + yy.setDirection($$[$0 - 1]); + this.$ = $$[$0 - 1]; + break; + case 27: + this.$ = $$[$0 - 1].nodes; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + this.$ = []; + break; + case 33: + this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); + break; + case 34: + this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); + break; + case 35: + this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); + break; + case 37: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 38: + case 39: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 43: + yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); + this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; + break; + case 44: + yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; + break; + case 45: + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; + break; + case 46: + this.$ = { stmt: $$[$0], nodes: $$[$0] }; + break; + case 47: + this.$ = [$$[$0]]; + break; + case 48: + this.$ = $$[$0 - 4].concat($$[$0]); + break; + case 49: + this.$ = $$[$0]; + break; + case 50: + this.$ = $$[$0 - 2]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 51: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); + break; + case 52: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); + break; + case 53: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); + break; + case 54: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); + break; + case 55: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); + break; + case 56: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); + break; + case 57: + this.$ = $$[$0 - 7]; + yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); + break; + case 58: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); + break; + case 59: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); + break; + case 60: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); + break; + case 61: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); + break; + case 62: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); + break; + case 63: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); + break; + case 64: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); + break; + case 65: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); + break; + case 66: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); + break; + case 67: + this.$ = $$[$0]; + yy.addVertex($$[$0]); + break; + case 68: + $$[$0 - 1].text = $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 69: + case 70: + $$[$0 - 2].text = $$[$0 - 1]; + this.$ = $$[$0 - 2]; + break; + case 71: + this.$ = $$[$0]; + break; + case 72: + var inf = yy.destructLink($$[$0], $$[$0 - 2]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; + break; + case 73: + this.$ = { text: $$[$0], type: "text" }; + break; + case 74: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 75: + this.$ = { text: $$[$0], type: "string" }; + break; + case 76: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 77: + var inf = yy.destructLink($$[$0]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; + break; + case 78: + this.$ = $$[$0 - 1]; + break; + case 79: + this.$ = { text: $$[$0], type: "text" }; + break; + case 80: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 81: + this.$ = { text: $$[$0], type: "string" }; + break; + case 82: + case 97: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 94: + this.$ = { text: $$[$0], type: "text" }; + break; + case 95: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 96: + this.$ = { text: $$[$0], type: "text" }; + break; + case 98: + this.$ = $$[$0 - 4]; + yy.addClass($$[$0 - 2], $$[$0]); + break; + case 99: + this.$ = $$[$0 - 4]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 100: + case 108: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 101: + case 109: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 102: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 103: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 104: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 105: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 106: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 107: + this.$ = $$[$0 - 6]; + yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 111: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 112: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + break; + case 113: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 5], $$[$0 - 2]); + break; + case 114: + this.$ = $$[$0 - 4]; + yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); + break; + case 115: + this.$ = $$[$0 - 4]; + yy.updateLink([$$[$0 - 2]], $$[$0]); + break; + case 116: + this.$ = $$[$0 - 4]; + yy.updateLink($$[$0 - 2], $$[$0]); + break; + case 117: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); + yy.updateLink([$$[$0 - 6]], $$[$0]); + break; + case 118: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); + yy.updateLink($$[$0 - 6], $$[$0]); + break; + case 119: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); + break; + case 120: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); + break; + case 121: + case 123: + this.$ = [$$[$0]]; + break; + case 122: + case 124: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 126: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 174: + this.$ = $$[$0]; + break; + case 175: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 177: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 178: + this.$ = { stmt: "dir", value: "TB" }; + break; + case 179: + this.$ = { stmt: "dir", value: "BT" }; + break; + case 180: + this.$ = { stmt: "dir", value: "RL" }; + break; + case 181: + this.$ = { stmt: "dir", value: "LR" }; + break; + } + }, + table: [{ 3: 1, 4: 2, 9: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], + defaultActions: {}, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 34; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 36; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + this.begin("callbackname"); + break; + case 8: + this.popState(); + break; + case 9: + this.popState(); + this.begin("callbackargs"); + break; + case 10: + return 92; + case 11: + this.popState(); + break; + case 12: + return 93; + case 13: + return "MD_STR"; + case 14: + this.popState(); + break; + case 15: + this.begin("md_string"); + break; + case 16: + return "STR"; + case 17: + this.popState(); + break; + case 18: + this.pushState("string"); + break; + case 19: + return 81; + case 20: + return 99; + case 21: + return 82; + case 22: + return 101; + case 23: + return 83; + case 24: + return 84; + case 25: + return 94; + case 26: + this.begin("click"); + break; + case 27: + this.popState(); + break; + case 28: + return 85; + case 29: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 30: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 31: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 32: + return 27; + case 33: + return 32; + case 34: + return 95; + case 35: + return 95; + case 36: + return 95; + case 37: + return 95; + case 38: + this.popState(); + return 13; + case 39: + this.popState(); + return 14; + case 40: + this.popState(); + return 14; + case 41: + this.popState(); + return 14; + case 42: + this.popState(); + return 14; + case 43: + this.popState(); + return 14; + case 44: + this.popState(); + return 14; + case 45: + this.popState(); + return 14; + case 46: + this.popState(); + return 14; + case 47: + this.popState(); + return 14; + case 48: + this.popState(); + return 14; + case 49: + return 118; + case 50: + return 119; + case 51: + return 120; + case 52: + return 121; + case 53: + return 102; + case 54: + return 108; + case 55: + return 44; + case 56: + return 58; + case 57: + return 42; + case 58: + return 8; + case 59: + return 103; + case 60: + return 112; + case 61: + this.popState(); + return 75; + case 62: + this.pushState("edgeText"); + return 73; + case 63: + return 116; + case 64: + this.popState(); + return 75; + case 65: + this.pushState("thickEdgeText"); + return 73; + case 66: + return 116; + case 67: + this.popState(); + return 75; + case 68: + this.pushState("dottedEdgeText"); + return 73; + case 69: + return 116; + case 70: + return 75; + case 71: + this.popState(); + return 51; + case 72: + return "TEXT"; + case 73: + this.pushState("ellipseText"); + return 50; + case 74: + this.popState(); + return 53; + case 75: + this.pushState("text"); + return 52; + case 76: + this.popState(); + return 55; + case 77: + this.pushState("text"); + return 54; + case 78: + return 56; + case 79: + this.pushState("text"); + return 65; + case 80: + this.popState(); + return 62; + case 81: + this.pushState("text"); + return 61; + case 82: + this.popState(); + return 47; + case 83: + this.pushState("text"); + return 46; + case 84: + this.popState(); + return 67; + case 85: + this.popState(); + return 69; + case 86: + return 114; + case 87: + this.pushState("trapText"); + return 66; + case 88: + this.pushState("trapText"); + return 68; + case 89: + return 115; + case 90: + return 65; + case 91: + return 87; + case 92: + return "SEP"; + case 93: + return 86; + case 94: + return 112; + case 95: + return 108; + case 96: + return 42; + case 97: + return 106; + case 98: + return 111; + case 99: + return 113; + case 100: + this.popState(); + return 60; + case 101: + this.pushState("text"); + return 60; + case 102: + this.popState(); + return 49; + case 103: + this.pushState("text"); + return 48; + case 104: + this.popState(); + return 31; + case 105: + this.pushState("text"); + return 29; + case 106: + this.popState(); + return 64; + case 107: + this.pushState("text"); + return 63; + case 108: + return "TEXT"; + case 109: + return "QUOTE"; + case 110: + return 9; + case 111: + return 10; + case 112: + return 11; + } + }, + rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:[^-]|-(?!-)+)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:[^=]|=(?!))/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:[^\.]|\.(?!))/, /^(?:\s*~~[\~]+\s*)/, /^(?:[-/\)][\)])/, /^(?:[^\(\)\[\]\{\}]|(?!\)+))/, /^(?:\(-)/, /^(?:\]\))/, /^(?:\(\[)/, /^(?:\]\])/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:>)/, /^(?:\)\])/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\(\(\()/, /^(?:[\\(?=\])][\]])/, /^(?:\/(?=\])\])/, /^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:\\\|)/, /^(?:v\b)/, /^(?:\*)/, /^(?:#)/, /^(?:&)/, /^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/, /^(?:-)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\|)/, /^(?:\|)/, /^(?:\))/, /^(?:\()/, /^(?:\])/, /^(?:\[)/, /^(?:(\}))/, /^(?:\{)/, /^(?:[^\[\]\(\)\{\}\|\"]+)/, /^(?:")/, /^(?:(\r?\n)+)/, /^(?:\s)/, /^(?:$)/], + conditions: { "callbackargs": { "rules": [11, 12, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "text": { "rules": [15, 18, 70, 73, 74, 75, 76, 77, 80, 81, 82, 83, 87, 88, 100, 101, 102, 103, 104, 105, 106, 107, 108], "inclusive": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dir": { "rules": [15, 18, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 67, 68, 70, 73, 75, 77, 78, 79, 81, 83, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 103, 105, 107, 109, 110, 111, 112], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$o.parser = parser$o; + const parser$p = parser$o; + const MERMAID_DOM_ID_PREFIX$1 = "flowchart-"; + let vertexCounter = 0; + let config$2 = getConfig$2(); + let vertices = {}; + let edges = []; + let classes$2 = {}; + let subGraphs = []; + let subGraphLookup = {}; + let tooltips = {}; + let subCount = 0; + let firstGraphFlag = true; + let direction$3; + let version; + let funs$1 = []; + const sanitizeText$3 = (txt) => common$1.sanitizeText(txt, config$2); + const lookUpDomId$1 = function(id2) { + const veritceKeys = Object.keys(vertices); + for (const veritceKey of veritceKeys) { + if (vertices[veritceKey].id === id2) { + return vertices[veritceKey].domId; + } + } + return id2; + }; + const addVertex = function(_id, textObj, type2, style, classes2, dir2, props = {}) { + let txt; + let id2 = _id; + if (id2 === void 0) { + return; + } + if (id2.trim().length === 0) { + return; + } + if (vertices[id2] === void 0) { + vertices[id2] = { + id: id2, + labelType: "text", + domId: MERMAID_DOM_ID_PREFIX$1 + id2 + "-" + vertexCounter, + styles: [], + classes: [] + }; + } + vertexCounter++; + if (textObj !== void 0) { + config$2 = getConfig$2(); + txt = sanitizeText$3(textObj.text.trim()); + vertices[id2].labelType = textObj.type; + if (txt[0] === '"' && txt[txt.length - 1] === '"') { + txt = txt.substring(1, txt.length - 1); + } + vertices[id2].text = txt; + } else { + if (vertices[id2].text === void 0) { + vertices[id2].text = _id; + } + } + if (type2 !== void 0) { + vertices[id2].type = type2; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + vertices[id2].styles.push(s); + }); + } + if (classes2 !== void 0 && classes2 !== null) { + classes2.forEach(function(s) { + vertices[id2].classes.push(s); + }); + } + if (dir2 !== void 0) { + vertices[id2].dir = dir2; + } + if (vertices[id2].props === void 0) { + vertices[id2].props = props; + } else if (props !== void 0) { + Object.assign(vertices[id2].props, props); + } + }; + const addSingleLink = function(_start, _end, type2) { + let start2 = _start; + let end2 = _end; + const edge = { start: start2, end: end2, type: void 0, text: "", labelType: "text" }; + log$1.info("abc78 Got edge...", edge); + const linkTextObj = type2.text; + if (linkTextObj !== void 0) { + edge.text = sanitizeText$3(linkTextObj.text.trim()); + if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { + edge.text = edge.text.substring(1, edge.text.length - 1); + } + edge.labelType = linkTextObj.type; + } + if (type2 !== void 0) { + edge.type = type2.type; + edge.stroke = type2.stroke; + edge.length = type2.length; + } + edges.push(edge); + }; + const addLink$1 = function(_start, _end, type2) { + log$1.info("addLink (abc78)", _start, _end, type2); + let i2, j; + for (i2 = 0; i2 < _start.length; i2++) { + for (j = 0; j < _end.length; j++) { + addSingleLink(_start[i2], _end[j], type2); + } + } + }; + const updateLinkInterpolate = function(positions, interp) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultInterpolate = interp; + } else { + edges[pos].interpolate = interp; + } + }); + }; + const updateLink = function(positions, style) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultStyle = style; + } else { + if (utils.isSubstringInArray("fill", style) === -1) { + style.push("fill:none"); + } + edges[pos].style = style; + } + }); + }; + const addClass$1 = function(ids, style) { + ids.split(",").forEach(function(id2) { + if (classes$2[id2] === void 0) { + classes$2[id2] = { id: id2, styles: [], textStyles: [] }; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + if (s.match("color")) { + const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); + classes$2[id2].textStyles.push(newStyle); + } + classes$2[id2].styles.push(s); + }); + } + }); + }; + const setDirection$3 = function(dir2) { + direction$3 = dir2; + if (direction$3.match(/.*/)) { + direction$3 = "LR"; + } + if (direction$3.match(/.*v/)) { + direction$3 = "TB"; + } + if (direction$3 === "TD") { + direction$3 = "TB"; + } + }; + const setClass$1 = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id2 = _id; + if (vertices[id2] !== void 0) { + vertices[id2].classes.push(className); + } + if (subGraphLookup[id2] !== void 0) { + subGraphLookup[id2].classes.push(className); + } + }); + }; + const setTooltip$1 = function(ids, tooltip) { + ids.split(",").forEach(function(id2) { + if (tooltip !== void 0) { + tooltips[version === "gen-1" ? lookUpDomId$1(id2) : id2] = sanitizeText$3(tooltip); + } + }); + }; + const setClickFun$1 = function(id2, functionName, functionArgs) { + let domId = lookUpDomId$1(id2); + if (getConfig$2().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i2 = 0; i2 < argList.length; i2++) { + let item = argList[i2].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i2] = item; + } + } + if (argList.length === 0) { + argList.push(id2); + } + if (vertices[id2] !== void 0) { + vertices[id2].haveCallback = true; + funs$1.push(function() { + const elem = document.querySelector(`[id="${domId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } + }; + const setLink$2 = function(ids, linkStr, target) { + ids.split(",").forEach(function(id2) { + if (vertices[id2] !== void 0) { + vertices[id2].link = utils.formatUrl(linkStr, config$2); + vertices[id2].linkTarget = target; + } + }); + setClass$1(ids, "clickable"); + }; + const getTooltip$1 = function(id2) { + if (tooltips.hasOwnProperty(id2)) { + return tooltips[id2]; + } + return void 0; + }; + const setClickEvent$2 = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id2) { + setClickFun$1(id2, functionName, functionArgs); + }); + setClass$1(ids, "clickable"); + }; + const bindFunctions$2 = function(element2) { + funs$1.forEach(function(fun) { + fun(element2); + }); + }; + const getDirection$3 = function() { + return direction$3.trim(); + }; + const getVertices = function() { + return vertices; + }; + const getEdges = function() { + return edges; + }; + const getClasses$6 = function() { + return classes$2; + }; + const setupToolTips$1 = function(element2) { + let tooltipElem = d3select(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = d3select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg2 = d3select(element2).select("svg"); + const nodes2 = svg2.selectAll("g.node"); + nodes2.on("mouseover", function() { + const el = d3select(this); + const title2 = el.attr("title"); + if (title2 === null) { + return; + } + const rect2 = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect2.left + (rect2.right - rect2.left) / 2 + "px").style("top", window.scrollY + rect2.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = d3select(this); + el.classed("hover", false); + }); + }; + funs$1.push(setupToolTips$1); + const clear$j = function(ver = "gen-1") { + vertices = {}; + classes$2 = {}; + edges = []; + funs$1 = [setupToolTips$1]; + subGraphs = []; + subGraphLookup = {}; + subCount = 0; + tooltips = {}; + firstGraphFlag = true; + version = ver; + clear$l(); + }; + const setGen = (ver) => { + version = ver || "gen-2"; + }; + const defaultStyle = function() { + return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; + }; + const addSubGraph = function(_id, list2, _title) { + let id2 = _id.text.trim(); + let title2 = _title.text; + if (_id === _title && _title.text.match(/\s/)) { + id2 = void 0; + } + function uniq(a) { + const prims = { boolean: {}, number: {}, string: {} }; + const objs = []; + let dir3; + const nodeList2 = a.filter(function(item) { + const type2 = typeof item; + if (item.stmt && item.stmt === "dir") { + dir3 = item.value; + return false; + } + if (item.trim() === "") { + return false; + } + if (type2 in prims) { + return prims[type2].hasOwnProperty(item) ? false : prims[type2][item] = true; + } else { + return objs.includes(item) ? false : objs.push(item); + } + }); + return { nodeList: nodeList2, dir: dir3 }; + } + let nodeList = []; + const { nodeList: nl, dir: dir2 } = uniq(nodeList.concat.apply(nodeList, list2)); + nodeList = nl; + if (version === "gen-1") { + for (let i2 = 0; i2 < nodeList.length; i2++) { + nodeList[i2] = lookUpDomId$1(nodeList[i2]); + } + } + id2 = id2 || "subGraph" + subCount; + title2 = title2 || ""; + title2 = sanitizeText$3(title2); + subCount = subCount + 1; + const subGraph = { + id: id2, + nodes: nodeList, + title: title2.trim(), + classes: [], + dir: dir2, + labelType: _title.type + }; + log$1.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); + subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; + subGraphs.push(subGraph); + subGraphLookup[id2] = subGraph; + return id2; + }; + const getPosForId = function(id2) { + for (const [i2, subGraph] of subGraphs.entries()) { + if (subGraph.id === id2) { + return i2; + } + } + return -1; + }; + let secCount = -1; + const posCrossRef = []; + const indexNodes2 = function(id2, pos) { + const nodes2 = subGraphs[pos].nodes; + secCount = secCount + 1; + if (secCount > 2e3) { + return; + } + posCrossRef[secCount] = pos; + if (subGraphs[pos].id === id2) { + return { + result: true, + count: 0 + }; + } + let count = 0; + let posCount = 1; + while (count < nodes2.length) { + const childPos = getPosForId(nodes2[count]); + if (childPos >= 0) { + const res = indexNodes2(id2, childPos); + if (res.result) { + return { + result: true, + count: posCount + res.count + }; + } else { + posCount = posCount + res.count; + } + } + count = count + 1; + } + return { + result: false, + count: posCount + }; + }; + const getDepthFirstPos = function(pos) { + return posCrossRef[pos]; + }; + const indexNodes = function() { + secCount = -1; + if (subGraphs.length > 0) { + indexNodes2("none", subGraphs.length - 1); + } + }; + const getSubGraphs = function() { + return subGraphs; + }; + const firstGraph = () => { + if (firstGraphFlag) { + firstGraphFlag = false; + return true; + } + return false; + }; + const destructStartLink = (_str) => { + let str2 = _str.trim(); + let type2 = "arrow_open"; + switch (str2[0]) { + case "<": + type2 = "arrow_point"; + str2 = str2.slice(1); + break; + case "x": + type2 = "arrow_cross"; + str2 = str2.slice(1); + break; + case "o": + type2 = "arrow_circle"; + str2 = str2.slice(1); + break; + } + let stroke = "normal"; + if (str2.includes("=")) { + stroke = "thick"; + } + if (str2.includes(".")) { + stroke = "dotted"; + } + return { type: type2, stroke }; + }; + const countChar = (char2, str2) => { + const length2 = str2.length; + let count = 0; + for (let i2 = 0; i2 < length2; ++i2) { + if (str2[i2] === char2) { + ++count; + } + } + return count; + }; + const destructEndLink = (_str) => { + const str2 = _str.trim(); + let line2 = str2.slice(0, -1); + let type2 = "arrow_open"; + switch (str2.slice(-1)) { + case "x": + type2 = "arrow_cross"; + if (str2[0] === "x") { + type2 = "double_" + type2; + line2 = line2.slice(1); + } + break; + case ">": + type2 = "arrow_point"; + if (str2[0] === "<") { + type2 = "double_" + type2; + line2 = line2.slice(1); + } + break; + case "o": + type2 = "arrow_circle"; + if (str2[0] === "o") { + type2 = "double_" + type2; + line2 = line2.slice(1); + } + break; + } + let stroke = "normal"; + let length2 = line2.length - 1; + if (line2[0] === "=") { + stroke = "thick"; + } + if (line2[0] === "~") { + stroke = "invisible"; + } + let dots = countChar(".", line2); + if (dots) { + stroke = "dotted"; + length2 = dots; + } + return { type: type2, stroke, length: length2 }; + }; + const destructLink = (_str, _startStr) => { + const info2 = destructEndLink(_str); + let startInfo; + if (_startStr) { + startInfo = destructStartLink(_startStr); + if (startInfo.stroke !== info2.stroke) { + return { type: "INVALID", stroke: "INVALID" }; + } + if (startInfo.type === "arrow_open") { + startInfo.type = info2.type; + } else { + if (startInfo.type !== info2.type) { + return { type: "INVALID", stroke: "INVALID" }; + } + startInfo.type = "double_" + startInfo.type; + } + if (startInfo.type === "double_arrow") { + startInfo.type = "double_arrow_point"; + } + startInfo.length = info2.length; + return startInfo; + } + return info2; + }; + const exists = (allSgs, _id) => { + let res = false; + allSgs.forEach((sg) => { + const pos = sg.nodes.indexOf(_id); + if (pos >= 0) { + res = true; + } + }); + return res; + }; + const makeUniq = (sg, allSubgraphs) => { + const res = []; + sg.nodes.forEach((_id, pos) => { + if (!exists(allSubgraphs, _id)) { + res.push(sg.nodes[pos]); + } + }); + return { nodes: res }; + }; + const lex = { + firstGraph + }; + const flowDb = { + defaultConfig: () => defaultConfig.flowchart, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + addVertex, + lookUpDomId: lookUpDomId$1, + addLink: addLink$1, + updateLinkInterpolate, + updateLink, + addClass: addClass$1, + setDirection: setDirection$3, + setClass: setClass$1, + setTooltip: setTooltip$1, + getTooltip: getTooltip$1, + setClickEvent: setClickEvent$2, + setLink: setLink$2, + bindFunctions: bindFunctions$2, + getDirection: getDirection$3, + getVertices, + getEdges, + getClasses: getClasses$6, + clear: clear$j, + setGen, + defaultStyle, + addSubGraph, + getDepthFirstPos, + indexNodes, + getSubGraphs, + destructLink, + lex, + exists, + makeUniq, + setDiagramTitle, + getDiagramTitle + }; + const db$a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addClass: addClass$1, + addLink: addLink$1, + addSingleLink, + addSubGraph, + addVertex, + bindFunctions: bindFunctions$2, + clear: clear$j, + default: flowDb, + defaultStyle, + destructLink, + firstGraph, + getClasses: getClasses$6, + getDepthFirstPos, + getDirection: getDirection$3, + getEdges, + getSubGraphs, + getTooltip: getTooltip$1, + getVertices, + indexNodes, + lex, + lookUpDomId: lookUpDomId$1, + setClass: setClass$1, + setClickEvent: setClickEvent$2, + setDirection: setDirection$3, + setGen, + setLink: setLink$2, + updateLink, + updateLinkInterpolate + }, Symbol.toStringTag, { value: "Module" })); + var symbolTag$3 = "[object Symbol]"; + function isSymbol(value2) { + return typeof value2 == "symbol" || isObjectLike(value2) && baseGetTag(value2) == symbolTag$3; + } + function arrayMap(array2, iteratee) { + var index2 = -1, length2 = array2 == null ? 0 : array2.length, result = Array(length2); + while (++index2 < length2) { + result[index2] = iteratee(array2[index2], index2, array2); + } + return result; + } + var INFINITY$3 = 1 / 0; + var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0; + function baseToString(value2) { + if (typeof value2 == "string") { + return value2; + } + if (isArray$1(value2)) { + return arrayMap(value2, baseToString) + ""; + } + if (isSymbol(value2)) { + return symbolToString ? symbolToString.call(value2) : ""; + } + var result = value2 + ""; + return result == "0" && 1 / value2 == -INFINITY$3 ? "-0" : result; + } + var reWhitespace = /\s/; + function trimmedEndIndex(string2) { + var index2 = string2.length; + while (index2-- && reWhitespace.test(string2.charAt(index2))) { + } + return index2; + } + var reTrimStart = /^\s+/; + function baseTrim(string2) { + return string2 ? string2.slice(0, trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2; + } + var NAN = 0 / 0; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + function toNumber(value2) { + if (typeof value2 == "number") { + return value2; + } + if (isSymbol(value2)) { + return NAN; + } + if (isObject$1(value2)) { + var other = typeof value2.valueOf == "function" ? value2.valueOf() : value2; + value2 = isObject$1(other) ? other + "" : other; + } + if (typeof value2 != "string") { + return value2 === 0 ? value2 : +value2; + } + value2 = baseTrim(value2); + var isBinary2 = reIsBinary.test(value2); + return isBinary2 || reIsOctal.test(value2) ? freeParseInt(value2.slice(2), isBinary2 ? 2 : 8) : reIsBadHex.test(value2) ? NAN : +value2; + } + var INFINITY$2 = 1 / 0, MAX_INTEGER = 17976931348623157e292; + function toFinite(value2) { + if (!value2) { + return value2 === 0 ? value2 : 0; + } + value2 = toNumber(value2); + if (value2 === INFINITY$2 || value2 === -INFINITY$2) { + var sign2 = value2 < 0 ? -1 : 1; + return sign2 * MAX_INTEGER; + } + return value2 === value2 ? value2 : 0; + } + function toInteger(value2) { + var result = toFinite(value2), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + function noop() { + } + function arrayEach(array2, iteratee) { + var index2 = -1, length2 = array2 == null ? 0 : array2.length; + while (++index2 < length2) { + if (iteratee(array2[index2], index2, array2) === false) { + break; + } + } + return array2; + } + function baseFindIndex(array2, predicate, fromIndex, fromRight) { + var length2 = array2.length, index2 = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index2-- : ++index2 < length2) { + if (predicate(array2[index2], index2, array2)) { + return index2; + } + } + return -1; + } + function baseIsNaN(value2) { + return value2 !== value2; + } + function strictIndexOf(array2, value2, fromIndex) { + var index2 = fromIndex - 1, length2 = array2.length; + while (++index2 < length2) { + if (array2[index2] === value2) { + return index2; + } + } + return -1; + } + function baseIndexOf(array2, value2, fromIndex) { + return value2 === value2 ? strictIndexOf(array2, value2, fromIndex) : baseFindIndex(array2, baseIsNaN, fromIndex); + } + function arrayIncludes(array2, value2) { + var length2 = array2 == null ? 0 : array2.length; + return !!length2 && baseIndexOf(array2, value2, 0) > -1; + } + function keys$1(object2) { + return isArrayLike(object2) ? arrayLikeKeys(object2) : baseKeys(object2); + } + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; + function isKey(value2, object2) { + if (isArray$1(value2)) { + return false; + } + var type2 = typeof value2; + if (type2 == "number" || type2 == "symbol" || type2 == "boolean" || value2 == null || isSymbol(value2)) { + return true; + } + return reIsPlainProp.test(value2) || !reIsDeepProp.test(value2) || object2 != null && value2 in Object(object2); + } + var MAX_MEMOIZE_SIZE = 500; + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; + } + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = memoizeCapped(function(string2) { + var result = []; + if (string2.charCodeAt(0) === 46) { + result.push(""); + } + string2.replace(rePropName, function(match, number2, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number2 || match); + }); + return result; + }); + const stringToPath$1 = stringToPath; + function toString$1(value2) { + return value2 == null ? "" : baseToString(value2); + } + function castPath(value2, object2) { + if (isArray$1(value2)) { + return value2; + } + return isKey(value2, object2) ? [value2] : stringToPath$1(toString$1(value2)); + } + var INFINITY$1 = 1 / 0; + function toKey(value2) { + if (typeof value2 == "string" || isSymbol(value2)) { + return value2; + } + var result = value2 + ""; + return result == "0" && 1 / value2 == -INFINITY$1 ? "-0" : result; + } + function baseGet(object2, path2) { + path2 = castPath(path2, object2); + var index2 = 0, length2 = path2.length; + while (object2 != null && index2 < length2) { + object2 = object2[toKey(path2[index2++])]; + } + return index2 && index2 == length2 ? object2 : void 0; + } + function get$1(object2, path2, defaultValue) { + var result = object2 == null ? void 0 : baseGet(object2, path2); + return result === void 0 ? defaultValue : result; + } + function arrayPush(array2, values2) { + var index2 = -1, length2 = values2.length, offset = array2.length; + while (++index2 < length2) { + array2[offset + index2] = values2[index2]; + } + return array2; + } + var spreadableSymbol = Symbol$2 ? Symbol$2.isConcatSpreadable : void 0; + function isFlattenable(value2) { + return isArray$1(value2) || isArguments$1(value2) || !!(spreadableSymbol && value2 && value2[spreadableSymbol]); + } + function baseFlatten(array2, depth, predicate, isStrict, result) { + var index2 = -1, length2 = array2.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index2 < length2) { + var value2 = array2[index2]; + if (depth > 0 && predicate(value2)) { + if (depth > 1) { + baseFlatten(value2, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value2); + } + } else if (!isStrict) { + result[result.length] = value2; + } + } + return result; + } + function flatten(array2) { + var length2 = array2 == null ? 0 : array2.length; + return length2 ? baseFlatten(array2, 1) : []; + } + function flatRest(func) { + return setToString$1(overRest(func, void 0, flatten), func + ""); + } + function arrayReduce(array2, iteratee, accumulator, initAccum) { + var index2 = -1, length2 = array2 == null ? 0 : array2.length; + if (initAccum && length2) { + accumulator = array2[++index2]; + } + while (++index2 < length2) { + accumulator = iteratee(accumulator, array2[index2], index2, array2); + } + return accumulator; + } + function baseAssign(object2, source) { + return object2 && copyObject(source, keys$1(source), object2); + } + function baseAssignIn(object2, source) { + return object2 && copyObject(source, keysIn(source), object2); + } + function arrayFilter(array2, predicate) { + var index2 = -1, length2 = array2 == null ? 0 : array2.length, resIndex = 0, result = []; + while (++index2 < length2) { + var value2 = array2[index2]; + if (predicate(value2, index2, array2)) { + result[resIndex++] = value2; + } + } + return result; + } + function stubArray() { + return []; + } + var objectProto$5 = Object.prototype; + var propertyIsEnumerable = objectProto$5.propertyIsEnumerable; + var nativeGetSymbols$1 = Object.getOwnPropertySymbols; + var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object2) { + if (object2 == null) { + return []; + } + object2 = Object(object2); + return arrayFilter(nativeGetSymbols$1(object2), function(symbol) { + return propertyIsEnumerable.call(object2, symbol); + }); + }; + const getSymbols$1 = getSymbols; + function copySymbols(source, object2) { + return copyObject(source, getSymbols$1(source), object2); + } + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object2) { + var result = []; + while (object2) { + arrayPush(result, getSymbols$1(object2)); + object2 = getPrototype$1(object2); + } + return result; + }; + const getSymbolsIn$1 = getSymbolsIn; + function copySymbolsIn(source, object2) { + return copyObject(source, getSymbolsIn$1(source), object2); + } + function baseGetAllKeys(object2, keysFunc, symbolsFunc) { + var result = keysFunc(object2); + return isArray$1(object2) ? result : arrayPush(result, symbolsFunc(object2)); + } + function getAllKeys(object2) { + return baseGetAllKeys(object2, keys$1, getSymbols$1); + } + function getAllKeysIn(object2) { + return baseGetAllKeys(object2, keysIn, getSymbolsIn$1); + } + var objectProto$4 = Object.prototype; + var hasOwnProperty$5 = objectProto$4.hasOwnProperty; + function initCloneArray(array2) { + var length2 = array2.length, result = new array2.constructor(length2); + if (length2 && typeof array2[0] == "string" && hasOwnProperty$5.call(array2, "index")) { + result.index = array2.index; + result.input = array2.input; + } + return result; + } + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + var reFlags = /\w*$/; + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0; + function cloneSymbol(symbol) { + return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {}; + } + var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]"; + var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]"; + function initCloneByTag(object2, tag, isDeep) { + var Ctor = object2.constructor; + switch (tag) { + case arrayBufferTag$2: + return cloneArrayBuffer(object2); + case boolTag$2: + case dateTag$2: + return new Ctor(+object2); + case dataViewTag$2: + return cloneDataView(object2, isDeep); + case float32Tag$1: + case float64Tag$1: + case int8Tag$1: + case int16Tag$1: + case int32Tag$1: + case uint8Tag$1: + case uint8ClampedTag$1: + case uint16Tag$1: + case uint32Tag$1: + return cloneTypedArray(object2, isDeep); + case mapTag$3: + return new Ctor(); + case numberTag$2: + case stringTag$2: + return new Ctor(object2); + case regexpTag$2: + return cloneRegExp(object2); + case setTag$3: + return new Ctor(); + case symbolTag$2: + return cloneSymbol(object2); + } + } + var mapTag$2 = "[object Map]"; + function baseIsMap(value2) { + return isObjectLike(value2) && getTag$1(value2) == mapTag$2; + } + var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap; + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + const isMap$1 = isMap; + var setTag$2 = "[object Set]"; + function baseIsSet(value2) { + return isObjectLike(value2) && getTag$1(value2) == setTag$2; + } + var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet; + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + const isSet$1 = isSet; + var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$2 = 4; + var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]"; + var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; + var cloneableTags = {}; + cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + function baseClone(value2, bitmask, customizer, key, object2, stack) { + var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$2; + if (customizer) { + result = object2 ? customizer(value2, key, object2, stack) : customizer(value2); + } + if (result !== void 0) { + return result; + } + if (!isObject$1(value2)) { + return value2; + } + var isArr = isArray$1(value2); + if (isArr) { + result = initCloneArray(value2); + if (!isDeep) { + return copyArray(value2, result); + } + } else { + var tag = getTag$1(value2), isFunc = tag == funcTag || tag == genTag; + if (isBuffer$1(value2)) { + return cloneBuffer(value2, isDeep); + } + if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object2) { + result = isFlat || isFunc ? {} : initCloneObject(value2); + if (!isDeep) { + return isFlat ? copySymbolsIn(value2, baseAssignIn(result, value2)) : copySymbols(value2, baseAssign(result, value2)); + } + } else { + if (!cloneableTags[tag]) { + return object2 ? value2 : {}; + } + result = initCloneByTag(value2, tag, isDeep); + } + } + stack || (stack = new Stack()); + var stacked = stack.get(value2); + if (stacked) { + return stacked; + } + stack.set(value2, result); + if (isSet$1(value2)) { + value2.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value2, stack)); + }); + } else if (isMap$1(value2)) { + value2.forEach(function(subValue, key2) { + result.set(key2, baseClone(subValue, bitmask, customizer, key2, value2, stack)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys$1; + var props = isArr ? void 0 : keysFunc(value2); + arrayEach(props || value2, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value2[key2]; + } + assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value2, stack)); + }); + return result; + } + var CLONE_SYMBOLS_FLAG$1 = 4; + function clone$1(value2) { + return baseClone(value2, CLONE_SYMBOLS_FLAG$1); + } + var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; + function cloneDeep(value2) { + return baseClone(value2, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function setCacheAdd(value2) { + this.__data__.set(value2, HASH_UNDEFINED); + return this; + } + function setCacheHas(value2) { + return this.__data__.has(value2); + } + function SetCache(values2) { + var index2 = -1, length2 = values2 == null ? 0 : values2.length; + this.__data__ = new MapCache(); + while (++index2 < length2) { + this.add(values2[index2]); + } + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function arraySome(array2, predicate) { + var index2 = -1, length2 = array2 == null ? 0 : array2.length; + while (++index2 < length2) { + if (predicate(array2[index2], index2, array2)) { + return true; + } + } + return false; + } + function cacheHas(cache, key) { + return cache.has(key); + } + var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2; + function equalArrays(array2, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array2.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack.get(array2); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array2; + } + var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0; + stack.set(array2, other); + stack.set(other, array2); + while (++index2 < arrLength) { + var arrValue = array2[index2], othValue = other[index2]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index2, other, array2, stack) : customizer(arrValue, othValue, index2, array2, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + stack["delete"](array2); + stack["delete"](other); + return result; + } + function mapToArray(map2) { + var index2 = -1, result = Array(map2.size); + map2.forEach(function(value2, key) { + result[++index2] = [key, value2]; + }); + return result; + } + function setToArray(set2) { + var index2 = -1, result = Array(set2.size); + set2.forEach(function(value2) { + result[++index2] = value2; + }); + return result; + } + var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2; + var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]"; + var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function equalByTag(object2, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object2.byteLength != other.byteLength || object2.byteOffset != other.byteOffset) { + return false; + } + object2 = object2.buffer; + other = other.buffer; + case arrayBufferTag: + if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array$2(object2), new Uint8Array$2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object2, +other); + case errorTag: + return object2.name == other.name && object2.message == other.message; + case regexpTag: + case stringTag: + return object2 == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4; + convert || (convert = setToArray); + if (object2.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object2); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG$2; + stack.set(object2, other); + var result = equalArrays(convert(object2), convert(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object2); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object2) == symbolValueOf.call(other); + } + } + return false; + } + var COMPARE_PARTIAL_FLAG$3 = 1; + var objectProto$3 = Object.prototype; + var hasOwnProperty$4 = objectProto$3.hasOwnProperty; + function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object2), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index2 = objLength; + while (index2--) { + var key = objProps[index2]; + if (!(isPartial ? key in other : hasOwnProperty$4.call(other, key))) { + return false; + } + } + var objStacked = stack.get(object2); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object2; + } + var result = true; + stack.set(object2, other); + stack.set(other, object2); + var skipCtor = isPartial; + while (++index2 < objLength) { + key = objProps[index2]; + var objValue = object2[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object2, stack) : customizer(objValue, othValue, key, object2, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object2.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object2 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object2); + stack["delete"](other); + return result; + } + var COMPARE_PARTIAL_FLAG$2 = 1; + var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]"; + var objectProto$2 = Object.prototype; + var hasOwnProperty$3 = objectProto$2.hasOwnProperty; + function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray$1(object2), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag$1(object2), othTag = othIsArr ? arrayTag : getTag$1(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer$1(object2)) { + if (!isBuffer$1(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray$1(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) { + var objIsWrapped = objIsObj && hasOwnProperty$3.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$3.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object2, other, bitmask, customizer, equalFunc, stack); + } + function baseIsEqual(value2, other, bitmask, customizer, stack) { + if (value2 === other) { + return true; + } + if (value2 == null || other == null || !isObjectLike(value2) && !isObjectLike(other)) { + return value2 !== value2 && other !== other; + } + return baseIsEqualDeep(value2, other, bitmask, customizer, baseIsEqual, stack); + } + var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2; + function baseIsMatch(object2, source, matchData, customizer) { + var index2 = matchData.length, length2 = index2, noCustomizer = !customizer; + if (object2 == null) { + return !length2; + } + object2 = Object(object2); + while (index2--) { + var data = matchData[index2]; + if (noCustomizer && data[2] ? data[1] !== object2[data[0]] : !(data[0] in object2)) { + return false; + } + } + while (++index2 < length2) { + data = matchData[index2]; + var key = data[0], objValue = object2[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object2)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object2, source, stack); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) { + return false; + } + } + } + return true; + } + function isStrictComparable(value2) { + return value2 === value2 && !isObject$1(value2); + } + function getMatchData(object2) { + var result = keys$1(object2), length2 = result.length; + while (length2--) { + var key = result[length2], value2 = object2[key]; + result[length2] = [key, value2, isStrictComparable(value2)]; + } + return result; + } + function matchesStrictComparable(key, srcValue) { + return function(object2) { + if (object2 == null) { + return false; + } + return object2[key] === srcValue && (srcValue !== void 0 || key in Object(object2)); + }; + } + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object2) { + return object2 === source || baseIsMatch(object2, source, matchData); + }; + } + function baseHasIn(object2, key) { + return object2 != null && key in Object(object2); + } + function hasPath(object2, path2, hasFunc) { + path2 = castPath(path2, object2); + var index2 = -1, length2 = path2.length, result = false; + while (++index2 < length2) { + var key = toKey(path2[index2]); + if (!(result = object2 != null && hasFunc(object2, key))) { + break; + } + object2 = object2[key]; + } + if (result || ++index2 != length2) { + return result; + } + length2 = object2 == null ? 0 : object2.length; + return !!length2 && isLength(length2) && isIndex(key, length2) && (isArray$1(object2) || isArguments$1(object2)); + } + function hasIn(object2, path2) { + return object2 != null && hasPath(object2, path2, baseHasIn); + } + var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + function baseMatchesProperty(path2, srcValue) { + if (isKey(path2) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path2), srcValue); + } + return function(object2) { + var objValue = get$1(object2, path2); + return objValue === void 0 && objValue === srcValue ? hasIn(object2, path2) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + function baseProperty(key) { + return function(object2) { + return object2 == null ? void 0 : object2[key]; + }; + } + function basePropertyDeep(path2) { + return function(object2) { + return baseGet(object2, path2); + }; + } + function property(path2) { + return isKey(path2) ? baseProperty(toKey(path2)) : basePropertyDeep(path2); + } + function baseIteratee(value2) { + if (typeof value2 == "function") { + return value2; + } + if (value2 == null) { + return identity; + } + if (typeof value2 == "object") { + return isArray$1(value2) ? baseMatchesProperty(value2[0], value2[1]) : baseMatches(value2); + } + return property(value2); + } + function baseForOwn(object2, iteratee) { + return object2 && baseFor$1(object2, iteratee, keys$1); + } + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length2 = collection.length, index2 = fromRight ? length2 : -1, iterable = Object(collection); + while (fromRight ? index2-- : ++index2 < length2) { + if (iteratee(iterable[index2], index2, iterable) === false) { + break; + } + } + return collection; + }; + } + var baseEach = createBaseEach(baseForOwn); + const baseEach$1 = baseEach; + var now = function() { + return root$1.Date.now(); + }; + const now$1 = now; + var objectProto$1 = Object.prototype; + var hasOwnProperty$2 = objectProto$1.hasOwnProperty; + var defaults = baseRest(function(object2, sources) { + object2 = Object(object2); + var index2 = -1; + var length2 = sources.length; + var guard = length2 > 2 ? sources[2] : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length2 = 1; + } + while (++index2 < length2) { + var source = sources[index2]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value2 = object2[key]; + if (value2 === void 0 || eq(value2, objectProto$1[key]) && !hasOwnProperty$2.call(object2, key)) { + object2[key] = source[key]; + } + } + } + return object2; + }); + const defaults$1 = defaults; + function arrayIncludesWith(array2, value2, comparator) { + var index2 = -1, length2 = array2 == null ? 0 : array2.length; + while (++index2 < length2) { + if (comparator(value2, array2[index2])) { + return true; + } + } + return false; + } + function last(array2) { + var length2 = array2 == null ? 0 : array2.length; + return length2 ? array2[length2 - 1] : void 0; + } + function castFunction(value2) { + return typeof value2 == "function" ? value2 : identity; + } + function forEach(collection, iteratee) { + var func = isArray$1(collection) ? arrayEach : baseEach$1; + return func(collection, castFunction(iteratee)); + } + function baseFilter(collection, predicate) { + var result = []; + baseEach$1(collection, function(value2, index2, collection2) { + if (predicate(value2, index2, collection2)) { + result.push(value2); + } + }); + return result; + } + function filter(collection, predicate) { + var func = isArray$1(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate)); + } + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate); + collection = keys$1(collection); + predicate = function(key) { + return iteratee(iterable[key], key, iterable); + }; + } + var index2 = findIndexFunc(collection, predicate, fromIndex); + return index2 > -1 ? iterable[iteratee ? collection[index2] : index2] : void 0; + }; + } + var nativeMax$1 = Math.max; + function findIndex(array2, predicate, fromIndex) { + var length2 = array2 == null ? 0 : array2.length; + if (!length2) { + return -1; + } + var index2 = fromIndex == null ? 0 : toInteger(fromIndex); + if (index2 < 0) { + index2 = nativeMax$1(length2 + index2, 0); + } + return baseFindIndex(array2, baseIteratee(predicate), index2); + } + var find$1 = createFind(findIndex); + const find$2 = find$1; + function baseMap(collection, iteratee) { + var index2 = -1, result = isArrayLike(collection) ? Array(collection.length) : []; + baseEach$1(collection, function(value2, key, collection2) { + result[++index2] = iteratee(value2, key, collection2); + }); + return result; + } + function map(collection, iteratee) { + var func = isArray$1(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee)); + } + function forIn(object2, iteratee) { + return object2 == null ? object2 : baseFor$1(object2, castFunction(iteratee), keysIn); + } + function forOwn(object2, iteratee) { + return object2 && baseForOwn(object2, castFunction(iteratee)); + } + function baseGt(value2, other) { + return value2 > other; + } + var objectProto = Object.prototype; + var hasOwnProperty$1 = objectProto.hasOwnProperty; + function baseHas(object2, key) { + return object2 != null && hasOwnProperty$1.call(object2, key); + } + function has(object2, path2) { + return object2 != null && hasPath(object2, path2, baseHas); + } + function baseValues(object2, props) { + return arrayMap(props, function(key) { + return object2[key]; + }); + } + function values(object2) { + return object2 == null ? [] : baseValues(object2, keys$1(object2)); + } + function isUndefined(value2) { + return value2 === void 0; + } + function baseLt(value2, other) { + return value2 < other; + } + function mapValues(object2, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee); + baseForOwn(object2, function(value2, key, object3) { + baseAssignValue(result, key, iteratee(value2, key, object3)); + }); + return result; + } + function baseExtremum(array2, iteratee, comparator) { + var index2 = -1, length2 = array2.length; + while (++index2 < length2) { + var value2 = array2[index2], current = iteratee(value2); + if (current != null && (computed === void 0 ? current === current && !isSymbol(current) : comparator(current, computed))) { + var computed = current, result = value2; + } + } + return result; + } + function max$1(array2) { + return array2 && array2.length ? baseExtremum(array2, identity, baseGt) : void 0; + } + function min$1(array2) { + return array2 && array2.length ? baseExtremum(array2, identity, baseLt) : void 0; + } + function minBy(array2, iteratee) { + return array2 && array2.length ? baseExtremum(array2, baseIteratee(iteratee), baseLt) : void 0; + } + function baseSet(object2, path2, value2, customizer) { + if (!isObject$1(object2)) { + return object2; + } + path2 = castPath(path2, object2); + var index2 = -1, length2 = path2.length, lastIndex = length2 - 1, nested = object2; + while (nested != null && ++index2 < length2) { + var key = toKey(path2[index2]), newValue = value2; + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return object2; + } + if (index2 != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : void 0; + if (newValue === void 0) { + newValue = isObject$1(objValue) ? objValue : isIndex(path2[index2 + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object2; + } + function basePickBy(object2, paths, predicate) { + var index2 = -1, length2 = paths.length, result = {}; + while (++index2 < length2) { + var path2 = paths[index2], value2 = baseGet(object2, path2); + if (predicate(value2, path2)) { + baseSet(result, castPath(path2, object2), value2); + } + } + return result; + } + function baseSortBy(array2, comparer) { + var length2 = array2.length; + array2.sort(comparer); + while (length2--) { + array2[length2] = array2[length2].value; + } + return array2; + } + function compareAscending(value2, other) { + if (value2 !== other) { + var valIsDefined = value2 !== void 0, valIsNull = value2 === null, valIsReflexive = value2 === value2, valIsSymbol = isSymbol(value2); + var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); + if (!othIsNull && !othIsSymbol && !valIsSymbol && value2 > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { + return 1; + } + if (!valIsNull && !valIsSymbol && !othIsSymbol && value2 < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { + return -1; + } + } + return 0; + } + function compareMultiple(object2, other, orders) { + var index2 = -1, objCriteria = object2.criteria, othCriteria = other.criteria, length2 = objCriteria.length, ordersLength = orders.length; + while (++index2 < length2) { + var result = compareAscending(objCriteria[index2], othCriteria[index2]); + if (result) { + if (index2 >= ordersLength) { + return result; + } + var order2 = orders[index2]; + return result * (order2 == "desc" ? -1 : 1); + } + } + return object2.index - other.index; + } + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray$1(iteratee)) { + return function(value2) { + return baseGet(value2, iteratee.length === 1 ? iteratee[0] : iteratee); + }; + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index2 = -1; + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + var result = baseMap(collection, function(value2, key, collection2) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value2); + }); + return { "criteria": criteria, "index": ++index2, "value": value2 }; + }); + return baseSortBy(result, function(object2, other) { + return compareMultiple(object2, other, orders); + }); + } + function basePick(object2, paths) { + return basePickBy(object2, paths, function(value2, path2) { + return hasIn(object2, path2); + }); + } + var pick = flatRest(function(object2, paths) { + return object2 == null ? {} : basePick(object2, paths); + }); + const pick$1 = pick; + var nativeCeil = Math.ceil, nativeMax = Math.max; + function baseRange(start2, end2, step, fromRight) { + var index2 = -1, length2 = nativeMax(nativeCeil((end2 - start2) / (step || 1)), 0), result = Array(length2); + while (length2--) { + result[fromRight ? length2 : ++index2] = start2; + start2 += step; + } + return result; + } + function createRange(fromRight) { + return function(start2, end2, step) { + if (step && typeof step != "number" && isIterateeCall(start2, end2, step)) { + end2 = step = void 0; + } + start2 = toFinite(start2); + if (end2 === void 0) { + end2 = start2; + start2 = 0; + } else { + end2 = toFinite(end2); + } + step = step === void 0 ? start2 < end2 ? 1 : -1 : toFinite(step); + return baseRange(start2, end2, step, fromRight); + }; + } + var range = createRange(); + const range$1 = range; + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value2, index2, collection2) { + accumulator = initAccum ? (initAccum = false, value2) : iteratee(accumulator, value2, index2, collection2); + }); + return accumulator; + } + function reduce(collection, iteratee, accumulator) { + var func = isArray$1(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; + return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1); + } + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length2 = iteratees.length; + if (length2 > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length2 > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + const sortBy$1 = sortBy; + var INFINITY = 1 / 0; + var createSet = !(Set$2 && 1 / setToArray(new Set$2([, -0]))[1] == INFINITY) ? noop : function(values2) { + return new Set$2(values2); + }; + const createSet$1 = createSet; + var LARGE_ARRAY_SIZE = 200; + function baseUniq(array2, iteratee, comparator) { + var index2 = -1, includes2 = arrayIncludes, length2 = array2.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes2 = arrayIncludesWith; + } else if (length2 >= LARGE_ARRAY_SIZE) { + var set2 = iteratee ? null : createSet$1(array2); + if (set2) { + return setToArray(set2); + } + isCommon = false; + includes2 = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index2 < length2) { + var value2 = array2[index2], computed = iteratee ? iteratee(value2) : value2; + value2 = comparator || value2 !== 0 ? value2 : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value2); + } else if (!includes2(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value2); + } + } + return result; + } + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + const union$1 = union; + var idCounter = 0; + function uniqueId(prefix) { + var id2 = ++idCounter; + return toString$1(prefix) + id2; + } + function baseZipObject(props, values2, assignFunc) { + var index2 = -1, length2 = props.length, valsLength = values2.length, result = {}; + while (++index2 < length2) { + var value2 = index2 < valsLength ? values2[index2] : void 0; + assignFunc(result, props[index2], value2); + } + return result; + } + function zipObject(props, values2) { + return baseZipObject(props || [], values2 || [], assignValue); + } + var DEFAULT_EDGE_NAME = "\0"; + var GRAPH_NODE = "\0"; + var EDGE_KEY_DELIM = ""; + class Graph { + constructor(opts = {}) { + this._isDirected = has(opts, "directed") ? opts.directed : true; + this._isMultigraph = has(opts, "multigraph") ? opts.multigraph : false; + this._isCompound = has(opts, "compound") ? opts.compound : false; + this._label = void 0; + this._defaultNodeLabelFn = constant$2(void 0); + this._defaultEdgeLabelFn = constant$2(void 0); + this._nodes = {}; + if (this._isCompound) { + this._parent = {}; + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + this._in = {}; + this._preds = {}; + this._out = {}; + this._sucs = {}; + this._edgeObjs = {}; + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction(newDefault)) { + newDefault = constant$2(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys$1(this._nodes); + } + sources() { + var self2 = this; + return filter(this.nodes(), function(v) { + return isEmpty(self2._in[v]); + }); + } + sinks() { + var self2 = this; + return filter(this.nodes(), function(v) { + return isEmpty(self2._out[v]); + }); + } + setNodes(vs, value2) { + var args = arguments; + var self2 = this; + forEach(vs, function(v) { + if (args.length > 1) { + self2.setNode(v, value2); + } else { + self2.setNode(v); + } + }); + return this; + } + setNode(v, value2) { + if (has(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value2; + } + return this; + } + this._nodes[v] = arguments.length > 1 ? value2 : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has(this._nodes, v); + } + removeNode(v) { + var self2 = this; + if (has(this._nodes, v)) { + var removeEdge = function(e) { + self2.removeEdge(self2._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach(this.children(v), function(child) { + self2.setParent(child); + }); + delete this._children[v]; + } + forEach(keys$1(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach(keys$1(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error("Cannot set parent in a non-compound graph"); + } + if (isUndefined(parent)) { + parent = GRAPH_NODE; + } else { + parent += ""; + for (var ancestor = parent; !isUndefined(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error("Setting " + parent + " as parent of " + v + " would create a cycle"); + } + } + this.setNode(parent); + } + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined(v)) { + v = GRAPH_NODE; + } + if (this._isCompound) { + var children2 = this._children[v]; + if (children2) { + return keys$1(children2); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys$1(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys$1(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return union$1(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter2) { + var copy2 = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound + }); + copy2.setGraph(this.graph()); + var self2 = this; + forEach(this._nodes, function(value2, v) { + if (filter2(v)) { + copy2.setNode(v, value2); + } + }); + forEach(this._edgeObjs, function(e) { + if (copy2.hasNode(e.v) && copy2.hasNode(e.w)) { + copy2.setEdge(e, self2.edge(e)); + } + }); + var parents2 = {}; + function findParent(v) { + var parent = self2.parent(v); + if (parent === void 0 || copy2.hasNode(parent)) { + parents2[v] = parent; + return parent; + } else if (parent in parents2) { + return parents2[parent]; + } else { + return findParent(parent); + } + } + if (this._isCompound) { + forEach(copy2.nodes(), function(v) { + copy2.setParent(v, findParent(v)); + }); + } + return copy2; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction(newDefault)) { + newDefault = constant$2(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values(this._edgeObjs); + } + setPath(vs, value2) { + var self2 = this; + var args = arguments; + reduce(vs, function(v, w2) { + if (args.length > 1) { + self2.setEdge(v, w2, value2); + } else { + self2.setEdge(v, w2); + } + return w2; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w2, name2, value2; + var valueSpecified = false; + var arg0 = arguments[0]; + if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { + v = arg0.v; + w2 = arg0.w; + name2 = arg0.name; + if (arguments.length === 2) { + value2 = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w2 = arguments[1]; + name2 = arguments[3]; + if (arguments.length > 2) { + value2 = arguments[2]; + valueSpecified = true; + } + } + v = "" + v; + w2 = "" + w2; + if (!isUndefined(name2)) { + name2 = "" + name2; + } + var e = edgeArgsToId(this._isDirected, v, w2, name2); + if (has(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value2; + } + return this; + } + if (!isUndefined(name2) && !this._isMultigraph) { + throw new Error("Cannot set a named edge when isMultigraph = false"); + } + this.setNode(v); + this.setNode(w2); + this._edgeLabels[e] = valueSpecified ? value2 : this._defaultEdgeLabelFn(v, w2, name2); + var edgeObj = edgeArgsToObj(this._isDirected, v, w2, name2); + v = edgeObj.v; + w2 = edgeObj.w; + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w2], v); + incrementOrInitEntry(this._sucs[v], w2); + this._in[w2][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w2, name2) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w2, name2); + return this._edgeLabels[e]; + } + hasEdge(v, w2, name2) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w2, name2); + return has(this._edgeLabels, e); + } + removeEdge(v, w2, name2) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w2, name2); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w2 = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w2], v); + decrementOrRemoveEntry(this._sucs[v], w2); + delete this._in[w2][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges2 = values(inV); + if (!u) { + return edges2; + } + return filter(edges2, function(edge) { + return edge.v === u; + }); + } + } + outEdges(v, w2) { + var outV = this._out[v]; + if (outV) { + var edges2 = values(outV); + if (!w2) { + return edges2; + } + return filter(edges2, function(edge) { + return edge.w === w2; + }); + } + } + nodeEdges(v, w2) { + var inEdges = this.inEdges(v, w2); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w2)); + } + } + } + Graph.prototype._nodeCount = 0; + Graph.prototype._edgeCount = 0; + function incrementOrInitEntry(map2, k) { + if (map2[k]) { + map2[k]++; + } else { + map2[k] = 1; + } + } + function decrementOrRemoveEntry(map2, k) { + if (!--map2[k]) { + delete map2[k]; + } + } + function edgeArgsToId(isDirected, v_, w_, name2) { + var v = "" + v_; + var w2 = "" + w_; + if (!isDirected && v > w2) { + var tmp = v; + v = w2; + w2 = tmp; + } + return v + EDGE_KEY_DELIM + w2 + EDGE_KEY_DELIM + (isUndefined(name2) ? DEFAULT_EDGE_NAME : name2); + } + function edgeArgsToObj(isDirected, v_, w_, name2) { + var v = "" + v_; + var w2 = "" + w_; + if (!isDirected && v > w2) { + var tmp = v; + v = w2; + w2 = tmp; + } + var edgeObj = { v, w: w2 }; + if (name2) { + edgeObj.name = name2; + } + return edgeObj; + } + function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); + } + class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return "[" + strs.join(", ") + "]"; + } + } + function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; + } + function filterOutLinks(k, v) { + if (k !== "_next" && k !== "_prev") { + return v; + } + } + var DEFAULT_WEIGHT_FN = constant$2(1); + function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state2 = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state2.graph, state2.buckets, state2.zeroIdx); + return flatten( + map(results, function(e) { + return g.outEdges(e.v, e.w); + }) + ); + } + function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + var entry; + while (g.nodeCount()) { + while (entry = sinks.dequeue()) { + removeNode(g, buckets, zeroIdx, entry); + } + while (entry = sources.dequeue()) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i2 = buckets.length - 2; i2 > 0; --i2) { + entry = buckets[i2].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + return results; + } + function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : void 0; + forEach(g.inEdges(entry.v), function(edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + forEach(g.outEdges(entry.v), function(edge) { + var weight = g.edge(edge); + var w2 = edge.w; + var wEntry = g.node(w2); + wEntry["in"] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + g.removeNode(entry.v); + return results; + } + function buildState(g, weightFn) { + var fasGraph = new Graph(); + var maxIn = 0; + var maxOut = 0; + forEach(g.nodes(), function(v) { + fasGraph.setNode(v, { v, in: 0, out: 0 }); + }); + forEach(g.edges(), function(e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); + maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight); + }); + var buckets = range$1(maxOut + maxIn + 3).map(function() { + return new List(); + }); + var zeroIdx = maxIn + 1; + forEach(fasGraph.nodes(), function(v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + return { graph: fasGraph, buckets, zeroIdx }; + } + function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry["in"]) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry); + } + } + function run$2(g) { + var fas = g.graph().acyclicer === "greedy" ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach(fas, function(e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId("rev")); + }); + function weightFn(g2) { + return function(e) { + return g2.edge(e).weight; + }; + } + } + function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + function dfs2(v) { + if (has(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach(g.outEdges(v), function(e) { + if (has(stack, e.w)) { + fas.push(e); + } else { + dfs2(e.w); + } + }); + delete stack[v]; + } + forEach(g.nodes(), dfs2); + return fas; + } + function undo$2(g) { + forEach(g.edges(), function(e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); + } + function addDummyNode(g, type2, attrs, name2) { + var v; + do { + v = uniqueId(name2); + } while (g.hasNode(v)); + attrs.dummy = type2; + g.setNode(v, attrs); + return v; + } + function simplify(g) { + var simplified = new Graph().setGraph(g.graph()); + forEach(g.nodes(), function(v) { + simplified.setNode(v, g.node(v)); + }); + forEach(g.edges(), function(e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen) + }); + }); + return simplified; + } + function asNonCompoundGraph(g) { + var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach(g.nodes(), function(v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach(g.edges(), function(e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; + } + function intersectRect$3(rect2, point2) { + var x2 = rect2.x; + var y2 = rect2.y; + var dx = point2.x - x2; + var dy = point2.y - y2; + var w2 = rect2.width / 2; + var h = rect2.height / 2; + if (!dx && !dy) { + throw new Error("Not possible to find intersection inside of the rectangle"); + } + var sx, sy; + if (Math.abs(dy) * w2 > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w2 = -w2; + } + sx = w2; + sy = w2 * dy / dx; + } + return { x: x2 + sx, y: y2 + sy }; + } + function buildLayerMatrix(g) { + var layering = map(range$1(maxRank(g) + 1), function() { + return []; + }); + forEach(g.nodes(), function(v) { + var node2 = g.node(v); + var rank2 = node2.rank; + if (!isUndefined(rank2)) { + layering[rank2][node2.order] = v; + } + }); + return layering; + } + function normalizeRanks(g) { + var min2 = min$1( + map(g.nodes(), function(v) { + return g.node(v).rank; + }) + ); + forEach(g.nodes(), function(v) { + var node2 = g.node(v); + if (has(node2, "rank")) { + node2.rank -= min2; + } + }); + } + function removeEmptyRanks(g) { + var offset = min$1( + map(g.nodes(), function(v) { + return g.node(v).rank; + }) + ); + var layers = []; + forEach(g.nodes(), function(v) { + var rank2 = g.node(v).rank - offset; + if (!layers[rank2]) { + layers[rank2] = []; + } + layers[rank2].push(v); + }); + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach(layers, function(vs, i2) { + if (isUndefined(vs) && i2 % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach(vs, function(v) { + g.node(v).rank += delta; + }); + } + }); + } + function addBorderNode$1(g, prefix, rank2, order2) { + var node2 = { + width: 0, + height: 0 + }; + if (arguments.length >= 4) { + node2.rank = rank2; + node2.order = order2; + } + return addDummyNode(g, "border", node2, prefix); + } + function maxRank(g) { + return max$1( + map(g.nodes(), function(v) { + var rank2 = g.node(v).rank; + if (!isUndefined(rank2)) { + return rank2; + } + }) + ); + } + function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach(collection, function(value2) { + if (fn(value2)) { + result.lhs.push(value2); + } else { + result.rhs.push(value2); + } + }); + return result; + } + function time(name2, fn) { + var start2 = now$1(); + try { + return fn(); + } finally { + console.log(name2 + " time: " + (now$1() - start2) + "ms"); + } + } + function notime(name2, fn) { + return fn(); + } + function addBorderSegments(g) { + function dfs2(v) { + var children2 = g.children(v); + var node2 = g.node(v); + if (children2.length) { + forEach(children2, dfs2); + } + if (has(node2, "minRank")) { + node2.borderLeft = []; + node2.borderRight = []; + for (var rank2 = node2.minRank, maxRank2 = node2.maxRank + 1; rank2 < maxRank2; ++rank2) { + addBorderNode(g, "borderLeft", "_bl", v, node2, rank2); + addBorderNode(g, "borderRight", "_br", v, node2, rank2); + } + } + } + forEach(g.children(), dfs2); + } + function addBorderNode(g, prop, prefix, sg, sgNode, rank2) { + var label = { width: 0, height: 0, rank: rank2, borderType: prop }; + var prev2 = sgNode[prop][rank2 - 1]; + var curr = addDummyNode(g, "border", label, prefix); + sgNode[prop][rank2] = curr; + g.setParent(curr, sg); + if (prev2) { + g.setEdge(prev2, curr, { weight: 1 }); + } + } + function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "lr" || rankDir === "rl") { + swapWidthHeight(g); + } + } + function undo$1(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === "bt" || rankDir === "rl") { + reverseY(g); + } + if (rankDir === "lr" || rankDir === "rl") { + swapXY(g); + swapWidthHeight(g); + } + } + function swapWidthHeight(g) { + forEach(g.nodes(), function(v) { + swapWidthHeightOne(g.node(v)); + }); + forEach(g.edges(), function(e) { + swapWidthHeightOne(g.edge(e)); + }); + } + function swapWidthHeightOne(attrs) { + var w2 = attrs.width; + attrs.width = attrs.height; + attrs.height = w2; + } + function reverseY(g) { + forEach(g.nodes(), function(v) { + reverseYOne(g.node(v)); + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + forEach(edge.points, reverseYOne); + if (has(edge, "y")) { + reverseYOne(edge); + } + }); + } + function reverseYOne(attrs) { + attrs.y = -attrs.y; + } + function swapXY(g) { + forEach(g.nodes(), function(v) { + swapXYOne(g.node(v)); + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + forEach(edge.points, swapXYOne); + if (has(edge, "x")) { + swapXYOne(edge); + } + }); + } + function swapXYOne(attrs) { + var x2 = attrs.x; + attrs.x = attrs.y; + attrs.y = x2; + } + function run$1(g) { + g.graph().dummyChains = []; + forEach(g.edges(), function(edge) { + normalizeEdge(g, edge); + }); + } + function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w2 = e.w; + var wRank = g.node(w2).rank; + var name2 = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + if (wRank === vRank + 1) + return; + g.removeEdge(e); + var dummy, attrs, i2; + for (i2 = 0, ++vRank; vRank < wRank; ++i2, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel, + edgeObj: e, + rank: vRank + }; + dummy = addDummyNode(g, "edge", attrs, "_d"); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + attrs.dummy = "edge-label"; + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name2); + if (i2 === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + g.setEdge(v, w2, { weight: edgeLabel.weight }, name2); + } + function undo(g) { + forEach(g.graph().dummyChains, function(v) { + var node2 = g.node(v); + var origLabel = node2.edgeLabel; + var w2; + g.setEdge(node2.edgeObj, origLabel); + while (node2.dummy) { + w2 = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node2.x, y: node2.y }); + if (node2.dummy === "edge-label") { + origLabel.x = node2.x; + origLabel.y = node2.y; + origLabel.width = node2.width; + origLabel.height = node2.height; + } + v = w2; + node2 = g.node(v); + } + }); + } + function longestPath(g) { + var visited = {}; + function dfs2(v) { + var label = g.node(v); + if (has(visited, v)) { + return label.rank; + } + visited[v] = true; + var rank2 = min$1( + map(g.outEdges(v), function(e) { + return dfs2(e.w) - g.edge(e).minlen; + }) + ); + if (rank2 === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank2 === void 0 || // return value of _.map([]) for Lodash 4 + rank2 === null) { + rank2 = 0; + } + return label.rank = rank2; + } + forEach(g.sources(), dfs2); + } + function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; + } + function feasibleTree(g) { + var t = new Graph({ directed: false }); + var start2 = g.nodes()[0]; + var size2 = g.nodeCount(); + t.setNode(start2, {}); + var edge, delta; + while (tightTree(t, g) < size2) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + return t; + } + function tightTree(t, g) { + function dfs2(v) { + forEach(g.nodeEdges(v), function(e) { + var edgeV = e.v, w2 = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w2) && !slack(g, e)) { + t.setNode(w2, {}); + t.setEdge(v, w2, {}); + dfs2(w2); + } + }); + } + forEach(t.nodes(), dfs2); + return t.nodeCount(); + } + function findMinSlackEdge(t, g) { + return minBy(g.edges(), function(e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); + } + function shiftRanks(t, g, delta) { + forEach(t.nodes(), function(v) { + g.node(v).rank += delta; + }); + } + function CycleException() { + } + CycleException.prototype = new Error(); + function dfs$1(g, vs, order2) { + if (!isArray$1(vs)) { + vs = [vs]; + } + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + var acc = []; + var visited = {}; + forEach(vs, function(v) { + if (!g.hasNode(v)) { + throw new Error("Graph does not have node: " + v); + } + doDfs(g, v, order2 === "post", visited, navigation, acc); + }); + return acc; + } + function doDfs(g, v, postorder2, visited, navigation, acc) { + if (!has(visited, v)) { + visited[v] = true; + if (!postorder2) { + acc.push(v); + } + forEach(navigation(v), function(w2) { + doDfs(g, w2, postorder2, visited, navigation, acc); + }); + if (postorder2) { + acc.push(v); + } + } + } + function postorder$1(g, vs) { + return dfs$1(g, vs, "post"); + } + function preorder(g, vs) { + return dfs$1(g, vs, "pre"); + } + networkSimplex.initLowLimValues = initLowLimValues; + networkSimplex.initCutValues = initCutValues; + networkSimplex.calcCutValue = calcCutValue; + networkSimplex.leaveEdge = leaveEdge; + networkSimplex.enterEdge = enterEdge; + networkSimplex.exchangeEdges = exchangeEdges; + function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + var e, f2; + while (e = leaveEdge(t)) { + f2 = enterEdge(t, g, e); + exchangeEdges(t, g, e, f2); + } + } + function initCutValues(t, g) { + var vs = postorder$1(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach(vs, function(v) { + assignCutValue(t, g, v); + }); + } + function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); + } + function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + var childIsTail = true; + var graphEdge = g.edge(child, parent); + var cutValue = 0; + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + cutValue = graphEdge.weight; + forEach(g.nodeEdges(child), function(e) { + var isOutEdge = e.v === child, other = isOutEdge ? e.w : e.v; + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, otherWeight = g.edge(e).weight; + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + return cutValue; + } + function initLowLimValues(tree, root2) { + if (arguments.length < 2) { + root2 = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root2); + } + function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + visited[v] = true; + forEach(tree.neighbors(v), function(w2) { + if (!has(visited, w2)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w2, v); + } + }); + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + delete label.parent; + } + return nextLim; + } + function leaveEdge(tree) { + return find$2(tree.edges(), function(e) { + return tree.edge(e).cutvalue < 0; + }); + } + function enterEdge(t, g, edge) { + var v = edge.v; + var w2 = edge.w; + if (!g.hasEdge(v, w2)) { + v = edge.w; + w2 = edge.v; + } + var vLabel = t.node(v); + var wLabel = t.node(w2); + var tailLabel = vLabel; + var flip = false; + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + var candidates = filter(g.edges(), function(edge2) { + return flip === isDescendant$1(t, t.node(edge2.v), tailLabel) && flip !== isDescendant$1(t, t.node(edge2.w), tailLabel); + }); + return minBy(candidates, function(edge2) { + return slack(g, edge2); + }); + } + function exchangeEdges(t, g, e, f2) { + var v = e.v; + var w2 = e.w; + t.removeEdge(v, w2); + t.setEdge(f2.v, f2.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); + } + function updateRanks(t, g) { + var root2 = find$2(t.nodes(), function(v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root2); + vs = vs.slice(1); + forEach(vs, function(v) { + var parent = t.node(v).parent, edge = g.edge(v, parent), flipped = false; + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); + } + function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); + } + function isDescendant$1(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; + } + function rank(g) { + switch (g.graph().ranker) { + case "network-simplex": + networkSimplexRanker(g); + break; + case "tight-tree": + tightTreeRanker(g); + break; + case "longest-path": + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } + } + var longestPathRanker = longestPath; + function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); + } + function networkSimplexRanker(g) { + networkSimplex(g); + } + function run(g) { + var root2 = addDummyNode(g, "root", {}, "_root"); + var depths = treeDepths(g); + var height = max$1(values(depths)) - 1; + var nodeSep = 2 * height + 1; + g.graph().nestingRoot = root2; + forEach(g.edges(), function(e) { + g.edge(e).minlen *= nodeSep; + }); + var weight = sumWeights(g) + 1; + forEach(g.children(), function(child) { + dfs(g, root2, nodeSep, weight, height, depths, child); + }); + g.graph().nodeRankFactor = nodeSep; + } + function dfs(g, root2, nodeSep, weight, height, depths, v) { + var children2 = g.children(v); + if (!children2.length) { + if (v !== root2) { + g.setEdge(root2, v, { weight: 0, minlen: nodeSep }); + } + return; + } + var top2 = addBorderNode$1(g, "_bt"); + var bottom2 = addBorderNode$1(g, "_bb"); + var label = g.node(v); + g.setParent(top2, v); + label.borderTop = top2; + g.setParent(bottom2, v); + label.borderBottom = bottom2; + forEach(children2, function(child) { + dfs(g, root2, nodeSep, weight, height, depths, child); + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + g.setEdge(top2, childTop, { + weight: thisWeight, + minlen, + nestingEdge: true + }); + g.setEdge(childBottom, bottom2, { + weight: thisWeight, + minlen, + nestingEdge: true + }); + }); + if (!g.parent(v)) { + g.setEdge(root2, top2, { weight: 0, minlen: height + depths[v] }); + } + } + function treeDepths(g) { + var depths = {}; + function dfs2(v, depth) { + var children2 = g.children(v); + if (children2 && children2.length) { + forEach(children2, function(child) { + dfs2(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach(g.children(), function(v) { + dfs2(v, 1); + }); + return depths; + } + function sumWeights(g) { + return reduce( + g.edges(), + function(acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); + } + function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); + } + function addSubgraphConstraints(g, cg, vs) { + var prev2 = {}, rootPrev; + forEach(vs, function(v) { + var child = g.parent(v), parent, prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev2[parent]; + prev2[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + } + function buildLayerGraph(g, rank2, relationship) { + var root2 = createRootNode(g), result = new Graph({ compound: true }).setGraph({ root: root2 }).setDefaultNodeLabel(function(v) { + return g.node(v); + }); + forEach(g.nodes(), function(v) { + var node2 = g.node(v), parent = g.parent(v); + if (node2.rank === rank2 || node2.minRank <= rank2 && rank2 <= node2.maxRank) { + result.setNode(v); + result.setParent(v, parent || root2); + forEach(g[relationship](v), function(e) { + var u = e.v === v ? e.w : e.v, edge = result.edge(u, v), weight = !isUndefined(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + if (has(node2, "minRank")) { + result.setNode(v, { + borderLeft: node2.borderLeft[rank2], + borderRight: node2.borderRight[rank2] + }); + } + } + }); + return result; + } + function createRootNode(g) { + var v; + while (g.hasNode(v = uniqueId("_root"))) + ; + return v; + } + function crossCount(g, layering) { + var cc = 0; + for (var i2 = 1; i2 < layering.length; ++i2) { + cc += twoLayerCrossCount(g, layering[i2 - 1], layering[i2]); + } + return cc; + } + function twoLayerCrossCount(g, northLayer, southLayer) { + var southPos = zipObject( + southLayer, + map(southLayer, function(v, i2) { + return i2; + }) + ); + var southEntries = flatten( + map(northLayer, function(v) { + return sortBy$1( + map(g.outEdges(v), function(e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + "pos" + ); + }) + ); + var firstIndex = 1; + while (firstIndex < southLayer.length) + firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map(new Array(treeSize), function() { + return 0; + }); + var cc = 0; + forEach( + // @ts-expect-error + southEntries.forEach(function(entry) { + var index2 = entry.pos + firstIndex; + tree[index2] += entry.weight; + var weightSum = 0; + while (index2 > 0) { + if (index2 % 2) { + weightSum += tree[index2 + 1]; + } + index2 = index2 - 1 >> 1; + tree[index2] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + return cc; + } + function initOrder(g) { + var visited = {}; + var simpleNodes = filter(g.nodes(), function(v) { + return !g.children(v).length; + }); + var maxRank2 = max$1( + map(simpleNodes, function(v) { + return g.node(v).rank; + }) + ); + var layers = map(range$1(maxRank2 + 1), function() { + return []; + }); + function dfs2(v) { + if (has(visited, v)) + return; + visited[v] = true; + var node2 = g.node(v); + layers[node2.rank].push(v); + forEach(g.successors(v), dfs2); + } + var orderedVs = sortBy$1(simpleNodes, function(v) { + return g.node(v).rank; + }); + forEach(orderedVs, dfs2); + return layers; + } + function barycenter(g, movable) { + return map(movable, function(v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v }; + } else { + var result = reduce( + inV, + function(acc, e) { + var edge = g.edge(e), nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight + }; + }, + { sum: 0, weight: 0 } + ); + return { + v, + barycenter: result.sum / result.weight, + weight: result.weight + }; + } + }); + } + function resolveConflicts(entries2, cg) { + var mappedEntries = {}; + forEach(entries2, function(entry, i2) { + var tmp = mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i2 + }; + if (!isUndefined(entry.barycenter)) { + tmp.barycenter = entry.barycenter; + tmp.weight = entry.weight; + } + }); + forEach(cg.edges(), function(e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined(entryV) && !isUndefined(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + var sourceSet = filter(mappedEntries, function(entry) { + return !entry.indegree; + }); + return doResolveConflicts(sourceSet); + } + function doResolveConflicts(sourceSet) { + var entries2 = []; + function handleIn(vEntry) { + return function(uEntry) { + if (uEntry.merged) { + return; + } + if (isUndefined(uEntry.barycenter) || isUndefined(vEntry.barycenter) || uEntry.barycenter >= vEntry.barycenter) { + mergeEntries(vEntry, uEntry); + } + }; + } + function handleOut(vEntry) { + return function(wEntry) { + wEntry["in"].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries2.push(entry); + forEach(entry["in"].reverse(), handleIn(entry)); + forEach(entry.out, handleOut(entry)); + } + return map( + filter(entries2, function(entry2) { + return !entry2.merged; + }), + function(entry2) { + return pick$1(entry2, ["vs", "i", "barycenter", "weight"]); + } + ); + } + function mergeEntries(target, source) { + var sum2 = 0; + var weight = 0; + if (target.weight) { + sum2 += target.barycenter * target.weight; + weight += target.weight; + } + if (source.weight) { + sum2 += source.barycenter * source.weight; + weight += source.weight; + } + target.vs = source.vs.concat(target.vs); + target.barycenter = sum2 / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; + } + function sort(entries2, biasRight) { + var parts = partition(entries2, function(entry) { + return has(entry, "barycenter"); + }); + var sortable = parts.lhs, unsortable = sortBy$1(parts.rhs, function(entry) { + return -entry.i; + }), vs = [], sum2 = 0, weight = 0, vsIndex = 0; + sortable.sort(compareWithBias(!!biasRight)); + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + forEach(sortable, function(entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum2 += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + var result = { vs: flatten(vs) }; + if (weight) { + result.barycenter = sum2 / weight; + result.weight = weight; + } + return result; + } + function consumeUnsortable(vs, unsortable, index2) { + var last$1; + while (unsortable.length && (last$1 = last(unsortable)).i <= index2) { + unsortable.pop(); + vs.push(last$1.vs); + index2++; + } + return index2; + } + function compareWithBias(bias) { + return function(entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; + } + function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node2 = g.node(v); + var bl = node2 ? node2.borderLeft : void 0; + var br = node2 ? node2.borderRight : void 0; + var subgraphs = {}; + if (bl) { + movable = filter(movable, function(w2) { + return w2 !== bl && w2 !== br; + }); + } + var barycenters = barycenter(g, movable); + forEach(barycenters, function(entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has(subgraphResult, "barycenter")) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + var entries2 = resolveConflicts(barycenters, cg); + expandSubgraphs(entries2, subgraphs); + var result = sort(entries2, biasRight); + if (bl) { + result.vs = flatten([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), brPred = g.node(g.predecessors(br)[0]); + if (!has(result, "barycenter")) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + return result; + } + function expandSubgraphs(entries2, subgraphs) { + forEach(entries2, function(entry) { + entry.vs = flatten( + entry.vs.map(function(v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); + } + function mergeBarycenters(target, other) { + if (!isUndefined(target.barycenter)) { + target.barycenter = (target.barycenter * target.weight + other.barycenter * other.weight) / (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } + } + function order(g) { + var maxRank$1 = maxRank(g), downLayerGraphs = buildLayerGraphs(g, range$1(1, maxRank$1 + 1), "inEdges"), upLayerGraphs = buildLayerGraphs(g, range$1(maxRank$1 - 1, -1, -1), "outEdges"); + var layering = initOrder(g); + assignOrder(g, layering); + var bestCC = Number.POSITIVE_INFINITY, best; + for (var i2 = 0, lastBest = 0; lastBest < 4; ++i2, ++lastBest) { + sweepLayerGraphs(i2 % 2 ? downLayerGraphs : upLayerGraphs, i2 % 4 >= 2); + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = cloneDeep(layering); + bestCC = cc; + } + } + assignOrder(g, best); + } + function buildLayerGraphs(g, ranks, relationship) { + return map(ranks, function(rank2) { + return buildLayerGraph(g, rank2, relationship); + }); + } + function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new Graph(); + forEach(layerGraphs, function(lg) { + var root2 = lg.graph().root; + var sorted = sortSubgraph(lg, root2, cg, biasRight); + forEach(sorted.vs, function(v, i2) { + lg.node(v).order = i2; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); + } + function assignOrder(g, layering) { + forEach(layering, function(layer) { + forEach(layer, function(v, i2) { + g.node(v).order = i2; + }); + }); + } + function parentDummyChains(g) { + var postorderNums = postorder(g); + forEach(g.graph().dummyChains, function(v) { + var node2 = g.node(v); + var edgeObj = node2.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path2 = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path2[pathIdx]; + var ascending2 = true; + while (v !== edgeObj.w) { + node2 = g.node(v); + if (ascending2) { + while ((pathV = path2[pathIdx]) !== lca && g.node(pathV).maxRank < node2.rank) { + pathIdx++; + } + if (pathV === lca) { + ascending2 = false; + } + } + if (!ascending2) { + while (pathIdx < path2.length - 1 && g.node(pathV = path2[pathIdx + 1]).minRank <= node2.rank) { + pathIdx++; + } + pathV = path2[pathIdx]; + } + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); + } + function findPath(g, postorderNums, v, w2) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w2].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w2].lim); + var parent; + var lca; + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + parent = w2; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + return { path: vPath.concat(wPath.reverse()), lca }; + } + function postorder(g) { + var result = {}; + var lim = 0; + function dfs2(v) { + var low = lim; + forEach(g.children(v), dfs2); + result[v] = { low, lim: lim++ }; + } + forEach(g.children(), dfs2); + return result; + } + function findType1Conflicts(g, layering) { + var conflicts = {}; + function visitLayer(prevLayer, layer) { + var k0 = 0, scanPos = 0, prevLayerLength = prevLayer.length, lastNode = last(layer); + forEach(layer, function(v, i2) { + var w2 = findOtherInnerSegmentNode(g, v), k1 = w2 ? g.node(w2).order : prevLayerLength; + if (w2 || v === lastNode) { + forEach(layer.slice(scanPos, i2 + 1), function(scanNode) { + forEach(g.predecessors(scanNode), function(u) { + var uLabel = g.node(u), uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + scanPos = i2 + 1; + k0 = k1; + } + }); + return layer; + } + reduce(layering, visitLayer); + return conflicts; + } + function findType2Conflicts(g, layering) { + var conflicts = {}; + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach(range$1(southPos, southEnd), function(i2) { + v = south[i2]; + if (g.node(v).dummy) { + forEach(g.predecessors(v), function(u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + function visitLayer(north, south) { + var prevNorthPos = -1, nextNorthPos, southPos = 0; + forEach(south, function(v, southLookahead) { + if (g.node(v).dummy === "border") { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + return south; + } + reduce(layering, visitLayer); + return conflicts; + } + function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return find$2(g.predecessors(v), function(u) { + return g.node(u).dummy; + }); + } + } + function addConflict(conflicts, v, w2) { + if (v > w2) { + var tmp = v; + v = w2; + w2 = tmp; + } + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w2] = true; + } + function hasConflict(conflicts, v, w2) { + if (v > w2) { + var tmp = v; + v = w2; + w2 = tmp; + } + return has(conflicts[v], w2); + } + function verticalAlignment(g, layering, conflicts, neighborFn) { + var root2 = {}, align = {}, pos = {}; + forEach(layering, function(layer) { + forEach(layer, function(v, order2) { + root2[v] = v; + align[v] = v; + pos[v] = order2; + }); + }); + forEach(layering, function(layer) { + var prevIdx = -1; + forEach(layer, function(v) { + var ws = neighborFn(v); + if (ws.length) { + ws = sortBy$1(ws, function(w3) { + return pos[w3]; + }); + var mp = (ws.length - 1) / 2; + for (var i2 = Math.floor(mp), il = Math.ceil(mp); i2 <= il; ++i2) { + var w2 = ws[i2]; + if (align[v] === v && prevIdx < pos[w2] && !hasConflict(conflicts, v, w2)) { + align[w2] = v; + align[v] = root2[v] = root2[w2]; + prevIdx = pos[w2]; + } + } + } + }); + }); + return { root: root2, align }; + } + function horizontalCompaction(g, layering, root2, align, reverseSep) { + var xs = {}, blockG = buildBlockGraph(g, layering, root2, reverseSep), borderType = reverseSep ? "borderLeft" : "borderRight"; + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + elem = stack.pop(); + } + } + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + function pass2(elem) { + var min2 = blockG.outEdges(elem).reduce(function(acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + var node2 = g.node(elem); + if (min2 !== Number.POSITIVE_INFINITY && node2.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min2); + } + } + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + forEach(align, function(v) { + xs[v] = xs[root2[v]]; + }); + return xs; + } + function buildBlockGraph(g, layering, root2, reverseSep) { + var blockGraph = new Graph(), graphLabel = g.graph(), sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + forEach(layering, function(layer) { + var u; + forEach(layer, function(v) { + var vRoot = root2[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root2[u], prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + return blockGraph; + } + function findSmallestWidthAlignment(g, xss) { + return minBy(values(xss), function(xs) { + var max2 = Number.NEGATIVE_INFINITY; + var min2 = Number.POSITIVE_INFINITY; + forIn(xs, function(x2, v) { + var halfWidth = width(g, v) / 2; + max2 = Math.max(x2 + halfWidth, max2); + min2 = Math.min(x2 - halfWidth, min2); + }); + return max2 - min2; + }); + } + function alignCoordinates(xss, alignTo) { + var alignToVals = values(alignTo), alignToMin = min$1(alignToVals), alignToMax = max$1(alignToVals); + forEach(["u", "d"], function(vert) { + forEach(["l", "r"], function(horiz) { + var alignment = vert + horiz, xs = xss[alignment], delta; + if (xs === alignTo) + return; + var xsVals = values(xs); + delta = horiz === "l" ? alignToMin - min$1(xsVals) : alignToMax - max$1(xsVals); + if (delta) { + xss[alignment] = mapValues(xs, function(x2) { + return x2 + delta; + }); + } + }); + }); + } + function balance(xss, align) { + return mapValues(xss.ul, function(ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = sortBy$1(map(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); + } + function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge$3(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + var xss = {}; + var adjustedLayering; + forEach(["u", "d"], function(vert) { + adjustedLayering = vert === "u" ? layering : values(layering).reverse(); + forEach(["l", "r"], function(horiz) { + if (horiz === "r") { + adjustedLayering = map(adjustedLayering, function(inner) { + return values(inner).reverse(); + }); + } + var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === "r"); + if (horiz === "r") { + xs = mapValues(xs, function(x2) { + return -x2; + }); + } + xss[vert + horiz] = xs; + }); + }); + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); + } + function sep(nodeSep, edgeSep, reverseSep) { + return function(g, v, w2) { + var vLabel = g.node(v); + var wLabel = g.node(w2); + var sum2 = 0; + var delta; + sum2 += vLabel.width / 2; + if (has(vLabel, "labelpos")) { + switch (vLabel.labelpos.toLowerCase()) { + case "l": + delta = -vLabel.width / 2; + break; + case "r": + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum2 += reverseSep ? delta : -delta; + } + delta = 0; + sum2 += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum2 += (wLabel.dummy ? edgeSep : nodeSep) / 2; + sum2 += wLabel.width / 2; + if (has(wLabel, "labelpos")) { + switch (wLabel.labelpos.toLowerCase()) { + case "l": + delta = wLabel.width / 2; + break; + case "r": + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum2 += reverseSep ? delta : -delta; + } + delta = 0; + return sum2; + }; + } + function width(g, v) { + return g.node(v).width; + } + function position$1(g) { + g = asNonCompoundGraph(g); + positionY(g); + forOwn(positionX(g), function(x2, v) { + g.node(v).x = x2; + }); + } + function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach(layering, function(layer) { + var maxHeight = max$1( + map(layer, function(v) { + return g.node(v).height; + }) + ); + forEach(layer, function(v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); + } + function layout(g, opts) { + var time$12 = opts && opts.debugTiming ? time : notime; + time$12("layout", function() { + var layoutGraph = time$12(" buildLayoutGraph", function() { + return buildLayoutGraph(g); + }); + time$12(" runLayout", function() { + runLayout(layoutGraph, time$12); + }); + time$12(" updateInputGraph", function() { + updateInputGraph(g, layoutGraph); + }); + }); + } + function runLayout(g, time2) { + time2(" makeSpaceForEdgeLabels", function() { + makeSpaceForEdgeLabels(g); + }); + time2(" removeSelfEdges", function() { + removeSelfEdges(g); + }); + time2(" acyclic", function() { + run$2(g); + }); + time2(" nestingGraph.run", function() { + run(g); + }); + time2(" rank", function() { + rank(asNonCompoundGraph(g)); + }); + time2(" injectEdgeLabelProxies", function() { + injectEdgeLabelProxies(g); + }); + time2(" removeEmptyRanks", function() { + removeEmptyRanks(g); + }); + time2(" nestingGraph.cleanup", function() { + cleanup(g); + }); + time2(" normalizeRanks", function() { + normalizeRanks(g); + }); + time2(" assignRankMinMax", function() { + assignRankMinMax(g); + }); + time2(" removeEdgeLabelProxies", function() { + removeEdgeLabelProxies(g); + }); + time2(" normalize.run", function() { + run$1(g); + }); + time2(" parentDummyChains", function() { + parentDummyChains(g); + }); + time2(" addBorderSegments", function() { + addBorderSegments(g); + }); + time2(" order", function() { + order(g); + }); + time2(" insertSelfEdges", function() { + insertSelfEdges(g); + }); + time2(" adjustCoordinateSystem", function() { + adjust(g); + }); + time2(" position", function() { + position$1(g); + }); + time2(" positionSelfEdges", function() { + positionSelfEdges(g); + }); + time2(" removeBorderNodes", function() { + removeBorderNodes(g); + }); + time2(" normalize.undo", function() { + undo(g); + }); + time2(" fixupEdgeLabelCoords", function() { + fixupEdgeLabelCoords(g); + }); + time2(" undoCoordinateSystem", function() { + undo$1(g); + }); + time2(" translateGraph", function() { + translateGraph(g); + }); + time2(" assignNodeIntersects", function() { + assignNodeIntersects(g); + }); + time2(" reversePoints", function() { + reversePointsForReversedEdges(g); + }); + time2(" acyclic.undo", function() { + undo$2(g); + }); + } + function updateInputGraph(inputGraph, layoutGraph) { + forEach(inputGraph.nodes(), function(v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + forEach(inputGraph.edges(), function(e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + inputLabel.points = layoutLabel.points; + if (has(layoutLabel, "x")) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; + } + var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"]; + var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }; + var graphAttrs = ["acyclicer", "ranker", "rankdir", "align"]; + var nodeNumAttrs = ["width", "height"]; + var nodeDefaults = { width: 0, height: 0 }; + var edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"]; + var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: "r" + }; + var edgeAttrs = ["labelpos"]; + function buildLayoutGraph(inputGraph) { + var g = new Graph({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + g.setGraph( + merge$3({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick$1(graph, graphAttrs)) + ); + forEach(inputGraph.nodes(), function(v) { + var node2 = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults$1(selectNumberAttrs(node2, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + forEach(inputGraph.edges(), function(e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge$3({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick$1(edge, edgeAttrs)) + ); + }); + return g; + } + function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach(g.edges(), function(e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== "c") { + if (graph.rankdir === "TB" || graph.rankdir === "BT") { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); + } + function injectEdgeLabelProxies(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w2 = g.node(e.w); + var label = { rank: (w2.rank - v.rank) / 2 + v.rank, e }; + addDummyNode(g, "edge-proxy", label, "_ep"); + } + }); + } + function assignRankMinMax(g) { + var maxRank2 = 0; + forEach(g.nodes(), function(v) { + var node2 = g.node(v); + if (node2.borderTop) { + node2.minRank = g.node(node2.borderTop).rank; + node2.maxRank = g.node(node2.borderBottom).rank; + maxRank2 = max$1(maxRank2, node2.maxRank); + } + }); + g.graph().maxRank = maxRank2; + } + function removeEdgeLabelProxies(g) { + forEach(g.nodes(), function(v) { + var node2 = g.node(v); + if (node2.dummy === "edge-proxy") { + g.edge(node2.e).labelRank = node2.rank; + g.removeNode(v); + } + }); + } + function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + function getExtremes(attrs) { + var x2 = attrs.x; + var y2 = attrs.y; + var w2 = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x2 - w2 / 2); + maxX = Math.max(maxX, x2 + w2 / 2); + minY = Math.min(minY, y2 - h / 2); + maxY = Math.max(maxY, y2 + h / 2); + } + forEach(g.nodes(), function(v) { + getExtremes(g.node(v)); + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (has(edge, "x")) { + getExtremes(edge); + } + }); + minX -= marginX; + minY -= marginY; + forEach(g.nodes(), function(v) { + var node2 = g.node(v); + node2.x -= minX; + node2.y -= minY; + }); + forEach(g.edges(), function(e) { + var edge = g.edge(e); + forEach(edge.points, function(p) { + p.x -= minX; + p.y -= minY; + }); + if (has(edge, "x")) { + edge.x -= minX; + } + if (has(edge, "y")) { + edge.y -= minY; + } + }); + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; + } + function assignNodeIntersects(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect$3(nodeV, p1)); + edge.points.push(intersectRect$3(nodeW, p2)); + }); + } + function fixupEdgeLabelCoords(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (has(edge, "x")) { + if (edge.labelpos === "l" || edge.labelpos === "r") { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case "l": + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case "r": + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); + } + function reversePointsForReversedEdges(g) { + forEach(g.edges(), function(e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); + } + function removeBorderNodes(g) { + forEach(g.nodes(), function(v) { + if (g.children(v).length) { + var node2 = g.node(v); + var t = g.node(node2.borderTop); + var b = g.node(node2.borderBottom); + var l = g.node(last(node2.borderLeft)); + var r = g.node(last(node2.borderRight)); + node2.width = Math.abs(r.x - l.x); + node2.height = Math.abs(b.y - t.y); + node2.x = l.x + node2.width / 2; + node2.y = t.y + node2.height / 2; + } + }); + forEach(g.nodes(), function(v) { + if (g.node(v).dummy === "border") { + g.removeNode(v); + } + }); + } + function removeSelfEdges(g) { + forEach(g.edges(), function(e) { + if (e.v === e.w) { + var node2 = g.node(e.v); + if (!node2.selfEdges) { + node2.selfEdges = []; + } + node2.selfEdges.push({ e, label: g.edge(e) }); + g.removeEdge(e); + } + }); + } + function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach(layers, function(layer) { + var orderShift = 0; + forEach(layer, function(v, i2) { + var node2 = g.node(v); + node2.order = i2 + orderShift; + forEach(node2.selfEdges, function(selfEdge) { + addDummyNode( + g, + "selfedge", + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node2.rank, + order: i2 + ++orderShift, + e: selfEdge.e, + label: selfEdge.label + }, + "_se" + ); + }); + delete node2.selfEdges; + }); + }); + } + function positionSelfEdges(g) { + forEach(g.nodes(), function(v) { + var node2 = g.node(v); + if (node2.dummy === "selfedge") { + var selfNode = g.node(node2.e.v); + var x2 = selfNode.x + selfNode.width / 2; + var y2 = selfNode.y; + var dx = node2.x - x2; + var dy = selfNode.height / 2; + g.setEdge(node2.e, node2.label); + g.removeNode(v); + node2.label.points = [ + { x: x2 + 2 * dx / 3, y: y2 - dy }, + { x: x2 + 5 * dx / 6, y: y2 - dy }, + { x: x2 + dx, y: y2 }, + { x: x2 + 5 * dx / 6, y: y2 + dy }, + { x: x2 + 2 * dx / 3, y: y2 + dy } + ]; + node2.label.x = node2.x; + node2.label.y = node2.y; + } + }); + } + function selectNumberAttrs(obj, attrs) { + return mapValues(pick$1(obj, attrs), Number); + } + function canonicalize(attrs) { + var newAttrs = {}; + forEach(attrs, function(v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; + } + function isSubgraph(g, v) { + return !!g.children(v).length; + } + function edgeToId(e) { + return escapeId(e.v) + ":" + escapeId(e.w) + ":" + escapeId(e.name); + } + var ID_DELIM = /:/g; + function escapeId(str2) { + return str2 ? String(str2).replace(ID_DELIM, "\\:") : ""; + } + function applyStyle$2(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } + } + function applyClass(dom, classFn, otherClasses) { + if (classFn) { + dom.attr("class", classFn).attr("class", otherClasses + " " + dom.attr("class")); + } + } + function applyTransition(selection2, g) { + var graph = g.graph(); + if (isPlainObject(graph)) { + var transition = graph.transition; + if (isFunction(transition)) { + return transition(selection2); + } + } + return selection2; + } + var arrows = { + normal, + vee, + undirected + }; + function setArrows(value2) { + arrows = value2; + } + function normal(parent, id2, edge, type2) { + var marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + var path2 = marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + applyStyle$2(path2, edge[type2 + "Style"]); + if (edge[type2 + "Class"]) { + path2.attr("class", edge[type2 + "Class"]); + } + } + function vee(parent, id2, edge, type2) { + var marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + var path2 = marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + applyStyle$2(path2, edge[type2 + "Style"]); + if (edge[type2 + "Class"]) { + path2.attr("class", edge[type2 + "Class"]); + } + } + function undirected(parent, id2, edge, type2) { + var marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + var path2 = marker.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + applyStyle$2(path2, edge[type2 + "Style"]); + if (edge[type2 + "Class"]) { + path2.attr("class", edge[type2 + "Class"]); + } + } + function addHtmlLabel$1(root2, node2) { + var fo = root2.append("foreignObject").attr("width", "100000"); + var div = fo.append("xhtml:div"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + var label = node2.label; + switch (typeof label) { + case "function": + div.insert(label); + break; + case "object": + div.insert(function() { + return label; + }); + break; + default: + div.html(label); + } + applyStyle$2(div, node2.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + var client = div.node().getBoundingClientRect(); + fo.attr("width", client.width).attr("height", client.height); + return fo; + } + function addSVGLabel(root2, node2) { + var domNode = root2; + domNode.node().appendChild(node2.label); + applyStyle$2(domNode, node2.labelStyle); + return domNode; + } + function addTextLabel(root2, node2) { + var domNode = root2.append("text"); + var lines = processEscapeSequences(node2.label).split("\n"); + for (var i2 = 0; i2 < lines.length; i2++) { + domNode.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(lines[i2]); + } + applyStyle$2(domNode, node2.labelStyle); + return domNode; + } + function processEscapeSequences(text2) { + var newText = ""; + var escaped = false; + var ch; + for (var i2 = 0; i2 < text2.length; ++i2) { + ch = text2[i2]; + if (escaped) { + switch (ch) { + case "n": + newText += "\n"; + break; + default: + newText += ch; + } + escaped = false; + } else if (ch === "\\") { + escaped = true; + } else { + newText += ch; + } + } + return newText; + } + function addLabel(root2, node2, location2) { + var label = node2.label; + var labelSvg = root2.append("g"); + if (node2.labelType === "svg") { + addSVGLabel(labelSvg, node2); + } else if (typeof label !== "string" || node2.labelType === "html") { + addHtmlLabel$1(labelSvg, node2); + } else { + addTextLabel(labelSvg, node2); + } + var labelBBox = labelSvg.node().getBBox(); + var y2; + switch (location2) { + case "top": + y2 = -node2.height / 2; + break; + case "bottom": + y2 = node2.height / 2 - labelBBox.height; + break; + default: + y2 = -labelBBox.height / 2; + } + labelSvg.attr("transform", "translate(" + -labelBBox.width / 2 + "," + y2 + ")"); + return labelSvg; + } + var createClusters = function(selection2, g) { + var clusters = g.nodes().filter(function(v) { + return isSubgraph(g, v); + }); + var svgClusters = selection2.selectAll("g.cluster").data(clusters, function(v) { + return v; + }); + applyTransition(svgClusters.exit(), g).style("opacity", 0).remove(); + var enterSelection = svgClusters.enter().append("g").attr("class", "cluster").attr("id", function(v) { + var node2 = g.node(v); + return node2.id; + }).style("opacity", 0).each(function(v) { + var node2 = g.node(v); + var thisGroup = d3select(this); + d3select(this).append("rect"); + var labelGroup = thisGroup.append("g").attr("class", "label"); + addLabel(labelGroup, node2, node2.clusterLabelPos); + }); + svgClusters = svgClusters.merge(enterSelection); + svgClusters = applyTransition(svgClusters, g).style("opacity", 1); + svgClusters.selectAll("rect").each(function(c2) { + var node2 = g.node(c2); + var domCluster = d3select(this); + applyStyle$2(domCluster, node2.style); + }); + return svgClusters; + }; + function setCreateClusters(value2) { + createClusters = value2; + } + let createEdgeLabels = function(selection2, g) { + var svgEdgeLabels = selection2.selectAll("g.edgeLabel").data(g.edges(), function(e) { + return edgeToId(e); + }).classed("update", true); + svgEdgeLabels.exit().remove(); + svgEdgeLabels.enter().append("g").classed("edgeLabel", true).style("opacity", 0); + svgEdgeLabels = selection2.selectAll("g.edgeLabel"); + svgEdgeLabels.each(function(e) { + var root2 = d3select(this); + root2.select(".label").remove(); + var edge = g.edge(e); + var label = addLabel(root2, g.edge(e), 0).classed("label", true); + var bbox = label.node().getBBox(); + if (edge.labelId) { + label.attr("id", edge.labelId); + } + if (!has(edge, "width")) { + edge.width = bbox.width; + } + if (!has(edge, "height")) { + edge.height = bbox.height; + } + }); + var exitSelection; + if (svgEdgeLabels.exit) { + exitSelection = svgEdgeLabels.exit(); + } else { + exitSelection = svgEdgeLabels.selectAll(null); + } + applyTransition(exitSelection, g).style("opacity", 0).remove(); + return svgEdgeLabels; + }; + function setCreateEdgeLabels(value2) { + createEdgeLabels = value2; + } + function intersectNode$1(node2, point2) { + return node2.intersect(point2); + } + var createEdgePaths = function(selection2, g, arrows2) { + var previousPaths = selection2.selectAll("g.edgePath").data(g.edges(), function(e) { + return edgeToId(e); + }).classed("update", true); + var newPaths = enter(previousPaths, g); + exit$1(previousPaths, g); + var svgPaths = previousPaths.merge !== void 0 ? previousPaths.merge(newPaths) : previousPaths; + applyTransition(svgPaths, g).style("opacity", 1); + svgPaths.each(function(e) { + var domEdge = d3select(this); + var edge = g.edge(e); + edge.elem = this; + if (edge.id) { + domEdge.attr("id", edge.id); + } + applyClass( + domEdge, + edge["class"], + (domEdge.classed("update") ? "update " : "") + "edgePath" + ); + }); + svgPaths.selectAll("path.path").each(function(e) { + var edge = g.edge(e); + edge.arrowheadId = uniqueId("arrowhead"); + var domEdge = d3select(this).attr("marker-end", function() { + return "url(" + makeFragmentRef(location.href, edge.arrowheadId) + ")"; + }).style("fill", "none"); + applyTransition(domEdge, g).attr("d", function(e3) { + return calcPoints(g, e3); + }); + applyStyle$2(domEdge, edge.style); + }); + svgPaths.selectAll("defs *").remove(); + svgPaths.selectAll("defs").each(function(e) { + var edge = g.edge(e); + var arrowhead = arrows2[edge.arrowhead]; + arrowhead(d3select(this), edge.arrowheadId, edge, "arrowhead"); + }); + return svgPaths; + }; + function setCreateEdgePaths(value2) { + createEdgePaths = value2; + } + function makeFragmentRef(url, fragmentId) { + var baseUrl = url.split("#")[0]; + return baseUrl + "#" + fragmentId; + } + function calcPoints(g, e) { + var edge = g.edge(e); + var tail = g.node(e.v); + var head2 = g.node(e.w); + var points = edge.points.slice(1, edge.points.length - 1); + points.unshift(intersectNode$1(tail, points[0])); + points.push(intersectNode$1(head2, points[points.length - 1])); + return createLine(edge, points); + } + function createLine(edge, points) { + var line2 = (line$1 || svg$2.line)().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }); + (line2.curve || line2.interpolate)(edge.curve); + return line2(points); + } + function getCoords(elem) { + var bbox = elem.getBBox(); + var matrix = elem.ownerSVGElement.getScreenCTM().inverse().multiply(elem.getScreenCTM()).translate(bbox.width / 2, bbox.height / 2); + return { x: matrix.e, y: matrix.f }; + } + function enter(svgPaths, g) { + var svgPathsEnter = svgPaths.enter().append("g").attr("class", "edgePath").style("opacity", 0); + svgPathsEnter.append("path").attr("class", "path").attr("d", function(e) { + var edge = g.edge(e); + var sourceElem = g.node(e.v).elem; + var points = range$1(edge.points.length).map(function() { + return getCoords(sourceElem); + }); + return createLine(edge, points); + }); + svgPathsEnter.append("defs"); + return svgPathsEnter; + } + function exit$1(svgPaths, g) { + var svgPathExit = svgPaths.exit(); + applyTransition(svgPathExit, g).style("opacity", 0).remove(); + } + var createNodes = function(selection2, g, shapes2) { + var simpleNodes = g.nodes().filter(function(v) { + return !isSubgraph(g, v); + }); + var svgNodes = selection2.selectAll("g.node").data(simpleNodes, function(v) { + return v; + }).classed("update", true); + svgNodes.exit().remove(); + svgNodes.enter().append("g").attr("class", "node").style("opacity", 0); + svgNodes = selection2.selectAll("g.node"); + svgNodes.each(function(v) { + var node2 = g.node(v); + var thisGroup = d3select(this); + applyClass( + thisGroup, + node2["class"], + (thisGroup.classed("update") ? "update " : "") + "node" + ); + thisGroup.select("g.label").remove(); + var labelGroup = thisGroup.append("g").attr("class", "label"); + var labelDom = addLabel(labelGroup, node2); + var shape = shapes2[node2.shape]; + var bbox = pick$1(labelDom.node().getBBox(), "width", "height"); + node2.elem = this; + if (node2.id) { + thisGroup.attr("id", node2.id); + } + if (node2.labelId) { + labelGroup.attr("id", node2.labelId); + } + if (has(node2, "width")) { + bbox.width = node2.width; + } + if (has(node2, "height")) { + bbox.height = node2.height; + } + bbox.width += node2.paddingLeft + node2.paddingRight; + bbox.height += node2.paddingTop + node2.paddingBottom; + labelGroup.attr( + "transform", + "translate(" + (node2.paddingLeft - node2.paddingRight) / 2 + "," + (node2.paddingTop - node2.paddingBottom) / 2 + ")" + ); + var root2 = d3select(this); + root2.select(".label-container").remove(); + var shapeSvg = shape(root2, bbox, node2).classed("label-container", true); + applyStyle$2(shapeSvg, node2.style); + var shapeBBox = shapeSvg.node().getBBox(); + node2.width = shapeBBox.width; + node2.height = shapeBBox.height; + }); + var exitSelection; + if (svgNodes.exit) { + exitSelection = svgNodes.exit(); + } else { + exitSelection = svgNodes.selectAll(null); + } + applyTransition(exitSelection, g).style("opacity", 0).remove(); + return svgNodes; + }; + function setCreateNodes(value2) { + createNodes = value2; + } + function positionClusters(selection2, g) { + var created = selection2.filter(function() { + return !d3select(this).classed("update"); + }); + function translate(v) { + var node2 = g.node(v); + return "translate(" + node2.x + "," + node2.y + ")"; + } + created.attr("transform", translate); + applyTransition(selection2, g).style("opacity", 1).attr("transform", translate); + applyTransition(created.selectAll("rect"), g).attr("width", function(v) { + return g.node(v).width; + }).attr("height", function(v) { + return g.node(v).height; + }).attr("x", function(v) { + var node2 = g.node(v); + return -node2.width / 2; + }).attr("y", function(v) { + var node2 = g.node(v); + return -node2.height / 2; + }); + } + function positionEdgeLabels(selection2, g) { + var created = selection2.filter(function() { + return !d3select(this).classed("update"); + }); + function translate(e) { + var edge = g.edge(e); + return has(edge, "x") ? "translate(" + edge.x + "," + edge.y + ")" : ""; + } + created.attr("transform", translate); + applyTransition(selection2, g).style("opacity", 1).attr("transform", translate); + } + function positionNodes$1(selection2, g) { + var created = selection2.filter(function() { + return !d3select(this).classed("update"); + }); + function translate(v) { + var node2 = g.node(v); + return "translate(" + node2.x + "," + node2.y + ")"; + } + created.attr("transform", translate); + applyTransition(selection2, g).style("opacity", 1).attr("transform", translate); + } + function intersectEllipse$1(node2, rx, ry, point2) { + var cx = node2.x; + var cy = node2.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; + } + function intersectCircle$1(node2, rx, point2) { + return intersectEllipse$1(node2, rx, rx, point2); + } + function intersectLine$1(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x2, y2; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign$1(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign$1(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x2 = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y2 = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x: x2, y: y2 }; + } + function sameSign$1(r1, r2) { + return r1 * r2 > 0; + } + function intersectPolygon$1(node2, polyPoints, point2) { + var x1 = node2.x; + var y1 = node2.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + var left2 = x1 - node2.width / 2 - minX; + var top2 = y1 - node2.height / 2 - minY; + for (var i2 = 0; i2 < polyPoints.length; i2++) { + var p1 = polyPoints[i2]; + var p2 = polyPoints[i2 < polyPoints.length - 1 ? i2 + 1 : 0]; + var intersect2 = intersectLine$1( + node2, + point2, + { x: left2 + p1.x, y: top2 + p1.y }, + { x: left2 + p2.x, y: top2 + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", node2); + return node2; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; + } + function intersectRect$2(node2, point2) { + var x2 = node2.x; + var y2 = node2.y; + var dx = point2.x - x2; + var dy = point2.y - y2; + var w2 = node2.width / 2; + var h = node2.height / 2; + var sx, sy; + if (Math.abs(dy) * w2 > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w2 = -w2; + } + sx = w2; + sy = dx === 0 ? 0 : w2 * dy / dx; + } + return { x: x2 + sx, y: y2 + sy }; + } + var shapes$2 = { + rect: rect$2, + ellipse, + circle: circle$2, + diamond + }; + function setShapes(value2) { + shapes$2 = value2; + } + function rect$2(parent, bbox, node2) { + var shapeSvg = parent.insert("rect", ":first-child").attr("rx", node2.rx).attr("ry", node2.ry).attr("x", -bbox.width / 2).attr("y", -bbox.height / 2).attr("width", bbox.width).attr("height", bbox.height); + node2.intersect = function(point2) { + return intersectRect$2(node2, point2); + }; + return shapeSvg; + } + function ellipse(parent, bbox, node2) { + var rx = bbox.width / 2; + var ry = bbox.height / 2; + var shapeSvg = parent.insert("ellipse", ":first-child").attr("x", -bbox.width / 2).attr("y", -bbox.height / 2).attr("rx", rx).attr("ry", ry); + node2.intersect = function(point2) { + return intersectEllipse$1(node2, rx, ry, point2); + }; + return shapeSvg; + } + function circle$2(parent, bbox, node2) { + var r = Math.max(bbox.width, bbox.height) / 2; + var shapeSvg = parent.insert("circle", ":first-child").attr("x", -bbox.width / 2).attr("y", -bbox.height / 2).attr("r", r); + node2.intersect = function(point2) { + return intersectCircle$1(node2, r, point2); + }; + return shapeSvg; + } + function diamond(parent, bbox, node2) { + var w2 = bbox.width * Math.SQRT2 / 2; + var h = bbox.height * Math.SQRT2 / 2; + var points = [ + { x: 0, y: -h }, + { x: -w2, y: 0 }, + { x: 0, y: h }, + { x: w2, y: 0 } + ]; + var shapeSvg = parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(p) { + return p.x + "," + p.y; + }).join(" ") + ); + node2.intersect = function(p) { + return intersectPolygon$1(node2, points, p); + }; + return shapeSvg; + } + function render$1() { + var fn = function(svg2, g) { + preProcessGraph(g); + var outputGroup = createOrSelectGroup(svg2, "output"); + var clustersGroup = createOrSelectGroup(outputGroup, "clusters"); + var edgePathsGroup = createOrSelectGroup(outputGroup, "edgePaths"); + var edgeLabels2 = createEdgeLabels(createOrSelectGroup(outputGroup, "edgeLabels"), g); + var nodes2 = createNodes(createOrSelectGroup(outputGroup, "nodes"), g, shapes$2); + layout(g); + positionNodes$1(nodes2, g); + positionEdgeLabels(edgeLabels2, g); + createEdgePaths(edgePathsGroup, g, arrows); + var clusters = createClusters(clustersGroup, g); + positionClusters(clusters, g); + postProcessGraph(g); + }; + fn.createNodes = function(value2) { + if (!arguments.length) + return createNodes; + setCreateNodes(value2); + return fn; + }; + fn.createClusters = function(value2) { + if (!arguments.length) + return createClusters; + setCreateClusters(value2); + return fn; + }; + fn.createEdgeLabels = function(value2) { + if (!arguments.length) + return createEdgeLabels; + setCreateEdgeLabels(value2); + return fn; + }; + fn.createEdgePaths = function(value2) { + if (!arguments.length) + return createEdgePaths; + setCreateEdgePaths(value2); + return fn; + }; + fn.shapes = function(value2) { + if (!arguments.length) + return shapes$2; + setShapes(value2); + return fn; + }; + fn.arrows = function(value2) { + if (!arguments.length) + return arrows; + setArrows(value2); + return fn; + }; + return fn; + } + var NODE_DEFAULT_ATTRS = { + paddingLeft: 10, + paddingRight: 10, + paddingTop: 10, + paddingBottom: 10, + rx: 0, + ry: 0, + shape: "rect" + }; + var EDGE_DEFAULT_ATTRS = { + arrowhead: "normal", + curve: curveLinear + }; + function preProcessGraph(g) { + g.nodes().forEach(function(v) { + var node2 = g.node(v); + if (!has(node2, "label") && !g.children(v).length) { + node2.label = v; + } + if (has(node2, "paddingX")) { + defaults$1(node2, { + paddingLeft: node2.paddingX, + paddingRight: node2.paddingX + }); + } + if (has(node2, "paddingY")) { + defaults$1(node2, { + paddingTop: node2.paddingY, + paddingBottom: node2.paddingY + }); + } + if (has(node2, "padding")) { + defaults$1(node2, { + paddingLeft: node2.padding, + paddingRight: node2.padding, + paddingTop: node2.padding, + paddingBottom: node2.padding + }); + } + defaults$1(node2, NODE_DEFAULT_ATTRS); + forEach(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(k) { + node2[k] = Number(node2[k]); + }); + if (has(node2, "width")) { + node2._prevWidth = node2.width; + } + if (has(node2, "height")) { + node2._prevHeight = node2.height; + } + }); + g.edges().forEach(function(e) { + var edge = g.edge(e); + if (!has(edge, "label")) { + edge.label = ""; + } + defaults$1(edge, EDGE_DEFAULT_ATTRS); + }); + } + function postProcessGraph(g) { + forEach(g.nodes(), function(v) { + var node2 = g.node(v); + if (has(node2, "_prevWidth")) { + node2.width = node2._prevWidth; + } else { + delete node2.width; + } + if (has(node2, "_prevHeight")) { + node2.height = node2._prevHeight; + } else { + delete node2.height; + } + delete node2._prevWidth; + delete node2._prevHeight; + }); + } + function createOrSelectGroup(root2, name2) { + var selection2 = root2.select("g." + name2); + if (selection2.empty()) { + selection2 = root2.append("g").attr("class", name2); + } + return selection2; + } + function question$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const s = (w2 + h) * 0.9; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + const shapeSvg = insertPolygonShape$2(parent, s, s, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function hexagon$1(parent, bbox, node2) { + const f2 = 4; + const h = bbox.height; + const m = h / f2; + const w2 = bbox.width + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w2 - m, y: 0 }, + { x: w2, y: -h / 2 }, + { x: w2 - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function rect_left_inv_arrow$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const points = [ + { x: -h / 2, y: 0 }, + { x: w2, y: 0 }, + { x: w2, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function lean_right$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w2 - h / 6, y: 0 }, + { x: w2 + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function lean_left$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w2 + h / 6, y: 0 }, + { x: w2 - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function trapezoid$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w2 + 2 * h / 6, y: 0 }, + { x: w2 - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function inv_trapezoid$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const points = [ + { x: h / 6, y: 0 }, + { x: w2 - h / 6, y: 0 }, + { x: w2 + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function rect_right_inv_arrow$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w2 + h / 2, y: 0 }, + { x: w2, y: -h / 2 }, + { x: w2 + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function stadium$1(parent, bbox, node2) { + const h = bbox.height; + const w2 = bbox.width + h / 4; + const shapeSvg = parent.insert("rect", ":first-child").attr("rx", h / 2).attr("ry", h / 2).attr("x", -w2 / 2).attr("y", -h / 2).attr("width", w2).attr("height", h); + node2.intersect = function(point2) { + return intersectRect$2(node2, point2); + }; + return shapeSvg; + } + function subroutine$1(parent, bbox, node2) { + const w2 = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w2, y: 0 }, + { x: w2, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w2 + 8, y: 0 }, + { x: w2 + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const shapeSvg = insertPolygonShape$2(parent, w2, h, points); + node2.intersect = function(point2) { + return intersectPolygon$1(node2, points, point2); + }; + return shapeSvg; + } + function cylinder$1(parent, bbox, node2) { + const w2 = bbox.width; + const rx = w2 / 2; + const ry = rx / (2.5 + w2 / 50); + const h = bbox.height + ry; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w2 + " 0 a " + rx + "," + ry + " 0,0,0 " + -w2 + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w2 + " 0 l 0," + -h; + const shapeSvg = parent.attr("label-offset-y", ry).insert("path", ":first-child").attr("d", shape).attr("transform", "translate(" + -w2 / 2 + "," + -(h / 2 + ry) + ")"); + node2.intersect = function(point2) { + const pos = intersectRect$2(node2, point2); + const x2 = pos.x - node2.x; + if (rx != 0 && (Math.abs(x2) < node2.width / 2 || Math.abs(x2) == node2.width / 2 && Math.abs(pos.y - node2.y) > node2.height / 2 - ry)) { + let y2 = ry * ry * (1 - x2 * x2 / (rx * rx)); + if (y2 != 0) { + y2 = Math.sqrt(y2); + } + y2 = ry - y2; + if (point2.y - node2.y > 0) { + y2 = -y2; + } + pos.y += y2; + } + return pos; + }; + return shapeSvg; + } + function addToRender(render2) { + render2.shapes().question = question$1; + render2.shapes().hexagon = hexagon$1; + render2.shapes().stadium = stadium$1; + render2.shapes().subroutine = subroutine$1; + render2.shapes().cylinder = cylinder$1; + render2.shapes().rect_left_inv_arrow = rect_left_inv_arrow$1; + render2.shapes().lean_right = lean_right$1; + render2.shapes().lean_left = lean_left$1; + render2.shapes().trapezoid = trapezoid$1; + render2.shapes().inv_trapezoid = inv_trapezoid$1; + render2.shapes().rect_right_inv_arrow = rect_right_inv_arrow$1; + } + function addToRenderV2(addShape) { + addShape({ question: question$1 }); + addShape({ hexagon: hexagon$1 }); + addShape({ stadium: stadium$1 }); + addShape({ subroutine: subroutine$1 }); + addShape({ cylinder: cylinder$1 }); + addShape({ rect_left_inv_arrow: rect_left_inv_arrow$1 }); + addShape({ lean_right: lean_right$1 }); + addShape({ lean_left: lean_left$1 }); + addShape({ trapezoid: trapezoid$1 }); + addShape({ inv_trapezoid: inv_trapezoid$1 }); + addShape({ rect_right_inv_arrow: rect_right_inv_arrow$1 }); + } + function insertPolygonShape$2(parent, w2, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + -w2 / 2 + "," + h / 2 + ")"); + } + const flowChartShapes = { + addToRender, + addToRenderV2 + }; + const conf$8 = {}; + const setConf$8 = function(cnf) { + const keys2 = Object.keys(cnf); + for (const key of keys2) { + conf$8[key] = cnf[key]; + } + }; + const addVertices$2 = function(vert, g, svgId, root2, _doc, diagObj) { + const svg2 = !root2 ? d3select(`[id="${svgId}"]`) : root2.select(`[id="${svgId}"]`); + const doc = !_doc ? document : _doc; + const keys2 = Object.keys(vert); + keys2.forEach(function(id2) { + const vertex = vert[id2]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + const styles2 = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const node2 = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = addHtmlLabel$1(svg2, node2).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles2.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(common$1.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + let radious = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + default: + _shape = "rect"; + } + log$1.warn("Adding node", vertex.id, vertex.domId); + g.setNode(diagObj.db.lookUpDomId(vertex.id), { + labelType: "svg", + labelStyle: styles2.labelStyle, + shape: _shape, + label: vertexNode, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: diagObj.db.lookUpDomId(vertex.id) + }); + }); + }; + const addEdges$2 = function(edges2, g, diagObj) { + let cnt2 = 0; + let defaultStyle2; + let defaultLabelStyle; + if (edges2.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges2.defaultStyle); + defaultStyle2 = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges2.forEach(function(edge) { + cnt2++; + const linkId = "L-" + edge.start + "-" + edge.end; + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = {}; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + let style = ""; + let labelStyle = ""; + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } else { + switch (edge.stroke) { + case "normal": + style = "fill:none"; + if (defaultStyle2 !== void 0) { + style = defaultStyle2; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + break; + case "dotted": + style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + style = " stroke-width: 3.5px;fill:none"; + break; + } + } + edgeData.style = style; + edgeData.labelStyle = labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges2.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges2.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf$8.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + edgeData.labelType = "html"; + edgeData.label = `${edge.text.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + )}`; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(common$1.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + edgeData.id = linkId; + edgeData.class = linkNameStart + " " + linkNameEnd; + edgeData.minlen = edge.length || 1; + g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt2); + }); + }; + const getClasses$5 = function(text2, diagObj) { + log$1.info("Extracting classes"); + return diagObj.db.getClasses(); + }; + const draw$i = function(text2, id2, _version, diagObj) { + log$1.info("Drawing flowchart"); + const { securityLevel, flowchart: conf2 } = getConfig$2(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + let dir2 = diagObj.db.getDirection(); + if (dir2 === void 0) { + dir2 = "TD"; + } + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir2, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs2 = diagObj.db.getSubGraphs(); + for (let i3 = subGraphs2.length - 1; i3 >= 0; i3--) { + subG = subGraphs2[i3]; + diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes); + } + const vert = diagObj.db.getVertices(); + log$1.warn("Get vertices", vert); + const edges2 = diagObj.db.getEdges(); + let i2 = 0; + for (i2 = subGraphs2.length - 1; i2 >= 0; i2--) { + subG = subGraphs2[i2]; + selectAll("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + log$1.warn( + "Setting subgraph", + subG.nodes[j], + diagObj.db.lookUpDomId(subG.nodes[j]), + diagObj.db.lookUpDomId(subG.id) + ); + g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id)); + } + } + addVertices$2(vert, g, id2, root2, doc, diagObj); + addEdges$2(edges2, g, diagObj); + const render2 = new render$1(); + flowChartShapes.addToRender(render2); + render2.arrows().none = function normal2(parent, id3, edge, type2) { + const marker = parent.append("marker").attr("id", id3).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + const path2 = marker.append("path").attr("d", "M 0 0 L 0 0 L 0 0 z"); + applyStyle$2(path2, edge[type2 + "Style"]); + }; + render2.arrows().normal = function normal2(parent, id3) { + const marker = parent.append("marker").attr("id", id3).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + }; + const svg2 = root2.select(`[id="${id2}"]`); + const element2 = root2.select("#" + id2 + " g"); + render2(element2, g); + element2.selectAll("g.node").attr("title", function() { + return diagObj.db.getTooltip(this.id); + }); + diagObj.db.indexNodes("subGraph" + i2); + for (i2 = 0; i2 < subGraphs2.length; i2++) { + subG = subGraphs2[i2]; + if (subG.title !== "undefined") { + const clusterRects = doc.querySelectorAll( + "#" + id2 + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect' + ); + const clusterEl = doc.querySelectorAll( + "#" + id2 + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]' + ); + const xPos = clusterRects[0].x.baseVal.value; + const yPos = clusterRects[0].y.baseVal.value; + const _width = clusterRects[0].width.baseVal.value; + const cluster = d3select(clusterEl[0]); + const te = cluster.select(".label"); + te.attr("transform", `translate(${xPos + _width / 2}, ${yPos + 14})`); + te.attr("id", id2 + "Text"); + for (let j = 0; j < subG.classes.length; j++) { + clusterEl[0].classList.add(subG.classes[j]); + } + } + } + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id2 + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect2 = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect2.setAttribute("rx", 0); + rect2.setAttribute("ry", 0); + rect2.setAttribute("width", dim.width); + rect2.setAttribute("height", dim.height); + label.insertBefore(rect2, label.firstChild); + } + } + setupGraphViewbox$1(g, svg2, conf2.diagramPadding, conf2.useMaxWidth); + const keys2 = Object.keys(vert); + keys2.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node2 = root2.select("#" + id2 + ' [id="' + diagObj.db.lookUpDomId(key) + '"]'); + if (node2) { + const link2 = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link2.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link2.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link2.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link2.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link2.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node2.insert(function() { + return link2; + }, ":first-child"); + const shape = node2.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node2.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); + }; + const flowRenderer = { + setConf: setConf$8, + addVertices: addVertices$2, + addEdges: addEdges$2, + getClasses: getClasses$5, + draw: draw$i + }; + function write(g) { + var json2 = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound() + }, + nodes: writeNodes(g), + edges: writeEdges(g) + }; + if (!isUndefined(g.graph())) { + json2.value = clone$1(g.graph()); + } + return json2; + } + function writeNodes(g) { + return map(g.nodes(), function(v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node2 = { v }; + if (!isUndefined(nodeValue)) { + node2.value = nodeValue; + } + if (!isUndefined(parent)) { + node2.parent = parent; + } + return node2; + }); + } + function writeEdges(g) { + return map(g.edges(), function(e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!isUndefined(e.name)) { + edge.name = e.name; + } + if (!isUndefined(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); + } + const insertMarkers$3 = (elem, markerArray, type2, id2) => { + markerArray.forEach((markerName) => { + markers$1[markerName](elem, type2, id2); + }); + }; + const extension$1 = (elem, type2, id2) => { + log$1.trace("Making markers for ", id2); + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-extensionStart").attr("class", "marker extension " + type2).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-extensionEnd").attr("class", "marker extension " + type2).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); + }; + const composition = (elem, type2, id2) => { + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-compositionStart").attr("class", "marker composition " + type2).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-compositionEnd").attr("class", "marker composition " + type2).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + }; + const aggregation = (elem, type2, id2) => { + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-aggregationStart").attr("class", "marker aggregation " + type2).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-aggregationEnd").attr("class", "marker aggregation " + type2).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + }; + const dependency = (elem, type2, id2) => { + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-dependencyStart").attr("class", "marker dependency " + type2).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-dependencyEnd").attr("class", "marker dependency " + type2).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); + }; + const lollipop = (elem, type2, id2) => { + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-lollipopStart").attr("class", "marker lollipop " + type2).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-lollipopEnd").attr("class", "marker lollipop " + type2).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6); + }; + const point$2 = (elem, type2, id2) => { + elem.append("marker").attr("id", id2 + "_" + type2 + "-pointEnd").attr("class", "marker " + type2).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id2 + "_" + type2 + "-pointStart").attr("class", "marker " + type2).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + }; + const circle$1 = (elem, type2, id2) => { + elem.append("marker").attr("id", id2 + "_" + type2 + "-circleEnd").attr("class", "marker " + type2).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id2 + "_" + type2 + "-circleStart").attr("class", "marker " + type2).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + }; + const cross = (elem, type2, id2) => { + elem.append("marker").attr("id", id2 + "_" + type2 + "-crossEnd").attr("class", "marker cross " + type2).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); + elem.append("marker").attr("id", id2 + "_" + type2 + "-crossStart").attr("class", "marker cross " + type2).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"); + }; + const barb = (elem, type2, id2) => { + elem.append("defs").append("marker").attr("id", id2 + "_" + type2 + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); + }; + const markers$1 = { + extension: extension$1, + composition, + aggregation, + dependency, + lollipop, + point: point$2, + circle: circle$1, + cross, + barb + }; + const insertMarkers$4 = insertMarkers$3; + function applyStyle$1(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } + } + function addHtmlLabel(node2) { + const fo = d3select(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node2.label; + const labelClass = node2.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '" + label + "" + ); + applyStyle$1(div, node2.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); + } + const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "
"); + log$1.info("vertexText" + vertexText); + const node2 = { + isNode, + label: decodeEntities(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node2); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } + }; + const createLabel$1 = createLabel; + function toString(node2, options2) { + var { includeImageAlt = true } = options2 || {}; + return one(node2, includeImageAlt); + } + function one(node2, includeImageAlt) { + return node2 && typeof node2 === "object" && // @ts-ignore looks like a literal. + (node2.value || // @ts-ignore looks like an image. + (includeImageAlt ? node2.alt : "") || // @ts-ignore looks like a parent. + "children" in node2 && all(node2.children, includeImageAlt) || Array.isArray(node2) && all(node2, includeImageAlt)) || ""; + } + function all(values2, includeImageAlt) { + var result = []; + var index2 = -1; + while (++index2 < values2.length) { + result[index2] = one(values2[index2], includeImageAlt); + } + return result.join(""); + } + function splice(list2, start2, remove2, items) { + const end2 = list2.length; + let chunkStart = 0; + let parameters; + if (start2 < 0) { + start2 = -start2 > end2 ? 0 : end2 + start2; + } else { + start2 = start2 > end2 ? end2 : start2; + } + remove2 = remove2 > 0 ? remove2 : 0; + if (items.length < 1e4) { + parameters = Array.from(items); + parameters.unshift(start2, remove2); + [].splice.apply(list2, parameters); + } else { + if (remove2) + [].splice.apply(list2, [start2, remove2]); + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 1e4); + parameters.unshift(start2, 0); + [].splice.apply(list2, parameters); + chunkStart += 1e4; + start2 += 1e4; + } + } + } + function push(list2, items) { + if (list2.length > 0) { + splice(list2, list2.length, 0, items); + return list2; + } + return items; + } + const hasOwnProperty = {}.hasOwnProperty; + function combineExtensions(extensions) { + const all2 = {}; + let index2 = -1; + while (++index2 < extensions.length) { + syntaxExtension(all2, extensions[index2]); + } + return all2; + } + function syntaxExtension(all2, extension2) { + let hook; + for (hook in extension2) { + const maybe = hasOwnProperty.call(all2, hook) ? all2[hook] : void 0; + const left2 = maybe || (all2[hook] = {}); + const right2 = extension2[hook]; + let code; + for (code in right2) { + if (!hasOwnProperty.call(left2, code)) + left2[code] = []; + const value2 = right2[code]; + constructs( + // @ts-expect-error Looks like a list. + left2[code], + Array.isArray(value2) ? value2 : value2 ? [value2] : [] + ); + } + } + } + function constructs(existing, list2) { + let index2 = -1; + const before = []; + while (++index2 < list2.length) { + (list2[index2].add === "after" ? existing : before).push(list2[index2]); + } + splice(existing, 0, 0, before); + } + const unicodePunctuationRegex = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/; + const asciiAlpha = regexCheck(/[A-Za-z]/); + const asciiDigit = regexCheck(/\d/); + const asciiHexDigit = regexCheck(/[\dA-Fa-f]/); + const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/); + const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/); + const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/); + function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ); + } + function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32); + } + function markdownLineEnding(code) { + return code !== null && code < -2; + } + function markdownSpace(code) { + return code === -2 || code === -1 || code === 32; + } + const unicodeWhitespace = regexCheck(/\s/); + const unicodePunctuation = regexCheck(unicodePunctuationRegex); + function regexCheck(regex) { + return check; + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)); + } + } + function factorySpace(effects, ok, type2, max2) { + const limit = max2 ? max2 - 1 : Number.POSITIVE_INFINITY; + let size2 = 0; + return start2; + function start2(code) { + if (markdownSpace(code)) { + effects.enter(type2); + return prefix(code); + } + return ok(code); + } + function prefix(code) { + if (markdownSpace(code) && size2++ < limit) { + effects.consume(code); + return prefix; + } + effects.exit(type2); + return ok(code); + } + } + const content$1 = { + tokenize: initializeContent + }; + function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ); + let previous2; + return contentStart; + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, contentStart, "linePrefix"); + } + function paragraphInitial(code) { + effects.enter("paragraph"); + return lineStart(code); + } + function lineStart(code) { + const token2 = effects.enter("chunkText", { + contentType: "text", + previous: previous2 + }); + if (previous2) { + previous2.next = token2; + } + previous2 = token2; + return data(code); + } + function data(code) { + if (code === null) { + effects.exit("chunkText"); + effects.exit("paragraph"); + effects.consume(code); + return; + } + if (markdownLineEnding(code)) { + effects.consume(code); + effects.exit("chunkText"); + return lineStart; + } + effects.consume(code); + return data; + } + } + const document$2 = { + tokenize: initializeDocument + }; + const containerConstruct = { + tokenize: tokenizeContainer + }; + function initializeDocument(effects) { + const self2 = this; + const stack = []; + let continued = 0; + let childFlow; + let childToken; + let lineStartOffset; + return start2; + function start2(code) { + if (continued < stack.length) { + const item = stack[continued]; + self2.containerState = item[1]; + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code); + } + return checkNewContainers(code); + } + function documentContinue(code) { + continued++; + if (self2.containerState._closeFlow) { + self2.containerState._closeFlow = void 0; + if (childFlow) { + closeFlow(); + } + const indexBeforeExits = self2.events.length; + let indexBeforeFlow = indexBeforeExits; + let point2; + while (indexBeforeFlow--) { + if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") { + point2 = self2.events[indexBeforeFlow][1].end; + break; + } + } + exitContainers(continued); + let index2 = indexBeforeExits; + while (index2 < self2.events.length) { + self2.events[index2][1].end = Object.assign({}, point2); + index2++; + } + splice( + self2.events, + indexBeforeFlow + 1, + 0, + self2.events.slice(indexBeforeExits) + ); + self2.events.length = index2; + return checkNewContainers(code); + } + return start2(code); + } + function checkNewContainers(code) { + if (continued === stack.length) { + if (!childFlow) { + return documentContinued(code); + } + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code); + } + self2.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ); + } + self2.containerState = {}; + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code); + } + function thereIsANewContainer(code) { + if (childFlow) + closeFlow(); + exitContainers(continued); + return documentContinued(code); + } + function thereIsNoNewContainer(code) { + self2.parser.lazy[self2.now().line] = continued !== stack.length; + lineStartOffset = self2.now().offset; + return flowStart(code); + } + function documentContinued(code) { + self2.containerState = {}; + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code); + } + function containerContinue(code) { + continued++; + stack.push([self2.currentConstruct, self2.containerState]); + return documentContinued(code); + } + function flowStart(code) { + if (code === null) { + if (childFlow) + closeFlow(); + exitContainers(0); + effects.consume(code); + return; + } + childFlow = childFlow || self2.parser.flow(self2.now()); + effects.enter("chunkFlow", { + contentType: "flow", + previous: childToken, + _tokenizer: childFlow + }); + return flowContinue(code); + } + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit("chunkFlow"), true); + exitContainers(0); + effects.consume(code); + return; + } + if (markdownLineEnding(code)) { + effects.consume(code); + writeToChild(effects.exit("chunkFlow")); + continued = 0; + self2.interrupt = void 0; + return start2; + } + effects.consume(code); + return flowContinue; + } + function writeToChild(token2, eof) { + const stream = self2.sliceStream(token2); + if (eof) + stream.push(null); + token2.previous = childToken; + if (childToken) + childToken.next = token2; + childToken = token2; + childFlow.defineSkip(token2.start); + childFlow.write(stream); + if (self2.parser.lazy[token2.start.line]) { + let index2 = childFlow.events.length; + while (index2--) { + if ( + // The token starts before the line ending… + childFlow.events[index2][1].start.offset < lineStartOffset && // …and either is not ended yet… + (!childFlow.events[index2][1].end || // …or ends after it. + childFlow.events[index2][1].end.offset > lineStartOffset) + ) { + return; + } + } + const indexBeforeExits = self2.events.length; + let indexBeforeFlow = indexBeforeExits; + let seen; + let point2; + while (indexBeforeFlow--) { + if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") { + if (seen) { + point2 = self2.events[indexBeforeFlow][1].end; + break; + } + seen = true; + } + } + exitContainers(continued); + index2 = indexBeforeExits; + while (index2 < self2.events.length) { + self2.events[index2][1].end = Object.assign({}, point2); + index2++; + } + splice( + self2.events, + indexBeforeFlow + 1, + 0, + self2.events.slice(indexBeforeExits) + ); + self2.events.length = index2; + } + } + function exitContainers(size2) { + let index2 = stack.length; + while (index2-- > size2) { + const entry = stack[index2]; + self2.containerState = entry[1]; + entry[0].exit.call(self2, effects); + } + stack.length = size2; + } + function closeFlow() { + childFlow.write([null]); + childToken = void 0; + childFlow = void 0; + self2.containerState._closeFlow = void 0; + } + } + function tokenizeContainer(effects, ok, nok) { + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + } + function classifyCharacter(code) { + if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) { + return 1; + } + if (unicodePunctuation(code)) { + return 2; + } + } + function resolveAll(constructs2, events, context) { + const called = []; + let index2 = -1; + while (++index2 < constructs2.length) { + const resolve = constructs2[index2].resolveAll; + if (resolve && !called.includes(resolve)) { + events = resolve(events, context); + called.push(resolve); + } + } + return events; + } + const attention = { + name: "attention", + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention + }; + function resolveAllAttention(events, context) { + let index2 = -1; + let open; + let group; + let text2; + let openingSequence; + let closingSequence; + let use; + let nextEvents; + let offset; + while (++index2 < events.length) { + if (events[index2][0] === "enter" && events[index2][1].type === "attentionSequence" && events[index2][1]._close) { + open = index2; + while (open--) { + if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index2][1]).charCodeAt(0)) { + if ((events[open][1]._close || events[index2][1]._open) && (events[index2][1].end.offset - events[index2][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index2][1].end.offset - events[index2][1].start.offset) % 3)) { + continue; + } + use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index2][1].end.offset - events[index2][1].start.offset > 1 ? 2 : 1; + const start2 = Object.assign({}, events[open][1].end); + const end2 = Object.assign({}, events[index2][1].start); + movePoint(start2, -use); + movePoint(end2, use); + openingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start: start2, + end: Object.assign({}, events[open][1].end) + }; + closingSequence = { + type: use > 1 ? "strongSequence" : "emphasisSequence", + start: Object.assign({}, events[index2][1].start), + end: end2 + }; + text2 = { + type: use > 1 ? "strongText" : "emphasisText", + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index2][1].start) + }; + group = { + type: use > 1 ? "strong" : "emphasis", + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + }; + events[open][1].end = Object.assign({}, openingSequence.start); + events[index2][1].start = Object.assign({}, closingSequence.end); + nextEvents = []; + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ["enter", events[open][1], context], + ["exit", events[open][1], context] + ]); + } + nextEvents = push(nextEvents, [ + ["enter", group, context], + ["enter", openingSequence, context], + ["exit", openingSequence, context], + ["enter", text2, context] + ]); + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index2), + context + ) + ); + nextEvents = push(nextEvents, [ + ["exit", text2, context], + ["enter", closingSequence, context], + ["exit", closingSequence, context], + ["exit", group, context] + ]); + if (events[index2][1].end.offset - events[index2][1].start.offset) { + offset = 2; + nextEvents = push(nextEvents, [ + ["enter", events[index2][1], context], + ["exit", events[index2][1], context] + ]); + } else { + offset = 0; + } + splice(events, open - 1, index2 - open + 3, nextEvents); + index2 = open + nextEvents.length - offset - 2; + break; + } + } + } + } + index2 = -1; + while (++index2 < events.length) { + if (events[index2][1].type === "attentionSequence") { + events[index2][1].type = "data"; + } + } + return events; + } + function tokenizeAttention(effects, ok) { + const attentionMarkers2 = this.parser.constructs.attentionMarkers.null; + const previous2 = this.previous; + const before = classifyCharacter(previous2); + let marker; + return start2; + function start2(code) { + effects.enter("attentionSequence"); + marker = code; + return sequence2(code); + } + function sequence2(code) { + if (code === marker) { + effects.consume(code); + return sequence2; + } + const token2 = effects.exit("attentionSequence"); + const after = classifyCharacter(code); + const open = !after || after === 2 && before || attentionMarkers2.includes(code); + const close = !before || before === 2 && after || attentionMarkers2.includes(previous2); + token2._open = Boolean(marker === 42 ? open : open && (before || !close)); + token2._close = Boolean(marker === 42 ? close : close && (after || !open)); + return ok(code); + } + } + function movePoint(point2, offset) { + point2.column += offset; + point2.offset += offset; + point2._bufferIndex += offset; + } + const autolink = { + name: "autolink", + tokenize: tokenizeAutolink + }; + function tokenizeAutolink(effects, ok, nok) { + let size2 = 1; + return start2; + function start2(code) { + effects.enter("autolink"); + effects.enter("autolinkMarker"); + effects.consume(code); + effects.exit("autolinkMarker"); + effects.enter("autolinkProtocol"); + return open; + } + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code); + return schemeOrEmailAtext; + } + return asciiAtext(code) ? emailAtext(code) : nok(code); + } + function schemeOrEmailAtext(code) { + return code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code) ? schemeInsideOrEmailAtext(code) : emailAtext(code); + } + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code); + return urlInside; + } + if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size2++ < 32) { + effects.consume(code); + return schemeInsideOrEmailAtext; + } + return emailAtext(code); + } + function urlInside(code) { + if (code === 62) { + effects.exit("autolinkProtocol"); + return end2(code); + } + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code); + } + effects.consume(code); + return urlInside; + } + function emailAtext(code) { + if (code === 64) { + effects.consume(code); + size2 = 0; + return emailAtSignOrDot; + } + if (asciiAtext(code)) { + effects.consume(code); + return emailAtext; + } + return nok(code); + } + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code); + } + function emailLabel(code) { + if (code === 46) { + effects.consume(code); + size2 = 0; + return emailAtSignOrDot; + } + if (code === 62) { + effects.exit("autolinkProtocol").type = "autolinkEmail"; + return end2(code); + } + return emailValue(code); + } + function emailValue(code) { + if ((code === 45 || asciiAlphanumeric(code)) && size2++ < 63) { + effects.consume(code); + return code === 45 ? emailValue : emailLabel; + } + return nok(code); + } + function end2(code) { + effects.enter("autolinkMarker"); + effects.consume(code); + effects.exit("autolinkMarker"); + effects.exit("autolink"); + return ok; + } + } + const blankLine = { + tokenize: tokenizeBlankLine, + partial: true + }; + function tokenizeBlankLine(effects, ok, nok) { + return factorySpace(effects, afterWhitespace, "linePrefix"); + function afterWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code); + } + } + const blockQuote = { + name: "blockQuote", + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit + }; + function tokenizeBlockQuoteStart(effects, ok, nok) { + const self2 = this; + return start2; + function start2(code) { + if (code === 62) { + const state2 = self2.containerState; + if (!state2.open) { + effects.enter("blockQuote", { + _container: true + }); + state2.open = true; + } + effects.enter("blockQuotePrefix"); + effects.enter("blockQuoteMarker"); + effects.consume(code); + effects.exit("blockQuoteMarker"); + return after; + } + return nok(code); + } + function after(code) { + if (markdownSpace(code)) { + effects.enter("blockQuotePrefixWhitespace"); + effects.consume(code); + effects.exit("blockQuotePrefixWhitespace"); + effects.exit("blockQuotePrefix"); + return ok; + } + effects.exit("blockQuotePrefix"); + return ok(code); + } + } + function tokenizeBlockQuoteContinuation(effects, ok, nok) { + return factorySpace( + effects, + effects.attempt(blockQuote, ok, nok), + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + } + function exit(effects) { + effects.exit("blockQuote"); + } + const characterEscape = { + name: "characterEscape", + tokenize: tokenizeCharacterEscape + }; + function tokenizeCharacterEscape(effects, ok, nok) { + return start2; + function start2(code) { + effects.enter("characterEscape"); + effects.enter("escapeMarker"); + effects.consume(code); + effects.exit("escapeMarker"); + return open; + } + function open(code) { + if (asciiPunctuation(code)) { + effects.enter("characterEscapeValue"); + effects.consume(code); + effects.exit("characterEscapeValue"); + effects.exit("characterEscape"); + return ok; + } + return nok(code); + } + } + const element = document.createElement("i"); + function decodeNamedCharacterReference(value2) { + const characterReference2 = "&" + value2 + ";"; + element.innerHTML = characterReference2; + const char2 = element.textContent; + if (char2.charCodeAt(char2.length - 1) === 59 && value2 !== "semi") { + return false; + } + return char2 === characterReference2 ? false : char2; + } + const characterReference = { + name: "characterReference", + tokenize: tokenizeCharacterReference + }; + function tokenizeCharacterReference(effects, ok, nok) { + const self2 = this; + let size2 = 0; + let max2; + let test; + return start2; + function start2(code) { + effects.enter("characterReference"); + effects.enter("characterReferenceMarker"); + effects.consume(code); + effects.exit("characterReferenceMarker"); + return open; + } + function open(code) { + if (code === 35) { + effects.enter("characterReferenceMarkerNumeric"); + effects.consume(code); + effects.exit("characterReferenceMarkerNumeric"); + return numeric; + } + effects.enter("characterReferenceValue"); + max2 = 31; + test = asciiAlphanumeric; + return value2(code); + } + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter("characterReferenceMarkerHexadecimal"); + effects.consume(code); + effects.exit("characterReferenceMarkerHexadecimal"); + effects.enter("characterReferenceValue"); + max2 = 6; + test = asciiHexDigit; + return value2; + } + effects.enter("characterReferenceValue"); + max2 = 7; + test = asciiDigit; + return value2(code); + } + function value2(code) { + let token2; + if (code === 59 && size2) { + token2 = effects.exit("characterReferenceValue"); + if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token2))) { + return nok(code); + } + effects.enter("characterReferenceMarker"); + effects.consume(code); + effects.exit("characterReferenceMarker"); + effects.exit("characterReference"); + return ok; + } + if (test(code) && size2++ < max2) { + effects.consume(code); + return value2; + } + return nok(code); + } + } + const codeFenced = { + name: "codeFenced", + tokenize: tokenizeCodeFenced, + concrete: true + }; + function tokenizeCodeFenced(effects, ok, nok) { + const self2 = this; + const closingFenceConstruct = { + tokenize: tokenizeClosingFence, + partial: true + }; + const nonLazyLine = { + tokenize: tokenizeNonLazyLine, + partial: true + }; + const tail = this.events[this.events.length - 1]; + const initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0; + let sizeOpen = 0; + let marker; + return start2; + function start2(code) { + effects.enter("codeFenced"); + effects.enter("codeFencedFence"); + effects.enter("codeFencedFenceSequence"); + marker = code; + return sequenceOpen(code); + } + function sequenceOpen(code) { + if (code === marker) { + effects.consume(code); + sizeOpen++; + return sequenceOpen; + } + effects.exit("codeFencedFenceSequence"); + return sizeOpen < 3 ? nok(code) : factorySpace(effects, infoOpen, "whitespace")(code); + } + function infoOpen(code) { + if (code === null || markdownLineEnding(code)) { + return openAfter(code); + } + effects.enter("codeFencedFenceInfo"); + effects.enter("chunkString", { + contentType: "string" + }); + return info2(code); + } + function info2(code) { + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit("chunkString"); + effects.exit("codeFencedFenceInfo"); + return factorySpace(effects, infoAfter, "whitespace")(code); + } + if (code === 96 && code === marker) + return nok(code); + effects.consume(code); + return info2; + } + function infoAfter(code) { + if (code === null || markdownLineEnding(code)) { + return openAfter(code); + } + effects.enter("codeFencedFenceMeta"); + effects.enter("chunkString", { + contentType: "string" + }); + return meta(code); + } + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("chunkString"); + effects.exit("codeFencedFenceMeta"); + return openAfter(code); + } + if (code === 96 && code === marker) + return nok(code); + effects.consume(code); + return meta; + } + function openAfter(code) { + effects.exit("codeFencedFence"); + return self2.interrupt ? ok(code) : contentStart(code); + } + function contentStart(code) { + if (code === null) { + return after(code); + } + if (markdownLineEnding(code)) { + return effects.attempt( + nonLazyLine, + effects.attempt( + closingFenceConstruct, + after, + initialPrefix ? factorySpace( + effects, + contentStart, + "linePrefix", + initialPrefix + 1 + ) : contentStart + ), + after + )(code); + } + effects.enter("codeFlowValue"); + return contentContinue(code); + } + function contentContinue(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("codeFlowValue"); + return contentStart(code); + } + effects.consume(code); + return contentContinue; + } + function after(code) { + effects.exit("codeFenced"); + return ok(code); + } + function tokenizeNonLazyLine(effects2, ok2, nok2) { + const self3 = this; + return start3; + function start3(code) { + effects2.enter("lineEnding"); + effects2.consume(code); + effects2.exit("lineEnding"); + return lineStart; + } + function lineStart(code) { + return self3.parser.lazy[self3.now().line] ? nok2(code) : ok2(code); + } + } + function tokenizeClosingFence(effects2, ok2, nok2) { + let size2 = 0; + return factorySpace( + effects2, + closingSequenceStart, + "linePrefix", + this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + function closingSequenceStart(code) { + effects2.enter("codeFencedFence"); + effects2.enter("codeFencedFenceSequence"); + return closingSequence(code); + } + function closingSequence(code) { + if (code === marker) { + effects2.consume(code); + size2++; + return closingSequence; + } + if (size2 < sizeOpen) + return nok2(code); + effects2.exit("codeFencedFenceSequence"); + return factorySpace(effects2, closingSequenceEnd, "whitespace")(code); + } + function closingSequenceEnd(code) { + if (code === null || markdownLineEnding(code)) { + effects2.exit("codeFencedFence"); + return ok2(code); + } + return nok2(code); + } + } + } + const codeIndented = { + name: "codeIndented", + tokenize: tokenizeCodeIndented + }; + const indentedContent = { + tokenize: tokenizeIndentedContent, + partial: true + }; + function tokenizeCodeIndented(effects, ok, nok) { + const self2 = this; + return start2; + function start2(code) { + effects.enter("codeIndented"); + return factorySpace(effects, afterStartPrefix, "linePrefix", 4 + 1)(code); + } + function afterStartPrefix(code) { + const tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? afterPrefix(code) : nok(code); + } + function afterPrefix(code) { + if (code === null) { + return after(code); + } + if (markdownLineEnding(code)) { + return effects.attempt(indentedContent, afterPrefix, after)(code); + } + effects.enter("codeFlowValue"); + return content2(code); + } + function content2(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("codeFlowValue"); + return afterPrefix(code); + } + effects.consume(code); + return content2; + } + function after(code) { + effects.exit("codeIndented"); + return ok(code); + } + } + function tokenizeIndentedContent(effects, ok, nok) { + const self2 = this; + return start2; + function start2(code) { + if (self2.parser.lazy[self2.now().line]) { + return nok(code); + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return start2; + } + return factorySpace(effects, afterPrefix, "linePrefix", 4 + 1)(code); + } + function afterPrefix(code) { + const tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code) : markdownLineEnding(code) ? start2(code) : nok(code); + } + } + const codeText = { + name: "codeText", + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous + }; + function resolveCodeText(events) { + let tailExitIndex = events.length - 4; + let headEnterIndex = 3; + let index2; + let enter2; + if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) { + index2 = headEnterIndex; + while (++index2 < tailExitIndex) { + if (events[index2][1].type === "codeTextData") { + events[headEnterIndex][1].type = "codeTextPadding"; + events[tailExitIndex][1].type = "codeTextPadding"; + headEnterIndex += 2; + tailExitIndex -= 2; + break; + } + } + } + index2 = headEnterIndex - 1; + tailExitIndex++; + while (++index2 <= tailExitIndex) { + if (enter2 === void 0) { + if (index2 !== tailExitIndex && events[index2][1].type !== "lineEnding") { + enter2 = index2; + } + } else if (index2 === tailExitIndex || events[index2][1].type === "lineEnding") { + events[enter2][1].type = "codeTextData"; + if (index2 !== enter2 + 2) { + events[enter2][1].end = events[index2 - 1][1].end; + events.splice(enter2 + 2, index2 - enter2 - 2); + tailExitIndex -= index2 - enter2 - 2; + index2 = enter2 + 2; + } + enter2 = void 0; + } + } + return events; + } + function previous(code) { + return code !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; + } + function tokenizeCodeText(effects, ok, nok) { + let sizeOpen = 0; + let size2; + let token2; + return start2; + function start2(code) { + effects.enter("codeText"); + effects.enter("codeTextSequence"); + return openingSequence(code); + } + function openingSequence(code) { + if (code === 96) { + effects.consume(code); + sizeOpen++; + return openingSequence; + } + effects.exit("codeTextSequence"); + return gap(code); + } + function gap(code) { + if (code === null) { + return nok(code); + } + if (code === 96) { + token2 = effects.enter("codeTextSequence"); + size2 = 0; + return closingSequence(code); + } + if (code === 32) { + effects.enter("space"); + effects.consume(code); + effects.exit("space"); + return gap; + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return gap; + } + effects.enter("codeTextData"); + return data(code); + } + function data(code) { + if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) { + effects.exit("codeTextData"); + return gap(code); + } + effects.consume(code); + return data; + } + function closingSequence(code) { + if (code === 96) { + effects.consume(code); + size2++; + return closingSequence; + } + if (size2 === sizeOpen) { + effects.exit("codeTextSequence"); + effects.exit("codeText"); + return ok(code); + } + token2.type = "codeTextData"; + return data(code); + } + } + function subtokenize(events) { + const jumps = {}; + let index2 = -1; + let event; + let lineIndex; + let otherIndex; + let otherEvent; + let parameters; + let subevents; + let more; + while (++index2 < events.length) { + while (index2 in jumps) { + index2 = jumps[index2]; + } + event = events[index2]; + if (index2 && event[1].type === "chunkFlow" && events[index2 - 1][1].type === "listItemPrefix") { + subevents = event[1]._tokenizer.events; + otherIndex = 0; + if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") { + otherIndex += 2; + } + if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === "content") { + break; + } + if (subevents[otherIndex][1].type === "chunkText") { + subevents[otherIndex][1]._isInFirstContentOfListItem = true; + otherIndex++; + } + } + } + } + if (event[0] === "enter") { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index2)); + index2 = jumps[index2]; + more = true; + } + } else if (event[1]._container) { + otherIndex = index2; + lineIndex = void 0; + while (otherIndex--) { + otherEvent = events[otherIndex]; + if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") { + if (otherEvent[0] === "enter") { + if (lineIndex) { + events[lineIndex][1].type = "lineEndingBlank"; + } + otherEvent[1].type = "lineEnding"; + lineIndex = otherIndex; + } + } else { + break; + } + } + if (lineIndex) { + event[1].end = Object.assign({}, events[lineIndex][1].start); + parameters = events.slice(lineIndex, index2); + parameters.unshift(event); + splice(events, lineIndex, index2 - lineIndex + 1, parameters); + } + } + } + return !more; + } + function subcontent(events, eventIndex) { + const token2 = events[eventIndex][1]; + const context = events[eventIndex][2]; + let startPosition = eventIndex - 1; + const startPositions = []; + const tokenizer = token2._tokenizer || context.parser[token2.contentType](token2.start); + const childEvents = tokenizer.events; + const jumps = []; + const gaps = {}; + let stream; + let previous2; + let index2 = -1; + let current = token2; + let adjust2 = 0; + let start2 = 0; + const breaks = [start2]; + while (current) { + while (events[++startPosition][1] !== current) { + } + startPositions.push(startPosition); + if (!current._tokenizer) { + stream = context.sliceStream(current); + if (!current.next) { + stream.push(null); + } + if (previous2) { + tokenizer.defineSkip(current.start); + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true; + } + tokenizer.write(stream); + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = void 0; + } + } + previous2 = current; + current = current.next; + } + current = token2; + while (++index2 < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index2][0] === "exit" && childEvents[index2 - 1][0] === "enter" && childEvents[index2][1].type === childEvents[index2 - 1][1].type && childEvents[index2][1].start.line !== childEvents[index2][1].end.line + ) { + start2 = index2 + 1; + breaks.push(start2); + current._tokenizer = void 0; + current.previous = void 0; + current = current.next; + } + } + tokenizer.events = []; + if (current) { + current._tokenizer = void 0; + current.previous = void 0; + } else { + breaks.pop(); + } + index2 = breaks.length; + while (index2--) { + const slice2 = childEvents.slice(breaks[index2], breaks[index2 + 1]); + const start3 = startPositions.pop(); + jumps.unshift([start3, start3 + slice2.length - 1]); + splice(events, start3, 2, slice2); + } + index2 = -1; + while (++index2 < jumps.length) { + gaps[adjust2 + jumps[index2][0]] = adjust2 + jumps[index2][1]; + adjust2 += jumps[index2][1] - jumps[index2][0] - 1; + } + return gaps; + } + const content = { + tokenize: tokenizeContent, + resolve: resolveContent + }; + const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true + }; + function resolveContent(events) { + subtokenize(events); + return events; + } + function tokenizeContent(effects, ok) { + let previous2; + return start2; + function start2(code) { + effects.enter("content"); + previous2 = effects.enter("chunkContent", { + contentType: "content" + }); + return data(code); + } + function data(code) { + if (code === null) { + return contentEnd(code); + } + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code); + } + effects.consume(code); + return data; + } + function contentEnd(code) { + effects.exit("chunkContent"); + effects.exit("content"); + return ok(code); + } + function contentContinue(code) { + effects.consume(code); + effects.exit("chunkContent"); + previous2.next = effects.enter("chunkContent", { + contentType: "content", + previous: previous2 + }); + previous2 = previous2.next; + return data; + } + } + function tokenizeContinuation(effects, ok, nok) { + const self2 = this; + return startLookahead; + function startLookahead(code) { + effects.exit("chunkContent"); + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, prefixed, "linePrefix"); + } + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code); + } + const tail = self2.events[self2.events.length - 1]; + if (!self2.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === "linePrefix" && tail[2].sliceSerialize(tail[1], true).length >= 4) { + return ok(code); + } + return effects.interrupt(self2.parser.constructs.flow, nok, ok)(code); + } + } + function factoryDestination(effects, ok, nok, type2, literalType, literalMarkerType, rawType, stringType, max2) { + const limit = max2 || Number.POSITIVE_INFINITY; + let balance2 = 0; + return start2; + function start2(code) { + if (code === 60) { + effects.enter(type2); + effects.enter(literalType); + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + return destinationEnclosedBefore; + } + if (code === null || code === 41 || asciiControl(code)) { + return nok(code); + } + effects.enter(type2); + effects.enter(rawType); + effects.enter(stringType); + effects.enter("chunkString", { + contentType: "string" + }); + return destinationRaw(code); + } + function destinationEnclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType); + effects.consume(code); + effects.exit(literalMarkerType); + effects.exit(literalType); + effects.exit(type2); + return ok; + } + effects.enter(stringType); + effects.enter("chunkString", { + contentType: "string" + }); + return destinationEnclosed(code); + } + function destinationEnclosed(code) { + if (code === 62) { + effects.exit("chunkString"); + effects.exit(stringType); + return destinationEnclosedBefore(code); + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code); + } + effects.consume(code); + return code === 92 ? destinationEnclosedEscape : destinationEnclosed; + } + function destinationEnclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code); + return destinationEnclosed; + } + return destinationEnclosed(code); + } + function destinationRaw(code) { + if (code === 40) { + if (++balance2 > limit) + return nok(code); + effects.consume(code); + return destinationRaw; + } + if (code === 41) { + if (!balance2--) { + effects.exit("chunkString"); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type2); + return ok(code); + } + effects.consume(code); + return destinationRaw; + } + if (code === null || markdownLineEndingOrSpace(code)) { + if (balance2) + return nok(code); + effects.exit("chunkString"); + effects.exit(stringType); + effects.exit(rawType); + effects.exit(type2); + return ok(code); + } + if (asciiControl(code)) + return nok(code); + effects.consume(code); + return code === 92 ? destinationRawEscape : destinationRaw; + } + function destinationRawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code); + return destinationRaw; + } + return destinationRaw(code); + } + } + function factoryLabel(effects, ok, nok, type2, markerType, stringType) { + const self2 = this; + let size2 = 0; + let data; + return start2; + function start2(code) { + effects.enter(type2); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.enter(stringType); + return atBreak; + } + function atBreak(code) { + if (code === null || code === 91 || code === 93 && !data || /* To do: remove in the future once we’ve switched from + * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + * which doesn’t need this */ + /* Hidden footnotes hook */ + /* c8 ignore next 3 */ + code === 94 && !size2 && "_hiddenFootnoteSupport" in self2.parser.constructs || size2 > 999) { + return nok(code); + } + if (code === 93) { + effects.exit(stringType); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type2); + return ok; + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return atBreak; + } + effects.enter("chunkString", { + contentType: "string" + }); + return label(code); + } + function label(code) { + if (code === null || code === 91 || code === 93 || markdownLineEnding(code) || size2++ > 999) { + effects.exit("chunkString"); + return atBreak(code); + } + effects.consume(code); + data = data || !markdownSpace(code); + return code === 92 ? labelEscape : label; + } + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code); + size2++; + return label; + } + return label(code); + } + } + function factoryTitle(effects, ok, nok, type2, markerType, stringType) { + let marker; + return start2; + function start2(code) { + effects.enter(type2); + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + marker = code === 40 ? 41 : code; + return atFirstTitleBreak; + } + function atFirstTitleBreak(code) { + if (code === marker) { + effects.enter(markerType); + effects.consume(code); + effects.exit(markerType); + effects.exit(type2); + return ok; + } + effects.enter(stringType); + return atTitleBreak(code); + } + function atTitleBreak(code) { + if (code === marker) { + effects.exit(stringType); + return atFirstTitleBreak(marker); + } + if (code === null) { + return nok(code); + } + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, atTitleBreak, "linePrefix"); + } + effects.enter("chunkString", { + contentType: "string" + }); + return title2(code); + } + function title2(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit("chunkString"); + return atTitleBreak(code); + } + effects.consume(code); + return code === 92 ? titleEscape : title2; + } + function titleEscape(code) { + if (code === marker || code === 92) { + effects.consume(code); + return title2; + } + return title2(code); + } + } + function factoryWhitespace(effects, ok) { + let seen; + return start2; + function start2(code) { + if (markdownLineEnding(code)) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + seen = true; + return start2; + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start2, + seen ? "linePrefix" : "lineSuffix" + )(code); + } + return ok(code); + } + } + function normalizeIdentifier(value2) { + return value2.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); + } + const definition = { + name: "definition", + tokenize: tokenizeDefinition + }; + const titleConstruct = { + tokenize: tokenizeTitle, + partial: true + }; + function tokenizeDefinition(effects, ok, nok) { + const self2 = this; + let identifier2; + return start2; + function start2(code) { + effects.enter("definition"); + return factoryLabel.call( + self2, + effects, + labelAfter, + nok, + "definitionLabel", + "definitionLabelMarker", + "definitionLabelString" + )(code); + } + function labelAfter(code) { + identifier2 = normalizeIdentifier( + self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1) + ); + if (code === 58) { + effects.enter("definitionMarker"); + effects.consume(code); + effects.exit("definitionMarker"); + return factoryWhitespace( + effects, + factoryDestination( + effects, + effects.attempt( + titleConstruct, + factorySpace(effects, after, "whitespace"), + factorySpace(effects, after, "whitespace") + ), + nok, + "definitionDestination", + "definitionDestinationLiteral", + "definitionDestinationLiteralMarker", + "definitionDestinationRaw", + "definitionDestinationString" + ) + ); + } + return nok(code); + } + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("definition"); + if (!self2.parser.defined.includes(identifier2)) { + self2.parser.defined.push(identifier2); + } + return ok(code); + } + return nok(code); + } + } + function tokenizeTitle(effects, ok, nok) { + return start2; + function start2(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, before)(code) : nok(code); + } + function before(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + factorySpace(effects, after, "whitespace"), + nok, + "definitionTitle", + "definitionTitleMarker", + "definitionTitleString" + )(code); + } + return nok(code); + } + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code); + } + } + const hardBreakEscape = { + name: "hardBreakEscape", + tokenize: tokenizeHardBreakEscape + }; + function tokenizeHardBreakEscape(effects, ok, nok) { + return start2; + function start2(code) { + effects.enter("hardBreakEscape"); + effects.enter("escapeMarker"); + effects.consume(code); + return open; + } + function open(code) { + if (markdownLineEnding(code)) { + effects.exit("escapeMarker"); + effects.exit("hardBreakEscape"); + return ok(code); + } + return nok(code); + } + } + const headingAtx = { + name: "headingAtx", + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx + }; + function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2; + let contentStart = 3; + let content2; + let text2; + if (events[contentStart][1].type === "whitespace") { + contentStart += 2; + } + if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") { + contentEnd -= 2; + } + if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4; + } + if (contentEnd > contentStart) { + content2 = { + type: "atxHeadingText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end + }; + text2 = { + type: "chunkText", + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + // @ts-expect-error Constants are fine to assign. + contentType: "text" + }; + splice(events, contentStart, contentEnd - contentStart + 1, [ + ["enter", content2, context], + ["enter", text2, context], + ["exit", text2, context], + ["exit", content2, context] + ]); + } + return events; + } + function tokenizeHeadingAtx(effects, ok, nok) { + const self2 = this; + let size2 = 0; + return start2; + function start2(code) { + effects.enter("atxHeading"); + effects.enter("atxHeadingSequence"); + return fenceOpenInside(code); + } + function fenceOpenInside(code) { + if (code === 35 && size2++ < 6) { + effects.consume(code); + return fenceOpenInside; + } + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit("atxHeadingSequence"); + return self2.interrupt ? ok(code) : headingBreak(code); + } + return nok(code); + } + function headingBreak(code) { + if (code === 35) { + effects.enter("atxHeadingSequence"); + return sequence2(code); + } + if (code === null || markdownLineEnding(code)) { + effects.exit("atxHeading"); + return ok(code); + } + if (markdownSpace(code)) { + return factorySpace(effects, headingBreak, "whitespace")(code); + } + effects.enter("atxHeadingText"); + return data(code); + } + function sequence2(code) { + if (code === 35) { + effects.consume(code); + return sequence2; + } + effects.exit("atxHeadingSequence"); + return headingBreak(code); + } + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit("atxHeadingText"); + return headingBreak(code); + } + effects.consume(code); + return data; + } + } + const htmlBlockNames = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" + ]; + const htmlRawNames = ["pre", "script", "style", "textarea"]; + const htmlFlow = { + name: "htmlFlow", + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true + }; + const nextBlankConstruct = { + tokenize: tokenizeNextBlank, + partial: true + }; + function resolveToHtmlFlow(events) { + let index2 = events.length; + while (index2--) { + if (events[index2][0] === "enter" && events[index2][1].type === "htmlFlow") { + break; + } + } + if (index2 > 1 && events[index2 - 2][1].type === "linePrefix") { + events[index2][1].start = events[index2 - 2][1].start; + events[index2 + 1][1].start = events[index2 - 2][1].start; + events.splice(index2 - 2, 2); + } + return events; + } + function tokenizeHtmlFlow(effects, ok, nok) { + const self2 = this; + let kind; + let startTag; + let buffer; + let index2; + let marker; + return start2; + function start2(code) { + effects.enter("htmlFlow"); + effects.enter("htmlFlowData"); + effects.consume(code); + return open; + } + function open(code) { + if (code === 33) { + effects.consume(code); + return declarationStart; + } + if (code === 47) { + effects.consume(code); + return tagCloseStart; + } + if (code === 63) { + effects.consume(code); + kind = 3; + return self2.interrupt ? ok : continuationDeclarationInside; + } + if (asciiAlpha(code)) { + effects.consume(code); + buffer = String.fromCharCode(code); + startTag = true; + return tagName; + } + return nok(code); + } + function declarationStart(code) { + if (code === 45) { + effects.consume(code); + kind = 2; + return commentOpenInside; + } + if (code === 91) { + effects.consume(code); + kind = 5; + buffer = "CDATA["; + index2 = 0; + return cdataOpenInside; + } + if (asciiAlpha(code)) { + effects.consume(code); + kind = 4; + return self2.interrupt ? ok : continuationDeclarationInside; + } + return nok(code); + } + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code); + return self2.interrupt ? ok : continuationDeclarationInside; + } + return nok(code); + } + function cdataOpenInside(code) { + if (code === buffer.charCodeAt(index2++)) { + effects.consume(code); + return index2 === buffer.length ? self2.interrupt ? ok : continuation : cdataOpenInside; + } + return nok(code); + } + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code); + buffer = String.fromCharCode(code); + return tagName; + } + return nok(code); + } + function tagName(code) { + if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + if (code !== 47 && startTag && htmlRawNames.includes(buffer.toLowerCase())) { + kind = 1; + return self2.interrupt ? ok(code) : continuation(code); + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + kind = 6; + if (code === 47) { + effects.consume(code); + return basicSelfClosing; + } + return self2.interrupt ? ok(code) : continuation(code); + } + kind = 7; + return self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code) : startTag ? completeAttributeNameBefore(code) : completeClosingTagAfter(code); + } + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + buffer += String.fromCharCode(code); + return tagName; + } + return nok(code); + } + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code); + return self2.interrupt ? ok : continuation; + } + return nok(code); + } + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code); + return completeClosingTagAfter; + } + return completeEnd(code); + } + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code); + return completeEnd; + } + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code); + return completeAttributeName; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeNameBefore; + } + return completeEnd(code); + } + function completeAttributeName(code) { + if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) { + effects.consume(code); + return completeAttributeName; + } + return completeAttributeNameAfter(code); + } + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code); + return completeAttributeValueBefore; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeNameAfter; + } + return completeAttributeNameBefore(code); + } + function completeAttributeValueBefore(code) { + if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { + return nok(code); + } + if (code === 34 || code === 39) { + effects.consume(code); + marker = code; + return completeAttributeValueQuoted; + } + if (markdownSpace(code)) { + effects.consume(code); + return completeAttributeValueBefore; + } + marker = null; + return completeAttributeValueUnquoted(code); + } + function completeAttributeValueQuoted(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code); + } + if (code === marker) { + effects.consume(code); + return completeAttributeValueQuotedAfter; + } + effects.consume(code); + return completeAttributeValueQuoted; + } + function completeAttributeValueUnquoted(code) { + if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code)) { + return completeAttributeNameAfter(code); + } + effects.consume(code); + return completeAttributeValueUnquoted; + } + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code); + } + return nok(code); + } + function completeEnd(code) { + if (code === 62) { + effects.consume(code); + return completeAfter; + } + return nok(code); + } + function completeAfter(code) { + if (markdownSpace(code)) { + effects.consume(code); + return completeAfter; + } + return code === null || markdownLineEnding(code) ? continuation(code) : nok(code); + } + function continuation(code) { + if (code === 45 && kind === 2) { + effects.consume(code); + return continuationCommentInside; + } + if (code === 60 && kind === 1) { + effects.consume(code); + return continuationRawTagOpen; + } + if (code === 62 && kind === 4) { + effects.consume(code); + return continuationClose; + } + if (code === 63 && kind === 3) { + effects.consume(code); + return continuationDeclarationInside; + } + if (code === 93 && kind === 5) { + effects.consume(code); + return continuationCharacterDataInside; + } + if (markdownLineEnding(code) && (kind === 6 || kind === 7)) { + return effects.check( + nextBlankConstruct, + continuationClose, + continuationAtLineEnding + )(code); + } + if (code === null || markdownLineEnding(code)) { + return continuationAtLineEnding(code); + } + effects.consume(code); + return continuation; + } + function continuationAtLineEnding(code) { + effects.exit("htmlFlowData"); + return htmlContinueStart(code); + } + function htmlContinueStart(code) { + if (code === null) { + return done(code); + } + if (markdownLineEnding(code)) { + return effects.attempt( + { + tokenize: htmlLineEnd, + partial: true + }, + htmlContinueStart, + done + )(code); + } + effects.enter("htmlFlowData"); + return continuation(code); + } + function htmlLineEnd(effects2, ok2, nok2) { + return start3; + function start3(code) { + effects2.enter("lineEnding"); + effects2.consume(code); + effects2.exit("lineEnding"); + return lineStart; + } + function lineStart(code) { + return self2.parser.lazy[self2.now().line] ? nok2(code) : ok2(code); + } + } + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code); + buffer = ""; + return continuationRawEndTag; + } + return continuation(code); + } + function continuationRawEndTag(code) { + if (code === 62 && htmlRawNames.includes(buffer.toLowerCase())) { + effects.consume(code); + return continuationClose; + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code); + buffer += String.fromCharCode(code); + return continuationRawEndTag; + } + return continuation(code); + } + function continuationCharacterDataInside(code) { + if (code === 93) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code); + return continuationClose; + } + if (code === 45 && kind === 2) { + effects.consume(code); + return continuationDeclarationInside; + } + return continuation(code); + } + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("htmlFlowData"); + return done(code); + } + effects.consume(code); + return continuationClose; + } + function done(code) { + effects.exit("htmlFlow"); + return ok(code); + } + } + function tokenizeNextBlank(effects, ok, nok) { + return start2; + function start2(code) { + effects.exit("htmlFlowData"); + effects.enter("lineEndingBlank"); + effects.consume(code); + effects.exit("lineEndingBlank"); + return effects.attempt(blankLine, ok, nok); + } + } + const htmlText = { + name: "htmlText", + tokenize: tokenizeHtmlText + }; + function tokenizeHtmlText(effects, ok, nok) { + const self2 = this; + let marker; + let buffer; + let index2; + let returnState; + return start2; + function start2(code) { + effects.enter("htmlText"); + effects.enter("htmlTextData"); + effects.consume(code); + return open; + } + function open(code) { + if (code === 33) { + effects.consume(code); + return declarationOpen; + } + if (code === 47) { + effects.consume(code); + return tagCloseStart; + } + if (code === 63) { + effects.consume(code); + return instruction; + } + if (asciiAlpha(code)) { + effects.consume(code); + return tagOpen; + } + return nok(code); + } + function declarationOpen(code) { + if (code === 45) { + effects.consume(code); + return commentOpen; + } + if (code === 91) { + effects.consume(code); + buffer = "CDATA["; + index2 = 0; + return cdataOpen; + } + if (asciiAlpha(code)) { + effects.consume(code); + return declaration2; + } + return nok(code); + } + function commentOpen(code) { + if (code === 45) { + effects.consume(code); + return commentStart; + } + return nok(code); + } + function commentStart(code) { + if (code === null || code === 62) { + return nok(code); + } + if (code === 45) { + effects.consume(code); + return commentStartDash; + } + return comment2(code); + } + function commentStartDash(code) { + if (code === null || code === 62) { + return nok(code); + } + return comment2(code); + } + function comment2(code) { + if (code === null) { + return nok(code); + } + if (code === 45) { + effects.consume(code); + return commentClose; + } + if (markdownLineEnding(code)) { + returnState = comment2; + return atLineEnding(code); + } + effects.consume(code); + return comment2; + } + function commentClose(code) { + if (code === 45) { + effects.consume(code); + return end2; + } + return comment2(code); + } + function cdataOpen(code) { + if (code === buffer.charCodeAt(index2++)) { + effects.consume(code); + return index2 === buffer.length ? cdata : cdataOpen; + } + return nok(code); + } + function cdata(code) { + if (code === null) { + return nok(code); + } + if (code === 93) { + effects.consume(code); + return cdataClose; + } + if (markdownLineEnding(code)) { + returnState = cdata; + return atLineEnding(code); + } + effects.consume(code); + return cdata; + } + function cdataClose(code) { + if (code === 93) { + effects.consume(code); + return cdataEnd; + } + return cdata(code); + } + function cdataEnd(code) { + if (code === 62) { + return end2(code); + } + if (code === 93) { + effects.consume(code); + return cdataEnd; + } + return cdata(code); + } + function declaration2(code) { + if (code === null || code === 62) { + return end2(code); + } + if (markdownLineEnding(code)) { + returnState = declaration2; + return atLineEnding(code); + } + effects.consume(code); + return declaration2; + } + function instruction(code) { + if (code === null) { + return nok(code); + } + if (code === 63) { + effects.consume(code); + return instructionClose; + } + if (markdownLineEnding(code)) { + returnState = instruction; + return atLineEnding(code); + } + effects.consume(code); + return instruction; + } + function instructionClose(code) { + return code === 62 ? end2(code) : instruction(code); + } + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code); + return tagClose; + } + return nok(code); + } + function tagClose(code) { + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagClose; + } + return tagCloseBetween(code); + } + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagCloseBetween; + } + return end2(code); + } + function tagOpen(code) { + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagOpen; + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + return nok(code); + } + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code); + return end2; + } + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code); + return tagOpenAttributeName; + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenBetween; + } + return end2(code); + } + function tagOpenAttributeName(code) { + if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) { + effects.consume(code); + return tagOpenAttributeName; + } + return tagOpenAttributeNameAfter(code); + } + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code); + return tagOpenAttributeValueBefore; + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenAttributeNameAfter; + } + return tagOpenBetween(code); + } + function tagOpenAttributeValueBefore(code) { + if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { + return nok(code); + } + if (code === 34 || code === 39) { + effects.consume(code); + marker = code; + return tagOpenAttributeValueQuoted; + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore; + return atLineEnding(code); + } + if (markdownSpace(code)) { + effects.consume(code); + return tagOpenAttributeValueBefore; + } + effects.consume(code); + marker = void 0; + return tagOpenAttributeValueUnquoted; + } + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code); + return tagOpenAttributeValueQuotedAfter; + } + if (code === null) { + return nok(code); + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted; + return atLineEnding(code); + } + effects.consume(code); + return tagOpenAttributeValueQuoted; + } + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 62 || code === 47 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + return nok(code); + } + function tagOpenAttributeValueUnquoted(code) { + if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) { + return nok(code); + } + if (code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code); + } + effects.consume(code); + return tagOpenAttributeValueUnquoted; + } + function atLineEnding(code) { + effects.exit("htmlTextData"); + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace( + effects, + afterPrefix, + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + ); + } + function afterPrefix(code) { + effects.enter("htmlTextData"); + return returnState(code); + } + function end2(code) { + if (code === 62) { + effects.consume(code); + effects.exit("htmlTextData"); + effects.exit("htmlText"); + return ok; + } + return nok(code); + } + } + const labelEnd = { + name: "labelEnd", + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd + }; + const resourceConstruct = { + tokenize: tokenizeResource + }; + const fullReferenceConstruct = { + tokenize: tokenizeFullReference + }; + const collapsedReferenceConstruct = { + tokenize: tokenizeCollapsedReference + }; + function resolveAllLabelEnd(events) { + let index2 = -1; + let token2; + while (++index2 < events.length) { + token2 = events[index2][1]; + if (token2.type === "labelImage" || token2.type === "labelLink" || token2.type === "labelEnd") { + events.splice(index2 + 1, token2.type === "labelImage" ? 4 : 2); + token2.type = "data"; + index2++; + } + } + return events; + } + function resolveToLabelEnd(events, context) { + let index2 = events.length; + let offset = 0; + let token2; + let open; + let close; + let media; + while (index2--) { + token2 = events[index2][1]; + if (open) { + if (token2.type === "link" || token2.type === "labelLink" && token2._inactive) { + break; + } + if (events[index2][0] === "enter" && token2.type === "labelLink") { + token2._inactive = true; + } + } else if (close) { + if (events[index2][0] === "enter" && (token2.type === "labelImage" || token2.type === "labelLink") && !token2._balanced) { + open = index2; + if (token2.type !== "labelLink") { + offset = 2; + break; + } + } + } else if (token2.type === "labelEnd") { + close = index2; + } + } + const group = { + type: events[open][1].type === "labelLink" ? "link" : "image", + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + const label = { + type: "label", + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + }; + const text2 = { + type: "labelText", + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + }; + media = [ + ["enter", group, context], + ["enter", label, context] + ]; + media = push(media, events.slice(open + 1, open + offset + 3)); + media = push(media, [["enter", text2, context]]); + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ); + media = push(media, [ + ["exit", text2, context], + events[close - 2], + events[close - 1], + ["exit", label, context] + ]); + media = push(media, events.slice(close + 1)); + media = push(media, [["exit", group, context]]); + splice(events, open, events.length, media); + return events; + } + function tokenizeLabelEnd(effects, ok, nok) { + const self2 = this; + let index2 = self2.events.length; + let labelStart; + let defined; + while (index2--) { + if ((self2.events[index2][1].type === "labelImage" || self2.events[index2][1].type === "labelLink") && !self2.events[index2][1]._balanced) { + labelStart = self2.events[index2][1]; + break; + } + } + return start2; + function start2(code) { + if (!labelStart) { + return nok(code); + } + if (labelStart._inactive) + return balanced(code); + defined = self2.parser.defined.includes( + normalizeIdentifier( + self2.sliceSerialize({ + start: labelStart.end, + end: self2.now() + }) + ) + ); + effects.enter("labelEnd"); + effects.enter("labelMarker"); + effects.consume(code); + effects.exit("labelMarker"); + effects.exit("labelEnd"); + return afterLabelEnd; + } + function afterLabelEnd(code) { + if (code === 40) { + return effects.attempt( + resourceConstruct, + ok, + defined ? ok : balanced + )(code); + } + if (code === 91) { + return effects.attempt( + fullReferenceConstruct, + ok, + defined ? effects.attempt(collapsedReferenceConstruct, ok, balanced) : balanced + )(code); + } + return defined ? ok(code) : balanced(code); + } + function balanced(code) { + labelStart._balanced = true; + return nok(code); + } + } + function tokenizeResource(effects, ok, nok) { + return start2; + function start2(code) { + effects.enter("resource"); + effects.enter("resourceMarker"); + effects.consume(code); + effects.exit("resourceMarker"); + return factoryWhitespace(effects, open); + } + function open(code) { + if (code === 41) { + return end2(code); + } + return factoryDestination( + effects, + destinationAfter, + nok, + "resourceDestination", + "resourceDestinationLiteral", + "resourceDestinationLiteralMarker", + "resourceDestinationRaw", + "resourceDestinationString", + 32 + )(code); + } + function destinationAfter(code) { + return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, between)(code) : end2(code); + } + function between(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + factoryWhitespace(effects, end2), + nok, + "resourceTitle", + "resourceTitleMarker", + "resourceTitleString" + )(code); + } + return end2(code); + } + function end2(code) { + if (code === 41) { + effects.enter("resourceMarker"); + effects.consume(code); + effects.exit("resourceMarker"); + effects.exit("resource"); + return ok; + } + return nok(code); + } + } + function tokenizeFullReference(effects, ok, nok) { + const self2 = this; + return start2; + function start2(code) { + return factoryLabel.call( + self2, + effects, + afterLabel, + nok, + "reference", + "referenceMarker", + "referenceString" + )(code); + } + function afterLabel(code) { + return self2.parser.defined.includes( + normalizeIdentifier( + self2.sliceSerialize(self2.events[self2.events.length - 1][1]).slice(1, -1) + ) + ) ? ok(code) : nok(code); + } + } + function tokenizeCollapsedReference(effects, ok, nok) { + return start2; + function start2(code) { + effects.enter("reference"); + effects.enter("referenceMarker"); + effects.consume(code); + effects.exit("referenceMarker"); + return open; + } + function open(code) { + if (code === 93) { + effects.enter("referenceMarker"); + effects.consume(code); + effects.exit("referenceMarker"); + effects.exit("reference"); + return ok; + } + return nok(code); + } + } + const labelStartImage = { + name: "labelStartImage", + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll + }; + function tokenizeLabelStartImage(effects, ok, nok) { + const self2 = this; + return start2; + function start2(code) { + effects.enter("labelImage"); + effects.enter("labelImageMarker"); + effects.consume(code); + effects.exit("labelImageMarker"); + return open; + } + function open(code) { + if (code === 91) { + effects.enter("labelMarker"); + effects.consume(code); + effects.exit("labelMarker"); + effects.exit("labelImage"); + return after; + } + return nok(code); + } + function after(code) { + return code === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code) : ok(code); + } + } + const labelStartLink = { + name: "labelStartLink", + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll + }; + function tokenizeLabelStartLink(effects, ok, nok) { + const self2 = this; + return start2; + function start2(code) { + effects.enter("labelLink"); + effects.enter("labelMarker"); + effects.consume(code); + effects.exit("labelMarker"); + effects.exit("labelLink"); + return after; + } + function after(code) { + return code === 94 && "_hiddenFootnoteSupport" in self2.parser.constructs ? nok(code) : ok(code); + } + } + const lineEnding = { + name: "lineEnding", + tokenize: tokenizeLineEnding + }; + function tokenizeLineEnding(effects, ok) { + return start2; + function start2(code) { + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + return factorySpace(effects, ok, "linePrefix"); + } + } + const thematicBreak = { + name: "thematicBreak", + tokenize: tokenizeThematicBreak + }; + function tokenizeThematicBreak(effects, ok, nok) { + let size2 = 0; + let marker; + return start2; + function start2(code) { + effects.enter("thematicBreak"); + marker = code; + return atBreak(code); + } + function atBreak(code) { + if (code === marker) { + effects.enter("thematicBreakSequence"); + return sequence2(code); + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, "whitespace")(code); + } + if (size2 < 3 || code !== null && !markdownLineEnding(code)) { + return nok(code); + } + effects.exit("thematicBreak"); + return ok(code); + } + function sequence2(code) { + if (code === marker) { + effects.consume(code); + size2++; + return sequence2; + } + effects.exit("thematicBreakSequence"); + return atBreak(code); + } + } + const list = { + name: "list", + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd + }; + const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true + }; + const indentConstruct = { + tokenize: tokenizeIndent, + partial: true + }; + function tokenizeListStart(effects, ok, nok) { + const self2 = this; + const tail = self2.events[self2.events.length - 1]; + let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0; + let size2 = 0; + return start2; + function start2(code) { + const kind = self2.containerState.type || (code === 42 || code === 43 || code === 45 ? "listUnordered" : "listOrdered"); + if (kind === "listUnordered" ? !self2.containerState.marker || code === self2.containerState.marker : asciiDigit(code)) { + if (!self2.containerState.type) { + self2.containerState.type = kind; + effects.enter(kind, { + _container: true + }); + } + if (kind === "listUnordered") { + effects.enter("listItemPrefix"); + return code === 42 || code === 45 ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code); + } + if (!self2.interrupt || code === 49) { + effects.enter("listItemPrefix"); + effects.enter("listItemValue"); + return inside(code); + } + } + return nok(code); + } + function inside(code) { + if (asciiDigit(code) && ++size2 < 10) { + effects.consume(code); + return inside; + } + if ((!self2.interrupt || size2 < 2) && (self2.containerState.marker ? code === self2.containerState.marker : code === 41 || code === 46)) { + effects.exit("listItemValue"); + return atMarker(code); + } + return nok(code); + } + function atMarker(code) { + effects.enter("listItemMarker"); + effects.consume(code); + effects.exit("listItemMarker"); + self2.containerState.marker = self2.containerState.marker || code; + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self2.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ); + } + function onBlank(code) { + self2.containerState.initialBlankLine = true; + initialSize++; + return endOfPrefix(code); + } + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter("listItemPrefixWhitespace"); + effects.consume(code); + effects.exit("listItemPrefixWhitespace"); + return endOfPrefix; + } + return nok(code); + } + function endOfPrefix(code) { + self2.containerState.size = initialSize + self2.sliceSerialize(effects.exit("listItemPrefix"), true).length; + return ok(code); + } + } + function tokenizeListContinuation(effects, ok, nok) { + const self2 = this; + self2.containerState._closeFlow = void 0; + return effects.check(blankLine, onBlank, notBlank); + function onBlank(code) { + self2.containerState.furtherBlankLines = self2.containerState.furtherBlankLines || self2.containerState.initialBlankLine; + return factorySpace( + effects, + ok, + "listItemIndent", + self2.containerState.size + 1 + )(code); + } + function notBlank(code) { + if (self2.containerState.furtherBlankLines || !markdownSpace(code)) { + self2.containerState.furtherBlankLines = void 0; + self2.containerState.initialBlankLine = void 0; + return notInCurrentItem(code); + } + self2.containerState.furtherBlankLines = void 0; + self2.containerState.initialBlankLine = void 0; + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code); + } + function notInCurrentItem(code) { + self2.containerState._closeFlow = true; + self2.interrupt = void 0; + return factorySpace( + effects, + effects.attempt(list, ok, nok), + "linePrefix", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + )(code); + } + } + function tokenizeIndent(effects, ok, nok) { + const self2 = this; + return factorySpace( + effects, + afterPrefix, + "listItemIndent", + self2.containerState.size + 1 + ); + function afterPrefix(code) { + const tail = self2.events[self2.events.length - 1]; + return tail && tail[1].type === "listItemIndent" && tail[2].sliceSerialize(tail[1], true).length === self2.containerState.size ? ok(code) : nok(code); + } + } + function tokenizeListEnd(effects) { + effects.exit(this.containerState.type); + } + function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self2 = this; + return factorySpace( + effects, + afterPrefix, + "listItemPrefixWhitespace", + self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1 + ); + function afterPrefix(code) { + const tail = self2.events[self2.events.length - 1]; + return !markdownSpace(code) && tail && tail[1].type === "listItemPrefixWhitespace" ? ok(code) : nok(code); + } + } + const setextUnderline = { + name: "setextUnderline", + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline + }; + function resolveToSetextUnderline(events, context) { + let index2 = events.length; + let content2; + let text2; + let definition2; + while (index2--) { + if (events[index2][0] === "enter") { + if (events[index2][1].type === "content") { + content2 = index2; + break; + } + if (events[index2][1].type === "paragraph") { + text2 = index2; + } + } else { + if (events[index2][1].type === "content") { + events.splice(index2, 1); + } + if (!definition2 && events[index2][1].type === "definition") { + definition2 = index2; + } + } + } + const heading = { + type: "setextHeading", + start: Object.assign({}, events[text2][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + }; + events[text2][1].type = "setextHeadingText"; + if (definition2) { + events.splice(text2, 0, ["enter", heading, context]); + events.splice(definition2 + 1, 0, ["exit", events[content2][1], context]); + events[content2][1].end = Object.assign({}, events[definition2][1].end); + } else { + events[content2][1] = heading; + } + events.push(["exit", heading, context]); + return events; + } + function tokenizeSetextUnderline(effects, ok, nok) { + const self2 = this; + let index2 = self2.events.length; + let marker; + let paragraph; + while (index2--) { + if (self2.events[index2][1].type !== "lineEnding" && self2.events[index2][1].type !== "linePrefix" && self2.events[index2][1].type !== "content") { + paragraph = self2.events[index2][1].type === "paragraph"; + break; + } + } + return start2; + function start2(code) { + if (!self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph)) { + effects.enter("setextHeadingLine"); + effects.enter("setextHeadingLineSequence"); + marker = code; + return closingSequence(code); + } + return nok(code); + } + function closingSequence(code) { + if (code === marker) { + effects.consume(code); + return closingSequence; + } + effects.exit("setextHeadingLineSequence"); + return factorySpace(effects, closingSequenceEnd, "lineSuffix")(code); + } + function closingSequenceEnd(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit("setextHeadingLine"); + return ok(code); + } + return nok(code); + } + } + const flow$1 = { + tokenize: initializeFlow + }; + function initializeFlow(effects) { + const self2 = this; + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content, afterConstruct) + ), + "linePrefix" + ) + ) + ); + return initial; + function atBlankEnding(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("lineEndingBlank"); + effects.consume(code); + effects.exit("lineEndingBlank"); + self2.currentConstruct = void 0; + return initial; + } + function afterConstruct(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("lineEnding"); + effects.consume(code); + effects.exit("lineEnding"); + self2.currentConstruct = void 0; + return initial; + } + } + const resolver = { + resolveAll: createResolver() + }; + const string$1 = initializeFactory("string"); + const text$1 = initializeFactory("text"); + function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === "text" ? resolveAllLineSuffixes : void 0 + ) + }; + function initializeText(effects) { + const self2 = this; + const constructs2 = this.parser.constructs[field]; + const text2 = effects.attempt(constructs2, start2, notText); + return start2; + function start2(code) { + return atBreak(code) ? text2(code) : notText(code); + } + function notText(code) { + if (code === null) { + effects.consume(code); + return; + } + effects.enter("data"); + effects.consume(code); + return data; + } + function data(code) { + if (atBreak(code)) { + effects.exit("data"); + return text2(code); + } + effects.consume(code); + return data; + } + function atBreak(code) { + if (code === null) { + return true; + } + const list2 = constructs2[code]; + let index2 = -1; + if (list2) { + while (++index2 < list2.length) { + const item = list2[index2]; + if (!item.previous || item.previous.call(self2, self2.previous)) { + return true; + } + } + } + return false; + } + } + } + function createResolver(extraResolver) { + return resolveAllText; + function resolveAllText(events, context) { + let index2 = -1; + let enter2; + while (++index2 <= events.length) { + if (enter2 === void 0) { + if (events[index2] && events[index2][1].type === "data") { + enter2 = index2; + index2++; + } + } else if (!events[index2] || events[index2][1].type !== "data") { + if (index2 !== enter2 + 2) { + events[enter2][1].end = events[index2 - 1][1].end; + events.splice(enter2 + 2, index2 - enter2 - 2); + index2 = enter2 + 2; + } + enter2 = void 0; + } + } + return extraResolver ? extraResolver(events, context) : events; + } + } + function resolveAllLineSuffixes(events, context) { + let eventIndex = 0; + while (++eventIndex <= events.length) { + if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") { + const data = events[eventIndex - 1][1]; + const chunks = context.sliceStream(data); + let index2 = chunks.length; + let bufferIndex = -1; + let size2 = 0; + let tabs; + while (index2--) { + const chunk = chunks[index2]; + if (typeof chunk === "string") { + bufferIndex = chunk.length; + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size2++; + bufferIndex--; + } + if (bufferIndex) + break; + bufferIndex = -1; + } else if (chunk === -2) { + tabs = true; + size2++; + } else if (chunk === -1) + ; + else { + index2++; + break; + } + } + if (size2) { + const token2 = { + type: eventIndex === events.length || tabs || size2 < 2 ? "lineSuffix" : "hardBreakTrailing", + start: { + line: data.end.line, + column: data.end.column - size2, + offset: data.end.offset - size2, + _index: data.start._index + index2, + _bufferIndex: index2 ? bufferIndex : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + }; + data.end = Object.assign({}, token2.start); + if (data.start.offset === data.end.offset) { + Object.assign(data, token2); + } else { + events.splice( + eventIndex, + 0, + ["enter", token2, context], + ["exit", token2, context] + ); + eventIndex += 2; + } + } + eventIndex++; + } + } + return events; + } + function createTokenizer(parser2, initialize2, from2) { + let point2 = Object.assign( + from2 ? Object.assign({}, from2) : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ); + const columnStart = {}; + const resolveAllConstructs = []; + let chunks = []; + let stack = []; + const effects = { + consume, + enter: enter2, + exit: exit2, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + }; + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser: parser2, + sliceStream, + sliceSerialize, + now: now2, + defineSkip, + write: write2 + }; + let state2 = initialize2.tokenize.call(context, effects); + if (initialize2.resolveAll) { + resolveAllConstructs.push(initialize2); + } + return context; + function write2(slice2) { + chunks = push(chunks, slice2); + main(); + if (chunks[chunks.length - 1] !== null) { + return []; + } + addResult(initialize2, 0); + context.events = resolveAll(resolveAllConstructs, context.events, context); + return context.events; + } + function sliceSerialize(token2, expandTabs) { + return serializeChunks(sliceStream(token2), expandTabs); + } + function sliceStream(token2) { + return sliceChunks(chunks, token2); + } + function now2() { + return Object.assign({}, point2); + } + function defineSkip(value2) { + columnStart[value2.line] = value2.column; + accountForPotentialSkip(); + } + function main() { + let chunkIndex; + while (point2._index < chunks.length) { + const chunk = chunks[point2._index]; + if (typeof chunk === "string") { + chunkIndex = point2._index; + if (point2._bufferIndex < 0) { + point2._bufferIndex = 0; + } + while (point2._index === chunkIndex && point2._bufferIndex < chunk.length) { + go(chunk.charCodeAt(point2._bufferIndex)); + } + } else { + go(chunk); + } + } + } + function go(code) { + state2 = state2(code); + } + function consume(code) { + if (markdownLineEnding(code)) { + point2.line++; + point2.column = 1; + point2.offset += code === -3 ? 2 : 1; + accountForPotentialSkip(); + } else if (code !== -1) { + point2.column++; + point2.offset++; + } + if (point2._bufferIndex < 0) { + point2._index++; + } else { + point2._bufferIndex++; + if (point2._bufferIndex === chunks[point2._index].length) { + point2._bufferIndex = -1; + point2._index++; + } + } + context.previous = code; + } + function enter2(type2, fields) { + const token2 = fields || {}; + token2.type = type2; + token2.start = now2(); + context.events.push(["enter", token2, context]); + stack.push(token2); + return token2; + } + function exit2(type2) { + const token2 = stack.pop(); + token2.end = now2(); + context.events.push(["exit", token2, context]); + return token2; + } + function onsuccessfulconstruct(construct2, info2) { + addResult(construct2, info2.from); + } + function onsuccessfulcheck(_2, info2) { + info2.restore(); + } + function constructFactory(onreturn, fields) { + return hook; + function hook(constructs2, returnState, bogusState) { + let listOfConstructs; + let constructIndex; + let currentConstruct; + let info2; + return Array.isArray(constructs2) ? ( + /* c8 ignore next 1 */ + handleListOfConstructs(constructs2) + ) : "tokenize" in constructs2 ? handleListOfConstructs([constructs2]) : handleMapOfConstructs(constructs2); + function handleMapOfConstructs(map2) { + return start2; + function start2(code) { + const def = code !== null && map2[code]; + const all2 = code !== null && map2.null; + const list2 = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...Array.isArray(def) ? def : def ? [def] : [], + ...Array.isArray(all2) ? all2 : all2 ? [all2] : [] + ]; + return handleListOfConstructs(list2)(code); + } + } + function handleListOfConstructs(list2) { + listOfConstructs = list2; + constructIndex = 0; + if (list2.length === 0) { + return bogusState; + } + return handleConstruct(list2[constructIndex]); + } + function handleConstruct(construct2) { + return start2; + function start2(code) { + info2 = store(); + currentConstruct = construct2; + if (!construct2.partial) { + context.currentConstruct = construct2; + } + if (construct2.name && context.parser.constructs.disable.null.includes(construct2.name)) { + return nok(); + } + return construct2.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code); + } + } + function ok(code) { + onreturn(currentConstruct, info2); + return returnState; + } + function nok(code) { + info2.restore(); + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]); + } + return bogusState; + } + } + } + function addResult(construct2, from3) { + if (construct2.resolveAll && !resolveAllConstructs.includes(construct2)) { + resolveAllConstructs.push(construct2); + } + if (construct2.resolve) { + splice( + context.events, + from3, + context.events.length - from3, + construct2.resolve(context.events.slice(from3), context) + ); + } + if (construct2.resolveTo) { + context.events = construct2.resolveTo(context.events, context); + } + } + function store() { + const startPoint = now2(); + const startPrevious = context.previous; + const startCurrentConstruct = context.currentConstruct; + const startEventsIndex = context.events.length; + const startStack = Array.from(stack); + return { + restore, + from: startEventsIndex + }; + function restore() { + point2 = startPoint; + context.previous = startPrevious; + context.currentConstruct = startCurrentConstruct; + context.events.length = startEventsIndex; + stack = startStack; + accountForPotentialSkip(); + } + } + function accountForPotentialSkip() { + if (point2.line in columnStart && point2.column < 2) { + point2.column = columnStart[point2.line]; + point2.offset += columnStart[point2.line] - 1; + } + } + } + function sliceChunks(chunks, token2) { + const startIndex = token2.start._index; + const startBufferIndex = token2.start._bufferIndex; + const endIndex = token2.end._index; + const endBufferIndex = token2.end._bufferIndex; + let view; + if (startIndex === endIndex) { + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]; + } else { + view = chunks.slice(startIndex, endIndex); + if (startBufferIndex > -1) { + view[0] = view[0].slice(startBufferIndex); + } + if (endBufferIndex > 0) { + view.push(chunks[endIndex].slice(0, endBufferIndex)); + } + } + return view; + } + function serializeChunks(chunks, expandTabs) { + let index2 = -1; + const result = []; + let atTab; + while (++index2 < chunks.length) { + const chunk = chunks[index2]; + let value2; + if (typeof chunk === "string") { + value2 = chunk; + } else + switch (chunk) { + case -5: { + value2 = "\r"; + break; + } + case -4: { + value2 = "\n"; + break; + } + case -3: { + value2 = "\r\n"; + break; + } + case -2: { + value2 = expandTabs ? " " : " "; + break; + } + case -1: { + if (!expandTabs && atTab) + continue; + value2 = " "; + break; + } + default: { + value2 = String.fromCharCode(chunk); + } + } + atTab = chunk === -2; + result.push(value2); + } + return result.join(""); + } + const document$1 = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote + }; + const contentInitial = { + [91]: definition + }; + const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented + }; + const flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced + }; + const string = { + [38]: characterReference, + [92]: characterEscape + }; + const text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText + }; + const insideSpan = { + null: [attention, resolver] + }; + const attentionMarkers = { + null: [42, 95] + }; + const disable = { + null: [] + }; + const defaultConstructs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + attentionMarkers, + contentInitial, + disable, + document: document$1, + flow, + flowInitial, + insideSpan, + string, + text + }, Symbol.toStringTag, { value: "Module" })); + function parse$1(options2 = {}) { + const constructs2 = combineExtensions( + // @ts-expect-error Same as above. + [defaultConstructs].concat(options2.extensions || []) + ); + const parser2 = { + defined: [], + lazy: {}, + constructs: constructs2, + content: create2(content$1), + document: create2(document$2), + flow: create2(flow$1), + string: create2(string$1), + text: create2(text$1) + }; + return parser2; + function create2(initial) { + return creator2; + function creator2(from2) { + return createTokenizer(parser2, initial, from2); + } + } + } + const search = /[\0\t\n\r]/g; + function preprocess() { + let column2 = 1; + let buffer = ""; + let start2 = true; + let atCarriageReturn; + return preprocessor; + function preprocessor(value2, encoding, end2) { + const chunks = []; + let match; + let next2; + let startPosition; + let endPosition; + let code; + value2 = buffer + value2.toString(encoding); + startPosition = 0; + buffer = ""; + if (start2) { + if (value2.charCodeAt(0) === 65279) { + startPosition++; + } + start2 = void 0; + } + while (startPosition < value2.length) { + search.lastIndex = startPosition; + match = search.exec(value2); + endPosition = match && match.index !== void 0 ? match.index : value2.length; + code = value2.charCodeAt(endPosition); + if (!match) { + buffer = value2.slice(startPosition); + break; + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3); + atCarriageReturn = void 0; + } else { + if (atCarriageReturn) { + chunks.push(-5); + atCarriageReturn = void 0; + } + if (startPosition < endPosition) { + chunks.push(value2.slice(startPosition, endPosition)); + column2 += endPosition - startPosition; + } + switch (code) { + case 0: { + chunks.push(65533); + column2++; + break; + } + case 9: { + next2 = Math.ceil(column2 / 4) * 4; + chunks.push(-2); + while (column2++ < next2) + chunks.push(-1); + break; + } + case 10: { + chunks.push(-4); + column2 = 1; + break; + } + default: { + atCarriageReturn = true; + column2 = 1; + } + } + } + startPosition = endPosition + 1; + } + if (end2) { + if (atCarriageReturn) + chunks.push(-5); + if (buffer) + chunks.push(buffer); + chunks.push(null); + } + return chunks; + } + } + function postprocess(events) { + while (!subtokenize(events)) { + } + return events; + } + function decodeNumericCharacterReference(value2, base) { + const code = Number.parseInt(value2, base); + if ( + // C0 except for HT, LF, FF, CR, space + code < 9 || code === 11 || code > 13 && code < 32 || // Control character (DEL) of the basic block and C1 controls. + code > 126 && code < 160 || // Lone high surrogates and low surrogates. + code > 55295 && code < 57344 || // Noncharacters. + code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || // Out of range + code > 1114111 + ) { + return "�"; + } + return String.fromCharCode(code); + } + const characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; + function decodeString(value2) { + return value2.replace(characterEscapeOrReference, decode); + } + function decode($0, $1, $2) { + if ($1) { + return $1; + } + const head2 = $2.charCodeAt(0); + if (head2 === 35) { + const head3 = $2.charCodeAt(1); + const hex2 = head3 === 120 || head3 === 88; + return decodeNumericCharacterReference($2.slice(hex2 ? 2 : 1), hex2 ? 16 : 10); + } + return decodeNamedCharacterReference($2) || $0; + } + function stringifyPosition(value2) { + if (!value2 || typeof value2 !== "object") { + return ""; + } + if ("position" in value2 || "type" in value2) { + return position(value2.position); + } + if ("start" in value2 || "end" in value2) { + return position(value2); + } + if ("line" in value2 || "column" in value2) { + return point$1(value2); + } + return ""; + } + function point$1(point2) { + return index(point2 && point2.line) + ":" + index(point2 && point2.column); + } + function position(pos) { + return point$1(pos && pos.start) + "-" + point$1(pos && pos.end); + } + function index(value2) { + return value2 && typeof value2 === "number" ? value2 : 1; + } + const own = {}.hasOwnProperty; + const fromMarkdown = ( + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function(value2, encoding, options2) { + if (typeof encoding !== "string") { + options2 = encoding; + encoding = void 0; + } + return compiler(options2)( + postprocess( + // @ts-expect-error: micromark types need to accept `null`. + parse$1(options2).document().write(preprocess()(value2, encoding, true)) + ) + ); + } + ); + function compiler(options2) { + const config2 = { + transforms: [], + canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], + enter: { + autolink: opener(link2), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote2), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText2, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition2), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html2, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html2, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link2), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list2, onenterlistordered), + listUnordered: opener(list2), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak2) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + }; + configure(config2, (options2 || {}).mdastExtensions || []); + const data = {}; + return compile2; + function compile2(events) { + let tree = { + type: "root", + children: [] + }; + const context = { + stack: [tree], + tokenStack: [], + config: config2, + enter: enter2, + exit: exit2, + buffer, + resume, + setData, + getData + }; + const listStack = []; + let index2 = -1; + while (++index2 < events.length) { + if (events[index2][1].type === "listOrdered" || events[index2][1].type === "listUnordered") { + if (events[index2][0] === "enter") { + listStack.push(index2); + } else { + const tail = listStack.pop(); + index2 = prepareList(events, tail, index2); + } + } + } + index2 = -1; + while (++index2 < events.length) { + const handler = config2[events[index2][0]]; + if (own.call(handler, events[index2][1].type)) { + handler[events[index2][1].type].call( + Object.assign( + { + sliceSerialize: events[index2][2].sliceSerialize + }, + context + ), + events[index2][1] + ); + } + } + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1]; + const handler = tail[1] || defaultOnError; + handler.call(context, void 0, tail[0]); + } + tree.position = { + start: point( + events.length > 0 ? events[0][1].start : { + line: 1, + column: 1, + offset: 0 + } + ), + end: point( + events.length > 0 ? events[events.length - 2][1].end : { + line: 1, + column: 1, + offset: 0 + } + ) + }; + index2 = -1; + while (++index2 < config2.transforms.length) { + tree = config2.transforms[index2](tree) || tree; + } + return tree; + } + function prepareList(events, start2, length2) { + let index2 = start2 - 1; + let containerBalance = -1; + let listSpread = false; + let listItem2; + let lineIndex; + let firstBlankLineIndex; + let atMarker; + while (++index2 <= length2) { + const event = events[index2]; + if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") { + if (event[0] === "enter") { + containerBalance++; + } else { + containerBalance--; + } + atMarker = void 0; + } else if (event[1].type === "lineEndingBlank") { + if (event[0] === "enter") { + if (listItem2 && !atMarker && !containerBalance && !firstBlankLineIndex) { + firstBlankLineIndex = index2; + } + atMarker = void 0; + } + } else if (event[1].type === "linePrefix" || event[1].type === "listItemValue" || event[1].type === "listItemMarker" || event[1].type === "listItemPrefix" || event[1].type === "listItemPrefixWhitespace") + ; + else { + atMarker = void 0; + } + if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) { + if (listItem2) { + let tailIndex = index2; + lineIndex = void 0; + while (tailIndex--) { + const tailEvent = events[tailIndex]; + if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") { + if (tailEvent[0] === "exit") + continue; + if (lineIndex) { + events[lineIndex][1].type = "lineEndingBlank"; + listSpread = true; + } + tailEvent[1].type = "lineEnding"; + lineIndex = tailIndex; + } else if (tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent") + ; + else { + break; + } + } + if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) { + listItem2._spread = true; + } + listItem2.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ); + events.splice(lineIndex || index2, 0, ["exit", listItem2, event[2]]); + index2++; + length2++; + } + if (event[1].type === "listItemPrefix") { + listItem2 = { + type: "listItem", + // @ts-expect-error Patched + _spread: false, + start: Object.assign({}, event[1].start) + }; + events.splice(index2, 0, ["enter", listItem2, event[2]]); + index2++; + length2++; + firstBlankLineIndex = void 0; + atMarker = true; + } + } + } + events[start2][1]._spread = listSpread; + return length2; + } + function setData(key, value2) { + data[key] = value2; + } + function getData(key) { + return data[key]; + } + function opener(create2, and) { + return open; + function open(token2) { + enter2.call(this, create2(token2), token2); + if (and) + and.call(this, token2); + } + } + function buffer() { + this.stack.push({ + type: "fragment", + children: [] + }); + } + function enter2(node2, token2, errorHandler) { + const parent = this.stack[this.stack.length - 1]; + parent.children.push(node2); + this.stack.push(node2); + this.tokenStack.push([token2, errorHandler]); + node2.position = { + start: point(token2.start) + }; + return node2; + } + function closer(and) { + return close; + function close(token2) { + if (and) + and.call(this, token2); + exit2.call(this, token2); + } + } + function exit2(token2, onExitError) { + const node2 = this.stack.pop(); + const open = this.tokenStack.pop(); + if (!open) { + throw new Error( + "Cannot close `" + token2.type + "` (" + stringifyPosition({ + start: token2.start, + end: token2.end + }) + "): it’s not open" + ); + } else if (open[0].type !== token2.type) { + if (onExitError) { + onExitError.call(this, token2, open[0]); + } else { + const handler = open[1] || defaultOnError; + handler.call(this, token2, open[0]); + } + } + node2.position.end = point(token2.end); + return node2; + } + function resume() { + return toString(this.stack.pop()); + } + function onenterlistordered() { + setData("expectingFirstListItemValue", true); + } + function onenterlistitemvalue(token2) { + if (getData("expectingFirstListItemValue")) { + const ancestor = this.stack[this.stack.length - 2]; + ancestor.start = Number.parseInt(this.sliceSerialize(token2), 10); + setData("expectingFirstListItemValue"); + } + } + function onexitcodefencedfenceinfo() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.lang = data2; + } + function onexitcodefencedfencemeta() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.meta = data2; + } + function onexitcodefencedfence() { + if (getData("flowCodeInside")) + return; + this.buffer(); + setData("flowCodeInside", true); + } + function onexitcodefenced() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.value = data2.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""); + setData("flowCodeInside"); + } + function onexitcodeindented() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.value = data2.replace(/(\r?\n|\r)$/g, ""); + } + function onexitdefinitionlabelstring(token2) { + const label = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.label = label; + node2.identifier = normalizeIdentifier( + this.sliceSerialize(token2) + ).toLowerCase(); + } + function onexitdefinitiontitlestring() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.title = data2; + } + function onexitdefinitiondestinationstring() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.url = data2; + } + function onexitatxheadingsequence(token2) { + const node2 = this.stack[this.stack.length - 1]; + if (!node2.depth) { + const depth = this.sliceSerialize(token2).length; + node2.depth = depth; + } + } + function onexitsetextheadingtext() { + setData("setextHeadingSlurpLineEnding", true); + } + function onexitsetextheadinglinesequence(token2) { + const node2 = this.stack[this.stack.length - 1]; + node2.depth = this.sliceSerialize(token2).charCodeAt(0) === 61 ? 1 : 2; + } + function onexitsetextheading() { + setData("setextHeadingSlurpLineEnding"); + } + function onenterdata(token2) { + const node2 = this.stack[this.stack.length - 1]; + let tail = node2.children[node2.children.length - 1]; + if (!tail || tail.type !== "text") { + tail = text2(); + tail.position = { + start: point(token2.start) + }; + node2.children.push(tail); + } + this.stack.push(tail); + } + function onexitdata(token2) { + const tail = this.stack.pop(); + tail.value += this.sliceSerialize(token2); + tail.position.end = point(token2.end); + } + function onexitlineending(token2) { + const context = this.stack[this.stack.length - 1]; + if (getData("atHardBreak")) { + const tail = context.children[context.children.length - 1]; + tail.position.end = point(token2.end); + setData("atHardBreak"); + return; + } + if (!getData("setextHeadingSlurpLineEnding") && config2.canContainEols.includes(context.type)) { + onenterdata.call(this, token2); + onexitdata.call(this, token2); + } + } + function onexithardbreak() { + setData("atHardBreak", true); + } + function onexithtmlflow() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.value = data2; + } + function onexithtmltext() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.value = data2; + } + function onexitcodetext() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.value = data2; + } + function onexitlink() { + const node2 = this.stack[this.stack.length - 1]; + if (getData("inReference")) { + const referenceType = getData("referenceType") || "shortcut"; + node2.type += "Reference"; + node2.referenceType = referenceType; + delete node2.url; + delete node2.title; + } else { + delete node2.identifier; + delete node2.label; + } + setData("referenceType"); + } + function onexitimage() { + const node2 = this.stack[this.stack.length - 1]; + if (getData("inReference")) { + const referenceType = getData("referenceType") || "shortcut"; + node2.type += "Reference"; + node2.referenceType = referenceType; + delete node2.url; + delete node2.title; + } else { + delete node2.identifier; + delete node2.label; + } + setData("referenceType"); + } + function onexitlabeltext(token2) { + const string2 = this.sliceSerialize(token2); + const ancestor = this.stack[this.stack.length - 2]; + ancestor.label = decodeString(string2); + ancestor.identifier = normalizeIdentifier(string2).toLowerCase(); + } + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1]; + const value2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + setData("inReference", true); + if (node2.type === "link") { + const children2 = fragment.children; + node2.children = children2; + } else { + node2.alt = value2; + } + } + function onexitresourcedestinationstring() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.url = data2; + } + function onexitresourcetitlestring() { + const data2 = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.title = data2; + } + function onexitresource() { + setData("inReference"); + } + function onenterreference() { + setData("referenceType", "collapsed"); + } + function onexitreferencestring(token2) { + const label = this.resume(); + const node2 = this.stack[this.stack.length - 1]; + node2.label = label; + node2.identifier = normalizeIdentifier( + this.sliceSerialize(token2) + ).toLowerCase(); + setData("referenceType", "full"); + } + function onexitcharacterreferencemarker(token2) { + setData("characterReferenceType", token2.type); + } + function onexitcharacterreferencevalue(token2) { + const data2 = this.sliceSerialize(token2); + const type2 = getData("characterReferenceType"); + let value2; + if (type2) { + value2 = decodeNumericCharacterReference( + data2, + type2 === "characterReferenceMarkerNumeric" ? 10 : 16 + ); + setData("characterReferenceType"); + } else { + const result = decodeNamedCharacterReference(data2); + value2 = result; + } + const tail = this.stack.pop(); + tail.value += value2; + tail.position.end = point(token2.end); + } + function onexitautolinkprotocol(token2) { + onexitdata.call(this, token2); + const node2 = this.stack[this.stack.length - 1]; + node2.url = this.sliceSerialize(token2); + } + function onexitautolinkemail(token2) { + onexitdata.call(this, token2); + const node2 = this.stack[this.stack.length - 1]; + node2.url = "mailto:" + this.sliceSerialize(token2); + } + function blockQuote2() { + return { + type: "blockquote", + children: [] + }; + } + function codeFlow() { + return { + type: "code", + lang: null, + meta: null, + value: "" + }; + } + function codeText2() { + return { + type: "inlineCode", + value: "" + }; + } + function definition2() { + return { + type: "definition", + identifier: "", + label: null, + title: null, + url: "" + }; + } + function emphasis() { + return { + type: "emphasis", + children: [] + }; + } + function heading() { + return { + type: "heading", + depth: void 0, + children: [] + }; + } + function hardBreak() { + return { + type: "break" + }; + } + function html2() { + return { + type: "html", + value: "" + }; + } + function image() { + return { + type: "image", + title: null, + url: "", + alt: null + }; + } + function link2() { + return { + type: "link", + title: null, + url: "", + children: [] + }; + } + function list2(token2) { + return { + type: "list", + ordered: token2.type === "listOrdered", + start: null, + // @ts-expect-error Patched. + spread: token2._spread, + children: [] + }; + } + function listItem(token2) { + return { + type: "listItem", + // @ts-expect-error Patched. + spread: token2._spread, + checked: null, + children: [] + }; + } + function paragraph() { + return { + type: "paragraph", + children: [] + }; + } + function strong() { + return { + type: "strong", + children: [] + }; + } + function text2() { + return { + type: "text", + value: "" + }; + } + function thematicBreak2() { + return { + type: "thematicBreak" + }; + } + } + function point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + }; + } + function configure(combined, extensions) { + let index2 = -1; + while (++index2 < extensions.length) { + const value2 = extensions[index2]; + if (Array.isArray(value2)) { + configure(combined, value2); + } else { + extension(combined, value2); + } + } + } + function extension(combined, extension2) { + let key; + for (key in extension2) { + if (own.call(extension2, key)) { + if (key === "canContainEols") { + const right2 = extension2[key]; + if (right2) { + combined[key].push(...right2); + } + } else if (key === "transforms") { + const right2 = extension2[key]; + if (right2) { + combined[key].push(...right2); + } + } else if (key === "enter" || key === "exit") { + const right2 = extension2[key]; + if (right2) { + Object.assign(combined[key], right2); + } + } + } + } + } + function defaultOnError(left2, right2) { + if (left2) { + throw new Error( + "Cannot close `" + left2.type + "` (" + stringifyPosition({ + start: left2.start, + end: left2.end + }) + "): a different token (`" + right2.type + "`, " + stringifyPosition({ + start: right2.start, + end: right2.end + }) + ") is open" + ); + } else { + throw new Error( + "Cannot close document, a token (`" + right2.type + "`, " + stringifyPosition({ + start: right2.start, + end: right2.end + }) + ") is still open" + ); + } + } + function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = dedent(withoutMultipleNewlines); + return withoutExtraSpaces; + } + function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children: children2 } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node2, parentType = "normal") { + if (node2.type === "text") { + const textLines = node2.value.split("\n"); + textLines.forEach((textLine, index2) => { + if (index2 !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node2.type === "strong" || node2.type === "emphasis") { + node2.children.forEach((contentNode) => { + processNode(contentNode, node2.type); + }); + } + } + children2.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; + } + function markdownToHTML(markdown) { + const { children: children2 } = fromMarkdown(markdown); + function output(node2) { + if (node2.type === "text") { + return node2.value.replace(/\n/g, "
"); + } else if (node2.type === "strong") { + return `${node2.children.map(output).join("")}`; + } else if (node2.type === "emphasis") { + return `${node2.children.map(output).join("")}`; + } else if (node2.type === "paragraph") { + return `

${node2.children.map(output).join("")}

`; + } + return `Unsupported markdown: ${node2.type}`; + } + return children2.map(output).join(""); + } + function splitTextToChars(text2) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text2)].map((s) => s.segment); + } + return [...text2]; + } + function splitWordToFitWidth(checkFit, word) { + const characters2 = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters2, word.type); + } + function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type2) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type: type2 }, + { content: "", type: type2 } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type: type2 }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type2); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type: type2 }, + { content: remainingChars.join(""), type: type2 } + ]; + } + function splitLineToFitWidth(line2, checkFit) { + if (line2.some(({ content: content2 }) => content2.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line2, checkFit); + } + function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line2, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line2]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); + } + function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } + } + function addHtmlSpan(element2, node2, width2, classes2, addBackground = false) { + const fo = element2.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node2.label; + const labelClass = node2.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + " + label + "" + ); + applyStyle(div, node2.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width2 + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width2) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width2 + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); + } + function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); + } + function computeWidthOfText(parentNode, lineHeight, line2) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line2); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; + } + function createFormattedText(width2, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line2 of structuredText) { + const checkWidth = (line22) => computeWidthOfText(labelGroup, lineHeight, line22) <= width2; + const linesUnderWidth = checkWidth(line2) ? [line2] : splitLineToFitWidth(line2, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding2 = 2; + bkg.attr("x", -padding2).attr("y", -padding2).attr("width", bbox.width + 2 * padding2).attr("height", bbox.height + 2 * padding2); + return labelGroup.node(); + } else { + return textElement.node(); + } + } + function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index2) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index2 === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); + } + const createText = (el, text2 = "", { + style = "", + isTitle = false, + classes: classes2 = "", + useHtmlLabels = true, + isNode = true, + width: width2 = 200, + addSvgBackground = false + } = {}) => { + log$1.info("createText", text2, style, isTitle, classes2, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText2 = markdownToHTML(text2); + const node2 = { + isNode, + label: decodeEntities(htmlText2).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node2, width2, classes2, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text2); + const svgLabel = createFormattedText(width2, el, structuredText, addSvgBackground); + return svgLabel; + } + }; + const labelHelper = async (parent, node2, _classes, isNode) => { + let classes2; + const useHtmlLabels = node2.useHtmlLabels || evaluate(getConfig$2().flowchart.htmlLabels); + if (!_classes) { + classes2 = "node default"; + } else { + classes2 = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node2.domId || node2.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node2.labelStyle); + let labelText; + if (node2.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node2.labelText === "string" ? node2.labelText : node2.labelText[0]; + } + const textNode = label.node(); + let text2; + if (node2.labelType === "markdown") { + text2 = createText(label, sanitizeText$6(decodeEntities(labelText), getConfig$2()), { + useHtmlLabels, + width: node2.width || getConfig$2().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text2 = textNode.appendChild( + createLabel$1( + sanitizeText$6(decodeEntities(labelText), getConfig$2()), + node2.labelStyle, + false, + isNode + ) + ); + } + let bbox = text2.getBBox(); + const halfPadding = node2.padding / 2; + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = text2.children[0]; + const dv = d3select(text2); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = getConfig$2().fontSize ? getConfig$2().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + img.style.width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node2.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; + }; + const updateNodeBounds = (node2, element2) => { + const bbox = element2.node().getBBox(); + node2.width = bbox.width; + node2.height = bbox.height; + }; + function insertPolygonShape$1(parent, w2, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w2 / 2 + "," + h / 2 + ")"); + } + let clusterDb = {}; + let descendants = {}; + let parents = {}; + const clear$i = () => { + descendants = {}; + parents = {}; + clusterDb = {}; + }; + const isDescendant = (id2, ancenstorId) => { + log$1.trace("In isDecendant", ancenstorId, " ", id2, " = ", descendants[ancenstorId].includes(id2)); + if (descendants[ancenstorId].includes(id2)) { + return true; + } + return false; + }; + const edgeInCluster = (edge, clusterId) => { + log$1.info("Decendants of ", clusterId, " is ", descendants[clusterId]); + log$1.info("Edge is ", edge); + if (edge.v === clusterId) { + return false; + } + if (edge.w === clusterId) { + return false; + } + if (!descendants[clusterId]) { + log$1.debug("Tilt, ", clusterId, ",not in decendants"); + return false; + } + return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); + }; + const copy = (clusterId, graph, newGraph, rootId) => { + log$1.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); + const nodes2 = graph.children(clusterId) || []; + if (clusterId !== rootId) { + nodes2.push(clusterId); + } + log$1.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes2); + nodes2.forEach((node2) => { + if (graph.children(node2).length > 0) { + copy(node2, graph, newGraph, rootId); + } else { + const data = graph.node(node2); + log$1.info("cp ", node2, " to ", rootId, " with parent ", clusterId); + newGraph.setNode(node2, data); + if (rootId !== graph.parent(node2)) { + log$1.warn("Setting parent", node2, graph.parent(node2)); + newGraph.setParent(node2, graph.parent(node2)); + } + if (clusterId !== rootId && node2 !== clusterId) { + log$1.debug("Setting parent", node2, clusterId); + newGraph.setParent(node2, clusterId); + } else { + log$1.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + log$1.debug( + "Not Setting parent for node=", + node2, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node2 !== clusterId + ); + } + const edges2 = graph.edges(node2); + log$1.debug("Copying Edges", edges2); + edges2.forEach((edge) => { + log$1.info("Edge", edge); + const data2 = graph.edge(edge.v, edge.w, edge.name); + log$1.info("Edge data", data2, rootId); + try { + if (edgeInCluster(edge, rootId)) { + log$1.info("Copying as ", edge.v, edge.w, data2, edge.name); + newGraph.setEdge(edge.v, edge.w, data2, edge.name); + log$1.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + log$1.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); + } + } catch (e) { + log$1.error(e); + } + }); + } + log$1.debug("Removing node", node2); + graph.removeNode(node2); + }); + }; + const extractDescendants = (id2, graph) => { + const children2 = graph.children(id2); + let res = [...children2]; + for (const child of children2) { + parents[child] = id2; + res = [...res, ...extractDescendants(child, graph)]; + } + return res; + }; + const findNonClusterChild = (id2, graph) => { + log$1.trace("Searching", id2); + const children2 = graph.children(id2); + log$1.trace("Searching children of id ", id2, children2); + if (children2.length < 1) { + log$1.trace("This is a valid node", id2); + return id2; + } + for (const child of children2) { + const _id = findNonClusterChild(child, graph); + if (_id) { + log$1.trace("Found replacement for", id2, " => ", _id); + return _id; + } + } + }; + const getAnchorId = (id2) => { + if (!clusterDb[id2]) { + return id2; + } + if (!clusterDb[id2].externalConnections) { + return id2; + } + if (clusterDb[id2]) { + return clusterDb[id2].id; + } + return id2; + }; + const adjustClustersAndEdges = (graph, depth) => { + if (!graph || depth > 10) { + log$1.debug("Opting out, no graph "); + return; + } else { + log$1.debug("Opting in, graph "); + } + graph.nodes().forEach(function(id2) { + const children2 = graph.children(id2); + if (children2.length > 0) { + log$1.warn( + "Cluster identified", + id2, + " Replacement id in edges: ", + findNonClusterChild(id2, graph) + ); + descendants[id2] = extractDescendants(id2, graph); + clusterDb[id2] = { id: findNonClusterChild(id2, graph), clusterData: graph.node(id2) }; + } + }); + graph.nodes().forEach(function(id2) { + const children2 = graph.children(id2); + const edges2 = graph.edges(); + if (children2.length > 0) { + log$1.debug("Cluster identified", id2, descendants); + edges2.forEach((edge) => { + if (edge.v !== id2 && edge.w !== id2) { + const d1 = isDescendant(edge.v, id2); + const d2 = isDescendant(edge.w, id2); + if (d1 ^ d2) { + log$1.warn("Edge: ", edge, " leaves cluster ", id2); + log$1.warn("Decendants of XXX ", id2, ": ", descendants[id2]); + clusterDb[id2].externalConnections = true; + } + } + }); + } else { + log$1.debug("Not a cluster ", id2, descendants); + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + log$1.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + log$1.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + let v = e.v; + let w2 = e.w; + log$1.warn( + "Fix XXX", + clusterDb, + "ids:", + e.v, + e.w, + "Translating: ", + clusterDb[e.v], + " --- ", + clusterDb[e.w] + ); + if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { + log$1.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); + log$1.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w2 = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + const specialId = e.w + "---" + e.v; + graph.setNode(specialId, { + domId: specialId, + id: specialId, + labelStyle: "", + labelText: edge.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const edge1 = structuredClone(edge); + const edge2 = structuredClone(edge); + edge1.label = ""; + edge1.arrowTypeEnd = "none"; + edge2.label = ""; + edge1.fromCluster = e.v; + edge2.toCluster = e.v; + graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); + graph.setEdge(specialId, w2, edge2, e.name + "-cyclic-special"); + } else if (clusterDb[e.v] || clusterDb[e.w]) { + log$1.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w2 = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) { + edge.fromCluster = e.v; + } + if (w2 !== e.w) { + edge.toCluster = e.w; + } + log$1.warn("Fix Replacing with XXX", v, w2, e.name); + graph.setEdge(v, w2, edge, e.name); + } + }); + log$1.warn("Adjusted Graph", write(graph)); + extractor(graph, 0); + log$1.trace(clusterDb); + }; + const extractor = (graph, depth) => { + log$1.warn("extractor - ", depth, write(graph), graph.children("D")); + if (depth > 10) { + log$1.error("Bailing out"); + return; + } + let nodes2 = graph.nodes(); + let hasChildren = false; + for (const node2 of nodes2) { + const children2 = graph.children(node2); + hasChildren = hasChildren || children2.length > 0; + } + if (!hasChildren) { + log$1.debug("Done, no node has children", graph.nodes()); + return; + } + log$1.debug("Nodes = ", nodes2, depth); + for (const node2 of nodes2) { + log$1.debug( + "Extracting node", + node2, + clusterDb, + clusterDb[node2] && !clusterDb[node2].externalConnections, + !graph.parent(node2), + graph.node(node2), + graph.children("D"), + " Depth ", + depth + ); + if (!clusterDb[node2]) { + log$1.debug("Not a cluster", node2, depth); + } else if (!clusterDb[node2].externalConnections && // !graph.parent(node) && + graph.children(node2) && graph.children(node2).length > 0) { + log$1.warn( + "Cluster without external connections, without a parent and with children", + node2, + depth + ); + const graphSettings = graph.graph(); + let dir2 = graphSettings.rankdir === "TB" ? "LR" : "TB"; + if (clusterDb[node2] && clusterDb[node2].clusterData && clusterDb[node2].clusterData.dir) { + dir2 = clusterDb[node2].clusterData.dir; + log$1.warn("Fixing dir", clusterDb[node2].clusterData.dir, dir2); + } + const clusterGraph = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir2, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + log$1.warn("Old graph before copy", write(graph)); + copy(node2, graph, clusterGraph, node2); + graph.setNode(node2, { + clusterNode: true, + id: node2, + clusterData: clusterDb[node2].clusterData, + labelText: clusterDb[node2].labelText, + graph: clusterGraph + }); + log$1.warn("New graph after copy node: (", node2, ")", write(clusterGraph)); + log$1.debug("Old graph after copy", write(graph)); + } else { + log$1.warn( + "Cluster ** ", + node2, + " **not meeting the criteria !externalConnections:", + !clusterDb[node2].externalConnections, + " no parent: ", + !graph.parent(node2), + " children ", + graph.children(node2) && graph.children(node2).length > 0, + graph.children("D"), + depth + ); + log$1.debug(clusterDb); + } + } + nodes2 = graph.nodes(); + log$1.warn("New list of nodes", nodes2); + for (const node2 of nodes2) { + const data = graph.node(node2); + log$1.warn(" Now next level", node2, data); + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } + }; + const sorter = (graph, nodes2) => { + if (nodes2.length === 0) { + return []; + } + let result = Object.assign(nodes2); + nodes2.forEach((node2) => { + const children2 = graph.children(node2); + const sorted = sorter(graph, children2); + result = [...result, ...sorted]; + }); + return result; + }; + const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); + function intersectNode(node2, point2) { + return node2.intersect(point2); + } + function intersectEllipse(node2, rx, ry, point2) { + var cx = node2.x; + var cy = node2.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; + } + function intersectCircle(node2, rx, point2) { + return intersectEllipse(node2, rx, rx, point2); + } + function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x2, y2; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x2 = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y2 = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x: x2, y: y2 }; + } + function sameSign(r1, r2) { + return r1 * r2 > 0; + } + function intersectPolygon(node2, polyPoints, point2) { + var x1 = node2.x; + var y1 = node2.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left2 = x1 - node2.width / 2 - minX; + var top2 = y1 - node2.height / 2 - minY; + for (var i2 = 0; i2 < polyPoints.length; i2++) { + var p1 = polyPoints[i2]; + var p2 = polyPoints[i2 < polyPoints.length - 1 ? i2 + 1 : 0]; + var intersect2 = intersectLine( + node2, + point2, + { x: left2 + p1.x, y: top2 + p1.y }, + { x: left2 + p2.x, y: top2 + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node2; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; + } + const intersectRect = (node2, point2) => { + var x2 = node2.x; + var y2 = node2.y; + var dx = point2.x - x2; + var dy = point2.y - y2; + var w2 = node2.width / 2; + var h = node2.height / 2; + var sx, sy; + if (Math.abs(dy) * w2 > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w2 = -w2; + } + sx = w2; + sy = dx === 0 ? 0 : w2 * dy / dx; + } + return { x: x2 + sx, y: y2 + sy }; + }; + const intersectRect$1 = intersectRect; + const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 + }; + const note = async (parent, node2) => { + const useHtmlLabels = node2.useHtmlLabels || getConfig$2().flowchart.htmlLabels; + if (!useHtmlLabels) { + node2.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node2, + "node " + node2.classes, + true + ); + log$1.info("Classes = ", node2.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node2.rx).attr("ry", node2.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node2.padding).attr("height", bbox.height + node2.padding); + updateNodeBounds(node2, rect2); + node2.intersect = function(point2) { + return intersect.rect(node2, point2); + }; + return shapeSvg; + }; + const note$1 = note; + const formatClass = (str2) => { + if (str2) { + return " " + str2; + } + return ""; + }; + const getClassesFromNode = (node2, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node2.classes)} ${formatClass( + node2.class + )}`; + }; + const question = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const s = w2 + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + log$1.info("Question main (Circle)"); + const questionElem = insertPolygonShape$1(shapeSvg, s, s, points); + questionElem.attr("style", node2.style); + updateNodeBounds(node2, questionElem); + node2.intersect = function(point2) { + log$1.warn("Intersect called"); + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const choice = (parent, node2) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node2.domId || node2.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node2.width = 28; + node2.height = 28; + node2.intersect = function(point2) { + return intersect.circle(node2, 14, point2); + }; + return shapeSvg; + }; + const hexagon = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const f2 = 4; + const h = bbox.height + node2.padding; + const m = h / f2; + const w2 = bbox.width + 2 * m + node2.padding; + const points = [ + { x: m, y: 0 }, + { x: w2 - m, y: 0 }, + { x: w2, y: -h / 2 }, + { x: w2 - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex2 = insertPolygonShape$1(shapeSvg, w2, h, points); + hex2.attr("style", node2.style); + updateNodeBounds(node2, hex2); + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const rect_left_inv_arrow = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w2, y: 0 }, + { x: w2, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape$1(shapeSvg, w2, h, points); + el.attr("style", node2.style); + node2.width = w2 + h; + node2.height = h; + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const lean_right = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper(parent, node2, getClassesFromNode(node2), true); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w2 - h / 6, y: 0 }, + { x: w2 + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape$1(shapeSvg, w2, h, points); + el.attr("style", node2.style); + updateNodeBounds(node2, el); + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const lean_left = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w2 + h / 6, y: 0 }, + { x: w2 - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape$1(shapeSvg, w2, h, points); + el.attr("style", node2.style); + updateNodeBounds(node2, el); + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const trapezoid = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w2 + 2 * h / 6, y: 0 }, + { x: w2 - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape$1(shapeSvg, w2, h, points); + el.attr("style", node2.style); + updateNodeBounds(node2, el); + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const inv_trapezoid = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w2 - h / 6, y: 0 }, + { x: w2 + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape$1(shapeSvg, w2, h, points); + el.attr("style", node2.style); + updateNodeBounds(node2, el); + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const rect_right_inv_arrow = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const points = [ + { x: 0, y: 0 }, + { x: w2 + h / 2, y: 0 }, + { x: w2, y: -h / 2 }, + { x: w2 + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape$1(shapeSvg, w2, h, points); + el.attr("style", node2.style); + updateNodeBounds(node2, el); + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const cylinder = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const rx = w2 / 2; + const ry = rx / (2.5 + w2 / 50); + const h = bbox.height + ry + node2.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w2 + " 0 a " + rx + "," + ry + " 0,0,0 " + -w2 + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w2 + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node2.style).attr("d", shape).attr("transform", "translate(" + -w2 / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node2, el); + node2.intersect = function(point2) { + const pos = intersect.rect(node2, point2); + const x2 = pos.x - node2.x; + if (rx != 0 && (Math.abs(x2) < node2.width / 2 || Math.abs(x2) == node2.width / 2 && Math.abs(pos.y - node2.y) > node2.height / 2 - ry)) { + let y2 = ry * ry * (1 - x2 * x2 / (rx * rx)); + if (y2 != 0) { + y2 = Math.sqrt(y2); + } + y2 = ry - y2; + if (point2.y - node2.y > 0) { + y2 = -y2; + } + pos.y += y2; + } + return pos; + }; + return shapeSvg; + }; + const rect$1 = async (parent, node2) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node2, + "node " + node2.classes + " " + node2.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = bbox.width + node2.padding; + const totalHeight = bbox.height + node2.padding; + rect2.attr("class", "basic label-container").attr("style", node2.style).attr("rx", node2.rx).attr("ry", node2.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", totalWidth).attr("height", totalHeight); + if (node2.props) { + const propKeys = new Set(Object.keys(node2.props)); + if (node2.props.borders) { + applyNodePropertyBorders(rect2, node2.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + log$1.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node2, rect2); + node2.intersect = function(point2) { + return intersect.rect(node2, point2); + }; + return shapeSvg; + }; + const labelRect = async (parent, node2) => { + const { shapeSvg } = await labelHelper(parent, node2, "label", true); + log$1.trace("Classes = ", node2.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node2.props) { + const propKeys = new Set(Object.keys(node2.props)); + if (node2.props.borders) { + applyNodePropertyBorders(rect2, node2.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + log$1.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node2, rect2); + node2.intersect = function(point2) { + return intersect.rect(node2, point2); + }; + return shapeSvg; + }; + function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length2) => { + strokeDashArray.push(length2, 0); + }; + const skipBorder = (length2) => { + strokeDashArray.push(0, length2); + }; + if (borders.includes("t")) { + log$1.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + log$1.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + log$1.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + log$1.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); + } + const rectWithTitle = (parent, node2) => { + let classes2; + if (!node2.classes) { + classes2 = "node default"; + } else { + classes2 = "node " + node2.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node2.domId || node2.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node2.labelText.flat ? node2.labelText.flat() : node2.labelText; + let title2 = ""; + if (typeof text2 === "object") { + title2 = text2[0]; + } else { + title2 = text2; + } + log$1.info("Label text abc79", title2, text2, typeof text2 === "object"); + const text3 = label.node().appendChild(createLabel$1(title2, node2.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = text3.children[0]; + const dv = d3select(text3); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + log$1.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text3.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("
") : textRows, node2.labelStyle, true, true) + ); + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = d3select(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node2.padding / 2; + d3select(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + d3select(text3).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node2.padding).attr("height", bbox.height + node2.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node2, rect2); + node2.intersect = function(point2) { + return intersect.rect(node2, point2); + }; + return shapeSvg; + }; + const stadium = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const h = bbox.height + node2.padding; + const w2 = bbox.width + h / 4 + node2.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node2.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w2 / 2).attr("y", -h / 2).attr("width", w2).attr("height", h); + updateNodeBounds(node2, rect2); + node2.intersect = function(point2) { + return intersect.rect(node2, point2); + }; + return shapeSvg; + }; + const circle = async (parent, node2) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node2.style).attr("rx", node2.rx).attr("ry", node2.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node2.padding).attr("height", bbox.height + node2.padding); + log$1.info("Circle main"); + updateNodeBounds(node2, circle2); + node2.intersect = function(point2) { + log$1.info("Circle intersect", node2, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node2, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; + }; + const doublecircle = async (parent, node2) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node2.class); + outerCircle.attr("style", node2.style).attr("rx", node2.rx).attr("ry", node2.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node2.padding + gap * 2).attr("height", bbox.height + node2.padding + gap * 2); + innerCircle.attr("style", node2.style).attr("rx", node2.rx).attr("ry", node2.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node2.padding).attr("height", bbox.height + node2.padding); + log$1.info("DoubleCircle main"); + updateNodeBounds(node2, outerCircle); + node2.intersect = function(point2) { + log$1.info("DoubleCircle intersect", node2, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node2, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; + }; + const subroutine = async (parent, node2) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node2, + getClassesFromNode(node2, void 0), + true + ); + const w2 = bbox.width + node2.padding; + const h = bbox.height + node2.padding; + const points = [ + { x: 0, y: 0 }, + { x: w2, y: 0 }, + { x: w2, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w2 + 8, y: 0 }, + { x: w2 + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape$1(shapeSvg, w2, h, points); + el.attr("style", node2.style); + updateNodeBounds(node2, el); + node2.intersect = function(point2) { + return intersect.polygon(node2, points, point2); + }; + return shapeSvg; + }; + const start = (parent, node2) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node2.domId || node2.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node2, circle2); + node2.intersect = function(point2) { + return intersect.circle(node2, 7, point2); + }; + return shapeSvg; + }; + const forkJoin = (parent, node2, dir2) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node2.domId || node2.id); + let width2 = 70; + let height = 10; + if (dir2 === "LR") { + width2 = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width2 / 2).attr("y", -1 * height / 2).attr("width", width2).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node2, shape); + node2.height = node2.height + node2.padding / 2; + node2.width = node2.width + node2.padding / 2; + node2.intersect = function(point2) { + return intersect.rect(node2, point2); + }; + return shapeSvg; + }; + const end = (parent, node2) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node2.domId || node2.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node2, circle2); + node2.intersect = function(point2) { + return intersect.circle(node2, 7, point2); + }; + return shapeSvg; + }; + const class_box = (parent, node2) => { + const halfPadding = node2.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes2; + if (!node2.classes) { + classes2 = "node default"; + } else { + classes2 = "node " + node2.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes2).attr("id", node2.domId || node2.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node2.classData.annotations && node2.classData.annotations[0]; + const interfaceLabelText = node2.classData.annotations[0] ? "«" + node2.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node2.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = d3select(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node2.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node2.classData.label; + if (node2.classData.type !== void 0 && node2.classData.type !== "") { + if (getConfig$2().flowchart.htmlLabels) { + classTitleString += "<" + node2.classData.type + ">"; + } else { + classTitleString += "<" + node2.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node2.labelStyle, true, true)); + d3select(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = d3select(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node2.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if (getConfig$2().flowchart.htmlLabels) { + parsedText = parsedText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node2.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = d3select(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node2.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if (getConfig$2().flowchart.htmlLabels) { + displayText = displayText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node2.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = d3select(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + d3select(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + d3select(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + d3select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + d3select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node2.padding).attr("height", maxHeight + node2.padding); + updateNodeBounds(node2, rect2); + node2.intersect = function(point2) { + return intersect.rect(node2, point2); + }; + return shapeSvg; + }; + const shapes$1 = { + rhombus: question, + question, + rect: rect$1, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box + }; + let nodeElems = {}; + const insertNode = async (elem, node2, dir2) => { + let newEl; + let el; + if (node2.link) { + let target; + if (getConfig$2().securityLevel === "sandbox") { + target = "_top"; + } else if (node2.linkTarget) { + target = node2.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node2.link).attr("target", target); + el = await shapes$1[node2.shape](newEl, node2, dir2); + } else { + el = await shapes$1[node2.shape](elem, node2, dir2); + newEl = el; + } + if (node2.tooltip) { + el.attr("title", node2.tooltip); + } + if (node2.class) { + el.attr("class", "node default " + node2.class); + } + nodeElems[node2.id] = newEl; + if (node2.haveCallback) { + nodeElems[node2.id].attr("class", nodeElems[node2.id].attr("class") + " clickable"); + } + return newEl; + }; + const setNodeElem = (elem, node2) => { + nodeElems[node2.id] = elem; + }; + const clear$h = () => { + nodeElems = {}; + }; + const positionNode$1 = (node2) => { + const el = nodeElems[node2.id]; + log$1.trace( + "Transforming node", + node2.diff, + node2, + "translate(" + (node2.x - node2.width / 2 - 5) + ", " + node2.width / 2 + ")" + ); + const padding2 = 8; + const diff = node2.diff || 0; + if (node2.clusterNode) { + el.attr( + "transform", + "translate(" + (node2.x + diff - node2.width / 2) + ", " + (node2.y - node2.height / 2 - padding2) + ")" + ); + } else { + el.attr("transform", "translate(" + node2.x + ", " + node2.y + ")"); + } + return diff; + }; + const rect = (parent, node2) => { + log$1.info("Creating subgraph rect for ", node2.id, node2); + const shapeSvg = parent.insert("g").attr("class", "cluster" + (node2.class ? " " + node2.class : "")).attr("id", node2.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const useHtmlLabels = evaluate(getConfig$2().flowchart.htmlLabels); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const text2 = node2.labelType === "markdown" ? createText(label, node2.labelText, { style: node2.labelStyle, useHtmlLabels }) : label.node().appendChild(createLabel$1(node2.labelText, node2.labelStyle, void 0, true)); + let bbox = text2.getBBox(); + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = text2.children[0]; + const dv = d3select(text2); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const padding2 = 0 * node2.padding; + const halfPadding = padding2 / 2; + const width2 = node2.width <= bbox.width + padding2 ? bbox.width + padding2 : node2.width; + if (node2.width <= bbox.width + padding2) { + node2.diff = (bbox.width - node2.width) / 2 - node2.padding / 2; + } else { + node2.diff = -node2.padding / 2; + } + log$1.trace("Data ", node2, JSON.stringify(node2)); + rect2.attr("style", node2.style).attr("rx", node2.rx).attr("ry", node2.ry).attr("x", node2.x - width2 / 2).attr("y", node2.y - node2.height / 2 - halfPadding).attr("width", width2).attr("height", node2.height + padding2); + if (useHtmlLabels) { + label.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + (node2.x - bbox.width / 2) + ", " + (node2.y - node2.height / 2) + ")" + ); + } else { + label.attr( + "transform", + // This puts the labal on top of the box instead of inside it + "translate(" + node2.x + ", " + (node2.y - node2.height / 2) + ")" + ); + } + const rectBox = rect2.node().getBBox(); + node2.width = rectBox.width; + node2.height = rectBox.height; + node2.intersect = function(point2) { + return intersectRect$1(node2, point2); + }; + return shapeSvg; + }; + const noteGroup = (parent, node2) => { + const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node2.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding2 = 0 * node2.padding; + const halfPadding = padding2 / 2; + rect2.attr("rx", node2.rx).attr("ry", node2.ry).attr("x", node2.x - node2.width / 2 - halfPadding).attr("y", node2.y - node2.height / 2 - halfPadding).attr("width", node2.width + padding2).attr("height", node2.height + padding2).attr("fill", "none"); + const rectBox = rect2.node().getBBox(); + node2.width = rectBox.width; + node2.height = rectBox.height; + node2.intersect = function(point2) { + return intersectRect$1(node2, point2); + }; + return shapeSvg; + }; + const roundedWithTitle = (parent, node2) => { + const shapeSvg = parent.insert("g").attr("class", node2.classes).attr("id", node2.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const innerRect = shapeSvg.append("rect"); + const text2 = label.node().appendChild(createLabel$1(node2.labelText, node2.labelStyle, void 0, true)); + let bbox = text2.getBBox(); + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const div = text2.children[0]; + const dv = d3select(text2); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + bbox = text2.getBBox(); + const padding2 = 0 * node2.padding; + const halfPadding = padding2 / 2; + const width2 = node2.width <= bbox.width + node2.padding ? bbox.width + node2.padding : node2.width; + if (node2.width <= bbox.width + node2.padding) { + node2.diff = (bbox.width + node2.padding * 0 - node2.width) / 2; + } else { + node2.diff = -node2.padding / 2; + } + rect2.attr("class", "outer").attr("x", node2.x - width2 / 2 - halfPadding).attr("y", node2.y - node2.height / 2 - halfPadding).attr("width", width2 + padding2).attr("height", node2.height + padding2); + innerRect.attr("class", "inner").attr("x", node2.x - width2 / 2 - halfPadding).attr("y", node2.y - node2.height / 2 - halfPadding + bbox.height - 1).attr("width", width2 + padding2).attr("height", node2.height + padding2 - bbox.height - 3); + label.attr( + "transform", + "translate(" + (node2.x - bbox.width / 2) + ", " + (node2.y - node2.height / 2 - node2.padding / 3 + (evaluate(getConfig$2().flowchart.htmlLabels) ? 5 : 3)) + ")" + ); + const rectBox = rect2.node().getBBox(); + node2.height = rectBox.height; + node2.intersect = function(point2) { + return intersectRect$1(node2, point2); + }; + return shapeSvg; + }; + const divider = (parent, node2) => { + const shapeSvg = parent.insert("g").attr("class", node2.classes).attr("id", node2.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding2 = 0 * node2.padding; + const halfPadding = padding2 / 2; + rect2.attr("class", "divider").attr("x", node2.x - node2.width / 2 - halfPadding).attr("y", node2.y - node2.height / 2).attr("width", node2.width + padding2).attr("height", node2.height + padding2); + const rectBox = rect2.node().getBBox(); + node2.width = rectBox.width; + node2.height = rectBox.height; + node2.diff = -node2.padding / 2; + node2.intersect = function(point2) { + return intersectRect$1(node2, point2); + }; + return shapeSvg; + }; + const shapes = { rect, roundedWithTitle, noteGroup, divider }; + let clusterElems = {}; + const insertCluster = (elem, node2) => { + log$1.trace("Inserting cluster"); + const shape = node2.shape || "rect"; + clusterElems[node2.id] = shapes[shape](elem, node2); + }; + const clear$g = () => { + clusterElems = {}; + }; + const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 + }; + function calculateDeltaAndAngle(point1, point2) { + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; + } + const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; + }; + const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i2, data) { + let offset = 0; + if (i2 === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i2 === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i2, data) { + let offset = 0; + if (i2 === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i2 === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; + }; + let edgeLabels = {}; + let terminalLabels = {}; + const clear$f = () => { + edgeLabels = {}; + terminalLabels = {}; + }; + const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = evaluate(getConfig$2().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? createText(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + log$1.info("abc82", edge, edge.labelType); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = d3select(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; + }; + function setTerminalWidth(fo, value2) { + if (getConfig$2().flowchart.htmlLabels && fo) { + fo.style.width = value2.length * 9 + "px"; + fo.style.height = "12px"; + } + } + const positionEdgeLabel = (edge, paths) => { + log$1.info("Moving label abc78 ", edge.id, edge.label, edgeLabels[edge.id]); + let path2 = paths.updatedPath ? paths.updatedPath : paths.originalPath; + if (edge.label) { + const el = edgeLabels[edge.id]; + let x2 = edge.x; + let y2 = edge.y; + if (path2) { + const pos = utils.calcLabelPosition(path2); + log$1.info( + "Moving label " + edge.label + " from (", + x2, + ",", + y2, + ") to (", + pos.x, + ",", + pos.y, + ") abc78" + ); + if (paths.updatedPath) { + x2 = pos.x; + y2 = pos.y; + } + } + el.attr("transform", "translate(" + x2 + ", " + y2 + ")"); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x2 = edge.x; + let y2 = edge.y; + if (path2) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path2); + x2 = pos.x; + y2 = pos.y; + } + el.attr("transform", "translate(" + x2 + ", " + y2 + ")"); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x2 = edge.x; + let y2 = edge.y; + if (path2) { + const pos = utils.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path2 + ); + x2 = pos.x; + y2 = pos.y; + } + el.attr("transform", "translate(" + x2 + ", " + y2 + ")"); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x2 = edge.x; + let y2 = edge.y; + if (path2) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path2); + x2 = pos.x; + y2 = pos.y; + } + el.attr("transform", "translate(" + x2 + ", " + y2 + ")"); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x2 = edge.x; + let y2 = edge.y; + if (path2) { + const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path2); + x2 = pos.x; + y2 = pos.y; + } + el.attr("transform", "translate(" + x2 + ", " + y2 + ")"); + } + }; + const outsideNode = (node2, point2) => { + const x2 = node2.x; + const y2 = node2.y; + const dx = Math.abs(point2.x - x2); + const dy = Math.abs(point2.y - y2); + const w2 = node2.width / 2; + const h = node2.height / 2; + if (dx >= w2 || dy >= h) { + return true; + } + return false; + }; + const intersection = (node2, outsidePoint, insidePoint) => { + log$1.warn(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node2.x} y:${node2.y} w:${node2.width} h:${node2.height}`); + const x2 = node2.x; + const y2 = node2.y; + const dx = Math.abs(x2 - insidePoint.x); + const w2 = node2.width / 2; + let r = insidePoint.x < outsidePoint.x ? w2 - dx : w2 + dx; + const h = node2.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y2 - outsidePoint.y) * w2 > Math.abs(x2 - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y2 : y2 - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + log$1.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w2 - x2; + } else { + r = x2 - w2 - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + log$1.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } + }; + const cutPathAtIntersect = (_points, boundryNode) => { + log$1.warn("abc88 cutPathAtIntersect", _points, boundryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + log$1.info("abc88 checking point", point2, boundryNode); + if (!outsideNode(boundryNode, point2) && !isInside) { + const inter = intersection(boundryNode, lastPointOutside, point2); + log$1.warn("abc88 inside", point2, lastPointOutside, inter); + log$1.warn("abc88 intersection", inter); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } else { + log$1.warn("abc88 no intersect", inter, points); + } + isInside = true; + } else { + log$1.warn("abc88 outside", point2, lastPointOutside); + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + log$1.warn("abc88 returning points", points); + return points; + }; + const insertEdge$1 = function(elem, e, edge, clusterDb2, diagramType, graph, id2) { + let points = edge.points; + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head2 = graph.node(e.w); + log$1.info("abc88 InsertEdge: ", edge); + if (head2.intersect && tail.intersect) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + log$1.info( + "Last point", + points[points.length - 1], + head2, + head2.intersect(points[points.length - 1]) + ); + points.push(head2.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + log$1.info("to cluster abc88", clusterDb2[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb2[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + log$1.info("from cluster abc88", clusterDb2[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb2[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = curveBasis; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x: x2, y: y2 } = getLineFunctionsWithOffset(edge); + const lineFunction = line$1().x(x2).y(y2).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if (getConfig$2().flowchart.arrowMarkerAbsolute || getConfig$2().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + log$1.info("arrowTypeStart", edge.arrowTypeStart); + log$1.info("arrowTypeEnd", edge.arrowTypeEnd); + switch (edge.arrowTypeStart) { + case "arrow_cross": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-crossStart)" + ); + break; + case "arrow_point": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-pointStart)" + ); + break; + case "arrow_barb": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-barbStart)" + ); + break; + case "arrow_circle": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-circleStart)" + ); + break; + case "aggregation": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-aggregationStart)" + ); + break; + case "extension": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-extensionStart)" + ); + break; + case "composition": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-compositionStart)" + ); + break; + case "dependency": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-dependencyStart)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-lollipopStart)" + ); + break; + } + switch (edge.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-aggregationEnd)" + ); + break; + case "extension": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-extensionEnd)" + ); + break; + case "composition": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-compositionEnd)" + ); + break; + case "dependency": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-dependencyEnd)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-lollipopEnd)" + ); + break; + } + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; + }; + const recursiveRender = async (_elem, graph, diagramtype, id2, parentCluster) => { + log$1.info("Graph in recursive render: XXX", write(graph), parentCluster); + const dir2 = graph.graph().rankdir; + log$1.trace("Dir in recursive render - dir:", dir2); + const elem = _elem.insert("g").attr("class", "root"); + if (!graph.nodes()) { + log$1.info("No nodes found for", graph); + } else { + log$1.info("Recursive render XXX", graph.nodes()); + } + if (graph.edges().length > 0) { + log$1.trace("Recursive edges", graph.edge(graph.edges()[0])); + } + const clusters = elem.insert("g").attr("class", "clusters"); + const edgePaths = elem.insert("g").attr("class", "edgePaths"); + const edgeLabels2 = elem.insert("g").attr("class", "edgeLabels"); + const nodes2 = elem.insert("g").attr("class", "nodes"); + await Promise.all( + graph.nodes().map(async function(v) { + const node2 = graph.node(v); + if (parentCluster !== void 0) { + const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); + log$1.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); + graph.setNode(parentCluster.id, data); + if (!graph.parent(v)) { + log$1.trace("Setting parent", v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } + log$1.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); + if (node2 && node2.clusterNode) { + log$1.info("Cluster identified", v, node2.width, graph.node(v)); + const o = await recursiveRender(nodes2, node2.graph, diagramtype, id2, graph.node(v)); + const newEl = o.elem; + updateNodeBounds(node2, newEl); + node2.diff = o.diff || 0; + log$1.info("Node bounds (abc123)", v, node2, node2.width, node2.x, node2.y); + setNodeElem(newEl, node2); + log$1.warn("Recursive render complete ", newEl, node2); + } else { + if (graph.children(v).length > 0) { + log$1.info("Cluster - the non recursive path XXX", v, node2.id, node2, graph); + log$1.info(findNonClusterChild(node2.id, graph)); + clusterDb[node2.id] = { id: findNonClusterChild(node2.id, graph), node: node2 }; + } else { + log$1.info("Node - the non recursive path", v, node2.id, node2); + await insertNode(nodes2, graph.node(v), dir2); + } + } + }) + ); + graph.edges().forEach(function(e) { + const edge = graph.edge(e.v, e.w, e.name); + log$1.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + log$1.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); + log$1.info("Fix", clusterDb, "ids:", e.v, e.w, "Translateing: ", clusterDb[e.v], clusterDb[e.w]); + insertEdgeLabel(edgeLabels2, edge); + }); + graph.edges().forEach(function(e) { + log$1.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + }); + log$1.info("#############################################"); + log$1.info("### Layout ###"); + log$1.info("#############################################"); + log$1.info(graph); + layout(graph); + log$1.info("Graph after layout:", write(graph)); + let diff = 0; + sortNodesByHierarchy(graph).forEach(function(v) { + const node2 = graph.node(v); + log$1.info("Position " + v + ": " + JSON.stringify(graph.node(v))); + log$1.info( + "Position " + v + ": (" + node2.x, + "," + node2.y, + ") width: ", + node2.width, + " height: ", + node2.height + ); + if (node2 && node2.clusterNode) { + positionNode$1(node2); + } else { + if (graph.children(v).length > 0) { + insertCluster(clusters, node2); + clusterDb[node2.id].node = node2; + } else { + positionNode$1(node2); + } + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + log$1.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); + const paths = insertEdge$1(edgePaths, e, edge, clusterDb, diagramtype, graph, id2); + positionEdgeLabel(edge, paths); + }); + graph.nodes().forEach(function(v) { + const n = graph.node(v); + log$1.info(v, n.type, n.diff); + if (n.type === "group") { + diff = n.diff; + } + }); + return { elem, diff }; + }; + const render = async (elem, graph, markers2, diagramtype, id2) => { + insertMarkers$4(elem, markers2, diagramtype, id2); + clear$h(); + clear$f(); + clear$g(); + clear$i(); + log$1.warn("Graph at first:", JSON.stringify(write(graph))); + adjustClustersAndEdges(graph); + log$1.warn("Graph after:", JSON.stringify(write(graph))); + await recursiveRender(elem, graph, diagramtype, id2); + }; + const conf$7 = {}; + const setConf$7 = function(cnf) { + const keys2 = Object.keys(cnf); + for (const key of keys2) { + conf$7[key] = cnf[key]; + } + }; + const addVertices$1 = function(vert, g, svgId, root2, doc, diagObj) { + const svg2 = root2.select(`[id="${svgId}"]`); + const keys2 = Object.keys(vert); + keys2.forEach(function(id2) { + const vertex = vert[id2]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles2 = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + log$1.info("vertex", vertex, vertex.labelType); + if (vertex.labelType === "markdown") { + log$1.info("vertex", vertex, vertex.labelType); + } else { + if (evaluate(getConfig$2().flowchart.htmlLabels)) { + const node2 = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = addHtmlLabel$1(svg2, node2).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles2.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(common$1.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + } + let radious = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + g.setNode(vertex.id, { + labelStyle: styles2.labelStyle, + shape: _shape, + labelText: vertexText, + labelType: vertex.labelType, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: getConfig$2().flowchart.padding + }); + log$1.info("setNode", { + labelStyle: styles2.labelStyle, + labelType: vertex.labelType, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: vertex.id, + domId: diagObj.db.lookUpDomId(vertex.id), + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + dir: vertex.dir, + props: vertex.props, + padding: getConfig$2().flowchart.padding + }); + }); + }; + const addEdges$1 = function(edges2, g, diagObj) { + log$1.info("abc78 edges = ", edges2); + let cnt2 = 0; + let linkIdCnt = {}; + let defaultStyle2; + let defaultLabelStyle; + if (edges2.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges2.defaultStyle); + defaultStyle2 = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges2.forEach(function(edge) { + cnt2++; + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + log$1.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + log$1.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + log$1.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle2 !== void 0) { + style = defaultStyle2; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + case "invisible": + edgeData.thickness = "invisible"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 0;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges2.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges2.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf$7.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = edge.text.replace(common$1.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + g.setEdge(edge.start, edge.end, edgeData, cnt2); + }); + }; + const getClasses$4 = function(text2, diagObj) { + return diagObj.db.getClasses(); + }; + const draw$h = async function(text2, id2, _version, diagObj) { + log$1.info("Drawing flowchart"); + let dir2 = diagObj.db.getDirection(); + if (dir2 === void 0) { + dir2 = "TD"; + } + const { securityLevel, flowchart: conf2 } = getConfig$2(); + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir2, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 0, + marginy: 0 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs2 = diagObj.db.getSubGraphs(); + log$1.info("Subgraphs - ", subGraphs2); + for (let i3 = subGraphs2.length - 1; i3 >= 0; i3--) { + subG = subGraphs2[i3]; + log$1.info("Subgraph - ", subG); + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const vert = diagObj.db.getVertices(); + const edges2 = diagObj.db.getEdges(); + log$1.info("Edges", edges2); + let i2 = 0; + for (i2 = subGraphs2.length - 1; i2 >= 0; i2--) { + subG = subGraphs2[i2]; + selectAll("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + log$1.info("Setting up subgraphs", subG.nodes[j], subG.id); + g.setParent(subG.nodes[j], subG.id); + } + } + addVertices$1(vert, g, id2, root2, doc, diagObj); + addEdges$1(edges2, g); + const svg2 = root2.select(`[id="${id2}"]`); + const element2 = root2.select("#" + id2 + " g"); + await render(element2, g, ["point", "circle", "cross"], "flowchart", id2); + utils.insertTitle(svg2, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle()); + setupGraphViewbox$1(g, svg2, conf2.diagramPadding, conf2.useMaxWidth); + diagObj.db.indexNodes("subGraph" + i2); + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id2 + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect2 = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect2.setAttribute("rx", 0); + rect2.setAttribute("ry", 0); + rect2.setAttribute("width", dim.width); + rect2.setAttribute("height", dim.height); + label.insertBefore(rect2, label.firstChild); + } + } + const keys2 = Object.keys(vert); + keys2.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node2 = d3select("#" + id2 + ' [id="' + key + '"]'); + if (node2) { + const link2 = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link2.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link2.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link2.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link2.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link2.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node2.insert(function() { + return link2; + }, ":first-child"); + const shape = node2.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node2.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); + }; + const flowRendererV2 = { + setConf: setConf$7, + addVertices: addVertices$1, + addEdges: addEdges$1, + getClasses: getClasses$4, + draw: draw$h + }; + const fade = (color2, opacity) => { + const channel2 = channel$1; + const r = channel2(color2, "r"); + const g = channel2(color2, "g"); + const b = channel2(color2, "b"); + return rgba$1(r, g, b, opacity); + }; + const getStyles$c = (options2) => `.label { + font-family: ${options2.fontFamily}; + color: ${options2.nodeTextColor || options2.textColor}; + } + .cluster-label text { + fill: ${options2.titleColor}; + } + .cluster-label span,p { + color: ${options2.titleColor}; + } + + .label text,span,p { + fill: ${options2.nodeTextColor || options2.textColor}; + color: ${options2.nodeTextColor || options2.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options2.mainBkg}; + stroke: ${options2.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options2.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options2.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options2.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options2.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options2.edgeLabelBackground}; + fill: ${options2.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${fade(options2.edgeLabelBackground, 0.5)}; + // background-color: + } + + .cluster rect { + fill: ${options2.clusterBkg}; + stroke: ${options2.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options2.titleColor}; + } + + .cluster span,p { + color: ${options2.titleColor}; + } + /* .cluster div { + color: ${options2.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options2.fontFamily}; + font-size: 12px; + background: ${options2.tertiaryColor}; + border: 1px solid ${options2.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; + } +`; + const flowStyles = getStyles$c; + const diagram$i = { + parser: parser$p, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + flowRenderer.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen("gen-1"); + } + }; + const flowDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$i + }, Symbol.toStringTag, { value: "Module" })); + const diagram$h = { + parser: parser$p, + db: flowDb, + renderer: flowRendererV2, + styles: flowStyles, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } }); + flowRendererV2.setConf(cnf.flowchart); + flowDb.clear(); + flowDb.setGen("gen-2"); + } + }; + const flowDiagramV2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$h + }, Symbol.toStringTag, { value: "Module" })); + var parser$n = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 20, 22, 24, 26, 27, 28], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 14], $V6 = [1, 15], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 24], $Vb = [1, 25], $Vc = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], $Vd = [1, 34], $Ve = [27, 28, 46, 47], $Vf = [41, 42, 43, 44, 45], $Vg = [17, 34], $Vh = [1, 54], $Vi = [1, 53], $Vj = [17, 34, 36, 38]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "entityName": 11, "relSpec": 12, ":": 13, "role": 14, "BLOCK_START": 15, "attributes": 16, "BLOCK_STOP": 17, "SQS": 18, "SQE": 19, "title": 20, "title_value": 21, "acc_title": 22, "acc_title_value": 23, "acc_descr": 24, "acc_descr_value": 25, "acc_descr_multiline_value": 26, "ALPHANUM": 27, "ENTITY_NAME": 28, "attribute": 29, "attributeType": 30, "attributeName": 31, "attributeKeyTypeList": 32, "attributeComment": 33, "ATTRIBUTE_WORD": 34, "attributeKeyType": 35, "COMMA": 36, "ATTRIBUTE_KEY": 37, "COMMENT": 38, "cardinality": 39, "relType": 40, "ZERO_OR_ONE": 41, "ZERO_OR_MORE": 42, "ONE_OR_MORE": 43, "ONLY_ONE": 44, "MD_PARENT": 45, "NON_IDENTIFYING": 46, "IDENTIFYING": 47, "WORD": 48, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + break; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.addEntity($$[$0 - 4]); + yy.addEntity($$[$0 - 2]); + yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]); + break; + case 9: + yy.addEntity($$[$0 - 3]); + yy.addAttributes($$[$0 - 3], $$[$0 - 1]); + break; + case 10: + yy.addEntity($$[$0 - 2]); + break; + case 11: + yy.addEntity($$[$0]); + break; + case 12: + yy.addEntity($$[$0 - 6], $$[$0 - 4]); + yy.addAttributes($$[$0 - 6], $$[$0 - 1]); + break; + case 13: + yy.addEntity($$[$0 - 5], $$[$0 - 3]); + break; + case 14: + yy.addEntity($$[$0 - 3], $$[$0 - 1]); + break; + case 15: + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + case 43: + this.$ = $$[$0]; + break; + case 20: + case 41: + case 42: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 21: + case 29: + this.$ = [$$[$0]]; + break; + case 22: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 23: + this.$ = { attributeType: $$[$0 - 1], attributeName: $$[$0] }; + break; + case 24: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeKeyTypeList: $$[$0] }; + break; + case 25: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 26: + this.$ = { attributeType: $$[$0 - 3], attributeName: $$[$0 - 2], attributeKeyTypeList: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 27: + case 28: + case 31: + this.$ = $$[$0]; + break; + case 30: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 32: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 33: + this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] }; + break; + case 34: + this.$ = yy.Cardinality.ZERO_OR_ONE; + break; + case 35: + this.$ = yy.Cardinality.ZERO_OR_MORE; + break; + case 36: + this.$ = yy.Cardinality.ONE_OR_MORE; + break; + case 37: + this.$ = yy.Cardinality.ONLY_ONE; + break; + case 38: + this.$ = yy.Cardinality.MD_PARENT; + break; + case 39: + this.$ = yy.Identification.NON_IDENTIFYING; + break; + case 40: + this.$ = yy.Identification.IDENTIFYING; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 16, 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, o($V0, [2, 18]), o($Vc, [2, 19]), o($Vc, [2, 20]), o($V0, [2, 4]), { 11: 29, 27: $V5, 28: $V6 }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: $Vd }, { 11: 35, 27: $V5, 28: $V6 }, { 40: 36, 46: [1, 37], 47: [1, 38] }, o($Ve, [2, 34]), o($Ve, [2, 35]), o($Ve, [2, 36]), o($Ve, [2, 37]), o($Ve, [2, 38]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, o($V0, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: $Vd }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }, o($Vf, [2, 39]), o($Vf, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, o($V0, [2, 9]), { 17: [2, 22] }, o($Vg, [2, 23], { 32: 50, 33: 51, 35: 52, 37: $Vh, 38: $Vi }), o([17, 34, 37, 38], [2, 28]), o($V0, [2, 14], { 15: [1, 55] }), o([27, 28], [2, 33]), o($V0, [2, 8]), o($V0, [2, 41]), o($V0, [2, 42]), o($V0, [2, 43]), o($Vg, [2, 24], { 33: 56, 36: [1, 57], 38: $Vi }), o($Vg, [2, 25]), o($Vj, [2, 29]), o($Vg, [2, 32]), o($Vj, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: $Vd }, o($Vg, [2, 26]), { 35: 60, 37: $Vh }, { 17: [1, 61] }, o($V0, [2, 13]), o($Vj, [2, 30]), o($V0, [2, 12])], + defaultActions: { 34: [2, 27], 41: [2, 22] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 22; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 24; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 10; + case 8: + break; + case 9: + return 8; + case 10: + return 28; + case 11: + return 48; + case 12: + return 4; + case 13: + this.begin("block"); + return 15; + case 14: + return 36; + case 15: + break; + case 16: + return 37; + case 17: + return 34; + case 18: + return 34; + case 19: + return 38; + case 20: + break; + case 21: + this.popState(); + return 17; + case 22: + return yy_.yytext[0]; + case 23: + return 18; + case 24: + return 19; + case 25: + return 41; + case 26: + return 43; + case 27: + return 43; + case 28: + return 43; + case 29: + return 41; + case 30: + return 41; + case 31: + return 42; + case 32: + return 42; + case 33: + return 42; + case 34: + return 42; + case 35: + return 42; + case 36: + return 43; + case 37: + return 42; + case 38: + return 43; + case 39: + return 44; + case 40: + return 44; + case 41: + return 44; + case 42: + return 44; + case 43: + return 41; + case 44: + return 42; + case 45: + return 43; + case 46: + return 45; + case 47: + return 46; + case 48: + return 47; + case 49: + return 47; + case 50: + return 46; + case 51: + return 46; + case 52: + return 46; + case 53: + return 27; + case 54: + return yy_.yytext[0]; + case 55: + return 6; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i], + conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [14, 15, 16, 17, 18, 19, 20, 21, 22], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$n.parser = parser$n; + const erParser = parser$n; + let entities = {}; + let relationships = []; + const Cardinality = { + ZERO_OR_ONE: "ZERO_OR_ONE", + ZERO_OR_MORE: "ZERO_OR_MORE", + ONE_OR_MORE: "ONE_OR_MORE", + ONLY_ONE: "ONLY_ONE", + MD_PARENT: "MD_PARENT" + }; + const Identification = { + NON_IDENTIFYING: "NON_IDENTIFYING", + IDENTIFYING: "IDENTIFYING" + }; + const addEntity = function(name2, alias = void 0) { + if (entities[name2] === void 0) { + entities[name2] = { attributes: [], alias }; + log$1.info("Added new entity :", name2); + } else if (entities[name2] && !entities[name2].alias && alias) { + entities[name2].alias = alias; + log$1.info(`Add alias '${alias}' to entity '${name2}'`); + } + return entities[name2]; + }; + const getEntities = () => entities; + const addAttributes = function(entityName, attribs) { + let entity = addEntity(entityName); + let i2; + for (i2 = attribs.length - 1; i2 >= 0; i2--) { + entity.attributes.push(attribs[i2]); + log$1.debug("Added attribute ", attribs[i2].attributeName); + } + }; + const addRelationship$1 = function(entA, rolA, entB, rSpec) { + let rel = { + entityA: entA, + roleA: rolA, + entityB: entB, + relSpec: rSpec + }; + relationships.push(rel); + log$1.debug("Added new relationship :", rel); + }; + const getRelationships$1 = () => relationships; + const clear$e = function() { + entities = {}; + relationships = []; + clear$l(); + }; + const erDb = { + Cardinality, + Identification, + getConfig: () => getConfig$2().er, + addEntity, + addAttributes, + getEntities, + addRelationship: addRelationship$1, + getRelationships: getRelationships$1, + clear: clear$e, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + setDiagramTitle, + getDiagramTitle + }; + const ERMarkers = { + ONLY_ONE_START: "ONLY_ONE_START", + ONLY_ONE_END: "ONLY_ONE_END", + ZERO_OR_ONE_START: "ZERO_OR_ONE_START", + ZERO_OR_ONE_END: "ZERO_OR_ONE_END", + ONE_OR_MORE_START: "ONE_OR_MORE_START", + ONE_OR_MORE_END: "ONE_OR_MORE_END", + ZERO_OR_MORE_START: "ZERO_OR_MORE_START", + ZERO_OR_MORE_END: "ZERO_OR_MORE_END", + MD_PARENT_END: "MD_PARENT_END", + MD_PARENT_START: "MD_PARENT_START" + }; + const insertMarkers$2 = function(elem, conf2) { + let marker; + elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_START).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_END).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18"); + return; + }; + const erMarkers = { + ERMarkers, + insertMarkers: insertMarkers$2 + }; + const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + function validate(uuid) { + return typeof uuid === "string" && REGEX.test(uuid); + } + const byteToHex = []; + for (let i2 = 0; i2 < 256; ++i2) { + byteToHex.push((i2 + 256).toString(16).slice(1)); + } + function unsafeStringify(arr, offset = 0) { + return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + } + function parse(uuid) { + if (!validate(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; + } + function stringToBytes(str2) { + str2 = unescape(encodeURIComponent(str2)); + const bytes = []; + for (let i2 = 0; i2 < str2.length; ++i2) { + bytes.push(str2.charCodeAt(i2)); + } + return bytes; + } + const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + function v35(name2, version2, hashfunc) { + function generateUUID(value2, namespace2, buf, offset) { + var _namespace; + if (typeof value2 === "string") { + value2 = stringToBytes(value2); + } + if (typeof namespace2 === "string") { + namespace2 = parse(namespace2); + } + if (((_namespace = namespace2) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value2.length); + bytes.set(namespace2); + bytes.set(value2, namespace2.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version2; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i2 = 0; i2 < 16; ++i2) { + buf[offset + i2] = bytes[i2]; + } + return buf; + } + return unsafeStringify(bytes); + } + try { + generateUUID.name = name2; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; + } + function f(s, x2, y2, z) { + switch (s) { + case 0: + return x2 & y2 ^ ~x2 & z; + case 1: + return x2 ^ y2 ^ z; + case 2: + return x2 & y2 ^ x2 & z ^ y2 & z; + case 3: + return x2 ^ y2 ^ z; + } + } + function ROTL(x2, n) { + return x2 << n | x2 >>> 32 - n; + } + function sha1(bytes) { + const K2 = [1518500249, 1859775393, 2400959708, 3395469782]; + const H = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]; + if (typeof bytes === "string") { + const msg = unescape(encodeURIComponent(bytes)); + bytes = []; + for (let i2 = 0; i2 < msg.length; ++i2) { + bytes.push(msg.charCodeAt(i2)); + } + } else if (!Array.isArray(bytes)) { + bytes = Array.prototype.slice.call(bytes); + } + bytes.push(128); + const l = bytes.length / 4 + 2; + const N = Math.ceil(l / 16); + const M = new Array(N); + for (let i2 = 0; i2 < N; ++i2) { + const arr = new Uint32Array(16); + for (let j = 0; j < 16; ++j) { + arr[j] = bytes[i2 * 64 + j * 4] << 24 | bytes[i2 * 64 + j * 4 + 1] << 16 | bytes[i2 * 64 + j * 4 + 2] << 8 | bytes[i2 * 64 + j * 4 + 3]; + } + M[i2] = arr; + } + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 4294967295; + for (let i2 = 0; i2 < N; ++i2) { + const W = new Uint32Array(80); + for (let t = 0; t < 16; ++t) { + W[t] = M[i2][t]; + } + for (let t = 16; t < 80; ++t) { + W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); + } + let a = H[0]; + let b = H[1]; + let c2 = H[2]; + let d = H[3]; + let e = H[4]; + for (let t = 0; t < 80; ++t) { + const s = Math.floor(t / 20); + const T = ROTL(a, 5) + f(s, b, c2, d) + e + K2[s] + W[t] >>> 0; + e = d; + d = c2; + c2 = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c2 >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + return [H[0] >> 24 & 255, H[0] >> 16 & 255, H[0] >> 8 & 255, H[0] & 255, H[1] >> 24 & 255, H[1] >> 16 & 255, H[1] >> 8 & 255, H[1] & 255, H[2] >> 24 & 255, H[2] >> 16 & 255, H[2] >> 8 & 255, H[2] & 255, H[3] >> 24 & 255, H[3] >> 16 & 255, H[3] >> 8 & 255, H[3] & 255, H[4] >> 24 & 255, H[4] >> 16 & 255, H[4] >> 8 & 255, H[4] & 255]; + } + const v5 = v35("v5", 80, sha1); + const uuid5 = v5; + const BAD_ID_CHARS_REGEXP = /[^\dA-Za-z](\W)*/g; + let conf$6 = {}; + let entityNameIds = /* @__PURE__ */ new Map(); + const setConf$6 = function(cnf) { + const keys2 = Object.keys(cnf); + for (const key of keys2) { + conf$6[key] = cnf[key]; + } + }; + const drawAttributes = (groupNode, entityTextNode, attributes) => { + const heightPadding = conf$6.entityPadding / 3; + const widthPadding = conf$6.entityPadding / 3; + const attrFontSize = conf$6.fontSize * 0.85; + const labelBBox = entityTextNode.node().getBBox(); + const attributeNodes = []; + let hasKeyType = false; + let hasComment = false; + let maxTypeWidth = 0; + let maxNameWidth = 0; + let maxKeyWidth = 0; + let maxCommentWidth = 0; + let cumulativeHeight = labelBBox.height + heightPadding * 2; + let attrNum = 1; + attributes.forEach((item) => { + if (item.attributeKeyTypeList !== void 0 && item.attributeKeyTypeList.length > 0) { + hasKeyType = true; + } + if (item.attributeComment !== void 0) { + hasComment = true; + } + }); + attributes.forEach((item) => { + const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`; + let nodeHeight = 0; + const attributeType = parseGenericTypes(item.attributeType); + const typeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig$2().fontFamily).style("font-size", attrFontSize + "px").text(attributeType); + const nameNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig$2().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeName); + const attributeNode = {}; + attributeNode.tn = typeNode; + attributeNode.nn = nameNode; + const typeBBox = typeNode.node().getBBox(); + const nameBBox = nameNode.node().getBBox(); + maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width); + maxNameWidth = Math.max(maxNameWidth, nameBBox.width); + nodeHeight = Math.max(typeBBox.height, nameBBox.height); + if (hasKeyType) { + const keyTypeNodeText = item.attributeKeyTypeList !== void 0 ? item.attributeKeyTypeList.join(",") : ""; + const keyTypeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig$2().fontFamily).style("font-size", attrFontSize + "px").text(keyTypeNodeText); + attributeNode.kn = keyTypeNode; + const keyTypeBBox = keyTypeNode.node().getBBox(); + maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width); + nodeHeight = Math.max(nodeHeight, keyTypeBBox.height); + } + if (hasComment) { + const commentNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", getConfig$2().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeComment || ""); + attributeNode.cn = commentNode; + const commentNodeBBox = commentNode.node().getBBox(); + maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width); + nodeHeight = Math.max(nodeHeight, commentNodeBBox.height); + } + attributeNode.height = nodeHeight; + attributeNodes.push(attributeNode); + cumulativeHeight += nodeHeight + heightPadding * 2; + attrNum += 1; + }); + let widthPaddingFactor = 4; + if (hasKeyType) { + widthPaddingFactor += 2; + } + if (hasComment) { + widthPaddingFactor += 2; + } + const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth; + const bBox = { + width: Math.max( + conf$6.minEntityWidth, + Math.max( + labelBBox.width + conf$6.entityPadding * 2, + maxWidth + widthPadding * widthPaddingFactor + ) + ), + height: attributes.length > 0 ? cumulativeHeight : Math.max(conf$6.minEntityHeight, labelBBox.height + conf$6.entityPadding * 2) + }; + if (attributes.length > 0) { + const spareColumnWidth = Math.max( + 0, + (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2) + ); + entityTextNode.attr( + "transform", + "translate(" + bBox.width / 2 + "," + (heightPadding + labelBBox.height / 2) + ")" + ); + let heightOffset = labelBBox.height + heightPadding * 2; + let attribStyle = "attributeBoxOdd"; + attributeNodes.forEach((attributeNode) => { + const alignY = heightOffset + heightPadding + attributeNode.height / 2; + attributeNode.tn.attr("transform", "translate(" + widthPadding + "," + alignY + ")"); + const typeRect = groupNode.insert("rect", "#" + attributeNode.tn.node().id).classed(`er ${attribStyle}`, true).attr("x", 0).attr("y", heightOffset).attr("width", maxTypeWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + const nameXOffset = parseFloat(typeRect.attr("x")) + parseFloat(typeRect.attr("width")); + attributeNode.nn.attr( + "transform", + "translate(" + (nameXOffset + widthPadding) + "," + alignY + ")" + ); + const nameRect = groupNode.insert("rect", "#" + attributeNode.nn.node().id).classed(`er ${attribStyle}`, true).attr("x", nameXOffset).attr("y", heightOffset).attr("width", maxNameWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + let keyTypeAndCommentXOffset = parseFloat(nameRect.attr("x")) + parseFloat(nameRect.attr("width")); + if (hasKeyType) { + attributeNode.kn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + const keyTypeRect = groupNode.insert("rect", "#" + attributeNode.kn.node().id).classed(`er ${attribStyle}`, true).attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxKeyWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + keyTypeAndCommentXOffset = parseFloat(keyTypeRect.attr("x")) + parseFloat(keyTypeRect.attr("width")); + } + if (hasComment) { + attributeNode.cn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + groupNode.insert("rect", "#" + attributeNode.cn.node().id).classed(`er ${attribStyle}`, "true").attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxCommentWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + } + heightOffset += attributeNode.height + heightPadding * 2; + attribStyle = attribStyle === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd"; + }); + } else { + bBox.height = Math.max(conf$6.minEntityHeight, cumulativeHeight); + entityTextNode.attr("transform", "translate(" + bBox.width / 2 + "," + bBox.height / 2 + ")"); + } + return bBox; + }; + const drawEntities = function(svgNode2, entities2, graph) { + const keys2 = Object.keys(entities2); + let firstOne; + keys2.forEach(function(entityName) { + const entityId = generateId(entityName, "entity"); + entityNameIds.set(entityName, entityId); + const groupNode = svgNode2.append("g").attr("id", entityId); + firstOne = firstOne === void 0 ? entityId : firstOne; + const textId = "text-" + entityId; + const textNode = groupNode.append("text").classed("er entityLabel", true).attr("id", textId).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", getConfig$2().fontFamily).style("font-size", conf$6.fontSize + "px").text(entities2[entityName].alias ?? entityName); + const { width: entityWidth, height: entityHeight } = drawAttributes( + groupNode, + textNode, + entities2[entityName].attributes + ); + const rectNode = groupNode.insert("rect", "#" + textId).classed("er entityBox", true).attr("x", 0).attr("y", 0).attr("width", entityWidth).attr("height", entityHeight); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(entityId, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: entityId + }); + }); + return firstOne; + }; + const adjustEntities$1 = function(svgNode2, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode2.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); + }; + const getEdgeName = function(rel) { + return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, ""); + }; + const addRelationships$1 = function(relationships2, g) { + relationships2.forEach(function(r) { + g.setEdge( + entityNameIds.get(r.entityA), + entityNameIds.get(r.entityB), + { relationship: r }, + getEdgeName(r) + ); + }); + return relationships2; + }; + let relCnt$1 = 0; + const drawRelationshipFromLayout$1 = function(svg2, rel, g, insert, diagObj) { + relCnt$1++; + const edge = g.edge( + entityNameIds.get(rel.entityA), + entityNameIds.get(rel.entityB), + getEdgeName(rel) + ); + const lineFunction = line$1().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = svg2.insert("path", "#" + insert).classed("er relationshipLine", true).attr("d", lineFunction(edge.points)).style("stroke", conf$6.stroke).style("fill", "none"); + if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) { + svgPath.attr("stroke-dasharray", "8,8"); + } + let url = ""; + if (conf$6.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (rel.relSpec.cardA) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_END + ")"); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_END + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_END + ")"); + break; + } + switch (rel.relSpec.cardB) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_START + ")" + ); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_START + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_START + ")"); + break; + } + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt$1; + const labelNode = svg2.append("text").classed("er relationshipLabel", true).attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", getConfig$2().fontFamily).style("font-size", conf$6.fontSize + "px").text(rel.roleA); + const labelBBox = labelNode.node().getBBox(); + svg2.insert("rect", "#" + labelId).classed("er relationshipLabelBox", true).attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height); + }; + const draw$g = function(text2, id2, _version, diagObj) { + conf$6 = getConfig$2().er; + log$1.info("Drawing ER diagram"); + const securityLevel = getConfig$2().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = root2.select(`[id='${id2}']`); + erMarkers.insertMarkers(svg2, conf$6); + let g; + g = new Graph({ + multigraph: true, + directed: true, + compound: false + }).setGraph({ + rankdir: conf$6.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const firstEntity = drawEntities(svg2, diagObj.db.getEntities(), g); + const relationships2 = addRelationships$1(diagObj.db.getRelationships(), g); + layout(g); + adjustEntities$1(svg2, g); + relationships2.forEach(function(rel) { + drawRelationshipFromLayout$1(svg2, rel, g, firstEntity, diagObj); + }); + const padding2 = conf$6.diagramPadding; + utils.insertTitle(svg2, "entityTitleText", conf$6.titleTopMargin, diagObj.db.getDiagramTitle()); + const svgBounds = svg2.node().getBBox(); + const width2 = svgBounds.width + padding2 * 2; + const height = svgBounds.height + padding2 * 2; + configureSvgSize(svg2, height, width2, conf$6.useMaxWidth); + svg2.attr("viewBox", `${svgBounds.x - padding2} ${svgBounds.y - padding2} ${width2} ${height}`); + }; + const MERMAID_ERDIAGRAM_UUID = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c"; + function generateId(str2 = "", prefix = "") { + const simplifiedStr = str2.replace(BAD_ID_CHARS_REGEXP, ""); + return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${uuid5( + str2, + MERMAID_ERDIAGRAM_UUID + )}`; + } + function strWithHyphen(str2 = "") { + return str2.length > 0 ? `${str2}-` : ""; + } + const erRenderer = { + setConf: setConf$6, + draw: draw$g + }; + const getStyles$b = (options2) => ` + .entityBox { + fill: ${options2.mainBkg}; + stroke: ${options2.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${options2.attributeBackgroundColorOdd}; + stroke: ${options2.nodeBorder}; + } + + .attributeBoxEven { + fill: ${options2.attributeBackgroundColorEven}; + stroke: ${options2.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${options2.tertiaryColor}; + opacity: 0.7; + background-color: ${options2.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${options2.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; + } + +`; + const erStyles = getStyles$b; + const diagram$g = { + parser: erParser, + db: erDb, + renderer: erRenderer, + styles: erStyles + }; + const erDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$g + }, Symbol.toStringTag, { value: "Module" })); + var parser$m = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 6], $V2 = [1, 4], $V3 = [1, 5], $V4 = [2, 5], $V5 = [1, 12], $V6 = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39, 46], $V7 = [7, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], $V8 = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 36, 39], $V9 = [7, 13, 46], $Va = [1, 42], $Vb = [1, 41], $Vc = [7, 13, 29, 32, 34, 37, 46], $Vd = [1, 55], $Ve = [1, 56], $Vf = [1, 57], $Vg = [7, 13, 32, 34, 41, 46]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "GG": 5, "document": 6, "EOF": 7, ":": 8, "DIR": 9, "options": 10, "body": 11, "OPT": 12, "NL": 13, "line": 14, "statement": 15, "commitStatement": 16, "mergeStatement": 17, "cherryPickStatement": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "section": 24, "branchStatement": 25, "CHECKOUT": 26, "ref": 27, "BRANCH": 28, "ORDER": 29, "NUM": 30, "CHERRY_PICK": 31, "COMMIT_ID": 32, "STR": 33, "COMMIT_TAG": 34, "EMPTYSTR": 35, "MERGE": 36, "COMMIT_TYPE": 37, "commitType": 38, "COMMIT": 39, "commit_arg": 40, "COMMIT_MSG": 41, "NORMAL": 42, "REVERSE": 43, "HIGHLIGHT": 44, "ID": 45, ";": 46, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "COMMIT_TAG", 35: "EMPTYSTR", 36: "MERGE", 37: "COMMIT_TYPE", 39: "COMMIT", 41: "COMMIT_MSG", 42: "NORMAL", 43: "REVERSE", 44: "HIGHLIGHT", 45: "ID", 46: ";" }, + productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 5], [18, 5], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [40, 0], [40, 1], [38, 1], [38, 1], [38, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + return $$[$0]; + case 3: + return $$[$0 - 1]; + case 4: + yy.setDirection($$[$0 - 3]); + return $$[$0 - 1]; + case 6: + yy.setOptions($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 7: + $$[$0 - 1] += $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 9: + this.$ = []; + break; + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 11: + this.$ = $$[$0 - 1]; + break; + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 21: + yy.checkout($$[$0]); + break; + case 22: + yy.branch($$[$0]); + break; + case 23: + yy.branch($$[$0 - 2], $$[$0]); + break; + case 24: + yy.cherryPick($$[$0], "", void 0); + break; + case 25: + yy.cherryPick($$[$0 - 2], "", $$[$0]); + break; + case 26: + case 28: + yy.cherryPick($$[$0 - 2], "", ""); + break; + case 27: + yy.cherryPick($$[$0], "", $$[$0 - 2]); + break; + case 29: + yy.merge($$[$0], "", "", ""); + break; + case 30: + yy.merge($$[$0 - 2], $$[$0], "", ""); + break; + case 31: + yy.merge($$[$0 - 2], "", $$[$0], ""); + break; + case 32: + yy.merge($$[$0 - 2], "", "", $$[$0]); + break; + case 33: + yy.merge($$[$0 - 4], $$[$0], "", $$[$0 - 2]); + break; + case 34: + yy.merge($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 35: + yy.merge($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 36: + yy.merge($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 37: + yy.merge($$[$0 - 4], $$[$0 - 2], "", $$[$0]); + break; + case 38: + yy.merge($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 39: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 40: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 41: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 42: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 43: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 44: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 45: + yy.commit($$[$0]); + break; + case 46: + yy.commit("", "", yy.commitType.NORMAL, $$[$0]); + break; + case 47: + yy.commit("", "", $$[$0], ""); + break; + case 48: + yy.commit("", "", $$[$0], $$[$0 - 2]); + break; + case 49: + yy.commit("", "", $$[$0 - 2], $$[$0]); + break; + case 50: + yy.commit("", $$[$0], yy.commitType.NORMAL, ""); + break; + case 51: + yy.commit("", $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 52: + yy.commit("", $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 53: + yy.commit("", $$[$0 - 2], $$[$0], ""); + break; + case 54: + yy.commit("", $$[$0], $$[$0 - 2], ""); + break; + case 55: + yy.commit("", $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 56: + yy.commit("", $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 57: + yy.commit("", $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 58: + yy.commit("", $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 59: + yy.commit("", $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 60: + yy.commit("", $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 61: + yy.commit($$[$0], "", yy.commitType.NORMAL, ""); + break; + case 62: + yy.commit($$[$0], "", yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 63: + yy.commit($$[$0 - 2], "", yy.commitType.NORMAL, $$[$0]); + break; + case 64: + yy.commit($$[$0 - 2], "", $$[$0], ""); + break; + case 65: + yy.commit($$[$0], "", $$[$0 - 2], ""); + break; + case 66: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, ""); + break; + case 67: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, ""); + break; + case 68: + yy.commit($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 69: + yy.commit($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 70: + yy.commit($$[$0 - 2], "", $$[$0 - 4], $$[$0]); + break; + case 71: + yy.commit($$[$0], "", $$[$0 - 4], $$[$0 - 2]); + break; + case 72: + yy.commit($$[$0], "", $$[$0 - 2], $$[$0 - 4]); + break; + case 73: + yy.commit($$[$0 - 2], "", $$[$0], $$[$0 - 4]); + break; + case 74: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 75: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 76: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], ""); + break; + case 77: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], ""); + break; + case 78: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], ""); + break; + case 79: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], ""); + break; + case 80: + yy.commit($$[$0 - 4], $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 81: + yy.commit($$[$0 - 4], $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 82: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 83: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 84: + yy.commit($$[$0], $$[$0 - 4], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 85: + yy.commit($$[$0 - 2], $$[$0 - 4], yy.commitType.NORMAL, $$[$0]); + break; + case 86: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 87: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 88: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 89: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 90: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 91: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 92: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0 - 2], $$[$0]); + break; + case 93: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0], $$[$0 - 2]); + break; + case 94: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0 - 4], $$[$0]); + break; + case 95: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 4], $$[$0 - 2]); + break; + case 96: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0], $$[$0 - 4]); + break; + case 97: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 2], $$[$0 - 4]); + break; + case 98: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], $$[$0 - 6]); + break; + case 99: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], $$[$0 - 6]); + break; + case 100: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], $$[$0 - 6]); + break; + case 101: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], $$[$0 - 6]); + break; + case 102: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], $$[$0 - 6]); + break; + case 103: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 6]); + break; + case 104: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0 - 6], $$[$0]); + break; + case 105: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 6], $$[$0 - 2]); + break; + case 106: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 6], $$[$0 - 4]); + break; + case 107: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 6], $$[$0 - 4]); + break; + case 108: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0 - 6], $$[$0]); + break; + case 109: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = ""; + break; + case 111: + this.$ = $$[$0]; + break; + case 112: + this.$ = yy.commitType.NORMAL; + break; + case 113: + this.$ = yy.commitType.REVERSE; + break; + case 114: + this.$ = yy.commitType.HIGHLIGHT; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 7: $V1, 13: $V2, 46: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 7: $V1, 13: $V2, 46: $V3 }, { 6: 8, 7: $V4, 8: [1, 9], 9: [1, 10], 10: 11, 13: $V5 }, o($V6, [2, 117]), o($V6, [2, 118]), o($V6, [2, 119]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: $V4, 10: 11, 13: $V5 }, { 8: [1, 15] }, o($V7, [2, 9], { 11: 16, 12: [1, 17] }), o($V8, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: $V4, 10: 11, 13: $V5 }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 36: [1, 33], 39: [1, 32] }, o($V8, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, o($V7, [2, 10]), { 4: 37, 7: $V1, 13: $V2, 46: $V3 }, o($V7, [2, 12]), o($V9, [2, 13]), o($V9, [2, 14]), o($V9, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), { 27: 40, 33: $Va, 45: $Vb }, o($V9, [2, 110], { 40: 43, 32: [1, 46], 33: [1, 48], 34: [1, 44], 37: [1, 45], 41: [1, 47] }), { 27: 49, 33: $Va, 45: $Vb }, { 32: [1, 50], 34: [1, 51] }, { 27: 52, 33: $Va, 45: $Vb }, { 1: [2, 4] }, o($V7, [2, 11]), o($V9, [2, 16]), o($V9, [2, 17]), o($V9, [2, 21]), o($Vc, [2, 115]), o($Vc, [2, 116]), o($V9, [2, 45]), { 33: [1, 53] }, { 38: 54, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 58] }, { 33: [1, 59] }, o($V9, [2, 111]), o($V9, [2, 29], { 32: [1, 60], 34: [1, 62], 37: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 35: [1, 65] }, o($V9, [2, 22], { 29: [1, 66] }), o($V9, [2, 46], { 32: [1, 68], 37: [1, 67], 41: [1, 69] }), o($V9, [2, 47], { 32: [1, 71], 34: [1, 70], 41: [1, 72] }), o($Vg, [2, 112]), o($Vg, [2, 113]), o($Vg, [2, 114]), o($V9, [2, 50], { 34: [1, 73], 37: [1, 74], 41: [1, 75] }), o($V9, [2, 61], { 32: [1, 78], 34: [1, 76], 37: [1, 77] }), { 33: [1, 79] }, { 38: 80, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 81] }, o($V9, [2, 24], { 34: [1, 82] }), { 32: [1, 83] }, { 32: [1, 84] }, { 30: [1, 85] }, { 38: 86, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 87] }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 38: 93, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 94] }, { 33: [1, 95] }, { 38: 96, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 97] }, o($V9, [2, 30], { 34: [1, 99], 37: [1, 98] }), o($V9, [2, 31], { 32: [1, 101], 34: [1, 100] }), o($V9, [2, 32], { 32: [1, 102], 37: [1, 103] }), { 33: [1, 104], 35: [1, 105] }, { 33: [1, 106] }, { 33: [1, 107] }, o($V9, [2, 23]), o($V9, [2, 48], { 32: [1, 108], 41: [1, 109] }), o($V9, [2, 52], { 37: [1, 110], 41: [1, 111] }), o($V9, [2, 62], { 32: [1, 113], 37: [1, 112] }), o($V9, [2, 49], { 32: [1, 114], 41: [1, 115] }), o($V9, [2, 54], { 34: [1, 116], 41: [1, 117] }), o($V9, [2, 65], { 32: [1, 119], 34: [1, 118] }), o($V9, [2, 51], { 37: [1, 120], 41: [1, 121] }), o($V9, [2, 53], { 34: [1, 122], 41: [1, 123] }), o($V9, [2, 66], { 34: [1, 125], 37: [1, 124] }), o($V9, [2, 63], { 32: [1, 127], 37: [1, 126] }), o($V9, [2, 64], { 32: [1, 129], 34: [1, 128] }), o($V9, [2, 67], { 34: [1, 131], 37: [1, 130] }), { 38: 132, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 133] }, { 33: [1, 134] }, { 33: [1, 135] }, { 33: [1, 136] }, { 38: 137, 42: $Vd, 43: $Ve, 44: $Vf }, o($V9, [2, 25]), o($V9, [2, 26]), o($V9, [2, 27]), o($V9, [2, 28]), { 33: [1, 138] }, { 33: [1, 139] }, { 38: 140, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 141] }, { 38: 142, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 143] }, { 33: [1, 144] }, { 33: [1, 145] }, { 33: [1, 146] }, { 33: [1, 147] }, { 33: [1, 148] }, { 33: [1, 149] }, { 38: 150, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 38: 154, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 155] }, { 38: 156, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 157] }, { 33: [1, 158] }, { 33: [1, 159] }, { 38: 160, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 161] }, o($V9, [2, 36], { 34: [1, 162] }), o($V9, [2, 37], { 37: [1, 163] }), o($V9, [2, 35], { 32: [1, 164] }), o($V9, [2, 38], { 34: [1, 165] }), o($V9, [2, 33], { 37: [1, 166] }), o($V9, [2, 34], { 32: [1, 167] }), o($V9, [2, 59], { 41: [1, 168] }), o($V9, [2, 72], { 32: [1, 169] }), o($V9, [2, 60], { 41: [1, 170] }), o($V9, [2, 83], { 37: [1, 171] }), o($V9, [2, 73], { 32: [1, 172] }), o($V9, [2, 82], { 37: [1, 173] }), o($V9, [2, 58], { 41: [1, 174] }), o($V9, [2, 71], { 32: [1, 175] }), o($V9, [2, 57], { 41: [1, 176] }), o($V9, [2, 77], { 34: [1, 177] }), o($V9, [2, 70], { 32: [1, 178] }), o($V9, [2, 76], { 34: [1, 179] }), o($V9, [2, 56], { 41: [1, 180] }), o($V9, [2, 84], { 37: [1, 181] }), o($V9, [2, 55], { 41: [1, 182] }), o($V9, [2, 78], { 34: [1, 183] }), o($V9, [2, 79], { 34: [1, 184] }), o($V9, [2, 85], { 37: [1, 185] }), o($V9, [2, 69], { 32: [1, 186] }), o($V9, [2, 80], { 37: [1, 187] }), o($V9, [2, 68], { 32: [1, 188] }), o($V9, [2, 74], { 34: [1, 189] }), o($V9, [2, 75], { 34: [1, 190] }), o($V9, [2, 81], { 37: [1, 191] }), { 33: [1, 192] }, { 38: 193, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 194] }, { 33: [1, 195] }, { 38: 196, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 197] }, { 33: [1, 198] }, { 33: [1, 199] }, { 33: [1, 200] }, { 38: 201, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 202] }, { 38: 203, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 204] }, { 33: [1, 205] }, { 33: [1, 206] }, { 33: [1, 207] }, { 33: [1, 208] }, { 33: [1, 209] }, { 33: [1, 210] }, { 38: 211, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 212] }, { 33: [1, 213] }, { 33: [1, 214] }, { 38: 215, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 216] }, { 38: 217, 42: $Vd, 43: $Ve, 44: $Vf }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 38: 221, 42: $Vd, 43: $Ve, 44: $Vf }, o($V9, [2, 39]), o($V9, [2, 41]), o($V9, [2, 40]), o($V9, [2, 42]), o($V9, [2, 44]), o($V9, [2, 43]), o($V9, [2, 100]), o($V9, [2, 101]), o($V9, [2, 98]), o($V9, [2, 99]), o($V9, [2, 103]), o($V9, [2, 102]), o($V9, [2, 107]), o($V9, [2, 106]), o($V9, [2, 105]), o($V9, [2, 104]), o($V9, [2, 109]), o($V9, [2, 108]), o($V9, [2, 97]), o($V9, [2, 96]), o($V9, [2, 95]), o($V9, [2, 94]), o($V9, [2, 92]), o($V9, [2, 93]), o($V9, [2, 91]), o($V9, [2, 90]), o($V9, [2, 89]), o($V9, [2, 88]), o($V9, [2, 86]), o($V9, [2, 87])], + defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 19; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 21; + case 3: + this.popState(); + return "acc_descr_value"; + case 4: + this.begin("acc_descr_multiline"); + break; + case 5: + this.popState(); + break; + case 6: + return "acc_descr_multiline_value"; + case 7: + return 13; + case 8: + break; + case 9: + break; + case 10: + return 5; + case 11: + return 39; + case 12: + return 32; + case 13: + return 37; + case 14: + return 41; + case 15: + return 42; + case 16: + return 43; + case 17: + return 44; + case 18: + return 34; + case 19: + return 28; + case 20: + return 29; + case 21: + return 36; + case 22: + return 31; + case 23: + return 26; + case 24: + return 9; + case 25: + return 9; + case 26: + return 8; + case 27: + return "CARET"; + case 28: + this.begin("options"); + break; + case 29: + this.popState(); + break; + case 30: + return 12; + case 31: + return 35; + case 32: + this.begin("string"); + break; + case 33: + this.popState(); + break; + case 34: + return 33; + case 35: + return 30; + case 36: + return 45; + case 37: + return 7; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i], + conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "options": { "rules": [29, 30], "inclusive": false }, "string": { "rules": [33, 34], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 35, 36, 37, 38], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$m.parser = parser$m; + const gitGraphParser = parser$m; + let mainBranchName = getConfig$2().gitGraph.mainBranchName; + let mainBranchOrder = getConfig$2().gitGraph.mainBranchOrder; + let commits = {}; + let head = null; + let branchesConfig = {}; + branchesConfig[mainBranchName] = { name: mainBranchName, order: mainBranchOrder }; + let branches = {}; + branches[mainBranchName] = head; + let curBranch = mainBranchName; + let direction$2 = "LR"; + let seq = 0; + function getId() { + return random({ length: 7 }); + } + function uniqBy(list2, fn) { + const recordMap = /* @__PURE__ */ Object.create(null); + return list2.reduce((out, item) => { + const key = fn(item); + if (!recordMap[key]) { + recordMap[key] = true; + out.push(item); + } + return out; + }, []); + } + const setDirection$2 = function(dir2) { + direction$2 = dir2; + }; + let options = {}; + const setOptions = function(rawOptString) { + log$1.debug("options str", rawOptString); + rawOptString = rawOptString && rawOptString.trim(); + rawOptString = rawOptString || "{}"; + try { + options = JSON.parse(rawOptString); + } catch (e) { + log$1.error("error while parsing gitGraph options", e.message); + } + }; + const getOptions = function() { + return options; + }; + const commit = function(msg, id2, type2, tag) { + log$1.debug("Entering commit:", msg, id2, type2, tag); + id2 = common$1.sanitizeText(id2, getConfig$2()); + msg = common$1.sanitizeText(msg, getConfig$2()); + tag = common$1.sanitizeText(tag, getConfig$2()); + const commit2 = { + id: id2 ? id2 : seq + "-" + getId(), + message: msg, + seq: seq++, + type: type2 ? type2 : commitType$1.NORMAL, + tag: tag ? tag : "", + parents: head == null ? [] : [head.id], + branch: curBranch + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log$1.debug("in pushCommit " + commit2.id); + }; + const branch = function(name2, order2) { + name2 = common$1.sanitizeText(name2, getConfig$2()); + if (branches[name2] === void 0) { + branches[name2] = head != null ? head.id : null; + branchesConfig[name2] = { name: name2, order: order2 ? parseInt(order2, 10) : null }; + checkout(name2); + log$1.debug("in createBranch"); + } else { + let error = new Error( + 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + name2 + '")' + ); + error.hash = { + text: "branch " + name2, + token: "branch " + name2, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name2 + '"'] + }; + throw error; + } + }; + const merge = function(otherBranch, custom_id, override_type, custom_tag) { + otherBranch = common$1.sanitizeText(otherBranch, getConfig$2()); + custom_id = common$1.sanitizeText(custom_id, getConfig$2()); + const currentCommit = commits[branches[curBranch]]; + const otherCommit = commits[branches[otherBranch]]; + if (curBranch === otherBranch) { + let error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["commit"] + }; + throw error; + } else if (branches[otherBranch] === void 0) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch " + otherBranch] + }; + throw error; + } else if (otherCommit === void 0 || !otherCommit) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"commit"'] + }; + throw error; + } else if (currentCommit === otherCommit) { + let error = new Error('Incorrect usage of "merge". Both branches have same head'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (custom_id && commits[custom_id] !== void 0) { + let error = new Error( + 'Incorrect usage of "merge". Commit with id:' + custom_id + " already exists, use different custom Id" + ); + error.hash = { + text: "merge " + otherBranch + custom_id + override_type + custom_tag, + token: "merge " + otherBranch + custom_id + override_type + custom_tag, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: [ + "merge " + otherBranch + " " + custom_id + "_UNIQUE " + override_type + " " + custom_tag + ] + }; + throw error; + } + const commit2 = { + id: custom_id ? custom_id : seq + "-" + getId(), + message: "merged branch " + otherBranch + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, branches[otherBranch]], + branch: curBranch, + type: commitType$1.MERGE, + customType: override_type, + customId: custom_id ? true : false, + tag: custom_tag ? custom_tag : "" + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log$1.debug(branches); + log$1.debug("in mergeBranch"); + }; + const cherryPick = function(sourceId, targetId, tag) { + log$1.debug("Entering cherryPick:", sourceId, targetId, tag); + sourceId = common$1.sanitizeText(sourceId, getConfig$2()); + targetId = common$1.sanitizeText(targetId, getConfig$2()); + tag = common$1.sanitizeText(tag, getConfig$2()); + if (!sourceId || commits[sourceId] === void 0) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit id should exist and provided' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + let sourceCommit = commits[sourceId]; + let sourceCommitBranch = sourceCommit.branch; + if (sourceCommit.type === commitType$1.MERGE) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit should not be a merge commit' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + if (!targetId || commits[targetId] === void 0) { + if (sourceCommitBranch === curBranch) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit is already on current branch' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const currentCommit = commits[branches[curBranch]]; + if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "cherry-pick". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const commit2 = { + id: seq + "-" + getId(), + message: "cherry-picked " + sourceCommit + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, sourceCommit.id], + branch: curBranch, + type: commitType$1.CHERRY_PICK, + tag: tag ?? "cherry-pick:" + sourceCommit.id + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + log$1.debug(branches); + log$1.debug("in cherryPick"); + } + }; + const checkout = function(branch2) { + branch2 = common$1.sanitizeText(branch2, getConfig$2()); + if (branches[branch2] === void 0) { + let error = new Error( + 'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch2 + '")' + ); + error.hash = { + text: "checkout " + branch2, + token: "checkout " + branch2, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"branch ' + branch2 + '"'] + }; + throw error; + } else { + curBranch = branch2; + const id2 = branches[curBranch]; + head = commits[id2]; + } + }; + function upsert(arr, key, newVal) { + const index2 = arr.indexOf(key); + if (index2 === -1) { + arr.push(newVal); + } else { + arr.splice(index2, 1, newVal); + } + } + function prettyPrintCommitHistory(commitArr) { + const commit2 = commitArr.reduce((out, commit3) => { + if (out.seq > commit3.seq) { + return out; + } + return commit3; + }, commitArr[0]); + let line2 = ""; + commitArr.forEach(function(c2) { + if (c2 === commit2) { + line2 += " *"; + } else { + line2 += " |"; + } + }); + const label = [line2, commit2.id, commit2.seq]; + for (let branch2 in branches) { + if (branches[branch2] === commit2.id) { + label.push(branch2); + } + } + log$1.debug(label.join(" ")); + if (commit2.parents && commit2.parents.length == 2) { + const newCommit = commits[commit2.parents[0]]; + upsert(commitArr, commit2, newCommit); + commitArr.push(commits[commit2.parents[1]]); + } else if (commit2.parents.length == 0) { + return; + } else { + const nextCommit = commits[commit2.parents]; + upsert(commitArr, commit2, nextCommit); + } + commitArr = uniqBy(commitArr, (c2) => c2.id); + prettyPrintCommitHistory(commitArr); + } + const prettyPrint = function() { + log$1.debug(commits); + const node2 = getCommitsArray()[0]; + prettyPrintCommitHistory([node2]); + }; + const clear$d = function() { + commits = {}; + head = null; + let mainBranch = getConfig$2().gitGraph.mainBranchName; + let mainBranchOrder2 = getConfig$2().gitGraph.mainBranchOrder; + branches = {}; + branches[mainBranch] = null; + branchesConfig = {}; + branchesConfig[mainBranch] = { name: mainBranch, order: mainBranchOrder2 }; + curBranch = mainBranch; + seq = 0; + clear$l(); + }; + const getBranchesAsObjArray = function() { + const branchesArray = Object.values(branchesConfig).map((branchConfig, i2) => { + if (branchConfig.order !== null) { + return branchConfig; + } + return { + ...branchConfig, + order: parseFloat(`0.${i2}`, 10) + }; + }).sort((a, b) => a.order - b.order).map(({ name: name2 }) => ({ name: name2 })); + return branchesArray; + }; + const getBranches = function() { + return branches; + }; + const getCommits = function() { + return commits; + }; + const getCommitsArray = function() { + const commitArr = Object.keys(commits).map(function(key) { + return commits[key]; + }); + commitArr.forEach(function(o) { + log$1.debug(o.id); + }); + commitArr.sort((a, b) => a.seq - b.seq); + return commitArr; + }; + const getCurrentBranch = function() { + return curBranch; + }; + const getDirection$2 = function() { + return direction$2; + }; + const getHead = function() { + return head; + }; + const commitType$1 = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 + }; + const gitGraphDb = { + getConfig: () => getConfig$2().gitGraph, + setDirection: setDirection$2, + setOptions, + getOptions, + commit, + branch, + merge, + cherryPick, + checkout, + //reset, + prettyPrint, + clear: clear$d, + getBranchesAsObjArray, + getBranches, + getCommits, + getCommitsArray, + getCurrentBranch, + getDirection: getDirection$2, + getHead, + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + setDiagramTitle, + getDiagramTitle, + commitType: commitType$1 + }; + let allCommitsDict = {}; + const commitType = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 + }; + const THEME_COLOR_LIMIT = 8; + let branchPos = {}; + let commitPos = {}; + let lanes = []; + let maxPos = 0; + let dir = "LR"; + const clear$c = () => { + branchPos = {}; + commitPos = {}; + allCommitsDict = {}; + maxPos = 0; + lanes = []; + dir = "LR"; + }; + const drawText$3 = (txt) => { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + let rows = []; + if (typeof txt === "string") { + rows = txt.split(/\\n|\n|/gi); + } else if (Array.isArray(txt)) { + rows = txt; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + tspan.setAttribute("class", "row"); + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + }; + const drawCommits = (svg2, commits2, modifyGraph) => { + const gitGraphConfig = getConfig$1().gitGraph; + const gBullets = svg2.append("g").attr("class", "commit-bullets"); + const gLabels = svg2.append("g").attr("class", "commit-labels"); + let pos = 0; + if (dir === "TB") { + pos = 30; + } + const keys2 = Object.keys(commits2); + const sortedKeys = keys2.sort((a, b) => { + return commits2[a].seq - commits2[b].seq; + }); + sortedKeys.forEach((key) => { + const commit2 = commits2[key]; + const y2 = dir === "TB" ? pos + 10 : branchPos[commit2.branch].pos; + const x2 = dir === "TB" ? branchPos[commit2.branch].pos : pos + 10; + if (modifyGraph) { + let typeClass; + let commitSymbolType = commit2.customType !== void 0 && commit2.customType !== "" ? commit2.customType : commit2.type; + switch (commitSymbolType) { + case commitType.NORMAL: + typeClass = "commit-normal"; + break; + case commitType.REVERSE: + typeClass = "commit-reverse"; + break; + case commitType.HIGHLIGHT: + typeClass = "commit-highlight"; + break; + case commitType.MERGE: + typeClass = "commit-merge"; + break; + case commitType.CHERRY_PICK: + typeClass = "commit-cherry-pick"; + break; + default: + typeClass = "commit-normal"; + } + if (commitSymbolType === commitType.HIGHLIGHT) { + const circle2 = gBullets.append("rect"); + circle2.attr("x", x2 - 10); + circle2.attr("y", y2 - 10); + circle2.attr("height", 20); + circle2.attr("width", 20); + circle2.attr( + "class", + `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer` + ); + gBullets.append("rect").attr("x", x2 - 6).attr("y", y2 - 6).attr("height", 12).attr("width", 12).attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner` + ); + } else if (commitSymbolType === commitType.CHERRY_PICK) { + gBullets.append("circle").attr("cx", x2).attr("cy", y2).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x2 - 3).attr("cy", y2 + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x2 + 3).attr("cy", y2 + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x2 + 3).attr("y1", y2 + 1).attr("x2", x2).attr("y2", y2 - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x2 - 3).attr("y1", y2 + 1).attr("x2", x2).attr("y2", y2 - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + } else { + const circle2 = gBullets.append("circle"); + circle2.attr("cx", x2); + circle2.attr("cy", y2); + circle2.attr("r", commit2.type === commitType.MERGE ? 9 : 10); + circle2.attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + if (commitSymbolType === commitType.MERGE) { + const circle22 = gBullets.append("circle"); + circle22.attr("cx", x2); + circle22.attr("cy", y2); + circle22.attr("r", 6); + circle22.attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + if (commitSymbolType === commitType.REVERSE) { + const cross2 = gBullets.append("path"); + cross2.attr("d", `M ${x2 - 5},${y2 - 5}L${x2 + 5},${y2 + 5}M${x2 - 5},${y2 + 5}L${x2 + 5},${y2 - 5}`).attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + } + } + if (dir === "TB") { + commitPos[commit2.id] = { x: x2, y: pos + 10 }; + } else { + commitPos[commit2.id] = { x: pos + 10, y: y2 }; + } + if (modifyGraph) { + const px = 4; + const py = 2; + if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && gitGraphConfig.showCommitLabel) { + const wrapper = gLabels.append("g"); + const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg"); + const text2 = wrapper.append("text").attr("x", pos).attr("y", y2 + 25).attr("class", "commit-label").text(commit2.id); + let bbox = text2.node().getBBox(); + labelBkg.attr("x", pos + 10 - bbox.width / 2 - py).attr("y", y2 + 13.5).attr("width", bbox.width + 2 * py).attr("height", bbox.height + 2 * py); + if (dir === "TB") { + labelBkg.attr("x", x2 - (bbox.width + 4 * px + 5)).attr("y", y2 - 12); + text2.attr("x", x2 - (bbox.width + 4 * px)).attr("y", y2 + bbox.height - 12); + } + if (dir !== "TB") { + text2.attr("x", pos + 10 - bbox.width / 2); + } + if (gitGraphConfig.rotateCommitLabel) { + if (dir === "TB") { + text2.attr("transform", "rotate(-45, " + x2 + ", " + y2 + ")"); + labelBkg.attr("transform", "rotate(-45, " + x2 + ", " + y2 + ")"); + } else { + let r_x = -7.5 - (bbox.width + 10) / 25 * 9.5; + let r_y = 10 + bbox.width / 25 * 8.5; + wrapper.attr( + "transform", + "translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + y2 + ")" + ); + } + } + } + if (commit2.tag) { + const rect2 = gLabels.insert("polygon"); + const hole = gLabels.append("circle"); + const tag = gLabels.append("text").attr("y", y2 - 16).attr("class", "tag-label").text(commit2.tag); + let tagBbox = tag.node().getBBox(); + tag.attr("x", pos + 10 - tagBbox.width / 2); + const h2 = tagBbox.height / 2; + const ly = y2 - 19.2; + rect2.attr("class", "tag-label-bkg").attr( + "points", + ` + ${pos - tagBbox.width / 2 - px / 2},${ly + py} + ${pos - tagBbox.width / 2 - px / 2},${ly - py} + ${pos + 10 - tagBbox.width / 2 - px},${ly - h2 - py} + ${pos + 10 + tagBbox.width / 2 + px},${ly - h2 - py} + ${pos + 10 + tagBbox.width / 2 + px},${ly + h2 + py} + ${pos + 10 - tagBbox.width / 2 - px},${ly + h2 + py}` + ); + hole.attr("cx", pos - tagBbox.width / 2 + px / 2).attr("cy", ly).attr("r", 1.5).attr("class", "tag-hole"); + if (dir === "TB") { + rect2.attr("class", "tag-label-bkg").attr( + "points", + ` + ${x2},${pos + py} + ${x2},${pos - py} + ${x2 + 10},${pos - h2 - py} + ${x2 + 10 + tagBbox.width + px},${pos - h2 - py} + ${x2 + 10 + tagBbox.width + px},${pos + h2 + py} + ${x2 + 10},${pos + h2 + py}` + ).attr("transform", "translate(12,12) rotate(45, " + x2 + "," + pos + ")"); + hole.attr("cx", x2 + px / 2).attr("cy", pos).attr("transform", "translate(12,12) rotate(45, " + x2 + "," + pos + ")"); + tag.attr("x", x2 + 5).attr("y", pos + 3).attr("transform", "translate(14,14) rotate(45, " + x2 + "," + pos + ")"); + } + } + } + pos += 50; + if (pos > maxPos) { + maxPos = pos; + } + }); + }; + const hasOverlappingCommits = (commit1, commit2, allCommits) => { + const keys2 = Object.keys(allCommits); + const overlappingComits = keys2.filter((key) => { + return allCommits[key].branch === commit2.branch && allCommits[key].seq > commit1.seq && allCommits[key].seq < commit2.seq; + }); + return overlappingComits.length > 0; + }; + const findLane = (y1, y2, depth = 0) => { + const candidate = y1 + Math.abs(y1 - y2) / 2; + if (depth > 5) { + return candidate; + } + let ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10); + if (ok) { + lanes.push(candidate); + return candidate; + } + const diff = Math.abs(y1 - y2); + return findLane(y1, y2 - diff / 5, depth + 1); + }; + const drawArrow = (svg2, commit1, commit2, allCommits) => { + const p1 = commitPos[commit1.id]; + const p2 = commitPos[commit2.id]; + const overlappingCommits = hasOverlappingCommits(commit1, commit2, allCommits); + let arc = ""; + let arc2 = ""; + let radius = 0; + let offset = 0; + let colorClassNum = branchPos[commit2.branch].index; + let lineDef; + if (overlappingCommits) { + arc = "A 10 10, 0, 0, 0,"; + arc2 = "A 10 10, 0, 0, 1,"; + radius = 10; + offset = 10; + colorClassNum = branchPos[commit2.branch].index; + const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y); + const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x); + if (dir === "TB") { + if (p1.x < p2.x) { + lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`; + } + } + } else { + if (dir === "TB") { + if (p1.x < p2.x) { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit2.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; + } + if (p1.x > p2.x) { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + if (p1.x === p2.x) { + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x + radius} ${p1.y} ${arc} ${p1.x + offset} ${p2.y + radius} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + arc = "A 20 20, 0, 0, 0,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit2.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + if (p1.y > p2.y) { + arc = "A 20 20, 0, 0, 0,"; + radius = 20; + offset = 20; + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`; + } + if (p1.y === p2.y) { + colorClassNum = branchPos[commit1.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } + } + svg2.append("path").attr("d", lineDef).attr("class", "arrow arrow" + colorClassNum % THEME_COLOR_LIMIT); + }; + const drawArrows = (svg2, commits2) => { + const gArrows = svg2.append("g").attr("class", "commit-arrows"); + Object.keys(commits2).forEach((key) => { + const commit2 = commits2[key]; + if (commit2.parents && commit2.parents.length > 0) { + commit2.parents.forEach((parent) => { + drawArrow(gArrows, commits2[parent], commit2, commits2); + }); + } + }); + }; + const drawBranches = (svg2, branches2) => { + const gitGraphConfig = getConfig$1().gitGraph; + const g = svg2.append("g"); + branches2.forEach((branch2, index2) => { + const adjustIndexForTheme = index2 % THEME_COLOR_LIMIT; + const pos = branchPos[branch2.name].pos; + const line2 = g.append("line"); + line2.attr("x1", 0); + line2.attr("y1", pos); + line2.attr("x2", maxPos); + line2.attr("y2", pos); + line2.attr("class", "branch branch" + adjustIndexForTheme); + if (dir === "TB") { + line2.attr("y1", 30); + line2.attr("x1", pos); + line2.attr("y2", maxPos); + line2.attr("x2", pos); + } + lanes.push(pos); + let name2 = branch2.name; + const labelElement = drawText$3(name2); + const bkg = g.insert("rect"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr("rx", 4).attr("ry", 4).attr("x", -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)).attr("y", -bbox.height / 2 + 8).attr("width", bbox.width + 18).attr("height", bbox.height + 4); + label.attr( + "transform", + "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")" + ); + if (dir === "TB") { + bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0); + label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)"); + } + if (dir !== "TB") { + bkg.attr("transform", "translate(-19, " + (pos - bbox.height / 2) + ")"); + } + }); + }; + const draw$f = function(txt, id2, ver, diagObj) { + clear$c(); + const conf2 = getConfig$1(); + const gitGraphConfig = conf2.gitGraph; + log$1.debug("in gitgraph renderer", txt + "\n", "id:", id2, ver); + allCommitsDict = diagObj.db.getCommits(); + const branches2 = diagObj.db.getBranchesAsObjArray(); + dir = diagObj.db.getDirection(); + const diagram2 = d3select(`[id="${id2}"]`); + let pos = 0; + branches2.forEach((branch2, index2) => { + const labelElement = drawText$3(branch2.name); + const g = diagram2.append("g"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + branchPos[branch2.name] = { pos, index: index2 }; + pos += 50 + (gitGraphConfig.rotateCommitLabel ? 40 : 0) + (dir === "TB" ? bbox.width / 2 : 0); + label.remove(); + branchLabel.remove(); + g.remove(); + }); + drawCommits(diagram2, allCommitsDict, false); + if (gitGraphConfig.showBranches) { + drawBranches(diagram2, branches2); + } + drawArrows(diagram2, allCommitsDict); + drawCommits(diagram2, allCommitsDict, true); + utils.insertTitle( + diagram2, + "gitTitleText", + gitGraphConfig.titleTopMargin, + diagObj.db.getDiagramTitle() + ); + setupGraphViewbox( + void 0, + diagram2, + gitGraphConfig.diagramPadding, + gitGraphConfig.useMaxWidth ?? conf2.useMaxWidth + ); + }; + const gitGraphRenderer = { + draw: draw$f + }; + const getStyles$a = (options2) => ` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0, 1, 2, 3, 4, 5, 6, 7].map( + (i2) => ` + .branch-label${i2} { fill: ${options2["gitBranchLabel" + i2]}; } + .commit${i2} { stroke: ${options2["git" + i2]}; fill: ${options2["git" + i2]}; } + .commit-highlight${i2} { stroke: ${options2["gitInv" + i2]}; fill: ${options2["gitInv" + i2]}; } + .label${i2} { fill: ${options2["git" + i2]}; } + .arrow${i2} { stroke: ${options2["git" + i2]}; } + ` + ).join("\n")} + + .branch { + stroke-width: 1; + stroke: ${options2.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelColor};} + .commit-label-bkg { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${options2.tagLabelFontSize}; fill: ${options2.tagLabelColor};} + .tag-label-bkg { fill: ${options2.tagLabelBackground}; stroke: ${options2.tagLabelBorder}; } + .tag-hole { fill: ${options2.textColor}; } + + .commit-merge { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + .commit-reverse { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; + } +`; + const gitGraphStyles = getStyles$a; + const diagram$f = { + parser: gitGraphParser, + db: gitGraphDb, + renderer: gitGraphRenderer, + styles: gitGraphStyles + }; + const gitGraphDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$f + }, Symbol.toStringTag, { value: "Module" })); + var parser$l = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 29], $V6 = [1, 30], $V7 = [1, 31], $V8 = [1, 9], $V9 = [1, 10], $Va = [1, 11], $Vb = [1, 12], $Vc = [1, 13], $Vd = [1, 14], $Ve = [1, 15], $Vf = [1, 16], $Vg = [1, 18], $Vh = [1, 19], $Vi = [1, 20], $Vj = [1, 21], $Vk = [1, 22], $Vl = [1, 24], $Vm = [1, 32]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "weekday": 11, "weekday_monday": 12, "weekday_tuesday": 13, "weekday_wednesday": 14, "weekday_thursday": 15, "weekday_friday": 16, "weekday_saturday": 17, "weekday_sunday": 18, "dateFormat": 19, "inclusiveEndDates": 20, "topAxis": 21, "axisFormat": 22, "tickInterval": 23, "excludes": 24, "includes": 25, "todayMarker": 26, "title": 27, "acc_title": 28, "acc_title_value": 29, "acc_descr": 30, "acc_descr_value": 31, "acc_descr_multiline_value": 32, "section": 33, "clickStatement": 34, "taskTxt": 35, "taskData": 36, "click": 37, "callbackname": 38, "callbackargs": 39, "href": 40, "clickStatementDebug": 41, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setWeekday("monday"); + break; + case 9: + yy.setWeekday("tuesday"); + break; + case 10: + yy.setWeekday("wednesday"); + break; + case 11: + yy.setWeekday("thursday"); + break; + case 12: + yy.setWeekday("friday"); + break; + case 13: + yy.setWeekday("saturday"); + break; + case 14: + yy.setWeekday("sunday"); + break; + case 15: + yy.setDateFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 16: + yy.enableInclusiveEndDates(); + this.$ = $$[$0].substr(18); + break; + case 17: + yy.TopAxis(); + this.$ = $$[$0].substr(8); + break; + case 18: + yy.setAxisFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 19: + yy.setTickInterval($$[$0].substr(13)); + this.$ = $$[$0].substr(13); + break; + case 20: + yy.setExcludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 21: + yy.setIncludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 22: + yy.setTodayMarker($$[$0].substr(12)); + this.$ = $$[$0].substr(12); + break; + case 24: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 25: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 26: + case 27: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 30: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + case 31: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0], null); + break; + case 32: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 33: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null); + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 34: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setLink($$[$0 - 3], $$[$0]); + break; + case 35: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0], null); + yy.setLink($$[$0 - 2], $$[$0 - 1]); + break; + case 36: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]); + yy.setLink($$[$0 - 3], $$[$0 - 2]); + break; + case 37: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 38: + case 44: + this.$ = $$[$0 - 1] + " " + $$[$0]; + break; + case 39: + case 40: + case 42: + this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + case 41: + case 43: + this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 33, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), { 36: [1, 36] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), { 38: [1, 37], 40: [1, 38] }, o($V0, [2, 4]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 30]), o($V0, [2, 31], { 39: [1, 39], 40: [1, 40] }), o($V0, [2, 37], { 38: [1, 41] }), o($V0, [2, 32], { 40: [1, 42] }), o($V0, [2, 33]), o($V0, [2, 35], { 39: [1, 43] }), o($V0, [2, 34]), o($V0, [2, 36])], + defaultActions: {}, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("open_directive"); + return "open_directive"; + case 1: + this.begin("acc_title"); + return 28; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 30; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + return 10; + case 12: + break; + case 13: + break; + case 14: + break; + case 15: + this.begin("href"); + break; + case 16: + this.popState(); + break; + case 17: + return 40; + case 18: + this.begin("callbackname"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callbackargs"); + break; + case 21: + return 38; + case 22: + this.popState(); + break; + case 23: + return 39; + case 24: + this.begin("click"); + break; + case 25: + this.popState(); + break; + case 26: + return 37; + case 27: + return 4; + case 28: + return 19; + case 29: + return 20; + case 30: + return 21; + case 31: + return 22; + case 32: + return 23; + case 33: + return 25; + case 34: + return 24; + case 35: + return 26; + case 36: + return 12; + case 37: + return 13; + case 38: + return 14; + case 39: + return 15; + case 40: + return 16; + case 41: + return 17; + case 42: + return 18; + case 43: + return "date"; + case 44: + return 27; + case 45: + return "accDescription"; + case 46: + return 33; + case 47: + return 35; + case 48: + return 36; + case 49: + return ":"; + case 50: + return 6; + case 51: + return "INVALID"; + } + }, + rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [22, 23], "inclusive": false }, "callbackname": { "rules": [19, 20, 21], "inclusive": false }, "href": { "rules": [16, 17], "inclusive": false }, "click": { "rules": [25, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 18, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$l.parser = parser$l; + const ganttParser = parser$l; + var isoWeek = { exports: {} }; + (function(module2, exports2) { + !function(e, t) { + module2.exports = t(); + }(commonjsGlobal, function() { + var e = "day"; + return function(t, i2, s) { + var a = function(t4) { + return t4.add(4 - t4.isoWeekday(), e); + }, d = i2.prototype; + d.isoWeekYear = function() { + return a(this).year(); + }, d.isoWeek = function(t4) { + if (!this.$utils().u(t4)) + return this.add(7 * (t4 - this.isoWeek()), e); + var i3, d2, n2, o, r = a(this), u = (i3 = this.isoWeekYear(), d2 = this.$u, n2 = (d2 ? s.utc : s)().year(i3).startOf("year"), o = 4 - n2.isoWeekday(), n2.isoWeekday() > 4 && (o += 7), n2.add(o, e)); + return r.diff(u, "week") + 1; + }, d.isoWeekday = function(e3) { + return this.$utils().u(e3) ? this.day() || 7 : this.day(this.day() % 7 ? e3 : e3 - 7); + }; + var n = d.startOf; + d.startOf = function(e3, t4) { + var i3 = this.$utils(), s2 = !!i3.u(t4) || t4; + return "isoweek" === i3.p(e3) ? s2 ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : n.bind(this)(e3, t4); + }; + }; + }); + })(isoWeek); + var isoWeekExports = isoWeek.exports; + const dayjsIsoWeek = /* @__PURE__ */ getDefaultExportFromCjs(isoWeekExports); + var customParseFormat = { exports: {} }; + (function(module2, exports2) { + !function(e, t) { + module2.exports = t(); + }(commonjsGlobal, function() { + var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d\d/, r = /\d\d?/, i2 = /\d*[^-_:/,()\s\d]+/, o = {}, s = function(e3) { + return (e3 = +e3) + (e3 > 68 ? 1900 : 2e3); + }; + var a = function(e3) { + return function(t4) { + this[e3] = +t4; + }; + }, f2 = [/[+-]\d\d:?(\d\d)?|Z/, function(e3) { + (this.zone || (this.zone = {})).offset = function(e4) { + if (!e4) + return 0; + if ("Z" === e4) + return 0; + var t4 = e4.match(/([+-]|\d\d)/g), n2 = 60 * t4[1] + (+t4[2] || 0); + return 0 === n2 ? 0 : "+" === t4[0] ? -n2 : n2; + }(e3); + }], h = function(e3) { + var t4 = o[e3]; + return t4 && (t4.indexOf ? t4 : t4.s.concat(t4.f)); + }, u = function(e3, t4) { + var n2, r2 = o.meridiem; + if (r2) { + for (var i3 = 1; i3 <= 24; i3 += 1) + if (e3.indexOf(r2(i3, 0, t4)) > -1) { + n2 = i3 > 12; + break; + } + } else + n2 = e3 === (t4 ? "pm" : "PM"); + return n2; + }, d = { A: [i2, function(e3) { + this.afternoon = u(e3, false); + }], a: [i2, function(e3) { + this.afternoon = u(e3, true); + }], S: [/\d/, function(e3) { + this.milliseconds = 100 * +e3; + }], SS: [n, function(e3) { + this.milliseconds = 10 * +e3; + }], SSS: [/\d{3}/, function(e3) { + this.milliseconds = +e3; + }], s: [r, a("seconds")], ss: [r, a("seconds")], m: [r, a("minutes")], mm: [r, a("minutes")], H: [r, a("hours")], h: [r, a("hours")], HH: [r, a("hours")], hh: [r, a("hours")], D: [r, a("day")], DD: [n, a("day")], Do: [i2, function(e3) { + var t4 = o.ordinal, n2 = e3.match(/\d+/); + if (this.day = n2[0], t4) + for (var r2 = 1; r2 <= 31; r2 += 1) + t4(r2).replace(/\[|\]/g, "") === e3 && (this.day = r2); + }], M: [r, a("month")], MM: [n, a("month")], MMM: [i2, function(e3) { + var t4 = h("months"), n2 = (h("monthsShort") || t4.map(function(e4) { + return e4.slice(0, 3); + })).indexOf(e3) + 1; + if (n2 < 1) + throw new Error(); + this.month = n2 % 12 || n2; + }], MMMM: [i2, function(e3) { + var t4 = h("months").indexOf(e3) + 1; + if (t4 < 1) + throw new Error(); + this.month = t4 % 12 || t4; + }], Y: [/[+-]?\d+/, a("year")], YY: [n, function(e3) { + this.year = s(e3); + }], YYYY: [/\d{4}/, a("year")], Z: f2, ZZ: f2 }; + function c2(n2) { + var r2, i3; + r2 = n2, i3 = o && o.formats; + for (var s2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t4, n3, r3) { + var o2 = r3 && r3.toUpperCase(); + return n3 || i3[r3] || e[r3] || i3[o2].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e3, t5, n4) { + return t5 || n4.slice(1); + }); + })).match(t), a2 = s2.length, f3 = 0; f3 < a2; f3 += 1) { + var h2 = s2[f3], u2 = d[h2], c3 = u2 && u2[0], l = u2 && u2[1]; + s2[f3] = l ? { regex: c3, parser: l } : h2.replace(/^\[|\]$/g, ""); + } + return function(e3) { + for (var t4 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) { + var i4 = s2[n3]; + if ("string" == typeof i4) + r3 += i4.length; + else { + var o2 = i4.regex, f4 = i4.parser, h3 = e3.slice(r3), u3 = o2.exec(h3)[0]; + f4.call(t4, u3), e3 = e3.replace(u3, ""); + } + } + return function(e4) { + var t5 = e4.afternoon; + if (void 0 !== t5) { + var n4 = e4.hours; + t5 ? n4 < 12 && (e4.hours += 12) : 12 === n4 && (e4.hours = 0), delete e4.afternoon; + } + }(t4), t4; + }; + } + return function(e3, t4, n2) { + n2.p.customParseFormat = true, e3 && e3.parseTwoDigitYear && (s = e3.parseTwoDigitYear); + var r2 = t4.prototype, i3 = r2.parse; + r2.parse = function(e4) { + var t5 = e4.date, r3 = e4.utc, s2 = e4.args; + this.$u = r3; + var a2 = s2[1]; + if ("string" == typeof a2) { + var f3 = true === s2[2], h2 = true === s2[3], u2 = f3 || h2, d2 = s2[2]; + h2 && (d2 = s2[2]), o = this.$locale(), !f3 && d2 && (o = n2.Ls[d2]), this.$d = function(e6, t6, n3) { + try { + if (["x", "X"].indexOf(t6) > -1) + return new Date(("X" === t6 ? 1e3 : 1) * e6); + var r4 = c2(t6)(e6), i4 = r4.year, o2 = r4.month, s3 = r4.day, a3 = r4.hours, f4 = r4.minutes, h3 = r4.seconds, u3 = r4.milliseconds, d3 = r4.zone, l2 = /* @__PURE__ */ new Date(), m2 = s3 || (i4 || o2 ? 1 : l2.getDate()), M2 = i4 || l2.getFullYear(), Y = 0; + i4 && !o2 || (Y = o2 > 0 ? o2 - 1 : l2.getMonth()); + var p = a3 || 0, v = f4 || 0, D = h3 || 0, g = u3 || 0; + return d3 ? new Date(Date.UTC(M2, Y, m2, p, v, D, g + 60 * d3.offset * 1e3)) : n3 ? new Date(Date.UTC(M2, Y, m2, p, v, D, g)) : new Date(M2, Y, m2, p, v, D, g); + } catch (e7) { + return /* @__PURE__ */ new Date(""); + } + }(t5, a2, r3), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t5 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), o = {}; + } else if (a2 instanceof Array) + for (var l = a2.length, m = 1; m <= l; m += 1) { + s2[1] = a2[m - 1]; + var M = n2.apply(this, s2); + if (M.isValid()) { + this.$d = M.$d, this.$L = M.$L, this.init(); + break; + } + m === l && (this.$d = /* @__PURE__ */ new Date("")); + } + else + i3.call(this, e4); + }; + }; + }); + })(customParseFormat); + var customParseFormatExports = customParseFormat.exports; + const dayjsCustomParseFormat = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports); + var advancedFormat = { exports: {} }; + (function(module2, exports2) { + !function(e, t) { + module2.exports = t(); + }(commonjsGlobal, function() { + return function(e, t) { + var r = t.prototype, n = r.format; + r.format = function(e3) { + var t4 = this, r2 = this.$locale(); + if (!this.isValid()) + return n.bind(this)(e3); + var s = this.$utils(), a = (e3 || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(e4) { + switch (e4) { + case "Q": + return Math.ceil((t4.$M + 1) / 3); + case "Do": + return r2.ordinal(t4.$D); + case "gggg": + return t4.weekYear(); + case "GGGG": + return t4.isoWeekYear(); + case "wo": + return r2.ordinal(t4.week(), "W"); + case "w": + case "ww": + return s.s(t4.week(), "w" === e4 ? 1 : 2, "0"); + case "W": + case "WW": + return s.s(t4.isoWeek(), "W" === e4 ? 1 : 2, "0"); + case "k": + case "kk": + return s.s(String(0 === t4.$H ? 24 : t4.$H), "k" === e4 ? 1 : 2, "0"); + case "X": + return Math.floor(t4.$d.getTime() / 1e3); + case "x": + return t4.$d.getTime(); + case "z": + return "[" + t4.offsetName() + "]"; + case "zzz": + return "[" + t4.offsetName("long") + "]"; + default: + return e4; + } + }); + return n.bind(this)(a); + }; + }; + }); + })(advancedFormat); + var advancedFormatExports = advancedFormat.exports; + const dayjsAdvancedFormat = /* @__PURE__ */ getDefaultExportFromCjs(advancedFormatExports); + dayjs.extend(dayjsIsoWeek); + dayjs.extend(dayjsCustomParseFormat); + dayjs.extend(dayjsAdvancedFormat); + let dateFormat = ""; + let axisFormat = ""; + let tickInterval = void 0; + let todayMarker = ""; + let includes = []; + let excludes = []; + let links$1 = {}; + let sections$3 = []; + let tasks$2 = []; + let currentSection$2 = ""; + let displayMode = ""; + const tags = ["active", "done", "crit", "milestone"]; + let funs = []; + let inclusiveEndDates = false; + let topAxis = false; + let weekday = "sunday"; + let lastOrder = 0; + const clear$b = function() { + sections$3 = []; + tasks$2 = []; + currentSection$2 = ""; + funs = []; + taskCnt = 0; + lastTask = void 0; + lastTaskID = void 0; + rawTasks$2 = []; + dateFormat = ""; + axisFormat = ""; + displayMode = ""; + tickInterval = void 0; + todayMarker = ""; + includes = []; + excludes = []; + inclusiveEndDates = false; + topAxis = false; + lastOrder = 0; + links$1 = {}; + clear$l(); + weekday = "sunday"; + }; + const setAxisFormat = function(txt) { + axisFormat = txt; + }; + const getAxisFormat = function() { + return axisFormat; + }; + const setTickInterval = function(txt) { + tickInterval = txt; + }; + const getTickInterval = function() { + return tickInterval; + }; + const setTodayMarker = function(txt) { + todayMarker = txt; + }; + const getTodayMarker = function() { + return todayMarker; + }; + const setDateFormat = function(txt) { + dateFormat = txt; + }; + const enableInclusiveEndDates = function() { + inclusiveEndDates = true; + }; + const endDatesAreInclusive = function() { + return inclusiveEndDates; + }; + const enableTopAxis = function() { + topAxis = true; + }; + const topAxisEnabled = function() { + return topAxis; + }; + const setDisplayMode = function(txt) { + displayMode = txt; + }; + const getDisplayMode = function() { + return displayMode; + }; + const getDateFormat = function() { + return dateFormat; + }; + const setIncludes = function(txt) { + includes = txt.toLowerCase().split(/[\s,]+/); + }; + const getIncludes = function() { + return includes; + }; + const setExcludes = function(txt) { + excludes = txt.toLowerCase().split(/[\s,]+/); + }; + const getExcludes = function() { + return excludes; + }; + const getLinks$1 = function() { + return links$1; + }; + const addSection$3 = function(txt) { + currentSection$2 = txt; + sections$3.push(txt); + }; + const getSections$3 = function() { + return sections$3; + }; + const getTasks$2 = function() { + let allItemsProcessed = compileTasks$2(); + const maxDepth = 10; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks$2(); + iterationCount++; + } + tasks$2 = rawTasks$2; + return tasks$2; + }; + const isInvalidDate = function(date2, dateFormat2, excludes2, includes2) { + if (includes2.includes(date2.format(dateFormat2.trim()))) { + return false; + } + if (date2.isoWeekday() >= 6 && excludes2.includes("weekends")) { + return true; + } + if (excludes2.includes(date2.format("dddd").toLowerCase())) { + return true; + } + return excludes2.includes(date2.format(dateFormat2.trim())); + }; + const setWeekday = function(txt) { + weekday = txt; + }; + const getWeekday = function() { + return weekday; + }; + const checkTaskDates = function(task, dateFormat2, excludes2, includes2) { + if (!excludes2.length || task.manualEndTime) { + return; + } + let startTime; + if (task.startTime instanceof Date) { + startTime = dayjs(task.startTime); + } else { + startTime = dayjs(task.startTime, dateFormat2, true); + } + startTime = startTime.add(1, "d"); + let originalEndTime; + if (task.endTime instanceof Date) { + originalEndTime = dayjs(task.endTime); + } else { + originalEndTime = dayjs(task.endTime, dateFormat2, true); + } + const [fixedEndTime, renderEndTime] = fixTaskDates( + startTime, + originalEndTime, + dateFormat2, + excludes2, + includes2 + ); + task.endTime = fixedEndTime.toDate(); + task.renderEndTime = renderEndTime; + }; + const fixTaskDates = function(startTime, endTime, dateFormat2, excludes2, includes2) { + let invalid = false; + let renderEndTime = null; + while (startTime <= endTime) { + if (!invalid) { + renderEndTime = endTime.toDate(); + } + invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2); + if (invalid) { + endTime = endTime.add(1, "d"); + } + startTime = startTime.add(1, "d"); + } + return [endTime, renderEndTime]; + }; + const getStartDate = function(prevTime, dateFormat2, str2) { + str2 = str2.trim(); + const re2 = /^after\s+([\d\w- ]+)/; + const afterStatement = re2.exec(str2.trim()); + if (afterStatement !== null) { + let latestEndingTask = null; + afterStatement[1].split(" ").forEach(function(id2) { + let task = findTaskById(id2); + if (task !== void 0) { + if (!latestEndingTask) { + latestEndingTask = task; + } else { + if (task.endTime > latestEndingTask.endTime) { + latestEndingTask = task; + } + } + } + }); + if (!latestEndingTask) { + const dt = /* @__PURE__ */ new Date(); + dt.setHours(0, 0, 0, 0); + return dt; + } else { + return latestEndingTask.endTime; + } + } + let mDate = dayjs(str2, dateFormat2.trim(), true); + if (mDate.isValid()) { + return mDate.toDate(); + } else { + log$1.debug("Invalid date:" + str2); + log$1.debug("With date format:" + dateFormat2.trim()); + const d = new Date(str2); + if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously + // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304. + // This can cause virtually infinite loops while rendering, so for the + // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as + // invalid. + d.getFullYear() < -1e4 || d.getFullYear() > 1e4) { + throw new Error("Invalid date:" + str2); + } + return d; + } + }; + const parseDuration = function(str2) { + const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str2.trim()); + if (statement !== null) { + return [Number.parseFloat(statement[1]), statement[2]]; + } + return [NaN, "ms"]; + }; + const getEndDate = function(prevTime, dateFormat2, str2, inclusive = false) { + str2 = str2.trim(); + let mDate = dayjs(str2, dateFormat2.trim(), true); + if (mDate.isValid()) { + if (inclusive) { + mDate = mDate.add(1, "d"); + } + return mDate.toDate(); + } + let endTime = dayjs(prevTime); + const [durationValue, durationUnit] = parseDuration(str2); + if (!Number.isNaN(durationValue)) { + const newEndTime = endTime.add(durationValue, durationUnit); + if (newEndTime.isValid()) { + endTime = newEndTime; + } + } + return endTime.toDate(); + }; + let taskCnt = 0; + const parseId = function(idStr) { + if (idStr === void 0) { + taskCnt = taskCnt + 1; + return "task" + taskCnt; + } + return idStr; + }; + const compileData = function(prevTask, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i2 = 0; i2 < data.length; i2++) { + data[i2] = data[i2].trim(); + } + let endTimeData = ""; + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = prevTask.endTime; + endTimeData = data[0]; + break; + case 2: + task.id = parseId(); + task.startTime = getStartDate(void 0, dateFormat, data[0]); + endTimeData = data[1]; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = getStartDate(void 0, dateFormat, data[1]); + endTimeData = data[2]; + break; + } + if (endTimeData) { + task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates); + task.manualEndTime = dayjs(endTimeData, "YYYY-MM-DD", true).isValid(); + checkTaskDates(task, dateFormat, excludes, includes); + } + return task; + }; + const parseData = function(prevTaskId, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i2 = 0; i2 < data.length; i2++) { + data[i2] = data[i2].trim(); + } + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = { + type: "prevTaskEnd", + id: prevTaskId + }; + task.endTime = { + data: data[0] + }; + break; + case 2: + task.id = parseId(); + task.startTime = { + type: "getStartDate", + startData: data[0] + }; + task.endTime = { + data: data[1] + }; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = { + type: "getStartDate", + startData: data[1] + }; + task.endTime = { + data: data[2] + }; + break; + } + return task; + }; + let lastTask; + let lastTaskID; + let rawTasks$2 = []; + const taskDb = {}; + const addTask$2 = function(descr, data) { + const rawTask = { + section: currentSection$2, + type: currentSection$2, + processed: false, + manualEndTime: false, + renderEndTime: null, + raw: { data }, + task: descr, + classes: [] + }; + const taskInfo = parseData(lastTaskID, data); + rawTask.raw.startTime = taskInfo.startTime; + rawTask.raw.endTime = taskInfo.endTime; + rawTask.id = taskInfo.id; + rawTask.prevTaskId = lastTaskID; + rawTask.active = taskInfo.active; + rawTask.done = taskInfo.done; + rawTask.crit = taskInfo.crit; + rawTask.milestone = taskInfo.milestone; + rawTask.order = lastOrder; + lastOrder++; + const pos = rawTasks$2.push(rawTask); + lastTaskID = rawTask.id; + taskDb[rawTask.id] = pos - 1; + }; + const findTaskById = function(id2) { + const pos = taskDb[id2]; + return rawTasks$2[pos]; + }; + const addTaskOrg$2 = function(descr, data) { + const newTask = { + section: currentSection$2, + type: currentSection$2, + description: descr, + task: descr, + classes: [] + }; + const taskInfo = compileData(lastTask, data); + newTask.startTime = taskInfo.startTime; + newTask.endTime = taskInfo.endTime; + newTask.id = taskInfo.id; + newTask.active = taskInfo.active; + newTask.done = taskInfo.done; + newTask.crit = taskInfo.crit; + newTask.milestone = taskInfo.milestone; + lastTask = newTask; + tasks$2.push(newTask); + }; + const compileTasks$2 = function() { + const compileTask = function(pos) { + const task = rawTasks$2[pos]; + let startTime = ""; + switch (rawTasks$2[pos].raw.startTime.type) { + case "prevTaskEnd": { + const prevTask = findTaskById(task.prevTaskId); + task.startTime = prevTask.endTime; + break; + } + case "getStartDate": + startTime = getStartDate(void 0, dateFormat, rawTasks$2[pos].raw.startTime.startData); + if (startTime) { + rawTasks$2[pos].startTime = startTime; + } + break; + } + if (rawTasks$2[pos].startTime) { + rawTasks$2[pos].endTime = getEndDate( + rawTasks$2[pos].startTime, + dateFormat, + rawTasks$2[pos].raw.endTime.data, + inclusiveEndDates + ); + if (rawTasks$2[pos].endTime) { + rawTasks$2[pos].processed = true; + rawTasks$2[pos].manualEndTime = dayjs( + rawTasks$2[pos].raw.endTime.data, + "YYYY-MM-DD", + true + ).isValid(); + checkTaskDates(rawTasks$2[pos], dateFormat, excludes, includes); + } + } + return rawTasks$2[pos].processed; + }; + let allProcessed = true; + for (const [i2, rawTask] of rawTasks$2.entries()) { + compileTask(i2); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; + }; + const setLink$1 = function(ids, _linkStr) { + let linkStr = _linkStr; + if (getConfig$2().securityLevel !== "loose") { + linkStr = sanitizeUrl_1(_linkStr); + } + ids.split(",").forEach(function(id2) { + let rawTask = findTaskById(id2); + if (rawTask !== void 0) { + pushFun(id2, () => { + window.open(linkStr, "_self"); + }); + links$1[id2] = linkStr; + } + }); + setClass(ids, "clickable"); + }; + const setClass = function(ids, className) { + ids.split(",").forEach(function(id2) { + let rawTask = findTaskById(id2); + if (rawTask !== void 0) { + rawTask.classes.push(className); + } + }); + }; + const setClickFun = function(id2, functionName, functionArgs) { + if (getConfig$2().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i2 = 0; i2 < argList.length; i2++) { + let item = argList[i2].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i2] = item; + } + } + if (argList.length === 0) { + argList.push(id2); + } + let rawTask = findTaskById(id2); + if (rawTask !== void 0) { + pushFun(id2, () => { + utils.runFunc(functionName, ...argList); + }); + } + }; + const pushFun = function(id2, callbackFunction) { + funs.push( + function() { + const elem = document.querySelector(`[id="${id2}"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + }, + function() { + const elem = document.querySelector(`[id="${id2}-text"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + } + ); + }; + const setClickEvent$1 = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id2) { + setClickFun(id2, functionName, functionArgs); + }); + setClass(ids, "clickable"); + }; + const bindFunctions$1 = function(element2) { + funs.forEach(function(fun) { + fun(element2); + }); + }; + const ganttDb = { + getConfig: () => getConfig$2().gantt, + clear: clear$b, + setDateFormat, + getDateFormat, + enableInclusiveEndDates, + endDatesAreInclusive, + enableTopAxis, + topAxisEnabled, + setAxisFormat, + getAxisFormat, + setTickInterval, + getTickInterval, + setTodayMarker, + getTodayMarker, + setAccTitle, + getAccTitle, + setDiagramTitle, + getDiagramTitle, + setDisplayMode, + getDisplayMode, + setAccDescription, + getAccDescription, + addSection: addSection$3, + getSections: getSections$3, + getTasks: getTasks$2, + addTask: addTask$2, + findTaskById, + addTaskOrg: addTaskOrg$2, + setIncludes, + getIncludes, + setExcludes, + getExcludes, + setClickEvent: setClickEvent$1, + setLink: setLink$1, + getLinks: getLinks$1, + bindFunctions: bindFunctions$1, + parseDuration, + isInvalidDate, + setWeekday, + getWeekday + }; + function getTaskTags(data, task, tags2) { + let matchFound = true; + while (matchFound) { + matchFound = false; + tags2.forEach(function(t) { + const pattern = "^\\s*" + t + "\\s*$"; + const regex = new RegExp(pattern); + if (data[0].match(regex)) { + task[t] = true; + data.shift(1); + matchFound = true; + } + }); + } + } + const setConf$5 = function() { + log$1.debug("Something is calling, setConf, remove the call"); + }; + const mapWeekdayToTimeFunction = { + monday, + tuesday, + wednesday, + thursday, + friday, + saturday, + sunday + }; + const getMaxIntersections = (tasks2, orderOffset) => { + let timeline2 = [...tasks2].map(() => -Infinity); + let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order); + let maxIntersections = 0; + for (const element2 of sorted) { + for (let j = 0; j < timeline2.length; j++) { + if (element2.startTime >= timeline2[j]) { + timeline2[j] = element2.endTime; + element2.order = j + orderOffset; + if (j > maxIntersections) { + maxIntersections = j; + } + break; + } + } + } + return maxIntersections; + }; + let w; + const draw$e = function(text2, id2, version2, diagObj) { + const conf2 = getConfig$2().gantt; + const securityLevel = getConfig$2().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const elem = doc.getElementById(id2); + w = elem.parentElement.offsetWidth; + if (w === void 0) { + w = 1200; + } + if (conf2.useWidth !== void 0) { + w = conf2.useWidth; + } + const taskArray = diagObj.db.getTasks(); + let categories = []; + for (const element2 of taskArray) { + categories.push(element2.type); + } + categories = checkUnique(categories); + const categoryHeights = {}; + let h = 2 * conf2.topPadding; + if (diagObj.db.getDisplayMode() === "compact" || conf2.displayMode === "compact") { + const categoryElements = {}; + for (const element2 of taskArray) { + if (categoryElements[element2.section] === void 0) { + categoryElements[element2.section] = [element2]; + } else { + categoryElements[element2.section].push(element2); + } + } + let intersections = 0; + for (const category of Object.keys(categoryElements)) { + const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1; + intersections += categoryHeight; + h += categoryHeight * (conf2.barHeight + conf2.barGap); + categoryHeights[category] = categoryHeight; + } + } else { + h += taskArray.length * (conf2.barHeight + conf2.barGap); + for (const category of categories) { + categoryHeights[category] = taskArray.filter((task) => task.type === category).length; + } + } + elem.setAttribute("viewBox", "0 0 " + w + " " + h); + const svg2 = root2.select(`[id="${id2}"]`); + const timeScale = time$1().domain([ + min$3(taskArray, function(d) { + return d.startTime; + }), + max$3(taskArray, function(d) { + return d.endTime; + }) + ]).rangeRound([0, w - conf2.leftPadding - conf2.rightPadding]); + function taskCompare(a, b) { + const taskA = a.startTime; + const taskB = b.startTime; + let result = 0; + if (taskA > taskB) { + result = 1; + } else if (taskA < taskB) { + result = -1; + } + return result; + } + taskArray.sort(taskCompare); + makeGant(taskArray, w, h); + configureSvgSize(svg2, h, w, conf2.useMaxWidth); + svg2.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf2.titleTopMargin).attr("class", "titleText"); + function makeGant(tasks2, pageWidth, pageHeight) { + const barHeight = conf2.barHeight; + const gap = barHeight + conf2.barGap; + const topPadding = conf2.topPadding; + const leftPadding = conf2.leftPadding; + const colorScale = linear().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(interpolateHcl); + drawExcludeDays( + gap, + topPadding, + leftPadding, + pageWidth, + pageHeight, + tasks2, + diagObj.db.getExcludes(), + diagObj.db.getIncludes() + ); + makeGrid(leftPadding, topPadding, pageWidth, pageHeight); + drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth); + vertLabels(gap, topPadding); + drawToday(leftPadding, topPadding, pageWidth, pageHeight); + } + function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) { + const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))]; + const uniqueTasks = uniqueTaskOrderIds.map((id3) => theArray.find((item) => item.order === id3)); + svg2.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i2) { + i2 = d.order; + return i2 * theGap + theTopPad - 2; + }).attr("width", function() { + return w2 - conf2.rightPadding / 2; + }).attr("height", theGap).attr("class", function(d) { + for (const [i2, category] of categories.entries()) { + if (d.type === category) { + return "section section" + i2 % conf2.numberSectionStyles; + } + } + return "section section0"; + }); + const rectangles = svg2.append("g").selectAll("rect").data(theArray).enter(); + const links2 = diagObj.db.getLinks(); + rectangles.append("rect").attr("id", function(d) { + return d.id; + }).attr("rx", 3).attr("ry", 3).attr("x", function(d) { + if (d.milestone) { + return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + return timeScale(d.startTime) + theSidePad; + }).attr("y", function(d, i2) { + i2 = d.order; + return i2 * theGap + theTopPad; + }).attr("width", function(d) { + if (d.milestone) { + return theBarHeight; + } + return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); + }).attr("height", theBarHeight).attr("transform-origin", function(d, i2) { + i2 = d.order; + return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i2 * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px"; + }).attr("class", function(d) { + const res = "task"; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i2, category] of categories.entries()) { + if (d.type === category) { + secNum = i2 % conf2.numberSectionStyles; + } + } + let taskClass = ""; + if (d.active) { + if (d.crit) { + taskClass += " activeCrit"; + } else { + taskClass = " active"; + } + } else if (d.done) { + if (d.crit) { + taskClass = " doneCrit"; + } else { + taskClass = " done"; + } + } else { + if (d.crit) { + taskClass += " crit"; + } + } + if (taskClass.length === 0) { + taskClass = " task"; + } + if (d.milestone) { + taskClass = " milestone " + taskClass; + } + taskClass += secNum; + taskClass += " " + classStr; + return res + taskClass; + }); + rectangles.append("text").attr("id", function(d) { + return d.id + "-text"; + }).text(function(d) { + return d.task; + }).attr("font-size", conf2.fontSize).attr("x", function(d) { + let startX = timeScale(d.startTime); + let endX = timeScale(d.renderEndTime || d.endTime); + if (d.milestone) { + startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf2.leftPadding > w2) { + return startX + theSidePad - 5; + } else { + return endX + theSidePad + 5; + } + } else { + return (endX - startX) / 2 + startX + theSidePad; + } + }).attr("y", function(d, i2) { + i2 = d.order; + return i2 * theGap + conf2.barHeight / 2 + (conf2.fontSize / 2 - 2) + theTopPad; + }).attr("text-height", theBarHeight).attr("class", function(d) { + const startX = timeScale(d.startTime); + let endX = timeScale(d.endTime); + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i2, category] of categories.entries()) { + if (d.type === category) { + secNum = i2 % conf2.numberSectionStyles; + } + } + let taskType = ""; + if (d.active) { + if (d.crit) { + taskType = "activeCritText" + secNum; + } else { + taskType = "activeText" + secNum; + } + } + if (d.done) { + if (d.crit) { + taskType = taskType + " doneCritText" + secNum; + } else { + taskType = taskType + " doneText" + secNum; + } + } else { + if (d.crit) { + taskType = taskType + " critText" + secNum; + } + } + if (d.milestone) { + taskType += " milestoneText"; + } + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf2.leftPadding > w2) { + return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType; + } else { + return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth; + } + } else { + return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth; + } + }); + const securityLevel2 = getConfig$2().securityLevel; + if (securityLevel2 === "sandbox") { + let sandboxElement2; + sandboxElement2 = d3select("#i" + id2); + const doc2 = sandboxElement2.nodes()[0].contentDocument; + rectangles.filter(function(d) { + return links2[d.id] !== void 0; + }).each(function(o) { + var taskRect = doc2.querySelector("#" + o.id); + var taskText = doc2.querySelector("#" + o.id + "-text"); + const oldParent = taskRect.parentNode; + var Link = doc2.createElement("a"); + Link.setAttribute("xlink:href", links2[o.id]); + Link.setAttribute("target", "_top"); + oldParent.appendChild(Link); + Link.appendChild(taskRect); + Link.appendChild(taskText); + }); + } + } + function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) { + if (excludes2.length === 0 && includes2.length === 0) { + return; + } + let minTime; + let maxTime; + for (const { startTime, endTime } of tasks2) { + if (minTime === void 0 || startTime < minTime) { + minTime = startTime; + } + if (maxTime === void 0 || endTime > maxTime) { + maxTime = endTime; + } + } + if (!minTime || !maxTime) { + return; + } + if (dayjs(maxTime).diff(dayjs(minTime), "year") > 5) { + log$1.warn( + "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days." + ); + return; + } + const dateFormat2 = diagObj.db.getDateFormat(); + const excludeRanges = []; + let range2 = null; + let d = dayjs(minTime); + while (d.valueOf() <= maxTime) { + if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) { + if (!range2) { + range2 = { + start: d, + end: d + }; + } else { + range2.end = d; + } + } else { + if (range2) { + excludeRanges.push(range2); + range2 = null; + } + } + d = d.add(1, "d"); + } + const rectangles = svg2.append("g").selectAll("rect").data(excludeRanges).enter(); + rectangles.append("rect").attr("id", function(d2) { + return "exclude-" + d2.start.format("YYYY-MM-DD"); + }).attr("x", function(d2) { + return timeScale(d2.start) + theSidePad; + }).attr("y", conf2.gridLineStartPadding).attr("width", function(d2) { + const renderEnd = d2.end.add(1, "day"); + return timeScale(renderEnd) - timeScale(d2.start); + }).attr("height", h2 - theTopPad - conf2.gridLineStartPadding).attr("transform-origin", function(d2, i2) { + return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i2 * theGap + 0.5 * h2).toString() + "px"; + }).attr("class", "exclude-range"); + } + function makeGrid(theSidePad, theTopPad, w2, h2) { + let bottomXAxis = axisBottom(timeScale).tickSize(-h2 + theTopPad + conf2.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf2.axisFormat || "%Y-%m-%d")); + const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/; + const resultTickInterval = reTickInterval.exec( + diagObj.db.getTickInterval() || conf2.tickInterval + ); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval2 = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf2.weekday; + switch (interval2) { + case "millisecond": + bottomXAxis.ticks(timeMillisecond.every(every)); + break; + case "second": + bottomXAxis.ticks(timeSecond.every(every)); + break; + case "minute": + bottomXAxis.ticks(timeMinute.every(every)); + break; + case "hour": + bottomXAxis.ticks(timeHour.every(every)); + break; + case "day": + bottomXAxis.ticks(timeDay.every(every)); + break; + case "week": + bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + bottomXAxis.ticks(timeMonth.every(every)); + break; + } + } + svg2.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"); + if (diagObj.db.topAxisEnabled() || conf2.topAxis) { + let topXAxis = axisTop(timeScale).tickSize(-h2 + theTopPad + conf2.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf2.axisFormat || "%Y-%m-%d")); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval2 = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf2.weekday; + switch (interval2) { + case "millisecond": + topXAxis.ticks(timeMillisecond.every(every)); + break; + case "second": + topXAxis.ticks(timeSecond.every(every)); + break; + case "minute": + topXAxis.ticks(timeMinute.every(every)); + break; + case "hour": + topXAxis.ticks(timeHour.every(every)); + break; + case "day": + topXAxis.ticks(timeDay.every(every)); + break; + case "week": + topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + topXAxis.ticks(timeMonth.every(every)); + break; + } + } + svg2.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10); + } + } + function vertLabels(theGap, theTopPad) { + let prevGap = 0; + const numOccurances = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]); + svg2.append("g").selectAll("text").data(numOccurances).enter().append(function(d) { + const rows = d[0].split(common$1.lineBreakRegex); + const dy = -(rows.length - 1) / 2; + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("dy", dy + "em"); + for (const [j, row] of rows.entries()) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttribute("alignment-baseline", "central"); + tspan.setAttribute("x", "10"); + if (j > 0) { + tspan.setAttribute("dy", "1em"); + } + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + return svgLabel; + }).attr("x", 10).attr("y", function(d, i2) { + if (i2 > 0) { + for (let j = 0; j < i2; j++) { + prevGap += numOccurances[i2 - 1][1]; + return d[1] * theGap / 2 + prevGap * theGap + theTopPad; + } + } else { + return d[1] * theGap / 2 + theTopPad; + } + }).attr("font-size", conf2.sectionFontSize).attr("class", function(d) { + for (const [i2, category] of categories.entries()) { + if (d[0] === category) { + return "sectionTitle sectionTitle" + i2 % conf2.numberSectionStyles; + } + } + return "sectionTitle"; + }); + } + function drawToday(theSidePad, theTopPad, w2, h2) { + const todayMarker2 = diagObj.db.getTodayMarker(); + if (todayMarker2 === "off") { + return; + } + const todayG = svg2.append("g").attr("class", "today"); + const today = /* @__PURE__ */ new Date(); + const todayLine = todayG.append("line"); + todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf2.titleTopMargin).attr("y2", h2 - conf2.titleTopMargin).attr("class", "today"); + if (todayMarker2 !== "") { + todayLine.attr("style", todayMarker2.replace(/,/g, ";")); + } + } + function checkUnique(arr) { + const hash = {}; + const result = []; + for (let i2 = 0, l = arr.length; i2 < l; ++i2) { + if (!Object.prototype.hasOwnProperty.call(hash, arr[i2])) { + hash[arr[i2]] = true; + result.push(arr[i2]); + } + } + return result; + } + }; + const ganttRenderer = { + setConf: setConf$5, + draw: draw$e + }; + const getStyles$9 = (options2) => ` + .mermaid-main-font { + font-family: "trebuchet ms", verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + .exclude-range { + fill: ${options2.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${options2.sectionBkgColor}; + } + + .section2 { + fill: ${options2.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${options2.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${options2.titleColor}; + } + + .sectionTitle1 { + fill: ${options2.titleColor}; + } + + .sectionTitle2 { + fill: ${options2.titleColor}; + } + + .sectionTitle3 { + fill: ${options2.titleColor}; + } + + .sectionTitle { + text-anchor: start; + // font-size: ${options2.ganttFontSize}; + // text-height: 14px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${options2.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + text { + font-family: ${options2.fontFamily}; + fill: ${options2.textColor}; + } + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${options2.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + // .taskText:not([font-size]) { + // font-size: ${options2.ganttFontSize}; + // } + + .taskTextOutsideRight { + fill: ${options2.taskTextDarkColor}; + text-anchor: start; + // font-size: ${options2.ganttFontSize}; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + .taskTextOutsideLeft { + fill: ${options2.taskTextDarkColor}; + text-anchor: end; + // font-size: ${options2.ganttFontSize}; + } + + /* Special case clickable */ + .task.clickable { + cursor: pointer; + } + .taskText.clickable { + cursor: pointer; + fill: ${options2.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${options2.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${options2.taskTextClickableColor} !important; + font-weight: bold; + } + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${options2.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${options2.taskBkgColor}; + stroke: ${options2.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${options2.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${options2.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${options2.activeTaskBkgColor}; + stroke: ${options2.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${options2.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${options2.doneTaskBorderColor}; + fill: ${options2.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${options2.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${options2.critBorderColor}; + fill: ${options2.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${options2.critBorderColor}; + fill: ${options2.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${options2.critBorderColor}; + fill: ${options2.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${options2.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${options2.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor} ; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } +`; + const ganttStyles = getStyles$9; + const diagram$e = { + parser: ganttParser, + db: ganttDb, + renderer: ganttRenderer, + styles: ganttStyles + }; + const ganttDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$e + }, Symbol.toStringTag, { value: "Module" })); + var parser$j = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 9, 10]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "info": 4, "document": 5, "EOF": 6, "line": 7, "statement": 8, "NL": 9, "showInfo": 10, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + $$.length - 1; + switch (yystate) { + case 1: + return yy; + case 4: + break; + case 6: + yy.setInfo(true); + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6])], + defaultActions: { 4: [2, 1] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 4; + case 1: + return 9; + case 2: + return "space"; + case 3: + return 10; + case 4: + return 6; + case 5: + return "TXT"; + } + }, + rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$j.parser = parser$j; + const parser$k = parser$j; + const DEFAULT_INFO_DB = { + info: false + }; + let info = DEFAULT_INFO_DB.info; + const setInfo = (toggle) => { + info = toggle; + }; + const getInfo = () => info; + const clear$a = () => { + info = DEFAULT_INFO_DB.info; + }; + const db$9 = { + clear: clear$a, + setInfo, + getInfo + }; + const draw$d = (text2, id2, version2) => { + log$1.debug("rendering info diagram\n" + text2); + const svg2 = selectSvgElement(id2); + configureSvgSize(svg2, 100, 400, true); + const group = svg2.append("g"); + group.append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${version2}`); + }; + const renderer$c = { draw: draw$d }; + const diagram$d = { + parser: parser$k, + db: db$9, + renderer: renderer$c + }; + const infoDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$d + }, Symbol.toStringTag, { value: "Module" })); + var parser$h = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V5 = [2, 4], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V7 = [20, 21, 22], $V8 = [2, 7], $V9 = [1, 12], $Va = [1, 13], $Vb = [1, 14], $Vc = [1, 15], $Vd = [1, 16], $Ve = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "PIE": 5, "document": 6, "showData": 7, "line": 8, "statement": 9, "txt": 10, "value": 11, "title": 12, "title_value": 13, "acc_title": 14, "acc_title_value": 15, "acc_descr": 16, "acc_descr_value": 17, "acc_descr_multiline_value": 18, "section": 19, "NEWLINE": 20, ";": 21, "EOF": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" }, + productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setShowData(true); + break; + case 6: + this.$ = $$[$0 - 1]; + break; + case 8: + yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0])); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 10: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 11: + case 12: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 13: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, o($V4, $V5, { 6: 8, 7: [1, 9] }), o($V6, [2, 14]), o($V6, [2, 15]), o($V6, [2, 16]), { 1: [2, 1] }, o($V7, $V8, { 8: 10, 9: 11, 1: [2, 2], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, $V5, { 6: 18 }), o($V4, [2, 5]), { 4: 19, 20: $V1, 21: $V2, 22: $V3 }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, o($V7, [2, 12]), o($V7, [2, 13]), o($V7, $V8, { 8: 10, 9: 11, 1: [2, 3], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, [2, 6]), o($V7, [2, 8]), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11])], + defaultActions: { 7: [2, 1] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 20; + case 3: + break; + case 4: + break; + case 5: + this.begin("title"); + return 12; + case 6: + this.popState(); + return "title_value"; + case 7: + this.begin("acc_title"); + return 14; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 16; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + this.begin("string"); + break; + case 15: + this.popState(); + break; + case 16: + return "txt"; + case 17: + return 5; + case 18: + return 7; + case 19: + return "value"; + case 20: + return 22; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [6], "inclusive": false }, "string": { "rules": [15, 16], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$h.parser = parser$h; + const parser$i = parser$h; + const DEFAULT_PIE_CONFIG = defaultConfig$1.pie; + const DEFAULT_PIE_DB = { + sections: {}, + showData: false, + config: DEFAULT_PIE_CONFIG + }; + let sections$2 = DEFAULT_PIE_DB.sections; + let showData = DEFAULT_PIE_DB.showData; + const config$1 = structuredClone(DEFAULT_PIE_CONFIG); + const getConfig = () => structuredClone(config$1); + const clear$9 = () => { + sections$2 = structuredClone(DEFAULT_PIE_DB.sections); + showData = DEFAULT_PIE_DB.showData; + clear$l(); + }; + const addSection$2 = (label, value2) => { + label = sanitizeText$6(label, getConfig$2()); + if (sections$2[label] === void 0) { + sections$2[label] = value2; + log$1.debug(`added new section: ${label}, with value: ${value2}`); + } + }; + const getSections$2 = () => sections$2; + const cleanupValue = (value2) => { + if (value2.substring(0, 1) === ":") { + value2 = value2.substring(1).trim(); + } + return Number(value2.trim()); + }; + const setShowData = (toggle) => { + showData = toggle; + }; + const getShowData = () => showData; + const db$8 = { + getConfig, + clear: clear$9, + setDiagramTitle, + getDiagramTitle, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addSection: addSection$2, + getSections: getSections$2, + cleanupValue, + setShowData, + getShowData + }; + const getStyles$8 = (options2) => ` + .pieCircle{ + stroke: ${options2.pieStrokeColor}; + stroke-width : ${options2.pieStrokeWidth}; + opacity : ${options2.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${options2.pieOuterStrokeColor}; + stroke-width: ${options2.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${options2.pieTitleTextSize}; + fill: ${options2.pieTitleTextColor}; + font-family: ${options2.fontFamily}; + } + .slice { + font-family: ${options2.fontFamily}; + fill: ${options2.pieSectionTextColor}; + font-size:${options2.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${options2.pieLegendTextColor}; + font-family: ${options2.fontFamily}; + font-size: ${options2.pieLegendTextSize}; + } +`; + const styles$7 = getStyles$8; + const createPieArcs = (sections2) => { + const pieData = Object.entries(sections2).map((element2) => { + return { + label: element2[0], + value: element2[1] + }; + }).sort((a, b) => { + return b.value - a.value; + }); + const pie2 = d3pie().value( + (d3Section) => d3Section.value + ); + return pie2(pieData); + }; + const draw$c = (text2, id2, _version, diagObj) => { + var _a, _b; + log$1.debug("rendering pie chart\n" + text2); + const db2 = diagObj.db; + const globalConfig = getConfig$2(); + const pieConfig = cleanAndMerge(db2.getConfig(), globalConfig.pie); + const height = 450; + const width2 = ((_b = (_a = document.getElementById(id2)) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.offsetWidth) ?? pieConfig.useWidth; + const svg2 = selectSvgElement(id2); + svg2.attr("viewBox", `0 0 ${width2} ${height}`); + configureSvgSize(svg2, height, width2, pieConfig.useMaxWidth); + const MARGIN = 40; + const LEGEND_RECT_SIZE = 18; + const LEGEND_SPACING = 4; + const group = svg2.append("g"); + group.attr("transform", "translate(" + width2 / 2 + "," + height / 2 + ")"); + const { themeVariables } = globalConfig; + let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth); + outerStrokeWidth ?? (outerStrokeWidth = 2); + const textPosition = pieConfig.textPosition; + const radius = Math.min(width2, height) / 2 - MARGIN; + const arcGenerator = d3arc().innerRadius(0).outerRadius(radius); + const labelArcGenerator = d3arc().innerRadius(radius * textPosition).outerRadius(radius * textPosition); + group.append("circle").attr("cx", 0).attr("cy", 0).attr("r", radius + outerStrokeWidth / 2).attr("class", "pieOuterCircle"); + const sections2 = db2.getSections(); + const arcs = createPieArcs(sections2); + const myGeneratedColors = [ + themeVariables.pie1, + themeVariables.pie2, + themeVariables.pie3, + themeVariables.pie4, + themeVariables.pie5, + themeVariables.pie6, + themeVariables.pie7, + themeVariables.pie8, + themeVariables.pie9, + themeVariables.pie10, + themeVariables.pie11, + themeVariables.pie12 + ]; + const color2 = ordinal(myGeneratedColors); + group.selectAll("mySlices").data(arcs).enter().append("path").attr("d", arcGenerator).attr("fill", (datum2) => { + return color2(datum2.data.label); + }).attr("class", "pieCircle"); + let sum2 = 0; + Object.keys(sections2).forEach((key) => { + sum2 += sections2[key]; + }); + group.selectAll("mySlices").data(arcs).enter().append("text").text((datum2) => { + return (datum2.data.value / sum2 * 100).toFixed(0) + "%"; + }).attr("transform", (datum2) => { + return "translate(" + labelArcGenerator.centroid(datum2) + ")"; + }).style("text-anchor", "middle").attr("class", "slice"); + group.append("text").text(db2.getDiagramTitle()).attr("x", 0).attr("y", -(height - 50) / 2).attr("class", "pieTitleText"); + const legend = group.selectAll(".legend").data(color2.domain()).enter().append("g").attr("class", "legend").attr("transform", (_datum, index2) => { + const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING; + const offset = height2 * color2.domain().length / 2; + const horizontal = 12 * LEGEND_RECT_SIZE; + const vertical = index2 * height2 - offset; + return "translate(" + horizontal + "," + vertical + ")"; + }); + legend.append("rect").attr("width", LEGEND_RECT_SIZE).attr("height", LEGEND_RECT_SIZE).style("fill", color2).style("stroke", color2); + legend.data(arcs).append("text").attr("x", LEGEND_RECT_SIZE + LEGEND_SPACING).attr("y", LEGEND_RECT_SIZE - LEGEND_SPACING).text((datum2) => { + const { label, value: value2 } = datum2.data; + if (db2.getShowData()) { + return `${label} [${value2}]`; + } + return label; + }); + }; + const renderer$b = { draw: draw$c }; + const diagram$c = { + parser: parser$i, + db: db$8, + renderer: renderer$b, + styles: styles$7 + }; + const pieDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$c + }, Symbol.toStringTag, { value: "Module" })); + var parser$f = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V6 = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V7 = [32, 33, 34], $V8 = [2, 7], $V9 = [1, 13], $Va = [1, 17], $Vb = [1, 18], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 21], $Vf = [1, 22], $Vg = [1, 23], $Vh = [1, 24], $Vi = [1, 25], $Vj = [1, 26], $Vk = [1, 27], $Vl = [1, 30], $Vm = [1, 31], $Vn = [1, 32], $Vo = [1, 33], $Vp = [1, 34], $Vq = [1, 35], $Vr = [1, 36], $Vs = [1, 37], $Vt = [1, 38], $Vu = [1, 39], $Vv = [1, 40], $Vw = [1, 41], $Vx = [1, 42], $Vy = [1, 57], $Vz = [1, 58], $VA = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "QUADRANT": 6, "document": 7, "line": 8, "statement": 9, "axisDetails": 10, "quadrantDetails": 11, "points": 12, "title": 13, "title_value": 14, "acc_title": 15, "acc_title_value": 16, "acc_descr": 17, "acc_descr_value": 18, "acc_descr_multiline_value": 19, "section": 20, "text": 21, "point_start": 22, "point_x": 23, "point_y": 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, "QUADRANT_1": 28, "QUADRANT_2": 29, "QUADRANT_3": 30, "QUADRANT_4": 31, "NEWLINE": 32, "SEMI": 33, "EOF": 34, "alphaNumToken": 35, "textNoTagsToken": 36, "STR": 37, "MD_STR": 38, "alphaNum": 39, "PUNCTUATION": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "COMMA": 44, "PLUS": 45, "EQUALS": 46, "MULT": 47, "DOT": 48, "BRKT": 49, "UNDERSCORE": 50, "MINUS": 51, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 12: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 13: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 14: + case 15: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 16: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 17: + yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 18: + yy.setXAxisLeftText($$[$0 - 2]); + yy.setXAxisRightText($$[$0]); + break; + case 19: + $$[$0 - 1].text += " ⟶ "; + yy.setXAxisLeftText($$[$0 - 1]); + break; + case 20: + yy.setXAxisLeftText($$[$0]); + break; + case 21: + yy.setYAxisBottomText($$[$0 - 2]); + yy.setYAxisTopText($$[$0]); + break; + case 22: + $$[$0 - 1].text += " ⟶ "; + yy.setYAxisBottomText($$[$0 - 1]); + break; + case 23: + yy.setYAxisBottomText($$[$0]); + break; + case 24: + yy.setQuadrant1Text($$[$0]); + break; + case 25: + yy.setQuadrant2Text($$[$0]); + break; + case 26: + yy.setQuadrant3Text($$[$0]); + break; + case 27: + yy.setQuadrant4Text($$[$0]); + break; + case 31: + this.$ = { text: $$[$0], type: "text" }; + break; + case 32: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 33: + this.$ = { text: $$[$0], type: "text" }; + break; + case 34: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 35: + this.$ = $$[$0]; + break; + case 36: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 1: [3] }, { 3: 8, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 3: 9, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, o($V5, [2, 4], { 7: 10 }), o($V6, [2, 28]), o($V6, [2, 29]), o($V6, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, o($V7, $V8, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V5, [2, 5]), { 4: 43, 32: $V2, 33: $V3, 34: $V4 }, o($V7, $V8, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, o($V7, [2, 15]), o($V7, [2, 16]), { 21: 48, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 49, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 50, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 51, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 52, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 53, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 5: $Vy, 22: [1, 54], 35: 56, 36: 55, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }, o($VA, [2, 31]), o($VA, [2, 33]), o($VA, [2, 34]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), o($VA, [2, 41]), o($VA, [2, 42]), o($VA, [2, 43]), o($VA, [2, 44]), o($VA, [2, 45]), o($VA, [2, 46]), o($VA, [2, 47]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 12]), o($V7, [2, 13]), o($V7, [2, 14]), o($V7, [2, 20], { 36: 55, 35: 56, 5: $Vy, 26: [1, 59], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 23], { 36: 55, 35: 56, 5: $Vy, 26: [1, 60], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 24], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 25], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 26], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 27], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), { 23: [1, 61] }, o($VA, [2, 32]), o($VA, [2, 48]), o($VA, [2, 49]), o($VA, [2, 50]), o($V7, [2, 19], { 35: 29, 21: 62, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 22], { 35: 29, 21: 63, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), { 24: [1, 64] }, o($V7, [2, 18], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 21], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 17])], + defaultActions: { 8: [2, 1], 9: [2, 2] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 32; + case 3: + break; + case 4: + this.begin("title"); + return 13; + case 5: + this.popState(); + return "title_value"; + case 6: + this.begin("acc_title"); + return 15; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 17; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 25; + case 14: + return 27; + case 15: + return 26; + case 16: + return 28; + case 17: + return 29; + case 18: + return 30; + case 19: + return 31; + case 20: + this.begin("md_string"); + break; + case 21: + return "MD_STR"; + case 22: + this.popState(); + break; + case 23: + this.begin("string"); + break; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("point_start"); + return 22; + case 27: + this.begin("point_x"); + return 23; + case 28: + this.popState(); + break; + case 29: + this.popState(); + this.begin("point_y"); + break; + case 30: + this.popState(); + return 24; + case 31: + return 6; + case 32: + return 43; + case 33: + return "COLON"; + case 34: + return 45; + case 35: + return 44; + case 36: + return 46; + case 37: + return 46; + case 38: + return 47; + case 39: + return 49; + case 40: + return 50; + case 41: + return 48; + case 42: + return 41; + case 43: + return 51; + case 44: + return 42; + case 45: + return 5; + case 46: + return 33; + case 47: + return 40; + case 48: + return 34; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i], + conditions: { "point_y": { "rules": [30], "inclusive": false }, "point_x": { "rules": [29], "inclusive": false }, "point_start": { "rules": [27, 28], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "title": { "rules": [5], "inclusive": false }, "md_string": { "rules": [21, 22], "inclusive": false }, "string": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$f.parser = parser$f; + const parser$g = parser$f; + const defaultThemeVariables = getThemeVariables$2(); + class QuadrantBuilder { + constructor() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + } + getDefaultData() { + return { + titleText: "", + quadrant1Text: "", + quadrant2Text: "", + quadrant3Text: "", + quadrant4Text: "", + xAxisLeftText: "", + xAxisRightText: "", + yAxisBottomText: "", + yAxisTopText: "", + points: [] + }; + } + getDefaultConfig() { + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r; + return { + showXAxis: true, + showYAxis: true, + showTitle: true, + chartHeight: ((_a = defaultConfig$1.quadrantChart) == null ? void 0 : _a.chartWidth) || 500, + chartWidth: ((_b = defaultConfig$1.quadrantChart) == null ? void 0 : _b.chartHeight) || 500, + titlePadding: ((_c = defaultConfig$1.quadrantChart) == null ? void 0 : _c.titlePadding) || 10, + titleFontSize: ((_d = defaultConfig$1.quadrantChart) == null ? void 0 : _d.titleFontSize) || 20, + quadrantPadding: ((_e = defaultConfig$1.quadrantChart) == null ? void 0 : _e.quadrantPadding) || 5, + xAxisLabelPadding: ((_f = defaultConfig$1.quadrantChart) == null ? void 0 : _f.xAxisLabelPadding) || 5, + yAxisLabelPadding: ((_g = defaultConfig$1.quadrantChart) == null ? void 0 : _g.yAxisLabelPadding) || 5, + xAxisLabelFontSize: ((_h = defaultConfig$1.quadrantChart) == null ? void 0 : _h.xAxisLabelFontSize) || 16, + yAxisLabelFontSize: ((_i = defaultConfig$1.quadrantChart) == null ? void 0 : _i.yAxisLabelFontSize) || 16, + quadrantLabelFontSize: ((_j = defaultConfig$1.quadrantChart) == null ? void 0 : _j.quadrantLabelFontSize) || 16, + quadrantTextTopPadding: ((_k = defaultConfig$1.quadrantChart) == null ? void 0 : _k.quadrantTextTopPadding) || 5, + pointTextPadding: ((_l = defaultConfig$1.quadrantChart) == null ? void 0 : _l.pointTextPadding) || 5, + pointLabelFontSize: ((_m = defaultConfig$1.quadrantChart) == null ? void 0 : _m.pointLabelFontSize) || 12, + pointRadius: ((_n = defaultConfig$1.quadrantChart) == null ? void 0 : _n.pointRadius) || 5, + xAxisPosition: ((_o = defaultConfig$1.quadrantChart) == null ? void 0 : _o.xAxisPosition) || "top", + yAxisPosition: ((_p = defaultConfig$1.quadrantChart) == null ? void 0 : _p.yAxisPosition) || "left", + quadrantInternalBorderStrokeWidth: ((_q = defaultConfig$1.quadrantChart) == null ? void 0 : _q.quadrantInternalBorderStrokeWidth) || 1, + quadrantExternalBorderStrokeWidth: ((_r = defaultConfig$1.quadrantChart) == null ? void 0 : _r.quadrantExternalBorderStrokeWidth) || 2 + }; + } + getDefaultThemeConfig() { + return { + quadrant1Fill: defaultThemeVariables.quadrant1Fill, + quadrant2Fill: defaultThemeVariables.quadrant2Fill, + quadrant3Fill: defaultThemeVariables.quadrant3Fill, + quadrant4Fill: defaultThemeVariables.quadrant4Fill, + quadrant1TextFill: defaultThemeVariables.quadrant1TextFill, + quadrant2TextFill: defaultThemeVariables.quadrant2TextFill, + quadrant3TextFill: defaultThemeVariables.quadrant3TextFill, + quadrant4TextFill: defaultThemeVariables.quadrant4TextFill, + quadrantPointFill: defaultThemeVariables.quadrantPointFill, + quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill, + quadrantTitleFill: defaultThemeVariables.quadrantTitleFill, + quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill, + quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill + }; + } + clear() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + log$1.info("clear called"); + } + setData(data) { + this.data = { ...this.data, ...data }; + } + addPoints(points) { + this.data.points = [...points, ...this.data.points]; + } + setConfig(config2) { + log$1.trace("setConfig called with: ", config2); + this.config = { ...this.config, ...config2 }; + } + setThemeConfig(themeConfig) { + log$1.trace("setThemeConfig called with: ", themeConfig); + this.themeConfig = { ...this.themeConfig, ...themeConfig }; + } + calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) { + const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize; + const xAxisSpace = { + top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0, + bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0 + }; + const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize; + const yAxisSpace = { + left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0, + right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0 + }; + const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2; + const titleSpace = { + top: showTitle ? titleSpaceCalculation : 0 + }; + const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left; + const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top; + const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right; + const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top; + const quadrantHalfWidth = quadrantWidth / 2; + const quadrantHalfHeight = quadrantHeight / 2; + const quadrantSpace = { + quadrantLeft, + quadrantTop, + quadrantWidth, + quadrantHalfWidth, + quadrantHeight, + quadrantHalfHeight + }; + return { + xAxisSpace, + yAxisSpace, + titleSpace, + quadrantSpace + }; + } + getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) { + const { quadrantSpace, titleSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const drawAxisLabelInMiddle = this.data.points.length === 0; + const axisLabels = []; + if (this.data.xAxisLeftText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisLeftText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + (drawAxisLabelInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.xAxisRightText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisRightText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + quadrantHalfWidth + (drawAxisLabelInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.yAxisBottomText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisBottomText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHeight - (drawAxisLabelInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + if (this.data.yAxisTopText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisTopText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHalfHeight - (drawAxisLabelInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + return axisLabels; + } + getQuadrants(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace; + const quadrants = [ + { + text: { + text: this.data.quadrant1Text, + fill: this.themeConfig.quadrant1TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant1Fill + }, + { + text: { + text: this.data.quadrant2Text, + fill: this.themeConfig.quadrant2TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant2Fill + }, + { + text: { + text: this.data.quadrant3Text, + fill: this.themeConfig.quadrant3TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant3Fill + }, + { + text: { + text: this.data.quadrant4Text, + fill: this.themeConfig.quadrant4TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant4Fill + } + ]; + for (const quadrant of quadrants) { + quadrant.text.x = quadrant.x + quadrant.width / 2; + if (this.data.points.length === 0) { + quadrant.text.y = quadrant.y + quadrant.height / 2; + quadrant.text.horizontalPos = "middle"; + } else { + quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding; + quadrant.text.horizontalPos = "top"; + } + } + return quadrants; + } + getQuadrantPoints(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace; + const xAxis = linear().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]); + const yAxis = linear().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]); + const points = this.data.points.map((point2) => { + const props = { + x: xAxis(point2.x), + y: yAxis(point2.y), + fill: this.themeConfig.quadrantPointFill, + radius: this.config.pointRadius, + text: { + text: point2.text, + fill: this.themeConfig.quadrantPointTextFill, + x: xAxis(point2.x), + y: yAxis(point2.y) + this.config.pointTextPadding, + verticalPos: "center", + horizontalPos: "top", + fontSize: this.config.pointLabelFontSize, + rotation: 0 + } + }; + return props; + }); + return points; + } + getBorders(spaceData) { + const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2; + const { quadrantSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const borderLines = [ + // top border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + }, + // right border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft + quadrantWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // bottom border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop + quadrantHeight, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + quadrantHeight + }, + // left border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // vertical inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + quadrantHalfWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantHalfWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // horizontal inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + halfExternalBorderWidth, + y1: quadrantTop + quadrantHalfHeight, + x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth, + y2: quadrantTop + quadrantHalfHeight + } + ]; + return borderLines; + } + getTitle(showTitle) { + if (showTitle) { + return { + text: this.data.titleText, + fill: this.themeConfig.quadrantTitleFill, + fontSize: this.config.titleFontSize, + horizontalPos: "top", + verticalPos: "center", + rotation: 0, + y: this.config.titlePadding, + x: this.config.chartWidth / 2 + }; + } + return; + } + build() { + const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText); + const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText); + const showTitle = this.config.showTitle && !!this.data.titleText; + const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition; + const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle); + return { + points: this.getQuadrantPoints(calculatedSpace), + quadrants: this.getQuadrants(calculatedSpace), + axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace), + borderLines: this.getBorders(calculatedSpace), + title: this.getTitle(showTitle) + }; + } + } + const config = getConfig$2(); + function textSanitizer(text2) { + return sanitizeText$6(text2.trim(), config); + } + const quadrantBuilder = new QuadrantBuilder(); + function setQuadrant1Text(textObj) { + quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) }); + } + function setQuadrant2Text(textObj) { + quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) }); + } + function setQuadrant3Text(textObj) { + quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) }); + } + function setQuadrant4Text(textObj) { + quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) }); + } + function setXAxisLeftText(textObj) { + quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) }); + } + function setXAxisRightText(textObj) { + quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) }); + } + function setYAxisTopText(textObj) { + quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) }); + } + function setYAxisBottomText(textObj) { + quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) }); + } + function addPoint(textObj, x2, y2) { + quadrantBuilder.addPoints([{ x: x2, y: y2, text: textSanitizer(textObj.text) }]); + } + function setWidth(width2) { + quadrantBuilder.setConfig({ chartWidth: width2 }); + } + function setHeight(height) { + quadrantBuilder.setConfig({ chartHeight: height }); + } + function getQuadrantData() { + const config2 = getConfig$2(); + const { themeVariables, quadrantChart: quadrantChartConfig } = config2; + if (quadrantChartConfig) { + quadrantBuilder.setConfig(quadrantChartConfig); + } + quadrantBuilder.setThemeConfig({ + quadrant1Fill: themeVariables.quadrant1Fill, + quadrant2Fill: themeVariables.quadrant2Fill, + quadrant3Fill: themeVariables.quadrant3Fill, + quadrant4Fill: themeVariables.quadrant4Fill, + quadrant1TextFill: themeVariables.quadrant1TextFill, + quadrant2TextFill: themeVariables.quadrant2TextFill, + quadrant3TextFill: themeVariables.quadrant3TextFill, + quadrant4TextFill: themeVariables.quadrant4TextFill, + quadrantPointFill: themeVariables.quadrantPointFill, + quadrantPointTextFill: themeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill, + quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill, + quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill, + quadrantTitleFill: themeVariables.quadrantTitleFill + }); + quadrantBuilder.setData({ titleText: getDiagramTitle() }); + return quadrantBuilder.build(); + } + const clear$8 = function() { + quadrantBuilder.clear(); + clear$l(); + }; + const db$7 = { + setWidth, + setHeight, + setQuadrant1Text, + setQuadrant2Text, + setQuadrant3Text, + setQuadrant4Text, + setXAxisLeftText, + setXAxisRightText, + setYAxisTopText, + setYAxisBottomText, + addPoint, + getQuadrantData, + clear: clear$8, + setAccTitle, + getAccTitle, + setDiagramTitle, + getDiagramTitle, + getAccDescription, + setAccDescription + }; + const draw$b = (txt, id2, _version, diagObj) => { + var _a, _b, _c; + function getDominantBaseLine(horizontalPos) { + return horizontalPos === "top" ? "hanging" : "middle"; + } + function getTextAnchor(verticalPos) { + return verticalPos === "left" ? "start" : "middle"; + } + function getTransformation(data) { + return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`; + } + const conf2 = getConfig$2(); + log$1.debug("Rendering quadrant chart\n" + txt); + const securityLevel = conf2.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = root2.select(`[id="${id2}"]`); + const group = svg2.append("g").attr("class", "main"); + const width2 = ((_a = conf2.quadrantChart) == null ? void 0 : _a.chartWidth) || 500; + const height = ((_b = conf2.quadrantChart) == null ? void 0 : _b.chartHeight) || 500; + configureSvgSize(svg2, height, width2, ((_c = conf2.quadrantChart) == null ? void 0 : _c.useMaxWidth) || true); + svg2.attr("viewBox", "0 0 " + width2 + " " + height); + diagObj.db.setHeight(height); + diagObj.db.setWidth(width2); + const quadrantData = diagObj.db.getQuadrantData(); + const quadrantsGroup = group.append("g").attr("class", "quadrants"); + const borderGroup = group.append("g").attr("class", "border"); + const dataPointGroup = group.append("g").attr("class", "data-points"); + const labelGroup = group.append("g").attr("class", "labels"); + const titleGroup = group.append("g").attr("class", "title"); + if (quadrantData.title) { + titleGroup.append("text").attr("x", 0).attr("y", 0).attr("fill", quadrantData.title.fill).attr("font-size", quadrantData.title.fontSize).attr("dominant-baseline", getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor", getTextAnchor(quadrantData.title.verticalPos)).attr("transform", getTransformation(quadrantData.title)).text(quadrantData.title.text); + } + if (quadrantData.borderLines) { + borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1", (data) => data.x1).attr("y1", (data) => data.y1).attr("x2", (data) => data.x2).attr("y2", (data) => data.y2).style("stroke", (data) => data.strokeFill).style("stroke-width", (data) => data.strokeWidth); + } + const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant"); + quadrants.append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill); + quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text); + const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label"); + labels.append("text").attr("x", 0).attr("y", 0).text((data) => data.text).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.horizontalPos)).attr("text-anchor", (data) => getTextAnchor(data.verticalPos)).attr("transform", (data) => getTransformation(data)); + const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point"); + dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill); + dataPoints.append("text").attr("x", 0).attr("y", 0).text((data) => data.text.text).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)); + }; + const renderer$a = { + draw: draw$b + }; + const diagram$b = { + parser: parser$g, + db: db$7, + renderer: renderer$a, + styles: () => "" + }; + const quadrantDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$b + }, Symbol.toStringTag, { value: "Module" })); + var parser$d = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "requirementType": 17, "requirementName": 18, "STRUCT_START": 19, "requirementBody": 20, "ID": 21, "COLONSEP": 22, "id": 23, "TEXT": 24, "text": 25, "RISK": 26, "riskLevel": 27, "VERIFYMTHD": 28, "verifyType": 29, "STRUCT_STOP": 30, "REQUIREMENT": 31, "FUNCTIONAL_REQUIREMENT": 32, "INTERFACE_REQUIREMENT": 33, "PERFORMANCE_REQUIREMENT": 34, "PHYSICAL_REQUIREMENT": 35, "DESIGN_CONSTRAINT": 36, "LOW_RISK": 37, "MED_RISK": 38, "HIGH_RISK": 39, "VERIFY_ANALYSIS": 40, "VERIFY_DEMONSTRATION": 41, "VERIFY_INSPECTION": 42, "VERIFY_TEST": 43, "ELEMENT": 44, "elementName": 45, "elementBody": 46, "TYPE": 47, "type": 48, "DOCREF": 49, "ref": 50, "END_ARROW_L": 51, "relationship": 52, "LINE": 53, "END_ARROW_R": 54, "CONTAINS": 55, "COPIES": 56, "DERIVES": 57, "SATISFIES": 58, "VERIFIES": 59, "REFINES": 60, "TRACES": 61, "unqString": 62, "qString": 63, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" }, + productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 4: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 5: + case 6: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 7: + this.$ = []; + break; + case 13: + yy.addRequirement($$[$0 - 3], $$[$0 - 4]); + break; + case 14: + yy.setNewReqId($$[$0 - 2]); + break; + case 15: + yy.setNewReqText($$[$0 - 2]); + break; + case 16: + yy.setNewReqRisk($$[$0 - 2]); + break; + case 17: + yy.setNewReqVerifyMethod($$[$0 - 2]); + break; + case 20: + this.$ = yy.RequirementType.REQUIREMENT; + break; + case 21: + this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT; + break; + case 22: + this.$ = yy.RequirementType.INTERFACE_REQUIREMENT; + break; + case 23: + this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT; + break; + case 24: + this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT; + break; + case 25: + this.$ = yy.RequirementType.DESIGN_CONSTRAINT; + break; + case 26: + this.$ = yy.RiskLevel.LOW_RISK; + break; + case 27: + this.$ = yy.RiskLevel.MED_RISK; + break; + case 28: + this.$ = yy.RiskLevel.HIGH_RISK; + break; + case 29: + this.$ = yy.VerifyType.VERIFY_ANALYSIS; + break; + case 30: + this.$ = yy.VerifyType.VERIFY_DEMONSTRATION; + break; + case 31: + this.$ = yy.VerifyType.VERIFY_INSPECTION; + break; + case 32: + this.$ = yy.VerifyType.VERIFY_TEST; + break; + case 33: + yy.addElement($$[$0 - 3]); + break; + case 34: + yy.setNewElementType($$[$0 - 2]); + break; + case 35: + yy.setNewElementDocRef($$[$0 - 2]); + break; + case 38: + yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 39: + yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 40: + this.$ = yy.Relationships.CONTAINS; + break; + case 41: + this.$ = yy.Relationships.COPIES; + break; + case 42: + this.$ = yy.Relationships.DERIVES; + break; + case 43: + this.$ = yy.Relationships.SATISFIES; + break; + case 44: + this.$ = yy.Relationships.VERIFIES; + break; + case 45: + this.$ = yy.Relationships.REFINES; + break; + case 46: + this.$ = yy.Relationships.TRACES; + break; + } + }, + table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])], + defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return "title"; + case 1: + this.begin("acc_title"); + return 9; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 11; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + return 5; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + return 8; + case 13: + return 6; + case 14: + return 19; + case 15: + return 30; + case 16: + return 22; + case 17: + return 21; + case 18: + return 24; + case 19: + return 26; + case 20: + return 28; + case 21: + return 31; + case 22: + return 32; + case 23: + return 33; + case 24: + return 34; + case 25: + return 35; + case 26: + return 36; + case 27: + return 37; + case 28: + return 38; + case 29: + return 39; + case 30: + return 40; + case 31: + return 41; + case 32: + return 42; + case 33: + return 43; + case 34: + return 44; + case 35: + return 55; + case 36: + return 56; + case 37: + return 57; + case 38: + return 58; + case 39: + return 59; + case 40: + return 60; + case 41: + return 61; + case 42: + return 47; + case 43: + return 49; + case 44: + return 51; + case 45: + return 54; + case 46: + return 53; + case 47: + this.begin("string"); + break; + case 48: + this.popState(); + break; + case 49: + return "qString"; + case 50: + yy_.yytext = yy_.yytext.trim(); + return 62; + } + }, + rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [48, 49], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$d.parser = parser$d; + const parser$e = parser$d; + let relations$1 = []; + let latestRequirement = {}; + let requirements = {}; + let latestElement = {}; + let elements$1 = {}; + const RequirementType = { + REQUIREMENT: "Requirement", + FUNCTIONAL_REQUIREMENT: "Functional Requirement", + INTERFACE_REQUIREMENT: "Interface Requirement", + PERFORMANCE_REQUIREMENT: "Performance Requirement", + PHYSICAL_REQUIREMENT: "Physical Requirement", + DESIGN_CONSTRAINT: "Design Constraint" + }; + const RiskLevel = { + LOW_RISK: "Low", + MED_RISK: "Medium", + HIGH_RISK: "High" + }; + const VerifyType = { + VERIFY_ANALYSIS: "Analysis", + VERIFY_DEMONSTRATION: "Demonstration", + VERIFY_INSPECTION: "Inspection", + VERIFY_TEST: "Test" + }; + const Relationships = { + CONTAINS: "contains", + COPIES: "copies", + DERIVES: "derives", + SATISFIES: "satisfies", + VERIFIES: "verifies", + REFINES: "refines", + TRACES: "traces" + }; + const addRequirement = (name2, type2) => { + if (requirements[name2] === void 0) { + requirements[name2] = { + name: name2, + type: type2, + id: latestRequirement.id, + text: latestRequirement.text, + risk: latestRequirement.risk, + verifyMethod: latestRequirement.verifyMethod + }; + } + latestRequirement = {}; + return requirements[name2]; + }; + const getRequirements = () => requirements; + const setNewReqId = (id2) => { + if (latestRequirement !== void 0) { + latestRequirement.id = id2; + } + }; + const setNewReqText = (text2) => { + if (latestRequirement !== void 0) { + latestRequirement.text = text2; + } + }; + const setNewReqRisk = (risk) => { + if (latestRequirement !== void 0) { + latestRequirement.risk = risk; + } + }; + const setNewReqVerifyMethod = (verifyMethod) => { + if (latestRequirement !== void 0) { + latestRequirement.verifyMethod = verifyMethod; + } + }; + const addElement = (name2) => { + if (elements$1[name2] === void 0) { + elements$1[name2] = { + name: name2, + type: latestElement.type, + docRef: latestElement.docRef + }; + log$1.info("Added new requirement: ", name2); + } + latestElement = {}; + return elements$1[name2]; + }; + const getElements = () => elements$1; + const setNewElementType = (type2) => { + if (latestElement !== void 0) { + latestElement.type = type2; + } + }; + const setNewElementDocRef = (docRef) => { + if (latestElement !== void 0) { + latestElement.docRef = docRef; + } + }; + const addRelationship = (type2, src, dst) => { + relations$1.push({ + type: type2, + src, + dst + }); + }; + const getRelationships = () => relations$1; + const clear$7 = () => { + relations$1 = []; + latestRequirement = {}; + requirements = {}; + latestElement = {}; + elements$1 = {}; + clear$l(); + }; + const db$6 = { + RequirementType, + RiskLevel, + VerifyType, + Relationships, + getConfig: () => getConfig$2().req, + addRequirement, + getRequirements, + setNewReqId, + setNewReqText, + setNewReqRisk, + setNewReqVerifyMethod, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addElement, + getElements, + setNewElementType, + setNewElementDocRef, + addRelationship, + getRelationships, + clear: clear$7 + }; + const getStyles$7 = (options2) => ` + + marker { + fill: ${options2.relationColor}; + stroke: ${options2.relationColor}; + } + + marker.cross { + stroke: ${options2.lineColor}; + } + + svg { + font-family: ${options2.fontFamily}; + font-size: ${options2.fontSize}; + } + + .reqBox { + fill: ${options2.requirementBackground}; + fill-opacity: 1.0; + stroke: ${options2.requirementBorderColor}; + stroke-width: ${options2.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${options2.requirementTextColor}; + } + .reqLabelBox { + fill: ${options2.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${options2.requirementBorderColor}; + stroke-width: ${options2.requirementBorderSize}; + } + .relationshipLine { + stroke: ${options2.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${options2.relationLabelColor}; + } + +`; + const styles$6 = getStyles$7; + const ReqMarkers = { + CONTAINS: "contains", + ARROW: "arrow" + }; + const insertLineEndings = (parentNode, conf2) => { + let containsNode = parentNode.append("defs").append("marker").attr("id", ReqMarkers.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", conf2.line_height / 2).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("g"); + containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none"); + containsNode.append("line").attr("x1", 0).attr("x2", conf2.line_height).attr("y1", conf2.line_height / 2).attr("y2", conf2.line_height / 2).attr("stroke-width", 1); + containsNode.append("line").attr("y1", 0).attr("y2", conf2.line_height).attr("x1", conf2.line_height / 2).attr("x2", conf2.line_height / 2).attr("stroke-width", 1); + parentNode.append("defs").append("marker").attr("id", ReqMarkers.ARROW + "_line_ending").attr("refX", conf2.line_height).attr("refY", 0.5 * conf2.line_height).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("path").attr( + "d", + `M0,0 + L${conf2.line_height},${conf2.line_height / 2} + M${conf2.line_height},${conf2.line_height / 2} + L0,${conf2.line_height}` + ).attr("stroke-width", 1); + }; + const markers = { + ReqMarkers, + insertLineEndings + }; + let conf$5 = {}; + let relCnt = 0; + const newRectNode = (parentNode, id2) => { + return parentNode.insert("rect", "#" + id2).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", conf$5.rect_min_width + "px").attr("height", conf$5.rect_min_height + "px"); + }; + const newTitleNode = (parentNode, id2, txts) => { + let x2 = conf$5.rect_min_width / 2; + let title2 = parentNode.append("text").attr("class", "req reqLabel reqTitle").attr("id", id2).attr("x", x2).attr("y", conf$5.rect_padding).attr("dominant-baseline", "hanging"); + let i2 = 0; + txts.forEach((textStr) => { + if (i2 == 0) { + title2.append("tspan").attr("text-anchor", "middle").attr("x", conf$5.rect_min_width / 2).attr("dy", 0).text(textStr); + } else { + title2.append("tspan").attr("text-anchor", "middle").attr("x", conf$5.rect_min_width / 2).attr("dy", conf$5.line_height * 0.75).text(textStr); + } + i2++; + }); + let yPadding = 1.5 * conf$5.rect_padding; + let linePadding = i2 * conf$5.line_height * 0.75; + let totalY = yPadding + linePadding; + parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf$5.rect_min_width).attr("y1", totalY).attr("y2", totalY); + return { + titleNode: title2, + y: totalY + }; + }; + const newBodyNode = (parentNode, id2, txts, yStart) => { + let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id2).attr("x", conf$5.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging"); + let currentRow = 0; + const charLimit = 30; + let wrappedTxts = []; + txts.forEach((textStr) => { + let currentTextLen = textStr.length; + while (currentTextLen > charLimit && currentRow < 3) { + let firstPart = textStr.substring(0, charLimit); + textStr = textStr.substring(charLimit, textStr.length); + currentTextLen = textStr.length; + wrappedTxts[wrappedTxts.length] = firstPart; + currentRow++; + } + if (currentRow == 3) { + let lastStr = wrappedTxts[wrappedTxts.length - 1]; + wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "..."; + } else { + wrappedTxts[wrappedTxts.length] = textStr; + } + currentRow = 0; + }); + wrappedTxts.forEach((textStr) => { + body.append("tspan").attr("x", conf$5.rect_padding).attr("dy", conf$5.line_height).text(textStr); + }); + return body; + }; + const addEdgeLabel = (parentNode, svgPath, conf2, txt) => { + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt; + relCnt++; + const labelNode = parentNode.append("text").attr("class", "req relationshipLabel").attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(txt); + const labelBBox = labelNode.node().getBBox(); + parentNode.insert("rect", "#" + labelId).attr("class", "req reqLabelBox").attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height).attr("fill", "white").attr("fill-opacity", "85%"); + }; + const drawRelationshipFromLayout = function(svg2, rel, g, insert, diagObj) { + const edge = g.edge(elementString(rel.src), elementString(rel.dst)); + const lineFunction = line$1().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }); + const svgPath = svg2.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none"); + if (rel.type == diagObj.db.Relationships.CONTAINS) { + svgPath.attr( + "marker-start", + "url(" + common$1.getUrl(conf$5.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)" + ); + } else { + svgPath.attr("stroke-dasharray", "10,7"); + svgPath.attr( + "marker-end", + "url(" + common$1.getUrl(conf$5.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)" + ); + } + addEdgeLabel(svg2, svgPath, conf$5, `<<${rel.type}>>`); + return; + }; + const drawReqs = (reqs, graph, svgNode2) => { + Object.keys(reqs).forEach((reqName) => { + let req = reqs[reqName]; + reqName = elementString(reqName); + log$1.info("Added new requirement: ", reqName); + const groupNode = svgNode2.append("g").attr("id", reqName); + const textId = "req-" + reqName; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [ + `<<${req.type}>>`, + `${req.name}` + ]); + newBodyNode( + groupNode, + reqName + "_body", + [ + `Id: ${req.id}`, + `Text: ${req.text}`, + `Risk: ${req.risk}`, + `Verification: ${req.verifyMethod}` + ], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(reqName, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: reqName + }); + }); + }; + const drawElements = (els, graph, svgNode2) => { + Object.keys(els).forEach((elName) => { + let el = els[elName]; + const id2 = elementString(elName); + const groupNode = svgNode2.append("g").attr("id", id2); + const textId = "element-" + id2; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<>`, `${elName}`]); + newBodyNode( + groupNode, + textId + "_body", + [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(id2, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: id2 + }); + }); + }; + const addRelationships = (relationships2, g) => { + relationships2.forEach(function(r) { + let src = elementString(r.src); + let dst = elementString(r.dst); + g.setEdge(src, dst, { relationship: r }); + }); + return relationships2; + }; + const adjustEntities = function(svgNode2, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode2.select("#" + v); + svgNode2.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); + return; + }; + const elementString = (str2) => { + return str2.replace(/\s/g, "").replace(/\./g, "_"); + }; + const draw$a = (text2, id2, _version, diagObj) => { + conf$5 = getConfig$2().requirement; + const securityLevel = conf$5.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = root2.select(`[id='${id2}']`); + markers.insertLineEndings(svg2, conf$5); + const g = new Graph({ + multigraph: false, + compound: false, + directed: true + }).setGraph({ + rankdir: conf$5.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let requirements2 = diagObj.db.getRequirements(); + let elements2 = diagObj.db.getElements(); + let relationships2 = diagObj.db.getRelationships(); + drawReqs(requirements2, g, svg2); + drawElements(elements2, g, svg2); + addRelationships(relationships2, g); + layout(g); + adjustEntities(svg2, g); + relationships2.forEach(function(rel) { + drawRelationshipFromLayout(svg2, rel, g, id2, diagObj); + }); + const padding2 = conf$5.rect_padding; + const svgBounds = svg2.node().getBBox(); + const width2 = svgBounds.width + padding2 * 2; + const height = svgBounds.height + padding2 * 2; + configureSvgSize(svg2, height, width2, conf$5.useMaxWidth); + svg2.attr("viewBox", `${svgBounds.x - padding2} ${svgBounds.y - padding2} ${width2} ${height}`); + }; + const renderer$9 = { + draw: draw$a + }; + const diagram$a = { + parser: parser$e, + db: db$6, + renderer: renderer$9, + styles: styles$6 + }; + const requirementDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$a + }, Symbol.toStringTag, { value: "Module" })); + var parser$b = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $Vy = [4, 5, 16, 50, 52, 53], $Vz = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VD = [68, 69, 70], $VE = [1, 120]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "box_section": 10, "box_line": 11, "participant_statement": 12, "create": 13, "box": 14, "restOfLine": 15, "end": 16, "signal": 17, "autonumber": 18, "NUM": 19, "off": 20, "activate": 21, "actor": 22, "deactivate": 23, "note_statement": 24, "links_statement": 25, "link_statement": 26, "properties_statement": 27, "details_statement": 28, "title": 29, "legacy_title": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "loop": 36, "rect": 37, "opt": 38, "alt": 39, "else_sections": 40, "par": 41, "par_sections": 42, "par_over": 43, "critical": 44, "option_sections": 45, "break": 46, "option": 47, "and": 48, "else": 49, "participant": 50, "AS": 51, "participant_actor": 52, "destroy": 53, "note": 54, "placement": 55, "text2": 56, "over": 57, "actor_pair": 58, "links": 59, "link": 60, "properties": 61, "details": 62, "spaceList": 63, ",": 64, "left_of": 65, "right_of": 66, "signaltype": 67, "+": 68, "-": 69, "ACTOR": 70, "SOLID_OPEN_ARROW": 71, "DOTTED_OPEN_ARROW": 72, "SOLID_ARROW": 73, "DOTTED_ARROW": 74, "SOLID_CROSS": 75, "DOTTED_CROSS": 76, "SOLID_POINT": 77, "DOTTED_POINT": 78, "TXT": 79, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.apply($$[$0]); + return $$[$0]; + case 4: + case 9: + this.$ = []; + break; + case 5: + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 6: + case 7: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 8: + case 13: + this.$ = []; + break; + case 15: + $$[$0].type = "createParticipant"; + this.$ = $$[$0]; + break; + case 16: + $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) }); + $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] }); + this.$ = $$[$0 - 1]; + break; + case 18: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 19: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 20: + this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 21: + this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 22: + this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }; + break; + case 23: + this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] }; + break; + case 29: + yy.setDiagramTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 30: + yy.setDiagramTitle($$[$0].substring(7)); + this.$ = $$[$0].substring(7); + break; + case 31: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 32: + case 33: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 34: + $$[$0 - 1].unshift({ type: "loopStart", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START }); + $$[$0 - 1].push({ type: "loopEnd", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END }); + this.$ = $$[$0 - 1]; + break; + case 35: + $$[$0 - 1].unshift({ type: "rectStart", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START }); + $$[$0 - 1].push({ type: "rectEnd", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END }); + this.$ = $$[$0 - 1]; + break; + case 36: + $$[$0 - 1].unshift({ type: "optStart", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START }); + $$[$0 - 1].push({ type: "optEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END }); + this.$ = $$[$0 - 1]; + break; + case 37: + $$[$0 - 1].unshift({ type: "altStart", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START }); + $$[$0 - 1].push({ type: "altEnd", signalType: yy.LINETYPE.ALT_END }); + this.$ = $$[$0 - 1]; + break; + case 38: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 39: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 40: + $$[$0 - 1].unshift({ type: "criticalStart", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START }); + $$[$0 - 1].push({ type: "criticalEnd", signalType: yy.LINETYPE.CRITICAL_END }); + this.$ = $$[$0 - 1]; + break; + case 41: + $$[$0 - 1].unshift({ type: "breakStart", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START }); + $$[$0 - 1].push({ type: "breakEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END }); + this.$ = $$[$0 - 1]; + break; + case 43: + this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]); + break; + case 45: + this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]); + break; + case 47: + this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]); + break; + case 48: + $$[$0 - 3].draw = "participant"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 49: + $$[$0 - 1].draw = "participant"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 50: + $$[$0 - 3].draw = "actor"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 51: + $$[$0 - 1].draw = "actor"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 52: + $$[$0 - 1].type = "destroyParticipant"; + this.$ = $$[$0 - 1]; + break; + case 53: + this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 54: + $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2); + $$[$0 - 2][0] = $$[$0 - 2][0].actor; + $$[$0 - 2][1] = $$[$0 - 2][1].actor; + this.$ = [$$[$0 - 1], { type: "addNote", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }]; + break; + case 55: + this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 56: + this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 57: + this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 58: + this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 61: + this.$ = [$$[$0 - 2], $$[$0]]; + break; + case 62: + this.$ = $$[$0]; + break; + case 63: + this.$ = yy.PLACEMENT.LEFTOF; + break; + case 64: + this.$ = yy.PLACEMENT.RIGHTOF; + break; + case 65: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true }, + { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] } + ]; + break; + case 66: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] }, + { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] } + ]; + break; + case 67: + this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }]; + break; + case 68: + this.$ = { type: "addParticipant", actor: $$[$0] }; + break; + case 69: + this.$ = yy.LINETYPE.SOLID_OPEN; + break; + case 70: + this.$ = yy.LINETYPE.DOTTED_OPEN; + break; + case 71: + this.$ = yy.LINETYPE.SOLID; + break; + case 72: + this.$ = yy.LINETYPE.DOTTED; + break; + case 73: + this.$ = yy.LINETYPE.SOLID_CROSS; + break; + case 74: + this.$ = yy.LINETYPE.DOTTED_CROSS; + break; + case 75: + this.$ = yy.LINETYPE.SOLID_POINT; + break; + case 76: + this.$ = yy.LINETYPE.DOTTED_POINT; + break; + case 77: + this.$ = yy.parseMessage($$[$0].trim().substring(1)); + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: $Vw }, { 22: 55, 70: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: $Vw }, { 22: 72, 70: $Vw }, { 22: 73, 70: $Vw }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: $Vw }, { 22: 88, 70: $Vw }, { 22: 89, 70: $Vw }, { 22: 90, 70: $Vw }, o([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vy, [2, 9], { 10: 91 }), o($Vx, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, o($Vx, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($Vz, $V3, { 7: 97 }), o($Vz, $V3, { 7: 98 }), o($Vz, $V3, { 7: 99 }), o($VA, $V3, { 40: 100, 7: 101 }), o($VB, $V3, { 42: 102, 7: 103 }), o($VB, $V3, { 7: 103, 42: 104 }), o($VC, $V3, { 45: 105, 7: 106 }), o($Vz, $V3, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: $Vw }, o($VD, [2, 69]), o($VD, [2, 70]), o($VD, [2, 71]), o($VD, [2, 72]), o($VD, [2, 73]), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), { 22: 116, 70: $Vw }, { 22: 118, 58: 117, 70: $Vw }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: $VE }, { 56: 121, 79: $VE }, { 56: 122, 79: $VE }, { 56: 123, 79: $VE }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 129] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 130], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 131], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 132], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 133] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 134], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 135] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 136], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 139], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 140], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 15: [1, 141] }, o($Vx, [2, 49]), { 15: [1, 142] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 143, 70: $Vw }, { 22: 144, 70: $Vw }, { 56: 145, 79: $VE }, { 56: 146, 79: $VE }, { 56: 147, 79: $VE }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, o($Vx, [2, 16]), o($Vy, [2, 10]), { 12: 149, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vy, [2, 12]), o($Vy, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 150] }, o($Vx, [2, 38]), { 15: [1, 151] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 152] }, o($Vx, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: $VE }, { 56: 156, 79: $VE }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: $Vw }, o($Vy, [2, 11]), o($VA, $V3, { 7: 101, 40: 158 }), o($VB, $V3, { 7: 103, 42: 159 }), o($VC, $V3, { 7: 106, 45: 160 }), o($Vx, [2, 48]), o($Vx, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }], + defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 5; + case 1: + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + return 19; + case 7: + this.begin("LINE"); + return 14; + case 8: + this.begin("ID"); + return 50; + case 9: + this.begin("ID"); + return 52; + case 10: + return 13; + case 11: + this.begin("ID"); + return 53; + case 12: + yy_.yytext = yy_.yytext.trim(); + this.begin("ALIAS"); + return 70; + case 13: + this.popState(); + this.popState(); + this.begin("LINE"); + return 51; + case 14: + this.popState(); + this.popState(); + return 5; + case 15: + this.begin("LINE"); + return 36; + case 16: + this.begin("LINE"); + return 37; + case 17: + this.begin("LINE"); + return 38; + case 18: + this.begin("LINE"); + return 39; + case 19: + this.begin("LINE"); + return 49; + case 20: + this.begin("LINE"); + return 41; + case 21: + this.begin("LINE"); + return 43; + case 22: + this.begin("LINE"); + return 48; + case 23: + this.begin("LINE"); + return 44; + case 24: + this.begin("LINE"); + return 47; + case 25: + this.begin("LINE"); + return 46; + case 26: + this.popState(); + return 15; + case 27: + return 16; + case 28: + return 65; + case 29: + return 66; + case 30: + return 59; + case 31: + return 60; + case 32: + return 61; + case 33: + return 62; + case 34: + return 57; + case 35: + return 54; + case 36: + this.begin("ID"); + return 21; + case 37: + this.begin("ID"); + return 23; + case 38: + return 29; + case 39: + return 30; + case 40: + this.begin("acc_title"); + return 31; + case 41: + this.popState(); + return "acc_title_value"; + case 42: + this.begin("acc_descr"); + return 33; + case 43: + this.popState(); + return "acc_descr_value"; + case 44: + this.begin("acc_descr_multiline"); + break; + case 45: + this.popState(); + break; + case 46: + return "acc_descr_multiline_value"; + case 47: + return 6; + case 48: + return 18; + case 49: + return 20; + case 50: + return 64; + case 51: + return 5; + case 52: + yy_.yytext = yy_.yytext.trim(); + return 70; + case 53: + return 73; + case 54: + return 74; + case 55: + return 71; + case 56: + return 72; + case 57: + return 75; + case 58: + return 76; + case 59: + return 77; + case 60: + return 78; + case 61: + return 79; + case 62: + return 68; + case 63: + return 69; + case 64: + return 5; + case 65: + return "INVALID"; + } + }, + rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [45, 46], "inclusive": false }, "acc_descr": { "rules": [43], "inclusive": false }, "acc_title": { "rules": [41], "inclusive": false }, "ID": { "rules": [2, 3, 12], "inclusive": false }, "ALIAS": { "rules": [2, 3, 13, 14], "inclusive": false }, "LINE": { "rules": [2, 3, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$b.parser = parser$b; + const parser$c = parser$b; + let prevActor = void 0; + let actors$1 = {}; + let createdActors = {}; + let destroyedActors = {}; + let boxes = []; + let messages = []; + let sequenceNumbersEnabled = false; + let wrapEnabled; + let currentBox = void 0; + let lastCreated = void 0; + let lastDestroyed = void 0; + const addBox = function(data) { + boxes.push({ + name: data.text, + wrap: data.wrap === void 0 && autoWrap() || !!data.wrap, + fill: data.color, + actorKeys: [] + }); + currentBox = boxes.slice(-1)[0]; + }; + const addActor = function(id2, name2, description, type2) { + let assignedBox = currentBox; + const old = actors$1[id2]; + if (old) { + if (currentBox && old.box && currentBox !== old.box) { + throw new Error( + "A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + currentBox.name + "' at the same time." + ); + } + assignedBox = old.box ? old.box : currentBox; + old.box = assignedBox; + if (old && name2 === old.name && description == null) { + return; + } + } + if (description == null || description.text == null) { + description = { text: name2, wrap: null, type: type2 }; + } + if (type2 == null || description.text == null) { + description = { text: name2, wrap: null, type: type2 }; + } + actors$1[id2] = { + box: assignedBox, + name: name2, + description: description.text, + wrap: description.wrap === void 0 && autoWrap() || !!description.wrap, + prevActor, + links: {}, + properties: {}, + actorCnt: null, + rectData: null, + type: type2 || "participant" + }; + if (prevActor && actors$1[prevActor]) { + actors$1[prevActor].nextActor = id2; + } + if (currentBox) { + currentBox.actorKeys.push(id2); + } + prevActor = id2; + }; + const activationCount = (part) => { + let i2; + let count = 0; + for (i2 = 0; i2 < messages.length; i2++) { + if (messages[i2].type === LINETYPE.ACTIVE_START && messages[i2].from.actor === part) { + count++; + } + if (messages[i2].type === LINETYPE.ACTIVE_END && messages[i2].from.actor === part) { + count--; + } + } + return count; + }; + const addMessage = function(idFrom, idTo, message, answer) { + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + answer + }); + }; + const addSignal = function(idFrom, idTo, message = { text: void 0, wrap: void 0 }, messageType, activate = false) { + if (messageType === LINETYPE.ACTIVE_END) { + const cnt2 = activationCount(idFrom.actor); + if (cnt2 < 1) { + let error = new Error("Trying to inactivate an inactive participant (" + idFrom.actor + ")"); + error.hash = { + text: "->>-", + token: "->>-", + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["'ACTIVE_PARTICIPANT'"] + }; + throw error; + } + } + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: messageType, + activate + }); + return true; + }; + const hasAtLeastOneBox = function() { + return boxes.length > 0; + }; + const hasAtLeastOneBoxWithTitle = function() { + return boxes.some((b) => b.name); + }; + const getMessages = function() { + return messages; + }; + const getBoxes = function() { + return boxes; + }; + const getActors$1 = function() { + return actors$1; + }; + const getCreatedActors = function() { + return createdActors; + }; + const getDestroyedActors = function() { + return destroyedActors; + }; + const getActor = function(id2) { + return actors$1[id2]; + }; + const getActorKeys = function() { + return Object.keys(actors$1); + }; + const enableSequenceNumbers = function() { + sequenceNumbersEnabled = true; + }; + const disableSequenceNumbers = function() { + sequenceNumbersEnabled = false; + }; + const showSequenceNumbers = () => sequenceNumbersEnabled; + const setWrap = function(wrapSetting) { + wrapEnabled = wrapSetting; + }; + const autoWrap = () => { + if (wrapEnabled !== void 0) { + return wrapEnabled; + } + return getConfig$2().sequence.wrap; + }; + const clear$6 = function() { + actors$1 = {}; + createdActors = {}; + destroyedActors = {}; + boxes = []; + messages = []; + sequenceNumbersEnabled = false; + clear$l(); + }; + const parseMessage = function(str2) { + const _str = str2.trim(); + const message = { + text: _str.replace(/^:?(?:no)?wrap:/, "").trim(), + wrap: _str.match(/^:?wrap:/) !== null ? true : _str.match(/^:?nowrap:/) !== null ? false : void 0 + }; + log$1.debug("parseMessage:", message); + return message; + }; + const parseBoxData = function(str2) { + const match = str2.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/); + let color2 = match != null && match[1] ? match[1].trim() : "transparent"; + let title2 = match != null && match[2] ? match[2].trim() : void 0; + if (window && window.CSS) { + if (!window.CSS.supports("color", color2)) { + color2 = "transparent"; + title2 = str2.trim(); + } + } else { + const style = new Option().style; + style.color = color2; + if (style.color !== color2) { + color2 = "transparent"; + title2 = str2.trim(); + } + } + const boxData = { + color: color2, + text: title2 !== void 0 ? sanitizeText$6(title2.replace(/^:?(?:no)?wrap:/, ""), getConfig$2()) : void 0, + wrap: title2 !== void 0 ? title2.match(/^:?wrap:/) !== null ? true : title2.match(/^:?nowrap:/) !== null ? false : void 0 : void 0 + }; + return boxData; + }; + const LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25, + AUTONUMBER: 26, + CRITICAL_START: 27, + CRITICAL_OPTION: 28, + CRITICAL_END: 29, + BREAK_START: 30, + BREAK_END: 31, + PAR_OVER_START: 32 + }; + const ARROWTYPE = { + FILLED: 0, + OPEN: 1 + }; + const PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 + }; + const addNote$1 = function(actor, placement, message) { + ({ + actor, + placement, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap + }); + const actors2 = [].concat(actor, actor); + messages.push({ + from: actors2[0], + to: actors2[1], + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: LINETYPE.NOTE, + placement + }); + }; + const addLinks = function(actorId, text2) { + const actor = getActor(actorId); + try { + let sanitizedText = sanitizeText$6(text2.text, getConfig$2()); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + const links2 = JSON.parse(sanitizedText); + insertLinks(actor, links2); + } catch (e) { + log$1.error("error while parsing actor link text", e); + } + }; + const addALink = function(actorId, text2) { + const actor = getActor(actorId); + try { + const links2 = {}; + let sanitizedText = sanitizeText$6(text2.text, getConfig$2()); + var sep2 = sanitizedText.indexOf("@"); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + var label = sanitizedText.slice(0, sep2 - 1).trim(); + var link2 = sanitizedText.slice(sep2 + 1).trim(); + links2[label] = link2; + insertLinks(actor, links2); + } catch (e) { + log$1.error("error while parsing actor link text", e); + } + }; + function insertLinks(actor, links2) { + if (actor.links == null) { + actor.links = links2; + } else { + for (let key in links2) { + actor.links[key] = links2[key]; + } + } + } + const addProperties = function(actorId, text2) { + const actor = getActor(actorId); + try { + let sanitizedText = sanitizeText$6(text2.text, getConfig$2()); + const properties = JSON.parse(sanitizedText); + insertProperties(actor, properties); + } catch (e) { + log$1.error("error while parsing actor properties text", e); + } + }; + function insertProperties(actor, properties) { + if (actor.properties == null) { + actor.properties = properties; + } else { + for (let key in properties) { + actor.properties[key] = properties[key]; + } + } + } + function boxEnd() { + currentBox = void 0; + } + const addDetails = function(actorId, text2) { + const actor = getActor(actorId); + const elem = document.getElementById(text2.text); + try { + const text3 = elem.innerHTML; + const details = JSON.parse(text3); + if (details["properties"]) { + insertProperties(actor, details["properties"]); + } + if (details["links"]) { + insertLinks(actor, details["links"]); + } + } catch (e) { + log$1.error("error while parsing actor details text", e); + } + }; + const getActorProperty = function(actor, key) { + if (actor !== void 0 && actor.properties !== void 0) { + return actor.properties[key]; + } + return void 0; + }; + const apply = function(param) { + if (Array.isArray(param)) { + param.forEach(function(item) { + apply(item); + }); + } else { + switch (param.type) { + case "sequenceIndex": + messages.push({ + from: void 0, + to: void 0, + message: { + start: param.sequenceIndex, + step: param.sequenceIndexStep, + visible: param.sequenceVisible + }, + wrap: false, + type: param.signalType + }); + break; + case "addParticipant": + addActor(param.actor, param.actor, param.description, param.draw); + break; + case "createParticipant": + if (actors$1[param.actor]) { + throw new Error( + "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior" + ); + } + lastCreated = param.actor; + addActor(param.actor, param.actor, param.description, param.draw); + createdActors[param.actor] = messages.length; + break; + case "destroyParticipant": + lastDestroyed = param.actor; + destroyedActors[param.actor] = messages.length; + break; + case "activeStart": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "activeEnd": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "addNote": + addNote$1(param.actor, param.placement, param.text); + break; + case "addLinks": + addLinks(param.actor, param.text); + break; + case "addALink": + addALink(param.actor, param.text); + break; + case "addProperties": + addProperties(param.actor, param.text); + break; + case "addDetails": + addDetails(param.actor, param.text); + break; + case "addMessage": + if (lastCreated) { + if (param.to !== lastCreated) { + throw new Error( + "The created participant " + lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram." + ); + } else { + lastCreated = void 0; + } + } else if (lastDestroyed) { + if (param.to !== lastDestroyed && param.from !== lastDestroyed) { + throw new Error( + "The destroyed participant " + lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram." + ); + } else { + lastDestroyed = void 0; + } + } + addSignal(param.from, param.to, param.msg, param.signalType, param.activate); + break; + case "boxStart": + addBox(param.boxData); + break; + case "boxEnd": + boxEnd(); + break; + case "loopStart": + addSignal(void 0, void 0, param.loopText, param.signalType); + break; + case "loopEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "rectStart": + addSignal(void 0, void 0, param.color, param.signalType); + break; + case "rectEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "optStart": + addSignal(void 0, void 0, param.optText, param.signalType); + break; + case "optEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "altStart": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "else": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "altEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "setAccTitle": + setAccTitle(param.text); + break; + case "parStart": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "and": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "parEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "criticalStart": + addSignal(void 0, void 0, param.criticalText, param.signalType); + break; + case "option": + addSignal(void 0, void 0, param.optionText, param.signalType); + break; + case "criticalEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "breakStart": + addSignal(void 0, void 0, param.breakText, param.signalType); + break; + case "breakEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + } + } + }; + const db$5 = { + addActor, + addMessage, + addSignal, + addLinks, + addDetails, + addProperties, + autoWrap, + setWrap, + enableSequenceNumbers, + disableSequenceNumbers, + showSequenceNumbers, + getMessages, + getActors: getActors$1, + getCreatedActors, + getDestroyedActors, + getActor, + getActorKeys, + getActorProperty, + getAccTitle, + getBoxes, + getDiagramTitle, + setDiagramTitle, + getConfig: () => getConfig$2().sequence, + clear: clear$6, + parseMessage, + parseBoxData, + LINETYPE, + ARROWTYPE, + PLACEMENT, + addNote: addNote$1, + setAccTitle, + apply, + setAccDescription, + getAccDescription, + hasAtLeastOneBox, + hasAtLeastOneBoxWithTitle + }; + const getStyles$6 = (options2) => `.actor { + stroke: ${options2.actorBorder}; + fill: ${options2.actorBkg}; + } + + text.actor > tspan { + fill: ${options2.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${options2.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${options2.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${options2.signalColor}; + } + + #arrowhead path { + fill: ${options2.signalColor}; + stroke: ${options2.signalColor}; + } + + .sequenceNumber { + fill: ${options2.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${options2.signalColor}; + } + + #crosshead path { + fill: ${options2.signalColor}; + stroke: ${options2.signalColor}; + } + + .messageText { + fill: ${options2.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${options2.labelBoxBorderColor}; + fill: ${options2.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${options2.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${options2.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${options2.labelBoxBorderColor}; + fill: ${options2.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${options2.noteBorderColor}; + fill: ${options2.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${options2.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${options2.activationBkgColor}; + stroke: ${options2.activationBorderColor}; + } + + .activation1 { + fill: ${options2.activationBkgColor}; + stroke: ${options2.activationBorderColor}; + } + + .activation2 { + fill: ${options2.activationBkgColor}; + stroke: ${options2.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${options2.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${options2.actorBorder}; + fill: ${options2.actorBkg}; + } + .actor-man circle, line { + stroke: ${options2.actorBorder}; + fill: ${options2.actorBkg}; + stroke-width: 2px; + } +`; + const styles$5 = getStyles$6; + const ACTOR_TYPE_WIDTH = 18 * 2; + const drawRect$2 = function(elem, rectData) { + return drawRect$4(elem, rectData); + }; + const addPopupInteraction = (id2, actorCnt2) => { + addFunction(() => { + const arr = document.querySelectorAll(id2); + if (arr.length === 0) { + return; + } + arr[0].addEventListener("mouseover", function() { + popupMenuUpFunc("actor" + actorCnt2 + "_popup"); + }); + arr[0].addEventListener("mouseout", function() { + popupMenuDownFunc("actor" + actorCnt2 + "_popup"); + }); + }); + }; + const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) { + if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) { + return { height: 0, width: 0 }; + } + const links2 = actor.links; + const actorCnt2 = actor.actorCnt; + const rectData = actor.rectData; + var displayValue = "none"; + if (forceMenus) { + displayValue = "block !important"; + } + const g = elem.append("g"); + g.attr("id", "actor" + actorCnt2 + "_popup"); + g.attr("class", "actorPopupMenu"); + g.attr("display", displayValue); + addPopupInteraction("#actor" + actorCnt2 + "_popup", actorCnt2); + var actorClass = ""; + if (rectData.class !== void 0) { + actorClass = " " + rectData.class; + } + let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth; + const rectElem = g.append("rect"); + rectElem.attr("class", "actorPopupMenuPanel" + actorClass); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.height); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", menuWidth); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (links2 != null) { + var linkY = 20; + for (let key in links2) { + var linkElem = g.append("a"); + var sanitizedLink = sanitizeUrl_1(links2[key]); + linkElem.attr("xlink:href", sanitizedLink); + linkElem.attr("target", "_blank"); + _drawMenuItemTextCandidateFunc(textAttrs)( + key, + linkElem, + rectData.x + 10, + rectData.height + linkY, + menuWidth, + 20, + { class: "actor" }, + textAttrs + ); + linkY += 30; + } + } + rectElem.attr("height", linkY); + return { height: rectData.height + linkY, width: menuWidth }; + }; + const popupMenu = function(popid) { + return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'block'; }"; + }; + const popdownMenu = function(popid) { + return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'none'; }"; + }; + const popupMenuUpFunc = function(popupId) { + var pu = document.getElementById(popupId); + if (pu != null) { + pu.style.display = "block"; + } + }; + const popupMenuDownFunc = function(popupId) { + var pu = document.getElementById(popupId); + if (pu != null) { + pu.style.display = "none"; + } + }; + const drawText$2 = function(elem, textData) { + let prevTextHeight = 0; + let textHeight = 0; + const lines = textData.text.split(common$1.lineBreakRegex); + const [_textFontSize, _textFontSizePx] = parseFontSize(textData.fontSize); + let textElems = []; + let dy = 0; + let yfunc = () => textData.y; + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + switch (textData.valign) { + case "top": + case "start": + yfunc = () => Math.round(textData.y + textData.textMargin); + break; + case "middle": + case "center": + yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2); + break; + case "bottom": + case "end": + yfunc = () => Math.round( + textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin + ); + break; + } + } + if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) { + switch (textData.anchor) { + case "left": + case "start": + textData.x = Math.round(textData.x + textData.textMargin); + textData.anchor = "start"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "middle": + case "center": + textData.x = Math.round(textData.x + textData.width / 2); + textData.anchor = "middle"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "right": + case "end": + textData.x = Math.round(textData.x + textData.width - textData.textMargin); + textData.anchor = "end"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + } + } + for (let [i2, line2] of lines.entries()) { + if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) { + dy = i2 * _textFontSize; + } + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", yfunc()); + if (textData.anchor !== void 0) { + textElem.attr("text-anchor", textData.anchor).attr("dominant-baseline", textData.dominantBaseline).attr("alignment-baseline", textData.alignmentBaseline); + } + if (textData.fontFamily !== void 0) { + textElem.style("font-family", textData.fontFamily); + } + if (_textFontSizePx !== void 0) { + textElem.style("font-size", _textFontSizePx); + } + if (textData.fontWeight !== void 0) { + textElem.style("font-weight", textData.fontWeight); + } + if (textData.fill !== void 0) { + textElem.attr("fill", textData.fill); + } + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + if (textData.dy !== void 0) { + textElem.attr("dy", textData.dy); + } else if (dy !== 0) { + textElem.attr("dy", dy); + } + const text2 = line2 || ZERO_WIDTH_SPACE; + if (textData.tspan) { + const span = textElem.append("tspan"); + span.attr("x", textData.x); + if (textData.fill !== void 0) { + span.attr("fill", textData.fill); + } + span.text(text2); + } else { + textElem.text(text2); + } + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + textHeight += (textElem._groups || textElem)[0][0].getBBox().height; + prevTextHeight = textHeight; + } + textElems.push(textElem); + } + return textElems; + }; + const drawLabel$2 = function(elem, txtObject) { + function genPoints(x2, y2, width2, height, cut) { + return x2 + "," + y2 + " " + (x2 + width2) + "," + y2 + " " + (x2 + width2) + "," + (y2 + height - cut) + " " + (x2 + width2 - cut * 1.2) + "," + (y2 + height) + " " + x2 + "," + (y2 + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.height / 2; + drawText$2(elem, txtObject); + return polygon; + }; + let actorCnt = -1; + const fixLifeLineHeights = (diagram2, actors2, actorKeys, conf2) => { + if (!diagram2.select) { + return; + } + actorKeys.forEach((actorKey) => { + const actor = actors2[actorKey]; + const actorDOM = diagram2.select("#actor" + actor.actorCnt); + if (!conf2.mirrorActors && actor.stopy) { + actorDOM.attr("y2", actor.stopy + actor.height / 2); + } else if (conf2.mirrorActors) { + actorDOM.attr("y2", actor.stopy); + } + }); + }; + const drawActorTypeParticipant = function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center2 = actor.x + actor.width / 2; + const centerY = actorY + 5; + const boxpluslineGroup = elem.append("g").lower(); + var g = boxpluslineGroup; + if (!isFooter) { + actorCnt++; + g.append("line").attr("id", "actor" + actorCnt).attr("x1", center2).attr("y1", centerY).attr("x2", center2).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + g = boxpluslineGroup.append("g"); + actor.actorCnt = actorCnt; + if (actor.links != null) { + g.attr("id", "root-" + actorCnt); + addPopupInteraction("#root-" + actorCnt, actorCnt); + } + } + const rect2 = getNoteRect$2(); + var cssclass = "actor"; + if (actor.properties != null && actor.properties["class"]) { + cssclass = actor.properties["class"]; + } else { + rect2.fill = "#eaeaea"; + } + rect2.x = actor.x; + rect2.y = actorY; + rect2.width = actor.width; + rect2.height = actor.height; + rect2.class = cssclass; + rect2.rx = 3; + rect2.ry = 3; + const rectElem = drawRect$2(g, rect2); + actor.rectData = rect2; + if (actor.properties != null && actor.properties["icon"]) { + const iconSrc = actor.properties["icon"].trim(); + if (iconSrc.charAt(0) === "@") { + drawEmbeddedImage(g, rect2.x + rect2.width - 20, rect2.y + 10, iconSrc.substr(1)); + } else { + drawImage$1(g, rect2.x + rect2.width - 20, rect2.y + 10, iconSrc); + } + } + _drawTextCandidateFunc$2(conf2)( + actor.description, + g, + rect2.x, + rect2.y, + rect2.width, + rect2.height, + { class: "actor" }, + conf2 + ); + let height = actor.height; + if (rectElem.node) { + const bounds2 = rectElem.node().getBBox(); + actor.height = bounds2.height; + height = bounds2.height; + } + return height; + }; + const drawActorTypeActor = function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center2 = actor.x + actor.width / 2; + const centerY = actorY + 80; + elem.lower(); + if (!isFooter) { + actorCnt++; + elem.append("line").attr("id", "actor" + actorCnt).attr("x1", center2).attr("y1", centerY).attr("x2", center2).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + actor.actorCnt = actorCnt; + } + const actElem = elem.append("g"); + actElem.attr("class", "actor-man"); + const rect2 = getNoteRect$2(); + rect2.x = actor.x; + rect2.y = actorY; + rect2.fill = "#eaeaea"; + rect2.width = actor.width; + rect2.height = actor.height; + rect2.class = "actor"; + rect2.rx = 3; + rect2.ry = 3; + actElem.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", center2).attr("y1", actorY + 25).attr("x2", center2).attr("y2", actorY + 45); + actElem.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", center2 - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 33).attr("x2", center2 + ACTOR_TYPE_WIDTH / 2).attr("y2", actorY + 33); + actElem.append("line").attr("x1", center2 - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 60).attr("x2", center2).attr("y2", actorY + 45); + actElem.append("line").attr("x1", center2).attr("y1", actorY + 45).attr("x2", center2 + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", actorY + 60); + const circle2 = actElem.append("circle"); + circle2.attr("cx", actor.x + actor.width / 2); + circle2.attr("cy", actorY + 10); + circle2.attr("r", 15); + circle2.attr("width", actor.width); + circle2.attr("height", actor.height); + const bounds2 = actElem.node().getBBox(); + actor.height = bounds2.height; + _drawTextCandidateFunc$2(conf2)( + actor.description, + actElem, + rect2.x, + rect2.y + 35, + rect2.width, + rect2.height, + { class: "actor" }, + conf2 + ); + return actor.height; + }; + const drawActor = function(elem, actor, conf2, isFooter) { + switch (actor.type) { + case "actor": + return drawActorTypeActor(elem, actor, conf2, isFooter); + case "participant": + return drawActorTypeParticipant(elem, actor, conf2, isFooter); + } + }; + const drawBox = function(elem, box, conf2) { + const boxplustextGroup = elem.append("g"); + const g = boxplustextGroup; + drawBackgroundRect$2(g, box); + if (box.name) { + _drawTextCandidateFunc$2(conf2)( + box.name, + g, + box.x, + box.y + (box.textMaxHeight || 0) / 2, + box.width, + 0, + { class: "text" }, + conf2 + ); + } + g.lower(); + }; + const anchorElement = function(elem) { + return elem.append("g"); + }; + const drawActivation = function(elem, bounds2, verticalPos, conf2, actorActivations2) { + const rect2 = getNoteRect$2(); + const g = bounds2.anchored; + rect2.x = bounds2.startx; + rect2.y = bounds2.starty; + rect2.class = "activation" + actorActivations2 % 3; + rect2.width = bounds2.stopx - bounds2.startx; + rect2.height = verticalPos - bounds2.starty; + drawRect$2(g, rect2); + }; + const drawLoop = function(elem, loopModel, labelText, conf2) { + const { + boxMargin, + boxTextMargin, + labelBoxHeight, + labelBoxWidth, + messageFontFamily: fontFamily, + messageFontSize: fontSize, + messageFontWeight: fontWeight + } = conf2; + const g = elem.append("g"); + const drawLoopLine = function(startx, starty, stopx, stopy) { + return g.append("line").attr("x1", startx).attr("y1", starty).attr("x2", stopx).attr("y2", stopy).attr("class", "loopLine"); + }; + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty); + drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy); + if (loopModel.sections !== void 0) { + loopModel.sections.forEach(function(item) { + drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style( + "stroke-dasharray", + "3, 3" + ); + }); + } + let txt = getTextObj$2(); + txt.text = labelText; + txt.x = loopModel.startx; + txt.y = loopModel.starty; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.width = labelBoxWidth || 50; + txt.height = labelBoxHeight || 20; + txt.textMargin = boxTextMargin; + txt.class = "labelText"; + drawLabel$2(g, txt); + txt = getTextObj$1(); + txt.text = loopModel.title; + txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.starty + boxMargin + boxTextMargin; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.textMargin = boxTextMargin; + txt.class = "loopText"; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = true; + let textElem = drawText$2(g, txt); + if (loopModel.sectionTitles !== void 0) { + loopModel.sectionTitles.forEach(function(item, idx) { + if (item.message) { + txt.text = item.message; + txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin; + txt.class = "loopText"; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = loopModel.wrap; + textElem = drawText$2(g, txt); + let sectionHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin); + } + }); + } + loopModel.height = Math.round(loopModel.stopy - loopModel.starty); + return g; + }; + const drawBackgroundRect$2 = function(elem, bounds2) { + drawBackgroundRect$3(elem, bounds2); + }; + const insertDatabaseIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); + }; + const insertComputerIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); + }; + const insertClockIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); + }; + const insertArrowHead = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); + }; + const insertArrowFilledHead = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); + }; + const insertSequenceNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); + }; + const insertArrowCrossHead = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7"); + }; + const getTextObj$1 = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: void 0, + style: "#666", + width: void 0, + height: void 0, + textMargin: 0, + rx: 0, + ry: 0, + tspan: true, + valign: void 0 + }; + }; + const getNoteRect$1 = function() { + return { + x: 0, + y: 0, + fill: "#EDF2AE", + stroke: "#666", + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; + }; + const _drawTextCandidateFunc$2 = function() { + function byText(content2, g, x2, y2, width2, height, textAttrs) { + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2 + height / 2 + 5).style("text-anchor", "middle").text(content2); + _setTextAttrs(text2, textAttrs); + } + function byTspan(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const [_actorFontSize, _actorFontSizePx] = parseFontSize(actorFontSize); + const lines = content2.split(common$1.lineBreakRegex); + for (let i2 = 0; i2 < lines.length; i2++) { + const dy = i2 * _actorFontSize - _actorFontSize * (lines.length - 1) / 2; + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2).style("text-anchor", "middle").style("font-size", _actorFontSizePx).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text2.append("tspan").attr("x", x2 + width2 / 2).attr("dy", dy).text(lines[i2]); + text2.attr("y", y2 + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text2, textAttrs); + } + } + function byFo(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const s = g.append("switch"); + const f2 = s.append("foreignObject").attr("x", x2).attr("y", y2).attr("width", width2).attr("height", height); + const text2 = f2.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text2.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content2); + byTspan(content2, s, x2, y2, width2, height, textAttrs, conf2); + _setTextAttrs(text2, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; + }(); + const _drawMenuItemTextCandidateFunc = function() { + function byText(content2, g, x2, y2, width2, height, textAttrs) { + const text2 = g.append("text").attr("x", x2).attr("y", y2).style("text-anchor", "start").text(content2); + _setTextAttrs(text2, textAttrs); + } + function byTspan(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const lines = content2.split(common$1.lineBreakRegex); + for (let i2 = 0; i2 < lines.length; i2++) { + const dy = i2 * actorFontSize - actorFontSize * (lines.length - 1) / 2; + const text2 = g.append("text").attr("x", x2).attr("y", y2).style("text-anchor", "start").style("font-size", actorFontSize).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text2.append("tspan").attr("x", x2).attr("dy", dy).text(lines[i2]); + text2.attr("y", y2 + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text2, textAttrs); + } + } + function byFo(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const s = g.append("switch"); + const f2 = s.append("foreignObject").attr("x", x2).attr("y", y2).attr("width", width2).attr("height", height); + const text2 = f2.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text2.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content2); + byTspan(content2, s, x2, y2, width2, height, textAttrs, conf2); + _setTextAttrs(text2, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; + }(); + const svgDraw$4 = { + drawRect: drawRect$2, + drawText: drawText$2, + drawLabel: drawLabel$2, + drawActor, + drawBox, + drawPopup, + anchorElement, + drawActivation, + drawLoop, + drawBackgroundRect: drawBackgroundRect$2, + insertArrowHead, + insertArrowFilledHead, + insertSequenceNumber, + insertArrowCrossHead, + insertDatabaseIcon, + insertComputerIcon, + insertClockIcon, + getTextObj: getTextObj$1, + getNoteRect: getNoteRect$1, + popupMenu, + popdownMenu, + fixLifeLineHeights, + sanitizeUrl: sanitizeUrl_1 + }; + let conf$4 = {}; + const bounds$1 = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + activations: [], + models: { + getHeight: function() { + return Math.max.apply( + null, + this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0) + ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h)); + }, + clear: function() { + this.actors = []; + this.boxes = []; + this.loops = []; + this.messages = []; + this.notes = []; + }, + addBox: function(boxModel) { + this.boxes.push(boxModel); + }, + addActor: function(actorModel) { + this.actors.push(actorModel); + }, + addLoop: function(loopModel) { + this.loops.push(loopModel); + }, + addMessage: function(msgModel) { + this.messages.push(msgModel); + }, + addNote: function(noteModel) { + this.notes.push(noteModel); + }, + lastActor: function() { + return this.actors[this.actors.length - 1]; + }, + lastLoop: function() { + return this.loops[this.loops.length - 1]; + }, + lastMessage: function() { + return this.messages[this.messages.length - 1]; + }, + lastNote: function() { + return this.notes[this.notes.length - 1]; + }, + actors: [], + boxes: [], + loops: [], + messages: [], + notes: [] + }, + init: function() { + this.sequenceItems = []; + this.activations = []; + this.models.clear(); + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + setConf$4(getConfig$2()); + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const _self = this; + let cnt2 = 0; + function updateFn(type2) { + return function updateItemBounds(item) { + cnt2++; + const n = _self.sequenceItems.length - cnt2 + 1; + _self.updateVal(item, "starty", starty - n * conf$4.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf$4.boxMargin, Math.max); + _self.updateVal(bounds$1.data, "startx", startx - n * conf$4.boxMargin, Math.min); + _self.updateVal(bounds$1.data, "stopx", stopx + n * conf$4.boxMargin, Math.max); + if (!(type2 === "activation")) { + _self.updateVal(item, "startx", startx - n * conf$4.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf$4.boxMargin, Math.max); + _self.updateVal(bounds$1.data, "starty", starty - n * conf$4.boxMargin, Math.min); + _self.updateVal(bounds$1.data, "stopy", stopy + n * conf$4.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + this.activations.forEach(updateFn("activation")); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = common$1.getMin(startx, stopx); + const _stopx = common$1.getMax(startx, stopx); + const _starty = common$1.getMin(starty, stopy); + const _stopy = common$1.getMax(starty, stopy); + this.updateVal(bounds$1.data, "startx", _startx, Math.min); + this.updateVal(bounds$1.data, "starty", _starty, Math.min); + this.updateVal(bounds$1.data, "stopx", _stopx, Math.max); + this.updateVal(bounds$1.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + newActivation: function(message, diagram2, actors2) { + const actorRect = actors2[message.from.actor]; + const stackedSize = actorActivations(message.from.actor).length || 0; + const x2 = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf$4.activationWidth / 2; + this.activations.push({ + startx: x2, + starty: this.verticalPos + 2, + stopx: x2 + conf$4.activationWidth, + stopy: void 0, + actor: message.from.actor, + anchored: svgDraw$4.anchorElement(diagram2) + }); + }, + endActivation: function(message) { + const lastActorActivationIdx = this.activations.map(function(activation) { + return activation.actor; + }).lastIndexOf(message.from.actor); + return this.activations.splice(lastActorActivationIdx, 1)[0]; + }, + createLoop: function(title2 = { message: void 0, wrap: false, width: void 0 }, fill) { + return { + startx: void 0, + starty: this.verticalPos, + stopx: void 0, + stopy: void 0, + title: title2.message, + wrap: title2.wrap, + width: title2.width, + height: 0, + fill + }; + }, + newLoop: function(title2 = { message: void 0, wrap: false, width: void 0 }, fill) { + this.sequenceItems.push(this.createLoop(title2, fill)); + }, + endLoop: function() { + return this.sequenceItems.pop(); + }, + isLoopOverlap: function() { + return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false; + }, + addSectionToLoop: function(message) { + const loop = this.sequenceItems.pop(); + loop.sections = loop.sections || []; + loop.sectionTitles = loop.sectionTitles || []; + loop.sections.push({ y: bounds$1.getVerticalPos(), height: 0 }); + loop.sectionTitles.push(message); + this.sequenceItems.push(loop); + }, + saveVerticalPos: function() { + if (this.isLoopOverlap()) { + this.savedVerticalPos = this.verticalPos; + } + }, + resetVerticalPos: function() { + if (this.isLoopOverlap()) { + this.verticalPos = this.savedVerticalPos; + } + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = common$1.getMax(this.data.stopy, this.verticalPos); + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return { bounds: this.data, models: this.models }; + } + }; + const drawNote$2 = function(elem, noteModel) { + bounds$1.bumpVerticalPos(conf$4.boxMargin); + noteModel.height = conf$4.boxMargin; + noteModel.starty = bounds$1.getVerticalPos(); + const rect2 = getNoteRect$2(); + rect2.x = noteModel.startx; + rect2.y = noteModel.starty; + rect2.width = noteModel.width || conf$4.width; + rect2.class = "note"; + const g = elem.append("g"); + const rectElem = svgDraw$4.drawRect(g, rect2); + const textObj = getTextObj$2(); + textObj.x = noteModel.startx; + textObj.y = noteModel.starty; + textObj.width = rect2.width; + textObj.dy = "1em"; + textObj.text = noteModel.message; + textObj.class = "noteText"; + textObj.fontFamily = conf$4.noteFontFamily; + textObj.fontSize = conf$4.noteFontSize; + textObj.fontWeight = conf$4.noteFontWeight; + textObj.anchor = conf$4.noteAlign; + textObj.textMargin = conf$4.noteMargin; + textObj.valign = "center"; + const textElem = drawText$2(g, textObj); + const textHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + rectElem.attr("height", textHeight + 2 * conf$4.noteMargin); + noteModel.height += textHeight + 2 * conf$4.noteMargin; + bounds$1.bumpVerticalPos(textHeight + 2 * conf$4.noteMargin); + noteModel.stopy = noteModel.starty + textHeight + 2 * conf$4.noteMargin; + noteModel.stopx = noteModel.startx + rect2.width; + bounds$1.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy); + bounds$1.models.addNote(noteModel); + }; + const messageFont = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; + }; + const noteFont = (cnf) => { + return { + fontFamily: cnf.noteFontFamily, + fontSize: cnf.noteFontSize, + fontWeight: cnf.noteFontWeight + }; + }; + const actorFont = (cnf) => { + return { + fontFamily: cnf.actorFontFamily, + fontSize: cnf.actorFontSize, + fontWeight: cnf.actorFontWeight + }; + }; + function boundMessage(_diagram, msgModel) { + bounds$1.bumpVerticalPos(10); + const { startx, stopx, message } = msgModel; + const lines = common$1.splitBreaks(message).length; + const textDims = utils.calculateTextDimensions(message, messageFont(conf$4)); + const lineHeight = textDims.height / lines; + msgModel.height += lineHeight; + bounds$1.bumpVerticalPos(lineHeight); + let lineStartY; + let totalOffset = textDims.height - 10; + const textWidth = textDims.width; + if (startx === stopx) { + lineStartY = bounds$1.getVerticalPos() + totalOffset; + if (!conf$4.rightAngles) { + totalOffset += conf$4.boxMargin; + lineStartY = bounds$1.getVerticalPos() + totalOffset; + } + totalOffset += 30; + const dx = common$1.getMax(textWidth / 2, conf$4.width / 2); + bounds$1.insert( + startx - dx, + bounds$1.getVerticalPos() - 10 + totalOffset, + stopx + dx, + bounds$1.getVerticalPos() + 30 + totalOffset + ); + } else { + totalOffset += conf$4.boxMargin; + lineStartY = bounds$1.getVerticalPos() + totalOffset; + bounds$1.insert(startx, lineStartY - 10, stopx, lineStartY); + } + bounds$1.bumpVerticalPos(totalOffset); + msgModel.height += totalOffset; + msgModel.stopy = msgModel.starty + msgModel.height; + bounds$1.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy); + return lineStartY; + } + const drawMessage = function(diagram2, msgModel, lineStartY, diagObj) { + const { startx, stopx, starty, message, type: type2, sequenceIndex, sequenceVisible } = msgModel; + const textDims = utils.calculateTextDimensions(message, messageFont(conf$4)); + const textObj = getTextObj$2(); + textObj.x = startx; + textObj.y = starty + 10; + textObj.width = stopx - startx; + textObj.class = "messageText"; + textObj.dy = "1em"; + textObj.text = message; + textObj.fontFamily = conf$4.messageFontFamily; + textObj.fontSize = conf$4.messageFontSize; + textObj.fontWeight = conf$4.messageFontWeight; + textObj.anchor = conf$4.messageAlign; + textObj.valign = "center"; + textObj.textMargin = conf$4.wrapPadding; + textObj.tspan = false; + drawText$2(diagram2, textObj); + const textWidth = textDims.width; + let line2; + if (startx === stopx) { + if (conf$4.rightAngles) { + line2 = diagram2.append("path").attr( + "d", + `M ${startx},${lineStartY} H ${startx + common$1.getMax(conf$4.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}` + ); + } else { + line2 = diagram2.append("path").attr( + "d", + "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20) + ); + } + } else { + line2 = diagram2.append("line"); + line2.attr("x1", startx); + line2.attr("y1", lineStartY); + line2.attr("x2", stopx); + line2.attr("y2", lineStartY); + } + if (type2 === diagObj.db.LINETYPE.DOTTED || type2 === diagObj.db.LINETYPE.DOTTED_CROSS || type2 === diagObj.db.LINETYPE.DOTTED_POINT || type2 === diagObj.db.LINETYPE.DOTTED_OPEN) { + line2.style("stroke-dasharray", "3, 3"); + line2.attr("class", "messageLine1"); + } else { + line2.attr("class", "messageLine0"); + } + let url = ""; + if (conf$4.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + line2.attr("stroke-width", 2); + line2.attr("stroke", "none"); + line2.style("fill", "none"); + if (type2 === diagObj.db.LINETYPE.SOLID || type2 === diagObj.db.LINETYPE.DOTTED) { + line2.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (type2 === diagObj.db.LINETYPE.SOLID_POINT || type2 === diagObj.db.LINETYPE.DOTTED_POINT) { + line2.attr("marker-end", "url(" + url + "#filled-head)"); + } + if (type2 === diagObj.db.LINETYPE.SOLID_CROSS || type2 === diagObj.db.LINETYPE.DOTTED_CROSS) { + line2.attr("marker-end", "url(" + url + "#crosshead)"); + } + if (sequenceVisible || conf$4.showSequenceNumbers) { + line2.attr("marker-start", "url(" + url + "#sequencenumber)"); + diagram2.append("text").attr("x", startx).attr("y", lineStartY + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(sequenceIndex); + } + }; + const addActorRenderingData = function(diagram2, actors2, createdActors2, actorKeys, verticalPos, messages2, isFooter) { + let prevWidth = 0; + let prevMargin = 0; + let prevBox = void 0; + let maxHeight = 0; + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + const box = actor.box; + if (prevBox && prevBox != box) { + if (!isFooter) { + bounds$1.models.addBox(prevBox); + } + prevMargin += conf$4.boxMargin + prevBox.margin; + } + if (box && box != prevBox) { + if (!isFooter) { + box.x = prevWidth + prevMargin; + box.y = verticalPos; + } + prevMargin += box.margin; + } + actor.width = actor.width || conf$4.width; + actor.height = common$1.getMax(actor.height || conf$4.height, conf$4.height); + actor.margin = actor.margin || conf$4.actorMargin; + maxHeight = common$1.getMax(maxHeight, actor.height); + if (createdActors2[actor.name]) { + prevMargin += actor.width / 2; + } + actor.x = prevWidth + prevMargin; + actor.starty = bounds$1.getVerticalPos(); + bounds$1.insert(actor.x, verticalPos, actor.x + actor.width, actor.height); + prevWidth += actor.width + prevMargin; + if (actor.box) { + actor.box.width = prevWidth + box.margin - actor.box.x; + } + prevMargin = actor.margin; + prevBox = actor.box; + bounds$1.models.addActor(actor); + } + if (prevBox && !isFooter) { + bounds$1.models.addBox(prevBox); + } + bounds$1.bumpVerticalPos(maxHeight); + }; + const drawActors = function(diagram2, actors2, actorKeys, isFooter) { + if (!isFooter) { + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + svgDraw$4.drawActor(diagram2, actor, conf$4, false); + } + } else { + let maxHeight = 0; + bounds$1.bumpVerticalPos(conf$4.boxMargin * 2); + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + if (!actor.stopy) { + actor.stopy = bounds$1.getVerticalPos(); + } + const height = svgDraw$4.drawActor(diagram2, actor, conf$4, true); + maxHeight = common$1.getMax(maxHeight, height); + } + bounds$1.bumpVerticalPos(maxHeight + conf$4.boxMargin); + } + }; + const drawActorsPopup = function(diagram2, actors2, actorKeys, doc) { + let maxHeight = 0; + let maxWidth = 0; + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + const minMenuWidth = getRequiredPopupWidth(actor); + const menuDimensions = svgDraw$4.drawPopup( + diagram2, + actor, + minMenuWidth, + conf$4, + conf$4.forceMenus, + doc + ); + if (menuDimensions.height > maxHeight) { + maxHeight = menuDimensions.height; + } + if (menuDimensions.width + actor.x > maxWidth) { + maxWidth = menuDimensions.width + actor.x; + } + } + return { maxHeight, maxWidth }; + }; + const setConf$4 = function(cnf) { + assignWithDepth$1(conf$4, cnf); + if (cnf.fontFamily) { + conf$4.actorFontFamily = conf$4.noteFontFamily = conf$4.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf$4.actorFontSize = conf$4.noteFontSize = conf$4.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf$4.actorFontWeight = conf$4.noteFontWeight = conf$4.messageFontWeight = cnf.fontWeight; + } + }; + const actorActivations = function(actor) { + return bounds$1.activations.filter(function(activation) { + return activation.actor === actor; + }); + }; + const activationBounds = function(actor, actors2) { + const actorObj = actors2[actor]; + const activations = actorActivations(actor); + const left2 = activations.reduce(function(acc, activation) { + return common$1.getMin(acc, activation.startx); + }, actorObj.x + actorObj.width / 2 - 1); + const right2 = activations.reduce(function(acc, activation) { + return common$1.getMax(acc, activation.stopx); + }, actorObj.x + actorObj.width / 2 + 1); + return [left2, right2]; + }; + function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) { + bounds$1.bumpVerticalPos(preMargin); + let heightAdjust = postMargin; + if (msg.id && msg.message && loopWidths[msg.id]) { + const loopWidth = loopWidths[msg.id].width; + const textConf = messageFont(conf$4); + msg.message = utils.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf$4.wrapPadding, textConf); + msg.width = loopWidth; + msg.wrap = true; + const textDims = utils.calculateTextDimensions(msg.message, textConf); + const totalOffset = common$1.getMax(textDims.height, conf$4.labelBoxHeight); + heightAdjust = postMargin + totalOffset; + log$1.debug(`${totalOffset} - ${msg.message}`); + } + addLoopFn(msg); + bounds$1.bumpVerticalPos(heightAdjust); + } + function adjustCreatedDestroyedData(msg, msgModel, lineStartY, index2, actors2, createdActors2, destroyedActors2) { + function receiverAdjustment(actor, adjustment) { + if (actor.x < actors2[msg.from].x) { + bounds$1.insert( + msgModel.stopx - adjustment, + msgModel.starty, + msgModel.startx, + msgModel.stopy + actor.height / 2 + conf$4.noteMargin + ); + msgModel.stopx = msgModel.stopx + adjustment; + } else { + bounds$1.insert( + msgModel.startx, + msgModel.starty, + msgModel.stopx + adjustment, + msgModel.stopy + actor.height / 2 + conf$4.noteMargin + ); + msgModel.stopx = msgModel.stopx - adjustment; + } + } + function senderAdjustment(actor, adjustment) { + if (actor.x < actors2[msg.to].x) { + bounds$1.insert( + msgModel.startx - adjustment, + msgModel.starty, + msgModel.stopx, + msgModel.stopy + actor.height / 2 + conf$4.noteMargin + ); + msgModel.startx = msgModel.startx + adjustment; + } else { + bounds$1.insert( + msgModel.stopx, + msgModel.starty, + msgModel.startx + adjustment, + msgModel.stopy + actor.height / 2 + conf$4.noteMargin + ); + msgModel.startx = msgModel.startx - adjustment; + } + } + if (createdActors2[msg.to] == index2) { + const actor = actors2[msg.to]; + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + actor.starty = lineStartY - actor.height / 2; + bounds$1.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors2[msg.from] == index2) { + const actor = actors2[msg.from]; + if (conf$4.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2; + senderAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds$1.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors2[msg.to] == index2) { + const actor = actors2[msg.to]; + if (conf$4.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds$1.bumpVerticalPos(actor.height / 2); + } + } + const draw$9 = function(_text, id2, _version, diagObj) { + const { securityLevel, sequence: sequence2 } = getConfig$2(); + conf$4 = sequence2; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + bounds$1.init(); + log$1.debug(diagObj.db); + const diagram2 = securityLevel === "sandbox" ? root2.select(`[id="${id2}"]`) : d3select(`[id="${id2}"]`); + const actors2 = diagObj.db.getActors(); + const createdActors2 = diagObj.db.getCreatedActors(); + const destroyedActors2 = diagObj.db.getDestroyedActors(); + const boxes2 = diagObj.db.getBoxes(); + let actorKeys = diagObj.db.getActorKeys(); + const messages2 = diagObj.db.getMessages(); + const title2 = diagObj.db.getDiagramTitle(); + const hasBoxes = diagObj.db.hasAtLeastOneBox(); + const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle(); + const maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors2, messages2, diagObj); + conf$4.height = calculateActorMargins(actors2, maxMessageWidthPerActor, boxes2); + svgDraw$4.insertComputerIcon(diagram2); + svgDraw$4.insertDatabaseIcon(diagram2); + svgDraw$4.insertClockIcon(diagram2); + if (hasBoxes) { + bounds$1.bumpVerticalPos(conf$4.boxMargin); + if (hasBoxTitles) { + bounds$1.bumpVerticalPos(boxes2[0].textMaxHeight); + } + } + if (conf$4.hideUnusedParticipants === true) { + const newActors = /* @__PURE__ */ new Set(); + messages2.forEach((message) => { + newActors.add(message.from); + newActors.add(message.to); + }); + actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey)); + } + addActorRenderingData(diagram2, actors2, createdActors2, actorKeys, 0, messages2, false); + const loopWidths = calculateLoopBounds(messages2, actors2, maxMessageWidthPerActor, diagObj); + svgDraw$4.insertArrowHead(diagram2); + svgDraw$4.insertArrowCrossHead(diagram2); + svgDraw$4.insertArrowFilledHead(diagram2); + svgDraw$4.insertSequenceNumber(diagram2); + function activeEnd(msg, verticalPos) { + const activationData = bounds$1.endActivation(msg); + if (activationData.starty + 18 > verticalPos) { + activationData.starty = verticalPos - 6; + verticalPos += 12; + } + svgDraw$4.drawActivation( + diagram2, + activationData, + verticalPos, + conf$4, + actorActivations(msg.from.actor).length + ); + bounds$1.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos); + } + let sequenceIndex = 1; + let sequenceIndexStep = 1; + const messagesToDraw = []; + const backgrounds = []; + messages2.forEach(function(msg, index2) { + let loopModel, noteModel, msgModel; + switch (msg.type) { + case diagObj.db.LINETYPE.NOTE: + bounds$1.resetVerticalPos(); + noteModel = msg.noteModel; + drawNote$2(diagram2, noteModel); + break; + case diagObj.db.LINETYPE.ACTIVE_START: + bounds$1.newActivation(msg, diagram2, actors2); + break; + case diagObj.db.LINETYPE.ACTIVE_END: + activeEnd(msg, bounds$1.getVerticalPos()); + break; + case diagObj.db.LINETYPE.LOOP_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin + conf$4.boxTextMargin, + (message) => bounds$1.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.LOOP_END: + loopModel = bounds$1.endLoop(); + svgDraw$4.drawLoop(diagram2, loopModel, "loop", conf$4); + bounds$1.bumpVerticalPos(loopModel.stopy - bounds$1.getVerticalPos()); + bounds$1.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.RECT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin, + (message) => bounds$1.newLoop(void 0, message.message) + ); + break; + case diagObj.db.LINETYPE.RECT_END: + loopModel = bounds$1.endLoop(); + backgrounds.push(loopModel); + bounds$1.models.addLoop(loopModel); + bounds$1.bumpVerticalPos(loopModel.stopy - bounds$1.getVerticalPos()); + break; + case diagObj.db.LINETYPE.OPT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin + conf$4.boxTextMargin, + (message) => bounds$1.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.OPT_END: + loopModel = bounds$1.endLoop(); + svgDraw$4.drawLoop(diagram2, loopModel, "opt", conf$4); + bounds$1.bumpVerticalPos(loopModel.stopy - bounds$1.getVerticalPos()); + bounds$1.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.ALT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin + conf$4.boxTextMargin, + (message) => bounds$1.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin + conf$4.boxTextMargin, + conf$4.boxMargin, + (message) => bounds$1.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_END: + loopModel = bounds$1.endLoop(); + svgDraw$4.drawLoop(diagram2, loopModel, "alt", conf$4); + bounds$1.bumpVerticalPos(loopModel.stopy - bounds$1.getVerticalPos()); + bounds$1.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin + conf$4.boxTextMargin, + (message) => bounds$1.newLoop(message) + ); + bounds$1.saveVerticalPos(); + break; + case diagObj.db.LINETYPE.PAR_AND: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin + conf$4.boxTextMargin, + conf$4.boxMargin, + (message) => bounds$1.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.PAR_END: + loopModel = bounds$1.endLoop(); + svgDraw$4.drawLoop(diagram2, loopModel, "par", conf$4); + bounds$1.bumpVerticalPos(loopModel.stopy - bounds$1.getVerticalPos()); + bounds$1.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.AUTONUMBER: + sequenceIndex = msg.message.start || sequenceIndex; + sequenceIndexStep = msg.message.step || sequenceIndexStep; + if (msg.message.visible) { + diagObj.db.enableSequenceNumbers(); + } else { + diagObj.db.disableSequenceNumbers(); + } + break; + case diagObj.db.LINETYPE.CRITICAL_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin + conf$4.boxTextMargin, + (message) => bounds$1.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_OPTION: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin + conf$4.boxTextMargin, + conf$4.boxMargin, + (message) => bounds$1.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_END: + loopModel = bounds$1.endLoop(); + svgDraw$4.drawLoop(diagram2, loopModel, "critical", conf$4); + bounds$1.bumpVerticalPos(loopModel.stopy - bounds$1.getVerticalPos()); + bounds$1.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.BREAK_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin + conf$4.boxTextMargin, + (message) => bounds$1.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.BREAK_END: + loopModel = bounds$1.endLoop(); + svgDraw$4.drawLoop(diagram2, loopModel, "break", conf$4); + bounds$1.bumpVerticalPos(loopModel.stopy - bounds$1.getVerticalPos()); + bounds$1.models.addLoop(loopModel); + break; + default: + try { + msgModel = msg.msgModel; + msgModel.starty = bounds$1.getVerticalPos(); + msgModel.sequenceIndex = sequenceIndex; + msgModel.sequenceVisible = diagObj.db.showSequenceNumbers(); + const lineStartY = boundMessage(diagram2, msgModel); + adjustCreatedDestroyedData( + msg, + msgModel, + lineStartY, + index2, + actors2, + createdActors2, + destroyedActors2 + ); + messagesToDraw.push({ messageModel: msgModel, lineStartY }); + bounds$1.models.addMessage(msgModel); + } catch (e) { + log$1.error("error while drawing message", e); + } + } + if ([ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + sequenceIndex = sequenceIndex + sequenceIndexStep; + } + }); + log$1.debug("createdActors", createdActors2); + log$1.debug("destroyedActors", destroyedActors2); + drawActors(diagram2, actors2, actorKeys, false); + messagesToDraw.forEach((e) => drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj)); + if (conf$4.mirrorActors) { + drawActors(diagram2, actors2, actorKeys, true); + } + backgrounds.forEach((e) => svgDraw$4.drawBackgroundRect(diagram2, e)); + fixLifeLineHeights(diagram2, actors2, actorKeys, conf$4); + bounds$1.models.boxes.forEach(function(box2) { + box2.height = bounds$1.getVerticalPos() - box2.y; + bounds$1.insert(box2.x, box2.y, box2.x + box2.width, box2.height); + box2.startx = box2.x; + box2.starty = box2.y; + box2.stopx = box2.startx + box2.width; + box2.stopy = box2.starty + box2.height; + box2.stroke = "rgb(0,0,0, 0.5)"; + svgDraw$4.drawBox(diagram2, box2, conf$4); + }); + if (hasBoxes) { + bounds$1.bumpVerticalPos(conf$4.boxMargin); + } + const requiredBoxSize = drawActorsPopup(diagram2, actors2, actorKeys, doc); + const { bounds: box } = bounds$1.getBounds(); + let boxHeight = box.stopy - box.starty; + if (boxHeight < requiredBoxSize.maxHeight) { + boxHeight = requiredBoxSize.maxHeight; + } + let height = boxHeight + 2 * conf$4.diagramMarginY; + if (conf$4.mirrorActors) { + height = height - conf$4.boxMargin + conf$4.bottomMarginAdj; + } + let boxWidth = box.stopx - box.startx; + if (boxWidth < requiredBoxSize.maxWidth) { + boxWidth = requiredBoxSize.maxWidth; + } + const width2 = boxWidth + 2 * conf$4.diagramMarginX; + if (title2) { + diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 2 * conf$4.diagramMarginX).attr("y", -25); + } + configureSvgSize(diagram2, height, width2, conf$4.useMaxWidth); + const extraVertForTitle = title2 ? 40 : 0; + diagram2.attr( + "viewBox", + box.startx - conf$4.diagramMarginX + " -" + (conf$4.diagramMarginY + extraVertForTitle) + " " + width2 + " " + (height + extraVertForTitle) + ); + log$1.debug(`models:`, bounds$1.models); + }; + function getMaxMessageWidthPerActor(actors2, messages2, diagObj) { + const maxMessageWidthPerActor = {}; + messages2.forEach(function(msg) { + if (actors2[msg.to] && actors2[msg.from]) { + const actor = actors2[msg.to]; + if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) { + return; + } + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) { + return; + } + const isNote = msg.placement !== void 0; + const isMessage = !isNote; + const textFont = isNote ? noteFont(conf$4) : messageFont(conf$4); + const wrappedMessage = msg.wrap ? utils.wrapLabel(msg.message, conf$4.width - 2 * conf$4.wrapPadding, textFont) : msg.message; + const messageDimensions = utils.calculateTextDimensions(wrappedMessage, textFont); + const messageWidth = messageDimensions.width + 2 * conf$4.wrapPadding; + if (isMessage && msg.from === actor.nextActor) { + maxMessageWidthPerActor[msg.to] = common$1.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth + ); + } else if (isMessage && msg.from === actor.prevActor) { + maxMessageWidthPerActor[msg.from] = common$1.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (isMessage && msg.from === msg.to) { + maxMessageWidthPerActor[msg.from] = common$1.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + maxMessageWidthPerActor[msg.to] = common$1.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth / 2 + ); + } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + maxMessageWidthPerActor[msg.from] = common$1.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + maxMessageWidthPerActor[actor.prevActor] = common$1.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.OVER) { + if (actor.prevActor) { + maxMessageWidthPerActor[actor.prevActor] = common$1.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth / 2 + ); + } + if (actor.nextActor) { + maxMessageWidthPerActor[msg.from] = common$1.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + } + } + } + }); + log$1.debug("maxMessageWidthPerActor:", maxMessageWidthPerActor); + return maxMessageWidthPerActor; + } + const getRequiredPopupWidth = function(actor) { + let requiredPopupWidth = 0; + const textFont = actorFont(conf$4); + for (const key in actor.links) { + const labelDimensions = utils.calculateTextDimensions(key, textFont); + const labelWidth = labelDimensions.width + 2 * conf$4.wrapPadding + 2 * conf$4.boxMargin; + if (requiredPopupWidth < labelWidth) { + requiredPopupWidth = labelWidth; + } + } + return requiredPopupWidth; + }; + function calculateActorMargins(actors2, actorToMessageWidth, boxes2) { + let maxHeight = 0; + Object.keys(actors2).forEach((prop) => { + const actor = actors2[prop]; + if (actor.wrap) { + actor.description = utils.wrapLabel( + actor.description, + conf$4.width - 2 * conf$4.wrapPadding, + actorFont(conf$4) + ); + } + const actDims = utils.calculateTextDimensions(actor.description, actorFont(conf$4)); + actor.width = actor.wrap ? conf$4.width : common$1.getMax(conf$4.width, actDims.width + 2 * conf$4.wrapPadding); + actor.height = actor.wrap ? common$1.getMax(actDims.height, conf$4.height) : conf$4.height; + maxHeight = common$1.getMax(maxHeight, actor.height); + }); + for (const actorKey in actorToMessageWidth) { + const actor = actors2[actorKey]; + if (!actor) { + continue; + } + const nextActor = actors2[actor.nextActor]; + if (!nextActor) { + const messageWidth2 = actorToMessageWidth[actorKey]; + const actorWidth2 = messageWidth2 + conf$4.actorMargin - actor.width / 2; + actor.margin = common$1.getMax(actorWidth2, conf$4.actorMargin); + continue; + } + const messageWidth = actorToMessageWidth[actorKey]; + const actorWidth = messageWidth + conf$4.actorMargin - actor.width / 2 - nextActor.width / 2; + actor.margin = common$1.getMax(actorWidth, conf$4.actorMargin); + } + let maxBoxHeight = 0; + boxes2.forEach((box) => { + const textFont = messageFont(conf$4); + let totalWidth = box.actorKeys.reduce((total, aKey) => { + return total += actors2[aKey].width + (actors2[aKey].margin || 0); + }, 0); + totalWidth -= 2 * conf$4.boxTextMargin; + if (box.wrap) { + box.name = utils.wrapLabel(box.name, totalWidth - 2 * conf$4.wrapPadding, textFont); + } + const boxMsgDimensions = utils.calculateTextDimensions(box.name, textFont); + maxBoxHeight = common$1.getMax(boxMsgDimensions.height, maxBoxHeight); + const minWidth = common$1.getMax(totalWidth, boxMsgDimensions.width + 2 * conf$4.wrapPadding); + box.margin = conf$4.boxTextMargin; + if (totalWidth < minWidth) { + const missing = (minWidth - totalWidth) / 2; + box.margin += missing; + } + }); + boxes2.forEach((box) => box.textMaxHeight = maxBoxHeight); + return common$1.getMax(maxHeight, conf$4.height); + } + const buildNoteModel = function(msg, actors2, diagObj) { + const startx = actors2[msg.from].x; + const stopx = actors2[msg.to].x; + const shouldWrap = msg.wrap && msg.message; + let textDimensions = utils.calculateTextDimensions( + shouldWrap ? utils.wrapLabel(msg.message, conf$4.width, noteFont(conf$4)) : msg.message, + noteFont(conf$4) + ); + const noteModel = { + width: shouldWrap ? conf$4.width : common$1.getMax(conf$4.width, textDimensions.width + 2 * conf$4.noteMargin), + height: 0, + startx: actors2[msg.from].x, + stopx: 0, + starty: 0, + stopy: 0, + message: msg.message + }; + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + noteModel.width = shouldWrap ? common$1.getMax(conf$4.width, textDimensions.width) : common$1.getMax( + actors2[msg.from].width / 2 + actors2[msg.to].width / 2, + textDimensions.width + 2 * conf$4.noteMargin + ); + noteModel.startx = startx + (actors2[msg.from].width + conf$4.actorMargin) / 2; + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + noteModel.width = shouldWrap ? common$1.getMax(conf$4.width, textDimensions.width + 2 * conf$4.noteMargin) : common$1.getMax( + actors2[msg.from].width / 2 + actors2[msg.to].width / 2, + textDimensions.width + 2 * conf$4.noteMargin + ); + noteModel.startx = startx - noteModel.width + (actors2[msg.from].width - conf$4.actorMargin) / 2; + } else if (msg.to === msg.from) { + textDimensions = utils.calculateTextDimensions( + shouldWrap ? utils.wrapLabel( + msg.message, + common$1.getMax(conf$4.width, actors2[msg.from].width), + noteFont(conf$4) + ) : msg.message, + noteFont(conf$4) + ); + noteModel.width = shouldWrap ? common$1.getMax(conf$4.width, actors2[msg.from].width) : common$1.getMax( + actors2[msg.from].width, + conf$4.width, + textDimensions.width + 2 * conf$4.noteMargin + ); + noteModel.startx = startx + (actors2[msg.from].width - noteModel.width) / 2; + } else { + noteModel.width = Math.abs(startx + actors2[msg.from].width / 2 - (stopx + actors2[msg.to].width / 2)) + conf$4.actorMargin; + noteModel.startx = startx < stopx ? startx + actors2[msg.from].width / 2 - conf$4.actorMargin / 2 : stopx + actors2[msg.to].width / 2 - conf$4.actorMargin / 2; + } + if (shouldWrap) { + noteModel.message = utils.wrapLabel( + msg.message, + noteModel.width - 2 * conf$4.wrapPadding, + noteFont(conf$4) + ); + } + log$1.debug( + `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]` + ); + return noteModel; + }; + const buildMessageModel = function(msg, actors2, diagObj) { + if (![ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + return {}; + } + const [fromLeft, fromRight] = activationBounds(msg.from, actors2); + const [toLeft, toRight] = activationBounds(msg.to, actors2); + const isArrowToRight = fromLeft <= toLeft; + const startx = isArrowToRight ? fromRight : fromLeft; + let stopx = isArrowToRight ? toLeft : toRight; + const isArrowToActivation = Math.abs(toLeft - toRight) > 2; + const adjustValue = (value2) => { + return isArrowToRight ? -value2 : value2; + }; + if (msg.from === msg.to) { + stopx = startx; + } else { + if (msg.activate && !isArrowToActivation) { + stopx += adjustValue(conf$4.activationWidth / 2 - 1); + } + if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) { + stopx += adjustValue(3); + } + } + const allBounds = [fromLeft, fromRight, toLeft, toRight]; + const boundedWidth = Math.abs(startx - stopx); + if (msg.wrap && msg.message) { + msg.message = utils.wrapLabel( + msg.message, + common$1.getMax(boundedWidth + 2 * conf$4.wrapPadding, conf$4.width), + messageFont(conf$4) + ); + } + const msgDims = utils.calculateTextDimensions(msg.message, messageFont(conf$4)); + return { + width: common$1.getMax( + msg.wrap ? 0 : msgDims.width + 2 * conf$4.wrapPadding, + boundedWidth + 2 * conf$4.wrapPadding, + conf$4.width + ), + height: 0, + startx, + stopx, + starty: 0, + stopy: 0, + message: msg.message, + type: msg.type, + wrap: msg.wrap, + fromBounds: Math.min.apply(null, allBounds), + toBounds: Math.max.apply(null, allBounds) + }; + }; + const calculateLoopBounds = function(messages2, actors2, _maxWidthPerActor, diagObj) { + const loops = {}; + const stack = []; + let current, noteModel, msgModel; + messages2.forEach(function(msg) { + msg.id = utils.random({ length: 10 }); + switch (msg.type) { + case diagObj.db.LINETYPE.LOOP_START: + case diagObj.db.LINETYPE.ALT_START: + case diagObj.db.LINETYPE.OPT_START: + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + case diagObj.db.LINETYPE.CRITICAL_START: + case diagObj.db.LINETYPE.BREAK_START: + stack.push({ + id: msg.id, + msg: msg.message, + from: Number.MAX_SAFE_INTEGER, + to: Number.MIN_SAFE_INTEGER, + width: 0 + }); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + case diagObj.db.LINETYPE.PAR_AND: + case diagObj.db.LINETYPE.CRITICAL_OPTION: + if (msg.message) { + current = stack.pop(); + loops[current.id] = current; + loops[msg.id] = current; + stack.push(current); + } + break; + case diagObj.db.LINETYPE.LOOP_END: + case diagObj.db.LINETYPE.ALT_END: + case diagObj.db.LINETYPE.OPT_END: + case diagObj.db.LINETYPE.PAR_END: + case diagObj.db.LINETYPE.CRITICAL_END: + case diagObj.db.LINETYPE.BREAK_END: + current = stack.pop(); + loops[current.id] = current; + break; + case diagObj.db.LINETYPE.ACTIVE_START: + { + const actorRect = actors2[msg.from ? msg.from.actor : msg.to.actor]; + const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length; + const x2 = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf$4.activationWidth / 2; + const toAdd = { + startx: x2, + stopx: x2 + conf$4.activationWidth, + actor: msg.from.actor, + enabled: true + }; + bounds$1.activations.push(toAdd); + } + break; + case diagObj.db.LINETYPE.ACTIVE_END: + { + const lastActorActivationIdx = bounds$1.activations.map((a) => a.actor).lastIndexOf(msg.from.actor); + delete bounds$1.activations.splice(lastActorActivationIdx, 1)[0]; + } + break; + } + const isNote = msg.placement !== void 0; + if (isNote) { + noteModel = buildNoteModel(msg, actors2, diagObj); + msg.noteModel = noteModel; + stack.forEach((stk) => { + current = stk; + current.from = common$1.getMin(current.from, noteModel.startx); + current.to = common$1.getMax(current.to, noteModel.startx + noteModel.width); + current.width = common$1.getMax(current.width, Math.abs(current.from - current.to)) - conf$4.labelBoxWidth; + }); + } else { + msgModel = buildMessageModel(msg, actors2, diagObj); + msg.msgModel = msgModel; + if (msgModel.startx && msgModel.stopx && stack.length > 0) { + stack.forEach((stk) => { + current = stk; + if (msgModel.startx === msgModel.stopx) { + const from2 = actors2[msg.from]; + const to = actors2[msg.to]; + current.from = common$1.getMin( + from2.x - msgModel.width / 2, + from2.x - from2.width / 2, + current.from + ); + current.to = common$1.getMax( + to.x + msgModel.width / 2, + to.x + from2.width / 2, + current.to + ); + current.width = common$1.getMax(current.width, Math.abs(current.to - current.from)) - conf$4.labelBoxWidth; + } else { + current.from = common$1.getMin(msgModel.startx, current.from); + current.to = common$1.getMax(msgModel.stopx, current.to); + current.width = common$1.getMax(current.width, msgModel.width) - conf$4.labelBoxWidth; + } + }); + } + } + }); + bounds$1.activations = []; + log$1.debug("Loop type widths:", loops); + return loops; + }; + const renderer$8 = { + bounds: bounds$1, + drawActors, + drawActorsPopup, + setConf: setConf$4, + draw: draw$9 + }; + const diagram$9 = { + parser: parser$c, + db: db$5, + renderer: renderer$8, + styles: styles$5, + init: ({ wrap: wrap2 }) => { + db$5.setWrap(wrap2); + } + }; + const sequenceDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$9 + }, Symbol.toStringTag, { value: "Module" })); + var parser$9 = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 16], $V1 = [1, 17], $V2 = [1, 18], $V3 = [1, 37], $V4 = [1, 38], $V5 = [1, 24], $V6 = [1, 22], $V7 = [1, 23], $V8 = [1, 29], $V9 = [1, 30], $Va = [1, 31], $Vb = [1, 32], $Vc = [1, 33], $Vd = [1, 34], $Ve = [1, 25], $Vf = [1, 26], $Vg = [1, 27], $Vh = [1, 28], $Vi = [1, 42], $Vj = [1, 39], $Vk = [1, 40], $Vl = [1, 41], $Vm = [1, 43], $Vn = [1, 9], $Vo = [1, 8, 9], $Vp = [1, 54], $Vq = [1, 55], $Vr = [1, 56], $Vs = [1, 57], $Vt = [1, 58], $Vu = [1, 59], $Vv = [1, 60], $Vw = [1, 8, 9, 38], $Vx = [1, 71], $Vy = [1, 8, 9, 12, 13, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], $Vz = [1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 45, 58, 59, 60, 61, 62, 63, 64, 69, 71, 84, 86, 87, 88, 89], $VA = [13, 84, 86, 87, 88, 89], $VB = [13, 63, 64, 84, 86, 87, 88, 89], $VC = [13, 58, 59, 60, 61, 62, 84, 86, 87, 88, 89], $VD = [1, 90], $VE = [1, 8, 9, 36, 38, 41], $VF = [1, 8, 9, 21]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "cssClassStatement": 27, "noteStatement": 28, "direction": 29, "acc_title": 30, "acc_title_value": 31, "acc_descr": 32, "acc_descr_value": 33, "acc_descr_multiline_value": 34, "namespaceIdentifier": 35, "STRUCT_START": 36, "classStatements": 37, "STRUCT_STOP": 38, "NAMESPACE": 39, "classIdentifier": 40, "STYLE_SEPARATOR": 41, "members": 42, "CLASS": 43, "ANNOTATION_START": 44, "ANNOTATION_END": 45, "MEMBER": 46, "SEPARATOR": 47, "relation": 48, "NOTE_FOR": 49, "noteText": 50, "NOTE": 51, "direction_tb": 52, "direction_bt": 53, "direction_rl": 54, "direction_lr": 55, "relationType": 56, "lineType": 57, "AGGREGATION": 58, "EXTENSION": 59, "COMPOSITION": 60, "DEPENDENCY": 61, "LOLLIPOP": 62, "LINE": 63, "DOTTED_LINE": 64, "CALLBACK": 65, "LINK": 66, "LINK_TARGET": 67, "CLICK": 68, "CALLBACK_NAME": 69, "CALLBACK_ARGS": 70, "HREF": 71, "CSSCLASS": 72, "commentToken": 73, "textToken": 74, "graphCodeTokens": 75, "textNoTagsToken": 76, "TAGSTART": 77, "TAGEND": 78, "==": 79, "--": 80, "PCT": 81, "DEFAULT": 82, "SPACE": 83, "MINUS": 84, "keywords": 85, "UNICODE_TEXT": 86, "NUM": 87, "ALPHA": 88, "BQUOTE_STR": 89, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 30: "acc_title", 31: "acc_title_value", 32: "acc_descr", 33: "acc_descr_value", 34: "acc_descr_multiline_value", 36: "STRUCT_START", 38: "STRUCT_STOP", 39: "NAMESPACE", 41: "STYLE_SEPARATOR", 43: "CLASS", 44: "ANNOTATION_START", 45: "ANNOTATION_END", 46: "MEMBER", 47: "SEPARATOR", 49: "NOTE_FOR", 51: "NOTE", 52: "direction_tb", 53: "direction_bt", 54: "direction_rl", 55: "direction_lr", 58: "AGGREGATION", 59: "EXTENSION", 60: "COMPOSITION", 61: "DEPENDENCY", 62: "LOLLIPOP", 63: "LINE", 64: "DOTTED_LINE", 65: "CALLBACK", 66: "LINK", 67: "LINK_TARGET", 68: "CLICK", 69: "CALLBACK_NAME", 70: "CALLBACK_ARGS", 71: "HREF", 72: "CSSCLASS", 75: "graphCodeTokens", 77: "TAGSTART", 78: "TAGEND", 79: "==", 80: "--", 81: "PCT", 82: "DEFAULT", 83: "SPACE", 84: "MINUS", 85: "keywords", 86: "UNICODE_TEXT", 87: "NUM", 88: "ALPHA", 89: "BQUOTE_STR" }, + productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [35, 2], [37, 1], [37, 2], [37, 3], [23, 1], [23, 3], [23, 4], [23, 6], [40, 2], [40, 3], [25, 4], [42, 1], [42, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [28, 3], [28, 2], [29, 1], [29, 1], [29, 1], [29, 1], [48, 3], [48, 2], [48, 2], [48, 1], [56, 1], [56, 1], [56, 1], [56, 1], [56, 1], [57, 1], [57, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [73, 1], [73, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [76, 1], [76, 1], [76, 1], [76, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [50, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 8: + this.$ = $$[$0 - 1]; + break; + case 9: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 10: + case 13: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 14: + case 15: + this.$ = $$[$0 - 1] + "~" + $$[$0] + "~"; + break; + case 16: + yy.addRelation($$[$0]); + break; + case 17: + $$[$0 - 1].title = yy.cleanupLabel($$[$0]); + yy.addRelation($$[$0 - 1]); + break; + case 26: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 27: + case 28: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 29: + yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]); + break; + case 30: + yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]); + break; + case 31: + this.$ = $$[$0]; + yy.addNamespace($$[$0]); + break; + case 32: + this.$ = [$$[$0]]; + break; + case 33: + this.$ = [$$[$0 - 1]]; + break; + case 34: + $$[$0].unshift($$[$0 - 2]); + this.$ = $$[$0]; + break; + case 36: + yy.setCssClass($$[$0 - 2], $$[$0]); + break; + case 37: + yy.addMembers($$[$0 - 3], $$[$0 - 1]); + break; + case 38: + yy.setCssClass($$[$0 - 5], $$[$0 - 3]); + yy.addMembers($$[$0 - 5], $$[$0 - 1]); + break; + case 39: + this.$ = $$[$0]; + yy.addClass($$[$0]); + break; + case 40: + this.$ = $$[$0 - 1]; + yy.addClass($$[$0 - 1]); + yy.setClassLabel($$[$0 - 1], $$[$0]); + break; + case 41: + yy.addAnnotation($$[$0], $$[$0 - 2]); + break; + case 42: + this.$ = [$$[$0]]; + break; + case 43: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 44: + break; + case 45: + yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0])); + break; + case 46: + break; + case 47: + break; + case 48: + this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" }; + break; + case 49: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" }; + break; + case 50: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] }; + break; + case 51: + this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] }; + break; + case 52: + yy.addNote($$[$0], $$[$0 - 1]); + break; + case 53: + yy.addNote($$[$0]); + break; + case 54: + yy.setDirection("TB"); + break; + case 55: + yy.setDirection("BT"); + break; + case 56: + yy.setDirection("RL"); + break; + case 57: + yy.setDirection("LR"); + break; + case 58: + this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 59: + this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 60: + this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] }; + break; + case 61: + this.$ = { type1: "none", type2: "none", lineType: $$[$0] }; + break; + case 62: + this.$ = yy.relationType.AGGREGATION; + break; + case 63: + this.$ = yy.relationType.EXTENSION; + break; + case 64: + this.$ = yy.relationType.COMPOSITION; + break; + case 65: + this.$ = yy.relationType.DEPENDENCY; + break; + case 66: + this.$ = yy.relationType.LOLLIPOP; + break; + case 67: + this.$ = yy.lineType.LINE; + break; + case 68: + this.$ = yy.lineType.DOTTED_LINE; + break; + case 69: + case 75: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 70: + case 76: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 71: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 72: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 73: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 74: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 3], $$[$0 - 1]); + break; + case 77: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 78: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 79: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 80: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 81: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 82: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 4], $$[$0 - 1]); + break; + case 83: + yy.setCssClass($$[$0 - 1], $$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: $V0, 32: $V1, 34: $V2, 35: 20, 39: $V3, 40: 21, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vn, [2, 5], { 8: [1, 44] }), { 8: [1, 45] }, o($Vo, [2, 16], { 21: [1, 46] }), o($Vo, [2, 18]), o($Vo, [2, 19]), o($Vo, [2, 20]), o($Vo, [2, 21]), o($Vo, [2, 22]), o($Vo, [2, 23]), o($Vo, [2, 24]), o($Vo, [2, 25]), { 31: [1, 47] }, { 33: [1, 48] }, o($Vo, [2, 28]), o($Vo, [2, 44], { 48: 49, 56: 52, 57: 53, 13: [1, 50], 21: [1, 51], 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv }), { 36: [1, 61] }, o($Vw, [2, 35], { 36: [1, 63], 41: [1, 62] }), o($Vo, [2, 46]), o($Vo, [2, 47]), { 16: 64, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 16: 35, 17: 65, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 16: 35, 17: 66, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 16: 35, 17: 67, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: [1, 68] }, { 16: 35, 17: 69, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: $Vx, 50: 70 }, o($Vo, [2, 54]), o($Vo, [2, 55]), o($Vo, [2, 56]), o($Vo, [2, 57]), o($Vy, [2, 11], { 16: 35, 18: 36, 17: 72, 19: [1, 73], 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }), o($Vy, [2, 12], { 19: [1, 74] }), { 15: 75, 16: 76, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 16: 35, 17: 77, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vz, [2, 97]), o($Vz, [2, 98]), o($Vz, [2, 99]), o($Vz, [2, 100]), o([1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], [2, 101]), o($Vn, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 17: 19, 35: 20, 40: 21, 16: 35, 18: 36, 5: 78, 30: $V0, 32: $V1, 34: $V2, 39: $V3, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }), { 5: 79, 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: $V0, 32: $V1, 34: $V2, 35: 20, 39: $V3, 40: 21, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vo, [2, 17]), o($Vo, [2, 26]), o($Vo, [2, 27]), { 13: [1, 81], 16: 35, 17: 80, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 48: 82, 56: 52, 57: 53, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv }, o($Vo, [2, 45]), { 57: 83, 63: $Vu, 64: $Vv }, o($VA, [2, 61], { 56: 84, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt }), o($VB, [2, 62]), o($VB, [2, 63]), o($VB, [2, 64]), o($VB, [2, 65]), o($VB, [2, 66]), o($VC, [2, 67]), o($VC, [2, 68]), { 8: [1, 86], 23: 87, 37: 85, 40: 21, 43: $V4 }, { 16: 88, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 42: 89, 46: $VD }, { 45: [1, 91] }, { 13: [1, 92] }, { 13: [1, 93] }, { 69: [1, 94], 71: [1, 95] }, { 16: 96, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 13: $Vx, 50: 97 }, o($Vo, [2, 53]), o($Vo, [2, 102]), o($Vy, [2, 13]), o($Vy, [2, 14]), o($Vy, [2, 15]), { 36: [2, 31] }, { 15: 98, 16: 76, 36: [2, 9], 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, o($VE, [2, 39], { 11: 99, 12: [1, 100] }), o($Vn, [2, 7]), { 9: [1, 101] }, o($VF, [2, 48]), { 16: 35, 17: 102, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: [1, 104], 16: 35, 17: 103, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($VA, [2, 60], { 56: 105, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt }), o($VA, [2, 59]), { 38: [1, 106] }, { 23: 87, 37: 107, 40: 21, 43: $V4 }, { 8: [1, 108], 38: [2, 32] }, o($Vw, [2, 36], { 36: [1, 109] }), { 38: [1, 110] }, { 38: [2, 42], 42: 111, 46: $VD }, { 16: 35, 17: 112, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vo, [2, 69], { 13: [1, 113] }), o($Vo, [2, 71], { 13: [1, 115], 67: [1, 114] }), o($Vo, [2, 75], { 13: [1, 116], 70: [1, 117] }), { 13: [1, 118] }, o($Vo, [2, 83]), o($Vo, [2, 52]), { 36: [2, 10] }, o($VE, [2, 40]), { 13: [1, 119] }, { 1: [2, 4] }, o($VF, [2, 50]), o($VF, [2, 49]), { 16: 35, 17: 120, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($VA, [2, 58]), o($Vo, [2, 29]), { 38: [1, 121] }, { 23: 87, 37: 122, 38: [2, 33], 40: 21, 43: $V4 }, { 42: 123, 46: $VD }, o($Vw, [2, 37]), { 38: [2, 43] }, o($Vo, [2, 41]), o($Vo, [2, 70]), o($Vo, [2, 72]), o($Vo, [2, 73], { 67: [1, 124] }), o($Vo, [2, 76]), o($Vo, [2, 77], { 13: [1, 125] }), o($Vo, [2, 79], { 13: [1, 127], 67: [1, 126] }), { 14: [1, 128] }, o($VF, [2, 51]), o($Vo, [2, 30]), { 38: [2, 34] }, { 38: [1, 129] }, o($Vo, [2, 74]), o($Vo, [2, 78]), o($Vo, [2, 80]), o($Vo, [2, 81], { 67: [1, 130] }), o($VE, [2, 8]), o($Vw, [2, 38]), o($Vo, [2, 82])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 75: [2, 31], 98: [2, 10], 101: [2, 4], 111: [2, 43], 122: [2, 34] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 52; + case 1: + return 53; + case 2: + return 54; + case 3: + return 55; + case 4: + break; + case 5: + break; + case 6: + this.begin("acc_title"); + return 30; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 32; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 8; + case 14: + break; + case 15: + return 7; + case 16: + return 7; + case 17: + return "EDGE_STATE"; + case 18: + this.begin("callback_name"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callback_args"); + break; + case 21: + return 69; + case 22: + this.popState(); + break; + case 23: + return 70; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("string"); + break; + case 27: + this.begin("namespace"); + return 39; + case 28: + this.popState(); + return 8; + case 29: + break; + case 30: + this.begin("namespace-body"); + return 36; + case 31: + this.popState(); + return 38; + case 32: + return "EOF_IN_STRUCT"; + case 33: + return 8; + case 34: + break; + case 35: + return "EDGE_STATE"; + case 36: + this.begin("class"); + return 43; + case 37: + this.popState(); + return 8; + case 38: + break; + case 39: + this.popState(); + this.popState(); + return 38; + case 40: + this.begin("class-body"); + return 36; + case 41: + this.popState(); + return 38; + case 42: + return "EOF_IN_STRUCT"; + case 43: + return "EDGE_STATE"; + case 44: + return "OPEN_IN_STRUCT"; + case 45: + break; + case 46: + return "MEMBER"; + case 47: + return 72; + case 48: + return 65; + case 49: + return 66; + case 50: + return 68; + case 51: + return 49; + case 52: + return 51; + case 53: + return 44; + case 54: + return 45; + case 55: + return 71; + case 56: + this.popState(); + break; + case 57: + return "GENERICTYPE"; + case 58: + this.begin("generic"); + break; + case 59: + this.popState(); + break; + case 60: + return "BQUOTE_STR"; + case 61: + this.begin("bqstring"); + break; + case 62: + return 67; + case 63: + return 67; + case 64: + return 67; + case 65: + return 67; + case 66: + return 59; + case 67: + return 59; + case 68: + return 61; + case 69: + return 61; + case 70: + return 60; + case 71: + return 58; + case 72: + return 62; + case 73: + return 63; + case 74: + return 64; + case 75: + return 21; + case 76: + return 41; + case 77: + return 84; + case 78: + return "DOT"; + case 79: + return "PLUS"; + case 80: + return 81; + case 81: + return "EQUALS"; + case 82: + return "EQUALS"; + case 83: + return 88; + case 84: + return 12; + case 85: + return 14; + case 86: + return "PUNCTUATION"; + case 87: + return 87; + case 88: + return 86; + case 89: + return 83; + case 90: + return 9; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:$)/], + conditions: { "namespace-body": { "rules": [26, 31, 32, 33, 34, 35, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "namespace": { "rules": [26, 27, 28, 29, 30, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "class-body": { "rules": [26, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "class": { "rules": [26, 37, 38, 39, 40, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_descr": { "rules": [9, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_title": { "rules": [7, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "href": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "struct": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "generic": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "bqstring": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "string": { "rules": [24, 25, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$9.parser = parser$9; + const parser$a = parser$9; + const visibilityValues = ["#", "+", "~", "-", ""]; + class ClassMember { + constructor(input, memberType) { + this.memberType = memberType; + this.visibility = ""; + this.classifier = ""; + const sanitizedInput = sanitizeText$6(input, getConfig$2()); + this.parseMember(sanitizedInput); + } + getDisplayDetails() { + let displayText = this.visibility + parseGenericTypes(this.id); + if (this.memberType === "method") { + displayText += `(${parseGenericTypes(this.parameters.trim())})`; + if (this.returnType) { + displayText += " : " + parseGenericTypes(this.returnType); + } + } + displayText = displayText.trim(); + const cssStyle = this.parseClassifier(); + return { + displayText, + cssStyle + }; + } + parseMember(input) { + let potentialClassifier = ""; + if (this.memberType === "method") { + const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/; + const match = input.match(methodRegEx); + if (match) { + const detectedVisibility = match[1] ? match[1].trim() : ""; + if (visibilityValues.includes(detectedVisibility)) { + this.visibility = detectedVisibility; + } + this.id = match[2].trim(); + this.parameters = match[3] ? match[3].trim() : ""; + potentialClassifier = match[4] ? match[4].trim() : ""; + this.returnType = match[5] ? match[5].trim() : ""; + if (potentialClassifier === "") { + const lastChar = this.returnType.substring(this.returnType.length - 1); + if (lastChar.match(/[$*]/)) { + potentialClassifier = lastChar; + this.returnType = this.returnType.substring(0, this.returnType.length - 1); + } + } + } + } else { + const length2 = input.length; + const firstChar = input.substring(0, 1); + const lastChar = input.substring(length2 - 1); + if (visibilityValues.includes(firstChar)) { + this.visibility = firstChar; + } + if (lastChar.match(/[*?]/)) { + potentialClassifier = lastChar; + } + this.id = input.substring( + this.visibility === "" ? 0 : 1, + potentialClassifier === "" ? length2 : length2 - 1 + ); + } + this.classifier = potentialClassifier; + } + parseClassifier() { + switch (this.classifier) { + case "*": + return "font-style:italic;"; + case "$": + return "text-decoration:underline;"; + default: + return ""; + } + } + } + const MERMAID_DOM_ID_PREFIX = "classId-"; + let relations = []; + let classes$1 = {}; + let notes = []; + let classCounter = 0; + let namespaces = {}; + let namespaceCounter = 0; + let functions = []; + const sanitizeText$2 = (txt) => common$1.sanitizeText(txt, getConfig$2()); + const splitClassNameAndType = function(_id) { + const id2 = common$1.sanitizeText(_id, getConfig$2()); + let genericType = ""; + let className = id2; + if (id2.indexOf("~") > 0) { + const split = id2.split("~"); + className = sanitizeText$2(split[0]); + genericType = sanitizeText$2(split[1]); + } + return { className, type: genericType }; + }; + const setClassLabel = function(_id, label) { + const id2 = common$1.sanitizeText(_id, getConfig$2()); + if (label) { + label = sanitizeText$2(label); + } + const { className } = splitClassNameAndType(id2); + classes$1[className].label = label; + }; + const addClass = function(_id) { + const id2 = common$1.sanitizeText(_id, getConfig$2()); + const { className, type: type2 } = splitClassNameAndType(id2); + if (Object.hasOwn(classes$1, className)) { + return; + } + const name2 = common$1.sanitizeText(className, getConfig$2()); + classes$1[name2] = { + id: name2, + type: type2, + label: name2, + cssClasses: [], + methods: [], + members: [], + annotations: [], + domId: MERMAID_DOM_ID_PREFIX + name2 + "-" + classCounter + }; + classCounter++; + }; + const lookUpDomId = function(_id) { + const id2 = common$1.sanitizeText(_id, getConfig$2()); + if (id2 in classes$1) { + return classes$1[id2].domId; + } + throw new Error("Class not found: " + id2); + }; + const clear$5 = function() { + relations = []; + classes$1 = {}; + notes = []; + functions = []; + functions.push(setupToolTips); + namespaces = {}; + namespaceCounter = 0; + clear$l(); + }; + const getClass = function(id2) { + return classes$1[id2]; + }; + const getClasses$3 = function() { + return classes$1; + }; + const getRelations$1 = function() { + return relations; + }; + const getNotes = function() { + return notes; + }; + const addRelation$1 = function(relation) { + log$1.debug("Adding relation: " + JSON.stringify(relation)); + addClass(relation.id1); + addClass(relation.id2); + relation.id1 = splitClassNameAndType(relation.id1).className; + relation.id2 = splitClassNameAndType(relation.id2).className; + relation.relationTitle1 = common$1.sanitizeText( + relation.relationTitle1.trim(), + getConfig$2() + ); + relation.relationTitle2 = common$1.sanitizeText( + relation.relationTitle2.trim(), + getConfig$2() + ); + relations.push(relation); + }; + const addAnnotation = function(className, annotation) { + const validatedClassName = splitClassNameAndType(className).className; + classes$1[validatedClassName].annotations.push(annotation); + }; + const addMember = function(className, member) { + addClass(className); + const validatedClassName = splitClassNameAndType(className).className; + const theClass = classes$1[validatedClassName]; + if (typeof member === "string") { + const memberString = member.trim(); + if (memberString.startsWith("<<") && memberString.endsWith(">>")) { + theClass.annotations.push(sanitizeText$2(memberString.substring(2, memberString.length - 2))); + } else if (memberString.indexOf(")") > 0) { + theClass.methods.push(new ClassMember(memberString, "method")); + } else if (memberString) { + theClass.members.push(new ClassMember(memberString, "attribute")); + } + } + }; + const addMembers = function(className, members) { + if (Array.isArray(members)) { + members.reverse(); + members.forEach((member) => addMember(className, member)); + } + }; + const addNote = function(text2, className) { + const note2 = { + id: `note${notes.length}`, + class: className, + text: text2 + }; + notes.push(note2); + }; + const cleanupLabel$1 = function(label) { + if (label.startsWith(":")) { + label = label.substring(1); + } + return sanitizeText$2(label.trim()); + }; + const setCssClass$1 = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id2 = _id; + if (_id[0].match(/\d/)) { + id2 = MERMAID_DOM_ID_PREFIX + id2; + } + if (classes$1[id2] !== void 0) { + classes$1[id2].cssClasses.push(className); + } + }); + }; + const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id2) { + if (tooltip !== void 0) { + classes$1[id2].tooltip = sanitizeText$2(tooltip); + } + }); + }; + const getTooltip = function(id2, namespace2) { + if (namespace2) { + return namespaces[namespace2].classes[id2].tooltip; + } + return classes$1[id2].tooltip; + }; + const setLink = function(ids, linkStr, target) { + const config2 = getConfig$2(); + ids.split(",").forEach(function(_id) { + let id2 = _id; + if (_id[0].match(/\d/)) { + id2 = MERMAID_DOM_ID_PREFIX + id2; + } + if (classes$1[id2] !== void 0) { + classes$1[id2].link = utils.formatUrl(linkStr, config2); + if (config2.securityLevel === "sandbox") { + classes$1[id2].linkTarget = "_top"; + } else if (typeof target === "string") { + classes$1[id2].linkTarget = sanitizeText$2(target); + } else { + classes$1[id2].linkTarget = "_blank"; + } + } + }); + setCssClass$1(ids, "clickable"); + }; + const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id2) { + setClickFunc(id2, functionName, functionArgs); + classes$1[id2].haveCallback = true; + }); + setCssClass$1(ids, "clickable"); + }; + const setClickFunc = function(_domId, functionName, functionArgs) { + const domId = common$1.sanitizeText(_domId, getConfig$2()); + const config2 = getConfig$2(); + if (config2.securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + const id2 = domId; + if (classes$1[id2] !== void 0) { + const elemId = lookUpDomId(id2); + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i2 = 0; i2 < argList.length; i2++) { + let item = argList[i2].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i2] = item; + } + } + if (argList.length === 0) { + argList.push(elemId); + } + functions.push(function() { + const elem = document.querySelector(`[id="${elemId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } + }; + const bindFunctions = function(element2) { + functions.forEach(function(fun) { + fun(element2); + }); + }; + const lineType$1 = { + LINE: 0, + DOTTED_LINE: 1 + }; + const relationType$1 = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3, + LOLLIPOP: 4 + }; + const setupToolTips = function(element2) { + let tooltipElem = d3select(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = d3select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg2 = d3select(element2).select("svg"); + const nodes2 = svg2.selectAll("g.node"); + nodes2.on("mouseover", function() { + const el = d3select(this); + const title2 = el.attr("title"); + if (title2 === null) { + return; + } + const rect2 = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect2.left + (rect2.right - rect2.left) / 2 + "px").style("top", window.scrollY + rect2.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = d3select(this); + el.classed("hover", false); + }); + }; + functions.push(setupToolTips); + let direction$1 = "TB"; + const getDirection$1 = () => direction$1; + const setDirection$1 = (dir2) => { + direction$1 = dir2; + }; + const addNamespace = function(id2) { + if (namespaces[id2] !== void 0) { + return; + } + namespaces[id2] = { + id: id2, + classes: {}, + children: {}, + domId: MERMAID_DOM_ID_PREFIX + id2 + "-" + namespaceCounter + }; + namespaceCounter++; + }; + const getNamespace = function(name2) { + return namespaces[name2]; + }; + const getNamespaces = function() { + return namespaces; + }; + const addClassesToNamespace = function(id2, classNames) { + if (namespaces[id2] !== void 0) { + classNames.map((className) => { + classes$1[className].parent = id2; + namespaces[id2].classes[className] = classes$1[className]; + }); + } + }; + const db$4 = { + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + getConfig: () => getConfig$2().class, + addClass, + bindFunctions, + clear: clear$5, + getClass, + getClasses: getClasses$3, + getNotes, + addAnnotation, + addNote, + getRelations: getRelations$1, + addRelation: addRelation$1, + getDirection: getDirection$1, + setDirection: setDirection$1, + addMember, + addMembers, + cleanupLabel: cleanupLabel$1, + lineType: lineType$1, + relationType: relationType$1, + setClickEvent, + setCssClass: setCssClass$1, + setLink, + getTooltip, + setTooltip, + lookUpDomId, + setDiagramTitle, + getDiagramTitle, + setClassLabel, + addNamespace, + addClassesToNamespace, + getNamespace, + getNamespaces + }; + const getStyles$5 = (options2) => `g.classGroup text { + fill: ${options2.nodeBorder}; + fill: ${options2.classText}; + stroke: none; + font-family: ${options2.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${options2.classText}; +} +.edgeLabel .label rect { + fill: ${options2.mainBkg}; +} +.label text { + fill: ${options2.classText}; +} +.edgeLabel .label span { + background: ${options2.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options2.mainBkg}; + stroke: ${options2.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${options2.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${options2.mainBkg}; + stroke: ${options2.nodeBorder}; +} + +g.classGroup line { + stroke: ${options2.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options2.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${options2.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${options2.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${options2.lineColor} !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${options2.lineColor} !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options2.lineColor} !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options2.lineColor} !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${options2.mainBkg} !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${options2.mainBkg} !important; + stroke: ${options2.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; +} +`; + const styles$4 = getStyles$5; + let edgeCount$1 = 0; + const drawEdge$2 = function(elem, path2, relation, conf2, diagObj) { + const getRelationType = function(type2) { + switch (type2) { + case diagObj.db.relationType.AGGREGATION: + return "aggregation"; + case diagObj.db.relationType.EXTENSION: + return "extension"; + case diagObj.db.relationType.COMPOSITION: + return "composition"; + case diagObj.db.relationType.DEPENDENCY: + return "dependency"; + case diagObj.db.relationType.LOLLIPOP: + return "lollipop"; + } + }; + path2.points = path2.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path2.points; + const lineFunction = line$1().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount$1).attr("class", "relation"); + let url = ""; + if (conf2.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + if (relation.relation.lineType == 1) { + svgPath.attr("class", "relation dashed-line"); + } + if (relation.relation.lineType == 10) { + svgPath.attr("class", "relation dotted-line"); + } + if (relation.relation.type1 !== "none") { + svgPath.attr( + "marker-start", + "url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)" + ); + } + if (relation.relation.type2 !== "none") { + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(relation.relation.type2) + "End)" + ); + } + let x2, y2; + const l = path2.points.length; + let labelPosition = utils.calcLabelPosition(path2.points); + x2 = labelPosition.x; + y2 = labelPosition.y; + let p1_card_x, p1_card_y; + let p2_card_x, p2_card_y; + if (l % 2 !== 0 && l > 1) { + let cardinality_1_point = utils.calcCardinalityPosition( + relation.relation.type1 !== "none", + path2.points, + path2.points[0] + ); + let cardinality_2_point = utils.calcCardinalityPosition( + relation.relation.type2 !== "none", + path2.points, + path2.points[l - 1] + ); + log$1.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point)); + log$1.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point)); + p1_card_x = cardinality_1_point.x; + p1_card_y = cardinality_1_point.y; + p2_card_x = cardinality_2_point.x; + p2_card_y = cardinality_2_point.y; + } + if (relation.title !== void 0) { + const g = elem.append("g").attr("class", "classLabel"); + const label = g.append("text").attr("class", "label").attr("x", x2).attr("y", y2).attr("fill", "red").attr("text-anchor", "middle").text(relation.title); + window.label = label; + const bounds2 = label.node().getBBox(); + g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds2.x - conf2.padding / 2).attr("y", bounds2.y - conf2.padding / 2).attr("width", bounds2.width + conf2.padding).attr("height", bounds2.height + conf2.padding); + } + log$1.info("Rendering relation " + JSON.stringify(relation)); + if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1); + } + if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2); + } + edgeCount$1++; + }; + const drawClass = function(elem, classDef, conf2, diagObj) { + log$1.debug("Rendering class ", classDef, conf2); + const id2 = classDef.id; + const classInfo = { + id: id2, + label: classDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id2)).attr("class", "classGroup"); + let title2; + if (classDef.link) { + title2 = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf2.textHeight + conf2.padding).attr("x", 0); + } else { + title2 = g.append("text").attr("y", conf2.textHeight + conf2.padding).attr("x", 0); + } + let isFirst = true; + classDef.annotations.forEach(function(member) { + const titleText2 = title2.append("tspan").text("«" + member + "»"); + if (!isFirst) { + titleText2.attr("dy", conf2.textHeight); + } + isFirst = false; + }); + let classTitleString = getClassTitleString(classDef); + const classTitle = title2.append("tspan").text(classTitleString).attr("class", "title"); + if (!isFirst) { + classTitle.attr("dy", conf2.textHeight); + } + const titleHeight = title2.node().getBBox().height; + let membersLine; + let membersBox; + let methodsLine; + if (classDef.members.length > 0) { + membersLine = g.append("line").attr("x1", 0).attr("y1", conf2.padding + titleHeight + conf2.dividerMargin / 2).attr("y2", conf2.padding + titleHeight + conf2.dividerMargin / 2); + const members = g.append("text").attr("x", conf2.padding).attr("y", titleHeight + conf2.dividerMargin + conf2.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.members.forEach(function(member) { + addTspan(members, member, isFirst, conf2); + isFirst = false; + }); + membersBox = members.node().getBBox(); + } + if (classDef.methods.length > 0) { + methodsLine = g.append("line").attr("x1", 0).attr("y1", conf2.padding + titleHeight + conf2.dividerMargin + membersBox.height).attr("y2", conf2.padding + titleHeight + conf2.dividerMargin + membersBox.height); + const methods = g.append("text").attr("x", conf2.padding).attr("y", titleHeight + 2 * conf2.dividerMargin + membersBox.height + conf2.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.methods.forEach(function(method) { + addTspan(methods, method, isFirst, conf2); + isFirst = false; + }); + } + const classBox = g.node().getBBox(); + var cssClassStr = " "; + if (classDef.cssClasses.length > 0) { + cssClassStr = cssClassStr + classDef.cssClasses.join(" "); + } + const rect2 = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf2.padding).attr("height", classBox.height + conf2.padding + 0.5 * conf2.dividerMargin).attr("class", cssClassStr); + const rectWidth = rect2.node().getBBox().width; + title2.node().childNodes.forEach(function(x2) { + x2.setAttribute("x", (rectWidth - x2.getBBox().width) / 2); + }); + if (classDef.tooltip) { + title2.insert("title").text(classDef.tooltip); + } + if (membersLine) { + membersLine.attr("x2", rectWidth); + } + if (methodsLine) { + methodsLine.attr("x2", rectWidth); + } + classInfo.width = rectWidth; + classInfo.height = classBox.height + conf2.padding + 0.5 * conf2.dividerMargin; + return classInfo; + }; + const getClassTitleString = function(classDef) { + let classTitleString = classDef.id; + if (classDef.type) { + classTitleString += "<" + parseGenericTypes(classDef.type) + ">"; + } + return classTitleString; + }; + const drawNote$1 = function(elem, note2, conf2, diagObj) { + log$1.debug("Rendering note ", note2, conf2); + const id2 = note2.id; + const noteInfo = { + id: id2, + text: note2.text, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id2).attr("class", "classGroup"); + let text2 = g.append("text").attr("y", conf2.textHeight + conf2.padding).attr("x", 0); + const lines = JSON.parse(`"${note2.text}"`).split("\n"); + lines.forEach(function(line2) { + log$1.debug(`Adding line: ${line2}`); + text2.append("tspan").text(line2).attr("class", "title").attr("dy", conf2.textHeight); + }); + const noteBox = g.node().getBBox(); + const rect2 = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf2.padding).attr( + "height", + noteBox.height + lines.length * conf2.textHeight + conf2.padding + 0.5 * conf2.dividerMargin + ); + const rectWidth = rect2.node().getBBox().width; + text2.node().childNodes.forEach(function(x2) { + x2.setAttribute("x", (rectWidth - x2.getBBox().width) / 2); + }); + noteInfo.width = rectWidth; + noteInfo.height = noteBox.height + lines.length * conf2.textHeight + conf2.padding + 0.5 * conf2.dividerMargin; + return noteInfo; + }; + const addTspan = function(textEl, member, isFirst, conf2) { + const { displayText, cssStyle } = member.getDisplayDetails(); + const tSpan = textEl.append("tspan").attr("x", conf2.padding).text(displayText); + if (cssStyle !== "") { + tSpan.attr("style", member.cssStyle); + } + if (!isFirst) { + tSpan.attr("dy", conf2.textHeight); + } + }; + const svgDraw$3 = { + getClassTitleString, + drawClass, + drawEdge: drawEdge$2, + drawNote: drawNote$1 + }; + let idCache$2 = {}; + const padding = 20; + const getGraphId = function(label) { + const foundEntry = Object.entries(idCache$2).find((entry) => entry[1].label === label); + if (foundEntry) { + return foundEntry[0]; + } + }; + const insertMarkers$1 = function(elem) { + elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); + elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); + elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"); + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); + }; + const draw$8 = function(text2, id2, _version, diagObj) { + const conf2 = getConfig$2().class; + idCache$2 = {}; + log$1.info("Rendering diagram " + text2); + const securityLevel = getConfig$2().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const diagram2 = root2.select(`[id='${id2}']`); + insertMarkers$1(diagram2); + const g = new Graph({ + multigraph: true + }); + g.setGraph({ + isMultiGraph: true + }); + g.setDefaultEdgeLabel(function() { + return {}; + }); + const classes2 = diagObj.db.getClasses(); + const keys2 = Object.keys(classes2); + for (const key of keys2) { + const classDef = classes2[key]; + const node2 = svgDraw$3.drawClass(diagram2, classDef, conf2, diagObj); + idCache$2[node2.id] = node2; + g.setNode(node2.id, node2); + log$1.info("Org height: " + node2.height); + } + const relations2 = diagObj.db.getRelations(); + relations2.forEach(function(relation) { + log$1.info( + "tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation) + ); + g.setEdge( + getGraphId(relation.id1), + getGraphId(relation.id2), + { + relation + }, + relation.title || "DEFAULT" + ); + }); + const notes2 = diagObj.db.getNotes(); + notes2.forEach(function(note2) { + log$1.debug(`Adding note: ${JSON.stringify(note2)}`); + const node2 = svgDraw$3.drawNote(diagram2, note2, conf2, diagObj); + idCache$2[node2.id] = node2; + g.setNode(node2.id, node2); + if (note2.class && note2.class in classes2) { + g.setEdge( + note2.id, + getGraphId(note2.class), + { + relation: { + id1: note2.id, + id2: note2.class, + relation: { + type1: "none", + type2: "none", + lineType: 10 + } + } + }, + "DEFAULT" + ); + } + }); + layout(g); + g.nodes().forEach(function(v) { + if (v !== void 0 && g.node(v) !== void 0) { + log$1.debug("Node " + v + ": " + JSON.stringify(g.node(v))); + root2.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr( + "transform", + "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )" + ); + } + }); + g.edges().forEach(function(e) { + if (e !== void 0 && g.edge(e) !== void 0) { + log$1.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e))); + svgDraw$3.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf2, diagObj); + } + }); + const svgBounds = diagram2.node().getBBox(); + const width2 = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + configureSvgSize(diagram2, height, width2, conf2.useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width2} ${height}`; + log$1.debug(`viewBox ${vBox}`); + diagram2.attr("viewBox", vBox); + }; + const renderer$7 = { + draw: draw$8 + }; + const diagram$8 = { + parser: parser$a, + db: db$4, + renderer: renderer$7, + styles: styles$4, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db$4.clear(); + } + }; + const classDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$8 + }, Symbol.toStringTag, { value: "Module" })); + const sanitizeText$1 = (txt) => common$1.sanitizeText(txt, getConfig$2()); + let conf$3 = { + dividerMargin: 10, + padding: 5, + textHeight: 10, + curve: void 0 + }; + const addNamespaces = function(namespaces2, g, _id, diagObj) { + const keys2 = Object.keys(namespaces2); + log$1.info("keys:", keys2); + log$1.info(namespaces2); + keys2.forEach(function(id2) { + var _a, _b; + const vertex = namespaces2[id2]; + const shape = "rect"; + const node2 = { + shape, + id: vertex.id, + domId: vertex.domId, + labelText: sanitizeText$1(vertex.id), + labelStyle: "", + style: "fill: none; stroke: black", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig$2().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig$2().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node2); + addClasses(vertex.classes, g, _id, diagObj, vertex.id); + log$1.info("setNode", node2); + }); + }; + const addClasses = function(classes2, g, _id, diagObj, parent) { + const keys2 = Object.keys(classes2); + log$1.info("keys:", keys2); + log$1.info(classes2); + keys2.filter((id2) => classes2[id2].parent == parent).forEach(function(id2) { + var _a, _b; + const vertex = classes2[id2]; + const cssClassStr = vertex.cssClasses.join(" "); + const styles2 = { labelStyle: "", style: "" }; + const vertexText = vertex.label ?? vertex.id; + const radius = 0; + const shape = "class_box"; + const node2 = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText$1(vertexText), + classData: vertex, + rx: radius, + ry: radius, + class: cssClassStr, + style: styles2.style, + id: vertex.id, + domId: vertex.domId, + tooltip: diagObj.db.getTooltip(vertex.id, parent) || "", + haveCallback: vertex.haveCallback, + link: vertex.link, + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig$2().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig$2().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node2); + if (parent) { + g.setParent(vertex.id, parent); + } + log$1.info("setNode", node2); + }); + }; + const addNotes = function(notes2, g, startEdgeId, classes2) { + log$1.info(notes2); + notes2.forEach(function(note2, i2) { + var _a, _b; + const vertex = note2; + const cssNoteStr = ""; + const styles2 = { labelStyle: "", style: "" }; + const vertexText = vertex.text; + const radius = 0; + const shape = "note"; + const node2 = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText$1(vertexText), + noteData: vertex, + rx: radius, + ry: radius, + class: cssNoteStr, + style: styles2.style, + id: vertex.id, + domId: vertex.id, + tooltip: "", + type: "note", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = getConfig$2().flowchart) == null ? void 0 : _a.padding) ?? ((_b = getConfig$2().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node2); + log$1.info("setNode", node2); + if (!vertex.class || !(vertex.class in classes2)) { + return; + } + const edgeId = startEdgeId + i2; + const edgeData = { + id: `edgeNote${edgeId}`, + //Set relationship style and line type + classes: "relation", + pattern: "dotted", + // Set link type for rendering + arrowhead: "none", + //Set edge extra labels + startLabelRight: "", + endLabelLeft: "", + //Set relation arrow types + arrowTypeStart: "none", + arrowTypeEnd: "none", + style: "fill:none", + labelStyle: "", + curve: interpolateToCurve(conf$3.curve, curveLinear) + }; + g.setEdge(vertex.id, vertex.class, edgeData, edgeId); + }); + }; + const addRelations = function(relations2, g) { + const conf2 = getConfig$2().flowchart; + let cnt2 = 0; + relations2.forEach(function(edge) { + var _a; + cnt2++; + const edgeData = { + //Set relationship style and line type + classes: "relation", + pattern: edge.relation.lineType == 1 ? "dashed" : "solid", + id: "id" + cnt2, + // Set link type for rendering + arrowhead: edge.type === "arrow_open" ? "none" : "normal", + //Set edge extra labels + startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1, + endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2, + //Set relation arrow types + arrowTypeStart: getArrowMarker(edge.relation.type1), + arrowTypeEnd: getArrowMarker(edge.relation.type2), + style: "fill:none", + labelStyle: "", + curve: interpolateToCurve(conf2 == null ? void 0 : conf2.curve, curveLinear) + }; + log$1.info(edgeData, edge); + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + edgeData.style = styles2.style; + edgeData.labelStyle = styles2.labelStyle; + } + edge.text = edge.title; + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if (((_a = getConfig$2().flowchart) == null ? void 0 : _a.htmlLabels) ?? getConfig$2().htmlLabels) { + edgeData.labelType = "html"; + edgeData.label = '' + edge.text + ""; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(common$1.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + g.setEdge(edge.id1, edge.id2, edgeData, cnt2); + }); + }; + const setConf$3 = function(cnf) { + conf$3 = { + ...conf$3, + ...cnf + }; + }; + const draw$7 = async function(text2, id2, _version, diagObj) { + log$1.info("Drawing class - ", id2); + const conf2 = getConfig$2().flowchart ?? getConfig$2().class; + const securityLevel = getConfig$2().securityLevel; + log$1.info("config:", conf2); + const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50; + const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50; + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: diagObj.db.getDirection(), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const namespaces2 = diagObj.db.getNamespaces(); + const classes2 = diagObj.db.getClasses(); + const relations2 = diagObj.db.getRelations(); + const notes2 = diagObj.db.getNotes(); + log$1.info(relations2); + addNamespaces(namespaces2, g, id2, diagObj); + addClasses(classes2, g, id2, diagObj); + addRelations(relations2, g); + addNotes(notes2, g, relations2.length + 1, classes2); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = root2.select(`[id="${id2}"]`); + const element2 = root2.select("#" + id2 + " g"); + await render( + element2, + g, + ["aggregation", "extension", "composition", "dependency", "lollipop"], + "classDiagram", + id2 + ); + utils.insertTitle(svg2, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle()); + setupGraphViewbox$1(g, svg2, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth); + if (!(conf2 == null ? void 0 : conf2.htmlLabels)) { + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const labels = doc.querySelectorAll('[id="' + id2 + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect2 = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect2.setAttribute("rx", 0); + rect2.setAttribute("ry", 0); + rect2.setAttribute("width", dim.width); + rect2.setAttribute("height", dim.height); + label.insertBefore(rect2, label.firstChild); + } + } + }; + function getArrowMarker(type2) { + let marker; + switch (type2) { + case 0: + marker = "aggregation"; + break; + case 1: + marker = "extension"; + break; + case 2: + marker = "composition"; + break; + case 3: + marker = "dependency"; + break; + case 4: + marker = "lollipop"; + break; + default: + marker = "none"; + } + return marker; + } + const renderer$6 = { + setConf: setConf$3, + draw: draw$7 + }; + const diagram$7 = { + parser: parser$a, + db: db$4, + renderer: renderer$6, + styles: styles$4, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db$4.clear(); + } + }; + const classDiagramV2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$7 + }, Symbol.toStringTag, { value: "Module" })); + var parser$7 = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setRootDoc($$[$0]); + return $$[$0]; + case 4: + this.$ = []; + break; + case 5: + if ($$[$0] != "nl") { + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + } + break; + case 6: + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = "nl"; + break; + case 11: + this.$ = $$[$0]; + break; + case 12: + const stateStmt = $$[$0 - 1]; + stateStmt.description = yy.trimColon($$[$0]); + this.$ = stateStmt; + break; + case 13: + this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] }; + break; + case 14: + const relDescription = yy.trimColon($$[$0]); + this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription }; + break; + case 18: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] }; + break; + case 19: + var id2 = $$[$0]; + var description = $$[$0 - 2].trim(); + if ($$[$0].match(":")) { + var parts = $$[$0].split(":"); + id2 = parts[0]; + description = [description, parts[1]]; + } + this.$ = { stmt: "state", id: id2, type: "default", description }; + break; + case 20: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] }; + break; + case 21: + this.$ = { stmt: "state", id: $$[$0], type: "fork" }; + break; + case 22: + this.$ = { stmt: "state", id: $$[$0], type: "join" }; + break; + case 23: + this.$ = { stmt: "state", id: $$[$0], type: "choice" }; + break; + case 24: + this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" }; + break; + case 25: + this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } }; + break; + case 28: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 29: + case 30: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 31: + case 32: + this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() }; + break; + case 33: + this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; + break; + case 34: + yy.setDirection("TB"); + this.$ = { stmt: "dir", value: "TB" }; + break; + case 35: + yy.setDirection("BT"); + this.$ = { stmt: "dir", value: "BT" }; + break; + case 36: + yy.setDirection("RL"); + this.$ = { stmt: "dir", value: "RL" }; + break; + case 37: + yy.setDirection("LR"); + this.$ = { stmt: "dir", value: "LR" }; + break; + case 40: + case 41: + this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" }; + break; + case 42: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + case 43: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])], + defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 40; + case 1: + return 44; + case 2: + return 45; + case 3: + return 46; + case 4: + return 47; + case 5: + break; + case 6: + break; + case 7: + return 5; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + this.pushState("SCALE"); + return 16; + case 13: + return 17; + case 14: + this.popState(); + break; + case 15: + this.begin("acc_title"); + return 32; + case 16: + this.popState(); + return "acc_title_value"; + case 17: + this.begin("acc_descr"); + return 34; + case 18: + this.popState(); + return "acc_descr_value"; + case 19: + this.begin("acc_descr_multiline"); + break; + case 20: + this.popState(); + break; + case 21: + return "acc_descr_multiline_value"; + case 22: + this.pushState("CLASSDEF"); + return 37; + case 23: + this.popState(); + this.pushState("CLASSDEFID"); + return "DEFAULT_CLASSDEF_ID"; + case 24: + this.popState(); + this.pushState("CLASSDEFID"); + return 38; + case 25: + this.popState(); + return 39; + case 26: + this.pushState("CLASS"); + return 41; + case 27: + this.popState(); + this.pushState("CLASS_STYLE"); + return 42; + case 28: + this.popState(); + return 43; + case 29: + this.pushState("SCALE"); + return 16; + case 30: + return 17; + case 31: + this.popState(); + break; + case 32: + this.pushState("STATE"); + break; + case 33: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 34: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 35: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 36: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 37: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 38: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 39: + return 44; + case 40: + return 45; + case 41: + return 46; + case 42: + return 47; + case 43: + this.pushState("STATE_STRING"); + break; + case 44: + this.pushState("STATE_ID"); + return "AS"; + case 45: + this.popState(); + return "ID"; + case 46: + this.popState(); + break; + case 47: + return "STATE_DESCR"; + case 48: + return 18; + case 49: + this.popState(); + break; + case 50: + this.popState(); + this.pushState("struct"); + return 19; + case 51: + break; + case 52: + this.popState(); + return 20; + case 53: + break; + case 54: + this.begin("NOTE"); + return 28; + case 55: + this.popState(); + this.pushState("NOTE_ID"); + return 52; + case 56: + this.popState(); + this.pushState("NOTE_ID"); + return 53; + case 57: + this.popState(); + this.pushState("FLOATING_NOTE"); + break; + case 58: + this.popState(); + this.pushState("FLOATING_NOTE_ID"); + return "AS"; + case 59: + break; + case 60: + return "NOTE_TEXT"; + case 61: + this.popState(); + return "ID"; + case 62: + this.popState(); + this.pushState("NOTE_TEXT"); + return 23; + case 63: + this.popState(); + yy_.yytext = yy_.yytext.substr(2).trim(); + return 30; + case 64: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 30; + case 65: + return 6; + case 66: + return 6; + case 67: + return 15; + case 68: + return 50; + case 69: + return 23; + case 70: + yy_.yytext = yy_.yytext.trim(); + return 13; + case 71: + return 14; + case 72: + return 27; + case 73: + return 51; + case 74: + return 5; + case 75: + return "INVALID"; + } + }, + rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$7.parser = parser$7; + const parser$8 = parser$7; + const DEFAULT_DIAGRAM_DIRECTION = "LR"; + const DEFAULT_NESTED_DOC_DIR = "TB"; + const STMT_STATE = "state"; + const STMT_RELATION = "relation"; + const STMT_CLASSDEF = "classDef"; + const STMT_APPLYCLASS = "applyClass"; + const DEFAULT_STATE_TYPE = "default"; + const DIVIDER_TYPE = "divider"; + const START_NODE = "[*]"; + const START_TYPE = "start"; + const END_NODE = START_NODE; + const END_TYPE = "end"; + const COLOR_KEYWORD = "color"; + const FILL_KEYWORD = "fill"; + const BG_FILL = "bgFill"; + const STYLECLASS_SEP = ","; + function newClassesList() { + return {}; + } + let direction = DEFAULT_DIAGRAM_DIRECTION; + let rootDoc = []; + let classes = newClassesList(); + const newDoc = () => { + return { + relations: [], + states: {}, + documents: {} + }; + }; + let documents = { + root: newDoc() + }; + let currentDocument = documents.root; + let startEndCount = 0; + let dividerCnt = 0; + const lineType = { + LINE: 0, + DOTTED_LINE: 1 + }; + const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 + }; + const clone = (o) => JSON.parse(JSON.stringify(o)); + const setRootDoc = (o) => { + log$1.info("Setting root doc", o); + rootDoc = o; + }; + const getRootDoc = () => rootDoc; + const docTranslator = (parent, node2, first) => { + if (node2.stmt === STMT_RELATION) { + docTranslator(parent, node2.state1, true); + docTranslator(parent, node2.state2, false); + } else { + if (node2.stmt === STMT_STATE) { + if (node2.id === "[*]") { + node2.id = first ? parent.id + "_start" : parent.id + "_end"; + node2.start = first; + } else { + node2.id = node2.id.trim(); + } + } + if (node2.doc) { + const doc = []; + let currentDoc = []; + let i2; + for (i2 = 0; i2 < node2.doc.length; i2++) { + if (node2.doc[i2].type === DIVIDER_TYPE) { + const newNode = clone(node2.doc[i2]); + newNode.doc = clone(currentDoc); + doc.push(newNode); + currentDoc = []; + } else { + currentDoc.push(node2.doc[i2]); + } + } + if (doc.length > 0 && currentDoc.length > 0) { + const newNode = { + stmt: STMT_STATE, + id: generateId$1(), + type: "divider", + doc: clone(currentDoc) + }; + doc.push(clone(newNode)); + node2.doc = doc; + } + node2.doc.forEach((docNode) => docTranslator(node2, docNode, true)); + } + } + }; + const getRootDocV2 = () => { + docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true); + return { id: "root", doc: rootDoc }; + }; + const extract = (_doc) => { + let doc; + if (_doc.doc) { + doc = _doc.doc; + } else { + doc = _doc; + } + log$1.info(doc); + clear$4(true); + log$1.info("Extract", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + addState( + item.id.trim(), + item.type, + item.doc, + item.description, + item.note, + item.classes, + item.styles, + item.textStyles + ); + break; + case STMT_RELATION: + addRelation(item.state1, item.state2, item.description); + break; + case STMT_CLASSDEF: + addStyleClass(item.id.trim(), item.classes); + break; + case STMT_APPLYCLASS: + setCssClass(item.id.trim(), item.styleClass); + break; + } + }); + }; + const addState = function(id2, type2 = DEFAULT_STATE_TYPE, doc = null, descr = null, note2 = null, classes2 = null, styles2 = null, textStyles = null) { + const trimmedId = id2 == null ? void 0 : id2.trim(); + if (currentDocument.states[trimmedId] === void 0) { + log$1.info("Adding state ", trimmedId, descr); + currentDocument.states[trimmedId] = { + id: trimmedId, + descriptions: [], + type: type2, + doc, + note: note2, + classes: [], + styles: [], + textStyles: [] + }; + } else { + if (!currentDocument.states[trimmedId].doc) { + currentDocument.states[trimmedId].doc = doc; + } + if (!currentDocument.states[trimmedId].type) { + currentDocument.states[trimmedId].type = type2; + } + } + if (descr) { + log$1.info("Setting state description", trimmedId, descr); + if (typeof descr === "string") { + addDescription(trimmedId, descr.trim()); + } + if (typeof descr === "object") { + descr.forEach((des) => addDescription(trimmedId, des.trim())); + } + } + if (note2) { + currentDocument.states[trimmedId].note = note2; + currentDocument.states[trimmedId].note.text = common$1.sanitizeText( + currentDocument.states[trimmedId].note.text, + getConfig$2() + ); + } + if (classes2) { + log$1.info("Setting state classes", trimmedId, classes2); + const classesList = typeof classes2 === "string" ? [classes2] : classes2; + classesList.forEach((klass) => setCssClass(trimmedId, klass.trim())); + } + if (styles2) { + log$1.info("Setting state styles", trimmedId, styles2); + const stylesList = typeof styles2 === "string" ? [styles2] : styles2; + stylesList.forEach((style) => setStyle(trimmedId, style.trim())); + } + if (textStyles) { + log$1.info("Setting state styles", trimmedId, styles2); + const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles; + textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim())); + } + }; + const clear$4 = function(saveCommon) { + documents = { + root: newDoc() + }; + currentDocument = documents.root; + startEndCount = 0; + classes = newClassesList(); + if (!saveCommon) { + clear$l(); + } + }; + const getState = function(id2) { + return currentDocument.states[id2]; + }; + const getStates = function() { + return currentDocument.states; + }; + const logDocuments = function() { + log$1.info("Documents = ", documents); + }; + const getRelations = function() { + return currentDocument.relations; + }; + function startIdIfNeeded(id2 = "") { + let fixedId = id2; + if (id2 === START_NODE) { + startEndCount++; + fixedId = `${START_TYPE}${startEndCount}`; + } + return fixedId; + } + function startTypeIfNeeded(id2 = "", type2 = DEFAULT_STATE_TYPE) { + return id2 === START_NODE ? START_TYPE : type2; + } + function endIdIfNeeded(id2 = "") { + let fixedId = id2; + if (id2 === END_NODE) { + startEndCount++; + fixedId = `${END_TYPE}${startEndCount}`; + } + return fixedId; + } + function endTypeIfNeeded(id2 = "", type2 = DEFAULT_STATE_TYPE) { + return id2 === END_NODE ? END_TYPE : type2; + } + function addRelationObjs(item1, item2, relationTitle) { + let id1 = startIdIfNeeded(item1.id.trim()); + let type1 = startTypeIfNeeded(item1.id.trim(), item1.type); + let id2 = startIdIfNeeded(item2.id.trim()); + let type2 = startTypeIfNeeded(item2.id.trim(), item2.type); + addState( + id1, + type1, + item1.doc, + item1.description, + item1.note, + item1.classes, + item1.styles, + item1.textStyles + ); + addState( + id2, + type2, + item2.doc, + item2.description, + item2.note, + item2.classes, + item2.styles, + item2.textStyles + ); + currentDocument.relations.push({ + id1, + id2, + relationTitle: common$1.sanitizeText(relationTitle, getConfig$2()) + }); + } + const addRelation = function(item1, item2, title2) { + if (typeof item1 === "object") { + addRelationObjs(item1, item2, title2); + } else { + const id1 = startIdIfNeeded(item1.trim()); + const type1 = startTypeIfNeeded(item1); + const id2 = endIdIfNeeded(item2.trim()); + const type2 = endTypeIfNeeded(item2); + addState(id1, type1); + addState(id2, type2); + currentDocument.relations.push({ + id1, + id2, + title: common$1.sanitizeText(title2, getConfig$2()) + }); + } + }; + const addDescription = function(id2, descr) { + const theState = currentDocument.states[id2]; + const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr; + theState.descriptions.push(common$1.sanitizeText(_descr, getConfig$2())); + }; + const cleanupLabel = function(label) { + if (label.substring(0, 1) === ":") { + return label.substr(2).trim(); + } else { + return label.trim(); + } + }; + const getDividerId = () => { + dividerCnt++; + return "divider-id-" + dividerCnt; + }; + const addStyleClass = function(id2, styleAttributes = "") { + if (classes[id2] === void 0) { + classes[id2] = { id: id2, styles: [], textStyles: [] }; + } + const foundClass = classes[id2]; + if (styleAttributes !== void 0 && styleAttributes !== null) { + styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { + const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); + if (attrib.match(COLOR_KEYWORD)) { + const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); + const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); + foundClass.textStyles.push(newStyle2); + } + foundClass.styles.push(fixedAttrib); + }); + } + }; + const getClasses$2 = function() { + return classes; + }; + const setCssClass = function(itemIds, cssClassName) { + itemIds.split(",").forEach(function(id2) { + let foundState = getState(id2); + if (foundState === void 0) { + const trimmedId = id2.trim(); + addState(trimmedId); + foundState = getState(trimmedId); + } + foundState.classes.push(cssClassName); + }); + }; + const setStyle = function(itemId, styleText) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(styleText); + } + }; + const setTextStyle = function(itemId, cssClassName) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(cssClassName); + } + }; + const getDirection = () => direction; + const setDirection = (dir2) => { + direction = dir2; + }; + const trimColon = (str2) => str2 && str2[0] === ":" ? str2.substr(1).trim() : str2.trim(); + const db$3 = { + getConfig: () => getConfig$2().state, + addState, + clear: clear$4, + getState, + getStates, + getRelations, + getClasses: getClasses$2, + getDirection, + addRelation, + getDividerId, + setDirection, + cleanupLabel, + lineType, + relationType, + logDocuments, + getRootDoc, + setRootDoc, + getRootDocV2, + extract, + trimColon, + getAccTitle, + setAccTitle, + getAccDescription, + setAccDescription, + addStyleClass, + setCssClass, + addDescription, + setDiagramTitle, + getDiagramTitle + }; + const getStyles$4 = (options2) => ` +defs #statediagram-barbEnd { + fill: ${options2.transitionColor}; + stroke: ${options2.transitionColor}; + } +g.stateGroup text { + fill: ${options2.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${options2.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${options2.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${options2.mainBkg}; + stroke: ${options2.nodeBorder}; +} + +g.stateGroup line { + stroke: ${options2.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${options2.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${options2.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${options2.noteBorderColor}; + fill: ${options2.noteBkgColor}; + + text { + fill: ${options2.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options2.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${options2.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel .label text { + fill: ${options2.transitionLabelColor || options2.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${options2.transitionLabelColor || options2.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${options2.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${options2.specialStateColor}; + stroke: ${options2.specialStateColor}; +} + +.node .fork-join { + fill: ${options2.specialStateColor}; + stroke: ${options2.specialStateColor}; +} + +.node circle.state-end { + fill: ${options2.innerEndBackground}; + stroke: ${options2.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${options2.compositeBackground || options2.background}; + // stroke: ${options2.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${options2.stateBkg || options2.mainBkg}; + stroke: ${options2.stateBorder || options2.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${options2.mainBkg}; + stroke: ${options2.stateBorder || options2.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${options2.lineColor}; +} + +.statediagram-cluster rect { + fill: ${options2.compositeTitleBackground}; + stroke: ${options2.stateBorder || options2.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${options2.stateLabelColor}; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${options2.stateBorder || options2.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${options2.compositeBackground || options2.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${options2.altBackground ? options2.altBackground : "#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${options2.altBackground ? options2.altBackground : "#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${options2.noteBkgColor}; + stroke: ${options2.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${options2.noteBkgColor}; + stroke: ${options2.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${options2.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${options2.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${options2.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${options2.lineColor}; + stroke: ${options2.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; +} +`; + const styles$3 = getStyles$4; + const idCache = {}; + const set = (key, val) => { + idCache[key] = val; + }; + const get = (k) => idCache[k]; + const keys = () => Object.keys(idCache); + const size = () => keys().length; + const idCache$1 = { + get, + set, + keys, + size + }; + const drawStartState = (g) => g.append("circle").attr("class", "start-state").attr("r", getConfig$2().state.sizeUnit).attr("cx", getConfig$2().state.padding + getConfig$2().state.sizeUnit).attr("cy", getConfig$2().state.padding + getConfig$2().state.sizeUnit); + const drawDivider = (g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", getConfig$2().state.textHeight).attr("class", "divider").attr("x2", getConfig$2().state.textHeight * 2).attr("y1", 0).attr("y2", 0); + const drawSimpleState = (g, stateDef) => { + const state2 = g.append("text").attr("x", 2 * getConfig$2().state.padding).attr("y", getConfig$2().state.textHeight + 2 * getConfig$2().state.padding).attr("font-size", getConfig$2().state.fontSize).attr("class", "state-title").text(stateDef.id); + const classBox = state2.node().getBBox(); + g.insert("rect", ":first-child").attr("x", getConfig$2().state.padding).attr("y", getConfig$2().state.padding).attr("width", classBox.width + 2 * getConfig$2().state.padding).attr("height", classBox.height + 2 * getConfig$2().state.padding).attr("rx", getConfig$2().state.radius); + return state2; + }; + const drawDescrState = (g, stateDef) => { + const addTspan2 = function(textEl, txt, isFirst2) { + const tSpan = textEl.append("tspan").attr("x", 2 * getConfig$2().state.padding).text(txt); + if (!isFirst2) { + tSpan.attr("dy", getConfig$2().state.textHeight); + } + }; + const title2 = g.append("text").attr("x", 2 * getConfig$2().state.padding).attr("y", getConfig$2().state.textHeight + 1.3 * getConfig$2().state.padding).attr("font-size", getConfig$2().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]); + const titleBox = title2.node().getBBox(); + const titleHeight = titleBox.height; + const description = g.append("text").attr("x", getConfig$2().state.padding).attr( + "y", + titleHeight + getConfig$2().state.padding * 0.4 + getConfig$2().state.dividerMargin + getConfig$2().state.textHeight + ).attr("class", "state-description"); + let isFirst = true; + let isSecond = true; + stateDef.descriptions.forEach(function(descr) { + if (!isFirst) { + addTspan2(description, descr, isSecond); + isSecond = false; + } + isFirst = false; + }); + const descrLine = g.append("line").attr("x1", getConfig$2().state.padding).attr("y1", getConfig$2().state.padding + titleHeight + getConfig$2().state.dividerMargin / 2).attr("y2", getConfig$2().state.padding + titleHeight + getConfig$2().state.dividerMargin / 2).attr("class", "descr-divider"); + const descrBox = description.node().getBBox(); + const width2 = Math.max(descrBox.width, titleBox.width); + descrLine.attr("x2", width2 + 3 * getConfig$2().state.padding); + g.insert("rect", ":first-child").attr("x", getConfig$2().state.padding).attr("y", getConfig$2().state.padding).attr("width", width2 + 2 * getConfig$2().state.padding).attr("height", descrBox.height + titleHeight + 2 * getConfig$2().state.padding).attr("rx", getConfig$2().state.radius); + return g; + }; + const addTitleAndBox = (g, stateDef, altBkg) => { + const pad2 = getConfig$2().state.padding; + const dblPad = 2 * getConfig$2().state.padding; + const orgBox = g.node().getBBox(); + const orgWidth = orgBox.width; + const orgX = orgBox.x; + const title2 = g.append("text").attr("x", 0).attr("y", getConfig$2().state.titleShift).attr("font-size", getConfig$2().state.fontSize).attr("class", "state-title").text(stateDef.id); + const titleBox = title2.node().getBBox(); + const titleWidth = titleBox.width + dblPad; + let width2 = Math.max(titleWidth, orgWidth); + if (width2 === orgWidth) { + width2 = width2 + dblPad; + } + let startX; + const graphBox = g.node().getBBox(); + if (stateDef.doc) + ; + startX = orgX - pad2; + if (titleWidth > orgWidth) { + startX = (orgWidth - width2) / 2 + pad2; + } + if (Math.abs(orgX - graphBox.x) < pad2 && titleWidth > orgWidth) { + startX = orgX - (titleWidth - orgWidth) / 2; + } + const lineY = 1 - getConfig$2().state.textHeight; + g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width2).attr( + "height", + graphBox.height + getConfig$2().state.textHeight + getConfig$2().state.titleShift + 1 + ).attr("rx", "0"); + title2.attr("x", startX + pad2); + if (titleWidth <= orgWidth) { + title2.attr("x", orgX + (width2 - dblPad) / 2 - titleWidth / 2 + pad2); + } + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig$2().state.titleShift - getConfig$2().state.textHeight - getConfig$2().state.padding + ).attr("width", width2).attr("height", getConfig$2().state.textHeight * 3).attr("rx", getConfig$2().state.radius); + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig$2().state.titleShift - getConfig$2().state.textHeight - getConfig$2().state.padding + ).attr("width", width2).attr("height", graphBox.height + 3 + 2 * getConfig$2().state.textHeight).attr("rx", getConfig$2().state.radius); + return g; + }; + const drawEndState = (g) => { + g.append("circle").attr("class", "end-state-outer").attr("r", getConfig$2().state.sizeUnit + getConfig$2().state.miniPadding).attr( + "cx", + getConfig$2().state.padding + getConfig$2().state.sizeUnit + getConfig$2().state.miniPadding + ).attr( + "cy", + getConfig$2().state.padding + getConfig$2().state.sizeUnit + getConfig$2().state.miniPadding + ); + return g.append("circle").attr("class", "end-state-inner").attr("r", getConfig$2().state.sizeUnit).attr("cx", getConfig$2().state.padding + getConfig$2().state.sizeUnit + 2).attr("cy", getConfig$2().state.padding + getConfig$2().state.sizeUnit + 2); + }; + const drawForkJoinState = (g, stateDef) => { + let width2 = getConfig$2().state.forkWidth; + let height = getConfig$2().state.forkHeight; + if (stateDef.parentId) { + let tmp = width2; + width2 = height; + height = tmp; + } + return g.append("rect").style("stroke", "black").style("fill", "black").attr("width", width2).attr("height", height).attr("x", getConfig$2().state.padding).attr("y", getConfig$2().state.padding); + }; + const _drawLongText = (_text, x2, y2, g) => { + let textHeight = 0; + const textElem = g.append("text"); + textElem.style("text-anchor", "start"); + textElem.attr("class", "noteText"); + let text2 = _text.replace(/\r\n/g, "
"); + text2 = text2.replace(/\n/g, "
"); + const lines = text2.split(common$1.lineBreakRegex); + let tHeight = 1.25 * getConfig$2().state.noteMargin; + for (const line2 of lines) { + const txt = line2.trim(); + if (txt.length > 0) { + const span = textElem.append("tspan"); + span.text(txt); + if (tHeight === 0) { + const textBounds = span.node().getBBox(); + tHeight += textBounds.height; + } + textHeight += tHeight; + span.attr("x", x2 + getConfig$2().state.noteMargin); + span.attr("y", y2 + textHeight + 1.25 * getConfig$2().state.noteMargin); + } + } + return { textWidth: textElem.node().getBBox().width, textHeight }; + }; + const drawNote = (text2, g) => { + g.attr("class", "state-note"); + const note2 = g.append("rect").attr("x", 0).attr("y", getConfig$2().state.padding); + const rectElem = g.append("g"); + const { textWidth, textHeight } = _drawLongText(text2, 0, 0, rectElem); + note2.attr("height", textHeight + 2 * getConfig$2().state.noteMargin); + note2.attr("width", textWidth + getConfig$2().state.noteMargin * 2); + return note2; + }; + const drawState = function(elem, stateDef) { + const id2 = stateDef.id; + const stateInfo = { + id: id2, + label: stateDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id2).attr("class", "stateGroup"); + if (stateDef.type === "start") { + drawStartState(g); + } + if (stateDef.type === "end") { + drawEndState(g); + } + if (stateDef.type === "fork" || stateDef.type === "join") { + drawForkJoinState(g, stateDef); + } + if (stateDef.type === "note") { + drawNote(stateDef.note.text, g); + } + if (stateDef.type === "divider") { + drawDivider(g); + } + if (stateDef.type === "default" && stateDef.descriptions.length === 0) { + drawSimpleState(g, stateDef); + } + if (stateDef.type === "default" && stateDef.descriptions.length > 0) { + drawDescrState(g, stateDef); + } + const stateBox = g.node().getBBox(); + stateInfo.width = stateBox.width + 2 * getConfig$2().state.padding; + stateInfo.height = stateBox.height + 2 * getConfig$2().state.padding; + idCache$1.set(id2, stateInfo); + return stateInfo; + }; + let edgeCount = 0; + const drawEdge$1 = function(elem, path2, relation) { + const getRelationType = function(type2) { + switch (type2) { + case db$3.relationType.AGGREGATION: + return "aggregation"; + case db$3.relationType.EXTENSION: + return "extension"; + case db$3.relationType.COMPOSITION: + return "composition"; + case db$3.relationType.DEPENDENCY: + return "dependency"; + } + }; + path2.points = path2.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path2.points; + const lineFunction = line$1().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "transition"); + let url = ""; + if (getConfig$2().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(db$3.relationType.DEPENDENCY) + "End)" + ); + if (relation.title !== void 0) { + const label = elem.append("g").attr("class", "stateLabel"); + const { x: x2, y: y2 } = utils.calcLabelPosition(path2.points); + const rows = common$1.getRows(relation.title); + let titleHeight = 0; + const titleRows = []; + let maxWidth = 0; + let minX = 0; + for (let i2 = 0; i2 <= rows.length; i2++) { + const title2 = label.append("text").attr("text-anchor", "middle").text(rows[i2]).attr("x", x2).attr("y", y2 + titleHeight); + const boundstmp = title2.node().getBBox(); + maxWidth = Math.max(maxWidth, boundstmp.width); + minX = Math.min(minX, boundstmp.x); + log$1.info(boundstmp.x, x2, y2 + titleHeight); + if (titleHeight === 0) { + const titleBox = title2.node().getBBox(); + titleHeight = titleBox.height; + log$1.info("Title height", titleHeight, y2); + } + titleRows.push(title2); + } + let boxHeight = titleHeight * rows.length; + if (rows.length > 1) { + const heightAdj = (rows.length - 1) * titleHeight * 0.5; + titleRows.forEach((title2, i2) => title2.attr("y", y2 + i2 * titleHeight - heightAdj)); + boxHeight = titleHeight * rows.length; + } + const bounds2 = label.node().getBBox(); + label.insert("rect", ":first-child").attr("class", "box").attr("x", x2 - maxWidth / 2 - getConfig$2().state.padding / 2).attr("y", y2 - boxHeight / 2 - getConfig$2().state.padding / 2 - 3.5).attr("width", maxWidth + getConfig$2().state.padding).attr("height", boxHeight + getConfig$2().state.padding); + log$1.info(bounds2); + } + edgeCount++; + }; + let conf$2; + const transformationLog = {}; + const setConf$2 = function() { + }; + const insertMarkers = function(elem) { + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); + }; + const draw$6 = function(text2, id2, _version, diagObj) { + conf$2 = getConfig$2().state; + const securityLevel = getConfig$2().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + log$1.debug("Rendering diagram " + text2); + const diagram2 = root2.select(`[id='${id2}']`); + insertMarkers(diagram2); + const rootDoc2 = diagObj.db.getRootDoc(); + renderDoc(rootDoc2, diagram2, void 0, false, root2, doc, diagObj); + const padding2 = conf$2.padding; + const bounds2 = diagram2.node().getBBox(); + const width2 = bounds2.width + padding2 * 2; + const height = bounds2.height + padding2 * 2; + const svgWidth = width2 * 1.75; + configureSvgSize(diagram2, height, svgWidth, conf$2.useMaxWidth); + diagram2.attr( + "viewBox", + `${bounds2.x - conf$2.padding} ${bounds2.y - conf$2.padding} ` + width2 + " " + height + ); + }; + const getLabelWidth = (text2) => { + return text2 ? text2.length * conf$2.fontSizeFactor : 1; + }; + const renderDoc = (doc, diagram2, parentId, altBkg, root2, domDocument, diagObj) => { + const graph = new Graph({ + compound: true, + multigraph: true + }); + let i2; + let edgeFreeDoc = true; + for (i2 = 0; i2 < doc.length; i2++) { + if (doc[i2].stmt === "relation") { + edgeFreeDoc = false; + break; + } + } + if (parentId) { + graph.setGraph({ + rankdir: "LR", + multigraph: true, + compound: true, + // acyclicer: 'greedy', + ranker: "tight-tree", + ranksep: edgeFreeDoc ? 1 : conf$2.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + isMultiGraph: true + // ranksep: 5, + // nodesep: 1 + }); + } else { + graph.setGraph({ + rankdir: "TB", + multigraph: true, + compound: true, + // isCompound: true, + // acyclicer: 'greedy', + // ranker: 'longest-path' + ranksep: edgeFreeDoc ? 1 : conf$2.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + ranker: "tight-tree", + // ranker: 'network-simplex' + isMultiGraph: true + }); + } + graph.setDefaultEdgeLabel(function() { + return {}; + }); + diagObj.db.extract(doc); + const states = diagObj.db.getStates(); + const relations2 = diagObj.db.getRelations(); + const keys2 = Object.keys(states); + for (const key of keys2) { + const stateDef = states[key]; + if (parentId) { + stateDef.parentId = parentId; + } + let node2; + if (stateDef.doc) { + let sub = diagram2.append("g").attr("id", stateDef.id).attr("class", "stateGroup"); + node2 = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root2, domDocument, diagObj); + { + sub = addTitleAndBox(sub, stateDef, altBkg); + let boxBounds = sub.node().getBBox(); + node2.width = boxBounds.width; + node2.height = boxBounds.height + conf$2.padding / 2; + transformationLog[stateDef.id] = { y: conf$2.compositTitleSize }; + } + } else { + node2 = drawState(diagram2, stateDef); + } + if (stateDef.note) { + const noteDef = { + descriptions: [], + id: stateDef.id + "-note", + note: stateDef.note, + type: "note" + }; + const note2 = drawState(diagram2, noteDef); + if (stateDef.note.position === "left of") { + graph.setNode(node2.id + "-note", note2); + graph.setNode(node2.id, node2); + } else { + graph.setNode(node2.id, node2); + graph.setNode(node2.id + "-note", note2); + } + graph.setParent(node2.id, node2.id + "-group"); + graph.setParent(node2.id + "-note", node2.id + "-group"); + } else { + graph.setNode(node2.id, node2); + } + } + log$1.debug("Count=", graph.nodeCount(), graph); + let cnt2 = 0; + relations2.forEach(function(relation) { + cnt2++; + log$1.debug("Setting edge", relation); + graph.setEdge( + relation.id1, + relation.id2, + { + relation, + width: getLabelWidth(relation.title), + height: conf$2.labelHeight * common$1.getRows(relation.title).length, + labelpos: "c" + }, + "id" + cnt2 + ); + }); + layout(graph); + log$1.debug("Graph after layout", graph.nodes()); + const svgElem = diagram2.node(); + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + log$1.warn("Node " + v + ": " + JSON.stringify(graph.node(v))); + root2.select("#" + svgElem.id + " #" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )" + ); + root2.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2); + const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider"); + dividers.forEach((divider2) => { + const parent = divider2.parentElement; + let pWidth = 0; + let pShift = 0; + if (parent) { + if (parent.parentElement) { + pWidth = parent.parentElement.getBBox().width; + } + pShift = parseInt(parent.getAttribute("data-x-shift"), 10); + if (Number.isNaN(pShift)) { + pShift = 0; + } + } + divider2.setAttribute("x1", 0 - pShift + 8); + divider2.setAttribute("x2", pWidth - pShift - 8); + }); + } else { + log$1.debug("No Node " + v + ": " + JSON.stringify(graph.node(v))); + } + }); + let stateBox = svgElem.getBBox(); + graph.edges().forEach(function(e) { + if (e !== void 0 && graph.edge(e) !== void 0) { + log$1.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + drawEdge$1(diagram2, graph.edge(e), graph.edge(e).relation); + } + }); + stateBox = svgElem.getBBox(); + const stateInfo = { + id: parentId ? parentId : "root", + label: parentId ? parentId : "root", + width: 0, + height: 0 + }; + stateInfo.width = stateBox.width + 2 * conf$2.padding; + stateInfo.height = stateBox.height + 2 * conf$2.padding; + log$1.debug("Doc rendered", stateInfo, graph); + return stateInfo; + }; + const renderer$5 = { + setConf: setConf$2, + draw: draw$6 + }; + const diagram$6 = { + parser: parser$8, + db: db$3, + renderer: renderer$5, + styles: styles$3, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db$3.clear(); + } + }; + const stateDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$6 + }, Symbol.toStringTag, { value: "Module" })); + const SHAPE_STATE = "rect"; + const SHAPE_STATE_WITH_DESC = "rectWithTitle"; + const SHAPE_START = "start"; + const SHAPE_END = "end"; + const SHAPE_DIVIDER = "divider"; + const SHAPE_GROUP = "roundedWithTitle"; + const SHAPE_NOTE = "note"; + const SHAPE_NOTEGROUP = "noteGroup"; + const CSS_DIAGRAM = "statediagram"; + const CSS_STATE = "state"; + const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`; + const CSS_EDGE = "transition"; + const CSS_NOTE = "note"; + const CSS_NOTE_EDGE = "note-edge"; + const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`; + const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`; + const CSS_CLUSTER = "cluster"; + const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`; + const CSS_CLUSTER_ALT = "cluster-alt"; + const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`; + const PARENT = "parent"; + const NOTE = "note"; + const DOMID_STATE = "state"; + const DOMID_TYPE_SPACER = "----"; + const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`; + const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`; + const G_EDGE_STYLE = "fill:none"; + const G_EDGE_ARROWHEADSTYLE = "fill: #333"; + const G_EDGE_LABELPOS = "c"; + const G_EDGE_LABELTYPE = "text"; + const G_EDGE_THICKNESS = "normal"; + let nodeDb$1 = {}; + let graphItemCount = 0; + const setConf$1 = function(cnf) { + const keys2 = Object.keys(cnf); + for (const key of keys2) { + cnf[key]; + } + }; + const getClasses$1 = function(text2, diagramObj) { + diagramObj.db.extract(diagramObj.db.getRootDocV2()); + return diagramObj.db.getClasses(); + }; + function getClassesFromDbInfo(dbInfoItem) { + if (dbInfoItem === void 0 || dbInfoItem === null) { + return ""; + } else { + if (dbInfoItem.classes) { + return dbInfoItem.classes.join(" "); + } else { + return ""; + } + } + } + function stateDomId(itemId = "", counter = 0, type2 = "", typeSpacer = DOMID_TYPE_SPACER) { + const typeStr = type2 !== null && type2.length > 0 ? `${typeSpacer}${type2}` : ""; + return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`; + } + const setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => { + const itemId = parsedItem.id; + const classStr = getClassesFromDbInfo(diagramStates[itemId]); + if (itemId !== "root") { + let shape = SHAPE_STATE; + if (parsedItem.start === true) { + shape = SHAPE_START; + } + if (parsedItem.start === false) { + shape = SHAPE_END; + } + if (parsedItem.type !== DEFAULT_STATE_TYPE) { + shape = parsedItem.type; + } + if (!nodeDb$1[itemId]) { + nodeDb$1[itemId] = { + id: itemId, + shape, + description: common$1.sanitizeText(itemId, getConfig$2()), + classes: `${classStr} ${CSS_DIAGRAM_STATE}` + }; + } + const newNode = nodeDb$1[itemId]; + if (parsedItem.description) { + if (Array.isArray(newNode.description)) { + newNode.shape = SHAPE_STATE_WITH_DESC; + newNode.description.push(parsedItem.description); + } else { + if (newNode.description.length > 0) { + newNode.shape = SHAPE_STATE_WITH_DESC; + if (newNode.description === itemId) { + newNode.description = [parsedItem.description]; + } else { + newNode.description = [newNode.description, parsedItem.description]; + } + } else { + newNode.shape = SHAPE_STATE; + newNode.description = parsedItem.description; + } + } + newNode.description = common$1.sanitizeTextOrArray(newNode.description, getConfig$2()); + } + if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) { + newNode.shape = SHAPE_STATE; + } + if (!newNode.type && parsedItem.doc) { + log$1.info("Setting cluster for ", itemId, getDir(parsedItem)); + newNode.type = "group"; + newNode.dir = getDir(parsedItem); + newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP; + newNode.classes = newNode.classes + " " + CSS_DIAGRAM_CLUSTER + " " + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""); + } + const nodeData = { + labelStyle: "", + shape: newNode.shape, + labelText: newNode.description, + // typeof newNode.description === 'object' + // ? newNode.description[0] + // : newNode.description, + classes: newNode.classes, + style: "", + //styles.style, + id: itemId, + dir: newNode.dir, + domId: stateDomId(itemId, graphItemCount), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + nodeData.centerLabel = true; + if (parsedItem.note) { + const noteData = { + labelStyle: "", + shape: SHAPE_NOTE, + labelText: parsedItem.note.text, + classes: CSS_DIAGRAM_NOTE, + // useHtmlLabels: false, + style: "", + // styles.style, + id: itemId + NOTE_ID + "-" + graphItemCount, + domId: stateDomId(itemId, graphItemCount, NOTE), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + const groupData = { + labelStyle: "", + shape: SHAPE_NOTEGROUP, + labelText: parsedItem.note.text, + classes: newNode.classes, + style: "", + // styles.style, + id: itemId + PARENT_ID, + domId: stateDomId(itemId, graphItemCount, PARENT), + type: "group", + padding: 0 + //getConfig().flowchart.padding + }; + graphItemCount++; + const parentNodeId = itemId + PARENT_ID; + g.setNode(parentNodeId, groupData); + g.setNode(noteData.id, noteData); + g.setNode(itemId, nodeData); + g.setParent(itemId, parentNodeId); + g.setParent(noteData.id, parentNodeId); + let from2 = itemId; + let to = noteData.id; + if (parsedItem.note.position === "left of") { + from2 = noteData.id; + to = itemId; + } + g.setEdge(from2, to, { + arrowhead: "none", + arrowType: "", + style: G_EDGE_STYLE, + labelStyle: "", + classes: CSS_EDGE_NOTE_EDGE, + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS + }); + } else { + g.setNode(itemId, nodeData); + } + } + if (parent && parent.id !== "root") { + log$1.trace("Setting node ", itemId, " to be child of its parent ", parent.id); + g.setParent(itemId, parent.id); + } + if (parsedItem.doc) { + log$1.trace("Adding nodes children "); + setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag); + } + }; + const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => { + log$1.trace("items", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case DEFAULT_STATE_TYPE: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case STMT_RELATION: + { + setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag); + setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag); + const edgeData = { + id: "edge" + graphItemCount, + arrowhead: "normal", + arrowTypeEnd: "arrow_barb", + style: G_EDGE_STYLE, + labelStyle: "", + label: common$1.sanitizeText(item.description, getConfig$2()), + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS, + classes: CSS_EDGE + }; + g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount); + graphItemCount++; + } + break; + } + }); + }; + const getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => { + let dir2 = defaultDir; + if (parsedItem.doc) { + for (let i2 = 0; i2 < parsedItem.doc.length; i2++) { + const parsedItemDoc = parsedItem.doc[i2]; + if (parsedItemDoc.stmt === "dir") { + dir2 = parsedItemDoc.value; + } + } + } + return dir2; + }; + const draw$5 = async function(text2, id2, _version, diag) { + log$1.info("Drawing state diagram (v2)", id2); + nodeDb$1 = {}; + diag.db.getDirection(); + const { securityLevel, state: conf2 } = getConfig$2(); + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + log$1.info(diag.db.getRootDocV2()); + diag.db.extract(diag.db.getRootDocV2()); + log$1.info(diag.db.getRootDocV2()); + const diagramStates = diag.db.getStates(); + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: getDir(diag.db.getRootDocV2()), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = root2.select(`[id="${id2}"]`); + const element2 = root2.select("#" + id2 + " g"); + await render(element2, g, ["barb"], CSS_DIAGRAM, id2); + const padding2 = 8; + utils.insertTitle(svg2, "statediagramTitleText", conf2.titleTopMargin, diag.db.getDiagramTitle()); + const bounds2 = svg2.node().getBBox(); + const width2 = bounds2.width + padding2 * 2; + const height = bounds2.height + padding2 * 2; + svg2.attr("class", CSS_DIAGRAM); + const svgBounds = svg2.node().getBBox(); + configureSvgSize(svg2, height, width2, conf2.useMaxWidth); + const vBox = `${svgBounds.x - padding2} ${svgBounds.y - padding2} ${width2} ${height}`; + log$1.debug(`viewBox ${vBox}`); + svg2.attr("viewBox", vBox); + const labels = document.querySelectorAll('[id="' + id2 + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect2 = document.createElementNS("http://www.w3.org/2000/svg", SHAPE_STATE); + rect2.setAttribute("rx", 0); + rect2.setAttribute("ry", 0); + rect2.setAttribute("width", dim.width); + rect2.setAttribute("height", dim.height); + label.insertBefore(rect2, label.firstChild); + } + }; + const renderer$4 = { + setConf: setConf$1, + getClasses: getClasses$1, + draw: draw$5 + }; + const diagram$5 = { + parser: parser$8, + db: db$3, + renderer: renderer$4, + styles: styles$3, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db$3.clear(); + } + }; + const stateDiagramV2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$5 + }, Symbol.toStringTag, { value: "Module" })); + var parser$5 = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 13: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])], + defaultActions: {}, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 18; + case 16: + return 19; + case 17: + return ":"; + case 18: + return 6; + case 19: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$5.parser = parser$5; + const parser$6 = parser$5; + let currentSection$1 = ""; + const sections$1 = []; + const tasks$1 = []; + const rawTasks$1 = []; + const clear$3 = function() { + sections$1.length = 0; + tasks$1.length = 0; + currentSection$1 = ""; + rawTasks$1.length = 0; + clear$l(); + }; + const addSection$1 = function(txt) { + currentSection$1 = txt; + sections$1.push(txt); + }; + const getSections$1 = function() { + return sections$1; + }; + const getTasks$1 = function() { + let allItemsProcessed = compileTasks$1(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks$1(); + iterationCount++; + } + tasks$1.push(...rawTasks$1); + return tasks$1; + }; + const updateActors = function() { + const tempActors = []; + tasks$1.forEach((task) => { + if (task.people) { + tempActors.push(...task.people); + } + }); + const unique = new Set(tempActors); + return [...unique].sort(); + }; + const addTask$1 = function(descr, taskData) { + const pieces = taskData.substr(1).split(":"); + let score = 0; + let peeps = []; + if (pieces.length === 1) { + score = Number(pieces[0]); + peeps = []; + } else { + score = Number(pieces[0]); + peeps = pieces[1].split(","); + } + const peopleList = peeps.map((s) => s.trim()); + const rawTask = { + section: currentSection$1, + type: currentSection$1, + people: peopleList, + task: descr, + score + }; + rawTasks$1.push(rawTask); + }; + const addTaskOrg$1 = function(descr) { + const newTask = { + section: currentSection$1, + type: currentSection$1, + description: descr, + task: descr, + classes: [] + }; + tasks$1.push(newTask); + }; + const compileTasks$1 = function() { + const compileTask = function(pos) { + return rawTasks$1[pos].processed; + }; + let allProcessed = true; + for (const [i2, rawTask] of rawTasks$1.entries()) { + compileTask(i2); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; + }; + const getActors = function() { + return updateActors(); + }; + const db$2 = { + getConfig: () => getConfig$2().journey, + clear: clear$3, + setDiagramTitle, + getDiagramTitle, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addSection: addSection$1, + getSections: getSections$1, + getTasks: getTasks$1, + addTask: addTask$1, + addTaskOrg: addTaskOrg$1, + getActors + }; + const getStyles$3 = (options2) => `.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${options2.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${options2.textColor} + } + + .legend { + fill: ${options2.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${options2.textColor} + } + + .face { + ${options2.faceColor ? `fill: ${options2.faceColor}` : "fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options2.mainBkg}; + stroke: ${options2.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options2.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options2.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${options2.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options2.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${options2.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${options2.tertiaryColor}; + border: 1px solid ${options2.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${options2.fillType0 ? `fill: ${options2.fillType0}` : ""}; + } + .task-type-1, .section-type-1 { + ${options2.fillType0 ? `fill: ${options2.fillType1}` : ""}; + } + .task-type-2, .section-type-2 { + ${options2.fillType0 ? `fill: ${options2.fillType2}` : ""}; + } + .task-type-3, .section-type-3 { + ${options2.fillType0 ? `fill: ${options2.fillType3}` : ""}; + } + .task-type-4, .section-type-4 { + ${options2.fillType0 ? `fill: ${options2.fillType4}` : ""}; + } + .task-type-5, .section-type-5 { + ${options2.fillType0 ? `fill: ${options2.fillType5}` : ""}; + } + .task-type-6, .section-type-6 { + ${options2.fillType0 ? `fill: ${options2.fillType6}` : ""}; + } + .task-type-7, .section-type-7 { + ${options2.fillType0 ? `fill: ${options2.fillType7}` : ""}; + } + + .actor-0 { + ${options2.actor0 ? `fill: ${options2.actor0}` : ""}; + } + .actor-1 { + ${options2.actor1 ? `fill: ${options2.actor1}` : ""}; + } + .actor-2 { + ${options2.actor2 ? `fill: ${options2.actor2}` : ""}; + } + .actor-3 { + ${options2.actor3 ? `fill: ${options2.actor3}` : ""}; + } + .actor-4 { + ${options2.actor4 ? `fill: ${options2.actor4}` : ""}; + } + .actor-5 { + ${options2.actor5 ? `fill: ${options2.actor5}` : ""}; + } +`; + const styles$2 = getStyles$3; + const drawRect$1 = function(elem, rectData) { + return drawRect$4(elem, rectData); + }; + const drawFace$1 = function(element2, faceData) { + const radius = 15; + const circleElement = element2.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element2.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc = d3arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc = d3arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; + }; + const drawCircle$1 = function(element2, circleData) { + const circleElement = element2.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; + }; + const drawText$1 = function(elem, textData) { + return drawText$4(elem, textData); + }; + const drawLabel$1 = function(elem, txtObject) { + function genPoints(x2, y2, width2, height, cut) { + return x2 + "," + y2 + " " + (x2 + width2) + "," + y2 + " " + (x2 + width2) + "," + (y2 + height - cut) + " " + (x2 + width2 - cut * 1.2) + "," + (y2 + height) + " " + x2 + "," + (y2 + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText$1(elem, txtObject); + }; + const drawSection$1 = function(elem, section, conf2) { + const g = elem.append("g"); + const rect2 = getNoteRect$2(); + rect2.x = section.x; + rect2.y = section.y; + rect2.fill = section.fill; + rect2.width = conf2.width * section.taskCount + // width of the tasks + conf2.diagramMarginX * (section.taskCount - 1); + rect2.height = conf2.height; + rect2.class = "journey-section section-type-" + section.num; + rect2.rx = 3; + rect2.ry = 3; + drawRect$1(g, rect2); + _drawTextCandidateFunc$1(conf2)( + section.text, + g, + rect2.x, + rect2.y, + rect2.width, + rect2.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); + }; + let taskCount$1 = -1; + const drawTask$1 = function(elem, task, conf2) { + const center2 = task.x + conf2.width / 2; + const g = elem.append("g"); + taskCount$1++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount$1).attr("x1", center2).attr("y1", task.y).attr("x2", center2).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace$1(g, { + cx: center2, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect2 = getNoteRect$2(); + rect2.x = task.x; + rect2.y = task.y; + rect2.fill = task.fill; + rect2.width = conf2.width; + rect2.height = conf2.height; + rect2.class = "task task-type-" + task.num; + rect2.rx = 3; + rect2.ry = 3; + drawRect$1(g, rect2); + let xPos = task.x + 14; + task.people.forEach((person) => { + const colour = task.actors[person].color; + const circle2 = { + cx: xPos, + cy: task.y, + r: 7, + fill: colour, + stroke: "#000", + title: person, + pos: task.actors[person].position + }; + drawCircle$1(g, circle2); + xPos += 10; + }); + _drawTextCandidateFunc$1(conf2)( + task.task, + g, + rect2.x, + rect2.y, + rect2.width, + rect2.height, + { class: "task" }, + conf2, + task.colour + ); + }; + const drawBackgroundRect$1 = function(elem, bounds2) { + drawBackgroundRect$3(elem, bounds2); + }; + const _drawTextCandidateFunc$1 = function() { + function byText(content2, g, x2, y2, width2, height, textAttrs, colour) { + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2 + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content2); + _setTextAttrs(text2, textAttrs); + } + function byTspan(content2, g, x2, y2, width2, height, textAttrs, conf2, colour) { + const { taskFontSize, taskFontFamily } = conf2; + const lines = content2.split(//gi); + for (let i2 = 0; i2 < lines.length; i2++) { + const dy = i2 * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text2.append("tspan").attr("x", x2 + width2 / 2).attr("dy", dy).text(lines[i2]); + text2.attr("y", y2 + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text2, textAttrs); + } + } + function byFo(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const body = g.append("switch"); + const f2 = body.append("foreignObject").attr("x", x2).attr("y", y2).attr("width", width2).attr("height", height).attr("position", "fixed"); + const text2 = f2.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text2.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content2); + byTspan(content2, body, x2, y2, width2, height, textAttrs, conf2); + _setTextAttrs(text2, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; + }(); + const initGraphics$1 = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); + }; + const svgDraw$2 = { + drawRect: drawRect$1, + drawCircle: drawCircle$1, + drawSection: drawSection$1, + drawText: drawText$1, + drawLabel: drawLabel$1, + drawTask: drawTask$1, + drawBackgroundRect: drawBackgroundRect$1, + initGraphics: initGraphics$1 + }; + const setConf = function(cnf) { + const keys2 = Object.keys(cnf); + keys2.forEach(function(key) { + conf$1[key] = cnf[key]; + }); + }; + const actors = {}; + function drawActorLegend(diagram2) { + const conf2 = getConfig$2().journey; + let yPos = 60; + Object.keys(actors).forEach((person) => { + const colour = actors[person].color; + const circleData = { + cx: 20, + cy: yPos, + r: 7, + fill: colour, + stroke: "#000", + pos: actors[person].position + }; + svgDraw$2.drawCircle(diagram2, circleData); + const labelData = { + x: 40, + y: yPos + 7, + fill: "#666", + text: person, + textMargin: conf2.boxTextMargin | 5 + }; + svgDraw$2.drawText(diagram2, labelData); + yPos += 20; + }); + } + const conf$1 = getConfig$2().journey; + const LEFT_MARGIN = conf$1.leftMargin; + const draw$4 = function(text2, id2, version2, diagObj) { + const conf2 = getConfig$2().journey; + const securityLevel = getConfig$2().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + bounds.init(); + const diagram2 = root2.select("#" + id2); + svgDraw$2.initGraphics(diagram2); + const tasks2 = diagObj.db.getTasks(); + const title2 = diagObj.db.getDiagramTitle(); + const actorNames = diagObj.db.getActors(); + for (const member in actors) { + delete actors[member]; + } + let actorPos = 0; + actorNames.forEach((actorName) => { + actors[actorName] = { + color: conf2.actorColours[actorPos % conf2.actorColours.length], + position: actorPos + }; + actorPos++; + }); + drawActorLegend(diagram2); + bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50); + drawTasks$1(diagram2, tasks2, 0); + const box = bounds.getBounds(); + if (title2) { + diagram2.append("text").text(title2).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25); + } + const height = box.stopy - box.starty + 2 * conf2.diagramMarginY; + const width2 = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX; + configureSvgSize(diagram2, height, width2, conf2.useMaxWidth); + diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width2 - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + const extraVertForTitle = title2 ? 70 : 0; + diagram2.attr("viewBox", `${box.startx} -25 ${width2} ${height + extraVertForTitle}`); + diagram2.attr("preserveAspectRatio", "xMinYMin meet"); + diagram2.attr("height", height + extraVertForTitle + 25); + }; + const bounds = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + init: function() { + this.sequenceItems = []; + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const conf2 = getConfig$2().journey; + const _self = this; + let cnt2 = 0; + function updateFn(type2) { + return function updateItemBounds(item) { + cnt2++; + const n = _self.sequenceItems.length - cnt2 + 1; + _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max); + if (!(type2 === "activation")) { + _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = Math.min(startx, stopx); + const _stopx = Math.max(startx, stopx); + const _starty = Math.min(starty, stopy); + const _stopy = Math.max(starty, stopy); + this.updateVal(bounds.data, "startx", _startx, Math.min); + this.updateVal(bounds.data, "starty", _starty, Math.min); + this.updateVal(bounds.data, "stopx", _stopx, Math.max); + this.updateVal(bounds.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = this.verticalPos; + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return this.data; + } + }; + const fills = conf$1.sectionFills; + const textColours = conf$1.sectionColours; + const drawTasks$1 = function(diagram2, tasks2, verticalPos) { + const conf2 = getConfig$2().journey; + let lastSection = ""; + const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY; + const taskPos = verticalPos + sectionVHeight; + let sectionNumber = 0; + let fill = "#CCC"; + let colour = "black"; + let num = 0; + for (const [i2, task] of tasks2.entries()) { + if (lastSection !== task.section) { + fill = fills[sectionNumber % fills.length]; + num = sectionNumber % fills.length; + colour = textColours[sectionNumber % textColours.length]; + let taskInSectionCount = 0; + const currentSection2 = task.section; + for (let taskIndex = i2; taskIndex < tasks2.length; taskIndex++) { + if (tasks2[taskIndex].section == currentSection2) { + taskInSectionCount = taskInSectionCount + 1; + } else { + break; + } + } + const section = { + x: i2 * conf2.taskMargin + i2 * conf2.width + LEFT_MARGIN, + y: 50, + text: task.section, + fill, + num, + colour, + taskCount: taskInSectionCount + }; + svgDraw$2.drawSection(diagram2, section, conf2); + lastSection = task.section; + sectionNumber++; + } + const taskActors = task.people.reduce((acc, actorName) => { + if (actors[actorName]) { + acc[actorName] = actors[actorName]; + } + return acc; + }, {}); + task.x = i2 * conf2.taskMargin + i2 * conf2.width + LEFT_MARGIN; + task.y = taskPos; + task.width = conf2.diagramMarginX; + task.height = conf2.diagramMarginY; + task.colour = colour; + task.fill = fill; + task.num = num; + task.actors = taskActors; + svgDraw$2.drawTask(diagram2, task, conf2); + bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30); + } + }; + const renderer$3 = { + setConf, + draw: draw$4 + }; + const diagram$4 = { + parser: parser$6, + db: db$2, + renderer: renderer$3, + styles: styles$2, + init: (cnf) => { + renderer$3.setConf(cnf.journey); + db$2.clear(); + } + }; + const journeyDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$4 + }, Symbol.toStringTag, { value: "Module" })); + const findCommonAncestor = (id1, id2, treeData) => { + const { parentById } = treeData; + const visited = /* @__PURE__ */ new Set(); + let currentId = id1; + while (currentId) { + visited.add(currentId); + if (currentId === id2) { + return currentId; + } + currentId = parentById[currentId]; + } + currentId = id2; + while (currentId) { + if (visited.has(currentId)) { + return currentId; + } + currentId = parentById[currentId]; + } + return "root"; + }; + function commonjsRequire(path2) { + throw new Error('Could not dynamically require "' + path2 + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); + } + var elk_bundled = { exports: {} }; + (function(module2, exports2) { + (function(f2) { + { + module2.exports = f2(); + } + })(function() { + return function() { + function r(e, n, t) { + function o(i3, f2) { + if (!n[i3]) { + if (!e[i3]) { + var c2 = "function" == typeof commonjsRequire && commonjsRequire; + if (!f2 && c2) + return c2(i3, true); + if (u) + return u(i3, true); + var a = new Error("Cannot find module '" + i3 + "'"); + throw a.code = "MODULE_NOT_FOUND", a; + } + var p = n[i3] = { exports: {} }; + e[i3][0].call(p.exports, function(r2) { + var n2 = e[i3][1][r2]; + return o(n2 || r2); + }, p, p.exports, r, e, n, t); + } + return n[i3].exports; + } + for (var u = "function" == typeof commonjsRequire && commonjsRequire, i2 = 0; i2 < t.length; i2++) + o(t[i2]); + return o; + } + return r; + }()({ 1: [function(require, module3, exports3) { + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i2 = 0; i2 < props.length; i2++) { + var descriptor = props[i2]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var ELK2 = function() { + function ELK3() { + var _this = this; + var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, defaultLayoutOptions = _ref$defaultLayoutOpt === void 0 ? {} : _ref$defaultLayoutOpt, _ref$algorithms = _ref.algorithms, algorithms = _ref$algorithms === void 0 ? ["layered", "stress", "mrtree", "radial", "force", "disco", "sporeOverlap", "sporeCompaction", "rectpacking"] : _ref$algorithms, workerFactory = _ref.workerFactory, workerUrl = _ref.workerUrl; + _classCallCheck(this, ELK3); + this.defaultLayoutOptions = defaultLayoutOptions; + this.initialized = false; + if (typeof workerUrl === "undefined" && typeof workerFactory === "undefined") { + throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'."); + } + var factory = workerFactory; + if (typeof workerUrl !== "undefined" && typeof workerFactory === "undefined") { + factory = function factory2(url) { + return new Worker(url); + }; + } + var worker = factory(workerUrl); + if (typeof worker.postMessage !== "function") { + throw new TypeError("Created worker does not provide the required 'postMessage' function."); + } + this.worker = new PromisedWorker(worker); + this.worker.postMessage({ + cmd: "register", + algorithms + }).then(function(r) { + return _this.initialized = true; + }).catch(console.err); + } + _createClass(ELK3, [{ + key: "layout", + value: function layout2(graph) { + var _ref2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref2$layoutOptions = _ref2.layoutOptions, layoutOptions = _ref2$layoutOptions === void 0 ? this.defaultLayoutOptions : _ref2$layoutOptions, _ref2$logging = _ref2.logging, logging = _ref2$logging === void 0 ? false : _ref2$logging, _ref2$measureExecutio = _ref2.measureExecutionTime, measureExecutionTime = _ref2$measureExecutio === void 0 ? false : _ref2$measureExecutio; + if (!graph) { + return Promise.reject(new Error("Missing mandatory parameter 'graph'.")); + } + return this.worker.postMessage({ + cmd: "layout", + graph, + layoutOptions, + options: { + logging, + measureExecutionTime + } + }); + } + }, { + key: "knownLayoutAlgorithms", + value: function knownLayoutAlgorithms() { + return this.worker.postMessage({ cmd: "algorithms" }); + } + }, { + key: "knownLayoutOptions", + value: function knownLayoutOptions() { + return this.worker.postMessage({ cmd: "options" }); + } + }, { + key: "knownLayoutCategories", + value: function knownLayoutCategories() { + return this.worker.postMessage({ cmd: "categories" }); + } + }, { + key: "terminateWorker", + value: function terminateWorker() { + this.worker.terminate(); + } + }]); + return ELK3; + }(); + exports3.default = ELK2; + var PromisedWorker = function() { + function PromisedWorker2(worker) { + var _this2 = this; + _classCallCheck(this, PromisedWorker2); + if (worker === void 0) { + throw new Error("Missing mandatory parameter 'worker'."); + } + this.resolvers = {}; + this.worker = worker; + this.worker.onmessage = function(answer) { + setTimeout(function() { + _this2.receive(_this2, answer); + }, 0); + }; + } + _createClass(PromisedWorker2, [{ + key: "postMessage", + value: function postMessage(msg) { + var id2 = this.id || 0; + this.id = id2 + 1; + msg.id = id2; + var self2 = this; + return new Promise(function(resolve, reject) { + self2.resolvers[id2] = function(err, res) { + if (err) { + self2.convertGwtStyleError(err); + reject(err); + } else { + resolve(res); + } + }; + self2.worker.postMessage(msg); + }); + } + }, { + key: "receive", + value: function receive(self2, answer) { + var json2 = answer.data; + var resolver2 = self2.resolvers[json2.id]; + if (resolver2) { + delete self2.resolvers[json2.id]; + if (json2.error) { + resolver2(json2.error); + } else { + resolver2(null, json2.data); + } + } + } + }, { + key: "terminate", + value: function terminate() { + if (this.worker.terminate) { + this.worker.terminate(); + } + } + }, { + key: "convertGwtStyleError", + value: function convertGwtStyleError(err) { + if (!err) { + return; + } + var javaException = err["__java$exception"]; + if (javaException) { + if (javaException.cause && javaException.cause.backingJsObject) { + err.cause = javaException.cause.backingJsObject; + this.convertGwtStyleError(err.cause); + } + delete err["__java$exception"]; + } + } + }]); + return PromisedWorker2; + }(); + }, {}], 2: [function(require, module3, exports3) { + (function(global2) { + (function() { + var $wnd; + if (typeof window !== "undefined") + $wnd = window; + else if (typeof global2 !== "undefined") + $wnd = global2; + else if (typeof self !== "undefined") + $wnd = self; + var o; + function nb() { + } + function xb() { + } + function Fd() { + } + function $g() { + } + function _p() { + } + function yq() { + } + function Sq() { + } + function Es() { + } + function Jw() { + } + function Vw() { + } + function VA() { + } + function dA() { + } + function MA() { + } + function PA() { + } + function PB() { + } + function bx() { + } + function cx() { + } + function vy() { + } + function Nz() { + } + function Yz() { + } + function Ylb() { + } + function Ymb() { + } + function xmb() { + } + function Fmb() { + } + function Qmb() { + } + function gcb() { + } + function ccb() { + } + function jcb() { + } + function jtb() { + } + function otb() { + } + function qtb() { + } + function _fb() { + } + function bpb() { + } + function kpb() { + } + function ppb() { + } + function Gpb() { + } + function drb() { + } + function dzb() { + } + function fzb() { + } + function fxb() { + } + function Vxb() { + } + function Ovb() { + } + function byb() { + } + function zyb() { + } + function Zyb() { + } + function _yb() { + } + function hzb() { + } + function jzb() { + } + function lzb() { + } + function nzb() { + } + function rzb() { + } + function zzb() { + } + function Czb() { + } + function Ezb() { + } + function Gzb() { + } + function Izb() { + } + function Mzb() { + } + function bBb() { + } + function NBb() { + } + function PBb() { + } + function RBb() { + } + function iCb() { + } + function OCb() { + } + function SCb() { + } + function GDb() { + } + function JDb() { + } + function fEb() { + } + function xEb() { + } + function CEb() { + } + function GEb() { + } + function yFb() { + } + function KGb() { + } + function tIb() { + } + function vIb() { + } + function xIb() { + } + function zIb() { + } + function OIb() { + } + function SIb() { + } + function TJb() { + } + function VJb() { + } + function XJb() { + } + function XKb() { + } + function fKb() { + } + function VKb() { + } + function VLb() { + } + function jLb() { + } + function nLb() { + } + function GLb() { + } + function KLb() { + } + function MLb() { + } + function OLb() { + } + function RLb() { + } + function YLb() { + } + function bMb() { + } + function gMb() { + } + function lMb() { + } + function pMb() { + } + function wMb() { + } + function zMb() { + } + function CMb() { + } + function FMb() { + } + function LMb() { + } + function zNb() { + } + function PNb() { + } + function kOb() { + } + function pOb() { + } + function tOb() { + } + function yOb() { + } + function FOb() { + } + function GPb() { + } + function aQb() { + } + function cQb() { + } + function eQb() { + } + function gQb() { + } + function iQb() { + } + function CQb() { + } + function MQb() { + } + function OQb() { + } + function ASb() { + } + function fTb() { + } + function kTb() { + } + function STb() { + } + function fUb() { + } + function DUb() { + } + function VUb() { + } + function YUb() { + } + function _Ub() { + } + function _Wb() { + } + function QWb() { + } + function XWb() { + } + function jVb() { + } + function DVb() { + } + function VVb() { + } + function $Vb() { + } + function dXb() { + } + function hXb() { + } + function lXb() { + } + function gYb() { + } + function HYb() { + } + function SYb() { + } + function VYb() { + } + function dZb() { + } + function P$b() { + } + function T$b() { + } + function h1b() { + } + function m1b() { + } + function q1b() { + } + function u1b() { + } + function y1b() { + } + function C1b() { + } + function e2b() { + } + function g2b() { + } + function m2b() { + } + function q2b() { + } + function u2b() { + } + function S2b() { + } + function U2b() { + } + function W2b() { + } + function _2b() { + } + function e3b() { + } + function h3b() { + } + function p3b() { + } + function t3b() { + } + function w3b() { + } + function y3b() { + } + function A3b() { + } + function M3b() { + } + function Q3b() { + } + function U3b() { + } + function Y3b() { + } + function l4b() { + } + function q4b() { + } + function s4b() { + } + function u4b() { + } + function w4b() { + } + function y4b() { + } + function L4b() { + } + function N4b() { + } + function P4b() { + } + function R4b() { + } + function T4b() { + } + function X4b() { + } + function I5b() { + } + function Q5b() { + } + function T5b() { + } + function Z5b() { + } + function l6b() { + } + function o6b() { + } + function t6b() { + } + function z6b() { + } + function L6b() { + } + function M6b() { + } + function P6b() { + } + function X6b() { + } + function $6b() { + } + function a7b() { + } + function c7b() { + } + function g7b() { + } + function j7b() { + } + function m7b() { + } + function r7b() { + } + function x7b() { + } + function D7b() { + } + function D9b() { + } + function b9b() { + } + function h9b() { + } + function j9b() { + } + function l9b() { + } + function w9b() { + } + function F9b() { + } + function hac() { + } + function jac() { + } + function pac() { + } + function uac() { + } + function Iac() { + } + function Kac() { + } + function Sac() { + } + function obc() { + } + function rbc() { + } + function vbc() { + } + function Fbc() { + } + function Jbc() { + } + function Xbc() { + } + function ccc() { + } + function fcc() { + } + function lcc() { + } + function occ() { + } + function tcc() { + } + function ycc() { + } + function Acc() { + } + function Ccc() { + } + function Ecc() { + } + function Gcc() { + } + function Zcc() { + } + function _cc() { + } + function bdc() { + } + function fdc() { + } + function jdc() { + } + function pdc() { + } + function sdc() { + } + function ydc() { + } + function Adc() { + } + function Cdc() { + } + function Edc() { + } + function Idc() { + } + function Ndc() { + } + function Qdc() { + } + function Sdc() { + } + function Udc() { + } + function Wdc() { + } + function Ydc() { + } + function aec() { + } + function hec() { + } + function jec() { + } + function lec() { + } + function nec() { + } + function uec() { + } + function wec() { + } + function yec() { + } + function Aec() { + } + function Fec() { + } + function Jec() { + } + function Lec() { + } + function Nec() { + } + function Rec() { + } + function Uec() { + } + function Zec() { + } + function Zfc() { + } + function lfc() { + } + function tfc() { + } + function xfc() { + } + function zfc() { + } + function Ffc() { + } + function Jfc() { + } + function Nfc() { + } + function Pfc() { + } + function Vfc() { + } + function _fc() { + } + function fgc() { + } + function jgc() { + } + function lgc() { + } + function Bgc() { + } + function ehc() { + } + function ghc() { + } + function ihc() { + } + function khc() { + } + function mhc() { + } + function ohc() { + } + function qhc() { + } + function yhc() { + } + function Ahc() { + } + function Ghc() { + } + function Ihc() { + } + function Khc() { + } + function Mhc() { + } + function Shc() { + } + function Uhc() { + } + function Whc() { + } + function dic() { + } + function dlc() { + } + function blc() { + } + function flc() { + } + function hlc() { + } + function jlc() { + } + function Glc() { + } + function Ilc() { + } + function Klc() { + } + function Mlc() { + } + function Mjc() { + } + function Qjc() { + } + function Qlc() { + } + function Ulc() { + } + function Ylc() { + } + function Lkc() { + } + function Nkc() { + } + function Pkc() { + } + function Rkc() { + } + function Xkc() { + } + function _kc() { + } + function gmc() { + } + function kmc() { + } + function zmc() { + } + function Fmc() { + } + function Wmc() { + } + function $mc() { + } + function anc() { + } + function mnc() { + } + function wnc() { + } + function Hnc() { + } + function Jnc() { + } + function Lnc() { + } + function Nnc() { + } + function Pnc() { + } + function Ync() { + } + function eoc() { + } + function Aoc() { + } + function Coc() { + } + function Eoc() { + } + function Joc() { + } + function Loc() { + } + function Zoc() { + } + function _oc() { + } + function bpc() { + } + function hpc() { + } + function kpc() { + } + function ppc() { + } + function pFc() { + } + function Ryc() { + } + function QCc() { + } + function PDc() { + } + function xGc() { + } + function HGc() { + } + function JGc() { + } + function NGc() { + } + function GIc() { + } + function iKc() { + } + function mKc() { + } + function wKc() { + } + function yKc() { + } + function AKc() { + } + function EKc() { + } + function KKc() { + } + function OKc() { + } + function QKc() { + } + function SKc() { + } + function UKc() { + } + function YKc() { + } + function aLc() { + } + function fLc() { + } + function hLc() { + } + function nLc() { + } + function pLc() { + } + function tLc() { + } + function vLc() { + } + function zLc() { + } + function BLc() { + } + function DLc() { + } + function FLc() { + } + function sMc() { + } + function JMc() { + } + function hNc() { + } + function RNc() { + } + function ZNc() { + } + function _Nc() { + } + function bOc() { + } + function dOc() { + } + function fOc() { + } + function hOc() { + } + function hRc() { + } + function jRc() { + } + function KRc() { + } + function NRc() { + } + function NQc() { + } + function LQc() { + } + function _Qc() { + } + function cPc() { + } + function iPc() { + } + function kPc() { + } + function mPc() { + } + function xPc() { + } + function zPc() { + } + function zSc() { + } + function BSc() { + } + function GSc() { + } + function ISc() { + } + function NSc() { + } + function TSc() { + } + function NTc() { + } + function NVc() { + } + function oVc() { + } + function SVc() { + } + function VVc() { + } + function XVc() { + } + function ZVc() { + } + function bWc() { + } + function bXc() { + } + function CXc() { + } + function FXc() { + } + function IXc() { + } + function MXc() { + } + function UXc() { + } + function bYc() { + } + function fYc() { + } + function oYc() { + } + function qYc() { + } + function uYc() { + } + function pZc() { + } + function G$c() { + } + function h0c() { + } + function N0c() { + } + function k1c() { + } + function I1c() { + } + function Q1c() { + } + function f2c() { + } + function i2c() { + } + function k2c() { + } + function w2c() { + } + function O2c() { + } + function S2c() { + } + function Z2c() { + } + function v3c() { + } + function x3c() { + } + function R3c() { + } + function U3c() { + } + function e4c() { + } + function w4c() { + } + function x4c() { + } + function z4c() { + } + function B4c() { + } + function D4c() { + } + function F4c() { + } + function H4c() { + } + function J4c() { + } + function L4c() { + } + function N4c() { + } + function P4c() { + } + function R4c() { + } + function T4c() { + } + function V4c() { + } + function X4c() { + } + function Z4c() { + } + function _4c() { + } + function _7c() { + } + function b5c() { + } + function d5c() { + } + function f5c() { + } + function h5c() { + } + function H5c() { + } + function Hfd() { + } + function Zfd() { + } + function Zed() { + } + function ged() { + } + function Jed() { + } + function Ned() { + } + function Red() { + } + function Ved() { + } + function bbd() { + } + function mdd() { + } + function _fd() { + } + function fgd() { + } + function kgd() { + } + function Mgd() { + } + function Ahd() { + } + function Ald() { + } + function Tld() { + } + function xkd() { + } + function rmd() { + } + function knd() { + } + function Jod() { + } + function JCd() { + } + function Bpd() { + } + function BFd() { + } + function oFd() { + } + function bqd() { + } + function bvd() { + } + function jvd() { + } + function yud() { + } + function Hxd() { + } + function EBd() { + } + function aDd() { + } + function MGd() { + } + function vHd() { + } + function RHd() { + } + function wNd() { + } + function zNd() { + } + function CNd() { + } + function KNd() { + } + function XNd() { + } + function $Nd() { + } + function HPd() { + } + function lUd() { + } + function XUd() { + } + function DWd() { + } + function GWd() { + } + function JWd() { + } + function MWd() { + } + function PWd() { + } + function SWd() { + } + function VWd() { + } + function YWd() { + } + function _Wd() { + } + function xYd() { + } + function BYd() { + } + function mZd() { + } + function EZd() { + } + function GZd() { + } + function JZd() { + } + function MZd() { + } + function PZd() { + } + function SZd() { + } + function VZd() { + } + function YZd() { + } + function _Zd() { + } + function c$d() { + } + function f$d() { + } + function i$d() { + } + function l$d() { + } + function o$d() { + } + function r$d() { + } + function u$d() { + } + function x$d() { + } + function A$d() { + } + function D$d() { + } + function G$d() { + } + function J$d() { + } + function M$d() { + } + function P$d() { + } + function S$d() { + } + function V$d() { + } + function Y$d() { + } + function _$d() { + } + function c_d() { + } + function f_d() { + } + function i_d() { + } + function l_d() { + } + function o_d() { + } + function r_d() { + } + function u_d() { + } + function x_d() { + } + function A_d() { + } + function D_d() { + } + function G_d() { + } + function J_d() { + } + function M_d() { + } + function P_d() { + } + function S_d() { + } + function V_d() { + } + function Y_d() { + } + function h5d() { + } + function U6d() { + } + function U9d() { + } + function _8d() { + } + function fae() { + } + function hae() { + } + function kae() { + } + function nae() { + } + function qae() { + } + function tae() { + } + function wae() { + } + function zae() { + } + function Cae() { + } + function Fae() { + } + function Iae() { + } + function Lae() { + } + function Oae() { + } + function Rae() { + } + function Uae() { + } + function Xae() { + } + function $ae() { + } + function bbe() { + } + function ebe() { + } + function hbe() { + } + function kbe() { + } + function nbe() { + } + function qbe() { + } + function tbe() { + } + function wbe() { + } + function zbe() { + } + function Cbe() { + } + function Fbe() { + } + function Ibe() { + } + function Lbe() { + } + function Obe() { + } + function Rbe() { + } + function Ube() { + } + function Xbe() { + } + function $be() { + } + function bce() { + } + function ece() { + } + function hce() { + } + function kce() { + } + function nce() { + } + function qce() { + } + function tce() { + } + function wce() { + } + function zce() { + } + function Cce() { + } + function Fce() { + } + function Ice() { + } + function Lce() { + } + function Oce() { + } + function Rce() { + } + function Uce() { + } + function Xce() { + } + function ude() { + } + function Vge() { + } + function dhe() { + } + function ol() { + wb(); + } + function oPb() { + nPb(); + } + function EPb() { + CPb(); + } + function gFb() { + fFb(); + } + function TRb() { + SRb(); + } + function ySb() { + wSb(); + } + function PSb() { + OSb(); + } + function dTb() { + bTb(); + } + function i4b() { + b4b(); + } + function D2b() { + x2b(); + } + function J6b() { + D6b(); + } + function u9b() { + q9b(); + } + function $9b() { + I9b(); + } + function Umc() { + Imc(); + } + function abc() { + Vac(); + } + function ZCc() { + VCc(); + } + function kCc() { + hCc(); + } + function rCc() { + oCc(); + } + function Tcc() { + Occ(); + } + function xkc() { + gkc(); + } + function xDc() { + rDc(); + } + function iDc() { + cDc(); + } + function kwc() { + jwc(); + } + function tJc() { + jJc(); + } + function dJc() { + aJc(); + } + function Pyc() { + Nyc(); + } + function VBc() { + SBc(); + } + function CFc() { + yFc(); + } + function CUc() { + wUc(); + } + function lUc() { + fUc(); + } + function sUc() { + pUc(); + } + function IUc() { + GUc(); + } + function IWc() { + HWc(); + } + function _Wc() { + ZWc(); + } + function fHc() { + dHc(); + } + function f0c() { + d0c(); + } + function B0c() { + A0c(); + } + function L0c() { + J0c(); + } + function LTc() { + JTc(); + } + function sTc() { + rTc(); + } + function KLc() { + ILc(); + } + function wNc() { + tNc(); + } + function PYc() { + OYc(); + } + function nZc() { + lZc(); + } + function q3c() { + p3c(); + } + function Z7c() { + X7c(); + } + function Z9c() { + Y9c(); + } + function _ad() { + Zad(); + } + function kdd() { + idd(); + } + function $md() { + Smd(); + } + function HGd() { + tGd(); + } + function hLd() { + NKd(); + } + function J6d() { + Uge(); + } + function Mvb(a) { + uCb(a); + } + function Yb(a) { + this.a = a; + } + function cc(a) { + this.a = a; + } + function cj(a) { + this.a = a; + } + function ij(a) { + this.a = a; + } + function Dj(a) { + this.a = a; + } + function df(a) { + this.a = a; + } + function kf(a) { + this.a = a; + } + function ah(a) { + this.a = a; + } + function lh(a) { + this.a = a; + } + function th(a) { + this.a = a; + } + function Ph(a) { + this.a = a; + } + function vi(a) { + this.a = a; + } + function Ci(a) { + this.a = a; + } + function Fk(a) { + this.a = a; + } + function Ln(a) { + this.a = a; + } + function ap(a) { + this.a = a; + } + function zp(a) { + this.a = a; + } + function Yp(a) { + this.a = a; + } + function qq(a) { + this.a = a; + } + function Dq(a) { + this.a = a; + } + function wr(a) { + this.a = a; + } + function Ir(a) { + this.b = a; + } + function sj(a) { + this.c = a; + } + function sw(a) { + this.a = a; + } + function fw(a) { + this.a = a; + } + function xw(a) { + this.a = a; + } + function Cw(a) { + this.a = a; + } + function Qw(a) { + this.a = a; + } + function Rw(a) { + this.a = a; + } + function Xw(a) { + this.a = a; + } + function Xv(a) { + this.a = a; + } + function Sv(a) { + this.a = a; + } + function eu(a) { + this.a = a; + } + function Zx(a) { + this.a = a; + } + function _x(a) { + this.a = a; + } + function xy(a) { + this.a = a; + } + function xB(a) { + this.a = a; + } + function HB(a) { + this.a = a; + } + function TB(a) { + this.a = a; + } + function fC(a) { + this.a = a; + } + function wB() { + this.a = []; + } + function MBb(a, b) { + a.a = b; + } + function w_b(a, b) { + a.a = b; + } + function x_b(a, b) { + a.b = b; + } + function YOb(a, b) { + a.b = b; + } + function $Ob(a, b) { + a.b = b; + } + function ZGb(a, b) { + a.j = b; + } + function qNb(a, b) { + a.g = b; + } + function rNb(a, b) { + a.i = b; + } + function dRb(a, b) { + a.c = b; + } + function eRb(a, b) { + a.d = b; + } + function z_b(a, b) { + a.d = b; + } + function y_b(a, b) { + a.c = b; + } + function __b(a, b) { + a.k = b; + } + function E0b(a, b) { + a.c = b; + } + function njc(a, b) { + a.c = b; + } + function mjc(a, b) { + a.a = b; + } + function dFc(a, b) { + a.a = b; + } + function eFc(a, b) { + a.f = b; + } + function nOc(a, b) { + a.a = b; + } + function oOc(a, b) { + a.b = b; + } + function pOc(a, b) { + a.d = b; + } + function qOc(a, b) { + a.i = b; + } + function rOc(a, b) { + a.o = b; + } + function sOc(a, b) { + a.r = b; + } + function $Pc(a, b) { + a.a = b; + } + function _Pc(a, b) { + a.b = b; + } + function DVc(a, b) { + a.e = b; + } + function EVc(a, b) { + a.f = b; + } + function FVc(a, b) { + a.g = b; + } + function SZc(a, b) { + a.e = b; + } + function TZc(a, b) { + a.f = b; + } + function c$c(a, b) { + a.f = b; + } + function bJd(a, b) { + a.n = b; + } + function A1d(a, b) { + a.a = b; + } + function J1d(a, b) { + a.a = b; + } + function B1d(a, b) { + a.c = b; + } + function K1d(a, b) { + a.c = b; + } + function L1d(a, b) { + a.d = b; + } + function M1d(a, b) { + a.e = b; + } + function N1d(a, b) { + a.g = b; + } + function d2d(a, b) { + a.a = b; + } + function e2d(a, b) { + a.c = b; + } + function f2d(a, b) { + a.d = b; + } + function g2d(a, b) { + a.e = b; + } + function h2d(a, b) { + a.f = b; + } + function i2d(a, b) { + a.j = b; + } + function Z8d(a, b) { + a.a = b; + } + function $8d(a, b) { + a.b = b; + } + function g9d(a, b) { + a.a = b; + } + function Cic(a) { + a.b = a.a; + } + function Dg(a) { + a.c = a.d.d; + } + function vib(a) { + this.d = a; + } + function eib(a) { + this.a = a; + } + function Pib(a) { + this.a = a; + } + function Vib(a) { + this.a = a; + } + function $ib(a) { + this.a = a; + } + function mcb(a) { + this.a = a; + } + function Mcb(a) { + this.a = a; + } + function Xcb(a) { + this.a = a; + } + function Ndb(a) { + this.a = a; + } + function _db(a) { + this.a = a; + } + function teb(a) { + this.a = a; + } + function Qeb(a) { + this.a = a; + } + function djb(a) { + this.a = a; + } + function Gjb(a) { + this.a = a; + } + function Njb(a) { + this.a = a; + } + function Bjb(a) { + this.b = a; + } + function lnb(a) { + this.b = a; + } + function Dnb(a) { + this.b = a; + } + function anb(a) { + this.a = a; + } + function Mob(a) { + this.a = a; + } + function Rob(a) { + this.a = a; + } + function iob(a) { + this.c = a; + } + function olb(a) { + this.c = a; + } + function qub(a) { + this.c = a; + } + function Tub(a) { + this.a = a; + } + function Vub(a) { + this.a = a; + } + function Xub(a) { + this.a = a; + } + function Zub(a) { + this.a = a; + } + function tpb(a) { + this.a = a; + } + function _pb(a) { + this.a = a; + } + function Wqb(a) { + this.a = a; + } + function nsb(a) { + this.a = a; + } + function Rxb(a) { + this.a = a; + } + function Txb(a) { + this.a = a; + } + function Xxb(a) { + this.a = a; + } + function bzb(a) { + this.a = a; + } + function tzb(a) { + this.a = a; + } + function vzb(a) { + this.a = a; + } + function xzb(a) { + this.a = a; + } + function Kzb(a) { + this.a = a; + } + function Ozb(a) { + this.a = a; + } + function iAb(a) { + this.a = a; + } + function kAb(a) { + this.a = a; + } + function mAb(a) { + this.a = a; + } + function BAb(a) { + this.a = a; + } + function hBb(a) { + this.a = a; + } + function jBb(a) { + this.a = a; + } + function nBb(a) { + this.a = a; + } + function TBb(a) { + this.a = a; + } + function XBb(a) { + this.a = a; + } + function QCb(a) { + this.a = a; + } + function WCb(a) { + this.a = a; + } + function _Cb(a) { + this.a = a; + } + function dEb(a) { + this.a = a; + } + function QGb(a) { + this.a = a; + } + function YGb(a) { + this.a = a; + } + function tKb(a) { + this.a = a; + } + function CLb(a) { + this.a = a; + } + function JMb(a) { + this.a = a; + } + function RNb(a) { + this.a = a; + } + function kQb(a) { + this.a = a; + } + function mQb(a) { + this.a = a; + } + function FQb(a) { + this.a = a; + } + function ETb(a) { + this.a = a; + } + function UTb(a) { + this.a = a; + } + function dUb(a) { + this.a = a; + } + function hUb(a) { + this.a = a; + } + function EZb(a) { + this.a = a; + } + function j$b(a) { + this.a = a; + } + function v$b(a) { + this.e = a; + } + function J0b(a) { + this.a = a; + } + function M0b(a) { + this.a = a; + } + function R0b(a) { + this.a = a; + } + function U0b(a) { + this.a = a; + } + function i2b(a) { + this.a = a; + } + function k2b(a) { + this.a = a; + } + function o2b(a) { + this.a = a; + } + function s2b(a) { + this.a = a; + } + function G2b(a) { + this.a = a; + } + function I2b(a) { + this.a = a; + } + function K2b(a) { + this.a = a; + } + function M2b(a) { + this.a = a; + } + function W3b(a) { + this.a = a; + } + function $3b(a) { + this.a = a; + } + function V4b(a) { + this.a = a; + } + function u5b(a) { + this.a = a; + } + function A7b(a) { + this.a = a; + } + function G7b(a) { + this.a = a; + } + function J7b(a) { + this.a = a; + } + function M7b(a) { + this.a = a; + } + function Mbc(a) { + this.a = a; + } + function Pbc(a) { + this.a = a; + } + function lac(a) { + this.a = a; + } + function nac(a) { + this.a = a; + } + function qcc(a) { + this.a = a; + } + function Gdc(a) { + this.a = a; + } + function $dc(a) { + this.a = a; + } + function cec(a) { + this.a = a; + } + function _ec(a) { + this.a = a; + } + function pfc(a) { + this.a = a; + } + function Bfc(a) { + this.a = a; + } + function Lfc(a) { + this.a = a; + } + function ygc(a) { + this.a = a; + } + function Dgc(a) { + this.a = a; + } + function shc(a) { + this.a = a; + } + function uhc(a) { + this.a = a; + } + function whc(a) { + this.a = a; + } + function Chc(a) { + this.a = a; + } + function Ehc(a) { + this.a = a; + } + function Ohc(a) { + this.a = a; + } + function Yhc(a) { + this.a = a; + } + function Tkc(a) { + this.a = a; + } + function Vkc(a) { + this.a = a; + } + function Olc(a) { + this.a = a; + } + function pnc(a) { + this.a = a; + } + function rnc(a) { + this.a = a; + } + function dpc(a) { + this.a = a; + } + function fpc(a) { + this.a = a; + } + function GCc(a) { + this.a = a; + } + function KCc(a) { + this.a = a; + } + function mDc(a) { + this.a = a; + } + function jEc(a) { + this.a = a; + } + function HEc(a) { + this.a = a; + } + function FEc(a) { + this.c = a; + } + function qoc(a) { + this.b = a; + } + function bFc(a) { + this.a = a; + } + function GFc(a) { + this.a = a; + } + function iGc(a) { + this.a = a; + } + function kGc(a) { + this.a = a; + } + function mGc(a) { + this.a = a; + } + function $Gc(a) { + this.a = a; + } + function hIc(a) { + this.a = a; + } + function lIc(a) { + this.a = a; + } + function pIc(a) { + this.a = a; + } + function tIc(a) { + this.a = a; + } + function xIc(a) { + this.a = a; + } + function zIc(a) { + this.a = a; + } + function CIc(a) { + this.a = a; + } + function LIc(a) { + this.a = a; + } + function CKc(a) { + this.a = a; + } + function IKc(a) { + this.a = a; + } + function MKc(a) { + this.a = a; + } + function $Kc(a) { + this.a = a; + } + function cLc(a) { + this.a = a; + } + function jLc(a) { + this.a = a; + } + function rLc(a) { + this.a = a; + } + function xLc(a) { + this.a = a; + } + function OMc(a) { + this.a = a; + } + function ZOc(a) { + this.a = a; + } + function ZRc(a) { + this.a = a; + } + function aSc(a) { + this.a = a; + } + function I$c(a) { + this.a = a; + } + function K$c(a) { + this.a = a; + } + function M$c(a) { + this.a = a; + } + function O$c(a) { + this.a = a; + } + function U$c(a) { + this.a = a; + } + function n1c(a) { + this.a = a; + } + function z1c(a) { + this.a = a; + } + function B1c(a) { + this.a = a; + } + function Q2c(a) { + this.a = a; + } + function U2c(a) { + this.a = a; + } + function z3c(a) { + this.a = a; + } + function med(a) { + this.a = a; + } + function Xed(a) { + this.a = a; + } + function _ed(a) { + this.a = a; + } + function Qfd(a) { + this.a = a; + } + function Bgd(a) { + this.a = a; + } + function $gd(a) { + this.a = a; + } + function lrd(a) { + this.a = a; + } + function urd(a) { + this.a = a; + } + function vrd(a) { + this.a = a; + } + function wrd(a) { + this.a = a; + } + function xrd(a) { + this.a = a; + } + function yrd(a) { + this.a = a; + } + function zrd(a) { + this.a = a; + } + function Ard(a) { + this.a = a; + } + function Brd(a) { + this.a = a; + } + function Crd(a) { + this.a = a; + } + function Ird(a) { + this.a = a; + } + function Krd(a) { + this.a = a; + } + function Lrd(a) { + this.a = a; + } + function Mrd(a) { + this.a = a; + } + function Nrd(a) { + this.a = a; + } + function Prd(a) { + this.a = a; + } + function Srd(a) { + this.a = a; + } + function Yrd(a) { + this.a = a; + } + function Zrd(a) { + this.a = a; + } + function _rd(a) { + this.a = a; + } + function asd(a) { + this.a = a; + } + function bsd(a) { + this.a = a; + } + function csd(a) { + this.a = a; + } + function dsd(a) { + this.a = a; + } + function msd(a) { + this.a = a; + } + function osd(a) { + this.a = a; + } + function qsd(a) { + this.a = a; + } + function ssd(a) { + this.a = a; + } + function Wsd(a) { + this.a = a; + } + function Lsd(a) { + this.b = a; + } + function thd(a) { + this.f = a; + } + function qtd(a) { + this.a = a; + } + function yBd(a) { + this.a = a; + } + function GBd(a) { + this.a = a; + } + function MBd(a) { + this.a = a; + } + function SBd(a) { + this.a = a; + } + function iCd(a) { + this.a = a; + } + function YMd(a) { + this.a = a; + } + function GNd(a) { + this.a = a; + } + function EPd(a) { + this.a = a; + } + function EQd(a) { + this.a = a; + } + function NTd(a) { + this.a = a; + } + function qOd(a) { + this.b = a; + } + function lVd(a) { + this.c = a; + } + function VVd(a) { + this.e = a; + } + function iYd(a) { + this.a = a; + } + function RYd(a) { + this.a = a; + } + function ZYd(a) { + this.a = a; + } + function z0d(a) { + this.a = a; + } + function O0d(a) { + this.a = a; + } + function s0d(a) { + this.d = a; + } + function W5d(a) { + this.a = a; + } + function cge(a) { + this.a = a; + } + function xfe(a) { + this.e = a; + } + function Tfd() { + this.a = 0; + } + function jkb() { + Vjb(this); + } + function Rkb() { + Ckb(this); + } + function Lqb() { + Uhb(this); + } + function lEb() { + kEb(this); + } + function A_b() { + } + function UQd() { + this.c = FQd; + } + function v6d(a, b) { + b.Wb(a); + } + function moc(a, b) { + a.b += b; + } + function yXb(a) { + a.b = new Ji(); + } + function vbb(a) { + return a.e; + } + function DB(a) { + return a.a; + } + function LB(a) { + return a.a; + } + function ZB(a) { + return a.a; + } + function lC(a) { + return a.a; + } + function EC(a) { + return a.a; + } + function wC() { + return null; + } + function SB() { + return null; + } + function hcb() { + mvd(); + ovd(); + } + function zJb(a) { + a.b.tf(a.e); + } + function j5b(a, b) { + a.b = b - a.b; + } + function g5b(a, b) { + a.a = b - a.a; + } + function PXc(a, b) { + b.ad(a.a); + } + function plc(a, b) { + G0b(b, a); + } + function hp(a, b, c2) { + a.Od(c2, b); + } + function As(a, b) { + a.e = b; + b.b = a; + } + function Zl(a) { + Ql(); + this.a = a; + } + function jq(a) { + Ql(); + this.a = a; + } + function sq(a) { + Ql(); + this.a = a; + } + function Fq(a) { + im(); + this.a = a; + } + function Sz(a) { + Rz(); + Qz.be(a); + } + function gz() { + Xy.call(this); + } + function xcb() { + Xy.call(this); + } + function pcb() { + gz.call(this); + } + function tcb() { + gz.call(this); + } + function Bdb() { + gz.call(this); + } + function Vdb() { + gz.call(this); + } + function Ydb() { + gz.call(this); + } + function Geb() { + gz.call(this); + } + function bgb() { + gz.call(this); + } + function Apb() { + gz.call(this); + } + function Jpb() { + gz.call(this); + } + function utb() { + gz.call(this); + } + function x2c() { + gz.call(this); + } + function rQd() { + this.a = this; + } + function MPd() { + this.Bb |= 256; + } + function tTb() { + this.b = new mt(); + } + function fA() { + fA = ccb; + new Lqb(); + } + function rcb() { + pcb.call(this); + } + function dCb(a, b) { + a.length = b; + } + function Tvb(a, b) { + Ekb(a.a, b); + } + function sKb(a, b) { + UHb(a.c, b); + } + function SMc(a, b) { + Qqb(a.b, b); + } + function vBd(a, b) { + uAd(a.a, b); + } + function wBd(a, b) { + vAd(a.a, b); + } + function GLd(a, b) { + Uhd(a.e, b); + } + function d7d(a) { + D2d(a.c, a.b); + } + function mj(a, b) { + a.kc().Nb(b); + } + function Odb(a) { + this.a = Tdb(a); + } + function Tqb() { + this.a = new Lqb(); + } + function gyb() { + this.a = new Lqb(); + } + function Wvb() { + this.a = new Rkb(); + } + function KFb() { + this.a = new Rkb(); + } + function PFb() { + this.a = new Rkb(); + } + function FFb() { + this.a = new yFb(); + } + function pGb() { + this.a = new MFb(); + } + function ZQb() { + this.a = new MQb(); + } + function Gxb() { + this.a = new Pwb(); + } + function jUb() { + this.a = new PTb(); + } + function sDb() { + this.a = new oDb(); + } + function zDb() { + this.a = new tDb(); + } + function CWb() { + this.a = new Rkb(); + } + function HXb() { + this.a = new Rkb(); + } + function nYb() { + this.a = new Rkb(); + } + function BYb() { + this.a = new Rkb(); + } + function fLb() { + this.d = new Rkb(); + } + function vYb() { + this.a = new Tqb(); + } + function a2b() { + this.a = new Lqb(); + } + function wZb() { + this.b = new Lqb(); + } + function TCc() { + this.b = new Rkb(); + } + function zJc() { + this.e = new Rkb(); + } + function uMc() { + this.d = new Rkb(); + } + function wdc() { + this.a = new xkc(); + } + function vKc() { + Rkb.call(this); + } + function twb() { + Wvb.call(this); + } + function oHb() { + $Gb.call(this); + } + function LXb() { + HXb.call(this); + } + function L_b() { + H_b.call(this); + } + function H_b() { + A_b.call(this); + } + function p0b() { + A_b.call(this); + } + function s0b() { + p0b.call(this); + } + function WMc() { + VMc.call(this); + } + function bNc() { + VMc.call(this); + } + function EPc() { + CPc.call(this); + } + function JPc() { + CPc.call(this); + } + function OPc() { + CPc.call(this); + } + function w1c() { + s1c.call(this); + } + function s7c() { + Psb.call(this); + } + function apd() { + Ald.call(this); + } + function ppd() { + Ald.call(this); + } + function lDd() { + YCd.call(this); + } + function NDd() { + YCd.call(this); + } + function mFd() { + Lqb.call(this); + } + function vFd() { + Lqb.call(this); + } + function GFd() { + Lqb.call(this); + } + function KPd() { + Tqb.call(this); + } + function OJd() { + hJd.call(this); + } + function aQd() { + MPd.call(this); + } + function SSd() { + FId.call(this); + } + function rUd() { + FId.call(this); + } + function oUd() { + Lqb.call(this); + } + function NYd() { + Lqb.call(this); + } + function cZd() { + Lqb.call(this); + } + function R8d() { + MGd.call(this); + } + function o9d() { + MGd.call(this); + } + function i9d() { + R8d.call(this); + } + function hee() { + ude.call(this); + } + function Dd(a) { + yd.call(this, a); + } + function Hd(a) { + yd.call(this, a); + } + function ph(a) { + lh.call(this, a); + } + function Sh(a) { + Wc.call(this, a); + } + function oi(a) { + Sh.call(this, a); + } + function Ii(a) { + Wc.call(this, a); + } + function Zdd() { + this.a = new Psb(); + } + function CPc() { + this.a = new Tqb(); + } + function s1c() { + this.a = new Lqb(); + } + function QSc() { + this.a = new Rkb(); + } + function D2c() { + this.j = new Rkb(); + } + function QXc() { + this.a = new UXc(); + } + function e_c() { + this.a = new d_c(); + } + function YCd() { + this.a = new aDd(); + } + function _k() { + _k = ccb; + $k = new al(); + } + function Lk() { + Lk = ccb; + Kk = new Mk(); + } + function wb() { + wb = ccb; + vb = new xb(); + } + function hs() { + hs = ccb; + gs = new is(); + } + function rs(a) { + Sh.call(this, a); + } + function Gp(a) { + Sh.call(this, a); + } + function xp(a) { + Lo.call(this, a); + } + function Ep(a) { + Lo.call(this, a); + } + function Tp(a) { + Wn.call(this, a); + } + function wx(a) { + un.call(this, a); + } + function ov(a) { + dv.call(this, a); + } + function Mv(a) { + Br.call(this, a); + } + function Ov(a) { + Br.call(this, a); + } + function Lw(a) { + Br.call(this, a); + } + function hz(a) { + Yy.call(this, a); + } + function MB(a) { + hz.call(this, a); + } + function eC() { + fC.call(this, {}); + } + function Ftb(a) { + Atb(); + this.a = a; + } + function zwb(a) { + a.b = null; + a.c = 0; + } + function Vy(a, b) { + a.e = b; + Sy(a, b); + } + function LVb(a, b) { + a.a = b; + NVb(a); + } + function lIb(a, b, c2) { + a.a[b.g] = c2; + } + function vfd(a, b, c2) { + Dfd(c2, a, b); + } + function Odc(a, b) { + rjc(b.i, a.n); + } + function Wyc(a, b) { + Xyc(a).td(b); + } + function ERb(a, b) { + return a * a / b; + } + function Xr(a, b) { + return a.g - b.g; + } + function tC(a) { + return new TB(a); + } + function vC(a) { + return new yC(a); + } + function ocb(a) { + hz.call(this, a); + } + function qcb(a) { + hz.call(this, a); + } + function ucb(a) { + hz.call(this, a); + } + function vcb(a) { + Yy.call(this, a); + } + function fGc(a) { + LFc(); + this.a = a; + } + function c0d(a) { + kzd(); + this.a = a; + } + function bhd(a) { + Rgd(); + this.f = a; + } + function dhd(a) { + Rgd(); + this.f = a; + } + function Cdb(a) { + hz.call(this, a); + } + function Wdb(a) { + hz.call(this, a); + } + function Zdb(a) { + hz.call(this, a); + } + function Feb(a) { + hz.call(this, a); + } + function Heb(a) { + hz.call(this, a); + } + function Ccb(a) { + return uCb(a), a; + } + function Edb(a) { + return uCb(a), a; + } + function Gdb(a) { + return uCb(a), a; + } + function jfb(a) { + return uCb(a), a; + } + function tfb(a) { + return uCb(a), a; + } + function akb(a) { + return a.b == a.c; + } + function Hwb(a) { + return !!a && a.b; + } + function pIb(a) { + return !!a && a.k; + } + function qIb(a) { + return !!a && a.j; + } + function amb(a) { + uCb(a); + this.a = a; + } + function wVb(a) { + qVb(a); + return a; + } + function Blb(a) { + Glb(a, a.length); + } + function cgb(a) { + hz.call(this, a); + } + function cqd(a) { + hz.call(this, a); + } + function n8d(a) { + hz.call(this, a); + } + function y2c(a) { + hz.call(this, a); + } + function z2c(a) { + hz.call(this, a); + } + function mde(a) { + hz.call(this, a); + } + function pc(a) { + qc.call(this, a, 0); + } + function Ji() { + Ki.call(this, 12, 3); + } + function Kz() { + Kz = ccb; + Jz = new Nz(); + } + function jz() { + jz = ccb; + iz = new nb(); + } + function KA() { + KA = ccb; + JA = new MA(); + } + function OB() { + OB = ccb; + NB = new PB(); + } + function jc() { + throw vbb(new bgb()); + } + function zh() { + throw vbb(new bgb()); + } + function Pi() { + throw vbb(new bgb()); + } + function Pj() { + throw vbb(new bgb()); + } + function Qj() { + throw vbb(new bgb()); + } + function Ym() { + throw vbb(new bgb()); + } + function Gb() { + this.a = GD(Qb(She)); + } + function oy(a) { + Ql(); + this.a = Qb(a); + } + function Bs(a, b) { + a.Td(b); + b.Sd(a); + } + function iw(a, b) { + a.a.ec().Mc(b); + } + function CYb(a, b, c2) { + a.c.lf(b, c2); + } + function scb(a) { + qcb.call(this, a); + } + function Oeb(a) { + Wdb.call(this, a); + } + function Hfb() { + mcb.call(this, ""); + } + function Ifb() { + mcb.call(this, ""); + } + function Ufb() { + mcb.call(this, ""); + } + function Vfb() { + mcb.call(this, ""); + } + function Xfb(a) { + qcb.call(this, a); + } + function zob(a) { + lnb.call(this, a); + } + function Yob(a) { + Inb.call(this, a); + } + function Gob(a) { + zob.call(this, a); + } + function Mk() { + Fk.call(this, null); + } + function al() { + Fk.call(this, null); + } + function Az() { + Az = ccb; + !!(Rz(), Qz); + } + function wrb() { + wrb = ccb; + vrb = yrb(); + } + function Mtb(a) { + return a.a ? a.b : 0; + } + function Vtb(a) { + return a.a ? a.b : 0; + } + function Lcb(a, b) { + return a.a - b.a; + } + function Wcb(a, b) { + return a.a - b.a; + } + function Peb(a, b) { + return a.a - b.a; + } + function eCb(a, b) { + return PC(a, b); + } + function GC(a, b) { + return rdb(a, b); + } + function _B(b, a) { + return a in b.a; + } + function _Db(a, b) { + a.f = b; + return a; + } + function ZDb(a, b) { + a.b = b; + return a; + } + function $Db(a, b) { + a.c = b; + return a; + } + function aEb(a, b) { + a.g = b; + return a; + } + function HGb(a, b) { + a.a = b; + return a; + } + function IGb(a, b) { + a.f = b; + return a; + } + function JGb(a, b) { + a.k = b; + return a; + } + function dLb(a, b) { + a.a = b; + return a; + } + function eLb(a, b) { + a.e = b; + return a; + } + function zVb(a, b) { + a.e = b; + return a; + } + function AVb(a, b) { + a.f = b; + return a; + } + function KOb(a, b) { + a.b = true; + a.d = b; + } + function DHb(a, b) { + a.b = new g7c(b); + } + function uvb(a, b, c2) { + b.td(a.a[c2]); + } + function zvb(a, b, c2) { + b.we(a.a[c2]); + } + function wJc(a, b) { + return a.b - b.b; + } + function kOc(a, b) { + return a.g - b.g; + } + function WQc(a, b) { + return a.s - b.s; + } + function Lic(a, b) { + return a ? 0 : b - 1; + } + function SFc(a, b) { + return a ? 0 : b - 1; + } + function RFc(a, b) { + return a ? b - 1 : 0; + } + function M2c(a, b) { + return b.Yf(a); + } + function M3c(a, b) { + a.b = b; + return a; + } + function L3c(a, b) { + a.a = b; + return a; + } + function N3c(a, b) { + a.c = b; + return a; + } + function O3c(a, b) { + a.d = b; + return a; + } + function P3c(a, b) { + a.e = b; + return a; + } + function Q3c(a, b) { + a.f = b; + return a; + } + function b4c(a, b) { + a.a = b; + return a; + } + function c4c(a, b) { + a.b = b; + return a; + } + function d4c(a, b) { + a.c = b; + return a; + } + function z5c(a, b) { + a.c = b; + return a; + } + function y5c(a, b) { + a.b = b; + return a; + } + function A5c(a, b) { + a.d = b; + return a; + } + function B5c(a, b) { + a.e = b; + return a; + } + function C5c(a, b) { + a.f = b; + return a; + } + function D5c(a, b) { + a.g = b; + return a; + } + function E5c(a, b) { + a.a = b; + return a; + } + function F5c(a, b) { + a.i = b; + return a; + } + function G5c(a, b) { + a.j = b; + return a; + } + function Vdd(a, b) { + a.k = b; + return a; + } + function Wdd(a, b) { + a.j = b; + return a; + } + function ykc(a, b) { + gkc(); + F0b(b, a); + } + function T$c(a, b, c2) { + R$c(a.a, b, c2); + } + function RGc(a) { + cEc.call(this, a); + } + function iHc(a) { + cEc.call(this, a); + } + function t7c(a) { + Qsb.call(this, a); + } + function aPb(a) { + _Ob.call(this, a); + } + function Ixd(a) { + zud.call(this, a); + } + function dCd(a) { + ZBd.call(this, a); + } + function fCd(a) { + ZBd.call(this, a); + } + function p_b() { + q_b.call(this, ""); + } + function d7c() { + this.a = 0; + this.b = 0; + } + function aPc() { + this.b = 0; + this.a = 0; + } + function NJd(a, b) { + a.b = 0; + DId(a, b); + } + function X1d(a, b) { + a.c = b; + a.b = true; + } + function Oc(a, b) { + return a.c._b(b); + } + function gdb(a) { + return a.e && a.e(); + } + function Vd(a) { + return !a ? null : a.d; + } + function sn(a, b) { + return Gv(a.b, b); + } + function Fv(a) { + return !a ? null : a.g; + } + function Kv(a) { + return !a ? null : a.i; + } + function hdb(a) { + fdb(a); + return a.o; + } + function Fhd() { + Fhd = ccb; + Ehd = ond(); + } + function Hhd() { + Hhd = ccb; + Ghd = Cod(); + } + function LFd() { + LFd = ccb; + KFd = qZd(); + } + function p8d() { + p8d = ccb; + o8d = Y9d(); + } + function r8d() { + r8d = ccb; + q8d = dae(); + } + function mvd() { + mvd = ccb; + lvd = n4c(); + } + function Srb() { + throw vbb(new bgb()); + } + function enb() { + throw vbb(new bgb()); + } + function fnb() { + throw vbb(new bgb()); + } + function gnb() { + throw vbb(new bgb()); + } + function jnb() { + throw vbb(new bgb()); + } + function Cnb() { + throw vbb(new bgb()); + } + function Uqb(a) { + this.a = new Mqb(a); + } + function tgb(a) { + lgb(); + ngb(this, a); + } + function Hxb(a) { + this.a = new Qwb(a); + } + function _ub(a, b) { + while (a.ye(b)) + ; + } + function Sub(a, b) { + while (a.sd(b)) + ; + } + function Bfb(a, b) { + a.a += b; + return a; + } + function Cfb(a, b) { + a.a += b; + return a; + } + function Ffb(a, b) { + a.a += b; + return a; + } + function Lfb(a, b) { + a.a += b; + return a; + } + function WAb(a) { + Tzb(a); + return a.a; + } + function Wsb(a) { + return a.b != a.d.c; + } + function pD(a) { + return a.l | a.m << 22; + } + function aIc(a, b) { + return a.d[b.p]; + } + function h2c(a, b) { + return c2c(a, b); + } + function cCb(a, b, c2) { + a.splice(b, c2); + } + function WHb(a) { + a.c ? VHb(a) : XHb(a); + } + function jVc(a) { + this.a = 0; + this.b = a; + } + function ZUc() { + this.a = new L2c(K$); + } + function tRc() { + this.b = new L2c(h$); + } + function Q$c() { + this.b = new L2c(J_); + } + function d_c() { + this.b = new L2c(J_); + } + function OCd() { + throw vbb(new bgb()); + } + function PCd() { + throw vbb(new bgb()); + } + function QCd() { + throw vbb(new bgb()); + } + function RCd() { + throw vbb(new bgb()); + } + function SCd() { + throw vbb(new bgb()); + } + function TCd() { + throw vbb(new bgb()); + } + function UCd() { + throw vbb(new bgb()); + } + function VCd() { + throw vbb(new bgb()); + } + function WCd() { + throw vbb(new bgb()); + } + function XCd() { + throw vbb(new bgb()); + } + function ahe() { + throw vbb(new utb()); + } + function bhe() { + throw vbb(new utb()); + } + function Rge(a) { + this.a = new ege(a); + } + function ege(a) { + dge(this, a, Vee()); + } + function Fhe(a) { + return !a || Ehe(a); + } + function dde(a) { + return $ce[a] != -1; + } + function Iz() { + xz != 0 && (xz = 0); + zz = -1; + } + function Ybb() { + Wbb == null && (Wbb = []); + } + function ONd(a, b) { + Rxd(ZKd(a.a), b); + } + function TNd(a, b) { + Rxd(ZKd(a.a), b); + } + function Yf(a, b) { + zf.call(this, a, b); + } + function $f(a, b) { + Yf.call(this, a, b); + } + function Hf(a, b) { + this.b = a; + this.c = b; + } + function rk(a, b) { + this.b = a; + this.a = b; + } + function ek(a, b) { + this.a = a; + this.b = b; + } + function gk(a, b) { + this.a = a; + this.b = b; + } + function pk(a, b) { + this.a = a; + this.b = b; + } + function yk(a, b) { + this.a = a; + this.b = b; + } + function Ak(a, b) { + this.a = a; + this.b = b; + } + function Fj(a, b) { + this.a = a; + this.b = b; + } + function _j(a, b) { + this.a = a; + this.b = b; + } + function dr(a, b) { + this.a = a; + this.b = b; + } + function zr(a, b) { + this.b = a; + this.a = b; + } + function So(a, b) { + this.b = a; + this.a = b; + } + function qp(a, b) { + this.b = a; + this.a = b; + } + function $q(a, b) { + this.b = a; + this.a = b; + } + function $r(a, b) { + this.f = a; + this.g = b; + } + function ne(a, b) { + this.e = a; + this.d = b; + } + function Wo(a, b) { + this.g = a; + this.i = b; + } + function bu(a, b) { + this.a = a; + this.b = b; + } + function qu(a, b) { + this.a = a; + this.f = b; + } + function qv(a, b) { + this.b = a; + this.c = b; + } + function ox(a, b) { + this.a = a; + this.b = b; + } + function Px(a, b) { + this.a = a; + this.b = b; + } + function mC(a, b) { + this.a = a; + this.b = b; + } + function Wc(a) { + Lb(a.dc()); + this.c = a; + } + function rf(a) { + this.b = BD(Qb(a), 83); + } + function Zv(a) { + this.a = BD(Qb(a), 83); + } + function dv(a) { + this.a = BD(Qb(a), 15); + } + function $u(a) { + this.a = BD(Qb(a), 15); + } + function Br(a) { + this.b = BD(Qb(a), 47); + } + function eB() { + this.q = new $wnd.Date(); + } + function Zfb() { + Zfb = ccb; + Yfb = new jcb(); + } + function Emb() { + Emb = ccb; + Dmb = new Fmb(); + } + function Vhb(a) { + return a.f.c + a.g.c; + } + function hnb(a, b) { + return a.b.Hc(b); + } + function inb(a, b) { + return a.b.Ic(b); + } + function knb(a, b) { + return a.b.Qc(b); + } + function Dob(a, b) { + return a.b.Hc(b); + } + function dob(a, b) { + return a.c.uc(b); + } + function Rqb(a, b) { + return a.a._b(b); + } + function fob(a, b) { + return pb(a.c, b); + } + function jt(a, b) { + return Mhb(a.b, b); + } + function Lp(a, b) { + return a > b && b < Iie; + } + function Ryb(a, b) { + return a.Gc(b), a; + } + function Syb(a, b) { + return ye(a, b), a; + } + function sC(a) { + return GB(), a ? FB : EB; + } + function Mqb(a) { + Whb.call(this, a, 0); + } + function Pwb() { + Qwb.call(this, null); + } + function yAb() { + Vzb.call(this, null); + } + function Gqb(a) { + this.c = a; + Dqb(this); + } + function Psb() { + Csb(this); + Osb(this); + } + function MAb(a, b) { + Tzb(a); + a.a.Nb(b); + } + function Myb(a, b) { + a.Gc(b); + return a; + } + function qDb(a, b) { + a.a.f = b; + return a; + } + function wDb(a, b) { + a.a.d = b; + return a; + } + function xDb(a, b) { + a.a.g = b; + return a; + } + function yDb(a, b) { + a.a.j = b; + return a; + } + function BFb(a, b) { + a.a.a = b; + return a; + } + function CFb(a, b) { + a.a.d = b; + return a; + } + function DFb(a, b) { + a.a.e = b; + return a; + } + function EFb(a, b) { + a.a.g = b; + return a; + } + function oGb(a, b) { + a.a.f = b; + return a; + } + function TGb(a) { + a.b = false; + return a; + } + function Ltb() { + Ltb = ccb; + Ktb = new Otb(); + } + function Utb() { + Utb = ccb; + Ttb = new Wtb(); + } + function $xb() { + $xb = ccb; + Zxb = new byb(); + } + function $Yb() { + $Yb = ccb; + ZYb = new dZb(); + } + function cPb() { + cPb = ccb; + bPb = new dPb(); + } + function EAb() { + EAb = ccb; + DAb = new PBb(); + } + function a$b() { + a$b = ccb; + _Zb = new P$b(); + } + function FDb() { + FDb = ccb; + EDb = new GDb(); + } + function xUb() { + xUb = ccb; + wUb = new DUb(); + } + function x2b() { + x2b = ccb; + w2b = new d7c(); + } + function iVb() { + iVb = ccb; + hVb = new jVb(); + } + function nVb() { + nVb = ccb; + mVb = new OVb(); + } + function LWb() { + LWb = ccb; + KWb = new QWb(); + } + function b4b() { + b4b = ccb; + a4b = new l4b(); + } + function q9b() { + q9b = ccb; + p9b = new w9b(); + } + function qgc() { + qgc = ccb; + pgc = new dic(); + } + function Imc() { + Imc = ccb; + Hmc = new Wmc(); + } + function GUc() { + GUc = ccb; + FUc = new j3c(); + } + function i_c() { + i_c = ccb; + h_c = new k_c(); + } + function s_c() { + s_c = ccb; + r_c = new t_c(); + } + function R0c() { + R0c = ccb; + Q0c = new T0c(); + } + function Vyc() { + Vyc = ccb; + Uyc = new Ved(); + } + function DCc() { + vCc(); + this.c = new Ji(); + } + function k_c() { + $r.call(this, Une, 0); + } + function r4c(a, b) { + Xrb(a.c.b, b.c, b); + } + function s4c(a, b) { + Xrb(a.c.c, b.b, b); + } + function B3c(a, b, c2) { + Shb(a.d, b.f, c2); + } + function kKb(a, b, c2, d) { + jKb(a, d, b, c2); + } + function E3b(a, b, c2, d) { + J3b(d, a, b, c2); + } + function e9b(a, b, c2, d) { + f9b(d, a, b, c2); + } + function g3c(a, b) { + a.a = b.g; + return a; + } + function DQd(a, b) { + return qA(a.a, b); + } + function nQd(a) { + return a.b ? a.b : a.a; + } + function $Oc(a) { + return (a.c + a.a) / 2; + } + function Pgd() { + Pgd = ccb; + Ogd = new Ahd(); + } + function AFd() { + AFd = ccb; + zFd = new BFd(); + } + function tFd() { + tFd = ccb; + sFd = new vFd(); + } + function EFd() { + EFd = ccb; + DFd = new GFd(); + } + function yFd() { + yFd = ccb; + xFd = new oUd(); + } + function JFd() { + JFd = ccb; + IFd = new cZd(); + } + function nRd() { + nRd = ccb; + mRd = new u4d(); + } + function LRd() { + LRd = ccb; + KRd = new y4d(); + } + function g5d() { + g5d = ccb; + f5d = new h5d(); + } + function Q6d() { + Q6d = ccb; + P6d = new U6d(); + } + function pEd() { + pEd = ccb; + oEd = new Lqb(); + } + function tZd() { + tZd = ccb; + rZd = new Rkb(); + } + function Xge() { + Xge = ccb; + Wge = new dhe(); + } + function Hz(a) { + $wnd.clearTimeout(a); + } + function jw(a) { + this.a = BD(Qb(a), 224); + } + function Lv(a) { + return BD(a, 42).cd(); + } + function sib(a) { + return a.b < a.d.gc(); + } + function Lpb(a, b) { + return tqb(a.a, b); + } + function Dbb(a, b) { + return ybb(a, b) > 0; + } + function Gbb(a, b) { + return ybb(a, b) < 0; + } + function Crb(a, b) { + return a.a.get(b); + } + function icb(b, a) { + return a.split(b); + } + function Vrb(a, b) { + return Mhb(a.e, b); + } + function Nvb(a) { + return uCb(a), false; + } + function Rub(a) { + Kub.call(this, a, 21); + } + function wcb(a, b) { + Zy.call(this, a, b); + } + function mxb(a, b) { + $r.call(this, a, b); + } + function Gyb(a, b) { + $r.call(this, a, b); + } + function zx(a) { + yx(); + Wn.call(this, a); + } + function zlb(a, b) { + Dlb(a, a.length, b); + } + function Alb(a, b) { + Flb(a, a.length, b); + } + function ABb(a, b, c2) { + b.ud(a.a.Ge(c2)); + } + function uBb(a, b, c2) { + b.we(a.a.Fe(c2)); + } + function GBb(a, b, c2) { + b.td(a.a.Kb(c2)); + } + function Zq(a, b, c2) { + a.Mb(c2) && b.td(c2); + } + function aCb(a, b, c2) { + a.splice(b, 0, c2); + } + function lDb(a, b) { + return uqb(a.e, b); + } + function pjb(a, b) { + this.d = a; + this.e = b; + } + function kqb(a, b) { + this.b = a; + this.a = b; + } + function VBb(a, b) { + this.b = a; + this.a = b; + } + function BEb(a, b) { + this.b = a; + this.a = b; + } + function sBb(a, b) { + this.a = a; + this.b = b; + } + function yBb(a, b) { + this.a = a; + this.b = b; + } + function EBb(a, b) { + this.a = a; + this.b = b; + } + function KBb(a, b) { + this.a = a; + this.b = b; + } + function aDb(a, b) { + this.a = a; + this.b = b; + } + function tMb(a, b) { + this.b = a; + this.a = b; + } + function oOb(a, b) { + this.b = a; + this.a = b; + } + function SOb(a, b) { + $r.call(this, a, b); + } + function SMb(a, b) { + $r.call(this, a, b); + } + function NEb(a, b) { + $r.call(this, a, b); + } + function VEb(a, b) { + $r.call(this, a, b); + } + function sFb(a, b) { + $r.call(this, a, b); + } + function hHb(a, b) { + $r.call(this, a, b); + } + function OHb(a, b) { + $r.call(this, a, b); + } + function FIb(a, b) { + $r.call(this, a, b); + } + function wLb(a, b) { + $r.call(this, a, b); + } + function YRb(a, b) { + $r.call(this, a, b); + } + function zTb(a, b) { + $r.call(this, a, b); + } + function rUb(a, b) { + $r.call(this, a, b); + } + function oWb(a, b) { + $r.call(this, a, b); + } + function SXb(a, b) { + $r.call(this, a, b); + } + function k0b(a, b) { + $r.call(this, a, b); + } + function z5b(a, b) { + $r.call(this, a, b); + } + function T8b(a, b) { + $r.call(this, a, b); + } + function ibc(a, b) { + $r.call(this, a, b); + } + function Cec(a, b) { + this.a = a; + this.b = b; + } + function rfc(a, b) { + this.a = a; + this.b = b; + } + function Rfc(a, b) { + this.a = a; + this.b = b; + } + function Tfc(a, b) { + this.a = a; + this.b = b; + } + function bgc(a, b) { + this.a = a; + this.b = b; + } + function ngc(a, b) { + this.a = a; + this.b = b; + } + function Qhc(a, b) { + this.a = a; + this.b = b; + } + function $hc(a, b) { + this.a = a; + this.b = b; + } + function Z0b(a, b) { + this.a = a; + this.b = b; + } + function ZVb(a, b) { + this.b = a; + this.a = b; + } + function Dfc(a, b) { + this.b = a; + this.a = b; + } + function dgc(a, b) { + this.b = a; + this.a = b; + } + function Bmc(a, b) { + this.b = a; + this.a = b; + } + function cWb(a, b) { + this.c = a; + this.d = b; + } + function I$b(a, b) { + this.e = a; + this.d = b; + } + function Unc(a, b) { + this.a = a; + this.b = b; + } + function Oic(a, b) { + this.b = b; + this.c = a; + } + function Bjc(a, b) { + $r.call(this, a, b); + } + function Yjc(a, b) { + $r.call(this, a, b); + } + function Gkc(a, b) { + $r.call(this, a, b); + } + function Bpc(a, b) { + $r.call(this, a, b); + } + function Jpc(a, b) { + $r.call(this, a, b); + } + function Tpc(a, b) { + $r.call(this, a, b); + } + function cqc(a, b) { + $r.call(this, a, b); + } + function oqc(a, b) { + $r.call(this, a, b); + } + function yqc(a, b) { + $r.call(this, a, b); + } + function Hqc(a, b) { + $r.call(this, a, b); + } + function Uqc(a, b) { + $r.call(this, a, b); + } + function arc(a, b) { + $r.call(this, a, b); + } + function mrc(a, b) { + $r.call(this, a, b); + } + function zrc(a, b) { + $r.call(this, a, b); + } + function Prc(a, b) { + $r.call(this, a, b); + } + function Yrc(a, b) { + $r.call(this, a, b); + } + function fsc(a, b) { + $r.call(this, a, b); + } + function nsc(a, b) { + $r.call(this, a, b); + } + function nzc(a, b) { + $r.call(this, a, b); + } + function zzc(a, b) { + $r.call(this, a, b); + } + function Kzc(a, b) { + $r.call(this, a, b); + } + function Xzc(a, b) { + $r.call(this, a, b); + } + function Dtc(a, b) { + $r.call(this, a, b); + } + function lAc(a, b) { + $r.call(this, a, b); + } + function uAc(a, b) { + $r.call(this, a, b); + } + function CAc(a, b) { + $r.call(this, a, b); + } + function LAc(a, b) { + $r.call(this, a, b); + } + function UAc(a, b) { + $r.call(this, a, b); + } + function aBc(a, b) { + $r.call(this, a, b); + } + function uBc(a, b) { + $r.call(this, a, b); + } + function DBc(a, b) { + $r.call(this, a, b); + } + function MBc(a, b) { + $r.call(this, a, b); + } + function sGc(a, b) { + $r.call(this, a, b); + } + function VIc(a, b) { + $r.call(this, a, b); + } + function EIc(a, b) { + this.b = a; + this.a = b; + } + function qKc(a, b) { + this.a = a; + this.b = b; + } + function GKc(a, b) { + this.a = a; + this.b = b; + } + function lLc(a, b) { + this.a = a; + this.b = b; + } + function mMc(a, b) { + this.a = a; + this.b = b; + } + function fMc(a, b) { + $r.call(this, a, b); + } + function ZLc(a, b) { + $r.call(this, a, b); + } + function ZMc(a, b) { + this.b = a; + this.d = b; + } + function IOc(a, b) { + $r.call(this, a, b); + } + function GQc(a, b) { + $r.call(this, a, b); + } + function PQc(a, b) { + this.a = a; + this.b = b; + } + function RQc(a, b) { + this.a = a; + this.b = b; + } + function ARc(a, b) { + $r.call(this, a, b); + } + function rSc(a, b) { + $r.call(this, a, b); + } + function TTc(a, b) { + $r.call(this, a, b); + } + function _Tc(a, b) { + $r.call(this, a, b); + } + function RUc(a, b) { + $r.call(this, a, b); + } + function uVc(a, b) { + $r.call(this, a, b); + } + function hWc(a, b) { + $r.call(this, a, b); + } + function rWc(a, b) { + $r.call(this, a, b); + } + function kXc(a, b) { + $r.call(this, a, b); + } + function uXc(a, b) { + $r.call(this, a, b); + } + function AYc(a, b) { + $r.call(this, a, b); + } + function l$c(a, b) { + $r.call(this, a, b); + } + function Z$c(a, b) { + $r.call(this, a, b); + } + function D_c(a, b) { + $r.call(this, a, b); + } + function O_c(a, b) { + $r.call(this, a, b); + } + function c1c(a, b) { + $r.call(this, a, b); + } + function cVb(a, b) { + return uqb(a.c, b); + } + function nnc(a, b) { + return uqb(b.b, a); + } + function x1c(a, b) { + return -a.b.Je(b); + } + function D3c(a, b) { + return uqb(a.g, b); + } + function O5c(a, b) { + $r.call(this, a, b); + } + function a6c(a, b) { + $r.call(this, a, b); + } + function m2c(a, b) { + this.a = a; + this.b = b; + } + function W2c(a, b) { + this.a = a; + this.b = b; + } + function f7c(a, b) { + this.a = a; + this.b = b; + } + function G7c(a, b) { + $r.call(this, a, b); + } + function j8c(a, b) { + $r.call(this, a, b); + } + function iad(a, b) { + $r.call(this, a, b); + } + function rad(a, b) { + $r.call(this, a, b); + } + function Bad(a, b) { + $r.call(this, a, b); + } + function Nad(a, b) { + $r.call(this, a, b); + } + function ibd(a, b) { + $r.call(this, a, b); + } + function tbd(a, b) { + $r.call(this, a, b); + } + function Ibd(a, b) { + $r.call(this, a, b); + } + function Ubd(a, b) { + $r.call(this, a, b); + } + function gcd(a, b) { + $r.call(this, a, b); + } + function scd(a, b) { + $r.call(this, a, b); + } + function Ycd(a, b) { + $r.call(this, a, b); + } + function udd(a, b) { + $r.call(this, a, b); + } + function Jdd(a, b) { + $r.call(this, a, b); + } + function Eed(a, b) { + $r.call(this, a, b); + } + function bfd(a, b) { + this.a = a; + this.b = b; + } + function dfd(a, b) { + this.a = a; + this.b = b; + } + function ffd(a, b) { + this.a = a; + this.b = b; + } + function Kfd(a, b) { + this.a = a; + this.b = b; + } + function Mfd(a, b) { + this.a = a; + this.b = b; + } + function Ofd(a, b) { + this.a = a; + this.b = b; + } + function vgd(a, b) { + this.a = a; + this.b = b; + } + function qgd(a, b) { + $r.call(this, a, b); + } + function jrd(a, b) { + this.a = a; + this.b = b; + } + function krd(a, b) { + this.a = a; + this.b = b; + } + function mrd(a, b) { + this.a = a; + this.b = b; + } + function nrd(a, b) { + this.a = a; + this.b = b; + } + function qrd(a, b) { + this.a = a; + this.b = b; + } + function rrd(a, b) { + this.a = a; + this.b = b; + } + function srd(a, b) { + this.b = a; + this.a = b; + } + function trd(a, b) { + this.b = a; + this.a = b; + } + function Drd(a, b) { + this.b = a; + this.a = b; + } + function Frd(a, b) { + this.b = a; + this.a = b; + } + function Hrd(a, b) { + this.a = a; + this.b = b; + } + function Jrd(a, b) { + this.a = a; + this.b = b; + } + function Ord(a, b) { + Xqd(a.a, BD(b, 56)); + } + function BIc(a, b) { + gIc(a.a, BD(b, 11)); + } + function fIc(a, b) { + FHc(); + return b != a; + } + function Arb() { + wrb(); + return new vrb(); + } + function CMc() { + wMc(); + this.b = new Tqb(); + } + function NNc() { + FNc(); + this.a = new Tqb(); + } + function eCc() { + ZBc(); + aCc.call(this); + } + function Dsd(a, b) { + $r.call(this, a, b); + } + function Urd(a, b) { + this.a = a; + this.b = b; + } + function Wrd(a, b) { + this.a = a; + this.b = b; + } + function kGd(a, b) { + this.a = a; + this.b = b; + } + function nGd(a, b) { + this.a = a; + this.b = b; + } + function bUd(a, b) { + this.a = a; + this.b = b; + } + function zVd(a, b) { + this.a = a; + this.b = b; + } + function C1d(a, b) { + this.d = a; + this.b = b; + } + function MLd(a, b) { + this.d = a; + this.e = b; + } + function Wud(a, b) { + this.f = a; + this.c = b; + } + function f7d(a, b) { + this.b = a; + this.c = b; + } + function _zd(a, b) { + this.i = a; + this.g = b; + } + function Y1d(a, b) { + this.e = a; + this.a = b; + } + function c8d(a, b) { + this.a = a; + this.b = b; + } + function $Id(a, b) { + a.i = null; + _Id(a, b); + } + function ivd(a, b) { + !!a && Rhb(cvd, a, b); + } + function hCd(a, b) { + return qAd(a.a, b); + } + function e7d(a) { + return R2d(a.c, a.b); + } + function Wd(a) { + return !a ? null : a.dd(); + } + function PD(a) { + return a == null ? null : a; + } + function KD(a) { + return typeof a === Khe; + } + function LD(a) { + return typeof a === Lhe; + } + function ND(a) { + return typeof a === Mhe; + } + function Em(a, b) { + return a.Hd().Xb(b); + } + function Kq(a, b) { + return hr(a.Kc(), b); + } + function Bbb(a, b) { + return ybb(a, b) == 0; + } + function Ebb(a, b) { + return ybb(a, b) >= 0; + } + function Kbb(a, b) { + return ybb(a, b) != 0; + } + function Jdb(a) { + return "" + (uCb(a), a); + } + function pfb(a, b) { + return a.substr(b); + } + function cg(a) { + ag(a); + return a.d.gc(); + } + function oVb(a) { + pVb(a, a.c); + return a; + } + function RD(a) { + CCb(a == null); + return a; + } + function Dfb(a, b) { + a.a += "" + b; + return a; + } + function Efb(a, b) { + a.a += "" + b; + return a; + } + function Nfb(a, b) { + a.a += "" + b; + return a; + } + function Pfb(a, b) { + a.a += "" + b; + return a; + } + function Qfb(a, b) { + a.a += "" + b; + return a; + } + function Mfb(a, b) { + return a.a += "" + b, a; + } + function Esb(a, b) { + Gsb(a, b, a.a, a.a.a); + } + function Fsb(a, b) { + Gsb(a, b, a.c.b, a.c); + } + function Mqd(a, b, c2) { + Rpd(b, kqd(a, c2)); + } + function Nqd(a, b, c2) { + Rpd(b, kqd(a, c2)); + } + function Dhe(a, b) { + Hhe(new Fyd(a), b); + } + function cB(a, b) { + a.q.setTime(Sbb(b)); + } + function fvb(a, b) { + bvb.call(this, a, b); + } + function jvb(a, b) { + bvb.call(this, a, b); + } + function nvb(a, b) { + bvb.call(this, a, b); + } + function Nqb(a) { + Uhb(this); + Ld(this, a); + } + function wmb(a) { + tCb(a, 0); + return null; + } + function X6c(a) { + a.a = 0; + a.b = 0; + return a; + } + function f3c(a, b) { + a.a = b.g + 1; + return a; + } + function PJc(a, b) { + return a.j[b.p] == 2; + } + function _Pb(a) { + return VPb(BD(a, 79)); + } + function yJb() { + yJb = ccb; + xJb = as(wJb()); + } + function Y8b() { + Y8b = ccb; + X8b = as(W8b()); + } + function mt() { + this.b = new Mqb(Cv(12)); + } + function Otb() { + this.b = 0; + this.a = false; + } + function Wtb() { + this.b = 0; + this.a = false; + } + function sl(a) { + this.a = a; + ol.call(this); + } + function vl(a) { + this.a = a; + ol.call(this); + } + function Nsd(a, b) { + Msd.call(this, a, b); + } + function $zd(a, b) { + Cyd.call(this, a, b); + } + function nNd(a, b) { + _zd.call(this, a, b); + } + function s4d(a, b) { + p4d.call(this, a, b); + } + function w4d(a, b) { + qRd.call(this, a, b); + } + function rEd(a, b) { + pEd(); + Rhb(oEd, a, b); + } + function lcb(a, b) { + return qfb(a.a, 0, b); + } + function ww(a, b) { + return a.a.a.a.cc(b); + } + function mb(a, b) { + return PD(a) === PD(b); + } + function Mdb(a, b) { + return Kdb(a.a, b.a); + } + function $db(a, b) { + return beb(a.a, b.a); + } + function seb(a, b) { + return ueb(a.a, b.a); + } + function hfb(a, b) { + return a.indexOf(b); + } + function Ny(a, b) { + return a == b ? 0 : a ? 1 : -1; + } + function kB(a) { + return a < 10 ? "0" + a : "" + a; + } + function Mq(a) { + return Qb(a), new sl(a); + } + function SC(a) { + return TC(a.l, a.m, a.h); + } + function Hdb(a) { + return QD((uCb(a), a)); + } + function Idb(a) { + return QD((uCb(a), a)); + } + function NIb(a, b) { + return beb(a.g, b.g); + } + function Fbb(a) { + return typeof a === Lhe; + } + function mWb(a) { + return a == hWb || a == kWb; + } + function nWb(a) { + return a == hWb || a == iWb; + } + function G1b(a) { + return Jkb(a.b.b, a, 0); + } + function lrb(a) { + this.a = Arb(); + this.b = a; + } + function Frb(a) { + this.a = Arb(); + this.b = a; + } + function swb(a, b) { + Ekb(a.a, b); + return b; + } + function Z1c(a, b) { + Ekb(a.c, b); + return a; + } + function E2c(a, b) { + d3c(a.a, b); + return a; + } + function _gc(a, b) { + Hgc(); + return b.a += a; + } + function bhc(a, b) { + Hgc(); + return b.a += a; + } + function ahc(a, b) { + Hgc(); + return b.c += a; + } + function Nlb(a, b) { + Klb(a, 0, a.length, b); + } + function zsb() { + Wqb.call(this, new $rb()); + } + function I_b() { + B_b.call(this, 0, 0, 0, 0); + } + function I6c() { + J6c.call(this, 0, 0, 0, 0); + } + function g7c(a) { + this.a = a.a; + this.b = a.b; + } + function fad(a) { + return a == aad || a == bad; + } + function gad(a) { + return a == dad || a == _9c; + } + function Jzc(a) { + return a == Fzc || a == Ezc; + } + function fcd(a) { + return a != bcd && a != ccd; + } + function oid(a) { + return a.Lg() && a.Mg(); + } + function Gfd(a) { + return Kkd(BD(a, 118)); + } + function k3c(a) { + return d3c(new j3c(), a); + } + function y2d(a, b) { + return new p4d(b, a); + } + function z2d(a, b) { + return new p4d(b, a); + } + function ukd(a, b, c2) { + vkd(a, b); + wkd(a, c2); + } + function _kd(a, b, c2) { + cld(a, b); + ald(a, c2); + } + function bld(a, b, c2) { + dld(a, b); + eld(a, c2); + } + function gmd(a, b, c2) { + hmd(a, b); + imd(a, c2); + } + function nmd(a, b, c2) { + omd(a, b); + pmd(a, c2); + } + function iKd(a, b) { + $Jd(a, b); + _Jd(a, a.D); + } + function _ud(a) { + Wud.call(this, a, true); + } + function Xg(a, b, c2) { + Vg.call(this, a, b, c2); + } + function Ygb(a) { + Hgb(); + Zgb.call(this, a); + } + function rxb() { + mxb.call(this, "Head", 1); + } + function wxb() { + mxb.call(this, "Tail", 3); + } + function Ckb(a) { + a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + function Vjb(a) { + a.a = KC(SI, Uhe, 1, 8, 5, 1); + } + function MGb(a) { + Hkb(a.xf(), new QGb(a)); + } + function xtb(a) { + return a != null ? tb(a) : 0; + } + function b2b(a, b) { + return ntd(b, mpd(a)); + } + function c2b(a, b) { + return ntd(b, mpd(a)); + } + function dAb(a, b) { + return a[a.length] = b; + } + function gAb(a, b) { + return a[a.length] = b; + } + function Vq(a) { + return lr(a.b.Kc(), a.a); + } + function dqd(a, b) { + return _o(qo(a.d), b); + } + function eqd(a, b) { + return _o(qo(a.g), b); + } + function fqd(a, b) { + return _o(qo(a.j), b); + } + function Osd(a, b) { + Msd.call(this, a.b, b); + } + function q0b(a) { + B_b.call(this, a, a, a, a); + } + function HOb(a) { + a.b && LOb(a); + return a.a; + } + function IOb(a) { + a.b && LOb(a); + return a.c; + } + function uyb(a, b) { + if (lyb) { + return; + } + a.b = b; + } + function lzd(a, b, c2) { + NC(a, b, c2); + return c2; + } + function mBc(a, b, c2) { + NC(a.c[b.g], b.g, c2); + } + function _Hd(a, b, c2) { + BD(a.c, 69).Xh(b, c2); + } + function wfd(a, b, c2) { + bld(c2, c2.i + a, c2.j + b); + } + function UOd(a, b) { + wtd(VKd(a.a), XOd(b)); + } + function bTd(a, b) { + wtd(QSd(a.a), eTd(b)); + } + function Lge(a) { + wfe(); + xfe.call(this, a); + } + function CAd(a) { + return a == null ? 0 : tb(a); + } + function fNc() { + fNc = ccb; + eNc = new Rpb(v1); + } + function h0d() { + h0d = ccb; + new i0d(); + new Rkb(); + } + function i0d() { + new Lqb(); + new Lqb(); + new Lqb(); + } + function GA() { + GA = ccb; + fA(); + FA = new Lqb(); + } + function Iy() { + Iy = ccb; + $wnd.Math.log(2); + } + function UVd() { + UVd = ccb; + TVd = (AFd(), zFd); + } + function _ge() { + throw vbb(new cgb(Cxe)); + } + function ohe() { + throw vbb(new cgb(Cxe)); + } + function che() { + throw vbb(new cgb(Dxe)); + } + function rhe() { + throw vbb(new cgb(Dxe)); + } + function Mg(a) { + this.a = a; + Gg.call(this, a); + } + function up(a) { + this.a = a; + rf.call(this, a); + } + function Bp(a) { + this.a = a; + rf.call(this, a); + } + function Okb(a, b) { + Mlb(a.c, a.c.length, b); + } + function llb(a) { + return a.a < a.c.c.length; + } + function Eqb(a) { + return a.a < a.c.a.length; + } + function Ntb(a, b) { + return a.a ? a.b : b.De(); + } + function beb(a, b) { + return a < b ? -1 : a > b ? 1 : 0; + } + function Deb(a, b) { + return ybb(a, b) > 0 ? a : b; + } + function TC(a, b, c2) { + return { l: a, m: b, h: c2 }; + } + function Ctb(a, b) { + a.a != null && BIc(b, a.a); + } + function Csb(a) { + a.a = new jtb(); + a.c = new jtb(); + } + function hDb(a) { + this.b = a; + this.a = new Rkb(); + } + function dOb(a) { + this.b = new pOb(); + this.a = a; + } + function q_b(a) { + n_b.call(this); + this.a = a; + } + function txb() { + mxb.call(this, "Range", 2); + } + function bUb() { + ZTb(); + this.a = new L2c(zP); + } + function Bh(a, b) { + Qb(b); + Ah(a).Jc(new Vw()); + } + function fKc(a, b) { + FJc(); + return b.n.b += a; + } + function Tgc(a, b, c2) { + return Rhb(a.g, c2, b); + } + function LJc(a, b, c2) { + return Rhb(a.k, c2, b); + } + function r1c(a, b) { + return Rhb(a.a, b.a, b); + } + function jBc(a, b, c2) { + return hBc(b, c2, a.c); + } + function E6c(a) { + return new f7c(a.c, a.d); + } + function F6c(a) { + return new f7c(a.c, a.d); + } + function R6c(a) { + return new f7c(a.a, a.b); + } + function CQd(a, b) { + return hA(a.a, b, null); + } + function fec(a) { + QZb(a, null); + RZb(a, null); + } + function AOc(a) { + BOc(a, null); + COc(a, null); + } + function u4d() { + qRd.call(this, null, null); + } + function y4d() { + RRd.call(this, null, null); + } + function a7d(a) { + this.a = a; + Lqb.call(this); + } + function Pp(a) { + this.b = (mmb(), new iob(a)); + } + function Py(a) { + a.j = KC(VI, nie, 310, 0, 0, 1); + } + function oAd(a, b, c2) { + a.c.Vc(b, BD(c2, 133)); + } + function GAd(a, b, c2) { + a.c.ji(b, BD(c2, 133)); + } + function JLd(a, b) { + Uxd(a); + a.Gc(BD(b, 15)); + } + function b7d(a, b) { + return t2d(a.c, a.b, b); + } + function Bv(a, b) { + return new Qv(a.Kc(), b); + } + function Lq(a, b) { + return rr(a.Kc(), b) != -1; + } + function Sqb(a, b) { + return a.a.Bc(b) != null; + } + function pr(a) { + return a.Ob() ? a.Pb() : null; + } + function yfb(a) { + return zfb(a, 0, a.length); + } + function JD(a, b) { + return a != null && AD(a, b); + } + function $A(a, b) { + a.q.setHours(b); + YA(a, b); + } + function Yrb(a, b) { + if (a.c) { + jsb(b); + isb(b); + } + } + function nk(a, b, c2) { + BD(a.Kb(c2), 164).Nb(b); + } + function RJc(a, b, c2) { + SJc(a, b, c2); + return c2; + } + function Eub(a, b, c2) { + a.a = b ^ 1502; + a.b = c2 ^ kke; + } + function xHb(a, b, c2) { + return a.a[b.g][c2.g]; + } + function REc(a, b) { + return a.a[b.c.p][b.p]; + } + function aEc(a, b) { + return a.e[b.c.p][b.p]; + } + function tEc(a, b) { + return a.c[b.c.p][b.p]; + } + function OJc(a, b) { + return a.j[b.p] = aKc(b); + } + function k5c(a, b) { + return cfb(a.f, b.tg()); + } + function Isd(a, b) { + return cfb(a.b, b.tg()); + } + function Sfd(a, b) { + return a.a < Kcb(b) ? -1 : 1; + } + function ZDc(a, b, c2) { + return c2 ? b != 0 : b != a - 1; + } + function _6c(a, b, c2) { + a.a = b; + a.b = c2; + return a; + } + function Y6c(a, b) { + a.a *= b; + a.b *= b; + return a; + } + function mud(a, b, c2) { + NC(a.g, b, c2); + return c2; + } + function CHb(a, b, c2, d) { + NC(a.a[b.g], c2.g, d); + } + function EQb(a, b) { + O6c(b, a.a.a.a, a.a.a.b); + } + function Ozd(a) { + a.a = BD(Ajd(a.b.a, 4), 126); + } + function Wzd(a) { + a.a = BD(Ajd(a.b.a, 4), 126); + } + function otd(a) { + ytb(a, hue2); + Rld(a, gtd(a)); + } + function Atb() { + Atb = ccb; + ztb = new Ftb(null); + } + function Ivb() { + Ivb = ccb; + Ivb(); + Hvb = new Ovb(); + } + function FId() { + this.Bb |= 256; + this.Bb |= 512; + } + function Fyd(a) { + this.i = a; + this.f = this.i.j; + } + function xMd(a, b, c2) { + pMd.call(this, a, b, c2); + } + function BMd(a, b, c2) { + xMd.call(this, a, b, c2); + } + function K4d(a, b, c2) { + xMd.call(this, a, b, c2); + } + function N4d(a, b, c2) { + BMd.call(this, a, b, c2); + } + function X4d(a, b, c2) { + pMd.call(this, a, b, c2); + } + function _4d(a, b, c2) { + pMd.call(this, a, b, c2); + } + function C4d(a, b, c2) { + k2d.call(this, a, b, c2); + } + function G4d(a, b, c2) { + k2d.call(this, a, b, c2); + } + function I4d(a, b, c2) { + C4d.call(this, a, b, c2); + } + function c5d(a, b, c2) { + X4d.call(this, a, b, c2); + } + function zf(a, b) { + this.a = a; + rf.call(this, b); + } + function aj(a, b) { + this.a = a; + pc.call(this, b); + } + function kj(a, b) { + this.a = a; + pc.call(this, b); + } + function Jj(a, b) { + this.a = a; + pc.call(this, b); + } + function Rj(a) { + this.a = a; + sj.call(this, a.d); + } + function she(a) { + this.c = a; + this.a = this.c.a; + } + function xl(a, b) { + this.a = b; + pc.call(this, a); + } + function Qo(a, b) { + this.a = b; + Lo.call(this, a); + } + function op(a, b) { + this.a = a; + Lo.call(this, b); + } + function rj(a, b) { + return Rl(Xm(a.c)).Xb(b); + } + function Eb(a, b) { + return Db(a, new Ufb(), b).a; + } + function ur(a, b) { + Qb(b); + return new Gr(a, b); + } + function Gr(a, b) { + this.a = b; + Br.call(this, a); + } + function Hs(a) { + this.b = a; + this.a = this.b.a.e; + } + function Eg(a) { + a.b.Qb(); + --a.d.f.d; + bg(a.d); + } + function Uk(a) { + Fk.call(this, BD(Qb(a), 35)); + } + function il(a) { + Fk.call(this, BD(Qb(a), 35)); + } + function is() { + $r.call(this, "INSTANCE", 0); + } + function Lb(a) { + if (!a) { + throw vbb(new Vdb()); + } + } + function Ub(a) { + if (!a) { + throw vbb(new Ydb()); + } + } + function ot(a) { + if (!a) { + throw vbb(new utb()); + } + } + function I6d() { + I6d = ccb; + g5d(); + H6d = new J6d(); + } + function Bcb() { + Bcb = ccb; + zcb = false; + Acb = true; + } + function Jfb(a) { + mcb.call(this, (uCb(a), a)); + } + function Wfb(a) { + mcb.call(this, (uCb(a), a)); + } + function Inb(a) { + lnb.call(this, a); + this.a = a; + } + function Xnb(a) { + Dnb.call(this, a); + this.a = a; + } + function Zob(a) { + zob.call(this, a); + this.a = a; + } + function Xy() { + Py(this); + Ry(this); + this._d(); + } + function Qv(a, b) { + this.a = b; + Br.call(this, a); + } + function au(a, b) { + return new xu(a.a, a.b, b); + } + function kfb(a, b) { + return a.lastIndexOf(b); + } + function ifb(a, b, c2) { + return a.indexOf(b, c2); + } + function xfb(a) { + return a == null ? Xhe : fcb(a); + } + function nz(a) { + return a == null ? null : a.name; + } + function Etb(a) { + return a.a != null ? a.a : null; + } + function or(a) { + return Wsb(a.a) ? nr(a) : null; + } + function Fxb(a, b) { + return Jwb(a.a, b) != null; + } + function uqb(a, b) { + return !!b && a.b[b.g] == b; + } + function FCb(a) { + return a.$H || (a.$H = ++ECb); + } + function aD(a) { + return a.l + a.m * Hje + a.h * Ije; + } + function pDb(a, b) { + Ekb(b.a, a.a); + return a.a; + } + function vDb(a, b) { + Ekb(b.b, a.a); + return a.a; + } + function nGb(a, b) { + Ekb(b.a, a.a); + return a.a; + } + function Btb(a) { + sCb(a.a != null); + return a.a; + } + function Asb(a) { + Wqb.call(this, new _rb(a)); + } + function GUb(a, b) { + HUb.call(this, a, b, null); + } + function cxb(a) { + this.a = a; + Bjb.call(this, a); + } + function CKb() { + CKb = ccb; + BKb = new Msd(tle, 0); + } + function NFb(a, b) { + ++a.b; + return Ekb(a.a, b); + } + function OFb(a, b) { + ++a.b; + return Lkb(a.a, b); + } + function n6b(a, b) { + return Kdb(a.n.a, b.n.a); + } + function WKb(a, b) { + return Kdb(a.c.d, b.c.d); + } + function gLb(a, b) { + return Kdb(a.c.c, b.c.c); + } + function zXb(a, b) { + return BD(Qc(a.b, b), 15); + } + function s7b(a, b) { + return a.n.b = (uCb(b), b); + } + function t7b(a, b) { + return a.n.b = (uCb(b), b); + } + function a1b(a) { + return llb(a.a) || llb(a.b); + } + function fBc(a, b, c2) { + return gBc(a, b, c2, a.b); + } + function iBc(a, b, c2) { + return gBc(a, b, c2, a.c); + } + function i3c(a, b, c2) { + BD(B2c(a, b), 21).Fc(c2); + } + function xBd(a, b, c2) { + vAd(a.a, c2); + uAd(a.a, b); + } + function qRd(a, b) { + nRd(); + this.a = a; + this.b = b; + } + function RRd(a, b) { + LRd(); + this.b = a; + this.c = b; + } + function hhd(a, b) { + Rgd(); + this.f = b; + this.d = a; + } + function qc(a, b) { + Sb(b, a); + this.d = a; + this.c = b; + } + function n5b(a) { + var b; + b = a.a; + a.a = a.b; + a.b = b; + } + function chc(a) { + Hgc(); + return !!a && !a.dc(); + } + function Afe(a) { + return new lge(3, a); + } + function jm(a, b) { + return new Vp(a, a.gc(), b); + } + function ns(a) { + hs(); + return es((qs(), ps), a); + } + function Oyd(a) { + this.d = a; + Fyd.call(this, a); + } + function $yd(a) { + this.c = a; + Fyd.call(this, a); + } + function bzd(a) { + this.c = a; + Oyd.call(this, a); + } + function sgc() { + qgc(); + this.b = new ygc(this); + } + function Pu(a) { + Xj(a, Jie); + return new Skb(a); + } + function Vz(a) { + Rz(); + return parseInt(a) || -1; + } + function qfb(a, b, c2) { + return a.substr(b, c2 - b); + } + function gfb(a, b, c2) { + return ifb(a, wfb(b), c2); + } + function Pkb(a) { + return ZBb(a.c, a.c.length); + } + function Yr(a) { + return a.f != null ? a.f : "" + a.g; + } + function Zr(a) { + return a.f != null ? a.f : "" + a.g; + } + function Hsb(a) { + sCb(a.b != 0); + return a.a.a.c; + } + function Isb(a) { + sCb(a.b != 0); + return a.c.b.c; + } + function Cmd(a) { + JD(a, 150) && BD(a, 150).Gh(); + } + function Wwb(a) { + return a.b = BD(tib(a.a), 42); + } + function Ptb(a) { + Ltb(); + this.b = a; + this.a = true; + } + function Xtb(a) { + Utb(); + this.b = a; + this.a = true; + } + function Trb(a) { + a.d = new ksb(a); + a.e = new Lqb(); + } + function mkb(a) { + if (!a) { + throw vbb(new Apb()); + } + } + function lCb(a) { + if (!a) { + throw vbb(new Vdb()); + } + } + function yCb(a) { + if (!a) { + throw vbb(new Ydb()); + } + } + function qCb(a) { + if (!a) { + throw vbb(new tcb()); + } + } + function sCb(a) { + if (!a) { + throw vbb(new utb()); + } + } + function ksb(a) { + lsb.call(this, a, null, null); + } + function dPb() { + $r.call(this, "POLYOMINO", 0); + } + function Cg(a, b, c2, d) { + qg.call(this, a, b, c2, d); + } + function zkc(a, b) { + gkc(); + return Rc(a, b.e, b); + } + function azc(a, b, c2) { + Vyc(); + return c2.qg(a, b); + } + function wNb(a, b) { + return !!a.q && Mhb(a.q, b); + } + function JRb(a, b) { + return a > 0 ? b * b / a : b * b * 100; + } + function CRb(a, b) { + return a > 0 ? b / (a * a) : b * 100; + } + function G2c(a, b, c2) { + return Ekb(b, I2c(a, c2)); + } + function t3c(a, b, c2) { + p3c(); + a.Xe(b) && c2.td(a); + } + function St(a, b, c2) { + var d; + d = a.Zc(b); + d.Rb(c2); + } + function O6c(a, b, c2) { + a.a += b; + a.b += c2; + return a; + } + function Z6c(a, b, c2) { + a.a *= b; + a.b *= c2; + return a; + } + function b7c(a, b, c2) { + a.a -= b; + a.b -= c2; + return a; + } + function a7c(a, b) { + a.a = b.a; + a.b = b.b; + return a; + } + function V6c(a) { + a.a = -a.a; + a.b = -a.b; + return a; + } + function Dic(a) { + this.c = a; + this.a = 1; + this.b = 1; + } + function xed(a) { + this.c = a; + dld(a, 0); + eld(a, 0); + } + function u7c(a) { + Psb.call(this); + n7c(this, a); + } + function AXb(a) { + xXb(); + yXb(this); + this.mf(a); + } + function GRd(a, b) { + nRd(); + qRd.call(this, a, b); + } + function dSd(a, b) { + LRd(); + RRd.call(this, a, b); + } + function hSd(a, b) { + LRd(); + RRd.call(this, a, b); + } + function fSd(a, b) { + LRd(); + dSd.call(this, a, b); + } + function sId(a, b, c2) { + dId.call(this, a, b, c2, 2); + } + function zXd(a, b) { + UVd(); + nXd.call(this, a, b); + } + function BXd(a, b) { + UVd(); + zXd.call(this, a, b); + } + function DXd(a, b) { + UVd(); + zXd.call(this, a, b); + } + function FXd(a, b) { + UVd(); + DXd.call(this, a, b); + } + function PXd(a, b) { + UVd(); + nXd.call(this, a, b); + } + function RXd(a, b) { + UVd(); + PXd.call(this, a, b); + } + function XXd(a, b) { + UVd(); + nXd.call(this, a, b); + } + function pAd(a, b) { + return a.c.Fc(BD(b, 133)); + } + function w1d(a, b, c2) { + return V1d(p1d(a, b), c2); + } + function N2d(a, b, c2) { + return b.Qk(a.e, a.c, c2); + } + function P2d(a, b, c2) { + return b.Rk(a.e, a.c, c2); + } + function a3d(a, b) { + return xid(a.e, BD(b, 49)); + } + function aTd(a, b, c2) { + vtd(QSd(a.a), b, eTd(c2)); + } + function TOd(a, b, c2) { + vtd(VKd(a.a), b, XOd(c2)); + } + function ypb(a, b) { + b.$modCount = a.$modCount; + } + function MUc() { + MUc = ccb; + LUc = new Lsd("root"); + } + function LCd() { + LCd = ccb; + KCd = new lDd(); + new NDd(); + } + function KVc() { + this.a = new Hp(); + this.b = new Hp(); + } + function FUd() { + hJd.call(this); + this.Bb |= Tje; + } + function t_c() { + $r.call(this, "GROW_TREE", 0); + } + function C9d(a) { + return a == null ? null : cde(a); + } + function G9d(a) { + return a == null ? null : jde(a); + } + function J9d(a) { + return a == null ? null : fcb(a); + } + function K9d(a) { + return a == null ? null : fcb(a); + } + function fdb(a) { + if (a.o != null) { + return; + } + vdb(a); + } + function DD(a) { + CCb(a == null || KD(a)); + return a; + } + function ED(a) { + CCb(a == null || LD(a)); + return a; + } + function GD(a) { + CCb(a == null || ND(a)); + return a; + } + function gB(a) { + this.q = new $wnd.Date(Sbb(a)); + } + function Mf(a, b) { + this.c = a; + ne.call(this, a, b); + } + function Sf(a, b) { + this.a = a; + Mf.call(this, a, b); + } + function Hg(a, b) { + this.d = a; + Dg(this); + this.b = b; + } + function bAb(a, b) { + Vzb.call(this, a); + this.a = b; + } + function vAb(a, b) { + Vzb.call(this, a); + this.a = b; + } + function sNb(a) { + pNb.call(this, 0, 0); + this.f = a; + } + function Vg(a, b, c2) { + dg.call(this, a, b, c2, null); + } + function Yg(a, b, c2) { + dg.call(this, a, b, c2, null); + } + function Pxb(a, b, c2) { + return a.ue(b, c2) <= 0 ? c2 : b; + } + function Qxb(a, b, c2) { + return a.ue(b, c2) <= 0 ? b : c2; + } + function g4c(a, b) { + return BD(Wrb(a.b, b), 149); + } + function i4c(a, b) { + return BD(Wrb(a.c, b), 229); + } + function wic(a) { + return BD(Ikb(a.a, a.b), 287); + } + function B6c(a) { + return new f7c(a.c, a.d + a.a); + } + function eLc(a) { + return FJc(), Jzc(BD(a, 197)); + } + function $Jb() { + $Jb = ccb; + ZJb = pqb((tdd(), sdd)); + } + function fOb(a, b) { + b.a ? gOb(a, b) : Fxb(a.a, b.b); + } + function qyb(a, b) { + if (lyb) { + return; + } + Ekb(a.a, b); + } + function F2b(a, b) { + x2b(); + return f_b(b.d.i, a); + } + function _9b(a, b) { + I9b(); + return new gac(b, a); + } + function _Hb(a, b) { + ytb(b, lle); + a.f = b; + return a; + } + function Kld(a, b, c2) { + c2 = _hd(a, b, 3, c2); + return c2; + } + function bmd(a, b, c2) { + c2 = _hd(a, b, 6, c2); + return c2; + } + function kpd(a, b, c2) { + c2 = _hd(a, b, 9, c2); + return c2; + } + function Cvd(a, b, c2) { + ++a.j; + a.Ki(); + Atd(a, b, c2); + } + function Avd(a, b, c2) { + ++a.j; + a.Hi(b, a.oi(b, c2)); + } + function bRd(a, b, c2) { + var d; + d = a.Zc(b); + d.Rb(c2); + } + function c7d(a, b, c2) { + return C2d(a.c, a.b, b, c2); + } + function DAd(a, b) { + return (b & Ohe) % a.d.length; + } + function Msd(a, b) { + Lsd.call(this, a); + this.a = b; + } + function uVd(a, b) { + lVd.call(this, a); + this.a = b; + } + function sYd(a, b) { + lVd.call(this, a); + this.a = b; + } + function zyd(a, b) { + this.c = a; + zud.call(this, b); + } + function YOd(a, b) { + this.a = a; + qOd.call(this, b); + } + function fTd(a, b) { + this.a = a; + qOd.call(this, b); + } + function Xp(a) { + this.a = (Xj(a, Jie), new Skb(a)); + } + function cq(a) { + this.a = (Xj(a, Jie), new Skb(a)); + } + function LA(a) { + !a.a && (a.a = new VA()); + return a.a; + } + function XMb(a) { + if (a > 8) { + return 0; + } + return a + 1; + } + function Ecb(a, b) { + Bcb(); + return a == b ? 0 : a ? 1 : -1; + } + function Opb(a, b, c2) { + return Npb(a, BD(b, 22), c2); + } + function Bz(a, b, c2) { + return a.apply(b, c2); + } + function Sfb(a, b, c2) { + a.a += zfb(b, 0, c2); + return a; + } + function ijb(a, b) { + var c2; + c2 = a.e; + a.e = b; + return c2; + } + function trb(a, b) { + var c2; + c2 = a[hke]; + c2.call(a, b); + } + function urb(a, b) { + var c2; + c2 = a[hke]; + c2.call(a, b); + } + function Aib(a, b) { + a.a.Vc(a.b, b); + ++a.b; + a.c = -1; + } + function Urb(a) { + Uhb(a.e); + a.d.b = a.d; + a.d.a = a.d; + } + function _f(a) { + a.b ? _f(a.b) : a.f.c.zc(a.e, a.d); + } + function _Ab(a, b, c2) { + EAb(); + MBb(a, b.Ce(a.a, c2)); + } + function Bxb(a, b) { + return Vd(Cwb(a.a, b, true)); + } + function Cxb(a, b) { + return Vd(Dwb(a.a, b, true)); + } + function _Bb(a, b) { + return eCb(new Array(b), a); + } + function HD(a) { + return String.fromCharCode(a); + } + function mz(a) { + return a == null ? null : a.message; + } + function gRb() { + this.a = new Rkb(); + this.b = new Rkb(); + } + function iTb() { + this.a = new MQb(); + this.b = new tTb(); + } + function tDb() { + this.b = new d7c(); + this.c = new Rkb(); + } + function _Qb() { + this.d = new d7c(); + this.e = new d7c(); + } + function n_b() { + this.n = new d7c(); + this.o = new d7c(); + } + function $Gb() { + this.n = new p0b(); + this.i = new I6c(); + } + function sec() { + this.a = new Umc(); + this.b = new mnc(); + } + function NIc() { + this.a = new Rkb(); + this.d = new Rkb(); + } + function LDc() { + this.b = new Tqb(); + this.a = new Tqb(); + } + function hSc() { + this.b = new Lqb(); + this.a = new Lqb(); + } + function HRc() { + this.b = new tRc(); + this.a = new hRc(); + } + function aHb() { + $Gb.call(this); + this.a = new d7c(); + } + function Ywb(a) { + Zwb.call(this, a, (lxb(), hxb)); + } + function J_b(a, b, c2, d) { + B_b.call(this, a, b, c2, d); + } + function sqd(a, b, c2) { + c2 != null && kmd(b, Wqd(a, c2)); + } + function tqd(a, b, c2) { + c2 != null && lmd(b, Wqd(a, c2)); + } + function Tod(a, b, c2) { + c2 = _hd(a, b, 11, c2); + return c2; + } + function P6c(a, b) { + a.a += b.a; + a.b += b.b; + return a; + } + function c7c(a, b) { + a.a -= b.a; + a.b -= b.b; + return a; + } + function u7b(a, b) { + return a.n.a = (uCb(b), b) + 10; + } + function v7b(a, b) { + return a.n.a = (uCb(b), b) + 10; + } + function dLd(a, b) { + return b == a || pud(UKd(b), a); + } + function PYd(a, b) { + return Rhb(a.a, b, "") == null; + } + function E2b(a, b) { + x2b(); + return !f_b(b.d.i, a); + } + function rjc(a, b) { + fad(a.f) ? sjc(a, b) : tjc(a, b); + } + function h1d(a, b) { + var c2; + c2 = b.Hh(a.a); + return c2; + } + function Cyd(a, b) { + qcb.call(this, gve + a + mue + b); + } + function gUd(a, b, c2, d) { + cUd.call(this, a, b, c2, d); + } + function Q4d(a, b, c2, d) { + cUd.call(this, a, b, c2, d); + } + function U4d(a, b, c2, d) { + Q4d.call(this, a, b, c2, d); + } + function n5d(a, b, c2, d) { + i5d.call(this, a, b, c2, d); + } + function p5d(a, b, c2, d) { + i5d.call(this, a, b, c2, d); + } + function v5d(a, b, c2, d) { + i5d.call(this, a, b, c2, d); + } + function t5d(a, b, c2, d) { + p5d.call(this, a, b, c2, d); + } + function A5d(a, b, c2, d) { + p5d.call(this, a, b, c2, d); + } + function y5d(a, b, c2, d) { + v5d.call(this, a, b, c2, d); + } + function D5d(a, b, c2, d) { + A5d.call(this, a, b, c2, d); + } + function d6d(a, b, c2, d) { + Y5d.call(this, a, b, c2, d); + } + function Vp(a, b, c2) { + this.a = a; + qc.call(this, b, c2); + } + function tk(a, b, c2) { + this.c = b; + this.b = c2; + this.a = a; + } + function ik(a, b, c2) { + return a.d = BD(b.Kb(c2), 164); + } + function j6d(a, b) { + return a.Aj().Nh().Kh(a, b); + } + function h6d(a, b) { + return a.Aj().Nh().Ih(a, b); + } + function Fdb(a, b) { + return uCb(a), PD(a) === PD(b); + } + function dfb(a, b) { + return uCb(a), PD(a) === PD(b); + } + function Dxb(a, b) { + return Vd(Cwb(a.a, b, false)); + } + function Exb(a, b) { + return Vd(Dwb(a.a, b, false)); + } + function vBb(a, b) { + return a.b.sd(new yBb(a, b)); + } + function BBb(a, b) { + return a.b.sd(new EBb(a, b)); + } + function HBb(a, b) { + return a.b.sd(new KBb(a, b)); + } + function lfb(a, b, c2) { + return a.lastIndexOf(b, c2); + } + function uTb(a, b, c2) { + return Kdb(a[b.b], a[c2.b]); + } + function RTb(a, b) { + return yNb(b, (Nyc(), Cwc), a); + } + function fmc(a, b) { + return beb(b.a.d.p, a.a.d.p); + } + function emc(a, b) { + return beb(a.a.d.p, b.a.d.p); + } + function _Oc(a, b) { + return Kdb(a.c - a.s, b.c - b.s); + } + function S_b(a) { + return !a.c ? -1 : Jkb(a.c.a, a, 0); + } + function Vxd(a) { + return a < 100 ? null : new Ixd(a); + } + function ecd(a) { + return a == Zbd || a == _bd || a == $bd; + } + function zAd(a, b) { + return JD(b, 15) && Btd(a.c, b); + } + function vyb(a, b) { + if (lyb) { + return; + } + !!b && (a.d = b); + } + function ujb(a, b) { + var c2; + c2 = b; + return !!Awb(a, c2); + } + function czd(a, b) { + this.c = a; + Pyd.call(this, a, b); + } + function fBb(a) { + this.c = a; + nvb.call(this, rie, 0); + } + function Avb(a, b) { + Bvb.call(this, a, a.length, b); + } + function aId(a, b, c2) { + return BD(a.c, 69).lk(b, c2); + } + function bId(a, b, c2) { + return BD(a.c, 69).mk(b, c2); + } + function O2d(a, b, c2) { + return N2d(a, BD(b, 332), c2); + } + function Q2d(a, b, c2) { + return P2d(a, BD(b, 332), c2); + } + function i3d(a, b, c2) { + return h3d(a, BD(b, 332), c2); + } + function k3d(a, b, c2) { + return j3d(a, BD(b, 332), c2); + } + function tn(a, b) { + return b == null ? null : Hv(a.b, b); + } + function Kcb(a) { + return LD(a) ? (uCb(a), a) : a.ke(); + } + function Ldb(a) { + return !isNaN(a) && !isFinite(a); + } + function Wn(a) { + Ql(); + this.a = (mmb(), new zob(a)); + } + function dIc(a) { + FHc(); + this.d = a; + this.a = new jkb(); + } + function xqb(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function Nrb(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function $sb(a, b, c2) { + this.d = a; + this.b = c2; + this.a = b; + } + function Qsb(a) { + Csb(this); + Osb(this); + ye(this, a); + } + function Tkb(a) { + Ckb(this); + bCb(this.c, 0, a.Pc()); + } + function Xwb(a) { + uib(a.a); + Kwb(a.c, a.b); + a.b = null; + } + function iyb(a) { + this.a = a; + Zfb(); + Cbb(Date.now()); + } + function JCb() { + JCb = ccb; + GCb = new nb(); + ICb = new nb(); + } + function ntb() { + ntb = ccb; + ltb = new otb(); + mtb = new qtb(); + } + function kzd() { + kzd = ccb; + jzd = KC(SI, Uhe, 1, 0, 5, 1); + } + function tGd() { + tGd = ccb; + sGd = KC(SI, Uhe, 1, 0, 5, 1); + } + function $Gd() { + $Gd = ccb; + ZGd = KC(SI, Uhe, 1, 0, 5, 1); + } + function Ql() { + Ql = ccb; + new Zl((mmb(), mmb(), jmb)); + } + function pxb(a) { + lxb(); + return es((zxb(), yxb), a); + } + function Hyb(a) { + Fyb(); + return es((Kyb(), Jyb), a); + } + function OEb(a) { + MEb(); + return es((REb(), QEb), a); + } + function WEb(a) { + UEb(); + return es((ZEb(), YEb), a); + } + function tFb(a) { + rFb(); + return es((wFb(), vFb), a); + } + function iHb(a) { + gHb(); + return es((lHb(), kHb), a); + } + function PHb(a) { + NHb(); + return es((SHb(), RHb), a); + } + function GIb(a) { + EIb(); + return es((JIb(), IIb), a); + } + function vJb(a) { + qJb(); + return es((yJb(), xJb), a); + } + function xLb(a) { + vLb(); + return es((ALb(), zLb), a); + } + function TMb(a) { + RMb(); + return es((WMb(), VMb), a); + } + function TOb(a) { + ROb(); + return es((WOb(), VOb), a); + } + function ePb(a) { + cPb(); + return es((hPb(), gPb), a); + } + function ZRb(a) { + XRb(); + return es((aSb(), _Rb), a); + } + function ATb(a) { + yTb(); + return es((DTb(), CTb), a); + } + function sUb(a) { + qUb(); + return es((vUb(), uUb), a); + } + function rWb(a) { + lWb(); + return es((uWb(), tWb), a); + } + function TXb(a) { + RXb(); + return es((WXb(), VXb), a); + } + function Mb(a, b) { + if (!a) { + throw vbb(new Wdb(b)); + } + } + function l0b(a) { + j0b(); + return es((o0b(), n0b), a); + } + function r0b(a) { + B_b.call(this, a.d, a.c, a.a, a.b); + } + function K_b(a) { + B_b.call(this, a.d, a.c, a.a, a.b); + } + function mKb(a, b, c2) { + this.b = a; + this.c = b; + this.a = c2; + } + function BZb(a, b, c2) { + this.b = a; + this.a = b; + this.c = c2; + } + function TNb(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function uOb(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function S3b(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function Z6b(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function n9b(a, b, c2) { + this.b = a; + this.a = b; + this.c = c2; + } + function x$b(a, b, c2) { + this.e = b; + this.b = a; + this.d = c2; + } + function $Ab(a, b, c2) { + EAb(); + a.a.Od(b, c2); + return b; + } + function LGb(a) { + var b; + b = new KGb(); + b.e = a; + return b; + } + function iLb(a) { + var b; + b = new fLb(); + b.b = a; + return b; + } + function D6b() { + D6b = ccb; + B6b = new M6b(); + C6b = new P6b(); + } + function Hgc() { + Hgc = ccb; + Fgc = new ghc(); + Ggc = new ihc(); + } + function jbc(a) { + gbc(); + return es((mbc(), lbc), a); + } + function Cjc(a) { + Ajc(); + return es((Fjc(), Ejc), a); + } + function Clc(a) { + Alc(); + return es((Flc(), Elc), a); + } + function Cpc(a) { + Apc(); + return es((Fpc(), Epc), a); + } + function Kpc(a) { + Ipc(); + return es((Npc(), Mpc), a); + } + function Wpc(a) { + Rpc(); + return es((Zpc(), Ypc), a); + } + function $jc(a) { + Xjc(); + return es((bkc(), akc), a); + } + function Hkc(a) { + Fkc(); + return es((Kkc(), Jkc), a); + } + function dqc(a) { + bqc(); + return es((gqc(), fqc), a); + } + function rqc(a) { + mqc(); + return es((uqc(), tqc), a); + } + function zqc(a) { + xqc(); + return es((Cqc(), Bqc), a); + } + function Iqc(a) { + Gqc(); + return es((Lqc(), Kqc), a); + } + function Vqc(a) { + Sqc(); + return es((Yqc(), Xqc), a); + } + function brc(a) { + _qc(); + return es((erc(), drc), a); + } + function nrc(a) { + lrc(); + return es((qrc(), prc), a); + } + function Arc(a) { + yrc(); + return es((Drc(), Crc), a); + } + function Qrc(a) { + Orc(); + return es((Trc(), Src), a); + } + function Zrc(a) { + Xrc(); + return es((asc(), _rc), a); + } + function gsc(a) { + esc(); + return es((jsc(), isc), a); + } + function osc(a) { + msc(); + return es((rsc(), qsc), a); + } + function Etc(a) { + Ctc(); + return es((Htc(), Gtc), a); + } + function qzc(a) { + lzc(); + return es((tzc(), szc), a); + } + function Azc(a) { + xzc(); + return es((Dzc(), Czc), a); + } + function Mzc(a) { + Izc(); + return es((Pzc(), Ozc), a); + } + function MAc(a) { + KAc(); + return es((PAc(), OAc), a); + } + function mAc(a) { + kAc(); + return es((pAc(), oAc), a); + } + function vAc(a) { + tAc(); + return es((yAc(), xAc), a); + } + function DAc(a) { + BAc(); + return es((GAc(), FAc), a); + } + function VAc(a) { + TAc(); + return es((YAc(), XAc), a); + } + function $zc(a) { + Vzc(); + return es((bAc(), aAc), a); + } + function bBc(a) { + _Ac(); + return es((eBc(), dBc), a); + } + function vBc(a) { + tBc(); + return es((yBc(), xBc), a); + } + function EBc(a) { + CBc(); + return es((HBc(), GBc), a); + } + function NBc(a) { + LBc(); + return es((QBc(), PBc), a); + } + function tGc(a) { + rGc(); + return es((wGc(), vGc), a); + } + function WIc(a) { + UIc(); + return es((ZIc(), YIc), a); + } + function $Lc(a) { + YLc(); + return es((bMc(), aMc), a); + } + function gMc(a) { + eMc(); + return es((jMc(), iMc), a); + } + function JOc(a) { + HOc(); + return es((MOc(), LOc), a); + } + function HQc(a) { + FQc(); + return es((KQc(), JQc), a); + } + function DRc(a) { + yRc(); + return es((GRc(), FRc), a); + } + function tSc(a) { + qSc(); + return es((wSc(), vSc), a); + } + function UTc(a) { + STc(); + return es((XTc(), WTc), a); + } + function UUc(a) { + PUc(); + return es((XUc(), WUc), a); + } + function aUc(a) { + $Tc(); + return es((dUc(), cUc), a); + } + function wVc(a) { + tVc(); + return es((zVc(), yVc), a); + } + function iWc(a) { + fWc(); + return es((lWc(), kWc), a); + } + function sWc(a) { + pWc(); + return es((vWc(), uWc), a); + } + function lXc(a) { + iXc(); + return es((oXc(), nXc), a); + } + function vXc(a) { + sXc(); + return es((yXc(), xXc), a); + } + function BYc(a) { + zYc(); + return es((EYc(), DYc), a); + } + function m$c(a) { + k$c(); + return es((p$c(), o$c), a); + } + function $$c(a) { + Y$c(); + return es((b_c(), a_c), a); + } + function n_c(a) { + i_c(); + return es((q_c(), p_c), a); + } + function w_c(a) { + s_c(); + return es((z_c(), y_c), a); + } + function E_c(a) { + C_c(); + return es((H_c(), G_c), a); + } + function P_c(a) { + N_c(); + return es((S_c(), R_c), a); + } + function W0c(a) { + R0c(); + return es((Z0c(), Y0c), a); + } + function f1c(a) { + a1c(); + return es((i1c(), h1c), a); + } + function P5c(a) { + N5c(); + return es((S5c(), R5c), a); + } + function b6c(a) { + _5c(); + return es((e6c(), d6c), a); + } + function H7c(a) { + F7c(); + return es((K7c(), J7c), a); + } + function k8c(a) { + i8c(); + return es((n8c(), m8c), a); + } + function V8b(a) { + S8b(); + return es((Y8b(), X8b), a); + } + function A5b(a) { + y5b(); + return es((D5b(), C5b), a); + } + function jad(a) { + ead(); + return es((mad(), lad), a); + } + function sad(a) { + qad(); + return es((vad(), uad), a); + } + function Cad(a) { + Aad(); + return es((Fad(), Ead), a); + } + function Oad(a) { + Mad(); + return es((Rad(), Qad), a); + } + function jbd(a) { + hbd(); + return es((mbd(), lbd), a); + } + function ubd(a) { + rbd(); + return es((xbd(), wbd), a); + } + function Kbd(a) { + Hbd(); + return es((Nbd(), Mbd), a); + } + function Vbd(a) { + Tbd(); + return es((Ybd(), Xbd), a); + } + function hcd(a) { + dcd(); + return es((kcd(), jcd), a); + } + function vcd(a) { + rcd(); + return es((ycd(), xcd), a); + } + function vdd(a) { + tdd(); + return es((ydd(), xdd), a); + } + function Kdd(a) { + Idd(); + return es((Ndd(), Mdd), a); + } + function $cd(a) { + Ucd(); + return es((cdd(), bdd), a); + } + function Fed(a) { + Ded(); + return es((Ied(), Hed), a); + } + function rgd(a) { + pgd(); + return es((ugd(), tgd), a); + } + function Esd(a) { + Csd(); + return es((Hsd(), Gsd), a); + } + function Yoc(a, b) { + return (uCb(a), a) + (uCb(b), b); + } + function NNd(a, b) { + Zfb(); + return wtd(ZKd(a.a), b); + } + function SNd(a, b) { + Zfb(); + return wtd(ZKd(a.a), b); + } + function bPc(a, b) { + this.c = a; + this.a = b; + this.b = b - a; + } + function nYc(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function L1c(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function T1c(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function Rrd(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function zCd(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + } + function IVd(a, b, c2) { + this.e = a; + this.a = b; + this.c = c2; + } + function kWd(a, b, c2) { + UVd(); + cWd.call(this, a, b, c2); + } + function HXd(a, b, c2) { + UVd(); + oXd.call(this, a, b, c2); + } + function TXd(a, b, c2) { + UVd(); + oXd.call(this, a, b, c2); + } + function ZXd(a, b, c2) { + UVd(); + oXd.call(this, a, b, c2); + } + function JXd(a, b, c2) { + UVd(); + HXd.call(this, a, b, c2); + } + function LXd(a, b, c2) { + UVd(); + HXd.call(this, a, b, c2); + } + function NXd(a, b, c2) { + UVd(); + LXd.call(this, a, b, c2); + } + function VXd(a, b, c2) { + UVd(); + TXd.call(this, a, b, c2); + } + function _Xd(a, b, c2) { + UVd(); + ZXd.call(this, a, b, c2); + } + function $j(a, b) { + Qb(a); + Qb(b); + return new _j(a, b); + } + function Nq(a, b) { + Qb(a); + Qb(b); + return new Wq(a, b); + } + function Rq(a, b) { + Qb(a); + Qb(b); + return new ar(a, b); + } + function lr(a, b) { + Qb(a); + Qb(b); + return new zr(a, b); + } + function BD(a, b) { + CCb(a == null || AD(a, b)); + return a; + } + function Nu(a) { + var b; + b = new Rkb(); + fr(b, a); + return b; + } + function Ex(a) { + var b; + b = new Tqb(); + fr(b, a); + return b; + } + function Hx(a) { + var b; + b = new Gxb(); + Jq(b, a); + return b; + } + function Ru(a) { + var b; + b = new Psb(); + Jq(b, a); + return b; + } + function YEc(a) { + !a.e && (a.e = new Rkb()); + return a.e; + } + function SMd(a) { + !a.c && (a.c = new xYd()); + return a.c; + } + function Ekb(a, b) { + a.c[a.c.length] = b; + return true; + } + function WA(a, b) { + this.c = a; + this.b = b; + this.a = false; + } + function Gg(a) { + this.d = a; + Dg(this); + this.b = ed(a.d); + } + function pzb() { + this.a = ";,;"; + this.b = ""; + this.c = ""; + } + function Bvb(a, b, c2) { + qvb.call(this, b, c2); + this.a = a; + } + function fAb(a, b, c2) { + this.b = a; + fvb.call(this, b, c2); + } + function lsb(a, b, c2) { + this.c = a; + pjb.call(this, b, c2); + } + function bCb(a, b, c2) { + $Bb(c2, 0, a, b, c2.length, false); + } + function HVb(a, b, c2, d, e) { + a.b = b; + a.c = c2; + a.d = d; + a.a = e; + } + function eBb(a, b) { + if (b) { + a.b = b; + a.a = (Tzb(b), b.a); + } + } + function v_b(a, b, c2, d, e) { + a.d = b; + a.c = c2; + a.a = d; + a.b = e; + } + function h5b(a) { + var b, c2; + b = a.b; + c2 = a.c; + a.b = c2; + a.c = b; + } + function k5b(a) { + var b, c2; + c2 = a.d; + b = a.a; + a.d = b; + a.a = c2; + } + function Lbb(a) { + return zbb(iD(Fbb(a) ? Rbb(a) : a)); + } + function rlc(a, b) { + return beb(D0b(a.d), D0b(b.d)); + } + function uic(a, b) { + return b == (Ucd(), Tcd) ? a.c : a.d; + } + function FHc() { + FHc = ccb; + DHc = (Ucd(), Tcd); + EHc = zcd; + } + function DRb() { + this.b = Edb(ED(Ksd((wSb(), vSb)))); + } + function aBb(a) { + return EAb(), KC(SI, Uhe, 1, a, 5, 1); + } + function C6c(a) { + return new f7c(a.c + a.b, a.d + a.a); + } + function Vmc(a, b) { + Imc(); + return beb(a.d.p, b.d.p); + } + function Lsb(a) { + sCb(a.b != 0); + return Nsb(a, a.a.a); + } + function Msb(a) { + sCb(a.b != 0); + return Nsb(a, a.c.b); + } + function rCb(a, b) { + if (!a) { + throw vbb(new ucb(b)); + } + } + function mCb(a, b) { + if (!a) { + throw vbb(new Wdb(b)); + } + } + function dWb(a, b, c2) { + cWb.call(this, a, b); + this.b = c2; + } + function pMd(a, b, c2) { + MLd.call(this, a, b); + this.c = c2; + } + function Dnc(a, b, c2) { + Cnc.call(this, b, c2); + this.d = a; + } + function _Gd(a) { + $Gd(); + MGd.call(this); + this.th(a); + } + function PNd(a, b, c2) { + this.a = a; + nNd.call(this, b, c2); + } + function UNd(a, b, c2) { + this.a = a; + nNd.call(this, b, c2); + } + function k2d(a, b, c2) { + MLd.call(this, a, b); + this.c = c2; + } + function y1d() { + T0d(); + z1d.call(this, (yFd(), xFd)); + } + function gFd(a) { + return a != null && !OEd(a, CEd, DEd); + } + function dFd(a, b) { + return (jFd(a) << 4 | jFd(b)) & aje; + } + function ln(a, b) { + return Vm(), Wj(a, b), new iy(a, b); + } + function Sdd(a, b) { + var c2; + if (a.n) { + c2 = b; + Ekb(a.f, c2); + } + } + function Upd(a, b, c2) { + var d; + d = new yC(c2); + cC(a, b, d); + } + function WUd(a, b) { + var c2; + c2 = a.c; + VUd(a, b); + return c2; + } + function Ydd(a, b) { + b < 0 ? a.g = -1 : a.g = b; + return a; + } + function $6c(a, b) { + W6c(a); + a.a *= b; + a.b *= b; + return a; + } + function G6c(a, b, c2, d, e) { + a.c = b; + a.d = c2; + a.b = d; + a.a = e; + } + function Dsb(a, b) { + Gsb(a, b, a.c.b, a.c); + return true; + } + function jsb(a) { + a.a.b = a.b; + a.b.a = a.a; + a.a = a.b = null; + } + function Aq(a) { + this.b = a; + this.a = Wm(this.b.a).Ed(); + } + function Wq(a, b) { + this.b = a; + this.a = b; + ol.call(this); + } + function ar(a, b) { + this.a = a; + this.b = b; + ol.call(this); + } + function vvb(a, b) { + qvb.call(this, b, 1040); + this.a = a; + } + function Eeb(a) { + return a == 0 || isNaN(a) ? a : a < 0 ? -1 : 1; + } + function WPb(a) { + QPb(); + return jtd(a) == Xod(ltd(a)); + } + function XPb(a) { + QPb(); + return ltd(a) == Xod(jtd(a)); + } + function iYb(a, b) { + return hYb(a, new cWb(b.a, b.b)); + } + function NZb(a) { + return !OZb(a) && a.c.i.c == a.d.i.c; + } + function _Gb(a) { + var b; + b = a.n; + return a.a.b + b.d + b.a; + } + function YHb(a) { + var b; + b = a.n; + return a.e.b + b.d + b.a; + } + function ZHb(a) { + var b; + b = a.n; + return a.e.a + b.b + b.c; + } + function zfe(a) { + wfe(); + return new ige(0, a); + } + function o_b(a) { + if (a.a) { + return a.a; + } + return JZb(a); + } + function CCb(a) { + if (!a) { + throw vbb(new Cdb(null)); + } + } + function X6d() { + X6d = ccb; + W6d = (mmb(), new anb(Fwe)); + } + function ex() { + ex = ccb; + new gx((_k(), $k), (Lk(), Kk)); + } + function oeb() { + oeb = ccb; + neb = KC(JI, nie, 19, 256, 0, 1); + } + function d$c(a, b, c2, d) { + e$c.call(this, a, b, c2, d, 0, 0); + } + function sQc(a, b, c2) { + return Rhb(a.b, BD(c2.b, 17), b); + } + function tQc(a, b, c2) { + return Rhb(a.b, BD(c2.b, 17), b); + } + function xfd(a, b) { + return Ekb(a, new f7c(b.a, b.b)); + } + function Bic(a, b) { + return a.c < b.c ? -1 : a.c == b.c ? 0 : 1; + } + function B0b(a) { + return a.e.c.length + a.g.c.length; + } + function D0b(a) { + return a.e.c.length - a.g.c.length; + } + function Ojc(a) { + return a.b.c.length - a.e.c.length; + } + function dKc(a) { + FJc(); + return (Ucd(), Ecd).Hc(a.j); + } + function lHd(a) { + $Gd(); + _Gd.call(this, a); + this.a = -1; + } + function R7d(a, b) { + f7d.call(this, a, b); + this.a = this; + } + function odb(a, b) { + var c2; + c2 = ldb(a, b); + c2.i = 2; + return c2; + } + function Evd(a, b) { + var c2; + ++a.j; + c2 = a.Ti(b); + return c2; + } + function e3c(a, b, c2) { + a.a = -1; + i3c(a, b.g, c2); + return a; + } + function Qrd(a, b, c2) { + Kqd(a.a, a.b, a.c, BD(b, 202), c2); + } + function OHd(a, b) { + PHd(a, b == null ? null : (uCb(b), b)); + } + function SUd(a, b) { + UUd(a, b == null ? null : (uCb(b), b)); + } + function TUd(a, b) { + UUd(a, b == null ? null : (uCb(b), b)); + } + function Zj(a, b, c2) { + return new tk(oAb(a).Ie(), c2, b); + } + function IC(a, b, c2, d, e, f2) { + return JC(a, b, c2, d, e, 0, f2); + } + function Ucb() { + Ucb = ccb; + Tcb = KC(xI, nie, 217, 256, 0, 1); + } + function Ceb() { + Ceb = ccb; + Beb = KC(MI, nie, 162, 256, 0, 1); + } + function Yeb() { + Yeb = ccb; + Xeb = KC(UI, nie, 184, 256, 0, 1); + } + function ddb() { + ddb = ccb; + cdb = KC(yI, nie, 172, 128, 0, 1); + } + function IVb() { + HVb(this, false, false, false, false); + } + function my(a) { + im(); + this.a = (mmb(), new anb(Qb(a))); + } + function ir(a) { + Qb(a); + while (a.Ob()) { + a.Pb(); + a.Qb(); + } + } + function Tw(a) { + a.a.cd(); + BD(a.a.dd(), 14).gc(); + zh(); + } + function mf(a) { + this.c = a; + this.b = this.c.d.vc().Kc(); + } + function fqb(a) { + this.c = a; + this.a = new Gqb(this.c.a); + } + function Vqb(a) { + this.a = new Mqb(a.gc()); + ye(this, a); + } + function Bsb(a) { + Wqb.call(this, new $rb()); + ye(this, a); + } + function Rfb(a, b) { + a.a += zfb(b, 0, b.length); + return a; + } + function Ikb(a, b) { + tCb(b, a.c.length); + return a.c[b]; + } + function $lb(a, b) { + tCb(b, a.a.length); + return a.a[b]; + } + function YAb(a, b) { + EAb(); + Vzb.call(this, a); + this.a = b; + } + function Qyb(a, b) { + return Aeb(wbb(Aeb(a.a).a, b.a)); + } + function jpb(a, b) { + return uCb(a), Fcb(a, (uCb(b), b)); + } + function opb(a, b) { + return uCb(b), Fcb(b, (uCb(a), a)); + } + function Oyb(a, b) { + return NC(b, 0, Bzb(b[0], Aeb(1))); + } + function Bzb(a, b) { + return Qyb(BD(a, 162), BD(b, 162)); + } + function vic(a) { + return a.c - BD(Ikb(a.a, a.b), 287).b; + } + function uNb(a) { + return !a.q ? (mmb(), mmb(), kmb) : a.q; + } + function Xi(a) { + return a.e.Hd().gc() * a.c.Hd().gc(); + } + function onc(a, b, c2) { + return beb(b.d[a.g], c2.d[a.g]); + } + function YHc(a, b, c2) { + return beb(a.d[b.p], a.d[c2.p]); + } + function ZHc(a, b, c2) { + return beb(a.d[b.p], a.d[c2.p]); + } + function $Hc(a, b, c2) { + return beb(a.d[b.p], a.d[c2.p]); + } + function _Hc(a, b, c2) { + return beb(a.d[b.p], a.d[c2.p]); + } + function q$c(a, b, c2) { + return $wnd.Math.min(c2 / a, 1 / b); + } + function sEc(a, b) { + return a ? 0 : $wnd.Math.max(0, b - 1); + } + function Elb(a, b) { + var c2; + for (c2 = 0; c2 < b; ++c2) { + a[c2] = -1; + } + } + function bVc(a) { + var b; + b = hVc(a); + return !b ? a : bVc(b); + } + function Voc(a, b) { + a.a == null && Toc(a); + return a.a[b]; + } + function qed(a) { + if (a.c) { + return a.c.f; + } + return a.e.b; + } + function red(a) { + if (a.c) { + return a.c.g; + } + return a.e.a; + } + function pFd(a) { + zud.call(this, a.gc()); + ytd(this, a); + } + function nXd(a, b) { + UVd(); + VVd.call(this, b); + this.a = a; + } + function KYd(a, b, c2) { + this.a = a; + xMd.call(this, b, c2, 2); + } + function B_b(a, b, c2, d) { + v_b(this, a, b, c2, d); + } + function ige(a, b) { + wfe(); + xfe.call(this, a); + this.a = b; + } + function jgd(a) { + this.b = new Psb(); + this.a = a; + this.c = -1; + } + function MOb() { + this.d = new f7c(0, 0); + this.e = new Tqb(); + } + function Nr(a) { + qc.call(this, 0, 0); + this.a = a; + this.b = 0; + } + function ejc(a) { + this.a = a; + this.c = new Lqb(); + $ic(this); + } + function ju(a) { + if (a.e.c != a.b) { + throw vbb(new Apb()); + } + } + function bt(a) { + if (a.c.e != a.a) { + throw vbb(new Apb()); + } + } + function Tbb(a) { + if (Fbb(a)) { + return a | 0; + } + return pD(a); + } + function Bfe(a, b) { + wfe(); + return new rge(a, b); + } + function SEd(a, b) { + return a == null ? b == null : dfb(a, b); + } + function TEd(a, b) { + return a == null ? b == null : efb(a, b); + } + function Npb(a, b, c2) { + rqb(a.a, b); + return Qpb(a, b.g, c2); + } + function Mlb(a, b, c2) { + oCb(0, b, a.length); + Klb(a, 0, b, c2); + } + function Dkb(a, b, c2) { + wCb(b, a.c.length); + aCb(a.c, b, c2); + } + function Dlb(a, b, c2) { + var d; + for (d = 0; d < b; ++d) { + a[d] = c2; + } + } + function qqb(a, b) { + var c2; + c2 = pqb(a); + nmb(c2, b); + return c2; + } + function Oz(a, b) { + !a && (a = []); + a[a.length] = b; + return a; + } + function Brb(a, b) { + return !(a.a.get(b) === void 0); + } + function Wyb(a, b) { + return Nyb(new rzb(), new bzb(a), b); + } + function Itb(a) { + return a == null ? ztb : new Ftb(uCb(a)); + } + function tqb(a, b) { + return JD(b, 22) && uqb(a, BD(b, 22)); + } + function vqb(a, b) { + return JD(b, 22) && wqb(a, BD(b, 22)); + } + function Aub(a) { + return Cub(a, 26) * ike + Cub(a, 27) * jke; + } + function MC(a) { + return Array.isArray(a) && a.im === gcb; + } + function bg(a) { + a.b ? bg(a.b) : a.d.dc() && a.f.c.Bc(a.e); + } + function $Nb(a, b) { + P6c(a.c, b); + a.b.c += b.a; + a.b.d += b.b; + } + function ZNb(a, b) { + $Nb(a, c7c(new f7c(b.a, b.b), a.c)); + } + function BLb(a, b) { + this.b = new Psb(); + this.a = a; + this.c = b; + } + function OVb() { + this.b = new $Vb(); + this.c = new SVb(this); + } + function oEb() { + this.d = new CEb(); + this.e = new uEb(this); + } + function aCc() { + ZBc(); + this.f = new Psb(); + this.e = new Psb(); + } + function $Jc() { + FJc(); + this.k = new Lqb(); + this.d = new Tqb(); + } + function Rgd() { + Rgd = ccb; + Qgd = new Osd((Y9c(), s9c), 0); + } + function Mr() { + Mr = ccb; + Lr = new Nr(KC(SI, Uhe, 1, 0, 5, 1)); + } + function gfc(a, b, c2) { + bfc(c2, a, 1); + Ekb(b, new Tfc(c2, a)); + } + function hfc(a, b, c2) { + cfc(c2, a, 1); + Ekb(b, new dgc(c2, a)); + } + function R$c(a, b, c2) { + return Qqb(a, new aDb(b.a, c2.a)); + } + function ACc(a, b, c2) { + return -beb(a.f[b.p], a.f[c2.p]); + } + function mHb(a, b, c2) { + var d; + if (a) { + d = a.i; + d.c = b; + d.b = c2; + } + } + function nHb(a, b, c2) { + var d; + if (a) { + d = a.i; + d.d = b; + d.a = c2; + } + } + function c3c(a, b, c2) { + a.a = -1; + i3c(a, b.g + 1, c2); + return a; + } + function Dod(a, b, c2) { + c2 = _hd(a, BD(b, 49), 7, c2); + return c2; + } + function JHd(a, b, c2) { + c2 = _hd(a, BD(b, 49), 3, c2); + return c2; + } + function JMd(a, b, c2) { + this.a = a; + BMd.call(this, b, c2, 22); + } + function UTd(a, b, c2) { + this.a = a; + BMd.call(this, b, c2, 14); + } + function eXd(a, b, c2, d) { + UVd(); + nWd.call(this, a, b, c2, d); + } + function lXd(a, b, c2, d) { + UVd(); + nWd.call(this, a, b, c2, d); + } + function FNd(a, b) { + (b.Bb & ote) != 0 && !a.a.o && (a.a.o = b); + } + function MD(a) { + return a != null && OD(a) && !(a.im === gcb); + } + function ID(a) { + return !Array.isArray(a) && a.im === gcb; + } + function ed(a) { + return JD(a, 15) ? BD(a, 15).Yc() : a.Kc(); + } + function De(a) { + return a.Qc(KC(SI, Uhe, 1, a.gc(), 5, 1)); + } + function u1d(a, b) { + return W1d(p1d(a, b)) ? b.Qh() : null; + } + function uvd(a) { + a ? Ty(a, (Zfb(), Yfb)) : (Zfb(), Yfb); + } + function Sr(a) { + this.a = (Mr(), Lr); + this.d = BD(Qb(a), 47); + } + function qg(a, b, c2, d) { + this.a = a; + dg.call(this, a, b, c2, d); + } + function Yge(a) { + Xge(); + this.a = 0; + this.b = a - 1; + this.c = 1; + } + function Yy(a) { + Py(this); + this.g = a; + Ry(this); + this._d(); + } + function Wm(a) { + if (a.c) { + return a.c; + } + return a.c = a.Id(); + } + function Xm(a) { + if (a.d) { + return a.d; + } + return a.d = a.Jd(); + } + function Rl(a) { + var b; + b = a.c; + return !b ? a.c = a.Dd() : b; + } + function fe(a) { + var b; + b = a.f; + return !b ? a.f = a.Dc() : b; + } + function Ec(a) { + var b; + b = a.i; + return !b ? a.i = a.bc() : b; + } + function Ffe(a) { + wfe(); + return new Hge(10, a, 0); + } + function Ubb(a) { + if (Fbb(a)) { + return "" + a; + } + return qD(a); + } + function a4d(a) { + if (a.e.j != a.d) { + throw vbb(new Apb()); + } + } + function Nbb(a, b) { + return zbb(kD(Fbb(a) ? Rbb(a) : a, b)); + } + function Obb(a, b) { + return zbb(lD(Fbb(a) ? Rbb(a) : a, b)); + } + function Pbb(a, b) { + return zbb(mD(Fbb(a) ? Rbb(a) : a, b)); + } + function Dcb(a, b) { + return Ecb((uCb(a), a), (uCb(b), b)); + } + function Ddb(a, b) { + return Kdb((uCb(a), a), (uCb(b), b)); + } + function fx(a, b) { + return Qb(b), a.a.Ad(b) && !a.b.Ad(b); + } + function dD(a, b) { + return TC(a.l & b.l, a.m & b.m, a.h & b.h); + } + function jD(a, b) { + return TC(a.l | b.l, a.m | b.m, a.h | b.h); + } + function rD(a, b) { + return TC(a.l ^ b.l, a.m ^ b.m, a.h ^ b.h); + } + function QAb(a, b) { + return TAb(a, (uCb(b), new Rxb(b))); + } + function RAb(a, b) { + return TAb(a, (uCb(b), new Txb(b))); + } + function g1b(a) { + return z0b(), BD(a, 11).e.c.length != 0; + } + function l1b(a) { + return z0b(), BD(a, 11).g.c.length != 0; + } + function bac(a, b) { + I9b(); + return Kdb(b.a.o.a, a.a.o.a); + } + function Rnc(a, b, c2) { + return Snc(a, BD(b, 11), BD(c2, 11)); + } + function koc(a) { + if (a.e) { + return poc(a.e); + } + return null; + } + function Iub(a) { + if (!a.d) { + a.d = a.b.Kc(); + a.c = a.b.gc(); + } + } + function pBb(a, b, c2) { + if (a.a.Mb(c2)) { + a.b = true; + b.td(c2); + } + } + function _vb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new rcb()); + } + } + function Pyb(a, b, c2) { + NC(b, 0, Bzb(b[0], c2[0])); + return b; + } + function _yc(a, b, c2) { + b.Ye(c2, Edb(ED(Ohb(a.b, c2))) * a.a); + } + function n6c(a, b, c2) { + i6c(); + return m6c(a, b) && m6c(a, c2); + } + function tcd(a) { + rcd(); + return !a.Hc(ncd) && !a.Hc(pcd); + } + function D6c(a) { + return new f7c(a.c + a.b / 2, a.d + a.a / 2); + } + function oOd(a, b) { + return b.kh() ? xid(a.b, BD(b, 49)) : b; + } + function bvb(a, b) { + this.e = a; + this.d = (b & 64) != 0 ? b | oie : b; + } + function qvb(a, b) { + this.c = 0; + this.d = a; + this.b = b | 64 | oie; + } + function gub(a) { + this.b = new Skb(11); + this.a = (ipb(), a); + } + function Qwb(a) { + this.b = null; + this.a = (ipb(), !a ? fpb : a); + } + function nHc(a) { + this.a = lHc(a.a); + this.b = new Tkb(a.b); + } + function Pzd(a) { + this.b = a; + Oyd.call(this, a); + Ozd(this); + } + function Xzd(a) { + this.b = a; + bzd.call(this, a); + Wzd(this); + } + function jUd(a, b, c2) { + this.a = a; + gUd.call(this, b, c2, 5, 6); + } + function Y5d(a, b, c2, d) { + this.b = a; + xMd.call(this, b, c2, d); + } + function nSd(a, b, c2, d, e) { + oSd.call(this, a, b, c2, d, e, -1); + } + function DSd(a, b, c2, d, e) { + ESd.call(this, a, b, c2, d, e, -1); + } + function cUd(a, b, c2, d) { + xMd.call(this, a, b, c2); + this.b = d; + } + function i5d(a, b, c2, d) { + pMd.call(this, a, b, c2); + this.b = d; + } + function x0d(a) { + Wud.call(this, a, false); + this.a = false; + } + function Lj(a, b) { + this.b = a; + sj.call(this, a.b); + this.a = b; + } + function px(a, b) { + im(); + ox.call(this, a, Dm(new amb(b))); + } + function Cfe(a, b) { + wfe(); + return new Dge(a, b, 0); + } + function Efe(a, b) { + wfe(); + return new Dge(6, a, b); + } + function nfb(a, b) { + return dfb(a.substr(0, b.length), b); + } + function Mhb(a, b) { + return ND(b) ? Qhb(a, b) : !!irb(a.f, b); + } + function Rrb(a, b) { + uCb(b); + while (a.Ob()) { + b.td(a.Pb()); + } + } + function Vgb(a, b, c2) { + Hgb(); + this.e = a; + this.d = b; + this.a = c2; + } + function amc(a, b, c2, d) { + var e; + e = a.i; + e.i = b; + e.a = c2; + e.b = d; + } + function xJc(a) { + var b; + b = a; + while (b.f) { + b = b.f; + } + return b; + } + function fkb(a) { + var b; + b = bkb(a); + sCb(b != null); + return b; + } + function gkb(a) { + var b; + b = ckb(a); + sCb(b != null); + return b; + } + function cv(a, b) { + var c2; + c2 = a.a.gc(); + Sb(b, c2); + return c2 - b; + } + function Glb(a, b) { + var c2; + for (c2 = 0; c2 < b; ++c2) { + a[c2] = false; + } + } + function Clb(a, b, c2, d) { + var e; + for (e = b; e < c2; ++e) { + a[e] = d; + } + } + function ylb(a, b, c2, d) { + oCb(b, c2, a.length); + Clb(a, b, c2, d); + } + function Vvb(a, b, c2) { + _vb(c2, a.a.c.length); + Nkb(a.a, c2, b); + } + function Lyb(a, b, c2) { + this.c = a; + this.a = b; + mmb(); + this.b = c2; + } + function Qpb(a, b, c2) { + var d; + d = a.b[b]; + a.b[b] = c2; + return d; + } + function Qqb(a, b) { + var c2; + c2 = a.a.zc(b, a); + return c2 == null; + } + function zjb(a) { + if (!a) { + throw vbb(new utb()); + } + return a.d; + } + function vCb(a, b) { + if (a == null) { + throw vbb(new Heb(b)); + } + } + function Goc(a, b) { + if (!b) { + return false; + } + return ye(a, b); + } + function K2c(a, b, c2) { + C2c(a, b.g, c2); + rqb(a.c, b); + return a; + } + function vVb(a) { + tVb(a, (ead(), aad)); + a.d = true; + return a; + } + function c2d(a) { + !a.j && i2d(a, d1d(a.g, a.b)); + return a.j; + } + function nlb(a) { + yCb(a.b != -1); + Kkb(a.c, a.a = a.b); + a.b = -1; + } + function Uhb(a) { + a.f = new lrb(a); + a.g = new Frb(a); + zpb(a); + } + function Plb(a) { + return new YAb(null, Olb(a, a.length)); + } + function ul(a) { + return new Sr(new xl(a.a.length, a.a)); + } + function iD(a) { + return TC(~a.l & Eje, ~a.m & Eje, ~a.h & Fje); + } + function OD(a) { + return typeof a === Jhe || typeof a === Nhe; + } + function D9d(a) { + return a == Pje ? Nwe : a == Qje ? "-INF" : "" + a; + } + function F9d(a) { + return a == Pje ? Nwe : a == Qje ? "-INF" : "" + a; + } + function yRb(a, b) { + return a > 0 ? $wnd.Math.log(a / b) : -100; + } + function ueb(a, b) { + return ybb(a, b) < 0 ? -1 : ybb(a, b) > 0 ? 1 : 0; + } + function HMb(a, b, c2) { + return IMb(a, BD(b, 46), BD(c2, 167)); + } + function iq(a, b) { + return BD(Rl(Wm(a.a)).Xb(b), 42).cd(); + } + function Olb(a, b) { + return avb(b, a.length), new vvb(a, b); + } + function Pyd(a, b) { + this.d = a; + Fyd.call(this, a); + this.e = b; + } + function Lub(a) { + this.d = (uCb(a), a); + this.a = 0; + this.c = rie; + } + function rge(a, b) { + xfe.call(this, 1); + this.a = a; + this.b = b; + } + function Rzb(a, b) { + !a.c ? Ekb(a.b, b) : Rzb(a.c, b); + return a; + } + function uB(a, b, c2) { + var d; + d = tB(a, b); + vB(a, b, c2); + return d; + } + function ZBb(a, b) { + var c2; + c2 = a.slice(0, b); + return PC(c2, a); + } + function Flb(a, b, c2) { + var d; + for (d = 0; d < b; ++d) { + NC(a, d, c2); + } + } + function ffb(a, b, c2, d, e) { + while (b < c2) { + d[e++] = bfb(a, b++); + } + } + function hLb(a, b) { + return Kdb(a.c.c + a.c.b, b.c.c + b.c.b); + } + function Axb(a, b) { + return Iwb(a.a, b, (Bcb(), zcb)) == null; + } + function Vsb(a, b) { + Gsb(a.d, b, a.b.b, a.b); + ++a.a; + a.c = null; + } + function d3d(a, b) { + JLd(a, JD(b, 153) ? b : BD(b, 1937).gl()); + } + function hkc(a, b) { + MAb(NAb(a.Oc(), new Rkc()), new Tkc(b)); + } + function kkc(a, b, c2, d, e) { + jkc(a, BD(Qc(b.k, c2), 15), c2, d, e); + } + function lOc(a) { + a.s = NaN; + a.c = NaN; + mOc(a, a.e); + mOc(a, a.j); + } + function it(a) { + a.a = null; + a.e = null; + Uhb(a.b); + a.d = 0; + ++a.c; + } + function gKc(a) { + return $wnd.Math.abs(a.d.e - a.e.e) - a.a; + } + function MAd(a, b, c2) { + return BD(a.c._c(b, BD(c2, 133)), 42); + } + function os() { + hs(); + return OC(GC(yG, 1), Kie, 538, 0, [gs]); + } + function VPb(a) { + QPb(); + return Xod(jtd(a)) == Xod(ltd(a)); + } + function aRb(a) { + _Qb.call(this); + this.a = a; + Ekb(a.a, this); + } + function tPc(a, b) { + this.d = DPc(a); + this.c = b; + this.a = 0.5 * b; + } + function A6d() { + $rb.call(this); + this.a = true; + this.b = true; + } + function aLd(a) { + return (a.i == null && TKd(a), a.i).length; + } + function oRd(a) { + return JD(a, 99) && (BD(a, 18).Bb & ote) != 0; + } + function w2d(a, b) { + ++a.j; + t3d(a, a.i, b); + v2d(a, BD(b, 332)); + } + function vId(a, b) { + b = a.nk(null, b); + return uId(a, null, b); + } + function ytd(a, b) { + a.hi() && (b = Dtd(a, b)); + return a.Wh(b); + } + function mdb(a, b, c2) { + var d; + d = ldb(a, b); + zdb(c2, d); + return d; + } + function ldb(a, b) { + var c2; + c2 = new jdb(); + c2.j = a; + c2.d = b; + return c2; + } + function Qb(a) { + if (a == null) { + throw vbb(new Geb()); + } + return a; + } + function Fc(a) { + var b; + b = a.j; + return !b ? a.j = new Cw(a) : b; + } + function Vi(a) { + var b; + b = a.f; + return !b ? a.f = new Rj(a) : b; + } + function ci(a) { + var b; + return b = a.k, !b ? a.k = new th(a) : b; + } + function Uc(a) { + var b; + return b = a.k, !b ? a.k = new th(a) : b; + } + function Pc(a) { + var b; + return b = a.g, !b ? a.g = new lh(a) : b; + } + function Yi(a) { + var b; + return b = a.i, !b ? a.i = new Ci(a) : b; + } + function qo(a) { + var b; + b = a.d; + return !b ? a.d = new ap(a) : b; + } + function Fb(a) { + Qb(a); + return JD(a, 475) ? BD(a, 475) : fcb(a); + } + function Ix(a) { + if (JD(a, 607)) { + return a; + } + return new by(a); + } + function qj(a, b) { + Pb(b, a.c.b.c.gc()); + return new Fj(a, b); + } + function Dfe(a, b, c2) { + wfe(); + return new zge(a, b, c2); + } + function NC(a, b, c2) { + qCb(c2 == null || FC(a, c2)); + return a[b] = c2; + } + function bv(a, b) { + var c2; + c2 = a.a.gc(); + Pb(b, c2); + return c2 - 1 - b; + } + function Afb(a, b) { + a.a += String.fromCharCode(b); + return a; + } + function Kfb(a, b) { + a.a += String.fromCharCode(b); + return a; + } + function ovb(a, b) { + uCb(b); + while (a.c < a.d) { + a.ze(b, a.c++); + } + } + function Ohb(a, b) { + return ND(b) ? Phb(a, b) : Wd(irb(a.f, b)); + } + function ZPb(a, b) { + QPb(); + return a == jtd(b) ? ltd(b) : jtd(b); + } + function isd(a, b) { + Qpd(a, new yC(b.f != null ? b.f : "" + b.g)); + } + function ksd(a, b) { + Qpd(a, new yC(b.f != null ? b.f : "" + b.g)); + } + function dVb(a) { + this.b = new Rkb(); + this.a = new Rkb(); + this.c = a; + } + function H1b(a) { + this.c = new d7c(); + this.a = new Rkb(); + this.b = a; + } + function pRb(a) { + _Qb.call(this); + this.a = new d7c(); + this.c = a; + } + function yC(a) { + if (a == null) { + throw vbb(new Geb()); + } + this.a = a; + } + function HA(a) { + fA(); + this.b = new Rkb(); + this.a = a; + sA(this, a); + } + function v4c(a) { + this.c = a; + this.a = new Psb(); + this.b = new Psb(); + } + function GB() { + GB = ccb; + EB = new HB(false); + FB = new HB(true); + } + function im() { + im = ccb; + Ql(); + hm = new ux((mmb(), mmb(), jmb)); + } + function yx() { + yx = ccb; + Ql(); + xx = new zx((mmb(), mmb(), lmb)); + } + function NFd() { + NFd = ccb; + MFd = BZd(); + !!(jGd(), PFd) && DZd(); + } + function aac(a, b) { + I9b(); + return BD(Mpb(a, b.d), 15).Fc(b); + } + function pTb(a, b, c2, d) { + return c2 == 0 || (c2 - d) / c2 < a.e || b >= a.g; + } + function NHc(a, b, c2) { + var d; + d = THc(a, b, c2); + return MHc(a, d); + } + function Qpd(a, b) { + var c2; + c2 = a.a.length; + tB(a, c2); + vB(a, c2, b); + } + function gCb(a, b) { + var c2; + c2 = console[a]; + c2.call(console, b); + } + function Bvd(a, b) { + var c2; + ++a.j; + c2 = a.Vi(); + a.Ii(a.oi(c2, b)); + } + function E1c(a, b, c2) { + BD(b.b, 65); + Hkb(b.a, new L1c(a, c2, b)); + } + function oXd(a, b, c2) { + VVd.call(this, b); + this.a = a; + this.b = c2; + } + function Dge(a, b, c2) { + xfe.call(this, a); + this.a = b; + this.b = c2; + } + function dYd(a, b, c2) { + this.a = a; + lVd.call(this, b); + this.b = c2; + } + function f0d(a, b, c2) { + this.a = a; + mxd.call(this, 8, b, null, c2); + } + function z1d(a) { + this.a = (uCb(Rve), Rve); + this.b = a; + new oUd(); + } + function ct(a) { + this.c = a; + this.b = this.c.a; + this.a = this.c.e; + } + function usb(a) { + this.c = a; + this.b = a.a.d.a; + ypb(a.a.e, this); + } + function uib(a) { + yCb(a.c != -1); + a.d.$c(a.c); + a.b = a.c; + a.c = -1; + } + function U6c(a) { + return $wnd.Math.sqrt(a.a * a.a + a.b * a.b); + } + function Uvb(a, b) { + return _vb(b, a.a.c.length), Ikb(a.a, b); + } + function Hb(a, b) { + return PD(a) === PD(b) || a != null && pb(a, b); + } + function oAb(a) { + if (0 >= a) { + return new yAb(); + } + return pAb(a - 1); + } + function Nfe(a) { + if (!bfe) + return false; + return Qhb(bfe, a); + } + function Ehe(a) { + if (a) + return a.dc(); + return !a.Kc().Ob(); + } + function Q_b(a) { + if (!a.a && !!a.c) { + return a.c.b; + } + return a.a; + } + function LHd(a) { + !a.a && (a.a = new xMd(m5, a, 4)); + return a.a; + } + function LQd(a) { + !a.d && (a.d = new xMd(j5, a, 1)); + return a.d; + } + function uCb(a) { + if (a == null) { + throw vbb(new Geb()); + } + return a; + } + function Qzb(a) { + if (!a.c) { + a.d = true; + Szb(a); + } else { + a.c.He(); + } + } + function Tzb(a) { + if (!a.c) { + Uzb(a); + a.d = true; + } else { + Tzb(a.c); + } + } + function Kpb(a) { + Ae(a.a); + a.b = KC(SI, Uhe, 1, a.b.length, 5, 1); + } + function qlc(a, b) { + return beb(b.j.c.length, a.j.c.length); + } + function igd(a, b) { + a.c < 0 || a.b.b < a.c ? Fsb(a.b, b) : a.a._e(b); + } + function Did(a, b) { + var c2; + c2 = a.Yg(b); + c2 >= 0 ? a.Bh(c2) : vid(a, b); + } + function WHc(a) { + var b, c2; + b = a.c.i.c; + c2 = a.d.i.c; + return b == c2; + } + function Wwd(a) { + if (a.p != 4) + throw vbb(new Ydb()); + return a.e; + } + function Vwd(a) { + if (a.p != 3) + throw vbb(new Ydb()); + return a.e; + } + function Ywd(a) { + if (a.p != 6) + throw vbb(new Ydb()); + return a.f; + } + function fxd(a) { + if (a.p != 6) + throw vbb(new Ydb()); + return a.k; + } + function cxd(a) { + if (a.p != 3) + throw vbb(new Ydb()); + return a.j; + } + function dxd(a) { + if (a.p != 4) + throw vbb(new Ydb()); + return a.j; + } + function AYd(a) { + !a.b && (a.b = new RYd(new NYd())); + return a.b; + } + function $1d(a) { + a.c == -2 && e2d(a, X0d(a.g, a.b)); + return a.c; + } + function pdb(a, b) { + var c2; + c2 = ldb("", a); + c2.n = b; + c2.i = 1; + return c2; + } + function MNb(a, b) { + $Nb(BD(b.b, 65), a); + Hkb(b.a, new RNb(a)); + } + function Cnd(a, b) { + wtd((!a.a && (a.a = new fTd(a, a)), a.a), b); + } + function Qzd(a, b) { + this.b = a; + Pyd.call(this, a, b); + Ozd(this); + } + function Yzd(a, b) { + this.b = a; + czd.call(this, a, b); + Wzd(this); + } + function Ms(a, b, c2, d) { + Wo.call(this, a, b); + this.d = c2; + this.a = d; + } + function $o(a, b, c2, d) { + Wo.call(this, a, c2); + this.a = b; + this.f = d; + } + function iy(a, b) { + Pp.call(this, umb(Qb(a), Qb(b))); + this.a = b; + } + function cae() { + fod.call(this, Ewe, (p8d(), o8d)); + $9d(this); + } + function AZd() { + fod.call(this, _ve, (LFd(), KFd)); + uZd(this); + } + function T0c() { + $r.call(this, "DELAUNAY_TRIANGULATION", 0); + } + function vfb(a) { + return String.fromCharCode.apply(null, a); + } + function Rhb(a, b, c2) { + return ND(b) ? Shb(a, b, c2) : jrb(a.f, b, c2); + } + function tmb(a) { + mmb(); + return !a ? (ipb(), ipb(), hpb) : a.ve(); + } + function d2c(a, b, c2) { + Y1c(); + return c2.pg(a, BD(b.cd(), 146)); + } + function ix(a, b) { + ex(); + return new gx(new il(a), new Uk(b)); + } + function Iu(a) { + Xj(a, Mie); + return Oy(wbb(wbb(5, a), a / 10 | 0)); + } + function Vm() { + Vm = ccb; + Um = new wx(OC(GC(CK, 1), zie, 42, 0, [])); + } + function hob(a) { + !a.d && (a.d = new lnb(a.c.Cc())); + return a.d; + } + function eob(a) { + !a.a && (a.a = new Gob(a.c.vc())); + return a.a; + } + function gob(a) { + !a.b && (a.b = new zob(a.c.ec())); + return a.b; + } + function keb(a, b) { + while (b-- > 0) { + a = a << 1 | (a < 0 ? 1 : 0); + } + return a; + } + function wtb(a, b) { + return PD(a) === PD(b) || a != null && pb(a, b); + } + function Gbc(a, b) { + return Bcb(), BD(b.b, 19).a < a ? true : false; + } + function Hbc(a, b) { + return Bcb(), BD(b.a, 19).a < a ? true : false; + } + function Mpb(a, b) { + return tqb(a.a, b) ? a.b[BD(b, 22).g] : null; + } + function kcb(a, b, c2, d) { + a.a = qfb(a.a, 0, b) + ("" + d) + pfb(a.a, c2); + } + function OJb(a, b) { + a.u.Hc((rcd(), ncd)) && MJb(a, b); + QJb(a, b); + } + function bfb(a, b) { + BCb(b, a.length); + return a.charCodeAt(b); + } + function vtb() { + hz.call(this, "There is no more element."); + } + function xkb(a) { + this.d = a; + this.a = this.d.b; + this.b = this.d.c; + } + function kEb(a) { + a.b = false; + a.c = false; + a.d = false; + a.a = false; + } + function Znd(a, b, c2, d) { + Ynd(a, b, c2, false); + LPd(a, d); + return a; + } + function h3c(a) { + a.j.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = -1; + return a; + } + function Old(a) { + !a.c && (a.c = new y5d(z2, a, 5, 8)); + return a.c; + } + function Nld(a) { + !a.b && (a.b = new y5d(z2, a, 4, 7)); + return a.b; + } + function Kkd(a) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + return a.n; + } + function Yod(a) { + !a.c && (a.c = new cUd(F2, a, 9, 9)); + return a.c; + } + function a2d(a) { + a.e == Gwe && g2d(a, a1d(a.g, a.b)); + return a.e; + } + function b2d(a) { + a.f == Gwe && h2d(a, b1d(a.g, a.b)); + return a.f; + } + function Ah(a) { + var b; + b = a.b; + !b && (a.b = b = new Ph(a)); + return b; + } + function Ae(a) { + var b; + for (b = a.Kc(); b.Ob(); ) { + b.Pb(); + b.Qb(); + } + } + function Fg(a) { + ag(a.d); + if (a.d.d != a.c) { + throw vbb(new Apb()); + } + } + function Xx(a, b) { + this.b = a; + this.c = b; + this.a = new Gqb(this.b); + } + function Zeb(a, b, c2) { + this.a = Zie; + this.d = a; + this.b = b; + this.c = c2; + } + function Mub(a, b) { + this.d = (uCb(a), a); + this.a = 16449; + this.c = b; + } + function nqd(a, b) { + ctd(a, Edb(Xpd(b, "x")), Edb(Xpd(b, "y"))); + } + function Aqd(a, b) { + ctd(a, Edb(Xpd(b, "x")), Edb(Xpd(b, "y"))); + } + function JAb(a, b) { + Uzb(a); + return new YAb(a, new qBb(b, a.a)); + } + function NAb(a, b) { + Uzb(a); + return new YAb(a, new IBb(b, a.a)); + } + function OAb(a, b) { + Uzb(a); + return new bAb(a, new wBb(b, a.a)); + } + function PAb(a, b) { + Uzb(a); + return new vAb(a, new CBb(b, a.a)); + } + function Cy(a, b) { + return new Ay(BD(Qb(a), 62), BD(Qb(b), 62)); + } + function PWb(a, b) { + LWb(); + return Kdb((uCb(a), a), (uCb(b), b)); + } + function fPb() { + cPb(); + return OC(GC(GO, 1), Kie, 481, 0, [bPb]); + } + function o_c() { + i_c(); + return OC(GC(N_, 1), Kie, 482, 0, [h_c]); + } + function x_c() { + s_c(); + return OC(GC(O_, 1), Kie, 551, 0, [r_c]); + } + function X0c() { + R0c(); + return OC(GC(W_, 1), Kie, 530, 0, [Q0c]); + } + function cEc(a) { + this.a = new Rkb(); + this.e = KC(WD, nie, 48, a, 0, 2); + } + function l$b(a, b, c2, d) { + this.a = a; + this.e = b; + this.d = c2; + this.c = d; + } + function QIc(a, b, c2, d) { + this.a = a; + this.c = b; + this.b = c2; + this.d = d; + } + function rKc(a, b, c2, d) { + this.c = a; + this.b = b; + this.a = c2; + this.d = d; + } + function WKc(a, b, c2, d) { + this.c = a; + this.b = b; + this.d = c2; + this.a = d; + } + function J6c(a, b, c2, d) { + this.c = a; + this.d = b; + this.b = c2; + this.a = d; + } + function gPc(a, b, c2, d) { + this.a = a; + this.d = b; + this.c = c2; + this.b = d; + } + function Blc(a, b, c2, d) { + $r.call(this, a, b); + this.a = c2; + this.b = d; + } + function Ggd(a, b, c2, d) { + this.a = a; + this.c = b; + this.d = c2; + this.b = d; + } + function pec(a, b, c2) { + Pmc(a.a, c2); + dmc(c2); + enc(a.b, c2); + xmc(b, c2); + } + function Pid(a, b, c2) { + var d, e; + d = QEd(a); + e = b.Kh(c2, d); + return e; + } + function KPb(a, b) { + var c2, d; + c2 = a / b; + d = QD(c2); + c2 > d && ++d; + return d; + } + function Nnd(a) { + var b, c2; + c2 = (b = new UQd(), b); + NQd(c2, a); + return c2; + } + function Ond(a) { + var b, c2; + c2 = (b = new UQd(), b); + RQd(c2, a); + return c2; + } + function hqd(a, b) { + var c2; + c2 = Ohb(a.f, b); + Yqd(b, c2); + return null; + } + function JZb(a) { + var b; + b = P2b(a); + if (b) { + return b; + } + return null; + } + function Wod(a) { + !a.b && (a.b = new cUd(B2, a, 12, 3)); + return a.b; + } + function YEd(a) { + return a != null && hnb(GEd, a.toLowerCase()); + } + function ied(a, b) { + return Kdb(red(a) * qed(a), red(b) * qed(b)); + } + function jed(a, b) { + return Kdb(red(a) * qed(a), red(b) * qed(b)); + } + function wEb(a, b) { + return Kdb(a.d.c + a.d.b / 2, b.d.c + b.d.b / 2); + } + function UVb(a, b) { + return Kdb(a.g.c + a.g.b / 2, b.g.c + b.g.b / 2); + } + function pQb(a, b, c2) { + c2.a ? eld(a, b.b - a.f / 2) : dld(a, b.a - a.g / 2); + } + function prd(a, b, c2, d) { + this.a = a; + this.b = b; + this.c = c2; + this.d = d; + } + function ord(a, b, c2, d) { + this.a = a; + this.b = b; + this.c = c2; + this.d = d; + } + function JVd(a, b, c2, d) { + this.e = a; + this.a = b; + this.c = c2; + this.d = d; + } + function ZVd(a, b, c2, d) { + this.a = a; + this.c = b; + this.d = c2; + this.b = d; + } + function cXd(a, b, c2, d) { + UVd(); + mWd.call(this, b, c2, d); + this.a = a; + } + function jXd(a, b, c2, d) { + UVd(); + mWd.call(this, b, c2, d); + this.a = a; + } + function Ng(a, b) { + this.a = a; + Hg.call(this, a, BD(a.d, 15).Zc(b)); + } + function ZBd(a) { + this.f = a; + this.c = this.f.e; + a.f > 0 && YBd(this); + } + function lBb(a, b, c2, d) { + this.b = a; + this.c = d; + nvb.call(this, b, c2); + } + function tib(a) { + sCb(a.b < a.d.gc()); + return a.d.Xb(a.c = a.b++); + } + function Osb(a) { + a.a.a = a.c; + a.c.b = a.a; + a.a.b = a.c.a = null; + a.b = 0; + } + function u_b(a, b) { + a.b = b.b; + a.c = b.c; + a.d = b.d; + a.a = b.a; + return a; + } + function Ry(a) { + if (a.n) { + a.e !== Sie && a._d(); + a.j = null; + } + return a; + } + function FD(a) { + CCb(a == null || OD(a) && !(a.im === gcb)); + return a; + } + function p4b(a) { + this.b = new Rkb(); + Gkb(this.b, this.b); + this.a = a; + } + function QPb() { + QPb = ccb; + PPb = new Rkb(); + OPb = new Lqb(); + NPb = new Rkb(); + } + function mmb() { + mmb = ccb; + jmb = new xmb(); + kmb = new Qmb(); + lmb = new Ymb(); + } + function ipb() { + ipb = ccb; + fpb = new kpb(); + gpb = new kpb(); + hpb = new ppb(); + } + function ODb() { + ODb = ccb; + LDb = new JDb(); + NDb = new oEb(); + MDb = new fEb(); + } + function MCb() { + if (HCb == 256) { + GCb = ICb; + ICb = new nb(); + HCb = 0; + } + ++HCb; + } + function nd(a) { + var b; + return b = a.f, !b ? a.f = new ne(a, a.c) : b; + } + function d2b(a) { + return Qld(a) && Ccb(DD(hkd(a, (Nyc(), gxc)))); + } + function mcc(a, b) { + return Rc(a, BD(vNb(b, (Nyc(), Nxc)), 19), b); + } + function POc(a, b) { + return vPc(a.j, b.s, b.c) + vPc(b.e, a.s, a.c); + } + function ooc(a, b) { + if (!!a.e && !a.e.a) { + moc(a.e, b); + ooc(a.e, b); + } + } + function noc(a, b) { + if (!!a.d && !a.d.a) { + moc(a.d, b); + noc(a.d, b); + } + } + function hed(a, b) { + return -Kdb(red(a) * qed(a), red(b) * qed(b)); + } + function cgd(a) { + return BD(a.cd(), 146).tg() + ":" + fcb(a.dd()); + } + function Zgc(a) { + Hgc(); + var b; + b = BD(a.g, 10); + b.n.a = a.d.c + b.d.b; + } + function wgc(a, b, c2) { + qgc(); + return iEb(BD(Ohb(a.e, b), 522), c2); + } + function Y2c(a, b) { + rb(a); + rb(b); + return Xr(BD(a, 22), BD(b, 22)); + } + function oic(a, b, c2) { + a.i = 0; + a.e = 0; + if (b == c2) { + return; + } + kic(a, b, c2); + } + function pic(a, b, c2) { + a.i = 0; + a.e = 0; + if (b == c2) { + return; + } + lic(a, b, c2); + } + function Spd(a, b, c2) { + var d, e; + d = Kcb(c2); + e = new TB(d); + cC(a, b, e); + } + function FSd(a, b, c2, d, e, f2) { + ESd.call(this, a, b, c2, d, e, f2 ? -2 : -1); + } + function U5d(a, b, c2, d) { + MLd.call(this, b, c2); + this.b = a; + this.a = d; + } + function QRc(a, b) { + new Psb(); + this.a = new s7c(); + this.b = a; + this.c = b; + } + function Hec(a, b) { + BD(vNb(a, (wtc(), Qsc)), 15).Fc(b); + return b; + } + function Rb(a, b) { + if (a == null) { + throw vbb(new Heb(b)); + } + return a; + } + function WKd(a) { + !a.q && (a.q = new cUd(n5, a, 11, 10)); + return a.q; + } + function ZKd(a) { + !a.s && (a.s = new cUd(t5, a, 21, 17)); + return a.s; + } + function Vod(a) { + !a.a && (a.a = new cUd(E2, a, 10, 11)); + return a.a; + } + function Dx(a) { + return JD(a, 14) ? new Vqb(BD(a, 14)) : Ex(a.Kc()); + } + function Ni(a) { + return new aj(a, a.e.Hd().gc() * a.c.Hd().gc()); + } + function Zi(a) { + return new kj(a, a.e.Hd().gc() * a.c.Hd().gc()); + } + function rz(a) { + return !!a && !!a.hashCode ? a.hashCode() : FCb(a); + } + function Qhb(a, b) { + return b == null ? !!irb(a.f, null) : Brb(a.g, b); + } + function Oq(a) { + Qb(a); + return mr(new Sr(ur(a.a.Kc(), new Sq()))); + } + function vmb(a) { + mmb(); + return JD(a, 54) ? new Yob(a) : new Inb(a); + } + function VDb(a, b, c2) { + if (a.f) { + return a.f.Ne(b, c2); + } + return false; + } + function Gfb(a, b) { + a.a = qfb(a.a, 0, b) + "" + pfb(a.a, b + 1); + return a; + } + function fVb(a, b) { + var c2; + c2 = Sqb(a.a, b); + c2 && (b.d = null); + return c2; + } + function zpb(a) { + var b, c2; + c2 = a; + b = c2.$modCount | 0; + c2.$modCount = b + 1; + } + function pu(a) { + this.b = a; + this.c = a; + a.e = null; + a.c = null; + this.a = 1; + } + function hOb(a) { + this.b = a; + this.a = new Hxb(BD(Qb(new kOb()), 62)); + } + function uEb(a) { + this.c = a; + this.b = new Hxb(BD(Qb(new xEb()), 62)); + } + function SVb(a) { + this.c = a; + this.b = new Hxb(BD(Qb(new VVb()), 62)); + } + function FYb() { + this.a = new HXb(); + this.b = new LXb(); + this.d = new SYb(); + } + function UZb() { + this.a = new s7c(); + this.b = (Xj(3, Jie), new Skb(3)); + } + function VMc() { + this.b = new Tqb(); + this.d = new Psb(); + this.e = new twb(); + } + function K6c(a) { + this.c = a.c; + this.d = a.d; + this.b = a.b; + this.a = a.a; + } + function Ay(a, b) { + oi.call(this, new Qwb(a)); + this.a = a; + this.b = b; + } + function eod() { + bod(this, new $md()); + this.wb = (NFd(), MFd); + LFd(); + } + function eHc(a) { + Odd(a, "No crossing minimization", 1); + Qdd(a); + } + function Gz(a) { + Az(); + $wnd.setTimeout(function() { + throw a; + }, 0); + } + function _Kd(a) { + if (!a.u) { + $Kd(a); + a.u = new YOd(a, a); + } + return a.u; + } + function wjd(a) { + var b; + b = BD(Ajd(a, 16), 26); + return !b ? a.zh() : b; + } + function Jsd(a, b) { + return JD(b, 146) && dfb(a.b, BD(b, 146).tg()); + } + function t0d(a, b) { + return a.a ? b.Wg().Kc() : BD(b.Wg(), 69).Zh(); + } + function u3b(a) { + return a.k == (j0b(), h0b) && wNb(a, (wtc(), Csc)); + } + function ux(a) { + this.a = (mmb(), JD(a, 54) ? new Yob(a) : new Inb(a)); + } + function Rz() { + Rz = ccb; + var a, b; + b = !Xz(); + a = new dA(); + Qz = b ? new Yz() : a; + } + function Wy(a, b) { + var c2; + c2 = hdb(a.gm); + return b == null ? c2 : c2 + ": " + b; + } + function Eob(a, b) { + var c2; + c2 = a.b.Qc(b); + Fob(c2, a.b.gc()); + return c2; + } + function ytb(a, b) { + if (a == null) { + throw vbb(new Heb(b)); + } + return a; + } + function irb(a, b) { + return grb(a, b, hrb(a, b == null ? 0 : a.b.se(b))); + } + function ofb(a, b, c2) { + return c2 >= 0 && dfb(a.substr(c2, b.length), b); + } + function H2d(a, b, c2, d, e, f2, g) { + return new O7d(a.e, b, c2, d, e, f2, g); + } + function Cxd(a, b, c2, d, e, f2) { + this.a = a; + nxd.call(this, b, c2, d, e, f2); + } + function vyd(a, b, c2, d, e, f2) { + this.a = a; + nxd.call(this, b, c2, d, e, f2); + } + function $Ec(a, b) { + this.g = a; + this.d = OC(GC(OQ, 1), kne, 10, 0, [b]); + } + function KVd(a, b) { + this.e = a; + this.a = SI; + this.b = R5d(b); + this.c = b; + } + function cIb(a, b) { + $Gb.call(this); + THb(this); + this.a = a; + this.c = b; + } + function kBc(a, b, c2, d) { + NC(a.c[b.g], c2.g, d); + NC(a.c[c2.g], b.g, d); + } + function nBc(a, b, c2, d) { + NC(a.c[b.g], b.g, c2); + NC(a.b[b.g], b.g, d); + } + function cBc() { + _Ac(); + return OC(GC(fX, 1), Kie, 376, 0, [$Ac, ZAc]); + } + function crc() { + _qc(); + return OC(GC(MW, 1), Kie, 479, 0, [$qc, Zqc]); + } + function Aqc() { + xqc(); + return OC(GC(JW, 1), Kie, 419, 0, [vqc, wqc]); + } + function Lpc() { + Ipc(); + return OC(GC(FW, 1), Kie, 422, 0, [Gpc, Hpc]); + } + function psc() { + msc(); + return OC(GC(SW, 1), Kie, 420, 0, [ksc, lsc]); + } + function EAc() { + BAc(); + return OC(GC(cX, 1), Kie, 421, 0, [zAc, AAc]); + } + function XIc() { + UIc(); + return OC(GC(mY, 1), Kie, 523, 0, [TIc, SIc]); + } + function KOc() { + HOc(); + return OC(GC(DZ, 1), Kie, 520, 0, [GOc, FOc]); + } + function _Lc() { + YLc(); + return OC(GC(fZ, 1), Kie, 516, 0, [XLc, WLc]); + } + function hMc() { + eMc(); + return OC(GC(gZ, 1), Kie, 515, 0, [cMc, dMc]); + } + function IQc() { + FQc(); + return OC(GC(YZ, 1), Kie, 455, 0, [DQc, EQc]); + } + function bUc() { + $Tc(); + return OC(GC(F$, 1), Kie, 425, 0, [ZTc, YTc]); + } + function VTc() { + STc(); + return OC(GC(E$, 1), Kie, 480, 0, [QTc, RTc]); + } + function VUc() { + PUc(); + return OC(GC(K$, 1), Kie, 495, 0, [NUc, OUc]); + } + function jWc() { + fWc(); + return OC(GC(X$, 1), Kie, 426, 0, [dWc, eWc]); + } + function g1c() { + a1c(); + return OC(GC(X_, 1), Kie, 429, 0, [_0c, $0c]); + } + function F_c() { + C_c(); + return OC(GC(P_, 1), Kie, 430, 0, [B_c, A_c]); + } + function PEb() { + MEb(); + return OC(GC(aN, 1), Kie, 428, 0, [LEb, KEb]); + } + function XEb() { + UEb(); + return OC(GC(bN, 1), Kie, 427, 0, [SEb, TEb]); + } + function $Rb() { + XRb(); + return OC(GC(gP, 1), Kie, 424, 0, [VRb, WRb]); + } + function B5b() { + y5b(); + return OC(GC(ZR, 1), Kie, 511, 0, [x5b, w5b]); + } + function lid(a, b, c2, d) { + return c2 >= 0 ? a.jh(b, c2, d) : a.Sg(null, c2, d); + } + function hgd(a) { + if (a.b.b == 0) { + return a.a.$e(); + } + return Lsb(a.b); + } + function Xwd(a) { + if (a.p != 5) + throw vbb(new Ydb()); + return Tbb(a.f); + } + function exd(a) { + if (a.p != 5) + throw vbb(new Ydb()); + return Tbb(a.k); + } + function pNd(a) { + PD(a.a) === PD((NKd(), MKd)) && qNd(a); + return a.a; + } + function by(a) { + this.a = BD(Qb(a), 271); + this.b = (mmb(), new Zob(a)); + } + function bQc(a, b) { + $Pc(this, new f7c(a.a, a.b)); + _Pc(this, Ru(b)); + } + function FQc() { + FQc = ccb; + DQc = new GQc(jle, 0); + EQc = new GQc(kle, 1); + } + function YLc() { + YLc = ccb; + XLc = new ZLc(kle, 0); + WLc = new ZLc(jle, 1); + } + function Hp() { + Gp.call(this, new Mqb(Cv(12))); + Lb(true); + this.a = 2; + } + function Hge(a, b, c2) { + wfe(); + xfe.call(this, a); + this.b = b; + this.a = c2; + } + function cWd(a, b, c2) { + UVd(); + VVd.call(this, b); + this.a = a; + this.b = c2; + } + function aIb(a) { + $Gb.call(this); + THb(this); + this.a = a; + this.c = true; + } + function isb(a) { + var b; + b = a.c.d.b; + a.b = b; + a.a = a.c.d; + b.a = a.c.d.b = a; + } + function $Cb(a) { + var b; + NGb(a.a); + MGb(a.a); + b = new YGb(a.a); + UGb(b); + } + function iKb(a, b) { + hKb(a, true); + Hkb(a.e.wf(), new mKb(a, true, b)); + } + function tlb(a, b) { + pCb(b); + return vlb(a, KC(WD, oje, 25, b, 15, 1), b); + } + function YPb(a, b) { + QPb(); + return a == Xod(jtd(b)) || a == Xod(ltd(b)); + } + function Phb(a, b) { + return b == null ? Wd(irb(a.f, null)) : Crb(a.g, b); + } + function Ksb(a) { + return a.b == 0 ? null : (sCb(a.b != 0), Nsb(a, a.a.a)); + } + function QD(a) { + return Math.max(Math.min(a, Ohe), -2147483648) | 0; + } + function uz(a, b) { + var c2 = tz[a.charCodeAt(0)]; + return c2 == null ? a : c2; + } + function Cx(a, b) { + Rb(a, "set1"); + Rb(b, "set2"); + return new Px(a, b); + } + function QUb(a, b) { + var c2; + c2 = zUb(a.f, b); + return P6c(V6c(c2), a.f.d); + } + function Jwb(a, b) { + var c2, d; + c2 = b; + d = new fxb(); + Lwb(a, c2, d); + return d.d; + } + function NJb(a, b, c2, d) { + var e; + e = new aHb(); + b.a[c2.g] = e; + Npb(a.b, d, e); + } + function zid(a, b, c2) { + var d; + d = a.Yg(b); + d >= 0 ? a.sh(d, c2) : uid(a, b, c2); + } + function hvd(a, b, c2) { + evd(); + !!a && Rhb(dvd, a, b); + !!a && Rhb(cvd, a, c2); + } + function g_c(a, b, c2) { + this.i = new Rkb(); + this.b = a; + this.g = b; + this.a = c2; + } + function VZc(a, b, c2) { + this.c = new Rkb(); + this.e = a; + this.f = b; + this.b = c2; + } + function b$c(a, b, c2) { + this.a = new Rkb(); + this.e = a; + this.f = b; + this.c = c2; + } + function Zy(a, b) { + Py(this); + this.f = b; + this.g = a; + Ry(this); + this._d(); + } + function ZA(a, b) { + var c2; + c2 = a.q.getHours(); + a.q.setDate(b); + YA(a, c2); + } + function no(a, b) { + var c2; + Qb(b); + for (c2 = a.a; c2; c2 = c2.c) { + b.Od(c2.g, c2.i); + } + } + function Fx(a) { + var b; + b = new Uqb(Cv(a.length)); + nmb(b, a); + return b; + } + function ecb(a) { + function b() { + } + b.prototype = a || {}; + return new b(); + } + function dkb(a, b) { + if (Zjb(a, b)) { + wkb(a); + return true; + } + return false; + } + function aC(a, b) { + if (b == null) { + throw vbb(new Geb()); + } + return bC(a, b); + } + function tdb(a) { + if (a.qe()) { + return null; + } + var b = a.n; + return _bb[b]; + } + function Mld(a) { + if (a.Db >> 16 != 3) + return null; + return BD(a.Cb, 33); + } + function mpd(a) { + if (a.Db >> 16 != 9) + return null; + return BD(a.Cb, 33); + } + function fmd(a) { + if (a.Db >> 16 != 6) + return null; + return BD(a.Cb, 79); + } + function Ind(a) { + if (a.Db >> 16 != 7) + return null; + return BD(a.Cb, 235); + } + function Fod(a) { + if (a.Db >> 16 != 7) + return null; + return BD(a.Cb, 160); + } + function Xod(a) { + if (a.Db >> 16 != 11) + return null; + return BD(a.Cb, 33); + } + function nid(a, b) { + var c2; + c2 = a.Yg(b); + return c2 >= 0 ? a.lh(c2) : tid(a, b); + } + function Dtd(a, b) { + var c2; + c2 = new Bsb(b); + Ve(c2, a); + return new Tkb(c2); + } + function Uud(a) { + var b; + b = a.d; + b = a.si(a.f); + wtd(a, b); + return b.Ob(); + } + function t_b(a, b) { + a.b += b.b; + a.c += b.c; + a.d += b.d; + a.a += b.a; + return a; + } + function A4b(a, b) { + return $wnd.Math.abs(a) < $wnd.Math.abs(b) ? a : b; + } + function Zod(a) { + return !a.a && (a.a = new cUd(E2, a, 10, 11)), a.a.i > 0; + } + function oDb() { + this.a = new zsb(); + this.e = new Tqb(); + this.g = 0; + this.i = 0; + } + function BGc(a) { + this.a = a; + this.b = KC(SX, nie, 1944, a.e.length, 0, 2); + } + function RHc(a, b, c2) { + var d; + d = SHc(a, b, c2); + a.b = new BHc(d.c.length); + } + function eMc() { + eMc = ccb; + cMc = new fMc(vle, 0); + dMc = new fMc("UP", 1); + } + function STc() { + STc = ccb; + QTc = new TTc(Yqe, 0); + RTc = new TTc("FAN", 1); + } + function evd() { + evd = ccb; + dvd = new Lqb(); + cvd = new Lqb(); + ivd(hK, new jvd()); + } + function Swd(a) { + if (a.p != 0) + throw vbb(new Ydb()); + return Kbb(a.f, 0); + } + function _wd(a) { + if (a.p != 0) + throw vbb(new Ydb()); + return Kbb(a.k, 0); + } + function MHd(a) { + if (a.Db >> 16 != 3) + return null; + return BD(a.Cb, 147); + } + function ZJd(a) { + if (a.Db >> 16 != 6) + return null; + return BD(a.Cb, 235); + } + function WId(a) { + if (a.Db >> 16 != 17) + return null; + return BD(a.Cb, 26); + } + function rdb(a, b) { + var c2 = a.a = a.a || []; + return c2[b] || (c2[b] = a.le(b)); + } + function hrb(a, b) { + var c2; + c2 = a.a.get(b); + return c2 == null ? new Array() : c2; + } + function aB(a, b) { + var c2; + c2 = a.q.getHours(); + a.q.setMonth(b); + YA(a, c2); + } + function Shb(a, b, c2) { + return b == null ? jrb(a.f, null, c2) : Drb(a.g, b, c2); + } + function FLd(a, b, c2, d, e, f2) { + return new pSd(a.e, b, a.aj(), c2, d, e, f2); + } + function Tfb(a, b, c2) { + a.a = qfb(a.a, 0, b) + ("" + c2) + pfb(a.a, b); + return a; + } + function bq(a, b, c2) { + Ekb(a.a, (Vm(), Wj(b, c2), new Wo(b, c2))); + return a; + } + function uu(a) { + ot(a.c); + a.e = a.a = a.c; + a.c = a.c.c; + ++a.d; + return a.a.f; + } + function vu(a) { + ot(a.e); + a.c = a.a = a.e; + a.e = a.e.e; + --a.d; + return a.a.f; + } + function RZb(a, b) { + !!a.d && Lkb(a.d.e, a); + a.d = b; + !!a.d && Ekb(a.d.e, a); + } + function QZb(a, b) { + !!a.c && Lkb(a.c.g, a); + a.c = b; + !!a.c && Ekb(a.c.g, a); + } + function $_b(a, b) { + !!a.c && Lkb(a.c.a, a); + a.c = b; + !!a.c && Ekb(a.c.a, a); + } + function F0b(a, b) { + !!a.i && Lkb(a.i.j, a); + a.i = b; + !!a.i && Ekb(a.i.j, a); + } + function jDb(a, b, c2) { + this.a = b; + this.c = a; + this.b = (Qb(c2), new Tkb(c2)); + } + function qXb(a, b, c2) { + this.a = b; + this.c = a; + this.b = (Qb(c2), new Tkb(c2)); + } + function aOb(a, b) { + this.a = a; + this.c = R6c(this.a); + this.b = new K6c(b); + } + function IAb(a) { + var b; + Uzb(a); + b = new Tqb(); + return JAb(a, new jBb(b)); + } + function wCb(a, b) { + if (a < 0 || a > b) { + throw vbb(new qcb(Ake + a + Bke + b)); + } + } + function Ppb(a, b) { + return vqb(a.a, b) ? Qpb(a, BD(b, 22).g, null) : null; + } + function WUb(a) { + LUb(); + return Bcb(), BD(a.a, 81).d.e != 0 ? true : false; + } + function qs() { + qs = ccb; + ps = as((hs(), OC(GC(yG, 1), Kie, 538, 0, [gs]))); + } + function SBc() { + SBc = ccb; + RBc = c3c(new j3c(), (qUb(), pUb), (S8b(), J8b)); + } + function ZBc() { + ZBc = ccb; + YBc = c3c(new j3c(), (qUb(), pUb), (S8b(), J8b)); + } + function oCc() { + oCc = ccb; + nCc = c3c(new j3c(), (qUb(), pUb), (S8b(), J8b)); + } + function aJc() { + aJc = ccb; + _Ic = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function FJc() { + FJc = ccb; + EJc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function ILc() { + ILc = ccb; + HLc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function wMc() { + wMc = ccb; + vMc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + } + function fUc() { + fUc = ccb; + eUc = c3c(new j3c(), (yRc(), xRc), (qSc(), kSc)); + } + function DOc(a, b, c2, d) { + this.c = a; + this.d = d; + BOc(this, b); + COc(this, c2); + } + function W3c(a) { + this.c = new Psb(); + this.b = a.b; + this.d = a.c; + this.a = a.a; + } + function e7c(a) { + this.a = $wnd.Math.cos(a); + this.b = $wnd.Math.sin(a); + } + function BOc(a, b) { + !!a.a && Lkb(a.a.k, a); + a.a = b; + !!a.a && Ekb(a.a.k, a); + } + function COc(a, b) { + !!a.b && Lkb(a.b.f, a); + a.b = b; + !!a.b && Ekb(a.b.f, a); + } + function D1c(a, b) { + E1c(a, a.b, a.c); + BD(a.b.b, 65); + !!b && BD(b.b, 65).b; + } + function BUd(a, b) { + CUd(a, b); + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 2); + } + function cJd(a, b) { + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 4); + pnd(a, b); + } + function lKd(a, b) { + JD(a.Cb, 179) && (BD(a.Cb, 179).tb = null); + pnd(a, b); + } + function T2d(a, b) { + return Q6d(), YId(b) ? new R7d(b, a) : new f7d(b, a); + } + function jsd(a, b) { + var c2, d; + c2 = b.c; + d = c2 != null; + d && Qpd(a, new yC(b.c)); + } + function XOd(a) { + var b, c2; + c2 = (LFd(), b = new UQd(), b); + NQd(c2, a); + return c2; + } + function eTd(a) { + var b, c2; + c2 = (LFd(), b = new UQd(), b); + NQd(c2, a); + return c2; + } + function yCc(a, b) { + var c2; + c2 = new H1b(a); + b.c[b.c.length] = c2; + return c2; + } + function Aw(a, b) { + var c2; + c2 = BD(Hv(nd(a.a), b), 14); + return !c2 ? 0 : c2.gc(); + } + function UAb(a) { + var b; + Uzb(a); + b = (ipb(), ipb(), gpb); + return VAb(a, b); + } + function nr(a) { + var b; + while (true) { + b = a.Pb(); + if (!a.Ob()) { + return b; + } + } + } + function Ki(a, b) { + Ii.call(this, new Mqb(Cv(a))); + Xj(b, mie); + this.a = b; + } + function Jib(a, b, c2) { + xCb(b, c2, a.gc()); + this.c = a; + this.a = b; + this.b = c2 - b; + } + function Mkb(a, b, c2) { + var d; + xCb(b, c2, a.c.length); + d = c2 - b; + cCb(a.c, b, d); + } + function Fub(a, b) { + Eub(a, Tbb(xbb(Obb(b, 24), nke)), Tbb(xbb(b, nke))); + } + function tCb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new qcb(Ake + a + Bke + b)); + } + } + function BCb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new Xfb(Ake + a + Bke + b)); + } + } + function Kub(a, b) { + this.b = (uCb(a), a); + this.a = (b & Rje) == 0 ? b | 64 | oie : b; + } + function kkb(a) { + Vjb(this); + dCb(this.a, geb($wnd.Math.max(8, a)) << 1); + } + function A0b(a) { + return l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a])); + } + function Iyb() { + Fyb(); + return OC(GC(xL, 1), Kie, 132, 0, [Cyb, Dyb, Eyb]); + } + function jHb() { + gHb(); + return OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]); + } + function QHb() { + NHb(); + return OC(GC(sN, 1), Kie, 461, 0, [LHb, KHb, MHb]); + } + function HIb() { + EIb(); + return OC(GC(zN, 1), Kie, 462, 0, [DIb, CIb, BIb]); + } + function UXb() { + RXb(); + return OC(GC(hQ, 1), Kie, 423, 0, [QXb, PXb, OXb]); + } + function BTb() { + yTb(); + return OC(GC(oP, 1), Kie, 379, 0, [wTb, vTb, xTb]); + } + function Bzc() { + xzc(); + return OC(GC(ZW, 1), Kie, 378, 0, [uzc, vzc, wzc]); + } + function Xpc() { + Rpc(); + return OC(GC(GW, 1), Kie, 314, 0, [Ppc, Opc, Qpc]); + } + function eqc() { + bqc(); + return OC(GC(HW, 1), Kie, 337, 0, [$pc, aqc, _pc]); + } + function Jqc() { + Gqc(); + return OC(GC(KW, 1), Kie, 450, 0, [Eqc, Dqc, Fqc]); + } + function Ikc() { + Fkc(); + return OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc]); + } + function hsc() { + esc(); + return OC(GC(RW, 1), Kie, 303, 0, [csc, dsc, bsc]); + } + function $rc() { + Xrc(); + return OC(GC(QW, 1), Kie, 292, 0, [Vrc, Wrc, Urc]); + } + function NAc() { + KAc(); + return OC(GC(dX, 1), Kie, 452, 0, [JAc, HAc, IAc]); + } + function wAc() { + tAc(); + return OC(GC(bX, 1), Kie, 339, 0, [rAc, qAc, sAc]); + } + function WAc() { + TAc(); + return OC(GC(eX, 1), Kie, 375, 0, [QAc, RAc, SAc]); + } + function OBc() { + LBc(); + return OC(GC(jX, 1), Kie, 377, 0, [JBc, KBc, IBc]); + } + function wBc() { + tBc(); + return OC(GC(hX, 1), Kie, 336, 0, [qBc, rBc, sBc]); + } + function FBc() { + CBc(); + return OC(GC(iX, 1), Kie, 338, 0, [BBc, zBc, ABc]); + } + function uGc() { + rGc(); + return OC(GC(PX, 1), Kie, 454, 0, [oGc, pGc, qGc]); + } + function xVc() { + tVc(); + return OC(GC(O$, 1), Kie, 442, 0, [sVc, qVc, rVc]); + } + function tWc() { + pWc(); + return OC(GC(Y$, 1), Kie, 380, 0, [mWc, nWc, oWc]); + } + function CYc() { + zYc(); + return OC(GC(q_, 1), Kie, 381, 0, [xYc, yYc, wYc]); + } + function wXc() { + sXc(); + return OC(GC(b_, 1), Kie, 293, 0, [qXc, rXc, pXc]); + } + function _$c() { + Y$c(); + return OC(GC(J_, 1), Kie, 437, 0, [V$c, W$c, X$c]); + } + function kbd() { + hbd(); + return OC(GC(z1, 1), Kie, 334, 0, [fbd, ebd, gbd]); + } + function tad() { + qad(); + return OC(GC(u1, 1), Kie, 272, 0, [nad, oad, pad2]); + } + function o3d(a, b) { + return p3d(a, b, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function LZc(a, b, c2) { + var d; + d = MZc(a, b, false); + return d.b <= b && d.a <= c2; + } + function tMc(a, b, c2) { + var d; + d = new sMc(); + d.b = b; + d.a = c2; + ++b.b; + Ekb(a.d, d); + } + function fs(a, b) { + var c2; + c2 = (uCb(a), a).g; + lCb(!!c2); + uCb(b); + return c2(b); + } + function av(a, b) { + var c2, d; + d = cv(a, b); + c2 = a.a.Zc(d); + return new qv(a, c2); + } + function cKd(a) { + if (a.Db >> 16 != 6) + return null; + return BD(aid(a), 235); + } + function Uwd(a) { + if (a.p != 2) + throw vbb(new Ydb()); + return Tbb(a.f) & aje; + } + function bxd(a) { + if (a.p != 2) + throw vbb(new Ydb()); + return Tbb(a.k) & aje; + } + function Z1d(a) { + a.a == (T0d(), S0d) && d2d(a, U0d(a.g, a.b)); + return a.a; + } + function _1d(a) { + a.d == (T0d(), S0d) && f2d(a, Y0d(a.g, a.b)); + return a.d; + } + function mlb(a) { + sCb(a.a < a.c.c.length); + a.b = a.a++; + return a.c.c[a.b]; + } + function hEb(a, b) { + a.b = a.b | b.b; + a.c = a.c | b.c; + a.d = a.d | b.d; + a.a = a.a | b.a; + } + function xbb(a, b) { + return zbb(dD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Mbb(a, b) { + return zbb(jD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Vbb(a, b) { + return zbb(rD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Dub(a) { + return wbb(Nbb(Cbb(Cub(a, 32)), 32), Cbb(Cub(a, 32))); + } + function Mu(a) { + Qb(a); + return JD(a, 14) ? new Tkb(BD(a, 14)) : Nu(a.Kc()); + } + function EWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(b.d, a.d) : Kdb(a.c, b.c); + } + function FWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(a.d, b.d) : Kdb(a.c, b.c); + } + function HWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(a.d, b.d) : Kdb(b.c, a.c); + } + function GWb(a, b) { + AWb(); + return a.c == b.c ? Kdb(b.d, a.d) : Kdb(b.c, a.c); + } + function WGb(a, b) { + var c2; + c2 = Edb(ED(a.a.We((Y9c(), Q9c)))); + XGb(a, b, c2); + } + function Rgc(a, b) { + var c2; + c2 = BD(Ohb(a.g, b), 57); + Hkb(b.d, new Qhc(a, c2)); + } + function GYb(a, b) { + var c2, d; + c2 = d_b(a); + d = d_b(b); + return c2 < d ? -1 : c2 > d ? 1 : 0; + } + function bjc(a, b) { + var c2, d; + c2 = ajc(b); + d = c2; + return BD(Ohb(a.c, d), 19).a; + } + function iSc(a, b) { + var c2; + c2 = a + ""; + while (c2.length < b) { + c2 = "0" + c2; + } + return c2; + } + function WRc(a) { + return a.c == null || a.c.length == 0 ? "n_" + a.g : "n_" + a.c; + } + function oRb(a) { + return a.c == null || a.c.length == 0 ? "n_" + a.b : "n_" + a.c; + } + function qz(a, b) { + return !!a && !!a.equals ? a.equals(b) : PD(a) === PD(b); + } + function dkd(a, b) { + if (b == 0) { + return !!a.o && a.o.f != 0; + } + return mid(a, b); + } + function Tdd(a, b, c2) { + var d; + if (a.n && !!b && !!c2) { + d = new kgd(); + Ekb(a.e, d); + } + } + function cIc(a, b, c2) { + var d; + d = a.d[b.p]; + a.d[b.p] = a.d[c2.p]; + a.d[c2.p] = d; + } + function kxd(a, b, c2) { + this.d = a; + this.j = b; + this.e = c2; + this.o = -1; + this.p = 3; + } + function lxd(a, b, c2) { + this.d = a; + this.k = b; + this.f = c2; + this.o = -1; + this.p = 5; + } + function zge(a, b, c2) { + xfe.call(this, 25); + this.b = a; + this.a = b; + this.c = c2; + } + function $fe(a) { + wfe(); + xfe.call(this, a); + this.c = false; + this.a = false; + } + function sSd(a, b, c2, d, e, f2) { + rSd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function uSd(a, b, c2, d, e, f2) { + tSd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function wSd(a, b, c2, d, e, f2) { + vSd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function ySd(a, b, c2, d, e, f2) { + xSd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function ASd(a, b, c2, d, e, f2) { + zSd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function CSd(a, b, c2, d, e, f2) { + BSd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function HSd(a, b, c2, d, e, f2) { + GSd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function JSd(a, b, c2, d, e, f2) { + ISd.call(this, a, b, c2, d, e); + f2 && (this.o = -2); + } + function nWd(a, b, c2, d) { + VVd.call(this, c2); + this.b = a; + this.c = b; + this.d = d; + } + function x$c(a, b) { + this.a = new Rkb(); + this.d = new Rkb(); + this.f = a; + this.c = b; + } + function PTb() { + this.c = new bUb(); + this.a = new FYb(); + this.b = new wZb(); + $Yb(); + } + function b2c() { + Y1c(); + this.b = new Lqb(); + this.a = new Lqb(); + this.c = new Rkb(); + } + function j2d(a, b) { + this.g = a; + this.d = (T0d(), S0d); + this.a = S0d; + this.b = b; + } + function O1d(a, b) { + this.f = a; + this.a = (T0d(), R0d); + this.c = R0d; + this.b = b; + } + function h9d(a, b) { + !a.c && (a.c = new u3d(a, 0)); + f3d(a.c, (Q8d(), I8d), b); + } + function $Tc() { + $Tc = ccb; + ZTc = new _Tc("DFS", 0); + YTc = new _Tc("BFS", 1); + } + function Cc(a, b, c2) { + var d; + d = BD(a.Zb().xc(b), 14); + return !!d && d.Hc(c2); + } + function Gc(a, b, c2) { + var d; + d = BD(a.Zb().xc(b), 14); + return !!d && d.Mc(c2); + } + function Ofb(a, b, c2, d) { + a.a += "" + qfb(b == null ? Xhe : fcb(b), c2, d); + return a; + } + function Xnd(a, b, c2, d, e, f2) { + Ynd(a, b, c2, f2); + eLd(a, d); + fLd(a, e); + return a; + } + function Ysb(a) { + sCb(a.b.b != a.d.a); + a.c = a.b = a.b.b; + --a.a; + return a.c.c; + } + function Jgb(a) { + while (a.d > 0 && a.a[--a.d] == 0) + ; + a.a[a.d++] == 0 && (a.e = 0); + } + function wwb(a) { + return !a.a ? a.c : a.e.length == 0 ? a.a.a : a.a.a + ("" + a.e); + } + function RSd(a) { + return !!a.a && QSd(a.a.a).i != 0 && !(!!a.b && QTd(a.b)); + } + function cLd(a) { + return !!a.u && VKd(a.u.a).i != 0 && !(!!a.n && FMd(a.n)); + } + function $i(a) { + return Zj(a.e.Hd().gc() * a.c.Hd().gc(), 16, new ij(a)); + } + function XA(a, b) { + return ueb(Cbb(a.q.getTime()), Cbb(b.q.getTime())); + } + function k_b(a) { + return BD(Qkb(a, KC(AQ, jne, 17, a.c.length, 0, 1)), 474); + } + function l_b(a) { + return BD(Qkb(a, KC(OQ, kne, 10, a.c.length, 0, 1)), 193); + } + function cKc(a) { + FJc(); + return !OZb(a) && !(!OZb(a) && a.c.i.c == a.d.i.c); + } + function kDb(a, b, c2) { + var d; + d = (Qb(a), new Tkb(a)); + iDb(new jDb(d, b, c2)); + } + function rXb(a, b, c2) { + var d; + d = (Qb(a), new Tkb(a)); + pXb(new qXb(d, b, c2)); + } + function Nwb(a, b) { + var c2; + c2 = 1 - b; + a.a[c2] = Owb(a.a[c2], c2); + return Owb(a, b); + } + function YXc(a, b) { + var c2; + a.e = new QXc(); + c2 = gVc(b); + Okb(c2, a.c); + ZXc(a, c2, 0); + } + function o4c(a, b, c2, d) { + var e; + e = new w4c(); + e.a = b; + e.b = c2; + e.c = d; + Dsb(a.a, e); + } + function p4c(a, b, c2, d) { + var e; + e = new w4c(); + e.a = b; + e.b = c2; + e.c = d; + Dsb(a.b, e); + } + function i6d(a) { + var b, c2, d; + b = new A6d(); + c2 = s6d(b, a); + z6d(b); + d = c2; + return d; + } + function vZd() { + var a, b, c2; + b = (c2 = (a = new UQd(), a), c2); + Ekb(rZd, b); + return b; + } + function H2c(a) { + a.j.c = KC(SI, Uhe, 1, 0, 5, 1); + Ae(a.c); + h3c(a.a); + return a; + } + function tgc(a) { + qgc(); + if (JD(a.g, 10)) { + return BD(a.g, 10); + } + return null; + } + function Zw(a) { + if (Ah(a).dc()) { + return false; + } + Bh(a, new bx()); + return true; + } + function _y(b) { + if (!("stack" in b)) { + try { + throw b; + } catch (a) { + } + } + return b; + } + function Pb(a, b) { + if (a < 0 || a >= b) { + throw vbb(new qcb(Ib(a, b))); + } + return a; + } + function Tb(a, b, c2) { + if (a < 0 || b < a || b > c2) { + throw vbb(new qcb(Kb(a, b, c2))); + } + } + function eVb(a, b) { + Qqb(a.a, b); + if (b.d) { + throw vbb(new hz(Hke)); + } + b.d = a; + } + function xpb(a, b) { + if (b.$modCount != a.$modCount) { + throw vbb(new Apb()); + } + } + function $pb(a, b) { + if (JD(b, 42)) { + return Jd(a.a, BD(b, 42)); + } + return false; + } + function dib(a, b) { + if (JD(b, 42)) { + return Jd(a.a, BD(b, 42)); + } + return false; + } + function msb(a, b) { + if (JD(b, 42)) { + return Jd(a.a, BD(b, 42)); + } + return false; + } + function qAb(a, b) { + if (a.a <= a.b) { + b.ud(a.a++); + return true; + } + return false; + } + function Sbb(a) { + var b; + if (Fbb(a)) { + b = a; + return b == -0 ? 0 : b; + } + return oD(a); + } + function tAb(a) { + var b; + Tzb(a); + b = new drb(); + _ub(a.a, new BAb(b)); + return b; + } + function Yzb(a) { + var b; + Tzb(a); + b = new Gpb(); + _ub(a.a, new mAb(b)); + return b; + } + function Bib(a, b) { + this.a = a; + vib.call(this, a); + wCb(b, a.gc()); + this.b = b; + } + function orb(a) { + this.e = a; + this.b = this.e.a.entries(); + this.a = new Array(); + } + function Oi(a) { + return Zj(a.e.Hd().gc() * a.c.Hd().gc(), 273, new cj(a)); + } + function Qu(a) { + return new Skb((Xj(a, Mie), Oy(wbb(wbb(5, a), a / 10 | 0)))); + } + function m_b(a) { + return BD(Qkb(a, KC(aR, lne, 11, a.c.length, 0, 1)), 1943); + } + function sMb(a, b, c2) { + return c2.f.c.length > 0 ? HMb(a.a, b, c2) : HMb(a.b, b, c2); + } + function SZb(a, b, c2) { + !!a.d && Lkb(a.d.e, a); + a.d = b; + !!a.d && Dkb(a.d.e, c2, a); + } + function a5b(a, b) { + i5b(b, a); + k5b(a.d); + k5b(BD(vNb(a, (Nyc(), wxc)), 207)); + } + function _4b(a, b) { + f5b(b, a); + h5b(a.d); + h5b(BD(vNb(a, (Nyc(), wxc)), 207)); + } + function Ypd(a, b) { + var c2, d; + c2 = aC(a, b); + d = null; + !!c2 && (d = c2.fe()); + return d; + } + function Zpd(a, b) { + var c2, d; + c2 = tB(a, b); + d = null; + !!c2 && (d = c2.ie()); + return d; + } + function $pd(a, b) { + var c2, d; + c2 = aC(a, b); + d = null; + !!c2 && (d = c2.ie()); + return d; + } + function _pd(a, b) { + var c2, d; + c2 = aC(a, b); + d = null; + !!c2 && (d = aqd(c2)); + return d; + } + function Tqd(a, b, c2) { + var d; + d = Wpd(c2); + ro(a.g, d, b); + ro(a.i, b, c2); + return b; + } + function Ez(a, b, c2) { + var d; + d = Cz(); + try { + return Bz(a, b, c2); + } finally { + Fz(d); + } + } + function C6d(a) { + var b; + b = a.Wg(); + this.a = JD(b, 69) ? BD(b, 69).Zh() : b.Kc(); + } + function j3c() { + D2c.call(this); + this.j.c = KC(SI, Uhe, 1, 0, 5, 1); + this.a = -1; + } + function mxd(a, b, c2, d) { + this.d = a; + this.n = b; + this.g = c2; + this.o = d; + this.p = -1; + } + function jk(a, b, c2, d) { + this.e = d; + this.d = null; + this.c = a; + this.a = b; + this.b = c2; + } + function uEc(a, b, c2) { + this.d = new HEc(this); + this.e = a; + this.i = b; + this.f = c2; + } + function msc() { + msc = ccb; + ksc = new nsc(gle, 0); + lsc = new nsc("TOP_LEFT", 1); + } + function cDc() { + cDc = ccb; + bDc = ix(meb(1), meb(4)); + aDc = ix(meb(1), meb(2)); + } + function z_c() { + z_c = ccb; + y_c = as((s_c(), OC(GC(O_, 1), Kie, 551, 0, [r_c]))); + } + function q_c() { + q_c = ccb; + p_c = as((i_c(), OC(GC(N_, 1), Kie, 482, 0, [h_c]))); + } + function Z0c() { + Z0c = ccb; + Y0c = as((R0c(), OC(GC(W_, 1), Kie, 530, 0, [Q0c]))); + } + function hPb() { + hPb = ccb; + gPb = as((cPb(), OC(GC(GO, 1), Kie, 481, 0, [bPb]))); + } + function yLb() { + vLb(); + return OC(GC(PN, 1), Kie, 406, 0, [uLb, rLb, sLb, tLb]); + } + function qxb() { + lxb(); + return OC(GC(iL, 1), Kie, 297, 0, [hxb, ixb, jxb, kxb]); + } + function UOb() { + ROb(); + return OC(GC(CO, 1), Kie, 394, 0, [OOb, NOb, POb, QOb]); + } + function UMb() { + RMb(); + return OC(GC(jO, 1), Kie, 323, 0, [OMb, NMb, PMb, QMb]); + } + function sWb() { + lWb(); + return OC(GC(SP, 1), Kie, 405, 0, [hWb, kWb, iWb, jWb]); + } + function kbc() { + gbc(); + return OC(GC(VS, 1), Kie, 360, 0, [fbc, dbc, ebc, cbc]); + } + function Vc(a, b, c2, d) { + return JD(c2, 54) ? new Cg(a, b, c2, d) : new qg(a, b, c2, d); + } + function Djc() { + Ajc(); + return OC(GC(mV, 1), Kie, 411, 0, [wjc, xjc, yjc, zjc]); + } + function okc(a) { + var b; + return a.j == (Ucd(), Rcd) && (b = pkc(a), uqb(b, zcd)); + } + function Mdc(a, b) { + var c2; + c2 = b.a; + QZb(c2, b.c.d); + RZb(c2, b.d.d); + q7c(c2.a, a.n); + } + function Smc(a, b) { + return BD(Btb(QAb(BD(Qc(a.k, b), 15).Oc(), Hmc)), 113); + } + function Tmc(a, b) { + return BD(Btb(RAb(BD(Qc(a.k, b), 15).Oc(), Hmc)), 113); + } + function _w(a) { + return new Kub(rmb(BD(a.a.dd(), 14).gc(), a.a.cd()), 16); + } + function Qq(a) { + if (JD(a, 14)) { + return BD(a, 14).dc(); + } + return !a.Kc().Ob(); + } + function ugc(a) { + qgc(); + if (JD(a.g, 145)) { + return BD(a.g, 145); + } + return null; + } + function Ko(a) { + if (a.e.g != a.b) { + throw vbb(new Apb()); + } + return !!a.c && a.d > 0; + } + function Xsb(a) { + sCb(a.b != a.d.c); + a.c = a.b; + a.b = a.b.a; + ++a.a; + return a.c.c; + } + function Xjb(a, b) { + uCb(b); + NC(a.a, a.c, b); + a.c = a.c + 1 & a.a.length - 1; + _jb(a); + } + function Wjb(a, b) { + uCb(b); + a.b = a.b - 1 & a.a.length - 1; + NC(a.a, a.b, b); + _jb(a); + } + function A2c(a, b) { + var c2; + for (c2 = a.j.c.length; c2 < b; c2++) { + Ekb(a.j, a.rg()); + } + } + function gBc(a, b, c2, d) { + var e; + e = d[b.g][c2.g]; + return Edb(ED(vNb(a.a, e))); + } + function goc(a, b, c2, d, e) { + this.i = a; + this.a = b; + this.e = c2; + this.j = d; + this.f = e; + } + function DZc(a, b, c2, d, e) { + this.a = a; + this.e = b; + this.f = c2; + this.b = d; + this.g = e; + } + function Fz(a) { + a && Mz((Kz(), Jz)); + --xz; + if (a) { + if (zz != -1) { + Hz(zz); + zz = -1; + } + } + } + function Nzc() { + Izc(); + return OC(GC($W, 1), Kie, 197, 0, [Gzc, Hzc, Fzc, Ezc]); + } + function ERc() { + yRc(); + return OC(GC(h$, 1), Kie, 393, 0, [uRc, vRc, wRc, xRc]); + } + function mXc() { + iXc(); + return OC(GC(a_, 1), Kie, 340, 0, [hXc, fXc, gXc, eXc]); + } + function wdd() { + tdd(); + return OC(GC(I1, 1), Kie, 374, 0, [rdd, sdd, qdd, pdd]); + } + function vbd() { + rbd(); + return OC(GC(A1, 1), Kie, 285, 0, [qbd, nbd, obd, pbd]); + } + function Dad() { + Aad(); + return OC(GC(v1, 1), Kie, 218, 0, [zad, xad, wad, yad]); + } + function Ged() { + Ded(); + return OC(GC(O1, 1), Kie, 311, 0, [Ced, zed, Bed, Aed]); + } + function sgd() { + pgd(); + return OC(GC(k2, 1), Kie, 396, 0, [mgd, ngd, lgd, ogd]); + } + function gvd(a) { + evd(); + return Mhb(dvd, a) ? BD(Ohb(dvd, a), 331).ug() : null; + } + function cid(a, b, c2) { + return b < 0 ? tid(a, c2) : BD(c2, 66).Nj().Sj(a, a.yh(), b); + } + function Sqd(a, b, c2) { + var d; + d = Wpd(c2); + ro(a.d, d, b); + Rhb(a.e, b, c2); + return b; + } + function Uqd(a, b, c2) { + var d; + d = Wpd(c2); + ro(a.j, d, b); + Rhb(a.k, b, c2); + return b; + } + function dtd(a) { + var b, c2; + b = (Fhd(), c2 = new Tld(), c2); + !!a && Rld(b, a); + return b; + } + function wud(a) { + var b; + b = a.ri(a.i); + a.i > 0 && $fb(a.g, 0, b, 0, a.i); + return b; + } + function qEd(a, b) { + pEd(); + var c2; + c2 = BD(Ohb(oEd, a), 55); + return !c2 || c2.wj(b); + } + function Twd(a) { + if (a.p != 1) + throw vbb(new Ydb()); + return Tbb(a.f) << 24 >> 24; + } + function axd(a) { + if (a.p != 1) + throw vbb(new Ydb()); + return Tbb(a.k) << 24 >> 24; + } + function gxd(a) { + if (a.p != 7) + throw vbb(new Ydb()); + return Tbb(a.k) << 16 >> 16; + } + function Zwd(a) { + if (a.p != 7) + throw vbb(new Ydb()); + return Tbb(a.f) << 16 >> 16; + } + function sr(a) { + var b; + b = 0; + while (a.Ob()) { + a.Pb(); + b = wbb(b, 1); + } + return Oy(b); + } + function nx(a, b) { + var c2; + c2 = new Vfb(); + a.xd(c2); + c2.a += ".."; + b.yd(c2); + return c2.a; + } + function Sgc(a, b, c2) { + var d; + d = BD(Ohb(a.g, c2), 57); + Ekb(a.a.c, new vgd(b, d)); + } + function VCb(a, b, c2) { + return Ddb(ED(Wd(irb(a.f, b))), ED(Wd(irb(a.f, c2)))); + } + function E2d(a, b, c2) { + return F2d(a, b, c2, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function L2d(a, b, c2) { + return M2d(a, b, c2, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function q3d(a, b, c2) { + return r3d(a, b, c2, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + } + function JJc(a, b) { + return a == (j0b(), h0b) && b == h0b ? 4 : a == h0b || b == h0b ? 8 : 32; + } + function Nd(a, b) { + return PD(b) === PD(a) ? "(this Map)" : b == null ? Xhe : fcb(b); + } + function kFd(a, b) { + return BD(b == null ? Wd(irb(a.f, null)) : Crb(a.g, b), 281); + } + function Rqd(a, b, c2) { + var d; + d = Wpd(c2); + Rhb(a.b, d, b); + Rhb(a.c, b, c2); + return b; + } + function Bfd(a, b) { + var c2; + c2 = b; + while (c2) { + O6c(a, c2.i, c2.j); + c2 = Xod(c2); + } + return a; + } + function kt(a, b) { + var c2; + c2 = vmb(Nu(new wu(a, b))); + ir(new wu(a, b)); + return c2; + } + function R6d(a, b) { + Q6d(); + var c2; + c2 = BD(a, 66).Mj(); + kVd(c2, b); + return c2.Ok(b); + } + function TOc(a, b, c2, d, e) { + var f2; + f2 = OOc(e, c2, d); + Ekb(b, tOc(e, f2)); + XOc(a, e, b); + } + function mic(a, b, c2) { + a.i = 0; + a.e = 0; + if (b == c2) { + return; + } + lic(a, b, c2); + kic(a, b, c2); + } + function dB(a, b) { + var c2; + c2 = a.q.getHours(); + a.q.setFullYear(b + nje); + YA(a, c2); + } + function dC(d, a, b) { + if (b) { + var c2 = b.ee(); + d.a[a] = c2(b); + } else { + delete d.a[a]; + } + } + function vB(d, a, b) { + if (b) { + var c2 = b.ee(); + b = c2(b); + } else { + b = void 0; + } + d.a[a] = b; + } + function pCb(a) { + if (a < 0) { + throw vbb(new Feb("Negative array size: " + a)); + } + } + function VKd(a) { + if (!a.n) { + $Kd(a); + a.n = new JMd(a, j5, a); + _Kd(a); + } + return a.n; + } + function Fqb(a) { + sCb(a.a < a.c.a.length); + a.b = a.a; + Dqb(a); + return a.c.b[a.b]; + } + function Yjb(a) { + if (a.b == a.c) { + return; + } + a.a = KC(SI, Uhe, 1, 8, 5, 1); + a.b = 0; + a.c = 0; + } + function AQb(a) { + this.b = new Lqb(); + this.c = new Lqb(); + this.d = new Lqb(); + this.a = a; + } + function lge(a, b) { + wfe(); + xfe.call(this, a); + this.a = b; + this.c = -1; + this.b = -1; + } + function lSd(a, b, c2, d) { + kxd.call(this, 1, c2, d); + this.c = a; + this.b = b; + } + function mSd(a, b, c2, d) { + lxd.call(this, 1, c2, d); + this.c = a; + this.b = b; + } + function O7d(a, b, c2, d, e, f2, g) { + nxd.call(this, b, d, e, f2, g); + this.c = a; + this.a = c2; + } + function LVd(a, b, c2) { + this.e = a; + this.a = SI; + this.b = R5d(b); + this.c = b; + this.d = c2; + } + function Lo(a) { + this.e = a; + this.c = this.e.a; + this.b = this.e.g; + this.d = this.e.i; + } + function nYd(a) { + this.c = a; + this.a = BD(wId(a), 148); + this.b = this.a.Aj().Nh(); + } + function Irb(a) { + this.d = a; + this.b = this.d.a.entries(); + this.a = this.b.next(); + } + function $rb() { + Lqb.call(this); + Trb(this); + this.d.b = this.d; + this.d.a = this.d; + } + function mRb(a, b) { + _Qb.call(this); + this.a = a; + this.b = b; + Ekb(this.a.b, this); + } + function uFd(a, b) { + var c2; + return c2 = b != null ? Phb(a, b) : Wd(irb(a.f, b)), RD(c2); + } + function FFd(a, b) { + var c2; + return c2 = b != null ? Phb(a, b) : Wd(irb(a.f, b)), RD(c2); + } + function Fob(a, b) { + var c2; + for (c2 = 0; c2 < b; ++c2) { + NC(a, c2, new Rob(BD(a[c2], 42))); + } + } + function Lgb(a, b) { + var c2; + for (c2 = a.d - 1; c2 >= 0 && a.a[c2] === b[c2]; c2--) + ; + return c2 < 0; + } + function Ucc(a, b) { + Occ(); + var c2; + c2 = a.j.g - b.j.g; + if (c2 != 0) { + return c2; + } + return 0; + } + function Dtb(a, b) { + uCb(b); + if (a.a != null) { + return Itb(b.Kb(a.a)); + } + return ztb; + } + function Gx(a) { + var b; + if (a) { + return new Bsb(a); + } + b = new zsb(); + Jq(b, a); + return b; + } + function GAb(a, b) { + var c2; + return b.b.Kb(SAb(a, b.c.Ee(), (c2 = new TBb(b), c2))); + } + function Hub(a) { + zub(); + Eub(this, Tbb(xbb(Obb(a, 24), nke)), Tbb(xbb(a, nke))); + } + function REb() { + REb = ccb; + QEb = as((MEb(), OC(GC(aN, 1), Kie, 428, 0, [LEb, KEb]))); + } + function ZEb() { + ZEb = ccb; + YEb = as((UEb(), OC(GC(bN, 1), Kie, 427, 0, [SEb, TEb]))); + } + function aSb() { + aSb = ccb; + _Rb = as((XRb(), OC(GC(gP, 1), Kie, 424, 0, [VRb, WRb]))); + } + function D5b() { + D5b = ccb; + C5b = as((y5b(), OC(GC(ZR, 1), Kie, 511, 0, [x5b, w5b]))); + } + function Cqc() { + Cqc = ccb; + Bqc = as((xqc(), OC(GC(JW, 1), Kie, 419, 0, [vqc, wqc]))); + } + function erc() { + erc = ccb; + drc = as((_qc(), OC(GC(MW, 1), Kie, 479, 0, [$qc, Zqc]))); + } + function eBc() { + eBc = ccb; + dBc = as((_Ac(), OC(GC(fX, 1), Kie, 376, 0, [$Ac, ZAc]))); + } + function GAc() { + GAc = ccb; + FAc = as((BAc(), OC(GC(cX, 1), Kie, 421, 0, [zAc, AAc]))); + } + function Npc() { + Npc = ccb; + Mpc = as((Ipc(), OC(GC(FW, 1), Kie, 422, 0, [Gpc, Hpc]))); + } + function rsc() { + rsc = ccb; + qsc = as((msc(), OC(GC(SW, 1), Kie, 420, 0, [ksc, lsc]))); + } + function MOc() { + MOc = ccb; + LOc = as((HOc(), OC(GC(DZ, 1), Kie, 520, 0, [GOc, FOc]))); + } + function ZIc() { + ZIc = ccb; + YIc = as((UIc(), OC(GC(mY, 1), Kie, 523, 0, [TIc, SIc]))); + } + function bMc() { + bMc = ccb; + aMc = as((YLc(), OC(GC(fZ, 1), Kie, 516, 0, [XLc, WLc]))); + } + function jMc() { + jMc = ccb; + iMc = as((eMc(), OC(GC(gZ, 1), Kie, 515, 0, [cMc, dMc]))); + } + function KQc() { + KQc = ccb; + JQc = as((FQc(), OC(GC(YZ, 1), Kie, 455, 0, [DQc, EQc]))); + } + function dUc() { + dUc = ccb; + cUc = as(($Tc(), OC(GC(F$, 1), Kie, 425, 0, [ZTc, YTc]))); + } + function XUc() { + XUc = ccb; + WUc = as((PUc(), OC(GC(K$, 1), Kie, 495, 0, [NUc, OUc]))); + } + function XTc() { + XTc = ccb; + WTc = as((STc(), OC(GC(E$, 1), Kie, 480, 0, [QTc, RTc]))); + } + function lWc() { + lWc = ccb; + kWc = as((fWc(), OC(GC(X$, 1), Kie, 426, 0, [dWc, eWc]))); + } + function i1c() { + i1c = ccb; + h1c = as((a1c(), OC(GC(X_, 1), Kie, 429, 0, [_0c, $0c]))); + } + function H_c() { + H_c = ccb; + G_c = as((C_c(), OC(GC(P_, 1), Kie, 430, 0, [B_c, A_c]))); + } + function UIc() { + UIc = ccb; + TIc = new VIc("UPPER", 0); + SIc = new VIc("LOWER", 1); + } + function Lqd(a, b) { + var c2; + c2 = new eC(); + Spd(c2, "x", b.a); + Spd(c2, "y", b.b); + Qpd(a, c2); + } + function Oqd(a, b) { + var c2; + c2 = new eC(); + Spd(c2, "x", b.a); + Spd(c2, "y", b.b); + Qpd(a, c2); + } + function Jic(a, b) { + var c2, d; + d = false; + do { + c2 = Mic(a, b); + d = d | c2; + } while (c2); + return d; + } + function zHc(a, b) { + var c2, d; + c2 = b; + d = 0; + while (c2 > 0) { + d += a.a[c2]; + c2 -= c2 & -c2; + } + return d; + } + function Cfd(a, b) { + var c2; + c2 = b; + while (c2) { + O6c(a, -c2.i, -c2.j); + c2 = Xod(c2); + } + return a; + } + function reb(a, b) { + var c2, d; + uCb(b); + for (d = a.Kc(); d.Ob(); ) { + c2 = d.Pb(); + b.td(c2); + } + } + function me(a, b) { + var c2; + c2 = b.cd(); + return new Wo(c2, a.e.pc(c2, BD(b.dd(), 14))); + } + function Gsb(a, b, c2, d) { + var e; + e = new jtb(); + e.c = b; + e.b = c2; + e.a = d; + d.b = c2.a = e; + ++a.b; + } + function Nkb(a, b, c2) { + var d; + d = (tCb(b, a.c.length), a.c[b]); + a.c[b] = c2; + return d; + } + function lFd(a, b, c2) { + return BD(b == null ? jrb(a.f, null, c2) : Drb(a.g, b, c2), 281); + } + function fRb(a) { + return !!a.c && !!a.d ? oRb(a.c) + "->" + oRb(a.d) : "e_" + FCb(a); + } + function FAb(a, b) { + return (Uzb(a), WAb(new YAb(a, new qBb(b, a.a)))).sd(DAb); + } + function tUb() { + qUb(); + return OC(GC(zP, 1), Kie, 356, 0, [lUb, mUb, nUb, oUb, pUb]); + } + function _cd() { + Ucd(); + return OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]); + } + function Dz(b) { + Az(); + return function() { + return Ez(b, this, arguments); + }; + } + function sz() { + if (Date.now) { + return Date.now(); + } + return (/* @__PURE__ */ new Date()).getTime(); + } + function OZb(a) { + if (!a.c || !a.d) { + return false; + } + return !!a.c.i && a.c.i == a.d.i; + } + function pv(a) { + if (!a.c.Sb()) { + throw vbb(new utb()); + } + a.a = true; + return a.c.Ub(); + } + function ko(a) { + a.i = 0; + Alb(a.b, null); + Alb(a.c, null); + a.a = null; + a.e = null; + ++a.g; + } + function ycb(a) { + wcb.call(this, a == null ? Xhe : fcb(a), JD(a, 78) ? BD(a, 78) : null); + } + function PYb(a) { + MYb(); + yXb(this); + this.a = new Psb(); + NYb(this, a); + Dsb(this.a, a); + } + function jYb() { + Ckb(this); + this.b = new f7c(Pje, Pje); + this.a = new f7c(Qje, Qje); + } + function rAb(a, b) { + this.c = 0; + this.b = b; + jvb.call(this, a, 17493); + this.a = this.c; + } + function wyb(a) { + oyb(); + if (lyb) { + return; + } + this.c = a; + this.e = true; + this.a = new Rkb(); + } + function oyb() { + oyb = ccb; + lyb = true; + jyb = false; + kyb = false; + nyb = false; + myb = false; + } + function C3c(a, b) { + if (JD(b, 149)) { + return dfb(a.c, BD(b, 149).c); + } + return false; + } + function zUc(a, b) { + var c2; + c2 = 0; + !!a && (c2 += a.f.a / 2); + !!b && (c2 += b.f.a / 2); + return c2; + } + function j4c(a, b) { + var c2; + c2 = BD(Wrb(a.d, b), 23); + return c2 ? c2 : BD(Wrb(a.e, b), 23); + } + function Lzd(a) { + this.b = a; + Fyd.call(this, a); + this.a = BD(Ajd(this.b.a, 4), 126); + } + function Uzd(a) { + this.b = a; + $yd.call(this, a); + this.a = BD(Ajd(this.b.a, 4), 126); + } + function $Kd(a) { + if (!a.t) { + a.t = new YMd(a); + vtd(new c0d(a), 0, a.t); + } + return a.t; + } + function kad() { + ead(); + return OC(GC(t12, 1), Kie, 103, 0, [cad, bad, aad, _9c, dad]); + } + function Wbd() { + Tbd(); + return OC(GC(C1, 1), Kie, 249, 0, [Qbd, Sbd, Obd, Pbd, Rbd]); + } + function Q5c() { + N5c(); + return OC(GC(e1, 1), Kie, 175, 0, [L5c, K5c, I5c, M5c, J5c]); + } + function Q_c() { + N_c(); + return OC(GC(Q_, 1), Kie, 316, 0, [I_c, J_c, M_c, K_c, L_c]); + } + function _zc() { + Vzc(); + return OC(GC(_W, 1), Kie, 315, 0, [Uzc, Rzc, Szc, Qzc, Tzc]); + } + function sqc() { + mqc(); + return OC(GC(IW, 1), Kie, 335, 0, [iqc, hqc, kqc, lqc, jqc]); + } + function n$c() { + k$c(); + return OC(GC(y_, 1), Kie, 355, 0, [g$c, f$c, i$c, h$c, j$c]); + } + function _jc() { + Xjc(); + return OC(GC(uV, 1), Kie, 363, 0, [Tjc, Vjc, Wjc, Ujc, Sjc]); + } + function Ftc() { + Ctc(); + return OC(GC(TW, 1), Kie, 163, 0, [Btc, xtc, ytc, ztc, Atc]); + } + function T0d() { + T0d = ccb; + var a, b; + R0d = (LFd(), b = new MPd(), b); + S0d = (a = new OJd(), a); + } + function yUd(a) { + var b; + if (!a.c) { + b = a.r; + JD(b, 88) && (a.c = BD(b, 26)); + } + return a.c; + } + function zc(a) { + a.e = 3; + a.d = a.Yb(); + if (a.e != 2) { + a.e = 0; + return true; + } + return false; + } + function RC(a) { + var b, c2, d; + b = a & Eje; + c2 = a >> 22 & Eje; + d = a < 0 ? Fje : 0; + return TC(b, c2, d); + } + function uy(a) { + var b, c2, d, e; + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + Qzb(b); + } + } + function Tc(a, b) { + var c2, d; + c2 = BD(Iv(a.c, b), 14); + if (c2) { + d = c2.gc(); + c2.$b(); + a.d -= d; + } + } + function tjb(a, b) { + var c2, d; + c2 = b.cd(); + d = Awb(a, c2); + return !!d && wtb(d.e, b.dd()); + } + function Qgb(a, b) { + if (b == 0 || a.e == 0) { + return a; + } + return b > 0 ? ihb(a, b) : lhb(a, -b); + } + function Rgb2(a, b) { + if (b == 0 || a.e == 0) { + return a; + } + return b > 0 ? lhb(a, b) : ihb(a, -b); + } + function Rr(a) { + if (Qr(a)) { + a.c = a.a; + return a.a.Pb(); + } else { + throw vbb(new utb()); + } + } + function Yac(a) { + var b, c2; + b = a.c.i; + c2 = a.d.i; + return b.k == (j0b(), e0b) && c2.k == e0b; + } + function kZb(a) { + var b; + b = new UZb(); + tNb(b, a); + yNb(b, (Nyc(), jxc), null); + return b; + } + function hid(a, b, c2) { + var d; + return d = a.Yg(b), d >= 0 ? a._g(d, c2, true) : sid(a, b, c2); + } + function uHb(a, b, c2, d) { + var e; + for (e = 0; e < rHb; e++) { + nHb(a.a[b.g][e], c2, d[b.g]); + } + } + function vHb(a, b, c2, d) { + var e; + for (e = 0; e < sHb; e++) { + mHb(a.a[e][b.g], c2, d[b.g]); + } + } + function vSd(a, b, c2, d, e) { + kxd.call(this, b, d, e); + this.c = a; + this.a = c2; + } + function zSd(a, b, c2, d, e) { + lxd.call(this, b, d, e); + this.c = a; + this.a = c2; + } + function ISd(a, b, c2, d, e) { + oxd.call(this, b, d, e); + this.c = a; + this.a = c2; + } + function qSd(a, b, c2, d, e) { + oxd.call(this, b, d, e); + this.c = a; + this.b = c2; + } + function mWd(a, b, c2) { + VVd.call(this, c2); + this.b = a; + this.c = b; + this.d = (CWd(), AWd); + } + function oxd(a, b, c2) { + this.d = a; + this.k = b ? 1 : 0; + this.f = c2 ? 1 : 0; + this.o = -1; + this.p = 0; + } + function _6d(a, b, c2) { + var d; + d = new a7d(a.a); + Ld(d, a.a.a); + jrb(d.f, b, c2); + a.a.a = d; + } + function lud(a, b) { + a.qi(a.i + 1); + mud(a, a.i, a.oi(a.i, b)); + a.bi(a.i++, b); + a.ci(); + } + function oud(a) { + var b, c2; + ++a.j; + b = a.g; + c2 = a.i; + a.g = null; + a.i = 0; + a.di(c2, b); + a.ci(); + } + function Ou(a) { + var b, c2; + Qb(a); + b = Iu(a.length); + c2 = new Skb(b); + nmb(c2, a); + return c2; + } + function km(a) { + var b; + b = (Qb(a), a ? new Tkb(a) : Nu(a.Kc())); + smb(b); + return Dm(b); + } + function Kkb(a, b) { + var c2; + c2 = (tCb(b, a.c.length), a.c[b]); + cCb(a.c, b, 1); + return c2; + } + function Qc(a, b) { + var c2; + c2 = BD(a.c.xc(b), 14); + !c2 && (c2 = a.ic(b)); + return a.pc(b, c2); + } + function cfb(a, b) { + var c2, d; + c2 = (uCb(a), a); + d = (uCb(b), b); + return c2 == d ? 0 : c2 < d ? -1 : 1; + } + function Fpb(a) { + var b; + b = a.e + a.f; + if (isNaN(b) && Ldb(a.d)) { + return a.d; + } + return b; + } + function uwb(a, b) { + !a.a ? a.a = new Wfb(a.d) : Qfb(a.a, a.b); + Nfb(a.a, b); + return a; + } + function Sb(a, b) { + if (a < 0 || a > b) { + throw vbb(new qcb(Jb(a, b, "index"))); + } + return a; + } + function zhb(a, b, c2, d) { + var e; + e = KC(WD, oje, 25, b, 15, 1); + Ahb(e, a, b, c2, d); + return e; + } + function _A(a, b) { + var c2; + c2 = a.q.getHours() + (b / 60 | 0); + a.q.setMinutes(b); + YA(a, c2); + } + function A$c(a, b) { + return $wnd.Math.min(S6c(b.a, a.d.d.c), S6c(b.b, a.d.d.c)); + } + function Thb(a, b) { + return ND(b) ? b == null ? krb(a.f, null) : Erb(a.g, b) : krb(a.f, b); + } + function b1b(a) { + this.c = a; + this.a = new olb(this.c.a); + this.b = new olb(this.c.b); + } + function kRb() { + this.e = new Rkb(); + this.c = new Rkb(); + this.d = new Rkb(); + this.b = new Rkb(); + } + function MFb() { + this.g = new PFb(); + this.b = new PFb(); + this.a = new Rkb(); + this.k = new Rkb(); + } + function Gjc(a, b, c2) { + this.a = a; + this.c = b; + this.d = c2; + Ekb(b.e, this); + Ekb(c2.b, this); + } + function wBb(a, b) { + fvb.call(this, b.rd(), b.qd() & -6); + uCb(a); + this.a = a; + this.b = b; + } + function CBb(a, b) { + jvb.call(this, b.rd(), b.qd() & -6); + uCb(a); + this.a = a; + this.b = b; + } + function IBb(a, b) { + nvb.call(this, b.rd(), b.qd() & -6); + uCb(a); + this.a = a; + this.b = b; + } + function BQc(a, b, c2) { + this.a = a; + this.b = b; + this.c = c2; + Ekb(a.t, this); + Ekb(b.i, this); + } + function SRc() { + this.b = new Psb(); + this.a = new Psb(); + this.b = new Psb(); + this.a = new Psb(); + } + function g6c() { + g6c = ccb; + f6c = new Lsd("org.eclipse.elk.labels.labelManager"); + } + function Vac() { + Vac = ccb; + Uac = new Msd("separateLayerConnections", (gbc(), fbc)); + } + function HOc() { + HOc = ccb; + GOc = new IOc("REGULAR", 0); + FOc = new IOc("CRITICAL", 1); + } + function _Ac() { + _Ac = ccb; + $Ac = new aBc("STACKED", 0); + ZAc = new aBc("SEQUENCED", 1); + } + function C_c() { + C_c = ccb; + B_c = new D_c("FIXED", 0); + A_c = new D_c("CENTER_NODE", 1); + } + function PHc(a, b) { + var c2; + c2 = VHc(a, b); + a.b = new BHc(c2.c.length); + return OHc(a, c2); + } + function KAd(a, b, c2) { + var d; + ++a.e; + --a.f; + d = BD(a.d[b].$c(c2), 133); + return d.dd(); + } + function JJd(a) { + var b; + if (!a.a) { + b = a.r; + JD(b, 148) && (a.a = BD(b, 148)); + } + return a.a; + } + function poc(a) { + if (a.a) { + if (a.e) { + return poc(a.e); + } + } else { + return a; + } + return null; + } + function ODc(a, b) { + if (a.p < b.p) { + return 1; + } else if (a.p > b.p) { + return -1; + } + return 0; + } + function pvb(a, b) { + uCb(b); + if (a.c < a.d) { + a.ze(b, a.c++); + return true; + } + return false; + } + function QYd(a, b) { + if (Mhb(a.a, b)) { + Thb(a.a, b); + return true; + } else { + return false; + } + } + function fd(a) { + var b, c2; + b = a.cd(); + c2 = BD(a.dd(), 14); + return $j(c2.Nc(), new ah(b)); + } + function sqb(a) { + var b; + b = BD(ZBb(a.b, a.b.length), 9); + return new xqb(a.a, b, a.c); + } + function _zb(a) { + var b; + Uzb(a); + b = new fAb(a, a.a.e, a.a.d | 4); + return new bAb(a, b); + } + function HAb(a) { + var b; + Tzb(a); + b = 0; + while (a.a.sd(new RBb())) { + b = wbb(b, 1); + } + return b; + } + function UDc(a, b, c2) { + var d, e; + d = 0; + for (e = 0; e < b.length; e++) { + d += a.$f(b[e], d, c2); + } + } + function QJb(a, b) { + var c2; + if (a.C) { + c2 = BD(Mpb(a.b, b), 124).n; + c2.d = a.C.d; + c2.a = a.C.a; + } + } + function Mi(a, b, c2) { + Pb(b, a.e.Hd().gc()); + Pb(c2, a.c.Hd().gc()); + return a.a[b][c2]; + } + function Ugb(a, b) { + Hgb(); + this.e = a; + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [b]); + } + function dg(a, b, c2, d) { + this.f = a; + this.e = b; + this.d = c2; + this.b = d; + this.c = !d ? null : d.d; + } + function o5b(a) { + var b, c2, d, e; + e = a.d; + b = a.a; + c2 = a.b; + d = a.c; + a.d = c2; + a.a = d; + a.b = e; + a.c = b; + } + function Y2d(a, b, c2, d) { + X2d(a, b, c2, M2d(a, b, d, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)); + } + function tac(a, b) { + Odd(b, "Label management", 1); + RD(vNb(a, (g6c(), f6c))); + Qdd(b); + } + function Skb(a) { + Ckb(this); + mCb(a >= 0, "Initial capacity must not be negative"); + } + function lHb() { + lHb = ccb; + kHb = as((gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]))); + } + function SHb() { + SHb = ccb; + RHb = as((NHb(), OC(GC(sN, 1), Kie, 461, 0, [LHb, KHb, MHb]))); + } + function JIb() { + JIb = ccb; + IIb = as((EIb(), OC(GC(zN, 1), Kie, 462, 0, [DIb, CIb, BIb]))); + } + function Kyb() { + Kyb = ccb; + Jyb = as((Fyb(), OC(GC(xL, 1), Kie, 132, 0, [Cyb, Dyb, Eyb]))); + } + function DTb() { + DTb = ccb; + CTb = as((yTb(), OC(GC(oP, 1), Kie, 379, 0, [wTb, vTb, xTb]))); + } + function WXb() { + WXb = ccb; + VXb = as((RXb(), OC(GC(hQ, 1), Kie, 423, 0, [QXb, PXb, OXb]))); + } + function Zpc() { + Zpc = ccb; + Ypc = as((Rpc(), OC(GC(GW, 1), Kie, 314, 0, [Ppc, Opc, Qpc]))); + } + function gqc() { + gqc = ccb; + fqc = as((bqc(), OC(GC(HW, 1), Kie, 337, 0, [$pc, aqc, _pc]))); + } + function Lqc() { + Lqc = ccb; + Kqc = as((Gqc(), OC(GC(KW, 1), Kie, 450, 0, [Eqc, Dqc, Fqc]))); + } + function Kkc() { + Kkc = ccb; + Jkc = as((Fkc(), OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc]))); + } + function jsc() { + jsc = ccb; + isc = as((esc(), OC(GC(RW, 1), Kie, 303, 0, [csc, dsc, bsc]))); + } + function asc() { + asc = ccb; + _rc = as((Xrc(), OC(GC(QW, 1), Kie, 292, 0, [Vrc, Wrc, Urc]))); + } + function Dzc() { + Dzc = ccb; + Czc = as((xzc(), OC(GC(ZW, 1), Kie, 378, 0, [uzc, vzc, wzc]))); + } + function YAc() { + YAc = ccb; + XAc = as((TAc(), OC(GC(eX, 1), Kie, 375, 0, [QAc, RAc, SAc]))); + } + function yAc() { + yAc = ccb; + xAc = as((tAc(), OC(GC(bX, 1), Kie, 339, 0, [rAc, qAc, sAc]))); + } + function PAc() { + PAc = ccb; + OAc = as((KAc(), OC(GC(dX, 1), Kie, 452, 0, [JAc, HAc, IAc]))); + } + function QBc() { + QBc = ccb; + PBc = as((LBc(), OC(GC(jX, 1), Kie, 377, 0, [JBc, KBc, IBc]))); + } + function yBc() { + yBc = ccb; + xBc = as((tBc(), OC(GC(hX, 1), Kie, 336, 0, [qBc, rBc, sBc]))); + } + function HBc() { + HBc = ccb; + GBc = as((CBc(), OC(GC(iX, 1), Kie, 338, 0, [BBc, zBc, ABc]))); + } + function wGc() { + wGc = ccb; + vGc = as((rGc(), OC(GC(PX, 1), Kie, 454, 0, [oGc, pGc, qGc]))); + } + function zVc() { + zVc = ccb; + yVc = as((tVc(), OC(GC(O$, 1), Kie, 442, 0, [sVc, qVc, rVc]))); + } + function vWc() { + vWc = ccb; + uWc = as((pWc(), OC(GC(Y$, 1), Kie, 380, 0, [mWc, nWc, oWc]))); + } + function EYc() { + EYc = ccb; + DYc = as((zYc(), OC(GC(q_, 1), Kie, 381, 0, [xYc, yYc, wYc]))); + } + function yXc() { + yXc = ccb; + xXc = as((sXc(), OC(GC(b_, 1), Kie, 293, 0, [qXc, rXc, pXc]))); + } + function b_c() { + b_c = ccb; + a_c = as((Y$c(), OC(GC(J_, 1), Kie, 437, 0, [V$c, W$c, X$c]))); + } + function mbd() { + mbd = ccb; + lbd = as((hbd(), OC(GC(z1, 1), Kie, 334, 0, [fbd, ebd, gbd]))); + } + function vad() { + vad = ccb; + uad = as((qad(), OC(GC(u1, 1), Kie, 272, 0, [nad, oad, pad2]))); + } + function icd() { + dcd(); + return OC(GC(D1, 1), Kie, 98, 0, [ccd, bcd, acd, Zbd, _bd, $bd]); + } + function ikd(a, b) { + return !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), qAd(a.o, b); + } + function NAd(a) { + !a.g && (a.g = new JCd()); + !a.g.d && (a.g.d = new MBd(a)); + return a.g.d; + } + function yAd(a) { + !a.g && (a.g = new JCd()); + !a.g.a && (a.g.a = new SBd(a)); + return a.g.a; + } + function EAd(a) { + !a.g && (a.g = new JCd()); + !a.g.b && (a.g.b = new GBd(a)); + return a.g.b; + } + function FAd(a) { + !a.g && (a.g = new JCd()); + !a.g.c && (a.g.c = new iCd(a)); + return a.g.c; + } + function A2d(a, b, c2) { + var d, e; + e = new p4d(b, a); + for (d = 0; d < c2; ++d) { + d4d(e); + } + return e; + } + function Atd(a, b, c2) { + var d, e; + if (c2 != null) { + for (d = 0; d < b; ++d) { + e = c2[d]; + a.fi(d, e); + } + } + } + function uhb(a, b, c2, d) { + var e; + e = KC(WD, oje, 25, b + 1, 15, 1); + vhb(e, a, b, c2, d); + return e; + } + function KC(a, b, c2, d, e, f2) { + var g; + g = LC(e, d); + e != 10 && OC(GC(a, f2), b, c2, e, g); + return g; + } + function bYd(a, b, c2, d) { + !!c2 && (d = c2.gh(b, bLd(c2.Tg(), a.c.Lj()), null, d)); + return d; + } + function cYd(a, b, c2, d) { + !!c2 && (d = c2.ih(b, bLd(c2.Tg(), a.c.Lj()), null, d)); + return d; + } + function KNb(a, b, c2) { + BD(a.b, 65); + BD(a.b, 65); + BD(a.b, 65); + Hkb(a.a, new TNb(c2, b, a)); + } + function ACb(a, b, c2) { + if (a < 0 || b > c2 || b < a) { + throw vbb(new Xfb(xke + a + zke + b + oke + c2)); + } + } + function zCb(a) { + if (!a) { + throw vbb(new Zdb("Unable to add element to queue")); + } + } + function Vzb(a) { + if (!a) { + this.c = null; + this.b = new Rkb(); + } else { + this.c = a; + this.b = null; + } + } + function exb(a, b) { + pjb.call(this, a, b); + this.a = KC(dL, zie, 436, 2, 0, 1); + this.b = true; + } + function _rb(a) { + Whb.call(this, a, 0); + Trb(this); + this.d.b = this.d; + this.d.a = this.d; + } + function VRc(a) { + var b; + b = a.b; + if (b.b == 0) { + return null; + } + return BD(Ut(b, 0), 188).b; + } + function Kwb(a, b) { + var c2; + c2 = new fxb(); + c2.c = true; + c2.d = b.dd(); + return Lwb(a, b.cd(), c2); + } + function bB(a, b) { + var c2; + c2 = a.q.getHours() + (b / 3600 | 0); + a.q.setSeconds(b); + YA(a, c2); + } + function zGc(a, b, c2) { + var d; + d = a.b[c2.c.p][c2.p]; + d.b += b.b; + d.c += b.c; + d.a += b.a; + ++d.a; + } + function S6c(a, b) { + var c2, d; + c2 = a.a - b.a; + d = a.b - b.b; + return $wnd.Math.sqrt(c2 * c2 + d * d); + } + function Ipc() { + Ipc = ccb; + Gpc = new Jpc("QUADRATIC", 0); + Hpc = new Jpc("SCANLINE", 1); + } + function hCc() { + hCc = ccb; + gCc = c3c(e3c(new j3c(), (qUb(), lUb), (S8b(), n8b)), pUb, J8b); + } + function l8c() { + i8c(); + return OC(GC(r1, 1), Kie, 291, 0, [h8c, g8c, f8c, d8c, c8c, e8c]); + } + function I7c() { + F7c(); + return OC(GC(o1, 1), Kie, 248, 0, [z7c, C7c, D7c, E7c, A7c, B7c]); + } + function Dpc() { + Apc(); + return OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]); + } + function Brc() { + yrc(); + return OC(GC(OW, 1), Kie, 275, 0, [wrc, trc, xrc, vrc, urc, rrc]); + } + function orc() { + lrc(); + return OC(GC(NW, 1), Kie, 274, 0, [irc, hrc, krc, grc, jrc, frc]); + } + function rzc() { + lzc(); + return OC(GC(YW, 1), Kie, 313, 0, [jzc, hzc, fzc, gzc, kzc, izc]); + } + function Wqc() { + Sqc(); + return OC(GC(LW, 1), Kie, 276, 0, [Nqc, Mqc, Pqc, Oqc, Rqc, Qqc]); + } + function uSc() { + qSc(); + return OC(GC(t$, 1), Kie, 327, 0, [pSc, lSc, nSc, mSc, oSc, kSc]); + } + function wcd() { + rcd(); + return OC(GC(E1, 1), Kie, 273, 0, [pcd, ncd, ocd, mcd, lcd, qcd]); + } + function Pad() { + Mad(); + return OC(GC(w1, 1), Kie, 312, 0, [Kad, Iad, Lad, Gad, Jad, Had]); + } + function m0b() { + j0b(); + return OC(GC(NQ, 1), Kie, 267, 0, [h0b, g0b, e0b, i0b, f0b, d0b]); + } + function mib(a) { + yCb(!!a.c); + xpb(a.e, a); + a.c.Qb(); + a.c = null; + a.b = kib(a); + ypb(a.e, a); + } + function tsb(a) { + xpb(a.c.a.e, a); + sCb(a.b != a.c.a.d); + a.a = a.b; + a.b = a.b.a; + return a.a; + } + function kSd(a) { + var b; + if (!a.a && a.b != -1) { + b = a.c.Tg(); + a.a = XKd(b, a.b); + } + return a.a; + } + function wtd(a, b) { + if (a.hi() && a.Hc(b)) { + return false; + } else { + a.Yh(b); + return true; + } + } + function $Hb(a, b) { + ytb(b, "Horizontal alignment cannot be null"); + a.b = b; + return a; + } + function Lfe(a, b, c2) { + wfe(); + var d; + d = Kfe(a, b); + c2 && !!d && Nfe(a) && (d = null); + return d; + } + function vXb(a, b, c2) { + var d, e; + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + uXb(d, b, c2); + } + } + function tXb(a, b) { + var c2, d; + for (d = b.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 37); + sXb(a, c2, 0, 0); + } + } + function ojc(a, b, c2) { + var d; + a.d[b.g] = c2; + d = a.g.c; + d[b.g] = $wnd.Math.max(d[b.g], c2 + 1); + } + function KZc(a, b) { + var c2, d, e; + e = a.r; + d = a.d; + c2 = MZc(a, b, true); + return c2.b != e || c2.a != d; + } + function Jjc(a, b) { + Vrb(a.e, b) || Xrb(a.e, b, new Pjc(b)); + return BD(Wrb(a.e, b), 113); + } + function Byb(a, b, c2, d) { + uCb(a); + uCb(b); + uCb(c2); + uCb(d); + return new Lyb(a, b, new Vxb()); + } + function dId(a, b, c2, d) { + this.rj(); + this.a = b; + this.b = a; + this.c = new Y5d(this, b, c2, d); + } + function oSd(a, b, c2, d, e, f2) { + mxd.call(this, b, d, e, f2); + this.c = a; + this.b = c2; + } + function ESd(a, b, c2, d, e, f2) { + mxd.call(this, b, d, e, f2); + this.c = a; + this.a = c2; + } + function Bqd(a, b, c2) { + var d, e, f2; + d = aC(a, c2); + e = null; + !!d && (e = aqd(d)); + f2 = e; + Vqd(b, c2, f2); + } + function Cqd(a, b, c2) { + var d, e, f2; + d = aC(a, c2); + e = null; + !!d && (e = aqd(d)); + f2 = e; + Vqd(b, c2, f2); + } + function v1d(a, b, c2) { + var d, e; + e = (d = nUd(a.b, b), d); + return !e ? null : V1d(p1d(a, e), c2); + } + function gid(a, b) { + var c2; + return c2 = a.Yg(b), c2 >= 0 ? a._g(c2, true, true) : sid(a, b, true); + } + function s6b(a, b) { + return Kdb(Edb(ED(vNb(a, (wtc(), htc)))), Edb(ED(vNb(b, htc)))); + } + function pUc() { + pUc = ccb; + oUc = b3c(b3c(g3c(new j3c(), (yRc(), vRc)), (qSc(), pSc)), lSc); + } + function IHc(a, b, c2) { + var d; + d = SHc(a, b, c2); + a.b = new BHc(d.c.length); + return KHc(a, d); + } + function qhe(a) { + if (a.b <= 0) + throw vbb(new utb()); + --a.b; + a.a -= a.c.c; + return meb(a.a); + } + function ptd(a) { + var b; + if (!a.a) { + throw vbb(new vtb()); + } + b = a.a; + a.a = Xod(a.a); + return b; + } + function dBb(a) { + while (!a.a) { + if (!HBb(a.c, new hBb(a))) { + return false; + } + } + return true; + } + function vr(a) { + var b; + Qb(a); + if (JD(a, 198)) { + b = BD(a, 198); + return b; + } + return new wr(a); + } + function r3c(a) { + p3c(); + BD(a.We((Y9c(), x9c)), 174).Fc((rcd(), ocd)); + a.Ye(w9c, null); + } + function p3c() { + p3c = ccb; + m3c = new v3c(); + o3c = new x3c(); + n3c = mn((Y9c(), w9c), m3c, b9c, o3c); + } + function fWc() { + fWc = ccb; + dWc = new hWc("LEAF_NUMBER", 0); + eWc = new hWc("NODE_SIZE", 1); + } + function UMc(a, b, c2) { + a.a = b; + a.c = c2; + a.b.a.$b(); + Osb(a.d); + a.e.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + function yHc(a) { + a.a = KC(WD, oje, 25, a.b + 1, 15, 1); + a.c = KC(WD, oje, 25, a.b, 15, 1); + a.d = 0; + } + function MWb(a, b) { + if (a.a.ue(b.d, a.b) > 0) { + Ekb(a.c, new dWb(b.c, b.d, a.d)); + a.b = b.d; + } + } + function nud(a, b) { + if (a.g == null || b >= a.i) + throw vbb(new $zd(b, a.i)); + return a.g[b]; + } + function pOd(a, b, c2) { + Itd(a, c2); + if (c2 != null && !a.wj(c2)) { + throw vbb(new tcb()); + } + return c2; + } + function KLd(a) { + var b; + if (a.Ek()) { + for (b = a.i - 1; b >= 0; --b) { + qud(a, b); + } + } + return wud(a); + } + function Bwb(a) { + var b, c2; + if (!a.b) { + return null; + } + c2 = a.b; + while (b = c2.a[0]) { + c2 = b; + } + return c2; + } + function ulb(a, b) { + var c2, d; + pCb(b); + return c2 = (d = a.slice(0, b), PC(d, a)), c2.length = b, c2; + } + function Klb(a, b, c2, d) { + var e; + d = (ipb(), !d ? fpb : d); + e = a.slice(b, c2); + Llb(e, a, b, c2, -b, d); + } + function bid(a, b, c2, d, e) { + return b < 0 ? sid(a, c2, d) : BD(c2, 66).Nj().Pj(a, a.yh(), b, d, e); + } + function hZd(a) { + if (JD(a, 172)) { + return "" + BD(a, 172).a; + } + return a == null ? null : fcb(a); + } + function iZd(a) { + if (JD(a, 172)) { + return "" + BD(a, 172).a; + } + return a == null ? null : fcb(a); + } + function nDb(a, b) { + if (b.a) { + throw vbb(new hz(Hke)); + } + Qqb(a.a, b); + b.a = a; + !a.j && (a.j = b); + } + function qBb(a, b) { + nvb.call(this, b.rd(), b.qd() & -16449); + uCb(a); + this.a = a; + this.c = b; + } + function Ti(a, b) { + var c2, d; + d = b / a.c.Hd().gc() | 0; + c2 = b % a.c.Hd().gc(); + return Mi(a, d, c2); + } + function NHb() { + NHb = ccb; + LHb = new OHb(jle, 0); + KHb = new OHb(gle, 1); + MHb = new OHb(kle, 2); + } + function lxb() { + lxb = ccb; + hxb = new mxb("All", 0); + ixb = new rxb(); + jxb = new txb(); + kxb = new wxb(); + } + function zxb() { + zxb = ccb; + yxb = as((lxb(), OC(GC(iL, 1), Kie, 297, 0, [hxb, ixb, jxb, kxb]))); + } + function uWb() { + uWb = ccb; + tWb = as((lWb(), OC(GC(SP, 1), Kie, 405, 0, [hWb, kWb, iWb, jWb]))); + } + function ALb() { + ALb = ccb; + zLb = as((vLb(), OC(GC(PN, 1), Kie, 406, 0, [uLb, rLb, sLb, tLb]))); + } + function WMb() { + WMb = ccb; + VMb = as((RMb(), OC(GC(jO, 1), Kie, 323, 0, [OMb, NMb, PMb, QMb]))); + } + function WOb() { + WOb = ccb; + VOb = as((ROb(), OC(GC(CO, 1), Kie, 394, 0, [OOb, NOb, POb, QOb]))); + } + function GRc() { + GRc = ccb; + FRc = as((yRc(), OC(GC(h$, 1), Kie, 393, 0, [uRc, vRc, wRc, xRc]))); + } + function mbc() { + mbc = ccb; + lbc = as((gbc(), OC(GC(VS, 1), Kie, 360, 0, [fbc, dbc, ebc, cbc]))); + } + function oXc() { + oXc = ccb; + nXc = as((iXc(), OC(GC(a_, 1), Kie, 340, 0, [hXc, fXc, gXc, eXc]))); + } + function Fjc() { + Fjc = ccb; + Ejc = as((Ajc(), OC(GC(mV, 1), Kie, 411, 0, [wjc, xjc, yjc, zjc]))); + } + function Pzc() { + Pzc = ccb; + Ozc = as((Izc(), OC(GC($W, 1), Kie, 197, 0, [Gzc, Hzc, Fzc, Ezc]))); + } + function ugd() { + ugd = ccb; + tgd = as((pgd(), OC(GC(k2, 1), Kie, 396, 0, [mgd, ngd, lgd, ogd]))); + } + function xbd() { + xbd = ccb; + wbd = as((rbd(), OC(GC(A1, 1), Kie, 285, 0, [qbd, nbd, obd, pbd]))); + } + function Fad() { + Fad = ccb; + Ead = as((Aad(), OC(GC(v1, 1), Kie, 218, 0, [zad, xad, wad, yad]))); + } + function Ied() { + Ied = ccb; + Hed = as((Ded(), OC(GC(O1, 1), Kie, 311, 0, [Ced, zed, Bed, Aed]))); + } + function ydd() { + ydd = ccb; + xdd = as((tdd(), OC(GC(I1, 1), Kie, 374, 0, [rdd, sdd, qdd, pdd]))); + } + function A9d() { + A9d = ccb; + Smd(); + x9d = Pje; + w9d = Qje; + z9d = new Ndb(Pje); + y9d = new Ndb(Qje); + } + function _qc() { + _qc = ccb; + $qc = new arc(ane, 0); + Zqc = new arc("IMPROVE_STRAIGHTNESS", 1); + } + function eIc(a, b) { + FHc(); + return Ekb(a, new vgd(b, meb(b.e.c.length + b.g.c.length))); + } + function gIc(a, b) { + FHc(); + return Ekb(a, new vgd(b, meb(b.e.c.length + b.g.c.length))); + } + function PC(a, b) { + HC(b) != 10 && OC(rb(b), b.hm, b.__elementTypeId$, HC(b), a); + return a; + } + function Lkb(a, b) { + var c2; + c2 = Jkb(a, b, 0); + if (c2 == -1) { + return false; + } + Kkb(a, c2); + return true; + } + function Zrb(a, b) { + var c2; + c2 = BD(Thb(a.e, b), 387); + if (c2) { + jsb(c2); + return c2.e; + } + return null; + } + function Jbb(a) { + var b; + if (Fbb(a)) { + b = 0 - a; + if (!isNaN(b)) { + return b; + } + } + return zbb(hD(a)); + } + function Jkb(a, b, c2) { + for (; c2 < a.c.length; ++c2) { + if (wtb(b, a.c[c2])) { + return c2; + } + } + return -1; + } + function SAb(a, b, c2) { + var d; + Tzb(a); + d = new NBb(); + d.a = b; + a.a.Nb(new VBb(d, c2)); + return d.a; + } + function aAb(a) { + var b; + Tzb(a); + b = KC(UD, Vje, 25, 0, 15, 1); + _ub(a.a, new kAb(b)); + return b; + } + function ajc(a) { + var b, c2; + c2 = BD(Ikb(a.j, 0), 11); + b = BD(vNb(c2, (wtc(), $sc)), 11); + return b; + } + function yc(a) { + var b; + if (!xc(a)) { + throw vbb(new utb()); + } + a.e = 1; + b = a.d; + a.d = null; + return b; + } + function wu(a, b) { + var c2; + this.f = a; + this.b = b; + c2 = BD(Ohb(a.b, b), 283); + this.c = !c2 ? null : c2.b; + } + function Ygc() { + Hgc(); + this.b = new Lqb(); + this.f = new Lqb(); + this.g = new Lqb(); + this.e = new Lqb(); + } + function Tnc(a, b) { + this.a = KC(OQ, kne, 10, a.a.c.length, 0, 1); + Qkb(a.a, this.a); + this.b = b; + } + function zoc(a) { + var b; + for (b = a.p + 1; b < a.c.a.c.length; ++b) { + --BD(Ikb(a.c.a, b), 10).p; + } + } + function Rwd(a) { + var b; + b = a.Ai(); + b != null && a.d != -1 && BD(b, 92).Ng(a); + !!a.i && a.i.Fi(); + } + function rFd(a) { + Py(this); + this.g = !a ? null : Wy(a, a.$d()); + this.f = a; + Ry(this); + this._d(); + } + function pSd(a, b, c2, d, e, f2, g) { + nxd.call(this, b, d, e, f2, g); + this.c = a; + this.b = c2; + } + function Ayb(a, b, c2, d, e) { + uCb(a); + uCb(b); + uCb(c2); + uCb(d); + uCb(e); + return new Lyb(a, b, d); + } + function B2c(a, b) { + if (b < 0) { + throw vbb(new qcb(ese + b)); + } + A2c(a, b + 1); + return Ikb(a.j, b); + } + function Ob(a, b, c2, d) { + if (!a) { + throw vbb(new Wdb(hc(b, OC(GC(SI, 1), Uhe, 1, 5, [c2, d])))); + } + } + function dDb(a, b) { + return wtb(b, Ikb(a.f, 0)) || wtb(b, Ikb(a.f, 1)) || wtb(b, Ikb(a.f, 2)); + } + function ghd(a, b) { + ecd(BD(BD(a.f, 33).We((Y9c(), t9c)), 98)) && NCd(Yod(BD(a.f, 33)), b); + } + function p1d(a, b) { + var c2, d; + c2 = BD(b, 675); + d = c2.Oh(); + !d && c2.Rh(d = new Y1d(a, b)); + return d; + } + function q1d(a, b) { + var c2, d; + c2 = BD(b, 677); + d = c2.pk(); + !d && c2.tk(d = new j2d(a, b)); + return d; + } + function QSd(a) { + if (!a.b) { + a.b = new UTd(a, j5, a); + !a.a && (a.a = new fTd(a, a)); + } + return a.b; + } + function yTb() { + yTb = ccb; + wTb = new zTb("XY", 0); + vTb = new zTb("X", 1); + xTb = new zTb("Y", 2); + } + function EIb() { + EIb = ccb; + DIb = new FIb("TOP", 0); + CIb = new FIb(gle, 1); + BIb = new FIb(mle, 2); + } + function esc() { + esc = ccb; + csc = new fsc(ane, 0); + dsc = new fsc("TOP", 1); + bsc = new fsc(mle, 2); + } + function BAc() { + BAc = ccb; + zAc = new CAc("INPUT_ORDER", 0); + AAc = new CAc("PORT_DEGREE", 1); + } + function wD() { + wD = ccb; + sD = TC(Eje, Eje, 524287); + tD = TC(0, 0, Gje); + uD = RC(1); + RC(2); + vD = RC(0); + } + function WDc(a, b, c2) { + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + $Dc(a, b, c2); + a.a.c.length == 0 || TDc(a, b); + } + function rfb(a) { + var b, c2; + c2 = a.length; + b = KC(TD, $ie, 25, c2, 15, 1); + ffb(a, 0, c2, b, 0); + return b; + } + function Aid(a) { + var b; + if (!a.dh()) { + b = aLd(a.Tg()) - a.Ah(); + a.ph().bk(b); + } + return a.Pg(); + } + function xjd(a) { + var b; + b = CD(Ajd(a, 32)); + if (b == null) { + yjd(a); + b = CD(Ajd(a, 32)); + } + return b; + } + function iid(a, b) { + var c2; + c2 = bLd(a.d, b); + return c2 >= 0 ? fid(a, c2, true, true) : sid(a, b, true); + } + function vgc(a, b) { + qgc(); + var c2, d; + c2 = ugc(a); + d = ugc(b); + return !!c2 && !!d && !omb(c2.k, d.k); + } + function Gqd(a, b) { + dld(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function Hqd(a, b) { + eld(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function Iqd(a, b) { + cld(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function Jqd(a, b) { + ald(a, b == null || Ldb((uCb(b), b)) || isNaN((uCb(b), b)) ? 0 : (uCb(b), b)); + } + function agd(a) { + (!this.q ? (mmb(), mmb(), kmb) : this.q).Ac(!a.q ? (mmb(), mmb(), kmb) : a.q); + } + function S2d(a, b) { + return JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 ? new s4d(b, a) : new p4d(b, a); + } + function U2d(a, b) { + return JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 ? new s4d(b, a) : new p4d(b, a); + } + function INb(a, b) { + HNb = new tOb(); + FNb = b; + GNb = a; + BD(GNb.b, 65); + KNb(GNb, HNb, null); + JNb(GNb); + } + function uud(a, b, c2) { + var d; + d = a.g[b]; + mud(a, b, a.oi(b, c2)); + a.gi(b, c2, d); + a.ci(); + return d; + } + function Ftd(a, b) { + var c2; + c2 = a.Xc(b); + if (c2 >= 0) { + a.$c(c2); + return true; + } else { + return false; + } + } + function YId(a) { + var b; + if (a.d != a.r) { + b = wId(a); + a.e = !!b && b.Cj() == Bve; + a.d = b; + } + return a.e; + } + function fr(a, b) { + var c2; + Qb(a); + Qb(b); + c2 = false; + while (b.Ob()) { + c2 = c2 | a.Fc(b.Pb()); + } + return c2; + } + function Wrb(a, b) { + var c2; + c2 = BD(Ohb(a.e, b), 387); + if (c2) { + Yrb(a, c2); + return c2.e; + } + return null; + } + function UA(a) { + var b, c2; + b = a / 60 | 0; + c2 = a % 60; + if (c2 == 0) { + return "" + b; + } + return "" + b + ":" + ("" + c2); + } + function LAb(a, b) { + var c2, d; + Uzb(a); + d = new IBb(b, a.a); + c2 = new fBb(d); + return new YAb(a, c2); + } + function tB(d, a) { + var b = d.a[a]; + var c2 = (rC(), qC)[typeof b]; + return c2 ? c2(b) : xC(typeof b); + } + function yzc(a) { + switch (a.g) { + case 0: + return Ohe; + case 1: + return -1; + default: + return 0; + } + } + function oD(a) { + if (eD(a, (wD(), vD)) < 0) { + return -aD(hD(a)); + } + return a.l + a.m * Hje + a.h * Ije; + } + function HC(a) { + return a.__elementTypeCategory$ == null ? 10 : a.__elementTypeCategory$; + } + function dub(a) { + var b; + b = a.b.c.length == 0 ? null : Ikb(a.b, 0); + b != null && fub(a, 0); + return b; + } + function uA(a, b) { + while (b[0] < a.length && hfb(" \r\n", wfb(bfb(a, b[0]))) >= 0) { + ++b[0]; + } + } + function sgb(a, b) { + this.e = b; + this.a = vgb(a); + this.a < 54 ? this.f = Sbb(a) : this.c = ghb(a); + } + function vge(a, b, c2, d) { + wfe(); + xfe.call(this, 26); + this.c = a; + this.a = b; + this.d = c2; + this.b = d; + } + function EA(a, b, c2) { + var d, e; + d = 10; + for (e = 0; e < c2 - 1; e++) { + b < d && (a.a += "0", a); + d *= 10; + } + a.a += b; + } + function Hhe(a, b) { + var c2; + c2 = 0; + while (a.e != a.i.gc()) { + Qrd(b, Dyd(a), meb(c2)); + c2 != Ohe && ++c2; + } + } + function xHc(a, b) { + var c2; + ++a.d; + ++a.c[b]; + c2 = b + 1; + while (c2 < a.a.length) { + ++a.a[c2]; + c2 += c2 & -c2; + } + } + function Qgc(a, b) { + var c2, d, e; + e = b.c.i; + c2 = BD(Ohb(a.f, e), 57); + d = c2.d.c - c2.e.c; + p7c(b.a, d, 0); + } + function Scb(a) { + var b, c2; + b = a + 128; + c2 = (Ucb(), Tcb)[b]; + !c2 && (c2 = Tcb[b] = new Mcb(a)); + return c2; + } + function es(a, b) { + var c2; + uCb(b); + c2 = a[":" + b]; + nCb(!!c2, OC(GC(SI, 1), Uhe, 1, 5, [b])); + return c2; + } + function Mz(a) { + var b, c2; + if (a.b) { + c2 = null; + do { + b = a.b; + a.b = null; + c2 = Pz(b, c2); + } while (a.b); + a.b = c2; + } + } + function Lz(a) { + var b, c2; + if (a.a) { + c2 = null; + do { + b = a.a; + a.a = null; + c2 = Pz(b, c2); + } while (a.a); + a.a = c2; + } + } + function Dqb(a) { + var b; + ++a.a; + for (b = a.c.a.length; a.a < b; ++a.a) { + if (a.c.b[a.a]) { + return; + } + } + } + function S9b(a, b) { + var c2, d; + d = b.c; + for (c2 = d + 1; c2 <= b.f; c2++) { + a.a[c2] > a.a[d] && (d = c2); + } + return d; + } + function fic(a, b) { + var c2; + c2 = Jy(a.e.c, b.e.c); + if (c2 == 0) { + return Kdb(a.e.d, b.e.d); + } + return c2; + } + function Ogb(a, b) { + if (b.e == 0) { + return Ggb; + } + if (a.e == 0) { + return Ggb; + } + return Dhb(), Ehb(a, b); + } + function nCb(a, b) { + if (!a) { + throw vbb(new Wdb(DCb("Enum constant undefined: %s", b))); + } + } + function AWb() { + AWb = ccb; + xWb = new XWb(); + yWb = new _Wb(); + vWb = new dXb(); + wWb = new hXb(); + zWb = new lXb(); + } + function UEb() { + UEb = ccb; + SEb = new VEb("BY_SIZE", 0); + TEb = new VEb("BY_SIZE_AND_SHAPE", 1); + } + function XRb() { + XRb = ccb; + VRb = new YRb("EADES", 0); + WRb = new YRb("FRUCHTERMAN_REINGOLD", 1); + } + function xqc() { + xqc = ccb; + vqc = new yqc("READING_DIRECTION", 0); + wqc = new yqc("ROTATION", 1); + } + function uqc() { + uqc = ccb; + tqc = as((mqc(), OC(GC(IW, 1), Kie, 335, 0, [iqc, hqc, kqc, lqc, jqc]))); + } + function bAc() { + bAc = ccb; + aAc = as((Vzc(), OC(GC(_W, 1), Kie, 315, 0, [Uzc, Rzc, Szc, Qzc, Tzc]))); + } + function bkc() { + bkc = ccb; + akc = as((Xjc(), OC(GC(uV, 1), Kie, 363, 0, [Tjc, Vjc, Wjc, Ujc, Sjc]))); + } + function Htc() { + Htc = ccb; + Gtc = as((Ctc(), OC(GC(TW, 1), Kie, 163, 0, [Btc, xtc, ytc, ztc, Atc]))); + } + function S_c() { + S_c = ccb; + R_c = as((N_c(), OC(GC(Q_, 1), Kie, 316, 0, [I_c, J_c, M_c, K_c, L_c]))); + } + function S5c() { + S5c = ccb; + R5c = as((N5c(), OC(GC(e1, 1), Kie, 175, 0, [L5c, K5c, I5c, M5c, J5c]))); + } + function p$c() { + p$c = ccb; + o$c = as((k$c(), OC(GC(y_, 1), Kie, 355, 0, [g$c, f$c, i$c, h$c, j$c]))); + } + function vUb() { + vUb = ccb; + uUb = as((qUb(), OC(GC(zP, 1), Kie, 356, 0, [lUb, mUb, nUb, oUb, pUb]))); + } + function mad() { + mad = ccb; + lad = as((ead(), OC(GC(t12, 1), Kie, 103, 0, [cad, bad, aad, _9c, dad]))); + } + function Ybd() { + Ybd = ccb; + Xbd = as((Tbd(), OC(GC(C1, 1), Kie, 249, 0, [Qbd, Sbd, Obd, Pbd, Rbd]))); + } + function cdd() { + cdd = ccb; + bdd = as((Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]))); + } + function _1c(a, b) { + var c2; + c2 = BD(Ohb(a.a, b), 134); + if (!c2) { + c2 = new zNb(); + Rhb(a.a, b, c2); + } + return c2; + } + function hoc(a) { + var b; + b = BD(vNb(a, (wtc(), usc)), 305); + if (b) { + return b.a == a; + } + return false; + } + function ioc(a) { + var b; + b = BD(vNb(a, (wtc(), usc)), 305); + if (b) { + return b.i == a; + } + return false; + } + function Jub(a, b) { + uCb(b); + Iub(a); + if (a.d.Ob()) { + b.td(a.d.Pb()); + return true; + } + return false; + } + function Oy(a) { + if (ybb(a, Ohe) > 0) { + return Ohe; + } + if (ybb(a, Rie) < 0) { + return Rie; + } + return Tbb(a); + } + function Cv(a) { + if (a < 3) { + Xj(a, Hie); + return a + 1; + } + if (a < Iie) { + return QD(a / 0.75 + 1); + } + return Ohe; + } + function XKd(a, b) { + var c2; + c2 = (a.i == null && TKd(a), a.i); + return b >= 0 && b < c2.length ? c2[b] : null; + } + function cC(a, b, c2) { + var d; + if (b == null) { + throw vbb(new Geb()); + } + d = aC(a, b); + dC(a, b, c2); + return d; + } + function Emc(a) { + a.a >= -0.01 && a.a <= ple && (a.a = 0); + a.b >= -0.01 && a.b <= ple && (a.b = 0); + return a; + } + function sfb(a, b) { + return b == (ntb(), ntb(), mtb) ? a.toLocaleLowerCase() : a.toLowerCase(); + } + function idb(a) { + return ((a.i & 2) != 0 ? "interface " : (a.i & 1) != 0 ? "" : "class ") + (fdb(a), a.o); + } + function Pnd(a) { + var b, c2; + c2 = (b = new SSd(), b); + wtd((!a.q && (a.q = new cUd(n5, a, 11, 10)), a.q), c2); + } + function Pdd(a, b) { + var c2; + c2 = b > 0 ? b - 1 : b; + return Vdd(Wdd(Xdd(Ydd(new Zdd(), c2), a.n), a.j), a.k); + } + function u2d(a, b, c2, d) { + var e; + a.j = -1; + Qxd(a, I2d(a, b, c2), (Q6d(), e = BD(b, 66).Mj(), e.Ok(d))); + } + function VWb(a) { + this.g = a; + this.f = new Rkb(); + this.a = $wnd.Math.min(this.g.c.c, this.g.d.c); + } + function mDb(a) { + this.b = new Rkb(); + this.a = new Rkb(); + this.c = new Rkb(); + this.d = new Rkb(); + this.e = a; + } + function Cnc(a, b) { + this.a = new Lqb(); + this.e = new Lqb(); + this.b = (xzc(), wzc); + this.c = a; + this.b = b; + } + function bIb(a, b, c2) { + $Gb.call(this); + THb(this); + this.a = a; + this.c = c2; + this.b = b.d; + this.f = b.e; + } + function yd(a) { + this.d = a; + this.c = a.c.vc().Kc(); + this.b = null; + this.a = null; + this.e = (hs(), gs); + } + function zud(a) { + if (a < 0) { + throw vbb(new Wdb("Illegal Capacity: " + a)); + } + this.g = this.ri(a); + } + function avb(a, b) { + if (0 > a || a > b) { + throw vbb(new scb("fromIndex: 0, toIndex: " + a + oke + b)); + } + } + function Gs(a) { + var b; + if (a.a == a.b.a) { + throw vbb(new utb()); + } + b = a.a; + a.c = b; + a.a = a.a.e; + return b; + } + function Zsb(a) { + var b; + yCb(!!a.c); + b = a.c.a; + Nsb(a.d, a.c); + a.b == a.c ? a.b = b : --a.a; + a.c = null; + } + function VAb(a, b) { + var c2; + Uzb(a); + c2 = new lBb(a, a.a.rd(), a.a.qd() | 4, b); + return new YAb(a, c2); + } + function ke(a, b) { + var c2, d; + c2 = BD(Hv(a.d, b), 14); + if (!c2) { + return null; + } + d = b; + return a.e.pc(d, c2); + } + function xac(a, b) { + var c2, d; + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 70); + yNb(c2, (wtc(), Ssc), b); + } + } + function t9b(a) { + var b; + b = Edb(ED(vNb(a, (Nyc(), Zwc)))); + if (b < 0) { + b = 0; + yNb(a, Zwc, b); + } + return b; + } + function ifc(a, b, c2) { + var d; + d = $wnd.Math.max(0, a.b / 2 - 0.5); + cfc(c2, d, 1); + Ekb(b, new rfc(c2, d)); + } + function NMc(a, b, c2) { + var d; + d = a.a.e[BD(b.a, 10).p] - a.a.e[BD(c2.a, 10).p]; + return QD(Eeb(d)); + } + function iZb(a, b, c2, d, e, f2) { + var g; + g = kZb(d); + QZb(g, e); + RZb(g, f2); + Rc(a.a, d, new BZb(g, b, c2.f)); + } + function Bid(a, b) { + var c2; + c2 = YKd(a.Tg(), b); + if (!c2) { + throw vbb(new Wdb(ite + b + lte)); + } + return c2; + } + function ntd(a, b) { + var c2; + c2 = a; + while (Xod(c2)) { + c2 = Xod(c2); + if (c2 == b) { + return true; + } + } + return false; + } + function Uw(a, b) { + var c2, d, e; + d = b.a.cd(); + c2 = BD(b.a.dd(), 14).gc(); + for (e = 0; e < c2; e++) { + a.td(d); + } + } + function Hkb(a, b) { + var c2, d, e, f2; + uCb(b); + for (d = a.c, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + b.td(c2); + } + } + function Nsb(a, b) { + var c2; + c2 = b.c; + b.a.b = b.b; + b.b.a = b.a; + b.a = b.b = null; + b.c = null; + --a.b; + return c2; + } + function wqb(a, b) { + if (!!b && a.b[b.g] == b) { + NC(a.b, b.g, null); + --a.c; + return true; + } + return false; + } + function lo(a, b) { + return !!vo(a, b, Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15)))); + } + function w$b(a, b) { + ecd(BD(vNb(BD(a.e, 10), (Nyc(), Vxc)), 98)) && (mmb(), Okb(BD(a.e, 10).j, b)); + } + function THb(a) { + a.b = (NHb(), KHb); + a.f = (EIb(), CIb); + a.d = (Xj(2, Jie), new Skb(2)); + a.e = new d7c(); + } + function gHb() { + gHb = ccb; + dHb = new hHb("BEGIN", 0); + eHb = new hHb(gle, 1); + fHb = new hHb("END", 2); + } + function qad() { + qad = ccb; + nad = new rad(gle, 0); + oad = new rad("HEAD", 1); + pad2 = new rad("TAIL", 2); + } + function Fsd() { + Csd(); + return OC(GC(O3, 1), Kie, 237, 0, [Bsd, ysd, zsd, xsd, Asd, vsd, usd, wsd]); + } + function c6c() { + _5c(); + return OC(GC(f1, 1), Kie, 277, 0, [$5c, T5c, X5c, Z5c, U5c, V5c, W5c, Y5c]); + } + function Dlc() { + Alc(); + return OC(GC(KV, 1), Kie, 270, 0, [tlc, wlc, slc, zlc, vlc, ulc, ylc, xlc]); + } + function nAc() { + kAc(); + return OC(GC(aX, 1), Kie, 260, 0, [iAc, dAc, gAc, eAc, fAc, cAc, hAc, jAc]); + } + function kcd() { + kcd = ccb; + jcd = as((dcd(), OC(GC(D1, 1), Kie, 98, 0, [ccd, bcd, acd, Zbd, _bd, $bd]))); + } + function tHb() { + tHb = ccb; + sHb = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])).length; + rHb = sHb; + } + function wed(a) { + this.b = (Qb(a), new Tkb(a)); + this.a = new Rkb(); + this.d = new Rkb(); + this.e = new d7c(); + } + function W6c(a) { + var b; + b = $wnd.Math.sqrt(a.a * a.a + a.b * a.b); + if (b > 0) { + a.a /= b; + a.b /= b; + } + return a; + } + function bKd(a) { + var b; + if (a.w) { + return a.w; + } else { + b = cKd(a); + !!b && !b.kh() && (a.w = b); + return b; + } + } + function gZd(a) { + var b; + if (a == null) { + return null; + } else { + b = BD(a, 190); + return Umd(b, b.length); + } + } + function qud(a, b) { + if (a.g == null || b >= a.i) + throw vbb(new $zd(b, a.i)); + return a.li(b, a.g[b]); + } + function Mmc(a) { + var b, c2; + b = a.a.d.j; + c2 = a.c.d.j; + while (b != c2) { + rqb(a.b, b); + b = Xcd(b); + } + rqb(a.b, b); + } + function Jmc(a) { + var b; + for (b = 0; b < a.c.length; b++) { + (tCb(b, a.c.length), BD(a.c[b], 11)).p = b; + } + } + function bEc(a, b, c2) { + var d, e, f2; + e = b[c2]; + for (d = 0; d < e.length; d++) { + f2 = e[d]; + a.e[f2.c.p][f2.p] = d; + } + } + function ZEc(a, b) { + var c2, d, e, f2; + for (d = a.d, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + REc(a.g, c2).a = b; + } + } + function q7c(a, b) { + var c2, d; + for (d = Jsb(a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 8); + P6c(c2, b); + } + return a; + } + function zUb(a, b) { + var c2; + c2 = c7c(R6c(BD(Ohb(a.g, b), 8)), E6c(BD(Ohb(a.f, b), 460).b)); + return c2; + } + function lib(a) { + var b; + xpb(a.e, a); + sCb(a.b); + a.c = a.a; + b = BD(a.a.Pb(), 42); + a.b = kib(a); + return b; + } + function CD(a) { + var b; + CCb(a == null || Array.isArray(a) && (b = HC(a), !(b >= 14 && b <= 16))); + return a; + } + function dcb(a, b, c2) { + var d = function() { + return a.apply(d, arguments); + }; + b.apply(d, c2); + return d; + } + function TLc(a, b, c2) { + var d, e; + d = b; + do { + e = Edb(a.p[d.p]) + c2; + a.p[d.p] = e; + d = a.a[d.p]; + } while (d != b); + } + function NQd(a, b) { + var c2, d; + d = a.a; + c2 = OQd(a, b, null); + d != b && !a.e && (c2 = QQd(a, b, c2)); + !!c2 && c2.Fi(); + } + function ADb(a, b) { + return Iy(), My(Qie), $wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b); + } + function Ky(a, b) { + Iy(); + My(Qie); + return $wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b); + } + function Akc(a, b) { + gkc(); + return beb(a.b.c.length - a.e.c.length, b.b.c.length - b.e.c.length); + } + function oo(a, b) { + return Kv(uo(a, b, Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))))); + } + function o0b() { + o0b = ccb; + n0b = as((j0b(), OC(GC(NQ, 1), Kie, 267, 0, [h0b, g0b, e0b, i0b, f0b, d0b]))); + } + function n8c() { + n8c = ccb; + m8c = as((i8c(), OC(GC(r1, 1), Kie, 291, 0, [h8c, g8c, f8c, d8c, c8c, e8c]))); + } + function K7c() { + K7c = ccb; + J7c = as((F7c(), OC(GC(o1, 1), Kie, 248, 0, [z7c, C7c, D7c, E7c, A7c, B7c]))); + } + function Fpc() { + Fpc = ccb; + Epc = as((Apc(), OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]))); + } + function Drc() { + Drc = ccb; + Crc = as((yrc(), OC(GC(OW, 1), Kie, 275, 0, [wrc, trc, xrc, vrc, urc, rrc]))); + } + function qrc() { + qrc = ccb; + prc = as((lrc(), OC(GC(NW, 1), Kie, 274, 0, [irc, hrc, krc, grc, jrc, frc]))); + } + function tzc() { + tzc = ccb; + szc = as((lzc(), OC(GC(YW, 1), Kie, 313, 0, [jzc, hzc, fzc, gzc, kzc, izc]))); + } + function Yqc() { + Yqc = ccb; + Xqc = as((Sqc(), OC(GC(LW, 1), Kie, 276, 0, [Nqc, Mqc, Pqc, Oqc, Rqc, Qqc]))); + } + function wSc() { + wSc = ccb; + vSc = as((qSc(), OC(GC(t$, 1), Kie, 327, 0, [pSc, lSc, nSc, mSc, oSc, kSc]))); + } + function ycd() { + ycd = ccb; + xcd = as((rcd(), OC(GC(E1, 1), Kie, 273, 0, [pcd, ncd, ocd, mcd, lcd, qcd]))); + } + function Rad() { + Rad = ccb; + Qad = as((Mad(), OC(GC(w1, 1), Kie, 312, 0, [Kad, Iad, Lad, Gad, Jad, Had]))); + } + function Lbd() { + Hbd(); + return OC(GC(B1, 1), Kie, 93, 0, [zbd, ybd, Bbd, Gbd, Fbd, Ebd, Cbd, Dbd, Abd]); + } + function vkd(a, b) { + var c2; + c2 = a.a; + a.a = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 0, c2, a.a)); + } + function wkd(a, b) { + var c2; + c2 = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 1, c2, a.b)); + } + function hmd(a, b) { + var c2; + c2 = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 3, c2, a.b)); + } + function ald(a, b) { + var c2; + c2 = a.f; + a.f = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 3, c2, a.f)); + } + function cld(a, b) { + var c2; + c2 = a.g; + a.g = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 4, c2, a.g)); + } + function dld(a, b) { + var c2; + c2 = a.i; + a.i = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 5, c2, a.i)); + } + function eld(a, b) { + var c2; + c2 = a.j; + a.j = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 6, c2, a.j)); + } + function omd(a, b) { + var c2; + c2 = a.j; + a.j = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 1, c2, a.j)); + } + function imd(a, b) { + var c2; + c2 = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 4, c2, a.c)); + } + function pmd(a, b) { + var c2; + c2 = a.k; + a.k = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new lSd(a, 2, c2, a.k)); + } + function qQd(a, b) { + var c2; + c2 = a.d; + a.d = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new mSd(a, 2, c2, a.d)); + } + function AId(a, b) { + var c2; + c2 = a.s; + a.s = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new mSd(a, 4, c2, a.s)); + } + function DId(a, b) { + var c2; + c2 = a.t; + a.t = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new mSd(a, 5, c2, a.t)); + } + function _Jd(a, b) { + var c2; + c2 = a.F; + a.F = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 5, c2, b)); + } + function izd(a, b) { + var c2; + c2 = BD(Ohb((pEd(), oEd), a), 55); + return c2 ? c2.xj(b) : KC(SI, Uhe, 1, b, 5, 1); + } + function Xpd(a, b) { + var c2, d; + c2 = b in a.a; + if (c2) { + d = aC(a, b).he(); + if (d) { + return d.a; + } + } + return null; + } + function ftd(a, b) { + var c2, d, e; + c2 = (d = (Fhd(), e = new Jod(), e), !!b && God(d, b), d); + Hod(c2, a); + return c2; + } + function LLd(a, b, c2) { + Itd(a, c2); + if (!a.Bk() && c2 != null && !a.wj(c2)) { + throw vbb(new tcb()); + } + return c2; + } + function Xdd(a, b) { + a.n = b; + if (a.n) { + a.f = new Rkb(); + a.e = new Rkb(); + } else { + a.f = null; + a.e = null; + } + return a; + } + function ndb(a, b, c2, d, e, f2) { + var g; + g = ldb(a, b); + zdb(c2, g); + g.i = e ? 8 : 0; + g.f = d; + g.e = e; + g.g = f2; + return g; + } + function rSd(a, b, c2, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 1; + this.c = a; + this.a = c2; + } + function tSd(a, b, c2, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 2; + this.c = a; + this.a = c2; + } + function BSd(a, b, c2, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 6; + this.c = a; + this.a = c2; + } + function GSd(a, b, c2, d, e) { + this.d = b; + this.k = d; + this.f = e; + this.o = -1; + this.p = 7; + this.c = a; + this.a = c2; + } + function xSd(a, b, c2, d, e) { + this.d = b; + this.j = d; + this.e = e; + this.o = -1; + this.p = 4; + this.c = a; + this.a = c2; + } + function rDb(a, b) { + var c2, d, e, f2; + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + nDb(a.a, c2); + } + return a; + } + function pl(a) { + var b, c2, d, e; + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + Qb(b); + } + return new vl(a); + } + function Uz(a) { + var b = /function(?:\s+([\w$]+))?\s*\(/; + var c2 = b.exec(a); + return c2 && c2[1] || Xie; + } + function zdb(a, b) { + if (!a) { + return; + } + b.n = a; + var d = tdb(b); + if (!d) { + _bb[a] = [b]; + return; + } + d.gm = b; + } + function vlb(a, b, c2) { + var d, e; + e = a.length; + d = $wnd.Math.min(c2, e); + $Bb(a, 0, b, 0, d, true); + return b; + } + function RPb(a, b, c2) { + var d, e; + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 79); + Qqb(a, BD(c2.Kb(d), 33)); + } + } + function Xbb() { + Ybb(); + var a = Wbb; + for (var b = 0; b < arguments.length; b++) { + a.push(arguments[b]); + } + } + function n7c(a, b) { + var c2, d, e, f2; + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + Gsb(a, c2, a.c.b, a.c); + } + } + function s$c(a, b) { + a.b = $wnd.Math.max(a.b, b.d); + a.e += b.r + (a.a.c.length == 0 ? 0 : a.c); + Ekb(a.a, b); + } + function wkb(a) { + yCb(a.c >= 0); + if (ekb(a.d, a.c) < 0) { + a.a = a.a - 1 & a.d.a.length - 1; + a.b = a.d.c; + } + a.c = -1; + } + function pgb(a) { + if (a.a < 54) { + return a.f < 0 ? -1 : a.f > 0 ? 1 : 0; + } + return (!a.c && (a.c = fhb(a.f)), a.c).e; + } + function My(a) { + if (!(a >= 0)) { + throw vbb(new Wdb("tolerance (" + a + ") must be >= 0")); + } + return a; + } + function n4c() { + if (!f4c) { + f4c = new m4c(); + l4c(f4c, OC(GC(C0, 1), Uhe, 130, 0, [new Z9c()])); + } + return f4c; + } + function KAc() { + KAc = ccb; + JAc = new LAc(ole, 0); + HAc = new LAc("INPUT", 1); + IAc = new LAc("OUTPUT", 2); + } + function bqc() { + bqc = ccb; + $pc = new cqc("ARD", 0); + aqc = new cqc("MSD", 1); + _pc = new cqc("MANUAL", 2); + } + function rGc() { + rGc = ccb; + oGc = new sGc("BARYCENTER", 0); + pGc = new sGc(Bne, 1); + qGc = new sGc(Cne, 2); + } + function ztd(a, b) { + var c2; + c2 = a.gc(); + if (b < 0 || b > c2) + throw vbb(new Cyd(b, c2)); + return new czd(a, b); + } + function JAd(a, b) { + var c2; + if (JD(b, 42)) { + return a.c.Mc(b); + } else { + c2 = qAd(a, b); + LAd(a, b); + return c2; + } + } + function $nd(a, b, c2) { + yId(a, b); + pnd(a, c2); + AId(a, 0); + DId(a, 1); + CId(a, true); + BId(a, true); + return a; + } + function Xj(a, b) { + if (a < 0) { + throw vbb(new Wdb(b + " cannot be negative but was: " + a)); + } + return a; + } + function Bt(a, b) { + var c2, d; + for (c2 = 0, d = a.gc(); c2 < d; ++c2) { + if (wtb(b, a.Xb(c2))) { + return c2; + } + } + return -1; + } + function Nc(a) { + var b, c2; + for (c2 = a.c.Cc().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 14); + b.$b(); + } + a.c.$b(); + a.d = 0; + } + function Ri(a) { + var b, c2, d, e; + for (c2 = a.a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + Flb(b, b.length, null); + } + } + function ieb(a) { + var b, c2; + if (a == 0) { + return 32; + } else { + c2 = 0; + for (b = 1; (b & a) == 0; b <<= 1) { + ++c2; + } + return c2; + } + } + function NGb(a) { + var b, c2; + for (c2 = new olb(ahd(a)); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 680); + b.Gf(); + } + } + function CUb(a) { + xUb(); + this.g = new Lqb(); + this.f = new Lqb(); + this.b = new Lqb(); + this.c = new Hp(); + this.i = a; + } + function XZb() { + this.f = new d7c(); + this.d = new s0b(); + this.c = new d7c(); + this.a = new Rkb(); + this.b = new Rkb(); + } + function c6d(a, b, c2, d) { + this.rj(); + this.a = b; + this.b = a; + this.c = null; + this.c = new d6d(this, b, c2, d); + } + function nxd(a, b, c2, d, e) { + this.d = a; + this.n = b; + this.g = c2; + this.o = d; + this.p = -1; + e || (this.o = -2 - d - 1); + } + function hJd() { + FId.call(this); + this.n = -1; + this.g = null; + this.i = null; + this.j = null; + this.Bb |= zte; + } + function Ldd() { + Idd(); + return OC(GC(J1, 1), Kie, 259, 0, [Bdd, Ddd, Add, Edd, Fdd, Hdd, Gdd, Cdd, zdd]); + } + function uFb() { + rFb(); + return OC(GC(dN, 1), Kie, 250, 0, [qFb, lFb, mFb, kFb, oFb, pFb, nFb, jFb, iFb]); + } + function qeb() { + qeb = ccb; + peb = OC(GC(WD, 1), oje, 25, 15, [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15]); + } + function vCc() { + vCc = ccb; + uCc = e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + } + function VCc() { + VCc = ccb; + UCc = e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + } + function rDc() { + rDc = ccb; + qDc = e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + } + function yFc() { + yFc = ccb; + xFc = c3c(e3c(e3c(new j3c(), (qUb(), nUb), (S8b(), z8b)), oUb, p8b), pUb, y8b); + } + function Rpc() { + Rpc = ccb; + Ppc = new Tpc("LAYER_SWEEP", 0); + Opc = new Tpc(Tne, 1); + Qpc = new Tpc(ane, 2); + } + function RLc(a, b) { + var c2, d; + c2 = a.c; + d = b.e[a.p]; + if (d > 0) { + return BD(Ikb(c2.a, d - 1), 10); + } + return null; + } + function Lkd(a, b) { + var c2; + c2 = a.k; + a.k = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 2, c2, a.k)); + } + function kmd(a, b) { + var c2; + c2 = a.f; + a.f = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 8, c2, a.f)); + } + function lmd(a, b) { + var c2; + c2 = a.i; + a.i = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 7, c2, a.i)); + } + function Hod(a, b) { + var c2; + c2 = a.a; + a.a = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 8, c2, a.a)); + } + function zpd(a, b) { + var c2; + c2 = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 0, c2, a.b)); + } + function UUd(a, b) { + var c2; + c2 = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 0, c2, a.b)); + } + function VUd(a, b) { + var c2; + c2 = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c2, a.c)); + } + function Apd(a, b) { + var c2; + c2 = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c2, a.c)); + } + function pQd(a, b) { + var c2; + c2 = a.c; + a.c = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 4, c2, a.c)); + } + function PHd(a, b) { + var c2; + c2 = a.d; + a.d = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c2, a.d)); + } + function jKd(a, b) { + var c2; + c2 = a.D; + a.D = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 2, c2, a.D)); + } + function Rdd(a, b) { + if (a.r > 0 && a.c < a.r) { + a.c += b; + !!a.i && a.i.d > 0 && a.g != 0 && Rdd(a.i, b / a.r * a.i.d); + } + } + function dge(a, b, c2) { + var d; + a.b = b; + a.a = c2; + d = (a.a & 512) == 512 ? new hee() : new ude(); + a.c = ode(d, a.b, a.a); + } + function g3d(a, b) { + return T6d(a.e, b) ? (Q6d(), YId(b) ? new R7d(b, a) : new f7d(b, a)) : new c8d(b, a); + } + function _o(a, b) { + return Fv(vo(a.a, b, Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))))); + } + function Nyb(a, b, c2) { + return Ayb(a, new Kzb(b), new Mzb(), new Ozb(c2), OC(GC(xL, 1), Kie, 132, 0, [])); + } + function pAb(a) { + var b, c2; + if (0 > a) { + return new yAb(); + } + b = a + 1; + c2 = new rAb(b, a); + return new vAb(null, c2); + } + function umb(a, b) { + mmb(); + var c2; + c2 = new Mqb(1); + ND(a) ? Shb(c2, a, b) : jrb(c2.f, a, b); + return new iob(c2); + } + function aMb(a, b) { + var c2, d; + c2 = a.o + a.p; + d = b.o + b.p; + if (c2 < d) { + return -1; + } + if (c2 == d) { + return 0; + } + return 1; + } + function P2b(a) { + var b; + b = vNb(a, (wtc(), $sc)); + if (JD(b, 160)) { + return O2b(BD(b, 160)); + } + return null; + } + function Kp(a) { + var b; + a = $wnd.Math.max(a, 2); + b = geb(a); + if (a > b) { + b <<= 1; + return b > 0 ? b : Iie; + } + return b; + } + function xc(a) { + Ub(a.e != 3); + switch (a.e) { + case 2: + return false; + case 0: + return true; + } + return zc(a); + } + function T6c(a, b) { + var c2; + if (JD(b, 8)) { + c2 = BD(b, 8); + return a.a == c2.a && a.b == c2.b; + } else { + return false; + } + } + function _Mb(a, b, c2) { + var d, e, f2; + f2 = b >> 5; + e = b & 31; + d = xbb(Pbb(a.n[c2][f2], Tbb(Nbb(e, 1))), 3); + return d; + } + function IAd(a, b) { + var c2, d; + for (d = b.vc().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 42); + HAd(a, c2.cd(), c2.dd()); + } + } + function N1c(a, b) { + var c2; + c2 = new tOb(); + BD(b.b, 65); + BD(b.b, 65); + BD(b.b, 65); + Hkb(b.a, new T1c(a, c2, b)); + } + function DUd(a, b) { + var c2; + c2 = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 21, c2, a.b)); + } + function jmd(a, b) { + var c2; + c2 = a.d; + a.d = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 11, c2, a.d)); + } + function _Id(a, b) { + var c2; + c2 = a.j; + a.j = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 13, c2, a.j)); + } + function $jb(a, b, c2) { + var d, e, f2; + f2 = a.a.length - 1; + for (e = a.b, d = 0; d < c2; e = e + 1 & f2, ++d) { + NC(b, d, a.a[e]); + } + } + function rqb(a, b) { + var c2; + uCb(b); + c2 = b.g; + if (!a.b[c2]) { + NC(a.b, c2, b); + ++a.c; + return true; + } + return false; + } + function eub(a, b) { + var c2; + c2 = b == null ? -1 : Jkb(a.b, b, 0); + if (c2 < 0) { + return false; + } + fub(a, c2); + return true; + } + function fub(a, b) { + var c2; + c2 = Kkb(a.b, a.b.c.length - 1); + if (b < a.b.c.length) { + Nkb(a.b, b, c2); + bub(a, b); + } + } + function eyb(a, b) { + ((oyb(), lyb) ? null : b.c).length == 0 && qyb(b, new zyb()); + Shb(a.a, lyb ? null : b.c, b); + } + function M5b(a, b) { + Odd(b, "Hierarchical port constraint processing", 1); + N5b(a); + P5b(a); + Qdd(b); + } + function GOb(a, b) { + var c2, d; + for (d = b.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 266); + a.b = true; + Qqb(a.e, c2); + c2.b = a; + } + } + function Owb(a, b) { + var c2, d; + c2 = 1 - b; + d = a.a[c2]; + a.a[c2] = d.a[b]; + d.a[b] = a; + a.b = true; + d.b = false; + return d; + } + function Gec(a, b) { + var c2, d; + c2 = BD(vNb(a, (Nyc(), ayc)), 8); + d = BD(vNb(b, ayc), 8); + return Kdb(c2.b, d.b); + } + function jfc(a) { + oEb.call(this); + this.b = Edb(ED(vNb(a, (Nyc(), lyc)))); + this.a = BD(vNb(a, Swc), 218); + } + function XGc(a, b, c2) { + uEc.call(this, a, b, c2); + this.a = new Lqb(); + this.b = new Lqb(); + this.d = new $Gc(this); + } + function ku(a) { + this.e = a; + this.d = new Uqb(Cv(Ec(this.e).gc())); + this.c = this.e.a; + this.b = this.e.c; + } + function BHc(a) { + this.b = a; + this.a = KC(WD, oje, 25, a + 1, 15, 1); + this.c = KC(WD, oje, 25, a, 15, 1); + this.d = 0; + } + function THc(a, b, c2) { + var d; + d = new Rkb(); + UHc(a, b, d, c2, true, true); + a.b = new BHc(d.c.length); + return d; + } + function nMc(a, b) { + var c2; + c2 = BD(Ohb(a.c, b), 458); + if (!c2) { + c2 = new uMc(); + c2.c = b; + Rhb(a.c, c2.c, c2); + } + return c2; + } + function $B(e, a) { + var b = e.a; + var c2 = 0; + for (var d in b) { + b.hasOwnProperty(d) && (a[c2++] = d); + } + return a; + } + function pRd(a) { + var b; + if (a.b == null) { + return LRd(), LRd(), KRd; + } + b = a.Lk() ? a.Kk() : a.Jk(); + return b; + } + function r$c(a) { + var b, c2; + for (c2 = new Fyd(a); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 33); + dld(b, 0); + eld(b, 0); + } + } + function HSb() { + HSb = ccb; + FSb = new Lsd(Ime); + GSb = new Lsd(Jme); + ESb = new Lsd(Kme); + DSb = new Lsd(Lme); + } + function y5b() { + y5b = ccb; + x5b = new z5b("TO_INTERNAL_LTR", 0); + w5b = new z5b("TO_INPUT_DIRECTION", 1); + } + function PUc() { + PUc = ccb; + NUc = new RUc("P1_NODE_PLACEMENT", 0); + OUc = new RUc("P2_EDGE_ROUTING", 1); + } + function Fkc() { + Fkc = ccb; + Ekc = new Gkc("START", 0); + Dkc = new Gkc("MIDDLE", 1); + Ckc = new Gkc("END", 2); + } + function I9b() { + I9b = ccb; + H9b = new Msd("edgelabelcenterednessanalysis.includelabel", (Bcb(), zcb)); + } + function Zyc(a, b) { + MAb(JAb(new YAb(null, new Kub(new Pib(a.b), 1)), new bfd(a, b)), new ffd(a, b)); + } + function $Xc() { + this.c = new jVc(0); + this.b = new jVc(Tqe); + this.d = new jVc(Sqe); + this.a = new jVc(cme); + } + function $Fc(a) { + var b, c2; + for (c2 = a.c.a.ec().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 214); + eFc(b, new oHc(b.e)); + } + } + function ZFc(a) { + var b, c2; + for (c2 = a.c.a.ec().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 214); + dFc(b, new nHc(b.f)); + } + } + function pnd(a, b) { + var c2; + c2 = a.zb; + a.zb = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, c2, a.zb)); + } + function cod(a, b) { + var c2; + c2 = a.xb; + a.xb = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, c2, a.xb)); + } + function dod(a, b) { + var c2; + c2 = a.yb; + a.yb = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 2, c2, a.yb)); + } + function Knd(a, b) { + var c2, d; + c2 = (d = new OJd(), d); + c2.n = b; + wtd((!a.s && (a.s = new cUd(t5, a, 21, 17)), a.s), c2); + } + function Qnd(a, b) { + var c2, d; + d = (c2 = new FUd(), c2); + d.n = b; + wtd((!a.s && (a.s = new cUd(t5, a, 21, 17)), a.s), d); + } + function ktb(a, b) { + var c2, d; + c2 = a.Pc(); + Klb(c2, 0, c2.length, b); + for (d = 0; d < c2.length; d++) { + a._c(d, c2[d]); + } + } + function ye(a, b) { + var c2, d, e; + uCb(b); + c2 = false; + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + c2 = c2 | a.Fc(d); + } + return c2; + } + function Bx(a) { + var b, c2, d; + b = 0; + for (d = a.Kc(); d.Ob(); ) { + c2 = d.Pb(); + b += c2 != null ? tb(c2) : 0; + b = ~~b; + } + return b; + } + function SA(a) { + var b; + if (a == 0) { + return "UTC"; + } + if (a < 0) { + a = -a; + b = "UTC+"; + } else { + b = "UTC-"; + } + return b + UA(a); + } + function Jq(a, b) { + var c2; + if (JD(b, 14)) { + c2 = BD(b, 14); + return a.Gc(c2); + } + return fr(a, BD(Qb(b), 20).Kc()); + } + function Bnc(a, b, c2) { + Cnc.call(this, b, c2); + this.d = KC(OQ, kne, 10, a.a.c.length, 0, 1); + Qkb(a.a, this.d); + } + function IMc(a) { + a.a = null; + a.e = null; + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + a.f.c = KC(SI, Uhe, 1, 0, 5, 1); + a.c = null; + } + function gKd(a, b) { + if (b) { + if (a.B == null) { + a.B = a.D; + a.D = null; + } + } else if (a.B != null) { + a.D = a.B; + a.B = null; + } + } + function Poc(a, b) { + return Edb(ED(Btb(TAb(NAb(new YAb(null, new Kub(a.c.b, 16)), new fpc(a)), b)))); + } + function Soc(a, b) { + return Edb(ED(Btb(TAb(NAb(new YAb(null, new Kub(a.c.b, 16)), new dpc(a)), b)))); + } + function Q2b(a, b) { + Odd(b, zne, 1); + MAb(LAb(new YAb(null, new Kub(a.b, 16)), new U2b()), new W2b()); + Qdd(b); + } + function SXc(a, b) { + var c2, d; + c2 = BD(hkd(a, (ZWc(), SWc)), 19); + d = BD(hkd(b, SWc), 19); + return beb(c2.a, d.a); + } + function p7c(a, b, c2) { + var d, e; + for (e = Jsb(a, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 8); + d.a += b; + d.b += c2; + } + return a; + } + function uo(a, b, c2) { + var d; + for (d = a.b[c2 & a.f]; d; d = d.b) { + if (c2 == d.a && Hb(b, d.g)) { + return d; + } + } + return null; + } + function vo(a, b, c2) { + var d; + for (d = a.c[c2 & a.f]; d; d = d.d) { + if (c2 == d.f && Hb(b, d.i)) { + return d; + } + } + return null; + } + function khb(a, b, c2) { + var d, e, f2; + d = 0; + for (e = 0; e < c2; e++) { + f2 = b[e]; + a[e] = f2 << 1 | d; + d = f2 >>> 31; + } + d != 0 && (a[c2] = d); + } + function rmb(a, b) { + mmb(); + var c2, d; + d = new Rkb(); + for (c2 = 0; c2 < a; ++c2) { + d.c[d.c.length] = b; + } + return new Yob(d); + } + function Zzb(a) { + var b; + b = Yzb(a); + if (Bbb(b.a, 0)) { + return Ltb(), Ltb(), Ktb; + } + return Ltb(), new Ptb(b.b); + } + function $zb(a) { + var b; + b = Yzb(a); + if (Bbb(b.a, 0)) { + return Ltb(), Ltb(), Ktb; + } + return Ltb(), new Ptb(b.c); + } + function uAb(a) { + var b; + b = tAb(a); + if (Bbb(b.a, 0)) { + return Utb(), Utb(), Ttb; + } + return Utb(), new Xtb(b.b); + } + function zZb(a) { + if (a.b.c.i.k == (j0b(), e0b)) { + return BD(vNb(a.b.c.i, (wtc(), $sc)), 11); + } + return a.b.c; + } + function AZb(a) { + if (a.b.d.i.k == (j0b(), e0b)) { + return BD(vNb(a.b.d.i, (wtc(), $sc)), 11); + } + return a.b.d; + } + function Vnd(a, b, c2, d, e, f2, g, h, i3, j, k, l, m) { + aod(a, b, c2, d, e, f2, g, h, i3, j, k, l, m); + MJd(a, false); + return a; + } + function tJb(a, b, c2, d, e, f2, g) { + $r.call(this, a, b); + this.d = c2; + this.e = d; + this.c = e; + this.b = f2; + this.a = Ou(g); + } + function $bb(a, b) { + typeof window === Jhe && typeof window["$gwt"] === Jhe && (window["$gwt"][a] = b); + } + function pWb(a, b) { + lWb(); + return a == hWb && b == kWb || a == kWb && b == hWb || a == jWb && b == iWb || a == iWb && b == jWb; + } + function qWb(a, b) { + lWb(); + return a == hWb && b == iWb || a == hWb && b == jWb || a == kWb && b == jWb || a == kWb && b == iWb; + } + function IJb(a, b) { + return Iy(), My(ple), $wnd.Math.abs(0 - b) <= ple || 0 == b || isNaN(0) && isNaN(b) ? 0 : a / b; + } + function Rrc() { + Orc(); + return OC(GC(PW, 1), Kie, 256, 0, [Frc, Hrc, Irc, Jrc, Krc, Lrc, Nrc, Erc, Grc, Mrc]); + } + function NKd() { + NKd = ccb; + KKd = new KPd(); + MKd = OC(GC(t5, 1), Mve, 170, 0, []); + LKd = OC(GC(n5, 1), Nve, 59, 0, []); + } + function CBc() { + CBc = ccb; + BBc = new DBc("NO", 0); + zBc = new DBc("GREEDY", 1); + ABc = new DBc("LOOK_BACK", 2); + } + function z0b() { + z0b = ccb; + w0b = new m1b(); + u0b = new h1b(); + v0b = new q1b(); + t0b = new u1b(); + x0b = new y1b(); + y0b = new C1b(); + } + function J9b(a) { + var b, c2, d; + d = 0; + for (c2 = new olb(a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 29); + b.p = d; + ++d; + } + } + function nfd(a, b) { + var c2; + c2 = sfd(a); + return mfd(new f7c(c2.c, c2.d), new f7c(c2.b, c2.a), a.rf(), b, a.Hf()); + } + function Udd(a, b) { + var c2; + if (a.b) { + return null; + } else { + c2 = Pdd(a, a.g); + Dsb(a.a, c2); + c2.i = a; + a.d = b; + return c2; + } + } + function kUc(a, b, c2) { + Odd(c2, "DFS Treeifying phase", 1); + jUc(a, b); + hUc(a, b); + a.a = null; + a.b = null; + Qdd(c2); + } + function zic(a, b, c2) { + this.g = a; + this.d = b; + this.e = c2; + this.a = new Rkb(); + xic(this); + mmb(); + Okb(this.a, null); + } + function Aud(a) { + this.i = a.gc(); + if (this.i > 0) { + this.g = this.ri(this.i + (this.i / 8 | 0) + 1); + a.Qc(this.g); + } + } + function u3d(a, b) { + k2d.call(this, D9, a, b); + this.b = this; + this.a = S6d(a.Tg(), XKd(this.e.Tg(), this.c)); + } + function Ld(a, b) { + var c2, d; + uCb(b); + for (d = b.vc().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 42); + a.zc(c2.cd(), c2.dd()); + } + } + function G2d(a, b, c2) { + var d; + for (d = c2.Kc(); d.Ob(); ) { + if (!E2d(a, b, d.Pb())) { + return false; + } + } + return true; + } + function sVd(a, b, c2, d, e) { + var f2; + if (c2) { + f2 = bLd(b.Tg(), a.c); + e = c2.gh(b, -1 - (f2 == -1 ? d : f2), null, e); + } + return e; + } + function tVd(a, b, c2, d, e) { + var f2; + if (c2) { + f2 = bLd(b.Tg(), a.c); + e = c2.ih(b, -1 - (f2 == -1 ? d : f2), null, e); + } + return e; + } + function Mgb(a) { + var b; + if (a.b == -2) { + if (a.e == 0) { + b = -1; + } else { + for (b = 0; a.a[b] == 0; b++) + ; + } + a.b = b; + } + return a.b; + } + function Z4b(a) { + switch (a.g) { + case 2: + return Ucd(), Tcd; + case 4: + return Ucd(), zcd; + default: + return a; + } + } + function $4b(a) { + switch (a.g) { + case 1: + return Ucd(), Rcd; + case 3: + return Ucd(), Acd; + default: + return a; + } + } + function nkc(a) { + var b, c2, d; + return a.j == (Ucd(), Acd) && (b = pkc(a), c2 = uqb(b, zcd), d = uqb(b, Tcd), d || d && c2); + } + function oqb(a) { + var b, c2; + b = BD(a.e && a.e(), 9); + c2 = BD(ZBb(b, b.length), 9); + return new xqb(b, c2, b.length); + } + function l7b(a, b) { + Odd(b, zne, 1); + UGb(TGb(new YGb((a$b(), new l$b(a, false, false, new T$b()))))); + Qdd(b); + } + function Fcb(a, b) { + Bcb(); + return ND(a) ? cfb(a, GD(b)) : LD(a) ? Ddb(a, ED(b)) : KD(a) ? Dcb(a, DD(b)) : a.wd(b); + } + function WZc(a, b) { + b.q = a; + a.d = $wnd.Math.max(a.d, b.r); + a.b += b.d + (a.a.c.length == 0 ? 0 : a.c); + Ekb(a.a, b); + } + function m6c(a, b) { + var c2, d, e, f2; + e = a.c; + c2 = a.c + a.b; + f2 = a.d; + d = a.d + a.a; + return b.a > e && b.a < c2 && b.b > f2 && b.b < d; + } + function Ynd(a, b, c2, d) { + JD(a.Cb, 179) && (BD(a.Cb, 179).tb = null); + pnd(a, c2); + !!b && hKd(a, b); + d && a.xk(true); + } + function Yqd(a, b) { + var c2; + c2 = BD(b, 183); + Spd(c2, "x", a.i); + Spd(c2, "y", a.j); + Spd(c2, Gte, a.g); + Spd(c2, Fte, a.f); + } + function LFc() { + LFc = ccb; + KFc = b3c(f3c(e3c(e3c(new j3c(), (qUb(), nUb), (S8b(), z8b)), oUb, p8b), pUb), y8b); + } + function dHc() { + dHc = ccb; + cHc = b3c(f3c(e3c(e3c(new j3c(), (qUb(), nUb), (S8b(), z8b)), oUb, p8b), pUb), y8b); + } + function sXc() { + sXc = ccb; + qXc = new uXc(ane, 0); + rXc = new uXc("POLAR_COORDINATE", 1); + pXc = new uXc("ID", 2); + } + function TAc() { + TAc = ccb; + QAc = new UAc("EQUALLY", 0); + RAc = new UAc(xle, 1); + SAc = new UAc("NORTH_SOUTH", 2); + } + function pAc() { + pAc = ccb; + oAc = as((kAc(), OC(GC(aX, 1), Kie, 260, 0, [iAc, dAc, gAc, eAc, fAc, cAc, hAc, jAc]))); + } + function Flc() { + Flc = ccb; + Elc = as((Alc(), OC(GC(KV, 1), Kie, 270, 0, [tlc, wlc, slc, zlc, vlc, ulc, ylc, xlc]))); + } + function e6c() { + e6c = ccb; + d6c = as((_5c(), OC(GC(f1, 1), Kie, 277, 0, [$5c, T5c, X5c, Z5c, U5c, V5c, W5c, Y5c]))); + } + function Hsd() { + Hsd = ccb; + Gsd = as((Csd(), OC(GC(O3, 1), Kie, 237, 0, [Bsd, ysd, zsd, xsd, Asd, vsd, usd, wsd]))); + } + function XNb() { + XNb = ccb; + VNb = new Msd("debugSVG", (Bcb(), false)); + WNb = new Msd("overlapsExisted", true); + } + function Xyb(a, b) { + return Ayb(new tzb(a), new vzb(b), new xzb(b), new zzb(), OC(GC(xL, 1), Kie, 132, 0, [])); + } + function hyb() { + var a; + if (!dyb) { + dyb = new gyb(); + a = new wyb(""); + uyb(a, ($xb(), Zxb)); + eyb(dyb, a); + } + return dyb; + } + function hr(a, b) { + var c2; + Qb(b); + while (a.Ob()) { + c2 = a.Pb(); + if (!QNc(BD(c2, 10))) { + return false; + } + } + return true; + } + function T3c(a, b) { + var c2; + c2 = h4c(n4c(), a); + if (c2) { + jkd(b, (Y9c(), F9c), c2); + return true; + } else { + return false; + } + } + function d3c(a, b) { + var c2; + for (c2 = 0; c2 < b.j.c.length; c2++) { + BD(B2c(a, c2), 21).Gc(BD(B2c(b, c2), 14)); + } + return a; + } + function M9b(a, b) { + var c2, d; + for (d = new olb(b.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + a.a[c2.p] = _$b(c2); + } + } + function stb(a, b) { + var c2, d; + uCb(b); + for (d = a.vc().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 42); + b.Od(c2.cd(), c2.dd()); + } + } + function cId(a, b) { + var c2; + if (JD(b, 83)) { + BD(a.c, 76).Xj(); + c2 = BD(b, 83); + IAd(a, c2); + } else { + BD(a.c, 76).Wb(b); + } + } + function Su(a) { + return JD(a, 152) ? km(BD(a, 152)) : JD(a, 131) ? BD(a, 131).a : JD(a, 54) ? new ov(a) : new dv(a); + } + function fac(a, b) { + return b < a.b.gc() ? BD(a.b.Xb(b), 10) : b == a.b.gc() ? a.a : BD(Ikb(a.e, b - a.b.gc() - 1), 10); + } + function crb(a, b) { + a.a = wbb(a.a, 1); + a.c = $wnd.Math.min(a.c, b); + a.b = $wnd.Math.max(a.b, b); + a.d = wbb(a.d, b); + } + function n3b(a, b) { + var c2; + Odd(b, "Edge and layer constraint edge reversal", 1); + c2 = m3b(a); + l3b(c2); + Qdd(b); + } + function tAd(a) { + var b; + if (a.d == null) { + ++a.e; + a.f = 0; + sAd(null); + } else { + ++a.e; + b = a.d; + a.d = null; + a.f = 0; + sAd(b); + } + } + function zbb(a) { + var b; + b = a.h; + if (b == 0) { + return a.l + a.m * Hje; + } + if (b == Fje) { + return a.l + a.m * Hje - Ije; + } + return a; + } + function aKb(a) { + $Jb(); + if (a.A.Hc((tdd(), pdd))) { + if (!a.B.Hc((Idd(), Ddd))) { + return _Jb(a); + } + } + return null; + } + function Zgb(a) { + uCb(a); + if (a.length == 0) { + throw vbb(new Oeb("Zero length BigInteger")); + } + dhb(this, a); + } + function Vb(a) { + if (!a) { + throw vbb(new Zdb("no calls to next() since the last call to remove()")); + } + } + function Cbb(a) { + if (Kje < a && a < Ije) { + return a < 0 ? $wnd.Math.ceil(a) : $wnd.Math.floor(a); + } + return zbb(fD(a)); + } + function Yyb(a, b) { + var c2, d, e; + c2 = a.c.Ee(); + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + a.a.Od(c2, d); + } + return a.b.Kb(c2); + } + function Uhd(a, b) { + var c2, d, e; + c2 = a.Jg(); + if (c2 != null && a.Mg()) { + for (d = 0, e = c2.length; d < e; ++d) { + c2[d].ui(b); + } + } + } + function f_b(a, b) { + var c2, d; + c2 = a; + d = Q_b(c2).e; + while (d) { + c2 = d; + if (c2 == b) { + return true; + } + d = Q_b(c2).e; + } + return false; + } + function lDc(a, b, c2) { + var d, e; + d = a.a.f[b.p]; + e = a.a.f[c2.p]; + if (d < e) { + return -1; + } + if (d == e) { + return 0; + } + return 1; + } + function Si(a, b, c2) { + var d, e; + e = BD(tn(a.d, b), 19); + d = BD(tn(a.b, c2), 19); + return !e || !d ? null : Mi(a, e.a, d.a); + } + function cYc(a, b) { + var c2, d; + for (d = new Fyd(a); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 33); + bld(c2, c2.i + b.b, c2.j + b.d); + } + } + function qjc(a, b) { + var c2, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 70); + Ekb(a.d, c2); + ujc(a, c2); + } + } + function pQc(a, b) { + var c2, d; + d = new Rkb(); + c2 = b; + do { + d.c[d.c.length] = c2; + c2 = BD(Ohb(a.k, c2), 17); + } while (c2); + return d; + } + function Ajd(a, b) { + var c2; + if ((a.Db & b) != 0) { + c2 = zjd(a, b); + return c2 == -1 ? a.Eb : CD(a.Eb)[c2]; + } else { + return null; + } + } + function Lnd(a, b) { + var c2, d; + c2 = (d = new hLd(), d); + c2.G = b; + !a.rb && (a.rb = new jUd(a, d5, a)); + wtd(a.rb, c2); + return c2; + } + function Mnd(a, b) { + var c2, d; + c2 = (d = new MPd(), d); + c2.G = b; + !a.rb && (a.rb = new jUd(a, d5, a)); + wtd(a.rb, c2); + return c2; + } + function Hkd(a, b) { + switch (b) { + case 1: + return !!a.n && a.n.i != 0; + case 2: + return a.k != null; + } + return dkd(a, b); + } + function gNc(a) { + switch (a.a.g) { + case 1: + return new NNc(); + case 3: + return new vQc(); + default: + return new wNc(); + } + } + function MRd(a) { + var b; + if (a.g > 1 || a.Ob()) { + ++a.a; + a.g = 0; + b = a.i; + a.Ob(); + return b; + } else { + throw vbb(new utb()); + } + } + function kNc(a) { + fNc(); + var b; + if (!Lpb(eNc, a)) { + b = new hNc(); + b.a = a; + Opb(eNc, a, b); + } + return BD(Mpb(eNc, a), 635); + } + function Rbb(a) { + var b, c2, d, e; + e = a; + d = 0; + if (e < 0) { + e += Ije; + d = Fje; + } + c2 = QD(e / Hje); + b = QD(e - c2 * Hje); + return TC(b, c2, d); + } + function Ox(a) { + var b, c2, d; + d = 0; + for (c2 = new Gqb(a.a); c2.a < c2.c.a.length; ) { + b = Fqb(c2); + a.b.Hc(b) && ++d; + } + return d; + } + function Ku(a) { + var b, c2, d; + b = 1; + for (d = a.Kc(); d.Ob(); ) { + c2 = d.Pb(); + b = 31 * b + (c2 == null ? 0 : tb(c2)); + b = ~~b; + } + return b; + } + function Zwb(a, b) { + var c2; + this.c = a; + c2 = new Rkb(); + Ewb(a, c2, b, a.b, null, false, null, false); + this.a = new Bib(c2, 0); + } + function p4d(a, b) { + this.b = a; + this.e = b; + this.d = b.j; + this.f = (Q6d(), BD(a, 66).Oj()); + this.k = S6d(b.e.Tg(), a); + } + function xwb(a, b, c2) { + this.b = (uCb(a), a); + this.d = (uCb(b), b); + this.e = (uCb(c2), c2); + this.c = this.d + ("" + this.e); + } + function xRb() { + this.a = BD(Ksd((wSb(), eSb)), 19).a; + this.c = Edb(ED(Ksd(uSb))); + this.b = Edb(ED(Ksd(qSb))); + } + function Nbd() { + Nbd = ccb; + Mbd = as((Hbd(), OC(GC(B1, 1), Kie, 93, 0, [zbd, ybd, Bbd, Gbd, Fbd, Ebd, Cbd, Dbd, Abd]))); + } + function wFb() { + wFb = ccb; + vFb = as((rFb(), OC(GC(dN, 1), Kie, 250, 0, [qFb, lFb, mFb, kFb, oFb, pFb, nFb, jFb, iFb]))); + } + function vLb() { + vLb = ccb; + uLb = new wLb("UP", 0); + rLb = new wLb(vle, 1); + sLb = new wLb(jle, 2); + tLb = new wLb(kle, 3); + } + function rTc() { + rTc = ccb; + qTc = (STc(), QTc); + pTc = new Nsd(Zqe, qTc); + oTc = ($Tc(), ZTc); + nTc = new Nsd($qe, oTc); + } + function Xrc() { + Xrc = ccb; + Vrc = new Yrc("ONE_SIDED", 0); + Wrc = new Yrc("TWO_SIDED", 1); + Urc = new Yrc("OFF", 2); + } + function TQc(a) { + a.r = new Tqb(); + a.w = new Tqb(); + a.t = new Rkb(); + a.i = new Rkb(); + a.d = new Tqb(); + a.a = new I6c(); + a.c = new Lqb(); + } + function uOc(a) { + this.n = new Rkb(); + this.e = new Psb(); + this.j = new Psb(); + this.k = new Rkb(); + this.f = new Rkb(); + this.p = a; + } + function PEc(a, b) { + if (a.c) { + QEc(a, b, true); + MAb(new YAb(null, new Kub(b, 16)), new bFc(a)); + } + QEc(a, b, false); + } + function wFc(a, b, c2) { + return a == (rGc(), qGc) ? new pFc() : Cub(b, 1) != 0 ? new iHc(c2.length) : new RGc(c2.length); + } + function tNb(a, b) { + var c2; + if (!b) { + return a; + } + c2 = b.Ve(); + c2.dc() || (!a.q ? a.q = new Nqb(c2) : Ld(a.q, c2)); + return a; + } + function Erb(a, b) { + var c2; + c2 = a.a.get(b); + if (c2 === void 0) { + ++a.d; + } else { + urb(a.a, b); + --a.c; + zpb(a.b); + } + return c2; + } + function UYb(a, b) { + var c2, d, e; + c2 = b.p - a.p; + if (c2 == 0) { + d = a.f.a * a.f.b; + e = b.f.a * b.f.b; + return Kdb(d, e); + } + return c2; + } + function XLb(a, b) { + var c2, d; + c2 = a.f.c.length; + d = b.f.c.length; + if (c2 < d) { + return -1; + } + if (c2 == d) { + return 0; + } + return 1; + } + function KZb(a) { + if (a.b.c.length != 0 && !!BD(Ikb(a.b, 0), 70).a) { + return BD(Ikb(a.b, 0), 70).a; + } + return JZb(a); + } + function Pq(a) { + var b; + if (a) { + b = a; + if (b.dc()) { + throw vbb(new utb()); + } + return b.Xb(b.gc() - 1); + } + return nr(a.Kc()); + } + function vgb(a) { + var b; + ybb(a, 0) < 0 && (a = Lbb(a)); + return b = Tbb(Obb(a, 32)), 64 - (b != 0 ? heb(b) : heb(Tbb(a)) + 32); + } + function QNc(a) { + var b; + b = BD(vNb(a, (wtc(), Hsc)), 61); + return a.k == (j0b(), e0b) && (b == (Ucd(), Tcd) || b == zcd); + } + function bZb(a, b, c2) { + var d, e; + e = BD(vNb(a, (Nyc(), jxc)), 74); + if (e) { + d = new s7c(); + o7c(d, 0, e); + q7c(d, c2); + ye(b, d); + } + } + function M_b(a, b, c2) { + var d, e, f2, g; + g = Q_b(a); + d = g.d; + e = g.c; + f2 = a.n; + b && (f2.a = f2.a - d.b - e.a); + c2 && (f2.b = f2.b - d.d - e.b); + } + function dcc(a, b) { + var c2, d; + c2 = a.j; + d = b.j; + return c2 != d ? c2.g - d.g : a.p == b.p ? 0 : c2 == (Ucd(), Acd) ? a.p - b.p : b.p - a.p; + } + function dmc(a) { + var b, c2; + bmc(a); + for (c2 = new olb(a.d); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 101); + !!b.i && cmc(b); + } + } + function lBc(a, b, c2, d, e) { + NC(a.c[b.g], c2.g, d); + NC(a.c[c2.g], b.g, d); + NC(a.b[b.g], c2.g, e); + NC(a.b[c2.g], b.g, e); + } + function G1c(a, b, c2, d) { + BD(c2.b, 65); + BD(c2.b, 65); + BD(d.b, 65); + BD(d.b, 65); + BD(d.b, 65); + Hkb(d.a, new L1c(a, b, d)); + } + function WDb(a, b) { + a.d == (ead(), aad) || a.d == dad ? BD(b.a, 57).c.Fc(BD(b.b, 57)) : BD(b.b, 57).c.Fc(BD(b.a, 57)); + } + function Gkd(a, b, c2, d) { + if (c2 == 1) { + return !a.n && (a.n = new cUd(D2, a, 1, 7)), Txd(a.n, b, d); + } + return ckd(a, b, c2, d); + } + function Gnd(a, b) { + var c2, d; + d = (c2 = new BYd(), c2); + pnd(d, b); + wtd((!a.A && (a.A = new K4d(u5, a, 7)), a.A), d); + return d; + } + function Zqd(a, b, c2) { + var d, e, f2, g; + f2 = null; + g = b; + e = Ypd(g, Jte); + d = new jrd(a, c2); + f2 = (lqd(d.a, d.b, e), e); + return f2; + } + function KJd(a) { + var b; + if (!a.a || (a.Bb & 1) == 0 && a.a.kh()) { + b = wId(a); + JD(b, 148) && (a.a = BD(b, 148)); + } + return a.a; + } + function Be(a, b) { + var c2, d; + uCb(b); + for (d = b.Kc(); d.Ob(); ) { + c2 = d.Pb(); + if (!a.Hc(c2)) { + return false; + } + } + return true; + } + function cD(a, b) { + var c2, d, e; + c2 = a.l + b.l; + d = a.m + b.m + (c2 >> 22); + e = a.h + b.h + (d >> 22); + return TC(c2 & Eje, d & Eje, e & Fje); + } + function nD(a, b) { + var c2, d, e; + c2 = a.l - b.l; + d = a.m - b.m + (c2 >> 22); + e = a.h - b.h + (d >> 22); + return TC(c2 & Eje, d & Eje, e & Fje); + } + function bdb(a) { + var b; + if (a < 128) { + b = (ddb(), cdb)[a]; + !b && (b = cdb[a] = new Xcb(a)); + return b; + } + return new Xcb(a); + } + function ubb(a) { + var b; + if (JD(a, 78)) { + return a; + } + b = a && a.__java$exception; + if (!b) { + b = new lz(a); + Sz(b); + } + return b; + } + function btd(a) { + if (JD(a, 186)) { + return BD(a, 118); + } else if (!a) { + throw vbb(new Heb(gue)); + } else { + return null; + } + } + function Zjb(a, b) { + if (b == null) { + return false; + } + while (a.a != a.b) { + if (pb(b, vkb(a))) { + return true; + } + } + return false; + } + function kib(a) { + if (a.a.Ob()) { + return true; + } + if (a.a != a.d) { + return false; + } + a.a = new orb(a.e.f); + return a.a.Ob(); + } + function Gkb(a, b) { + var c2, d; + c2 = b.Pc(); + d = c2.length; + if (d == 0) { + return false; + } + bCb(a.c, a.c.length, c2); + return true; + } + function Vyb(a, b, c2) { + var d, e; + for (e = b.vc().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 42); + a.yc(d.cd(), d.dd(), c2); + } + return a; + } + function yac(a, b) { + var c2, d; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 70); + yNb(c2, (wtc(), Ssc), b); + } + } + function FZc(a, b, c2) { + var d, e; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 33); + bld(d, d.i + b, d.j + c2); + } + } + function Nb(a, b) { + if (!a) { + throw vbb(new Wdb(hc("value already present: %s", OC(GC(SI, 1), Uhe, 1, 5, [b])))); + } + } + function mEb(a, b) { + if (!a || !b || a == b) { + return false; + } + return CDb(a.d.c, b.d.c + b.d.b) && CDb(b.d.c, a.d.c + a.d.b); + } + function xyb() { + oyb(); + if (lyb) { + return new wyb(null); + } + return fyb(hyb(), "com.google.common.base.Strings"); + } + function J2c(a, b) { + var c2; + c2 = Pu(b.a.gc()); + MAb(VAb(new YAb(null, new Kub(b, 1)), a.i), new W2c(a, c2)); + return c2; + } + function Hnd(a) { + var b, c2; + c2 = (b = new BYd(), b); + pnd(c2, "T"); + wtd((!a.d && (a.d = new K4d(u5, a, 11)), a.d), c2); + return c2; + } + function Etd(a) { + var b, c2, d, e; + b = 1; + for (c2 = 0, e = a.gc(); c2 < e; ++c2) { + d = a.ki(c2); + b = 31 * b + (d == null ? 0 : tb(d)); + } + return b; + } + function Wi(a, b, c2, d) { + var e; + Pb(b, a.e.Hd().gc()); + Pb(c2, a.c.Hd().gc()); + e = a.a[b][c2]; + NC(a.a[b], c2, d); + return e; + } + function OC(a, b, c2, d, e) { + e.gm = a; + e.hm = b; + e.im = gcb; + e.__elementTypeId$ = c2; + e.__elementTypeCategory$ = d; + return e; + } + function p6c(a, b, c2, d, e) { + i6c(); + return $wnd.Math.min(A6c(a, b, c2, d, e), A6c(c2, d, a, b, V6c(new f7c(e.a, e.b)))); + } + function gbc() { + gbc = ccb; + fbc = new ibc(ane, 0); + dbc = new ibc(Gne, 1); + ebc = new ibc(Hne, 2); + cbc = new ibc("BOTH", 3); + } + function Ajc() { + Ajc = ccb; + wjc = new Bjc(gle, 0); + xjc = new Bjc(jle, 1); + yjc = new Bjc(kle, 2); + zjc = new Bjc("TOP", 3); + } + function lWb() { + lWb = ccb; + hWb = new oWb("Q1", 0); + kWb = new oWb("Q4", 1); + iWb = new oWb("Q2", 2); + jWb = new oWb("Q3", 3); + } + function LBc() { + LBc = ccb; + JBc = new MBc("OFF", 0); + KBc = new MBc("SINGLE_EDGE", 1); + IBc = new MBc("MULTI_EDGE", 2); + } + function a1c() { + a1c = ccb; + _0c = new c1c("MINIMUM_SPANNING_TREE", 0); + $0c = new c1c("MAXIMUM_SPANNING_TREE", 1); + } + function Y1c() { + Y1c = ccb; + W1c = new k2c(); + V1c = new f2c(); + } + function URc(a) { + var b, c2, d; + b = new Psb(); + for (d = Jsb(a.d, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 188); + Dsb(b, c2.c); + } + return b; + } + function dVc(a) { + var b, c2, d, e; + e = new Rkb(); + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 33); + b = gVc(c2); + Gkb(e, b); + } + return e; + } + function xcc(a) { + var b; + PZb(a, true); + b = _ie; + wNb(a, (Nyc(), cyc)) && (b += BD(vNb(a, cyc), 19).a); + yNb(a, cyc, meb(b)); + } + function q1c(a, b, c2) { + var d; + Uhb(a.a); + Hkb(c2.i, new B1c(a)); + d = new hDb(BD(Ohb(a.a, b.b), 65)); + p1c(a, d, b); + c2.f = d; + } + function QLc(a, b) { + var c2, d; + c2 = a.c; + d = b.e[a.p]; + if (d < c2.a.c.length - 1) { + return BD(Ikb(c2.a, d + 1), 10); + } + return null; + } + function rr(a, b) { + var c2, d; + Rb(b, "predicate"); + for (d = 0; a.Ob(); d++) { + c2 = a.Pb(); + if (b.Lb(c2)) { + return d; + } + } + return -1; + } + function ZEd(a, b) { + var c2, d; + d = 0; + if (a < 64 && a <= b) { + b = b < 64 ? b : 63; + for (c2 = a; c2 <= b; c2++) { + d = Mbb(d, Nbb(1, c2)); + } + } + return d; + } + function pmb(a) { + mmb(); + var b, c2, d; + d = 0; + for (c2 = a.Kc(); c2.Ob(); ) { + b = c2.Pb(); + d = d + (b != null ? tb(b) : 0); + d = d | 0; + } + return d; + } + function etd(a) { + var b, c2; + c2 = (Fhd(), b = new rmd(), b); + !!a && wtd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), c2); + return c2; + } + function TA(a) { + var b; + b = new PA(); + b.a = a; + b.b = RA(a); + b.c = KC(ZI, nie, 2, 2, 6, 1); + b.c[0] = SA(a); + b.c[1] = SA(a); + return b; + } + function fkd(a, b) { + switch (b) { + case 0: + !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)); + a.o.c.$b(); + return; + } + Cid(a, b); + } + function jEb(a, b, c2) { + switch (c2.g) { + case 2: + a.b = b; + break; + case 1: + a.c = b; + break; + case 4: + a.d = b; + break; + case 3: + a.a = b; + } + } + function sbd(a) { + switch (a.g) { + case 1: + return obd; + case 2: + return nbd; + case 3: + return pbd; + default: + return qbd; + } + } + function Zac(a) { + switch (BD(vNb(a, (Nyc(), mxc)), 163).g) { + case 2: + case 4: + return true; + default: + return false; + } + } + function Trc() { + Trc = ccb; + Src = as((Orc(), OC(GC(PW, 1), Kie, 256, 0, [Frc, Hrc, Irc, Jrc, Krc, Lrc, Nrc, Erc, Grc, Mrc]))); + } + function Ndd() { + Ndd = ccb; + Mdd = as((Idd(), OC(GC(J1, 1), Kie, 259, 0, [Bdd, Ddd, Add, Edd, Fdd, Hdd, Gdd, Cdd, zdd]))); + } + function wUc() { + wUc = ccb; + vUc = e3c(b3c(b3c(g3c(e3c(new j3c(), (yRc(), vRc), (qSc(), pSc)), wRc), mSc), nSc), xRc, oSc); + } + function Gqc() { + Gqc = ccb; + Eqc = new Hqc(ane, 0); + Dqc = new Hqc("INCOMING_ONLY", 1); + Fqc = new Hqc("OUTGOING_ONLY", 2); + } + function rC() { + rC = ccb; + qC = { "boolean": sC, "number": tC, "string": vC, "object": uC, "function": uC, "undefined": wC }; + } + function Whb(a, b) { + mCb(a >= 0, "Negative initial capacity"); + mCb(b >= 0, "Non-positive load factor"); + Uhb(this); + } + function _Ed(a, b, c2) { + if (a >= 128) + return false; + return a < 64 ? Kbb(xbb(Nbb(1, a), c2), 0) : Kbb(xbb(Nbb(1, a - 64), b), 0); + } + function bOb(a, b) { + if (!a || !b || a == b) { + return false; + } + return Jy(a.b.c, b.b.c + b.b.b) < 0 && Jy(b.b.c, a.b.c + a.b.b) < 0; + } + function I4b(a) { + var b, c2, d; + c2 = a.n; + d = a.o; + b = a.d; + return new J6c(c2.a - b.b, c2.b - b.d, d.a + (b.b + b.c), d.b + (b.d + b.a)); + } + function $ic(a) { + var b, c2, d, e; + for (c2 = a.a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + djc(a, b, (Ucd(), Rcd)); + djc(a, b, Acd); + } + } + function Uy(a) { + var b, c2, d, e; + for (b = (a.j == null && (a.j = (Rz(), e = Qz.ce(a), Tz(e))), a.j), c2 = 0, d = b.length; c2 < d; ++c2) + ; + } + function hD(a) { + var b, c2, d; + b = ~a.l + 1 & Eje; + c2 = ~a.m + (b == 0 ? 1 : 0) & Eje; + d = ~a.h + (b == 0 && c2 == 0 ? 1 : 0) & Fje; + return TC(b, c2, d); + } + function C$c(a, b) { + var c2, d; + c2 = BD(BD(Ohb(a.g, b.a), 46).a, 65); + d = BD(BD(Ohb(a.g, b.b), 46).a, 65); + return _Nb(c2, d); + } + function xtd(a, b, c2) { + var d; + d = a.gc(); + if (b > d) + throw vbb(new Cyd(b, d)); + a.hi() && (c2 = Dtd(a, c2)); + return a.Vh(b, c2); + } + function xNb(a, b, c2) { + return c2 == null ? (!a.q && (a.q = new Lqb()), Thb(a.q, b)) : (!a.q && (a.q = new Lqb()), Rhb(a.q, b, c2)), a; + } + function yNb(a, b, c2) { + c2 == null ? (!a.q && (a.q = new Lqb()), Thb(a.q, b)) : (!a.q && (a.q = new Lqb()), Rhb(a.q, b, c2)); + return a; + } + function TQb(a) { + var b, c2; + c2 = new kRb(); + tNb(c2, a); + yNb(c2, (HSb(), FSb), a); + b = new Lqb(); + VQb(a, c2, b); + UQb(a, c2, b); + return c2; + } + function j6c(a) { + i6c(); + var b, c2, d; + c2 = KC(m1, nie, 8, 2, 0, 1); + d = 0; + for (b = 0; b < 2; b++) { + d += 0.5; + c2[b] = r6c(d, a); + } + return c2; + } + function Mic(a, b) { + var c2, d, e, f2; + c2 = false; + d = a.a[b].length; + for (f2 = 0; f2 < d - 1; f2++) { + e = f2 + 1; + c2 = c2 | Nic(a, b, f2, e); + } + return c2; + } + function nNb(a, b, c2, d, e) { + var f2, g; + for (g = c2; g <= e; g++) { + for (f2 = b; f2 <= d; f2++) { + YMb(a, f2, g) || aNb(a, f2, g, true, false); + } + } + } + function rNd(a, b) { + this.b = a; + nNd.call(this, (BD(qud(ZKd((NFd(), MFd).o), 10), 18), b.i), b.g); + this.a = (NKd(), MKd); + } + function hj(a, b) { + this.c = a; + this.d = b; + this.b = this.d / this.c.c.Hd().gc() | 0; + this.a = this.d % this.c.c.Hd().gc(); + } + function jdb() { + this.o = null; + this.k = null; + this.j = null; + this.d = null; + this.b = null; + this.n = null; + this.a = null; + } + function fB(a, b, c2) { + this.q = new $wnd.Date(); + this.q.setFullYear(a + nje, b, c2); + this.q.setHours(0, 0, 0, 0); + YA(this, 0); + } + function tAc() { + tAc = ccb; + rAc = new uAc(ane, 0); + qAc = new uAc("NODES_AND_EDGES", 1); + sAc = new uAc("PREFER_EDGES", 2); + } + function RA(a) { + var b; + if (a == 0) { + return "Etc/GMT"; + } + if (a < 0) { + a = -a; + b = "Etc/GMT-"; + } else { + b = "Etc/GMT+"; + } + return b + UA(a); + } + function geb(a) { + var b; + if (a < 0) { + return Rie; + } else if (a == 0) { + return 0; + } else { + for (b = Iie; (b & a) == 0; b >>= 1) + ; + return b; + } + } + function $C(a) { + var b, c2; + c2 = heb(a.h); + if (c2 == 32) { + b = heb(a.m); + return b == 32 ? heb(a.l) + 32 : b + 20 - 10; + } else { + return c2 - 12; + } + } + function bkb(a) { + var b; + b = a.a[a.b]; + if (b == null) { + return null; + } + NC(a.a, a.b, null); + a.b = a.b + 1 & a.a.length - 1; + return b; + } + function EDc(a) { + var b, c2; + b = a.t - a.k[a.o.p] * a.d + a.j[a.o.p] > a.f; + c2 = a.u + a.e[a.o.p] * a.d > a.f * a.s * a.d; + return b || c2; + } + function Iwb(a, b, c2) { + var d, e; + d = new exb(b, c2); + e = new fxb(); + a.b = Gwb(a, a.b, d, e); + e.b || ++a.c; + a.b.b = false; + return e.d; + } + function djc(a, b, c2) { + var d, e, f2, g; + g = CHc(b, c2); + f2 = 0; + for (e = g.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + Rhb(a.c, d, meb(f2++)); + } + } + function xVb(a) { + var b, c2; + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + b.g.c = -b.g.c - b.g.b; + } + sVb(a); + } + function XDb(a) { + var b, c2; + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + b.d.c = -b.d.c - b.d.b; + } + RDb(a); + } + function AUd(a) { + var b; + if (!a.c || (a.Bb & 1) == 0 && (a.c.Db & 64) != 0) { + b = wId(a); + JD(b, 88) && (a.c = BD(b, 26)); + } + return a.c; + } + function ZC(a) { + var b, c2, d; + b = ~a.l + 1 & Eje; + c2 = ~a.m + (b == 0 ? 1 : 0) & Eje; + d = ~a.h + (b == 0 && c2 == 0 ? 1 : 0) & Fje; + a.l = b; + a.m = c2; + a.h = d; + } + function l7c(a) { + var b, c2, d, e, f2; + b = new d7c(); + for (d = a, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + b.a += c2.a; + b.b += c2.b; + } + return b; + } + function nmb(a, b) { + mmb(); + var c2, d, e, f2, g; + g = false; + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + g = g | a.Fc(c2); + } + return g; + } + function w6c(a) { + i6c(); + var b, c2; + c2 = -17976931348623157e292; + for (b = 0; b < a.length; b++) { + a[b] > c2 && (c2 = a[b]); + } + return c2; + } + function SHc(a, b, c2) { + var d; + d = new Rkb(); + UHc(a, b, d, (Ucd(), zcd), true, false); + UHc(a, c2, d, Tcd, false, false); + return d; + } + function crd(a, b, c2) { + var d, e, f2, g; + f2 = null; + g = b; + e = Ypd(g, "labels"); + d = new Hrd(a, c2); + f2 = (Dqd(d.a, d.b, e), e); + return f2; + } + function j1d(a, b, c2, d) { + var e; + e = r1d(a, b, c2, d); + if (!e) { + e = i1d(a, c2, d); + if (!!e && !e1d(a, b, e)) { + return null; + } + } + return e; + } + function m1d(a, b, c2, d) { + var e; + e = s1d(a, b, c2, d); + if (!e) { + e = l1d(a, c2, d); + if (!!e && !e1d(a, b, e)) { + return null; + } + } + return e; + } + function Xb(a, b) { + var c2; + for (c2 = 0; c2 < a.a.a.length; c2++) { + if (!BD($lb(a.a, c2), 169).Lb(b)) { + return false; + } + } + return true; + } + function Cb(a, b, c2) { + Qb(b); + if (c2.Ob()) { + Mfb(b, Fb(c2.Pb())); + while (c2.Ob()) { + Mfb(b, a.a); + Mfb(b, Fb(c2.Pb())); + } + } + return b; + } + function qmb(a) { + mmb(); + var b, c2, d; + d = 1; + for (c2 = a.Kc(); c2.Ob(); ) { + b = c2.Pb(); + d = 31 * d + (b != null ? tb(b) : 0); + d = d | 0; + } + return d; + } + function WC(a, b, c2, d, e) { + var f2; + f2 = lD(a, b); + c2 && ZC(f2); + if (e) { + a = YC(a, b); + d ? QC = hD(a) : QC = TC(a.l, a.m, a.h); + } + return f2; + } + function Xzb(b, c2) { + var d; + try { + c2.Vd(); + } catch (a) { + a = ubb(a); + if (JD(a, 78)) { + d = a; + b.c[b.c.length] = d; + } else + throw vbb(a); + } + } + function jRb(a, b, c2) { + var d, e; + if (JD(b, 144) && !!c2) { + d = BD(b, 144); + e = c2; + return a.a[d.b][e.b] + a.a[e.b][d.b]; + } + return 0; + } + function xld(a, b) { + switch (b) { + case 7: + return !!a.e && a.e.i != 0; + case 8: + return !!a.d && a.d.i != 0; + } + return Ykd(a, b); + } + function YQb(a, b) { + switch (b.g) { + case 0: + JD(a.b, 631) || (a.b = new xRb()); + break; + case 1: + JD(a.b, 632) || (a.b = new DRb()); + } + } + function Ghe(a, b) { + while (a.g == null && !a.c ? Uud(a) : a.g == null || a.i != 0 && BD(a.g[a.i - 1], 47).Ob()) { + Ord(b, Vud(a)); + } + } + function kic(a, b, c2) { + a.g = qic(a, b, (Ucd(), zcd), a.b); + a.d = qic(a, c2, zcd, a.b); + if (a.g.c == 0 || a.d.c == 0) { + return; + } + nic(a); + } + function lic(a, b, c2) { + a.g = qic(a, b, (Ucd(), Tcd), a.j); + a.d = qic(a, c2, Tcd, a.j); + if (a.g.c == 0 || a.d.c == 0) { + return; + } + nic(a); + } + function $yc(a, b, c2) { + return !WAb(JAb(new YAb(null, new Kub(a.c, 16)), new Xxb(new dfd(b, c2)))).sd((EAb(), DAb)); + } + function KAb(a) { + var b; + Tzb(a); + b = new NBb(); + if (a.a.sd(b)) { + return Atb(), new Ftb(uCb(b.a)); + } + return Atb(), Atb(), ztb; + } + function nA(a) { + var b; + if (a.b <= 0) { + return false; + } + b = hfb("MLydhHmsSDkK", wfb(bfb(a.c, 0))); + return b > 1 || b >= 0 && a.b < 3; + } + function w7c(a) { + var b, c2, d; + b = new s7c(); + for (d = Jsb(a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 8); + St(b, 0, new g7c(c2)); + } + return b; + } + function qVb(a) { + var b, c2; + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + b.f.$b(); + } + LVb(a.b, a); + rVb(a); + } + function tb(a) { + return ND(a) ? LCb(a) : LD(a) ? Hdb(a) : KD(a) ? (uCb(a), a) ? 1231 : 1237 : ID(a) ? a.Hb() : MC(a) ? FCb(a) : rz(a); + } + function rb(a) { + return ND(a) ? ZI : LD(a) ? BI : KD(a) ? wI : ID(a) ? a.gm : MC(a) ? a.gm : a.gm || Array.isArray(a) && GC(PH, 1) || PH; + } + function j_c(a) { + switch (a.g) { + case 0: + return new Q1c(); + default: + throw vbb(new Wdb(Mre + (a.f != null ? a.f : "" + a.g))); + } + } + function S0c(a) { + switch (a.g) { + case 0: + return new k1c(); + default: + throw vbb(new Wdb(Mre + (a.f != null ? a.f : "" + a.g))); + } + } + function ekd(a, b, c2) { + switch (b) { + case 0: + !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)); + cId(a.o, c2); + return; + } + yid(a, b, c2); + } + function XRc(a, b, c2) { + this.g = a; + this.e = new d7c(); + this.f = new d7c(); + this.d = new Psb(); + this.b = new Psb(); + this.a = b; + this.c = c2; + } + function PZc(a, b, c2, d) { + this.b = new Rkb(); + this.n = new Rkb(); + this.i = d; + this.j = c2; + this.s = a; + this.t = b; + this.r = 0; + this.d = 0; + } + function nib(a) { + this.e = a; + this.d = new Irb(this.e.g); + this.a = this.d; + this.b = kib(this); + this.$modCount = a.$modCount; + } + function Pr(a) { + while (!a.d || !a.d.Ob()) { + if (!!a.b && !akb(a.b)) { + a.d = BD(fkb(a.b), 47); + } else { + return null; + } + } + return a.d; + } + function Xyc(a) { + Ekb(a.c, (Y1c(), W1c)); + if (Ky(a.a, Edb(ED(Ksd((dzc(), bzc)))))) { + return new Zed(); + } + return new _ed(a); + } + function bRc(a) { + switch (a.g) { + case 1: + return Sqe; + default: + case 2: + return 0; + case 3: + return cme; + case 4: + return Tqe; + } + } + function Ife() { + wfe(); + var a; + if (dfe) + return dfe; + a = Afe(Kfe("M", true)); + a = Bfe(Kfe("M", false), a); + dfe = a; + return dfe; + } + function Awb(a, b) { + var c2, d, e; + e = a.b; + while (e) { + c2 = a.a.ue(b, e.d); + if (c2 == 0) { + return e; + } + d = c2 < 0 ? 0 : 1; + e = e.a[d]; + } + return null; + } + function Tyb(a, b, c2) { + var d, e; + d = (Bcb(), _Pb(c2) ? true : false); + e = BD(b.xc(d), 15); + if (!e) { + e = new Rkb(); + b.zc(d, e); + } + e.Fc(c2); + } + function dYc(a, b) { + var c2, d; + c2 = BD(hkd(a, (lZc(), UYc)), 19).a; + d = BD(hkd(b, UYc), 19).a; + return c2 == d ? -1 : c2 < d ? -1 : c2 > d ? 1 : 0; + } + function NYb(a, b) { + if (OYb(a, b)) { + Rc(a.b, BD(vNb(b, (wtc(), Esc)), 21), b); + Dsb(a.a, b); + return true; + } else { + return false; + } + } + function d3b(a) { + var b, c2; + b = BD(vNb(a, (wtc(), gtc)), 10); + if (b) { + c2 = b.c; + Lkb(c2.a, b); + c2.a.c.length == 0 && Lkb(Q_b(b).b, c2); + } + } + function syb(a) { + if (lyb) { + return KC(qL, tke, 572, 0, 0, 1); + } + return BD(Qkb(a.a, KC(qL, tke, 572, a.a.c.length, 0, 1)), 842); + } + function mn(a, b, c2, d) { + Vm(); + return new wx(OC(GC(CK, 1), zie, 42, 0, [(Wj(a, b), new Wo(a, b)), (Wj(c2, d), new Wo(c2, d))])); + } + function Dnd(a, b, c2) { + var d, e; + e = (d = new SSd(), d); + $nd(e, b, c2); + wtd((!a.q && (a.q = new cUd(n5, a, 11, 10)), a.q), e); + return e; + } + function Zmd(a) { + var b, c2, d, e; + e = icb(Rmd, a); + c2 = e.length; + d = KC(ZI, nie, 2, c2, 6, 1); + for (b = 0; b < c2; ++b) { + d[b] = e[b]; + } + return d; + } + function l4c(a, b) { + var c2, d, e, f2, g; + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + g = new v4c(a); + c2.Qe(g); + q4c(g); + } + Uhb(a.f); + } + function hw(a, b) { + var c2; + if (b === a) { + return true; + } + if (JD(b, 224)) { + c2 = BD(b, 224); + return pb(a.Zb(), c2.Zb()); + } + return false; + } + function aub(a, b) { + var c2; + if (b * 2 + 1 >= a.b.c.length) { + return; + } + aub(a, 2 * b + 1); + c2 = 2 * b + 2; + c2 < a.b.c.length && aub(a, c2); + bub(a, b); + } + function Ss(a, b, c2) { + var d, e; + this.g = a; + this.c = b; + this.a = this; + this.d = this; + e = Kp(c2); + d = KC(BG, Gie, 330, e, 0, 1); + this.b = d; + } + function whb(a, b, c2) { + var d; + for (d = c2 - 1; d >= 0 && a[d] === b[d]; d--) + ; + return d < 0 ? 0 : Gbb(xbb(a[d], Yje), xbb(b[d], Yje)) ? -1 : 1; + } + function UFc(a, b) { + var c2, d; + for (d = Jsb(a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 214); + if (c2.e.length > 0) { + b.td(c2); + c2.i && _Fc(c2); + } + } + } + function nzd(a, b) { + var c2, d; + d = BD(Ajd(a.a, 4), 126); + c2 = KC($3, hve, 415, b, 0, 1); + d != null && $fb(d, 0, c2, 0, d.length); + return c2; + } + function JEd(a, b) { + var c2; + c2 = new NEd((a.f & 256) != 0, a.i, a.a, a.d, (a.f & 16) != 0, a.j, a.g, b); + a.e != null || (c2.c = a); + return c2; + } + function Dc(a, b) { + var c2, d; + for (d = a.Zb().Cc().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 14); + if (c2.Hc(b)) { + return true; + } + } + return false; + } + function oNb(a, b, c2, d, e) { + var f2, g; + for (g = c2; g <= e; g++) { + for (f2 = b; f2 <= d; f2++) { + if (YMb(a, f2, g)) { + return true; + } + } + } + return false; + } + function Tt(a, b, c2) { + var d, e, f2, g; + uCb(c2); + g = false; + f2 = a.Zc(b); + for (e = c2.Kc(); e.Ob(); ) { + d = e.Pb(); + f2.Rb(d); + g = true; + } + return g; + } + function Dv(a, b) { + var c2; + if (a === b) { + return true; + } else if (JD(b, 83)) { + c2 = BD(b, 83); + return Ax(Wm(a), c2.vc()); + } + return false; + } + function Nhb(a, b, c2) { + var d, e; + for (e = c2.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 42); + if (a.re(b, d.dd())) { + return true; + } + } + return false; + } + function Hic(a, b, c2) { + if (!a.d[b.p][c2.p]) { + Gic(a, b, c2); + a.d[b.p][c2.p] = true; + a.d[c2.p][b.p] = true; + } + return a.a[b.p][c2.p]; + } + function Itd(a, b) { + if (!a.ai() && b == null) { + throw vbb(new Wdb("The 'no null' constraint is violated")); + } + return b; + } + function $Jd(a, b) { + if (a.D == null && a.B != null) { + a.D = a.B; + a.B = null; + } + jKd(a, b == null ? null : (uCb(b), b)); + !!a.C && a.yk(null); + } + function XHc(a, b) { + var c2; + if (!a || a == b || !wNb(b, (wtc(), Psc))) { + return false; + } + c2 = BD(vNb(b, (wtc(), Psc)), 10); + return c2 != a; + } + function b4d(a) { + switch (a.i) { + case 2: { + return true; + } + case 1: { + return false; + } + case -1: { + ++a.c; + } + default: { + return a.pl(); + } + } + } + function c4d(a) { + switch (a.i) { + case -2: { + return true; + } + case -1: { + return false; + } + case 1: { + --a.c; + } + default: { + return a.ql(); + } + } + } + function Xdb(a) { + Zy.call(this, "The given string does not match the expected format for individual spacings.", a); + } + function pgd() { + pgd = ccb; + mgd = new qgd("ELK", 0); + ngd = new qgd("JSON", 1); + lgd = new qgd("DOT", 2); + ogd = new qgd("SVG", 3); + } + function pWc() { + pWc = ccb; + mWc = new rWc(ane, 0); + nWc = new rWc("RADIAL_COMPACTION", 1); + oWc = new rWc("WEDGE_COMPACTION", 2); + } + function Fyb() { + Fyb = ccb; + Cyb = new Gyb("CONCURRENT", 0); + Dyb = new Gyb("IDENTITY_FINISH", 1); + Eyb = new Gyb("UNORDERED", 2); + } + function nPb() { + nPb = ccb; + kPb = (cPb(), bPb); + jPb = new Nsd(Tle, kPb); + iPb = new Lsd(Ule); + lPb = new Lsd(Vle); + mPb = new Lsd(Wle); + } + function Occ() { + Occ = ccb; + Mcc = new Zcc(); + Ncc = new _cc(); + Lcc = new bdc(); + Kcc = new fdc(); + Jcc = new jdc(); + Icc = (uCb(Jcc), new bpb()); + } + function tBc() { + tBc = ccb; + qBc = new uBc("CONSERVATIVE", 0); + rBc = new uBc("CONSERVATIVE_SOFT", 1); + sBc = new uBc("SLOPPY", 2); + } + function Zad() { + Zad = ccb; + Xad = new q0b(15); + Wad = new Osd((Y9c(), f9c), Xad); + Yad = C9c; + Sad = s8c; + Tad = Y8c; + Vad = _8c; + Uad = $8c; + } + function o7c(a, b, c2) { + var d, e, f2; + d = new Psb(); + for (f2 = Jsb(c2, 0); f2.b != f2.d.c; ) { + e = BD(Xsb(f2), 8); + Dsb(d, new g7c(e)); + } + Tt(a, b, d); + } + function r7c(a) { + var b, c2, d; + b = 0; + d = KC(m1, nie, 8, a.b, 0, 1); + c2 = Jsb(a, 0); + while (c2.b != c2.d.c) { + d[b++] = BD(Xsb(c2), 8); + } + return d; + } + function $Pd(a) { + var b; + b = (!a.a && (a.a = new cUd(g5, a, 9, 5)), a.a); + if (b.i != 0) { + return nQd(BD(qud(b, 0), 678)); + } + return null; + } + function Ly(a, b) { + var c2; + c2 = wbb(a, b); + if (Gbb(Vbb(a, b), 0) | Ebb(Vbb(a, c2), 0)) { + return c2; + } + return wbb(rie, Vbb(Pbb(c2, 63), 1)); + } + function Yyc(a, b) { + var c2; + c2 = Ksd((dzc(), bzc)) != null && b.wg() != null ? Edb(ED(b.wg())) / Edb(ED(Ksd(bzc))) : 1; + Rhb(a.b, b, c2); + } + function le(a, b) { + var c2, d; + c2 = BD(a.d.Bc(b), 14); + if (!c2) { + return null; + } + d = a.e.hc(); + d.Gc(c2); + a.e.d -= c2.gc(); + c2.$b(); + return d; + } + function AHc(a, b) { + var c2, d; + d = a.c[b]; + if (d == 0) { + return; + } + a.c[b] = 0; + a.d -= d; + c2 = b + 1; + while (c2 < a.a.length) { + a.a[c2] -= d; + c2 += c2 & -c2; + } + } + function rwb(a) { + var b; + b = a.a.c.length; + if (b > 0) { + return _vb(b - 1, a.a.c.length), Kkb(a.a, b - 1); + } else { + throw vbb(new Jpb()); + } + } + function C2c(a, b, c2) { + if (b < 0) { + throw vbb(new qcb(ese + b)); + } + if (b < a.j.c.length) { + Nkb(a.j, b, c2); + } else { + A2c(a, b); + Ekb(a.j, c2); + } + } + function oCb(a, b, c2) { + if (a > b) { + throw vbb(new Wdb(xke + a + yke + b)); + } + if (a < 0 || b > c2) { + throw vbb(new scb(xke + a + zke + b + oke + c2)); + } + } + function j5c(a) { + if (!a.a || (a.a.i & 8) == 0) { + throw vbb(new Zdb("Enumeration class expected for layout option " + a.f)); + } + } + function vud(a) { + var b; + ++a.j; + if (a.i == 0) { + a.g = null; + } else if (a.i < a.g.length) { + b = a.g; + a.g = a.ri(a.i); + $fb(b, 0, a.g, 0, a.i); + } + } + function hkb(a, b) { + var c2, d; + c2 = a.a.length - 1; + a.c = a.c - 1 & c2; + while (b != a.c) { + d = b + 1 & c2; + NC(a.a, b, a.a[d]); + b = d; + } + NC(a.a, a.c, null); + } + function ikb(a, b) { + var c2, d; + c2 = a.a.length - 1; + while (b != a.b) { + d = b - 1 & c2; + NC(a.a, b, a.a[d]); + b = d; + } + NC(a.a, a.b, null); + a.b = a.b + 1 & c2; + } + function Fkb(a, b, c2) { + var d, e; + wCb(b, a.c.length); + d = c2.Pc(); + e = d.length; + if (e == 0) { + return false; + } + bCb(a.c, b, d); + return true; + } + function VEd(a) { + var b, c2; + if (a == null) + return null; + for (b = 0, c2 = a.length; b < c2; b++) { + if (!gFd(a[b])) + return a[b]; + } + return null; + } + function grb(a, b, c2) { + var d, e, f2, g; + for (e = c2, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + if (a.b.re(b, d.cd())) { + return d; + } + } + return null; + } + function Hlb(a) { + var b, c2, d, e, f2; + f2 = 1; + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + f2 = 31 * f2 + (b != null ? tb(b) : 0); + f2 = f2 | 0; + } + return f2; + } + function as(a) { + var b, c2, d, e, f2; + b = {}; + for (d = a, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + b[":" + (c2.f != null ? c2.f : "" + c2.g)] = c2; + } + return b; + } + function gr(a) { + var b; + Qb(a); + Mb(true, "numberToAdvance must be nonnegative"); + for (b = 0; b < 0 && Qr(a); b++) { + Rr(a); + } + return b; + } + function eDc(a) { + var b, c2, d; + d = 0; + for (c2 = new Sr(ur(a.a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + b.c.i == b.d.i || ++d; + } + return d; + } + function HZb(a, b) { + var c2, d, e; + c2 = a; + e = 0; + do { + if (c2 == b) { + return e; + } + d = c2.e; + if (!d) { + throw vbb(new Vdb()); + } + c2 = Q_b(d); + ++e; + } while (true); + } + function w$c(a, b) { + var c2, d, e; + e = b - a.f; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 443); + _Zc(c2, c2.e, c2.f + e); + } + a.f = b; + } + function aRc(a, b, c2) { + if ($wnd.Math.abs(b - a) < Rqe || $wnd.Math.abs(c2 - a) < Rqe) { + return true; + } + return b - a > Rqe ? a - c2 > Rqe : c2 - a > Rqe; + } + function pHb(a, b) { + if (!a) { + return 0; + } + if (b && !a.j) { + return 0; + } + if (JD(a, 124)) { + if (BD(a, 124).a.b == 0) { + return 0; + } + } + return a.Re(); + } + function qHb(a, b) { + if (!a) { + return 0; + } + if (b && !a.k) { + return 0; + } + if (JD(a, 124)) { + if (BD(a, 124).a.a == 0) { + return 0; + } + } + return a.Se(); + } + function fhb(a) { + Hgb(); + if (a < 0) { + if (a != -1) { + return new Tgb(-1, -a); + } + return Bgb; + } else + return a <= 10 ? Dgb[QD(a)] : new Tgb(1, a); + } + function xC(a) { + rC(); + throw vbb(new MB("Unexpected typeof result '" + a + "'; please report this bug to the GWT team")); + } + function lz(a) { + jz(); + Py(this); + Ry(this); + this.e = a; + Sy(this, a); + this.g = a == null ? Xhe : fcb(a); + this.a = ""; + this.b = a; + this.a = ""; + } + function F$c() { + this.a = new G$c(); + this.f = new I$c(this); + this.b = new K$c(this); + this.i = new M$c(this); + this.e = new O$c(this); + } + function ss() { + rs.call(this, new _rb(Cv(16))); + Xj(2, mie); + this.b = 2; + this.a = new Ms(null, null, 0, null); + As(this.a, this.a); + } + function xzc() { + xzc = ccb; + uzc = new zzc("DUMMY_NODE_OVER", 0); + vzc = new zzc("DUMMY_NODE_UNDER", 1); + wzc = new zzc("EQUAL", 2); + } + function LUb() { + LUb = ccb; + JUb = Fx(OC(GC(t12, 1), Kie, 103, 0, [(ead(), aad), bad])); + KUb = Fx(OC(GC(t12, 1), Kie, 103, 0, [dad, _9c])); + } + function VQc(a) { + return (Ucd(), Lcd).Hc(a.j) ? Edb(ED(vNb(a, (wtc(), qtc)))) : l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a])).b; + } + function DOb(a) { + var b, c2, d, e; + d = a.b.a; + for (c2 = d.a.ec().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 561); + e = new MPb(b, a.e, a.f); + Ekb(a.g, e); + } + } + function yId(a, b) { + var c2, d, e; + d = a.nk(b, null); + e = null; + if (b) { + e = (LFd(), c2 = new UQd(), c2); + NQd(e, a.r); + } + d = xId(a, e, d); + !!d && d.Fi(); + } + function VFc(a, b) { + var c2, d; + d = Cub(a.d, 1) != 0; + c2 = true; + while (c2) { + c2 = false; + c2 = b.c.Tf(b.e, d); + c2 = c2 | dGc(a, b, d, false); + d = !d; + } + $Fc(a); + } + function wZc(a, b) { + var c2, d, e; + d = false; + c2 = b.q.d; + if (b.d < a.b) { + e = ZZc(b.q, a.b); + if (b.q.d > e) { + $Zc(b.q, e); + d = c2 != b.q.d; + } + } + return d; + } + function PVc(a, b) { + var c2, d, e, f2, g, h, i3, j; + i3 = b.i; + j = b.j; + d = a.f; + e = d.i; + f2 = d.j; + g = i3 - e; + h = j - f2; + c2 = $wnd.Math.sqrt(g * g + h * h); + return c2; + } + function Rnd(a, b) { + var c2, d; + d = jid(a); + if (!d) { + c2 = (IEd(), PEd(b)); + d = new s0d(c2); + wtd(d.Vk(), a); + } + return d; + } + function Sc(a, b) { + var c2, d; + c2 = BD(a.c.Bc(b), 14); + if (!c2) { + return a.jc(); + } + d = a.hc(); + d.Gc(c2); + a.d -= c2.gc(); + c2.$b(); + return a.mc(d); + } + function j7c(a, b) { + var c2; + for (c2 = 0; c2 < b.length; c2++) { + if (a == (BCb(c2, b.length), b.charCodeAt(c2))) { + return true; + } + } + return false; + } + function E_b(a, b) { + var c2; + for (c2 = 0; c2 < b.length; c2++) { + if (a == (BCb(c2, b.length), b.charCodeAt(c2))) { + return true; + } + } + return false; + } + function hFd(a) { + var b, c2; + if (a == null) + return false; + for (b = 0, c2 = a.length; b < c2; b++) { + if (!gFd(a[b])) + return false; + } + return true; + } + function Ngb(a) { + var b; + if (a.c != 0) { + return a.c; + } + for (b = 0; b < a.a.length; b++) { + a.c = a.c * 33 + (a.a[b] & -1); + } + a.c = a.c * a.e; + return a.c; + } + function vkb(a) { + var b; + sCb(a.a != a.b); + b = a.d.a[a.a]; + mkb(a.b == a.d.c && b != null); + a.c = a.a; + a.a = a.a + 1 & a.d.a.length - 1; + return b; + } + function phe(a) { + var b; + if (!(a.c.c < 0 ? a.a >= a.c.b : a.a <= a.c.b)) { + throw vbb(new utb()); + } + b = a.a; + a.a += a.c.c; + ++a.b; + return meb(b); + } + function BWb(a) { + var b; + b = new VWb(a); + rXb(a.a, zWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [b]))); + !!b.d && Ekb(b.f, b.d); + return b.f; + } + function Z1b(a) { + var b; + b = new q_b(a.a); + tNb(b, a); + yNb(b, (wtc(), $sc), a); + b.o.a = a.g; + b.o.b = a.f; + b.n.a = a.i; + b.n.b = a.j; + return b; + } + function A9b(a, b, c2, d) { + var e, f2; + for (f2 = a.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 70); + e.n.a = b.a + (d.a - e.o.a) / 2; + e.n.b = b.b; + b.b += e.o.b + c2; + } + } + function UDb(a, b, c2) { + var d, e; + for (e = b.a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 57); + if (VDb(a, d, c2)) { + return true; + } + } + return false; + } + function JDc(a) { + var b, c2; + for (c2 = new olb(a.r); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + if (a.n[b.p] <= 0) { + return b; + } + } + return null; + } + function cVc(a) { + var b, c2, d, e; + e = new Tqb(); + for (d = new olb(a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 33); + b = fVc(c2); + ye(e, b); + } + return e; + } + function zFc(a) { + var b; + b = k3c(xFc); + BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Krc)) && e3c(b, (qUb(), nUb), (S8b(), H8b)); + return b; + } + function qKb(a, b, c2) { + var d; + d = new AJb(a, b); + Rc(a.r, b.Hf(), d); + if (c2 && !tcd(a.u)) { + d.c = new aIb(a.d); + Hkb(b.wf(), new tKb(d)); + } + } + function ybb(a, b) { + var c2; + if (Fbb(a) && Fbb(b)) { + c2 = a - b; + if (!isNaN(c2)) { + return c2; + } + } + return eD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b); + } + function bFd(a, b) { + return b < a.length && (BCb(b, a.length), a.charCodeAt(b) != 63) && (BCb(b, a.length), a.charCodeAt(b) != 35); + } + function Kic(a, b, c2, d) { + var e, f2; + a.a = b; + f2 = d ? 0 : 1; + a.f = (e = new Iic(a.c, a.a, c2, f2), new jjc(c2, a.a, e, a.e, a.b, a.c == (rGc(), pGc))); + } + function Tmd(a, b, c2) { + var d, e; + e = a.a; + a.a = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 1, e, b); + !c2 ? c2 = d : c2.Ei(d); + } + return c2; + } + function GQd(a, b, c2) { + var d, e; + e = a.b; + a.b = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 3, e, b); + !c2 ? c2 = d : c2.Ei(d); + } + return c2; + } + function IQd(a, b, c2) { + var d, e; + e = a.f; + a.f = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 0, e, b); + !c2 ? c2 = d : c2.Ei(d); + } + return c2; + } + function xid(a, b) { + var c2, d, e, f2; + f2 = (e = a ? jid(a) : null, q6d((d = b, e ? e.Xk() : null, d))); + if (f2 == b) { + c2 = jid(a); + !!c2 && c2.Xk(); + } + return f2; + } + function x6c(a, b) { + var c2, d, e; + e = 1; + c2 = a; + d = b >= 0 ? b : -b; + while (d > 0) { + if (d % 2 == 0) { + c2 *= c2; + d = d / 2 | 0; + } else { + e *= c2; + d -= 1; + } + } + return b < 0 ? 1 / e : e; + } + function y6c(a, b) { + var c2, d, e; + e = 1; + c2 = a; + d = b >= 0 ? b : -b; + while (d > 0) { + if (d % 2 == 0) { + c2 *= c2; + d = d / 2 | 0; + } else { + e *= c2; + d -= 1; + } + } + return b < 0 ? 1 / e : e; + } + function sAd(a) { + var b, c2; + if (a != null) { + for (c2 = 0; c2 < a.length; ++c2) { + b = a[c2]; + if (b) { + BD(b.g, 367); + b.i; + } + } + } + } + function YZc(a) { + var b, c2, d; + d = 0; + for (c2 = new olb(a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 187); + d = $wnd.Math.max(d, b.g); + } + return d; + } + function eGc(a) { + var b, c2, d; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 214); + b = c2.c.Rf() ? c2.f : c2.a; + !!b && mHc(b, c2.j); + } + } + function hbd() { + hbd = ccb; + fbd = new ibd("INHERIT", 0); + ebd = new ibd("INCLUDE_CHILDREN", 1); + gbd = new ibd("SEPARATE_CHILDREN", 2); + } + function Jkd(a, b) { + switch (b) { + case 1: + !a.n && (a.n = new cUd(D2, a, 1, 7)); + Uxd(a.n); + return; + case 2: + Lkd(a, null); + return; + } + fkd(a, b); + } + function Dm(a) { + var b; + switch (a.gc()) { + case 0: + return hm; + case 1: + return new my(Qb(a.Xb(0))); + default: + b = a; + return new ux(b); + } + } + function Vn(a) { + Ql(); + switch (a.gc()) { + case 0: + return yx(), xx; + case 1: + return new oy(a.Kc().Pb()); + default: + return new zx(a); + } + } + function Up(a) { + Ql(); + switch (a.c) { + case 0: + return yx(), xx; + case 1: + return new oy(qr(new Gqb(a))); + default: + return new Tp(a); + } + } + function Hv(b, c2) { + Qb(b); + try { + return b.xc(c2); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return null; + } else + throw vbb(a); + } + } + function Iv(b, c2) { + Qb(b); + try { + return b.Bc(c2); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return null; + } else + throw vbb(a); + } + } + function Ck(b, c2) { + Qb(b); + try { + return b.Hc(c2); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return false; + } else + throw vbb(a); + } + } + function Dk(b, c2) { + Qb(b); + try { + return b.Mc(c2); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return false; + } else + throw vbb(a); + } + } + function Gv(b, c2) { + Qb(b); + try { + return b._b(c2); + } catch (a) { + a = ubb(a); + if (JD(a, 205) || JD(a, 173)) { + return false; + } else + throw vbb(a); + } + } + function KXb(a, b) { + var c2; + if (a.a.c.length > 0) { + c2 = BD(Ikb(a.a, a.a.c.length - 1), 570); + if (NYb(c2, b)) { + return; + } + } + Ekb(a.a, new PYb(b)); + } + function $gc(a) { + Hgc(); + var b, c2; + b = a.d.c - a.e.c; + c2 = BD(a.g, 145); + Hkb(c2.b, new shc(b)); + Hkb(c2.c, new uhc(b)); + reb(c2.i, new whc(b)); + } + function gic(a) { + var b; + b = new Ufb(); + b.a += "VerticalSegment "; + Pfb(b, a.e); + b.a += " "; + Qfb(b, Eb(new Gb(), new olb(a.k))); + return b.a; + } + function u4c(a) { + var b; + b = BD(Wrb(a.c.c, ""), 229); + if (!b) { + b = new W3c(d4c(c4c(new e4c(), ""), "Other")); + Xrb(a.c.c, "", b); + } + return b; + } + function qnd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (name: "; + Efb(b, a.zb); + b.a += ")"; + return b.a; + } + function Jnd(a, b, c2) { + var d, e; + e = a.sb; + a.sb = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 4, e, b); + !c2 ? c2 = d : c2.Ei(d); + } + return c2; + } + function _ic(a, b) { + var c2, d, e; + c2 = 0; + for (e = V_b(a, b).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + c2 += vNb(d, (wtc(), gtc)) != null ? 1 : 0; + } + return c2; + } + function vPc(a, b, c2) { + var d, e, f2; + d = 0; + for (f2 = Jsb(a, 0); f2.b != f2.d.c; ) { + e = Edb(ED(Xsb(f2))); + if (e > c2) { + break; + } else + e >= b && ++d; + } + return d; + } + function RTd(a, b, c2) { + var d, e; + d = new pSd(a.e, 3, 13, null, (e = b.c, e ? e : (jGd(), YFd)), HLd(a, b), false); + !c2 ? c2 = d : c2.Ei(d); + return c2; + } + function STd(a, b, c2) { + var d, e; + d = new pSd(a.e, 4, 13, (e = b.c, e ? e : (jGd(), YFd)), null, HLd(a, b), false); + !c2 ? c2 = d : c2.Ei(d); + return c2; + } + function zId(a, b, c2) { + var d, e; + e = a.r; + a.r = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 8, e, a.r); + !c2 ? c2 = d : c2.Ei(d); + } + return c2; + } + function o1d(a, b) { + var c2, d; + c2 = BD(b, 676); + d = c2.vk(); + !d && c2.wk(d = JD(b, 88) ? new C1d(a, BD(b, 26)) : new O1d(a, BD(b, 148))); + return d; + } + function kud(a, b, c2) { + var d; + a.qi(a.i + 1); + d = a.oi(b, c2); + b != a.i && $fb(a.g, b, a.g, b + 1, a.i - b); + NC(a.g, b, d); + ++a.i; + a.bi(b, c2); + a.ci(); + } + function vwb(a, b) { + var c2; + if (b.a) { + c2 = b.a.a.length; + !a.a ? a.a = new Wfb(a.d) : Qfb(a.a, a.b); + Ofb(a.a, b.a, b.d.length, c2); + } + return a; + } + function __d(a, b) { + var c2, d, e, f2; + b.vi(a.a); + f2 = BD(Ajd(a.a, 8), 1936); + if (f2 != null) { + for (c2 = f2, d = 0, e = c2.length; d < e; ++d) { + null.jm(); + } + } + } + function TAb(a, b) { + var c2; + c2 = new NBb(); + if (!a.a.sd(c2)) { + Tzb(a); + return Atb(), Atb(), ztb; + } + return Atb(), new Ftb(uCb(SAb(a, c2.a, b))); + } + function CHc(a, b) { + switch (b.g) { + case 2: + case 1: + return V_b(a, b); + case 3: + case 4: + return Su(V_b(a, b)); + } + return mmb(), mmb(), jmb; + } + function pb(a, b) { + return ND(a) ? dfb(a, b) : LD(a) ? Fdb(a, b) : KD(a) ? (uCb(a), PD(a) === PD(b)) : ID(a) ? a.Fb(b) : MC(a) ? mb(a, b) : qz(a, b); + } + function r6d(a) { + return !a ? null : (a.i & 1) != 0 ? a == sbb ? wI : a == WD ? JI : a == VD ? FI : a == UD ? BI : a == XD ? MI : a == rbb ? UI : a == SD ? xI : yI : a; + } + function Fhb(a, b, c2, d, e) { + if (b == 0 || d == 0) { + return; + } + b == 1 ? e[d] = Hhb(e, c2, d, a[0]) : d == 1 ? e[b] = Hhb(e, a, b, c2[0]) : Ghb(a, c2, e, b, d); + } + function c6b(a, b) { + var c2; + if (a.c.length == 0) { + return; + } + c2 = BD(Qkb(a, KC(OQ, kne, 10, a.c.length, 0, 1)), 193); + Nlb(c2, new o6b()); + _5b(c2, b); + } + function i6b(a, b) { + var c2; + if (a.c.length == 0) { + return; + } + c2 = BD(Qkb(a, KC(OQ, kne, 10, a.c.length, 0, 1)), 193); + Nlb(c2, new t6b()); + _5b(c2, b); + } + function Ekd(a, b, c2, d) { + switch (b) { + case 1: + return !a.n && (a.n = new cUd(D2, a, 1, 7)), a.n; + case 2: + return a.k; + } + return bkd(a, b, c2, d); + } + function ead() { + ead = ccb; + cad = new iad(ole, 0); + bad = new iad(kle, 1); + aad = new iad(jle, 2); + _9c = new iad(vle, 3); + dad = new iad("UP", 4); + } + function RXb() { + RXb = ccb; + QXb = new SXb(ane, 0); + PXb = new SXb("INSIDE_PORT_SIDE_GROUPS", 1); + OXb = new SXb("FORCE_MODEL_ORDER", 2); + } + function xCb(a, b, c2) { + if (a < 0 || b > c2) { + throw vbb(new qcb(xke + a + zke + b + ", size: " + c2)); + } + if (a > b) { + throw vbb(new Wdb(xke + a + yke + b)); + } + } + function eid(a, b, c2) { + if (b < 0) { + vid(a, c2); + } else { + if (!c2.Ij()) { + throw vbb(new Wdb(ite + c2.ne() + jte)); + } + BD(c2, 66).Nj().Vj(a, a.yh(), b); + } + } + function Jlb(a, b, c2, d, e, f2, g, h) { + var i3; + i3 = c2; + while (f2 < g) { + i3 >= d || b < c2 && h.ue(a[b], a[i3]) <= 0 ? NC(e, f2++, a[b++]) : NC(e, f2++, a[i3++]); + } + } + function yZb(a, b, c2, d, e, f2) { + this.e = new Rkb(); + this.f = (KAc(), JAc); + Ekb(this.e, a); + this.d = b; + this.a = c2; + this.b = d; + this.f = e; + this.c = f2; + } + function VOd(a, b) { + var c2, d; + for (d = new Fyd(a); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 26); + if (PD(b) === PD(c2)) { + return true; + } + } + return false; + } + function uJb(a) { + qJb(); + var b, c2, d, e; + for (c2 = wJb(), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + if (Jkb(b.a, a, 0) != -1) { + return b; + } + } + return pJb; + } + function jFd(a) { + if (a >= 65 && a <= 70) { + return a - 65 + 10; + } + if (a >= 97 && a <= 102) { + return a - 97 + 10; + } + if (a >= 48 && a <= 57) { + return a - 48; + } + return 0; + } + function QHd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (source: "; + Efb(b, a.d); + b.a += ")"; + return b.a; + } + function OQd(a, b, c2) { + var d, e; + e = a.a; + a.a = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 5, e, a.a); + !c2 ? c2 = d : Qwd(c2, d); + } + return c2; + } + function BId(a, b) { + var c2; + c2 = (a.Bb & 256) != 0; + b ? a.Bb |= 256 : a.Bb &= -257; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 2, c2, b)); + } + function eLd(a, b) { + var c2; + c2 = (a.Bb & 256) != 0; + b ? a.Bb |= 256 : a.Bb &= -257; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 8, c2, b)); + } + function LPd(a, b) { + var c2; + c2 = (a.Bb & 256) != 0; + b ? a.Bb |= 256 : a.Bb &= -257; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 8, c2, b)); + } + function CId(a, b) { + var c2; + c2 = (a.Bb & 512) != 0; + b ? a.Bb |= 512 : a.Bb &= -513; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 3, c2, b)); + } + function fLd(a, b) { + var c2; + c2 = (a.Bb & 512) != 0; + b ? a.Bb |= 512 : a.Bb &= -513; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 9, c2, b)); + } + function N7d(a, b) { + var c2; + if (a.b == -1 && !!a.a) { + c2 = a.a.Gj(); + a.b = !c2 ? bLd(a.c.Tg(), a.a) : a.c.Xg(a.a.aj(), c2); + } + return a.c.Og(a.b, b); + } + function meb(a) { + var b, c2; + if (a > -129 && a < 128) { + b = a + 128; + c2 = (oeb(), neb)[b]; + !c2 && (c2 = neb[b] = new _db(a)); + return c2; + } + return new _db(a); + } + function Web(a) { + var b, c2; + if (a > -129 && a < 128) { + b = a + 128; + c2 = (Yeb(), Xeb)[b]; + !c2 && (c2 = Xeb[b] = new Qeb(a)); + return c2; + } + return new Qeb(a); + } + function L5b(a) { + var b, c2; + b = a.k; + if (b == (j0b(), e0b)) { + c2 = BD(vNb(a, (wtc(), Hsc)), 61); + return c2 == (Ucd(), Acd) || c2 == Rcd; + } + return false; + } + function i1d(a, b, c2) { + var d, e, f2; + f2 = (e = nUd(a.b, b), e); + if (f2) { + d = BD(V1d(p1d(a, f2), ""), 26); + if (d) { + return r1d(a, d, b, c2); + } + } + return null; + } + function l1d(a, b, c2) { + var d, e, f2; + f2 = (e = nUd(a.b, b), e); + if (f2) { + d = BD(V1d(p1d(a, f2), ""), 26); + if (d) { + return s1d(a, d, b, c2); + } + } + return null; + } + function cTd(a, b) { + var c2, d; + for (d = new Fyd(a); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 138); + if (PD(b) === PD(c2)) { + return true; + } + } + return false; + } + function vtd(a, b, c2) { + var d; + d = a.gc(); + if (b > d) + throw vbb(new Cyd(b, d)); + if (a.hi() && a.Hc(c2)) { + throw vbb(new Wdb(kue)); + } + a.Xh(b, c2); + } + function iqd(a, b) { + var c2; + c2 = oo(a.i, b); + if (c2 == null) { + throw vbb(new cqd("Node did not exist in input.")); + } + Yqd(b, c2); + return null; + } + function $hd(a, b) { + var c2; + c2 = YKd(a, b); + if (JD(c2, 322)) { + return BD(c2, 34); + } + throw vbb(new Wdb(ite + b + "' is not a valid attribute")); + } + function V2d(a, b, c2) { + var d, e; + e = JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 ? new s4d(b, a) : new p4d(b, a); + for (d = 0; d < c2; ++d) { + d4d(e); + } + return e; + } + function ede(a) { + var b, c2, d; + d = 0; + c2 = a.length; + for (b = 0; b < c2; b++) { + a[b] == 32 || a[b] == 13 || a[b] == 10 || a[b] == 9 || (a[d++] = a[b]); + } + return d; + } + function lYb(a) { + var b, c2, d; + b = new Rkb(); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 594); + Gkb(b, BD(c2.jf(), 14)); + } + return b; + } + function SSc(a) { + var b, c2, d; + b = BD(vNb(a, (mTc(), gTc)), 15); + for (d = b.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 188); + Dsb(c2.b.d, c2); + Dsb(c2.c.b, c2); + } + } + function b5b(a) { + switch (BD(vNb(a, (wtc(), Osc)), 303).g) { + case 1: + yNb(a, Osc, (esc(), bsc)); + break; + case 2: + yNb(a, Osc, (esc(), dsc)); + } + } + function _Fc(a) { + var b; + if (a.g) { + b = a.c.Rf() ? a.f : a.a; + bGc(b.a, a.o, true); + bGc(b.a, a.o, false); + yNb(a.o, (Nyc(), Vxc), (dcd(), Zbd)); + } + } + function loc(a) { + var b; + if (!a.a) { + throw vbb(new Zdb("Cannot offset an unassigned cut.")); + } + b = a.c - a.b; + a.b += b; + noc(a, b); + ooc(a, b); + } + function ckb(a) { + var b; + b = a.a[a.c - 1 & a.a.length - 1]; + if (b == null) { + return null; + } + a.c = a.c - 1 & a.a.length - 1; + NC(a.a, a.c, null); + return b; + } + function zGb(a) { + var b, c2; + for (c2 = a.p.a.ec().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 213); + if (b.f && a.b[b.c] < -1e-10) { + return b; + } + } + return null; + } + function bLb(a, b) { + switch (a.b.g) { + case 0: + case 1: + return b; + case 2: + case 3: + return new J6c(b.d, 0, b.a, b.b); + default: + return null; + } + } + function had(a) { + switch (a.g) { + case 2: + return bad; + case 1: + return aad; + case 4: + return _9c; + case 3: + return dad; + default: + return cad; + } + } + function Vcd(a) { + switch (a.g) { + case 1: + return Tcd; + case 2: + return Acd; + case 3: + return zcd; + case 4: + return Rcd; + default: + return Scd; + } + } + function Wcd(a) { + switch (a.g) { + case 1: + return Rcd; + case 2: + return Tcd; + case 3: + return Acd; + case 4: + return zcd; + default: + return Scd; + } + } + function Xcd(a) { + switch (a.g) { + case 1: + return zcd; + case 2: + return Rcd; + case 3: + return Tcd; + case 4: + return Acd; + default: + return Scd; + } + } + function DPc(a) { + switch (a) { + case 0: + return new OPc(); + case 1: + return new EPc(); + case 2: + return new JPc(); + default: + throw vbb(new Vdb()); + } + } + function Kdb(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + if (a == b) { + return a == 0 ? Kdb(1 / a, 1 / b) : 0; + } + return isNaN(a) ? isNaN(b) ? 0 : 1 : -1; + } + function f4b(a, b) { + Odd(b, "Sort end labels", 1); + MAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new q4b()), new s4b()), new u4b()); + Qdd(b); + } + function Wxd(a, b, c2) { + var d, e; + if (a.ej()) { + e = a.fj(); + d = sud(a, b, c2); + a.$i(a.Zi(7, meb(c2), d, b, e)); + return d; + } else { + return sud(a, b, c2); + } + } + function vAd(a, b) { + var c2, d, e; + if (a.d == null) { + ++a.e; + --a.f; + } else { + e = b.cd(); + c2 = b.Sh(); + d = (c2 & Ohe) % a.d.length; + KAd(a, d, xAd(a, d, c2, e)); + } + } + function ZId(a, b) { + var c2; + c2 = (a.Bb & zte) != 0; + b ? a.Bb |= zte : a.Bb &= -1025; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 10, c2, b)); + } + function dJd(a, b) { + var c2; + c2 = (a.Bb & Rje) != 0; + b ? a.Bb |= Rje : a.Bb &= -4097; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 12, c2, b)); + } + function eJd(a, b) { + var c2; + c2 = (a.Bb & Cve) != 0; + b ? a.Bb |= Cve : a.Bb &= -8193; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 15, c2, b)); + } + function fJd(a, b) { + var c2; + c2 = (a.Bb & Dve) != 0; + b ? a.Bb |= Dve : a.Bb &= -2049; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 11, c2, b)); + } + function jOb(a, b) { + var c2; + c2 = Kdb(a.b.c, b.b.c); + if (c2 != 0) { + return c2; + } + c2 = Kdb(a.a.a, b.a.a); + if (c2 != 0) { + return c2; + } + return Kdb(a.a.b, b.a.b); + } + function jqd(a, b) { + var c2; + c2 = Ohb(a.k, b); + if (c2 == null) { + throw vbb(new cqd("Port did not exist in input.")); + } + Yqd(b, c2); + return null; + } + function k6d(a) { + var b, c2; + for (c2 = l6d(bKd(a)).Kc(); c2.Ob(); ) { + b = GD(c2.Pb()); + if (Dmd(a, b)) { + return uFd((tFd(), sFd), b); + } + } + return null; + } + function n3d(a, b) { + var c2, d, e, f2, g; + g = S6d(a.e.Tg(), b); + f2 = 0; + c2 = BD(a.g, 119); + for (e = 0; e < a.i; ++e) { + d = c2[e]; + g.rl(d.ak()) && ++f2; + } + return f2; + } + function Vsd(a, b, c2) { + var d, e; + d = BD(b.We(a.a), 35); + e = BD(c2.We(a.a), 35); + return d != null && e != null ? Fcb(d, e) : d != null ? -1 : e != null ? 1 : 0; + } + function ved(a, b, c2) { + var d, e; + if (a.c) { + Efd(a.c, b, c2); + } else { + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + ved(d, b, c2); + } + } + } + function RUb(a, b) { + var c2, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 46); + Lkb(a.b.b, c2.b); + fVb(BD(c2.a, 189), BD(c2.b, 81)); + } + } + function tr(a) { + var b, c2; + c2 = Kfb(new Ufb(), 91); + b = true; + while (a.Ob()) { + b || (c2.a += She, c2); + b = false; + Pfb(c2, a.Pb()); + } + return (c2.a += "]", c2).a; + } + function aJd(a, b) { + var c2; + c2 = (a.Bb & oie) != 0; + b ? a.Bb |= oie : a.Bb &= -16385; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 16, c2, b)); + } + function MJd(a, b) { + var c2; + c2 = (a.Bb & ote) != 0; + b ? a.Bb |= ote : a.Bb &= -32769; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 18, c2, b)); + } + function CUd(a, b) { + var c2; + c2 = (a.Bb & ote) != 0; + b ? a.Bb |= ote : a.Bb &= -32769; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 18, c2, b)); + } + function EUd(a, b) { + var c2; + c2 = (a.Bb & Tje) != 0; + b ? a.Bb |= Tje : a.Bb &= -65537; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new qSd(a, 1, 20, c2, b)); + } + function Tee(a) { + var b; + b = KC(TD, $ie, 25, 2, 15, 1); + a -= Tje; + b[0] = (a >> 10) + Uje & aje; + b[1] = (a & 1023) + 56320 & aje; + return zfb(b, 0, b.length); + } + function a_b(a) { + var b, c2; + c2 = BD(vNb(a, (Nyc(), Lwc)), 103); + if (c2 == (ead(), cad)) { + b = Edb(ED(vNb(a, owc))); + return b >= 1 ? bad : _9c; + } + return c2; + } + function rec(a) { + switch (BD(vNb(a, (Nyc(), Swc)), 218).g) { + case 1: + return new Fmc(); + case 3: + return new wnc(); + default: + return new zmc(); + } + } + function Uzb(a) { + if (a.c) { + Uzb(a.c); + } else if (a.d) { + throw vbb(new Zdb("Stream already terminated, can't be modified or used")); + } + } + function Mkd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (identifier: "; + Efb(b, a.k); + b.a += ")"; + return b.a; + } + function ctd(a, b, c2) { + var d, e; + d = (Fhd(), e = new xkd(), e); + vkd(d, b); + wkd(d, c2); + !!a && wtd((!a.a && (a.a = new xMd(y2, a, 5)), a.a), d); + return d; + } + function ttb(a, b, c2, d) { + var e, f2; + uCb(d); + uCb(c2); + e = a.xc(b); + f2 = e == null ? c2 : Myb(BD(e, 15), BD(c2, 14)); + f2 == null ? a.Bc(b) : a.zc(b, f2); + return f2; + } + function pqb(a) { + var b, c2, d, e; + c2 = (b = BD(gdb((d = a.gm, e = d.f, e == CI ? d : e)), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + rqb(c2, a); + return c2; + } + function hDc(a, b, c2) { + var d, e; + for (e = a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + if (Be(c2, BD(Ikb(b, d.p), 14))) { + return d; + } + } + return null; + } + function Db(b, c2, d) { + var e; + try { + Cb(b, c2, d); + } catch (a) { + a = ubb(a); + if (JD(a, 597)) { + e = a; + throw vbb(new ycb(e)); + } else + throw vbb(a); + } + return c2; + } + function Qbb(a, b) { + var c2; + if (Fbb(a) && Fbb(b)) { + c2 = a - b; + if (Kje < c2 && c2 < Ije) { + return c2; + } + } + return zbb(nD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function wbb(a, b) { + var c2; + if (Fbb(a) && Fbb(b)) { + c2 = a + b; + if (Kje < c2 && c2 < Ije) { + return c2; + } + } + return zbb(cD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function Ibb(a, b) { + var c2; + if (Fbb(a) && Fbb(b)) { + c2 = a * b; + if (Kje < c2 && c2 < Ije) { + return c2; + } + } + return zbb(gD(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b)); + } + function V_b(a, b) { + var c2; + a.i || N_b(a); + c2 = BD(Mpb(a.g, b), 46); + return !c2 ? (mmb(), mmb(), jmb) : new Jib(a.j, BD(c2.a, 19).a, BD(c2.b, 19).a); + } + function Drb(a, b, c2) { + var d; + d = a.a.get(b); + a.a.set(b, c2 === void 0 ? null : c2); + if (d === void 0) { + ++a.c; + zpb(a.b); + } else { + ++a.d; + } + return d; + } + function kNb(a, b, c2) { + a.n = IC(XD, [nie, Sje], [364, 25], 14, [c2, QD($wnd.Math.ceil(b / 32))], 2); + a.o = b; + a.p = c2; + a.j = b - 1 >> 1; + a.k = c2 - 1 >> 1; + } + function Gub() { + zub(); + var a, b, c2; + c2 = yub++ + Date.now(); + a = QD($wnd.Math.floor(c2 * lke)) & nke; + b = QD(c2 - a * mke); + this.a = a ^ 1502; + this.b = b ^ kke; + } + function O_b(a) { + var b, c2, d; + b = new Rkb(); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 11); + Ekb(b, c2.b); + } + return Qb(b), new sl(b); + } + function R_b(a) { + var b, c2, d; + b = new Rkb(); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 11); + Ekb(b, c2.e); + } + return Qb(b), new sl(b); + } + function U_b(a) { + var b, c2, d; + b = new Rkb(); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 11); + Ekb(b, c2.g); + } + return Qb(b), new sl(b); + } + function n6d(a) { + var b, c2; + for (c2 = o6d(bKd(WId(a))).Kc(); c2.Ob(); ) { + b = GD(c2.Pb()); + if (Dmd(a, b)) + return FFd((EFd(), DFd), b); + } + return null; + } + function wm(a) { + var b, c2, d; + for (c2 = 0, d = a.length; c2 < d; c2++) { + if (a[c2] == null) { + throw vbb(new Heb("at index " + c2)); + } + } + b = a; + return new amb(b); + } + function wid(a, b) { + var c2; + c2 = YKd(a.Tg(), b); + if (JD(c2, 99)) { + return BD(c2, 18); + } + throw vbb(new Wdb(ite + b + "' is not a valid reference")); + } + function Tdb(a) { + var b; + b = Hcb(a); + if (b > 34028234663852886e22) { + return Pje; + } else if (b < -34028234663852886e22) { + return Qje; + } + return b; + } + function aeb(a) { + a -= a >> 1 & 1431655765; + a = (a >> 2 & 858993459) + (a & 858993459); + a = (a >> 4) + a & 252645135; + a += a >> 8; + a += a >> 16; + return a & 63; + } + function Ev(a) { + var b, c2, d, e; + b = new cq(a.Hd().gc()); + e = 0; + for (d = vr(a.Hd().Kc()); d.Ob(); ) { + c2 = d.Pb(); + bq(b, c2, meb(e++)); + } + return fn(b.a); + } + function Uyb(a, b) { + var c2, d, e; + e = new Lqb(); + for (d = b.vc().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 42); + Rhb(e, c2.cd(), Yyb(a, BD(c2.dd(), 15))); + } + return e; + } + function EZc(a, b) { + a.n.c.length == 0 && Ekb(a.n, new VZc(a.s, a.t, a.i)); + Ekb(a.b, b); + QZc(BD(Ikb(a.n, a.n.c.length - 1), 211), b); + GZc(a, b); + } + function LFb(a) { + if (a.c != a.b.b || a.i != a.g.b) { + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(a.a, a.b); + Gkb(a.a, a.g); + a.c = a.b.b; + a.i = a.g.b; + } + return a.a; + } + function Ycc(a, b) { + var c2, d, e; + e = 0; + for (d = BD(b.Kb(a), 20).Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 17); + Ccb(DD(vNb(c2, (wtc(), ltc)))) || ++e; + } + return e; + } + function efc(a, b) { + var c2, d, e; + d = tgc(b); + e = Edb(ED(pBc(d, (Nyc(), lyc)))); + c2 = $wnd.Math.max(0, e / 2 - 0.5); + cfc(b, c2, 1); + Ekb(a, new Dfc(b, c2)); + } + function Ctc() { + Ctc = ccb; + Btc = new Dtc(ane, 0); + xtc = new Dtc("FIRST", 1); + ytc = new Dtc(Gne, 2); + ztc = new Dtc("LAST", 3); + Atc = new Dtc(Hne, 4); + } + function Aad() { + Aad = ccb; + zad = new Bad(ole, 0); + xad = new Bad("POLYLINE", 1); + wad = new Bad("ORTHOGONAL", 2); + yad = new Bad("SPLINES", 3); + } + function zYc() { + zYc = ccb; + xYc = new AYc("ASPECT_RATIO_DRIVEN", 0); + yYc = new AYc("MAX_SCALE_DRIVEN", 1); + wYc = new AYc("AREA_DRIVEN", 2); + } + function Y$c() { + Y$c = ccb; + V$c = new Z$c("P1_STRUCTURE", 0); + W$c = new Z$c("P2_PROCESSING_ORDER", 1); + X$c = new Z$c("P3_EXECUTION", 2); + } + function tVc() { + tVc = ccb; + sVc = new uVc("OVERLAP_REMOVAL", 0); + qVc = new uVc("COMPACTION", 1); + rVc = new uVc("GRAPH_SIZE_CALCULATION", 2); + } + function Jy(a, b) { + Iy(); + return My(Qie), $wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b)); + } + function yOc(a, b) { + var c2, d; + c2 = Jsb(a, 0); + while (c2.b != c2.d.c) { + d = Gdb(ED(Xsb(c2))); + if (d == b) { + return; + } else if (d > b) { + Ysb(c2); + break; + } + } + Vsb(c2, b); + } + function t4c(a, b) { + var c2, d, e, f2, g; + c2 = b.f; + Xrb(a.c.d, c2, b); + if (b.g != null) { + for (e = b.g, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + Xrb(a.c.e, d, b); + } + } + } + function Ilb(a, b, c2, d) { + var e, f2, g; + for (e = b + 1; e < c2; ++e) { + for (f2 = e; f2 > b && d.ue(a[f2 - 1], a[f2]) > 0; --f2) { + g = a[f2]; + NC(a, f2, a[f2 - 1]); + NC(a, f2 - 1, g); + } + } + } + function did(a, b, c2, d) { + if (b < 0) { + uid(a, c2, d); + } else { + if (!c2.Ij()) { + throw vbb(new Wdb(ite + c2.ne() + jte)); + } + BD(c2, 66).Nj().Tj(a, a.yh(), b, d); + } + } + function xFb(a, b) { + if (b == a.d) { + return a.e; + } else if (b == a.e) { + return a.d; + } else { + throw vbb(new Wdb("Node " + b + " not part of edge " + a)); + } + } + function iEb(a, b) { + switch (b.g) { + case 2: + return a.b; + case 1: + return a.c; + case 4: + return a.d; + case 3: + return a.a; + default: + return false; + } + } + function GVb(a, b) { + switch (b.g) { + case 2: + return a.b; + case 1: + return a.c; + case 4: + return a.d; + case 3: + return a.a; + default: + return false; + } + } + function Xkd(a, b, c2, d) { + switch (b) { + case 3: + return a.f; + case 4: + return a.g; + case 5: + return a.i; + case 6: + return a.j; + } + return Ekd(a, b, c2, d); + } + function Ljc(a) { + if (a.k != (j0b(), h0b)) { + return false; + } + return FAb(new YAb(null, new Lub(new Sr(ur(U_b(a).a.Kc(), new Sq())))), new Mjc()); + } + function MEd(a) { + if (a.e == null) { + return a; + } else + !a.c && (a.c = new NEd((a.f & 256) != 0, a.i, a.a, a.d, (a.f & 16) != 0, a.j, a.g, null)); + return a.c; + } + function VC(a, b) { + if (a.h == Gje && a.m == 0 && a.l == 0) { + b && (QC = TC(0, 0, 0)); + return SC((wD(), uD)); + } + b && (QC = TC(a.l, a.m, a.h)); + return TC(0, 0, 0); + } + function fcb(a) { + var b; + if (Array.isArray(a) && a.im === gcb) { + return hdb(rb(a)) + "@" + (b = tb(a) >>> 0, b.toString(16)); + } + return a.toString(); + } + function Rpb(a) { + var b; + this.a = (b = BD(a.e && a.e(), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + this.b = KC(SI, Uhe, 1, this.a.a.length, 5, 1); + } + function _Ob(a) { + var b, c2, d; + this.a = new zsb(); + for (d = new olb(a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 14); + b = new MOb(); + GOb(b, c2); + Qqb(this.a, b); + } + } + function cKb(a) { + $Jb(); + var b, c2, d, e; + b = a.o.b; + for (d = BD(BD(Qc(a.r, (Ucd(), Rcd)), 21), 84).Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 111); + e = c2.e; + e.b += b; + } + } + function ag(a) { + var b; + if (a.b) { + ag(a.b); + if (a.b.d != a.c) { + throw vbb(new Apb()); + } + } else if (a.d.dc()) { + b = BD(a.f.c.xc(a.e), 14); + !!b && (a.d = b); + } + } + function fFd(a) { + var b; + if (a == null) + return true; + b = a.length; + return b > 0 && (BCb(b - 1, a.length), a.charCodeAt(b - 1) == 58) && !OEd(a, CEd, DEd); + } + function OEd(a, b, c2) { + var d, e; + for (d = 0, e = a.length; d < e; d++) { + if (_Ed((BCb(d, a.length), a.charCodeAt(d)), b, c2)) + return true; + } + return false; + } + function JOb(a, b) { + var c2, d; + for (d = a.e.a.ec().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 266); + if (t6c(b, c2.d) || o6c(b, c2.d)) { + return true; + } + } + return false; + } + function Q9b(a, b) { + var c2, d, e; + d = N9b(a, b); + e = d[d.length - 1] / 2; + for (c2 = 0; c2 < d.length; c2++) { + if (d[c2] >= e) { + return b.c + c2; + } + } + return b.c + b.b.gc(); + } + function NCd(a, b) { + LCd(); + var c2, d, e, f2; + d = KLd(a); + e = b; + Klb(d, 0, d.length, e); + for (c2 = 0; c2 < d.length; c2++) { + f2 = MCd(a, d[c2], c2); + c2 != f2 && Wxd(a, c2, f2); + } + } + function EHb(a, b) { + var c2, d, e, f2, g, h; + d = 0; + c2 = 0; + for (f2 = b, g = 0, h = f2.length; g < h; ++g) { + e = f2[g]; + if (e > 0) { + d += e; + ++c2; + } + } + c2 > 1 && (d += a.d * (c2 - 1)); + return d; + } + function Htd(a) { + var b, c2, d; + d = new Hfb(); + d.a += "["; + for (b = 0, c2 = a.gc(); b < c2; ) { + Efb(d, xfb(a.ki(b))); + ++b < c2 && (d.a += She, d); + } + d.a += "]"; + return d.a; + } + function fsd(a) { + var b, c2, d, e, f2; + f2 = hsd(a); + c2 = Fhe(a.c); + d = !c2; + if (d) { + e = new wB(); + cC(f2, "knownLayouters", e); + b = new qsd(e); + reb(a.c, b); + } + return f2; + } + function Ce(a, b) { + var c2, d, e; + uCb(b); + c2 = false; + for (d = new olb(a); d.a < d.c.c.length; ) { + e = mlb(d); + if (ze(b, e, false)) { + nlb(d); + c2 = true; + } + } + return c2; + } + function UGb(a) { + var b, c2, d; + d = Edb(ED(a.a.We((Y9c(), Q9c)))); + for (c2 = new olb(a.a.xf()); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 680); + XGb(a, b, d); + } + } + function MUb(a, b) { + var c2, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 46); + Ekb(a.b.b, BD(c2.b, 81)); + eVb(BD(c2.a, 189), BD(c2.b, 81)); + } + } + function XCc(a, b, c2) { + var d, e; + e = a.a.b; + for (d = e.c.length; d < c2; d++) { + Dkb(e, 0, new H1b(a.a)); + } + $_b(b, BD(Ikb(e, e.c.length - c2), 29)); + a.b[b.p] = c2; + } + function JTb(a, b, c2) { + var d; + d = c2; + !d && (d = Ydd(new Zdd(), 0)); + Odd(d, Vme, 2); + qZb(a.b, b, Udd(d, 1)); + LTb(a, b, Udd(d, 1)); + _Yb(b, Udd(d, 1)); + Qdd(d); + } + function eKc(a, b, c2, d, e) { + FJc(); + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), e.d.e - a), b), e.d)); + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), c2 - e.a.e), e.a), d)); + } + function e$c(a, b, c2, d, e, f2) { + this.a = a; + this.c = b; + this.b = c2; + this.f = d; + this.d = e; + this.e = f2; + this.c > 0 && this.b > 0 && q$c(this.c, this.b, this.a); + } + function ezc(a) { + dzc(); + this.c = Ou(OC(GC(h0, 1), Uhe, 831, 0, [Uyc])); + this.b = new Lqb(); + this.a = a; + Rhb(this.b, bzc, 1); + Hkb(czc, new Xed(this)); + } + function I2c(a, b) { + var c2; + if (a.d) { + if (Mhb(a.b, b)) { + return BD(Ohb(a.b, b), 51); + } else { + c2 = b.Kf(); + Rhb(a.b, b, c2); + return c2; + } + } else { + return b.Kf(); + } + } + function Kgb(a, b) { + var c2; + if (PD(a) === PD(b)) { + return true; + } + if (JD(b, 91)) { + c2 = BD(b, 91); + return a.e == c2.e && a.d == c2.d && Lgb(a, c2.a); + } + return false; + } + function Zcd(a) { + Ucd(); + switch (a.g) { + case 4: + return Acd; + case 1: + return zcd; + case 3: + return Rcd; + case 2: + return Tcd; + default: + return Scd; + } + } + function Ykd(a, b) { + switch (b) { + case 3: + return a.f != 0; + case 4: + return a.g != 0; + case 5: + return a.i != 0; + case 6: + return a.j != 0; + } + return Hkd(a, b); + } + function gWc(a) { + switch (a.g) { + case 0: + return new FXc(); + case 1: + return new IXc(); + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function QUc(a) { + switch (a.g) { + case 0: + return new CXc(); + case 1: + return new MXc(); + default: + throw vbb(new Wdb(Dne + (a.f != null ? a.f : "" + a.g))); + } + } + function b1c(a) { + switch (a.g) { + case 0: + return new s1c(); + case 1: + return new w1c(); + default: + throw vbb(new Wdb(Mre + (a.f != null ? a.f : "" + a.g))); + } + } + function qWc(a) { + switch (a.g) { + case 1: + return new SVc(); + case 2: + return new KVc(); + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function ryb(a) { + var b, c2; + if (a.b) { + return a.b; + } + c2 = lyb ? null : a.d; + while (c2) { + b = lyb ? null : c2.b; + if (b) { + return b; + } + c2 = lyb ? null : c2.d; + } + return $xb(), Zxb; + } + function hhb(a) { + var b, c2, d; + if (a.e == 0) { + return 0; + } + b = a.d << 5; + c2 = a.a[a.d - 1]; + if (a.e < 0) { + d = Mgb(a); + if (d == a.d - 1) { + --c2; + c2 = c2 | 0; + } + } + b -= heb(c2); + return b; + } + function bhb(a) { + var b, c2, d; + if (a < Fgb.length) { + return Fgb[a]; + } + c2 = a >> 5; + b = a & 31; + d = KC(WD, oje, 25, c2 + 1, 15, 1); + d[c2] = 1 << b; + return new Vgb(1, c2 + 1, d); + } + function O2b(a) { + var b, c2, d; + c2 = a.zg(); + if (c2) { + b = a.Ug(); + if (JD(b, 160)) { + d = O2b(BD(b, 160)); + if (d != null) { + return d + "." + c2; + } + } + return c2; + } + return null; + } + function ze(a, b, c2) { + var d, e; + for (e = a.Kc(); e.Ob(); ) { + d = e.Pb(); + if (PD(b) === PD(d) || b != null && pb(b, d)) { + c2 && e.Qb(); + return true; + } + } + return false; + } + function zvd(a, b, c2) { + var d, e; + ++a.j; + if (c2.dc()) { + return false; + } else { + for (e = c2.Kc(); e.Ob(); ) { + d = e.Pb(); + a.Hi(b, a.oi(b, d)); + ++b; + } + return true; + } + } + function yA(a, b, c2, d) { + var e, f2; + f2 = c2 - b; + if (f2 < 3) { + while (f2 < 3) { + a *= 10; + ++f2; + } + } else { + e = 1; + while (f2 > 3) { + e *= 10; + --f2; + } + a = (a + (e >> 1)) / e | 0; + } + d.i = a; + return true; + } + function XUb(a) { + LUb(); + return Bcb(), GVb(BD(a.a, 81).j, BD(a.b, 103)) || BD(a.a, 81).d.e != 0 && GVb(BD(a.a, 81).j, BD(a.b, 103)) ? true : false; + } + function s3c(a) { + p3c(); + if (BD(a.We((Y9c(), b9c)), 174).Hc((Idd(), Gdd))) { + BD(a.We(x9c), 174).Fc((rcd(), qcd)); + BD(a.We(b9c), 174).Mc(Gdd); + } + } + function Gxd(a, b) { + var c2, d; + if (!b) { + return false; + } else { + for (c2 = 0; c2 < a.i; ++c2) { + d = BD(a.g[c2], 366); + if (d.Di(b)) { + return false; + } + } + return wtd(a, b); + } + } + function pvd(a) { + var b, c2, d, e; + b = new wB(); + for (e = new Dnb(a.b.Kc()); e.b.Ob(); ) { + d = BD(e.b.Pb(), 686); + c2 = lsd(d); + uB(b, b.a.length, c2); + } + return b.a; + } + function cLb(a) { + var b; + !a.c && (a.c = new VKb()); + Okb(a.d, new jLb()); + _Kb(a); + b = UKb(a); + MAb(new YAb(null, new Kub(a.d, 16)), new CLb(a)); + return b; + } + function mKd(a) { + var b; + if ((a.Db & 64) != 0) + return qnd(a); + b = new Jfb(qnd(a)); + b.a += " (instanceClassName: "; + Efb(b, a.D); + b.a += ")"; + return b.a; + } + function Pqd(a, b) { + var c2, d, e, f2; + if (b) { + e = Xpd(b, "x"); + c2 = new bsd(a); + hmd(c2.a, (uCb(e), e)); + f2 = Xpd(b, "y"); + d = new csd(a); + imd(d.a, (uCb(f2), f2)); + } + } + function Eqd(a, b) { + var c2, d, e, f2; + if (b) { + e = Xpd(b, "x"); + c2 = new Yrd(a); + omd(c2.a, (uCb(e), e)); + f2 = Xpd(b, "y"); + d = new _rd(a); + pmd(d.a, (uCb(f2), f2)); + } + } + function bLd(a, b) { + var c2, d, e; + c2 = (a.i == null && TKd(a), a.i); + d = b.aj(); + if (d != -1) { + for (e = c2.length; d < e; ++d) { + if (c2[d] == b) { + return d; + } + } + } + return -1; + } + function tNd(a) { + var b, c2, d, e, f2; + c2 = BD(a.g, 674); + for (d = a.i - 1; d >= 0; --d) { + b = c2[d]; + for (e = 0; e < d; ++e) { + f2 = c2[e]; + if (uNd(a, b, f2)) { + tud(a, d); + break; + } + } + } + } + function jCb(b) { + var c2 = b.e; + function d(a) { + if (!a || a.length == 0) { + return ""; + } + return " " + a.join("\n "); + } + return c2 && (c2.stack || d(b[Yie])); + } + function nm(a) { + im(); + var b; + b = a.Pc(); + switch (b.length) { + case 0: + return hm; + case 1: + return new my(Qb(b[0])); + default: + return new ux(wm(b)); + } + } + function W_b(a, b) { + switch (b.g) { + case 1: + return Nq(a.j, (z0b(), u0b)); + case 2: + return Nq(a.j, (z0b(), w0b)); + default: + return mmb(), mmb(), jmb; + } + } + function $kd(a, b) { + switch (b) { + case 3: + ald(a, 0); + return; + case 4: + cld(a, 0); + return; + case 5: + dld(a, 0); + return; + case 6: + eld(a, 0); + return; + } + Jkd(a, b); + } + function dzc() { + dzc = ccb; + Vyc(); + bzc = (Nyc(), vyc); + czc = Ou(OC(GC(Q3, 1), zqe, 146, 0, [kyc, lyc, nyc, oyc, ryc, syc, tyc, uyc, xyc, zyc, myc, pyc, wyc])); + } + function Y9b(a) { + var b, c2; + b = a.d == (Apc(), vpc); + c2 = U9b(a); + b && !c2 || !b && c2 ? yNb(a.a, (Nyc(), mwc), (F7c(), D7c)) : yNb(a.a, (Nyc(), mwc), (F7c(), C7c)); + } + function XAb(a, b) { + var c2; + c2 = BD(GAb(a, Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + return c2.Qc(aBb(c2.gc())); + } + function Ded() { + Ded = ccb; + Ced = new Eed("SIMPLE", 0); + zed = new Eed("GROUP_DEC", 1); + Bed = new Eed("GROUP_MIXED", 2); + Aed = new Eed("GROUP_INC", 3); + } + function CWd() { + CWd = ccb; + AWd = new DWd(); + tWd = new GWd(); + uWd = new JWd(); + vWd = new MWd(); + wWd = new PWd(); + xWd = new SWd(); + yWd = new VWd(); + zWd = new YWd(); + BWd = new _Wd(); + } + function FHb(a, b, c2) { + tHb(); + oHb.call(this); + this.a = IC(oN, [nie, ile], [595, 212], 0, [sHb, rHb], 2); + this.c = new I6c(); + this.g = a; + this.f = b; + this.d = c2; + } + function pNb(a, b) { + this.n = IC(XD, [nie, Sje], [364, 25], 14, [b, QD($wnd.Math.ceil(a / 32))], 2); + this.o = a; + this.p = b; + this.j = a - 1 >> 1; + this.k = b - 1 >> 1; + } + function r3b(a, b) { + Odd(b, "End label post-processing", 1); + MAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new w3b()), new y3b()), new A3b()); + Qdd(b); + } + function NLc(a, b, c2) { + var d, e; + d = Edb(a.p[b.i.p]) + Edb(a.d[b.i.p]) + b.n.b + b.a.b; + e = Edb(a.p[c2.i.p]) + Edb(a.d[c2.i.p]) + c2.n.b + c2.a.b; + return e - d; + } + function xhb(a, b, c2) { + var d, e; + d = xbb(c2, Yje); + for (e = 0; ybb(d, 0) != 0 && e < b; e++) { + d = wbb(d, xbb(a[e], Yje)); + a[e] = Tbb(d); + d = Obb(d, 32); + } + return Tbb(d); + } + function $Ed(a) { + var b, c2, d, e; + e = 0; + for (c2 = 0, d = a.length; c2 < d; c2++) { + b = (BCb(c2, a.length), a.charCodeAt(c2)); + b < 64 && (e = Mbb(e, Nbb(1, b))); + } + return e; + } + function S9d(a) { + var b; + return a == null ? null : new Ygb((b = Qge(a, true), b.length > 0 && (BCb(0, b.length), b.charCodeAt(0) == 43) ? b.substr(1) : b)); + } + function T9d(a) { + var b; + return a == null ? null : new Ygb((b = Qge(a, true), b.length > 0 && (BCb(0, b.length), b.charCodeAt(0) == 43) ? b.substr(1) : b)); + } + function xud(a, b) { + var c2; + if (a.i > 0) { + if (b.length < a.i) { + c2 = izd(rb(b).c, a.i); + b = c2; + } + $fb(a.g, 0, b, 0, a.i); + } + b.length > a.i && NC(b, a.i, null); + return b; + } + function Sxd(a, b, c2) { + var d, e, f2; + if (a.ej()) { + d = a.i; + f2 = a.fj(); + kud(a, d, b); + e = a.Zi(3, null, b, d, f2); + !c2 ? c2 = e : c2.Ei(e); + } else { + kud(a, a.i, b); + } + return c2; + } + function HMd(a, b, c2) { + var d, e; + d = new pSd(a.e, 4, 10, (e = b.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)), null, HLd(a, b), false); + !c2 ? c2 = d : c2.Ei(d); + return c2; + } + function GMd(a, b, c2) { + var d, e; + d = new pSd(a.e, 3, 10, null, (e = b.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)), HLd(a, b), false); + !c2 ? c2 = d : c2.Ei(d); + return c2; + } + function _Jb(a) { + $Jb(); + var b; + b = new g7c(BD(a.e.We((Y9c(), _8c)), 8)); + if (a.B.Hc((Idd(), Bdd))) { + b.a <= 0 && (b.a = 20); + b.b <= 0 && (b.b = 20); + } + return b; + } + function Lzc(a) { + Izc(); + var b; + (!a.q ? (mmb(), mmb(), kmb) : a.q)._b((Nyc(), Cxc)) ? b = BD(vNb(a, Cxc), 197) : b = BD(vNb(Q_b(a), Dxc), 197); + return b; + } + function pBc(a, b) { + var c2, d; + d = null; + if (wNb(a, (Nyc(), qyc))) { + c2 = BD(vNb(a, qyc), 94); + c2.Xe(b) && (d = c2.We(b)); + } + d == null && (d = vNb(Q_b(a), b)); + return d; + } + function Ze(a, b) { + var c2, d, e; + if (JD(b, 42)) { + c2 = BD(b, 42); + d = c2.cd(); + e = Hv(a.Rc(), d); + return Hb(e, c2.dd()) && (e != null || a.Rc()._b(d)); + } + return false; + } + function qAd(a, b) { + var c2, d, e; + if (a.f > 0) { + a.qj(); + d = b == null ? 0 : tb(b); + e = (d & Ohe) % a.d.length; + c2 = xAd(a, e, d, b); + return c2 != -1; + } else { + return false; + } + } + function AAd(a, b) { + var c2, d, e; + if (a.f > 0) { + a.qj(); + d = b == null ? 0 : tb(b); + e = (d & Ohe) % a.d.length; + c2 = wAd(a, e, d, b); + if (c2) { + return c2.dd(); + } + } + return null; + } + function R2d(a, b) { + var c2, d, e, f2; + f2 = S6d(a.e.Tg(), b); + c2 = BD(a.g, 119); + for (e = 0; e < a.i; ++e) { + d = c2[e]; + if (f2.rl(d.ak())) { + return false; + } + } + return true; + } + function B6d(a) { + if (a.b == null) { + while (a.a.Ob()) { + a.b = a.a.Pb(); + if (!BD(a.b, 49).Zg()) { + return true; + } + } + a.b = null; + return false; + } else { + return true; + } + } + function Myd(b, c2) { + b.mj(); + try { + b.d.Vc(b.e++, c2); + b.f = b.d.j; + b.g = -1; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + } + function IA(a, b) { + GA(); + var c2, d; + c2 = LA((KA(), KA(), JA)); + d = null; + b == c2 && (d = BD(Phb(FA, a), 615)); + if (!d) { + d = new HA(a); + b == c2 && Shb(FA, a, d); + } + return d; + } + function Epb(a, b) { + var c2, d; + a.a = wbb(a.a, 1); + a.c = $wnd.Math.min(a.c, b); + a.b = $wnd.Math.max(a.b, b); + a.d += b; + c2 = b - a.f; + d = a.e + c2; + a.f = d - a.e - c2; + a.e = d; + } + function ogb(a, b) { + var c2; + a.c = b; + a.a = hhb(b); + a.a < 54 && (a.f = (c2 = b.d > 1 ? Mbb(Nbb(b.a[1], 32), xbb(b.a[0], Yje)) : xbb(b.a[0], Yje), Sbb(Ibb(b.e, c2)))); + } + function Hbb(a, b) { + var c2; + if (Fbb(a) && Fbb(b)) { + c2 = a % b; + if (Kje < c2 && c2 < Ije) { + return c2; + } + } + return zbb((UC(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b, true), QC)); + } + function p5b(a, b) { + var c2; + m5b(b); + c2 = BD(vNb(a, (Nyc(), Rwc)), 276); + !!c2 && yNb(a, Rwc, Tqc(c2)); + n5b(a.c); + n5b(a.f); + o5b(a.d); + o5b(BD(vNb(a, wxc), 207)); + } + function rHc(a) { + this.e = KC(WD, oje, 25, a.length, 15, 1); + this.c = KC(sbb, dle, 25, a.length, 16, 1); + this.b = KC(sbb, dle, 25, a.length, 16, 1); + this.f = 0; + } + function BDc(a) { + var b, c2; + a.j = KC(UD, Vje, 25, a.p.c.length, 15, 1); + for (c2 = new olb(a.p); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + a.j[b.p] = b.o.b / a.i; + } + } + function yic(a) { + var b; + if (a.c == 0) { + return; + } + b = BD(Ikb(a.a, a.b), 287); + b.b == 1 ? (++a.b, a.b < a.a.c.length && Cic(BD(Ikb(a.a, a.b), 287))) : --b.b; + --a.c; + } + function eac(a) { + var b; + b = a.a; + do { + b = BD(Rr(new Sr(ur(U_b(b).a.Kc(), new Sq()))), 17).d.i; + b.k == (j0b(), g0b) && Ekb(a.e, b); + } while (b.k == (j0b(), g0b)); + } + function idd() { + idd = ccb; + fdd = new q0b(15); + edd = new Osd((Y9c(), f9c), fdd); + hdd = new Osd(T9c, 15); + gdd = new Osd(E9c, meb(0)); + ddd = new Osd(r8c, tme); + } + function tdd() { + tdd = ccb; + rdd = new udd("PORTS", 0); + sdd = new udd("PORT_LABELS", 1); + qdd = new udd("NODE_LABELS", 2); + pdd = new udd("MINIMUM_SIZE", 3); + } + function Ree(a, b) { + var c2, d; + d = b.length; + for (c2 = 0; c2 < d; c2 += 2) + Ufe(a, (BCb(c2, b.length), b.charCodeAt(c2)), (BCb(c2 + 1, b.length), b.charCodeAt(c2 + 1))); + } + function _Zc(a, b, c2) { + var d, e, f2, g; + f2 = b - a.e; + g = c2 - a.f; + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 187); + OZc(d, d.s + f2, d.t + g); + } + a.e = b; + a.f = c2; + } + function jUc(a, b) { + var c2, d, e, f2; + f2 = b.b.b; + a.a = new Psb(); + a.b = KC(WD, oje, 25, f2, 15, 1); + c2 = 0; + for (e = Jsb(b.b, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 86); + d.g = c2++; + } + } + function ihb(a, b) { + var c2, d, e, f2; + c2 = b >> 5; + b &= 31; + e = a.d + c2 + (b == 0 ? 0 : 1); + d = KC(WD, oje, 25, e, 15, 1); + jhb(d, a.a, c2, b); + f2 = new Vgb(a.e, e, d); + Jgb(f2); + return f2; + } + function Ofe(a, b, c2) { + var d, e; + d = BD(Phb(Zee, b), 117); + e = BD(Phb($ee, b), 117); + if (c2) { + Shb(Zee, a, d); + Shb($ee, a, e); + } else { + Shb($ee, a, d); + Shb(Zee, a, e); + } + } + function Cwb(a, b, c2) { + var d, e, f2; + e = null; + f2 = a.b; + while (f2) { + d = a.a.ue(b, f2.d); + if (c2 && d == 0) { + return f2; + } + if (d >= 0) { + f2 = f2.a[1]; + } else { + e = f2; + f2 = f2.a[0]; + } + } + return e; + } + function Dwb(a, b, c2) { + var d, e, f2; + e = null; + f2 = a.b; + while (f2) { + d = a.a.ue(b, f2.d); + if (c2 && d == 0) { + return f2; + } + if (d <= 0) { + f2 = f2.a[0]; + } else { + e = f2; + f2 = f2.a[1]; + } + } + return e; + } + function Nic(a, b, c2, d) { + var e, f2, g; + e = false; + if (fjc(a.f, c2, d)) { + ijc(a.f, a.a[b][c2], a.a[b][d]); + f2 = a.a[b]; + g = f2[d]; + f2[d] = f2[c2]; + f2[c2] = g; + e = true; + } + return e; + } + function QHc(a, b, c2, d, e) { + var f2, g, h; + g = e; + while (b.b != b.c) { + f2 = BD(fkb(b), 10); + h = BD(V_b(f2, d).Xb(0), 11); + a.d[h.p] = g++; + c2.c[c2.c.length] = h; + } + return g; + } + function hBc(a, b, c2) { + var d, e, f2, g, h; + g = a.k; + h = b.k; + d = c2[g.g][h.g]; + e = ED(pBc(a, d)); + f2 = ED(pBc(b, d)); + return $wnd.Math.max((uCb(e), e), (uCb(f2), f2)); + } + function zZc(a, b, c2) { + var d, e, f2, g; + d = c2 / a.c.length; + e = 0; + for (g = new olb(a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 200); + w$c(f2, f2.f + d * e); + t$c(f2, b, d); + ++e; + } + } + function hnc(a, b, c2) { + var d, e, f2, g; + e = BD(Ohb(a.b, c2), 177); + d = 0; + for (g = new olb(b.j); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 113); + e[f2.d.p] && ++d; + } + return d; + } + function mzd(a) { + var b, c2; + b = BD(Ajd(a.a, 4), 126); + if (b != null) { + c2 = KC($3, hve, 415, b.length, 0, 1); + $fb(b, 0, c2, 0, b.length); + return c2; + } else { + return jzd; + } + } + function Cz() { + var a; + if (xz != 0) { + a = sz(); + if (a - yz > 2e3) { + yz = a; + zz = $wnd.setTimeout(Iz, 10); + } + } + if (xz++ == 0) { + Lz((Kz(), Jz)); + return true; + } + return false; + } + function wCc(a, b) { + var c2, d, e; + for (d = new Sr(ur(U_b(a).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + e = c2.d.i; + if (e.c == b) { + return false; + } + } + return true; + } + function Ek(b, c2) { + var d, e; + if (JD(c2, 245)) { + e = BD(c2, 245); + try { + d = b.vd(e); + return d == 0; + } catch (a) { + a = ubb(a); + if (!JD(a, 205)) + throw vbb(a); + } + } + return false; + } + function Xz() { + if (Error.stackTraceLimit > 0) { + $wnd.Error.stackTraceLimit = Error.stackTraceLimit = 64; + return true; + } + return "stack" in new Error(); + } + function BDb(a, b) { + return Iy(), Iy(), My(Qie), ($wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b))) > 0; + } + function DDb(a, b) { + return Iy(), Iy(), My(Qie), ($wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b))) < 0; + } + function CDb(a, b) { + return Iy(), Iy(), My(Qie), ($wnd.Math.abs(a - b) <= Qie || a == b || isNaN(a) && isNaN(b) ? 0 : a < b ? -1 : a > b ? 1 : Ny(isNaN(a), isNaN(b))) <= 0; + } + function ydb(a, b) { + var c2 = 0; + while (!b[c2] || b[c2] == "") { + c2++; + } + var d = b[c2++]; + for (; c2 < b.length; c2++) { + if (!b[c2] || b[c2] == "") { + continue; + } + d += a + b[c2]; + } + return d; + } + function zfb(a, b, c2) { + var d, e, f2, g; + f2 = b + c2; + ACb(b, f2, a.length); + g = ""; + for (e = b; e < f2; ) { + d = $wnd.Math.min(e + 1e4, f2); + g += vfb(a.slice(e, d)); + e = d; + } + return g; + } + function N9d(a) { + var b, c2, d, e, f2; + if (a == null) + return null; + f2 = new Rkb(); + for (c2 = Zmd(a), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + Ekb(f2, Qge(b, true)); + } + return f2; + } + function Q9d(a) { + var b, c2, d, e, f2; + if (a == null) + return null; + f2 = new Rkb(); + for (c2 = Zmd(a), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + Ekb(f2, Qge(b, true)); + } + return f2; + } + function R9d(a) { + var b, c2, d, e, f2; + if (a == null) + return null; + f2 = new Rkb(); + for (c2 = Zmd(a), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + Ekb(f2, Qge(b, true)); + } + return f2; + } + function ted(a, b) { + var c2, d, e; + if (a.c) { + cld(a.c, b); + } else { + c2 = b - red(a); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + ted(d, red(d) + c2); + } + } + } + function sed(a, b) { + var c2, d, e; + if (a.c) { + ald(a.c, b); + } else { + c2 = b - qed(a); + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + sed(d, qed(d) + c2); + } + } + } + function t6d(a, b) { + var c2, d, e, f2; + e = new Skb(b.gc()); + for (d = b.Kc(); d.Ob(); ) { + c2 = d.Pb(); + f2 = s6d(a, BD(c2, 56)); + !!f2 && (e.c[e.c.length] = f2, true); + } + return e; + } + function LAd(a, b) { + var c2, d, e; + a.qj(); + d = b == null ? 0 : tb(b); + e = (d & Ohe) % a.d.length; + c2 = wAd(a, e, d, b); + if (c2) { + JAd(a, c2); + return c2.dd(); + } else { + return null; + } + } + function rde(a) { + var b, c2; + c2 = sde(a); + b = null; + while (a.c == 2) { + nde(a); + if (!b) { + b = (wfe(), wfe(), new Lge(2)); + Kge(b, c2); + c2 = b; + } + c2.$l(sde(a)); + } + return c2; + } + function Wpd(a) { + var b, c2, d; + d = null; + b = Vte in a.a; + c2 = !b; + if (c2) { + throw vbb(new cqd("Every element must have an id.")); + } + d = Vpd(aC(a, Vte)); + return d; + } + function jid(a) { + var b, c2, d; + d = a.Zg(); + if (!d) { + b = 0; + for (c2 = a.eh(); c2; c2 = c2.eh()) { + if (++b > Wje) { + return c2.fh(); + } + d = c2.Zg(); + if (!!d || c2 == a) { + break; + } + } + } + return d; + } + function fvd(a) { + evd(); + if (JD(a, 156)) { + return BD(Ohb(cvd, hK), 288).vg(a); + } + if (Mhb(cvd, rb(a))) { + return BD(Ohb(cvd, rb(a)), 288).vg(a); + } + return null; + } + function fZd(a) { + if (efb(kse, a)) { + return Bcb(), Acb; + } else if (efb(lse, a)) { + return Bcb(), zcb; + } else { + throw vbb(new Wdb("Expecting true or false")); + } + } + function uDc(a, b) { + if (b.c == a) { + return b.d; + } else if (b.d == a) { + return b.c; + } + throw vbb(new Wdb("Input edge is not connected to the input port.")); + } + function Igb(a, b) { + if (a.e > b.e) { + return 1; + } + if (a.e < b.e) { + return -1; + } + if (a.d > b.d) { + return a.e; + } + if (a.d < b.d) { + return -b.e; + } + return a.e * whb(a.a, b.a, a.d); + } + function Zcb(a) { + if (a >= 48 && a < 48 + $wnd.Math.min(10, 10)) { + return a - 48; + } + if (a >= 97 && a < 97) { + return a - 97 + 10; + } + if (a >= 65 && a < 65) { + return a - 65 + 10; + } + return -1; + } + function Ue(a, b) { + var c2; + if (PD(b) === PD(a)) { + return true; + } + if (!JD(b, 21)) { + return false; + } + c2 = BD(b, 21); + if (c2.gc() != a.gc()) { + return false; + } + return a.Ic(c2); + } + function ekb(a, b) { + var c2, d, e, f2; + d = a.a.length - 1; + c2 = b - a.b & d; + f2 = a.c - b & d; + e = a.c - a.b & d; + mkb(c2 < e); + if (c2 >= f2) { + hkb(a, b); + return -1; + } else { + ikb(a, b); + return 1; + } + } + function lA(a, b) { + var c2, d; + c2 = (BCb(b, a.length), a.charCodeAt(b)); + d = b + 1; + while (d < a.length && (BCb(d, a.length), a.charCodeAt(d) == c2)) { + ++d; + } + return d - b; + } + function sJb(a) { + switch (a.g) { + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + return true; + default: + return false; + } + } + function bC(f2, a) { + var b = f2.a; + var c2; + a = String(a); + b.hasOwnProperty(a) && (c2 = b[a]); + var d = (rC(), qC)[typeof c2]; + var e = d ? d(c2) : xC(typeof c2); + return e; + } + function b3c(a, b) { + if (a.a < 0) { + throw vbb(new Zdb("Did not call before(...) or after(...) before calling add(...).")); + } + i3c(a, a.a, b); + return a; + } + function VOc(a, b, c2, d) { + var e, f2; + if (b.c.length == 0) { + return; + } + e = ROc(c2, d); + f2 = QOc(b); + MAb(VAb(new YAb(null, new Kub(f2, 1)), new cPc()), new gPc(a, c2, e, d)); + } + function Cjd(a, b, c2) { + var d; + if ((a.Db & b) != 0) { + if (c2 == null) { + Bjd(a, b); + } else { + d = zjd(a, b); + d == -1 ? a.Eb = c2 : NC(CD(a.Eb), d, c2); + } + } else + c2 != null && vjd(a, b, c2); + } + function yjd(a) { + var b, c2; + if ((a.Db & 32) == 0) { + c2 = (b = BD(Ajd(a, 16), 26), aLd(!b ? a.zh() : b) - aLd(a.zh())); + c2 != 0 && Cjd(a, 32, KC(SI, Uhe, 1, c2, 5, 1)); + } + return a; + } + function W1d(a) { + var b; + a.b || X1d(a, (b = h1d(a.e, a.a), !b || !dfb(lse, AAd((!b.b && (b.b = new sId((jGd(), fGd), x6, b)), b.b), "qualified")))); + return a.c; + } + function dTd(a, b, c2) { + var d, e, f2; + d = BD(qud(QSd(a.a), b), 87); + f2 = (e = d.c, e ? e : (jGd(), YFd)); + (f2.kh() ? xid(a.b, BD(f2, 49)) : f2) == c2 ? KQd(d) : NQd(d, c2); + return f2; + } + function fCb(a, b) { + (!b && console.groupCollapsed != null ? console.groupCollapsed : console.group != null ? console.group : console.log).call(console, a); + } + function NNb(a, b, c2, d) { + d == a ? (BD(c2.b, 65), BD(c2.b, 65), BD(d.b, 65), BD(d.b, 65).c.b) : (BD(c2.b, 65), BD(c2.b, 65), BD(d.b, 65), BD(d.b, 65).c.b); + KNb(d, b, a); + } + function EOb(a) { + var c2, d; + for (c2 = new olb(a.g); c2.a < c2.c.c.length; ) { + BD(mlb(c2), 562); + } + d = new ENb(a.g, Edb(a.a), a.c); + ELb(d); + a.g = d.b; + a.d = d.a; + } + function ymc(a, b, c2) { + b.b = $wnd.Math.max(b.b, -c2.a); + b.c = $wnd.Math.max(b.c, c2.a - a.a); + b.d = $wnd.Math.max(b.d, -c2.b); + b.a = $wnd.Math.max(b.a, c2.b - a.b); + } + function MIc(a, b) { + if (a.e < b.e) { + return -1; + } else if (a.e > b.e) { + return 1; + } else if (a.f < b.f) { + return -1; + } else if (a.f > b.f) { + return 1; + } + return tb(a) - tb(b); + } + function efb(a, b) { + uCb(a); + if (b == null) { + return false; + } + if (dfb(a, b)) { + return true; + } + return a.length == b.length && dfb(a.toLowerCase(), b.toLowerCase()); + } + function x6d(a, b) { + var c2, d, e, f2; + for (d = 0, e = b.gc(); d < e; ++d) { + c2 = b.il(d); + if (JD(c2, 99) && (BD(c2, 18).Bb & ote) != 0) { + f2 = b.jl(d); + f2 != null && s6d(a, BD(f2, 56)); + } + } + } + function p1c(a, b, c2) { + var d, e, f2; + for (f2 = new olb(c2.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 221); + d = new hDb(BD(Ohb(a.a, e.b), 65)); + Ekb(b.a, d); + p1c(a, d, e); + } + } + function Aeb(a) { + var b, c2; + if (ybb(a, -129) > 0 && ybb(a, 128) < 0) { + b = Tbb(a) + 128; + c2 = (Ceb(), Beb)[b]; + !c2 && (c2 = Beb[b] = new teb(a)); + return c2; + } + return new teb(a); + } + function _0d(a, b) { + var c2, d; + c2 = b.Hh(a.a); + if (c2) { + d = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), fue)); + if (d != null) { + return d; + } + } + return b.ne(); + } + function a1d(a, b) { + var c2, d; + c2 = b.Hh(a.a); + if (c2) { + d = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), fue)); + if (d != null) { + return d; + } + } + return b.ne(); + } + function FMc(a, b) { + wMc(); + var c2, d; + for (d = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + if (c2.d.i == b || c2.c.i == b) { + return c2; + } + } + return null; + } + function HUb(a, b, c2) { + this.c = a; + this.f = new Rkb(); + this.e = new d7c(); + this.j = new IVb(); + this.n = new IVb(); + this.b = b; + this.g = new J6c(b.c, b.d, b.b, b.a); + this.a = c2; + } + function gVb(a) { + var b, c2, d, e; + this.a = new zsb(); + this.d = new Tqb(); + this.e = 0; + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + !this.f && (this.f = b); + eVb(this, b); + } + } + function Xgb(a) { + Hgb(); + if (a.length == 0) { + this.e = 0; + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [0]); + } else { + this.e = 1; + this.d = a.length; + this.a = a; + Jgb(this); + } + } + function mIb(a, b, c2) { + oHb.call(this); + this.a = KC(oN, ile, 212, (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])).length, 0, 1); + this.b = a; + this.d = b; + this.c = c2; + } + function Kjc(a) { + this.d = new Rkb(); + this.e = new $rb(); + this.c = KC(WD, oje, 25, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 15, 1); + this.b = a; + } + function Vbc(a) { + var b, c2, d, e, f2, g; + g = BD(vNb(a, (wtc(), $sc)), 11); + yNb(g, qtc, a.i.n.b); + b = k_b(a.e); + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + RZb(c2, g); + } + } + function Wbc(a) { + var b, c2, d, e, f2, g; + c2 = BD(vNb(a, (wtc(), $sc)), 11); + yNb(c2, qtc, a.i.n.b); + b = k_b(a.g); + for (e = b, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + QZb(d, c2); + } + } + function vcc(a) { + var b, c2; + if (wNb(a.d.i, (Nyc(), Nxc))) { + b = BD(vNb(a.c.i, Nxc), 19); + c2 = BD(vNb(a.d.i, Nxc), 19); + return beb(b.a, c2.a) > 0; + } else { + return false; + } + } + function q2c(a) { + var b; + if (PD(hkd(a, (Y9c(), J8c))) === PD((hbd(), fbd))) { + if (!Xod(a)) { + jkd(a, J8c, gbd); + } else { + b = BD(hkd(Xod(a), J8c), 334); + jkd(a, J8c, b); + } + } + } + function ijc(a, b, c2) { + var d, e; + bIc(a.e, b, c2, (Ucd(), Tcd)); + bIc(a.i, b, c2, zcd); + if (a.a) { + e = BD(vNb(b, (wtc(), $sc)), 11); + d = BD(vNb(c2, $sc), 11); + cIc(a.g, e, d); + } + } + function OEc(a, b, c2) { + var d, e, f2; + d = b.c.p; + f2 = b.p; + a.b[d][f2] = new $Ec(a, b); + if (c2) { + a.a[d][f2] = new FEc(b); + e = BD(vNb(b, (wtc(), Psc)), 10); + !!e && Rc(a.d, e, b); + } + } + function TPb(a, b) { + var c2, d, e; + Ekb(PPb, a); + b.Fc(a); + c2 = BD(Ohb(OPb, a), 21); + if (c2) { + for (e = c2.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 33); + Jkb(PPb, d, 0) != -1 || TPb(d, b); + } + } + } + function tyb(a, b, c2) { + var d; + (jyb ? (ryb(a), true) : kyb ? ($xb(), true) : nyb ? ($xb(), true) : myb && ($xb(), false)) && (d = new iyb(b), d.b = c2, pyb(a, d), void 0); + } + function xKb(a, b) { + var c2; + c2 = !a.A.Hc((tdd(), sdd)) || a.q == (dcd(), $bd); + a.u.Hc((rcd(), ncd)) ? c2 ? vKb(a, b) : zKb(a, b) : a.u.Hc(pcd) && (c2 ? wKb(a, b) : AKb(a, b)); + } + function b0d(a, b) { + var c2, d; + ++a.j; + if (b != null) { + c2 = (d = a.a.Cb, JD(d, 97) ? BD(d, 97).Jg() : null); + if (xlb(b, c2)) { + Cjd(a.a, 4, c2); + return; + } + } + Cjd(a.a, 4, BD(b, 126)); + } + function dYb(a, b, c2) { + return new J6c($wnd.Math.min(a.a, b.a) - c2 / 2, $wnd.Math.min(a.b, b.b) - c2 / 2, $wnd.Math.abs(a.a - b.a) + c2, $wnd.Math.abs(a.b - b.b) + c2); + } + function k4b(a, b) { + var c2, d; + c2 = beb(a.a.c.p, b.a.c.p); + if (c2 != 0) { + return c2; + } + d = beb(a.a.d.i.p, b.a.d.i.p); + if (d != 0) { + return d; + } + return beb(b.a.d.p, a.a.d.p); + } + function _Dc(a, b, c2) { + var d, e, f2, g; + f2 = b.j; + g = c2.j; + if (f2 != g) { + return f2.g - g.g; + } else { + d = a.f[b.p]; + e = a.f[c2.p]; + return d == 0 && e == 0 ? 0 : d == 0 ? -1 : e == 0 ? 1 : Kdb(d, e); + } + } + function HFb(a, b, c2) { + var d, e, f2; + if (c2[b.d]) { + return; + } + c2[b.d] = true; + for (e = new olb(LFb(b)); e.a < e.c.c.length; ) { + d = BD(mlb(e), 213); + f2 = xFb(d, b); + HFb(a, f2, c2); + } + } + function umc(a, b, c2) { + var d; + d = c2[a.g][b]; + switch (a.g) { + case 1: + case 3: + return new f7c(0, d); + case 2: + case 4: + return new f7c(d, 0); + default: + return null; + } + } + function r2c(b, c2, d) { + var e, f2; + f2 = BD(hgd(c2.f), 209); + try { + f2.Ze(b, d); + igd(c2.f, f2); + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + e = a; + throw vbb(e); + } else + throw vbb(a); + } + } + function Vqd(a, b, c2) { + var d, e, f2, g, h, i3; + d = null; + h = k4c(n4c(), b); + f2 = null; + if (h) { + e = null; + i3 = o5c(h, c2); + g = null; + i3 != null && (g = a.Ye(h, i3)); + e = g; + f2 = e; + } + d = f2; + return d; + } + function TTd(a, b, c2, d) { + var e, f2, g; + e = new pSd(a.e, 1, 13, (g = b.c, g ? g : (jGd(), YFd)), (f2 = c2.c, f2 ? f2 : (jGd(), YFd)), HLd(a, b), false); + !d ? d = e : d.Ei(e); + return d; + } + function UEd(a, b, c2, d) { + var e; + e = a.length; + if (b >= e) + return e; + for (b = b > 0 ? b : 0; b < e; b++) { + if (_Ed((BCb(b, a.length), a.charCodeAt(b)), c2, d)) + break; + } + return b; + } + function Qkb(a, b) { + var c2, d; + d = a.c.length; + b.length < d && (b = eCb(new Array(d), b)); + for (c2 = 0; c2 < d; ++c2) { + NC(b, c2, a.c[c2]); + } + b.length > d && NC(b, d, null); + return b; + } + function _lb(a, b) { + var c2, d; + d = a.a.length; + b.length < d && (b = eCb(new Array(d), b)); + for (c2 = 0; c2 < d; ++c2) { + NC(b, c2, a.a[c2]); + } + b.length > d && NC(b, d, null); + return b; + } + function Xrb(a, b, c2) { + var d, e, f2; + e = BD(Ohb(a.e, b), 387); + if (!e) { + d = new lsb(a, b, c2); + Rhb(a.e, b, d); + isb(d); + return null; + } else { + f2 = ijb(e, c2); + Yrb(a, e); + return f2; + } + } + function P9d(a) { + var b; + if (a == null) + return null; + b = ide(Qge(a, true)); + if (b == null) { + throw vbb(new n8d("Invalid hexBinary value: '" + a + "'")); + } + return b; + } + function ghb(a) { + Hgb(); + if (ybb(a, 0) < 0) { + if (ybb(a, -1) != 0) { + return new Wgb(-1, Jbb(a)); + } + return Bgb; + } else + return ybb(a, 10) <= 0 ? Dgb[Tbb(a)] : new Wgb(1, a); + } + function wJb() { + qJb(); + return OC(GC(DN, 1), Kie, 159, 0, [nJb, mJb, oJb, eJb, dJb, fJb, iJb, hJb, gJb, lJb, kJb, jJb, bJb, aJb, cJb, $Ib, ZIb, _Ib, XIb, WIb, YIb, pJb]); + } + function vjc(a) { + var b; + this.d = new Rkb(); + this.j = new d7c(); + this.g = new d7c(); + b = a.g.b; + this.f = BD(vNb(Q_b(b), (Nyc(), Lwc)), 103); + this.e = Edb(ED(c_b(b, ryc))); + } + function Pjc(a) { + this.b = new Rkb(); + this.e = new Rkb(); + this.d = a; + this.a = !WAb(JAb(new YAb(null, new Lub(new b1b(a.b))), new Xxb(new Qjc()))).sd((EAb(), DAb)); + } + function N5c() { + N5c = ccb; + L5c = new O5c("PARENTS", 0); + K5c = new O5c("NODES", 1); + I5c = new O5c("EDGES", 2); + M5c = new O5c("PORTS", 3); + J5c = new O5c("LABELS", 4); + } + function Tbd() { + Tbd = ccb; + Qbd = new Ubd("DISTRIBUTED", 0); + Sbd = new Ubd("JUSTIFIED", 1); + Obd = new Ubd("BEGIN", 2); + Pbd = new Ubd(gle, 3); + Rbd = new Ubd("END", 4); + } + function UMd(a) { + var b; + b = a.yi(null); + switch (b) { + case 10: + return 0; + case 15: + return 1; + case 14: + return 2; + case 11: + return 3; + case 21: + return 4; + } + return -1; + } + function cYb(a) { + switch (a.g) { + case 1: + return ead(), dad; + case 4: + return ead(), aad; + case 2: + return ead(), bad; + case 3: + return ead(), _9c; + } + return ead(), cad; + } + function kA(a, b, c2) { + var d; + d = c2.q.getFullYear() - nje + nje; + d < 0 && (d = -d); + switch (b) { + case 1: + a.a += d; + break; + case 2: + EA(a, d % 100, 2); + break; + default: + EA(a, d, b); + } + } + function Jsb(a, b) { + var c2, d; + wCb(b, a.b); + if (b >= a.b >> 1) { + d = a.c; + for (c2 = a.b; c2 > b; --c2) { + d = d.b; + } + } else { + d = a.a.a; + for (c2 = 0; c2 < b; ++c2) { + d = d.a; + } + } + return new $sb(a, b, d); + } + function MEb() { + MEb = ccb; + LEb = new NEb("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST", 0); + KEb = new NEb("CORNER_CASES_THAN_SINGLE_SIDE_LAST", 1); + } + function h4b(a) { + var b, c2, d, e; + d = c4b(a); + Okb(d, a4b); + e = a.d; + e.c = KC(SI, Uhe, 1, 0, 5, 1); + for (c2 = new olb(d); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 456); + Gkb(e, b.b); + } + } + function gkd(a) { + var b, c2, d; + d = (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), a.o); + for (c2 = d.c.Kc(); c2.e != c2.i.gc(); ) { + b = BD(c2.nj(), 42); + b.dd(); + } + return FAd(d); + } + function N5b(a) { + var b; + if (!ecd(BD(vNb(a, (Nyc(), Vxc)), 98))) { + return; + } + b = a.b; + O5b((tCb(0, b.c.length), BD(b.c[0], 29))); + O5b(BD(Ikb(b, b.c.length - 1), 29)); + } + function Roc(a, b) { + var c2, d, e, f2; + c2 = 0; + for (e = new olb(b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + f2 = d.o.a + d.d.c + d.d.b + a.j; + c2 = $wnd.Math.max(c2, f2); + } + return c2; + } + function XEd(a) { + var b, c2, d, e; + e = 0; + for (c2 = 0, d = a.length; c2 < d; c2++) { + b = (BCb(c2, a.length), a.charCodeAt(c2)); + b >= 64 && b < 128 && (e = Mbb(e, Nbb(1, b - 64))); + } + return e; + } + function c_b(a, b) { + var c2, d; + d = null; + if (wNb(a, (Y9c(), O9c))) { + c2 = BD(vNb(a, O9c), 94); + c2.Xe(b) && (d = c2.We(b)); + } + d == null && !!Q_b(a) && (d = vNb(Q_b(a), b)); + return d; + } + function oQc(a, b) { + var c2, d, e; + e = b.d.i; + d = e.k; + if (d == (j0b(), h0b) || d == d0b) { + return; + } + c2 = new Sr(ur(U_b(e).a.Kc(), new Sq())); + Qr(c2) && Rhb(a.k, b, BD(Rr(c2), 17)); + } + function mid(a, b) { + var c2, d, e; + d = XKd(a.Tg(), b); + c2 = b - a.Ah(); + return c2 < 0 ? (e = a.Yg(d), e >= 0 ? a.lh(e) : tid(a, d)) : c2 < 0 ? tid(a, d) : BD(d, 66).Nj().Sj(a, a.yh(), c2); + } + function Ksd(a) { + var b; + if (JD(a.a, 4)) { + b = fvd(a.a); + if (b == null) { + throw vbb(new Zdb(mse + a.b + "'. " + ise + (fdb(Y3), Y3.k) + jse)); + } + return b; + } else { + return a.a; + } + } + function L9d(a) { + var b; + if (a == null) + return null; + b = bde(Qge(a, true)); + if (b == null) { + throw vbb(new n8d("Invalid base64Binary value: '" + a + "'")); + } + return b; + } + function Dyd(b) { + var c2; + try { + c2 = b.i.Xb(b.e); + b.mj(); + b.g = b.e++; + return c2; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + b.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + } + function Zyd(b) { + var c2; + try { + c2 = b.c.ki(b.e); + b.mj(); + b.g = b.e++; + return c2; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + b.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + } + function CPb() { + CPb = ccb; + BPb = (Y9c(), K9c); + vPb = G8c; + qPb = r8c; + wPb = f9c; + zPb = (fFb(), bFb); + yPb = _Eb; + APb = dFb; + xPb = $Eb; + sPb = (nPb(), jPb); + rPb = iPb; + tPb = lPb; + uPb = mPb; + } + function NWb(a) { + LWb(); + this.c = new Rkb(); + this.d = a; + switch (a.g) { + case 0: + case 2: + this.a = tmb(KWb); + this.b = Pje; + break; + case 3: + case 1: + this.a = KWb; + this.b = Qje; + } + } + function ued(a, b, c2) { + var d, e; + if (a.c) { + dld(a.c, a.c.i + b); + eld(a.c, a.c.j + c2); + } else { + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 157); + ued(d, b, c2); + } + } + } + function KEd(a, b) { + var c2, d; + if (a.j.length != b.j.length) + return false; + for (c2 = 0, d = a.j.length; c2 < d; c2++) { + if (!dfb(a.j[c2], b.j[c2])) + return false; + } + return true; + } + function gA(a, b, c2) { + var d; + if (b.a.length > 0) { + Ekb(a.b, new WA(b.a, c2)); + d = b.a.length; + 0 < d ? b.a = b.a.substr(0, 0) : 0 > d && (b.a += yfb(KC(TD, $ie, 25, -d, 15, 1))); + } + } + function JKb(a, b) { + var c2, d, e; + c2 = a.o; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.e.a = DKb(d, c2.a); + d.e.b = c2.b * Edb(ED(d.b.We(BKb))); + } + } + function S5b(a, b) { + var c2, d, e, f2; + e = a.k; + c2 = Edb(ED(vNb(a, (wtc(), htc)))); + f2 = b.k; + d = Edb(ED(vNb(b, htc))); + return f2 != (j0b(), e0b) ? -1 : e != e0b ? 1 : c2 == d ? 0 : c2 < d ? -1 : 1; + } + function B$c(a, b) { + var c2, d; + c2 = BD(BD(Ohb(a.g, b.a), 46).a, 65); + d = BD(BD(Ohb(a.g, b.b), 46).a, 65); + return S6c(b.a, b.b) - S6c(b.a, E6c(c2.b)) - S6c(b.b, E6c(d.b)); + } + function aZb(a, b) { + var c2; + c2 = BD(vNb(a, (Nyc(), jxc)), 74); + if (Lq(b, ZYb)) { + if (!c2) { + c2 = new s7c(); + yNb(a, jxc, c2); + } else { + Osb(c2); + } + } else + !!c2 && yNb(a, jxc, null); + return c2; + } + function a0b(a) { + var b; + b = new Ufb(); + b.a += "n"; + a.k != (j0b(), h0b) && Qfb(Qfb((b.a += "(", b), Zr(a.k).toLowerCase()), ")"); + Qfb((b.a += "_", b), P_b(a)); + return b.a; + } + function Kdc(a, b) { + Odd(b, "Self-Loop post-processing", 1); + MAb(JAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new Qdc()), new Sdc()), new Udc()), new Wdc()); + Qdd(b); + } + function kid(a, b, c2, d) { + var e; + if (c2 >= 0) { + return a.hh(b, c2, d); + } else { + !!a.eh() && (d = (e = a.Vg(), e >= 0 ? a.Qg(d) : a.eh().ih(a, -1 - e, null, d))); + return a.Sg(b, c2, d); + } + } + function zld(a, b) { + switch (b) { + case 7: + !a.e && (a.e = new y5d(B2, a, 7, 4)); + Uxd(a.e); + return; + case 8: + !a.d && (a.d = new y5d(B2, a, 8, 5)); + Uxd(a.d); + return; + } + $kd(a, b); + } + function Ut(b, c2) { + var d; + d = b.Zc(c2); + try { + return d.Pb(); + } catch (a) { + a = ubb(a); + if (JD(a, 109)) { + throw vbb(new qcb("Can't get element " + c2)); + } else + throw vbb(a); + } + } + function Tgb(a, b) { + this.e = a; + if (b < Zje) { + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [b | 0]); + } else { + this.d = 2; + this.a = OC(GC(WD, 1), oje, 25, 15, [b % Zje | 0, b / Zje | 0]); + } + } + function omb(a, b) { + mmb(); + var c2, d, e, f2; + c2 = a; + f2 = b; + if (JD(a, 21) && !JD(b, 21)) { + c2 = b; + f2 = a; + } + for (e = c2.Kc(); e.Ob(); ) { + d = e.Pb(); + if (f2.Hc(d)) { + return false; + } + } + return true; + } + function Txd(a, b, c2) { + var d, e, f2, g; + d = a.Xc(b); + if (d != -1) { + if (a.ej()) { + f2 = a.fj(); + g = tud(a, d); + e = a.Zi(4, g, null, d, f2); + !c2 ? c2 = e : c2.Ei(e); + } else { + tud(a, d); + } + } + return c2; + } + function uwd(a, b, c2) { + var d, e, f2, g; + d = a.Xc(b); + if (d != -1) { + if (a.ej()) { + f2 = a.fj(); + g = Evd(a, d); + e = a.Zi(4, g, null, d, f2); + !c2 ? c2 = e : c2.Ei(e); + } else { + Evd(a, d); + } + } + return c2; + } + function PJb(a, b) { + var c2; + c2 = BD(Mpb(a.b, b), 124).n; + switch (b.g) { + case 1: + a.t >= 0 && (c2.d = a.t); + break; + case 3: + a.t >= 0 && (c2.a = a.t); + } + if (a.C) { + c2.b = a.C.b; + c2.c = a.C.c; + } + } + function RMb() { + RMb = ccb; + OMb = new SMb(xle, 0); + NMb = new SMb(yle, 1); + PMb = new SMb(zle, 2); + QMb = new SMb(Ale, 3); + OMb.a = false; + NMb.a = true; + PMb.a = false; + QMb.a = true; + } + function ROb() { + ROb = ccb; + OOb = new SOb(xle, 0); + NOb = new SOb(yle, 1); + POb = new SOb(zle, 2); + QOb = new SOb(Ale, 3); + OOb.a = false; + NOb.a = true; + POb.a = false; + QOb.a = true; + } + function dac(a) { + var b; + b = a.a; + do { + b = BD(Rr(new Sr(ur(R_b(b).a.Kc(), new Sq()))), 17).c.i; + b.k == (j0b(), g0b) && a.b.Fc(b); + } while (b.k == (j0b(), g0b)); + a.b = Su(a.b); + } + function CDc(a) { + var b, c2, d; + d = a.c.a; + a.p = (Qb(d), new Tkb(d)); + for (c2 = new olb(d); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + b.p = GDc(b).a; + } + mmb(); + Okb(a.p, new PDc()); + } + function eVc(a) { + var b, c2, d, e; + d = 0; + e = gVc(a); + if (e.c.length == 0) { + return 1; + } else { + for (c2 = new olb(e); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 33); + d += eVc(b); + } + } + return d; + } + function JJb(a, b) { + var c2, d, e; + e = 0; + d = BD(BD(Qc(a.r, b), 21), 84).Kc(); + while (d.Ob()) { + c2 = BD(d.Pb(), 111); + e += c2.d.b + c2.b.rf().a + c2.d.c; + d.Ob() && (e += a.w); + } + return e; + } + function RKb(a, b) { + var c2, d, e; + e = 0; + d = BD(BD(Qc(a.r, b), 21), 84).Kc(); + while (d.Ob()) { + c2 = BD(d.Pb(), 111); + e += c2.d.d + c2.b.rf().b + c2.d.a; + d.Ob() && (e += a.w); + } + return e; + } + function SOc(a, b, c2, d) { + if (b.a < d.a) { + return true; + } else if (b.a == d.a) { + if (b.b < d.b) { + return true; + } else if (b.b == d.b) { + if (a.b > c2.b) { + return true; + } + } + } + return false; + } + function AD(a, b) { + if (ND(a)) { + return !!zD[b]; + } else if (a.hm) { + return !!a.hm[b]; + } else if (LD(a)) { + return !!yD[b]; + } else if (KD(a)) { + return !!xD[b]; + } + return false; + } + function jkd(a, b, c2) { + c2 == null ? (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), LAd(a.o, b)) : (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), HAd(a.o, b, c2)); + return a; + } + function jKb(a, b, c2, d) { + var e, f2; + f2 = b.Xe((Y9c(), W8c)) ? BD(b.We(W8c), 21) : a.j; + e = uJb(f2); + if (e == (qJb(), pJb)) { + return; + } + if (c2 && !sJb(e)) { + return; + } + UHb(lKb(a, e, d), b); + } + function fid(a, b, c2, d) { + var e, f2, g; + f2 = XKd(a.Tg(), b); + e = b - a.Ah(); + return e < 0 ? (g = a.Yg(f2), g >= 0 ? a._g(g, c2, true) : sid(a, f2, c2)) : BD(f2, 66).Nj().Pj(a, a.yh(), e, c2, d); + } + function u6d(a, b, c2, d) { + var e, f2, g; + if (c2.mh(b)) { + Q6d(); + if (YId(b)) { + e = BD(c2.ah(b), 153); + x6d(a, e); + } else { + f2 = (g = b, !g ? null : BD(d, 49).xh(g)); + !!f2 && v6d(c2.ah(b), f2); + } + } + } + function H3b(a) { + switch (a.g) { + case 1: + return vLb(), uLb; + case 3: + return vLb(), rLb; + case 2: + return vLb(), tLb; + case 4: + return vLb(), sLb; + default: + return null; + } + } + function kCb(a) { + switch (typeof a) { + case Mhe: + return LCb(a); + case Lhe: + return QD(a); + case Khe: + return Bcb(), a ? 1231 : 1237; + default: + return a == null ? 0 : FCb(a); + } + } + function Gic(a, b, c2) { + if (a.e) { + switch (a.b) { + case 1: + oic(a.c, b, c2); + break; + case 0: + pic(a.c, b, c2); + } + } else { + mic(a.c, b, c2); + } + a.a[b.p][c2.p] = a.c.i; + a.a[c2.p][b.p] = a.c.e; + } + function lHc(a) { + var b, c2; + if (a == null) { + return null; + } + c2 = KC(OQ, nie, 193, a.length, 0, 2); + for (b = 0; b < c2.length; b++) { + c2[b] = BD(ulb(a[b], a[b].length), 193); + } + return c2; + } + function d4d(a) { + var b; + if (b4d(a)) { + a4d(a); + if (a.Lk()) { + b = b3d(a.e, a.b, a.c, a.a, a.j); + a.j = b; + } + a.g = a.a; + ++a.a; + ++a.c; + a.i = 0; + return a.j; + } else { + throw vbb(new utb()); + } + } + function fMb(a, b) { + var c2, d, e, f2; + f2 = a.o; + c2 = a.p; + f2 < c2 ? f2 *= f2 : c2 *= c2; + d = f2 + c2; + f2 = b.o; + c2 = b.p; + f2 < c2 ? f2 *= f2 : c2 *= c2; + e = f2 + c2; + if (d < e) { + return -1; + } + if (d == e) { + return 0; + } + return 1; + } + function HLd(a, b) { + var c2, d, e; + e = rud(a, b); + if (e >= 0) + return e; + if (a.Fk()) { + for (d = 0; d < a.i; ++d) { + c2 = a.Gk(BD(a.g[d], 56)); + if (PD(c2) === PD(b)) { + return d; + } + } + } + return -1; + } + function Gtd(a, b, c2) { + var d, e; + e = a.gc(); + if (b >= e) + throw vbb(new Cyd(b, e)); + if (a.hi()) { + d = a.Xc(c2); + if (d >= 0 && d != b) { + throw vbb(new Wdb(kue)); + } + } + return a.mi(b, c2); + } + function gx(a, b) { + this.a = BD(Qb(a), 245); + this.b = BD(Qb(b), 245); + if (a.vd(b) > 0 || a == (Lk(), Kk) || b == (_k(), $k)) { + throw vbb(new Wdb("Invalid range: " + nx(a, b))); + } + } + function mYb(a) { + var b, c2; + this.b = new Rkb(); + this.c = a; + this.a = false; + for (c2 = new olb(a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + this.a = this.a | b.k == (j0b(), h0b); + } + } + function GFb(a, b) { + var c2, d, e; + c2 = nGb(new pGb(), a); + for (e = new olb(b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 0), c2), d)); + } + return c2; + } + function Nac(a, b, c2) { + var d, e, f2; + for (e = new Sr(ur((b ? R_b(a) : U_b(a)).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + f2 = b ? d.c.i : d.d.i; + f2.k == (j0b(), f0b) && $_b(f2, c2); + } + } + function Izc() { + Izc = ccb; + Gzc = new Kzc(ane, 0); + Hzc = new Kzc("PORT_POSITION", 1); + Fzc = new Kzc("NODE_SIZE_WHERE_SPACE_PERMITS", 2); + Ezc = new Kzc("NODE_SIZE", 3); + } + function F7c() { + F7c = ccb; + z7c = new G7c("AUTOMATIC", 0); + C7c = new G7c(jle, 1); + D7c = new G7c(kle, 2); + E7c = new G7c("TOP", 3); + A7c = new G7c(mle, 4); + B7c = new G7c(gle, 5); + } + function Hhb(a, b, c2, d) { + Dhb(); + var e, f2; + e = 0; + for (f2 = 0; f2 < c2; f2++) { + e = wbb(Ibb(xbb(b[f2], Yje), xbb(d, Yje)), xbb(Tbb(e), Yje)); + a[f2] = Tbb(e); + e = Pbb(e, 32); + } + return Tbb(e); + } + function zHb(a, b, c2) { + var d, e; + e = 0; + for (d = 0; d < rHb; d++) { + e = $wnd.Math.max(e, pHb(a.a[b.g][d], c2)); + } + b == (gHb(), eHb) && !!a.b && (e = $wnd.Math.max(e, a.b.b)); + return e; + } + function Bub(a, b) { + var c2, d; + lCb(b > 0); + if ((b & -b) == b) { + return QD(b * Cub(a, 31) * 4656612873077393e-25); + } + do { + c2 = Cub(a, 31); + d = c2 % b; + } while (c2 - d + (b - 1) < 0); + return QD(d); + } + function LCb(a) { + JCb(); + var b, c2, d; + c2 = ":" + a; + d = ICb[c2]; + if (d != null) { + return QD((uCb(d), d)); + } + d = GCb[c2]; + b = d == null ? KCb(a) : QD((uCb(d), d)); + MCb(); + ICb[c2] = b; + return b; + } + function qZb(a, b, c2) { + Odd(c2, "Compound graph preprocessor", 1); + a.a = new Hp(); + vZb(a, b, null); + pZb(a, b); + uZb(a); + yNb(b, (wtc(), zsc), a.a); + a.a = null; + Uhb(a.b); + Qdd(c2); + } + function X$b(a, b, c2) { + switch (c2.g) { + case 1: + a.a = b.a / 2; + a.b = 0; + break; + case 2: + a.a = b.a; + a.b = b.b / 2; + break; + case 3: + a.a = b.a / 2; + a.b = b.b; + break; + case 4: + a.a = 0; + a.b = b.b / 2; + } + } + function tkc(a) { + var b, c2, d; + for (d = BD(Qc(a.a, (Xjc(), Vjc)), 15).Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 101); + b = Bkc(c2); + kkc(a, c2, b[0], (Fkc(), Ckc), 0); + kkc(a, c2, b[1], Ekc, 1); + } + } + function ukc(a) { + var b, c2, d; + for (d = BD(Qc(a.a, (Xjc(), Wjc)), 15).Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 101); + b = Bkc(c2); + kkc(a, c2, b[0], (Fkc(), Ckc), 0); + kkc(a, c2, b[1], Ekc, 1); + } + } + function tXc(a) { + switch (a.g) { + case 0: + return null; + case 1: + return new $Xc(); + case 2: + return new QXc(); + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function OZc(a, b, c2) { + var d, e; + FZc(a, b - a.s, c2 - a.t); + for (e = new olb(a.n); e.a < e.c.c.length; ) { + d = BD(mlb(e), 211); + SZc(d, d.e + b - a.s); + TZc(d, d.f + c2 - a.t); + } + a.s = b; + a.t = c2; + } + function JFb(a) { + var b, c2, d, e, f2; + c2 = 0; + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + d.d = c2++; + } + b = IFb(a); + f2 = null; + b.c.length > 1 && (f2 = GFb(a, b)); + return f2; + } + function dmd(a) { + var b; + if (!!a.f && a.f.kh()) { + b = BD(a.f, 49); + a.f = BD(xid(a, b), 82); + a.f != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 8, b, a.f)); + } + return a.f; + } + function emd(a) { + var b; + if (!!a.i && a.i.kh()) { + b = BD(a.i, 49); + a.i = BD(xid(a, b), 82); + a.i != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 7, b, a.i)); + } + return a.i; + } + function zUd(a) { + var b; + if (!!a.b && (a.b.Db & 64) != 0) { + b = a.b; + a.b = BD(xid(a, b), 18); + a.b != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 21, b, a.b)); + } + return a.b; + } + function uAd(a, b) { + var c2, d, e; + if (a.d == null) { + ++a.e; + ++a.f; + } else { + d = b.Sh(); + BAd(a, a.f + 1); + e = (d & Ohe) % a.d.length; + c2 = a.d[e]; + !c2 && (c2 = a.d[e] = a.uj()); + c2.Fc(b); + ++a.f; + } + } + function m3d(a, b, c2) { + var d; + if (b.Kj()) { + return false; + } else if (b.Zj() != -2) { + d = b.zj(); + return d == null ? c2 == null : pb(d, c2); + } else + return b.Hj() == a.e.Tg() && c2 == null; + } + function wo() { + var a; + Xj(16, Hie); + a = Kp(16); + this.b = KC(GF, Gie, 317, a, 0, 1); + this.c = KC(GF, Gie, 317, a, 0, 1); + this.a = null; + this.e = null; + this.i = 0; + this.f = a - 1; + this.g = 0; + } + function b0b(a) { + n_b.call(this); + this.k = (j0b(), h0b); + this.j = (Xj(6, Jie), new Skb(6)); + this.b = (Xj(2, Jie), new Skb(2)); + this.d = new L_b(); + this.f = new s0b(); + this.a = a; + } + function Scc(a) { + var b, c2; + if (a.c.length <= 1) { + return; + } + b = Pcc(a, (Ucd(), Rcd)); + Rcc(a, BD(b.a, 19).a, BD(b.b, 19).a); + c2 = Pcc(a, Tcd); + Rcc(a, BD(c2.a, 19).a, BD(c2.b, 19).a); + } + function Vzc() { + Vzc = ccb; + Uzc = new Xzc("SIMPLE", 0); + Rzc = new Xzc(Tne, 1); + Szc = new Xzc("LINEAR_SEGMENTS", 2); + Qzc = new Xzc("BRANDES_KOEPF", 3); + Tzc = new Xzc(Aqe, 4); + } + function XDc(a, b, c2) { + if (!ecd(BD(vNb(b, (Nyc(), Vxc)), 98))) { + WDc(a, b, Y_b(b, c2)); + WDc(a, b, Y_b(b, (Ucd(), Rcd))); + WDc(a, b, Y_b(b, Acd)); + mmb(); + Okb(b.j, new jEc(a)); + } + } + function HVc(a, b, c2, d) { + var e, f2, g; + e = d ? BD(Qc(a.a, b), 21) : BD(Qc(a.b, b), 21); + for (g = e.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 33); + if (BVc(a, c2, f2)) { + return true; + } + } + return false; + } + function FMd(a) { + var b, c2; + for (c2 = new Fyd(a); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 87); + if (!!b.e || (!b.d && (b.d = new xMd(j5, b, 1)), b.d).i != 0) { + return true; + } + } + return false; + } + function QTd(a) { + var b, c2; + for (c2 = new Fyd(a); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 87); + if (!!b.e || (!b.d && (b.d = new xMd(j5, b, 1)), b.d).i != 0) { + return true; + } + } + return false; + } + function FDc(a) { + var b, c2, d; + b = 0; + for (d = new olb(a.c.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + b += sr(new Sr(ur(U_b(c2).a.Kc(), new Sq()))); + } + return b / a.c.a.c.length; + } + function UPc(a) { + var b, c2; + a.c || XPc(a); + c2 = new s7c(); + b = new olb(a.a); + mlb(b); + while (b.a < b.c.c.length) { + Dsb(c2, BD(mlb(b), 407).a); + } + sCb(c2.b != 0); + Nsb(c2, c2.c.b); + return c2; + } + function J0c() { + J0c = ccb; + I0c = (A0c(), z0c); + G0c = new q0b(8); + new Osd((Y9c(), f9c), G0c); + new Osd(T9c, 8); + H0c = x0c; + E0c = n0c; + F0c = o0c; + D0c = new Osd(y8c, (Bcb(), false)); + } + function uld(a, b, c2, d) { + switch (b) { + case 7: + return !a.e && (a.e = new y5d(B2, a, 7, 4)), a.e; + case 8: + return !a.d && (a.d = new y5d(B2, a, 8, 5)), a.d; + } + return Xkd(a, b, c2, d); + } + function JQd(a) { + var b; + if (!!a.a && a.a.kh()) { + b = BD(a.a, 49); + a.a = BD(xid(a, b), 138); + a.a != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 5, b, a.a)); + } + return a.a; + } + function yde(a) { + if (a < 48) + return -1; + if (a > 102) + return -1; + if (a <= 57) + return a - 48; + if (a < 65) + return -1; + if (a <= 70) + return a - 65 + 10; + if (a < 97) + return -1; + return a - 97 + 10; + } + function Wj(a, b) { + if (a == null) { + throw vbb(new Heb("null key in entry: null=" + b)); + } else if (b == null) { + throw vbb(new Heb("null value in entry: " + a + "=null")); + } + } + function kr(a, b) { + var c2, d; + while (a.Ob()) { + if (!b.Ob()) { + return false; + } + c2 = a.Pb(); + d = b.Pb(); + if (!(PD(c2) === PD(d) || c2 != null && pb(c2, d))) { + return false; + } + } + return !b.Ob(); + } + function jIb(a, b) { + var c2; + c2 = OC(GC(UD, 1), Vje, 25, 15, [pHb(a.a[0], b), pHb(a.a[1], b), pHb(a.a[2], b)]); + if (a.d) { + c2[0] = $wnd.Math.max(c2[0], c2[2]); + c2[2] = c2[0]; + } + return c2; + } + function kIb(a, b) { + var c2; + c2 = OC(GC(UD, 1), Vje, 25, 15, [qHb(a.a[0], b), qHb(a.a[1], b), qHb(a.a[2], b)]); + if (a.d) { + c2[0] = $wnd.Math.max(c2[0], c2[2]); + c2[2] = c2[0]; + } + return c2; + } + function mqc() { + mqc = ccb; + iqc = new oqc("GREEDY", 0); + hqc = new oqc(Une, 1); + kqc = new oqc(Tne, 2); + lqc = new oqc("MODEL_ORDER", 3); + jqc = new oqc("GREEDY_MODEL_ORDER", 4); + } + function iUc(a, b) { + var c2, d, e; + a.b[b.g] = 1; + for (d = Jsb(b.d, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 188); + e = c2.c; + a.b[e.g] == 1 ? Dsb(a.a, c2) : a.b[e.g] == 2 ? a.b[e.g] = 1 : iUc(a, e); + } + } + function V9b(a, b) { + var c2, d, e; + e = new Skb(b.gc()); + for (d = b.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 286); + c2.c == c2.f ? K9b(a, c2, c2.c) : L9b(a, c2) || (e.c[e.c.length] = c2, true); + } + return e; + } + function IZc(a, b, c2) { + var d, e, f2, g, h; + h = a.r + b; + a.r += b; + a.d += c2; + d = c2 / a.n.c.length; + e = 0; + for (g = new olb(a.n); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 211); + RZc(f2, h, d, e); + ++e; + } + } + function tEb(a) { + var b, c2, d; + zwb(a.b.a); + a.a = KC(PM, Uhe, 57, a.c.c.a.b.c.length, 0, 1); + b = 0; + for (d = new olb(a.c.c.a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 57); + c2.f = b++; + } + } + function RVb(a) { + var b, c2, d; + zwb(a.b.a); + a.a = KC(IP, Uhe, 81, a.c.a.a.b.c.length, 0, 1); + b = 0; + for (d = new olb(a.c.a.a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 81); + c2.i = b++; + } + } + function P1c(a, b, c2) { + var d; + Odd(c2, "Shrinking tree compaction", 1); + if (Ccb(DD(vNb(b, (XNb(), VNb))))) { + N1c(a, b.f); + INb(b.f, (d = b.c, d)); + } else { + INb(b.f, b.c); + } + Qdd(c2); + } + function mr(a) { + var b; + b = gr(a); + if (!Qr(a)) { + throw vbb(new qcb("position (0) must be less than the number of elements that remained (" + b + ")")); + } + return Rr(a); + } + function hNb(b, c2, d) { + var e; + try { + return YMb(b, c2 + b.j, d + b.k); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c2 + She + d + ").")); + } else + throw vbb(a); + } + } + function iNb(b, c2, d) { + var e; + try { + return ZMb(b, c2 + b.j, d + b.k); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c2 + She + d + ").")); + } else + throw vbb(a); + } + } + function jNb(b, c2, d) { + var e; + try { + return $Mb(b, c2 + b.j, d + b.k); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c2 + She + d + ").")); + } else + throw vbb(a); + } + } + function s5b(a) { + switch (a.g) { + case 1: + return Ucd(), Tcd; + case 4: + return Ucd(), Acd; + case 3: + return Ucd(), zcd; + case 2: + return Ucd(), Rcd; + default: + return Ucd(), Scd; + } + } + function cjc(a, b, c2) { + if (b.k == (j0b(), h0b) && c2.k == g0b) { + a.d = _ic(b, (Ucd(), Rcd)); + a.b = _ic(b, Acd); + } + if (c2.k == h0b && b.k == g0b) { + a.d = _ic(c2, (Ucd(), Acd)); + a.b = _ic(c2, Rcd); + } + } + function gjc(a, b) { + var c2, d, e; + e = V_b(a, b); + for (d = e.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 11); + if (vNb(c2, (wtc(), gtc)) != null || a1b(new b1b(c2.b))) { + return true; + } + } + return false; + } + function QZc(a, b) { + dld(b, a.e + a.d + (a.c.c.length == 0 ? 0 : a.b)); + eld(b, a.f); + a.a = $wnd.Math.max(a.a, b.f); + a.d += b.g + (a.c.c.length == 0 ? 0 : a.b); + Ekb(a.c, b); + return true; + } + function XZc(a, b, c2) { + var d, e, f2, g; + g = 0; + d = c2 / a.a.c.length; + for (f2 = new olb(a.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 187); + OZc(e, e.s, e.t + g * d); + IZc(e, a.d - e.r + b, d); + ++g; + } + } + function H4b(a) { + var b, c2, d, e, f2; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + b = 0; + for (f2 = new olb(c2.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + e.p = b++; + } + } + } + function r6c(a, b) { + var c2, d, e, f2, g, h; + e = b.length - 1; + g = 0; + h = 0; + for (d = 0; d <= e; d++) { + f2 = b[d]; + c2 = k6c(e, d) * x6c(1 - a, e - d) * x6c(a, d); + g += f2.a * c2; + h += f2.b * c2; + } + return new f7c(g, h); + } + function jud(a, b) { + var c2, d, e, f2, g; + c2 = b.gc(); + a.qi(a.i + c2); + f2 = b.Kc(); + g = a.i; + a.i += c2; + for (d = g; d < a.i; ++d) { + e = f2.Pb(); + mud(a, d, a.oi(d, e)); + a.bi(d, e); + a.ci(); + } + return c2 != 0; + } + function twd(a, b, c2) { + var d, e, f2; + if (a.ej()) { + d = a.Vi(); + f2 = a.fj(); + ++a.j; + a.Hi(d, a.oi(d, b)); + e = a.Zi(3, null, b, d, f2); + !c2 ? c2 = e : c2.Ei(e); + } else { + Avd(a, a.Vi(), b); + } + return c2; + } + function WOd(a, b, c2) { + var d, e, f2; + d = BD(qud(VKd(a.a), b), 87); + f2 = (e = d.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)); + ((f2.Db & 64) != 0 ? xid(a.b, f2) : f2) == c2 ? KQd(d) : NQd(d, c2); + return f2; + } + function Ewb(a, b, c2, d, e, f2, g, h) { + var i3, j; + if (!d) { + return; + } + i3 = d.a[0]; + !!i3 && Ewb(a, b, c2, i3, e, f2, g, h); + Fwb(a, c2, d.d, e, f2, g, h) && b.Fc(d); + j = d.a[1]; + !!j && Ewb(a, b, c2, j, e, f2, g, h); + } + function eAb(a, b) { + var c2; + if (!a.a) { + c2 = KC(UD, Vje, 25, 0, 15, 1); + _ub(a.b.a, new iAb(c2)); + c2.sort(dcb(Ylb.prototype.te, Ylb, [])); + a.a = new Avb(c2, a.d); + } + return pvb(a.a, b); + } + function YMb(b, c2, d) { + try { + return Bbb(_Mb(b, c2, d), 1); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c2 + She + d + Fle)); + } else + throw vbb(a); + } + } + function ZMb(b, c2, d) { + try { + return Bbb(_Mb(b, c2, d), 0); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c2 + She + d + Fle)); + } else + throw vbb(a); + } + } + function $Mb(b, c2, d) { + try { + return Bbb(_Mb(b, c2, d), 2); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c2 + She + d + Fle)); + } else + throw vbb(a); + } + } + function Nyd(b, c2) { + if (b.g == -1) { + throw vbb(new Ydb()); + } + b.mj(); + try { + b.d._c(b.g, c2); + b.f = b.d.j; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + } + function rJc(a, b, c2) { + Odd(c2, "Linear segments node placement", 1); + a.b = BD(vNb(b, (wtc(), otc)), 304); + sJc(a, b); + nJc(a, b); + kJc(a, b); + qJc(a); + a.a = null; + a.b = null; + Qdd(c2); + } + function Ee(a, b) { + var c2, d, e, f2; + f2 = a.gc(); + b.length < f2 && (b = eCb(new Array(f2), b)); + e = b; + d = a.Kc(); + for (c2 = 0; c2 < f2; ++c2) { + NC(e, c2, d.Pb()); + } + b.length > f2 && NC(b, f2, null); + return b; + } + function Lu(a, b) { + var c2, d; + d = a.gc(); + if (b == null) { + for (c2 = 0; c2 < d; c2++) { + if (a.Xb(c2) == null) { + return c2; + } + } + } else { + for (c2 = 0; c2 < d; c2++) { + if (pb(b, a.Xb(c2))) { + return c2; + } + } + } + return -1; + } + function Jd(a, b) { + var c2, d, e; + c2 = b.cd(); + e = b.dd(); + d = a.xc(c2); + if (!(PD(e) === PD(d) || e != null && pb(e, d))) { + return false; + } + if (d == null && !a._b(c2)) { + return false; + } + return true; + } + function YC(a, b) { + var c2, d, e; + if (b <= 22) { + c2 = a.l & (1 << b) - 1; + d = e = 0; + } else if (b <= 44) { + c2 = a.l; + d = a.m & (1 << b - 22) - 1; + e = 0; + } else { + c2 = a.l; + d = a.m; + e = a.h & (1 << b - 44) - 1; + } + return TC(c2, d, e); + } + function yKb(a, b) { + switch (b.g) { + case 1: + return a.f.n.d + a.t; + case 3: + return a.f.n.a + a.t; + case 2: + return a.f.n.c + a.s; + case 4: + return a.f.n.b + a.s; + default: + return 0; + } + } + function aLb(a, b) { + var c2, d; + d = b.c; + c2 = b.a; + switch (a.b.g) { + case 0: + c2.d = a.e - d.a - d.d; + break; + case 1: + c2.d += a.e; + break; + case 2: + c2.c = a.e - d.a - d.d; + break; + case 3: + c2.c = a.e + d.d; + } + } + function ZOb(a, b, c2, d) { + var e, f2; + this.a = b; + this.c = d; + e = a.a; + YOb(this, new f7c(-e.c, -e.d)); + P6c(this.b, c2); + f2 = d / 2; + b.a ? b7c(this.b, 0, f2) : b7c(this.b, f2, 0); + Ekb(a.c, this); + } + function iXc() { + iXc = ccb; + hXc = new kXc(ane, 0); + fXc = new kXc(Vne, 1); + gXc = new kXc("EDGE_LENGTH_BY_POSITION", 2); + eXc = new kXc("CROSSING_MINIMIZATION_BY_POSITION", 3); + } + function Wqd(a, b) { + var c2, d; + c2 = BD(oo(a.g, b), 33); + if (c2) { + return c2; + } + d = BD(oo(a.j, b), 118); + if (d) { + return d; + } + throw vbb(new cqd("Referenced shape does not exist: " + b)); + } + function rTb(a, b) { + if (a.c == b) { + return a.d; + } else if (a.d == b) { + return a.c; + } else { + throw vbb(new Wdb("Node 'one' must be either source or target of edge 'edge'.")); + } + } + function TMc(a, b) { + if (a.c.i == b) { + return a.d.i; + } else if (a.d.i == b) { + return a.c.i; + } else { + throw vbb(new Wdb("Node " + b + " is neither source nor target of edge " + a)); + } + } + function _lc(a, b) { + var c2; + switch (b.g) { + case 2: + case 4: + c2 = a.a; + a.c.d.n.b < c2.d.n.b && (c2 = a.c); + amc(a, b, (Ajc(), zjc), c2); + break; + case 1: + case 3: + amc(a, b, (Ajc(), wjc), null); + } + } + function smc(a, b, c2, d, e, f2) { + var g, h, i3, j, k; + g = qmc(b, c2, f2); + h = c2 == (Ucd(), Acd) || c2 == Tcd ? -1 : 1; + j = a[c2.g]; + for (k = 0; k < j.length; k++) { + i3 = j[k]; + i3 > 0 && (i3 += e); + j[k] = g; + g += h * (i3 + d); + } + } + function Uoc(a) { + var b, c2, d; + d = a.f; + a.n = KC(UD, Vje, 25, d, 15, 1); + a.d = KC(UD, Vje, 25, d, 15, 1); + for (b = 0; b < d; b++) { + c2 = BD(Ikb(a.c.b, b), 29); + a.n[b] = Roc(a, c2); + a.d[b] = Qoc(a, c2); + } + } + function zjd(a, b) { + var c2, d, e; + e = 0; + for (d = 2; d < b; d <<= 1) { + (a.Db & d) != 0 && ++e; + } + if (e == 0) { + for (c2 = b <<= 1; c2 <= 128; c2 <<= 1) { + if ((a.Db & c2) != 0) { + return 0; + } + } + return -1; + } else { + return e; + } + } + function s3d(a, b) { + var c2, d, e, f2, g; + g = S6d(a.e.Tg(), b); + f2 = null; + c2 = BD(a.g, 119); + for (e = 0; e < a.i; ++e) { + d = c2[e]; + if (g.rl(d.ak())) { + !f2 && (f2 = new yud()); + wtd(f2, d); + } + } + !!f2 && Yxd(a, f2); + } + function H9d(a) { + var b, c2, d; + if (!a) + return null; + if (a.dc()) + return ""; + d = new Hfb(); + for (c2 = a.Kc(); c2.Ob(); ) { + b = c2.Pb(); + Efb(d, GD(b)); + d.a += " "; + } + return lcb(d, d.a.length - 1); + } + function Ty(a, b, c2) { + var d, e, f2, g, h; + Uy(a); + for (e = (a.k == null && (a.k = KC(_I, nie, 78, 0, 0, 1)), a.k), f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + Ty(d); + } + h = a.f; + !!h && Ty(h); + } + function LC(a, b) { + var c2 = new Array(b); + var d; + switch (a) { + case 14: + case 15: + d = 0; + break; + case 16: + d = false; + break; + default: + return c2; + } + for (var e = 0; e < b; ++e) { + c2[e] = d; + } + return c2; + } + function PDb(a) { + var b, c2, d; + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + b.c.$b(); + } + fad(a.d) ? d = a.a.c : d = a.a.d; + Hkb(d, new dEb(a)); + a.c.Me(a); + QDb(a); + } + function sRb(a) { + var b, c2, d, e; + for (c2 = new olb(a.e.c); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 282); + for (e = new olb(b.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 447); + lRb(d); + } + cRb(b); + } + } + function a$c(a) { + var b, c2, d, e, f2; + d = 0; + f2 = 0; + e = 0; + for (c2 = new olb(a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 187); + f2 = $wnd.Math.max(f2, b.r); + d += b.d + (e > 0 ? a.c : 0); + ++e; + } + a.b = d; + a.d = f2; + } + function BZc(a, b) { + var c2, d, e, f2, g; + d = 0; + e = 0; + c2 = 0; + for (g = new olb(b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 200); + d = $wnd.Math.max(d, f2.e); + e += f2.b + (c2 > 0 ? a.g : 0); + ++c2; + } + a.c = e; + a.d = d; + } + function AHb(a, b) { + var c2; + c2 = OC(GC(UD, 1), Vje, 25, 15, [zHb(a, (gHb(), dHb), b), zHb(a, eHb, b), zHb(a, fHb, b)]); + if (a.f) { + c2[0] = $wnd.Math.max(c2[0], c2[2]); + c2[2] = c2[0]; + } + return c2; + } + function lNb(b, c2, d) { + var e; + try { + aNb(b, c2 + b.j, d + b.k, false, true); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c2 + She + d + ").")); + } else + throw vbb(a); + } + } + function mNb(b, c2, d) { + var e; + try { + aNb(b, c2 + b.j, d + b.k, true, false); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + e = a; + throw vbb(new qcb(e.g + Gle + c2 + She + d + ").")); + } else + throw vbb(a); + } + } + function d5b(a) { + var b; + if (!wNb(a, (Nyc(), xxc))) { + return; + } + b = BD(vNb(a, xxc), 21); + if (b.Hc((Hbd(), zbd))) { + b.Mc(zbd); + b.Fc(Bbd); + } else if (b.Hc(Bbd)) { + b.Mc(Bbd); + b.Fc(zbd); + } + } + function e5b(a) { + var b; + if (!wNb(a, (Nyc(), xxc))) { + return; + } + b = BD(vNb(a, xxc), 21); + if (b.Hc((Hbd(), Gbd))) { + b.Mc(Gbd); + b.Fc(Ebd); + } else if (b.Hc(Ebd)) { + b.Mc(Ebd); + b.Fc(Gbd); + } + } + function udc(a, b, c2) { + Odd(c2, "Self-Loop ordering", 1); + MAb(NAb(JAb(JAb(LAb(new YAb(null, new Kub(b.b, 16)), new ydc()), new Adc()), new Cdc()), new Edc()), new Gdc(a)); + Qdd(c2); + } + function ikc(a, b, c2, d) { + var e, f2; + for (e = b; e < a.c.length; e++) { + f2 = (tCb(e, a.c.length), BD(a.c[e], 11)); + if (c2.Mb(f2)) { + d.c[d.c.length] = f2; + } else { + return e; + } + } + return a.c.length; + } + function Kmc(a, b, c2, d) { + var e, f2, g, h; + a.a == null && Nmc(a, b); + g = b.b.j.c.length; + f2 = c2.d.p; + h = d.d.p; + e = h - 1; + e < 0 && (e = g - 1); + return f2 <= e ? a.a[e] - a.a[f2] : a.a[g - 1] - a.a[f2] + a.a[e]; + } + function ehd(a) { + var b, c2; + if (!a.b) { + a.b = Qu(BD(a.f, 33).Ag().i); + for (c2 = new Fyd(BD(a.f, 33).Ag()); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 137); + Ekb(a.b, new dhd(b)); + } + } + return a.b; + } + function fhd(a) { + var b, c2; + if (!a.e) { + a.e = Qu(Yod(BD(a.f, 33)).i); + for (c2 = new Fyd(Yod(BD(a.f, 33))); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 118); + Ekb(a.e, new thd(b)); + } + } + return a.e; + } + function ahd(a) { + var b, c2; + if (!a.a) { + a.a = Qu(Vod(BD(a.f, 33)).i); + for (c2 = new Fyd(Vod(BD(a.f, 33))); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 33); + Ekb(a.a, new hhd(a, b)); + } + } + return a.a; + } + function dKd(b) { + var c2; + if (!b.C && (b.D != null || b.B != null)) { + c2 = eKd(b); + if (c2) { + b.yk(c2); + } else { + try { + b.yk(null); + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } + } + return b.C; + } + function GJb(a) { + switch (a.q.g) { + case 5: + DJb(a, (Ucd(), Acd)); + DJb(a, Rcd); + break; + case 4: + EJb(a, (Ucd(), Acd)); + EJb(a, Rcd); + break; + default: + FJb(a, (Ucd(), Acd)); + FJb(a, Rcd); + } + } + function PKb(a) { + switch (a.q.g) { + case 5: + MKb(a, (Ucd(), zcd)); + MKb(a, Tcd); + break; + case 4: + NKb(a, (Ucd(), zcd)); + NKb(a, Tcd); + break; + default: + OKb(a, (Ucd(), zcd)); + OKb(a, Tcd); + } + } + function EXb(a, b) { + var c2, d, e; + e = new d7c(); + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 37); + uXb(c2, e.a, 0); + e.a += c2.f.a + b; + e.b = $wnd.Math.max(e.b, c2.f.b); + } + e.b > 0 && (e.b += b); + return e; + } + function GXb(a, b) { + var c2, d, e; + e = new d7c(); + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 37); + uXb(c2, 0, e.b); + e.b += c2.f.b + b; + e.a = $wnd.Math.max(e.a, c2.f.a); + } + e.a > 0 && (e.a += b); + return e; + } + function d_b(a) { + var b, c2, d; + d = Ohe; + for (c2 = new olb(a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + wNb(b, (wtc(), Zsc)) && (d = $wnd.Math.min(d, BD(vNb(b, Zsc), 19).a)); + } + return d; + } + function pHc(a, b) { + var c2, d; + if (b.length == 0) { + return 0; + } + c2 = NHc(a.a, b[0], (Ucd(), Tcd)); + c2 += NHc(a.a, b[b.length - 1], zcd); + for (d = 0; d < b.length; d++) { + c2 += qHc(a, d, b); + } + return c2; + } + function vQc() { + hQc(); + this.c = new Rkb(); + this.i = new Rkb(); + this.e = new zsb(); + this.f = new zsb(); + this.g = new zsb(); + this.j = new Rkb(); + this.a = new Rkb(); + this.b = new Lqb(); + this.k = new Lqb(); + } + function aKd(a, b) { + var c2, d; + if (a.Db >> 16 == 6) { + return a.Cb.ih(a, 5, o5, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? a.zh() : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Wz(a) { + Rz(); + var b = a.e; + if (b && b.stack) { + var c2 = b.stack; + var d = b + "\n"; + c2.substring(0, d.length) == d && (c2 = c2.substring(d.length)); + return c2.split("\n"); + } + return []; + } + function jeb(a) { + var b; + b = (qeb(), peb); + return b[a >>> 28] | b[a >> 24 & 15] << 4 | b[a >> 20 & 15] << 8 | b[a >> 16 & 15] << 12 | b[a >> 12 & 15] << 16 | b[a >> 8 & 15] << 20 | b[a >> 4 & 15] << 24 | b[a & 15] << 28; + } + function _jb(a) { + var b, c2, d; + if (a.b != a.c) { + return; + } + d = a.a.length; + c2 = geb($wnd.Math.max(8, d)) << 1; + if (a.b != 0) { + b = _Bb(a.a, c2); + $jb(a, b, d); + a.a = b; + a.b = 0; + } else { + dCb(a.a, c2); + } + a.c = d; + } + function DKb(a, b) { + var c2; + c2 = a.b; + return c2.Xe((Y9c(), s9c)) ? c2.Hf() == (Ucd(), Tcd) ? -c2.rf().a - Edb(ED(c2.We(s9c))) : b + Edb(ED(c2.We(s9c))) : c2.Hf() == (Ucd(), Tcd) ? -c2.rf().a : b; + } + function P_b(a) { + var b; + if (a.b.c.length != 0 && !!BD(Ikb(a.b, 0), 70).a) { + return BD(Ikb(a.b, 0), 70).a; + } + b = JZb(a); + if (b != null) { + return b; + } + return "" + (!a.c ? -1 : Jkb(a.c.a, a, 0)); + } + function C0b(a) { + var b; + if (a.f.c.length != 0 && !!BD(Ikb(a.f, 0), 70).a) { + return BD(Ikb(a.f, 0), 70).a; + } + b = JZb(a); + if (b != null) { + return b; + } + return "" + (!a.i ? -1 : Jkb(a.i.j, a, 0)); + } + function Ogc(a, b) { + var c2, d; + if (b < 0 || b >= a.gc()) { + return null; + } + for (c2 = b; c2 < a.gc(); ++c2) { + d = BD(a.Xb(c2), 128); + if (c2 == a.gc() - 1 || !d.o) { + return new vgd(meb(c2), d); + } + } + return null; + } + function uoc(a, b, c2) { + var d, e, f2, g, h; + f2 = a.c; + h = c2 ? b : a; + d = c2 ? a : b; + for (e = h.p + 1; e < d.p; ++e) { + g = BD(Ikb(f2.a, e), 10); + if (!(g.k == (j0b(), d0b) || voc(g))) { + return false; + } + } + return true; + } + function u$c(a) { + var b, c2, d, e, f2; + f2 = 0; + e = Qje; + d = 0; + for (c2 = new olb(a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 187); + f2 += b.r + (d > 0 ? a.c : 0); + e = $wnd.Math.max(e, b.d); + ++d; + } + a.e = f2; + a.b = e; + } + function shd(a) { + var b, c2; + if (!a.b) { + a.b = Qu(BD(a.f, 118).Ag().i); + for (c2 = new Fyd(BD(a.f, 118).Ag()); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 137); + Ekb(a.b, new dhd(b)); + } + } + return a.b; + } + function Ctd(a, b) { + var c2, d, e; + if (b.dc()) { + return LCd(), LCd(), KCd; + } else { + c2 = new zyd(a, b.gc()); + for (e = new Fyd(a); e.e != e.i.gc(); ) { + d = Dyd(e); + b.Hc(d) && wtd(c2, d); + } + return c2; + } + } + function bkd(a, b, c2, d) { + if (b == 0) { + return d ? (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), a.o) : (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), FAd(a.o)); + } + return fid(a, b, c2, d); + } + function Tnd(a) { + var b, c2; + if (a.rb) { + for (b = 0, c2 = a.rb.i; b < c2; ++b) { + Cmd(qud(a.rb, b)); + } + } + if (a.vb) { + for (b = 0, c2 = a.vb.i; b < c2; ++b) { + Cmd(qud(a.vb, b)); + } + } + u1d((O6d(), M6d), a); + a.Bb |= 1; + } + function _nd(a, b, c2, d, e, f2, g, h, i3, j, k, l, m, n) { + aod(a, b, d, null, e, f2, g, h, i3, j, m, true, n); + CUd(a, k); + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 2); + !!c2 && DUd(a, c2); + EUd(a, l); + return a; + } + function jZd(b) { + var c2, d; + if (b == null) { + return null; + } + d = 0; + try { + d = Icb(b, Rie, Ohe) & aje; + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + c2 = rfb(b); + d = c2[0]; + } else + throw vbb(a); + } + return bdb(d); + } + function kZd(b) { + var c2, d; + if (b == null) { + return null; + } + d = 0; + try { + d = Icb(b, Rie, Ohe) & aje; + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + c2 = rfb(b); + d = c2[0]; + } else + throw vbb(a); + } + return bdb(d); + } + function bD(a, b) { + var c2, d, e; + e = a.h - b.h; + if (e < 0) { + return false; + } + c2 = a.l - b.l; + d = a.m - b.m + (c2 >> 22); + e += d >> 22; + if (e < 0) { + return false; + } + a.l = c2 & Eje; + a.m = d & Eje; + a.h = e & Fje; + return true; + } + function Fwb(a, b, c2, d, e, f2, g) { + var h, i3; + if (b.Ae() && (i3 = a.a.ue(c2, d), i3 < 0 || !e && i3 == 0)) { + return false; + } + if (b.Be() && (h = a.a.ue(c2, f2), h > 0 || !g && h == 0)) { + return false; + } + return true; + } + function Vcc(a, b) { + Occ(); + var c2; + c2 = a.j.g - b.j.g; + if (c2 != 0) { + return 0; + } + switch (a.j.g) { + case 2: + return Ycc(b, Ncc) - Ycc(a, Ncc); + case 4: + return Ycc(a, Mcc) - Ycc(b, Mcc); + } + return 0; + } + function Tqc(a) { + switch (a.g) { + case 0: + return Mqc; + case 1: + return Nqc; + case 2: + return Oqc; + case 3: + return Pqc; + case 4: + return Qqc; + case 5: + return Rqc; + default: + return null; + } + } + function End(a, b, c2) { + var d, e; + d = (e = new rUd(), yId(e, b), pnd(e, c2), wtd((!a.c && (a.c = new cUd(p5, a, 12, 10)), a.c), e), e); + AId(d, 0); + DId(d, 1); + CId(d, true); + BId(d, true); + return d; + } + function tud(a, b) { + var c2, d; + if (b >= a.i) + throw vbb(new $zd(b, a.i)); + ++a.j; + c2 = a.g[b]; + d = a.i - b - 1; + d > 0 && $fb(a.g, b + 1, a.g, b, d); + NC(a.g, --a.i, null); + a.fi(b, c2); + a.ci(); + return c2; + } + function UId(a, b) { + var c2, d; + if (a.Db >> 16 == 17) { + return a.Cb.ih(a, 21, c5, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? a.zh() : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function iDb(a) { + var b, c2, d, e; + mmb(); + Okb(a.c, a.a); + for (e = new olb(a.c); e.a < e.c.c.length; ) { + d = mlb(e); + for (c2 = new olb(a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 679); + b.Ke(d); + } + } + } + function pXb(a) { + var b, c2, d, e; + mmb(); + Okb(a.c, a.a); + for (e = new olb(a.c); e.a < e.c.c.length; ) { + d = mlb(e); + for (c2 = new olb(a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 369); + b.Ke(d); + } + } + } + function AGb(a) { + var b, c2, d, e, f2; + e = Ohe; + f2 = null; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 213); + if (c2.d.j ^ c2.e.j) { + b = c2.e.e - c2.d.e - c2.a; + if (b < e) { + e = b; + f2 = c2; + } + } + } + return f2; + } + function OSb() { + OSb = ccb; + MSb = new Nsd(Mme, (Bcb(), false)); + ISb = new Nsd(Nme, 100); + KSb = (yTb(), wTb); + JSb = new Nsd(Ome, KSb); + LSb = new Nsd(Pme, qme); + NSb = new Nsd(Qme, meb(Ohe)); + } + function ric(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + j = 0; + for (e = a.a[b], f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + k = CHc(d, c2); + for (i3 = k.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 11); + Rhb(a.f, h, meb(j++)); + } + } + } + function uqd(a, b, c2) { + var d, e, f2, g; + if (c2) { + e = c2.a.length; + d = new Yge(e); + for (g = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); g.Ob(); ) { + f2 = BD(g.Pb(), 19); + Rc(a, b, Vpd(tB(c2, f2.a))); + } + } + } + function vqd(a, b, c2) { + var d, e, f2, g; + if (c2) { + e = c2.a.length; + d = new Yge(e); + for (g = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); g.Ob(); ) { + f2 = BD(g.Pb(), 19); + Rc(a, b, Vpd(tB(c2, f2.a))); + } + } + } + function Bkc(a) { + gkc(); + var b; + b = BD(Ee(Ec(a.k), KC(F1, bne, 61, 2, 0, 1)), 122); + Klb(b, 0, b.length, null); + if (b[0] == (Ucd(), Acd) && b[1] == Tcd) { + NC(b, 0, Tcd); + NC(b, 1, Acd); + } + return b; + } + function JHc(a, b, c2) { + var d, e, f2; + e = HHc(a, b, c2); + f2 = KHc(a, e); + yHc(a.b); + cIc(a, b, c2); + mmb(); + Okb(e, new hIc(a)); + d = KHc(a, e); + yHc(a.b); + cIc(a, c2, b); + return new vgd(meb(f2), meb(d)); + } + function jJc() { + jJc = ccb; + gJc = e3c(new j3c(), (qUb(), pUb), (S8b(), h8b)); + hJc = new Msd("linearSegments.inputPrio", meb(0)); + iJc = new Msd("linearSegments.outputPrio", meb(0)); + } + function yRc() { + yRc = ccb; + uRc = new ARc("P1_TREEIFICATION", 0); + vRc = new ARc("P2_NODE_ORDERING", 1); + wRc = new ARc("P3_NODE_PLACEMENT", 2); + xRc = new ARc("P4_EDGE_ROUTING", 3); + } + function ZWc() { + ZWc = ccb; + UWc = (Y9c(), C9c); + XWc = T9c; + NWc = Y8c; + OWc = _8c; + PWc = b9c; + MWc = W8c; + QWc = e9c; + TWc = x9c; + KWc = (HWc(), wWc); + LWc = xWc; + RWc = zWc; + SWc = BWc; + VWc = CWc; + WWc = DWc; + YWc = FWc; + } + function rbd() { + rbd = ccb; + qbd = new tbd("UNKNOWN", 0); + nbd = new tbd("ABOVE", 1); + obd = new tbd("BELOW", 2); + pbd = new tbd("INLINE", 3); + new Msd("org.eclipse.elk.labelSide", qbd); + } + function rud(a, b) { + var c2; + if (a.ni() && b != null) { + for (c2 = 0; c2 < a.i; ++c2) { + if (pb(b, a.g[c2])) { + return c2; + } + } + } else { + for (c2 = 0; c2 < a.i; ++c2) { + if (PD(a.g[c2]) === PD(b)) { + return c2; + } + } + } + return -1; + } + function DZb(a, b, c2) { + var d, e; + if (b.c == (KAc(), IAc) && c2.c == HAc) { + return -1; + } else if (b.c == HAc && c2.c == IAc) { + return 1; + } + d = HZb(b.a, a.a); + e = HZb(c2.a, a.a); + return b.c == IAc ? e - d : d - e; + } + function Z_b(a, b, c2) { + if (!!c2 && (b < 0 || b > c2.a.c.length)) { + throw vbb(new Wdb("index must be >= 0 and <= layer node count")); + } + !!a.c && Lkb(a.c.a, a); + a.c = c2; + !!c2 && Dkb(c2.a, b, a); + } + function p7b(a, b) { + var c2, d, e; + for (d = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + e = BD(b.Kb(c2), 10); + return new cc(Qb(e.n.b + e.o.b / 2)); + } + return wb(), wb(), vb; + } + function rMc(a, b) { + this.c = new Lqb(); + this.a = a; + this.b = b; + this.d = BD(vNb(a, (wtc(), otc)), 304); + PD(vNb(a, (Nyc(), yxc))) === PD((_qc(), Zqc)) ? this.e = new bNc() : this.e = new WMc(); + } + function $dd(a, b) { + var c2, d, e, f2; + f2 = 0; + for (d = new olb(a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 33); + f2 += $wnd.Math.pow(c2.g * c2.f - b, 2); + } + e = $wnd.Math.sqrt(f2 / (a.c.length - 1)); + return e; + } + function bgd(a, b) { + var c2, d; + d = null; + if (a.Xe((Y9c(), O9c))) { + c2 = BD(a.We(O9c), 94); + c2.Xe(b) && (d = c2.We(b)); + } + d == null && !!a.yf() && (d = a.yf().We(b)); + d == null && (d = Ksd(b)); + return d; + } + function Vt(b, c2) { + var d, e; + d = b.Zc(c2); + try { + e = d.Pb(); + d.Qb(); + return e; + } catch (a) { + a = ubb(a); + if (JD(a, 109)) { + throw vbb(new qcb("Can't remove element " + c2)); + } else + throw vbb(a); + } + } + function qA(a, b) { + var c2, d, e; + d = new eB(); + e = new fB(d.q.getFullYear() - nje, d.q.getMonth(), d.q.getDate()); + c2 = pA(a, b, e); + if (c2 == 0 || c2 < b.length) { + throw vbb(new Wdb(b)); + } + return e; + } + function _tb(a, b) { + var c2, d, e; + uCb(b); + lCb(b != a); + e = a.b.c.length; + for (d = b.Kc(); d.Ob(); ) { + c2 = d.Pb(); + Ekb(a.b, uCb(c2)); + } + if (e != a.b.c.length) { + aub(a, 0); + return true; + } + return false; + } + function bTb() { + bTb = ccb; + VSb = (Y9c(), O8c); + new Osd(B8c, (Bcb(), true)); + YSb = Y8c; + ZSb = _8c; + $Sb = b9c; + XSb = W8c; + _Sb = e9c; + aTb = x9c; + USb = (OSb(), MSb); + SSb = JSb; + TSb = LSb; + WSb = NSb; + RSb = ISb; + } + function MZb(a, b) { + if (b == a.c) { + return a.d; + } else if (b == a.d) { + return a.c; + } else { + throw vbb(new Wdb("'port' must be either the source port or target port of the edge.")); + } + } + function C3b(a, b, c2) { + var d, e; + e = a.o; + d = a.d; + switch (b.g) { + case 1: + return -d.d - c2; + case 3: + return e.b + d.a + c2; + case 2: + return e.a + d.c + c2; + case 4: + return -d.b - c2; + default: + return 0; + } + } + function H6b(a, b, c2, d) { + var e, f2, g, h; + $_b(b, BD(d.Xb(0), 29)); + h = d.bd(1, d.gc()); + for (f2 = BD(c2.Kb(b), 20).Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 17); + g = e.c.i == b ? e.d.i : e.c.i; + H6b(a, g, c2, h); + } + } + function Xec(a) { + var b; + b = new Lqb(); + if (wNb(a, (wtc(), ttc))) { + return BD(vNb(a, ttc), 83); + } + MAb(JAb(new YAb(null, new Kub(a.j, 16)), new Zec()), new _ec(b)); + yNb(a, ttc, b); + return b; + } + function cmd(a, b) { + var c2, d; + if (a.Db >> 16 == 6) { + return a.Cb.ih(a, 6, B2, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (Thd(), Lhd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Eod(a, b) { + var c2, d; + if (a.Db >> 16 == 7) { + return a.Cb.ih(a, 1, C2, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (Thd(), Nhd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function lpd(a, b) { + var c2, d; + if (a.Db >> 16 == 9) { + return a.Cb.ih(a, 9, E2, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (Thd(), Phd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function mQd(a, b) { + var c2, d; + if (a.Db >> 16 == 5) { + return a.Cb.ih(a, 9, h5, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (jGd(), VFd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function KHd(a, b) { + var c2, d; + if (a.Db >> 16 == 3) { + return a.Cb.ih(a, 0, k5, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (jGd(), OFd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Snd(a, b) { + var c2, d; + if (a.Db >> 16 == 7) { + return a.Cb.ih(a, 6, o5, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (jGd(), cGd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function ird() { + this.a = new bqd(); + this.g = new wo(); + this.j = new wo(); + this.b = new Lqb(); + this.d = new wo(); + this.i = new wo(); + this.k = new Lqb(); + this.c = new Lqb(); + this.e = new Lqb(); + this.f = new Lqb(); + } + function MCd(a, b, c2) { + var d, e, f2; + c2 < 0 && (c2 = 0); + f2 = a.i; + for (e = c2; e < f2; e++) { + d = qud(a, e); + if (b == null) { + if (d == null) { + return e; + } + } else if (PD(b) === PD(d) || pb(b, d)) { + return e; + } + } + return -1; + } + function b1d(a, b) { + var c2, d; + c2 = b.Hh(a.a); + if (!c2) { + return null; + } else { + d = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), Awe)); + return dfb(Bwe, d) ? u1d(a, bKd(b.Hj())) : d; + } + } + function p6d(a, b) { + var c2, d; + if (b) { + if (b == a) { + return true; + } + c2 = 0; + for (d = BD(b, 49).eh(); !!d && d != b; d = d.eh()) { + if (++c2 > Wje) { + return p6d(a, d); + } + if (d == a) { + return true; + } + } + } + return false; + } + function HKb(a) { + CKb(); + switch (a.q.g) { + case 5: + EKb(a, (Ucd(), Acd)); + EKb(a, Rcd); + break; + case 4: + FKb(a, (Ucd(), Acd)); + FKb(a, Rcd); + break; + default: + GKb(a, (Ucd(), Acd)); + GKb(a, Rcd); + } + } + function LKb(a) { + CKb(); + switch (a.q.g) { + case 5: + IKb(a, (Ucd(), zcd)); + IKb(a, Tcd); + break; + case 4: + JKb(a, (Ucd(), zcd)); + JKb(a, Tcd); + break; + default: + KKb(a, (Ucd(), zcd)); + KKb(a, Tcd); + } + } + function XQb(a) { + var b, c2; + b = BD(vNb(a, (wSb(), pSb)), 19); + if (b) { + c2 = b.a; + c2 == 0 ? yNb(a, (HSb(), GSb), new Gub()) : yNb(a, (HSb(), GSb), new Hub(c2)); + } else { + yNb(a, (HSb(), GSb), new Hub(1)); + } + } + function V$b(a, b) { + var c2; + c2 = a.i; + switch (b.g) { + case 1: + return -(a.n.b + a.o.b); + case 2: + return a.n.a - c2.o.a; + case 3: + return a.n.b - c2.o.b; + case 4: + return -(a.n.a + a.o.a); + } + return 0; + } + function hbc(a, b) { + switch (a.g) { + case 0: + return b == (Ctc(), ytc) ? dbc : ebc; + case 1: + return b == (Ctc(), ytc) ? dbc : cbc; + case 2: + return b == (Ctc(), ytc) ? cbc : ebc; + default: + return cbc; + } + } + function v$c(a, b) { + var c2, d, e; + Lkb(a.a, b); + a.e -= b.r + (a.a.c.length == 0 ? 0 : a.c); + e = ere; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 187); + e = $wnd.Math.max(e, c2.d); + } + a.b = e; + } + function Lld(a, b) { + var c2, d; + if (a.Db >> 16 == 3) { + return a.Cb.ih(a, 12, E2, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (Thd(), Khd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function Uod(a, b) { + var c2, d; + if (a.Db >> 16 == 11) { + return a.Cb.ih(a, 10, E2, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (Thd(), Ohd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function PSd(a, b) { + var c2, d; + if (a.Db >> 16 == 10) { + return a.Cb.ih(a, 11, c5, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (jGd(), aGd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function qUd(a, b) { + var c2, d; + if (a.Db >> 16 == 10) { + return a.Cb.ih(a, 12, n5, b); + } + return d = zUd(BD(XKd((c2 = BD(Ajd(a, 16), 26), !c2 ? (jGd(), dGd) : c2), a.Db >> 16), 18)), a.Cb.ih(a, d.n, d.f, b); + } + function wId(a) { + var b; + if ((a.Bb & 1) == 0 && !!a.r && a.r.kh()) { + b = BD(a.r, 49); + a.r = BD(xid(a, b), 138); + a.r != b && (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 8, b, a.r)); + } + return a.r; + } + function yHb(a, b, c2) { + var d; + d = OC(GC(UD, 1), Vje, 25, 15, [BHb(a, (gHb(), dHb), b, c2), BHb(a, eHb, b, c2), BHb(a, fHb, b, c2)]); + if (a.f) { + d[0] = $wnd.Math.max(d[0], d[2]); + d[2] = d[0]; + } + return d; + } + function O9b(a, b) { + var c2, d, e; + e = V9b(a, b); + if (e.c.length == 0) { + return; + } + Okb(e, new pac()); + c2 = e.c.length; + for (d = 0; d < c2; d++) { + K9b(a, (tCb(d, e.c.length), BD(e.c[d], 286)), R9b(a, e, d)); + } + } + function qkc(a) { + var b, c2, d, e; + for (e = BD(Qc(a.a, (Xjc(), Sjc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 101); + for (c2 = Ec(d.k).Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 61); + kkc(a, d, b, (Fkc(), Dkc), 1); + } + } + } + function voc(a) { + var b, c2; + if (a.k == (j0b(), g0b)) { + for (c2 = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + if (!OZb(b) && a.c == LZb(b, a).c) { + return true; + } + } + } + return false; + } + function JNc(a) { + var b, c2; + if (a.k == (j0b(), g0b)) { + for (c2 = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + if (!OZb(b) && b.c.i.c == b.d.i.c) { + return true; + } + } + } + return false; + } + function HUc(a, b) { + var c2, d, e, f2; + Odd(b, "Dull edge routing", 1); + for (f2 = Jsb(a.b, 0); f2.b != f2.d.c; ) { + e = BD(Xsb(f2), 86); + for (d = Jsb(e.d, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 188); + Osb(c2.a); + } + } + } + function xqd(a, b) { + var c2, d, e, f2, g; + if (b) { + e = b.a.length; + c2 = new Yge(e); + for (g = (c2.b - c2.a) * c2.c < 0 ? (Xge(), Wge) : new she(c2); g.Ob(); ) { + f2 = BD(g.Pb(), 19); + d = Zpd(b, f2.a); + !!d && ard(a, d); + } + } + } + function DZd() { + tZd(); + var a, b; + xZd((NFd(), MFd)); + wZd(MFd); + Tnd(MFd); + FQd = (jGd(), YFd); + for (b = new olb(rZd); b.a < b.c.c.length; ) { + a = BD(mlb(b), 241); + QQd(a, YFd, null); + } + return true; + } + function eD(a, b) { + var c2, d, e, f2, g, h, i3, j; + i3 = a.h >> 19; + j = b.h >> 19; + if (i3 != j) { + return j - i3; + } + e = a.h; + h = b.h; + if (e != h) { + return e - h; + } + d = a.m; + g = b.m; + if (d != g) { + return d - g; + } + c2 = a.l; + f2 = b.l; + return c2 - f2; + } + function fFb() { + fFb = ccb; + eFb = (rFb(), oFb); + dFb = new Nsd(Yke, eFb); + cFb = (UEb(), TEb); + bFb = new Nsd(Zke, cFb); + aFb = (MEb(), LEb); + _Eb = new Nsd($ke, aFb); + $Eb = new Nsd(_ke, (Bcb(), true)); + } + function cfc(a, b, c2) { + var d, e; + d = b * c2; + if (JD(a.g, 145)) { + e = ugc(a); + if (e.f.d) { + e.f.a || (a.d.a += d + ple); + } else { + a.d.d -= d + ple; + a.d.a += d + ple; + } + } else if (JD(a.g, 10)) { + a.d.d -= d; + a.d.a += 2 * d; + } + } + function vmc(a, b, c2) { + var d, e, f2, g, h; + e = a[c2.g]; + for (h = new olb(b.d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f2 = g.i; + if (!!f2 && f2.i == c2) { + d = g.d[c2.g]; + e[d] = $wnd.Math.max(e[d], f2.j.b); + } + } + } + function AZc(a, b) { + var c2, d, e, f2, g; + d = 0; + e = 0; + c2 = 0; + for (g = new olb(b.d); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 443); + a$c(f2); + d = $wnd.Math.max(d, f2.b); + e += f2.d + (c2 > 0 ? a.g : 0); + ++c2; + } + b.b = d; + b.e = e; + } + function to(a) { + var b, c2, d; + d = a.b; + if (Lp(a.i, d.length)) { + c2 = d.length * 2; + a.b = KC(GF, Gie, 317, c2, 0, 1); + a.c = KC(GF, Gie, 317, c2, 0, 1); + a.f = c2 - 1; + a.i = 0; + for (b = a.a; b; b = b.c) { + po(a, b, b); + } + ++a.g; + } + } + function cNb(a, b, c2, d) { + var e, f2, g, h; + for (e = 0; e < b.o; e++) { + f2 = e - b.j + c2; + for (g = 0; g < b.p; g++) { + h = g - b.k + d; + YMb(b, e, g) ? jNb(a, f2, h) || lNb(a, f2, h) : $Mb(b, e, g) && (hNb(a, f2, h) || mNb(a, f2, h)); + } + } + } + function Ooc(a, b, c2) { + var d; + d = b.c.i; + if (d.k == (j0b(), g0b)) { + yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)); + yNb(a, Wsc, BD(vNb(d, Wsc), 11)); + } else { + yNb(a, (wtc(), Vsc), b.c); + yNb(a, Wsc, c2.d); + } + } + function l6c(a, b, c2) { + i6c(); + var d, e, f2, g, h, i3; + g = b / 2; + f2 = c2 / 2; + d = $wnd.Math.abs(a.a); + e = $wnd.Math.abs(a.b); + h = 1; + i3 = 1; + d > g && (h = g / d); + e > f2 && (i3 = f2 / e); + Y6c(a, $wnd.Math.min(h, i3)); + return a; + } + function ond() { + Smd(); + var b, c2; + try { + c2 = BD(mUd((yFd(), xFd), yte), 2014); + if (c2) { + return c2; + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + b = a; + uvd((h0d(), b)); + } else + throw vbb(a); + } + return new knd(); + } + function Y9d() { + A9d(); + var b, c2; + try { + c2 = BD(mUd((yFd(), xFd), Ewe), 2024); + if (c2) { + return c2; + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + b = a; + uvd((h0d(), b)); + } else + throw vbb(a); + } + return new U9d(); + } + function qZd() { + Smd(); + var b, c2; + try { + c2 = BD(mUd((yFd(), xFd), _ve), 1941); + if (c2) { + return c2; + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + b = a; + uvd((h0d(), b)); + } else + throw vbb(a); + } + return new mZd(); + } + function HQd(a, b, c2) { + var d, e; + e = a.e; + a.e = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 4, e, b); + !c2 ? c2 = d : c2.Ei(d); + } + e != b && (b ? c2 = QQd(a, MQd(a, b), c2) : c2 = QQd(a, a.a, c2)); + return c2; + } + function nB() { + eB.call(this); + this.e = -1; + this.a = false; + this.p = Rie; + this.k = -1; + this.c = -1; + this.b = -1; + this.g = false; + this.f = -1; + this.j = -1; + this.n = -1; + this.i = -1; + this.d = -1; + this.o = Rie; + } + function qEb(a, b) { + var c2, d, e; + d = a.b.d.d; + a.a || (d += a.b.d.a); + e = b.b.d.d; + b.a || (e += b.b.d.a); + c2 = Kdb(d, e); + if (c2 == 0) { + if (!a.a && b.a) { + return -1; + } else if (!b.a && a.a) { + return 1; + } + } + return c2; + } + function eOb(a, b) { + var c2, d, e; + d = a.b.b.d; + a.a || (d += a.b.b.a); + e = b.b.b.d; + b.a || (e += b.b.b.a); + c2 = Kdb(d, e); + if (c2 == 0) { + if (!a.a && b.a) { + return -1; + } else if (!b.a && a.a) { + return 1; + } + } + return c2; + } + function PVb(a, b) { + var c2, d, e; + d = a.b.g.d; + a.a || (d += a.b.g.a); + e = b.b.g.d; + b.a || (e += b.b.g.a); + c2 = Kdb(d, e); + if (c2 == 0) { + if (!a.a && b.a) { + return -1; + } else if (!b.a && a.a) { + return 1; + } + } + return c2; + } + function ZTb() { + ZTb = ccb; + WTb = c3c(e3c(e3c(e3c(new j3c(), (qUb(), oUb), (S8b(), m8b)), oUb, q8b), pUb, x8b), pUb, a8b); + YTb = e3c(e3c(new j3c(), oUb, S7b), oUb, b8b); + XTb = c3c(new j3c(), pUb, d8b); + } + function s3b(a) { + var b, c2, d, e, f2; + b = BD(vNb(a, (wtc(), Csc)), 83); + f2 = a.n; + for (d = b.Cc().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 306); + e = c2.i; + e.c += f2.a; + e.d += f2.b; + c2.c ? VHb(c2) : XHb(c2); + } + yNb(a, Csc, null); + } + function qmc(a, b, c2) { + var d, e; + e = a.b; + d = e.d; + switch (b.g) { + case 1: + return -d.d - c2; + case 2: + return e.o.a + d.c + c2; + case 3: + return e.o.b + d.a + c2; + case 4: + return -d.b - c2; + default: + return -1; + } + } + function BXc(a) { + var b, c2, d, e, f2; + d = 0; + e = dme; + if (a.b) { + for (b = 0; b < 360; b++) { + c2 = b * 0.017453292519943295; + zXc(a, a.d, 0, 0, dre, c2); + f2 = a.b.ig(a.d); + if (f2 < e) { + d = c2; + e = f2; + } + } + } + zXc(a, a.d, 0, 0, dre, d); + } + function E$c(a, b) { + var c2, d, e, f2; + f2 = new Lqb(); + b.e = null; + b.f = null; + for (d = new olb(b.i); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 65); + e = BD(Ohb(a.g, c2.a), 46); + c2.a = D6c(c2.b); + Rhb(f2, c2.a, e); + } + a.g = f2; + } + function t$c(a, b, c2) { + var d, e, f2, g, h, i3; + e = b - a.e; + f2 = e / a.d.c.length; + g = 0; + for (i3 = new olb(a.d); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 443); + d = a.b - h.b + c2; + _Zc(h, h.e + g * f2, h.f); + XZc(h, f2, d); + ++g; + } + } + function YBd(a) { + var b; + a.f.qj(); + if (a.b != -1) { + ++a.b; + b = a.f.d[a.a]; + if (a.b < b.i) { + return; + } + ++a.a; + } + for (; a.a < a.f.d.length; ++a.a) { + b = a.f.d[a.a]; + if (!!b && b.i != 0) { + a.b = 0; + return; + } + } + a.b = -1; + } + function j0d(a, b) { + var c2, d, e; + e = b.c.length; + c2 = l0d(a, e == 0 ? "" : (tCb(0, b.c.length), GD(b.c[0]))); + for (d = 1; d < e && !!c2; ++d) { + c2 = BD(c2, 49).oh((tCb(d, b.c.length), GD(b.c[d]))); + } + return c2; + } + function rEc(a, b) { + var c2, d; + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + a.c[c2.c.p][c2.p].a = Aub(a.i); + a.c[c2.c.p][c2.p].d = Edb(a.c[c2.c.p][c2.p].a); + a.c[c2.c.p][c2.p].b = 1; + } + } + function _dd(a, b) { + var c2, d, e, f2; + f2 = 0; + for (d = new olb(a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 157); + f2 += $wnd.Math.pow(red(c2) * qed(c2) - b, 2); + } + e = $wnd.Math.sqrt(f2 / (a.c.length - 1)); + return e; + } + function LHc(a, b, c2, d) { + var e, f2, g; + f2 = GHc(a, b, c2, d); + g = MHc(a, f2); + bIc(a, b, c2, d); + yHc(a.b); + mmb(); + Okb(f2, new lIc(a)); + e = MHc(a, f2); + bIc(a, c2, b, d); + yHc(a.b); + return new vgd(meb(g), meb(e)); + } + function cJc(a, b, c2) { + var d, e; + Odd(c2, "Interactive node placement", 1); + a.a = BD(vNb(b, (wtc(), otc)), 304); + for (e = new olb(b.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + bJc(a, d); + } + Qdd(c2); + } + function MVc(a, b) { + var c2; + Odd(b, "General Compactor", 1); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + c2 = qWc(BD(hkd(a, (ZWc(), LWc)), 380)); + c2.hg(a); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + } + function Dfd(a, b, c2) { + var d, e; + nmd(a, a.j + b, a.k + c2); + for (e = new Fyd((!a.a && (a.a = new xMd(y2, a, 5)), a.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 469); + ukd(d, d.a + b, d.b + c2); + } + gmd(a, a.b + b, a.c + c2); + } + function vld(a, b, c2, d) { + switch (c2) { + case 7: + return !a.e && (a.e = new y5d(B2, a, 7, 4)), Sxd(a.e, b, d); + case 8: + return !a.d && (a.d = new y5d(B2, a, 8, 5)), Sxd(a.d, b, d); + } + return Fkd(a, b, c2, d); + } + function wld(a, b, c2, d) { + switch (c2) { + case 7: + return !a.e && (a.e = new y5d(B2, a, 7, 4)), Txd(a.e, b, d); + case 8: + return !a.d && (a.d = new y5d(B2, a, 8, 5)), Txd(a.d, b, d); + } + return Gkd(a, b, c2, d); + } + function lqd(a, b, c2) { + var d, e, f2, g, h; + if (c2) { + f2 = c2.a.length; + d = new Yge(f2); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(c2, g.a); + !!e && drd(a, e, b); + } + } + } + function HAd(a, b, c2) { + var d, e, f2, g, h; + a.qj(); + f2 = b == null ? 0 : tb(b); + if (a.f > 0) { + g = (f2 & Ohe) % a.d.length; + e = wAd(a, g, f2, b); + if (e) { + h = e.ed(c2); + return h; + } + } + d = a.tj(f2, b, c2); + a.c.Fc(d); + return null; + } + function t1d(a, b) { + var c2, d, e, f2; + switch (o1d(a, b)._k()) { + case 3: + case 2: { + c2 = OKd(b); + for (e = 0, f2 = c2.i; e < f2; ++e) { + d = BD(qud(c2, e), 34); + if ($1d(q1d(a, d)) == 5) { + return d; + } + } + break; + } + } + return null; + } + function Qs(a) { + var b, c2, d, e, f2; + if (Lp(a.f, a.b.length)) { + d = KC(BG, Gie, 330, a.b.length * 2, 0, 1); + a.b = d; + e = d.length - 1; + for (c2 = a.a; c2 != a; c2 = c2.Rd()) { + f2 = BD(c2, 330); + b = f2.d & e; + f2.a = d[b]; + d[b] = f2; + } + } + } + function DJb(a, b) { + var c2, d, e, f2; + f2 = 0; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + f2 = $wnd.Math.max(f2, d.e.a + d.b.rf().a); + } + c2 = BD(Mpb(a.b, b), 124); + c2.n.b = 0; + c2.a.a = f2; + } + function MKb(a, b) { + var c2, d, e, f2; + c2 = 0; + for (f2 = BD(BD(Qc(a.r, b), 21), 84).Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 111); + c2 = $wnd.Math.max(c2, e.e.b + e.b.rf().b); + } + d = BD(Mpb(a.b, b), 124); + d.n.d = 0; + d.a.b = c2; + } + function INc(a) { + var b, c2; + c2 = BD(vNb(a, (wtc(), Ksc)), 21); + b = k3c(zNc); + c2.Hc((Orc(), Lrc)) && d3c(b, CNc); + c2.Hc(Nrc) && d3c(b, ENc); + c2.Hc(Erc) && d3c(b, ANc); + c2.Hc(Grc) && d3c(b, BNc); + return b; + } + function j1c(a, b) { + var c2; + Odd(b, "Delaunay triangulation", 1); + c2 = new Rkb(); + Hkb(a.i, new n1c(c2)); + Ccb(DD(vNb(a, (XNb(), VNb)))) && "null10bw"; + !a.e ? a.e = NCb(c2) : ye(a.e, NCb(c2)); + Qdd(b); + } + function q6c(a) { + if (a < 0) { + throw vbb(new Wdb("The input must be positive")); + } else + return a < h6c.length ? Sbb(h6c[a]) : $wnd.Math.sqrt(dre * a) * (y6c(a, a) / x6c(2.718281828459045, a)); + } + function pud(a, b) { + var c2; + if (a.ni() && b != null) { + for (c2 = 0; c2 < a.i; ++c2) { + if (pb(b, a.g[c2])) { + return true; + } + } + } else { + for (c2 = 0; c2 < a.i; ++c2) { + if (PD(a.g[c2]) === PD(b)) { + return true; + } + } + } + return false; + } + function jr(a, b) { + if (b == null) { + while (a.a.Ob()) { + if (BD(a.a.Pb(), 42).dd() == null) { + return true; + } + } + } else { + while (a.a.Ob()) { + if (pb(b, BD(a.a.Pb(), 42).dd())) { + return true; + } + } + } + return false; + } + function zy(a, b) { + var c2, d, e; + if (b === a) { + return true; + } else if (JD(b, 664)) { + e = BD(b, 1947); + return Ue((d = a.g, !d ? a.g = new vi(a) : d), (c2 = e.g, !c2 ? e.g = new vi(e) : c2)); + } else { + return false; + } + } + function Tz(a) { + var b, c2, d, e; + b = "Sz"; + c2 = "ez"; + e = $wnd.Math.min(a.length, 5); + for (d = e - 1; d >= 0; d--) { + if (dfb(a[d].d, b) || dfb(a[d].d, c2)) { + a.length >= d + 1 && a.splice(0, d + 1); + break; + } + } + return a; + } + function Abb(a, b) { + var c2; + if (Fbb(a) && Fbb(b)) { + c2 = a / b; + if (Kje < c2 && c2 < Ije) { + return c2 < 0 ? $wnd.Math.ceil(c2) : $wnd.Math.floor(c2); + } + } + return zbb(UC(Fbb(a) ? Rbb(a) : a, Fbb(b) ? Rbb(b) : b, false)); + } + function LZb(a, b) { + if (b == a.c.i) { + return a.d.i; + } else if (b == a.d.i) { + return a.c.i; + } else { + throw vbb(new Wdb("'node' must either be the source node or target node of the edge.")); + } + } + function C2b(a) { + var b, c2, d, e; + e = BD(vNb(a, (wtc(), xsc)), 37); + if (e) { + d = new d7c(); + b = Q_b(a.c.i); + while (b != e) { + c2 = b.e; + b = Q_b(c2); + O6c(P6c(P6c(d, c2.n), b.c), b.d.b, b.d.d); + } + return d; + } + return w2b; + } + function Ldc(a) { + var b; + b = BD(vNb(a, (wtc(), ntc)), 403); + MAb(LAb(new YAb(null, new Kub(b.d, 16)), new Ydc()), new $dc(a)); + MAb(JAb(new YAb(null, new Kub(b.d, 16)), new aec()), new cec(a)); + } + function woc(a, b) { + var c2, d, e, f2; + e = b ? U_b(a) : R_b(a); + for (d = new Sr(ur(e.a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + f2 = LZb(c2, a); + if (f2.k == (j0b(), g0b) && f2.c != a.c) { + return f2; + } + } + return null; + } + function HDc(a) { + var b, c2, d; + for (c2 = new olb(a.p); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + if (b.k != (j0b(), h0b)) { + continue; + } + d = b.o.b; + a.i = $wnd.Math.min(a.i, d); + a.g = $wnd.Math.max(a.g, d); + } + } + function oEc(a, b, c2) { + var d, e, f2; + for (f2 = new olb(b); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 10); + a.c[d.c.p][d.p].e = false; + } + for (e = new olb(b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + nEc(a, d, c2); + } + } + function WOc(a, b, c2) { + var d, e; + d = vPc(b.j, c2.s, c2.c) + vPc(c2.e, b.s, b.c); + e = vPc(c2.j, b.s, b.c) + vPc(b.e, c2.s, c2.c); + if (d == e) { + if (d > 0) { + a.b += 2; + a.a += d; + } + } else { + a.b += 1; + a.a += $wnd.Math.min(d, e); + } + } + function Rpd(a, b) { + var c2, d; + d = false; + if (ND(b)) { + d = true; + Qpd(a, new yC(GD(b))); + } + if (!d) { + if (JD(b, 236)) { + d = true; + Qpd(a, (c2 = Kcb(BD(b, 236)), new TB(c2))); + } + } + if (!d) { + throw vbb(new vcb(Ute)); + } + } + function IMd(a, b, c2, d) { + var e, f2, g; + e = new pSd(a.e, 1, 10, (g = b.c, JD(g, 88) ? BD(g, 26) : (jGd(), _Fd)), (f2 = c2.c, JD(f2, 88) ? BD(f2, 26) : (jGd(), _Fd)), HLd(a, b), false); + !d ? d = e : d.Ei(e); + return d; + } + function T_b(a) { + var b, c2; + switch (BD(vNb(Q_b(a), (Nyc(), ixc)), 420).g) { + case 0: + b = a.n; + c2 = a.o; + return new f7c(b.a + c2.a / 2, b.b + c2.b / 2); + case 1: + return new g7c(a.n); + default: + return null; + } + } + function lrc() { + lrc = ccb; + irc = new mrc(ane, 0); + hrc = new mrc("LEFTUP", 1); + krc = new mrc("RIGHTUP", 2); + grc = new mrc("LEFTDOWN", 3); + jrc = new mrc("RIGHTDOWN", 4); + frc = new mrc("BALANCED", 5); + } + function FFc(a, b, c2) { + var d, e, f2; + d = Kdb(a.a[b.p], a.a[c2.p]); + if (d == 0) { + e = BD(vNb(b, (wtc(), Qsc)), 15); + f2 = BD(vNb(c2, Qsc), 15); + if (e.Hc(c2)) { + return -1; + } else if (f2.Hc(b)) { + return 1; + } + } + return d; + } + function jXc(a) { + switch (a.g) { + case 1: + return new XVc(); + case 2: + return new ZVc(); + case 3: + return new VVc(); + case 0: + return null; + default: + throw vbb(new Wdb(jre + (a.f != null ? a.f : "" + a.g))); + } + } + function Ikd(a, b, c2) { + switch (b) { + case 1: + !a.n && (a.n = new cUd(D2, a, 1, 7)); + Uxd(a.n); + !a.n && (a.n = new cUd(D2, a, 1, 7)); + ytd(a.n, BD(c2, 14)); + return; + case 2: + Lkd(a, GD(c2)); + return; + } + ekd(a, b, c2); + } + function Zkd(a, b, c2) { + switch (b) { + case 3: + ald(a, Edb(ED(c2))); + return; + case 4: + cld(a, Edb(ED(c2))); + return; + case 5: + dld(a, Edb(ED(c2))); + return; + case 6: + eld(a, Edb(ED(c2))); + return; + } + Ikd(a, b, c2); + } + function Fnd(a, b, c2) { + var d, e, f2; + f2 = (d = new rUd(), d); + e = xId(f2, b, null); + !!e && e.Fi(); + pnd(f2, c2); + wtd((!a.c && (a.c = new cUd(p5, a, 12, 10)), a.c), f2); + AId(f2, 0); + DId(f2, 1); + CId(f2, true); + BId(f2, true); + } + function mUd(a, b) { + var c2, d, e; + c2 = Crb(a.g, b); + if (JD(c2, 235)) { + e = BD(c2, 235); + e.Qh() == null && void 0; + return e.Nh(); + } else if (JD(c2, 498)) { + d = BD(c2, 1938); + e = d.b; + return e; + } else { + return null; + } + } + function Ui(a, b, c2, d) { + var e, f2; + Qb(b); + Qb(c2); + f2 = BD(tn(a.d, b), 19); + Ob(!!f2, "Row %s not in %s", b, a.e); + e = BD(tn(a.b, c2), 19); + Ob(!!e, "Column %s not in %s", c2, a.c); + return Wi(a, f2.a, e.a, d); + } + function JC(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l; + k = e[f2]; + j = f2 == g - 1; + h = j ? d : 0; + l = LC(h, k); + d != 10 && OC(GC(a, g - f2), b[f2], c2[f2], h, l); + if (!j) { + ++f2; + for (i3 = 0; i3 < k; ++i3) { + l[i3] = JC(a, b, c2, d, e, f2, g); + } + } + return l; + } + function Eyd(b) { + if (b.g == -1) { + throw vbb(new Ydb()); + } + b.mj(); + try { + b.i.$c(b.g); + b.f = b.i.j; + b.g < b.e && --b.e; + b.g = -1; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + } + function hYb(a, b) { + a.b.a = $wnd.Math.min(a.b.a, b.c); + a.b.b = $wnd.Math.min(a.b.b, b.d); + a.a.a = $wnd.Math.max(a.a.a, b.c); + a.a.b = $wnd.Math.max(a.a.b, b.d); + return a.c[a.c.length] = b, true; + } + function nZb(a) { + var b, c2, d, e; + e = -1; + d = 0; + for (c2 = new olb(a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 243); + if (b.c == (KAc(), HAc)) { + e = d == 0 ? 0 : d - 1; + break; + } else + d == a.c.length - 1 && (e = d); + d += 1; + } + return e; + } + function UZc(a) { + var b, c2, d, e; + e = 0; + b = 0; + for (d = new olb(a.c); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 33); + dld(c2, a.e + e); + eld(c2, a.f); + e += c2.g + a.b; + b = $wnd.Math.max(b, c2.f + a.b); + } + a.d = e - a.b; + a.a = b - a.b; + } + function bEb(a) { + var b, c2, d; + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + d = b.d.c; + b.d.c = b.d.d; + b.d.d = d; + d = b.d.b; + b.d.b = b.d.a; + b.d.a = d; + d = b.b.a; + b.b.a = b.b.b; + b.b.b = d; + } + RDb(a); + } + function BVb(a) { + var b, c2, d; + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + d = b.g.c; + b.g.c = b.g.d; + b.g.d = d; + d = b.g.b; + b.g.b = b.g.a; + b.g.a = d; + d = b.e.a; + b.e.a = b.e.b; + b.e.b = d; + } + sVb(a); + } + function Lmc(a) { + var b, c2, d, e, f2; + f2 = Ec(a.k); + for (c2 = (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + if (b != Scd && !f2.Hc(b)) { + return b; + } + } + return null; + } + function znc(a, b) { + var c2, d; + d = BD(Etb(KAb(JAb(new YAb(null, new Kub(b.j, 16)), new Pnc()))), 11); + if (d) { + c2 = BD(Ikb(d.e, 0), 17); + if (c2) { + return BD(vNb(c2, (wtc(), Zsc)), 19).a; + } + } + return yzc(a.b); + } + function CCc(a, b) { + var c2, d, e, f2; + for (f2 = new olb(b.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + Blb(a.d); + for (d = new Sr(ur(U_b(e).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + zCc(a, e, c2.d.i); + } + } + } + function NZc(a, b) { + var c2, d; + Lkb(a.b, b); + for (d = new olb(a.n); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 211); + if (Jkb(c2.c, b, 0) != -1) { + Lkb(c2.c, b); + UZc(c2); + c2.c.c.length == 0 && Lkb(a.n, c2); + break; + } + } + HZc(a); + } + function $Zc(a, b) { + var c2, d, e, f2, g; + g = a.f; + e = 0; + f2 = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 187); + OZc(c2, a.e, g); + KZc(c2, b); + f2 = $wnd.Math.max(f2, c2.r); + g += c2.d + a.c; + e = g; + } + a.d = f2; + a.b = e; + } + function hVc(a) { + var b, c2; + c2 = $sd(a); + if (Qq(c2)) { + return null; + } else { + b = (Qb(c2), BD(mr(new Sr(ur(c2.a.Kc(), new Sq()))), 79)); + return atd(BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82)); + } + } + function XId(a) { + var b; + if (!a.o) { + b = a.Lj(); + b ? a.o = new dYd(a, a, null) : a.rk() ? a.o = new uVd(a, null) : $1d(q1d((O6d(), M6d), a)) == 1 ? a.o = new nYd(a) : a.o = new sYd(a, null); + } + return a.o; + } + function w6d(a, b, c2, d) { + var e, f2, g, h, i3; + if (c2.mh(b)) { + e = (g = b, !g ? null : BD(d, 49).xh(g)); + if (e) { + i3 = c2.ah(b); + h = b.t; + if (h > 1 || h == -1) { + f2 = BD(i3, 15); + e.Wb(t6d(a, f2)); + } else { + e.Wb(s6d(a, BD(i3, 56))); + } + } + } + } + function Zbb(b, c2, d, e) { + Ybb(); + var f2 = Wbb; + function g() { + for (var a = 0; a < f2.length; a++) { + f2[a](); + } + } + if (b) { + try { + Ihe(g)(); + } catch (a) { + b(c2, a); + } + } else { + Ihe(g)(); + } + } + function Kgc(a) { + var b, c2, d, e, f2; + for (d = new nib(new eib(a.b).a); d.b; ) { + c2 = lib(d); + b = BD(c2.cd(), 10); + f2 = BD(BD(c2.dd(), 46).a, 10); + e = BD(BD(c2.dd(), 46).b, 8); + P6c(X6c(b.n), P6c(R6c(f2.n), e)); + } + } + function llc(a) { + switch (BD(vNb(a.b, (Nyc(), Vwc)), 375).g) { + case 1: + MAb(NAb(LAb(new YAb(null, new Kub(a.d, 16)), new Glc()), new Ilc()), new Klc()); + break; + case 2: + nlc(a); + break; + case 0: + mlc(a); + } + } + function KXc(a, b, c2) { + var d; + Odd(c2, "Straight Line Edge Routing", 1); + c2.n && !!b && Tdd(c2, i6d(b), (pgd(), mgd)); + d = BD(hkd(b, (MUc(), LUc)), 33); + LXc(a, d); + c2.n && !!b && Tdd(c2, i6d(b), (pgd(), mgd)); + } + function i8c() { + i8c = ccb; + h8c = new j8c("V_TOP", 0); + g8c = new j8c("V_CENTER", 1); + f8c = new j8c("V_BOTTOM", 2); + d8c = new j8c("H_LEFT", 3); + c8c = new j8c("H_CENTER", 4); + e8c = new j8c("H_RIGHT", 5); + } + function gLd(a) { + var b; + if ((a.Db & 64) != 0) + return mKd(a); + b = new Jfb(mKd(a)); + b.a += " (abstract: "; + Ffb(b, (a.Bb & 256) != 0); + b.a += ", interface: "; + Ffb(b, (a.Bb & 512) != 0); + b.a += ")"; + return b.a; + } + function l3d(a, b, c2, d) { + var e, f2, g, h; + if (oid(a.e)) { + e = b.ak(); + h = b.dd(); + f2 = c2.dd(); + g = H2d(a, 1, e, h, f2, e.$j() ? M2d(a, e, f2, JD(e, 99) && (BD(e, 18).Bb & Tje) != 0) : -1, true); + d ? d.Ei(g) : d = g; + } + return d; + } + function kz(a) { + var b; + if (a.c == null) { + b = PD(a.b) === PD(iz) ? null : a.b; + a.d = b == null ? Xhe : MD(b) ? nz(FD(b)) : ND(b) ? Vie : hdb(rb(b)); + a.a = a.a + ": " + (MD(b) ? mz(FD(b)) : b + ""); + a.c = "(" + a.d + ") " + a.a; + } + } + function Wgb(a, b) { + this.e = a; + if (Bbb(xbb(b, -4294967296), 0)) { + this.d = 1; + this.a = OC(GC(WD, 1), oje, 25, 15, [Tbb(b)]); + } else { + this.d = 2; + this.a = OC(GC(WD, 1), oje, 25, 15, [Tbb(b), Tbb(Obb(b, 32))]); + } + } + function yrb() { + function b() { + try { + return (/* @__PURE__ */ new Map()).entries().next().done; + } catch (a) { + return false; + } + } + if (typeof Map === Nhe && Map.prototype.entries && b()) { + return Map; + } else { + return zrb(); + } + } + function VPc(a, b) { + var c2, d, e, f2; + f2 = new Bib(a.e, 0); + c2 = 0; + while (f2.b < f2.d.gc()) { + d = Edb((sCb(f2.b < f2.d.gc()), ED(f2.d.Xb(f2.c = f2.b++)))); + e = d - b; + if (e > Oqe) { + return c2; + } else + e > -1e-6 && ++c2; + } + return c2; + } + function PQd(a, b) { + var c2; + if (b != a.b) { + c2 = null; + !!a.b && (c2 = lid(a.b, a, -4, c2)); + !!b && (c2 = kid(b, a, -4, c2)); + c2 = GQd(a, b, c2); + !!c2 && c2.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, b, b)); + } + function SQd(a, b) { + var c2; + if (b != a.f) { + c2 = null; + !!a.f && (c2 = lid(a.f, a, -1, c2)); + !!b && (c2 = kid(b, a, -1, c2)); + c2 = IQd(a, b, c2); + !!c2 && c2.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 0, b, b)); + } + function E9d(a) { + var b, c2, d; + if (a == null) + return null; + c2 = BD(a, 15); + if (c2.dc()) + return ""; + d = new Hfb(); + for (b = c2.Kc(); b.Ob(); ) { + Efb(d, (Q8d(), GD(b.Pb()))); + d.a += " "; + } + return lcb(d, d.a.length - 1); + } + function I9d(a) { + var b, c2, d; + if (a == null) + return null; + c2 = BD(a, 15); + if (c2.dc()) + return ""; + d = new Hfb(); + for (b = c2.Kc(); b.Ob(); ) { + Efb(d, (Q8d(), GD(b.Pb()))); + d.a += " "; + } + return lcb(d, d.a.length - 1); + } + function qEc(a, b, c2) { + var d, e; + d = a.c[b.c.p][b.p]; + e = a.c[c2.c.p][c2.p]; + if (d.a != null && e.a != null) { + return Ddb(d.a, e.a); + } else if (d.a != null) { + return -1; + } else if (e.a != null) { + return 1; + } + return 0; + } + function zqd(a, b) { + var c2, d, e, f2, g, h; + if (b) { + f2 = b.a.length; + c2 = new Yge(f2); + for (h = (c2.b - c2.a) * c2.c < 0 ? (Xge(), Wge) : new she(c2); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(b, g.a); + d = new Crd(a); + Aqd(d.a, e); + } + } + } + function Qqd(a, b) { + var c2, d, e, f2, g, h; + if (b) { + f2 = b.a.length; + c2 = new Yge(f2); + for (h = (c2.b - c2.a) * c2.c < 0 ? (Xge(), Wge) : new she(c2); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(b, g.a); + d = new lrd(a); + nqd(d.a, e); + } + } + } + function eFd(b) { + var c2; + if (b != null && b.length > 0 && bfb(b, b.length - 1) == 33) { + try { + c2 = PEd(qfb(b, 0, b.length - 1)); + return c2.e == null; + } catch (a) { + a = ubb(a); + if (!JD(a, 32)) + throw vbb(a); + } + } + return false; + } + function h3d(a, b, c2) { + var d, e, f2; + d = b.ak(); + f2 = b.dd(); + e = d.$j() ? H2d(a, 3, d, null, f2, M2d(a, d, f2, JD(d, 99) && (BD(d, 18).Bb & Tje) != 0), true) : H2d(a, 1, d, d.zj(), f2, -1, true); + c2 ? c2.Ei(e) : c2 = e; + return c2; + } + function Vee() { + var a, b, c2; + b = 0; + for (a = 0; a < "X".length; a++) { + c2 = Uee((BCb(a, "X".length), "X".charCodeAt(a))); + if (c2 == 0) + throw vbb(new mde("Unknown Option: " + "X".substr(a))); + b |= c2; + } + return b; + } + function mZb(a, b, c2) { + var d, e, f2; + d = Q_b(b); + e = a_b(d); + f2 = new H0b(); + F0b(f2, b); + switch (c2.g) { + case 1: + G0b(f2, Wcd(Zcd(e))); + break; + case 2: + G0b(f2, Zcd(e)); + } + yNb(f2, (Nyc(), Uxc), ED(vNb(a, Uxc))); + return f2; + } + function U9b(a) { + var b, c2; + b = BD(Rr(new Sr(ur(R_b(a.a).a.Kc(), new Sq()))), 17); + c2 = BD(Rr(new Sr(ur(U_b(a.a).a.Kc(), new Sq()))), 17); + return Ccb(DD(vNb(b, (wtc(), ltc)))) || Ccb(DD(vNb(c2, ltc))); + } + function Xjc() { + Xjc = ccb; + Tjc = new Yjc("ONE_SIDE", 0); + Vjc = new Yjc("TWO_SIDES_CORNER", 1); + Wjc = new Yjc("TWO_SIDES_OPPOSING", 2); + Ujc = new Yjc("THREE_SIDES", 3); + Sjc = new Yjc("FOUR_SIDES", 4); + } + function jkc(a, b, c2, d, e) { + var f2, g; + f2 = BD(GAb(JAb(b.Oc(), new _kc()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + g = BD(Si(a.b, c2, d), 15); + e == 0 ? g.Wc(0, f2) : g.Gc(f2); + } + function KDc(a, b) { + var c2, d, e, f2, g; + for (f2 = new olb(b.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + for (d = new Sr(ur(R_b(e).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + g = c2.c.i.p; + a.n[g] = a.n[g] - 1; + } + } + } + function cnc(a, b) { + var c2, d, e, f2, g; + for (f2 = new olb(b.d); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 101); + g = BD(Ohb(a.c, e), 112).o; + for (d = new Gqb(e.b); d.a < d.c.a.length; ) { + c2 = BD(Fqb(d), 61); + ojc(e, c2, g); + } + } + } + function HJc(a) { + var b, c2; + for (c2 = new olb(a.e.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 29); + YJc(a, b); + } + MAb(JAb(LAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new YKc()), new tLc()), new vLc()), new xLc(a)); + } + function Qwd(a, b) { + if (!b) { + return false; + } else { + if (a.Di(b)) { + return false; + } + if (!a.i) { + if (JD(b, 143)) { + a.i = BD(b, 143); + return true; + } else { + a.i = new Hxd(); + return a.i.Ei(b); + } + } else { + return a.i.Ei(b); + } + } + } + function B9d(a) { + a = Qge(a, true); + if (dfb(kse, a) || dfb("1", a)) { + return Bcb(), Acb; + } else if (dfb(lse, a) || dfb("0", a)) { + return Bcb(), zcb; + } + throw vbb(new n8d("Invalid boolean value: '" + a + "'")); + } + function Kd(a, b, c2) { + var d, e, f2; + for (e = a.vc().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 42); + f2 = d.cd(); + if (PD(b) === PD(f2) || b != null && pb(b, f2)) { + if (c2) { + d = new pjb(d.cd(), d.dd()); + e.Qb(); + } + return d; + } + } + return null; + } + function dKb(a) { + $Jb(); + var b, c2, d; + if (!a.B.Hc((Idd(), Add))) { + return; + } + d = a.f.i; + b = new K6c(a.a.c); + c2 = new p0b(); + c2.b = b.c - d.c; + c2.d = b.d - d.d; + c2.c = d.c + d.b - (b.c + b.b); + c2.a = d.d + d.a - (b.d + b.a); + a.e.Ff(c2); + } + function LNb(a, b, c2, d) { + var e, f2, g; + g = $wnd.Math.min(c2, ONb(BD(a.b, 65), b, c2, d)); + for (f2 = new olb(a.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 221); + e != b && (g = $wnd.Math.min(g, LNb(e, b, g, d))); + } + return g; + } + function WZb(a) { + var b, c2, d, e; + e = KC(OQ, nie, 193, a.b.c.length, 0, 2); + d = new Bib(a.b, 0); + while (d.b < d.d.gc()) { + b = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 29)); + c2 = d.b - 1; + e[c2] = l_b(b.a); + } + return e; + } + function K3b(a, b, c2, d, e) { + var f2, g, h, i3; + g = eLb(dLb(iLb(H3b(c2)), d), C3b(a, c2, e)); + for (i3 = Y_b(a, c2).Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 11); + if (b[h.p]) { + f2 = b[h.p].i; + Ekb(g.d, new BLb(f2, bLb(g, f2))); + } + } + cLb(g); + } + function sic(a, b) { + this.f = new Lqb(); + this.b = new Lqb(); + this.j = new Lqb(); + this.a = a; + this.c = b; + this.c > 0 && ric(this, this.c - 1, (Ucd(), zcd)); + this.c < this.a.length - 1 && ric(this, this.c + 1, (Ucd(), Tcd)); + } + function SEc(a) { + a.length > 0 && a[0].length > 0 && (this.c = Ccb(DD(vNb(Q_b(a[0][0]), (wtc(), Rsc))))); + this.a = KC(CX, nie, 2018, a.length, 0, 2); + this.b = KC(FX, nie, 2019, a.length, 0, 2); + this.d = new ss(); + } + function tKc(a) { + if (a.c.length == 0) { + return false; + } + if ((tCb(0, a.c.length), BD(a.c[0], 17)).c.i.k == (j0b(), g0b)) { + return true; + } + return FAb(NAb(new YAb(null, new Kub(a, 16)), new wKc()), new yKc()); + } + function rRc(a, b, c2) { + Odd(c2, "Tree layout", 1); + H2c(a.b); + K2c(a.b, (yRc(), uRc), uRc); + K2c(a.b, vRc, vRc); + K2c(a.b, wRc, wRc); + K2c(a.b, xRc, xRc); + a.a = F2c(a.b, b); + sRc(a, b, Udd(c2, 1)); + Qdd(c2); + return b; + } + function HXc(a, b) { + var c2, d, e, f2, g, h, i3; + h = gVc(b); + f2 = b.f; + i3 = b.g; + g = $wnd.Math.sqrt(f2 * f2 + i3 * i3); + e = 0; + for (d = new olb(h); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 33); + e += HXc(a, c2); + } + return $wnd.Math.max(e, g); + } + function dcd() { + dcd = ccb; + ccd = new gcd(ole, 0); + bcd = new gcd("FREE", 1); + acd = new gcd("FIXED_SIDE", 2); + Zbd = new gcd("FIXED_ORDER", 3); + _bd = new gcd("FIXED_RATIO", 4); + $bd = new gcd("FIXED_POS", 5); + } + function c1d(a, b) { + var c2, d, e; + c2 = b.Hh(a.a); + if (c2) { + e = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), Cwe)); + for (d = 1; d < (O6d(), N6d).length; ++d) { + if (dfb(N6d[d], e)) { + return d; + } + } + } + return 0; + } + function Qlb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + uwb(f2, "" + b); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function Wlb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + uwb(f2, "" + b); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function Md(a) { + var b, c2, d; + d = new xwb(She, "{", "}"); + for (c2 = a.vc().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 42); + uwb(d, Nd(a, b.cd()) + "=" + Nd(a, b.dd())); + } + return !d.a ? d.c : d.e.length == 0 ? d.a.a : d.a.a + ("" + d.e); + } + function EGb(a) { + var b, c2, d, e; + while (!akb(a.o)) { + c2 = BD(fkb(a.o), 46); + d = BD(c2.a, 121); + b = BD(c2.b, 213); + e = xFb(b, d); + if (b.e == d) { + NFb(e.g, b); + d.e = e.e + b.a; + } else { + NFb(e.b, b); + d.e = e.e - b.a; + } + Ekb(a.e.a, d); + } + } + function F6b(a, b) { + var c2, d, e; + c2 = null; + for (e = BD(b.Kb(a), 20).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 17); + if (!c2) { + c2 = d.c.i == a ? d.d.i : d.c.i; + } else { + if ((d.c.i == a ? d.d.i : d.c.i) != c2) { + return false; + } + } + } + return true; + } + function uPc(a, b) { + var c2, d, e, f2, g; + c2 = WNc(a, false, b); + for (e = new olb(c2); e.a < e.c.c.length; ) { + d = BD(mlb(e), 129); + d.d == 0 ? (BOc(d, null), COc(d, null)) : (f2 = d.a, g = d.b, BOc(d, g), COc(d, f2), void 0); + } + } + function qQc(a) { + var b, c2; + b = new j3c(); + d3c(b, cQc); + c2 = BD(vNb(a, (wtc(), Ksc)), 21); + c2.Hc((Orc(), Nrc)) && d3c(b, gQc); + c2.Hc(Erc) && d3c(b, dQc); + c2.Hc(Lrc) && d3c(b, fQc); + c2.Hc(Grc) && d3c(b, eQc); + return b; + } + function Xac(a) { + var b, c2, d, e; + Wac(a); + for (c2 = new Sr(ur(O_b(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + d = b.c.i == a; + e = d ? b.d : b.c; + d ? RZb(b, null) : QZb(b, null); + yNb(b, (wtc(), ctc), e); + _ac(a, e.i); + } + } + function wmc(a, b, c2, d) { + var e, f2; + f2 = b.i; + e = c2[f2.g][a.d[f2.g]]; + switch (f2.g) { + case 1: + e -= d + b.j.b; + b.g.b = e; + break; + case 3: + e += d; + b.g.b = e; + break; + case 4: + e -= d + b.j.a; + b.g.a = e; + break; + case 2: + e += d; + b.g.a = e; + } + } + function aVc(a) { + var b, c2, d; + for (c2 = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 33); + d = $sd(b); + if (!Qr(new Sr(ur(d.a.Kc(), new Sq())))) { + return b; + } + } + return null; + } + function Cod() { + var a; + if (yod) + return BD(nUd((yFd(), xFd), yte), 2016); + a = BD(JD(Phb((yFd(), xFd), yte), 555) ? Phb(xFd, yte) : new Bod(), 555); + yod = true; + zod(a); + Aod(a); + Tnd(a); + Shb(xFd, yte, a); + return a; + } + function t3d(a, b, c2) { + var d, e; + if (a.j == 0) + return c2; + e = BD(LLd(a, b, c2), 72); + d = c2.ak(); + if (!d.Ij() || !a.a.rl(d)) { + throw vbb(new hz("Invalid entry feature '" + d.Hj().zb + "." + d.ne() + "'")); + } + return e; + } + function Qi(a, b) { + var c2, d, e, f2, g, h, i3, j; + for (h = a.a, i3 = 0, j = h.length; i3 < j; ++i3) { + g = h[i3]; + for (d = g, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + if (PD(b) === PD(c2) || b != null && pb(b, c2)) { + return true; + } + } + } + return false; + } + function qhb(a) { + var b, c2, d; + if (ybb(a, 0) >= 0) { + c2 = Abb(a, Jje); + d = Hbb(a, Jje); + } else { + b = Pbb(a, 1); + c2 = Abb(b, 5e8); + d = Hbb(b, 5e8); + d = wbb(Nbb(d, 1), xbb(a, 1)); + } + return Mbb(Nbb(d, 32), xbb(c2, Yje)); + } + function oQb(a, b, c2) { + var d, e; + d = (sCb(b.b != 0), BD(Nsb(b, b.a.a), 8)); + switch (c2.g) { + case 0: + d.b = 0; + break; + case 2: + d.b = a.f; + break; + case 3: + d.a = 0; + break; + default: + d.a = a.g; + } + e = Jsb(b, 0); + Vsb(e, d); + return b; + } + function pmc(a, b, c2, d) { + var e, f2, g, h, i3; + i3 = a.b; + f2 = b.d; + g = f2.j; + h = umc(g, i3.d[g.g], c2); + e = P6c(R6c(f2.n), f2.a); + switch (f2.j.g) { + case 1: + case 3: + h.a += e.a; + break; + case 2: + case 4: + h.b += e.b; + } + Gsb(d, h, d.c.b, d.c); + } + function yJc(a, b, c2) { + var d, e, f2, g; + g = Jkb(a.e, b, 0); + f2 = new zJc(); + f2.b = c2; + d = new Bib(a.e, g); + while (d.b < d.d.gc()) { + e = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 10)); + e.p = c2; + Ekb(f2.e, e); + uib(d); + } + return f2; + } + function sYc(a, b, c2, d) { + var e, f2, g, h, i3; + e = null; + f2 = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 33); + i3 = g.i + g.g; + if (a < g.j + g.f + d) { + !e ? e = g : c2.i - i3 < c2.i - f2 && (e = g); + f2 = e.i + e.g; + } + } + return !e ? 0 : f2 + d; + } + function tYc(a, b, c2, d) { + var e, f2, g, h, i3; + f2 = null; + e = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 33); + i3 = g.j + g.f; + if (a < g.i + g.g + d) { + !f2 ? f2 = g : c2.j - i3 < c2.j - e && (f2 = g); + e = f2.j + f2.f; + } + } + return !f2 ? 0 : e + d; + } + function mA(a) { + var b, c2, d; + b = false; + d = a.b.c.length; + for (c2 = 0; c2 < d; c2++) { + if (nA(BD(Ikb(a.b, c2), 434))) { + if (!b && c2 + 1 < d && nA(BD(Ikb(a.b, c2 + 1), 434))) { + b = true; + BD(Ikb(a.b, c2), 434).a = true; + } + } else { + b = false; + } + } + } + function Ahb(a, b, c2, d, e) { + var f2, g; + f2 = 0; + for (g = 0; g < e; g++) { + f2 = wbb(f2, Qbb(xbb(b[g], Yje), xbb(d[g], Yje))); + a[g] = Tbb(f2); + f2 = Obb(f2, 32); + } + for (; g < c2; g++) { + f2 = wbb(f2, xbb(b[g], Yje)); + a[g] = Tbb(f2); + f2 = Obb(f2, 32); + } + } + function Jhb(a, b) { + Dhb(); + var c2, d; + d = (Hgb(), Cgb); + c2 = a; + for (; b > 1; b >>= 1) { + (b & 1) != 0 && (d = Ogb(d, c2)); + c2.d == 1 ? c2 = Ogb(c2, c2) : c2 = new Xgb(Lhb(c2.a, c2.d, KC(WD, oje, 25, c2.d << 1, 15, 1))); + } + d = Ogb(d, c2); + return d; + } + function zub() { + zub = ccb; + var a, b, c2, d; + wub = KC(UD, Vje, 25, 25, 15, 1); + xub = KC(UD, Vje, 25, 33, 15, 1); + d = 152587890625e-16; + for (b = 32; b >= 0; b--) { + xub[b] = d; + d *= 0.5; + } + c2 = 1; + for (a = 24; a >= 0; a--) { + wub[a] = c2; + c2 *= 0.5; + } + } + function S1b(a) { + var b, c2; + if (Ccb(DD(hkd(a, (Nyc(), fxc))))) { + for (c2 = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 79); + if (Qld(b)) { + if (Ccb(DD(hkd(b, gxc)))) { + return true; + } + } + } + } + return false; + } + function kjc(a, b) { + var c2, d, e; + if (Qqb(a.f, b)) { + b.b = a; + d = b.c; + Jkb(a.j, d, 0) != -1 || Ekb(a.j, d); + e = b.d; + Jkb(a.j, e, 0) != -1 || Ekb(a.j, e); + c2 = b.a.b; + if (c2.c.length != 0) { + !a.i && (a.i = new vjc(a)); + qjc(a.i, c2); + } + } + } + function rmc(a) { + var b, c2, d, e, f2; + c2 = a.c.d; + d = c2.j; + e = a.d.d; + f2 = e.j; + if (d == f2) { + return c2.p < e.p ? 0 : 1; + } else if (Xcd(d) == f2) { + return 0; + } else if (Vcd(d) == f2) { + return 1; + } else { + b = a.b; + return uqb(b.b, Xcd(d)) ? 0 : 1; + } + } + function lzc() { + lzc = ccb; + jzc = new nzc(Aqe, 0); + hzc = new nzc("LONGEST_PATH", 1); + fzc = new nzc("COFFMAN_GRAHAM", 2); + gzc = new nzc(Tne, 3); + kzc = new nzc("STRETCH_WIDTH", 4); + izc = new nzc("MIN_WIDTH", 5); + } + function E3c(a) { + var b; + this.d = new Lqb(); + this.c = a.c; + this.e = a.d; + this.b = a.b; + this.f = new jgd(a.e); + this.a = a.a; + !a.f ? this.g = (b = BD(gdb(O3), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)) : this.g = a.f; + } + function grd(a, b) { + var c2, d, e, f2, g, h; + e = a; + g = $pd(e, "layoutOptions"); + !g && (g = $pd(e, Dte)); + if (g) { + h = g; + d = null; + !!h && (d = (f2 = $B(h, KC(ZI, nie, 2, 0, 6, 1)), new mC(h, f2))); + if (d) { + c2 = new Drd(h, b); + reb(d, c2); + } + } + } + function atd(a) { + if (JD(a, 239)) { + return BD(a, 33); + } else if (JD(a, 186)) { + return mpd(BD(a, 118)); + } else if (!a) { + throw vbb(new Heb(gue)); + } else { + throw vbb(new cgb("Only support nodes and ports.")); + } + } + function CA(a, b, c2, d) { + if (b >= 0 && dfb(a.substr(b, "GMT".length), "GMT")) { + c2[0] = b + 3; + return tA(a, c2, d); + } + if (b >= 0 && dfb(a.substr(b, "UTC".length), "UTC")) { + c2[0] = b + 3; + return tA(a, c2, d); + } + return tA(a, c2, d); + } + function tjc(a, b) { + var c2, d, e, f2, g; + f2 = a.g.a; + g = a.g.b; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 70); + e = c2.n; + e.a = f2; + a.i == (Ucd(), Acd) ? e.b = g + a.j.b - c2.o.b : e.b = g; + P6c(e, b); + f2 += c2.o.a + a.e; + } + } + function Odd(a, b, c2) { + if (a.b) { + throw vbb(new Zdb("The task is already done.")); + } else if (a.p != null) { + return false; + } else { + a.p = b; + a.r = c2; + a.k && (a.o = (Zfb(), Ibb(Cbb(Date.now()), _ie))); + return true; + } + } + function hsd(a) { + var b, c2, d, e, f2, g, h; + h = new eC(); + c2 = a.tg(); + e = c2 != null; + e && Upd(h, Vte, a.tg()); + d = a.ne(); + f2 = d != null; + f2 && Upd(h, fue, a.ne()); + b = a.sg(); + g = b != null; + g && Upd(h, "description", a.sg()); + return h; + } + function uId(a, b, c2) { + var d, e, f2; + f2 = a.q; + a.q = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + e = new nSd(a, 1, 9, f2, b); + !c2 ? c2 = e : c2.Ei(e); + } + if (!b) { + !!a.r && (c2 = a.nk(null, c2)); + } else { + d = b.c; + d != a.r && (c2 = a.nk(d, c2)); + } + return c2; + } + function IYd(a, b, c2) { + var d, e, f2, g, h; + c2 = (h = b, kid(h, a.e, -1 - a.c, c2)); + g = AYd(a.a); + for (f2 = (d = new nib(new eib(g.a).a), new ZYd(d)); f2.a.b; ) { + e = BD(lib(f2.a).cd(), 87); + c2 = QQd(e, MQd(e, a.a), c2); + } + return c2; + } + function JYd(a, b, c2) { + var d, e, f2, g, h; + c2 = (h = b, lid(h, a.e, -1 - a.c, c2)); + g = AYd(a.a); + for (f2 = (d = new nib(new eib(g.a).a), new ZYd(d)); f2.a.b; ) { + e = BD(lib(f2.a).cd(), 87); + c2 = QQd(e, MQd(e, a.a), c2); + } + return c2; + } + function jhb(a, b, c2, d) { + var e, f2, g; + if (d == 0) { + $fb(b, 0, a, c2, a.length - c2); + } else { + g = 32 - d; + a[a.length - 1] = 0; + for (f2 = a.length - 1; f2 > c2; f2--) { + a[f2] |= b[f2 - c2 - 1] >>> g; + a[f2 - 1] = b[f2 - c2 - 1] << d; + } + } + for (e = 0; e < c2; e++) { + a[e] = 0; + } + } + function LJb(a) { + var b, c2, d, e, f2; + b = 0; + c2 = 0; + for (f2 = a.Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 111); + b = $wnd.Math.max(b, d.d.b); + c2 = $wnd.Math.max(c2, d.d.c); + } + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.d.b = b; + d.d.c = c2; + } + } + function TKb(a) { + var b, c2, d, e, f2; + c2 = 0; + b = 0; + for (f2 = a.Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 111); + c2 = $wnd.Math.max(c2, d.d.d); + b = $wnd.Math.max(b, d.d.a); + } + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.d.d = c2; + d.d.a = b; + } + } + function rpc(a, b) { + var c2, d, e, f2; + f2 = new Rkb(); + e = 0; + d = b.Kc(); + while (d.Ob()) { + c2 = meb(BD(d.Pb(), 19).a + e); + while (c2.a < a.f && !Voc(a, c2.a)) { + c2 = meb(c2.a + 1); + ++e; + } + if (c2.a >= a.f) { + break; + } + f2.c[f2.c.length] = c2; + } + return f2; + } + function sfd(a) { + var b, c2, d, e; + b = null; + for (e = new olb(a.wf()); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + c2 = new J6c(d.qf().a, d.qf().b, d.rf().a, d.rf().b); + !b ? b = c2 : H6c(b, c2); + } + !b && (b = new I6c()); + return b; + } + function Fkd(a, b, c2, d) { + var e, f2; + if (c2 == 1) { + return !a.n && (a.n = new cUd(D2, a, 1, 7)), Sxd(a.n, b, d); + } + return f2 = BD(XKd((e = BD(Ajd(a, 16), 26), !e ? a.zh() : e), c2), 66), f2.Nj().Qj(a, yjd(a), c2 - aLd(a.zh()), b, d); + } + function iud(a, b, c2) { + var d, e, f2, g, h; + d = c2.gc(); + a.qi(a.i + d); + h = a.i - b; + h > 0 && $fb(a.g, b, a.g, b + d, h); + g = c2.Kc(); + a.i += d; + for (e = 0; e < d; ++e) { + f2 = g.Pb(); + mud(a, b, a.oi(b, f2)); + a.bi(b, f2); + a.ci(); + ++b; + } + return d != 0; + } + function xId(a, b, c2) { + var d; + if (b != a.q) { + !!a.q && (c2 = lid(a.q, a, -10, c2)); + !!b && (c2 = kid(b, a, -10, c2)); + c2 = uId(a, b, c2); + } else if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + d = new nSd(a, 1, 9, b, b); + !c2 ? c2 = d : c2.Ei(d); + } + return c2; + } + function Yj(a, b, c2, d) { + Mb((c2 & oie) == 0, "flatMap does not support SUBSIZED characteristic"); + Mb((c2 & 4) == 0, "flatMap does not support SORTED characteristic"); + Qb(a); + Qb(b); + return new jk(a, c2, d, b); + } + function Qy(a, b) { + vCb(b, "Cannot suppress a null exception."); + mCb(b != a, "Exception can not suppress itself."); + if (a.i) { + return; + } + a.k == null ? a.k = OC(GC(_I, 1), nie, 78, 0, [b]) : a.k[a.k.length] = b; + } + function oA(a, b, c2, d) { + var e, f2, g, h, i3, j; + g = c2.length; + f2 = 0; + e = -1; + j = sfb(a.substr(b), (ntb(), ltb)); + for (h = 0; h < g; ++h) { + i3 = c2[h].length; + if (i3 > f2 && nfb(j, sfb(c2[h], ltb))) { + e = h; + f2 = i3; + } + } + e >= 0 && (d[0] = b + f2); + return e; + } + function MIb(a, b) { + var c2; + c2 = NIb(a.b.Hf(), b.b.Hf()); + if (c2 != 0) { + return c2; + } + switch (a.b.Hf().g) { + case 1: + case 2: + return beb(a.b.sf(), b.b.sf()); + case 3: + case 4: + return beb(b.b.sf(), a.b.sf()); + } + return 0; + } + function iRb(a) { + var b, c2, d; + d = a.e.c.length; + a.a = IC(WD, [nie, oje], [48, 25], 15, [d, d], 2); + for (c2 = new olb(a.c); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 282); + a.a[b.c.b][b.d.b] += BD(vNb(b, (wSb(), oSb)), 19).a; + } + } + function H1c(a, b, c2) { + Odd(c2, "Grow Tree", 1); + a.b = b.f; + if (Ccb(DD(vNb(b, (XNb(), VNb))))) { + a.c = new tOb(); + D1c(a, null); + } else { + a.c = new tOb(); + } + a.a = false; + F1c(a, b.f); + yNb(b, WNb, (Bcb(), a.a ? true : false)); + Qdd(c2); + } + function Umd(a, b) { + var c2, d, e, f2, g; + if (a == null) { + return null; + } else { + g = KC(TD, $ie, 25, 2 * b, 15, 1); + for (d = 0, e = 0; d < b; ++d) { + c2 = a[d] >> 4 & 15; + f2 = a[d] & 15; + g[e++] = Qmd[c2]; + g[e++] = Qmd[f2]; + } + return zfb(g, 0, g.length); + } + } + function j3d(a, b, c2) { + var d, e, f2; + d = b.ak(); + f2 = b.dd(); + e = d.$j() ? H2d(a, 4, d, f2, null, M2d(a, d, f2, JD(d, 99) && (BD(d, 18).Bb & Tje) != 0), true) : H2d(a, d.Kj() ? 2 : 1, d, f2, d.zj(), -1, true); + c2 ? c2.Ei(e) : c2 = e; + return c2; + } + function wfb(a) { + var b, c2; + if (a >= Tje) { + b = Uje + (a - Tje >> 10 & 1023) & aje; + c2 = 56320 + (a - Tje & 1023) & aje; + return String.fromCharCode(b) + ("" + String.fromCharCode(c2)); + } else { + return String.fromCharCode(a & aje); + } + } + function bKb(a, b) { + $Jb(); + var c2, d, e, f2; + e = BD(BD(Qc(a.r, b), 21), 84); + if (e.gc() >= 2) { + d = BD(e.Kc().Pb(), 111); + c2 = a.u.Hc((rcd(), mcd)); + f2 = a.u.Hc(qcd); + return !d.a && !c2 && (e.gc() == 2 || f2); + } else { + return false; + } + } + function IVc(a, b, c2, d, e) { + var f2, g, h; + f2 = JVc(a, b, c2, d, e); + h = false; + while (!f2) { + AVc(a, e, true); + h = true; + f2 = JVc(a, b, c2, d, e); + } + h && AVc(a, e, false); + g = dVc(e); + if (g.c.length != 0) { + !!a.d && a.d.lg(g); + IVc(a, e, c2, d, g); + } + } + function Mad() { + Mad = ccb; + Kad = new Nad(ane, 0); + Iad = new Nad("DIRECTED", 1); + Lad = new Nad("UNDIRECTED", 2); + Gad = new Nad("ASSOCIATION", 3); + Jad = new Nad("GENERALIZATION", 4); + Had = new Nad("DEPENDENCY", 5); + } + function kfd(a, b) { + var c2; + if (!mpd(a)) { + throw vbb(new Zdb(Sse)); + } + c2 = mpd(a); + switch (b.g) { + case 1: + return -(a.j + a.f); + case 2: + return a.i - c2.g; + case 3: + return a.j - c2.f; + case 4: + return -(a.i + a.g); + } + return 0; + } + function cub(a, b) { + var c2, d; + uCb(b); + d = a.b.c.length; + Ekb(a.b, b); + while (d > 0) { + c2 = d; + d = (d - 1) / 2 | 0; + if (a.a.ue(Ikb(a.b, d), b) <= 0) { + Nkb(a.b, c2, b); + return true; + } + Nkb(a.b, c2, Ikb(a.b, d)); + } + Nkb(a.b, d, b); + return true; + } + function BHb(a, b, c2, d) { + var e, f2; + e = 0; + if (!c2) { + for (f2 = 0; f2 < sHb; f2++) { + e = $wnd.Math.max(e, qHb(a.a[f2][b.g], d)); + } + } else { + e = qHb(a.a[c2.g][b.g], d); + } + b == (gHb(), eHb) && !!a.b && (e = $wnd.Math.max(e, a.b.a)); + return e; + } + function knc(a, b) { + var c2, d, e, f2, g, h; + e = a.i; + f2 = b.i; + if (!e || !f2) { + return false; + } + if (e.i != f2.i || e.i == (Ucd(), zcd) || e.i == (Ucd(), Tcd)) { + return false; + } + g = e.g.a; + c2 = g + e.j.a; + h = f2.g.a; + d = h + f2.j.a; + return g <= d && c2 >= h; + } + function Tpd(a, b, c2, d) { + var e; + e = false; + if (ND(d)) { + e = true; + Upd(b, c2, GD(d)); + } + if (!e) { + if (KD(d)) { + e = true; + Tpd(a, b, c2, d); + } + } + if (!e) { + if (JD(d, 236)) { + e = true; + Spd(b, c2, BD(d, 236)); + } + } + if (!e) { + throw vbb(new vcb(Ute)); + } + } + function W0d(a, b) { + var c2, d, e; + c2 = b.Hh(a.a); + if (c2) { + e = AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), Sve); + if (e != null) { + for (d = 1; d < (O6d(), K6d).length; ++d) { + if (dfb(K6d[d], e)) { + return d; + } + } + } + } + return 0; + } + function X0d(a, b) { + var c2, d, e; + c2 = b.Hh(a.a); + if (c2) { + e = AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), Sve); + if (e != null) { + for (d = 1; d < (O6d(), L6d).length; ++d) { + if (dfb(L6d[d], e)) { + return d; + } + } + } + } + return 0; + } + function Ve(a, b) { + var c2, d, e, f2; + uCb(b); + f2 = a.a.gc(); + if (f2 < b.gc()) { + for (c2 = a.a.ec().Kc(); c2.Ob(); ) { + d = c2.Pb(); + b.Hc(d) && c2.Qb(); + } + } else { + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + a.a.Bc(d) != null; + } + } + return f2 != a.a.gc(); + } + function bYb(a) { + var b, c2; + c2 = R6c(l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a]))); + b = a.i.d; + switch (a.j.g) { + case 1: + c2.b -= b.d; + break; + case 2: + c2.a += b.c; + break; + case 3: + c2.b += b.a; + break; + case 4: + c2.a -= b.b; + } + return c2; + } + function P9b(a) { + var b; + b = (I9b(), BD(Rr(new Sr(ur(R_b(a).a.Kc(), new Sq()))), 17).c.i); + while (b.k == (j0b(), g0b)) { + yNb(b, (wtc(), Tsc), (Bcb(), true)); + b = BD(Rr(new Sr(ur(R_b(b).a.Kc(), new Sq()))), 17).c.i; + } + } + function bIc(a, b, c2, d) { + var e, f2, g, h; + h = CHc(b, d); + for (g = h.Kc(); g.Ob(); ) { + e = BD(g.Pb(), 11); + a.d[e.p] = a.d[e.p] + a.c[c2.p]; + } + h = CHc(c2, d); + for (f2 = h.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 11); + a.d[e.p] = a.d[e.p] - a.c[b.p]; + } + } + function Efd(a, b, c2) { + var d, e; + for (e = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + bld(d, d.i + b, d.j + c2); + } + reb((!a.b && (a.b = new cUd(B2, a, 12, 3)), a.b), new Kfd(b, c2)); + } + function Mwb(a, b, c2, d) { + var e, f2; + f2 = b; + e = f2.d == null || a.a.ue(c2.d, f2.d) > 0 ? 1 : 0; + while (f2.a[e] != c2) { + f2 = f2.a[e]; + e = a.a.ue(c2.d, f2.d) > 0 ? 1 : 0; + } + f2.a[e] = d; + d.b = c2.b; + d.a[0] = c2.a[0]; + d.a[1] = c2.a[1]; + c2.a[0] = null; + c2.a[1] = null; + } + function ucd(a) { + rcd(); + var b, c2; + b = qqb(ncd, OC(GC(E1, 1), Kie, 273, 0, [pcd])); + if (Ox(Cx(b, a)) > 1) { + return false; + } + c2 = qqb(mcd, OC(GC(E1, 1), Kie, 273, 0, [lcd, qcd])); + if (Ox(Cx(c2, a)) > 1) { + return false; + } + return true; + } + function fod(a, b) { + var c2; + c2 = Phb((yFd(), xFd), a); + JD(c2, 498) ? Shb(xFd, a, new bUd(this, b)) : Shb(xFd, a, this); + bod(this, b); + if (b == (LFd(), KFd)) { + this.wb = BD(this, 1939); + BD(b, 1941); + } else { + this.wb = (NFd(), MFd); + } + } + function lZd(b) { + var c2, d, e; + if (b == null) { + return null; + } + c2 = null; + for (d = 0; d < Pmd.length; ++d) { + try { + return DQd(Pmd[d], b); + } catch (a) { + a = ubb(a); + if (JD(a, 32)) { + e = a; + c2 = e; + } else + throw vbb(a); + } + } + throw vbb(new rFd(c2)); + } + function Dpb() { + Dpb = ccb; + Bpb = OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]); + Cpb = OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]); + } + function yyb(a) { + var b, c2, d; + b = dfb(typeof b, uke) ? null : new iCb(); + if (!b) { + return; + } + $xb(); + c2 = (d = 900, d >= _ie ? "error" : d >= 900 ? "warn" : d >= 800 ? "info" : "log"); + gCb(c2, a.a); + !!a.b && hCb(b, c2, a.b, "Exception: ", true); + } + function vNb(a, b) { + var c2, d; + d = (!a.q && (a.q = new Lqb()), Ohb(a.q, b)); + if (d != null) { + return d; + } + c2 = b.wg(); + JD(c2, 4) && (c2 == null ? (!a.q && (a.q = new Lqb()), Thb(a.q, b)) : (!a.q && (a.q = new Lqb()), Rhb(a.q, b, c2)), a); + return c2; + } + function qUb() { + qUb = ccb; + lUb = new rUb("P1_CYCLE_BREAKING", 0); + mUb = new rUb("P2_LAYERING", 1); + nUb = new rUb("P3_NODE_ORDERING", 2); + oUb = new rUb("P4_NODE_PLACEMENT", 3); + pUb = new rUb("P5_EDGE_ROUTING", 4); + } + function SUb(a, b) { + var c2, d, e, f2, g; + e = b == 1 ? KUb : JUb; + for (d = e.a.ec().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 103); + for (g = BD(Qc(a.f.c, c2), 21).Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 46); + Lkb(a.b.b, f2.b); + Lkb(a.b.a, BD(f2.b, 81).d); + } + } + } + function IWb(a, b) { + AWb(); + var c2; + if (a.c == b.c) { + if (a.b == b.b || pWb(a.b, b.b)) { + c2 = mWb(a.b) ? 1 : -1; + if (a.a && !b.a) { + return c2; + } else if (!a.a && b.a) { + return -c2; + } + } + return beb(a.b.g, b.b.g); + } else { + return Kdb(a.c, b.c); + } + } + function y6b(a, b) { + var c2; + Odd(b, "Hierarchical port position processing", 1); + c2 = a.b; + c2.c.length > 0 && x6b((tCb(0, c2.c.length), BD(c2.c[0], 29)), a); + c2.c.length > 1 && x6b(BD(Ikb(c2, c2.c.length - 1), 29), a); + Qdd(b); + } + function RVc(a, b) { + var c2, d, e; + if (CVc(a, b)) { + return true; + } + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 33); + e = hVc(c2); + if (BVc(a, c2, e)) { + return true; + } + if (PVc(a, c2) - a.g <= a.a) { + return true; + } + } + return false; + } + function d0c() { + d0c = ccb; + c0c = (A0c(), z0c); + __c = v0c; + $_c = t0c; + Y_c = p0c; + Z_c = r0c; + X_c = new q0b(8); + W_c = new Osd((Y9c(), f9c), X_c); + a0c = new Osd(T9c, 8); + b0c = x0c; + T_c = k0c; + U_c = m0c; + V_c = new Osd(y8c, (Bcb(), false)); + } + function X7c() { + X7c = ccb; + U7c = new q0b(15); + T7c = new Osd((Y9c(), f9c), U7c); + W7c = new Osd(T9c, 15); + V7c = new Osd(D9c, meb(0)); + O7c = I8c; + Q7c = Y8c; + S7c = b9c; + L7c = new Osd(r8c, pse); + P7c = O8c; + R7c = _8c; + M7c = t8c; + N7c = w8c; + } + function jtd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)); + } + function ktd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return btd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)); + } + function mtd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return btd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)); + } + function ltd(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i != 1 || (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i != 1) { + throw vbb(new Wdb(iue)); + } + return atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)); + } + function Dvd(a, b, c2) { + var d, e, f2; + ++a.j; + e = a.Vi(); + if (b >= e || b < 0) + throw vbb(new qcb(lue + b + mue + e)); + if (c2 >= e || c2 < 0) + throw vbb(new qcb(nue + c2 + mue + e)); + b != c2 ? d = (f2 = a.Ti(c2), a.Hi(b, f2), f2) : d = a.Oi(c2); + return d; + } + function m6d(a) { + var b, c2, d; + d = a; + if (a) { + b = 0; + for (c2 = a.Ug(); c2; c2 = c2.Ug()) { + if (++b > Wje) { + return m6d(c2); + } + d = c2; + if (c2 == a) { + throw vbb(new Zdb("There is a cycle in the containment hierarchy of " + a)); + } + } + } + return d; + } + function Fe(a) { + var b, c2, d; + d = new xwb(She, "[", "]"); + for (c2 = a.Kc(); c2.Ob(); ) { + b = c2.Pb(); + uwb(d, PD(b) === PD(a) ? "(this Collection)" : b == null ? Xhe : fcb(b)); + } + return !d.a ? d.c : d.e.length == 0 ? d.a.a : d.a.a + ("" + d.e); + } + function CVc(a, b) { + var c2, d; + d = false; + if (b.gc() < 2) { + return false; + } + for (c2 = 0; c2 < b.gc(); c2++) { + c2 < b.gc() - 1 ? d = d | BVc(a, BD(b.Xb(c2), 33), BD(b.Xb(c2 + 1), 33)) : d = d | BVc(a, BD(b.Xb(c2), 33), BD(b.Xb(0), 33)); + } + return d; + } + function Ymd(a, b) { + var c2; + if (b != a.a) { + c2 = null; + !!a.a && (c2 = BD(a.a, 49).ih(a, 4, o5, c2)); + !!b && (c2 = BD(b, 49).gh(a, 4, o5, c2)); + c2 = Tmd(a, b, c2); + !!c2 && c2.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 1, b, b)); + } + function RQd(a, b) { + var c2; + if (b != a.e) { + !!a.e && QYd(AYd(a.e), a); + !!b && (!b.b && (b.b = new RYd(new NYd())), PYd(b.b, a)); + c2 = HQd(a, b, null); + !!c2 && c2.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 4, b, b)); + } + function ufb(a) { + var b, c2, d; + c2 = a.length; + d = 0; + while (d < c2 && (BCb(d, a.length), a.charCodeAt(d) <= 32)) { + ++d; + } + b = c2; + while (b > d && (BCb(b - 1, a.length), a.charCodeAt(b - 1) <= 32)) { + --b; + } + return d > 0 || b < c2 ? a.substr(d, b - d) : a; + } + function ujc(a, b) { + var c2; + c2 = b.o; + if (fad(a.f)) { + a.j.a = $wnd.Math.max(a.j.a, c2.a); + a.j.b += c2.b; + a.d.c.length > 1 && (a.j.b += a.e); + } else { + a.j.a += c2.a; + a.j.b = $wnd.Math.max(a.j.b, c2.b); + a.d.c.length > 1 && (a.j.a += a.e); + } + } + function gkc() { + gkc = ccb; + dkc = OC(GC(F1, 1), bne, 61, 0, [(Ucd(), Acd), zcd, Rcd]); + ckc = OC(GC(F1, 1), bne, 61, 0, [zcd, Rcd, Tcd]); + ekc = OC(GC(F1, 1), bne, 61, 0, [Rcd, Tcd, Acd]); + fkc = OC(GC(F1, 1), bne, 61, 0, [Tcd, Acd, zcd]); + } + function omc(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + g = a.c.d; + h = a.d.d; + if (g.j == h.j) { + return; + } + k = a.b; + e = g.j; + i3 = null; + while (e != h.j) { + i3 = b == 0 ? Xcd(e) : Vcd(e); + f2 = umc(e, k.d[e.g], c2); + j = umc(i3, k.d[i3.g], c2); + Dsb(d, P6c(f2, j)); + e = i3; + } + } + function oFc(a, b, c2, d) { + var e, f2, g, h, i3; + g = JHc(a.a, b, c2); + h = BD(g.a, 19).a; + f2 = BD(g.b, 19).a; + if (d) { + i3 = BD(vNb(b, (wtc(), gtc)), 10); + e = BD(vNb(c2, gtc), 10); + if (!!i3 && !!e) { + mic(a.b, i3, e); + h += a.b.i; + f2 += a.b.e; + } + } + return h > f2; + } + function oHc(a) { + var b, c2, d, e, f2, g, h, i3, j; + this.a = lHc(a); + this.b = new Rkb(); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + f2 = new Rkb(); + Ekb(this.b, f2); + for (h = b, i3 = 0, j = h.length; i3 < j; ++i3) { + g = h[i3]; + Ekb(f2, new Tkb(g.j)); + } + } + } + function qHc(a, b, c2) { + var d, e, f2; + f2 = 0; + d = c2[b]; + if (b < c2.length - 1) { + e = c2[b + 1]; + if (a.b[b]) { + f2 = KIc(a.d, d, e); + f2 += NHc(a.a, d, (Ucd(), zcd)); + f2 += NHc(a.a, e, Tcd); + } else { + f2 = IHc(a.a, d, e); + } + } + a.c[b] && (f2 += PHc(a.a, d)); + return f2; + } + function jZb(a, b, c2, d, e) { + var f2, g, h, i3; + i3 = null; + for (h = new olb(d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 441); + if (g != c2 && Jkb(g.e, e, 0) != -1) { + i3 = g; + break; + } + } + f2 = kZb(e); + QZb(f2, c2.b); + RZb(f2, i3.b); + Rc(a.a, e, new BZb(f2, b, c2.f)); + } + function nic(a) { + while (a.g.c != 0 && a.d.c != 0) { + if (wic(a.g).c > wic(a.d).c) { + a.i += a.g.c; + yic(a.d); + } else if (wic(a.d).c > wic(a.g).c) { + a.e += a.d.c; + yic(a.g); + } else { + a.i += vic(a.g); + a.e += vic(a.d); + yic(a.g); + yic(a.d); + } + } + } + function XOc(a, b, c2) { + var d, e, f2, g; + f2 = b.q; + g = b.r; + new DOc((HOc(), FOc), b, f2, 1); + new DOc(FOc, f2, g, 1); + for (e = new olb(c2); e.a < e.c.c.length; ) { + d = BD(mlb(e), 112); + if (d != f2 && d != b && d != g) { + pPc(a.a, d, b); + pPc(a.a, d, g); + } + } + } + function XQc(a, b, c2, d) { + a.a.d = $wnd.Math.min(b, c2); + a.a.a = $wnd.Math.max(b, d) - a.a.d; + if (b < c2) { + a.b = 0.5 * (b + c2); + a.g = Qqe * a.b + 0.9 * b; + a.f = Qqe * a.b + 0.9 * c2; + } else { + a.b = 0.5 * (b + d); + a.g = Qqe * a.b + 0.9 * d; + a.f = Qqe * a.b + 0.9 * b; + } + } + function acb() { + _bb = {}; + !Array.isArray && (Array.isArray = function(a) { + return Object.prototype.toString.call(a) === "[object Array]"; + }); + function b() { + return (/* @__PURE__ */ new Date()).getTime(); + } + !Date.now && (Date.now = b); + } + function $Tb(a, b) { + var c2, d; + d = BD(vNb(b, (Nyc(), Vxc)), 98); + yNb(b, (wtc(), dtc), d); + c2 = b.e; + !!c2 && (MAb(new YAb(null, new Kub(c2.a, 16)), new dUb(a)), MAb(LAb(new YAb(null, new Kub(c2.b, 16)), new fUb()), new hUb(a))); + } + function _$b(a) { + var b, c2, d, e; + if (gad(BD(vNb(a.b, (Nyc(), Lwc)), 103))) { + return 0; + } + b = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + if (c2.k == (j0b(), h0b)) { + e = c2.o.a; + b = $wnd.Math.max(b, e); + } + } + return b; + } + function c5b(a) { + switch (BD(vNb(a, (Nyc(), mxc)), 163).g) { + case 1: + yNb(a, mxc, (Ctc(), ztc)); + break; + case 2: + yNb(a, mxc, (Ctc(), Atc)); + break; + case 3: + yNb(a, mxc, (Ctc(), xtc)); + break; + case 4: + yNb(a, mxc, (Ctc(), ytc)); + } + } + function yrc() { + yrc = ccb; + wrc = new zrc(ane, 0); + trc = new zrc(jle, 1); + xrc = new zrc(kle, 2); + vrc = new zrc("LEFT_RIGHT_CONSTRAINT_LOCKING", 3); + urc = new zrc("LEFT_RIGHT_CONNECTION_LOCKING", 4); + rrc = new zrc(Vne, 5); + } + function qRc(a, b, c2) { + var d, e, f2, g, h, i3, j; + h = c2.a / 2; + f2 = c2.b / 2; + d = $wnd.Math.abs(b.a - a.a); + e = $wnd.Math.abs(b.b - a.b); + i3 = 1; + j = 1; + d > h && (i3 = h / d); + e > f2 && (j = f2 / e); + g = $wnd.Math.min(i3, j); + a.a += g * (b.a - a.a); + a.b += g * (b.b - a.b); + } + function sZc(a, b, c2, d, e) { + var f2, g; + g = false; + f2 = BD(Ikb(c2.b, 0), 33); + while (yZc(a, b, f2, d, e)) { + g = true; + NZc(c2, f2); + if (c2.b.c.length == 0) { + break; + } + f2 = BD(Ikb(c2.b, 0), 33); + } + c2.b.c.length == 0 && v$c(c2.j, c2); + g && a$c(b.q); + return g; + } + function t6c(a, b) { + i6c(); + var c2, d, e, f2; + if (b.b < 2) { + return false; + } + f2 = Jsb(b, 0); + c2 = BD(Xsb(f2), 8); + d = c2; + while (f2.b != f2.d.c) { + e = BD(Xsb(f2), 8); + if (s6c(a, d, e)) { + return true; + } + d = e; + } + if (s6c(a, d, c2)) { + return true; + } + return false; + } + function ckd(a, b, c2, d) { + var e, f2; + if (c2 == 0) { + return !a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), bId(a.o, b, d); + } + return f2 = BD(XKd((e = BD(Ajd(a, 16), 26), !e ? a.zh() : e), c2), 66), f2.Nj().Rj(a, yjd(a), c2 - aLd(a.zh()), b, d); + } + function bod(a, b) { + var c2; + if (b != a.sb) { + c2 = null; + !!a.sb && (c2 = BD(a.sb, 49).ih(a, 1, i5, c2)); + !!b && (c2 = BD(b, 49).gh(a, 1, i5, c2)); + c2 = Jnd(a, b, c2); + !!c2 && c2.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 4, b, b)); + } + function yqd(a, b) { + var c2, d, e, f2; + if (b) { + e = Xpd(b, "x"); + c2 = new zrd(a); + hmd(c2.a, (uCb(e), e)); + f2 = Xpd(b, "y"); + d = new Ard(a); + imd(d.a, (uCb(f2), f2)); + } else { + throw vbb(new cqd("All edge sections need an end point.")); + } + } + function wqd(a, b) { + var c2, d, e, f2; + if (b) { + e = Xpd(b, "x"); + c2 = new wrd(a); + omd(c2.a, (uCb(e), e)); + f2 = Xpd(b, "y"); + d = new xrd(a); + pmd(d.a, (uCb(f2), f2)); + } else { + throw vbb(new cqd("All edge sections need a start point.")); + } + } + function pyb(a, b) { + var c2, d, e, f2, g, h, i3; + for (d = syb(a), f2 = 0, h = d.length; f2 < h; ++f2) { + yyb(b); + } + i3 = !lyb && a.e ? lyb ? null : a.d : null; + while (i3) { + for (c2 = syb(i3), e = 0, g = c2.length; e < g; ++e) { + yyb(b); + } + i3 = !lyb && i3.e ? lyb ? null : i3.d : null; + } + } + function j0b() { + j0b = ccb; + h0b = new k0b("NORMAL", 0); + g0b = new k0b("LONG_EDGE", 1); + e0b = new k0b("EXTERNAL_PORT", 2); + i0b = new k0b("NORTH_SOUTH_PORT", 3); + f0b = new k0b("LABEL", 4); + d0b = new k0b("BREAKING_POINT", 5); + } + function g4b(a) { + var b, c2, d, e; + b = false; + if (wNb(a, (wtc(), Csc))) { + c2 = BD(vNb(a, Csc), 83); + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + if (e4b(d)) { + if (!b) { + d4b(Q_b(a)); + b = true; + } + h4b(BD(c2.xc(d), 306)); + } + } + } + } + function qec(a, b, c2) { + var d; + Odd(c2, "Self-Loop routing", 1); + d = rec(b); + RD(vNb(b, (g6c(), f6c))); + MAb(NAb(JAb(JAb(LAb(new YAb(null, new Kub(b.b, 16)), new uec()), new wec()), new yec()), new Aec()), new Cec(a, d)); + Qdd(c2); + } + function gsd(a) { + var b, c2, d, e, f2, g, h, i3, j; + j = hsd(a); + c2 = a.e; + f2 = c2 != null; + f2 && Upd(j, eue, a.e); + h = a.k; + g = !!h; + g && Upd(j, "type", Zr(a.k)); + d = Fhe(a.j); + e = !d; + if (e) { + i3 = new wB(); + cC(j, Mte, i3); + b = new ssd(i3); + reb(a.j, b); + } + return j; + } + function Jv(a) { + var b, c2, d, e; + e = Kfb((Xj(a.gc(), "size"), new Vfb()), 123); + d = true; + for (c2 = Wm(a).Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 42); + d || (e.a += She, e); + d = false; + Pfb(Kfb(Pfb(e, b.cd()), 61), b.dd()); + } + return (e.a += "}", e).a; + } + function kD(a, b) { + var c2, d, e; + b &= 63; + if (b < 22) { + c2 = a.l << b; + d = a.m << b | a.l >> 22 - b; + e = a.h << b | a.m >> 22 - b; + } else if (b < 44) { + c2 = 0; + d = a.l << b - 22; + e = a.m << b - 22 | a.l >> 44 - b; + } else { + c2 = 0; + d = 0; + e = a.l << b - 44; + } + return TC(c2 & Eje, d & Eje, e & Fje); + } + function Hcb(a) { + Gcb == null && (Gcb = new RegExp("^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$")); + if (!Gcb.test(a)) { + throw vbb(new Oeb(Oje + a + '"')); + } + return parseFloat(a); + } + function IFb(a) { + var b, c2, d, e; + b = new Rkb(); + c2 = KC(sbb, dle, 25, a.a.c.length, 16, 1); + Glb(c2, c2.length); + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + if (!c2[d.d]) { + b.c[b.c.length] = d; + HFb(a, d, c2); + } + } + return b; + } + function Nmc(a, b) { + var c2, d, e, f2; + f2 = b.b.j; + a.a = KC(WD, oje, 25, f2.c.length, 15, 1); + e = 0; + for (d = 0; d < f2.c.length; d++) { + c2 = (tCb(d, f2.c.length), BD(f2.c[d], 11)); + c2.e.c.length == 0 && c2.g.c.length == 0 ? e += 1 : e += 3; + a.a[d] = e; + } + } + function Sqc() { + Sqc = ccb; + Nqc = new Uqc("ALWAYS_UP", 0); + Mqc = new Uqc("ALWAYS_DOWN", 1); + Pqc = new Uqc("DIRECTION_UP", 2); + Oqc = new Uqc("DIRECTION_DOWN", 3); + Rqc = new Uqc("SMART_UP", 4); + Qqc = new Uqc("SMART_DOWN", 5); + } + function k6c(a, b) { + if (a < 0 || b < 0) { + throw vbb(new Wdb("k and n must be positive")); + } else if (b > a) { + throw vbb(new Wdb("k must be smaller than n")); + } else + return b == 0 || b == a ? 1 : a == 0 ? 0 : q6c(a) / (q6c(b) * q6c(a - b)); + } + function jfd(a, b) { + var c2, d, e, f2; + c2 = new _ud(a); + while (c2.g == null && !c2.c ? Uud(c2) : c2.g == null || c2.i != 0 && BD(c2.g[c2.i - 1], 47).Ob()) { + f2 = BD(Vud(c2), 56); + if (JD(f2, 160)) { + d = BD(f2, 160); + for (e = 0; e < b.length; e++) { + b[e].og(d); + } + } + } + } + function fld(a) { + var b; + if ((a.Db & 64) != 0) + return Mkd(a); + b = new Jfb(Mkd(a)); + b.a += " (height: "; + Bfb(b, a.f); + b.a += ", width: "; + Bfb(b, a.g); + b.a += ", x: "; + Bfb(b, a.i); + b.a += ", y: "; + Bfb(b, a.j); + b.a += ")"; + return b.a; + } + function un(a) { + var b, c2, d, e, f2, g, h; + b = new $rb(); + for (d = a, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + g = Qb(c2.cd()); + h = Xrb(b, g, Qb(c2.dd())); + if (h != null) { + throw vbb(new Wdb("duplicate key: " + g)); + } + } + this.b = (mmb(), new iob(b)); + } + function Rlb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + uwb(f2, String.fromCharCode(b)); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function SRb() { + SRb = ccb; + MRb = (XRb(), WRb); + LRb = new Nsd(mme, MRb); + meb(1); + KRb = new Nsd(nme, meb(300)); + meb(0); + PRb = new Nsd(ome, meb(0)); + QRb = new Nsd(pme, qme); + NRb = new Nsd(rme, 5); + RRb = WRb; + ORb = VRb; + } + function NUb(a, b) { + var c2, d, e, f2, g; + e = b == 1 ? KUb : JUb; + for (d = e.a.ec().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 103); + for (g = BD(Qc(a.f.c, c2), 21).Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 46); + Ekb(a.b.b, BD(f2.b, 81)); + Ekb(a.b.a, BD(f2.b, 81).d); + } + } + } + function kVd(a, b) { + var c2; + if (b != null && !a.c.Yj().wj(b)) { + c2 = JD(b, 56) ? BD(b, 56).Tg().zb : hdb(rb(b)); + throw vbb(new Cdb(ite + a.c.ne() + "'s type '" + a.c.Yj().ne() + "' does not permit a value of type '" + c2 + "'")); + } + } + function cZb(a, b, c2) { + var d, e; + e = new Bib(a.b, 0); + while (e.b < e.d.gc()) { + d = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 70)); + if (PD(vNb(d, (wtc(), btc))) !== PD(b)) { + continue; + } + Y$b(d.n, Q_b(a.c.i), c2); + uib(e); + Ekb(b.b, d); + } + } + function vdc(a, b) { + if (b.a) { + switch (BD(vNb(b.b, (wtc(), dtc)), 98).g) { + case 0: + case 1: + llc(b); + case 2: + MAb(new YAb(null, new Kub(b.d, 16)), new Idc()); + wkc(a.a, b); + } + } else { + MAb(new YAb(null, new Kub(b.d, 16)), new Idc()); + } + } + function Znc(a) { + var b, c2; + c2 = $wnd.Math.sqrt((a.k == null && (a.k = Soc(a, new bpc())), Edb(a.k) / (a.b * (a.g == null && (a.g = Poc(a, new _oc())), Edb(a.g))))); + b = Tbb(Cbb($wnd.Math.round(c2))); + b = $wnd.Math.min(b, a.f); + return b; + } + function H0b() { + z0b(); + n_b.call(this); + this.j = (Ucd(), Scd); + this.a = new d7c(); + new L_b(); + this.f = (Xj(2, Jie), new Skb(2)); + this.e = (Xj(4, Jie), new Skb(4)); + this.g = (Xj(4, Jie), new Skb(4)); + this.b = new Z0b(this.e, this.g); + } + function j3b(a, b) { + var c2, d; + if (Ccb(DD(vNb(b, (wtc(), ltc))))) { + return false; + } + d = b.c.i; + if (a == (Ctc(), xtc)) { + if (d.k == (j0b(), f0b)) { + return false; + } + } + c2 = BD(vNb(d, (Nyc(), mxc)), 163); + if (c2 == ytc) { + return false; + } + return true; + } + function k3b(a, b) { + var c2, d; + if (Ccb(DD(vNb(b, (wtc(), ltc))))) { + return false; + } + d = b.d.i; + if (a == (Ctc(), ztc)) { + if (d.k == (j0b(), f0b)) { + return false; + } + } + c2 = BD(vNb(d, (Nyc(), mxc)), 163); + if (c2 == Atc) { + return false; + } + return true; + } + function L3b(a, b) { + var c2, d, e, f2, g, h, i3; + g = a.d; + i3 = a.o; + h = new J6c(-g.b, -g.d, g.b + i3.a + g.c, g.d + i3.b + g.a); + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + !!c2 && H6c(h, c2.i); + } + g.b = -h.c; + g.d = -h.d; + g.c = h.b - g.b - i3.a; + g.a = h.a - g.d - i3.b; + } + function N_c() { + N_c = ccb; + I_c = new O_c("CENTER_DISTANCE", 0); + J_c = new O_c("CIRCLE_UNDERLAP", 1); + M_c = new O_c("RECTANGLE_UNDERLAP", 2); + K_c = new O_c("INVERTED_OVERLAP", 3); + L_c = new O_c("MINIMUM_ROOT_DISTANCE", 4); + } + function jde(a) { + hde(); + var b, c2, d, e, f2; + if (a == null) + return null; + d = a.length; + e = d * 2; + b = KC(TD, $ie, 25, e, 15, 1); + for (c2 = 0; c2 < d; c2++) { + f2 = a[c2]; + f2 < 0 && (f2 += 256); + b[c2 * 2] = gde[f2 >> 4]; + b[c2 * 2 + 1] = gde[f2 & 15]; + } + return zfb(b, 0, b.length); + } + function fn(a) { + Vm(); + var b, c2, d; + d = a.c.length; + switch (d) { + case 0: + return Um; + case 1: + b = BD(qr(new olb(a)), 42); + return ln(b.cd(), b.dd()); + default: + c2 = BD(Qkb(a, KC(CK, zie, 42, a.c.length, 0, 1)), 165); + return new wx(c2); + } + } + function ITb(a) { + var b, c2, d, e, f2, g; + b = new jkb(); + c2 = new jkb(); + Wjb(b, a); + Wjb(c2, a); + while (c2.b != c2.c) { + e = BD(fkb(c2), 37); + for (g = new olb(e.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + if (f2.e) { + d = f2.e; + Wjb(b, d); + Wjb(c2, d); + } + } + } + return b; + } + function Y_b(a, b) { + switch (b.g) { + case 1: + return Nq(a.j, (z0b(), v0b)); + case 2: + return Nq(a.j, (z0b(), t0b)); + case 3: + return Nq(a.j, (z0b(), x0b)); + case 4: + return Nq(a.j, (z0b(), y0b)); + default: + return mmb(), mmb(), jmb; + } + } + function tic(a, b) { + var c2, d, e; + c2 = uic(b, a.e); + d = BD(Ohb(a.g.f, c2), 19).a; + e = a.a.c.length - 1; + if (a.a.c.length != 0 && BD(Ikb(a.a, e), 287).c == d) { + ++BD(Ikb(a.a, e), 287).a; + ++BD(Ikb(a.a, e), 287).b; + } else { + Ekb(a.a, new Dic(d)); + } + } + function VGc(a, b, c2) { + var d, e; + d = UGc(a, b, c2); + if (d != 0) { + return d; + } + if (wNb(b, (wtc(), Zsc)) && wNb(c2, Zsc)) { + e = beb(BD(vNb(b, Zsc), 19).a, BD(vNb(c2, Zsc), 19).a); + e < 0 ? WGc(a, b, c2) : e > 0 && WGc(a, c2, b); + return e; + } + return TGc(a, b, c2); + } + function MSc(a, b, c2) { + var d, e, f2, g; + if (b.b != 0) { + d = new Psb(); + for (g = Jsb(b, 0); g.b != g.d.c; ) { + f2 = BD(Xsb(g), 86); + ye(d, URc(f2)); + e = f2.e; + e.a = BD(vNb(f2, (mTc(), kTc)), 19).a; + e.b = BD(vNb(f2, lTc), 19).a; + } + MSc(a, d, Udd(c2, d.b / a.a | 0)); + } + } + function JZc(a, b) { + var c2, d, e, f2, g; + if (a.e <= b) { + return a.g; + } + if (LZc(a, a.g, b)) { + return a.g; + } + f2 = a.r; + d = a.g; + g = a.r; + e = (f2 - d) / 2 + d; + while (d + 1 < f2) { + c2 = MZc(a, e, false); + if (c2.b <= e && c2.a <= b) { + g = e; + f2 = e; + } else { + d = e; + } + e = (f2 - d) / 2 + d; + } + return g; + } + function t2c(a, b, c2) { + var d; + d = o2c(a, b, true); + Odd(c2, "Recursive Graph Layout", d); + jfd(b, OC(GC(g2, 1), Uhe, 527, 0, [new q3c()])); + ikd(b, (Y9c(), F9c)) || jfd(b, OC(GC(g2, 1), Uhe, 527, 0, [new U3c()])); + u2c(a, b, null, c2); + Qdd(c2); + } + function Qdd(a) { + var b; + if (a.p == null) { + throw vbb(new Zdb("The task has not begun yet.")); + } + if (!a.b) { + if (a.k) { + b = (Zfb(), Ibb(Cbb(Date.now()), _ie)); + a.q = Sbb(Qbb(b, a.o)) * 1e-9; + } + a.c < a.r && Rdd(a, a.r - a.c); + a.b = true; + } + } + function ofd(a) { + var b, c2, d; + d = new s7c(); + Dsb(d, new f7c(a.j, a.k)); + for (c2 = new Fyd((!a.a && (a.a = new xMd(y2, a, 5)), a.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 469); + Dsb(d, new f7c(b.a, b.b)); + } + Dsb(d, new f7c(a.b, a.c)); + return d; + } + function qqd(a, b, c2, d, e) { + var f2, g, h, i3, j, k; + if (e) { + i3 = e.a.length; + f2 = new Yge(i3); + for (k = (f2.b - f2.a) * f2.c < 0 ? (Xge(), Wge) : new she(f2); k.Ob(); ) { + j = BD(k.Pb(), 19); + h = Zpd(e, j.a); + g = new prd(a, b, c2, d); + rqd(g.a, g.b, g.c, g.d, h); + } + } + } + function Ax(b, c2) { + var d; + if (PD(b) === PD(c2)) { + return true; + } + if (JD(c2, 21)) { + d = BD(c2, 21); + try { + return b.gc() == d.gc() && b.Ic(d); + } catch (a) { + a = ubb(a); + if (JD(a, 173) || JD(a, 205)) { + return false; + } else + throw vbb(a); + } + } + return false; + } + function UHb(a, b) { + var c2; + Ekb(a.d, b); + c2 = b.rf(); + if (a.c) { + a.e.a = $wnd.Math.max(a.e.a, c2.a); + a.e.b += c2.b; + a.d.c.length > 1 && (a.e.b += a.a); + } else { + a.e.a += c2.a; + a.e.b = $wnd.Math.max(a.e.b, c2.b); + a.d.c.length > 1 && (a.e.a += a.a); + } + } + function cmc(a) { + var b, c2, d, e; + e = a.i; + b = e.b; + d = e.j; + c2 = e.g; + switch (e.a.g) { + case 0: + c2.a = (a.g.b.o.a - d.a) / 2; + break; + case 1: + c2.a = b.d.n.a + b.d.a.a; + break; + case 2: + c2.a = b.d.n.a + b.d.a.a - d.a; + break; + case 3: + c2.b = b.d.n.b + b.d.a.b; + } + } + function Q6c(a, b, c2, d, e) { + if (d < b || e < c2) { + throw vbb(new Wdb("The highx must be bigger then lowx and the highy must be bigger then lowy")); + } + a.a < b ? a.a = b : a.a > d && (a.a = d); + a.b < c2 ? a.b = c2 : a.b > e && (a.b = e); + return a; + } + function lsd(a) { + if (JD(a, 149)) { + return esd(BD(a, 149)); + } else if (JD(a, 229)) { + return fsd(BD(a, 229)); + } else if (JD(a, 23)) { + return gsd(BD(a, 23)); + } else { + throw vbb(new Wdb(Xte + Fe(new amb(OC(GC(SI, 1), Uhe, 1, 5, [a]))))); + } + } + function mhb(a, b, c2, d, e) { + var f2, g, h; + f2 = true; + for (g = 0; g < d; g++) { + f2 = f2 & c2[g] == 0; + } + if (e == 0) { + $fb(c2, d, a, 0, b); + g = b; + } else { + h = 32 - e; + f2 = f2 & c2[g] << h == 0; + for (g = 0; g < b - 1; g++) { + a[g] = c2[g + d] >>> e | c2[g + d + 1] << h; + } + a[g] = c2[g + d] >>> e; + ++g; + } + return f2; + } + function zMc(a, b, c2, d) { + var e, f2, g; + if (b.k == (j0b(), g0b)) { + for (f2 = new Sr(ur(R_b(b).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + g = e.c.i.k; + if (g == g0b && a.c.a[e.c.i.c.p] == d && a.c.a[b.c.p] == c2) { + return true; + } + } + } + return false; + } + function mD(a, b) { + var c2, d, e, f2; + b &= 63; + c2 = a.h & Fje; + if (b < 22) { + f2 = c2 >>> b; + e = a.m >> b | c2 << 22 - b; + d = a.l >> b | a.m << 22 - b; + } else if (b < 44) { + f2 = 0; + e = c2 >>> b - 22; + d = a.m >> b - 22 | a.h << 44 - b; + } else { + f2 = 0; + e = 0; + d = c2 >>> b - 44; + } + return TC(d & Eje, e & Eje, f2 & Fje); + } + function Iic(a, b, c2, d) { + var e; + this.b = d; + this.e = a == (rGc(), pGc); + e = b[c2]; + this.d = IC(sbb, [nie, dle], [177, 25], 16, [e.length, e.length], 2); + this.a = IC(WD, [nie, oje], [48, 25], 15, [e.length, e.length], 2); + this.c = new sic(b, c2); + } + function ljc(a) { + var b, c2, d; + a.k = new Ki((Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, a.j.c.length); + for (d = new olb(a.j); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 113); + b = c2.d.j; + Rc(a.k, b, c2); + } + a.e = Zjc(Ec(a.k)); + } + function UQc(a, b) { + var c2, d, e; + Qqb(a.d, b); + c2 = new _Qc(); + Rhb(a.c, b, c2); + c2.f = VQc(b.c); + c2.a = VQc(b.d); + c2.d = (hQc(), e = b.c.i.k, e == (j0b(), h0b) || e == d0b); + c2.e = (d = b.d.i.k, d == h0b || d == d0b); + c2.b = b.c.j == (Ucd(), Tcd); + c2.c = b.d.j == zcd; + } + function BGb(a) { + var b, c2, d, e, f2; + f2 = Ohe; + e = Ohe; + for (d = new olb(LFb(a)); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 213); + b = c2.e.e - c2.d.e; + c2.e == a && b < e ? e = b : b < f2 && (f2 = b); + } + e == Ohe && (e = -1); + f2 == Ohe && (f2 = -1); + return new vgd(meb(e), meb(f2)); + } + function zQb(a, b) { + var c2, d, e; + e = dme; + d = (ROb(), OOb); + e = $wnd.Math.abs(a.b); + c2 = $wnd.Math.abs(b.f - a.b); + if (c2 < e) { + e = c2; + d = POb; + } + c2 = $wnd.Math.abs(a.a); + if (c2 < e) { + e = c2; + d = QOb; + } + c2 = $wnd.Math.abs(b.g - a.a); + if (c2 < e) { + e = c2; + d = NOb; + } + return d; + } + function L9b(a, b) { + var c2, d, e, f2; + c2 = b.a.o.a; + f2 = new Jib(Q_b(b.a).b, b.c, b.f + 1); + for (e = new vib(f2); e.b < e.d.gc(); ) { + d = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 29)); + if (d.c.a >= c2) { + K9b(a, b, d.p); + return true; + } + } + return false; + } + function Iod(a) { + var b; + if ((a.Db & 64) != 0) + return fld(a); + b = new Wfb(dte); + !a.a || Qfb(Qfb((b.a += ' "', b), a.a), '"'); + Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a += " (", b), a.i), ","), a.j), " | "), a.g), ","), a.f), ")"); + return b.a; + } + function Z2d(a, b, c2) { + var d, e, f2, g, h; + h = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + d = 0; + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (h.rl(f2.ak())) { + if (d == c2) { + Xxd(a, g); + return Q6d(), BD(b, 66).Oj() ? f2 : f2.dd(); + } + ++d; + } + } + throw vbb(new qcb(gve + c2 + mue + d)); + } + function sde(a) { + var b, c2, d; + b = a.c; + if (b == 2 || b == 7 || b == 1) { + return wfe(), wfe(), ffe; + } else { + d = qde(a); + c2 = null; + while ((b = a.c) != 2 && b != 7 && b != 1) { + if (!c2) { + c2 = (wfe(), wfe(), new Lge(1)); + Kge(c2, d); + d = c2; + } + Kge(c2, qde(a)); + } + return d; + } + } + function Kb(a, b, c2) { + if (a < 0 || a > c2) { + return Jb(a, c2, "start index"); + } + if (b < 0 || b > c2) { + return Jb(b, c2, "end index"); + } + return hc("end index (%s) must not be less than start index (%s)", OC(GC(SI, 1), Uhe, 1, 5, [meb(b), meb(a)])); + } + function Pz(b, c2) { + var d, e, f2, g; + for (e = 0, f2 = b.length; e < f2; e++) { + g = b[e]; + try { + g[1] ? g[0].jm() && (c2 = Oz(c2, g)) : g[0].jm(); + } catch (a) { + a = ubb(a); + if (JD(a, 78)) { + d = a; + Az(); + Gz(JD(d, 477) ? BD(d, 477).ae() : d); + } else + throw vbb(a); + } + } + return c2; + } + function K9b(a, b, c2) { + var d, e, f2; + c2 != b.c + b.b.gc() && Z9b(b.a, fac(b, c2 - b.c)); + f2 = b.a.c.p; + a.a[f2] = $wnd.Math.max(a.a[f2], b.a.o.a); + for (e = BD(vNb(b.a, (wtc(), ktc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 70); + yNb(d, H9b, (Bcb(), true)); + } + } + function Wec(a, b) { + var c2, d, e; + e = Vec(b); + yNb(b, (wtc(), Xsc), e); + if (e) { + d = Ohe; + !!irb(a.f, e) && (d = BD(Wd(irb(a.f, e)), 19).a); + c2 = BD(Ikb(b.g, 0), 17); + Ccb(DD(vNb(c2, ltc))) || Rhb(a, e, meb($wnd.Math.min(BD(vNb(c2, Zsc), 19).a, d))); + } + } + function iCc(a, b, c2) { + var d, e, f2, g, h; + b.p = -1; + for (h = W_b(b, (KAc(), IAc)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + for (e = new olb(g.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + f2 = d.d.i; + b != f2 && (f2.p < 0 ? c2.Fc(d) : f2.p > 0 && iCc(a, f2, c2)); + } + } + b.p = 0; + } + function p5c(a) { + var b; + this.c = new Psb(); + this.f = a.e; + this.e = a.d; + this.i = a.g; + this.d = a.c; + this.b = a.b; + this.k = a.j; + this.a = a.a; + !a.i ? this.j = (b = BD(gdb(e1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)) : this.j = a.i; + this.g = a.f; + } + function Wb(a) { + var b, c2, d, e; + b = Kfb(Qfb(new Wfb("Predicates."), "and"), 40); + c2 = true; + for (e = new vib(a); e.b < e.d.gc(); ) { + d = (sCb(e.b < e.d.gc()), e.d.Xb(e.c = e.b++)); + c2 || (b.a += ",", b); + b.a += "" + d; + c2 = false; + } + return (b.a += ")", b).a; + } + function Rcc(a, b, c2) { + var d, e, f2; + if (c2 <= b + 2) { + return; + } + e = (c2 - b) / 2 | 0; + for (d = 0; d < e; ++d) { + f2 = (tCb(b + d, a.c.length), BD(a.c[b + d], 11)); + Nkb(a, b + d, (tCb(c2 - d - 1, a.c.length), BD(a.c[c2 - d - 1], 11))); + tCb(c2 - d - 1, a.c.length); + a.c[c2 - d - 1] = f2; + } + } + function hjc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + f2 = a.d.p; + h = f2.e; + i3 = f2.r; + a.g = new dIc(i3); + g = a.d.o.c.p; + d = g > 0 ? h[g - 1] : KC(OQ, kne, 10, 0, 0, 1); + e = h[g]; + j = g < h.length - 1 ? h[g + 1] : KC(OQ, kne, 10, 0, 0, 1); + k = b == c2 - 1; + k ? RHc(a.g, e, j) : RHc(a.g, d, e); + } + function pjc(a) { + var b; + this.j = new Rkb(); + this.f = new Tqb(); + this.b = (b = BD(gdb(F1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + this.d = KC(WD, oje, 25, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 15, 1); + this.g = a; + } + function QVc(a, b) { + var c2, d, e; + if (b.c.length != 0) { + c2 = RVc(a, b); + e = false; + while (!c2) { + AVc(a, b, true); + e = true; + c2 = RVc(a, b); + } + e && AVc(a, b, false); + d = dVc(b); + !!a.b && a.b.lg(d); + a.a = PVc(a, (tCb(0, b.c.length), BD(b.c[0], 33))); + QVc(a, d); + } + } + function Cid(a, b) { + var c2, d, e; + d = XKd(a.Tg(), b); + c2 = b - a.Ah(); + if (c2 < 0) { + if (!d) { + throw vbb(new Wdb(mte + b + nte)); + } else if (d.Ij()) { + e = a.Yg(d); + e >= 0 ? a.Bh(e) : vid(a, d); + } else { + throw vbb(new Wdb(ite + d.ne() + jte)); + } + } else { + eid(a, c2, d); + } + } + function aqd(a) { + var b, c2; + c2 = null; + b = false; + if (JD(a, 204)) { + b = true; + c2 = BD(a, 204).a; + } + if (!b) { + if (JD(a, 258)) { + b = true; + c2 = "" + BD(a, 258).a; + } + } + if (!b) { + if (JD(a, 483)) { + b = true; + c2 = "" + BD(a, 483).a; + } + } + if (!b) { + throw vbb(new vcb(Ute)); + } + return c2; + } + function ORd(a, b) { + var c2, d; + if (a.f) { + while (b.Ob()) { + c2 = BD(b.Pb(), 72); + d = c2.ak(); + if (JD(d, 99) && (BD(d, 18).Bb & ote) != 0 && (!a.e || d.Gj() != x2 || d.aj() != 0) && c2.dd() != null) { + b.Ub(); + return true; + } + } + return false; + } else { + return b.Ob(); + } + } + function QRd(a, b) { + var c2, d; + if (a.f) { + while (b.Sb()) { + c2 = BD(b.Ub(), 72); + d = c2.ak(); + if (JD(d, 99) && (BD(d, 18).Bb & ote) != 0 && (!a.e || d.Gj() != x2 || d.aj() != 0) && c2.dd() != null) { + b.Pb(); + return true; + } + } + return false; + } else { + return b.Sb(); + } + } + function I2d(a, b, c2) { + var d, e, f2, g, h, i3; + i3 = S6d(a.e.Tg(), b); + d = 0; + h = a.i; + e = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (i3.rl(f2.ak())) { + if (c2 == d) { + return g; + } + ++d; + h = g + 1; + } + } + if (c2 == d) { + return h; + } else { + throw vbb(new qcb(gve + c2 + mue + d)); + } + } + function d9b(a, b) { + var c2, d, e, f2; + if (a.f.c.length == 0) { + return null; + } else { + f2 = new I6c(); + for (d = new olb(a.f); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 70); + e = c2.o; + f2.b = $wnd.Math.max(f2.b, e.a); + f2.a += e.b; + } + f2.a += (a.f.c.length - 1) * b; + return f2; + } + } + function QJc(a, b, c2) { + var d, e, f2; + for (e = new Sr(ur(O_b(c2).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (!(!OZb(d) && !(!OZb(d) && d.c.i.c == d.d.i.c))) { + continue; + } + f2 = IJc(a, d, c2, new vKc()); + f2.c.length > 1 && (b.c[b.c.length] = f2, true); + } + } + function TJc(a) { + var b, c2, d, e; + c2 = new Psb(); + ye(c2, a.o); + d = new twb(); + while (c2.b != 0) { + b = BD(c2.b == 0 ? null : (sCb(c2.b != 0), Nsb(c2, c2.a.a)), 508); + e = KJc(a, b, true); + e && Ekb(d.a, b); + } + while (d.a.c.length != 0) { + b = BD(rwb(d), 508); + KJc(a, b, false); + } + } + function _5c() { + _5c = ccb; + $5c = new a6c(ole, 0); + T5c = new a6c("BOOLEAN", 1); + X5c = new a6c("INT", 2); + Z5c = new a6c("STRING", 3); + U5c = new a6c("DOUBLE", 4); + V5c = new a6c("ENUM", 5); + W5c = new a6c("ENUMSET", 6); + Y5c = new a6c("OBJECT", 7); + } + function H6c(a, b) { + var c2, d, e, f2, g; + d = $wnd.Math.min(a.c, b.c); + f2 = $wnd.Math.min(a.d, b.d); + e = $wnd.Math.max(a.c + a.b, b.c + b.b); + g = $wnd.Math.max(a.d + a.a, b.d + b.a); + if (e < d) { + c2 = d; + d = e; + e = c2; + } + if (g < f2) { + c2 = f2; + f2 = g; + g = c2; + } + G6c(a, d, f2, e - d, g - f2); + } + function O6d() { + O6d = ccb; + L6d = OC(GC(ZI, 1), nie, 2, 6, [swe, twe, uwe, vwe, wwe, xwe, eue]); + K6d = OC(GC(ZI, 1), nie, 2, 6, [swe, "empty", twe, Qve, "elementOnly"]); + N6d = OC(GC(ZI, 1), nie, 2, 6, [swe, "preserve", "replace", ywe]); + M6d = new y1d(); + } + function Y$b(a, b, c2) { + var d, e, f2; + if (b == c2) { + return; + } + d = b; + do { + P6c(a, d.c); + e = d.e; + if (e) { + f2 = d.d; + O6c(a, f2.b, f2.d); + P6c(a, e.n); + d = Q_b(e); + } + } while (e); + d = c2; + do { + c7c(a, d.c); + e = d.e; + if (e) { + f2 = d.d; + b7c(a, f2.b, f2.d); + c7c(a, e.n); + d = Q_b(e); + } + } while (e); + } + function qic(a, b, c2, d) { + var e, f2, g, h, i3; + if (d.f.c + d.g.c == 0) { + for (g = a.a[a.c], h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + Rhb(d, f2, new zic(a, f2, c2)); + } + } + e = BD(Wd(irb(d.f, b)), 663); + e.b = 0; + e.c = e.f; + e.c == 0 || Cic(BD(Ikb(e.a, e.b), 287)); + return e; + } + function Apc() { + Apc = ccb; + wpc = new Bpc("MEDIAN_LAYER", 0); + ypc = new Bpc("TAIL_LAYER", 1); + vpc = new Bpc("HEAD_LAYER", 2); + xpc = new Bpc("SPACE_EFFICIENT_LAYER", 3); + zpc = new Bpc("WIDEST_LAYER", 4); + upc = new Bpc("CENTER_LAYER", 5); + } + function rJb(a) { + switch (a.g) { + case 0: + case 1: + case 2: + return Ucd(), Acd; + case 3: + case 4: + case 5: + return Ucd(), Rcd; + case 6: + case 7: + case 8: + return Ucd(), Tcd; + case 9: + case 10: + case 11: + return Ucd(), zcd; + default: + return Ucd(), Scd; + } + } + function sKc(a, b) { + var c2; + if (a.c.length == 0) { + return false; + } + c2 = Lzc((tCb(0, a.c.length), BD(a.c[0], 17)).c.i); + FJc(); + if (c2 == (Izc(), Fzc) || c2 == Ezc) { + return true; + } + return FAb(NAb(new YAb(null, new Kub(a, 16)), new AKc()), new CKc(b)); + } + function cRc(a, b, c2) { + var d, e, f2; + if (!a.b[b.g]) { + a.b[b.g] = true; + d = c2; + !d && (d = new SRc()); + Dsb(d.b, b); + for (f2 = a.a[b.g].Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 188); + e.b != b && cRc(a, e.b, d); + e.c != b && cRc(a, e.c, d); + Dsb(d.a, e); + } + return d; + } + return null; + } + function qSc() { + qSc = ccb; + pSc = new rSc("ROOT_PROC", 0); + lSc = new rSc("FAN_PROC", 1); + nSc = new rSc("NEIGHBORS_PROC", 2); + mSc = new rSc("LEVEL_HEIGHT", 3); + oSc = new rSc("NODE_POSITION_PROC", 4); + kSc = new rSc("DETREEIFYING_PROC", 5); + } + function kqd(a, b) { + if (JD(b, 239)) { + return eqd(a, BD(b, 33)); + } else if (JD(b, 186)) { + return fqd(a, BD(b, 118)); + } else if (JD(b, 439)) { + return dqd(a, BD(b, 202)); + } else { + throw vbb(new Wdb(Xte + Fe(new amb(OC(GC(SI, 1), Uhe, 1, 5, [b]))))); + } + } + function xu(a, b, c2) { + var d, e; + this.f = a; + d = BD(Ohb(a.b, b), 283); + e = !d ? 0 : d.a; + Sb(c2, e); + if (c2 >= (e / 2 | 0)) { + this.e = !d ? null : d.c; + this.d = e; + while (c2++ < e) { + vu(this); + } + } else { + this.c = !d ? null : d.b; + while (c2-- > 0) { + uu(this); + } + } + this.b = b; + this.a = null; + } + function rEb(a, b) { + var c2, d; + b.a ? sEb(a, b) : (c2 = BD(Exb(a.b, b.b), 57), !!c2 && c2 == a.a[b.b.f] && !!c2.a && c2.a != b.b.a && c2.c.Fc(b.b), d = BD(Dxb(a.b, b.b), 57), !!d && a.a[d.f] == b.b && !!d.a && d.a != b.b.a && b.b.c.Fc(d), Fxb(a.b, b.b), void 0); + } + function FJb(a, b) { + var c2, d; + c2 = BD(Mpb(a.b, b), 124); + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + c2.n.b = 0; + c2.n.c = 0; + return; + } + c2.n.b = a.C.b; + c2.n.c = a.C.c; + a.A.Hc((tdd(), sdd)) && KJb(a, b); + d = JJb(a, b); + KIb(a, b) == (Tbd(), Qbd) && (d += 2 * a.w); + c2.a.a = d; + } + function OKb(a, b) { + var c2, d; + c2 = BD(Mpb(a.b, b), 124); + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + c2.n.d = 0; + c2.n.a = 0; + return; + } + c2.n.d = a.C.d; + c2.n.a = a.C.a; + a.A.Hc((tdd(), sdd)) && SKb(a, b); + d = RKb(a, b); + KIb(a, b) == (Tbd(), Qbd) && (d += 2 * a.w); + c2.a.b = d; + } + function cOb(a, b) { + var c2, d, e, f2; + f2 = new Rkb(); + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 65); + Ekb(f2, new oOb(c2, true)); + Ekb(f2, new oOb(c2, false)); + } + e = new hOb(a); + zwb(e.a.a); + kDb(f2, a.b, new amb(OC(GC(JM, 1), Uhe, 679, 0, [e]))); + } + function rQb(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + i3 = a.a; + n = a.b; + j = b.a; + o2 = b.b; + k = c2.a; + p = c2.b; + l = d.a; + q = d.b; + f2 = i3 * o2 - n * j; + g = k * q - p * l; + e = (i3 - j) * (p - q) - (n - o2) * (k - l); + h = (f2 * (k - l) - g * (i3 - j)) / e; + m = (f2 * (p - q) - g * (n - o2)) / e; + return new f7c(h, m); + } + function TBc(a, b) { + var c2, d, e; + if (a.d[b.p]) { + return; + } + a.d[b.p] = true; + a.a[b.p] = true; + for (d = new Sr(ur(U_b(b).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + if (OZb(c2)) { + continue; + } + e = c2.d.i; + a.a[e.p] ? Ekb(a.b, c2) : TBc(a, e); + } + a.a[b.p] = false; + } + function pCc(a, b, c2) { + var d; + d = 0; + switch (BD(vNb(b, (Nyc(), mxc)), 163).g) { + case 2: + d = 2 * -c2 + a.a; + ++a.a; + break; + case 1: + d = -c2; + break; + case 3: + d = c2; + break; + case 4: + d = 2 * c2 + a.b; + ++a.b; + } + wNb(b, (wtc(), Zsc)) && (d += BD(vNb(b, Zsc), 19).a); + return d; + } + function jOc(a, b, c2) { + var d, e, f2; + c2.zc(b, a); + Ekb(a.n, b); + f2 = a.p.eg(b); + b.j == a.p.fg() ? yOc(a.e, f2) : yOc(a.j, f2); + lOc(a); + for (e = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(b), new R0b(b)]))); Qr(e); ) { + d = BD(Rr(e), 11); + c2._b(d) || jOc(a, d, c2); + } + } + function rfd(a) { + var b, c2, d; + c2 = BD(hkd(a, (Y9c(), Y8c)), 21); + if (c2.Hc((tdd(), pdd))) { + d = BD(hkd(a, b9c), 21); + b = new g7c(BD(hkd(a, _8c), 8)); + if (d.Hc((Idd(), Bdd))) { + b.a <= 0 && (b.a = 20); + b.b <= 0 && (b.b = 20); + } + return b; + } else { + return new d7c(); + } + } + function PKd(a) { + var b, c2, d; + if (!a.b) { + d = new $Nd(); + for (c2 = new $yd(SKd(a)); c2.e != c2.i.gc(); ) { + b = BD(Zyd(c2), 18); + (b.Bb & ote) != 0 && wtd(d, b); + } + vud(d); + a.b = new nNd((BD(qud(ZKd((NFd(), MFd).o), 8), 18), d.i), d.g); + $Kd(a).b &= -9; + } + return a.b; + } + function Rmc(a, b) { + var c2, d, e, f2, g, h, i3, j; + i3 = BD(Ee(Ec(b.k), KC(F1, bne, 61, 2, 0, 1)), 122); + j = b.g; + c2 = Tmc(b, i3[0]); + e = Smc(b, i3[1]); + d = Kmc(a, j, c2, e); + f2 = Tmc(b, i3[1]); + h = Smc(b, i3[0]); + g = Kmc(a, j, f2, h); + if (d <= g) { + b.a = c2; + b.c = e; + } else { + b.a = f2; + b.c = h; + } + } + function ESc(a, b, c2) { + var d, e, f2; + Odd(c2, "Processor set neighbors", 1); + a.a = b.b.b == 0 ? 1 : b.b.b; + e = null; + d = Jsb(b.b, 0); + while (!e && d.b != d.d.c) { + f2 = BD(Xsb(d), 86); + Ccb(DD(vNb(f2, (mTc(), jTc)))) && (e = f2); + } + !!e && FSc(a, new ZRc(e), c2); + Qdd(c2); + } + function PEd(a) { + IEd(); + var b, c2, d, e; + d = hfb(a, wfb(35)); + b = d == -1 ? a : a.substr(0, d); + c2 = d == -1 ? null : a.substr(d + 1); + e = kFd(HEd, b); + if (!e) { + e = aFd(b); + lFd(HEd, b, e); + c2 != null && (e = JEd(e, c2)); + } else + c2 != null && (e = JEd(e, (uCb(c2), c2))); + return e; + } + function smb(a) { + var h; + mmb(); + var b, c2, d, e, f2, g; + if (JD(a, 54)) { + for (e = 0, d = a.gc() - 1; e < d; ++e, --d) { + h = a.Xb(e); + a._c(e, a.Xb(d)); + a._c(d, h); + } + } else { + b = a.Yc(); + f2 = a.Zc(a.gc()); + while (b.Tb() < f2.Vb()) { + c2 = b.Pb(); + g = f2.Ub(); + b.Wb(g); + f2.Wb(c2); + } + } + } + function I3b(a, b) { + var c2, d, e; + Odd(b, "End label pre-processing", 1); + c2 = Edb(ED(vNb(a, (Nyc(), nyc)))); + d = Edb(ED(vNb(a, ryc))); + e = gad(BD(vNb(a, Lwc), 103)); + MAb(LAb(new YAb(null, new Kub(a.b, 16)), new Q3b()), new S3b(c2, d, e)); + Qdd(b); + } + function NFc(a, b) { + var c2, d, e, f2, g, h; + h = 0; + f2 = new jkb(); + Wjb(f2, b); + while (f2.b != f2.c) { + g = BD(fkb(f2), 214); + h += pHc(g.d, g.e); + for (e = new olb(g.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 37); + c2 = BD(Ikb(a.b, d.p), 214); + c2.s || (h += NFc(a, c2)); + } + } + return h; + } + function YQc(a, b, c2) { + var d, e; + TQc(this); + b == (FQc(), DQc) ? Qqb(this.r, a.c) : Qqb(this.w, a.c); + c2 == DQc ? Qqb(this.r, a.d) : Qqb(this.w, a.d); + UQc(this, a); + d = VQc(a.c); + e = VQc(a.d); + XQc(this, d, e, e); + this.o = (hQc(), $wnd.Math.abs(d - e) < 0.2); + } + function a0d(a, b, c2) { + var d, e, f2, g, h, i3; + h = BD(Ajd(a.a, 8), 1936); + if (h != null) { + for (e = h, f2 = 0, g = e.length; f2 < g; ++f2) { + null.jm(); + } + } + d = c2; + if ((a.a.Db & 1) == 0) { + i3 = new f0d(a, c2, b); + d.ui(i3); + } + JD(d, 672) ? BD(d, 672).wi(a.a) : d.ti() == a.a && d.vi(null); + } + function dae() { + var a; + if (Z9d) + return BD(nUd((yFd(), xFd), Ewe), 1945); + eae(); + a = BD(JD(Phb((yFd(), xFd), Ewe), 586) ? Phb(xFd, Ewe) : new cae(), 586); + Z9d = true; + aae(a); + bae(a); + Rhb((JFd(), IFd), a, new fae()); + Tnd(a); + Shb(xFd, Ewe, a); + return a; + } + function xA(a, b, c2, d) { + var e; + e = oA(a, c2, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje]), b); + e < 0 && (e = oA(a, c2, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]), b)); + if (e < 0) { + return false; + } + d.d = e; + return true; + } + function AA(a, b, c2, d) { + var e; + e = oA(a, c2, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje]), b); + e < 0 && (e = oA(a, c2, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]), b)); + if (e < 0) { + return false; + } + d.d = e; + return true; + } + function NVb(a) { + var b, c2, d; + KVb(a); + d = new Rkb(); + for (c2 = new olb(a.a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + Ekb(d, new ZVb(b, true)); + Ekb(d, new ZVb(b, false)); + } + RVb(a.c); + rXb(d, a.b, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [a.c]))); + MVb(a); + } + function c4b(a) { + var b, c2, d, e; + c2 = new Lqb(); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + b = BD(d.We((wtc(), Dsc)), 17); + !!irb(c2.f, b) || Rhb(c2, b, new p4b(b)); + Ekb(BD(Wd(irb(c2.f, b)), 456).b, d); + } + return new Tkb(new $ib(c2)); + } + function Gac(a, b) { + var c2, d, e, f2, g; + d = new kkb(a.j.c.length); + c2 = null; + for (f2 = new olb(a.j); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 11); + if (e.j != c2) { + d.b == d.c || Hac(d, c2, b); + Yjb(d); + c2 = e.j; + } + g = N3b(e); + !!g && (Xjb(d, g), true); + } + d.b == d.c || Hac(d, c2, b); + } + function wbc(a, b) { + var c2, d, e; + d = new Bib(a.b, 0); + while (d.b < d.d.gc()) { + c2 = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 70)); + e = BD(vNb(c2, (Nyc(), Qwc)), 272); + if (e == (qad(), oad)) { + uib(d); + Ekb(b.b, c2); + wNb(c2, (wtc(), Dsc)) || yNb(c2, Dsc, a); + } + } + } + function GDc(a) { + var b, c2, d, e, f2; + b = sr(new Sr(ur(U_b(a).a.Kc(), new Sq()))); + for (e = new Sr(ur(R_b(a).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + c2 = d.c.i; + f2 = sr(new Sr(ur(U_b(c2).a.Kc(), new Sq()))); + b = $wnd.Math.max(b, f2); + } + return meb(b); + } + function rUc(a, b, c2) { + var d, e, f2, g; + Odd(c2, "Processor arrange node", 1); + e = null; + f2 = new Psb(); + d = Jsb(b.b, 0); + while (!e && d.b != d.d.c) { + g = BD(Xsb(d), 86); + Ccb(DD(vNb(g, (mTc(), jTc)))) && (e = g); + } + Gsb(f2, e, f2.c.b, f2.c); + qUc(a, f2, Udd(c2, 1)); + Qdd(c2); + } + function Ffd(a, b, c2) { + var d, e, f2; + d = BD(hkd(a, (Y9c(), w8c)), 21); + e = 0; + f2 = 0; + b.a > c2.a && (d.Hc((i8c(), c8c)) ? e = (b.a - c2.a) / 2 : d.Hc(e8c) && (e = b.a - c2.a)); + b.b > c2.b && (d.Hc((i8c(), g8c)) ? f2 = (b.b - c2.b) / 2 : d.Hc(f8c) && (f2 = b.b - c2.b)); + Efd(a, e, f2); + } + function aod(a, b, c2, d, e, f2, g, h, i3, j, k, l, m) { + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 4); + pnd(a, c2); + a.f = g; + dJd(a, h); + fJd(a, i3); + ZId(a, j); + eJd(a, k); + CId(a, l); + aJd(a, m); + BId(a, true); + AId(a, e); + a.ok(f2); + yId(a, b); + d != null && (a.i = null, _Id(a, d)); + } + function PRd(a) { + var b, c2; + if (a.f) { + while (a.n > 0) { + b = BD(a.k.Xb(a.n - 1), 72); + c2 = b.ak(); + if (JD(c2, 99) && (BD(c2, 18).Bb & ote) != 0 && (!a.e || c2.Gj() != x2 || c2.aj() != 0) && b.dd() != null) { + return true; + } else { + --a.n; + } + } + return false; + } else { + return a.n > 0; + } + } + function Jb(a, b, c2) { + if (a < 0) { + return hc(The, OC(GC(SI, 1), Uhe, 1, 5, [c2, meb(a)])); + } else if (b < 0) { + throw vbb(new Wdb(Vhe + b)); + } else { + return hc("%s (%s) must not be greater than size (%s)", OC(GC(SI, 1), Uhe, 1, 5, [c2, meb(a), meb(b)])); + } + } + function Llb(a, b, c2, d, e, f2) { + var g, h, i3, j; + g = d - c2; + if (g < 7) { + Ilb(b, c2, d, f2); + return; + } + i3 = c2 + e; + h = d + e; + j = i3 + (h - i3 >> 1); + Llb(b, a, i3, j, -e, f2); + Llb(b, a, j, h, -e, f2); + if (f2.ue(a[j - 1], a[j]) <= 0) { + while (c2 < d) { + NC(b, c2++, a[i3++]); + } + return; + } + Jlb(a, i3, j, h, b, c2, d, f2); + } + function nEb(a, b) { + var c2, d, e; + e = new Rkb(); + for (d = new olb(a.c.a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 57); + if (b.Lb(c2)) { + Ekb(e, new BEb(c2, true)); + Ekb(e, new BEb(c2, false)); + } + } + tEb(a.e); + kDb(e, a.d, new amb(OC(GC(JM, 1), Uhe, 679, 0, [a.e]))); + } + function gnc(a, b) { + var c2, d, e, f2, g, h, i3; + i3 = b.d; + e = b.b.j; + for (h = new olb(i3); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f2 = KC(sbb, dle, 25, e.c.length, 16, 1); + Rhb(a.b, g, f2); + c2 = g.a.d.p - 1; + d = g.c.d.p; + while (c2 != d) { + c2 = (c2 + 1) % e.c.length; + f2[c2] = true; + } + } + } + function tOc(a, b) { + a.r = new uOc(a.p); + sOc(a.r, a); + ye(a.r.j, a.j); + Osb(a.j); + Dsb(a.j, b); + Dsb(a.r.e, b); + lOc(a); + lOc(a.r); + while (a.f.c.length != 0) { + AOc(BD(Ikb(a.f, 0), 129)); + } + while (a.k.c.length != 0) { + AOc(BD(Ikb(a.k, 0), 129)); + } + return a.r; + } + function yid(a, b, c2) { + var d, e, f2; + e = XKd(a.Tg(), b); + d = b - a.Ah(); + if (d < 0) { + if (!e) { + throw vbb(new Wdb(mte + b + nte)); + } else if (e.Ij()) { + f2 = a.Yg(e); + f2 >= 0 ? a.sh(f2, c2) : uid(a, e, c2); + } else { + throw vbb(new Wdb(ite + e.ne() + jte)); + } + } else { + did(a, d, e, c2); + } + } + function q6d(b) { + var c2, d, e, f2; + d = BD(b, 49).qh(); + if (d) { + try { + e = null; + c2 = nUd((yFd(), xFd), LEd(MEd(d))); + if (c2) { + f2 = c2.rh(); + !!f2 && (e = f2.Wk(tfb(d.e))); + } + if (!!e && e != b) { + return q6d(e); + } + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } + return b; + } + function jrb(a, b, c2) { + var d, e, f2, g; + g = b == null ? 0 : a.b.se(b); + e = (d = a.a.get(g), d == null ? new Array() : d); + if (e.length == 0) { + a.a.set(g, e); + } else { + f2 = grb(a, b, e); + if (f2) { + return f2.ed(c2); + } + } + NC(e, e.length, new pjb(b, c2)); + ++a.c; + zpb(a.b); + return null; + } + function YUc(a, b) { + var c2, d; + H2c(a.a); + K2c(a.a, (PUc(), NUc), NUc); + K2c(a.a, OUc, OUc); + d = new j3c(); + e3c(d, OUc, (tVc(), sVc)); + PD(hkd(b, (ZWc(), LWc))) !== PD((pWc(), mWc)) && e3c(d, OUc, qVc); + e3c(d, OUc, rVc); + E2c(a.a, d); + c2 = F2c(a.a, b); + return c2; + } + function uC(a) { + if (!a) { + return OB(), NB; + } + var b = a.valueOf ? a.valueOf() : a; + if (b !== a) { + var c2 = qC[typeof b]; + return c2 ? c2(b) : xC(typeof b); + } else if (a instanceof Array || a instanceof $wnd.Array) { + return new xB(a); + } else { + return new fC(a); + } + } + function RJb(a, b, c2) { + var d, e, f2; + f2 = a.o; + d = BD(Mpb(a.p, c2), 244); + e = d.i; + e.b = gIb(d); + e.a = fIb(d); + e.b = $wnd.Math.max(e.b, f2.a); + e.b > f2.a && !b && (e.b = f2.a); + e.c = -(e.b - f2.a) / 2; + switch (c2.g) { + case 1: + e.d = -e.a; + break; + case 3: + e.d = f2.b; + } + hIb(d); + iIb(d); + } + function SJb(a, b, c2) { + var d, e, f2; + f2 = a.o; + d = BD(Mpb(a.p, c2), 244); + e = d.i; + e.b = gIb(d); + e.a = fIb(d); + e.a = $wnd.Math.max(e.a, f2.b); + e.a > f2.b && !b && (e.a = f2.b); + e.d = -(e.a - f2.b) / 2; + switch (c2.g) { + case 4: + e.c = -e.b; + break; + case 2: + e.c = f2.a; + } + hIb(d); + iIb(d); + } + function Jgc(a, b) { + var c2, d, e, f2, g; + if (b.dc()) { + return; + } + e = BD(b.Xb(0), 128); + if (b.gc() == 1) { + Igc(a, e, e, 1, 0, b); + return; + } + c2 = 1; + while (c2 < b.gc()) { + if (e.j || !e.o) { + f2 = Ogc(b, c2); + if (f2) { + d = BD(f2.a, 19).a; + g = BD(f2.b, 128); + Igc(a, e, g, c2, d, b); + c2 = d + 1; + e = g; + } + } + } + } + function mlc(a) { + var b, c2, d, e, f2, g; + g = new Tkb(a.d); + Okb(g, new Qlc()); + b = (Alc(), OC(GC(KV, 1), Kie, 270, 0, [tlc, wlc, slc, zlc, vlc, ulc, ylc, xlc])); + c2 = 0; + for (f2 = new olb(g); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 101); + d = b[c2 % b.length]; + olc(e, d); + ++c2; + } + } + function o6c(a, b) { + i6c(); + var c2, d, e, f2; + if (b.b < 2) { + return false; + } + f2 = Jsb(b, 0); + c2 = BD(Xsb(f2), 8); + d = c2; + while (f2.b != f2.d.c) { + e = BD(Xsb(f2), 8); + if (!(m6c(a, d) && m6c(a, e))) { + return false; + } + d = e; + } + if (!(m6c(a, d) && m6c(a, c2))) { + return false; + } + return true; + } + function hrd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + k = null; + l = a; + g = Xpd(l, "x"); + c2 = new Krd(b); + Gqd(c2.a, g); + h = Xpd(l, "y"); + d = new Lrd(b); + Hqd(d.a, h); + i3 = Xpd(l, Gte); + e = new Mrd(b); + Iqd(e.a, i3); + j = Xpd(l, Fte); + f2 = new Nrd(b); + k = (Jqd(f2.a, j), j); + return k; + } + function XMd(a, b) { + TMd(a, b); + (a.b & 1) != 0 && (a.a.a = null); + (a.b & 2) != 0 && (a.a.f = null); + if ((a.b & 4) != 0) { + a.a.g = null; + a.a.i = null; + } + if ((a.b & 16) != 0) { + a.a.d = null; + a.a.e = null; + } + (a.b & 8) != 0 && (a.a.b = null); + if ((a.b & 32) != 0) { + a.a.j = null; + a.a.c = null; + } + } + function l0d(b, c2) { + var d, e, f2; + f2 = 0; + if (c2.length > 0) { + try { + f2 = Icb(c2, Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + e = a; + throw vbb(new rFd(e)); + } else + throw vbb(a); + } + } + d = (!b.a && (b.a = new z0d(b)), b.a); + return f2 < d.i && f2 >= 0 ? BD(qud(d, f2), 56) : null; + } + function Ib(a, b) { + if (a < 0) { + return hc(The, OC(GC(SI, 1), Uhe, 1, 5, ["index", meb(a)])); + } else if (b < 0) { + throw vbb(new Wdb(Vhe + b)); + } else { + return hc("%s (%s) must be less than size (%s)", OC(GC(SI, 1), Uhe, 1, 5, ["index", meb(a), meb(b)])); + } + } + function Slb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + !f2.a ? f2.a = new Wfb(f2.d) : Qfb(f2.a, f2.b); + Nfb(f2.a, "" + b); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function Tlb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + !f2.a ? f2.a = new Wfb(f2.d) : Qfb(f2.a, f2.b); + Nfb(f2.a, "" + b); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function Ulb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + !f2.a ? f2.a = new Wfb(f2.d) : Qfb(f2.a, f2.b); + Nfb(f2.a, "" + b); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function Xlb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + !f2.a ? f2.a = new Wfb(f2.d) : Qfb(f2.a, f2.b); + Nfb(f2.a, "" + b); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function bub(a, b) { + var c2, d, e, f2, g, h; + c2 = a.b.c.length; + e = Ikb(a.b, b); + while (b * 2 + 1 < c2) { + d = (f2 = 2 * b + 1, g = f2 + 1, h = f2, g < c2 && a.a.ue(Ikb(a.b, g), Ikb(a.b, f2)) < 0 && (h = g), h); + if (a.a.ue(e, Ikb(a.b, d)) < 0) { + break; + } + Nkb(a.b, b, Ikb(a.b, d)); + b = d; + } + Nkb(a.b, b, e); + } + function $Bb(a, b, c2, d, e, f2) { + var g, h, i3, j, k; + if (PD(a) === PD(c2)) { + a = a.slice(b, b + e); + b = 0; + } + i3 = c2; + for (h = b, j = b + e; h < j; ) { + g = $wnd.Math.min(h + 1e4, j); + e = g - h; + k = a.slice(h, g); + k.splice(0, 0, d, f2 ? e : 0); + Array.prototype.splice.apply(i3, k); + h = g; + d += e; + } + } + function xGb(a, b, c2) { + var d, e; + d = c2.d; + e = c2.e; + if (a.g[d.d] <= a.i[b.d] && a.i[b.d] <= a.i[d.d] && a.g[e.d] <= a.i[b.d] && a.i[b.d] <= a.i[e.d]) { + if (a.i[d.d] < a.i[e.d]) { + return false; + } + return true; + } + if (a.i[d.d] < a.i[e.d]) { + return true; + } + return false; + } + function cRb(a) { + var b, c2, d, e, f2, g, h; + d = a.a.c.length; + if (d > 0) { + g = a.c.d; + h = a.d.d; + e = Y6c(c7c(new f7c(h.a, h.b), g), 1 / (d + 1)); + f2 = new f7c(g.a, g.b); + for (c2 = new olb(a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 559); + b.d.a = f2.a; + b.d.b = f2.b; + P6c(f2, e); + } + } + } + function YNb(a, b, c2) { + var d, e, f2, g, h, i3; + i3 = Pje; + for (f2 = new olb(wOb(a.b)); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 168); + for (h = new olb(wOb(b.b)); h.a < h.c.c.length; ) { + g = BD(mlb(h), 168); + d = p6c(e.a, e.b, g.a, g.b, c2); + i3 = $wnd.Math.min(i3, d); + } + } + return i3; + } + function G0b(a, b) { + if (!b) { + throw vbb(new Geb()); + } + a.j = b; + if (!a.d) { + switch (a.j.g) { + case 1: + a.a.a = a.o.a / 2; + a.a.b = 0; + break; + case 2: + a.a.a = a.o.a; + a.a.b = a.o.b / 2; + break; + case 3: + a.a.a = a.o.a / 2; + a.a.b = a.o.b; + break; + case 4: + a.a.a = 0; + a.a.b = a.o.b / 2; + } + } + } + function dfc(a, b) { + var c2, d, e; + if (JD(b.g, 10) && BD(b.g, 10).k == (j0b(), e0b)) { + return Pje; + } + e = ugc(b); + if (e) { + return $wnd.Math.max(0, a.b / 2 - 0.5); + } + c2 = tgc(b); + if (c2) { + d = Edb(ED(pBc(c2, (Nyc(), vyc)))); + return $wnd.Math.max(0, d / 2 - 0.5); + } + return Pje; + } + function ffc(a, b) { + var c2, d, e; + if (JD(b.g, 10) && BD(b.g, 10).k == (j0b(), e0b)) { + return Pje; + } + e = ugc(b); + if (e) { + return $wnd.Math.max(0, a.b / 2 - 0.5); + } + c2 = tgc(b); + if (c2) { + d = Edb(ED(pBc(c2, (Nyc(), vyc)))); + return $wnd.Math.max(0, d / 2 - 0.5); + } + return Pje; + } + function xic(a) { + var b, c2, d, e, f2, g; + g = CHc(a.d, a.e); + for (f2 = g.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 11); + d = a.e == (Ucd(), Tcd) ? e.e : e.g; + for (c2 = new olb(d); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 17); + if (!OZb(b) && b.c.i.c != b.d.i.c) { + tic(a, b); + ++a.f; + ++a.c; + } + } + } + } + function tpc(a, b) { + var c2, d; + if (b.dc()) { + return mmb(), mmb(), jmb; + } + d = new Rkb(); + Ekb(d, meb(Rie)); + for (c2 = 1; c2 < a.f; ++c2) { + a.a == null && Toc(a); + a.a[c2] && Ekb(d, meb(c2)); + } + if (d.c.length == 1) { + return mmb(), mmb(), jmb; + } + Ekb(d, meb(Ohe)); + return spc(b, d); + } + function MJc(a, b) { + var c2, d, e, f2, g, h, i3; + g = b.c.i.k != (j0b(), h0b); + i3 = g ? b.d : b.c; + c2 = MZb(b, i3).i; + e = BD(Ohb(a.k, i3), 121); + d = a.i[c2.p].a; + if (S_b(i3.i) < (!c2.c ? -1 : Jkb(c2.c.a, c2, 0))) { + f2 = e; + h = d; + } else { + f2 = d; + h = e; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 4), f2), h)); + } + function oqd(a, b, c2) { + var d, e, f2, g, h, i3; + if (c2) { + e = c2.a.length; + d = new Yge(e); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + i3 = Wqd(a, Vpd(tB(c2, g.a))); + if (i3) { + f2 = (!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b); + wtd(f2, i3); + } + } + } + } + function pqd(a, b, c2) { + var d, e, f2, g, h, i3; + if (c2) { + e = c2.a.length; + d = new Yge(e); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + i3 = Wqd(a, Vpd(tB(c2, g.a))); + if (i3) { + f2 = (!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c); + wtd(f2, i3); + } + } + } + } + function po(a, b, c2) { + var d, e; + d = b.a & a.f; + b.b = a.b[d]; + a.b[d] = b; + e = b.f & a.f; + b.d = a.c[e]; + a.c[e] = b; + if (!c2) { + b.e = a.e; + b.c = null; + !a.e ? a.a = b : a.e.c = b; + a.e = b; + } else { + b.e = c2.e; + !b.e ? a.a = b : b.e.c = b; + b.c = c2.c; + !b.c ? a.e = b : b.c.e = b; + } + ++a.i; + ++a.g; + } + function qr(a) { + var b, c2, d; + b = a.Pb(); + if (!a.Ob()) { + return b; + } + d = Pfb(Qfb(new Ufb(), "expected one element but was: <"), b); + for (c2 = 0; c2 < 4 && a.Ob(); c2++) { + Pfb((d.a += She, d), a.Pb()); + } + a.Ob() && (d.a += ", ...", d); + d.a += ">"; + throw vbb(new Wdb(d.a)); + } + function lt(a, b) { + var c2; + b.d ? b.d.b = b.b : a.a = b.b; + b.b ? b.b.d = b.d : a.e = b.d; + if (!b.e && !b.c) { + c2 = BD(Thb(a.b, b.a), 283); + c2.a = 0; + ++a.c; + } else { + c2 = BD(Ohb(a.b, b.a), 283); + --c2.a; + !b.e ? c2.b = b.c : b.e.c = b.c; + !b.c ? c2.c = b.e : b.c.e = b.e; + } + --a.d; + } + function OA(a) { + var b, c2; + c2 = -a.a; + b = OC(GC(TD, 1), $ie, 25, 15, [43, 48, 48, 48, 48]); + if (c2 < 0) { + b[0] = 45; + c2 = -c2; + } + b[1] = b[1] + ((c2 / 60 | 0) / 10 | 0) & aje; + b[2] = b[2] + (c2 / 60 | 0) % 10 & aje; + b[3] = b[3] + (c2 % 60 / 10 | 0) & aje; + b[4] = b[4] + c2 % 10 & aje; + return zfb(b, 0, b.length); + } + function uRb(a, b, c2) { + var d, e; + d = b.d; + e = c2.d; + while (d.a - e.a == 0 && d.b - e.b == 0) { + d.a += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + d.b += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + e.a += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + e.b += Cub(a, 26) * ike + Cub(a, 27) * jke - 0.5; + } + } + function N_b(a) { + var b, c2, d, e; + a.g = new Rpb(BD(Qb(F1), 290)); + d = 0; + c2 = (Ucd(), Acd); + b = 0; + for (; b < a.j.c.length; b++) { + e = BD(Ikb(a.j, b), 11); + if (e.j != c2) { + d != b && Npb(a.g, c2, new vgd(meb(d), meb(b))); + c2 = e.j; + d = b; + } + } + Npb(a.g, c2, new vgd(meb(d), meb(b))); + } + function d4b(a) { + var b, c2, d, e, f2, g, h; + d = 0; + for (c2 = new olb(a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 29); + for (f2 = new olb(b.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + e.p = d++; + for (h = new olb(e.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + g.p = d++; + } + } + } + } + function qPc(a, b, c2, d, e) { + var f2, g, h, i3, j; + if (b) { + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + for (j = X_b(g, (KAc(), IAc), c2).Kc(); j.Ob(); ) { + i3 = BD(j.Pb(), 11); + f2 = BD(Wd(irb(e.f, i3)), 112); + if (!f2) { + f2 = new uOc(a.d); + d.c[d.c.length] = f2; + jOc(f2, i3, e); + } + } + } + } + } + function vid(a, b) { + var c2, d, e; + e = e1d((O6d(), M6d), a.Tg(), b); + if (e) { + Q6d(); + BD(e, 66).Oj() || (e = _1d(q1d(M6d, e))); + d = (c2 = a.Yg(e), BD(c2 >= 0 ? a._g(c2, true, true) : sid(a, e, true), 153)); + BD(d, 215).ol(b); + } else { + throw vbb(new Wdb(ite + b.ne() + jte)); + } + } + function ugb(a) { + var b, c2; + if (a > -140737488355328 && a < 140737488355328) { + if (a == 0) { + return 0; + } + b = a < 0; + b && (a = -a); + c2 = QD($wnd.Math.floor($wnd.Math.log(a) / 0.6931471805599453)); + (!b || a != $wnd.Math.pow(2, c2)) && ++c2; + return c2; + } + return vgb(Cbb(a)); + } + function QOc(a) { + var b, c2, d, e, f2, g, h; + f2 = new zsb(); + for (c2 = new olb(a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 129); + g = b.a; + h = b.b; + if (f2.a._b(g) || f2.a._b(h)) { + continue; + } + e = g; + d = h; + if (g.e.b + g.j.b > 2 && h.e.b + h.j.b <= 2) { + e = h; + d = g; + } + f2.a.zc(e, f2); + e.q = d; + } + return f2; + } + function K5b(a, b) { + var c2, d, e; + d = new b0b(a); + tNb(d, b); + yNb(d, (wtc(), Gsc), b); + yNb(d, (Nyc(), Vxc), (dcd(), $bd)); + yNb(d, mwc, (F7c(), B7c)); + __b(d, (j0b(), e0b)); + c2 = new H0b(); + F0b(c2, d); + G0b(c2, (Ucd(), Tcd)); + e = new H0b(); + F0b(e, d); + G0b(e, zcd); + return d; + } + function Spc(a) { + switch (a.g) { + case 0: + return new fGc((rGc(), oGc)); + case 1: + return new CFc(); + case 2: + return new fHc(); + default: + throw vbb(new Wdb("No implementation is available for the crossing minimizer " + (a.f != null ? a.f : "" + a.g))); + } + } + function tDc(a, b) { + var c2, d, e, f2, g; + a.c[b.p] = true; + Ekb(a.a, b); + for (g = new olb(b.j); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 11); + for (d = new b1b(f2.b); llb(d.a) || llb(d.b); ) { + c2 = BD(llb(d.a) ? mlb(d.a) : mlb(d.b), 17); + e = uDc(f2, c2).i; + a.c[e.p] || tDc(a, e); + } + } + } + function _Uc(a) { + var b, c2, d, e, f2, g, h; + g = 0; + for (c2 = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 33); + h = b.g; + e = b.f; + d = $wnd.Math.sqrt(h * h + e * e); + g = $wnd.Math.max(d, g); + f2 = _Uc(b); + g = $wnd.Math.max(f2, g); + } + return g; + } + function rcd() { + rcd = ccb; + pcd = new scd("OUTSIDE", 0); + ncd = new scd("INSIDE", 1); + ocd = new scd("NEXT_TO_PORT_IF_POSSIBLE", 2); + mcd = new scd("ALWAYS_SAME_SIDE", 3); + lcd = new scd("ALWAYS_OTHER_SAME_SIDE", 4); + qcd = new scd("SPACE_EFFICIENT", 5); + } + function drd(a, b, c2) { + var d, e, f2, h, i3, j; + d = Tqd(a, (e = (Fhd(), f2 = new apd(), f2), !!c2 && $od(e, c2), e), b); + Lkd(d, _pd(b, Vte)); + grd(b, d); + brd(b, d); + hrd(b, d); + h = b; + i3 = Ypd(h, "ports"); + j = new Jrd(a, d); + Fqd(j.a, j.b, i3); + crd(a, b, d); + Zqd(a, b, d); + return d; + } + function NA(a) { + var b, c2; + c2 = -a.a; + b = OC(GC(TD, 1), $ie, 25, 15, [43, 48, 48, 58, 48, 48]); + if (c2 < 0) { + b[0] = 45; + c2 = -c2; + } + b[1] = b[1] + ((c2 / 60 | 0) / 10 | 0) & aje; + b[2] = b[2] + (c2 / 60 | 0) % 10 & aje; + b[4] = b[4] + (c2 % 60 / 10 | 0) & aje; + b[5] = b[5] + c2 % 10 & aje; + return zfb(b, 0, b.length); + } + function QA(a) { + var b; + b = OC(GC(TD, 1), $ie, 25, 15, [71, 77, 84, 45, 48, 48, 58, 48, 48]); + if (a <= 0) { + b[3] = 43; + a = -a; + } + b[4] = b[4] + ((a / 60 | 0) / 10 | 0) & aje; + b[5] = b[5] + (a / 60 | 0) % 10 & aje; + b[7] = b[7] + (a % 60 / 10 | 0) & aje; + b[8] = b[8] + a % 10 & aje; + return zfb(b, 0, b.length); + } + function Vlb(a) { + var b, c2, d, e, f2; + if (a == null) { + return Xhe; + } + f2 = new xwb(She, "[", "]"); + for (c2 = a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + !f2.a ? f2.a = new Wfb(f2.d) : Qfb(f2.a, f2.b); + Nfb(f2.a, "" + Ubb(b)); + } + return !f2.a ? f2.c : f2.e.length == 0 ? f2.a.a : f2.a.a + ("" + f2.e); + } + function DGb(a, b) { + var c2, d, e; + e = Ohe; + for (d = new olb(LFb(b)); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 213); + if (c2.f && !a.c[c2.c]) { + a.c[c2.c] = true; + e = $wnd.Math.min(e, DGb(a, xFb(c2, b))); + } + } + a.i[b.d] = a.j; + a.g[b.d] = $wnd.Math.min(e, a.j++); + return a.g[b.d]; + } + function EKb(a, b) { + var c2, d, e; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + d.e.b = (c2 = d.b, c2.Xe((Y9c(), s9c)) ? c2.Hf() == (Ucd(), Acd) ? -c2.rf().b - Edb(ED(c2.We(s9c))) : Edb(ED(c2.We(s9c))) : c2.Hf() == (Ucd(), Acd) ? -c2.rf().b : 0); + } + } + function LPb(a) { + var b, c2, d, e, f2, g, h; + c2 = IOb(a.e); + f2 = Y6c(b7c(R6c(HOb(a.e)), a.d * a.a, a.c * a.b), -0.5); + b = c2.a - f2.a; + e = c2.b - f2.b; + for (h = 0; h < a.c; h++) { + d = b; + for (g = 0; g < a.d; g++) { + JOb(a.e, new J6c(d, e, a.a, a.b)) && aNb(a, g, h, false, true); + d += a.a; + } + e += a.b; + } + } + function s2c(a) { + var b, c2, d; + if (Ccb(DD(hkd(a, (Y9c(), M8c))))) { + d = new Rkb(); + for (c2 = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 79); + Qld(b) && Ccb(DD(hkd(b, N8c))) && (d.c[d.c.length] = b, true); + } + return d; + } else { + return mmb(), mmb(), jmb; + } + } + function Vpd(a) { + var b, c2; + c2 = false; + if (JD(a, 204)) { + c2 = true; + return BD(a, 204).a; + } + if (!c2) { + if (JD(a, 258)) { + b = BD(a, 258).a % 1 == 0; + if (b) { + c2 = true; + return meb(Idb(BD(a, 258).a)); + } + } + } + throw vbb(new cqd("Id must be a string or an integer: '" + a + "'.")); + } + function k0d(a, b) { + var c2, d, e, f2, g, h; + f2 = null; + for (e = new x0d((!a.a && (a.a = new z0d(a)), a.a)); u0d(e); ) { + c2 = BD(Vud(e), 56); + d = (g = c2.Tg(), h = (OKd(g), g.o), !h || !c2.mh(h) ? null : h6d(KJd(h), c2.ah(h))); + if (d != null) { + if (dfb(d, b)) { + f2 = c2; + break; + } + } + } + return f2; + } + function Bw(a, b, c2) { + var d, e, f2, g, h; + Xj(c2, "occurrences"); + if (c2 == 0) { + return h = BD(Hv(nd(a.a), b), 14), !h ? 0 : h.gc(); + } + g = BD(Hv(nd(a.a), b), 14); + if (!g) { + return 0; + } + f2 = g.gc(); + if (c2 >= f2) { + g.$b(); + } else { + e = g.Kc(); + for (d = 0; d < c2; d++) { + e.Pb(); + e.Qb(); + } + } + return f2; + } + function ax(a, b, c2) { + var d, e, f2, g; + Xj(c2, "oldCount"); + Xj(0, "newCount"); + d = BD(Hv(nd(a.a), b), 14); + if ((!d ? 0 : d.gc()) == c2) { + Xj(0, "count"); + e = (f2 = BD(Hv(nd(a.a), b), 14), !f2 ? 0 : f2.gc()); + g = -e; + g > 0 ? zh() : g < 0 && Bw(a, b, -g); + return true; + } else { + return false; + } + } + function fIb(a) { + var b, c2, d, e, f2, g, h; + h = 0; + if (a.b == 0) { + g = jIb(a, true); + b = 0; + for (d = g, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + if (c2 > 0) { + h += c2; + ++b; + } + } + b > 1 && (h += a.c * (b - 1)); + } else { + h = Mtb(Zzb(OAb(JAb(Plb(a.a), new xIb()), new zIb()))); + } + return h > 0 ? h + a.n.d + a.n.a : 0; + } + function gIb(a) { + var b, c2, d, e, f2, g, h; + h = 0; + if (a.b == 0) { + h = Mtb(Zzb(OAb(JAb(Plb(a.a), new tIb()), new vIb()))); + } else { + g = kIb(a, true); + b = 0; + for (d = g, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + if (c2 > 0) { + h += c2; + ++b; + } + } + b > 1 && (h += a.c * (b - 1)); + } + return h > 0 ? h + a.n.b + a.n.c : 0; + } + function MJb(a, b) { + var c2, d, e, f2; + f2 = BD(Mpb(a.b, b), 124); + c2 = f2.a; + for (e = BD(BD(Qc(a.r, b), 21), 84).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 111); + !!d.c && (c2.a = $wnd.Math.max(c2.a, ZHb(d.c))); + } + if (c2.a > 0) { + switch (b.g) { + case 2: + f2.n.c = a.s; + break; + case 4: + f2.n.b = a.s; + } + } + } + function NQb(a, b) { + var c2, d, e; + c2 = BD(vNb(b, (wSb(), oSb)), 19).a - BD(vNb(a, oSb), 19).a; + if (c2 == 0) { + d = c7c(R6c(BD(vNb(a, (HSb(), DSb)), 8)), BD(vNb(a, ESb), 8)); + e = c7c(R6c(BD(vNb(b, DSb), 8)), BD(vNb(b, ESb), 8)); + return Kdb(d.a * d.b, e.a * e.b); + } + return c2; + } + function iRc(a, b) { + var c2, d, e; + c2 = BD(vNb(b, (JTc(), ETc)), 19).a - BD(vNb(a, ETc), 19).a; + if (c2 == 0) { + d = c7c(R6c(BD(vNb(a, (mTc(), VSc)), 8)), BD(vNb(a, WSc), 8)); + e = c7c(R6c(BD(vNb(b, VSc), 8)), BD(vNb(b, WSc), 8)); + return Kdb(d.a * d.b, e.a * e.b); + } + return c2; + } + function TZb(a) { + var b, c2; + c2 = new Ufb(); + c2.a += "e_"; + b = KZb(a); + b != null && (c2.a += "" + b, c2); + if (!!a.c && !!a.d) { + Qfb((c2.a += " ", c2), C0b(a.c)); + Qfb(Pfb((c2.a += "[", c2), a.c.i), "]"); + Qfb((c2.a += gne, c2), C0b(a.d)); + Qfb(Pfb((c2.a += "[", c2), a.d.i), "]"); + } + return c2.a; + } + function zRc(a) { + switch (a.g) { + case 0: + return new lUc(); + case 1: + return new sUc(); + case 2: + return new CUc(); + case 3: + return new IUc(); + default: + throw vbb(new Wdb("No implementation is available for the layout phase " + (a.f != null ? a.f : "" + a.g))); + } + } + function mfd(a, b, c2, d, e) { + var f2; + f2 = 0; + switch (e.g) { + case 1: + f2 = $wnd.Math.max(0, b.b + a.b - (c2.b + d)); + break; + case 3: + f2 = $wnd.Math.max(0, -a.b - d); + break; + case 2: + f2 = $wnd.Math.max(0, -a.a - d); + break; + case 4: + f2 = $wnd.Math.max(0, b.a + a.a - (c2.a + d)); + } + return f2; + } + function mqd(a, b, c2) { + var d, e, f2, g, h; + if (c2) { + e = c2.a.length; + d = new Yge(e); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + f2 = Zpd(c2, g.a); + Lte in f2.a || Mte in f2.a ? $qd(a, f2, b) : erd(a, f2, b); + otd(BD(Ohb(a.b, Wpd(f2)), 79)); + } + } + } + function LJd(a) { + var b, c2; + switch (a.b) { + case -1: { + return true; + } + case 0: { + c2 = a.t; + if (c2 > 1 || c2 == -1) { + a.b = -1; + return true; + } else { + b = wId(a); + if (!!b && (Q6d(), b.Cj() == Bve)) { + a.b = -1; + return true; + } else { + a.b = 1; + return false; + } + } + } + default: + case 1: { + return false; + } + } + } + function k1d(a, b) { + var c2, d, e, f2, g; + d = (!b.s && (b.s = new cUd(t5, b, 21, 17)), b.s); + f2 = null; + for (e = 0, g = d.i; e < g; ++e) { + c2 = BD(qud(d, e), 170); + switch ($1d(q1d(a, c2))) { + case 2: + case 3: { + !f2 && (f2 = new Rkb()); + f2.c[f2.c.length] = c2; + } + } + } + return !f2 ? (mmb(), mmb(), jmb) : f2; + } + function tde(a, b) { + var c2, d, e, f2; + nde(a); + if (a.c != 0 || a.a != 123) + throw vbb(new mde(tvd((h0d(), Fue)))); + f2 = b == 112; + d = a.d; + c2 = gfb(a.i, 125, d); + if (c2 < 0) + throw vbb(new mde(tvd((h0d(), Gue)))); + e = qfb(a.i, d, c2); + a.d = c2 + 1; + return Lfe(e, f2, (a.e & 512) == 512); + } + function QTb(a) { + var b; + b = BD(vNb(a, (Nyc(), Iwc)), 314); + if (b == (Rpc(), Ppc)) { + throw vbb(new z2c("The hierarchy aware processor " + b + " in child node " + a + " is only allowed if the root node specifies the same hierarchical processor.")); + } + } + function dhc(a, b) { + Hgc(); + var c2, d, e, f2, g, h; + c2 = null; + for (g = b.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 128); + if (f2.o) { + continue; + } + d = F6c(f2.a); + e = C6c(f2.a); + h = new hic(d, e, null, BD(f2.d.a.ec().Kc().Pb(), 17)); + Ekb(h.c, f2.a); + a.c[a.c.length] = h; + !!c2 && Ekb(c2.d, h); + c2 = h; + } + } + function hKd(a, b) { + var c2, d, e; + if (!b) { + jKd(a, null); + _Jd(a, null); + } else if ((b.i & 4) != 0) { + d = "[]"; + for (c2 = b.c; ; c2 = c2.c) { + if ((c2.i & 4) == 0) { + e = jfb((fdb(c2), c2.o + d)); + jKd(a, e); + _Jd(a, e); + break; + } + d += "[]"; + } + } else { + e = jfb((fdb(b), b.o)); + jKd(a, e); + _Jd(a, e); + } + a.yk(b); + } + function b3d(a, b, c2, d, e) { + var f2, g, h, i3; + i3 = a3d(a, BD(e, 56)); + if (PD(i3) !== PD(e)) { + h = BD(a.g[c2], 72); + f2 = R6d(b, i3); + mud(a, c2, t3d(a, c2, f2)); + if (oid(a.e)) { + g = H2d(a, 9, f2.ak(), e, i3, d, false); + Qwd(g, new pSd(a.e, 9, a.c, h, f2, d, false)); + Rwd(g); + } + return i3; + } + return e; + } + function xCc(a, b, c2) { + var d, e, f2, g, h, i3; + d = BD(Qc(a.c, b), 15); + e = BD(Qc(a.c, c2), 15); + f2 = d.Zc(d.gc()); + g = e.Zc(e.gc()); + while (f2.Sb() && g.Sb()) { + h = BD(f2.Ub(), 19); + i3 = BD(g.Ub(), 19); + if (h != i3) { + return beb(h.a, i3.a); + } + } + return !f2.Ob() && !g.Ob() ? 0 : f2.Ob() ? 1 : -1; + } + function m5c(c2, d) { + var e, f2, g; + try { + g = fs(c2.a, d); + return g; + } catch (b) { + b = ubb(b); + if (JD(b, 32)) { + try { + f2 = Icb(d, Rie, Ohe); + e = gdb(c2.a); + if (f2 >= 0 && f2 < e.length) { + return e[f2]; + } + } catch (a) { + a = ubb(a); + if (!JD(a, 127)) + throw vbb(a); + } + return null; + } else + throw vbb(b); + } + } + function tid(a, b) { + var c2, d, e; + e = e1d((O6d(), M6d), a.Tg(), b); + if (e) { + Q6d(); + BD(e, 66).Oj() || (e = _1d(q1d(M6d, e))); + d = (c2 = a.Yg(e), BD(c2 >= 0 ? a._g(c2, true, true) : sid(a, e, true), 153)); + return BD(d, 215).ll(b); + } else { + throw vbb(new Wdb(ite + b.ne() + lte)); + } + } + function BZd() { + tZd(); + var a; + if (sZd) + return BD(nUd((yFd(), xFd), _ve), 1939); + rEd(CK, new J_d()); + CZd(); + a = BD(JD(Phb((yFd(), xFd), _ve), 547) ? Phb(xFd, _ve) : new AZd(), 547); + sZd = true; + yZd(a); + zZd(a); + Rhb((JFd(), IFd), a, new EZd()); + Shb(xFd, _ve, a); + return a; + } + function v2d(a, b) { + var c2, d, e, f2; + a.j = -1; + if (oid(a.e)) { + c2 = a.i; + f2 = a.i != 0; + lud(a, b); + d = new pSd(a.e, 3, a.c, null, b, c2, f2); + e = b.Qk(a.e, a.c, null); + e = h3d(a, b, e); + if (!e) { + Uhd(a.e, d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + lud(a, b); + e = b.Qk(a.e, a.c, null); + !!e && e.Fi(); + } + } + function rA(a, b) { + var c2, d, e; + e = 0; + d = b[0]; + if (d >= a.length) { + return -1; + } + c2 = (BCb(d, a.length), a.charCodeAt(d)); + while (c2 >= 48 && c2 <= 57) { + e = e * 10 + (c2 - 48); + ++d; + if (d >= a.length) { + break; + } + c2 = (BCb(d, a.length), a.charCodeAt(d)); + } + d > b[0] ? b[0] = d : e = -1; + return e; + } + function vMb(a) { + var b, c2, d, e, f2; + e = BD(a.a, 19).a; + f2 = BD(a.b, 19).a; + c2 = e; + d = f2; + b = $wnd.Math.max($wnd.Math.abs(e), $wnd.Math.abs(f2)); + if (e <= 0 && e == f2) { + c2 = 0; + d = f2 - 1; + } else { + if (e == -b && f2 != b) { + c2 = f2; + d = e; + f2 >= 0 && ++c2; + } else { + c2 = -f2; + d = e; + } + } + return new vgd(meb(c2), meb(d)); + } + function fNb(a, b, c2, d) { + var e, f2, g, h, i3, j; + for (e = 0; e < b.o; e++) { + f2 = e - b.j + c2; + for (g = 0; g < b.p; g++) { + h = g - b.k + d; + if ((i3 = f2, j = h, i3 += a.j, j += a.k, i3 >= 0 && j >= 0 && i3 < a.o && j < a.p) && (!ZMb(b, e, g) && hNb(a, f2, h) || YMb(b, e, g) && !iNb(a, f2, h))) { + return true; + } + } + } + return false; + } + function LNc(a, b, c2) { + var d, e, f2, g, h; + g = a.c; + h = a.d; + f2 = l7c(OC(GC(m1, 1), nie, 8, 0, [g.i.n, g.n, g.a])).b; + e = (f2 + l7c(OC(GC(m1, 1), nie, 8, 0, [h.i.n, h.n, h.a])).b) / 2; + d = null; + g.j == (Ucd(), zcd) ? d = new f7c(b + g.i.c.c.a + c2, e) : d = new f7c(b - c2, e); + St(a.a, 0, d); + } + function Qld(a) { + var b, c2, d, e; + b = null; + for (d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)]))); Qr(d); ) { + c2 = BD(Rr(d), 82); + e = atd(c2); + if (!b) { + b = e; + } else if (b != e) { + return false; + } + } + return true; + } + function sud(a, b, c2) { + var d; + ++a.j; + if (b >= a.i) + throw vbb(new qcb(lue + b + mue + a.i)); + if (c2 >= a.i) + throw vbb(new qcb(nue + c2 + mue + a.i)); + d = a.g[c2]; + if (b != c2) { + b < c2 ? $fb(a.g, b, a.g, b + 1, c2 - b) : $fb(a.g, c2 + 1, a.g, c2, b - c2); + NC(a.g, b, d); + a.ei(b, d, c2); + a.ci(); + } + return d; + } + function Rc(a, b, c2) { + var d; + d = BD(a.c.xc(b), 14); + if (!d) { + d = a.ic(b); + if (d.Fc(c2)) { + ++a.d; + a.c.zc(b, d); + return true; + } else { + throw vbb(new ycb("New Collection violated the Collection spec")); + } + } else if (d.Fc(c2)) { + ++a.d; + return true; + } else { + return false; + } + } + function heb(a) { + var b, c2, d; + if (a < 0) { + return 0; + } else if (a == 0) { + return 32; + } else { + d = -(a >> 16); + b = d >> 16 & 16; + c2 = 16 - b; + a = a >> b; + d = a - 256; + b = d >> 16 & 8; + c2 += b; + a <<= b; + d = a - Rje; + b = d >> 16 & 4; + c2 += b; + a <<= b; + d = a - oie; + b = d >> 16 & 2; + c2 += b; + a <<= b; + d = a >> 14; + b = d & ~(d >> 1); + return c2 + 2 - b; + } + } + function $Pb(a) { + QPb(); + var b, c2, d, e; + PPb = new Rkb(); + OPb = new Lqb(); + NPb = new Rkb(); + b = (!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a); + SPb(b); + for (e = new Fyd(b); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + if (Jkb(PPb, d, 0) == -1) { + c2 = new Rkb(); + Ekb(NPb, c2); + TPb(d, c2); + } + } + return NPb; + } + function BQb(a, b, c2) { + var d, e, f2, g; + a.a = c2.b.d; + if (JD(b, 352)) { + e = itd(BD(b, 79), false, false); + f2 = ofd(e); + d = new FQb(a); + reb(f2, d); + ifd(f2, e); + b.We((Y9c(), Q8c)) != null && reb(BD(b.We(Q8c), 74), d); + } else { + g = BD(b, 470); + g.Hg(g.Dg() + a.a.a); + g.Ig(g.Eg() + a.a.b); + } + } + function _5b(a, b) { + var c2, d, e, f2, g, h, i3, j; + j = Edb(ED(vNb(b, (Nyc(), zyc)))); + i3 = a[0].n.a + a[0].o.a + a[0].d.c + j; + for (h = 1; h < a.length; h++) { + d = a[h].n; + e = a[h].o; + c2 = a[h].d; + f2 = d.a - c2.b - i3; + f2 < 0 && (d.a -= f2); + g = b.f; + g.a = $wnd.Math.max(g.a, d.a + e.a); + i3 = d.a + e.a + c2.c + j; + } + } + function D$c(a, b) { + var c2, d, e, f2, g, h; + d = BD(BD(Ohb(a.g, b.a), 46).a, 65); + e = BD(BD(Ohb(a.g, b.b), 46).a, 65); + f2 = d.b; + g = e.b; + c2 = z6c(f2, g); + if (c2 >= 0) { + return c2; + } + h = U6c(c7c(new f7c(g.c + g.b / 2, g.d + g.a / 2), new f7c(f2.c + f2.b / 2, f2.d + f2.a / 2))); + return -(xOb(f2, g) - 1) * h; + } + function ufd(a, b, c2) { + var d; + MAb(new YAb(null, (!c2.a && (c2.a = new cUd(A2, c2, 6, 6)), new Kub(c2.a, 16))), new Mfd(a, b)); + MAb(new YAb(null, (!c2.n && (c2.n = new cUd(D2, c2, 1, 7)), new Kub(c2.n, 16))), new Ofd(a, b)); + d = BD(hkd(c2, (Y9c(), Q8c)), 74); + !!d && p7c(d, a, b); + } + function sid(a, b, c2) { + var d, e, f2; + f2 = e1d((O6d(), M6d), a.Tg(), b); + if (f2) { + Q6d(); + BD(f2, 66).Oj() || (f2 = _1d(q1d(M6d, f2))); + e = (d = a.Yg(f2), BD(d >= 0 ? a._g(d, true, true) : sid(a, f2, true), 153)); + return BD(e, 215).hl(b, c2); + } else { + throw vbb(new Wdb(ite + b.ne() + lte)); + } + } + function wAd(a, b, c2, d) { + var e, f2, g, h, i3; + e = a.d[b]; + if (e) { + f2 = e.g; + i3 = e.i; + if (d != null) { + for (h = 0; h < i3; ++h) { + g = BD(f2[h], 133); + if (g.Sh() == c2 && pb(d, g.cd())) { + return g; + } + } + } else { + for (h = 0; h < i3; ++h) { + g = BD(f2[h], 133); + if (PD(g.cd()) === PD(d)) { + return g; + } + } + } + } + return null; + } + function Pgb(a, b) { + var c2; + if (b < 0) { + throw vbb(new ocb("Negative exponent")); + } + if (b == 0) { + return Cgb; + } else if (b == 1 || Kgb(a, Cgb) || Kgb(a, Ggb)) { + return a; + } + if (!Sgb(a, 0)) { + c2 = 1; + while (!Sgb(a, c2)) { + ++c2; + } + return Ogb(bhb(c2 * b), Pgb(Rgb2(a, c2), b)); + } + return Jhb(a, b); + } + function xlb(a, b) { + var c2, d, e; + if (PD(a) === PD(b)) { + return true; + } + if (a == null || b == null) { + return false; + } + if (a.length != b.length) { + return false; + } + for (c2 = 0; c2 < a.length; ++c2) { + d = a[c2]; + e = b[c2]; + if (!(PD(d) === PD(e) || d != null && pb(d, e))) { + return false; + } + } + return true; + } + function CVb(a) { + nVb(); + var b, c2, d; + this.b = mVb; + this.c = (ead(), cad); + this.f = (iVb(), hVb); + this.a = a; + zVb(this, new DVb()); + sVb(this); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 81); + if (!c2.d) { + b = new gVb(OC(GC(IP, 1), Uhe, 81, 0, [c2])); + Ekb(a.a, b); + } + } + } + function D3b(a, b, c2) { + var d, e, f2, g, h, i3; + if (!a || a.c.length == 0) { + return null; + } + f2 = new cIb(b, !c2); + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 70); + UHb(f2, (a$b(), new v$b(d))); + } + g = f2.i; + g.a = (i3 = f2.n, f2.e.b + i3.d + i3.a); + g.b = (h = f2.n, f2.e.a + h.b + h.c); + return f2; + } + function O5b(a) { + var b, c2, d, e, f2, g, h; + h = l_b(a.a); + Nlb(h, new T5b()); + c2 = null; + for (e = h, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + if (d.k != (j0b(), e0b)) { + break; + } + b = BD(vNb(d, (wtc(), Hsc)), 61); + if (b != (Ucd(), Tcd) && b != zcd) { + continue; + } + !!c2 && BD(vNb(c2, Qsc), 15).Fc(d); + c2 = d; + } + } + function YOc(a, b, c2) { + var d, e, f2, g, h, i3, j; + i3 = (tCb(b, a.c.length), BD(a.c[b], 329)); + Kkb(a, b); + if (i3.b / 2 >= c2) { + d = b; + j = (i3.c + i3.a) / 2; + g = j - c2; + if (i3.c <= j - c2) { + e = new bPc(i3.c, g); + Dkb(a, d++, e); + } + h = j + c2; + if (h <= i3.a) { + f2 = new bPc(h, i3.a); + wCb(d, a.c.length); + aCb(a.c, d, f2); + } + } + } + function u0d(a) { + var b; + if (!a.c && a.g == null) { + a.d = a.si(a.f); + wtd(a, a.d); + b = a.d; + } else { + if (a.g == null) { + return true; + } else if (a.i == 0) { + return false; + } else { + b = BD(a.g[a.i - 1], 47); + } + } + if (b == a.b && null.km >= null.jm()) { + Vud(a); + return u0d(a); + } else { + return b.Ob(); + } + } + function KTb(a, b, c2) { + var d, e, f2, g, h; + h = c2; + !h && (h = Ydd(new Zdd(), 0)); + Odd(h, Vme, 1); + aUb(a.c, b); + g = EYb(a.a, b); + if (g.gc() == 1) { + MTb(BD(g.Xb(0), 37), h); + } else { + f2 = 1 / g.gc(); + for (e = g.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + MTb(d, Udd(h, f2)); + } + } + CYb(a.a, g, b); + NTb(b); + Qdd(h); + } + function qYb(a) { + this.a = a; + if (a.c.i.k == (j0b(), e0b)) { + this.c = a.c; + this.d = BD(vNb(a.c.i, (wtc(), Hsc)), 61); + } else if (a.d.i.k == e0b) { + this.c = a.d; + this.d = BD(vNb(a.d.i, (wtc(), Hsc)), 61); + } else { + throw vbb(new Wdb("Edge " + a + " is not an external edge.")); + } + } + function oQd(a, b) { + var c2, d, e; + e = a.b; + a.b = b; + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, e, a.b)); + if (!b) { + pnd(a, null); + qQd(a, 0); + pQd(a, null); + } else if (b != a) { + pnd(a, b.zb); + qQd(a, b.d); + c2 = (d = b.c, d == null ? b.zb : d); + pQd(a, c2 == null || dfb(c2, b.zb) ? null : c2); + } + } + function NRd(a) { + var b, c2; + if (a.f) { + while (a.n < a.o) { + b = BD(!a.j ? a.k.Xb(a.n) : a.j.pi(a.n), 72); + c2 = b.ak(); + if (JD(c2, 99) && (BD(c2, 18).Bb & ote) != 0 && (!a.e || c2.Gj() != x2 || c2.aj() != 0) && b.dd() != null) { + return true; + } else { + ++a.n; + } + } + return false; + } else { + return a.n < a.o; + } + } + function _i(a, b) { + var c2; + this.e = (im(), Qb(a), im(), nm(a)); + this.c = (Qb(b), nm(b)); + Lb(this.e.Hd().dc() == this.c.Hd().dc()); + this.d = Ev(this.e); + this.b = Ev(this.c); + c2 = IC(SI, [nie, Uhe], [5, 1], 5, [this.e.Hd().gc(), this.c.Hd().gc()], 2); + this.a = c2; + Ri(this); + } + function vz(b) { + !tz && (tz = wz()), tz; + var d = b.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g, function(a) { + return uz(a); + }); + return '"' + d + '"'; + } + function cEb(a) { + ODb(); + var b, c2; + this.b = LDb; + this.c = NDb; + this.g = (FDb(), EDb); + this.d = (ead(), cad); + this.a = a; + RDb(this); + for (c2 = new olb(a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + !b.a && pDb(rDb(new sDb(), OC(GC(PM, 1), Uhe, 57, 0, [b])), a); + b.e = new K6c(b.d); + } + } + function HQb(a) { + var b, c2, d, e, f2, g; + e = a.e.c.length; + d = KC(yK, eme, 15, e, 0, 1); + for (g = new olb(a.e); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 144); + d[f2.b] = new Psb(); + } + for (c2 = new olb(a.c); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 282); + d[b.c.b].Fc(b); + d[b.d.b].Fc(b); + } + return d; + } + function fDc(a) { + var b, c2, d, e, f2, g, h; + h = Pu(a.c.length); + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + g = new Tqb(); + f2 = U_b(d); + for (c2 = new Sr(ur(f2.a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + b.c.i == b.d.i || Qqb(g, b.d.i); + } + h.c[h.c.length] = g; + } + return h; + } + function ozd(a, b) { + var c2, d, e, f2, g; + c2 = BD(Ajd(a.a, 4), 126); + g = c2 == null ? 0 : c2.length; + if (b >= g) + throw vbb(new Cyd(b, g)); + e = c2[b]; + if (g == 1) { + d = null; + } else { + d = KC($3, hve, 415, g - 1, 0, 1); + $fb(c2, 0, d, 0, b); + f2 = g - b - 1; + f2 > 0 && $fb(c2, b + 1, d, b, f2); + } + b0d(a, d); + a0d(a, b, e); + return e; + } + function m8d() { + m8d = ccb; + k8d = BD(qud(ZKd((r8d(), q8d).qb), 6), 34); + h8d = BD(qud(ZKd(q8d.qb), 3), 34); + i8d = BD(qud(ZKd(q8d.qb), 4), 34); + j8d = BD(qud(ZKd(q8d.qb), 5), 18); + XId(k8d); + XId(h8d); + XId(i8d); + XId(j8d); + l8d = new amb(OC(GC(t5, 1), Mve, 170, 0, [k8d, h8d])); + } + function AJb(a, b) { + var c2; + this.d = new H_b(); + this.b = b; + this.e = new g7c(b.qf()); + c2 = a.u.Hc((rcd(), ocd)); + a.u.Hc(ncd) ? a.D ? this.a = c2 && !b.If() : this.a = true : a.u.Hc(pcd) ? c2 ? this.a = !(b.zf().Kc().Ob() || b.Bf().Kc().Ob()) : this.a = false : this.a = false; + } + function IKb(a, b) { + var c2, d, e, f2; + c2 = a.o.a; + for (f2 = BD(BD(Qc(a.r, b), 21), 84).Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 111); + e.e.a = (d = e.b, d.Xe((Y9c(), s9c)) ? d.Hf() == (Ucd(), Tcd) ? -d.rf().a - Edb(ED(d.We(s9c))) : c2 + Edb(ED(d.We(s9c))) : d.Hf() == (Ucd(), Tcd) ? -d.rf().a : c2); + } + } + function Q1b(a, b) { + var c2, d, e, f2; + c2 = BD(vNb(a, (Nyc(), Lwc)), 103); + f2 = BD(hkd(b, $xc), 61); + e = BD(vNb(a, Vxc), 98); + if (e != (dcd(), bcd) && e != ccd) { + if (f2 == (Ucd(), Scd)) { + f2 = lfd(b, c2); + f2 == Scd && (f2 = Zcd(c2)); + } + } else { + d = M1b(b); + d > 0 ? f2 = Zcd(c2) : f2 = Wcd(Zcd(c2)); + } + jkd(b, $xc, f2); + } + function olc(a, b) { + var c2, d, e, f2, g; + g = a.j; + b.a != b.b && Okb(g, new Ulc()); + e = g.c.length / 2 | 0; + for (d = 0; d < e; d++) { + f2 = (tCb(d, g.c.length), BD(g.c[d], 113)); + f2.c && G0b(f2.d, b.a); + } + for (c2 = e; c2 < g.c.length; c2++) { + f2 = (tCb(c2, g.c.length), BD(g.c[c2], 113)); + f2.c && G0b(f2.d, b.b); + } + } + function TGc(a, b, c2) { + var d, e, f2; + d = a.c[b.c.p][b.p]; + e = a.c[c2.c.p][c2.p]; + if (d.a != null && e.a != null) { + f2 = Ddb(d.a, e.a); + f2 < 0 ? WGc(a, b, c2) : f2 > 0 && WGc(a, c2, b); + return f2; + } else if (d.a != null) { + WGc(a, b, c2); + return -1; + } else if (e.a != null) { + WGc(a, c2, b); + return 1; + } + return 0; + } + function swd(a, b) { + var c2, d, e, f2; + if (a.ej()) { + c2 = a.Vi(); + f2 = a.fj(); + ++a.j; + a.Hi(c2, a.oi(c2, b)); + d = a.Zi(3, null, b, c2, f2); + if (a.bj()) { + e = a.cj(b, null); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + Bvd(a, b); + if (a.bj()) { + e = a.cj(b, null); + !!e && e.Fi(); + } + } + } + function D2d(a, b) { + var c2, d, e, f2, g; + g = S6d(a.e.Tg(), b); + e = new yud(); + c2 = BD(a.g, 119); + for (f2 = a.i; --f2 >= 0; ) { + d = c2[f2]; + g.rl(d.ak()) && wtd(e, d); + } + !Yxd(a, e) && oid(a.e) && GLd(a, b.$j() ? H2d(a, 6, b, (mmb(), jmb), null, -1, false) : H2d(a, b.Kj() ? 2 : 1, b, null, null, -1, false)); + } + function Dhb() { + Dhb = ccb; + var a, b; + Bhb = KC(cJ, nie, 91, 32, 0, 1); + Chb = KC(cJ, nie, 91, 32, 0, 1); + a = 1; + for (b = 0; b <= 18; b++) { + Bhb[b] = ghb(a); + Chb[b] = ghb(Nbb(a, b)); + a = Ibb(a, 5); + } + for (; b < Chb.length; b++) { + Bhb[b] = Ogb(Bhb[b - 1], Bhb[1]); + Chb[b] = Ogb(Chb[b - 1], (Hgb(), Egb)); + } + } + function K4b(a, b) { + var c2, d, e, f2, g; + if (a.a == (yrc(), wrc)) { + return true; + } + f2 = b.a.c; + c2 = b.a.c + b.a.b; + if (b.j) { + d = b.A; + g = d.c.c.a - d.o.a / 2; + e = f2 - (d.n.a + d.o.a); + if (e > g) { + return false; + } + } + if (b.q) { + d = b.C; + g = d.c.c.a - d.o.a / 2; + e = d.n.a - c2; + if (e > g) { + return false; + } + } + return true; + } + function wcc(a, b) { + var c2; + Odd(b, "Partition preprocessing", 1); + c2 = BD(GAb(JAb(LAb(JAb(new YAb(null, new Kub(a.a, 16)), new Acc()), new Ccc()), new Ecc()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + MAb(c2.Oc(), new Gcc()); + Qdd(b); + } + function DMc(a) { + wMc(); + var b, c2, d, e, f2, g, h; + c2 = new $rb(); + for (e = new olb(a.e.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + for (g = new olb(d.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + h = a.g[f2.p]; + b = BD(Wrb(c2, h), 15); + if (!b) { + b = new Rkb(); + Xrb(c2, h, b); + } + b.Fc(f2); + } + } + return c2; + } + function dRc(a, b) { + var c2, d, e, f2, g; + e = b.b.b; + a.a = KC(yK, eme, 15, e, 0, 1); + a.b = KC(sbb, dle, 25, e, 16, 1); + for (g = Jsb(b.b, 0); g.b != g.d.c; ) { + f2 = BD(Xsb(g), 86); + a.a[f2.g] = new Psb(); + } + for (d = Jsb(b.a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 188); + a.a[c2.b.g].Fc(c2); + a.a[c2.c.g].Fc(c2); + } + } + function qmd(a) { + var b; + if ((a.Db & 64) != 0) + return Eid(a); + b = new Jfb(Eid(a)); + b.a += " (startX: "; + Bfb(b, a.j); + b.a += ", startY: "; + Bfb(b, a.k); + b.a += ", endX: "; + Bfb(b, a.b); + b.a += ", endY: "; + Bfb(b, a.c); + b.a += ", identifier: "; + Efb(b, a.d); + b.a += ")"; + return b.a; + } + function EId(a) { + var b; + if ((a.Db & 64) != 0) + return qnd(a); + b = new Jfb(qnd(a)); + b.a += " (ordered: "; + Ffb(b, (a.Bb & 256) != 0); + b.a += ", unique: "; + Ffb(b, (a.Bb & 512) != 0); + b.a += ", lowerBound: "; + Cfb(b, a.s); + b.a += ", upperBound: "; + Cfb(b, a.t); + b.a += ")"; + return b.a; + } + function Wnd(a, b, c2, d, e, f2, g, h) { + var i3; + JD(a.Cb, 88) && XMd($Kd(BD(a.Cb, 88)), 4); + pnd(a, c2); + a.f = d; + dJd(a, e); + fJd(a, f2); + ZId(a, g); + eJd(a, false); + CId(a, true); + aJd(a, h); + BId(a, true); + AId(a, 0); + a.b = 0; + DId(a, 1); + i3 = xId(a, b, null); + !!i3 && i3.Fi(); + MJd(a, false); + return a; + } + function fyb(a, b) { + var c2, d, e, f2; + c2 = BD(Phb(a.a, b), 512); + if (!c2) { + d = new wyb(b); + e = (oyb(), lyb) ? null : d.c; + f2 = qfb(e, 0, $wnd.Math.max(0, kfb(e, wfb(46)))); + vyb(d, fyb(a, f2)); + (lyb ? null : d.c).length == 0 && qyb(d, new zyb()); + Shb(a.a, lyb ? null : d.c, d); + return d; + } + return c2; + } + function BOb(a, b) { + var c2; + a.b = b; + a.g = new Rkb(); + c2 = COb(a.b); + a.e = c2; + a.f = c2; + a.c = Ccb(DD(vNb(a.b, (fFb(), $Eb)))); + a.a = ED(vNb(a.b, (Y9c(), r8c))); + a.a == null && (a.a = 1); + Edb(a.a) > 1 ? a.e *= Edb(a.a) : a.f /= Edb(a.a); + DOb(a); + EOb(a); + AOb(a); + yNb(a.b, (CPb(), uPb), a.g); + } + function Y5b(a, b, c2) { + var d, e, f2, g, h, i3; + d = 0; + i3 = c2; + if (!b) { + d = c2 * (a.c.length - 1); + i3 *= -1; + } + for (f2 = new olb(a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + yNb(e, (Nyc(), mwc), (F7c(), B7c)); + e.o.a = d; + for (h = Y_b(e, (Ucd(), zcd)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + g.n.a = d; + } + d += i3; + } + } + function Qxd(a, b, c2) { + var d, e, f2; + if (a.ej()) { + f2 = a.fj(); + kud(a, b, c2); + d = a.Zi(3, null, c2, b, f2); + if (a.bj()) { + e = a.cj(c2, null); + a.ij() && (e = a.jj(c2, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + kud(a, b, c2); + if (a.bj()) { + e = a.cj(c2, null); + !!e && e.Fi(); + } + } + } + function ILd(a, b, c2) { + var d, e, f2, g, h, i3; + h = a.Gk(c2); + if (h != c2) { + g = a.g[b]; + i3 = h; + mud(a, b, a.oi(b, i3)); + f2 = g; + a.gi(b, i3, f2); + if (a.rk()) { + d = c2; + e = a.dj(d, null); + !BD(h, 49).eh() && (e = a.cj(i3, e)); + !!e && e.Fi(); + } + oid(a.e) && GLd(a, a.Zi(9, c2, h, b, false)); + return h; + } else { + return c2; + } + } + function pVb(a, b) { + var c2, d, e, f2; + for (d = new olb(a.a.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 189); + c2.g = true; + } + for (f2 = new olb(a.a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 81); + e.k = Ccb(DD(a.e.Kb(new vgd(e, b)))); + e.d.g = e.d.g & Ccb(DD(a.e.Kb(new vgd(e, b)))); + } + return a; + } + function pkc(a) { + var b, c2, d, e, f2; + c2 = (b = BD(gdb(F1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + f2 = BD(vNb(a, (wtc(), gtc)), 10); + if (f2) { + for (e = new olb(f2.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + PD(vNb(d, $sc)) === PD(a) && a1b(new b1b(d.b)) && rqb(c2, d.j); + } + } + return c2; + } + function zCc(a, b, c2) { + var d, e, f2, g, h; + if (a.d[c2.p]) { + return; + } + for (e = new Sr(ur(U_b(c2).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + h = d.d.i; + for (g = new Sr(ur(R_b(h).a.Kc(), new Sq())); Qr(g); ) { + f2 = BD(Rr(g), 17); + f2.c.i == b && (a.a[f2.p] = true); + } + zCc(a, b, h); + } + a.d[c2.p] = true; + } + function Bjd(a, b) { + var c2, d, e, f2, g, h, i3; + d = aeb(a.Db & 254); + if (d == 1) { + a.Eb = null; + } else { + f2 = CD(a.Eb); + if (d == 2) { + e = zjd(a, b); + a.Eb = f2[e == 0 ? 1 : 0]; + } else { + g = KC(SI, Uhe, 1, d - 1, 5, 1); + for (c2 = 2, h = 0, i3 = 0; c2 <= 128; c2 <<= 1) { + c2 == b ? ++h : (a.Db & c2) != 0 && (g[i3++] = f2[h++]); + } + a.Eb = g; + } + } + a.Db &= ~b; + } + function n1d(a, b) { + var c2, d, e, f2, g; + d = (!b.s && (b.s = new cUd(t5, b, 21, 17)), b.s); + f2 = null; + for (e = 0, g = d.i; e < g; ++e) { + c2 = BD(qud(d, e), 170); + switch ($1d(q1d(a, c2))) { + case 4: + case 5: + case 6: { + !f2 && (f2 = new Rkb()); + f2.c[f2.c.length] = c2; + break; + } + } + } + return !f2 ? (mmb(), mmb(), jmb) : f2; + } + function Uee(a) { + var b; + b = 0; + switch (a) { + case 105: + b = 2; + break; + case 109: + b = 8; + break; + case 115: + b = 4; + break; + case 120: + b = 16; + break; + case 117: + b = 32; + break; + case 119: + b = 64; + break; + case 70: + b = 256; + break; + case 72: + b = 128; + break; + case 88: + b = 512; + break; + case 44: + b = zte; + } + return b; + } + function Ghb(a, b, c2, d, e) { + var f2, g, h, i3; + if (PD(a) === PD(b) && d == e) { + Lhb(a, d, c2); + return; + } + for (h = 0; h < d; h++) { + g = 0; + f2 = a[h]; + for (i3 = 0; i3 < e; i3++) { + g = wbb(wbb(Ibb(xbb(f2, Yje), xbb(b[i3], Yje)), xbb(c2[h + i3], Yje)), xbb(Tbb(g), Yje)); + c2[h + i3] = Tbb(g); + g = Pbb(g, 32); + } + c2[h + e] = Tbb(g); + } + } + function COb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + k = 0; + j = 0; + e = a.a; + h = e.a.gc(); + for (d = e.a.ec().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 561); + b = (c2.b && LOb(c2), c2.a); + l = b.a; + g = b.b; + k += l + g; + j += l * g; + } + i3 = $wnd.Math.sqrt(400 * h * j - 4 * j + k * k) + k; + f2 = 2 * (100 * h - 1); + if (f2 == 0) { + return i3; + } + return i3 / f2; + } + function mOc(a, b) { + if (b.b != 0) { + isNaN(a.s) ? a.s = Edb((sCb(b.b != 0), ED(b.a.a.c))) : a.s = $wnd.Math.min(a.s, Edb((sCb(b.b != 0), ED(b.a.a.c)))); + isNaN(a.c) ? a.c = Edb((sCb(b.b != 0), ED(b.c.b.c))) : a.c = $wnd.Math.max(a.c, Edb((sCb(b.b != 0), ED(b.c.b.c)))); + } + } + function Pld(a) { + var b, c2, d, e; + b = null; + for (d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)]))); Qr(d); ) { + c2 = BD(Rr(d), 82); + e = atd(c2); + if (!b) { + b = Xod(e); + } else if (b != Xod(e)) { + return true; + } + } + return false; + } + function Rxd(a, b) { + var c2, d, e, f2; + if (a.ej()) { + c2 = a.i; + f2 = a.fj(); + lud(a, b); + d = a.Zi(3, null, b, c2, f2); + if (a.bj()) { + e = a.cj(b, null); + a.ij() && (e = a.jj(b, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + lud(a, b); + if (a.bj()) { + e = a.cj(b, null); + !!e && e.Fi(); + } + } + } + function rwd(a, b, c2) { + var d, e, f2; + if (a.ej()) { + f2 = a.fj(); + ++a.j; + a.Hi(b, a.oi(b, c2)); + d = a.Zi(3, null, c2, b, f2); + if (a.bj()) { + e = a.cj(c2, null); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.$i(d); + } + } else { + ++a.j; + a.Hi(b, a.oi(b, c2)); + if (a.bj()) { + e = a.cj(c2, null); + !!e && e.Fi(); + } + } + } + function Wee(a) { + var b, c2, d, e; + e = a.length; + b = null; + for (d = 0; d < e; d++) { + c2 = (BCb(d, a.length), a.charCodeAt(d)); + if (hfb(".*+?{[()|\\^$", wfb(c2)) >= 0) { + if (!b) { + b = new Ifb(); + d > 0 && Efb(b, a.substr(0, d)); + } + b.a += "\\"; + Afb(b, c2 & aje); + } else + !!b && Afb(b, c2 & aje); + } + return b ? b.a : a; + } + function l5c(a) { + var b; + if (!a.a) { + throw vbb(new Zdb("IDataType class expected for layout option " + a.f)); + } + b = gvd(a.a); + if (b == null) { + throw vbb(new Zdb("Couldn't create new instance of property '" + a.f + "'. " + ise + (fdb(Y3), Y3.k) + jse)); + } + return BD(b, 414); + } + function aid(a) { + var b, c2, d, e, f2; + f2 = a.eh(); + if (f2) { + if (f2.kh()) { + e = xid(a, f2); + if (e != f2) { + c2 = a.Vg(); + d = (b = a.Vg(), b >= 0 ? a.Qg(null) : a.eh().ih(a, -1 - b, null, null)); + a.Rg(BD(e, 49), c2); + !!d && d.Fi(); + a.Lg() && a.Mg() && c2 > -1 && Uhd(a, new nSd(a, 9, c2, f2, e)); + return e; + } + } + } + return f2; + } + function nTb(a) { + var b, c2, d, e, f2, g, h, i3; + g = 0; + f2 = a.f.e; + for (d = 0; d < f2.c.length; ++d) { + h = (tCb(d, f2.c.length), BD(f2.c[d], 144)); + for (e = d + 1; e < f2.c.length; ++e) { + i3 = (tCb(e, f2.c.length), BD(f2.c[e], 144)); + c2 = S6c(h.d, i3.d); + b = c2 - a.a[h.b][i3.b]; + g += a.i[h.b][i3.b] * b * b; + } + } + return g; + } + function _ac(a, b) { + var c2; + if (wNb(b, (Nyc(), mxc))) { + return; + } + c2 = hbc(BD(vNb(b, Uac), 360), BD(vNb(a, mxc), 163)); + yNb(b, Uac, c2); + if (Qr(new Sr(ur(O_b(b).a.Kc(), new Sq())))) { + return; + } + switch (c2.g) { + case 1: + yNb(b, mxc, (Ctc(), xtc)); + break; + case 2: + yNb(b, mxc, (Ctc(), ztc)); + } + } + function wkc(a, b) { + var c2; + mkc(a); + a.a = (c2 = new Ji(), MAb(new YAb(null, new Kub(b.d, 16)), new Vkc(c2)), c2); + rkc(a, BD(vNb(b.b, (Nyc(), Wwc)), 376)); + tkc(a); + skc(a); + qkc(a); + ukc(a); + vkc(a, b); + MAb(LAb(new YAb(null, $i(Yi(a.b).a)), new Lkc()), new Nkc()); + b.a = false; + a.a = null; + } + function Bod() { + fod.call(this, yte, (Fhd(), Ehd)); + this.p = null; + this.a = null; + this.f = null; + this.n = null; + this.g = null; + this.c = null; + this.i = null; + this.j = null; + this.d = null; + this.b = null; + this.e = null; + this.k = null; + this.o = null; + this.s = null; + this.q = false; + this.r = false; + } + function Csd() { + Csd = ccb; + Bsd = new Dsd(Wne, 0); + ysd = new Dsd("INSIDE_SELF_LOOPS", 1); + zsd = new Dsd("MULTI_EDGES", 2); + xsd = new Dsd("EDGE_LABELS", 3); + Asd = new Dsd("PORTS", 4); + vsd = new Dsd("COMPOUND", 5); + usd = new Dsd("CLUSTERS", 6); + wsd = new Dsd("DISCONNECTED", 7); + } + function Sgb(a, b) { + var c2, d, e; + if (b == 0) { + return (a.a[0] & 1) != 0; + } + if (b < 0) { + throw vbb(new ocb("Negative bit address")); + } + e = b >> 5; + if (e >= a.d) { + return a.e < 0; + } + c2 = a.a[e]; + b = 1 << (b & 31); + if (a.e < 0) { + d = Mgb(a); + if (e < d) { + return false; + } else + d == e ? c2 = -c2 : c2 = ~c2; + } + return (c2 & b) != 0; + } + function O1c(a, b, c2, d) { + var e; + BD(c2.b, 65); + BD(c2.b, 65); + BD(d.b, 65); + BD(d.b, 65); + e = c7c(R6c(BD(c2.b, 65).c), BD(d.b, 65).c); + $6c(e, YNb(BD(c2.b, 65), BD(d.b, 65), e)); + BD(d.b, 65); + BD(d.b, 65); + BD(d.b, 65).c.a + e.a; + BD(d.b, 65).c.b + e.b; + BD(d.b, 65); + Hkb(d.a, new T1c(a, b, d)); + } + function vNd(a, b) { + var c2, d, e, f2, g, h, i3; + f2 = b.e; + if (f2) { + c2 = aid(f2); + d = BD(a.g, 674); + for (g = 0; g < a.i; ++g) { + i3 = d[g]; + if (JQd(i3) == c2) { + e = (!i3.d && (i3.d = new xMd(j5, i3, 1)), i3.d); + h = BD(c2.ah(Nid(f2, f2.Cb, f2.Db >> 16)), 15).Xc(f2); + if (h < e.i) { + return vNd(a, BD(qud(e, h), 87)); + } + } + } + } + return b; + } + function bcb(a, b, c2) { + var d = _bb, h; + var e = d[a]; + var f2 = e instanceof Array ? e[0] : null; + if (e && !f2) { + _2 = e; + } else { + _2 = (h = b && b.prototype, !h && (h = _bb[b]), ecb(h)); + _2.hm = c2; + !b && (_2.im = gcb); + d[a] = _2; + } + for (var g = 3; g < arguments.length; ++g) { + arguments[g].prototype = _2; + } + f2 && (_2.gm = f2); + } + function Qr(a) { + var b; + while (!BD(Qb(a.a), 47).Ob()) { + a.d = Pr(a); + if (!a.d) { + return false; + } + a.a = BD(a.d.Pb(), 47); + if (JD(a.a, 39)) { + b = BD(a.a, 39); + a.a = b.a; + !a.b && (a.b = new jkb()); + Wjb(a.b, a.d); + if (b.b) { + while (!akb(b.b)) { + Wjb(a.b, BD(gkb(b.b), 47)); + } + } + a.d = b.d; + } + } + return true; + } + function krb(a, b) { + var c2, d, e, f2, g; + f2 = b == null ? 0 : a.b.se(b); + d = (c2 = a.a.get(f2), c2 == null ? new Array() : c2); + for (g = 0; g < d.length; g++) { + e = d[g]; + if (a.b.re(b, e.cd())) { + if (d.length == 1) { + d.length = 0; + trb(a.a, f2); + } else { + d.splice(g, 1); + } + --a.c; + zpb(a.b); + return e.dd(); + } + } + return null; + } + function GGb(a, b) { + var c2, d, e, f2; + e = 1; + b.j = true; + f2 = null; + for (d = new olb(LFb(b)); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 213); + if (!a.c[c2.c]) { + a.c[c2.c] = true; + f2 = xFb(c2, b); + if (c2.f) { + e += GGb(a, f2); + } else if (!f2.j && c2.a == c2.e.e - c2.d.e) { + c2.f = true; + Qqb(a.p, c2); + e += GGb(a, f2); + } + } + } + return e; + } + function MVb(a) { + var b, c2, d; + for (c2 = new olb(a.a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + d = (uCb(0), 0); + if (d > 0) { + !(fad(a.a.c) && b.n.d) && !(gad(a.a.c) && b.n.b) && (b.g.d += $wnd.Math.max(0, d / 2 - 0.5)); + !(fad(a.a.c) && b.n.a) && !(gad(a.a.c) && b.n.c) && (b.g.a -= d - 1); + } + } + } + function N3b(a) { + var b, c2, d, e, f2; + e = new Rkb(); + f2 = O3b(a, e); + b = BD(vNb(a, (wtc(), gtc)), 10); + if (b) { + for (d = new olb(b.j); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 11); + PD(vNb(c2, $sc)) === PD(a) && (f2 = $wnd.Math.max(f2, O3b(c2, e))); + } + } + e.c.length == 0 || yNb(a, Ysc, f2); + return f2 != -1 ? e : null; + } + function a9b(a, b, c2) { + var d, e, f2, g, h, i3; + f2 = BD(Ikb(b.e, 0), 17).c; + d = f2.i; + e = d.k; + i3 = BD(Ikb(c2.g, 0), 17).d; + g = i3.i; + h = g.k; + e == (j0b(), g0b) ? yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)) : yNb(a, (wtc(), Vsc), f2); + h == g0b ? yNb(a, (wtc(), Wsc), BD(vNb(g, Wsc), 11)) : yNb(a, (wtc(), Wsc), i3); + } + function Rs(a, b) { + var c2, d, e, f2; + f2 = Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))); + c2 = f2 & a.b.length - 1; + e = null; + for (d = a.b[c2]; d; e = d, d = d.a) { + if (d.d == f2 && Hb(d.i, b)) { + !e ? a.b[c2] = d.a : e.a = d.a; + Bs(d.c, d.f); + As(d.b, d.e); + --a.f; + ++a.e; + return true; + } + } + return false; + } + function lD(a, b) { + var c2, d, e, f2, g; + b &= 63; + c2 = a.h; + d = (c2 & Gje) != 0; + d && (c2 |= -1048576); + if (b < 22) { + g = c2 >> b; + f2 = a.m >> b | c2 << 22 - b; + e = a.l >> b | a.m << 22 - b; + } else if (b < 44) { + g = d ? Fje : 0; + f2 = c2 >> b - 22; + e = a.m >> b - 22 | c2 << 44 - b; + } else { + g = d ? Fje : 0; + f2 = d ? Eje : 0; + e = c2 >> b - 44; + } + return TC(e & Eje, f2 & Eje, g & Fje); + } + function XOb(a) { + var b, c2, d, e, f2, g; + this.c = new Rkb(); + this.d = a; + d = Pje; + e = Pje; + b = Qje; + c2 = Qje; + for (g = Jsb(a, 0); g.b != g.d.c; ) { + f2 = BD(Xsb(g), 8); + d = $wnd.Math.min(d, f2.a); + e = $wnd.Math.min(e, f2.b); + b = $wnd.Math.max(b, f2.a); + c2 = $wnd.Math.max(c2, f2.b); + } + this.a = new J6c(d, e, b - d, c2 - e); + } + function Dac(a, b) { + var c2, d, e, f2, g, h; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + g.k == (j0b(), f0b) && zac(g, b); + for (d = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + yac(c2, b); + } + } + } + } + function Xoc(a) { + var b, c2, d; + this.c = a; + d = BD(vNb(a, (Nyc(), Lwc)), 103); + b = Edb(ED(vNb(a, owc))); + c2 = Edb(ED(vNb(a, Dyc))); + d == (ead(), aad) || d == bad || d == cad ? this.b = b * c2 : this.b = 1 / (b * c2); + this.j = Edb(ED(vNb(a, wyc))); + this.e = Edb(ED(vNb(a, vyc))); + this.f = a.b.c.length; + } + function ADc(a) { + var b, c2; + a.e = KC(WD, oje, 25, a.p.c.length, 15, 1); + a.k = KC(WD, oje, 25, a.p.c.length, 15, 1); + for (c2 = new olb(a.p); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + a.e[b.p] = sr(new Sr(ur(R_b(b).a.Kc(), new Sq()))); + a.k[b.p] = sr(new Sr(ur(U_b(b).a.Kc(), new Sq()))); + } + } + function DDc(a) { + var b, c2, d, e, f2, g; + e = 0; + a.q = new Rkb(); + b = new Tqb(); + for (g = new olb(a.p); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + f2.p = e; + for (d = new Sr(ur(U_b(f2).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + Qqb(b, c2.d.i); + } + b.a.Bc(f2) != null; + Ekb(a.q, new Vqb(b)); + b.a.$b(); + ++e; + } + } + function JTc() { + JTc = ccb; + CTc = new q0b(20); + BTc = new Osd((Y9c(), f9c), CTc); + HTc = new Osd(T9c, 20); + uTc = new Osd(r8c, tme); + ETc = new Osd(D9c, meb(1)); + GTc = new Osd(H9c, (Bcb(), true)); + vTc = y8c; + xTc = Y8c; + yTc = _8c; + zTc = b9c; + wTc = W8c; + ATc = e9c; + DTc = x9c; + ITc = (rTc(), pTc); + FTc = nTc; + } + function RBd(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + if (a.a.f > 0 && JD(b, 42)) { + a.a.qj(); + j = BD(b, 42); + i3 = j.cd(); + f2 = i3 == null ? 0 : tb(i3); + g = DAd(a.a, f2); + c2 = a.a.d[g]; + if (c2) { + d = BD(c2.g, 367); + k = c2.i; + for (h = 0; h < k; ++h) { + e = d[h]; + if (e.Sh() == f2 && e.Fb(j)) { + RBd(a, j); + return true; + } + } + } + } + return false; + } + function skc(a) { + var b, c2, d, e; + for (e = BD(Qc(a.a, (Xjc(), Ujc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 101); + c2 = (b = Ec(d.k), b.Hc((Ucd(), Acd)) ? b.Hc(zcd) ? b.Hc(Rcd) ? b.Hc(Tcd) ? null : dkc : fkc : ekc : ckc); + kkc(a, d, c2[0], (Fkc(), Ckc), 0); + kkc(a, d, c2[1], Dkc, 1); + kkc(a, d, c2[2], Ekc, 1); + } + } + function enc(a, b) { + var c2, d; + c2 = fnc(b); + inc(a, b, c2); + uPc(a.a, BD(vNb(Q_b(b.b), (wtc(), jtc)), 230)); + dnc(a); + cnc(a, b); + d = KC(WD, oje, 25, b.b.j.c.length, 15, 1); + lnc(a, b, (Ucd(), Acd), d, c2); + lnc(a, b, zcd, d, c2); + lnc(a, b, Rcd, d, c2); + lnc(a, b, Tcd, d, c2); + a.a = null; + a.c = null; + a.b = null; + } + function OYc() { + OYc = ccb; + LYc = (zYc(), yYc); + KYc = new Nsd(Bre, LYc); + IYc = new Nsd(Cre, (Bcb(), true)); + meb(-1); + FYc = new Nsd(Dre, meb(-1)); + meb(-1); + GYc = new Nsd(Ere, meb(-1)); + JYc = new Nsd(Fre, false); + MYc = new Nsd(Gre, true); + HYc = new Nsd(Hre, false); + NYc = new Nsd(Ire, -1); + } + function yld(a, b, c2) { + switch (b) { + case 7: + !a.e && (a.e = new y5d(B2, a, 7, 4)); + Uxd(a.e); + !a.e && (a.e = new y5d(B2, a, 7, 4)); + ytd(a.e, BD(c2, 14)); + return; + case 8: + !a.d && (a.d = new y5d(B2, a, 8, 5)); + Uxd(a.d); + !a.d && (a.d = new y5d(B2, a, 8, 5)); + ytd(a.d, BD(c2, 14)); + return; + } + Zkd(a, b, c2); + } + function At(a, b) { + var c2, d, e, f2, g; + if (PD(b) === PD(a)) { + return true; + } + if (!JD(b, 15)) { + return false; + } + g = BD(b, 15); + if (a.gc() != g.gc()) { + return false; + } + f2 = g.Kc(); + for (d = a.Kc(); d.Ob(); ) { + c2 = d.Pb(); + e = f2.Pb(); + if (!(PD(c2) === PD(e) || c2 != null && pb(c2, e))) { + return false; + } + } + return true; + } + function U6b(a, b) { + var c2, d, e, f2; + f2 = BD(GAb(LAb(LAb(new YAb(null, new Kub(b.b, 16)), new $6b()), new a7b()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + f2.Jc(new c7b()); + c2 = 0; + for (e = f2.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + d.p == -1 && T6b(a, d, c2++); + } + } + function Wzc(a) { + switch (a.g) { + case 0: + return new KLc(); + case 1: + return new dJc(); + case 2: + return new tJc(); + case 3: + return new CMc(); + case 4: + return new $Jc(); + default: + throw vbb(new Wdb("No implementation is available for the node placer " + (a.f != null ? a.f : "" + a.g))); + } + } + function nqc(a) { + switch (a.g) { + case 0: + return new aCc(); + case 1: + return new VBc(); + case 2: + return new kCc(); + case 3: + return new rCc(); + case 4: + return new eCc(); + default: + throw vbb(new Wdb("No implementation is available for the cycle breaker " + (a.f != null ? a.f : "" + a.g))); + } + } + function HWc() { + HWc = ccb; + BWc = new Nsd(lre, meb(0)); + CWc = new Nsd(mre, 0); + yWc = (pWc(), mWc); + xWc = new Nsd(nre, yWc); + meb(0); + wWc = new Nsd(ore, meb(1)); + EWc = (sXc(), qXc); + DWc = new Nsd(pre, EWc); + GWc = (fWc(), eWc); + FWc = new Nsd(qre, GWc); + AWc = (iXc(), hXc); + zWc = new Nsd(rre, AWc); + } + function XXb(a, b, c2) { + var d; + d = null; + !!b && (d = b.d); + hYb(a, new cWb(b.n.a - d.b + c2.a, b.n.b - d.d + c2.b)); + hYb(a, new cWb(b.n.a - d.b + c2.a, b.n.b + b.o.b + d.a + c2.b)); + hYb(a, new cWb(b.n.a + b.o.a + d.c + c2.a, b.n.b - d.d + c2.b)); + hYb(a, new cWb(b.n.a + b.o.a + d.c + c2.a, b.n.b + b.o.b + d.a + c2.b)); + } + function T6b(a, b, c2) { + var d, e, f2; + b.p = c2; + for (f2 = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(b), new R0b(b)]))); Qr(f2); ) { + d = BD(Rr(f2), 11); + d.p == -1 && T6b(a, d, c2); + } + if (b.i.k == (j0b(), g0b)) { + for (e = new olb(b.i.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + d != b && d.p == -1 && T6b(a, d, c2); + } + } + } + function rPc(a) { + var b, c2, d, e, f2; + e = BD(GAb(IAb(UAb(a)), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + d = dme; + if (e.gc() >= 2) { + c2 = e.Kc(); + b = ED(c2.Pb()); + while (c2.Ob()) { + f2 = b; + b = ED(c2.Pb()); + d = $wnd.Math.min(d, (uCb(b), b) - (uCb(f2), f2)); + } + } + return d; + } + function gUc(a, b) { + var c2, d, e, f2, g; + d = new Psb(); + Gsb(d, b, d.c.b, d.c); + do { + c2 = (sCb(d.b != 0), BD(Nsb(d, d.a.a), 86)); + a.b[c2.g] = 1; + for (f2 = Jsb(c2.d, 0); f2.b != f2.d.c; ) { + e = BD(Xsb(f2), 188); + g = e.c; + a.b[g.g] == 1 ? Dsb(a.a, e) : a.b[g.g] == 2 ? a.b[g.g] = 1 : Gsb(d, g, d.c.b, d.c); + } + } while (d.b != 0); + } + function Ju(a, b) { + var c2, d, e; + if (PD(b) === PD(Qb(a))) { + return true; + } + if (!JD(b, 15)) { + return false; + } + d = BD(b, 15); + e = a.gc(); + if (e != d.gc()) { + return false; + } + if (JD(d, 54)) { + for (c2 = 0; c2 < e; c2++) { + if (!Hb(a.Xb(c2), d.Xb(c2))) { + return false; + } + } + return true; + } else { + return kr(a.Kc(), d.Kc()); + } + } + function Aac(a, b) { + var c2, d; + if (a.c.length != 0) { + if (a.c.length == 2) { + zac((tCb(0, a.c.length), BD(a.c[0], 10)), (rbd(), nbd)); + zac((tCb(1, a.c.length), BD(a.c[1], 10)), obd); + } else { + for (d = new olb(a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + zac(c2, b); + } + } + a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + function uKc(a) { + var b, c2; + if (a.c.length != 2) { + throw vbb(new Zdb("Order only allowed for two paths.")); + } + b = (tCb(0, a.c.length), BD(a.c[0], 17)); + c2 = (tCb(1, a.c.length), BD(a.c[1], 17)); + if (b.d.i != c2.c.i) { + a.c = KC(SI, Uhe, 1, 0, 5, 1); + a.c[a.c.length] = c2; + a.c[a.c.length] = b; + } + } + function EMc(a, b) { + var c2, d, e, f2, g, h; + d = new $rb(); + g = Gx(new amb(a.g)); + for (f2 = g.a.ec().Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 10); + if (!e) { + Sdd(b, "There are no classes in a balanced layout."); + break; + } + h = a.j[e.p]; + c2 = BD(Wrb(d, h), 15); + if (!c2) { + c2 = new Rkb(); + Xrb(d, h, c2); + } + c2.Fc(e); + } + return d; + } + function Dqd(a, b, c2) { + var d, e, f2, g, h, i3, j; + if (c2) { + f2 = c2.a.length; + d = new Yge(f2); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + i3 = Zpd(c2, g.a); + if (i3) { + j = ftd(_pd(i3, Ite), b); + Rhb(a.f, j, i3); + e = Vte in i3.a; + e && Lkd(j, _pd(i3, Vte)); + grd(i3, j); + hrd(i3, j); + } + } + } + } + function ndc(a, b) { + var c2, d, e, f2, g; + Odd(b, "Port side processing", 1); + for (g = new olb(a.a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + odc(e); + } + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + for (f2 = new olb(c2.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + odc(e); + } + } + Qdd(b); + } + function bfc(a, b, c2) { + var d, e, f2, g, h; + e = a.f; + !e && (e = BD(a.a.a.ec().Kc().Pb(), 57)); + cfc(e, b, c2); + if (a.a.a.gc() == 1) { + return; + } + d = b * c2; + for (g = a.a.a.ec().Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 57); + if (f2 != e) { + h = ugc(f2); + if (h.f.d) { + f2.d.d += d + ple; + f2.d.a -= d + ple; + } else + h.f.a && (f2.d.a -= d + ple); + } + } + } + function tQb(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n; + g = c2 - a; + h = d - b; + f2 = $wnd.Math.atan2(g, h); + i3 = f2 + cme; + j = f2 - cme; + k = e * $wnd.Math.sin(i3) + a; + m = e * $wnd.Math.cos(i3) + b; + l = e * $wnd.Math.sin(j) + a; + n = e * $wnd.Math.cos(j) + b; + return Ou(OC(GC(m1, 1), nie, 8, 0, [new f7c(k, m), new f7c(l, n)])); + } + function OLc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l; + e = c2; + k = b; + f2 = k; + do { + f2 = a.a[f2.p]; + h = (l = a.g[f2.p], Edb(a.p[l.p]) + Edb(a.d[f2.p]) - f2.d.d); + i3 = RLc(f2, d); + if (i3) { + g = (j = a.g[i3.p], Edb(a.p[j.p]) + Edb(a.d[i3.p]) + i3.o.b + i3.d.a); + e = $wnd.Math.min(e, h - (g + jBc(a.k, f2, i3))); + } + } while (k != f2); + return e; + } + function PLc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l; + e = c2; + k = b; + f2 = k; + do { + f2 = a.a[f2.p]; + g = (l = a.g[f2.p], Edb(a.p[l.p]) + Edb(a.d[f2.p]) + f2.o.b + f2.d.a); + i3 = QLc(f2, d); + if (i3) { + h = (j = a.g[i3.p], Edb(a.p[j.p]) + Edb(a.d[i3.p]) - i3.d.d); + e = $wnd.Math.min(e, h - (g + jBc(a.k, f2, i3))); + } + } while (k != f2); + return e; + } + function hkd(a, b) { + var c2, d; + d = (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), AAd(a.o, b)); + if (d != null) { + return d; + } + c2 = b.wg(); + JD(c2, 4) && (c2 == null ? (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), LAd(a.o, b)) : (!a.o && (a.o = new dId((Thd(), Qhd), S2, a, 0)), HAd(a.o, b, c2)), a); + return c2; + } + function Hbd() { + Hbd = ccb; + zbd = new Ibd("H_LEFT", 0); + ybd = new Ibd("H_CENTER", 1); + Bbd = new Ibd("H_RIGHT", 2); + Gbd = new Ibd("V_TOP", 3); + Fbd = new Ibd("V_CENTER", 4); + Ebd = new Ibd("V_BOTTOM", 5); + Cbd = new Ibd("INSIDE", 6); + Dbd = new Ibd("OUTSIDE", 7); + Abd = new Ibd("H_PRIORITY", 8); + } + function o6d(a) { + var b, c2, d, e, f2, g, h; + b = a.Hh(_ve); + if (b) { + h = GD(AAd((!b.b && (b.b = new sId((jGd(), fGd), x6, b)), b.b), "settingDelegates")); + if (h != null) { + c2 = new Rkb(); + for (e = mfb(h, "\\w+"), f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + c2.c[c2.c.length] = d; + } + return c2; + } + } + return mmb(), mmb(), jmb; + } + function sGb(a, b) { + var c2, d, e, f2, g, h, i3; + if (!b.f) { + throw vbb(new Wdb("The input edge is not a tree edge.")); + } + f2 = null; + e = Ohe; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 213); + h = c2.d; + i3 = c2.e; + if (xGb(a, h, b) && !xGb(a, i3, b)) { + g = i3.e - h.e - c2.a; + if (g < e) { + e = g; + f2 = c2; + } + } + } + return f2; + } + function qTb(a) { + var b, c2, d, e, f2, g; + if (a.f.e.c.length <= 1) { + return; + } + b = 0; + e = nTb(a); + c2 = Pje; + do { + b > 0 && (e = c2); + for (g = new olb(a.f.e); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 144); + if (Ccb(DD(vNb(f2, (bTb(), USb))))) { + continue; + } + d = mTb(a, f2); + P6c(X6c(f2.d), d); + } + c2 = nTb(a); + } while (!pTb(a, b++, e, c2)); + } + function $ac(a, b) { + var c2, d, e; + Odd(b, "Layer constraint preprocessing", 1); + c2 = new Rkb(); + e = new Bib(a.a, 0); + while (e.b < e.d.gc()) { + d = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 10)); + if (Zac(d)) { + Xac(d); + c2.c[c2.c.length] = d; + uib(e); + } + } + c2.c.length == 0 || yNb(a, (wtc(), Lsc), c2); + Qdd(b); + } + function sjc(a, b) { + var c2, d, e, f2, g; + f2 = a.g.a; + g = a.g.b; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 70); + e = c2.n; + a.a == (Ajc(), xjc) || a.i == (Ucd(), zcd) ? e.a = f2 : a.a == yjc || a.i == (Ucd(), Tcd) ? e.a = f2 + a.j.a - c2.o.a : e.a = f2 + (a.j.a - c2.o.a) / 2; + e.b = g; + P6c(e, b); + g += c2.o.b + a.e; + } + } + function LSc(a, b, c2) { + var d, e, f2, g; + Odd(c2, "Processor set coordinates", 1); + a.a = b.b.b == 0 ? 1 : b.b.b; + f2 = null; + d = Jsb(b.b, 0); + while (!f2 && d.b != d.d.c) { + g = BD(Xsb(d), 86); + if (Ccb(DD(vNb(g, (mTc(), jTc))))) { + f2 = g; + e = g.e; + e.a = BD(vNb(g, kTc), 19).a; + e.b = 0; + } + } + MSc(a, URc(f2), Udd(c2, 1)); + Qdd(c2); + } + function xSc(a, b, c2) { + var d, e, f2; + Odd(c2, "Processor determine the height for each level", 1); + a.a = b.b.b == 0 ? 1 : b.b.b; + e = null; + d = Jsb(b.b, 0); + while (!e && d.b != d.d.c) { + f2 = BD(Xsb(d), 86); + Ccb(DD(vNb(f2, (mTc(), jTc)))) && (e = f2); + } + !!e && ySc(a, Ou(OC(GC(q$, 1), fme, 86, 0, [e])), c2); + Qdd(c2); + } + function brd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + j = a; + i3 = $pd(j, "individualSpacings"); + if (i3) { + d = ikd(b, (Y9c(), O9c)); + g = !d; + if (g) { + e = new _fd(); + jkd(b, O9c, e); + } + h = BD(hkd(b, O9c), 373); + l = i3; + f2 = null; + !!l && (f2 = (k = $B(l, KC(ZI, nie, 2, 0, 6, 1)), new mC(l, k))); + if (f2) { + c2 = new Frd(l, h); + reb(f2, c2); + } + } + } + function frd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + i3 = null; + l = a; + k = null; + if (cue in l.a || due in l.a || Ote in l.a) { + j = null; + m = etd(b); + g = $pd(l, cue); + c2 = new Ird(m); + Eqd(c2.a, g); + h = $pd(l, due); + d = new asd(m); + Pqd(d.a, h); + f2 = Ypd(l, Ote); + e = new dsd(m); + j = (Qqd(e.a, f2), f2); + k = j; + } + i3 = k; + return i3; + } + function $w(a, b) { + var c2, d, e; + if (b === a) { + return true; + } + if (JD(b, 543)) { + e = BD(b, 835); + if (a.a.d != e.a.d || Ah(a).gc() != Ah(e).gc()) { + return false; + } + for (d = Ah(e).Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 416); + if (Aw(a, c2.a.cd()) != BD(c2.a.dd(), 14).gc()) { + return false; + } + } + return true; + } + return false; + } + function BMb(a) { + var b, c2, d, e; + d = BD(a.a, 19).a; + e = BD(a.b, 19).a; + b = d; + c2 = e; + if (d == 0 && e == 0) { + c2 -= 1; + } else { + if (d == -1 && e <= 0) { + b = 0; + c2 -= 2; + } else { + if (d <= 0 && e > 0) { + b -= 1; + c2 -= 1; + } else { + if (d >= 0 && e < 0) { + b += 1; + c2 += 1; + } else { + if (d > 0 && e >= 0) { + b -= 1; + c2 += 1; + } else { + b += 1; + c2 -= 1; + } + } + } + } + } + return new vgd(meb(b), meb(c2)); + } + function PIc(a, b) { + if (a.c < b.c) { + return -1; + } else if (a.c > b.c) { + return 1; + } else if (a.b < b.b) { + return -1; + } else if (a.b > b.b) { + return 1; + } else if (a.a != b.a) { + return tb(a.a) - tb(b.a); + } else if (a.d == (UIc(), TIc) && b.d == SIc) { + return -1; + } else if (a.d == SIc && b.d == TIc) { + return 1; + } + return 0; + } + function aNc(a, b) { + var c2, d, e, f2, g; + f2 = b.a; + f2.c.i == b.b ? g = f2.d : g = f2.c; + f2.c.i == b.b ? d = f2.c : d = f2.d; + e = NLc(a.a, g, d); + if (e > 0 && e < dme) { + c2 = OLc(a.a, d.i, e, a.c); + TLc(a.a, d.i, -c2); + return c2 > 0; + } else if (e < 0 && -e < dme) { + c2 = PLc(a.a, d.i, -e, a.c); + TLc(a.a, d.i, c2); + return c2 > 0; + } + return false; + } + function RZc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l; + e = (b - a.d) / a.c.c.length; + f2 = 0; + a.a += c2; + a.d = b; + for (l = new olb(a.c); l.a < l.c.c.length; ) { + k = BD(mlb(l), 33); + j = k.g; + i3 = k.f; + dld(k, k.i + f2 * e); + eld(k, k.j + d * c2); + cld(k, k.g + e); + ald(k, a.a); + ++f2; + h = k.g; + g = k.f; + Ffd(k, new f7c(h, g), new f7c(j, i3)); + } + } + function Xmd(a) { + var b, c2, d, e, f2, g, h; + if (a == null) { + return null; + } + h = a.length; + e = (h + 1) / 2 | 0; + g = KC(SD, wte, 25, e, 15, 1); + h % 2 != 0 && (g[--e] = jnd((BCb(h - 1, a.length), a.charCodeAt(h - 1)))); + for (c2 = 0, d = 0; c2 < e; ++c2) { + b = jnd(bfb(a, d++)); + f2 = jnd(bfb(a, d++)); + g[c2] = (b << 4 | f2) << 24 >> 24; + } + return g; + } + function vdb(a) { + if (a.pe()) { + var b = a.c; + b.qe() ? a.o = "[" + b.n : !b.pe() ? a.o = "[L" + b.ne() + ";" : a.o = "[" + b.ne(); + a.b = b.me() + "[]"; + a.k = b.oe() + "[]"; + return; + } + var c2 = a.j; + var d = a.d; + d = d.split("/"); + a.o = ydb(".", [c2, ydb("$", d)]); + a.b = ydb(".", [c2, ydb(".", d)]); + a.k = d[d.length - 1]; + } + function qGb(a, b) { + var c2, d, e, f2, g; + g = null; + for (f2 = new olb(a.e.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 121); + if (e.b.a.c.length == e.g.a.c.length) { + d = e.e; + g = BGb(e); + for (c2 = e.e - BD(g.a, 19).a + 1; c2 < e.e + BD(g.b, 19).a; c2++) { + b[c2] < b[d] && (d = c2); + } + if (b[d] < b[e.e]) { + --b[e.e]; + ++b[d]; + e.e = d; + } + } + } + } + function SLc(a) { + var b, c2, d, e, f2, g, h, i3; + e = Pje; + d = Qje; + for (c2 = new olb(a.e.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 29); + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + i3 = Edb(a.p[f2.p]); + h = i3 + Edb(a.b[a.g[f2.p].p]); + e = $wnd.Math.min(e, i3); + d = $wnd.Math.max(d, h); + } + } + return d - e; + } + function r1d(a, b, c2, d) { + var e, f2, g, h, j; + e = f1d(a, b); + for (h = 0, j = e.gc(); h < j; ++h) { + f2 = BD(e.Xb(h), 170); + if (dfb(d, a2d(q1d(a, f2)))) { + g = b2d(q1d(a, f2)); + if (c2 == null) { + if (g == null) { + return f2; + } + } else if (dfb(c2, g)) { + return f2; + } else + ; + } + } + return null; + } + function s1d(a, b, c2, d) { + var e, f2, g, h, j; + e = g1d(a, b); + for (h = 0, j = e.gc(); h < j; ++h) { + f2 = BD(e.Xb(h), 170); + if (dfb(d, a2d(q1d(a, f2)))) { + g = b2d(q1d(a, f2)); + if (c2 == null) { + if (g == null) { + return f2; + } + } else if (dfb(c2, g)) { + return f2; + } else + ; + } + } + return null; + } + function p3d(a, b, c2) { + var d, e, f2, g, h, i3; + g = new yud(); + h = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (f2 = 0; f2 < a.i; ++f2) { + e = d[f2]; + h.rl(e.ak()) && wtd(g, e); + } + } else { + for (f2 = 0; f2 < a.i; ++f2) { + e = d[f2]; + if (h.rl(e.ak())) { + i3 = e.dd(); + wtd(g, c2 ? b3d(a, b, f2, g.i, i3) : i3); + } + } + } + return wud(g); + } + function T9b(a, b) { + var c2, d, e, f2, g; + c2 = new Rpb(EW); + for (e = (Apc(), OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc])), f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + Opb(c2, d, new Rkb()); + } + MAb(NAb(JAb(LAb(new YAb(null, new Kub(a.b, 16)), new hac()), new jac()), new lac(b)), new nac(c2)); + return c2; + } + function AVc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + for (f2 = b.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 33); + k = e.i + e.g / 2; + m = e.j + e.f / 2; + i3 = a.f; + g = i3.i + i3.g / 2; + h = i3.j + i3.f / 2; + j = k - g; + l = m - h; + d = $wnd.Math.sqrt(j * j + l * l); + j *= a.e / d; + l *= a.e / d; + if (c2) { + k -= j; + m -= l; + } else { + k += j; + m += l; + } + dld(e, k - e.g / 2); + eld(e, m - e.f / 2); + } + } + function Yfe(a) { + var b, c2, d; + if (a.c) + return; + if (a.b == null) + return; + for (b = a.b.length - 4; b >= 0; b -= 2) { + for (c2 = 0; c2 <= b; c2 += 2) { + if (a.b[c2] > a.b[c2 + 2] || a.b[c2] === a.b[c2 + 2] && a.b[c2 + 1] > a.b[c2 + 3]) { + d = a.b[c2 + 2]; + a.b[c2 + 2] = a.b[c2]; + a.b[c2] = d; + d = a.b[c2 + 3]; + a.b[c2 + 3] = a.b[c2 + 1]; + a.b[c2 + 1] = d; + } + } + } + a.c = true; + } + function UUb(a, b) { + var c2, d, e, f2, g, h, i3, j; + g = b == 1 ? KUb : JUb; + for (f2 = g.a.ec().Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 103); + for (i3 = BD(Qc(a.f.c, e), 21).Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 46); + d = BD(h.b, 81); + j = BD(h.a, 189); + c2 = j.c; + switch (e.g) { + case 2: + case 1: + d.g.d += c2; + break; + case 4: + case 3: + d.g.c += c2; + } + } + } + } + function PFc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + j = -1; + k = 0; + for (g = a, h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + c2 = new Dnc(j == -1 ? a[0] : a[j], b, (xzc(), wzc)); + for (d = 0; d < f2.length; d++) { + for (e = d + 1; e < f2.length; e++) { + wNb(f2[d], (wtc(), Zsc)) && wNb(f2[e], Zsc) && ync(c2, f2[d], f2[e]) > 0 && ++k; + } + } + ++j; + } + return k; + } + function Eid(a) { + var b, c2; + c2 = new Wfb(hdb(a.gm)); + c2.a += "@"; + Qfb(c2, (b = tb(a) >>> 0, b.toString(16))); + if (a.kh()) { + c2.a += " (eProxyURI: "; + Pfb(c2, a.qh()); + if (a.$g()) { + c2.a += " eClass: "; + Pfb(c2, a.$g()); + } + c2.a += ")"; + } else if (a.$g()) { + c2.a += " (eClass: "; + Pfb(c2, a.$g()); + c2.a += ")"; + } + return c2.a; + } + function TDb(a) { + var b, c2, d, e; + if (a.e) { + throw vbb(new Zdb((fdb(TM), Jke + TM.k + Kke))); + } + a.d == (ead(), cad) && SDb(a, aad); + for (c2 = new olb(a.a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 307); + b.g = b.i; + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + d.i = Qje; + } + a.b.Le(a); + return a; + } + function TPc(a, b) { + var c2, d, e, f2, g; + if (b < 2 * a.b) { + throw vbb(new Wdb("The knot vector must have at least two time the dimension elements.")); + } + a.f = 1; + for (e = 0; e < a.b; e++) { + Ekb(a.e, 0); + } + g = b + 1 - 2 * a.b; + c2 = g; + for (f2 = 1; f2 < g; f2++) { + Ekb(a.e, f2 / c2); + } + if (a.d) { + for (d = 0; d < a.b; d++) { + Ekb(a.e, 1); + } + } + } + function ard(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + j = b; + k = BD(_o(qo(a.i), j), 33); + if (!k) { + e = _pd(j, Vte); + h = "Unable to find elk node for json object '" + e; + i3 = h + "' Panic!"; + throw vbb(new cqd(i3)); + } + f2 = Ypd(j, "edges"); + c2 = new krd(a, k); + mqd(c2.a, c2.b, f2); + g = Ypd(j, Jte); + d = new vrd(a); + xqd(d.a, g); + } + function xAd(a, b, c2, d) { + var e, f2, g, h, i3; + if (d != null) { + e = a.d[b]; + if (e) { + f2 = e.g; + i3 = e.i; + for (h = 0; h < i3; ++h) { + g = BD(f2[h], 133); + if (g.Sh() == c2 && pb(d, g.cd())) { + return h; + } + } + } + } else { + e = a.d[b]; + if (e) { + f2 = e.g; + i3 = e.i; + for (h = 0; h < i3; ++h) { + g = BD(f2[h], 133); + if (PD(g.cd()) === PD(d)) { + return h; + } + } + } + } + return -1; + } + function nUd(a, b) { + var c2, d, e; + c2 = b == null ? Wd(irb(a.f, null)) : Crb(a.g, b); + if (JD(c2, 235)) { + e = BD(c2, 235); + e.Qh() == null && void 0; + return e; + } else if (JD(c2, 498)) { + d = BD(c2, 1938); + e = d.a; + !!e && (e.yb == null ? void 0 : b == null ? jrb(a.f, null, e) : Drb(a.g, b, e)); + return e; + } else { + return null; + } + } + function ide(a) { + hde(); + var b, c2, d, e, f2, g, h; + if (a == null) + return null; + e = a.length; + if (e % 2 != 0) + return null; + b = rfb(a); + f2 = e / 2 | 0; + c2 = KC(SD, wte, 25, f2, 15, 1); + for (d = 0; d < f2; d++) { + g = fde[b[d * 2]]; + if (g == -1) + return null; + h = fde[b[d * 2 + 1]]; + if (h == -1) + return null; + c2[d] = (g << 4 | h) << 24 >> 24; + } + return c2; + } + function lKb(a, b, c2) { + var d, e, f2; + e = BD(Mpb(a.i, b), 306); + if (!e) { + e = new bIb(a.d, b, c2); + Npb(a.i, b, e); + if (sJb(b)) { + CHb(a.a, b.c, b.b, e); + } else { + f2 = rJb(b); + d = BD(Mpb(a.p, f2), 244); + switch (f2.g) { + case 1: + case 3: + e.j = true; + lIb(d, b.b, e); + break; + case 4: + case 2: + e.k = true; + lIb(d, b.c, e); + } + } + } + return e; + } + function r3d(a, b, c2, d) { + var e, f2, g, h, i3, j; + h = new yud(); + i3 = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + i3.rl(f2.ak()) && wtd(h, f2); + } + } else { + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (i3.rl(f2.ak())) { + j = f2.dd(); + wtd(h, d ? b3d(a, b, g, h.i, j) : j); + } + } + } + return xud(h, c2); + } + function YCc(a, b) { + var c2, d, e, f2, g, h, i3, j; + e = a.b[b.p]; + if (e >= 0) { + return e; + } else { + f2 = 1; + for (h = new olb(b.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + for (d = new olb(g.g); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 17); + j = c2.d.i; + if (b != j) { + i3 = YCc(a, j); + f2 = $wnd.Math.max(f2, i3 + 1); + } + } + } + XCc(a, b, f2); + return f2; + } + } + function YGc(a, b, c2) { + var d, e, f2; + for (d = 1; d < a.c.length; d++) { + f2 = (tCb(d, a.c.length), BD(a.c[d], 10)); + e = d; + while (e > 0 && b.ue((tCb(e - 1, a.c.length), BD(a.c[e - 1], 10)), f2) > 0) { + Nkb(a, e, (tCb(e - 1, a.c.length), BD(a.c[e - 1], 10))); + --e; + } + tCb(e, a.c.length); + a.c[e] = f2; + } + c2.a = new Lqb(); + c2.b = new Lqb(); + } + function n5c(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + k = (d = BD(b.e && b.e(), 9), new xqb(d, BD(_Bb(d, d.length), 9), 0)); + i3 = mfb(c2, "[\\[\\]\\s,]+"); + for (f2 = i3, g = 0, h = f2.length; g < h; ++g) { + e = f2[g]; + if (ufb(e).length == 0) { + continue; + } + j = m5c(a, e); + if (j == null) { + return null; + } else { + rqb(k, BD(j, 22)); + } + } + return k; + } + function KVb(a) { + var b, c2, d; + for (c2 = new olb(a.a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + d = (uCb(0), 0); + if (d > 0) { + !(fad(a.a.c) && b.n.d) && !(gad(a.a.c) && b.n.b) && (b.g.d -= $wnd.Math.max(0, d / 2 - 0.5)); + !(fad(a.a.c) && b.n.a) && !(gad(a.a.c) && b.n.c) && (b.g.a += $wnd.Math.max(0, d - 1)); + } + } + } + function Hac(a, b, c2) { + var d, e; + if ((a.c - a.b & a.a.length - 1) == 2) { + if (b == (Ucd(), Acd) || b == zcd) { + xac(BD(bkb(a), 15), (rbd(), nbd)); + xac(BD(bkb(a), 15), obd); + } else { + xac(BD(bkb(a), 15), (rbd(), obd)); + xac(BD(bkb(a), 15), nbd); + } + } else { + for (e = new xkb(a); e.a != e.b; ) { + d = BD(vkb(e), 15); + xac(d, c2); + } + } + } + function htd(a, b) { + var c2, d, e, f2, g, h, i3; + e = Nu(new qtd(a)); + h = new Bib(e, e.c.length); + f2 = Nu(new qtd(b)); + i3 = new Bib(f2, f2.c.length); + g = null; + while (h.b > 0 && i3.b > 0) { + c2 = (sCb(h.b > 0), BD(h.a.Xb(h.c = --h.b), 33)); + d = (sCb(i3.b > 0), BD(i3.a.Xb(i3.c = --i3.b), 33)); + if (c2 == d) { + g = c2; + } else { + break; + } + } + return g; + } + function Cub(a, b) { + var c2, d, e, f2, g, h; + f2 = a.a * kke + a.b * 1502; + h = a.b * kke + 11; + c2 = $wnd.Math.floor(h * lke); + f2 += c2; + h -= c2 * mke; + f2 %= mke; + a.a = f2; + a.b = h; + if (b <= 24) { + return $wnd.Math.floor(a.a * wub[b]); + } else { + e = a.a * (1 << b - 24); + g = $wnd.Math.floor(a.b * xub[b]); + d = e + g; + d >= 2147483648 && (d -= Zje); + return d; + } + } + function Zic(a, b, c2) { + var d, e, f2, g; + if (bjc(a, b) > bjc(a, c2)) { + d = V_b(c2, (Ucd(), zcd)); + a.d = d.dc() ? 0 : B0b(BD(d.Xb(0), 11)); + g = V_b(b, Tcd); + a.b = g.dc() ? 0 : B0b(BD(g.Xb(0), 11)); + } else { + e = V_b(c2, (Ucd(), Tcd)); + a.d = e.dc() ? 0 : B0b(BD(e.Xb(0), 11)); + f2 = V_b(b, zcd); + a.b = f2.dc() ? 0 : B0b(BD(f2.Xb(0), 11)); + } + } + function l6d(a) { + var b, c2, d, e, f2, g, h; + if (a) { + b = a.Hh(_ve); + if (b) { + g = GD(AAd((!b.b && (b.b = new sId((jGd(), fGd), x6, b)), b.b), "conversionDelegates")); + if (g != null) { + h = new Rkb(); + for (d = mfb(g, "\\w+"), e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + h.c[h.c.length] = c2; + } + return h; + } + } + } + return mmb(), mmb(), jmb; + } + function FKb(a, b) { + var c2, d, e, f2; + c2 = a.o.a; + for (f2 = BD(BD(Qc(a.r, b), 21), 84).Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 111); + e.e.a = c2 * Edb(ED(e.b.We(BKb))); + e.e.b = (d = e.b, d.Xe((Y9c(), s9c)) ? d.Hf() == (Ucd(), Acd) ? -d.rf().b - Edb(ED(d.We(s9c))) : Edb(ED(d.We(s9c))) : d.Hf() == (Ucd(), Acd) ? -d.rf().b : 0); + } + } + function Woc(a) { + var b, c2, d, e, f2, g, h, i3; + b = true; + e = null; + f2 = null; + j: + for (i3 = new olb(a.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + for (d = new Sr(ur(R_b(h).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + if (!!e && e != h) { + b = false; + break j; + } + e = h; + g = c2.c.i; + if (!!f2 && f2 != g) { + b = false; + break j; + } + f2 = g; + } + } + return b; + } + function OOc(a, b, c2) { + var d, e, f2, g, h, i3; + f2 = -1; + h = -1; + for (g = 0; g < b.c.length; g++) { + e = (tCb(g, b.c.length), BD(b.c[g], 329)); + if (e.c > a.c) { + break; + } else if (e.a >= a.s) { + f2 < 0 && (f2 = g); + h = g; + } + } + i3 = (a.s + a.c) / 2; + if (f2 >= 0) { + d = NOc(a, b, f2, h); + i3 = $Oc((tCb(d, b.c.length), BD(b.c[d], 329))); + YOc(b, d, c2); + } + return i3; + } + function lZc() { + lZc = ccb; + RYc = new Osd((Y9c(), r8c), 1.3); + VYc = I8c; + gZc = new q0b(15); + fZc = new Osd(f9c, gZc); + jZc = new Osd(T9c, 15); + SYc = w8c; + _Yc = Y8c; + aZc = _8c; + bZc = b9c; + $Yc = W8c; + cZc = e9c; + hZc = x9c; + eZc = (OYc(), KYc); + ZYc = IYc; + dZc = JYc; + iZc = MYc; + WYc = HYc; + XYc = O8c; + YYc = P8c; + UYc = GYc; + TYc = FYc; + kZc = NYc; + } + function Bnd(a, b, c2) { + var d, e, f2, g, h, i3, j; + g = (f2 = new RHd(), f2); + PHd(g, (uCb(b), b)); + j = (!g.b && (g.b = new sId((jGd(), fGd), x6, g)), g.b); + for (i3 = 1; i3 < c2.length; i3 += 2) { + HAd(j, c2[i3 - 1], c2[i3]); + } + d = (!a.Ab && (a.Ab = new cUd(a5, a, 0, 3)), a.Ab); + for (h = 0; h < 0; ++h) { + e = LHd(BD(qud(d, d.i - 1), 590)); + d = e; + } + wtd(d, g); + } + function MPb(a, b, c2) { + var d, e, f2; + sNb.call(this, new Rkb()); + this.a = b; + this.b = c2; + this.e = a; + d = (a.b && LOb(a), a.a); + this.d = KPb(d.a, this.a); + this.c = KPb(d.b, this.b); + kNb(this, this.d, this.c); + LPb(this); + for (f2 = this.e.e.a.ec().Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 266); + e.c.c.length > 0 && JPb(this, e); + } + } + function IQb(a, b, c2, d, e, f2) { + var g, h, i3; + if (!e[b.b]) { + e[b.b] = true; + g = d; + !g && (g = new kRb()); + Ekb(g.e, b); + for (i3 = f2[b.b].Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 282); + if (h.d == c2 || h.c == c2) { + continue; + } + h.c != b && IQb(a, h.c, b, g, e, f2); + h.d != b && IQb(a, h.d, b, g, e, f2); + Ekb(g.c, h); + Gkb(g.d, h.b); + } + return g; + } + return null; + } + function e4b(a) { + var b, c2, d, e, f2, g, h; + b = 0; + for (e = new olb(a.e); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + c2 = FAb(new YAb(null, new Kub(d.b, 16)), new w4b()); + c2 && ++b; + } + for (g = new olb(a.g); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 17); + h = FAb(new YAb(null, new Kub(f2.b, 16)), new y4b()); + h && ++b; + } + return b >= 2; + } + function gec(a, b) { + var c2, d, e, f2; + Odd(b, "Self-Loop pre-processing", 1); + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + if (Ljc(c2)) { + e = (f2 = new Kjc(c2), yNb(c2, (wtc(), ntc), f2), Hjc(f2), f2); + MAb(NAb(LAb(new YAb(null, new Kub(e.d, 16)), new jec()), new lec()), new nec()); + eec(e); + } + } + Qdd(b); + } + function vnc(a, b, c2, d, e) { + var f2, g, h, i3, j, k; + f2 = a.c.d.j; + g = BD(Ut(c2, 0), 8); + for (k = 1; k < c2.b; k++) { + j = BD(Ut(c2, k), 8); + Gsb(d, g, d.c.b, d.c); + h = Y6c(P6c(new g7c(g), j), 0.5); + i3 = Y6c(new e7c(bRc(f2)), e); + P6c(h, i3); + Gsb(d, h, d.c.b, d.c); + g = j; + f2 = b == 0 ? Xcd(f2) : Vcd(f2); + } + Dsb(d, (sCb(c2.b != 0), BD(c2.c.b.c, 8))); + } + function Jbd(a) { + Hbd(); + var b, c2, d; + c2 = qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Dbd])); + if (Ox(Cx(c2, a)) > 1) { + return false; + } + b = qqb(zbd, OC(GC(B1, 1), Kie, 93, 0, [ybd, Bbd])); + if (Ox(Cx(b, a)) > 1) { + return false; + } + d = qqb(Gbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, Ebd])); + if (Ox(Cx(d, a)) > 1) { + return false; + } + return true; + } + function U0d(a, b) { + var c2, d, e; + c2 = b.Hh(a.a); + if (c2) { + e = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), "affiliation")); + if (e != null) { + d = kfb(e, wfb(35)); + return d == -1 ? l1d(a, u1d(a, bKd(b.Hj())), e) : d == 0 ? l1d(a, null, e.substr(1)) : l1d(a, e.substr(0, d), e.substr(d + 1)); + } + } + return null; + } + function ic(b) { + var c2, d, e; + try { + return b == null ? Xhe : fcb(b); + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + c2 = a; + e = hdb(rb(b)) + "@" + (d = (Zfb(), kCb(b)) >>> 0, d.toString(16)); + tyb(xyb(), ($xb(), "Exception during lenientFormat for " + e), c2); + return "<" + e + " threw " + hdb(c2.gm) + ">"; + } else + throw vbb(a); + } + } + function mzc(a) { + switch (a.g) { + case 0: + return new xDc(); + case 1: + return new ZCc(); + case 2: + return new DCc(); + case 3: + return new QCc(); + case 4: + return new LDc(); + case 5: + return new iDc(); + default: + throw vbb(new Wdb("No implementation is available for the layerer " + (a.f != null ? a.f : "" + a.g))); + } + } + function AQc(a, b, c2) { + var d, e, f2; + for (f2 = new olb(a.t); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 268); + if (d.b.s < 0 && d.c > 0) { + d.b.n -= d.c; + d.b.n <= 0 && d.b.u > 0 && Dsb(b, d.b); + } + } + for (e = new olb(a.i); e.a < e.c.c.length; ) { + d = BD(mlb(e), 268); + if (d.a.s < 0 && d.c > 0) { + d.a.u -= d.c; + d.a.u <= 0 && d.a.n > 0 && Dsb(c2, d.a); + } + } + } + function Vud(a) { + var b, c2, d, e, f2; + if (a.g == null) { + a.d = a.si(a.f); + wtd(a, a.d); + if (a.c) { + f2 = a.f; + return f2; + } + } + b = BD(a.g[a.i - 1], 47); + e = b.Pb(); + a.e = b; + c2 = a.si(e); + if (c2.Ob()) { + a.d = c2; + wtd(a, c2); + } else { + a.d = null; + while (!b.Ob()) { + NC(a.g, --a.i, null); + if (a.i == 0) { + break; + } + d = BD(a.g[a.i - 1], 47); + b = d; + } + } + return e; + } + function r2d(a, b) { + var c2, d, e, f2, g, h; + d = b; + e = d.ak(); + if (T6d(a.e, e)) { + if (e.hi() && E2d(a, e, d.dd())) { + return false; + } + } else { + h = S6d(a.e.Tg(), e); + c2 = BD(a.g, 119); + for (f2 = 0; f2 < a.i; ++f2) { + g = c2[f2]; + if (h.rl(g.ak())) { + if (pb(g, d)) { + return false; + } else { + BD(Gtd(a, f2, b), 72); + return true; + } + } + } + } + return wtd(a, b); + } + function r9b(a, b, c2, d) { + var e, f2, g, h; + e = new b0b(a); + __b(e, (j0b(), f0b)); + yNb(e, (wtc(), $sc), b); + yNb(e, ktc, d); + yNb(e, (Nyc(), Vxc), (dcd(), $bd)); + yNb(e, Vsc, b.c); + yNb(e, Wsc, b.d); + zbc(b, e); + h = $wnd.Math.floor(c2 / 2); + for (g = new olb(e.j); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 11); + f2.n.b = h; + } + return e; + } + function wac(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + i3 = Pu(a.c - a.b & a.a.length - 1); + j = null; + k = null; + for (f2 = new xkb(a); f2.a != f2.b; ) { + e = BD(vkb(f2), 10); + c2 = (h = BD(vNb(e, (wtc(), Vsc)), 11), !h ? null : h.i); + d = (g = BD(vNb(e, Wsc), 11), !g ? null : g.i); + if (j != c2 || k != d) { + Aac(i3, b); + j = c2; + k = d; + } + i3.c[i3.c.length] = e; + } + Aac(i3, b); + } + function HNc(a) { + var b, c2, d, e, f2, g, h; + b = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + for (f2 = new Sr(ur(U_b(c2).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + if (a == e.d.i.c && e.c.j == (Ucd(), Tcd)) { + g = A0b(e.c).b; + h = A0b(e.d).b; + b = $wnd.Math.max(b, $wnd.Math.abs(h - g)); + } + } + } + return b; + } + function aWc(a, b, c2) { + var d, e, f2; + Odd(c2, "Remove overlaps", 1); + c2.n && !!b && Tdd(c2, i6d(b), (pgd(), mgd)); + d = BD(hkd(b, (MUc(), LUc)), 33); + a.f = d; + a.a = tXc(BD(hkd(b, (ZWc(), WWc)), 293)); + e = ED(hkd(b, (Y9c(), T9c))); + FVc(a, (uCb(e), e)); + f2 = gVc(d); + _Vc(a, b, f2, c2); + c2.n && !!b && Tdd(c2, i6d(b), (pgd(), mgd)); + } + function aYb(a, b, c2) { + switch (c2.g) { + case 1: + return new f7c(b.a, $wnd.Math.min(a.d.b, b.b)); + case 2: + return new f7c($wnd.Math.max(a.c.a, b.a), b.b); + case 3: + return new f7c(b.a, $wnd.Math.max(a.c.b, b.b)); + case 4: + return new f7c($wnd.Math.min(b.a, a.d.a), b.b); + } + return new f7c(b.a, b.b); + } + function mFc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m; + l = d ? (Ucd(), Tcd) : (Ucd(), zcd); + e = false; + for (i3 = b[c2], j = 0, k = i3.length; j < k; ++j) { + h = i3[j]; + if (ecd(BD(vNb(h, (Nyc(), Vxc)), 98))) { + continue; + } + g = h.e; + m = !V_b(h, l).dc() && !!g; + if (m) { + f2 = WZb(g); + a.b = new sic(f2, d ? 0 : f2.length - 1); + } + e = e | nFc(a, h, l, m); + } + return e; + } + function $sd(a) { + var b, c2, d; + b = Pu(1 + (!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c).i); + Ekb(b, (!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); + for (d = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 118); + Ekb(b, (!c2.d && (c2.d = new y5d(B2, c2, 8, 5)), c2.d)); + } + return Qb(b), new sl(b); + } + function _sd(a) { + var b, c2, d; + b = Pu(1 + (!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c).i); + Ekb(b, (!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); + for (d = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 118); + Ekb(b, (!c2.e && (c2.e = new y5d(B2, c2, 7, 4)), c2.e)); + } + return Qb(b), new sl(b); + } + function M9d(a) { + var b, c2, d, e; + if (a == null) { + return null; + } else { + d = Qge(a, true); + e = Nwe.length; + if (dfb(d.substr(d.length - e, e), Nwe)) { + c2 = d.length; + if (c2 == 4) { + b = (BCb(0, d.length), d.charCodeAt(0)); + if (b == 43) { + return x9d; + } else if (b == 45) { + return w9d; + } + } else if (c2 == 3) { + return x9d; + } + } + return Hcb(d); + } + } + function aKc(a) { + var b, c2, d, e; + b = 0; + c2 = 0; + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + b = Tbb(wbb(b, HAb(JAb(new YAb(null, new Kub(d.e, 16)), new nLc())))); + c2 = Tbb(wbb(c2, HAb(JAb(new YAb(null, new Kub(d.g, 16)), new pLc())))); + if (b > 1 || c2 > 1) { + return 2; + } + } + if (b + c2 == 1) { + return 2; + } + return 0; + } + function WQb(a, b, c2) { + var d, e, f2, g, h; + Odd(c2, "ELK Force", 1); + Ccb(DD(hkd(b, (wSb(), jSb)))) || $Cb((d = new _Cb((Pgd(), new bhd(b))), d)); + h = TQb(b); + XQb(h); + YQb(a, BD(vNb(h, fSb), 424)); + g = LQb(a.a, h); + for (f2 = g.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 231); + tRb(a.b, e, Udd(c2, 1 / g.gc())); + } + h = KQb(g); + SQb(h); + Qdd(c2); + } + function yoc(a, b) { + var c2, d, e, f2, g; + Odd(b, "Breaking Point Processor", 1); + xoc(a); + if (Ccb(DD(vNb(a, (Nyc(), Jyc))))) { + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + c2 = 0; + for (g = new olb(d.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + f2.p = c2++; + } + } + soc(a); + toc(a, true); + toc(a, false); + } + Qdd(b); + } + function $1c(a, b, c2) { + var d, e, f2, g, h, i3; + h = a.c; + for (g = (!c2.q ? (mmb(), mmb(), kmb) : c2.q).vc().Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 42); + d = !WAb(JAb(new YAb(null, new Kub(h, 16)), new Xxb(new m2c(b, f2)))).sd((EAb(), DAb)); + if (d) { + i3 = f2.dd(); + if (JD(i3, 4)) { + e = fvd(i3); + e != null && (i3 = e); + } + b.Ye(BD(f2.cd(), 146), i3); + } + } + } + function MQd(a, b) { + var c2, d, e, f2, g; + if (!b) { + return null; + } else { + f2 = JD(a.Cb, 88) || JD(a.Cb, 99); + g = !f2 && JD(a.Cb, 322); + for (d = new Fyd((!b.a && (b.a = new KYd(b, j5, b)), b.a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 87); + e = KQd(c2); + if (f2 ? JD(e, 88) : g ? JD(e, 148) : !!e) { + return e; + } + } + return f2 ? (jGd(), _Fd) : (jGd(), YFd); + } + } + function g3b(a, b) { + var c2, d, e, f2, g, h; + Odd(b, "Constraints Postprocessor", 1); + g = 0; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + h = 0; + for (d = new olb(e.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + if (c2.k == (j0b(), h0b)) { + yNb(c2, (Nyc(), nxc), meb(g)); + yNb(c2, Gwc, meb(h)); + ++h; + } + } + ++g; + } + Qdd(b); + } + function eRc(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + i3 = new f7c(c2, d); + c7c(i3, BD(vNb(b, (mTc(), WSc)), 8)); + for (k = Jsb(b.b, 0); k.b != k.d.c; ) { + j = BD(Xsb(k), 86); + P6c(j.e, i3); + Dsb(a.b, j); + } + for (h = Jsb(b.a, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 188); + for (f2 = Jsb(g.a, 0); f2.b != f2.d.c; ) { + e = BD(Xsb(f2), 8); + P6c(e, i3); + } + Dsb(a.a, g); + } + } + function uid(a, b, c2) { + var d, e, f2; + f2 = e1d((O6d(), M6d), a.Tg(), b); + if (f2) { + Q6d(); + if (!BD(f2, 66).Oj()) { + f2 = _1d(q1d(M6d, f2)); + if (!f2) { + throw vbb(new Wdb(ite + b.ne() + jte)); + } + } + e = (d = a.Yg(f2), BD(d >= 0 ? a._g(d, true, true) : sid(a, f2, true), 153)); + BD(e, 215).ml(b, c2); + } else { + throw vbb(new Wdb(ite + b.ne() + jte)); + } + } + function ROc(a, b) { + var c2, d, e, f2, g; + c2 = new Rkb(); + e = LAb(new YAb(null, new Kub(a, 16)), new iPc()); + f2 = LAb(new YAb(null, new Kub(a, 16)), new kPc()); + g = aAb(_zb(OAb(ty(OC(GC(xM, 1), Uhe, 833, 0, [e, f2])), new mPc()))); + for (d = 1; d < g.length; d++) { + g[d] - g[d - 1] >= 2 * b && Ekb(c2, new bPc(g[d - 1] + b, g[d] - b)); + } + return c2; + } + function AXc(a, b, c2) { + Odd(c2, "Eades radial", 1); + c2.n && !!b && Tdd(c2, i6d(b), (pgd(), mgd)); + a.d = BD(hkd(b, (MUc(), LUc)), 33); + a.c = Edb(ED(hkd(b, (ZWc(), VWc)))); + a.e = tXc(BD(hkd(b, WWc), 293)); + a.a = gWc(BD(hkd(b, YWc), 426)); + a.b = jXc(BD(hkd(b, RWc), 340)); + BXc(a); + c2.n && !!b && Tdd(c2, i6d(b), (pgd(), mgd)); + } + function Fqd(a, b, c2) { + var d, e, f2, g, h, j, k, l; + if (c2) { + f2 = c2.a.length; + d = new Yge(f2); + for (h = (d.b - d.a) * d.c < 0 ? (Xge(), Wge) : new she(d); h.Ob(); ) { + g = BD(h.Pb(), 19); + e = Zpd(c2, g.a); + !!e && (j = Uqd(a, (k = (Fhd(), l = new ppd(), l), !!b && npd(k, b), k), e), Lkd(j, _pd(e, Vte)), grd(e, j), hrd(e, j), crd(a, e, j)); + } + } + } + function UKd(a) { + var b, c2, d, e, f2, g; + if (!a.j) { + g = new HPd(); + b = KKd; + f2 = b.a.zc(a, b); + if (f2 == null) { + for (d = new Fyd(_Kd(a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 26); + e = UKd(c2); + ytd(g, e); + wtd(g, c2); + } + b.a.Bc(a) != null; + } + vud(g); + a.j = new nNd((BD(qud(ZKd((NFd(), MFd).o), 11), 18), g.i), g.g); + $Kd(a).b &= -33; + } + return a.j; + } + function O9d(a) { + var b, c2, d, e; + if (a == null) { + return null; + } else { + d = Qge(a, true); + e = Nwe.length; + if (dfb(d.substr(d.length - e, e), Nwe)) { + c2 = d.length; + if (c2 == 4) { + b = (BCb(0, d.length), d.charCodeAt(0)); + if (b == 43) { + return z9d; + } else if (b == 45) { + return y9d; + } + } else if (c2 == 3) { + return z9d; + } + } + return new Odb(d); + } + } + function _C(a) { + var b, c2, d; + c2 = a.l; + if ((c2 & c2 - 1) != 0) { + return -1; + } + d = a.m; + if ((d & d - 1) != 0) { + return -1; + } + b = a.h; + if ((b & b - 1) != 0) { + return -1; + } + if (b == 0 && d == 0 && c2 == 0) { + return -1; + } + if (b == 0 && d == 0 && c2 != 0) { + return ieb(c2); + } + if (b == 0 && d != 0 && c2 == 0) { + return ieb(d) + 22; + } + if (b != 0 && d == 0 && c2 == 0) { + return ieb(b) + 44; + } + return -1; + } + function qbc(a, b) { + var c2, d, e, f2, g; + Odd(b, "Edge joining", 1); + c2 = Ccb(DD(vNb(a, (Nyc(), Byc)))); + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + g = new Bib(d.a, 0); + while (g.b < g.d.gc()) { + f2 = (sCb(g.b < g.d.gc()), BD(g.d.Xb(g.c = g.b++), 10)); + if (f2.k == (j0b(), g0b)) { + sbc(f2, c2); + uib(g); + } + } + } + Qdd(b); + } + function c_c(a, b, c2) { + var d, e; + H2c(a.b); + K2c(a.b, (Y$c(), V$c), (R0c(), Q0c)); + K2c(a.b, W$c, b.g); + K2c(a.b, X$c, b.a); + a.a = F2c(a.b, b); + Odd(c2, "Compaction by shrinking a tree", a.a.c.length); + if (b.i.c.length > 1) { + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 51); + d.pf(b, Udd(c2, 1)); + } + } + Qdd(c2); + } + function mo(a, b) { + var c2, d, e, f2, g; + e = b.a & a.f; + f2 = null; + for (d = a.b[e]; true; d = d.b) { + if (d == b) { + !f2 ? a.b[e] = b.b : f2.b = b.b; + break; + } + f2 = d; + } + g = b.f & a.f; + f2 = null; + for (c2 = a.c[g]; true; c2 = c2.d) { + if (c2 == b) { + !f2 ? a.c[g] = b.d : f2.d = b.d; + break; + } + f2 = c2; + } + !b.e ? a.a = b.c : b.e.c = b.c; + !b.c ? a.e = b.e : b.c.e = b.e; + --a.i; + ++a.g; + } + function eNb(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + c2 = a.o; + b = a.p; + g = Ohe; + e = Rie; + h = Ohe; + f2 = Rie; + for (j = 0; j < c2; ++j) { + for (k = 0; k < b; ++k) { + if (YMb(a, j, k)) { + g = $wnd.Math.min(g, j); + e = $wnd.Math.max(e, j); + h = $wnd.Math.min(h, k); + f2 = $wnd.Math.max(f2, k); + } + } + } + i3 = e - g + 1; + d = f2 - h + 1; + return new Ggd(meb(g), meb(h), meb(i3), meb(d)); + } + function DWb(a, b) { + var c2, d, e, f2; + f2 = new Bib(a, 0); + c2 = (sCb(f2.b < f2.d.gc()), BD(f2.d.Xb(f2.c = f2.b++), 140)); + while (f2.b < f2.d.gc()) { + d = (sCb(f2.b < f2.d.gc()), BD(f2.d.Xb(f2.c = f2.b++), 140)); + e = new dWb(d.c, c2.d, b); + sCb(f2.b > 0); + f2.a.Xb(f2.c = --f2.b); + Aib(f2, e); + sCb(f2.b < f2.d.gc()); + f2.d.Xb(f2.c = f2.b++); + e.a = false; + c2 = d; + } + } + function Y2b(a) { + var b, c2, d, e, f2, g; + e = BD(vNb(a, (wtc(), vsc)), 11); + for (g = new olb(a.j); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 11); + for (d = new olb(f2.g); d.a < d.c.c.length; ) { + b = BD(mlb(d), 17); + RZb(b, e); + return f2; + } + for (c2 = new olb(f2.e); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 17); + QZb(b, e); + return f2; + } + } + return null; + } + function iA(a, b, c2) { + var d, e; + d = Cbb(c2.q.getTime()); + if (ybb(d, 0) < 0) { + e = _ie - Tbb(Hbb(Jbb(d), _ie)); + e == _ie && (e = 0); + } else { + e = Tbb(Hbb(d, _ie)); + } + if (b == 1) { + e = $wnd.Math.min((e + 50) / 100 | 0, 9); + Kfb(a, 48 + e & aje); + } else if (b == 2) { + e = $wnd.Math.min((e + 5) / 10 | 0, 99); + EA(a, e, 2); + } else { + EA(a, e, 3); + b > 3 && EA(a, 0, b - 3); + } + } + function cUb(a) { + var b, c2, d, e; + if (PD(vNb(a, (Nyc(), axc))) === PD((hbd(), ebd))) { + return !a.e && PD(vNb(a, Cwc)) !== PD((Xrc(), Urc)); + } + d = BD(vNb(a, Dwc), 292); + e = Ccb(DD(vNb(a, Hwc))) || PD(vNb(a, Iwc)) === PD((Rpc(), Opc)); + b = BD(vNb(a, Bwc), 19).a; + c2 = a.a.c.length; + return !e && d != (Xrc(), Urc) && (b == 0 || b > c2); + } + function lkc(a) { + var b, c2; + c2 = 0; + for (; c2 < a.c.length; c2++) { + if (Ojc((tCb(c2, a.c.length), BD(a.c[c2], 113))) > 0) { + break; + } + } + if (c2 > 0 && c2 < a.c.length - 1) { + return c2; + } + b = 0; + for (; b < a.c.length; b++) { + if (Ojc((tCb(b, a.c.length), BD(a.c[b], 113))) > 0) { + break; + } + } + if (b > 0 && c2 < a.c.length - 1) { + return b; + } + return a.c.length / 2 | 0; + } + function mmd(a, b) { + var c2, d; + if (b != a.Cb || a.Db >> 16 != 6 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + qmd(a))); + d = null; + !!a.Cb && (d = (c2 = a.Db >> 16, c2 >= 0 ? cmd(a, d) : a.Cb.ih(a, -1 - c2, null, d))); + !!b && (d = kid(b, a, 6, d)); + d = bmd(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 6, b, b)); + } + function npd(a, b) { + var c2, d; + if (b != a.Cb || a.Db >> 16 != 9 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + opd(a))); + d = null; + !!a.Cb && (d = (c2 = a.Db >> 16, c2 >= 0 ? lpd(a, d) : a.Cb.ih(a, -1 - c2, null, d))); + !!b && (d = kid(b, a, 9, d)); + d = kpd(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 9, b, b)); + } + function Rld(a, b) { + var c2, d; + if (b != a.Cb || a.Db >> 16 != 3 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + Sld(a))); + d = null; + !!a.Cb && (d = (c2 = a.Db >> 16, c2 >= 0 ? Lld(a, d) : a.Cb.ih(a, -1 - c2, null, d))); + !!b && (d = kid(b, a, 12, d)); + d = Kld(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, b, b)); + } + function VId(b) { + var c2, d, e, f2, g; + e = wId(b); + g = b.j; + if (g == null && !!e) { + return b.$j() ? null : e.zj(); + } else if (JD(e, 148)) { + d = e.Aj(); + if (d) { + f2 = d.Nh(); + if (f2 != b.i) { + c2 = BD(e, 148); + if (c2.Ej()) { + try { + b.g = f2.Kh(c2, g); + } catch (a) { + a = ubb(a); + if (JD(a, 78)) { + b.g = null; + } else + throw vbb(a); + } + } + b.i = f2; + } + } + return b.g; + } + return null; + } + function wOb(a) { + var b; + b = new Rkb(); + Ekb(b, new aDb(new f7c(a.c, a.d), new f7c(a.c + a.b, a.d))); + Ekb(b, new aDb(new f7c(a.c, a.d), new f7c(a.c, a.d + a.a))); + Ekb(b, new aDb(new f7c(a.c + a.b, a.d + a.a), new f7c(a.c + a.b, a.d))); + Ekb(b, new aDb(new f7c(a.c + a.b, a.d + a.a), new f7c(a.c, a.d + a.a))); + return b; + } + function IJc(a, b, c2, d) { + var e, f2, g; + g = LZb(b, c2); + d.c[d.c.length] = b; + if (a.j[g.p] == -1 || a.j[g.p] == 2 || a.a[b.p]) { + return d; + } + a.j[g.p] = -1; + for (f2 = new Sr(ur(O_b(g).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + if (!(!OZb(e) && !(!OZb(e) && e.c.i.c == e.d.i.c)) || e == b) { + continue; + } + return IJc(a, e, g, d); + } + return d; + } + function vQb(a, b, c2) { + var d, e, f2; + for (f2 = b.a.ec().Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 79); + d = BD(Ohb(a.b, e), 266); + !d && (Xod(jtd(e)) == Xod(ltd(e)) ? uQb(a, e, c2) : jtd(e) == Xod(ltd(e)) ? Ohb(a.c, e) == null && Ohb(a.b, ltd(e)) != null && xQb(a, e, c2, false) : Ohb(a.d, e) == null && Ohb(a.b, jtd(e)) != null && xQb(a, e, c2, true)); + } + } + function jcc(a, b) { + var c2, d, e, f2, g, h, i3; + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + h = new H0b(); + F0b(h, d); + G0b(h, (Ucd(), zcd)); + yNb(h, (wtc(), ftc), (Bcb(), true)); + for (g = b.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 10); + i3 = new H0b(); + F0b(i3, f2); + G0b(i3, Tcd); + yNb(i3, ftc, true); + c2 = new UZb(); + yNb(c2, ftc, true); + QZb(c2, h); + RZb(c2, i3); + } + } + } + function jnc(a, b, c2, d) { + var e, f2, g, h; + e = hnc(a, b, c2); + f2 = hnc(a, c2, b); + g = BD(Ohb(a.c, b), 112); + h = BD(Ohb(a.c, c2), 112); + if (e < f2) { + new DOc((HOc(), GOc), g, h, f2 - e); + } else if (f2 < e) { + new DOc((HOc(), GOc), h, g, e - f2); + } else if (e != 0 || !(!b.i || !c2.i) && d[b.i.c][c2.i.c]) { + new DOc((HOc(), GOc), g, h, 0); + new DOc(GOc, h, g, 0); + } + } + function Qoc(a, b) { + var c2, d, e, f2, g, h, i3; + e = 0; + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + e += f2.o.b + f2.d.a + f2.d.d + a.e; + for (d = new Sr(ur(R_b(f2).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + if (c2.c.i.k == (j0b(), i0b)) { + i3 = c2.c.i; + h = BD(vNb(i3, (wtc(), $sc)), 10); + e += h.o.b + h.d.a + h.d.d; + } + } + } + return e; + } + function WNc(a, b, c2) { + var d, e, f2, g, h, i3, j; + f2 = new Rkb(); + j = new Psb(); + g = new Psb(); + XNc(a, j, g, b); + VNc(a, j, g, b, c2); + for (i3 = new olb(a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 112); + for (e = new olb(h.k); e.a < e.c.c.length; ) { + d = BD(mlb(e), 129); + (!b || d.c == (HOc(), FOc)) && h.g > d.b.g && (f2.c[f2.c.length] = d, true); + } + } + return f2; + } + function k$c() { + k$c = ccb; + g$c = new l$c("CANDIDATE_POSITION_LAST_PLACED_RIGHT", 0); + f$c = new l$c("CANDIDATE_POSITION_LAST_PLACED_BELOW", 1); + i$c = new l$c("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT", 2); + h$c = new l$c("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW", 3); + j$c = new l$c("WHOLE_DRAWING", 4); + } + function Xqd(a, b) { + if (JD(b, 239)) { + return iqd(a, BD(b, 33)); + } else if (JD(b, 186)) { + return jqd(a, BD(b, 118)); + } else if (JD(b, 354)) { + return hqd(a, BD(b, 137)); + } else if (JD(b, 352)) { + return gqd(a, BD(b, 79)); + } else if (b) { + return null; + } else { + throw vbb(new Wdb(Xte + Fe(new amb(OC(GC(SI, 1), Uhe, 1, 5, [b]))))); + } + } + function aic(a) { + var b, c2, d, e, f2, g, h; + f2 = new Psb(); + for (e = new olb(a.d.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 121); + d.b.a.c.length == 0 && (Gsb(f2, d, f2.c.b, f2.c), true); + } + if (f2.b > 1) { + b = nGb((c2 = new pGb(), ++a.b, c2), a.d); + for (h = Jsb(f2, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 121); + AFb(DFb(CFb(EFb(BFb(new FFb(), 1), 0), b), g)); + } + } + } + function $od(a, b) { + var c2, d; + if (b != a.Cb || a.Db >> 16 != 11 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + _od(a))); + d = null; + !!a.Cb && (d = (c2 = a.Db >> 16, c2 >= 0 ? Uod(a, d) : a.Cb.ih(a, -1 - c2, null, d))); + !!b && (d = kid(b, a, 10, d)); + d = Tod(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 11, b, b)); + } + function uZb(a) { + var b, c2, d, e; + for (d = new nib(new eib(a.b).a); d.b; ) { + c2 = lib(d); + e = BD(c2.cd(), 11); + b = BD(c2.dd(), 10); + yNb(b, (wtc(), $sc), e); + yNb(e, gtc, b); + yNb(e, Nsc, (Bcb(), true)); + G0b(e, BD(vNb(b, Hsc), 61)); + vNb(b, Hsc); + yNb(e.i, (Nyc(), Vxc), (dcd(), acd)); + BD(vNb(Q_b(e.i), Ksc), 21).Fc((Orc(), Krc)); + } + } + function G4b(a, b, c2) { + var d, e, f2, g, h, i3; + f2 = 0; + g = 0; + if (a.c) { + for (i3 = new olb(a.d.i.j); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 11); + f2 += h.e.c.length; + } + } else { + f2 = 1; + } + if (a.d) { + for (i3 = new olb(a.c.i.j); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 11); + g += h.g.c.length; + } + } else { + g = 1; + } + e = QD(Eeb(g - f2)); + d = (c2 + b) / 2 + (c2 - b) * (0.4 * e); + return d; + } + function Zjc(a) { + Xjc(); + var b, c2; + if (a.Hc((Ucd(), Scd))) { + throw vbb(new Wdb("Port sides must not contain UNDEFINED")); + } + switch (a.gc()) { + case 1: + return Tjc; + case 2: + b = a.Hc(zcd) && a.Hc(Tcd); + c2 = a.Hc(Acd) && a.Hc(Rcd); + return b || c2 ? Wjc : Vjc; + case 3: + return Ujc; + case 4: + return Sjc; + default: + return null; + } + } + function Hoc(a, b, c2) { + var d, e, f2, g, h; + Odd(c2, "Breaking Point Removing", 1); + a.a = BD(vNb(b, (Nyc(), Swc)), 218); + for (f2 = new olb(b.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + for (h = new olb(Mu(e.a)); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (hoc(g)) { + d = BD(vNb(g, (wtc(), usc)), 305); + !d.d && Ioc(a, d); + } + } + } + Qdd(c2); + } + function s6c(a, b, c2) { + i6c(); + if (m6c(a, b) && m6c(a, c2)) { + return false; + } + return u6c(new f7c(a.c, a.d), new f7c(a.c + a.b, a.d), b, c2) || u6c(new f7c(a.c + a.b, a.d), new f7c(a.c + a.b, a.d + a.a), b, c2) || u6c(new f7c(a.c + a.b, a.d + a.a), new f7c(a.c, a.d + a.a), b, c2) || u6c(new f7c(a.c, a.d + a.a), new f7c(a.c, a.d), b, c2); + } + function x1d(a, b) { + var c2, d, e, f2; + if (!a.dc()) { + for (c2 = 0, d = a.gc(); c2 < d; ++c2) { + f2 = GD(a.Xb(c2)); + if (f2 == null ? b == null : dfb(f2.substr(0, 3), "!##") ? b != null && (e = b.length, !dfb(f2.substr(f2.length - e, e), b) || f2.length != b.length + 3) && !dfb(Ewe, b) : dfb(f2, Fwe) && !dfb(Ewe, b) || dfb(f2, b)) { + return true; + } + } + } + return false; + } + function J3b(a, b, c2, d) { + var e, f2, g, h, i3, j; + g = a.j.c.length; + i3 = KC(tN, ile, 306, g, 0, 1); + for (h = 0; h < g; h++) { + f2 = BD(Ikb(a.j, h), 11); + f2.p = h; + i3[h] = D3b(N3b(f2), c2, d); + } + F3b(a, i3, c2, b, d); + j = new Lqb(); + for (e = 0; e < i3.length; e++) { + !!i3[e] && Rhb(j, BD(Ikb(a.j, e), 11), i3[e]); + } + if (j.f.c + j.g.c != 0) { + yNb(a, (wtc(), Csc), j); + L3b(a, i3); + } + } + function Lgc(a, b, c2) { + var d, e, f2; + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + f2 = tgc(d); + if (f2) { + if (f2.k == (j0b(), e0b)) { + switch (BD(vNb(f2, (wtc(), Hsc)), 61).g) { + case 4: + f2.n.a = b.a; + break; + case 2: + f2.n.a = c2.a - (f2.o.a + f2.d.c); + break; + case 1: + f2.n.b = b.b; + break; + case 3: + f2.n.b = c2.b - (f2.o.b + f2.d.a); + } + } + } + } + } + function kAc() { + kAc = ccb; + iAc = new lAc(ane, 0); + dAc = new lAc("NIKOLOV", 1); + gAc = new lAc("NIKOLOV_PIXEL", 2); + eAc = new lAc("NIKOLOV_IMPROVED", 3); + fAc = new lAc("NIKOLOV_IMPROVED_PIXEL", 4); + cAc = new lAc("DUMMYNODE_PERCENTAGE", 5); + hAc = new lAc("NODECOUNT_PERCENTAGE", 6); + jAc = new lAc("NO_BOUNDARY", 7); + } + function led(a, b, c2) { + var d, e, f2, g, h; + e = BD(hkd(b, (X7c(), V7c)), 19); + !e && (e = meb(0)); + f2 = BD(hkd(c2, V7c), 19); + !f2 && (f2 = meb(0)); + if (e.a > f2.a) { + return -1; + } else if (e.a < f2.a) { + return 1; + } else { + if (a.a) { + d = Kdb(b.j, c2.j); + if (d != 0) { + return d; + } + d = Kdb(b.i, c2.i); + if (d != 0) { + return d; + } + } + g = b.g * b.f; + h = c2.g * c2.f; + return Kdb(g, h); + } + } + function BAd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + ++a.e; + i3 = a.d == null ? 0 : a.d.length; + if (b > i3) { + k = a.d; + a.d = KC(y4, jve, 63, 2 * i3 + 4, 0, 1); + for (f2 = 0; f2 < i3; ++f2) { + j = k[f2]; + if (j) { + d = j.g; + l = j.i; + for (h = 0; h < l; ++h) { + e = BD(d[h], 133); + g = DAd(a, e.Sh()); + c2 = a.d[g]; + !c2 && (c2 = a.d[g] = a.uj()); + c2.Fc(e); + } + } + } + return true; + } else { + return false; + } + } + function o2d(a, b, c2) { + var d, e, f2, g, h, i3; + e = c2; + f2 = e.ak(); + if (T6d(a.e, f2)) { + if (f2.hi()) { + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (pb(h, e) && g != b) { + throw vbb(new Wdb(kue)); + } + } + } + } else { + i3 = S6d(a.e.Tg(), f2); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (i3.rl(h.ak())) { + throw vbb(new Wdb(Hwe)); + } + } + } + vtd(a, b, c2); + } + function OYb(a, b) { + var c2, d, e, f2, g, h; + c2 = BD(vNb(b, (wtc(), Esc)), 21); + g = BD(Qc((xXb(), wXb), c2), 21); + h = BD(Qc(LYb, c2), 21); + for (f2 = g.Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 21); + if (!BD(Qc(a.b, d), 15).dc()) { + return false; + } + } + for (e = h.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 21); + if (!BD(Qc(a.b, d), 15).dc()) { + return false; + } + } + return true; + } + function scc(a, b) { + var c2, d, e, f2, g, h; + Odd(b, "Partition postprocessing", 1); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + for (f2 = new olb(c2.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + h = new olb(e.j); + while (h.a < h.c.c.length) { + g = BD(mlb(h), 11); + Ccb(DD(vNb(g, (wtc(), ftc)))) && nlb(h); + } + } + } + Qdd(b); + } + function ZZc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + if (a.a.c.length == 1) { + return JZc(BD(Ikb(a.a, 0), 187), b); + } + g = YZc(a); + i3 = 0; + j = a.d; + f2 = g; + k = a.d; + h = (j - f2) / 2 + f2; + while (f2 + 1 < j) { + i3 = 0; + for (d = new olb(a.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 187); + i3 += (e = MZc(c2, h, false), e.a); + } + if (i3 < b) { + k = h; + j = h; + } else { + f2 = h; + } + h = (j - f2) / 2 + f2; + } + return k; + } + function fD(a) { + var b, c2, d, e, f2; + if (isNaN(a)) { + return wD(), vD; + } + if (a < -9223372036854776e3) { + return wD(), tD; + } + if (a >= 9223372036854776e3) { + return wD(), sD; + } + e = false; + if (a < 0) { + e = true; + a = -a; + } + d = 0; + if (a >= Ije) { + d = QD(a / Ije); + a -= d * Ije; + } + c2 = 0; + if (a >= Hje) { + c2 = QD(a / Hje); + a -= c2 * Hje; + } + b = QD(a); + f2 = TC(b, c2, d); + e && ZC(f2); + return f2; + } + function rKb(a, b) { + var c2, d, e, f2; + c2 = !b || !a.u.Hc((rcd(), ncd)); + f2 = 0; + for (e = new olb(a.e.Cf()); e.a < e.c.c.length; ) { + d = BD(mlb(e), 838); + if (d.Hf() == (Ucd(), Scd)) { + throw vbb(new Wdb("Label and node size calculator can only be used with ports that have port sides assigned.")); + } + d.vf(f2++); + qKb(a, d, c2); + } + } + function V0d(a, b) { + var c2, d, e, f2, g; + e = b.Hh(a.a); + if (e) { + d = (!e.b && (e.b = new sId((jGd(), fGd), x6, e)), e.b); + c2 = GD(AAd(d, cwe)); + if (c2 != null) { + f2 = c2.lastIndexOf("#"); + g = f2 == -1 ? w1d(a, b.Aj(), c2) : f2 == 0 ? v1d(a, null, c2.substr(1)) : v1d(a, c2.substr(0, f2), c2.substr(f2 + 1)); + if (JD(g, 148)) { + return BD(g, 148); + } + } + } + return null; + } + function Z0d(a, b) { + var c2, d, e, f2, g; + d = b.Hh(a.a); + if (d) { + c2 = (!d.b && (d.b = new sId((jGd(), fGd), x6, d)), d.b); + f2 = GD(AAd(c2, zwe)); + if (f2 != null) { + e = f2.lastIndexOf("#"); + g = e == -1 ? w1d(a, b.Aj(), f2) : e == 0 ? v1d(a, null, f2.substr(1)) : v1d(a, f2.substr(0, e), f2.substr(e + 1)); + if (JD(g, 148)) { + return BD(g, 148); + } + } + } + return null; + } + function RDb(a) { + var b, c2, d, e, f2; + for (c2 = new olb(a.a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 307); + b.j = null; + for (f2 = b.a.a.ec().Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 57); + X6c(d.b); + (!b.j || d.d.c < b.j.d.c) && (b.j = d); + } + for (e = b.a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 57); + d.b.a = d.d.c - b.j.d.c; + d.b.b = d.d.d - b.j.d.d; + } + } + return a; + } + function sVb(a) { + var b, c2, d, e, f2; + for (c2 = new olb(a.a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 189); + b.f = null; + for (f2 = b.a.a.ec().Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 81); + X6c(d.e); + (!b.f || d.g.c < b.f.g.c) && (b.f = d); + } + for (e = b.a.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 81); + d.e.a = d.g.c - b.f.g.c; + d.e.b = d.g.d - b.f.g.d; + } + } + return a; + } + function EMb(a) { + var b, c2, d; + c2 = BD(a.a, 19).a; + d = BD(a.b, 19).a; + b = $wnd.Math.max($wnd.Math.abs(c2), $wnd.Math.abs(d)); + if (c2 < b && d == -b) { + return new vgd(meb(c2 + 1), meb(d)); + } + if (c2 == b && d < b) { + return new vgd(meb(c2), meb(d + 1)); + } + if (c2 >= -b && d == b) { + return new vgd(meb(c2 - 1), meb(d)); + } + return new vgd(meb(c2), meb(d - 1)); + } + function W8b() { + S8b(); + return OC(GC(AS, 1), Kie, 77, 0, [Y7b, V7b, Z7b, n8b, G8b, r8b, M8b, w8b, E8b, i8b, A8b, v8b, F8b, e8b, O8b, P7b, z8b, I8b, o8b, H8b, Q8b, C8b, Q7b, D8b, R8b, K8b, P8b, p8b, b8b, q8b, m8b, N8b, T7b, _7b, t8b, S7b, u8b, k8b, f8b, x8b, h8b, W7b, U7b, l8b, g8b, y8b, L8b, R7b, B8b, j8b, s8b, c8b, a8b, J8b, $7b, d8b, X7b]); + } + function Yic(a, b, c2) { + a.d = 0; + a.b = 0; + b.k == (j0b(), i0b) && c2.k == i0b && BD(vNb(b, (wtc(), $sc)), 10) == BD(vNb(c2, $sc), 10) && (ajc(b).j == (Ucd(), Acd) ? Zic(a, b, c2) : Zic(a, c2, b)); + b.k == i0b && c2.k == g0b ? ajc(b).j == (Ucd(), Acd) ? a.d = 1 : a.b = 1 : c2.k == i0b && b.k == g0b && (ajc(c2).j == (Ucd(), Acd) ? a.b = 1 : a.d = 1); + cjc(a, b, c2); + } + function esd(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + l = hsd(a); + b = a.a; + i3 = b != null; + i3 && Upd(l, "category", a.a); + e = Fhe(new Pib(a.d)); + g = !e; + if (g) { + j = new wB(); + cC(l, "knownOptions", j); + c2 = new msd(j); + reb(new Pib(a.d), c2); + } + f2 = Fhe(a.g); + h = !f2; + if (h) { + k = new wB(); + cC(l, "supportedFeatures", k); + d = new osd(k); + reb(a.g, d); + } + return l; + } + function ty(a) { + var b, c2, d, e, f2, g, h, i3, j; + d = false; + b = 336; + c2 = 0; + f2 = new Xp(a.length); + for (h = a, i3 = 0, j = h.length; i3 < j; ++i3) { + g = h[i3]; + d = d | (Uzb(g), false); + e = (Tzb(g), g.a); + Ekb(f2.a, Qb(e)); + b &= e.qd(); + c2 = Ly(c2, e.rd()); + } + return BD(BD(Rzb(new YAb(null, Yj(new Kub((im(), nm(f2.a)), 16), new vy(), b, c2)), new xy(a)), 670), 833); + } + function UWb(a, b) { + var c2; + if (!!a.d && (b.c != a.e.c || qWb(a.e.b, b.b))) { + Ekb(a.f, a.d); + a.a = a.d.c + a.d.b; + a.d = null; + a.e = null; + } + nWb(b.b) ? a.c = b : a.b = b; + if (b.b == (lWb(), hWb) && !b.a || b.b == iWb && b.a || b.b == jWb && b.a || b.b == kWb && !b.a) { + if (!!a.c && !!a.b) { + c2 = new J6c(a.a, a.c.d, b.c - a.a, a.b.d - a.c.d); + a.d = c2; + a.e = b; + } + } + } + function L2c(a) { + var b; + D2c.call(this); + this.i = new Z2c(); + this.g = a; + this.f = BD(a.e && a.e(), 9).length; + if (this.f == 0) { + throw vbb(new Wdb("There must be at least one phase in the phase enumeration.")); + } + this.c = (b = BD(gdb(this.g), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + this.a = new j3c(); + this.b = new Lqb(); + } + function God(a, b) { + var c2, d; + if (b != a.Cb || a.Db >> 16 != 7 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + Iod(a))); + d = null; + !!a.Cb && (d = (c2 = a.Db >> 16, c2 >= 0 ? Eod(a, d) : a.Cb.ih(a, -1 - c2, null, d))); + !!b && (d = BD(b, 49).gh(a, 1, C2, d)); + d = Dod(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 7, b, b)); + } + function NHd(a, b) { + var c2, d; + if (b != a.Cb || a.Db >> 16 != 3 && !!b) { + if (p6d(a, b)) + throw vbb(new Wdb(ste + QHd(a))); + d = null; + !!a.Cb && (d = (c2 = a.Db >> 16, c2 >= 0 ? KHd(a, d) : a.Cb.ih(a, -1 - c2, null, d))); + !!b && (d = BD(b, 49).gh(a, 0, k5, d)); + d = JHd(a, b, d); + !!d && d.Fi(); + } else + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 3, b, b)); + } + function Ehb(a, b) { + Dhb(); + var c2, d, e, f2, g, h, i3, j, k; + if (b.d > a.d) { + h = a; + a = b; + b = h; + } + if (b.d < 63) { + return Ihb(a, b); + } + g = (a.d & -2) << 4; + j = Rgb2(a, g); + k = Rgb2(b, g); + d = yhb(a, Qgb(j, g)); + e = yhb(b, Qgb(k, g)); + i3 = Ehb(j, k); + c2 = Ehb(d, e); + f2 = Ehb(yhb(j, d), yhb(e, k)); + f2 = thb(thb(f2, i3), c2); + f2 = Qgb(f2, g); + i3 = Qgb(i3, g << 1); + return thb(thb(i3, f2), c2); + } + function aGc(a, b, c2) { + var d, e, f2, g, h; + g = CHc(a, c2); + h = KC(OQ, kne, 10, b.length, 0, 1); + d = 0; + for (f2 = g.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 11); + Ccb(DD(vNb(e, (wtc(), Nsc)))) && (h[d++] = BD(vNb(e, gtc), 10)); + } + if (d < b.length) { + throw vbb(new Zdb("Expected " + b.length + " hierarchical ports, but found only " + d + ".")); + } + return h; + } + function Und(a, b) { + var c2, d, e, f2, g, h; + if (!a.tb) { + f2 = (!a.rb && (a.rb = new jUd(a, d5, a)), a.rb); + h = new Mqb(f2.i); + for (e = new Fyd(f2); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 138); + g = d.ne(); + c2 = BD(g == null ? jrb(h.f, null, d) : Drb(h.g, g, d), 138); + !!c2 && (g == null ? jrb(h.f, null, c2) : Drb(h.g, g, c2)); + } + a.tb = h; + } + return BD(Phb(a.tb, b), 138); + } + function YKd(a, b) { + var c2, d, e, f2, g; + (a.i == null && TKd(a), a.i).length; + if (!a.p) { + g = new Mqb((3 * a.g.i / 2 | 0) + 1); + for (e = new $yd(a.g); e.e != e.i.gc(); ) { + d = BD(Zyd(e), 170); + f2 = d.ne(); + c2 = BD(f2 == null ? jrb(g.f, null, d) : Drb(g.g, f2, d), 170); + !!c2 && (f2 == null ? jrb(g.f, null, c2) : Drb(g.g, f2, c2)); + } + a.p = g; + } + return BD(Phb(a.p, b), 170); + } + function hCb(a, b, c2, d, e) { + var f2, g, h, i3, j; + fCb(d + Wy(c2, c2.$d()), e); + gCb(b, jCb(c2)); + f2 = c2.f; + !!f2 && hCb(a, b, f2, "Caused by: ", false); + for (h = (c2.k == null && (c2.k = KC(_I, nie, 78, 0, 0, 1)), c2.k), i3 = 0, j = h.length; i3 < j; ++i3) { + g = h[i3]; + hCb(a, b, g, "Suppressed: ", false); + } + console.groupEnd != null && console.groupEnd.call(console); + } + function dGc(a, b, c2, d) { + var e, f2, g, h, i3; + i3 = b.e; + h = i3.length; + g = b.q._f(i3, c2 ? 0 : h - 1, c2); + e = i3[c2 ? 0 : h - 1]; + g = g | cGc(a, e, c2, d); + for (f2 = c2 ? 1 : h - 2; c2 ? f2 < h : f2 >= 0; f2 += c2 ? 1 : -1) { + g = g | b.c.Sf(i3, f2, c2, d && !Ccb(DD(vNb(b.j, (wtc(), Jsc)))) && !Ccb(DD(vNb(b.j, (wtc(), mtc))))); + g = g | b.q._f(i3, f2, c2); + g = g | cGc(a, i3[f2], c2, d); + } + Qqb(a.c, b); + return g; + } + function o3b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + for (k = m_b(a.j), l = 0, m = k.length; l < m; ++l) { + j = k[l]; + if (c2 == (KAc(), HAc) || c2 == JAc) { + i3 = k_b(j.g); + for (e = i3, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + k3b(b, d) && PZb(d, true); + } + } + if (c2 == IAc || c2 == JAc) { + h = k_b(j.e); + for (e = h, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + j3b(b, d) && PZb(d, true); + } + } + } + } + function Qmc(a) { + var b, c2; + b = null; + c2 = null; + switch (Lmc(a).g) { + case 1: + b = (Ucd(), zcd); + c2 = Tcd; + break; + case 2: + b = (Ucd(), Rcd); + c2 = Acd; + break; + case 3: + b = (Ucd(), Tcd); + c2 = zcd; + break; + case 4: + b = (Ucd(), Acd); + c2 = Rcd; + } + mjc(a, BD(Btb(RAb(BD(Qc(a.k, b), 15).Oc(), Hmc)), 113)); + njc(a, BD(Btb(QAb(BD(Qc(a.k, c2), 15).Oc(), Hmc)), 113)); + } + function a6b(a) { + var b, c2, d, e, f2, g; + e = BD(Ikb(a.j, 0), 11); + if (e.e.c.length + e.g.c.length == 0) { + a.n.a = 0; + } else { + g = 0; + for (d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(e), new R0b(e)]))); Qr(d); ) { + c2 = BD(Rr(d), 11); + g += c2.i.n.a + c2.n.a + c2.a.a; + } + b = BD(vNb(a, (Nyc(), Txc)), 8); + f2 = !b ? 0 : b.a; + a.n.a = g / (e.e.c.length + e.g.c.length) - f2; + } + } + function F1c(a, b) { + var c2, d, e; + for (d = new olb(b.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 221); + $Nb(BD(c2.b, 65), c7c(R6c(BD(b.b, 65).c), BD(b.b, 65).a)); + e = xOb(BD(b.b, 65).b, BD(c2.b, 65).b); + e > 1 && (a.a = true); + ZNb(BD(c2.b, 65), P6c(R6c(BD(b.b, 65).c), Y6c(c7c(R6c(BD(c2.b, 65).a), BD(b.b, 65).a), e))); + D1c(a, b); + F1c(a, c2); + } + } + function rVb(a) { + var b, c2, d, e, f2, g, h; + for (f2 = new olb(a.a.a); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 189); + d.e = 0; + d.d.a.$b(); + } + for (e = new olb(a.a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 189); + for (c2 = d.a.a.ec().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 81); + for (h = b.f.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 81); + if (g.d != d) { + Qqb(d.d, g); + ++g.d.e; + } + } + } + } + } + function bcc(a) { + var b, c2, d, e, f2, g, h, i3; + i3 = a.j.c.length; + c2 = 0; + b = i3; + e = 2 * i3; + for (h = new olb(a.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + switch (g.j.g) { + case 2: + case 4: + g.p = -1; + break; + case 1: + case 3: + d = g.e.c.length; + f2 = g.g.c.length; + d > 0 && f2 > 0 ? g.p = b++ : d > 0 ? g.p = c2++ : f2 > 0 ? g.p = e++ : g.p = c2++; + } + } + mmb(); + Okb(a.j, new fcc()); + } + function Vec(a) { + var b, c2; + c2 = null; + b = BD(Ikb(a.g, 0), 17); + do { + c2 = b.d.i; + if (wNb(c2, (wtc(), Wsc))) { + return BD(vNb(c2, Wsc), 11).i; + } + if (c2.k != (j0b(), h0b) && Qr(new Sr(ur(U_b(c2).a.Kc(), new Sq())))) { + b = BD(Rr(new Sr(ur(U_b(c2).a.Kc(), new Sq()))), 17); + } else if (c2.k != h0b) { + return null; + } + } while (!!c2 && c2.k != (j0b(), h0b)); + return c2; + } + function Omc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + h = b.j; + g = b.g; + i3 = BD(Ikb(h, h.c.length - 1), 113); + k = (tCb(0, h.c.length), BD(h.c[0], 113)); + j = Kmc(a, g, i3, k); + for (f2 = 1; f2 < h.c.length; f2++) { + c2 = (tCb(f2 - 1, h.c.length), BD(h.c[f2 - 1], 113)); + e = (tCb(f2, h.c.length), BD(h.c[f2], 113)); + d = Kmc(a, g, c2, e); + if (d > j) { + i3 = c2; + k = e; + j = d; + } + } + b.a = k; + b.c = i3; + } + function sEb(a, b) { + var c2, d; + d = Axb(a.b, b.b); + if (!d) { + throw vbb(new Zdb("Invalid hitboxes for scanline constraint calculation.")); + } + (mEb(b.b, BD(Cxb(a.b, b.b), 57)) || mEb(b.b, BD(Bxb(a.b, b.b), 57))) && (Zfb(), b.b + " has overlap."); + a.a[b.b.f] = BD(Exb(a.b, b.b), 57); + c2 = BD(Dxb(a.b, b.b), 57); + !!c2 && (a.a[c2.f] = b.b); + } + function AFb(a) { + if (!a.a.d || !a.a.e) { + throw vbb(new Zdb((fdb(fN), fN.k + " must have a source and target " + (fdb(jN), jN.k) + " specified."))); + } + if (a.a.d == a.a.e) { + throw vbb(new Zdb("Network simplex does not support self-loops: " + a.a + " " + a.a.d + " " + a.a.e)); + } + NFb(a.a.d.g, a.a); + NFb(a.a.e.b, a.a); + return a.a; + } + function HHc(a, b, c2) { + var d, e, f2, g, h, i3, j; + j = new Hxb(new tIc(a)); + for (g = OC(GC(aR, 1), lne, 11, 0, [b, c2]), h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + Iwb(j.a, f2, (Bcb(), zcb)) == null; + for (e = new b1b(f2.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + d.c == d.d || Axb(j, f2 == d.c ? d.d : d.c); + } + } + return Qb(j), new Tkb(j); + } + function oPc(a, b, c2) { + var d, e, f2, g, h, i3; + d = 0; + if (b.b != 0 && c2.b != 0) { + f2 = Jsb(b, 0); + g = Jsb(c2, 0); + h = Edb(ED(Xsb(f2))); + i3 = Edb(ED(Xsb(g))); + e = true; + do { + if (h > i3 - a.b && h < i3 + a.b) { + return -1; + } else + h > i3 - a.a && h < i3 + a.a && ++d; + h <= i3 && f2.b != f2.d.c ? h = Edb(ED(Xsb(f2))) : i3 <= h && g.b != g.d.c ? i3 = Edb(ED(Xsb(g))) : e = false; + } while (e); + } + return d; + } + function F3b(a, b, c2, d, e) { + var f2, g, h, i3; + i3 = (f2 = BD(gdb(F1), 9), new xqb(f2, BD(_Bb(f2, f2.length), 9), 0)); + for (h = new olb(a.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + if (b[g.p]) { + G3b(g, b[g.p], d); + rqb(i3, g.j); + } + } + if (e) { + K3b(a, b, (Ucd(), zcd), 2 * c2, d); + K3b(a, b, Tcd, 2 * c2, d); + } else { + K3b(a, b, (Ucd(), Acd), 2 * c2, d); + K3b(a, b, Rcd, 2 * c2, d); + } + } + function Szb(a) { + var b, c2, d, e, f2; + f2 = new Rkb(); + Hkb(a.b, new XBb(f2)); + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + if (f2.c.length != 0) { + b = (tCb(0, f2.c.length), BD(f2.c[0], 78)); + for (c2 = 1, d = f2.c.length; c2 < d; ++c2) { + e = (tCb(c2, f2.c.length), BD(f2.c[c2], 78)); + e != b && Qy(b, e); + } + if (JD(b, 60)) { + throw vbb(BD(b, 60)); + } + if (JD(b, 289)) { + throw vbb(BD(b, 289)); + } + } + } + function DCb(a, b) { + var c2, d, e, f2; + a = a == null ? Xhe : (uCb(a), a); + c2 = new Vfb(); + f2 = 0; + d = 0; + while (d < b.length) { + e = a.indexOf("%s", f2); + if (e == -1) { + break; + } + Qfb(c2, a.substr(f2, e - f2)); + Pfb(c2, b[d++]); + f2 = e + 2; + } + Qfb(c2, a.substr(f2)); + if (d < b.length) { + c2.a += " ["; + Pfb(c2, b[d++]); + while (d < b.length) { + c2.a += She; + Pfb(c2, b[d++]); + } + c2.a += "]"; + } + return c2.a; + } + function KCb(a) { + var b, c2, d, e; + b = 0; + d = a.length; + e = d - 4; + c2 = 0; + while (c2 < e) { + b = (BCb(c2 + 3, a.length), a.charCodeAt(c2 + 3) + (BCb(c2 + 2, a.length), 31 * (a.charCodeAt(c2 + 2) + (BCb(c2 + 1, a.length), 31 * (a.charCodeAt(c2 + 1) + (BCb(c2, a.length), 31 * (a.charCodeAt(c2) + 31 * b))))))); + b = b | 0; + c2 += 4; + } + while (c2 < d) { + b = b * 31 + bfb(a, c2++); + } + b = b | 0; + return b; + } + function Rac(a) { + var b, c2; + for (c2 = new Sr(ur(U_b(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + if (b.d.i.k != (j0b(), f0b)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to LAST, but has at least one outgoing edge that does not go to a LAST_SEPARATE node. That must not happen.")); + } + } + } + function jQc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m; + i3 = 0; + for (k = new olb(a.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + h = 0; + for (f2 = new Sr(ur(R_b(j).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + l = A0b(e.c).b; + m = A0b(e.d).b; + h = $wnd.Math.max(h, $wnd.Math.abs(m - l)); + } + i3 = $wnd.Math.max(i3, h); + } + g = d * $wnd.Math.min(1, b / c2) * i3; + return g; + } + function See(a) { + var b; + b = new Ifb(); + (a & 256) != 0 && (b.a += "F", b); + (a & 128) != 0 && (b.a += "H", b); + (a & 512) != 0 && (b.a += "X", b); + (a & 2) != 0 && (b.a += "i", b); + (a & 8) != 0 && (b.a += "m", b); + (a & 4) != 0 && (b.a += "s", b); + (a & 32) != 0 && (b.a += "u", b); + (a & 64) != 0 && (b.a += "w", b); + (a & 16) != 0 && (b.a += "x", b); + (a & zte) != 0 && (b.a += ",", b); + return jfb(b.a); + } + function F5b(a, b) { + var c2, d, e, f2; + Odd(b, "Resize child graph to fit parent.", 1); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + Gkb(a.a, c2.a); + c2.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + for (f2 = new olb(a.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + $_b(e, null); + } + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + G5b(a); + !!a.e && E5b(a.e, a); + Qdd(b); + } + function eec(a) { + var b, c2, d, e, f2, g, h, i3, j; + d = a.b; + f2 = d.e; + g = ecd(BD(vNb(d, (Nyc(), Vxc)), 98)); + c2 = !!f2 && BD(vNb(f2, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)); + if (g || c2) { + return; + } + for (j = (h = new $ib(a.e).a.vc().Kc(), new djb(h)); j.a.Ob(); ) { + i3 = (b = BD(j.a.Pb(), 42), BD(b.dd(), 113)); + if (i3.a) { + e = i3.d; + F0b(e, null); + i3.c = true; + a.a = true; + } + } + } + function QFc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n; + m = -1; + n = 0; + for (j = a, k = 0, l = j.length; k < l; ++k) { + i3 = j[k]; + for (f2 = i3, g = 0, h = f2.length; g < h; ++g) { + e = f2[g]; + b = new Unc(m == -1 ? a[0] : a[m], Xec(e)); + for (c2 = 0; c2 < e.j.c.length; c2++) { + for (d = c2 + 1; d < e.j.c.length; d++) { + Rnc(b, BD(Ikb(e.j, c2), 11), BD(Ikb(e.j, d), 11)) > 0 && ++n; + } + } + } + ++m; + } + return n; + } + function hUc(a, b) { + var c2, d, e, f2, g; + g = BD(vNb(b, (JTc(), FTc)), 425); + for (f2 = Jsb(b.b, 0); f2.b != f2.d.c; ) { + e = BD(Xsb(f2), 86); + if (a.b[e.g] == 0) { + switch (g.g) { + case 0: + iUc(a, e); + break; + case 1: + gUc(a, e); + } + a.b[e.g] = 2; + } + } + for (d = Jsb(a.a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 188); + ze(c2.b.d, c2, true); + ze(c2.c.b, c2, true); + } + yNb(b, (mTc(), gTc), a.a); + } + function S6d(a, b) { + Q6d(); + var c2, d, e, f2; + if (!b) { + return P6d; + } else if (b == (Q8d(), N8d) || (b == v8d || b == t8d || b == u8d) && a != s8d) { + return new Z6d(a, b); + } else { + d = BD(b, 677); + c2 = d.pk(); + if (!c2) { + a2d(q1d((O6d(), M6d), b)); + c2 = d.pk(); + } + f2 = (!c2.i && (c2.i = new Lqb()), c2.i); + e = BD(Wd(irb(f2.f, a)), 1942); + !e && Rhb(f2, a, e = new Z6d(a, b)); + return e; + } + } + function Tbc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + i3 = BD(vNb(a, (wtc(), $sc)), 11); + j = l7c(OC(GC(m1, 1), nie, 8, 0, [i3.i.n, i3.n, i3.a])).a; + k = a.i.n.b; + c2 = k_b(a.e); + for (e = c2, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + RZb(d, i3); + Fsb(d.a, new f7c(j, k)); + if (b) { + h = BD(vNb(d, (Nyc(), jxc)), 74); + if (!h) { + h = new s7c(); + yNb(d, jxc, h); + } + Dsb(h, new f7c(j, k)); + } + } + } + function Ubc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + e = BD(vNb(a, (wtc(), $sc)), 11); + j = l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).a; + k = a.i.n.b; + c2 = k_b(a.g); + for (g = c2, h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + QZb(f2, e); + Esb(f2.a, new f7c(j, k)); + if (b) { + d = BD(vNb(f2, (Nyc(), jxc)), 74); + if (!d) { + d = new s7c(); + yNb(f2, jxc, d); + } + Dsb(d, new f7c(j, k)); + } + } + } + function TFc(a, b) { + var c2, d, e, f2, g, h; + a.b = new Rkb(); + a.d = BD(vNb(b, (wtc(), jtc)), 230); + a.e = Dub(a.d); + f2 = new Psb(); + e = Ou(OC(GC(KQ, 1), cne, 37, 0, [b])); + g = 0; + while (g < e.c.length) { + d = (tCb(g, e.c.length), BD(e.c[g], 37)); + d.p = g++; + c2 = new fFc(d, a.a, a.b); + Gkb(e, c2.b); + Ekb(a.b, c2); + c2.s && (h = Jsb(f2, 0), Vsb(h, c2)); + } + a.c = new Tqb(); + return f2; + } + function HJb(a, b) { + var c2, d, e, f2, g, h; + for (g = BD(BD(Qc(a.r, b), 21), 84).Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 111); + c2 = f2.c ? ZHb(f2.c) : 0; + if (c2 > 0) { + if (f2.a) { + h = f2.b.rf().a; + if (c2 > h) { + e = (c2 - h) / 2; + f2.d.b = e; + f2.d.c = e; + } + } else { + f2.d.c = a.s + c2; + } + } else if (tcd(a.u)) { + d = sfd(f2.b); + d.c < 0 && (f2.d.b = -d.c); + d.c + d.b > f2.b.rf().a && (f2.d.c = d.c + d.b - f2.b.rf().a); + } + } + } + function Eec(a, b) { + var c2, d, e, f2; + Odd(b, "Semi-Interactive Crossing Minimization Processor", 1); + c2 = false; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + f2 = TAb(VAb(JAb(JAb(new YAb(null, new Kub(d.a, 16)), new Jec()), new Lec()), new Nec()), new Rec()); + c2 = c2 | f2.a != null; + } + c2 && yNb(a, (wtc(), Rsc), (Bcb(), true)); + Qdd(b); + } + function sRc(a, b, c2) { + var d, e, f2, g, h; + e = c2; + !e && (e = new Zdd()); + Odd(e, "Layout", a.a.c.length); + if (Ccb(DD(vNb(b, (JTc(), vTc))))) { + Zfb(); + for (d = 0; d < a.a.c.length; d++) { + h = (d < 10 ? "0" : "") + d++; + " Slot " + h + ": " + hdb(rb(BD(Ikb(a.a, d), 51))); + } + } + for (g = new olb(a.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 51); + f2.pf(b, Udd(e, 1)); + } + Qdd(e); + } + function yMb(a) { + var b, c2; + b = BD(a.a, 19).a; + c2 = BD(a.b, 19).a; + if (b >= 0) { + if (b == c2) { + return new vgd(meb(-b - 1), meb(-b - 1)); + } + if (b == -c2) { + return new vgd(meb(-b), meb(c2 + 1)); + } + } + if ($wnd.Math.abs(b) > $wnd.Math.abs(c2)) { + if (b < 0) { + return new vgd(meb(-b), meb(c2)); + } + return new vgd(meb(-b), meb(c2 + 1)); + } + return new vgd(meb(b + 1), meb(c2)); + } + function q5b(a) { + var b, c2; + c2 = BD(vNb(a, (Nyc(), mxc)), 163); + b = BD(vNb(a, (wtc(), Osc)), 303); + if (c2 == (Ctc(), ytc)) { + yNb(a, mxc, Btc); + yNb(a, Osc, (esc(), dsc)); + } else if (c2 == Atc) { + yNb(a, mxc, Btc); + yNb(a, Osc, (esc(), bsc)); + } else if (b == (esc(), dsc)) { + yNb(a, mxc, ytc); + yNb(a, Osc, csc); + } else if (b == bsc) { + yNb(a, mxc, Atc); + yNb(a, Osc, csc); + } + } + function FNc() { + FNc = ccb; + DNc = new RNc(); + zNc = e3c(new j3c(), (qUb(), nUb), (S8b(), o8b)); + CNc = c3c(e3c(new j3c(), nUb, C8b), pUb, B8b); + ENc = b3c(b3c(g3c(c3c(e3c(new j3c(), lUb, M8b), pUb, L8b), oUb), K8b), N8b); + ANc = c3c(e3c(e3c(e3c(new j3c(), mUb, r8b), oUb, t8b), oUb, u8b), pUb, s8b); + BNc = c3c(e3c(e3c(new j3c(), oUb, u8b), oUb, _7b), pUb, $7b); + } + function hQc() { + hQc = ccb; + cQc = e3c(c3c(new j3c(), (qUb(), pUb), (S8b(), c8b)), nUb, o8b); + gQc = b3c(b3c(g3c(c3c(e3c(new j3c(), lUb, M8b), pUb, L8b), oUb), K8b), N8b); + dQc = c3c(e3c(e3c(e3c(new j3c(), mUb, r8b), oUb, t8b), oUb, u8b), pUb, s8b); + fQc = e3c(e3c(new j3c(), nUb, C8b), pUb, B8b); + eQc = c3c(e3c(e3c(new j3c(), oUb, u8b), oUb, _7b), pUb, $7b); + } + function GNc(a, b, c2, d, e) { + var f2, g; + if ((!OZb(b) && b.c.i.c == b.d.i.c || !T6c(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])), c2)) && !OZb(b)) { + b.c == e ? St(b.a, 0, new g7c(c2)) : Dsb(b.a, new g7c(c2)); + if (d && !Rqb(a.a, c2)) { + g = BD(vNb(b, (Nyc(), jxc)), 74); + if (!g) { + g = new s7c(); + yNb(b, jxc, g); + } + f2 = new g7c(c2); + Gsb(g, f2, g.c.b, g.c); + Qqb(a.a, f2); + } + } + } + function Qac(a) { + var b, c2; + for (c2 = new Sr(ur(R_b(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + if (b.c.i.k != (j0b(), f0b)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen.")); + } + } + } + function vjd(a, b, c2) { + var d, e, f2, g, h, i3, j; + e = aeb(a.Db & 254); + if (e == 0) { + a.Eb = c2; + } else { + if (e == 1) { + h = KC(SI, Uhe, 1, 2, 5, 1); + f2 = zjd(a, b); + if (f2 == 0) { + h[0] = c2; + h[1] = a.Eb; + } else { + h[0] = a.Eb; + h[1] = c2; + } + } else { + h = KC(SI, Uhe, 1, e + 1, 5, 1); + g = CD(a.Eb); + for (d = 2, i3 = 0, j = 0; d <= 128; d <<= 1) { + d == b ? h[j++] = c2 : (a.Db & d) != 0 && (h[j++] = g[i3++]); + } + } + a.Eb = h; + } + a.Db |= b; + } + function ENb(a, b, c2) { + var d, e, f2, g; + this.b = new Rkb(); + e = 0; + d = 0; + for (g = new olb(a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 167); + c2 && rMb(f2); + Ekb(this.b, f2); + e += f2.o; + d += f2.p; + } + if (this.b.c.length > 0) { + f2 = BD(Ikb(this.b, 0), 167); + e += f2.o; + d += f2.p; + } + e *= 2; + d *= 2; + b > 1 ? e = QD($wnd.Math.ceil(e * b)) : d = QD($wnd.Math.ceil(d / b)); + this.a = new pNb(e, d); + } + function Igc(a, b, c2, d, e, f2) { + var g, h, i3, j, k, l, m, n, o2, p, q, r; + k = d; + if (b.j && b.o) { + n = BD(Ohb(a.f, b.A), 57); + p = n.d.c + n.d.b; + --k; + } else { + p = b.a.c + b.a.b; + } + l = e; + if (c2.q && c2.o) { + n = BD(Ohb(a.f, c2.C), 57); + j = n.d.c; + ++l; + } else { + j = c2.a.c; + } + q = j - p; + i3 = $wnd.Math.max(2, l - k); + h = q / i3; + o2 = p + h; + for (m = k; m < l; ++m) { + g = BD(f2.Xb(m), 128); + r = g.a.b; + g.a.c = o2 - r / 2; + o2 += h; + } + } + function UHc(a, b, c2, d, e, f2) { + var g, h, i3, j, k, l; + j = c2.c.length; + f2 && (a.c = KC(WD, oje, 25, b.length, 15, 1)); + for (g = e ? 0 : b.length - 1; e ? g < b.length : g >= 0; g += e ? 1 : -1) { + h = b[g]; + i3 = d == (Ucd(), zcd) ? e ? V_b(h, d) : Su(V_b(h, d)) : e ? Su(V_b(h, d)) : V_b(h, d); + f2 && (a.c[h.p] = i3.gc()); + for (l = i3.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + a.d[k.p] = j++; + } + Gkb(c2, i3); + } + } + function aQc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + f2 = Edb(ED(a.b.Kc().Pb())); + j = Edb(ED(Pq(b.b))); + d = Y6c(R6c(a.a), j - c2); + e = Y6c(R6c(b.a), c2 - f2); + k = P6c(d, e); + Y6c(k, 1 / (j - f2)); + this.a = k; + this.b = new Rkb(); + h = true; + g = a.b.Kc(); + g.Pb(); + while (g.Ob()) { + i3 = Edb(ED(g.Pb())); + if (h && i3 - c2 > Oqe) { + this.b.Fc(c2); + h = false; + } + this.b.Fc(i3); + } + h && this.b.Fc(c2); + } + function vGb(a) { + var b, c2, d, e; + yGb(a, a.n); + if (a.d.c.length > 0) { + Blb(a.c); + while (GGb(a, BD(mlb(new olb(a.e.a)), 121)) < a.e.a.c.length) { + b = AGb(a); + e = b.e.e - b.d.e - b.a; + b.e.j && (e = -e); + for (d = new olb(a.e.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 121); + c2.j && (c2.e += e); + } + Blb(a.c); + } + Blb(a.c); + DGb(a, BD(mlb(new olb(a.e.a)), 121)); + rGb(a); + } + } + function rkc(a, b) { + var c2, d, e, f2, g; + for (e = BD(Qc(a.a, (Xjc(), Tjc)), 15).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 101); + c2 = BD(Ikb(d.j, 0), 113).d.j; + f2 = new Tkb(d.j); + Okb(f2, new Xkc()); + switch (b.g) { + case 1: + jkc(a, f2, c2, (Fkc(), Dkc), 1); + break; + case 0: + g = lkc(f2); + jkc(a, new Jib(f2, 0, g), c2, (Fkc(), Dkc), 0); + jkc(a, new Jib(f2, g, f2.c.length), c2, Dkc, 1); + } + } + } + function c2c(a, b) { + Y1c(); + var c2, d; + c2 = j4c(n4c(), b.tg()); + if (c2) { + d = c2.j; + if (JD(a, 239)) { + return Zod(BD(a, 33)) ? uqb(d, (N5c(), K5c)) || uqb(d, L5c) : uqb(d, (N5c(), K5c)); + } else if (JD(a, 352)) { + return uqb(d, (N5c(), I5c)); + } else if (JD(a, 186)) { + return uqb(d, (N5c(), M5c)); + } else if (JD(a, 354)) { + return uqb(d, (N5c(), J5c)); + } + } + return true; + } + function c3d(a, b, c2) { + var d, e, f2, g, h, i3; + e = c2; + f2 = e.ak(); + if (T6d(a.e, f2)) { + if (f2.hi()) { + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (pb(h, e) && g != b) { + throw vbb(new Wdb(kue)); + } + } + } + } else { + i3 = S6d(a.e.Tg(), f2); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + h = d[g]; + if (i3.rl(h.ak()) && g != b) { + throw vbb(new Wdb(Hwe)); + } + } + } + return BD(Gtd(a, b, c2), 72); + } + function Sy(d, b) { + if (b instanceof Object) { + try { + b.__java$exception = d; + if (navigator.userAgent.toLowerCase().indexOf("msie") != -1 && $doc.documentMode < 9) { + return; + } + var c2 = d; + Object.defineProperties(b, { cause: { get: function() { + var a = c2.Zd(); + return a && a.Xd(); + } }, suppressed: { get: function() { + return c2.Yd(); + } } }); + } catch (a) { + } + } + } + function lhb(a, b) { + var c2, d, e, f2, g; + d = b >> 5; + b &= 31; + if (d >= a.d) { + return a.e < 0 ? (Hgb(), Bgb) : (Hgb(), Ggb); + } + f2 = a.d - d; + e = KC(WD, oje, 25, f2 + 1, 15, 1); + mhb(e, f2, a.a, d, b); + if (a.e < 0) { + for (c2 = 0; c2 < d && a.a[c2] == 0; c2++) + ; + if (c2 < d || b > 0 && a.a[c2] << 32 - b != 0) { + for (c2 = 0; c2 < f2 && e[c2] == -1; c2++) { + e[c2] = 0; + } + c2 == f2 && ++f2; + ++e[c2]; + } + } + g = new Vgb(a.e, f2, e); + Jgb(g); + return g; + } + function UPb(a) { + var b, c2, d, e; + e = mpd(a); + c2 = new kQb(e); + d = new mQb(e); + b = new Rkb(); + Gkb(b, (!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); + Gkb(b, (!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); + return BD(GAb(NAb(JAb(new YAb(null, new Kub(b, 16)), c2), d), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + } + function p2d(a, b, c2, d) { + var e, f2, g, h, i3; + h = (Q6d(), BD(b, 66).Oj()); + if (T6d(a.e, b)) { + if (b.hi() && F2d(a, b, d, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + throw vbb(new Wdb(kue)); + } + } else { + i3 = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (i3.rl(f2.ak())) { + throw vbb(new Wdb(Hwe)); + } + } + } + vtd(a, I2d(a, b, c2), h ? BD(d, 72) : R6d(b, d)); + } + function T6d(a, b) { + Q6d(); + var c2, d, e; + if (b.$j()) { + return true; + } else if (b.Zj() == -2) { + if (b == (m8d(), k8d) || b == h8d || b == i8d || b == j8d) { + return true; + } else { + e = a.Tg(); + if (bLd(e, b) >= 0) { + return false; + } else { + c2 = e1d((O6d(), M6d), e, b); + if (!c2) { + return true; + } else { + d = c2.Zj(); + return (d > 1 || d == -1) && $1d(q1d(M6d, c2)) != 3; + } + } + } + } else { + return false; + } + } + function R1b(a, b, c2, d) { + var e, f2, g, h, i3; + h = atd(BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82)); + i3 = atd(BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82)); + if (Xod(h) == Xod(i3)) { + return null; + } + if (ntd(i3, h)) { + return null; + } + g = Mld(b); + if (g == c2) { + return d; + } else { + f2 = BD(Ohb(a.a, g), 10); + if (f2) { + e = f2.e; + if (e) { + return e; + } + } + } + return null; + } + function Cac(a, b) { + var c2; + c2 = BD(vNb(a, (Nyc(), Rwc)), 276); + Odd(b, "Label side selection (" + c2 + ")", 1); + switch (c2.g) { + case 0: + Dac(a, (rbd(), nbd)); + break; + case 1: + Dac(a, (rbd(), obd)); + break; + case 2: + Bac(a, (rbd(), nbd)); + break; + case 3: + Bac(a, (rbd(), obd)); + break; + case 4: + Eac(a, (rbd(), nbd)); + break; + case 5: + Eac(a, (rbd(), obd)); + } + Qdd(b); + } + function bGc(a, b, c2) { + var d, e, f2, g, h, i3; + d = RFc(c2, a.length); + g = a[d]; + if (g[0].k != (j0b(), e0b)) { + return; + } + f2 = SFc(c2, g.length); + i3 = b.j; + for (e = 0; e < i3.c.length; e++) { + h = (tCb(e, i3.c.length), BD(i3.c[e], 11)); + if ((c2 ? h.j == (Ucd(), zcd) : h.j == (Ucd(), Tcd)) && Ccb(DD(vNb(h, (wtc(), Nsc))))) { + Nkb(i3, e, BD(vNb(g[f2], (wtc(), $sc)), 11)); + f2 += c2 ? 1 : -1; + } + } + } + function rQc(a, b) { + var c2, d, e, f2, g; + g = new Rkb(); + c2 = b; + do { + f2 = BD(Ohb(a.b, c2), 128); + f2.B = c2.c; + f2.D = c2.d; + g.c[g.c.length] = f2; + c2 = BD(Ohb(a.k, c2), 17); + } while (c2); + d = (tCb(0, g.c.length), BD(g.c[0], 128)); + d.j = true; + d.A = BD(d.d.a.ec().Kc().Pb(), 17).c.i; + e = BD(Ikb(g, g.c.length - 1), 128); + e.q = true; + e.C = BD(e.d.a.ec().Kc().Pb(), 17).d.i; + return g; + } + function $wd(a) { + if (a.g == null) { + switch (a.p) { + case 0: + a.g = Swd(a) ? (Bcb(), Acb) : (Bcb(), zcb); + break; + case 1: + a.g = Scb(Twd(a)); + break; + case 2: + a.g = bdb(Uwd(a)); + break; + case 3: + a.g = Vwd(a); + break; + case 4: + a.g = new Ndb(Wwd(a)); + break; + case 6: + a.g = Aeb(Ywd(a)); + break; + case 5: + a.g = meb(Xwd(a)); + break; + case 7: + a.g = Web(Zwd(a)); + } + } + return a.g; + } + function hxd(a) { + if (a.n == null) { + switch (a.p) { + case 0: + a.n = _wd(a) ? (Bcb(), Acb) : (Bcb(), zcb); + break; + case 1: + a.n = Scb(axd(a)); + break; + case 2: + a.n = bdb(bxd(a)); + break; + case 3: + a.n = cxd(a); + break; + case 4: + a.n = new Ndb(dxd(a)); + break; + case 6: + a.n = Aeb(fxd(a)); + break; + case 5: + a.n = meb(exd(a)); + break; + case 7: + a.n = Web(gxd(a)); + } + } + return a.n; + } + function QDb(a) { + var b, c2, d, e, f2, g, h; + for (f2 = new olb(a.a.a); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 307); + d.g = 0; + d.i = 0; + d.e.a.$b(); + } + for (e = new olb(a.a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 307); + for (c2 = d.a.a.ec().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 57); + for (h = b.c.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 57); + if (g.a != d) { + Qqb(d.e, g); + ++g.a.g; + ++g.a.i; + } + } + } + } + } + function gOb(a, b) { + var c2, d, e, f2, g, h; + h = Axb(a.a, b.b); + if (!h) { + throw vbb(new Zdb("Invalid hitboxes for scanline overlap calculation.")); + } + g = false; + for (f2 = (d = new Ywb(new cxb(new Gjb(a.a.a).a).b), new Njb(d)); sib(f2.a.a); ) { + e = (c2 = Wwb(f2.a), BD(c2.cd(), 65)); + if (bOb(b.b, e)) { + T$c(a.b.a, b.b, e); + g = true; + } else { + if (g) { + break; + } + } + } + } + function G5b(a) { + var b, c2, d, e, f2; + e = BD(vNb(a, (Nyc(), Fxc)), 21); + f2 = BD(vNb(a, Ixc), 21); + c2 = new f7c(a.f.a + a.d.b + a.d.c, a.f.b + a.d.d + a.d.a); + b = new g7c(c2); + if (e.Hc((tdd(), pdd))) { + d = BD(vNb(a, Hxc), 8); + if (f2.Hc((Idd(), Bdd))) { + d.a <= 0 && (d.a = 20); + d.b <= 0 && (d.b = 20); + } + b.a = $wnd.Math.max(c2.a, d.a); + b.b = $wnd.Math.max(c2.b, d.b); + } + H5b(a, c2, b); + } + function toc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + e = b ? new Coc() : new Eoc(); + f2 = false; + do { + f2 = false; + j = b ? Su(a.b) : a.b; + for (i3 = j.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 29); + m = Mu(h.a); + b || new ov(m); + for (l = new olb(m); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + if (e.Mb(k)) { + d = k; + c2 = BD(vNb(k, (wtc(), usc)), 305); + g = b ? c2.b : c2.k; + f2 = roc(d, g, b, false); + } + } + } + } while (f2); + } + function WCc(a, b, c2) { + var d, e, f2, g, h; + Odd(c2, "Longest path layering", 1); + a.a = b; + h = a.a.a; + a.b = KC(WD, oje, 25, h.c.length, 15, 1); + d = 0; + for (g = new olb(h); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + e.p = d; + a.b[d] = -1; + ++d; + } + for (f2 = new olb(h); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + YCc(a, e); + } + h.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = null; + a.b = null; + Qdd(c2); + } + function QVb(a, b) { + var c2, d, e; + b.a ? (Axb(a.b, b.b), a.a[b.b.i] = BD(Exb(a.b, b.b), 81), c2 = BD(Dxb(a.b, b.b), 81), !!c2 && (a.a[c2.i] = b.b), void 0) : (d = BD(Exb(a.b, b.b), 81), !!d && d == a.a[b.b.i] && !!d.d && d.d != b.b.d && d.f.Fc(b.b), e = BD(Dxb(a.b, b.b), 81), !!e && a.a[e.i] == b.b && !!e.d && e.d != b.b.d && b.b.f.Fc(e), Fxb(a.b, b.b), void 0); + } + function zbc(a, b) { + var c2, d, e, f2, g, h; + f2 = a.d; + h = Edb(ED(vNb(a, (Nyc(), Zwc)))); + if (h < 0) { + h = 0; + yNb(a, Zwc, h); + } + b.o.b = h; + g = $wnd.Math.floor(h / 2); + d = new H0b(); + G0b(d, (Ucd(), Tcd)); + F0b(d, b); + d.n.b = g; + e = new H0b(); + G0b(e, zcd); + F0b(e, b); + e.n.b = g; + RZb(a, d); + c2 = new UZb(); + tNb(c2, a); + yNb(c2, jxc, null); + QZb(c2, e); + RZb(c2, f2); + ybc(b, a, c2); + wbc(a, c2); + return c2; + } + function uNc(a) { + var b, c2; + c2 = BD(vNb(a, (wtc(), Ksc)), 21); + b = new j3c(); + if (c2.Hc((Orc(), Irc))) { + d3c(b, oNc); + d3c(b, qNc); + } + if (c2.Hc(Krc) || Ccb(DD(vNb(a, (Nyc(), $wc))))) { + d3c(b, qNc); + c2.Hc(Lrc) && d3c(b, rNc); + } + c2.Hc(Hrc) && d3c(b, nNc); + c2.Hc(Nrc) && d3c(b, sNc); + c2.Hc(Jrc) && d3c(b, pNc); + c2.Hc(Erc) && d3c(b, lNc); + c2.Hc(Grc) && d3c(b, mNc); + return b; + } + function Ihb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + d = a.d; + f2 = b.d; + h = d + f2; + i3 = a.e != b.e ? -1 : 1; + if (h == 2) { + k = Ibb(xbb(a.a[0], Yje), xbb(b.a[0], Yje)); + m = Tbb(k); + l = Tbb(Pbb(k, 32)); + return l == 0 ? new Ugb(i3, m) : new Vgb(i3, 2, OC(GC(WD, 1), oje, 25, 15, [m, l])); + } + c2 = a.a; + e = b.a; + g = KC(WD, oje, 25, h, 15, 1); + Fhb(c2, d, e, f2, g); + j = new Vgb(i3, h, g); + Jgb(j); + return j; + } + function Gwb(a, b, c2, d) { + var e, f2; + if (!b) { + return c2; + } else { + e = a.a.ue(c2.d, b.d); + if (e == 0) { + d.d = ijb(b, c2.e); + d.b = true; + return b; + } + f2 = e < 0 ? 0 : 1; + b.a[f2] = Gwb(a, b.a[f2], c2, d); + if (Hwb(b.a[f2])) { + if (Hwb(b.a[1 - f2])) { + b.b = true; + b.a[0].b = false; + b.a[1].b = false; + } else { + Hwb(b.a[f2].a[f2]) ? b = Owb(b, 1 - f2) : Hwb(b.a[f2].a[1 - f2]) && (b = Nwb(b, 1 - f2)); + } + } + } + return b; + } + function wHb(a, b, c2) { + var d, e, f2, g; + e = a.i; + d = a.n; + vHb(a, (gHb(), dHb), e.c + d.b, c2); + vHb(a, fHb, e.c + e.b - d.c - c2[2], c2); + g = e.b - d.b - d.c; + if (c2[0] > 0) { + c2[0] += a.d; + g -= c2[0]; + } + if (c2[2] > 0) { + c2[2] += a.d; + g -= c2[2]; + } + f2 = $wnd.Math.max(0, g); + c2[1] = $wnd.Math.max(c2[1], g); + vHb(a, eHb, e.c + d.b + c2[0] - (c2[1] - g) / 2, c2); + if (b == eHb) { + a.c.b = f2; + a.c.c = e.c + d.b + (f2 - g) / 2; + } + } + function AYb() { + this.c = KC(UD, Vje, 25, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 15, 1); + this.b = KC(UD, Vje, 25, OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]).length, 15, 1); + this.a = KC(UD, Vje, 25, OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]).length, 15, 1); + zlb(this.c, Pje); + zlb(this.b, Qje); + zlb(this.a, Qje); + } + function Ufe(a, b, c2) { + var d, e, f2, g; + if (b <= c2) { + e = b; + f2 = c2; + } else { + e = c2; + f2 = b; + } + d = 0; + if (a.b == null) { + a.b = KC(WD, oje, 25, 2, 15, 1); + a.b[0] = e; + a.b[1] = f2; + a.c = true; + } else { + d = a.b.length; + if (a.b[d - 1] + 1 == e) { + a.b[d - 1] = f2; + return; + } + g = KC(WD, oje, 25, d + 2, 15, 1); + $fb(a.b, 0, g, 0, d); + a.b = g; + a.b[d - 1] >= e && (a.c = false, a.a = false); + a.b[d++] = e; + a.b[d] = f2; + a.c || Yfe(a); + } + } + function inc(a, b, c2) { + var d, e, f2, g, h, i3, j; + j = b.d; + a.a = new Skb(j.c.length); + a.c = new Lqb(); + for (h = new olb(j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f2 = new uOc(null); + Ekb(a.a, f2); + Rhb(a.c, g, f2); + } + a.b = new Lqb(); + gnc(a, b); + for (d = 0; d < j.c.length - 1; d++) { + i3 = BD(Ikb(b.d, d), 101); + for (e = d + 1; e < j.c.length; e++) { + jnc(a, i3, BD(Ikb(b.d, e), 101), c2); + } + } + } + function ySc(a, b, c2) { + var d, e, f2, g, h, i3; + if (!Qq(b)) { + i3 = Udd(c2, (JD(b, 14) ? BD(b, 14).gc() : sr(b.Kc())) / a.a | 0); + Odd(i3, Xqe, 1); + h = new BSc(); + g = 0; + for (f2 = b.Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 86); + h = pl(OC(GC(KI, 1), Uhe, 20, 0, [h, new ZRc(d)])); + g < d.f.b && (g = d.f.b); + } + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 86); + yNb(d, (mTc(), bTc), g); + } + Qdd(i3); + ySc(a, h, c2); + } + } + function bJc(a, b) { + var c2, d, e, f2, g, h, i3; + c2 = Qje; + h = (j0b(), h0b); + for (e = new olb(b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + f2 = d.k; + if (f2 != h0b) { + g = ED(vNb(d, (wtc(), atc))); + if (g == null) { + c2 = $wnd.Math.max(c2, 0); + d.n.b = c2 + iBc(a.a, f2, h); + } else { + d.n.b = (uCb(g), g); + } + } + i3 = iBc(a.a, f2, h); + d.n.b < c2 + i3 + d.d.d && (d.n.b = c2 + i3 + d.d.d); + c2 = d.n.b + d.o.b + d.d.a; + h = f2; + } + } + function uQb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + f2 = itd(b, false, false); + j = ofd(f2); + l = Edb(ED(hkd(b, (CPb(), vPb)))); + e = sQb(j, l + a.a); + k = new XOb(e); + tNb(k, b); + Rhb(a.b, b, k); + c2.c[c2.c.length] = k; + i3 = (!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n); + for (h = new Fyd(i3); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 137); + d = wQb(a, g, true, 0, 0); + c2.c[c2.c.length] = d; + } + return k; + } + function JVc(a, b, c2, d, e) { + var f2, g, h, i3, j, k; + !!a.d && a.d.lg(e); + f2 = BD(e.Xb(0), 33); + if (HVc(a, c2, f2, false)) { + return true; + } + g = BD(e.Xb(e.gc() - 1), 33); + if (HVc(a, d, g, true)) { + return true; + } + if (CVc(a, e)) { + return true; + } + for (k = e.Kc(); k.Ob(); ) { + j = BD(k.Pb(), 33); + for (i3 = b.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 33); + if (BVc(a, j, h)) { + return true; + } + } + } + return false; + } + function qid(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + m = b.c.length; + l = (j = a.Yg(c2), BD(j >= 0 ? a._g(j, false, true) : sid(a, c2, false), 58)); + n: + for (f2 = l.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 56); + for (k = 0; k < m; ++k) { + g = (tCb(k, b.c.length), BD(b.c[k], 72)); + i3 = g.dd(); + h = g.ak(); + d = e.bh(h, false); + if (i3 == null ? d != null : !pb(i3, d)) { + continue n; + } + } + return e; + } + return null; + } + function V6b(a, b, c2, d) { + var e, f2, g, h; + e = BD(Y_b(b, (Ucd(), Tcd)).Kc().Pb(), 11); + f2 = BD(Y_b(b, zcd).Kc().Pb(), 11); + for (h = new olb(a.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + while (g.e.c.length != 0) { + RZb(BD(Ikb(g.e, 0), 17), e); + } + while (g.g.c.length != 0) { + QZb(BD(Ikb(g.g, 0), 17), f2); + } + } + c2 || yNb(b, (wtc(), Vsc), null); + d || yNb(b, (wtc(), Wsc), null); + } + function itd(a, b, c2) { + var d, e; + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i == 0) { + return etd(a); + } else { + d = BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202); + if (b) { + Uxd((!d.a && (d.a = new xMd(y2, d, 5)), d.a)); + omd(d, 0); + pmd(d, 0); + hmd(d, 0); + imd(d, 0); + } + if (c2) { + e = (!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a); + while (e.i > 1) { + Xxd(e, e.i - 1); + } + } + return d; + } + } + function Z2b(a, b) { + var c2, d, e, f2, g, h, i3; + Odd(b, "Comment post-processing", 1); + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + d = new Rkb(); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + i3 = BD(vNb(g, (wtc(), vtc)), 15); + c2 = BD(vNb(g, tsc), 15); + if (!!i3 || !!c2) { + $2b(g, i3, c2); + !!i3 && Gkb(d, i3); + !!c2 && Gkb(d, c2); + } + } + Gkb(e.a, d); + } + Qdd(b); + } + function Eac(a, b) { + var c2, d, e, f2, g, h, i3; + c2 = new jkb(); + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + i3 = true; + d = 0; + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + switch (g.k.g) { + case 4: + ++d; + case 1: + Xjb(c2, g); + break; + case 0: + Gac(g, b); + default: + c2.b == c2.c || Fac(c2, d, i3, false, b); + i3 = false; + d = 0; + } + } + c2.b == c2.c || Fac(c2, d, i3, true, b); + } + } + function Ebc(a, b) { + var c2, d, e, f2, g, h, i3; + e = new Rkb(); + for (c2 = 0; c2 <= a.i; c2++) { + d = new H1b(b); + d.p = a.i - c2; + e.c[e.c.length] = d; + } + for (h = new olb(a.o); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + $_b(g, BD(Ikb(e, a.i - a.f[g.p]), 29)); + } + f2 = new olb(e); + while (f2.a < f2.c.c.length) { + i3 = BD(mlb(f2), 29); + i3.a.c.length == 0 && nlb(f2); + } + b.b.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(b.b, e); + } + function KHc(a, b) { + var c2, d, e, f2, g, h; + c2 = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + AHc(a.b, a.d[g.p]); + for (e = new b1b(g.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + f2 = aIc(a, g == d.c ? d.d : d.c); + if (f2 > a.d[g.p]) { + c2 += zHc(a.b, f2); + Wjb(a.a, meb(f2)); + } + } + while (!akb(a.a)) { + xHc(a.b, BD(fkb(a.a), 19).a); + } + } + return c2; + } + function o2c(a, b, c2) { + var d, e, f2, g; + f2 = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i; + for (e = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + (!d.a && (d.a = new cUd(E2, d, 10, 11)), d.a).i == 0 || (f2 += o2c(a, d, false)); + } + if (c2) { + g = Xod(b); + while (g) { + f2 += (!g.a && (g.a = new cUd(E2, g, 10, 11)), g.a).i; + g = Xod(g); + } + } + return f2; + } + function Xxd(a, b) { + var c2, d, e, f2; + if (a.ej()) { + d = null; + e = a.fj(); + a.ij() && (d = a.kj(a.pi(b), null)); + c2 = a.Zi(4, f2 = tud(a, b), null, b, e); + if (a.bj() && f2 != null) { + d = a.dj(f2, d); + if (!d) { + a.$i(c2); + } else { + d.Ei(c2); + d.Fi(); + } + } else { + if (!d) { + a.$i(c2); + } else { + d.Ei(c2); + d.Fi(); + } + } + return f2; + } else { + f2 = tud(a, b); + if (a.bj() && f2 != null) { + d = a.dj(f2, null); + !!d && d.Fi(); + } + return f2; + } + } + function UKb(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + j = a.a; + b = new Tqb(); + i3 = 0; + for (d = new olb(a.d); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 222); + k = 0; + ktb(c2.b, new XKb()); + for (g = Jsb(c2.b, 0); g.b != g.d.c; ) { + f2 = BD(Xsb(g), 222); + if (b.a._b(f2)) { + e = c2.c; + h = f2.c; + k < h.d + h.a + j && k + e.a + j > h.d && (k = h.d + h.a + j); + } + } + c2.c.d = k; + b.a.zc(c2, b); + i3 = $wnd.Math.max(i3, c2.c.d + c2.c.a); + } + return i3; + } + function Orc() { + Orc = ccb; + Frc = new Prc("COMMENTS", 0); + Hrc = new Prc("EXTERNAL_PORTS", 1); + Irc = new Prc("HYPEREDGES", 2); + Jrc = new Prc("HYPERNODES", 3); + Krc = new Prc("NON_FREE_PORTS", 4); + Lrc = new Prc("NORTH_SOUTH_PORTS", 5); + Nrc = new Prc(Wne, 6); + Erc = new Prc("CENTER_LABELS", 7); + Grc = new Prc("END_LABELS", 8); + Mrc = new Prc("PARTITIONS", 9); + } + function gVc(a) { + var b, c2, d, e, f2; + e = new Rkb(); + b = new Vqb((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); + for (d = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 79); + if (!JD(qud((!c2.b && (c2.b = new y5d(z2, c2, 4, 7)), c2.b), 0), 186)) { + f2 = atd(BD(qud((!c2.c && (c2.c = new y5d(z2, c2, 5, 8)), c2.c), 0), 82)); + b.a._b(f2) || (e.c[e.c.length] = f2, true); + } + } + return e; + } + function fVc(a) { + var b, c2, d, e, f2, g; + f2 = new Tqb(); + b = new Vqb((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); + for (e = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 79); + if (!JD(qud((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b), 0), 186)) { + g = atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82)); + b.a._b(g) || (c2 = f2.a.zc(g, f2), c2 == null); + } + } + return f2; + } + function zA(a, b, c2, d, e) { + if (d < 0) { + d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje]), b); + d < 0 && (d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]), b)); + if (d < 0) { + return false; + } + c2.k = d; + return true; + } else if (d > 0) { + c2.k = d - 1; + return true; + } + return false; + } + function BA(a, b, c2, d, e) { + if (d < 0) { + d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje]), b); + d < 0 && (d = oA(a, e, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]), b)); + if (d < 0) { + return false; + } + c2.k = d; + return true; + } else if (d > 0) { + c2.k = d - 1; + return true; + } + return false; + } + function DA(a, b, c2, d, e, f2) { + var g, h, i3, j; + h = 32; + if (d < 0) { + if (b[0] >= a.length) { + return false; + } + h = bfb(a, b[0]); + if (h != 43 && h != 45) { + return false; + } + ++b[0]; + d = rA(a, b); + if (d < 0) { + return false; + } + h == 45 && (d = -d); + } + if (h == 32 && b[0] - c2 == 2 && e.b == 2) { + i3 = new eB(); + j = i3.q.getFullYear() - nje + nje - 80; + g = j % 100; + f2.a = d == g; + d += (j / 100 | 0) * 100 + (d < g ? 100 : 0); + } + f2.p = d; + return true; + } + function L1b(a, b) { + var c2, d, e, f2, g; + if (!Xod(a)) { + return; + } + g = BD(vNb(b, (Nyc(), Fxc)), 174); + PD(hkd(a, Vxc)) === PD((dcd(), ccd)) && jkd(a, Vxc, bcd); + d = (Pgd(), new bhd(Xod(a))); + f2 = new hhd(!Xod(a) ? null : new bhd(Xod(a)), a); + e = PGb(d, f2, false, true); + rqb(g, (tdd(), pdd)); + c2 = BD(vNb(b, Hxc), 8); + c2.a = $wnd.Math.max(e.a, c2.a); + c2.b = $wnd.Math.max(e.b, c2.b); + } + function Pac(a, b, c2) { + var d, e, f2, g, h, i3; + for (g = BD(vNb(a, (wtc(), Lsc)), 15).Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 10); + switch (BD(vNb(f2, (Nyc(), mxc)), 163).g) { + case 2: + $_b(f2, b); + break; + case 4: + $_b(f2, c2); + } + for (e = new Sr(ur(O_b(f2).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (!!d.c && !!d.d) { + continue; + } + h = !d.d; + i3 = BD(vNb(d, ctc), 11); + h ? RZb(d, i3) : QZb(d, i3); + } + } + } + function Alc() { + Alc = ccb; + tlc = new Blc(xle, 0, (Ucd(), Acd), Acd); + wlc = new Blc(zle, 1, Rcd, Rcd); + slc = new Blc(yle, 2, zcd, zcd); + zlc = new Blc(Ale, 3, Tcd, Tcd); + vlc = new Blc("NORTH_WEST_CORNER", 4, Tcd, Acd); + ulc = new Blc("NORTH_EAST_CORNER", 5, Acd, zcd); + ylc = new Blc("SOUTH_WEST_CORNER", 6, Rcd, Tcd); + xlc = new Blc("SOUTH_EAST_CORNER", 7, zcd, Rcd); + } + function i6c() { + i6c = ccb; + h6c = OC(GC(XD, 1), Sje, 25, 14, [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368e3, { l: 3506176, m: 794077, h: 1 }, { l: 884736, m: 916411, h: 20 }, { l: 3342336, m: 3912489, h: 363 }, { l: 589824, m: 3034138, h: 6914 }, { l: 3407872, m: 1962506, h: 138294 }]); + $wnd.Math.pow(2, -65); + } + function Pcc(a, b) { + var c2, d, e, f2, g; + if (a.c.length == 0) { + return new vgd(meb(0), meb(0)); + } + c2 = (tCb(0, a.c.length), BD(a.c[0], 11)).j; + g = 0; + f2 = b.g; + d = b.g + 1; + while (g < a.c.length - 1 && c2.g < f2) { + ++g; + c2 = (tCb(g, a.c.length), BD(a.c[g], 11)).j; + } + e = g; + while (e < a.c.length - 1 && c2.g < d) { + ++e; + c2 = (tCb(g, a.c.length), BD(a.c[g], 11)).j; + } + return new vgd(meb(g), meb(e)); + } + function R9b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + f2 = b.c.length; + g = (tCb(c2, b.c.length), BD(b.c[c2], 286)); + h = g.a.o.a; + l = g.c; + m = 0; + for (j = g.c; j <= g.f; j++) { + if (h <= a.a[j]) { + return j; + } + k = a.a[j]; + i3 = null; + for (e = c2 + 1; e < f2; e++) { + d = (tCb(e, b.c.length), BD(b.c[e], 286)); + d.c <= j && d.f >= j && (i3 = d); + } + !!i3 && (k = $wnd.Math.max(k, i3.a.o.a)); + if (k > m) { + l = j; + m = k; + } + } + return l; + } + function ode(a, b, c2) { + var d, e, f2; + a.e = c2; + a.d = 0; + a.b = 0; + a.f = 1; + a.i = b; + (a.e & 16) == 16 && (a.i = Xee(a.i)); + a.j = a.i.length; + nde(a); + f2 = rde(a); + if (a.d != a.j) + throw vbb(new mde(tvd((h0d(), sue)))); + if (a.g) { + for (d = 0; d < a.g.a.c.length; d++) { + e = BD(Uvb(a.g, d), 584); + if (a.f <= e.a) + throw vbb(new mde(tvd((h0d(), tue)))); + } + a.g.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + return f2; + } + function _Pd(a, b) { + var c2, d, e; + if (b == null) { + for (d = (!a.a && (a.a = new cUd(g5, a, 9, 5)), new Fyd(a.a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 678); + e = c2.c; + if ((e == null ? c2.zb : e) == null) { + return c2; + } + } + } else { + for (d = (!a.a && (a.a = new cUd(g5, a, 9, 5)), new Fyd(a.a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 678); + if (dfb(b, (e = c2.c, e == null ? c2.zb : e))) { + return c2; + } + } + } + return null; + } + function KIb(a, b) { + var c2; + c2 = null; + switch (b.g) { + case 1: + a.e.Xe((Y9c(), o9c)) && (c2 = BD(a.e.We(o9c), 249)); + break; + case 3: + a.e.Xe((Y9c(), p9c)) && (c2 = BD(a.e.We(p9c), 249)); + break; + case 2: + a.e.Xe((Y9c(), n9c)) && (c2 = BD(a.e.We(n9c), 249)); + break; + case 4: + a.e.Xe((Y9c(), q9c)) && (c2 = BD(a.e.We(q9c), 249)); + } + !c2 && (c2 = BD(a.e.We((Y9c(), l9c)), 249)); + return c2; + } + function OCc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + b.p = 1; + f2 = b.c; + for (l = W_b(b, (KAc(), IAc)).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + for (e = new olb(k.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + j = d.d.i; + if (b != j) { + g = j.c; + if (g.p <= f2.p) { + h = f2.p + 1; + if (h == c2.b.c.length) { + i3 = new H1b(c2); + i3.p = h; + Ekb(c2.b, i3); + $_b(j, i3); + } else { + i3 = BD(Ikb(c2.b, h), 29); + $_b(j, i3); + } + OCc(a, j, c2); + } + } + } + } + } + function ZXc(a, b, c2) { + var d, e, f2, g, h, i3; + e = c2; + f2 = 0; + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 33); + jkd(g, (ZWc(), SWc), meb(e++)); + i3 = gVc(g); + d = $wnd.Math.atan2(g.j + g.f / 2, g.i + g.g / 2); + d += d < 0 ? dre : 0; + d < 0.7853981633974483 || d > vre ? Okb(i3, a.b) : d <= vre && d > wre ? Okb(i3, a.d) : d <= wre && d > xre ? Okb(i3, a.c) : d <= xre && Okb(i3, a.a); + f2 = ZXc(a, i3, f2); + } + return e; + } + function Hgb() { + Hgb = ccb; + var a; + Cgb = new Ugb(1, 1); + Egb = new Ugb(1, 10); + Ggb = new Ugb(0, 0); + Bgb = new Ugb(-1, 1); + Dgb = OC(GC(cJ, 1), nie, 91, 0, [Ggb, Cgb, new Ugb(1, 2), new Ugb(1, 3), new Ugb(1, 4), new Ugb(1, 5), new Ugb(1, 6), new Ugb(1, 7), new Ugb(1, 8), new Ugb(1, 9), Egb]); + Fgb = KC(cJ, nie, 91, 32, 0, 1); + for (a = 0; a < Fgb.length; a++) { + Fgb[a] = ghb(Nbb(1, a)); + } + } + function B9b(a, b, c2, d, e, f2) { + var g, h, i3, j; + h = !WAb(JAb(a.Oc(), new Xxb(new F9b()))).sd((EAb(), DAb)); + g = a; + f2 == (ead(), dad) && (g = JD(g, 152) ? km(BD(g, 152)) : JD(g, 131) ? BD(g, 131).a : JD(g, 54) ? new ov(g) : new dv(g)); + for (j = g.Kc(); j.Ob(); ) { + i3 = BD(j.Pb(), 70); + i3.n.a = b.a; + h ? i3.n.b = b.b + (d.b - i3.o.b) / 2 : e ? i3.n.b = b.b : i3.n.b = b.b + d.b - i3.o.b; + b.a += i3.o.a + c2; + } + } + function UOc(a, b, c2, d) { + var e, f2, g, h, i3, j; + e = (d.c + d.a) / 2; + Osb(b.j); + Dsb(b.j, e); + Osb(c2.e); + Dsb(c2.e, e); + j = new aPc(); + for (h = new olb(a.f); h.a < h.c.c.length; ) { + f2 = BD(mlb(h), 129); + i3 = f2.a; + WOc(j, b, i3); + WOc(j, c2, i3); + } + for (g = new olb(a.k); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 129); + i3 = f2.b; + WOc(j, b, i3); + WOc(j, c2, i3); + } + j.b += 2; + j.a += POc(b, a.q); + j.a += POc(a.q, c2); + return j; + } + function FSc(a, b, c2) { + var d, e, f2, g, h; + if (!Qq(b)) { + h = Udd(c2, (JD(b, 14) ? BD(b, 14).gc() : sr(b.Kc())) / a.a | 0); + Odd(h, Xqe, 1); + g = new ISc(); + f2 = null; + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 86); + g = pl(OC(GC(KI, 1), Uhe, 20, 0, [g, new ZRc(d)])); + if (f2) { + yNb(f2, (mTc(), hTc), d); + yNb(d, _Sc, f2); + if (VRc(d) == VRc(f2)) { + yNb(f2, iTc, d); + yNb(d, aTc, f2); + } + } + f2 = d; + } + Qdd(h); + FSc(a, g, c2); + } + } + function VHb(a) { + var b, c2, d, e, f2, g, h; + c2 = a.i; + b = a.n; + h = c2.d; + a.f == (EIb(), CIb) ? h += (c2.a - a.e.b) / 2 : a.f == BIb && (h += c2.a - a.e.b); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + g = d.rf(); + f2 = new d7c(); + f2.b = h; + h += g.b + a.a; + switch (a.b.g) { + case 0: + f2.a = c2.c + b.b; + break; + case 1: + f2.a = c2.c + b.b + (c2.b - g.a) / 2; + break; + case 2: + f2.a = c2.c + c2.b - b.c - g.a; + } + d.tf(f2); + } + } + function XHb(a) { + var b, c2, d, e, f2, g, h; + c2 = a.i; + b = a.n; + h = c2.c; + a.b == (NHb(), KHb) ? h += (c2.b - a.e.a) / 2 : a.b == MHb && (h += c2.b - a.e.a); + for (e = new olb(a.d); e.a < e.c.c.length; ) { + d = BD(mlb(e), 181); + g = d.rf(); + f2 = new d7c(); + f2.a = h; + h += g.a + a.a; + switch (a.f.g) { + case 0: + f2.b = c2.d + b.d; + break; + case 1: + f2.b = c2.d + b.d + (c2.a - g.b) / 2; + break; + case 2: + f2.b = c2.d + c2.a - b.a - g.b; + } + d.tf(f2); + } + } + function D4b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2; + k = c2.a.c; + g = c2.a.c + c2.a.b; + f2 = BD(Ohb(c2.c, b), 459); + n = f2.f; + o2 = f2.a; + i3 = new f7c(k, n); + l = new f7c(g, o2); + e = k; + c2.p || (e += a.c); + e += c2.F + c2.v * a.b; + j = new f7c(e, n); + m = new f7c(e, o2); + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [i3, j])); + h = c2.d.a.gc() > 1; + if (h) { + d = new f7c(e, c2.b); + Dsb(b.a, d); + } + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [m, l])); + } + function jdd(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Rse), "ELK Randomizer"), 'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'), new mdd()))); + p4c(a, Rse, ame, fdd); + p4c(a, Rse, wme, 15); + p4c(a, Rse, yme, meb(0)); + p4c(a, Rse, _le, tme); + } + function hde() { + hde = ccb; + var a, b, c2, d, e, f2; + fde = KC(SD, wte, 25, 255, 15, 1); + gde = KC(TD, $ie, 25, 16, 15, 1); + for (b = 0; b < 255; b++) { + fde[b] = -1; + } + for (c2 = 57; c2 >= 48; c2--) { + fde[c2] = c2 - 48 << 24 >> 24; + } + for (d = 70; d >= 65; d--) { + fde[d] = d - 65 + 10 << 24 >> 24; + } + for (e = 102; e >= 97; e--) { + fde[e] = e - 97 + 10 << 24 >> 24; + } + for (f2 = 0; f2 < 10; f2++) + gde[f2] = 48 + f2 & aje; + for (a = 10; a <= 15; a++) + gde[a] = 65 + a - 10 & aje; + } + function BVc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + h = b.i - a.g / 2; + i3 = c2.i - a.g / 2; + j = b.j - a.g / 2; + k = c2.j - a.g / 2; + f2 = b.g + a.g / 2; + g = c2.g + a.g / 2; + d = b.f + a.g / 2; + e = c2.f + a.g / 2; + if (h < i3 + g && i3 < h && j < k + e && k < j) { + return true; + } else if (i3 < h + f2 && h < i3 && k < j + d && j < k) { + return true; + } else if (h < i3 + g && i3 < h && j < k && k < j + d) { + return true; + } else if (i3 < h + f2 && h < i3 && j < k + e && k < j) { + return true; + } + return false; + } + function NTb(a) { + var b, c2, d, e, f2; + e = BD(vNb(a, (Nyc(), Fxc)), 21); + f2 = BD(vNb(a, Ixc), 21); + c2 = new f7c(a.f.a + a.d.b + a.d.c, a.f.b + a.d.d + a.d.a); + b = new g7c(c2); + if (e.Hc((tdd(), pdd))) { + d = BD(vNb(a, Hxc), 8); + if (f2.Hc((Idd(), Bdd))) { + d.a <= 0 && (d.a = 20); + d.b <= 0 && (d.b = 20); + } + b.a = $wnd.Math.max(c2.a, d.a); + b.b = $wnd.Math.max(c2.b, d.b); + } + Ccb(DD(vNb(a, Gxc))) || OTb(a, c2, b); + } + function NJc(a, b) { + var c2, d, e, f2; + for (f2 = V_b(b, (Ucd(), Rcd)).Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 11); + c2 = BD(vNb(d, (wtc(), gtc)), 10); + !!c2 && AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 0.1), a.i[b.p].d), a.i[c2.p].a)); + } + for (e = V_b(b, Acd).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 11); + c2 = BD(vNb(d, (wtc(), gtc)), 10); + !!c2 && AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 0.1), a.i[c2.p].d), a.i[b.p].a)); + } + } + function QKd(a) { + var b, c2, d, e, f2, g; + if (!a.c) { + g = new wNd(); + b = KKd; + f2 = b.a.zc(a, b); + if (f2 == null) { + for (d = new Fyd(VKd(a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 87); + e = KQd(c2); + JD(e, 88) && ytd(g, QKd(BD(e, 26))); + wtd(g, c2); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + tNd(g); + vud(g); + a.c = new nNd((BD(qud(ZKd((NFd(), MFd).o), 15), 18), g.i), g.g); + $Kd(a).b &= -33; + } + return a.c; + } + function eee(a) { + var b; + if (a.c != 10) + throw vbb(new mde(tvd((h0d(), uue)))); + b = a.a; + switch (b) { + case 110: + b = 10; + break; + case 114: + b = 13; + break; + case 116: + b = 9; + break; + case 92: + case 124: + case 46: + case 94: + case 45: + case 63: + case 42: + case 43: + case 123: + case 125: + case 40: + case 41: + case 91: + case 93: + break; + default: + throw vbb(new mde(tvd((h0d(), Yue)))); + } + return b; + } + function qD(a) { + var b, c2, d, e, f2; + if (a.l == 0 && a.m == 0 && a.h == 0) { + return "0"; + } + if (a.h == Gje && a.m == 0 && a.l == 0) { + return "-9223372036854775808"; + } + if (a.h >> 19 != 0) { + return "-" + qD(hD(a)); + } + c2 = a; + d = ""; + while (!(c2.l == 0 && c2.m == 0 && c2.h == 0)) { + e = RC(Jje); + c2 = UC(c2, e, true); + b = "" + pD(QC); + if (!(c2.l == 0 && c2.m == 0 && c2.h == 0)) { + f2 = 9 - b.length; + for (; f2 > 0; f2--) { + b = "0" + b; + } + } + d = b + d; + } + return d; + } + function xrb() { + if (!Object.create || !Object.getOwnPropertyNames) { + return false; + } + var a = "__proto__"; + var b = /* @__PURE__ */ Object.create(null); + if (b[a] !== void 0) { + return false; + } + var c2 = Object.getOwnPropertyNames(b); + if (c2.length != 0) { + return false; + } + b[a] = 42; + if (b[a] !== 42) { + return false; + } + if (Object.getOwnPropertyNames(b).length == 0) { + return false; + } + return true; + } + function Pgc(a) { + var b, c2, d, e, f2, g, h; + b = false; + c2 = 0; + for (e = new olb(a.d.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + d.p = c2++; + for (g = new olb(d.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + !b && !Qq(O_b(f2)) && (b = true); + } + } + h = qqb((ead(), cad), OC(GC(t12, 1), Kie, 103, 0, [aad, bad])); + if (!b) { + rqb(h, dad); + rqb(h, _9c); + } + a.a = new mDb(h); + Uhb(a.f); + Uhb(a.b); + Uhb(a.e); + Uhb(a.g); + } + function _Xb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + d = c2.c; + e = c2.d; + h = A0b(b.c); + i3 = A0b(b.d); + if (d == b.c) { + h = aYb(a, h, e); + i3 = bYb(b.d); + } else { + h = bYb(b.c); + i3 = aYb(a, i3, e); + } + j = new t7c(b.a); + Gsb(j, h, j.a, j.a.a); + Gsb(j, i3, j.c.b, j.c); + g = b.c == d; + l = new BYb(); + for (f2 = 0; f2 < j.b - 1; ++f2) { + k = new vgd(BD(Ut(j, f2), 8), BD(Ut(j, f2 + 1), 8)); + g && f2 == 0 || !g && f2 == j.b - 2 ? l.b = k : Ekb(l.a, k); + } + return l; + } + function O$b(a, b) { + var c2, d, e, f2; + f2 = a.j.g - b.j.g; + if (f2 != 0) { + return f2; + } + c2 = BD(vNb(a, (Nyc(), Wxc)), 19); + d = BD(vNb(b, Wxc), 19); + if (!!c2 && !!d) { + e = c2.a - d.a; + if (e != 0) { + return e; + } + } + switch (a.j.g) { + case 1: + return Kdb(a.n.a, b.n.a); + case 2: + return Kdb(a.n.b, b.n.b); + case 3: + return Kdb(b.n.a, a.n.a); + case 4: + return Kdb(b.n.b, a.n.b); + default: + throw vbb(new Zdb(ine)); + } + } + function G6b(a, b, c2, d) { + var e, f2, g, h, i3; + if (sr((D6b(), new Sr(ur(O_b(b).a.Kc(), new Sq())))) >= a.a) { + return -1; + } + if (!F6b(b, c2)) { + return -1; + } + if (Qq(BD(d.Kb(b), 20))) { + return 1; + } + e = 0; + for (g = BD(d.Kb(b), 20).Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 17); + i3 = f2.c.i == b ? f2.d.i : f2.c.i; + h = G6b(a, i3, c2, d); + if (h == -1) { + return -1; + } + e = $wnd.Math.max(e, h); + if (e > a.c - 1) { + return -1; + } + } + return e + 1; + } + function Btd(a, b) { + var c2, d, e, f2, g, h; + if (PD(b) === PD(a)) { + return true; + } + if (!JD(b, 15)) { + return false; + } + d = BD(b, 15); + h = a.gc(); + if (d.gc() != h) { + return false; + } + g = d.Kc(); + if (a.ni()) { + for (c2 = 0; c2 < h; ++c2) { + e = a.ki(c2); + f2 = g.Pb(); + if (e == null ? f2 != null : !pb(e, f2)) { + return false; + } + } + } else { + for (c2 = 0; c2 < h; ++c2) { + e = a.ki(c2); + f2 = g.Pb(); + if (PD(e) !== PD(f2)) { + return false; + } + } + } + return true; + } + function rAd(a, b) { + var c2, d, e, f2, g, h; + if (a.f > 0) { + a.qj(); + if (b != null) { + for (f2 = 0; f2 < a.d.length; ++f2) { + c2 = a.d[f2]; + if (c2) { + d = BD(c2.g, 367); + h = c2.i; + for (g = 0; g < h; ++g) { + e = d[g]; + if (pb(b, e.dd())) { + return true; + } + } + } + } + } else { + for (f2 = 0; f2 < a.d.length; ++f2) { + c2 = a.d[f2]; + if (c2) { + d = BD(c2.g, 367); + h = c2.i; + for (g = 0; g < h; ++g) { + e = d[g]; + if (PD(b) === PD(e.dd())) { + return true; + } + } + } + } + } + } + return false; + } + function e6b(a, b, c2) { + var d, e, f2, g; + Odd(c2, "Orthogonally routing hierarchical port edges", 1); + a.a = 0; + d = h6b(b); + k6b(b, d); + j6b(a, b, d); + f6b(b); + e = BD(vNb(b, (Nyc(), Vxc)), 98); + f2 = b.b; + d6b((tCb(0, f2.c.length), BD(f2.c[0], 29)), e, b); + d6b(BD(Ikb(f2, f2.c.length - 1), 29), e, b); + g = b.b; + b6b((tCb(0, g.c.length), BD(g.c[0], 29))); + b6b(BD(Ikb(g, g.c.length - 1), 29)); + Qdd(c2); + } + function jnd(a) { + switch (a) { + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: { + return a - 48 << 24 >> 24; + } + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: { + return a - 97 + 10 << 24 >> 24; + } + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: { + return a - 65 + 10 << 24 >> 24; + } + default: { + throw vbb(new Oeb("Invalid hexadecimal")); + } + } + } + function AUc(a, b, c2) { + var d, e, f2, g; + Odd(c2, "Processor order nodes", 2); + a.a = Edb(ED(vNb(b, (JTc(), HTc)))); + e = new Psb(); + for (g = Jsb(b.b, 0); g.b != g.d.c; ) { + f2 = BD(Xsb(g), 86); + Ccb(DD(vNb(f2, (mTc(), jTc)))) && (Gsb(e, f2, e.c.b, e.c), true); + } + d = (sCb(e.b != 0), BD(e.a.a.c, 86)); + yUc(a, d); + !c2.b && Rdd(c2, 1); + BUc(a, d, 0 - Edb(ED(vNb(d, (mTc(), bTc)))) / 2, 0); + !c2.b && Rdd(c2, 1); + Qdd(c2); + } + function rFb() { + rFb = ccb; + qFb = new sFb("SPIRAL", 0); + lFb = new sFb("LINE_BY_LINE", 1); + mFb = new sFb("MANHATTAN", 2); + kFb = new sFb("JITTER", 3); + oFb = new sFb("QUADRANTS_LINE_BY_LINE", 4); + pFb = new sFb("QUADRANTS_MANHATTAN", 5); + nFb = new sFb("QUADRANTS_JITTER", 6); + jFb = new sFb("COMBINE_LINE_BY_LINE_MANHATTAN", 7); + iFb = new sFb("COMBINE_JITTER_MANHATTAN", 8); + } + function roc(a, b, c2, d) { + var e, f2, g, h, i3, j; + i3 = woc(a, c2); + j = woc(b, c2); + e = false; + while (!!i3 && !!j) { + if (d || uoc(i3, j, c2)) { + g = woc(i3, c2); + h = woc(j, c2); + zoc(b); + zoc(a); + f2 = i3.c; + sbc(i3, false); + sbc(j, false); + if (c2) { + Z_b(b, j.p, f2); + b.p = j.p; + Z_b(a, i3.p + 1, f2); + a.p = i3.p; + } else { + Z_b(a, i3.p, f2); + a.p = i3.p; + Z_b(b, j.p + 1, f2); + b.p = j.p; + } + $_b(i3, null); + $_b(j, null); + i3 = g; + j = h; + e = true; + } else { + break; + } + } + return e; + } + function VDc(a, b, c2, d) { + var e, f2, g, h, i3; + e = false; + f2 = false; + for (h = new olb(d.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + PD(vNb(g, (wtc(), $sc))) === PD(c2) && (g.g.c.length == 0 ? g.e.c.length == 0 || (e = true) : f2 = true); + } + i3 = 0; + e && e ^ f2 ? i3 = c2.j == (Ucd(), Acd) ? -a.e[d.c.p][d.p] : b - a.e[d.c.p][d.p] : f2 && e ^ f2 ? i3 = a.e[d.c.p][d.p] + 1 : e && f2 && (i3 = c2.j == (Ucd(), Acd) ? 0 : b / 2); + return i3; + } + function NEd(a, b, c2, d, e, f2, g, h) { + var i3, j, k; + i3 = 0; + b != null && (i3 ^= LCb(b.toLowerCase())); + c2 != null && (i3 ^= LCb(c2)); + d != null && (i3 ^= LCb(d)); + g != null && (i3 ^= LCb(g)); + h != null && (i3 ^= LCb(h)); + for (j = 0, k = f2.length; j < k; j++) { + i3 ^= LCb(f2[j]); + } + a ? i3 |= 256 : i3 &= -257; + e ? i3 |= 16 : i3 &= -17; + this.f = i3; + this.i = b == null ? null : (uCb(b), b); + this.a = c2; + this.d = d; + this.j = f2; + this.g = g; + this.e = h; + } + function X_b(a, b, c2) { + var d, e; + e = null; + switch (b.g) { + case 1: + e = (z0b(), u0b); + break; + case 2: + e = (z0b(), w0b); + } + d = null; + switch (c2.g) { + case 1: + d = (z0b(), v0b); + break; + case 2: + d = (z0b(), t0b); + break; + case 3: + d = (z0b(), x0b); + break; + case 4: + d = (z0b(), y0b); + } + return !!e && !!d ? Nq(a.j, new Yb(new amb(OC(GC(_D, 1), Uhe, 169, 0, [BD(Qb(e), 169), BD(Qb(d), 169)])))) : (mmb(), mmb(), jmb); + } + function t5b(a) { + var b, c2, d; + b = BD(vNb(a, (Nyc(), Hxc)), 8); + yNb(a, Hxc, new f7c(b.b, b.a)); + switch (BD(vNb(a, mwc), 248).g) { + case 1: + yNb(a, mwc, (F7c(), E7c)); + break; + case 2: + yNb(a, mwc, (F7c(), A7c)); + break; + case 3: + yNb(a, mwc, (F7c(), C7c)); + break; + case 4: + yNb(a, mwc, (F7c(), D7c)); + } + if ((!a.q ? (mmb(), mmb(), kmb) : a.q)._b(ayc)) { + c2 = BD(vNb(a, ayc), 8); + d = c2.a; + c2.a = c2.b; + c2.b = d; + } + } + function jjc(a, b, c2, d, e, f2) { + this.b = c2; + this.d = e; + if (a >= b.length) { + throw vbb(new qcb("Greedy SwitchDecider: Free layer not in graph.")); + } + this.c = b[a]; + this.e = new dIc(d); + THc(this.e, this.c, (Ucd(), Tcd)); + this.i = new dIc(d); + THc(this.i, this.c, zcd); + this.f = new ejc(this.c); + this.a = !f2 && e.i && !e.s && this.c[0].k == (j0b(), e0b); + this.a && hjc(this, a, b.length); + } + function hKb(a, b) { + var c2, d, e, f2, g, h; + f2 = !a.B.Hc((Idd(), zdd)); + g = a.B.Hc(Cdd); + a.a = new FHb(g, f2, a.c); + !!a.n && u_b(a.a.n, a.n); + lIb(a.g, (gHb(), eHb), a.a); + if (!b) { + d = new mIb(1, f2, a.c); + d.n.a = a.k; + Npb(a.p, (Ucd(), Acd), d); + e = new mIb(1, f2, a.c); + e.n.d = a.k; + Npb(a.p, Rcd, e); + h = new mIb(0, f2, a.c); + h.n.c = a.k; + Npb(a.p, Tcd, h); + c2 = new mIb(0, f2, a.c); + c2.n.b = a.k; + Npb(a.p, zcd, c2); + } + } + function Vgc(a) { + var b, c2, d; + b = BD(vNb(a.d, (Nyc(), Swc)), 218); + switch (b.g) { + case 2: + c2 = Ngc(a); + break; + case 3: + c2 = (d = new Rkb(), MAb(JAb(NAb(LAb(LAb(new YAb(null, new Kub(a.d.b, 16)), new Shc()), new Uhc()), new Whc()), new ehc()), new Yhc(d)), d); + break; + default: + throw vbb(new Zdb("Compaction not supported for " + b + " edges.")); + } + Ugc(a, c2); + reb(new Pib(a.g), new Ehc(a)); + } + function a2c(a, b) { + var c2; + c2 = new zNb(); + !!b && tNb(c2, BD(Ohb(a.a, C2), 94)); + JD(b, 470) && tNb(c2, BD(Ohb(a.a, G2), 94)); + if (JD(b, 354)) { + tNb(c2, BD(Ohb(a.a, D2), 94)); + return c2; + } + JD(b, 82) && tNb(c2, BD(Ohb(a.a, z2), 94)); + if (JD(b, 239)) { + tNb(c2, BD(Ohb(a.a, E2), 94)); + return c2; + } + if (JD(b, 186)) { + tNb(c2, BD(Ohb(a.a, F2), 94)); + return c2; + } + JD(b, 352) && tNb(c2, BD(Ohb(a.a, B2), 94)); + return c2; + } + function wSb() { + wSb = ccb; + oSb = new Osd((Y9c(), D9c), meb(1)); + uSb = new Osd(T9c, 80); + tSb = new Osd(M9c, 5); + bSb = new Osd(r8c, tme); + pSb = new Osd(E9c, meb(1)); + sSb = new Osd(H9c, (Bcb(), true)); + lSb = new q0b(50); + kSb = new Osd(f9c, lSb); + dSb = O8c; + mSb = t9c; + cSb = new Osd(B8c, false); + jSb = e9c; + iSb = b9c; + hSb = Y8c; + gSb = W8c; + nSb = x9c; + fSb = (SRb(), LRb); + vSb = QRb; + eSb = KRb; + qSb = NRb; + rSb = PRb; + } + function ZXb(a) { + var b, c2, d, e, f2, g, h, i3; + i3 = new jYb(); + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), e0b)) { + continue; + } + XXb(i3, g, new d7c()); + for (f2 = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + if (e.c.i.k == e0b || e.d.i.k == e0b) { + continue; + } + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 8); + b = c2; + hYb(i3, new cWb(b.a, b.b)); + } + } + } + return i3; + } + function A0c() { + A0c = ccb; + z0c = new Lsd(Qre); + y0c = (R0c(), Q0c); + x0c = new Nsd(Vre, y0c); + w0c = (a1c(), _0c); + v0c = new Nsd(Rre, w0c); + u0c = (N_c(), J_c); + t0c = new Nsd(Sre, u0c); + p0c = new Nsd(Tre, null); + s0c = (C_c(), A_c); + r0c = new Nsd(Ure, s0c); + l0c = (i_c(), h_c); + k0c = new Nsd(Wre, l0c); + m0c = new Nsd(Xre, (Bcb(), false)); + n0c = new Nsd(Yre, meb(64)); + o0c = new Nsd(Zre, true); + q0c = B_c; + } + function Toc(a) { + var b, c2, d, e, f2, g; + if (a.a != null) { + return; + } + a.a = KC(sbb, dle, 25, a.c.b.c.length, 16, 1); + a.a[0] = false; + if (wNb(a.c, (Nyc(), Lyc))) { + d = BD(vNb(a.c, Lyc), 15); + for (c2 = d.Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 19).a; + b > 0 && b < a.a.length && (a.a[b] = false); + } + } else { + g = new olb(a.c.b); + g.a < g.c.c.length && mlb(g); + e = 1; + while (g.a < g.c.c.length) { + f2 = BD(mlb(g), 29); + a.a[e++] = Woc(f2); + } + } + } + function TMd(a, b) { + var c2, d, e, f2; + e = a.b; + switch (b) { + case 1: { + a.b |= 1; + a.b |= 4; + a.b |= 8; + break; + } + case 2: { + a.b |= 2; + a.b |= 4; + a.b |= 8; + break; + } + case 4: { + a.b |= 1; + a.b |= 2; + a.b |= 4; + a.b |= 8; + break; + } + case 3: { + a.b |= 16; + a.b |= 8; + break; + } + case 0: { + a.b |= 32; + a.b |= 16; + a.b |= 8; + a.b |= 1; + a.b |= 2; + a.b |= 4; + break; + } + } + if (a.b != e && !!a.c) { + for (d = new Fyd(a.c); d.e != d.i.gc(); ) { + f2 = BD(Dyd(d), 473); + c2 = $Kd(f2); + XMd(c2, b); + } + } + } + function cGc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2; + e = false; + for (g = b, h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + Ccb((Bcb(), f2.e ? true : false)) && !BD(Ikb(a.b, f2.e.p), 214).s && (e = e | (j = f2.e, k = BD(Ikb(a.b, j.p), 214), l = k.e, m = SFc(c2, l.length), n = l[m][0], n.k == (j0b(), e0b) ? l[m] = aGc(f2, l[m], c2 ? (Ucd(), Tcd) : (Ucd(), zcd)) : k.c.Tf(l, c2), o2 = dGc(a, k, c2, d), bGc(k.e, k.o, c2), o2)); + } + return e; + } + function p2c(a, b) { + var c2, d, e, f2, g; + f2 = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i; + for (e = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + if (PD(hkd(d, (Y9c(), J8c))) !== PD((hbd(), gbd))) { + g = BD(hkd(b, F9c), 149); + c2 = BD(hkd(d, F9c), 149); + (g == c2 || !!g && C3c(g, c2)) && (!d.a && (d.a = new cUd(E2, d, 10, 11)), d.a).i != 0 && (f2 += p2c(a, d)); + } + } + return f2; + } + function nlc(a) { + var b, c2, d, e, f2, g, h; + d = 0; + h = 0; + for (g = new olb(a.d); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 101); + e = BD(GAb(JAb(new YAb(null, new Kub(f2.j, 16)), new Ylc()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + c2 = null; + if (d <= h) { + c2 = (Ucd(), Acd); + d += e.gc(); + } else if (h < d) { + c2 = (Ucd(), Rcd); + h += e.gc(); + } + b = c2; + MAb(NAb(e.Oc(), new Mlc()), new Olc(b)); + } + } + function mkc(a) { + var b, c2, d, e, f2, g, h, i3; + a.b = new _i(new amb((Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]))), new amb((Fkc(), OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc])))); + for (g = OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]), h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + for (c2 = OC(GC(vV, 1), Kie, 361, 0, [Ekc, Dkc, Ckc]), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + Ui(a.b, f2, b, new Rkb()); + } + } + } + function KJb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + g = BD(BD(Qc(a.r, b), 21), 84); + h = a.u.Hc((rcd(), pcd)); + c2 = a.u.Hc(mcd); + d = a.u.Hc(lcd); + j = a.u.Hc(qcd); + l = a.B.Hc((Idd(), Hdd)); + k = !c2 && !d && (j || g.gc() == 2); + HJb(a, b); + e = null; + i3 = null; + if (h) { + f2 = g.Kc(); + e = BD(f2.Pb(), 111); + i3 = e; + while (f2.Ob()) { + i3 = BD(f2.Pb(), 111); + } + e.d.b = 0; + i3.d.c = 0; + k && !e.a && (e.d.c = 0); + } + if (l) { + LJb(g); + if (h) { + e.d.b = 0; + i3.d.c = 0; + } + } + } + function SKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + g = BD(BD(Qc(a.r, b), 21), 84); + h = a.u.Hc((rcd(), pcd)); + c2 = a.u.Hc(mcd); + d = a.u.Hc(lcd); + i3 = a.u.Hc(qcd); + l = a.B.Hc((Idd(), Hdd)); + j = !c2 && !d && (i3 || g.gc() == 2); + QKb(a, b); + k = null; + e = null; + if (h) { + f2 = g.Kc(); + k = BD(f2.Pb(), 111); + e = k; + while (f2.Ob()) { + e = BD(f2.Pb(), 111); + } + k.d.d = 0; + e.d.a = 0; + j && !k.a && (k.d.a = 0); + } + if (l) { + TKb(g); + if (h) { + k.d.d = 0; + e.d.a = 0; + } + } + } + function oJc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + e = b.k; + if (b.p >= 0) { + return false; + } else { + b.p = c2.b; + Ekb(c2.e, b); + } + if (e == (j0b(), g0b) || e == i0b) { + for (g = new olb(b.j); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 11); + for (k = (d = new olb(new R0b(f2).a.g), new U0b(d)); llb(k.a); ) { + j = BD(mlb(k.a), 17).d; + h = j.i; + i3 = h.k; + if (b.c != h.c) { + if (i3 == g0b || i3 == i0b) { + if (oJc(a, h, c2)) { + return true; + } + } + } + } + } + } + return true; + } + function gJd(a) { + var b; + if ((a.Db & 64) != 0) + return EId(a); + b = new Jfb(EId(a)); + b.a += " (changeable: "; + Ffb(b, (a.Bb & zte) != 0); + b.a += ", volatile: "; + Ffb(b, (a.Bb & Dve) != 0); + b.a += ", transient: "; + Ffb(b, (a.Bb & Rje) != 0); + b.a += ", defaultValueLiteral: "; + Efb(b, a.j); + b.a += ", unsettable: "; + Ffb(b, (a.Bb & Cve) != 0); + b.a += ", derived: "; + Ffb(b, (a.Bb & oie) != 0); + b.a += ")"; + return b.a; + } + function AOb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + e = eNb(a.d); + g = BD(vNb(a.b, (CPb(), wPb)), 116); + h = g.b + g.c; + i3 = g.d + g.a; + k = e.d.a * a.e + h; + j = e.b.a * a.f + i3; + $Ob(a.b, new f7c(k, j)); + for (m = new olb(a.g); m.a < m.c.c.length; ) { + l = BD(mlb(m), 562); + b = l.g - e.a.a; + c2 = l.i - e.c.a; + d = P6c(Z6c(new f7c(b, c2), l.a, l.b), Y6c(b7c(R6c(HOb(l.e)), l.d * l.a, l.c * l.b), -0.5)); + f2 = IOb(l.e); + KOb(l.e, c7c(d, f2)); + } + } + function tmc(a, b, c2, d) { + var e, f2, g, h, i3; + i3 = KC(UD, nie, 104, (Ucd(), OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd])).length, 0, 2); + for (f2 = OC(GC(F1, 1), bne, 61, 0, [Scd, Acd, zcd, Rcd, Tcd]), g = 0, h = f2.length; g < h; ++g) { + e = f2[g]; + i3[e.g] = KC(UD, Vje, 25, a.c[e.g], 15, 1); + } + vmc(i3, a, Acd); + vmc(i3, a, Rcd); + smc(i3, a, Acd, b, c2, d); + smc(i3, a, zcd, b, c2, d); + smc(i3, a, Rcd, b, c2, d); + smc(i3, a, Tcd, b, c2, d); + return i3; + } + function UGc(a, b, c2) { + if (Mhb(a.a, b)) { + if (Rqb(BD(Ohb(a.a, b), 53), c2)) { + return 1; + } + } else { + Rhb(a.a, b, new Tqb()); + } + if (Mhb(a.a, c2)) { + if (Rqb(BD(Ohb(a.a, c2), 53), b)) { + return -1; + } + } else { + Rhb(a.a, c2, new Tqb()); + } + if (Mhb(a.b, b)) { + if (Rqb(BD(Ohb(a.b, b), 53), c2)) { + return -1; + } + } else { + Rhb(a.b, b, new Tqb()); + } + if (Mhb(a.b, c2)) { + if (Rqb(BD(Ohb(a.b, c2), 53), b)) { + return 1; + } + } else { + Rhb(a.b, c2, new Tqb()); + } + return 0; + } + function x2d(a, b, c2, d) { + var e, f2, g, h, i3, j; + if (c2 == null) { + e = BD(a.g, 119); + for (h = 0; h < a.i; ++h) { + g = e[h]; + if (g.ak() == b) { + return Txd(a, g, d); + } + } + } + f2 = (Q6d(), BD(b, 66).Oj() ? BD(c2, 72) : R6d(b, c2)); + if (oid(a.e)) { + j = !R2d(a, b); + d = Sxd(a, f2, d); + i3 = b.$j() ? H2d(a, 3, b, null, c2, M2d(a, b, c2, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0), j) : H2d(a, 1, b, b.zj(), c2, -1, j); + d ? d.Ei(i3) : d = i3; + } else { + d = Sxd(a, f2, d); + } + return d; + } + function CJb(a) { + var b, c2, d, e, f2, g; + if (a.q == (dcd(), _bd) || a.q == $bd) { + return; + } + e = a.f.n.d + _Gb(BD(Mpb(a.b, (Ucd(), Acd)), 124)) + a.c; + b = a.f.n.a + _Gb(BD(Mpb(a.b, Rcd), 124)) + a.c; + d = BD(Mpb(a.b, zcd), 124); + g = BD(Mpb(a.b, Tcd), 124); + f2 = $wnd.Math.max(0, d.n.d - e); + f2 = $wnd.Math.max(f2, g.n.d - e); + c2 = $wnd.Math.max(0, d.n.a - b); + c2 = $wnd.Math.max(c2, g.n.a - b); + d.n.d = f2; + g.n.d = f2; + d.n.a = c2; + g.n.a = c2; + } + function rdc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + Odd(b, "Restoring reversed edges", 1); + for (i3 = new olb(a.b); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 29); + for (k = new olb(h.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + for (m = new olb(j.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + g = k_b(l.g); + for (d = g, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + Ccb(DD(vNb(c2, (wtc(), ltc)))) && PZb(c2, false); + } + } + } + } + Qdd(b); + } + function m4c() { + this.b = new $rb(); + this.d = new $rb(); + this.e = new $rb(); + this.c = new $rb(); + this.a = new Lqb(); + this.f = new Lqb(); + hvd(m1, new x4c(), new z4c()); + hvd(l1, new V4c(), new X4c()); + hvd(i1, new Z4c(), new _4c()); + hvd(j1, new b5c(), new d5c()); + hvd(i2, new f5c(), new h5c()); + hvd(DJ, new B4c(), new D4c()); + hvd(xK, new F4c(), new H4c()); + hvd(jK, new J4c(), new L4c()); + hvd(uK, new N4c(), new P4c()); + hvd(kL, new R4c(), new T4c()); + } + function R5d(a) { + var b, c2, d, e, f2, g; + f2 = 0; + b = wId(a); + !!b.Bj() && (f2 |= 4); + (a.Bb & Cve) != 0 && (f2 |= 2); + if (JD(a, 99)) { + c2 = BD(a, 18); + e = zUd(c2); + (c2.Bb & ote) != 0 && (f2 |= 32); + if (e) { + aLd(WId(e)); + f2 |= 8; + g = e.t; + (g > 1 || g == -1) && (f2 |= 16); + (e.Bb & ote) != 0 && (f2 |= 64); + } + (c2.Bb & Tje) != 0 && (f2 |= Dve); + f2 |= zte; + } else { + if (JD(b, 457)) { + f2 |= 512; + } else { + d = b.Bj(); + !!d && (d.i & 1) != 0 && (f2 |= 256); + } + } + (a.Bb & 512) != 0 && (f2 |= 128); + return f2; + } + function hc(a, b) { + var c2, d, e, f2, g; + a = a == null ? Xhe : (uCb(a), a); + for (e = 0; e < b.length; e++) { + b[e] = ic(b[e]); + } + c2 = new Vfb(); + g = 0; + d = 0; + while (d < b.length) { + f2 = a.indexOf("%s", g); + if (f2 == -1) { + break; + } + c2.a += "" + qfb(a == null ? Xhe : (uCb(a), a), g, f2); + Pfb(c2, b[d++]); + g = f2 + 2; + } + Ofb(c2, a, g, a.length); + if (d < b.length) { + c2.a += " ["; + Pfb(c2, b[d++]); + while (d < b.length) { + c2.a += She; + Pfb(c2, b[d++]); + } + c2.a += "]"; + } + return c2.a; + } + function m3b(a) { + var b, c2, d, e, f2; + f2 = new Skb(a.a.c.length); + for (e = new olb(a.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + c2 = BD(vNb(d, (Nyc(), mxc)), 163); + b = null; + switch (c2.g) { + case 1: + case 2: + b = (Gqc(), Fqc); + break; + case 3: + case 4: + b = (Gqc(), Dqc); + } + if (b) { + yNb(d, (wtc(), Bsc), (Gqc(), Fqc)); + b == Dqc ? o3b(d, c2, (KAc(), HAc)) : b == Fqc && o3b(d, c2, (KAc(), IAc)); + } else { + f2.c[f2.c.length] = d; + } + } + return f2; + } + function MHc(a, b) { + var c2, d, e, f2, g, h, i3; + c2 = 0; + for (i3 = new olb(b); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 11); + AHc(a.b, a.d[h.p]); + g = 0; + for (e = new b1b(h.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + if (WHc(d)) { + f2 = aIc(a, h == d.c ? d.d : d.c); + if (f2 > a.d[h.p]) { + c2 += zHc(a.b, f2); + Wjb(a.a, meb(f2)); + } + } else { + ++g; + } + } + c2 += a.b.d * g; + while (!akb(a.a)) { + xHc(a.b, BD(fkb(a.a), 19).a); + } + } + return c2; + } + function Y6d(a, b) { + var c2; + if (a.f == W6d) { + c2 = $1d(q1d((O6d(), M6d), b)); + return a.e ? c2 == 4 && b != (m8d(), k8d) && b != (m8d(), h8d) && b != (m8d(), i8d) && b != (m8d(), j8d) : c2 == 2; + } + if (!!a.d && (a.d.Hc(b) || a.d.Hc(_1d(q1d((O6d(), M6d), b))) || a.d.Hc(e1d((O6d(), M6d), a.b, b)))) { + return true; + } + if (a.f) { + if (x1d((O6d(), a.f), b2d(q1d(M6d, b)))) { + c2 = $1d(q1d(M6d, b)); + return a.e ? c2 == 4 : c2 == 2; + } + } + return false; + } + function iVc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l; + g = BD(hkd(c2, (Y9c(), C9c)), 8); + i3 = g.a; + k = g.b + a; + e = $wnd.Math.atan2(k, i3); + e < 0 && (e += dre); + e += b; + e > dre && (e -= dre); + h = BD(hkd(d, C9c), 8); + j = h.a; + l = h.b + a; + f2 = $wnd.Math.atan2(l, j); + f2 < 0 && (f2 += dre); + f2 += b; + f2 > dre && (f2 -= dre); + return Iy(), My(1e-10), $wnd.Math.abs(e - f2) <= 1e-10 || e == f2 || isNaN(e) && isNaN(f2) ? 0 : e < f2 ? -1 : e > f2 ? 1 : Ny(isNaN(e), isNaN(f2)); + } + function YDb(a) { + var b, c2, d, e, f2, g, h; + h = new Lqb(); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 57); + Rhb(h, b, new Rkb()); + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + b = BD(mlb(e), 57); + b.i = Qje; + for (g = b.c.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 57); + BD(Wd(irb(h.f, f2)), 15).Fc(b); + } + } + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + b.c.$b(); + b.c = BD(Wd(irb(h.f, b)), 15); + } + QDb(a); + } + function yVb(a) { + var b, c2, d, e, f2, g, h; + h = new Lqb(); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 81); + Rhb(h, b, new Rkb()); + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + b = BD(mlb(e), 81); + b.o = Qje; + for (g = b.f.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 81); + BD(Wd(irb(h.f, f2)), 15).Fc(b); + } + } + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + b.f.$b(); + b.f = BD(Wd(irb(h.f, b)), 15); + } + rVb(a); + } + function dNb(a, b, c2, d) { + var e, f2; + cNb(a, b, c2, d); + qNb(b, a.j - b.j + c2); + rNb(b, a.k - b.k + d); + for (f2 = new olb(b.f); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 324); + switch (e.a.g) { + case 0: + nNb(a, b.g + e.b.a, 0, b.g + e.c.a, b.i - 1); + break; + case 1: + nNb(a, b.g + b.o, b.i + e.b.a, a.o - 1, b.i + e.c.a); + break; + case 2: + nNb(a, b.g + e.b.a, b.i + b.p, b.g + e.c.a, a.p - 1); + break; + default: + nNb(a, 0, b.i + e.b.a, b.g - 1, b.i + e.c.a); + } + } + } + function aNb(b, c2, d, e, f2) { + var g, h, i3; + try { + if (c2 >= b.o) { + throw vbb(new rcb()); + } + i3 = c2 >> 5; + h = c2 & 31; + g = Nbb(1, Tbb(Nbb(h, 1))); + f2 ? b.n[d][i3] = Mbb(b.n[d][i3], g) : b.n[d][i3] = xbb(b.n[d][i3], Lbb(g)); + g = Nbb(g, 1); + e ? b.n[d][i3] = Mbb(b.n[d][i3], g) : b.n[d][i3] = xbb(b.n[d][i3], Lbb(g)); + } catch (a) { + a = ubb(a); + if (JD(a, 320)) { + throw vbb(new qcb(Dle + b.o + "*" + b.p + Ele + c2 + She + d + Fle)); + } else + throw vbb(a); + } + } + function BUc(a, b, c2, d) { + var e, f2, g; + if (b) { + f2 = Edb(ED(vNb(b, (mTc(), fTc)))) + d; + g = c2 + Edb(ED(vNb(b, bTc))) / 2; + yNb(b, kTc, meb(Tbb(Cbb($wnd.Math.round(f2))))); + yNb(b, lTc, meb(Tbb(Cbb($wnd.Math.round(g))))); + b.d.b == 0 || BUc(a, BD(pr((e = Jsb(new ZRc(b).a.d, 0), new aSc(e))), 86), c2 + Edb(ED(vNb(b, bTc))) + a.a, d + Edb(ED(vNb(b, cTc)))); + vNb(b, iTc) != null && BUc(a, BD(vNb(b, iTc), 86), c2, d); + } + } + function N9b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + i3 = Q_b(b.a); + e = Edb(ED(vNb(i3, (Nyc(), pyc)))) * 2; + k = Edb(ED(vNb(i3, wyc))); + j = $wnd.Math.max(e, k); + f2 = KC(UD, Vje, 25, b.f - b.c + 1, 15, 1); + d = -j; + c2 = 0; + for (h = b.b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + d += a.a[g.c.p] + j; + f2[c2++] = d; + } + d += a.a[b.a.c.p] + j; + f2[c2++] = d; + for (m = new olb(b.e); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + d += a.a[l.c.p] + j; + f2[c2++] = d; + } + return f2; + } + function GHc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m; + m = new Hxb(new pIc(a)); + for (h = OC(GC(OQ, 1), kne, 10, 0, [b, c2]), i3 = 0, j = h.length; i3 < j; ++i3) { + g = h[i3]; + for (l = CHc(g, d).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + for (f2 = new b1b(k.b); llb(f2.a) || llb(f2.b); ) { + e = BD(llb(f2.a) ? mlb(f2.a) : mlb(f2.b), 17); + if (!OZb(e)) { + Iwb(m.a, k, (Bcb(), zcb)) == null; + WHc(e) && Axb(m, k == e.c ? e.d : e.c); + } + } + } + } + return Qb(m), new Tkb(m); + } + function zhd(a, b) { + var c2, d, e, f2; + f2 = BD(hkd(a, (Y9c(), A9c)), 61).g - BD(hkd(b, A9c), 61).g; + if (f2 != 0) { + return f2; + } + c2 = BD(hkd(a, v9c), 19); + d = BD(hkd(b, v9c), 19); + if (!!c2 && !!d) { + e = c2.a - d.a; + if (e != 0) { + return e; + } + } + switch (BD(hkd(a, A9c), 61).g) { + case 1: + return Kdb(a.i, b.i); + case 2: + return Kdb(a.j, b.j); + case 3: + return Kdb(b.i, a.i); + case 4: + return Kdb(b.j, a.j); + default: + throw vbb(new Zdb(ine)); + } + } + function _od(a) { + var b, c2, d; + if ((a.Db & 64) != 0) + return fld(a); + b = new Wfb(ete); + c2 = a.k; + if (!c2) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + if (a.n.i > 0) { + d = (!a.n && (a.n = new cUd(D2, a, 1, 7)), BD(qud(a.n, 0), 137)).a; + !d || Qfb(Qfb((b.a += ' "', b), d), '"'); + } + } else { + Qfb(Qfb((b.a += ' "', b), c2), '"'); + } + Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a += " (", b), a.i), ","), a.j), " | "), a.g), ","), a.f), ")"); + return b.a; + } + function opd(a) { + var b, c2, d; + if ((a.Db & 64) != 0) + return fld(a); + b = new Wfb(fte); + c2 = a.k; + if (!c2) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + if (a.n.i > 0) { + d = (!a.n && (a.n = new cUd(D2, a, 1, 7)), BD(qud(a.n, 0), 137)).a; + !d || Qfb(Qfb((b.a += ' "', b), d), '"'); + } + } else { + Qfb(Qfb((b.a += ' "', b), c2), '"'); + } + Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a += " (", b), a.i), ","), a.j), " | "), a.g), ","), a.f), ")"); + return b.a; + } + function h4c(a, b) { + var c2, d, e, f2, g, h, i3; + if (b == null || b.length == 0) { + return null; + } + e = BD(Phb(a.a, b), 149); + if (!e) { + for (d = (h = new $ib(a.b).a.vc().Kc(), new djb(h)); d.a.Ob(); ) { + c2 = (f2 = BD(d.a.Pb(), 42), BD(f2.dd(), 149)); + g = c2.c; + i3 = b.length; + if (dfb(g.substr(g.length - i3, i3), b) && (b.length == g.length || bfb(g, g.length - b.length - 1) == 46)) { + if (e) { + return null; + } + e = c2; + } + } + !!e && Shb(a.a, b, e); + } + return e; + } + function QLb(a, b) { + var c2, d, e, f2; + c2 = new VLb(); + d = BD(GAb(NAb(new YAb(null, new Kub(a.f, 16)), c2), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + e = d.gc(); + d = BD(GAb(NAb(new YAb(null, new Kub(b.f, 16)), c2), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [Eyb, Dyb]))), 21); + f2 = d.gc(); + if (e < f2) { + return -1; + } + if (e == f2) { + return 0; + } + return 1; + } + function r5b(a) { + var b, c2, d; + if (!wNb(a, (Nyc(), xxc))) { + return; + } + d = BD(vNb(a, xxc), 21); + if (d.dc()) { + return; + } + c2 = (b = BD(gdb(B1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + d.Hc((Hbd(), Cbd)) ? rqb(c2, Cbd) : rqb(c2, Dbd); + d.Hc(Abd) || rqb(c2, Abd); + d.Hc(zbd) ? rqb(c2, Gbd) : d.Hc(ybd) ? rqb(c2, Fbd) : d.Hc(Bbd) && rqb(c2, Ebd); + d.Hc(Gbd) ? rqb(c2, zbd) : d.Hc(Fbd) ? rqb(c2, ybd) : d.Hc(Ebd) && rqb(c2, Bbd); + yNb(a, xxc, c2); + } + function kHc(a) { + var b, c2, d, e, f2, g, h; + e = BD(vNb(a, (wtc(), Psc)), 10); + d = a.j; + c2 = (tCb(0, d.c.length), BD(d.c[0], 11)); + for (g = new olb(e.j); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 11); + if (PD(f2) === PD(vNb(c2, $sc))) { + if (f2.j == (Ucd(), Acd) && a.p > e.p) { + G0b(f2, Rcd); + if (f2.d) { + h = f2.o.b; + b = f2.a.b; + f2.a.b = h - b; + } + } else if (f2.j == Rcd && e.p > a.p) { + G0b(f2, Acd); + if (f2.d) { + h = f2.o.b; + b = f2.a.b; + f2.a.b = -(h - b); + } + } + break; + } + } + return e; + } + function NOc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2; + f2 = c2; + if (c2 < d) { + m = (n = new uOc(a.p), o2 = new uOc(a.p), ye(n.e, a.e), n.q = a.q, n.r = o2, lOc(n), ye(o2.j, a.j), o2.r = n, lOc(o2), new vgd(n, o2)); + l = BD(m.a, 112); + k = BD(m.b, 112); + e = (tCb(f2, b.c.length), BD(b.c[f2], 329)); + g = UOc(a, l, k, e); + for (j = c2 + 1; j <= d; j++) { + h = (tCb(j, b.c.length), BD(b.c[j], 329)); + i3 = UOc(a, l, k, h); + if (SOc(h, i3, e, g)) { + e = h; + g = i3; + } + } + } + return f2; + } + function wQb(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l; + if (!(JD(b, 239) || JD(b, 354) || JD(b, 186))) { + throw vbb(new Wdb("Method only works for ElkNode-, ElkLabel and ElkPort-objects.")); + } + g = a.a / 2; + i3 = b.i + d - g; + k = b.j + e - g; + j = i3 + b.g + a.a; + l = k + b.f + a.a; + f2 = new s7c(); + Dsb(f2, new f7c(i3, k)); + Dsb(f2, new f7c(i3, l)); + Dsb(f2, new f7c(j, l)); + Dsb(f2, new f7c(j, k)); + h = new XOb(f2); + tNb(h, b); + c2 && Rhb(a.b, b, h); + return h; + } + function uXb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + f2 = new f7c(b, c2); + for (k = new olb(a.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + P6c(j.n, f2); + for (m = new olb(j.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + for (e = new olb(l.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + q7c(d.a, f2); + g = BD(vNb(d, (Nyc(), jxc)), 74); + !!g && q7c(g, f2); + for (i3 = new olb(d.b); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 70); + P6c(h.n, f2); + } + } + } + } + } + function g_b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + f2 = new f7c(b, c2); + for (k = new olb(a.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + P6c(j.n, f2); + for (m = new olb(j.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + for (e = new olb(l.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + q7c(d.a, f2); + g = BD(vNb(d, (Nyc(), jxc)), 74); + !!g && q7c(g, f2); + for (i3 = new olb(d.b); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 70); + P6c(h.n, f2); + } + } + } + } + } + function N1b(a) { + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i == 0) { + throw vbb(new z2c("Edges must have a source.")); + } else if ((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i == 0) { + throw vbb(new z2c("Edges must have a target.")); + } else { + !a.b && (a.b = new y5d(z2, a, 4, 7)); + if (!(a.b.i <= 1 && (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c.i <= 1))) { + throw vbb(new z2c("Hyperedges are not supported.")); + } + } + } + function OFc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + l = 0; + f2 = new jkb(); + Wjb(f2, b); + while (f2.b != f2.c) { + i3 = BD(fkb(f2), 214); + j = 0; + k = BD(vNb(b.j, (Nyc(), ywc)), 339); + g = Edb(ED(vNb(b.j, uwc))); + h = Edb(ED(vNb(b.j, vwc))); + if (k != (tAc(), rAc)) { + j += g * PFc(i3.e, k); + j += h * QFc(i3.e); + } + l += pHc(i3.d, i3.e) + j; + for (e = new olb(i3.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 37); + c2 = BD(Ikb(a.b, d.p), 214); + c2.s || (l += NFc(a, c2)); + } + } + return l; + } + function dhb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + n = b.length; + i3 = n; + BCb(0, b.length); + if (b.charCodeAt(0) == 45) { + l = -1; + m = 1; + --n; + } else { + l = 1; + m = 0; + } + f2 = (phb(), ohb)[10]; + e = n / f2 | 0; + q = n % f2; + q != 0 && ++e; + h = KC(WD, oje, 25, e, 15, 1); + c2 = nhb[8]; + g = 0; + o2 = m + (q == 0 ? f2 : q); + for (p = m; p < i3; p = o2, o2 = p + f2) { + d = Icb(b.substr(p, o2 - p), Rie, Ohe); + j = (Dhb(), Hhb(h, h, g, c2)); + j += xhb(h, g, d); + h[g++] = j; + } + k = g; + a.e = l; + a.d = k; + a.a = h; + Jgb(a); + } + function SGb(a, b, c2, d, e, f2, g) { + a.c = d.qf().a; + a.d = d.qf().b; + if (e) { + a.c += e.qf().a; + a.d += e.qf().b; + } + a.b = b.rf().a; + a.a = b.rf().b; + if (!e) { + c2 ? a.c -= g + b.rf().a : a.c += d.rf().a + g; + } else { + switch (e.Hf().g) { + case 0: + case 2: + a.c += e.rf().a + g + f2.a + g; + break; + case 4: + a.c -= g + f2.a + g + b.rf().a; + break; + case 1: + a.c += e.rf().a + g; + a.d -= g + f2.b + g + b.rf().b; + break; + case 3: + a.c += e.rf().a + g; + a.d += e.rf().b + g + f2.b + g; + } + } + } + function gac(a, b) { + var c2, d; + this.b = new Rkb(); + this.e = new Rkb(); + this.a = a; + this.d = b; + dac(this); + eac(this); + this.b.dc() ? this.c = a.c.p : this.c = BD(this.b.Xb(0), 10).c.p; + this.e.c.length == 0 ? this.f = a.c.p : this.f = BD(Ikb(this.e, this.e.c.length - 1), 10).c.p; + for (d = BD(vNb(a, (wtc(), ktc)), 15).Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 70); + if (wNb(c2, (Nyc(), Owc))) { + this.d = BD(vNb(c2, Owc), 227); + break; + } + } + } + function Anc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + d = BD(Ohb(a.a, b), 53); + f2 = BD(Ohb(a.a, c2), 53); + e = BD(Ohb(a.e, b), 53); + g = BD(Ohb(a.e, c2), 53); + d.a.zc(c2, d); + g.a.zc(b, g); + for (k = f2.a.ec().Kc(); k.Ob(); ) { + j = BD(k.Pb(), 10); + d.a.zc(j, d); + Qqb(BD(Ohb(a.e, j), 53), b); + ye(BD(Ohb(a.e, j), 53), e); + } + for (i3 = e.a.ec().Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 10); + g.a.zc(h, g); + Qqb(BD(Ohb(a.a, h), 53), c2); + ye(BD(Ohb(a.a, h), 53), f2); + } + } + function WGc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + d = BD(Ohb(a.a, b), 53); + f2 = BD(Ohb(a.a, c2), 53); + e = BD(Ohb(a.b, b), 53); + g = BD(Ohb(a.b, c2), 53); + d.a.zc(c2, d); + g.a.zc(b, g); + for (k = f2.a.ec().Kc(); k.Ob(); ) { + j = BD(k.Pb(), 10); + d.a.zc(j, d); + Qqb(BD(Ohb(a.b, j), 53), b); + ye(BD(Ohb(a.b, j), 53), e); + } + for (i3 = e.a.ec().Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 10); + g.a.zc(h, g); + Qqb(BD(Ohb(a.a, h), 53), c2); + ye(BD(Ohb(a.a, h), 53), f2); + } + } + function doc(a, b) { + var c2, d, e; + Odd(b, "Breaking Point Insertion", 1); + d = new Xoc(a); + switch (BD(vNb(a, (Nyc(), Gyc)), 337).g) { + case 2: + e = new hpc(); + case 0: + e = new Ync(); + break; + default: + e = new kpc(); + } + c2 = e.Vf(a, d); + Ccb(DD(vNb(a, Iyc))) && (c2 = coc(a, c2)); + if (!e.Wf() && wNb(a, Myc)) { + switch (BD(vNb(a, Myc), 338).g) { + case 2: + c2 = tpc(d, c2); + break; + case 1: + c2 = rpc(d, c2); + } + } + if (c2.dc()) { + Qdd(b); + return; + } + aoc(a, c2); + Qdd(b); + } + function $qd(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + k = null; + m = b; + l = Rqd(a, dtd(c2), m); + Lkd(l, _pd(m, Vte)); + g = Ypd(m, Lte); + d = new mrd(a, l); + oqd(d.a, d.b, g); + h = Ypd(m, Mte); + e = new nrd(a, l); + pqd(e.a, e.b, h); + if ((!l.b && (l.b = new y5d(z2, l, 4, 7)), l.b).i == 0 || (!l.c && (l.c = new y5d(z2, l, 5, 8)), l.c).i == 0) { + f2 = _pd(m, Vte); + i3 = Zte + f2; + j = i3 + $te; + throw vbb(new cqd(j)); + } + grd(m, l); + _qd(a, m, l); + k = crd(a, m, l); + return k; + } + function yGb(a, b) { + var c2, d, e, f2, g, h, i3; + e = KC(WD, oje, 25, a.e.a.c.length, 15, 1); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 121); + e[f2.d] += f2.b.a.c.length; + } + h = Ru(b); + while (h.b != 0) { + f2 = BD(h.b == 0 ? null : (sCb(h.b != 0), Nsb(h, h.a.a)), 121); + for (d = vr(new olb(f2.g.a)); d.Ob(); ) { + c2 = BD(d.Pb(), 213); + i3 = c2.e; + i3.e = $wnd.Math.max(i3.e, f2.e + c2.a); + --e[i3.d]; + e[i3.d] == 0 && (Gsb(h, i3, h.c.b, h.c), true); + } + } + } + function CGb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + c2 = Rie; + e = Ohe; + for (h = new olb(a.e.a); h.a < h.c.c.length; ) { + f2 = BD(mlb(h), 121); + e = $wnd.Math.min(e, f2.e); + c2 = $wnd.Math.max(c2, f2.e); + } + b = KC(WD, oje, 25, c2 - e + 1, 15, 1); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 121); + f2.e -= e; + ++b[f2.e]; + } + d = 0; + if (a.k != null) { + for (j = a.k, k = 0, l = j.length; k < l; ++k) { + i3 = j[k]; + b[d++] += i3; + if (b.length == d) { + break; + } + } + } + return b; + } + function ixd(a) { + switch (a.d) { + case 9: + case 8: { + return true; + } + case 3: + case 5: + case 4: + case 6: { + return false; + } + case 7: { + return BD(hxd(a), 19).a == a.o; + } + case 1: + case 2: { + if (a.o == -2) { + return false; + } else { + switch (a.p) { + case 0: + case 1: + case 2: + case 6: + case 5: + case 7: { + return Bbb(a.k, a.f); + } + case 3: + case 4: { + return a.j == a.e; + } + default: { + return a.n == null ? a.g == null : pb(a.n, a.g); + } + } + } + } + default: { + return false; + } + } + } + function $ad(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Qse), "ELK Fixed"), "Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."), new bbd()))); + p4c(a, Qse, ame, Xad); + p4c(a, Qse, uqe, Ksd(Yad)); + p4c(a, Qse, use, Ksd(Sad)); + p4c(a, Qse, Fme, Ksd(Tad)); + p4c(a, Qse, Tme, Ksd(Vad)); + p4c(a, Qse, bqe, Ksd(Uad)); + } + function ro(a, b, c2) { + var d, e, f2, g, h; + d = Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))); + h = Tbb(Ibb(Eie, keb(Tbb(Ibb(c2 == null ? 0 : tb(c2), Fie)), 15))); + f2 = uo(a, b, d); + if (!!f2 && h == f2.f && Hb(c2, f2.i)) { + return c2; + } + g = vo(a, c2, h); + if (g) { + throw vbb(new Wdb("value already present: " + c2)); + } + e = new $o(b, d, c2, h); + if (f2) { + mo(a, f2); + po(a, e, f2); + f2.e = null; + f2.c = null; + return f2.i; + } else { + po(a, e, null); + to(a); + return null; + } + } + function E4b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2; + k = c2.a.c; + g = c2.a.c + c2.a.b; + f2 = BD(Ohb(c2.c, b), 459); + n = f2.f; + o2 = f2.a; + f2.b ? i3 = new f7c(g, n) : i3 = new f7c(k, n); + f2.c ? l = new f7c(k, o2) : l = new f7c(g, o2); + e = k; + c2.p || (e += a.c); + e += c2.F + c2.v * a.b; + j = new f7c(e, n); + m = new f7c(e, o2); + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [i3, j])); + h = c2.d.a.gc() > 1; + if (h) { + d = new f7c(e, c2.b); + Dsb(b.a, d); + } + n7c(b.a, OC(GC(m1, 1), nie, 8, 0, [m, l])); + } + function Nid(a, b, c2) { + var d, e, f2, g, h, i3; + if (!b) { + return null; + } else { + if (c2 <= -1) { + d = XKd(b.Tg(), -1 - c2); + if (JD(d, 99)) { + return BD(d, 18); + } else { + g = BD(b.ah(d), 153); + for (h = 0, i3 = g.gc(); h < i3; ++h) { + if (PD(g.jl(h)) === PD(a)) { + e = g.il(h); + if (JD(e, 99)) { + f2 = BD(e, 18); + if ((f2.Bb & ote) != 0) { + return f2; + } + } + } + } + throw vbb(new Zdb("The containment feature could not be located")); + } + } else { + return zUd(BD(XKd(a.Tg(), c2), 18)); + } + } + } + function Xee(a) { + var b, c2, d, e, f2; + d = a.length; + b = new Ifb(); + f2 = 0; + while (f2 < d) { + c2 = bfb(a, f2++); + if (c2 == 9 || c2 == 10 || c2 == 12 || c2 == 13 || c2 == 32) + continue; + if (c2 == 35) { + while (f2 < d) { + c2 = bfb(a, f2++); + if (c2 == 13 || c2 == 10) + break; + } + continue; + } + if (c2 == 92 && f2 < d) { + if ((e = (BCb(f2, a.length), a.charCodeAt(f2))) == 35 || e == 9 || e == 10 || e == 12 || e == 13 || e == 32) { + Afb(b, e & aje); + ++f2; + } else { + b.a += "\\"; + Afb(b, e & aje); + ++f2; + } + } else + Afb(b, c2 & aje); + } + return b.a; + } + function GVc(a, b) { + var c2, d, e; + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 33); + Rc(a.a, c2, c2); + Rc(a.b, c2, c2); + e = gVc(c2); + if (e.c.length != 0) { + !!a.d && a.d.lg(e); + Rc(a.a, c2, (tCb(0, e.c.length), BD(e.c[0], 33))); + Rc(a.b, c2, BD(Ikb(e, e.c.length - 1), 33)); + while (dVc(e).c.length != 0) { + e = dVc(e); + !!a.d && a.d.lg(e); + Rc(a.a, c2, (tCb(0, e.c.length), BD(e.c[0], 33))); + Rc(a.b, c2, BD(Ikb(e, e.c.length - 1), 33)); + } + } + } + } + function fnc(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + c2 = 0; + for (h = new olb(a.d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + !!g.i && (g.i.c = c2++); + } + b = IC(sbb, [nie, dle], [177, 25], 16, [c2, c2], 2); + k = a.d; + for (e = 0; e < k.c.length; e++) { + i3 = (tCb(e, k.c.length), BD(k.c[e], 101)); + if (i3.i) { + for (f2 = e + 1; f2 < k.c.length; f2++) { + j = (tCb(f2, k.c.length), BD(k.c[f2], 101)); + if (j.i) { + d = knc(i3, j); + b[i3.i.c][j.i.c] = d; + b[j.i.c][i3.i.c] = d; + } + } + } + } + return b; + } + function ht(a, b, c2, d) { + var e, f2, g; + g = new qu(b, c2); + if (!a.a) { + a.a = a.e = g; + Rhb(a.b, b, new pu(g)); + ++a.c; + } else if (!d) { + a.e.b = g; + g.d = a.e; + a.e = g; + e = BD(Ohb(a.b, b), 283); + if (!e) { + Rhb(a.b, b, e = new pu(g)); + ++a.c; + } else { + ++e.a; + f2 = e.c; + f2.c = g; + g.e = f2; + e.c = g; + } + } else { + e = BD(Ohb(a.b, b), 283); + ++e.a; + g.d = d.d; + g.e = d.e; + g.b = d; + g.c = d; + !d.e ? BD(Ohb(a.b, b), 283).b = g : d.e.c = g; + !d.d ? a.a = g : d.d.b = g; + d.d = g; + d.e = g; + } + ++a.d; + return g; + } + function mfb(a, b) { + var c2, d, e, f2, g, h, i3, j; + c2 = new RegExp(b, "g"); + i3 = KC(ZI, nie, 2, 0, 6, 1); + d = 0; + j = a; + f2 = null; + while (true) { + h = c2.exec(j); + if (h == null || j == "") { + i3[d] = j; + break; + } else { + g = h.index; + i3[d] = j.substr(0, g); + j = qfb(j, g + h[0].length, j.length); + c2.lastIndex = 0; + if (f2 == j) { + i3[d] = j.substr(0, 1); + j = j.substr(1); + } + f2 = j; + ++d; + } + } + if (a.length > 0) { + e = i3.length; + while (e > 0 && i3[e - 1] == "") { + --e; + } + e < i3.length && (i3.length = e); + } + return i3; + } + function f1d(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + l = _Kd(b); + j = null; + e = false; + for (h = 0, k = VKd(l.a).i; h < k; ++h) { + g = BD(nOd(l, h, (f2 = BD(qud(VKd(l.a), h), 87), i3 = f2.c, JD(i3, 88) ? BD(i3, 26) : (jGd(), _Fd))), 26); + c2 = f1d(a, g); + if (!c2.dc()) { + if (!j) { + j = c2; + } else { + if (!e) { + e = true; + j = new pFd(j); + } + j.Gc(c2); + } + } + } + d = k1d(a, b); + if (d.dc()) { + return !j ? (mmb(), mmb(), jmb) : j; + } else { + if (!j) { + return d; + } else { + e || (j = new pFd(j)); + j.Gc(d); + return j; + } + } + } + function g1d(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + l = _Kd(b); + j = null; + d = false; + for (h = 0, k = VKd(l.a).i; h < k; ++h) { + f2 = BD(nOd(l, h, (e = BD(qud(VKd(l.a), h), 87), i3 = e.c, JD(i3, 88) ? BD(i3, 26) : (jGd(), _Fd))), 26); + c2 = g1d(a, f2); + if (!c2.dc()) { + if (!j) { + j = c2; + } else { + if (!d) { + d = true; + j = new pFd(j); + } + j.Gc(c2); + } + } + } + g = n1d(a, b); + if (g.dc()) { + return !j ? (mmb(), mmb(), jmb) : j; + } else { + if (!j) { + return g; + } else { + d || (j = new pFd(j)); + j.Gc(g); + return j; + } + } + } + function B2d(a, b, c2) { + var d, e, f2, g, h, i3; + if (JD(b, 72)) { + return Txd(a, b, c2); + } else { + h = null; + f2 = null; + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + e = d[g]; + if (pb(b, e.dd())) { + f2 = e.ak(); + if (JD(f2, 99) && (BD(f2, 18).Bb & ote) != 0) { + h = e; + break; + } + } + } + if (h) { + if (oid(a.e)) { + i3 = f2.$j() ? H2d(a, 4, f2, b, null, M2d(a, f2, b, JD(f2, 99) && (BD(f2, 18).Bb & Tje) != 0), true) : H2d(a, f2.Kj() ? 2 : 1, f2, b, f2.zj(), -1, true); + c2 ? c2.Ei(i3) : c2 = i3; + } + c2 = B2d(a, h, c2); + } + return c2; + } + } + function pKb(a) { + var b, c2, d, e; + d = a.o; + $Jb(); + if (a.A.dc() || pb(a.A, ZJb)) { + e = d.a; + } else { + e = gIb(a.f); + if (a.A.Hc((tdd(), qdd)) && !a.B.Hc((Idd(), Edd))) { + e = $wnd.Math.max(e, gIb(BD(Mpb(a.p, (Ucd(), Acd)), 244))); + e = $wnd.Math.max(e, gIb(BD(Mpb(a.p, Rcd), 244))); + } + b = aKb(a); + !!b && (e = $wnd.Math.max(e, b.a)); + } + Ccb(DD(a.e.yf().We((Y9c(), $8c)))) ? d.a = $wnd.Math.max(d.a, e) : d.a = e; + c2 = a.f.i; + c2.c = 0; + c2.b = e; + hIb(a.f); + } + function $0d(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + c2 = b.Hh(a.a); + if (c2) { + i3 = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), "memberTypes")); + if (i3 != null) { + j = new Rkb(); + for (f2 = mfb(i3, "\\w"), g = 0, h = f2.length; g < h; ++g) { + e = f2[g]; + d = e.lastIndexOf("#"); + k = d == -1 ? w1d(a, b.Aj(), e) : d == 0 ? v1d(a, null, e.substr(1)) : v1d(a, e.substr(0, d), e.substr(d + 1)); + JD(k, 148) && Ekb(j, BD(k, 148)); + } + return j; + } + } + return mmb(), mmb(), jmb; + } + function tRb(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + Odd(c2, kme, 1); + a.bf(b); + f2 = 0; + while (a.df(f2)) { + for (k = new olb(b.e); k.a < k.c.c.length; ) { + i3 = BD(mlb(k), 144); + for (h = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [b.e, b.d, b.b]))); Qr(h); ) { + g = BD(Rr(h), 357); + if (g != i3) { + e = a.af(g, i3); + !!e && P6c(i3.a, e); + } + } + } + for (j = new olb(b.e); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 144); + d = i3.a; + Q6c(d, -a.d, -a.d, a.d, a.d); + P6c(i3.d, d); + X6c(d); + } + a.cf(); + ++f2; + } + Qdd(c2); + } + function $2d(a, b, c2) { + var d, e, f2, g; + g = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (f2 = 0; f2 < a.i; ++f2) { + e = d[f2]; + if (g.rl(e.ak())) { + if (pb(e, c2)) { + Xxd(a, f2); + return true; + } + } + } + } else if (c2 != null) { + for (f2 = 0; f2 < a.i; ++f2) { + e = d[f2]; + if (g.rl(e.ak())) { + if (pb(c2, e.dd())) { + Xxd(a, f2); + return true; + } + } + } + } else { + for (f2 = 0; f2 < a.i; ++f2) { + e = d[f2]; + if (g.rl(e.ak())) { + if (e.dd() == null) { + Xxd(a, f2); + return true; + } + } + } + } + return false; + } + function sDc(a, b) { + var c2, d, e, f2, g; + a.c == null || a.c.length < b.c.length ? a.c = KC(sbb, dle, 25, b.c.length, 16, 1) : Blb(a.c); + a.a = new Rkb(); + d = 0; + for (g = new olb(b); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + e.p = d++; + } + c2 = new Psb(); + for (f2 = new olb(b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + if (!a.c[e.p]) { + tDc(a, e); + c2.b == 0 || (sCb(c2.b != 0), BD(c2.a.a.c, 15)).gc() < a.a.c.length ? Esb(c2, a.a) : Fsb(c2, a.a); + a.a = new Rkb(); + } + } + return c2; + } + function jYc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2; + g = BD(qud(b, 0), 33); + dld(g, 0); + eld(g, 0); + m = new Rkb(); + m.c[m.c.length] = g; + h = g; + f2 = new d$c(a.a, g.g, g.f, (k$c(), j$c)); + for (n = 1; n < b.i; n++) { + o2 = BD(qud(b, n), 33); + i3 = kYc(a, g$c, o2, h, f2, m, c2); + j = kYc(a, f$c, o2, h, f2, m, c2); + k = kYc(a, i$c, o2, h, f2, m, c2); + l = kYc(a, h$c, o2, h, f2, m, c2); + e = mYc(a, i3, j, k, l, o2, h, d); + dld(o2, e.d); + eld(o2, e.e); + c$c(e, j$c); + f2 = e; + h = o2; + m.c[m.c.length] = o2; + } + return f2; + } + function K0c(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), ase), "ELK SPOrE Overlap Removal"), 'A node overlap removal algorithm proposed by Nachmanson et al. in "Node overlap removal by growing a tree".'), new N0c()))); + p4c(a, ase, Qre, Ksd(I0c)); + p4c(a, ase, ame, G0c); + p4c(a, ase, wme, 8); + p4c(a, ase, Vre, Ksd(H0c)); + p4c(a, ase, Yre, Ksd(E0c)); + p4c(a, ase, Zre, Ksd(F0c)); + p4c(a, ase, Zpe, (Bcb(), false)); + } + function sXb(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n; + g = O6c(b.c, c2, d); + for (l = new olb(b.a); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + P6c(k.n, g); + for (n = new olb(k.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + for (f2 = new olb(m.g); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 17); + q7c(e.a, g); + h = BD(vNb(e, (Nyc(), jxc)), 74); + !!h && q7c(h, g); + for (j = new olb(e.b); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 70); + P6c(i3.n, g); + } + } + } + Ekb(a.a, k); + k.a = a; + } + } + function g9b(a, b) { + var c2, d, e, f2, g; + Odd(b, "Node and Port Label Placement and Node Sizing", 1); + MGb((a$b(), new l$b(a, true, true, new j9b()))); + if (BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + f2 = BD(vNb(a, (Nyc(), Yxc)), 21); + e = f2.Hc((rcd(), ocd)); + g = Ccb(DD(vNb(a, Zxc))); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + MAb(JAb(new YAb(null, new Kub(c2.a, 16)), new l9b()), new n9b(f2, e, g)); + } + } + Qdd(b); + } + function Y0d(a, b) { + var c2, d, e, f2, g, h; + c2 = b.Hh(a.a); + if (c2) { + h = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), eue)); + if (h != null) { + e = kfb(h, wfb(35)); + d = b.Hj(); + if (e == -1) { + g = u1d(a, bKd(d)); + f2 = h; + } else if (e == 0) { + g = null; + f2 = h.substr(1); + } else { + g = h.substr(0, e); + f2 = h.substr(e + 1); + } + switch ($1d(q1d(a, b))) { + case 2: + case 3: { + return j1d(a, d, g, f2); + } + case 0: + case 4: + case 5: + case 6: { + return m1d(a, d, g, f2); + } + } + } + } + return null; + } + function q2d(a, b, c2) { + var d, e, f2, g, h; + g = (Q6d(), BD(b, 66).Oj()); + if (T6d(a.e, b)) { + if (b.hi() && F2d(a, b, c2, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + return false; + } + } else { + h = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + for (f2 = 0; f2 < a.i; ++f2) { + e = d[f2]; + if (h.rl(e.ak())) { + if (g ? pb(e, c2) : c2 == null ? e.dd() == null : pb(c2, e.dd())) { + return false; + } else { + BD(Gtd(a, f2, g ? BD(c2, 72) : R6d(b, c2)), 72); + return true; + } + } + } + } + return wtd(a, g ? BD(c2, 72) : R6d(b, c2)); + } + function uVb(a) { + var b, c2, d, e, f2, g, h, i3; + if (a.d) { + throw vbb(new Zdb((fdb(LP), Jke + LP.k + Kke))); + } + a.c == (ead(), cad) && tVb(a, aad); + for (c2 = new olb(a.a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 189); + b.e = 0; + } + for (g = new olb(a.a.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 81); + f2.o = Qje; + for (e = f2.f.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 81); + ++d.d.e; + } + } + JVb(a); + for (i3 = new olb(a.a.b); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 81); + h.k = true; + } + return a; + } + function Ijc(a, b) { + var c2, d, e, f2, g, h, i3, j; + h = new pjc(a); + c2 = new Psb(); + Gsb(c2, b, c2.c.b, c2.c); + while (c2.b != 0) { + d = BD(c2.b == 0 ? null : (sCb(c2.b != 0), Nsb(c2, c2.a.a)), 113); + d.d.p = 1; + for (g = new olb(d.e); g.a < g.c.c.length; ) { + e = BD(mlb(g), 409); + kjc(h, e); + j = e.d; + j.d.p == 0 && (Gsb(c2, j, c2.c.b, c2.c), true); + } + for (f2 = new olb(d.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 409); + kjc(h, e); + i3 = e.c; + i3.d.p == 0 && (Gsb(c2, i3, c2.c.b, c2.c), true); + } + } + return h; + } + function hfd(a) { + var b, c2, d, e, f2; + d = Edb(ED(hkd(a, (Y9c(), G9c)))); + if (d == 1) { + return; + } + _kd(a, d * a.g, d * a.f); + c2 = Mq(Rq((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c), new Hfd())); + for (f2 = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.n && (a.n = new cUd(D2, a, 1, 7)), a.n), (!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c), c2]))); Qr(f2); ) { + e = BD(Rr(f2), 470); + e.Gg(d * e.Dg(), d * e.Eg()); + e.Fg(d * e.Cg(), d * e.Bg()); + b = BD(e.We(r9c), 8); + if (b) { + b.a *= d; + b.b *= d; + } + } + } + function Mac(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m; + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + m = l_b(f2.a); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i3 = j[k]; + switch (BD(vNb(i3, (Nyc(), mxc)), 163).g) { + case 1: + Qac(i3); + $_b(i3, b); + Nac(i3, true, d); + break; + case 3: + Rac(i3); + $_b(i3, c2); + Nac(i3, false, e); + } + } + } + h = new Bib(a.b, 0); + while (h.b < h.d.gc()) { + (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29)).a.c.length == 0 && uib(h); + } + } + function d1d(a, b) { + var c2, d, e, f2, g, h, i3; + c2 = b.Hh(a.a); + if (c2) { + i3 = GD(AAd((!c2.b && (c2.b = new sId((jGd(), fGd), x6, c2)), c2.b), Dwe)); + if (i3 != null) { + d = new Rkb(); + for (f2 = mfb(i3, "\\w"), g = 0, h = f2.length; g < h; ++g) { + e = f2[g]; + dfb(e, "##other") ? Ekb(d, "!##" + u1d(a, bKd(b.Hj()))) : dfb(e, "##local") ? (d.c[d.c.length] = null, true) : dfb(e, Bwe) ? Ekb(d, u1d(a, bKd(b.Hj()))) : (d.c[d.c.length] = e, true); + } + return d; + } + } + return mmb(), mmb(), jmb; + } + function kMb(a, b) { + var c2, d, e, f2; + c2 = new pMb(); + d = BD(GAb(NAb(new YAb(null, new Kub(a.f, 16)), c2), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + e = d.gc(); + d = BD(GAb(NAb(new YAb(null, new Kub(b.f, 16)), c2), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [Eyb, Dyb]))), 21); + f2 = d.gc(); + e = e == 1 ? 1 : 0; + f2 = f2 == 1 ? 1 : 0; + if (e < f2) { + return -1; + } + if (e == f2) { + return 0; + } + return 1; + } + function hZb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + h = a.i; + e = Ccb(DD(vNb(h, (Nyc(), fxc)))); + k = 0; + d = 0; + for (j = new olb(a.g); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 17); + g = OZb(i3); + f2 = g && e && Ccb(DD(vNb(i3, gxc))); + m = i3.d.i; + g && f2 ? ++d : g && !f2 ? ++k : Q_b(m).e == h ? ++d : ++k; + } + for (c2 = new olb(a.e); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 17); + g = OZb(b); + f2 = g && e && Ccb(DD(vNb(b, gxc))); + l = b.c.i; + g && f2 ? ++k : g && !f2 ? ++d : Q_b(l).e == h ? ++k : ++d; + } + return k - d; + } + function ULc(a, b, c2, d) { + this.e = a; + this.k = BD(vNb(a, (wtc(), otc)), 304); + this.g = KC(OQ, kne, 10, b, 0, 1); + this.b = KC(BI, nie, 333, b, 7, 1); + this.a = KC(OQ, kne, 10, b, 0, 1); + this.d = KC(BI, nie, 333, b, 7, 1); + this.j = KC(OQ, kne, 10, b, 0, 1); + this.i = KC(BI, nie, 333, b, 7, 1); + this.p = KC(BI, nie, 333, b, 7, 1); + this.n = KC(wI, nie, 476, b, 8, 1); + Alb(this.n, (Bcb(), false)); + this.f = KC(wI, nie, 476, b, 8, 1); + Alb(this.f, true); + this.o = c2; + this.c = d; + } + function X9b(a, b) { + var c2, d, e, f2, g, h; + if (b.dc()) { + return; + } + if (BD(b.Xb(0), 286).d == (Apc(), xpc)) { + O9b(a, b); + } else { + for (d = b.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 286); + switch (c2.d.g) { + case 5: + K9b(a, c2, Q9b(a, c2)); + break; + case 0: + K9b(a, c2, (g = c2.f - c2.c + 1, h = (g - 1) / 2 | 0, c2.c + h)); + break; + case 4: + K9b(a, c2, S9b(a, c2)); + break; + case 2: + Y9b(c2); + K9b(a, c2, (f2 = U9b(c2), f2 ? c2.c : c2.f)); + break; + case 1: + Y9b(c2); + K9b(a, c2, (e = U9b(c2), e ? c2.f : c2.c)); + } + P9b(c2.a); + } + } + } + function C4b(a, b) { + var c2, d, e, f2, g, h, i3; + if (b.e) { + return; + } + b.e = true; + for (d = b.d.a.ec().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 17); + if (b.o && b.d.a.gc() <= 1) { + g = b.a.c; + h = b.a.c + b.a.b; + i3 = new f7c(g + (h - g) / 2, b.b); + Dsb(BD(b.d.a.ec().Kc().Pb(), 17).a, i3); + continue; + } + e = BD(Ohb(b.c, c2), 459); + if (e.b || e.c) { + E4b(a, c2, b); + continue; + } + f2 = a.d == (tBc(), sBc) && (e.d || e.e) && K4b(a, b) && b.d.a.gc() <= 1; + f2 ? F4b(c2, b) : D4b(a, c2, b); + } + b.k && reb(b.d, new X4b()); + } + function zXc(a, b, c2, d, e, f2) { + var g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + m = f2; + h = (d + e) / 2 + m; + q = c2 * $wnd.Math.cos(h); + r = c2 * $wnd.Math.sin(h); + s = q - b.g / 2; + t = r - b.f / 2; + dld(b, s); + eld(b, t); + l = a.a.jg(b); + p = 2 * $wnd.Math.acos(c2 / c2 + a.c); + if (p < e - d) { + n = p / l; + g = (d + e - p) / 2; + } else { + n = (e - d) / l; + g = d; + } + o2 = gVc(b); + if (a.e) { + a.e.kg(a.d); + a.e.lg(o2); + } + for (j = new olb(o2); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 33); + k = a.a.jg(i3); + zXc(a, i3, c2 + a.c, g, g + n * k, f2); + g += n * k; + } + } + function jA(a, b, c2) { + var d; + d = c2.q.getMonth(); + switch (b) { + case 5: + Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"])[d]); + break; + case 4: + Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje])[d]); + break; + case 3: + Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])[d]); + break; + default: + EA(a, d + 1, b); + } + } + function uGb(a, b) { + var c2, d, e, f2, g; + Odd(b, "Network simplex", 1); + if (a.e.a.c.length < 1) { + Qdd(b); + return; + } + for (f2 = new olb(a.e.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 121); + e.e = 0; + } + g = a.e.a.c.length >= 40; + g && FGb(a); + wGb(a); + vGb(a); + c2 = zGb(a); + d = 0; + while (!!c2 && d < a.f) { + tGb(a, c2, sGb(a, c2)); + c2 = zGb(a); + ++d; + } + g && EGb(a); + a.a ? qGb(a, CGb(a)) : CGb(a); + a.b = null; + a.d = null; + a.p = null; + a.c = null; + a.g = null; + a.i = null; + a.n = null; + a.o = null; + Qdd(b); + } + function JQb(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m; + i3 = new f7c(c2, d); + c7c(i3, BD(vNb(b, (HSb(), ESb)), 8)); + for (m = new olb(b.e); m.a < m.c.c.length; ) { + l = BD(mlb(m), 144); + P6c(l.d, i3); + Ekb(a.e, l); + } + for (h = new olb(b.c); h.a < h.c.c.length; ) { + g = BD(mlb(h), 282); + for (f2 = new olb(g.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 559); + P6c(e.d, i3); + } + Ekb(a.c, g); + } + for (k = new olb(b.d); k.a < k.c.c.length; ) { + j = BD(mlb(k), 447); + P6c(j.d, i3); + Ekb(a.d, j); + } + } + function _Bc(a, b) { + var c2, d, e, f2, g, h, i3, j; + for (i3 = new olb(b.j); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 11); + for (e = new b1b(h.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + c2 = d.c == h ? d.d : d.c; + f2 = c2.i; + if (b == f2) { + continue; + } + j = BD(vNb(d, (Nyc(), cyc)), 19).a; + j < 0 && (j = 0); + g = f2.p; + if (a.b[g] == 0) { + if (d.d == c2) { + a.a[g] -= j + 1; + a.a[g] <= 0 && a.c[g] > 0 && Dsb(a.f, f2); + } else { + a.c[g] -= j + 1; + a.c[g] <= 0 && a.a[g] > 0 && Dsb(a.e, f2); + } + } + } + } + } + function _Kb(a) { + var b, c2, d, e, f2, g, h, i3, j; + h = new Hxb(BD(Qb(new nLb()), 62)); + j = Qje; + for (c2 = new olb(a.d); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 222); + j = b.c.c; + while (h.a.c != 0) { + i3 = BD(zjb(Bwb(h.a)), 222); + if (i3.c.c + i3.c.b < j) { + Jwb(h.a, i3) != null; + } else { + break; + } + } + for (g = (e = new Ywb(new cxb(new Gjb(h.a).a).b), new Njb(e)); sib(g.a.a); ) { + f2 = (d = Wwb(g.a), BD(d.cd(), 222)); + Dsb(f2.b, b); + Dsb(b.b, f2); + } + Iwb(h.a, b, (Bcb(), zcb)) == null; + } + } + function QEc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + f2 = new Skb(b.c.length); + for (j = new olb(b); j.a < j.c.c.length; ) { + g = BD(mlb(j), 10); + Ekb(f2, a.b[g.c.p][g.p]); + } + LEc(a, f2, c2); + l = null; + while (l = MEc(f2)) { + NEc(a, BD(l.a, 233), BD(l.b, 233), f2); + } + b.c = KC(SI, Uhe, 1, 0, 5, 1); + for (e = new olb(f2); e.a < e.c.c.length; ) { + d = BD(mlb(e), 233); + for (h = d.d, i3 = 0, k = h.length; i3 < k; ++i3) { + g = h[i3]; + b.c[b.c.length] = g; + a.a[g.c.p][g.p].a = REc(d.g, d.d[0]).a; + } + } + } + function JRc(a, b) { + var c2, d, e, f2; + if (0 < (JD(a, 14) ? BD(a, 14).gc() : sr(a.Kc()))) { + e = b; + if (1 < e) { + --e; + f2 = new KRc(); + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 86); + f2 = pl(OC(GC(KI, 1), Uhe, 20, 0, [f2, new ZRc(c2)])); + } + return JRc(f2, e); + } + if (e < 0) { + f2 = new NRc(); + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 86); + f2 = pl(OC(GC(KI, 1), Uhe, 20, 0, [f2, new ZRc(c2)])); + } + if (0 < (JD(f2, 14) ? BD(f2, 14).gc() : sr(f2.Kc()))) { + return JRc(f2, e); + } + } + } + return BD(pr(a.Kc()), 86); + } + function Idd() { + Idd = ccb; + Bdd = new Jdd("DEFAULT_MINIMUM_SIZE", 0); + Ddd = new Jdd("MINIMUM_SIZE_ACCOUNTS_FOR_PADDING", 1); + Add = new Jdd("COMPUTE_PADDING", 2); + Edd = new Jdd("OUTSIDE_NODE_LABELS_OVERHANG", 3); + Fdd = new Jdd("PORTS_OVERHANG", 4); + Hdd = new Jdd("UNIFORM_PORT_SPACING", 5); + Gdd = new Jdd("SPACE_EFFICIENT_PORT_LABELS", 6); + Cdd = new Jdd("FORCE_TABULAR_NODE_LABELS", 7); + zdd = new Jdd("ASYMMETRICAL", 8); + } + function s6d(a, b) { + var c2, d, e, f2, g, h, i3, j; + if (!b) { + return null; + } else { + c2 = (f2 = b.Tg(), !f2 ? null : bKd(f2).Nh().Jh(f2)); + if (c2) { + Xrb(a, b, c2); + e = b.Tg(); + for (i3 = 0, j = (e.i == null && TKd(e), e.i).length; i3 < j; ++i3) { + h = (d = (e.i == null && TKd(e), e.i), i3 >= 0 && i3 < d.length ? d[i3] : null); + if (h.Ij() && !h.Jj()) { + if (JD(h, 322)) { + u6d(a, BD(h, 34), b, c2); + } else { + g = BD(h, 18); + (g.Bb & ote) != 0 && w6d(a, g, b, c2); + } + } + } + b.kh() && BD(c2, 49).vh(BD(b, 49).qh()); + } + return c2; + } + } + function tGb(a, b, c2) { + var d, e, f2; + if (!b.f) { + throw vbb(new Wdb("Given leave edge is no tree edge.")); + } + if (c2.f) { + throw vbb(new Wdb("Given enter edge is a tree edge already.")); + } + b.f = false; + Sqb(a.p, b); + c2.f = true; + Qqb(a.p, c2); + d = c2.e.e - c2.d.e - c2.a; + xGb(a, c2.e, b) || (d = -d); + for (f2 = new olb(a.e.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 121); + xGb(a, e, b) || (e.e += d); + } + a.j = 1; + Blb(a.c); + DGb(a, BD(mlb(new olb(a.e.a)), 121)); + rGb(a); + } + function x6b(a, b) { + var c2, d, e, f2, g, h; + h = BD(vNb(b, (Nyc(), Vxc)), 98); + if (!(h == (dcd(), _bd) || h == $bd)) { + return; + } + e = new f7c(b.f.a + b.d.b + b.d.c, b.f.b + b.d.d + b.d.a).b; + for (g = new olb(a.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + if (f2.k != (j0b(), e0b)) { + continue; + } + c2 = BD(vNb(f2, (wtc(), Hsc)), 61); + if (c2 != (Ucd(), zcd) && c2 != Tcd) { + continue; + } + d = Edb(ED(vNb(f2, htc))); + h == _bd && (d *= e); + f2.n.b = d - BD(vNb(f2, Txc), 8).b; + M_b(f2, false, true); + } + } + function YDc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n; + bEc(a, b, c2); + f2 = b[c2]; + n = d ? (Ucd(), Tcd) : (Ucd(), zcd); + if (ZDc(b.length, c2, d)) { + e = b[d ? c2 - 1 : c2 + 1]; + UDc(a, e, d ? (KAc(), IAc) : (KAc(), HAc)); + for (i3 = f2, k = 0, m = i3.length; k < m; ++k) { + g = i3[k]; + XDc(a, g, n); + } + UDc(a, f2, d ? (KAc(), HAc) : (KAc(), IAc)); + for (h = e, j = 0, l = h.length; j < l; ++j) { + g = h[j]; + !!g.e || XDc(a, g, Wcd(n)); + } + } else { + for (h = f2, j = 0, l = h.length; j < l; ++j) { + g = h[j]; + XDc(a, g, n); + } + } + return false; + } + function nFc(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + i3 = V_b(b, c2); + (c2 == (Ucd(), Rcd) || c2 == Tcd) && (i3 = JD(i3, 152) ? km(BD(i3, 152)) : JD(i3, 131) ? BD(i3, 131).a : JD(i3, 54) ? new ov(i3) : new dv(i3)); + g = false; + do { + e = false; + for (f2 = 0; f2 < i3.gc() - 1; f2++) { + j = BD(i3.Xb(f2), 11); + h = BD(i3.Xb(f2 + 1), 11); + if (oFc(a, j, h, d)) { + g = true; + cIc(a.a, BD(i3.Xb(f2), 11), BD(i3.Xb(f2 + 1), 11)); + k = BD(i3.Xb(f2 + 1), 11); + i3._c(f2 + 1, BD(i3.Xb(f2), 11)); + i3._c(f2, k); + e = true; + } + } + } while (e); + return g; + } + function W2d(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2; + if (oid(a.e)) { + if (b != c2) { + e = BD(a.g, 119); + n = e[c2]; + g = n.ak(); + if (T6d(a.e, g)) { + o2 = S6d(a.e.Tg(), g); + i3 = -1; + h = -1; + d = 0; + for (j = 0, l = b > c2 ? b : c2; j <= l; ++j) { + if (j == c2) { + h = d++; + } else { + f2 = e[j]; + k = o2.rl(f2.ak()); + j == b && (i3 = j == l && !k ? d - 1 : d); + k && ++d; + } + } + m = BD(Wxd(a, b, c2), 72); + h != i3 && GLd(a, new ESd(a.e, 7, g, meb(h), n.dd(), i3)); + return m; + } + } + } else { + return BD(sud(a, b, c2), 72); + } + return BD(Wxd(a, b, c2), 72); + } + function Qcc(a, b) { + var c2, d, e, f2, g, h, i3; + Odd(b, "Port order processing", 1); + i3 = BD(vNb(a, (Nyc(), _xc)), 421); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + for (f2 = new olb(c2.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + g = BD(vNb(e, Vxc), 98); + h = e.j; + if (g == (dcd(), Zbd) || g == _bd || g == $bd) { + mmb(); + Okb(h, Icc); + } else if (g != bcd && g != ccd) { + mmb(); + Okb(h, Lcc); + Scc(h); + i3 == (BAc(), AAc) && Okb(h, Kcc); + } + e.i = true; + N_b(e); + } + } + Qdd(b); + } + function vDc(a) { + var b, c2, d, e, f2, g, h, i3; + i3 = new Lqb(); + b = new KFb(); + for (g = a.Kc(); g.Ob(); ) { + e = BD(g.Pb(), 10); + h = nGb(oGb(new pGb(), e), b); + jrb(i3.f, e, h); + } + for (f2 = a.Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 10); + for (d = new Sr(ur(U_b(e).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + if (OZb(c2)) { + continue; + } + AFb(DFb(CFb(BFb(EFb(new FFb(), $wnd.Math.max(1, BD(vNb(c2, (Nyc(), dyc)), 19).a)), 1), BD(Ohb(i3, c2.c.i), 121)), BD(Ohb(i3, c2.d.i), 121))); + } + } + return b; + } + function tNc() { + tNc = ccb; + oNc = e3c(new j3c(), (qUb(), oUb), (S8b(), k8b)); + qNc = e3c(new j3c(), nUb, o8b); + rNc = c3c(e3c(new j3c(), nUb, C8b), pUb, B8b); + nNc = c3c(e3c(e3c(new j3c(), nUb, e8b), oUb, f8b), pUb, g8b); + sNc = b3c(b3c(g3c(c3c(e3c(new j3c(), lUb, M8b), pUb, L8b), oUb), K8b), N8b); + pNc = c3c(new j3c(), pUb, l8b); + lNc = c3c(e3c(e3c(e3c(new j3c(), mUb, r8b), oUb, t8b), oUb, u8b), pUb, s8b); + mNc = c3c(e3c(e3c(new j3c(), oUb, u8b), oUb, _7b), pUb, $7b); + } + function XC(a, b, c2, d, e, f2) { + var g, h, i3, j, k, l, m; + j = $C(b) - $C(a); + g = kD(b, j); + i3 = TC(0, 0, 0); + while (j >= 0) { + h = bD(a, g); + if (h) { + j < 22 ? (i3.l |= 1 << j, void 0) : j < 44 ? (i3.m |= 1 << j - 22, void 0) : (i3.h |= 1 << j - 44, void 0); + if (a.l == 0 && a.m == 0 && a.h == 0) { + break; + } + } + k = g.m; + l = g.h; + m = g.l; + g.h = l >>> 1; + g.m = k >>> 1 | (l & 1) << 21; + g.l = m >>> 1 | (k & 1) << 21; + --j; + } + c2 && ZC(i3); + if (f2) { + if (d) { + QC = hD(a); + e && (QC = nD(QC, (wD(), uD))); + } else { + QC = TC(a.l, a.m, a.h); + } + } + return i3; + } + function TDc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + j = a.e[b.c.p][b.p] + 1; + i3 = b.c.a.c.length + 1; + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + l = 0; + f2 = 0; + for (e = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(g), new R0b(g)]))); Qr(e); ) { + d = BD(Rr(e), 11); + if (d.i.c == b.c) { + l += aEc(a, d.i) + 1; + ++f2; + } + } + c2 = l / f2; + k = g.j; + k == (Ucd(), zcd) ? c2 < j ? a.f[g.p] = a.c - c2 : a.f[g.p] = a.b + (i3 - c2) : k == Tcd && (c2 < j ? a.f[g.p] = a.b + c2 : a.f[g.p] = a.c - (i3 - c2)); + } + } + function Icb(a, b, c2) { + var d, e, f2, g, h; + if (a == null) { + throw vbb(new Oeb(Xhe)); + } + f2 = a.length; + g = f2 > 0 && (BCb(0, a.length), a.charCodeAt(0) == 45 || (BCb(0, a.length), a.charCodeAt(0) == 43)) ? 1 : 0; + for (d = g; d < f2; d++) { + if (Zcb((BCb(d, a.length), a.charCodeAt(d))) == -1) { + throw vbb(new Oeb(Oje + a + '"')); + } + } + h = parseInt(a, 10); + e = h < b; + if (isNaN(h)) { + throw vbb(new Oeb(Oje + a + '"')); + } else if (e || h > c2) { + throw vbb(new Oeb(Oje + a + '"')); + } + return h; + } + function dnc(a) { + var b, c2, d, e, f2, g, h; + g = new Psb(); + for (f2 = new olb(a.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 112); + pOc(e, e.f.c.length); + qOc(e, e.k.c.length); + if (e.i == 0) { + e.o = 0; + Gsb(g, e, g.c.b, g.c); + } + } + while (g.b != 0) { + e = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 112); + d = e.o + 1; + for (c2 = new olb(e.f); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 129); + h = b.a; + rOc(h, $wnd.Math.max(h.o, d)); + qOc(h, h.i - 1); + h.i == 0 && (Gsb(g, h, g.c.b, g.c), true); + } + } + } + function v2c(a) { + var b, c2, d, e, f2, g, h, i3; + for (g = new olb(a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 79); + d = atd(BD(qud((!f2.b && (f2.b = new y5d(z2, f2, 4, 7)), f2.b), 0), 82)); + h = d.i; + i3 = d.j; + e = BD(qud((!f2.a && (f2.a = new cUd(A2, f2, 6, 6)), f2.a), 0), 202); + nmd(e, e.j + h, e.k + i3); + gmd(e, e.b + h, e.c + i3); + for (c2 = new Fyd((!e.a && (e.a = new xMd(y2, e, 5)), e.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 469); + ukd(b, b.a + h, b.b + i3); + } + p7c(BD(hkd(f2, (Y9c(), Q8c)), 74), h, i3); + } + } + function fee(a) { + var b; + switch (a) { + case 100: + return kee(nxe, true); + case 68: + return kee(nxe, false); + case 119: + return kee(oxe, true); + case 87: + return kee(oxe, false); + case 115: + return kee(pxe, true); + case 83: + return kee(pxe, false); + case 99: + return kee(qxe, true); + case 67: + return kee(qxe, false); + case 105: + return kee(rxe, true); + case 73: + return kee(rxe, false); + default: + throw vbb(new hz((b = a, mxe + b.toString(16)))); + } + } + function $Xb(a) { + var b, c2, d, e, f2; + e = BD(Ikb(a.a, 0), 10); + b = new b0b(a); + Ekb(a.a, b); + b.o.a = $wnd.Math.max(1, e.o.a); + b.o.b = $wnd.Math.max(1, e.o.b); + b.n.a = e.n.a; + b.n.b = e.n.b; + switch (BD(vNb(e, (wtc(), Hsc)), 61).g) { + case 4: + b.n.a += 2; + break; + case 1: + b.n.b += 2; + break; + case 2: + b.n.a -= 2; + break; + case 3: + b.n.b -= 2; + } + d = new H0b(); + F0b(d, b); + c2 = new UZb(); + f2 = BD(Ikb(e.j, 0), 11); + QZb(c2, f2); + RZb(c2, d); + P6c(X6c(d.n), f2.n); + P6c(X6c(d.a), f2.a); + return b; + } + function Fac(a, b, c2, d, e) { + if (c2 && (!d || (a.c - a.b & a.a.length - 1) > 1) && b == 1 && BD(a.a[a.b], 10).k == (j0b(), f0b)) { + zac(BD(a.a[a.b], 10), (rbd(), nbd)); + } else if (d && (!c2 || (a.c - a.b & a.a.length - 1) > 1) && b == 1 && BD(a.a[a.c - 1 & a.a.length - 1], 10).k == (j0b(), f0b)) { + zac(BD(a.a[a.c - 1 & a.a.length - 1], 10), (rbd(), obd)); + } else if ((a.c - a.b & a.a.length - 1) == 2) { + zac(BD(bkb(a), 10), (rbd(), nbd)); + zac(BD(bkb(a), 10), obd); + } else { + wac(a, e); + } + Yjb(a); + } + function pRc(a, b, c2) { + var d, e, f2, g, h; + f2 = 0; + for (e = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + g = ""; + (!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n).i == 0 || (g = BD(qud((!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n), 0), 137).a); + h = new XRc(f2++, b, g); + tNb(h, d); + yNb(h, (mTc(), dTc), d); + h.e.b = d.j + d.f / 2; + h.f.a = $wnd.Math.max(d.g, 1); + h.e.a = d.i + d.g / 2; + h.f.b = $wnd.Math.max(d.f, 1); + Dsb(b.b, h); + jrb(c2.f, d, h); + } + } + function B2b(a) { + var b, c2, d, e, f2; + d = BD(vNb(a, (wtc(), $sc)), 33); + f2 = BD(hkd(d, (Nyc(), Fxc)), 174).Hc((tdd(), sdd)); + if (!a.e) { + e = BD(vNb(a, Ksc), 21); + b = new f7c(a.f.a + a.d.b + a.d.c, a.f.b + a.d.d + a.d.a); + if (e.Hc((Orc(), Hrc))) { + jkd(d, Vxc, (dcd(), $bd)); + Afd(d, b.a, b.b, false, true); + } else { + Ccb(DD(hkd(d, Gxc))) || Afd(d, b.a, b.b, true, true); + } + } + f2 ? jkd(d, Fxc, pqb(sdd)) : jkd(d, Fxc, (c2 = BD(gdb(I1), 9), new xqb(c2, BD(_Bb(c2, c2.length), 9), 0))); + } + function tA(a, b, c2) { + var d, e, f2, g; + if (b[0] >= a.length) { + c2.o = 0; + return true; + } + switch (bfb(a, b[0])) { + case 43: + e = 1; + break; + case 45: + e = -1; + break; + default: + c2.o = 0; + return true; + } + ++b[0]; + f2 = b[0]; + g = rA(a, b); + if (g == 0 && b[0] == f2) { + return false; + } + if (b[0] < a.length && bfb(a, b[0]) == 58) { + d = g * 60; + ++b[0]; + f2 = b[0]; + g = rA(a, b); + if (g == 0 && b[0] == f2) { + return false; + } + d += g; + } else { + d = g; + d < 24 && b[0] - f2 <= 2 ? d *= 60 : d = d % 100 + (d / 100 | 0) * 60; + } + d *= e; + c2.o = -d; + return true; + } + function Hjc(a) { + var b, c2, d, e, f2, g, h, i3, j; + g = new Rkb(); + for (d = new Sr(ur(U_b(a.b).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + OZb(c2) && Ekb(g, new Gjc(c2, Jjc(a, c2.c), Jjc(a, c2.d))); + } + for (j = (f2 = new $ib(a.e).a.vc().Kc(), new djb(f2)); j.a.Ob(); ) { + h = (b = BD(j.a.Pb(), 42), BD(b.dd(), 113)); + h.d.p = 0; + } + for (i3 = (e = new $ib(a.e).a.vc().Kc(), new djb(e)); i3.a.Ob(); ) { + h = (b = BD(i3.a.Pb(), 42), BD(b.dd(), 113)); + h.d.p == 0 && Ekb(a.d, Ijc(a, h)); + } + } + function W1b(a) { + var b, c2, d, e, f2, g, h; + f2 = mpd(a); + for (e = new Fyd((!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 79); + h = atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82)); + if (!ntd(h, f2)) { + return true; + } + } + for (c2 = new Fyd((!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 79); + g = atd(BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82)); + if (!ntd(g, f2)) { + return true; + } + } + return false; + } + function Dmc(a) { + var b, c2, d, e, f2, g, h, i3; + i3 = new s7c(); + b = Jsb(a, 0); + h = null; + c2 = BD(Xsb(b), 8); + e = BD(Xsb(b), 8); + while (b.b != b.d.c) { + h = c2; + c2 = e; + e = BD(Xsb(b), 8); + f2 = Emc(c7c(new f7c(h.a, h.b), c2)); + g = Emc(c7c(new f7c(e.a, e.b), c2)); + d = 10; + d = $wnd.Math.min(d, $wnd.Math.abs(f2.a + f2.b) / 2); + d = $wnd.Math.min(d, $wnd.Math.abs(g.a + g.b) / 2); + f2.a = Eeb(f2.a) * d; + f2.b = Eeb(f2.b) * d; + g.a = Eeb(g.a) * d; + g.b = Eeb(g.b) * d; + Dsb(i3, P6c(f2, c2)); + Dsb(i3, P6c(g, c2)); + } + return i3; + } + function _hd(a, b, c2, d) { + var e, f2, g, h, i3; + g = a.eh(); + i3 = a.Zg(); + e = null; + if (i3) { + if (!!b && (Nid(a, b, c2).Bb & Tje) == 0) { + d = Txd(i3.Vk(), a, d); + a.uh(null); + e = b.fh(); + } else { + i3 = null; + } + } else { + !!g && (i3 = g.fh()); + !!b && (e = b.fh()); + } + i3 != e && !!i3 && i3.Zk(a); + h = a.Vg(); + a.Rg(b, c2); + i3 != e && !!e && e.Yk(a); + if (a.Lg() && a.Mg()) { + if (!!g && h >= 0 && h != c2) { + f2 = new nSd(a, 1, h, g, null); + !d ? d = f2 : d.Ei(f2); + } + if (c2 >= 0) { + f2 = new nSd(a, 1, c2, h == c2 ? g : null, b); + !d ? d = f2 : d.Ei(f2); + } + } + return d; + } + function LEd(a) { + var b, c2, d; + if (a.b == null) { + d = new Hfb(); + if (a.i != null) { + Efb(d, a.i); + d.a += ":"; + } + if ((a.f & 256) != 0) { + if ((a.f & 256) != 0 && a.a != null) { + YEd(a.i) || (d.a += "//", d); + Efb(d, a.a); + } + if (a.d != null) { + d.a += "/"; + Efb(d, a.d); + } + (a.f & 16) != 0 && (d.a += "/", d); + for (b = 0, c2 = a.j.length; b < c2; b++) { + b != 0 && (d.a += "/", d); + Efb(d, a.j[b]); + } + if (a.g != null) { + d.a += "?"; + Efb(d, a.g); + } + } else { + Efb(d, a.a); + } + if (a.e != null) { + d.a += "#"; + Efb(d, a.e); + } + a.b = d.a; + } + return a.b; + } + function E5b(a, b) { + var c2, d, e, f2, g, h; + for (e = new olb(b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + f2 = vNb(d, (wtc(), $sc)); + if (JD(f2, 11)) { + g = BD(f2, 11); + h = b_b(b, d, g.o.a, g.o.b); + g.n.a = h.a; + g.n.b = h.b; + G0b(g, BD(vNb(d, Hsc), 61)); + } + } + c2 = new f7c(b.f.a + b.d.b + b.d.c, b.f.b + b.d.d + b.d.a); + if (BD(vNb(b, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + yNb(a, (Nyc(), Vxc), (dcd(), $bd)); + BD(vNb(Q_b(a), Ksc), 21).Fc(Krc); + j_b(a, c2, false); + } else { + j_b(a, c2, true); + } + } + function YFc(a, b, c2) { + var d, e, f2, g, h, i3; + Odd(c2, "Minimize Crossings " + a.a, 1); + d = b.b.c.length == 0 || !WAb(JAb(new YAb(null, new Kub(b.b, 16)), new Xxb(new xGc()))).sd((EAb(), DAb)); + i3 = b.b.c.length == 1 && BD(Ikb(b.b, 0), 29).a.c.length == 1; + f2 = PD(vNb(b, (Nyc(), axc))) === PD((hbd(), ebd)); + if (d || i3 && !f2) { + Qdd(c2); + return; + } + e = TFc(a, b); + g = (h = BD(Ut(e, 0), 214), h.c.Rf() ? h.c.Lf() ? new kGc(a) : new mGc(a) : new iGc(a)); + UFc(e, g); + eGc(a); + Qdd(c2); + } + function so(a, b, c2, d) { + var e, f2, g, h, i3; + i3 = Tbb(Ibb(Eie, keb(Tbb(Ibb(b == null ? 0 : tb(b), Fie)), 15))); + e = Tbb(Ibb(Eie, keb(Tbb(Ibb(c2 == null ? 0 : tb(c2), Fie)), 15))); + h = vo(a, b, i3); + g = uo(a, c2, e); + if (!!h && e == h.a && Hb(c2, h.g)) { + return c2; + } else if (!!g && !d) { + throw vbb(new Wdb("key already present: " + c2)); + } + !!h && mo(a, h); + !!g && mo(a, g); + f2 = new $o(c2, e, b, i3); + po(a, f2, g); + if (g) { + g.e = null; + g.c = null; + } + if (h) { + h.e = null; + h.c = null; + } + to(a); + return !h ? null : h.g; + } + function Lhb(a, b, c2) { + var d, e, f2, g, h; + for (f2 = 0; f2 < b; f2++) { + d = 0; + for (h = f2 + 1; h < b; h++) { + d = wbb(wbb(Ibb(xbb(a[f2], Yje), xbb(a[h], Yje)), xbb(c2[f2 + h], Yje)), xbb(Tbb(d), Yje)); + c2[f2 + h] = Tbb(d); + d = Pbb(d, 32); + } + c2[f2 + b] = Tbb(d); + } + khb(c2, c2, b << 1); + d = 0; + for (e = 0, g = 0; e < b; ++e, g++) { + d = wbb(wbb(Ibb(xbb(a[e], Yje), xbb(a[e], Yje)), xbb(c2[g], Yje)), xbb(Tbb(d), Yje)); + c2[g] = Tbb(d); + d = Pbb(d, 32); + ++g; + d = wbb(d, xbb(c2[g], Yje)); + c2[g] = Tbb(d); + d = Pbb(d, 32); + } + return c2; + } + function ZJc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + if (Qq(b)) { + return; + } + i3 = Edb(ED(pBc(c2.c, (Nyc(), zyc)))); + j = BD(pBc(c2.c, yyc), 142); + !j && (j = new H_b()); + d = c2.a; + e = null; + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + k = 0; + if (!e) { + k = j.d; + } else { + k = i3; + k += e.o.b; + } + f2 = nGb(oGb(new pGb(), g), a.f); + Rhb(a.k, g, f2); + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), QD($wnd.Math.ceil(k))), d), f2)); + e = g; + d = f2; + } + AFb(DFb(CFb(BFb(EFb(new FFb(), 0), QD($wnd.Math.ceil(j.a + e.o.b))), d), c2.d)); + } + function uZc(a, b, c2, d, e, f2, g, h) { + var i3, j, k, l, m, n; + n = false; + m = f2 - c2.s; + k = c2.t - b.f + (j = MZc(c2, m, false), j.a); + if (d.g + h > m) { + return false; + } + l = (i3 = MZc(d, m, false), i3.a); + if (k + h + l <= b.b) { + KZc(c2, f2 - c2.s); + c2.c = true; + KZc(d, f2 - c2.s); + OZc(d, c2.s, c2.t + c2.d + h); + d.k = true; + WZc(c2.q, d); + n = true; + if (e) { + s$c(b, d); + d.j = b; + if (a.c.length > g) { + v$c((tCb(g, a.c.length), BD(a.c[g], 200)), d); + (tCb(g, a.c.length), BD(a.c[g], 200)).a.c.length == 0 && Kkb(a, g); + } + } + } + return n; + } + function kcc(a, b) { + var c2, d, e, f2, g, h; + Odd(b, "Partition midprocessing", 1); + e = new Hp(); + MAb(JAb(new YAb(null, new Kub(a.a, 16)), new occ()), new qcc(e)); + if (e.d == 0) { + return; + } + h = BD(GAb(UAb((f2 = e.i, new YAb(null, (!f2 ? e.i = new zf(e, e.c) : f2).Nc()))), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + d = h.Kc(); + c2 = BD(d.Pb(), 19); + while (d.Ob()) { + g = BD(d.Pb(), 19); + jcc(BD(Qc(e, c2), 21), BD(Qc(e, g), 21)); + c2 = g; + } + Qdd(b); + } + function DYb(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + if (b.p == 0) { + b.p = 1; + g = c2; + if (!g) { + e = new Rkb(); + f2 = (d = BD(gdb(F1), 9), new xqb(d, BD(_Bb(d, d.length), 9), 0)); + g = new vgd(e, f2); + } + BD(g.a, 15).Fc(b); + b.k == (j0b(), e0b) && BD(g.b, 21).Fc(BD(vNb(b, (wtc(), Hsc)), 61)); + for (i3 = new olb(b.j); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 11); + for (k = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(h), new R0b(h)]))); Qr(k); ) { + j = BD(Rr(k), 11); + DYb(a, j.i, g); + } + } + return g; + } + return null; + } + function Dmd(a, b) { + var c2, d, e, f2, g; + if (a.Ab) { + if (a.Ab) { + g = a.Ab.i; + if (g > 0) { + e = BD(a.Ab.g, 1934); + if (b == null) { + for (f2 = 0; f2 < g; ++f2) { + c2 = e[f2]; + if (c2.d == null) { + return c2; + } + } + } else { + for (f2 = 0; f2 < g; ++f2) { + c2 = e[f2]; + if (dfb(b, c2.d)) { + return c2; + } + } + } + } + } else { + if (b == null) { + for (d = new Fyd(a.Ab); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 590); + if (c2.d == null) { + return c2; + } + } + } else { + for (d = new Fyd(a.Ab); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 590); + if (dfb(b, c2.d)) { + return c2; + } + } + } + } + } + return null; + } + function gRc(a, b) { + var c2, d, e, f2, g, h, i3, j; + j = DD(vNb(b, (JTc(), GTc))); + if (j == null || (uCb(j), j)) { + dRc(a, b); + e = new Rkb(); + for (i3 = Jsb(b.b, 0); i3.b != i3.d.c; ) { + g = BD(Xsb(i3), 86); + c2 = cRc(a, g, null); + if (c2) { + tNb(c2, b); + e.c[e.c.length] = c2; + } + } + a.a = null; + a.b = null; + if (e.c.length > 1) { + for (d = new olb(e); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 135); + f2 = 0; + for (h = Jsb(c2.b, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 86); + g.g = f2++; + } + } + } + return e; + } + return Ou(OC(GC(n$, 1), fme, 135, 0, [b])); + } + function rqd(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, p, q, r, s, t, u, v; + n = Sqd(a, etd(b), e); + jmd(n, _pd(e, Vte)); + o = null; + p = e; + q = $pd(p, Yte); + r = new urd(n); + wqd(r.a, q); + s = $pd(p, "endPoint"); + t = new yrd(n); + yqd(t.a, s); + u = Ypd(p, Ote); + v = new Brd(n); + zqd(v.a, u); + l = _pd(e, Qte); + f2 = new qrd(a, n); + sqd(f2.a, f2.b, l); + m = _pd(e, Pte); + g = new rrd(a, n); + tqd(g.a, g.b, m); + j = Ypd(e, Ste); + h = new srd(c2, n); + uqd(h.b, h.a, j); + k = Ypd(e, Rte); + i3 = new trd(d, n); + vqd(i3.b, i3.a, k); + } + function i_b(a, b, c2) { + var d, e, f2, g, h; + h = null; + switch (b.g) { + case 1: + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + if (Ccb(DD(vNb(d, (wtc(), Msc))))) { + return d; + } + } + h = new H0b(); + yNb(h, (wtc(), Msc), (Bcb(), true)); + break; + case 2: + for (g = new olb(a.j); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 11); + if (Ccb(DD(vNb(f2, (wtc(), etc))))) { + return f2; + } + } + h = new H0b(); + yNb(h, (wtc(), etc), (Bcb(), true)); + } + if (h) { + F0b(h, a); + G0b(h, c2); + X$b(h.n, a.o, c2); + } + return h; + } + function O3b(a, b) { + var c2, d, e, f2, g, h; + h = -1; + g = new Psb(); + for (d = new b1b(a.b); llb(d.a) || llb(d.b); ) { + c2 = BD(llb(d.a) ? mlb(d.a) : mlb(d.b), 17); + h = $wnd.Math.max(h, Edb(ED(vNb(c2, (Nyc(), Zwc))))); + c2.c == a ? MAb(JAb(new YAb(null, new Kub(c2.b, 16)), new U3b()), new W3b(g)) : MAb(JAb(new YAb(null, new Kub(c2.b, 16)), new Y3b()), new $3b(g)); + for (f2 = Jsb(g, 0); f2.b != f2.d.c; ) { + e = BD(Xsb(f2), 70); + wNb(e, (wtc(), Dsc)) || yNb(e, Dsc, c2); + } + Gkb(b, g); + Osb(g); + } + return h; + } + function _bc(a, b, c2, d, e) { + var f2, g, h, i3; + f2 = new b0b(a); + __b(f2, (j0b(), i0b)); + yNb(f2, (Nyc(), Vxc), (dcd(), $bd)); + yNb(f2, (wtc(), $sc), b.c.i); + g = new H0b(); + yNb(g, $sc, b.c); + G0b(g, e); + F0b(g, f2); + yNb(b.c, gtc, f2); + h = new b0b(a); + __b(h, i0b); + yNb(h, Vxc, $bd); + yNb(h, $sc, b.d.i); + i3 = new H0b(); + yNb(i3, $sc, b.d); + G0b(i3, e); + F0b(i3, h); + yNb(b.d, gtc, h); + QZb(b, g); + RZb(b, i3); + wCb(0, c2.c.length); + aCb(c2.c, 0, f2); + d.c[d.c.length] = h; + yNb(f2, ysc, meb(1)); + yNb(h, ysc, meb(1)); + } + function BPc(a, b, c2, d, e) { + var f2, g, h, i3, j; + h = e ? d.b : d.a; + if (Rqb(a.a, d)) { + return; + } + j = h > c2.s && h < c2.c; + i3 = false; + if (c2.e.b != 0 && c2.j.b != 0) { + i3 = i3 | ($wnd.Math.abs(h - Edb(ED(Hsb(c2.e)))) < qme && $wnd.Math.abs(h - Edb(ED(Hsb(c2.j)))) < qme); + i3 = i3 | ($wnd.Math.abs(h - Edb(ED(Isb(c2.e)))) < qme && $wnd.Math.abs(h - Edb(ED(Isb(c2.j)))) < qme); + } + if (j || i3) { + g = BD(vNb(b, (Nyc(), jxc)), 74); + if (!g) { + g = new s7c(); + yNb(b, jxc, g); + } + f2 = new g7c(d); + Gsb(g, f2, g.c.b, g.c); + Qqb(a.a, f2); + } + } + function gNb(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + if (fNb(a, b, c2, d)) { + return true; + } else { + for (g = new olb(b.f); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 324); + h = false; + i3 = a.j - b.j + c2; + j = i3 + b.o; + k = a.k - b.k + d; + e = k + b.p; + switch (f2.a.g) { + case 0: + h = oNb(a, i3 + f2.b.a, 0, i3 + f2.c.a, k - 1); + break; + case 1: + h = oNb(a, j, k + f2.b.a, a.o - 1, k + f2.c.a); + break; + case 2: + h = oNb(a, i3 + f2.b.a, e, i3 + f2.c.a, a.p - 1); + break; + default: + h = oNb(a, 0, k + f2.b.a, i3 - 1, k + f2.c.a); + } + if (h) { + return true; + } + } + } + return false; + } + function LMc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + for (g = new olb(b.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + for (j = new olb(f2.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + k = new Rkb(); + h = 0; + for (d = new Sr(ur(R_b(i3).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + if (OZb(c2) || !OZb(c2) && c2.c.i.c == c2.d.i.c) { + continue; + } + e = BD(vNb(c2, (Nyc(), eyc)), 19).a; + if (e > h) { + h = e; + k.c = KC(SI, Uhe, 1, 0, 5, 1); + } + e == h && Ekb(k, new vgd(c2.c.i, c2)); + } + mmb(); + Okb(k, a.c); + Dkb(a.b, i3.p, k); + } + } + } + function MMc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + for (g = new olb(b.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + for (j = new olb(f2.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + k = new Rkb(); + h = 0; + for (d = new Sr(ur(U_b(i3).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + if (OZb(c2) || !OZb(c2) && c2.c.i.c == c2.d.i.c) { + continue; + } + e = BD(vNb(c2, (Nyc(), eyc)), 19).a; + if (e > h) { + h = e; + k.c = KC(SI, Uhe, 1, 0, 5, 1); + } + e == h && Ekb(k, new vgd(c2.d.i, c2)); + } + mmb(); + Okb(k, a.c); + Dkb(a.f, i3.p, k); + } + } + } + function Y7c(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), qse), "ELK Box"), "Algorithm for packing of unconnected boxes, i.e. graphs without edges."), new _7c()))); + p4c(a, qse, ame, U7c); + p4c(a, qse, wme, 15); + p4c(a, qse, vme, meb(0)); + p4c(a, qse, Jre, Ksd(O7c)); + p4c(a, qse, Fme, Ksd(Q7c)); + p4c(a, qse, Eme, Ksd(S7c)); + p4c(a, qse, _le, pse); + p4c(a, qse, Ame, Ksd(P7c)); + p4c(a, qse, Tme, Ksd(R7c)); + p4c(a, qse, rse, Ksd(M7c)); + p4c(a, qse, lqe, Ksd(N7c)); + } + function W$b(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + e = a.i; + g = e.o.a; + f2 = e.o.b; + if (g <= 0 && f2 <= 0) { + return Ucd(), Scd; + } + j = a.n.a; + k = a.n.b; + h = a.o.a; + c2 = a.o.b; + switch (b.g) { + case 2: + case 1: + if (j < 0) { + return Ucd(), Tcd; + } else if (j + h > g) { + return Ucd(), zcd; + } + break; + case 4: + case 3: + if (k < 0) { + return Ucd(), Acd; + } else if (k + c2 > f2) { + return Ucd(), Rcd; + } + } + i3 = (j + h / 2) / g; + d = (k + c2 / 2) / f2; + return i3 + d <= 1 && i3 - d <= 0 ? (Ucd(), Tcd) : i3 + d >= 1 && i3 - d >= 0 ? (Ucd(), zcd) : d < 0.5 ? (Ucd(), Acd) : (Ucd(), Rcd); + } + function pJc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + c2 = false; + k = Edb(ED(vNb(b, (Nyc(), vyc)))); + o2 = Qie * k; + for (e = new olb(b.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + j = new olb(d.a); + f2 = BD(mlb(j), 10); + l = xJc(a.a[f2.p]); + while (j.a < j.c.c.length) { + h = BD(mlb(j), 10); + m = xJc(a.a[h.p]); + if (l != m) { + n = jBc(a.b, f2, h); + g = f2.n.b + f2.o.b + f2.d.a + l.a + n; + i3 = h.n.b - h.d.d + m.a; + if (g > i3 + o2) { + p = l.g + m.g; + m.a = (m.g * m.a + l.g * l.a) / p; + m.g = p; + l.f = m; + c2 = true; + } + } + f2 = h; + l = m; + } + } + return c2; + } + function VGb(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m; + m = new I6c(); + for (j = b.Kc(); j.Ob(); ) { + h = BD(j.Pb(), 839); + for (l = new olb(h.wf()); l.a < l.c.c.length; ) { + k = BD(mlb(l), 181); + if (PD(k.We((Y9c(), C8c))) === PD((qad(), pad2))) { + SGb(m, k, false, d, e, f2, g); + H6c(a, m); + } + } + } + for (i3 = c2.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 839); + for (l = new olb(h.wf()); l.a < l.c.c.length; ) { + k = BD(mlb(l), 181); + if (PD(k.We((Y9c(), C8c))) === PD((qad(), oad))) { + SGb(m, k, true, d, e, f2, g); + H6c(a, m); + } + } + } + } + function oRc(a, b, c2) { + var d, e, f2, g, h, i3, j; + for (g = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); g.e != g.i.gc(); ) { + f2 = BD(Dyd(g), 33); + for (e = new Sr(ur(_sd(f2).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 79); + if (!Pld(d) && !Pld(d) && !Qld(d)) { + i3 = BD(Wd(irb(c2.f, f2)), 86); + j = BD(Ohb(c2, atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))), 86); + if (!!i3 && !!j) { + h = new QRc(i3, j); + yNb(h, (mTc(), dTc), d); + tNb(h, d); + Dsb(i3.d, h); + Dsb(j.b, h); + Dsb(b.a, h); + } + } + } + } + } + function QKb(a, b) { + var c2, d, e, f2, g, h, i3, j; + for (i3 = BD(BD(Qc(a.r, b), 21), 84).Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 111); + e = h.c ? YHb(h.c) : 0; + if (e > 0) { + if (h.a) { + j = h.b.rf().b; + if (e > j) { + if (a.v || h.c.d.c.length == 1) { + g = (e - j) / 2; + h.d.d = g; + h.d.a = g; + } else { + c2 = BD(Ikb(h.c.d, 0), 181).rf().b; + d = (c2 - j) / 2; + h.d.d = $wnd.Math.max(0, d); + h.d.a = e - d - j; + } + } + } else { + h.d.a = a.t + e; + } + } else if (tcd(a.u)) { + f2 = sfd(h.b); + f2.d < 0 && (h.d.d = -f2.d); + f2.d + f2.a > h.b.rf().b && (h.d.a = f2.d + f2.a - h.b.rf().b); + } + } + } + function FC(a, b) { + var c2; + switch (HC(a)) { + case 6: + return ND(b); + case 7: + return LD(b); + case 8: + return KD(b); + case 3: + return Array.isArray(b) && (c2 = HC(b), !(c2 >= 14 && c2 <= 16)); + case 11: + return b != null && typeof b === Nhe; + case 12: + return b != null && (typeof b === Jhe || typeof b == Nhe); + case 0: + return AD(b, a.__elementTypeId$); + case 2: + return OD(b) && !(b.im === gcb); + case 1: + return OD(b) && !(b.im === gcb) || AD(b, a.__elementTypeId$); + default: + return true; + } + } + function xOb(a, b) { + var c2, d, e, f2; + d = $wnd.Math.min($wnd.Math.abs(a.c - (b.c + b.b)), $wnd.Math.abs(a.c + a.b - b.c)); + f2 = $wnd.Math.min($wnd.Math.abs(a.d - (b.d + b.a)), $wnd.Math.abs(a.d + a.a - b.d)); + c2 = $wnd.Math.abs(a.c + a.b / 2 - (b.c + b.b / 2)); + if (c2 > a.b / 2 + b.b / 2) { + return 1; + } + e = $wnd.Math.abs(a.d + a.a / 2 - (b.d + b.a / 2)); + if (e > a.a / 2 + b.a / 2) { + return 1; + } + if (c2 == 0 && e == 0) { + return 0; + } + if (c2 == 0) { + return f2 / e + 1; + } + if (e == 0) { + return d / c2 + 1; + } + return $wnd.Math.min(d / c2, f2 / e) + 1; + } + function mgb(a, b) { + var c2, d, e, f2, g, h; + e = pgb(a); + h = pgb(b); + if (e == h) { + if (a.e == b.e && a.a < 54 && b.a < 54) { + return a.f < b.f ? -1 : a.f > b.f ? 1 : 0; + } + d = a.e - b.e; + c2 = (a.d > 0 ? a.d : $wnd.Math.floor((a.a - 1) * Xje) + 1) - (b.d > 0 ? b.d : $wnd.Math.floor((b.a - 1) * Xje) + 1); + if (c2 > d + 1) { + return e; + } else if (c2 < d - 1) { + return -e; + } else { + f2 = (!a.c && (a.c = fhb(a.f)), a.c); + g = (!b.c && (b.c = fhb(b.f)), b.c); + d < 0 ? f2 = Ogb(f2, Khb(-d)) : d > 0 && (g = Ogb(g, Khb(d))); + return Igb(f2, g); + } + } else + return e < h ? -1 : 1; + } + function mTb(a, b) { + var c2, d, e, f2, g, h, i3; + f2 = 0; + h = 0; + i3 = 0; + for (e = new olb(a.f.e); e.a < e.c.c.length; ) { + d = BD(mlb(e), 144); + if (b == d) { + continue; + } + g = a.i[b.b][d.b]; + f2 += g; + c2 = S6c(b.d, d.d); + c2 > 0 && a.d != (yTb(), xTb) && (h += g * (d.d.a + a.a[b.b][d.b] * (b.d.a - d.d.a) / c2)); + c2 > 0 && a.d != (yTb(), vTb) && (i3 += g * (d.d.b + a.a[b.b][d.b] * (b.d.b - d.d.b) / c2)); + } + switch (a.d.g) { + case 1: + return new f7c(h / f2, b.d.b); + case 2: + return new f7c(b.d.a, i3 / f2); + default: + return new f7c(h / f2, i3 / f2); + } + } + function Wcc(a, b) { + Occ(); + var c2, d, e, f2, g; + g = BD(vNb(a.i, (Nyc(), Vxc)), 98); + f2 = a.j.g - b.j.g; + if (f2 != 0 || !(g == (dcd(), Zbd) || g == _bd || g == $bd)) { + return 0; + } + if (g == (dcd(), Zbd)) { + c2 = BD(vNb(a, Wxc), 19); + d = BD(vNb(b, Wxc), 19); + if (!!c2 && !!d) { + e = c2.a - d.a; + if (e != 0) { + return e; + } + } + } + switch (a.j.g) { + case 1: + return Kdb(a.n.a, b.n.a); + case 2: + return Kdb(a.n.b, b.n.b); + case 3: + return Kdb(b.n.a, a.n.a); + case 4: + return Kdb(b.n.b, a.n.b); + default: + throw vbb(new Zdb(ine)); + } + } + function tfd(a) { + var b, c2, d, e, f2, g; + c2 = (!a.a && (a.a = new xMd(y2, a, 5)), a.a).i + 2; + g = new Skb(c2); + Ekb(g, new f7c(a.j, a.k)); + MAb(new YAb(null, (!a.a && (a.a = new xMd(y2, a, 5)), new Kub(a.a, 16))), new Qfd(g)); + Ekb(g, new f7c(a.b, a.c)); + b = 1; + while (b < g.c.length - 1) { + d = (tCb(b - 1, g.c.length), BD(g.c[b - 1], 8)); + e = (tCb(b, g.c.length), BD(g.c[b], 8)); + f2 = (tCb(b + 1, g.c.length), BD(g.c[b + 1], 8)); + d.a == e.a && e.a == f2.a || d.b == e.b && e.b == f2.b ? Kkb(g, b) : ++b; + } + return g; + } + function Xgc(a, b) { + var c2, d, e, f2, g, h, i3; + c2 = vDb(yDb(wDb(xDb(new zDb(), b), new K6c(b.e)), Ggc), a.a); + b.j.c.length == 0 || nDb(BD(Ikb(b.j, 0), 57).a, c2); + i3 = new lEb(); + Rhb(a.e, c2, i3); + g = new Tqb(); + h = new Tqb(); + for (f2 = new olb(b.k); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 17); + Qqb(g, e.c); + Qqb(h, e.d); + } + d = g.a.gc() - h.a.gc(); + if (d < 0) { + jEb(i3, true, (ead(), aad)); + jEb(i3, false, bad); + } else if (d > 0) { + jEb(i3, false, (ead(), aad)); + jEb(i3, true, bad); + } + Hkb(b.g, new $hc(a, c2)); + Rhb(a.g, b, c2); + } + function Neb() { + Neb = ccb; + var a; + Jeb = OC(GC(WD, 1), oje, 25, 15, [-1, -1, 30, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]); + Keb = KC(WD, oje, 25, 37, 15, 1); + Leb = OC(GC(WD, 1), oje, 25, 15, [-1, -1, 63, 40, 32, 28, 25, 23, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13]); + Meb = KC(XD, Sje, 25, 37, 14, 1); + for (a = 2; a <= 36; a++) { + Keb[a] = QD($wnd.Math.pow(a, Jeb[a])); + Meb[a] = Abb(rie, Keb[a]); + } + } + function pfd(a) { + var b; + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i != 1) { + throw vbb(new Wdb(Tse + (!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i)); + } + b = new s7c(); + !!btd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)) && ye(b, qfd(a, btd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)), false)); + !!btd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)) && ye(b, qfd(a, btd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)), true)); + return b; + } + function _Mc(a, b) { + var c2, d, e, f2, g; + b.d ? e = a.a.c == (YLc(), XLc) ? R_b(b.b) : U_b(b.b) : e = a.a.c == (YLc(), WLc) ? R_b(b.b) : U_b(b.b); + f2 = false; + for (d = new Sr(ur(e.a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + g = Ccb(a.a.f[a.a.g[b.b.p].p]); + if (!g && !OZb(c2) && c2.c.i.c == c2.d.i.c) { + continue; + } + if (Ccb(a.a.n[a.a.g[b.b.p].p]) || Ccb(a.a.n[a.a.g[b.b.p].p])) { + continue; + } + f2 = true; + if (Rqb(a.b, a.a.g[TMc(c2, b.b).p])) { + b.c = true; + b.a = c2; + return b; + } + } + b.c = f2; + b.a = null; + return b; + } + function bed(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l; + mmb(); + Okb(a, new Red()); + h = new Bib(a, 0); + l = new Rkb(); + f2 = 0; + while (h.b < h.d.gc()) { + g = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 157)); + if (l.c.length != 0 && red(g) * qed(g) > f2 * 2) { + k = new wed(l); + j = red(g) / qed(g); + i3 = fed(k, b, new p0b(), c2, d, e, j); + P6c(X6c(k.e), i3); + l.c = KC(SI, Uhe, 1, 0, 5, 1); + f2 = 0; + l.c[l.c.length] = k; + l.c[l.c.length] = g; + f2 = red(k) * qed(k) + red(g) * qed(g); + } else { + l.c[l.c.length] = g; + f2 += red(g) * qed(g); + } + } + return l; + } + function qwd(a, b, c2) { + var d, e, f2, g, h, i3, j; + d = c2.gc(); + if (d == 0) { + return false; + } else { + if (a.ej()) { + i3 = a.fj(); + zvd(a, b, c2); + g = d == 1 ? a.Zi(3, null, c2.Kc().Pb(), b, i3) : a.Zi(5, null, c2, b, i3); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f2 = b + d; + for (e = b; e < f2; ++e) { + j = a.Oi(e); + h = a.cj(j, h); + h = h; + } + if (!h) { + a.$i(g); + } else { + h.Ei(g); + h.Fi(); + } + } else { + a.$i(g); + } + } else { + zvd(a, b, c2); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f2 = b + d; + for (e = b; e < f2; ++e) { + h = a.cj(a.Oi(e), h); + } + !!h && h.Fi(); + } + } + return true; + } + } + function wwd(a, b, c2) { + var d, e, f2, g, h; + if (a.ej()) { + e = null; + f2 = a.fj(); + d = a.Zi(1, h = (g = a.Ui(b, a.oi(b, c2)), g), c2, b, f2); + if (a.bj() && !(a.ni() && !!h ? pb(h, c2) : PD(h) === PD(c2))) { + !!h && (e = a.dj(h, e)); + e = a.cj(c2, e); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } + return h; + } else { + h = (g = a.Ui(b, a.oi(b, c2)), g); + if (a.bj() && !(a.ni() && !!h ? pb(h, c2) : PD(h) === PD(c2))) { + e = null; + !!h && (e = a.dj(h, null)); + e = a.cj(c2, e); + !!e && e.Fi(); + } + return h; + } + } + function rRb(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + a.e = b; + a.f = BD(vNb(b, (HSb(), GSb)), 230); + iRb(b); + a.d = $wnd.Math.max(b.e.c.length * 16 + b.c.c.length, 256); + if (!Ccb(DD(vNb(b, (wSb(), dSb))))) { + k = a.e.e.c.length; + for (i3 = new olb(b.e); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 144); + j = h.d; + j.a = Aub(a.f) * k; + j.b = Aub(a.f) * k; + } + } + c2 = b.b; + for (f2 = new olb(b.c); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 282); + d = BD(vNb(e, rSb), 19).a; + if (d > 0) { + for (g = 0; g < d; g++) { + Ekb(c2, new aRb(e)); + } + cRb(e); + } + } + } + function zac(a, b) { + var c2, d, e, f2, g, h; + if (a.k == (j0b(), f0b)) { + c2 = WAb(JAb(BD(vNb(a, (wtc(), ktc)), 15).Oc(), new Xxb(new Kac()))).sd((EAb(), DAb)) ? b : (rbd(), pbd); + yNb(a, Ssc, c2); + if (c2 != (rbd(), obd)) { + d = BD(vNb(a, $sc), 17); + h = Edb(ED(vNb(d, (Nyc(), Zwc)))); + g = 0; + if (c2 == nbd) { + g = a.o.b - $wnd.Math.ceil(h / 2); + } else if (c2 == pbd) { + a.o.b -= Edb(ED(vNb(Q_b(a), nyc))); + g = (a.o.b - $wnd.Math.ceil(h)) / 2; + } + for (f2 = new olb(a.j); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 11); + e.n.b = g; + } + } + } + } + function Uge() { + Uge = ccb; + g5d(); + Tge = new Vge(); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge(Xwe)])]); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge(Ywe)])]); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge(Zwe)]), OC(GC(w5, 1), Axe, 592, 0, [new Rge(Ywe)])]); + new Ygb("-1"); + OC(GC(w5, 2), nie, 368, 0, [OC(GC(w5, 1), Axe, 592, 0, [new Rge("\\c+")])]); + new Ygb("0"); + new Ygb("0"); + new Ygb("1"); + new Ygb("0"); + new Ygb(hxe); + } + function KQd(a) { + var b, c2; + if (!!a.c && a.c.kh()) { + c2 = BD(a.c, 49); + a.c = BD(xid(a, c2), 138); + if (a.c != c2) { + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 9, 2, c2, a.c)); + if (JD(a.Cb, 399)) { + a.Db >> 16 == -15 && a.Cb.nh() && Rwd(new oSd(a.Cb, 9, 13, c2, a.c, HLd(QSd(BD(a.Cb, 59)), a))); + } else if (JD(a.Cb, 88)) { + if (a.Db >> 16 == -23 && a.Cb.nh()) { + b = a.c; + JD(b, 88) || (b = (jGd(), _Fd)); + JD(c2, 88) || (c2 = (jGd(), _Fd)); + Rwd(new oSd(a.Cb, 9, 10, c2, b, HLd(VKd(BD(a.Cb, 26)), a))); + } + } + } + } + return a.c; + } + function f7b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + Odd(b, "Hypernodes processing", 1); + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + for (h = new olb(d.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (Ccb(DD(vNb(g, (Nyc(), exc)))) && g.j.c.length <= 2) { + l = 0; + k = 0; + c2 = 0; + f2 = 0; + for (j = new olb(g.j); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 11); + switch (i3.j.g) { + case 1: + ++l; + break; + case 2: + ++k; + break; + case 3: + ++c2; + break; + case 4: + ++f2; + } + } + l == 0 && c2 == 0 && e7b(a, g, f2 <= k); + } + } + } + Qdd(b); + } + function i7b(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + Odd(b, "Layer constraint edge reversal", 1); + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + k = -1; + c2 = new Rkb(); + j = l_b(f2.a); + for (e = 0; e < j.length; e++) { + d = BD(vNb(j[e], (wtc(), Osc)), 303); + if (k == -1) { + d != (esc(), dsc) && (k = e); + } else { + if (d == (esc(), dsc)) { + $_b(j[e], null); + Z_b(j[e], k++, f2); + } + } + d == (esc(), bsc) && Ekb(c2, j[e]); + } + for (i3 = new olb(c2); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + $_b(h, null); + $_b(h, f2); + } + } + Qdd(b); + } + function W6b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + Odd(c2, "Hyperedge merging", 1); + U6b(a, b); + i3 = new Bib(b.b, 0); + while (i3.b < i3.d.gc()) { + h = (sCb(i3.b < i3.d.gc()), BD(i3.d.Xb(i3.c = i3.b++), 29)); + k = h.a; + if (k.c.length == 0) { + continue; + } + d = null; + e = null; + f2 = null; + g = null; + for (j = 0; j < k.c.length; j++) { + d = (tCb(j, k.c.length), BD(k.c[j], 10)); + e = d.k; + if (e == (j0b(), g0b) && g == g0b) { + l = S6b(d, f2); + if (l.a) { + V6b(d, f2, l.b, l.c); + tCb(j, k.c.length); + cCb(k.c, j, 1); + --j; + d = f2; + e = g; + } + } + f2 = d; + g = e; + } + } + Qdd(c2); + } + function WFc(a, b) { + var c2, d, e; + d = Cub(a.d, 1) != 0; + !Ccb(DD(vNb(b.j, (wtc(), Jsc)))) && !Ccb(DD(vNb(b.j, mtc))) || PD(vNb(b.j, (Nyc(), ywc))) === PD((tAc(), rAc)) ? b.c.Tf(b.e, d) : d = Ccb(DD(vNb(b.j, Jsc))); + dGc(a, b, d, true); + Ccb(DD(vNb(b.j, mtc))) && yNb(b.j, mtc, (Bcb(), false)); + if (Ccb(DD(vNb(b.j, Jsc)))) { + yNb(b.j, Jsc, (Bcb(), false)); + yNb(b.j, mtc, true); + } + c2 = OFc(a, b); + do { + $Fc(a); + if (c2 == 0) { + return 0; + } + d = !d; + e = c2; + dGc(a, b, d, false); + c2 = OFc(a, b); + } while (e > c2); + return e; + } + function XFc(a, b) { + var c2, d, e; + d = Cub(a.d, 1) != 0; + !Ccb(DD(vNb(b.j, (wtc(), Jsc)))) && !Ccb(DD(vNb(b.j, mtc))) || PD(vNb(b.j, (Nyc(), ywc))) === PD((tAc(), rAc)) ? b.c.Tf(b.e, d) : d = Ccb(DD(vNb(b.j, Jsc))); + dGc(a, b, d, true); + Ccb(DD(vNb(b.j, mtc))) && yNb(b.j, mtc, (Bcb(), false)); + if (Ccb(DD(vNb(b.j, Jsc)))) { + yNb(b.j, Jsc, (Bcb(), false)); + yNb(b.j, mtc, true); + } + c2 = NFc(a, b); + do { + $Fc(a); + if (c2 == 0) { + return 0; + } + d = !d; + e = c2; + dGc(a, b, d, false); + c2 = NFc(a, b); + } while (e > c2); + return e; + } + function uNd(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2; + if (b == c2) { + return true; + } else { + b = vNd(a, b); + c2 = vNd(a, c2); + d = JQd(b); + if (d) { + k = JQd(c2); + if (k != d) { + if (!k) { + return false; + } else { + i3 = d.Dj(); + o2 = k.Dj(); + return i3 == o2 && i3 != null; + } + } else { + g = (!b.d && (b.d = new xMd(j5, b, 1)), b.d); + f2 = g.i; + m = (!c2.d && (c2.d = new xMd(j5, c2, 1)), c2.d); + if (f2 == m.i) { + for (j = 0; j < f2; ++j) { + e = BD(qud(g, j), 87); + l = BD(qud(m, j), 87); + if (!uNd(a, e, l)) { + return false; + } + } + } + return true; + } + } else { + h = b.e; + n = c2.e; + return h == n; + } + } + } + function X2d(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l; + if (T6d(a.e, b)) { + l = S6d(a.e.Tg(), b); + f2 = BD(a.g, 119); + k = null; + i3 = -1; + h = -1; + e = 0; + for (j = 0; j < a.i; ++j) { + g = f2[j]; + if (l.rl(g.ak())) { + e == c2 && (i3 = j); + if (e == d) { + h = j; + k = g.dd(); + } + ++e; + } + } + if (i3 == -1) { + throw vbb(new qcb(lue + c2 + mue + e)); + } + if (h == -1) { + throw vbb(new qcb(nue + d + mue + e)); + } + Wxd(a, i3, h); + oid(a.e) && GLd(a, H2d(a, 7, b, meb(d), k, c2, true)); + return k; + } else { + throw vbb(new Wdb("The feature must be many-valued to support move")); + } + } + function b_b(a, b, c2, d) { + var e, f2, g, h, i3; + i3 = new g7c(b.n); + i3.a += b.o.a / 2; + i3.b += b.o.b / 2; + h = Edb(ED(vNb(b, (Nyc(), Uxc)))); + f2 = a.f; + g = a.d; + e = a.c; + switch (BD(vNb(b, (wtc(), Hsc)), 61).g) { + case 1: + i3.a += g.b + e.a - c2 / 2; + i3.b = -d - h; + b.n.b = -(g.d + h + e.b); + break; + case 2: + i3.a = f2.a + g.b + g.c + h; + i3.b += g.d + e.b - d / 2; + b.n.a = f2.a + g.c + h - e.a; + break; + case 3: + i3.a += g.b + e.a - c2 / 2; + i3.b = f2.b + g.d + g.a + h; + b.n.b = f2.b + g.a + h - e.b; + break; + case 4: + i3.a = -c2 - h; + i3.b += g.d + e.b - d / 2; + b.n.a = -(g.b + h + e.a); + } + return i3; + } + function P1b(a) { + var b, c2, d, e, f2, g; + d = new XZb(); + tNb(d, a); + PD(vNb(d, (Nyc(), Lwc))) === PD((ead(), cad)) && yNb(d, Lwc, a_b(d)); + if (vNb(d, (g6c(), f6c)) == null) { + g = BD(m6d(a), 160); + yNb(d, f6c, RD(g.We(f6c))); + } + yNb(d, (wtc(), $sc), a); + yNb(d, Ksc, (b = BD(gdb(PW), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0))); + e = OGb((!Xod(a) ? null : (Pgd(), new bhd(Xod(a))), Pgd(), new hhd(!Xod(a) ? null : new bhd(Xod(a)), a)), bad); + f2 = BD(vNb(d, Kxc), 116); + c2 = d.d; + t_b(c2, f2); + t_b(c2, e); + return d; + } + function ybc(a, b, c2) { + var d, e; + d = b.c.i; + e = c2.d.i; + if (d.k == (j0b(), g0b)) { + yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)); + yNb(a, Wsc, BD(vNb(d, Wsc), 11)); + yNb(a, Usc, DD(vNb(d, Usc))); + } else if (d.k == f0b) { + yNb(a, (wtc(), Vsc), BD(vNb(d, Vsc), 11)); + yNb(a, Wsc, BD(vNb(d, Wsc), 11)); + yNb(a, Usc, (Bcb(), true)); + } else if (e.k == f0b) { + yNb(a, (wtc(), Vsc), BD(vNb(e, Vsc), 11)); + yNb(a, Wsc, BD(vNb(e, Wsc), 11)); + yNb(a, Usc, (Bcb(), true)); + } else { + yNb(a, (wtc(), Vsc), b.c); + yNb(a, Wsc, c2.d); + } + } + function FGb(a) { + var b, c2, d, e, f2, g, h; + a.o = new jkb(); + d = new Psb(); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 121); + LFb(f2).c.length == 1 && (Gsb(d, f2, d.c.b, d.c), true); + } + while (d.b != 0) { + f2 = BD(d.b == 0 ? null : (sCb(d.b != 0), Nsb(d, d.a.a)), 121); + if (LFb(f2).c.length == 0) { + continue; + } + b = BD(Ikb(LFb(f2), 0), 213); + c2 = f2.g.a.c.length > 0; + h = xFb(b, f2); + c2 ? OFb(h.b, b) : OFb(h.g, b); + LFb(h).c.length == 1 && (Gsb(d, h, d.c.b, d.c), true); + e = new vgd(f2, b); + Wjb(a.o, e); + Lkb(a.e.a, f2); + } + } + function _Nb(a, b) { + var c2, d, e, f2, g, h, i3; + d = $wnd.Math.abs(D6c(a.b).a - D6c(b.b).a); + h = $wnd.Math.abs(D6c(a.b).b - D6c(b.b).b); + e = 0; + i3 = 0; + c2 = 1; + g = 1; + if (d > a.b.b / 2 + b.b.b / 2) { + e = $wnd.Math.min($wnd.Math.abs(a.b.c - (b.b.c + b.b.b)), $wnd.Math.abs(a.b.c + a.b.b - b.b.c)); + c2 = 1 - e / d; + } + if (h > a.b.a / 2 + b.b.a / 2) { + i3 = $wnd.Math.min($wnd.Math.abs(a.b.d - (b.b.d + b.b.a)), $wnd.Math.abs(a.b.d + a.b.a - b.b.d)); + g = 1 - i3 / h; + } + f2 = $wnd.Math.min(c2, g); + return (1 - f2) * $wnd.Math.sqrt(d * d + h * h); + } + function lQc(a) { + var b, c2, d, e; + nQc(a, a.e, a.f, (FQc(), DQc), true, a.c, a.i); + nQc(a, a.e, a.f, DQc, false, a.c, a.i); + nQc(a, a.e, a.f, EQc, true, a.c, a.i); + nQc(a, a.e, a.f, EQc, false, a.c, a.i); + mQc(a, a.c, a.e, a.f, a.i); + d = new Bib(a.i, 0); + while (d.b < d.d.gc()) { + b = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 128)); + e = new Bib(a.i, d.b); + while (e.b < e.d.gc()) { + c2 = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 128)); + kQc(b, c2); + } + } + wQc(a.i, BD(vNb(a.d, (wtc(), jtc)), 230)); + zQc(a.i); + } + function fKd(a, b) { + var c2, d; + if (b != null) { + d = dKd(a); + if (d) { + if ((d.i & 1) != 0) { + if (d == sbb) { + return KD(b); + } else if (d == WD) { + return JD(b, 19); + } else if (d == VD) { + return JD(b, 155); + } else if (d == SD) { + return JD(b, 217); + } else if (d == TD) { + return JD(b, 172); + } else if (d == UD) { + return LD(b); + } else if (d == rbb) { + return JD(b, 184); + } else if (d == XD) { + return JD(b, 162); + } + } else { + return pEd(), c2 = BD(Ohb(oEd, d), 55), !c2 || c2.wj(b); + } + } else if (JD(b, 56)) { + return a.uk(BD(b, 56)); + } + } + return false; + } + function ade() { + ade = ccb; + var a, b, c2, d, e, f2, g, h, i3; + $ce = KC(SD, wte, 25, 255, 15, 1); + _ce = KC(TD, $ie, 25, 64, 15, 1); + for (b = 0; b < 255; b++) { + $ce[b] = -1; + } + for (c2 = 90; c2 >= 65; c2--) { + $ce[c2] = c2 - 65 << 24 >> 24; + } + for (d = 122; d >= 97; d--) { + $ce[d] = d - 97 + 26 << 24 >> 24; + } + for (e = 57; e >= 48; e--) { + $ce[e] = e - 48 + 52 << 24 >> 24; + } + $ce[43] = 62; + $ce[47] = 63; + for (f2 = 0; f2 <= 25; f2++) + _ce[f2] = 65 + f2 & aje; + for (g = 26, i3 = 0; g <= 51; ++g, i3++) + _ce[g] = 97 + i3 & aje; + for (a = 52, h = 0; a <= 61; ++a, h++) + _ce[a] = 48 + h & aje; + _ce[62] = 43; + _ce[63] = 47; + } + function FXb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + if (a.dc()) { + return new d7c(); + } + j = 0; + l = 0; + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + f2 = d.f; + j = $wnd.Math.max(j, f2.a); + l += f2.a * f2.b; + } + j = $wnd.Math.max(j, $wnd.Math.sqrt(l) * Edb(ED(vNb(BD(a.Kc().Pb(), 37), (Nyc(), owc))))); + m = 0; + n = 0; + i3 = 0; + c2 = b; + for (h = a.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 37); + k = g.f; + if (m + k.a > j) { + m = 0; + n += i3 + b; + i3 = 0; + } + uXb(g, m, n); + c2 = $wnd.Math.max(c2, m + k.a); + i3 = $wnd.Math.max(i3, k.b); + m += k.a + b; + } + return new f7c(c2 + b, n + i3 + b); + } + function mQc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l; + for (g = new olb(b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 17); + i3 = f2.c; + if (c2.a._b(i3)) { + j = (FQc(), DQc); + } else if (d.a._b(i3)) { + j = (FQc(), EQc); + } else { + throw vbb(new Wdb("Source port must be in one of the port sets.")); + } + k = f2.d; + if (c2.a._b(k)) { + l = (FQc(), DQc); + } else if (d.a._b(k)) { + l = (FQc(), EQc); + } else { + throw vbb(new Wdb("Target port must be in one of the port sets.")); + } + h = new YQc(f2, j, l); + Rhb(a.b, f2, h); + e.c[e.c.length] = h; + } + } + function lfd(a, b) { + var c2, d, e, f2, g, h, i3; + if (!mpd(a)) { + throw vbb(new Zdb(Sse)); + } + d = mpd(a); + f2 = d.g; + e = d.f; + if (f2 <= 0 && e <= 0) { + return Ucd(), Scd; + } + h = a.i; + i3 = a.j; + switch (b.g) { + case 2: + case 1: + if (h < 0) { + return Ucd(), Tcd; + } else if (h + a.g > f2) { + return Ucd(), zcd; + } + break; + case 4: + case 3: + if (i3 < 0) { + return Ucd(), Acd; + } else if (i3 + a.f > e) { + return Ucd(), Rcd; + } + } + g = (h + a.g / 2) / f2; + c2 = (i3 + a.f / 2) / e; + return g + c2 <= 1 && g - c2 <= 0 ? (Ucd(), Tcd) : g + c2 >= 1 && g - c2 >= 0 ? (Ucd(), zcd) : c2 < 0.5 ? (Ucd(), Acd) : (Ucd(), Rcd); + } + function vhb(a, b, c2, d, e) { + var f2, g; + f2 = wbb(xbb(b[0], Yje), xbb(d[0], Yje)); + a[0] = Tbb(f2); + f2 = Obb(f2, 32); + if (c2 >= e) { + for (g = 1; g < e; g++) { + f2 = wbb(f2, wbb(xbb(b[g], Yje), xbb(d[g], Yje))); + a[g] = Tbb(f2); + f2 = Obb(f2, 32); + } + for (; g < c2; g++) { + f2 = wbb(f2, xbb(b[g], Yje)); + a[g] = Tbb(f2); + f2 = Obb(f2, 32); + } + } else { + for (g = 1; g < c2; g++) { + f2 = wbb(f2, wbb(xbb(b[g], Yje), xbb(d[g], Yje))); + a[g] = Tbb(f2); + f2 = Obb(f2, 32); + } + for (; g < e; g++) { + f2 = wbb(f2, xbb(d[g], Yje)); + a[g] = Tbb(f2); + f2 = Obb(f2, 32); + } + } + ybb(f2, 0) != 0 && (a[g] = Tbb(f2)); + } + function _fe(a) { + wfe(); + var b, c2, d, e, f2, g; + if (a.e != 4 && a.e != 5) + throw vbb(new Wdb("Token#complementRanges(): must be RANGE: " + a.e)); + f2 = a; + Yfe(f2); + Vfe(f2); + d = f2.b.length + 2; + f2.b[0] == 0 && (d -= 2); + c2 = f2.b[f2.b.length - 1]; + c2 == lxe && (d -= 2); + e = new $fe(4); + e.b = KC(WD, oje, 25, d, 15, 1); + g = 0; + if (f2.b[0] > 0) { + e.b[g++] = 0; + e.b[g++] = f2.b[0] - 1; + } + for (b = 1; b < f2.b.length - 2; b += 2) { + e.b[g++] = f2.b[b] + 1; + e.b[g++] = f2.b[b + 1] - 1; + } + if (c2 != lxe) { + e.b[g++] = c2 + 1; + e.b[g] = lxe; + } + e.a = true; + return e; + } + function Pxd(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + d = c2.gc(); + if (d == 0) { + return false; + } else { + if (a.ej()) { + j = a.fj(); + iud(a, b, c2); + g = d == 1 ? a.Zi(3, null, c2.Kc().Pb(), b, j) : a.Zi(5, null, c2, b, j); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f2 = b + d; + for (e = b; e < f2; ++e) { + k = a.g[e]; + h = a.cj(k, h); + h = a.jj(k, h); + } + if (!h) { + a.$i(g); + } else { + h.Ei(g); + h.Fi(); + } + } else { + a.$i(g); + } + } else { + iud(a, b, c2); + if (a.bj()) { + h = d < 100 ? null : new Ixd(d); + f2 = b + d; + for (e = b; e < f2; ++e) { + i3 = a.g[e]; + h = a.cj(i3, h); + } + !!h && h.Fi(); + } + } + return true; + } + } + function YNc(a, b, c2, d) { + var e, f2, g, h, i3; + for (g = new olb(a.k); g.a < g.c.c.length; ) { + e = BD(mlb(g), 129); + if (!d || e.c == (HOc(), FOc)) { + i3 = e.b; + if (i3.g < 0 && e.d > 0) { + pOc(i3, i3.d - e.d); + e.c == (HOc(), FOc) && nOc(i3, i3.a - e.d); + i3.d <= 0 && i3.i > 0 && (Gsb(b, i3, b.c.b, b.c), true); + } + } + } + for (f2 = new olb(a.f); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 129); + if (!d || e.c == (HOc(), FOc)) { + h = e.a; + if (h.g < 0 && e.d > 0) { + qOc(h, h.i - e.d); + e.c == (HOc(), FOc) && oOc(h, h.b - e.d); + h.i <= 0 && h.d > 0 && (Gsb(c2, h, c2.c.b, c2.c), true); + } + } + } + } + function gSc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + Odd(c2, "Processor compute fanout", 1); + Uhb(a.b); + Uhb(a.a); + h = null; + f2 = Jsb(b.b, 0); + while (!h && f2.b != f2.d.c) { + j = BD(Xsb(f2), 86); + Ccb(DD(vNb(j, (mTc(), jTc)))) && (h = j); + } + i3 = new Psb(); + Gsb(i3, h, i3.c.b, i3.c); + fSc(a, i3); + for (k = Jsb(b.b, 0); k.b != k.d.c; ) { + j = BD(Xsb(k), 86); + g = GD(vNb(j, (mTc(), $Sc))); + e = Phb(a.b, g) != null ? BD(Phb(a.b, g), 19).a : 0; + yNb(j, ZSc, meb(e)); + d = 1 + (Phb(a.a, g) != null ? BD(Phb(a.a, g), 19).a : 0); + yNb(j, XSc, meb(d)); + } + Qdd(c2); + } + function WPc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2; + m = VPc(a, c2); + for (i3 = 0; i3 < b; i3++) { + Aib(e, c2); + n = new Rkb(); + o2 = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 407)); + for (k = m + i3; k < a.b; k++) { + h = o2; + o2 = (sCb(d.b < d.d.gc()), BD(d.d.Xb(d.c = d.b++), 407)); + Ekb(n, new aQc(h, o2, c2)); + } + for (l = m + i3; l < a.b; l++) { + sCb(d.b > 0); + d.a.Xb(d.c = --d.b); + l > m + i3 && uib(d); + } + for (g = new olb(n); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 407); + Aib(d, f2); + } + if (i3 < b - 1) { + for (j = m + i3; j < a.b; j++) { + sCb(d.b > 0); + d.a.Xb(d.c = --d.b); + } + } + } + } + function Jfe() { + wfe(); + var a, b, c2, d, e, f2; + if (gfe) + return gfe; + a = new $fe(4); + Xfe(a, Kfe(vxe, true)); + Zfe(a, Kfe("M", true)); + Zfe(a, Kfe("C", true)); + f2 = new $fe(4); + for (d = 0; d < 11; d++) { + Ufe(f2, d, d); + } + b = new $fe(4); + Xfe(b, Kfe("M", true)); + Ufe(b, 4448, 4607); + Ufe(b, 65438, 65439); + e = new Lge(2); + Kge(e, a); + Kge(e, ffe); + c2 = new Lge(2); + c2.$l(Bfe(f2, Kfe("L", true))); + c2.$l(b); + c2 = new lge(3, c2); + c2 = new rge(e, c2); + gfe = c2; + return gfe; + } + function S3c(a) { + var b, c2; + b = GD(hkd(a, (Y9c(), o8c))); + if (T3c(b, a)) { + return; + } + if (!ikd(a, F9c) && ((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a).i != 0 || Ccb(DD(hkd(a, M8c))))) { + if (b == null || ufb(b).length == 0) { + if (!T3c(sne, a)) { + c2 = Qfb(Qfb(new Wfb("Unable to load default layout algorithm "), sne), " for unconfigured node "); + yfd(a, c2); + throw vbb(new y2c(c2.a)); + } + } else { + c2 = Qfb(Qfb(new Wfb("Layout algorithm '"), b), "' not found for "); + yfd(a, c2); + throw vbb(new y2c(c2.a)); + } + } + } + function hIb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n; + c2 = a.i; + b = a.n; + if (a.b == 0) { + n = c2.c + b.b; + m = c2.b - b.b - b.c; + for (g = a.a, i3 = 0, k = g.length; i3 < k; ++i3) { + e = g[i3]; + mHb(e, n, m); + } + } else { + d = kIb(a, false); + mHb(a.a[0], c2.c + b.b, d[0]); + mHb(a.a[2], c2.c + c2.b - b.c - d[2], d[2]); + l = c2.b - b.b - b.c; + if (d[0] > 0) { + l -= d[0] + a.c; + d[0] += a.c; + } + d[2] > 0 && (l -= d[2] + a.c); + d[1] = $wnd.Math.max(d[1], l); + mHb(a.a[1], c2.c + b.b + d[0] - (d[1] - l) / 2, d[1]); + } + for (f2 = a.a, h = 0, j = f2.length; h < j; ++h) { + e = f2[h]; + JD(e, 326) && BD(e, 326).Te(); + } + } + function KMc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + l = new JMc(); + l.d = 0; + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + l.d += f2.a.c.length; + } + d = 0; + e = 0; + l.a = KC(WD, oje, 25, a.b.c.length, 15, 1); + j = 0; + k = 0; + l.e = KC(WD, oje, 25, l.d, 15, 1); + for (c2 = new olb(a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 29); + b.p = d++; + l.a[b.p] = e++; + k = 0; + for (i3 = new olb(b.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + h.p = j++; + l.e[h.p] = k++; + } + } + l.c = new OMc(l); + l.b = Pu(l.d); + LMc(l, a); + l.f = Pu(l.d); + MMc(l, a); + return l; + } + function GZc(a, b) { + var c2, d, e, f2; + f2 = BD(Ikb(a.n, a.n.c.length - 1), 211).d; + a.p = $wnd.Math.min(a.p, b.g); + a.r = $wnd.Math.max(a.r, f2); + a.g = $wnd.Math.max(a.g, b.g + (a.b.c.length == 1 ? 0 : a.i)); + a.o = $wnd.Math.min(a.o, b.f); + a.e += b.f + (a.b.c.length == 1 ? 0 : a.i); + a.f = $wnd.Math.max(a.f, b.f); + e = a.n.c.length > 0 ? (a.n.c.length - 1) * a.i : 0; + for (d = new olb(a.n); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 211); + e += c2.a; + } + a.d = e; + a.a = a.e / a.b.c.length - a.i * ((a.b.c.length - 1) / a.b.c.length); + u$c(a.j); + } + function LQb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + k = DD(vNb(b, (wSb(), sSb))); + if (k == null || (uCb(k), k)) { + l = KC(sbb, dle, 25, b.e.c.length, 16, 1); + g = HQb(b); + e = new Psb(); + for (j = new olb(b.e); j.a < j.c.c.length; ) { + h = BD(mlb(j), 144); + c2 = IQb(a, h, null, null, l, g); + if (c2) { + tNb(c2, b); + Gsb(e, c2, e.c.b, e.c); + } + } + if (e.b > 1) { + for (d = Jsb(e, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 231); + f2 = 0; + for (i3 = new olb(c2.e); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 144); + h.b = f2++; + } + } + } + return e; + } + return Ou(OC(GC($O, 1), fme, 231, 0, [b])); + } + function TKd(a) { + var b, c2, d, e, f2, g, h; + if (!a.g) { + h = new zNd(); + b = KKd; + g = b.a.zc(a, b); + if (g == null) { + for (d = new Fyd(_Kd(a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 26); + ytd(h, TKd(c2)); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + e = h.i; + for (f2 = (!a.s && (a.s = new cUd(t5, a, 21, 17)), new Fyd(a.s)); f2.e != f2.i.gc(); ++e) { + bJd(BD(Dyd(f2), 449), e); + } + ytd(h, (!a.s && (a.s = new cUd(t5, a, 21, 17)), a.s)); + vud(h); + a.g = new rNd(a, h); + a.i = BD(h.g, 247); + a.i == null && (a.i = MKd); + a.p = null; + $Kd(a).b &= -5; + } + return a.g; + } + function iIb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + d = a.i; + c2 = a.n; + if (a.b == 0) { + b = jIb(a, false); + nHb(a.a[0], d.d + c2.d, b[0]); + nHb(a.a[2], d.d + d.a - c2.a - b[2], b[2]); + m = d.a - c2.d - c2.a; + l = m; + if (b[0] > 0) { + b[0] += a.c; + l -= b[0]; + } + b[2] > 0 && (l -= b[2] + a.c); + b[1] = $wnd.Math.max(b[1], l); + nHb(a.a[1], d.d + c2.d + b[0] - (b[1] - l) / 2, b[1]); + } else { + o2 = d.d + c2.d; + n = d.a - c2.d - c2.a; + for (g = a.a, i3 = 0, k = g.length; i3 < k; ++i3) { + e = g[i3]; + nHb(e, o2, n); + } + } + for (f2 = a.a, h = 0, j = f2.length; h < j; ++h) { + e = f2[h]; + JD(e, 326) && BD(e, 326).Ue(); + } + } + function boc(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + k = KC(WD, oje, 25, a.b.c.length + 1, 15, 1); + j = new Tqb(); + d = 0; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + k[d++] = j.a.gc(); + for (i3 = new olb(e.a); i3.a < i3.c.c.length; ) { + g = BD(mlb(i3), 10); + for (c2 = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + j.a.zc(b, j); + } + } + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + for (c2 = new Sr(ur(R_b(g).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + j.a.Bc(b) != null; + } + } + } + return k; + } + function F2d(a, b, c2, d) { + var e, f2, g, h, i3; + i3 = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (i3.rl(f2.ak()) && pb(f2, c2)) { + return true; + } + } + } else if (c2 != null) { + for (h = 0; h < a.i; ++h) { + f2 = e[h]; + if (i3.rl(f2.ak()) && pb(c2, f2.dd())) { + return true; + } + } + if (d) { + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (i3.rl(f2.ak()) && PD(c2) === PD(a3d(a, BD(f2.dd(), 56)))) { + return true; + } + } + } + } else { + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (i3.rl(f2.ak()) && f2.dd() == null) { + return false; + } + } + } + return false; + } + function e3d(a, b, c2, d) { + var e, f2, g, h, i3, j; + j = S6d(a.e.Tg(), b); + g = BD(a.g, 119); + if (T6d(a.e, b)) { + if (b.hi()) { + f2 = M2d(a, b, d, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0); + if (f2 >= 0 && f2 != c2) { + throw vbb(new Wdb(kue)); + } + } + e = 0; + for (i3 = 0; i3 < a.i; ++i3) { + h = g[i3]; + if (j.rl(h.ak())) { + if (e == c2) { + return BD(Gtd(a, i3, (Q6d(), BD(b, 66).Oj() ? BD(d, 72) : R6d(b, d))), 72); + } + ++e; + } + } + throw vbb(new qcb(gve + c2 + mue + e)); + } else { + for (i3 = 0; i3 < a.i; ++i3) { + h = g[i3]; + if (j.rl(h.ak())) { + return Q6d(), BD(b, 66).Oj() ? h : h.dd(); + } + } + return null; + } + } + function ONb(a, b, c2, d) { + var e, f2, g, h; + h = c2; + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 221); + e = BD(f2.b, 65); + if (Jy(a.b.c, e.b.c + e.b.b) <= 0 && Jy(e.b.c, a.b.c + a.b.b) <= 0 && Jy(a.b.d, e.b.d + e.b.a) <= 0 && Jy(e.b.d, a.b.d + a.b.a) <= 0) { + if (Jy(e.b.c, a.b.c + a.b.b) == 0 && d.a < 0 || Jy(e.b.c + e.b.b, a.b.c) == 0 && d.a > 0 || Jy(e.b.d, a.b.d + a.b.a) == 0 && d.b < 0 || Jy(e.b.d + e.b.a, a.b.d) == 0 && d.b > 0) { + h = 0; + break; + } + } else { + h = $wnd.Math.min(h, YNb(a, e, d)); + } + h = $wnd.Math.min(h, ONb(a, f2, h, d)); + } + return h; + } + function ifd(a, b) { + var c2, d, e, f2, g, h, i3; + if (a.b < 2) { + throw vbb(new Wdb("The vector chain must contain at least a source and a target point.")); + } + e = (sCb(a.b != 0), BD(a.a.a.c, 8)); + nmd(b, e.a, e.b); + i3 = new Oyd((!b.a && (b.a = new xMd(y2, b, 5)), b.a)); + g = Jsb(a, 1); + while (g.a < a.b - 1) { + h = BD(Xsb(g), 8); + if (i3.e != i3.i.gc()) { + c2 = BD(Dyd(i3), 469); + } else { + c2 = (Fhd(), d = new xkd(), d); + Myd(i3, c2); + } + ukd(c2, h.a, h.b); + } + while (i3.e != i3.i.gc()) { + Dyd(i3); + Eyd(i3); + } + f2 = (sCb(a.b != 0), BD(a.c.b.c, 8)); + gmd(b, f2.a, f2.b); + } + function $lc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + c2 = 0; + for (e = new olb((tCb(0, a.c.length), BD(a.c[0], 101)).g.b.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 11); + d.p = c2++; + } + b == (Ucd(), Acd) ? Okb(a, new gmc()) : Okb(a, new kmc()); + h = 0; + k = a.c.length - 1; + while (h < k) { + g = (tCb(h, a.c.length), BD(a.c[h], 101)); + j = (tCb(k, a.c.length), BD(a.c[k], 101)); + f2 = b == Acd ? g.c : g.a; + i3 = b == Acd ? j.a : j.c; + amc(g, b, (Ajc(), yjc), f2); + amc(j, b, xjc, i3); + ++h; + --k; + } + h == k && amc((tCb(h, a.c.length), BD(a.c[h], 101)), b, (Ajc(), wjc), null); + } + function UVc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + l = a.a.i + a.a.g / 2; + m = a.a.i + a.a.g / 2; + o2 = b.i + b.g / 2; + q = b.j + b.f / 2; + h = new f7c(o2, q); + j = BD(hkd(b, (Y9c(), C9c)), 8); + j.a = j.a + l; + j.b = j.b + m; + f2 = (h.b - j.b) / (h.a - j.a); + d = h.b - f2 * h.a; + p = c2.i + c2.g / 2; + r = c2.j + c2.f / 2; + i3 = new f7c(p, r); + k = BD(hkd(c2, C9c), 8); + k.a = k.a + l; + k.b = k.b + m; + g = (i3.b - k.b) / (i3.a - k.a); + e = i3.b - g * i3.a; + n = (d - e) / (g - f2); + if (j.a < n && h.a < n || n < j.a && n < h.a) { + return false; + } else if (k.a < n && i3.a < n || n < k.a && n < i3.a) { + return false; + } + return true; + } + function gqd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + m = BD(Ohb(a.c, b), 183); + if (!m) { + throw vbb(new cqd("Edge did not exist in input.")); + } + j = Wpd(m); + f2 = Fhe((!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a)); + h = !f2; + if (h) { + n = new wB(); + c2 = new Rrd(a, j, n); + Dhe((!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a), c2); + cC(m, Nte, n); + } + e = ikd(b, (Y9c(), Q8c)); + if (e) { + k = BD(hkd(b, Q8c), 74); + g = !k || Ehe(k); + i3 = !g; + if (i3) { + l = new wB(); + d = new Zrd(l); + reb(k, d); + cC(m, "junctionPoints", l); + } + } + Upd(m, "container", Mld(b).k); + return null; + } + function eDb(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + this.a = a; + this.b = b; + this.c = c2; + this.e = Ou(OC(GC(GM, 1), Uhe, 168, 0, [new aDb(a, b), new aDb(b, c2), new aDb(c2, a)])); + this.f = Ou(OC(GC(m1, 1), nie, 8, 0, [a, b, c2])); + this.d = (d = c7c(R6c(this.b), this.a), e = c7c(R6c(this.c), this.a), f2 = c7c(R6c(this.c), this.b), g = d.a * (this.a.a + this.b.a) + d.b * (this.a.b + this.b.b), h = e.a * (this.a.a + this.c.a) + e.b * (this.a.b + this.c.b), i3 = 2 * (d.a * f2.b - d.b * f2.a), j = (e.b * g - d.b * h) / i3, k = (d.a * h - e.a * g) / i3, new f7c(j, k)); + } + function nvd(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2; + m = new yC(a.p); + cC(b, fue, m); + if (c2 && !(!a.f ? null : vmb(a.f)).a.dc()) { + k = new wB(); + cC(b, "logs", k); + h = 0; + for (o2 = new Dnb((!a.f ? null : vmb(a.f)).b.Kc()); o2.b.Ob(); ) { + n = GD(o2.b.Pb()); + l = new yC(n); + tB(k, h); + vB(k, h, l); + ++h; + } + } + if (d) { + j = new TB(a.q); + cC(b, "executionTime", j); + } + if (!vmb(a.a).a.dc()) { + g = new wB(); + cC(b, Jte, g); + h = 0; + for (f2 = new Dnb(vmb(a.a).b.Kc()); f2.b.Ob(); ) { + e = BD(f2.b.Pb(), 1949); + i3 = new eC(); + tB(g, h); + vB(g, h, i3); + nvd(e, i3, c2, d); + ++h; + } + } + } + function PZb(a, b) { + var c2, d, e, f2, g, h; + f2 = a.c; + g = a.d; + QZb(a, null); + RZb(a, null); + b && Ccb(DD(vNb(g, (wtc(), Msc)))) ? QZb(a, i_b(g.i, (KAc(), IAc), (Ucd(), zcd))) : QZb(a, g); + b && Ccb(DD(vNb(f2, (wtc(), etc)))) ? RZb(a, i_b(f2.i, (KAc(), HAc), (Ucd(), Tcd))) : RZb(a, f2); + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 70); + e = BD(vNb(c2, (Nyc(), Qwc)), 272); + e == (qad(), pad2) ? yNb(c2, Qwc, oad) : e == oad && yNb(c2, Qwc, pad2); + } + h = Ccb(DD(vNb(a, (wtc(), ltc)))); + yNb(a, ltc, (Bcb(), h ? false : true)); + a.a = w7c(a.a); + } + function VQb(a, b, c2) { + var d, e, f2, g, h, i3; + d = 0; + for (f2 = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); f2.e != f2.i.gc(); ) { + e = BD(Dyd(f2), 33); + g = ""; + (!e.n && (e.n = new cUd(D2, e, 1, 7)), e.n).i == 0 || (g = BD(qud((!e.n && (e.n = new cUd(D2, e, 1, 7)), e.n), 0), 137).a); + h = new pRb(g); + tNb(h, e); + yNb(h, (HSb(), FSb), e); + h.b = d++; + h.d.a = e.i + e.g / 2; + h.d.b = e.j + e.f / 2; + h.e.a = $wnd.Math.max(e.g, 1); + h.e.b = $wnd.Math.max(e.f, 1); + Ekb(b.e, h); + jrb(c2.f, e, h); + i3 = BD(hkd(e, (wSb(), mSb)), 98); + i3 == (dcd(), ccd) && (i3 = bcd); + } + } + function XJc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + c2 = nGb(new pGb(), a.f); + j = a.i[b.c.i.p]; + n = a.i[b.d.i.p]; + i3 = b.c; + m = b.d; + h = i3.a.b; + l = m.a.b; + j.b || (h += i3.n.b); + n.b || (l += m.n.b); + k = QD($wnd.Math.max(0, h - l)); + g = QD($wnd.Math.max(0, l - h)); + o2 = (p = $wnd.Math.max(1, BD(vNb(b, (Nyc(), eyc)), 19).a), q = JJc(b.c.i.k, b.d.i.k), p * q); + e = AFb(DFb(CFb(BFb(EFb(new FFb(), o2), g), c2), BD(Ohb(a.k, b.c), 121))); + f2 = AFb(DFb(CFb(BFb(EFb(new FFb(), o2), k), c2), BD(Ohb(a.k, b.d), 121))); + d = new qKc(e, f2); + a.c[b.p] = d; + } + function NEc(a, b, c2, d) { + var e, f2, g, h, i3, j; + g = new _Ec(a, b, c2); + i3 = new Bib(d, 0); + e = false; + while (i3.b < i3.d.gc()) { + h = (sCb(i3.b < i3.d.gc()), BD(i3.d.Xb(i3.c = i3.b++), 233)); + if (h == b || h == c2) { + uib(i3); + } else if (!e && Edb(REc(h.g, h.d[0]).a) > Edb(REc(g.g, g.d[0]).a)) { + sCb(i3.b > 0); + i3.a.Xb(i3.c = --i3.b); + Aib(i3, g); + e = true; + } else if (!!h.e && h.e.gc() > 0) { + f2 = (!h.e && (h.e = new Rkb()), h.e).Mc(b); + j = (!h.e && (h.e = new Rkb()), h.e).Mc(c2); + if (f2 || j) { + (!h.e && (h.e = new Rkb()), h.e).Fc(g); + ++g.c; + } + } + } + e || (d.c[d.c.length] = g, true); + } + function odc(a) { + var b, c2, d; + if (fcd(BD(vNb(a, (Nyc(), Vxc)), 98))) { + for (c2 = new olb(a.j); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 11); + b.j == (Ucd(), Scd) && (d = BD(vNb(b, (wtc(), gtc)), 10), d ? G0b(b, BD(vNb(d, Hsc), 61)) : b.e.c.length - b.g.c.length < 0 ? G0b(b, zcd) : G0b(b, Tcd)); + } + } else { + for (c2 = new olb(a.j); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 11); + d = BD(vNb(b, (wtc(), gtc)), 10); + d ? G0b(b, BD(vNb(d, Hsc), 61)) : b.e.c.length - b.g.c.length < 0 ? G0b(b, (Ucd(), zcd)) : G0b(b, (Ucd(), Tcd)); + } + yNb(a, Vxc, (dcd(), acd)); + } + } + function age(a) { + var b, c2, d; + switch (a) { + case 91: + case 93: + case 45: + case 94: + case 44: + case 92: + d = "\\" + String.fromCharCode(a & aje); + break; + case 12: + d = "\\f"; + break; + case 10: + d = "\\n"; + break; + case 13: + d = "\\r"; + break; + case 9: + d = "\\t"; + break; + case 27: + d = "\\e"; + break; + default: + if (a < 32) { + c2 = (b = a >>> 0, "0" + b.toString(16)); + d = "\\x" + qfb(c2, c2.length - 2, c2.length); + } else if (a >= Tje) { + c2 = (b = a >>> 0, "0" + b.toString(16)); + d = "\\v" + qfb(c2, c2.length - 6, c2.length); + } else + d = "" + String.fromCharCode(a & aje); + } + return d; + } + function yhb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + g = a.e; + i3 = b.e; + if (i3 == 0) { + return a; + } + if (g == 0) { + return b.e == 0 ? b : new Vgb(-b.e, b.d, b.a); + } + f2 = a.d; + h = b.d; + if (f2 + h == 2) { + c2 = xbb(a.a[0], Yje); + d = xbb(b.a[0], Yje); + g < 0 && (c2 = Jbb(c2)); + i3 < 0 && (d = Jbb(d)); + return ghb(Qbb(c2, d)); + } + e = f2 != h ? f2 > h ? 1 : -1 : whb(a.a, b.a, f2); + if (e == -1) { + l = -i3; + k = g == i3 ? zhb(b.a, h, a.a, f2) : uhb(b.a, h, a.a, f2); + } else { + l = g; + if (g == i3) { + if (e == 0) { + return Hgb(), Ggb; + } + k = zhb(a.a, f2, b.a, h); + } else { + k = uhb(a.a, f2, b.a, h); + } + } + j = new Vgb(l, k.length, k); + Jgb(j); + return j; + } + function YPc(a) { + var b, c2, d, e, f2, g; + this.e = new Rkb(); + this.a = new Rkb(); + for (c2 = a.b - 1; c2 < 3; c2++) { + St(a, 0, BD(Ut(a, 0), 8)); + } + if (a.b < 4) { + throw vbb(new Wdb("At (least dimension + 1) control points are necessary!")); + } else { + this.b = 3; + this.d = true; + this.c = false; + TPc(this, a.b + this.b - 1); + g = new Rkb(); + f2 = new olb(this.e); + for (b = 0; b < this.b - 1; b++) { + Ekb(g, ED(mlb(f2))); + } + for (e = Jsb(a, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 8); + Ekb(g, ED(mlb(f2))); + Ekb(this.a, new bQc(d, g)); + tCb(0, g.c.length); + g.c.splice(0, 1); + } + } + } + function Bac(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), f0b)) { + i3 = (j = BD(Rr(new Sr(ur(R_b(g).a.Kc(), new Sq()))), 17), k = BD(Rr(new Sr(ur(U_b(g).a.Kc(), new Sq()))), 17), !Ccb(DD(vNb(j, (wtc(), ltc)))) || !Ccb(DD(vNb(k, ltc)))) ? b : sbd(b); + zac(g, i3); + } + for (d = new Sr(ur(U_b(g).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + i3 = Ccb(DD(vNb(c2, (wtc(), ltc)))) ? sbd(b) : b; + yac(c2, i3); + } + } + } + } + function yZc(a, b, c2, d, e) { + var f2, g, h; + if (c2.f >= b.o && c2.f <= b.f || b.a * 0.5 <= c2.f && b.a * 1.5 >= c2.f) { + g = BD(Ikb(b.n, b.n.c.length - 1), 211); + if (g.e + g.d + c2.g + e <= d && (f2 = BD(Ikb(b.n, b.n.c.length - 1), 211), f2.f - a.f + c2.f <= a.b || a.a.c.length == 1)) { + EZc(b, c2); + return true; + } else if (b.s + c2.g <= d && (b.t + b.d + c2.f + e <= a.b || a.a.c.length == 1)) { + Ekb(b.b, c2); + h = BD(Ikb(b.n, b.n.c.length - 1), 211); + Ekb(b.n, new VZc(b.s, h.f + h.a + b.i, b.i)); + QZc(BD(Ikb(b.n, b.n.c.length - 1), 211), c2); + GZc(b, c2); + return true; + } + } + return false; + } + function Zxd(a, b, c2) { + var d, e, f2, g; + if (a.ej()) { + e = null; + f2 = a.fj(); + d = a.Zi(1, g = uud(a, b, c2), c2, b, f2); + if (a.bj() && !(a.ni() && g != null ? pb(g, c2) : PD(g) === PD(c2))) { + g != null && (e = a.dj(g, e)); + e = a.cj(c2, e); + a.ij() && (e = a.lj(g, c2, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } else { + a.ij() && (e = a.lj(g, c2, e)); + if (!e) { + a.$i(d); + } else { + e.Ei(d); + e.Fi(); + } + } + return g; + } else { + g = uud(a, b, c2); + if (a.bj() && !(a.ni() && g != null ? pb(g, c2) : PD(g) === PD(c2))) { + e = null; + g != null && (e = a.dj(g, null)); + e = a.cj(c2, e); + !!e && e.Fi(); + } + return g; + } + } + function YA(a, b) { + var c2, d, e, f2, g, h, i3, j; + b %= 24; + if (a.q.getHours() != b) { + d = new $wnd.Date(a.q.getTime()); + d.setDate(d.getDate() + 1); + h = a.q.getTimezoneOffset() - d.getTimezoneOffset(); + if (h > 0) { + i3 = h / 60 | 0; + j = h % 60; + e = a.q.getDate(); + c2 = a.q.getHours(); + c2 + i3 >= 24 && ++e; + f2 = new $wnd.Date(a.q.getFullYear(), a.q.getMonth(), e, b + i3, a.q.getMinutes() + j, a.q.getSeconds(), a.q.getMilliseconds()); + a.q.setTime(f2.getTime()); + } + } + g = a.q.getTime(); + a.q.setTime(g + 36e5); + a.q.getHours() != b && a.q.setTime(g); + } + function opc(a, b) { + var c2, d, e, f2, g; + Odd(b, "Path-Like Graph Wrapping", 1); + if (a.b.c.length == 0) { + Qdd(b); + return; + } + e = new Xoc(a); + g = (e.i == null && (e.i = Soc(e, new Zoc())), Edb(e.i) * e.f); + c2 = g / (e.i == null && (e.i = Soc(e, new Zoc())), Edb(e.i)); + if (e.b > c2) { + Qdd(b); + return; + } + switch (BD(vNb(a, (Nyc(), Gyc)), 337).g) { + case 2: + f2 = new hpc(); + break; + case 0: + f2 = new Ync(); + break; + default: + f2 = new kpc(); + } + d = f2.Vf(a, e); + if (!f2.Wf()) { + switch (BD(vNb(a, Myc), 338).g) { + case 2: + d = tpc(e, d); + break; + case 1: + d = rpc(e, d); + } + } + npc(a, e, d); + Qdd(b); + } + function MFc(a, b) { + var c2, d, e, f2; + Fub(a.d, a.e); + a.c.a.$b(); + if (Edb(ED(vNb(b.j, (Nyc(), uwc)))) != 0 || Edb(ED(vNb(b.j, uwc))) != 0) { + c2 = dme; + PD(vNb(b.j, ywc)) !== PD((tAc(), rAc)) && yNb(b.j, (wtc(), Jsc), (Bcb(), true)); + f2 = BD(vNb(b.j, Ayc), 19).a; + for (e = 0; e < f2; e++) { + d = WFc(a, b); + if (d < c2) { + c2 = d; + ZFc(a); + if (c2 == 0) { + break; + } + } + } + } else { + c2 = Ohe; + PD(vNb(b.j, ywc)) !== PD((tAc(), rAc)) && yNb(b.j, (wtc(), Jsc), (Bcb(), true)); + f2 = BD(vNb(b.j, Ayc), 19).a; + for (e = 0; e < f2; e++) { + d = XFc(a, b); + if (d < c2) { + c2 = d; + ZFc(a); + if (c2 == 0) { + break; + } + } + } + } + } + function spc(a, b) { + var c2, d, e, f2, g, h, i3, j; + g = new Rkb(); + h = 0; + c2 = 0; + i3 = 0; + while (h < b.c.length - 1 && c2 < a.gc()) { + d = BD(a.Xb(c2), 19).a + i3; + while ((tCb(h + 1, b.c.length), BD(b.c[h + 1], 19)).a < d) { + ++h; + } + j = 0; + f2 = d - (tCb(h, b.c.length), BD(b.c[h], 19)).a; + e = (tCb(h + 1, b.c.length), BD(b.c[h + 1], 19)).a - d; + f2 > e && ++j; + Ekb(g, (tCb(h + j, b.c.length), BD(b.c[h + j], 19))); + i3 += (tCb(h + j, b.c.length), BD(b.c[h + j], 19)).a - d; + ++c2; + while (c2 < a.gc() && BD(a.Xb(c2), 19).a + i3 <= (tCb(h + j, b.c.length), BD(b.c[h + j], 19)).a) { + ++c2; + } + h += 1 + j; + } + return g; + } + function RKd(a) { + var b, c2, d, e, f2, g, h; + if (!a.d) { + h = new XNd(); + b = KKd; + f2 = b.a.zc(a, b); + if (f2 == null) { + for (d = new Fyd(_Kd(a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 26); + ytd(h, RKd(c2)); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + g = h.i; + for (e = (!a.q && (a.q = new cUd(n5, a, 11, 10)), new Fyd(a.q)); e.e != e.i.gc(); ++g) { + BD(Dyd(e), 399); + } + ytd(h, (!a.q && (a.q = new cUd(n5, a, 11, 10)), a.q)); + vud(h); + a.d = new nNd((BD(qud(ZKd((NFd(), MFd).o), 9), 18), h.i), h.g); + a.e = BD(h.g, 673); + a.e == null && (a.e = LKd); + $Kd(a).b &= -17; + } + return a.d; + } + function M2d(a, b, c2, d) { + var e, f2, g, h, i3, j; + j = S6d(a.e.Tg(), b); + i3 = 0; + e = BD(a.g, 119); + Q6d(); + if (BD(b, 66).Oj()) { + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (j.rl(f2.ak())) { + if (pb(f2, c2)) { + return i3; + } + ++i3; + } + } + } else if (c2 != null) { + for (h = 0; h < a.i; ++h) { + f2 = e[h]; + if (j.rl(f2.ak())) { + if (pb(c2, f2.dd())) { + return i3; + } + ++i3; + } + } + if (d) { + i3 = 0; + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (j.rl(f2.ak())) { + if (PD(c2) === PD(a3d(a, BD(f2.dd(), 56)))) { + return i3; + } + ++i3; + } + } + } + } else { + for (g = 0; g < a.i; ++g) { + f2 = e[g]; + if (j.rl(f2.ak())) { + if (f2.dd() == null) { + return i3; + } + ++i3; + } + } + } + return -1; + } + function aed(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n; + mmb(); + Okb(a, new Jed()); + g = Ru(a); + n = new Rkb(); + m = new Rkb(); + h = null; + i3 = 0; + while (g.b != 0) { + f2 = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 157); + if (!h || red(h) * qed(h) / 2 < red(f2) * qed(f2)) { + h = f2; + n.c[n.c.length] = f2; + } else { + i3 += red(f2) * qed(f2); + m.c[m.c.length] = f2; + if (m.c.length > 1 && (i3 > red(h) * qed(h) / 2 || g.b == 0)) { + l = new wed(m); + k = red(h) / qed(h); + j = fed(l, b, new p0b(), c2, d, e, k); + P6c(X6c(l.e), j); + h = l; + n.c[n.c.length] = l; + i3 = 0; + m.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + } + Gkb(n, m); + return n; + } + function y6d(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p; + if (c2.mh(b)) { + k = (n = b, !n ? null : BD(d, 49).xh(n)); + if (k) { + p = c2.bh(b, a.a); + o2 = b.t; + if (o2 > 1 || o2 == -1) { + l = BD(p, 69); + m = BD(k, 69); + if (l.dc()) { + m.$b(); + } else { + g = !!zUd(b); + f2 = 0; + for (h = a.a ? l.Kc() : l.Zh(); h.Ob(); ) { + j = BD(h.Pb(), 56); + e = BD(Wrb(a, j), 56); + if (!e) { + if (a.b && !g) { + m.Xh(f2, j); + ++f2; + } + } else { + if (g) { + i3 = m.Xc(e); + i3 == -1 ? m.Xh(f2, e) : f2 != i3 && m.ji(f2, e); + } else { + m.Xh(f2, e); + } + ++f2; + } + } + } + } else { + if (p == null) { + k.Wb(null); + } else { + e = Wrb(a, p); + e == null ? a.b && !zUd(b) && k.Wb(p) : k.Wb(e); + } + } + } + } + } + function E6b(a, b) { + var c2, d, e, f2, g, h, i3, j; + c2 = new L6b(); + for (e = new Sr(ur(R_b(b).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (OZb(d)) { + continue; + } + h = d.c.i; + if (F6b(h, C6b)) { + j = G6b(a, h, C6b, B6b); + if (j == -1) { + continue; + } + c2.b = $wnd.Math.max(c2.b, j); + !c2.a && (c2.a = new Rkb()); + Ekb(c2.a, h); + } + } + for (g = new Sr(ur(U_b(b).a.Kc(), new Sq())); Qr(g); ) { + f2 = BD(Rr(g), 17); + if (OZb(f2)) { + continue; + } + i3 = f2.d.i; + if (F6b(i3, B6b)) { + j = G6b(a, i3, B6b, C6b); + if (j == -1) { + continue; + } + c2.d = $wnd.Math.max(c2.d, j); + !c2.c && (c2.c = new Rkb()); + Ekb(c2.c, i3); + } + } + return c2; + } + function Khb(a) { + Dhb(); + var b, c2, d, e; + b = QD(a); + if (a < Chb.length) { + return Chb[b]; + } else if (a <= 50) { + return Pgb((Hgb(), Egb), b); + } else if (a <= _ie) { + return Qgb(Pgb(Bhb[1], b), b); + } + if (a > 1e6) { + throw vbb(new ocb("power of ten too big")); + } + if (a <= Ohe) { + return Qgb(Pgb(Bhb[1], b), b); + } + d = Pgb(Bhb[1], Ohe); + e = d; + c2 = Cbb(a - Ohe); + b = QD(a % Ohe); + while (ybb(c2, Ohe) > 0) { + e = Ogb(e, d); + c2 = Qbb(c2, Ohe); + } + e = Ogb(e, Pgb(Bhb[1], b)); + e = Qgb(e, Ohe); + c2 = Cbb(a - Ohe); + while (ybb(c2, Ohe) > 0) { + e = Qgb(e, Ohe); + c2 = Qbb(c2, Ohe); + } + e = Qgb(e, b); + return e; + } + function X5b(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + Odd(b, "Hierarchical port dummy size processing", 1); + i3 = new Rkb(); + k = new Rkb(); + d = Edb(ED(vNb(a, (Nyc(), myc)))); + c2 = d * 2; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + i3.c = KC(SI, Uhe, 1, 0, 5, 1); + k.c = KC(SI, Uhe, 1, 0, 5, 1); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), e0b)) { + j = BD(vNb(g, (wtc(), Hsc)), 61); + j == (Ucd(), Acd) ? (i3.c[i3.c.length] = g, true) : j == Rcd && (k.c[k.c.length] = g, true); + } + } + Y5b(i3, true, c2); + Y5b(k, false, c2); + } + Qdd(b); + } + function Oac(a, b) { + var c2, d, e, f2, g, h, i3; + Odd(b, "Layer constraint postprocessing", 1); + i3 = a.b; + if (i3.c.length != 0) { + d = (tCb(0, i3.c.length), BD(i3.c[0], 29)); + g = BD(Ikb(i3, i3.c.length - 1), 29); + c2 = new H1b(a); + f2 = new H1b(a); + Mac(a, d, g, c2, f2); + c2.a.c.length == 0 || (wCb(0, i3.c.length), aCb(i3.c, 0, c2)); + f2.a.c.length == 0 || (i3.c[i3.c.length] = f2, true); + } + if (wNb(a, (wtc(), Lsc))) { + e = new H1b(a); + h = new H1b(a); + Pac(a, e, h); + e.a.c.length == 0 || (wCb(0, i3.c.length), aCb(i3.c, 0, e)); + h.a.c.length == 0 || (i3.c[i3.c.length] = h, true); + } + Qdd(b); + } + function b6b(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + for (i3 = new olb(a.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + if (h.k != (j0b(), e0b)) { + continue; + } + e = BD(vNb(h, (wtc(), Hsc)), 61); + if (e == (Ucd(), zcd) || e == Tcd) { + for (d = new Sr(ur(O_b(h).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + b = c2.a; + if (b.b == 0) { + continue; + } + j = c2.c; + if (j.i == h) { + f2 = (sCb(b.b != 0), BD(b.a.a.c, 8)); + f2.b = l7c(OC(GC(m1, 1), nie, 8, 0, [j.i.n, j.n, j.a])).b; + } + k = c2.d; + if (k.i == h) { + g = (sCb(b.b != 0), BD(b.c.b.c, 8)); + g.b = l7c(OC(GC(m1, 1), nie, 8, 0, [k.i.n, k.n, k.a])).b; + } + } + } + } + } + function Tec(a, b) { + var c2, d, e, f2, g, h, i3; + Odd(b, "Sort By Input Model " + vNb(a, (Nyc(), ywc)), 1); + e = 0; + for (d = new olb(a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + i3 = e == 0 ? 0 : e - 1; + h = BD(Ikb(a.b, i3), 29); + for (g = new olb(c2.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + if (PD(vNb(f2, Vxc)) !== PD((dcd(), Zbd)) && PD(vNb(f2, Vxc)) !== PD($bd)) { + mmb(); + Okb(f2.j, new Tnc(h, Xec(f2))); + Sdd(b, "Node " + f2 + " ports: " + f2.j); + } + } + mmb(); + Okb(c2.a, new Bnc(h, BD(vNb(a, ywc), 339), BD(vNb(a, wwc), 378))); + Sdd(b, "Layer " + e + ": " + c2); + ++e; + } + Qdd(b); + } + function U1b(a, b) { + var c2, d, e, f2; + f2 = P1b(b); + MAb(new YAb(null, (!b.c && (b.c = new cUd(F2, b, 9, 9)), new Kub(b.c, 16))), new i2b(f2)); + e = BD(vNb(f2, (wtc(), Ksc)), 21); + O1b(b, e); + if (e.Hc((Orc(), Hrc))) { + for (d = new Fyd((!b.c && (b.c = new cUd(F2, b, 9, 9)), b.c)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 118); + Y1b(a, b, f2, c2); + } + } + BD(hkd(b, (Nyc(), Fxc)), 174).gc() != 0 && L1b(b, f2); + Ccb(DD(vNb(f2, Mxc))) && e.Fc(Mrc); + wNb(f2, hyc) && Wyc(new ezc(Edb(ED(vNb(f2, hyc)))), f2); + PD(hkd(b, axc)) === PD((hbd(), ebd)) ? V1b(a, b, f2) : T1b(a, b, f2); + return f2; + } + function hic(a, b, c2, d) { + var e, f2, g; + this.j = new Rkb(); + this.k = new Rkb(); + this.b = new Rkb(); + this.c = new Rkb(); + this.e = new I6c(); + this.i = new s7c(); + this.f = new lEb(); + this.d = new Rkb(); + this.g = new Rkb(); + Ekb(this.b, a); + Ekb(this.b, b); + this.e.c = $wnd.Math.min(a.a, b.a); + this.e.d = $wnd.Math.min(a.b, b.b); + this.e.b = $wnd.Math.abs(a.a - b.a); + this.e.a = $wnd.Math.abs(a.b - b.b); + e = BD(vNb(d, (Nyc(), jxc)), 74); + if (e) { + for (g = Jsb(e, 0); g.b != g.d.c; ) { + f2 = BD(Xsb(g), 8); + ADb(f2.a, a.a) && Dsb(this.i, f2); + } + } + !!c2 && Ekb(this.j, c2); + Ekb(this.k, d); + } + function oTb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + k = new gub(new ETb(c2)); + h = KC(sbb, dle, 25, a.f.e.c.length, 16, 1); + Glb(h, h.length); + c2[b.b] = 0; + for (j = new olb(a.f.e); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 144); + i3.b != b.b && (c2[i3.b] = Ohe); + zCb(cub(k, i3)); + } + while (k.b.c.length != 0) { + l = BD(dub(k), 144); + h[l.b] = true; + for (f2 = au(new bu(a.b, l), 0); f2.c; ) { + e = BD(uu(f2), 282); + m = rTb(e, l); + if (h[m.b]) { + continue; + } + wNb(e, (bTb(), RSb)) ? g = Edb(ED(vNb(e, RSb))) : g = a.c; + d = c2[l.b] + g; + if (d < c2[m.b]) { + c2[m.b] = d; + eub(k, m); + zCb(cub(k, m)); + } + } + } + } + function xMc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + e = true; + for (g = new olb(a.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + j = Qje; + k = null; + for (i3 = new olb(f2.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + l = Edb(b.p[h.p]) + Edb(b.d[h.p]) - h.d.d; + d = Edb(b.p[h.p]) + Edb(b.d[h.p]) + h.o.b + h.d.a; + if (l > j && d > j) { + k = h; + j = Edb(b.p[h.p]) + Edb(b.d[h.p]) + h.o.b + h.d.a; + } else { + e = false; + c2.n && Sdd(c2, "bk node placement breaks on " + h + " which should have been after " + k); + break; + } + } + if (!e) { + break; + } + } + c2.n && Sdd(c2, b + " is feasible: " + e); + return e; + } + function XNc(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + h = -1; + for (k = new olb(a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 112); + j.g = h--; + e = Tbb(tAb(PAb(JAb(new YAb(null, new Kub(j.f, 16)), new ZNc()), new _Nc())).d); + f2 = Tbb(tAb(PAb(JAb(new YAb(null, new Kub(j.k, 16)), new bOc()), new dOc())).d); + g = e; + i3 = f2; + if (!d) { + g = Tbb(tAb(PAb(new YAb(null, new Kub(j.f, 16)), new fOc())).d); + i3 = Tbb(tAb(PAb(new YAb(null, new Kub(j.k, 16)), new hOc())).d); + } + j.d = g; + j.a = e; + j.i = i3; + j.b = f2; + i3 == 0 ? (Gsb(c2, j, c2.c.b, c2.c), true) : g == 0 && (Gsb(b, j, b.c.b, b.c), true); + } + } + function $8b(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + if (c2.d.i == b.i) { + return; + } + e = new b0b(a); + __b(e, (j0b(), g0b)); + yNb(e, (wtc(), $sc), c2); + yNb(e, (Nyc(), Vxc), (dcd(), $bd)); + d.c[d.c.length] = e; + g = new H0b(); + F0b(g, e); + G0b(g, (Ucd(), Tcd)); + h = new H0b(); + F0b(h, e); + G0b(h, zcd); + k = c2.d; + RZb(c2, g); + f2 = new UZb(); + tNb(f2, c2); + yNb(f2, jxc, null); + QZb(f2, h); + RZb(f2, k); + j = new Bib(c2.b, 0); + while (j.b < j.d.gc()) { + i3 = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 70)); + if (PD(vNb(i3, Qwc)) === PD((qad(), oad))) { + yNb(i3, Dsc, c2); + uib(j); + Ekb(f2.b, i3); + } + } + a9b(e, g, h); + } + function Z8b(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + if (c2.c.i == b.i) { + return; + } + e = new b0b(a); + __b(e, (j0b(), g0b)); + yNb(e, (wtc(), $sc), c2); + yNb(e, (Nyc(), Vxc), (dcd(), $bd)); + d.c[d.c.length] = e; + g = new H0b(); + F0b(g, e); + G0b(g, (Ucd(), Tcd)); + h = new H0b(); + F0b(h, e); + G0b(h, zcd); + RZb(c2, g); + f2 = new UZb(); + tNb(f2, c2); + yNb(f2, jxc, null); + QZb(f2, h); + RZb(f2, b); + a9b(e, g, h); + j = new Bib(c2.b, 0); + while (j.b < j.d.gc()) { + i3 = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 70)); + k = BD(vNb(i3, Qwc), 272); + if (k == (qad(), oad)) { + wNb(i3, Dsc) || yNb(i3, Dsc, c2); + uib(j); + Ekb(f2.b, i3); + } + } + } + function dDc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + m = new Rkb(); + r = Gx(d); + q = b * a.a; + l = 0; + o2 = 0; + f2 = new Tqb(); + g = new Tqb(); + h = new Rkb(); + s = 0; + t = 0; + n = 0; + p = 0; + j = 0; + k = 0; + while (r.a.gc() != 0) { + i3 = hDc(r, e, g); + if (i3) { + r.a.Bc(i3) != null; + h.c[h.c.length] = i3; + f2.a.zc(i3, f2); + o2 = a.f[i3.p]; + s += a.e[i3.p] - o2 * a.b; + l = a.c[i3.p]; + t += l * a.b; + k += o2 * a.b; + p += a.e[i3.p]; + } + if (!i3 || r.a.gc() == 0 || s >= q && a.e[i3.p] > o2 * a.b || t >= c2 * q) { + m.c[m.c.length] = h; + h = new Rkb(); + ye(g, f2); + f2.a.$b(); + j -= k; + n = $wnd.Math.max(n, j * a.b + p); + j += t; + s = t; + t = 0; + k = 0; + p = 0; + } + } + return new vgd(n, m); + } + function q4c(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n; + for (c2 = (j = new $ib(a.c.b).a.vc().Kc(), new djb(j)); c2.a.Ob(); ) { + b = (h = BD(c2.a.Pb(), 42), BD(h.dd(), 149)); + e = b.a; + e == null && (e = ""); + d = i4c(a.c, e); + !d && e.length == 0 && (d = u4c(a)); + !!d && !ze(d.c, b, false) && Dsb(d.c, b); + } + for (g = Jsb(a.a, 0); g.b != g.d.c; ) { + f2 = BD(Xsb(g), 478); + k = j4c(a.c, f2.a); + n = j4c(a.c, f2.b); + !!k && !!n && Dsb(k.c, new vgd(n, f2.c)); + } + Osb(a.a); + for (m = Jsb(a.b, 0); m.b != m.d.c; ) { + l = BD(Xsb(m), 478); + b = g4c(a.c, l.a); + i3 = j4c(a.c, l.b); + !!b && !!i3 && B3c(b, i3, l.c); + } + Osb(a.b); + } + function qvd(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + f2 = new fC(a); + g = new ird(); + e = (ko(g.g), ko(g.j), Uhb(g.b), ko(g.d), ko(g.i), Uhb(g.k), Uhb(g.c), Uhb(g.e), n = drd(g, f2, null), ard(g, f2), n); + if (b) { + j = new fC(b); + h = rvd(j); + jfd(e, OC(GC(g2, 1), Uhe, 527, 0, [h])); + } + m = false; + l = false; + if (c2) { + j = new fC(c2); + que in j.a && (m = aC(j, que).ge().a); + rue in j.a && (l = aC(j, rue).ge().a); + } + k = Vdd(Xdd(new Zdd(), m), l); + t2c(new w2c(), e, k); + que in f2.a && cC(f2, que, null); + if (m || l) { + i3 = new eC(); + nvd(k, i3, m, l); + cC(f2, que, i3); + } + d = new Prd(g); + Ghe(new _ud(e), d); + } + function pA(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + g = new nB(); + j = OC(GC(WD, 1), oje, 25, 15, [0]); + e = -1; + f2 = 0; + d = 0; + for (i3 = 0; i3 < a.b.c.length; ++i3) { + k = BD(Ikb(a.b, i3), 434); + if (k.b > 0) { + if (e < 0 && k.a) { + e = i3; + f2 = j[0]; + d = 0; + } + if (e >= 0) { + h = k.b; + if (i3 == e) { + h -= d++; + if (h == 0) { + return 0; + } + } + if (!wA(b, j, k, h, g)) { + i3 = e - 1; + j[0] = f2; + continue; + } + } else { + e = -1; + if (!wA(b, j, k, 0, g)) { + return 0; + } + } + } else { + e = -1; + if (bfb(k.c, 0) == 32) { + l = j[0]; + uA(b, j); + if (j[0] > l) { + continue; + } + } else if (ofb(b, k.c, j[0])) { + j[0] += k.c.length; + continue; + } + return 0; + } + } + if (!mB(g, c2)) { + return 0; + } + return j[0]; + } + function SKd(a) { + var b, c2, d, e, f2, g, h, i3; + if (!a.f) { + i3 = new CNd(); + h = new CNd(); + b = KKd; + g = b.a.zc(a, b); + if (g == null) { + for (f2 = new Fyd(_Kd(a)); f2.e != f2.i.gc(); ) { + e = BD(Dyd(f2), 26); + ytd(i3, SKd(e)); + } + b.a.Bc(a) != null; + b.a.gc() == 0 && void 0; + } + for (d = (!a.s && (a.s = new cUd(t5, a, 21, 17)), new Fyd(a.s)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 170); + JD(c2, 99) && wtd(h, BD(c2, 18)); + } + vud(h); + a.r = new UNd(a, (BD(qud(ZKd((NFd(), MFd).o), 6), 18), h.i), h.g); + ytd(i3, a.r); + vud(i3); + a.f = new nNd((BD(qud(ZKd(MFd.o), 5), 18), i3.i), i3.g); + $Kd(a).b &= -3; + } + return a.f; + } + function rMb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + g = a.o; + d = KC(WD, oje, 25, g, 15, 1); + e = KC(WD, oje, 25, g, 15, 1); + c2 = a.p; + b = KC(WD, oje, 25, c2, 15, 1); + f2 = KC(WD, oje, 25, c2, 15, 1); + for (j = 0; j < g; j++) { + l = 0; + while (l < c2 && !YMb(a, j, l)) { + ++l; + } + d[j] = l; + } + for (k = 0; k < g; k++) { + l = c2 - 1; + while (l >= 0 && !YMb(a, k, l)) { + --l; + } + e[k] = l; + } + for (n = 0; n < c2; n++) { + h = 0; + while (h < g && !YMb(a, h, n)) { + ++h; + } + b[n] = h; + } + for (o2 = 0; o2 < c2; o2++) { + h = g - 1; + while (h >= 0 && !YMb(a, h, o2)) { + --h; + } + f2[o2] = h; + } + for (i3 = 0; i3 < g; i3++) { + for (m = 0; m < c2; m++) { + i3 < f2[m] && i3 > b[m] && m < e[i3] && m > d[i3] && aNb(a, i3, m, false, true); + } + } + } + function lRb(a) { + var b, c2, d, e, f2, g, h, i3; + c2 = Ccb(DD(vNb(a, (wSb(), cSb)))); + f2 = a.a.c.d; + h = a.a.d.d; + if (c2) { + g = Y6c(c7c(new f7c(h.a, h.b), f2), 0.5); + i3 = Y6c(R6c(a.e), 0.5); + b = c7c(P6c(new f7c(f2.a, f2.b), g), i3); + a7c(a.d, b); + } else { + e = Edb(ED(vNb(a.a, tSb))); + d = a.d; + if (f2.a >= h.a) { + if (f2.b >= h.b) { + d.a = h.a + (f2.a - h.a) / 2 + e; + d.b = h.b + (f2.b - h.b) / 2 - e - a.e.b; + } else { + d.a = h.a + (f2.a - h.a) / 2 + e; + d.b = f2.b + (h.b - f2.b) / 2 + e; + } + } else { + if (f2.b >= h.b) { + d.a = f2.a + (h.a - f2.a) / 2 + e; + d.b = h.b + (f2.b - h.b) / 2 + e; + } else { + d.a = f2.a + (h.a - f2.a) / 2 + e; + d.b = f2.b + (h.b - f2.b) / 2 - e - a.e.b; + } + } + } + } + function Qge(a, b) { + var c2, d, e, f2, g, h, i3; + if (a == null) { + return null; + } + f2 = a.length; + if (f2 == 0) { + return ""; + } + i3 = KC(TD, $ie, 25, f2, 15, 1); + ACb(0, f2, a.length); + ACb(0, f2, i3.length); + ffb(a, 0, f2, i3, 0); + c2 = null; + h = b; + for (e = 0, g = 0; e < f2; e++) { + d = i3[e]; + lde(); + if (d <= 32 && (kde[d] & 2) != 0) { + if (h) { + !c2 && (c2 = new Jfb(a)); + Gfb(c2, e - g++); + } else { + h = b; + if (d != 32) { + !c2 && (c2 = new Jfb(a)); + kcb(c2, e - g, e - g + 1, String.fromCharCode(32)); + } + } + } else { + h = false; + } + } + if (h) { + if (!c2) { + return a.substr(0, f2 - 1); + } else { + f2 = c2.a.length; + return f2 > 0 ? qfb(c2.a, 0, f2 - 1) : ""; + } + } else { + return !c2 ? a : c2.a; + } + } + function DPb(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Yle), "ELK DisCo"), "Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."), new GPb()))); + p4c(a, Yle, Zle, Ksd(BPb)); + p4c(a, Yle, $le, Ksd(vPb)); + p4c(a, Yle, _le, Ksd(qPb)); + p4c(a, Yle, ame, Ksd(wPb)); + p4c(a, Yle, Zke, Ksd(zPb)); + p4c(a, Yle, $ke, Ksd(yPb)); + p4c(a, Yle, Yke, Ksd(APb)); + p4c(a, Yle, _ke, Ksd(xPb)); + p4c(a, Yle, Tle, Ksd(sPb)); + p4c(a, Yle, Ule, Ksd(rPb)); + p4c(a, Yle, Vle, Ksd(tPb)); + p4c(a, Yle, Wle, Ksd(uPb)); + } + function Zbc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m; + f2 = new b0b(a); + __b(f2, (j0b(), i0b)); + yNb(f2, (Nyc(), Vxc), (dcd(), $bd)); + e = 0; + if (b) { + g = new H0b(); + yNb(g, (wtc(), $sc), b); + yNb(f2, $sc, b.i); + G0b(g, (Ucd(), Tcd)); + F0b(g, f2); + m = k_b(b.e); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i3 = j[k]; + RZb(i3, g); + } + yNb(b, gtc, f2); + ++e; + } + if (c2) { + h = new H0b(); + yNb(f2, (wtc(), $sc), c2.i); + yNb(h, $sc, c2); + G0b(h, (Ucd(), zcd)); + F0b(h, f2); + m = k_b(c2.g); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i3 = j[k]; + QZb(i3, h); + } + yNb(c2, gtc, f2); + ++e; + } + yNb(f2, (wtc(), ysc), meb(e)); + d.c[d.c.length] = f2; + return f2; + } + function Smd() { + Smd = ccb; + Qmd = OC(GC(TD, 1), $ie, 25, 15, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70]); + Rmd = new RegExp("[ \n\r\f]+"); + try { + Pmd = OC(GC(c6, 1), Uhe, 2015, 0, [new EQd((GA(), IA("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ", LA((KA(), KA(), JA))))), new EQd(IA("yyyy-MM-dd'T'HH:mm:ss'.'SSS", LA((null, JA)))), new EQd(IA("yyyy-MM-dd'T'HH:mm:ss", LA((null, JA)))), new EQd(IA("yyyy-MM-dd'T'HH:mm", LA((null, JA)))), new EQd(IA("yyyy-MM-dd", LA((null, JA))))]); + } catch (a) { + a = ubb(a); + if (!JD(a, 78)) + throw vbb(a); + } + } + function qgb(a) { + var b, c2, d, e; + d = shb((!a.c && (a.c = fhb(a.f)), a.c), 0); + if (a.e == 0 || a.a == 0 && a.f != -1 && a.e < 0) { + return d; + } + b = pgb(a) < 0 ? 1 : 0; + c2 = a.e; + e = (d.length + 1 + $wnd.Math.abs(QD(a.e)), new Vfb()); + b == 1 && (e.a += "-", e); + if (a.e > 0) { + c2 -= d.length - b; + if (c2 >= 0) { + e.a += "0."; + for (; c2 > egb.length; c2 -= egb.length) { + Rfb(e, egb); + } + Sfb(e, egb, QD(c2)); + Qfb(e, d.substr(b)); + } else { + c2 = b - c2; + Qfb(e, qfb(d, b, QD(c2))); + e.a += "."; + Qfb(e, pfb(d, QD(c2))); + } + } else { + Qfb(e, d.substr(b)); + for (; c2 < -egb.length; c2 += egb.length) { + Rfb(e, egb); + } + Sfb(e, egb, QD(-c2)); + } + return e.a; + } + function v6c(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m; + i3 = c7c(new f7c(c2.a, c2.b), a); + j = i3.a * b.b - i3.b * b.a; + k = b.a * d.b - b.b * d.a; + l = (i3.a * d.b - i3.b * d.a) / k; + m = j / k; + if (k == 0) { + if (j == 0) { + e = P6c(new f7c(c2.a, c2.b), Y6c(new f7c(d.a, d.b), 0.5)); + f2 = S6c(a, e); + g = S6c(P6c(new f7c(a.a, a.b), b), e); + h = $wnd.Math.sqrt(d.a * d.a + d.b * d.b) * 0.5; + if (f2 < g && f2 <= h) { + return new f7c(a.a, a.b); + } + if (g <= h) { + return P6c(new f7c(a.a, a.b), b); + } + return null; + } else { + return null; + } + } else { + return l >= 0 && l <= 1 && m >= 0 && m <= 1 ? P6c(new f7c(a.a, a.b), Y6c(new f7c(b.a, b.b), l)) : null; + } + } + function OTb(a, b, c2) { + var d, e, f2, g, h; + d = BD(vNb(a, (Nyc(), zwc)), 21); + c2.a > b.a && (d.Hc((i8c(), c8c)) ? a.c.a += (c2.a - b.a) / 2 : d.Hc(e8c) && (a.c.a += c2.a - b.a)); + c2.b > b.b && (d.Hc((i8c(), g8c)) ? a.c.b += (c2.b - b.b) / 2 : d.Hc(f8c) && (a.c.b += c2.b - b.b)); + if (BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) && (c2.a > b.a || c2.b > b.b)) { + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k == (j0b(), e0b)) { + e = BD(vNb(g, Hsc), 61); + e == (Ucd(), zcd) ? g.n.a += c2.a - b.a : e == Rcd && (g.n.b += c2.b - b.b); + } + } + } + f2 = a.d; + a.f.a = c2.a - f2.b - f2.c; + a.f.b = c2.b - f2.d - f2.a; + } + function H5b(a, b, c2) { + var d, e, f2, g, h; + d = BD(vNb(a, (Nyc(), zwc)), 21); + c2.a > b.a && (d.Hc((i8c(), c8c)) ? a.c.a += (c2.a - b.a) / 2 : d.Hc(e8c) && (a.c.a += c2.a - b.a)); + c2.b > b.b && (d.Hc((i8c(), g8c)) ? a.c.b += (c2.b - b.b) / 2 : d.Hc(f8c) && (a.c.b += c2.b - b.b)); + if (BD(vNb(a, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) && (c2.a > b.a || c2.b > b.b)) { + for (g = new olb(a.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + if (f2.k == (j0b(), e0b)) { + e = BD(vNb(f2, Hsc), 61); + e == (Ucd(), zcd) ? f2.n.a += c2.a - b.a : e == Rcd && (f2.n.b += c2.b - b.b); + } + } + } + h = a.d; + a.f.a = c2.a - h.b - h.c; + a.f.b = c2.b - h.d - h.a; + } + function kMc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + b = DMc(a); + for (k = (h = new Pib(b).a.vc().Kc(), new Vib(h)); k.a.Ob(); ) { + j = (e = BD(k.a.Pb(), 42), BD(e.cd(), 10)); + l = 0; + m = 0; + l = j.d.d; + m = j.o.b + j.d.a; + a.d[j.p] = 0; + c2 = j; + while ((f2 = a.a[c2.p]) != j) { + d = FMc(c2, f2); + i3 = 0; + a.c == (YLc(), WLc) ? i3 = d.d.n.b + d.d.a.b - d.c.n.b - d.c.a.b : i3 = d.c.n.b + d.c.a.b - d.d.n.b - d.d.a.b; + g = Edb(a.d[c2.p]) + i3; + a.d[f2.p] = g; + l = $wnd.Math.max(l, f2.d.d - g); + m = $wnd.Math.max(m, g + f2.o.b + f2.d.a); + c2 = f2; + } + c2 = j; + do { + a.d[c2.p] = Edb(a.d[c2.p]) + l; + c2 = a.a[c2.p]; + } while (c2 != j); + a.b[j.p] = l + m; + } + } + function LOb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + a.b = false; + l = Pje; + i3 = Qje; + m = Pje; + j = Qje; + for (d = a.e.a.ec().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 266); + e = c2.a; + l = $wnd.Math.min(l, e.c); + i3 = $wnd.Math.max(i3, e.c + e.b); + m = $wnd.Math.min(m, e.d); + j = $wnd.Math.max(j, e.d + e.a); + for (g = new olb(c2.c); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 395); + b = f2.a; + if (b.a) { + k = e.d + f2.b.b; + h = k + f2.c; + m = $wnd.Math.min(m, k); + j = $wnd.Math.max(j, h); + } else { + k = e.c + f2.b.a; + h = k + f2.c; + l = $wnd.Math.min(l, k); + i3 = $wnd.Math.max(i3, h); + } + } + } + a.a = new f7c(i3 - l, j - m); + a.c = new f7c(l + a.d.a, m + a.d.b); + } + function xZc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + l = new Rkb(); + k = new x$c(0, c2); + f2 = 0; + s$c(k, new PZc(0, 0, k, c2)); + e = 0; + for (j = new Fyd(a); j.e != j.i.gc(); ) { + i3 = BD(Dyd(j), 33); + d = BD(Ikb(k.a, k.a.c.length - 1), 187); + h = e + i3.g + (BD(Ikb(k.a, 0), 187).b.c.length == 0 ? 0 : c2); + if (h > b) { + e = 0; + f2 += k.b + c2; + l.c[l.c.length] = k; + k = new x$c(f2, c2); + d = new PZc(0, k.f, k, c2); + s$c(k, d); + e = 0; + } + if (d.b.c.length == 0 || i3.f >= d.o && i3.f <= d.f || d.a * 0.5 <= i3.f && d.a * 1.5 >= i3.f) { + EZc(d, i3); + } else { + g = new PZc(d.s + d.r + c2, k.f, k, c2); + s$c(k, g); + EZc(g, i3); + } + e = i3.i + i3.g; + } + l.c[l.c.length] = k; + return l; + } + function OKd(a) { + var b, c2, d, e, f2, g, h, i3; + if (!a.a) { + a.o = null; + i3 = new GNd(a); + b = new KNd(); + c2 = KKd; + h = c2.a.zc(a, c2); + if (h == null) { + for (g = new Fyd(_Kd(a)); g.e != g.i.gc(); ) { + f2 = BD(Dyd(g), 26); + ytd(i3, OKd(f2)); + } + c2.a.Bc(a) != null; + c2.a.gc() == 0 && void 0; + } + for (e = (!a.s && (a.s = new cUd(t5, a, 21, 17)), new Fyd(a.s)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 170); + JD(d, 322) && wtd(b, BD(d, 34)); + } + vud(b); + a.k = new PNd(a, (BD(qud(ZKd((NFd(), MFd).o), 7), 18), b.i), b.g); + ytd(i3, a.k); + vud(i3); + a.a = new nNd((BD(qud(ZKd(MFd.o), 4), 18), i3.i), i3.g); + $Kd(a).b &= -2; + } + return a.a; + } + function vZc(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m; + l = false; + i3 = ZZc(c2.q, b.f + b.b - c2.q.f); + m = e - (c2.q.e + i3 - g); + if (m < d.g) { + return false; + } + j = f2 == a.c.length - 1 && m >= (tCb(f2, a.c.length), BD(a.c[f2], 200)).e; + k = (h = MZc(d, m, false), h.a); + if (k > b.b && !j) { + return false; + } + if (j || k <= b.b) { + if (j && k > b.b) { + c2.d = k; + KZc(c2, JZc(c2, k)); + } else { + $Zc(c2.q, i3); + c2.c = true; + } + KZc(d, e - (c2.s + c2.r)); + OZc(d, c2.q.e + c2.q.d, b.f); + s$c(b, d); + if (a.c.length > f2) { + v$c((tCb(f2, a.c.length), BD(a.c[f2], 200)), d); + (tCb(f2, a.c.length), BD(a.c[f2], 200)).a.c.length == 0 && Kkb(a, f2); + } + l = true; + } + return l; + } + function C2d(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + k = S6d(a.e.Tg(), b); + e = 0; + f2 = BD(a.g, 119); + i3 = null; + Q6d(); + if (BD(b, 66).Oj()) { + for (h = 0; h < a.i; ++h) { + g = f2[h]; + if (k.rl(g.ak())) { + if (pb(g, c2)) { + i3 = g; + break; + } + ++e; + } + } + } else if (c2 != null) { + for (h = 0; h < a.i; ++h) { + g = f2[h]; + if (k.rl(g.ak())) { + if (pb(c2, g.dd())) { + i3 = g; + break; + } + ++e; + } + } + } else { + for (h = 0; h < a.i; ++h) { + g = f2[h]; + if (k.rl(g.ak())) { + if (g.dd() == null) { + i3 = g; + break; + } + ++e; + } + } + } + if (i3) { + if (oid(a.e)) { + j = b.$j() ? new O7d(a.e, 4, b, c2, null, e, true) : H2d(a, b.Kj() ? 2 : 1, b, c2, b.zj(), -1, true); + d ? d.Ei(j) : d = j; + } + d = B2d(a, i3, d); + } + return d; + } + function kYc(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m, n, o2, p; + o2 = 0; + p = 0; + i3 = e.c; + h = e.b; + k = c2.f; + n = c2.g; + switch (b.g) { + case 0: + o2 = d.i + d.g + g; + a.c ? p = tYc(o2, f2, d, g) : p = d.j; + m = $wnd.Math.max(i3, o2 + n); + j = $wnd.Math.max(h, p + k); + break; + case 1: + p = d.j + d.f + g; + a.c ? o2 = sYc(p, f2, d, g) : o2 = d.i; + m = $wnd.Math.max(i3, o2 + n); + j = $wnd.Math.max(h, p + k); + break; + case 2: + o2 = i3 + g; + p = 0; + m = i3 + g + n; + j = $wnd.Math.max(h, k); + break; + case 3: + o2 = 0; + p = h + g; + m = $wnd.Math.max(i3, n); + j = h + g + k; + break; + default: + throw vbb(new Wdb("IllegalPlacementOption.")); + } + l = new e$c(a.a, m, j, b, o2, p); + return l; + } + function R2b(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + h = a.d; + l = BD(vNb(a, (wtc(), vtc)), 15); + b = BD(vNb(a, tsc), 15); + if (!l && !b) { + return; + } + f2 = Edb(ED(pBc(a, (Nyc(), iyc)))); + g = Edb(ED(pBc(a, jyc))); + m = 0; + if (l) { + j = 0; + for (e = l.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + j = $wnd.Math.max(j, d.o.b); + m += d.o.a; + } + m += f2 * (l.gc() - 1); + h.d += j + g; + } + c2 = 0; + if (b) { + j = 0; + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + j = $wnd.Math.max(j, d.o.b); + c2 += d.o.a; + } + c2 += f2 * (b.gc() - 1); + h.a += j + g; + } + i3 = $wnd.Math.max(m, c2); + if (i3 > a.o.a) { + k = (i3 - a.o.a) / 2; + h.b = $wnd.Math.max(h.b, k); + h.c = $wnd.Math.max(h.c, k); + } + } + function rvd(a) { + var b, c2, d, e, f2, g, h, i3; + f2 = new b2c(); + Z1c(f2, (Y1c(), V1c)); + for (d = (e = $B(a, KC(ZI, nie, 2, 0, 6, 1)), new vib(new amb(new mC(a, e).b))); d.b < d.d.gc(); ) { + c2 = (sCb(d.b < d.d.gc()), GD(d.d.Xb(d.c = d.b++))); + g = k4c(lvd, c2); + if (g) { + b = aC(a, c2); + b.je() ? h = b.je().a : b.ge() ? h = "" + b.ge().a : b.he() ? h = "" + b.he().a : h = b.Ib(); + i3 = o5c(g, h); + if (i3 != null) { + (uqb(g.j, (N5c(), K5c)) || uqb(g.j, L5c)) && xNb(_1c(f2, E2), g, i3); + uqb(g.j, I5c) && xNb(_1c(f2, B2), g, i3); + uqb(g.j, M5c) && xNb(_1c(f2, F2), g, i3); + uqb(g.j, J5c) && xNb(_1c(f2, D2), g, i3); + } + } + } + return f2; + } + function J2d(a, b, c2, d) { + var e, f2, g, h, i3, j; + i3 = S6d(a.e.Tg(), b); + f2 = BD(a.g, 119); + if (T6d(a.e, b)) { + e = 0; + for (h = 0; h < a.i; ++h) { + g = f2[h]; + if (i3.rl(g.ak())) { + if (e == c2) { + Q6d(); + if (BD(b, 66).Oj()) { + return g; + } else { + j = g.dd(); + j != null && d && JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 && (j = b3d(a, b, h, e, j)); + return j; + } + } + ++e; + } + } + throw vbb(new qcb(gve + c2 + mue + e)); + } else { + e = 0; + for (h = 0; h < a.i; ++h) { + g = f2[h]; + if (i3.rl(g.ak())) { + Q6d(); + if (BD(b, 66).Oj()) { + return g; + } else { + j = g.dd(); + j != null && d && JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 && (j = b3d(a, b, h, e, j)); + return j; + } + } + ++e; + } + return b.zj(); + } + } + function K2d(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + e = BD(a.g, 119); + if (T6d(a.e, b)) { + return Q6d(), BD(b, 66).Oj() ? new R7d(b, a) : new f7d(b, a); + } else { + j = S6d(a.e.Tg(), b); + d = 0; + for (h = 0; h < a.i; ++h) { + f2 = e[h]; + g = f2.ak(); + if (j.rl(g)) { + Q6d(); + if (BD(b, 66).Oj()) { + return f2; + } else if (g == (m8d(), k8d) || g == h8d) { + i3 = new Wfb(fcb(f2.dd())); + while (++h < a.i) { + f2 = e[h]; + g = f2.ak(); + (g == k8d || g == h8d) && Qfb(i3, fcb(f2.dd())); + } + return j6d(BD(b.Yj(), 148), i3.a); + } else { + k = f2.dd(); + k != null && c2 && JD(b, 99) && (BD(b, 18).Bb & Tje) != 0 && (k = b3d(a, b, h, d, k)); + return k; + } + } + ++d; + } + return b.zj(); + } + } + function MZc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + f2 = 0; + g = a.t; + e = 0; + d = 0; + i3 = 0; + m = 0; + l = 0; + if (c2) { + a.n.c = KC(SI, Uhe, 1, 0, 5, 1); + Ekb(a.n, new VZc(a.s, a.t, a.i)); + } + h = 0; + for (k = new olb(a.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 33); + if (f2 + j.g + (h > 0 ? a.i : 0) > b && i3 > 0) { + f2 = 0; + g += i3 + a.i; + e = $wnd.Math.max(e, m); + d += i3 + a.i; + i3 = 0; + m = 0; + if (c2) { + ++l; + Ekb(a.n, new VZc(a.s, g, a.i)); + } + h = 0; + } + m += j.g + (h > 0 ? a.i : 0); + i3 = $wnd.Math.max(i3, j.f); + c2 && QZc(BD(Ikb(a.n, l), 211), j); + f2 += j.g + (h > 0 ? a.i : 0); + ++h; + } + e = $wnd.Math.max(e, m); + d += i3; + if (c2) { + a.r = e; + a.d = d; + u$c(a.j); + } + return new J6c(a.s, a.t, e, d); + } + function $fb(a, b, c2, d, e) { + Zfb(); + var f2, g, h, i3, j, k, l, m, n; + vCb(a, "src"); + vCb(c2, "dest"); + m = rb(a); + i3 = rb(c2); + rCb((m.i & 4) != 0, "srcType is not an array"); + rCb((i3.i & 4) != 0, "destType is not an array"); + l = m.c; + g = i3.c; + rCb((l.i & 1) != 0 ? l == g : (g.i & 1) == 0, "Array types don't match"); + n = a.length; + j = c2.length; + if (b < 0 || d < 0 || e < 0 || b + e > n || d + e > j) { + throw vbb(new pcb()); + } + if ((l.i & 1) == 0 && m != i3) { + k = CD(a); + f2 = CD(c2); + if (PD(a) === PD(c2) && b < d) { + b += e; + for (h = d + e; h-- > d; ) { + NC(f2, h, k[--b]); + } + } else { + for (h = d + e; d < h; ) { + NC(f2, d++, k[b++]); + } + } + } else + e > 0 && $Bb(a, b, c2, d, e, true); + } + function phb() { + phb = ccb; + nhb = OC(GC(WD, 1), oje, 25, 15, [Rie, 1162261467, Iie, 1220703125, 362797056, 1977326743, Iie, 387420489, Jje, 214358881, 429981696, 815730721, 1475789056, 170859375, 268435456, 410338673, 612220032, 893871739, 128e7, 1801088541, 113379904, 148035889, 191102976, 244140625, 308915776, 387420489, 481890304, 594823321, 729e6, 887503681, Iie, 1291467969, 1544804416, 1838265625, 60466176]); + ohb = OC(GC(WD, 1), oje, 25, 15, [-1, -1, 31, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]); + } + function soc(a) { + var b, c2, d, e, f2, g, h, i3; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + for (g = new olb(Mu(d.a)); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + if (ioc(f2)) { + c2 = BD(vNb(f2, (wtc(), usc)), 305); + if (!c2.g && !!c2.d) { + b = c2; + i3 = c2.d; + while (i3) { + roc(i3.i, i3.k, false, true); + zoc(b.a); + zoc(i3.i); + zoc(i3.k); + zoc(i3.b); + RZb(i3.c, b.c.d); + RZb(b.c, null); + $_b(b.a, null); + $_b(i3.i, null); + $_b(i3.k, null); + $_b(i3.b, null); + h = new goc(b.i, i3.a, b.e, i3.j, i3.f); + h.k = b.k; + h.n = b.n; + h.b = b.b; + h.c = i3.c; + h.g = b.g; + h.d = i3.d; + yNb(b.i, usc, h); + yNb(i3.a, usc, h); + i3 = i3.d; + b = h; + } + } + } + } + } + } + function Xfe(a, b) { + var c2, d, e, f2, g; + g = BD(b, 136); + Yfe(a); + Yfe(g); + if (g.b == null) + return; + a.c = true; + if (a.b == null) { + a.b = KC(WD, oje, 25, g.b.length, 15, 1); + $fb(g.b, 0, a.b, 0, g.b.length); + return; + } + f2 = KC(WD, oje, 25, a.b.length + g.b.length, 15, 1); + for (c2 = 0, d = 0, e = 0; c2 < a.b.length || d < g.b.length; ) { + if (c2 >= a.b.length) { + f2[e++] = g.b[d++]; + f2[e++] = g.b[d++]; + } else if (d >= g.b.length) { + f2[e++] = a.b[c2++]; + f2[e++] = a.b[c2++]; + } else if (g.b[d] < a.b[c2] || g.b[d] === a.b[c2] && g.b[d + 1] < a.b[c2 + 1]) { + f2[e++] = g.b[d++]; + f2[e++] = g.b[d++]; + } else { + f2[e++] = a.b[c2++]; + f2[e++] = a.b[c2++]; + } + } + a.b = f2; + } + function S6b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + c2 = Ccb(DD(vNb(a, (wtc(), Usc)))); + h = Ccb(DD(vNb(b, Usc))); + d = BD(vNb(a, Vsc), 11); + i3 = BD(vNb(b, Vsc), 11); + e = BD(vNb(a, Wsc), 11); + j = BD(vNb(b, Wsc), 11); + k = !!d && d == i3; + l = !!e && e == j; + if (!c2 && !h) { + return new Z6b(BD(mlb(new olb(a.j)), 11).p == BD(mlb(new olb(b.j)), 11).p, k, l); + } + f2 = (!Ccb(DD(vNb(a, Usc))) || Ccb(DD(vNb(a, Tsc)))) && (!Ccb(DD(vNb(b, Usc))) || Ccb(DD(vNb(b, Tsc)))); + g = (!Ccb(DD(vNb(a, Usc))) || !Ccb(DD(vNb(a, Tsc)))) && (!Ccb(DD(vNb(b, Usc))) || !Ccb(DD(vNb(b, Tsc)))); + return new Z6b(k && f2 || l && g, k, l); + } + function HZc(a) { + var b, c2, d, e, f2, g, h, i3; + d = 0; + c2 = 0; + i3 = new Psb(); + b = 0; + for (h = new olb(a.n); h.a < h.c.c.length; ) { + g = BD(mlb(h), 211); + if (g.c.c.length == 0) { + Gsb(i3, g, i3.c.b, i3.c); + } else { + d = $wnd.Math.max(d, g.d); + c2 += g.a + (b > 0 ? a.i : 0); + } + ++b; + } + Ce(a.n, i3); + a.d = c2; + a.r = d; + a.g = 0; + a.f = 0; + a.e = 0; + a.o = Pje; + a.p = Pje; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 33); + a.p = $wnd.Math.min(a.p, e.g); + a.g = $wnd.Math.max(a.g, e.g); + a.f = $wnd.Math.max(a.f, e.f); + a.o = $wnd.Math.min(a.o, e.f); + a.e += e.f + a.i; + } + a.a = a.e / a.b.c.length - a.i * ((a.b.c.length - 1) / a.b.c.length); + u$c(a.j); + } + function Sld(a) { + var b, c2, d, e; + if ((a.Db & 64) != 0) + return Mkd(a); + b = new Wfb(_se); + d = a.k; + if (!d) { + !a.n && (a.n = new cUd(D2, a, 1, 7)); + if (a.n.i > 0) { + e = (!a.n && (a.n = new cUd(D2, a, 1, 7)), BD(qud(a.n, 0), 137)).a; + !e || Qfb(Qfb((b.a += ' "', b), e), '"'); + } + } else { + Qfb(Qfb((b.a += ' "', b), d), '"'); + } + c2 = (!a.b && (a.b = new y5d(z2, a, 4, 7)), !(a.b.i <= 1 && (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c.i <= 1))); + c2 ? (b.a += " [", b) : (b.a += " ", b); + Qfb(b, Eb(new Gb(), new Fyd(a.b))); + c2 && (b.a += "]", b); + b.a += gne; + c2 && (b.a += "[", b); + Qfb(b, Eb(new Gb(), new Fyd(a.c))); + c2 && (b.a += "]", b); + return b.a; + } + function TQd(a, b) { + var c2, d, e, f2, g, h, i3; + if (a.a) { + h = a.a.ne(); + i3 = null; + if (h != null) { + b.a += "" + h; + } else { + g = a.a.Dj(); + if (g != null) { + f2 = hfb(g, wfb(91)); + if (f2 != -1) { + i3 = g.substr(f2); + b.a += "" + qfb(g == null ? Xhe : (uCb(g), g), 0, f2); + } else { + b.a += "" + g; + } + } + } + if (!!a.d && a.d.i != 0) { + e = true; + b.a += "<"; + for (d = new Fyd(a.d); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 87); + e ? e = false : (b.a += She, b); + TQd(c2, b); + } + b.a += ">"; + } + i3 != null && (b.a += "" + i3, b); + } else if (a.e) { + h = a.e.zb; + h != null && (b.a += "" + h, b); + } else { + b.a += "?"; + if (a.b) { + b.a += " super "; + TQd(a.b, b); + } else { + if (a.f) { + b.a += " extends "; + TQd(a.f, b); + } + } + } + } + function Z9b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D; + v = a.c; + w2 = b.c; + c2 = Jkb(v.a, a, 0); + d = Jkb(w2.a, b, 0); + t = BD(W_b(a, (KAc(), HAc)).Kc().Pb(), 11); + C = BD(W_b(a, IAc).Kc().Pb(), 11); + u = BD(W_b(b, HAc).Kc().Pb(), 11); + D = BD(W_b(b, IAc).Kc().Pb(), 11); + r = k_b(t.e); + A = k_b(C.g); + s = k_b(u.e); + B = k_b(D.g); + Z_b(a, d, w2); + for (g = s, k = 0, o2 = g.length; k < o2; ++k) { + e = g[k]; + RZb(e, t); + } + for (h = B, l = 0, p = h.length; l < p; ++l) { + e = h[l]; + QZb(e, C); + } + Z_b(b, c2, v); + for (i3 = r, m = 0, q = i3.length; m < q; ++m) { + e = i3[m]; + RZb(e, u); + } + for (f2 = A, j = 0, n = f2.length; j < n; ++j) { + e = f2[j]; + QZb(e, D); + } + } + function $$b(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + f2 = a_b(d); + h = Ccb(DD(vNb(d, (Nyc(), uxc)))); + if ((h || Ccb(DD(vNb(a, exc)))) && !fcd(BD(vNb(a, Vxc), 98))) { + e = Zcd(f2); + i3 = i_b(a, c2, c2 == (KAc(), IAc) ? e : Wcd(e)); + } else { + i3 = new H0b(); + F0b(i3, a); + if (b) { + k = i3.n; + k.a = b.a - a.n.a; + k.b = b.b - a.n.b; + Q6c(k, 0, 0, a.o.a, a.o.b); + G0b(i3, W$b(i3, f2)); + } else { + e = Zcd(f2); + G0b(i3, c2 == (KAc(), IAc) ? e : Wcd(e)); + } + g = BD(vNb(d, (wtc(), Ksc)), 21); + j = i3.j; + switch (f2.g) { + case 2: + case 1: + (j == (Ucd(), Acd) || j == Rcd) && g.Fc((Orc(), Lrc)); + break; + case 4: + case 3: + (j == (Ucd(), zcd) || j == Tcd) && g.Fc((Orc(), Lrc)); + } + } + return i3; + } + function pPc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + if ($wnd.Math.abs(b.s - b.c) < qme || $wnd.Math.abs(c2.s - c2.c) < qme) { + return 0; + } + d = oPc(a, b.j, c2.e); + e = oPc(a, c2.j, b.e); + f2 = d == -1 || e == -1; + g = 0; + if (f2) { + if (d == -1) { + new DOc((HOc(), FOc), c2, b, 1); + ++g; + } + if (e == -1) { + new DOc((HOc(), FOc), b, c2, 1); + ++g; + } + } else { + h = vPc(b.j, c2.s, c2.c); + h += vPc(c2.e, b.s, b.c); + i3 = vPc(c2.j, b.s, b.c); + i3 += vPc(b.e, c2.s, c2.c); + j = d + 16 * h; + k = e + 16 * i3; + if (j < k) { + new DOc((HOc(), GOc), b, c2, k - j); + } else if (j > k) { + new DOc((HOc(), GOc), c2, b, j - k); + } else if (j > 0 && k > 0) { + new DOc((HOc(), GOc), b, c2, 0); + new DOc(GOc, c2, b, 0); + } + } + return g; + } + function TUb(a, b) { + var c2, d, e, f2, g, h; + for (g = new nib(new eib(a.f.b).a); g.b; ) { + f2 = lib(g); + e = BD(f2.cd(), 594); + if (b == 1) { + if (e.gf() != (ead(), dad) && e.gf() != _9c) { + continue; + } + } else { + if (e.gf() != (ead(), aad) && e.gf() != bad) { + continue; + } + } + d = BD(BD(f2.dd(), 46).b, 81); + h = BD(BD(f2.dd(), 46).a, 189); + c2 = h.c; + switch (e.gf().g) { + case 2: + d.g.c = a.e.a; + d.g.b = $wnd.Math.max(1, d.g.b + c2); + break; + case 1: + d.g.c = d.g.c + c2; + d.g.b = $wnd.Math.max(1, d.g.b - c2); + break; + case 4: + d.g.d = a.e.b; + d.g.a = $wnd.Math.max(1, d.g.a + c2); + break; + case 3: + d.g.d = d.g.d + c2; + d.g.a = $wnd.Math.max(1, d.g.a - c2); + } + } + } + function nJc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + h = KC(WD, oje, 25, b.b.c.length, 15, 1); + j = KC(NQ, Kie, 267, b.b.c.length, 0, 1); + i3 = KC(OQ, kne, 10, b.b.c.length, 0, 1); + for (l = a.a, m = 0, n = l.length; m < n; ++m) { + k = l[m]; + p = 0; + for (g = new olb(k.e); g.a < g.c.c.length; ) { + e = BD(mlb(g), 10); + d = G1b(e.c); + ++h[d]; + o2 = Edb(ED(vNb(b, (Nyc(), lyc)))); + h[d] > 0 && !!i3[d] && (o2 = jBc(a.b, i3[d], e)); + p = $wnd.Math.max(p, e.c.c.b + o2); + } + for (f2 = new olb(k.e); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + e.n.b = p + e.d.d; + c2 = e.c; + c2.c.b = p + e.d.d + e.o.b + e.d.a; + j[Jkb(c2.b.b, c2, 0)] = e.k; + i3[Jkb(c2.b.b, c2, 0)] = e; + } + } + } + function LXc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + for (d = new Sr(ur(_sd(b).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 79); + if (!JD(qud((!c2.b && (c2.b = new y5d(z2, c2, 4, 7)), c2.b), 0), 186)) { + i3 = atd(BD(qud((!c2.c && (c2.c = new y5d(z2, c2, 5, 8)), c2.c), 0), 82)); + if (!Pld(c2)) { + g = b.i + b.g / 2; + h = b.j + b.f / 2; + k = i3.i + i3.g / 2; + l = i3.j + i3.f / 2; + m = new d7c(); + m.a = k - g; + m.b = l - h; + f2 = new f7c(m.a, m.b); + l6c(f2, b.g, b.f); + m.a -= f2.a; + m.b -= f2.b; + g = k - m.a; + h = l - m.b; + j = new f7c(m.a, m.b); + l6c(j, i3.g, i3.f); + m.a -= j.a; + m.b -= j.b; + k = g + m.a; + l = h + m.b; + e = itd(c2, true, true); + omd(e, g); + pmd(e, h); + hmd(e, k); + imd(e, l); + LXc(a, i3); + } + } + } + } + function e0c(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Pre), "ELK SPOrE Compaction"), "ShrinkTree is a compaction algorithm that maintains the topology of a layout. The relocation of diagram elements is based on contracting a spanning tree."), new h0c()))); + p4c(a, Pre, Qre, Ksd(c0c)); + p4c(a, Pre, Rre, Ksd(__c)); + p4c(a, Pre, Sre, Ksd($_c)); + p4c(a, Pre, Tre, Ksd(Y_c)); + p4c(a, Pre, Ure, Ksd(Z_c)); + p4c(a, Pre, ame, X_c); + p4c(a, Pre, wme, 8); + p4c(a, Pre, Vre, Ksd(b0c)); + p4c(a, Pre, Wre, Ksd(T_c)); + p4c(a, Pre, Xre, Ksd(U_c)); + p4c(a, Pre, Zpe, (Bcb(), false)); + } + function JLc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + Odd(b, "Simple node placement", 1); + l = BD(vNb(a, (wtc(), otc)), 304); + h = 0; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 29); + g = d.c; + g.b = 0; + c2 = null; + for (j = new olb(d.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + !!c2 && (g.b += hBc(i3, c2, l.c)); + g.b += i3.d.d + i3.o.b + i3.d.a; + c2 = i3; + } + h = $wnd.Math.max(h, g.b); + } + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + g = d.c; + k = (h - g.b) / 2; + c2 = null; + for (j = new olb(d.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + !!c2 && (k += hBc(i3, c2, l.c)); + k += i3.d.d; + i3.n.b = k; + k += i3.o.b + i3.d.a; + c2 = i3; + } + } + Qdd(b); + } + function s2d(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l; + if (d.gc() == 0) { + return false; + } + i3 = (Q6d(), BD(b, 66).Oj()); + g = i3 ? d : new zud(d.gc()); + if (T6d(a.e, b)) { + if (b.hi()) { + for (k = d.Kc(); k.Ob(); ) { + j = k.Pb(); + if (!F2d(a, b, j, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + f2 = R6d(b, j); + g.Fc(f2); + } + } + } else if (!i3) { + for (k = d.Kc(); k.Ob(); ) { + j = k.Pb(); + f2 = R6d(b, j); + g.Fc(f2); + } + } + } else { + l = S6d(a.e.Tg(), b); + e = BD(a.g, 119); + for (h = 0; h < a.i; ++h) { + f2 = e[h]; + if (l.rl(f2.ak())) { + throw vbb(new Wdb(Hwe)); + } + } + if (d.gc() > 1) { + throw vbb(new Wdb(Hwe)); + } + if (!i3) { + f2 = R6d(b, d.Kc().Pb()); + g.Fc(f2); + } + } + return xtd(a, I2d(a, b, c2), g); + } + function Pmc(a, b) { + var c2, d, e, f2; + Jmc(b.b.j); + MAb(NAb(new YAb(null, new Kub(b.d, 16)), new $mc()), new anc()); + for (f2 = new olb(b.d); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 101); + switch (e.e.g) { + case 0: + c2 = BD(Ikb(e.j, 0), 113).d.j; + mjc(e, BD(Btb(RAb(BD(Qc(e.k, c2), 15).Oc(), Hmc)), 113)); + njc(e, BD(Btb(QAb(BD(Qc(e.k, c2), 15).Oc(), Hmc)), 113)); + break; + case 1: + d = Bkc(e); + mjc(e, BD(Btb(RAb(BD(Qc(e.k, d[0]), 15).Oc(), Hmc)), 113)); + njc(e, BD(Btb(QAb(BD(Qc(e.k, d[1]), 15).Oc(), Hmc)), 113)); + break; + case 2: + Rmc(a, e); + break; + case 3: + Qmc(e); + break; + case 4: + Omc(a, e); + } + Mmc(e); + } + a.a = null; + } + function $Mc(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + d = a.a.o == (eMc(), dMc) ? Pje : Qje; + h = _Mc(a, new ZMc(b, c2)); + if (!h.a && h.c) { + Dsb(a.d, h); + return d; + } else if (h.a) { + e = h.a.c; + i3 = h.a.d; + if (c2) { + j = a.a.c == (YLc(), XLc) ? i3 : e; + f2 = a.a.c == XLc ? e : i3; + g = a.a.g[f2.i.p]; + k = Edb(a.a.p[g.p]) + Edb(a.a.d[f2.i.p]) + f2.n.b + f2.a.b - Edb(a.a.d[j.i.p]) - j.n.b - j.a.b; + } else { + j = a.a.c == (YLc(), WLc) ? i3 : e; + f2 = a.a.c == WLc ? e : i3; + k = Edb(a.a.p[a.a.g[f2.i.p].p]) + Edb(a.a.d[f2.i.p]) + f2.n.b + f2.a.b - Edb(a.a.d[j.i.p]) - j.n.b - j.a.b; + } + a.a.n[a.a.g[e.i.p].p] = (Bcb(), true); + a.a.n[a.a.g[i3.i.p].p] = true; + return k; + } + return d; + } + function f3d(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + if (T6d(a.e, b)) { + i3 = (Q6d(), BD(b, 66).Oj() ? new R7d(b, a) : new f7d(b, a)); + D2d(i3.c, i3.b); + b7d(i3, BD(c2, 14)); + } else { + k = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + e = d[g]; + f2 = e.ak(); + if (k.rl(f2)) { + if (f2 == (m8d(), k8d) || f2 == h8d) { + j = m3d(a, b, c2); + h = g; + j ? Xxd(a, g) : ++g; + while (g < a.i) { + e = d[g]; + f2 = e.ak(); + f2 == k8d || f2 == h8d ? Xxd(a, g) : ++g; + } + j || BD(Gtd(a, h, R6d(b, c2)), 72); + } else + m3d(a, b, c2) ? Xxd(a, g) : BD(Gtd(a, g, (Q6d(), BD(b, 66).Oj() ? BD(c2, 72) : R6d(b, c2))), 72); + return; + } + } + m3d(a, b, c2) || wtd(a, (Q6d(), BD(b, 66).Oj() ? BD(c2, 72) : R6d(b, c2))); + } + } + function IMb(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + if (!pb(c2, a.b)) { + a.b = c2; + f2 = new LMb(); + g = BD(GAb(NAb(new YAb(null, new Kub(c2.f, 16)), f2), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + a.e = true; + a.f = true; + a.c = true; + a.d = true; + e = g.Hc((RMb(), OMb)); + d = g.Hc(PMb); + e && !d && (a.f = false); + !e && d && (a.d = false); + e = g.Hc(NMb); + d = g.Hc(QMb); + e && !d && (a.c = false); + !e && d && (a.e = false); + } + k = BD(a.a.Ce(b, c2), 46); + i3 = BD(k.a, 19).a; + j = BD(k.b, 19).a; + h = false; + i3 < 0 ? a.c || (h = true) : a.e || (h = true); + j < 0 ? a.d || (h = true) : a.f || (h = true); + return h ? IMb(a, k, c2) : k; + } + function oKb(a) { + var b, c2, d, e; + e = a.o; + $Jb(); + if (a.A.dc() || pb(a.A, ZJb)) { + b = e.b; + } else { + b = fIb(a.f); + if (a.A.Hc((tdd(), qdd)) && !a.B.Hc((Idd(), Edd))) { + b = $wnd.Math.max(b, fIb(BD(Mpb(a.p, (Ucd(), zcd)), 244))); + b = $wnd.Math.max(b, fIb(BD(Mpb(a.p, Tcd), 244))); + } + c2 = aKb(a); + !!c2 && (b = $wnd.Math.max(b, c2.b)); + if (a.A.Hc(rdd)) { + if (a.q == (dcd(), _bd) || a.q == $bd) { + b = $wnd.Math.max(b, _Gb(BD(Mpb(a.b, (Ucd(), zcd)), 124))); + b = $wnd.Math.max(b, _Gb(BD(Mpb(a.b, Tcd), 124))); + } + } + } + Ccb(DD(a.e.yf().We((Y9c(), $8c)))) ? e.b = $wnd.Math.max(e.b, b) : e.b = b; + d = a.f.i; + d.d = 0; + d.a = b; + iIb(a.f); + } + function $Ic(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + for (l = 0; l < b.length; l++) { + for (h = a.Kc(); h.Ob(); ) { + f2 = BD(h.Pb(), 225); + f2.Of(l, b); + } + for (m = 0; m < b[l].length; m++) { + for (i3 = a.Kc(); i3.Ob(); ) { + f2 = BD(i3.Pb(), 225); + f2.Pf(l, m, b); + } + p = b[l][m].j; + for (n = 0; n < p.c.length; n++) { + for (j = a.Kc(); j.Ob(); ) { + f2 = BD(j.Pb(), 225); + f2.Qf(l, m, n, b); + } + o2 = (tCb(n, p.c.length), BD(p.c[n], 11)); + c2 = 0; + for (e = new b1b(o2.b); llb(e.a) || llb(e.b); ) { + d = BD(llb(e.a) ? mlb(e.a) : mlb(e.b), 17); + for (k = a.Kc(); k.Ob(); ) { + f2 = BD(k.Pb(), 225); + f2.Nf(l, m, n, c2++, d, b); + } + } + } + } + } + for (g = a.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 225); + f2.Mf(); + } + } + function J4b(a, b) { + var c2, d, e, f2, g, h, i3; + a.b = Edb(ED(vNb(b, (Nyc(), myc)))); + a.c = Edb(ED(vNb(b, pyc))); + a.d = BD(vNb(b, Xwc), 336); + a.a = BD(vNb(b, swc), 275); + H4b(b); + h = BD(GAb(JAb(JAb(LAb(LAb(new YAb(null, new Kub(b.b, 16)), new N4b()), new P4b()), new R4b()), new T4b()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + for (e = h.Kc(); e.Ob(); ) { + c2 = BD(e.Pb(), 17); + g = BD(vNb(c2, (wtc(), rtc)), 15); + g.Jc(new V4b(a)); + yNb(c2, rtc, null); + } + for (d = h.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 17); + i3 = BD(vNb(c2, (wtc(), stc)), 17); + f2 = BD(vNb(c2, ptc), 15); + B4b(a, f2, i3); + yNb(c2, ptc, null); + } + } + function uZd(a) { + a.b = null; + a.a = null; + a.o = null; + a.q = null; + a.v = null; + a.w = null; + a.B = null; + a.p = null; + a.Q = null; + a.R = null; + a.S = null; + a.T = null; + a.U = null; + a.V = null; + a.W = null; + a.bb = null; + a.eb = null; + a.ab = null; + a.H = null; + a.db = null; + a.c = null; + a.d = null; + a.f = null; + a.n = null; + a.r = null; + a.s = null; + a.u = null; + a.G = null; + a.J = null; + a.e = null; + a.j = null; + a.i = null; + a.g = null; + a.k = null; + a.t = null; + a.F = null; + a.I = null; + a.L = null; + a.M = null; + a.O = null; + a.P = null; + a.$ = null; + a.N = null; + a.Z = null; + a.cb = null; + a.K = null; + a.D = null; + a.A = null; + a.C = null; + a._ = null; + a.fb = null; + a.X = null; + a.Y = null; + a.gb = false; + a.hb = false; + } + function bKc(a) { + var b, c2, d, e, f2, g, h, i3, j; + if (a.k != (j0b(), h0b)) { + return false; + } + if (a.j.c.length <= 1) { + return false; + } + f2 = BD(vNb(a, (Nyc(), Vxc)), 98); + if (f2 == (dcd(), $bd)) { + return false; + } + e = (Izc(), (!a.q ? (mmb(), mmb(), kmb) : a.q)._b(Cxc) ? d = BD(vNb(a, Cxc), 197) : d = BD(vNb(Q_b(a), Dxc), 197), d); + if (e == Gzc) { + return false; + } + if (!(e == Fzc || e == Ezc)) { + g = Edb(ED(pBc(a, zyc))); + b = BD(vNb(a, yyc), 142); + !b && (b = new J_b(g, g, g, g)); + j = V_b(a, (Ucd(), Tcd)); + i3 = b.d + b.a + (j.gc() - 1) * g; + if (i3 > a.o.b) { + return false; + } + c2 = V_b(a, zcd); + h = b.d + b.a + (c2.gc() - 1) * g; + if (h > a.o.b) { + return false; + } + } + return true; + } + function thb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + g = a.e; + i3 = b.e; + if (g == 0) { + return b; + } + if (i3 == 0) { + return a; + } + f2 = a.d; + h = b.d; + if (f2 + h == 2) { + c2 = xbb(a.a[0], Yje); + d = xbb(b.a[0], Yje); + if (g == i3) { + k = wbb(c2, d); + o2 = Tbb(k); + n = Tbb(Pbb(k, 32)); + return n == 0 ? new Ugb(g, o2) : new Vgb(g, 2, OC(GC(WD, 1), oje, 25, 15, [o2, n])); + } + return ghb(g < 0 ? Qbb(d, c2) : Qbb(c2, d)); + } else if (g == i3) { + m = g; + l = f2 >= h ? uhb(a.a, f2, b.a, h) : uhb(b.a, h, a.a, f2); + } else { + e = f2 != h ? f2 > h ? 1 : -1 : whb(a.a, b.a, f2); + if (e == 0) { + return Hgb(), Ggb; + } + if (e == 1) { + m = g; + l = zhb(a.a, f2, b.a, h); + } else { + m = i3; + l = zhb(b.a, h, a.a, f2); + } + } + j = new Vgb(m, l.length, l); + Jgb(j); + return j; + } + function oZb(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m, n; + l = Ccb(DD(vNb(b, (Nyc(), vxc)))); + m = null; + f2 == (KAc(), HAc) && d.c.i == c2 ? m = d.c : f2 == IAc && d.d.i == c2 && (m = d.d); + j = g; + if (!j || !l || !!m) { + k = (Ucd(), Scd); + m ? k = m.j : fcd(BD(vNb(c2, Vxc), 98)) && (k = f2 == HAc ? Tcd : zcd); + i3 = lZb(a, b, c2, f2, k, d); + h = kZb((Q_b(c2), d)); + if (f2 == HAc) { + QZb(h, BD(Ikb(i3.j, 0), 11)); + RZb(h, e); + } else { + QZb(h, e); + RZb(h, BD(Ikb(i3.j, 0), 11)); + } + j = new yZb(d, h, i3, BD(vNb(i3, (wtc(), $sc)), 11), f2, !m); + } else { + Ekb(j.e, d); + n = $wnd.Math.max(Edb(ED(vNb(j.d, Zwc))), Edb(ED(vNb(d, Zwc)))); + yNb(j.d, Zwc, n); + } + Rc(a.a, d, new BZb(j.d, b, f2)); + return j; + } + function V1d(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + k = null; + !!a.d && (k = BD(Phb(a.d, b), 138)); + if (!k) { + f2 = a.a.Mh(); + l = f2.i; + if (!a.d || Vhb(a.d) != l) { + i3 = new Lqb(); + !!a.d && Ld(i3, a.d); + j = i3.f.c + i3.g.c; + for (h = j; h < l; ++h) { + d = BD(qud(f2, h), 138); + e = o1d(a.e, d).ne(); + c2 = BD(e == null ? jrb(i3.f, null, d) : Drb(i3.g, e, d), 138); + !!c2 && c2 != d && (e == null ? jrb(i3.f, null, c2) : Drb(i3.g, e, c2)); + } + if (i3.f.c + i3.g.c != l) { + for (g = 0; g < j; ++g) { + d = BD(qud(f2, g), 138); + e = o1d(a.e, d).ne(); + c2 = BD(e == null ? jrb(i3.f, null, d) : Drb(i3.g, e, d), 138); + !!c2 && c2 != d && (e == null ? jrb(i3.f, null, c2) : Drb(i3.g, e, c2)); + } + } + a.d = i3; + } + k = BD(Phb(a.d, b), 138); + } + return k; + } + function lZb(a, b, c2, d, e, f2) { + var g, h, i3, j, k, l; + g = null; + j = d == (KAc(), HAc) ? f2.c : f2.d; + i3 = a_b(b); + if (j.i == c2) { + g = BD(Ohb(a.b, j), 10); + if (!g) { + g = Z$b(j, BD(vNb(c2, (Nyc(), Vxc)), 98), e, hZb(j), null, j.n, j.o, i3, b); + yNb(g, (wtc(), $sc), j); + Rhb(a.b, j, g); + } + } else { + g = Z$b((k = new zNb(), l = Edb(ED(vNb(b, (Nyc(), lyc)))) / 2, xNb(k, Uxc, l), k), BD(vNb(c2, Vxc), 98), e, d == HAc ? -1 : 1, null, new d7c(), new f7c(0, 0), i3, b); + h = mZb(g, c2, d); + yNb(g, (wtc(), $sc), h); + Rhb(a.b, h, g); + } + BD(vNb(b, (wtc(), Ksc)), 21).Fc((Orc(), Hrc)); + fcd(BD(vNb(b, (Nyc(), Vxc)), 98)) ? yNb(b, Vxc, (dcd(), acd)) : yNb(b, Vxc, (dcd(), bcd)); + return g; + } + function vNc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + Odd(b, "Orthogonal edge routing", 1); + j = Edb(ED(vNb(a, (Nyc(), wyc)))); + c2 = Edb(ED(vNb(a, myc))); + d = Edb(ED(vNb(a, pyc))); + m = new tPc(0, c2); + q = 0; + g = new Bib(a.b, 0); + h = null; + k = null; + i3 = null; + l = null; + do { + k = g.b < g.d.gc() ? (sCb(g.b < g.d.gc()), BD(g.d.Xb(g.c = g.b++), 29)) : null; + l = !k ? null : k.a; + if (h) { + h_b(h, q); + q += h.c.a; + } + p = !h ? q : q + d; + o2 = sPc(m, a, i3, l, p); + e = !h || Kq(i3, (FNc(), DNc)); + f2 = !k || Kq(l, (FNc(), DNc)); + if (o2 > 0) { + n = (o2 - 1) * c2; + !!h && (n += d); + !!k && (n += d); + n < j && !e && !f2 && (n = j); + q += n; + } else + !e && !f2 && (q += j); + h = k; + i3 = l; + } while (k); + a.f.a = q; + Qdd(b); + } + function IEd() { + IEd = ccb; + var a; + HEd = new mFd(); + BEd = KC(ZI, nie, 2, 0, 6, 1); + uEd = Mbb(ZEd(33, 58), ZEd(1, 26)); + vEd = Mbb(ZEd(97, 122), ZEd(65, 90)); + wEd = ZEd(48, 57); + sEd = Mbb(uEd, 0); + tEd = Mbb(vEd, wEd); + xEd = Mbb(Mbb(0, ZEd(1, 6)), ZEd(33, 38)); + yEd = Mbb(Mbb(wEd, ZEd(65, 70)), ZEd(97, 102)); + EEd = Mbb(sEd, XEd("-_.!~*'()")); + FEd = Mbb(tEd, $Ed("-_.!~*'()")); + XEd(lve); + $Ed(lve); + Mbb(EEd, XEd(";:@&=+$,")); + Mbb(FEd, $Ed(";:@&=+$,")); + zEd = XEd(":/?#"); + AEd = $Ed(":/?#"); + CEd = XEd("/?#"); + DEd = $Ed("/?#"); + a = new Tqb(); + a.a.zc("jar", a); + a.a.zc("zip", a); + a.a.zc("archive", a); + GEd = (mmb(), new zob(a)); + } + function yUc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + yNb(b, (mTc(), cTc), 0); + i3 = BD(vNb(b, aTc), 86); + if (b.d.b == 0) { + if (i3) { + k = Edb(ED(vNb(i3, fTc))) + a.a + zUc(i3, b); + yNb(b, fTc, k); + } else { + yNb(b, fTc, 0); + } + } else { + for (d = (f2 = Jsb(new ZRc(b).a.d, 0), new aSc(f2)); Wsb(d.a); ) { + c2 = BD(Xsb(d.a), 188).c; + yUc(a, c2); + } + h = BD(pr((g = Jsb(new ZRc(b).a.d, 0), new aSc(g))), 86); + l = BD(or((e = Jsb(new ZRc(b).a.d, 0), new aSc(e))), 86); + j = (Edb(ED(vNb(l, fTc))) + Edb(ED(vNb(h, fTc)))) / 2; + if (i3) { + k = Edb(ED(vNb(i3, fTc))) + a.a + zUc(i3, b); + yNb(b, fTc, k); + yNb(b, cTc, Edb(ED(vNb(b, fTc))) - j); + xUc(a, b); + } else { + yNb(b, fTc, j); + } + } + } + function Dbc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + h = 0; + o2 = 0; + i3 = tlb(a.f, a.f.length); + f2 = a.d; + g = a.i; + d = a.a; + e = a.b; + do { + n = 0; + for (k = new olb(a.p); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + m = Cbc(a, j); + c2 = true; + (a.q == (kAc(), dAc) || a.q == gAc) && (c2 = Ccb(DD(m.b))); + if (BD(m.a, 19).a < 0 && c2) { + ++n; + i3 = tlb(a.f, a.f.length); + a.d = a.d + BD(m.a, 19).a; + o2 += f2 - a.d; + f2 = a.d + BD(m.a, 19).a; + g = a.i; + d = Mu(a.a); + e = Mu(a.b); + } else { + a.f = tlb(i3, i3.length); + a.d = f2; + a.a = (Qb(d), d ? new Tkb(d) : Nu(new olb(d))); + a.b = (Qb(e), e ? new Tkb(e) : Nu(new olb(e))); + a.i = g; + } + } + ++h; + l = n != 0 && Ccb(DD(b.Kb(new vgd(meb(o2), meb(h))))); + } while (l); + } + function lYc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C; + g = a.f; + m = b.f; + h = g == (k$c(), f$c) || g == h$c; + n = m == f$c || m == h$c; + i3 = g == g$c || g == i$c; + o2 = m == g$c || m == i$c; + j = g == g$c || g == f$c; + p = m == g$c || m == f$c; + if (h && n) { + return a.f == h$c ? a : b; + } else if (i3 && o2) { + return a.f == i$c ? a : b; + } else if (j && p) { + if (g == g$c) { + l = a; + k = b; + } else { + l = b; + k = a; + } + f2 = (q = c2.j + c2.f, r = l.e + d.f, s = $wnd.Math.max(q, r), t = s - $wnd.Math.min(c2.j, l.e), u = l.d + d.g - c2.i, u * t); + e = (v = c2.i + c2.g, w2 = k.d + d.g, A = $wnd.Math.max(v, w2), B = A - $wnd.Math.min(c2.i, k.d), C = k.e + d.f - c2.j, B * C); + return f2 <= e ? a.f == g$c ? a : b : a.f == f$c ? a : b; + } + return a; + } + function wGb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + k = a.e.a.c.length; + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 121); + f2.j = false; + } + a.i = KC(WD, oje, 25, k, 15, 1); + a.g = KC(WD, oje, 25, k, 15, 1); + a.n = new Rkb(); + e = 0; + l = new Rkb(); + for (i3 = new olb(a.e.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 121); + h.d = e++; + h.b.a.c.length == 0 && Ekb(a.n, h); + Gkb(l, h.g); + } + b = 0; + for (d = new olb(l); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 213); + c2.c = b++; + c2.f = false; + } + j = l.c.length; + if (a.b == null || a.b.length < j) { + a.b = KC(UD, Vje, 25, j, 15, 1); + a.c = KC(sbb, dle, 25, j, 16, 1); + } else { + Blb(a.c); + } + a.d = l; + a.p = new Asb(Cv(a.d.c.length)); + a.j = 1; + } + function sTb(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + if (b.e.c.length <= 1) { + return; + } + a.f = b; + a.d = BD(vNb(a.f, (bTb(), SSb)), 379); + a.g = BD(vNb(a.f, WSb), 19).a; + a.e = Edb(ED(vNb(a.f, TSb))); + a.c = Edb(ED(vNb(a.f, RSb))); + it(a.b); + for (e = new olb(a.f.c); e.a < e.c.c.length; ) { + d = BD(mlb(e), 282); + ht(a.b, d.c, d, null); + ht(a.b, d.d, d, null); + } + h = a.f.e.c.length; + a.a = IC(UD, [nie, Vje], [104, 25], 15, [h, h], 2); + for (j = new olb(a.f.e); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 144); + oTb(a, i3, a.a[i3.b]); + } + a.i = IC(UD, [nie, Vje], [104, 25], 15, [h, h], 2); + for (f2 = 0; f2 < h; ++f2) { + for (g = 0; g < h; ++g) { + c2 = a.a[f2][g]; + k = 1 / (c2 * c2); + a.i[f2][g] = k; + } + } + } + function Vfe(a) { + var b, c2, d, e; + if (a.b == null || a.b.length <= 2) + return; + if (a.a) + return; + b = 0; + e = 0; + while (e < a.b.length) { + if (b != e) { + a.b[b] = a.b[e++]; + a.b[b + 1] = a.b[e++]; + } else + e += 2; + c2 = a.b[b + 1]; + while (e < a.b.length) { + if (c2 + 1 < a.b[e]) + break; + if (c2 + 1 == a.b[e]) { + a.b[b + 1] = a.b[e + 1]; + c2 = a.b[b + 1]; + e += 2; + } else if (c2 >= a.b[e + 1]) { + e += 2; + } else if (c2 < a.b[e + 1]) { + a.b[b + 1] = a.b[e + 1]; + c2 = a.b[b + 1]; + e += 2; + } else { + throw vbb(new hz("Token#compactRanges(): Internel Error: [" + a.b[b] + "," + a.b[b + 1] + "] [" + a.b[e] + "," + a.b[e + 1] + "]")); + } + } + b += 2; + } + if (b != a.b.length) { + d = KC(WD, oje, 25, b, 15, 1); + $fb(a.b, 0, d, 0, b); + a.b = d; + } + a.a = true; + } + function pZb(a, b) { + var c2, d, e, f2, g, h, i3; + for (g = Ec(a.a).Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 17); + if (f2.b.c.length > 0) { + d = new Tkb(BD(Qc(a.a, f2), 21)); + mmb(); + Okb(d, new EZb(b)); + e = new Bib(f2.b, 0); + while (e.b < e.d.gc()) { + c2 = (sCb(e.b < e.d.gc()), BD(e.d.Xb(e.c = e.b++), 70)); + h = -1; + switch (BD(vNb(c2, (Nyc(), Qwc)), 272).g) { + case 1: + h = d.c.length - 1; + break; + case 0: + h = nZb(d); + break; + case 2: + h = 0; + } + if (h != -1) { + i3 = (tCb(h, d.c.length), BD(d.c[h], 243)); + Ekb(i3.b.b, c2); + BD(vNb(Q_b(i3.b.c.i), (wtc(), Ksc)), 21).Fc((Orc(), Grc)); + BD(vNb(Q_b(i3.b.c.i), Ksc), 21).Fc(Erc); + uib(e); + yNb(c2, btc, f2); + } + } + } + QZb(f2, null); + RZb(f2, null); + } + } + function FLb(a, b) { + var c2, d, e, f2; + c2 = new KLb(); + d = BD(GAb(NAb(new YAb(null, new Kub(a.f, 16)), c2), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Eyb), Dyb]))), 21); + e = d.gc(); + e = e == 2 ? 1 : 0; + e == 1 && Bbb(Hbb(BD(GAb(JAb(d.Lc(), new MLb()), Xyb(Aeb(0), new Czb())), 162).a, 2), 0) && (e = 0); + d = BD(GAb(NAb(new YAb(null, new Kub(b.f, 16)), c2), Ayb(new hzb(), new jzb(), new Gzb(), new Izb(), OC(GC(xL, 1), Kie, 132, 0, [Eyb, Dyb]))), 21); + f2 = d.gc(); + f2 = f2 == 2 ? 1 : 0; + f2 == 1 && Bbb(Hbb(BD(GAb(JAb(d.Lc(), new OLb()), Xyb(Aeb(0), new Czb())), 162).a, 2), 0) && (f2 = 0); + if (e < f2) { + return -1; + } + if (e == f2) { + return 0; + } + return 1; + } + function h6b(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n; + j = new Rkb(); + if (!wNb(a, (wtc(), Fsc))) { + return j; + } + for (d = BD(vNb(a, Fsc), 15).Kc(); d.Ob(); ) { + b = BD(d.Pb(), 10); + g6b(b, a); + j.c[j.c.length] = b; + } + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + for (h = new olb(e.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + if (g.k != (j0b(), e0b)) { + continue; + } + i3 = BD(vNb(g, Gsc), 10); + !!i3 && (k = new H0b(), F0b(k, g), l = BD(vNb(g, Hsc), 61), G0b(k, l), m = BD(Ikb(i3.j, 0), 11), n = new UZb(), QZb(n, k), RZb(n, m), void 0); + } + } + for (c2 = new olb(j); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 10); + $_b(b, BD(Ikb(a.b, a.b.c.length - 1), 29)); + } + return j; + } + function M1b(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + b = mpd(a); + f2 = Ccb(DD(hkd(b, (Nyc(), fxc)))); + k = 0; + e = 0; + for (j = new Fyd((!a.e && (a.e = new y5d(B2, a, 7, 4)), a.e)); j.e != j.i.gc(); ) { + i3 = BD(Dyd(j), 79); + h = Qld(i3); + g = h && f2 && Ccb(DD(hkd(i3, gxc))); + m = atd(BD(qud((!i3.c && (i3.c = new y5d(z2, i3, 5, 8)), i3.c), 0), 82)); + h && g ? ++e : h && !g ? ++k : Xod(m) == b || m == b ? ++e : ++k; + } + for (d = new Fyd((!a.d && (a.d = new y5d(B2, a, 8, 5)), a.d)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 79); + h = Qld(c2); + g = h && f2 && Ccb(DD(hkd(c2, gxc))); + l = atd(BD(qud((!c2.b && (c2.b = new y5d(z2, c2, 4, 7)), c2.b), 0), 82)); + h && g ? ++k : h && !g ? ++e : Xod(l) == b || l == b ? ++k : ++e; + } + return k - e; + } + function ubc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + Odd(b, "Edge splitting", 1); + if (a.b.c.length <= 2) { + Qdd(b); + return; + } + f2 = new Bib(a.b, 0); + g = (sCb(f2.b < f2.d.gc()), BD(f2.d.Xb(f2.c = f2.b++), 29)); + while (f2.b < f2.d.gc()) { + e = g; + g = (sCb(f2.b < f2.d.gc()), BD(f2.d.Xb(f2.c = f2.b++), 29)); + for (i3 = new olb(e.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + for (k = new olb(h.j); k.a < k.c.c.length; ) { + j = BD(mlb(k), 11); + for (d = new olb(j.g); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 17); + m = c2.d; + l = m.i.c; + l != e && l != g && zbc(c2, (n = new b0b(a), __b(n, (j0b(), g0b)), yNb(n, (wtc(), $sc), c2), yNb(n, (Nyc(), Vxc), (dcd(), $bd)), $_b(n, g), n)); + } + } + } + } + Qdd(b); + } + function MTb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + h = b.p != null && !b.b; + h || Odd(b, kme, 1); + c2 = BD(vNb(a, (wtc(), itc)), 15); + g = 1 / c2.gc(); + if (b.n) { + Sdd(b, "ELK Layered uses the following " + c2.gc() + " modules:"); + n = 0; + for (m = c2.Kc(); m.Ob(); ) { + k = BD(m.Pb(), 51); + d = (n < 10 ? "0" : "") + n++; + Sdd(b, " Slot " + d + ": " + hdb(rb(k))); + } + } + for (l = c2.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 51); + k.pf(a, Udd(b, g)); + } + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + Gkb(a.a, e.a); + e.a.c = KC(SI, Uhe, 1, 0, 5, 1); + } + for (j = new olb(a.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + $_b(i3, null); + } + a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + h || Qdd(b); + } + function kJc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A; + d = Edb(ED(vNb(b, (Nyc(), Bxc)))); + v = BD(vNb(b, Ayc), 19).a; + m = 4; + e = 3; + w2 = 20 / v; + n = false; + i3 = 0; + g = Ohe; + do { + f2 = i3 != 1; + l = i3 != 0; + A = 0; + for (q = a.a, s = 0, u = q.length; s < u; ++s) { + o2 = q[s]; + o2.f = null; + lJc(a, o2, f2, l, d); + A += $wnd.Math.abs(o2.a); + } + do { + h = pJc(a, b); + } while (h); + for (p = a.a, r = 0, t = p.length; r < t; ++r) { + o2 = p[r]; + c2 = xJc(o2).a; + if (c2 != 0) { + for (k = new olb(o2.e); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + j.n.b += c2; + } + } + } + if (i3 == 0 || i3 == 1) { + --m; + if (m <= 0 && (A < g || -m > v)) { + i3 = 2; + g = Ohe; + } else if (i3 == 0) { + i3 = 1; + g = A; + } else { + i3 = 0; + g = A; + } + } else { + n = A >= g || g - A < w2; + g = A; + n && --e; + } + } while (!(n && e <= 0)); + } + function UCb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2; + o2 = new Lqb(); + for (f2 = a.a.ec().Kc(); f2.Ob(); ) { + d = BD(f2.Pb(), 168); + Rhb(o2, d, c2.Je(d)); + } + g = (Qb(a), a ? new Tkb(a) : Nu(a.a.ec().Kc())); + Okb(g, new WCb(o2)); + h = Gx(g); + i3 = new hDb(b); + n = new Lqb(); + jrb(n.f, b, i3); + while (h.a.gc() != 0) { + j = null; + k = null; + l = null; + for (e = h.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 168); + if (Edb(ED(Wd(irb(o2.f, d)))) <= Pje) { + if (Mhb(n, d.a) && !Mhb(n, d.b)) { + k = d.b; + l = d.a; + j = d; + break; + } + if (Mhb(n, d.b)) { + if (!Mhb(n, d.a)) { + k = d.a; + l = d.b; + j = d; + break; + } + } + } + } + if (!j) { + break; + } + m = new hDb(k); + Ekb(BD(Wd(irb(n.f, l)), 221).a, m); + jrb(n.f, k, m); + h.a.Bc(j) != null; + } + return i3; + } + function UBc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + Odd(c2, "Depth-first cycle removal", 1); + l = b.a; + k = l.c.length; + a.c = new Rkb(); + a.d = KC(sbb, dle, 25, k, 16, 1); + a.a = KC(sbb, dle, 25, k, 16, 1); + a.b = new Rkb(); + g = 0; + for (j = new olb(l); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + i3.p = g; + Qq(R_b(i3)) && Ekb(a.c, i3); + ++g; + } + for (n = new olb(a.c); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + TBc(a, m); + } + for (f2 = 0; f2 < k; f2++) { + if (!a.d[f2]) { + h = (tCb(f2, l.c.length), BD(l.c[f2], 10)); + TBc(a, h); + } + } + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + PZb(d, true); + yNb(b, (wtc(), Asc), (Bcb(), true)); + } + a.c = null; + a.d = null; + a.a = null; + a.b = null; + Qdd(c2); + } + function PSc(a, b) { + var c2, d, e, f2, g, h, i3; + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + for (d = Jsb(b.b, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 86); + if (c2.b.b == 0) { + yNb(c2, (mTc(), jTc), (Bcb(), true)); + Ekb(a.a, c2); + } + } + switch (a.a.c.length) { + case 0: + e = new XRc(0, b, "DUMMY_ROOT"); + yNb(e, (mTc(), jTc), (Bcb(), true)); + yNb(e, YSc, true); + Dsb(b.b, e); + break; + case 1: + break; + default: + f2 = new XRc(0, b, "SUPER_ROOT"); + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 86); + i3 = new QRc(f2, g); + yNb(i3, (mTc(), YSc), (Bcb(), true)); + Dsb(f2.a.a, i3); + Dsb(f2.d, i3); + Dsb(g.b, i3); + yNb(g, jTc, false); + } + yNb(f2, (mTc(), jTc), (Bcb(), true)); + yNb(f2, YSc, true); + Dsb(b.b, f2); + } + } + function z6c(a, b) { + i6c(); + var c2, d, e, f2, g, h; + f2 = b.c - (a.c + a.b); + e = a.c - (b.c + b.b); + g = a.d - (b.d + b.a); + c2 = b.d - (a.d + a.a); + d = $wnd.Math.max(e, f2); + h = $wnd.Math.max(g, c2); + Iy(); + My(Jqe); + if (($wnd.Math.abs(d) <= Jqe || d == 0 || isNaN(d) && isNaN(0) ? 0 : d < 0 ? -1 : d > 0 ? 1 : Ny(isNaN(d), isNaN(0))) >= 0 ^ (My(Jqe), ($wnd.Math.abs(h) <= Jqe || h == 0 || isNaN(h) && isNaN(0) ? 0 : h < 0 ? -1 : h > 0 ? 1 : Ny(isNaN(h), isNaN(0))) >= 0)) { + return $wnd.Math.max(h, d); + } + My(Jqe); + if (($wnd.Math.abs(d) <= Jqe || d == 0 || isNaN(d) && isNaN(0) ? 0 : d < 0 ? -1 : d > 0 ? 1 : Ny(isNaN(d), isNaN(0))) > 0) { + return $wnd.Math.sqrt(h * h + d * d); + } + return -$wnd.Math.sqrt(h * h + d * d); + } + function Kge(a, b) { + var c2, d, e, f2, g, h; + if (!b) + return; + !a.a && (a.a = new Wvb()); + if (a.e == 2) { + Tvb(a.a, b); + return; + } + if (b.e == 1) { + for (e = 0; e < b.em(); e++) + Kge(a, b.am(e)); + return; + } + h = a.a.a.c.length; + if (h == 0) { + Tvb(a.a, b); + return; + } + g = BD(Uvb(a.a, h - 1), 117); + if (!((g.e == 0 || g.e == 10) && (b.e == 0 || b.e == 10))) { + Tvb(a.a, b); + return; + } + f2 = b.e == 0 ? 2 : b.bm().length; + if (g.e == 0) { + c2 = new Ifb(); + d = g._l(); + d >= Tje ? Efb(c2, Tee(d)) : Afb(c2, d & aje); + g = new Hge(10, null, 0); + Vvb(a.a, g, h - 1); + } else { + c2 = (g.bm().length + f2, new Ifb()); + Efb(c2, g.bm()); + } + if (b.e == 0) { + d = b._l(); + d >= Tje ? Efb(c2, Tee(d)) : Afb(c2, d & aje); + } else { + Efb(c2, b.bm()); + } + BD(g, 521).b = c2.a; + } + function rgb2(a) { + var b, c2, d, e, f2; + if (a.g != null) { + return a.g; + } + if (a.a < 32) { + a.g = rhb(Cbb(a.f), QD(a.e)); + return a.g; + } + e = shb((!a.c && (a.c = fhb(a.f)), a.c), 0); + if (a.e == 0) { + return e; + } + b = (!a.c && (a.c = fhb(a.f)), a.c).e < 0 ? 2 : 1; + c2 = e.length; + d = -a.e + c2 - b; + f2 = new Ufb(); + f2.a += "" + e; + if (a.e > 0 && d >= -6) { + if (d >= 0) { + Tfb(f2, c2 - QD(a.e), String.fromCharCode(46)); + } else { + f2.a = qfb(f2.a, 0, b - 1) + "0." + pfb(f2.a, b - 1); + Tfb(f2, b + 1, zfb(egb, 0, -QD(d) - 1)); + } + } else { + if (c2 - b >= 1) { + Tfb(f2, b, String.fromCharCode(46)); + ++c2; + } + Tfb(f2, c2, String.fromCharCode(69)); + d > 0 && Tfb(f2, ++c2, String.fromCharCode(43)); + Tfb(f2, ++c2, "" + Ubb(Cbb(d))); + } + a.g = f2.a; + return a.g; + } + function npc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + if (c2.dc()) { + return; + } + h = 0; + m = 0; + d = c2.Kc(); + o2 = BD(d.Pb(), 19).a; + while (h < b.f) { + if (h == o2) { + m = 0; + d.Ob() ? o2 = BD(d.Pb(), 19).a : o2 = b.f + 1; + } + if (h != m) { + q = BD(Ikb(a.b, h), 29); + n = BD(Ikb(a.b, m), 29); + p = Mu(q.a); + for (l = new olb(p); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + Z_b(k, n.a.c.length, n); + if (m == 0) { + g = Mu(R_b(k)); + for (f2 = new olb(g); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 17); + PZb(e, true); + yNb(a, (wtc(), Asc), (Bcb(), true)); + Noc(a, e, 1); + } + } + } + } + ++m; + ++h; + } + i3 = new Bib(a.b, 0); + while (i3.b < i3.d.gc()) { + j = (sCb(i3.b < i3.d.gc()), BD(i3.d.Xb(i3.c = i3.b++), 29)); + j.a.c.length == 0 && uib(i3); + } + } + function xmc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + g = b.b; + k = g.o; + i3 = g.d; + d = Edb(ED(c_b(g, (Nyc(), lyc)))); + e = Edb(ED(c_b(g, nyc))); + j = Edb(ED(c_b(g, xyc))); + h = new L_b(); + v_b(h, i3.d, i3.c, i3.a, i3.b); + m = tmc(b, d, e, j); + for (r = new olb(b.d); r.a < r.c.c.length; ) { + q = BD(mlb(r), 101); + for (o2 = q.f.a.ec().Kc(); o2.Ob(); ) { + n = BD(o2.Pb(), 409); + f2 = n.a; + l = rmc(n); + c2 = (s = new s7c(), pmc(n, n.c, m, s), omc(n, l, m, s), pmc(n, n.d, m, s), s); + c2 = a.Uf(n, l, c2); + Osb(f2.a); + ye(f2.a, c2); + MAb(new YAb(null, new Kub(c2, 16)), new Bmc(k, h)); + } + p = q.i; + if (p) { + wmc(q, p, m, e); + t = new g7c(p.g); + ymc(k, h, t); + P6c(t, p.j); + ymc(k, h, t); + } + } + v_b(i3, h.d, h.c, h.a, h.b); + } + function rgc(a, b, c2) { + var d, e, f2; + e = BD(vNb(b, (Nyc(), swc)), 275); + if (e == (yrc(), wrc)) { + return; + } + Odd(c2, "Horizontal Compaction", 1); + a.a = b; + f2 = new Ygc(); + d = new cEb((f2.d = b, f2.c = BD(vNb(f2.d, Swc), 218), Pgc(f2), Wgc(f2), Vgc(f2), f2.a)); + aEb(d, a.b); + switch (BD(vNb(b, rwc), 422).g) { + case 1: + $Db(d, new jfc(a.a)); + break; + default: + $Db(d, (ODb(), MDb)); + } + switch (e.g) { + case 1: + TDb(d); + break; + case 2: + TDb(SDb(d, (ead(), bad))); + break; + case 3: + TDb(_Db(SDb(TDb(d), (ead(), bad)), new Bgc())); + break; + case 4: + TDb(_Db(SDb(TDb(d), (ead(), bad)), new Dgc(f2))); + break; + case 5: + TDb(ZDb(d, pgc)); + } + SDb(d, (ead(), aad)); + d.e = true; + Mgc(f2); + Qdd(c2); + } + function mYc(a, b, c2, d, e, f2, g, h) { + var i3, j, k, l; + i3 = Ou(OC(GC(z_, 1), Uhe, 220, 0, [b, c2, d, e])); + l = null; + switch (a.b.g) { + case 1: + l = Ou(OC(GC(o_, 1), Uhe, 526, 0, [new uYc(), new oYc(), new qYc()])); + break; + case 0: + l = Ou(OC(GC(o_, 1), Uhe, 526, 0, [new qYc(), new oYc(), new uYc()])); + break; + case 2: + l = Ou(OC(GC(o_, 1), Uhe, 526, 0, [new oYc(), new uYc(), new qYc()])); + } + for (k = new olb(l); k.a < k.c.c.length; ) { + j = BD(mlb(k), 526); + i3.c.length > 1 && (i3 = j.mg(i3, a.a, h)); + } + if (i3.c.length == 1) { + return BD(Ikb(i3, i3.c.length - 1), 220); + } + if (i3.c.length == 2) { + return lYc((tCb(0, i3.c.length), BD(i3.c[0], 220)), (tCb(1, i3.c.length), BD(i3.c[1], 220)), g, f2); + } + return null; + } + function JNb(a) { + var b, c2, d, e, f2, g; + Hkb(a.a, new PNb()); + for (c2 = new olb(a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 221); + d = c7c(R6c(BD(a.b, 65).c), BD(b.b, 65).c); + if (FNb) { + g = BD(a.b, 65).b; + f2 = BD(b.b, 65).b; + if ($wnd.Math.abs(d.a) >= $wnd.Math.abs(d.b)) { + d.b = 0; + f2.d + f2.a > g.d && f2.d < g.d + g.a && $6c(d, $wnd.Math.max(g.c - (f2.c + f2.b), f2.c - (g.c + g.b))); + } else { + d.a = 0; + f2.c + f2.b > g.c && f2.c < g.c + g.b && $6c(d, $wnd.Math.max(g.d - (f2.d + f2.a), f2.d - (g.d + g.a))); + } + } else { + $6c(d, _Nb(BD(a.b, 65), BD(b.b, 65))); + } + e = $wnd.Math.sqrt(d.a * d.a + d.b * d.b); + e = LNb(GNb, b, e, d); + $6c(d, e); + $Nb(BD(b.b, 65), d); + Hkb(b.a, new RNb(d)); + BD(GNb.b, 65); + KNb(GNb, HNb, b); + } + } + function VJc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + a.f = new KFb(); + j = 0; + e = 0; + for (g = new olb(a.e.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + for (i3 = new olb(f2.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + h.p = j++; + for (d = new Sr(ur(U_b(h).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 17); + c2.p = e++; + } + b = bKc(h); + for (m = new olb(h.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + if (b) { + o2 = l.a.b; + if (o2 != $wnd.Math.floor(o2)) { + k = o2 - Sbb(Cbb($wnd.Math.round(o2))); + l.a.b -= k; + } + } + n = l.n.b + l.a.b; + if (n != $wnd.Math.floor(n)) { + k = n - Sbb(Cbb($wnd.Math.round(n))); + l.n.b -= k; + } + } + } + } + a.g = j; + a.b = e; + a.i = KC(xY, Uhe, 401, j, 0, 1); + a.c = KC(wY, Uhe, 649, e, 0, 1); + a.d.a.$b(); + } + function Uxd(a) { + var b, c2, d, e, f2, g, h, i3, j; + if (a.ej()) { + i3 = a.fj(); + if (a.i > 0) { + b = new _zd(a.i, a.g); + c2 = a.i; + f2 = c2 < 100 ? null : new Ixd(c2); + if (a.ij()) { + for (d = 0; d < a.i; ++d) { + g = a.g[d]; + f2 = a.kj(g, f2); + } + } + oud(a); + e = c2 == 1 ? a.Zi(4, qud(b, 0), null, 0, i3) : a.Zi(6, b, null, -1, i3); + if (a.bj()) { + for (d = new $yd(b); d.e != d.i.gc(); ) { + f2 = a.dj(Zyd(d), f2); + } + if (!f2) { + a.$i(e); + } else { + f2.Ei(e); + f2.Fi(); + } + } else { + if (!f2) { + a.$i(e); + } else { + f2.Ei(e); + f2.Fi(); + } + } + } else { + oud(a); + a.$i(a.Zi(6, (mmb(), jmb), null, -1, i3)); + } + } else if (a.bj()) { + if (a.i > 0) { + h = a.g; + j = a.i; + oud(a); + f2 = j < 100 ? null : new Ixd(j); + for (d = 0; d < j; ++d) { + g = h[d]; + f2 = a.dj(g, f2); + } + !!f2 && f2.Fi(); + } else { + oud(a); + } + } else { + oud(a); + } + } + function ZQc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + TQc(this); + c2 == (FQc(), DQc) ? Qqb(this.r, a) : Qqb(this.w, a); + k = Pje; + j = Qje; + for (g = b.a.ec().Kc(); g.Ob(); ) { + e = BD(g.Pb(), 46); + h = BD(e.a, 455); + d = BD(e.b, 17); + i3 = d.c; + i3 == a && (i3 = d.d); + h == DQc ? Qqb(this.r, i3) : Qqb(this.w, i3); + m = (Ucd(), Lcd).Hc(i3.j) ? Edb(ED(vNb(i3, (wtc(), qtc)))) : l7c(OC(GC(m1, 1), nie, 8, 0, [i3.i.n, i3.n, i3.a])).b; + k = $wnd.Math.min(k, m); + j = $wnd.Math.max(j, m); + } + l = (Ucd(), Lcd).Hc(a.j) ? Edb(ED(vNb(a, (wtc(), qtc)))) : l7c(OC(GC(m1, 1), nie, 8, 0, [a.i.n, a.n, a.a])).b; + XQc(this, l, k, j); + for (f2 = b.a.ec().Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 46); + UQc(this, BD(e.b, 17)); + } + this.o = false; + } + function gD(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G; + c2 = a.l & 8191; + d = a.l >> 13 | (a.m & 15) << 9; + e = a.m >> 4 & 8191; + f2 = a.m >> 17 | (a.h & 255) << 5; + g = (a.h & 1048320) >> 8; + h = b.l & 8191; + i3 = b.l >> 13 | (b.m & 15) << 9; + j = b.m >> 4 & 8191; + k = b.m >> 17 | (b.h & 255) << 5; + l = (b.h & 1048320) >> 8; + B = c2 * h; + C = d * h; + D = e * h; + F = f2 * h; + G = g * h; + if (i3 != 0) { + C += c2 * i3; + D += d * i3; + F += e * i3; + G += f2 * i3; + } + if (j != 0) { + D += c2 * j; + F += d * j; + G += e * j; + } + if (k != 0) { + F += c2 * k; + G += d * k; + } + l != 0 && (G += c2 * l); + n = B & Eje; + o2 = (C & 511) << 13; + m = n + o2; + q = B >> 22; + r = C >> 9; + s = (D & 262143) << 4; + t = (F & 31) << 17; + p = q + r + s + t; + v = D >> 18; + w2 = F >> 5; + A = (G & 4095) << 8; + u = v + w2 + A; + p += m >> 22; + m &= Eje; + u += p >> 22; + p &= Eje; + u &= Fje; + return TC(m, p, u); + } + function o7b(a) { + var b, c2, d, e, f2, g, h; + h = BD(Ikb(a.j, 0), 11); + if (h.g.c.length != 0 && h.e.c.length != 0) { + throw vbb(new Zdb("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.")); + } + if (h.g.c.length != 0) { + f2 = Pje; + for (c2 = new olb(h.g); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 17); + g = b.d.i; + d = BD(vNb(g, (Nyc(), txc)), 142); + f2 = $wnd.Math.min(f2, g.n.a - d.b); + } + return new cc(Qb(f2)); + } + if (h.e.c.length != 0) { + e = Qje; + for (c2 = new olb(h.e); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 17); + g = b.c.i; + d = BD(vNb(g, (Nyc(), txc)), 142); + e = $wnd.Math.max(e, g.n.a + g.o.a + d.c); + } + return new cc(Qb(e)); + } + return wb(), wb(), vb; + } + function ELd(a, b) { + var c2, d, e, f2, g, h, i3; + if (a.Fk()) { + if (a.i > 4) { + if (a.wj(b)) { + if (a.rk()) { + e = BD(b, 49); + d = e.Ug(); + i3 = d == a.e && (a.Dk() ? e.Og(e.Vg(), a.zk()) == a.Ak() : -1 - e.Vg() == a.aj()); + if (a.Ek() && !i3 && !d && !!e.Zg()) { + for (f2 = 0; f2 < a.i; ++f2) { + c2 = a.Gk(BD(a.g[f2], 56)); + if (PD(c2) === PD(b)) { + return true; + } + } + } + return i3; + } else if (a.Dk() && !a.Ck()) { + g = BD(b, 56).ah(zUd(BD(a.ak(), 18))); + if (PD(g) === PD(a.e)) { + return true; + } else if (g == null || !BD(g, 56).kh()) { + return false; + } + } + } else { + return false; + } + } + h = pud(a, b); + if (a.Ek() && !h) { + for (f2 = 0; f2 < a.i; ++f2) { + e = a.Gk(BD(a.g[f2], 56)); + if (PD(e) === PD(b)) { + return true; + } + } + } + return h; + } else { + return pud(a, b); + } + } + function mHc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + k = new Rkb(); + m = new Tqb(); + g = b.b; + for (e = 0; e < g.c.length; e++) { + j = (tCb(e, g.c.length), BD(g.c[e], 29)).a; + k.c = KC(SI, Uhe, 1, 0, 5, 1); + for (f2 = 0; f2 < j.c.length; f2++) { + h = a.a[e][f2]; + h.p = f2; + h.k == (j0b(), i0b) && (k.c[k.c.length] = h, true); + Nkb(BD(Ikb(b.b, e), 29).a, f2, h); + h.j.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(h.j, BD(BD(Ikb(a.b, e), 15).Xb(f2), 14)); + ecd(BD(vNb(h, (Nyc(), Vxc)), 98)) || yNb(h, Vxc, (dcd(), Zbd)); + } + for (d = new olb(k); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + l = kHc(c2); + m.a.zc(l, m); + m.a.zc(c2, m); + } + } + for (i3 = m.a.ec().Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 10); + mmb(); + Okb(h.j, (Occ(), Icc)); + h.i = true; + N_b(h); + } + } + function g6b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + k = BD(vNb(a, (wtc(), Hsc)), 61); + d = BD(Ikb(a.j, 0), 11); + k == (Ucd(), Acd) ? G0b(d, Rcd) : k == Rcd && G0b(d, Acd); + if (BD(vNb(b, (Nyc(), Fxc)), 174).Hc((tdd(), sdd))) { + i3 = Edb(ED(vNb(a, tyc))); + j = Edb(ED(vNb(a, uyc))); + g = Edb(ED(vNb(a, ryc))); + h = BD(vNb(b, Yxc), 21); + if (h.Hc((rcd(), ncd))) { + c2 = j; + l = a.o.a / 2 - d.n.a; + for (f2 = new olb(d.f); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 70); + e.n.b = c2; + e.n.a = l - e.o.a / 2; + c2 += e.o.b + g; + } + } else if (h.Hc(pcd)) { + for (f2 = new olb(d.f); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 70); + e.n.a = i3 + a.o.a - d.n.a; + } + } + WGb(new YGb((a$b(), new l$b(b, false, false, new T$b()))), new x$b(null, a, false)); + } + } + function Ugc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + if (b.c.length == 0) { + return; + } + mmb(); + Mlb(b.c, b.c.length, null); + e = new olb(b); + d = BD(mlb(e), 145); + while (e.a < e.c.c.length) { + c2 = BD(mlb(e), 145); + if (ADb(d.e.c, c2.e.c) && !(DDb(B6c(d.e).b, c2.e.d) || DDb(B6c(c2.e).b, d.e.d))) { + d = (Gkb(d.k, c2.k), Gkb(d.b, c2.b), Gkb(d.c, c2.c), ye(d.i, c2.i), Gkb(d.d, c2.d), Gkb(d.j, c2.j), f2 = $wnd.Math.min(d.e.c, c2.e.c), g = $wnd.Math.min(d.e.d, c2.e.d), h = $wnd.Math.max(d.e.c + d.e.b, c2.e.c + c2.e.b), i3 = h - f2, j = $wnd.Math.max(d.e.d + d.e.a, c2.e.d + c2.e.a), k = j - g, G6c(d.e, f2, g, i3, k), hEb(d.f, c2.f), !d.a && (d.a = c2.a), Gkb(d.g, c2.g), Ekb(d.g, c2), d); + } else { + Xgc(a, d); + d = c2; + } + } + Xgc(a, d); + } + function e_b(a, b, c2, d) { + var e, f2, g, h, i3, j; + h = a.j; + if (h == (Ucd(), Scd) && b != (dcd(), bcd) && b != (dcd(), ccd)) { + h = W$b(a, c2); + G0b(a, h); + !(!a.q ? (mmb(), mmb(), kmb) : a.q)._b((Nyc(), Uxc)) && h != Scd && (a.n.a != 0 || a.n.b != 0) && yNb(a, Uxc, V$b(a, h)); + } + if (b == (dcd(), _bd)) { + j = 0; + switch (h.g) { + case 1: + case 3: + f2 = a.i.o.a; + f2 > 0 && (j = a.n.a / f2); + break; + case 2: + case 4: + e = a.i.o.b; + e > 0 && (j = a.n.b / e); + } + yNb(a, (wtc(), htc), j); + } + i3 = a.o; + g = a.a; + if (d) { + g.a = d.a; + g.b = d.b; + a.d = true; + } else if (b != bcd && b != ccd && h != Scd) { + switch (h.g) { + case 1: + g.a = i3.a / 2; + break; + case 2: + g.a = i3.a; + g.b = i3.b / 2; + break; + case 3: + g.a = i3.a / 2; + g.b = i3.b; + break; + case 4: + g.b = i3.b / 2; + } + } else { + g.a = i3.a / 2; + g.b = i3.b / 2; + } + } + function vwd(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + if (a.ej()) { + k = a.Vi(); + i3 = a.fj(); + if (k > 0) { + b = new Aud(a.Gi()); + c2 = k; + f2 = c2 < 100 ? null : new Ixd(c2); + Cvd(a, c2, b.g); + e = c2 == 1 ? a.Zi(4, qud(b, 0), null, 0, i3) : a.Zi(6, b, null, -1, i3); + if (a.bj()) { + for (d = new Fyd(b); d.e != d.i.gc(); ) { + f2 = a.dj(Dyd(d), f2); + } + if (!f2) { + a.$i(e); + } else { + f2.Ei(e); + f2.Fi(); + } + } else { + if (!f2) { + a.$i(e); + } else { + f2.Ei(e); + f2.Fi(); + } + } + } else { + Cvd(a, a.Vi(), a.Wi()); + a.$i(a.Zi(6, (mmb(), jmb), null, -1, i3)); + } + } else if (a.bj()) { + k = a.Vi(); + if (k > 0) { + h = a.Wi(); + j = k; + Cvd(a, k, h); + f2 = j < 100 ? null : new Ixd(j); + for (d = 0; d < j; ++d) { + g = h[d]; + f2 = a.dj(g, f2); + } + !!f2 && f2.Fi(); + } else { + Cvd(a, a.Vi(), a.Wi()); + } + } else { + Cvd(a, a.Vi(), a.Wi()); + } + } + function LEc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + for (h = new olb(b); h.a < h.c.c.length; ) { + f2 = BD(mlb(h), 233); + f2.e = null; + f2.c = 0; + } + i3 = null; + for (g = new olb(b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 233); + l = f2.d[0]; + if (c2 && l.k != (j0b(), h0b)) { + continue; + } + for (n = BD(vNb(l, (wtc(), Qsc)), 15).Kc(); n.Ob(); ) { + m = BD(n.Pb(), 10); + if (!c2 || m.k == (j0b(), h0b)) { + (!f2.e && (f2.e = new Rkb()), f2.e).Fc(a.b[m.c.p][m.p]); + ++a.b[m.c.p][m.p].c; + } + } + if (!c2 && l.k == (j0b(), h0b)) { + if (i3) { + for (k = BD(Qc(a.d, i3), 21).Kc(); k.Ob(); ) { + j = BD(k.Pb(), 10); + for (e = BD(Qc(a.d, l), 21).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + YEc(a.b[j.c.p][j.p]).Fc(a.b[d.c.p][d.p]); + ++a.b[d.c.p][d.p].c; + } + } + } + i3 = l; + } + } + } + function OHc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + c2 = 0; + k = new Rkb(); + for (h = new olb(b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + AHc(a.b, a.d[g.p]); + k.c = KC(SI, Uhe, 1, 0, 5, 1); + switch (g.i.k.g) { + case 0: + d = BD(vNb(g, (wtc(), gtc)), 10); + Hkb(d.j, new xIc(k)); + break; + case 1: + Ctb(KAb(JAb(new YAb(null, new Kub(g.i.j, 16)), new zIc(g))), new CIc(k)); + break; + case 3: + e = BD(vNb(g, (wtc(), $sc)), 11); + Ekb(k, new vgd(e, meb(g.e.c.length + g.g.c.length))); + } + for (j = new olb(k); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 46); + f2 = aIc(a, BD(i3.a, 11)); + if (f2 > a.d[g.p]) { + c2 += zHc(a.b, f2) * BD(i3.b, 19).a; + Wjb(a.a, meb(f2)); + } + } + while (!akb(a.a)) { + xHc(a.b, BD(fkb(a.a), 19).a); + } + } + return c2; + } + function eed(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + l = new g7c(BD(hkd(a, (X7c(), R7c)), 8)); + l.a = $wnd.Math.max(l.a - c2.b - c2.c, 0); + l.b = $wnd.Math.max(l.b - c2.d - c2.a, 0); + e = ED(hkd(a, L7c)); + (e == null || (uCb(e), e) <= 0) && (e = 1.3); + h = new Rkb(); + for (o2 = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); o2.e != o2.i.gc(); ) { + n = BD(Dyd(o2), 33); + g = new xed(n); + h.c[h.c.length] = g; + } + m = BD(hkd(a, M7c), 311); + switch (m.g) { + case 3: + q = bed(h, b, l.a, l.b, (j = d, uCb(e), j)); + break; + case 1: + q = aed(h, b, l.a, l.b, (k = d, uCb(e), k)); + break; + default: + q = ced(h, b, l.a, l.b, (i3 = d, uCb(e), i3)); + } + f2 = new wed(q); + p = fed(f2, b, c2, l.a, l.b, d, (uCb(e), e)); + Afd(a, p.a, p.b, false, true); + } + function vkc(a, b) { + var c2, d, e, f2; + c2 = b.b; + f2 = new Tkb(c2.j); + e = 0; + d = c2.j; + d.c = KC(SI, Uhe, 1, 0, 5, 1); + hkc(BD(Si(a.b, (Ucd(), Acd), (Fkc(), Ekc)), 15), c2); + e = ikc(f2, e, new blc(), d); + hkc(BD(Si(a.b, Acd, Dkc), 15), c2); + e = ikc(f2, e, new dlc(), d); + hkc(BD(Si(a.b, Acd, Ckc), 15), c2); + hkc(BD(Si(a.b, zcd, Ekc), 15), c2); + hkc(BD(Si(a.b, zcd, Dkc), 15), c2); + e = ikc(f2, e, new flc(), d); + hkc(BD(Si(a.b, zcd, Ckc), 15), c2); + hkc(BD(Si(a.b, Rcd, Ekc), 15), c2); + e = ikc(f2, e, new hlc(), d); + hkc(BD(Si(a.b, Rcd, Dkc), 15), c2); + e = ikc(f2, e, new jlc(), d); + hkc(BD(Si(a.b, Rcd, Ckc), 15), c2); + hkc(BD(Si(a.b, Tcd, Ekc), 15), c2); + e = ikc(f2, e, new Pkc(), d); + hkc(BD(Si(a.b, Tcd, Dkc), 15), c2); + hkc(BD(Si(a.b, Tcd, Ckc), 15), c2); + } + function nbc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + Odd(b, "Layer size calculation", 1); + k = Pje; + j = Qje; + e = false; + for (h = new olb(a.b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 29); + i3 = g.c; + i3.a = 0; + i3.b = 0; + if (g.a.c.length == 0) { + continue; + } + e = true; + for (m = new olb(g.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + o2 = l.o; + n = l.d; + i3.a = $wnd.Math.max(i3.a, o2.a + n.b + n.c); + } + d = BD(Ikb(g.a, 0), 10); + p = d.n.b - d.d.d; + d.k == (j0b(), e0b) && (p -= BD(vNb(a, (Nyc(), yyc)), 142).d); + f2 = BD(Ikb(g.a, g.a.c.length - 1), 10); + c2 = f2.n.b + f2.o.b + f2.d.a; + f2.k == e0b && (c2 += BD(vNb(a, (Nyc(), yyc)), 142).a); + i3.b = c2 - p; + k = $wnd.Math.min(k, p); + j = $wnd.Math.max(j, c2); + } + if (!e) { + k = 0; + j = 0; + } + a.f.b = j - k; + a.c.b -= k; + Qdd(b); + } + function h_b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + f2 = 0; + g = 0; + for (j = new olb(a.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 10); + f2 = $wnd.Math.max(f2, h.d.b); + g = $wnd.Math.max(g, h.d.c); + } + for (i3 = new olb(a.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + c2 = BD(vNb(h, (Nyc(), mwc)), 248); + switch (c2.g) { + case 1: + o2 = 0; + break; + case 2: + o2 = 1; + break; + case 5: + o2 = 0.5; + break; + default: + d = 0; + l = 0; + for (n = new olb(h.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + m.e.c.length == 0 || ++d; + m.g.c.length == 0 || ++l; + } + d + l == 0 ? o2 = 0.5 : o2 = l / (d + l); + } + q = a.c; + k = h.o.a; + r = (q.a - k) * o2; + o2 > 0.5 ? r -= g * 2 * (o2 - 0.5) : o2 < 0.5 && (r += f2 * 2 * (0.5 - o2)); + e = h.d.b; + r < e && (r = e); + p = h.d.c; + r > q.a - p - k && (r = q.a - p - k); + h.n.a = b + r; + } + } + function ced(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q; + h = KC(UD, Vje, 25, a.c.length, 15, 1); + m = new gub(new Ned()); + _tb(m, a); + j = 0; + p = new Rkb(); + while (m.b.c.length != 0) { + g = BD(m.b.c.length == 0 ? null : Ikb(m.b, 0), 157); + if (j > 1 && red(g) * qed(g) / 2 > h[0]) { + f2 = 0; + while (f2 < p.c.length - 1 && red(g) * qed(g) / 2 > h[f2]) { + ++f2; + } + o2 = new Jib(p, 0, f2 + 1); + l = new wed(o2); + k = red(g) / qed(g); + i3 = fed(l, b, new p0b(), c2, d, e, k); + P6c(X6c(l.e), i3); + zCb(cub(m, l)); + n = new Jib(p, f2 + 1, p.c.length); + _tb(m, n); + p.c = KC(SI, Uhe, 1, 0, 5, 1); + j = 0; + Dlb(h, h.length, 0); + } else { + q = m.b.c.length == 0 ? null : Ikb(m.b, 0); + q != null && fub(m, 0); + j > 0 && (h[j] = h[j - 1]); + h[j] += red(g) * qed(g); + ++j; + p.c[p.c.length] = g; + } + } + return p; + } + function Wac(a) { + var b, c2, d, e, f2; + d = BD(vNb(a, (Nyc(), mxc)), 163); + if (d == (Ctc(), ytc)) { + for (c2 = new Sr(ur(R_b(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 17); + if (!Yac(b)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges.")); + } + } + } else if (d == Atc) { + for (f2 = new Sr(ur(U_b(a).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + if (!Yac(e)) { + throw vbb(new y2c(Fne + P_b(a) + "' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges.")); + } + } + } + } + function C9b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + Odd(b, "Label dummy removal", 1); + d = Edb(ED(vNb(a, (Nyc(), nyc)))); + e = Edb(ED(vNb(a, ryc))); + j = BD(vNb(a, Lwc), 103); + for (i3 = new olb(a.b); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 29); + l = new Bib(h.a, 0); + while (l.b < l.d.gc()) { + k = (sCb(l.b < l.d.gc()), BD(l.d.Xb(l.c = l.b++), 10)); + if (k.k == (j0b(), f0b)) { + m = BD(vNb(k, (wtc(), $sc)), 17); + o2 = Edb(ED(vNb(m, Zwc))); + g = PD(vNb(k, Ssc)) === PD((rbd(), obd)); + c2 = new g7c(k.n); + g && (c2.b += o2 + d); + f2 = new f7c(k.o.a, k.o.b - o2 - d); + n = BD(vNb(k, ktc), 15); + j == (ead(), dad) || j == _9c ? B9b(n, c2, e, f2, g, j) : A9b(n, c2, e, f2); + Gkb(m.b, n); + sbc(k, PD(vNb(a, Swc)) === PD((Aad(), xad))); + uib(l); + } + } + } + Qdd(b); + } + function tZb(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v; + i3 = new Rkb(); + for (f2 = new olb(b.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + for (h = new olb(e.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + k = null; + for (t = k_b(g.g), u = 0, v = t.length; u < v; ++u) { + s = t[u]; + if (!f_b(s.d.i, c2)) { + r = oZb(a, b, c2, s, s.c, (KAc(), IAc), k); + r != k && (i3.c[i3.c.length] = r, true); + r.c && (k = r); + } + } + j = null; + for (o2 = k_b(g.e), p = 0, q = o2.length; p < q; ++p) { + n = o2[p]; + if (!f_b(n.c.i, c2)) { + r = oZb(a, b, c2, n, n.d, (KAc(), HAc), j); + r != j && (i3.c[i3.c.length] = r, true); + r.c && (j = r); + } + } + } + } + for (m = new olb(i3); m.a < m.c.c.length; ) { + l = BD(mlb(m), 441); + Jkb(b.a, l.a, 0) != -1 || Ekb(b.a, l.a); + l.c && (d.c[d.c.length] = l, true); + } + } + function jCc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + Odd(c2, "Interactive cycle breaking", 1); + l = new Rkb(); + for (n = new olb(b.a); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + m.p = 1; + o2 = T_b(m).a; + for (k = W_b(m, (KAc(), IAc)).Kc(); k.Ob(); ) { + j = BD(k.Pb(), 11); + for (f2 = new olb(j.g); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 17); + p = d.d.i; + if (p != m) { + q = T_b(p).a; + q < o2 && (l.c[l.c.length] = d, true); + } + } + } + } + for (g = new olb(l); g.a < g.c.c.length; ) { + d = BD(mlb(g), 17); + PZb(d, true); + } + l.c = KC(SI, Uhe, 1, 0, 5, 1); + for (i3 = new olb(b.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + h.p > 0 && iCc(a, h, l); + } + for (e = new olb(l); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + PZb(d, true); + } + l.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c2); + } + function _z(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + j = ""; + if (b.length == 0) { + return a.de(Zie, Xie, -1, -1); + } + k = ufb(b); + dfb(k.substr(0, 3), "at ") && (k = k.substr(3)); + k = k.replace(/\[.*?\]/g, ""); + g = k.indexOf("("); + if (g == -1) { + g = k.indexOf("@"); + if (g == -1) { + j = k; + k = ""; + } else { + j = ufb(k.substr(g + 1)); + k = ufb(k.substr(0, g)); + } + } else { + c2 = k.indexOf(")", g); + j = k.substr(g + 1, c2 - (g + 1)); + k = ufb(k.substr(0, g)); + } + g = hfb(k, wfb(46)); + g != -1 && (k = k.substr(g + 1)); + (k.length == 0 || dfb(k, "Anonymous function")) && (k = Xie); + h = kfb(j, wfb(58)); + e = lfb(j, wfb(58), h - 1); + i3 = -1; + d = -1; + f2 = Zie; + if (h != -1 && e != -1) { + f2 = j.substr(0, e); + i3 = Vz(j.substr(e + 1, h - (e + 1))); + d = Vz(j.substr(h + 1)); + } + return a.de(f2, k, i3, d); + } + function UC(a, b, c2) { + var d, e, f2, g, h, i3; + if (b.l == 0 && b.m == 0 && b.h == 0) { + throw vbb(new ocb("divide by zero")); + } + if (a.l == 0 && a.m == 0 && a.h == 0) { + c2 && (QC = TC(0, 0, 0)); + return TC(0, 0, 0); + } + if (b.h == Gje && b.m == 0 && b.l == 0) { + return VC(a, c2); + } + i3 = false; + if (b.h >> 19 != 0) { + b = hD(b); + i3 = !i3; + } + g = _C(b); + f2 = false; + e = false; + d = false; + if (a.h == Gje && a.m == 0 && a.l == 0) { + e = true; + f2 = true; + if (g == -1) { + a = SC((wD(), sD)); + d = true; + i3 = !i3; + } else { + h = lD(a, g); + i3 && ZC(h); + c2 && (QC = TC(0, 0, 0)); + return h; + } + } else if (a.h >> 19 != 0) { + f2 = true; + a = hD(a); + d = true; + i3 = !i3; + } + if (g != -1) { + return WC(a, g, i3, f2, c2); + } + if (eD(a, b) < 0) { + c2 && (f2 ? QC = hD(a) : QC = TC(a.l, a.m, a.h)); + return TC(0, 0, 0); + } + return XC(d ? a : TC(a.l, a.m, a.h), b, i3, f2, e, c2); + } + function F2c(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + if (a.e && a.c.c < a.f) { + throw vbb(new Zdb("Expected " + a.f + " phases to be configured; only found " + a.c.c)); + } + k = BD(gdb(a.g), 9); + n = Pu(a.f); + for (f2 = k, h = 0, j = f2.length; h < j; ++h) { + d = f2[h]; + l = BD(B2c(a, d.g), 246); + l ? Ekb(n, BD(I2c(a, l), 123)) : (n.c[n.c.length] = null, true); + } + o2 = new j3c(); + MAb(JAb(NAb(JAb(new YAb(null, new Kub(n, 16)), new O2c()), new Q2c(b)), new S2c()), new U2c(o2)); + d3c(o2, a.a); + c2 = new Rkb(); + for (e = k, g = 0, i3 = e.length; g < i3; ++g) { + d = e[g]; + Gkb(c2, J2c(a, Dx(BD(B2c(o2, d.g), 20)))); + m = BD(Ikb(n, d.g), 123); + !!m && (c2.c[c2.c.length] = m, true); + } + Gkb(c2, J2c(a, Dx(BD(B2c(o2, k[k.length - 1].g + 1), 20)))); + return c2; + } + function qCc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + Odd(c2, "Model order cycle breaking", 1); + a.a = 0; + a.b = 0; + n = new Rkb(); + k = b.a.c.length; + for (j = new olb(b.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + wNb(i3, (wtc(), Zsc)) && (k = $wnd.Math.max(k, BD(vNb(i3, Zsc), 19).a + 1)); + } + for (p = new olb(b.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + g = pCc(a, o2, k); + for (m = W_b(o2, (KAc(), IAc)).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 11); + for (f2 = new olb(l.g); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 17); + q = d.d.i; + h = pCc(a, q, k); + h < g && (n.c[n.c.length] = d, true); + } + } + } + for (e = new olb(n); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + PZb(d, true); + yNb(b, (wtc(), Asc), (Bcb(), true)); + } + n.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c2); + } + function kQc(a, b) { + var c2, d, e, f2, g, h, i3; + if (a.g > b.f || b.g > a.f) { + return; + } + c2 = 0; + d = 0; + for (g = a.w.a.ec().Kc(); g.Ob(); ) { + e = BD(g.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, b.g, b.f) && ++c2; + } + for (h = a.r.a.ec().Kc(); h.Ob(); ) { + e = BD(h.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, b.g, b.f) && --c2; + } + for (i3 = b.w.a.ec().Kc(); i3.Ob(); ) { + e = BD(i3.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, a.g, a.f) && ++d; + } + for (f2 = b.r.a.ec().Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 11); + aRc(l7c(OC(GC(m1, 1), nie, 8, 0, [e.i.n, e.n, e.a])).b, a.g, a.f) && --d; + } + if (c2 < d) { + new BQc(a, b, d - c2); + } else if (d < c2) { + new BQc(b, a, c2 - d); + } else { + new BQc(b, a, 0); + new BQc(a, b, 0); + } + } + function JPb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s; + j = b.c; + e = IOb(a.e); + l = Y6c(b7c(R6c(HOb(a.e)), a.d * a.a, a.c * a.b), -0.5); + c2 = e.a - l.a; + d = e.b - l.b; + g = b.a; + c2 = g.c - c2; + d = g.d - d; + for (i3 = new olb(j); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 395); + m = h.b; + n = c2 + m.a; + q = d + m.b; + o2 = QD(n / a.a); + r = QD(q / a.b); + f2 = h.a; + switch (f2.g) { + case 0: + k = (RMb(), OMb); + break; + case 1: + k = (RMb(), NMb); + break; + case 2: + k = (RMb(), PMb); + break; + default: + k = (RMb(), QMb); + } + if (f2.a) { + s = QD((q + h.c) / a.b); + Ekb(a.f, new uOb(k, meb(r), meb(s))); + f2 == (ROb(), QOb) ? nNb(a, 0, r, o2, s) : nNb(a, o2, r, a.d - 1, s); + } else { + p = QD((n + h.c) / a.a); + Ekb(a.f, new uOb(k, meb(o2), meb(p))); + f2 == (ROb(), OOb) ? nNb(a, o2, 0, p, r) : nNb(a, o2, r, p, a.c - 1); + } + } + } + function coc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + m = new Rkb(); + e = new Rkb(); + p = null; + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 19); + f2 = new qoc(g.a); + e.c[e.c.length] = f2; + if (p) { + f2.d = p; + p.e = f2; + } + p = f2; + } + t = boc(a); + for (k = 0; k < e.c.length; ++k) { + n = null; + q = poc((tCb(0, e.c.length), BD(e.c[0], 652))); + c2 = null; + d = Pje; + for (l = 1; l < a.b.c.length; ++l) { + r = q ? $wnd.Math.abs(q.b - l) : $wnd.Math.abs(l - n.b) + 1; + o2 = n ? $wnd.Math.abs(l - n.b) : r + 1; + if (o2 < r) { + j = n; + i3 = o2; + } else { + j = q; + i3 = r; + } + s = (u = Edb(ED(vNb(a, (Nyc(), Hyc)))), t[l] + $wnd.Math.pow(i3, u)); + if (s < d) { + d = s; + c2 = j; + c2.c = l; + } + if (!!q && l == q.b) { + n = q; + q = koc(q); + } + } + if (c2) { + Ekb(m, meb(c2.c)); + c2.a = true; + loc(c2); + } + } + mmb(); + Mlb(m.c, m.c.length, null); + return m; + } + function qNd(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + b = new zNd(); + c2 = new zNd(); + j = dfb(Qve, (e = Dmd(a.b, Rve), !e ? null : GD(AAd((!e.b && (e.b = new sId((jGd(), fGd), x6, e)), e.b), Sve)))); + for (i3 = 0; i3 < a.i; ++i3) { + h = BD(a.g[i3], 170); + if (JD(h, 99)) { + g = BD(h, 18); + (g.Bb & ote) != 0 ? ((g.Bb & oie) == 0 || !j && (f2 = Dmd(g, Rve), (!f2 ? null : GD(AAd((!f2.b && (f2.b = new sId((jGd(), fGd), x6, f2)), f2.b), eue))) == null)) && wtd(b, g) : (k = zUd(g), !!k && (k.Bb & ote) != 0 || ((g.Bb & oie) == 0 || !j && (d = Dmd(g, Rve), (!d ? null : GD(AAd((!d.b && (d.b = new sId((jGd(), fGd), x6, d)), d.b), eue))) == null)) && wtd(c2, g)); + } else { + Q6d(); + if (BD(h, 66).Oj()) { + if (!h.Jj()) { + wtd(b, h); + wtd(c2, h); + } + } + } + } + vud(b); + vud(c2); + a.a = BD(b.g, 247); + BD(c2.g, 247); + } + function LTb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, p, q, r; + j = ITb(b); + q = BD(vNb(b, (Nyc(), Iwc)), 314); + q != (Rpc(), Ppc) && reb(j, new STb()); + r = BD(vNb(b, Cwc), 292); + reb(j, new UTb(r)); + p = 0; + k = new Rkb(); + for (f2 = new xkb(j); f2.a != f2.b; ) { + e = BD(vkb(f2), 37); + aUb(a.c, e); + m = BD(vNb(e, (wtc(), itc)), 15); + p += m.gc(); + d = m.Kc(); + Ekb(k, new vgd(e, d)); + } + Odd(c2, "Recursive hierarchical layout", p); + n = BD(BD(Ikb(k, k.c.length - 1), 46).b, 47); + while (n.Ob()) { + for (i3 = new olb(k); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 46); + m = BD(h.b, 47); + g = BD(h.a, 37); + while (m.Ob()) { + l = BD(m.Pb(), 51); + if (JD(l, 507)) { + if (!g.e) { + l.pf(g, Udd(c2, 1)); + break; + } else { + break; + } + } else { + l.pf(g, Udd(c2, 1)); + } + } + } + } + Qdd(c2); + } + function rid(b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + j = c2.length - 1; + i3 = (BCb(j, c2.length), c2.charCodeAt(j)); + if (i3 == 93) { + h = hfb(c2, wfb(91)); + if (h >= 0) { + f2 = wid(b, c2.substr(1, h - 1)); + l = c2.substr(h + 1, j - (h + 1)); + return pid(b, l, f2); + } + } else { + d = -1; + Vcb == null && (Vcb = new RegExp("\\d")); + if (Vcb.test(String.fromCharCode(i3))) { + d = lfb(c2, wfb(46), j - 1); + if (d >= 0) { + e = BD(hid(b, Bid(b, c2.substr(1, d - 1)), false), 58); + k = 0; + try { + k = Icb(c2.substr(d + 1), Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + g = a; + throw vbb(new rFd(g)); + } else + throw vbb(a); + } + if (k < e.gc()) { + m = e.Xb(k); + JD(m, 72) && (m = BD(m, 72).dd()); + return BD(m, 56); + } + } + } + if (d < 0) { + return BD(hid(b, Bid(b, c2.substr(1)), false), 56); + } + } + return null; + } + function e1d(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + if (bLd(b, c2) >= 0) { + return c2; + } + switch ($1d(q1d(a, c2))) { + case 2: { + if (dfb("", o1d(a, c2.Hj()).ne())) { + i3 = b2d(q1d(a, c2)); + h = a2d(q1d(a, c2)); + k = r1d(a, b, i3, h); + if (k) { + return k; + } + e = f1d(a, b); + for (g = 0, l = e.gc(); g < l; ++g) { + k = BD(e.Xb(g), 170); + if (x1d(c2d(q1d(a, k)), i3)) { + return k; + } + } + } + return null; + } + case 4: { + if (dfb("", o1d(a, c2.Hj()).ne())) { + for (d = c2; d; d = Z1d(q1d(a, d))) { + j = b2d(q1d(a, d)); + h = a2d(q1d(a, d)); + k = s1d(a, b, j, h); + if (k) { + return k; + } + } + i3 = b2d(q1d(a, c2)); + if (dfb(Ewe, i3)) { + return t1d(a, b); + } else { + f2 = g1d(a, b); + for (g = 0, l = f2.gc(); g < l; ++g) { + k = BD(f2.Xb(g), 170); + if (x1d(c2d(q1d(a, k)), i3)) { + return k; + } + } + } + } + return null; + } + default: { + return null; + } + } + } + function t2d(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + if (c2.gc() == 0) { + return false; + } + h = (Q6d(), BD(b, 66).Oj()); + f2 = h ? c2 : new zud(c2.gc()); + if (T6d(a.e, b)) { + if (b.hi()) { + for (j = c2.Kc(); j.Ob(); ) { + i3 = j.Pb(); + if (!F2d(a, b, i3, JD(b, 99) && (BD(b, 18).Bb & Tje) != 0)) { + e = R6d(b, i3); + f2.Hc(e) || f2.Fc(e); + } + } + } else if (!h) { + for (j = c2.Kc(); j.Ob(); ) { + i3 = j.Pb(); + e = R6d(b, i3); + f2.Fc(e); + } + } + } else { + if (c2.gc() > 1) { + throw vbb(new Wdb(Hwe)); + } + k = S6d(a.e.Tg(), b); + d = BD(a.g, 119); + for (g = 0; g < a.i; ++g) { + e = d[g]; + if (k.rl(e.ak())) { + if (c2.Hc(h ? e : e.dd())) { + return false; + } else { + for (j = c2.Kc(); j.Ob(); ) { + i3 = j.Pb(); + BD(Gtd(a, g, h ? BD(i3, 72) : R6d(b, i3)), 72); + } + return true; + } + } + } + if (!h) { + e = R6d(b, c2.Kc().Pb()); + f2.Fc(e); + } + } + return ytd(a, f2); + } + function qMc(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + k = new Psb(); + for (h = (j = new $ib(a.c).a.vc().Kc(), new djb(j)); h.a.Ob(); ) { + f2 = (e = BD(h.a.Pb(), 42), BD(e.dd(), 458)); + f2.b == 0 && (Gsb(k, f2, k.c.b, k.c), true); + } + while (k.b != 0) { + f2 = BD(k.b == 0 ? null : (sCb(k.b != 0), Nsb(k, k.a.a)), 458); + f2.a == null && (f2.a = 0); + for (d = new olb(f2.d); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 654); + c2.b.a == null ? c2.b.a = Edb(f2.a) + c2.a : b.o == (eMc(), cMc) ? c2.b.a = $wnd.Math.min(Edb(c2.b.a), Edb(f2.a) + c2.a) : c2.b.a = $wnd.Math.max(Edb(c2.b.a), Edb(f2.a) + c2.a); + --c2.b.b; + c2.b.b == 0 && Dsb(k, c2.b); + } + } + for (g = (i3 = new $ib(a.c).a.vc().Kc(), new djb(i3)); g.a.Ob(); ) { + f2 = (e = BD(g.a.Pb(), 42), BD(e.dd(), 458)); + b.i[f2.c.p] = f2.a; + } + } + function mTc() { + mTc = ccb; + dTc = new Lsd(Ime); + new Msd("DEPTH", meb(0)); + ZSc = new Msd("FAN", meb(0)); + XSc = new Msd(Yqe, meb(0)); + jTc = new Msd("ROOT", (Bcb(), false)); + _Sc = new Msd("LEFTNEIGHBOR", null); + hTc = new Msd("RIGHTNEIGHBOR", null); + aTc = new Msd("LEFTSIBLING", null); + iTc = new Msd("RIGHTSIBLING", null); + YSc = new Msd("DUMMY", false); + new Msd("LEVEL", meb(0)); + gTc = new Msd("REMOVABLE_EDGES", new Psb()); + kTc = new Msd("XCOOR", meb(0)); + lTc = new Msd("YCOOR", meb(0)); + bTc = new Msd("LEVELHEIGHT", 0); + $Sc = new Msd("ID", ""); + eTc = new Msd("POSITION", meb(0)); + fTc = new Msd("PRELIM", 0); + cTc = new Msd("MODIFIER", 0); + WSc = new Lsd(Kme); + VSc = new Lsd(Lme); + } + function MNc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2; + k = c2 + b.c.c.a; + for (n = new olb(b.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + e = l7c(OC(GC(m1, 1), nie, 8, 0, [m.i.n, m.n, m.a])); + if (b.k == (j0b(), i0b)) { + h = BD(vNb(m, (wtc(), $sc)), 11); + e.a = l7c(OC(GC(m1, 1), nie, 8, 0, [h.i.n, h.n, h.a])).a; + b.n.a = e.a; + } + g = new f7c(0, e.b); + if (m.j == (Ucd(), zcd)) { + g.a = k; + } else if (m.j == Tcd) { + g.a = c2; + } else { + continue; + } + o2 = $wnd.Math.abs(e.a - g.a); + if (o2 <= d && !JNc(b)) { + continue; + } + f2 = m.g.c.length + m.e.c.length > 1; + for (j = new b1b(m.b); llb(j.a) || llb(j.b); ) { + i3 = BD(llb(j.a) ? mlb(j.a) : mlb(j.b), 17); + l = i3.c == m ? i3.d : i3.c; + $wnd.Math.abs(l7c(OC(GC(m1, 1), nie, 8, 0, [l.i.n, l.n, l.a])).b - g.b) > 1 && GNc(a, i3, g, f2, m); + } + } + } + function XPc(a) { + var b, c2, d, e, f2, g; + e = new Bib(a.e, 0); + d = new Bib(a.a, 0); + if (a.d) { + for (c2 = 0; c2 < a.b; c2++) { + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + } + } else { + for (c2 = 0; c2 < a.b - 1; c2++) { + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + uib(e); + } + } + b = Edb((sCb(e.b < e.d.gc()), ED(e.d.Xb(e.c = e.b++)))); + while (a.f - b > Oqe) { + f2 = b; + g = 0; + while ($wnd.Math.abs(b - f2) < Oqe) { + ++g; + b = Edb((sCb(e.b < e.d.gc()), ED(e.d.Xb(e.c = e.b++)))); + sCb(d.b < d.d.gc()); + d.d.Xb(d.c = d.b++); + } + if (g < a.b) { + sCb(e.b > 0); + e.a.Xb(e.c = --e.b); + WPc(a, a.b - g, f2, d, e); + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + } + sCb(d.b > 0); + d.a.Xb(d.c = --d.b); + } + if (!a.d) { + for (c2 = 0; c2 < a.b - 1; c2++) { + sCb(e.b < e.d.gc()); + e.d.Xb(e.c = e.b++); + uib(e); + } + } + a.d = true; + a.c = true; + } + function Q8d() { + Q8d = ccb; + s8d = (r8d(), q8d).b; + v8d = BD(qud(ZKd(q8d.b), 0), 34); + t8d = BD(qud(ZKd(q8d.b), 1), 34); + u8d = BD(qud(ZKd(q8d.b), 2), 34); + F8d = q8d.bb; + BD(qud(ZKd(q8d.bb), 0), 34); + BD(qud(ZKd(q8d.bb), 1), 34); + H8d = q8d.fb; + I8d = BD(qud(ZKd(q8d.fb), 0), 34); + BD(qud(ZKd(q8d.fb), 1), 34); + BD(qud(ZKd(q8d.fb), 2), 18); + K8d = q8d.qb; + N8d = BD(qud(ZKd(q8d.qb), 0), 34); + BD(qud(ZKd(q8d.qb), 1), 18); + BD(qud(ZKd(q8d.qb), 2), 18); + L8d = BD(qud(ZKd(q8d.qb), 3), 34); + M8d = BD(qud(ZKd(q8d.qb), 4), 34); + P8d = BD(qud(ZKd(q8d.qb), 6), 34); + O8d = BD(qud(ZKd(q8d.qb), 5), 18); + w8d = q8d.j; + x8d = q8d.k; + y8d = q8d.q; + z8d = q8d.w; + A8d = q8d.B; + B8d = q8d.A; + C8d = q8d.C; + D8d = q8d.D; + E8d = q8d._; + G8d = q8d.cb; + J8d = q8d.hb; + } + function $Dc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + a.c = 0; + a.b = 0; + d = 2 * b.c.a.c.length + 1; + o: + for (l = c2.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + h = k.j == (Ucd(), Acd) || k.j == Rcd; + n = 0; + if (h) { + m = BD(vNb(k, (wtc(), gtc)), 10); + if (!m) { + continue; + } + n += VDc(a, d, k, m); + } else { + for (j = new olb(k.g); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 17); + e = i3.d; + if (e.i.c == b.c) { + Ekb(a.a, k); + continue o; + } else { + n += a.g[e.p]; + } + } + for (g = new olb(k.e); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 17); + e = f2.c; + if (e.i.c == b.c) { + Ekb(a.a, k); + continue o; + } else { + n -= a.g[e.p]; + } + } + } + if (k.e.c.length + k.g.c.length > 0) { + a.f[k.p] = n / (k.e.c.length + k.g.c.length); + a.c = $wnd.Math.min(a.c, a.f[k.p]); + a.b = $wnd.Math.max(a.b, a.f[k.p]); + } else + h && (a.f[k.p] = n); + } + } + function $9d(a) { + a.b = null; + a.bb = null; + a.fb = null; + a.qb = null; + a.a = null; + a.c = null; + a.d = null; + a.e = null; + a.f = null; + a.n = null; + a.M = null; + a.L = null; + a.Q = null; + a.R = null; + a.K = null; + a.db = null; + a.eb = null; + a.g = null; + a.i = null; + a.j = null; + a.k = null; + a.gb = null; + a.o = null; + a.p = null; + a.q = null; + a.r = null; + a.$ = null; + a.ib = null; + a.S = null; + a.T = null; + a.t = null; + a.s = null; + a.u = null; + a.v = null; + a.w = null; + a.B = null; + a.A = null; + a.C = null; + a.D = null; + a.F = null; + a.G = null; + a.H = null; + a.I = null; + a.J = null; + a.P = null; + a.Z = null; + a.U = null; + a.V = null; + a.W = null; + a.X = null; + a.Y = null; + a._ = null; + a.ab = null; + a.cb = null; + a.hb = null; + a.nb = null; + a.lb = null; + a.mb = null; + a.ob = null; + a.pb = null; + a.jb = null; + a.kb = null; + a.N = false; + a.O = false; + } + function l5b(a, b, c2) { + var d, e, f2, g; + Odd(c2, "Graph transformation (" + a.a + ")", 1); + g = Mu(b.a); + for (f2 = new olb(b.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + Gkb(g, e.a); + } + d = BD(vNb(b, (Nyc(), Mwc)), 419); + if (d == (xqc(), vqc)) { + switch (BD(vNb(b, Lwc), 103).g) { + case 2: + _4b(b, g); + break; + case 3: + p5b(b, g); + break; + case 4: + if (a.a == (y5b(), x5b)) { + p5b(b, g); + a5b(b, g); + } else { + a5b(b, g); + p5b(b, g); + } + } + } else { + if (a.a == (y5b(), x5b)) { + switch (BD(vNb(b, Lwc), 103).g) { + case 2: + _4b(b, g); + a5b(b, g); + break; + case 3: + p5b(b, g); + _4b(b, g); + break; + case 4: + _4b(b, g); + p5b(b, g); + } + } else { + switch (BD(vNb(b, Lwc), 103).g) { + case 2: + _4b(b, g); + a5b(b, g); + break; + case 3: + _4b(b, g); + p5b(b, g); + break; + case 4: + p5b(b, g); + _4b(b, g); + } + } + } + Qdd(c2); + } + function j6b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + j = new zsb(); + k = new zsb(); + o2 = new zsb(); + p = new zsb(); + i3 = Edb(ED(vNb(b, (Nyc(), vyc)))); + f2 = Edb(ED(vNb(b, lyc))); + for (h = new olb(c2); h.a < h.c.c.length; ) { + g = BD(mlb(h), 10); + l = BD(vNb(g, (wtc(), Hsc)), 61); + if (l == (Ucd(), Acd)) { + k.a.zc(g, k); + for (e = new Sr(ur(R_b(g).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + Qqb(j, d.c.i); + } + } else if (l == Rcd) { + p.a.zc(g, p); + for (e = new Sr(ur(R_b(g).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + Qqb(o2, d.c.i); + } + } + } + if (j.a.gc() != 0) { + m = new tPc(2, f2); + n = sPc(m, b, j, k, -i3 - b.c.b); + if (n > 0) { + a.a = i3 + (n - 1) * f2; + b.c.b += a.a; + b.f.b += a.a; + } + } + if (o2.a.gc() != 0) { + m = new tPc(1, f2); + n = sPc(m, b, o2, p, b.f.b + i3 - b.c.b); + n > 0 && (b.f.b += i3 + (n - 1) * f2); + } + } + function kKd(a, b) { + var c2, d, e, f2; + f2 = a.F; + if (b == null) { + a.F = null; + $Jd(a, null); + } else { + a.F = (uCb(b), b); + d = hfb(b, wfb(60)); + if (d != -1) { + e = b.substr(0, d); + hfb(b, wfb(46)) == -1 && !dfb(e, Khe) && !dfb(e, Eve) && !dfb(e, Fve) && !dfb(e, Gve) && !dfb(e, Hve) && !dfb(e, Ive) && !dfb(e, Jve) && !dfb(e, Kve) && (e = Lve); + c2 = kfb(b, wfb(62)); + c2 != -1 && (e += "" + b.substr(c2 + 1)); + $Jd(a, e); + } else { + e = b; + if (hfb(b, wfb(46)) == -1) { + d = hfb(b, wfb(91)); + d != -1 && (e = b.substr(0, d)); + if (!dfb(e, Khe) && !dfb(e, Eve) && !dfb(e, Fve) && !dfb(e, Gve) && !dfb(e, Hve) && !dfb(e, Ive) && !dfb(e, Jve) && !dfb(e, Kve)) { + e = Lve; + d != -1 && (e += "" + b.substr(d)); + } else { + e = b; + } + } + $Jd(a, e); + e == b && (a.F = a.D); + } + } + (a.Db & 4) != 0 && (a.Db & 1) == 0 && Uhd(a, new nSd(a, 1, 5, f2, b)); + } + function AMc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + p = b.b.c.length; + if (p < 3) { + return; + } + n = KC(WD, oje, 25, p, 15, 1); + l = 0; + for (k = new olb(b.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 29); + n[l++] = j.a.c.length; + } + m = new Bib(b.b, 2); + for (d = 1; d < p - 1; d++) { + c2 = (sCb(m.b < m.d.gc()), BD(m.d.Xb(m.c = m.b++), 29)); + o2 = new olb(c2.a); + f2 = 0; + h = 0; + for (i3 = 0; i3 < n[d + 1]; i3++) { + t = BD(mlb(o2), 10); + if (i3 == n[d + 1] - 1 || zMc(a, t, d + 1, d)) { + g = n[d] - 1; + zMc(a, t, d + 1, d) && (g = a.c.e[BD(BD(BD(Ikb(a.c.b, t.p), 15).Xb(0), 46).a, 10).p]); + while (h <= i3) { + s = BD(Ikb(c2.a, h), 10); + if (!zMc(a, s, d + 1, d)) { + for (r = BD(Ikb(a.c.b, s.p), 15).Kc(); r.Ob(); ) { + q = BD(r.Pb(), 46); + e = a.c.e[BD(q.a, 10).p]; + (e < f2 || e > g) && Qqb(a.b, BD(q.b, 17)); + } + } + ++h; + } + f2 = g; + } + } + } + } + function o5c(b, c2) { + var d; + if (c2 == null || dfb(c2, Xhe)) { + return null; + } + if (c2.length == 0 && b.k != (_5c(), W5c)) { + return null; + } + switch (b.k.g) { + case 1: + return efb(c2, kse) ? (Bcb(), Acb) : efb(c2, lse) ? (Bcb(), zcb) : null; + case 2: + try { + return meb(Icb(c2, Rie, Ohe)); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + return null; + } else + throw vbb(a); + } + case 4: + try { + return Hcb(c2); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + return null; + } else + throw vbb(a); + } + case 3: + return c2; + case 5: + j5c(b); + return m5c(b, c2); + case 6: + j5c(b); + return n5c(b, b.a, c2); + case 7: + try { + d = l5c(b); + d.Jf(c2); + return d; + } catch (a) { + a = ubb(a); + if (JD(a, 32)) { + return null; + } else + throw vbb(a); + } + default: + throw vbb(new Zdb("Invalid type set for this layout option.")); + } + } + function JWb(a) { + AWb(); + var b, c2, d, e, f2, g, h; + h = new CWb(); + for (c2 = new olb(a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 140); + (!h.b || b.c >= h.b.c) && (h.b = b); + if (!h.c || b.c <= h.c.c) { + h.d = h.c; + h.c = b; + } + (!h.e || b.d >= h.e.d) && (h.e = b); + (!h.f || b.d <= h.f.d) && (h.f = b); + } + d = new NWb((lWb(), hWb)); + rXb(a, yWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [d]))); + g = new NWb(kWb); + rXb(a, xWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [g]))); + e = new NWb(iWb); + rXb(a, wWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [e]))); + f2 = new NWb(jWb); + rXb(a, vWb, new amb(OC(GC(bQ, 1), Uhe, 369, 0, [f2]))); + DWb(d.c, hWb); + DWb(e.c, iWb); + DWb(f2.c, jWb); + DWb(g.c, kWb); + h.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Gkb(h.a, d.c); + Gkb(h.a, Su(e.c)); + Gkb(h.a, f2.c); + Gkb(h.a, Su(g.c)); + return h; + } + function jxd(a) { + var b; + switch (a.d) { + case 1: { + if (a.hj()) { + return a.o != -2; + } + break; + } + case 2: { + if (a.hj()) { + return a.o == -2; + } + break; + } + case 3: + case 5: + case 4: + case 6: + case 7: { + return a.o > -2; + } + default: { + return false; + } + } + b = a.gj(); + switch (a.p) { + case 0: + return b != null && Ccb(DD(b)) != Kbb(a.k, 0); + case 1: + return b != null && BD(b, 217).a != Tbb(a.k) << 24 >> 24; + case 2: + return b != null && BD(b, 172).a != (Tbb(a.k) & aje); + case 6: + return b != null && Kbb(BD(b, 162).a, a.k); + case 5: + return b != null && BD(b, 19).a != Tbb(a.k); + case 7: + return b != null && BD(b, 184).a != Tbb(a.k) << 16 >> 16; + case 3: + return b != null && Edb(ED(b)) != a.j; + case 4: + return b != null && BD(b, 155).a != a.j; + default: + return b == null ? a.n != null : !pb(b, a.n); + } + } + function nOd(a, b, c2) { + var d, e, f2, g; + if (a.Fk() && a.Ek()) { + g = oOd(a, BD(c2, 56)); + if (PD(g) !== PD(c2)) { + a.Oi(b); + a.Ui(b, pOd(a, b, g)); + if (a.rk()) { + f2 = (e = BD(c2, 49), a.Dk() ? a.Bk() ? e.ih(a.b, zUd(BD(XKd(wjd(a.b), a.aj()), 18)).n, BD(XKd(wjd(a.b), a.aj()).Yj(), 26).Bj(), null) : e.ih(a.b, bLd(e.Tg(), zUd(BD(XKd(wjd(a.b), a.aj()), 18))), null, null) : e.ih(a.b, -1 - a.aj(), null, null)); + !BD(g, 49).eh() && (f2 = (d = BD(g, 49), a.Dk() ? a.Bk() ? d.gh(a.b, zUd(BD(XKd(wjd(a.b), a.aj()), 18)).n, BD(XKd(wjd(a.b), a.aj()).Yj(), 26).Bj(), f2) : d.gh(a.b, bLd(d.Tg(), zUd(BD(XKd(wjd(a.b), a.aj()), 18))), null, f2) : d.gh(a.b, -1 - a.aj(), null, f2))); + !!f2 && f2.Fi(); + } + oid(a.b) && a.$i(a.Zi(9, c2, g, b, false)); + return g; + } + } + return c2; + } + function Noc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + k = Edb(ED(vNb(a, (Nyc(), oyc)))); + d = Edb(ED(vNb(a, Cyc))); + m = new _fd(); + yNb(m, oyc, k + d); + j = b; + r = j.d; + p = j.c.i; + s = j.d.i; + q = G1b(p.c); + t = G1b(s.c); + e = new Rkb(); + for (l = q; l <= t; l++) { + h = new b0b(a); + __b(h, (j0b(), g0b)); + yNb(h, (wtc(), $sc), j); + yNb(h, Vxc, (dcd(), $bd)); + yNb(h, qyc, m); + n = BD(Ikb(a.b, l), 29); + l == q ? Z_b(h, n.a.c.length - c2, n) : $_b(h, n); + u = Edb(ED(vNb(j, Zwc))); + if (u < 0) { + u = 0; + yNb(j, Zwc, u); + } + h.o.b = u; + o2 = $wnd.Math.floor(u / 2); + g = new H0b(); + G0b(g, (Ucd(), Tcd)); + F0b(g, h); + g.n.b = o2; + i3 = new H0b(); + G0b(i3, zcd); + F0b(i3, h); + i3.n.b = o2; + RZb(j, g); + f2 = new UZb(); + tNb(f2, j); + yNb(f2, jxc, null); + QZb(f2, i3); + RZb(f2, r); + Ooc(h, j, f2); + e.c[e.c.length] = f2; + j = f2; + } + return e; + } + function sbc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + i3 = BD(Y_b(a, (Ucd(), Tcd)).Kc().Pb(), 11).e; + n = BD(Y_b(a, zcd).Kc().Pb(), 11).g; + h = i3.c.length; + t = A0b(BD(Ikb(a.j, 0), 11)); + while (h-- > 0) { + p = (tCb(0, i3.c.length), BD(i3.c[0], 17)); + e = (tCb(0, n.c.length), BD(n.c[0], 17)); + s = e.d.e; + f2 = Jkb(s, e, 0); + SZb(p, e.d, f2); + QZb(e, null); + RZb(e, null); + o2 = p.a; + b && Dsb(o2, new g7c(t)); + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 8); + Dsb(o2, new g7c(c2)); + } + r = p.b; + for (m = new olb(e.b); m.a < m.c.c.length; ) { + l = BD(mlb(m), 70); + r.c[r.c.length] = l; + } + q = BD(vNb(p, (Nyc(), jxc)), 74); + g = BD(vNb(e, jxc), 74); + if (g) { + if (!q) { + q = new s7c(); + yNb(p, jxc, q); + } + for (k = Jsb(g, 0); k.b != k.d.c; ) { + j = BD(Xsb(k), 8); + Dsb(q, new g7c(j)); + } + } + } + } + function EJb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + c2 = BD(Mpb(a.b, b), 124); + i3 = BD(BD(Qc(a.r, b), 21), 84); + if (i3.dc()) { + c2.n.b = 0; + c2.n.c = 0; + return; + } + j = a.u.Hc((rcd(), ncd)); + g = 0; + h = i3.Kc(); + k = null; + l = 0; + m = 0; + while (h.Ob()) { + d = BD(h.Pb(), 111); + e = Edb(ED(d.b.We((CKb(), BKb)))); + f2 = d.b.rf().a; + a.A.Hc((tdd(), sdd)) && KJb(a, b); + if (!k) { + !!a.C && a.C.b > 0 && (g = $wnd.Math.max(g, IJb(a.C.b + d.d.b, e))); + } else { + n = m + k.d.c + a.w + d.d.b; + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(l - e) <= ple || l == e || isNaN(l) && isNaN(e) ? 0 : n / (e - l))); + } + k = d; + l = e; + m = f2; + } + if (!!a.C && a.C.c > 0) { + n = m + a.C.c; + j && (n += k.d.c); + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(l - 1) <= ple || l == 1 || isNaN(l) && isNaN(1) ? 0 : n / (1 - l))); + } + c2.n.b = 0; + c2.a.a = g; + } + function NKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + c2 = BD(Mpb(a.b, b), 124); + i3 = BD(BD(Qc(a.r, b), 21), 84); + if (i3.dc()) { + c2.n.d = 0; + c2.n.a = 0; + return; + } + j = a.u.Hc((rcd(), ncd)); + g = 0; + a.A.Hc((tdd(), sdd)) && SKb(a, b); + h = i3.Kc(); + k = null; + m = 0; + l = 0; + while (h.Ob()) { + d = BD(h.Pb(), 111); + f2 = Edb(ED(d.b.We((CKb(), BKb)))); + e = d.b.rf().b; + if (!k) { + !!a.C && a.C.d > 0 && (g = $wnd.Math.max(g, IJb(a.C.d + d.d.d, f2))); + } else { + n = l + k.d.a + a.w + d.d.d; + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(m - f2) <= ple || m == f2 || isNaN(m) && isNaN(f2) ? 0 : n / (f2 - m))); + } + k = d; + m = f2; + l = e; + } + if (!!a.C && a.C.a > 0) { + n = l + a.C.a; + j && (n += k.d.a); + g = $wnd.Math.max(g, (Iy(), My(ple), $wnd.Math.abs(m - 1) <= ple || m == 1 || isNaN(m) && isNaN(1) ? 0 : n / (1 - m))); + } + c2.n.d = 0; + c2.a.b = g; + } + function _Ec(a, b, c2) { + var d, e, f2, g, h, i3; + this.g = a; + h = b.d.length; + i3 = c2.d.length; + this.d = KC(OQ, kne, 10, h + i3, 0, 1); + for (g = 0; g < h; g++) { + this.d[g] = b.d[g]; + } + for (f2 = 0; f2 < i3; f2++) { + this.d[h + f2] = c2.d[f2]; + } + if (b.e) { + this.e = Ru(b.e); + this.e.Mc(c2); + if (c2.e) { + for (e = c2.e.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 233); + if (d == b) { + continue; + } else + this.e.Hc(d) ? --d.c : this.e.Fc(d); + } + } + } else if (c2.e) { + this.e = Ru(c2.e); + this.e.Mc(b); + } + this.f = b.f + c2.f; + this.a = b.a + c2.a; + this.a > 0 ? ZEc(this, this.f / this.a) : REc(b.g, b.d[0]).a != null && REc(c2.g, c2.d[0]).a != null ? ZEc(this, (Edb(REc(b.g, b.d[0]).a) + Edb(REc(c2.g, c2.d[0]).a)) / 2) : REc(b.g, b.d[0]).a != null ? ZEc(this, REc(b.g, b.d[0]).a) : REc(c2.g, c2.d[0]).a != null && ZEc(this, REc(c2.g, c2.d[0]).a); + } + function BUb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + a.a = new dVb(oqb(t12)); + for (d = new olb(b.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 841); + h = new gVb(OC(GC(IP, 1), Uhe, 81, 0, [])); + Ekb(a.a.a, h); + for (j = new olb(c2.d); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 110); + k = new GUb(a, i3); + AUb(k, BD(vNb(c2.c, (wtc(), Esc)), 21)); + if (!Mhb(a.g, c2)) { + Rhb(a.g, c2, new f7c(i3.c, i3.d)); + Rhb(a.f, c2, k); + } + Ekb(a.a.b, k); + eVb(h, k); + } + for (g = new olb(c2.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 594); + k = new GUb(a, f2.kf()); + Rhb(a.b, f2, new vgd(h, k)); + AUb(k, BD(vNb(c2.c, (wtc(), Esc)), 21)); + if (f2.hf()) { + l = new HUb(a, f2.hf(), 1); + AUb(l, BD(vNb(c2.c, Esc), 21)); + e = new gVb(OC(GC(IP, 1), Uhe, 81, 0, [])); + eVb(e, l); + Rc(a.c, f2.gf(), new vgd(h, l)); + } + } + } + return a.a; + } + function oBc(a) { + var b; + this.a = a; + b = (j0b(), OC(GC(NQ, 1), Kie, 267, 0, [h0b, g0b, e0b, i0b, f0b, d0b])).length; + this.b = IC(Q3, [nie, zqe], [593, 146], 0, [b, b], 2); + this.c = IC(Q3, [nie, zqe], [593, 146], 0, [b, b], 2); + nBc(this, h0b, (Nyc(), vyc), wyc); + lBc(this, h0b, g0b, oyc, pyc); + kBc(this, h0b, i0b, oyc); + kBc(this, h0b, e0b, oyc); + lBc(this, h0b, f0b, vyc, wyc); + nBc(this, g0b, lyc, myc); + kBc(this, g0b, i0b, lyc); + kBc(this, g0b, e0b, lyc); + lBc(this, g0b, f0b, oyc, pyc); + mBc(this, i0b, lyc); + kBc(this, i0b, e0b, lyc); + kBc(this, i0b, f0b, syc); + mBc(this, e0b, zyc); + lBc(this, e0b, f0b, uyc, tyc); + nBc(this, f0b, lyc, lyc); + nBc(this, d0b, lyc, myc); + lBc(this, d0b, h0b, oyc, pyc); + lBc(this, d0b, f0b, oyc, pyc); + lBc(this, d0b, g0b, oyc, pyc); + } + function _2d(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + g = c2.ak(); + if (JD(g, 99) && (BD(g, 18).Bb & Tje) != 0) { + m = BD(c2.dd(), 49); + p = xid(a.e, m); + if (p != m) { + k = R6d(g, p); + mud(a, b, t3d(a, b, k)); + l = null; + if (oid(a.e)) { + d = e1d((O6d(), M6d), a.e.Tg(), g); + if (d != XKd(a.e.Tg(), a.c)) { + q = S6d(a.e.Tg(), g); + h = 0; + f2 = BD(a.g, 119); + for (i3 = 0; i3 < b; ++i3) { + e = f2[i3]; + q.rl(e.ak()) && ++h; + } + l = new O7d(a.e, 9, d, m, p, h, false); + l.Ei(new pSd(a.e, 9, a.c, c2, k, b, false)); + } + } + o2 = BD(g, 18); + n = zUd(o2); + if (n) { + l = m.ih(a.e, bLd(m.Tg(), n), null, l); + l = BD(p, 49).gh(a.e, bLd(p.Tg(), n), null, l); + } else if ((o2.Bb & ote) != 0) { + j = -1 - bLd(a.e.Tg(), o2); + l = m.ih(a.e, j, null, null); + !BD(p, 49).eh() && (l = BD(p, 49).gh(a.e, j, null, l)); + } + !!l && l.Fi(); + return k; + } + } + return c2; + } + function yUb(a) { + var b, c2, d, e, f2, g, h, i3; + for (f2 = new olb(a.a.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 81); + e.b.c = e.g.c; + e.b.d = e.g.d; + } + i3 = new f7c(Pje, Pje); + b = new f7c(Qje, Qje); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 81); + i3.a = $wnd.Math.min(i3.a, c2.g.c); + i3.b = $wnd.Math.min(i3.b, c2.g.d); + b.a = $wnd.Math.max(b.a, c2.g.c + c2.g.b); + b.b = $wnd.Math.max(b.b, c2.g.d + c2.g.a); + } + for (h = Uc(a.c).a.nc(); h.Ob(); ) { + g = BD(h.Pb(), 46); + c2 = BD(g.b, 81); + i3.a = $wnd.Math.min(i3.a, c2.g.c); + i3.b = $wnd.Math.min(i3.b, c2.g.d); + b.a = $wnd.Math.max(b.a, c2.g.c + c2.g.b); + b.b = $wnd.Math.max(b.b, c2.g.d + c2.g.a); + } + a.d = V6c(new f7c(i3.a, i3.b)); + a.e = c7c(new f7c(b.a, b.b), i3); + a.a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + } + function svd(a) { + var b, c2, d; + l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new Z9c()])); + c2 = new xB(a); + for (d = 0; d < c2.a.length; ++d) { + b = tB(c2, d).je().a; + dfb(b, "layered") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new kwc()])) : dfb(b, "force") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new TRb()])) : dfb(b, "stress") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new PSb()])) : dfb(b, "mrtree") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new sTc()])) : dfb(b, "radial") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new IWc()])) : dfb(b, "disco") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new gFb(), new oPb()])) : dfb(b, "sporeOverlap") || dfb(b, "sporeCompaction") ? l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new B0c()])) : dfb(b, "rectpacking") && l4c(lvd, OC(GC(C0, 1), Uhe, 130, 0, [new PYc()])); + } + } + function j_b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + m = new g7c(a.o); + r = b.a / m.a; + h = b.b / m.b; + p = b.a - m.a; + f2 = b.b - m.b; + if (c2) { + e = PD(vNb(a, (Nyc(), Vxc))) === PD((dcd(), $bd)); + for (o2 = new olb(a.j); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + switch (n.j.g) { + case 1: + e || (n.n.a *= r); + break; + case 2: + n.n.a += p; + e || (n.n.b *= h); + break; + case 3: + e || (n.n.a *= r); + n.n.b += f2; + break; + case 4: + e || (n.n.b *= h); + } + } + } + for (j = new olb(a.b); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 70); + k = i3.n.a + i3.o.a / 2; + l = i3.n.b + i3.o.b / 2; + q = k / m.a; + g = l / m.b; + if (q + g >= 1) { + if (q - g > 0 && l >= 0) { + i3.n.a += p; + i3.n.b += f2 * g; + } else if (q - g < 0 && k >= 0) { + i3.n.a += p * q; + i3.n.b += f2; + } + } + } + a.o.a = b.a; + a.o.b = b.b; + yNb(a, (Nyc(), Fxc), (tdd(), d = BD(gdb(I1), 9), new xqb(d, BD(_Bb(d, d.length), 9), 0))); + } + function iFd(a, b, c2, d, e, f2) { + var g; + if (!(b == null || !OEd(b, zEd, AEd))) { + throw vbb(new Wdb("invalid scheme: " + b)); + } + if (!a && !(c2 != null && hfb(c2, wfb(35)) == -1 && c2.length > 0 && (BCb(0, c2.length), c2.charCodeAt(0) != 47))) { + throw vbb(new Wdb("invalid opaquePart: " + c2)); + } + if (a && !(b != null && hnb(GEd, b.toLowerCase())) && !(c2 == null || !OEd(c2, CEd, DEd))) { + throw vbb(new Wdb(mve + c2)); + } + if (a && b != null && hnb(GEd, b.toLowerCase()) && !eFd(c2)) { + throw vbb(new Wdb(mve + c2)); + } + if (!fFd(d)) { + throw vbb(new Wdb("invalid device: " + d)); + } + if (!hFd(e)) { + g = e == null ? "invalid segments: null" : "invalid segment: " + VEd(e); + throw vbb(new Wdb(g)); + } + if (!(f2 == null || hfb(f2, wfb(35)) == -1)) { + throw vbb(new Wdb("invalid query: " + f2)); + } + } + function nVc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + Odd(b, "Calculate Graph Size", 1); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + h = dme; + i3 = dme; + f2 = ere; + g = ere; + for (l = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); l.e != l.i.gc(); ) { + j = BD(Dyd(l), 33); + o2 = j.i; + p = j.j; + r = j.g; + d = j.f; + e = BD(hkd(j, (Y9c(), S8c)), 142); + h = $wnd.Math.min(h, o2 - e.b); + i3 = $wnd.Math.min(i3, p - e.d); + f2 = $wnd.Math.max(f2, o2 + r + e.c); + g = $wnd.Math.max(g, p + d + e.a); + } + n = BD(hkd(a, (Y9c(), f9c)), 116); + m = new f7c(h - n.b, i3 - n.d); + for (k = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); k.e != k.i.gc(); ) { + j = BD(Dyd(k), 33); + dld(j, j.i - m.a); + eld(j, j.j - m.b); + } + q = f2 - h + (n.b + n.c); + c2 = g - i3 + (n.d + n.a); + cld(a, q); + ald(a, c2); + b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + } + function rGb(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + d = new Rkb(); + for (g = new olb(a.e.a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 121); + k = 0; + e.k.c = KC(SI, Uhe, 1, 0, 5, 1); + for (c2 = new olb(LFb(e)); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 213); + if (b.f) { + Ekb(e.k, b); + ++k; + } + } + k == 1 && (d.c[d.c.length] = e, true); + } + for (f2 = new olb(d); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 121); + while (e.k.c.length == 1) { + j = BD(mlb(new olb(e.k)), 213); + a.b[j.c] = j.g; + h = j.d; + i3 = j.e; + for (c2 = new olb(LFb(e)); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 213); + pb(b, j) || (b.f ? h == b.d || i3 == b.e ? a.b[j.c] -= a.b[b.c] - b.g : a.b[j.c] += a.b[b.c] - b.g : e == h ? b.d == e ? a.b[j.c] += b.g : a.b[j.c] -= b.g : b.d == e ? a.b[j.c] -= b.g : a.b[j.c] += b.g); + } + Lkb(h.k, j); + Lkb(i3.k, j); + h == e ? e = j.e : e = j.d; + } + } + } + function k4c(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + if (b == null || b.length == 0) { + return null; + } + f2 = BD(Phb(a.f, b), 23); + if (!f2) { + for (e = (n = new $ib(a.d).a.vc().Kc(), new djb(n)); e.a.Ob(); ) { + c2 = (g = BD(e.a.Pb(), 42), BD(g.dd(), 23)); + h = c2.f; + o2 = b.length; + if (dfb(h.substr(h.length - o2, o2), b) && (b.length == h.length || bfb(h, h.length - b.length - 1) == 46)) { + if (f2) { + return null; + } + f2 = c2; + } + } + if (!f2) { + for (d = (m = new $ib(a.d).a.vc().Kc(), new djb(m)); d.a.Ob(); ) { + c2 = (g = BD(d.a.Pb(), 42), BD(g.dd(), 23)); + l = c2.g; + if (l != null) { + for (i3 = l, j = 0, k = i3.length; j < k; ++j) { + h = i3[j]; + o2 = b.length; + if (dfb(h.substr(h.length - o2, o2), b) && (b.length == h.length || bfb(h, h.length - b.length - 1) == 46)) { + if (f2) { + return null; + } + f2 = c2; + } + } + } + } + } + !!f2 && Shb(a.f, b, f2); + } + return f2; + } + function sA(a, b) { + var c2, d, e, f2, g; + c2 = new Vfb(); + g = false; + for (f2 = 0; f2 < b.length; f2++) { + d = (BCb(f2, b.length), b.charCodeAt(f2)); + if (d == 32) { + gA(a, c2, 0); + c2.a += " "; + gA(a, c2, 0); + while (f2 + 1 < b.length && (BCb(f2 + 1, b.length), b.charCodeAt(f2 + 1) == 32)) { + ++f2; + } + continue; + } + if (g) { + if (d == 39) { + if (f2 + 1 < b.length && (BCb(f2 + 1, b.length), b.charCodeAt(f2 + 1) == 39)) { + c2.a += String.fromCharCode(d); + ++f2; + } else { + g = false; + } + } else { + c2.a += String.fromCharCode(d); + } + continue; + } + if (hfb("GyMLdkHmsSEcDahKzZv", wfb(d)) > 0) { + gA(a, c2, 0); + c2.a += String.fromCharCode(d); + e = lA(b, f2); + gA(a, c2, e); + f2 += e - 1; + continue; + } + if (d == 39) { + if (f2 + 1 < b.length && (BCb(f2 + 1, b.length), b.charCodeAt(f2 + 1) == 39)) { + c2.a += "'"; + ++f2; + } else { + g = true; + } + } else { + c2.a += String.fromCharCode(d); + } + } + gA(a, c2, 0); + mA(a); + } + function wDc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + Odd(c2, "Network simplex layering", 1); + a.b = b; + r = BD(vNb(b, (Nyc(), Ayc)), 19).a * 4; + q = a.b.a; + if (q.c.length < 1) { + Qdd(c2); + return; + } + f2 = sDc(a, q); + p = null; + for (e = Jsb(f2, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 15); + h = r * QD($wnd.Math.sqrt(d.gc())); + g = vDc(d); + uGb(HGb(JGb(IGb(LGb(g), h), p), true), Udd(c2, 1)); + m = a.b.b; + for (o2 = new olb(g.a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 121); + while (m.c.length <= n.e) { + Dkb(m, m.c.length, new H1b(a.b)); + } + k = BD(n.f, 10); + $_b(k, BD(Ikb(m, n.e), 29)); + } + if (f2.b > 1) { + p = KC(WD, oje, 25, a.b.b.c.length, 15, 1); + l = 0; + for (j = new olb(a.b.b); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 29); + p[l++] = i3.a.c.length; + } + } + } + q.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = null; + a.b = null; + a.c = null; + Qdd(c2); + } + function OUb(a) { + var b, c2, d, e, f2, g, h; + b = 0; + for (f2 = new olb(a.b.a); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 189); + d.b = 0; + d.c = 0; + } + NUb(a, 0); + MUb(a, a.g); + sVb(a.c); + wVb(a.c); + c2 = (ead(), aad); + uVb(oVb(tVb(uVb(oVb(tVb(uVb(tVb(a.c, c2)), had(c2)))), c2))); + tVb(a.c, aad); + RUb(a, a.g); + SUb(a, 0); + TUb(a, 0); + UUb(a, 1); + NUb(a, 1); + MUb(a, a.d); + sVb(a.c); + for (g = new olb(a.b.a); g.a < g.c.c.length; ) { + d = BD(mlb(g), 189); + b += $wnd.Math.abs(d.c); + } + for (h = new olb(a.b.a); h.a < h.c.c.length; ) { + d = BD(mlb(h), 189); + d.b = 0; + d.c = 0; + } + c2 = dad; + uVb(oVb(tVb(uVb(oVb(tVb(uVb(wVb(tVb(a.c, c2))), had(c2)))), c2))); + tVb(a.c, aad); + RUb(a, a.d); + SUb(a, 1); + TUb(a, 1); + UUb(a, 0); + wVb(a.c); + for (e = new olb(a.b.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 189); + b += $wnd.Math.abs(d.c); + } + return b; + } + function Wfe(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + j = b; + if (j.b == null || a.b == null) + return; + Yfe(a); + Vfe(a); + Yfe(j); + Vfe(j); + c2 = KC(WD, oje, 25, a.b.length + j.b.length, 15, 1); + k = 0; + d = 0; + g = 0; + while (d < a.b.length && g < j.b.length) { + e = a.b[d]; + f2 = a.b[d + 1]; + h = j.b[g]; + i3 = j.b[g + 1]; + if (f2 < h) { + d += 2; + } else if (f2 >= h && e <= i3) { + if (h <= e && f2 <= i3) { + c2[k++] = e; + c2[k++] = f2; + d += 2; + } else if (h <= e) { + c2[k++] = e; + c2[k++] = i3; + a.b[d] = i3 + 1; + g += 2; + } else if (f2 <= i3) { + c2[k++] = h; + c2[k++] = f2; + d += 2; + } else { + c2[k++] = h; + c2[k++] = i3; + a.b[d] = i3 + 1; + } + } else if (i3 < e) { + g += 2; + } else { + throw vbb(new hz("Token#intersectRanges(): Internal Error: [" + a.b[d] + "," + a.b[d + 1] + "] & [" + j.b[g] + "," + j.b[g + 1] + "]")); + } + } + while (d < a.b.length) { + c2[k++] = a.b[d++]; + c2[k++] = a.b[d++]; + } + a.b = KC(WD, oje, 25, k, 15, 1); + $fb(c2, 0, a.b, 0, k); + } + function PUb(a) { + var b, c2, d, e, f2, g, h; + b = new Rkb(); + a.g = new Rkb(); + a.d = new Rkb(); + for (g = new nib(new eib(a.f.b).a); g.b; ) { + f2 = lib(g); + Ekb(b, BD(BD(f2.dd(), 46).b, 81)); + fad(BD(f2.cd(), 594).gf()) ? Ekb(a.d, BD(f2.dd(), 46)) : Ekb(a.g, BD(f2.dd(), 46)); + } + MUb(a, a.d); + MUb(a, a.g); + a.c = new CVb(a.b); + AVb(a.c, (xUb(), wUb)); + RUb(a, a.d); + RUb(a, a.g); + Gkb(b, a.c.a.b); + a.e = new f7c(Pje, Pje); + a.a = new f7c(Qje, Qje); + for (d = new olb(b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 81); + a.e.a = $wnd.Math.min(a.e.a, c2.g.c); + a.e.b = $wnd.Math.min(a.e.b, c2.g.d); + a.a.a = $wnd.Math.max(a.a.a, c2.g.c + c2.g.b); + a.a.b = $wnd.Math.max(a.a.b, c2.g.d + c2.g.a); + } + zVb(a.c, new YUb()); + h = 0; + do { + e = OUb(a); + ++h; + } while ((h < 2 || e > Qie) && h < 10); + zVb(a.c, new _Ub()); + OUb(a); + vVb(a.c); + yUb(a.f); + } + function sZb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + if (!Ccb(DD(vNb(c2, (Nyc(), fxc))))) { + return; + } + for (h = new olb(c2.j); h.a < h.c.c.length; ) { + g = BD(mlb(h), 11); + m = k_b(g.g); + for (j = m, k = 0, l = j.length; k < l; ++k) { + i3 = j[k]; + f2 = i3.d.i == c2; + e = f2 && Ccb(DD(vNb(i3, gxc))); + if (e) { + o2 = i3.c; + n = BD(Ohb(a.b, o2), 10); + if (!n) { + n = Z$b(o2, (dcd(), bcd), o2.j, -1, null, null, o2.o, BD(vNb(b, Lwc), 103), b); + yNb(n, (wtc(), $sc), o2); + Rhb(a.b, o2, n); + Ekb(b.a, n); + } + q = i3.d; + p = BD(Ohb(a.b, q), 10); + if (!p) { + p = Z$b(q, (dcd(), bcd), q.j, 1, null, null, q.o, BD(vNb(b, Lwc), 103), b); + yNb(p, (wtc(), $sc), q); + Rhb(a.b, q, p); + Ekb(b.a, p); + } + d = kZb(i3); + QZb(d, BD(Ikb(n.j, 0), 11)); + RZb(d, BD(Ikb(p.j, 0), 11)); + Rc(a.a, i3, new BZb(d, b, (KAc(), IAc))); + BD(vNb(b, (wtc(), Ksc)), 21).Fc((Orc(), Hrc)); + } + } + } + } + function W9b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2; + Odd(c2, "Label dummy switching", 1); + d = BD(vNb(b, (Nyc(), Owc)), 227); + J9b(b); + e = T9b(b, d); + a.a = KC(UD, Vje, 25, b.b.c.length, 15, 1); + for (h = (Apc(), OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc])), k = 0, n = h.length; k < n; ++k) { + f2 = h[k]; + if ((f2 == zpc || f2 == upc || f2 == xpc) && !BD(uqb(e.a, f2) ? e.b[f2.g] : null, 15).dc()) { + M9b(a, b); + break; + } + } + for (i3 = OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]), l = 0, o2 = i3.length; l < o2; ++l) { + f2 = i3[l]; + f2 == zpc || f2 == upc || f2 == xpc || X9b(a, BD(uqb(e.a, f2) ? e.b[f2.g] : null, 15)); + } + for (g = OC(GC(EW, 1), Kie, 227, 0, [wpc, ypc, vpc, xpc, zpc, upc]), j = 0, m = g.length; j < m; ++j) { + f2 = g[j]; + (f2 == zpc || f2 == upc || f2 == xpc) && X9b(a, BD(uqb(e.a, f2) ? e.b[f2.g] : null, 15)); + } + a.a = null; + Qdd(c2); + } + function AFc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + switch (a.k.g) { + case 1: + d = BD(vNb(a, (wtc(), $sc)), 17); + c2 = BD(vNb(d, _sc), 74); + !c2 ? c2 = new s7c() : Ccb(DD(vNb(d, ltc))) && (c2 = w7c(c2)); + j = BD(vNb(a, Vsc), 11); + if (j) { + k = l7c(OC(GC(m1, 1), nie, 8, 0, [j.i.n, j.n, j.a])); + if (b <= k.a) { + return k.b; + } + Gsb(c2, k, c2.a, c2.a.a); + } + l = BD(vNb(a, Wsc), 11); + if (l) { + m = l7c(OC(GC(m1, 1), nie, 8, 0, [l.i.n, l.n, l.a])); + if (m.a <= b) { + return m.b; + } + Gsb(c2, m, c2.c.b, c2.c); + } + if (c2.b >= 2) { + i3 = Jsb(c2, 0); + g = BD(Xsb(i3), 8); + h = BD(Xsb(i3), 8); + while (h.a < b && i3.b != i3.d.c) { + g = h; + h = BD(Xsb(i3), 8); + } + return g.b + (b - g.a) / (h.a - g.a) * (h.b - g.b); + } + break; + case 3: + f2 = BD(vNb(BD(Ikb(a.j, 0), 11), (wtc(), $sc)), 11); + e = f2.i; + switch (f2.j.g) { + case 1: + return e.n.b; + case 3: + return e.n.b + e.o.b; + } + } + return T_b(a).b; + } + function Wgc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + for (g = new olb(a.d.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 29); + for (i3 = new olb(f2.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + if (Ccb(DD(vNb(h, (Nyc(), pwc))))) { + if (!Qq(O_b(h))) { + d = BD(Oq(O_b(h)), 17); + k = d.c.i; + k == h && (k = d.d.i); + l = new vgd(k, c7c(R6c(h.n), k.n)); + Rhb(a.b, h, l); + continue; + } + } + e = new J6c(h.n.a - h.d.b, h.n.b - h.d.d, h.o.a + h.d.b + h.d.c, h.o.b + h.d.d + h.d.a); + b = vDb(yDb(wDb(xDb(new zDb(), h), e), Fgc), a.a); + pDb(qDb(rDb(new sDb(), OC(GC(PM, 1), Uhe, 57, 0, [b])), b), a.a); + j = new lEb(); + Rhb(a.e, b, j); + c2 = sr(new Sr(ur(R_b(h).a.Kc(), new Sq()))) - sr(new Sr(ur(U_b(h).a.Kc(), new Sq()))); + c2 < 0 ? jEb(j, true, (ead(), aad)) : c2 > 0 && jEb(j, true, (ead(), bad)); + h.k == (j0b(), e0b) && kEb(j); + Rhb(a.f, h, b); + } + } + } + function Bbc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + Odd(c2, "Node promotion heuristic", 1); + a.g = b; + Abc(a); + a.q = BD(vNb(b, (Nyc(), rxc)), 260); + k = BD(vNb(a.g, qxc), 19).a; + f2 = new Jbc(); + switch (a.q.g) { + case 2: + case 1: + Dbc(a, f2); + break; + case 3: + a.q = (kAc(), jAc); + Dbc(a, f2); + i3 = 0; + for (h = new olb(a.a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 19); + i3 = $wnd.Math.max(i3, g.a); + } + if (i3 > a.j) { + a.q = dAc; + Dbc(a, f2); + } + break; + case 4: + a.q = (kAc(), jAc); + Dbc(a, f2); + j = 0; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = ED(mlb(e)); + j = $wnd.Math.max(j, (uCb(d), d)); + } + if (j > a.k) { + a.q = gAc; + Dbc(a, f2); + } + break; + case 6: + m = QD($wnd.Math.ceil(a.f.length * k / 100)); + Dbc(a, new Mbc(m)); + break; + case 5: + l = QD($wnd.Math.ceil(a.d * k / 100)); + Dbc(a, new Pbc(l)); + break; + default: + Dbc(a, f2); + } + Ebc(a, b); + Qdd(c2); + } + function fFc(a, b, c2) { + var d, e, f2, g; + this.j = a; + this.e = WZb(a); + this.o = this.j.e; + this.i = !!this.o; + this.p = this.i ? BD(Ikb(c2, Q_b(this.o).p), 214) : null; + e = BD(vNb(a, (wtc(), Ksc)), 21); + this.g = e.Hc((Orc(), Hrc)); + this.b = new Rkb(); + this.d = new rHc(this.e); + g = BD(vNb(this.j, jtc), 230); + this.q = wFc(b, g, this.e); + this.k = new BGc(this); + f2 = Ou(OC(GC(qY, 1), Uhe, 225, 0, [this, this.d, this.k, this.q])); + if (b == (rGc(), oGc) && !Ccb(DD(vNb(a, (Nyc(), Awc))))) { + d = new SEc(this.e); + f2.c[f2.c.length] = d; + this.c = new uEc(d, g, BD(this.q, 402)); + } else if (b == oGc && Ccb(DD(vNb(a, (Nyc(), Awc))))) { + d = new SEc(this.e); + f2.c[f2.c.length] = d; + this.c = new XGc(d, g, BD(this.q, 402)); + } else { + this.c = new Oic(b, this); + } + Ekb(f2, this.c); + $Ic(f2, this.e); + this.s = AGc(this.k); + } + function xUc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + l = BD(pr((g = Jsb(new ZRc(b).a.d, 0), new aSc(g))), 86); + o2 = l ? BD(vNb(l, (mTc(), _Sc)), 86) : null; + e = 1; + while (!!l && !!o2) { + i3 = 0; + u = 0; + c2 = l; + d = o2; + for (h = 0; h < e; h++) { + c2 = VRc(c2); + d = VRc(d); + u += Edb(ED(vNb(c2, (mTc(), cTc)))); + i3 += Edb(ED(vNb(d, cTc))); + } + t = Edb(ED(vNb(o2, (mTc(), fTc)))); + s = Edb(ED(vNb(l, fTc))); + m = zUc(l, o2); + n = t + i3 + a.a + m - s - u; + if (0 < n) { + j = b; + k = 0; + while (!!j && j != d) { + ++k; + j = BD(vNb(j, aTc), 86); + } + if (j) { + r = n / k; + j = b; + while (j != d) { + q = Edb(ED(vNb(j, fTc))) + n; + yNb(j, fTc, q); + p = Edb(ED(vNb(j, cTc))) + n; + yNb(j, cTc, p); + n -= r; + j = BD(vNb(j, aTc), 86); + } + } else { + return; + } + } + ++e; + l.d.b == 0 ? l = JRc(new ZRc(b), e) : l = BD(pr((f2 = Jsb(new ZRc(l).a.d, 0), new aSc(f2))), 86); + o2 = l ? BD(vNb(l, _Sc), 86) : null; + } + } + function Cbc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + i3 = true; + e = 0; + j = a.f[b.p]; + k = b.o.b + a.n; + c2 = a.c[b.p][2]; + Nkb(a.a, j, meb(BD(Ikb(a.a, j), 19).a - 1 + c2)); + Nkb(a.b, j, Edb(ED(Ikb(a.b, j))) - k + c2 * a.e); + ++j; + if (j >= a.i) { + ++a.i; + Ekb(a.a, meb(1)); + Ekb(a.b, k); + } else { + d = a.c[b.p][1]; + Nkb(a.a, j, meb(BD(Ikb(a.a, j), 19).a + 1 - d)); + Nkb(a.b, j, Edb(ED(Ikb(a.b, j))) + k - d * a.e); + } + (a.q == (kAc(), dAc) && (BD(Ikb(a.a, j), 19).a > a.j || BD(Ikb(a.a, j - 1), 19).a > a.j) || a.q == gAc && (Edb(ED(Ikb(a.b, j))) > a.k || Edb(ED(Ikb(a.b, j - 1))) > a.k)) && (i3 = false); + for (g = new Sr(ur(R_b(b).a.Kc(), new Sq())); Qr(g); ) { + f2 = BD(Rr(g), 17); + h = f2.c.i; + if (a.f[h.p] == j) { + l = Cbc(a, h); + e = e + BD(l.a, 19).a; + i3 = i3 && Ccb(DD(l.b)); + } + } + a.f[b.p] = j; + e = e + a.c[b.p][0]; + return new vgd(meb(e), (Bcb(), i3 ? true : false)); + } + function sPc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + l = new Lqb(); + g = new Rkb(); + qPc(a, c2, a.d.fg(), g, l); + qPc(a, d, a.d.gg(), g, l); + a.b = 0.2 * (p = rPc(LAb(new YAb(null, new Kub(g, 16)), new xPc())), q = rPc(LAb(new YAb(null, new Kub(g, 16)), new zPc())), $wnd.Math.min(p, q)); + f2 = 0; + for (h = 0; h < g.c.length - 1; h++) { + i3 = (tCb(h, g.c.length), BD(g.c[h], 112)); + for (o2 = h + 1; o2 < g.c.length; o2++) { + f2 += pPc(a, i3, (tCb(o2, g.c.length), BD(g.c[o2], 112))); + } + } + m = BD(vNb(b, (wtc(), jtc)), 230); + f2 >= 2 && (r = WNc(g, true, m), !a.e && (a.e = new ZOc(a)), VOc(a.e, r, g, a.b), void 0); + uPc(g, m); + wPc(g); + n = -1; + for (k = new olb(g); k.a < k.c.c.length; ) { + j = BD(mlb(k), 112); + if ($wnd.Math.abs(j.s - j.c) < qme) { + continue; + } + n = $wnd.Math.max(n, j.o); + a.d.dg(j, e, a.c); + } + a.d.a.a.$b(); + return n + 1; + } + function aUb(a, b) { + var c2, d, e, f2, g; + c2 = Edb(ED(vNb(b, (Nyc(), lyc)))); + c2 < 2 && yNb(b, lyc, 2); + d = BD(vNb(b, Lwc), 103); + d == (ead(), cad) && yNb(b, Lwc, a_b(b)); + e = BD(vNb(b, fyc), 19); + e.a == 0 ? yNb(b, (wtc(), jtc), new Gub()) : yNb(b, (wtc(), jtc), new Hub(e.a)); + f2 = DD(vNb(b, Axc)); + f2 == null && yNb(b, Axc, (Bcb(), PD(vNb(b, Swc)) === PD((Aad(), wad)) ? true : false)); + MAb(new YAb(null, new Kub(b.a, 16)), new dUb(a)); + MAb(LAb(new YAb(null, new Kub(b.b, 16)), new fUb()), new hUb(a)); + g = new oBc(b); + yNb(b, (wtc(), otc), g); + H2c(a.a); + K2c(a.a, (qUb(), lUb), BD(vNb(b, Jwc), 246)); + K2c(a.a, mUb, BD(vNb(b, sxc), 246)); + K2c(a.a, nUb, BD(vNb(b, Iwc), 246)); + K2c(a.a, oUb, BD(vNb(b, Exc), 246)); + K2c(a.a, pUb, kNc(BD(vNb(b, Swc), 218))); + E2c(a.a, _Tb(b)); + yNb(b, itc, F2c(a.a, b)); + } + function fjc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + if (m = a.c[b], n = a.c[c2], (o2 = BD(vNb(m, (wtc(), Qsc)), 15), !!o2 && o2.gc() != 0 && o2.Hc(n)) || (p = m.k != (j0b(), g0b) && n.k != g0b, q = BD(vNb(m, Psc), 10), r = BD(vNb(n, Psc), 10), s = q != r, t = !!q && q != m || !!r && r != n, u = gjc(m, (Ucd(), Acd)), v = gjc(n, Rcd), t = t | (gjc(m, Rcd) || gjc(n, Acd)), w2 = t && s || u || v, p && w2) || m.k == (j0b(), i0b) && n.k == h0b || n.k == (j0b(), i0b) && m.k == h0b) { + return false; + } + k = a.c[b]; + f2 = a.c[c2]; + e = LHc(a.e, k, f2, (Ucd(), Tcd)); + i3 = LHc(a.i, k, f2, zcd); + Yic(a.f, k, f2); + j = Hic(a.b, k, f2) + BD(e.a, 19).a + BD(i3.a, 19).a + a.f.d; + h = Hic(a.b, f2, k) + BD(e.b, 19).a + BD(i3.b, 19).a + a.f.b; + if (a.a) { + l = BD(vNb(k, $sc), 11); + g = BD(vNb(f2, $sc), 11); + d = JHc(a.g, l, g); + j += BD(d.a, 19).a; + h += BD(d.b, 19).a; + } + return j > h; + } + function k6b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + c2 = BD(vNb(a, (Nyc(), Vxc)), 98); + g = a.f; + f2 = a.d; + h = g.a + f2.b + f2.c; + i3 = 0 - f2.d - a.c.b; + k = g.b + f2.d + f2.a - a.c.b; + j = new Rkb(); + l = new Rkb(); + for (e = new olb(b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + switch (c2.g) { + case 1: + case 2: + case 3: + a6b(d); + break; + case 4: + m = BD(vNb(d, Txc), 8); + n = !m ? 0 : m.a; + d.n.a = h * Edb(ED(vNb(d, (wtc(), htc)))) - n; + M_b(d, true, false); + break; + case 5: + o2 = BD(vNb(d, Txc), 8); + p = !o2 ? 0 : o2.a; + d.n.a = Edb(ED(vNb(d, (wtc(), htc)))) - p; + M_b(d, true, false); + g.a = $wnd.Math.max(g.a, d.n.a + d.o.a / 2); + } + switch (BD(vNb(d, (wtc(), Hsc)), 61).g) { + case 1: + d.n.b = i3; + j.c[j.c.length] = d; + break; + case 3: + d.n.b = k; + l.c[l.c.length] = d; + } + } + switch (c2.g) { + case 1: + case 2: + c6b(j, a); + c6b(l, a); + break; + case 3: + i6b(j, a); + i6b(l, a); + } + } + function VHc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l; + k = new Rkb(); + l = new jkb(); + f2 = null; + e = 0; + for (d = 0; d < b.length; ++d) { + c2 = b[d]; + XHc(f2, c2) && (e = QHc(a, l, k, EHc, e)); + wNb(c2, (wtc(), Psc)) && (f2 = BD(vNb(c2, Psc), 10)); + switch (c2.k.g) { + case 0: + for (i3 = Vq(Nq(V_b(c2, (Ucd(), Acd)), new GIc())); xc(i3); ) { + g = BD(yc(i3), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + e = QHc(a, l, k, EHc, e); + for (j = Vq(Nq(V_b(c2, Rcd), new GIc())); xc(j); ) { + g = BD(yc(j), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + break; + case 3: + if (!V_b(c2, DHc).dc()) { + g = BD(V_b(c2, DHc).Xb(0), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + V_b(c2, EHc).dc() || Wjb(l, c2); + break; + case 1: + for (h = V_b(c2, (Ucd(), Tcd)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + a.d[g.p] = e++; + k.c[k.c.length] = g; + } + V_b(c2, zcd).Jc(new EIc(l, c2)); + } + } + QHc(a, l, k, EHc, e); + return k; + } + function y$c(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s; + j = Pje; + k = Pje; + h = Qje; + i3 = Qje; + for (m = new olb(b.i); m.a < m.c.c.length; ) { + l = BD(mlb(m), 65); + e = BD(BD(Ohb(a.g, l.a), 46).b, 33); + bld(e, l.b.c, l.b.d); + j = $wnd.Math.min(j, e.i); + k = $wnd.Math.min(k, e.j); + h = $wnd.Math.max(h, e.i + e.g); + i3 = $wnd.Math.max(i3, e.j + e.f); + } + n = BD(hkd(a.c, (d0c(), W_c)), 116); + Afd(a.c, h - j + (n.b + n.c), i3 - k + (n.d + n.a), true, true); + Efd(a.c, -j + n.b, -k + n.d); + for (d = new Fyd(Wod(a.c)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 79); + g = itd(c2, true, true); + o2 = jtd(c2); + q = ltd(c2); + p = new f7c(o2.i + o2.g / 2, o2.j + o2.f / 2); + f2 = new f7c(q.i + q.g / 2, q.j + q.f / 2); + r = c7c(new f7c(f2.a, f2.b), p); + l6c(r, o2.g, o2.f); + P6c(p, r); + s = c7c(new f7c(p.a, p.b), f2); + l6c(s, q.g, q.f); + P6c(f2, s); + nmd(g, p.a, p.b); + gmd(g, f2.a, f2.b); + } + } + function EYb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + a.c = a.d; + o2 = DD(vNb(b, (Nyc(), gyc))); + n = o2 == null || (uCb(o2), o2); + f2 = BD(vNb(b, (wtc(), Ksc)), 21).Hc((Orc(), Hrc)); + e = BD(vNb(b, Vxc), 98); + c2 = !(e == (dcd(), Zbd) || e == _bd || e == $bd); + if (n && (c2 || !f2)) { + for (l = new olb(b.a); l.a < l.c.c.length; ) { + j = BD(mlb(l), 10); + j.p = 0; + } + m = new Rkb(); + for (k = new olb(b.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 10); + d = DYb(a, j, null); + if (d) { + i3 = new XZb(); + tNb(i3, b); + yNb(i3, Esc, BD(d.b, 21)); + u_b(i3.d, b.d); + yNb(i3, Hxc, null); + for (h = BD(d.a, 15).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + Ekb(i3.a, g); + g.a = i3; + } + m.Fc(i3); + } + } + f2 && (PD(vNb(b, twc)) === PD((RXb(), OXb)) ? a.c = a.b : a.c = a.a); + } else { + m = new amb(OC(GC(KQ, 1), cne, 37, 0, [b])); + } + PD(vNb(b, twc)) !== PD((RXb(), QXb)) && (mmb(), m.ad(new HYb())); + return m; + } + function KTc(a) { + r4c(a, new E3c(Q3c(L3c(P3c(M3c(O3c(N3c(new R3c(), are), "ELK Mr. Tree"), "Tree-based algorithm provided by the Eclipse Layout Kernel. Computes a spanning tree of the input graph and arranges all nodes according to the resulting parent-children hierarchy. I pity the fool who doesn't use Mr. Tree Layout."), new NTc()), bre), pqb((Csd(), wsd))))); + p4c(a, are, ame, CTc); + p4c(a, are, wme, 20); + p4c(a, are, _le, tme); + p4c(a, are, vme, meb(1)); + p4c(a, are, zme, (Bcb(), true)); + p4c(a, are, Zpe, Ksd(vTc)); + p4c(a, are, Fme, Ksd(xTc)); + p4c(a, are, Tme, Ksd(yTc)); + p4c(a, are, Eme, Ksd(zTc)); + p4c(a, are, Gme, Ksd(wTc)); + p4c(a, are, Dme, Ksd(ATc)); + p4c(a, are, Hme, Ksd(DTc)); + p4c(a, are, Zqe, Ksd(ITc)); + p4c(a, are, $qe, Ksd(FTc)); + } + function zod(a) { + if (a.q) + return; + a.q = true; + a.p = Lnd(a, 0); + a.a = Lnd(a, 1); + Qnd(a.a, 0); + a.f = Lnd(a, 2); + Qnd(a.f, 1); + Knd(a.f, 2); + a.n = Lnd(a, 3); + Knd(a.n, 3); + Knd(a.n, 4); + Knd(a.n, 5); + Knd(a.n, 6); + a.g = Lnd(a, 4); + Qnd(a.g, 7); + Knd(a.g, 8); + a.c = Lnd(a, 5); + Qnd(a.c, 7); + Qnd(a.c, 8); + a.i = Lnd(a, 6); + Qnd(a.i, 9); + Qnd(a.i, 10); + Qnd(a.i, 11); + Qnd(a.i, 12); + Knd(a.i, 13); + a.j = Lnd(a, 7); + Qnd(a.j, 9); + a.d = Lnd(a, 8); + Qnd(a.d, 3); + Qnd(a.d, 4); + Qnd(a.d, 5); + Qnd(a.d, 6); + Knd(a.d, 7); + Knd(a.d, 8); + Knd(a.d, 9); + Knd(a.d, 10); + a.b = Lnd(a, 9); + Knd(a.b, 0); + Knd(a.b, 1); + a.e = Lnd(a, 10); + Knd(a.e, 1); + Knd(a.e, 2); + Knd(a.e, 3); + Knd(a.e, 4); + Qnd(a.e, 5); + Qnd(a.e, 6); + Qnd(a.e, 7); + Qnd(a.e, 8); + Qnd(a.e, 9); + Qnd(a.e, 10); + Knd(a.e, 11); + a.k = Lnd(a, 11); + Knd(a.k, 0); + Knd(a.k, 1); + a.o = Mnd(a, 12); + a.s = Mnd(a, 13); + } + function AUb(a, b) { + b.dc() && HVb(a.j, true, true, true, true); + pb(b, (Ucd(), Gcd)) && HVb(a.j, true, true, true, false); + pb(b, Bcd) && HVb(a.j, false, true, true, true); + pb(b, Ocd) && HVb(a.j, true, true, false, true); + pb(b, Qcd) && HVb(a.j, true, false, true, true); + pb(b, Hcd) && HVb(a.j, false, true, true, false); + pb(b, Ccd) && HVb(a.j, false, true, false, true); + pb(b, Pcd) && HVb(a.j, true, false, false, true); + pb(b, Ncd) && HVb(a.j, true, false, true, false); + pb(b, Lcd) && HVb(a.j, true, true, true, true); + pb(b, Ecd) && HVb(a.j, true, true, true, true); + pb(b, Lcd) && HVb(a.j, true, true, true, true); + pb(b, Dcd) && HVb(a.j, true, true, true, true); + pb(b, Mcd) && HVb(a.j, true, true, true, true); + pb(b, Kcd) && HVb(a.j, true, true, true, true); + pb(b, Jcd) && HVb(a.j, true, true, true, true); + } + function rZb(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q; + f2 = new Rkb(); + for (j = new olb(d); j.a < j.c.c.length; ) { + h = BD(mlb(j), 441); + g = null; + if (h.f == (KAc(), IAc)) { + for (o2 = new olb(h.e); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 17); + q = n.d.i; + if (Q_b(q) == b) { + iZb(a, b, h, n, h.b, n.d); + } else if (!c2 || f_b(q, c2)) { + jZb(a, b, h, d, n); + } else { + m = oZb(a, b, c2, n, h.b, IAc, g); + m != g && (f2.c[f2.c.length] = m, true); + m.c && (g = m); + } + } + } else { + for (l = new olb(h.e); l.a < l.c.c.length; ) { + k = BD(mlb(l), 17); + p = k.c.i; + if (Q_b(p) == b) { + iZb(a, b, h, k, k.c, h.b); + } else if (!c2 || f_b(p, c2)) { + continue; + } else { + m = oZb(a, b, c2, k, h.b, HAc, g); + m != g && (f2.c[f2.c.length] = m, true); + m.c && (g = m); + } + } + } + } + for (i3 = new olb(f2); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 441); + Jkb(b.a, h.a, 0) != -1 || Ekb(b.a, h.a); + h.c && (e.c[e.c.length] = h, true); + } + } + function SJc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + j = new Rkb(); + for (i3 = new olb(b.a); i3.a < i3.c.c.length; ) { + g = BD(mlb(i3), 10); + for (m = V_b(g, (Ucd(), zcd)).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 11); + for (e = new olb(l.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (!OZb(d) && d.c.i.c == d.d.i.c || OZb(d) || d.d.i.c != c2) { + continue; + } + j.c[j.c.length] = d; + } + } + } + for (h = Su(c2.a).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + for (m = V_b(g, (Ucd(), Tcd)).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 11); + for (e = new olb(l.e); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (!OZb(d) && d.c.i.c == d.d.i.c || OZb(d) || d.c.i.c != b) { + continue; + } + k = new Bib(j, j.c.length); + f2 = (sCb(k.b > 0), BD(k.a.Xb(k.c = --k.b), 17)); + while (f2 != d && k.b > 0) { + a.a[f2.p] = true; + a.a[d.p] = true; + f2 = (sCb(k.b > 0), BD(k.a.Xb(k.c = --k.b), 17)); + } + k.b > 0 && uib(k); + } + } + } + } + function Vmd(b, c2, d) { + var e, f2, g, h, i3, j, k, l, m; + if (b.a != c2.Aj()) { + throw vbb(new Wdb(tte + c2.ne() + ute)); + } + e = o1d((O6d(), M6d), c2).$k(); + if (e) { + return e.Aj().Nh().Ih(e, d); + } + h = o1d(M6d, c2).al(); + if (h) { + if (d == null) { + return null; + } + i3 = BD(d, 15); + if (i3.dc()) { + return ""; + } + m = new Hfb(); + for (g = i3.Kc(); g.Ob(); ) { + f2 = g.Pb(); + Efb(m, h.Aj().Nh().Ih(h, f2)); + m.a += " "; + } + return lcb(m, m.a.length - 1); + } + l = o1d(M6d, c2).bl(); + if (!l.dc()) { + for (k = l.Kc(); k.Ob(); ) { + j = BD(k.Pb(), 148); + if (j.wj(d)) { + try { + m = j.Aj().Nh().Ih(j, d); + if (m != null) { + return m; + } + } catch (a) { + a = ubb(a); + if (!JD(a, 102)) + throw vbb(a); + } + } + } + throw vbb(new Wdb("Invalid value: '" + d + "' for datatype :" + c2.ne())); + } + BD(c2, 834).Fj(); + return d == null ? null : JD(d, 172) ? "" + BD(d, 172).a : rb(d) == $J ? CQd(Pmd[0], BD(d, 199)) : fcb(d); + } + function zQc(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + j = new Psb(); + h = new Psb(); + for (f2 = new olb(a); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 128); + d.v = 0; + d.n = d.i.c.length; + d.u = d.t.c.length; + d.n == 0 && (Gsb(j, d, j.c.b, j.c), true); + d.u == 0 && d.r.a.gc() == 0 && (Gsb(h, d, h.c.b, h.c), true); + } + g = -1; + while (j.b != 0) { + d = BD(Vt(j, 0), 128); + for (c2 = new olb(d.t); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 268); + k = b.b; + k.v = $wnd.Math.max(k.v, d.v + 1); + g = $wnd.Math.max(g, k.v); + --k.n; + k.n == 0 && (Gsb(j, k, j.c.b, j.c), true); + } + } + if (g > -1) { + for (e = Jsb(h, 0); e.b != e.d.c; ) { + d = BD(Xsb(e), 128); + d.v = g; + } + while (h.b != 0) { + d = BD(Vt(h, 0), 128); + for (c2 = new olb(d.i); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 268); + i3 = b.a; + if (i3.r.a.gc() != 0) { + continue; + } + i3.v = $wnd.Math.min(i3.v, d.v - 1); + --i3.u; + i3.u == 0 && (Gsb(h, i3, h.c.b, h.c), true); + } + } + } + } + function A6c(a, b, c2, d, e) { + var f2, g, h, i3; + i3 = Pje; + g = false; + h = v6c(a, c7c(new f7c(b.a, b.b), a), P6c(new f7c(c2.a, c2.b), e), c7c(new f7c(d.a, d.b), c2)); + f2 = !!h && !($wnd.Math.abs(h.a - a.a) <= nse && $wnd.Math.abs(h.b - a.b) <= nse || $wnd.Math.abs(h.a - b.a) <= nse && $wnd.Math.abs(h.b - b.b) <= nse); + h = v6c(a, c7c(new f7c(b.a, b.b), a), c2, e); + !!h && (($wnd.Math.abs(h.a - a.a) <= nse && $wnd.Math.abs(h.b - a.b) <= nse) == ($wnd.Math.abs(h.a - b.a) <= nse && $wnd.Math.abs(h.b - b.b) <= nse) || f2 ? i3 = $wnd.Math.min(i3, U6c(c7c(h, c2))) : g = true); + h = v6c(a, c7c(new f7c(b.a, b.b), a), d, e); + !!h && (g || ($wnd.Math.abs(h.a - a.a) <= nse && $wnd.Math.abs(h.b - a.b) <= nse) == ($wnd.Math.abs(h.a - b.a) <= nse && $wnd.Math.abs(h.b - b.b) <= nse) || f2) && (i3 = $wnd.Math.min(i3, U6c(c7c(h, d)))); + return i3; + } + function cTb(a) { + r4c(a, new E3c(L3c(P3c(M3c(O3c(N3c(new R3c(), Rme), Sme), "Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."), new fTb()), ume))); + p4c(a, Rme, Ame, Ksd(VSb)); + p4c(a, Rme, Cme, (Bcb(), true)); + p4c(a, Rme, Fme, Ksd(YSb)); + p4c(a, Rme, Tme, Ksd(ZSb)); + p4c(a, Rme, Eme, Ksd($Sb)); + p4c(a, Rme, Gme, Ksd(XSb)); + p4c(a, Rme, Dme, Ksd(_Sb)); + p4c(a, Rme, Hme, Ksd(aTb)); + p4c(a, Rme, Mme, Ksd(USb)); + p4c(a, Rme, Ome, Ksd(SSb)); + p4c(a, Rme, Pme, Ksd(TSb)); + p4c(a, Rme, Qme, Ksd(WSb)); + p4c(a, Rme, Nme, Ksd(RSb)); + } + function BFc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + Odd(b, "Interactive crossing minimization", 1); + g = 0; + for (f2 = new olb(a.b); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 29); + d.p = g++; + } + m = WZb(a); + q = new iHc(m.length); + $Ic(new amb(OC(GC(qY, 1), Uhe, 225, 0, [q])), m); + p = 0; + g = 0; + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + c2 = 0; + l = 0; + for (k = new olb(d.a); k.a < k.c.c.length; ) { + i3 = BD(mlb(k), 10); + if (i3.n.a > 0) { + c2 += i3.n.a + i3.o.a / 2; + ++l; + } + for (o2 = new olb(i3.j); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + n.p = p++; + } + } + l > 0 && (c2 /= l); + r = KC(UD, Vje, 25, d.a.c.length, 15, 1); + h = 0; + for (j = new olb(d.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + i3.p = h++; + r[i3.p] = AFc(i3, c2); + i3.k == (j0b(), g0b) && yNb(i3, (wtc(), atc), r[i3.p]); + } + mmb(); + Okb(d.a, new GFc(r)); + YDc(q, m, g, true); + ++g; + } + Qdd(b); + } + function Zfe(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + if (b.e == 5) { + Wfe(a, b); + return; + } + j = b; + if (j.b == null || a.b == null) + return; + Yfe(a); + Vfe(a); + Yfe(j); + Vfe(j); + c2 = KC(WD, oje, 25, a.b.length + j.b.length, 15, 1); + k = 0; + d = 0; + g = 0; + while (d < a.b.length && g < j.b.length) { + e = a.b[d]; + f2 = a.b[d + 1]; + h = j.b[g]; + i3 = j.b[g + 1]; + if (f2 < h) { + c2[k++] = a.b[d++]; + c2[k++] = a.b[d++]; + } else if (f2 >= h && e <= i3) { + if (h <= e && f2 <= i3) { + d += 2; + } else if (h <= e) { + a.b[d] = i3 + 1; + g += 2; + } else if (f2 <= i3) { + c2[k++] = e; + c2[k++] = h - 1; + d += 2; + } else { + c2[k++] = e; + c2[k++] = h - 1; + a.b[d] = i3 + 1; + g += 2; + } + } else if (i3 < e) { + g += 2; + } else { + throw vbb(new hz("Token#subtractRanges(): Internal Error: [" + a.b[d] + "," + a.b[d + 1] + "] - [" + j.b[g] + "," + j.b[g + 1] + "]")); + } + } + while (d < a.b.length) { + c2[k++] = a.b[d++]; + c2[k++] = a.b[d++]; + } + a.b = KC(WD, oje, 25, k, 15, 1); + $fb(c2, 0, a.b, 0, k); + } + function BJb(a) { + var b, c2, d, e, f2, g, h; + if (a.A.dc()) { + return; + } + if (a.A.Hc((tdd(), rdd))) { + BD(Mpb(a.b, (Ucd(), Acd)), 124).k = true; + BD(Mpb(a.b, Rcd), 124).k = true; + b = a.q != (dcd(), _bd) && a.q != $bd; + ZGb(BD(Mpb(a.b, zcd), 124), b); + ZGb(BD(Mpb(a.b, Tcd), 124), b); + ZGb(a.g, b); + if (a.A.Hc(sdd)) { + BD(Mpb(a.b, Acd), 124).j = true; + BD(Mpb(a.b, Rcd), 124).j = true; + BD(Mpb(a.b, zcd), 124).k = true; + BD(Mpb(a.b, Tcd), 124).k = true; + a.g.k = true; + } + } + if (a.A.Hc(qdd)) { + a.a.j = true; + a.a.k = true; + a.g.j = true; + a.g.k = true; + h = a.B.Hc((Idd(), Edd)); + for (e = wJb(), f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + c2 = BD(Mpb(a.i, d), 306); + if (c2) { + if (sJb(d)) { + c2.j = true; + c2.k = true; + } else { + c2.j = !h; + c2.k = !h; + } + } + } + } + if (a.A.Hc(pdd) && a.B.Hc((Idd(), Ddd))) { + a.g.j = true; + a.g.j = true; + if (!a.a.j) { + a.a.j = true; + a.a.k = true; + a.a.e = true; + } + } + } + function GJc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + for (d = new olb(a.e.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + for (f2 = new olb(c2.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + n = a.i[e.p]; + j = n.a.e; + i3 = n.d.e; + e.n.b = j; + r = i3 - j - e.o.b; + b = bKc(e); + m = (Izc(), (!e.q ? (mmb(), mmb(), kmb) : e.q)._b((Nyc(), Cxc)) ? l = BD(vNb(e, Cxc), 197) : l = BD(vNb(Q_b(e), Dxc), 197), l); + b && (m == Fzc || m == Ezc) && (e.o.b += r); + if (b && (m == Hzc || m == Fzc || m == Ezc)) { + for (p = new olb(e.j); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 11); + if ((Ucd(), Ecd).Hc(o2.j)) { + k = BD(Ohb(a.k, o2), 121); + o2.n.b = k.e - j; + } + } + for (h = new olb(e.b); h.a < h.c.c.length; ) { + g = BD(mlb(h), 70); + q = BD(vNb(e, xxc), 21); + q.Hc((Hbd(), Ebd)) ? g.n.b += r : q.Hc(Fbd) && (g.n.b += r / 2); + } + (m == Fzc || m == Ezc) && V_b(e, (Ucd(), Rcd)).Jc(new $Kc(r)); + } + } + } + } + function Lwb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + if (!a.b) { + return false; + } + g = null; + m = null; + i3 = new exb(null, null); + e = 1; + i3.a[1] = a.b; + l = i3; + while (l.a[e]) { + j = e; + h = m; + m = l; + l = l.a[e]; + d = a.a.ue(b, l.d); + e = d < 0 ? 0 : 1; + d == 0 && (!c2.c || wtb(l.e, c2.d)) && (g = l); + if (!(!!l && l.b) && !Hwb(l.a[e])) { + if (Hwb(l.a[1 - e])) { + m = m.a[j] = Owb(l, e); + } else if (!Hwb(l.a[1 - e])) { + n = m.a[1 - j]; + if (n) { + if (!Hwb(n.a[1 - j]) && !Hwb(n.a[j])) { + m.b = false; + n.b = true; + l.b = true; + } else { + f2 = h.a[1] == m ? 1 : 0; + Hwb(n.a[j]) ? h.a[f2] = Nwb(m, j) : Hwb(n.a[1 - j]) && (h.a[f2] = Owb(m, j)); + l.b = h.a[f2].b = true; + h.a[f2].a[0].b = false; + h.a[f2].a[1].b = false; + } + } + } + } + } + if (g) { + c2.b = true; + c2.d = g.e; + if (l != g) { + k = new exb(l.d, l.e); + Mwb(a, i3, g, k); + m == g && (m = k); + } + m.a[m.a[1] == l ? 1 : 0] = l.a[!l.a[0] ? 1 : 0]; + --a.c; + } + a.b = i3.a[1]; + !!a.b && (a.b.b = false); + return c2.b; + } + function cic(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + for (e = new olb(a.a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + for (i3 = d.c.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 57); + if (d.a == h.a) { + continue; + } + fad(a.a.d) ? l = a.a.g.Oe(d, h) : l = a.a.g.Pe(d, h); + f2 = d.b.a + d.d.b + l - h.b.a; + f2 = $wnd.Math.ceil(f2); + f2 = $wnd.Math.max(0, f2); + if (vgc(d, h)) { + g = nGb(new pGb(), a.d); + j = QD($wnd.Math.ceil(h.b.a - d.b.a)); + b = j - (h.b.a - d.b.a); + k = ugc(d).a; + c2 = d; + if (!k) { + k = ugc(h).a; + b = -b; + c2 = h; + } + if (k) { + c2.b.a -= b; + k.n.a -= b; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), $wnd.Math.max(0, j)), 1), g), a.c[d.a.d])); + AFb(DFb(CFb(EFb(BFb(new FFb(), $wnd.Math.max(0, -j)), 1), g), a.c[h.a.d])); + } else { + m = 1; + (JD(d.g, 145) && JD(h.g, 10) || JD(h.g, 145) && JD(d.g, 10)) && (m = 2); + AFb(DFb(CFb(EFb(BFb(new FFb(), QD(f2)), m), a.c[d.a.d]), a.c[h.a.d])); + } + } + } + } + function pEc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + if (c2) { + d = -1; + k = new Bib(b, 0); + while (k.b < k.d.gc()) { + h = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 10)); + l = a.c[h.c.p][h.p].a; + if (l == null) { + g = d + 1; + f2 = new Bib(b, k.b); + while (f2.b < f2.d.gc()) { + m = tEc(a, (sCb(f2.b < f2.d.gc()), BD(f2.d.Xb(f2.c = f2.b++), 10))).a; + if (m != null) { + g = (uCb(m), m); + break; + } + } + l = (d + g) / 2; + a.c[h.c.p][h.p].a = l; + a.c[h.c.p][h.p].d = (uCb(l), l); + a.c[h.c.p][h.p].b = 1; + } + d = (uCb(l), l); + } + } else { + e = 0; + for (j = new olb(b); j.a < j.c.c.length; ) { + h = BD(mlb(j), 10); + a.c[h.c.p][h.p].a != null && (e = $wnd.Math.max(e, Edb(a.c[h.c.p][h.p].a))); + } + e += 2; + for (i3 = new olb(b); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + if (a.c[h.c.p][h.p].a == null) { + l = Cub(a.i, 24) * lke * e - 1; + a.c[h.c.p][h.p].a = l; + a.c[h.c.p][h.p].d = l; + a.c[h.c.p][h.p].b = 1; + } + } + } + } + function CZd() { + rEd(b5, new i$d()); + rEd(a5, new P$d()); + rEd(c5, new u_d()); + rEd(d5, new M_d()); + rEd(f5, new P_d()); + rEd(h5, new S_d()); + rEd(g5, new V_d()); + rEd(i5, new Y_d()); + rEd(k5, new GZd()); + rEd(l5, new JZd()); + rEd(m5, new MZd()); + rEd(n5, new PZd()); + rEd(o5, new SZd()); + rEd(p5, new VZd()); + rEd(q5, new YZd()); + rEd(t5, new _Zd()); + rEd(v52, new c$d()); + rEd(x6, new f$d()); + rEd(j5, new l$d()); + rEd(u5, new o$d()); + rEd(wI, new r$d()); + rEd(GC(SD, 1), new u$d()); + rEd(xI, new x$d()); + rEd(yI, new A$d()); + rEd($J, new D$d()); + rEd(O4, new G$d()); + rEd(BI, new J$d()); + rEd(T4, new M$d()); + rEd(U4, new S$d()); + rEd(O9, new V$d()); + rEd(E9, new Y$d()); + rEd(FI, new _$d()); + rEd(JI, new c_d()); + rEd(AI, new f_d()); + rEd(MI, new i_d()); + rEd(DK, new l_d()); + rEd(v8, new o_d()); + rEd(u8, new r_d()); + rEd(UI, new x_d()); + rEd(ZI, new A_d()); + rEd(X4, new D_d()); + rEd(V4, new G_d()); + } + function hA(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + !c2 && (c2 = TA(b.q.getTimezoneOffset())); + e = (b.q.getTimezoneOffset() - c2.a) * 6e4; + h = new gB(wbb(Cbb(b.q.getTime()), e)); + i3 = h; + if (h.q.getTimezoneOffset() != b.q.getTimezoneOffset()) { + e > 0 ? e -= 864e5 : e += 864e5; + i3 = new gB(wbb(Cbb(b.q.getTime()), e)); + } + k = new Vfb(); + j = a.a.length; + for (f2 = 0; f2 < j; ) { + d = bfb(a.a, f2); + if (d >= 97 && d <= 122 || d >= 65 && d <= 90) { + for (g = f2 + 1; g < j && bfb(a.a, g) == d; ++g) + ; + vA(k, d, g - f2, h, i3, c2); + f2 = g; + } else if (d == 39) { + ++f2; + if (f2 < j && bfb(a.a, f2) == 39) { + k.a += "'"; + ++f2; + continue; + } + l = false; + while (!l) { + g = f2; + while (g < j && bfb(a.a, g) != 39) { + ++g; + } + if (g >= j) { + throw vbb(new Wdb("Missing trailing '")); + } + g + 1 < j && bfb(a.a, g + 1) == 39 ? ++g : l = true; + Qfb(k, qfb(a.a, f2, g)); + f2 = g + 1; + } + } else { + k.a += String.fromCharCode(d); + ++f2; + } + } + return k.a; + } + function MEc(a) { + var b, c2, d, e, f2, g, h, i3; + b = null; + for (d = new olb(a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 233); + Edb(REc(c2.g, c2.d[0]).a); + c2.b = null; + if (!!c2.e && c2.e.gc() > 0 && c2.c == 0) { + !b && (b = new Rkb()); + b.c[b.c.length] = c2; + } + } + if (b) { + while (b.c.length != 0) { + c2 = BD(Kkb(b, 0), 233); + if (!!c2.b && c2.b.c.length > 0) { + for (f2 = (!c2.b && (c2.b = new Rkb()), new olb(c2.b)); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 233); + if (Gdb(REc(e.g, e.d[0]).a) == Gdb(REc(c2.g, c2.d[0]).a)) { + if (Jkb(a, e, 0) > Jkb(a, c2, 0)) { + return new vgd(e, c2); + } + } else if (Edb(REc(e.g, e.d[0]).a) > Edb(REc(c2.g, c2.d[0]).a)) { + return new vgd(e, c2); + } + } + } + for (h = (!c2.e && (c2.e = new Rkb()), c2.e).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 233); + i3 = (!g.b && (g.b = new Rkb()), g.b); + wCb(0, i3.c.length); + aCb(i3.c, 0, c2); + g.c == i3.c.length && (b.c[b.c.length] = g, true); + } + } + } + return null; + } + function wlb(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + if (a == null) { + return Xhe; + } + i3 = b.a.zc(a, b); + if (i3 != null) { + return "[...]"; + } + c2 = new xwb(She, "[", "]"); + for (e = a, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + if (d != null && (rb(d).i & 4) != 0) { + if (Array.isArray(d) && (k = HC(d), !(k >= 14 && k <= 16))) { + if (b.a._b(d)) { + !c2.a ? c2.a = new Wfb(c2.d) : Qfb(c2.a, c2.b); + Nfb(c2.a, "[...]"); + } else { + h = CD(d); + j = new Vqb(b); + uwb(c2, wlb(h, j)); + } + } else + JD(d, 177) ? uwb(c2, Xlb(BD(d, 177))) : JD(d, 190) ? uwb(c2, Qlb(BD(d, 190))) : JD(d, 195) ? uwb(c2, Rlb(BD(d, 195))) : JD(d, 2012) ? uwb(c2, Wlb(BD(d, 2012))) : JD(d, 48) ? uwb(c2, Ulb(BD(d, 48))) : JD(d, 364) ? uwb(c2, Vlb(BD(d, 364))) : JD(d, 832) ? uwb(c2, Tlb(BD(d, 832))) : JD(d, 104) && uwb(c2, Slb(BD(d, 104))); + } else { + uwb(c2, d == null ? Xhe : fcb(d)); + } + } + return !c2.a ? c2.c : c2.e.length == 0 ? c2.a.a : c2.a.a + ("" + c2.e); + } + function xQb(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + h = itd(b, false, false); + r = ofd(h); + d && (r = w7c(r)); + t = Edb(ED(hkd(b, (CPb(), vPb)))); + q = (sCb(r.b != 0), BD(r.a.a.c, 8)); + l = BD(Ut(r, 1), 8); + if (r.b > 2) { + k = new Rkb(); + Gkb(k, new Jib(r, 1, r.b)); + f2 = sQb(k, t + a.a); + s = new XOb(f2); + tNb(s, b); + c2.c[c2.c.length] = s; + } else { + d ? s = BD(Ohb(a.b, jtd(b)), 266) : s = BD(Ohb(a.b, ltd(b)), 266); + } + i3 = jtd(b); + d && (i3 = ltd(b)); + g = zQb(q, i3); + j = t + a.a; + if (g.a) { + j += $wnd.Math.abs(q.b - l.b); + p = new f7c(l.a, (l.b + q.b) / 2); + } else { + j += $wnd.Math.abs(q.a - l.a); + p = new f7c((l.a + q.a) / 2, l.b); + } + d ? Rhb(a.d, b, new ZOb(s, g, p, j)) : Rhb(a.c, b, new ZOb(s, g, p, j)); + Rhb(a.b, b, s); + o2 = (!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n); + for (n = new Fyd(o2); n.e != n.i.gc(); ) { + m = BD(Dyd(n), 137); + e = wQb(a, m, true, 0, 0); + c2.c[c2.c.length] = e; + } + } + function wPc(a) { + var b, c2, d, e, f2, g, h, i3, j, k; + j = new Rkb(); + h = new Rkb(); + for (g = new olb(a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 112); + pOc(e, e.f.c.length); + qOc(e, e.k.c.length); + e.d == 0 && (j.c[j.c.length] = e, true); + e.i == 0 && e.e.b == 0 && (h.c[h.c.length] = e, true); + } + d = -1; + while (j.c.length != 0) { + e = BD(Kkb(j, 0), 112); + for (c2 = new olb(e.k); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 129); + k = b.b; + rOc(k, $wnd.Math.max(k.o, e.o + 1)); + d = $wnd.Math.max(d, k.o); + pOc(k, k.d - 1); + k.d == 0 && (j.c[j.c.length] = k, true); + } + } + if (d > -1) { + for (f2 = new olb(h); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 112); + e.o = d; + } + while (h.c.length != 0) { + e = BD(Kkb(h, 0), 112); + for (c2 = new olb(e.f); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 129); + i3 = b.a; + if (i3.e.b > 0) { + continue; + } + rOc(i3, $wnd.Math.min(i3.o, e.o - 1)); + qOc(i3, i3.i - 1); + i3.i == 0 && (h.c[h.c.length] = i3, true); + } + } + } + } + function QQd(a, b, c2) { + var d, e, f2, g, h, i3, j; + j = a.c; + !b && (b = FQd); + a.c = b; + if ((a.Db & 4) != 0 && (a.Db & 1) == 0) { + i3 = new nSd(a, 1, 2, j, a.c); + !c2 ? c2 = i3 : c2.Ei(i3); + } + if (j != b) { + if (JD(a.Cb, 284)) { + if (a.Db >> 16 == -10) { + c2 = BD(a.Cb, 284).nk(b, c2); + } else if (a.Db >> 16 == -15) { + !b && (b = (jGd(), YFd)); + !j && (j = (jGd(), YFd)); + if (a.Cb.nh()) { + i3 = new pSd(a.Cb, 1, 13, j, b, HLd(QSd(BD(a.Cb, 59)), a), false); + !c2 ? c2 = i3 : c2.Ei(i3); + } + } + } else if (JD(a.Cb, 88)) { + if (a.Db >> 16 == -23) { + JD(b, 88) || (b = (jGd(), _Fd)); + JD(j, 88) || (j = (jGd(), _Fd)); + if (a.Cb.nh()) { + i3 = new pSd(a.Cb, 1, 10, j, b, HLd(VKd(BD(a.Cb, 26)), a), false); + !c2 ? c2 = i3 : c2.Ei(i3); + } + } + } else if (JD(a.Cb, 444)) { + h = BD(a.Cb, 836); + g = (!h.b && (h.b = new RYd(new NYd())), h.b); + for (f2 = (d = new nib(new eib(g.a).a), new ZYd(d)); f2.a.b; ) { + e = BD(lib(f2.a).cd(), 87); + c2 = QQd(e, MQd(e, h), c2); + } + } + } + return c2; + } + function O1b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + g = Ccb(DD(hkd(a, (Nyc(), fxc)))); + m = BD(hkd(a, Yxc), 21); + i3 = false; + j = false; + l = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); + while (l.e != l.i.gc() && (!i3 || !j)) { + f2 = BD(Dyd(l), 118); + h = 0; + for (e = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!f2.d && (f2.d = new y5d(B2, f2, 8, 5)), f2.d), (!f2.e && (f2.e = new y5d(B2, f2, 7, 4)), f2.e)]))); Qr(e); ) { + d = BD(Rr(e), 79); + k = g && Qld(d) && Ccb(DD(hkd(d, gxc))); + c2 = ELd((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b), f2) ? a == Xod(atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))) : a == Xod(atd(BD(qud((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b), 0), 82))); + if (k || c2) { + ++h; + if (h > 1) { + break; + } + } + } + h > 0 ? i3 = true : m.Hc((rcd(), ncd)) && (!f2.n && (f2.n = new cUd(D2, f2, 1, 7)), f2.n).i > 0 && (i3 = true); + h > 1 && (j = true); + } + i3 && b.Fc((Orc(), Hrc)); + j && b.Fc((Orc(), Irc)); + } + function zfd(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + m = BD(hkd(a, (Y9c(), Y8c)), 21); + if (m.dc()) { + return null; + } + h = 0; + g = 0; + if (m.Hc((tdd(), rdd))) { + k = BD(hkd(a, t9c), 98); + d = 2; + c2 = 2; + e = 2; + f2 = 2; + b = !Xod(a) ? BD(hkd(a, z8c), 103) : BD(hkd(Xod(a), z8c), 103); + for (j = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); j.e != j.i.gc(); ) { + i3 = BD(Dyd(j), 118); + l = BD(hkd(i3, A9c), 61); + if (l == (Ucd(), Scd)) { + l = lfd(i3, b); + jkd(i3, A9c, l); + } + if (k == (dcd(), $bd)) { + switch (l.g) { + case 1: + d = $wnd.Math.max(d, i3.i + i3.g); + break; + case 2: + c2 = $wnd.Math.max(c2, i3.j + i3.f); + break; + case 3: + e = $wnd.Math.max(e, i3.i + i3.g); + break; + case 4: + f2 = $wnd.Math.max(f2, i3.j + i3.f); + } + } else { + switch (l.g) { + case 1: + d += i3.g + 2; + break; + case 2: + c2 += i3.f + 2; + break; + case 3: + e += i3.g + 2; + break; + case 4: + f2 += i3.f + 2; + } + } + } + h = $wnd.Math.max(d, e); + g = $wnd.Math.max(c2, f2); + } + return Afd(a, h, g, true, true); + } + function lnc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + s = BD(GAb(VAb(JAb(new YAb(null, new Kub(b.d, 16)), new pnc(c2)), new rnc(c2)), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)]))), 15); + l = Ohe; + k = Rie; + for (i3 = new olb(b.b.j); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 11); + if (h.j == c2) { + l = $wnd.Math.min(l, h.p); + k = $wnd.Math.max(k, h.p); + } + } + if (l == Ohe) { + for (g = 0; g < s.gc(); g++) { + ojc(BD(s.Xb(g), 101), c2, g); + } + } else { + t = KC(WD, oje, 25, e.length, 15, 1); + Elb(t, t.length); + for (r = s.Kc(); r.Ob(); ) { + q = BD(r.Pb(), 101); + f2 = BD(Ohb(a.b, q), 177); + j = 0; + for (p = l; p <= k; p++) { + f2[p] && (j = $wnd.Math.max(j, d[p])); + } + if (q.i) { + n = q.i.c; + u = new Tqb(); + for (m = 0; m < e.length; m++) { + e[n][m] && Qqb(u, meb(t[m])); + } + while (Rqb(u, meb(j))) { + ++j; + } + } + ojc(q, c2, j); + for (o2 = l; o2 <= k; o2++) { + f2[o2] && (d[o2] = j + 1); + } + !!q.i && (t[q.i.c] = j); + } + } + } + function YJc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + e = null; + for (d = new olb(b.a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + bKc(c2) ? f2 = (h = nGb(oGb(new pGb(), c2), a.f), i3 = nGb(oGb(new pGb(), c2), a.f), j = new rKc(c2, true, h, i3), k = c2.o.b, l = (Izc(), (!c2.q ? (mmb(), mmb(), kmb) : c2.q)._b((Nyc(), Cxc)) ? m = BD(vNb(c2, Cxc), 197) : m = BD(vNb(Q_b(c2), Dxc), 197), m), n = 1e4, l == Ezc && (n = 1), o2 = AFb(DFb(CFb(BFb(EFb(new FFb(), n), QD($wnd.Math.ceil(k))), h), i3)), l == Fzc && Qqb(a.d, o2), ZJc(a, Su(V_b(c2, (Ucd(), Tcd))), j), ZJc(a, V_b(c2, zcd), j), j) : f2 = (p = nGb(oGb(new pGb(), c2), a.f), MAb(JAb(new YAb(null, new Kub(c2.j, 16)), new EKc()), new GKc(a, p)), new rKc(c2, false, p, p)); + a.i[c2.p] = f2; + if (e) { + g = e.c.d.a + jBc(a.n, e.c, c2) + c2.d.d; + e.b || (g += e.c.o.b); + AFb(DFb(CFb(EFb(BFb(new FFb(), QD($wnd.Math.ceil(g))), 0), e.d), f2.a)); + } + e = f2; + } + } + function s9b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + Odd(b, "Label dummy insertions", 1); + l = new Rkb(); + g = Edb(ED(vNb(a, (Nyc(), nyc)))); + j = Edb(ED(vNb(a, ryc))); + k = BD(vNb(a, Lwc), 103); + for (n = new olb(a.a); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + for (f2 = new Sr(ur(U_b(m).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + if (e.c.i != e.d.i && Lq(e.b, p9b)) { + p = t9b(e); + o2 = Pu(e.b.c.length); + c2 = r9b(a, e, p, o2); + l.c[l.c.length] = c2; + d = c2.o; + h = new Bib(e.b, 0); + while (h.b < h.d.gc()) { + i3 = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 70)); + if (PD(vNb(i3, Qwc)) === PD((qad(), nad))) { + if (k == (ead(), dad) || k == _9c) { + d.a += i3.o.a + j; + d.b = $wnd.Math.max(d.b, i3.o.b); + } else { + d.a = $wnd.Math.max(d.a, i3.o.a); + d.b += i3.o.b + j; + } + o2.c[o2.c.length] = i3; + uib(h); + } + } + if (k == (ead(), dad) || k == _9c) { + d.a -= j; + d.b += g + p; + } else { + d.b += g - j + p; + } + } + } + } + Gkb(a.a, l); + Qdd(b); + } + function eYb(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n; + f2 = new qYb(b); + l = _Xb(a, b, f2); + n = $wnd.Math.max(Edb(ED(vNb(b, (Nyc(), Zwc)))), 1); + for (k = new olb(l.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 46); + i3 = dYb(BD(j.a, 8), BD(j.b, 8), n); + o = true; + o = o & iYb(c2, new f7c(i3.c, i3.d)); + o = o & iYb(c2, O6c(new f7c(i3.c, i3.d), i3.b, 0)); + o = o & iYb(c2, O6c(new f7c(i3.c, i3.d), 0, i3.a)); + o & iYb(c2, O6c(new f7c(i3.c, i3.d), i3.b, i3.a)); + } + m = f2.d; + h = dYb(BD(l.b.a, 8), BD(l.b.b, 8), n); + if (m == (Ucd(), Tcd) || m == zcd) { + d.c[m.g] = $wnd.Math.min(d.c[m.g], h.d); + d.b[m.g] = $wnd.Math.max(d.b[m.g], h.d + h.a); + } else { + d.c[m.g] = $wnd.Math.min(d.c[m.g], h.c); + d.b[m.g] = $wnd.Math.max(d.b[m.g], h.c + h.b); + } + e = Qje; + g = f2.c.i.d; + switch (m.g) { + case 4: + e = g.c; + break; + case 2: + e = g.b; + break; + case 1: + e = g.a; + break; + case 3: + e = g.d; + } + d.a[m.g] = $wnd.Math.max(d.a[m.g], e); + return f2; + } + function eKd(b) { + var c2, d, e, f2; + d = b.D != null ? b.D : b.B; + c2 = hfb(d, wfb(91)); + if (c2 != -1) { + e = d.substr(0, c2); + f2 = new Hfb(); + do + f2.a += "["; + while ((c2 = gfb(d, 91, ++c2)) != -1); + if (dfb(e, Khe)) + f2.a += "Z"; + else if (dfb(e, Eve)) + f2.a += "B"; + else if (dfb(e, Fve)) + f2.a += "C"; + else if (dfb(e, Gve)) + f2.a += "D"; + else if (dfb(e, Hve)) + f2.a += "F"; + else if (dfb(e, Ive)) + f2.a += "I"; + else if (dfb(e, Jve)) + f2.a += "J"; + else if (dfb(e, Kve)) + f2.a += "S"; + else { + f2.a += "L"; + f2.a += "" + e; + f2.a += ";"; + } + try { + return null; + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } else if (hfb(d, wfb(46)) == -1) { + if (dfb(d, Khe)) + return sbb; + else if (dfb(d, Eve)) + return SD; + else if (dfb(d, Fve)) + return TD; + else if (dfb(d, Gve)) + return UD; + else if (dfb(d, Hve)) + return VD; + else if (dfb(d, Ive)) + return WD; + else if (dfb(d, Jve)) + return XD; + else if (dfb(d, Kve)) + return rbb; + } + return null; + } + function $1b(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + j = new b0b(c2); + tNb(j, b); + yNb(j, (wtc(), $sc), b); + j.o.a = b.g; + j.o.b = b.f; + j.n.a = b.i; + j.n.b = b.j; + Ekb(c2.a, j); + Rhb(a.a, b, j); + ((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i != 0 || Ccb(DD(hkd(b, (Nyc(), fxc))))) && yNb(j, wsc, (Bcb(), true)); + i3 = BD(vNb(c2, Ksc), 21); + k = BD(vNb(j, (Nyc(), Vxc)), 98); + k == (dcd(), ccd) ? yNb(j, Vxc, bcd) : k != bcd && i3.Fc((Orc(), Krc)); + d = BD(vNb(c2, Lwc), 103); + for (h = new Fyd((!b.c && (b.c = new cUd(F2, b, 9, 9)), b.c)); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 118); + Ccb(DD(hkd(g, Jxc))) || _1b(a, g, j, i3, d, k); + } + for (f2 = new Fyd((!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n)); f2.e != f2.i.gc(); ) { + e = BD(Dyd(f2), 137); + !Ccb(DD(hkd(e, Jxc))) && !!e.a && Ekb(j.b, Z1b(e)); + } + Ccb(DD(vNb(j, pwc))) && i3.Fc((Orc(), Frc)); + if (Ccb(DD(vNb(j, exc)))) { + i3.Fc((Orc(), Jrc)); + i3.Fc(Irc); + yNb(j, Vxc, bcd); + } + return j; + } + function F4b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D; + h = BD(Ohb(b.c, a), 459); + s = b.a.c; + i3 = b.a.c + b.a.b; + C = h.f; + D = h.a; + g = C < D; + p = new f7c(s, C); + t = new f7c(i3, D); + e = (s + i3) / 2; + q = new f7c(e, C); + u = new f7c(e, D); + f2 = G4b(a, C, D); + w2 = A0b(b.B); + A = new f7c(e, f2); + B = A0b(b.D); + c2 = j6c(OC(GC(m1, 1), nie, 8, 0, [w2, A, B])); + n = false; + r = b.B.i; + if (!!r && !!r.c && h.d) { + j = g && r.p < r.c.a.c.length - 1 || !g && r.p > 0; + if (j) { + if (j) { + m = r.p; + g ? ++m : --m; + l = BD(Ikb(r.c.a, m), 10); + d = I4b(l); + n = !(s6c(d, w2, c2[0]) || n6c(d, w2, c2[0])); + } + } else { + n = true; + } + } + o2 = false; + v = b.D.i; + if (!!v && !!v.c && h.e) { + k = g && v.p > 0 || !g && v.p < v.c.a.c.length - 1; + if (k) { + m = v.p; + g ? --m : ++m; + l = BD(Ikb(v.c.a, m), 10); + d = I4b(l); + o2 = !(s6c(d, c2[0], B) || n6c(d, c2[0], B)); + } else { + o2 = true; + } + } + n && o2 && Dsb(a.a, A); + n || n7c(a.a, OC(GC(m1, 1), nie, 8, 0, [p, q])); + o2 || n7c(a.a, OC(GC(m1, 1), nie, 8, 0, [u, t])); + } + function yfd(a, b) { + var c2, d, e, f2, g, h, i3, j; + if (JD(a.Ug(), 160)) { + yfd(BD(a.Ug(), 160), b); + b.a += " > "; + } else { + b.a += "Root "; + } + c2 = a.Tg().zb; + dfb(c2.substr(0, 3), "Elk") ? Qfb(b, c2.substr(3)) : (b.a += "" + c2, b); + e = a.zg(); + if (e) { + Qfb((b.a += " ", b), e); + return; + } + if (JD(a, 354)) { + j = BD(a, 137).a; + if (j) { + Qfb((b.a += " ", b), j); + return; + } + } + for (g = new Fyd(a.Ag()); g.e != g.i.gc(); ) { + f2 = BD(Dyd(g), 137); + j = f2.a; + if (j) { + Qfb((b.a += " ", b), j); + return; + } + } + if (JD(a, 352)) { + d = BD(a, 79); + !d.b && (d.b = new y5d(z2, d, 4, 7)); + if (d.b.i != 0 && (!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c.i != 0)) { + b.a += " ("; + h = new Oyd((!d.b && (d.b = new y5d(z2, d, 4, 7)), d.b)); + while (h.e != h.i.gc()) { + h.e > 0 && (b.a += She, b); + yfd(BD(Dyd(h), 160), b); + } + b.a += gne; + i3 = new Oyd((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c)); + while (i3.e != i3.i.gc()) { + i3.e > 0 && (b.a += She, b); + yfd(BD(Dyd(i3), 160), b); + } + b.a += ")"; + } + } + } + function y2b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + f2 = BD(vNb(a, (wtc(), $sc)), 79); + if (!f2) { + return; + } + d = a.a; + e = new g7c(c2); + P6c(e, C2b(a)); + if (f_b(a.d.i, a.c.i)) { + m = a.c; + l = l7c(OC(GC(m1, 1), nie, 8, 0, [m.n, m.a])); + c7c(l, c2); + } else { + l = A0b(a.c); + } + Gsb(d, l, d.a, d.a.a); + n = A0b(a.d); + vNb(a, utc) != null && P6c(n, BD(vNb(a, utc), 8)); + Gsb(d, n, d.c.b, d.c); + q7c(d, e); + g = itd(f2, true, true); + kmd(g, BD(qud((!f2.b && (f2.b = new y5d(z2, f2, 4, 7)), f2.b), 0), 82)); + lmd(g, BD(qud((!f2.c && (f2.c = new y5d(z2, f2, 5, 8)), f2.c), 0), 82)); + ifd(d, g); + for (k = new olb(a.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 70); + h = BD(vNb(j, $sc), 137); + cld(h, j.o.a); + ald(h, j.o.b); + bld(h, j.n.a + e.a, j.n.b + e.b); + jkd(h, (I9b(), H9b), DD(vNb(j, H9b))); + } + i3 = BD(vNb(a, (Nyc(), jxc)), 74); + if (i3) { + q7c(i3, e); + jkd(f2, jxc, i3); + } else { + jkd(f2, jxc, null); + } + b == (Aad(), yad) ? jkd(f2, Swc, yad) : jkd(f2, Swc, null); + } + function mJc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s; + n = b.c.length; + m = 0; + for (l = new olb(a.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 29); + r = k.a; + if (r.c.length == 0) { + continue; + } + q = new olb(r); + j = 0; + s = null; + e = BD(mlb(q), 10); + f2 = null; + while (e) { + f2 = BD(Ikb(b, e.p), 257); + if (f2.c >= 0) { + i3 = null; + h = new Bib(k.a, j + 1); + while (h.b < h.d.gc()) { + g = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 10)); + i3 = BD(Ikb(b, g.p), 257); + if (i3.d == f2.d && i3.c < f2.c) { + break; + } else { + i3 = null; + } + } + if (i3) { + if (s) { + Nkb(d, e.p, meb(BD(Ikb(d, e.p), 19).a - 1)); + BD(Ikb(c2, s.p), 15).Mc(f2); + } + f2 = yJc(f2, e, n++); + b.c[b.c.length] = f2; + Ekb(c2, new Rkb()); + if (s) { + BD(Ikb(c2, s.p), 15).Fc(f2); + Ekb(d, meb(1)); + } else { + Ekb(d, meb(0)); + } + } + } + o2 = null; + if (q.a < q.c.c.length) { + o2 = BD(mlb(q), 10); + p = BD(Ikb(b, o2.p), 257); + BD(Ikb(c2, e.p), 15).Fc(p); + Nkb(d, o2.p, meb(BD(Ikb(d, o2.p), 19).a + 1)); + } + f2.d = m; + f2.c = j++; + s = e; + e = o2; + } + ++m; + } + } + function u6c(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + i3 = a; + k = c7c(new f7c(b.a, b.b), a); + j = c2; + l = c7c(new f7c(d.a, d.b), c2); + m = i3.a; + q = i3.b; + o2 = j.a; + s = j.b; + n = k.a; + r = k.b; + p = l.a; + t = l.b; + e = p * r - n * t; + Iy(); + My(Jqe); + if ($wnd.Math.abs(0 - e) <= Jqe || 0 == e || isNaN(0) && isNaN(e)) { + return false; + } + g = 1 / e * ((m - o2) * r - (q - s) * n); + h = 1 / e * -(-(m - o2) * t + (q - s) * p); + f2 = (My(Jqe), ($wnd.Math.abs(0 - g) <= Jqe || 0 == g || isNaN(0) && isNaN(g) ? 0 : 0 < g ? -1 : 0 > g ? 1 : Ny(isNaN(0), isNaN(g))) < 0 && (My(Jqe), ($wnd.Math.abs(g - 1) <= Jqe || g == 1 || isNaN(g) && isNaN(1) ? 0 : g < 1 ? -1 : g > 1 ? 1 : Ny(isNaN(g), isNaN(1))) < 0) && (My(Jqe), ($wnd.Math.abs(0 - h) <= Jqe || 0 == h || isNaN(0) && isNaN(h) ? 0 : 0 < h ? -1 : 0 > h ? 1 : Ny(isNaN(0), isNaN(h))) < 0) && (My(Jqe), ($wnd.Math.abs(h - 1) <= Jqe || h == 1 || isNaN(h) && isNaN(1) ? 0 : h < 1 ? -1 : h > 1 ? 1 : Ny(isNaN(h), isNaN(1))) < 0)); + return f2; + } + function z6d(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + for (l = new usb(new nsb(a)); l.b != l.c.a.d; ) { + k = tsb(l); + h = BD(k.d, 56); + b = BD(k.e, 56); + g = h.Tg(); + for (p = 0, u = (g.i == null && TKd(g), g.i).length; p < u; ++p) { + j = (f2 = (g.i == null && TKd(g), g.i), p >= 0 && p < f2.length ? f2[p] : null); + if (j.Ij() && !j.Jj()) { + if (JD(j, 99)) { + i3 = BD(j, 18); + (i3.Bb & ote) == 0 && (w2 = zUd(i3), !(!!w2 && (w2.Bb & ote) != 0)) && y6d(a, i3, h, b); + } else { + Q6d(); + if (BD(j, 66).Oj()) { + c2 = (v = j, BD(!v ? null : BD(b, 49).xh(v), 153)); + if (c2) { + n = BD(h.ah(j), 153); + d = c2.gc(); + for (q = 0, o2 = n.gc(); q < o2; ++q) { + m = n.il(q); + if (JD(m, 99)) { + t = n.jl(q); + e = Wrb(a, t); + if (e == null && t != null) { + s = BD(m, 18); + if (!a.b || (s.Bb & ote) != 0 || !!zUd(s)) { + continue; + } + e = t; + } + if (!c2.dl(m, e)) { + for (r = 0; r < d; ++r) { + if (c2.il(r) == m && PD(c2.jl(r)) === PD(e)) { + c2.ii(c2.gc() - 1, r); + --d; + break; + } + } + } + } else { + c2.dl(n.il(q), n.jl(q)); + } + } + } + } + } + } + } + } + } + function CZc(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m, n, o2, p, q, r, s, t; + r = xZc(b, c2, a.g); + e.n && e.n && !!f2 && Tdd(e, i6d(f2), (pgd(), mgd)); + if (a.b) { + for (q = 0; q < r.c.length; q++) { + l = (tCb(q, r.c.length), BD(r.c[q], 200)); + if (q != 0) { + n = (tCb(q - 1, r.c.length), BD(r.c[q - 1], 200)); + w$c(l, n.f + n.b + a.g); + } + tZc(q, r, c2, a.g); + AZc(a, l); + e.n && !!f2 && Tdd(e, i6d(f2), (pgd(), mgd)); + } + } else { + for (p = new olb(r); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 200); + for (k = new olb(o2.a); k.a < k.c.c.length; ) { + j = BD(mlb(k), 187); + s = new b$c(j.s, j.t, a.g); + WZc(s, j); + Ekb(o2.d, s); + } + } + } + BZc(a, r); + e.n && e.n && !!f2 && Tdd(e, i6d(f2), (pgd(), mgd)); + t = $wnd.Math.max(a.d, d.a - (g.b + g.c)); + m = $wnd.Math.max(a.c, d.b - (g.d + g.a)); + h = m - a.c; + if (a.e && a.f) { + i3 = t / m; + i3 < a.a ? t = m * a.a : h += t / a.a - m; + } + a.e && zZc(r, t, h); + e.n && e.n && !!f2 && Tdd(e, i6d(f2), (pgd(), mgd)); + return new d$c(a.a, t, a.c + h, (k$c(), j$c)); + } + function UJc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + a.j = KC(WD, oje, 25, a.g, 15, 1); + a.o = new Rkb(); + MAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new aLc()), new cLc(a)); + a.a = KC(sbb, dle, 25, a.b, 16, 1); + TAb(new YAb(null, new Kub(a.e.b, 16)), new rLc(a)); + d = (l = new Rkb(), MAb(JAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new hLc()), new jLc(a)), new lLc(a, l)), l); + for (i3 = new olb(d); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 508); + if (h.c.length <= 1) { + continue; + } + if (h.c.length == 2) { + uKc(h); + bKc((tCb(0, h.c.length), BD(h.c[0], 17)).d.i) || Ekb(a.o, h); + continue; + } + if (tKc(h) || sKc(h, new fLc())) { + continue; + } + j = new olb(h); + e = null; + while (j.a < j.c.c.length) { + b = BD(mlb(j), 17); + c2 = a.c[b.p]; + !e || j.a >= j.c.c.length ? k = JJc((j0b(), h0b), g0b) : k = JJc((j0b(), g0b), g0b); + k *= 2; + f2 = c2.a.g; + c2.a.g = $wnd.Math.max(f2, f2 + (k - f2)); + g = c2.b.g; + c2.b.g = $wnd.Math.max(g, g + (k - g)); + e = b; + } + } + } + function VNc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v; + v = Hx(a); + k = new Rkb(); + h = a.c.length; + l = h - 1; + m = h + 1; + while (v.a.c != 0) { + while (c2.b != 0) { + t = (sCb(c2.b != 0), BD(Nsb(c2, c2.a.a), 112)); + Jwb(v.a, t) != null; + t.g = l--; + YNc(t, b, c2, d); + } + while (b.b != 0) { + u = (sCb(b.b != 0), BD(Nsb(b, b.a.a), 112)); + Jwb(v.a, u) != null; + u.g = m++; + YNc(u, b, c2, d); + } + j = Rie; + for (r = (g = new Ywb(new cxb(new Gjb(v.a).a).b), new Njb(g)); sib(r.a.a); ) { + q = (f2 = Wwb(r.a), BD(f2.cd(), 112)); + if (!d && q.b > 0 && q.a <= 0) { + k.c = KC(SI, Uhe, 1, 0, 5, 1); + k.c[k.c.length] = q; + break; + } + p = q.i - q.d; + if (p >= j) { + if (p > j) { + k.c = KC(SI, Uhe, 1, 0, 5, 1); + j = p; + } + k.c[k.c.length] = q; + } + } + if (k.c.length != 0) { + i3 = BD(Ikb(k, Bub(e, k.c.length)), 112); + Jwb(v.a, i3) != null; + i3.g = m++; + YNc(i3, b, c2, d); + k.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + s = a.c.length + 1; + for (o2 = new olb(a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 112); + n.g < h && (n.g = n.g + s); + } + } + function SDb(a, b) { + var c2; + if (a.e) { + throw vbb(new Zdb((fdb(TM), Jke + TM.k + Kke))); + } + if (!lDb(a.a, b)) { + throw vbb(new hz(Lke + b + Mke)); + } + if (b == a.d) { + return a; + } + c2 = a.d; + a.d = b; + switch (c2.g) { + case 0: + switch (b.g) { + case 2: + PDb(a); + break; + case 1: + XDb(a); + PDb(a); + break; + case 4: + bEb(a); + PDb(a); + break; + case 3: + bEb(a); + XDb(a); + PDb(a); + } + break; + case 2: + switch (b.g) { + case 1: + XDb(a); + YDb(a); + break; + case 4: + bEb(a); + PDb(a); + break; + case 3: + bEb(a); + XDb(a); + PDb(a); + } + break; + case 1: + switch (b.g) { + case 2: + XDb(a); + YDb(a); + break; + case 4: + XDb(a); + bEb(a); + PDb(a); + break; + case 3: + XDb(a); + bEb(a); + XDb(a); + PDb(a); + } + break; + case 4: + switch (b.g) { + case 2: + bEb(a); + PDb(a); + break; + case 1: + bEb(a); + XDb(a); + PDb(a); + break; + case 3: + XDb(a); + YDb(a); + } + break; + case 3: + switch (b.g) { + case 2: + XDb(a); + bEb(a); + PDb(a); + break; + case 1: + XDb(a); + bEb(a); + XDb(a); + PDb(a); + break; + case 4: + XDb(a); + YDb(a); + } + } + return a; + } + function tVb(a, b) { + var c2; + if (a.d) { + throw vbb(new Zdb((fdb(LP), Jke + LP.k + Kke))); + } + if (!cVb(a.a, b)) { + throw vbb(new hz(Lke + b + Mke)); + } + if (b == a.c) { + return a; + } + c2 = a.c; + a.c = b; + switch (c2.g) { + case 0: + switch (b.g) { + case 2: + qVb(a); + break; + case 1: + xVb(a); + qVb(a); + break; + case 4: + BVb(a); + qVb(a); + break; + case 3: + BVb(a); + xVb(a); + qVb(a); + } + break; + case 2: + switch (b.g) { + case 1: + xVb(a); + yVb(a); + break; + case 4: + BVb(a); + qVb(a); + break; + case 3: + BVb(a); + xVb(a); + qVb(a); + } + break; + case 1: + switch (b.g) { + case 2: + xVb(a); + yVb(a); + break; + case 4: + xVb(a); + BVb(a); + qVb(a); + break; + case 3: + xVb(a); + BVb(a); + xVb(a); + qVb(a); + } + break; + case 4: + switch (b.g) { + case 2: + BVb(a); + qVb(a); + break; + case 1: + BVb(a); + xVb(a); + qVb(a); + break; + case 3: + xVb(a); + yVb(a); + } + break; + case 3: + switch (b.g) { + case 2: + xVb(a); + BVb(a); + qVb(a); + break; + case 1: + xVb(a); + BVb(a); + xVb(a); + qVb(a); + break; + case 4: + xVb(a); + yVb(a); + } + } + return a; + } + function UQb(a, b, c2) { + var d, e, f2, g, h, i3, j, k; + for (i3 = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); i3.e != i3.i.gc(); ) { + h = BD(Dyd(i3), 33); + for (e = new Sr(ur(_sd(h).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 79); + !d.b && (d.b = new y5d(z2, d, 4, 7)); + if (!(d.b.i <= 1 && (!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c.i <= 1))) { + throw vbb(new z2c("Graph must not contain hyperedges.")); + } + if (!Pld(d) && h != atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))) { + j = new gRb(); + tNb(j, d); + yNb(j, (HSb(), FSb), d); + dRb(j, BD(Wd(irb(c2.f, h)), 144)); + eRb(j, BD(Ohb(c2, atd(BD(qud((!d.c && (d.c = new y5d(z2, d, 5, 8)), d.c), 0), 82))), 144)); + Ekb(b.c, j); + for (g = new Fyd((!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n)); g.e != g.i.gc(); ) { + f2 = BD(Dyd(g), 137); + k = new mRb(j, f2.a); + tNb(k, f2); + yNb(k, FSb, f2); + k.e.a = $wnd.Math.max(f2.g, 1); + k.e.b = $wnd.Math.max(f2.f, 1); + lRb(k); + Ekb(b.d, k); + } + } + } + } + } + function OGb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + l = new LIb(a); + iKb(l, !(b == (ead(), dad) || b == _9c)); + k = l.a; + m = new p0b(); + for (e = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), g = 0, i3 = e.length; g < i3; ++g) { + c2 = e[g]; + j = xHb(k, dHb, c2); + !!j && (m.d = $wnd.Math.max(m.d, j.Re())); + } + for (d = OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]), f2 = 0, h = d.length; f2 < h; ++f2) { + c2 = d[f2]; + j = xHb(k, fHb, c2); + !!j && (m.a = $wnd.Math.max(m.a, j.Re())); + } + for (p = OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]), r = 0, t = p.length; r < t; ++r) { + n = p[r]; + j = xHb(k, n, dHb); + !!j && (m.b = $wnd.Math.max(m.b, j.Se())); + } + for (o2 = OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb]), q = 0, s = o2.length; q < s; ++q) { + n = o2[q]; + j = xHb(k, n, fHb); + !!j && (m.c = $wnd.Math.max(m.c, j.Se())); + } + if (m.d > 0) { + m.d += k.n.d; + m.d += k.d; + } + if (m.a > 0) { + m.a += k.n.a; + m.a += k.d; + } + if (m.b > 0) { + m.b += k.n.b; + m.b += k.d; + } + if (m.c > 0) { + m.c += k.n.c; + m.c += k.d; + } + return m; + } + function d6b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2; + m = c2.d; + l = c2.c; + f2 = new f7c(c2.f.a + c2.d.b + c2.d.c, c2.f.b + c2.d.d + c2.d.a); + g = f2.b; + for (j = new olb(a.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 10); + if (h.k != (j0b(), e0b)) { + continue; + } + d = BD(vNb(h, (wtc(), Hsc)), 61); + e = BD(vNb(h, Isc), 8); + k = h.n; + switch (d.g) { + case 2: + k.a = c2.f.a + m.c - l.a; + break; + case 4: + k.a = -l.a - m.b; + } + o2 = 0; + switch (d.g) { + case 2: + case 4: + if (b == (dcd(), _bd)) { + n = Edb(ED(vNb(h, htc))); + k.b = f2.b * n - BD(vNb(h, (Nyc(), Txc)), 8).b; + o2 = k.b + e.b; + M_b(h, false, true); + } else if (b == $bd) { + k.b = Edb(ED(vNb(h, htc))) - BD(vNb(h, (Nyc(), Txc)), 8).b; + o2 = k.b + e.b; + M_b(h, false, true); + } + } + g = $wnd.Math.max(g, o2); + } + c2.f.b += g - f2.b; + for (i3 = new olb(a.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + if (h.k != (j0b(), e0b)) { + continue; + } + d = BD(vNb(h, (wtc(), Hsc)), 61); + k = h.n; + switch (d.g) { + case 1: + k.b = -l.b - m.d; + break; + case 3: + k.b = c2.f.b + m.a - l.b; + } + } + } + function nRc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B; + e = BD(vNb(a, (mTc(), dTc)), 33); + j = Ohe; + k = Ohe; + h = Rie; + i3 = Rie; + for (w2 = Jsb(a.b, 0); w2.b != w2.d.c; ) { + u = BD(Xsb(w2), 86); + p = u.e; + q = u.f; + j = $wnd.Math.min(j, p.a - q.a / 2); + k = $wnd.Math.min(k, p.b - q.b / 2); + h = $wnd.Math.max(h, p.a + q.a / 2); + i3 = $wnd.Math.max(i3, p.b + q.b / 2); + } + o2 = BD(hkd(e, (JTc(), BTc)), 116); + n = new f7c(o2.b - j, o2.d - k); + for (v = Jsb(a.b, 0); v.b != v.d.c; ) { + u = BD(Xsb(v), 86); + m = vNb(u, dTc); + if (JD(m, 239)) { + f2 = BD(m, 33); + l = P6c(u.e, n); + bld(f2, l.a - f2.g / 2, l.b - f2.f / 2); + } + } + for (t = Jsb(a.a, 0); t.b != t.d.c; ) { + s = BD(Xsb(t), 188); + d = BD(vNb(s, dTc), 79); + if (d) { + b = s.a; + r = new g7c(s.b.e); + Gsb(b, r, b.a, b.a.a); + A = new g7c(s.c.e); + Gsb(b, A, b.c.b, b.c); + qRc(r, BD(Ut(b, 1), 8), s.b.f); + qRc(A, BD(Ut(b, b.b - 2), 8), s.c.f); + c2 = itd(d, true, true); + ifd(b, c2); + } + } + B = h - j + (o2.b + o2.c); + g = i3 - k + (o2.d + o2.a); + Afd(e, B, g, false, false); + } + function xoc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + l = a.b; + k = new Bib(l, 0); + Aib(k, new H1b(a)); + s = false; + g = 1; + while (k.b < k.d.gc()) { + j = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 29)); + p = (tCb(g, l.c.length), BD(l.c[g], 29)); + q = Mu(j.a); + r = q.c.length; + for (o2 = new olb(q); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 10); + $_b(m, p); + } + if (s) { + for (n = av(new ov(q), 0); n.c.Sb(); ) { + m = BD(pv(n), 10); + for (f2 = new olb(Mu(R_b(m))); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 17); + PZb(e, true); + yNb(a, (wtc(), Asc), (Bcb(), true)); + d = Noc(a, e, r); + c2 = BD(vNb(m, usc), 305); + t = BD(Ikb(d, d.c.length - 1), 17); + c2.k = t.c.i; + c2.n = t; + c2.b = e.d.i; + c2.c = e; + } + } + s = false; + } else { + if (q.c.length != 0) { + b = (tCb(0, q.c.length), BD(q.c[0], 10)); + if (b.k == (j0b(), d0b)) { + s = true; + g = -1; + } + } + } + ++g; + } + h = new Bib(a.b, 0); + while (h.b < h.d.gc()) { + i3 = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29)); + i3.a.c.length == 0 && uib(h); + } + } + function wKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + k = BD(BD(Qc(a.r, b), 21), 84); + if (k.gc() <= 2 || b == (Ucd(), zcd) || b == (Ucd(), Tcd)) { + AKb(a, b); + return; + } + p = a.u.Hc((rcd(), qcd)); + c2 = b == (Ucd(), Acd) ? (vLb(), uLb) : (vLb(), rLb); + r = b == Acd ? (EIb(), BIb) : (EIb(), DIb); + d = dLb(iLb(c2), a.s); + q = b == Acd ? Pje : Qje; + for (j = k.Kc(); j.Ob(); ) { + h = BD(j.Pb(), 111); + if (!h.c || h.c.d.c.length <= 0) { + continue; + } + o2 = h.b.rf(); + n = h.e; + l = h.c; + m = l.i; + m.b = (f2 = l.n, l.e.a + f2.b + f2.c); + m.a = (g = l.n, l.e.b + g.d + g.a); + if (p) { + m.c = n.a - (e = l.n, l.e.a + e.b + e.c) - a.s; + p = false; + } else { + m.c = n.a + o2.a + a.s; + } + ytb(r, lle); + l.f = r; + $Hb(l, (NHb(), MHb)); + Ekb(d.d, new BLb(m, bLb(d, m))); + q = b == Acd ? $wnd.Math.min(q, n.b) : $wnd.Math.max(q, n.b + h.b.rf().b); + } + q += b == Acd ? -a.t : a.t; + cLb((d.e = q, d)); + for (i3 = k.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 111); + if (!h.c || h.c.d.c.length <= 0) { + continue; + } + m = h.c.i; + m.c -= h.e.a; + m.d -= h.e.b; + } + } + function IDc(a, b, c2) { + var d; + Odd(c2, "StretchWidth layering", 1); + if (b.a.c.length == 0) { + Qdd(c2); + return; + } + a.c = b; + a.t = 0; + a.u = 0; + a.i = Pje; + a.g = Qje; + a.d = Edb(ED(vNb(b, (Nyc(), lyc)))); + CDc(a); + DDc(a); + ADc(a); + HDc(a); + BDc(a); + a.i = $wnd.Math.max(1, a.i); + a.g = $wnd.Math.max(1, a.g); + a.d = a.d / a.i; + a.f = a.g / a.i; + a.s = FDc(a); + d = new H1b(a.c); + Ekb(a.c.b, d); + a.r = Mu(a.p); + a.n = tlb(a.k, a.k.length); + while (a.r.c.length != 0) { + a.o = JDc(a); + if (!a.o || EDc(a) && a.b.a.gc() != 0) { + KDc(a, d); + d = new H1b(a.c); + Ekb(a.c.b, d); + ye(a.a, a.b); + a.b.a.$b(); + a.t = a.u; + a.u = 0; + } else { + if (EDc(a)) { + a.c.b.c = KC(SI, Uhe, 1, 0, 5, 1); + d = new H1b(a.c); + Ekb(a.c.b, d); + a.t = 0; + a.u = 0; + a.b.a.$b(); + a.a.a.$b(); + ++a.f; + a.r = Mu(a.p); + a.n = tlb(a.k, a.k.length); + } else { + $_b(a.o, d); + Lkb(a.r, a.o); + Qqb(a.b, a.o); + a.t = a.t - a.k[a.o.p] * a.d + a.j[a.o.p]; + a.u += a.e[a.o.p] * a.d; + } + } + } + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + smb(b.b); + Qdd(c2); + } + function Mgc(a) { + var b, c2, d, e; + MAb(JAb(new YAb(null, new Kub(a.a.b, 16)), new khc()), new mhc()); + Kgc(a); + MAb(JAb(new YAb(null, new Kub(a.a.b, 16)), new ohc()), new qhc()); + if (a.c == (Aad(), yad)) { + MAb(JAb(LAb(new YAb(null, new Kub(new Pib(a.f), 1)), new yhc()), new Ahc()), new Chc(a)); + MAb(JAb(NAb(LAb(LAb(new YAb(null, new Kub(a.d.b, 16)), new Ghc()), new Ihc()), new Khc()), new Mhc()), new Ohc(a)); + } + e = new f7c(Pje, Pje); + b = new f7c(Qje, Qje); + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 57); + e.a = $wnd.Math.min(e.a, c2.d.c); + e.b = $wnd.Math.min(e.b, c2.d.d); + b.a = $wnd.Math.max(b.a, c2.d.c + c2.d.b); + b.b = $wnd.Math.max(b.b, c2.d.d + c2.d.a); + } + P6c(X6c(a.d.c), V6c(new f7c(e.a, e.b))); + P6c(X6c(a.d.f), c7c(new f7c(b.a, b.b), e)); + Lgc(a, e, b); + Uhb(a.f); + Uhb(a.b); + Uhb(a.g); + Uhb(a.e); + a.a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a.b.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a = null; + a.d = null; + } + function vZb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + e = new Rkb(); + for (p = new olb(b.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + n = o2.e; + if (n) { + d = vZb(a, n, o2); + Gkb(e, d); + sZb(a, n, o2); + if (BD(vNb(n, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + s = BD(vNb(o2, (Nyc(), Vxc)), 98); + m = BD(vNb(o2, Yxc), 174).Hc((rcd(), ncd)); + for (r = new olb(o2.j); r.a < r.c.c.length; ) { + q = BD(mlb(r), 11); + f2 = BD(Ohb(a.b, q), 10); + if (!f2) { + f2 = Z$b(q, s, q.j, -(q.e.c.length - q.g.c.length), null, new d7c(), q.o, BD(vNb(n, Lwc), 103), n); + yNb(f2, $sc, q); + Rhb(a.b, q, f2); + Ekb(n.a, f2); + } + g = BD(Ikb(f2.j, 0), 11); + for (k = new olb(q.f); k.a < k.c.c.length; ) { + j = BD(mlb(k), 70); + h = new p_b(); + h.o.a = j.o.a; + h.o.b = j.o.b; + Ekb(g.f, h); + if (!m) { + t = q.j; + l = 0; + tcd(BD(vNb(o2, Yxc), 21)) && (l = mfd(j.n, j.o, q.o, 0, t)); + s == (dcd(), bcd) || (Ucd(), Ecd).Hc(t) ? h.o.a = l : h.o.b = l; + } + } + } + } + } + } + i3 = new Rkb(); + rZb(a, b, c2, e, i3); + !!c2 && tZb(a, b, c2, i3); + return i3; + } + function nEc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + if (a.c[b.c.p][b.p].e) { + return; + } else { + a.c[b.c.p][b.p].e = true; + } + a.c[b.c.p][b.p].b = 0; + a.c[b.c.p][b.p].d = 0; + a.c[b.c.p][b.p].a = null; + for (k = new olb(b.j); k.a < k.c.c.length; ) { + j = BD(mlb(k), 11); + l = c2 ? new J0b(j) : new R0b(j); + for (i3 = l.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 11); + g = h.i; + if (g.c == b.c) { + if (g != b) { + nEc(a, g, c2); + a.c[b.c.p][b.p].b += a.c[g.c.p][g.p].b; + a.c[b.c.p][b.p].d += a.c[g.c.p][g.p].d; + } + } else { + a.c[b.c.p][b.p].d += a.g[h.p]; + ++a.c[b.c.p][b.p].b; + } + } + } + f2 = BD(vNb(b, (wtc(), ssc)), 15); + if (f2) { + for (e = f2.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 10); + if (b.c == d.c) { + nEc(a, d, c2); + a.c[b.c.p][b.p].b += a.c[d.c.p][d.p].b; + a.c[b.c.p][b.p].d += a.c[d.c.p][d.p].d; + } + } + } + if (a.c[b.c.p][b.p].b > 0) { + a.c[b.c.p][b.p].d += Cub(a.i, 24) * lke * 0.07000000029802322 - 0.03500000014901161; + a.c[b.c.p][b.p].a = a.c[b.c.p][b.p].d / a.c[b.c.p][b.p].b; + } + } + function m5b(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + for (o2 = new olb(a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 10); + n5b(n.n); + n5b(n.o); + o5b(n.f); + r5b(n); + t5b(n); + for (q = new olb(n.j); q.a < q.c.c.length; ) { + p = BD(mlb(q), 11); + n5b(p.n); + n5b(p.a); + n5b(p.o); + G0b(p, s5b(p.j)); + f2 = BD(vNb(p, (Nyc(), Wxc)), 19); + !!f2 && yNb(p, Wxc, meb(-f2.a)); + for (e = new olb(p.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + for (c2 = Jsb(d.a, 0); c2.b != c2.d.c; ) { + b = BD(Xsb(c2), 8); + n5b(b); + } + i3 = BD(vNb(d, jxc), 74); + if (i3) { + for (h = Jsb(i3, 0); h.b != h.d.c; ) { + g = BD(Xsb(h), 8); + n5b(g); + } + } + for (l = new olb(d.b); l.a < l.c.c.length; ) { + j = BD(mlb(l), 70); + n5b(j.n); + n5b(j.o); + } + } + for (m = new olb(p.f); m.a < m.c.c.length; ) { + j = BD(mlb(m), 70); + n5b(j.n); + n5b(j.o); + } + } + if (n.k == (j0b(), e0b)) { + yNb(n, (wtc(), Hsc), s5b(BD(vNb(n, Hsc), 61))); + q5b(n); + } + for (k = new olb(n.b); k.a < k.c.c.length; ) { + j = BD(mlb(k), 70); + r5b(j); + n5b(j.o); + n5b(j.n); + } + } + } + function yQb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A; + a.e = b; + h = $Pb(b); + w2 = new Rkb(); + for (d = new olb(h); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 15); + A = new Rkb(); + w2.c[w2.c.length] = A; + i3 = new Tqb(); + for (o2 = c2.Kc(); o2.Ob(); ) { + n = BD(o2.Pb(), 33); + f2 = wQb(a, n, true, 0, 0); + A.c[A.c.length] = f2; + p = n.i; + q = n.j; + m = (!n.n && (n.n = new cUd(D2, n, 1, 7)), n.n); + for (l = new Fyd(m); l.e != l.i.gc(); ) { + j = BD(Dyd(l), 137); + e = wQb(a, j, false, p, q); + A.c[A.c.length] = e; + } + v = (!n.c && (n.c = new cUd(F2, n, 9, 9)), n.c); + for (s = new Fyd(v); s.e != s.i.gc(); ) { + r = BD(Dyd(s), 118); + g = wQb(a, r, false, p, q); + A.c[A.c.length] = g; + t = r.i + p; + u = r.j + q; + m = (!r.n && (r.n = new cUd(D2, r, 1, 7)), r.n); + for (k = new Fyd(m); k.e != k.i.gc(); ) { + j = BD(Dyd(k), 137); + e = wQb(a, j, false, t, u); + A.c[A.c.length] = e; + } + } + ye(i3, Dx(pl(OC(GC(KI, 1), Uhe, 20, 0, [_sd(n), $sd(n)])))); + } + vQb(a, i3, A); + } + a.f = new aPb(w2); + tNb(a.f, b); + return a.f; + } + function Kqd(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G; + D = Ohb(a.e, d); + if (D == null) { + D = new eC(); + n = BD(D, 183); + s = b + "_s"; + t = s + e; + m = new yC(t); + cC(n, Vte, m); + } + C = BD(D, 183); + Qpd(c2, C); + G = new eC(); + Spd(G, "x", d.j); + Spd(G, "y", d.k); + cC(C, Yte, G); + A = new eC(); + Spd(A, "x", d.b); + Spd(A, "y", d.c); + cC(C, "endPoint", A); + l = Fhe((!d.a && (d.a = new xMd(y2, d, 5)), d.a)); + o2 = !l; + if (o2) { + w2 = new wB(); + f2 = new Srd(w2); + reb((!d.a && (d.a = new xMd(y2, d, 5)), d.a), f2); + cC(C, Ote, w2); + } + i3 = dmd(d); + u = !!i3; + u && Tpd(a.a, C, Qte, kqd(a, dmd(d))); + r = emd(d); + v = !!r; + v && Tpd(a.a, C, Pte, kqd(a, emd(d))); + j = (!d.e && (d.e = new y5d(A2, d, 10, 9)), d.e).i == 0; + p = !j; + if (p) { + B = new wB(); + g = new Urd(a, B); + reb((!d.e && (d.e = new y5d(A2, d, 10, 9)), d.e), g); + cC(C, Ste, B); + } + k = (!d.g && (d.g = new y5d(A2, d, 9, 10)), d.g).i == 0; + q = !k; + if (q) { + F = new wB(); + h = new Wrd(a, F); + reb((!d.g && (d.g = new y5d(A2, d, 9, 10)), d.g), h); + cC(C, Rte, F); + } + } + function eKb(a) { + $Jb(); + var b, c2, d, e, f2, g, h; + d = a.f.n; + for (g = ci(a.r).a.nc(); g.Ob(); ) { + f2 = BD(g.Pb(), 111); + e = 0; + if (f2.b.Xe((Y9c(), s9c))) { + e = Edb(ED(f2.b.We(s9c))); + if (e < 0) { + switch (f2.b.Hf().g) { + case 1: + d.d = $wnd.Math.max(d.d, -e); + break; + case 3: + d.a = $wnd.Math.max(d.a, -e); + break; + case 2: + d.c = $wnd.Math.max(d.c, -e); + break; + case 4: + d.b = $wnd.Math.max(d.b, -e); + } + } + } + if (tcd(a.u)) { + b = nfd(f2.b, e); + h = !BD(a.e.We(b9c), 174).Hc((Idd(), zdd)); + c2 = false; + switch (f2.b.Hf().g) { + case 1: + c2 = b > d.d; + d.d = $wnd.Math.max(d.d, b); + if (h && c2) { + d.d = $wnd.Math.max(d.d, d.a); + d.a = d.d + e; + } + break; + case 3: + c2 = b > d.a; + d.a = $wnd.Math.max(d.a, b); + if (h && c2) { + d.a = $wnd.Math.max(d.a, d.d); + d.d = d.a + e; + } + break; + case 2: + c2 = b > d.c; + d.c = $wnd.Math.max(d.c, b); + if (h && c2) { + d.c = $wnd.Math.max(d.b, d.c); + d.b = d.c + e; + } + break; + case 4: + c2 = b > d.b; + d.b = $wnd.Math.max(d.b, b); + if (h && c2) { + d.b = $wnd.Math.max(d.b, d.c); + d.c = d.b + e; + } + } + } + } + } + function l3b(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + for (j = new olb(a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + g = BD(vNb(i3, (Nyc(), mxc)), 163); + f2 = null; + switch (g.g) { + case 1: + case 2: + f2 = (Gqc(), Fqc); + break; + case 3: + case 4: + f2 = (Gqc(), Dqc); + } + if (f2) { + yNb(i3, (wtc(), Bsc), (Gqc(), Fqc)); + f2 == Dqc ? o3b(i3, g, (KAc(), HAc)) : f2 == Fqc && o3b(i3, g, (KAc(), IAc)); + } else { + if (fcd(BD(vNb(i3, Vxc), 98)) && i3.j.c.length != 0) { + b = true; + for (l = new olb(i3.j); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + if (!(k.j == (Ucd(), zcd) && k.e.c.length - k.g.c.length > 0 || k.j == Tcd && k.e.c.length - k.g.c.length < 0)) { + b = false; + break; + } + for (e = new olb(k.g); e.a < e.c.c.length; ) { + c2 = BD(mlb(e), 17); + h = BD(vNb(c2.d.i, mxc), 163); + if (h == (Ctc(), ztc) || h == Atc) { + b = false; + break; + } + } + for (d = new olb(k.e); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 17); + h = BD(vNb(c2.c.i, mxc), 163); + if (h == (Ctc(), xtc) || h == ytc) { + b = false; + break; + } + } + } + b && o3b(i3, g, (KAc(), JAc)); + } + } + } + } + function lJc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + w2 = 0; + n = 0; + for (l = new olb(b.e); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + m = 0; + h = 0; + i3 = c2 ? BD(vNb(k, hJc), 19).a : Rie; + r = d ? BD(vNb(k, iJc), 19).a : Rie; + j = $wnd.Math.max(i3, r); + for (t = new olb(k.j); t.a < t.c.c.length; ) { + s = BD(mlb(t), 11); + u = k.n.b + s.n.b + s.a.b; + if (d) { + for (g = new olb(s.g); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 17); + p = f2.d; + o2 = p.i; + if (b != a.a[o2.p]) { + q = $wnd.Math.max(BD(vNb(o2, hJc), 19).a, BD(vNb(o2, iJc), 19).a); + v = BD(vNb(f2, (Nyc(), eyc)), 19).a; + if (v >= j && v >= q) { + m += o2.n.b + p.n.b + p.a.b - u; + ++h; + } + } + } + } + if (c2) { + for (g = new olb(s.e); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 17); + p = f2.c; + o2 = p.i; + if (b != a.a[o2.p]) { + q = $wnd.Math.max(BD(vNb(o2, hJc), 19).a, BD(vNb(o2, iJc), 19).a); + v = BD(vNb(f2, (Nyc(), eyc)), 19).a; + if (v >= j && v >= q) { + m += o2.n.b + p.n.b + p.a.b - u; + ++h; + } + } + } + } + } + if (h > 0) { + w2 += m / h; + ++n; + } + } + if (n > 0) { + b.a = e * w2 / n; + b.g = n; + } else { + b.a = 0; + b.g = 0; + } + } + function oMc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + c2 = BD(mlb(e), 29); + for (i3 = new olb(c2.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + b.j[h.p] = h; + b.i[h.p] = b.o == (eMc(), dMc) ? Qje : Pje; + } + } + Uhb(a.c); + g = a.a.b; + b.c == (YLc(), WLc) && (g = JD(g, 152) ? km(BD(g, 152)) : JD(g, 131) ? BD(g, 131).a : JD(g, 54) ? new ov(g) : new dv(g)); + UMc(a.e, b, a.b); + Alb(b.p, null); + for (f2 = g.Kc(); f2.Ob(); ) { + c2 = BD(f2.Pb(), 29); + j = c2.a; + b.o == (eMc(), dMc) && (j = JD(j, 152) ? km(BD(j, 152)) : JD(j, 131) ? BD(j, 131).a : JD(j, 54) ? new ov(j) : new dv(j)); + for (m = j.Kc(); m.Ob(); ) { + l = BD(m.Pb(), 10); + b.g[l.p] == l && pMc(a, l, b); + } + } + qMc(a, b); + for (d = g.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 29); + for (m = new olb(c2.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + b.p[l.p] = b.p[b.g[l.p].p]; + if (l == b.g[l.p]) { + k = Edb(b.i[b.j[l.p].p]); + (b.o == (eMc(), dMc) && k > Qje || b.o == cMc && k < Pje) && (b.p[l.p] = Edb(b.p[l.p]) + k); + } + } + } + a.e.cg(); + } + function PGb(a, b, c2, d) { + var e, f2, g, h, i3; + h = new LIb(b); + rKb(h, d); + e = true; + if (!!a && a.Xe((Y9c(), z8c))) { + f2 = BD(a.We((Y9c(), z8c)), 103); + e = f2 == (ead(), cad) || f2 == aad || f2 == bad; + } + hKb(h, false); + Hkb(h.e.wf(), new mKb(h, false, e)); + NJb(h, h.f, (gHb(), dHb), (Ucd(), Acd)); + NJb(h, h.f, fHb, Rcd); + NJb(h, h.g, dHb, Tcd); + NJb(h, h.g, fHb, zcd); + PJb(h, Acd); + PJb(h, Rcd); + OJb(h, zcd); + OJb(h, Tcd); + $Jb(); + g = h.A.Hc((tdd(), pdd)) && h.B.Hc((Idd(), Ddd)) ? _Jb(h) : null; + !!g && DHb(h.a, g); + eKb(h); + GJb(h); + PKb(h); + BJb(h); + pKb(h); + HKb(h); + xKb(h, Acd); + xKb(h, Rcd); + CJb(h); + oKb(h); + if (!c2) { + return h.o; + } + cKb(h); + LKb(h); + xKb(h, zcd); + xKb(h, Tcd); + i3 = h.B.Hc((Idd(), Edd)); + RJb(h, i3, Acd); + RJb(h, i3, Rcd); + SJb(h, i3, zcd); + SJb(h, i3, Tcd); + MAb(new YAb(null, new Kub(new $ib(h.i), 0)), new TJb()); + MAb(JAb(new YAb(null, ci(h.r).a.oc()), new VJb()), new XJb()); + dKb(h); + h.e.uf(h.o); + MAb(new YAb(null, ci(h.r).a.oc()), new fKb()); + return h.o; + } + function JVb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + j = Pje; + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 81); + j = $wnd.Math.min(j, b.d.f.g.c + b.e.a); + } + n = new Psb(); + for (g = new olb(a.a.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 189); + f2.i = j; + f2.e == 0 && (Gsb(n, f2, n.c.b, n.c), true); + } + while (n.b != 0) { + f2 = BD(n.b == 0 ? null : (sCb(n.b != 0), Nsb(n, n.a.a)), 189); + e = f2.f.g.c; + for (m = f2.a.a.ec().Kc(); m.Ob(); ) { + k = BD(m.Pb(), 81); + p = f2.i + k.e.a; + k.d.g || k.g.c < p ? k.o = p : k.o = k.g.c; + } + e -= f2.f.o; + f2.b += e; + a.c == (ead(), bad) || a.c == _9c ? f2.c += e : f2.c -= e; + for (l = f2.a.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 81); + for (i3 = k.f.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 81); + fad(a.c) ? o2 = a.f.ef(k, h) : o2 = a.f.ff(k, h); + h.d.i = $wnd.Math.max(h.d.i, k.o + k.g.b + o2 - h.e.a); + h.k || (h.d.i = $wnd.Math.max(h.d.i, h.g.c - h.e.a)); + --h.d.e; + h.d.e == 0 && Dsb(n, h.d); + } + } + } + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 81); + b.g.c = b.o; + } + } + function ELb(a) { + var b, c2, d, e, f2, g, h, i3; + h = a.b; + b = a.a; + switch (BD(vNb(a, (fFb(), bFb)), 427).g) { + case 0: + Okb(h, new tpb(new bMb())); + break; + case 1: + default: + Okb(h, new tpb(new gMb())); + } + switch (BD(vNb(a, _Eb), 428).g) { + case 1: + Okb(h, new YLb()); + Okb(h, new lMb()); + Okb(h, new GLb()); + break; + case 0: + default: + Okb(h, new YLb()); + Okb(h, new RLb()); + } + switch (BD(vNb(a, dFb), 250).g) { + case 0: + i3 = new FMb(); + break; + case 1: + i3 = new zMb(); + break; + case 2: + i3 = new CMb(); + break; + case 3: + i3 = new wMb(); + break; + case 5: + i3 = new JMb(new CMb()); + break; + case 4: + i3 = new JMb(new zMb()); + break; + case 7: + i3 = new tMb(new JMb(new zMb()), new JMb(new CMb())); + break; + case 8: + i3 = new tMb(new JMb(new wMb()), new JMb(new CMb())); + break; + case 6: + default: + i3 = new JMb(new wMb()); + } + for (g = new olb(h); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 167); + d = 0; + e = 0; + c2 = new vgd(meb(d), meb(e)); + while (gNb(b, f2, d, e)) { + c2 = BD(i3.Ce(c2, f2), 46); + d = BD(c2.a, 19).a; + e = BD(c2.b, 19).a; + } + dNb(b, f2, d, e); + } + } + function qQb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A; + f2 = a.f.b; + m = f2.a; + k = f2.b; + o2 = a.e.g; + n = a.e.f; + _kd(a.e, f2.a, f2.b); + w2 = m / o2; + A = k / n; + for (j = new Fyd(Kkd(a.e)); j.e != j.i.gc(); ) { + i3 = BD(Dyd(j), 137); + dld(i3, i3.i * w2); + eld(i3, i3.j * A); + } + for (s = new Fyd(Yod(a.e)); s.e != s.i.gc(); ) { + r = BD(Dyd(s), 118); + u = r.i; + v = r.j; + u > 0 && dld(r, u * w2); + v > 0 && eld(r, v * A); + } + stb(a.b, new CQb()); + b = new Rkb(); + for (h = new nib(new eib(a.c).a); h.b; ) { + g = lib(h); + d = BD(g.cd(), 79); + c2 = BD(g.dd(), 395).a; + e = itd(d, false, false); + l = oQb(jtd(d), ofd(e), c2); + ifd(l, e); + t = ktd(d); + if (!!t && Jkb(b, t, 0) == -1) { + b.c[b.c.length] = t; + pQb(t, (sCb(l.b != 0), BD(l.a.a.c, 8)), c2); + } + } + for (q = new nib(new eib(a.d).a); q.b; ) { + p = lib(q); + d = BD(p.cd(), 79); + c2 = BD(p.dd(), 395).a; + e = itd(d, false, false); + l = oQb(ltd(d), w7c(ofd(e)), c2); + l = w7c(l); + ifd(l, e); + t = mtd(d); + if (!!t && Jkb(b, t, 0) == -1) { + b.c[b.c.length] = t; + pQb(t, (sCb(l.b != 0), BD(l.c.b.c, 8)), c2); + } + } + } + function _Vc(a, b, c2, d) { + var e, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B; + if (c2.c.length != 0) { + o2 = new Rkb(); + for (n = new olb(c2); n.a < n.c.c.length; ) { + m = BD(mlb(n), 33); + Ekb(o2, new f7c(m.i, m.j)); + } + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + while (CVc(a, c2)) { + AVc(a, c2, false); + } + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + h = 0; + i3 = 0; + e = null; + if (c2.c.length != 0) { + e = (tCb(0, c2.c.length), BD(c2.c[0], 33)); + h = e.i - (tCb(0, o2.c.length), BD(o2.c[0], 8)).a; + i3 = e.j - (tCb(0, o2.c.length), BD(o2.c[0], 8)).b; + } + g = $wnd.Math.sqrt(h * h + i3 * i3); + l = cVc(c2); + while (l.a.gc() != 0) { + for (k = l.a.ec().Kc(); k.Ob(); ) { + j = BD(k.Pb(), 33); + p = a.f; + q = p.i + p.g / 2; + r = p.j + p.f / 2; + s = j.i + j.g / 2; + t = j.j + j.f / 2; + u = s - q; + v = t - r; + w2 = $wnd.Math.sqrt(u * u + v * v); + A = u / w2; + B = v / w2; + dld(j, j.i + A * g); + eld(j, j.j + B * g); + } + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + l = cVc(new Tkb(l)); + } + !!a.a && a.a.lg(new Tkb(l)); + d.n && !!b && Tdd(d, i6d(b), (pgd(), mgd)); + _Vc(a, b, new Tkb(l), d); + } + } + function $2b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + p = a.n; + q = a.o; + m = a.d; + l = Edb(ED(pBc(a, (Nyc(), iyc)))); + if (b) { + k = l * (b.gc() - 1); + n = 0; + for (i3 = b.Kc(); i3.Ob(); ) { + g = BD(i3.Pb(), 10); + k += g.o.a; + n = $wnd.Math.max(n, g.o.b); + } + r = p.a - (k - q.a) / 2; + f2 = p.b - m.d + n; + d = q.a / (b.gc() + 1); + e = d; + for (h = b.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + g.n.a = r; + g.n.b = f2 - g.o.b; + r += g.o.a + l; + j = Y2b(g); + j.n.a = g.o.a / 2 - j.a.a; + j.n.b = g.o.b; + o2 = BD(vNb(g, (wtc(), vsc)), 11); + if (o2.e.c.length + o2.g.c.length == 1) { + o2.n.a = e - o2.a.a; + o2.n.b = 0; + F0b(o2, a); + } + e += d; + } + } + if (c2) { + k = l * (c2.gc() - 1); + n = 0; + for (i3 = c2.Kc(); i3.Ob(); ) { + g = BD(i3.Pb(), 10); + k += g.o.a; + n = $wnd.Math.max(n, g.o.b); + } + r = p.a - (k - q.a) / 2; + f2 = p.b + q.b + m.a - n; + d = q.a / (c2.gc() + 1); + e = d; + for (h = c2.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 10); + g.n.a = r; + g.n.b = f2; + r += g.o.a + l; + j = Y2b(g); + j.n.a = g.o.a / 2 - j.a.a; + j.n.b = 0; + o2 = BD(vNb(g, (wtc(), vsc)), 11); + if (o2.e.c.length + o2.g.c.length == 1) { + o2.n.a = e - o2.a.a; + o2.n.b = q.b; + F0b(o2, a); + } + e += d; + } + } + } + function q7b(a, b) { + var c2, d, e, f2, g, h; + if (!BD(vNb(b, (wtc(), Ksc)), 21).Hc((Orc(), Hrc))) { + return; + } + for (h = new olb(b.a); h.a < h.c.c.length; ) { + f2 = BD(mlb(h), 10); + if (f2.k == (j0b(), h0b)) { + e = BD(vNb(f2, (Nyc(), txc)), 142); + a.c = $wnd.Math.min(a.c, f2.n.a - e.b); + a.a = $wnd.Math.max(a.a, f2.n.a + f2.o.a + e.c); + a.d = $wnd.Math.min(a.d, f2.n.b - e.d); + a.b = $wnd.Math.max(a.b, f2.n.b + f2.o.b + e.a); + } + } + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + if (f2.k != (j0b(), h0b)) { + switch (f2.k.g) { + case 2: + d = BD(vNb(f2, (Nyc(), mxc)), 163); + if (d == (Ctc(), ytc)) { + f2.n.a = a.c - 10; + p7b(f2, new x7b()).Jb(new A7b(f2)); + break; + } + if (d == Atc) { + f2.n.a = a.a + 10; + p7b(f2, new D7b()).Jb(new G7b(f2)); + break; + } + c2 = BD(vNb(f2, Osc), 303); + if (c2 == (esc(), dsc)) { + o7b(f2).Jb(new J7b(f2)); + f2.n.b = a.d - 10; + break; + } + if (c2 == bsc) { + o7b(f2).Jb(new M7b(f2)); + f2.n.b = a.b + 10; + break; + } + break; + default: + throw vbb(new Wdb("The node type " + f2.k + " is not supported by the " + zS)); + } + } + } + } + function Y1b(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + i3 = new f7c(d.i + d.g / 2, d.j + d.f / 2); + n = M1b(d); + o2 = BD(hkd(b, (Nyc(), Vxc)), 98); + q = BD(hkd(d, $xc), 61); + if (!hCd(gkd(d), Uxc)) { + d.i == 0 && d.j == 0 ? p = 0 : p = kfd(d, q); + jkd(d, Uxc, p); + } + j = new f7c(b.g, b.f); + e = Z$b(d, o2, q, n, j, i3, new f7c(d.g, d.f), BD(vNb(c2, Lwc), 103), c2); + yNb(e, (wtc(), $sc), d); + f2 = BD(Ikb(e.j, 0), 11); + E0b(f2, W1b(d)); + yNb(e, Yxc, (rcd(), pqb(pcd))); + l = BD(hkd(b, Yxc), 174).Hc(ncd); + for (h = new Fyd((!d.n && (d.n = new cUd(D2, d, 1, 7)), d.n)); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 137); + if (!Ccb(DD(hkd(g, Jxc))) && !!g.a) { + m = Z1b(g); + Ekb(f2.f, m); + if (!l) { + k = 0; + tcd(BD(hkd(b, Yxc), 21)) && (k = mfd(new f7c(g.i, g.j), new f7c(g.g, g.f), new f7c(d.g, d.f), 0, q)); + switch (q.g) { + case 2: + case 4: + m.o.a = k; + break; + case 1: + case 3: + m.o.b = k; + } + } + } + } + yNb(e, tyc, ED(hkd(Xod(b), tyc))); + yNb(e, uyc, ED(hkd(Xod(b), uyc))); + yNb(e, ryc, ED(hkd(Xod(b), ryc))); + Ekb(c2.a, e); + Rhb(a.a, d, e); + } + function qUc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v; + Odd(c2, "Processor arrange level", 1); + k = 0; + mmb(); + ktb(b, new Wsd((mTc(), ZSc))); + f2 = b.b; + h = Jsb(b, b.b); + j = true; + while (j && h.b.b != h.d.a) { + r = BD(Ysb(h), 86); + BD(vNb(r, ZSc), 19).a == 0 ? --f2 : j = false; + } + v = new Jib(b, 0, f2); + g = new Qsb(v); + v = new Jib(b, f2, b.b); + i3 = new Qsb(v); + if (g.b == 0) { + for (o2 = Jsb(i3, 0); o2.b != o2.d.c; ) { + n = BD(Xsb(o2), 86); + yNb(n, eTc, meb(k++)); + } + } else { + l = g.b; + for (u = Jsb(g, 0); u.b != u.d.c; ) { + t = BD(Xsb(u), 86); + yNb(t, eTc, meb(k++)); + d = URc(t); + qUc(a, d, Udd(c2, 1 / l | 0)); + ktb(d, tmb(new Wsd(eTc))); + m = new Psb(); + for (s = Jsb(d, 0); s.b != s.d.c; ) { + r = BD(Xsb(s), 86); + for (q = Jsb(t.d, 0); q.b != q.d.c; ) { + p = BD(Xsb(q), 188); + p.c == r && (Gsb(m, p, m.c.b, m.c), true); + } + } + Osb(t.d); + ye(t.d, m); + h = Jsb(i3, i3.b); + e = t.d.b; + j = true; + while (0 < e && j && h.b.b != h.d.a) { + r = BD(Ysb(h), 86); + if (BD(vNb(r, ZSc), 19).a == 0) { + yNb(r, eTc, meb(k++)); + --e; + Zsb(h); + } else { + j = false; + } + } + } + } + Qdd(c2); + } + function _8b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + Odd(b, "Inverted port preprocessing", 1); + k = a.b; + j = new Bib(k, 0); + c2 = null; + t = new Rkb(); + while (j.b < j.d.gc()) { + s = c2; + c2 = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 29)); + for (n = new olb(t); n.a < n.c.c.length; ) { + l = BD(mlb(n), 10); + $_b(l, s); + } + t.c = KC(SI, Uhe, 1, 0, 5, 1); + for (o2 = new olb(c2.a); o2.a < o2.c.c.length; ) { + l = BD(mlb(o2), 10); + if (l.k != (j0b(), h0b)) { + continue; + } + if (!fcd(BD(vNb(l, (Nyc(), Vxc)), 98))) { + continue; + } + for (r = X_b(l, (KAc(), HAc), (Ucd(), zcd)).Kc(); r.Ob(); ) { + p = BD(r.Pb(), 11); + i3 = p.e; + h = BD(Qkb(i3, KC(AQ, jne, 17, i3.c.length, 0, 1)), 474); + for (e = h, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + Z8b(a, p, d, t); + } + } + for (q = X_b(l, IAc, Tcd).Kc(); q.Ob(); ) { + p = BD(q.Pb(), 11); + i3 = p.g; + h = BD(Qkb(i3, KC(AQ, jne, 17, i3.c.length, 0, 1)), 474); + for (e = h, f2 = 0, g = e.length; f2 < g; ++f2) { + d = e[f2]; + $8b(a, p, d, t); + } + } + } + } + for (m = new olb(t); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + $_b(l, c2); + } + Qdd(b); + } + function _1b(a, b, c2, d, e, f2) { + var g, h, i3, j, k, l; + j = new H0b(); + tNb(j, b); + G0b(j, BD(hkd(b, (Nyc(), $xc)), 61)); + yNb(j, (wtc(), $sc), b); + F0b(j, c2); + l = j.o; + l.a = b.g; + l.b = b.f; + k = j.n; + k.a = b.i; + k.b = b.j; + Rhb(a.a, b, j); + g = FAb(NAb(LAb(new YAb(null, (!b.e && (b.e = new y5d(B2, b, 7, 4)), new Kub(b.e, 16))), new m2b()), new e2b()), new o2b(b)); + g || (g = FAb(NAb(LAb(new YAb(null, (!b.d && (b.d = new y5d(B2, b, 8, 5)), new Kub(b.d, 16))), new q2b()), new g2b()), new s2b(b))); + g || (g = FAb(new YAb(null, (!b.e && (b.e = new y5d(B2, b, 7, 4)), new Kub(b.e, 16))), new u2b())); + yNb(j, Nsc, (Bcb(), g ? true : false)); + e_b(j, f2, e, BD(hkd(b, Txc), 8)); + for (i3 = new Fyd((!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n)); i3.e != i3.i.gc(); ) { + h = BD(Dyd(i3), 137); + !Ccb(DD(hkd(h, Jxc))) && !!h.a && Ekb(j.f, Z1b(h)); + } + switch (e.g) { + case 2: + case 1: + (j.j == (Ucd(), Acd) || j.j == Rcd) && d.Fc((Orc(), Lrc)); + break; + case 4: + case 3: + (j.j == (Ucd(), zcd) || j.j == Tcd) && d.Fc((Orc(), Lrc)); + } + return j; + } + function nQc(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m, n, o2, p, q, r, s, t; + m = null; + d == (FQc(), DQc) ? m = b : d == EQc && (m = c2); + for (p = m.a.ec().Kc(); p.Ob(); ) { + o2 = BD(p.Pb(), 11); + q = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).b; + t = new Tqb(); + h = new Tqb(); + for (j = new b1b(o2.b); llb(j.a) || llb(j.b); ) { + i3 = BD(llb(j.a) ? mlb(j.a) : mlb(j.b), 17); + if (Ccb(DD(vNb(i3, (wtc(), ltc)))) != e) { + continue; + } + if (Jkb(f2, i3, 0) != -1) { + i3.d == o2 ? r = i3.c : r = i3.d; + s = l7c(OC(GC(m1, 1), nie, 8, 0, [r.i.n, r.n, r.a])).b; + if ($wnd.Math.abs(s - q) < 0.2) { + continue; + } + s < q ? b.a._b(r) ? Qqb(t, new vgd(DQc, i3)) : Qqb(t, new vgd(EQc, i3)) : b.a._b(r) ? Qqb(h, new vgd(DQc, i3)) : Qqb(h, new vgd(EQc, i3)); + } + } + if (t.a.gc() > 1) { + n = new ZQc(o2, t, d); + reb(t, new PQc(a, n)); + g.c[g.c.length] = n; + for (l = t.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 46); + Lkb(f2, k.b); + } + } + if (h.a.gc() > 1) { + n = new ZQc(o2, h, d); + reb(h, new RQc(a, n)); + g.c[g.c.length] = n; + for (l = h.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 46); + Lkb(f2, k.b); + } + } + } + } + function $Wc(a) { + r4c(a, new E3c(L3c(P3c(M3c(O3c(N3c(new R3c(), sre), "ELK Radial"), 'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'), new bXc()), sre))); + p4c(a, sre, uqe, Ksd(UWc)); + p4c(a, sre, wme, Ksd(XWc)); + p4c(a, sre, Fme, Ksd(NWc)); + p4c(a, sre, Tme, Ksd(OWc)); + p4c(a, sre, Eme, Ksd(PWc)); + p4c(a, sre, Gme, Ksd(MWc)); + p4c(a, sre, Dme, Ksd(QWc)); + p4c(a, sre, Hme, Ksd(TWc)); + p4c(a, sre, ore, Ksd(KWc)); + p4c(a, sre, nre, Ksd(LWc)); + p4c(a, sre, rre, Ksd(RWc)); + p4c(a, sre, lre, Ksd(SWc)); + p4c(a, sre, mre, Ksd(VWc)); + p4c(a, sre, pre, Ksd(WWc)); + p4c(a, sre, qre, Ksd(YWc)); + } + function LIb(a) { + var b; + this.r = Cy(new OIb(), new SIb()); + this.b = new Rpb(BD(Qb(F1), 290)); + this.p = new Rpb(BD(Qb(F1), 290)); + this.i = new Rpb(BD(Qb(DN), 290)); + this.e = a; + this.o = new g7c(a.rf()); + this.D = a.Df() || Ccb(DD(a.We((Y9c(), M8c)))); + this.A = BD(a.We((Y9c(), Y8c)), 21); + this.B = BD(a.We(b9c), 21); + this.q = BD(a.We(t9c), 98); + this.u = BD(a.We(x9c), 21); + if (!ucd(this.u)) { + throw vbb(new y2c("Invalid port label placement: " + this.u)); + } + this.v = Ccb(DD(a.We(z9c))); + this.j = BD(a.We(W8c), 21); + if (!Jbd(this.j)) { + throw vbb(new y2c("Invalid node label placement: " + this.j)); + } + this.n = BD(bgd(a, U8c), 116); + this.k = Edb(ED(bgd(a, Q9c))); + this.d = Edb(ED(bgd(a, P9c))); + this.w = Edb(ED(bgd(a, X9c))); + this.s = Edb(ED(bgd(a, R9c))); + this.t = Edb(ED(bgd(a, S9c))); + this.C = BD(bgd(a, V9c), 142); + this.c = 2 * this.d; + b = !this.B.Hc((Idd(), zdd)); + this.f = new mIb(0, b, 0); + this.g = new mIb(1, b, 0); + lIb(this.f, (gHb(), eHb), this.g); + } + function Lgd(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D; + t = 0; + o2 = 0; + n = 0; + m = 1; + for (s = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); s.e != s.i.gc(); ) { + q = BD(Dyd(s), 33); + m += sr(new Sr(ur(_sd(q).a.Kc(), new Sq()))); + B = q.g; + o2 = $wnd.Math.max(o2, B); + l = q.f; + n = $wnd.Math.max(n, l); + t += B * l; + } + p = (!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a).i; + g = t + 2 * d * d * m * p; + f2 = $wnd.Math.sqrt(g); + i3 = $wnd.Math.max(f2 * c2, o2); + h = $wnd.Math.max(f2 / c2, n); + for (r = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); r.e != r.i.gc(); ) { + q = BD(Dyd(r), 33); + C = e.b + (Cub(b, 26) * ike + Cub(b, 27) * jke) * (i3 - q.g); + D = e.b + (Cub(b, 26) * ike + Cub(b, 27) * jke) * (h - q.f); + dld(q, C); + eld(q, D); + } + A = i3 + (e.b + e.c); + w2 = h + (e.d + e.a); + for (v = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); v.e != v.i.gc(); ) { + u = BD(Dyd(v), 33); + for (k = new Sr(ur(_sd(u).a.Kc(), new Sq())); Qr(k); ) { + j = BD(Rr(k), 79); + Pld(j) || Kgd(j, b, A, w2); + } + } + A += e.b + e.c; + w2 += e.d + e.a; + Afd(a, A, w2, false, true); + } + function Jcb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + if (a == null) { + throw vbb(new Oeb(Xhe)); + } + j = a; + f2 = a.length; + i3 = false; + if (f2 > 0) { + b = (BCb(0, a.length), a.charCodeAt(0)); + if (b == 45 || b == 43) { + a = a.substr(1); + --f2; + i3 = b == 45; + } + } + if (f2 == 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + while (a.length > 0 && (BCb(0, a.length), a.charCodeAt(0) == 48)) { + a = a.substr(1); + --f2; + } + if (f2 > (Neb(), Leb)[10]) { + throw vbb(new Oeb(Oje + j + '"')); + } + for (e = 0; e < f2; e++) { + if (Zcb((BCb(e, a.length), a.charCodeAt(e))) == -1) { + throw vbb(new Oeb(Oje + j + '"')); + } + } + l = 0; + g = Jeb[10]; + k = Keb[10]; + h = Jbb(Meb[10]); + c2 = true; + d = f2 % g; + if (d > 0) { + l = -parseInt(a.substr(0, d), 10); + a = a.substr(d); + f2 -= d; + c2 = false; + } + while (f2 >= g) { + d = parseInt(a.substr(0, g), 10); + a = a.substr(g); + f2 -= g; + if (c2) { + c2 = false; + } else { + if (ybb(l, h) < 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + l = Ibb(l, k); + } + l = Qbb(l, d); + } + if (ybb(l, 0) > 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + if (!i3) { + l = Jbb(l); + if (ybb(l, 0) < 0) { + throw vbb(new Oeb(Oje + j + '"')); + } + } + return l; + } + function Z6d(a, b) { + X6d(); + var c2, d, e, f2, g, h, i3; + this.a = new a7d(this); + this.b = a; + this.c = b; + this.f = c2d(q1d((O6d(), M6d), b)); + if (this.f.dc()) { + if ((h = t1d(M6d, a)) == b) { + this.e = true; + this.d = new Rkb(); + this.f = new oFd(); + this.f.Fc(Ewe); + BD(V1d(p1d(M6d, bKd(a)), ""), 26) == a && this.f.Fc(u1d(M6d, bKd(a))); + for (e = g1d(M6d, a).Kc(); e.Ob(); ) { + d = BD(e.Pb(), 170); + switch ($1d(q1d(M6d, d))) { + case 4: { + this.d.Fc(d); + break; + } + case 5: { + this.f.Gc(c2d(q1d(M6d, d))); + break; + } + } + } + } else { + Q6d(); + if (BD(b, 66).Oj()) { + this.e = true; + this.f = null; + this.d = new Rkb(); + for (g = 0, i3 = (a.i == null && TKd(a), a.i).length; g < i3; ++g) { + d = (c2 = (a.i == null && TKd(a), a.i), g >= 0 && g < c2.length ? c2[g] : null); + for (f2 = _1d(q1d(M6d, d)); f2; f2 = _1d(q1d(M6d, f2))) { + f2 == b && this.d.Fc(d); + } + } + } else if ($1d(q1d(M6d, b)) == 1 && !!h) { + this.f = null; + this.d = (m8d(), l8d); + } else { + this.f = null; + this.e = true; + this.d = (mmb(), new anb(b)); + } + } + } else { + this.e = $1d(q1d(M6d, b)) == 5; + this.f.Fb(W6d) && (this.f = W6d); + } + } + function zKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + c2 = 0; + d = yKb(a, b); + m = a.s; + n = a.t; + for (j = BD(BD(Qc(a.r, b), 21), 84).Kc(); j.Ob(); ) { + i3 = BD(j.Pb(), 111); + if (!i3.c || i3.c.d.c.length <= 0) { + continue; + } + o2 = i3.b.rf(); + h = i3.b.Xe((Y9c(), s9c)) ? Edb(ED(i3.b.We(s9c))) : 0; + k = i3.c; + l = k.i; + l.b = (g = k.n, k.e.a + g.b + g.c); + l.a = (f2 = k.n, k.e.b + f2.d + f2.a); + switch (b.g) { + case 1: + l.c = i3.a ? (o2.a - l.b) / 2 : o2.a + m; + l.d = o2.b + h + d; + $Hb(k, (NHb(), KHb)); + _Hb(k, (EIb(), DIb)); + break; + case 3: + l.c = i3.a ? (o2.a - l.b) / 2 : o2.a + m; + l.d = -h - d - l.a; + $Hb(k, (NHb(), KHb)); + _Hb(k, (EIb(), BIb)); + break; + case 2: + l.c = -h - d - l.b; + if (i3.a) { + e = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (o2.b - e) / 2; + } else { + l.d = o2.b + n; + } + $Hb(k, (NHb(), MHb)); + _Hb(k, (EIb(), CIb)); + break; + case 4: + l.c = o2.a + h + d; + if (i3.a) { + e = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (o2.b - e) / 2; + } else { + l.d = o2.b + n; + } + $Hb(k, (NHb(), LHb)); + _Hb(k, (EIb(), CIb)); + } + (b == (Ucd(), Acd) || b == Rcd) && (c2 = $wnd.Math.max(c2, l.a)); + } + c2 > 0 && (BD(Mpb(a.b, b), 124).a.b = c2); + } + function b3b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + Odd(b, "Comment pre-processing", 1); + c2 = 0; + i3 = new olb(a.a); + while (i3.a < i3.c.c.length) { + h = BD(mlb(i3), 10); + if (Ccb(DD(vNb(h, (Nyc(), pwc))))) { + ++c2; + e = 0; + d = null; + j = null; + for (o2 = new olb(h.j); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 11); + e += m.e.c.length + m.g.c.length; + if (m.e.c.length == 1) { + d = BD(Ikb(m.e, 0), 17); + j = d.c; + } + if (m.g.c.length == 1) { + d = BD(Ikb(m.g, 0), 17); + j = d.d; + } + } + if (e == 1 && j.e.c.length + j.g.c.length == 1 && !Ccb(DD(vNb(j.i, pwc)))) { + c3b(h, d, j, j.i); + nlb(i3); + } else { + r = new Rkb(); + for (n = new olb(h.j); n.a < n.c.c.length; ) { + m = BD(mlb(n), 11); + for (l = new olb(m.g); l.a < l.c.c.length; ) { + k = BD(mlb(l), 17); + k.d.g.c.length == 0 || (r.c[r.c.length] = k, true); + } + for (g = new olb(m.e); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 17); + f2.c.e.c.length == 0 || (r.c[r.c.length] = f2, true); + } + } + for (q = new olb(r); q.a < q.c.c.length; ) { + p = BD(mlb(q), 17); + PZb(p, true); + } + } + } + } + b.n && Sdd(b, "Found " + c2 + " comment boxes"); + Qdd(b); + } + function f9b(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p; + m = Edb(ED(vNb(a, (Nyc(), tyc)))); + n = Edb(ED(vNb(a, uyc))); + l = Edb(ED(vNb(a, ryc))); + h = a.o; + f2 = BD(Ikb(a.j, 0), 11); + g = f2.n; + p = d9b(f2, l); + if (!p) { + return; + } + if (b.Hc((rcd(), ncd))) { + switch (BD(vNb(a, (wtc(), Hsc)), 61).g) { + case 1: + p.c = (h.a - p.b) / 2 - g.a; + p.d = n; + break; + case 3: + p.c = (h.a - p.b) / 2 - g.a; + p.d = -n - p.a; + break; + case 2: + if (c2 && f2.e.c.length == 0 && f2.g.c.length == 0) { + k = d ? p.a : BD(Ikb(f2.f, 0), 70).o.b; + p.d = (h.b - k) / 2 - g.b; + } else { + p.d = h.b + n - g.b; + } + p.c = -m - p.b; + break; + case 4: + if (c2 && f2.e.c.length == 0 && f2.g.c.length == 0) { + k = d ? p.a : BD(Ikb(f2.f, 0), 70).o.b; + p.d = (h.b - k) / 2 - g.b; + } else { + p.d = h.b + n - g.b; + } + p.c = m; + } + } else if (b.Hc(pcd)) { + switch (BD(vNb(a, (wtc(), Hsc)), 61).g) { + case 1: + case 3: + p.c = g.a + m; + break; + case 2: + case 4: + if (c2 && !f2.c) { + k = d ? p.a : BD(Ikb(f2.f, 0), 70).o.b; + p.d = (h.b - k) / 2 - g.b; + } else { + p.d = g.b + n; + } + } + } + e = p.d; + for (j = new olb(f2.f); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 70); + o2 = i3.n; + o2.a = p.c; + o2.b = e; + e += i3.o.b + l; + } + } + function eae() { + rEd(Q9, new Lae()); + rEd(S9, new qbe()); + rEd(T9, new Xbe()); + rEd(U9, new Cce()); + rEd(ZI, new Oce()); + rEd(GC(SD, 1), new Rce()); + rEd(wI, new Uce()); + rEd(xI, new Xce()); + rEd(ZI, new hae()); + rEd(ZI, new kae()); + rEd(ZI, new nae()); + rEd(BI, new qae()); + rEd(ZI, new tae()); + rEd(yK, new wae()); + rEd(yK, new zae()); + rEd(ZI, new Cae()); + rEd(FI, new Fae()); + rEd(ZI, new Iae()); + rEd(ZI, new Oae()); + rEd(ZI, new Rae()); + rEd(ZI, new Uae()); + rEd(ZI, new Xae()); + rEd(GC(SD, 1), new $ae()); + rEd(ZI, new bbe()); + rEd(ZI, new ebe()); + rEd(yK, new hbe()); + rEd(yK, new kbe()); + rEd(ZI, new nbe()); + rEd(JI, new tbe()); + rEd(ZI, new wbe()); + rEd(MI, new zbe()); + rEd(ZI, new Cbe()); + rEd(ZI, new Fbe()); + rEd(ZI, new Ibe()); + rEd(ZI, new Lbe()); + rEd(yK, new Obe()); + rEd(yK, new Rbe()); + rEd(ZI, new Ube()); + rEd(ZI, new $be()); + rEd(ZI, new bce()); + rEd(ZI, new ece()); + rEd(ZI, new hce()); + rEd(ZI, new kce()); + rEd(UI, new nce()); + rEd(ZI, new qce()); + rEd(ZI, new tce()); + rEd(ZI, new wce()); + rEd(UI, new zce()); + rEd(MI, new Fce()); + rEd(ZI, new Ice()); + rEd(JI, new Lce()); + } + function Bmd(b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + n = c2.length; + if (n > 0) { + j = (BCb(0, c2.length), c2.charCodeAt(0)); + if (j != 64) { + if (j == 37) { + m = c2.lastIndexOf("%"); + k = false; + if (m != 0 && (m == n - 1 || (k = (BCb(m + 1, c2.length), c2.charCodeAt(m + 1) == 46)))) { + h = c2.substr(1, m - 1); + u = dfb("%", h) ? null : QEd(h); + e = 0; + if (k) { + try { + e = Icb(c2.substr(m + 2), Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + i3 = a; + throw vbb(new rFd(i3)); + } else + throw vbb(a); + } + } + for (r = pRd(b.Wg()); r.Ob(); ) { + p = MRd(r); + if (JD(p, 510)) { + f2 = BD(p, 590); + t = f2.d; + if ((u == null ? t == null : dfb(u, t)) && e-- == 0) { + return f2; + } + } + } + return null; + } + } + l = c2.lastIndexOf("."); + o2 = l == -1 ? c2 : c2.substr(0, l); + d = 0; + if (l != -1) { + try { + d = Icb(c2.substr(l + 1), Rie, Ohe); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + o2 = c2; + } else + throw vbb(a); + } + } + o2 = dfb("%", o2) ? null : QEd(o2); + for (q = pRd(b.Wg()); q.Ob(); ) { + p = MRd(q); + if (JD(p, 191)) { + g = BD(p, 191); + s = g.ne(); + if ((o2 == null ? s == null : dfb(o2, s)) && d-- == 0) { + return g; + } + } + } + return null; + } + } + return rid(b, c2); + } + function f6b(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F; + w2 = new Rkb(); + for (o2 = new olb(a.b); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 29); + for (r = new olb(n.a); r.a < r.c.c.length; ) { + p = BD(mlb(r), 10); + if (p.k != (j0b(), e0b)) { + continue; + } + if (!wNb(p, (wtc(), Gsc))) { + continue; + } + s = null; + u = null; + t = null; + for (C = new olb(p.j); C.a < C.c.c.length; ) { + B = BD(mlb(C), 11); + switch (B.j.g) { + case 4: + s = B; + break; + case 2: + u = B; + break; + default: + t = B; + } + } + v = BD(Ikb(t.g, 0), 17); + k = new t7c(v.a); + j = new g7c(t.n); + P6c(j, p.n); + l = Jsb(k, 0); + Vsb(l, j); + A = w7c(v.a); + m = new g7c(t.n); + P6c(m, p.n); + Gsb(A, m, A.c.b, A.c); + D = BD(vNb(p, Gsc), 10); + F = BD(Ikb(D.j, 0), 11); + i3 = BD(Qkb(s.e, KC(AQ, jne, 17, 0, 0, 1)), 474); + for (d = i3, f2 = 0, h = d.length; f2 < h; ++f2) { + b = d[f2]; + RZb(b, F); + o7c(b.a, b.a.b, k); + } + i3 = k_b(u.g); + for (c2 = i3, e = 0, g = c2.length; e < g; ++e) { + b = c2[e]; + QZb(b, F); + o7c(b.a, 0, A); + } + QZb(v, null); + RZb(v, null); + w2.c[w2.c.length] = p; + } + } + for (q = new olb(w2); q.a < q.c.c.length; ) { + p = BD(mlb(q), 10); + $_b(p, null); + } + } + function lgb() { + lgb = ccb; + var a, b, c2; + new sgb(1, 0); + new sgb(10, 0); + new sgb(0, 0); + dgb = KC(bJ, nie, 240, 11, 0, 1); + egb = KC(TD, $ie, 25, 100, 15, 1); + fgb = OC(GC(UD, 1), Vje, 25, 15, [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 152587890625, 762939453125, 3814697265625, 19073486328125, 95367431640625, 476837158203125, 2384185791015625]); + ggb = KC(WD, oje, 25, fgb.length, 15, 1); + hgb = OC(GC(UD, 1), Vje, 25, 15, [1, 10, 100, _ie, 1e4, Wje, 1e6, 1e7, 1e8, Jje, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16]); + igb = KC(WD, oje, 25, hgb.length, 15, 1); + jgb = KC(bJ, nie, 240, 11, 0, 1); + a = 0; + for (; a < jgb.length; a++) { + dgb[a] = new sgb(a, 0); + jgb[a] = new sgb(0, a); + egb[a] = 48; + } + for (; a < egb.length; a++) { + egb[a] = 48; + } + for (c2 = 0; c2 < ggb.length; c2++) { + ggb[c2] = ugb(fgb[c2]); + } + for (b = 0; b < igb.length; b++) { + igb[b] = ugb(hgb[b]); + } + Dhb(); + } + function zrb() { + function e() { + this.obj = this.createObject(); + } + e.prototype.createObject = function(a) { + return /* @__PURE__ */ Object.create(null); + }; + e.prototype.get = function(a) { + return this.obj[a]; + }; + e.prototype.set = function(a, b) { + this.obj[a] = b; + }; + e.prototype[hke] = function(a) { + delete this.obj[a]; + }; + e.prototype.keys = function() { + return Object.getOwnPropertyNames(this.obj); + }; + e.prototype.entries = function() { + var b = this.keys(); + var c2 = this; + var d = 0; + return { next: function() { + if (d >= b.length) + return { done: true }; + var a = b[d++]; + return { value: [a, c2.get(a)], done: false }; + } }; + }; + if (!xrb()) { + e.prototype.createObject = function() { + return {}; + }; + e.prototype.get = function(a) { + return this.obj[":" + a]; + }; + e.prototype.set = function(a, b) { + this.obj[":" + a] = b; + }; + e.prototype[hke] = function(a) { + delete this.obj[":" + a]; + }; + e.prototype.keys = function() { + var a = []; + for (var b in this.obj) { + b.charCodeAt(0) == 58 && a.push(b.substring(1)); + } + return a; + }; + } + return e; + } + function cde(a) { + ade(); + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + if (a == null) + return null; + l = a.length * 8; + if (l == 0) { + return ""; + } + h = l % 24; + n = l / 24 | 0; + m = h != 0 ? n + 1 : n; + f2 = null; + f2 = KC(TD, $ie, 25, m * 4, 15, 1); + j = 0; + k = 0; + b = 0; + c2 = 0; + d = 0; + g = 0; + e = 0; + for (i3 = 0; i3 < n; i3++) { + b = a[e++]; + c2 = a[e++]; + d = a[e++]; + k = (c2 & 15) << 24 >> 24; + j = (b & 3) << 24 >> 24; + o2 = (b & -128) == 0 ? b >> 2 << 24 >> 24 : (b >> 2 ^ 192) << 24 >> 24; + p = (c2 & -128) == 0 ? c2 >> 4 << 24 >> 24 : (c2 >> 4 ^ 240) << 24 >> 24; + q = (d & -128) == 0 ? d >> 6 << 24 >> 24 : (d >> 6 ^ 252) << 24 >> 24; + f2[g++] = _ce[o2]; + f2[g++] = _ce[p | j << 4]; + f2[g++] = _ce[k << 2 | q]; + f2[g++] = _ce[d & 63]; + } + if (h == 8) { + b = a[e]; + j = (b & 3) << 24 >> 24; + o2 = (b & -128) == 0 ? b >> 2 << 24 >> 24 : (b >> 2 ^ 192) << 24 >> 24; + f2[g++] = _ce[o2]; + f2[g++] = _ce[j << 4]; + f2[g++] = 61; + f2[g++] = 61; + } else if (h == 16) { + b = a[e]; + c2 = a[e + 1]; + k = (c2 & 15) << 24 >> 24; + j = (b & 3) << 24 >> 24; + o2 = (b & -128) == 0 ? b >> 2 << 24 >> 24 : (b >> 2 ^ 192) << 24 >> 24; + p = (c2 & -128) == 0 ? c2 >> 4 << 24 >> 24 : (c2 >> 4 ^ 240) << 24 >> 24; + f2[g++] = _ce[o2]; + f2[g++] = _ce[p | j << 4]; + f2[g++] = _ce[k << 2]; + f2[g++] = 61; + } + return zfb(f2, 0, f2.length); + } + function mB(a, b) { + var c2, d, e, f2, g, h, i3; + a.e == 0 && a.p > 0 && (a.p = -(a.p - 1)); + a.p > Rie && dB(b, a.p - nje); + g = b.q.getDate(); + ZA(b, 1); + a.k >= 0 && aB(b, a.k); + if (a.c >= 0) { + ZA(b, a.c); + } else if (a.k >= 0) { + i3 = new fB(b.q.getFullYear() - nje, b.q.getMonth(), 35); + d = 35 - i3.q.getDate(); + ZA(b, $wnd.Math.min(d, g)); + } else { + ZA(b, g); + } + a.f < 0 && (a.f = b.q.getHours()); + a.b > 0 && a.f < 12 && (a.f += 12); + $A(b, a.f == 24 && a.g ? 0 : a.f); + a.j >= 0 && _A(b, a.j); + a.n >= 0 && bB(b, a.n); + a.i >= 0 && cB(b, wbb(Ibb(Abb(Cbb(b.q.getTime()), _ie), _ie), a.i)); + if (a.a) { + e = new eB(); + dB(e, e.q.getFullYear() - nje - 80); + Gbb(Cbb(b.q.getTime()), Cbb(e.q.getTime())) && dB(b, e.q.getFullYear() - nje + 100); + } + if (a.d >= 0) { + if (a.c == -1) { + c2 = (7 + a.d - b.q.getDay()) % 7; + c2 > 3 && (c2 -= 7); + h = b.q.getMonth(); + ZA(b, b.q.getDate() + c2); + b.q.getMonth() != h && ZA(b, b.q.getDate() + (c2 > 0 ? -7 : 7)); + } else { + if (b.q.getDay() != a.d) { + return false; + } + } + } + if (a.o > Rie) { + f2 = b.q.getTimezoneOffset(); + cB(b, wbb(Cbb(b.q.getTime()), (a.o - f2) * 60 * _ie)); + } + return true; + } + function z2b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + e = vNb(b, (wtc(), $sc)); + if (!JD(e, 239)) { + return; + } + o2 = BD(e, 33); + p = b.e; + m = new g7c(b.c); + f2 = b.d; + m.a += f2.b; + m.b += f2.d; + u = BD(hkd(o2, (Nyc(), Ixc)), 174); + if (uqb(u, (Idd(), Add))) { + n = BD(hkd(o2, Kxc), 116); + w_b(n, f2.a); + z_b(n, f2.d); + x_b(n, f2.b); + y_b(n, f2.c); + } + c2 = new Rkb(); + for (k = new olb(b.a); k.a < k.c.c.length; ) { + i3 = BD(mlb(k), 10); + if (JD(vNb(i3, $sc), 239)) { + A2b(i3, m); + } else if (JD(vNb(i3, $sc), 186) && !p) { + d = BD(vNb(i3, $sc), 118); + s = b_b(b, i3, d.g, d.f); + bld(d, s.a, s.b); + } + for (r = new olb(i3.j); r.a < r.c.c.length; ) { + q = BD(mlb(r), 11); + MAb(JAb(new YAb(null, new Kub(q.g, 16)), new G2b(i3)), new I2b(c2)); + } + } + if (p) { + for (r = new olb(p.j); r.a < r.c.c.length; ) { + q = BD(mlb(r), 11); + MAb(JAb(new YAb(null, new Kub(q.g, 16)), new K2b(p)), new M2b(c2)); + } + } + t = BD(hkd(o2, Swc), 218); + for (h = new olb(c2); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + y2b(g, t, m); + } + B2b(b); + for (j = new olb(b.a); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 10); + l = i3.e; + !!l && z2b(a, l); + } + } + function xSb(a) { + r4c(a, new E3c(Q3c(L3c(P3c(M3c(O3c(N3c(new R3c(), ume), "ELK Force"), "Force-based algorithm provided by the Eclipse Layout Kernel. Implements methods that follow physical analogies by simulating forces that move the nodes into a balanced distribution. Currently the original Eades model and the Fruchterman - Reingold model are supported."), new ASb()), ume), qqb((Csd(), zsd), OC(GC(O3, 1), Kie, 237, 0, [xsd]))))); + p4c(a, ume, vme, meb(1)); + p4c(a, ume, wme, 80); + p4c(a, ume, xme, 5); + p4c(a, ume, _le, tme); + p4c(a, ume, yme, meb(1)); + p4c(a, ume, zme, (Bcb(), true)); + p4c(a, ume, ame, lSb); + p4c(a, ume, Ame, Ksd(dSb)); + p4c(a, ume, Bme, Ksd(mSb)); + p4c(a, ume, Cme, false); + p4c(a, ume, Dme, Ksd(jSb)); + p4c(a, ume, Eme, Ksd(iSb)); + p4c(a, ume, Fme, Ksd(hSb)); + p4c(a, ume, Gme, Ksd(gSb)); + p4c(a, ume, Hme, Ksd(nSb)); + p4c(a, ume, mme, Ksd(fSb)); + p4c(a, ume, pme, Ksd(vSb)); + p4c(a, ume, nme, Ksd(eSb)); + p4c(a, ume, rme, Ksd(qSb)); + p4c(a, ume, ome, Ksd(rSb)); + } + function GKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + return; + } + g = BD(Mpb(a.b, b), 124); + i3 = g.i; + h = g.n; + k = KIb(a, b); + d = i3.b - h.b - h.c; + e = g.a.a; + f2 = i3.c + h.b; + n = a.w; + if ((k == (Tbd(), Qbd) || k == Sbd) && BD(BD(Qc(a.r, b), 21), 84).gc() == 1) { + e = k == Qbd ? e - 2 * a.w : e; + k = Pbd; + } + if (d < e && !a.B.Hc((Idd(), Fdd))) { + if (k == Qbd) { + n += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + f2 += n; + } else { + n += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + } + } else { + if (d < e) { + e = k == Qbd ? e - 2 * a.w : e; + k = Pbd; + } + switch (k.g) { + case 3: + f2 += (d - e) / 2; + break; + case 4: + f2 += d - e; + break; + case 0: + c2 = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + n += $wnd.Math.max(0, c2); + f2 += n; + break; + case 1: + c2 = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + n += $wnd.Math.max(0, c2); + } + } + for (m = BD(BD(Qc(a.r, b), 21), 84).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 111); + l.e.a = f2 + l.d.b; + l.e.b = (j = l.b, j.Xe((Y9c(), s9c)) ? j.Hf() == (Ucd(), Acd) ? -j.rf().b - Edb(ED(j.We(s9c))) : Edb(ED(j.We(s9c))) : j.Hf() == (Ucd(), Acd) ? -j.rf().b : 0); + f2 += l.d.b + l.b.rf().a + l.d.c + n; + } + } + function KKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + if (BD(BD(Qc(a.r, b), 21), 84).dc()) { + return; + } + g = BD(Mpb(a.b, b), 124); + i3 = g.i; + h = g.n; + l = KIb(a, b); + d = i3.a - h.d - h.a; + e = g.a.b; + f2 = i3.d + h.d; + o2 = a.w; + j = a.o.a; + if ((l == (Tbd(), Qbd) || l == Sbd) && BD(BD(Qc(a.r, b), 21), 84).gc() == 1) { + e = l == Qbd ? e - 2 * a.w : e; + l = Pbd; + } + if (d < e && !a.B.Hc((Idd(), Fdd))) { + if (l == Qbd) { + o2 += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + f2 += o2; + } else { + o2 += (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + } + } else { + if (d < e) { + e = l == Qbd ? e - 2 * a.w : e; + l = Pbd; + } + switch (l.g) { + case 3: + f2 += (d - e) / 2; + break; + case 4: + f2 += d - e; + break; + case 0: + c2 = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() + 1); + o2 += $wnd.Math.max(0, c2); + f2 += o2; + break; + case 1: + c2 = (d - e) / (BD(BD(Qc(a.r, b), 21), 84).gc() - 1); + o2 += $wnd.Math.max(0, c2); + } + } + for (n = BD(BD(Qc(a.r, b), 21), 84).Kc(); n.Ob(); ) { + m = BD(n.Pb(), 111); + m.e.a = (k = m.b, k.Xe((Y9c(), s9c)) ? k.Hf() == (Ucd(), Tcd) ? -k.rf().a - Edb(ED(k.We(s9c))) : j + Edb(ED(k.We(s9c))) : k.Hf() == (Ucd(), Tcd) ? -k.rf().a : j); + m.e.b = f2 + m.d.d; + f2 += m.d.d + m.b.rf().b + m.d.a + o2; + } + } + function Abc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + a.n = Edb(ED(vNb(a.g, (Nyc(), vyc)))); + a.e = Edb(ED(vNb(a.g, pyc))); + a.i = a.g.b.c.length; + h = a.i - 1; + m = 0; + a.j = 0; + a.k = 0; + a.a = Ou(KC(JI, nie, 19, a.i, 0, 1)); + a.b = Ou(KC(BI, nie, 333, a.i, 7, 1)); + for (g = new olb(a.g.b); g.a < g.c.c.length; ) { + e = BD(mlb(g), 29); + e.p = h; + for (l = new olb(e.a); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + k.p = m; + ++m; + } + --h; + } + a.f = KC(WD, oje, 25, m, 15, 1); + a.c = IC(WD, [nie, oje], [48, 25], 15, [m, 3], 2); + a.o = new Rkb(); + a.p = new Rkb(); + b = 0; + a.d = 0; + for (f2 = new olb(a.g.b); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 29); + h = e.p; + d = 0; + p = 0; + i3 = e.a.c.length; + j = 0; + for (l = new olb(e.a); l.a < l.c.c.length; ) { + k = BD(mlb(l), 10); + m = k.p; + a.f[m] = k.c.p; + j += k.o.b + a.n; + c2 = sr(new Sr(ur(R_b(k).a.Kc(), new Sq()))); + o2 = sr(new Sr(ur(U_b(k).a.Kc(), new Sq()))); + a.c[m][0] = o2 - c2; + a.c[m][1] = c2; + a.c[m][2] = o2; + d += c2; + p += o2; + c2 > 0 && Ekb(a.p, k); + Ekb(a.o, k); + } + b -= d; + n = i3 + b; + j += b * a.e; + Nkb(a.a, h, meb(n)); + Nkb(a.b, h, j); + a.j = $wnd.Math.max(a.j, n); + a.k = $wnd.Math.max(a.k, j); + a.d += b; + b += p; + } + } + function Ucd() { + Ucd = ccb; + var a; + Scd = new Ycd(ole, 0); + Acd = new Ycd(xle, 1); + zcd = new Ycd(yle, 2); + Rcd = new Ycd(zle, 3); + Tcd = new Ycd(Ale, 4); + Fcd = (mmb(), new zob((a = BD(gdb(F1), 9), new xqb(a, BD(_Bb(a, a.length), 9), 0)))); + Gcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, []))); + Bcd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, []))); + Ocd = Up(qqb(Rcd, OC(GC(F1, 1), bne, 61, 0, []))); + Qcd = Up(qqb(Tcd, OC(GC(F1, 1), bne, 61, 0, []))); + Lcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [Rcd]))); + Ecd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, [Tcd]))); + Ncd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [Tcd]))); + Hcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd]))); + Pcd = Up(qqb(Rcd, OC(GC(F1, 1), bne, 61, 0, [Tcd]))); + Ccd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, [Rcd]))); + Kcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd, Tcd]))); + Dcd = Up(qqb(zcd, OC(GC(F1, 1), bne, 61, 0, [Rcd, Tcd]))); + Mcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [Rcd, Tcd]))); + Icd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd, Rcd]))); + Jcd = Up(qqb(Acd, OC(GC(F1, 1), bne, 61, 0, [zcd, Rcd, Tcd]))); + } + function fSc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + if (b.b != 0) { + n = new Psb(); + h = null; + o2 = null; + d = QD($wnd.Math.floor($wnd.Math.log(b.b) * $wnd.Math.LOG10E) + 1); + i3 = 0; + for (t = Jsb(b, 0); t.b != t.d.c; ) { + r = BD(Xsb(t), 86); + if (PD(o2) !== PD(vNb(r, (mTc(), $Sc)))) { + o2 = GD(vNb(r, $Sc)); + i3 = 0; + } + o2 != null ? h = o2 + iSc(i3++, d) : h = iSc(i3++, d); + yNb(r, $Sc, h); + for (q = (e = Jsb(new ZRc(r).a.d, 0), new aSc(e)); Wsb(q.a); ) { + p = BD(Xsb(q.a), 188).c; + Gsb(n, p, n.c.b, n.c); + yNb(p, $Sc, h); + } + } + m = new Lqb(); + for (g = 0; g < h.length - d; g++) { + for (s = Jsb(b, 0); s.b != s.d.c; ) { + r = BD(Xsb(s), 86); + j = qfb(GD(vNb(r, (mTc(), $Sc))), 0, g + 1); + c2 = (j == null ? Wd(irb(m.f, null)) : Crb(m.g, j)) != null ? BD(j == null ? Wd(irb(m.f, null)) : Crb(m.g, j), 19).a + 1 : 1; + Shb(m, j, meb(c2)); + } + } + for (l = new nib(new eib(m).a); l.b; ) { + k = lib(l); + f2 = meb(Ohb(a.a, k.cd()) != null ? BD(Ohb(a.a, k.cd()), 19).a : 0); + Shb(a.a, GD(k.cd()), meb(BD(k.dd(), 19).a + f2.a)); + f2 = BD(Ohb(a.b, k.cd()), 19); + (!f2 || f2.a < BD(k.dd(), 19).a) && Shb(a.b, GD(k.cd()), BD(k.dd(), 19)); + } + fSc(a, n); + } + } + function PCc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + Odd(c2, "Interactive node layering", 1); + d = new Rkb(); + for (n = new olb(b.a); n.a < n.c.c.length; ) { + l = BD(mlb(n), 10); + j = l.n.a; + i3 = j + l.o.a; + i3 = $wnd.Math.max(j + 1, i3); + r = new Bib(d, 0); + e = null; + while (r.b < r.d.gc()) { + p = (sCb(r.b < r.d.gc()), BD(r.d.Xb(r.c = r.b++), 569)); + if (p.c >= i3) { + sCb(r.b > 0); + r.a.Xb(r.c = --r.b); + break; + } else if (p.a > j) { + if (!e) { + Ekb(p.b, l); + p.c = $wnd.Math.min(p.c, j); + p.a = $wnd.Math.max(p.a, i3); + e = p; + } else { + Gkb(e.b, p.b); + e.a = $wnd.Math.max(e.a, p.a); + uib(r); + } + } + } + if (!e) { + e = new TCc(); + e.c = j; + e.a = i3; + Aib(r, e); + Ekb(e.b, l); + } + } + h = b.b; + k = 0; + for (q = new olb(d); q.a < q.c.c.length; ) { + p = BD(mlb(q), 569); + f2 = new H1b(b); + f2.p = k++; + h.c[h.c.length] = f2; + for (o2 = new olb(p.b); o2.a < o2.c.c.length; ) { + l = BD(mlb(o2), 10); + $_b(l, f2); + l.p = 0; + } + } + for (m = new olb(b.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + l.p == 0 && OCc(a, l, b); + } + g = new Bib(h, 0); + while (g.b < g.d.gc()) { + (sCb(g.b < g.d.gc()), BD(g.d.Xb(g.c = g.b++), 29)).a.c.length == 0 && uib(g); + } + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c2); + } + function Snc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + if (b.e.c.length != 0 && c2.e.c.length != 0) { + d = BD(Ikb(b.e, 0), 17).c.i; + g = BD(Ikb(c2.e, 0), 17).c.i; + if (d == g) { + return beb(BD(vNb(BD(Ikb(b.e, 0), 17), (wtc(), Zsc)), 19).a, BD(vNb(BD(Ikb(c2.e, 0), 17), Zsc), 19).a); + } + for (k = a.a, l = 0, m = k.length; l < m; ++l) { + j = k[l]; + if (j == d) { + return 1; + } else if (j == g) { + return -1; + } + } + } + if (b.g.c.length != 0 && c2.g.c.length != 0) { + f2 = BD(vNb(b, (wtc(), Xsc)), 10); + i3 = BD(vNb(c2, Xsc), 10); + e = 0; + h = 0; + wNb(BD(Ikb(b.g, 0), 17), Zsc) && (e = BD(vNb(BD(Ikb(b.g, 0), 17), Zsc), 19).a); + wNb(BD(Ikb(c2.g, 0), 17), Zsc) && (h = BD(vNb(BD(Ikb(b.g, 0), 17), Zsc), 19).a); + if (!!f2 && f2 == i3) { + if (Ccb(DD(vNb(BD(Ikb(b.g, 0), 17), ltc))) && !Ccb(DD(vNb(BD(Ikb(c2.g, 0), 17), ltc)))) { + return 1; + } else if (!Ccb(DD(vNb(BD(Ikb(b.g, 0), 17), ltc))) && Ccb(DD(vNb(BD(Ikb(c2.g, 0), 17), ltc)))) { + return -1; + } + return e < h ? -1 : e > h ? 1 : 0; + } + if (a.b) { + a.b._b(f2) && (e = BD(a.b.xc(f2), 19).a); + a.b._b(i3) && (h = BD(a.b.xc(i3), 19).a); + } + return e < h ? -1 : e > h ? 1 : 0; + } + return b.e.c.length != 0 && c2.g.c.length != 0 ? 1 : -1; + } + function acc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A; + Odd(b, Ine, 1); + p = new Rkb(); + w2 = new Rkb(); + for (j = new olb(a.b); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 29); + r = -1; + o2 = l_b(i3.a); + for (l = o2, m = 0, n = l.length; m < n; ++m) { + k = l[m]; + ++r; + if (!(k.k == (j0b(), h0b) && fcd(BD(vNb(k, (Nyc(), Vxc)), 98)))) { + continue; + } + ecd(BD(vNb(k, (Nyc(), Vxc)), 98)) || bcc(k); + yNb(k, (wtc(), Psc), k); + p.c = KC(SI, Uhe, 1, 0, 5, 1); + w2.c = KC(SI, Uhe, 1, 0, 5, 1); + c2 = new Rkb(); + u = new Psb(); + Jq(u, Y_b(k, (Ucd(), Acd))); + $bc(a, u, p, w2, c2); + h = r; + A = k; + for (f2 = new olb(p); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 10); + Z_b(d, h, i3); + ++r; + yNb(d, Psc, k); + g = BD(Ikb(d.j, 0), 11); + q = BD(vNb(g, $sc), 11); + Ccb(DD(vNb(q, nwc))) || BD(vNb(d, Qsc), 15).Fc(A); + } + Osb(u); + for (t = Y_b(k, Rcd).Kc(); t.Ob(); ) { + s = BD(t.Pb(), 11); + Gsb(u, s, u.a, u.a.a); + } + $bc(a, u, w2, null, c2); + v = k; + for (e = new olb(w2); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + Z_b(d, ++r, i3); + yNb(d, Psc, k); + g = BD(Ikb(d.j, 0), 11); + q = BD(vNb(g, $sc), 11); + Ccb(DD(vNb(q, nwc))) || BD(vNb(v, Qsc), 15).Fc(d); + } + c2.c.length == 0 || yNb(k, ssc, c2); + } + } + Qdd(b); + } + function SQb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I; + l = BD(vNb(a, (HSb(), FSb)), 33); + r = Ohe; + s = Ohe; + p = Rie; + q = Rie; + for (u = new olb(a.e); u.a < u.c.c.length; ) { + t = BD(mlb(u), 144); + C = t.d; + D = t.e; + r = $wnd.Math.min(r, C.a - D.a / 2); + s = $wnd.Math.min(s, C.b - D.b / 2); + p = $wnd.Math.max(p, C.a + D.a / 2); + q = $wnd.Math.max(q, C.b + D.b / 2); + } + B = BD(hkd(l, (wSb(), kSb)), 116); + A = new f7c(B.b - r, B.d - s); + for (h = new olb(a.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 144); + w2 = vNb(g, FSb); + if (JD(w2, 239)) { + n = BD(w2, 33); + v = P6c(g.d, A); + bld(n, v.a - n.g / 2, v.b - n.f / 2); + } + } + for (d = new olb(a.c); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 282); + j = BD(vNb(c2, FSb), 79); + k = itd(j, true, true); + F = (H = c7c(R6c(c2.d.d), c2.c.d), l6c(H, c2.c.e.a, c2.c.e.b), P6c(H, c2.c.d)); + nmd(k, F.a, F.b); + b = (I = c7c(R6c(c2.c.d), c2.d.d), l6c(I, c2.d.e.a, c2.d.e.b), P6c(I, c2.d.d)); + gmd(k, b.a, b.b); + } + for (f2 = new olb(a.d); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 447); + m = BD(vNb(e, FSb), 137); + o2 = P6c(e.d, A); + bld(m, o2.a, o2.b); + } + G = p - r + (B.b + B.c); + i3 = q - s + (B.d + B.a); + Afd(l, G, i3, false, true); + } + function bmc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + c2 = null; + i3 = null; + e = BD(vNb(a.b, (Nyc(), Wwc)), 376); + if (e == (_Ac(), ZAc)) { + c2 = new Rkb(); + i3 = new Rkb(); + } + for (h = new olb(a.d); h.a < h.c.c.length; ) { + g = BD(mlb(h), 101); + f2 = g.i; + if (!f2) { + continue; + } + switch (g.e.g) { + case 0: + b = BD(Fqb(new Gqb(g.b)), 61); + e == ZAc && b == (Ucd(), Acd) ? (c2.c[c2.c.length] = g, true) : e == ZAc && b == (Ucd(), Rcd) ? (i3.c[i3.c.length] = g, true) : _lc(g, b); + break; + case 1: + j = g.a.d.j; + k = g.c.d.j; + j == (Ucd(), Acd) ? amc(g, Acd, (Ajc(), xjc), g.a) : k == Acd ? amc(g, Acd, (Ajc(), yjc), g.c) : j == Rcd ? amc(g, Rcd, (Ajc(), yjc), g.a) : k == Rcd && amc(g, Rcd, (Ajc(), xjc), g.c); + break; + case 2: + case 3: + d = g.b; + uqb(d, (Ucd(), Acd)) ? uqb(d, Rcd) ? uqb(d, Tcd) ? uqb(d, zcd) || amc(g, Acd, (Ajc(), yjc), g.c) : amc(g, Acd, (Ajc(), xjc), g.a) : amc(g, Acd, (Ajc(), wjc), null) : amc(g, Rcd, (Ajc(), wjc), null); + break; + case 4: + l = g.a.d.j; + m = g.a.d.j; + l == (Ucd(), Acd) || m == Acd ? amc(g, Rcd, (Ajc(), wjc), null) : amc(g, Acd, (Ajc(), wjc), null); + } + } + if (c2) { + c2.c.length == 0 || $lc(c2, (Ucd(), Acd)); + i3.c.length == 0 || $lc(i3, (Ucd(), Rcd)); + } + } + function A2b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + d = BD(vNb(a, (wtc(), $sc)), 33); + o2 = BD(vNb(a, (Nyc(), Gwc)), 19).a; + f2 = BD(vNb(a, nxc), 19).a; + jkd(d, Gwc, meb(o2)); + jkd(d, nxc, meb(f2)); + dld(d, a.n.a + b.a); + eld(d, a.n.b + b.b); + if (BD(hkd(d, Fxc), 174).gc() != 0 || !!a.e || PD(vNb(Q_b(a), Exc)) === PD((Vzc(), Tzc)) && Jzc((Izc(), (!a.q ? (mmb(), mmb(), kmb) : a.q)._b(Cxc) ? m = BD(vNb(a, Cxc), 197) : m = BD(vNb(Q_b(a), Dxc), 197), m))) { + cld(d, a.o.a); + ald(d, a.o.b); + } + for (l = new olb(a.j); l.a < l.c.c.length; ) { + j = BD(mlb(l), 11); + p = vNb(j, $sc); + if (JD(p, 186)) { + e = BD(p, 118); + bld(e, j.n.a, j.n.b); + jkd(e, $xc, j.j); + } + } + n = BD(vNb(a, xxc), 174).gc() != 0; + for (i3 = new olb(a.b); i3.a < i3.c.c.length; ) { + g = BD(mlb(i3), 70); + if (n || BD(vNb(g, xxc), 174).gc() != 0) { + c2 = BD(vNb(g, $sc), 137); + _kd(c2, g.o.a, g.o.b); + bld(c2, g.n.a, g.n.b); + } + } + if (!tcd(BD(vNb(a, Yxc), 21))) { + for (k = new olb(a.j); k.a < k.c.c.length; ) { + j = BD(mlb(k), 11); + for (h = new olb(j.f); h.a < h.c.c.length; ) { + g = BD(mlb(h), 70); + c2 = BD(vNb(g, $sc), 137); + cld(c2, g.o.a); + ald(c2, g.o.b); + bld(c2, g.n.a, g.n.b); + } + } + } + } + function gtd(a) { + var b, c2, d, e, f2; + ytb(a, hue2); + switch ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i + (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i) { + case 0: + throw vbb(new Wdb("The edge must have at least one source or target.")); + case 1: + return (!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i == 0 ? Xod(atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82))) : Xod(atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82))); + } + if ((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b).i == 1 && (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c).i == 1) { + e = atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82)); + f2 = atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82)); + if (Xod(e) == Xod(f2)) { + return Xod(e); + } else if (e == Xod(f2)) { + return e; + } else if (f2 == Xod(e)) { + return f2; + } + } + d = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), (!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)]))); + b = atd(BD(Rr(d), 82)); + while (Qr(d)) { + c2 = atd(BD(Rr(d), 82)); + if (c2 != b && !ntd(c2, b)) { + if (Xod(c2) == Xod(b)) { + b = Xod(c2); + } else { + b = htd(b, c2); + if (!b) { + return null; + } + } + } + } + return b; + } + function KNc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + Odd(c2, "Polyline edge routing", 1); + q = Edb(ED(vNb(b, (Nyc(), Uwc)))); + n = Edb(ED(vNb(b, wyc))); + e = Edb(ED(vNb(b, myc))); + d = $wnd.Math.min(1, e / n); + t = 0; + i3 = 0; + if (b.b.c.length != 0) { + u = HNc(BD(Ikb(b.b, 0), 29)); + t = 0.4 * d * u; + } + h = new Bib(b.b, 0); + while (h.b < h.d.gc()) { + g = (sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29)); + f2 = Kq(g, DNc); + f2 && t > 0 && (t -= n); + h_b(g, t); + k = 0; + for (m = new olb(g.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + j = 0; + for (p = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(p); ) { + o2 = BD(Rr(p), 17); + r = A0b(o2.c).b; + s = A0b(o2.d).b; + if (g == o2.d.i.c && !OZb(o2)) { + LNc(o2, t, 0.4 * d * $wnd.Math.abs(r - s)); + if (o2.c.j == (Ucd(), Tcd)) { + r = 0; + s = 0; + } + } + j = $wnd.Math.max(j, $wnd.Math.abs(s - r)); + } + switch (l.k.g) { + case 0: + case 4: + case 1: + case 3: + case 5: + MNc(a, l, t, q); + } + k = $wnd.Math.max(k, j); + } + if (h.b < h.d.gc()) { + u = HNc((sCb(h.b < h.d.gc()), BD(h.d.Xb(h.c = h.b++), 29))); + k = $wnd.Math.max(k, u); + sCb(h.b > 0); + h.a.Xb(h.c = --h.b); + } + i3 = 0.4 * d * k; + !f2 && h.b < h.d.gc() && (i3 += n); + t += g.c.a + i3; + } + a.a.a.$b(); + b.f.a = t; + Qdd(c2); + } + function bic(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s; + k = new Lqb(); + i3 = new Hp(); + for (d = new olb(a.a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 57); + j = tgc(b); + if (j) { + jrb(k.f, j, b); + } else { + s = ugc(b); + if (s) { + for (f2 = new olb(s.k); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 17); + Rc(i3, e, b); + } + } + } + } + for (c2 = new olb(a.a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + j = tgc(b); + if (j) { + for (h = new Sr(ur(U_b(j).a.Kc(), new Sq())); Qr(h); ) { + g = BD(Rr(h), 17); + if (OZb(g)) { + continue; + } + o2 = g.c; + r = g.d; + if ((Ucd(), Lcd).Hc(g.c.j) && Lcd.Hc(g.d.j)) { + continue; + } + p = BD(Ohb(k, g.d.i), 57); + AFb(DFb(CFb(EFb(BFb(new FFb(), 0), 100), a.c[b.a.d]), a.c[p.a.d])); + if (o2.j == Tcd && l1b((z0b(), o2))) { + for (m = BD(Qc(i3, g), 21).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 57); + if (l.d.c < b.d.c) { + n = a.c[l.a.d]; + q = a.c[b.a.d]; + if (n == q) { + continue; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), 1), 100), n), q)); + } + } + } + if (r.j == zcd && g1b((z0b(), r))) { + for (m = BD(Qc(i3, g), 21).Kc(); m.Ob(); ) { + l = BD(m.Pb(), 57); + if (l.d.c > b.d.c) { + n = a.c[b.a.d]; + q = a.c[l.a.d]; + if (n == q) { + continue; + } + AFb(DFb(CFb(EFb(BFb(new FFb(), 1), 100), n), q)); + } + } + } + } + } + } + } + function QEd(a) { + IEd(); + var b, c2, d, e, f2, g, h, i3; + if (a == null) + return null; + e = hfb(a, wfb(37)); + if (e < 0) { + return a; + } else { + i3 = new Wfb(a.substr(0, e)); + b = KC(SD, wte, 25, 4, 15, 1); + h = 0; + d = 0; + for (g = a.length; e < g; e++) { + BCb(e, a.length); + if (a.charCodeAt(e) == 37 && a.length > e + 2 && _Ed((BCb(e + 1, a.length), a.charCodeAt(e + 1)), xEd, yEd) && _Ed((BCb(e + 2, a.length), a.charCodeAt(e + 2)), xEd, yEd)) { + c2 = dFd((BCb(e + 1, a.length), a.charCodeAt(e + 1)), (BCb(e + 2, a.length), a.charCodeAt(e + 2))); + e += 2; + if (d > 0) { + (c2 & 192) == 128 ? b[h++] = c2 << 24 >> 24 : d = 0; + } else if (c2 >= 128) { + if ((c2 & 224) == 192) { + b[h++] = c2 << 24 >> 24; + d = 2; + } else if ((c2 & 240) == 224) { + b[h++] = c2 << 24 >> 24; + d = 3; + } else if ((c2 & 248) == 240) { + b[h++] = c2 << 24 >> 24; + d = 4; + } + } + if (d > 0) { + if (h == d) { + switch (h) { + case 2: { + Kfb(i3, ((b[0] & 31) << 6 | b[1] & 63) & aje); + break; + } + case 3: { + Kfb(i3, ((b[0] & 15) << 12 | (b[1] & 63) << 6 | b[2] & 63) & aje); + break; + } + } + h = 0; + d = 0; + } + } else { + for (f2 = 0; f2 < h; ++f2) { + Kfb(i3, b[f2] & aje); + } + h = 0; + i3.a += String.fromCharCode(c2); + } + } else { + for (f2 = 0; f2 < h; ++f2) { + Kfb(i3, b[f2] & aje); + } + h = 0; + Kfb(i3, (BCb(e, a.length), a.charCodeAt(e))); + } + } + return i3.a; + } + } + function wA(a, b, c2, d, e) { + var f2, g, h; + uA(a, b); + g = b[0]; + f2 = bfb(c2.c, 0); + h = -1; + if (nA(c2)) { + if (d > 0) { + if (g + d > a.length) { + return false; + } + h = rA(a.substr(0, g + d), b); + } else { + h = rA(a, b); + } + } + switch (f2) { + case 71: + h = oA(a, g, OC(GC(ZI, 1), nie, 2, 6, [pje, qje]), b); + e.e = h; + return true; + case 77: + return zA(a, b, e, h, g); + case 76: + return BA(a, b, e, h, g); + case 69: + return xA(a, b, g, e); + case 99: + return AA(a, b, g, e); + case 97: + h = oA(a, g, OC(GC(ZI, 1), nie, 2, 6, ["AM", "PM"]), b); + e.b = h; + return true; + case 121: + return DA(a, b, g, h, c2, e); + case 100: + if (h <= 0) { + return false; + } + e.c = h; + return true; + case 83: + if (h < 0) { + return false; + } + return yA(h, g, b[0], e); + case 104: + h == 12 && (h = 0); + case 75: + case 72: + if (h < 0) { + return false; + } + e.f = h; + e.g = false; + return true; + case 107: + if (h < 0) { + return false; + } + e.f = h; + e.g = true; + return true; + case 109: + if (h < 0) { + return false; + } + e.j = h; + return true; + case 115: + if (h < 0) { + return false; + } + e.n = h; + return true; + case 90: + if (g < a.length && (BCb(g, a.length), a.charCodeAt(g) == 90)) { + ++b[0]; + e.o = 0; + return true; + } + case 122: + case 118: + return CA(a, g, b, e); + default: + return false; + } + } + function vKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + m = BD(BD(Qc(a.r, b), 21), 84); + if (b == (Ucd(), zcd) || b == Tcd) { + zKb(a, b); + return; + } + f2 = b == Acd ? (vLb(), rLb) : (vLb(), uLb); + u = b == Acd ? (EIb(), DIb) : (EIb(), BIb); + c2 = BD(Mpb(a.b, b), 124); + d = c2.i; + e = d.c + w6c(OC(GC(UD, 1), Vje, 25, 15, [c2.n.b, a.C.b, a.k])); + r = d.c + d.b - w6c(OC(GC(UD, 1), Vje, 25, 15, [c2.n.c, a.C.c, a.k])); + g = dLb(iLb(f2), a.t); + s = b == Acd ? Qje : Pje; + for (l = m.Kc(); l.Ob(); ) { + j = BD(l.Pb(), 111); + if (!j.c || j.c.d.c.length <= 0) { + continue; + } + q = j.b.rf(); + p = j.e; + n = j.c; + o2 = n.i; + o2.b = (i3 = n.n, n.e.a + i3.b + i3.c); + o2.a = (h = n.n, n.e.b + h.d + h.a); + ytb(u, lle); + n.f = u; + $Hb(n, (NHb(), MHb)); + o2.c = p.a - (o2.b - q.a) / 2; + v = $wnd.Math.min(e, p.a); + w2 = $wnd.Math.max(r, p.a + q.a); + o2.c < v ? o2.c = v : o2.c + o2.b > w2 && (o2.c = w2 - o2.b); + Ekb(g.d, new BLb(o2, bLb(g, o2))); + s = b == Acd ? $wnd.Math.max(s, p.b + j.b.rf().b) : $wnd.Math.min(s, p.b); + } + s += b == Acd ? a.t : -a.t; + t = cLb((g.e = s, g)); + t > 0 && (BD(Mpb(a.b, b), 124).a.b = t); + for (k = m.Kc(); k.Ob(); ) { + j = BD(k.Pb(), 111); + if (!j.c || j.c.d.c.length <= 0) { + continue; + } + o2 = j.c.i; + o2.c -= j.e.a; + o2.d -= j.e.b; + } + } + function SPb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n; + b = new Lqb(); + for (i3 = new Fyd(a); i3.e != i3.i.gc(); ) { + h = BD(Dyd(i3), 33); + c2 = new Tqb(); + Rhb(OPb, h, c2); + n = new aQb(); + e = BD(GAb(new YAb(null, new Lub(new Sr(ur($sd(h).a.Kc(), new Sq())))), Wyb(n, Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [(Fyb(), Dyb)])))), 83); + RPb(c2, BD(e.xc((Bcb(), true)), 14), new cQb()); + d = BD(GAb(JAb(BD(e.xc(false), 15).Lc(), new eQb()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [Dyb]))), 15); + for (g = d.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 79); + m = ktd(f2); + if (m) { + j = BD(Wd(irb(b.f, m)), 21); + if (!j) { + j = UPb(m); + jrb(b.f, m, j); + } + ye(c2, j); + } + } + e = BD(GAb(new YAb(null, new Lub(new Sr(ur(_sd(h).a.Kc(), new Sq())))), Wyb(n, Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [Dyb])))), 83); + RPb(c2, BD(e.xc(true), 14), new gQb()); + d = BD(GAb(JAb(BD(e.xc(false), 15).Lc(), new iQb()), Byb(new fzb(), new dzb(), new Ezb(), OC(GC(xL, 1), Kie, 132, 0, [Dyb]))), 15); + for (l = d.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 79); + m = mtd(k); + if (m) { + j = BD(Wd(irb(b.f, m)), 21); + if (!j) { + j = UPb(m); + jrb(b.f, m, j); + } + ye(c2, j); + } + } + } + } + function rhb(a, b) { + phb(); + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + i3 = ybb(a, 0) < 0; + i3 && (a = Jbb(a)); + if (ybb(a, 0) == 0) { + switch (b) { + case 0: + return "0"; + case 1: + return $je; + case 2: + return "0.00"; + case 3: + return "0.000"; + case 4: + return "0.0000"; + case 5: + return "0.00000"; + case 6: + return "0.000000"; + default: + n = new Ufb(); + b < 0 ? (n.a += "0E+", n) : (n.a += "0E", n); + n.a += b == Rie ? "2147483648" : "" + -b; + return n.a; + } + } + k = 18; + l = KC(TD, $ie, 25, k + 1, 15, 1); + c2 = k; + p = a; + do { + j = p; + p = Abb(p, 10); + l[--c2] = Tbb(wbb(48, Qbb(j, Ibb(p, 10)))) & aje; + } while (ybb(p, 0) != 0); + e = Qbb(Qbb(Qbb(k, c2), b), 1); + if (b == 0) { + i3 && (l[--c2] = 45); + return zfb(l, c2, k - c2); + } + if (b > 0 && ybb(e, -6) >= 0) { + if (ybb(e, 0) >= 0) { + f2 = c2 + Tbb(e); + for (h = k - 1; h >= f2; h--) { + l[h + 1] = l[h]; + } + l[++f2] = 46; + i3 && (l[--c2] = 45); + return zfb(l, c2, k - c2 + 1); + } + for (g = 2; Gbb(g, wbb(Jbb(e), 1)); g++) { + l[--c2] = 48; + } + l[--c2] = 46; + l[--c2] = 48; + i3 && (l[--c2] = 45); + return zfb(l, c2, k - c2); + } + o2 = c2 + 1; + d = k; + m = new Vfb(); + i3 && (m.a += "-", m); + if (d - o2 >= 1) { + Kfb(m, l[c2]); + m.a += "."; + m.a += zfb(l, c2 + 1, k - c2 - 1); + } else { + m.a += zfb(l, c2, k - c2); + } + m.a += "E"; + ybb(e, 0) > 0 && (m.a += "+", m); + m.a += "" + Ubb(e); + return m.a; + } + function iQc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + a.e.a.$b(); + a.f.a.$b(); + a.c.c = KC(SI, Uhe, 1, 0, 5, 1); + a.i.c = KC(SI, Uhe, 1, 0, 5, 1); + a.g.a.$b(); + if (b) { + for (g = new olb(b.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + for (l = Y_b(f2, (Ucd(), zcd)).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + Qqb(a.e, k); + for (e = new olb(k.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (OZb(d)) { + continue; + } + Ekb(a.c, d); + oQc(a, d); + h = d.c.i.k; + (h == (j0b(), h0b) || h == i0b || h == e0b || h == d0b) && Ekb(a.j, d); + n = d.d; + m = n.i.c; + m == c2 ? Qqb(a.f, n) : m == b ? Qqb(a.e, n) : Lkb(a.c, d); + } + } + } + } + if (c2) { + for (g = new olb(c2.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 10); + for (j = new olb(f2.j); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 11); + for (e = new olb(i3.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + OZb(d) && Qqb(a.g, d); + } + } + for (l = Y_b(f2, (Ucd(), Tcd)).Kc(); l.Ob(); ) { + k = BD(l.Pb(), 11); + Qqb(a.f, k); + for (e = new olb(k.g); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + if (OZb(d)) { + continue; + } + Ekb(a.c, d); + oQc(a, d); + h = d.c.i.k; + (h == (j0b(), h0b) || h == i0b || h == e0b || h == d0b) && Ekb(a.j, d); + n = d.d; + m = n.i.c; + m == c2 ? Qqb(a.f, n) : m == b ? Qqb(a.e, n) : Lkb(a.c, d); + } + } + } + } + } + function Afd(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + q = new f7c(a.g, a.f); + p = rfd(a); + p.a = $wnd.Math.max(p.a, b); + p.b = $wnd.Math.max(p.b, c2); + w2 = p.a / q.a; + k = p.b / q.b; + u = p.a - q.a; + i3 = p.b - q.b; + if (d) { + g = !Xod(a) ? BD(hkd(a, (Y9c(), z8c)), 103) : BD(hkd(Xod(a), (Y9c(), z8c)), 103); + h = PD(hkd(a, (Y9c(), t9c))) === PD((dcd(), $bd)); + for (s = new Fyd((!a.c && (a.c = new cUd(F2, a, 9, 9)), a.c)); s.e != s.i.gc(); ) { + r = BD(Dyd(s), 118); + t = BD(hkd(r, A9c), 61); + if (t == (Ucd(), Scd)) { + t = lfd(r, g); + jkd(r, A9c, t); + } + switch (t.g) { + case 1: + h || dld(r, r.i * w2); + break; + case 2: + dld(r, r.i + u); + h || eld(r, r.j * k); + break; + case 3: + h || dld(r, r.i * w2); + eld(r, r.j + i3); + break; + case 4: + h || eld(r, r.j * k); + } + } + } + _kd(a, p.a, p.b); + if (e) { + for (m = new Fyd((!a.n && (a.n = new cUd(D2, a, 1, 7)), a.n)); m.e != m.i.gc(); ) { + l = BD(Dyd(m), 137); + n = l.i + l.g / 2; + o2 = l.j + l.f / 2; + v = n / q.a; + j = o2 / q.b; + if (v + j >= 1) { + if (v - j > 0 && o2 >= 0) { + dld(l, l.i + u); + eld(l, l.j + i3 * j); + } else if (v - j < 0 && n >= 0) { + dld(l, l.i + u * v); + eld(l, l.j + i3); + } + } + } + } + jkd(a, (Y9c(), Y8c), (tdd(), f2 = BD(gdb(I1), 9), new xqb(f2, BD(_Bb(f2, f2.length), 9), 0))); + return new f7c(w2, k); + } + function Yfd(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + n = Xod(atd(BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82))); + o2 = Xod(atd(BD(qud((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c), 0), 82))); + l = n == o2; + h = new d7c(); + b = BD(hkd(a, (Zad(), Sad)), 74); + if (!!b && b.b >= 2) { + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i == 0) { + c2 = (Fhd(), e = new rmd(), e); + wtd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), c2); + } else if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i > 1) { + m = new Oyd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a)); + while (m.e != m.i.gc()) { + Eyd(m); + } + } + ifd(b, BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202)); + } + if (l) { + for (d = new Fyd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a)); d.e != d.i.gc(); ) { + c2 = BD(Dyd(d), 202); + for (j = new Fyd((!c2.a && (c2.a = new xMd(y2, c2, 5)), c2.a)); j.e != j.i.gc(); ) { + i3 = BD(Dyd(j), 469); + h.a = $wnd.Math.max(h.a, i3.a); + h.b = $wnd.Math.max(h.b, i3.b); + } + } + } + for (g = new Fyd((!a.n && (a.n = new cUd(D2, a, 1, 7)), a.n)); g.e != g.i.gc(); ) { + f2 = BD(Dyd(g), 137); + k = BD(hkd(f2, Yad), 8); + !!k && bld(f2, k.a, k.b); + if (l) { + h.a = $wnd.Math.max(h.a, f2.i + f2.g); + h.b = $wnd.Math.max(h.b, f2.j + f2.f); + } + } + return h; + } + function yMc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B; + t = b.c.length; + e = new ULc(a.a, c2, null, null); + B = KC(UD, Vje, 25, t, 15, 1); + p = KC(UD, Vje, 25, t, 15, 1); + o2 = KC(UD, Vje, 25, t, 15, 1); + q = 0; + for (h = 0; h < t; h++) { + p[h] = Ohe; + o2[h] = Rie; + } + for (i3 = 0; i3 < t; i3++) { + d = (tCb(i3, b.c.length), BD(b.c[i3], 180)); + B[i3] = SLc(d); + B[q] > B[i3] && (q = i3); + for (l = new olb(a.a.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 29); + for (s = new olb(k.a); s.a < s.c.c.length; ) { + r = BD(mlb(s), 10); + w2 = Edb(d.p[r.p]) + Edb(d.d[r.p]); + p[i3] = $wnd.Math.min(p[i3], w2); + o2[i3] = $wnd.Math.max(o2[i3], w2 + r.o.b); + } + } + } + A = KC(UD, Vje, 25, t, 15, 1); + for (j = 0; j < t; j++) { + (tCb(j, b.c.length), BD(b.c[j], 180)).o == (eMc(), cMc) ? A[j] = p[q] - p[j] : A[j] = o2[q] - o2[j]; + } + f2 = KC(UD, Vje, 25, t, 15, 1); + for (n = new olb(a.a.b); n.a < n.c.c.length; ) { + m = BD(mlb(n), 29); + for (v = new olb(m.a); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + for (g = 0; g < t; g++) { + f2[g] = Edb((tCb(g, b.c.length), BD(b.c[g], 180)).p[u.p]) + Edb((tCb(g, b.c.length), BD(b.c[g], 180)).d[u.p]) + A[g]; + } + f2.sort(dcb(Ylb.prototype.te, Ylb, [])); + e.p[u.p] = (f2[1] + f2[2]) / 2; + e.d[u.p] = 0; + } + } + return e; + } + function G3b(a, b, c2) { + var d, e, f2, g, h; + d = b.i; + f2 = a.i.o; + e = a.i.d; + h = a.n; + g = l7c(OC(GC(m1, 1), nie, 8, 0, [h, a.a])); + switch (a.j.g) { + case 1: + _Hb(b, (EIb(), BIb)); + d.d = -e.d - c2 - d.a; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + $Hb(b, (NHb(), MHb)); + d.c = g.a - Edb(ED(vNb(a, Ysc))) - c2 - d.b; + } else { + $Hb(b, (NHb(), LHb)); + d.c = g.a + Edb(ED(vNb(a, Ysc))) + c2; + } + break; + case 2: + $Hb(b, (NHb(), LHb)); + d.c = f2.a + e.c + c2; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + _Hb(b, (EIb(), BIb)); + d.d = g.b - Edb(ED(vNb(a, Ysc))) - c2 - d.a; + } else { + _Hb(b, (EIb(), DIb)); + d.d = g.b + Edb(ED(vNb(a, Ysc))) + c2; + } + break; + case 3: + _Hb(b, (EIb(), DIb)); + d.d = f2.b + e.a + c2; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + $Hb(b, (NHb(), MHb)); + d.c = g.a - Edb(ED(vNb(a, Ysc))) - c2 - d.b; + } else { + $Hb(b, (NHb(), LHb)); + d.c = g.a + Edb(ED(vNb(a, Ysc))) + c2; + } + break; + case 4: + $Hb(b, (NHb(), MHb)); + d.c = -e.b - c2 - d.b; + if (BD(BD(Ikb(b.d, 0), 181).We((wtc(), Ssc)), 285) == (rbd(), nbd)) { + _Hb(b, (EIb(), BIb)); + d.d = g.b - Edb(ED(vNb(a, Ysc))) - c2 - d.a; + } else { + _Hb(b, (EIb(), DIb)); + d.d = g.b + Edb(ED(vNb(a, Ysc))) + c2; + } + } + } + function ded(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I; + n = 0; + D = 0; + for (i3 = new olb(a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 33); + zfd(h); + n = $wnd.Math.max(n, h.g); + D += h.g * h.f; + } + o2 = D / a.c.length; + C = $dd(a, o2); + D += a.c.length * C; + n = $wnd.Math.max(n, $wnd.Math.sqrt(D * g)) + c2.b; + H = c2.b; + I = c2.d; + m = 0; + k = c2.b + c2.c; + B = new Psb(); + Dsb(B, meb(0)); + w2 = new Psb(); + j = new Bib(a, 0); + while (j.b < j.d.gc()) { + h = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 33)); + G = h.g; + l = h.f; + if (H + G > n) { + if (f2) { + Fsb(w2, m); + Fsb(B, meb(j.b - 1)); + } + H = c2.b; + I += m + b; + m = 0; + k = $wnd.Math.max(k, c2.b + c2.c + G); + } + dld(h, H); + eld(h, I); + k = $wnd.Math.max(k, H + G + c2.c); + m = $wnd.Math.max(m, l); + H += G + b; + } + k = $wnd.Math.max(k, d); + F = I + m + c2.a; + if (F < e) { + m += e - F; + F = e; + } + if (f2) { + H = c2.b; + j = new Bib(a, 0); + Fsb(B, meb(a.c.length)); + A = Jsb(B, 0); + r = BD(Xsb(A), 19).a; + Fsb(w2, m); + v = Jsb(w2, 0); + u = 0; + while (j.b < j.d.gc()) { + if (j.b == r) { + H = c2.b; + u = Edb(ED(Xsb(v))); + r = BD(Xsb(A), 19).a; + } + h = (sCb(j.b < j.d.gc()), BD(j.d.Xb(j.c = j.b++), 33)); + s = h.f; + ald(h, u); + p = u; + if (j.b == r) { + q = k - H - c2.c; + t = h.g; + cld(h, q); + Ffd(h, new f7c(q, p), new f7c(t, s)); + } + H += h.g + b; + } + } + return new f7c(k, F); + } + function _Yb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C; + Odd(b, "Compound graph postprocessor", 1); + c2 = Ccb(DD(vNb(a, (Nyc(), Byc)))); + h = BD(vNb(a, (wtc(), zsc)), 224); + k = new Tqb(); + for (r = h.ec().Kc(); r.Ob(); ) { + q = BD(r.Pb(), 17); + g = new Tkb(h.cc(q)); + mmb(); + Okb(g, new EZb(a)); + v = zZb((tCb(0, g.c.length), BD(g.c[0], 243))); + A = AZb(BD(Ikb(g, g.c.length - 1), 243)); + t = v.i; + f_b(A.i, t) ? s = t.e : s = Q_b(t); + l = aZb(q, g); + Osb(q.a); + m = null; + for (f2 = new olb(g); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 243); + p = new d7c(); + Y$b(p, e.a, s); + n = e.b; + d = new s7c(); + o7c(d, 0, n.a); + q7c(d, p); + u = new g7c(A0b(n.c)); + w2 = new g7c(A0b(n.d)); + P6c(u, p); + P6c(w2, p); + if (m) { + d.b == 0 ? o2 = w2 : o2 = (sCb(d.b != 0), BD(d.a.a.c, 8)); + B = $wnd.Math.abs(m.a - o2.a) > qme; + C = $wnd.Math.abs(m.b - o2.b) > qme; + (!c2 && B && C || c2 && (B || C)) && Dsb(q.a, u); + } + ye(q.a, d); + d.b == 0 ? m = u : m = (sCb(d.b != 0), BD(d.c.b.c, 8)); + bZb(n, l, p); + if (AZb(e) == A) { + if (Q_b(A.i) != e.a) { + p = new d7c(); + Y$b(p, Q_b(A.i), s); + } + yNb(q, utc, p); + } + cZb(n, q, s); + k.a.zc(n, k); + } + QZb(q, v); + RZb(q, A); + } + for (j = k.a.ec().Kc(); j.Ob(); ) { + i3 = BD(j.Pb(), 17); + QZb(i3, null); + RZb(i3, null); + } + Qdd(b); + } + function KQb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + if (a.gc() == 1) { + return BD(a.Xb(0), 231); + } else if (a.gc() <= 0) { + return new kRb(); + } + for (e = a.Kc(); e.Ob(); ) { + c2 = BD(e.Pb(), 231); + o2 = 0; + k = Ohe; + l = Ohe; + i3 = Rie; + j = Rie; + for (n = new olb(c2.e); n.a < n.c.c.length; ) { + m = BD(mlb(n), 144); + o2 += BD(vNb(m, (wSb(), oSb)), 19).a; + k = $wnd.Math.min(k, m.d.a - m.e.a / 2); + l = $wnd.Math.min(l, m.d.b - m.e.b / 2); + i3 = $wnd.Math.max(i3, m.d.a + m.e.a / 2); + j = $wnd.Math.max(j, m.d.b + m.e.b / 2); + } + yNb(c2, (wSb(), oSb), meb(o2)); + yNb(c2, (HSb(), ESb), new f7c(k, l)); + yNb(c2, DSb, new f7c(i3, j)); + } + mmb(); + a.ad(new OQb()); + p = new kRb(); + tNb(p, BD(a.Xb(0), 94)); + h = 0; + s = 0; + for (f2 = a.Kc(); f2.Ob(); ) { + c2 = BD(f2.Pb(), 231); + q = c7c(R6c(BD(vNb(c2, (HSb(), DSb)), 8)), BD(vNb(c2, ESb), 8)); + h = $wnd.Math.max(h, q.a); + s += q.a * q.b; + } + h = $wnd.Math.max(h, $wnd.Math.sqrt(s) * Edb(ED(vNb(p, (wSb(), bSb))))); + r = Edb(ED(vNb(p, uSb))); + t = 0; + u = 0; + g = 0; + b = r; + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 231); + q = c7c(R6c(BD(vNb(c2, (HSb(), DSb)), 8)), BD(vNb(c2, ESb), 8)); + if (t + q.a > h) { + t = 0; + u += g + r; + g = 0; + } + JQb(p, c2, t, u); + b = $wnd.Math.max(b, t + q.a); + g = $wnd.Math.max(g, q.b); + t += q.a + r; + } + return p; + } + function Ioc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + k = new s7c(); + switch (a.a.g) { + case 3: + m = BD(vNb(b.e, (wtc(), rtc)), 15); + n = BD(vNb(b.j, rtc), 15); + o2 = BD(vNb(b.f, rtc), 15); + c2 = BD(vNb(b.e, ptc), 15); + d = BD(vNb(b.j, ptc), 15); + e = BD(vNb(b.f, ptc), 15); + g = new Rkb(); + Gkb(g, m); + n.Jc(new Loc()); + Gkb(g, JD(n, 152) ? km(BD(n, 152)) : JD(n, 131) ? BD(n, 131).a : JD(n, 54) ? new ov(n) : new dv(n)); + Gkb(g, o2); + f2 = new Rkb(); + Gkb(f2, c2); + Gkb(f2, JD(d, 152) ? km(BD(d, 152)) : JD(d, 131) ? BD(d, 131).a : JD(d, 54) ? new ov(d) : new dv(d)); + Gkb(f2, e); + yNb(b.f, rtc, g); + yNb(b.f, ptc, f2); + yNb(b.f, stc, b.f); + yNb(b.e, rtc, null); + yNb(b.e, ptc, null); + yNb(b.j, rtc, null); + yNb(b.j, ptc, null); + break; + case 1: + ye(k, b.e.a); + Dsb(k, b.i.n); + ye(k, Su(b.j.a)); + Dsb(k, b.a.n); + ye(k, b.f.a); + break; + default: + ye(k, b.e.a); + ye(k, Su(b.j.a)); + ye(k, b.f.a); + } + Osb(b.f.a); + ye(b.f.a, k); + QZb(b.f, b.e.c); + h = BD(vNb(b.e, (Nyc(), jxc)), 74); + j = BD(vNb(b.j, jxc), 74); + i3 = BD(vNb(b.f, jxc), 74); + if (!!h || !!j || !!i3) { + l = new s7c(); + Goc(l, i3); + Goc(l, j); + Goc(l, h); + yNb(b.f, jxc, l); + } + QZb(b.j, null); + RZb(b.j, null); + QZb(b.e, null); + RZb(b.e, null); + $_b(b.a, null); + $_b(b.i, null); + !!b.g && Ioc(a, b.g); + } + function bde(a) { + ade(); + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + if (a == null) + return null; + f2 = rfb(a); + o2 = ede(f2); + if (o2 % 4 != 0) { + return null; + } + p = o2 / 4 | 0; + if (p == 0) + return KC(SD, wte, 25, 0, 15, 1); + l = null; + b = 0; + c2 = 0; + d = 0; + e = 0; + g = 0; + h = 0; + i3 = 0; + j = 0; + n = 0; + m = 0; + k = 0; + l = KC(SD, wte, 25, p * 3, 15, 1); + for (; n < p - 1; n++) { + if (!dde(g = f2[k++]) || !dde(h = f2[k++]) || !dde(i3 = f2[k++]) || !dde(j = f2[k++])) + return null; + b = $ce[g]; + c2 = $ce[h]; + d = $ce[i3]; + e = $ce[j]; + l[m++] = (b << 2 | c2 >> 4) << 24 >> 24; + l[m++] = ((c2 & 15) << 4 | d >> 2 & 15) << 24 >> 24; + l[m++] = (d << 6 | e) << 24 >> 24; + } + if (!dde(g = f2[k++]) || !dde(h = f2[k++])) { + return null; + } + b = $ce[g]; + c2 = $ce[h]; + i3 = f2[k++]; + j = f2[k++]; + if ($ce[i3] == -1 || $ce[j] == -1) { + if (i3 == 61 && j == 61) { + if ((c2 & 15) != 0) + return null; + q = KC(SD, wte, 25, n * 3 + 1, 15, 1); + $fb(l, 0, q, 0, n * 3); + q[m] = (b << 2 | c2 >> 4) << 24 >> 24; + return q; + } else if (i3 != 61 && j == 61) { + d = $ce[i3]; + if ((d & 3) != 0) + return null; + q = KC(SD, wte, 25, n * 3 + 2, 15, 1); + $fb(l, 0, q, 0, n * 3); + q[m++] = (b << 2 | c2 >> 4) << 24 >> 24; + q[m] = ((c2 & 15) << 4 | d >> 2 & 15) << 24 >> 24; + return q; + } else { + return null; + } + } else { + d = $ce[i3]; + e = $ce[j]; + l[m++] = (b << 2 | c2 >> 4) << 24 >> 24; + l[m++] = ((c2 & 15) << 4 | d >> 2 & 15) << 24 >> 24; + l[m++] = (d << 6 | e) << 24 >> 24; + } + return l; + } + function Sbc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v; + Odd(b, Ine, 1); + o2 = BD(vNb(a, (Nyc(), Swc)), 218); + for (e = new olb(a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 29); + j = l_b(d.a); + for (g = j, h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + if (f2.k != (j0b(), i0b)) { + continue; + } + if (o2 == (Aad(), yad)) { + for (l = new olb(f2.j); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + k.e.c.length == 0 || Vbc(k); + k.g.c.length == 0 || Wbc(k); + } + } else if (JD(vNb(f2, (wtc(), $sc)), 17)) { + q = BD(vNb(f2, $sc), 17); + r = BD(Y_b(f2, (Ucd(), Tcd)).Kc().Pb(), 11); + s = BD(Y_b(f2, zcd).Kc().Pb(), 11); + t = BD(vNb(r, $sc), 11); + u = BD(vNb(s, $sc), 11); + QZb(q, u); + RZb(q, t); + v = new g7c(s.i.n); + v.a = l7c(OC(GC(m1, 1), nie, 8, 0, [u.i.n, u.n, u.a])).a; + Dsb(q.a, v); + v = new g7c(r.i.n); + v.a = l7c(OC(GC(m1, 1), nie, 8, 0, [t.i.n, t.n, t.a])).a; + Dsb(q.a, v); + } else { + if (f2.j.c.length >= 2) { + p = true; + m = new olb(f2.j); + c2 = BD(mlb(m), 11); + n = null; + while (m.a < m.c.c.length) { + n = c2; + c2 = BD(mlb(m), 11); + if (!pb(vNb(n, $sc), vNb(c2, $sc))) { + p = false; + break; + } + } + } else { + p = false; + } + for (l = new olb(f2.j); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + k.e.c.length == 0 || Tbc(k, p); + k.g.c.length == 0 || Ubc(k, p); + } + } + $_b(f2, null); + } + } + Qdd(b); + } + function KJc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B; + t = a.c[(tCb(0, b.c.length), BD(b.c[0], 17)).p]; + A = a.c[(tCb(1, b.c.length), BD(b.c[1], 17)).p]; + if (t.a.e.e - t.a.a - (t.b.e.e - t.b.a) == 0 && A.a.e.e - A.a.a - (A.b.e.e - A.b.a) == 0) { + return false; + } + r = t.b.e.f; + if (!JD(r, 10)) { + return false; + } + q = BD(r, 10); + v = a.i[q.p]; + w2 = !q.c ? -1 : Jkb(q.c.a, q, 0); + f2 = Pje; + if (w2 > 0) { + e = BD(Ikb(q.c.a, w2 - 1), 10); + g = a.i[e.p]; + B = $wnd.Math.ceil(jBc(a.n, e, q)); + f2 = v.a.e - q.d.d - (g.a.e + e.o.b + e.d.a) - B; + } + j = Pje; + if (w2 < q.c.a.c.length - 1) { + i3 = BD(Ikb(q.c.a, w2 + 1), 10); + k = a.i[i3.p]; + B = $wnd.Math.ceil(jBc(a.n, i3, q)); + j = k.a.e - i3.d.d - (v.a.e + q.o.b + q.d.a) - B; + } + if (c2 && (Iy(), My(Jqe), $wnd.Math.abs(f2 - j) <= Jqe || f2 == j || isNaN(f2) && isNaN(j))) { + return true; + } + d = gKc(t.a); + h = -gKc(t.b); + l = -gKc(A.a); + s = gKc(A.b); + p = t.a.e.e - t.a.a - (t.b.e.e - t.b.a) > 0 && A.a.e.e - A.a.a - (A.b.e.e - A.b.a) < 0; + o2 = t.a.e.e - t.a.a - (t.b.e.e - t.b.a) < 0 && A.a.e.e - A.a.a - (A.b.e.e - A.b.a) > 0; + n = t.a.e.e + t.b.a < A.b.e.e + A.a.a; + m = t.a.e.e + t.b.a > A.b.e.e + A.a.a; + u = 0; + !p && !o2 && (m ? f2 + l > 0 ? u = l : j - d > 0 && (u = d) : n && (f2 + h > 0 ? u = h : j - s > 0 && (u = s))); + v.a.e += u; + v.b && (v.d.e += u); + return false; + } + function XGb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + d = new J6c(b.qf().a, b.qf().b, b.rf().a, b.rf().b); + e = new I6c(); + if (a.c) { + for (g = new olb(b.wf()); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 181); + e.c = f2.qf().a + b.qf().a; + e.d = f2.qf().b + b.qf().b; + e.b = f2.rf().a; + e.a = f2.rf().b; + H6c(d, e); + } + } + for (j = new olb(b.Cf()); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 838); + k = i3.qf().a + b.qf().a; + l = i3.qf().b + b.qf().b; + if (a.e) { + e.c = k; + e.d = l; + e.b = i3.rf().a; + e.a = i3.rf().b; + H6c(d, e); + } + if (a.d) { + for (g = new olb(i3.wf()); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 181); + e.c = f2.qf().a + k; + e.d = f2.qf().b + l; + e.b = f2.rf().a; + e.a = f2.rf().b; + H6c(d, e); + } + } + if (a.b) { + m = new f7c(-c2, -c2); + if (BD(b.We((Y9c(), x9c)), 174).Hc((rcd(), pcd))) { + for (g = new olb(i3.wf()); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 181); + m.a += f2.rf().a + c2; + m.b += f2.rf().b + c2; + } + } + m.a = $wnd.Math.max(m.a, 0); + m.b = $wnd.Math.max(m.b, 0); + VGb(d, i3.Bf(), i3.zf(), b, i3, m, c2); + } + } + a.b && VGb(d, b.Bf(), b.zf(), b, null, null, c2); + h = new K_b(b.Af()); + h.d = $wnd.Math.max(0, b.qf().b - d.d); + h.a = $wnd.Math.max(0, d.d + d.a - (b.qf().b + b.rf().b)); + h.b = $wnd.Math.max(0, b.qf().a - d.c); + h.c = $wnd.Math.max(0, d.c + d.b - (b.qf().a + b.rf().a)); + b.Ef(h); + } + function wz() { + var a = ["\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000B", "\\f", "\\r", "\\u000E", "\\u000F", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D", "\\u001E", "\\u001F"]; + a[34] = '\\"'; + a[92] = "\\\\"; + a[173] = "\\u00ad"; + a[1536] = "\\u0600"; + a[1537] = "\\u0601"; + a[1538] = "\\u0602"; + a[1539] = "\\u0603"; + a[1757] = "\\u06dd"; + a[1807] = "\\u070f"; + a[6068] = "\\u17b4"; + a[6069] = "\\u17b5"; + a[8203] = "\\u200b"; + a[8204] = "\\u200c"; + a[8205] = "\\u200d"; + a[8206] = "\\u200e"; + a[8207] = "\\u200f"; + a[8232] = "\\u2028"; + a[8233] = "\\u2029"; + a[8234] = "\\u202a"; + a[8235] = "\\u202b"; + a[8236] = "\\u202c"; + a[8237] = "\\u202d"; + a[8238] = "\\u202e"; + a[8288] = "\\u2060"; + a[8289] = "\\u2061"; + a[8290] = "\\u2062"; + a[8291] = "\\u2063"; + a[8292] = "\\u2064"; + a[8298] = "\\u206a"; + a[8299] = "\\u206b"; + a[8300] = "\\u206c"; + a[8301] = "\\u206d"; + a[8302] = "\\u206e"; + a[8303] = "\\u206f"; + a[65279] = "\\ufeff"; + a[65529] = "\\ufff9"; + a[65530] = "\\ufffa"; + a[65531] = "\\ufffb"; + return a; + } + function pid(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m; + i3 = new Rkb(); + l = b.length; + g = AUd(c2); + for (j = 0; j < l; ++j) { + k = ifb(b, wfb(61), j); + d = $hd(g, b.substr(j, k - j)); + e = KJd(d); + f2 = e.Aj().Nh(); + switch (bfb(b, ++k)) { + case 39: { + h = gfb(b, 39, ++k); + Ekb(i3, new kGd(d, Pid(b.substr(k, h - k), f2, e))); + j = h + 1; + break; + } + case 34: { + h = gfb(b, 34, ++k); + Ekb(i3, new kGd(d, Pid(b.substr(k, h - k), f2, e))); + j = h + 1; + break; + } + case 91: { + m = new Rkb(); + Ekb(i3, new kGd(d, m)); + n: + for (; ; ) { + switch (bfb(b, ++k)) { + case 39: { + h = gfb(b, 39, ++k); + Ekb(m, Pid(b.substr(k, h - k), f2, e)); + k = h + 1; + break; + } + case 34: { + h = gfb(b, 34, ++k); + Ekb(m, Pid(b.substr(k, h - k), f2, e)); + k = h + 1; + break; + } + case 110: { + ++k; + if (b.indexOf("ull", k) == k) { + m.c[m.c.length] = null; + } else { + throw vbb(new hz(kte)); + } + k += 3; + break; + } + } + if (k < l) { + switch (BCb(k, b.length), b.charCodeAt(k)) { + case 44: { + break; + } + case 93: { + break n; + } + default: { + throw vbb(new hz("Expecting , or ]")); + } + } + } else { + break; + } + } + j = k + 1; + break; + } + case 110: { + ++k; + if (b.indexOf("ull", k) == k) { + Ekb(i3, new kGd(d, null)); + } else { + throw vbb(new hz(kte)); + } + j = k + 3; + break; + } + } + if (j < l) { + BCb(j, b.length); + if (b.charCodeAt(j) != 44) { + throw vbb(new hz("Expecting ,")); + } + } else { + break; + } + } + return qid(a, i3, c2); + } + function AKb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + j = BD(BD(Qc(a.r, b), 21), 84); + g = bKb(a, b); + c2 = a.u.Hc((rcd(), lcd)); + for (i3 = j.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 111); + if (!h.c || h.c.d.c.length <= 0) { + continue; + } + m = h.b.rf(); + k = h.c; + l = k.i; + l.b = (f2 = k.n, k.e.a + f2.b + f2.c); + l.a = (e = k.n, k.e.b + e.d + e.a); + switch (b.g) { + case 1: + if (h.a) { + l.c = (m.a - l.b) / 2; + $Hb(k, (NHb(), KHb)); + } else if (g || c2) { + l.c = -l.b - a.s; + $Hb(k, (NHb(), MHb)); + } else { + l.c = m.a + a.s; + $Hb(k, (NHb(), LHb)); + } + l.d = -l.a - a.t; + _Hb(k, (EIb(), BIb)); + break; + case 3: + if (h.a) { + l.c = (m.a - l.b) / 2; + $Hb(k, (NHb(), KHb)); + } else if (g || c2) { + l.c = -l.b - a.s; + $Hb(k, (NHb(), MHb)); + } else { + l.c = m.a + a.s; + $Hb(k, (NHb(), LHb)); + } + l.d = m.b + a.t; + _Hb(k, (EIb(), DIb)); + break; + case 2: + if (h.a) { + d = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (m.b - d) / 2; + _Hb(k, (EIb(), CIb)); + } else if (g || c2) { + l.d = -l.a - a.t; + _Hb(k, (EIb(), BIb)); + } else { + l.d = m.b + a.t; + _Hb(k, (EIb(), DIb)); + } + l.c = m.a + a.s; + $Hb(k, (NHb(), LHb)); + break; + case 4: + if (h.a) { + d = a.v ? l.a : BD(Ikb(k.d, 0), 181).rf().b; + l.d = (m.b - d) / 2; + _Hb(k, (EIb(), CIb)); + } else if (g || c2) { + l.d = -l.a - a.t; + _Hb(k, (EIb(), BIb)); + } else { + l.d = m.b + a.t; + _Hb(k, (EIb(), DIb)); + } + l.c = -l.b - a.s; + $Hb(k, (NHb(), MHb)); + } + g = false; + } + } + function Kfe(a, b) { + wfe(); + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + if (Vhb(Zee) == 0) { + l = KC(lbb, nie, 117, _ee.length, 0, 1); + for (g = 0; g < l.length; g++) { + l[g] = new $fe(4); + } + d = new Ifb(); + for (f2 = 0; f2 < Yee.length; f2++) { + k = new $fe(4); + if (f2 < 84) { + h = f2 * 2; + n = (BCb(h, wxe.length), wxe.charCodeAt(h)); + m = (BCb(h + 1, wxe.length), wxe.charCodeAt(h + 1)); + Ufe(k, n, m); + } else { + h = (f2 - 84) * 2; + Ufe(k, afe[h], afe[h + 1]); + } + i3 = Yee[f2]; + dfb(i3, "Specials") && Ufe(k, 65520, 65533); + if (dfb(i3, uxe)) { + Ufe(k, 983040, 1048573); + Ufe(k, 1048576, 1114109); + } + Shb(Zee, i3, k); + Shb($ee, i3, _fe(k)); + j = d.a.length; + 0 < j ? d.a = d.a.substr(0, 0) : 0 > j && (d.a += yfb(KC(TD, $ie, 25, -j, 15, 1))); + d.a += "Is"; + if (hfb(i3, wfb(32)) >= 0) { + for (e = 0; e < i3.length; e++) { + BCb(e, i3.length); + i3.charCodeAt(e) != 32 && Afb(d, (BCb(e, i3.length), i3.charCodeAt(e))); + } + } else { + d.a += "" + i3; + } + Ofe(d.a, i3, true); + } + Ofe(vxe, "Cn", false); + Ofe(xxe, "Cn", true); + c2 = new $fe(4); + Ufe(c2, 0, lxe); + Shb(Zee, "ALL", c2); + Shb($ee, "ALL", _fe(c2)); + !bfe && (bfe = new Lqb()); + Shb(bfe, vxe, vxe); + !bfe && (bfe = new Lqb()); + Shb(bfe, xxe, xxe); + !bfe && (bfe = new Lqb()); + Shb(bfe, "ALL", "ALL"); + } + o2 = b ? BD(Phb(Zee, a), 136) : BD(Phb($ee, a), 136); + return o2; + } + function c3b(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s; + m = false; + l = false; + if (fcd(BD(vNb(d, (Nyc(), Vxc)), 98))) { + g = false; + h = false; + t: + for (o2 = new olb(d.j); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + for (q = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [new J0b(n), new R0b(n)]))); Qr(q); ) { + p = BD(Rr(q), 11); + if (!Ccb(DD(vNb(p.i, pwc)))) { + if (n.j == (Ucd(), Acd)) { + g = true; + break t; + } + if (n.j == Rcd) { + h = true; + break t; + } + } + } + } + m = h && !g; + l = g && !h; + } + if (!m && !l && d.b.c.length != 0) { + k = 0; + for (j = new olb(d.b); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 70); + k += i3.n.b + i3.o.b / 2; + } + k /= d.b.c.length; + s = k >= d.o.b / 2; + } else { + s = !l; + } + if (s) { + r = BD(vNb(d, (wtc(), vtc)), 15); + if (!r) { + f2 = new Rkb(); + yNb(d, vtc, f2); + } else if (m) { + f2 = r; + } else { + e = BD(vNb(d, tsc), 15); + if (!e) { + f2 = new Rkb(); + yNb(d, tsc, f2); + } else { + r.gc() <= e.gc() ? f2 = r : f2 = e; + } + } + } else { + e = BD(vNb(d, (wtc(), tsc)), 15); + if (!e) { + f2 = new Rkb(); + yNb(d, tsc, f2); + } else if (l) { + f2 = e; + } else { + r = BD(vNb(d, vtc), 15); + if (!r) { + f2 = new Rkb(); + yNb(d, vtc, f2); + } else { + e.gc() <= r.gc() ? f2 = e : f2 = r; + } + } + } + f2.Fc(a); + yNb(a, (wtc(), vsc), c2); + if (b.d == c2) { + RZb(b, null); + c2.e.c.length + c2.g.c.length == 0 && F0b(c2, null); + d3b(c2); + } else { + QZb(b, null); + c2.e.c.length + c2.g.c.length == 0 && F0b(c2, null); + } + Osb(b.a); + } + function aoc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H; + s = new Bib(a.b, 0); + k = b.Kc(); + o2 = 0; + j = BD(k.Pb(), 19).a; + v = 0; + c2 = new Tqb(); + A = new zsb(); + while (s.b < s.d.gc()) { + r = (sCb(s.b < s.d.gc()), BD(s.d.Xb(s.c = s.b++), 29)); + for (u = new olb(r.a); u.a < u.c.c.length; ) { + t = BD(mlb(u), 10); + for (n = new Sr(ur(U_b(t).a.Kc(), new Sq())); Qr(n); ) { + l = BD(Rr(n), 17); + A.a.zc(l, A); + } + for (m = new Sr(ur(R_b(t).a.Kc(), new Sq())); Qr(m); ) { + l = BD(Rr(m), 17); + A.a.Bc(l) != null; + } + } + if (o2 + 1 == j) { + e = new H1b(a); + Aib(s, e); + f2 = new H1b(a); + Aib(s, f2); + for (C = A.a.ec().Kc(); C.Ob(); ) { + B = BD(C.Pb(), 17); + if (!c2.a._b(B)) { + ++v; + c2.a.zc(B, c2); + } + g = new b0b(a); + yNb(g, (Nyc(), Vxc), (dcd(), acd)); + $_b(g, e); + __b(g, (j0b(), d0b)); + p = new H0b(); + F0b(p, g); + G0b(p, (Ucd(), Tcd)); + D = new H0b(); + F0b(D, g); + G0b(D, zcd); + d = new b0b(a); + yNb(d, Vxc, acd); + $_b(d, f2); + __b(d, d0b); + q = new H0b(); + F0b(q, d); + G0b(q, Tcd); + F = new H0b(); + F0b(F, d); + G0b(F, zcd); + w2 = new UZb(); + QZb(w2, B.c); + RZb(w2, p); + H = new UZb(); + QZb(H, D); + RZb(H, q); + QZb(B, F); + h = new goc(g, d, w2, H, B); + yNb(g, (wtc(), usc), h); + yNb(d, usc, h); + G = w2.c.i; + if (G.k == d0b) { + i3 = BD(vNb(G, usc), 305); + i3.d = h; + h.g = i3; + } + } + if (k.Ob()) { + j = BD(k.Pb(), 19).a; + } else { + break; + } + } + ++o2; + } + return meb(v); + } + function T1b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + l = 0; + for (e = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + if (!Ccb(DD(hkd(d, (Nyc(), Jxc))))) { + if ((PD(hkd(b, ywc)) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) && !Ccb(DD(hkd(d, xwc)))) { + jkd(d, (wtc(), Zsc), meb(l)); + ++l; + } + $1b(a, d, c2); + } + } + l = 0; + for (j = new Fyd((!b.b && (b.b = new cUd(B2, b, 12, 3)), b.b)); j.e != j.i.gc(); ) { + h = BD(Dyd(j), 79); + if (PD(hkd(b, (Nyc(), ywc))) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) { + jkd(h, (wtc(), Zsc), meb(l)); + ++l; + } + o2 = jtd(h); + p = ltd(h); + k = Ccb(DD(hkd(o2, fxc))); + n = !Ccb(DD(hkd(h, Jxc))); + m = k && Qld(h) && Ccb(DD(hkd(h, gxc))); + f2 = Xod(o2) == b && Xod(o2) == Xod(p); + g = (Xod(o2) == b && p == b) ^ (Xod(p) == b && o2 == b); + n && !m && (g || f2) && X1b(a, h, b, c2); + } + if (Xod(b)) { + for (i3 = new Fyd(Wod(Xod(b))); i3.e != i3.i.gc(); ) { + h = BD(Dyd(i3), 79); + o2 = jtd(h); + if (o2 == b && Qld(h)) { + m = Ccb(DD(hkd(o2, (Nyc(), fxc)))) && Ccb(DD(hkd(h, gxc))); + m && X1b(a, h, b, c2); + } + } + } + } + function gDc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I; + Odd(c2, "MinWidth layering", 1); + n = b.b; + A = b.a; + I = BD(vNb(b, (Nyc(), oxc)), 19).a; + h = BD(vNb(b, pxc), 19).a; + a.b = Edb(ED(vNb(b, lyc))); + a.d = Pje; + for (u = new olb(A); u.a < u.c.c.length; ) { + s = BD(mlb(u), 10); + if (s.k != (j0b(), h0b)) { + continue; + } + D = s.o.b; + a.d = $wnd.Math.min(a.d, D); + } + a.d = $wnd.Math.max(1, a.d); + B = A.c.length; + a.c = KC(WD, oje, 25, B, 15, 1); + a.f = KC(WD, oje, 25, B, 15, 1); + a.e = KC(UD, Vje, 25, B, 15, 1); + j = 0; + a.a = 0; + for (v = new olb(A); v.a < v.c.c.length; ) { + s = BD(mlb(v), 10); + s.p = j++; + a.c[s.p] = eDc(R_b(s)); + a.f[s.p] = eDc(U_b(s)); + a.e[s.p] = s.o.b / a.d; + a.a += a.e[s.p]; + } + a.b /= a.d; + a.a /= B; + w2 = fDc(A); + Okb(A, tmb(new mDc(a))); + p = Pje; + o2 = Ohe; + g = null; + H = I; + G = I; + f2 = h; + e = h; + if (I < 0) { + H = BD(bDc.a.zd(), 19).a; + G = BD(bDc.b.zd(), 19).a; + } + if (h < 0) { + f2 = BD(aDc.a.zd(), 19).a; + e = BD(aDc.b.zd(), 19).a; + } + for (F = H; F <= G; F++) { + for (d = f2; d <= e; d++) { + C = dDc(a, F, d, A, w2); + r = Edb(ED(C.a)); + m = BD(C.b, 15); + q = m.gc(); + if (r < p || r == p && q < o2) { + p = r; + o2 = q; + g = m; + } + } + } + for (l = g.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 15); + i3 = new H1b(b); + for (t = k.Kc(); t.Ob(); ) { + s = BD(t.Pb(), 10); + $_b(s, i3); + } + n.c[n.c.length] = i3; + } + smb(n); + A.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c2); + } + function I6b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D; + a.b = b; + a.a = BD(vNb(b, (Nyc(), bxc)), 19).a; + a.c = BD(vNb(b, dxc), 19).a; + a.c == 0 && (a.c = Ohe); + q = new Bib(b.b, 0); + while (q.b < q.d.gc()) { + p = (sCb(q.b < q.d.gc()), BD(q.d.Xb(q.c = q.b++), 29)); + h = new Rkb(); + k = -1; + u = -1; + for (t = new olb(p.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + if (sr((D6b(), new Sr(ur(O_b(s).a.Kc(), new Sq())))) >= a.a) { + d = E6b(a, s); + k = $wnd.Math.max(k, d.b); + u = $wnd.Math.max(u, d.d); + Ekb(h, new vgd(s, d)); + } + } + B = new Rkb(); + for (j = 0; j < k; ++j) { + Dkb(B, 0, (sCb(q.b > 0), q.a.Xb(q.c = --q.b), C = new H1b(a.b), Aib(q, C), sCb(q.b < q.d.gc()), q.d.Xb(q.c = q.b++), C)); + } + for (g = new olb(h); g.a < g.c.c.length; ) { + e = BD(mlb(g), 46); + n = BD(e.b, 571).a; + if (!n) { + continue; + } + for (m = new olb(n); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + H6b(a, l, B6b, B); + } + } + c2 = new Rkb(); + for (i3 = 0; i3 < u; ++i3) { + Ekb(c2, (D = new H1b(a.b), Aib(q, D), D)); + } + for (f2 = new olb(h); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 46); + A = BD(e.b, 571).c; + if (!A) { + continue; + } + for (w2 = new olb(A); w2.a < w2.c.c.length; ) { + v = BD(mlb(w2), 10); + H6b(a, v, C6b, c2); + } + } + } + r = new Bib(b.b, 0); + while (r.b < r.d.gc()) { + o2 = (sCb(r.b < r.d.gc()), BD(r.d.Xb(r.c = r.b++), 29)); + o2.a.c.length == 0 && uib(r); + } + } + function uQc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G; + Odd(c2, "Spline edge routing", 1); + if (b.b.c.length == 0) { + b.f.a = 0; + Qdd(c2); + return; + } + s = Edb(ED(vNb(b, (Nyc(), wyc)))); + h = Edb(ED(vNb(b, pyc))); + g = Edb(ED(vNb(b, myc))); + r = BD(vNb(b, Xwc), 336); + B = r == (tBc(), sBc); + A = Edb(ED(vNb(b, Ywc))); + a.d = b; + a.j.c = KC(SI, Uhe, 1, 0, 5, 1); + a.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Uhb(a.k); + i3 = BD(Ikb(b.b, 0), 29); + k = Kq(i3.a, (FNc(), DNc)); + o2 = BD(Ikb(b.b, b.b.c.length - 1), 29); + l = Kq(o2.a, DNc); + p = new olb(b.b); + q = null; + G = 0; + do { + t = p.a < p.c.c.length ? BD(mlb(p), 29) : null; + iQc(a, q, t); + lQc(a); + C = Vtb(uAb(PAb(JAb(new YAb(null, new Kub(a.i, 16)), new LQc()), new NQc()))); + F = 0; + u = G; + m = !q || k && q == i3; + n = !t || l && t == o2; + if (C > 0) { + j = 0; + !!q && (j += h); + j += (C - 1) * g; + !!t && (j += h); + B && !!t && (j = $wnd.Math.max(j, jQc(t, g, s, A))); + if (j < s && !m && !n) { + F = (s - j) / 2; + j = s; + } + u += j; + } else + !m && !n && (u += s); + !!t && h_b(t, u); + for (w2 = new olb(a.i); w2.a < w2.c.c.length; ) { + v = BD(mlb(w2), 128); + v.a.c = G; + v.a.b = u - G; + v.F = F; + v.p = !q; + } + Gkb(a.a, a.i); + G = u; + !!t && (G += t.c.a); + q = t; + m = n; + } while (t); + for (e = new olb(a.j); e.a < e.c.c.length; ) { + d = BD(mlb(e), 17); + f2 = pQc(a, d); + yNb(d, (wtc(), ptc), f2); + D = rQc(a, d); + yNb(d, rtc, D); + } + b.f.a = G; + a.d = null; + Qdd(c2); + } + function Yxd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + p = a.i != 0; + t = false; + r = null; + if (oid(a.e)) { + k = b.gc(); + if (k > 0) { + m = k < 100 ? null : new Ixd(k); + j = new Aud(b); + o2 = j.g; + r = KC(WD, oje, 25, k, 15, 1); + d = 0; + u = new zud(k); + for (e = 0; e < a.i; ++e) { + h = a.g[e]; + n = h; + v: + for (s = 0; s < 2; ++s) { + for (i3 = k; --i3 >= 0; ) { + if (n != null ? pb(n, o2[i3]) : PD(n) === PD(o2[i3])) { + if (r.length <= d) { + q = r; + r = KC(WD, oje, 25, 2 * r.length, 15, 1); + $fb(q, 0, r, 0, d); + } + r[d++] = e; + wtd(u, o2[i3]); + break v; + } + } + n = n; + if (PD(n) === PD(h)) { + break; + } + } + } + j = u; + o2 = u.g; + k = d; + if (d > r.length) { + q = r; + r = KC(WD, oje, 25, d, 15, 1); + $fb(q, 0, r, 0, d); + } + if (d > 0) { + t = true; + for (f2 = 0; f2 < d; ++f2) { + n = o2[f2]; + m = k3d(a, BD(n, 72), m); + } + for (g = d; --g >= 0; ) { + tud(a, r[g]); + } + if (d != k) { + for (e = k; --e >= d; ) { + tud(j, e); + } + q = r; + r = KC(WD, oje, 25, d, 15, 1); + $fb(q, 0, r, 0, d); + } + b = j; + } + } + } else { + b = Ctd(a, b); + for (e = a.i; --e >= 0; ) { + if (b.Hc(a.g[e])) { + tud(a, e); + t = true; + } + } + } + if (t) { + if (r != null) { + c2 = b.gc(); + l = c2 == 1 ? FLd(a, 4, b.Kc().Pb(), null, r[0], p) : FLd(a, 6, b, r, r[0], p); + m = c2 < 100 ? null : new Ixd(c2); + for (e = b.Kc(); e.Ob(); ) { + n = e.Pb(); + m = Q2d(a, BD(n, 72), m); + } + if (!m) { + Uhd(a.e, l); + } else { + m.Ei(l); + m.Fi(); + } + } else { + m = Vxd(b.gc()); + for (e = b.Kc(); e.Ob(); ) { + n = e.Pb(); + m = Q2d(a, BD(n, 72), m); + } + !!m && m.Fi(); + } + return true; + } else { + return false; + } + } + function fYb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + c2 = new mYb(b); + c2.a || $Xb(b); + j = ZXb(b); + i3 = new Hp(); + q = new AYb(); + for (p = new olb(b.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + for (e = new Sr(ur(U_b(o2).a.Kc(), new Sq())); Qr(e); ) { + d = BD(Rr(e), 17); + if (d.c.i.k == (j0b(), e0b) || d.d.i.k == e0b) { + k = eYb(a, d, j, q); + Rc(i3, cYb(k.d), k.a); + } + } + } + g = new Rkb(); + for (t = BD(vNb(c2.c, (wtc(), Esc)), 21).Kc(); t.Ob(); ) { + s = BD(t.Pb(), 61); + n = q.c[s.g]; + m = q.b[s.g]; + h = q.a[s.g]; + f2 = null; + r = null; + switch (s.g) { + case 4: + f2 = new J6c(a.d.a, n, j.b.a - a.d.a, m - n); + r = new J6c(a.d.a, n, h, m - n); + iYb(j, new f7c(f2.c + f2.b, f2.d)); + iYb(j, new f7c(f2.c + f2.b, f2.d + f2.a)); + break; + case 2: + f2 = new J6c(j.a.a, n, a.c.a - j.a.a, m - n); + r = new J6c(a.c.a - h, n, h, m - n); + iYb(j, new f7c(f2.c, f2.d)); + iYb(j, new f7c(f2.c, f2.d + f2.a)); + break; + case 1: + f2 = new J6c(n, a.d.b, m - n, j.b.b - a.d.b); + r = new J6c(n, a.d.b, m - n, h); + iYb(j, new f7c(f2.c, f2.d + f2.a)); + iYb(j, new f7c(f2.c + f2.b, f2.d + f2.a)); + break; + case 3: + f2 = new J6c(n, j.a.b, m - n, a.c.b - j.a.b); + r = new J6c(n, a.c.b - h, m - n, h); + iYb(j, new f7c(f2.c, f2.d)); + iYb(j, new f7c(f2.c + f2.b, f2.d)); + } + if (f2) { + l = new vYb(); + l.d = s; + l.b = f2; + l.c = r; + l.a = Dx(BD(Qc(i3, cYb(s)), 21)); + g.c[g.c.length] = l; + } + } + Gkb(c2.b, g); + c2.d = BWb(JWb(j)); + return c2; + } + function pMc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + if (c2.p[b.p] != null) { + return; + } + h = true; + c2.p[b.p] = 0; + g = b; + p = c2.o == (eMc(), cMc) ? Qje : Pje; + do { + e = a.b.e[g.p]; + f2 = g.c.a.c.length; + if (c2.o == cMc && e > 0 || c2.o == dMc && e < f2 - 1) { + i3 = null; + j = null; + c2.o == dMc ? i3 = BD(Ikb(g.c.a, e + 1), 10) : i3 = BD(Ikb(g.c.a, e - 1), 10); + j = c2.g[i3.p]; + pMc(a, j, c2); + p = a.e.bg(p, b, g); + c2.j[b.p] == b && (c2.j[b.p] = c2.j[j.p]); + if (c2.j[b.p] == c2.j[j.p]) { + o2 = jBc(a.d, g, i3); + if (c2.o == dMc) { + d = Edb(c2.p[b.p]); + l = Edb(c2.p[j.p]) + Edb(c2.d[i3.p]) - i3.d.d - o2 - g.d.a - g.o.b - Edb(c2.d[g.p]); + if (h) { + h = false; + c2.p[b.p] = $wnd.Math.min(l, p); + } else { + c2.p[b.p] = $wnd.Math.min(d, $wnd.Math.min(l, p)); + } + } else { + d = Edb(c2.p[b.p]); + l = Edb(c2.p[j.p]) + Edb(c2.d[i3.p]) + i3.o.b + i3.d.a + o2 + g.d.d - Edb(c2.d[g.p]); + if (h) { + h = false; + c2.p[b.p] = $wnd.Math.max(l, p); + } else { + c2.p[b.p] = $wnd.Math.max(d, $wnd.Math.max(l, p)); + } + } + } else { + o2 = Edb(ED(vNb(a.a, (Nyc(), vyc)))); + n = nMc(a, c2.j[b.p]); + k = nMc(a, c2.j[j.p]); + if (c2.o == dMc) { + m = Edb(c2.p[b.p]) + Edb(c2.d[g.p]) + g.o.b + g.d.a + o2 - (Edb(c2.p[j.p]) + Edb(c2.d[i3.p]) - i3.d.d); + tMc(n, k, m); + } else { + m = Edb(c2.p[b.p]) + Edb(c2.d[g.p]) - g.d.d - Edb(c2.p[j.p]) - Edb(c2.d[i3.p]) - i3.o.b - i3.d.a - o2; + tMc(n, k, m); + } + } + } else { + p = a.e.bg(p, b, g); + } + g = c2.a[g.p]; + } while (g != b); + SMc(a.e, b); + } + function _qd(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G; + t = b; + s = new Hp(); + u = new Hp(); + k = Ypd(t, Nte); + d = new ord(a, c2, s, u); + qqd(d.a, d.b, d.c, d.d, k); + i3 = (A = s.i, !A ? s.i = new zf(s, s.c) : A); + for (C = i3.Kc(); C.Ob(); ) { + B = BD(C.Pb(), 202); + e = BD(Qc(s, B), 21); + for (p = e.Kc(); p.Ob(); ) { + o2 = p.Pb(); + v = BD(oo(a.d, o2), 202); + if (v) { + h = (!B.e && (B.e = new y5d(A2, B, 10, 9)), B.e); + wtd(h, v); + } else { + g = _pd(t, Vte); + m = _te + o2 + aue + g; + n = m + $te; + throw vbb(new cqd(n)); + } + } + } + j = (w2 = u.i, !w2 ? u.i = new zf(u, u.c) : w2); + for (F = j.Kc(); F.Ob(); ) { + D = BD(F.Pb(), 202); + f2 = BD(Qc(u, D), 21); + for (r = f2.Kc(); r.Ob(); ) { + q = r.Pb(); + v = BD(oo(a.d, q), 202); + if (v) { + l = (!D.g && (D.g = new y5d(A2, D, 9, 10)), D.g); + wtd(l, v); + } else { + g = _pd(t, Vte); + m = _te + q + aue + g; + n = m + $te; + throw vbb(new cqd(n)); + } + } + } + !c2.b && (c2.b = new y5d(z2, c2, 4, 7)); + if (c2.b.i != 0 && (!c2.c && (c2.c = new y5d(z2, c2, 5, 8)), c2.c.i != 0) && (!c2.b && (c2.b = new y5d(z2, c2, 4, 7)), c2.b.i <= 1 && (!c2.c && (c2.c = new y5d(z2, c2, 5, 8)), c2.c.i <= 1)) && (!c2.a && (c2.a = new cUd(A2, c2, 6, 6)), c2.a).i == 1) { + G = BD(qud((!c2.a && (c2.a = new cUd(A2, c2, 6, 6)), c2.a), 0), 202); + if (!dmd(G) && !emd(G)) { + kmd(G, BD(qud((!c2.b && (c2.b = new y5d(z2, c2, 4, 7)), c2.b), 0), 82)); + lmd(G, BD(qud((!c2.c && (c2.c = new y5d(z2, c2, 5, 8)), c2.c), 0), 82)); + } + } + } + function qJc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D; + for (t = a.a, u = 0, v = t.length; u < v; ++u) { + s = t[u]; + j = Ohe; + k = Ohe; + for (o2 = new olb(s.e); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 10); + g = !m.c ? -1 : Jkb(m.c.a, m, 0); + if (g > 0) { + l = BD(Ikb(m.c.a, g - 1), 10); + B = jBc(a.b, m, l); + q = m.n.b - m.d.d - (l.n.b + l.o.b + l.d.a + B); + } else { + q = m.n.b - m.d.d; + } + j = $wnd.Math.min(q, j); + if (g < m.c.a.c.length - 1) { + l = BD(Ikb(m.c.a, g + 1), 10); + B = jBc(a.b, m, l); + r = l.n.b - l.d.d - (m.n.b + m.o.b + m.d.a + B); + } else { + r = 2 * m.n.b; + } + k = $wnd.Math.min(r, k); + } + i3 = Ohe; + f2 = false; + e = BD(Ikb(s.e, 0), 10); + for (D = new olb(e.j); D.a < D.c.c.length; ) { + C = BD(mlb(D), 11); + p = e.n.b + C.n.b + C.a.b; + for (d = new olb(C.e); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 17); + w2 = c2.c; + b = w2.i.n.b + w2.n.b + w2.a.b - p; + if ($wnd.Math.abs(b) < $wnd.Math.abs(i3) && $wnd.Math.abs(b) < (b < 0 ? j : k)) { + i3 = b; + f2 = true; + } + } + } + h = BD(Ikb(s.e, s.e.c.length - 1), 10); + for (A = new olb(h.j); A.a < A.c.c.length; ) { + w2 = BD(mlb(A), 11); + p = h.n.b + w2.n.b + w2.a.b; + for (d = new olb(w2.g); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 17); + C = c2.d; + b = C.i.n.b + C.n.b + C.a.b - p; + if ($wnd.Math.abs(b) < $wnd.Math.abs(i3) && $wnd.Math.abs(b) < (b < 0 ? j : k)) { + i3 = b; + f2 = true; + } + } + } + if (f2 && i3 != 0) { + for (n = new olb(s.e); n.a < n.c.c.length; ) { + m = BD(mlb(n), 10); + m.n.b += i3; + } + } + } + } + function ync(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + if (Mhb(a.a, b)) { + if (Rqb(BD(Ohb(a.a, b), 53), c2)) { + return 1; + } + } else { + Rhb(a.a, b, new Tqb()); + } + if (Mhb(a.a, c2)) { + if (Rqb(BD(Ohb(a.a, c2), 53), b)) { + return -1; + } + } else { + Rhb(a.a, c2, new Tqb()); + } + if (Mhb(a.e, b)) { + if (Rqb(BD(Ohb(a.e, b), 53), c2)) { + return -1; + } + } else { + Rhb(a.e, b, new Tqb()); + } + if (Mhb(a.e, c2)) { + if (Rqb(BD(Ohb(a.a, c2), 53), b)) { + return 1; + } + } else { + Rhb(a.e, c2, new Tqb()); + } + if (a.c == (tAc(), sAc) || !wNb(b, (wtc(), Zsc)) || !wNb(c2, (wtc(), Zsc))) { + i3 = BD(Etb(Dtb(KAb(JAb(new YAb(null, new Kub(b.j, 16)), new Hnc())), new Jnc())), 11); + k = BD(Etb(Dtb(KAb(JAb(new YAb(null, new Kub(c2.j, 16)), new Lnc())), new Nnc())), 11); + if (!!i3 && !!k) { + h = i3.i; + j = k.i; + if (!!h && h == j) { + for (m = new olb(h.j); m.a < m.c.c.length; ) { + l = BD(mlb(m), 11); + if (l == i3) { + Anc(a, c2, b); + return -1; + } else if (l == k) { + Anc(a, b, c2); + return 1; + } + } + return beb(znc(a, b), znc(a, c2)); + } + for (o2 = a.d, p = 0, q = o2.length; p < q; ++p) { + n = o2[p]; + if (n == h) { + Anc(a, c2, b); + return -1; + } else if (n == j) { + Anc(a, b, c2); + return 1; + } + } + } + if (!wNb(b, (wtc(), Zsc)) || !wNb(c2, Zsc)) { + e = znc(a, b); + g = znc(a, c2); + e > g ? Anc(a, b, c2) : Anc(a, c2, b); + return e < g ? -1 : e > g ? 1 : 0; + } + } + d = BD(vNb(b, (wtc(), Zsc)), 19).a; + f2 = BD(vNb(c2, Zsc), 19).a; + d > f2 ? Anc(a, b, c2) : Anc(a, c2, b); + return d < f2 ? -1 : d > f2 ? 1 : 0; + } + function u2c(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s; + if (Ccb(DD(hkd(b, (Y9c(), d9c))))) { + return mmb(), mmb(), jmb; + } + j = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i != 0; + l = s2c(b); + k = !l.dc(); + if (j || k) { + e = BD(hkd(b, F9c), 149); + if (!e) { + throw vbb(new y2c("Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout.")); + } + s = D3c(e, (Csd(), ysd)); + q2c(b); + if (!j && k && !s) { + return mmb(), mmb(), jmb; + } + i3 = new Rkb(); + if (PD(hkd(b, J8c)) === PD((hbd(), ebd)) && (D3c(e, vsd) || D3c(e, usd))) { + n = p2c(a, b); + o2 = new Psb(); + ye(o2, (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); + while (o2.b != 0) { + m = BD(o2.b == 0 ? null : (sCb(o2.b != 0), Nsb(o2, o2.a.a)), 33); + q2c(m); + r = PD(hkd(m, J8c)) === PD(gbd); + if (r || ikd(m, o8c) && !C3c(e, hkd(m, F9c))) { + h = u2c(a, m, c2, d); + Gkb(i3, h); + jkd(m, J8c, gbd); + hfd(m); + } else { + ye(o2, (!m.a && (m.a = new cUd(E2, m, 10, 11)), m.a)); + } + } + } else { + n = (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a).i; + for (g = new Fyd((!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); g.e != g.i.gc(); ) { + f2 = BD(Dyd(g), 33); + h = u2c(a, f2, c2, d); + Gkb(i3, h); + hfd(f2); + } + } + for (q = new olb(i3); q.a < q.c.c.length; ) { + p = BD(mlb(q), 79); + jkd(p, d9c, (Bcb(), true)); + } + r2c(b, e, Udd(d, n)); + v2c(i3); + return k && s ? l : (mmb(), mmb(), jmb); + } else { + return mmb(), mmb(), jmb; + } + } + function Z$b(a, b, c2, d, e, f2, g, h, i3) { + var j, k, l, m, n, o2, p; + n = c2; + k = new b0b(i3); + __b(k, (j0b(), e0b)); + yNb(k, (wtc(), Isc), g); + yNb(k, (Nyc(), Vxc), (dcd(), $bd)); + p = Edb(ED(a.We(Uxc))); + yNb(k, Uxc, p); + l = new H0b(); + F0b(l, k); + if (!(b != bcd && b != ccd)) { + d >= 0 ? n = Zcd(h) : n = Wcd(Zcd(h)); + a.Ye($xc, n); + } + j = new d7c(); + m = false; + if (a.Xe(Txc)) { + a7c(j, BD(a.We(Txc), 8)); + m = true; + } else { + _6c(j, g.a / 2, g.b / 2); + } + switch (n.g) { + case 4: + yNb(k, mxc, (Ctc(), ytc)); + yNb(k, Bsc, (Gqc(), Fqc)); + k.o.b = g.b; + p < 0 && (k.o.a = -p); + G0b(l, (Ucd(), zcd)); + m || (j.a = g.a); + j.a -= g.a; + break; + case 2: + yNb(k, mxc, (Ctc(), Atc)); + yNb(k, Bsc, (Gqc(), Dqc)); + k.o.b = g.b; + p < 0 && (k.o.a = -p); + G0b(l, (Ucd(), Tcd)); + m || (j.a = 0); + break; + case 1: + yNb(k, Osc, (esc(), dsc)); + k.o.a = g.a; + p < 0 && (k.o.b = -p); + G0b(l, (Ucd(), Rcd)); + m || (j.b = g.b); + j.b -= g.b; + break; + case 3: + yNb(k, Osc, (esc(), bsc)); + k.o.a = g.a; + p < 0 && (k.o.b = -p); + G0b(l, (Ucd(), Acd)); + m || (j.b = 0); + } + a7c(l.n, j); + yNb(k, Txc, j); + if (b == Zbd || b == _bd || b == $bd) { + o2 = 0; + if (b == Zbd && a.Xe(Wxc)) { + switch (n.g) { + case 1: + case 2: + o2 = BD(a.We(Wxc), 19).a; + break; + case 3: + case 4: + o2 = -BD(a.We(Wxc), 19).a; + } + } else { + switch (n.g) { + case 4: + case 2: + o2 = f2.b; + b == _bd && (o2 /= e.b); + break; + case 1: + case 3: + o2 = f2.a; + b == _bd && (o2 /= e.a); + } + } + yNb(k, htc, o2); + } + yNb(k, Hsc, n); + return k; + } + function AGc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C; + c2 = Edb(ED(vNb(a.a.j, (Nyc(), Ewc)))); + if (c2 < -1 || !a.a.i || ecd(BD(vNb(a.a.o, Vxc), 98)) || V_b(a.a.o, (Ucd(), zcd)).gc() < 2 && V_b(a.a.o, Tcd).gc() < 2) { + return true; + } + if (a.a.c.Rf()) { + return false; + } + v = 0; + u = 0; + t = new Rkb(); + for (i3 = a.a.e, j = 0, k = i3.length; j < k; ++j) { + h = i3[j]; + for (m = h, n = 0, p = m.length; n < p; ++n) { + l = m[n]; + if (l.k == (j0b(), i0b)) { + t.c[t.c.length] = l; + continue; + } + d = a.b[l.c.p][l.p]; + if (l.k == e0b) { + d.b = 1; + BD(vNb(l, (wtc(), $sc)), 11).j == (Ucd(), zcd) && (u += d.a); + } else { + C = V_b(l, (Ucd(), Tcd)); + C.dc() || !Lq(C, new NGc()) ? d.c = 1 : (e = V_b(l, zcd), (e.dc() || !Lq(e, new JGc())) && (v += d.a)); + } + for (g = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(g); ) { + f2 = BD(Rr(g), 17); + v += d.c; + u += d.b; + B = f2.d.i; + zGc(a, d, B); + } + r = pl(OC(GC(KI, 1), Uhe, 20, 0, [V_b(l, (Ucd(), Acd)), V_b(l, Rcd)])); + for (A = new Sr(new xl(r.a.length, r.a)); Qr(A); ) { + w2 = BD(Rr(A), 11); + s = BD(vNb(w2, (wtc(), gtc)), 10); + if (s) { + v += d.c; + u += d.b; + zGc(a, d, s); + } + } + } + for (o2 = new olb(t); o2.a < o2.c.c.length; ) { + l = BD(mlb(o2), 10); + d = a.b[l.c.p][l.p]; + for (g = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(g); ) { + f2 = BD(Rr(g), 17); + v += d.c; + u += d.b; + B = f2.d.i; + zGc(a, d, B); + } + } + t.c = KC(SI, Uhe, 1, 0, 5, 1); + } + b = v + u; + q = b == 0 ? Pje : (v - u) / b; + return q >= c2; + } + function ovd() { + mvd(); + function h(f2) { + var g = this; + this.dispatch = function(a) { + var b = a.data; + switch (b.cmd) { + case "algorithms": + var c2 = pvd((mmb(), new lnb(new $ib(lvd.b)))); + f2.postMessage({ id: b.id, data: c2 }); + break; + case "categories": + var d = pvd((mmb(), new lnb(new $ib(lvd.c)))); + f2.postMessage({ id: b.id, data: d }); + break; + case "options": + var e = pvd((mmb(), new lnb(new $ib(lvd.d)))); + f2.postMessage({ id: b.id, data: e }); + break; + case "register": + svd(b.algorithms); + f2.postMessage({ id: b.id }); + break; + case "layout": + qvd(b.graph, b.layoutOptions || {}, b.options || {}); + f2.postMessage({ id: b.id, data: b.graph }); + break; + } + }; + this.saveDispatch = function(b) { + try { + g.dispatch(b); + } catch (a) { + f2.postMessage({ id: b.data.id, error: a }); + } + }; + } + function j(b) { + var c2 = this; + this.dispatcher = new h({ postMessage: function(a) { + c2.onmessage({ data: a }); + } }); + this.postMessage = function(a) { + setTimeout(function() { + c2.dispatcher.saveDispatch({ data: a }); + }, 0); + }; + } + if (typeof document === uke && typeof self !== uke) { + var i3 = new h(self); + self.onmessage = i3.saveDispatch; + } else if (typeof module3 !== uke && module3.exports) { + Object.defineProperty(exports3, "__esModule", { value: true }); + module3.exports = { "default": j, Worker: j }; + } + } + function aae(a) { + if (a.N) + return; + a.N = true; + a.b = Lnd(a, 0); + Knd(a.b, 0); + Knd(a.b, 1); + Knd(a.b, 2); + a.bb = Lnd(a, 1); + Knd(a.bb, 0); + Knd(a.bb, 1); + a.fb = Lnd(a, 2); + Knd(a.fb, 3); + Knd(a.fb, 4); + Qnd(a.fb, 5); + a.qb = Lnd(a, 3); + Knd(a.qb, 0); + Qnd(a.qb, 1); + Qnd(a.qb, 2); + Knd(a.qb, 3); + Knd(a.qb, 4); + Qnd(a.qb, 5); + Knd(a.qb, 6); + a.a = Mnd(a, 4); + a.c = Mnd(a, 5); + a.d = Mnd(a, 6); + a.e = Mnd(a, 7); + a.f = Mnd(a, 8); + a.g = Mnd(a, 9); + a.i = Mnd(a, 10); + a.j = Mnd(a, 11); + a.k = Mnd(a, 12); + a.n = Mnd(a, 13); + a.o = Mnd(a, 14); + a.p = Mnd(a, 15); + a.q = Mnd(a, 16); + a.s = Mnd(a, 17); + a.r = Mnd(a, 18); + a.t = Mnd(a, 19); + a.u = Mnd(a, 20); + a.v = Mnd(a, 21); + a.w = Mnd(a, 22); + a.B = Mnd(a, 23); + a.A = Mnd(a, 24); + a.C = Mnd(a, 25); + a.D = Mnd(a, 26); + a.F = Mnd(a, 27); + a.G = Mnd(a, 28); + a.H = Mnd(a, 29); + a.J = Mnd(a, 30); + a.I = Mnd(a, 31); + a.K = Mnd(a, 32); + a.M = Mnd(a, 33); + a.L = Mnd(a, 34); + a.P = Mnd(a, 35); + a.Q = Mnd(a, 36); + a.R = Mnd(a, 37); + a.S = Mnd(a, 38); + a.T = Mnd(a, 39); + a.U = Mnd(a, 40); + a.V = Mnd(a, 41); + a.X = Mnd(a, 42); + a.W = Mnd(a, 43); + a.Y = Mnd(a, 44); + a.Z = Mnd(a, 45); + a.$ = Mnd(a, 46); + a._ = Mnd(a, 47); + a.ab = Mnd(a, 48); + a.cb = Mnd(a, 49); + a.db = Mnd(a, 50); + a.eb = Mnd(a, 51); + a.gb = Mnd(a, 52); + a.hb = Mnd(a, 53); + a.ib = Mnd(a, 54); + a.jb = Mnd(a, 55); + a.kb = Mnd(a, 56); + a.lb = Mnd(a, 57); + a.mb = Mnd(a, 58); + a.nb = Mnd(a, 59); + a.ob = Mnd(a, 60); + a.pb = Mnd(a, 61); + } + function f5b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + s = 0; + if (b.f.a == 0) { + for (q = new olb(a); q.a < q.c.c.length; ) { + o2 = BD(mlb(q), 10); + s = $wnd.Math.max(s, o2.n.a + o2.o.a + o2.d.c); + } + } else { + s = b.f.a - b.c.a; + } + s -= b.c.a; + for (p = new olb(a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + g5b(o2.n, s - o2.o.a); + h5b(o2.f); + d5b(o2); + (!o2.q ? (mmb(), mmb(), kmb) : o2.q)._b((Nyc(), ayc)) && g5b(BD(vNb(o2, ayc), 8), s - o2.o.a); + switch (BD(vNb(o2, mwc), 248).g) { + case 1: + yNb(o2, mwc, (F7c(), D7c)); + break; + case 2: + yNb(o2, mwc, (F7c(), C7c)); + } + r = o2.o; + for (u = new olb(o2.j); u.a < u.c.c.length; ) { + t = BD(mlb(u), 11); + g5b(t.n, r.a - t.o.a); + g5b(t.a, t.o.a); + G0b(t, Z4b(t.j)); + g = BD(vNb(t, Wxc), 19); + !!g && yNb(t, Wxc, meb(-g.a)); + for (f2 = new olb(t.g); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 17); + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 8); + c2.a = s - c2.a; + } + j = BD(vNb(e, jxc), 74); + if (j) { + for (i3 = Jsb(j, 0); i3.b != i3.d.c; ) { + h = BD(Xsb(i3), 8); + h.a = s - h.a; + } + } + for (m = new olb(e.b); m.a < m.c.c.length; ) { + k = BD(mlb(m), 70); + g5b(k.n, s - k.o.a); + } + } + for (n = new olb(t.f); n.a < n.c.c.length; ) { + k = BD(mlb(n), 70); + g5b(k.n, t.o.a - k.o.a); + } + } + if (o2.k == (j0b(), e0b)) { + yNb(o2, (wtc(), Hsc), Z4b(BD(vNb(o2, Hsc), 61))); + c5b(o2); + } + for (l = new olb(o2.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 70); + d5b(k); + g5b(k.n, r.a - k.o.a); + } + } + } + function i5b(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + s = 0; + if (b.f.b == 0) { + for (q = new olb(a); q.a < q.c.c.length; ) { + o2 = BD(mlb(q), 10); + s = $wnd.Math.max(s, o2.n.b + o2.o.b + o2.d.a); + } + } else { + s = b.f.b - b.c.b; + } + s -= b.c.b; + for (p = new olb(a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + j5b(o2.n, s - o2.o.b); + k5b(o2.f); + e5b(o2); + (!o2.q ? (mmb(), mmb(), kmb) : o2.q)._b((Nyc(), ayc)) && j5b(BD(vNb(o2, ayc), 8), s - o2.o.b); + switch (BD(vNb(o2, mwc), 248).g) { + case 3: + yNb(o2, mwc, (F7c(), A7c)); + break; + case 4: + yNb(o2, mwc, (F7c(), E7c)); + } + r = o2.o; + for (u = new olb(o2.j); u.a < u.c.c.length; ) { + t = BD(mlb(u), 11); + j5b(t.n, r.b - t.o.b); + j5b(t.a, t.o.b); + G0b(t, $4b(t.j)); + g = BD(vNb(t, Wxc), 19); + !!g && yNb(t, Wxc, meb(-g.a)); + for (f2 = new olb(t.g); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 17); + for (d = Jsb(e.a, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 8); + c2.b = s - c2.b; + } + j = BD(vNb(e, jxc), 74); + if (j) { + for (i3 = Jsb(j, 0); i3.b != i3.d.c; ) { + h = BD(Xsb(i3), 8); + h.b = s - h.b; + } + } + for (m = new olb(e.b); m.a < m.c.c.length; ) { + k = BD(mlb(m), 70); + j5b(k.n, s - k.o.b); + } + } + for (n = new olb(t.f); n.a < n.c.c.length; ) { + k = BD(mlb(n), 70); + j5b(k.n, t.o.b - k.o.b); + } + } + if (o2.k == (j0b(), e0b)) { + yNb(o2, (wtc(), Hsc), $4b(BD(vNb(o2, Hsc), 61))); + b5b(o2); + } + for (l = new olb(o2.b); l.a < l.c.c.length; ) { + k = BD(mlb(l), 70); + e5b(k); + j5b(k.n, r.b - k.o.b); + } + } + } + function tZc(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n; + l = false; + j = a + 1; + k = (tCb(a, b.c.length), BD(b.c[a], 200)); + g = k.a; + h = null; + for (f2 = 0; f2 < k.a.c.length; f2++) { + e = (tCb(f2, g.c.length), BD(g.c[f2], 187)); + if (e.c) { + continue; + } + if (e.b.c.length == 0) { + Zfb(); + v$c(k, e); + --f2; + l = true; + continue; + } + if (!e.k) { + !!h && a$c(h); + h = new b$c(!h ? 0 : h.e + h.d + d, k.f, d); + OZc(e, h.e + h.d, k.f); + Ekb(k.d, h); + WZc(h, e); + e.k = true; + } + i3 = null; + i3 = (n = null, f2 < k.a.c.length - 1 ? n = BD(Ikb(k.a, f2 + 1), 187) : j < b.c.length && (tCb(j, b.c.length), BD(b.c[j], 200)).a.c.length != 0 && (n = BD(Ikb((tCb(j, b.c.length), BD(b.c[j], 200)).a, 0), 187)), n); + m = false; + !!i3 && (m = !pb(i3.j, k)); + if (i3) { + if (i3.b.c.length == 0) { + v$c(k, i3); + break; + } else { + KZc(e, c2 - e.s); + a$c(e.q); + l = l | sZc(k, e, i3, c2, d); + } + if (i3.b.c.length == 0) { + v$c((tCb(j, b.c.length), BD(b.c[j], 200)), i3); + i3 = null; + while (b.c.length > j && (tCb(j, b.c.length), BD(b.c[j], 200)).a.c.length == 0) { + Lkb(b, (tCb(j, b.c.length), b.c[j])); + } + } + if (!i3) { + --f2; + continue; + } + if (uZc(b, k, e, i3, m, c2, j, d)) { + l = true; + continue; + } + if (m) { + if (vZc(b, k, e, i3, c2, j, d)) { + l = true; + continue; + } else if (wZc(k, e)) { + e.c = true; + l = true; + continue; + } + } else if (wZc(k, e)) { + e.c = true; + l = true; + continue; + } + if (l) { + continue; + } + } + if (wZc(k, e)) { + e.c = true; + l = true; + !!i3 && (i3.k = false); + continue; + } else { + a$c(e.q); + } + } + return l; + } + function fed(a, b, c2, d, e, f2, g) { + var h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I; + p = 0; + D = 0; + for (j = new olb(a.b); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 157); + !!i3.c && zfd(i3.c); + p = $wnd.Math.max(p, red(i3)); + D += red(i3) * qed(i3); + } + q = D / a.b.c.length; + C = _dd(a.b, q); + D += a.b.c.length * C; + p = $wnd.Math.max(p, $wnd.Math.sqrt(D * g)) + c2.b; + H = c2.b; + I = c2.d; + n = 0; + l = c2.b + c2.c; + B = new Psb(); + Dsb(B, meb(0)); + w2 = new Psb(); + k = new Bib(a.b, 0); + o2 = null; + h = new Rkb(); + while (k.b < k.d.gc()) { + i3 = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 157)); + G = red(i3); + m = qed(i3); + if (H + G > p) { + if (f2) { + Fsb(w2, n); + Fsb(B, meb(k.b - 1)); + Ekb(a.d, o2); + h.c = KC(SI, Uhe, 1, 0, 5, 1); + } + H = c2.b; + I += n + b; + n = 0; + l = $wnd.Math.max(l, c2.b + c2.c + G); + } + h.c[h.c.length] = i3; + ued(i3, H, I); + l = $wnd.Math.max(l, H + G + c2.c); + n = $wnd.Math.max(n, m); + H += G + b; + o2 = i3; + } + Gkb(a.a, h); + Ekb(a.d, BD(Ikb(h, h.c.length - 1), 157)); + l = $wnd.Math.max(l, d); + F = I + n + c2.a; + if (F < e) { + n += e - F; + F = e; + } + if (f2) { + H = c2.b; + k = new Bib(a.b, 0); + Fsb(B, meb(a.b.c.length)); + A = Jsb(B, 0); + s = BD(Xsb(A), 19).a; + Fsb(w2, n); + v = Jsb(w2, 0); + u = 0; + while (k.b < k.d.gc()) { + if (k.b == s) { + H = c2.b; + u = Edb(ED(Xsb(v))); + s = BD(Xsb(A), 19).a; + } + i3 = (sCb(k.b < k.d.gc()), BD(k.d.Xb(k.c = k.b++), 157)); + sed(i3, u); + if (k.b == s) { + r = l - H - c2.c; + t = red(i3); + ted(i3, r); + ved(i3, (r - t) / 2, 0); + } + H += red(i3) + b; + } + } + return new f7c(l, F); + } + function pde(a) { + var b, c2, d, e, f2; + b = a.c; + f2 = null; + switch (b) { + case 6: + return a.Vl(); + case 13: + return a.Wl(); + case 23: + return a.Nl(); + case 22: + return a.Sl(); + case 18: + return a.Pl(); + case 8: + nde(a); + f2 = (wfe(), efe); + break; + case 9: + return a.vl(true); + case 19: + return a.wl(); + case 10: + switch (a.a) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + f2 = a.ul(a.a); + nde(a); + return f2; + case 101: + case 102: + case 110: + case 114: + case 116: + case 117: + case 118: + case 120: + { + c2 = a.tl(); + c2 < Tje ? f2 = (wfe(), wfe(), new ige(0, c2)) : f2 = Ffe(Tee(c2)); + } + break; + case 99: + return a.Fl(); + case 67: + return a.Al(); + case 105: + return a.Il(); + case 73: + return a.Bl(); + case 103: + return a.Gl(); + case 88: + return a.Cl(); + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return a.xl(); + case 80: + case 112: + f2 = tde(a, a.a); + if (!f2) + throw vbb(new mde(tvd((h0d(), Iue)))); + break; + default: + f2 = zfe(a.a); + } + nde(a); + break; + case 0: + if (a.a == 93 || a.a == 123 || a.a == 125) + throw vbb(new mde(tvd((h0d(), Hue)))); + f2 = zfe(a.a); + d = a.a; + nde(a); + if ((d & 64512) == Uje && a.c == 0 && (a.a & 64512) == 56320) { + e = KC(TD, $ie, 25, 2, 15, 1); + e[0] = d & aje; + e[1] = a.a & aje; + f2 = Efe(Ffe(zfb(e, 0, e.length)), 0); + nde(a); + } + break; + default: + throw vbb(new mde(tvd((h0d(), Hue)))); + } + return f2; + } + function e7b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + d = new Rkb(); + e = Ohe; + f2 = Ohe; + g = Ohe; + if (c2) { + e = a.f.a; + for (p = new olb(b.j); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 11); + for (i3 = new olb(o2.g); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 17); + if (h.a.b != 0) { + k = BD(Hsb(h.a), 8); + if (k.a < e) { + f2 = e - k.a; + g = Ohe; + d.c = KC(SI, Uhe, 1, 0, 5, 1); + e = k.a; + } + if (k.a <= e) { + d.c[d.c.length] = h; + h.a.b > 1 && (g = $wnd.Math.min(g, $wnd.Math.abs(BD(Ut(h.a, 1), 8).b - k.b))); + } + } + } + } + } else { + for (p = new olb(b.j); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 11); + for (i3 = new olb(o2.e); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 17); + if (h.a.b != 0) { + m = BD(Isb(h.a), 8); + if (m.a > e) { + f2 = m.a - e; + g = Ohe; + d.c = KC(SI, Uhe, 1, 0, 5, 1); + e = m.a; + } + if (m.a >= e) { + d.c[d.c.length] = h; + h.a.b > 1 && (g = $wnd.Math.min(g, $wnd.Math.abs(BD(Ut(h.a, h.a.b - 2), 8).b - m.b))); + } + } + } + } + } + if (d.c.length != 0 && f2 > b.o.a / 2 && g > b.o.b / 2) { + n = new H0b(); + F0b(n, b); + G0b(n, (Ucd(), Acd)); + n.n.a = b.o.a / 2; + r = new H0b(); + F0b(r, b); + G0b(r, Rcd); + r.n.a = b.o.a / 2; + r.n.b = b.o.b; + for (i3 = new olb(d); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 17); + if (c2) { + j = BD(Lsb(h.a), 8); + q = h.a.b == 0 ? A0b(h.d) : BD(Hsb(h.a), 8); + q.b >= j.b ? QZb(h, r) : QZb(h, n); + } else { + j = BD(Msb(h.a), 8); + q = h.a.b == 0 ? A0b(h.c) : BD(Isb(h.a), 8); + q.b >= j.b ? RZb(h, r) : RZb(h, n); + } + l = BD(vNb(h, (Nyc(), jxc)), 74); + !!l && ze(l, j, true); + } + b.n.a = e - b.o.a / 2; + } + } + function erd(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I, J, K2; + D = null; + G = b; + F = Rqd(a, dtd(c2), G); + Lkd(F, _pd(G, Vte)); + H = BD(oo(a.g, Vpd(aC(G, Cte))), 33); + m = aC(G, "sourcePort"); + d = null; + !!m && (d = Vpd(m)); + I = BD(oo(a.j, d), 118); + if (!H) { + h = Wpd(G); + o2 = "An edge must have a source node (edge id: '" + h; + p = o2 + $te; + throw vbb(new cqd(p)); + } + if (!!I && !Hb(mpd(I), H)) { + i3 = _pd(G, Vte); + q = "The source port of an edge must be a port of the edge's source node (edge id: '" + i3; + r = q + $te; + throw vbb(new cqd(r)); + } + B = (!F.b && (F.b = new y5d(z2, F, 4, 7)), F.b); + f2 = null; + I ? f2 = I : f2 = H; + wtd(B, f2); + J = BD(oo(a.g, Vpd(aC(G, bue))), 33); + n = aC(G, "targetPort"); + e = null; + !!n && (e = Vpd(n)); + K2 = BD(oo(a.j, e), 118); + if (!J) { + l = Wpd(G); + s = "An edge must have a target node (edge id: '" + l; + t = s + $te; + throw vbb(new cqd(t)); + } + if (!!K2 && !Hb(mpd(K2), J)) { + j = _pd(G, Vte); + u = "The target port of an edge must be a port of the edge's target node (edge id: '" + j; + v = u + $te; + throw vbb(new cqd(v)); + } + C = (!F.c && (F.c = new y5d(z2, F, 5, 8)), F.c); + g = null; + K2 ? g = K2 : g = J; + wtd(C, g); + if ((!F.b && (F.b = new y5d(z2, F, 4, 7)), F.b).i == 0 || (!F.c && (F.c = new y5d(z2, F, 5, 8)), F.c).i == 0) { + k = _pd(G, Vte); + w2 = Zte + k; + A = w2 + $te; + throw vbb(new cqd(A)); + } + grd(G, F); + frd(G, F); + D = crd(a, G, F); + return D; + } + function DXb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D; + l = FXb(zXb(a, (Ucd(), Fcd)), b); + o2 = EXb(zXb(a, Gcd), b); + u = EXb(zXb(a, Ocd), b); + B = GXb(zXb(a, Qcd), b); + m = GXb(zXb(a, Bcd), b); + s = EXb(zXb(a, Ncd), b); + p = EXb(zXb(a, Hcd), b); + w2 = EXb(zXb(a, Pcd), b); + v = EXb(zXb(a, Ccd), b); + C = GXb(zXb(a, Ecd), b); + r = EXb(zXb(a, Lcd), b); + t = EXb(zXb(a, Kcd), b); + A = EXb(zXb(a, Dcd), b); + D = GXb(zXb(a, Mcd), b); + n = GXb(zXb(a, Icd), b); + q = EXb(zXb(a, Jcd), b); + c2 = w6c(OC(GC(UD, 1), Vje, 25, 15, [s.a, B.a, w2.a, D.a])); + d = w6c(OC(GC(UD, 1), Vje, 25, 15, [o2.a, l.a, u.a, q.a])); + e = r.a; + f2 = w6c(OC(GC(UD, 1), Vje, 25, 15, [p.a, m.a, v.a, n.a])); + j = w6c(OC(GC(UD, 1), Vje, 25, 15, [s.b, o2.b, p.b, t.b])); + i3 = w6c(OC(GC(UD, 1), Vje, 25, 15, [B.b, l.b, m.b, q.b])); + k = C.b; + h = w6c(OC(GC(UD, 1), Vje, 25, 15, [w2.b, u.b, v.b, A.b])); + vXb(zXb(a, Fcd), c2 + e, j + k); + vXb(zXb(a, Jcd), c2 + e, j + k); + vXb(zXb(a, Gcd), c2 + e, 0); + vXb(zXb(a, Ocd), c2 + e, j + k + i3); + vXb(zXb(a, Qcd), 0, j + k); + vXb(zXb(a, Bcd), c2 + e + d, j + k); + vXb(zXb(a, Hcd), c2 + e + d, 0); + vXb(zXb(a, Pcd), 0, j + k + i3); + vXb(zXb(a, Ccd), c2 + e + d, j + k + i3); + vXb(zXb(a, Ecd), 0, j); + vXb(zXb(a, Lcd), c2, 0); + vXb(zXb(a, Dcd), 0, j + k + i3); + vXb(zXb(a, Icd), c2 + e + d, 0); + g = new d7c(); + g.a = w6c(OC(GC(UD, 1), Vje, 25, 15, [c2 + d + e + f2, C.a, t.a, A.a])); + g.b = w6c(OC(GC(UD, 1), Vje, 25, 15, [j + i3 + k + h, r.b, D.b, n.b])); + return g; + } + function Ngc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + p = new Rkb(); + for (m = new olb(a.d.b); m.a < m.c.c.length; ) { + l = BD(mlb(m), 29); + for (o2 = new olb(l.a); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 10); + e = BD(Ohb(a.f, n), 57); + for (i3 = new Sr(ur(U_b(n).a.Kc(), new Sq())); Qr(i3); ) { + g = BD(Rr(i3), 17); + d = Jsb(g.a, 0); + j = true; + k = null; + if (d.b != d.d.c) { + b = BD(Xsb(d), 8); + c2 = null; + if (g.c.j == (Ucd(), Acd)) { + q = new hic(b, new f7c(b.a, e.d.d), e, g); + q.f.a = true; + q.a = g.c; + p.c[p.c.length] = q; + } + if (g.c.j == Rcd) { + q = new hic(b, new f7c(b.a, e.d.d + e.d.a), e, g); + q.f.d = true; + q.a = g.c; + p.c[p.c.length] = q; + } + while (d.b != d.d.c) { + c2 = BD(Xsb(d), 8); + if (!ADb(b.b, c2.b)) { + k = new hic(b, c2, null, g); + p.c[p.c.length] = k; + if (j) { + j = false; + if (c2.b < e.d.d) { + k.f.a = true; + } else if (c2.b > e.d.d + e.d.a) { + k.f.d = true; + } else { + k.f.d = true; + k.f.a = true; + } + } + } + d.b != d.d.c && (b = c2); + } + if (k) { + f2 = BD(Ohb(a.f, g.d.i), 57); + if (b.b < f2.d.d) { + k.f.a = true; + } else if (b.b > f2.d.d + f2.d.a) { + k.f.d = true; + } else { + k.f.d = true; + k.f.a = true; + } + } + } + } + for (h = new Sr(ur(R_b(n).a.Kc(), new Sq())); Qr(h); ) { + g = BD(Rr(h), 17); + if (g.a.b != 0) { + b = BD(Isb(g.a), 8); + if (g.d.j == (Ucd(), Acd)) { + q = new hic(b, new f7c(b.a, e.d.d), e, g); + q.f.a = true; + q.a = g.d; + p.c[p.c.length] = q; + } + if (g.d.j == Rcd) { + q = new hic(b, new f7c(b.a, e.d.d + e.d.a), e, g); + q.f.d = true; + q.a = g.d; + p.c[p.c.length] = q; + } + } + } + } + } + return p; + } + function WJc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + Odd(c2, "Network simplex node placement", 1); + a.e = b; + a.n = BD(vNb(b, (wtc(), otc)), 304); + VJc(a); + HJc(a); + MAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new KKc()), new MKc(a)); + MAb(JAb(LAb(JAb(LAb(new YAb(null, new Kub(a.e.b, 16)), new zLc()), new BLc()), new DLc()), new FLc()), new IKc(a)); + if (Ccb(DD(vNb(a.e, (Nyc(), Axc))))) { + g = Udd(c2, 1); + Odd(g, "Straight Edges Pre-Processing", 1); + UJc(a); + Qdd(g); + } + JFb(a.f); + f2 = BD(vNb(b, Ayc), 19).a * a.f.a.c.length; + uGb(HGb(IGb(LGb(a.f), f2), false), Udd(c2, 1)); + if (a.d.a.gc() != 0) { + g = Udd(c2, 1); + Odd(g, "Flexible Where Space Processing", 1); + h = BD(Btb(RAb(NAb(new YAb(null, new Kub(a.f.a, 16)), new OKc()), new iKc())), 19).a; + i3 = BD(Btb(QAb(NAb(new YAb(null, new Kub(a.f.a, 16)), new QKc()), new mKc())), 19).a; + j = i3 - h; + k = nGb(new pGb(), a.f); + l = nGb(new pGb(), a.f); + AFb(DFb(CFb(BFb(EFb(new FFb(), 2e4), j), k), l)); + MAb(JAb(JAb(Plb(a.i), new SKc()), new UKc()), new WKc(h, k, j, l)); + for (e = a.d.a.ec().Kc(); e.Ob(); ) { + d = BD(e.Pb(), 213); + d.g = 1; + } + uGb(HGb(IGb(LGb(a.f), f2), false), Udd(g, 1)); + Qdd(g); + } + if (Ccb(DD(vNb(b, Axc)))) { + g = Udd(c2, 1); + Odd(g, "Straight Edges Post-Processing", 1); + TJc(a); + Qdd(g); + } + GJc(a); + a.e = null; + a.f = null; + a.i = null; + a.c = null; + Uhb(a.k); + a.j = null; + a.a = null; + a.o = null; + a.d.a.$b(); + Qdd(c2); + } + function lMc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v; + for (h = new olb(a.a.b); h.a < h.c.c.length; ) { + f2 = BD(mlb(h), 29); + for (t = new olb(f2.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + b.g[s.p] = s; + b.a[s.p] = s; + b.d[s.p] = 0; + } + } + i3 = a.a.b; + b.c == (YLc(), WLc) && (i3 = JD(i3, 152) ? km(BD(i3, 152)) : JD(i3, 131) ? BD(i3, 131).a : JD(i3, 54) ? new ov(i3) : new dv(i3)); + for (g = i3.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 29); + n = -1; + m = f2.a; + if (b.o == (eMc(), dMc)) { + n = Ohe; + m = JD(m, 152) ? km(BD(m, 152)) : JD(m, 131) ? BD(m, 131).a : JD(m, 54) ? new ov(m) : new dv(m); + } + for (v = m.Kc(); v.Ob(); ) { + u = BD(v.Pb(), 10); + l = null; + b.c == WLc ? l = BD(Ikb(a.b.f, u.p), 15) : l = BD(Ikb(a.b.b, u.p), 15); + if (l.gc() > 0) { + d = l.gc(); + j = QD($wnd.Math.floor((d + 1) / 2)) - 1; + e = QD($wnd.Math.ceil((d + 1) / 2)) - 1; + if (b.o == dMc) { + for (k = e; k >= j; k--) { + if (b.a[u.p] == u) { + p = BD(l.Xb(k), 46); + o2 = BD(p.a, 10); + if (!Rqb(c2, p.b) && n > a.b.e[o2.p]) { + b.a[o2.p] = u; + b.g[u.p] = b.g[o2.p]; + b.a[u.p] = b.g[u.p]; + b.f[b.g[u.p].p] = (Bcb(), Ccb(b.f[b.g[u.p].p]) & u.k == (j0b(), g0b) ? true : false); + n = a.b.e[o2.p]; + } + } + } + } else { + for (k = j; k <= e; k++) { + if (b.a[u.p] == u) { + r = BD(l.Xb(k), 46); + q = BD(r.a, 10); + if (!Rqb(c2, r.b) && n < a.b.e[q.p]) { + b.a[q.p] = u; + b.g[u.p] = b.g[q.p]; + b.a[u.p] = b.g[u.p]; + b.f[b.g[u.p].p] = (Bcb(), Ccb(b.f[b.g[u.p].p]) & u.k == (j0b(), g0b) ? true : false); + n = a.b.e[q.p]; + } + } + } + } + } + } + } + } + function Thd() { + Thd = ccb; + Hhd(); + Shd = Ghd.a; + BD(qud(ZKd(Ghd.a), 0), 18); + Mhd = Ghd.f; + BD(qud(ZKd(Ghd.f), 0), 18); + BD(qud(ZKd(Ghd.f), 1), 34); + Rhd = Ghd.n; + BD(qud(ZKd(Ghd.n), 0), 34); + BD(qud(ZKd(Ghd.n), 1), 34); + BD(qud(ZKd(Ghd.n), 2), 34); + BD(qud(ZKd(Ghd.n), 3), 34); + Nhd = Ghd.g; + BD(qud(ZKd(Ghd.g), 0), 18); + BD(qud(ZKd(Ghd.g), 1), 34); + Jhd = Ghd.c; + BD(qud(ZKd(Ghd.c), 0), 18); + BD(qud(ZKd(Ghd.c), 1), 18); + Ohd = Ghd.i; + BD(qud(ZKd(Ghd.i), 0), 18); + BD(qud(ZKd(Ghd.i), 1), 18); + BD(qud(ZKd(Ghd.i), 2), 18); + BD(qud(ZKd(Ghd.i), 3), 18); + BD(qud(ZKd(Ghd.i), 4), 34); + Phd = Ghd.j; + BD(qud(ZKd(Ghd.j), 0), 18); + Khd = Ghd.d; + BD(qud(ZKd(Ghd.d), 0), 18); + BD(qud(ZKd(Ghd.d), 1), 18); + BD(qud(ZKd(Ghd.d), 2), 18); + BD(qud(ZKd(Ghd.d), 3), 18); + BD(qud(ZKd(Ghd.d), 4), 34); + BD(qud(ZKd(Ghd.d), 5), 34); + BD(qud(ZKd(Ghd.d), 6), 34); + BD(qud(ZKd(Ghd.d), 7), 34); + Ihd = Ghd.b; + BD(qud(ZKd(Ghd.b), 0), 34); + BD(qud(ZKd(Ghd.b), 1), 34); + Lhd = Ghd.e; + BD(qud(ZKd(Ghd.e), 0), 34); + BD(qud(ZKd(Ghd.e), 1), 34); + BD(qud(ZKd(Ghd.e), 2), 34); + BD(qud(ZKd(Ghd.e), 3), 34); + BD(qud(ZKd(Ghd.e), 4), 18); + BD(qud(ZKd(Ghd.e), 5), 18); + BD(qud(ZKd(Ghd.e), 6), 18); + BD(qud(ZKd(Ghd.e), 7), 18); + BD(qud(ZKd(Ghd.e), 8), 18); + BD(qud(ZKd(Ghd.e), 9), 18); + BD(qud(ZKd(Ghd.e), 10), 34); + Qhd = Ghd.k; + BD(qud(ZKd(Ghd.k), 0), 34); + BD(qud(ZKd(Ghd.k), 1), 34); + } + function wQc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F; + C = new Psb(); + w2 = new Psb(); + q = -1; + for (i3 = new olb(a); i3.a < i3.c.c.length; ) { + g = BD(mlb(i3), 128); + g.s = q--; + k = 0; + t = 0; + for (f2 = new olb(g.t); f2.a < f2.c.c.length; ) { + d = BD(mlb(f2), 268); + t += d.c; + } + for (e = new olb(g.i); e.a < e.c.c.length; ) { + d = BD(mlb(e), 268); + k += d.c; + } + g.n = k; + g.u = t; + t == 0 ? (Gsb(w2, g, w2.c.b, w2.c), true) : k == 0 && (Gsb(C, g, C.c.b, C.c), true); + } + F = Gx(a); + l = a.c.length; + p = l + 1; + r = l - 1; + n = new Rkb(); + while (F.a.gc() != 0) { + while (w2.b != 0) { + v = (sCb(w2.b != 0), BD(Nsb(w2, w2.a.a), 128)); + F.a.Bc(v) != null; + v.s = r--; + AQc(v, C, w2); + } + while (C.b != 0) { + A = (sCb(C.b != 0), BD(Nsb(C, C.a.a), 128)); + F.a.Bc(A) != null; + A.s = p++; + AQc(A, C, w2); + } + o2 = Rie; + for (j = F.a.ec().Kc(); j.Ob(); ) { + g = BD(j.Pb(), 128); + s = g.u - g.n; + if (s >= o2) { + if (s > o2) { + n.c = KC(SI, Uhe, 1, 0, 5, 1); + o2 = s; + } + n.c[n.c.length] = g; + } + } + if (n.c.length != 0) { + m = BD(Ikb(n, Bub(b, n.c.length)), 128); + F.a.Bc(m) != null; + m.s = p++; + AQc(m, C, w2); + n.c = KC(SI, Uhe, 1, 0, 5, 1); + } + } + u = a.c.length + 1; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 128); + g.s < l && (g.s += u); + } + for (B = new olb(a); B.a < B.c.c.length; ) { + A = BD(mlb(B), 128); + c2 = new Bib(A.t, 0); + while (c2.b < c2.d.gc()) { + d = (sCb(c2.b < c2.d.gc()), BD(c2.d.Xb(c2.c = c2.b++), 268)); + D = d.b; + if (A.s > D.s) { + uib(c2); + Lkb(D.i, d); + if (d.c > 0) { + d.a = D; + Ekb(D.t, d); + d.b = A; + Ekb(A.i, d); + } + } + } + } + } + function qde(a) { + var b, c2, d, e, f2; + b = a.c; + switch (b) { + case 11: + return a.Ml(); + case 12: + return a.Ol(); + case 14: + return a.Ql(); + case 15: + return a.Tl(); + case 16: + return a.Rl(); + case 17: + return a.Ul(); + case 21: + nde(a); + return wfe(), wfe(), ffe; + case 10: + switch (a.a) { + case 65: + return a.yl(); + case 90: + return a.Dl(); + case 122: + return a.Kl(); + case 98: + return a.El(); + case 66: + return a.zl(); + case 60: + return a.Jl(); + case 62: + return a.Hl(); + } + } + f2 = pde(a); + b = a.c; + switch (b) { + case 3: + return a.Zl(f2); + case 4: + return a.Xl(f2); + case 5: + return a.Yl(f2); + case 0: + if (a.a == 123 && a.d < a.j) { + e = a.d; + d = 0; + c2 = -1; + if ((b = bfb(a.i, e++)) >= 48 && b <= 57) { + d = b - 48; + while (e < a.j && (b = bfb(a.i, e++)) >= 48 && b <= 57) { + d = d * 10 + b - 48; + if (d < 0) + throw vbb(new mde(tvd((h0d(), bve)))); + } + } else { + throw vbb(new mde(tvd((h0d(), Zue)))); + } + c2 = d; + if (b == 44) { + if (e >= a.j) { + throw vbb(new mde(tvd((h0d(), _ue)))); + } else if ((b = bfb(a.i, e++)) >= 48 && b <= 57) { + c2 = b - 48; + while (e < a.j && (b = bfb(a.i, e++)) >= 48 && b <= 57) { + c2 = c2 * 10 + b - 48; + if (c2 < 0) + throw vbb(new mde(tvd((h0d(), bve)))); + } + if (d > c2) + throw vbb(new mde(tvd((h0d(), ave)))); + } else { + c2 = -1; + } + } + if (b != 125) + throw vbb(new mde(tvd((h0d(), $ue)))); + if (a.sl(e)) { + f2 = (wfe(), wfe(), new lge(9, f2)); + a.d = e + 1; + } else { + f2 = (wfe(), wfe(), new lge(3, f2)); + a.d = e; + } + f2.dm(d); + f2.cm(c2); + nde(a); + } + } + return f2; + } + function $bc(a, b, c2, d, e) { + var f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F; + p = new Skb(b.b); + u = new Skb(b.b); + m = new Skb(b.b); + B = new Skb(b.b); + q = new Skb(b.b); + for (A = Jsb(b, 0); A.b != A.d.c; ) { + v = BD(Xsb(A), 11); + for (h = new olb(v.g); h.a < h.c.c.length; ) { + f2 = BD(mlb(h), 17); + if (f2.c.i == f2.d.i) { + if (v.j == f2.d.j) { + B.c[B.c.length] = f2; + continue; + } else if (v.j == (Ucd(), Acd) && f2.d.j == Rcd) { + q.c[q.c.length] = f2; + continue; + } + } + } + } + for (i3 = new olb(q); i3.a < i3.c.c.length; ) { + f2 = BD(mlb(i3), 17); + _bc(a, f2, c2, d, (Ucd(), zcd)); + } + for (g = new olb(B); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 17); + C = new b0b(a); + __b(C, (j0b(), i0b)); + yNb(C, (Nyc(), Vxc), (dcd(), $bd)); + yNb(C, (wtc(), $sc), f2); + D = new H0b(); + yNb(D, $sc, f2.d); + G0b(D, (Ucd(), Tcd)); + F0b(D, C); + F = new H0b(); + yNb(F, $sc, f2.c); + G0b(F, zcd); + F0b(F, C); + yNb(f2.c, gtc, C); + yNb(f2.d, gtc, C); + QZb(f2, null); + RZb(f2, null); + c2.c[c2.c.length] = C; + yNb(C, ysc, meb(2)); + } + for (w2 = Jsb(b, 0); w2.b != w2.d.c; ) { + v = BD(Xsb(w2), 11); + j = v.e.c.length > 0; + r = v.g.c.length > 0; + j && r ? (m.c[m.c.length] = v, true) : j ? (p.c[p.c.length] = v, true) : r && (u.c[u.c.length] = v, true); + } + for (o2 = new olb(p); o2.a < o2.c.c.length; ) { + n = BD(mlb(o2), 11); + Ekb(e, Zbc(a, n, null, c2)); + } + for (t = new olb(u); t.a < t.c.c.length; ) { + s = BD(mlb(t), 11); + Ekb(e, Zbc(a, null, s, c2)); + } + for (l = new olb(m); l.a < l.c.c.length; ) { + k = BD(mlb(l), 11); + Ekb(e, Zbc(a, k, k, c2)); + } + } + function NCb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D; + s = new f7c(Pje, Pje); + b = new f7c(Qje, Qje); + for (B = new olb(a); B.a < B.c.c.length; ) { + A = BD(mlb(B), 8); + s.a = $wnd.Math.min(s.a, A.a); + s.b = $wnd.Math.min(s.b, A.b); + b.a = $wnd.Math.max(b.a, A.a); + b.b = $wnd.Math.max(b.b, A.b); + } + m = new f7c(b.a - s.a, b.b - s.b); + j = new f7c(s.a - 50, s.b - m.a - 50); + k = new f7c(s.a - 50, b.b + m.a + 50); + l = new f7c(b.a + m.b / 2 + 50, s.b + m.b / 2); + n = new eDb(j, k, l); + w2 = new Tqb(); + f2 = new Rkb(); + c2 = new Rkb(); + w2.a.zc(n, w2); + for (D = new olb(a); D.a < D.c.c.length; ) { + C = BD(mlb(D), 8); + f2.c = KC(SI, Uhe, 1, 0, 5, 1); + for (v = w2.a.ec().Kc(); v.Ob(); ) { + t = BD(v.Pb(), 308); + d = t.d; + S6c(d, t.a); + Jy(S6c(t.d, C), S6c(t.d, t.a)) < 0 && (f2.c[f2.c.length] = t, true); + } + c2.c = KC(SI, Uhe, 1, 0, 5, 1); + for (u = new olb(f2); u.a < u.c.c.length; ) { + t = BD(mlb(u), 308); + for (q = new olb(t.e); q.a < q.c.c.length; ) { + o2 = BD(mlb(q), 168); + g = true; + for (i3 = new olb(f2); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 308); + h != t && (wtb(o2, Ikb(h.e, 0)) || wtb(o2, Ikb(h.e, 1)) || wtb(o2, Ikb(h.e, 2))) && (g = false); + } + g && (c2.c[c2.c.length] = o2, true); + } + } + Ve(w2, f2); + reb(w2, new OCb()); + for (p = new olb(c2); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 168); + Qqb(w2, new eDb(C, o2.a, o2.b)); + } + } + r = new Tqb(); + reb(w2, new QCb(r)); + e = r.a.ec().Kc(); + while (e.Ob()) { + o2 = BD(e.Pb(), 168); + (dDb(n, o2.a) || dDb(n, o2.b)) && e.Qb(); + } + reb(r, new SCb()); + return r; + } + function _Tb(a) { + var b, c2, d, e, f2; + c2 = BD(vNb(a, (wtc(), Ksc)), 21); + b = k3c(WTb); + e = BD(vNb(a, (Nyc(), axc)), 334); + e == (hbd(), ebd) && d3c(b, XTb); + Ccb(DD(vNb(a, $wc))) ? e3c(b, (qUb(), lUb), (S8b(), I8b)) : e3c(b, (qUb(), nUb), (S8b(), I8b)); + vNb(a, (g6c(), f6c)) != null && d3c(b, YTb); + (Ccb(DD(vNb(a, hxc))) || Ccb(DD(vNb(a, _wc)))) && c3c(b, (qUb(), pUb), (S8b(), W7b)); + switch (BD(vNb(a, Lwc), 103).g) { + case 2: + case 3: + case 4: + c3c(e3c(b, (qUb(), lUb), (S8b(), Y7b)), pUb, X7b); + } + c2.Hc((Orc(), Frc)) && c3c(e3c(e3c(b, (qUb(), lUb), (S8b(), V7b)), oUb, T7b), pUb, U7b); + PD(vNb(a, rxc)) !== PD((kAc(), iAc)) && e3c(b, (qUb(), nUb), (S8b(), A8b)); + if (c2.Hc(Mrc)) { + e3c(b, (qUb(), lUb), (S8b(), G8b)); + e3c(b, mUb, E8b); + e3c(b, nUb, F8b); + } + PD(vNb(a, swc)) !== PD((yrc(), wrc)) && PD(vNb(a, Swc)) !== PD((Aad(), xad)) && c3c(b, (qUb(), pUb), (S8b(), j8b)); + Ccb(DD(vNb(a, cxc))) && e3c(b, (qUb(), nUb), (S8b(), i8b)); + Ccb(DD(vNb(a, Hwc))) && e3c(b, (qUb(), nUb), (S8b(), O8b)); + if (cUb(a)) { + PD(vNb(a, axc)) === PD(ebd) ? d = BD(vNb(a, Cwc), 292) : d = BD(vNb(a, Dwc), 292); + f2 = d == (Xrc(), Vrc) ? (S8b(), D8b) : (S8b(), R8b); + e3c(b, (qUb(), oUb), f2); + } + switch (BD(vNb(a, Kyc), 377).g) { + case 1: + e3c(b, (qUb(), oUb), (S8b(), P8b)); + break; + case 2: + c3c(e3c(e3c(b, (qUb(), nUb), (S8b(), P7b)), oUb, Q7b), pUb, R7b); + } + PD(vNb(a, ywc)) !== PD((tAc(), rAc)) && e3c(b, (qUb(), nUb), (S8b(), Q8b)); + return b; + } + function mZc(a) { + r4c(a, new E3c(P3c(M3c(O3c(N3c(new R3c(), Kre), "ELK Rectangle Packing"), "Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces."), new pZc()))); + p4c(a, Kre, _le, 1.3); + p4c(a, Kre, Jre, Ksd(VYc)); + p4c(a, Kre, ame, gZc); + p4c(a, Kre, wme, 15); + p4c(a, Kre, lqe, Ksd(SYc)); + p4c(a, Kre, Fme, Ksd(_Yc)); + p4c(a, Kre, Tme, Ksd(aZc)); + p4c(a, Kre, Eme, Ksd(bZc)); + p4c(a, Kre, Gme, Ksd($Yc)); + p4c(a, Kre, Dme, Ksd(cZc)); + p4c(a, Kre, Hme, Ksd(hZc)); + p4c(a, Kre, Bre, Ksd(eZc)); + p4c(a, Kre, Cre, Ksd(ZYc)); + p4c(a, Kre, Fre, Ksd(dZc)); + p4c(a, Kre, Gre, Ksd(iZc)); + p4c(a, Kre, Hre, Ksd(WYc)); + p4c(a, Kre, Ame, Ksd(XYc)); + p4c(a, Kre, xqe, Ksd(YYc)); + p4c(a, Kre, Ere, Ksd(UYc)); + p4c(a, Kre, Dre, Ksd(TYc)); + p4c(a, Kre, Ire, Ksd(kZc)); + } + function Wmd(b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + if (d == null) { + return null; + } + if (b.a != c2.Aj()) { + throw vbb(new Wdb(tte + c2.ne() + ute)); + } + if (JD(c2, 457)) { + r = _Pd(BD(c2, 671), d); + if (!r) { + throw vbb(new Wdb(vte + d + "' is not a valid enumerator of '" + c2.ne() + "'")); + } + return r; + } + switch (o1d((O6d(), M6d), c2).cl()) { + case 2: { + d = Qge(d, false); + break; + } + case 3: { + d = Qge(d, true); + break; + } + } + e = o1d(M6d, c2).$k(); + if (e) { + return e.Aj().Nh().Kh(e, d); + } + n = o1d(M6d, c2).al(); + if (n) { + r = new Rkb(); + for (k = Zmd(d), l = 0, m = k.length; l < m; ++l) { + j = k[l]; + Ekb(r, n.Aj().Nh().Kh(n, j)); + } + return r; + } + q = o1d(M6d, c2).bl(); + if (!q.dc()) { + for (p = q.Kc(); p.Ob(); ) { + o2 = BD(p.Pb(), 148); + try { + r = o2.Aj().Nh().Kh(o2, d); + if (r != null) { + return r; + } + } catch (a) { + a = ubb(a); + if (!JD(a, 60)) + throw vbb(a); + } + } + throw vbb(new Wdb(vte + d + "' does not match any member types of the union datatype '" + c2.ne() + "'")); + } + BD(c2, 834).Fj(); + f2 = r6d(c2.Bj()); + if (!f2) + return null; + if (f2 == yI) { + h = 0; + try { + h = Icb(d, Rie, Ohe) & aje; + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + g = rfb(d); + h = g[0]; + } else + throw vbb(a); + } + return bdb(h); + } + if (f2 == $J) { + for (i3 = 0; i3 < Pmd.length; ++i3) { + try { + return DQd(Pmd[i3], d); + } catch (a) { + a = ubb(a); + if (!JD(a, 32)) + throw vbb(a); + } + } + throw vbb(new Wdb(vte + d + "' is not a date formatted string of the form yyyy-MM-dd'T'HH:mm:ss'.'SSSZ or a valid subset thereof")); + } + throw vbb(new Wdb(vte + d + "' is invalid. ")); + } + function ngb(a, b) { + var c2, d, e, f2, g, h, i3, j; + c2 = 0; + g = 0; + f2 = b.length; + h = null; + j = new Vfb(); + if (g < f2 && (BCb(g, b.length), b.charCodeAt(g) == 43)) { + ++g; + ++c2; + if (g < f2 && (BCb(g, b.length), b.charCodeAt(g) == 43 || (BCb(g, b.length), b.charCodeAt(g) == 45))) { + throw vbb(new Oeb(Oje + b + '"')); + } + } + while (g < f2 && (BCb(g, b.length), b.charCodeAt(g) != 46) && (BCb(g, b.length), b.charCodeAt(g) != 101) && (BCb(g, b.length), b.charCodeAt(g) != 69)) { + ++g; + } + j.a += "" + qfb(b == null ? Xhe : (uCb(b), b), c2, g); + if (g < f2 && (BCb(g, b.length), b.charCodeAt(g) == 46)) { + ++g; + c2 = g; + while (g < f2 && (BCb(g, b.length), b.charCodeAt(g) != 101) && (BCb(g, b.length), b.charCodeAt(g) != 69)) { + ++g; + } + a.e = g - c2; + j.a += "" + qfb(b == null ? Xhe : (uCb(b), b), c2, g); + } else { + a.e = 0; + } + if (g < f2 && (BCb(g, b.length), b.charCodeAt(g) == 101 || (BCb(g, b.length), b.charCodeAt(g) == 69))) { + ++g; + c2 = g; + if (g < f2 && (BCb(g, b.length), b.charCodeAt(g) == 43)) { + ++g; + g < f2 && (BCb(g, b.length), b.charCodeAt(g) != 45) && ++c2; + } + h = b.substr(c2, f2 - c2); + a.e = a.e - Icb(h, Rie, Ohe); + if (a.e != QD(a.e)) { + throw vbb(new Oeb("Scale out of range.")); + } + } + i3 = j.a; + if (i3.length < 16) { + a.f = (kgb == null && (kgb = new RegExp("^[+-]?\\d*$", "i")), kgb.test(i3) ? parseInt(i3, 10) : NaN); + if (isNaN(a.f)) { + throw vbb(new Oeb(Oje + b + '"')); + } + a.a = ugb(a.f); + } else { + ogb(a, new Ygb(i3)); + } + a.d = j.a.length; + for (e = 0; e < j.a.length; ++e) { + d = bfb(j.a, e); + if (d != 45 && d != 48) { + break; + } + --a.d; + } + a.d == 0 && (a.d = 1); + } + function xXb() { + xXb = ccb; + wXb = new Hp(); + Rc(wXb, (Ucd(), Fcd), Jcd); + Rc(wXb, Qcd, Jcd); + Rc(wXb, Qcd, Mcd); + Rc(wXb, Bcd, Icd); + Rc(wXb, Bcd, Jcd); + Rc(wXb, Gcd, Jcd); + Rc(wXb, Gcd, Kcd); + Rc(wXb, Ocd, Dcd); + Rc(wXb, Ocd, Jcd); + Rc(wXb, Lcd, Ecd); + Rc(wXb, Lcd, Jcd); + Rc(wXb, Lcd, Kcd); + Rc(wXb, Lcd, Dcd); + Rc(wXb, Ecd, Lcd); + Rc(wXb, Ecd, Mcd); + Rc(wXb, Ecd, Icd); + Rc(wXb, Ecd, Jcd); + Rc(wXb, Ncd, Ncd); + Rc(wXb, Ncd, Kcd); + Rc(wXb, Ncd, Mcd); + Rc(wXb, Hcd, Hcd); + Rc(wXb, Hcd, Kcd); + Rc(wXb, Hcd, Icd); + Rc(wXb, Pcd, Pcd); + Rc(wXb, Pcd, Dcd); + Rc(wXb, Pcd, Mcd); + Rc(wXb, Ccd, Ccd); + Rc(wXb, Ccd, Dcd); + Rc(wXb, Ccd, Icd); + Rc(wXb, Kcd, Gcd); + Rc(wXb, Kcd, Lcd); + Rc(wXb, Kcd, Ncd); + Rc(wXb, Kcd, Hcd); + Rc(wXb, Kcd, Jcd); + Rc(wXb, Kcd, Kcd); + Rc(wXb, Kcd, Mcd); + Rc(wXb, Kcd, Icd); + Rc(wXb, Dcd, Ocd); + Rc(wXb, Dcd, Lcd); + Rc(wXb, Dcd, Pcd); + Rc(wXb, Dcd, Ccd); + Rc(wXb, Dcd, Dcd); + Rc(wXb, Dcd, Mcd); + Rc(wXb, Dcd, Icd); + Rc(wXb, Dcd, Jcd); + Rc(wXb, Mcd, Qcd); + Rc(wXb, Mcd, Ecd); + Rc(wXb, Mcd, Ncd); + Rc(wXb, Mcd, Pcd); + Rc(wXb, Mcd, Kcd); + Rc(wXb, Mcd, Dcd); + Rc(wXb, Mcd, Mcd); + Rc(wXb, Mcd, Jcd); + Rc(wXb, Icd, Bcd); + Rc(wXb, Icd, Ecd); + Rc(wXb, Icd, Hcd); + Rc(wXb, Icd, Ccd); + Rc(wXb, Icd, Kcd); + Rc(wXb, Icd, Dcd); + Rc(wXb, Icd, Icd); + Rc(wXb, Icd, Jcd); + Rc(wXb, Jcd, Fcd); + Rc(wXb, Jcd, Qcd); + Rc(wXb, Jcd, Bcd); + Rc(wXb, Jcd, Gcd); + Rc(wXb, Jcd, Ocd); + Rc(wXb, Jcd, Lcd); + Rc(wXb, Jcd, Ecd); + Rc(wXb, Jcd, Kcd); + Rc(wXb, Jcd, Dcd); + Rc(wXb, Jcd, Mcd); + Rc(wXb, Jcd, Icd); + Rc(wXb, Jcd, Jcd); + } + function YXb(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B; + a.d = new f7c(Pje, Pje); + a.c = new f7c(Qje, Qje); + for (m = b.Kc(); m.Ob(); ) { + k = BD(m.Pb(), 37); + for (t = new olb(k.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + a.d.a = $wnd.Math.min(a.d.a, s.n.a - s.d.b); + a.d.b = $wnd.Math.min(a.d.b, s.n.b - s.d.d); + a.c.a = $wnd.Math.max(a.c.a, s.n.a + s.o.a + s.d.c); + a.c.b = $wnd.Math.max(a.c.b, s.n.b + s.o.b + s.d.a); + } + } + h = new nYb(); + for (l = b.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 37); + d = fYb(a, k); + Ekb(h.a, d); + d.a = d.a | !BD(vNb(d.c, (wtc(), Esc)), 21).dc(); + } + a.b = (LUb(), B = new VUb(), B.f = new CUb(c2), B.b = BUb(B.f, h), B); + PUb((o2 = a.b, new Zdd(), o2)); + a.e = new d7c(); + a.a = a.b.f.e; + for (g = new olb(h.a); g.a < g.c.c.length; ) { + e = BD(mlb(g), 841); + u = QUb(a.b, e); + g_b(e.c, u.a, u.b); + for (q = new olb(e.c.a); q.a < q.c.c.length; ) { + p = BD(mlb(q), 10); + if (p.k == (j0b(), e0b)) { + r = aYb(a, p.n, BD(vNb(p, (wtc(), Hsc)), 61)); + P6c(X6c(p.n), r); + } + } + } + for (f2 = new olb(h.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 841); + for (j = new olb(lYb(e)); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 17); + A = new t7c(i3.a); + St(A, 0, A0b(i3.c)); + Dsb(A, A0b(i3.d)); + n = null; + for (w2 = Jsb(A, 0); w2.b != w2.d.c; ) { + v = BD(Xsb(w2), 8); + if (!n) { + n = v; + continue; + } + if (Ky(n.a, v.a)) { + a.e.a = $wnd.Math.min(a.e.a, n.a); + a.a.a = $wnd.Math.max(a.a.a, n.a); + } else if (Ky(n.b, v.b)) { + a.e.b = $wnd.Math.min(a.e.b, n.b); + a.a.b = $wnd.Math.max(a.a.b, n.b); + } + n = v; + } + } + } + V6c(a.e); + P6c(a.a, a.e); + } + function wZd(a) { + Bnd(a.b, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ConsistentTransient"])); + Bnd(a.a, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedSourceURI"])); + Bnd(a.o, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "InterfaceIsAbstract AtMostOneID UniqueFeatureNames UniqueOperationSignatures NoCircularSuperTypes WellFormedMapEntryClass ConsistentSuperTypes DisjointFeatureAndOperationSignatures"])); + Bnd(a.p, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedInstanceTypeName UniqueTypeParameterNames"])); + Bnd(a.v, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "UniqueEnumeratorNames UniqueEnumeratorLiterals"])); + Bnd(a.R, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedName"])); + Bnd(a.T, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "UniqueParameterNames UniqueTypeParameterNames NoRepeatingVoid"])); + Bnd(a.U, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "WellFormedNsURI WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames UniqueNsURIs"])); + Bnd(a.W, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ConsistentOpposite SingleContainer ConsistentKeys ConsistentUnique ConsistentContainer"])); + Bnd(a.bb, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ValidDefaultValueLiteral"])); + Bnd(a.eb, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ValidLowerBound ValidUpperBound ConsistentBounds ValidType"])); + Bnd(a.H, _ve, OC(GC(ZI, 1), nie, 2, 6, [bwe, "ConsistentType ConsistentBounds ConsistentArguments"])); + } + function B4b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C; + if (b.dc()) { + return; + } + e = new s7c(); + h = c2 ? c2 : BD(b.Xb(0), 17); + o2 = h.c; + hQc(); + m = o2.i.k; + if (!(m == (j0b(), h0b) || m == i0b || m == e0b || m == d0b)) { + throw vbb(new Wdb("The target node of the edge must be a normal node or a northSouthPort.")); + } + Fsb(e, l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a]))); + if ((Ucd(), Lcd).Hc(o2.j)) { + q = Edb(ED(vNb(o2, (wtc(), qtc)))); + l = new f7c(l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).a, q); + Gsb(e, l, e.c.b, e.c); + } + k = null; + d = false; + i3 = b.Kc(); + while (i3.Ob()) { + g = BD(i3.Pb(), 17); + f2 = g.a; + if (f2.b != 0) { + if (d) { + j = Y6c(P6c(k, (sCb(f2.b != 0), BD(f2.a.a.c, 8))), 0.5); + Gsb(e, j, e.c.b, e.c); + d = false; + } else { + d = true; + } + k = R6c((sCb(f2.b != 0), BD(f2.c.b.c, 8))); + ye(e, f2); + Osb(f2); + } + } + p = h.d; + if (Lcd.Hc(p.j)) { + q = Edb(ED(vNb(p, (wtc(), qtc)))); + l = new f7c(l7c(OC(GC(m1, 1), nie, 8, 0, [p.i.n, p.n, p.a])).a, q); + Gsb(e, l, e.c.b, e.c); + } + Fsb(e, l7c(OC(GC(m1, 1), nie, 8, 0, [p.i.n, p.n, p.a]))); + a.d == (tBc(), qBc) && (r = (sCb(e.b != 0), BD(e.a.a.c, 8)), s = BD(Ut(e, 1), 8), t = new e7c(bRc(o2.j)), t.a *= 5, t.b *= 5, u = c7c(new f7c(s.a, s.b), r), v = new f7c(A4b(t.a, u.a), A4b(t.b, u.b)), P6c(v, r), w2 = Jsb(e, 1), Vsb(w2, v), A = (sCb(e.b != 0), BD(e.c.b.c, 8)), B = BD(Ut(e, e.b - 2), 8), t = new e7c(bRc(p.j)), t.a *= 5, t.b *= 5, u = c7c(new f7c(B.a, B.b), A), C = new f7c(A4b(t.a, u.a), A4b(t.b, u.b)), P6c(C, A), St(e, e.b - 1, C), void 0); + n = new YPc(e); + ye(h.a, UPc(n)); + } + function Kgd(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I, J, K2, L, M, N, O, P; + t = BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82); + v = t.Dg(); + w2 = t.Eg(); + u = t.Cg() / 2; + p = t.Bg() / 2; + if (JD(t, 186)) { + s = BD(t, 118); + v += mpd(s).i; + v += mpd(s).i; + } + v += u; + w2 += p; + F = BD(qud((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b), 0), 82); + H = F.Dg(); + I = F.Eg(); + G = F.Cg() / 2; + A = F.Bg() / 2; + if (JD(F, 186)) { + D = BD(F, 118); + H += mpd(D).i; + H += mpd(D).i; + } + H += G; + I += A; + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i == 0) { + h = (Fhd(), j = new rmd(), j); + wtd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), h); + } else if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i > 1) { + o2 = new Oyd((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a)); + while (o2.e != o2.i.gc()) { + Eyd(o2); + } + } + g = BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202); + q = H; + H > v + u ? q = v + u : H < v - u && (q = v - u); + r = I; + I > w2 + p ? r = w2 + p : I < w2 - p && (r = w2 - p); + q > v - u && q < v + u && r > w2 - p && r < w2 + p && (q = v + u); + omd(g, q); + pmd(g, r); + B = v; + v > H + G ? B = H + G : v < H - G && (B = H - G); + C = w2; + w2 > I + A ? C = I + A : w2 < I - A && (C = I - A); + B > H - G && B < H + G && C > I - A && C < I + A && (C = I + A); + hmd(g, B); + imd(g, C); + Uxd((!g.a && (g.a = new xMd(y2, g, 5)), g.a)); + f2 = Bub(b, 5); + t == F && ++f2; + L = B - q; + O = C - r; + J = $wnd.Math.sqrt(L * L + O * O); + l = J * 0.20000000298023224; + M = L / (f2 + 1); + P = O / (f2 + 1); + K2 = q; + N = r; + for (k = 0; k < f2; k++) { + K2 += M; + N += P; + m = K2 + Cub(b, 24) * lke * l - l / 2; + m < 0 ? m = 1 : m > c2 && (m = c2 - 1); + n = N + Cub(b, 24) * lke * l - l / 2; + n < 0 ? n = 1 : n > d && (n = d - 1); + e = (Fhd(), i3 = new xkd(), i3); + vkd(e, m); + wkd(e, n); + wtd((!g.a && (g.a = new xMd(y2, g, 5)), g.a), e); + } + } + function Nyc() { + Nyc = ccb; + iyc = (Y9c(), I9c); + jyc = J9c; + kyc = K9c; + lyc = L9c; + nyc = M9c; + oyc = N9c; + ryc = P9c; + tyc = R9c; + uyc = S9c; + syc = Q9c; + vyc = T9c; + xyc = U9c; + zyc = X9c; + qyc = O9c; + hyc = (jwc(), Bvc); + myc = Cvc; + pyc = Dvc; + wyc = Evc; + byc = new Osd(D9c, meb(0)); + cyc = yvc; + dyc = zvc; + eyc = Avc; + Kyc = awc; + Cyc = Hvc; + Dyc = Kvc; + Gyc = Svc; + Eyc = Nvc; + Fyc = Pvc; + Myc = fwc; + Lyc = cwc; + Iyc = Yvc; + Hyc = Wvc; + Jyc = $vc; + Cxc = pvc; + Dxc = qvc; + Xwc = Auc; + Ywc = Duc; + Lxc = new q0b(12); + Kxc = new Osd(f9c, Lxc); + Twc = (Aad(), wad); + Swc = new Osd(E8c, Twc); + Uxc = new Osd(s9c, 0); + fyc = new Osd(E9c, meb(1)); + owc = new Osd(r8c, tme); + Jxc = d9c; + Vxc = t9c; + $xc = A9c; + Kwc = y8c; + mwc = p8c; + axc = J8c; + gyc = new Osd(H9c, (Bcb(), true)); + fxc = M8c; + gxc = N8c; + Fxc = Y8c; + Ixc = b9c; + Gxc = $8c; + Nwc = (ead(), cad); + Lwc = new Osd(z8c, Nwc); + xxc = W8c; + wxc = U8c; + Yxc = x9c; + Xxc = w9c; + Zxc = z9c; + Oxc = (Tbd(), Sbd); + new Osd(l9c, Oxc); + Qxc = o9c; + Rxc = p9c; + Sxc = q9c; + Pxc = n9c; + Byc = Gvc; + sxc = avc; + rxc = $uc; + Ayc = Fvc; + mxc = Suc; + Jwc = muc; + Iwc = kuc; + Awc = Xtc; + Bwc = Ytc; + Dwc = buc; + Cwc = Ztc; + Hwc = iuc; + uxc = cvc; + vxc = dvc; + ixc = Luc; + Exc = uvc; + zxc = hvc; + $wc = Guc; + Bxc = nvc; + Vwc = wuc; + Wwc = yuc; + zwc = w8c; + yxc = evc; + swc = Mtc; + rwc = Ktc; + qwc = Jtc; + cxc = Juc; + bxc = Iuc; + dxc = Kuc; + Hxc = _8c; + jxc = Q8c; + Zwc = G8c; + Qwc = C8c; + Pwc = B8c; + Ewc = euc; + Wxc = v9c; + pwc = v8c; + exc = L8c; + Txc = r9c; + Mxc = h9c; + Nxc = j9c; + oxc = Vuc; + pxc = Xuc; + ayc = C9c; + nwc = Itc; + qxc = Zuc; + Rwc = suc; + Owc = quc; + txc = S8c; + kxc = Puc; + Axc = kvc; + yyc = V9c; + Mwc = ouc; + _xc = wvc; + Uwc = uuc; + lxc = Ruc; + Fwc = guc; + hxc = P8c; + nxc = Uuc; + Gwc = huc; + ywc = Vtc; + wwc = Stc; + uwc = Qtc; + vwc = Rtc; + xwc = Utc; + twc = Otc; + _wc = Huc; + } + function shb(a, b) { + phb(); + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H; + B = a.e; + o2 = a.d; + e = a.a; + if (B == 0) { + switch (b) { + case 0: + return "0"; + case 1: + return $je; + case 2: + return "0.00"; + case 3: + return "0.000"; + case 4: + return "0.0000"; + case 5: + return "0.00000"; + case 6: + return "0.000000"; + default: + w2 = new Ufb(); + b < 0 ? (w2.a += "0E+", w2) : (w2.a += "0E", w2); + w2.a += -b; + return w2.a; + } + } + t = o2 * 10 + 1 + 7; + u = KC(TD, $ie, 25, t + 1, 15, 1); + c2 = t; + if (o2 == 1) { + h = e[0]; + if (h < 0) { + H = xbb(h, Yje); + do { + p = H; + H = Abb(H, 10); + u[--c2] = 48 + Tbb(Qbb(p, Ibb(H, 10))) & aje; + } while (ybb(H, 0) != 0); + } else { + H = h; + do { + p = H; + H = H / 10 | 0; + u[--c2] = 48 + (p - H * 10) & aje; + } while (H != 0); + } + } else { + D = KC(WD, oje, 25, o2, 15, 1); + G = o2; + $fb(e, 0, D, 0, G); + I: + while (true) { + A = 0; + for (j = G - 1; j >= 0; j--) { + F = wbb(Nbb(A, 32), xbb(D[j], Yje)); + r = qhb(F); + D[j] = Tbb(r); + A = Tbb(Obb(r, 32)); + } + s = Tbb(A); + q = c2; + do { + u[--c2] = 48 + s % 10 & aje; + } while ((s = s / 10 | 0) != 0 && c2 != 0); + d = 9 - q + c2; + for (i3 = 0; i3 < d && c2 > 0; i3++) { + u[--c2] = 48; + } + l = G - 1; + for (; D[l] == 0; l--) { + if (l == 0) { + break I; + } + } + G = l + 1; + } + while (u[c2] == 48) { + ++c2; + } + } + n = B < 0; + g = t - c2 - b - 1; + if (b == 0) { + n && (u[--c2] = 45); + return zfb(u, c2, t - c2); + } + if (b > 0 && g >= -6) { + if (g >= 0) { + k = c2 + g; + for (m = t - 1; m >= k; m--) { + u[m + 1] = u[m]; + } + u[++k] = 46; + n && (u[--c2] = 45); + return zfb(u, c2, t - c2 + 1); + } + for (l = 2; l < -g + 1; l++) { + u[--c2] = 48; + } + u[--c2] = 46; + u[--c2] = 48; + n && (u[--c2] = 45); + return zfb(u, c2, t - c2); + } + C = c2 + 1; + f2 = t; + v = new Vfb(); + n && (v.a += "-", v); + if (f2 - C >= 1) { + Kfb(v, u[c2]); + v.a += "."; + v.a += zfb(u, c2 + 1, t - c2 - 1); + } else { + v.a += zfb(u, c2, t - c2); + } + v.a += "E"; + g > 0 && (v.a += "+", v); + v.a += "" + g; + return v.a; + } + function z$c(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + a.c = b; + a.g = new Lqb(); + c2 = (Pgd(), new bhd(a.c)); + d = new YGb(c2); + UGb(d); + t = GD(hkd(a.c, (d0c(), Y_c))); + i3 = BD(hkd(a.c, $_c), 316); + v = BD(hkd(a.c, __c), 429); + g = BD(hkd(a.c, T_c), 482); + u = BD(hkd(a.c, Z_c), 430); + a.j = Edb(ED(hkd(a.c, a0c))); + h = a.a; + switch (i3.g) { + case 0: + h = a.a; + break; + case 1: + h = a.b; + break; + case 2: + h = a.i; + break; + case 3: + h = a.e; + break; + case 4: + h = a.f; + break; + default: + throw vbb(new Wdb(Mre + (i3.f != null ? i3.f : "" + i3.g))); + } + a.d = new g_c(h, v, g); + yNb(a.d, (XNb(), VNb), DD(hkd(a.c, V_c))); + a.d.c = Ccb(DD(hkd(a.c, U_c))); + if (Vod(a.c).i == 0) { + return a.d; + } + for (l = new Fyd(Vod(a.c)); l.e != l.i.gc(); ) { + k = BD(Dyd(l), 33); + n = k.g / 2; + m = k.f / 2; + w2 = new f7c(k.i + n, k.j + m); + while (Mhb(a.g, w2)) { + O6c(w2, ($wnd.Math.random() - 0.5) * qme, ($wnd.Math.random() - 0.5) * qme); + } + p = BD(hkd(k, (Y9c(), S8c)), 142); + q = new aOb(w2, new J6c(w2.a - n - a.j / 2 - p.b, w2.b - m - a.j / 2 - p.d, k.g + a.j + (p.b + p.c), k.f + a.j + (p.d + p.a))); + Ekb(a.d.i, q); + Rhb(a.g, w2, new vgd(q, k)); + } + switch (u.g) { + case 0: + if (t == null) { + a.d.d = BD(Ikb(a.d.i, 0), 65); + } else { + for (s = new olb(a.d.i); s.a < s.c.c.length; ) { + q = BD(mlb(s), 65); + o2 = BD(BD(Ohb(a.g, q.a), 46).b, 33).zg(); + o2 != null && dfb(o2, t) && (a.d.d = q); + } + } + break; + case 1: + e = new f7c(a.c.g, a.c.f); + e.a *= 0.5; + e.b *= 0.5; + O6c(e, a.c.i, a.c.j); + f2 = Pje; + for (r = new olb(a.d.i); r.a < r.c.c.length; ) { + q = BD(mlb(r), 65); + j = S6c(q.a, e); + if (j < f2) { + f2 = j; + a.d.d = q; + } + } + break; + default: + throw vbb(new Wdb(Mre + (u.f != null ? u.f : "" + u.g))); + } + return a.d; + } + function qfd(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + v = BD(qud((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a), 0), 202); + k = new s7c(); + u = new Lqb(); + w2 = tfd(v); + jrb(u.f, v, w2); + m = new Lqb(); + d = new Psb(); + for (o2 = ul(pl(OC(GC(KI, 1), Uhe, 20, 0, [(!b.d && (b.d = new y5d(B2, b, 8, 5)), b.d), (!b.e && (b.e = new y5d(B2, b, 7, 4)), b.e)]))); Qr(o2); ) { + n = BD(Rr(o2), 79); + if ((!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i != 1) { + throw vbb(new Wdb(Tse + (!a.a && (a.a = new cUd(A2, a, 6, 6)), a.a).i)); + } + if (n != a) { + q = BD(qud((!n.a && (n.a = new cUd(A2, n, 6, 6)), n.a), 0), 202); + Gsb(d, q, d.c.b, d.c); + p = BD(Wd(irb(u.f, q)), 12); + if (!p) { + p = tfd(q); + jrb(u.f, q, p); + } + l = c2 ? c7c(new g7c(BD(Ikb(w2, w2.c.length - 1), 8)), BD(Ikb(p, p.c.length - 1), 8)) : c7c(new g7c((tCb(0, w2.c.length), BD(w2.c[0], 8))), (tCb(0, p.c.length), BD(p.c[0], 8))); + jrb(m.f, q, l); + } + } + if (d.b != 0) { + r = BD(Ikb(w2, c2 ? w2.c.length - 1 : 0), 8); + for (j = 1; j < w2.c.length; j++) { + s = BD(Ikb(w2, c2 ? w2.c.length - 1 - j : j), 8); + e = Jsb(d, 0); + while (e.b != e.d.c) { + q = BD(Xsb(e), 202); + p = BD(Wd(irb(u.f, q)), 12); + if (p.c.length <= j) { + Zsb(e); + } else { + t = P6c(new g7c(BD(Ikb(p, c2 ? p.c.length - 1 - j : j), 8)), BD(Wd(irb(m.f, q)), 8)); + if (s.a != t.a || s.b != t.b) { + f2 = s.a - r.a; + h = s.b - r.b; + g = t.a - r.a; + i3 = t.b - r.b; + g * h == i3 * f2 && (f2 == 0 || isNaN(f2) ? f2 : f2 < 0 ? -1 : 1) == (g == 0 || isNaN(g) ? g : g < 0 ? -1 : 1) && (h == 0 || isNaN(h) ? h : h < 0 ? -1 : 1) == (i3 == 0 || isNaN(i3) ? i3 : i3 < 0 ? -1 : 1) ? ($wnd.Math.abs(f2) < $wnd.Math.abs(g) || $wnd.Math.abs(h) < $wnd.Math.abs(i3)) && (Gsb(k, s, k.c.b, k.c), true) : j > 1 && (Gsb(k, r, k.c.b, k.c), true); + Zsb(e); + } + } + } + r = s; + } + } + return k; + } + function $Bc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I, J, K2, L; + Odd(c2, "Greedy cycle removal", 1); + t = b.a; + L = t.c.length; + a.a = KC(WD, oje, 25, L, 15, 1); + a.c = KC(WD, oje, 25, L, 15, 1); + a.b = KC(WD, oje, 25, L, 15, 1); + j = 0; + for (r = new olb(t); r.a < r.c.c.length; ) { + p = BD(mlb(r), 10); + p.p = j; + for (C = new olb(p.j); C.a < C.c.c.length; ) { + w2 = BD(mlb(C), 11); + for (h = new olb(w2.e); h.a < h.c.c.length; ) { + d = BD(mlb(h), 17); + if (d.c.i == p) { + continue; + } + G = BD(vNb(d, (Nyc(), cyc)), 19).a; + a.a[j] += G > 0 ? G + 1 : 1; + } + for (g = new olb(w2.g); g.a < g.c.c.length; ) { + d = BD(mlb(g), 17); + if (d.d.i == p) { + continue; + } + G = BD(vNb(d, (Nyc(), cyc)), 19).a; + a.c[j] += G > 0 ? G + 1 : 1; + } + } + a.c[j] == 0 ? Dsb(a.e, p) : a.a[j] == 0 && Dsb(a.f, p); + ++j; + } + o2 = -1; + n = 1; + l = new Rkb(); + a.d = BD(vNb(b, (wtc(), jtc)), 230); + while (L > 0) { + while (a.e.b != 0) { + I = BD(Lsb(a.e), 10); + a.b[I.p] = o2--; + _Bc(a, I); + --L; + } + while (a.f.b != 0) { + J = BD(Lsb(a.f), 10); + a.b[J.p] = n++; + _Bc(a, J); + --L; + } + if (L > 0) { + m = Rie; + for (s = new olb(t); s.a < s.c.c.length; ) { + p = BD(mlb(s), 10); + if (a.b[p.p] == 0) { + u = a.c[p.p] - a.a[p.p]; + if (u >= m) { + if (u > m) { + l.c = KC(SI, Uhe, 1, 0, 5, 1); + m = u; + } + l.c[l.c.length] = p; + } + } + } + k = a.Zf(l); + a.b[k.p] = n++; + _Bc(a, k); + --L; + } + } + H = t.c.length + 1; + for (j = 0; j < t.c.length; j++) { + a.b[j] < 0 && (a.b[j] += H); + } + for (q = new olb(t); q.a < q.c.c.length; ) { + p = BD(mlb(q), 10); + F = m_b(p.j); + for (A = F, B = 0, D = A.length; B < D; ++B) { + w2 = A[B]; + v = k_b(w2.g); + for (e = v, f2 = 0, i3 = e.length; f2 < i3; ++f2) { + d = e[f2]; + K2 = d.d.i.p; + if (a.b[p.p] > a.b[K2]) { + PZb(d, true); + yNb(b, Asc, (Bcb(), true)); + } + } + } + } + a.a = null; + a.c = null; + a.b = null; + Osb(a.f); + Osb(a.e); + Qdd(c2); + } + function sQb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + d = new Rkb(); + h = new Rkb(); + q = b / 2; + n = a.gc(); + e = BD(a.Xb(0), 8); + r = BD(a.Xb(1), 8); + o2 = tQb(e.a, e.b, r.a, r.b, q); + Ekb(d, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + Ekb(h, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + for (j = 2; j < n; j++) { + p = e; + e = r; + r = BD(a.Xb(j), 8); + o2 = tQb(e.a, e.b, p.a, p.b, q); + Ekb(d, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + Ekb(h, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + o2 = tQb(e.a, e.b, r.a, r.b, q); + Ekb(d, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + Ekb(h, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + } + o2 = tQb(r.a, r.b, e.a, e.b, q); + Ekb(d, (tCb(1, o2.c.length), BD(o2.c[1], 8))); + Ekb(h, (tCb(0, o2.c.length), BD(o2.c[0], 8))); + c2 = new s7c(); + g = new Rkb(); + Dsb(c2, (tCb(0, d.c.length), BD(d.c[0], 8))); + for (k = 1; k < d.c.length - 2; k += 2) { + f2 = (tCb(k, d.c.length), BD(d.c[k], 8)); + m = rQb((tCb(k - 1, d.c.length), BD(d.c[k - 1], 8)), f2, (tCb(k + 1, d.c.length), BD(d.c[k + 1], 8)), (tCb(k + 2, d.c.length), BD(d.c[k + 2], 8))); + !isFinite(m.a) || !isFinite(m.b) ? (Gsb(c2, f2, c2.c.b, c2.c), true) : (Gsb(c2, m, c2.c.b, c2.c), true); + } + Dsb(c2, BD(Ikb(d, d.c.length - 1), 8)); + Ekb(g, (tCb(0, h.c.length), BD(h.c[0], 8))); + for (l = 1; l < h.c.length - 2; l += 2) { + f2 = (tCb(l, h.c.length), BD(h.c[l], 8)); + m = rQb((tCb(l - 1, h.c.length), BD(h.c[l - 1], 8)), f2, (tCb(l + 1, h.c.length), BD(h.c[l + 1], 8)), (tCb(l + 2, h.c.length), BD(h.c[l + 2], 8))); + !isFinite(m.a) || !isFinite(m.b) ? (g.c[g.c.length] = f2, true) : (g.c[g.c.length] = m, true); + } + Ekb(g, BD(Ikb(h, h.c.length - 1), 8)); + for (i3 = g.c.length - 1; i3 >= 0; i3--) { + Dsb(c2, (tCb(i3, g.c.length), BD(g.c[i3], 8))); + } + return c2; + } + function aFd(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n; + g = true; + l = null; + d = null; + e = null; + b = false; + n = BEd; + j = null; + f2 = null; + h = 0; + i3 = UEd(a, h, zEd, AEd); + if (i3 < a.length && (BCb(i3, a.length), a.charCodeAt(i3) == 58)) { + l = a.substr(h, i3 - h); + h = i3 + 1; + } + c2 = l != null && hnb(GEd, l.toLowerCase()); + if (c2) { + i3 = a.lastIndexOf("!/"); + if (i3 == -1) { + throw vbb(new Wdb("no archive separator")); + } + g = true; + d = qfb(a, h, ++i3); + h = i3; + } else if (h >= 0 && dfb(a.substr(h, "//".length), "//")) { + h += 2; + i3 = UEd(a, h, CEd, DEd); + d = a.substr(h, i3 - h); + h = i3; + } else if (l != null && (h == a.length || (BCb(h, a.length), a.charCodeAt(h) != 47))) { + g = false; + i3 = ifb(a, wfb(35), h); + i3 == -1 && (i3 = a.length); + d = a.substr(h, i3 - h); + h = i3; + } + if (!c2 && h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 47)) { + i3 = UEd(a, h + 1, CEd, DEd); + k = a.substr(h + 1, i3 - (h + 1)); + if (k.length > 0 && bfb(k, k.length - 1) == 58) { + e = k; + h = i3; + } + } + if (h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 47)) { + ++h; + b = true; + } + if (h < a.length && (BCb(h, a.length), a.charCodeAt(h) != 63) && (BCb(h, a.length), a.charCodeAt(h) != 35)) { + m = new Rkb(); + while (h < a.length && (BCb(h, a.length), a.charCodeAt(h) != 63) && (BCb(h, a.length), a.charCodeAt(h) != 35)) { + i3 = UEd(a, h, CEd, DEd); + Ekb(m, a.substr(h, i3 - h)); + h = i3; + h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 47) && (bFd(a, ++h) || (m.c[m.c.length] = "", true)); + } + n = KC(ZI, nie, 2, m.c.length, 6, 1); + Qkb(m, n); + } + if (h < a.length && (BCb(h, a.length), a.charCodeAt(h) == 63)) { + i3 = gfb(a, 35, ++h); + i3 == -1 && (i3 = a.length); + j = a.substr(h, i3 - h); + h = i3; + } + h < a.length && (f2 = pfb(a, ++h)); + iFd(g, l, d, e, n, j); + return new NEd(g, l, d, e, b, n, j, f2); + } + function sJc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I, J, K2; + I = new Rkb(); + for (o2 = new olb(b.b); o2.a < o2.c.c.length; ) { + m = BD(mlb(o2), 29); + for (v = new olb(m.a); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + u.p = -1; + l = Rie; + B = Rie; + for (D = new olb(u.j); D.a < D.c.c.length; ) { + C = BD(mlb(D), 11); + for (e = new olb(C.e); e.a < e.c.c.length; ) { + c2 = BD(mlb(e), 17); + F = BD(vNb(c2, (Nyc(), eyc)), 19).a; + l = $wnd.Math.max(l, F); + } + for (d = new olb(C.g); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 17); + F = BD(vNb(c2, (Nyc(), eyc)), 19).a; + B = $wnd.Math.max(B, F); + } + } + yNb(u, hJc, meb(l)); + yNb(u, iJc, meb(B)); + } + } + r = 0; + for (n = new olb(b.b); n.a < n.c.c.length; ) { + m = BD(mlb(n), 29); + for (v = new olb(m.a); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + if (u.p < 0) { + H = new zJc(); + H.b = r++; + oJc(a, u, H); + I.c[I.c.length] = H; + } + } + } + A = Pu(I.c.length); + k = Pu(I.c.length); + for (g = 0; g < I.c.length; g++) { + Ekb(A, new Rkb()); + Ekb(k, meb(0)); + } + mJc(b, I, A, k); + J = BD(Qkb(I, KC(sY, Iqe, 257, I.c.length, 0, 1)), 840); + w2 = BD(Qkb(A, KC(yK, eme, 15, A.c.length, 0, 1)), 192); + j = KC(WD, oje, 25, k.c.length, 15, 1); + for (h = 0; h < j.length; h++) { + j[h] = (tCb(h, k.c.length), BD(k.c[h], 19)).a; + } + s = 0; + t = new Rkb(); + for (i3 = 0; i3 < J.length; i3++) { + j[i3] == 0 && Ekb(t, J[i3]); + } + q = KC(WD, oje, 25, J.length, 15, 1); + while (t.c.length != 0) { + H = BD(Kkb(t, 0), 257); + q[H.b] = s++; + while (!w2[H.b].dc()) { + K2 = BD(w2[H.b].$c(0), 257); + --j[K2.b]; + j[K2.b] == 0 && (t.c[t.c.length] = K2, true); + } + } + a.a = KC(sY, Iqe, 257, J.length, 0, 1); + for (f2 = 0; f2 < J.length; f2++) { + p = J[f2]; + G = q[f2]; + a.a[G] = p; + p.b = G; + for (v = new olb(p.e); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + u.p = G; + } + } + return a.a; + } + function nde(a) { + var b, c2, d; + if (a.d >= a.j) { + a.a = -1; + a.c = 1; + return; + } + b = bfb(a.i, a.d++); + a.a = b; + if (a.b == 1) { + switch (b) { + case 92: + d = 10; + if (a.d >= a.j) + throw vbb(new mde(tvd((h0d(), uue)))); + a.a = bfb(a.i, a.d++); + break; + case 45: + if ((a.e & 512) == 512 && a.d < a.j && bfb(a.i, a.d) == 91) { + ++a.d; + d = 24; + } else + d = 0; + break; + case 91: + if ((a.e & 512) != 512 && a.d < a.j && bfb(a.i, a.d) == 58) { + ++a.d; + d = 20; + break; + } + default: + if ((b & 64512) == Uje && a.d < a.j) { + c2 = bfb(a.i, a.d); + if ((c2 & 64512) == 56320) { + a.a = Tje + (b - Uje << 10) + c2 - 56320; + ++a.d; + } + } + d = 0; + } + a.c = d; + return; + } + switch (b) { + case 124: + d = 2; + break; + case 42: + d = 3; + break; + case 43: + d = 4; + break; + case 63: + d = 5; + break; + case 41: + d = 7; + break; + case 46: + d = 8; + break; + case 91: + d = 9; + break; + case 94: + d = 11; + break; + case 36: + d = 12; + break; + case 40: + d = 6; + if (a.d >= a.j) + break; + if (bfb(a.i, a.d) != 63) + break; + if (++a.d >= a.j) + throw vbb(new mde(tvd((h0d(), vue)))); + b = bfb(a.i, a.d++); + switch (b) { + case 58: + d = 13; + break; + case 61: + d = 14; + break; + case 33: + d = 15; + break; + case 91: + d = 19; + break; + case 62: + d = 18; + break; + case 60: + if (a.d >= a.j) + throw vbb(new mde(tvd((h0d(), vue)))); + b = bfb(a.i, a.d++); + if (b == 61) { + d = 16; + } else if (b == 33) { + d = 17; + } else + throw vbb(new mde(tvd((h0d(), wue)))); + break; + case 35: + while (a.d < a.j) { + b = bfb(a.i, a.d++); + if (b == 41) + break; + } + if (b != 41) + throw vbb(new mde(tvd((h0d(), xue)))); + d = 21; + break; + default: + if (b == 45 || 97 <= b && b <= 122 || 65 <= b && b <= 90) { + --a.d; + d = 22; + break; + } else if (b == 40) { + d = 23; + break; + } + throw vbb(new mde(tvd((h0d(), vue)))); + } + break; + case 92: + d = 10; + if (a.d >= a.j) + throw vbb(new mde(tvd((h0d(), uue)))); + a.a = bfb(a.i, a.d++); + break; + default: + d = 0; + } + a.c = d; + } + function P5b(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G; + A = BD(vNb(a, (Nyc(), Vxc)), 98); + if (!(A != (dcd(), bcd) && A != ccd)) { + return; + } + o2 = a.b; + n = o2.c.length; + k = new Skb((Xj(n + 2, Mie), Oy(wbb(wbb(5, n + 2), (n + 2) / 10 | 0)))); + p = new Skb((Xj(n + 2, Mie), Oy(wbb(wbb(5, n + 2), (n + 2) / 10 | 0)))); + Ekb(k, new Lqb()); + Ekb(k, new Lqb()); + Ekb(p, new Rkb()); + Ekb(p, new Rkb()); + w2 = new Rkb(); + for (b = 0; b < n; b++) { + c2 = (tCb(b, o2.c.length), BD(o2.c[b], 29)); + B = (tCb(b, k.c.length), BD(k.c[b], 83)); + q = new Lqb(); + k.c[k.c.length] = q; + D = (tCb(b, p.c.length), BD(p.c[b], 15)); + s = new Rkb(); + p.c[p.c.length] = s; + for (e = new olb(c2.a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + if (L5b(d)) { + w2.c[w2.c.length] = d; + continue; + } + for (j = new Sr(ur(R_b(d).a.Kc(), new Sq())); Qr(j); ) { + h = BD(Rr(j), 17); + F = h.c.i; + if (!L5b(F)) { + continue; + } + C = BD(B.xc(vNb(F, (wtc(), $sc))), 10); + if (!C) { + C = K5b(a, F); + B.zc(vNb(F, $sc), C); + D.Fc(C); + } + QZb(h, BD(Ikb(C.j, 1), 11)); + } + for (i3 = new Sr(ur(U_b(d).a.Kc(), new Sq())); Qr(i3); ) { + h = BD(Rr(i3), 17); + G = h.d.i; + if (!L5b(G)) { + continue; + } + r = BD(Ohb(q, vNb(G, (wtc(), $sc))), 10); + if (!r) { + r = K5b(a, G); + Rhb(q, vNb(G, $sc), r); + s.c[s.c.length] = r; + } + RZb(h, BD(Ikb(r.j, 0), 11)); + } + } + } + for (l = 0; l < p.c.length; l++) { + t = (tCb(l, p.c.length), BD(p.c[l], 15)); + if (t.dc()) { + continue; + } + m = null; + if (l == 0) { + m = new H1b(a); + wCb(0, o2.c.length); + aCb(o2.c, 0, m); + } else if (l == k.c.length - 1) { + m = new H1b(a); + o2.c[o2.c.length] = m; + } else { + m = (tCb(l - 1, o2.c.length), BD(o2.c[l - 1], 29)); + } + for (g = t.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 10); + $_b(f2, m); + } + } + for (v = new olb(w2); v.a < v.c.c.length; ) { + u = BD(mlb(v), 10); + $_b(u, null); + } + yNb(a, (wtc(), Fsc), w2); + } + function BCc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v; + Odd(c2, "Coffman-Graham Layering", 1); + if (b.a.c.length == 0) { + Qdd(c2); + return; + } + v = BD(vNb(b, (Nyc(), kxc)), 19).a; + i3 = 0; + g = 0; + for (m = new olb(b.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 10); + l.p = i3++; + for (f2 = new Sr(ur(U_b(l).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + e.p = g++; + } + } + a.d = KC(sbb, dle, 25, i3, 16, 1); + a.a = KC(sbb, dle, 25, g, 16, 1); + a.b = KC(WD, oje, 25, i3, 15, 1); + a.e = KC(WD, oje, 25, i3, 15, 1); + a.f = KC(WD, oje, 25, i3, 15, 1); + Nc(a.c); + CCc(a, b); + o2 = new gub(new GCc(a)); + for (u = new olb(b.a); u.a < u.c.c.length; ) { + s = BD(mlb(u), 10); + for (f2 = new Sr(ur(R_b(s).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + a.a[e.p] || ++a.b[s.p]; + } + a.b[s.p] == 0 && (zCb(cub(o2, s)), true); + } + h = 0; + while (o2.b.c.length != 0) { + s = BD(dub(o2), 10); + a.f[s.p] = h++; + for (f2 = new Sr(ur(U_b(s).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + if (a.a[e.p]) { + continue; + } + q = e.d.i; + --a.b[q.p]; + Rc(a.c, q, meb(a.f[s.p])); + a.b[q.p] == 0 && (zCb(cub(o2, q)), true); + } + } + n = new gub(new KCc(a)); + for (t = new olb(b.a); t.a < t.c.c.length; ) { + s = BD(mlb(t), 10); + for (f2 = new Sr(ur(U_b(s).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + a.a[e.p] || ++a.e[s.p]; + } + a.e[s.p] == 0 && (zCb(cub(n, s)), true); + } + k = new Rkb(); + d = yCc(b, k); + while (n.b.c.length != 0) { + r = BD(dub(n), 10); + (d.a.c.length >= v || !wCc(r, d)) && (d = yCc(b, k)); + $_b(r, d); + for (f2 = new Sr(ur(R_b(r).a.Kc(), new Sq())); Qr(f2); ) { + e = BD(Rr(f2), 17); + if (a.a[e.p]) { + continue; + } + p = e.c.i; + --a.e[p.p]; + a.e[p.p] == 0 && (zCb(cub(n, p)), true); + } + } + for (j = k.c.length - 1; j >= 0; --j) { + Ekb(b.b, (tCb(j, k.c.length), BD(k.c[j], 29))); + } + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + Qdd(c2); + } + function gee(a) { + var b, c2, d, e, f2, g, h, i3, j; + a.b = 1; + nde(a); + b = null; + if (a.c == 0 && a.a == 94) { + nde(a); + b = (wfe(), wfe(), new $fe(4)); + Ufe(b, 0, lxe); + h = new $fe(4); + } else { + h = (wfe(), wfe(), new $fe(4)); + } + e = true; + while ((j = a.c) != 1) { + if (j == 0 && a.a == 93 && !e) { + if (b) { + Zfe(b, h); + h = b; + } + break; + } + c2 = a.a; + d = false; + if (j == 10) { + switch (c2) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + Xfe(h, fee(c2)); + d = true; + break; + case 105: + case 73: + case 99: + case 67: + c2 = (Xfe(h, fee(c2)), -1); + c2 < 0 && (d = true); + break; + case 112: + case 80: + i3 = tde(a, c2); + if (!i3) + throw vbb(new mde(tvd((h0d(), Iue)))); + Xfe(h, i3); + d = true; + break; + default: + c2 = eee(a); + } + } else if (j == 24 && !e) { + if (b) { + Zfe(b, h); + h = b; + } + f2 = gee(a); + Zfe(h, f2); + if (a.c != 0 || a.a != 93) + throw vbb(new mde(tvd((h0d(), Mue)))); + break; + } + nde(a); + if (!d) { + if (j == 0) { + if (c2 == 91) + throw vbb(new mde(tvd((h0d(), Nue)))); + if (c2 == 93) + throw vbb(new mde(tvd((h0d(), Oue)))); + if (c2 == 45 && !e && a.a != 93) + throw vbb(new mde(tvd((h0d(), Pue)))); + } + if (a.c != 0 || a.a != 45 || c2 == 45 && e) { + Ufe(h, c2, c2); + } else { + nde(a); + if ((j = a.c) == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + if (j == 0 && a.a == 93) { + Ufe(h, c2, c2); + Ufe(h, 45, 45); + } else if (j == 0 && a.a == 93 || j == 24) { + throw vbb(new mde(tvd((h0d(), Pue)))); + } else { + g = a.a; + if (j == 0) { + if (g == 91) + throw vbb(new mde(tvd((h0d(), Nue)))); + if (g == 93) + throw vbb(new mde(tvd((h0d(), Oue)))); + if (g == 45) + throw vbb(new mde(tvd((h0d(), Pue)))); + } else + j == 10 && (g = eee(a)); + nde(a); + if (c2 > g) + throw vbb(new mde(tvd((h0d(), Sue)))); + Ufe(h, c2, g); + } + } + } + e = false; + } + if (a.c == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + Yfe(h); + Vfe(h); + a.b = 0; + nde(a); + return h; + } + function xZd(a) { + Bnd(a.c, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#decimal"])); + Bnd(a.d, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#integer"])); + Bnd(a.e, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#boolean"])); + Bnd(a.f, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EBoolean", fue, "EBoolean:Object"])); + Bnd(a.i, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#byte"])); + Bnd(a.g, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#hexBinary"])); + Bnd(a.j, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EByte", fue, "EByte:Object"])); + Bnd(a.n, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EChar", fue, "EChar:Object"])); + Bnd(a.t, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#double"])); + Bnd(a.u, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EDouble", fue, "EDouble:Object"])); + Bnd(a.F, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#float"])); + Bnd(a.G, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EFloat", fue, "EFloat:Object"])); + Bnd(a.I, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#int"])); + Bnd(a.J, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EInt", fue, "EInt:Object"])); + Bnd(a.N, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#long"])); + Bnd(a.O, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "ELong", fue, "ELong:Object"])); + Bnd(a.Z, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#short"])); + Bnd(a.$, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "EShort", fue, "EShort:Object"])); + Bnd(a._, Rve, OC(GC(ZI, 1), nie, 2, 6, [cwe, "http://www.w3.org/2001/XMLSchema#string"])); + } + function fRc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G; + if (a.c.length == 1) { + return tCb(0, a.c.length), BD(a.c[0], 135); + } else if (a.c.length <= 0) { + return new SRc(); + } + for (i3 = new olb(a); i3.a < i3.c.c.length; ) { + g = BD(mlb(i3), 135); + s = 0; + o2 = Ohe; + p = Ohe; + m = Rie; + n = Rie; + for (r = Jsb(g.b, 0); r.b != r.d.c; ) { + q = BD(Xsb(r), 86); + s += BD(vNb(q, (JTc(), ETc)), 19).a; + o2 = $wnd.Math.min(o2, q.e.a); + p = $wnd.Math.min(p, q.e.b); + m = $wnd.Math.max(m, q.e.a + q.f.a); + n = $wnd.Math.max(n, q.e.b + q.f.b); + } + yNb(g, (JTc(), ETc), meb(s)); + yNb(g, (mTc(), WSc), new f7c(o2, p)); + yNb(g, VSc, new f7c(m, n)); + } + mmb(); + Okb(a, new jRc()); + v = new SRc(); + tNb(v, (tCb(0, a.c.length), BD(a.c[0], 94))); + l = 0; + D = 0; + for (j = new olb(a); j.a < j.c.c.length; ) { + g = BD(mlb(j), 135); + w2 = c7c(R6c(BD(vNb(g, (mTc(), VSc)), 8)), BD(vNb(g, WSc), 8)); + l = $wnd.Math.max(l, w2.a); + D += w2.a * w2.b; + } + l = $wnd.Math.max(l, $wnd.Math.sqrt(D) * Edb(ED(vNb(v, (JTc(), uTc))))); + A = Edb(ED(vNb(v, HTc))); + F = 0; + G = 0; + k = 0; + b = A; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 135); + w2 = c7c(R6c(BD(vNb(g, (mTc(), VSc)), 8)), BD(vNb(g, WSc), 8)); + if (F + w2.a > l) { + F = 0; + G += k + A; + k = 0; + } + eRc(v, g, F, G); + b = $wnd.Math.max(b, F + w2.a); + k = $wnd.Math.max(k, w2.b); + F += w2.a + A; + } + u = new Lqb(); + c2 = new Lqb(); + for (C = new olb(a); C.a < C.c.c.length; ) { + B = BD(mlb(C), 135); + d = Ccb(DD(vNb(B, (Y9c(), y8c)))); + t = !B.q ? kmb : B.q; + for (f2 = t.vc().Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 42); + if (Mhb(u, e.cd())) { + if (PD(BD(e.cd(), 146).wg()) !== PD(e.dd())) { + if (d && Mhb(c2, e.cd())) { + Zfb(); + "Found different values for property " + BD(e.cd(), 146).tg() + " in components."; + } else { + Rhb(u, BD(e.cd(), 146), e.dd()); + yNb(v, BD(e.cd(), 146), e.dd()); + d && Rhb(c2, BD(e.cd(), 146), e.dd()); + } + } + } else { + Rhb(u, BD(e.cd(), 146), e.dd()); + yNb(v, BD(e.cd(), 146), e.dd()); + } + } + } + return v; + } + function MYb() { + MYb = ccb; + xXb(); + LYb = new Hp(); + Rc(LYb, (Ucd(), Gcd), Fcd); + Rc(LYb, Qcd, Fcd); + Rc(LYb, Hcd, Fcd); + Rc(LYb, Ncd, Fcd); + Rc(LYb, Mcd, Fcd); + Rc(LYb, Kcd, Fcd); + Rc(LYb, Ncd, Gcd); + Rc(LYb, Fcd, Bcd); + Rc(LYb, Gcd, Bcd); + Rc(LYb, Qcd, Bcd); + Rc(LYb, Hcd, Bcd); + Rc(LYb, Lcd, Bcd); + Rc(LYb, Ncd, Bcd); + Rc(LYb, Mcd, Bcd); + Rc(LYb, Kcd, Bcd); + Rc(LYb, Ecd, Bcd); + Rc(LYb, Fcd, Ocd); + Rc(LYb, Gcd, Ocd); + Rc(LYb, Bcd, Ocd); + Rc(LYb, Qcd, Ocd); + Rc(LYb, Hcd, Ocd); + Rc(LYb, Lcd, Ocd); + Rc(LYb, Ncd, Ocd); + Rc(LYb, Ecd, Ocd); + Rc(LYb, Pcd, Ocd); + Rc(LYb, Mcd, Ocd); + Rc(LYb, Icd, Ocd); + Rc(LYb, Kcd, Ocd); + Rc(LYb, Gcd, Qcd); + Rc(LYb, Hcd, Qcd); + Rc(LYb, Ncd, Qcd); + Rc(LYb, Kcd, Qcd); + Rc(LYb, Gcd, Hcd); + Rc(LYb, Qcd, Hcd); + Rc(LYb, Ncd, Hcd); + Rc(LYb, Hcd, Hcd); + Rc(LYb, Mcd, Hcd); + Rc(LYb, Fcd, Ccd); + Rc(LYb, Gcd, Ccd); + Rc(LYb, Bcd, Ccd); + Rc(LYb, Ocd, Ccd); + Rc(LYb, Qcd, Ccd); + Rc(LYb, Hcd, Ccd); + Rc(LYb, Lcd, Ccd); + Rc(LYb, Ncd, Ccd); + Rc(LYb, Pcd, Ccd); + Rc(LYb, Ecd, Ccd); + Rc(LYb, Kcd, Ccd); + Rc(LYb, Mcd, Ccd); + Rc(LYb, Jcd, Ccd); + Rc(LYb, Fcd, Pcd); + Rc(LYb, Gcd, Pcd); + Rc(LYb, Bcd, Pcd); + Rc(LYb, Qcd, Pcd); + Rc(LYb, Hcd, Pcd); + Rc(LYb, Lcd, Pcd); + Rc(LYb, Ncd, Pcd); + Rc(LYb, Ecd, Pcd); + Rc(LYb, Kcd, Pcd); + Rc(LYb, Icd, Pcd); + Rc(LYb, Jcd, Pcd); + Rc(LYb, Gcd, Ecd); + Rc(LYb, Qcd, Ecd); + Rc(LYb, Hcd, Ecd); + Rc(LYb, Ncd, Ecd); + Rc(LYb, Pcd, Ecd); + Rc(LYb, Kcd, Ecd); + Rc(LYb, Mcd, Ecd); + Rc(LYb, Fcd, Dcd); + Rc(LYb, Gcd, Dcd); + Rc(LYb, Bcd, Dcd); + Rc(LYb, Qcd, Dcd); + Rc(LYb, Hcd, Dcd); + Rc(LYb, Lcd, Dcd); + Rc(LYb, Ncd, Dcd); + Rc(LYb, Ecd, Dcd); + Rc(LYb, Kcd, Dcd); + Rc(LYb, Gcd, Mcd); + Rc(LYb, Bcd, Mcd); + Rc(LYb, Ocd, Mcd); + Rc(LYb, Hcd, Mcd); + Rc(LYb, Fcd, Icd); + Rc(LYb, Gcd, Icd); + Rc(LYb, Ocd, Icd); + Rc(LYb, Qcd, Icd); + Rc(LYb, Hcd, Icd); + Rc(LYb, Lcd, Icd); + Rc(LYb, Ncd, Icd); + Rc(LYb, Ncd, Jcd); + Rc(LYb, Hcd, Jcd); + Rc(LYb, Ecd, Fcd); + Rc(LYb, Ecd, Qcd); + Rc(LYb, Ecd, Bcd); + Rc(LYb, Lcd, Fcd); + Rc(LYb, Lcd, Gcd); + Rc(LYb, Lcd, Ocd); + } + function HVd(a, b) { + switch (a.e) { + case 0: + case 2: + case 4: + case 6: + case 42: + case 44: + case 46: + case 48: + case 8: + case 10: + case 12: + case 14: + case 16: + case 18: + case 20: + case 22: + case 24: + case 26: + case 28: + case 30: + case 32: + case 34: + case 36: + case 38: + return new U5d(a.b, a.a, b, a.c); + case 1: + return new BMd(a.a, b, bLd(b.Tg(), a.c)); + case 43: + return new N4d(a.a, b, bLd(b.Tg(), a.c)); + case 3: + return new xMd(a.a, b, bLd(b.Tg(), a.c)); + case 45: + return new K4d(a.a, b, bLd(b.Tg(), a.c)); + case 41: + return new dId(BD(wId(a.c), 26), a.a, b, bLd(b.Tg(), a.c)); + case 50: + return new c6d(BD(wId(a.c), 26), a.a, b, bLd(b.Tg(), a.c)); + case 5: + return new Q4d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 47: + return new U4d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 7: + return new cUd(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 49: + return new gUd(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 9: + return new I4d(a.a, b, bLd(b.Tg(), a.c)); + case 11: + return new G4d(a.a, b, bLd(b.Tg(), a.c)); + case 13: + return new C4d(a.a, b, bLd(b.Tg(), a.c)); + case 15: + return new k2d(a.a, b, bLd(b.Tg(), a.c)); + case 17: + return new c5d(a.a, b, bLd(b.Tg(), a.c)); + case 19: + return new _4d(a.a, b, bLd(b.Tg(), a.c)); + case 21: + return new X4d(a.a, b, bLd(b.Tg(), a.c)); + case 23: + return new pMd(a.a, b, bLd(b.Tg(), a.c)); + case 25: + return new D5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 27: + return new y5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 29: + return new t5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 31: + return new n5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 33: + return new A5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 35: + return new v5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 37: + return new p5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 39: + return new i5d(a.a, b, bLd(b.Tg(), a.c), a.d.n); + case 40: + return new u3d(b, bLd(b.Tg(), a.c)); + default: + throw vbb(new hz("Unknown feature style: " + a.e)); + } + } + function BMc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + Odd(c2, "Brandes & Koepf node placement", 1); + a.a = b; + a.c = KMc(b); + d = BD(vNb(b, (Nyc(), zxc)), 274); + n = Ccb(DD(vNb(b, Axc))); + a.d = d == (lrc(), irc) && !n || d == frc; + AMc(a, b); + v = null; + w2 = null; + r = null; + s = null; + q = (Xj(4, Jie), new Skb(4)); + switch (BD(vNb(b, zxc), 274).g) { + case 3: + r = new ULc(b, a.c.d, (eMc(), cMc), (YLc(), WLc)); + q.c[q.c.length] = r; + break; + case 1: + s = new ULc(b, a.c.d, (eMc(), dMc), (YLc(), WLc)); + q.c[q.c.length] = s; + break; + case 4: + v = new ULc(b, a.c.d, (eMc(), cMc), (YLc(), XLc)); + q.c[q.c.length] = v; + break; + case 2: + w2 = new ULc(b, a.c.d, (eMc(), dMc), (YLc(), XLc)); + q.c[q.c.length] = w2; + break; + default: + r = new ULc(b, a.c.d, (eMc(), cMc), (YLc(), WLc)); + s = new ULc(b, a.c.d, dMc, WLc); + v = new ULc(b, a.c.d, cMc, XLc); + w2 = new ULc(b, a.c.d, dMc, XLc); + q.c[q.c.length] = v; + q.c[q.c.length] = w2; + q.c[q.c.length] = r; + q.c[q.c.length] = s; + } + e = new mMc(b, a.c); + for (h = new olb(q); h.a < h.c.c.length; ) { + f2 = BD(mlb(h), 180); + lMc(e, f2, a.b); + kMc(f2); + } + m = new rMc(b, a.c); + for (i3 = new olb(q); i3.a < i3.c.c.length; ) { + f2 = BD(mlb(i3), 180); + oMc(m, f2); + } + if (c2.n) { + for (j = new olb(q); j.a < j.c.c.length; ) { + f2 = BD(mlb(j), 180); + Sdd(c2, f2 + " size is " + SLc(f2)); + } + } + l = null; + if (a.d) { + k = yMc(a, q, a.c.d); + xMc(b, k, c2) && (l = k); + } + if (!l) { + for (j = new olb(q); j.a < j.c.c.length; ) { + f2 = BD(mlb(j), 180); + xMc(b, f2, c2) && (!l || SLc(l) > SLc(f2)) && (l = f2); + } + } + !l && (l = (tCb(0, q.c.length), BD(q.c[0], 180))); + for (p = new olb(b.b); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 29); + for (u = new olb(o2.a); u.a < u.c.c.length; ) { + t = BD(mlb(u), 10); + t.n.b = Edb(l.p[t.p]) + Edb(l.d[t.p]); + } + } + if (c2.n) { + Sdd(c2, "Chosen node placement: " + l); + Sdd(c2, "Blocks: " + DMc(l)); + Sdd(c2, "Classes: " + EMc(l, c2)); + Sdd(c2, "Marked edges: " + a.b); + } + for (g = new olb(q); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 180); + f2.g = null; + f2.b = null; + f2.a = null; + f2.d = null; + f2.j = null; + f2.i = null; + f2.p = null; + } + IMc(a.c); + a.b.a.$b(); + Qdd(c2); + } + function V1b(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F; + g = new Psb(); + v = BD(vNb(c2, (Nyc(), Lwc)), 103); + o2 = 0; + ye(g, (!b.a && (b.a = new cUd(E2, b, 10, 11)), b.a)); + while (g.b != 0) { + j = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 33); + (PD(hkd(b, ywc)) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) && !Ccb(DD(hkd(j, xwc))) && jkd(j, (wtc(), Zsc), meb(o2++)); + q = !Ccb(DD(hkd(j, Jxc))); + if (q) { + l = (!j.a && (j.a = new cUd(E2, j, 10, 11)), j.a).i != 0; + n = S1b(j); + m = PD(hkd(j, axc)) === PD((hbd(), ebd)); + F = !ikd(j, (Y9c(), o8c)) || dfb(GD(hkd(j, o8c)), sne); + t = null; + if (F && m && (l || n)) { + t = P1b(j); + yNb(t, Lwc, v); + wNb(t, hyc) && Wyc(new ezc(Edb(ED(vNb(t, hyc)))), t); + if (BD(hkd(j, Fxc), 174).gc() != 0) { + k = t; + MAb(new YAb(null, (!j.c && (j.c = new cUd(F2, j, 9, 9)), new Kub(j.c, 16))), new k2b(k)); + L1b(j, t); + } + } + w2 = c2; + A = BD(Ohb(a.a, Xod(j)), 10); + !!A && (w2 = A.e); + s = $1b(a, j, w2); + if (t) { + s.e = t; + t.e = s; + ye(g, (!j.a && (j.a = new cUd(E2, j, 10, 11)), j.a)); + } + } + } + o2 = 0; + Gsb(g, b, g.c.b, g.c); + while (g.b != 0) { + f2 = BD(g.b == 0 ? null : (sCb(g.b != 0), Nsb(g, g.a.a)), 33); + for (i3 = new Fyd((!f2.b && (f2.b = new cUd(B2, f2, 12, 3)), f2.b)); i3.e != i3.i.gc(); ) { + h = BD(Dyd(i3), 79); + N1b(h); + (PD(hkd(b, ywc)) !== PD((tAc(), rAc)) || PD(hkd(b, Jwc)) === PD((mqc(), lqc)) || PD(hkd(b, Jwc)) === PD((mqc(), jqc)) || Ccb(DD(hkd(b, Awc))) || PD(hkd(b, twc)) !== PD((RXb(), QXb))) && jkd(h, (wtc(), Zsc), meb(o2++)); + C = atd(BD(qud((!h.b && (h.b = new y5d(z2, h, 4, 7)), h.b), 0), 82)); + D = atd(BD(qud((!h.c && (h.c = new y5d(z2, h, 5, 8)), h.c), 0), 82)); + if (Ccb(DD(hkd(h, Jxc))) || Ccb(DD(hkd(C, Jxc))) || Ccb(DD(hkd(D, Jxc)))) { + continue; + } + p = Qld(h) && Ccb(DD(hkd(C, fxc))) && Ccb(DD(hkd(h, gxc))); + u = f2; + p || ntd(D, C) ? u = C : ntd(C, D) && (u = D); + w2 = c2; + A = BD(Ohb(a.a, u), 10); + !!A && (w2 = A.e); + r = X1b(a, h, u, w2); + yNb(r, (wtc(), xsc), R1b(a, h, b, c2)); + } + m = PD(hkd(f2, axc)) === PD((hbd(), ebd)); + if (m) { + for (e = new Fyd((!f2.a && (f2.a = new cUd(E2, f2, 10, 11)), f2.a)); e.e != e.i.gc(); ) { + d = BD(Dyd(e), 33); + F = !ikd(d, (Y9c(), o8c)) || dfb(GD(hkd(d, o8c)), sne); + B = PD(hkd(d, axc)) === PD(ebd); + F && B && (Gsb(g, d, g.c.b, g.c), true); + } + } + } + } + function vA(a, b, c2, d, e, f2) { + var g, h, i3, j, k, l, m, n, o2, p, q, r; + switch (b) { + case 71: + h = d.q.getFullYear() - nje >= -1900 ? 1 : 0; + c2 >= 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [pje, qje])[h]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["BC", "AD"])[h]); + break; + case 121: + kA(a, c2, d); + break; + case 77: + jA(a, c2, d); + break; + case 107: + i3 = e.q.getHours(); + i3 == 0 ? EA(a, 24, c2) : EA(a, i3, c2); + break; + case 83: + iA(a, c2, e); + break; + case 69: + k = d.q.getDay(); + c2 == 5 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["S", "M", "T", "W", "T", "F", "S"])[k]) : c2 == 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje])[k]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"])[k]); + break; + case 97: + e.q.getHours() >= 12 && e.q.getHours() < 24 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["AM", "PM"])[1]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["AM", "PM"])[0]); + break; + case 104: + l = e.q.getHours() % 12; + l == 0 ? EA(a, 12, c2) : EA(a, l, c2); + break; + case 75: + m = e.q.getHours() % 12; + EA(a, m, c2); + break; + case 72: + n = e.q.getHours(); + EA(a, n, c2); + break; + case 99: + o2 = d.q.getDay(); + c2 == 5 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["S", "M", "T", "W", "T", "F", "S"])[o2]) : c2 == 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [rje, sje, tje, uje, vje, wje, xje])[o2]) : c2 == 3 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"])[o2]) : EA(a, o2, 1); + break; + case 76: + p = d.q.getMonth(); + c2 == 5 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"])[p]) : c2 == 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, [bje, cje, dje, eje, fje, gje, hje, ije, jje, kje, lje, mje])[p]) : c2 == 3 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Jan", "Feb", "Mar", "Apr", fje, "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"])[p]) : EA(a, p + 1, c2); + break; + case 81: + q = d.q.getMonth() / 3 | 0; + c2 < 4 ? Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["Q1", "Q2", "Q3", "Q4"])[q]) : Qfb(a, OC(GC(ZI, 1), nie, 2, 6, ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"])[q]); + break; + case 100: + r = d.q.getDate(); + EA(a, r, c2); + break; + case 109: + j = e.q.getMinutes(); + EA(a, j, c2); + break; + case 115: + g = e.q.getSeconds(); + EA(a, g, c2); + break; + case 122: + c2 < 4 ? Qfb(a, f2.c[0]) : Qfb(a, f2.c[1]); + break; + case 118: + Qfb(a, f2.b); + break; + case 90: + c2 < 3 ? Qfb(a, OA(f2)) : c2 == 3 ? Qfb(a, NA(f2)) : Qfb(a, QA(f2.a)); + break; + default: + return false; + } + return true; + } + function X1b(a, b, c2, d) { + var e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H; + N1b(b); + i3 = BD(qud((!b.b && (b.b = new y5d(z2, b, 4, 7)), b.b), 0), 82); + k = BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82); + h = atd(i3); + j = atd(k); + g = (!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a).i == 0 ? null : BD(qud((!b.a && (b.a = new cUd(A2, b, 6, 6)), b.a), 0), 202); + A = BD(Ohb(a.a, h), 10); + F = BD(Ohb(a.a, j), 10); + B = null; + G = null; + if (JD(i3, 186)) { + w2 = BD(Ohb(a.a, i3), 299); + if (JD(w2, 11)) { + B = BD(w2, 11); + } else if (JD(w2, 10)) { + A = BD(w2, 10); + B = BD(Ikb(A.j, 0), 11); + } + } + if (JD(k, 186)) { + D = BD(Ohb(a.a, k), 299); + if (JD(D, 11)) { + G = BD(D, 11); + } else if (JD(D, 10)) { + F = BD(D, 10); + G = BD(Ikb(F.j, 0), 11); + } + } + if (!A || !F) { + throw vbb(new z2c("The source or the target of edge " + b + " could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN.")); + } + p = new UZb(); + tNb(p, b); + yNb(p, (wtc(), $sc), b); + yNb(p, (Nyc(), jxc), null); + n = BD(vNb(d, Ksc), 21); + A == F && n.Fc((Orc(), Nrc)); + if (!B) { + v = (KAc(), IAc); + C = null; + if (!!g && fcd(BD(vNb(A, Vxc), 98))) { + C = new f7c(g.j, g.k); + Bfd(C, Mld(b)); + Cfd(C, c2); + if (ntd(j, h)) { + v = HAc; + P6c(C, A.n); + } + } + B = $$b(A, C, v, d); + } + if (!G) { + v = (KAc(), HAc); + H = null; + if (!!g && fcd(BD(vNb(F, Vxc), 98))) { + H = new f7c(g.b, g.c); + Bfd(H, Mld(b)); + Cfd(H, c2); + } + G = $$b(F, H, v, Q_b(F)); + } + QZb(p, B); + RZb(p, G); + (B.e.c.length > 1 || B.g.c.length > 1 || G.e.c.length > 1 || G.g.c.length > 1) && n.Fc((Orc(), Irc)); + for (m = new Fyd((!b.n && (b.n = new cUd(D2, b, 1, 7)), b.n)); m.e != m.i.gc(); ) { + l = BD(Dyd(m), 137); + if (!Ccb(DD(hkd(l, Jxc))) && !!l.a) { + q = Z1b(l); + Ekb(p.b, q); + switch (BD(vNb(q, Qwc), 272).g) { + case 1: + case 2: + n.Fc((Orc(), Grc)); + break; + case 0: + n.Fc((Orc(), Erc)); + yNb(q, Qwc, (qad(), nad)); + } + } + } + f2 = BD(vNb(d, Iwc), 314); + r = BD(vNb(d, Exc), 315); + e = f2 == (Rpc(), Opc) || r == (Vzc(), Rzc); + if (!!g && (!g.a && (g.a = new xMd(y2, g, 5)), g.a).i != 0 && e) { + s = ofd(g); + o2 = new s7c(); + for (u = Jsb(s, 0); u.b != u.d.c; ) { + t = BD(Xsb(u), 8); + Dsb(o2, new g7c(t)); + } + yNb(p, _sc, o2); + } + return p; + } + function yZd(a) { + if (a.gb) + return; + a.gb = true; + a.b = Lnd(a, 0); + Knd(a.b, 18); + Qnd(a.b, 19); + a.a = Lnd(a, 1); + Knd(a.a, 1); + Qnd(a.a, 2); + Qnd(a.a, 3); + Qnd(a.a, 4); + Qnd(a.a, 5); + a.o = Lnd(a, 2); + Knd(a.o, 8); + Knd(a.o, 9); + Qnd(a.o, 10); + Qnd(a.o, 11); + Qnd(a.o, 12); + Qnd(a.o, 13); + Qnd(a.o, 14); + Qnd(a.o, 15); + Qnd(a.o, 16); + Qnd(a.o, 17); + Qnd(a.o, 18); + Qnd(a.o, 19); + Qnd(a.o, 20); + Qnd(a.o, 21); + Qnd(a.o, 22); + Qnd(a.o, 23); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + Pnd(a.o); + a.p = Lnd(a, 3); + Knd(a.p, 2); + Knd(a.p, 3); + Knd(a.p, 4); + Knd(a.p, 5); + Qnd(a.p, 6); + Qnd(a.p, 7); + Pnd(a.p); + Pnd(a.p); + a.q = Lnd(a, 4); + Knd(a.q, 8); + a.v = Lnd(a, 5); + Qnd(a.v, 9); + Pnd(a.v); + Pnd(a.v); + Pnd(a.v); + a.w = Lnd(a, 6); + Knd(a.w, 2); + Knd(a.w, 3); + Knd(a.w, 4); + Qnd(a.w, 5); + a.B = Lnd(a, 7); + Qnd(a.B, 1); + Pnd(a.B); + Pnd(a.B); + Pnd(a.B); + a.Q = Lnd(a, 8); + Qnd(a.Q, 0); + Pnd(a.Q); + a.R = Lnd(a, 9); + Knd(a.R, 1); + a.S = Lnd(a, 10); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + Pnd(a.S); + a.T = Lnd(a, 11); + Qnd(a.T, 10); + Qnd(a.T, 11); + Qnd(a.T, 12); + Qnd(a.T, 13); + Qnd(a.T, 14); + Pnd(a.T); + Pnd(a.T); + a.U = Lnd(a, 12); + Knd(a.U, 2); + Knd(a.U, 3); + Qnd(a.U, 4); + Qnd(a.U, 5); + Qnd(a.U, 6); + Qnd(a.U, 7); + Pnd(a.U); + a.V = Lnd(a, 13); + Qnd(a.V, 10); + a.W = Lnd(a, 14); + Knd(a.W, 18); + Knd(a.W, 19); + Knd(a.W, 20); + Qnd(a.W, 21); + Qnd(a.W, 22); + Qnd(a.W, 23); + a.bb = Lnd(a, 15); + Knd(a.bb, 10); + Knd(a.bb, 11); + Knd(a.bb, 12); + Knd(a.bb, 13); + Knd(a.bb, 14); + Knd(a.bb, 15); + Knd(a.bb, 16); + Qnd(a.bb, 17); + Pnd(a.bb); + Pnd(a.bb); + a.eb = Lnd(a, 16); + Knd(a.eb, 2); + Knd(a.eb, 3); + Knd(a.eb, 4); + Knd(a.eb, 5); + Knd(a.eb, 6); + Knd(a.eb, 7); + Qnd(a.eb, 8); + Qnd(a.eb, 9); + a.ab = Lnd(a, 17); + Knd(a.ab, 0); + Knd(a.ab, 1); + a.H = Lnd(a, 18); + Qnd(a.H, 0); + Qnd(a.H, 1); + Qnd(a.H, 2); + Qnd(a.H, 3); + Qnd(a.H, 4); + Qnd(a.H, 5); + Pnd(a.H); + a.db = Lnd(a, 19); + Qnd(a.db, 2); + a.c = Mnd(a, 20); + a.d = Mnd(a, 21); + a.e = Mnd(a, 22); + a.f = Mnd(a, 23); + a.i = Mnd(a, 24); + a.g = Mnd(a, 25); + a.j = Mnd(a, 26); + a.k = Mnd(a, 27); + a.n = Mnd(a, 28); + a.r = Mnd(a, 29); + a.s = Mnd(a, 30); + a.t = Mnd(a, 31); + a.u = Mnd(a, 32); + a.fb = Mnd(a, 33); + a.A = Mnd(a, 34); + a.C = Mnd(a, 35); + a.D = Mnd(a, 36); + a.F = Mnd(a, 37); + a.G = Mnd(a, 38); + a.I = Mnd(a, 39); + a.J = Mnd(a, 40); + a.L = Mnd(a, 41); + a.M = Mnd(a, 42); + a.N = Mnd(a, 43); + a.O = Mnd(a, 44); + a.P = Mnd(a, 45); + a.X = Mnd(a, 46); + a.Y = Mnd(a, 47); + a.Z = Mnd(a, 48); + a.$ = Mnd(a, 49); + a._ = Mnd(a, 50); + a.cb = Mnd(a, 51); + a.K = Mnd(a, 52); + } + function Y9c() { + Y9c = ccb; + var a, b; + o8c = new Lsd(sse); + F9c = new Lsd(tse); + q8c = (F7c(), z7c); + p8c = new Nsd($pe, q8c); + r8c = new Nsd(_le, null); + s8c = new Lsd(use); + x8c = (i8c(), qqb(h8c, OC(GC(r1, 1), Kie, 291, 0, [d8c]))); + w8c = new Nsd(lqe, x8c); + y8c = new Nsd(Zpe, (Bcb(), false)); + A8c = (ead(), cad); + z8c = new Nsd(cqe, A8c); + F8c = (Aad(), zad); + E8c = new Nsd(ype, F8c); + I8c = new Nsd(Jre, false); + K8c = (hbd(), fbd); + J8c = new Nsd(tpe, K8c); + g9c = new q0b(12); + f9c = new Nsd(ame, g9c); + O8c = new Nsd(Ame, false); + P8c = new Nsd(xqe, false); + e9c = new Nsd(Dme, false); + u9c = (dcd(), ccd); + t9c = new Nsd(Bme, u9c); + C9c = new Lsd(uqe); + D9c = new Lsd(vme); + E9c = new Lsd(yme); + H9c = new Lsd(zme); + R8c = new s7c(); + Q8c = new Nsd(mqe, R8c); + v8c = new Nsd(pqe, false); + L8c = new Nsd(qqe, false); + T8c = new H_b(); + S8c = new Nsd(vqe, T8c); + d9c = new Nsd(Xpe, false); + G9c = new Nsd(wse, 1); + new Nsd(xse, true); + meb(0); + new Nsd(yse, meb(100)); + new Nsd(zse, false); + meb(0); + new Nsd(Ase, meb(4e3)); + meb(0); + new Nsd(Bse, meb(400)); + new Nsd(Cse, false); + new Nsd(Dse, false); + new Nsd(Ese, true); + new Nsd(Fse, false); + u8c = (Ded(), Ced); + t8c = new Nsd(rse, u8c); + I9c = new Nsd(Lpe, 10); + J9c = new Nsd(Mpe, 10); + K9c = new Nsd(Zle, 20); + L9c = new Nsd(Npe, 10); + M9c = new Nsd(xme, 2); + N9c = new Nsd(Ope, 10); + P9c = new Nsd(Ppe, 0); + Q9c = new Nsd(Spe, 5); + R9c = new Nsd(Qpe, 1); + S9c = new Nsd(Rpe, 1); + T9c = new Nsd(wme, 20); + U9c = new Nsd(Tpe, 10); + X9c = new Nsd(Upe, 10); + O9c = new Lsd(Vpe); + W9c = new I_b(); + V9c = new Nsd(wqe, W9c); + j9c = new Lsd(tqe); + i9c = false; + h9c = new Nsd(sqe, i9c); + V8c = new q0b(5); + U8c = new Nsd(dqe, V8c); + X8c = (Hbd(), b = BD(gdb(B1), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0)); + W8c = new Nsd(Gme, X8c); + m9c = (Tbd(), Qbd); + l9c = new Nsd(gqe, m9c); + o9c = new Lsd(hqe); + p9c = new Lsd(iqe); + q9c = new Lsd(jqe); + n9c = new Lsd(kqe); + Z8c = (a = BD(gdb(I1), 9), new xqb(a, BD(_Bb(a, a.length), 9), 0)); + Y8c = new Nsd(Fme, Z8c); + c9c = pqb((Idd(), Bdd)); + b9c = new Nsd(Eme, c9c); + a9c = new f7c(0, 0); + _8c = new Nsd(Tme, a9c); + $8c = new Nsd(bqe, false); + D8c = (qad(), nad); + C8c = new Nsd(nqe, D8c); + B8c = new Nsd(Cme, false); + meb(1); + new Nsd(Hse, null); + r9c = new Lsd(rqe); + v9c = new Lsd(oqe); + B9c = (Ucd(), Scd); + A9c = new Nsd(Ype, B9c); + s9c = new Lsd(Wpe); + y9c = (rcd(), pqb(pcd)); + x9c = new Nsd(Hme, y9c); + w9c = new Nsd(eqe, false); + z9c = new Nsd(fqe, true); + M8c = new Nsd(_pe, false); + N8c = new Nsd(aqe, false); + G8c = new Nsd($le, 1); + H8c = (Mad(), Kad); + new Nsd(Ise, H8c); + k9c = true; + } + function wtc() { + wtc = ccb; + var a, b; + $sc = new Lsd(Ime); + xsc = new Lsd("coordinateOrigin"); + itc = new Lsd("processors"); + wsc = new Msd("compoundNode", (Bcb(), false)); + Nsc = new Msd("insideConnections", false); + _sc = new Lsd("originalBendpoints"); + atc = new Lsd("originalDummyNodePosition"); + btc = new Lsd("originalLabelEdge"); + ktc = new Lsd("representedLabels"); + Csc = new Lsd("endLabels"); + Dsc = new Lsd("endLabel.origin"); + Ssc = new Msd("labelSide", (rbd(), qbd)); + Ysc = new Msd("maxEdgeThickness", 0); + ltc = new Msd("reversed", false); + jtc = new Lsd(Jme); + Vsc = new Msd("longEdgeSource", null); + Wsc = new Msd("longEdgeTarget", null); + Usc = new Msd("longEdgeHasLabelDummies", false); + Tsc = new Msd("longEdgeBeforeLabelDummy", false); + Bsc = new Msd("edgeConstraint", (Gqc(), Eqc)); + Psc = new Lsd("inLayerLayoutUnit"); + Osc = new Msd("inLayerConstraint", (esc(), csc)); + Qsc = new Msd("inLayerSuccessorConstraint", new Rkb()); + Rsc = new Msd("inLayerSuccessorConstraintBetweenNonDummies", false); + gtc = new Lsd("portDummy"); + ysc = new Msd("crossingHint", meb(0)); + Ksc = new Msd("graphProperties", (b = BD(gdb(PW), 9), new xqb(b, BD(_Bb(b, b.length), 9), 0))); + Hsc = new Msd("externalPortSide", (Ucd(), Scd)); + Isc = new Msd("externalPortSize", new d7c()); + Fsc = new Lsd("externalPortReplacedDummies"); + Gsc = new Lsd("externalPortReplacedDummy"); + Esc = new Msd("externalPortConnections", (a = BD(gdb(F1), 9), new xqb(a, BD(_Bb(a, a.length), 9), 0))); + htc = new Msd(tle, 0); + ssc = new Lsd("barycenterAssociates"); + vtc = new Lsd("TopSideComments"); + tsc = new Lsd("BottomSideComments"); + vsc = new Lsd("CommentConnectionPort"); + Msc = new Msd("inputCollect", false); + etc = new Msd("outputCollect", false); + Asc = new Msd("cyclic", false); + zsc = new Lsd("crossHierarchyMap"); + utc = new Lsd("targetOffset"); + new Msd("splineLabelSize", new d7c()); + otc = new Lsd("spacings"); + ftc = new Msd("partitionConstraint", false); + usc = new Lsd("breakingPoint.info"); + stc = new Lsd("splines.survivingEdge"); + rtc = new Lsd("splines.route.start"); + ptc = new Lsd("splines.edgeChain"); + dtc = new Lsd("originalPortConstraints"); + ntc = new Lsd("selfLoopHolder"); + qtc = new Lsd("splines.nsPortY"); + Zsc = new Lsd("modelOrder"); + Xsc = new Lsd("longEdgeTargetNode"); + Jsc = new Msd(Xne, false); + mtc = new Msd(Xne, false); + Lsc = new Lsd("layerConstraints.hiddenNodes"); + ctc = new Lsd("layerConstraints.opposidePort"); + ttc = new Lsd("targetNode.modelOrder"); + } + function jwc() { + jwc = ccb; + puc = (xqc(), vqc); + ouc = new Nsd(Yne, puc); + Guc = new Nsd(Zne, (Bcb(), false)); + Muc = (msc(), ksc); + Luc = new Nsd($ne, Muc); + cvc = new Nsd(_ne, false); + dvc = new Nsd(aoe, true); + Itc = new Nsd(boe, false); + xvc = (BAc(), zAc); + wvc = new Nsd(coe, xvc); + meb(1); + Fvc = new Nsd(doe, meb(7)); + Gvc = new Nsd(eoe, false); + Huc = new Nsd(foe, false); + nuc = (mqc(), iqc); + muc = new Nsd(goe, nuc); + bvc = (lzc(), jzc); + avc = new Nsd(hoe, bvc); + Tuc = (Ctc(), Btc); + Suc = new Nsd(ioe, Tuc); + meb(-1); + Ruc = new Nsd(joe, meb(-1)); + meb(-1); + Uuc = new Nsd(koe, meb(-1)); + meb(-1); + Vuc = new Nsd(loe, meb(4)); + meb(-1); + Xuc = new Nsd(moe, meb(2)); + _uc = (kAc(), iAc); + $uc = new Nsd(noe, _uc); + meb(0); + Zuc = new Nsd(ooe, meb(0)); + Puc = new Nsd(poe, meb(Ohe)); + luc = (Rpc(), Ppc); + kuc = new Nsd(qoe, luc); + Xtc = new Nsd(roe, false); + euc = new Nsd(soe, 0.1); + iuc = new Nsd(toe, false); + meb(-1); + guc = new Nsd(uoe, meb(-1)); + meb(-1); + huc = new Nsd(voe, meb(-1)); + meb(0); + Ytc = new Nsd(woe, meb(40)); + cuc = (Xrc(), Wrc); + buc = new Nsd(xoe, cuc); + $tc = Urc; + Ztc = new Nsd(yoe, $tc); + vvc = (Vzc(), Qzc); + uvc = new Nsd(zoe, vvc); + kvc = new Lsd(Aoe); + fvc = (_qc(), Zqc); + evc = new Nsd(Boe, fvc); + ivc = (lrc(), irc); + hvc = new Nsd(Coe, ivc); + nvc = new Nsd(Doe, 0.3); + pvc = new Lsd(Eoe); + rvc = (Izc(), Gzc); + qvc = new Nsd(Foe, rvc); + xuc = (TAc(), RAc); + wuc = new Nsd(Goe, xuc); + zuc = (_Ac(), $Ac); + yuc = new Nsd(Hoe, zuc); + Buc = (tBc(), sBc); + Auc = new Nsd(Ioe, Buc); + Duc = new Nsd(Joe, 0.2); + uuc = new Nsd(Koe, 2); + Bvc = new Nsd(Loe, null); + Dvc = new Nsd(Moe, 10); + Cvc = new Nsd(Noe, 10); + Evc = new Nsd(Ooe, 20); + meb(0); + yvc = new Nsd(Poe, meb(0)); + meb(0); + zvc = new Nsd(Qoe, meb(0)); + meb(0); + Avc = new Nsd(Roe, meb(0)); + Jtc = new Nsd(Soe, false); + Ntc = (yrc(), wrc); + Mtc = new Nsd(Toe, Ntc); + Ltc = (Ipc(), Hpc); + Ktc = new Nsd(Uoe, Ltc); + Juc = new Nsd(Voe, false); + meb(0); + Iuc = new Nsd(Woe, meb(16)); + meb(0); + Kuc = new Nsd(Xoe, meb(5)); + bwc = (LBc(), JBc); + awc = new Nsd(Yoe, bwc); + Hvc = new Nsd(Zoe, 10); + Kvc = new Nsd($oe, 1); + Tvc = (bqc(), aqc); + Svc = new Nsd(_oe, Tvc); + Nvc = new Lsd(ape); + Qvc = meb(1); + meb(0); + Pvc = new Nsd(bpe, Qvc); + gwc = (CBc(), zBc); + fwc = new Nsd(cpe, gwc); + cwc = new Lsd(dpe); + Yvc = new Nsd(epe, true); + Wvc = new Nsd(fpe, 2); + $vc = new Nsd(gpe, true); + tuc = (Sqc(), Qqc); + suc = new Nsd(hpe, tuc); + ruc = (Apc(), wpc); + quc = new Nsd(ipe, ruc); + Wtc = (tAc(), rAc); + Vtc = new Nsd(jpe, Wtc); + Utc = new Nsd(kpe, false); + Ptc = (RXb(), QXb); + Otc = new Nsd(lpe, Ptc); + Ttc = (xzc(), uzc); + Stc = new Nsd(mpe, Ttc); + Qtc = new Nsd(npe, 0); + Rtc = new Nsd(ope, 0); + Ouc = kqc; + Nuc = Opc; + Wuc = izc; + Yuc = izc; + Quc = fzc; + fuc = (hbd(), ebd); + juc = Ppc; + duc = Ppc; + _tc = Ppc; + auc = ebd; + lvc = Tzc; + mvc = Qzc; + gvc = Qzc; + jvc = Qzc; + ovc = Szc; + tvc = Tzc; + svc = Tzc; + Cuc = (Aad(), yad); + Euc = yad; + Fuc = sBc; + vuc = xad; + Ivc = KBc; + Jvc = IBc; + Lvc = KBc; + Mvc = IBc; + Uvc = KBc; + Vvc = IBc; + Ovc = _pc; + Rvc = aqc; + hwc = KBc; + iwc = IBc; + dwc = KBc; + ewc = IBc; + Zvc = IBc; + Xvc = IBc; + _vc = IBc; + } + function S8b() { + S8b = ccb; + Y7b = new T8b("DIRECTION_PREPROCESSOR", 0); + V7b = new T8b("COMMENT_PREPROCESSOR", 1); + Z7b = new T8b("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER", 2); + n8b = new T8b("INTERACTIVE_EXTERNAL_PORT_POSITIONER", 3); + G8b = new T8b("PARTITION_PREPROCESSOR", 4); + r8b = new T8b("LABEL_DUMMY_INSERTER", 5); + M8b = new T8b("SELF_LOOP_PREPROCESSOR", 6); + w8b = new T8b("LAYER_CONSTRAINT_PREPROCESSOR", 7); + E8b = new T8b("PARTITION_MIDPROCESSOR", 8); + i8b = new T8b("HIGH_DEGREE_NODE_LAYER_PROCESSOR", 9); + A8b = new T8b("NODE_PROMOTION", 10); + v8b = new T8b("LAYER_CONSTRAINT_POSTPROCESSOR", 11); + F8b = new T8b("PARTITION_POSTPROCESSOR", 12); + e8b = new T8b("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR", 13); + O8b = new T8b("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR", 14); + P7b = new T8b("BREAKING_POINT_INSERTER", 15); + z8b = new T8b("LONG_EDGE_SPLITTER", 16); + I8b = new T8b("PORT_SIDE_PROCESSOR", 17); + o8b = new T8b("INVERTED_PORT_PROCESSOR", 18); + H8b = new T8b("PORT_LIST_SORTER", 19); + Q8b = new T8b("SORT_BY_INPUT_ORDER_OF_MODEL", 20); + C8b = new T8b("NORTH_SOUTH_PORT_PREPROCESSOR", 21); + Q7b = new T8b("BREAKING_POINT_PROCESSOR", 22); + D8b = new T8b(Bne, 23); + R8b = new T8b(Cne, 24); + K8b = new T8b("SELF_LOOP_PORT_RESTORER", 25); + P8b = new T8b("SINGLE_EDGE_GRAPH_WRAPPER", 26); + p8b = new T8b("IN_LAYER_CONSTRAINT_PROCESSOR", 27); + b8b = new T8b("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR", 28); + q8b = new T8b("LABEL_AND_NODE_SIZE_PROCESSOR", 29); + m8b = new T8b("INNERMOST_NODE_MARGIN_CALCULATOR", 30); + N8b = new T8b("SELF_LOOP_ROUTER", 31); + T7b = new T8b("COMMENT_NODE_MARGIN_CALCULATOR", 32); + _7b = new T8b("END_LABEL_PREPROCESSOR", 33); + t8b = new T8b("LABEL_DUMMY_SWITCHER", 34); + S7b = new T8b("CENTER_LABEL_MANAGEMENT_PROCESSOR", 35); + u8b = new T8b("LABEL_SIDE_SELECTOR", 36); + k8b = new T8b("HYPEREDGE_DUMMY_MERGER", 37); + f8b = new T8b("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR", 38); + x8b = new T8b("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR", 39); + h8b = new T8b("HIERARCHICAL_PORT_POSITION_PROCESSOR", 40); + W7b = new T8b("CONSTRAINTS_POSTPROCESSOR", 41); + U7b = new T8b("COMMENT_POSTPROCESSOR", 42); + l8b = new T8b("HYPERNODE_PROCESSOR", 43); + g8b = new T8b("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER", 44); + y8b = new T8b("LONG_EDGE_JOINER", 45); + L8b = new T8b("SELF_LOOP_POSTPROCESSOR", 46); + R7b = new T8b("BREAKING_POINT_REMOVER", 47); + B8b = new T8b("NORTH_SOUTH_PORT_POSTPROCESSOR", 48); + j8b = new T8b("HORIZONTAL_COMPACTOR", 49); + s8b = new T8b("LABEL_DUMMY_REMOVER", 50); + c8b = new T8b("FINAL_SPLINE_BENDPOINTS_CALCULATOR", 51); + a8b = new T8b("END_LABEL_SORTER", 52); + J8b = new T8b("REVERSED_EDGE_RESTORER", 53); + $7b = new T8b("END_LABEL_POSTPROCESSOR", 54); + d8b = new T8b("HIERARCHICAL_NODE_RESIZER", 55); + X7b = new T8b("DIRECTION_POSTPROCESSOR", 56); + } + function KIc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F, G, H, I, J, K2, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, $, ab, bb, cb, db2, eb, fb, gb, hb, ib, jb, kb, lb; + cb = 0; + for (H = b, K2 = 0, N = H.length; K2 < N; ++K2) { + F = H[K2]; + for (V = new olb(F.j); V.a < V.c.c.length; ) { + U = BD(mlb(V), 11); + X = 0; + for (h = new olb(U.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + F.c != g.d.i.c && ++X; + } + X > 0 && (a.a[U.p] = cb++); + } + } + hb = 0; + for (I = c2, L = 0, O = I.length; L < O; ++L) { + F = I[L]; + P = 0; + for (V = new olb(F.j); V.a < V.c.c.length; ) { + U = BD(mlb(V), 11); + if (U.j == (Ucd(), Acd)) { + for (h = new olb(U.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (F.c != g.c.i.c) { + ++P; + break; + } + } + } else { + break; + } + } + R = 0; + Y = new Bib(F.j, F.j.c.length); + while (Y.b > 0) { + U = (sCb(Y.b > 0), BD(Y.a.Xb(Y.c = --Y.b), 11)); + X = 0; + for (h = new olb(U.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + F.c != g.c.i.c && ++X; + } + if (X > 0) { + if (U.j == (Ucd(), Acd)) { + a.a[U.p] = hb; + ++hb; + } else { + a.a[U.p] = hb + P + R; + ++R; + } + } + } + hb += R; + } + W = new Lqb(); + o2 = new zsb(); + for (G = b, J = 0, M = G.length; J < M; ++J) { + F = G[J]; + for (fb = new olb(F.j); fb.a < fb.c.c.length; ) { + eb = BD(mlb(fb), 11); + for (h = new olb(eb.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + jb = g.d; + if (F.c != jb.i.c) { + db2 = BD(Wd(irb(W.f, eb)), 467); + ib = BD(Wd(irb(W.f, jb)), 467); + if (!db2 && !ib) { + n = new NIc(); + o2.a.zc(n, o2); + Ekb(n.a, g); + Ekb(n.d, eb); + jrb(W.f, eb, n); + Ekb(n.d, jb); + jrb(W.f, jb, n); + } else if (!db2) { + Ekb(ib.a, g); + Ekb(ib.d, eb); + jrb(W.f, eb, ib); + } else if (!ib) { + Ekb(db2.a, g); + Ekb(db2.d, jb); + jrb(W.f, jb, db2); + } else if (db2 == ib) { + Ekb(db2.a, g); + } else { + Ekb(db2.a, g); + for (T = new olb(ib.d); T.a < T.c.c.length; ) { + S = BD(mlb(T), 11); + jrb(W.f, S, db2); + } + Gkb(db2.a, ib.a); + Gkb(db2.d, ib.d); + o2.a.Bc(ib) != null; + } + } + } + } + } + p = BD(Ee(o2, KC(oY, { 3: 1, 4: 1, 5: 1, 1946: 1 }, 467, o2.a.gc(), 0, 1)), 1946); + D = b[0].c; + bb = c2[0].c; + for (k = p, l = 0, m = k.length; l < m; ++l) { + j = k[l]; + j.e = cb; + j.f = hb; + for (V = new olb(j.d); V.a < V.c.c.length; ) { + U = BD(mlb(V), 11); + Z = a.a[U.p]; + if (U.i.c == D) { + Z < j.e && (j.e = Z); + Z > j.b && (j.b = Z); + } else if (U.i.c == bb) { + Z < j.f && (j.f = Z); + Z > j.c && (j.c = Z); + } + } + } + Klb(p, 0, p.length, null); + gb = KC(WD, oje, 25, p.length, 15, 1); + d = KC(WD, oje, 25, hb + 1, 15, 1); + for (r = 0; r < p.length; r++) { + gb[r] = p[r].f; + d[gb[r]] = 1; + } + f2 = 0; + for (s = 0; s < d.length; s++) { + d[s] == 1 ? d[s] = f2 : --f2; + } + $ = 0; + for (t = 0; t < gb.length; t++) { + gb[t] += d[gb[t]]; + $ = $wnd.Math.max($, gb[t] + 1); + } + i3 = 1; + while (i3 < $) { + i3 *= 2; + } + lb = 2 * i3 - 1; + i3 -= 1; + kb = KC(WD, oje, 25, lb, 15, 1); + e = 0; + for (B = 0; B < gb.length; B++) { + A = gb[B] + i3; + ++kb[A]; + while (A > 0) { + A % 2 > 0 && (e += kb[A + 1]); + A = (A - 1) / 2 | 0; + ++kb[A]; + } + } + C = KC(nY, Uhe, 362, p.length * 2, 0, 1); + for (u = 0; u < p.length; u++) { + C[2 * u] = new QIc(p[u], p[u].e, p[u].b, (UIc(), TIc)); + C[2 * u + 1] = new QIc(p[u], p[u].b, p[u].e, SIc); + } + Klb(C, 0, C.length, null); + Q = 0; + for (v = 0; v < C.length; v++) { + switch (C[v].d.g) { + case 0: + ++Q; + break; + case 1: + --Q; + e += Q; + } + } + ab = KC(nY, Uhe, 362, p.length * 2, 0, 1); + for (w2 = 0; w2 < p.length; w2++) { + ab[2 * w2] = new QIc(p[w2], p[w2].f, p[w2].c, (UIc(), TIc)); + ab[2 * w2 + 1] = new QIc(p[w2], p[w2].c, p[w2].f, SIc); + } + Klb(ab, 0, ab.length, null); + Q = 0; + for (q = 0; q < ab.length; q++) { + switch (ab[q].d.g) { + case 0: + ++Q; + break; + case 1: + --Q; + e += Q; + } + } + return e; + } + function wfe() { + wfe = ccb; + ffe = new xfe(7); + hfe = new ige(8, 94); + new ige(8, 64); + ife = new ige(8, 36); + ofe = new ige(8, 65); + pfe = new ige(8, 122); + qfe = new ige(8, 90); + tfe = new ige(8, 98); + mfe = new ige(8, 66); + rfe = new ige(8, 60); + ufe = new ige(8, 62); + efe = new xfe(11); + cfe = new $fe(4); + Ufe(cfe, 48, 57); + sfe = new $fe(4); + Ufe(sfe, 48, 57); + Ufe(sfe, 65, 90); + Ufe(sfe, 95, 95); + Ufe(sfe, 97, 122); + nfe = new $fe(4); + Ufe(nfe, 9, 9); + Ufe(nfe, 10, 10); + Ufe(nfe, 12, 12); + Ufe(nfe, 13, 13); + Ufe(nfe, 32, 32); + jfe = _fe(cfe); + lfe = _fe(sfe); + kfe = _fe(nfe); + Zee = new Lqb(); + $ee = new Lqb(); + _ee = OC(GC(ZI, 1), nie, 2, 6, ["Cn", "Lu", "Ll", "Lt", "Lm", "Lo", "Mn", "Me", "Mc", "Nd", "Nl", "No", "Zs", "Zl", "Zp", "Cc", "Cf", null, "Co", "Cs", "Pd", "Ps", "Pe", "Pc", "Po", "Sm", "Sc", "Sk", "So", "Pi", "Pf", "L", "M", "N", "Z", "C", "P", "S"]); + Yee = OC(GC(ZI, 1), nie, 2, 6, ["Basic Latin", "Latin-1 Supplement", "Latin Extended-A", "Latin Extended-B", "IPA Extensions", "Spacing Modifier Letters", "Combining Diacritical Marks", "Greek", "Cyrillic", "Armenian", "Hebrew", "Arabic", "Syriac", "Thaana", "Devanagari", "Bengali", "Gurmukhi", "Gujarati", "Oriya", "Tamil", "Telugu", "Kannada", "Malayalam", "Sinhala", "Thai", "Lao", "Tibetan", "Myanmar", "Georgian", "Hangul Jamo", "Ethiopic", "Cherokee", "Unified Canadian Aboriginal Syllabics", "Ogham", "Runic", "Khmer", "Mongolian", "Latin Extended Additional", "Greek Extended", "General Punctuation", "Superscripts and Subscripts", "Currency Symbols", "Combining Marks for Symbols", "Letterlike Symbols", "Number Forms", "Arrows", "Mathematical Operators", "Miscellaneous Technical", "Control Pictures", "Optical Character Recognition", "Enclosed Alphanumerics", "Box Drawing", "Block Elements", "Geometric Shapes", "Miscellaneous Symbols", "Dingbats", "Braille Patterns", "CJK Radicals Supplement", "Kangxi Radicals", "Ideographic Description Characters", "CJK Symbols and Punctuation", "Hiragana", "Katakana", "Bopomofo", "Hangul Compatibility Jamo", "Kanbun", "Bopomofo Extended", "Enclosed CJK Letters and Months", "CJK Compatibility", "CJK Unified Ideographs Extension A", "CJK Unified Ideographs", "Yi Syllables", "Yi Radicals", "Hangul Syllables", uxe, "CJK Compatibility Ideographs", "Alphabetic Presentation Forms", "Arabic Presentation Forms-A", "Combining Half Marks", "CJK Compatibility Forms", "Small Form Variants", "Arabic Presentation Forms-B", "Specials", "Halfwidth and Fullwidth Forms", "Old Italic", "Gothic", "Deseret", "Byzantine Musical Symbols", "Musical Symbols", "Mathematical Alphanumeric Symbols", "CJK Unified Ideographs Extension B", "CJK Compatibility Ideographs Supplement", "Tags"]); + afe = OC(GC(WD, 1), oje, 25, 15, [66304, 66351, 66352, 66383, 66560, 66639, 118784, 119039, 119040, 119295, 119808, 120831, 131072, 173782, 194560, 195103, 917504, 917631]); + } + function qJb() { + qJb = ccb; + nJb = new tJb("OUT_T_L", 0, (NHb(), LHb), (EIb(), BIb), (gHb(), dHb), dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb((Hbd(), Dbd), OC(GC(B1, 1), Kie, 93, 0, [Gbd, zbd]))])); + mJb = new tJb("OUT_T_C", 1, KHb, BIb, dHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd, Abd]))])); + oJb = new tJb("OUT_T_R", 2, MHb, BIb, dHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, Bbd]))])); + eJb = new tJb("OUT_B_L", 3, LHb, DIb, fHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, zbd]))])); + dJb = new tJb("OUT_B_C", 4, KHb, DIb, fHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd, Abd]))])); + fJb = new tJb("OUT_B_R", 5, MHb, DIb, fHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, Bbd]))])); + iJb = new tJb("OUT_L_T", 6, MHb, DIb, dHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Gbd, Abd]))])); + hJb = new tJb("OUT_L_C", 7, MHb, CIb, eHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Fbd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Fbd, Abd]))])); + gJb = new tJb("OUT_L_B", 8, MHb, BIb, fHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [zbd, Ebd, Abd]))])); + lJb = new tJb("OUT_R_T", 9, LHb, DIb, dHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Gbd, Abd]))])); + kJb = new tJb("OUT_R_C", 10, LHb, CIb, eHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Fbd])), qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Fbd, Abd]))])); + jJb = new tJb("OUT_R_B", 11, LHb, BIb, fHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Dbd, OC(GC(B1, 1), Kie, 93, 0, [Bbd, Ebd, Abd]))])); + bJb = new tJb("IN_T_L", 12, LHb, DIb, dHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, zbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, zbd, Abd]))])); + aJb = new tJb("IN_T_C", 13, KHb, DIb, dHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, ybd, Abd]))])); + cJb = new tJb("IN_T_R", 14, MHb, DIb, dHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, Bbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Gbd, Bbd, Abd]))])); + $Ib = new tJb("IN_C_L", 15, LHb, CIb, eHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, zbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, zbd, Abd]))])); + ZIb = new tJb("IN_C_C", 16, KHb, CIb, eHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, ybd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, ybd, Abd]))])); + _Ib = new tJb("IN_C_R", 17, MHb, CIb, eHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, Bbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Fbd, Bbd, Abd]))])); + XIb = new tJb("IN_B_L", 18, LHb, BIb, fHb, dHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, zbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, zbd, Abd]))])); + WIb = new tJb("IN_B_C", 19, KHb, BIb, fHb, eHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, ybd, Abd]))])); + YIb = new tJb("IN_B_R", 20, MHb, BIb, fHb, fHb, OC(GC(LK, 1), Uhe, 21, 0, [qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, Bbd])), qqb(Cbd, OC(GC(B1, 1), Kie, 93, 0, [Ebd, Bbd, Abd]))])); + pJb = new tJb(ole, 21, null, null, null, null, OC(GC(LK, 1), Uhe, 21, 0, [])); + } + function jGd() { + jGd = ccb; + PFd = (NFd(), MFd).b; + BD(qud(ZKd(MFd.b), 0), 34); + BD(qud(ZKd(MFd.b), 1), 18); + OFd = MFd.a; + BD(qud(ZKd(MFd.a), 0), 34); + BD(qud(ZKd(MFd.a), 1), 18); + BD(qud(ZKd(MFd.a), 2), 18); + BD(qud(ZKd(MFd.a), 3), 18); + BD(qud(ZKd(MFd.a), 4), 18); + QFd = MFd.o; + BD(qud(ZKd(MFd.o), 0), 34); + BD(qud(ZKd(MFd.o), 1), 34); + SFd = BD(qud(ZKd(MFd.o), 2), 18); + BD(qud(ZKd(MFd.o), 3), 18); + BD(qud(ZKd(MFd.o), 4), 18); + BD(qud(ZKd(MFd.o), 5), 18); + BD(qud(ZKd(MFd.o), 6), 18); + BD(qud(ZKd(MFd.o), 7), 18); + BD(qud(ZKd(MFd.o), 8), 18); + BD(qud(ZKd(MFd.o), 9), 18); + BD(qud(ZKd(MFd.o), 10), 18); + BD(qud(ZKd(MFd.o), 11), 18); + BD(qud(ZKd(MFd.o), 12), 18); + BD(qud(ZKd(MFd.o), 13), 18); + BD(qud(ZKd(MFd.o), 14), 18); + BD(qud(ZKd(MFd.o), 15), 18); + BD(qud(WKd(MFd.o), 0), 59); + BD(qud(WKd(MFd.o), 1), 59); + BD(qud(WKd(MFd.o), 2), 59); + BD(qud(WKd(MFd.o), 3), 59); + BD(qud(WKd(MFd.o), 4), 59); + BD(qud(WKd(MFd.o), 5), 59); + BD(qud(WKd(MFd.o), 6), 59); + BD(qud(WKd(MFd.o), 7), 59); + BD(qud(WKd(MFd.o), 8), 59); + BD(qud(WKd(MFd.o), 9), 59); + RFd = MFd.p; + BD(qud(ZKd(MFd.p), 0), 34); + BD(qud(ZKd(MFd.p), 1), 34); + BD(qud(ZKd(MFd.p), 2), 34); + BD(qud(ZKd(MFd.p), 3), 34); + BD(qud(ZKd(MFd.p), 4), 18); + BD(qud(ZKd(MFd.p), 5), 18); + BD(qud(WKd(MFd.p), 0), 59); + BD(qud(WKd(MFd.p), 1), 59); + TFd = MFd.q; + BD(qud(ZKd(MFd.q), 0), 34); + UFd = MFd.v; + BD(qud(ZKd(MFd.v), 0), 18); + BD(qud(WKd(MFd.v), 0), 59); + BD(qud(WKd(MFd.v), 1), 59); + BD(qud(WKd(MFd.v), 2), 59); + VFd = MFd.w; + BD(qud(ZKd(MFd.w), 0), 34); + BD(qud(ZKd(MFd.w), 1), 34); + BD(qud(ZKd(MFd.w), 2), 34); + BD(qud(ZKd(MFd.w), 3), 18); + WFd = MFd.B; + BD(qud(ZKd(MFd.B), 0), 18); + BD(qud(WKd(MFd.B), 0), 59); + BD(qud(WKd(MFd.B), 1), 59); + BD(qud(WKd(MFd.B), 2), 59); + ZFd = MFd.Q; + BD(qud(ZKd(MFd.Q), 0), 18); + BD(qud(WKd(MFd.Q), 0), 59); + $Fd = MFd.R; + BD(qud(ZKd(MFd.R), 0), 34); + _Fd = MFd.S; + BD(qud(WKd(MFd.S), 0), 59); + BD(qud(WKd(MFd.S), 1), 59); + BD(qud(WKd(MFd.S), 2), 59); + BD(qud(WKd(MFd.S), 3), 59); + BD(qud(WKd(MFd.S), 4), 59); + BD(qud(WKd(MFd.S), 5), 59); + BD(qud(WKd(MFd.S), 6), 59); + BD(qud(WKd(MFd.S), 7), 59); + BD(qud(WKd(MFd.S), 8), 59); + BD(qud(WKd(MFd.S), 9), 59); + BD(qud(WKd(MFd.S), 10), 59); + BD(qud(WKd(MFd.S), 11), 59); + BD(qud(WKd(MFd.S), 12), 59); + BD(qud(WKd(MFd.S), 13), 59); + BD(qud(WKd(MFd.S), 14), 59); + aGd = MFd.T; + BD(qud(ZKd(MFd.T), 0), 18); + BD(qud(ZKd(MFd.T), 2), 18); + bGd = BD(qud(ZKd(MFd.T), 3), 18); + BD(qud(ZKd(MFd.T), 4), 18); + BD(qud(WKd(MFd.T), 0), 59); + BD(qud(WKd(MFd.T), 1), 59); + BD(qud(ZKd(MFd.T), 1), 18); + cGd = MFd.U; + BD(qud(ZKd(MFd.U), 0), 34); + BD(qud(ZKd(MFd.U), 1), 34); + BD(qud(ZKd(MFd.U), 2), 18); + BD(qud(ZKd(MFd.U), 3), 18); + BD(qud(ZKd(MFd.U), 4), 18); + BD(qud(ZKd(MFd.U), 5), 18); + BD(qud(WKd(MFd.U), 0), 59); + dGd = MFd.V; + BD(qud(ZKd(MFd.V), 0), 18); + eGd = MFd.W; + BD(qud(ZKd(MFd.W), 0), 34); + BD(qud(ZKd(MFd.W), 1), 34); + BD(qud(ZKd(MFd.W), 2), 34); + BD(qud(ZKd(MFd.W), 3), 18); + BD(qud(ZKd(MFd.W), 4), 18); + BD(qud(ZKd(MFd.W), 5), 18); + gGd = MFd.bb; + BD(qud(ZKd(MFd.bb), 0), 34); + BD(qud(ZKd(MFd.bb), 1), 34); + BD(qud(ZKd(MFd.bb), 2), 34); + BD(qud(ZKd(MFd.bb), 3), 34); + BD(qud(ZKd(MFd.bb), 4), 34); + BD(qud(ZKd(MFd.bb), 5), 34); + BD(qud(ZKd(MFd.bb), 6), 34); + BD(qud(ZKd(MFd.bb), 7), 18); + BD(qud(WKd(MFd.bb), 0), 59); + BD(qud(WKd(MFd.bb), 1), 59); + hGd = MFd.eb; + BD(qud(ZKd(MFd.eb), 0), 34); + BD(qud(ZKd(MFd.eb), 1), 34); + BD(qud(ZKd(MFd.eb), 2), 34); + BD(qud(ZKd(MFd.eb), 3), 34); + BD(qud(ZKd(MFd.eb), 4), 34); + BD(qud(ZKd(MFd.eb), 5), 34); + BD(qud(ZKd(MFd.eb), 6), 18); + BD(qud(ZKd(MFd.eb), 7), 18); + fGd = MFd.ab; + BD(qud(ZKd(MFd.ab), 0), 34); + BD(qud(ZKd(MFd.ab), 1), 34); + XFd = MFd.H; + BD(qud(ZKd(MFd.H), 0), 18); + BD(qud(ZKd(MFd.H), 1), 18); + BD(qud(ZKd(MFd.H), 2), 18); + BD(qud(ZKd(MFd.H), 3), 18); + BD(qud(ZKd(MFd.H), 4), 18); + BD(qud(ZKd(MFd.H), 5), 18); + BD(qud(WKd(MFd.H), 0), 59); + iGd = MFd.db; + BD(qud(ZKd(MFd.db), 0), 18); + YFd = MFd.M; + } + function bae(a) { + var b; + if (a.O) + return; + a.O = true; + pnd(a, "type"); + cod(a, "ecore.xml.type"); + dod(a, Ewe); + b = BD(nUd((yFd(), xFd), Ewe), 1945); + wtd(_Kd(a.fb), a.b); + Xnd(a.b, Q9, "AnyType", false, false, true); + Vnd(BD(qud(ZKd(a.b), 0), 34), a.wb.D, Qve, null, 0, -1, Q9, false, false, true, false, false, false); + Vnd(BD(qud(ZKd(a.b), 1), 34), a.wb.D, "any", null, 0, -1, Q9, true, true, true, false, false, true); + Vnd(BD(qud(ZKd(a.b), 2), 34), a.wb.D, "anyAttribute", null, 0, -1, Q9, false, false, true, false, false, false); + Xnd(a.bb, S9, Jwe, false, false, true); + Vnd(BD(qud(ZKd(a.bb), 0), 34), a.gb, "data", null, 0, 1, S9, false, false, true, false, true, false); + Vnd(BD(qud(ZKd(a.bb), 1), 34), a.gb, bue, null, 1, 1, S9, false, false, true, false, true, false); + Xnd(a.fb, T9, Kwe, false, false, true); + Vnd(BD(qud(ZKd(a.fb), 0), 34), b.gb, "rawValue", null, 0, 1, T9, true, true, true, false, true, true); + Vnd(BD(qud(ZKd(a.fb), 1), 34), b.a, Bte, null, 0, 1, T9, true, true, true, false, true, true); + _nd(BD(qud(ZKd(a.fb), 2), 18), a.wb.q, null, "instanceType", 1, 1, T9, false, false, true, false, false, false, false); + Xnd(a.qb, U9, Lwe, false, false, true); + Vnd(BD(qud(ZKd(a.qb), 0), 34), a.wb.D, Qve, null, 0, -1, null, false, false, true, false, false, false); + _nd(BD(qud(ZKd(a.qb), 1), 18), a.wb.ab, null, "xMLNSPrefixMap", 0, -1, null, true, false, true, true, false, false, false); + _nd(BD(qud(ZKd(a.qb), 2), 18), a.wb.ab, null, "xSISchemaLocation", 0, -1, null, true, false, true, true, false, false, false); + Vnd(BD(qud(ZKd(a.qb), 3), 34), a.gb, "cDATA", null, 0, -2, null, true, true, true, false, false, true); + Vnd(BD(qud(ZKd(a.qb), 4), 34), a.gb, "comment", null, 0, -2, null, true, true, true, false, false, true); + _nd(BD(qud(ZKd(a.qb), 5), 18), a.bb, null, jxe, 0, -2, null, true, true, true, true, false, false, true); + Vnd(BD(qud(ZKd(a.qb), 6), 34), a.gb, Ite, null, 0, -2, null, true, true, true, false, false, true); + Znd(a.a, SI, "AnySimpleType", true); + Znd(a.c, ZI, "AnyURI", true); + Znd(a.d, GC(SD, 1), "Base64Binary", true); + Znd(a.e, sbb, "Boolean", true); + Znd(a.f, wI, "BooleanObject", true); + Znd(a.g, SD, "Byte", true); + Znd(a.i, xI, "ByteObject", true); + Znd(a.j, ZI, "Date", true); + Znd(a.k, ZI, "DateTime", true); + Znd(a.n, bJ, "Decimal", true); + Znd(a.o, UD, "Double", true); + Znd(a.p, BI, "DoubleObject", true); + Znd(a.q, ZI, "Duration", true); + Znd(a.s, yK, "ENTITIES", true); + Znd(a.r, yK, "ENTITIESBase", true); + Znd(a.t, ZI, Rwe, true); + Znd(a.u, VD, "Float", true); + Znd(a.v, FI, "FloatObject", true); + Znd(a.w, ZI, "GDay", true); + Znd(a.B, ZI, "GMonth", true); + Znd(a.A, ZI, "GMonthDay", true); + Znd(a.C, ZI, "GYear", true); + Znd(a.D, ZI, "GYearMonth", true); + Znd(a.F, GC(SD, 1), "HexBinary", true); + Znd(a.G, ZI, "ID", true); + Znd(a.H, ZI, "IDREF", true); + Znd(a.J, yK, "IDREFS", true); + Znd(a.I, yK, "IDREFSBase", true); + Znd(a.K, WD, "Int", true); + Znd(a.M, cJ, "Integer", true); + Znd(a.L, JI, "IntObject", true); + Znd(a.P, ZI, "Language", true); + Znd(a.Q, XD, "Long", true); + Znd(a.R, MI, "LongObject", true); + Znd(a.S, ZI, "Name", true); + Znd(a.T, ZI, Swe, true); + Znd(a.U, cJ, "NegativeInteger", true); + Znd(a.V, ZI, axe, true); + Znd(a.X, yK, "NMTOKENS", true); + Znd(a.W, yK, "NMTOKENSBase", true); + Znd(a.Y, cJ, "NonNegativeInteger", true); + Znd(a.Z, cJ, "NonPositiveInteger", true); + Znd(a.$, ZI, "NormalizedString", true); + Znd(a._, ZI, "NOTATION", true); + Znd(a.ab, ZI, "PositiveInteger", true); + Znd(a.cb, ZI, "QName", true); + Znd(a.db, rbb, "Short", true); + Znd(a.eb, UI, "ShortObject", true); + Znd(a.gb, ZI, Vie, true); + Znd(a.hb, ZI, "Time", true); + Znd(a.ib, ZI, "Token", true); + Znd(a.jb, rbb, "UnsignedByte", true); + Znd(a.kb, UI, "UnsignedByteObject", true); + Znd(a.lb, XD, "UnsignedInt", true); + Znd(a.mb, MI, "UnsignedIntObject", true); + Znd(a.nb, cJ, "UnsignedLong", true); + Znd(a.ob, WD, "UnsignedShort", true); + Znd(a.pb, JI, "UnsignedShortObject", true); + Rnd(a, Ewe); + _9d(a); + } + function Oyc(a) { + r4c(a, new E3c(Q3c(L3c(P3c(M3c(O3c(N3c(new R3c(), sne), "ELK Layered"), "Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level."), new Ryc()), sne), qqb((Csd(), Bsd), OC(GC(O3, 1), Kie, 237, 0, [ysd, zsd, xsd, Asd, vsd, usd]))))); + p4c(a, sne, Lpe, Ksd(iyc)); + p4c(a, sne, Mpe, Ksd(jyc)); + p4c(a, sne, Zle, Ksd(kyc)); + p4c(a, sne, Npe, Ksd(lyc)); + p4c(a, sne, xme, Ksd(nyc)); + p4c(a, sne, Ope, Ksd(oyc)); + p4c(a, sne, Ppe, Ksd(ryc)); + p4c(a, sne, Qpe, Ksd(tyc)); + p4c(a, sne, Rpe, Ksd(uyc)); + p4c(a, sne, Spe, Ksd(syc)); + p4c(a, sne, wme, Ksd(vyc)); + p4c(a, sne, Tpe, Ksd(xyc)); + p4c(a, sne, Upe, Ksd(zyc)); + p4c(a, sne, Vpe, Ksd(qyc)); + p4c(a, sne, Loe, Ksd(hyc)); + p4c(a, sne, Noe, Ksd(myc)); + p4c(a, sne, Moe, Ksd(pyc)); + p4c(a, sne, Ooe, Ksd(wyc)); + p4c(a, sne, vme, meb(0)); + p4c(a, sne, Poe, Ksd(cyc)); + p4c(a, sne, Qoe, Ksd(dyc)); + p4c(a, sne, Roe, Ksd(eyc)); + p4c(a, sne, Yoe, Ksd(Kyc)); + p4c(a, sne, Zoe, Ksd(Cyc)); + p4c(a, sne, $oe, Ksd(Dyc)); + p4c(a, sne, _oe, Ksd(Gyc)); + p4c(a, sne, ape, Ksd(Eyc)); + p4c(a, sne, bpe, Ksd(Fyc)); + p4c(a, sne, cpe, Ksd(Myc)); + p4c(a, sne, dpe, Ksd(Lyc)); + p4c(a, sne, epe, Ksd(Iyc)); + p4c(a, sne, fpe, Ksd(Hyc)); + p4c(a, sne, gpe, Ksd(Jyc)); + p4c(a, sne, Eoe, Ksd(Cxc)); + p4c(a, sne, Foe, Ksd(Dxc)); + p4c(a, sne, Ioe, Ksd(Xwc)); + p4c(a, sne, Joe, Ksd(Ywc)); + p4c(a, sne, ame, Lxc); + p4c(a, sne, ype, Twc); + p4c(a, sne, Wpe, 0); + p4c(a, sne, yme, meb(1)); + p4c(a, sne, _le, tme); + p4c(a, sne, Xpe, Ksd(Jxc)); + p4c(a, sne, Bme, Ksd(Vxc)); + p4c(a, sne, Ype, Ksd($xc)); + p4c(a, sne, Zpe, Ksd(Kwc)); + p4c(a, sne, $pe, Ksd(mwc)); + p4c(a, sne, tpe, Ksd(axc)); + p4c(a, sne, zme, (Bcb(), true)); + p4c(a, sne, _pe, Ksd(fxc)); + p4c(a, sne, aqe, Ksd(gxc)); + p4c(a, sne, Fme, Ksd(Fxc)); + p4c(a, sne, Eme, Ksd(Ixc)); + p4c(a, sne, bqe, Ksd(Gxc)); + p4c(a, sne, cqe, Nwc); + p4c(a, sne, Gme, Ksd(xxc)); + p4c(a, sne, dqe, Ksd(wxc)); + p4c(a, sne, Hme, Ksd(Yxc)); + p4c(a, sne, eqe, Ksd(Xxc)); + p4c(a, sne, fqe, Ksd(Zxc)); + p4c(a, sne, gqe, Oxc); + p4c(a, sne, hqe, Ksd(Qxc)); + p4c(a, sne, iqe, Ksd(Rxc)); + p4c(a, sne, jqe, Ksd(Sxc)); + p4c(a, sne, kqe, Ksd(Pxc)); + p4c(a, sne, eoe, Ksd(Byc)); + p4c(a, sne, hoe, Ksd(sxc)); + p4c(a, sne, noe, Ksd(rxc)); + p4c(a, sne, doe, Ksd(Ayc)); + p4c(a, sne, ioe, Ksd(mxc)); + p4c(a, sne, goe, Ksd(Jwc)); + p4c(a, sne, qoe, Ksd(Iwc)); + p4c(a, sne, roe, Ksd(Awc)); + p4c(a, sne, woe, Ksd(Bwc)); + p4c(a, sne, xoe, Ksd(Dwc)); + p4c(a, sne, yoe, Ksd(Cwc)); + p4c(a, sne, toe, Ksd(Hwc)); + p4c(a, sne, _ne, Ksd(uxc)); + p4c(a, sne, aoe, Ksd(vxc)); + p4c(a, sne, $ne, Ksd(ixc)); + p4c(a, sne, zoe, Ksd(Exc)); + p4c(a, sne, Coe, Ksd(zxc)); + p4c(a, sne, Zne, Ksd($wc)); + p4c(a, sne, Doe, Ksd(Bxc)); + p4c(a, sne, Goe, Ksd(Vwc)); + p4c(a, sne, Hoe, Ksd(Wwc)); + p4c(a, sne, lqe, Ksd(zwc)); + p4c(a, sne, Boe, Ksd(yxc)); + p4c(a, sne, Toe, Ksd(swc)); + p4c(a, sne, Uoe, Ksd(rwc)); + p4c(a, sne, Soe, Ksd(qwc)); + p4c(a, sne, Voe, Ksd(cxc)); + p4c(a, sne, Woe, Ksd(bxc)); + p4c(a, sne, Xoe, Ksd(dxc)); + p4c(a, sne, Tme, Ksd(Hxc)); + p4c(a, sne, mqe, Ksd(jxc)); + p4c(a, sne, $le, Ksd(Zwc)); + p4c(a, sne, nqe, Ksd(Qwc)); + p4c(a, sne, Cme, Ksd(Pwc)); + p4c(a, sne, soe, Ksd(Ewc)); + p4c(a, sne, oqe, Ksd(Wxc)); + p4c(a, sne, pqe, Ksd(pwc)); + p4c(a, sne, qqe, Ksd(exc)); + p4c(a, sne, rqe, Ksd(Txc)); + p4c(a, sne, sqe, Ksd(Mxc)); + p4c(a, sne, tqe, Ksd(Nxc)); + p4c(a, sne, loe, Ksd(oxc)); + p4c(a, sne, moe, Ksd(pxc)); + p4c(a, sne, uqe, Ksd(ayc)); + p4c(a, sne, boe, Ksd(nwc)); + p4c(a, sne, ooe, Ksd(qxc)); + p4c(a, sne, hpe, Ksd(Rwc)); + p4c(a, sne, ipe, Ksd(Owc)); + p4c(a, sne, vqe, Ksd(txc)); + p4c(a, sne, poe, Ksd(kxc)); + p4c(a, sne, Aoe, Ksd(Axc)); + p4c(a, sne, wqe, Ksd(yyc)); + p4c(a, sne, Yne, Ksd(Mwc)); + p4c(a, sne, coe, Ksd(_xc)); + p4c(a, sne, Koe, Ksd(Uwc)); + p4c(a, sne, joe, Ksd(lxc)); + p4c(a, sne, uoe, Ksd(Fwc)); + p4c(a, sne, xqe, Ksd(hxc)); + p4c(a, sne, koe, Ksd(nxc)); + p4c(a, sne, voe, Ksd(Gwc)); + p4c(a, sne, jpe, Ksd(ywc)); + p4c(a, sne, mpe, Ksd(wwc)); + p4c(a, sne, npe, Ksd(uwc)); + p4c(a, sne, ope, Ksd(vwc)); + p4c(a, sne, kpe, Ksd(xwc)); + p4c(a, sne, lpe, Ksd(twc)); + p4c(a, sne, foe, Ksd(_wc)); + } + function kee(a, b) { + var c2, d; + if (!cee) { + cee = new Lqb(); + dee = new Lqb(); + d = (wfe(), wfe(), new $fe(4)); + Ree(d, " \n\r\r "); + Shb(cee, pxe, d); + Shb(dee, pxe, _fe(d)); + d = new $fe(4); + Ree(d, sxe); + Shb(cee, nxe, d); + Shb(dee, nxe, _fe(d)); + d = new $fe(4); + Ree(d, sxe); + Shb(cee, nxe, d); + Shb(dee, nxe, _fe(d)); + d = new $fe(4); + Ree(d, txe); + Xfe(d, BD(Phb(cee, nxe), 117)); + Shb(cee, oxe, d); + Shb(dee, oxe, _fe(d)); + d = new $fe(4); + Ree(d, "-.0:AZ__az··ÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁːˑ̀͠͡ͅΆΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁ҃҆ҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆֹֻֽֿֿׁׂ֑֣֡ׄׄאתװײءغـْ٠٩ٰڷںھۀێېۓە۪ۭۨ۰۹ँःअह़्॑॔क़ॣ०९ঁঃঅঌএঐওনপরললশহ়়াৄেৈো্ৗৗড়ঢ়য়ৣ০ৱਂਂਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹ਼਼ਾੂੇੈੋ੍ਖ਼ੜਫ਼ਫ਼੦ੴઁઃઅઋઍઍએઑઓનપરલળવહ઼ૅેૉો્ૠૠ૦૯ଁଃଅଌଏଐଓନପରଲଳଶହ଼ୃେୈୋ୍ୖୗଡ଼ଢ଼ୟୡ୦୯ஂஃஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹாூெைொ்ௗௗ௧௯ఁఃఅఌఎఐఒనపళవహాౄెైొ్ౕౖౠౡ౦౯ಂಃಅಌಎಐಒನಪಳವಹಾೄೆೈೊ್ೕೖೞೞೠೡ೦೯ംഃഅഌഎഐഒനപഹാൃെൈൊ്ൗൗൠൡ൦൯กฮะฺเ๎๐๙ກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະູົຽເໄໆໆ່ໍ໐໙༘༙༠༩༹༹༵༵༷༷༾ཇཉཀྵ྄ཱ྆ྋྐྕྗྗྙྭྱྷྐྵྐྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼ⃐⃜⃡⃡ΩΩKÅ℮℮ↀↂ々々〇〇〡〯〱〵ぁゔ゙゚ゝゞァヺーヾㄅㄬ一龥가힣"); + Shb(cee, qxe, d); + Shb(dee, qxe, _fe(d)); + d = new $fe(4); + Ree(d, txe); + Ufe(d, 95, 95); + Ufe(d, 58, 58); + Shb(cee, rxe, d); + Shb(dee, rxe, _fe(d)); + } + c2 = b ? BD(Phb(cee, a), 136) : BD(Phb(dee, a), 136); + return c2; + } + function _9d(a) { + Bnd(a.a, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "anySimpleType"])); + Bnd(a.b, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "anyType", Sve, Qve])); + Bnd(BD(qud(ZKd(a.b), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, xwe, fue, ":mixed"])); + Bnd(BD(qud(ZKd(a.b), 1), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, xwe, Dwe, Fwe, fue, ":1", Owe, "lax"])); + Bnd(BD(qud(ZKd(a.b), 2), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, vwe, Dwe, Fwe, fue, ":2", Owe, "lax"])); + Bnd(a.c, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "anyURI", Cwe, ywe])); + Bnd(a.d, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "base64Binary", Cwe, ywe])); + Bnd(a.e, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Khe, Cwe, ywe])); + Bnd(a.f, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "boolean:Object", cwe, Khe])); + Bnd(a.g, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Eve])); + Bnd(a.i, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "byte:Object", cwe, Eve])); + Bnd(a.j, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "date", Cwe, ywe])); + Bnd(a.k, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "dateTime", Cwe, ywe])); + Bnd(a.n, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "decimal", Cwe, ywe])); + Bnd(a.o, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Gve, Cwe, ywe])); + Bnd(a.p, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "double:Object", cwe, Gve])); + Bnd(a.q, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "duration", Cwe, ywe])); + Bnd(a.s, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "ENTITIES", cwe, Pwe, Qwe, "1"])); + Bnd(a.r, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Pwe, zwe, Rwe])); + Bnd(a.t, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Rwe, cwe, Swe])); + Bnd(a.u, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Hve, Cwe, ywe])); + Bnd(a.v, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "float:Object", cwe, Hve])); + Bnd(a.w, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gDay", Cwe, ywe])); + Bnd(a.B, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gMonth", Cwe, ywe])); + Bnd(a.A, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gMonthDay", Cwe, ywe])); + Bnd(a.C, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gYear", Cwe, ywe])); + Bnd(a.D, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "gYearMonth", Cwe, ywe])); + Bnd(a.F, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "hexBinary", Cwe, ywe])); + Bnd(a.G, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "ID", cwe, Swe])); + Bnd(a.H, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "IDREF", cwe, Swe])); + Bnd(a.J, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "IDREFS", cwe, Twe, Qwe, "1"])); + Bnd(a.I, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Twe, zwe, "IDREF"])); + Bnd(a.K, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Ive])); + Bnd(a.M, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Uwe])); + Bnd(a.L, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "int:Object", cwe, Ive])); + Bnd(a.P, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "language", cwe, Vwe, Wwe, Xwe])); + Bnd(a.Q, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Jve])); + Bnd(a.R, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "long:Object", cwe, Jve])); + Bnd(a.S, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "Name", cwe, Vwe, Wwe, Ywe])); + Bnd(a.T, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Swe, cwe, "Name", Wwe, Zwe])); + Bnd(a.U, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "negativeInteger", cwe, $we, _we, "-1"])); + Bnd(a.V, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, axe, cwe, Vwe, Wwe, "\\c+"])); + Bnd(a.X, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "NMTOKENS", cwe, bxe, Qwe, "1"])); + Bnd(a.W, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, bxe, zwe, axe])); + Bnd(a.Y, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, cxe, cwe, Uwe, dxe, "0"])); + Bnd(a.Z, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, $we, cwe, Uwe, _we, "0"])); + Bnd(a.$, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, exe, cwe, Mhe, Cwe, "replace"])); + Bnd(a._, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "NOTATION", Cwe, ywe])); + Bnd(a.ab, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "positiveInteger", cwe, cxe, dxe, "1"])); + Bnd(a.bb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "processingInstruction_._type", Sve, "empty"])); + Bnd(BD(qud(ZKd(a.bb), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, "data"])); + Bnd(BD(qud(ZKd(a.bb), 1), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, bue])); + Bnd(a.cb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "QName", Cwe, ywe])); + Bnd(a.db, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Kve])); + Bnd(a.eb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "short:Object", cwe, Kve])); + Bnd(a.fb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "simpleAnyType", Sve, twe])); + Bnd(BD(qud(ZKd(a.fb), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ":3", Sve, twe])); + Bnd(BD(qud(ZKd(a.fb), 1), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ":4", Sve, twe])); + Bnd(BD(qud(ZKd(a.fb), 2), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ":5", Sve, twe])); + Bnd(a.gb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Mhe, Cwe, "preserve"])); + Bnd(a.hb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "time", Cwe, ywe])); + Bnd(a.ib, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, Vwe, cwe, exe, Cwe, ywe])); + Bnd(a.jb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, fxe, _we, "255", dxe, "0"])); + Bnd(a.kb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedByte:Object", cwe, fxe])); + Bnd(a.lb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, gxe, _we, "4294967295", dxe, "0"])); + Bnd(a.mb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedInt:Object", cwe, gxe])); + Bnd(a.nb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedLong", cwe, cxe, _we, hxe, dxe, "0"])); + Bnd(a.ob, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, ixe, _we, "65535", dxe, "0"])); + Bnd(a.pb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "unsignedShort:Object", cwe, ixe])); + Bnd(a.qb, Rve, OC(GC(ZI, 1), nie, 2, 6, [fue, "", Sve, Qve])); + Bnd(BD(qud(ZKd(a.qb), 0), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, xwe, fue, ":mixed"])); + Bnd(BD(qud(ZKd(a.qb), 1), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, "xmlns:prefix"])); + Bnd(BD(qud(ZKd(a.qb), 2), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, uwe, fue, "xsi:schemaLocation"])); + Bnd(BD(qud(ZKd(a.qb), 3), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, "cDATA", Awe, Bwe])); + Bnd(BD(qud(ZKd(a.qb), 4), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, "comment", Awe, Bwe])); + Bnd(BD(qud(ZKd(a.qb), 5), 18), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, jxe, Awe, Bwe])); + Bnd(BD(qud(ZKd(a.qb), 6), 34), Rve, OC(GC(ZI, 1), nie, 2, 6, [Sve, wwe, fue, Ite, Awe, Bwe])); + } + function tvd(a) { + return dfb("_UI_EMFDiagnostic_marker", a) ? "EMF Problem" : dfb("_UI_CircularContainment_diagnostic", a) ? "An object may not circularly contain itself" : dfb(sue, a) ? "Wrong character." : dfb(tue, a) ? "Invalid reference number." : dfb(uue, a) ? "A character is required after \\." : dfb(vue, a) ? "'?' is not expected. '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?" : dfb(wue, a) ? "'(?<' or '(? toIndex: ", zke = ", toIndex: ", Ake = "Index: ", Bke = ", Size: ", Cke = "org.eclipse.elk.alg.common", Dke = { 62: 1 }, Eke = "org.eclipse.elk.alg.common.compaction", Fke = "Scanline/EventHandler", Gke = "org.eclipse.elk.alg.common.compaction.oned", Hke = "CNode belongs to another CGroup.", Ike = "ISpacingsHandler/1", Jke = "The ", Kke = " instance has been finished already.", Lke = "The direction ", Mke = " is not supported by the CGraph instance.", Nke = "OneDimensionalCompactor", Oke = "OneDimensionalCompactor/lambda$0$Type", Pke = "Quadruplet", Qke = "ScanlineConstraintCalculator", Rke = "ScanlineConstraintCalculator/ConstraintsScanlineHandler", Ske = "ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type", Tke = "ScanlineConstraintCalculator/Timestamp", Uke = "ScanlineConstraintCalculator/lambda$0$Type", Vke = { 169: 1, 45: 1 }, Wke = "org.eclipse.elk.alg.common.compaction.options", Xke = "org.eclipse.elk.core.data", Yke = "org.eclipse.elk.polyomino.traversalStrategy", Zke = "org.eclipse.elk.polyomino.lowLevelSort", $ke = "org.eclipse.elk.polyomino.highLevelSort", _ke = "org.eclipse.elk.polyomino.fill", ale = { 130: 1 }, ble = "polyomino", cle = "org.eclipse.elk.alg.common.networksimplex", dle = { 177: 1, 3: 1, 4: 1 }, ele = "org.eclipse.elk.alg.common.nodespacing", fle = "org.eclipse.elk.alg.common.nodespacing.cellsystem", gle = "CENTER", hle = { 212: 1, 326: 1 }, ile = { 3: 1, 4: 1, 5: 1, 595: 1 }, jle = "LEFT", kle = "RIGHT", lle = "Vertical alignment cannot be null", mle = "BOTTOM", nle = "org.eclipse.elk.alg.common.nodespacing.internal", ole = "UNDEFINED", ple = 0.01, qle = "org.eclipse.elk.alg.common.nodespacing.internal.algorithm", rle = "LabelPlacer/lambda$0$Type", sle = "LabelPlacer/lambda$1$Type", tle = "portRatioOrPosition", ule = "org.eclipse.elk.alg.common.overlaps", vle = "DOWN", wle = "org.eclipse.elk.alg.common.polyomino", xle = "NORTH", yle = "EAST", zle = "SOUTH", Ale = "WEST", Ble = "org.eclipse.elk.alg.common.polyomino.structures", Cle = "Direction", Dle = "Grid is only of size ", Ele = ". Requested point (", Fle = ") is out of bounds.", Gle = " Given center based coordinates were (", Hle = "org.eclipse.elk.graph.properties", Ile = "IPropertyHolder", Jle = { 3: 1, 94: 1, 134: 1 }, Kle = "org.eclipse.elk.alg.common.spore", Lle = "org.eclipse.elk.alg.common.utils", Mle = { 209: 1 }, Nle = "org.eclipse.elk.core", Ole = "Connected Components Compaction", Ple = "org.eclipse.elk.alg.disco", Qle = "org.eclipse.elk.alg.disco.graph", Rle = "org.eclipse.elk.alg.disco.options", Sle = "CompactionStrategy", Tle = "org.eclipse.elk.disco.componentCompaction.strategy", Ule = "org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm", Vle = "org.eclipse.elk.disco.debug.discoGraph", Wle = "org.eclipse.elk.disco.debug.discoPolys", Xle = "componentCompaction", Yle = "org.eclipse.elk.disco", Zle = "org.eclipse.elk.spacing.componentComponent", $le = "org.eclipse.elk.edge.thickness", _le = "org.eclipse.elk.aspectRatio", ame = "org.eclipse.elk.padding", bme = "org.eclipse.elk.alg.disco.transform", cme = 1.5707963267948966, dme = 17976931348623157e292, eme = { 3: 1, 4: 1, 5: 1, 192: 1 }, fme = { 3: 1, 6: 1, 4: 1, 5: 1, 106: 1, 120: 1 }, gme = "org.eclipse.elk.alg.force", hme = "ComponentsProcessor", ime = "ComponentsProcessor/1", jme = "org.eclipse.elk.alg.force.graph", kme = "Component Layout", lme = "org.eclipse.elk.alg.force.model", mme = "org.eclipse.elk.force.model", nme = "org.eclipse.elk.force.iterations", ome = "org.eclipse.elk.force.repulsivePower", pme = "org.eclipse.elk.force.temperature", qme = 1e-3, rme = "org.eclipse.elk.force.repulsion", sme = "org.eclipse.elk.alg.force.options", tme = 1.600000023841858, ume = "org.eclipse.elk.force", vme = "org.eclipse.elk.priority", wme = "org.eclipse.elk.spacing.nodeNode", xme = "org.eclipse.elk.spacing.edgeLabel", yme = "org.eclipse.elk.randomSeed", zme = "org.eclipse.elk.separateConnectedComponents", Ame = "org.eclipse.elk.interactive", Bme = "org.eclipse.elk.portConstraints", Cme = "org.eclipse.elk.edgeLabels.inline", Dme = "org.eclipse.elk.omitNodeMicroLayout", Eme = "org.eclipse.elk.nodeSize.options", Fme = "org.eclipse.elk.nodeSize.constraints", Gme = "org.eclipse.elk.nodeLabels.placement", Hme = "org.eclipse.elk.portLabels.placement", Ime = "origin", Jme = "random", Kme = "boundingBox.upLeft", Lme = "boundingBox.lowRight", Mme = "org.eclipse.elk.stress.fixed", Nme = "org.eclipse.elk.stress.desiredEdgeLength", Ome = "org.eclipse.elk.stress.dimension", Pme = "org.eclipse.elk.stress.epsilon", Qme = "org.eclipse.elk.stress.iterationLimit", Rme = "org.eclipse.elk.stress", Sme = "ELK Stress", Tme = "org.eclipse.elk.nodeSize.minimum", Ume = "org.eclipse.elk.alg.force.stress", Vme = "Layered layout", Wme = "org.eclipse.elk.alg.layered", Xme = "org.eclipse.elk.alg.layered.compaction.components", Yme = "org.eclipse.elk.alg.layered.compaction.oned", Zme = "org.eclipse.elk.alg.layered.compaction.oned.algs", $me = "org.eclipse.elk.alg.layered.compaction.recthull", _me = "org.eclipse.elk.alg.layered.components", ane = "NONE", bne = { 3: 1, 6: 1, 4: 1, 9: 1, 5: 1, 122: 1 }, cne = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 106: 1, 120: 1 }, dne = "org.eclipse.elk.alg.layered.compound", ene = { 51: 1 }, fne = "org.eclipse.elk.alg.layered.graph", gne = " -> ", hne = "Not supported by LGraph", ine = "Port side is undefined", jne = { 3: 1, 6: 1, 4: 1, 5: 1, 474: 1, 141: 1, 106: 1, 120: 1 }, kne = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 193: 1, 203: 1, 106: 1, 120: 1 }, lne = { 3: 1, 6: 1, 4: 1, 5: 1, 141: 1, 1943: 1, 203: 1, 106: 1, 120: 1 }, mne = `([{"' \r +`, nne = `)]}"' \r +`, one2 = "The given string contains parts that cannot be parsed as numbers.", pne = "org.eclipse.elk.core.math", qne = { 3: 1, 4: 1, 142: 1, 207: 1, 414: 1 }, rne = { 3: 1, 4: 1, 116: 1, 207: 1, 414: 1 }, sne = "org.eclipse.elk.layered", tne = "org.eclipse.elk.alg.layered.graph.transform", une = "ElkGraphImporter", vne = "ElkGraphImporter/lambda$0$Type", wne = "ElkGraphImporter/lambda$1$Type", xne = "ElkGraphImporter/lambda$2$Type", yne = "ElkGraphImporter/lambda$4$Type", zne = "Node margin calculation", Ane = "org.eclipse.elk.alg.layered.intermediate", Bne = "ONE_SIDED_GREEDY_SWITCH", Cne = "TWO_SIDED_GREEDY_SWITCH", Dne = "No implementation is available for the layout processor ", Ene = "IntermediateProcessorStrategy", Fne = "Node '", Gne = "FIRST_SEPARATE", Hne = "LAST_SEPARATE", Ine = "Odd port side processing", Jne = "org.eclipse.elk.alg.layered.intermediate.compaction", Kne = "org.eclipse.elk.alg.layered.intermediate.greedyswitch", Lne = "org.eclipse.elk.alg.layered.p3order.counting", Mne = { 225: 1 }, Nne = "org.eclipse.elk.alg.layered.intermediate.loops", One = "org.eclipse.elk.alg.layered.intermediate.loops.ordering", Pne = "org.eclipse.elk.alg.layered.intermediate.loops.routing", Qne = "org.eclipse.elk.alg.layered.intermediate.preserveorder", Rne = "org.eclipse.elk.alg.layered.intermediate.wrapping", Sne = "org.eclipse.elk.alg.layered.options", Tne = "INTERACTIVE", Une = "DEPTH_FIRST", Vne = "EDGE_LENGTH", Wne = "SELF_LOOPS", Xne = "firstTryWithInitialOrder", Yne = "org.eclipse.elk.layered.directionCongruency", Zne = "org.eclipse.elk.layered.feedbackEdges", $ne = "org.eclipse.elk.layered.interactiveReferencePoint", _ne = "org.eclipse.elk.layered.mergeEdges", aoe = "org.eclipse.elk.layered.mergeHierarchyEdges", boe = "org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides", coe = "org.eclipse.elk.layered.portSortingStrategy", doe = "org.eclipse.elk.layered.thoroughness", eoe = "org.eclipse.elk.layered.unnecessaryBendpoints", foe = "org.eclipse.elk.layered.generatePositionAndLayerIds", goe = "org.eclipse.elk.layered.cycleBreaking.strategy", hoe = "org.eclipse.elk.layered.layering.strategy", ioe = "org.eclipse.elk.layered.layering.layerConstraint", joe = "org.eclipse.elk.layered.layering.layerChoiceConstraint", koe = "org.eclipse.elk.layered.layering.layerId", loe = "org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth", moe = "org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor", noe = "org.eclipse.elk.layered.layering.nodePromotion.strategy", ooe = "org.eclipse.elk.layered.layering.nodePromotion.maxIterations", poe = "org.eclipse.elk.layered.layering.coffmanGraham.layerBound", qoe = "org.eclipse.elk.layered.crossingMinimization.strategy", roe = "org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder", soe = "org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness", toe = "org.eclipse.elk.layered.crossingMinimization.semiInteractive", uoe = "org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint", voe = "org.eclipse.elk.layered.crossingMinimization.positionId", woe = "org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold", xoe = "org.eclipse.elk.layered.crossingMinimization.greedySwitch.type", yoe = "org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type", zoe = "org.eclipse.elk.layered.nodePlacement.strategy", Aoe = "org.eclipse.elk.layered.nodePlacement.favorStraightEdges", Boe = "org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening", Coe = "org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment", Doe = "org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening", Eoe = "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility", Foe = "org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default", Goe = "org.eclipse.elk.layered.edgeRouting.selfLoopDistribution", Hoe = "org.eclipse.elk.layered.edgeRouting.selfLoopOrdering", Ioe = "org.eclipse.elk.layered.edgeRouting.splines.mode", Joe = "org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor", Koe = "org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth", Loe = "org.eclipse.elk.layered.spacing.baseValue", Moe = "org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers", Noe = "org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers", Ooe = "org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers", Poe = "org.eclipse.elk.layered.priority.direction", Qoe = "org.eclipse.elk.layered.priority.shortness", Roe = "org.eclipse.elk.layered.priority.straightness", Soe = "org.eclipse.elk.layered.compaction.connectedComponents", Toe = "org.eclipse.elk.layered.compaction.postCompaction.strategy", Uoe = "org.eclipse.elk.layered.compaction.postCompaction.constraints", Voe = "org.eclipse.elk.layered.highDegreeNodes.treatment", Woe = "org.eclipse.elk.layered.highDegreeNodes.threshold", Xoe = "org.eclipse.elk.layered.highDegreeNodes.treeHeight", Yoe = "org.eclipse.elk.layered.wrapping.strategy", Zoe = "org.eclipse.elk.layered.wrapping.additionalEdgeSpacing", $oe = "org.eclipse.elk.layered.wrapping.correctionFactor", _oe = "org.eclipse.elk.layered.wrapping.cutting.strategy", ape = "org.eclipse.elk.layered.wrapping.cutting.cuts", bpe = "org.eclipse.elk.layered.wrapping.cutting.msd.freedom", cpe = "org.eclipse.elk.layered.wrapping.validify.strategy", dpe = "org.eclipse.elk.layered.wrapping.validify.forbiddenIndices", epe = "org.eclipse.elk.layered.wrapping.multiEdge.improveCuts", fpe = "org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty", gpe = "org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges", hpe = "org.eclipse.elk.layered.edgeLabels.sideSelection", ipe = "org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy", jpe = "org.eclipse.elk.layered.considerModelOrder.strategy", kpe = "org.eclipse.elk.layered.considerModelOrder.noModelOrder", lpe = "org.eclipse.elk.layered.considerModelOrder.components", mpe = "org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy", npe = "org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence", ope = "org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence", ppe = "layering", qpe = "layering.minWidth", rpe = "layering.nodePromotion", spe = "crossingMinimization", tpe = "org.eclipse.elk.hierarchyHandling", upe = "crossingMinimization.greedySwitch", vpe = "nodePlacement", wpe = "nodePlacement.bk", xpe = "edgeRouting", ype = "org.eclipse.elk.edgeRouting", zpe = "spacing", Ape = "priority", Bpe = "compaction", Cpe = "compaction.postCompaction", Dpe = "Specifies whether and how post-process compaction is applied.", Epe = "highDegreeNodes", Fpe = "wrapping", Gpe = "wrapping.cutting", Hpe = "wrapping.validify", Ipe = "wrapping.multiEdge", Jpe = "edgeLabels", Kpe = "considerModelOrder", Lpe = "org.eclipse.elk.spacing.commentComment", Mpe = "org.eclipse.elk.spacing.commentNode", Npe = "org.eclipse.elk.spacing.edgeEdge", Ope = "org.eclipse.elk.spacing.edgeNode", Ppe = "org.eclipse.elk.spacing.labelLabel", Qpe = "org.eclipse.elk.spacing.labelPortHorizontal", Rpe = "org.eclipse.elk.spacing.labelPortVertical", Spe = "org.eclipse.elk.spacing.labelNode", Tpe = "org.eclipse.elk.spacing.nodeSelfLoop", Upe = "org.eclipse.elk.spacing.portPort", Vpe = "org.eclipse.elk.spacing.individual", Wpe = "org.eclipse.elk.port.borderOffset", Xpe = "org.eclipse.elk.noLayout", Ype = "org.eclipse.elk.port.side", Zpe = "org.eclipse.elk.debugMode", $pe = "org.eclipse.elk.alignment", _pe = "org.eclipse.elk.insideSelfLoops.activate", aqe = "org.eclipse.elk.insideSelfLoops.yo", bqe = "org.eclipse.elk.nodeSize.fixedGraphSize", cqe = "org.eclipse.elk.direction", dqe = "org.eclipse.elk.nodeLabels.padding", eqe = "org.eclipse.elk.portLabels.nextToPortIfPossible", fqe = "org.eclipse.elk.portLabels.treatAsGroup", gqe = "org.eclipse.elk.portAlignment.default", hqe = "org.eclipse.elk.portAlignment.north", iqe = "org.eclipse.elk.portAlignment.south", jqe = "org.eclipse.elk.portAlignment.west", kqe = "org.eclipse.elk.portAlignment.east", lqe = "org.eclipse.elk.contentAlignment", mqe = "org.eclipse.elk.junctionPoints", nqe = "org.eclipse.elk.edgeLabels.placement", oqe = "org.eclipse.elk.port.index", pqe = "org.eclipse.elk.commentBox", qqe = "org.eclipse.elk.hypernode", rqe = "org.eclipse.elk.port.anchor", sqe = "org.eclipse.elk.partitioning.activate", tqe = "org.eclipse.elk.partitioning.partition", uqe = "org.eclipse.elk.position", vqe = "org.eclipse.elk.margins", wqe = "org.eclipse.elk.spacing.portsSurrounding", xqe = "org.eclipse.elk.interactiveLayout", yqe = "org.eclipse.elk.core.util", zqe = { 3: 1, 4: 1, 5: 1, 593: 1 }, Aqe = "NETWORK_SIMPLEX", Bqe = { 123: 1, 51: 1 }, Cqe = "org.eclipse.elk.alg.layered.p1cycles", Dqe = "org.eclipse.elk.alg.layered.p2layers", Eqe = { 402: 1, 225: 1 }, Fqe = { 832: 1, 3: 1, 4: 1 }, Gqe = "org.eclipse.elk.alg.layered.p3order", Hqe = "org.eclipse.elk.alg.layered.p4nodes", Iqe = { 3: 1, 4: 1, 5: 1, 840: 1 }, Jqe = 1e-5, Kqe = "org.eclipse.elk.alg.layered.p4nodes.bk", Lqe = "org.eclipse.elk.alg.layered.p5edges", Mqe = "org.eclipse.elk.alg.layered.p5edges.orthogonal", Nqe = "org.eclipse.elk.alg.layered.p5edges.orthogonal.direction", Oqe = 1e-6, Pqe = "org.eclipse.elk.alg.layered.p5edges.splines", Qqe = 0.09999999999999998, Rqe = 1e-8, Sqe = 4.71238898038469, Tqe = 3.141592653589793, Uqe = "org.eclipse.elk.alg.mrtree", Vqe = "org.eclipse.elk.alg.mrtree.graph", Wqe = "org.eclipse.elk.alg.mrtree.intermediate", Xqe = "Set neighbors in level", Yqe = "DESCENDANTS", Zqe = "org.eclipse.elk.mrtree.weighting", $qe = "org.eclipse.elk.mrtree.searchOrder", _qe = "org.eclipse.elk.alg.mrtree.options", are = "org.eclipse.elk.mrtree", bre = "org.eclipse.elk.tree", cre = "org.eclipse.elk.alg.radial", dre = 6.283185307179586, ere = 5e-324, fre = "org.eclipse.elk.alg.radial.intermediate", gre = "org.eclipse.elk.alg.radial.intermediate.compaction", hre = { 3: 1, 4: 1, 5: 1, 106: 1 }, ire = "org.eclipse.elk.alg.radial.intermediate.optimization", jre = "No implementation is available for the layout option ", kre = "org.eclipse.elk.alg.radial.options", lre = "org.eclipse.elk.radial.orderId", mre = "org.eclipse.elk.radial.radius", nre = "org.eclipse.elk.radial.compactor", ore = "org.eclipse.elk.radial.compactionStepSize", pre = "org.eclipse.elk.radial.sorter", qre = "org.eclipse.elk.radial.wedgeCriteria", rre = "org.eclipse.elk.radial.optimizationCriteria", sre = "org.eclipse.elk.radial", tre = "org.eclipse.elk.alg.radial.p1position.wedge", ure = "org.eclipse.elk.alg.radial.sorting", vre = 5.497787143782138, wre = 3.9269908169872414, xre = 2.356194490192345, yre = "org.eclipse.elk.alg.rectpacking", zre = "org.eclipse.elk.alg.rectpacking.firstiteration", Are = "org.eclipse.elk.alg.rectpacking.options", Bre = "org.eclipse.elk.rectpacking.optimizationGoal", Cre = "org.eclipse.elk.rectpacking.lastPlaceShift", Dre = "org.eclipse.elk.rectpacking.currentPosition", Ere = "org.eclipse.elk.rectpacking.desiredPosition", Fre = "org.eclipse.elk.rectpacking.onlyFirstIteration", Gre = "org.eclipse.elk.rectpacking.rowCompaction", Hre = "org.eclipse.elk.rectpacking.expandToAspectRatio", Ire = "org.eclipse.elk.rectpacking.targetWidth", Jre = "org.eclipse.elk.expandNodes", Kre = "org.eclipse.elk.rectpacking", Lre = "org.eclipse.elk.alg.rectpacking.util", Mre = "No implementation available for ", Nre = "org.eclipse.elk.alg.spore", Ore = "org.eclipse.elk.alg.spore.options", Pre = "org.eclipse.elk.sporeCompaction", Qre = "org.eclipse.elk.underlyingLayoutAlgorithm", Rre = "org.eclipse.elk.processingOrder.treeConstruction", Sre = "org.eclipse.elk.processingOrder.spanningTreeCostFunction", Tre = "org.eclipse.elk.processingOrder.preferredRoot", Ure = "org.eclipse.elk.processingOrder.rootSelection", Vre = "org.eclipse.elk.structure.structureExtractionStrategy", Wre = "org.eclipse.elk.compaction.compactionStrategy", Xre = "org.eclipse.elk.compaction.orthogonal", Yre = "org.eclipse.elk.overlapRemoval.maxIterations", Zre = "org.eclipse.elk.overlapRemoval.runScanline", $re = "processingOrder", _re = "overlapRemoval", ase = "org.eclipse.elk.sporeOverlap", bse = "org.eclipse.elk.alg.spore.p1structure", cse = "org.eclipse.elk.alg.spore.p2processingorder", dse = "org.eclipse.elk.alg.spore.p3execution", ese = "Invalid index: ", fse = "org.eclipse.elk.core.alg", gse = { 331: 1 }, hse = { 288: 1 }, ise = "Make sure its type is registered with the ", jse = " utility class.", kse = "true", lse = "false", mse = "Couldn't clone property '", nse = 0.05, ose = "org.eclipse.elk.core.options", pse = 1.2999999523162842, qse = "org.eclipse.elk.box", rse = "org.eclipse.elk.box.packingMode", sse = "org.eclipse.elk.algorithm", tse = "org.eclipse.elk.resolvedAlgorithm", use = "org.eclipse.elk.bendPoints", vse = "org.eclipse.elk.labelManager", wse = "org.eclipse.elk.scaleFactor", xse = "org.eclipse.elk.animate", yse = "org.eclipse.elk.animTimeFactor", zse = "org.eclipse.elk.layoutAncestors", Ase = "org.eclipse.elk.maxAnimTime", Bse = "org.eclipse.elk.minAnimTime", Cse = "org.eclipse.elk.progressBar", Dse = "org.eclipse.elk.validateGraph", Ese = "org.eclipse.elk.validateOptions", Fse = "org.eclipse.elk.zoomToFit", Gse = "org.eclipse.elk.font.name", Hse = "org.eclipse.elk.font.size", Ise = "org.eclipse.elk.edge.type", Jse = "partitioning", Kse = "nodeLabels", Lse = "portAlignment", Mse = "nodeSize", Nse = "port", Ose = "portLabels", Pse = "insideSelfLoops", Qse = "org.eclipse.elk.fixed", Rse = "org.eclipse.elk.random", Sse = "port must have a parent node to calculate the port side", Tse = "The edge needs to have exactly one edge section. Found: ", Use = "org.eclipse.elk.core.util.adapters", Vse = "org.eclipse.emf.ecore", Wse = "org.eclipse.elk.graph", Xse = "EMapPropertyHolder", Yse = "ElkBendPoint", Zse = "ElkGraphElement", $se = "ElkConnectableShape", _se = "ElkEdge", ate = "ElkEdgeSection", bte = "EModelElement", cte = "ENamedElement", dte = "ElkLabel", ete = "ElkNode", fte = "ElkPort", gte = { 92: 1, 90: 1 }, hte = "org.eclipse.emf.common.notify.impl", ite = "The feature '", jte = "' is not a valid changeable feature", kte = "Expecting null", lte = "' is not a valid feature", mte = "The feature ID", nte = " is not a valid feature ID", ote = 32768, pte = { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1 }, qte = "org.eclipse.emf.ecore.impl", rte = "org.eclipse.elk.graph.impl", ste = "Recursive containment not allowed for ", tte = "The datatype '", ute = "' is not a valid classifier", vte = "The value '", wte = { 190: 1, 3: 1, 4: 1 }, xte = "The class '", yte = "http://www.eclipse.org/elk/ElkGraph", zte = 1024, Ate = "property", Bte = "value", Cte = "source", Dte = "properties", Ete = "identifier", Fte = "height", Gte = "width", Hte = "parent", Ite = "text", Jte = "children", Kte = "hierarchical", Lte = "sources", Mte = "targets", Nte = "sections", Ote = "bendPoints", Pte = "outgoingShape", Qte = "incomingShape", Rte = "outgoingSections", Ste = "incomingSections", Tte = "org.eclipse.emf.common.util", Ute = "Severe implementation error in the Json to ElkGraph importer.", Vte = "id", Wte = "org.eclipse.elk.graph.json", Xte = "Unhandled parameter types: ", Yte = "startPoint", Zte = "An edge must have at least one source and one target (edge id: '", $te = "').", _te = "Referenced edge section does not exist: ", aue = " (edge id: '", bue = "target", cue = "sourcePoint", due = "targetPoint", eue = "group", fue = "name", gue = "connectableShape cannot be null", hue2 = "edge cannot be null", iue = "Passed edge is not 'simple'.", jue = "org.eclipse.elk.graph.util", kue = "The 'no duplicates' constraint is violated", lue = "targetIndex=", mue = ", size=", nue = "sourceIndex=", oue = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1 }, pue = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 47: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 588: 1 }, que = "logging", rue = "measureExecutionTime", sue = "parser.parse.1", tue = "parser.parse.2", uue = "parser.next.1", vue = "parser.next.2", wue = "parser.next.3", xue = "parser.next.4", yue = "parser.factor.1", zue = "parser.factor.2", Aue = "parser.factor.3", Bue = "parser.factor.4", Cue = "parser.factor.5", Due = "parser.factor.6", Eue = "parser.atom.1", Fue = "parser.atom.2", Gue = "parser.atom.3", Hue = "parser.atom.4", Iue = "parser.atom.5", Jue = "parser.cc.1", Kue = "parser.cc.2", Lue = "parser.cc.3", Mue = "parser.cc.5", Nue = "parser.cc.6", Oue = "parser.cc.7", Pue = "parser.cc.8", Que = "parser.ope.1", Rue = "parser.ope.2", Sue = "parser.ope.3", Tue = "parser.descape.1", Uue = "parser.descape.2", Vue = "parser.descape.3", Wue = "parser.descape.4", Xue = "parser.descape.5", Yue = "parser.process.1", Zue = "parser.quantifier.1", $ue = "parser.quantifier.2", _ue = "parser.quantifier.3", ave = "parser.quantifier.4", bve = "parser.quantifier.5", cve = "org.eclipse.emf.common.notify", dve = { 415: 1, 672: 1 }, eve = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1 }, fve = { 366: 1, 143: 1 }, gve = "index=", hve = { 3: 1, 4: 1, 5: 1, 126: 1 }, ive = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 58: 1 }, jve = { 3: 1, 6: 1, 4: 1, 5: 1, 192: 1 }, kve = { 3: 1, 4: 1, 5: 1, 165: 1, 367: 1 }, lve = ";/?:@&=+$,", mve = "invalid authority: ", nve = "EAnnotation", ove = "ETypedElement", pve = "EStructuralFeature", qve = "EAttribute", rve = "EClassifier", sve = "EEnumLiteral", tve = "EGenericType", uve = "EOperation", vve = "EParameter", wve = "EReference", xve = "ETypeParameter", yve = "org.eclipse.emf.ecore.util", zve = { 76: 1 }, Ave = { 3: 1, 20: 1, 14: 1, 15: 1, 58: 1, 589: 1, 76: 1, 69: 1, 95: 1 }, Bve = "org.eclipse.emf.ecore.util.FeatureMap$Entry", Cve = 8192, Dve = 2048, Eve = "byte", Fve = "char", Gve = "double", Hve = "float", Ive = "int", Jve = "long", Kve = "short", Lve = "java.lang.Object", Mve = { 3: 1, 4: 1, 5: 1, 247: 1 }, Nve = { 3: 1, 4: 1, 5: 1, 673: 1 }, Ove = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 69: 1 }, Pve = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, Qve = "mixed", Rve = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData", Sve = "kind", Tve = { 3: 1, 4: 1, 5: 1, 674: 1 }, Uve = { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, Vve = { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 69: 1 }, Wve = { 47: 1, 125: 1, 279: 1 }, Xve = { 72: 1, 332: 1 }, Yve = "The value of type '", Zve = "' must be of type '", $ve = 1316, _ve = "http://www.eclipse.org/emf/2002/Ecore", awe = -32768, bwe = "constraints", cwe = "baseType", dwe = "getEStructuralFeature", ewe = "getFeatureID", fwe = "feature", gwe = "getOperationID", hwe = "operation", iwe = "defaultValue", jwe = "eTypeParameters", kwe = "isInstance", lwe = "getEEnumLiteral", mwe = "eContainingClass", nwe = { 55: 1 }, owe = { 3: 1, 4: 1, 5: 1, 119: 1 }, pwe = "org.eclipse.emf.ecore.resource", qwe = { 92: 1, 90: 1, 591: 1, 1935: 1 }, rwe = "org.eclipse.emf.ecore.resource.impl", swe = "unspecified", twe = "simple", uwe = "attribute", vwe = "attributeWildcard", wwe = "element", xwe = "elementWildcard", ywe = "collapse", zwe = "itemType", Awe = "namespace", Bwe = "##targetNamespace", Cwe = "whiteSpace", Dwe = "wildcards", Ewe = "http://www.eclipse.org/emf/2003/XMLType", Fwe = "##any", Gwe = "uninitialized", Hwe = "The multiplicity constraint is violated", Iwe = "org.eclipse.emf.ecore.xml.type", Jwe = "ProcessingInstruction", Kwe = "SimpleAnyType", Lwe = "XMLTypeDocumentRoot", Mwe = "org.eclipse.emf.ecore.xml.type.impl", Nwe = "INF", Owe = "processing", Pwe = "ENTITIES_._base", Qwe = "minLength", Rwe = "ENTITY", Swe = "NCName", Twe = "IDREFS_._base", Uwe = "integer", Vwe = "token", Wwe = "pattern", Xwe = "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*", Ywe = "\\i\\c*", Zwe = "[\\i-[:]][\\c-[:]]*", $we = "nonPositiveInteger", _we = "maxInclusive", axe = "NMTOKEN", bxe = "NMTOKENS_._base", cxe = "nonNegativeInteger", dxe = "minInclusive", exe = "normalizedString", fxe = "unsignedByte", gxe = "unsignedInt", hxe = "18446744073709551615", ixe = "unsignedShort", jxe = "processingInstruction", kxe = "org.eclipse.emf.ecore.xml.type.internal", lxe = 1114111, mxe = "Internal Error: shorthands: \\u", nxe = "xml:isDigit", oxe = "xml:isWord", pxe = "xml:isSpace", qxe = "xml:isNameChar", rxe = "xml:isInitialNameChar", sxe = "09٠٩۰۹०९০৯੦੯૦૯୦୯௧௯౦౯೦೯൦൯๐๙໐໙༠༩", txe = "AZazÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁΆΆΈΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆאתװײءغفيٱڷںھۀێېۓەەۥۦअहऽऽक़ॡঅঌএঐওনপরললশহড়ঢ়য়ৡৰৱਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹਖ਼ੜਫ਼ਫ਼ੲੴઅઋઍઍએઑઓનપરલળવહઽઽૠૠଅଌଏଐଓନପରଲଳଶହଽଽଡ଼ଢ଼ୟୡஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹఅఌఎఐఒనపళవహౠౡಅಌಎಐಒನಪಳವಹೞೞೠೡഅഌഎഐഒനപഹൠൡกฮะะาำเๅກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະະາຳຽຽເໄཀཇཉཀྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼΩΩKÅ℮℮ↀↂ〇〇〡〩ぁゔァヺㄅㄬ一龥가힣", uxe = "Private Use", vxe = "ASSIGNED", wxe = "\0€ÿĀſƀɏɐʯʰ˿̀ͯͰϿЀӿ԰֏֐׿؀ۿ܀ݏހ޿ऀॿঀ৿਀੿઀૿଀୿஀௿ఀ౿ಀ೿ഀൿ඀෿฀๿຀໿ༀ࿿က႟Ⴀჿᄀᇿሀ፿Ꭰ᏿᐀ᙿ ᚟ᚠ᛿ក៿᠀᢯Ḁỿἀ῿ ⁰₟₠⃏⃐⃿℀⅏⅐↏←⇿∀⋿⌀⏿␀␿⑀⑟①⓿─╿▀▟■◿☀⛿✀➿⠀⣿⺀⻿⼀⿟⿰⿿ 〿぀ゟ゠ヿ㄀ㄯ㄰㆏㆐㆟ㆠㆿ㈀㋿㌀㏿㐀䶵一鿿ꀀ꒏꒐꓏가힣豈﫿ffﭏﭐ﷿︠︯︰﹏﹐﹯ﹰ﻾\uFEFF\uFEFF＀￯", xxe = "UNASSIGNED", yxe = { 3: 1, 117: 1 }, zxe = "org.eclipse.emf.ecore.xml.type.util", Axe = { 3: 1, 4: 1, 5: 1, 368: 1 }, Bxe = "org.eclipse.xtext.xbase.lib", Cxe = "Cannot add elements to a Range", Dxe = "Cannot set elements in a Range", Exe = "Cannot remove elements from a Range", Fxe = "locale", Gxe = "default", Hxe = "user.agent"; + var _2, _bb, Wbb; + $wnd.goog = $wnd.goog || {}; + $wnd.goog.global = $wnd.goog.global || $wnd; + acb(); + bcb(1, null, {}, nb); + _2.Fb = function ob(a) { + return mb(this, a); + }; + _2.Gb = function qb() { + return this.gm; + }; + _2.Hb = function sb() { + return FCb(this); + }; + _2.Ib = function ub() { + var a; + return hdb(rb(this)) + "@" + (a = tb(this) >>> 0, a.toString(16)); + }; + _2.equals = function(a) { + return this.Fb(a); + }; + _2.hashCode = function() { + return this.Hb(); + }; + _2.toString = function() { + return this.Ib(); + }; + var xD, yD, zD; + bcb(290, 1, { 290: 1, 2026: 1 }, jdb); + _2.le = function kdb(a) { + var b; + b = new jdb(); + b.i = 4; + a > 1 ? b.c = rdb(this, a - 1) : b.c = this; + return b; + }; + _2.me = function qdb() { + fdb(this); + return this.b; + }; + _2.ne = function sdb() { + return hdb(this); + }; + _2.oe = function udb() { + return fdb(this), this.k; + }; + _2.pe = function wdb() { + return (this.i & 4) != 0; + }; + _2.qe = function xdb() { + return (this.i & 1) != 0; + }; + _2.Ib = function Adb() { + return idb(this); + }; + _2.i = 0; + var SI = mdb(Phe, "Object", 1); + var AI = mdb(Phe, "Class", 290); + bcb(1998, 1, Qhe); + mdb(Rhe, "Optional", 1998); + bcb(1170, 1998, Qhe, xb); + _2.Fb = function yb(a) { + return a === this; + }; + _2.Hb = function zb() { + return 2040732332; + }; + _2.Ib = function Ab() { + return "Optional.absent()"; + }; + _2.Jb = function Bb(a) { + Qb(a); + return wb(), vb; + }; + var vb; + mdb(Rhe, "Absent", 1170); + bcb(628, 1, {}, Gb); + mdb(Rhe, "Joiner", 628); + var _D = odb(Rhe, "Predicate"); + bcb(582, 1, { 169: 1, 582: 1, 3: 1, 45: 1 }, Yb); + _2.Mb = function ac(a) { + return Xb(this, a); + }; + _2.Lb = function Zb(a) { + return Xb(this, a); + }; + _2.Fb = function $b(a) { + var b; + if (JD(a, 582)) { + b = BD(a, 582); + return At(this.a, b.a); + } + return false; + }; + _2.Hb = function _b() { + return qmb(this.a) + 306654252; + }; + _2.Ib = function bc() { + return Wb(this.a); + }; + mdb(Rhe, "Predicates/AndPredicate", 582); + bcb(408, 1998, { 408: 1, 3: 1 }, cc); + _2.Fb = function dc(a) { + var b; + if (JD(a, 408)) { + b = BD(a, 408); + return pb(this.a, b.a); + } + return false; + }; + _2.Hb = function ec() { + return 1502476572 + tb(this.a); + }; + _2.Ib = function fc() { + return Whe + this.a + ")"; + }; + _2.Jb = function gc(a) { + return new cc(Rb(a.Kb(this.a), "the Function passed to Optional.transform() must not return null.")); + }; + mdb(Rhe, "Present", 408); + bcb(198, 1, Yhe); + _2.Nb = function kc(a) { + Rrb(this, a); + }; + _2.Qb = function lc() { + jc(); + }; + mdb(Zhe, "UnmodifiableIterator", 198); + bcb(1978, 198, $he); + _2.Qb = function nc() { + jc(); + }; + _2.Rb = function mc(a) { + throw vbb(new bgb()); + }; + _2.Wb = function oc(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "UnmodifiableListIterator", 1978); + bcb(386, 1978, $he); + _2.Ob = function rc() { + return this.c < this.d; + }; + _2.Sb = function sc() { + return this.c > 0; + }; + _2.Pb = function tc() { + if (this.c >= this.d) { + throw vbb(new utb()); + } + return this.Xb(this.c++); + }; + _2.Tb = function uc() { + return this.c; + }; + _2.Ub = function vc() { + if (this.c <= 0) { + throw vbb(new utb()); + } + return this.Xb(--this.c); + }; + _2.Vb = function wc() { + return this.c - 1; + }; + _2.c = 0; + _2.d = 0; + mdb(Zhe, "AbstractIndexedListIterator", 386); + bcb(699, 198, Yhe); + _2.Ob = function Ac() { + return xc(this); + }; + _2.Pb = function Bc() { + return yc(this); + }; + _2.e = 1; + mdb(Zhe, "AbstractIterator", 699); + bcb(1986, 1, { 224: 1 }); + _2.Zb = function Hc() { + var a; + return a = this.f, !a ? this.f = this.ac() : a; + }; + _2.Fb = function Ic(a) { + return hw(this, a); + }; + _2.Hb = function Jc() { + return tb(this.Zb()); + }; + _2.dc = function Kc() { + return this.gc() == 0; + }; + _2.ec = function Lc() { + return Ec(this); + }; + _2.Ib = function Mc() { + return fcb(this.Zb()); + }; + mdb(Zhe, "AbstractMultimap", 1986); + bcb(726, 1986, _he); + _2.$b = function Xc() { + Nc(this); + }; + _2._b = function Yc(a) { + return Oc(this, a); + }; + _2.ac = function Zc() { + return new ne(this, this.c); + }; + _2.ic = function $c(a) { + return this.hc(); + }; + _2.bc = function _c() { + return new zf(this, this.c); + }; + _2.jc = function ad() { + return this.mc(this.hc()); + }; + _2.kc = function bd() { + return new Hd(this); + }; + _2.lc = function cd() { + return Yj(this.c.vc().Nc(), new $g(), 64, this.d); + }; + _2.cc = function dd(a) { + return Qc(this, a); + }; + _2.fc = function gd(a) { + return Sc(this, a); + }; + _2.gc = function hd() { + return this.d; + }; + _2.mc = function jd(a) { + return mmb(), new lnb(a); + }; + _2.nc = function kd() { + return new Dd(this); + }; + _2.oc = function ld() { + return Yj(this.c.Cc().Nc(), new Fd(), 64, this.d); + }; + _2.pc = function md(a, b) { + return new dg(this, a, b, null); + }; + _2.d = 0; + mdb(Zhe, "AbstractMapBasedMultimap", 726); + bcb(1631, 726, _he); + _2.hc = function pd() { + return new Skb(this.a); + }; + _2.jc = function qd() { + return mmb(), mmb(), jmb; + }; + _2.cc = function sd(a) { + return BD(Qc(this, a), 15); + }; + _2.fc = function ud(a) { + return BD(Sc(this, a), 15); + }; + _2.Zb = function od() { + return nd(this); + }; + _2.Fb = function rd(a) { + return hw(this, a); + }; + _2.qc = function td(a) { + return BD(Qc(this, a), 15); + }; + _2.rc = function vd(a) { + return BD(Sc(this, a), 15); + }; + _2.mc = function wd(a) { + return vmb(BD(a, 15)); + }; + _2.pc = function xd(a, b) { + return Vc(this, a, BD(b, 15), null); + }; + mdb(Zhe, "AbstractListMultimap", 1631); + bcb(732, 1, aie); + _2.Nb = function zd(a) { + Rrb(this, a); + }; + _2.Ob = function Ad() { + return this.c.Ob() || this.e.Ob(); + }; + _2.Pb = function Bd() { + var a; + if (!this.e.Ob()) { + a = BD(this.c.Pb(), 42); + this.b = a.cd(); + this.a = BD(a.dd(), 14); + this.e = this.a.Kc(); + } + return this.sc(this.b, this.e.Pb()); + }; + _2.Qb = function Cd() { + this.e.Qb(); + this.a.dc() && this.c.Qb(); + --this.d.d; + }; + mdb(Zhe, "AbstractMapBasedMultimap/Itr", 732); + bcb(1099, 732, aie, Dd); + _2.sc = function Ed(a, b) { + return b; + }; + mdb(Zhe, "AbstractMapBasedMultimap/1", 1099); + bcb(1100, 1, {}, Fd); + _2.Kb = function Gd(a) { + return BD(a, 14).Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/1methodref$spliterator$Type", 1100); + bcb(1101, 732, aie, Hd); + _2.sc = function Id(a, b) { + return new Wo(a, b); + }; + mdb(Zhe, "AbstractMapBasedMultimap/2", 1101); + var DK = odb(bie, "Map"); + bcb(1967, 1, cie); + _2.wc = function Td(a) { + stb(this, a); + }; + _2.yc = function $d(a, b, c2) { + return ttb(this, a, b, c2); + }; + _2.$b = function Od() { + this.vc().$b(); + }; + _2.tc = function Pd(a) { + return Jd(this, a); + }; + _2._b = function Qd(a) { + return !!Kd(this, a, false); + }; + _2.uc = function Rd(a) { + var b, c2, d; + for (c2 = this.vc().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 42); + d = b.dd(); + if (PD(a) === PD(d) || a != null && pb(a, d)) { + return true; + } + } + return false; + }; + _2.Fb = function Sd(a) { + var b, c2, d; + if (a === this) { + return true; + } + if (!JD(a, 83)) { + return false; + } + d = BD(a, 83); + if (this.gc() != d.gc()) { + return false; + } + for (c2 = d.vc().Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 42); + if (!this.tc(b)) { + return false; + } + } + return true; + }; + _2.xc = function Ud(a) { + return Wd(Kd(this, a, false)); + }; + _2.Hb = function Xd() { + return pmb(this.vc()); + }; + _2.dc = function Yd() { + return this.gc() == 0; + }; + _2.ec = function Zd() { + return new Pib(this); + }; + _2.zc = function _d(a, b) { + throw vbb(new cgb("Put not supported on this map")); + }; + _2.Ac = function ae(a) { + Ld(this, a); + }; + _2.Bc = function be(a) { + return Wd(Kd(this, a, true)); + }; + _2.gc = function ce() { + return this.vc().gc(); + }; + _2.Ib = function de() { + return Md(this); + }; + _2.Cc = function ee() { + return new $ib(this); + }; + mdb(bie, "AbstractMap", 1967); + bcb(1987, 1967, cie); + _2.bc = function ge() { + return new rf(this); + }; + _2.vc = function he() { + return fe(this); + }; + _2.ec = function ie() { + var a; + a = this.g; + return !a ? this.g = this.bc() : a; + }; + _2.Cc = function je() { + var a; + a = this.i; + return !a ? this.i = new Zv(this) : a; + }; + mdb(Zhe, "Maps/ViewCachingAbstractMap", 1987); + bcb(389, 1987, cie, ne); + _2.xc = function se(a) { + return ke(this, a); + }; + _2.Bc = function ve(a) { + return le(this, a); + }; + _2.$b = function oe() { + this.d == this.e.c ? this.e.$b() : ir(new mf(this)); + }; + _2._b = function pe(a) { + return Gv(this.d, a); + }; + _2.Ec = function qe() { + return new df(this); + }; + _2.Dc = function() { + return this.Ec(); + }; + _2.Fb = function re2(a) { + return this === a || pb(this.d, a); + }; + _2.Hb = function te() { + return tb(this.d); + }; + _2.ec = function ue() { + return this.e.ec(); + }; + _2.gc = function we() { + return this.d.gc(); + }; + _2.Ib = function xe() { + return fcb(this.d); + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap", 389); + var KI = odb(Phe, "Iterable"); + bcb(28, 1, die); + _2.Jc = function Le(a) { + reb(this, a); + }; + _2.Lc = function Ne() { + return this.Oc(); + }; + _2.Nc = function Pe() { + return new Kub(this, 0); + }; + _2.Oc = function Qe() { + return new YAb(null, this.Nc()); + }; + _2.Fc = function Ge(a) { + throw vbb(new cgb("Add not supported on this collection")); + }; + _2.Gc = function He(a) { + return ye(this, a); + }; + _2.$b = function Ie() { + Ae(this); + }; + _2.Hc = function Je(a) { + return ze(this, a, false); + }; + _2.Ic = function Ke(a) { + return Be(this, a); + }; + _2.dc = function Me() { + return this.gc() == 0; + }; + _2.Mc = function Oe(a) { + return ze(this, a, true); + }; + _2.Pc = function Re() { + return De(this); + }; + _2.Qc = function Se(a) { + return Ee(this, a); + }; + _2.Ib = function Te() { + return Fe(this); + }; + mdb(bie, "AbstractCollection", 28); + var LK = odb(bie, "Set"); + bcb(eie, 28, fie); + _2.Nc = function Ye() { + return new Kub(this, 1); + }; + _2.Fb = function We(a) { + return Ue(this, a); + }; + _2.Hb = function Xe() { + return pmb(this); + }; + mdb(bie, "AbstractSet", eie); + bcb(1970, eie, fie); + mdb(Zhe, "Sets/ImprovedAbstractSet", 1970); + bcb(1971, 1970, fie); + _2.$b = function $e() { + this.Rc().$b(); + }; + _2.Hc = function _e(a) { + return Ze(this, a); + }; + _2.dc = function af() { + return this.Rc().dc(); + }; + _2.Mc = function bf(a) { + var b; + if (this.Hc(a)) { + b = BD(a, 42); + return this.Rc().ec().Mc(b.cd()); + } + return false; + }; + _2.gc = function cf() { + return this.Rc().gc(); + }; + mdb(Zhe, "Maps/EntrySet", 1971); + bcb(1097, 1971, fie, df); + _2.Hc = function ef(a) { + return Ck(this.a.d.vc(), a); + }; + _2.Kc = function ff() { + return new mf(this.a); + }; + _2.Rc = function gf() { + return this.a; + }; + _2.Mc = function hf(a) { + var b; + if (!Ck(this.a.d.vc(), a)) { + return false; + } + b = BD(a, 42); + Tc(this.a.e, b.cd()); + return true; + }; + _2.Nc = function jf() { + return $j(this.a.d.vc().Nc(), new kf(this.a)); + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap/AsMapEntries", 1097); + bcb(1098, 1, {}, kf); + _2.Kb = function lf(a) { + return me(this.a, BD(a, 42)); + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type", 1098); + bcb(730, 1, aie, mf); + _2.Nb = function nf(a) { + Rrb(this, a); + }; + _2.Pb = function pf() { + var a; + return a = BD(this.b.Pb(), 42), this.a = BD(a.dd(), 14), me(this.c, a); + }; + _2.Ob = function of() { + return this.b.Ob(); + }; + _2.Qb = function qf() { + Vb(!!this.a); + this.b.Qb(); + this.c.e.d -= this.a.gc(); + this.a.$b(); + this.a = null; + }; + mdb(Zhe, "AbstractMapBasedMultimap/AsMap/AsMapIterator", 730); + bcb(532, 1970, fie, rf); + _2.$b = function sf() { + this.b.$b(); + }; + _2.Hc = function tf(a) { + return this.b._b(a); + }; + _2.Jc = function uf(a) { + Qb(a); + this.b.wc(new Xv(a)); + }; + _2.dc = function vf() { + return this.b.dc(); + }; + _2.Kc = function wf() { + return new Mv(this.b.vc().Kc()); + }; + _2.Mc = function xf(a) { + if (this.b._b(a)) { + this.b.Bc(a); + return true; + } + return false; + }; + _2.gc = function yf() { + return this.b.gc(); + }; + mdb(Zhe, "Maps/KeySet", 532); + bcb(318, 532, fie, zf); + _2.$b = function Af() { + var a; + ir((a = this.b.vc().Kc(), new Hf(this, a))); + }; + _2.Ic = function Bf(a) { + return this.b.ec().Ic(a); + }; + _2.Fb = function Cf(a) { + return this === a || pb(this.b.ec(), a); + }; + _2.Hb = function Df() { + return tb(this.b.ec()); + }; + _2.Kc = function Ef() { + var a; + return a = this.b.vc().Kc(), new Hf(this, a); + }; + _2.Mc = function Ff(a) { + var b, c2; + c2 = 0; + b = BD(this.b.Bc(a), 14); + if (b) { + c2 = b.gc(); + b.$b(); + this.a.d -= c2; + } + return c2 > 0; + }; + _2.Nc = function Gf() { + return this.b.ec().Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/KeySet", 318); + bcb(731, 1, aie, Hf); + _2.Nb = function If(a) { + Rrb(this, a); + }; + _2.Ob = function Jf() { + return this.c.Ob(); + }; + _2.Pb = function Kf() { + this.a = BD(this.c.Pb(), 42); + return this.a.cd(); + }; + _2.Qb = function Lf() { + var a; + Vb(!!this.a); + a = BD(this.a.dd(), 14); + this.c.Qb(); + this.b.a.d -= a.gc(); + a.$b(); + this.a = null; + }; + mdb(Zhe, "AbstractMapBasedMultimap/KeySet/1", 731); + bcb(491, 389, { 83: 1, 161: 1 }, Mf); + _2.bc = function Nf() { + return this.Sc(); + }; + _2.ec = function Pf() { + return this.Tc(); + }; + _2.Sc = function Of() { + return new Yf(this.c, this.Uc()); + }; + _2.Tc = function Qf() { + var a; + return a = this.b, !a ? this.b = this.Sc() : a; + }; + _2.Uc = function Rf() { + return BD(this.d, 161); + }; + mdb(Zhe, "AbstractMapBasedMultimap/SortedAsMap", 491); + bcb(542, 491, gie, Sf); + _2.bc = function Tf() { + return new $f(this.a, BD(BD(this.d, 161), 171)); + }; + _2.Sc = function Uf() { + return new $f(this.a, BD(BD(this.d, 161), 171)); + }; + _2.ec = function Vf() { + var a; + return a = this.b, BD(!a ? this.b = new $f(this.a, BD(BD(this.d, 161), 171)) : a, 271); + }; + _2.Tc = function Wf() { + var a; + return a = this.b, BD(!a ? this.b = new $f(this.a, BD(BD(this.d, 161), 171)) : a, 271); + }; + _2.Uc = function Xf() { + return BD(BD(this.d, 161), 171); + }; + mdb(Zhe, "AbstractMapBasedMultimap/NavigableAsMap", 542); + bcb(490, 318, hie, Yf); + _2.Nc = function Zf() { + return this.b.ec().Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/SortedKeySet", 490); + bcb(388, 490, iie, $f); + mdb(Zhe, "AbstractMapBasedMultimap/NavigableKeySet", 388); + bcb(541, 28, die, dg); + _2.Fc = function eg(a) { + var b, c2; + ag(this); + c2 = this.d.dc(); + b = this.d.Fc(a); + if (b) { + ++this.f.d; + c2 && _f(this); + } + return b; + }; + _2.Gc = function fg(a) { + var b, c2, d; + if (a.dc()) { + return false; + } + d = (ag(this), this.d.gc()); + b = this.d.Gc(a); + if (b) { + c2 = this.d.gc(); + this.f.d += c2 - d; + d == 0 && _f(this); + } + return b; + }; + _2.$b = function gg() { + var a; + a = (ag(this), this.d.gc()); + if (a == 0) { + return; + } + this.d.$b(); + this.f.d -= a; + bg(this); + }; + _2.Hc = function hg(a) { + ag(this); + return this.d.Hc(a); + }; + _2.Ic = function ig(a) { + ag(this); + return this.d.Ic(a); + }; + _2.Fb = function jg(a) { + if (a === this) { + return true; + } + ag(this); + return pb(this.d, a); + }; + _2.Hb = function kg() { + ag(this); + return tb(this.d); + }; + _2.Kc = function lg() { + ag(this); + return new Gg(this); + }; + _2.Mc = function mg(a) { + var b; + ag(this); + b = this.d.Mc(a); + if (b) { + --this.f.d; + bg(this); + } + return b; + }; + _2.gc = function ng() { + return cg(this); + }; + _2.Nc = function og() { + return ag(this), this.d.Nc(); + }; + _2.Ib = function pg() { + ag(this); + return fcb(this.d); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedCollection", 541); + var yK = odb(bie, "List"); + bcb(728, 541, { 20: 1, 28: 1, 14: 1, 15: 1 }, qg); + _2.ad = function zg(a) { + ktb(this, a); + }; + _2.Nc = function Ag() { + return ag(this), this.d.Nc(); + }; + _2.Vc = function rg(a, b) { + var c2; + ag(this); + c2 = this.d.dc(); + BD(this.d, 15).Vc(a, b); + ++this.a.d; + c2 && _f(this); + }; + _2.Wc = function sg(a, b) { + var c2, d, e; + if (b.dc()) { + return false; + } + e = (ag(this), this.d.gc()); + c2 = BD(this.d, 15).Wc(a, b); + if (c2) { + d = this.d.gc(); + this.a.d += d - e; + e == 0 && _f(this); + } + return c2; + }; + _2.Xb = function tg(a) { + ag(this); + return BD(this.d, 15).Xb(a); + }; + _2.Xc = function ug(a) { + ag(this); + return BD(this.d, 15).Xc(a); + }; + _2.Yc = function vg() { + ag(this); + return new Mg(this); + }; + _2.Zc = function wg(a) { + ag(this); + return new Ng(this, a); + }; + _2.$c = function xg(a) { + var b; + ag(this); + b = BD(this.d, 15).$c(a); + --this.a.d; + bg(this); + return b; + }; + _2._c = function yg(a, b) { + ag(this); + return BD(this.d, 15)._c(a, b); + }; + _2.bd = function Bg(a, b) { + ag(this); + return Vc(this.a, this.e, BD(this.d, 15).bd(a, b), !this.b ? this : this.b); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedList", 728); + bcb(1096, 728, { 20: 1, 28: 1, 14: 1, 15: 1, 54: 1 }, Cg); + mdb(Zhe, "AbstractMapBasedMultimap/RandomAccessWrappedList", 1096); + bcb(620, 1, aie, Gg); + _2.Nb = function Ig(a) { + Rrb(this, a); + }; + _2.Ob = function Jg() { + Fg(this); + return this.b.Ob(); + }; + _2.Pb = function Kg() { + Fg(this); + return this.b.Pb(); + }; + _2.Qb = function Lg() { + Eg(this); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedCollection/WrappedIterator", 620); + bcb(729, 620, jie, Mg, Ng); + _2.Qb = function Tg() { + Eg(this); + }; + _2.Rb = function Og(a) { + var b; + b = cg(this.a) == 0; + (Fg(this), BD(this.b, 125)).Rb(a); + ++this.a.a.d; + b && _f(this.a); + }; + _2.Sb = function Pg() { + return (Fg(this), BD(this.b, 125)).Sb(); + }; + _2.Tb = function Qg() { + return (Fg(this), BD(this.b, 125)).Tb(); + }; + _2.Ub = function Rg() { + return (Fg(this), BD(this.b, 125)).Ub(); + }; + _2.Vb = function Sg() { + return (Fg(this), BD(this.b, 125)).Vb(); + }; + _2.Wb = function Ug(a) { + (Fg(this), BD(this.b, 125)).Wb(a); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedList/WrappedListIterator", 729); + bcb(727, 541, hie, Vg); + _2.Nc = function Wg() { + return ag(this), this.d.Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedSortedSet", 727); + bcb(1095, 727, iie, Xg); + mdb(Zhe, "AbstractMapBasedMultimap/WrappedNavigableSet", 1095); + bcb(1094, 541, fie, Yg); + _2.Nc = function Zg() { + return ag(this), this.d.Nc(); + }; + mdb(Zhe, "AbstractMapBasedMultimap/WrappedSet", 1094); + bcb(1103, 1, {}, $g); + _2.Kb = function _g(a) { + return fd(BD(a, 42)); + }; + mdb(Zhe, "AbstractMapBasedMultimap/lambda$1$Type", 1103); + bcb(1102, 1, {}, ah); + _2.Kb = function bh(a) { + return new Wo(this.a, a); + }; + mdb(Zhe, "AbstractMapBasedMultimap/lambda$2$Type", 1102); + var CK = odb(bie, "Map/Entry"); + bcb(345, 1, kie); + _2.Fb = function dh(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Hb(this.cd(), b.cd()) && Hb(this.dd(), b.dd()); + } + return false; + }; + _2.Hb = function eh() { + var a, b; + a = this.cd(); + b = this.dd(); + return (a == null ? 0 : tb(a)) ^ (b == null ? 0 : tb(b)); + }; + _2.ed = function fh(a) { + throw vbb(new bgb()); + }; + _2.Ib = function gh() { + return this.cd() + "=" + this.dd(); + }; + mdb(Zhe, lie, 345); + bcb(1988, 28, die); + _2.$b = function hh() { + this.fd().$b(); + }; + _2.Hc = function ih(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Cc(this.fd(), b.cd(), b.dd()); + } + return false; + }; + _2.Mc = function jh(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Gc(this.fd(), b.cd(), b.dd()); + } + return false; + }; + _2.gc = function kh() { + return this.fd().d; + }; + mdb(Zhe, "Multimaps/Entries", 1988); + bcb(733, 1988, die, lh); + _2.Kc = function mh() { + return this.a.kc(); + }; + _2.fd = function nh() { + return this.a; + }; + _2.Nc = function oh() { + return this.a.lc(); + }; + mdb(Zhe, "AbstractMultimap/Entries", 733); + bcb(734, 733, fie, ph); + _2.Nc = function sh() { + return this.a.lc(); + }; + _2.Fb = function qh(a) { + return Ax(this, a); + }; + _2.Hb = function rh() { + return Bx(this); + }; + mdb(Zhe, "AbstractMultimap/EntrySet", 734); + bcb(735, 28, die, th); + _2.$b = function uh() { + this.a.$b(); + }; + _2.Hc = function vh(a) { + return Dc(this.a, a); + }; + _2.Kc = function wh() { + return this.a.nc(); + }; + _2.gc = function xh() { + return this.a.d; + }; + _2.Nc = function yh() { + return this.a.oc(); + }; + mdb(Zhe, "AbstractMultimap/Values", 735); + bcb(1989, 28, { 835: 1, 20: 1, 28: 1, 14: 1 }); + _2.Jc = function Gh(a) { + Qb(a); + Ah(this).Jc(new Xw(a)); + }; + _2.Nc = function Kh() { + var a; + return a = Ah(this).Nc(), Yj(a, new cx(), 64 | a.qd() & 1296, this.a.d); + }; + _2.Fc = function Ch(a) { + zh(); + return true; + }; + _2.Gc = function Dh(a) { + return Qb(this), Qb(a), JD(a, 543) ? Zw(BD(a, 835)) : !a.dc() && fr(this, a.Kc()); + }; + _2.Hc = function Eh(a) { + var b; + return b = BD(Hv(nd(this.a), a), 14), (!b ? 0 : b.gc()) > 0; + }; + _2.Fb = function Fh(a) { + return $w(this, a); + }; + _2.Hb = function Hh() { + return tb(Ah(this)); + }; + _2.dc = function Ih() { + return Ah(this).dc(); + }; + _2.Mc = function Jh(a) { + return Bw(this, a, 1) > 0; + }; + _2.Ib = function Lh() { + return fcb(Ah(this)); + }; + mdb(Zhe, "AbstractMultiset", 1989); + bcb(1991, 1970, fie); + _2.$b = function Mh() { + Nc(this.a.a); + }; + _2.Hc = function Nh(a) { + var b, c2; + if (JD(a, 492)) { + c2 = BD(a, 416); + if (BD(c2.a.dd(), 14).gc() <= 0) { + return false; + } + b = Aw(this.a, c2.a.cd()); + return b == BD(c2.a.dd(), 14).gc(); + } + return false; + }; + _2.Mc = function Oh(a) { + var b, c2, d, e; + if (JD(a, 492)) { + c2 = BD(a, 416); + b = c2.a.cd(); + d = BD(c2.a.dd(), 14).gc(); + if (d != 0) { + e = this.a; + return ax(e, b, d); + } + } + return false; + }; + mdb(Zhe, "Multisets/EntrySet", 1991); + bcb(1109, 1991, fie, Ph); + _2.Kc = function Qh() { + return new Lw(fe(nd(this.a.a)).Kc()); + }; + _2.gc = function Rh() { + return nd(this.a.a).gc(); + }; + mdb(Zhe, "AbstractMultiset/EntrySet", 1109); + bcb(619, 726, _he); + _2.hc = function Uh() { + return this.gd(); + }; + _2.jc = function Vh() { + return this.hd(); + }; + _2.cc = function Yh(a) { + return this.jd(a); + }; + _2.fc = function $h(a) { + return this.kd(a); + }; + _2.Zb = function Th() { + var a; + return a = this.f, !a ? this.f = this.ac() : a; + }; + _2.hd = function Wh() { + return mmb(), mmb(), lmb; + }; + _2.Fb = function Xh(a) { + return hw(this, a); + }; + _2.jd = function Zh(a) { + return BD(Qc(this, a), 21); + }; + _2.kd = function _h(a) { + return BD(Sc(this, a), 21); + }; + _2.mc = function ai(a) { + return mmb(), new zob(BD(a, 21)); + }; + _2.pc = function bi(a, b) { + return new Yg(this, a, BD(b, 21)); + }; + mdb(Zhe, "AbstractSetMultimap", 619); + bcb(1657, 619, _he); + _2.hc = function ei() { + return new Hxb(this.b); + }; + _2.gd = function fi() { + return new Hxb(this.b); + }; + _2.jc = function gi() { + return Ix(new Hxb(this.b)); + }; + _2.hd = function hi() { + return Ix(new Hxb(this.b)); + }; + _2.cc = function ii(a) { + return BD(BD(Qc(this, a), 21), 84); + }; + _2.jd = function ji(a) { + return BD(BD(Qc(this, a), 21), 84); + }; + _2.fc = function ki(a) { + return BD(BD(Sc(this, a), 21), 84); + }; + _2.kd = function li(a) { + return BD(BD(Sc(this, a), 21), 84); + }; + _2.mc = function mi(a) { + return JD(a, 271) ? Ix(BD(a, 271)) : (mmb(), new Zob(BD(a, 84))); + }; + _2.Zb = function di() { + var a; + return a = this.f, !a ? this.f = JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c) : a; + }; + _2.pc = function ni(a, b) { + return JD(b, 271) ? new Xg(this, a, BD(b, 271)) : new Vg(this, a, BD(b, 84)); + }; + mdb(Zhe, "AbstractSortedSetMultimap", 1657); + bcb(1658, 1657, _he); + _2.Zb = function pi2() { + var a; + return a = this.f, BD(BD(!a ? this.f = JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c) : a, 161), 171); + }; + _2.ec = function ri() { + var a; + return a = this.i, BD(BD(!a ? this.i = JD(this.c, 171) ? new $f(this, BD(this.c, 171)) : JD(this.c, 161) ? new Yf(this, BD(this.c, 161)) : new zf(this, this.c) : a, 84), 271); + }; + _2.bc = function qi() { + return JD(this.c, 171) ? new $f(this, BD(this.c, 171)) : JD(this.c, 161) ? new Yf(this, BD(this.c, 161)) : new zf(this, this.c); + }; + mdb(Zhe, "AbstractSortedKeySortedSetMultimap", 1658); + bcb(2010, 1, { 1947: 1 }); + _2.Fb = function si(a) { + return zy(this, a); + }; + _2.Hb = function ti() { + var a; + return pmb((a = this.g, !a ? this.g = new vi(this) : a)); + }; + _2.Ib = function ui() { + var a; + return Md((a = this.f, !a ? this.f = new Rj(this) : a)); + }; + mdb(Zhe, "AbstractTable", 2010); + bcb(665, eie, fie, vi); + _2.$b = function wi() { + Pi(); + }; + _2.Hc = function xi(a) { + var b, c2; + if (JD(a, 468)) { + b = BD(a, 682); + c2 = BD(Hv(Vi(this.a), Em(b.c.e, b.b)), 83); + return !!c2 && Ck(c2.vc(), new Wo(Em(b.c.c, b.a), Mi(b.c, b.b, b.a))); + } + return false; + }; + _2.Kc = function yi() { + return Ni(this.a); + }; + _2.Mc = function zi(a) { + var b, c2; + if (JD(a, 468)) { + b = BD(a, 682); + c2 = BD(Hv(Vi(this.a), Em(b.c.e, b.b)), 83); + return !!c2 && Dk(c2.vc(), new Wo(Em(b.c.c, b.a), Mi(b.c, b.b, b.a))); + } + return false; + }; + _2.gc = function Ai() { + return Xi(this.a); + }; + _2.Nc = function Bi() { + return Oi(this.a); + }; + mdb(Zhe, "AbstractTable/CellSet", 665); + bcb(1928, 28, die, Ci); + _2.$b = function Di() { + Pi(); + }; + _2.Hc = function Ei(a) { + return Qi(this.a, a); + }; + _2.Kc = function Fi() { + return Zi(this.a); + }; + _2.gc = function Gi() { + return Xi(this.a); + }; + _2.Nc = function Hi() { + return $i(this.a); + }; + mdb(Zhe, "AbstractTable/Values", 1928); + bcb(1632, 1631, _he); + mdb(Zhe, "ArrayListMultimapGwtSerializationDependencies", 1632); + bcb(513, 1632, _he, Ji, Ki); + _2.hc = function Li() { + return new Skb(this.a); + }; + _2.a = 0; + mdb(Zhe, "ArrayListMultimap", 513); + bcb(664, 2010, { 664: 1, 1947: 1, 3: 1 }, _i); + mdb(Zhe, "ArrayTable", 664); + bcb(1924, 386, $he, aj); + _2.Xb = function bj(a) { + return new hj(this.a, a); + }; + mdb(Zhe, "ArrayTable/1", 1924); + bcb(1925, 1, {}, cj); + _2.ld = function dj(a) { + return new hj(this.a, a); + }; + mdb(Zhe, "ArrayTable/1methodref$getCell$Type", 1925); + bcb(2011, 1, { 682: 1 }); + _2.Fb = function ej(a) { + var b; + if (a === this) { + return true; + } + if (JD(a, 468)) { + b = BD(a, 682); + return Hb(Em(this.c.e, this.b), Em(b.c.e, b.b)) && Hb(Em(this.c.c, this.a), Em(b.c.c, b.a)) && Hb(Mi(this.c, this.b, this.a), Mi(b.c, b.b, b.a)); + } + return false; + }; + _2.Hb = function fj() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [Em(this.c.e, this.b), Em(this.c.c, this.a), Mi(this.c, this.b, this.a)])); + }; + _2.Ib = function gj() { + return "(" + Em(this.c.e, this.b) + "," + Em(this.c.c, this.a) + ")=" + Mi(this.c, this.b, this.a); + }; + mdb(Zhe, "Tables/AbstractCell", 2011); + bcb(468, 2011, { 468: 1, 682: 1 }, hj); + _2.a = 0; + _2.b = 0; + _2.d = 0; + mdb(Zhe, "ArrayTable/2", 468); + bcb(1927, 1, {}, ij); + _2.ld = function jj(a) { + return Ti(this.a, a); + }; + mdb(Zhe, "ArrayTable/2methodref$getValue$Type", 1927); + bcb(1926, 386, $he, kj); + _2.Xb = function lj(a) { + return Ti(this.a, a); + }; + mdb(Zhe, "ArrayTable/3", 1926); + bcb(1979, 1967, cie); + _2.$b = function nj() { + ir(this.kc()); + }; + _2.vc = function oj() { + return new Sv(this); + }; + _2.lc = function pj() { + return new Mub(this.kc(), this.gc()); + }; + mdb(Zhe, "Maps/IteratorBasedAbstractMap", 1979); + bcb(828, 1979, cie); + _2.$b = function tj() { + throw vbb(new bgb()); + }; + _2._b = function uj(a) { + return sn(this.c, a); + }; + _2.kc = function vj() { + return new Jj(this, this.c.b.c.gc()); + }; + _2.lc = function wj() { + return Zj(this.c.b.c.gc(), 16, new Dj(this)); + }; + _2.xc = function xj(a) { + var b; + b = BD(tn(this.c, a), 19); + return !b ? null : this.nd(b.a); + }; + _2.dc = function yj() { + return this.c.b.c.dc(); + }; + _2.ec = function zj() { + return Xm(this.c); + }; + _2.zc = function Aj(a, b) { + var c2; + c2 = BD(tn(this.c, a), 19); + if (!c2) { + throw vbb(new Wdb(this.md() + " " + a + " not in " + Xm(this.c))); + } + return this.od(c2.a, b); + }; + _2.Bc = function Bj(a) { + throw vbb(new bgb()); + }; + _2.gc = function Cj() { + return this.c.b.c.gc(); + }; + mdb(Zhe, "ArrayTable/ArrayMap", 828); + bcb(1923, 1, {}, Dj); + _2.ld = function Ej(a) { + return qj(this.a, a); + }; + mdb(Zhe, "ArrayTable/ArrayMap/0methodref$getEntry$Type", 1923); + bcb(1921, 345, kie, Fj); + _2.cd = function Gj() { + return rj(this.a, this.b); + }; + _2.dd = function Hj() { + return this.a.nd(this.b); + }; + _2.ed = function Ij(a) { + return this.a.od(this.b, a); + }; + _2.b = 0; + mdb(Zhe, "ArrayTable/ArrayMap/1", 1921); + bcb(1922, 386, $he, Jj); + _2.Xb = function Kj(a) { + return qj(this.a, a); + }; + mdb(Zhe, "ArrayTable/ArrayMap/2", 1922); + bcb(1920, 828, cie, Lj); + _2.md = function Mj() { + return "Column"; + }; + _2.nd = function Nj(a) { + return Mi(this.b, this.a, a); + }; + _2.od = function Oj(a, b) { + return Wi(this.b, this.a, a, b); + }; + _2.a = 0; + mdb(Zhe, "ArrayTable/Row", 1920); + bcb(829, 828, cie, Rj); + _2.nd = function Tj(a) { + return new Lj(this.a, a); + }; + _2.zc = function Uj(a, b) { + return BD(b, 83), Pj(); + }; + _2.od = function Vj(a, b) { + return BD(b, 83), Qj(); + }; + _2.md = function Sj() { + return "Row"; + }; + mdb(Zhe, "ArrayTable/RowMap", 829); + bcb(1120, 1, pie2, _j); + _2.qd = function ak() { + return this.a.qd() & -262; + }; + _2.rd = function bk() { + return this.a.rd(); + }; + _2.Nb = function ck(a) { + this.a.Nb(new gk(a, this.b)); + }; + _2.sd = function dk(a) { + return this.a.sd(new ek(a, this.b)); + }; + mdb(Zhe, "CollectSpliterators/1", 1120); + bcb(1121, 1, qie, ek); + _2.td = function fk(a) { + this.a.td(this.b.Kb(a)); + }; + mdb(Zhe, "CollectSpliterators/1/lambda$0$Type", 1121); + bcb(1122, 1, qie, gk); + _2.td = function hk(a) { + this.a.td(this.b.Kb(a)); + }; + mdb(Zhe, "CollectSpliterators/1/lambda$1$Type", 1122); + bcb(1123, 1, pie2, jk); + _2.qd = function kk() { + return this.a; + }; + _2.rd = function lk() { + !!this.d && (this.b = Deb(this.b, this.d.rd())); + return Deb(this.b, 0); + }; + _2.Nb = function mk(a) { + if (this.d) { + this.d.Nb(a); + this.d = null; + } + this.c.Nb(new rk(this.e, a)); + this.b = 0; + }; + _2.sd = function ok(a) { + while (true) { + if (!!this.d && this.d.sd(a)) { + Kbb(this.b, rie) && (this.b = Qbb(this.b, 1)); + return true; + } else { + this.d = null; + } + if (!this.c.sd(new pk(this, this.e))) { + return false; + } + } + }; + _2.a = 0; + _2.b = 0; + mdb(Zhe, "CollectSpliterators/1FlatMapSpliterator", 1123); + bcb(1124, 1, qie, pk); + _2.td = function qk(a) { + ik(this.a, this.b, a); + }; + mdb(Zhe, "CollectSpliterators/1FlatMapSpliterator/lambda$0$Type", 1124); + bcb(1125, 1, qie, rk); + _2.td = function sk(a) { + nk(this.b, this.a, a); + }; + mdb(Zhe, "CollectSpliterators/1FlatMapSpliterator/lambda$1$Type", 1125); + bcb(1117, 1, pie2, tk); + _2.qd = function uk() { + return 16464 | this.b; + }; + _2.rd = function vk() { + return this.a.rd(); + }; + _2.Nb = function wk(a) { + this.a.xe(new Ak(a, this.c)); + }; + _2.sd = function xk(a) { + return this.a.ye(new yk(a, this.c)); + }; + _2.b = 0; + mdb(Zhe, "CollectSpliterators/1WithCharacteristics", 1117); + bcb(1118, 1, sie, yk); + _2.ud = function zk(a) { + this.a.td(this.b.ld(a)); + }; + mdb(Zhe, "CollectSpliterators/1WithCharacteristics/lambda$0$Type", 1118); + bcb(1119, 1, sie, Ak); + _2.ud = function Bk(a) { + this.a.td(this.b.ld(a)); + }; + mdb(Zhe, "CollectSpliterators/1WithCharacteristics/lambda$1$Type", 1119); + bcb(245, 1, tie); + _2.wd = function Hk(a) { + return this.vd(BD(a, 245)); + }; + _2.vd = function Gk(a) { + var b; + if (a == (_k(), $k)) { + return 1; + } + if (a == (Lk(), Kk)) { + return -1; + } + b = (ex(), Fcb(this.a, a.a)); + if (b != 0) { + return b; + } + return JD(this, 519) == JD(a, 519) ? 0 : JD(this, 519) ? 1 : -1; + }; + _2.zd = function Ik() { + return this.a; + }; + _2.Fb = function Jk(a) { + return Ek(this, a); + }; + mdb(Zhe, "Cut", 245); + bcb(1761, 245, tie, Mk); + _2.vd = function Nk(a) { + return a == this ? 0 : 1; + }; + _2.xd = function Ok(a) { + throw vbb(new xcb()); + }; + _2.yd = function Pk(a) { + a.a += "+∞)"; + }; + _2.zd = function Qk() { + throw vbb(new Zdb(uie)); + }; + _2.Hb = function Rk() { + return Zfb(), kCb(this); + }; + _2.Ad = function Sk(a) { + return false; + }; + _2.Ib = function Tk() { + return "+∞"; + }; + var Kk; + mdb(Zhe, "Cut/AboveAll", 1761); + bcb(519, 245, { 245: 1, 519: 1, 3: 1, 35: 1 }, Uk); + _2.xd = function Vk(a) { + Pfb((a.a += "(", a), this.a); + }; + _2.yd = function Wk(a) { + Kfb(Pfb(a, this.a), 93); + }; + _2.Hb = function Xk() { + return ~tb(this.a); + }; + _2.Ad = function Yk(a) { + return ex(), Fcb(this.a, a) < 0; + }; + _2.Ib = function Zk() { + return "/" + this.a + "\\"; + }; + mdb(Zhe, "Cut/AboveValue", 519); + bcb(1760, 245, tie, al); + _2.vd = function bl(a) { + return a == this ? 0 : -1; + }; + _2.xd = function cl(a) { + a.a += "(-∞"; + }; + _2.yd = function dl(a) { + throw vbb(new xcb()); + }; + _2.zd = function el() { + throw vbb(new Zdb(uie)); + }; + _2.Hb = function fl() { + return Zfb(), kCb(this); + }; + _2.Ad = function gl(a) { + return true; + }; + _2.Ib = function hl() { + return "-∞"; + }; + var $k; + mdb(Zhe, "Cut/BelowAll", 1760); + bcb(1762, 245, tie, il); + _2.xd = function jl(a) { + Pfb((a.a += "[", a), this.a); + }; + _2.yd = function kl(a) { + Kfb(Pfb(a, this.a), 41); + }; + _2.Hb = function ll() { + return tb(this.a); + }; + _2.Ad = function ml(a) { + return ex(), Fcb(this.a, a) <= 0; + }; + _2.Ib = function nl() { + return "\\" + this.a + "/"; + }; + mdb(Zhe, "Cut/BelowValue", 1762); + bcb(537, 1, vie); + _2.Jc = function ql(a) { + reb(this, a); + }; + _2.Ib = function rl() { + return tr(BD(Rb(this, "use Optional.orNull() instead of Optional.or(null)"), 20).Kc()); + }; + mdb(Zhe, "FluentIterable", 537); + bcb(433, 537, vie, sl); + _2.Kc = function tl() { + return new Sr(ur(this.a.Kc(), new Sq())); + }; + mdb(Zhe, "FluentIterable/2", 433); + bcb(1046, 537, vie, vl); + _2.Kc = function wl() { + return ul(this); + }; + mdb(Zhe, "FluentIterable/3", 1046); + bcb(708, 386, $he, xl); + _2.Xb = function yl(a) { + return this.a[a].Kc(); + }; + mdb(Zhe, "FluentIterable/3/1", 708); + bcb(1972, 1, {}); + _2.Ib = function zl() { + return fcb(this.Bd().b); + }; + mdb(Zhe, "ForwardingObject", 1972); + bcb(1973, 1972, wie); + _2.Bd = function Fl() { + return this.Cd(); + }; + _2.Jc = function Gl(a) { + reb(this, a); + }; + _2.Lc = function Jl() { + return this.Oc(); + }; + _2.Nc = function Ml() { + return new Kub(this, 0); + }; + _2.Oc = function Nl() { + return new YAb(null, this.Nc()); + }; + _2.Fc = function Al(a) { + return this.Cd(), enb(); + }; + _2.Gc = function Bl(a) { + return this.Cd(), fnb(); + }; + _2.$b = function Cl() { + this.Cd(), gnb(); + }; + _2.Hc = function Dl(a) { + return this.Cd().Hc(a); + }; + _2.Ic = function El(a) { + return this.Cd().Ic(a); + }; + _2.dc = function Hl() { + return this.Cd().b.dc(); + }; + _2.Kc = function Il() { + return this.Cd().Kc(); + }; + _2.Mc = function Kl(a) { + return this.Cd(), jnb(); + }; + _2.gc = function Ll() { + return this.Cd().b.gc(); + }; + _2.Pc = function Ol() { + return this.Cd().Pc(); + }; + _2.Qc = function Pl(a) { + return this.Cd().Qc(a); + }; + mdb(Zhe, "ForwardingCollection", 1973); + bcb(1980, 28, xie); + _2.Kc = function Xl() { + return this.Ed(); + }; + _2.Fc = function Sl(a) { + throw vbb(new bgb()); + }; + _2.Gc = function Tl(a) { + throw vbb(new bgb()); + }; + _2.$b = function Ul() { + throw vbb(new bgb()); + }; + _2.Hc = function Vl(a) { + return a != null && ze(this, a, false); + }; + _2.Dd = function Wl() { + switch (this.gc()) { + case 0: + return im(), im(), hm; + case 1: + return im(), new my(Qb(this.Ed().Pb())); + default: + return new px(this, this.Pc()); + } + }; + _2.Mc = function Yl(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "ImmutableCollection", 1980); + bcb(712, 1980, xie, Zl); + _2.Kc = function cm() { + return vr(this.a.Kc()); + }; + _2.Hc = function $l(a) { + return a != null && this.a.Hc(a); + }; + _2.Ic = function _l(a) { + return this.a.Ic(a); + }; + _2.dc = function am() { + return this.a.dc(); + }; + _2.Ed = function bm() { + return vr(this.a.Kc()); + }; + _2.gc = function dm() { + return this.a.gc(); + }; + _2.Pc = function em() { + return this.a.Pc(); + }; + _2.Qc = function fm(a) { + return this.a.Qc(a); + }; + _2.Ib = function gm() { + return fcb(this.a); + }; + mdb(Zhe, "ForwardingImmutableCollection", 712); + bcb(152, 1980, yie); + _2.Kc = function sm() { + return this.Ed(); + }; + _2.Yc = function tm() { + return this.Fd(0); + }; + _2.Zc = function vm(a) { + return this.Fd(a); + }; + _2.ad = function zm(a) { + ktb(this, a); + }; + _2.Nc = function Am() { + return new Kub(this, 16); + }; + _2.bd = function Cm(a, b) { + return this.Gd(a, b); + }; + _2.Vc = function lm(a, b) { + throw vbb(new bgb()); + }; + _2.Wc = function mm(a, b) { + throw vbb(new bgb()); + }; + _2.Fb = function om(a) { + return Ju(this, a); + }; + _2.Hb = function pm() { + return Ku(this); + }; + _2.Xc = function qm(a) { + return a == null ? -1 : Lu(this, a); + }; + _2.Ed = function rm() { + return this.Fd(0); + }; + _2.Fd = function um(a) { + return jm(this, a); + }; + _2.$c = function xm(a) { + throw vbb(new bgb()); + }; + _2._c = function ym(a, b) { + throw vbb(new bgb()); + }; + _2.Gd = function Bm(a, b) { + var c2; + return Dm((c2 = new $u(this), new Jib(c2, a, b))); + }; + var hm; + mdb(Zhe, "ImmutableList", 152); + bcb(2006, 152, yie); + _2.Kc = function Nm() { + return vr(this.Hd().Kc()); + }; + _2.bd = function Qm(a, b) { + return Dm(this.Hd().bd(a, b)); + }; + _2.Hc = function Fm(a) { + return a != null && this.Hd().Hc(a); + }; + _2.Ic = function Gm(a) { + return this.Hd().Ic(a); + }; + _2.Fb = function Hm(a) { + return pb(this.Hd(), a); + }; + _2.Xb = function Im(a) { + return Em(this, a); + }; + _2.Hb = function Jm() { + return tb(this.Hd()); + }; + _2.Xc = function Km(a) { + return this.Hd().Xc(a); + }; + _2.dc = function Lm() { + return this.Hd().dc(); + }; + _2.Ed = function Mm() { + return vr(this.Hd().Kc()); + }; + _2.gc = function Om() { + return this.Hd().gc(); + }; + _2.Gd = function Pm(a, b) { + return Dm(this.Hd().bd(a, b)); + }; + _2.Pc = function Rm() { + return this.Hd().Qc(KC(SI, Uhe, 1, this.Hd().gc(), 5, 1)); + }; + _2.Qc = function Sm(a) { + return this.Hd().Qc(a); + }; + _2.Ib = function Tm() { + return fcb(this.Hd()); + }; + mdb(Zhe, "ForwardingImmutableList", 2006); + bcb(714, 1, Aie); + _2.vc = function cn() { + return Wm(this); + }; + _2.wc = function en(a) { + stb(this, a); + }; + _2.ec = function jn() { + return Xm(this); + }; + _2.yc = function kn(a, b, c2) { + return ttb(this, a, b, c2); + }; + _2.Cc = function rn() { + return this.Ld(); + }; + _2.$b = function Zm() { + throw vbb(new bgb()); + }; + _2._b = function $m(a) { + return this.xc(a) != null; + }; + _2.uc = function _m(a) { + return this.Ld().Hc(a); + }; + _2.Jd = function an() { + return new jq(this); + }; + _2.Kd = function bn() { + return new sq(this); + }; + _2.Fb = function dn(a) { + return Dv(this, a); + }; + _2.Hb = function gn() { + return Wm(this).Hb(); + }; + _2.dc = function hn() { + return this.gc() == 0; + }; + _2.zc = function nn(a, b) { + return Ym(); + }; + _2.Bc = function on(a) { + throw vbb(new bgb()); + }; + _2.Ib = function pn() { + return Jv(this); + }; + _2.Ld = function qn() { + if (this.e) { + return this.e; + } + return this.e = this.Kd(); + }; + _2.c = null; + _2.d = null; + _2.e = null; + var Um; + mdb(Zhe, "ImmutableMap", 714); + bcb(715, 714, Aie); + _2._b = function vn(a) { + return sn(this, a); + }; + _2.uc = function wn(a) { + return dob(this.b, a); + }; + _2.Id = function xn() { + return Vn(new Ln(this)); + }; + _2.Jd = function yn() { + return Vn(gob(this.b)); + }; + _2.Kd = function zn() { + return Ql(), new Zl(hob(this.b)); + }; + _2.Fb = function An(a) { + return fob(this.b, a); + }; + _2.xc = function Bn(a) { + return tn(this, a); + }; + _2.Hb = function Cn() { + return tb(this.b.c); + }; + _2.dc = function Dn() { + return this.b.c.dc(); + }; + _2.gc = function En() { + return this.b.c.gc(); + }; + _2.Ib = function Fn() { + return fcb(this.b.c); + }; + mdb(Zhe, "ForwardingImmutableMap", 715); + bcb(1974, 1973, Bie); + _2.Bd = function Gn() { + return this.Md(); + }; + _2.Cd = function Hn() { + return this.Md(); + }; + _2.Nc = function Kn() { + return new Kub(this, 1); + }; + _2.Fb = function In(a) { + return a === this || this.Md().Fb(a); + }; + _2.Hb = function Jn() { + return this.Md().Hb(); + }; + mdb(Zhe, "ForwardingSet", 1974); + bcb(1069, 1974, Bie, Ln); + _2.Bd = function Nn() { + return eob(this.a.b); + }; + _2.Cd = function On() { + return eob(this.a.b); + }; + _2.Hc = function Mn(b) { + if (JD(b, 42) && BD(b, 42).cd() == null) { + return false; + } + try { + return Dob(eob(this.a.b), b); + } catch (a) { + a = ubb(a); + if (JD(a, 205)) { + return false; + } else + throw vbb(a); + } + }; + _2.Md = function Pn() { + return eob(this.a.b); + }; + _2.Qc = function Qn(a) { + var b; + b = Eob(eob(this.a.b), a); + eob(this.a.b).b.gc() < b.length && NC(b, eob(this.a.b).b.gc(), null); + return b; + }; + mdb(Zhe, "ForwardingImmutableMap/1", 1069); + bcb(1981, 1980, Cie); + _2.Kc = function Tn() { + return this.Ed(); + }; + _2.Nc = function Un() { + return new Kub(this, 1); + }; + _2.Fb = function Rn(a) { + return Ax(this, a); + }; + _2.Hb = function Sn() { + return Bx(this); + }; + mdb(Zhe, "ImmutableSet", 1981); + bcb(703, 1981, Cie); + _2.Kc = function ao() { + return vr(new Dnb(this.a.b.Kc())); + }; + _2.Hc = function Xn2(a) { + return a != null && hnb(this.a, a); + }; + _2.Ic = function Yn2(a) { + return inb(this.a, a); + }; + _2.Hb = function Zn2() { + return tb(this.a.b); + }; + _2.dc = function $n() { + return this.a.b.dc(); + }; + _2.Ed = function _n() { + return vr(new Dnb(this.a.b.Kc())); + }; + _2.gc = function bo() { + return this.a.b.gc(); + }; + _2.Pc = function co() { + return this.a.b.Pc(); + }; + _2.Qc = function eo(a) { + return knb(this.a, a); + }; + _2.Ib = function fo() { + return fcb(this.a.b); + }; + mdb(Zhe, "ForwardingImmutableSet", 703); + bcb(1975, 1974, Die); + _2.Bd = function go() { + return this.b; + }; + _2.Cd = function ho() { + return this.b; + }; + _2.Md = function io() { + return this.b; + }; + _2.Nc = function jo() { + return new Rub(this); + }; + mdb(Zhe, "ForwardingSortedSet", 1975); + bcb(533, 1979, Aie, wo); + _2.Ac = function Fo(a) { + Ld(this, a); + }; + _2.Cc = function Io() { + var a; + return a = this.d, new up(!a ? this.d = new ap(this) : a); + }; + _2.$b = function xo() { + ko(this); + }; + _2._b = function yo(a) { + return !!uo(this, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + }; + _2.uc = function zo(a) { + return lo(this, a); + }; + _2.kc = function Ao() { + return new Qo(this, this); + }; + _2.wc = function Bo(a) { + no(this, a); + }; + _2.xc = function Co(a) { + return oo(this, a); + }; + _2.ec = function Do() { + return new Bp(this); + }; + _2.zc = function Eo(a, b) { + return ro(this, a, b); + }; + _2.Bc = function Go(a) { + var b; + b = uo(this, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return null; + } else { + mo(this, b); + b.e = null; + b.c = null; + return b.i; + } + }; + _2.gc = function Ho() { + return this.i; + }; + _2.pd = function Jo() { + var a; + return a = this.d, new up(!a ? this.d = new ap(this) : a); + }; + _2.f = 0; + _2.g = 0; + _2.i = 0; + mdb(Zhe, "HashBiMap", 533); + bcb(534, 1, aie); + _2.Nb = function Mo(a) { + Rrb(this, a); + }; + _2.Ob = function No() { + return Ko(this); + }; + _2.Pb = function Oo() { + var a; + if (!Ko(this)) { + throw vbb(new utb()); + } + a = this.c; + this.c = a.c; + this.f = a; + --this.d; + return this.Nd(a); + }; + _2.Qb = function Po() { + if (this.e.g != this.b) { + throw vbb(new Apb()); + } + Vb(!!this.f); + mo(this.e, this.f); + this.b = this.e.g; + this.f = null; + }; + _2.b = 0; + _2.d = 0; + _2.f = null; + mdb(Zhe, "HashBiMap/Itr", 534); + bcb(1011, 534, aie, Qo); + _2.Nd = function Ro(a) { + return new So(this, a); + }; + mdb(Zhe, "HashBiMap/1", 1011); + bcb(1012, 345, kie, So); + _2.cd = function To() { + return this.a.g; + }; + _2.dd = function Uo() { + return this.a.i; + }; + _2.ed = function Vo(a) { + var b, c2, d; + c2 = this.a.i; + d = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + if (d == this.a.f && (PD(a) === PD(c2) || a != null && pb(a, c2))) { + return a; + } + Nb(!vo(this.b.a, a, d), a); + mo(this.b.a, this.a); + b = new $o(this.a.g, this.a.a, a, d); + po(this.b.a, b, this.a); + this.a.e = null; + this.a.c = null; + this.b.b = this.b.a.g; + this.b.f == this.a && (this.b.f = b); + this.a = b; + return c2; + }; + mdb(Zhe, "HashBiMap/1/MapEntry", 1012); + bcb(238, 345, { 345: 1, 238: 1, 3: 1, 42: 1 }, Wo); + _2.cd = function Xo() { + return this.g; + }; + _2.dd = function Yo() { + return this.i; + }; + _2.ed = function Zo(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "ImmutableEntry", 238); + bcb(317, 238, { 345: 1, 317: 1, 238: 1, 3: 1, 42: 1 }, $o); + _2.a = 0; + _2.f = 0; + var GF = mdb(Zhe, "HashBiMap/BiEntry", 317); + bcb(610, 1979, Aie, ap); + _2.Ac = function jp(a) { + Ld(this, a); + }; + _2.Cc = function mp() { + return new Bp(this.a); + }; + _2.$b = function bp() { + ko(this.a); + }; + _2._b = function cp(a) { + return lo(this.a, a); + }; + _2.kc = function dp() { + return new op(this, this.a); + }; + _2.wc = function ep(a) { + Qb(a); + no(this.a, new zp(a)); + }; + _2.xc = function fp(a) { + return _o(this, a); + }; + _2.ec = function gp() { + return new up(this); + }; + _2.zc = function ip(a, b) { + return so(this.a, a, b, false); + }; + _2.Bc = function kp(a) { + var b; + b = vo(this.a, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return null; + } else { + mo(this.a, b); + b.e = null; + b.c = null; + return b.g; + } + }; + _2.gc = function lp() { + return this.a.i; + }; + _2.pd = function np() { + return new Bp(this.a); + }; + mdb(Zhe, "HashBiMap/Inverse", 610); + bcb(1008, 534, aie, op); + _2.Nd = function pp(a) { + return new qp(this, a); + }; + mdb(Zhe, "HashBiMap/Inverse/1", 1008); + bcb(1009, 345, kie, qp); + _2.cd = function rp() { + return this.a.i; + }; + _2.dd = function sp() { + return this.a.g; + }; + _2.ed = function tp(a) { + var b, c2, d; + d = this.a.g; + b = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + if (b == this.a.a && (PD(a) === PD(d) || a != null && pb(a, d))) { + return a; + } + Nb(!uo(this.b.a.a, a, b), a); + mo(this.b.a.a, this.a); + c2 = new $o(a, b, this.a.i, this.a.f); + this.a = c2; + po(this.b.a.a, c2, null); + this.b.b = this.b.a.a.g; + return d; + }; + mdb(Zhe, "HashBiMap/Inverse/1/InverseEntry", 1009); + bcb(611, 532, fie, up); + _2.Kc = function vp() { + return new xp(this.a.a); + }; + _2.Mc = function wp(a) { + var b; + b = vo(this.a.a, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return false; + } else { + mo(this.a.a, b); + return true; + } + }; + mdb(Zhe, "HashBiMap/Inverse/InverseKeySet", 611); + bcb(1007, 534, aie, xp); + _2.Nd = function yp(a) { + return a.i; + }; + mdb(Zhe, "HashBiMap/Inverse/InverseKeySet/1", 1007); + bcb(1010, 1, {}, zp); + _2.Od = function Ap(a, b) { + hp(this.a, a, b); + }; + mdb(Zhe, "HashBiMap/Inverse/lambda$0$Type", 1010); + bcb(609, 532, fie, Bp); + _2.Kc = function Cp() { + return new Ep(this.a); + }; + _2.Mc = function Dp(a) { + var b; + b = uo(this.a, a, Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15)))); + if (!b) { + return false; + } else { + mo(this.a, b); + b.e = null; + b.c = null; + return true; + } + }; + mdb(Zhe, "HashBiMap/KeySet", 609); + bcb(1006, 534, aie, Ep); + _2.Nd = function Fp(a) { + return a.g; + }; + mdb(Zhe, "HashBiMap/KeySet/1", 1006); + bcb(1093, 619, _he); + mdb(Zhe, "HashMultimapGwtSerializationDependencies", 1093); + bcb(265, 1093, _he, Hp); + _2.hc = function Ip() { + return new Uqb(Cv(this.a)); + }; + _2.gd = function Jp() { + return new Uqb(Cv(this.a)); + }; + _2.a = 2; + mdb(Zhe, "HashMultimap", 265); + bcb(1999, 152, yie); + _2.Hc = function Mp(a) { + return this.Pd().Hc(a); + }; + _2.dc = function Np() { + return this.Pd().dc(); + }; + _2.gc = function Op() { + return this.Pd().gc(); + }; + mdb(Zhe, "ImmutableAsList", 1999); + bcb(1931, 715, Aie); + _2.Ld = function Qp() { + return Ql(), new oy(this.a); + }; + _2.Cc = function Rp() { + return Ql(), new oy(this.a); + }; + _2.pd = function Sp() { + return Ql(), new oy(this.a); + }; + mdb(Zhe, "ImmutableBiMap", 1931); + bcb(1977, 1, {}); + mdb(Zhe, "ImmutableCollection/Builder", 1977); + bcb(1022, 703, Cie, Tp); + mdb(Zhe, "ImmutableEnumSet", 1022); + bcb(969, 386, $he, Vp); + _2.Xb = function Wp(a) { + return this.a.Xb(a); + }; + mdb(Zhe, "ImmutableList/1", 969); + bcb(968, 1977, {}, Xp); + mdb(Zhe, "ImmutableList/Builder", 968); + bcb(614, 198, Yhe, Yp); + _2.Ob = function Zp() { + return this.a.Ob(); + }; + _2.Pb = function $p() { + return BD(this.a.Pb(), 42).cd(); + }; + mdb(Zhe, "ImmutableMap/1", 614); + bcb(1041, 1, {}, _p); + _2.Kb = function aq(a) { + return BD(a, 42).cd(); + }; + mdb(Zhe, "ImmutableMap/2methodref$getKey$Type", 1041); + bcb(1040, 1, {}, cq); + mdb(Zhe, "ImmutableMap/Builder", 1040); + bcb(2e3, 1981, Cie); + _2.Kc = function gq() { + var a; + return a = Wm(this.a).Ed(), new Yp(a); + }; + _2.Dd = function dq() { + return new Fq(this); + }; + _2.Jc = function eq2(a) { + var b, c2; + Qb(a); + c2 = this.gc(); + for (b = 0; b < c2; b++) { + a.td(BD(Rl(Wm(this.a)).Xb(b), 42).cd()); + } + }; + _2.Ed = function fq() { + var a; + return (a = this.c, !a ? this.c = new Fq(this) : a).Ed(); + }; + _2.Nc = function hq() { + return Zj(this.gc(), 1296, new Dq(this)); + }; + mdb(Zhe, "IndexedImmutableSet", 2e3); + bcb(1180, 2e3, Cie, jq); + _2.Kc = function nq() { + var a; + return a = Wm(this.a).Ed(), new Yp(a); + }; + _2.Hc = function kq(a) { + return this.a._b(a); + }; + _2.Jc = function lq(a) { + Qb(a); + stb(this.a, new qq(a)); + }; + _2.Ed = function mq() { + var a; + return a = Wm(this.a).Ed(), new Yp(a); + }; + _2.gc = function oq() { + return this.a.gc(); + }; + _2.Nc = function pq() { + return $j(Wm(this.a).Nc(), new _p()); + }; + mdb(Zhe, "ImmutableMapKeySet", 1180); + bcb(1181, 1, {}, qq); + _2.Od = function rq(a, b) { + Ql(); + this.a.td(a); + }; + mdb(Zhe, "ImmutableMapKeySet/lambda$0$Type", 1181); + bcb(1178, 1980, xie, sq); + _2.Kc = function vq() { + return new Aq(this); + }; + _2.Hc = function tq(a) { + return a != null && jr(new Aq(this), a); + }; + _2.Ed = function uq() { + return new Aq(this); + }; + _2.gc = function wq() { + return this.a.gc(); + }; + _2.Nc = function xq() { + return $j(Wm(this.a).Nc(), new yq()); + }; + mdb(Zhe, "ImmutableMapValues", 1178); + bcb(1179, 1, {}, yq); + _2.Kb = function zq(a) { + return BD(a, 42).dd(); + }; + mdb(Zhe, "ImmutableMapValues/0methodref$getValue$Type", 1179); + bcb(626, 198, Yhe, Aq); + _2.Ob = function Bq() { + return this.a.Ob(); + }; + _2.Pb = function Cq() { + return BD(this.a.Pb(), 42).dd(); + }; + mdb(Zhe, "ImmutableMapValues/1", 626); + bcb(1182, 1, {}, Dq); + _2.ld = function Eq(a) { + return iq(this.a, a); + }; + mdb(Zhe, "IndexedImmutableSet/0methodref$get$Type", 1182); + bcb(752, 1999, yie, Fq); + _2.Pd = function Gq() { + return this.a; + }; + _2.Xb = function Hq(a) { + return iq(this.a, a); + }; + _2.gc = function Iq() { + return this.a.a.gc(); + }; + mdb(Zhe, "IndexedImmutableSet/1", 752); + bcb(44, 1, {}, Sq); + _2.Kb = function Tq(a) { + return BD(a, 20).Kc(); + }; + _2.Fb = function Uq(a) { + return this === a; + }; + mdb(Zhe, "Iterables/10", 44); + bcb(1042, 537, vie, Wq); + _2.Jc = function Xq(a) { + Qb(a); + this.b.Jc(new $q(this.a, a)); + }; + _2.Kc = function Yq() { + return Vq(this); + }; + mdb(Zhe, "Iterables/4", 1042); + bcb(1043, 1, qie, $q); + _2.td = function _q(a) { + Zq(this.b, this.a, a); + }; + mdb(Zhe, "Iterables/4/lambda$0$Type", 1043); + bcb(1044, 537, vie, ar); + _2.Jc = function br(a) { + Qb(a); + reb(this.a, new dr(a, this.b)); + }; + _2.Kc = function cr() { + return ur(new Fyd(this.a), this.b); + }; + mdb(Zhe, "Iterables/5", 1044); + bcb(1045, 1, qie, dr); + _2.td = function er2(a) { + this.a.td(Gfd(a)); + }; + mdb(Zhe, "Iterables/5/lambda$0$Type", 1045); + bcb(1071, 198, Yhe, wr); + _2.Ob = function xr() { + return this.a.Ob(); + }; + _2.Pb = function yr() { + return this.a.Pb(); + }; + mdb(Zhe, "Iterators/1", 1071); + bcb(1072, 699, Yhe, zr); + _2.Yb = function Ar() { + var a; + while (this.b.Ob()) { + a = this.b.Pb(); + if (this.a.Lb(a)) { + return a; + } + } + return this.e = 2, null; + }; + mdb(Zhe, "Iterators/5", 1072); + bcb(487, 1, aie); + _2.Nb = function Cr(a) { + Rrb(this, a); + }; + _2.Ob = function Dr() { + return this.b.Ob(); + }; + _2.Pb = function Er() { + return this.Qd(this.b.Pb()); + }; + _2.Qb = function Fr() { + this.b.Qb(); + }; + mdb(Zhe, "TransformedIterator", 487); + bcb(1073, 487, aie, Gr); + _2.Qd = function Hr(a) { + return this.a.Kb(a); + }; + mdb(Zhe, "Iterators/6", 1073); + bcb(717, 198, Yhe, Ir); + _2.Ob = function Jr() { + return !this.a; + }; + _2.Pb = function Kr() { + if (this.a) { + throw vbb(new utb()); + } + this.a = true; + return this.b; + }; + _2.a = false; + mdb(Zhe, "Iterators/9", 717); + bcb(1070, 386, $he, Nr); + _2.Xb = function Or(a) { + return this.a[this.b + a]; + }; + _2.b = 0; + var Lr; + mdb(Zhe, "Iterators/ArrayItr", 1070); + bcb(39, 1, { 39: 1, 47: 1 }, Sr); + _2.Nb = function Tr(a) { + Rrb(this, a); + }; + _2.Ob = function Ur() { + return Qr(this); + }; + _2.Pb = function Vr() { + return Rr(this); + }; + _2.Qb = function Wr() { + Vb(!!this.c); + this.c.Qb(); + this.c = null; + }; + mdb(Zhe, "Iterators/ConcatenatedIterator", 39); + bcb(22, 1, { 3: 1, 35: 1, 22: 1 }); + _2.wd = function _r(a) { + return Xr(this, BD(a, 22)); + }; + _2.Fb = function bs(a) { + return this === a; + }; + _2.Hb = function cs() { + return FCb(this); + }; + _2.Ib = function ds() { + return Zr(this); + }; + _2.g = 0; + var CI = mdb(Phe, "Enum", 22); + bcb(538, 22, { 538: 1, 3: 1, 35: 1, 22: 1, 47: 1 }, is); + _2.Nb = function js(a) { + Rrb(this, a); + }; + _2.Ob = function ks() { + return false; + }; + _2.Pb = function ls() { + throw vbb(new utb()); + }; + _2.Qb = function ms() { + Vb(false); + }; + var gs; + var yG = ndb(Zhe, "Iterators/EmptyModifiableIterator", 538, CI, os, ns); + var ps; + bcb(1834, 619, _he); + mdb(Zhe, "LinkedHashMultimapGwtSerializationDependencies", 1834); + bcb(1835, 1834, _he, ss); + _2.hc = function us() { + return new Asb(Cv(this.b)); + }; + _2.$b = function ts() { + Nc(this); + As(this.a, this.a); + }; + _2.gd = function vs() { + return new Asb(Cv(this.b)); + }; + _2.ic = function ws(a) { + return new Ss(this, a, this.b); + }; + _2.kc = function xs() { + return new Hs(this); + }; + _2.lc = function ys() { + var a; + return new Kub((a = this.g, BD(!a ? this.g = new ph(this) : a, 21)), 17); + }; + _2.ec = function zs() { + var a; + return a = this.i, !a ? this.i = new zf(this, this.c) : a; + }; + _2.nc = function Cs() { + return new Ov(new Hs(this)); + }; + _2.oc = function Ds() { + var a; + return $j(new Kub((a = this.g, BD(!a ? this.g = new ph(this) : a, 21)), 17), new Es()); + }; + _2.b = 2; + mdb(Zhe, "LinkedHashMultimap", 1835); + bcb(1838, 1, {}, Es); + _2.Kb = function Fs(a) { + return BD(a, 42).dd(); + }; + mdb(Zhe, "LinkedHashMultimap/0methodref$getValue$Type", 1838); + bcb(824, 1, aie, Hs); + _2.Nb = function Is(a) { + Rrb(this, a); + }; + _2.Pb = function Ks() { + return Gs(this); + }; + _2.Ob = function Js() { + return this.a != this.b.a; + }; + _2.Qb = function Ls() { + Vb(!!this.c); + Gc(this.b, this.c.g, this.c.i); + this.c = null; + }; + mdb(Zhe, "LinkedHashMultimap/1", 824); + bcb(330, 238, { 345: 1, 238: 1, 330: 1, 2020: 1, 3: 1, 42: 1 }, Ms); + _2.Rd = function Ns() { + return this.f; + }; + _2.Sd = function Os(a) { + this.c = a; + }; + _2.Td = function Ps(a) { + this.f = a; + }; + _2.d = 0; + var BG = mdb(Zhe, "LinkedHashMultimap/ValueEntry", 330); + bcb(1836, 1970, { 2020: 1, 20: 1, 28: 1, 14: 1, 21: 1 }, Ss); + _2.Fc = function Ts(a) { + var b, c2, d, e, f2; + f2 = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + b = f2 & this.b.length - 1; + e = this.b[b]; + for (c2 = e; c2; c2 = c2.a) { + if (c2.d == f2 && Hb(c2.i, a)) { + return false; + } + } + d = new Ms(this.c, a, f2, e); + Bs(this.d, d); + d.f = this; + this.d = d; + As(this.g.a.b, d); + As(d, this.g.a); + this.b[b] = d; + ++this.f; + ++this.e; + Qs(this); + return true; + }; + _2.$b = function Us() { + var a, b; + Alb(this.b, null); + this.f = 0; + for (a = this.a; a != this; a = a.Rd()) { + b = BD(a, 330); + As(b.b, b.e); + } + this.a = this; + this.d = this; + ++this.e; + }; + _2.Hc = function Vs(a) { + var b, c2; + c2 = Tbb(Ibb(Eie, keb(Tbb(Ibb(a == null ? 0 : tb(a), Fie)), 15))); + for (b = this.b[c2 & this.b.length - 1]; b; b = b.a) { + if (b.d == c2 && Hb(b.i, a)) { + return true; + } + } + return false; + }; + _2.Jc = function Ws(a) { + var b; + Qb(a); + for (b = this.a; b != this; b = b.Rd()) { + a.td(BD(b, 330).i); + } + }; + _2.Rd = function Xs() { + return this.a; + }; + _2.Kc = function Ys() { + return new ct(this); + }; + _2.Mc = function Zs(a) { + return Rs(this, a); + }; + _2.Sd = function $s(a) { + this.d = a; + }; + _2.Td = function _s(a) { + this.a = a; + }; + _2.gc = function at() { + return this.f; + }; + _2.e = 0; + _2.f = 0; + mdb(Zhe, "LinkedHashMultimap/ValueSet", 1836); + bcb(1837, 1, aie, ct); + _2.Nb = function dt(a) { + Rrb(this, a); + }; + _2.Ob = function et() { + return bt(this), this.b != this.c; + }; + _2.Pb = function ft() { + var a, b; + bt(this); + if (this.b == this.c) { + throw vbb(new utb()); + } + a = BD(this.b, 330); + b = a.i; + this.d = a; + this.b = a.f; + return b; + }; + _2.Qb = function gt() { + bt(this); + Vb(!!this.d); + Rs(this.c, this.d.i); + this.a = this.c.e; + this.d = null; + }; + _2.a = 0; + mdb(Zhe, "LinkedHashMultimap/ValueSet/1", 1837); + bcb(766, 1986, _he, mt); + _2.Zb = function nt() { + var a; + return a = this.f, !a ? this.f = new jw(this) : a; + }; + _2.Fb = function tt(a) { + return hw(this, a); + }; + _2.cc = function ut(a) { + return new bu(this, a); + }; + _2.fc = function xt(a) { + return kt(this, a); + }; + _2.$b = function pt() { + it(this); + }; + _2._b = function qt(a) { + return jt(this, a); + }; + _2.ac = function rt() { + return new jw(this); + }; + _2.bc = function st() { + return new eu(this); + }; + _2.qc = function vt(a) { + return new bu(this, a); + }; + _2.dc = function wt() { + return !this.a; + }; + _2.rc = function yt(a) { + return kt(this, a); + }; + _2.gc = function zt() { + return this.d; + }; + _2.c = 0; + _2.d = 0; + mdb(Zhe, "LinkedListMultimap", 766); + bcb(52, 28, Lie); + _2.ad = function Pt(a) { + ktb(this, a); + }; + _2.Nc = function Qt() { + return new Kub(this, 16); + }; + _2.Vc = function Ct(a, b) { + throw vbb(new cgb("Add not supported on this list")); + }; + _2.Fc = function Dt(a) { + this.Vc(this.gc(), a); + return true; + }; + _2.Wc = function Et(a, b) { + var c2, d, e; + uCb(b); + c2 = false; + for (e = b.Kc(); e.Ob(); ) { + d = e.Pb(); + this.Vc(a++, d); + c2 = true; + } + return c2; + }; + _2.$b = function Ft() { + this.Ud(0, this.gc()); + }; + _2.Fb = function Gt(a) { + return At(this, a); + }; + _2.Hb = function Ht() { + return qmb(this); + }; + _2.Xc = function It(a) { + return Bt(this, a); + }; + _2.Kc = function Jt() { + return new vib(this); + }; + _2.Yc = function Kt() { + return this.Zc(0); + }; + _2.Zc = function Lt(a) { + return new Bib(this, a); + }; + _2.$c = function Mt(a) { + throw vbb(new cgb("Remove not supported on this list")); + }; + _2.Ud = function Nt(a, b) { + var c2, d; + d = this.Zc(a); + for (c2 = a; c2 < b; ++c2) { + d.Pb(); + d.Qb(); + } + }; + _2._c = function Ot(a, b) { + throw vbb(new cgb("Set not supported on this list")); + }; + _2.bd = function Rt(a, b) { + return new Jib(this, a, b); + }; + _2.j = 0; + mdb(bie, "AbstractList", 52); + bcb(1964, 52, Lie); + _2.Vc = function Wt(a, b) { + St(this, a, b); + }; + _2.Wc = function Xt(a, b) { + return Tt(this, a, b); + }; + _2.Xb = function Yt(a) { + return Ut(this, a); + }; + _2.Kc = function Zt() { + return this.Zc(0); + }; + _2.$c = function $t(a) { + return Vt(this, a); + }; + _2._c = function _t(b, c2) { + var d, e; + d = this.Zc(b); + try { + e = d.Pb(); + d.Wb(c2); + return e; + } catch (a) { + a = ubb(a); + if (JD(a, 109)) { + throw vbb(new qcb("Can't set element " + b)); + } else + throw vbb(a); + } + }; + mdb(bie, "AbstractSequentialList", 1964); + bcb(636, 1964, Lie, bu); + _2.Zc = function cu(a) { + return au(this, a); + }; + _2.gc = function du() { + var a; + a = BD(Ohb(this.a.b, this.b), 283); + return !a ? 0 : a.a; + }; + mdb(Zhe, "LinkedListMultimap/1", 636); + bcb(1297, 1970, fie, eu); + _2.Hc = function fu(a) { + return jt(this.a, a); + }; + _2.Kc = function gu() { + return new ku(this.a); + }; + _2.Mc = function hu(a) { + return !kt(this.a, a).a.dc(); + }; + _2.gc = function iu() { + return Vhb(this.a.b); + }; + mdb(Zhe, "LinkedListMultimap/1KeySetImpl", 1297); + bcb(1296, 1, aie, ku); + _2.Nb = function lu(a) { + Rrb(this, a); + }; + _2.Ob = function mu() { + ju(this); + return !!this.c; + }; + _2.Pb = function nu() { + ju(this); + ot(this.c); + this.a = this.c; + Qqb(this.d, this.a.a); + do { + this.c = this.c.b; + } while (!!this.c && !Qqb(this.d, this.c.a)); + return this.a.a; + }; + _2.Qb = function ou() { + ju(this); + Vb(!!this.a); + ir(new wu(this.e, this.a.a)); + this.a = null; + this.b = this.e.c; + }; + _2.b = 0; + mdb(Zhe, "LinkedListMultimap/DistinctKeyIterator", 1296); + bcb(283, 1, { 283: 1 }, pu); + _2.a = 0; + mdb(Zhe, "LinkedListMultimap/KeyList", 283); + bcb(1295, 345, kie, qu); + _2.cd = function ru() { + return this.a; + }; + _2.dd = function su() { + return this.f; + }; + _2.ed = function tu(a) { + var b; + b = this.f; + this.f = a; + return b; + }; + mdb(Zhe, "LinkedListMultimap/Node", 1295); + bcb(560, 1, jie, wu, xu); + _2.Nb = function zu(a) { + Rrb(this, a); + }; + _2.Rb = function yu(a) { + this.e = ht(this.f, this.b, a, this.c); + ++this.d; + this.a = null; + }; + _2.Ob = function Au() { + return !!this.c; + }; + _2.Sb = function Bu() { + return !!this.e; + }; + _2.Pb = function Cu() { + return uu(this); + }; + _2.Tb = function Du() { + return this.d; + }; + _2.Ub = function Eu() { + return vu(this); + }; + _2.Vb = function Fu() { + return this.d - 1; + }; + _2.Qb = function Gu() { + Vb(!!this.a); + if (this.a != this.c) { + this.e = this.a.e; + --this.d; + } else { + this.c = this.a.c; + } + lt(this.f, this.a); + this.a = null; + }; + _2.Wb = function Hu(a) { + Ub(!!this.a); + this.a.f = a; + }; + _2.d = 0; + mdb(Zhe, "LinkedListMultimap/ValueForKeyIterator", 560); + bcb(1018, 52, Lie); + _2.Vc = function Tu(a, b) { + this.a.Vc(a, b); + }; + _2.Wc = function Uu(a, b) { + return this.a.Wc(a, b); + }; + _2.Hc = function Vu(a) { + return this.a.Hc(a); + }; + _2.Xb = function Wu(a) { + return this.a.Xb(a); + }; + _2.$c = function Xu(a) { + return this.a.$c(a); + }; + _2._c = function Yu(a, b) { + return this.a._c(a, b); + }; + _2.gc = function Zu() { + return this.a.gc(); + }; + mdb(Zhe, "Lists/AbstractListWrapper", 1018); + bcb(1019, 1018, Nie); + mdb(Zhe, "Lists/RandomAccessListWrapper", 1019); + bcb(1021, 1019, Nie, $u); + _2.Zc = function _u(a) { + return this.a.Zc(a); + }; + mdb(Zhe, "Lists/1", 1021); + bcb(131, 52, { 131: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1 }, dv); + _2.Vc = function ev(a, b) { + this.a.Vc(cv(this, a), b); + }; + _2.$b = function fv() { + this.a.$b(); + }; + _2.Xb = function gv(a) { + return this.a.Xb(bv(this, a)); + }; + _2.Kc = function hv() { + return av(this, 0); + }; + _2.Zc = function iv(a) { + return av(this, a); + }; + _2.$c = function jv(a) { + return this.a.$c(bv(this, a)); + }; + _2.Ud = function kv(a, b) { + (Tb(a, b, this.a.gc()), Su(this.a.bd(cv(this, b), cv(this, a)))).$b(); + }; + _2._c = function lv(a, b) { + return this.a._c(bv(this, a), b); + }; + _2.gc = function mv() { + return this.a.gc(); + }; + _2.bd = function nv(a, b) { + return Tb(a, b, this.a.gc()), Su(this.a.bd(cv(this, b), cv(this, a))); + }; + mdb(Zhe, "Lists/ReverseList", 131); + bcb(280, 131, { 131: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1 }, ov); + mdb(Zhe, "Lists/RandomAccessReverseList", 280); + bcb(1020, 1, jie, qv); + _2.Nb = function sv(a) { + Rrb(this, a); + }; + _2.Rb = function rv(a) { + this.c.Rb(a); + this.c.Ub(); + this.a = false; + }; + _2.Ob = function tv() { + return this.c.Sb(); + }; + _2.Sb = function uv() { + return this.c.Ob(); + }; + _2.Pb = function vv() { + return pv(this); + }; + _2.Tb = function wv() { + return cv(this.b, this.c.Tb()); + }; + _2.Ub = function xv() { + if (!this.c.Ob()) { + throw vbb(new utb()); + } + this.a = true; + return this.c.Pb(); + }; + _2.Vb = function yv() { + return cv(this.b, this.c.Tb()) - 1; + }; + _2.Qb = function zv() { + Vb(this.a); + this.c.Qb(); + this.a = false; + }; + _2.Wb = function Av(a) { + Ub(this.a); + this.c.Wb(a); + }; + _2.a = false; + mdb(Zhe, "Lists/ReverseList/1", 1020); + bcb(432, 487, aie, Mv); + _2.Qd = function Nv(a) { + return Lv(a); + }; + mdb(Zhe, "Maps/1", 432); + bcb(698, 487, aie, Ov); + _2.Qd = function Pv(a) { + return BD(a, 42).dd(); + }; + mdb(Zhe, "Maps/2", 698); + bcb(962, 487, aie, Qv); + _2.Qd = function Rv(a) { + return new Wo(a, ww(this.a, a)); + }; + mdb(Zhe, "Maps/3", 962); + bcb(959, 1971, fie, Sv); + _2.Jc = function Tv(a) { + mj(this.a, a); + }; + _2.Kc = function Uv() { + return this.a.kc(); + }; + _2.Rc = function Vv() { + return this.a; + }; + _2.Nc = function Wv() { + return this.a.lc(); + }; + mdb(Zhe, "Maps/IteratorBasedAbstractMap/1", 959); + bcb(960, 1, {}, Xv); + _2.Od = function Yv(a, b) { + this.a.td(a); + }; + mdb(Zhe, "Maps/KeySet/lambda$0$Type", 960); + bcb(958, 28, die, Zv); + _2.$b = function $v() { + this.a.$b(); + }; + _2.Hc = function _v(a) { + return this.a.uc(a); + }; + _2.Jc = function aw(a) { + Qb(a); + this.a.wc(new fw(a)); + }; + _2.dc = function bw() { + return this.a.dc(); + }; + _2.Kc = function cw() { + return new Ov(this.a.vc().Kc()); + }; + _2.Mc = function dw(b) { + var c2, d; + try { + return ze(this, b, true); + } catch (a) { + a = ubb(a); + if (JD(a, 41)) { + for (d = this.a.vc().Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 42); + if (Hb(b, c2.dd())) { + this.a.Bc(c2.cd()); + return true; + } + } + return false; + } else + throw vbb(a); + } + }; + _2.gc = function ew() { + return this.a.gc(); + }; + mdb(Zhe, "Maps/Values", 958); + bcb(961, 1, {}, fw); + _2.Od = function gw(a, b) { + this.a.td(b); + }; + mdb(Zhe, "Maps/Values/lambda$0$Type", 961); + bcb(736, 1987, cie, jw); + _2.xc = function nw(a) { + return this.a._b(a) ? this.a.cc(a) : null; + }; + _2.Bc = function qw(a) { + return this.a._b(a) ? this.a.fc(a) : null; + }; + _2.$b = function kw() { + this.a.$b(); + }; + _2._b = function lw(a) { + return this.a._b(a); + }; + _2.Ec = function mw() { + return new sw(this); + }; + _2.Dc = function() { + return this.Ec(); + }; + _2.dc = function ow() { + return this.a.dc(); + }; + _2.ec = function pw() { + return this.a.ec(); + }; + _2.gc = function rw() { + return this.a.ec().gc(); + }; + mdb(Zhe, "Multimaps/AsMap", 736); + bcb(1104, 1971, fie, sw); + _2.Kc = function tw() { + return Bv(this.a.a.ec(), new xw(this)); + }; + _2.Rc = function uw() { + return this.a; + }; + _2.Mc = function vw(a) { + var b; + if (!Ze(this, a)) { + return false; + } + b = BD(a, 42); + iw(this.a, b.cd()); + return true; + }; + mdb(Zhe, "Multimaps/AsMap/EntrySet", 1104); + bcb(1108, 1, {}, xw); + _2.Kb = function yw(a) { + return ww(this, a); + }; + _2.Fb = function zw(a) { + return this === a; + }; + mdb(Zhe, "Multimaps/AsMap/EntrySet/1", 1108); + bcb(543, 1989, { 543: 1, 835: 1, 20: 1, 28: 1, 14: 1 }, Cw); + _2.$b = function Dw() { + Nc(this.a); + }; + _2.Hc = function Ew(a) { + return Oc(this.a, a); + }; + _2.Jc = function Fw(a) { + Qb(a); + reb(Pc(this.a), new Rw(a)); + }; + _2.Kc = function Gw() { + return new Mv(Pc(this.a).a.kc()); + }; + _2.gc = function Hw() { + return this.a.d; + }; + _2.Nc = function Iw() { + return $j(Pc(this.a).Nc(), new Jw()); + }; + mdb(Zhe, "Multimaps/Keys", 543); + bcb(1106, 1, {}, Jw); + _2.Kb = function Kw(a) { + return BD(a, 42).cd(); + }; + mdb(Zhe, "Multimaps/Keys/0methodref$getKey$Type", 1106); + bcb(1105, 487, aie, Lw); + _2.Qd = function Mw(a) { + return new Qw(BD(a, 42)); + }; + mdb(Zhe, "Multimaps/Keys/1", 1105); + bcb(1990, 1, { 416: 1 }); + _2.Fb = function Nw(a) { + var b; + if (JD(a, 492)) { + b = BD(a, 416); + return BD(this.a.dd(), 14).gc() == BD(b.a.dd(), 14).gc() && Hb(this.a.cd(), b.a.cd()); + } + return false; + }; + _2.Hb = function Ow() { + var a; + a = this.a.cd(); + return (a == null ? 0 : tb(a)) ^ BD(this.a.dd(), 14).gc(); + }; + _2.Ib = function Pw() { + var a, b; + b = xfb(this.a.cd()); + a = BD(this.a.dd(), 14).gc(); + return a == 1 ? b : b + " x " + a; + }; + mdb(Zhe, "Multisets/AbstractEntry", 1990); + bcb(492, 1990, { 492: 1, 416: 1 }, Qw); + mdb(Zhe, "Multimaps/Keys/1/1", 492); + bcb(1107, 1, qie, Rw); + _2.td = function Sw(a) { + this.a.td(BD(a, 42).cd()); + }; + mdb(Zhe, "Multimaps/Keys/lambda$1$Type", 1107); + bcb(1110, 1, qie, Vw); + _2.td = function Ww(a) { + Tw(BD(a, 416)); + }; + mdb(Zhe, "Multiset/lambda$0$Type", 1110); + bcb(737, 1, qie, Xw); + _2.td = function Yw(a) { + Uw(this.a, BD(a, 416)); + }; + mdb(Zhe, "Multiset/lambda$1$Type", 737); + bcb(1111, 1, {}, bx); + mdb(Zhe, "Multisets/0methodref$add$Type", 1111); + bcb(738, 1, {}, cx); + _2.Kb = function dx(a) { + return _w(BD(a, 416)); + }; + mdb(Zhe, "Multisets/lambda$3$Type", 738); + bcb(2008, 1, Qhe); + mdb(Zhe, "RangeGwtSerializationDependencies", 2008); + bcb(514, 2008, { 169: 1, 514: 1, 3: 1, 45: 1 }, gx); + _2.Lb = function hx(a) { + return fx(this, BD(a, 35)); + }; + _2.Mb = function lx(a) { + return fx(this, BD(a, 35)); + }; + _2.Fb = function jx(a) { + var b; + if (JD(a, 514)) { + b = BD(a, 514); + return Ek(this.a, b.a) && Ek(this.b, b.b); + } + return false; + }; + _2.Hb = function kx() { + return this.a.Hb() * 31 + this.b.Hb(); + }; + _2.Ib = function mx() { + return nx(this.a, this.b); + }; + mdb(Zhe, "Range", 514); + bcb(778, 1999, yie, px); + _2.Zc = function tx(a) { + return jm(this.b, a); + }; + _2.Pd = function qx() { + return this.a; + }; + _2.Xb = function rx(a) { + return Em(this.b, a); + }; + _2.Fd = function sx(a) { + return jm(this.b, a); + }; + mdb(Zhe, "RegularImmutableAsList", 778); + bcb(646, 2006, yie, ux); + _2.Hd = function vx() { + return this.a; + }; + mdb(Zhe, "RegularImmutableList", 646); + bcb(616, 715, Aie, wx); + mdb(Zhe, "RegularImmutableMap", 616); + bcb(716, 703, Cie, zx); + var xx; + mdb(Zhe, "RegularImmutableSet", 716); + bcb(1976, eie, fie); + _2.Kc = function Mx() { + return new Xx(this.a, this.b); + }; + _2.Fc = function Jx(a) { + throw vbb(new bgb()); + }; + _2.Gc = function Kx(a) { + throw vbb(new bgb()); + }; + _2.$b = function Lx() { + throw vbb(new bgb()); + }; + _2.Mc = function Nx(a) { + throw vbb(new bgb()); + }; + mdb(Zhe, "Sets/SetView", 1976); + bcb(963, 1976, fie, Px); + _2.Kc = function Tx() { + return new Xx(this.a, this.b); + }; + _2.Hc = function Qx(a) { + return tqb(this.a, a) && this.b.Hc(a); + }; + _2.Ic = function Rx(a) { + return Be(this.a, a) && this.b.Ic(a); + }; + _2.dc = function Sx() { + return omb(this.b, this.a); + }; + _2.Lc = function Ux() { + return JAb(new YAb(null, new Kub(this.a, 1)), new _x(this.b)); + }; + _2.gc = function Vx() { + return Ox(this); + }; + _2.Oc = function Wx() { + return JAb(new YAb(null, new Kub(this.a, 1)), new Zx(this.b)); + }; + mdb(Zhe, "Sets/2", 963); + bcb(700, 699, Yhe, Xx); + _2.Yb = function Yx() { + var a; + while (Eqb(this.a)) { + a = Fqb(this.a); + if (this.c.Hc(a)) { + return a; + } + } + return this.e = 2, null; + }; + mdb(Zhe, "Sets/2/1", 700); + bcb(964, 1, Oie, Zx); + _2.Mb = function $x(a) { + return this.a.Hc(a); + }; + mdb(Zhe, "Sets/2/4methodref$contains$Type", 964); + bcb(965, 1, Oie, _x); + _2.Mb = function ay(a) { + return this.a.Hc(a); + }; + mdb(Zhe, "Sets/2/5methodref$contains$Type", 965); + bcb(607, 1975, { 607: 1, 3: 1, 20: 1, 14: 1, 271: 1, 21: 1, 84: 1 }, by); + _2.Bd = function cy() { + return this.b; + }; + _2.Cd = function dy() { + return this.b; + }; + _2.Md = function ey() { + return this.b; + }; + _2.Jc = function fy(a) { + this.a.Jc(a); + }; + _2.Lc = function gy() { + return this.a.Lc(); + }; + _2.Oc = function hy() { + return this.a.Oc(); + }; + mdb(Zhe, "Sets/UnmodifiableNavigableSet", 607); + bcb(1932, 1931, Aie, iy); + _2.Ld = function jy() { + return Ql(), new oy(this.a); + }; + _2.Cc = function ky() { + return Ql(), new oy(this.a); + }; + _2.pd = function ly() { + return Ql(), new oy(this.a); + }; + mdb(Zhe, "SingletonImmutableBiMap", 1932); + bcb(647, 2006, yie, my); + _2.Hd = function ny() { + return this.a; + }; + mdb(Zhe, "SingletonImmutableList", 647); + bcb(350, 1981, Cie, oy); + _2.Kc = function ry() { + return new Ir(this.a); + }; + _2.Hc = function py(a) { + return pb(this.a, a); + }; + _2.Ed = function qy() { + return new Ir(this.a); + }; + _2.gc = function sy() { + return 1; + }; + mdb(Zhe, "SingletonImmutableSet", 350); + bcb(1115, 1, {}, vy); + _2.Kb = function wy(a) { + return BD(a, 164); + }; + mdb(Zhe, "Streams/lambda$0$Type", 1115); + bcb(1116, 1, Pie, xy); + _2.Vd = function yy() { + uy(this.a); + }; + mdb(Zhe, "Streams/lambda$1$Type", 1116); + bcb(1659, 1658, _he, Ay); + _2.Zb = function By() { + var a; + return a = this.f, BD(BD(!a ? this.f = JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c) : a, 161), 171); + }; + _2.hc = function Ey() { + return new Hxb(this.b); + }; + _2.gd = function Fy() { + return new Hxb(this.b); + }; + _2.ec = function Hy() { + var a; + return a = this.i, BD(BD(!a ? this.i = JD(this.c, 171) ? new $f(this, BD(this.c, 171)) : JD(this.c, 161) ? new Yf(this, BD(this.c, 161)) : new zf(this, this.c) : a, 84), 271); + }; + _2.ac = function Dy() { + return JD(this.c, 171) ? new Sf(this, BD(this.c, 171)) : JD(this.c, 161) ? new Mf(this, BD(this.c, 161)) : new ne(this, this.c); + }; + _2.ic = function Gy(a) { + a == null && this.a.ue(a, a); + return new Hxb(this.b); + }; + mdb(Zhe, "TreeMultimap", 1659); + bcb(78, 1, { 3: 1, 78: 1 }); + _2.Wd = function $y(a) { + return new Error(a); + }; + _2.Xd = function az() { + return this.e; + }; + _2.Yd = function bz() { + return XAb(NAb(Plb((this.k == null && (this.k = KC(_I, nie, 78, 0, 0, 1)), this.k)), new _fb())); + }; + _2.Zd = function cz() { + return this.f; + }; + _2.$d = function dz() { + return this.g; + }; + _2._d = function ez() { + Vy(this, _y(this.Wd(Wy(this, this.g)))); + Sz(this); + }; + _2.Ib = function fz() { + return Wy(this, this.$d()); + }; + _2.e = Sie; + _2.i = false; + _2.n = true; + var _I = mdb(Phe, "Throwable", 78); + bcb(102, 78, { 3: 1, 102: 1, 78: 1 }); + mdb(Phe, "Exception", 102); + bcb(60, 102, Tie, gz, hz); + mdb(Phe, "RuntimeException", 60); + bcb(598, 60, Tie); + mdb(Phe, "JsException", 598); + bcb(863, 598, Tie); + mdb(Uie, "JavaScriptExceptionBase", 863); + bcb(477, 863, { 477: 1, 3: 1, 102: 1, 60: 1, 78: 1 }, lz); + _2.$d = function oz() { + kz(this); + return this.c; + }; + _2.ae = function pz() { + return PD(this.b) === PD(iz) ? null : this.b; + }; + var iz; + mdb(Wie, "JavaScriptException", 477); + var PH = mdb(Wie, "JavaScriptObject$", 0); + var tz; + bcb(1948, 1, {}); + mdb(Wie, "Scheduler", 1948); + var xz = 0, yz = 0, zz = -1; + bcb(890, 1948, {}, Nz); + var Jz; + mdb(Uie, "SchedulerImpl", 890); + var Qz; + bcb(1960, 1, {}); + mdb(Uie, "StackTraceCreator/Collector", 1960); + bcb(864, 1960, {}, Yz); + _2.be = function Zz(a) { + var b = {}; + var c2 = []; + a[Yie] = c2; + var d = arguments.callee.caller; + while (d) { + var e = (Rz(), d.name || (d.name = Uz(d.toString()))); + c2.push(e); + var f2 = ":" + e; + var g = b[f2]; + if (g) { + var h, i3; + for (h = 0, i3 = g.length; h < i3; h++) { + if (g[h] === d) { + return; + } + } + } + (g || (b[f2] = [])).push(d); + d = d.caller; + } + }; + _2.ce = function $z(a) { + var b, c2, d, e; + d = (Rz(), a && a[Yie] ? a[Yie] : []); + c2 = d.length; + e = KC(VI, nie, 310, c2, 0, 1); + for (b = 0; b < c2; b++) { + e[b] = new Zeb(d[b], null, -1); + } + return e; + }; + mdb(Uie, "StackTraceCreator/CollectorLegacy", 864); + bcb(1961, 1960, {}); + _2.be = function aA(a) { + }; + _2.de = function bA(a, b, c2, d) { + return new Zeb(b, a + "@" + d, c2 < 0 ? -1 : c2); + }; + _2.ce = function cA(a) { + var b, c2, d, e, f2, g; + e = Wz(a); + f2 = KC(VI, nie, 310, 0, 0, 1); + b = 0; + d = e.length; + if (d == 0) { + return f2; + } + g = _z(this, e[0]); + dfb(g.d, Xie) || (f2[b++] = g); + for (c2 = 1; c2 < d; c2++) { + f2[b++] = _z(this, e[c2]); + } + return f2; + }; + mdb(Uie, "StackTraceCreator/CollectorModern", 1961); + bcb(865, 1961, {}, dA); + _2.de = function eA(a, b, c2, d) { + return new Zeb(b, a, -1); + }; + mdb(Uie, "StackTraceCreator/CollectorModernNoSourceMap", 865); + bcb(1050, 1, {}); + mdb(yje, zje, 1050); + bcb(615, 1050, { 615: 1 }, HA); + var FA; + mdb(Aje, zje, 615); + bcb(2001, 1, {}); + mdb(yje, Bje, 2001); + bcb(2002, 2001, {}); + mdb(Aje, Bje, 2002); + bcb(1090, 1, {}, MA); + var JA; + mdb(Aje, "LocaleInfo", 1090); + bcb(1918, 1, {}, PA); + _2.a = 0; + mdb(Aje, "TimeZone", 1918); + bcb(1258, 2002, {}, VA); + mdb("com.google.gwt.i18n.client.impl.cldr", "DateTimeFormatInfoImpl", 1258); + bcb(434, 1, { 434: 1 }, WA); + _2.a = false; + _2.b = 0; + mdb(yje, "DateTimeFormat/PatternPart", 434); + bcb(199, 1, Cje, eB, fB, gB); + _2.wd = function hB(a) { + return XA(this, BD(a, 199)); + }; + _2.Fb = function iB(a) { + return JD(a, 199) && Bbb(Cbb(this.q.getTime()), Cbb(BD(a, 199).q.getTime())); + }; + _2.Hb = function jB() { + var a; + a = Cbb(this.q.getTime()); + return Tbb(Vbb(a, Pbb(a, 32))); + }; + _2.Ib = function lB() { + var a, b, c2; + c2 = -this.q.getTimezoneOffset(); + a = (c2 >= 0 ? "+" : "") + (c2 / 60 | 0); + b = kB($wnd.Math.abs(c2) % 60); + return (Dpb(), Bpb)[this.q.getDay()] + " " + Cpb[this.q.getMonth()] + " " + kB(this.q.getDate()) + " " + kB(this.q.getHours()) + ":" + kB(this.q.getMinutes()) + ":" + kB(this.q.getSeconds()) + " GMT" + a + b + " " + this.q.getFullYear(); + }; + var $J = mdb(bie, "Date", 199); + bcb(1915, 199, Cje, nB); + _2.a = false; + _2.b = 0; + _2.c = 0; + _2.d = 0; + _2.e = 0; + _2.f = 0; + _2.g = false; + _2.i = 0; + _2.j = 0; + _2.k = 0; + _2.n = 0; + _2.o = 0; + _2.p = 0; + mdb("com.google.gwt.i18n.shared.impl", "DateRecord", 1915); + bcb(1966, 1, {}); + _2.fe = function oB() { + return null; + }; + _2.ge = function pB() { + return null; + }; + _2.he = function qB() { + return null; + }; + _2.ie = function rB() { + return null; + }; + _2.je = function sB() { + return null; + }; + mdb(Dje, "JSONValue", 1966); + bcb(216, 1966, { 216: 1 }, wB, xB); + _2.Fb = function yB(a) { + if (!JD(a, 216)) { + return false; + } + return qz(this.a, BD(a, 216).a); + }; + _2.ee = function zB() { + return DB; + }; + _2.Hb = function AB() { + return rz(this.a); + }; + _2.fe = function BB() { + return this; + }; + _2.Ib = function CB() { + var a, b, c2; + c2 = new Wfb("["); + for (b = 0, a = this.a.length; b < a; b++) { + b > 0 && (c2.a += ",", c2); + Pfb(c2, tB(this, b)); + } + c2.a += "]"; + return c2.a; + }; + mdb(Dje, "JSONArray", 216); + bcb(483, 1966, { 483: 1 }, HB); + _2.ee = function IB() { + return LB; + }; + _2.ge = function JB() { + return this; + }; + _2.Ib = function KB() { + return Bcb(), "" + this.a; + }; + _2.a = false; + var EB, FB; + mdb(Dje, "JSONBoolean", 483); + bcb(985, 60, Tie, MB); + mdb(Dje, "JSONException", 985); + bcb(1023, 1966, {}, PB); + _2.ee = function QB() { + return SB; + }; + _2.Ib = function RB() { + return Xhe; + }; + var NB; + mdb(Dje, "JSONNull", 1023); + bcb(258, 1966, { 258: 1 }, TB); + _2.Fb = function UB(a) { + if (!JD(a, 258)) { + return false; + } + return this.a == BD(a, 258).a; + }; + _2.ee = function VB() { + return ZB; + }; + _2.Hb = function WB() { + return Hdb(this.a); + }; + _2.he = function XB() { + return this; + }; + _2.Ib = function YB() { + return this.a + ""; + }; + _2.a = 0; + mdb(Dje, "JSONNumber", 258); + bcb(183, 1966, { 183: 1 }, eC, fC); + _2.Fb = function gC(a) { + if (!JD(a, 183)) { + return false; + } + return qz(this.a, BD(a, 183).a); + }; + _2.ee = function hC() { + return lC; + }; + _2.Hb = function iC() { + return rz(this.a); + }; + _2.ie = function jC() { + return this; + }; + _2.Ib = function kC() { + var a, b, c2, d, e, f2, g; + g = new Wfb("{"); + a = true; + f2 = $B(this, KC(ZI, nie, 2, 0, 6, 1)); + for (c2 = f2, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + a ? a = false : (g.a += She, g); + Qfb(g, vz(b)); + g.a += ":"; + Pfb(g, aC(this, b)); + } + g.a += "}"; + return g.a; + }; + mdb(Dje, "JSONObject", 183); + bcb(596, eie, fie, mC); + _2.Hc = function nC(a) { + return ND(a) && _B(this.a, GD(a)); + }; + _2.Kc = function oC() { + return new vib(new amb(this.b)); + }; + _2.gc = function pC() { + return this.b.length; + }; + mdb(Dje, "JSONObject/1", 596); + var qC; + bcb(204, 1966, { 204: 1 }, yC); + _2.Fb = function zC(a) { + if (!JD(a, 204)) { + return false; + } + return dfb(this.a, BD(a, 204).a); + }; + _2.ee = function AC() { + return EC; + }; + _2.Hb = function BC() { + return LCb(this.a); + }; + _2.je = function CC() { + return this; + }; + _2.Ib = function DC() { + return vz(this.a); + }; + mdb(Dje, "JSONString", 204); + var QC; + var sD, tD, uD, vD; + bcb(1962, 1, { 525: 1 }); + mdb(Lje, "OutputStream", 1962); + bcb(1963, 1962, { 525: 1 }); + mdb(Lje, "FilterOutputStream", 1963); + bcb(866, 1963, { 525: 1 }, jcb); + mdb(Lje, "PrintStream", 866); + bcb(418, 1, { 475: 1 }); + _2.Ib = function ncb() { + return this.a; + }; + mdb(Phe, "AbstractStringBuilder", 418); + bcb(529, 60, Tie, ocb); + mdb(Phe, "ArithmeticException", 529); + bcb(73, 60, Mje, pcb, qcb); + mdb(Phe, "IndexOutOfBoundsException", 73); + bcb(320, 73, { 3: 1, 320: 1, 102: 1, 73: 1, 60: 1, 78: 1 }, rcb, scb); + mdb(Phe, "ArrayIndexOutOfBoundsException", 320); + bcb(528, 60, Tie, tcb, ucb); + mdb(Phe, "ArrayStoreException", 528); + bcb(289, 78, Nje, vcb); + mdb(Phe, "Error", 289); + bcb(194, 289, Nje, xcb, ycb); + mdb(Phe, "AssertionError", 194); + xD = { 3: 1, 476: 1, 35: 1 }; + var zcb, Acb; + var wI = mdb(Phe, "Boolean", 476); + bcb(236, 1, { 3: 1, 236: 1 }); + var Gcb; + mdb(Phe, "Number", 236); + bcb(217, 236, { 3: 1, 217: 1, 35: 1, 236: 1 }, Mcb); + _2.wd = function Ncb(a) { + return Lcb(this, BD(a, 217)); + }; + _2.ke = function Ocb() { + return this.a; + }; + _2.Fb = function Pcb(a) { + return JD(a, 217) && BD(a, 217).a == this.a; + }; + _2.Hb = function Qcb() { + return this.a; + }; + _2.Ib = function Rcb() { + return "" + this.a; + }; + _2.a = 0; + var xI = mdb(Phe, "Byte", 217); + var Tcb; + bcb(172, 1, { 3: 1, 172: 1, 35: 1 }, Xcb); + _2.wd = function Ycb(a) { + return Wcb(this, BD(a, 172)); + }; + _2.Fb = function $cb(a) { + return JD(a, 172) && BD(a, 172).a == this.a; + }; + _2.Hb = function _cb() { + return this.a; + }; + _2.Ib = function adb() { + return String.fromCharCode(this.a); + }; + _2.a = 0; + var Vcb; + var yI = mdb(Phe, "Character", 172); + var cdb; + bcb(205, 60, { 3: 1, 205: 1, 102: 1, 60: 1, 78: 1 }, Bdb, Cdb); + mdb(Phe, "ClassCastException", 205); + yD = { 3: 1, 35: 1, 333: 1, 236: 1 }; + var BI = mdb(Phe, "Double", 333); + bcb(155, 236, { 3: 1, 35: 1, 155: 1, 236: 1 }, Ndb, Odb); + _2.wd = function Pdb(a) { + return Mdb(this, BD(a, 155)); + }; + _2.ke = function Qdb() { + return this.a; + }; + _2.Fb = function Rdb(a) { + return JD(a, 155) && Fdb(this.a, BD(a, 155).a); + }; + _2.Hb = function Sdb() { + return QD(this.a); + }; + _2.Ib = function Udb() { + return "" + this.a; + }; + _2.a = 0; + var FI = mdb(Phe, "Float", 155); + bcb(32, 60, { 3: 1, 102: 1, 32: 1, 60: 1, 78: 1 }, Vdb, Wdb, Xdb); + mdb(Phe, "IllegalArgumentException", 32); + bcb(71, 60, Tie, Ydb, Zdb); + mdb(Phe, "IllegalStateException", 71); + bcb(19, 236, { 3: 1, 35: 1, 19: 1, 236: 1 }, _db); + _2.wd = function ceb(a) { + return $db(this, BD(a, 19)); + }; + _2.ke = function deb() { + return this.a; + }; + _2.Fb = function eeb(a) { + return JD(a, 19) && BD(a, 19).a == this.a; + }; + _2.Hb = function feb() { + return this.a; + }; + _2.Ib = function leb() { + return "" + this.a; + }; + _2.a = 0; + var JI = mdb(Phe, "Integer", 19); + var neb; + var peb; + bcb(162, 236, { 3: 1, 35: 1, 162: 1, 236: 1 }, teb); + _2.wd = function veb(a) { + return seb(this, BD(a, 162)); + }; + _2.ke = function web() { + return Sbb(this.a); + }; + _2.Fb = function xeb(a) { + return JD(a, 162) && Bbb(BD(a, 162).a, this.a); + }; + _2.Hb = function yeb() { + return Tbb(this.a); + }; + _2.Ib = function zeb() { + return "" + Ubb(this.a); + }; + _2.a = 0; + var MI = mdb(Phe, "Long", 162); + var Beb; + bcb(2039, 1, {}); + bcb(1831, 60, Tie, Feb); + mdb(Phe, "NegativeArraySizeException", 1831); + bcb(173, 598, { 3: 1, 102: 1, 173: 1, 60: 1, 78: 1 }, Geb, Heb); + _2.Wd = function Ieb(a) { + return new TypeError(a); + }; + mdb(Phe, "NullPointerException", 173); + var Jeb, Keb, Leb, Meb; + bcb(127, 32, { 3: 1, 102: 1, 32: 1, 127: 1, 60: 1, 78: 1 }, Oeb); + mdb(Phe, "NumberFormatException", 127); + bcb(184, 236, { 3: 1, 35: 1, 236: 1, 184: 1 }, Qeb); + _2.wd = function Reb(a) { + return Peb(this, BD(a, 184)); + }; + _2.ke = function Seb() { + return this.a; + }; + _2.Fb = function Teb(a) { + return JD(a, 184) && BD(a, 184).a == this.a; + }; + _2.Hb = function Ueb() { + return this.a; + }; + _2.Ib = function Veb() { + return "" + this.a; + }; + _2.a = 0; + var UI = mdb(Phe, "Short", 184); + var Xeb; + bcb(310, 1, { 3: 1, 310: 1 }, Zeb); + _2.Fb = function $eb(a) { + var b; + if (JD(a, 310)) { + b = BD(a, 310); + return this.c == b.c && this.d == b.d && this.a == b.a && this.b == b.b; + } + return false; + }; + _2.Hb = function _eb() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [meb(this.c), this.a, this.d, this.b])); + }; + _2.Ib = function afb() { + return this.a + "." + this.d + "(" + (this.b != null ? this.b : "Unknown Source") + (this.c >= 0 ? ":" + this.c : "") + ")"; + }; + _2.c = 0; + var VI = mdb(Phe, "StackTraceElement", 310); + zD = { 3: 1, 475: 1, 35: 1, 2: 1 }; + var ZI = mdb(Phe, Vie, 2); + bcb(107, 418, { 475: 1 }, Hfb, Ifb, Jfb); + mdb(Phe, "StringBuffer", 107); + bcb(100, 418, { 475: 1 }, Ufb, Vfb, Wfb); + mdb(Phe, "StringBuilder", 100); + bcb(687, 73, Mje, Xfb); + mdb(Phe, "StringIndexOutOfBoundsException", 687); + bcb(2043, 1, {}); + var Yfb; + bcb(844, 1, {}, _fb); + _2.Kb = function agb(a) { + return BD(a, 78).e; + }; + mdb(Phe, "Throwable/lambda$0$Type", 844); + bcb(41, 60, { 3: 1, 102: 1, 60: 1, 78: 1, 41: 1 }, bgb, cgb); + mdb(Phe, "UnsupportedOperationException", 41); + bcb(240, 236, { 3: 1, 35: 1, 236: 1, 240: 1 }, sgb, tgb); + _2.wd = function wgb(a) { + return mgb(this, BD(a, 240)); + }; + _2.ke = function xgb() { + return Hcb(rgb2(this)); + }; + _2.Fb = function ygb(a) { + var b; + if (this === a) { + return true; + } + if (JD(a, 240)) { + b = BD(a, 240); + return this.e == b.e && mgb(this, b) == 0; + } + return false; + }; + _2.Hb = function zgb() { + var a; + if (this.b != 0) { + return this.b; + } + if (this.a < 54) { + a = Cbb(this.f); + this.b = Tbb(xbb(a, -1)); + this.b = 33 * this.b + Tbb(xbb(Obb(a, 32), -1)); + this.b = 17 * this.b + QD(this.e); + return this.b; + } + this.b = 17 * Ngb(this.c) + QD(this.e); + return this.b; + }; + _2.Ib = function Agb() { + return rgb2(this); + }; + _2.a = 0; + _2.b = 0; + _2.d = 0; + _2.e = 0; + _2.f = 0; + var dgb, egb, fgb, ggb, hgb, igb, jgb, kgb; + var bJ = mdb("java.math", "BigDecimal", 240); + bcb(91, 236, { 3: 1, 35: 1, 236: 1, 91: 1 }, Tgb, Ugb, Vgb, Wgb, Xgb, Ygb); + _2.wd = function $gb(a) { + return Igb(this, BD(a, 91)); + }; + _2.ke = function _gb() { + return Hcb(shb(this, 0)); + }; + _2.Fb = function ahb(a) { + return Kgb(this, a); + }; + _2.Hb = function chb() { + return Ngb(this); + }; + _2.Ib = function ehb() { + return shb(this, 0); + }; + _2.b = -2; + _2.c = 0; + _2.d = 0; + _2.e = 0; + var Bgb, Cgb, Dgb, Egb, Fgb, Ggb; + var cJ = mdb("java.math", "BigInteger", 91); + var nhb, ohb; + var Bhb, Chb; + bcb(488, 1967, cie); + _2.$b = function Xhb() { + Uhb(this); + }; + _2._b = function Yhb(a) { + return Mhb(this, a); + }; + _2.uc = function Zhb(a) { + return Nhb(this, a, this.g) || Nhb(this, a, this.f); + }; + _2.vc = function $hb() { + return new eib(this); + }; + _2.xc = function _hb(a) { + return Ohb(this, a); + }; + _2.zc = function aib(a, b) { + return Rhb(this, a, b); + }; + _2.Bc = function bib(a) { + return Thb(this, a); + }; + _2.gc = function cib() { + return Vhb(this); + }; + mdb(bie, "AbstractHashMap", 488); + bcb(261, eie, fie, eib); + _2.$b = function fib() { + this.a.$b(); + }; + _2.Hc = function gib(a) { + return dib(this, a); + }; + _2.Kc = function hib() { + return new nib(this.a); + }; + _2.Mc = function iib(a) { + var b; + if (dib(this, a)) { + b = BD(a, 42).cd(); + this.a.Bc(b); + return true; + } + return false; + }; + _2.gc = function jib() { + return this.a.gc(); + }; + mdb(bie, "AbstractHashMap/EntrySet", 261); + bcb(262, 1, aie, nib); + _2.Nb = function oib(a) { + Rrb(this, a); + }; + _2.Pb = function qib() { + return lib(this); + }; + _2.Ob = function pib() { + return this.b; + }; + _2.Qb = function rib() { + mib(this); + }; + _2.b = false; + mdb(bie, "AbstractHashMap/EntrySetIterator", 262); + bcb(417, 1, aie, vib); + _2.Nb = function wib(a) { + Rrb(this, a); + }; + _2.Ob = function xib() { + return sib(this); + }; + _2.Pb = function yib() { + return tib(this); + }; + _2.Qb = function zib() { + uib(this); + }; + _2.b = 0; + _2.c = -1; + mdb(bie, "AbstractList/IteratorImpl", 417); + bcb(96, 417, jie, Bib); + _2.Qb = function Hib() { + uib(this); + }; + _2.Rb = function Cib(a) { + Aib(this, a); + }; + _2.Sb = function Dib() { + return this.b > 0; + }; + _2.Tb = function Eib() { + return this.b; + }; + _2.Ub = function Fib() { + return sCb(this.b > 0), this.a.Xb(this.c = --this.b); + }; + _2.Vb = function Gib() { + return this.b - 1; + }; + _2.Wb = function Iib(a) { + yCb(this.c != -1); + this.a._c(this.c, a); + }; + mdb(bie, "AbstractList/ListIteratorImpl", 96); + bcb(219, 52, Lie, Jib); + _2.Vc = function Kib(a, b) { + wCb(a, this.b); + this.c.Vc(this.a + a, b); + ++this.b; + }; + _2.Xb = function Lib(a) { + tCb(a, this.b); + return this.c.Xb(this.a + a); + }; + _2.$c = function Mib(a) { + var b; + tCb(a, this.b); + b = this.c.$c(this.a + a); + --this.b; + return b; + }; + _2._c = function Nib(a, b) { + tCb(a, this.b); + return this.c._c(this.a + a, b); + }; + _2.gc = function Oib() { + return this.b; + }; + _2.a = 0; + _2.b = 0; + mdb(bie, "AbstractList/SubList", 219); + bcb(384, eie, fie, Pib); + _2.$b = function Qib() { + this.a.$b(); + }; + _2.Hc = function Rib(a) { + return this.a._b(a); + }; + _2.Kc = function Sib() { + var a; + return a = this.a.vc().Kc(), new Vib(a); + }; + _2.Mc = function Tib(a) { + if (this.a._b(a)) { + this.a.Bc(a); + return true; + } + return false; + }; + _2.gc = function Uib() { + return this.a.gc(); + }; + mdb(bie, "AbstractMap/1", 384); + bcb(691, 1, aie, Vib); + _2.Nb = function Wib(a) { + Rrb(this, a); + }; + _2.Ob = function Xib() { + return this.a.Ob(); + }; + _2.Pb = function Yib() { + var a; + return a = BD(this.a.Pb(), 42), a.cd(); + }; + _2.Qb = function Zib() { + this.a.Qb(); + }; + mdb(bie, "AbstractMap/1/1", 691); + bcb(226, 28, die, $ib); + _2.$b = function _ib() { + this.a.$b(); + }; + _2.Hc = function ajb(a) { + return this.a.uc(a); + }; + _2.Kc = function bjb() { + var a; + return a = this.a.vc().Kc(), new djb(a); + }; + _2.gc = function cjb() { + return this.a.gc(); + }; + mdb(bie, "AbstractMap/2", 226); + bcb(294, 1, aie, djb); + _2.Nb = function ejb(a) { + Rrb(this, a); + }; + _2.Ob = function fjb() { + return this.a.Ob(); + }; + _2.Pb = function gjb() { + var a; + return a = BD(this.a.Pb(), 42), a.dd(); + }; + _2.Qb = function hjb() { + this.a.Qb(); + }; + mdb(bie, "AbstractMap/2/1", 294); + bcb(484, 1, { 484: 1, 42: 1 }); + _2.Fb = function jjb(a) { + var b; + if (!JD(a, 42)) { + return false; + } + b = BD(a, 42); + return wtb(this.d, b.cd()) && wtb(this.e, b.dd()); + }; + _2.cd = function kjb() { + return this.d; + }; + _2.dd = function ljb() { + return this.e; + }; + _2.Hb = function mjb() { + return xtb(this.d) ^ xtb(this.e); + }; + _2.ed = function njb(a) { + return ijb(this, a); + }; + _2.Ib = function ojb() { + return this.d + "=" + this.e; + }; + mdb(bie, "AbstractMap/AbstractEntry", 484); + bcb(383, 484, { 484: 1, 383: 1, 42: 1 }, pjb); + mdb(bie, "AbstractMap/SimpleEntry", 383); + bcb(1984, 1, _je); + _2.Fb = function qjb(a) { + var b; + if (!JD(a, 42)) { + return false; + } + b = BD(a, 42); + return wtb(this.cd(), b.cd()) && wtb(this.dd(), b.dd()); + }; + _2.Hb = function rjb() { + return xtb(this.cd()) ^ xtb(this.dd()); + }; + _2.Ib = function sjb() { + return this.cd() + "=" + this.dd(); + }; + mdb(bie, lie, 1984); + bcb(1992, 1967, gie); + _2.tc = function vjb(a) { + return tjb(this, a); + }; + _2._b = function wjb(a) { + return ujb(this, a); + }; + _2.vc = function xjb() { + return new Bjb(this); + }; + _2.xc = function yjb(a) { + var b; + b = a; + return Wd(Awb(this, b)); + }; + _2.ec = function Ajb() { + return new Gjb(this); + }; + mdb(bie, "AbstractNavigableMap", 1992); + bcb(739, eie, fie, Bjb); + _2.Hc = function Cjb(a) { + return JD(a, 42) && tjb(this.b, BD(a, 42)); + }; + _2.Kc = function Djb() { + return new Ywb(this.b); + }; + _2.Mc = function Ejb(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return Kwb(this.b, b); + } + return false; + }; + _2.gc = function Fjb() { + return this.b.c; + }; + mdb(bie, "AbstractNavigableMap/EntrySet", 739); + bcb(493, eie, iie, Gjb); + _2.Nc = function Mjb() { + return new Rub(this); + }; + _2.$b = function Hjb() { + zwb(this.a); + }; + _2.Hc = function Ijb(a) { + return ujb(this.a, a); + }; + _2.Kc = function Jjb() { + var a; + return a = new Ywb(new cxb(this.a).b), new Njb(a); + }; + _2.Mc = function Kjb(a) { + if (ujb(this.a, a)) { + Jwb(this.a, a); + return true; + } + return false; + }; + _2.gc = function Ljb() { + return this.a.c; + }; + mdb(bie, "AbstractNavigableMap/NavigableKeySet", 493); + bcb(494, 1, aie, Njb); + _2.Nb = function Ojb(a) { + Rrb(this, a); + }; + _2.Ob = function Pjb() { + return sib(this.a.a); + }; + _2.Pb = function Qjb() { + var a; + return a = Wwb(this.a), a.cd(); + }; + _2.Qb = function Rjb() { + Xwb(this.a); + }; + mdb(bie, "AbstractNavigableMap/NavigableKeySet/1", 494); + bcb(2004, 28, die); + _2.Fc = function Sjb(a) { + return zCb(cub(this, a)), true; + }; + _2.Gc = function Tjb(a) { + uCb(a); + mCb(a != this, "Can't add a queue to itself"); + return ye(this, a); + }; + _2.$b = function Ujb() { + while (dub(this) != null) + ; + }; + mdb(bie, "AbstractQueue", 2004); + bcb(302, 28, { 4: 1, 20: 1, 28: 1, 14: 1 }, jkb, kkb); + _2.Fc = function lkb(a) { + return Xjb(this, a), true; + }; + _2.$b = function nkb() { + Yjb(this); + }; + _2.Hc = function okb(a) { + return Zjb(new xkb(this), a); + }; + _2.dc = function pkb() { + return akb(this); + }; + _2.Kc = function qkb() { + return new xkb(this); + }; + _2.Mc = function rkb(a) { + return dkb(new xkb(this), a); + }; + _2.gc = function skb() { + return this.c - this.b & this.a.length - 1; + }; + _2.Nc = function tkb() { + return new Kub(this, 272); + }; + _2.Qc = function ukb(a) { + var b; + b = this.c - this.b & this.a.length - 1; + a.length < b && (a = eCb(new Array(b), a)); + $jb(this, a, b); + a.length > b && NC(a, b, null); + return a; + }; + _2.b = 0; + _2.c = 0; + mdb(bie, "ArrayDeque", 302); + bcb(446, 1, aie, xkb); + _2.Nb = function ykb(a) { + Rrb(this, a); + }; + _2.Ob = function zkb() { + return this.a != this.b; + }; + _2.Pb = function Akb() { + return vkb(this); + }; + _2.Qb = function Bkb() { + wkb(this); + }; + _2.a = 0; + _2.b = 0; + _2.c = -1; + mdb(bie, "ArrayDeque/IteratorImpl", 446); + bcb(12, 52, ake, Rkb, Skb, Tkb); + _2.Vc = function Ukb(a, b) { + Dkb(this, a, b); + }; + _2.Fc = function Vkb(a) { + return Ekb(this, a); + }; + _2.Wc = function Wkb(a, b) { + return Fkb(this, a, b); + }; + _2.Gc = function Xkb(a) { + return Gkb(this, a); + }; + _2.$b = function Ykb() { + this.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _2.Hc = function Zkb(a) { + return Jkb(this, a, 0) != -1; + }; + _2.Jc = function $kb(a) { + Hkb(this, a); + }; + _2.Xb = function _kb(a) { + return Ikb(this, a); + }; + _2.Xc = function alb(a) { + return Jkb(this, a, 0); + }; + _2.dc = function blb() { + return this.c.length == 0; + }; + _2.Kc = function clb() { + return new olb(this); + }; + _2.$c = function dlb(a) { + return Kkb(this, a); + }; + _2.Mc = function elb(a) { + return Lkb(this, a); + }; + _2.Ud = function flb(a, b) { + Mkb(this, a, b); + }; + _2._c = function glb(a, b) { + return Nkb(this, a, b); + }; + _2.gc = function hlb() { + return this.c.length; + }; + _2.ad = function ilb(a) { + Okb(this, a); + }; + _2.Pc = function jlb() { + return Pkb(this); + }; + _2.Qc = function klb(a) { + return Qkb(this, a); + }; + var DJ = mdb(bie, "ArrayList", 12); + bcb(7, 1, aie, olb); + _2.Nb = function plb(a) { + Rrb(this, a); + }; + _2.Ob = function qlb() { + return llb(this); + }; + _2.Pb = function rlb() { + return mlb(this); + }; + _2.Qb = function slb() { + nlb(this); + }; + _2.a = 0; + _2.b = -1; + mdb(bie, "ArrayList/1", 7); + bcb(2013, $wnd.Function, {}, Ylb); + _2.te = function Zlb(a, b) { + return Kdb(a, b); + }; + bcb(154, 52, bke, amb); + _2.Hc = function bmb(a) { + return Bt(this, a) != -1; + }; + _2.Jc = function cmb(a) { + var b, c2, d, e; + uCb(a); + for (c2 = this.a, d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + a.td(b); + } + }; + _2.Xb = function dmb(a) { + return $lb(this, a); + }; + _2._c = function emb(a, b) { + var c2; + c2 = (tCb(a, this.a.length), this.a[a]); + NC(this.a, a, b); + return c2; + }; + _2.gc = function fmb() { + return this.a.length; + }; + _2.ad = function gmb(a) { + Mlb(this.a, this.a.length, a); + }; + _2.Pc = function hmb() { + return _lb(this, KC(SI, Uhe, 1, this.a.length, 5, 1)); + }; + _2.Qc = function imb(a) { + return _lb(this, a); + }; + mdb(bie, "Arrays/ArrayList", 154); + var jmb, kmb, lmb; + bcb(940, 52, bke, xmb); + _2.Hc = function ymb(a) { + return false; + }; + _2.Xb = function zmb(a) { + return wmb(a); + }; + _2.Kc = function Amb() { + return mmb(), Emb(), Dmb; + }; + _2.Yc = function Bmb() { + return mmb(), Emb(), Dmb; + }; + _2.gc = function Cmb() { + return 0; + }; + mdb(bie, "Collections/EmptyList", 940); + bcb(941, 1, jie, Fmb); + _2.Nb = function Hmb(a) { + Rrb(this, a); + }; + _2.Rb = function Gmb(a) { + throw vbb(new bgb()); + }; + _2.Ob = function Imb() { + return false; + }; + _2.Sb = function Jmb() { + return false; + }; + _2.Pb = function Kmb() { + throw vbb(new utb()); + }; + _2.Tb = function Lmb() { + return 0; + }; + _2.Ub = function Mmb() { + throw vbb(new utb()); + }; + _2.Vb = function Nmb() { + return -1; + }; + _2.Qb = function Omb() { + throw vbb(new Ydb()); + }; + _2.Wb = function Pmb(a) { + throw vbb(new Ydb()); + }; + var Dmb; + mdb(bie, "Collections/EmptyListIterator", 941); + bcb(943, 1967, Aie, Qmb); + _2._b = function Rmb(a) { + return false; + }; + _2.uc = function Smb(a) { + return false; + }; + _2.vc = function Tmb() { + return mmb(), lmb; + }; + _2.xc = function Umb(a) { + return null; + }; + _2.ec = function Vmb() { + return mmb(), lmb; + }; + _2.gc = function Wmb() { + return 0; + }; + _2.Cc = function Xmb() { + return mmb(), jmb; + }; + mdb(bie, "Collections/EmptyMap", 943); + bcb(942, eie, Cie, Ymb); + _2.Hc = function Zmb(a) { + return false; + }; + _2.Kc = function $mb() { + return mmb(), Emb(), Dmb; + }; + _2.gc = function _mb() { + return 0; + }; + mdb(bie, "Collections/EmptySet", 942); + bcb(599, 52, { 3: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1 }, anb); + _2.Hc = function bnb(a) { + return wtb(this.a, a); + }; + _2.Xb = function cnb(a) { + tCb(a, 1); + return this.a; + }; + _2.gc = function dnb() { + return 1; + }; + mdb(bie, "Collections/SingletonList", 599); + bcb(372, 1, wie, lnb); + _2.Jc = function rnb(a) { + reb(this, a); + }; + _2.Lc = function unb() { + return new YAb(null, this.Nc()); + }; + _2.Nc = function xnb() { + return new Kub(this, 0); + }; + _2.Oc = function ynb() { + return new YAb(null, this.Nc()); + }; + _2.Fc = function mnb(a) { + return enb(); + }; + _2.Gc = function nnb(a) { + return fnb(); + }; + _2.$b = function onb() { + gnb(); + }; + _2.Hc = function pnb(a) { + return hnb(this, a); + }; + _2.Ic = function qnb(a) { + return inb(this, a); + }; + _2.dc = function snb() { + return this.b.dc(); + }; + _2.Kc = function tnb() { + return new Dnb(this.b.Kc()); + }; + _2.Mc = function vnb(a) { + return jnb(); + }; + _2.gc = function wnb() { + return this.b.gc(); + }; + _2.Pc = function znb() { + return this.b.Pc(); + }; + _2.Qc = function Anb(a) { + return knb(this, a); + }; + _2.Ib = function Bnb() { + return fcb(this.b); + }; + mdb(bie, "Collections/UnmodifiableCollection", 372); + bcb(371, 1, aie, Dnb); + _2.Nb = function Enb(a) { + Rrb(this, a); + }; + _2.Ob = function Fnb() { + return this.b.Ob(); + }; + _2.Pb = function Gnb() { + return this.b.Pb(); + }; + _2.Qb = function Hnb() { + Cnb(); + }; + mdb(bie, "Collections/UnmodifiableCollectionIterator", 371); + bcb(531, 372, cke, Inb); + _2.Nc = function Vnb() { + return new Kub(this, 16); + }; + _2.Vc = function Jnb(a, b) { + throw vbb(new bgb()); + }; + _2.Wc = function Knb(a, b) { + throw vbb(new bgb()); + }; + _2.Fb = function Lnb(a) { + return pb(this.a, a); + }; + _2.Xb = function Mnb(a) { + return this.a.Xb(a); + }; + _2.Hb = function Nnb() { + return tb(this.a); + }; + _2.Xc = function Onb(a) { + return this.a.Xc(a); + }; + _2.dc = function Pnb() { + return this.a.dc(); + }; + _2.Yc = function Qnb() { + return new Xnb(this.a.Zc(0)); + }; + _2.Zc = function Rnb(a) { + return new Xnb(this.a.Zc(a)); + }; + _2.$c = function Snb(a) { + throw vbb(new bgb()); + }; + _2._c = function Tnb(a, b) { + throw vbb(new bgb()); + }; + _2.ad = function Unb(a) { + throw vbb(new bgb()); + }; + _2.bd = function Wnb(a, b) { + return new Inb(this.a.bd(a, b)); + }; + mdb(bie, "Collections/UnmodifiableList", 531); + bcb(690, 371, jie, Xnb); + _2.Qb = function bob() { + Cnb(); + }; + _2.Rb = function Ynb(a) { + throw vbb(new bgb()); + }; + _2.Sb = function Znb() { + return this.a.Sb(); + }; + _2.Tb = function $nb() { + return this.a.Tb(); + }; + _2.Ub = function _nb() { + return this.a.Ub(); + }; + _2.Vb = function aob() { + return this.a.Vb(); + }; + _2.Wb = function cob(a) { + throw vbb(new bgb()); + }; + mdb(bie, "Collections/UnmodifiableListIterator", 690); + bcb(600, 1, cie, iob); + _2.wc = function oob(a) { + stb(this, a); + }; + _2.yc = function tob(a, b, c2) { + return ttb(this, a, b, c2); + }; + _2.$b = function job() { + throw vbb(new bgb()); + }; + _2._b = function kob(a) { + return this.c._b(a); + }; + _2.uc = function lob(a) { + return dob(this, a); + }; + _2.vc = function mob() { + return eob(this); + }; + _2.Fb = function nob(a) { + return fob(this, a); + }; + _2.xc = function pob(a) { + return this.c.xc(a); + }; + _2.Hb = function qob() { + return tb(this.c); + }; + _2.dc = function rob() { + return this.c.dc(); + }; + _2.ec = function sob() { + return gob(this); + }; + _2.zc = function uob(a, b) { + throw vbb(new bgb()); + }; + _2.Bc = function vob(a) { + throw vbb(new bgb()); + }; + _2.gc = function wob() { + return this.c.gc(); + }; + _2.Ib = function xob() { + return fcb(this.c); + }; + _2.Cc = function yob() { + return hob(this); + }; + mdb(bie, "Collections/UnmodifiableMap", 600); + bcb(382, 372, Bie, zob); + _2.Nc = function Cob() { + return new Kub(this, 1); + }; + _2.Fb = function Aob(a) { + return pb(this.b, a); + }; + _2.Hb = function Bob() { + return tb(this.b); + }; + mdb(bie, "Collections/UnmodifiableSet", 382); + bcb(944, 382, Bie, Gob); + _2.Hc = function Hob(a) { + return Dob(this, a); + }; + _2.Ic = function Iob(a) { + return this.b.Ic(a); + }; + _2.Kc = function Job() { + var a; + a = this.b.Kc(); + return new Mob(a); + }; + _2.Pc = function Kob() { + var a; + a = this.b.Pc(); + Fob(a, a.length); + return a; + }; + _2.Qc = function Lob(a) { + return Eob(this, a); + }; + mdb(bie, "Collections/UnmodifiableMap/UnmodifiableEntrySet", 944); + bcb(945, 1, aie, Mob); + _2.Nb = function Nob(a) { + Rrb(this, a); + }; + _2.Pb = function Pob() { + return new Rob(BD(this.a.Pb(), 42)); + }; + _2.Ob = function Oob() { + return this.a.Ob(); + }; + _2.Qb = function Qob() { + throw vbb(new bgb()); + }; + mdb(bie, "Collections/UnmodifiableMap/UnmodifiableEntrySet/1", 945); + bcb(688, 1, _je, Rob); + _2.Fb = function Sob(a) { + return this.a.Fb(a); + }; + _2.cd = function Tob() { + return this.a.cd(); + }; + _2.dd = function Uob() { + return this.a.dd(); + }; + _2.Hb = function Vob() { + return this.a.Hb(); + }; + _2.ed = function Wob(a) { + throw vbb(new bgb()); + }; + _2.Ib = function Xob() { + return fcb(this.a); + }; + mdb(bie, "Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry", 688); + bcb(601, 531, { 20: 1, 14: 1, 15: 1, 54: 1 }, Yob); + mdb(bie, "Collections/UnmodifiableRandomAccessList", 601); + bcb(689, 382, Die, Zob); + _2.Nc = function apb() { + return new Rub(this); + }; + _2.Fb = function $ob(a) { + return pb(this.a, a); + }; + _2.Hb = function _ob() { + return tb(this.a); + }; + mdb(bie, "Collections/UnmodifiableSortedSet", 689); + bcb(847, 1, dke, bpb); + _2.ue = function cpb(a, b) { + var c2; + return c2 = Ucc(BD(a, 11), BD(b, 11)), c2 != 0 ? c2 : Wcc(BD(a, 11), BD(b, 11)); + }; + _2.Fb = function dpb(a) { + return this === a; + }; + _2.ve = function epb() { + return new tpb(this); + }; + mdb(bie, "Comparator/lambda$0$Type", 847); + var fpb, gpb, hpb; + bcb(751, 1, dke, kpb); + _2.ue = function lpb(a, b) { + return jpb(BD(a, 35), BD(b, 35)); + }; + _2.Fb = function mpb(a) { + return this === a; + }; + _2.ve = function npb() { + return ipb(), hpb; + }; + mdb(bie, "Comparators/NaturalOrderComparator", 751); + bcb(1177, 1, dke, ppb); + _2.ue = function qpb(a, b) { + return opb(BD(a, 35), BD(b, 35)); + }; + _2.Fb = function rpb(a) { + return this === a; + }; + _2.ve = function spb() { + return ipb(), gpb; + }; + mdb(bie, "Comparators/ReverseNaturalOrderComparator", 1177); + bcb(64, 1, dke, tpb); + _2.Fb = function vpb(a) { + return this === a; + }; + _2.ue = function upb(a, b) { + return this.a.ue(b, a); + }; + _2.ve = function wpb() { + return this.a; + }; + mdb(bie, "Comparators/ReversedComparator", 64); + bcb(166, 60, Tie, Apb); + mdb(bie, "ConcurrentModificationException", 166); + var Bpb, Cpb; + bcb(1904, 1, eke, Gpb); + _2.we = function Hpb(a) { + Epb(this, a); + }; + _2.Ib = function Ipb() { + return "DoubleSummaryStatistics[count = " + Ubb(this.a) + ", avg = " + (Dbb(this.a, 0) ? Fpb(this) / Sbb(this.a) : 0) + ", min = " + this.c + ", max = " + this.b + ", sum = " + Fpb(this) + "]"; + }; + _2.a = 0; + _2.b = Qje; + _2.c = Pje; + _2.d = 0; + _2.e = 0; + _2.f = 0; + mdb(bie, "DoubleSummaryStatistics", 1904); + bcb(1805, 60, Tie, Jpb); + mdb(bie, "EmptyStackException", 1805); + bcb(451, 1967, cie, Rpb); + _2.zc = function Xpb(a, b) { + return Opb(this, a, b); + }; + _2.$b = function Spb() { + Kpb(this); + }; + _2._b = function Tpb(a) { + return Lpb(this, a); + }; + _2.uc = function Upb(a) { + var b, c2; + for (c2 = new Gqb(this.a); c2.a < c2.c.a.length; ) { + b = Fqb(c2); + if (wtb(a, this.b[b.g])) { + return true; + } + } + return false; + }; + _2.vc = function Vpb() { + return new _pb(this); + }; + _2.xc = function Wpb(a) { + return Mpb(this, a); + }; + _2.Bc = function Ypb(a) { + return Ppb(this, a); + }; + _2.gc = function Zpb() { + return this.a.c; + }; + mdb(bie, "EnumMap", 451); + bcb(1352, eie, fie, _pb); + _2.$b = function aqb() { + Kpb(this.a); + }; + _2.Hc = function bqb(a) { + return $pb(this, a); + }; + _2.Kc = function cqb() { + return new fqb(this.a); + }; + _2.Mc = function dqb(a) { + var b; + if ($pb(this, a)) { + b = BD(a, 42).cd(); + Ppb(this.a, b); + return true; + } + return false; + }; + _2.gc = function eqb() { + return this.a.a.c; + }; + mdb(bie, "EnumMap/EntrySet", 1352); + bcb(1353, 1, aie, fqb); + _2.Nb = function gqb(a) { + Rrb(this, a); + }; + _2.Pb = function iqb() { + return this.b = Fqb(this.a), new kqb(this.c, this.b); + }; + _2.Ob = function hqb() { + return Eqb(this.a); + }; + _2.Qb = function jqb() { + yCb(!!this.b); + Ppb(this.c, this.b); + this.b = null; + }; + mdb(bie, "EnumMap/EntrySetIterator", 1353); + bcb(1354, 1984, _je, kqb); + _2.cd = function lqb() { + return this.a; + }; + _2.dd = function mqb() { + return this.b.b[this.a.g]; + }; + _2.ed = function nqb(a) { + return Qpb(this.b, this.a.g, a); + }; + mdb(bie, "EnumMap/MapEntry", 1354); + bcb(174, eie, { 20: 1, 28: 1, 14: 1, 174: 1, 21: 1 }); + var hK = mdb(bie, "EnumSet", 174); + bcb(156, 174, { 20: 1, 28: 1, 14: 1, 174: 1, 156: 1, 21: 1 }, xqb); + _2.Fc = function yqb(a) { + return rqb(this, BD(a, 22)); + }; + _2.Hc = function zqb(a) { + return tqb(this, a); + }; + _2.Kc = function Aqb() { + return new Gqb(this); + }; + _2.Mc = function Bqb(a) { + return vqb(this, a); + }; + _2.gc = function Cqb() { + return this.c; + }; + _2.c = 0; + mdb(bie, "EnumSet/EnumSetImpl", 156); + bcb(343, 1, aie, Gqb); + _2.Nb = function Hqb(a) { + Rrb(this, a); + }; + _2.Pb = function Jqb() { + return Fqb(this); + }; + _2.Ob = function Iqb() { + return Eqb(this); + }; + _2.Qb = function Kqb() { + yCb(this.b != -1); + NC(this.c.b, this.b, null); + --this.c.c; + this.b = -1; + }; + _2.a = -1; + _2.b = -1; + mdb(bie, "EnumSet/EnumSetImpl/IteratorImpl", 343); + bcb(43, 488, fke, Lqb, Mqb, Nqb); + _2.re = function Oqb(a, b) { + return PD(a) === PD(b) || a != null && pb(a, b); + }; + _2.se = function Pqb(a) { + var b; + b = tb(a); + return b | 0; + }; + mdb(bie, "HashMap", 43); + bcb(53, eie, gke, Tqb, Uqb, Vqb); + _2.Fc = function Xqb(a) { + return Qqb(this, a); + }; + _2.$b = function Yqb() { + this.a.$b(); + }; + _2.Hc = function Zqb(a) { + return Rqb(this, a); + }; + _2.dc = function $qb() { + return this.a.gc() == 0; + }; + _2.Kc = function _qb() { + return this.a.ec().Kc(); + }; + _2.Mc = function arb(a) { + return Sqb(this, a); + }; + _2.gc = function brb() { + return this.a.gc(); + }; + var jK = mdb(bie, "HashSet", 53); + bcb(1781, 1, sie, drb); + _2.ud = function erb(a) { + crb(this, a); + }; + _2.Ib = function frb() { + return "IntSummaryStatistics[count = " + Ubb(this.a) + ", avg = " + (Dbb(this.a, 0) ? Sbb(this.d) / Sbb(this.a) : 0) + ", min = " + this.c + ", max = " + this.b + ", sum = " + Ubb(this.d) + "]"; + }; + _2.a = 0; + _2.b = Rie; + _2.c = Ohe; + _2.d = 0; + mdb(bie, "IntSummaryStatistics", 1781); + bcb(1049, 1, vie, lrb); + _2.Jc = function mrb(a) { + reb(this, a); + }; + _2.Kc = function nrb() { + return new orb(this); + }; + _2.c = 0; + mdb(bie, "InternalHashCodeMap", 1049); + bcb(711, 1, aie, orb); + _2.Nb = function prb(a) { + Rrb(this, a); + }; + _2.Pb = function rrb() { + return this.d = this.a[this.c++], this.d; + }; + _2.Ob = function qrb() { + var a; + if (this.c < this.a.length) { + return true; + } + a = this.b.next(); + if (!a.done) { + this.a = a.value[1]; + this.c = 0; + return true; + } + return false; + }; + _2.Qb = function srb() { + krb(this.e, this.d.cd()); + this.c != 0 && --this.c; + }; + _2.c = 0; + _2.d = null; + mdb(bie, "InternalHashCodeMap/1", 711); + var vrb; + bcb(1047, 1, vie, Frb); + _2.Jc = function Grb(a) { + reb(this, a); + }; + _2.Kc = function Hrb() { + return new Irb(this); + }; + _2.c = 0; + _2.d = 0; + mdb(bie, "InternalStringMap", 1047); + bcb(710, 1, aie, Irb); + _2.Nb = function Jrb(a) { + Rrb(this, a); + }; + _2.Pb = function Lrb() { + return this.c = this.a, this.a = this.b.next(), new Nrb(this.d, this.c, this.d.d); + }; + _2.Ob = function Krb() { + return !this.a.done; + }; + _2.Qb = function Mrb() { + Erb(this.d, this.c.value[0]); + }; + mdb(bie, "InternalStringMap/1", 710); + bcb(1048, 1984, _je, Nrb); + _2.cd = function Orb() { + return this.b.value[0]; + }; + _2.dd = function Prb() { + if (this.a.d != this.c) { + return Crb(this.a, this.b.value[0]); + } + return this.b.value[1]; + }; + _2.ed = function Qrb(a) { + return Drb(this.a, this.b.value[0], a); + }; + _2.c = 0; + mdb(bie, "InternalStringMap/2", 1048); + bcb(228, 43, fke, $rb, _rb); + _2.$b = function asb() { + Urb(this); + }; + _2._b = function bsb(a) { + return Vrb(this, a); + }; + _2.uc = function csb(a) { + var b; + b = this.d.a; + while (b != this.d) { + if (wtb(b.e, a)) { + return true; + } + b = b.a; + } + return false; + }; + _2.vc = function dsb() { + return new nsb(this); + }; + _2.xc = function esb(a) { + return Wrb(this, a); + }; + _2.zc = function fsb(a, b) { + return Xrb(this, a, b); + }; + _2.Bc = function gsb(a) { + return Zrb(this, a); + }; + _2.gc = function hsb() { + return Vhb(this.e); + }; + _2.c = false; + mdb(bie, "LinkedHashMap", 228); + bcb(387, 383, { 484: 1, 383: 1, 387: 1, 42: 1 }, ksb, lsb); + mdb(bie, "LinkedHashMap/ChainEntry", 387); + bcb(701, eie, fie, nsb); + _2.$b = function osb() { + Urb(this.a); + }; + _2.Hc = function psb(a) { + return msb(this, a); + }; + _2.Kc = function qsb() { + return new usb(this); + }; + _2.Mc = function rsb(a) { + var b; + if (msb(this, a)) { + b = BD(a, 42).cd(); + Zrb(this.a, b); + return true; + } + return false; + }; + _2.gc = function ssb() { + return Vhb(this.a.e); + }; + mdb(bie, "LinkedHashMap/EntrySet", 701); + bcb(702, 1, aie, usb); + _2.Nb = function vsb(a) { + Rrb(this, a); + }; + _2.Pb = function xsb() { + return tsb(this); + }; + _2.Ob = function wsb() { + return this.b != this.c.a.d; + }; + _2.Qb = function ysb() { + yCb(!!this.a); + xpb(this.c.a.e, this); + jsb(this.a); + Thb(this.c.a.e, this.a.d); + ypb(this.c.a.e, this); + this.a = null; + }; + mdb(bie, "LinkedHashMap/EntrySet/EntryIterator", 702); + bcb(178, 53, gke, zsb, Asb, Bsb); + var uK = mdb(bie, "LinkedHashSet", 178); + bcb(68, 1964, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 68: 1, 15: 1 }, Psb, Qsb); + _2.Fc = function Rsb(a) { + return Dsb(this, a); + }; + _2.$b = function Ssb() { + Osb(this); + }; + _2.Zc = function Tsb(a) { + return Jsb(this, a); + }; + _2.gc = function Usb() { + return this.b; + }; + _2.b = 0; + var xK = mdb(bie, "LinkedList", 68); + bcb(970, 1, jie, $sb); + _2.Nb = function atb(a) { + Rrb(this, a); + }; + _2.Rb = function _sb(a) { + Vsb(this, a); + }; + _2.Ob = function btb() { + return Wsb(this); + }; + _2.Sb = function ctb() { + return this.b.b != this.d.a; + }; + _2.Pb = function dtb() { + return Xsb(this); + }; + _2.Tb = function etb() { + return this.a; + }; + _2.Ub = function ftb() { + return Ysb(this); + }; + _2.Vb = function gtb() { + return this.a - 1; + }; + _2.Qb = function htb() { + Zsb(this); + }; + _2.Wb = function itb(a) { + yCb(!!this.c); + this.c.c = a; + }; + _2.a = 0; + _2.c = null; + mdb(bie, "LinkedList/ListIteratorImpl", 970); + bcb(608, 1, {}, jtb); + mdb(bie, "LinkedList/Node", 608); + bcb(1959, 1, {}); + var ltb, mtb; + mdb(bie, "Locale", 1959); + bcb(861, 1959, {}, otb); + _2.Ib = function ptb() { + return ""; + }; + mdb(bie, "Locale/1", 861); + bcb(862, 1959, {}, qtb); + _2.Ib = function rtb() { + return "unknown"; + }; + mdb(bie, "Locale/4", 862); + bcb(109, 60, { 3: 1, 102: 1, 60: 1, 78: 1, 109: 1 }, utb, vtb); + mdb(bie, "NoSuchElementException", 109); + bcb(404, 1, { 404: 1 }, Ftb); + _2.Fb = function Gtb(a) { + var b; + if (a === this) { + return true; + } + if (!JD(a, 404)) { + return false; + } + b = BD(a, 404); + return wtb(this.a, b.a); + }; + _2.Hb = function Htb() { + return xtb(this.a); + }; + _2.Ib = function Jtb() { + return this.a != null ? Whe + xfb(this.a) + ")" : "Optional.empty()"; + }; + var ztb; + mdb(bie, "Optional", 404); + bcb(463, 1, { 463: 1 }, Otb, Ptb); + _2.Fb = function Qtb(a) { + var b; + if (a === this) { + return true; + } + if (!JD(a, 463)) { + return false; + } + b = BD(a, 463); + return this.a == b.a && Kdb(this.b, b.b) == 0; + }; + _2.Hb = function Rtb() { + return this.a ? QD(this.b) : 0; + }; + _2.Ib = function Stb() { + return this.a ? "OptionalDouble.of(" + ("" + this.b) + ")" : "OptionalDouble.empty()"; + }; + _2.a = false; + _2.b = 0; + var Ktb; + mdb(bie, "OptionalDouble", 463); + bcb(517, 1, { 517: 1 }, Wtb, Xtb); + _2.Fb = function Ytb(a) { + var b; + if (a === this) { + return true; + } + if (!JD(a, 517)) { + return false; + } + b = BD(a, 517); + return this.a == b.a && beb(this.b, b.b) == 0; + }; + _2.Hb = function Ztb() { + return this.a ? this.b : 0; + }; + _2.Ib = function $tb() { + return this.a ? "OptionalInt.of(" + ("" + this.b) + ")" : "OptionalInt.empty()"; + }; + _2.a = false; + _2.b = 0; + var Ttb; + mdb(bie, "OptionalInt", 517); + bcb(503, 2004, die, gub); + _2.Gc = function hub(a) { + return _tb(this, a); + }; + _2.$b = function iub() { + this.b.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _2.Hc = function jub(a) { + return (a == null ? -1 : Jkb(this.b, a, 0)) != -1; + }; + _2.Kc = function kub() { + return new qub(this); + }; + _2.Mc = function lub(a) { + return eub(this, a); + }; + _2.gc = function mub() { + return this.b.c.length; + }; + _2.Nc = function nub() { + return new Kub(this, 256); + }; + _2.Pc = function oub() { + return Pkb(this.b); + }; + _2.Qc = function pub(a) { + return Qkb(this.b, a); + }; + mdb(bie, "PriorityQueue", 503); + bcb(1277, 1, aie, qub); + _2.Nb = function rub(a) { + Rrb(this, a); + }; + _2.Ob = function tub() { + return this.a < this.c.b.c.length; + }; + _2.Pb = function uub() { + sCb(this.a < this.c.b.c.length); + this.b = this.a++; + return Ikb(this.c.b, this.b); + }; + _2.Qb = function vub() { + yCb(this.b != -1); + fub(this.c, this.a = this.b); + this.b = -1; + }; + _2.a = 0; + _2.b = -1; + mdb(bie, "PriorityQueue/1", 1277); + bcb(230, 1, { 230: 1 }, Gub, Hub); + _2.a = 0; + _2.b = 0; + var wub, xub, yub = 0; + mdb(bie, "Random", 230); + bcb(27, 1, pie2, Kub, Lub, Mub); + _2.qd = function Nub() { + return this.a; + }; + _2.rd = function Oub() { + Iub(this); + return this.c; + }; + _2.Nb = function Pub(a) { + Iub(this); + this.d.Nb(a); + }; + _2.sd = function Qub(a) { + return Jub(this, a); + }; + _2.a = 0; + _2.c = 0; + mdb(bie, "Spliterators/IteratorSpliterator", 27); + bcb(485, 27, pie2, Rub); + mdb(bie, "SortedSet/1", 485); + bcb(602, 1, eke, Tub); + _2.we = function Uub(a) { + this.a.td(a); + }; + mdb(bie, "Spliterator/OfDouble/0methodref$accept$Type", 602); + bcb(603, 1, eke, Vub); + _2.we = function Wub(a) { + this.a.td(a); + }; + mdb(bie, "Spliterator/OfDouble/1methodref$accept$Type", 603); + bcb(604, 1, sie, Xub); + _2.ud = function Yub(a) { + this.a.td(meb(a)); + }; + mdb(bie, "Spliterator/OfInt/2methodref$accept$Type", 604); + bcb(605, 1, sie, Zub); + _2.ud = function $ub(a) { + this.a.td(meb(a)); + }; + mdb(bie, "Spliterator/OfInt/3methodref$accept$Type", 605); + bcb(617, 1, pie2); + _2.Nb = function evb(a) { + Sub(this, a); + }; + _2.qd = function cvb() { + return this.d; + }; + _2.rd = function dvb() { + return this.e; + }; + _2.d = 0; + _2.e = 0; + mdb(bie, "Spliterators/BaseSpliterator", 617); + bcb(721, 617, pie2); + _2.xe = function gvb(a) { + _ub(this, a); + }; + _2.Nb = function hvb(a) { + JD(a, 182) ? _ub(this, BD(a, 182)) : _ub(this, new Vub(a)); + }; + _2.sd = function ivb(a) { + return JD(a, 182) ? this.ye(BD(a, 182)) : this.ye(new Tub(a)); + }; + mdb(bie, "Spliterators/AbstractDoubleSpliterator", 721); + bcb(720, 617, pie2); + _2.xe = function kvb(a) { + _ub(this, a); + }; + _2.Nb = function lvb(a) { + JD(a, 196) ? _ub(this, BD(a, 196)) : _ub(this, new Zub(a)); + }; + _2.sd = function mvb(a) { + return JD(a, 196) ? this.ye(BD(a, 196)) : this.ye(new Xub(a)); + }; + mdb(bie, "Spliterators/AbstractIntSpliterator", 720); + bcb(540, 617, pie2); + mdb(bie, "Spliterators/AbstractSpliterator", 540); + bcb(692, 1, pie2); + _2.Nb = function tvb(a) { + Sub(this, a); + }; + _2.qd = function rvb() { + return this.b; + }; + _2.rd = function svb() { + return this.d - this.c; + }; + _2.b = 0; + _2.c = 0; + _2.d = 0; + mdb(bie, "Spliterators/BaseArraySpliterator", 692); + bcb(947, 692, pie2, vvb); + _2.ze = function wvb(a, b) { + uvb(this, BD(a, 38), b); + }; + _2.Nb = function xvb(a) { + ovb(this, a); + }; + _2.sd = function yvb(a) { + return pvb(this, a); + }; + mdb(bie, "Spliterators/ArraySpliterator", 947); + bcb(693, 692, pie2, Avb); + _2.ze = function Cvb(a, b) { + zvb(this, BD(a, 182), b); + }; + _2.xe = function Dvb(a) { + ovb(this, a); + }; + _2.Nb = function Evb(a) { + JD(a, 182) ? ovb(this, BD(a, 182)) : ovb(this, new Vub(a)); + }; + _2.ye = function Fvb(a) { + return pvb(this, a); + }; + _2.sd = function Gvb(a) { + return JD(a, 182) ? pvb(this, BD(a, 182)) : pvb(this, new Tub(a)); + }; + mdb(bie, "Spliterators/DoubleArraySpliterator", 693); + bcb(1968, 1, pie2); + _2.Nb = function Lvb(a) { + Sub(this, a); + }; + _2.qd = function Jvb() { + return 16448; + }; + _2.rd = function Kvb() { + return 0; + }; + var Hvb; + mdb(bie, "Spliterators/EmptySpliterator", 1968); + bcb(946, 1968, pie2, Ovb); + _2.xe = function Pvb(a) { + Mvb(a); + }; + _2.Nb = function Qvb(a) { + JD(a, 196) ? Mvb(BD(a, 196)) : Mvb(new Zub(a)); + }; + _2.ye = function Rvb(a) { + return Nvb(a); + }; + _2.sd = function Svb(a) { + return JD(a, 196) ? Nvb(BD(a, 196)) : Nvb(new Xub(a)); + }; + mdb(bie, "Spliterators/EmptySpliterator/OfInt", 946); + bcb(580, 52, pke, Wvb); + _2.Vc = function Xvb(a, b) { + _vb(a, this.a.c.length + 1); + Dkb(this.a, a, b); + }; + _2.Fc = function Yvb(a) { + return Ekb(this.a, a); + }; + _2.Wc = function Zvb(a, b) { + _vb(a, this.a.c.length + 1); + return Fkb(this.a, a, b); + }; + _2.Gc = function $vb(a) { + return Gkb(this.a, a); + }; + _2.$b = function awb() { + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _2.Hc = function bwb(a) { + return Jkb(this.a, a, 0) != -1; + }; + _2.Ic = function cwb(a) { + return Be(this.a, a); + }; + _2.Jc = function dwb(a) { + Hkb(this.a, a); + }; + _2.Xb = function ewb(a) { + return _vb(a, this.a.c.length), Ikb(this.a, a); + }; + _2.Xc = function fwb(a) { + return Jkb(this.a, a, 0); + }; + _2.dc = function gwb() { + return this.a.c.length == 0; + }; + _2.Kc = function hwb() { + return new olb(this.a); + }; + _2.$c = function iwb(a) { + return _vb(a, this.a.c.length), Kkb(this.a, a); + }; + _2.Ud = function jwb(a, b) { + Mkb(this.a, a, b); + }; + _2._c = function kwb(a, b) { + return _vb(a, this.a.c.length), Nkb(this.a, a, b); + }; + _2.gc = function lwb() { + return this.a.c.length; + }; + _2.ad = function mwb(a) { + Okb(this.a, a); + }; + _2.bd = function nwb(a, b) { + return new Jib(this.a, a, b); + }; + _2.Pc = function owb() { + return Pkb(this.a); + }; + _2.Qc = function pwb(a) { + return Qkb(this.a, a); + }; + _2.Ib = function qwb() { + return Fe(this.a); + }; + mdb(bie, "Vector", 580); + bcb(809, 580, pke, twb); + mdb(bie, "Stack", 809); + bcb(206, 1, { 206: 1 }, xwb); + _2.Ib = function ywb() { + return wwb(this); + }; + mdb(bie, "StringJoiner", 206); + bcb(544, 1992, { 3: 1, 83: 1, 171: 1, 161: 1 }, Pwb, Qwb); + _2.$b = function Rwb() { + zwb(this); + }; + _2.vc = function Swb() { + return new cxb(this); + }; + _2.zc = function Twb(a, b) { + return Iwb(this, a, b); + }; + _2.Bc = function Uwb(a) { + return Jwb(this, a); + }; + _2.gc = function Vwb() { + return this.c; + }; + _2.c = 0; + mdb(bie, "TreeMap", 544); + bcb(390, 1, aie, Ywb); + _2.Nb = function $wb(a) { + Rrb(this, a); + }; + _2.Pb = function axb() { + return Wwb(this); + }; + _2.Ob = function _wb() { + return sib(this.a); + }; + _2.Qb = function bxb() { + Xwb(this); + }; + mdb(bie, "TreeMap/EntryIterator", 390); + bcb(435, 739, fie, cxb); + _2.$b = function dxb() { + zwb(this.a); + }; + mdb(bie, "TreeMap/EntrySet", 435); + bcb(436, 383, { 484: 1, 383: 1, 42: 1, 436: 1 }, exb); + _2.b = false; + var dL = mdb(bie, "TreeMap/Node", 436); + bcb(621, 1, {}, fxb); + _2.Ib = function gxb() { + return "State: mv=" + this.c + " value=" + this.d + " done=" + this.a + " found=" + this.b; + }; + _2.a = false; + _2.b = false; + _2.c = false; + mdb(bie, "TreeMap/State", 621); + bcb(297, 22, qke, mxb); + _2.Ae = function nxb() { + return false; + }; + _2.Be = function oxb() { + return false; + }; + var hxb, ixb, jxb, kxb; + var iL = ndb(bie, "TreeMap/SubMapType", 297, CI, qxb, pxb); + bcb(1112, 297, qke, rxb); + _2.Be = function sxb() { + return true; + }; + ndb(bie, "TreeMap/SubMapType/1", 1112, iL, null, null); + bcb(1113, 297, qke, txb); + _2.Ae = function uxb() { + return true; + }; + _2.Be = function vxb() { + return true; + }; + ndb(bie, "TreeMap/SubMapType/2", 1113, iL, null, null); + bcb(1114, 297, qke, wxb); + _2.Ae = function xxb() { + return true; + }; + ndb(bie, "TreeMap/SubMapType/3", 1114, iL, null, null); + var yxb; + bcb(208, eie, { 3: 1, 20: 1, 28: 1, 14: 1, 271: 1, 21: 1, 84: 1, 208: 1 }, Gxb, Hxb); + _2.Nc = function Oxb() { + return new Rub(this); + }; + _2.Fc = function Ixb(a) { + return Axb(this, a); + }; + _2.$b = function Jxb() { + zwb(this.a); + }; + _2.Hc = function Kxb(a) { + return ujb(this.a, a); + }; + _2.Kc = function Lxb() { + var a; + return a = new Ywb(new cxb(new Gjb(this.a).a).b), new Njb(a); + }; + _2.Mc = function Mxb(a) { + return Fxb(this, a); + }; + _2.gc = function Nxb() { + return this.a.c; + }; + var kL = mdb(bie, "TreeSet", 208); + bcb(966, 1, {}, Rxb); + _2.Ce = function Sxb(a, b) { + return Pxb(this.a, a, b); + }; + mdb(rke, "BinaryOperator/lambda$0$Type", 966); + bcb(967, 1, {}, Txb); + _2.Ce = function Uxb(a, b) { + return Qxb(this.a, a, b); + }; + mdb(rke, "BinaryOperator/lambda$1$Type", 967); + bcb(846, 1, {}, Vxb); + _2.Kb = function Wxb(a) { + return a; + }; + mdb(rke, "Function/lambda$0$Type", 846); + bcb(431, 1, Oie, Xxb); + _2.Mb = function Yxb(a) { + return !this.a.Mb(a); + }; + mdb(rke, "Predicate/lambda$2$Type", 431); + bcb(572, 1, { 572: 1 }); + var qL = mdb(ske, "Handler", 572); + bcb(2007, 1, Qhe); + _2.ne = function _xb() { + return "DUMMY"; + }; + _2.Ib = function ayb() { + return this.ne(); + }; + var Zxb; + mdb(ske, "Level", 2007); + bcb(1621, 2007, Qhe, byb); + _2.ne = function cyb() { + return "INFO"; + }; + mdb(ske, "Level/LevelInfo", 1621); + bcb(1640, 1, {}, gyb); + var dyb; + mdb(ske, "LogManager", 1640); + bcb(1780, 1, Qhe, iyb); + _2.b = null; + mdb(ske, "LogRecord", 1780); + bcb(512, 1, { 512: 1 }, wyb); + _2.e = false; + var jyb = false, kyb = false, lyb = false, myb = false, nyb = false; + mdb(ske, "Logger", 512); + bcb(819, 572, { 572: 1 }, zyb); + mdb(ske, "SimpleConsoleLogHandler", 819); + bcb(132, 22, { 3: 1, 35: 1, 22: 1, 132: 1 }, Gyb); + var Cyb, Dyb, Eyb; + var xL = ndb(vke, "Collector/Characteristics", 132, CI, Iyb, Hyb); + var Jyb; + bcb(744, 1, {}, Lyb); + mdb(vke, "CollectorImpl", 744); + bcb(1060, 1, {}, Zyb); + _2.Ce = function $yb(a, b) { + return vwb(BD(a, 206), BD(b, 206)); + }; + mdb(vke, "Collectors/10methodref$merge$Type", 1060); + bcb(1061, 1, {}, _yb); + _2.Kb = function azb(a) { + return wwb(BD(a, 206)); + }; + mdb(vke, "Collectors/11methodref$toString$Type", 1061); + bcb(1062, 1, {}, bzb); + _2.Kb = function czb(a) { + return Bcb(), _Pb(a) ? true : false; + }; + mdb(vke, "Collectors/12methodref$test$Type", 1062); + bcb(251, 1, {}, dzb); + _2.Od = function ezb(a, b) { + BD(a, 14).Fc(b); + }; + mdb(vke, "Collectors/20methodref$add$Type", 251); + bcb(253, 1, {}, fzb); + _2.Ee = function gzb() { + return new Rkb(); + }; + mdb(vke, "Collectors/21methodref$ctor$Type", 253); + bcb(346, 1, {}, hzb); + _2.Ee = function izb() { + return new Tqb(); + }; + mdb(vke, "Collectors/23methodref$ctor$Type", 346); + bcb(347, 1, {}, jzb); + _2.Od = function kzb(a, b) { + Qqb(BD(a, 53), b); + }; + mdb(vke, "Collectors/24methodref$add$Type", 347); + bcb(1055, 1, {}, lzb); + _2.Ce = function mzb(a, b) { + return Myb(BD(a, 15), BD(b, 14)); + }; + mdb(vke, "Collectors/4methodref$addAll$Type", 1055); + bcb(1059, 1, {}, nzb); + _2.Od = function ozb(a, b) { + uwb(BD(a, 206), BD(b, 475)); + }; + mdb(vke, "Collectors/9methodref$add$Type", 1059); + bcb(1058, 1, {}, pzb); + _2.Ee = function qzb() { + return new xwb(this.a, this.b, this.c); + }; + mdb(vke, "Collectors/lambda$15$Type", 1058); + bcb(1063, 1, {}, rzb); + _2.Ee = function szb() { + var a; + return a = new $rb(), Xrb(a, (Bcb(), false), new Rkb()), Xrb(a, true, new Rkb()), a; + }; + mdb(vke, "Collectors/lambda$22$Type", 1063); + bcb(1064, 1, {}, tzb); + _2.Ee = function uzb() { + return OC(GC(SI, 1), Uhe, 1, 5, [this.a]); + }; + mdb(vke, "Collectors/lambda$25$Type", 1064); + bcb(1065, 1, {}, vzb); + _2.Od = function wzb(a, b) { + Oyb(this.a, CD(a)); + }; + mdb(vke, "Collectors/lambda$26$Type", 1065); + bcb(1066, 1, {}, xzb); + _2.Ce = function yzb(a, b) { + return Pyb(this.a, CD(a), CD(b)); + }; + mdb(vke, "Collectors/lambda$27$Type", 1066); + bcb(1067, 1, {}, zzb); + _2.Kb = function Azb(a) { + return CD(a)[0]; + }; + mdb(vke, "Collectors/lambda$28$Type", 1067); + bcb(713, 1, {}, Czb); + _2.Ce = function Dzb(a, b) { + return Bzb(a, b); + }; + mdb(vke, "Collectors/lambda$4$Type", 713); + bcb(252, 1, {}, Ezb); + _2.Ce = function Fzb(a, b) { + return Ryb(BD(a, 14), BD(b, 14)); + }; + mdb(vke, "Collectors/lambda$42$Type", 252); + bcb(348, 1, {}, Gzb); + _2.Ce = function Hzb(a, b) { + return Syb(BD(a, 53), BD(b, 53)); + }; + mdb(vke, "Collectors/lambda$50$Type", 348); + bcb(349, 1, {}, Izb); + _2.Kb = function Jzb(a) { + return BD(a, 53); + }; + mdb(vke, "Collectors/lambda$51$Type", 349); + bcb(1054, 1, {}, Kzb); + _2.Od = function Lzb(a, b) { + Tyb(this.a, BD(a, 83), b); + }; + mdb(vke, "Collectors/lambda$7$Type", 1054); + bcb(1056, 1, {}, Mzb); + _2.Ce = function Nzb(a, b) { + return Vyb(BD(a, 83), BD(b, 83), new lzb()); + }; + mdb(vke, "Collectors/lambda$8$Type", 1056); + bcb(1057, 1, {}, Ozb); + _2.Kb = function Pzb(a) { + return Uyb(this.a, BD(a, 83)); + }; + mdb(vke, "Collectors/lambda$9$Type", 1057); + bcb(539, 1, {}); + _2.He = function Wzb() { + Qzb(this); + }; + _2.d = false; + mdb(vke, "TerminatableStream", 539); + bcb(812, 539, wke, bAb); + _2.He = function cAb() { + Qzb(this); + }; + mdb(vke, "DoubleStreamImpl", 812); + bcb(1784, 721, pie2, fAb); + _2.ye = function hAb(a) { + return eAb(this, BD(a, 182)); + }; + _2.a = null; + mdb(vke, "DoubleStreamImpl/2", 1784); + bcb(1785, 1, eke, iAb); + _2.we = function jAb(a) { + gAb(this.a, a); + }; + mdb(vke, "DoubleStreamImpl/2/lambda$0$Type", 1785); + bcb(1782, 1, eke, kAb); + _2.we = function lAb(a) { + dAb(this.a, a); + }; + mdb(vke, "DoubleStreamImpl/lambda$0$Type", 1782); + bcb(1783, 1, eke, mAb); + _2.we = function nAb(a) { + Epb(this.a, a); + }; + mdb(vke, "DoubleStreamImpl/lambda$2$Type", 1783); + bcb(1358, 720, pie2, rAb); + _2.ye = function sAb(a) { + return qAb(this, BD(a, 196)); + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + mdb(vke, "IntStream/5", 1358); + bcb(787, 539, wke, vAb); + _2.He = function wAb() { + Qzb(this); + }; + _2.Ie = function xAb() { + return Tzb(this), this.a; + }; + mdb(vke, "IntStreamImpl", 787); + bcb(788, 539, wke, yAb); + _2.He = function zAb() { + Qzb(this); + }; + _2.Ie = function AAb() { + return Tzb(this), Ivb(), Hvb; + }; + mdb(vke, "IntStreamImpl/Empty", 788); + bcb(1463, 1, sie, BAb); + _2.ud = function CAb(a) { + crb(this.a, a); + }; + mdb(vke, "IntStreamImpl/lambda$4$Type", 1463); + var xM = odb(vke, "Stream"); + bcb(30, 539, { 525: 1, 670: 1, 833: 1 }, YAb); + _2.He = function ZAb() { + Qzb(this); + }; + var DAb; + mdb(vke, "StreamImpl", 30); + bcb(845, 1, {}, bBb); + _2.ld = function cBb(a) { + return aBb(a); + }; + mdb(vke, "StreamImpl/0methodref$lambda$2$Type", 845); + bcb(1084, 540, pie2, fBb); + _2.sd = function gBb(a) { + while (dBb(this)) { + if (this.a.sd(a)) { + return true; + } else { + Qzb(this.b); + this.b = null; + this.a = null; + } + } + return false; + }; + mdb(vke, "StreamImpl/1", 1084); + bcb(1085, 1, qie, hBb); + _2.td = function iBb(a) { + eBb(this.a, BD(a, 833)); + }; + mdb(vke, "StreamImpl/1/lambda$0$Type", 1085); + bcb(1086, 1, Oie, jBb); + _2.Mb = function kBb(a) { + return Qqb(this.a, a); + }; + mdb(vke, "StreamImpl/1methodref$add$Type", 1086); + bcb(1087, 540, pie2, lBb); + _2.sd = function mBb(a) { + var b; + if (!this.a) { + b = new Rkb(); + this.b.a.Nb(new nBb(b)); + mmb(); + Okb(b, this.c); + this.a = new Kub(b, 16); + } + return Jub(this.a, a); + }; + _2.a = null; + mdb(vke, "StreamImpl/5", 1087); + bcb(1088, 1, qie, nBb); + _2.td = function oBb(a) { + Ekb(this.a, a); + }; + mdb(vke, "StreamImpl/5/2methodref$add$Type", 1088); + bcb(722, 540, pie2, qBb); + _2.sd = function rBb(a) { + this.b = false; + while (!this.b && this.c.sd(new sBb(this, a))) + ; + return this.b; + }; + _2.b = false; + mdb(vke, "StreamImpl/FilterSpliterator", 722); + bcb(1079, 1, qie, sBb); + _2.td = function tBb(a) { + pBb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/FilterSpliterator/lambda$0$Type", 1079); + bcb(1075, 721, pie2, wBb); + _2.ye = function xBb(a) { + return vBb(this, BD(a, 182)); + }; + mdb(vke, "StreamImpl/MapToDoubleSpliterator", 1075); + bcb(1078, 1, qie, yBb); + _2.td = function zBb(a) { + uBb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/MapToDoubleSpliterator/lambda$0$Type", 1078); + bcb(1074, 720, pie2, CBb); + _2.ye = function DBb(a) { + return BBb(this, BD(a, 196)); + }; + mdb(vke, "StreamImpl/MapToIntSpliterator", 1074); + bcb(1077, 1, qie, EBb); + _2.td = function FBb(a) { + ABb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/MapToIntSpliterator/lambda$0$Type", 1077); + bcb(719, 540, pie2, IBb); + _2.sd = function JBb(a) { + return HBb(this, a); + }; + mdb(vke, "StreamImpl/MapToObjSpliterator", 719); + bcb(1076, 1, qie, KBb); + _2.td = function LBb(a) { + GBb(this.a, this.b, a); + }; + mdb(vke, "StreamImpl/MapToObjSpliterator/lambda$0$Type", 1076); + bcb(618, 1, qie, NBb); + _2.td = function OBb(a) { + MBb(this, a); + }; + mdb(vke, "StreamImpl/ValueConsumer", 618); + bcb(1080, 1, qie, PBb); + _2.td = function QBb(a) { + EAb(); + }; + mdb(vke, "StreamImpl/lambda$0$Type", 1080); + bcb(1081, 1, qie, RBb); + _2.td = function SBb(a) { + EAb(); + }; + mdb(vke, "StreamImpl/lambda$1$Type", 1081); + bcb(1082, 1, {}, TBb); + _2.Ce = function UBb(a, b) { + return $Ab(this.a, a, b); + }; + mdb(vke, "StreamImpl/lambda$4$Type", 1082); + bcb(1083, 1, qie, VBb); + _2.td = function WBb(a) { + _Ab(this.b, this.a, a); + }; + mdb(vke, "StreamImpl/lambda$5$Type", 1083); + bcb(1089, 1, qie, XBb); + _2.td = function YBb(a) { + Xzb(this.a, BD(a, 365)); + }; + mdb(vke, "TerminatableStream/lambda$0$Type", 1089); + bcb(2041, 1, {}); + bcb(1914, 1, {}, iCb); + mdb("javaemul.internal", "ConsoleLogger", 1914); + bcb(2038, 1, {}); + var ECb = 0; + var GCb, HCb = 0, ICb; + bcb(1768, 1, qie, OCb); + _2.td = function PCb(a) { + BD(a, 308); + }; + mdb(Cke, "BowyerWatsonTriangulation/lambda$0$Type", 1768); + bcb(1769, 1, qie, QCb); + _2.td = function RCb(a) { + ye(this.a, BD(a, 308).e); + }; + mdb(Cke, "BowyerWatsonTriangulation/lambda$1$Type", 1769); + bcb(1770, 1, qie, SCb); + _2.td = function TCb(a) { + BD(a, 168); + }; + mdb(Cke, "BowyerWatsonTriangulation/lambda$2$Type", 1770); + bcb(1765, 1, Dke, WCb); + _2.ue = function XCb(a, b) { + return VCb(this.a, BD(a, 168), BD(b, 168)); + }; + _2.Fb = function YCb(a) { + return this === a; + }; + _2.ve = function ZCb() { + return new tpb(this); + }; + mdb(Cke, "NaiveMinST/lambda$0$Type", 1765); + bcb(499, 1, {}, _Cb); + mdb(Cke, "NodeMicroLayout", 499); + bcb(168, 1, { 168: 1 }, aDb); + _2.Fb = function bDb(a) { + var b; + if (JD(a, 168)) { + b = BD(a, 168); + return wtb(this.a, b.a) && wtb(this.b, b.b) || wtb(this.a, b.b) && wtb(this.b, b.a); + } else { + return false; + } + }; + _2.Hb = function cDb() { + return xtb(this.a) + xtb(this.b); + }; + var GM = mdb(Cke, "TEdge", 168); + bcb(308, 1, { 308: 1 }, eDb); + _2.Fb = function fDb(a) { + var b; + if (JD(a, 308)) { + b = BD(a, 308); + return dDb(this, b.a) && dDb(this, b.b) && dDb(this, b.c); + } else { + return false; + } + }; + _2.Hb = function gDb() { + return xtb(this.a) + xtb(this.b) + xtb(this.c); + }; + mdb(Cke, "TTriangle", 308); + bcb(221, 1, { 221: 1 }, hDb); + mdb(Cke, "Tree", 221); + bcb(1254, 1, {}, jDb); + mdb(Eke, "Scanline", 1254); + var JM = odb(Eke, Fke); + bcb(1692, 1, {}, mDb); + mdb(Gke, "CGraph", 1692); + bcb(307, 1, { 307: 1 }, oDb); + _2.b = 0; + _2.c = 0; + _2.d = 0; + _2.g = 0; + _2.i = 0; + _2.k = Qje; + mdb(Gke, "CGroup", 307); + bcb(815, 1, {}, sDb); + mdb(Gke, "CGroup/CGroupBuilder", 815); + bcb(57, 1, { 57: 1 }, tDb); + _2.Ib = function uDb() { + var a; + if (this.j) { + return GD(this.j.Kb(this)); + } + return fdb(PM), PM.o + "@" + (a = FCb(this) >>> 0, a.toString(16)); + }; + _2.f = 0; + _2.i = Qje; + var PM = mdb(Gke, "CNode", 57); + bcb(814, 1, {}, zDb); + mdb(Gke, "CNode/CNodeBuilder", 814); + var EDb; + bcb(1525, 1, {}, GDb); + _2.Oe = function HDb(a, b) { + return 0; + }; + _2.Pe = function IDb(a, b) { + return 0; + }; + mdb(Gke, Ike, 1525); + bcb(1790, 1, {}, JDb); + _2.Le = function KDb(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + j = Pje; + for (d = new olb(a.a.b); d.a < d.c.c.length; ) { + b = BD(mlb(d), 57); + j = $wnd.Math.min(j, b.a.j.d.c + b.b.a); + } + n = new Psb(); + for (g = new olb(a.a.a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 307); + f2.k = j; + f2.g == 0 && (Gsb(n, f2, n.c.b, n.c), true); + } + while (n.b != 0) { + f2 = BD(n.b == 0 ? null : (sCb(n.b != 0), Nsb(n, n.a.a)), 307); + e = f2.j.d.c; + for (m = f2.a.a.ec().Kc(); m.Ob(); ) { + k = BD(m.Pb(), 57); + p = f2.k + k.b.a; + !UDb(a, f2, a.d) || k.d.c < p ? k.i = p : k.i = k.d.c; + } + e -= f2.j.i; + f2.b += e; + a.d == (ead(), bad) || a.d == _9c ? f2.c += e : f2.c -= e; + for (l = f2.a.a.ec().Kc(); l.Ob(); ) { + k = BD(l.Pb(), 57); + for (i3 = k.c.Kc(); i3.Ob(); ) { + h = BD(i3.Pb(), 57); + fad(a.d) ? o2 = a.g.Oe(k, h) : o2 = a.g.Pe(k, h); + h.a.k = $wnd.Math.max(h.a.k, k.i + k.d.b + o2 - h.b.a); + VDb(a, h, a.d) && (h.a.k = $wnd.Math.max(h.a.k, h.d.c - h.b.a)); + --h.a.g; + h.a.g == 0 && Dsb(n, h.a); + } + } + } + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + b.d.c = b.i; + } + }; + mdb(Gke, "LongestPathCompaction", 1790); + bcb(1690, 1, {}, cEb); + _2.e = false; + var LDb, MDb, NDb; + var TM = mdb(Gke, Nke, 1690); + bcb(1691, 1, qie, dEb); + _2.td = function eEb(a) { + WDb(this.a, BD(a, 46)); + }; + mdb(Gke, Oke, 1691); + bcb(1791, 1, {}, fEb); + _2.Me = function gEb(a) { + var b, c2, d, e, f2, g, h; + for (c2 = new olb(a.a.b); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 57); + b.c.$b(); + } + for (e = new olb(a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + for (g = new olb(a.a.b); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 57); + if (d == f2) { + continue; + } + if (!!d.a && d.a == f2.a) { + continue; + } + fad(a.d) ? h = a.g.Pe(d, f2) : h = a.g.Oe(d, f2); + (f2.d.c > d.d.c || d.d.c == f2.d.c && d.d.b < f2.d.b) && BDb(f2.d.d + f2.d.a + h, d.d.d) && DDb(f2.d.d, d.d.d + d.d.a + h) && d.c.Fc(f2); + } + } + }; + mdb(Gke, "QuadraticConstraintCalculation", 1791); + bcb(522, 1, { 522: 1 }, lEb); + _2.a = false; + _2.b = false; + _2.c = false; + _2.d = false; + mdb(Gke, Pke, 522); + bcb(803, 1, {}, oEb); + _2.Me = function pEb(a) { + this.c = a; + nEb(this, new GEb()); + }; + mdb(Gke, Qke, 803); + bcb(1718, 1, { 679: 1 }, uEb); + _2.Ke = function vEb(a) { + rEb(this, BD(a, 464)); + }; + mdb(Gke, Rke, 1718); + bcb(1719, 1, Dke, xEb); + _2.ue = function yEb(a, b) { + return wEb(BD(a, 57), BD(b, 57)); + }; + _2.Fb = function zEb(a) { + return this === a; + }; + _2.ve = function AEb() { + return new tpb(this); + }; + mdb(Gke, Ske, 1719); + bcb(464, 1, { 464: 1 }, BEb); + _2.a = false; + mdb(Gke, Tke, 464); + bcb(1720, 1, Dke, CEb); + _2.ue = function DEb(a, b) { + return qEb(BD(a, 464), BD(b, 464)); + }; + _2.Fb = function EEb(a) { + return this === a; + }; + _2.ve = function FEb() { + return new tpb(this); + }; + mdb(Gke, Uke, 1720); + bcb(1721, 1, Vke, GEb); + _2.Lb = function HEb(a) { + return BD(a, 57), true; + }; + _2.Fb = function IEb(a) { + return this === a; + }; + _2.Mb = function JEb(a) { + return BD(a, 57), true; + }; + mdb(Gke, "ScanlineConstraintCalculator/lambda$1$Type", 1721); + bcb(428, 22, { 3: 1, 35: 1, 22: 1, 428: 1 }, NEb); + var KEb, LEb; + var aN = ndb(Wke, "HighLevelSortingCriterion", 428, CI, PEb, OEb); + var QEb; + bcb(427, 22, { 3: 1, 35: 1, 22: 1, 427: 1 }, VEb); + var SEb, TEb; + var bN = ndb(Wke, "LowLevelSortingCriterion", 427, CI, XEb, WEb); + var YEb; + var C0 = odb(Xke, "ILayoutMetaDataProvider"); + bcb(853, 1, ale, gFb); + _2.Qe = function hFb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yke), ble), "Polyomino Traversal Strategy"), "Traversal strategy for trying different candidate positions for polyominoes."), eFb), (_5c(), V5c)), dN), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zke), ble), "Polyomino Secondary Sorting Criterion"), "Possible secondary sorting criteria for the processing order of polyominoes. They are used when polyominoes are equal according to the primary sorting criterion HighLevelSortingCriterion."), cFb), V5c), bN), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $ke), ble), "Polyomino Primary Sorting Criterion"), "Possible primary sorting criteria for the processing order of polyominoes."), aFb), V5c), aN), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _ke), ble), "Fill Polyominoes"), "Use the Profile Fill algorithm to fill polyominoes to prevent small polyominoes from being placed inside of big polyominoes with large holes. Might increase packing area."), (Bcb(), true)), T5c), wI), pqb(L5c)))); + }; + var $Eb, _Eb, aFb, bFb, cFb, dFb, eFb; + mdb(Wke, "PolyominoOptions", 853); + bcb(250, 22, { 3: 1, 35: 1, 22: 1, 250: 1 }, sFb); + var iFb, jFb, kFb, lFb, mFb, nFb, oFb, pFb, qFb; + var dN = ndb(Wke, "TraversalStrategy", 250, CI, uFb, tFb); + var vFb; + bcb(213, 1, { 213: 1 }, yFb); + _2.Ib = function zFb() { + return "NEdge[id=" + this.b + " w=" + this.g + " d=" + this.a + "]"; + }; + _2.a = 1; + _2.b = 0; + _2.c = 0; + _2.f = false; + _2.g = 0; + var fN = mdb(cle, "NEdge", 213); + bcb(176, 1, {}, FFb); + mdb(cle, "NEdge/NEdgeBuilder", 176); + bcb(653, 1, {}, KFb); + mdb(cle, "NGraph", 653); + bcb(121, 1, { 121: 1 }, MFb); + _2.c = -1; + _2.d = 0; + _2.e = 0; + _2.i = -1; + _2.j = false; + var jN = mdb(cle, "NNode", 121); + bcb(795, 1, cke, PFb); + _2.Jc = function XFb(a) { + reb(this, a); + }; + _2.Lc = function cGb() { + return new YAb(null, new Kub(this, 16)); + }; + _2.ad = function hGb(a) { + ktb(this, a); + }; + _2.Nc = function iGb() { + return new Kub(this, 16); + }; + _2.Oc = function jGb() { + return new YAb(null, new Kub(this, 16)); + }; + _2.Vc = function QFb(a, b) { + ++this.b; + Dkb(this.a, a, b); + }; + _2.Fc = function RFb(a) { + return NFb(this, a); + }; + _2.Wc = function SFb(a, b) { + ++this.b; + return Fkb(this.a, a, b); + }; + _2.Gc = function TFb(a) { + ++this.b; + return Gkb(this.a, a); + }; + _2.$b = function UFb() { + ++this.b; + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + }; + _2.Hc = function VFb(a) { + return Jkb(this.a, a, 0) != -1; + }; + _2.Ic = function WFb(a) { + return Be(this.a, a); + }; + _2.Xb = function YFb(a) { + return Ikb(this.a, a); + }; + _2.Xc = function ZFb(a) { + return Jkb(this.a, a, 0); + }; + _2.dc = function $Fb() { + return this.a.c.length == 0; + }; + _2.Kc = function _Fb() { + return vr(new olb(this.a)); + }; + _2.Yc = function aGb() { + throw vbb(new bgb()); + }; + _2.Zc = function bGb(a) { + throw vbb(new bgb()); + }; + _2.$c = function dGb(a) { + ++this.b; + return Kkb(this.a, a); + }; + _2.Mc = function eGb(a) { + return OFb(this, a); + }; + _2._c = function fGb(a, b) { + ++this.b; + return Nkb(this.a, a, b); + }; + _2.gc = function gGb() { + return this.a.c.length; + }; + _2.bd = function kGb(a, b) { + return new Jib(this.a, a, b); + }; + _2.Pc = function lGb() { + return Pkb(this.a); + }; + _2.Qc = function mGb(a) { + return Qkb(this.a, a); + }; + _2.b = 0; + mdb(cle, "NNode/ChangeAwareArrayList", 795); + bcb(269, 1, {}, pGb); + mdb(cle, "NNode/NNodeBuilder", 269); + bcb(1630, 1, {}, KGb); + _2.a = false; + _2.f = Ohe; + _2.j = 0; + mdb(cle, "NetworkSimplex", 1630); + bcb(1294, 1, qie, QGb); + _2.td = function RGb(a) { + PGb(this.a, BD(a, 680), true, false); + }; + mdb(ele, "NodeLabelAndSizeCalculator/lambda$0$Type", 1294); + bcb(558, 1, {}, YGb); + _2.b = true; + _2.c = true; + _2.d = true; + _2.e = true; + mdb(ele, "NodeMarginCalculator", 558); + bcb(212, 1, { 212: 1 }); + _2.j = false; + _2.k = false; + var oN = mdb(fle, "Cell", 212); + bcb(124, 212, { 124: 1, 212: 1 }, aHb); + _2.Re = function bHb() { + return _Gb(this); + }; + _2.Se = function cHb() { + var a; + a = this.n; + return this.a.a + a.b + a.c; + }; + mdb(fle, "AtomicCell", 124); + bcb(232, 22, { 3: 1, 35: 1, 22: 1, 232: 1 }, hHb); + var dHb, eHb, fHb; + var pN = ndb(fle, "ContainerArea", 232, CI, jHb, iHb); + var kHb; + bcb(326, 212, hle); + mdb(fle, "ContainerCell", 326); + bcb(1473, 326, hle, FHb); + _2.Re = function GHb() { + var a; + a = 0; + this.e ? this.b ? a = this.b.b : !!this.a[1][1] && (a = this.a[1][1].Re()) : a = EHb(this, AHb(this, true)); + return a > 0 ? a + this.n.d + this.n.a : 0; + }; + _2.Se = function HHb() { + var a, b, c2, d, e; + e = 0; + if (this.e) { + this.b ? e = this.b.a : !!this.a[1][1] && (e = this.a[1][1].Se()); + } else if (this.g) { + e = EHb(this, yHb(this, null, true)); + } else { + for (b = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), c2 = 0, d = b.length; c2 < d; ++c2) { + a = b[c2]; + e = $wnd.Math.max(e, EHb(this, yHb(this, a, true))); + } + } + return e > 0 ? e + this.n.b + this.n.c : 0; + }; + _2.Te = function IHb() { + var a, b, c2, d, e; + if (this.g) { + a = yHb(this, null, false); + for (c2 = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + wHb(this, b, a); + } + } else { + for (c2 = (gHb(), OC(GC(pN, 1), Kie, 232, 0, [dHb, eHb, fHb])), d = 0, e = c2.length; d < e; ++d) { + b = c2[d]; + a = yHb(this, b, false); + wHb(this, b, a); + } + } + }; + _2.Ue = function JHb() { + var a, b, c2, d; + b = this.i; + a = this.n; + d = AHb(this, false); + uHb(this, (gHb(), dHb), b.d + a.d, d); + uHb(this, fHb, b.d + b.a - a.a - d[2], d); + c2 = b.a - a.d - a.a; + if (d[0] > 0) { + d[0] += this.d; + c2 -= d[0]; + } + if (d[2] > 0) { + d[2] += this.d; + c2 -= d[2]; + } + this.c.a = $wnd.Math.max(0, c2); + this.c.d = b.d + a.d + (this.c.a - c2) / 2; + d[1] = $wnd.Math.max(d[1], c2); + uHb(this, eHb, b.d + a.d + d[0] - (d[1] - c2) / 2, d); + }; + _2.b = null; + _2.d = 0; + _2.e = false; + _2.f = false; + _2.g = false; + var rHb = 0, sHb = 0; + mdb(fle, "GridContainerCell", 1473); + bcb(461, 22, { 3: 1, 35: 1, 22: 1, 461: 1 }, OHb); + var KHb, LHb, MHb; + var sN = ndb(fle, "HorizontalLabelAlignment", 461, CI, QHb, PHb); + var RHb; + bcb(306, 212, { 212: 1, 306: 1 }, aIb, bIb, cIb); + _2.Re = function dIb() { + return YHb(this); + }; + _2.Se = function eIb() { + return ZHb(this); + }; + _2.a = 0; + _2.c = false; + var tN = mdb(fle, "LabelCell", 306); + bcb(244, 326, { 212: 1, 326: 1, 244: 1 }, mIb); + _2.Re = function nIb() { + return fIb(this); + }; + _2.Se = function oIb() { + return gIb(this); + }; + _2.Te = function rIb() { + hIb(this); + }; + _2.Ue = function sIb() { + iIb(this); + }; + _2.b = 0; + _2.c = 0; + _2.d = false; + mdb(fle, "StripContainerCell", 244); + bcb(1626, 1, Oie, tIb); + _2.Mb = function uIb(a) { + return pIb(BD(a, 212)); + }; + mdb(fle, "StripContainerCell/lambda$0$Type", 1626); + bcb(1627, 1, {}, vIb); + _2.Fe = function wIb(a) { + return BD(a, 212).Se(); + }; + mdb(fle, "StripContainerCell/lambda$1$Type", 1627); + bcb(1628, 1, Oie, xIb); + _2.Mb = function yIb(a) { + return qIb(BD(a, 212)); + }; + mdb(fle, "StripContainerCell/lambda$2$Type", 1628); + bcb(1629, 1, {}, zIb); + _2.Fe = function AIb(a) { + return BD(a, 212).Re(); + }; + mdb(fle, "StripContainerCell/lambda$3$Type", 1629); + bcb(462, 22, { 3: 1, 35: 1, 22: 1, 462: 1 }, FIb); + var BIb, CIb, DIb; + var zN = ndb(fle, "VerticalLabelAlignment", 462, CI, HIb, GIb); + var IIb; + bcb(789, 1, {}, LIb); + _2.c = 0; + _2.d = 0; + _2.k = 0; + _2.s = 0; + _2.t = 0; + _2.v = false; + _2.w = 0; + _2.D = false; + mdb(nle, "NodeContext", 789); + bcb(1471, 1, Dke, OIb); + _2.ue = function PIb(a, b) { + return NIb(BD(a, 61), BD(b, 61)); + }; + _2.Fb = function QIb(a) { + return this === a; + }; + _2.ve = function RIb() { + return new tpb(this); + }; + mdb(nle, "NodeContext/0methodref$comparePortSides$Type", 1471); + bcb(1472, 1, Dke, SIb); + _2.ue = function TIb(a, b) { + return MIb(BD(a, 111), BD(b, 111)); + }; + _2.Fb = function UIb(a) { + return this === a; + }; + _2.ve = function VIb() { + return new tpb(this); + }; + mdb(nle, "NodeContext/1methodref$comparePortContexts$Type", 1472); + bcb(159, 22, { 3: 1, 35: 1, 22: 1, 159: 1 }, tJb); + var WIb, XIb, YIb, ZIb, $Ib, _Ib, aJb, bJb, cJb, dJb, eJb, fJb, gJb, hJb, iJb, jJb, kJb, lJb, mJb, nJb, oJb, pJb; + var DN = ndb(nle, "NodeLabelLocation", 159, CI, wJb, vJb); + var xJb; + bcb(111, 1, { 111: 1 }, AJb); + _2.a = false; + mdb(nle, "PortContext", 111); + bcb(1476, 1, qie, TJb); + _2.td = function UJb(a) { + WHb(BD(a, 306)); + }; + mdb(qle, rle, 1476); + bcb(1477, 1, Oie, VJb); + _2.Mb = function WJb(a) { + return !!BD(a, 111).c; + }; + mdb(qle, sle, 1477); + bcb(1478, 1, qie, XJb); + _2.td = function YJb(a) { + WHb(BD(a, 111).c); + }; + mdb(qle, "LabelPlacer/lambda$2$Type", 1478); + var ZJb; + bcb(1475, 1, qie, fKb); + _2.td = function gKb(a) { + $Jb(); + zJb(BD(a, 111)); + }; + mdb(qle, "NodeLabelAndSizeUtilities/lambda$0$Type", 1475); + bcb(790, 1, qie, mKb); + _2.td = function nKb(a) { + kKb(this.b, this.c, this.a, BD(a, 181)); + }; + _2.a = false; + _2.c = false; + mdb(qle, "NodeLabelCellCreator/lambda$0$Type", 790); + bcb(1474, 1, qie, tKb); + _2.td = function uKb(a) { + sKb(this.a, BD(a, 181)); + }; + mdb(qle, "PortContextCreator/lambda$0$Type", 1474); + var BKb; + bcb(1829, 1, {}, VKb); + mdb(ule, "GreedyRectangleStripOverlapRemover", 1829); + bcb(1830, 1, Dke, XKb); + _2.ue = function YKb(a, b) { + return WKb(BD(a, 222), BD(b, 222)); + }; + _2.Fb = function ZKb(a) { + return this === a; + }; + _2.ve = function $Kb() { + return new tpb(this); + }; + mdb(ule, "GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type", 1830); + bcb(1786, 1, {}, fLb); + _2.a = 5; + _2.e = 0; + mdb(ule, "RectangleStripOverlapRemover", 1786); + bcb(1787, 1, Dke, jLb); + _2.ue = function kLb(a, b) { + return gLb(BD(a, 222), BD(b, 222)); + }; + _2.Fb = function lLb(a) { + return this === a; + }; + _2.ve = function mLb() { + return new tpb(this); + }; + mdb(ule, "RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type", 1787); + bcb(1789, 1, Dke, nLb); + _2.ue = function oLb(a, b) { + return hLb(BD(a, 222), BD(b, 222)); + }; + _2.Fb = function pLb(a) { + return this === a; + }; + _2.ve = function qLb() { + return new tpb(this); + }; + mdb(ule, "RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type", 1789); + bcb(406, 22, { 3: 1, 35: 1, 22: 1, 406: 1 }, wLb); + var rLb, sLb, tLb, uLb; + var PN = ndb(ule, "RectangleStripOverlapRemover/OverlapRemovalDirection", 406, CI, yLb, xLb); + var zLb; + bcb(222, 1, { 222: 1 }, BLb); + mdb(ule, "RectangleStripOverlapRemover/RectangleNode", 222); + bcb(1788, 1, qie, CLb); + _2.td = function DLb(a) { + aLb(this.a, BD(a, 222)); + }; + mdb(ule, "RectangleStripOverlapRemover/lambda$1$Type", 1788); + bcb(1304, 1, Dke, GLb); + _2.ue = function HLb(a, b) { + return FLb(BD(a, 167), BD(b, 167)); + }; + _2.Fb = function ILb(a) { + return this === a; + }; + _2.ve = function JLb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator", 1304); + bcb(1307, 1, {}, KLb); + _2.Kb = function LLb(a) { + return BD(a, 324).a; + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type", 1307); + bcb(1308, 1, Oie, MLb); + _2.Mb = function NLb(a) { + return BD(a, 323).a; + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type", 1308); + bcb(1309, 1, Oie, OLb); + _2.Mb = function PLb(a) { + return BD(a, 323).a; + }; + mdb(wle, "PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type", 1309); + bcb(1302, 1, Dke, RLb); + _2.ue = function SLb(a, b) { + return QLb(BD(a, 167), BD(b, 167)); + }; + _2.Fb = function TLb(a) { + return this === a; + }; + _2.ve = function ULb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinNumOfExtensionDirectionsComparator", 1302); + bcb(1305, 1, {}, VLb); + _2.Kb = function WLb(a) { + return BD(a, 324).a; + }; + mdb(wle, "PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type", 1305); + bcb(767, 1, Dke, YLb); + _2.ue = function ZLb(a, b) { + return XLb(BD(a, 167), BD(b, 167)); + }; + _2.Fb = function $Lb(a) { + return this === a; + }; + _2.ve = function _Lb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinNumOfExtensionsComparator", 767); + bcb(1300, 1, Dke, bMb); + _2.ue = function cMb(a, b) { + return aMb(BD(a, 321), BD(b, 321)); + }; + _2.Fb = function dMb(a) { + return this === a; + }; + _2.ve = function eMb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinPerimeterComparator", 1300); + bcb(1301, 1, Dke, gMb); + _2.ue = function hMb(a, b) { + return fMb(BD(a, 321), BD(b, 321)); + }; + _2.Fb = function iMb(a) { + return this === a; + }; + _2.ve = function jMb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/MinPerimeterComparatorWithShape", 1301); + bcb(1303, 1, Dke, lMb); + _2.ue = function mMb(a, b) { + return kMb(BD(a, 167), BD(b, 167)); + }; + _2.Fb = function nMb(a) { + return this === a; + }; + _2.ve = function oMb() { + return new tpb(this); + }; + mdb(wle, "PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator", 1303); + bcb(1306, 1, {}, pMb); + _2.Kb = function qMb(a) { + return BD(a, 324).a; + }; + mdb(wle, "PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type", 1306); + bcb(777, 1, {}, tMb); + _2.Ce = function uMb(a, b) { + return sMb(this, BD(a, 46), BD(b, 167)); + }; + mdb(wle, "SuccessorCombination", 777); + bcb(644, 1, {}, wMb); + _2.Ce = function xMb(a, b) { + var c2; + return vMb((c2 = BD(a, 46), BD(b, 167), c2)); + }; + mdb(wle, "SuccessorJitter", 644); + bcb(643, 1, {}, zMb); + _2.Ce = function AMb(a, b) { + var c2; + return yMb((c2 = BD(a, 46), BD(b, 167), c2)); + }; + mdb(wle, "SuccessorLineByLine", 643); + bcb(568, 1, {}, CMb); + _2.Ce = function DMb(a, b) { + var c2; + return BMb((c2 = BD(a, 46), BD(b, 167), c2)); + }; + mdb(wle, "SuccessorManhattan", 568); + bcb(1356, 1, {}, FMb); + _2.Ce = function GMb(a, b) { + var c2; + return EMb((c2 = BD(a, 46), BD(b, 167), c2)); + }; + mdb(wle, "SuccessorMaxNormWindingInMathPosSense", 1356); + bcb(400, 1, {}, JMb); + _2.Ce = function KMb(a, b) { + return HMb(this, a, b); + }; + _2.c = false; + _2.d = false; + _2.e = false; + _2.f = false; + mdb(wle, "SuccessorQuadrantsGeneric", 400); + bcb(1357, 1, {}, LMb); + _2.Kb = function MMb(a) { + return BD(a, 324).a; + }; + mdb(wle, "SuccessorQuadrantsGeneric/lambda$0$Type", 1357); + bcb(323, 22, { 3: 1, 35: 1, 22: 1, 323: 1 }, SMb); + _2.a = false; + var NMb, OMb, PMb, QMb; + var jO = ndb(Ble, Cle, 323, CI, UMb, TMb); + var VMb; + bcb(1298, 1, {}); + _2.Ib = function bNb() { + var a, b, c2, d, e, f2; + c2 = " "; + a = meb(0); + for (e = 0; e < this.o; e++) { + c2 += "" + a.a; + a = meb(XMb(a.a)); + } + c2 += "\n"; + a = meb(0); + for (f2 = 0; f2 < this.p; f2++) { + c2 += "" + a.a; + a = meb(XMb(a.a)); + for (d = 0; d < this.o; d++) { + b = _Mb(this, d, f2); + ybb(b, 0) == 0 ? c2 += "_" : ybb(b, 1) == 0 ? c2 += "X" : c2 += "0"; + } + c2 += "\n"; + } + return qfb(c2, 0, c2.length - 1); + }; + _2.o = 0; + _2.p = 0; + mdb(Ble, "TwoBitGrid", 1298); + bcb(321, 1298, { 321: 1 }, pNb); + _2.j = 0; + _2.k = 0; + mdb(Ble, "PlanarGrid", 321); + bcb(167, 321, { 321: 1, 167: 1 }); + _2.g = 0; + _2.i = 0; + mdb(Ble, "Polyomino", 167); + var P3 = odb(Hle, Ile); + bcb(134, 1, Jle, zNb); + _2.Ye = function DNb(a, b) { + return xNb(this, a, b); + }; + _2.Ve = function ANb() { + return uNb(this); + }; + _2.We = function BNb(a) { + return vNb(this, a); + }; + _2.Xe = function CNb(a) { + return wNb(this, a); + }; + mdb(Hle, "MapPropertyHolder", 134); + bcb(1299, 134, Jle, ENb); + mdb(Ble, "Polyominoes", 1299); + var FNb = false, GNb, HNb; + bcb(1766, 1, qie, PNb); + _2.td = function QNb(a) { + JNb(BD(a, 221)); + }; + mdb(Kle, "DepthFirstCompaction/0methodref$compactTree$Type", 1766); + bcb(810, 1, qie, RNb); + _2.td = function SNb(a) { + MNb(this.a, BD(a, 221)); + }; + mdb(Kle, "DepthFirstCompaction/lambda$1$Type", 810); + bcb(1767, 1, qie, TNb); + _2.td = function UNb(a) { + NNb(this.a, this.b, this.c, BD(a, 221)); + }; + mdb(Kle, "DepthFirstCompaction/lambda$2$Type", 1767); + var VNb, WNb; + bcb(65, 1, { 65: 1 }, aOb); + mdb(Kle, "Node", 65); + bcb(1250, 1, {}, dOb); + mdb(Kle, "ScanlineOverlapCheck", 1250); + bcb(1251, 1, { 679: 1 }, hOb); + _2.Ke = function iOb(a) { + fOb(this, BD(a, 440)); + }; + mdb(Kle, "ScanlineOverlapCheck/OverlapsScanlineHandler", 1251); + bcb(1252, 1, Dke, kOb); + _2.ue = function lOb(a, b) { + return jOb(BD(a, 65), BD(b, 65)); + }; + _2.Fb = function mOb(a) { + return this === a; + }; + _2.ve = function nOb() { + return new tpb(this); + }; + mdb(Kle, "ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type", 1252); + bcb(440, 1, { 440: 1 }, oOb); + _2.a = false; + mdb(Kle, "ScanlineOverlapCheck/Timestamp", 440); + bcb(1253, 1, Dke, pOb); + _2.ue = function qOb(a, b) { + return eOb(BD(a, 440), BD(b, 440)); + }; + _2.Fb = function rOb(a) { + return this === a; + }; + _2.ve = function sOb() { + return new tpb(this); + }; + mdb(Kle, "ScanlineOverlapCheck/lambda$0$Type", 1253); + bcb(550, 1, {}, tOb); + mdb(Lle, "SVGImage", 550); + bcb(324, 1, { 324: 1 }, uOb); + _2.Ib = function vOb() { + return "(" + this.a + She + this.b + She + this.c + ")"; + }; + mdb(Lle, "UniqueTriple", 324); + bcb(209, 1, Mle); + mdb(Nle, "AbstractLayoutProvider", 209); + bcb(1132, 209, Mle, yOb); + _2.Ze = function zOb(a, b) { + var c2, d, e, f2; + Odd(b, Ole, 1); + this.a = Edb(ED(hkd(a, (CPb(), BPb)))); + if (ikd(a, rPb)) { + e = GD(hkd(a, rPb)); + c2 = h4c(n4c(), e); + if (c2) { + d = BD(hgd(c2.f), 209); + d.Ze(a, Udd(b, 1)); + } + } + f2 = new AQb(this.a); + this.b = yQb(f2, a); + switch (BD(hkd(a, (nPb(), jPb)), 481).g) { + case 0: + BOb(new FOb(), this.b); + jkd(a, uPb, vNb(this.b, uPb)); + break; + default: + Zfb(); + } + qQb(f2); + jkd(a, tPb, this.b); + Qdd(b); + }; + _2.a = 0; + mdb(Ple, "DisCoLayoutProvider", 1132); + bcb(1244, 1, {}, FOb); + _2.c = false; + _2.e = 0; + _2.f = 0; + mdb(Ple, "DisCoPolyominoCompactor", 1244); + bcb(561, 1, { 561: 1 }, MOb); + _2.b = true; + mdb(Qle, "DCComponent", 561); + bcb(394, 22, { 3: 1, 35: 1, 22: 1, 394: 1 }, SOb); + _2.a = false; + var NOb, OOb, POb, QOb; + var CO = ndb(Qle, "DCDirection", 394, CI, UOb, TOb); + var VOb; + bcb(266, 134, { 3: 1, 266: 1, 94: 1, 134: 1 }, XOb); + mdb(Qle, "DCElement", 266); + bcb(395, 1, { 395: 1 }, ZOb); + _2.c = 0; + mdb(Qle, "DCExtension", 395); + bcb(755, 134, Jle, aPb); + mdb(Qle, "DCGraph", 755); + bcb(481, 22, { 3: 1, 35: 1, 22: 1, 481: 1 }, dPb); + var bPb; + var GO = ndb(Rle, Sle, 481, CI, fPb, ePb); + var gPb; + bcb(854, 1, ale, oPb); + _2.Qe = function pPb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tle), Xle), "Connected Components Compaction Strategy"), "Strategy for packing different connected components in order to save space and enhance readability of a graph."), kPb), (_5c(), V5c)), GO), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Ule), Xle), "Connected Components Layout Algorithm"), "A layout algorithm that is to be applied to each connected component before the components themselves are compacted. If unspecified, the positions of the components' nodes are not altered."), Z5c), ZI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Vle), "debug"), "DCGraph"), "Access to the DCGraph is intended for the debug view,"), Y5c), SI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Wle), "debug"), "List of Polyominoes"), "Access to the polyominoes is intended for the debug view,"), Y5c), SI), pqb(L5c)))); + DPb((new EPb(), a)); + }; + var iPb, jPb, kPb, lPb, mPb; + mdb(Rle, "DisCoMetaDataProvider", 854); + bcb(998, 1, ale, EPb); + _2.Qe = function FPb(a) { + DPb(a); + }; + var qPb, rPb, sPb, tPb, uPb, vPb, wPb, xPb, yPb, zPb, APb, BPb; + mdb(Rle, "DisCoOptions", 998); + bcb(999, 1, {}, GPb); + _2.$e = function HPb() { + var a; + return a = new yOb(), a; + }; + _2._e = function IPb(a) { + }; + mdb(Rle, "DisCoOptions/DiscoFactory", 999); + bcb(562, 167, { 321: 1, 167: 1, 562: 1 }, MPb); + _2.a = 0; + _2.b = 0; + _2.c = 0; + _2.d = 0; + mdb("org.eclipse.elk.alg.disco.structures", "DCPolyomino", 562); + var NPb, OPb, PPb; + bcb(1268, 1, Oie, aQb); + _2.Mb = function bQb(a) { + return _Pb(a); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$0$Type", 1268); + bcb(1269, 1, {}, cQb); + _2.Kb = function dQb(a) { + return QPb(), jtd(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$1$Type", 1269); + bcb(1270, 1, Oie, eQb); + _2.Mb = function fQb(a) { + return WPb(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$2$Type", 1270); + bcb(1271, 1, {}, gQb); + _2.Kb = function hQb(a) { + return QPb(), ltd(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$3$Type", 1271); + bcb(1272, 1, Oie, iQb); + _2.Mb = function jQb(a) { + return XPb(BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$4$Type", 1272); + bcb(1273, 1, Oie, kQb); + _2.Mb = function lQb(a) { + return YPb(this.a, BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$5$Type", 1273); + bcb(1274, 1, {}, mQb); + _2.Kb = function nQb(a) { + return ZPb(this.a, BD(a, 79)); + }; + mdb(bme, "ElkGraphComponentsProcessor/lambda$6$Type", 1274); + bcb(1241, 1, {}, AQb); + _2.a = 0; + mdb(bme, "ElkGraphTransformer", 1241); + bcb(1242, 1, {}, CQb); + _2.Od = function DQb(a, b) { + BQb(this, BD(a, 160), BD(b, 266)); + }; + mdb(bme, "ElkGraphTransformer/OffsetApplier", 1242); + bcb(1243, 1, qie, FQb); + _2.td = function GQb(a) { + EQb(this, BD(a, 8)); + }; + mdb(bme, "ElkGraphTransformer/OffsetApplier/OffSetToChainApplier", 1243); + bcb(753, 1, {}, MQb); + mdb(gme, hme, 753); + bcb(1232, 1, Dke, OQb); + _2.ue = function PQb(a, b) { + return NQb(BD(a, 231), BD(b, 231)); + }; + _2.Fb = function QQb(a) { + return this === a; + }; + _2.ve = function RQb() { + return new tpb(this); + }; + mdb(gme, ime, 1232); + bcb(740, 209, Mle, ZQb); + _2.Ze = function $Qb(a, b) { + WQb(this, a, b); + }; + mdb(gme, "ForceLayoutProvider", 740); + bcb(357, 134, { 3: 1, 357: 1, 94: 1, 134: 1 }); + mdb(jme, "FParticle", 357); + bcb(559, 357, { 3: 1, 559: 1, 357: 1, 94: 1, 134: 1 }, aRb); + _2.Ib = function bRb() { + var a; + if (this.a) { + a = Jkb(this.a.a, this, 0); + return a >= 0 ? "b" + a + "[" + fRb(this.a) + "]" : "b[" + fRb(this.a) + "]"; + } + return "b_" + FCb(this); + }; + mdb(jme, "FBendpoint", 559); + bcb(282, 134, { 3: 1, 282: 1, 94: 1, 134: 1 }, gRb); + _2.Ib = function hRb() { + return fRb(this); + }; + mdb(jme, "FEdge", 282); + bcb(231, 134, { 3: 1, 231: 1, 94: 1, 134: 1 }, kRb); + var $O = mdb(jme, "FGraph", 231); + bcb(447, 357, { 3: 1, 447: 1, 357: 1, 94: 1, 134: 1 }, mRb); + _2.Ib = function nRb() { + return this.b == null || this.b.length == 0 ? "l[" + fRb(this.a) + "]" : "l_" + this.b; + }; + mdb(jme, "FLabel", 447); + bcb(144, 357, { 3: 1, 144: 1, 357: 1, 94: 1, 134: 1 }, pRb); + _2.Ib = function qRb() { + return oRb(this); + }; + _2.b = 0; + mdb(jme, "FNode", 144); + bcb(2003, 1, {}); + _2.bf = function vRb(a) { + rRb(this, a); + }; + _2.cf = function wRb() { + sRb(this); + }; + _2.d = 0; + mdb(lme, "AbstractForceModel", 2003); + bcb(631, 2003, { 631: 1 }, xRb); + _2.af = function zRb(a, b) { + var c2, d, e, f2, g; + uRb(this.f, a, b); + e = c7c(R6c(b.d), a.d); + g = $wnd.Math.sqrt(e.a * e.a + e.b * e.b); + d = $wnd.Math.max(0, g - U6c(a.e) / 2 - U6c(b.e) / 2); + c2 = jRb(this.e, a, b); + c2 > 0 ? f2 = -yRb(d, this.c) * c2 : f2 = CRb(d, this.b) * BD(vNb(a, (wSb(), oSb)), 19).a; + Y6c(e, f2 / g); + return e; + }; + _2.bf = function ARb(a) { + rRb(this, a); + this.a = BD(vNb(a, (wSb(), eSb)), 19).a; + this.c = Edb(ED(vNb(a, uSb))); + this.b = Edb(ED(vNb(a, qSb))); + }; + _2.df = function BRb(a) { + return a < this.a; + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + mdb(lme, "EadesModel", 631); + bcb(632, 2003, { 632: 1 }, DRb); + _2.af = function FRb(a, b) { + var c2, d, e, f2, g; + uRb(this.f, a, b); + e = c7c(R6c(b.d), a.d); + g = $wnd.Math.sqrt(e.a * e.a + e.b * e.b); + d = $wnd.Math.max(0, g - U6c(a.e) / 2 - U6c(b.e) / 2); + f2 = JRb(d, this.a) * BD(vNb(a, (wSb(), oSb)), 19).a; + c2 = jRb(this.e, a, b); + c2 > 0 && (f2 -= ERb(d, this.a) * c2); + Y6c(e, f2 * this.b / g); + return e; + }; + _2.bf = function GRb(a) { + var b, c2, d, e, f2, g, h; + rRb(this, a); + this.b = Edb(ED(vNb(a, (wSb(), vSb)))); + this.c = this.b / BD(vNb(a, eSb), 19).a; + d = a.e.c.length; + f2 = 0; + e = 0; + for (h = new olb(a.e); h.a < h.c.c.length; ) { + g = BD(mlb(h), 144); + f2 += g.e.a; + e += g.e.b; + } + b = f2 * e; + c2 = Edb(ED(vNb(a, uSb))) * ple; + this.a = $wnd.Math.sqrt(b / (2 * d)) * c2; + }; + _2.cf = function HRb() { + sRb(this); + this.b -= this.c; + }; + _2.df = function IRb(a) { + return this.b > 0; + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + mdb(lme, "FruchtermanReingoldModel", 632); + bcb(849, 1, ale, TRb); + _2.Qe = function URb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mme), ""), "Force Model"), "Determines the model for force calculation."), MRb), (_5c(), V5c)), gP), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), nme), ""), "Iterations"), "The number of iterations on the force model."), meb(300)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ome), ""), "Repulsive Power"), "Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), pme), ""), "FR Temperature"), "The temperature is used as a scaling factor for particle displacements."), qme), U5c), BI), pqb(L5c)))); + o4c(a, pme, mme, RRb); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), rme), ""), "Eades Repulsion"), "Factor for repulsive forces in Eades' model."), 5), U5c), BI), pqb(L5c)))); + o4c(a, rme, mme, ORb); + xSb((new ySb(), a)); + }; + var KRb, LRb, MRb, NRb, ORb, PRb, QRb, RRb; + mdb(sme, "ForceMetaDataProvider", 849); + bcb(424, 22, { 3: 1, 35: 1, 22: 1, 424: 1 }, YRb); + var VRb, WRb; + var gP = ndb(sme, "ForceModelStrategy", 424, CI, $Rb, ZRb); + var _Rb; + bcb(988, 1, ale, ySb); + _2.Qe = function zSb(a) { + xSb(a); + }; + var bSb, cSb, dSb, eSb, fSb, gSb, hSb, iSb, jSb, kSb, lSb, mSb, nSb, oSb, pSb, qSb, rSb, sSb, tSb, uSb, vSb; + mdb(sme, "ForceOptions", 988); + bcb(989, 1, {}, ASb); + _2.$e = function BSb() { + var a; + return a = new ZQb(), a; + }; + _2._e = function CSb(a) { + }; + mdb(sme, "ForceOptions/ForceFactory", 989); + var DSb, ESb, FSb, GSb; + bcb(850, 1, ale, PSb); + _2.Qe = function QSb(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Mme), ""), "Fixed Position"), "Prevent that the node is moved by the layout algorithm."), (Bcb(), false)), (_5c(), T5c)), wI), pqb((N5c(), K5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Nme), ""), "Desired Edge Length"), "Either specified for parent nodes or for individual edges, where the latter takes higher precedence."), 100), U5c), BI), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [I5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ome), ""), "Layout Dimension"), "Dimensions that are permitted to be altered during layout."), KSb), V5c), oP), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Pme), ""), "Stress Epsilon"), "Termination criterion for the iterative process."), qme), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Qme), ""), "Iteration Limit"), "Maximum number of performed iterations. Takes higher precedence than 'epsilon'."), meb(Ohe)), X5c), JI), pqb(L5c)))); + cTb((new dTb(), a)); + }; + var ISb, JSb, KSb, LSb, MSb, NSb; + mdb(sme, "StressMetaDataProvider", 850); + bcb(992, 1, ale, dTb); + _2.Qe = function eTb(a) { + cTb(a); + }; + var RSb, SSb, TSb, USb, VSb, WSb, XSb, YSb, ZSb, $Sb, _Sb, aTb; + mdb(sme, "StressOptions", 992); + bcb(993, 1, {}, fTb); + _2.$e = function gTb() { + var a; + return a = new iTb(), a; + }; + _2._e = function hTb(a) { + }; + mdb(sme, "StressOptions/StressFactory", 993); + bcb(1128, 209, Mle, iTb); + _2.Ze = function jTb(a, b) { + var c2, d, e, f2, g; + Odd(b, Sme, 1); + Ccb(DD(hkd(a, (bTb(), VSb)))) ? Ccb(DD(hkd(a, _Sb))) || $Cb((c2 = new _Cb((Pgd(), new bhd(a))), c2)) : WQb(new ZQb(), a, Udd(b, 1)); + e = TQb(a); + d = LQb(this.a, e); + for (g = d.Kc(); g.Ob(); ) { + f2 = BD(g.Pb(), 231); + if (f2.e.c.length <= 1) { + continue; + } + sTb(this.b, f2); + qTb(this.b); + Hkb(f2.d, new kTb()); + } + e = KQb(d); + SQb(e); + Qdd(b); + }; + mdb(Ume, "StressLayoutProvider", 1128); + bcb(1129, 1, qie, kTb); + _2.td = function lTb(a) { + lRb(BD(a, 447)); + }; + mdb(Ume, "StressLayoutProvider/lambda$0$Type", 1129); + bcb(990, 1, {}, tTb); + _2.c = 0; + _2.e = 0; + _2.g = 0; + mdb(Ume, "StressMajorization", 990); + bcb(379, 22, { 3: 1, 35: 1, 22: 1, 379: 1 }, zTb); + var vTb, wTb, xTb; + var oP = ndb(Ume, "StressMajorization/Dimension", 379, CI, BTb, ATb); + var CTb; + bcb(991, 1, Dke, ETb); + _2.ue = function FTb(a, b) { + return uTb(this.a, BD(a, 144), BD(b, 144)); + }; + _2.Fb = function GTb(a) { + return this === a; + }; + _2.ve = function HTb() { + return new tpb(this); + }; + mdb(Ume, "StressMajorization/lambda$0$Type", 991); + bcb(1229, 1, {}, PTb); + mdb(Wme, "ElkLayered", 1229); + bcb(1230, 1, qie, STb); + _2.td = function TTb(a) { + QTb(BD(a, 37)); + }; + mdb(Wme, "ElkLayered/lambda$0$Type", 1230); + bcb(1231, 1, qie, UTb); + _2.td = function VTb(a) { + RTb(this.a, BD(a, 37)); + }; + mdb(Wme, "ElkLayered/lambda$1$Type", 1231); + bcb(1263, 1, {}, bUb); + var WTb, XTb, YTb; + mdb(Wme, "GraphConfigurator", 1263); + bcb(759, 1, qie, dUb); + _2.td = function eUb(a) { + $Tb(this.a, BD(a, 10)); + }; + mdb(Wme, "GraphConfigurator/lambda$0$Type", 759); + bcb(760, 1, {}, fUb); + _2.Kb = function gUb(a) { + return ZTb(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Wme, "GraphConfigurator/lambda$1$Type", 760); + bcb(761, 1, qie, hUb); + _2.td = function iUb(a) { + $Tb(this.a, BD(a, 10)); + }; + mdb(Wme, "GraphConfigurator/lambda$2$Type", 761); + bcb(1127, 209, Mle, jUb); + _2.Ze = function kUb(a, b) { + var c2; + c2 = U1b(new a2b(), a); + PD(hkd(a, (Nyc(), axc))) === PD((hbd(), ebd)) ? JTb(this.a, c2, b) : KTb(this.a, c2, b); + z2b(new D2b(), c2); + }; + mdb(Wme, "LayeredLayoutProvider", 1127); + bcb(356, 22, { 3: 1, 35: 1, 22: 1, 356: 1 }, rUb); + var lUb, mUb, nUb, oUb, pUb; + var zP = ndb(Wme, "LayeredPhases", 356, CI, tUb, sUb); + var uUb; + bcb(1651, 1, {}, CUb); + _2.i = 0; + var wUb; + mdb(Xme, "ComponentsToCGraphTransformer", 1651); + var hVb; + bcb(1652, 1, {}, DUb); + _2.ef = function EUb(a, b) { + return $wnd.Math.min(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + _2.ff = function FUb(a, b) { + return $wnd.Math.min(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + mdb(Xme, "ComponentsToCGraphTransformer/1", 1652); + bcb(81, 1, { 81: 1 }); + _2.i = 0; + _2.k = true; + _2.o = Qje; + var IP = mdb(Yme, "CNode", 81); + bcb(460, 81, { 460: 1, 81: 1 }, GUb, HUb); + _2.Ib = function IUb() { + return ""; + }; + mdb(Xme, "ComponentsToCGraphTransformer/CRectNode", 460); + bcb(1623, 1, {}, VUb); + var JUb, KUb; + mdb(Xme, "OneDimensionalComponentsCompaction", 1623); + bcb(1624, 1, {}, YUb); + _2.Kb = function ZUb(a) { + return WUb(BD(a, 46)); + }; + _2.Fb = function $Ub(a) { + return this === a; + }; + mdb(Xme, "OneDimensionalComponentsCompaction/lambda$0$Type", 1624); + bcb(1625, 1, {}, _Ub); + _2.Kb = function aVb(a) { + return XUb(BD(a, 46)); + }; + _2.Fb = function bVb(a) { + return this === a; + }; + mdb(Xme, "OneDimensionalComponentsCompaction/lambda$1$Type", 1625); + bcb(1654, 1, {}, dVb); + mdb(Yme, "CGraph", 1654); + bcb(189, 1, { 189: 1 }, gVb); + _2.b = 0; + _2.c = 0; + _2.e = 0; + _2.g = true; + _2.i = Qje; + mdb(Yme, "CGroup", 189); + bcb(1653, 1, {}, jVb); + _2.ef = function kVb(a, b) { + return $wnd.Math.max(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + _2.ff = function lVb(a, b) { + return $wnd.Math.max(a.a != null ? Edb(a.a) : a.c.i, b.a != null ? Edb(b.a) : b.c.i); + }; + mdb(Yme, Ike, 1653); + bcb(1655, 1, {}, CVb); + _2.d = false; + var mVb; + var LP = mdb(Yme, Nke, 1655); + bcb(1656, 1, {}, DVb); + _2.Kb = function EVb(a) { + return nVb(), Bcb(), BD(BD(a, 46).a, 81).d.e != 0 ? true : false; + }; + _2.Fb = function FVb(a) { + return this === a; + }; + mdb(Yme, Oke, 1656); + bcb(823, 1, {}, IVb); + _2.a = false; + _2.b = false; + _2.c = false; + _2.d = false; + mdb(Yme, Pke, 823); + bcb(1825, 1, {}, OVb); + mdb(Zme, Qke, 1825); + var bQ = odb($me, Fke); + bcb(1826, 1, { 369: 1 }, SVb); + _2.Ke = function TVb(a) { + QVb(this, BD(a, 466)); + }; + mdb(Zme, Rke, 1826); + bcb(1827, 1, Dke, VVb); + _2.ue = function WVb(a, b) { + return UVb(BD(a, 81), BD(b, 81)); + }; + _2.Fb = function XVb(a) { + return this === a; + }; + _2.ve = function YVb() { + return new tpb(this); + }; + mdb(Zme, Ske, 1827); + bcb(466, 1, { 466: 1 }, ZVb); + _2.a = false; + mdb(Zme, Tke, 466); + bcb(1828, 1, Dke, $Vb); + _2.ue = function _Vb(a, b) { + return PVb(BD(a, 466), BD(b, 466)); + }; + _2.Fb = function aWb(a) { + return this === a; + }; + _2.ve = function bWb() { + return new tpb(this); + }; + mdb(Zme, Uke, 1828); + bcb(140, 1, { 140: 1 }, cWb, dWb); + _2.Fb = function eWb(a) { + var b; + if (a == null) { + return false; + } + if (TP != rb(a)) { + return false; + } + b = BD(a, 140); + return wtb(this.c, b.c) && wtb(this.d, b.d); + }; + _2.Hb = function fWb() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [this.c, this.d])); + }; + _2.Ib = function gWb() { + return "(" + this.c + She + this.d + (this.a ? "cx" : "") + this.b + ")"; + }; + _2.a = true; + _2.c = 0; + _2.d = 0; + var TP = mdb($me, "Point", 140); + bcb(405, 22, { 3: 1, 35: 1, 22: 1, 405: 1 }, oWb); + var hWb, iWb, jWb, kWb; + var SP = ndb($me, "Point/Quadrant", 405, CI, sWb, rWb); + var tWb; + bcb(1642, 1, {}, CWb); + _2.b = null; + _2.c = null; + _2.d = null; + _2.e = null; + _2.f = null; + var vWb, wWb, xWb, yWb, zWb; + mdb($me, "RectilinearConvexHull", 1642); + bcb(574, 1, { 369: 1 }, NWb); + _2.Ke = function OWb(a) { + MWb(this, BD(a, 140)); + }; + _2.b = 0; + var KWb; + mdb($me, "RectilinearConvexHull/MaximalElementsEventHandler", 574); + bcb(1644, 1, Dke, QWb); + _2.ue = function RWb(a, b) { + return PWb(ED(a), ED(b)); + }; + _2.Fb = function SWb(a) { + return this === a; + }; + _2.ve = function TWb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type", 1644); + bcb(1643, 1, { 369: 1 }, VWb); + _2.Ke = function WWb(a) { + UWb(this, BD(a, 140)); + }; + _2.a = 0; + _2.b = null; + _2.c = null; + _2.d = null; + _2.e = null; + mdb($me, "RectilinearConvexHull/RectangleEventHandler", 1643); + bcb(1645, 1, Dke, XWb); + _2.ue = function YWb(a, b) { + return EWb(BD(a, 140), BD(b, 140)); + }; + _2.Fb = function ZWb(a) { + return this === a; + }; + _2.ve = function $Wb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$0$Type", 1645); + bcb(1646, 1, Dke, _Wb); + _2.ue = function aXb(a, b) { + return FWb(BD(a, 140), BD(b, 140)); + }; + _2.Fb = function bXb(a) { + return this === a; + }; + _2.ve = function cXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$1$Type", 1646); + bcb(1647, 1, Dke, dXb); + _2.ue = function eXb(a, b) { + return GWb(BD(a, 140), BD(b, 140)); + }; + _2.Fb = function fXb(a) { + return this === a; + }; + _2.ve = function gXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$2$Type", 1647); + bcb(1648, 1, Dke, hXb); + _2.ue = function iXb(a, b) { + return HWb(BD(a, 140), BD(b, 140)); + }; + _2.Fb = function jXb(a) { + return this === a; + }; + _2.ve = function kXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$3$Type", 1648); + bcb(1649, 1, Dke, lXb); + _2.ue = function mXb(a, b) { + return IWb(BD(a, 140), BD(b, 140)); + }; + _2.Fb = function nXb(a) { + return this === a; + }; + _2.ve = function oXb() { + return new tpb(this); + }; + mdb($me, "RectilinearConvexHull/lambda$4$Type", 1649); + bcb(1650, 1, {}, qXb); + mdb($me, "Scanline", 1650); + bcb(2005, 1, {}); + mdb(_me, "AbstractGraphPlacer", 2005); + bcb(325, 1, { 325: 1 }, AXb); + _2.mf = function BXb(a) { + if (this.nf(a)) { + Rc(this.b, BD(vNb(a, (wtc(), Esc)), 21), a); + return true; + } else { + return false; + } + }; + _2.nf = function CXb(a) { + var b, c2, d, e; + b = BD(vNb(a, (wtc(), Esc)), 21); + e = BD(Qc(wXb, b), 21); + for (d = e.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 21); + if (!BD(Qc(this.b, c2), 15).dc()) { + return false; + } + } + return true; + }; + var wXb; + mdb(_me, "ComponentGroup", 325); + bcb(765, 2005, {}, HXb); + _2.of = function IXb(a) { + var b, c2; + for (c2 = new olb(this.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 325); + if (b.mf(a)) { + return; + } + } + Ekb(this.a, new AXb(a)); + }; + _2.lf = function JXb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2; + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + if (a.dc()) { + b.f.a = 0; + b.f.b = 0; + return; + } + g = BD(a.Xb(0), 37); + tNb(b, g); + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + this.of(d); + } + o2 = new d7c(); + f2 = Edb(ED(vNb(g, (Nyc(), kyc)))); + for (j = new olb(this.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 325); + k = DXb(h, f2); + vXb(Uc(h.b), o2.a, o2.b); + o2.a += k.a; + o2.b += k.b; + } + b.f.a = o2.a - f2; + b.f.b = o2.b - f2; + if (Ccb(DD(vNb(g, qwc))) && PD(vNb(g, Swc)) === PD((Aad(), wad))) { + for (n = a.Kc(); n.Ob(); ) { + l = BD(n.Pb(), 37); + uXb(l, l.c.a, l.c.b); + } + c2 = new gYb(); + YXb(c2, a, f2); + for (m = a.Kc(); m.Ob(); ) { + l = BD(m.Pb(), 37); + P6c(X6c(l.c), c2.e); + } + P6c(X6c(b.f), c2.a); + } + for (i3 = new olb(this.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 325); + tXb(b, Uc(h.b)); + } + }; + mdb(_me, "ComponentGroupGraphPlacer", 765); + bcb(1293, 765, {}, LXb); + _2.of = function MXb(a) { + KXb(this, a); + }; + _2.lf = function NXb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t; + this.a.c = KC(SI, Uhe, 1, 0, 5, 1); + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + if (a.dc()) { + b.f.a = 0; + b.f.b = 0; + return; + } + g = BD(a.Xb(0), 37); + tNb(b, g); + for (e = a.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 37); + KXb(this, d); + } + t = new d7c(); + s = new d7c(); + p = new d7c(); + o2 = new d7c(); + f2 = Edb(ED(vNb(g, (Nyc(), kyc)))); + for (j = new olb(this.a); j.a < j.c.c.length; ) { + h = BD(mlb(j), 325); + if (fad(BD(vNb(b, (Y9c(), z8c)), 103))) { + p.a = t.a; + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), Acd))) { + p.a = s.a; + break; + } + } + } else if (gad(BD(vNb(b, z8c), 103))) { + p.b = t.b; + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), Tcd))) { + p.b = s.b; + break; + } + } + } + k = DXb(BD(h, 570), f2); + vXb(Uc(h.b), p.a, p.b); + if (fad(BD(vNb(b, z8c), 103))) { + s.a = p.a + k.a; + o2.a = $wnd.Math.max(o2.a, s.a); + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), Rcd))) { + t.a = p.a + k.a; + break; + } + } + s.b = p.b + k.b; + p.b = s.b; + o2.b = $wnd.Math.max(o2.b, p.b); + } else if (gad(BD(vNb(b, z8c), 103))) { + s.b = p.b + k.b; + o2.b = $wnd.Math.max(o2.b, s.b); + for (r = new Mv(Pc(Fc(h.b).a).a.kc()); r.b.Ob(); ) { + q = BD(Lv(r.b.Pb()), 21); + if (q.Hc((Ucd(), zcd))) { + t.b = p.b + k.b; + break; + } + } + s.a = p.a + k.a; + p.a = s.a; + o2.a = $wnd.Math.max(o2.a, p.a); + } + } + b.f.a = o2.a - f2; + b.f.b = o2.b - f2; + if (Ccb(DD(vNb(g, qwc))) && PD(vNb(g, Swc)) === PD((Aad(), wad))) { + for (n = a.Kc(); n.Ob(); ) { + l = BD(n.Pb(), 37); + uXb(l, l.c.a, l.c.b); + } + c2 = new gYb(); + YXb(c2, a, f2); + for (m = a.Kc(); m.Ob(); ) { + l = BD(m.Pb(), 37); + P6c(X6c(l.c), c2.e); + } + P6c(X6c(b.f), c2.a); + } + for (i3 = new olb(this.a); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 325); + tXb(b, Uc(h.b)); + } + }; + mdb(_me, "ComponentGroupModelOrderGraphPlacer", 1293); + bcb(423, 22, { 3: 1, 35: 1, 22: 1, 423: 1 }, SXb); + var OXb, PXb, QXb; + var hQ = ndb(_me, "ComponentOrderingStrategy", 423, CI, UXb, TXb); + var VXb; + bcb(650, 1, {}, gYb); + mdb(_me, "ComponentsCompactor", 650); + bcb(1468, 12, ake, jYb); + _2.Fc = function kYb(a) { + return hYb(this, BD(a, 140)); + }; + mdb(_me, "ComponentsCompactor/Hullpoints", 1468); + bcb(1465, 1, { 841: 1 }, mYb); + _2.a = false; + mdb(_me, "ComponentsCompactor/InternalComponent", 1465); + bcb(1464, 1, vie, nYb); + _2.Jc = function oYb(a) { + reb(this, a); + }; + _2.Kc = function pYb() { + return new olb(this.a); + }; + mdb(_me, "ComponentsCompactor/InternalConnectedComponents", 1464); + bcb(1467, 1, { 594: 1 }, qYb); + _2.hf = function sYb() { + return null; + }; + _2.jf = function tYb() { + return this.a; + }; + _2.gf = function rYb() { + return cYb(this.d); + }; + _2.kf = function uYb() { + return this.b; + }; + mdb(_me, "ComponentsCompactor/InternalExternalExtension", 1467); + bcb(1466, 1, { 594: 1 }, vYb); + _2.jf = function yYb() { + return this.a; + }; + _2.gf = function wYb() { + return cYb(this.d); + }; + _2.hf = function xYb() { + return this.c; + }; + _2.kf = function zYb() { + return this.b; + }; + mdb(_me, "ComponentsCompactor/InternalUnionExternalExtension", 1466); + bcb(1470, 1, {}, AYb); + mdb(_me, "ComponentsCompactor/OuterSegments", 1470); + bcb(1469, 1, {}, BYb); + mdb(_me, "ComponentsCompactor/Segments", 1469); + bcb(1264, 1, {}, FYb); + mdb(_me, hme, 1264); + bcb(1265, 1, Dke, HYb); + _2.ue = function IYb(a, b) { + return GYb(BD(a, 37), BD(b, 37)); + }; + _2.Fb = function JYb(a) { + return this === a; + }; + _2.ve = function KYb() { + return new tpb(this); + }; + mdb(_me, "ComponentsProcessor/lambda$0$Type", 1265); + bcb(570, 325, { 325: 1, 570: 1 }, PYb); + _2.mf = function QYb(a) { + return NYb(this, a); + }; + _2.nf = function RYb(a) { + return OYb(this, a); + }; + var LYb; + mdb(_me, "ModelOrderComponentGroup", 570); + bcb(1291, 2005, {}, SYb); + _2.lf = function TYb(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2; + if (a.gc() == 1) { + t = BD(a.Xb(0), 37); + if (t != b) { + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + sXb(b, t, 0, 0); + tNb(b, t); + u_b(b.d, t.d); + b.f.a = t.f.a; + b.f.b = t.f.b; + } + return; + } else if (a.dc()) { + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + b.f.a = 0; + b.f.b = 0; + return; + } + if (PD(vNb(b, (Nyc(), twc))) === PD((RXb(), QXb))) { + for (i3 = a.Kc(); i3.Ob(); ) { + g = BD(i3.Pb(), 37); + r = 0; + for (p = new olb(g.a); p.a < p.c.c.length; ) { + o2 = BD(mlb(p), 10); + r += BD(vNb(o2, byc), 19).a; + } + g.p = r; + } + mmb(); + a.ad(new VYb()); + } + f2 = BD(a.Xb(0), 37); + b.a.c = KC(SI, Uhe, 1, 0, 5, 1); + tNb(b, f2); + n = 0; + u = 0; + for (j = a.Kc(); j.Ob(); ) { + g = BD(j.Pb(), 37); + s = g.f; + n = $wnd.Math.max(n, s.a); + u += s.a * s.b; + } + n = $wnd.Math.max(n, $wnd.Math.sqrt(u) * Edb(ED(vNb(b, owc)))); + e = Edb(ED(vNb(b, kyc))); + v = 0; + w2 = 0; + m = 0; + c2 = e; + for (h = a.Kc(); h.Ob(); ) { + g = BD(h.Pb(), 37); + s = g.f; + if (v + s.a > n) { + v = 0; + w2 += m + e; + m = 0; + } + q = g.c; + uXb(g, v + q.a, w2 + q.b); + X6c(q); + c2 = $wnd.Math.max(c2, v + s.a); + m = $wnd.Math.max(m, s.b); + v += s.a + e; + } + b.f.a = c2; + b.f.b = w2 + m; + if (Ccb(DD(vNb(f2, qwc)))) { + d = new gYb(); + YXb(d, a, e); + for (l = a.Kc(); l.Ob(); ) { + k = BD(l.Pb(), 37); + P6c(X6c(k.c), d.e); + } + P6c(X6c(b.f), d.a); + } + tXb(b, a); + }; + mdb(_me, "SimpleRowGraphPlacer", 1291); + bcb(1292, 1, Dke, VYb); + _2.ue = function WYb(a, b) { + return UYb(BD(a, 37), BD(b, 37)); + }; + _2.Fb = function XYb(a) { + return this === a; + }; + _2.ve = function YYb() { + return new tpb(this); + }; + mdb(_me, "SimpleRowGraphPlacer/1", 1292); + var ZYb; + bcb(1262, 1, Vke, dZb); + _2.Lb = function eZb(a) { + var b; + return b = BD(vNb(BD(a, 243).b, (Nyc(), jxc)), 74), !!b && b.b != 0; + }; + _2.Fb = function fZb(a) { + return this === a; + }; + _2.Mb = function gZb(a) { + var b; + return b = BD(vNb(BD(a, 243).b, (Nyc(), jxc)), 74), !!b && b.b != 0; + }; + mdb(dne, "CompoundGraphPostprocessor/1", 1262); + bcb(1261, 1, ene, wZb); + _2.pf = function xZb(a, b) { + qZb(this, BD(a, 37), b); + }; + mdb(dne, "CompoundGraphPreprocessor", 1261); + bcb(441, 1, { 441: 1 }, yZb); + _2.c = false; + mdb(dne, "CompoundGraphPreprocessor/ExternalPort", 441); + bcb(243, 1, { 243: 1 }, BZb); + _2.Ib = function CZb() { + return Zr(this.c) + ":" + TZb(this.b); + }; + mdb(dne, "CrossHierarchyEdge", 243); + bcb(763, 1, Dke, EZb); + _2.ue = function FZb(a, b) { + return DZb(this, BD(a, 243), BD(b, 243)); + }; + _2.Fb = function GZb(a) { + return this === a; + }; + _2.ve = function IZb() { + return new tpb(this); + }; + mdb(dne, "CrossHierarchyEdgeComparator", 763); + bcb(299, 134, { 3: 1, 299: 1, 94: 1, 134: 1 }); + _2.p = 0; + mdb(fne, "LGraphElement", 299); + bcb(17, 299, { 3: 1, 17: 1, 299: 1, 94: 1, 134: 1 }, UZb); + _2.Ib = function VZb() { + return TZb(this); + }; + var AQ = mdb(fne, "LEdge", 17); + bcb(37, 299, { 3: 1, 20: 1, 37: 1, 299: 1, 94: 1, 134: 1 }, XZb); + _2.Jc = function YZb(a) { + reb(this, a); + }; + _2.Kc = function ZZb() { + return new olb(this.b); + }; + _2.Ib = function $Zb() { + if (this.b.c.length == 0) { + return "G-unlayered" + Fe(this.a); + } else if (this.a.c.length == 0) { + return "G-layered" + Fe(this.b); + } + return "G[layerless" + Fe(this.a) + ", layers" + Fe(this.b) + "]"; + }; + var KQ = mdb(fne, "LGraph", 37); + var _Zb; + bcb(657, 1, {}); + _2.qf = function b$b() { + return this.e.n; + }; + _2.We = function c$b(a) { + return vNb(this.e, a); + }; + _2.rf = function d$b() { + return this.e.o; + }; + _2.sf = function e$b() { + return this.e.p; + }; + _2.Xe = function f$b(a) { + return wNb(this.e, a); + }; + _2.tf = function g$b(a) { + this.e.n.a = a.a; + this.e.n.b = a.b; + }; + _2.uf = function h$b(a) { + this.e.o.a = a.a; + this.e.o.b = a.b; + }; + _2.vf = function i$b(a) { + this.e.p = a; + }; + mdb(fne, "LGraphAdapters/AbstractLShapeAdapter", 657); + bcb(577, 1, { 839: 1 }, j$b); + _2.wf = function k$b() { + var a, b; + if (!this.b) { + this.b = Pu(this.a.b.c.length); + for (b = new olb(this.a.b); b.a < b.c.c.length; ) { + a = BD(mlb(b), 70); + Ekb(this.b, new v$b(a)); + } + } + return this.b; + }; + _2.b = null; + mdb(fne, "LGraphAdapters/LEdgeAdapter", 577); + bcb(656, 1, {}, l$b); + _2.xf = function m$b() { + var a, b, c2, d, e, f2; + if (!this.b) { + this.b = new Rkb(); + for (d = new olb(this.a.b); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 29); + for (f2 = new olb(c2.a); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 10); + if (this.c.Mb(e)) { + Ekb(this.b, new x$b(this, e, this.e)); + if (this.d) { + if (wNb(e, (wtc(), vtc))) { + for (b = BD(vNb(e, vtc), 15).Kc(); b.Ob(); ) { + a = BD(b.Pb(), 10); + Ekb(this.b, new x$b(this, a, false)); + } + } + if (wNb(e, tsc)) { + for (b = BD(vNb(e, tsc), 15).Kc(); b.Ob(); ) { + a = BD(b.Pb(), 10); + Ekb(this.b, new x$b(this, a, false)); + } + } + } + } + } + } + } + return this.b; + }; + _2.qf = function n$b() { + throw vbb(new cgb(hne)); + }; + _2.We = function o$b(a) { + return vNb(this.a, a); + }; + _2.rf = function p$b() { + return this.a.f; + }; + _2.sf = function q$b() { + return this.a.p; + }; + _2.Xe = function r$b(a) { + return wNb(this.a, a); + }; + _2.tf = function s$b(a) { + throw vbb(new cgb(hne)); + }; + _2.uf = function t$b(a) { + this.a.f.a = a.a; + this.a.f.b = a.b; + }; + _2.vf = function u$b(a) { + this.a.p = a; + }; + _2.b = null; + _2.d = false; + _2.e = false; + mdb(fne, "LGraphAdapters/LGraphAdapter", 656); + bcb(576, 657, { 181: 1 }, v$b); + mdb(fne, "LGraphAdapters/LLabelAdapter", 576); + bcb(575, 657, { 680: 1 }, x$b); + _2.yf = function y$b() { + return this.b; + }; + _2.zf = function z$b() { + return mmb(), mmb(), jmb; + }; + _2.wf = function A$b() { + var a, b; + if (!this.a) { + this.a = Pu(BD(this.e, 10).b.c.length); + for (b = new olb(BD(this.e, 10).b); b.a < b.c.c.length; ) { + a = BD(mlb(b), 70); + Ekb(this.a, new v$b(a)); + } + } + return this.a; + }; + _2.Af = function B$b() { + var a; + a = BD(this.e, 10).d; + return new J_b(a.d, a.c, a.a, a.b); + }; + _2.Bf = function C$b() { + return mmb(), mmb(), jmb; + }; + _2.Cf = function D$b() { + var a, b; + if (!this.c) { + this.c = Pu(BD(this.e, 10).j.c.length); + for (b = new olb(BD(this.e, 10).j); b.a < b.c.c.length; ) { + a = BD(mlb(b), 11); + Ekb(this.c, new I$b(a, this.d)); + } + } + return this.c; + }; + _2.Df = function E$b() { + return Ccb(DD(vNb(BD(this.e, 10), (wtc(), wsc)))); + }; + _2.Ef = function F$b(a) { + BD(this.e, 10).d.b = a.b; + BD(this.e, 10).d.d = a.d; + BD(this.e, 10).d.c = a.c; + BD(this.e, 10).d.a = a.a; + }; + _2.Ff = function G$b(a) { + BD(this.e, 10).f.b = a.b; + BD(this.e, 10).f.d = a.d; + BD(this.e, 10).f.c = a.c; + BD(this.e, 10).f.a = a.a; + }; + _2.Gf = function H$b() { + w$b(this, (a$b(), _Zb)); + }; + _2.a = null; + _2.b = null; + _2.c = null; + _2.d = false; + mdb(fne, "LGraphAdapters/LNodeAdapter", 575); + bcb(1722, 657, { 838: 1 }, I$b); + _2.zf = function J$b() { + var a, b, c2, d; + if (this.d && BD(this.e, 11).i.k == (j0b(), i0b)) { + return mmb(), mmb(), jmb; + } else if (!this.a) { + this.a = new Rkb(); + for (c2 = new olb(BD(this.e, 11).e); c2.a < c2.c.c.length; ) { + a = BD(mlb(c2), 17); + Ekb(this.a, new j$b(a)); + } + if (this.d) { + d = BD(vNb(BD(this.e, 11), (wtc(), gtc)), 10); + if (d) { + for (b = new Sr(ur(R_b(d).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 17); + Ekb(this.a, new j$b(a)); + } + } + } + } + return this.a; + }; + _2.wf = function K$b() { + var a, b; + if (!this.b) { + this.b = Pu(BD(this.e, 11).f.c.length); + for (b = new olb(BD(this.e, 11).f); b.a < b.c.c.length; ) { + a = BD(mlb(b), 70); + Ekb(this.b, new v$b(a)); + } + } + return this.b; + }; + _2.Bf = function L$b() { + var a, b, c2, d; + if (this.d && BD(this.e, 11).i.k == (j0b(), i0b)) { + return mmb(), mmb(), jmb; + } else if (!this.c) { + this.c = new Rkb(); + for (c2 = new olb(BD(this.e, 11).g); c2.a < c2.c.c.length; ) { + a = BD(mlb(c2), 17); + Ekb(this.c, new j$b(a)); + } + if (this.d) { + d = BD(vNb(BD(this.e, 11), (wtc(), gtc)), 10); + if (d) { + for (b = new Sr(ur(U_b(d).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 17); + Ekb(this.c, new j$b(a)); + } + } + } + } + return this.c; + }; + _2.Hf = function M$b() { + return BD(this.e, 11).j; + }; + _2.If = function N$b() { + return Ccb(DD(vNb(BD(this.e, 11), (wtc(), Nsc)))); + }; + _2.a = null; + _2.b = null; + _2.c = null; + _2.d = false; + mdb(fne, "LGraphAdapters/LPortAdapter", 1722); + bcb(1723, 1, Dke, P$b); + _2.ue = function Q$b(a, b) { + return O$b(BD(a, 11), BD(b, 11)); + }; + _2.Fb = function R$b(a) { + return this === a; + }; + _2.ve = function S$b() { + return new tpb(this); + }; + mdb(fne, "LGraphAdapters/PortComparator", 1723); + bcb(804, 1, Oie, T$b); + _2.Mb = function U$b(a) { + return BD(a, 10), a$b(), true; + }; + mdb(fne, "LGraphAdapters/lambda$0$Type", 804); + bcb(392, 299, { 3: 1, 299: 1, 392: 1, 94: 1, 134: 1 }); + mdb(fne, "LShape", 392); + bcb(70, 392, { 3: 1, 299: 1, 70: 1, 392: 1, 94: 1, 134: 1 }, p_b, q_b); + _2.Ib = function r_b() { + var a; + a = o_b(this); + return a == null ? "label" : "l_" + a; + }; + mdb(fne, "LLabel", 70); + bcb(207, 1, { 3: 1, 4: 1, 207: 1, 414: 1 }); + _2.Fb = function C_b(a) { + var b; + if (JD(a, 207)) { + b = BD(a, 207); + return this.d == b.d && this.a == b.a && this.b == b.b && this.c == b.c; + } else { + return false; + } + }; + _2.Hb = function D_b() { + var a, b; + a = Hdb(this.b) << 16; + a |= Hdb(this.a) & aje; + b = Hdb(this.c) << 16; + b |= Hdb(this.d) & aje; + return a ^ b; + }; + _2.Jf = function F_b(b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + g = 0; + while (g < b.length && E_b((BCb(g, b.length), b.charCodeAt(g)), mne)) { + ++g; + } + c2 = b.length; + while (c2 > 0 && E_b((BCb(c2 - 1, b.length), b.charCodeAt(c2 - 1)), nne)) { + --c2; + } + if (g < c2) { + l = mfb(b.substr(g, c2 - g), ",|;"); + try { + for (i3 = l, j = 0, k = i3.length; j < k; ++j) { + h = i3[j]; + f2 = mfb(h, "="); + if (f2.length != 2) { + throw vbb(new Wdb("Expecting a list of key-value pairs.")); + } + e = ufb(f2[0]); + m = Hcb(ufb(f2[1])); + dfb(e, "top") ? this.d = m : dfb(e, "left") ? this.b = m : dfb(e, "bottom") ? this.a = m : dfb(e, "right") && (this.c = m); + } + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + d = a; + throw vbb(new Wdb(one2 + d)); + } else + throw vbb(a); + } + } + }; + _2.Ib = function G_b() { + return "[top=" + this.d + ",left=" + this.b + ",bottom=" + this.a + ",right=" + this.c + "]"; + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + _2.d = 0; + mdb(pne, "Spacing", 207); + bcb(142, 207, qne, H_b, I_b, J_b, K_b); + var i1 = mdb(pne, "ElkMargin", 142); + bcb(651, 142, qne, L_b); + mdb(fne, "LMargin", 651); + bcb(10, 392, { 3: 1, 299: 1, 10: 1, 392: 1, 94: 1, 134: 1 }, b0b); + _2.Ib = function c0b() { + return a0b(this); + }; + _2.i = false; + var OQ = mdb(fne, "LNode", 10); + bcb(267, 22, { 3: 1, 35: 1, 22: 1, 267: 1 }, k0b); + var d0b, e0b, f0b, g0b, h0b, i0b; + var NQ = ndb(fne, "LNode/NodeType", 267, CI, m0b, l0b); + var n0b; + bcb(116, 207, rne, p0b, q0b, r0b); + var j1 = mdb(pne, "ElkPadding", 116); + bcb(764, 116, rne, s0b); + mdb(fne, "LPadding", 764); + bcb(11, 392, { 3: 1, 299: 1, 11: 1, 392: 1, 94: 1, 134: 1 }, H0b); + _2.Ib = function I0b() { + var a, b, c2; + a = new Ufb(); + Qfb((a.a += "p_", a), C0b(this)); + !!this.i && Qfb(Pfb((a.a += "[", a), this.i), "]"); + if (this.e.c.length == 1 && this.g.c.length == 0 && BD(Ikb(this.e, 0), 17).c != this) { + b = BD(Ikb(this.e, 0), 17).c; + Qfb((a.a += " << ", a), C0b(b)); + Qfb(Pfb((a.a += "[", a), b.i), "]"); + } + if (this.e.c.length == 0 && this.g.c.length == 1 && BD(Ikb(this.g, 0), 17).d != this) { + c2 = BD(Ikb(this.g, 0), 17).d; + Qfb((a.a += " >> ", a), C0b(c2)); + Qfb(Pfb((a.a += "[", a), c2.i), "]"); + } + return a.a; + }; + _2.c = true; + _2.d = false; + var t0b, u0b, v0b, w0b, x0b, y0b; + var aR = mdb(fne, "LPort", 11); + bcb(397, 1, vie, J0b); + _2.Jc = function K0b(a) { + reb(this, a); + }; + _2.Kc = function L0b() { + var a; + a = new olb(this.a.e); + return new M0b(a); + }; + mdb(fne, "LPort/1", 397); + bcb(1290, 1, aie, M0b); + _2.Nb = function N0b(a) { + Rrb(this, a); + }; + _2.Pb = function P0b() { + return BD(mlb(this.a), 17).c; + }; + _2.Ob = function O0b() { + return llb(this.a); + }; + _2.Qb = function Q0b() { + nlb(this.a); + }; + mdb(fne, "LPort/1/1", 1290); + bcb(359, 1, vie, R0b); + _2.Jc = function S0b(a) { + reb(this, a); + }; + _2.Kc = function T0b() { + var a; + return a = new olb(this.a.g), new U0b(a); + }; + mdb(fne, "LPort/2", 359); + bcb(762, 1, aie, U0b); + _2.Nb = function V0b(a) { + Rrb(this, a); + }; + _2.Pb = function X0b() { + return BD(mlb(this.a), 17).d; + }; + _2.Ob = function W0b() { + return llb(this.a); + }; + _2.Qb = function Y0b() { + nlb(this.a); + }; + mdb(fne, "LPort/2/1", 762); + bcb(1283, 1, vie, Z0b); + _2.Jc = function $0b(a) { + reb(this, a); + }; + _2.Kc = function _0b() { + return new b1b(this); + }; + mdb(fne, "LPort/CombineIter", 1283); + bcb(201, 1, aie, b1b); + _2.Nb = function c1b(a) { + Rrb(this, a); + }; + _2.Qb = function f1b() { + Srb(); + }; + _2.Ob = function d1b() { + return a1b(this); + }; + _2.Pb = function e1b() { + return llb(this.a) ? mlb(this.a) : mlb(this.b); + }; + mdb(fne, "LPort/CombineIter/1", 201); + bcb(1285, 1, Vke, h1b); + _2.Lb = function i1b(a) { + return g1b(a); + }; + _2.Fb = function j1b(a) { + return this === a; + }; + _2.Mb = function k1b(a) { + return z0b(), BD(a, 11).e.c.length != 0; + }; + mdb(fne, "LPort/lambda$0$Type", 1285); + bcb(1284, 1, Vke, m1b); + _2.Lb = function n1b(a) { + return l1b(a); + }; + _2.Fb = function o1b(a) { + return this === a; + }; + _2.Mb = function p1b(a) { + return z0b(), BD(a, 11).g.c.length != 0; + }; + mdb(fne, "LPort/lambda$1$Type", 1284); + bcb(1286, 1, Vke, q1b); + _2.Lb = function r1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Acd); + }; + _2.Fb = function s1b(a) { + return this === a; + }; + _2.Mb = function t1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Acd); + }; + mdb(fne, "LPort/lambda$2$Type", 1286); + bcb(1287, 1, Vke, u1b); + _2.Lb = function v1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), zcd); + }; + _2.Fb = function w1b(a) { + return this === a; + }; + _2.Mb = function x1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), zcd); + }; + mdb(fne, "LPort/lambda$3$Type", 1287); + bcb(1288, 1, Vke, y1b); + _2.Lb = function z1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Rcd); + }; + _2.Fb = function A1b(a) { + return this === a; + }; + _2.Mb = function B1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Rcd); + }; + mdb(fne, "LPort/lambda$4$Type", 1288); + bcb(1289, 1, Vke, C1b); + _2.Lb = function D1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Tcd); + }; + _2.Fb = function E1b(a) { + return this === a; + }; + _2.Mb = function F1b(a) { + return z0b(), BD(a, 11).j == (Ucd(), Tcd); + }; + mdb(fne, "LPort/lambda$5$Type", 1289); + bcb(29, 299, { 3: 1, 20: 1, 299: 1, 29: 1, 94: 1, 134: 1 }, H1b); + _2.Jc = function I1b(a) { + reb(this, a); + }; + _2.Kc = function J1b() { + return new olb(this.a); + }; + _2.Ib = function K1b() { + return "L_" + Jkb(this.b.b, this, 0) + Fe(this.a); + }; + mdb(fne, "Layer", 29); + bcb(1342, 1, {}, a2b); + mdb(tne, une, 1342); + bcb(1346, 1, {}, e2b); + _2.Kb = function f2b(a) { + return atd(BD(a, 82)); + }; + mdb(tne, "ElkGraphImporter/0methodref$connectableShapeToNode$Type", 1346); + bcb(1349, 1, {}, g2b); + _2.Kb = function h2b(a) { + return atd(BD(a, 82)); + }; + mdb(tne, "ElkGraphImporter/1methodref$connectableShapeToNode$Type", 1349); + bcb(1343, 1, qie, i2b); + _2.td = function j2b(a) { + Q1b(this.a, BD(a, 118)); + }; + mdb(tne, vne, 1343); + bcb(1344, 1, qie, k2b); + _2.td = function l2b(a) { + Q1b(this.a, BD(a, 118)); + }; + mdb(tne, wne, 1344); + bcb(1345, 1, {}, m2b); + _2.Kb = function n2b(a) { + return new YAb(null, new Kub(Old(BD(a, 79)), 16)); + }; + mdb(tne, xne, 1345); + bcb(1347, 1, Oie, o2b); + _2.Mb = function p2b(a) { + return b2b(this.a, BD(a, 33)); + }; + mdb(tne, yne, 1347); + bcb(1348, 1, {}, q2b); + _2.Kb = function r2b(a) { + return new YAb(null, new Kub(Nld(BD(a, 79)), 16)); + }; + mdb(tne, "ElkGraphImporter/lambda$5$Type", 1348); + bcb(1350, 1, Oie, s2b); + _2.Mb = function t2b(a) { + return c2b(this.a, BD(a, 33)); + }; + mdb(tne, "ElkGraphImporter/lambda$7$Type", 1350); + bcb(1351, 1, Oie, u2b); + _2.Mb = function v2b(a) { + return d2b(BD(a, 79)); + }; + mdb(tne, "ElkGraphImporter/lambda$8$Type", 1351); + bcb(1278, 1, {}, D2b); + var w2b; + mdb(tne, "ElkGraphLayoutTransferrer", 1278); + bcb(1279, 1, Oie, G2b); + _2.Mb = function H2b(a) { + return E2b(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$0$Type", 1279); + bcb(1280, 1, qie, I2b); + _2.td = function J2b(a) { + x2b(); + Ekb(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$1$Type", 1280); + bcb(1281, 1, Oie, K2b); + _2.Mb = function L2b(a) { + return F2b(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$2$Type", 1281); + bcb(1282, 1, qie, M2b); + _2.td = function N2b(a) { + x2b(); + Ekb(this.a, BD(a, 17)); + }; + mdb(tne, "ElkGraphLayoutTransferrer/lambda$3$Type", 1282); + bcb(1485, 1, ene, S2b); + _2.pf = function T2b(a, b) { + Q2b(BD(a, 37), b); + }; + mdb(Ane, "CommentNodeMarginCalculator", 1485); + bcb(1486, 1, {}, U2b); + _2.Kb = function V2b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "CommentNodeMarginCalculator/lambda$0$Type", 1486); + bcb(1487, 1, qie, W2b); + _2.td = function X2b(a) { + R2b(BD(a, 10)); + }; + mdb(Ane, "CommentNodeMarginCalculator/lambda$1$Type", 1487); + bcb(1488, 1, ene, _2b); + _2.pf = function a3b(a, b) { + Z2b(BD(a, 37), b); + }; + mdb(Ane, "CommentPostprocessor", 1488); + bcb(1489, 1, ene, e3b); + _2.pf = function f3b(a, b) { + b3b(BD(a, 37), b); + }; + mdb(Ane, "CommentPreprocessor", 1489); + bcb(1490, 1, ene, h3b); + _2.pf = function i3b(a, b) { + g3b(BD(a, 37), b); + }; + mdb(Ane, "ConstraintsPostprocessor", 1490); + bcb(1491, 1, ene, p3b); + _2.pf = function q3b(a, b) { + n3b(BD(a, 37), b); + }; + mdb(Ane, "EdgeAndLayerConstraintEdgeReverser", 1491); + bcb(1492, 1, ene, t3b); + _2.pf = function v3b(a, b) { + r3b(BD(a, 37), b); + }; + mdb(Ane, "EndLabelPostprocessor", 1492); + bcb(1493, 1, {}, w3b); + _2.Kb = function x3b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "EndLabelPostprocessor/lambda$0$Type", 1493); + bcb(1494, 1, Oie, y3b); + _2.Mb = function z3b(a) { + return u3b(BD(a, 10)); + }; + mdb(Ane, "EndLabelPostprocessor/lambda$1$Type", 1494); + bcb(1495, 1, qie, A3b); + _2.td = function B3b(a) { + s3b(BD(a, 10)); + }; + mdb(Ane, "EndLabelPostprocessor/lambda$2$Type", 1495); + bcb(1496, 1, ene, M3b); + _2.pf = function P3b(a, b) { + I3b(BD(a, 37), b); + }; + mdb(Ane, "EndLabelPreprocessor", 1496); + bcb(1497, 1, {}, Q3b); + _2.Kb = function R3b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$0$Type", 1497); + bcb(1498, 1, qie, S3b); + _2.td = function T3b(a) { + E3b(this.a, this.b, this.c, BD(a, 10)); + }; + _2.a = 0; + _2.b = 0; + _2.c = false; + mdb(Ane, "EndLabelPreprocessor/lambda$1$Type", 1498); + bcb(1499, 1, Oie, U3b); + _2.Mb = function V3b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), pad2)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$2$Type", 1499); + bcb(1500, 1, qie, W3b); + _2.td = function X3b(a) { + Dsb(this.a, BD(a, 70)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$3$Type", 1500); + bcb(1501, 1, Oie, Y3b); + _2.Mb = function Z3b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), oad)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$4$Type", 1501); + bcb(1502, 1, qie, $3b); + _2.td = function _3b(a) { + Dsb(this.a, BD(a, 70)); + }; + mdb(Ane, "EndLabelPreprocessor/lambda$5$Type", 1502); + bcb(1551, 1, ene, i4b); + _2.pf = function j4b(a, b) { + f4b(BD(a, 37), b); + }; + var a4b; + mdb(Ane, "EndLabelSorter", 1551); + bcb(1552, 1, Dke, l4b); + _2.ue = function m4b(a, b) { + return k4b(BD(a, 456), BD(b, 456)); + }; + _2.Fb = function n4b(a) { + return this === a; + }; + _2.ve = function o4b() { + return new tpb(this); + }; + mdb(Ane, "EndLabelSorter/1", 1552); + bcb(456, 1, { 456: 1 }, p4b); + mdb(Ane, "EndLabelSorter/LabelGroup", 456); + bcb(1553, 1, {}, q4b); + _2.Kb = function r4b(a) { + return b4b(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "EndLabelSorter/lambda$0$Type", 1553); + bcb(1554, 1, Oie, s4b); + _2.Mb = function t4b(a) { + return b4b(), BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "EndLabelSorter/lambda$1$Type", 1554); + bcb(1555, 1, qie, u4b); + _2.td = function v4b(a) { + g4b(BD(a, 10)); + }; + mdb(Ane, "EndLabelSorter/lambda$2$Type", 1555); + bcb(1556, 1, Oie, w4b); + _2.Mb = function x4b(a) { + return b4b(), PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), oad)); + }; + mdb(Ane, "EndLabelSorter/lambda$3$Type", 1556); + bcb(1557, 1, Oie, y4b); + _2.Mb = function z4b(a) { + return b4b(), PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), pad2)); + }; + mdb(Ane, "EndLabelSorter/lambda$4$Type", 1557); + bcb(1503, 1, ene, L4b); + _2.pf = function M4b(a, b) { + J4b(this, BD(a, 37)); + }; + _2.b = 0; + _2.c = 0; + mdb(Ane, "FinalSplineBendpointsCalculator", 1503); + bcb(1504, 1, {}, N4b); + _2.Kb = function O4b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$0$Type", 1504); + bcb(1505, 1, {}, P4b); + _2.Kb = function Q4b(a) { + return new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$1$Type", 1505); + bcb(1506, 1, Oie, R4b); + _2.Mb = function S4b(a) { + return !OZb(BD(a, 17)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$2$Type", 1506); + bcb(1507, 1, Oie, T4b); + _2.Mb = function U4b(a) { + return wNb(BD(a, 17), (wtc(), rtc)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$3$Type", 1507); + bcb(1508, 1, qie, V4b); + _2.td = function W4b(a) { + C4b(this.a, BD(a, 128)); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$4$Type", 1508); + bcb(1509, 1, qie, X4b); + _2.td = function Y4b(a) { + smb(BD(a, 17).a); + }; + mdb(Ane, "FinalSplineBendpointsCalculator/lambda$5$Type", 1509); + bcb(792, 1, ene, u5b); + _2.pf = function v5b(a, b) { + l5b(this, BD(a, 37), b); + }; + mdb(Ane, "GraphTransformer", 792); + bcb(511, 22, { 3: 1, 35: 1, 22: 1, 511: 1 }, z5b); + var w5b, x5b; + var ZR = ndb(Ane, "GraphTransformer/Mode", 511, CI, B5b, A5b); + var C5b; + bcb(1510, 1, ene, I5b); + _2.pf = function J5b(a, b) { + F5b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalNodeResizingProcessor", 1510); + bcb(1511, 1, ene, Q5b); + _2.pf = function R5b(a, b) { + M5b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalPortConstraintProcessor", 1511); + bcb(1512, 1, Dke, T5b); + _2.ue = function U5b(a, b) { + return S5b(BD(a, 10), BD(b, 10)); + }; + _2.Fb = function V5b(a) { + return this === a; + }; + _2.ve = function W5b() { + return new tpb(this); + }; + mdb(Ane, "HierarchicalPortConstraintProcessor/NodeComparator", 1512); + bcb(1513, 1, ene, Z5b); + _2.pf = function $5b(a, b) { + X5b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalPortDummySizeProcessor", 1513); + bcb(1514, 1, ene, l6b); + _2.pf = function m6b(a, b) { + e6b(this, BD(a, 37), b); + }; + _2.a = 0; + mdb(Ane, "HierarchicalPortOrthogonalEdgeRouter", 1514); + bcb(1515, 1, Dke, o6b); + _2.ue = function p6b(a, b) { + return n6b(BD(a, 10), BD(b, 10)); + }; + _2.Fb = function q6b(a) { + return this === a; + }; + _2.ve = function r6b() { + return new tpb(this); + }; + mdb(Ane, "HierarchicalPortOrthogonalEdgeRouter/1", 1515); + bcb(1516, 1, Dke, t6b); + _2.ue = function u6b(a, b) { + return s6b(BD(a, 10), BD(b, 10)); + }; + _2.Fb = function v6b(a) { + return this === a; + }; + _2.ve = function w6b() { + return new tpb(this); + }; + mdb(Ane, "HierarchicalPortOrthogonalEdgeRouter/2", 1516); + bcb(1517, 1, ene, z6b); + _2.pf = function A6b(a, b) { + y6b(BD(a, 37), b); + }; + mdb(Ane, "HierarchicalPortPositionProcessor", 1517); + bcb(1518, 1, ene, J6b); + _2.pf = function K6b(a, b) { + I6b(this, BD(a, 37)); + }; + _2.a = 0; + _2.c = 0; + var B6b, C6b; + mdb(Ane, "HighDegreeNodeLayeringProcessor", 1518); + bcb(571, 1, { 571: 1 }, L6b); + _2.b = -1; + _2.d = -1; + mdb(Ane, "HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation", 571); + bcb(1519, 1, {}, M6b); + _2.Kb = function N6b(a) { + return D6b(), R_b(BD(a, 10)); + }; + _2.Fb = function O6b(a) { + return this === a; + }; + mdb(Ane, "HighDegreeNodeLayeringProcessor/lambda$0$Type", 1519); + bcb(1520, 1, {}, P6b); + _2.Kb = function Q6b(a) { + return D6b(), U_b(BD(a, 10)); + }; + _2.Fb = function R6b(a) { + return this === a; + }; + mdb(Ane, "HighDegreeNodeLayeringProcessor/lambda$1$Type", 1520); + bcb(1526, 1, ene, X6b); + _2.pf = function Y6b(a, b) { + W6b(this, BD(a, 37), b); + }; + mdb(Ane, "HyperedgeDummyMerger", 1526); + bcb(793, 1, {}, Z6b); + _2.a = false; + _2.b = false; + _2.c = false; + mdb(Ane, "HyperedgeDummyMerger/MergeState", 793); + bcb(1527, 1, {}, $6b); + _2.Kb = function _6b(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "HyperedgeDummyMerger/lambda$0$Type", 1527); + bcb(1528, 1, {}, a7b); + _2.Kb = function b7b(a) { + return new YAb(null, new Kub(BD(a, 10).j, 16)); + }; + mdb(Ane, "HyperedgeDummyMerger/lambda$1$Type", 1528); + bcb(1529, 1, qie, c7b); + _2.td = function d7b(a) { + BD(a, 11).p = -1; + }; + mdb(Ane, "HyperedgeDummyMerger/lambda$2$Type", 1529); + bcb(1530, 1, ene, g7b); + _2.pf = function h7b(a, b) { + f7b(BD(a, 37), b); + }; + mdb(Ane, "HypernodesProcessor", 1530); + bcb(1531, 1, ene, j7b); + _2.pf = function k7b(a, b) { + i7b(BD(a, 37), b); + }; + mdb(Ane, "InLayerConstraintProcessor", 1531); + bcb(1532, 1, ene, m7b); + _2.pf = function n7b(a, b) { + l7b(BD(a, 37), b); + }; + mdb(Ane, "InnermostNodeMarginCalculator", 1532); + bcb(1533, 1, ene, r7b); + _2.pf = function w7b(a, b) { + q7b(this, BD(a, 37)); + }; + _2.a = Qje; + _2.b = Qje; + _2.c = Pje; + _2.d = Pje; + var zS = mdb(Ane, "InteractiveExternalPortPositioner", 1533); + bcb(1534, 1, {}, x7b); + _2.Kb = function y7b(a) { + return BD(a, 17).d.i; + }; + _2.Fb = function z7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$0$Type", 1534); + bcb(1535, 1, {}, A7b); + _2.Kb = function B7b(a) { + return s7b(this.a, ED(a)); + }; + _2.Fb = function C7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$1$Type", 1535); + bcb(1536, 1, {}, D7b); + _2.Kb = function E7b(a) { + return BD(a, 17).c.i; + }; + _2.Fb = function F7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$2$Type", 1536); + bcb(1537, 1, {}, G7b); + _2.Kb = function H7b(a) { + return t7b(this.a, ED(a)); + }; + _2.Fb = function I7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$3$Type", 1537); + bcb(1538, 1, {}, J7b); + _2.Kb = function K7b(a) { + return u7b(this.a, ED(a)); + }; + _2.Fb = function L7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$4$Type", 1538); + bcb(1539, 1, {}, M7b); + _2.Kb = function N7b(a) { + return v7b(this.a, ED(a)); + }; + _2.Fb = function O7b(a) { + return this === a; + }; + mdb(Ane, "InteractiveExternalPortPositioner/lambda$5$Type", 1539); + bcb(77, 22, { 3: 1, 35: 1, 22: 1, 77: 1, 234: 1 }, T8b); + _2.Kf = function U8b() { + switch (this.g) { + case 15: + return new eoc(); + case 22: + return new Aoc(); + case 47: + return new Joc(); + case 28: + case 35: + return new uac(); + case 32: + return new S2b(); + case 42: + return new _2b(); + case 1: + return new e3b(); + case 41: + return new h3b(); + case 56: + return new u5b((y5b(), x5b)); + case 0: + return new u5b((y5b(), w5b)); + case 2: + return new p3b(); + case 54: + return new t3b(); + case 33: + return new M3b(); + case 51: + return new L4b(); + case 55: + return new I5b(); + case 13: + return new Q5b(); + case 38: + return new Z5b(); + case 44: + return new l6b(); + case 40: + return new z6b(); + case 9: + return new J6b(); + case 49: + return new sgc(); + case 37: + return new X6b(); + case 43: + return new g7b(); + case 27: + return new j7b(); + case 30: + return new m7b(); + case 3: + return new r7b(); + case 18: + return new b9b(); + case 29: + return new h9b(); + case 5: + return new u9b(); + case 50: + return new D9b(); + case 34: + return new $9b(); + case 36: + return new Iac(); + case 52: + return new i4b(); + case 11: + return new Sac(); + case 7: + return new abc(); + case 39: + return new obc(); + case 45: + return new rbc(); + case 16: + return new vbc(); + case 10: + return new Fbc(); + case 48: + return new Xbc(); + case 21: + return new ccc(); + case 23: + return new fGc((rGc(), pGc)); + case 8: + return new lcc(); + case 12: + return new tcc(); + case 4: + return new ycc(); + case 19: + return new Tcc(); + case 17: + return new pdc(); + case 53: + return new sdc(); + case 6: + return new hec(); + case 25: + return new wdc(); + case 46: + return new Ndc(); + case 31: + return new sec(); + case 14: + return new Fec(); + case 26: + return new ppc(); + case 20: + return new Uec(); + case 24: + return new fGc((rGc(), qGc)); + default: + throw vbb(new Wdb(Dne + (this.f != null ? this.f : "" + this.g))); + } + }; + var P7b, Q7b, R7b, S7b, T7b, U7b, V7b, W7b, X7b, Y7b, Z7b, $7b, _7b, a8b, b8b, c8b, d8b, e8b, f8b, g8b, h8b, i8b, j8b, k8b, l8b, m8b, n8b, o8b, p8b, q8b, r8b, s8b, t8b, u8b, v8b, w8b, x8b, y8b, z8b, A8b, B8b, C8b, D8b, E8b, F8b, G8b, H8b, I8b, J8b, K8b, L8b, M8b, N8b, O8b, P8b, Q8b, R8b; + var AS = ndb(Ane, Ene, 77, CI, W8b, V8b); + var X8b; + bcb(1540, 1, ene, b9b); + _2.pf = function c9b(a, b) { + _8b(BD(a, 37), b); + }; + mdb(Ane, "InvertedPortProcessor", 1540); + bcb(1541, 1, ene, h9b); + _2.pf = function i9b(a, b) { + g9b(BD(a, 37), b); + }; + mdb(Ane, "LabelAndNodeSizeProcessor", 1541); + bcb(1542, 1, Oie, j9b); + _2.Mb = function k9b(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "LabelAndNodeSizeProcessor/lambda$0$Type", 1542); + bcb(1543, 1, Oie, l9b); + _2.Mb = function m9b(a) { + return BD(a, 10).k == (j0b(), e0b); + }; + mdb(Ane, "LabelAndNodeSizeProcessor/lambda$1$Type", 1543); + bcb(1544, 1, qie, n9b); + _2.td = function o9b(a) { + e9b(this.b, this.a, this.c, BD(a, 10)); + }; + _2.a = false; + _2.c = false; + mdb(Ane, "LabelAndNodeSizeProcessor/lambda$2$Type", 1544); + bcb(1545, 1, ene, u9b); + _2.pf = function v9b(a, b) { + s9b(BD(a, 37), b); + }; + var p9b; + mdb(Ane, "LabelDummyInserter", 1545); + bcb(1546, 1, Vke, w9b); + _2.Lb = function x9b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), nad)); + }; + _2.Fb = function y9b(a) { + return this === a; + }; + _2.Mb = function z9b(a) { + return PD(vNb(BD(a, 70), (Nyc(), Qwc))) === PD((qad(), nad)); + }; + mdb(Ane, "LabelDummyInserter/1", 1546); + bcb(1547, 1, ene, D9b); + _2.pf = function E9b(a, b) { + C9b(BD(a, 37), b); + }; + mdb(Ane, "LabelDummyRemover", 1547); + bcb(1548, 1, Oie, F9b); + _2.Mb = function G9b(a) { + return Ccb(DD(vNb(BD(a, 70), (Nyc(), Pwc)))); + }; + mdb(Ane, "LabelDummyRemover/lambda$0$Type", 1548); + bcb(1359, 1, ene, $9b); + _2.pf = function cac(a, b) { + W9b(this, BD(a, 37), b); + }; + _2.a = null; + var H9b; + mdb(Ane, "LabelDummySwitcher", 1359); + bcb(286, 1, { 286: 1 }, gac); + _2.c = 0; + _2.d = null; + _2.f = 0; + mdb(Ane, "LabelDummySwitcher/LabelDummyInfo", 286); + bcb(1360, 1, {}, hac); + _2.Kb = function iac(a) { + return I9b(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "LabelDummySwitcher/lambda$0$Type", 1360); + bcb(1361, 1, Oie, jac); + _2.Mb = function kac(a) { + return I9b(), BD(a, 10).k == (j0b(), f0b); + }; + mdb(Ane, "LabelDummySwitcher/lambda$1$Type", 1361); + bcb(1362, 1, {}, lac); + _2.Kb = function mac(a) { + return _9b(this.a, BD(a, 10)); + }; + mdb(Ane, "LabelDummySwitcher/lambda$2$Type", 1362); + bcb(1363, 1, qie, nac); + _2.td = function oac(a) { + aac(this.a, BD(a, 286)); + }; + mdb(Ane, "LabelDummySwitcher/lambda$3$Type", 1363); + bcb(1364, 1, Dke, pac); + _2.ue = function qac(a, b) { + return bac(BD(a, 286), BD(b, 286)); + }; + _2.Fb = function rac(a) { + return this === a; + }; + _2.ve = function sac() { + return new tpb(this); + }; + mdb(Ane, "LabelDummySwitcher/lambda$4$Type", 1364); + bcb(791, 1, ene, uac); + _2.pf = function vac(a, b) { + tac(BD(a, 37), b); + }; + mdb(Ane, "LabelManagementProcessor", 791); + bcb(1549, 1, ene, Iac); + _2.pf = function Jac(a, b) { + Cac(BD(a, 37), b); + }; + mdb(Ane, "LabelSideSelector", 1549); + bcb(1550, 1, Oie, Kac); + _2.Mb = function Lac(a) { + return Ccb(DD(vNb(BD(a, 70), (Nyc(), Pwc)))); + }; + mdb(Ane, "LabelSideSelector/lambda$0$Type", 1550); + bcb(1558, 1, ene, Sac); + _2.pf = function Tac(a, b) { + Oac(BD(a, 37), b); + }; + mdb(Ane, "LayerConstraintPostprocessor", 1558); + bcb(1559, 1, ene, abc); + _2.pf = function bbc(a, b) { + $ac(BD(a, 37), b); + }; + var Uac; + mdb(Ane, "LayerConstraintPreprocessor", 1559); + bcb(360, 22, { 3: 1, 35: 1, 22: 1, 360: 1 }, ibc); + var cbc, dbc, ebc, fbc; + var VS = ndb(Ane, "LayerConstraintPreprocessor/HiddenNodeConnections", 360, CI, kbc, jbc); + var lbc; + bcb(1560, 1, ene, obc); + _2.pf = function pbc(a, b) { + nbc(BD(a, 37), b); + }; + mdb(Ane, "LayerSizeAndGraphHeightCalculator", 1560); + bcb(1561, 1, ene, rbc); + _2.pf = function tbc(a, b) { + qbc(BD(a, 37), b); + }; + mdb(Ane, "LongEdgeJoiner", 1561); + bcb(1562, 1, ene, vbc); + _2.pf = function xbc(a, b) { + ubc(BD(a, 37), b); + }; + mdb(Ane, "LongEdgeSplitter", 1562); + bcb(1563, 1, ene, Fbc); + _2.pf = function Ibc(a, b) { + Bbc(this, BD(a, 37), b); + }; + _2.d = 0; + _2.e = 0; + _2.i = 0; + _2.j = 0; + _2.k = 0; + _2.n = 0; + mdb(Ane, "NodePromotion", 1563); + bcb(1564, 1, {}, Jbc); + _2.Kb = function Kbc(a) { + return BD(a, 46), Bcb(), true; + }; + _2.Fb = function Lbc(a) { + return this === a; + }; + mdb(Ane, "NodePromotion/lambda$0$Type", 1564); + bcb(1565, 1, {}, Mbc); + _2.Kb = function Nbc(a) { + return Gbc(this.a, BD(a, 46)); + }; + _2.Fb = function Obc(a) { + return this === a; + }; + _2.a = 0; + mdb(Ane, "NodePromotion/lambda$1$Type", 1565); + bcb(1566, 1, {}, Pbc); + _2.Kb = function Qbc(a) { + return Hbc(this.a, BD(a, 46)); + }; + _2.Fb = function Rbc(a) { + return this === a; + }; + _2.a = 0; + mdb(Ane, "NodePromotion/lambda$2$Type", 1566); + bcb(1567, 1, ene, Xbc); + _2.pf = function Ybc(a, b) { + Sbc(BD(a, 37), b); + }; + mdb(Ane, "NorthSouthPortPostprocessor", 1567); + bcb(1568, 1, ene, ccc); + _2.pf = function ecc(a, b) { + acc(BD(a, 37), b); + }; + mdb(Ane, "NorthSouthPortPreprocessor", 1568); + bcb(1569, 1, Dke, fcc); + _2.ue = function gcc(a, b) { + return dcc(BD(a, 11), BD(b, 11)); + }; + _2.Fb = function hcc(a) { + return this === a; + }; + _2.ve = function icc() { + return new tpb(this); + }; + mdb(Ane, "NorthSouthPortPreprocessor/lambda$0$Type", 1569); + bcb(1570, 1, ene, lcc); + _2.pf = function ncc(a, b) { + kcc(BD(a, 37), b); + }; + mdb(Ane, "PartitionMidprocessor", 1570); + bcb(1571, 1, Oie, occ); + _2.Mb = function pcc(a) { + return wNb(BD(a, 10), (Nyc(), Nxc)); + }; + mdb(Ane, "PartitionMidprocessor/lambda$0$Type", 1571); + bcb(1572, 1, qie, qcc); + _2.td = function rcc(a) { + mcc(this.a, BD(a, 10)); + }; + mdb(Ane, "PartitionMidprocessor/lambda$1$Type", 1572); + bcb(1573, 1, ene, tcc); + _2.pf = function ucc(a, b) { + scc(BD(a, 37), b); + }; + mdb(Ane, "PartitionPostprocessor", 1573); + bcb(1574, 1, ene, ycc); + _2.pf = function zcc(a, b) { + wcc(BD(a, 37), b); + }; + mdb(Ane, "PartitionPreprocessor", 1574); + bcb(1575, 1, Oie, Acc); + _2.Mb = function Bcc(a) { + return wNb(BD(a, 10), (Nyc(), Nxc)); + }; + mdb(Ane, "PartitionPreprocessor/lambda$0$Type", 1575); + bcb(1576, 1, {}, Ccc); + _2.Kb = function Dcc(a) { + return new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Ane, "PartitionPreprocessor/lambda$1$Type", 1576); + bcb(1577, 1, Oie, Ecc); + _2.Mb = function Fcc(a) { + return vcc(BD(a, 17)); + }; + mdb(Ane, "PartitionPreprocessor/lambda$2$Type", 1577); + bcb(1578, 1, qie, Gcc); + _2.td = function Hcc(a) { + xcc(BD(a, 17)); + }; + mdb(Ane, "PartitionPreprocessor/lambda$3$Type", 1578); + bcb(1579, 1, ene, Tcc); + _2.pf = function Xcc(a, b) { + Qcc(BD(a, 37), b); + }; + var Icc, Jcc, Kcc, Lcc, Mcc, Ncc; + mdb(Ane, "PortListSorter", 1579); + bcb(1580, 1, {}, Zcc); + _2.Kb = function $cc(a) { + return Occ(), BD(a, 11).e; + }; + mdb(Ane, "PortListSorter/lambda$0$Type", 1580); + bcb(1581, 1, {}, _cc); + _2.Kb = function adc(a) { + return Occ(), BD(a, 11).g; + }; + mdb(Ane, "PortListSorter/lambda$1$Type", 1581); + bcb(1582, 1, Dke, bdc); + _2.ue = function cdc(a, b) { + return Ucc(BD(a, 11), BD(b, 11)); + }; + _2.Fb = function ddc(a) { + return this === a; + }; + _2.ve = function edc() { + return new tpb(this); + }; + mdb(Ane, "PortListSorter/lambda$2$Type", 1582); + bcb(1583, 1, Dke, fdc); + _2.ue = function gdc(a, b) { + return Vcc(BD(a, 11), BD(b, 11)); + }; + _2.Fb = function hdc(a) { + return this === a; + }; + _2.ve = function idc() { + return new tpb(this); + }; + mdb(Ane, "PortListSorter/lambda$3$Type", 1583); + bcb(1584, 1, Dke, jdc); + _2.ue = function kdc(a, b) { + return Wcc(BD(a, 11), BD(b, 11)); + }; + _2.Fb = function ldc(a) { + return this === a; + }; + _2.ve = function mdc() { + return new tpb(this); + }; + mdb(Ane, "PortListSorter/lambda$4$Type", 1584); + bcb(1585, 1, ene, pdc); + _2.pf = function qdc(a, b) { + ndc(BD(a, 37), b); + }; + mdb(Ane, "PortSideProcessor", 1585); + bcb(1586, 1, ene, sdc); + _2.pf = function tdc(a, b) { + rdc(BD(a, 37), b); + }; + mdb(Ane, "ReversedEdgeRestorer", 1586); + bcb(1591, 1, ene, wdc); + _2.pf = function xdc(a, b) { + udc(this, BD(a, 37), b); + }; + mdb(Ane, "SelfLoopPortRestorer", 1591); + bcb(1592, 1, {}, ydc); + _2.Kb = function zdc(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$0$Type", 1592); + bcb(1593, 1, Oie, Adc); + _2.Mb = function Bdc(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$1$Type", 1593); + bcb(1594, 1, Oie, Cdc); + _2.Mb = function Ddc(a) { + return wNb(BD(a, 10), (wtc(), ntc)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$2$Type", 1594); + bcb(1595, 1, {}, Edc); + _2.Kb = function Fdc(a) { + return BD(vNb(BD(a, 10), (wtc(), ntc)), 403); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$3$Type", 1595); + bcb(1596, 1, qie, Gdc); + _2.td = function Hdc(a) { + vdc(this.a, BD(a, 403)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$4$Type", 1596); + bcb(794, 1, qie, Idc); + _2.td = function Jdc(a) { + ljc(BD(a, 101)); + }; + mdb(Ane, "SelfLoopPortRestorer/lambda$5$Type", 794); + bcb(1597, 1, ene, Ndc); + _2.pf = function Pdc(a, b) { + Kdc(BD(a, 37), b); + }; + mdb(Ane, "SelfLoopPostProcessor", 1597); + bcb(1598, 1, {}, Qdc); + _2.Kb = function Rdc(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$0$Type", 1598); + bcb(1599, 1, Oie, Sdc); + _2.Mb = function Tdc(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$1$Type", 1599); + bcb(1600, 1, Oie, Udc); + _2.Mb = function Vdc(a) { + return wNb(BD(a, 10), (wtc(), ntc)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$2$Type", 1600); + bcb(1601, 1, qie, Wdc); + _2.td = function Xdc(a) { + Ldc(BD(a, 10)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$3$Type", 1601); + bcb(1602, 1, {}, Ydc); + _2.Kb = function Zdc(a) { + return new YAb(null, new Kub(BD(a, 101).f, 1)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$4$Type", 1602); + bcb(1603, 1, qie, $dc); + _2.td = function _dc(a) { + Mdc(this.a, BD(a, 409)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$5$Type", 1603); + bcb(1604, 1, Oie, aec); + _2.Mb = function bec(a) { + return !!BD(a, 101).i; + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$6$Type", 1604); + bcb(1605, 1, qie, cec); + _2.td = function dec(a) { + Odc(this.a, BD(a, 101)); + }; + mdb(Ane, "SelfLoopPostProcessor/lambda$7$Type", 1605); + bcb(1587, 1, ene, hec); + _2.pf = function iec(a, b) { + gec(BD(a, 37), b); + }; + mdb(Ane, "SelfLoopPreProcessor", 1587); + bcb(1588, 1, {}, jec); + _2.Kb = function kec(a) { + return new YAb(null, new Kub(BD(a, 101).f, 1)); + }; + mdb(Ane, "SelfLoopPreProcessor/lambda$0$Type", 1588); + bcb(1589, 1, {}, lec); + _2.Kb = function mec(a) { + return BD(a, 409).a; + }; + mdb(Ane, "SelfLoopPreProcessor/lambda$1$Type", 1589); + bcb(1590, 1, qie, nec); + _2.td = function oec(a) { + fec(BD(a, 17)); + }; + mdb(Ane, "SelfLoopPreProcessor/lambda$2$Type", 1590); + bcb(1606, 1, ene, sec); + _2.pf = function tec(a, b) { + qec(this, BD(a, 37), b); + }; + mdb(Ane, "SelfLoopRouter", 1606); + bcb(1607, 1, {}, uec); + _2.Kb = function vec(a) { + return new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Ane, "SelfLoopRouter/lambda$0$Type", 1607); + bcb(1608, 1, Oie, wec); + _2.Mb = function xec(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SelfLoopRouter/lambda$1$Type", 1608); + bcb(1609, 1, Oie, yec); + _2.Mb = function zec(a) { + return wNb(BD(a, 10), (wtc(), ntc)); + }; + mdb(Ane, "SelfLoopRouter/lambda$2$Type", 1609); + bcb(1610, 1, {}, Aec); + _2.Kb = function Bec(a) { + return BD(vNb(BD(a, 10), (wtc(), ntc)), 403); + }; + mdb(Ane, "SelfLoopRouter/lambda$3$Type", 1610); + bcb(1611, 1, qie, Cec); + _2.td = function Dec(a) { + pec(this.a, this.b, BD(a, 403)); + }; + mdb(Ane, "SelfLoopRouter/lambda$4$Type", 1611); + bcb(1612, 1, ene, Fec); + _2.pf = function Iec(a, b) { + Eec(BD(a, 37), b); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor", 1612); + bcb(1613, 1, Oie, Jec); + _2.Mb = function Kec(a) { + return BD(a, 10).k == (j0b(), h0b); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$0$Type", 1613); + bcb(1614, 1, Oie, Lec); + _2.Mb = function Mec(a) { + return uNb(BD(a, 10))._b((Nyc(), ayc)); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$1$Type", 1614); + bcb(1615, 1, Dke, Nec); + _2.ue = function Oec(a, b) { + return Gec(BD(a, 10), BD(b, 10)); + }; + _2.Fb = function Pec(a) { + return this === a; + }; + _2.ve = function Qec() { + return new tpb(this); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$2$Type", 1615); + bcb(1616, 1, {}, Rec); + _2.Ce = function Sec(a, b) { + return Hec(BD(a, 10), BD(b, 10)); + }; + mdb(Ane, "SemiInteractiveCrossMinProcessor/lambda$3$Type", 1616); + bcb(1618, 1, ene, Uec); + _2.pf = function Yec(a, b) { + Tec(BD(a, 37), b); + }; + mdb(Ane, "SortByInputModelProcessor", 1618); + bcb(1619, 1, Oie, Zec); + _2.Mb = function $ec(a) { + return BD(a, 11).g.c.length != 0; + }; + mdb(Ane, "SortByInputModelProcessor/lambda$0$Type", 1619); + bcb(1620, 1, qie, _ec); + _2.td = function afc(a) { + Wec(this.a, BD(a, 11)); + }; + mdb(Ane, "SortByInputModelProcessor/lambda$1$Type", 1620); + bcb(1693, 803, {}, jfc); + _2.Me = function kfc(a) { + var b, c2, d, e; + this.c = a; + switch (this.a.g) { + case 2: + b = new Rkb(); + MAb(JAb(new YAb(null, new Kub(this.c.a.b, 16)), new lgc()), new ngc(this, b)); + nEb(this, new tfc()); + Hkb(b, new xfc()); + b.c = KC(SI, Uhe, 1, 0, 5, 1); + MAb(JAb(new YAb(null, new Kub(this.c.a.b, 16)), new zfc()), new Bfc(b)); + nEb(this, new Ffc()); + Hkb(b, new Jfc()); + b.c = KC(SI, Uhe, 1, 0, 5, 1); + c2 = Ntb($zb(OAb(new YAb(null, new Kub(this.c.a.b, 16)), new Lfc(this))), new Nfc()); + MAb(new YAb(null, new Kub(this.c.a.a, 16)), new Rfc(c2, b)); + nEb(this, new Vfc()); + Hkb(b, new Zfc()); + b.c = KC(SI, Uhe, 1, 0, 5, 1); + break; + case 3: + d = new Rkb(); + nEb(this, new lfc()); + e = Ntb($zb(OAb(new YAb(null, new Kub(this.c.a.b, 16)), new pfc(this))), new Pfc()); + MAb(JAb(new YAb(null, new Kub(this.c.a.b, 16)), new _fc()), new bgc(e, d)); + nEb(this, new fgc()); + Hkb(d, new jgc()); + d.c = KC(SI, Uhe, 1, 0, 5, 1); + break; + default: + throw vbb(new x2c()); + } + }; + _2.b = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation", 1693); + bcb(1694, 1, Vke, lfc); + _2.Lb = function mfc(a) { + return JD(BD(a, 57).g, 145); + }; + _2.Fb = function nfc(a) { + return this === a; + }; + _2.Mb = function ofc(a) { + return JD(BD(a, 57).g, 145); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$0$Type", 1694); + bcb(1695, 1, {}, pfc); + _2.Fe = function qfc(a) { + return dfc(this.a, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$1$Type", 1695); + bcb(1703, 1, Pie, rfc); + _2.Vd = function sfc() { + cfc(this.a, this.b, -1); + }; + _2.b = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$10$Type", 1703); + bcb(1705, 1, Vke, tfc); + _2.Lb = function ufc(a) { + return JD(BD(a, 57).g, 145); + }; + _2.Fb = function vfc(a) { + return this === a; + }; + _2.Mb = function wfc(a) { + return JD(BD(a, 57).g, 145); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$11$Type", 1705); + bcb(1706, 1, qie, xfc); + _2.td = function yfc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$12$Type", 1706); + bcb(1707, 1, Oie, zfc); + _2.Mb = function Afc(a) { + return JD(BD(a, 57).g, 10); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$13$Type", 1707); + bcb(1709, 1, qie, Bfc); + _2.td = function Cfc(a) { + efc(this.a, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$14$Type", 1709); + bcb(1708, 1, Pie, Dfc); + _2.Vd = function Efc() { + cfc(this.b, this.a, -1); + }; + _2.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$15$Type", 1708); + bcb(1710, 1, Vke, Ffc); + _2.Lb = function Gfc(a) { + return JD(BD(a, 57).g, 10); + }; + _2.Fb = function Hfc(a) { + return this === a; + }; + _2.Mb = function Ifc(a) { + return JD(BD(a, 57).g, 10); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$16$Type", 1710); + bcb(1711, 1, qie, Jfc); + _2.td = function Kfc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$17$Type", 1711); + bcb(1712, 1, {}, Lfc); + _2.Fe = function Mfc(a) { + return ffc(this.a, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$18$Type", 1712); + bcb(1713, 1, {}, Nfc); + _2.De = function Ofc() { + return 0; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$19$Type", 1713); + bcb(1696, 1, {}, Pfc); + _2.De = function Qfc() { + return 0; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$2$Type", 1696); + bcb(1715, 1, qie, Rfc); + _2.td = function Sfc(a) { + gfc(this.a, this.b, BD(a, 307)); + }; + _2.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$20$Type", 1715); + bcb(1714, 1, Pie, Tfc); + _2.Vd = function Ufc() { + bfc(this.a, this.b, -1); + }; + _2.b = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$21$Type", 1714); + bcb(1716, 1, Vke, Vfc); + _2.Lb = function Wfc(a) { + return BD(a, 57), true; + }; + _2.Fb = function Xfc(a) { + return this === a; + }; + _2.Mb = function Yfc(a) { + return BD(a, 57), true; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$22$Type", 1716); + bcb(1717, 1, qie, Zfc); + _2.td = function $fc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$23$Type", 1717); + bcb(1697, 1, Oie, _fc); + _2.Mb = function agc(a) { + return JD(BD(a, 57).g, 10); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$3$Type", 1697); + bcb(1699, 1, qie, bgc); + _2.td = function cgc(a) { + hfc(this.a, this.b, BD(a, 57)); + }; + _2.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$4$Type", 1699); + bcb(1698, 1, Pie, dgc); + _2.Vd = function egc() { + cfc(this.b, this.a, -1); + }; + _2.a = 0; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$5$Type", 1698); + bcb(1700, 1, Vke, fgc); + _2.Lb = function ggc(a) { + return BD(a, 57), true; + }; + _2.Fb = function hgc(a) { + return this === a; + }; + _2.Mb = function igc(a) { + return BD(a, 57), true; + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$6$Type", 1700); + bcb(1701, 1, qie, jgc); + _2.td = function kgc(a) { + BD(a, 365).Vd(); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$7$Type", 1701); + bcb(1702, 1, Oie, lgc); + _2.Mb = function mgc(a) { + return JD(BD(a, 57).g, 145); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$8$Type", 1702); + bcb(1704, 1, qie, ngc); + _2.td = function ogc(a) { + ifc(this.a, this.b, BD(a, 57)); + }; + mdb(Jne, "EdgeAwareScanlineConstraintCalculation/lambda$9$Type", 1704); + bcb(1521, 1, ene, sgc); + _2.pf = function xgc(a, b) { + rgc(this, BD(a, 37), b); + }; + var pgc; + mdb(Jne, "HorizontalGraphCompactor", 1521); + bcb(1522, 1, {}, ygc); + _2.Oe = function zgc(a, b) { + var c2, d, e; + if (vgc(a, b)) { + return 0; + } + c2 = tgc(a); + d = tgc(b); + if (!!c2 && c2.k == (j0b(), e0b) || !!d && d.k == (j0b(), e0b)) { + return 0; + } + e = BD(vNb(this.a.a, (wtc(), otc)), 304); + return fBc(e, c2 ? c2.k : (j0b(), g0b), d ? d.k : (j0b(), g0b)); + }; + _2.Pe = function Agc(a, b) { + var c2, d, e; + if (vgc(a, b)) { + return 1; + } + c2 = tgc(a); + d = tgc(b); + e = BD(vNb(this.a.a, (wtc(), otc)), 304); + return iBc(e, c2 ? c2.k : (j0b(), g0b), d ? d.k : (j0b(), g0b)); + }; + mdb(Jne, "HorizontalGraphCompactor/1", 1522); + bcb(1523, 1, {}, Bgc); + _2.Ne = function Cgc(a, b) { + return qgc(), a.a.i == 0; + }; + mdb(Jne, "HorizontalGraphCompactor/lambda$0$Type", 1523); + bcb(1524, 1, {}, Dgc); + _2.Ne = function Egc(a, b) { + return wgc(this.a, a, b); + }; + mdb(Jne, "HorizontalGraphCompactor/lambda$1$Type", 1524); + bcb(1664, 1, {}, Ygc); + var Fgc, Ggc; + mdb(Jne, "LGraphToCGraphTransformer", 1664); + bcb(1672, 1, Oie, ehc); + _2.Mb = function fhc(a) { + return a != null; + }; + mdb(Jne, "LGraphToCGraphTransformer/0methodref$nonNull$Type", 1672); + bcb(1665, 1, {}, ghc); + _2.Kb = function hhc(a) { + return Hgc(), fcb(vNb(BD(BD(a, 57).g, 10), (wtc(), $sc))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$0$Type", 1665); + bcb(1666, 1, {}, ihc); + _2.Kb = function jhc(a) { + return Hgc(), gic(BD(BD(a, 57).g, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$1$Type", 1666); + bcb(1675, 1, Oie, khc); + _2.Mb = function lhc(a) { + return Hgc(), JD(BD(a, 57).g, 10); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$10$Type", 1675); + bcb(1676, 1, qie, mhc); + _2.td = function nhc(a) { + Zgc(BD(a, 57)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$11$Type", 1676); + bcb(1677, 1, Oie, ohc); + _2.Mb = function phc(a) { + return Hgc(), JD(BD(a, 57).g, 145); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$12$Type", 1677); + bcb(1681, 1, qie, qhc); + _2.td = function rhc(a) { + $gc(BD(a, 57)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$13$Type", 1681); + bcb(1678, 1, qie, shc); + _2.td = function thc(a) { + _gc(this.a, BD(a, 8)); + }; + _2.a = 0; + mdb(Jne, "LGraphToCGraphTransformer/lambda$14$Type", 1678); + bcb(1679, 1, qie, uhc); + _2.td = function vhc(a) { + ahc(this.a, BD(a, 110)); + }; + _2.a = 0; + mdb(Jne, "LGraphToCGraphTransformer/lambda$15$Type", 1679); + bcb(1680, 1, qie, whc); + _2.td = function xhc(a) { + bhc(this.a, BD(a, 8)); + }; + _2.a = 0; + mdb(Jne, "LGraphToCGraphTransformer/lambda$16$Type", 1680); + bcb(1682, 1, {}, yhc); + _2.Kb = function zhc(a) { + return Hgc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$17$Type", 1682); + bcb(1683, 1, Oie, Ahc); + _2.Mb = function Bhc(a) { + return Hgc(), OZb(BD(a, 17)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$18$Type", 1683); + bcb(1684, 1, qie, Chc); + _2.td = function Dhc(a) { + Qgc(this.a, BD(a, 17)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$19$Type", 1684); + bcb(1668, 1, qie, Ehc); + _2.td = function Fhc(a) { + Rgc(this.a, BD(a, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$2$Type", 1668); + bcb(1685, 1, {}, Ghc); + _2.Kb = function Hhc(a) { + return Hgc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$20$Type", 1685); + bcb(1686, 1, {}, Ihc); + _2.Kb = function Jhc(a) { + return Hgc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$21$Type", 1686); + bcb(1687, 1, {}, Khc); + _2.Kb = function Lhc(a) { + return Hgc(), BD(vNb(BD(a, 17), (wtc(), rtc)), 15); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$22$Type", 1687); + bcb(1688, 1, Oie, Mhc); + _2.Mb = function Nhc(a) { + return chc(BD(a, 15)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$23$Type", 1688); + bcb(1689, 1, qie, Ohc); + _2.td = function Phc(a) { + Jgc(this.a, BD(a, 15)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$24$Type", 1689); + bcb(1667, 1, qie, Qhc); + _2.td = function Rhc(a) { + Sgc(this.a, this.b, BD(a, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$3$Type", 1667); + bcb(1669, 1, {}, Shc); + _2.Kb = function Thc(a) { + return Hgc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$4$Type", 1669); + bcb(1670, 1, {}, Uhc); + _2.Kb = function Vhc(a) { + return Hgc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$5$Type", 1670); + bcb(1671, 1, {}, Whc); + _2.Kb = function Xhc(a) { + return Hgc(), BD(vNb(BD(a, 17), (wtc(), rtc)), 15); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$6$Type", 1671); + bcb(1673, 1, qie, Yhc); + _2.td = function Zhc(a) { + dhc(this.a, BD(a, 15)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$8$Type", 1673); + bcb(1674, 1, qie, $hc); + _2.td = function _hc(a) { + Tgc(this.a, this.b, BD(a, 145)); + }; + mdb(Jne, "LGraphToCGraphTransformer/lambda$9$Type", 1674); + bcb(1663, 1, {}, dic); + _2.Le = function eic(a) { + var b, c2, d, e, f2; + this.a = a; + this.d = new KFb(); + this.c = KC(jN, Uhe, 121, this.a.a.a.c.length, 0, 1); + this.b = 0; + for (c2 = new olb(this.a.a.a); c2.a < c2.c.c.length; ) { + b = BD(mlb(c2), 307); + b.d = this.b; + f2 = nGb(oGb(new pGb(), b), this.d); + this.c[this.b] = f2; + ++this.b; + } + cic(this); + bic(this); + aic(this); + uGb(LGb(this.d), new Zdd()); + for (e = new olb(this.a.a.b); e.a < e.c.c.length; ) { + d = BD(mlb(e), 57); + d.d.c = this.c[d.a.d].e + d.b.a; + } + }; + _2.b = 0; + mdb(Jne, "NetworkSimplexCompaction", 1663); + bcb(145, 1, { 35: 1, 145: 1 }, hic); + _2.wd = function iic(a) { + return fic(this, BD(a, 145)); + }; + _2.Ib = function jic() { + return gic(this); + }; + mdb(Jne, "VerticalSegment", 145); + bcb(827, 1, {}, sic); + _2.c = 0; + _2.e = 0; + _2.i = 0; + mdb(Kne, "BetweenLayerEdgeTwoNodeCrossingsCounter", 827); + bcb(663, 1, { 663: 1 }, zic); + _2.Ib = function Aic() { + return "AdjacencyList [node=" + this.d + ", adjacencies= " + this.a + "]"; + }; + _2.b = 0; + _2.c = 0; + _2.f = 0; + mdb(Kne, "BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList", 663); + bcb(287, 1, { 35: 1, 287: 1 }, Dic); + _2.wd = function Eic(a) { + return Bic(this, BD(a, 287)); + }; + _2.Ib = function Fic() { + return "Adjacency [position=" + this.c + ", cardinality=" + this.a + ", currentCardinality=" + this.b + "]"; + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + mdb(Kne, "BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency", 287); + bcb(1929, 1, {}, Iic); + _2.b = 0; + _2.e = false; + mdb(Kne, "CrossingMatrixFiller", 1929); + var qY = odb(Lne, "IInitializable"); + bcb(1804, 1, Mne, Oic); + _2.Nf = function Ric(a, b, c2, d, e, f2) { + }; + _2.Pf = function Tic(a, b, c2) { + }; + _2.Lf = function Pic() { + return this.c != (rGc(), pGc); + }; + _2.Mf = function Qic() { + this.e = KC(WD, oje, 25, this.d, 15, 1); + }; + _2.Of = function Sic(a, b) { + b[a][0].c.p = a; + }; + _2.Qf = function Uic(a, b, c2, d) { + ++this.d; + }; + _2.Rf = function Vic() { + return true; + }; + _2.Sf = function Wic(a, b, c2, d) { + Kic(this, a, b, c2); + return Jic(this, b); + }; + _2.Tf = function Xic(a, b) { + var c2; + c2 = Lic(b, a.length); + Kic(this, a, c2, b); + return Mic(this, c2); + }; + _2.d = 0; + mdb(Kne, "GreedySwitchHeuristic", 1804); + bcb(1930, 1, {}, ejc); + _2.b = 0; + _2.d = 0; + mdb(Kne, "NorthSouthEdgeNeighbouringNodeCrossingsCounter", 1930); + bcb(1917, 1, {}, jjc); + _2.a = false; + mdb(Kne, "SwitchDecider", 1917); + bcb(101, 1, { 101: 1 }, pjc); + _2.a = null; + _2.c = null; + _2.i = null; + mdb(Nne, "SelfHyperLoop", 101); + bcb(1916, 1, {}, vjc); + _2.c = 0; + _2.e = 0; + mdb(Nne, "SelfHyperLoopLabels", 1916); + bcb(411, 22, { 3: 1, 35: 1, 22: 1, 411: 1 }, Bjc); + var wjc, xjc, yjc, zjc; + var mV = ndb(Nne, "SelfHyperLoopLabels/Alignment", 411, CI, Djc, Cjc); + var Ejc; + bcb(409, 1, { 409: 1 }, Gjc); + mdb(Nne, "SelfLoopEdge", 409); + bcb(403, 1, { 403: 1 }, Kjc); + _2.a = false; + mdb(Nne, "SelfLoopHolder", 403); + bcb(1724, 1, Oie, Mjc); + _2.Mb = function Njc(a) { + return OZb(BD(a, 17)); + }; + mdb(Nne, "SelfLoopHolder/lambda$0$Type", 1724); + bcb(113, 1, { 113: 1 }, Pjc); + _2.a = false; + _2.c = false; + mdb(Nne, "SelfLoopPort", 113); + bcb(1792, 1, Oie, Qjc); + _2.Mb = function Rjc(a) { + return OZb(BD(a, 17)); + }; + mdb(Nne, "SelfLoopPort/lambda$0$Type", 1792); + bcb(363, 22, { 3: 1, 35: 1, 22: 1, 363: 1 }, Yjc); + var Sjc, Tjc, Ujc, Vjc, Wjc; + var uV = ndb(Nne, "SelfLoopType", 363, CI, _jc, $jc); + var akc; + bcb(1732, 1, {}, xkc); + var ckc, dkc, ekc, fkc; + mdb(One, "PortRestorer", 1732); + bcb(361, 22, { 3: 1, 35: 1, 22: 1, 361: 1 }, Gkc); + var Ckc, Dkc, Ekc; + var vV = ndb(One, "PortRestorer/PortSideArea", 361, CI, Ikc, Hkc); + var Jkc; + bcb(1733, 1, {}, Lkc); + _2.Kb = function Mkc(a) { + return gkc(), BD(a, 15).Oc(); + }; + mdb(One, "PortRestorer/lambda$0$Type", 1733); + bcb(1734, 1, qie, Nkc); + _2.td = function Okc(a) { + gkc(); + BD(a, 113).c = false; + }; + mdb(One, "PortRestorer/lambda$1$Type", 1734); + bcb(1743, 1, Oie, Pkc); + _2.Mb = function Qkc(a) { + return gkc(), BD(a, 11).j == (Ucd(), Tcd); + }; + mdb(One, "PortRestorer/lambda$10$Type", 1743); + bcb(1744, 1, {}, Rkc); + _2.Kb = function Skc(a) { + return gkc(), BD(a, 113).d; + }; + mdb(One, "PortRestorer/lambda$11$Type", 1744); + bcb(1745, 1, qie, Tkc); + _2.td = function Ukc(a) { + ykc(this.a, BD(a, 11)); + }; + mdb(One, "PortRestorer/lambda$12$Type", 1745); + bcb(1735, 1, qie, Vkc); + _2.td = function Wkc(a) { + zkc(this.a, BD(a, 101)); + }; + mdb(One, "PortRestorer/lambda$2$Type", 1735); + bcb(1736, 1, Dke, Xkc); + _2.ue = function Ykc(a, b) { + return Akc(BD(a, 113), BD(b, 113)); + }; + _2.Fb = function Zkc(a) { + return this === a; + }; + _2.ve = function $kc() { + return new tpb(this); + }; + mdb(One, "PortRestorer/lambda$3$Type", 1736); + bcb(1737, 1, Oie, _kc); + _2.Mb = function alc(a) { + return gkc(), BD(a, 113).c; + }; + mdb(One, "PortRestorer/lambda$4$Type", 1737); + bcb(1738, 1, Oie, blc); + _2.Mb = function clc(a) { + return nkc(BD(a, 11)); + }; + mdb(One, "PortRestorer/lambda$5$Type", 1738); + bcb(1739, 1, Oie, dlc); + _2.Mb = function elc(a) { + return gkc(), BD(a, 11).j == (Ucd(), Acd); + }; + mdb(One, "PortRestorer/lambda$6$Type", 1739); + bcb(1740, 1, Oie, flc); + _2.Mb = function glc(a) { + return gkc(), BD(a, 11).j == (Ucd(), zcd); + }; + mdb(One, "PortRestorer/lambda$7$Type", 1740); + bcb(1741, 1, Oie, hlc); + _2.Mb = function ilc(a) { + return okc(BD(a, 11)); + }; + mdb(One, "PortRestorer/lambda$8$Type", 1741); + bcb(1742, 1, Oie, jlc); + _2.Mb = function klc(a) { + return gkc(), BD(a, 11).j == (Ucd(), Rcd); + }; + mdb(One, "PortRestorer/lambda$9$Type", 1742); + bcb(270, 22, { 3: 1, 35: 1, 22: 1, 270: 1 }, Blc); + var slc, tlc, ulc, vlc, wlc, xlc, ylc, zlc; + var KV = ndb(One, "PortSideAssigner/Target", 270, CI, Dlc, Clc); + var Elc; + bcb(1725, 1, {}, Glc); + _2.Kb = function Hlc(a) { + return JAb(new YAb(null, new Kub(BD(a, 101).j, 16)), new Ylc()); + }; + mdb(One, "PortSideAssigner/lambda$1$Type", 1725); + bcb(1726, 1, {}, Ilc); + _2.Kb = function Jlc(a) { + return BD(a, 113).d; + }; + mdb(One, "PortSideAssigner/lambda$2$Type", 1726); + bcb(1727, 1, qie, Klc); + _2.td = function Llc(a) { + G0b(BD(a, 11), (Ucd(), Acd)); + }; + mdb(One, "PortSideAssigner/lambda$3$Type", 1727); + bcb(1728, 1, {}, Mlc); + _2.Kb = function Nlc(a) { + return BD(a, 113).d; + }; + mdb(One, "PortSideAssigner/lambda$4$Type", 1728); + bcb(1729, 1, qie, Olc); + _2.td = function Plc(a) { + plc(this.a, BD(a, 11)); + }; + mdb(One, "PortSideAssigner/lambda$5$Type", 1729); + bcb(1730, 1, Dke, Qlc); + _2.ue = function Rlc(a, b) { + return qlc(BD(a, 101), BD(b, 101)); + }; + _2.Fb = function Slc(a) { + return this === a; + }; + _2.ve = function Tlc() { + return new tpb(this); + }; + mdb(One, "PortSideAssigner/lambda$6$Type", 1730); + bcb(1731, 1, Dke, Ulc); + _2.ue = function Vlc(a, b) { + return rlc(BD(a, 113), BD(b, 113)); + }; + _2.Fb = function Wlc(a) { + return this === a; + }; + _2.ve = function Xlc() { + return new tpb(this); + }; + mdb(One, "PortSideAssigner/lambda$7$Type", 1731); + bcb(805, 1, Oie, Ylc); + _2.Mb = function Zlc(a) { + return BD(a, 113).c; + }; + mdb(One, "PortSideAssigner/lambda$8$Type", 805); + bcb(2009, 1, {}); + mdb(Pne, "AbstractSelfLoopRouter", 2009); + bcb(1750, 1, Dke, gmc); + _2.ue = function hmc(a, b) { + return emc(BD(a, 101), BD(b, 101)); + }; + _2.Fb = function imc(a) { + return this === a; + }; + _2.ve = function jmc() { + return new tpb(this); + }; + mdb(Pne, rle, 1750); + bcb(1751, 1, Dke, kmc); + _2.ue = function lmc(a, b) { + return fmc(BD(a, 101), BD(b, 101)); + }; + _2.Fb = function mmc(a) { + return this === a; + }; + _2.ve = function nmc() { + return new tpb(this); + }; + mdb(Pne, sle, 1751); + bcb(1793, 2009, {}, zmc); + _2.Uf = function Amc(a, b, c2) { + return c2; + }; + mdb(Pne, "OrthogonalSelfLoopRouter", 1793); + bcb(1795, 1, qie, Bmc); + _2.td = function Cmc(a) { + ymc(this.b, this.a, BD(a, 8)); + }; + mdb(Pne, "OrthogonalSelfLoopRouter/lambda$0$Type", 1795); + bcb(1794, 1793, {}, Fmc); + _2.Uf = function Gmc(a, b, c2) { + var d, e; + d = a.c.d; + St(c2, 0, P6c(R6c(d.n), d.a)); + e = a.d.d; + Dsb(c2, P6c(R6c(e.n), e.a)); + return Dmc(c2); + }; + mdb(Pne, "PolylineSelfLoopRouter", 1794); + bcb(1746, 1, {}, Umc); + _2.a = null; + var Hmc; + mdb(Pne, "RoutingDirector", 1746); + bcb(1747, 1, Dke, Wmc); + _2.ue = function Xmc(a, b) { + return Vmc(BD(a, 113), BD(b, 113)); + }; + _2.Fb = function Ymc(a) { + return this === a; + }; + _2.ve = function Zmc() { + return new tpb(this); + }; + mdb(Pne, "RoutingDirector/lambda$0$Type", 1747); + bcb(1748, 1, {}, $mc); + _2.Kb = function _mc(a) { + return Imc(), BD(a, 101).j; + }; + mdb(Pne, "RoutingDirector/lambda$1$Type", 1748); + bcb(1749, 1, qie, anc); + _2.td = function bnc(a) { + Imc(); + BD(a, 15).ad(Hmc); + }; + mdb(Pne, "RoutingDirector/lambda$2$Type", 1749); + bcb(1752, 1, {}, mnc); + mdb(Pne, "RoutingSlotAssigner", 1752); + bcb(1753, 1, Oie, pnc); + _2.Mb = function qnc(a) { + return nnc(this.a, BD(a, 101)); + }; + mdb(Pne, "RoutingSlotAssigner/lambda$0$Type", 1753); + bcb(1754, 1, Dke, rnc); + _2.ue = function snc(a, b) { + return onc(this.a, BD(a, 101), BD(b, 101)); + }; + _2.Fb = function tnc(a) { + return this === a; + }; + _2.ve = function unc() { + return new tpb(this); + }; + mdb(Pne, "RoutingSlotAssigner/lambda$1$Type", 1754); + bcb(1796, 1793, {}, wnc); + _2.Uf = function xnc(a, b, c2) { + var d, e, f2, g; + d = Edb(ED(c_b(a.b.g.b, (Nyc(), nyc)))); + g = new u7c(OC(GC(m1, 1), nie, 8, 0, [(f2 = a.c.d, P6c(new g7c(f2.n), f2.a))])); + vnc(a, b, c2, g, d); + Dsb(g, (e = a.d.d, P6c(new g7c(e.n), e.a))); + return UPc(new YPc(g)); + }; + mdb(Pne, "SplineSelfLoopRouter", 1796); + bcb(578, 1, Dke, Bnc, Dnc); + _2.ue = function Enc(a, b) { + return ync(this, BD(a, 10), BD(b, 10)); + }; + _2.Fb = function Fnc(a) { + return this === a; + }; + _2.ve = function Gnc() { + return new tpb(this); + }; + mdb(Qne, "ModelOrderNodeComparator", 578); + bcb(1755, 1, Oie, Hnc); + _2.Mb = function Inc(a) { + return BD(a, 11).e.c.length != 0; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$0$Type", 1755); + bcb(1756, 1, {}, Jnc); + _2.Kb = function Knc(a) { + return BD(Ikb(BD(a, 11).e, 0), 17).c; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$1$Type", 1756); + bcb(1757, 1, Oie, Lnc); + _2.Mb = function Mnc(a) { + return BD(a, 11).e.c.length != 0; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$2$Type", 1757); + bcb(1758, 1, {}, Nnc); + _2.Kb = function Onc(a) { + return BD(Ikb(BD(a, 11).e, 0), 17).c; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$3$Type", 1758); + bcb(1759, 1, Oie, Pnc); + _2.Mb = function Qnc(a) { + return BD(a, 11).e.c.length != 0; + }; + mdb(Qne, "ModelOrderNodeComparator/lambda$4$Type", 1759); + bcb(806, 1, Dke, Tnc, Unc); + _2.ue = function Vnc(a, b) { + return Rnc(this, a, b); + }; + _2.Fb = function Wnc(a) { + return this === a; + }; + _2.ve = function Xnc() { + return new tpb(this); + }; + mdb(Qne, "ModelOrderPortComparator", 806); + bcb(801, 1, {}, Ync); + _2.Vf = function $nc(a, b) { + var c2, d, e, f2; + e = Znc(b); + c2 = new Rkb(); + f2 = b.f / e; + for (d = 1; d < e; ++d) { + Ekb(c2, meb(Tbb(Cbb($wnd.Math.round(d * f2))))); + } + return c2; + }; + _2.Wf = function _nc() { + return false; + }; + mdb(Rne, "ARDCutIndexHeuristic", 801); + bcb(1479, 1, ene, eoc); + _2.pf = function foc(a, b) { + doc(BD(a, 37), b); + }; + mdb(Rne, "BreakingPointInserter", 1479); + bcb(305, 1, { 305: 1 }, goc); + _2.Ib = function joc() { + var a; + a = new Ufb(); + a.a += "BPInfo["; + a.a += "\n start="; + Pfb(a, this.i); + a.a += "\n end="; + Pfb(a, this.a); + a.a += "\n nodeStartEdge="; + Pfb(a, this.e); + a.a += "\n startEndEdge="; + Pfb(a, this.j); + a.a += "\n originalEdge="; + Pfb(a, this.f); + a.a += "\n startInLayerDummy="; + Pfb(a, this.k); + a.a += "\n startInLayerEdge="; + Pfb(a, this.n); + a.a += "\n endInLayerDummy="; + Pfb(a, this.b); + a.a += "\n endInLayerEdge="; + Pfb(a, this.c); + return a.a; + }; + mdb(Rne, "BreakingPointInserter/BPInfo", 305); + bcb(652, 1, { 652: 1 }, qoc); + _2.a = false; + _2.b = 0; + _2.c = 0; + mdb(Rne, "BreakingPointInserter/Cut", 652); + bcb(1480, 1, ene, Aoc); + _2.pf = function Boc(a, b) { + yoc(BD(a, 37), b); + }; + mdb(Rne, "BreakingPointProcessor", 1480); + bcb(1481, 1, Oie, Coc); + _2.Mb = function Doc(a) { + return hoc(BD(a, 10)); + }; + mdb(Rne, "BreakingPointProcessor/0methodref$isEnd$Type", 1481); + bcb(1482, 1, Oie, Eoc); + _2.Mb = function Foc(a) { + return ioc(BD(a, 10)); + }; + mdb(Rne, "BreakingPointProcessor/1methodref$isStart$Type", 1482); + bcb(1483, 1, ene, Joc); + _2.pf = function Koc(a, b) { + Hoc(this, BD(a, 37), b); + }; + mdb(Rne, "BreakingPointRemover", 1483); + bcb(1484, 1, qie, Loc); + _2.td = function Moc(a) { + BD(a, 128).k = true; + }; + mdb(Rne, "BreakingPointRemover/lambda$0$Type", 1484); + bcb(797, 1, {}, Xoc); + _2.b = 0; + _2.e = 0; + _2.f = 0; + _2.j = 0; + mdb(Rne, "GraphStats", 797); + bcb(798, 1, {}, Zoc); + _2.Ce = function $oc(a, b) { + return $wnd.Math.max(Edb(ED(a)), Edb(ED(b))); + }; + mdb(Rne, "GraphStats/0methodref$max$Type", 798); + bcb(799, 1, {}, _oc); + _2.Ce = function apc(a, b) { + return $wnd.Math.max(Edb(ED(a)), Edb(ED(b))); + }; + mdb(Rne, "GraphStats/2methodref$max$Type", 799); + bcb(1660, 1, {}, bpc); + _2.Ce = function cpc(a, b) { + return Yoc(ED(a), ED(b)); + }; + mdb(Rne, "GraphStats/lambda$1$Type", 1660); + bcb(1661, 1, {}, dpc); + _2.Kb = function epc(a) { + return Roc(this.a, BD(a, 29)); + }; + mdb(Rne, "GraphStats/lambda$2$Type", 1661); + bcb(1662, 1, {}, fpc); + _2.Kb = function gpc(a) { + return Qoc(this.a, BD(a, 29)); + }; + mdb(Rne, "GraphStats/lambda$6$Type", 1662); + bcb(800, 1, {}, hpc); + _2.Vf = function ipc(a, b) { + var c2; + c2 = BD(vNb(a, (Nyc(), Eyc)), 15); + return c2 ? c2 : (mmb(), mmb(), jmb); + }; + _2.Wf = function jpc() { + return false; + }; + mdb(Rne, "ICutIndexCalculator/ManualCutIndexCalculator", 800); + bcb(802, 1, {}, kpc); + _2.Vf = function lpc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u; + u = (b.n == null && Uoc(b), b.n); + i3 = (b.d == null && Uoc(b), b.d); + t = KC(UD, Vje, 25, u.length, 15, 1); + t[0] = u[0]; + r = u[0]; + for (j = 1; j < u.length; j++) { + t[j] = t[j - 1] + u[j]; + r += u[j]; + } + e = Znc(b) - 1; + g = BD(vNb(a, (Nyc(), Fyc)), 19).a; + d = Qje; + c2 = new Rkb(); + for (m = $wnd.Math.max(0, e - g); m <= $wnd.Math.min(b.f - 1, e + g); m++) { + p = r / (m + 1); + q = 0; + k = 1; + f2 = new Rkb(); + s = Qje; + l = 0; + h = 0; + o2 = i3[0]; + if (m == 0) { + s = r; + h = (b.g == null && (b.g = Poc(b, new _oc())), Edb(b.g)); + } else { + while (k < b.f) { + if (t[k - 1] - q >= p) { + Ekb(f2, meb(k)); + s = $wnd.Math.max(s, t[k - 1] - l); + h += o2; + q += t[k - 1] - q; + l = t[k - 1]; + o2 = i3[k]; + } + o2 = $wnd.Math.max(o2, i3[k]); + ++k; + } + h += o2; + } + n = $wnd.Math.min(1 / s, 1 / b.b / h); + if (n > d) { + d = n; + c2 = f2; + } + } + return c2; + }; + _2.Wf = function mpc() { + return false; + }; + mdb(Rne, "MSDCutIndexHeuristic", 802); + bcb(1617, 1, ene, ppc); + _2.pf = function qpc(a, b) { + opc(BD(a, 37), b); + }; + mdb(Rne, "SingleEdgeGraphWrapper", 1617); + bcb(227, 22, { 3: 1, 35: 1, 22: 1, 227: 1 }, Bpc); + var upc, vpc, wpc, xpc, ypc, zpc; + var EW = ndb(Sne, "CenterEdgeLabelPlacementStrategy", 227, CI, Dpc, Cpc); + var Epc; + bcb(422, 22, { 3: 1, 35: 1, 22: 1, 422: 1 }, Jpc); + var Gpc, Hpc; + var FW = ndb(Sne, "ConstraintCalculationStrategy", 422, CI, Lpc, Kpc); + var Mpc; + bcb(314, 22, { 3: 1, 35: 1, 22: 1, 314: 1, 246: 1, 234: 1 }, Tpc); + _2.Kf = function Vpc() { + return Spc(this); + }; + _2.Xf = function Upc() { + return Spc(this); + }; + var Opc, Ppc, Qpc; + var GW = ndb(Sne, "CrossingMinimizationStrategy", 314, CI, Xpc, Wpc); + var Ypc; + bcb(337, 22, { 3: 1, 35: 1, 22: 1, 337: 1 }, cqc); + var $pc, _pc, aqc; + var HW = ndb(Sne, "CuttingStrategy", 337, CI, eqc, dqc); + var fqc; + bcb(335, 22, { 3: 1, 35: 1, 22: 1, 335: 1, 246: 1, 234: 1 }, oqc); + _2.Kf = function qqc() { + return nqc(this); + }; + _2.Xf = function pqc() { + return nqc(this); + }; + var hqc, iqc, jqc, kqc, lqc; + var IW = ndb(Sne, "CycleBreakingStrategy", 335, CI, sqc, rqc); + var tqc; + bcb(419, 22, { 3: 1, 35: 1, 22: 1, 419: 1 }, yqc); + var vqc, wqc; + var JW = ndb(Sne, "DirectionCongruency", 419, CI, Aqc, zqc); + var Bqc; + bcb(450, 22, { 3: 1, 35: 1, 22: 1, 450: 1 }, Hqc); + var Dqc, Eqc, Fqc; + var KW = ndb(Sne, "EdgeConstraint", 450, CI, Jqc, Iqc); + var Kqc; + bcb(276, 22, { 3: 1, 35: 1, 22: 1, 276: 1 }, Uqc); + var Mqc, Nqc, Oqc, Pqc, Qqc, Rqc; + var LW = ndb(Sne, "EdgeLabelSideSelection", 276, CI, Wqc, Vqc); + var Xqc; + bcb(479, 22, { 3: 1, 35: 1, 22: 1, 479: 1 }, arc); + var Zqc, $qc; + var MW = ndb(Sne, "EdgeStraighteningStrategy", 479, CI, crc, brc); + var drc; + bcb(274, 22, { 3: 1, 35: 1, 22: 1, 274: 1 }, mrc); + var frc, grc, hrc, irc, jrc, krc; + var NW = ndb(Sne, "FixedAlignment", 274, CI, orc, nrc); + var prc; + bcb(275, 22, { 3: 1, 35: 1, 22: 1, 275: 1 }, zrc); + var rrc, trc, urc, vrc, wrc, xrc; + var OW = ndb(Sne, "GraphCompactionStrategy", 275, CI, Brc, Arc); + var Crc; + bcb(256, 22, { 3: 1, 35: 1, 22: 1, 256: 1 }, Prc); + var Erc, Frc, Grc, Hrc, Irc, Jrc, Krc, Lrc, Mrc, Nrc; + var PW = ndb(Sne, "GraphProperties", 256, CI, Rrc, Qrc); + var Src; + bcb(292, 22, { 3: 1, 35: 1, 22: 1, 292: 1 }, Yrc); + var Urc, Vrc, Wrc; + var QW = ndb(Sne, "GreedySwitchType", 292, CI, $rc, Zrc); + var _rc; + bcb(303, 22, { 3: 1, 35: 1, 22: 1, 303: 1 }, fsc); + var bsc, csc, dsc; + var RW = ndb(Sne, "InLayerConstraint", 303, CI, hsc, gsc); + var isc; + bcb(420, 22, { 3: 1, 35: 1, 22: 1, 420: 1 }, nsc); + var ksc, lsc; + var SW = ndb(Sne, "InteractiveReferencePoint", 420, CI, psc, osc); + var qsc; + var ssc, tsc, usc, vsc, wsc, xsc, ysc, zsc, Asc, Bsc, Csc, Dsc, Esc, Fsc, Gsc, Hsc, Isc, Jsc, Ksc, Lsc, Msc, Nsc, Osc, Psc, Qsc, Rsc, Ssc, Tsc, Usc, Vsc, Wsc, Xsc, Ysc, Zsc, $sc, _sc, atc, btc, ctc, dtc, etc, ftc, gtc, htc, itc, jtc, ktc, ltc, mtc, ntc, otc, ptc, qtc, rtc, stc, ttc, utc, vtc; + bcb(163, 22, { 3: 1, 35: 1, 22: 1, 163: 1 }, Dtc); + var xtc, ytc, ztc, Atc, Btc; + var TW = ndb(Sne, "LayerConstraint", 163, CI, Ftc, Etc); + var Gtc; + bcb(848, 1, ale, kwc); + _2.Qe = function lwc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yne), ""), "Direction Congruency"), "Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."), puc), (_5c(), V5c)), JW), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zne), ""), "Feedback Edges"), "Whether feedback edges should be highlighted by routing around the nodes."), (Bcb(), false)), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $ne), ""), "Interactive Reference Point"), "Determines which point of a node is considered by interactive layout phases."), Muc), V5c), SW), pqb(L5c)))); + o4c(a, $ne, goe, Ouc); + o4c(a, $ne, qoe, Nuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _ne), ""), "Merge Edges"), "Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), aoe), ""), "Merge Hierarchy-Crossing Edges"), "If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."), true), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(C5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), boe), ""), "Allow Non-Flow Ports To Switch Sides"), "Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."), false), T5c), wI), pqb(M5c)), OC(GC(ZI, 1), nie, 2, 6, ["org.eclipse.elk.layered.northOrSouthPort"])))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), coe), ""), "Port Sorting Strategy"), "Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."), xvc), V5c), cX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), doe), ""), "Thoroughness"), "How much effort should be spent to produce a nice layout."), meb(7)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), eoe), ""), "Add Unnecessary Bendpoints"), "Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), foe), ""), "Generate Position and Layer IDs"), "If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), goe), "cycleBreaking"), "Cycle Breaking Strategy"), "Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."), nuc), V5c), IW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), hoe), ppe), "Node Layering Strategy"), "Strategy for node layering."), bvc), V5c), YW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ioe), ppe), "Layer Constraint"), "Determines a constraint on the placement of the node regarding the layering."), Tuc), V5c), TW), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), joe), ppe), "Layer Choice Constraint"), "Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), koe), ppe), "Layer ID"), "Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), loe), qpe), "Upper Bound On Width [MinWidth Layerer]"), "Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."), meb(4)), X5c), JI), pqb(L5c)))); + o4c(a, loe, hoe, Wuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), moe), qpe), "Upper Layer Estimation Scaling Factor [MinWidth Layerer]"), "Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."), meb(2)), X5c), JI), pqb(L5c)))); + o4c(a, moe, hoe, Yuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), noe), rpe), "Node Promotion Strategy"), "Reduces number of dummy nodes after layering phase (if possible)."), _uc), V5c), aX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ooe), rpe), "Max Node Promotion Iterations"), "Limits the number of iterations for node promotion."), meb(0)), X5c), JI), pqb(L5c)))); + o4c(a, ooe, noe, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), poe), "layering.coffmanGraham"), "Layer Bound"), "The maximum number of nodes allowed per layer."), meb(Ohe)), X5c), JI), pqb(L5c)))); + o4c(a, poe, hoe, Quc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), qoe), spe), "Crossing Minimization Strategy"), "Strategy for crossing minimization."), luc), V5c), GW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), roe), spe), "Force Node Model Order"), "The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), soe), spe), "Hierarchical Sweepiness"), "How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."), 0.1), U5c), BI), pqb(L5c)))); + o4c(a, soe, tpe, fuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), toe), spe), "Semi-Interactive Crossing Minimization"), "Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."), false), T5c), wI), pqb(L5c)))); + o4c(a, toe, qoe, juc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), uoe), spe), "Position Choice Constraint"), "Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), voe), spe), "Position ID"), "Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), woe), upe), "Greedy Switch Activation Threshold"), "By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."), meb(40)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xoe), upe), "Greedy Switch Crossing Minimization"), "Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."), cuc), V5c), QW), pqb(L5c)))); + o4c(a, xoe, qoe, duc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), yoe), "crossingMinimization.greedySwitchHierarchical"), "Greedy Switch Crossing Minimization (hierarchical)"), "Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."), $tc), V5c), QW), pqb(L5c)))); + o4c(a, yoe, qoe, _tc); + o4c(a, yoe, tpe, auc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), zoe), vpe), "Node Placement Strategy"), "Strategy for node placement."), vvc), V5c), _W), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Aoe), vpe), "Favor Straight Edges Over Balancing"), "Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."), T5c), wI), pqb(L5c)))); + o4c(a, Aoe, zoe, lvc); + o4c(a, Aoe, zoe, mvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Boe), wpe), "BK Edge Straightening"), "Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."), fvc), V5c), MW), pqb(L5c)))); + o4c(a, Boe, zoe, gvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Coe), wpe), "BK Fixed Alignment"), "Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."), ivc), V5c), NW), pqb(L5c)))); + o4c(a, Coe, zoe, jvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Doe), "nodePlacement.linearSegments"), "Linear Segments Deflection Dampening"), "Dampens the movement of nodes to keep the diagram from getting too large."), 0.3), U5c), BI), pqb(L5c)))); + o4c(a, Doe, zoe, ovc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Eoe), "nodePlacement.networkSimplex"), "Node Flexibility"), "Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."), V5c), $W), pqb(K5c)))); + o4c(a, Eoe, zoe, tvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Foe), "nodePlacement.networkSimplex.nodeFlexibility"), "Node Flexibility Default"), "Default value of the 'nodeFlexibility' option for the children of a hierarchical node."), rvc), V5c), $W), pqb(L5c)))); + o4c(a, Foe, zoe, svc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Goe), xpe), "Self-Loop Distribution"), "Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."), xuc), V5c), eX), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Hoe), xpe), "Self-Loop Ordering"), "Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."), zuc), V5c), fX), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ioe), "edgeRouting.splines"), "Spline Routing Mode"), "Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."), Buc), V5c), hX), pqb(L5c)))); + o4c(a, Ioe, ype, Cuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Joe), "edgeRouting.splines.sloppy"), "Sloppy Spline Layer Spacing Factor"), "Spacing factor for routing area between layers when using sloppy spline routing."), 0.2), U5c), BI), pqb(L5c)))); + o4c(a, Joe, ype, Euc); + o4c(a, Joe, Ioe, Fuc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Koe), "edgeRouting.polyline"), "Sloped Edge Zone Width"), "Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."), 2), U5c), BI), pqb(L5c)))); + o4c(a, Koe, ype, vuc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Loe), zpe), "Spacing Base Value"), "An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Moe), zpe), "Edge Node Between Layers Spacing"), "The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Noe), zpe), "Edge Edge Between Layer Spacing"), "Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ooe), zpe), "Node Node Between Layers Spacing"), "The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."), 20), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Poe), Ape), "Direction Priority"), "Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Qoe), Ape), "Shortness Priority"), "Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Roe), Ape), "Straightness Priority"), "Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."), meb(0)), X5c), JI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Soe), Bpe), Ole), "Tries to further compact components (disconnected sub-graphs)."), false), T5c), wI), pqb(L5c)))); + o4c(a, Soe, zme, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Toe), Cpe), "Post Compaction Strategy"), Dpe), Ntc), V5c), OW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Uoe), Cpe), "Post Compaction Constraint Calculation"), Dpe), Ltc), V5c), FW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Voe), Epe), "High Degree Node Treatment"), "Makes room around high degree nodes to place leafs and trees."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Woe), Epe), "High Degree Node Threshold"), "Whether a node is considered to have a high degree."), meb(16)), X5c), JI), pqb(L5c)))); + o4c(a, Woe, Voe, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Xoe), Epe), "High Degree Node Maximum Tree Height"), "Maximum height of a subtree connected to a high degree node to be moved to separate layers."), meb(5)), X5c), JI), pqb(L5c)))); + o4c(a, Xoe, Voe, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yoe), Fpe), "Graph Wrapping Strategy"), "For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."), bwc), V5c), jX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zoe), Fpe), "Additional Wrapped Edges Spacing"), "To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."), 10), U5c), BI), pqb(L5c)))); + o4c(a, Zoe, Yoe, Ivc); + o4c(a, Zoe, Yoe, Jvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $oe), Fpe), "Correction Factor for Wrapping"), "At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."), 1), U5c), BI), pqb(L5c)))); + o4c(a, $oe, Yoe, Lvc); + o4c(a, $oe, Yoe, Mvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _oe), Gpe), "Cutting Strategy"), "The strategy by which the layer indexes are determined at which the layering crumbles into chunks."), Tvc), V5c), HW), pqb(L5c)))); + o4c(a, _oe, Yoe, Uvc); + o4c(a, _oe, Yoe, Vvc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), ape), Gpe), "Manually Specified Cuts"), "Allows the user to specify her own cuts for a certain graph."), Y5c), yK), pqb(L5c)))); + o4c(a, ape, _oe, Ovc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), bpe), "wrapping.cutting.msd"), "MSD Freedom"), "The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."), Qvc), X5c), JI), pqb(L5c)))); + o4c(a, bpe, _oe, Rvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), cpe), Hpe), "Validification Strategy"), "When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."), gwc), V5c), iX), pqb(L5c)))); + o4c(a, cpe, Yoe, hwc); + o4c(a, cpe, Yoe, iwc); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), dpe), Hpe), "Valid Indices for Wrapping"), null), Y5c), yK), pqb(L5c)))); + o4c(a, dpe, Yoe, dwc); + o4c(a, dpe, Yoe, ewc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), epe), Ipe), "Improve Cuts"), "For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."), true), T5c), wI), pqb(L5c)))); + o4c(a, epe, Yoe, Zvc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), fpe), Ipe), "Distance Penalty When Improving Cuts"), null), 2), U5c), BI), pqb(L5c)))); + o4c(a, fpe, Yoe, Xvc); + o4c(a, fpe, epe, true); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), gpe), Ipe), "Improve Wrapped Edges"), "The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."), true), T5c), wI), pqb(L5c)))); + o4c(a, gpe, Yoe, _vc); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), hpe), Jpe), "Edge Label Side Selection"), "Method to decide on edge label sides."), tuc), V5c), LW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ipe), Jpe), "Edge Center Label Placement Strategy"), "Determines in which layer center labels of long edges should be placed."), ruc), V5c), EW), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), jpe), Kpe), "Consider Model Order"), "Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."), Wtc), V5c), bX), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), kpe), Kpe), "No Model Order"), "Set on a node to not set a model order for this node even though it is a real node."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), lpe), Kpe), "Consider Model Order for Components"), "If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."), Ptc), V5c), hQ), pqb(L5c)))); + o4c(a, lpe, zme, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mpe), Kpe), "Long Edge Ordering Strategy"), "Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."), Ttc), V5c), ZW), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), npe), Kpe), "Crossing Counter Node Order Influence"), "Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."), 0), U5c), BI), pqb(L5c)))); + o4c(a, npe, jpe, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ope), Kpe), "Crossing Counter Port Order Influence"), "Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."), 0), U5c), BI), pqb(L5c)))); + o4c(a, ope, jpe, null); + Oyc((new Pyc(), a)); + }; + var Itc, Jtc, Ktc, Ltc, Mtc, Ntc, Otc, Ptc, Qtc, Rtc, Stc, Ttc, Utc, Vtc, Wtc, Xtc, Ytc, Ztc, $tc, _tc, auc, buc, cuc, duc, euc, fuc, guc, huc, iuc, juc, kuc, luc, muc, nuc, ouc, puc, quc, ruc, suc, tuc, uuc, vuc, wuc, xuc, yuc, zuc, Auc, Buc, Cuc, Duc, Euc, Fuc, Guc, Huc, Iuc, Juc, Kuc, Luc, Muc, Nuc, Ouc, Puc, Quc, Ruc, Suc, Tuc, Uuc, Vuc, Wuc, Xuc, Yuc, Zuc, $uc, _uc, avc, bvc, cvc, dvc, evc, fvc, gvc, hvc, ivc, jvc, kvc, lvc, mvc, nvc, ovc, pvc, qvc, rvc, svc, tvc, uvc, vvc, wvc, xvc, yvc, zvc, Avc, Bvc, Cvc, Dvc, Evc, Fvc, Gvc, Hvc, Ivc, Jvc, Kvc, Lvc, Mvc, Nvc, Ovc, Pvc, Qvc, Rvc, Svc, Tvc, Uvc, Vvc, Wvc, Xvc, Yvc, Zvc, $vc, _vc, awc, bwc, cwc, dwc, ewc, fwc, gwc, hwc, iwc; + mdb(Sne, "LayeredMetaDataProvider", 848); + bcb(986, 1, ale, Pyc); + _2.Qe = function Qyc(a) { + Oyc(a); + }; + var mwc, nwc, owc, pwc, qwc, rwc, swc, twc, uwc, vwc, wwc, xwc, ywc, zwc, Awc, Bwc, Cwc, Dwc, Ewc, Fwc, Gwc, Hwc, Iwc, Jwc, Kwc, Lwc, Mwc, Nwc, Owc, Pwc, Qwc, Rwc, Swc, Twc, Uwc, Vwc, Wwc, Xwc, Ywc, Zwc, $wc, _wc, axc, bxc, cxc, dxc, exc, fxc, gxc, hxc, ixc, jxc, kxc, lxc, mxc, nxc, oxc, pxc, qxc, rxc, sxc, txc, uxc, vxc, wxc, xxc, yxc, zxc, Axc, Bxc, Cxc, Dxc, Exc, Fxc, Gxc, Hxc, Ixc, Jxc, Kxc, Lxc, Mxc, Nxc, Oxc, Pxc, Qxc, Rxc, Sxc, Txc, Uxc, Vxc, Wxc, Xxc, Yxc, Zxc, $xc, _xc, ayc, byc, cyc, dyc, eyc, fyc, gyc, hyc, iyc, jyc, kyc, lyc, myc, nyc, oyc, pyc, qyc, ryc, syc, tyc, uyc, vyc, wyc, xyc, yyc, zyc, Ayc, Byc, Cyc, Dyc, Eyc, Fyc, Gyc, Hyc, Iyc, Jyc, Kyc, Lyc, Myc; + mdb(Sne, "LayeredOptions", 986); + bcb(987, 1, {}, Ryc); + _2.$e = function Syc() { + var a; + return a = new jUb(), a; + }; + _2._e = function Tyc(a) { + }; + mdb(Sne, "LayeredOptions/LayeredFactory", 987); + bcb(1372, 1, {}); + _2.a = 0; + var Uyc; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder", 1372); + bcb(779, 1372, {}, ezc); + var bzc, czc; + mdb(Sne, "LayeredSpacings/LayeredSpacingsBuilder", 779); + bcb(313, 22, { 3: 1, 35: 1, 22: 1, 313: 1, 246: 1, 234: 1 }, nzc); + _2.Kf = function pzc() { + return mzc(this); + }; + _2.Xf = function ozc() { + return mzc(this); + }; + var fzc, gzc, hzc, izc, jzc, kzc; + var YW = ndb(Sne, "LayeringStrategy", 313, CI, rzc, qzc); + var szc; + bcb(378, 22, { 3: 1, 35: 1, 22: 1, 378: 1 }, zzc); + var uzc, vzc, wzc; + var ZW = ndb(Sne, "LongEdgeOrderingStrategy", 378, CI, Bzc, Azc); + var Czc; + bcb(197, 22, { 3: 1, 35: 1, 22: 1, 197: 1 }, Kzc); + var Ezc, Fzc, Gzc, Hzc; + var $W = ndb(Sne, "NodeFlexibility", 197, CI, Nzc, Mzc); + var Ozc; + bcb(315, 22, { 3: 1, 35: 1, 22: 1, 315: 1, 246: 1, 234: 1 }, Xzc); + _2.Kf = function Zzc() { + return Wzc(this); + }; + _2.Xf = function Yzc() { + return Wzc(this); + }; + var Qzc, Rzc, Szc, Tzc, Uzc; + var _W = ndb(Sne, "NodePlacementStrategy", 315, CI, _zc, $zc); + var aAc; + bcb(260, 22, { 3: 1, 35: 1, 22: 1, 260: 1 }, lAc); + var cAc, dAc, eAc, fAc, gAc, hAc, iAc, jAc; + var aX = ndb(Sne, "NodePromotionStrategy", 260, CI, nAc, mAc); + var oAc; + bcb(339, 22, { 3: 1, 35: 1, 22: 1, 339: 1 }, uAc); + var qAc, rAc, sAc; + var bX = ndb(Sne, "OrderingStrategy", 339, CI, wAc, vAc); + var xAc; + bcb(421, 22, { 3: 1, 35: 1, 22: 1, 421: 1 }, CAc); + var zAc, AAc; + var cX = ndb(Sne, "PortSortingStrategy", 421, CI, EAc, DAc); + var FAc; + bcb(452, 22, { 3: 1, 35: 1, 22: 1, 452: 1 }, LAc); + var HAc, IAc, JAc; + var dX = ndb(Sne, "PortType", 452, CI, NAc, MAc); + var OAc; + bcb(375, 22, { 3: 1, 35: 1, 22: 1, 375: 1 }, UAc); + var QAc, RAc, SAc; + var eX = ndb(Sne, "SelfLoopDistributionStrategy", 375, CI, WAc, VAc); + var XAc; + bcb(376, 22, { 3: 1, 35: 1, 22: 1, 376: 1 }, aBc); + var ZAc, $Ac; + var fX = ndb(Sne, "SelfLoopOrderingStrategy", 376, CI, cBc, bBc); + var dBc; + bcb(304, 1, { 304: 1 }, oBc); + mdb(Sne, "Spacings", 304); + bcb(336, 22, { 3: 1, 35: 1, 22: 1, 336: 1 }, uBc); + var qBc, rBc, sBc; + var hX = ndb(Sne, "SplineRoutingMode", 336, CI, wBc, vBc); + var xBc; + bcb(338, 22, { 3: 1, 35: 1, 22: 1, 338: 1 }, DBc); + var zBc, ABc, BBc; + var iX = ndb(Sne, "ValidifyStrategy", 338, CI, FBc, EBc); + var GBc; + bcb(377, 22, { 3: 1, 35: 1, 22: 1, 377: 1 }, MBc); + var IBc, JBc, KBc; + var jX = ndb(Sne, "WrappingStrategy", 377, CI, OBc, NBc); + var PBc; + bcb(1383, 1, Bqe, VBc); + _2.Yf = function WBc(a) { + return BD(a, 37), RBc; + }; + _2.pf = function XBc(a, b) { + UBc(this, BD(a, 37), b); + }; + var RBc; + mdb(Cqe, "DepthFirstCycleBreaker", 1383); + bcb(782, 1, Bqe, aCc); + _2.Yf = function cCc(a) { + return BD(a, 37), YBc; + }; + _2.pf = function dCc(a, b) { + $Bc(this, BD(a, 37), b); + }; + _2.Zf = function bCc(a) { + return BD(Ikb(a, Bub(this.d, a.c.length)), 10); + }; + var YBc; + mdb(Cqe, "GreedyCycleBreaker", 782); + bcb(1386, 782, Bqe, eCc); + _2.Zf = function fCc(a) { + var b, c2, d, e; + e = null; + b = Ohe; + for (d = new olb(a); d.a < d.c.c.length; ) { + c2 = BD(mlb(d), 10); + if (wNb(c2, (wtc(), Zsc)) && BD(vNb(c2, Zsc), 19).a < b) { + b = BD(vNb(c2, Zsc), 19).a; + e = c2; + } + } + if (!e) { + return BD(Ikb(a, Bub(this.d, a.c.length)), 10); + } + return e; + }; + mdb(Cqe, "GreedyModelOrderCycleBreaker", 1386); + bcb(1384, 1, Bqe, kCc); + _2.Yf = function lCc(a) { + return BD(a, 37), gCc; + }; + _2.pf = function mCc(a, b) { + jCc(this, BD(a, 37), b); + }; + var gCc; + mdb(Cqe, "InteractiveCycleBreaker", 1384); + bcb(1385, 1, Bqe, rCc); + _2.Yf = function sCc(a) { + return BD(a, 37), nCc; + }; + _2.pf = function tCc(a, b) { + qCc(this, BD(a, 37), b); + }; + _2.a = 0; + _2.b = 0; + var nCc; + mdb(Cqe, "ModelOrderCycleBreaker", 1385); + bcb(1389, 1, Bqe, DCc); + _2.Yf = function ECc(a) { + return BD(a, 37), uCc; + }; + _2.pf = function FCc(a, b) { + BCc(this, BD(a, 37), b); + }; + var uCc; + mdb(Dqe, "CoffmanGrahamLayerer", 1389); + bcb(1390, 1, Dke, GCc); + _2.ue = function HCc(a, b) { + return xCc(this.a, BD(a, 10), BD(b, 10)); + }; + _2.Fb = function ICc(a) { + return this === a; + }; + _2.ve = function JCc() { + return new tpb(this); + }; + mdb(Dqe, "CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type", 1390); + bcb(1391, 1, Dke, KCc); + _2.ue = function LCc(a, b) { + return ACc(this.a, BD(a, 10), BD(b, 10)); + }; + _2.Fb = function MCc(a) { + return this === a; + }; + _2.ve = function NCc() { + return new tpb(this); + }; + mdb(Dqe, "CoffmanGrahamLayerer/lambda$1$Type", 1391); + bcb(1392, 1, Bqe, QCc); + _2.Yf = function RCc(a) { + return BD(a, 37), e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), n8b)), mUb, w8b), nUb, v8b); + }; + _2.pf = function SCc(a, b) { + PCc(this, BD(a, 37), b); + }; + mdb(Dqe, "InteractiveLayerer", 1392); + bcb(569, 1, { 569: 1 }, TCc); + _2.a = 0; + _2.c = 0; + mdb(Dqe, "InteractiveLayerer/LayerSpan", 569); + bcb(1388, 1, Bqe, ZCc); + _2.Yf = function $Cc(a) { + return BD(a, 37), UCc; + }; + _2.pf = function _Cc(a, b) { + WCc(this, BD(a, 37), b); + }; + var UCc; + mdb(Dqe, "LongestPathLayerer", 1388); + bcb(1395, 1, Bqe, iDc); + _2.Yf = function jDc(a) { + return BD(a, 37), e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + }; + _2.pf = function kDc(a, b) { + gDc(this, BD(a, 37), b); + }; + _2.a = 0; + _2.b = 0; + _2.d = 0; + var aDc, bDc; + mdb(Dqe, "MinWidthLayerer", 1395); + bcb(1396, 1, Dke, mDc); + _2.ue = function nDc(a, b) { + return lDc(this, BD(a, 10), BD(b, 10)); + }; + _2.Fb = function oDc(a) { + return this === a; + }; + _2.ve = function pDc() { + return new tpb(this); + }; + mdb(Dqe, "MinWidthLayerer/MinOutgoingEdgesComparator", 1396); + bcb(1387, 1, Bqe, xDc); + _2.Yf = function yDc(a) { + return BD(a, 37), qDc; + }; + _2.pf = function zDc(a, b) { + wDc(this, BD(a, 37), b); + }; + var qDc; + mdb(Dqe, "NetworkSimplexLayerer", 1387); + bcb(1393, 1, Bqe, LDc); + _2.Yf = function MDc(a) { + return BD(a, 37), e3c(e3c(e3c(new j3c(), (qUb(), lUb), (S8b(), Z7b)), mUb, w8b), nUb, v8b); + }; + _2.pf = function NDc(a, b) { + IDc(this, BD(a, 37), b); + }; + _2.d = 0; + _2.f = 0; + _2.g = 0; + _2.i = 0; + _2.s = 0; + _2.t = 0; + _2.u = 0; + mdb(Dqe, "StretchWidthLayerer", 1393); + bcb(1394, 1, Dke, PDc); + _2.ue = function QDc(a, b) { + return ODc(BD(a, 10), BD(b, 10)); + }; + _2.Fb = function RDc(a) { + return this === a; + }; + _2.ve = function SDc() { + return new tpb(this); + }; + mdb(Dqe, "StretchWidthLayerer/1", 1394); + bcb(402, 1, Eqe); + _2.Nf = function fEc(a, b, c2, d, e, f2) { + }; + _2._f = function dEc(a, b, c2) { + return YDc(this, a, b, c2); + }; + _2.Mf = function eEc() { + this.g = KC(VD, Fqe, 25, this.d, 15, 1); + this.f = KC(VD, Fqe, 25, this.d, 15, 1); + }; + _2.Of = function gEc(a, b) { + this.e[a] = KC(WD, oje, 25, b[a].length, 15, 1); + }; + _2.Pf = function hEc(a, b, c2) { + var d; + d = c2[a][b]; + d.p = b; + this.e[a][b] = b; + }; + _2.Qf = function iEc(a, b, c2, d) { + BD(Ikb(d[a][b].j, c2), 11).p = this.d++; + }; + _2.b = 0; + _2.c = 0; + _2.d = 0; + mdb(Gqe, "AbstractBarycenterPortDistributor", 402); + bcb(1633, 1, Dke, jEc); + _2.ue = function kEc(a, b) { + return _Dc(this.a, BD(a, 11), BD(b, 11)); + }; + _2.Fb = function lEc(a) { + return this === a; + }; + _2.ve = function mEc() { + return new tpb(this); + }; + mdb(Gqe, "AbstractBarycenterPortDistributor/lambda$0$Type", 1633); + bcb(817, 1, Mne, uEc); + _2.Nf = function xEc(a, b, c2, d, e, f2) { + }; + _2.Pf = function zEc(a, b, c2) { + }; + _2.Qf = function AEc(a, b, c2, d) { + }; + _2.Lf = function vEc() { + return false; + }; + _2.Mf = function wEc() { + this.c = this.e.a; + this.g = this.f.g; + }; + _2.Of = function yEc(a, b) { + b[a][0].c.p = a; + }; + _2.Rf = function BEc() { + return false; + }; + _2.ag = function CEc(a, b, c2, d) { + if (c2) { + rEc(this, a); + } else { + oEc(this, a, d); + pEc(this, a, b); + } + if (a.c.length > 1) { + Ccb(DD(vNb(Q_b((tCb(0, a.c.length), BD(a.c[0], 10))), (Nyc(), Awc)))) ? YGc(a, this.d, BD(this, 660)) : (mmb(), Okb(a, this.d)); + PEc(this.e, a); + } + }; + _2.Sf = function DEc(a, b, c2, d) { + var e, f2, g, h, i3, j, k; + if (b != sEc(c2, a.length)) { + f2 = a[b - (c2 ? 1 : -1)]; + UDc(this.f, f2, c2 ? (KAc(), IAc) : (KAc(), HAc)); + } + e = a[b][0]; + k = !d || e.k == (j0b(), e0b); + j = Ou(a[b]); + this.ag(j, k, false, c2); + g = 0; + for (i3 = new olb(j); i3.a < i3.c.c.length; ) { + h = BD(mlb(i3), 10); + a[b][g++] = h; + } + return false; + }; + _2.Tf = function EEc(a, b) { + var c2, d, e, f2, g; + g = sEc(b, a.length); + f2 = Ou(a[g]); + this.ag(f2, false, true, b); + c2 = 0; + for (e = new olb(f2); e.a < e.c.c.length; ) { + d = BD(mlb(e), 10); + a[g][c2++] = d; + } + return false; + }; + mdb(Gqe, "BarycenterHeuristic", 817); + bcb(658, 1, { 658: 1 }, FEc); + _2.Ib = function GEc() { + return "BarycenterState [node=" + this.c + ", summedWeight=" + this.d + ", degree=" + this.b + ", barycenter=" + this.a + ", visited=" + this.e + "]"; + }; + _2.b = 0; + _2.d = 0; + _2.e = false; + var CX = mdb(Gqe, "BarycenterHeuristic/BarycenterState", 658); + bcb(1802, 1, Dke, HEc); + _2.ue = function IEc(a, b) { + return qEc(this.a, BD(a, 10), BD(b, 10)); + }; + _2.Fb = function JEc(a) { + return this === a; + }; + _2.ve = function KEc() { + return new tpb(this); + }; + mdb(Gqe, "BarycenterHeuristic/lambda$0$Type", 1802); + bcb(816, 1, Mne, SEc); + _2.Mf = function TEc() { + }; + _2.Nf = function UEc(a, b, c2, d, e, f2) { + }; + _2.Qf = function XEc(a, b, c2, d) { + }; + _2.Of = function VEc(a, b) { + this.a[a] = KC(CX, { 3: 1, 4: 1, 5: 1, 2018: 1 }, 658, b[a].length, 0, 1); + this.b[a] = KC(FX, { 3: 1, 4: 1, 5: 1, 2019: 1 }, 233, b[a].length, 0, 1); + }; + _2.Pf = function WEc(a, b, c2) { + OEc(this, c2[a][b], true); + }; + _2.c = false; + mdb(Gqe, "ForsterConstraintResolver", 816); + bcb(233, 1, { 233: 1 }, $Ec, _Ec); + _2.Ib = function aFc() { + var a, b; + b = new Ufb(); + b.a += "["; + for (a = 0; a < this.d.length; a++) { + Qfb(b, a0b(this.d[a])); + REc(this.g, this.d[0]).a != null && Qfb(Qfb((b.a += "<", b), Jdb(REc(this.g, this.d[0]).a)), ">"); + a < this.d.length - 1 && (b.a += She, b); + } + return (b.a += "]", b).a; + }; + _2.a = 0; + _2.c = 0; + _2.f = 0; + var FX = mdb(Gqe, "ForsterConstraintResolver/ConstraintGroup", 233); + bcb(1797, 1, qie, bFc); + _2.td = function cFc(a) { + OEc(this.a, BD(a, 10), false); + }; + mdb(Gqe, "ForsterConstraintResolver/lambda$0$Type", 1797); + bcb(214, 1, { 214: 1, 225: 1 }, fFc); + _2.Nf = function hFc(a, b, c2, d, e, f2) { + }; + _2.Of = function iFc(a, b) { + }; + _2.Mf = function gFc() { + this.r = KC(WD, oje, 25, this.n, 15, 1); + }; + _2.Pf = function jFc(a, b, c2) { + var d, e; + e = c2[a][b]; + d = e.e; + !!d && Ekb(this.b, d); + }; + _2.Qf = function kFc(a, b, c2, d) { + ++this.n; + }; + _2.Ib = function lFc() { + return wlb(this.e, new Tqb()); + }; + _2.g = false; + _2.i = false; + _2.n = 0; + _2.s = false; + mdb(Gqe, "GraphInfoHolder", 214); + bcb(1832, 1, Mne, pFc); + _2.Nf = function sFc(a, b, c2, d, e, f2) { + }; + _2.Of = function tFc(a, b) { + }; + _2.Qf = function vFc(a, b, c2, d) { + }; + _2._f = function qFc(a, b, c2) { + c2 && b > 0 ? (RHc(this.a, a[b - 1], a[b]), void 0) : !c2 && b < a.length - 1 ? (RHc(this.a, a[b], a[b + 1]), void 0) : THc(this.a, a[b], c2 ? (Ucd(), Tcd) : (Ucd(), zcd)); + return mFc(this, a, b, c2); + }; + _2.Mf = function rFc() { + this.d = KC(WD, oje, 25, this.c, 15, 1); + this.a = new dIc(this.d); + }; + _2.Pf = function uFc(a, b, c2) { + var d; + d = c2[a][b]; + this.c += d.j.c.length; + }; + _2.c = 0; + mdb(Gqe, "GreedyPortDistributor", 1832); + bcb(1401, 1, Bqe, CFc); + _2.Yf = function DFc(a) { + return zFc(BD(a, 37)); + }; + _2.pf = function EFc(a, b) { + BFc(BD(a, 37), b); + }; + var xFc; + mdb(Gqe, "InteractiveCrossingMinimizer", 1401); + bcb(1402, 1, Dke, GFc); + _2.ue = function HFc(a, b) { + return FFc(this, BD(a, 10), BD(b, 10)); + }; + _2.Fb = function IFc(a) { + return this === a; + }; + _2.ve = function JFc() { + return new tpb(this); + }; + mdb(Gqe, "InteractiveCrossingMinimizer/1", 1402); + bcb(507, 1, { 507: 1, 123: 1, 51: 1 }, fGc); + _2.Yf = function gGc(a) { + var b; + return BD(a, 37), b = k3c(KFc), e3c(b, (qUb(), nUb), (S8b(), H8b)), b; + }; + _2.pf = function hGc(a, b) { + YFc(this, BD(a, 37), b); + }; + _2.e = 0; + var KFc; + mdb(Gqe, "LayerSweepCrossingMinimizer", 507); + bcb(1398, 1, qie, iGc); + _2.td = function jGc(a) { + MFc(this.a, BD(a, 214)); + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/0methodref$compareDifferentRandomizedLayouts$Type", 1398); + bcb(1399, 1, qie, kGc); + _2.td = function lGc(a) { + VFc(this.a, BD(a, 214)); + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/1methodref$minimizeCrossingsNoCounter$Type", 1399); + bcb(1400, 1, qie, mGc); + _2.td = function nGc(a) { + XFc(this.a, BD(a, 214)); + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/2methodref$minimizeCrossingsWithCounter$Type", 1400); + bcb(454, 22, { 3: 1, 35: 1, 22: 1, 454: 1 }, sGc); + var oGc, pGc, qGc; + var PX = ndb(Gqe, "LayerSweepCrossingMinimizer/CrossMinType", 454, CI, uGc, tGc); + var vGc; + bcb(1397, 1, Oie, xGc); + _2.Mb = function yGc(a) { + return LFc(), BD(a, 29).a.c.length == 0; + }; + mdb(Gqe, "LayerSweepCrossingMinimizer/lambda$0$Type", 1397); + bcb(1799, 1, Mne, BGc); + _2.Mf = function CGc() { + }; + _2.Nf = function DGc(a, b, c2, d, e, f2) { + }; + _2.Qf = function GGc(a, b, c2, d) { + }; + _2.Of = function EGc(a, b) { + b[a][0].c.p = a; + this.b[a] = KC(SX, { 3: 1, 4: 1, 5: 1, 1944: 1 }, 659, b[a].length, 0, 1); + }; + _2.Pf = function FGc(a, b, c2) { + var d; + d = c2[a][b]; + d.p = b; + NC(this.b[a], b, new HGc()); + }; + mdb(Gqe, "LayerSweepTypeDecider", 1799); + bcb(659, 1, { 659: 1 }, HGc); + _2.Ib = function IGc() { + return "NodeInfo [connectedEdges=" + this.a + ", hierarchicalInfluence=" + this.b + ", randomInfluence=" + this.c + "]"; + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + var SX = mdb(Gqe, "LayerSweepTypeDecider/NodeInfo", 659); + bcb(1800, 1, Vke, JGc); + _2.Lb = function KGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + _2.Fb = function LGc(a) { + return this === a; + }; + _2.Mb = function MGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + mdb(Gqe, "LayerSweepTypeDecider/lambda$0$Type", 1800); + bcb(1801, 1, Vke, NGc); + _2.Lb = function OGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + _2.Fb = function PGc(a) { + return this === a; + }; + _2.Mb = function QGc(a) { + return a1b(new b1b(BD(a, 11).b)); + }; + mdb(Gqe, "LayerSweepTypeDecider/lambda$1$Type", 1801); + bcb(1833, 402, Eqe, RGc); + _2.$f = function SGc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l; + j = this.g; + switch (c2.g) { + case 1: { + d = 0; + e = 0; + for (i3 = new olb(a.j); i3.a < i3.c.c.length; ) { + g = BD(mlb(i3), 11); + if (g.e.c.length != 0) { + ++d; + g.j == (Ucd(), Acd) && ++e; + } + } + f2 = b + e; + l = b + d; + for (h = W_b(a, (KAc(), HAc)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + if (g.j == (Ucd(), Acd)) { + j[g.p] = f2; + --f2; + } else { + j[g.p] = l; + --l; + } + } + return d; + } + case 2: { + k = 0; + for (h = W_b(a, (KAc(), IAc)).Kc(); h.Ob(); ) { + g = BD(h.Pb(), 11); + ++k; + j[g.p] = b + k; + } + return k; + } + default: + throw vbb(new Vdb()); + } + }; + mdb(Gqe, "LayerTotalPortDistributor", 1833); + bcb(660, 817, { 660: 1, 225: 1 }, XGc); + _2.ag = function ZGc(a, b, c2, d) { + if (c2) { + rEc(this, a); + } else { + oEc(this, a, d); + pEc(this, a, b); + } + if (a.c.length > 1) { + Ccb(DD(vNb(Q_b((tCb(0, a.c.length), BD(a.c[0], 10))), (Nyc(), Awc)))) ? YGc(a, this.d, this) : (mmb(), Okb(a, this.d)); + Ccb(DD(vNb(Q_b((tCb(0, a.c.length), BD(a.c[0], 10))), Awc))) || PEc(this.e, a); + } + }; + mdb(Gqe, "ModelOrderBarycenterHeuristic", 660); + bcb(1803, 1, Dke, $Gc); + _2.ue = function _Gc(a, b) { + return VGc(this.a, BD(a, 10), BD(b, 10)); + }; + _2.Fb = function aHc(a) { + return this === a; + }; + _2.ve = function bHc() { + return new tpb(this); + }; + mdb(Gqe, "ModelOrderBarycenterHeuristic/lambda$0$Type", 1803); + bcb(1403, 1, Bqe, fHc); + _2.Yf = function gHc(a) { + var b; + return BD(a, 37), b = k3c(cHc), e3c(b, (qUb(), nUb), (S8b(), H8b)), b; + }; + _2.pf = function hHc(a, b) { + eHc((BD(a, 37), b)); + }; + var cHc; + mdb(Gqe, "NoCrossingMinimizer", 1403); + bcb(796, 402, Eqe, iHc); + _2.$f = function jHc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n; + l = this.g; + switch (c2.g) { + case 1: { + e = 0; + f2 = 0; + for (k = new olb(a.j); k.a < k.c.c.length; ) { + i3 = BD(mlb(k), 11); + if (i3.e.c.length != 0) { + ++e; + i3.j == (Ucd(), Acd) && ++f2; + } + } + d = 1 / (e + 1); + g = b + f2 * d; + n = b + 1 - d; + for (j = W_b(a, (KAc(), HAc)).Kc(); j.Ob(); ) { + i3 = BD(j.Pb(), 11); + if (i3.j == (Ucd(), Acd)) { + l[i3.p] = g; + g -= d; + } else { + l[i3.p] = n; + n -= d; + } + } + break; + } + case 2: { + h = 0; + for (k = new olb(a.j); k.a < k.c.c.length; ) { + i3 = BD(mlb(k), 11); + i3.g.c.length == 0 || ++h; + } + d = 1 / (h + 1); + m = b + d; + for (j = W_b(a, (KAc(), IAc)).Kc(); j.Ob(); ) { + i3 = BD(j.Pb(), 11); + l[i3.p] = m; + m += d; + } + break; + } + default: + throw vbb(new Wdb("Port type is undefined")); + } + return 1; + }; + mdb(Gqe, "NodeRelativePortDistributor", 796); + bcb(807, 1, {}, nHc, oHc); + mdb(Gqe, "SweepCopy", 807); + bcb(1798, 1, Mne, rHc); + _2.Of = function uHc(a, b) { + }; + _2.Mf = function sHc() { + var a; + a = KC(WD, oje, 25, this.f, 15, 1); + this.d = new LIc(a); + this.a = new dIc(a); + }; + _2.Nf = function tHc(a, b, c2, d, e, f2) { + var g; + g = BD(Ikb(f2[a][b].j, c2), 11); + e.c == g && e.c.i.c == e.d.i.c && ++this.e[a]; + }; + _2.Pf = function vHc(a, b, c2) { + var d; + d = c2[a][b]; + this.c[a] = this.c[a] | d.k == (j0b(), i0b); + }; + _2.Qf = function wHc(a, b, c2, d) { + var e; + e = BD(Ikb(d[a][b].j, c2), 11); + e.p = this.f++; + e.g.c.length + e.e.c.length > 1 && (e.j == (Ucd(), zcd) ? this.b[a] = true : e.j == Tcd && a > 0 && (this.b[a - 1] = true)); + }; + _2.f = 0; + mdb(Lne, "AllCrossingsCounter", 1798); + bcb(587, 1, {}, BHc); + _2.b = 0; + _2.d = 0; + mdb(Lne, "BinaryIndexedTree", 587); + bcb(524, 1, {}, dIc); + var DHc, EHc; + mdb(Lne, "CrossingsCounter", 524); + bcb(1906, 1, Dke, hIc); + _2.ue = function iIc(a, b) { + return YHc(this.a, BD(a, 11), BD(b, 11)); + }; + _2.Fb = function jIc(a) { + return this === a; + }; + _2.ve = function kIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$0$Type", 1906); + bcb(1907, 1, Dke, lIc); + _2.ue = function mIc(a, b) { + return ZHc(this.a, BD(a, 11), BD(b, 11)); + }; + _2.Fb = function nIc(a) { + return this === a; + }; + _2.ve = function oIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$1$Type", 1907); + bcb(1908, 1, Dke, pIc); + _2.ue = function qIc(a, b) { + return $Hc(this.a, BD(a, 11), BD(b, 11)); + }; + _2.Fb = function rIc(a) { + return this === a; + }; + _2.ve = function sIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$2$Type", 1908); + bcb(1909, 1, Dke, tIc); + _2.ue = function uIc(a, b) { + return _Hc(this.a, BD(a, 11), BD(b, 11)); + }; + _2.Fb = function vIc(a) { + return this === a; + }; + _2.ve = function wIc() { + return new tpb(this); + }; + mdb(Lne, "CrossingsCounter/lambda$3$Type", 1909); + bcb(1910, 1, qie, xIc); + _2.td = function yIc(a) { + eIc(this.a, BD(a, 11)); + }; + mdb(Lne, "CrossingsCounter/lambda$4$Type", 1910); + bcb(1911, 1, Oie, zIc); + _2.Mb = function AIc(a) { + return fIc(this.a, BD(a, 11)); + }; + mdb(Lne, "CrossingsCounter/lambda$5$Type", 1911); + bcb(1912, 1, qie, CIc); + _2.td = function DIc(a) { + BIc(this, a); + }; + mdb(Lne, "CrossingsCounter/lambda$6$Type", 1912); + bcb(1913, 1, qie, EIc); + _2.td = function FIc(a) { + var b; + FHc(); + Wjb(this.b, (b = this.a, BD(a, 11), b)); + }; + mdb(Lne, "CrossingsCounter/lambda$7$Type", 1913); + bcb(826, 1, Vke, GIc); + _2.Lb = function HIc(a) { + return FHc(), wNb(BD(a, 11), (wtc(), gtc)); + }; + _2.Fb = function IIc(a) { + return this === a; + }; + _2.Mb = function JIc(a) { + return FHc(), wNb(BD(a, 11), (wtc(), gtc)); + }; + mdb(Lne, "CrossingsCounter/lambda$8$Type", 826); + bcb(1905, 1, {}, LIc); + mdb(Lne, "HyperedgeCrossingsCounter", 1905); + bcb(467, 1, { 35: 1, 467: 1 }, NIc); + _2.wd = function OIc(a) { + return MIc(this, BD(a, 467)); + }; + _2.b = 0; + _2.c = 0; + _2.e = 0; + _2.f = 0; + var oY = mdb(Lne, "HyperedgeCrossingsCounter/Hyperedge", 467); + bcb(362, 1, { 35: 1, 362: 1 }, QIc); + _2.wd = function RIc(a) { + return PIc(this, BD(a, 362)); + }; + _2.b = 0; + _2.c = 0; + var nY = mdb(Lne, "HyperedgeCrossingsCounter/HyperedgeCorner", 362); + bcb(523, 22, { 3: 1, 35: 1, 22: 1, 523: 1 }, VIc); + var SIc, TIc; + var mY = ndb(Lne, "HyperedgeCrossingsCounter/HyperedgeCorner/Type", 523, CI, XIc, WIc); + var YIc; + bcb(1405, 1, Bqe, dJc); + _2.Yf = function eJc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? _Ic : null; + }; + _2.pf = function fJc(a, b) { + cJc(this, BD(a, 37), b); + }; + var _Ic; + mdb(Hqe, "InteractiveNodePlacer", 1405); + bcb(1406, 1, Bqe, tJc); + _2.Yf = function uJc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? gJc : null; + }; + _2.pf = function vJc(a, b) { + rJc(this, BD(a, 37), b); + }; + var gJc, hJc, iJc; + mdb(Hqe, "LinearSegmentsNodePlacer", 1406); + bcb(257, 1, { 35: 1, 257: 1 }, zJc); + _2.wd = function AJc(a) { + return wJc(this, BD(a, 257)); + }; + _2.Fb = function BJc(a) { + var b; + if (JD(a, 257)) { + b = BD(a, 257); + return this.b == b.b; + } + return false; + }; + _2.Hb = function CJc() { + return this.b; + }; + _2.Ib = function DJc() { + return "ls" + Fe(this.e); + }; + _2.a = 0; + _2.b = 0; + _2.c = -1; + _2.d = -1; + _2.g = 0; + var sY = mdb(Hqe, "LinearSegmentsNodePlacer/LinearSegment", 257); + bcb(1408, 1, Bqe, $Jc); + _2.Yf = function _Jc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? EJc : null; + }; + _2.pf = function hKc(a, b) { + WJc(this, BD(a, 37), b); + }; + _2.b = 0; + _2.g = 0; + var EJc; + mdb(Hqe, "NetworkSimplexPlacer", 1408); + bcb(1427, 1, Dke, iKc); + _2.ue = function jKc(a, b) { + return beb(BD(a, 19).a, BD(b, 19).a); + }; + _2.Fb = function kKc(a) { + return this === a; + }; + _2.ve = function lKc() { + return new tpb(this); + }; + mdb(Hqe, "NetworkSimplexPlacer/0methodref$compare$Type", 1427); + bcb(1429, 1, Dke, mKc); + _2.ue = function nKc(a, b) { + return beb(BD(a, 19).a, BD(b, 19).a); + }; + _2.Fb = function oKc(a) { + return this === a; + }; + _2.ve = function pKc() { + return new tpb(this); + }; + mdb(Hqe, "NetworkSimplexPlacer/1methodref$compare$Type", 1429); + bcb(649, 1, { 649: 1 }, qKc); + var wY = mdb(Hqe, "NetworkSimplexPlacer/EdgeRep", 649); + bcb(401, 1, { 401: 1 }, rKc); + _2.b = false; + var xY = mdb(Hqe, "NetworkSimplexPlacer/NodeRep", 401); + bcb(508, 12, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 12: 1, 14: 1, 15: 1, 54: 1, 508: 1 }, vKc); + mdb(Hqe, "NetworkSimplexPlacer/Path", 508); + bcb(1409, 1, {}, wKc); + _2.Kb = function xKc(a) { + return BD(a, 17).d.i.k; + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$0$Type", 1409); + bcb(1410, 1, Oie, yKc); + _2.Mb = function zKc(a) { + return BD(a, 267) == (j0b(), g0b); + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$1$Type", 1410); + bcb(1411, 1, {}, AKc); + _2.Kb = function BKc(a) { + return BD(a, 17).d.i; + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$2$Type", 1411); + bcb(1412, 1, Oie, CKc); + _2.Mb = function DKc(a) { + return eLc(Lzc(BD(a, 10))); + }; + mdb(Hqe, "NetworkSimplexPlacer/Path/lambda$3$Type", 1412); + bcb(1413, 1, Oie, EKc); + _2.Mb = function FKc(a) { + return dKc(BD(a, 11)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$0$Type", 1413); + bcb(1414, 1, qie, GKc); + _2.td = function HKc(a) { + LJc(this.a, this.b, BD(a, 11)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$1$Type", 1414); + bcb(1423, 1, qie, IKc); + _2.td = function JKc(a) { + MJc(this.a, BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$10$Type", 1423); + bcb(1424, 1, {}, KKc); + _2.Kb = function LKc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$11$Type", 1424); + bcb(1425, 1, qie, MKc); + _2.td = function NKc(a) { + NJc(this.a, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$12$Type", 1425); + bcb(1426, 1, {}, OKc); + _2.Kb = function PKc(a) { + return FJc(), meb(BD(a, 121).e); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$13$Type", 1426); + bcb(1428, 1, {}, QKc); + _2.Kb = function RKc(a) { + return FJc(), meb(BD(a, 121).e); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$15$Type", 1428); + bcb(1430, 1, Oie, SKc); + _2.Mb = function TKc(a) { + return FJc(), BD(a, 401).c.k == (j0b(), h0b); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$17$Type", 1430); + bcb(1431, 1, Oie, UKc); + _2.Mb = function VKc(a) { + return FJc(), BD(a, 401).c.j.c.length > 1; + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$18$Type", 1431); + bcb(1432, 1, qie, WKc); + _2.td = function XKc(a) { + eKc(this.c, this.b, this.d, this.a, BD(a, 401)); + }; + _2.c = 0; + _2.d = 0; + mdb(Hqe, "NetworkSimplexPlacer/lambda$19$Type", 1432); + bcb(1415, 1, {}, YKc); + _2.Kb = function ZKc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$2$Type", 1415); + bcb(1433, 1, qie, $Kc); + _2.td = function _Kc(a) { + fKc(this.a, BD(a, 11)); + }; + _2.a = 0; + mdb(Hqe, "NetworkSimplexPlacer/lambda$20$Type", 1433); + bcb(1434, 1, {}, aLc); + _2.Kb = function bLc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$21$Type", 1434); + bcb(1435, 1, qie, cLc); + _2.td = function dLc(a) { + OJc(this.a, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$22$Type", 1435); + bcb(1436, 1, Oie, fLc); + _2.Mb = function gLc(a) { + return eLc(a); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$23$Type", 1436); + bcb(1437, 1, {}, hLc); + _2.Kb = function iLc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$24$Type", 1437); + bcb(1438, 1, Oie, jLc); + _2.Mb = function kLc(a) { + return PJc(this.a, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$25$Type", 1438); + bcb(1439, 1, qie, lLc); + _2.td = function mLc(a) { + QJc(this.a, this.b, BD(a, 10)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$26$Type", 1439); + bcb(1440, 1, Oie, nLc); + _2.Mb = function oLc(a) { + return FJc(), !OZb(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$27$Type", 1440); + bcb(1441, 1, Oie, pLc); + _2.Mb = function qLc(a) { + return FJc(), !OZb(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$28$Type", 1441); + bcb(1442, 1, {}, rLc); + _2.Ce = function sLc(a, b) { + return RJc(this.a, BD(a, 29), BD(b, 29)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$29$Type", 1442); + bcb(1416, 1, {}, tLc); + _2.Kb = function uLc(a) { + return FJc(), new YAb(null, new Lub(new Sr(ur(U_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$3$Type", 1416); + bcb(1417, 1, Oie, vLc); + _2.Mb = function wLc(a) { + return FJc(), cKc(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$4$Type", 1417); + bcb(1418, 1, qie, xLc); + _2.td = function yLc(a) { + XJc(this.a, BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$5$Type", 1418); + bcb(1419, 1, {}, zLc); + _2.Kb = function ALc(a) { + return FJc(), new YAb(null, new Kub(BD(a, 29).a, 16)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$6$Type", 1419); + bcb(1420, 1, Oie, BLc); + _2.Mb = function CLc(a) { + return FJc(), BD(a, 10).k == (j0b(), h0b); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$7$Type", 1420); + bcb(1421, 1, {}, DLc); + _2.Kb = function ELc(a) { + return FJc(), new YAb(null, new Lub(new Sr(ur(O_b(BD(a, 10)).a.Kc(), new Sq())))); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$8$Type", 1421); + bcb(1422, 1, Oie, FLc); + _2.Mb = function GLc(a) { + return FJc(), NZb(BD(a, 17)); + }; + mdb(Hqe, "NetworkSimplexPlacer/lambda$9$Type", 1422); + bcb(1404, 1, Bqe, KLc); + _2.Yf = function LLc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? HLc : null; + }; + _2.pf = function MLc(a, b) { + JLc(BD(a, 37), b); + }; + var HLc; + mdb(Hqe, "SimpleNodePlacer", 1404); + bcb(180, 1, { 180: 1 }, ULc); + _2.Ib = function VLc() { + var a; + a = ""; + this.c == (YLc(), XLc) ? a += kle : this.c == WLc && (a += jle); + this.o == (eMc(), cMc) ? a += vle : this.o == dMc ? a += "UP" : a += "BALANCED"; + return a; + }; + mdb(Kqe, "BKAlignedLayout", 180); + bcb(516, 22, { 3: 1, 35: 1, 22: 1, 516: 1 }, ZLc); + var WLc, XLc; + var fZ = ndb(Kqe, "BKAlignedLayout/HDirection", 516, CI, _Lc, $Lc); + var aMc; + bcb(515, 22, { 3: 1, 35: 1, 22: 1, 515: 1 }, fMc); + var cMc, dMc; + var gZ = ndb(Kqe, "BKAlignedLayout/VDirection", 515, CI, hMc, gMc); + var iMc; + bcb(1634, 1, {}, mMc); + mdb(Kqe, "BKAligner", 1634); + bcb(1637, 1, {}, rMc); + mdb(Kqe, "BKCompactor", 1637); + bcb(654, 1, { 654: 1 }, sMc); + _2.a = 0; + mdb(Kqe, "BKCompactor/ClassEdge", 654); + bcb(458, 1, { 458: 1 }, uMc); + _2.a = null; + _2.b = 0; + mdb(Kqe, "BKCompactor/ClassNode", 458); + bcb(1407, 1, Bqe, CMc); + _2.Yf = function GMc(a) { + return BD(vNb(BD(a, 37), (wtc(), Ksc)), 21).Hc((Orc(), Hrc)) ? vMc : null; + }; + _2.pf = function HMc(a, b) { + BMc(this, BD(a, 37), b); + }; + _2.d = false; + var vMc; + mdb(Kqe, "BKNodePlacer", 1407); + bcb(1635, 1, {}, JMc); + _2.d = 0; + mdb(Kqe, "NeighborhoodInformation", 1635); + bcb(1636, 1, Dke, OMc); + _2.ue = function PMc(a, b) { + return NMc(this, BD(a, 46), BD(b, 46)); + }; + _2.Fb = function QMc(a) { + return this === a; + }; + _2.ve = function RMc() { + return new tpb(this); + }; + mdb(Kqe, "NeighborhoodInformation/NeighborComparator", 1636); + bcb(808, 1, {}); + mdb(Kqe, "ThresholdStrategy", 808); + bcb(1763, 808, {}, WMc); + _2.bg = function XMc(a, b, c2) { + return this.a.o == (eMc(), dMc) ? Pje : Qje; + }; + _2.cg = function YMc() { + }; + mdb(Kqe, "ThresholdStrategy/NullThresholdStrategy", 1763); + bcb(579, 1, { 579: 1 }, ZMc); + _2.c = false; + _2.d = false; + mdb(Kqe, "ThresholdStrategy/Postprocessable", 579); + bcb(1764, 808, {}, bNc); + _2.bg = function cNc(a, b, c2) { + var d, e, f2; + e = b == c2; + d = this.a.a[c2.p] == b; + if (!(e || d)) { + return a; + } + f2 = a; + if (this.a.c == (YLc(), XLc)) { + e && (f2 = $Mc(this, b, true)); + !isNaN(f2) && !isFinite(f2) && d && (f2 = $Mc(this, c2, false)); + } else { + e && (f2 = $Mc(this, b, true)); + !isNaN(f2) && !isFinite(f2) && d && (f2 = $Mc(this, c2, false)); + } + return f2; + }; + _2.cg = function dNc() { + var a, b, c2, d, e; + while (this.d.b != 0) { + e = BD(Ksb(this.d), 579); + d = _Mc(this, e); + if (!d.a) { + continue; + } + a = d.a; + c2 = Ccb(this.a.f[this.a.g[e.b.p].p]); + if (!c2 && !OZb(a) && a.c.i.c == a.d.i.c) { + continue; + } + b = aNc(this, e); + b || swb(this.e, e); + } + while (this.e.a.c.length != 0) { + aNc(this, BD(rwb(this.e), 579)); + } + }; + mdb(Kqe, "ThresholdStrategy/SimpleThresholdStrategy", 1764); + bcb(635, 1, { 635: 1, 246: 1, 234: 1 }, hNc); + _2.Kf = function jNc() { + return gNc(this); + }; + _2.Xf = function iNc() { + return gNc(this); + }; + var eNc; + mdb(Lqe, "EdgeRouterFactory", 635); + bcb(1458, 1, Bqe, wNc); + _2.Yf = function xNc(a) { + return uNc(BD(a, 37)); + }; + _2.pf = function yNc(a, b) { + vNc(BD(a, 37), b); + }; + var lNc, mNc, nNc, oNc, pNc, qNc, rNc, sNc; + mdb(Lqe, "OrthogonalEdgeRouter", 1458); + bcb(1451, 1, Bqe, NNc); + _2.Yf = function ONc(a) { + return INc(BD(a, 37)); + }; + _2.pf = function PNc(a, b) { + KNc(this, BD(a, 37), b); + }; + var zNc, ANc, BNc, CNc, DNc, ENc; + mdb(Lqe, "PolylineEdgeRouter", 1451); + bcb(1452, 1, Vke, RNc); + _2.Lb = function SNc(a) { + return QNc(BD(a, 10)); + }; + _2.Fb = function TNc(a) { + return this === a; + }; + _2.Mb = function UNc(a) { + return QNc(BD(a, 10)); + }; + mdb(Lqe, "PolylineEdgeRouter/1", 1452); + bcb(1809, 1, Oie, ZNc); + _2.Mb = function $Nc(a) { + return BD(a, 129).c == (HOc(), FOc); + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$0$Type", 1809); + bcb(1810, 1, {}, _Nc); + _2.Ge = function aOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$1$Type", 1810); + bcb(1811, 1, Oie, bOc); + _2.Mb = function cOc(a) { + return BD(a, 129).c == (HOc(), FOc); + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$2$Type", 1811); + bcb(1812, 1, {}, dOc); + _2.Ge = function eOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$3$Type", 1812); + bcb(1813, 1, {}, fOc); + _2.Ge = function gOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$4$Type", 1813); + bcb(1814, 1, {}, hOc); + _2.Ge = function iOc(a) { + return BD(a, 129).d; + }; + mdb(Mqe, "HyperEdgeCycleDetector/lambda$5$Type", 1814); + bcb(112, 1, { 35: 1, 112: 1 }, uOc); + _2.wd = function vOc(a) { + return kOc(this, BD(a, 112)); + }; + _2.Fb = function wOc(a) { + var b; + if (JD(a, 112)) { + b = BD(a, 112); + return this.g == b.g; + } + return false; + }; + _2.Hb = function xOc() { + return this.g; + }; + _2.Ib = function zOc() { + var a, b, c2, d; + a = new Wfb("{"); + d = new olb(this.n); + while (d.a < d.c.c.length) { + c2 = BD(mlb(d), 11); + b = P_b(c2.i); + b == null && (b = "n" + S_b(c2.i)); + a.a += "" + b; + d.a < d.c.c.length && (a.a += ",", a); + } + a.a += "}"; + return a.a; + }; + _2.a = 0; + _2.b = 0; + _2.c = NaN; + _2.d = 0; + _2.g = 0; + _2.i = 0; + _2.o = 0; + _2.s = NaN; + mdb(Mqe, "HyperEdgeSegment", 112); + bcb(129, 1, { 129: 1 }, DOc); + _2.Ib = function EOc() { + return this.a + "->" + this.b + " (" + Yr(this.c) + ")"; + }; + _2.d = 0; + mdb(Mqe, "HyperEdgeSegmentDependency", 129); + bcb(520, 22, { 3: 1, 35: 1, 22: 1, 520: 1 }, IOc); + var FOc, GOc; + var DZ = ndb(Mqe, "HyperEdgeSegmentDependency/DependencyType", 520, CI, KOc, JOc); + var LOc; + bcb(1815, 1, {}, ZOc); + mdb(Mqe, "HyperEdgeSegmentSplitter", 1815); + bcb(1816, 1, {}, aPc); + _2.a = 0; + _2.b = 0; + mdb(Mqe, "HyperEdgeSegmentSplitter/AreaRating", 1816); + bcb(329, 1, { 329: 1 }, bPc); + _2.a = 0; + _2.b = 0; + _2.c = 0; + mdb(Mqe, "HyperEdgeSegmentSplitter/FreeArea", 329); + bcb(1817, 1, Dke, cPc); + _2.ue = function dPc(a, b) { + return _Oc(BD(a, 112), BD(b, 112)); + }; + _2.Fb = function ePc(a) { + return this === a; + }; + _2.ve = function fPc() { + return new tpb(this); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$0$Type", 1817); + bcb(1818, 1, qie, gPc); + _2.td = function hPc(a) { + TOc(this.a, this.d, this.c, this.b, BD(a, 112)); + }; + _2.b = 0; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$1$Type", 1818); + bcb(1819, 1, {}, iPc); + _2.Kb = function jPc(a) { + return new YAb(null, new Kub(BD(a, 112).e, 16)); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$2$Type", 1819); + bcb(1820, 1, {}, kPc); + _2.Kb = function lPc(a) { + return new YAb(null, new Kub(BD(a, 112).j, 16)); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$3$Type", 1820); + bcb(1821, 1, {}, mPc); + _2.Fe = function nPc(a) { + return Edb(ED(a)); + }; + mdb(Mqe, "HyperEdgeSegmentSplitter/lambda$4$Type", 1821); + bcb(655, 1, {}, tPc); + _2.a = 0; + _2.b = 0; + _2.c = 0; + mdb(Mqe, "OrthogonalRoutingGenerator", 655); + bcb(1638, 1, {}, xPc); + _2.Kb = function yPc(a) { + return new YAb(null, new Kub(BD(a, 112).e, 16)); + }; + mdb(Mqe, "OrthogonalRoutingGenerator/lambda$0$Type", 1638); + bcb(1639, 1, {}, zPc); + _2.Kb = function APc(a) { + return new YAb(null, new Kub(BD(a, 112).j, 16)); + }; + mdb(Mqe, "OrthogonalRoutingGenerator/lambda$1$Type", 1639); + bcb(661, 1, {}); + mdb(Nqe, "BaseRoutingDirectionStrategy", 661); + bcb(1807, 661, {}, EPc); + _2.dg = function FPc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + if (!!a.r && !a.q) { + return; + } + k = b + a.o * c2; + for (j = new olb(a.n); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 11); + l = l7c(OC(GC(m1, 1), nie, 8, 0, [i3.i.n, i3.n, i3.a])).a; + for (h = new olb(i3.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (!OZb(g)) { + o2 = g.d; + p = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).a; + if ($wnd.Math.abs(l - p) > qme) { + f2 = k; + e = a; + d = new f7c(l, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + m = a.r; + if (m) { + n = Edb(ED(Ut(m.e, 0))); + d = new f7c(n, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + f2 = b + m.o * c2; + e = m; + d = new f7c(n, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + d = new f7c(p, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + } + } + } + }; + _2.eg = function GPc(a) { + return a.i.n.a + a.n.a + a.a.a; + }; + _2.fg = function HPc() { + return Ucd(), Rcd; + }; + _2.gg = function IPc() { + return Ucd(), Acd; + }; + mdb(Nqe, "NorthToSouthRoutingStrategy", 1807); + bcb(1808, 661, {}, JPc); + _2.dg = function KPc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + if (!!a.r && !a.q) { + return; + } + k = b - a.o * c2; + for (j = new olb(a.n); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 11); + l = l7c(OC(GC(m1, 1), nie, 8, 0, [i3.i.n, i3.n, i3.a])).a; + for (h = new olb(i3.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (!OZb(g)) { + o2 = g.d; + p = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).a; + if ($wnd.Math.abs(l - p) > qme) { + f2 = k; + e = a; + d = new f7c(l, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + m = a.r; + if (m) { + n = Edb(ED(Ut(m.e, 0))); + d = new f7c(n, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + f2 = b - m.o * c2; + e = m; + d = new f7c(n, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + d = new f7c(p, f2); + Dsb(g.a, d); + BPc(this, g, e, d, false); + } + } + } + } + }; + _2.eg = function LPc(a) { + return a.i.n.a + a.n.a + a.a.a; + }; + _2.fg = function MPc() { + return Ucd(), Acd; + }; + _2.gg = function NPc() { + return Ucd(), Rcd; + }; + mdb(Nqe, "SouthToNorthRoutingStrategy", 1808); + bcb(1806, 661, {}, OPc); + _2.dg = function PPc(a, b, c2) { + var d, e, f2, g, h, i3, j, k, l, m, n, o2, p; + if (!!a.r && !a.q) { + return; + } + k = b + a.o * c2; + for (j = new olb(a.n); j.a < j.c.c.length; ) { + i3 = BD(mlb(j), 11); + l = l7c(OC(GC(m1, 1), nie, 8, 0, [i3.i.n, i3.n, i3.a])).b; + for (h = new olb(i3.g); h.a < h.c.c.length; ) { + g = BD(mlb(h), 17); + if (!OZb(g)) { + o2 = g.d; + p = l7c(OC(GC(m1, 1), nie, 8, 0, [o2.i.n, o2.n, o2.a])).b; + if ($wnd.Math.abs(l - p) > qme) { + f2 = k; + e = a; + d = new f7c(f2, l); + Dsb(g.a, d); + BPc(this, g, e, d, true); + m = a.r; + if (m) { + n = Edb(ED(Ut(m.e, 0))); + d = new f7c(f2, n); + Dsb(g.a, d); + BPc(this, g, e, d, true); + f2 = b + m.o * c2; + e = m; + d = new f7c(f2, n); + Dsb(g.a, d); + BPc(this, g, e, d, true); + } + d = new f7c(f2, p); + Dsb(g.a, d); + BPc(this, g, e, d, true); + } + } + } + } + }; + _2.eg = function QPc(a) { + return a.i.n.b + a.n.b + a.a.b; + }; + _2.fg = function RPc() { + return Ucd(), zcd; + }; + _2.gg = function SPc() { + return Ucd(), Tcd; + }; + mdb(Nqe, "WestToEastRoutingStrategy", 1806); + bcb(813, 1, {}, YPc); + _2.Ib = function ZPc() { + return Fe(this.a); + }; + _2.b = 0; + _2.c = false; + _2.d = false; + _2.f = 0; + mdb(Pqe, "NubSpline", 813); + bcb(407, 1, { 407: 1 }, aQc, bQc); + mdb(Pqe, "NubSpline/PolarCP", 407); + bcb(1453, 1, Bqe, vQc); + _2.Yf = function xQc(a) { + return qQc(BD(a, 37)); + }; + _2.pf = function yQc(a, b) { + uQc(this, BD(a, 37), b); + }; + var cQc, dQc, eQc, fQc, gQc; + mdb(Pqe, "SplineEdgeRouter", 1453); + bcb(268, 1, { 268: 1 }, BQc); + _2.Ib = function CQc() { + return this.a + " ->(" + this.c + ") " + this.b; + }; + _2.c = 0; + mdb(Pqe, "SplineEdgeRouter/Dependency", 268); + bcb(455, 22, { 3: 1, 35: 1, 22: 1, 455: 1 }, GQc); + var DQc, EQc; + var YZ = ndb(Pqe, "SplineEdgeRouter/SideToProcess", 455, CI, IQc, HQc); + var JQc; + bcb(1454, 1, Oie, LQc); + _2.Mb = function MQc(a) { + return hQc(), !BD(a, 128).o; + }; + mdb(Pqe, "SplineEdgeRouter/lambda$0$Type", 1454); + bcb(1455, 1, {}, NQc); + _2.Ge = function OQc(a) { + return hQc(), BD(a, 128).v + 1; + }; + mdb(Pqe, "SplineEdgeRouter/lambda$1$Type", 1455); + bcb(1456, 1, qie, PQc); + _2.td = function QQc(a) { + sQc(this.a, this.b, BD(a, 46)); + }; + mdb(Pqe, "SplineEdgeRouter/lambda$2$Type", 1456); + bcb(1457, 1, qie, RQc); + _2.td = function SQc(a) { + tQc(this.a, this.b, BD(a, 46)); + }; + mdb(Pqe, "SplineEdgeRouter/lambda$3$Type", 1457); + bcb(128, 1, { 35: 1, 128: 1 }, YQc, ZQc); + _2.wd = function $Qc(a) { + return WQc(this, BD(a, 128)); + }; + _2.b = 0; + _2.e = false; + _2.f = 0; + _2.g = 0; + _2.j = false; + _2.k = false; + _2.n = 0; + _2.o = false; + _2.p = false; + _2.q = false; + _2.s = 0; + _2.u = 0; + _2.v = 0; + _2.F = 0; + mdb(Pqe, "SplineSegment", 128); + bcb(459, 1, { 459: 1 }, _Qc); + _2.a = 0; + _2.b = false; + _2.c = false; + _2.d = false; + _2.e = false; + _2.f = 0; + mdb(Pqe, "SplineSegment/EdgeInformation", 459); + bcb(1234, 1, {}, hRc); + mdb(Uqe, hme, 1234); + bcb(1235, 1, Dke, jRc); + _2.ue = function kRc(a, b) { + return iRc(BD(a, 135), BD(b, 135)); + }; + _2.Fb = function lRc(a) { + return this === a; + }; + _2.ve = function mRc() { + return new tpb(this); + }; + mdb(Uqe, ime, 1235); + bcb(1233, 1, {}, tRc); + mdb(Uqe, "MrTree", 1233); + bcb(393, 22, { 3: 1, 35: 1, 22: 1, 393: 1, 246: 1, 234: 1 }, ARc); + _2.Kf = function CRc() { + return zRc(this); + }; + _2.Xf = function BRc() { + return zRc(this); + }; + var uRc, vRc, wRc, xRc; + var h$ = ndb(Uqe, "TreeLayoutPhases", 393, CI, ERc, DRc); + var FRc; + bcb(1130, 209, Mle, HRc); + _2.Ze = function IRc(a, b) { + var c2, d, e, f2, g, h, i3; + Ccb(DD(hkd(a, (JTc(), ATc)))) || $Cb((c2 = new _Cb((Pgd(), new bhd(a))), c2)); + g = (h = new SRc(), tNb(h, a), yNb(h, (mTc(), dTc), a), i3 = new Lqb(), pRc(a, h, i3), oRc(a, h, i3), h); + f2 = gRc(this.a, g); + for (e = new olb(f2); e.a < e.c.c.length; ) { + d = BD(mlb(e), 135); + rRc(this.b, d, Udd(b, 1 / f2.c.length)); + } + g = fRc(f2); + nRc(g); + }; + mdb(Uqe, "TreeLayoutProvider", 1130); + bcb(1847, 1, vie, KRc); + _2.Jc = function LRc(a) { + reb(this, a); + }; + _2.Kc = function MRc() { + return mmb(), Emb(), Dmb; + }; + mdb(Uqe, "TreeUtil/1", 1847); + bcb(1848, 1, vie, NRc); + _2.Jc = function ORc(a) { + reb(this, a); + }; + _2.Kc = function PRc() { + return mmb(), Emb(), Dmb; + }; + mdb(Uqe, "TreeUtil/2", 1848); + bcb(502, 134, { 3: 1, 502: 1, 94: 1, 134: 1 }); + _2.g = 0; + mdb(Vqe, "TGraphElement", 502); + bcb(188, 502, { 3: 1, 188: 1, 502: 1, 94: 1, 134: 1 }, QRc); + _2.Ib = function RRc() { + return !!this.b && !!this.c ? WRc(this.b) + "->" + WRc(this.c) : "e_" + tb(this); + }; + mdb(Vqe, "TEdge", 188); + bcb(135, 134, { 3: 1, 135: 1, 94: 1, 134: 1 }, SRc); + _2.Ib = function TRc() { + var a, b, c2, d, e; + e = null; + for (d = Jsb(this.b, 0); d.b != d.d.c; ) { + c2 = BD(Xsb(d), 86); + e += (c2.c == null || c2.c.length == 0 ? "n_" + c2.g : "n_" + c2.c) + "\n"; + } + for (b = Jsb(this.a, 0); b.b != b.d.c; ) { + a = BD(Xsb(b), 188); + e += (!!a.b && !!a.c ? WRc(a.b) + "->" + WRc(a.c) : "e_" + tb(a)) + "\n"; + } + return e; + }; + var n$ = mdb(Vqe, "TGraph", 135); + bcb(633, 502, { 3: 1, 502: 1, 633: 1, 94: 1, 134: 1 }); + mdb(Vqe, "TShape", 633); + bcb(86, 633, { 3: 1, 502: 1, 86: 1, 633: 1, 94: 1, 134: 1 }, XRc); + _2.Ib = function YRc() { + return WRc(this); + }; + var q$ = mdb(Vqe, "TNode", 86); + bcb(255, 1, vie, ZRc); + _2.Jc = function $Rc(a) { + reb(this, a); + }; + _2.Kc = function _Rc() { + var a; + return a = Jsb(this.a.d, 0), new aSc(a); + }; + mdb(Vqe, "TNode/2", 255); + bcb(358, 1, aie, aSc); + _2.Nb = function bSc(a) { + Rrb(this, a); + }; + _2.Pb = function dSc() { + return BD(Xsb(this.a), 188).c; + }; + _2.Ob = function cSc() { + return Wsb(this.a); + }; + _2.Qb = function eSc() { + Zsb(this.a); + }; + mdb(Vqe, "TNode/2/1", 358); + bcb(1840, 1, ene, hSc); + _2.pf = function jSc(a, b) { + gSc(this, BD(a, 135), b); + }; + mdb(Wqe, "FanProcessor", 1840); + bcb(327, 22, { 3: 1, 35: 1, 22: 1, 327: 1, 234: 1 }, rSc); + _2.Kf = function sSc() { + switch (this.g) { + case 0: + return new QSc(); + case 1: + return new hSc(); + case 2: + return new GSc(); + case 3: + return new zSc(); + case 4: + return new NSc(); + case 5: + return new TSc(); + default: + throw vbb(new Wdb(Dne + (this.f != null ? this.f : "" + this.g))); + } + }; + var kSc, lSc, mSc, nSc, oSc, pSc; + var t$ = ndb(Wqe, Ene, 327, CI, uSc, tSc); + var vSc; + bcb(1843, 1, ene, zSc); + _2.pf = function ASc(a, b) { + xSc(this, BD(a, 135), b); + }; + _2.a = 0; + mdb(Wqe, "LevelHeightProcessor", 1843); + bcb(1844, 1, vie, BSc); + _2.Jc = function CSc(a) { + reb(this, a); + }; + _2.Kc = function DSc() { + return mmb(), Emb(), Dmb; + }; + mdb(Wqe, "LevelHeightProcessor/1", 1844); + bcb(1841, 1, ene, GSc); + _2.pf = function HSc(a, b) { + ESc(this, BD(a, 135), b); + }; + _2.a = 0; + mdb(Wqe, "NeighborsProcessor", 1841); + bcb(1842, 1, vie, ISc); + _2.Jc = function JSc(a) { + reb(this, a); + }; + _2.Kc = function KSc() { + return mmb(), Emb(), Dmb; + }; + mdb(Wqe, "NeighborsProcessor/1", 1842); + bcb(1845, 1, ene, NSc); + _2.pf = function OSc(a, b) { + LSc(this, BD(a, 135), b); + }; + _2.a = 0; + mdb(Wqe, "NodePositionProcessor", 1845); + bcb(1839, 1, ene, QSc); + _2.pf = function RSc(a, b) { + PSc(this, BD(a, 135)); + }; + mdb(Wqe, "RootProcessor", 1839); + bcb(1846, 1, ene, TSc); + _2.pf = function USc(a, b) { + SSc(BD(a, 135)); + }; + mdb(Wqe, "Untreeifyer", 1846); + var VSc, WSc, XSc, YSc, ZSc, $Sc, _Sc, aTc, bTc, cTc, dTc, eTc, fTc, gTc, hTc, iTc, jTc, kTc, lTc; + bcb(851, 1, ale, sTc); + _2.Qe = function tTc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zqe), ""), "Weighting of Nodes"), "Which weighting to use when computing a node order."), qTc), (_5c(), V5c)), E$), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $qe), ""), "Search Order"), "Which search order to use when computing a spanning tree."), oTc), V5c), F$), pqb(L5c)))); + KTc((new LTc(), a)); + }; + var nTc, oTc, pTc, qTc; + mdb(_qe, "MrTreeMetaDataProvider", 851); + bcb(994, 1, ale, LTc); + _2.Qe = function MTc(a) { + KTc(a); + }; + var uTc, vTc, wTc, xTc, yTc, zTc, ATc, BTc, CTc, DTc, ETc, FTc, GTc, HTc, ITc; + mdb(_qe, "MrTreeOptions", 994); + bcb(995, 1, {}, NTc); + _2.$e = function OTc() { + var a; + return a = new HRc(), a; + }; + _2._e = function PTc(a) { + }; + mdb(_qe, "MrTreeOptions/MrtreeFactory", 995); + bcb(480, 22, { 3: 1, 35: 1, 22: 1, 480: 1 }, TTc); + var QTc, RTc; + var E$ = ndb(_qe, "OrderWeighting", 480, CI, VTc, UTc); + var WTc; + bcb(425, 22, { 3: 1, 35: 1, 22: 1, 425: 1 }, _Tc); + var YTc, ZTc; + var F$ = ndb(_qe, "TreeifyingOrder", 425, CI, bUc, aUc); + var cUc; + bcb(1459, 1, Bqe, lUc); + _2.Yf = function mUc(a) { + return BD(a, 135), eUc; + }; + _2.pf = function nUc(a, b) { + kUc(this, BD(a, 135), b); + }; + var eUc; + mdb("org.eclipse.elk.alg.mrtree.p1treeify", "DFSTreeifyer", 1459); + bcb(1460, 1, Bqe, sUc); + _2.Yf = function tUc(a) { + return BD(a, 135), oUc; + }; + _2.pf = function uUc(a, b) { + rUc(this, BD(a, 135), b); + }; + var oUc; + mdb("org.eclipse.elk.alg.mrtree.p2order", "NodeOrderer", 1460); + bcb(1461, 1, Bqe, CUc); + _2.Yf = function DUc(a) { + return BD(a, 135), vUc; + }; + _2.pf = function EUc(a, b) { + AUc(this, BD(a, 135), b); + }; + _2.a = 0; + var vUc; + mdb("org.eclipse.elk.alg.mrtree.p3place", "NodePlacer", 1461); + bcb(1462, 1, Bqe, IUc); + _2.Yf = function JUc(a) { + return BD(a, 135), FUc; + }; + _2.pf = function KUc(a, b) { + HUc(BD(a, 135), b); + }; + var FUc; + mdb("org.eclipse.elk.alg.mrtree.p4route", "EdgeRouter", 1462); + var LUc; + bcb(495, 22, { 3: 1, 35: 1, 22: 1, 495: 1, 246: 1, 234: 1 }, RUc); + _2.Kf = function TUc() { + return QUc(this); + }; + _2.Xf = function SUc() { + return QUc(this); + }; + var NUc, OUc; + var K$ = ndb(cre, "RadialLayoutPhases", 495, CI, VUc, UUc); + var WUc; + bcb(1131, 209, Mle, ZUc); + _2.Ze = function $Uc(a, b) { + var c2, d, e, f2, g, h; + c2 = YUc(this, a); + Odd(b, "Radial layout", c2.c.length); + Ccb(DD(hkd(a, (ZWc(), QWc)))) || $Cb((d = new _Cb((Pgd(), new bhd(a))), d)); + h = aVc(a); + jkd(a, (MUc(), LUc), h); + if (!h) { + throw vbb(new Wdb("The given graph is not a tree!")); + } + e = Edb(ED(hkd(a, VWc))); + e == 0 && (e = _Uc(a)); + jkd(a, VWc, e); + for (g = new olb(YUc(this, a)); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 51); + f2.pf(a, Udd(b, 1)); + } + Qdd(b); + }; + mdb(cre, "RadialLayoutProvider", 1131); + bcb(549, 1, Dke, jVc); + _2.ue = function kVc(a, b) { + return iVc(this.a, this.b, BD(a, 33), BD(b, 33)); + }; + _2.Fb = function lVc(a) { + return this === a; + }; + _2.ve = function mVc() { + return new tpb(this); + }; + _2.a = 0; + _2.b = 0; + mdb(cre, "RadialUtil/lambda$0$Type", 549); + bcb(1375, 1, ene, oVc); + _2.pf = function pVc(a, b) { + nVc(BD(a, 33), b); + }; + mdb(fre, "CalculateGraphSize", 1375); + bcb(442, 22, { 3: 1, 35: 1, 22: 1, 442: 1, 234: 1 }, uVc); + _2.Kf = function vVc() { + switch (this.g) { + case 0: + return new bWc(); + case 1: + return new NVc(); + case 2: + return new oVc(); + default: + throw vbb(new Wdb(Dne + (this.f != null ? this.f : "" + this.g))); + } + }; + var qVc, rVc, sVc; + var O$ = ndb(fre, Ene, 442, CI, xVc, wVc); + var yVc; + bcb(645, 1, {}); + _2.e = 1; + _2.g = 0; + mdb(gre, "AbstractRadiusExtensionCompaction", 645); + bcb(1772, 645, {}, KVc); + _2.hg = function LVc(a) { + var b, c2, d, e, f2, g, h, i3, j; + this.c = BD(hkd(a, (MUc(), LUc)), 33); + EVc(this, this.c); + this.d = tXc(BD(hkd(a, (ZWc(), WWc)), 293)); + i3 = BD(hkd(a, KWc), 19); + !!i3 && DVc(this, i3.a); + h = ED(hkd(a, (Y9c(), T9c))); + FVc(this, (uCb(h), h)); + j = gVc(this.c); + !!this.d && this.d.lg(j); + GVc(this, j); + g = new amb(OC(GC(E2, 1), hre, 33, 0, [this.c])); + for (c2 = 0; c2 < 2; c2++) { + for (b = 0; b < j.c.length; b++) { + e = new amb(OC(GC(E2, 1), hre, 33, 0, [(tCb(b, j.c.length), BD(j.c[b], 33))])); + f2 = b < j.c.length - 1 ? (tCb(b + 1, j.c.length), BD(j.c[b + 1], 33)) : (tCb(0, j.c.length), BD(j.c[0], 33)); + d = b == 0 ? BD(Ikb(j, j.c.length - 1), 33) : (tCb(b - 1, j.c.length), BD(j.c[b - 1], 33)); + IVc(this, (tCb(b, j.c.length), BD(j.c[b], 33), g), d, f2, e); + } + } + }; + mdb(gre, "AnnulusWedgeCompaction", 1772); + bcb(1374, 1, ene, NVc); + _2.pf = function OVc(a, b) { + MVc(BD(a, 33), b); + }; + mdb(gre, "GeneralCompactor", 1374); + bcb(1771, 645, {}, SVc); + _2.hg = function TVc(a) { + var b, c2, d, e; + c2 = BD(hkd(a, (MUc(), LUc)), 33); + this.f = c2; + this.b = tXc(BD(hkd(a, (ZWc(), WWc)), 293)); + e = BD(hkd(a, KWc), 19); + !!e && DVc(this, e.a); + d = ED(hkd(a, (Y9c(), T9c))); + FVc(this, (uCb(d), d)); + b = gVc(c2); + !!this.b && this.b.lg(b); + QVc(this, b); + }; + _2.a = 0; + mdb(gre, "RadialCompaction", 1771); + bcb(1779, 1, {}, VVc); + _2.ig = function WVc(a) { + var b, c2, d, e, f2, g; + this.a = a; + b = 0; + g = gVc(a); + d = 0; + for (f2 = new olb(g); f2.a < f2.c.c.length; ) { + e = BD(mlb(f2), 33); + ++d; + for (c2 = d; c2 < g.c.length; c2++) { + UVc(this, e, (tCb(c2, g.c.length), BD(g.c[c2], 33))) && (b += 1); + } + } + return b; + }; + mdb(ire, "CrossingMinimizationPosition", 1779); + bcb(1777, 1, {}, XVc); + _2.ig = function YVc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n; + d = 0; + for (c2 = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 79); + h = atd(BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82)); + j = h.i + h.g / 2; + k = h.j + h.f / 2; + e = a.i + a.g / 2; + f2 = a.j + a.f / 2; + l = new d7c(); + l.a = j - e; + l.b = k - f2; + g = new f7c(l.a, l.b); + l6c(g, a.g, a.f); + l.a -= g.a; + l.b -= g.b; + e = j - l.a; + f2 = k - l.b; + i3 = new f7c(l.a, l.b); + l6c(i3, h.g, h.f); + l.a -= i3.a; + l.b -= i3.b; + j = e + l.a; + k = f2 + l.b; + m = j - e; + n = k - f2; + d += $wnd.Math.sqrt(m * m + n * n); + } + return d; + }; + mdb(ire, "EdgeLengthOptimization", 1777); + bcb(1778, 1, {}, ZVc); + _2.ig = function $Vc(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + d = 0; + for (c2 = new Sr(ur(_sd(a).a.Kc(), new Sq())); Qr(c2); ) { + b = BD(Rr(c2), 79); + h = atd(BD(qud((!b.c && (b.c = new y5d(z2, b, 5, 8)), b.c), 0), 82)); + i3 = h.i + h.g / 2; + j = h.j + h.f / 2; + e = BD(hkd(h, (Y9c(), C9c)), 8); + f2 = a.i + e.a + a.g / 2; + g = a.j + e.b + a.f; + k = i3 - f2; + l = j - g; + d += $wnd.Math.sqrt(k * k + l * l); + } + return d; + }; + mdb(ire, "EdgeLengthPositionOptimization", 1778); + bcb(1373, 645, ene, bWc); + _2.pf = function cWc(a, b) { + aWc(this, BD(a, 33), b); + }; + mdb("org.eclipse.elk.alg.radial.intermediate.overlaps", "RadiusExtensionOverlapRemoval", 1373); + bcb(426, 22, { 3: 1, 35: 1, 22: 1, 426: 1 }, hWc); + var dWc, eWc; + var X$ = ndb(kre, "AnnulusWedgeCriteria", 426, CI, jWc, iWc); + var kWc; + bcb(380, 22, { 3: 1, 35: 1, 22: 1, 380: 1 }, rWc); + var mWc, nWc, oWc; + var Y$ = ndb(kre, Sle, 380, CI, tWc, sWc); + var uWc; + bcb(852, 1, ale, IWc); + _2.Qe = function JWc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), lre), ""), "Order ID"), "The id can be used to define an order for nodes of one radius. This can be used to sort them in the layer accordingly."), meb(0)), (_5c(), X5c)), JI), pqb((N5c(), K5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mre), ""), "Radius"), "The radius option can be used to set the initial radius for the radial layouter."), 0), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), nre), ""), "Compaction"), "With the compacter option it can be determined how compaction on the graph is done. It can be chosen between none, the radial compaction or the compaction of wedges separately."), yWc), V5c), Y$), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ore), ""), "Compaction Step Size"), "Determine the size of steps with which the compaction is done. Step size 1 correlates to a compaction of 1 pixel per Iteration."), meb(1)), X5c), JI), pqb(L5c)))); + o4c(a, ore, nre, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), pre), ""), "Sorter"), "Sort the nodes per radius according to the sorting algorithm. The strategies are none, by the given order id, or sorting them by polar coordinates."), EWc), V5c), b_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), qre), ""), "Annulus Wedge Criteria"), "Determine how the wedge for the node placement is calculated. It can be chosen between wedge determination by the number of leaves or by the maximum sum of diagonals."), GWc), V5c), X$), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), rre), ""), "Translation Optimization"), "Find the optimal translation of the nodes of the first radii according to this criteria. For example edge crossings can be minimized."), AWc), V5c), a_), pqb(L5c)))); + $Wc((new _Wc(), a)); + }; + var wWc, xWc, yWc, zWc, AWc, BWc, CWc, DWc, EWc, FWc, GWc; + mdb(kre, "RadialMetaDataProvider", 852); + bcb(996, 1, ale, _Wc); + _2.Qe = function aXc(a) { + $Wc(a); + }; + var KWc, LWc, MWc, NWc, OWc, PWc, QWc, RWc, SWc, TWc, UWc, VWc, WWc, XWc, YWc; + mdb(kre, "RadialOptions", 996); + bcb(997, 1, {}, bXc); + _2.$e = function cXc() { + var a; + return a = new ZUc(), a; + }; + _2._e = function dXc(a) { + }; + mdb(kre, "RadialOptions/RadialFactory", 997); + bcb(340, 22, { 3: 1, 35: 1, 22: 1, 340: 1 }, kXc); + var eXc, fXc, gXc, hXc; + var a_ = ndb(kre, "RadialTranslationStrategy", 340, CI, mXc, lXc); + var nXc; + bcb(293, 22, { 3: 1, 35: 1, 22: 1, 293: 1 }, uXc); + var pXc, qXc, rXc; + var b_ = ndb(kre, "SortingStrategy", 293, CI, wXc, vXc); + var xXc; + bcb(1449, 1, Bqe, CXc); + _2.Yf = function DXc(a) { + return BD(a, 33), null; + }; + _2.pf = function EXc(a, b) { + AXc(this, BD(a, 33), b); + }; + _2.c = 0; + mdb("org.eclipse.elk.alg.radial.p1position", "EadesRadial", 1449); + bcb(1775, 1, {}, FXc); + _2.jg = function GXc(a) { + return eVc(a); + }; + mdb(tre, "AnnulusWedgeByLeafs", 1775); + bcb(1776, 1, {}, IXc); + _2.jg = function JXc(a) { + return HXc(this, a); + }; + mdb(tre, "AnnulusWedgeByNodeSpace", 1776); + bcb(1450, 1, Bqe, MXc); + _2.Yf = function NXc(a) { + return BD(a, 33), null; + }; + _2.pf = function OXc(a, b) { + KXc(this, BD(a, 33), b); + }; + mdb("org.eclipse.elk.alg.radial.p2routing", "StraightLineEdgeRouter", 1450); + bcb(811, 1, {}, QXc); + _2.kg = function RXc(a) { + }; + _2.lg = function TXc(a) { + PXc(this, a); + }; + mdb(ure, "IDSorter", 811); + bcb(1774, 1, Dke, UXc); + _2.ue = function VXc(a, b) { + return SXc(BD(a, 33), BD(b, 33)); + }; + _2.Fb = function WXc(a) { + return this === a; + }; + _2.ve = function XXc() { + return new tpb(this); + }; + mdb(ure, "IDSorter/lambda$0$Type", 1774); + bcb(1773, 1, {}, $Xc); + _2.kg = function _Xc(a) { + YXc(this, a); + }; + _2.lg = function aYc(a) { + var b; + if (!a.dc()) { + if (!this.e) { + b = bVc(BD(a.Xb(0), 33)); + YXc(this, b); + } + PXc(this.e, a); + } + }; + mdb(ure, "PolarCoordinateSorter", 1773); + bcb(1136, 209, Mle, bYc); + _2.Ze = function eYc(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B, C, D, F; + Odd(b, "Rectangle Packing", 1); + b.n && b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + c2 = Edb(ED(hkd(a, (lZc(), RYc)))); + p = BD(hkd(a, eZc), 381); + s = Ccb(DD(hkd(a, ZYc))); + w2 = Ccb(DD(hkd(a, dZc))); + l = Ccb(DD(hkd(a, VYc))); + A = BD(hkd(a, fZc), 116); + v = Edb(ED(hkd(a, jZc))); + e = Ccb(DD(hkd(a, iZc))); + m = Ccb(DD(hkd(a, WYc))); + r = Ccb(DD(hkd(a, XYc))); + F = Edb(ED(hkd(a, kZc))); + C = (!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a); + r$c(C); + if (r) { + o2 = new Rkb(); + for (i3 = new Fyd(C); i3.e != i3.i.gc(); ) { + g = BD(Dyd(i3), 33); + ikd(g, UYc) && (o2.c[o2.c.length] = g, true); + } + for (j = new olb(o2); j.a < j.c.c.length; ) { + g = BD(mlb(j), 33); + Ftd(C, g); + } + mmb(); + Okb(o2, new fYc()); + for (k = new olb(o2); k.a < k.c.c.length; ) { + g = BD(mlb(k), 33); + B = BD(hkd(g, UYc), 19).a; + B = $wnd.Math.min(B, C.i); + vtd(C, B, g); + } + q = 0; + for (h = new Fyd(C); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 33); + jkd(g, TYc, meb(q)); + ++q; + } + } + u = rfd(a); + u.a -= A.b + A.c; + u.b -= A.d + A.a; + t = u.a; + if (F < 0 || F < u.a) { + n = new nYc(c2, p, s); + f2 = jYc(n, C, v, A); + b.n && b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + } else { + f2 = new d$c(c2, F, 0, (k$c(), j$c)); + } + u.a += A.b + A.c; + u.b += A.d + A.a; + if (!w2) { + r$c(C); + D = new DZc(c2, l, m, e, v); + t = $wnd.Math.max(u.a, f2.c); + f2 = CZc(D, C, t, u, b, a, A); + } + cYc(C, A); + Afd(a, f2.c + (A.b + A.c), f2.b + (A.d + A.a), false, true); + Ccb(DD(hkd(a, cZc))) || $Cb((d = new _Cb((Pgd(), new bhd(a))), d)); + b.n && b.n && !!a && Tdd(b, i6d(a), (pgd(), mgd)); + Qdd(b); + }; + mdb(yre, "RectPackingLayoutProvider", 1136); + bcb(1137, 1, Dke, fYc); + _2.ue = function gYc(a, b) { + return dYc(BD(a, 33), BD(b, 33)); + }; + _2.Fb = function hYc(a) { + return this === a; + }; + _2.ve = function iYc() { + return new tpb(this); + }; + mdb(yre, "RectPackingLayoutProvider/lambda$0$Type", 1137); + bcb(1256, 1, {}, nYc); + _2.a = 0; + _2.c = false; + mdb(zre, "AreaApproximation", 1256); + var o_ = odb(zre, "BestCandidateFilter"); + bcb(638, 1, { 526: 1 }, oYc); + _2.mg = function pYc(a, b, c2) { + var d, e, f2, g, h, i3; + i3 = new Rkb(); + f2 = Pje; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 220); + f2 = $wnd.Math.min(f2, (g.c + (c2.b + c2.c)) * (g.b + (c2.d + c2.a))); + } + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 220); + (d.c + (c2.b + c2.c)) * (d.b + (c2.d + c2.a)) == f2 && (i3.c[i3.c.length] = d, true); + } + return i3; + }; + mdb(zre, "AreaFilter", 638); + bcb(639, 1, { 526: 1 }, qYc); + _2.mg = function rYc(a, b, c2) { + var d, e, f2, g, h, i3; + h = new Rkb(); + i3 = Pje; + for (g = new olb(a); g.a < g.c.c.length; ) { + f2 = BD(mlb(g), 220); + i3 = $wnd.Math.min(i3, $wnd.Math.abs((f2.c + (c2.b + c2.c)) / (f2.b + (c2.d + c2.a)) - b)); + } + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 220); + $wnd.Math.abs((d.c + (c2.b + c2.c)) / (d.b + (c2.d + c2.a)) - b) == i3 && (h.c[h.c.length] = d, true); + } + return h; + }; + mdb(zre, "AspectRatioFilter", 639); + bcb(637, 1, { 526: 1 }, uYc); + _2.mg = function vYc(a, b, c2) { + var d, e, f2, g, h, i3; + i3 = new Rkb(); + f2 = Qje; + for (h = new olb(a); h.a < h.c.c.length; ) { + g = BD(mlb(h), 220); + f2 = $wnd.Math.max(f2, q$c(g.c + (c2.b + c2.c), g.b + (c2.d + c2.a), g.a)); + } + for (e = new olb(a); e.a < e.c.c.length; ) { + d = BD(mlb(e), 220); + q$c(d.c + (c2.b + c2.c), d.b + (c2.d + c2.a), d.a) == f2 && (i3.c[i3.c.length] = d, true); + } + return i3; + }; + mdb(zre, "ScaleMeasureFilter", 637); + bcb(381, 22, { 3: 1, 35: 1, 22: 1, 381: 1 }, AYc); + var wYc, xYc, yYc; + var q_ = ndb(Are, "OptimizationGoal", 381, CI, CYc, BYc); + var DYc; + bcb(856, 1, ale, PYc); + _2.Qe = function QYc(a) { + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Bre), ""), "Optimization Goal"), "Optimization goal for approximation of the bounding box given by the first iteration. Determines whether layout is sorted by the maximum scaling, aspect ratio, or area. Depending on the strategy the aspect ratio might be nearly ignored."), LYc), (_5c(), V5c)), q_), pqb((N5c(), K5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Cre), ""), "Shift Last Placed."), "When placing a rectangle behind or below the last placed rectangle in the first iteration, it is sometimes possible to shift the rectangle further to the left or right, resulting in less whitespace. True (default) enables the shift and false disables it. Disabling the shift produces a greater approximated area by the first iteration and a layout, when using ONLY the first iteration (default not the case), where it is sometimes impossible to implement a size transformation of rectangles that will fill the bounding box and eliminate empty spaces."), (Bcb(), true)), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Dre), ""), "Current position of a node in the order of nodes"), "The rectangles are ordered. Normally according to their definition the the model. This option specifies the current position of a node."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ere), ""), "Desired index of node"), "The rectangles are ordered. Normally according to their definition the the model. This option allows to specify a desired position that has preference over the original position."), meb(-1)), X5c), JI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Fre), ""), "Only Area Approximation"), "If enabled only the width approximation step is executed and the nodes are placed accordingly. The nodes are layouted according to the packingStrategy. If set to true not expansion of nodes is taking place."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Gre), ""), "Compact Rows"), "Enables compaction. Compacts blocks if they do not use the full height of the row. This option allows to have a smaller drawing. If this option is disabled all nodes are placed next to each other in rows."), true), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Hre), ""), "Fit Aspect Ratio"), "Expands nodes if expandNodes is true to fit the aspect ratio instead of only in their bounds. The option is only useful if the used packingStrategy is ASPECT_RATIO_DRIVEN, otherwise this may result in unreasonable ndoe expansion."), false), T5c), wI), pqb(K5c)))); + o4c(a, Hre, Jre, null); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ire), ""), "Target Width"), "Option to place the rectangles in the given target width instead of approximating the width using the desired aspect ratio. The padding is not included in this. Meaning a drawing will have width of targetwidth + horizontal padding."), -1), U5c), BI), pqb(K5c)))); + mZc((new nZc(), a)); + }; + var FYc, GYc, HYc, IYc, JYc, KYc, LYc, MYc, NYc; + mdb(Are, "RectPackingMetaDataProvider", 856); + bcb(1004, 1, ale, nZc); + _2.Qe = function oZc(a) { + mZc(a); + }; + var RYc, SYc, TYc, UYc, VYc, WYc, XYc, YYc, ZYc, $Yc, _Yc, aZc, bZc, cZc, dZc, eZc, fZc, gZc, hZc, iZc, jZc, kZc; + mdb(Are, "RectPackingOptions", 1004); + bcb(1005, 1, {}, pZc); + _2.$e = function qZc() { + var a; + return a = new bYc(), a; + }; + _2._e = function rZc(a) { + }; + mdb(Are, "RectPackingOptions/RectpackingFactory", 1005); + bcb(1257, 1, {}, DZc); + _2.a = 0; + _2.b = false; + _2.c = 0; + _2.d = 0; + _2.e = false; + _2.f = false; + _2.g = 0; + mdb("org.eclipse.elk.alg.rectpacking.seconditeration", "RowFillingAndCompaction", 1257); + bcb(187, 1, { 187: 1 }, PZc); + _2.a = 0; + _2.c = false; + _2.d = 0; + _2.e = 0; + _2.f = 0; + _2.g = 0; + _2.i = 0; + _2.k = false; + _2.o = Pje; + _2.p = Pje; + _2.r = 0; + _2.s = 0; + _2.t = 0; + mdb(Lre, "Block", 187); + bcb(211, 1, { 211: 1 }, VZc); + _2.a = 0; + _2.b = 0; + _2.d = 0; + _2.e = 0; + _2.f = 0; + mdb(Lre, "BlockRow", 211); + bcb(443, 1, { 443: 1 }, b$c); + _2.b = 0; + _2.c = 0; + _2.d = 0; + _2.e = 0; + _2.f = 0; + mdb(Lre, "BlockStack", 443); + bcb(220, 1, { 220: 1 }, d$c, e$c); + _2.a = 0; + _2.b = 0; + _2.c = 0; + _2.d = 0; + _2.e = 0; + var z_ = mdb(Lre, "DrawingData", 220); + bcb(355, 22, { 3: 1, 35: 1, 22: 1, 355: 1 }, l$c); + var f$c, g$c, h$c, i$c, j$c; + var y_ = ndb(Lre, "DrawingDataDescriptor", 355, CI, n$c, m$c); + var o$c; + bcb(200, 1, { 200: 1 }, x$c); + _2.b = 0; + _2.c = 0; + _2.e = 0; + _2.f = 0; + mdb(Lre, "RectRow", 200); + bcb(756, 1, {}, F$c); + _2.j = 0; + mdb(Nre, une, 756); + bcb(1245, 1, {}, G$c); + _2.Je = function H$c(a) { + return S6c(a.a, a.b); + }; + mdb(Nre, vne, 1245); + bcb(1246, 1, {}, I$c); + _2.Je = function J$c(a) { + return A$c(this.a, a); + }; + mdb(Nre, wne, 1246); + bcb(1247, 1, {}, K$c); + _2.Je = function L$c(a) { + return B$c(this.a, a); + }; + mdb(Nre, xne, 1247); + bcb(1248, 1, {}, M$c); + _2.Je = function N$c(a) { + return C$c(this.a, a); + }; + mdb(Nre, "ElkGraphImporter/lambda$3$Type", 1248); + bcb(1249, 1, {}, O$c); + _2.Je = function P$c(a) { + return D$c(this.a, a); + }; + mdb(Nre, yne, 1249); + bcb(1133, 209, Mle, Q$c); + _2.Ze = function S$c(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n; + if (ikd(a, (d0c(), c0c))) { + n = GD(hkd(a, (J0c(), I0c))); + f2 = h4c(n4c(), n); + if (f2) { + g = BD(hgd(f2.f), 209); + g.Ze(a, Udd(b, 1)); + } + } + jkd(a, Z_c, (C_c(), A_c)); + jkd(a, $_c, (N_c(), K_c)); + jkd(a, __c, (a1c(), _0c)); + h = BD(hkd(a, (J0c(), E0c)), 19).a; + Odd(b, "Overlap removal", 1); + Ccb(DD(hkd(a, D0c))) && "null45scanlineOverlaps"; + i3 = new Tqb(); + j = new U$c(i3); + d = new F$c(); + c2 = z$c(d, a); + k = true; + e = 0; + while (e < h && k) { + if (Ccb(DD(hkd(a, F0c)))) { + i3.a.$b(); + cOb(new dOb(j), c2.i); + if (i3.a.gc() == 0) { + break; + } + c2.e = i3; + } + H2c(this.b); + K2c(this.b, (Y$c(), V$c), (R0c(), Q0c)); + K2c(this.b, W$c, c2.g); + K2c(this.b, X$c, (s_c(), r_c)); + this.a = F2c(this.b, c2); + for (m = new olb(this.a); m.a < m.c.c.length; ) { + l = BD(mlb(m), 51); + l.pf(c2, Udd(b, 1)); + } + E$c(d, c2); + k = Ccb(DD(vNb(c2, (XNb(), WNb)))); + ++e; + } + y$c(d, c2); + Qdd(b); + }; + mdb(Nre, "OverlapRemovalLayoutProvider", 1133); + bcb(1134, 1, {}, U$c); + mdb(Nre, "OverlapRemovalLayoutProvider/lambda$0$Type", 1134); + bcb(437, 22, { 3: 1, 35: 1, 22: 1, 437: 1 }, Z$c); + var V$c, W$c, X$c; + var J_ = ndb(Nre, "SPOrEPhases", 437, CI, _$c, $$c); + var a_c; + bcb(1255, 1, {}, d_c); + mdb(Nre, "ShrinkTree", 1255); + bcb(1135, 209, Mle, e_c); + _2.Ze = function f_c(a, b) { + var c2, d, e, f2, g; + if (ikd(a, (d0c(), c0c))) { + g = GD(hkd(a, c0c)); + e = h4c(n4c(), g); + if (e) { + f2 = BD(hgd(e.f), 209); + f2.Ze(a, Udd(b, 1)); + } + } + d = new F$c(); + c2 = z$c(d, a); + c_c(this.a, c2, Udd(b, 1)); + y$c(d, c2); + }; + mdb(Nre, "ShrinkTreeLayoutProvider", 1135); + bcb(300, 134, { 3: 1, 300: 1, 94: 1, 134: 1 }, g_c); + _2.c = false; + mdb("org.eclipse.elk.alg.spore.graph", "Graph", 300); + bcb(482, 22, { 3: 1, 35: 1, 22: 1, 482: 1, 246: 1, 234: 1 }, k_c); + _2.Kf = function m_c() { + return j_c(this); + }; + _2.Xf = function l_c() { + return j_c(this); + }; + var h_c; + var N_ = ndb(Ore, Sle, 482, CI, o_c, n_c); + var p_c; + bcb(551, 22, { 3: 1, 35: 1, 22: 1, 551: 1, 246: 1, 234: 1 }, t_c); + _2.Kf = function v_c() { + return new I1c(); + }; + _2.Xf = function u_c() { + return new I1c(); + }; + var r_c; + var O_ = ndb(Ore, "OverlapRemovalStrategy", 551, CI, x_c, w_c); + var y_c; + bcb(430, 22, { 3: 1, 35: 1, 22: 1, 430: 1 }, D_c); + var A_c, B_c; + var P_ = ndb(Ore, "RootSelection", 430, CI, F_c, E_c); + var G_c; + bcb(316, 22, { 3: 1, 35: 1, 22: 1, 316: 1 }, O_c); + var I_c, J_c, K_c, L_c, M_c; + var Q_ = ndb(Ore, "SpanningTreeCostFunction", 316, CI, Q_c, P_c); + var R_c; + bcb(1002, 1, ale, f0c); + _2.Qe = function g0c(a) { + e0c(a); + }; + var T_c, U_c, V_c, W_c, X_c, Y_c, Z_c, $_c, __c, a0c, b0c, c0c; + mdb(Ore, "SporeCompactionOptions", 1002); + bcb(1003, 1, {}, h0c); + _2.$e = function i0c() { + var a; + return a = new e_c(), a; + }; + _2._e = function j0c(a) { + }; + mdb(Ore, "SporeCompactionOptions/SporeCompactionFactory", 1003); + bcb(855, 1, ale, B0c); + _2.Qe = function C0c(a) { + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Qre), ""), "Underlying Layout Algorithm"), "A layout algorithm that is applied to the graph before it is compacted. If this is null, nothing is applied before compaction."), (_5c(), Z5c)), ZI), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Vre), "structure"), "Structure Extraction Strategy"), "This option defines what kind of triangulation or other partitioning of the plane is applied to the vertices."), y0c), V5c), W_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Rre), $re), "Tree Construction Strategy"), "Whether a minimum spanning tree or a maximum spanning tree should be constructed."), w0c), V5c), X_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Sre), $re), "Cost Function for Spanning Tree"), "The cost function is used in the creation of the spanning tree."), u0c), V5c), Q_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tre), $re), "Root node for spanning tree construction"), "The identifier of the node that is preferred as the root of the spanning tree. If this is null, the first node is chosen."), null), Z5c), ZI), pqb(L5c)))); + o4c(a, Tre, Ure, q0c); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ure), $re), "Root selection for spanning tree"), "This sets the method used to select a root node for the construction of a spanning tree"), s0c), V5c), P_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Wre), Bpe), "Compaction Strategy"), "This option defines how the compaction is applied."), l0c), V5c), N_), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Xre), Bpe), "Orthogonal Compaction"), "Restricts the translation of nodes to orthogonal directions in the compaction phase."), (Bcb(), false)), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Yre), _re), "Upper limit for iterations of overlap removal"), null), meb(64)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zre), _re), "Whether to run a supplementary scanline overlap check."), null), true), T5c), wI), pqb(L5c)))); + K0c((new L0c(), a)); + e0c((new f0c(), a)); + }; + var k0c, l0c, m0c, n0c, o0c, p0c, q0c, r0c, s0c, t0c, u0c, v0c, w0c, x0c, y0c, z0c; + mdb(Ore, "SporeMetaDataProvider", 855); + bcb(_ie, 1, ale, L0c); + _2.Qe = function M0c(a) { + K0c(a); + }; + var D0c, E0c, F0c, G0c, H0c, I0c; + mdb(Ore, "SporeOverlapRemovalOptions", _ie); + bcb(1001, 1, {}, N0c); + _2.$e = function O0c() { + var a; + return a = new Q$c(), a; + }; + _2._e = function P0c(a) { + }; + mdb(Ore, "SporeOverlapRemovalOptions/SporeOverlapFactory", 1001); + bcb(530, 22, { 3: 1, 35: 1, 22: 1, 530: 1, 246: 1, 234: 1 }, T0c); + _2.Kf = function V0c() { + return S0c(this); + }; + _2.Xf = function U0c() { + return S0c(this); + }; + var Q0c; + var W_ = ndb(Ore, "StructureExtractionStrategy", 530, CI, X0c, W0c); + var Y0c; + bcb(429, 22, { 3: 1, 35: 1, 22: 1, 429: 1, 246: 1, 234: 1 }, c1c); + _2.Kf = function e1c() { + return b1c(this); + }; + _2.Xf = function d1c() { + return b1c(this); + }; + var $0c, _0c; + var X_ = ndb(Ore, "TreeConstructionStrategy", 429, CI, g1c, f1c); + var h1c; + bcb(1443, 1, Bqe, k1c); + _2.Yf = function l1c(a) { + return BD(a, 300), new j3c(); + }; + _2.pf = function m1c(a, b) { + j1c(BD(a, 300), b); + }; + mdb(bse, "DelaunayTriangulationPhase", 1443); + bcb(1444, 1, qie, n1c); + _2.td = function o1c(a) { + Ekb(this.a, BD(a, 65).a); + }; + mdb(bse, "DelaunayTriangulationPhase/lambda$0$Type", 1444); + bcb(783, 1, Bqe, s1c); + _2.Yf = function t1c(a) { + return BD(a, 300), new j3c(); + }; + _2.pf = function u1c(a, b) { + this.ng(BD(a, 300), b); + }; + _2.ng = function v1c(a, b) { + var c2, d, e; + Odd(b, "Minimum spanning tree construction", 1); + a.d ? d = a.d.a : d = BD(Ikb(a.i, 0), 65).a; + Ccb(DD(vNb(a, (XNb(), VNb)))) ? e = UCb(a.e, d, (c2 = a.b, c2)) : e = UCb(a.e, d, a.b); + q1c(this, e, a); + Qdd(b); + }; + mdb(cse, "MinSTPhase", 783); + bcb(1446, 783, Bqe, w1c); + _2.ng = function y1c(a, b) { + var c2, d, e, f2; + Odd(b, "Maximum spanning tree construction", 1); + c2 = new z1c(a); + a.d ? e = a.d.c : e = BD(Ikb(a.i, 0), 65).c; + Ccb(DD(vNb(a, (XNb(), VNb)))) ? f2 = UCb(a.e, e, (d = c2, d)) : f2 = UCb(a.e, e, c2); + q1c(this, f2, a); + Qdd(b); + }; + mdb(cse, "MaxSTPhase", 1446); + bcb(1447, 1, {}, z1c); + _2.Je = function A1c(a) { + return x1c(this.a, a); + }; + mdb(cse, "MaxSTPhase/lambda$0$Type", 1447); + bcb(1445, 1, qie, B1c); + _2.td = function C1c(a) { + r1c(this.a, BD(a, 65)); + }; + mdb(cse, "MinSTPhase/lambda$0$Type", 1445); + bcb(785, 1, Bqe, I1c); + _2.Yf = function J1c(a) { + return BD(a, 300), new j3c(); + }; + _2.pf = function K1c(a, b) { + H1c(this, BD(a, 300), b); + }; + _2.a = false; + mdb(dse, "GrowTreePhase", 785); + bcb(786, 1, qie, L1c); + _2.td = function M1c(a) { + G1c(this.a, this.b, this.c, BD(a, 221)); + }; + mdb(dse, "GrowTreePhase/lambda$0$Type", 786); + bcb(1448, 1, Bqe, Q1c); + _2.Yf = function R1c(a) { + return BD(a, 300), new j3c(); + }; + _2.pf = function S1c(a, b) { + P1c(this, BD(a, 300), b); + }; + mdb(dse, "ShrinkTreeCompactionPhase", 1448); + bcb(784, 1, qie, T1c); + _2.td = function U1c(a) { + O1c(this.a, this.b, this.c, BD(a, 221)); + }; + mdb(dse, "ShrinkTreeCompactionPhase/lambda$0$Type", 784); + var g2 = odb(yqe, "IGraphElementVisitor"); + bcb(860, 1, { 527: 1 }, b2c); + _2.og = function e2c(a) { + var b; + b = a2c(this, a); + tNb(b, BD(Ohb(this.b, a), 94)); + $1c(this, a, b); + }; + var V1c, W1c; + mdb(Nle, "LayoutConfigurator", 860); + var h0 = odb(Nle, "LayoutConfigurator/IPropertyHolderOptionFilter"); + bcb(932, 1, { 1933: 1 }, f2c); + _2.pg = function g2c(a, b) { + return Y1c(), !a.Xe(b); + }; + mdb(Nle, "LayoutConfigurator/lambda$0$Type", 932); + bcb(933, 1, { 1933: 1 }, i2c); + _2.pg = function j2c(a, b) { + return h2c(a, b); + }; + mdb(Nle, "LayoutConfigurator/lambda$1$Type", 933); + bcb(931, 1, { 831: 1 }, k2c); + _2.qg = function l2c(a, b) { + return Y1c(), !a.Xe(b); + }; + mdb(Nle, "LayoutConfigurator/lambda$2$Type", 931); + bcb(934, 1, Oie, m2c); + _2.Mb = function n2c(a) { + return d2c(this.a, this.b, BD(a, 1933)); + }; + mdb(Nle, "LayoutConfigurator/lambda$3$Type", 934); + bcb(858, 1, {}, w2c); + mdb(Nle, "RecursiveGraphLayoutEngine", 858); + bcb(296, 60, Tie, x2c, y2c); + mdb(Nle, "UnsupportedConfigurationException", 296); + bcb(453, 60, Tie, z2c); + mdb(Nle, "UnsupportedGraphException", 453); + bcb(754, 1, {}); + mdb(yqe, "AbstractRandomListAccessor", 754); + bcb(500, 754, {}, L2c); + _2.rg = function N2c() { + return null; + }; + _2.d = true; + _2.e = true; + _2.f = 0; + mdb(fse, "AlgorithmAssembler", 500); + bcb(1236, 1, Oie, O2c); + _2.Mb = function P2c(a) { + return !!BD(a, 123); + }; + mdb(fse, "AlgorithmAssembler/lambda$0$Type", 1236); + bcb(1237, 1, {}, Q2c); + _2.Kb = function R2c(a) { + return M2c(this.a, BD(a, 123)); + }; + mdb(fse, "AlgorithmAssembler/lambda$1$Type", 1237); + bcb(1238, 1, Oie, S2c); + _2.Mb = function T2c(a) { + return !!BD(a, 80); + }; + mdb(fse, "AlgorithmAssembler/lambda$2$Type", 1238); + bcb(1239, 1, qie, U2c); + _2.td = function V2c(a) { + d3c(this.a, BD(a, 80)); + }; + mdb(fse, "AlgorithmAssembler/lambda$3$Type", 1239); + bcb(1240, 1, qie, W2c); + _2.td = function X2c(a) { + G2c(this.a, this.b, BD(a, 234)); + }; + mdb(fse, "AlgorithmAssembler/lambda$4$Type", 1240); + bcb(1355, 1, Dke, Z2c); + _2.ue = function $2c(a, b) { + return Y2c(BD(a, 234), BD(b, 234)); + }; + _2.Fb = function _2c(a) { + return this === a; + }; + _2.ve = function a3c() { + return new tpb(this); + }; + mdb(fse, "EnumBasedFactoryComparator", 1355); + bcb(80, 754, { 80: 1 }, j3c); + _2.rg = function l3c() { + return new Tqb(); + }; + _2.a = 0; + mdb(fse, "LayoutProcessorConfiguration", 80); + bcb(1013, 1, { 527: 1 }, q3c); + _2.og = function u3c(a) { + stb(n3c, new z3c(a)); + }; + var m3c, n3c, o3c; + mdb(Xke, "DeprecatedLayoutOptionReplacer", 1013); + bcb(1014, 1, qie, v3c); + _2.td = function w3c(a) { + r3c(BD(a, 160)); + }; + mdb(Xke, "DeprecatedLayoutOptionReplacer/lambda$0$Type", 1014); + bcb(1015, 1, qie, x3c); + _2.td = function y3c(a) { + s3c(BD(a, 160)); + }; + mdb(Xke, "DeprecatedLayoutOptionReplacer/lambda$1$Type", 1015); + bcb(1016, 1, {}, z3c); + _2.Od = function A3c(a, b) { + t3c(this.a, BD(a, 146), BD(b, 38)); + }; + mdb(Xke, "DeprecatedLayoutOptionReplacer/lambda$2$Type", 1016); + bcb(149, 1, { 686: 1, 149: 1 }, E3c); + _2.Fb = function F3c(a) { + return C3c(this, a); + }; + _2.sg = function G3c() { + return this.b; + }; + _2.tg = function H3c() { + return this.c; + }; + _2.ne = function I3c() { + return this.e; + }; + _2.Hb = function J3c() { + return LCb(this.c); + }; + _2.Ib = function K3c() { + return "Layout Algorithm: " + this.c; + }; + var E0 = mdb(Xke, "LayoutAlgorithmData", 149); + bcb(263, 1, {}, R3c); + mdb(Xke, "LayoutAlgorithmData/Builder", 263); + bcb(1017, 1, { 527: 1 }, U3c); + _2.og = function V3c(a) { + JD(a, 239) && !Ccb(DD(a.We((Y9c(), d9c)))) && S3c(BD(a, 33)); + }; + mdb(Xke, "LayoutAlgorithmResolver", 1017); + bcb(229, 1, { 686: 1, 229: 1 }, W3c); + _2.Fb = function X3c(a) { + if (JD(a, 229)) { + return dfb(this.b, BD(a, 229).b); + } + return false; + }; + _2.sg = function Y3c() { + return this.a; + }; + _2.tg = function Z3c() { + return this.b; + }; + _2.ne = function $3c() { + return this.d; + }; + _2.Hb = function _3c() { + return LCb(this.b); + }; + _2.Ib = function a4c() { + return "Layout Type: " + this.b; + }; + mdb(Xke, "LayoutCategoryData", 229); + bcb(344, 1, {}, e4c); + mdb(Xke, "LayoutCategoryData/Builder", 344); + bcb(867, 1, {}, m4c); + var f4c; + mdb(Xke, "LayoutMetaDataService", 867); + bcb(868, 1, {}, v4c); + mdb(Xke, "LayoutMetaDataService/Registry", 868); + bcb(478, 1, { 478: 1 }, w4c); + mdb(Xke, "LayoutMetaDataService/Registry/Triple", 478); + bcb(869, 1, gse, x4c); + _2.ug = function y4c() { + return new d7c(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$0$Type", 869); + bcb(870, 1, hse, z4c); + _2.vg = function A4c(a) { + return R6c(BD(a, 8)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$1$Type", 870); + bcb(879, 1, gse, B4c); + _2.ug = function C4c() { + return new Rkb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$10$Type", 879); + bcb(880, 1, hse, D4c); + _2.vg = function E4c(a) { + return new Tkb(BD(a, 12)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$11$Type", 880); + bcb(881, 1, gse, F4c); + _2.ug = function G4c() { + return new Psb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$12$Type", 881); + bcb(882, 1, hse, H4c); + _2.vg = function I4c(a) { + return Ru(BD(a, 68)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$13$Type", 882); + bcb(883, 1, gse, J4c); + _2.ug = function K4c() { + return new Tqb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$14$Type", 883); + bcb(884, 1, hse, L4c); + _2.vg = function M4c(a) { + return Dx(BD(a, 53)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$15$Type", 884); + bcb(885, 1, gse, N4c); + _2.ug = function O4c() { + return new zsb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$16$Type", 885); + bcb(886, 1, hse, P4c); + _2.vg = function Q4c(a) { + return Gx(BD(a, 53)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$17$Type", 886); + bcb(887, 1, gse, R4c); + _2.ug = function S4c() { + return new Gxb(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$18$Type", 887); + bcb(888, 1, hse, T4c); + _2.vg = function U4c(a) { + return Hx(BD(a, 208)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$19$Type", 888); + bcb(871, 1, gse, V4c); + _2.ug = function W4c() { + return new s7c(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$2$Type", 871); + bcb(872, 1, hse, X4c); + _2.vg = function Y4c(a) { + return new t7c(BD(a, 74)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$3$Type", 872); + bcb(873, 1, gse, Z4c); + _2.ug = function $4c() { + return new H_b(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$4$Type", 873); + bcb(874, 1, hse, _4c); + _2.vg = function a5c(a) { + return new K_b(BD(a, 142)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$5$Type", 874); + bcb(875, 1, gse, b5c); + _2.ug = function c5c() { + return new p0b(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$6$Type", 875); + bcb(876, 1, hse, d5c); + _2.vg = function e5c(a) { + return new r0b(BD(a, 116)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$7$Type", 876); + bcb(877, 1, gse, f5c); + _2.ug = function g5c() { + return new _fd(); + }; + mdb(Xke, "LayoutMetaDataService/lambda$8$Type", 877); + bcb(878, 1, hse, h5c); + _2.vg = function i5c(a) { + return new agd(BD(a, 373)); + }; + mdb(Xke, "LayoutMetaDataService/lambda$9$Type", 878); + var Q3 = odb(Hle, "IProperty"); + bcb(23, 1, { 35: 1, 686: 1, 23: 1, 146: 1 }, p5c); + _2.wd = function q5c(a) { + return k5c(this, BD(a, 146)); + }; + _2.Fb = function r5c(a) { + return JD(a, 23) ? dfb(this.f, BD(a, 23).f) : JD(a, 146) && dfb(this.f, BD(a, 146).tg()); + }; + _2.wg = function s5c() { + var a; + if (JD(this.b, 4)) { + a = fvd(this.b); + if (a == null) { + throw vbb(new Zdb(mse + this.f + "'. Make sure it's type is registered with the " + (fdb(Y3), Y3.k) + jse)); + } + return a; + } else { + return this.b; + } + }; + _2.sg = function t5c() { + return this.d; + }; + _2.tg = function u5c() { + return this.f; + }; + _2.ne = function v5c() { + return this.i; + }; + _2.Hb = function w5c() { + return LCb(this.f); + }; + _2.Ib = function x5c() { + return "Layout Option: " + this.f; + }; + mdb(Xke, "LayoutOptionData", 23); + bcb(24, 1, {}, H5c); + mdb(Xke, "LayoutOptionData/Builder", 24); + bcb(175, 22, { 3: 1, 35: 1, 22: 1, 175: 1 }, O5c); + var I5c, J5c, K5c, L5c, M5c; + var e1 = ndb(Xke, "LayoutOptionData/Target", 175, CI, Q5c, P5c); + var R5c; + bcb(277, 22, { 3: 1, 35: 1, 22: 1, 277: 1 }, a6c); + var T5c, U5c, V5c, W5c, X5c, Y5c, Z5c, $5c; + var f1 = ndb(Xke, "LayoutOptionData/Type", 277, CI, c6c, b6c); + var d6c; + var f6c; + var h6c; + bcb(110, 1, { 110: 1 }, I6c, J6c, K6c); + _2.Fb = function L6c(a) { + var b; + if (a == null || !JD(a, 110)) { + return false; + } + b = BD(a, 110); + return wtb(this.c, b.c) && wtb(this.d, b.d) && wtb(this.b, b.b) && wtb(this.a, b.a); + }; + _2.Hb = function M6c() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [this.c, this.d, this.b, this.a])); + }; + _2.Ib = function N6c() { + return "Rect[x=" + this.c + ",y=" + this.d + ",w=" + this.b + ",h=" + this.a + "]"; + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + _2.d = 0; + mdb(pne, "ElkRectangle", 110); + bcb(8, 1, { 3: 1, 4: 1, 8: 1, 414: 1 }, d7c, e7c, f7c, g7c); + _2.Fb = function h7c(a) { + return T6c(this, a); + }; + _2.Hb = function i7c() { + return Hdb(this.a) + jeb(Hdb(this.b)); + }; + _2.Jf = function k7c(b) { + var c2, d, e, f2; + e = 0; + while (e < b.length && j7c((BCb(e, b.length), b.charCodeAt(e)), mne)) { + ++e; + } + c2 = b.length; + while (c2 > 0 && j7c((BCb(c2 - 1, b.length), b.charCodeAt(c2 - 1)), nne)) { + --c2; + } + if (e >= c2) { + throw vbb(new Wdb("The given string does not contain any numbers.")); + } + f2 = mfb(b.substr(e, c2 - e), ",|;|\r|\n"); + if (f2.length != 2) { + throw vbb(new Wdb("Exactly two numbers are expected, " + f2.length + " were found.")); + } + try { + this.a = Hcb(ufb(f2[0])); + this.b = Hcb(ufb(f2[1])); + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + d = a; + throw vbb(new Wdb(one2 + d)); + } else + throw vbb(a); + } + }; + _2.Ib = function m7c() { + return "(" + this.a + "," + this.b + ")"; + }; + _2.a = 0; + _2.b = 0; + var m1 = mdb(pne, "KVector", 8); + bcb(74, 68, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 68: 1, 15: 1, 74: 1, 414: 1 }, s7c, t7c, u7c); + _2.Pc = function x7c() { + return r7c(this); + }; + _2.Jf = function v7c(b) { + var c2, d, e, f2, g, h; + e = mfb(b, ",|;|\\(|\\)|\\[|\\]|\\{|\\}| | |\n"); + Osb(this); + try { + d = 0; + g = 0; + f2 = 0; + h = 0; + while (d < e.length) { + if (e[d] != null && ufb(e[d]).length > 0) { + g % 2 == 0 ? f2 = Hcb(e[d]) : h = Hcb(e[d]); + g > 0 && g % 2 != 0 && Dsb(this, new f7c(f2, h)); + ++g; + } + ++d; + } + } catch (a) { + a = ubb(a); + if (JD(a, 127)) { + c2 = a; + throw vbb(new Wdb("The given string does not match the expected format for vectors." + c2)); + } else + throw vbb(a); + } + }; + _2.Ib = function y7c() { + var a, b, c2; + a = new Wfb("("); + b = Jsb(this, 0); + while (b.b != b.d.c) { + c2 = BD(Xsb(b), 8); + Qfb(a, c2.a + "," + c2.b); + b.b != b.d.c && (a.a += "; ", a); + } + return (a.a += ")", a).a; + }; + var l1 = mdb(pne, "KVectorChain", 74); + bcb(248, 22, { 3: 1, 35: 1, 22: 1, 248: 1 }, G7c); + var z7c, A7c, B7c, C7c, D7c, E7c; + var o1 = ndb(ose, "Alignment", 248, CI, I7c, H7c); + var J7c; + bcb(979, 1, ale, Z7c); + _2.Qe = function $7c(a) { + Y7c(a); + }; + var L7c, M7c, N7c, O7c, P7c, Q7c, R7c, S7c, T7c, U7c, V7c, W7c; + mdb(ose, "BoxLayouterOptions", 979); + bcb(980, 1, {}, _7c); + _2.$e = function a8c() { + var a; + return a = new ged(), a; + }; + _2._e = function b8c(a) { + }; + mdb(ose, "BoxLayouterOptions/BoxFactory", 980); + bcb(291, 22, { 3: 1, 35: 1, 22: 1, 291: 1 }, j8c); + var c8c, d8c, e8c, f8c, g8c, h8c; + var r1 = ndb(ose, "ContentAlignment", 291, CI, l8c, k8c); + var m8c; + bcb(684, 1, ale, Z9c); + _2.Qe = function $9c(a) { + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), sse), ""), "Layout Algorithm"), "Select a specific layout algorithm."), (_5c(), Z5c)), ZI), pqb((N5c(), L5c))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), tse), ""), "Resolved Layout Algorithm"), "Meta data associated with the selected algorithm."), Y5c), E0), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $pe), ""), "Alignment"), "Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."), q8c), V5c), o1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), _le), ""), "Aspect Ratio"), "The desired aspect ratio of the drawing, that is the quotient of width by height."), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), use), ""), "Bend Points"), "A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."), Y5c), l1), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), lqe), ""), "Content Alignment"), "Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."), x8c), W5c), r1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zpe), ""), "Debug Mode"), "Whether additional debug information shall be generated."), (Bcb(), false)), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), cqe), ""), Cle), "Overall direction of edges: horizontal (right / left) or vertical (down / up)."), A8c), V5c), t12), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ype), ""), "Edge Routing"), "What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."), F8c), V5c), v1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Jre), ""), "Expand Nodes"), "If active, nodes are expanded to fill the area of their parent."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), tpe), ""), "Hierarchy Handling"), "Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."), K8c), V5c), z1), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), ame), ""), "Padding"), "The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."), g9c), Y5c), j1), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ame), ""), "Interactive"), "Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xqe), ""), "interactive Layout"), "Whether the graph should be changeable interactively and by setting constraints"), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Dme), ""), "Omit Node Micro Layout"), "Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Bme), ""), "Port Constraints"), "Defines constraints of the position of the ports of a node."), u9c), V5c), D1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), uqe), ""), "Position"), "The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."), Y5c), m1), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [M5c, J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), vme), ""), "Priority"), "Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."), X5c), JI), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [I5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), yme), ""), "Randomization Seed"), "Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), zme), ""), "Separate Connected Components"), "Whether each connected component should be processed separately."), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), mqe), ""), "Junction Points"), "This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."), R8c), Y5c), l1), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), pqe), ""), "Comment Box"), "Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), qqe), ""), "Hypernode"), "Whether the node should be handled as a hypernode."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), vse), ""), "Label Manager"), "Label managers can shorten labels upon a layout algorithm's request."), Y5c), h1), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), vqe), ""), "Margins"), "Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."), T8c), Y5c), i1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Xpe), ""), "No Layout"), "No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."), false), T5c), wI), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [I5c, M5c, J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), wse), ""), "Scale Factor"), "The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."), 1), U5c), BI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xse), ""), "Animate"), "Whether the shift from the old layout to the new computed layout shall be animated."), true), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), yse), ""), "Animation Time Factor"), "Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."), meb(100)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), zse), ""), "Layout Ancestors"), "Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ase), ""), "Maximal Animation Time"), "The maximal time for animations, in milliseconds."), meb(4e3)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Bse), ""), "Minimal Animation Time"), "The minimal time for animations, in milliseconds."), meb(400)), X5c), JI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Cse), ""), "Progress Bar"), "Whether a progress bar shall be displayed during layout computations."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Dse), ""), "Validate Graph"), "Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ese), ""), "Validate Options"), "Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."), true), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Fse), ""), "Zoom to Fit"), "Whether the zoom level shall be set to view the whole diagram after layout."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), rse), "box"), "Box Layout Mode"), "Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."), u8c), V5c), O1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Lpe), zpe), "Comment Comment Spacing"), "Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Mpe), zpe), "Comment Node Spacing"), "Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Zle), zpe), "Components Spacing"), "Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."), 20), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Npe), zpe), "Edge Spacing"), "Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), xme), zpe), "Edge Label Spacing"), "The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."), 2), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ope), zpe), "Edge Node Spacing"), "Spacing to be preserved between nodes and edges."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ppe), zpe), "Label Spacing"), "Determines the amount of space to be left between two labels of the same graph element."), 0), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Spe), zpe), "Label Node Spacing"), "Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."), 5), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Qpe), zpe), "Horizontal spacing between Label and Port"), "Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Rpe), zpe), "Vertical spacing between Label and Port"), "Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), wme), zpe), "Node Spacing"), "The minimal distance to be preserved between each two nodes."), 20), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tpe), zpe), "Node Self Loop Spacing"), "Spacing to be preserved between a node and its self loops."), 10), U5c), BI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Upe), zpe), "Port Spacing"), "Spacing between pairs of ports of the same node."), 10), U5c), BI), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Vpe), zpe), "Individual Spacing"), "Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."), Y5c), i2), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [I5c, M5c, J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), wqe), zpe), "Additional Port Space"), "Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."), W9c), Y5c), i1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), tqe), Jse), "Layout Partition"), "Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."), X5c), JI), qqb(L5c, OC(GC(e1, 1), Kie, 175, 0, [K5c]))))); + o4c(a, tqe, sqe, k9c); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), sqe), Jse), "Layout Partitioning"), "Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."), i9c), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), dqe), Kse), "Node Label Padding"), "Define padding for node labels that are placed inside of a node."), V8c), Y5c), j1), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Gme), Kse), "Node Label Placement"), "Hints for where node labels are to be placed; if empty, the node label's position is not modified."), X8c), W5c), B1), qqb(K5c, OC(GC(e1, 1), Kie, 175, 0, [J5c]))))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), gqe), Lse), "Port Alignment"), "Defines the default port distribution for a node. May be overridden for each side individually."), m9c), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), hqe), Lse), "Port Alignment (North)"), "Defines how ports on the northern side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), iqe), Lse), "Port Alignment (South)"), "Defines how ports on the southern side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), jqe), Lse), "Port Alignment (West)"), "Defines how ports on the western side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), kqe), Lse), "Port Alignment (East)"), "Defines how ports on the eastern side are placed, overriding the node's general port alignment."), V5c), C1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Fme), Mse), "Node Size Constraints"), "What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."), Z8c), W5c), I1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Eme), Mse), "Node Size Options"), "Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."), c9c), W5c), J1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Tme), Mse), "Node Size Minimum"), "The minimal size to which a node can be reduced."), a9c), Y5c), m1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), bqe), Mse), "Fixed Graph Size"), "By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."), false), T5c), wI), pqb(L5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), nqe), Jpe), "Edge Label Placement"), "Gives a hint on where to put edge labels."), D8c), V5c), u1), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Cme), Jpe), "Inline Edge Labels"), "If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."), false), T5c), wI), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Gse), "font"), "Font Name"), "Font name used for a label."), Z5c), ZI), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Hse), "font"), "Font Size"), "Font size used for a label."), X5c), JI), pqb(J5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), rqe), Nse), "Port Anchor Offset"), "The offset to the port position where connections shall be attached."), Y5c), m1), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), oqe), Nse), "Port Index"), "The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."), X5c), JI), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ype), Nse), "Port Side"), "The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."), B9c), V5c), F1), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c(), Wpe), Nse), "Port Border Offset"), "The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."), U5c), BI), pqb(M5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Hme), Ose), "Port Label Placement"), "Decides on a placement method for port labels; if empty, the node label's position is not modified."), y9c), W5c), E1), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), eqe), Ose), "Port Labels Next to Port"), "Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), fqe), Ose), "Treat Port Labels as Group"), "If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."), true), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), _pe), Pse), "Activate Inside Self Loops"), "Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."), false), T5c), wI), pqb(K5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), aqe), Pse), "Inside Self Loop"), "Whether a self loop should be routed inside a node instead of around that node."), false), T5c), wI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), $le), "edge"), "Edge Thickness"), "The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."), 1), U5c), BI), pqb(I5c)))); + t4c(a, new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c(), Ise), "edge"), "Edge Type"), "The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."), H8c), V5c), w1), pqb(I5c)))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), sne), "Layered"), 'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), "org.eclipse.elk.orthogonal"), "Orthogonal"), `Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), ume), "Force"), "Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), "org.eclipse.elk.circle"), "Circle"), "Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), bre), "Tree"), "Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), "org.eclipse.elk.planar"), "Planar"), "Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))); + s4c(a, new W3c(b4c(d4c(c4c(new e4c(), sre), "Radial"), "Radial layout algorithms usually position the nodes of the graph on concentric circles."))); + $ad((new _ad(), a)); + Y7c((new Z7c(), a)); + jdd((new kdd(), a)); + }; + var o8c, p8c, q8c, r8c, s8c, t8c, u8c, v8c, w8c, x8c, y8c, z8c, A8c, B8c, C8c, D8c, E8c, F8c, G8c, H8c, I8c, J8c, K8c, L8c, M8c, N8c, O8c, P8c, Q8c, R8c, S8c, T8c, U8c, V8c, W8c, X8c, Y8c, Z8c, $8c, _8c, a9c, b9c, c9c, d9c, e9c, f9c, g9c, h9c, i9c, j9c, k9c, l9c, m9c, n9c, o9c, p9c, q9c, r9c, s9c, t9c, u9c, v9c, w9c, x9c, y9c, z9c, A9c, B9c, C9c, D9c, E9c, F9c, G9c, H9c, I9c, J9c, K9c, L9c, M9c, N9c, O9c, P9c, Q9c, R9c, S9c, T9c, U9c, V9c, W9c, X9c; + mdb(ose, "CoreOptions", 684); + bcb(103, 22, { 3: 1, 35: 1, 22: 1, 103: 1 }, iad); + var _9c, aad, bad, cad, dad; + var t12 = ndb(ose, Cle, 103, CI, kad, jad); + var lad; + bcb(272, 22, { 3: 1, 35: 1, 22: 1, 272: 1 }, rad); + var nad, oad, pad2; + var u1 = ndb(ose, "EdgeLabelPlacement", 272, CI, tad, sad); + var uad; + bcb(218, 22, { 3: 1, 35: 1, 22: 1, 218: 1 }, Bad); + var wad, xad, yad, zad; + var v1 = ndb(ose, "EdgeRouting", 218, CI, Dad, Cad); + var Ead; + bcb(312, 22, { 3: 1, 35: 1, 22: 1, 312: 1 }, Nad); + var Gad, Had, Iad, Jad, Kad, Lad; + var w1 = ndb(ose, "EdgeType", 312, CI, Pad, Oad); + var Qad; + bcb(977, 1, ale, _ad); + _2.Qe = function abd(a) { + $ad(a); + }; + var Sad, Tad, Uad, Vad, Wad, Xad, Yad; + mdb(ose, "FixedLayouterOptions", 977); + bcb(978, 1, {}, bbd); + _2.$e = function cbd() { + var a; + return a = new Zfd(), a; + }; + _2._e = function dbd(a) { + }; + mdb(ose, "FixedLayouterOptions/FixedFactory", 978); + bcb(334, 22, { 3: 1, 35: 1, 22: 1, 334: 1 }, ibd); + var ebd, fbd, gbd; + var z1 = ndb(ose, "HierarchyHandling", 334, CI, kbd, jbd); + var lbd; + bcb(285, 22, { 3: 1, 35: 1, 22: 1, 285: 1 }, tbd); + var nbd, obd, pbd, qbd; + var A1 = ndb(ose, "LabelSide", 285, CI, vbd, ubd); + var wbd; + bcb(93, 22, { 3: 1, 35: 1, 22: 1, 93: 1 }, Ibd); + var ybd, zbd, Abd, Bbd, Cbd, Dbd, Ebd, Fbd, Gbd; + var B1 = ndb(ose, "NodeLabelPlacement", 93, CI, Lbd, Kbd); + var Mbd; + bcb(249, 22, { 3: 1, 35: 1, 22: 1, 249: 1 }, Ubd); + var Obd, Pbd, Qbd, Rbd, Sbd; + var C1 = ndb(ose, "PortAlignment", 249, CI, Wbd, Vbd); + var Xbd; + bcb(98, 22, { 3: 1, 35: 1, 22: 1, 98: 1 }, gcd); + var Zbd, $bd, _bd, acd, bcd, ccd; + var D1 = ndb(ose, "PortConstraints", 98, CI, icd, hcd); + var jcd; + bcb(273, 22, { 3: 1, 35: 1, 22: 1, 273: 1 }, scd); + var lcd, mcd, ncd, ocd, pcd, qcd; + var E1 = ndb(ose, "PortLabelPlacement", 273, CI, wcd, vcd); + var xcd; + bcb(61, 22, { 3: 1, 35: 1, 22: 1, 61: 1 }, Ycd); + var zcd, Acd, Bcd, Ccd, Dcd, Ecd, Fcd, Gcd, Hcd, Icd, Jcd, Kcd, Lcd, Mcd, Ncd, Ocd, Pcd, Qcd, Rcd, Scd, Tcd; + var F1 = ndb(ose, "PortSide", 61, CI, _cd, $cd); + var bdd; + bcb(981, 1, ale, kdd); + _2.Qe = function ldd(a) { + jdd(a); + }; + var ddd, edd, fdd, gdd, hdd; + mdb(ose, "RandomLayouterOptions", 981); + bcb(982, 1, {}, mdd); + _2.$e = function ndd() { + var a; + return a = new Mgd(), a; + }; + _2._e = function odd(a) { + }; + mdb(ose, "RandomLayouterOptions/RandomFactory", 982); + bcb(374, 22, { 3: 1, 35: 1, 22: 1, 374: 1 }, udd); + var pdd, qdd, rdd, sdd; + var I1 = ndb(ose, "SizeConstraint", 374, CI, wdd, vdd); + var xdd; + bcb(259, 22, { 3: 1, 35: 1, 22: 1, 259: 1 }, Jdd); + var zdd, Add, Bdd, Cdd, Ddd, Edd, Fdd, Gdd, Hdd; + var J1 = ndb(ose, "SizeOptions", 259, CI, Ldd, Kdd); + var Mdd; + bcb(370, 1, { 1949: 1 }, Zdd); + _2.b = false; + _2.c = 0; + _2.d = -1; + _2.e = null; + _2.f = null; + _2.g = -1; + _2.j = false; + _2.k = false; + _2.n = false; + _2.o = 0; + _2.q = 0; + _2.r = 0; + mdb(yqe, "BasicProgressMonitor", 370); + bcb(972, 209, Mle, ged); + _2.Ze = function ked(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + Odd(b, "Box layout", 2); + e = Gdb(ED(hkd(a, (X7c(), W7c)))); + f2 = BD(hkd(a, T7c), 116); + c2 = Ccb(DD(hkd(a, O7c))); + d = Ccb(DD(hkd(a, P7c))); + switch (BD(hkd(a, M7c), 311).g) { + case 0: + g = (h = new Tkb((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)), mmb(), Okb(h, new med(d)), h); + i3 = rfd(a); + j = ED(hkd(a, L7c)); + (j == null || (uCb(j), j) <= 0) && (j = 1.3); + k = ded(g, e, f2, i3.a, i3.b, c2, (uCb(j), j)); + Afd(a, k.a, k.b, false, true); + break; + default: + eed(a, e, f2, c2); + } + Qdd(b); + }; + mdb(yqe, "BoxLayoutProvider", 972); + bcb(973, 1, Dke, med); + _2.ue = function ned(a, b) { + return led(this, BD(a, 33), BD(b, 33)); + }; + _2.Fb = function oed(a) { + return this === a; + }; + _2.ve = function ped() { + return new tpb(this); + }; + _2.a = false; + mdb(yqe, "BoxLayoutProvider/1", 973); + bcb(157, 1, { 157: 1 }, wed, xed); + _2.Ib = function yed() { + return this.c ? _od(this.c) : Fe(this.b); + }; + mdb(yqe, "BoxLayoutProvider/Group", 157); + bcb(311, 22, { 3: 1, 35: 1, 22: 1, 311: 1 }, Eed); + var zed, Aed, Bed, Ced; + var O1 = ndb(yqe, "BoxLayoutProvider/PackingMode", 311, CI, Ged, Fed); + var Hed; + bcb(974, 1, Dke, Jed); + _2.ue = function Ked(a, b) { + return hed(BD(a, 157), BD(b, 157)); + }; + _2.Fb = function Led(a) { + return this === a; + }; + _2.ve = function Med() { + return new tpb(this); + }; + mdb(yqe, "BoxLayoutProvider/lambda$0$Type", 974); + bcb(975, 1, Dke, Ned); + _2.ue = function Oed(a, b) { + return ied(BD(a, 157), BD(b, 157)); + }; + _2.Fb = function Ped(a) { + return this === a; + }; + _2.ve = function Qed() { + return new tpb(this); + }; + mdb(yqe, "BoxLayoutProvider/lambda$1$Type", 975); + bcb(976, 1, Dke, Red); + _2.ue = function Sed(a, b) { + return jed(BD(a, 157), BD(b, 157)); + }; + _2.Fb = function Ted(a) { + return this === a; + }; + _2.ve = function Ued() { + return new tpb(this); + }; + mdb(yqe, "BoxLayoutProvider/lambda$2$Type", 976); + bcb(1365, 1, { 831: 1 }, Ved); + _2.qg = function Wed(a, b) { + return Vyc(), !JD(b, 160) || h2c((Y1c(), BD(a, 160)), b); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type", 1365); + bcb(1366, 1, qie, Xed); + _2.td = function Yed(a) { + Yyc(this.a, BD(a, 146)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type", 1366); + bcb(1367, 1, qie, Zed); + _2.td = function $ed(a) { + BD(a, 94); + Vyc(); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type", 1367); + bcb(1371, 1, qie, _ed); + _2.td = function afd(a) { + Zyc(this.a, BD(a, 94)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type", 1371); + bcb(1369, 1, Oie, bfd); + _2.Mb = function cfd(a) { + return $yc(this.a, this.b, BD(a, 146)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type", 1369); + bcb(1368, 1, Oie, dfd); + _2.Mb = function efd(a) { + return azc(this.a, this.b, BD(a, 831)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type", 1368); + bcb(1370, 1, qie, ffd); + _2.td = function gfd(a) { + _yc(this.a, this.b, BD(a, 146)); + }; + mdb(yqe, "ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type", 1370); + bcb(935, 1, {}, Hfd); + _2.Kb = function Ifd(a) { + return Gfd(a); + }; + _2.Fb = function Jfd(a) { + return this === a; + }; + mdb(yqe, "ElkUtil/lambda$0$Type", 935); + bcb(936, 1, qie, Kfd); + _2.td = function Lfd(a) { + ufd(this.a, this.b, BD(a, 79)); + }; + _2.a = 0; + _2.b = 0; + mdb(yqe, "ElkUtil/lambda$1$Type", 936); + bcb(937, 1, qie, Mfd); + _2.td = function Nfd(a) { + vfd(this.a, this.b, BD(a, 202)); + }; + _2.a = 0; + _2.b = 0; + mdb(yqe, "ElkUtil/lambda$2$Type", 937); + bcb(938, 1, qie, Ofd); + _2.td = function Pfd(a) { + wfd(this.a, this.b, BD(a, 137)); + }; + _2.a = 0; + _2.b = 0; + mdb(yqe, "ElkUtil/lambda$3$Type", 938); + bcb(939, 1, qie, Qfd); + _2.td = function Rfd(a) { + xfd(this.a, BD(a, 469)); + }; + mdb(yqe, "ElkUtil/lambda$4$Type", 939); + bcb(342, 1, { 35: 1, 342: 1 }, Tfd); + _2.wd = function Ufd(a) { + return Sfd(this, BD(a, 236)); + }; + _2.Fb = function Vfd(a) { + var b; + if (JD(a, 342)) { + b = BD(a, 342); + return this.a == b.a; + } + return false; + }; + _2.Hb = function Wfd() { + return QD(this.a); + }; + _2.Ib = function Xfd() { + return this.a + " (exclusive)"; + }; + _2.a = 0; + mdb(yqe, "ExclusiveBounds/ExclusiveLowerBound", 342); + bcb(1138, 209, Mle, Zfd); + _2.Ze = function $fd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r, s, t, u, v, w2, A, B; + Odd(b, "Fixed Layout", 1); + f2 = BD(hkd(a, (Y9c(), E8c)), 218); + l = 0; + m = 0; + for (s = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); s.e != s.i.gc(); ) { + q = BD(Dyd(s), 33); + B = BD(hkd(q, (Zad(), Yad)), 8); + if (B) { + bld(q, B.a, B.b); + if (BD(hkd(q, Tad), 174).Hc((tdd(), pdd))) { + n = BD(hkd(q, Vad), 8); + n.a > 0 && n.b > 0 && Afd(q, n.a, n.b, true, true); + } + } + l = $wnd.Math.max(l, q.i + q.g); + m = $wnd.Math.max(m, q.j + q.f); + for (j = new Fyd((!q.n && (q.n = new cUd(D2, q, 1, 7)), q.n)); j.e != j.i.gc(); ) { + h = BD(Dyd(j), 137); + B = BD(hkd(h, Yad), 8); + !!B && bld(h, B.a, B.b); + l = $wnd.Math.max(l, q.i + h.i + h.g); + m = $wnd.Math.max(m, q.j + h.j + h.f); + } + for (v = new Fyd((!q.c && (q.c = new cUd(F2, q, 9, 9)), q.c)); v.e != v.i.gc(); ) { + u = BD(Dyd(v), 118); + B = BD(hkd(u, Yad), 8); + !!B && bld(u, B.a, B.b); + w2 = q.i + u.i; + A = q.j + u.j; + l = $wnd.Math.max(l, w2 + u.g); + m = $wnd.Math.max(m, A + u.f); + for (i3 = new Fyd((!u.n && (u.n = new cUd(D2, u, 1, 7)), u.n)); i3.e != i3.i.gc(); ) { + h = BD(Dyd(i3), 137); + B = BD(hkd(h, Yad), 8); + !!B && bld(h, B.a, B.b); + l = $wnd.Math.max(l, w2 + h.i + h.g); + m = $wnd.Math.max(m, A + h.j + h.f); + } + } + for (e = new Sr(ur(_sd(q).a.Kc(), new Sq())); Qr(e); ) { + c2 = BD(Rr(e), 79); + k = Yfd(c2); + l = $wnd.Math.max(l, k.a); + m = $wnd.Math.max(m, k.b); + } + for (d = new Sr(ur($sd(q).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 79); + if (Xod(jtd(c2)) != a) { + k = Yfd(c2); + l = $wnd.Math.max(l, k.a); + m = $wnd.Math.max(m, k.b); + } + } + } + if (f2 == (Aad(), wad)) { + for (r = new Fyd((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a)); r.e != r.i.gc(); ) { + q = BD(Dyd(r), 33); + for (d = new Sr(ur(_sd(q).a.Kc(), new Sq())); Qr(d); ) { + c2 = BD(Rr(d), 79); + g = pfd(c2); + g.b == 0 ? jkd(c2, Q8c, null) : jkd(c2, Q8c, g); + } + } + } + if (!Ccb(DD(hkd(a, (Zad(), Uad))))) { + t = BD(hkd(a, Wad), 116); + p = l + t.b + t.c; + o2 = m + t.d + t.a; + Afd(a, p, o2, true, true); + } + Qdd(b); + }; + mdb(yqe, "FixedLayoutProvider", 1138); + bcb(373, 134, { 3: 1, 414: 1, 373: 1, 94: 1, 134: 1 }, _fd, agd); + _2.Jf = function dgd(b) { + var c2, d, e, f2, g, h, i3, j, k; + if (!b) { + return; + } + try { + j = mfb(b, ";,;"); + for (g = j, h = 0, i3 = g.length; h < i3; ++h) { + f2 = g[h]; + d = mfb(f2, "\\:"); + e = k4c(n4c(), d[0]); + if (!e) { + throw vbb(new Wdb("Invalid option id: " + d[0])); + } + k = o5c(e, d[1]); + if (k == null) { + throw vbb(new Wdb("Invalid option value: " + d[1])); + } + k == null ? (!this.q && (this.q = new Lqb()), Thb(this.q, e)) : (!this.q && (this.q = new Lqb()), Rhb(this.q, e, k)); + } + } catch (a) { + a = ubb(a); + if (JD(a, 102)) { + c2 = a; + throw vbb(new Xdb(c2)); + } else + throw vbb(a); + } + }; + _2.Ib = function egd() { + var a; + a = GD(GAb(NAb((!this.q ? (mmb(), mmb(), kmb) : this.q).vc().Oc(), new fgd()), Ayb(new pzb(), new nzb(), new Zyb(), new _yb(), OC(GC(xL, 1), Kie, 132, 0, [])))); + return a; + }; + var i2 = mdb(yqe, "IndividualSpacings", 373); + bcb(971, 1, {}, fgd); + _2.Kb = function ggd(a) { + return cgd(BD(a, 42)); + }; + mdb(yqe, "IndividualSpacings/lambda$0$Type", 971); + bcb(709, 1, {}, jgd); + _2.c = 0; + mdb(yqe, "InstancePool", 709); + bcb(1275, 1, {}, kgd); + mdb(yqe, "LoggedGraph", 1275); + bcb(396, 22, { 3: 1, 35: 1, 22: 1, 396: 1 }, qgd); + var lgd, mgd, ngd, ogd; + var k2 = ndb(yqe, "LoggedGraph/Type", 396, CI, sgd, rgd); + var tgd; + bcb(46, 1, { 20: 1, 46: 1 }, vgd); + _2.Jc = function xgd(a) { + reb(this, a); + }; + _2.Fb = function wgd(a) { + var b, c2, d; + if (JD(a, 46)) { + c2 = BD(a, 46); + b = this.a == null ? c2.a == null : pb(this.a, c2.a); + d = this.b == null ? c2.b == null : pb(this.b, c2.b); + return b && d; + } else { + return false; + } + }; + _2.Hb = function ygd() { + var a, b, c2, d, e, f2; + c2 = this.a == null ? 0 : tb(this.a); + a = c2 & aje; + b = c2 & -65536; + f2 = this.b == null ? 0 : tb(this.b); + d = f2 & aje; + e = f2 & -65536; + return a ^ e >> 16 & aje | b ^ d << 16; + }; + _2.Kc = function zgd() { + return new Bgd(this); + }; + _2.Ib = function Agd() { + return this.a == null && this.b == null ? "pair(null,null)" : this.a == null ? "pair(null," + fcb(this.b) + ")" : this.b == null ? "pair(" + fcb(this.a) + ",null)" : "pair(" + fcb(this.a) + "," + fcb(this.b) + ")"; + }; + mdb(yqe, "Pair", 46); + bcb(983, 1, aie, Bgd); + _2.Nb = function Cgd(a) { + Rrb(this, a); + }; + _2.Ob = function Dgd() { + return !this.c && (!this.b && this.a.a != null || this.a.b != null); + }; + _2.Pb = function Egd() { + if (!this.c && !this.b && this.a.a != null) { + this.b = true; + return this.a.a; + } else if (!this.c && this.a.b != null) { + this.c = true; + return this.a.b; + } + throw vbb(new utb()); + }; + _2.Qb = function Fgd() { + this.c && this.a.b != null ? this.a.b = null : this.b && this.a.a != null && (this.a.a = null); + throw vbb(new Ydb()); + }; + _2.b = false; + _2.c = false; + mdb(yqe, "Pair/1", 983); + bcb(448, 1, { 448: 1 }, Ggd); + _2.Fb = function Hgd(a) { + return wtb(this.a, BD(a, 448).a) && wtb(this.c, BD(a, 448).c) && wtb(this.d, BD(a, 448).d) && wtb(this.b, BD(a, 448).b); + }; + _2.Hb = function Igd() { + return Hlb(OC(GC(SI, 1), Uhe, 1, 5, [this.a, this.c, this.d, this.b])); + }; + _2.Ib = function Jgd() { + return "(" + this.a + She + this.c + She + this.d + She + this.b + ")"; + }; + mdb(yqe, "Quadruple", 448); + bcb(1126, 209, Mle, Mgd); + _2.Ze = function Ngd(a, b) { + var c2, d, e, f2, g; + Odd(b, "Random Layout", 1); + if ((!a.a && (a.a = new cUd(E2, a, 10, 11)), a.a).i == 0) { + Qdd(b); + return; + } + f2 = BD(hkd(a, (idd(), gdd)), 19); + !!f2 && f2.a != 0 ? e = new Hub(f2.a) : e = new Gub(); + c2 = Gdb(ED(hkd(a, ddd))); + g = Gdb(ED(hkd(a, hdd))); + d = BD(hkd(a, edd), 116); + Lgd(a, e, c2, g, d); + Qdd(b); + }; + mdb(yqe, "RandomLayoutProvider", 1126); + var Ogd; + bcb(553, 1, {}); + _2.qf = function Sgd() { + return new f7c(this.f.i, this.f.j); + }; + _2.We = function Tgd(a) { + if (Jsd(a, (Y9c(), s9c))) { + return hkd(this.f, Qgd); + } + return hkd(this.f, a); + }; + _2.rf = function Ugd() { + return new f7c(this.f.g, this.f.f); + }; + _2.sf = function Vgd() { + return this.g; + }; + _2.Xe = function Wgd(a) { + return ikd(this.f, a); + }; + _2.tf = function Xgd(a) { + dld(this.f, a.a); + eld(this.f, a.b); + }; + _2.uf = function Ygd(a) { + cld(this.f, a.a); + ald(this.f, a.b); + }; + _2.vf = function Zgd(a) { + this.g = a; + }; + _2.g = 0; + var Qgd; + mdb(Use, "ElkGraphAdapters/AbstractElkGraphElementAdapter", 553); + bcb(554, 1, { 839: 1 }, $gd); + _2.wf = function _gd() { + var a, b; + if (!this.b) { + this.b = Qu(Kkd(this.a).i); + for (b = new Fyd(Kkd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 137); + Ekb(this.b, new dhd(a)); + } + } + return this.b; + }; + _2.b = null; + mdb(Use, "ElkGraphAdapters/ElkEdgeAdapter", 554); + bcb(301, 553, {}, bhd); + _2.xf = function chd() { + return ahd(this); + }; + _2.a = null; + mdb(Use, "ElkGraphAdapters/ElkGraphAdapter", 301); + bcb(630, 553, { 181: 1 }, dhd); + mdb(Use, "ElkGraphAdapters/ElkLabelAdapter", 630); + bcb(629, 553, { 680: 1 }, hhd); + _2.wf = function khd() { + return ehd(this); + }; + _2.Af = function lhd() { + var a; + return a = BD(hkd(this.f, (Y9c(), S8c)), 142), !a && (a = new H_b()), a; + }; + _2.Cf = function nhd() { + return fhd(this); + }; + _2.Ef = function phd(a) { + var b; + b = new K_b(a); + jkd(this.f, (Y9c(), S8c), b); + }; + _2.Ff = function qhd(a) { + jkd(this.f, (Y9c(), f9c), new r0b(a)); + }; + _2.yf = function ihd() { + return this.d; + }; + _2.zf = function jhd() { + var a, b; + if (!this.a) { + this.a = new Rkb(); + for (b = new Sr(ur($sd(BD(this.f, 33)).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 79); + Ekb(this.a, new $gd(a)); + } + } + return this.a; + }; + _2.Bf = function mhd() { + var a, b; + if (!this.c) { + this.c = new Rkb(); + for (b = new Sr(ur(_sd(BD(this.f, 33)).a.Kc(), new Sq())); Qr(b); ) { + a = BD(Rr(b), 79); + Ekb(this.c, new $gd(a)); + } + } + return this.c; + }; + _2.Df = function ohd() { + return Vod(BD(this.f, 33)).i != 0 || Ccb(DD(BD(this.f, 33).We((Y9c(), M8c)))); + }; + _2.Gf = function rhd() { + ghd(this, (Pgd(), Ogd)); + }; + _2.a = null; + _2.b = null; + _2.c = null; + _2.d = null; + _2.e = null; + mdb(Use, "ElkGraphAdapters/ElkNodeAdapter", 629); + bcb(1266, 553, { 838: 1 }, thd); + _2.wf = function vhd() { + return shd(this); + }; + _2.zf = function uhd() { + var a, b; + if (!this.a) { + this.a = Pu(BD(this.f, 118).xg().i); + for (b = new Fyd(BD(this.f, 118).xg()); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 79); + Ekb(this.a, new $gd(a)); + } + } + return this.a; + }; + _2.Bf = function whd() { + var a, b; + if (!this.c) { + this.c = Pu(BD(this.f, 118).yg().i); + for (b = new Fyd(BD(this.f, 118).yg()); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 79); + Ekb(this.c, new $gd(a)); + } + } + return this.c; + }; + _2.Hf = function xhd() { + return BD(BD(this.f, 118).We((Y9c(), A9c)), 61); + }; + _2.If = function yhd() { + var a, b, c2, d, e, f2, g, h; + d = mpd(BD(this.f, 118)); + for (c2 = new Fyd(BD(this.f, 118).yg()); c2.e != c2.i.gc(); ) { + a = BD(Dyd(c2), 79); + for (h = new Fyd((!a.c && (a.c = new y5d(z2, a, 5, 8)), a.c)); h.e != h.i.gc(); ) { + g = BD(Dyd(h), 82); + if (ntd(atd(g), d)) { + return true; + } else if (atd(g) == d && Ccb(DD(hkd(a, (Y9c(), N8c))))) { + return true; + } + } + } + for (b = new Fyd(BD(this.f, 118).xg()); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 79); + for (f2 = new Fyd((!a.b && (a.b = new y5d(z2, a, 4, 7)), a.b)); f2.e != f2.i.gc(); ) { + e = BD(Dyd(f2), 82); + if (ntd(atd(e), d)) { + return true; + } + } + } + return false; + }; + _2.a = null; + _2.b = null; + _2.c = null; + mdb(Use, "ElkGraphAdapters/ElkPortAdapter", 1266); + bcb(1267, 1, Dke, Ahd); + _2.ue = function Bhd(a, b) { + return zhd(BD(a, 118), BD(b, 118)); + }; + _2.Fb = function Chd(a) { + return this === a; + }; + _2.ve = function Dhd() { + return new tpb(this); + }; + mdb(Use, "ElkGraphAdapters/PortComparator", 1267); + var m5 = odb(Vse, "EObject"); + var x2 = odb(Wse, Xse); + var y2 = odb(Wse, Yse); + var C2 = odb(Wse, Zse); + var G2 = odb(Wse, "ElkShape"); + var z2 = odb(Wse, $se); + var B2 = odb(Wse, _se); + var A2 = odb(Wse, ate); + var k5 = odb(Vse, bte); + var i5 = odb(Vse, "EFactory"); + var Ehd; + var l5 = odb(Vse, cte); + var o5 = odb(Vse, "EPackage"); + var Ghd; + var Ihd, Jhd, Khd, Lhd, Mhd, Nhd, Ohd, Phd, Qhd, Rhd, Shd; + var D2 = odb(Wse, dte); + var E2 = odb(Wse, ete); + var F2 = odb(Wse, fte); + bcb(90, 1, gte); + _2.Jg = function Vhd() { + this.Kg(); + return null; + }; + _2.Kg = function Whd() { + return null; + }; + _2.Lg = function Xhd() { + return this.Kg(), false; + }; + _2.Mg = function Yhd() { + return false; + }; + _2.Ng = function Zhd(a) { + Uhd(this, a); + }; + mdb(hte, "BasicNotifierImpl", 90); + bcb(97, 90, pte); + _2.nh = function fjd() { + return oid(this); + }; + _2.Og = function Fid(a, b) { + return a; + }; + _2.Pg = function Gid() { + throw vbb(new bgb()); + }; + _2.Qg = function Hid(a) { + var b; + return b = zUd(BD(XKd(this.Tg(), this.Vg()), 18)), this.eh().ih(this, b.n, b.f, a); + }; + _2.Rg = function Iid(a, b) { + throw vbb(new bgb()); + }; + _2.Sg = function Jid(a, b, c2) { + return _hd(this, a, b, c2); + }; + _2.Tg = function Kid() { + var a; + if (this.Pg()) { + a = this.Pg().ck(); + if (a) { + return a; + } + } + return this.zh(); + }; + _2.Ug = function Lid() { + return aid(this); + }; + _2.Vg = function Mid() { + throw vbb(new bgb()); + }; + _2.Wg = function Oid() { + var a, b; + b = this.ph().dk(); + !b && this.Pg().ik(b = (nRd(), a = pNd(TKd(this.Tg())), a == null ? mRd : new qRd(this, a))); + return b; + }; + _2.Xg = function Qid(a, b) { + return a; + }; + _2.Yg = function Rid(a) { + var b; + b = a.Gj(); + return !b ? bLd(this.Tg(), a) : a.aj(); + }; + _2.Zg = function Sid() { + var a; + a = this.Pg(); + return !a ? null : a.fk(); + }; + _2.$g = function Tid() { + return !this.Pg() ? null : this.Pg().ck(); + }; + _2._g = function Uid2(a, b, c2) { + return fid(this, a, b, c2); + }; + _2.ah = function Vid(a) { + return gid(this, a); + }; + _2.bh = function Wid(a, b) { + return hid(this, a, b); + }; + _2.dh = function Xid() { + var a; + a = this.Pg(); + return !!a && a.gk(); + }; + _2.eh = function Yid() { + throw vbb(new bgb()); + }; + _2.fh = function Zid() { + return jid(this); + }; + _2.gh = function $id(a, b, c2, d) { + return kid(this, a, b, d); + }; + _2.hh = function _id(a, b, c2) { + var d; + return d = BD(XKd(this.Tg(), b), 66), d.Nj().Qj(this, this.yh(), b - this.Ah(), a, c2); + }; + _2.ih = function ajd(a, b, c2, d) { + return lid(this, a, b, d); + }; + _2.jh = function bjd(a, b, c2) { + var d; + return d = BD(XKd(this.Tg(), b), 66), d.Nj().Rj(this, this.yh(), b - this.Ah(), a, c2); + }; + _2.kh = function cjd() { + return !!this.Pg() && !!this.Pg().ek(); + }; + _2.lh = function djd(a) { + return mid(this, a); + }; + _2.mh = function ejd(a) { + return nid(this, a); + }; + _2.oh = function gjd(a) { + return rid(this, a); + }; + _2.ph = function hjd() { + throw vbb(new bgb()); + }; + _2.qh = function ijd() { + return !this.Pg() ? null : this.Pg().ek(); + }; + _2.rh = function jjd() { + return jid(this); + }; + _2.sh = function kjd(a, b) { + yid(this, a, b); + }; + _2.th = function ljd(a) { + this.ph().hk(a); + }; + _2.uh = function mjd(a) { + this.ph().kk(a); + }; + _2.vh = function njd(a) { + this.ph().jk(a); + }; + _2.wh = function ojd(a, b) { + var c2, d, e, f2; + f2 = this.Zg(); + if (!!f2 && !!a) { + b = Txd(f2.Vk(), this, b); + f2.Zk(this); + } + d = this.eh(); + if (d) { + if ((Nid(this, this.eh(), this.Vg()).Bb & Tje) != 0) { + e = d.fh(); + !!e && (!a ? e.Yk(this) : !f2 && e.Zk(this)); + } else { + b = (c2 = this.Vg(), c2 >= 0 ? this.Qg(b) : this.eh().ih(this, -1 - c2, null, b)); + b = this.Sg(null, -1, b); + } + } + this.uh(a); + return b; + }; + _2.xh = function pjd(a) { + var b, c2, d, e, f2, g, h, i3; + c2 = this.Tg(); + f2 = bLd(c2, a); + b = this.Ah(); + if (f2 >= b) { + return BD(a, 66).Nj().Uj(this, this.yh(), f2 - b); + } else if (f2 <= -1) { + g = e1d((O6d(), M6d), c2, a); + if (g) { + Q6d(); + BD(g, 66).Oj() || (g = _1d(q1d(M6d, g))); + e = (d = this.Yg(g), BD(d >= 0 ? this._g(d, true, true) : sid(this, g, true), 153)); + i3 = g.Zj(); + if (i3 > 1 || i3 == -1) { + return BD(BD(e, 215).hl(a, false), 76); + } + } else { + throw vbb(new Wdb(ite + a.ne() + lte)); + } + } else if (a.$j()) { + return d = this.Yg(a), BD(d >= 0 ? this._g(d, false, true) : sid(this, a, false), 76); + } + h = new nGd(this, a); + return h; + }; + _2.yh = function qjd() { + return Aid(this); + }; + _2.zh = function rjd() { + return (NFd(), MFd).S; + }; + _2.Ah = function sjd() { + return aLd(this.zh()); + }; + _2.Bh = function tjd(a) { + Cid(this, a); + }; + _2.Ib = function ujd() { + return Eid(this); + }; + mdb(qte, "BasicEObjectImpl", 97); + var zFd; + bcb(114, 97, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1 }); + _2.Ch = function Djd(a) { + var b; + b = xjd(this); + return b[a]; + }; + _2.Dh = function Ejd(a, b) { + var c2; + c2 = xjd(this); + NC(c2, a, b); + }; + _2.Eh = function Fjd(a) { + var b; + b = xjd(this); + NC(b, a, null); + }; + _2.Jg = function Gjd() { + return BD(Ajd(this, 4), 126); + }; + _2.Kg = function Hjd() { + throw vbb(new bgb()); + }; + _2.Lg = function Ijd() { + return (this.Db & 4) != 0; + }; + _2.Pg = function Jjd() { + throw vbb(new bgb()); + }; + _2.Fh = function Kjd(a) { + Cjd(this, 2, a); + }; + _2.Rg = function Ljd(a, b) { + this.Db = b << 16 | this.Db & 255; + this.Fh(a); + }; + _2.Tg = function Mjd() { + return wjd(this); + }; + _2.Vg = function Njd() { + return this.Db >> 16; + }; + _2.Wg = function Ojd() { + var a, b; + return nRd(), b = pNd(TKd((a = BD(Ajd(this, 16), 26), !a ? this.zh() : a))), b == null ? mRd : new qRd(this, b); + }; + _2.Mg = function Pjd() { + return (this.Db & 1) == 0; + }; + _2.Zg = function Qjd() { + return BD(Ajd(this, 128), 1935); + }; + _2.$g = function Rjd() { + return BD(Ajd(this, 16), 26); + }; + _2.dh = function Sjd() { + return (this.Db & 32) != 0; + }; + _2.eh = function Tjd() { + return BD(Ajd(this, 2), 49); + }; + _2.kh = function Ujd() { + return (this.Db & 64) != 0; + }; + _2.ph = function Vjd() { + throw vbb(new bgb()); + }; + _2.qh = function Wjd() { + return BD(Ajd(this, 64), 281); + }; + _2.th = function Xjd(a) { + Cjd(this, 16, a); + }; + _2.uh = function Yjd(a) { + Cjd(this, 128, a); + }; + _2.vh = function Zjd(a) { + Cjd(this, 64, a); + }; + _2.yh = function $jd() { + return yjd(this); + }; + _2.Db = 0; + mdb(qte, "MinimalEObjectImpl", 114); + bcb(115, 114, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _2.Fh = function _jd(a) { + this.Cb = a; + }; + _2.eh = function akd() { + return this.Cb; + }; + mdb(qte, "MinimalEObjectImpl/Container", 115); + bcb(1985, 115, { 105: 1, 413: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _2._g = function kkd(a, b, c2) { + return bkd(this, a, b, c2); + }; + _2.jh = function lkd(a, b, c2) { + return ckd(this, a, b, c2); + }; + _2.lh = function mkd(a) { + return dkd(this, a); + }; + _2.sh = function nkd(a, b) { + ekd(this, a, b); + }; + _2.zh = function okd() { + return Thd(), Shd; + }; + _2.Bh = function pkd(a) { + fkd(this, a); + }; + _2.Ve = function qkd() { + return gkd(this); + }; + _2.We = function rkd(a) { + return hkd(this, a); + }; + _2.Xe = function skd(a) { + return ikd(this, a); + }; + _2.Ye = function tkd(a, b) { + return jkd(this, a, b); + }; + mdb(rte, "EMapPropertyHolderImpl", 1985); + bcb(567, 115, { 105: 1, 469: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, xkd); + _2._g = function ykd(a, b, c2) { + switch (a) { + case 0: + return this.a; + case 1: + return this.b; + } + return fid(this, a, b, c2); + }; + _2.lh = function zkd(a) { + switch (a) { + case 0: + return this.a != 0; + case 1: + return this.b != 0; + } + return mid(this, a); + }; + _2.sh = function Akd(a, b) { + switch (a) { + case 0: + vkd(this, Edb(ED(b))); + return; + case 1: + wkd(this, Edb(ED(b))); + return; + } + yid(this, a, b); + }; + _2.zh = function Bkd() { + return Thd(), Ihd; + }; + _2.Bh = function Ckd(a) { + switch (a) { + case 0: + vkd(this, 0); + return; + case 1: + wkd(this, 0); + return; + } + Cid(this, a); + }; + _2.Ib = function Dkd() { + var a; + if ((this.Db & 64) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (x: "; + Bfb(a, this.a); + a.a += ", y: "; + Bfb(a, this.b); + a.a += ")"; + return a.a; + }; + _2.a = 0; + _2.b = 0; + mdb(rte, "ElkBendPointImpl", 567); + bcb(723, 1985, { 105: 1, 413: 1, 160: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _2._g = function Nkd(a, b, c2) { + return Ekd(this, a, b, c2); + }; + _2.hh = function Okd(a, b, c2) { + return Fkd(this, a, b, c2); + }; + _2.jh = function Pkd(a, b, c2) { + return Gkd(this, a, b, c2); + }; + _2.lh = function Qkd(a) { + return Hkd(this, a); + }; + _2.sh = function Rkd(a, b) { + Ikd(this, a, b); + }; + _2.zh = function Skd() { + return Thd(), Mhd; + }; + _2.Bh = function Tkd(a) { + Jkd(this, a); + }; + _2.zg = function Ukd() { + return this.k; + }; + _2.Ag = function Vkd() { + return Kkd(this); + }; + _2.Ib = function Wkd() { + return Mkd(this); + }; + _2.k = null; + mdb(rte, "ElkGraphElementImpl", 723); + bcb(724, 723, { 105: 1, 413: 1, 160: 1, 470: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _2._g = function gld(a, b, c2) { + return Xkd(this, a, b, c2); + }; + _2.lh = function hld(a) { + return Ykd(this, a); + }; + _2.sh = function ild(a, b) { + Zkd(this, a, b); + }; + _2.zh = function jld() { + return Thd(), Rhd; + }; + _2.Bh = function kld(a) { + $kd(this, a); + }; + _2.Bg = function lld() { + return this.f; + }; + _2.Cg = function mld() { + return this.g; + }; + _2.Dg = function nld() { + return this.i; + }; + _2.Eg = function old() { + return this.j; + }; + _2.Fg = function pld(a, b) { + _kd(this, a, b); + }; + _2.Gg = function qld(a, b) { + bld(this, a, b); + }; + _2.Hg = function rld(a) { + dld(this, a); + }; + _2.Ig = function sld(a) { + eld(this, a); + }; + _2.Ib = function tld() { + return fld(this); + }; + _2.f = 0; + _2.g = 0; + _2.i = 0; + _2.j = 0; + mdb(rte, "ElkShapeImpl", 724); + bcb(725, 724, { 105: 1, 413: 1, 82: 1, 160: 1, 470: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }); + _2._g = function Bld(a, b, c2) { + return uld(this, a, b, c2); + }; + _2.hh = function Cld(a, b, c2) { + return vld(this, a, b, c2); + }; + _2.jh = function Dld(a, b, c2) { + return wld(this, a, b, c2); + }; + _2.lh = function Eld(a) { + return xld(this, a); + }; + _2.sh = function Fld(a, b) { + yld(this, a, b); + }; + _2.zh = function Gld() { + return Thd(), Jhd; + }; + _2.Bh = function Hld(a) { + zld(this, a); + }; + _2.xg = function Ild() { + return !this.d && (this.d = new y5d(B2, this, 8, 5)), this.d; + }; + _2.yg = function Jld() { + return !this.e && (this.e = new y5d(B2, this, 7, 4)), this.e; + }; + mdb(rte, "ElkConnectableShapeImpl", 725); + bcb(352, 723, { 105: 1, 413: 1, 79: 1, 160: 1, 352: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Tld); + _2.Qg = function Uld(a) { + return Lld(this, a); + }; + _2._g = function Vld(a, b, c2) { + switch (a) { + case 3: + return Mld(this); + case 4: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b; + case 5: + return !this.c && (this.c = new y5d(z2, this, 5, 8)), this.c; + case 6: + return !this.a && (this.a = new cUd(A2, this, 6, 6)), this.a; + case 7: + return Bcb(), !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b.i <= 1 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i <= 1) ? false : true; + case 8: + return Bcb(), Pld(this) ? true : false; + case 9: + return Bcb(), Qld(this) ? true : false; + case 10: + return Bcb(), !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b.i != 0 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i != 0) ? true : false; + } + return Ekd(this, a, b, c2); + }; + _2.hh = function Wld(a, b, c2) { + var d; + switch (b) { + case 3: + !!this.Cb && (c2 = (d = this.Db >> 16, d >= 0 ? Lld(this, c2) : this.Cb.ih(this, -1 - d, null, c2))); + return Kld(this, BD(a, 33), c2); + case 4: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), Sxd(this.b, a, c2); + case 5: + return !this.c && (this.c = new y5d(z2, this, 5, 8)), Sxd(this.c, a, c2); + case 6: + return !this.a && (this.a = new cUd(A2, this, 6, 6)), Sxd(this.a, a, c2); + } + return Fkd(this, a, b, c2); + }; + _2.jh = function Xld(a, b, c2) { + switch (b) { + case 3: + return Kld(this, null, c2); + case 4: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), Txd(this.b, a, c2); + case 5: + return !this.c && (this.c = new y5d(z2, this, 5, 8)), Txd(this.c, a, c2); + case 6: + return !this.a && (this.a = new cUd(A2, this, 6, 6)), Txd(this.a, a, c2); + } + return Gkd(this, a, b, c2); + }; + _2.lh = function Yld(a) { + switch (a) { + case 3: + return !!Mld(this); + case 4: + return !!this.b && this.b.i != 0; + case 5: + return !!this.c && this.c.i != 0; + case 6: + return !!this.a && this.a.i != 0; + case 7: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), !(this.b.i <= 1 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i <= 1)); + case 8: + return Pld(this); + case 9: + return Qld(this); + case 10: + return !this.b && (this.b = new y5d(z2, this, 4, 7)), this.b.i != 0 && (!this.c && (this.c = new y5d(z2, this, 5, 8)), this.c.i != 0); + } + return Hkd(this, a); + }; + _2.sh = function Zld(a, b) { + switch (a) { + case 3: + Rld(this, BD(b, 33)); + return; + case 4: + !this.b && (this.b = new y5d(z2, this, 4, 7)); + Uxd(this.b); + !this.b && (this.b = new y5d(z2, this, 4, 7)); + ytd(this.b, BD(b, 14)); + return; + case 5: + !this.c && (this.c = new y5d(z2, this, 5, 8)); + Uxd(this.c); + !this.c && (this.c = new y5d(z2, this, 5, 8)); + ytd(this.c, BD(b, 14)); + return; + case 6: + !this.a && (this.a = new cUd(A2, this, 6, 6)); + Uxd(this.a); + !this.a && (this.a = new cUd(A2, this, 6, 6)); + ytd(this.a, BD(b, 14)); + return; + } + Ikd(this, a, b); + }; + _2.zh = function $ld() { + return Thd(), Khd; + }; + _2.Bh = function _ld(a) { + switch (a) { + case 3: + Rld(this, null); + return; + case 4: + !this.b && (this.b = new y5d(z2, this, 4, 7)); + Uxd(this.b); + return; + case 5: + !this.c && (this.c = new y5d(z2, this, 5, 8)); + Uxd(this.c); + return; + case 6: + !this.a && (this.a = new cUd(A2, this, 6, 6)); + Uxd(this.a); + return; + } + Jkd(this, a); + }; + _2.Ib = function amd() { + return Sld(this); + }; + mdb(rte, "ElkEdgeImpl", 352); + bcb(439, 1985, { 105: 1, 413: 1, 202: 1, 439: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, rmd); + _2.Qg = function smd(a) { + return cmd(this, a); + }; + _2._g = function tmd(a, b, c2) { + switch (a) { + case 1: + return this.j; + case 2: + return this.k; + case 3: + return this.b; + case 4: + return this.c; + case 5: + return !this.a && (this.a = new xMd(y2, this, 5)), this.a; + case 6: + return fmd(this); + case 7: + if (b) + return emd(this); + return this.i; + case 8: + if (b) + return dmd(this); + return this.f; + case 9: + return !this.g && (this.g = new y5d(A2, this, 9, 10)), this.g; + case 10: + return !this.e && (this.e = new y5d(A2, this, 10, 9)), this.e; + case 11: + return this.d; + } + return bkd(this, a, b, c2); + }; + _2.hh = function umd(a, b, c2) { + var d, e, f2; + switch (b) { + case 6: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? cmd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return bmd(this, BD(a, 79), c2); + case 9: + return !this.g && (this.g = new y5d(A2, this, 9, 10)), Sxd(this.g, a, c2); + case 10: + return !this.e && (this.e = new y5d(A2, this, 10, 9)), Sxd(this.e, a, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (Thd(), Lhd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((Thd(), Lhd)), a, c2); + }; + _2.jh = function vmd(a, b, c2) { + switch (b) { + case 5: + return !this.a && (this.a = new xMd(y2, this, 5)), Txd(this.a, a, c2); + case 6: + return bmd(this, null, c2); + case 9: + return !this.g && (this.g = new y5d(A2, this, 9, 10)), Txd(this.g, a, c2); + case 10: + return !this.e && (this.e = new y5d(A2, this, 10, 9)), Txd(this.e, a, c2); + } + return ckd(this, a, b, c2); + }; + _2.lh = function wmd(a) { + switch (a) { + case 1: + return this.j != 0; + case 2: + return this.k != 0; + case 3: + return this.b != 0; + case 4: + return this.c != 0; + case 5: + return !!this.a && this.a.i != 0; + case 6: + return !!fmd(this); + case 7: + return !!this.i; + case 8: + return !!this.f; + case 9: + return !!this.g && this.g.i != 0; + case 10: + return !!this.e && this.e.i != 0; + case 11: + return this.d != null; + } + return dkd(this, a); + }; + _2.sh = function xmd(a, b) { + switch (a) { + case 1: + omd(this, Edb(ED(b))); + return; + case 2: + pmd(this, Edb(ED(b))); + return; + case 3: + hmd(this, Edb(ED(b))); + return; + case 4: + imd(this, Edb(ED(b))); + return; + case 5: + !this.a && (this.a = new xMd(y2, this, 5)); + Uxd(this.a); + !this.a && (this.a = new xMd(y2, this, 5)); + ytd(this.a, BD(b, 14)); + return; + case 6: + mmd(this, BD(b, 79)); + return; + case 7: + lmd(this, BD(b, 82)); + return; + case 8: + kmd(this, BD(b, 82)); + return; + case 9: + !this.g && (this.g = new y5d(A2, this, 9, 10)); + Uxd(this.g); + !this.g && (this.g = new y5d(A2, this, 9, 10)); + ytd(this.g, BD(b, 14)); + return; + case 10: + !this.e && (this.e = new y5d(A2, this, 10, 9)); + Uxd(this.e); + !this.e && (this.e = new y5d(A2, this, 10, 9)); + ytd(this.e, BD(b, 14)); + return; + case 11: + jmd(this, GD(b)); + return; + } + ekd(this, a, b); + }; + _2.zh = function ymd() { + return Thd(), Lhd; + }; + _2.Bh = function zmd(a) { + switch (a) { + case 1: + omd(this, 0); + return; + case 2: + pmd(this, 0); + return; + case 3: + hmd(this, 0); + return; + case 4: + imd(this, 0); + return; + case 5: + !this.a && (this.a = new xMd(y2, this, 5)); + Uxd(this.a); + return; + case 6: + mmd(this, null); + return; + case 7: + lmd(this, null); + return; + case 8: + kmd(this, null); + return; + case 9: + !this.g && (this.g = new y5d(A2, this, 9, 10)); + Uxd(this.g); + return; + case 10: + !this.e && (this.e = new y5d(A2, this, 10, 9)); + Uxd(this.e); + return; + case 11: + jmd(this, null); + return; + } + fkd(this, a); + }; + _2.Ib = function Amd() { + return qmd(this); + }; + _2.b = 0; + _2.c = 0; + _2.d = null; + _2.j = 0; + _2.k = 0; + mdb(rte, "ElkEdgeSectionImpl", 439); + bcb(150, 115, { 105: 1, 92: 1, 90: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }); + _2._g = function Emd(a, b, c2) { + var d; + if (a == 0) { + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c2); + }; + _2.hh = function Fmd(a, b, c2) { + var d, e; + if (b == 0) { + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Qj(this, yjd(this), b - aLd(this.zh()), a, c2); + }; + _2.jh = function Gmd(a, b, c2) { + var d, e; + if (b == 0) { + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c2); + }; + _2.lh = function Hmd(a) { + var b; + if (a == 0) { + return !!this.Ab && this.Ab.i != 0; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.oh = function Imd(a) { + return Bmd(this, a); + }; + _2.sh = function Jmd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + } + did(this, a - aLd(this.zh()), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? this.zh() : c2), a), b); + }; + _2.uh = function Kmd(a) { + Cjd(this, 128, a); + }; + _2.zh = function Lmd() { + return jGd(), ZFd; + }; + _2.Bh = function Mmd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.Gh = function Nmd() { + this.Bb |= 1; + }; + _2.Hh = function Omd(a) { + return Dmd(this, a); + }; + _2.Bb = 0; + mdb(qte, "EModelElementImpl", 150); + bcb(704, 150, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, $md); + _2.Ih = function _md(a, b) { + return Vmd(this, a, b); + }; + _2.Jh = function and(a) { + var b, c2, d, e, f2; + if (this.a != bKd(a) || (a.Bb & 256) != 0) { + throw vbb(new Wdb(xte + a.zb + ute)); + } + for (d = _Kd(a); VKd(d.a).i != 0; ) { + c2 = BD(nOd(d, 0, (b = BD(qud(VKd(d.a), 0), 87), f2 = b.c, JD(f2, 88) ? BD(f2, 26) : (jGd(), _Fd))), 26); + if (dKd(c2)) { + e = bKd(c2).Nh().Jh(c2); + BD(e, 49).th(a); + return e; + } + d = _Kd(c2); + } + return (a.D != null ? a.D : a.B) == "java.util.Map$Entry" ? new lHd(a) : new _Gd(a); + }; + _2.Kh = function bnd(a, b) { + return Wmd(this, a, b); + }; + _2._g = function cnd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.a; + } + return bid(this, a - aLd((jGd(), WFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? WFd : d), a), b, c2); + }; + _2.hh = function dnd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 1: + !!this.a && (c2 = BD(this.a, 49).ih(this, 4, o5, c2)); + return Tmd(this, BD(a, 235), c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), WFd) : d), b), 66), e.Nj().Qj(this, yjd(this), b - aLd((jGd(), WFd)), a, c2); + }; + _2.jh = function end2(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 1: + return Tmd(this, null, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), WFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), WFd)), a, c2); + }; + _2.lh = function fnd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return !!this.a; + } + return cid(this, a - aLd((jGd(), WFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? WFd : b), a)); + }; + _2.sh = function gnd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + Ymd(this, BD(b, 235)); + return; + } + did(this, a - aLd((jGd(), WFd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? WFd : c2), a), b); + }; + _2.zh = function hnd() { + return jGd(), WFd; + }; + _2.Bh = function ind(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + Ymd(this, null); + return; + } + eid(this, a - aLd((jGd(), WFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? WFd : b), a)); + }; + var Pmd, Qmd, Rmd; + mdb(qte, "EFactoryImpl", 704); + bcb(zte, 704, { 105: 1, 2014: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, knd); + _2.Ih = function lnd(a, b) { + switch (a.yj()) { + case 12: + return BD(b, 146).tg(); + case 13: + return fcb(b); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + _2.Jh = function mnd(a) { + var b, c2, d, e, f2, g, h, i3; + switch (a.G == -1 && (a.G = (b = bKd(a), b ? HLd(b.Mh(), a) : -1)), a.G) { + case 4: + return f2 = new Jod(), f2; + case 6: + return g = new apd(), g; + case 7: + return h = new ppd(), h; + case 8: + return d = new Tld(), d; + case 9: + return c2 = new xkd(), c2; + case 10: + return e = new rmd(), e; + case 11: + return i3 = new Bpd(), i3; + default: + throw vbb(new Wdb(xte + a.zb + ute)); + } + }; + _2.Kh = function nnd(a, b) { + switch (a.yj()) { + case 13: + case 12: + return null; + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + mdb(rte, "ElkGraphFactoryImpl", zte); + bcb(438, 150, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }); + _2.Wg = function rnd() { + var a, b; + b = (a = BD(Ajd(this, 16), 26), pNd(TKd(!a ? this.zh() : a))); + return b == null ? (nRd(), nRd(), mRd) : new GRd(this, b); + }; + _2._g = function snd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.ne(); + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c2); + }; + _2.lh = function tnd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.sh = function und(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + this.Lh(GD(b)); + return; + } + did(this, a - aLd(this.zh()), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? this.zh() : c2), a), b); + }; + _2.zh = function vnd() { + return jGd(), $Fd; + }; + _2.Bh = function wnd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + this.Lh(null); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.ne = function xnd() { + return this.zb; + }; + _2.Lh = function ynd(a) { + pnd(this, a); + }; + _2.Ib = function znd() { + return qnd(this); + }; + _2.zb = null; + mdb(qte, "ENamedElementImpl", 438); + bcb(179, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1 }, eod); + _2.Qg = function god(a) { + return Snd(this, a); + }; + _2._g = function hod(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.yb; + case 3: + return this.xb; + case 4: + return this.sb; + case 5: + return !this.rb && (this.rb = new jUd(this, d5, this)), this.rb; + case 6: + return !this.vb && (this.vb = new gUd(o5, this, 6, 7)), this.vb; + case 7: + if (b) + return this.Db >> 16 == 7 ? BD(this.Cb, 235) : null; + return Ind(this); + } + return bid(this, a - aLd((jGd(), cGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? cGd : d), a), b, c2); + }; + _2.hh = function iod(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 4: + !!this.sb && (c2 = BD(this.sb, 49).ih(this, 1, i5, c2)); + return Jnd(this, BD(a, 471), c2); + case 5: + return !this.rb && (this.rb = new jUd(this, d5, this)), Sxd(this.rb, a, c2); + case 6: + return !this.vb && (this.vb = new gUd(o5, this, 6, 7)), Sxd(this.vb, a, c2); + case 7: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? Snd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 7, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), cGd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((jGd(), cGd)), a, c2); + }; + _2.jh = function jod(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 4: + return Jnd(this, null, c2); + case 5: + return !this.rb && (this.rb = new jUd(this, d5, this)), Txd(this.rb, a, c2); + case 6: + return !this.vb && (this.vb = new gUd(o5, this, 6, 7)), Txd(this.vb, a, c2); + case 7: + return _hd(this, null, 7, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), cGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), cGd)), a, c2); + }; + _2.lh = function kod(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.yb != null; + case 3: + return this.xb != null; + case 4: + return !!this.sb; + case 5: + return !!this.rb && this.rb.i != 0; + case 6: + return !!this.vb && this.vb.i != 0; + case 7: + return !!Ind(this); + } + return cid(this, a - aLd((jGd(), cGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? cGd : b), a)); + }; + _2.oh = function lod(a) { + var b; + b = Und(this, a); + return b ? b : Bmd(this, a); + }; + _2.sh = function mod(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + dod(this, GD(b)); + return; + case 3: + cod(this, GD(b)); + return; + case 4: + bod(this, BD(b, 471)); + return; + case 5: + !this.rb && (this.rb = new jUd(this, d5, this)); + Uxd(this.rb); + !this.rb && (this.rb = new jUd(this, d5, this)); + ytd(this.rb, BD(b, 14)); + return; + case 6: + !this.vb && (this.vb = new gUd(o5, this, 6, 7)); + Uxd(this.vb); + !this.vb && (this.vb = new gUd(o5, this, 6, 7)); + ytd(this.vb, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), cGd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? cGd : c2), a), b); + }; + _2.vh = function nod(a) { + var b, c2; + if (!!a && !!this.rb) { + for (c2 = new Fyd(this.rb); c2.e != c2.i.gc(); ) { + b = Dyd(c2); + JD(b, 351) && (BD(b, 351).w = null); + } + } + Cjd(this, 64, a); + }; + _2.zh = function ood() { + return jGd(), cGd; + }; + _2.Bh = function pod(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + dod(this, null); + return; + case 3: + cod(this, null); + return; + case 4: + bod(this, null); + return; + case 5: + !this.rb && (this.rb = new jUd(this, d5, this)); + Uxd(this.rb); + return; + case 6: + !this.vb && (this.vb = new gUd(o5, this, 6, 7)); + Uxd(this.vb); + return; + } + eid(this, a - aLd((jGd(), cGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? cGd : b), a)); + }; + _2.Gh = function qod() { + Tnd(this); + }; + _2.Mh = function rod() { + return !this.rb && (this.rb = new jUd(this, d5, this)), this.rb; + }; + _2.Nh = function sod() { + return this.sb; + }; + _2.Oh = function tod() { + return this.ub; + }; + _2.Ph = function uod() { + return this.xb; + }; + _2.Qh = function vod() { + return this.yb; + }; + _2.Rh = function wod(a) { + this.ub = a; + }; + _2.Ib = function xod() { + var a; + if ((this.Db & 64) != 0) + return qnd(this); + a = new Jfb(qnd(this)); + a.a += " (nsURI: "; + Efb(a, this.yb); + a.a += ", nsPrefix: "; + Efb(a, this.xb); + a.a += ")"; + return a.a; + }; + _2.xb = null; + _2.yb = null; + mdb(qte, "EPackageImpl", 179); + bcb(555, 179, { 105: 1, 2016: 1, 555: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1 }, Bod); + _2.q = false; + _2.r = false; + var yod = false; + mdb(rte, "ElkGraphPackageImpl", 555); + bcb(354, 724, { 105: 1, 413: 1, 160: 1, 137: 1, 470: 1, 354: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Jod); + _2.Qg = function Kod(a) { + return Eod(this, a); + }; + _2._g = function Lod(a, b, c2) { + switch (a) { + case 7: + return Fod(this); + case 8: + return this.a; + } + return Xkd(this, a, b, c2); + }; + _2.hh = function Mod(a, b, c2) { + var d; + switch (b) { + case 7: + !!this.Cb && (c2 = (d = this.Db >> 16, d >= 0 ? Eod(this, c2) : this.Cb.ih(this, -1 - d, null, c2))); + return Dod(this, BD(a, 160), c2); + } + return Fkd(this, a, b, c2); + }; + _2.jh = function Nod(a, b, c2) { + if (b == 7) { + return Dod(this, null, c2); + } + return Gkd(this, a, b, c2); + }; + _2.lh = function Ood(a) { + switch (a) { + case 7: + return !!Fod(this); + case 8: + return !dfb("", this.a); + } + return Ykd(this, a); + }; + _2.sh = function Pod(a, b) { + switch (a) { + case 7: + God(this, BD(b, 160)); + return; + case 8: + Hod(this, GD(b)); + return; + } + Zkd(this, a, b); + }; + _2.zh = function Qod() { + return Thd(), Nhd; + }; + _2.Bh = function Rod(a) { + switch (a) { + case 7: + God(this, null); + return; + case 8: + Hod(this, ""); + return; + } + $kd(this, a); + }; + _2.Ib = function Sod() { + return Iod(this); + }; + _2.a = ""; + mdb(rte, "ElkLabelImpl", 354); + bcb(239, 725, { 105: 1, 413: 1, 82: 1, 160: 1, 33: 1, 470: 1, 239: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, apd); + _2.Qg = function bpd(a) { + return Uod(this, a); + }; + _2._g = function cpd(a, b, c2) { + switch (a) { + case 9: + return !this.c && (this.c = new cUd(F2, this, 9, 9)), this.c; + case 10: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), this.a; + case 11: + return Xod(this); + case 12: + return !this.b && (this.b = new cUd(B2, this, 12, 3)), this.b; + case 13: + return Bcb(), !this.a && (this.a = new cUd(E2, this, 10, 11)), this.a.i > 0 ? true : false; + } + return uld(this, a, b, c2); + }; + _2.hh = function dpd(a, b, c2) { + var d; + switch (b) { + case 9: + return !this.c && (this.c = new cUd(F2, this, 9, 9)), Sxd(this.c, a, c2); + case 10: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), Sxd(this.a, a, c2); + case 11: + !!this.Cb && (c2 = (d = this.Db >> 16, d >= 0 ? Uod(this, c2) : this.Cb.ih(this, -1 - d, null, c2))); + return Tod(this, BD(a, 33), c2); + case 12: + return !this.b && (this.b = new cUd(B2, this, 12, 3)), Sxd(this.b, a, c2); + } + return vld(this, a, b, c2); + }; + _2.jh = function epd(a, b, c2) { + switch (b) { + case 9: + return !this.c && (this.c = new cUd(F2, this, 9, 9)), Txd(this.c, a, c2); + case 10: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), Txd(this.a, a, c2); + case 11: + return Tod(this, null, c2); + case 12: + return !this.b && (this.b = new cUd(B2, this, 12, 3)), Txd(this.b, a, c2); + } + return wld(this, a, b, c2); + }; + _2.lh = function fpd(a) { + switch (a) { + case 9: + return !!this.c && this.c.i != 0; + case 10: + return !!this.a && this.a.i != 0; + case 11: + return !!Xod(this); + case 12: + return !!this.b && this.b.i != 0; + case 13: + return !this.a && (this.a = new cUd(E2, this, 10, 11)), this.a.i > 0; + } + return xld(this, a); + }; + _2.sh = function gpd(a, b) { + switch (a) { + case 9: + !this.c && (this.c = new cUd(F2, this, 9, 9)); + Uxd(this.c); + !this.c && (this.c = new cUd(F2, this, 9, 9)); + ytd(this.c, BD(b, 14)); + return; + case 10: + !this.a && (this.a = new cUd(E2, this, 10, 11)); + Uxd(this.a); + !this.a && (this.a = new cUd(E2, this, 10, 11)); + ytd(this.a, BD(b, 14)); + return; + case 11: + $od(this, BD(b, 33)); + return; + case 12: + !this.b && (this.b = new cUd(B2, this, 12, 3)); + Uxd(this.b); + !this.b && (this.b = new cUd(B2, this, 12, 3)); + ytd(this.b, BD(b, 14)); + return; + } + yld(this, a, b); + }; + _2.zh = function hpd() { + return Thd(), Ohd; + }; + _2.Bh = function ipd(a) { + switch (a) { + case 9: + !this.c && (this.c = new cUd(F2, this, 9, 9)); + Uxd(this.c); + return; + case 10: + !this.a && (this.a = new cUd(E2, this, 10, 11)); + Uxd(this.a); + return; + case 11: + $od(this, null); + return; + case 12: + !this.b && (this.b = new cUd(B2, this, 12, 3)); + Uxd(this.b); + return; + } + zld(this, a); + }; + _2.Ib = function jpd() { + return _od(this); + }; + mdb(rte, "ElkNodeImpl", 239); + bcb(186, 725, { 105: 1, 413: 1, 82: 1, 160: 1, 118: 1, 470: 1, 186: 1, 94: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, ppd); + _2.Qg = function qpd(a) { + return lpd(this, a); + }; + _2._g = function rpd(a, b, c2) { + if (a == 9) { + return mpd(this); + } + return uld(this, a, b, c2); + }; + _2.hh = function spd(a, b, c2) { + var d; + switch (b) { + case 9: + !!this.Cb && (c2 = (d = this.Db >> 16, d >= 0 ? lpd(this, c2) : this.Cb.ih(this, -1 - d, null, c2))); + return kpd(this, BD(a, 33), c2); + } + return vld(this, a, b, c2); + }; + _2.jh = function tpd(a, b, c2) { + if (b == 9) { + return kpd(this, null, c2); + } + return wld(this, a, b, c2); + }; + _2.lh = function upd(a) { + if (a == 9) { + return !!mpd(this); + } + return xld(this, a); + }; + _2.sh = function vpd(a, b) { + switch (a) { + case 9: + npd(this, BD(b, 33)); + return; + } + yld(this, a, b); + }; + _2.zh = function wpd() { + return Thd(), Phd; + }; + _2.Bh = function xpd(a) { + switch (a) { + case 9: + npd(this, null); + return; + } + zld(this, a); + }; + _2.Ib = function ypd() { + return opd(this); + }; + mdb(rte, "ElkPortImpl", 186); + var J4 = odb(Tte, "BasicEMap/Entry"); + bcb(1092, 115, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1, 114: 1, 115: 1 }, Bpd); + _2.Fb = function Hpd(a) { + return this === a; + }; + _2.cd = function Jpd() { + return this.b; + }; + _2.Hb = function Lpd() { + return FCb(this); + }; + _2.Uh = function Npd(a) { + zpd(this, BD(a, 146)); + }; + _2._g = function Cpd(a, b, c2) { + switch (a) { + case 0: + return this.b; + case 1: + return this.c; + } + return fid(this, a, b, c2); + }; + _2.lh = function Dpd(a) { + switch (a) { + case 0: + return !!this.b; + case 1: + return this.c != null; + } + return mid(this, a); + }; + _2.sh = function Epd(a, b) { + switch (a) { + case 0: + zpd(this, BD(b, 146)); + return; + case 1: + Apd(this, b); + return; + } + yid(this, a, b); + }; + _2.zh = function Fpd() { + return Thd(), Qhd; + }; + _2.Bh = function Gpd(a) { + switch (a) { + case 0: + zpd(this, null); + return; + case 1: + Apd(this, null); + return; + } + Cid(this, a); + }; + _2.Sh = function Ipd() { + var a; + if (this.a == -1) { + a = this.b; + this.a = !a ? 0 : tb(a); + } + return this.a; + }; + _2.dd = function Kpd() { + return this.c; + }; + _2.Th = function Mpd(a) { + this.a = a; + }; + _2.ed = function Opd(a) { + var b; + b = this.c; + Apd(this, a); + return b; + }; + _2.Ib = function Ppd() { + var a; + if ((this.Db & 64) != 0) + return Eid(this); + a = new Ufb(); + Qfb(Qfb(Qfb(a, this.b ? this.b.tg() : Xhe), gne), xfb(this.c)); + return a.a; + }; + _2.a = -1; + _2.c = null; + var S2 = mdb(rte, "ElkPropertyToValueMapEntryImpl", 1092); + bcb(984, 1, {}, bqd); + mdb(Wte, "JsonAdapter", 984); + bcb(210, 60, Tie, cqd); + mdb(Wte, "JsonImportException", 210); + bcb(857, 1, {}, ird); + mdb(Wte, "JsonImporter", 857); + bcb(891, 1, {}, jrd); + mdb(Wte, "JsonImporter/lambda$0$Type", 891); + bcb(892, 1, {}, krd); + mdb(Wte, "JsonImporter/lambda$1$Type", 892); + bcb(900, 1, {}, lrd); + mdb(Wte, "JsonImporter/lambda$10$Type", 900); + bcb(902, 1, {}, mrd); + mdb(Wte, "JsonImporter/lambda$11$Type", 902); + bcb(903, 1, {}, nrd); + mdb(Wte, "JsonImporter/lambda$12$Type", 903); + bcb(909, 1, {}, ord); + mdb(Wte, "JsonImporter/lambda$13$Type", 909); + bcb(908, 1, {}, prd); + mdb(Wte, "JsonImporter/lambda$14$Type", 908); + bcb(904, 1, {}, qrd); + mdb(Wte, "JsonImporter/lambda$15$Type", 904); + bcb(905, 1, {}, rrd); + mdb(Wte, "JsonImporter/lambda$16$Type", 905); + bcb(906, 1, {}, srd); + mdb(Wte, "JsonImporter/lambda$17$Type", 906); + bcb(907, 1, {}, trd); + mdb(Wte, "JsonImporter/lambda$18$Type", 907); + bcb(912, 1, {}, urd); + mdb(Wte, "JsonImporter/lambda$19$Type", 912); + bcb(893, 1, {}, vrd); + mdb(Wte, "JsonImporter/lambda$2$Type", 893); + bcb(910, 1, {}, wrd); + mdb(Wte, "JsonImporter/lambda$20$Type", 910); + bcb(911, 1, {}, xrd); + mdb(Wte, "JsonImporter/lambda$21$Type", 911); + bcb(915, 1, {}, yrd); + mdb(Wte, "JsonImporter/lambda$22$Type", 915); + bcb(913, 1, {}, zrd); + mdb(Wte, "JsonImporter/lambda$23$Type", 913); + bcb(914, 1, {}, Ard); + mdb(Wte, "JsonImporter/lambda$24$Type", 914); + bcb(917, 1, {}, Brd); + mdb(Wte, "JsonImporter/lambda$25$Type", 917); + bcb(916, 1, {}, Crd); + mdb(Wte, "JsonImporter/lambda$26$Type", 916); + bcb(918, 1, qie, Drd); + _2.td = function Erd(a) { + Bqd(this.b, this.a, GD(a)); + }; + mdb(Wte, "JsonImporter/lambda$27$Type", 918); + bcb(919, 1, qie, Frd); + _2.td = function Grd(a) { + Cqd(this.b, this.a, GD(a)); + }; + mdb(Wte, "JsonImporter/lambda$28$Type", 919); + bcb(920, 1, {}, Hrd); + mdb(Wte, "JsonImporter/lambda$29$Type", 920); + bcb(896, 1, {}, Ird); + mdb(Wte, "JsonImporter/lambda$3$Type", 896); + bcb(921, 1, {}, Jrd); + mdb(Wte, "JsonImporter/lambda$30$Type", 921); + bcb(922, 1, {}, Krd); + mdb(Wte, "JsonImporter/lambda$31$Type", 922); + bcb(923, 1, {}, Lrd); + mdb(Wte, "JsonImporter/lambda$32$Type", 923); + bcb(924, 1, {}, Mrd); + mdb(Wte, "JsonImporter/lambda$33$Type", 924); + bcb(925, 1, {}, Nrd); + mdb(Wte, "JsonImporter/lambda$34$Type", 925); + bcb(859, 1, {}, Prd); + mdb(Wte, "JsonImporter/lambda$35$Type", 859); + bcb(929, 1, {}, Rrd); + mdb(Wte, "JsonImporter/lambda$36$Type", 929); + bcb(926, 1, qie, Srd); + _2.td = function Trd(a) { + Lqd(this.a, BD(a, 469)); + }; + mdb(Wte, "JsonImporter/lambda$37$Type", 926); + bcb(927, 1, qie, Urd); + _2.td = function Vrd(a) { + Mqd(this.a, this.b, BD(a, 202)); + }; + mdb(Wte, "JsonImporter/lambda$38$Type", 927); + bcb(928, 1, qie, Wrd); + _2.td = function Xrd(a) { + Nqd(this.a, this.b, BD(a, 202)); + }; + mdb(Wte, "JsonImporter/lambda$39$Type", 928); + bcb(894, 1, {}, Yrd); + mdb(Wte, "JsonImporter/lambda$4$Type", 894); + bcb(930, 1, qie, Zrd); + _2.td = function $rd(a) { + Oqd(this.a, BD(a, 8)); + }; + mdb(Wte, "JsonImporter/lambda$40$Type", 930); + bcb(895, 1, {}, _rd); + mdb(Wte, "JsonImporter/lambda$5$Type", 895); + bcb(899, 1, {}, asd); + mdb(Wte, "JsonImporter/lambda$6$Type", 899); + bcb(897, 1, {}, bsd); + mdb(Wte, "JsonImporter/lambda$7$Type", 897); + bcb(898, 1, {}, csd); + mdb(Wte, "JsonImporter/lambda$8$Type", 898); + bcb(901, 1, {}, dsd); + mdb(Wte, "JsonImporter/lambda$9$Type", 901); + bcb(948, 1, qie, msd); + _2.td = function nsd(a) { + Qpd(this.a, new yC(GD(a))); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$0$Type", 948); + bcb(949, 1, qie, osd); + _2.td = function psd(a) { + isd(this.a, BD(a, 237)); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$1$Type", 949); + bcb(950, 1, qie, qsd); + _2.td = function rsd(a) { + jsd(this.a, BD(a, 149)); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$2$Type", 950); + bcb(951, 1, qie, ssd); + _2.td = function tsd(a) { + ksd(this.a, BD(a, 175)); + }; + mdb(Wte, "JsonMetaDataConverter/lambda$3$Type", 951); + bcb(237, 22, { 3: 1, 35: 1, 22: 1, 237: 1 }, Dsd); + var usd, vsd, wsd, xsd, ysd, zsd, Asd, Bsd; + var O3 = ndb(Hle, "GraphFeature", 237, CI, Fsd, Esd); + var Gsd; + bcb(13, 1, { 35: 1, 146: 1 }, Lsd, Msd, Nsd, Osd); + _2.wd = function Psd(a) { + return Isd(this, BD(a, 146)); + }; + _2.Fb = function Qsd(a) { + return Jsd(this, a); + }; + _2.wg = function Rsd() { + return Ksd(this); + }; + _2.tg = function Ssd() { + return this.b; + }; + _2.Hb = function Tsd() { + return LCb(this.b); + }; + _2.Ib = function Usd() { + return this.b; + }; + mdb(Hle, "Property", 13); + bcb(818, 1, Dke, Wsd); + _2.ue = function Xsd(a, b) { + return Vsd(this, BD(a, 94), BD(b, 94)); + }; + _2.Fb = function Ysd(a) { + return this === a; + }; + _2.ve = function Zsd() { + return new tpb(this); + }; + mdb(Hle, "PropertyHolderComparator", 818); + bcb(695, 1, aie, qtd); + _2.Nb = function rtd(a) { + Rrb(this, a); + }; + _2.Pb = function ttd() { + return ptd(this); + }; + _2.Qb = function utd() { + Srb(); + }; + _2.Ob = function std() { + return !!this.a; + }; + mdb(jue, "ElkGraphUtil/AncestorIterator", 695); + var T4 = odb(Tte, "EList"); + bcb(67, 52, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1 }); + _2.Vc = function Jtd(a, b) { + vtd(this, a, b); + }; + _2.Fc = function Ktd(a) { + return wtd(this, a); + }; + _2.Wc = function Ltd(a, b) { + return xtd(this, a, b); + }; + _2.Gc = function Mtd(a) { + return ytd(this, a); + }; + _2.Zh = function Ntd() { + return new $yd(this); + }; + _2.$h = function Otd() { + return new bzd(this); + }; + _2._h = function Ptd(a) { + return ztd(this, a); + }; + _2.ai = function Qtd() { + return true; + }; + _2.bi = function Rtd(a, b) { + }; + _2.ci = function Std() { + }; + _2.di = function Ttd(a, b) { + Atd(this, a, b); + }; + _2.ei = function Utd(a, b, c2) { + }; + _2.fi = function Vtd(a, b) { + }; + _2.gi = function Wtd(a, b, c2) { + }; + _2.Fb = function Xtd(a) { + return Btd(this, a); + }; + _2.Hb = function Ytd() { + return Etd(this); + }; + _2.hi = function Ztd() { + return false; + }; + _2.Kc = function $td() { + return new Fyd(this); + }; + _2.Yc = function _td() { + return new Oyd(this); + }; + _2.Zc = function aud(a) { + var b; + b = this.gc(); + if (a < 0 || a > b) + throw vbb(new Cyd(a, b)); + return new Pyd(this, a); + }; + _2.ji = function bud(a, b) { + this.ii(a, this.Xc(b)); + }; + _2.Mc = function cud(a) { + return Ftd(this, a); + }; + _2.li = function dud(a, b) { + return b; + }; + _2._c = function eud(a, b) { + return Gtd(this, a, b); + }; + _2.Ib = function fud() { + return Htd(this); + }; + _2.ni = function gud() { + return true; + }; + _2.oi = function hud(a, b) { + return Itd(this, b); + }; + mdb(Tte, "AbstractEList", 67); + bcb(63, 67, oue, yud, zud, Aud); + _2.Vh = function Bud(a, b) { + return iud(this, a, b); + }; + _2.Wh = function Cud(a) { + return jud(this, a); + }; + _2.Xh = function Dud(a, b) { + kud(this, a, b); + }; + _2.Yh = function Eud(a) { + lud(this, a); + }; + _2.pi = function Fud(a) { + return nud(this, a); + }; + _2.$b = function Gud() { + oud(this); + }; + _2.Hc = function Hud(a) { + return pud(this, a); + }; + _2.Xb = function Iud(a) { + return qud(this, a); + }; + _2.qi = function Jud(a) { + var b, c2, d; + ++this.j; + c2 = this.g == null ? 0 : this.g.length; + if (a > c2) { + d = this.g; + b = c2 + (c2 / 2 | 0) + 4; + b < a && (b = a); + this.g = this.ri(b); + d != null && $fb(d, 0, this.g, 0, this.i); + } + }; + _2.Xc = function Kud(a) { + return rud(this, a); + }; + _2.dc = function Lud() { + return this.i == 0; + }; + _2.ii = function Mud(a, b) { + return sud(this, a, b); + }; + _2.ri = function Nud(a) { + return KC(SI, Uhe, 1, a, 5, 1); + }; + _2.ki = function Oud(a) { + return this.g[a]; + }; + _2.$c = function Pud(a) { + return tud(this, a); + }; + _2.mi = function Qud(a, b) { + return uud(this, a, b); + }; + _2.gc = function Rud() { + return this.i; + }; + _2.Pc = function Sud() { + return wud(this); + }; + _2.Qc = function Tud(a) { + return xud(this, a); + }; + _2.i = 0; + var y4 = mdb(Tte, "BasicEList", 63); + var X4 = odb(Tte, "TreeIterator"); + bcb(694, 63, pue); + _2.Nb = function Xud(a) { + Rrb(this, a); + }; + _2.Ob = function Yud() { + return this.g == null && !this.c ? Uud(this) : this.g == null || this.i != 0 && BD(this.g[this.i - 1], 47).Ob(); + }; + _2.Pb = function Zud() { + return Vud(this); + }; + _2.Qb = function $ud() { + if (!this.e) { + throw vbb(new Zdb("There is no valid object to remove.")); + } + this.e.Qb(); + }; + _2.c = false; + mdb(Tte, "AbstractTreeIterator", 694); + bcb(685, 694, pue, _ud); + _2.si = function avd(a) { + var b; + b = BD(a, 56).Wg().Kc(); + JD(b, 279) && BD(b, 279).Nk(new bvd()); + return b; + }; + mdb(jue, "ElkGraphUtil/PropertiesSkippingTreeIterator", 685); + bcb(952, 1, {}, bvd); + mdb(jue, "ElkGraphUtil/PropertiesSkippingTreeIterator/1", 952); + var cvd, dvd; + var Y3 = mdb(jue, "ElkReflect", null); + bcb(889, 1, hse, jvd); + _2.vg = function kvd(a) { + return evd(), sqb(BD(a, 174)); + }; + mdb(jue, "ElkReflect/lambda$0$Type", 889); + var lvd; + odb(Tte, "ResourceLocator"); + bcb(1051, 1, {}); + mdb(Tte, "DelegatingResourceLocator", 1051); + bcb(1052, 1051, {}); + mdb("org.eclipse.emf.common", "EMFPlugin", 1052); + var $3 = odb(cve, "Adapter"); + var _3 = odb(cve, "Notification"); + bcb(1153, 1, dve); + _2.ti = function vvd() { + return this.d; + }; + _2.ui = function wvd(a) { + }; + _2.vi = function xvd(a) { + this.d = a; + }; + _2.wi = function yvd(a) { + this.d == a && (this.d = null); + }; + _2.d = null; + mdb(hte, "AdapterImpl", 1153); + bcb(1995, 67, eve); + _2.Vh = function Fvd(a, b) { + return zvd(this, a, b); + }; + _2.Wh = function Gvd(a) { + var b, c2, d; + ++this.j; + if (a.dc()) { + return false; + } else { + b = this.Vi(); + for (d = a.Kc(); d.Ob(); ) { + c2 = d.Pb(); + this.Ii(this.oi(b, c2)); + ++b; + } + return true; + } + }; + _2.Xh = function Hvd(a, b) { + Avd(this, a, b); + }; + _2.Yh = function Ivd(a) { + Bvd(this, a); + }; + _2.Gi = function Jvd() { + return this.Ji(); + }; + _2.$b = function Kvd() { + Cvd(this, this.Vi(), this.Wi()); + }; + _2.Hc = function Lvd(a) { + return this.Li(a); + }; + _2.Ic = function Mvd(a) { + return this.Mi(a); + }; + _2.Hi = function Nvd(a, b) { + this.Si().jm(); + }; + _2.Ii = function Ovd(a) { + this.Si().jm(); + }; + _2.Ji = function Pvd() { + return this.Si(); + }; + _2.Ki = function Qvd() { + this.Si().jm(); + }; + _2.Li = function Rvd(a) { + return this.Si().jm(); + }; + _2.Mi = function Svd(a) { + return this.Si().jm(); + }; + _2.Ni = function Tvd(a) { + return this.Si().jm(); + }; + _2.Oi = function Uvd(a) { + return this.Si().jm(); + }; + _2.Pi = function Vvd() { + return this.Si().jm(); + }; + _2.Qi = function Wvd(a) { + return this.Si().jm(); + }; + _2.Ri = function Xvd() { + return this.Si().jm(); + }; + _2.Ti = function Yvd(a) { + return this.Si().jm(); + }; + _2.Ui = function Zvd(a, b) { + return this.Si().jm(); + }; + _2.Vi = function $vd() { + return this.Si().jm(); + }; + _2.Wi = function _vd() { + return this.Si().jm(); + }; + _2.Xi = function awd(a) { + return this.Si().jm(); + }; + _2.Yi = function bwd() { + return this.Si().jm(); + }; + _2.Fb = function cwd(a) { + return this.Ni(a); + }; + _2.Xb = function dwd(a) { + return this.li(a, this.Oi(a)); + }; + _2.Hb = function ewd() { + return this.Pi(); + }; + _2.Xc = function fwd(a) { + return this.Qi(a); + }; + _2.dc = function gwd() { + return this.Ri(); + }; + _2.ii = function hwd(a, b) { + return Dvd(this, a, b); + }; + _2.ki = function iwd(a) { + return this.Oi(a); + }; + _2.$c = function jwd(a) { + return Evd(this, a); + }; + _2.Mc = function kwd(a) { + var b; + b = this.Xc(a); + if (b >= 0) { + this.$c(b); + return true; + } else { + return false; + } + }; + _2.mi = function lwd(a, b) { + return this.Ui(a, this.oi(a, b)); + }; + _2.gc = function mwd() { + return this.Vi(); + }; + _2.Pc = function nwd() { + return this.Wi(); + }; + _2.Qc = function owd(a) { + return this.Xi(a); + }; + _2.Ib = function pwd() { + return this.Yi(); + }; + mdb(Tte, "DelegatingEList", 1995); + bcb(1996, 1995, eve); + _2.Vh = function xwd(a, b) { + return qwd(this, a, b); + }; + _2.Wh = function ywd(a) { + return this.Vh(this.Vi(), a); + }; + _2.Xh = function zwd(a, b) { + rwd(this, a, b); + }; + _2.Yh = function Awd(a) { + swd(this, a); + }; + _2.ai = function Bwd() { + return !this.bj(); + }; + _2.$b = function Cwd() { + vwd(this); + }; + _2.Zi = function Dwd(a, b, c2, d, e) { + return new Cxd(this, a, b, c2, d, e); + }; + _2.$i = function Ewd(a) { + Uhd(this.Ai(), a); + }; + _2._i = function Fwd() { + return null; + }; + _2.aj = function Gwd() { + return -1; + }; + _2.Ai = function Hwd() { + return null; + }; + _2.bj = function Iwd() { + return false; + }; + _2.cj = function Jwd(a, b) { + return b; + }; + _2.dj = function Kwd(a, b) { + return b; + }; + _2.ej = function Lwd() { + return false; + }; + _2.fj = function Mwd() { + return !this.Ri(); + }; + _2.ii = function Nwd(a, b) { + var c2, d; + if (this.ej()) { + d = this.fj(); + c2 = Dvd(this, a, b); + this.$i(this.Zi(7, meb(b), c2, a, d)); + return c2; + } else { + return Dvd(this, a, b); + } + }; + _2.$c = function Owd(a) { + var b, c2, d, e; + if (this.ej()) { + c2 = null; + d = this.fj(); + b = this.Zi(4, e = Evd(this, a), null, a, d); + if (this.bj() && !!e) { + c2 = this.dj(e, c2); + if (!c2) { + this.$i(b); + } else { + c2.Ei(b); + c2.Fi(); + } + } else { + if (!c2) { + this.$i(b); + } else { + c2.Ei(b); + c2.Fi(); + } + } + return e; + } else { + e = Evd(this, a); + if (this.bj() && !!e) { + c2 = this.dj(e, null); + !!c2 && c2.Fi(); + } + return e; + } + }; + _2.mi = function Pwd(a, b) { + return wwd(this, a, b); + }; + mdb(hte, "DelegatingNotifyingListImpl", 1996); + bcb(143, 1, fve); + _2.Ei = function pxd(a) { + return Qwd(this, a); + }; + _2.Fi = function qxd() { + Rwd(this); + }; + _2.xi = function rxd() { + return this.d; + }; + _2._i = function sxd() { + return null; + }; + _2.gj = function txd() { + return null; + }; + _2.yi = function uxd(a) { + return -1; + }; + _2.zi = function vxd() { + return $wd(this); + }; + _2.Ai = function wxd() { + return null; + }; + _2.Bi = function xxd() { + return hxd(this); + }; + _2.Ci = function yxd() { + return this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o; + }; + _2.hj = function zxd() { + return false; + }; + _2.Di = function Axd(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l; + switch (this.d) { + case 1: + case 2: { + e = a.xi(); + switch (e) { + case 1: + case 2: { + f2 = a.Ai(); + if (PD(f2) === PD(this.Ai()) && this.yi(null) == a.yi(null)) { + this.g = a.zi(); + a.xi() == 1 && (this.d = 1); + return true; + } + } + } + } + case 4: { + e = a.xi(); + switch (e) { + case 4: { + f2 = a.Ai(); + if (PD(f2) === PD(this.Ai()) && this.yi(null) == a.yi(null)) { + j = jxd(this); + i3 = this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o; + g = a.Ci(); + this.d = 6; + l = new zud(2); + if (i3 <= g) { + wtd(l, this.n); + wtd(l, a.Bi()); + this.g = OC(GC(WD, 1), oje, 25, 15, [this.o = i3, g + 1]); + } else { + wtd(l, a.Bi()); + wtd(l, this.n); + this.g = OC(GC(WD, 1), oje, 25, 15, [this.o = g, i3]); + } + this.n = l; + j || (this.o = -2 - this.o - 1); + return true; + } + break; + } + } + break; + } + case 6: { + e = a.xi(); + switch (e) { + case 4: { + f2 = a.Ai(); + if (PD(f2) === PD(this.Ai()) && this.yi(null) == a.yi(null)) { + j = jxd(this); + g = a.Ci(); + k = BD(this.g, 48); + d = KC(WD, oje, 25, k.length + 1, 15, 1); + b = 0; + while (b < k.length) { + h = k[b]; + if (h <= g) { + d[b++] = h; + ++g; + } else { + break; + } + } + c2 = BD(this.n, 15); + c2.Vc(b, a.Bi()); + d[b] = g; + while (++b < d.length) { + d[b] = k[b - 1]; + } + this.g = d; + j || (this.o = -2 - d[0]); + return true; + } + break; + } + } + break; + } + } + return false; + }; + _2.Ib = function Bxd() { + var a, b, c2, d; + d = new Jfb(hdb(this.gm) + "@" + (b = tb(this) >>> 0, b.toString(16))); + d.a += " (eventType: "; + switch (this.d) { + case 1: { + d.a += "SET"; + break; + } + case 2: { + d.a += "UNSET"; + break; + } + case 3: { + d.a += "ADD"; + break; + } + case 5: { + d.a += "ADD_MANY"; + break; + } + case 4: { + d.a += "REMOVE"; + break; + } + case 6: { + d.a += "REMOVE_MANY"; + break; + } + case 7: { + d.a += "MOVE"; + break; + } + case 8: { + d.a += "REMOVING_ADAPTER"; + break; + } + case 9: { + d.a += "RESOLVE"; + break; + } + default: { + Cfb(d, this.d); + break; + } + } + ixd(this) && (d.a += ", touch: true", d); + d.a += ", position: "; + Cfb(d, this.o < 0 ? this.o < -2 ? -2 - this.o - 1 : -1 : this.o); + d.a += ", notifier: "; + Dfb(d, this.Ai()); + d.a += ", feature: "; + Dfb(d, this._i()); + d.a += ", oldValue: "; + Dfb(d, hxd(this)); + d.a += ", newValue: "; + if (this.d == 6 && JD(this.g, 48)) { + c2 = BD(this.g, 48); + d.a += "["; + for (a = 0; a < c2.length; ) { + d.a += c2[a]; + ++a < c2.length && (d.a += She, d); + } + d.a += "]"; + } else { + Dfb(d, $wd(this)); + } + d.a += ", isTouch: "; + Ffb(d, ixd(this)); + d.a += ", wasSet: "; + Ffb(d, jxd(this)); + d.a += ")"; + return d.a; + }; + _2.d = 0; + _2.e = 0; + _2.f = 0; + _2.j = 0; + _2.k = 0; + _2.o = 0; + _2.p = 0; + mdb(hte, "NotificationImpl", 143); + bcb(1167, 143, fve, Cxd); + _2._i = function Dxd() { + return this.a._i(); + }; + _2.yi = function Exd(a) { + return this.a.aj(); + }; + _2.Ai = function Fxd() { + return this.a.Ai(); + }; + mdb(hte, "DelegatingNotifyingListImpl/1", 1167); + bcb(242, 63, oue, Hxd, Ixd); + _2.Fc = function Jxd(a) { + return Gxd(this, BD(a, 366)); + }; + _2.Ei = function Kxd(a) { + return Gxd(this, a); + }; + _2.Fi = function Lxd() { + var a, b, c2; + for (a = 0; a < this.i; ++a) { + b = BD(this.g[a], 366); + c2 = b.Ai(); + c2 != null && b.xi() != -1 && BD(c2, 92).Ng(b); + } + }; + _2.ri = function Mxd(a) { + return KC(_3, Uhe, 366, a, 0, 1); + }; + mdb(hte, "NotificationChainImpl", 242); + bcb(1378, 90, gte); + _2.Kg = function Nxd() { + return this.e; + }; + _2.Mg = function Oxd() { + return (this.f & 1) != 0; + }; + _2.f = 1; + mdb(hte, "NotifierImpl", 1378); + bcb(1993, 63, oue); + _2.Vh = function $xd(a, b) { + return Pxd(this, a, b); + }; + _2.Wh = function _xd(a) { + return this.Vh(this.i, a); + }; + _2.Xh = function ayd(a, b) { + Qxd(this, a, b); + }; + _2.Yh = function byd(a) { + Rxd(this, a); + }; + _2.ai = function cyd() { + return !this.bj(); + }; + _2.$b = function dyd() { + Uxd(this); + }; + _2.Zi = function eyd(a, b, c2, d, e) { + return new vyd(this, a, b, c2, d, e); + }; + _2.$i = function fyd(a) { + Uhd(this.Ai(), a); + }; + _2._i = function gyd() { + return null; + }; + _2.aj = function hyd() { + return -1; + }; + _2.Ai = function iyd() { + return null; + }; + _2.bj = function jyd() { + return false; + }; + _2.ij = function kyd() { + return false; + }; + _2.cj = function lyd(a, b) { + return b; + }; + _2.dj = function myd(a, b) { + return b; + }; + _2.ej = function nyd() { + return false; + }; + _2.fj = function oyd() { + return this.i != 0; + }; + _2.ii = function pyd(a, b) { + return Wxd(this, a, b); + }; + _2.$c = function qyd(a) { + return Xxd(this, a); + }; + _2.mi = function ryd(a, b) { + return Zxd(this, a, b); + }; + _2.jj = function syd(a, b) { + return b; + }; + _2.kj = function tyd(a, b) { + return b; + }; + _2.lj = function uyd(a, b, c2) { + return c2; + }; + mdb(hte, "NotifyingListImpl", 1993); + bcb(1166, 143, fve, vyd); + _2._i = function wyd() { + return this.a._i(); + }; + _2.yi = function xyd(a) { + return this.a.aj(); + }; + _2.Ai = function yyd() { + return this.a.Ai(); + }; + mdb(hte, "NotifyingListImpl/1", 1166); + bcb(953, 63, oue, zyd); + _2.Hc = function Ayd(a) { + if (this.i > 10) { + if (!this.b || this.c.j != this.a) { + this.b = new Vqb(this); + this.a = this.j; + } + return Rqb(this.b, a); + } else { + return pud(this, a); + } + }; + _2.ni = function Byd() { + return true; + }; + _2.a = 0; + mdb(Tte, "AbstractEList/1", 953); + bcb(295, 73, Mje, Cyd); + mdb(Tte, "AbstractEList/BasicIndexOutOfBoundsException", 295); + bcb(40, 1, aie, Fyd); + _2.Nb = function Iyd(a) { + Rrb(this, a); + }; + _2.mj = function Gyd() { + if (this.i.j != this.f) { + throw vbb(new Apb()); + } + }; + _2.nj = function Hyd() { + return Dyd(this); + }; + _2.Ob = function Jyd() { + return this.e != this.i.gc(); + }; + _2.Pb = function Kyd() { + return this.nj(); + }; + _2.Qb = function Lyd() { + Eyd(this); + }; + _2.e = 0; + _2.f = 0; + _2.g = -1; + mdb(Tte, "AbstractEList/EIterator", 40); + bcb(278, 40, jie, Oyd, Pyd); + _2.Qb = function Xyd() { + Eyd(this); + }; + _2.Rb = function Qyd(a) { + Myd(this, a); + }; + _2.oj = function Ryd() { + var b; + try { + b = this.d.Xb(--this.e); + this.mj(); + this.g = this.e; + return b; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + this.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + }; + _2.pj = function Syd(a) { + Nyd(this, a); + }; + _2.Sb = function Tyd() { + return this.e != 0; + }; + _2.Tb = function Uyd() { + return this.e; + }; + _2.Ub = function Vyd() { + return this.oj(); + }; + _2.Vb = function Wyd() { + return this.e - 1; + }; + _2.Wb = function Yyd(a) { + this.pj(a); + }; + mdb(Tte, "AbstractEList/EListIterator", 278); + bcb(341, 40, aie, $yd); + _2.nj = function _yd() { + return Zyd(this); + }; + _2.Qb = function azd() { + throw vbb(new bgb()); + }; + mdb(Tte, "AbstractEList/NonResolvingEIterator", 341); + bcb(385, 278, jie, bzd, czd); + _2.Rb = function dzd(a) { + throw vbb(new bgb()); + }; + _2.nj = function ezd() { + var b; + try { + b = this.c.ki(this.e); + this.mj(); + this.g = this.e++; + return b; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + this.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + }; + _2.oj = function fzd() { + var b; + try { + b = this.c.ki(--this.e); + this.mj(); + this.g = this.e; + return b; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + this.mj(); + throw vbb(new utb()); + } else + throw vbb(a); + } + }; + _2.Qb = function gzd() { + throw vbb(new bgb()); + }; + _2.Wb = function hzd(a) { + throw vbb(new bgb()); + }; + mdb(Tte, "AbstractEList/NonResolvingEListIterator", 385); + bcb(1982, 67, ive); + _2.Vh = function pzd(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m; + e = b.gc(); + if (e != 0) { + j = BD(Ajd(this.a, 4), 126); + k = j == null ? 0 : j.length; + m = k + e; + d = nzd(this, m); + l = k - a; + l > 0 && $fb(j, a, d, a + e, l); + i3 = b.Kc(); + for (g = 0; g < e; ++g) { + h = i3.Pb(); + c2 = a + g; + lzd(d, c2, Itd(this, h)); + } + b0d(this, d); + for (f2 = 0; f2 < e; ++f2) { + h = d[a]; + this.bi(a, h); + ++a; + } + return true; + } else { + ++this.j; + return false; + } + }; + _2.Wh = function qzd(a) { + var b, c2, d, e, f2, g, h, i3, j; + d = a.gc(); + if (d != 0) { + i3 = (c2 = BD(Ajd(this.a, 4), 126), c2 == null ? 0 : c2.length); + j = i3 + d; + b = nzd(this, j); + h = a.Kc(); + for (f2 = i3; f2 < j; ++f2) { + g = h.Pb(); + lzd(b, f2, Itd(this, g)); + } + b0d(this, b); + for (e = i3; e < j; ++e) { + g = b[e]; + this.bi(e, g); + } + return true; + } else { + ++this.j; + return false; + } + }; + _2.Xh = function rzd(a, b) { + var c2, d, e, f2; + d = BD(Ajd(this.a, 4), 126); + e = d == null ? 0 : d.length; + c2 = nzd(this, e + 1); + f2 = Itd(this, b); + a != e && $fb(d, a, c2, a + 1, e - a); + NC(c2, a, f2); + b0d(this, c2); + this.bi(a, b); + }; + _2.Yh = function szd(a) { + var b, c2, d; + d = (c2 = BD(Ajd(this.a, 4), 126), c2 == null ? 0 : c2.length); + b = nzd(this, d + 1); + lzd(b, d, Itd(this, a)); + b0d(this, b); + this.bi(d, a); + }; + _2.Zh = function tzd() { + return new Uzd(this); + }; + _2.$h = function uzd() { + return new Xzd(this); + }; + _2._h = function vzd(a) { + var b, c2; + c2 = (b = BD(Ajd(this.a, 4), 126), b == null ? 0 : b.length); + if (a < 0 || a > c2) + throw vbb(new Cyd(a, c2)); + return new Yzd(this, a); + }; + _2.$b = function wzd() { + var a, b; + ++this.j; + a = BD(Ajd(this.a, 4), 126); + b = a == null ? 0 : a.length; + b0d(this, null); + Atd(this, b, a); + }; + _2.Hc = function xzd(a) { + var b, c2, d, e, f2; + b = BD(Ajd(this.a, 4), 126); + if (b != null) { + if (a != null) { + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + if (pb(a, c2)) { + return true; + } + } + } else { + for (d = b, e = 0, f2 = d.length; e < f2; ++e) { + c2 = d[e]; + if (PD(c2) === PD(a)) { + return true; + } + } + } + } + return false; + }; + _2.Xb = function yzd(a) { + var b, c2; + b = BD(Ajd(this.a, 4), 126); + c2 = b == null ? 0 : b.length; + if (a >= c2) + throw vbb(new Cyd(a, c2)); + return b[a]; + }; + _2.Xc = function zzd(a) { + var b, c2, d; + b = BD(Ajd(this.a, 4), 126); + if (b != null) { + if (a != null) { + for (c2 = 0, d = b.length; c2 < d; ++c2) { + if (pb(a, b[c2])) { + return c2; + } + } + } else { + for (c2 = 0, d = b.length; c2 < d; ++c2) { + if (PD(b[c2]) === PD(a)) { + return c2; + } + } + } + } + return -1; + }; + _2.dc = function Azd() { + return BD(Ajd(this.a, 4), 126) == null; + }; + _2.Kc = function Bzd() { + return new Lzd(this); + }; + _2.Yc = function Czd() { + return new Pzd(this); + }; + _2.Zc = function Dzd(a) { + var b, c2; + c2 = (b = BD(Ajd(this.a, 4), 126), b == null ? 0 : b.length); + if (a < 0 || a > c2) + throw vbb(new Cyd(a, c2)); + return new Qzd(this, a); + }; + _2.ii = function Ezd(a, b) { + var c2, d, e; + c2 = mzd(this); + e = c2 == null ? 0 : c2.length; + if (a >= e) + throw vbb(new qcb(lue + a + mue + e)); + if (b >= e) + throw vbb(new qcb(nue + b + mue + e)); + d = c2[b]; + if (a != b) { + a < b ? $fb(c2, a, c2, a + 1, b - a) : $fb(c2, b + 1, c2, b, a - b); + NC(c2, a, d); + b0d(this, c2); + } + return d; + }; + _2.ki = function Fzd(a) { + return BD(Ajd(this.a, 4), 126)[a]; + }; + _2.$c = function Gzd(a) { + return ozd(this, a); + }; + _2.mi = function Hzd(a, b) { + var c2, d; + c2 = mzd(this); + d = c2[a]; + lzd(c2, a, Itd(this, b)); + b0d(this, c2); + return d; + }; + _2.gc = function Izd() { + var a; + return a = BD(Ajd(this.a, 4), 126), a == null ? 0 : a.length; + }; + _2.Pc = function Jzd() { + var a, b, c2; + a = BD(Ajd(this.a, 4), 126); + c2 = a == null ? 0 : a.length; + b = KC($3, hve, 415, c2, 0, 1); + c2 > 0 && $fb(a, 0, b, 0, c2); + return b; + }; + _2.Qc = function Kzd(a) { + var b, c2, d; + b = BD(Ajd(this.a, 4), 126); + d = b == null ? 0 : b.length; + if (d > 0) { + if (a.length < d) { + c2 = izd(rb(a).c, d); + a = c2; + } + $fb(b, 0, a, 0, d); + } + a.length > d && NC(a, d, null); + return a; + }; + var jzd; + mdb(Tte, "ArrayDelegatingEList", 1982); + bcb(1038, 40, aie, Lzd); + _2.mj = function Mzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + _2.Qb = function Nzd() { + Eyd(this); + this.a = BD(Ajd(this.b.a, 4), 126); + }; + mdb(Tte, "ArrayDelegatingEList/EIterator", 1038); + bcb(706, 278, jie, Pzd, Qzd); + _2.mj = function Rzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + _2.pj = function Szd(a) { + Nyd(this, a); + this.a = BD(Ajd(this.b.a, 4), 126); + }; + _2.Qb = function Tzd() { + Eyd(this); + this.a = BD(Ajd(this.b.a, 4), 126); + }; + mdb(Tte, "ArrayDelegatingEList/EListIterator", 706); + bcb(1039, 341, aie, Uzd); + _2.mj = function Vzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + mdb(Tte, "ArrayDelegatingEList/NonResolvingEIterator", 1039); + bcb(707, 385, jie, Xzd, Yzd); + _2.mj = function Zzd() { + if (this.b.j != this.f || PD(BD(Ajd(this.b.a, 4), 126)) !== PD(this.a)) { + throw vbb(new Apb()); + } + }; + mdb(Tte, "ArrayDelegatingEList/NonResolvingEListIterator", 707); + bcb(606, 295, Mje, $zd); + mdb(Tte, "BasicEList/BasicIndexOutOfBoundsException", 606); + bcb(696, 63, oue, _zd); + _2.Vc = function aAd(a, b) { + throw vbb(new bgb()); + }; + _2.Fc = function bAd(a) { + throw vbb(new bgb()); + }; + _2.Wc = function cAd(a, b) { + throw vbb(new bgb()); + }; + _2.Gc = function dAd(a) { + throw vbb(new bgb()); + }; + _2.$b = function eAd() { + throw vbb(new bgb()); + }; + _2.qi = function fAd(a) { + throw vbb(new bgb()); + }; + _2.Kc = function gAd() { + return this.Zh(); + }; + _2.Yc = function hAd() { + return this.$h(); + }; + _2.Zc = function iAd(a) { + return this._h(a); + }; + _2.ii = function jAd(a, b) { + throw vbb(new bgb()); + }; + _2.ji = function kAd(a, b) { + throw vbb(new bgb()); + }; + _2.$c = function lAd(a) { + throw vbb(new bgb()); + }; + _2.Mc = function mAd(a) { + throw vbb(new bgb()); + }; + _2._c = function nAd(a, b) { + throw vbb(new bgb()); + }; + mdb(Tte, "BasicEList/UnmodifiableEList", 696); + bcb(705, 1, { 3: 1, 20: 1, 14: 1, 15: 1, 58: 1, 589: 1 }); + _2.Vc = function OAd(a, b) { + oAd(this, a, BD(b, 42)); + }; + _2.Fc = function PAd(a) { + return pAd(this, BD(a, 42)); + }; + _2.Jc = function XAd(a) { + reb(this, a); + }; + _2.Xb = function YAd(a) { + return BD(qud(this.c, a), 133); + }; + _2.ii = function fBd(a, b) { + return BD(this.c.ii(a, b), 42); + }; + _2.ji = function gBd(a, b) { + GAd(this, a, BD(b, 42)); + }; + _2.Lc = function jBd() { + return new YAb(null, new Kub(this, 16)); + }; + _2.$c = function kBd(a) { + return BD(this.c.$c(a), 42); + }; + _2._c = function mBd(a, b) { + return MAd(this, a, BD(b, 42)); + }; + _2.ad = function oBd(a) { + ktb(this, a); + }; + _2.Nc = function pBd() { + return new Kub(this, 16); + }; + _2.Oc = function qBd() { + return new YAb(null, new Kub(this, 16)); + }; + _2.Wc = function QAd(a, b) { + return this.c.Wc(a, b); + }; + _2.Gc = function RAd(a) { + return this.c.Gc(a); + }; + _2.$b = function SAd() { + this.c.$b(); + }; + _2.Hc = function TAd(a) { + return this.c.Hc(a); + }; + _2.Ic = function UAd(a) { + return Be(this.c, a); + }; + _2.qj = function VAd() { + var a, b, c2; + if (this.d == null) { + this.d = KC(y4, jve, 63, 2 * this.f + 1, 0, 1); + c2 = this.e; + this.f = 0; + for (b = this.c.Kc(); b.e != b.i.gc(); ) { + a = BD(b.nj(), 133); + uAd(this, a); + } + this.e = c2; + } + }; + _2.Fb = function WAd(a) { + return zAd(this, a); + }; + _2.Hb = function ZAd() { + return Etd(this.c); + }; + _2.Xc = function $Ad(a) { + return this.c.Xc(a); + }; + _2.rj = function _Ad() { + this.c = new yBd(this); + }; + _2.dc = function aBd() { + return this.f == 0; + }; + _2.Kc = function bBd() { + return this.c.Kc(); + }; + _2.Yc = function cBd() { + return this.c.Yc(); + }; + _2.Zc = function dBd(a) { + return this.c.Zc(a); + }; + _2.sj = function eBd() { + return FAd(this); + }; + _2.tj = function hBd(a, b, c2) { + return new zCd(a, b, c2); + }; + _2.uj = function iBd() { + return new EBd(); + }; + _2.Mc = function lBd(a) { + return JAd(this, a); + }; + _2.gc = function nBd() { + return this.f; + }; + _2.bd = function rBd(a, b) { + return new Jib(this.c, a, b); + }; + _2.Pc = function sBd() { + return this.c.Pc(); + }; + _2.Qc = function tBd(a) { + return this.c.Qc(a); + }; + _2.Ib = function uBd() { + return Htd(this.c); + }; + _2.e = 0; + _2.f = 0; + mdb(Tte, "BasicEMap", 705); + bcb(1033, 63, oue, yBd); + _2.bi = function zBd(a, b) { + vBd(this, BD(b, 133)); + }; + _2.ei = function BBd(a, b, c2) { + var d; + ++(d = this, BD(b, 133), d).a.e; + }; + _2.fi = function CBd(a, b) { + wBd(this, BD(b, 133)); + }; + _2.gi = function DBd(a, b, c2) { + xBd(this, BD(b, 133), BD(c2, 133)); + }; + _2.di = function ABd(a, b) { + tAd(this.a); + }; + mdb(Tte, "BasicEMap/1", 1033); + bcb(1034, 63, oue, EBd); + _2.ri = function FBd(a) { + return KC(I4, kve, 612, a, 0, 1); + }; + mdb(Tte, "BasicEMap/2", 1034); + bcb(1035, eie, fie, GBd); + _2.$b = function HBd() { + this.a.c.$b(); + }; + _2.Hc = function IBd(a) { + return qAd(this.a, a); + }; + _2.Kc = function JBd() { + return this.a.f == 0 ? (LCd(), KCd.a) : new dCd(this.a); + }; + _2.Mc = function KBd(a) { + var b; + b = this.a.f; + LAd(this.a, a); + return this.a.f != b; + }; + _2.gc = function LBd() { + return this.a.f; + }; + mdb(Tte, "BasicEMap/3", 1035); + bcb(1036, 28, die, MBd); + _2.$b = function NBd() { + this.a.c.$b(); + }; + _2.Hc = function OBd(a) { + return rAd(this.a, a); + }; + _2.Kc = function PBd() { + return this.a.f == 0 ? (LCd(), KCd.a) : new fCd(this.a); + }; + _2.gc = function QBd() { + return this.a.f; + }; + mdb(Tte, "BasicEMap/4", 1036); + bcb(1037, eie, fie, SBd); + _2.$b = function TBd() { + this.a.c.$b(); + }; + _2.Hc = function UBd(a) { + var b, c2, d, e, f2, g, h, i3, j; + if (this.a.f > 0 && JD(a, 42)) { + this.a.qj(); + i3 = BD(a, 42); + h = i3.cd(); + e = h == null ? 0 : tb(h); + f2 = DAd(this.a, e); + b = this.a.d[f2]; + if (b) { + c2 = BD(b.g, 367); + j = b.i; + for (g = 0; g < j; ++g) { + d = c2[g]; + if (d.Sh() == e && d.Fb(i3)) { + return true; + } + } + } + } + return false; + }; + _2.Kc = function VBd() { + return this.a.f == 0 ? (LCd(), KCd.a) : new ZBd(this.a); + }; + _2.Mc = function WBd(a) { + return RBd(this, a); + }; + _2.gc = function XBd() { + return this.a.f; + }; + mdb(Tte, "BasicEMap/5", 1037); + bcb(613, 1, aie, ZBd); + _2.Nb = function $Bd(a) { + Rrb(this, a); + }; + _2.Ob = function _Bd() { + return this.b != -1; + }; + _2.Pb = function aCd() { + var a; + if (this.f.e != this.c) { + throw vbb(new Apb()); + } + if (this.b == -1) { + throw vbb(new utb()); + } + this.d = this.a; + this.e = this.b; + YBd(this); + a = BD(this.f.d[this.d].g[this.e], 133); + return this.vj(a); + }; + _2.Qb = function bCd() { + if (this.f.e != this.c) { + throw vbb(new Apb()); + } + if (this.e == -1) { + throw vbb(new Ydb()); + } + this.f.c.Mc(qud(this.f.d[this.d], this.e)); + this.c = this.f.e; + this.e = -1; + this.a == this.d && this.b != -1 && --this.b; + }; + _2.vj = function cCd(a) { + return a; + }; + _2.a = 0; + _2.b = -1; + _2.c = 0; + _2.d = 0; + _2.e = 0; + mdb(Tte, "BasicEMap/BasicEMapIterator", 613); + bcb(1031, 613, aie, dCd); + _2.vj = function eCd(a) { + return a.cd(); + }; + mdb(Tte, "BasicEMap/BasicEMapKeyIterator", 1031); + bcb(1032, 613, aie, fCd); + _2.vj = function gCd(a) { + return a.dd(); + }; + mdb(Tte, "BasicEMap/BasicEMapValueIterator", 1032); + bcb(1030, 1, cie, iCd); + _2.wc = function oCd(a) { + stb(this, a); + }; + _2.yc = function tCd(a, b, c2) { + return ttb(this, a, b, c2); + }; + _2.$b = function jCd() { + this.a.c.$b(); + }; + _2._b = function kCd(a) { + return hCd(this, a); + }; + _2.uc = function lCd(a) { + return rAd(this.a, a); + }; + _2.vc = function mCd() { + return yAd(this.a); + }; + _2.Fb = function nCd(a) { + return zAd(this.a, a); + }; + _2.xc = function pCd(a) { + return AAd(this.a, a); + }; + _2.Hb = function qCd() { + return Etd(this.a.c); + }; + _2.dc = function rCd() { + return this.a.f == 0; + }; + _2.ec = function sCd() { + return EAd(this.a); + }; + _2.zc = function uCd(a, b) { + return HAd(this.a, a, b); + }; + _2.Bc = function vCd(a) { + return LAd(this.a, a); + }; + _2.gc = function wCd() { + return this.a.f; + }; + _2.Ib = function xCd() { + return Htd(this.a.c); + }; + _2.Cc = function yCd() { + return NAd(this.a); + }; + mdb(Tte, "BasicEMap/DelegatingMap", 1030); + bcb(612, 1, { 42: 1, 133: 1, 612: 1 }, zCd); + _2.Fb = function ACd(a) { + var b; + if (JD(a, 42)) { + b = BD(a, 42); + return (this.b != null ? pb(this.b, b.cd()) : PD(this.b) === PD(b.cd())) && (this.c != null ? pb(this.c, b.dd()) : PD(this.c) === PD(b.dd())); + } else { + return false; + } + }; + _2.Sh = function BCd() { + return this.a; + }; + _2.cd = function CCd() { + return this.b; + }; + _2.dd = function DCd() { + return this.c; + }; + _2.Hb = function ECd() { + return this.a ^ (this.c == null ? 0 : tb(this.c)); + }; + _2.Th = function FCd(a) { + this.a = a; + }; + _2.Uh = function GCd(a) { + throw vbb(new gz()); + }; + _2.ed = function HCd(a) { + var b; + b = this.c; + this.c = a; + return b; + }; + _2.Ib = function ICd() { + return this.b + "->" + this.c; + }; + _2.a = 0; + var I4 = mdb(Tte, "BasicEMap/EntryImpl", 612); + bcb(536, 1, {}, JCd); + mdb(Tte, "BasicEMap/View", 536); + var KCd; + bcb(768, 1, {}); + _2.Fb = function ZCd(a) { + return At((mmb(), jmb), a); + }; + _2.Hb = function $Cd() { + return qmb((mmb(), jmb)); + }; + _2.Ib = function _Cd() { + return Fe((mmb(), jmb)); + }; + mdb(Tte, "ECollections/BasicEmptyUnmodifiableEList", 768); + bcb(1312, 1, jie, aDd); + _2.Nb = function cDd(a) { + Rrb(this, a); + }; + _2.Rb = function bDd(a) { + throw vbb(new bgb()); + }; + _2.Ob = function dDd() { + return false; + }; + _2.Sb = function eDd() { + return false; + }; + _2.Pb = function fDd() { + throw vbb(new utb()); + }; + _2.Tb = function gDd() { + return 0; + }; + _2.Ub = function hDd() { + throw vbb(new utb()); + }; + _2.Vb = function iDd() { + return -1; + }; + _2.Qb = function jDd() { + throw vbb(new bgb()); + }; + _2.Wb = function kDd(a) { + throw vbb(new bgb()); + }; + mdb(Tte, "ECollections/BasicEmptyUnmodifiableEList/1", 1312); + bcb(1310, 768, { 20: 1, 14: 1, 15: 1, 58: 1 }, lDd); + _2.Vc = function mDd(a, b) { + OCd(); + }; + _2.Fc = function nDd(a) { + return PCd(); + }; + _2.Wc = function oDd(a, b) { + return QCd(); + }; + _2.Gc = function pDd(a) { + return RCd(); + }; + _2.$b = function qDd() { + SCd(); + }; + _2.Hc = function rDd(a) { + return false; + }; + _2.Ic = function sDd(a) { + return false; + }; + _2.Jc = function tDd(a) { + reb(this, a); + }; + _2.Xb = function uDd(a) { + return wmb((mmb(), a)), null; + }; + _2.Xc = function vDd(a) { + return -1; + }; + _2.dc = function wDd() { + return true; + }; + _2.Kc = function xDd() { + return this.a; + }; + _2.Yc = function yDd() { + return this.a; + }; + _2.Zc = function zDd(a) { + return this.a; + }; + _2.ii = function ADd(a, b) { + return TCd(); + }; + _2.ji = function BDd(a, b) { + UCd(); + }; + _2.Lc = function CDd() { + return new YAb(null, new Kub(this, 16)); + }; + _2.$c = function DDd(a) { + return VCd(); + }; + _2.Mc = function EDd(a) { + return WCd(); + }; + _2._c = function FDd(a, b) { + return XCd(); + }; + _2.gc = function GDd() { + return 0; + }; + _2.ad = function HDd(a) { + ktb(this, a); + }; + _2.Nc = function IDd() { + return new Kub(this, 16); + }; + _2.Oc = function JDd() { + return new YAb(null, new Kub(this, 16)); + }; + _2.bd = function KDd(a, b) { + return mmb(), new Jib(jmb, a, b); + }; + _2.Pc = function LDd() { + return De((mmb(), jmb)); + }; + _2.Qc = function MDd(a) { + return mmb(), Ee(jmb, a); + }; + mdb(Tte, "ECollections/EmptyUnmodifiableEList", 1310); + bcb(1311, 768, { 20: 1, 14: 1, 15: 1, 58: 1, 589: 1 }, NDd); + _2.Vc = function ODd(a, b) { + OCd(); + }; + _2.Fc = function PDd(a) { + return PCd(); + }; + _2.Wc = function QDd(a, b) { + return QCd(); + }; + _2.Gc = function RDd(a) { + return RCd(); + }; + _2.$b = function SDd() { + SCd(); + }; + _2.Hc = function TDd(a) { + return false; + }; + _2.Ic = function UDd(a) { + return false; + }; + _2.Jc = function VDd(a) { + reb(this, a); + }; + _2.Xb = function WDd(a) { + return wmb((mmb(), a)), null; + }; + _2.Xc = function XDd(a) { + return -1; + }; + _2.dc = function YDd() { + return true; + }; + _2.Kc = function ZDd() { + return this.a; + }; + _2.Yc = function $Dd() { + return this.a; + }; + _2.Zc = function _Dd(a) { + return this.a; + }; + _2.ii = function bEd(a, b) { + return TCd(); + }; + _2.ji = function cEd(a, b) { + UCd(); + }; + _2.Lc = function dEd() { + return new YAb(null, new Kub(this, 16)); + }; + _2.$c = function eEd(a) { + return VCd(); + }; + _2.Mc = function fEd(a) { + return WCd(); + }; + _2._c = function gEd(a, b) { + return XCd(); + }; + _2.gc = function hEd() { + return 0; + }; + _2.ad = function iEd(a) { + ktb(this, a); + }; + _2.Nc = function jEd() { + return new Kub(this, 16); + }; + _2.Oc = function kEd() { + return new YAb(null, new Kub(this, 16)); + }; + _2.bd = function lEd(a, b) { + return mmb(), new Jib(jmb, a, b); + }; + _2.Pc = function mEd() { + return De((mmb(), jmb)); + }; + _2.Qc = function nEd(a) { + return mmb(), Ee(jmb, a); + }; + _2.sj = function aEd() { + return mmb(), mmb(), kmb; + }; + mdb(Tte, "ECollections/EmptyUnmodifiableEMap", 1311); + var U4 = odb(Tte, "Enumerator"); + var oEd; + bcb(281, 1, { 281: 1 }, NEd); + _2.Fb = function REd(a) { + var b; + if (this === a) + return true; + if (!JD(a, 281)) + return false; + b = BD(a, 281); + return this.f == b.f && TEd(this.i, b.i) && SEd(this.a, (this.f & 256) != 0 ? (b.f & 256) != 0 ? b.a : null : (b.f & 256) != 0 ? null : b.a) && SEd(this.d, b.d) && SEd(this.g, b.g) && SEd(this.e, b.e) && KEd(this, b); + }; + _2.Hb = function WEd() { + return this.f; + }; + _2.Ib = function cFd() { + return LEd(this); + }; + _2.f = 0; + var sEd = 0, tEd = 0, uEd = 0, vEd = 0, wEd = 0, xEd = 0, yEd = 0, zEd = 0, AEd = 0, BEd, CEd = 0, DEd = 0, EEd = 0, FEd = 0, GEd, HEd; + mdb(Tte, "URI", 281); + bcb(1091, 43, fke, mFd); + _2.zc = function nFd(a, b) { + return BD(Shb(this, GD(a), BD(b, 281)), 281); + }; + mdb(Tte, "URI/URICache", 1091); + bcb(497, 63, oue, oFd, pFd); + _2.hi = function qFd() { + return true; + }; + mdb(Tte, "UniqueEList", 497); + bcb(581, 60, Tie, rFd); + mdb(Tte, "WrappedException", 581); + var a5 = odb(Vse, nve); + var v52 = odb(Vse, ove); + var t5 = odb(Vse, pve); + var b5 = odb(Vse, qve); + var d5 = odb(Vse, rve); + var c5 = odb(Vse, "EClass"); + var f5 = odb(Vse, "EDataType"); + var sFd; + bcb(1183, 43, fke, vFd); + _2.xc = function wFd(a) { + return ND(a) ? Phb(this, a) : Wd(irb(this.f, a)); + }; + mdb(Vse, "EDataType/Internal/ConversionDelegate/Factory/Registry/Impl", 1183); + var h5 = odb(Vse, "EEnum"); + var g5 = odb(Vse, sve); + var j5 = odb(Vse, tve); + var n5 = odb(Vse, uve); + var xFd; + var p5 = odb(Vse, vve); + var q5 = odb(Vse, wve); + bcb(1029, 1, {}, BFd); + _2.Ib = function CFd() { + return "NIL"; + }; + mdb(Vse, "EStructuralFeature/Internal/DynamicValueHolder/1", 1029); + var DFd; + bcb(1028, 43, fke, GFd); + _2.xc = function HFd(a) { + return ND(a) ? Phb(this, a) : Wd(irb(this.f, a)); + }; + mdb(Vse, "EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl", 1028); + var u5 = odb(Vse, xve); + var w5 = odb(Vse, "EValidator/PatternMatcher"); + var IFd; + var KFd; + var MFd; + var OFd, PFd, QFd, RFd, SFd, TFd, UFd, VFd, WFd, XFd, YFd, ZFd, $Fd, _Fd, aGd, bGd, cGd, dGd, eGd, fGd, gGd, hGd, iGd; + var E9 = odb(yve, "FeatureMap/Entry"); + bcb(535, 1, { 72: 1 }, kGd); + _2.ak = function lGd() { + return this.a; + }; + _2.dd = function mGd() { + return this.b; + }; + mdb(qte, "BasicEObjectImpl/1", 535); + bcb(1027, 1, zve, nGd); + _2.Wj = function oGd(a) { + return hid(this.a, this.b, a); + }; + _2.fj = function pGd() { + return nid(this.a, this.b); + }; + _2.Wb = function qGd(a) { + zid(this.a, this.b, a); + }; + _2.Xj = function rGd() { + Did(this.a, this.b); + }; + mdb(qte, "BasicEObjectImpl/4", 1027); + bcb(1983, 1, { 108: 1 }); + _2.bk = function uGd(a) { + this.e = a == 0 ? sGd : KC(SI, Uhe, 1, a, 5, 1); + }; + _2.Ch = function vGd(a) { + return this.e[a]; + }; + _2.Dh = function wGd(a, b) { + this.e[a] = b; + }; + _2.Eh = function xGd(a) { + this.e[a] = null; + }; + _2.ck = function yGd() { + return this.c; + }; + _2.dk = function zGd() { + throw vbb(new bgb()); + }; + _2.ek = function AGd() { + throw vbb(new bgb()); + }; + _2.fk = function BGd() { + return this.d; + }; + _2.gk = function CGd() { + return this.e != null; + }; + _2.hk = function DGd(a) { + this.c = a; + }; + _2.ik = function EGd(a) { + throw vbb(new bgb()); + }; + _2.jk = function FGd(a) { + throw vbb(new bgb()); + }; + _2.kk = function GGd(a) { + this.d = a; + }; + var sGd; + mdb(qte, "BasicEObjectImpl/EPropertiesHolderBaseImpl", 1983); + bcb(185, 1983, { 108: 1 }, HGd); + _2.dk = function IGd() { + return this.a; + }; + _2.ek = function JGd() { + return this.b; + }; + _2.ik = function KGd(a) { + this.a = a; + }; + _2.jk = function LGd(a) { + this.b = a; + }; + mdb(qte, "BasicEObjectImpl/EPropertiesHolderImpl", 185); + bcb(506, 97, pte, MGd); + _2.Kg = function NGd() { + return this.f; + }; + _2.Pg = function OGd() { + return this.k; + }; + _2.Rg = function PGd(a, b) { + this.g = a; + this.i = b; + }; + _2.Tg = function QGd() { + return (this.j & 2) == 0 ? this.zh() : this.ph().ck(); + }; + _2.Vg = function RGd() { + return this.i; + }; + _2.Mg = function SGd() { + return (this.j & 1) != 0; + }; + _2.eh = function TGd() { + return this.g; + }; + _2.kh = function UGd() { + return (this.j & 4) != 0; + }; + _2.ph = function VGd() { + return !this.k && (this.k = new HGd()), this.k; + }; + _2.th = function WGd(a) { + this.ph().hk(a); + a ? this.j |= 2 : this.j &= -3; + }; + _2.vh = function XGd(a) { + this.ph().jk(a); + a ? this.j |= 4 : this.j &= -5; + }; + _2.zh = function YGd() { + return (NFd(), MFd).S; + }; + _2.i = 0; + _2.j = 1; + mdb(qte, "EObjectImpl", 506); + bcb(780, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 108: 1, 49: 1, 97: 1 }, _Gd); + _2.Ch = function aHd(a) { + return this.e[a]; + }; + _2.Dh = function bHd(a, b) { + this.e[a] = b; + }; + _2.Eh = function cHd(a) { + this.e[a] = null; + }; + _2.Tg = function dHd() { + return this.d; + }; + _2.Yg = function eHd(a) { + return bLd(this.d, a); + }; + _2.$g = function fHd() { + return this.d; + }; + _2.dh = function gHd() { + return this.e != null; + }; + _2.ph = function hHd() { + !this.k && (this.k = new vHd()); + return this.k; + }; + _2.th = function iHd(a) { + this.d = a; + }; + _2.yh = function jHd() { + var a; + if (this.e == null) { + a = aLd(this.d); + this.e = a == 0 ? ZGd : KC(SI, Uhe, 1, a, 5, 1); + } + return this; + }; + _2.Ah = function kHd() { + return 0; + }; + var ZGd; + mdb(qte, "DynamicEObjectImpl", 780); + bcb(1376, 780, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1 }, lHd); + _2.Fb = function nHd(a) { + return this === a; + }; + _2.Hb = function rHd() { + return FCb(this); + }; + _2.th = function mHd(a) { + this.d = a; + this.b = YKd(a, "key"); + this.c = YKd(a, Bte); + }; + _2.Sh = function oHd() { + var a; + if (this.a == -1) { + a = iid(this, this.b); + this.a = a == null ? 0 : tb(a); + } + return this.a; + }; + _2.cd = function pHd() { + return iid(this, this.b); + }; + _2.dd = function qHd() { + return iid(this, this.c); + }; + _2.Th = function sHd(a) { + this.a = a; + }; + _2.Uh = function tHd(a) { + zid(this, this.b, a); + }; + _2.ed = function uHd(a) { + var b; + b = iid(this, this.c); + zid(this, this.c, a); + return b; + }; + _2.a = 0; + mdb(qte, "DynamicEObjectImpl/BasicEMapEntry", 1376); + bcb(1377, 1, { 108: 1 }, vHd); + _2.bk = function wHd(a) { + throw vbb(new bgb()); + }; + _2.Ch = function xHd(a) { + throw vbb(new bgb()); + }; + _2.Dh = function yHd(a, b) { + throw vbb(new bgb()); + }; + _2.Eh = function zHd(a) { + throw vbb(new bgb()); + }; + _2.ck = function AHd() { + throw vbb(new bgb()); + }; + _2.dk = function BHd() { + return this.a; + }; + _2.ek = function CHd() { + return this.b; + }; + _2.fk = function DHd() { + return this.c; + }; + _2.gk = function EHd() { + throw vbb(new bgb()); + }; + _2.hk = function FHd(a) { + throw vbb(new bgb()); + }; + _2.ik = function GHd(a) { + this.a = a; + }; + _2.jk = function HHd(a) { + this.b = a; + }; + _2.kk = function IHd(a) { + this.c = a; + }; + mdb(qte, "DynamicEObjectImpl/DynamicEPropertiesHolderImpl", 1377); + bcb(510, 150, { 105: 1, 92: 1, 90: 1, 590: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 510: 1, 150: 1, 114: 1, 115: 1 }, RHd); + _2.Qg = function SHd(a) { + return KHd(this, a); + }; + _2._g = function THd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.d; + case 2: + return c2 ? (!this.b && (this.b = new sId((jGd(), fGd), x6, this)), this.b) : (!this.b && (this.b = new sId((jGd(), fGd), x6, this)), FAd(this.b)); + case 3: + return MHd(this); + case 4: + return !this.a && (this.a = new xMd(m5, this, 4)), this.a; + case 5: + return !this.c && (this.c = new _4d(m5, this, 5)), this.c; + } + return bid(this, a - aLd((jGd(), OFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? OFd : d), a), b, c2); + }; + _2.hh = function UHd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 3: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? KHd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return JHd(this, BD(a, 147), c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), OFd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((jGd(), OFd)), a, c2); + }; + _2.jh = function VHd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 2: + return !this.b && (this.b = new sId((jGd(), fGd), x6, this)), bId(this.b, a, c2); + case 3: + return JHd(this, null, c2); + case 4: + return !this.a && (this.a = new xMd(m5, this, 4)), Txd(this.a, a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), OFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), OFd)), a, c2); + }; + _2.lh = function WHd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.d != null; + case 2: + return !!this.b && this.b.f != 0; + case 3: + return !!MHd(this); + case 4: + return !!this.a && this.a.i != 0; + case 5: + return !!this.c && this.c.i != 0; + } + return cid(this, a - aLd((jGd(), OFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? OFd : b), a)); + }; + _2.sh = function XHd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + OHd(this, GD(b)); + return; + case 2: + !this.b && (this.b = new sId((jGd(), fGd), x6, this)); + cId(this.b, b); + return; + case 3: + NHd(this, BD(b, 147)); + return; + case 4: + !this.a && (this.a = new xMd(m5, this, 4)); + Uxd(this.a); + !this.a && (this.a = new xMd(m5, this, 4)); + ytd(this.a, BD(b, 14)); + return; + case 5: + !this.c && (this.c = new _4d(m5, this, 5)); + Uxd(this.c); + !this.c && (this.c = new _4d(m5, this, 5)); + ytd(this.c, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), OFd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? OFd : c2), a), b); + }; + _2.zh = function YHd() { + return jGd(), OFd; + }; + _2.Bh = function ZHd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + PHd(this, null); + return; + case 2: + !this.b && (this.b = new sId((jGd(), fGd), x6, this)); + this.b.c.$b(); + return; + case 3: + NHd(this, null); + return; + case 4: + !this.a && (this.a = new xMd(m5, this, 4)); + Uxd(this.a); + return; + case 5: + !this.c && (this.c = new _4d(m5, this, 5)); + Uxd(this.c); + return; + } + eid(this, a - aLd((jGd(), OFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? OFd : b), a)); + }; + _2.Ib = function $Hd() { + return QHd(this); + }; + _2.d = null; + mdb(qte, "EAnnotationImpl", 510); + bcb(151, 705, Ave, dId); + _2.Xh = function eId(a, b) { + _Hd(this, a, BD(b, 42)); + }; + _2.lk = function fId(a, b) { + return aId(this, BD(a, 42), b); + }; + _2.pi = function gId(a) { + return BD(BD(this.c, 69).pi(a), 133); + }; + _2.Zh = function hId() { + return BD(this.c, 69).Zh(); + }; + _2.$h = function iId() { + return BD(this.c, 69).$h(); + }; + _2._h = function jId(a) { + return BD(this.c, 69)._h(a); + }; + _2.mk = function kId(a, b) { + return bId(this, a, b); + }; + _2.Wj = function lId(a) { + return BD(this.c, 76).Wj(a); + }; + _2.rj = function mId() { + }; + _2.fj = function nId() { + return BD(this.c, 76).fj(); + }; + _2.tj = function oId(a, b, c2) { + var d; + d = BD(bKd(this.b).Nh().Jh(this.b), 133); + d.Th(a); + d.Uh(b); + d.ed(c2); + return d; + }; + _2.uj = function pId() { + return new W5d(this); + }; + _2.Wb = function qId(a) { + cId(this, a); + }; + _2.Xj = function rId() { + BD(this.c, 76).Xj(); + }; + mdb(yve, "EcoreEMap", 151); + bcb(158, 151, Ave, sId); + _2.qj = function tId() { + var a, b, c2, d, e, f2; + if (this.d == null) { + f2 = KC(y4, jve, 63, 2 * this.f + 1, 0, 1); + for (c2 = this.c.Kc(); c2.e != c2.i.gc(); ) { + b = BD(c2.nj(), 133); + d = b.Sh(); + e = (d & Ohe) % f2.length; + a = f2[e]; + !a && (a = f2[e] = new W5d(this)); + a.Fc(b); + } + this.d = f2; + } + }; + mdb(qte, "EAnnotationImpl/1", 158); + bcb(284, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 284: 1, 114: 1, 115: 1 }); + _2._g = function GId(a, b, c2) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), this.$j() ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c2); + }; + _2.jh = function HId(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 9: + return vId(this, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c2); + }; + _2.lh = function IId(a) { + var b, c2; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return this.$j(); + case 7: + return c2 = this.s, c2 >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.sh = function JId(a, b) { + var c2, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + this.Lh(GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + this.ok(BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + } + did(this, a - aLd(this.zh()), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? this.zh() : c2), a), b); + }; + _2.zh = function KId() { + return jGd(), hGd; + }; + _2.Bh = function LId(a) { + var b, c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + this.Lh(null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + this.ok(1); + return; + case 8: + yId(this, null); + return; + case 9: + c2 = xId(this, null, null); + !!c2 && c2.Fi(); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.Gh = function MId() { + wId(this); + this.Bb |= 1; + }; + _2.Yj = function NId() { + return wId(this); + }; + _2.Zj = function OId() { + return this.t; + }; + _2.$j = function PId() { + var a; + return a = this.t, a > 1 || a == -1; + }; + _2.hi = function QId() { + return (this.Bb & 512) != 0; + }; + _2.nk = function RId(a, b) { + return zId(this, a, b); + }; + _2.ok = function SId(a) { + DId(this, a); + }; + _2.Ib = function TId() { + return EId(this); + }; + _2.s = 0; + _2.t = 1; + mdb(qte, "ETypedElementImpl", 284); + bcb(449, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }); + _2.Qg = function iJd(a) { + return UId(this, a); + }; + _2._g = function jJd(a, b, c2) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), this.$j() ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return Bcb(), (this.Bb & zte) != 0 ? true : false; + case 11: + return Bcb(), (this.Bb & Dve) != 0 ? true : false; + case 12: + return Bcb(), (this.Bb & Rje) != 0 ? true : false; + case 13: + return this.j; + case 14: + return VId(this); + case 15: + return Bcb(), (this.Bb & Cve) != 0 ? true : false; + case 16: + return Bcb(), (this.Bb & oie) != 0 ? true : false; + case 17: + return WId(this); + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c2); + }; + _2.hh = function kJd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 17: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? UId(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 17, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd(this.zh()), a, c2); + }; + _2.jh = function lJd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 9: + return vId(this, c2); + case 17: + return _hd(this, null, 17, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c2); + }; + _2.lh = function mJd(a) { + var b, c2; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return this.$j(); + case 7: + return c2 = this.s, c2 >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return (this.Bb & zte) == 0; + case 11: + return (this.Bb & Dve) != 0; + case 12: + return (this.Bb & Rje) != 0; + case 13: + return this.j != null; + case 14: + return VId(this) != null; + case 15: + return (this.Bb & Cve) != 0; + case 16: + return (this.Bb & oie) != 0; + case 17: + return !!WId(this); + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.sh = function nJd(a, b) { + var c2, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + cJd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + this.ok(BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 10: + ZId(this, Ccb(DD(b))); + return; + case 11: + fJd(this, Ccb(DD(b))); + return; + case 12: + dJd(this, Ccb(DD(b))); + return; + case 13: + $Id(this, GD(b)); + return; + case 15: + eJd(this, Ccb(DD(b))); + return; + case 16: + aJd(this, Ccb(DD(b))); + return; + } + did(this, a - aLd(this.zh()), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? this.zh() : c2), a), b); + }; + _2.zh = function oJd() { + return jGd(), gGd; + }; + _2.Bh = function pJd(a) { + var b, c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 4); + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + this.ok(1); + return; + case 8: + yId(this, null); + return; + case 9: + c2 = xId(this, null, null); + !!c2 && c2.Fi(); + return; + case 10: + ZId(this, true); + return; + case 11: + fJd(this, false); + return; + case 12: + dJd(this, false); + return; + case 13: + this.i = null; + _Id(this, null); + return; + case 15: + eJd(this, false); + return; + case 16: + aJd(this, false); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.Gh = function qJd() { + a2d(q1d((O6d(), M6d), this)); + wId(this); + this.Bb |= 1; + }; + _2.Gj = function rJd() { + return this.f; + }; + _2.zj = function sJd() { + return VId(this); + }; + _2.Hj = function tJd() { + return WId(this); + }; + _2.Lj = function uJd() { + return null; + }; + _2.pk = function vJd() { + return this.k; + }; + _2.aj = function wJd() { + return this.n; + }; + _2.Mj = function xJd() { + return XId(this); + }; + _2.Nj = function yJd() { + var a, b, c2, d, e, f2, g, h, i3; + if (!this.p) { + c2 = WId(this); + (c2.i == null && TKd(c2), c2.i).length; + d = this.Lj(); + !!d && aLd(WId(d)); + e = wId(this); + g = e.Bj(); + a = !g ? null : (g.i & 1) != 0 ? g == sbb ? wI : g == WD ? JI : g == VD ? FI : g == UD ? BI : g == XD ? MI : g == rbb ? UI : g == SD ? xI : yI : g; + b = VId(this); + h = e.zj(); + n6d(this); + (this.Bb & oie) != 0 && (!!(f2 = t1d((O6d(), M6d), c2)) && f2 != this || !!(f2 = _1d(q1d(M6d, this)))) ? this.p = new zVd(this, f2) : this.$j() ? this.rk() ? !d ? (this.Bb & Cve) != 0 ? !a ? this.sk() ? this.p = new KVd(42, this) : this.p = new KVd(0, this) : a == CK ? this.p = new IVd(50, J4, this) : this.sk() ? this.p = new IVd(43, a, this) : this.p = new IVd(1, a, this) : !a ? this.sk() ? this.p = new KVd(44, this) : this.p = new KVd(2, this) : a == CK ? this.p = new IVd(41, J4, this) : this.sk() ? this.p = new IVd(45, a, this) : this.p = new IVd(3, a, this) : (this.Bb & Cve) != 0 ? !a ? this.sk() ? this.p = new LVd(46, this, d) : this.p = new LVd(4, this, d) : this.sk() ? this.p = new JVd(47, a, this, d) : this.p = new JVd(5, a, this, d) : !a ? this.sk() ? this.p = new LVd(48, this, d) : this.p = new LVd(6, this, d) : this.sk() ? this.p = new JVd(49, a, this, d) : this.p = new JVd(7, a, this, d) : JD(e, 148) ? a == E9 ? this.p = new KVd(40, this) : (this.Bb & 512) != 0 ? (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(8, this) : this.p = new IVd(9, a, this) : !a ? this.p = new KVd(10, this) : this.p = new IVd(11, a, this) : (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(12, this) : this.p = new IVd(13, a, this) : !a ? this.p = new KVd(14, this) : this.p = new IVd(15, a, this) : !d ? this.sk() ? (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(16, this) : this.p = new IVd(17, a, this) : !a ? this.p = new KVd(18, this) : this.p = new IVd(19, a, this) : (this.Bb & Cve) != 0 ? !a ? this.p = new KVd(20, this) : this.p = new IVd(21, a, this) : !a ? this.p = new KVd(22, this) : this.p = new IVd(23, a, this) : (i3 = d.t, i3 > 1 || i3 == -1 ? this.sk() ? (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(24, this, d) : this.p = new JVd(25, a, this, d) : !a ? this.p = new LVd(26, this, d) : this.p = new JVd(27, a, this, d) : (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(28, this, d) : this.p = new JVd(29, a, this, d) : !a ? this.p = new LVd(30, this, d) : this.p = new JVd(31, a, this, d) : this.sk() ? (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(32, this, d) : this.p = new JVd(33, a, this, d) : !a ? this.p = new LVd(34, this, d) : this.p = new JVd(35, a, this, d) : (this.Bb & Cve) != 0 ? !a ? this.p = new LVd(36, this, d) : this.p = new JVd(37, a, this, d) : !a ? this.p = new LVd(38, this, d) : this.p = new JVd(39, a, this, d)) : this.qk() ? this.sk() ? this.p = new kWd(BD(e, 26), this, d) : this.p = new cWd(BD(e, 26), this, d) : JD(e, 148) ? a == E9 ? this.p = new KVd(40, this) : (this.Bb & Cve) != 0 ? !a ? this.p = new jXd(BD(e, 148), b, h, this) : this.p = new lXd(b, h, this, (CWd(), g == WD ? yWd : g == sbb ? tWd : g == XD ? zWd : g == VD ? xWd : g == UD ? wWd : g == rbb ? BWd : g == SD ? uWd : g == TD ? vWd : AWd)) : !a ? this.p = new cXd(BD(e, 148), b, h, this) : this.p = new eXd(b, h, this, (CWd(), g == WD ? yWd : g == sbb ? tWd : g == XD ? zWd : g == VD ? xWd : g == UD ? wWd : g == rbb ? BWd : g == SD ? uWd : g == TD ? vWd : AWd)) : this.rk() ? !d ? (this.Bb & Cve) != 0 ? this.sk() ? this.p = new FXd(BD(e, 26), this) : this.p = new DXd(BD(e, 26), this) : this.sk() ? this.p = new BXd(BD(e, 26), this) : this.p = new zXd(BD(e, 26), this) : (this.Bb & Cve) != 0 ? this.sk() ? this.p = new NXd(BD(e, 26), this, d) : this.p = new LXd(BD(e, 26), this, d) : this.sk() ? this.p = new JXd(BD(e, 26), this, d) : this.p = new HXd(BD(e, 26), this, d) : this.sk() ? !d ? (this.Bb & Cve) != 0 ? this.p = new RXd(BD(e, 26), this) : this.p = new PXd(BD(e, 26), this) : (this.Bb & Cve) != 0 ? this.p = new VXd(BD(e, 26), this, d) : this.p = new TXd(BD(e, 26), this, d) : !d ? (this.Bb & Cve) != 0 ? this.p = new XXd(BD(e, 26), this) : this.p = new nXd(BD(e, 26), this) : (this.Bb & Cve) != 0 ? this.p = new _Xd(BD(e, 26), this, d) : this.p = new ZXd(BD(e, 26), this, d); + } + return this.p; + }; + _2.Ij = function zJd() { + return (this.Bb & zte) != 0; + }; + _2.qk = function AJd() { + return false; + }; + _2.rk = function BJd() { + return false; + }; + _2.Jj = function CJd() { + return (this.Bb & oie) != 0; + }; + _2.Oj = function DJd() { + return YId(this); + }; + _2.sk = function EJd() { + return false; + }; + _2.Kj = function FJd() { + return (this.Bb & Cve) != 0; + }; + _2.tk = function GJd(a) { + this.k = a; + }; + _2.Lh = function HJd(a) { + cJd(this, a); + }; + _2.Ib = function IJd() { + return gJd(this); + }; + _2.e = false; + _2.n = 0; + mdb(qte, "EStructuralFeatureImpl", 449); + bcb(322, 449, { 105: 1, 92: 1, 90: 1, 34: 1, 147: 1, 191: 1, 56: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 322: 1, 150: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }, OJd); + _2._g = function PJd(a, b, c2) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), LJd(this) ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return Bcb(), (this.Bb & zte) != 0 ? true : false; + case 11: + return Bcb(), (this.Bb & Dve) != 0 ? true : false; + case 12: + return Bcb(), (this.Bb & Rje) != 0 ? true : false; + case 13: + return this.j; + case 14: + return VId(this); + case 15: + return Bcb(), (this.Bb & Cve) != 0 ? true : false; + case 16: + return Bcb(), (this.Bb & oie) != 0 ? true : false; + case 17: + return WId(this); + case 18: + return Bcb(), (this.Bb & ote) != 0 ? true : false; + case 19: + if (b) + return KJd(this); + return JJd(this); + } + return bid(this, a - aLd((jGd(), PFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? PFd : d), a), b, c2); + }; + _2.lh = function QJd(a) { + var b, c2; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return LJd(this); + case 7: + return c2 = this.s, c2 >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return (this.Bb & zte) == 0; + case 11: + return (this.Bb & Dve) != 0; + case 12: + return (this.Bb & Rje) != 0; + case 13: + return this.j != null; + case 14: + return VId(this) != null; + case 15: + return (this.Bb & Cve) != 0; + case 16: + return (this.Bb & oie) != 0; + case 17: + return !!WId(this); + case 18: + return (this.Bb & ote) != 0; + case 19: + return !!JJd(this); + } + return cid(this, a - aLd((jGd(), PFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? PFd : b), a)); + }; + _2.sh = function RJd(a, b) { + var c2, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + cJd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + NJd(this, BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 10: + ZId(this, Ccb(DD(b))); + return; + case 11: + fJd(this, Ccb(DD(b))); + return; + case 12: + dJd(this, Ccb(DD(b))); + return; + case 13: + $Id(this, GD(b)); + return; + case 15: + eJd(this, Ccb(DD(b))); + return; + case 16: + aJd(this, Ccb(DD(b))); + return; + case 18: + MJd(this, Ccb(DD(b))); + return; + } + did(this, a - aLd((jGd(), PFd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? PFd : c2), a), b); + }; + _2.zh = function SJd() { + return jGd(), PFd; + }; + _2.Bh = function TJd(a) { + var b, c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 4); + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + this.b = 0; + DId(this, 1); + return; + case 8: + yId(this, null); + return; + case 9: + c2 = xId(this, null, null); + !!c2 && c2.Fi(); + return; + case 10: + ZId(this, true); + return; + case 11: + fJd(this, false); + return; + case 12: + dJd(this, false); + return; + case 13: + this.i = null; + _Id(this, null); + return; + case 15: + eJd(this, false); + return; + case 16: + aJd(this, false); + return; + case 18: + MJd(this, false); + return; + } + eid(this, a - aLd((jGd(), PFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? PFd : b), a)); + }; + _2.Gh = function UJd() { + KJd(this); + a2d(q1d((O6d(), M6d), this)); + wId(this); + this.Bb |= 1; + }; + _2.$j = function VJd() { + return LJd(this); + }; + _2.nk = function WJd(a, b) { + this.b = 0; + this.a = null; + return zId(this, a, b); + }; + _2.ok = function XJd(a) { + NJd(this, a); + }; + _2.Ib = function YJd() { + var a; + if ((this.Db & 64) != 0) + return gJd(this); + a = new Jfb(gJd(this)); + a.a += " (iD: "; + Ffb(a, (this.Bb & ote) != 0); + a.a += ")"; + return a.a; + }; + _2.b = 0; + mdb(qte, "EAttributeImpl", 322); + bcb(351, 438, { 105: 1, 92: 1, 90: 1, 138: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 150: 1, 114: 1, 115: 1, 676: 1 }); + _2.uk = function nKd(a) { + return a.Tg() == this; + }; + _2.Qg = function oKd(a) { + return aKd(this, a); + }; + _2.Rg = function pKd(a, b) { + this.w = null; + this.Db = b << 16 | this.Db & 255; + this.Cb = a; + }; + _2._g = function qKd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return this.zj(); + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c2); + }; + _2.hh = function rKd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 6: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? aKd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 6, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd(this.zh()), a, c2); + }; + _2.jh = function sKd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 6: + return _hd(this, null, 6, c2); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), Txd(this.A, a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd(this.zh()), a, c2); + }; + _2.lh = function tKd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return this.zj() != null; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.sh = function uKd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + } + did(this, a - aLd(this.zh()), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? this.zh() : c2), a), b); + }; + _2.zh = function vKd() { + return jGd(), RFd; + }; + _2.Bh = function wKd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.yj = function xKd() { + var a; + return this.G == -1 && (this.G = (a = bKd(this), a ? HLd(a.Mh(), this) : -1)), this.G; + }; + _2.zj = function yKd() { + return null; + }; + _2.Aj = function zKd() { + return bKd(this); + }; + _2.vk = function AKd() { + return this.v; + }; + _2.Bj = function BKd() { + return dKd(this); + }; + _2.Cj = function CKd() { + return this.D != null ? this.D : this.B; + }; + _2.Dj = function DKd() { + return this.F; + }; + _2.wj = function EKd(a) { + return fKd(this, a); + }; + _2.wk = function FKd(a) { + this.v = a; + }; + _2.xk = function GKd(a) { + gKd(this, a); + }; + _2.yk = function HKd(a) { + this.C = a; + }; + _2.Lh = function IKd(a) { + lKd(this, a); + }; + _2.Ib = function JKd() { + return mKd(this); + }; + _2.C = null; + _2.D = null; + _2.G = -1; + mdb(qte, "EClassifierImpl", 351); + bcb(88, 351, { 105: 1, 92: 1, 90: 1, 26: 1, 138: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 88: 1, 351: 1, 150: 1, 473: 1, 114: 1, 115: 1, 676: 1 }, hLd); + _2.uk = function iLd(a) { + return dLd(this, a.Tg()); + }; + _2._g = function jLd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return null; + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + case 8: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 9: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 10: + return _Kd(this); + case 11: + return !this.q && (this.q = new cUd(n5, this, 11, 10)), this.q; + case 12: + return OKd(this); + case 13: + return SKd(this); + case 14: + return SKd(this), this.r; + case 15: + return OKd(this), this.k; + case 16: + return PKd(this); + case 17: + return RKd(this); + case 18: + return TKd(this); + case 19: + return UKd(this); + case 20: + return OKd(this), this.o; + case 21: + return !this.s && (this.s = new cUd(t5, this, 21, 17)), this.s; + case 22: + return VKd(this); + case 23: + return QKd(this); + } + return bid(this, a - aLd((jGd(), QFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? QFd : d), a), b, c2); + }; + _2.hh = function kLd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 6: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? aKd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 6, c2); + case 11: + return !this.q && (this.q = new cUd(n5, this, 11, 10)), Sxd(this.q, a, c2); + case 21: + return !this.s && (this.s = new cUd(t5, this, 21, 17)), Sxd(this.s, a, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), QFd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((jGd(), QFd)), a, c2); + }; + _2.jh = function lLd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 6: + return _hd(this, null, 6, c2); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), Txd(this.A, a, c2); + case 11: + return !this.q && (this.q = new cUd(n5, this, 11, 10)), Txd(this.q, a, c2); + case 21: + return !this.s && (this.s = new cUd(t5, this, 21, 17)), Txd(this.s, a, c2); + case 22: + return Txd(VKd(this), a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), QFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), QFd)), a, c2); + }; + _2.lh = function mLd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return false; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) != 0; + case 9: + return (this.Bb & 512) != 0; + case 10: + return !!this.u && VKd(this.u.a).i != 0 && !(!!this.n && FMd(this.n)); + case 11: + return !!this.q && this.q.i != 0; + case 12: + return OKd(this).i != 0; + case 13: + return SKd(this).i != 0; + case 14: + return SKd(this), this.r.i != 0; + case 15: + return OKd(this), this.k.i != 0; + case 16: + return PKd(this).i != 0; + case 17: + return RKd(this).i != 0; + case 18: + return TKd(this).i != 0; + case 19: + return UKd(this).i != 0; + case 20: + return OKd(this), !!this.o; + case 21: + return !!this.s && this.s.i != 0; + case 22: + return !!this.n && FMd(this.n); + case 23: + return QKd(this).i != 0; + } + return cid(this, a - aLd((jGd(), QFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? QFd : b), a)); + }; + _2.oh = function nLd(a) { + var b; + b = this.i == null || !!this.q && this.q.i != 0 ? null : YKd(this, a); + return b ? b : Bmd(this, a); + }; + _2.sh = function oLd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + case 8: + eLd(this, Ccb(DD(b))); + return; + case 9: + fLd(this, Ccb(DD(b))); + return; + case 10: + vwd(_Kd(this)); + ytd(_Kd(this), BD(b, 14)); + return; + case 11: + !this.q && (this.q = new cUd(n5, this, 11, 10)); + Uxd(this.q); + !this.q && (this.q = new cUd(n5, this, 11, 10)); + ytd(this.q, BD(b, 14)); + return; + case 21: + !this.s && (this.s = new cUd(t5, this, 21, 17)); + Uxd(this.s); + !this.s && (this.s = new cUd(t5, this, 21, 17)); + ytd(this.s, BD(b, 14)); + return; + case 22: + Uxd(VKd(this)); + ytd(VKd(this), BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), QFd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? QFd : c2), a), b); + }; + _2.zh = function pLd() { + return jGd(), QFd; + }; + _2.Bh = function qLd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + case 8: + eLd(this, false); + return; + case 9: + fLd(this, false); + return; + case 10: + !!this.u && vwd(this.u); + return; + case 11: + !this.q && (this.q = new cUd(n5, this, 11, 10)); + Uxd(this.q); + return; + case 21: + !this.s && (this.s = new cUd(t5, this, 21, 17)); + Uxd(this.s); + return; + case 22: + !!this.n && Uxd(this.n); + return; + } + eid(this, a - aLd((jGd(), QFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? QFd : b), a)); + }; + _2.Gh = function rLd() { + var a, b; + OKd(this); + SKd(this); + PKd(this); + RKd(this); + TKd(this); + UKd(this); + QKd(this); + oud(SMd($Kd(this))); + if (this.s) { + for (a = 0, b = this.s.i; a < b; ++a) { + Cmd(qud(this.s, a)); + } + } + if (this.q) { + for (a = 0, b = this.q.i; a < b; ++a) { + Cmd(qud(this.q, a)); + } + } + o1d((O6d(), M6d), this).ne(); + this.Bb |= 1; + }; + _2.Ib = function sLd() { + return gLd(this); + }; + _2.k = null; + _2.r = null; + var KKd, LKd, MKd; + mdb(qte, "EClassImpl", 88); + bcb(1994, 1993, Ove); + _2.Vh = function tLd(a, b) { + return Pxd(this, a, b); + }; + _2.Wh = function uLd(a) { + return Pxd(this, this.i, a); + }; + _2.Xh = function vLd(a, b) { + Qxd(this, a, b); + }; + _2.Yh = function wLd(a) { + Rxd(this, a); + }; + _2.lk = function xLd(a, b) { + return Sxd(this, a, b); + }; + _2.pi = function yLd(a) { + return nud(this, a); + }; + _2.mk = function CLd(a, b) { + return Txd(this, a, b); + }; + _2.mi = function DLd(a, b) { + return Zxd(this, a, b); + }; + _2.Zh = function zLd() { + return new $yd(this); + }; + _2.$h = function ALd() { + return new bzd(this); + }; + _2._h = function BLd(a) { + return ztd(this, a); + }; + mdb(yve, "NotifyingInternalEListImpl", 1994); + bcb(622, 1994, Pve); + _2.Hc = function NLd(a) { + return ELd(this, a); + }; + _2.Zi = function OLd(a, b, c2, d, e) { + return FLd(this, a, b, c2, d, e); + }; + _2.$i = function PLd(a) { + GLd(this, a); + }; + _2.Wj = function QLd(a) { + return this; + }; + _2.ak = function RLd() { + return XKd(this.e.Tg(), this.aj()); + }; + _2._i = function SLd() { + return this.ak(); + }; + _2.aj = function TLd() { + return bLd(this.e.Tg(), this.ak()); + }; + _2.zk = function ULd() { + return BD(this.ak().Yj(), 26).Bj(); + }; + _2.Ak = function VLd() { + return zUd(BD(this.ak(), 18)).n; + }; + _2.Ai = function WLd() { + return this.e; + }; + _2.Bk = function XLd() { + return true; + }; + _2.Ck = function YLd() { + return false; + }; + _2.Dk = function ZLd() { + return false; + }; + _2.Ek = function $Ld() { + return false; + }; + _2.Xc = function _Ld(a) { + return HLd(this, a); + }; + _2.cj = function aMd(a, b) { + var c2; + return c2 = BD(a, 49), this.Dk() ? this.Bk() ? c2.gh(this.e, this.Ak(), this.zk(), b) : c2.gh(this.e, bLd(c2.Tg(), zUd(BD(this.ak(), 18))), null, b) : c2.gh(this.e, -1 - this.aj(), null, b); + }; + _2.dj = function bMd(a, b) { + var c2; + return c2 = BD(a, 49), this.Dk() ? this.Bk() ? c2.ih(this.e, this.Ak(), this.zk(), b) : c2.ih(this.e, bLd(c2.Tg(), zUd(BD(this.ak(), 18))), null, b) : c2.ih(this.e, -1 - this.aj(), null, b); + }; + _2.rk = function cMd() { + return false; + }; + _2.Fk = function dMd() { + return true; + }; + _2.wj = function eMd(a) { + return qEd(this.d, a); + }; + _2.ej = function fMd() { + return oid(this.e); + }; + _2.fj = function gMd() { + return this.i != 0; + }; + _2.ri = function hMd(a) { + return izd(this.d, a); + }; + _2.li = function iMd(a, b) { + return this.Fk() && this.Ek() ? ILd(this, a, BD(b, 56)) : b; + }; + _2.Gk = function jMd(a) { + return a.kh() ? xid(this.e, BD(a, 49)) : a; + }; + _2.Wb = function kMd(a) { + JLd(this, a); + }; + _2.Pc = function lMd() { + return KLd(this); + }; + _2.Qc = function mMd(a) { + var b; + if (this.Ek()) { + for (b = this.i - 1; b >= 0; --b) { + qud(this, b); + } + } + return xud(this, a); + }; + _2.Xj = function nMd() { + Uxd(this); + }; + _2.oi = function oMd(a, b) { + return LLd(this, a, b); + }; + mdb(yve, "EcoreEList", 622); + bcb(496, 622, Pve, pMd); + _2.ai = function qMd() { + return false; + }; + _2.aj = function rMd() { + return this.c; + }; + _2.bj = function sMd() { + return false; + }; + _2.Fk = function tMd() { + return true; + }; + _2.hi = function uMd() { + return true; + }; + _2.li = function vMd(a, b) { + return b; + }; + _2.ni = function wMd() { + return false; + }; + _2.c = 0; + mdb(yve, "EObjectEList", 496); + bcb(85, 496, Pve, xMd); + _2.bj = function yMd() { + return true; + }; + _2.Dk = function zMd() { + return false; + }; + _2.rk = function AMd() { + return true; + }; + mdb(yve, "EObjectContainmentEList", 85); + bcb(545, 85, Pve, BMd); + _2.ci = function CMd() { + this.b = true; + }; + _2.fj = function DMd() { + return this.b; + }; + _2.Xj = function EMd() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.b; + this.b = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.b = false; + } + }; + _2.b = false; + mdb(yve, "EObjectContainmentEList/Unsettable", 545); + bcb(1140, 545, Pve, JMd); + _2.ii = function NMd(a, b) { + var c2, d; + return c2 = BD(Wxd(this, a, b), 87), oid(this.e) && GLd(this, new ESd(this.a, 7, (jGd(), SFd), meb(b), (d = c2.c, JD(d, 88) ? BD(d, 26) : _Fd), a)), c2; + }; + _2.jj = function OMd(a, b) { + return GMd(this, BD(a, 87), b); + }; + _2.kj = function PMd(a, b) { + return HMd(this, BD(a, 87), b); + }; + _2.lj = function QMd(a, b, c2) { + return IMd(this, BD(a, 87), BD(b, 87), c2); + }; + _2.Zi = function KMd(a, b, c2, d, e) { + switch (a) { + case 3: { + return FLd(this, a, b, c2, d, this.i > 1); + } + case 5: { + return FLd(this, a, b, c2, d, this.i - BD(c2, 15).gc() > 0); + } + default: { + return new pSd(this.e, a, this.c, b, c2, d, true); + } + } + }; + _2.ij = function LMd() { + return true; + }; + _2.fj = function MMd() { + return FMd(this); + }; + _2.Xj = function RMd() { + Uxd(this); + }; + mdb(qte, "EClassImpl/1", 1140); + bcb(1154, 1153, dve); + _2.ui = function VMd(a) { + var b, c2, d, e, f2, g, h; + c2 = a.xi(); + if (c2 != 8) { + d = UMd(a); + if (d == 0) { + switch (c2) { + case 1: + case 9: { + h = a.Bi(); + if (h != null) { + b = $Kd(BD(h, 473)); + !b.c && (b.c = new xYd()); + Ftd(b.c, a.Ai()); + } + g = a.zi(); + if (g != null) { + e = BD(g, 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + wtd(b.c, BD(a.Ai(), 26)); + } + } + break; + } + case 3: { + g = a.zi(); + if (g != null) { + e = BD(g, 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + wtd(b.c, BD(a.Ai(), 26)); + } + } + break; + } + case 5: { + g = a.zi(); + if (g != null) { + for (f2 = BD(g, 14).Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + wtd(b.c, BD(a.Ai(), 26)); + } + } + } + break; + } + case 4: { + h = a.Bi(); + if (h != null) { + e = BD(h, 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + Ftd(b.c, a.Ai()); + } + } + break; + } + case 6: { + h = a.Bi(); + if (h != null) { + for (f2 = BD(h, 14).Kc(); f2.Ob(); ) { + e = BD(f2.Pb(), 473); + if ((e.Bb & 1) == 0) { + b = $Kd(e); + !b.c && (b.c = new xYd()); + Ftd(b.c, a.Ai()); + } + } + } + break; + } + } + } + this.Hk(d); + } + }; + _2.Hk = function WMd(a) { + TMd(this, a); + }; + _2.b = 63; + mdb(qte, "ESuperAdapter", 1154); + bcb(1155, 1154, dve, YMd); + _2.Hk = function ZMd(a) { + XMd(this, a); + }; + mdb(qte, "EClassImpl/10", 1155); + bcb(1144, 696, Pve); + _2.Vh = function $Md(a, b) { + return iud(this, a, b); + }; + _2.Wh = function _Md(a) { + return jud(this, a); + }; + _2.Xh = function aNd(a, b) { + kud(this, a, b); + }; + _2.Yh = function bNd(a) { + lud(this, a); + }; + _2.pi = function dNd(a) { + return nud(this, a); + }; + _2.mi = function lNd(a, b) { + return uud(this, a, b); + }; + _2.lk = function cNd(a, b) { + throw vbb(new bgb()); + }; + _2.Zh = function eNd() { + return new $yd(this); + }; + _2.$h = function fNd() { + return new bzd(this); + }; + _2._h = function gNd(a) { + return ztd(this, a); + }; + _2.mk = function hNd(a, b) { + throw vbb(new bgb()); + }; + _2.Wj = function iNd(a) { + return this; + }; + _2.fj = function jNd() { + return this.i != 0; + }; + _2.Wb = function kNd(a) { + throw vbb(new bgb()); + }; + _2.Xj = function mNd() { + throw vbb(new bgb()); + }; + mdb(yve, "EcoreEList/UnmodifiableEList", 1144); + bcb(319, 1144, Pve, nNd); + _2.ni = function oNd() { + return false; + }; + mdb(yve, "EcoreEList/UnmodifiableEList/FastCompare", 319); + bcb(1147, 319, Pve, rNd); + _2.Xc = function sNd(a) { + var b, c2, d; + if (JD(a, 170)) { + b = BD(a, 170); + c2 = b.aj(); + if (c2 != -1) { + for (d = this.i; c2 < d; ++c2) { + if (PD(this.g[c2]) === PD(a)) { + return c2; + } + } + } + } + return -1; + }; + mdb(qte, "EClassImpl/1EAllStructuralFeaturesList", 1147); + bcb(1141, 497, oue, wNd); + _2.ri = function xNd(a) { + return KC(j5, Tve, 87, a, 0, 1); + }; + _2.ni = function yNd() { + return false; + }; + mdb(qte, "EClassImpl/1EGenericSuperTypeEList", 1141); + bcb(623, 497, oue, zNd); + _2.ri = function ANd(a) { + return KC(t5, Mve, 170, a, 0, 1); + }; + _2.ni = function BNd() { + return false; + }; + mdb(qte, "EClassImpl/1EStructuralFeatureUniqueEList", 623); + bcb(741, 497, oue, CNd); + _2.ri = function DNd(a) { + return KC(q5, Mve, 18, a, 0, 1); + }; + _2.ni = function ENd() { + return false; + }; + mdb(qte, "EClassImpl/1ReferenceList", 741); + bcb(1142, 497, oue, GNd); + _2.bi = function HNd(a, b) { + FNd(this, BD(b, 34)); + }; + _2.ri = function INd(a) { + return KC(b5, Mve, 34, a, 0, 1); + }; + _2.ni = function JNd() { + return false; + }; + mdb(qte, "EClassImpl/2", 1142); + bcb(1143, 497, oue, KNd); + _2.ri = function LNd(a) { + return KC(b5, Mve, 34, a, 0, 1); + }; + _2.ni = function MNd() { + return false; + }; + mdb(qte, "EClassImpl/3", 1143); + bcb(1145, 319, Pve, PNd); + _2.Fc = function QNd(a) { + return NNd(this, BD(a, 34)); + }; + _2.Yh = function RNd(a) { + ONd(this, BD(a, 34)); + }; + mdb(qte, "EClassImpl/4", 1145); + bcb(1146, 319, Pve, UNd); + _2.Fc = function VNd(a) { + return SNd(this, BD(a, 18)); + }; + _2.Yh = function WNd(a) { + TNd(this, BD(a, 18)); + }; + mdb(qte, "EClassImpl/5", 1146); + bcb(1148, 497, oue, XNd); + _2.ri = function YNd(a) { + return KC(n5, Nve, 59, a, 0, 1); + }; + _2.ni = function ZNd() { + return false; + }; + mdb(qte, "EClassImpl/6", 1148); + bcb(1149, 497, oue, $Nd); + _2.ri = function _Nd(a) { + return KC(q5, Mve, 18, a, 0, 1); + }; + _2.ni = function aOd() { + return false; + }; + mdb(qte, "EClassImpl/7", 1149); + bcb(1997, 1996, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 67: 1, 58: 1, 69: 1 }); + _2.Vh = function bOd(a, b) { + return qwd(this, a, b); + }; + _2.Wh = function cOd(a) { + return qwd(this, this.Vi(), a); + }; + _2.Xh = function dOd(a, b) { + rwd(this, a, b); + }; + _2.Yh = function eOd(a) { + swd(this, a); + }; + _2.lk = function fOd(a, b) { + return twd(this, a, b); + }; + _2.mk = function lOd(a, b) { + return uwd(this, a, b); + }; + _2.mi = function mOd(a, b) { + return wwd(this, a, b); + }; + _2.pi = function gOd(a) { + return this.Oi(a); + }; + _2.Zh = function hOd() { + return new $yd(this); + }; + _2.Gi = function iOd() { + return this.Ji(); + }; + _2.$h = function jOd() { + return new bzd(this); + }; + _2._h = function kOd(a) { + return ztd(this, a); + }; + mdb(yve, "DelegatingNotifyingInternalEListImpl", 1997); + bcb(742, 1997, Uve); + _2.ai = function rOd() { + var a; + a = XKd(wjd(this.b), this.aj()).Yj(); + return JD(a, 148) && !JD(a, 457) && (a.Bj().i & 1) == 0; + }; + _2.Hc = function sOd(a) { + var b, c2, d, e, f2, g, h, i3; + if (this.Fk()) { + i3 = this.Vi(); + if (i3 > 4) { + if (this.wj(a)) { + if (this.rk()) { + d = BD(a, 49); + c2 = d.Ug(); + h = c2 == this.b && (this.Dk() ? d.Og(d.Vg(), BD(XKd(wjd(this.b), this.aj()).Yj(), 26).Bj()) == zUd(BD(XKd(wjd(this.b), this.aj()), 18)).n : -1 - d.Vg() == this.aj()); + if (this.Ek() && !h && !c2 && !!d.Zg()) { + for (e = 0; e < i3; ++e) { + b = oOd(this, this.Oi(e)); + if (PD(b) === PD(a)) { + return true; + } + } + } + return h; + } else if (this.Dk() && !this.Ck()) { + f2 = BD(a, 56).ah(zUd(BD(XKd(wjd(this.b), this.aj()), 18))); + if (PD(f2) === PD(this.b)) { + return true; + } else if (f2 == null || !BD(f2, 56).kh()) { + return false; + } + } + } else { + return false; + } + } + g = this.Li(a); + if (this.Ek() && !g) { + for (e = 0; e < i3; ++e) { + d = oOd(this, this.Oi(e)); + if (PD(d) === PD(a)) { + return true; + } + } + } + return g; + } else { + return this.Li(a); + } + }; + _2.Zi = function tOd(a, b, c2, d, e) { + return new pSd(this.b, a, this.aj(), b, c2, d, e); + }; + _2.$i = function uOd(a) { + Uhd(this.b, a); + }; + _2.Wj = function vOd(a) { + return this; + }; + _2._i = function wOd() { + return XKd(wjd(this.b), this.aj()); + }; + _2.aj = function xOd() { + return bLd(wjd(this.b), XKd(wjd(this.b), this.aj())); + }; + _2.Ai = function yOd() { + return this.b; + }; + _2.Bk = function zOd() { + return !!XKd(wjd(this.b), this.aj()).Yj().Bj(); + }; + _2.bj = function AOd() { + var a, b; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + return (a.Bb & ote) != 0 || !!zUd(BD(b, 18)); + } else { + return false; + } + }; + _2.Ck = function BOd() { + var a, b, c2, d; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + c2 = zUd(a); + return !!c2 && (d = c2.t, d > 1 || d == -1); + } else { + return false; + } + }; + _2.Dk = function COd() { + var a, b, c2; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + c2 = zUd(a); + return !!c2; + } else { + return false; + } + }; + _2.Ek = function DOd() { + var a, b; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + return (a.Bb & Tje) != 0; + } else { + return false; + } + }; + _2.Xc = function EOd(a) { + var b, c2, d, e; + d = this.Qi(a); + if (d >= 0) + return d; + if (this.Fk()) { + for (c2 = 0, e = this.Vi(); c2 < e; ++c2) { + b = oOd(this, this.Oi(c2)); + if (PD(b) === PD(a)) { + return c2; + } + } + } + return -1; + }; + _2.cj = function FOd(a, b) { + var c2; + return c2 = BD(a, 49), this.Dk() ? this.Bk() ? c2.gh(this.b, zUd(BD(XKd(wjd(this.b), this.aj()), 18)).n, BD(XKd(wjd(this.b), this.aj()).Yj(), 26).Bj(), b) : c2.gh(this.b, bLd(c2.Tg(), zUd(BD(XKd(wjd(this.b), this.aj()), 18))), null, b) : c2.gh(this.b, -1 - this.aj(), null, b); + }; + _2.dj = function GOd(a, b) { + var c2; + return c2 = BD(a, 49), this.Dk() ? this.Bk() ? c2.ih(this.b, zUd(BD(XKd(wjd(this.b), this.aj()), 18)).n, BD(XKd(wjd(this.b), this.aj()).Yj(), 26).Bj(), b) : c2.ih(this.b, bLd(c2.Tg(), zUd(BD(XKd(wjd(this.b), this.aj()), 18))), null, b) : c2.ih(this.b, -1 - this.aj(), null, b); + }; + _2.rk = function HOd() { + var a, b; + b = XKd(wjd(this.b), this.aj()); + if (JD(b, 99)) { + a = BD(b, 18); + return (a.Bb & ote) != 0; + } else { + return false; + } + }; + _2.Fk = function IOd() { + return JD(XKd(wjd(this.b), this.aj()).Yj(), 88); + }; + _2.wj = function JOd(a) { + return XKd(wjd(this.b), this.aj()).Yj().wj(a); + }; + _2.ej = function KOd() { + return oid(this.b); + }; + _2.fj = function LOd() { + return !this.Ri(); + }; + _2.hi = function MOd() { + return XKd(wjd(this.b), this.aj()).hi(); + }; + _2.li = function NOd(a, b) { + return nOd(this, a, b); + }; + _2.Wb = function OOd(a) { + vwd(this); + ytd(this, BD(a, 15)); + }; + _2.Pc = function POd() { + var a; + if (this.Ek()) { + for (a = this.Vi() - 1; a >= 0; --a) { + nOd(this, a, this.Oi(a)); + } + } + return this.Wi(); + }; + _2.Qc = function QOd(a) { + var b; + if (this.Ek()) { + for (b = this.Vi() - 1; b >= 0; --b) { + nOd(this, b, this.Oi(b)); + } + } + return this.Xi(a); + }; + _2.Xj = function ROd() { + vwd(this); + }; + _2.oi = function SOd(a, b) { + return pOd(this, a, b); + }; + mdb(yve, "DelegatingEcoreEList", 742); + bcb(1150, 742, Uve, YOd); + _2.Hi = function _Od(a, b) { + TOd(this, a, BD(b, 26)); + }; + _2.Ii = function aPd(a) { + UOd(this, BD(a, 26)); + }; + _2.Oi = function gPd(a) { + var b, c2; + return b = BD(qud(VKd(this.a), a), 87), c2 = b.c, JD(c2, 88) ? BD(c2, 26) : (jGd(), _Fd); + }; + _2.Ti = function lPd(a) { + var b, c2; + return b = BD(Xxd(VKd(this.a), a), 87), c2 = b.c, JD(c2, 88) ? BD(c2, 26) : (jGd(), _Fd); + }; + _2.Ui = function mPd(a, b) { + return WOd(this, a, BD(b, 26)); + }; + _2.ai = function ZOd() { + return false; + }; + _2.Zi = function $Od(a, b, c2, d, e) { + return null; + }; + _2.Ji = function bPd() { + return new EPd(this); + }; + _2.Ki = function cPd() { + Uxd(VKd(this.a)); + }; + _2.Li = function dPd(a) { + return VOd(this, a); + }; + _2.Mi = function ePd(a) { + var b, c2; + for (c2 = a.Kc(); c2.Ob(); ) { + b = c2.Pb(); + if (!VOd(this, b)) { + return false; + } + } + return true; + }; + _2.Ni = function fPd(a) { + var b, c2, d; + if (JD(a, 15)) { + d = BD(a, 15); + if (d.gc() == VKd(this.a).i) { + for (b = d.Kc(), c2 = new Fyd(this); b.Ob(); ) { + if (PD(b.Pb()) !== PD(Dyd(c2))) { + return false; + } + } + return true; + } + } + return false; + }; + _2.Pi = function hPd() { + var a, b, c2, d, e; + c2 = 1; + for (b = new Fyd(VKd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + d = (e = a.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)); + c2 = 31 * c2 + (!d ? 0 : FCb(d)); + } + return c2; + }; + _2.Qi = function iPd(a) { + var b, c2, d, e; + d = 0; + for (c2 = new Fyd(VKd(this.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 87); + if (PD(a) === PD((e = b.c, JD(e, 88) ? BD(e, 26) : (jGd(), _Fd)))) { + return d; + } + ++d; + } + return -1; + }; + _2.Ri = function jPd() { + return VKd(this.a).i == 0; + }; + _2.Si = function kPd() { + return null; + }; + _2.Vi = function nPd() { + return VKd(this.a).i; + }; + _2.Wi = function oPd() { + var a, b, c2, d, e, f2; + f2 = VKd(this.a).i; + e = KC(SI, Uhe, 1, f2, 5, 1); + c2 = 0; + for (b = new Fyd(VKd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + e[c2++] = (d = a.c, JD(d, 88) ? BD(d, 26) : (jGd(), _Fd)); + } + return e; + }; + _2.Xi = function pPd(a) { + var b, c2, d, e, f2, g, h; + h = VKd(this.a).i; + if (a.length < h) { + e = izd(rb(a).c, h); + a = e; + } + a.length > h && NC(a, h, null); + d = 0; + for (c2 = new Fyd(VKd(this.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 87); + f2 = (g = b.c, JD(g, 88) ? BD(g, 26) : (jGd(), _Fd)); + NC(a, d++, f2); + } + return a; + }; + _2.Yi = function qPd() { + var a, b, c2, d, e; + e = new Hfb(); + e.a += "["; + a = VKd(this.a); + for (b = 0, d = VKd(this.a).i; b < d; ) { + Efb(e, xfb((c2 = BD(qud(a, b), 87).c, JD(c2, 88) ? BD(c2, 26) : (jGd(), _Fd)))); + ++b < d && (e.a += She, e); + } + e.a += "]"; + return e.a; + }; + _2.$i = function rPd(a) { + }; + _2.aj = function sPd() { + return 10; + }; + _2.Bk = function tPd() { + return true; + }; + _2.bj = function uPd() { + return false; + }; + _2.Ck = function vPd() { + return false; + }; + _2.Dk = function wPd() { + return false; + }; + _2.Ek = function xPd() { + return true; + }; + _2.rk = function yPd() { + return false; + }; + _2.Fk = function zPd() { + return true; + }; + _2.wj = function APd(a) { + return JD(a, 88); + }; + _2.fj = function BPd() { + return cLd(this.a); + }; + _2.hi = function CPd() { + return true; + }; + _2.ni = function DPd() { + return true; + }; + mdb(qte, "EClassImpl/8", 1150); + bcb(1151, 1964, Lie, EPd); + _2.Zc = function FPd(a) { + return ztd(this.a, a); + }; + _2.gc = function GPd() { + return VKd(this.a.a).i; + }; + mdb(qte, "EClassImpl/8/1", 1151); + bcb(1152, 497, oue, HPd); + _2.ri = function IPd(a) { + return KC(d5, Uhe, 138, a, 0, 1); + }; + _2.ni = function JPd() { + return false; + }; + mdb(qte, "EClassImpl/9", 1152); + bcb(1139, 53, gke, KPd); + mdb(qte, "EClassImpl/MyHashSet", 1139); + bcb(566, 351, { 105: 1, 92: 1, 90: 1, 138: 1, 148: 1, 834: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 150: 1, 114: 1, 115: 1, 676: 1 }, MPd); + _2._g = function NPd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return this.zj(); + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + case 8: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + } + return bid(this, a - aLd(this.zh()), XKd((d = BD(Ajd(this, 16), 26), !d ? this.zh() : d), a), b, c2); + }; + _2.lh = function OPd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return this.zj() != null; + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) == 0; + } + return cid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.sh = function PPd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + case 8: + LPd(this, Ccb(DD(b))); + return; + } + did(this, a - aLd(this.zh()), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? this.zh() : c2), a), b); + }; + _2.zh = function QPd() { + return jGd(), TFd; + }; + _2.Bh = function RPd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + case 8: + LPd(this, true); + return; + } + eid(this, a - aLd(this.zh()), XKd((b = BD(Ajd(this, 16), 26), !b ? this.zh() : b), a)); + }; + _2.Gh = function SPd() { + o1d((O6d(), M6d), this).ne(); + this.Bb |= 1; + }; + _2.Fj = function TPd() { + var a, b, c2; + if (!this.c) { + a = l6d(bKd(this)); + if (!a.dc()) { + for (c2 = a.Kc(); c2.Ob(); ) { + b = GD(c2.Pb()); + !!Dmd(this, b) && k6d(this); + } + } + } + return this.b; + }; + _2.zj = function UPd() { + var b; + if (!this.e) { + b = null; + try { + b = dKd(this); + } catch (a) { + a = ubb(a); + if (!JD(a, 102)) + throw vbb(a); + } + this.d = null; + !!b && (b.i & 1) != 0 && (b == sbb ? this.d = (Bcb(), zcb) : b == WD ? this.d = meb(0) : b == VD ? this.d = new Ndb(0) : b == UD ? this.d = 0 : b == XD ? this.d = Aeb(0) : b == rbb ? this.d = Web(0) : b == SD ? this.d = Scb(0) : this.d = bdb(0)); + this.e = true; + } + return this.d; + }; + _2.Ej = function VPd() { + return (this.Bb & 256) != 0; + }; + _2.Ik = function WPd(a) { + a && (this.D = "org.eclipse.emf.common.util.AbstractEnumerator"); + }; + _2.xk = function XPd(a) { + gKd(this, a); + this.Ik(a); + }; + _2.yk = function YPd(a) { + this.C = a; + this.e = false; + }; + _2.Ib = function ZPd() { + var a; + if ((this.Db & 64) != 0) + return mKd(this); + a = new Jfb(mKd(this)); + a.a += " (serializable: "; + Ffb(a, (this.Bb & 256) != 0); + a.a += ")"; + return a.a; + }; + _2.c = false; + _2.d = null; + _2.e = false; + mdb(qte, "EDataTypeImpl", 566); + bcb(457, 566, { 105: 1, 92: 1, 90: 1, 138: 1, 148: 1, 834: 1, 671: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 351: 1, 457: 1, 150: 1, 114: 1, 115: 1, 676: 1 }, aQd); + _2._g = function bQd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return this.D != null ? this.D : this.B; + case 3: + return dKd(this); + case 4: + return $Pd(this); + case 5: + return this.F; + case 6: + if (b) + return bKd(this); + return ZJd(this); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), this.A; + case 8: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 9: + return !this.a && (this.a = new cUd(g5, this, 9, 5)), this.a; + } + return bid(this, a - aLd((jGd(), UFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? UFd : d), a), b, c2); + }; + _2.hh = function cQd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 6: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? aKd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 6, c2); + case 9: + return !this.a && (this.a = new cUd(g5, this, 9, 5)), Sxd(this.a, a, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), UFd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((jGd(), UFd)), a, c2); + }; + _2.jh = function dQd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 6: + return _hd(this, null, 6, c2); + case 7: + return !this.A && (this.A = new K4d(u5, this, 7)), Txd(this.A, a, c2); + case 9: + return !this.a && (this.a = new cUd(g5, this, 9, 5)), Txd(this.a, a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), UFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), UFd)), a, c2); + }; + _2.lh = function eQd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.D != null && this.D == this.F; + case 3: + return !!dKd(this); + case 4: + return !!$Pd(this); + case 5: + return this.F != null && this.F != this.D && this.F != this.B; + case 6: + return !!ZJd(this); + case 7: + return !!this.A && this.A.i != 0; + case 8: + return (this.Bb & 256) == 0; + case 9: + return !!this.a && this.a.i != 0; + } + return cid(this, a - aLd((jGd(), UFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? UFd : b), a)); + }; + _2.sh = function fQd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + lKd(this, GD(b)); + return; + case 2: + iKd(this, GD(b)); + return; + case 5: + kKd(this, GD(b)); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + !this.A && (this.A = new K4d(u5, this, 7)); + ytd(this.A, BD(b, 14)); + return; + case 8: + LPd(this, Ccb(DD(b))); + return; + case 9: + !this.a && (this.a = new cUd(g5, this, 9, 5)); + Uxd(this.a); + !this.a && (this.a = new cUd(g5, this, 9, 5)); + ytd(this.a, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), UFd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? UFd : c2), a), b); + }; + _2.zh = function gQd() { + return jGd(), UFd; + }; + _2.Bh = function hQd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 179) && (BD(this.Cb, 179).tb = null); + pnd(this, null); + return; + case 2: + $Jd(this, null); + _Jd(this, this.D); + return; + case 5: + kKd(this, null); + return; + case 7: + !this.A && (this.A = new K4d(u5, this, 7)); + Uxd(this.A); + return; + case 8: + LPd(this, true); + return; + case 9: + !this.a && (this.a = new cUd(g5, this, 9, 5)); + Uxd(this.a); + return; + } + eid(this, a - aLd((jGd(), UFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? UFd : b), a)); + }; + _2.Gh = function iQd() { + var a, b; + if (this.a) { + for (a = 0, b = this.a.i; a < b; ++a) { + Cmd(qud(this.a, a)); + } + } + o1d((O6d(), M6d), this).ne(); + this.Bb |= 1; + }; + _2.zj = function jQd() { + return $Pd(this); + }; + _2.wj = function kQd(a) { + if (a != null) { + return true; + } + return false; + }; + _2.Ik = function lQd(a) { + }; + mdb(qte, "EEnumImpl", 457); + bcb(573, 438, { 105: 1, 92: 1, 90: 1, 1940: 1, 678: 1, 147: 1, 191: 1, 56: 1, 108: 1, 49: 1, 97: 1, 573: 1, 150: 1, 114: 1, 115: 1 }, rQd); + _2.ne = function AQd() { + return this.zb; + }; + _2.Qg = function sQd(a) { + return mQd(this, a); + }; + _2._g = function tQd(a, b, c2) { + var d, e; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return meb(this.d); + case 3: + return this.b ? this.b : this.a; + case 4: + return e = this.c, e == null ? this.zb : e; + case 5: + return this.Db >> 16 == 5 ? BD(this.Cb, 671) : null; + } + return bid(this, a - aLd((jGd(), VFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? VFd : d), a), b, c2); + }; + _2.hh = function uQd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 5: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? mQd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 5, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), VFd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((jGd(), VFd)), a, c2); + }; + _2.jh = function vQd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 5: + return _hd(this, null, 5, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), VFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), VFd)), a, c2); + }; + _2.lh = function wQd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return this.d != 0; + case 3: + return !!this.b; + case 4: + return this.c != null; + case 5: + return !!(this.Db >> 16 == 5 ? BD(this.Cb, 671) : null); + } + return cid(this, a - aLd((jGd(), VFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? VFd : b), a)); + }; + _2.sh = function xQd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + qQd(this, BD(b, 19).a); + return; + case 3: + oQd(this, BD(b, 1940)); + return; + case 4: + pQd(this, GD(b)); + return; + } + did(this, a - aLd((jGd(), VFd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? VFd : c2), a), b); + }; + _2.zh = function yQd() { + return jGd(), VFd; + }; + _2.Bh = function zQd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + qQd(this, 0); + return; + case 3: + oQd(this, null); + return; + case 4: + pQd(this, null); + return; + } + eid(this, a - aLd((jGd(), VFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? VFd : b), a)); + }; + _2.Ib = function BQd() { + var a; + return a = this.c, a == null ? this.zb : a; + }; + _2.b = null; + _2.c = null; + _2.d = 0; + mdb(qte, "EEnumLiteralImpl", 573); + var c6 = odb(qte, "EFactoryImpl/InternalEDateTimeFormat"); + bcb(489, 1, { 2015: 1 }, EQd); + mdb(qte, "EFactoryImpl/1ClientInternalEDateTimeFormat", 489); + bcb(241, 115, { 105: 1, 92: 1, 90: 1, 87: 1, 56: 1, 108: 1, 49: 1, 97: 1, 241: 1, 114: 1, 115: 1 }, UQd); + _2.Sg = function VQd(a, b, c2) { + var d; + c2 = _hd(this, a, b, c2); + if (!!this.e && JD(a, 170)) { + d = MQd(this, this.e); + d != this.c && (c2 = QQd(this, d, c2)); + } + return c2; + }; + _2._g = function WQd(a, b, c2) { + var d; + switch (a) { + case 0: + return this.f; + case 1: + return !this.d && (this.d = new xMd(j5, this, 1)), this.d; + case 2: + if (b) + return KQd(this); + return this.c; + case 3: + return this.b; + case 4: + return this.e; + case 5: + if (b) + return JQd(this); + return this.a; + } + return bid(this, a - aLd((jGd(), XFd)), XKd((d = BD(Ajd(this, 16), 26), !d ? XFd : d), a), b, c2); + }; + _2.jh = function XQd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return IQd(this, null, c2); + case 1: + return !this.d && (this.d = new xMd(j5, this, 1)), Txd(this.d, a, c2); + case 3: + return GQd(this, null, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), XFd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), XFd)), a, c2); + }; + _2.lh = function YQd(a) { + var b; + switch (a) { + case 0: + return !!this.f; + case 1: + return !!this.d && this.d.i != 0; + case 2: + return !!this.c; + case 3: + return !!this.b; + case 4: + return !!this.e; + case 5: + return !!this.a; + } + return cid(this, a - aLd((jGd(), XFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? XFd : b), a)); + }; + _2.sh = function ZQd(a, b) { + var c2; + switch (a) { + case 0: + SQd(this, BD(b, 87)); + return; + case 1: + !this.d && (this.d = new xMd(j5, this, 1)); + Uxd(this.d); + !this.d && (this.d = new xMd(j5, this, 1)); + ytd(this.d, BD(b, 14)); + return; + case 3: + PQd(this, BD(b, 87)); + return; + case 4: + RQd(this, BD(b, 836)); + return; + case 5: + NQd(this, BD(b, 138)); + return; + } + did(this, a - aLd((jGd(), XFd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? XFd : c2), a), b); + }; + _2.zh = function $Qd() { + return jGd(), XFd; + }; + _2.Bh = function _Qd(a) { + var b; + switch (a) { + case 0: + SQd(this, null); + return; + case 1: + !this.d && (this.d = new xMd(j5, this, 1)); + Uxd(this.d); + return; + case 3: + PQd(this, null); + return; + case 4: + RQd(this, null); + return; + case 5: + NQd(this, null); + return; + } + eid(this, a - aLd((jGd(), XFd)), XKd((b = BD(Ajd(this, 16), 26), !b ? XFd : b), a)); + }; + _2.Ib = function aRd() { + var a; + a = new Wfb(Eid(this)); + a.a += " (expression: "; + TQd(this, a); + a.a += ")"; + return a.a; + }; + var FQd; + mdb(qte, "EGenericTypeImpl", 241); + bcb(1969, 1964, Vve); + _2.Xh = function cRd(a, b) { + bRd(this, a, b); + }; + _2.lk = function dRd(a, b) { + bRd(this, this.gc(), a); + return b; + }; + _2.pi = function eRd(a) { + return Ut(this.Gi(), a); + }; + _2.Zh = function fRd() { + return this.$h(); + }; + _2.Gi = function gRd() { + return new O0d(this); + }; + _2.$h = function hRd() { + return this._h(0); + }; + _2._h = function iRd(a) { + return this.Gi().Zc(a); + }; + _2.mk = function jRd(a, b) { + ze(this, a, true); + return b; + }; + _2.ii = function kRd(a, b) { + var c2, d; + d = Vt(this, b); + c2 = this.Zc(a); + c2.Rb(d); + return d; + }; + _2.ji = function lRd(a, b) { + var c2; + ze(this, b, true); + c2 = this.Zc(a); + c2.Rb(b); + }; + mdb(yve, "AbstractSequentialInternalEList", 1969); + bcb(486, 1969, Vve, qRd); + _2.pi = function rRd(a) { + return Ut(this.Gi(), a); + }; + _2.Zh = function sRd() { + if (this.b == null) { + return LRd(), LRd(), KRd; + } + return this.Jk(); + }; + _2.Gi = function tRd() { + return new w4d(this.a, this.b); + }; + _2.$h = function uRd() { + if (this.b == null) { + return LRd(), LRd(), KRd; + } + return this.Jk(); + }; + _2._h = function vRd(a) { + var b, c2; + if (this.b == null) { + if (a < 0 || a > 1) { + throw vbb(new qcb(gve + a + ", size=0")); + } + return LRd(), LRd(), KRd; + } + c2 = this.Jk(); + for (b = 0; b < a; ++b) { + MRd(c2); + } + return c2; + }; + _2.dc = function wRd() { + var a, b, c2, d, e, f2; + if (this.b != null) { + for (c2 = 0; c2 < this.b.length; ++c2) { + a = this.b[c2]; + if (!this.Mk() || this.a.mh(a)) { + f2 = this.a.bh(a, false); + Q6d(); + if (BD(a, 66).Oj()) { + b = BD(f2, 153); + for (d = 0, e = b.gc(); d < e; ++d) { + if (oRd(b.il(d)) && b.jl(d) != null) { + return false; + } + } + } else if (a.$j()) { + if (!BD(f2, 14).dc()) { + return false; + } + } else if (f2 != null) { + return false; + } + } + } + } + return true; + }; + _2.Kc = function xRd() { + return pRd(this); + }; + _2.Zc = function yRd(a) { + var b, c2; + if (this.b == null) { + if (a != 0) { + throw vbb(new qcb(gve + a + ", size=0")); + } + return LRd(), LRd(), KRd; + } + c2 = this.Lk() ? this.Kk() : this.Jk(); + for (b = 0; b < a; ++b) { + MRd(c2); + } + return c2; + }; + _2.ii = function zRd(a, b) { + throw vbb(new bgb()); + }; + _2.ji = function ARd(a, b) { + throw vbb(new bgb()); + }; + _2.Jk = function BRd() { + return new RRd(this.a, this.b); + }; + _2.Kk = function CRd() { + return new dSd(this.a, this.b); + }; + _2.Lk = function DRd() { + return true; + }; + _2.gc = function ERd() { + var a, b, c2, d, e, f2, g; + e = 0; + if (this.b != null) { + for (c2 = 0; c2 < this.b.length; ++c2) { + a = this.b[c2]; + if (!this.Mk() || this.a.mh(a)) { + g = this.a.bh(a, false); + Q6d(); + if (BD(a, 66).Oj()) { + b = BD(g, 153); + for (d = 0, f2 = b.gc(); d < f2; ++d) { + oRd(b.il(d)) && b.jl(d) != null && ++e; + } + } else + a.$j() ? e += BD(g, 14).gc() : g != null && ++e; + } + } + } + return e; + }; + _2.Mk = function FRd() { + return true; + }; + var mRd; + mdb(yve, "EContentsEList", 486); + bcb(1156, 486, Vve, GRd); + _2.Jk = function HRd() { + return new hSd(this.a, this.b); + }; + _2.Kk = function IRd() { + return new fSd(this.a, this.b); + }; + _2.Mk = function JRd() { + return false; + }; + mdb(qte, "ENamedElementImpl/1", 1156); + bcb(279, 1, Wve, RRd); + _2.Nb = function URd(a) { + Rrb(this, a); + }; + _2.Rb = function SRd(a) { + throw vbb(new bgb()); + }; + _2.Nk = function TRd(a) { + if (this.g != 0 || !!this.e) { + throw vbb(new Zdb("Iterator already in use or already filtered")); + } + this.e = a; + }; + _2.Ob = function VRd() { + var a, b, c2, d, e, f2; + switch (this.g) { + case 3: + case 2: { + return true; + } + case 1: { + return false; + } + case -3: { + !this.p ? ++this.n : this.p.Pb(); + } + default: { + if (!this.k || (!this.p ? !NRd(this) : !ORd(this, this.p))) { + while (this.d < this.c.length) { + b = this.c[this.d++]; + if ((!this.e || b.Gj() != x2 || b.aj() != 0) && (!this.Mk() || this.b.mh(b))) { + f2 = this.b.bh(b, this.Lk()); + this.f = (Q6d(), BD(b, 66).Oj()); + if (this.f || b.$j()) { + if (this.Lk()) { + d = BD(f2, 15); + this.k = d; + } else { + d = BD(f2, 69); + this.k = this.j = d; + } + if (JD(this.k, 54)) { + this.p = null; + this.o = this.k.gc(); + this.n = 0; + } else { + this.p = !this.j ? this.k.Yc() : this.j.$h(); + } + if (!this.p ? NRd(this) : ORd(this, this.p)) { + e = !this.p ? !this.j ? this.k.Xb(this.n++) : this.j.pi(this.n++) : this.p.Pb(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c2 = a.dd(); + this.i = c2; + } else { + c2 = e; + this.i = c2; + } + this.g = 3; + return true; + } + } else if (f2 != null) { + this.k = null; + this.p = null; + c2 = f2; + this.i = c2; + this.g = 2; + return true; + } + } + } + this.k = null; + this.p = null; + this.f = false; + this.g = 1; + return false; + } else { + e = !this.p ? !this.j ? this.k.Xb(this.n++) : this.j.pi(this.n++) : this.p.Pb(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c2 = a.dd(); + this.i = c2; + } else { + c2 = e; + this.i = c2; + } + this.g = 3; + return true; + } + } + } + }; + _2.Sb = function WRd() { + var a, b, c2, d, e, f2; + switch (this.g) { + case -3: + case -2: { + return true; + } + case -1: { + return false; + } + case 3: { + !this.p ? --this.n : this.p.Ub(); + } + default: { + if (!this.k || (!this.p ? !PRd(this) : !QRd(this, this.p))) { + while (this.d > 0) { + b = this.c[--this.d]; + if ((!this.e || b.Gj() != x2 || b.aj() != 0) && (!this.Mk() || this.b.mh(b))) { + f2 = this.b.bh(b, this.Lk()); + this.f = (Q6d(), BD(b, 66).Oj()); + if (this.f || b.$j()) { + if (this.Lk()) { + d = BD(f2, 15); + this.k = d; + } else { + d = BD(f2, 69); + this.k = this.j = d; + } + if (JD(this.k, 54)) { + this.o = this.k.gc(); + this.n = this.o; + } else { + this.p = !this.j ? this.k.Zc(this.k.gc()) : this.j._h(this.k.gc()); + } + if (!this.p ? PRd(this) : QRd(this, this.p)) { + e = !this.p ? !this.j ? this.k.Xb(--this.n) : this.j.pi(--this.n) : this.p.Ub(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c2 = a.dd(); + this.i = c2; + } else { + c2 = e; + this.i = c2; + } + this.g = -3; + return true; + } + } else if (f2 != null) { + this.k = null; + this.p = null; + c2 = f2; + this.i = c2; + this.g = -2; + return true; + } + } + } + this.k = null; + this.p = null; + this.g = -1; + return false; + } else { + e = !this.p ? !this.j ? this.k.Xb(--this.n) : this.j.pi(--this.n) : this.p.Ub(); + if (this.f) { + a = BD(e, 72); + a.ak(); + c2 = a.dd(); + this.i = c2; + } else { + c2 = e; + this.i = c2; + } + this.g = -3; + return true; + } + } + } + }; + _2.Pb = function XRd() { + return MRd(this); + }; + _2.Tb = function YRd() { + return this.a; + }; + _2.Ub = function ZRd() { + var a; + if (this.g < -1 || this.Sb()) { + --this.a; + this.g = 0; + a = this.i; + this.Sb(); + return a; + } else { + throw vbb(new utb()); + } + }; + _2.Vb = function $Rd() { + return this.a - 1; + }; + _2.Qb = function _Rd() { + throw vbb(new bgb()); + }; + _2.Lk = function aSd() { + return false; + }; + _2.Wb = function bSd(a) { + throw vbb(new bgb()); + }; + _2.Mk = function cSd() { + return true; + }; + _2.a = 0; + _2.d = 0; + _2.f = false; + _2.g = 0; + _2.n = 0; + _2.o = 0; + var KRd; + mdb(yve, "EContentsEList/FeatureIteratorImpl", 279); + bcb(697, 279, Wve, dSd); + _2.Lk = function eSd() { + return true; + }; + mdb(yve, "EContentsEList/ResolvingFeatureIteratorImpl", 697); + bcb(1157, 697, Wve, fSd); + _2.Mk = function gSd() { + return false; + }; + mdb(qte, "ENamedElementImpl/1/1", 1157); + bcb(1158, 279, Wve, hSd); + _2.Mk = function iSd() { + return false; + }; + mdb(qte, "ENamedElementImpl/1/2", 1158); + bcb(36, 143, fve, lSd, mSd, nSd, oSd, pSd, qSd, rSd, sSd, tSd, uSd, vSd, wSd, xSd, ySd, zSd, ASd, BSd, CSd, DSd, ESd, FSd, GSd, HSd, ISd, JSd); + _2._i = function KSd() { + return kSd(this); + }; + _2.gj = function LSd() { + var a; + a = kSd(this); + if (a) { + return a.zj(); + } + return null; + }; + _2.yi = function MSd(a) { + this.b == -1 && !!this.a && (this.b = this.c.Xg(this.a.aj(), this.a.Gj())); + return this.c.Og(this.b, a); + }; + _2.Ai = function NSd() { + return this.c; + }; + _2.hj = function OSd() { + var a; + a = kSd(this); + if (a) { + return a.Kj(); + } + return false; + }; + _2.b = -1; + mdb(qte, "ENotificationImpl", 36); + bcb(399, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 59: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 399: 1, 284: 1, 114: 1, 115: 1 }, SSd); + _2.Qg = function TSd(a) { + return PSd(this, a); + }; + _2._g = function USd(a, b, c2) { + var d, e, f2; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), f2 = this.t, f2 > 1 || f2 == -1 ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return this.Db >> 16 == 10 ? BD(this.Cb, 26) : null; + case 11: + return !this.d && (this.d = new K4d(u5, this, 11)), this.d; + case 12: + return !this.c && (this.c = new cUd(p5, this, 12, 10)), this.c; + case 13: + return !this.a && (this.a = new fTd(this, this)), this.a; + case 14: + return QSd(this); + } + return bid(this, a - aLd((jGd(), aGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? aGd : d), a), b, c2); + }; + _2.hh = function VSd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 10: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? PSd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 10, c2); + case 12: + return !this.c && (this.c = new cUd(p5, this, 12, 10)), Sxd(this.c, a, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), aGd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((jGd(), aGd)), a, c2); + }; + _2.jh = function WSd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 9: + return vId(this, c2); + case 10: + return _hd(this, null, 10, c2); + case 11: + return !this.d && (this.d = new K4d(u5, this, 11)), Txd(this.d, a, c2); + case 12: + return !this.c && (this.c = new cUd(p5, this, 12, 10)), Txd(this.c, a, c2); + case 14: + return Txd(QSd(this), a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), aGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), aGd)), a, c2); + }; + _2.lh = function XSd(a) { + var b, c2, d; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return d = this.t, d > 1 || d == -1; + case 7: + return c2 = this.s, c2 >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return !!(this.Db >> 16 == 10 ? BD(this.Cb, 26) : null); + case 11: + return !!this.d && this.d.i != 0; + case 12: + return !!this.c && this.c.i != 0; + case 13: + return !!this.a && QSd(this.a.a).i != 0 && !(!!this.b && QTd(this.b)); + case 14: + return !!this.b && QTd(this.b); + } + return cid(this, a - aLd((jGd(), aGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? aGd : b), a)); + }; + _2.sh = function YSd(a, b) { + var c2, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + DId(this, BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 11: + !this.d && (this.d = new K4d(u5, this, 11)); + Uxd(this.d); + !this.d && (this.d = new K4d(u5, this, 11)); + ytd(this.d, BD(b, 14)); + return; + case 12: + !this.c && (this.c = new cUd(p5, this, 12, 10)); + Uxd(this.c); + !this.c && (this.c = new cUd(p5, this, 12, 10)); + ytd(this.c, BD(b, 14)); + return; + case 13: + !this.a && (this.a = new fTd(this, this)); + vwd(this.a); + !this.a && (this.a = new fTd(this, this)); + ytd(this.a, BD(b, 14)); + return; + case 14: + Uxd(QSd(this)); + ytd(QSd(this), BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), aGd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? aGd : c2), a), b); + }; + _2.zh = function ZSd() { + return jGd(), aGd; + }; + _2.Bh = function $Sd(a) { + var b, c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + DId(this, 1); + return; + case 8: + yId(this, null); + return; + case 9: + c2 = xId(this, null, null); + !!c2 && c2.Fi(); + return; + case 11: + !this.d && (this.d = new K4d(u5, this, 11)); + Uxd(this.d); + return; + case 12: + !this.c && (this.c = new cUd(p5, this, 12, 10)); + Uxd(this.c); + return; + case 13: + !!this.a && vwd(this.a); + return; + case 14: + !!this.b && Uxd(this.b); + return; + } + eid(this, a - aLd((jGd(), aGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? aGd : b), a)); + }; + _2.Gh = function _Sd() { + var a, b; + if (this.c) { + for (a = 0, b = this.c.i; a < b; ++a) { + Cmd(qud(this.c, a)); + } + } + wId(this); + this.Bb |= 1; + }; + mdb(qte, "EOperationImpl", 399); + bcb(505, 742, Uve, fTd); + _2.Hi = function iTd(a, b) { + aTd(this, a, BD(b, 138)); + }; + _2.Ii = function jTd(a) { + bTd(this, BD(a, 138)); + }; + _2.Oi = function pTd(a) { + var b, c2; + return b = BD(qud(QSd(this.a), a), 87), c2 = b.c, c2 ? c2 : (jGd(), YFd); + }; + _2.Ti = function uTd(a) { + var b, c2; + return b = BD(Xxd(QSd(this.a), a), 87), c2 = b.c, c2 ? c2 : (jGd(), YFd); + }; + _2.Ui = function vTd(a, b) { + return dTd(this, a, BD(b, 138)); + }; + _2.ai = function gTd() { + return false; + }; + _2.Zi = function hTd(a, b, c2, d, e) { + return null; + }; + _2.Ji = function kTd() { + return new NTd(this); + }; + _2.Ki = function lTd() { + Uxd(QSd(this.a)); + }; + _2.Li = function mTd(a) { + return cTd(this, a); + }; + _2.Mi = function nTd(a) { + var b, c2; + for (c2 = a.Kc(); c2.Ob(); ) { + b = c2.Pb(); + if (!cTd(this, b)) { + return false; + } + } + return true; + }; + _2.Ni = function oTd(a) { + var b, c2, d; + if (JD(a, 15)) { + d = BD(a, 15); + if (d.gc() == QSd(this.a).i) { + for (b = d.Kc(), c2 = new Fyd(this); b.Ob(); ) { + if (PD(b.Pb()) !== PD(Dyd(c2))) { + return false; + } + } + return true; + } + } + return false; + }; + _2.Pi = function qTd() { + var a, b, c2, d, e; + c2 = 1; + for (b = new Fyd(QSd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + d = (e = a.c, e ? e : (jGd(), YFd)); + c2 = 31 * c2 + (!d ? 0 : tb(d)); + } + return c2; + }; + _2.Qi = function rTd(a) { + var b, c2, d, e; + d = 0; + for (c2 = new Fyd(QSd(this.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 87); + if (PD(a) === PD((e = b.c, e ? e : (jGd(), YFd)))) { + return d; + } + ++d; + } + return -1; + }; + _2.Ri = function sTd() { + return QSd(this.a).i == 0; + }; + _2.Si = function tTd() { + return null; + }; + _2.Vi = function wTd() { + return QSd(this.a).i; + }; + _2.Wi = function xTd() { + var a, b, c2, d, e, f2; + f2 = QSd(this.a).i; + e = KC(SI, Uhe, 1, f2, 5, 1); + c2 = 0; + for (b = new Fyd(QSd(this.a)); b.e != b.i.gc(); ) { + a = BD(Dyd(b), 87); + e[c2++] = (d = a.c, d ? d : (jGd(), YFd)); + } + return e; + }; + _2.Xi = function yTd(a) { + var b, c2, d, e, f2, g, h; + h = QSd(this.a).i; + if (a.length < h) { + e = izd(rb(a).c, h); + a = e; + } + a.length > h && NC(a, h, null); + d = 0; + for (c2 = new Fyd(QSd(this.a)); c2.e != c2.i.gc(); ) { + b = BD(Dyd(c2), 87); + f2 = (g = b.c, g ? g : (jGd(), YFd)); + NC(a, d++, f2); + } + return a; + }; + _2.Yi = function zTd() { + var a, b, c2, d, e; + e = new Hfb(); + e.a += "["; + a = QSd(this.a); + for (b = 0, d = QSd(this.a).i; b < d; ) { + Efb(e, xfb((c2 = BD(qud(a, b), 87).c, c2 ? c2 : (jGd(), YFd)))); + ++b < d && (e.a += She, e); + } + e.a += "]"; + return e.a; + }; + _2.$i = function ATd(a) { + }; + _2.aj = function BTd() { + return 13; + }; + _2.Bk = function CTd() { + return true; + }; + _2.bj = function DTd() { + return false; + }; + _2.Ck = function ETd() { + return false; + }; + _2.Dk = function FTd() { + return false; + }; + _2.Ek = function GTd() { + return true; + }; + _2.rk = function HTd() { + return false; + }; + _2.Fk = function ITd() { + return true; + }; + _2.wj = function JTd(a) { + return JD(a, 138); + }; + _2.fj = function KTd() { + return RSd(this.a); + }; + _2.hi = function LTd() { + return true; + }; + _2.ni = function MTd() { + return true; + }; + mdb(qte, "EOperationImpl/1", 505); + bcb(1340, 1964, Lie, NTd); + _2.Zc = function OTd(a) { + return ztd(this.a, a); + }; + _2.gc = function PTd() { + return QSd(this.a.a).i; + }; + mdb(qte, "EOperationImpl/1/1", 1340); + bcb(1341, 545, Pve, UTd); + _2.ii = function YTd(a, b) { + var c2, d; + return c2 = BD(Wxd(this, a, b), 87), oid(this.e) && GLd(this, new ESd(this.a, 7, (jGd(), bGd), meb(b), (d = c2.c, d ? d : YFd), a)), c2; + }; + _2.jj = function ZTd(a, b) { + return RTd(this, BD(a, 87), b); + }; + _2.kj = function $Td(a, b) { + return STd(this, BD(a, 87), b); + }; + _2.lj = function _Td(a, b, c2) { + return TTd(this, BD(a, 87), BD(b, 87), c2); + }; + _2.Zi = function VTd(a, b, c2, d, e) { + switch (a) { + case 3: { + return FLd(this, a, b, c2, d, this.i > 1); + } + case 5: { + return FLd(this, a, b, c2, d, this.i - BD(c2, 15).gc() > 0); + } + default: { + return new pSd(this.e, a, this.c, b, c2, d, true); + } + } + }; + _2.ij = function WTd() { + return true; + }; + _2.fj = function XTd() { + return QTd(this); + }; + _2.Xj = function aUd() { + Uxd(this); + }; + mdb(qte, "EOperationImpl/2", 1341); + bcb(498, 1, { 1938: 1, 498: 1 }, bUd); + mdb(qte, "EPackageImpl/1", 498); + bcb(16, 85, Pve, cUd); + _2.zk = function dUd() { + return this.d; + }; + _2.Ak = function eUd() { + return this.b; + }; + _2.Dk = function fUd() { + return true; + }; + _2.b = 0; + mdb(yve, "EObjectContainmentWithInverseEList", 16); + bcb(353, 16, Pve, gUd); + _2.Ek = function hUd() { + return true; + }; + _2.li = function iUd(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentWithInverseEList/Resolving", 353); + bcb(298, 353, Pve, jUd); + _2.ci = function kUd() { + this.a.tb = null; + }; + mdb(qte, "EPackageImpl/2", 298); + bcb(1228, 1, {}, lUd); + mdb(qte, "EPackageImpl/3", 1228); + bcb(718, 43, fke, oUd); + _2._b = function pUd(a) { + return ND(a) ? Qhb(this, a) : !!irb(this.f, a); + }; + mdb(qte, "EPackageRegistryImpl", 718); + bcb(509, 284, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 2017: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 509: 1, 284: 1, 114: 1, 115: 1 }, rUd); + _2.Qg = function sUd(a) { + return qUd(this, a); + }; + _2._g = function tUd(a, b, c2) { + var d, e, f2; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), f2 = this.t, f2 > 1 || f2 == -1 ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return this.Db >> 16 == 10 ? BD(this.Cb, 59) : null; + } + return bid(this, a - aLd((jGd(), dGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? dGd : d), a), b, c2); + }; + _2.hh = function uUd(a, b, c2) { + var d, e, f2; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Sxd(this.Ab, a, c2); + case 10: + !!this.Cb && (c2 = (e = this.Db >> 16, e >= 0 ? qUd(this, c2) : this.Cb.ih(this, -1 - e, null, c2))); + return _hd(this, a, 10, c2); + } + return f2 = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), dGd) : d), b), 66), f2.Nj().Qj(this, yjd(this), b - aLd((jGd(), dGd)), a, c2); + }; + _2.jh = function vUd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 9: + return vId(this, c2); + case 10: + return _hd(this, null, 10, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), dGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), dGd)), a, c2); + }; + _2.lh = function wUd(a) { + var b, c2, d; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return d = this.t, d > 1 || d == -1; + case 7: + return c2 = this.s, c2 >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return !!(this.Db >> 16 == 10 ? BD(this.Cb, 59) : null); + } + return cid(this, a - aLd((jGd(), dGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? dGd : b), a)); + }; + _2.zh = function xUd() { + return jGd(), dGd; + }; + mdb(qte, "EParameterImpl", 509); + bcb(99, 449, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 18: 1, 170: 1, 66: 1, 108: 1, 472: 1, 49: 1, 97: 1, 150: 1, 99: 1, 449: 1, 284: 1, 114: 1, 115: 1, 677: 1 }, FUd); + _2._g = function GUd(a, b, c2) { + var d, e, f2, g; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return Bcb(), (this.Bb & 256) != 0 ? true : false; + case 3: + return Bcb(), (this.Bb & 512) != 0 ? true : false; + case 4: + return meb(this.s); + case 5: + return meb(this.t); + case 6: + return Bcb(), g = this.t, g > 1 || g == -1 ? true : false; + case 7: + return Bcb(), e = this.s, e >= 1 ? true : false; + case 8: + if (b) + return wId(this); + return this.r; + case 9: + return this.q; + case 10: + return Bcb(), (this.Bb & zte) != 0 ? true : false; + case 11: + return Bcb(), (this.Bb & Dve) != 0 ? true : false; + case 12: + return Bcb(), (this.Bb & Rje) != 0 ? true : false; + case 13: + return this.j; + case 14: + return VId(this); + case 15: + return Bcb(), (this.Bb & Cve) != 0 ? true : false; + case 16: + return Bcb(), (this.Bb & oie) != 0 ? true : false; + case 17: + return WId(this); + case 18: + return Bcb(), (this.Bb & ote) != 0 ? true : false; + case 19: + return Bcb(), f2 = zUd(this), !!f2 && (f2.Bb & ote) != 0 ? true : false; + case 20: + return Bcb(), (this.Bb & Tje) != 0 ? true : false; + case 21: + if (b) + return zUd(this); + return this.b; + case 22: + if (b) + return AUd(this); + return yUd(this); + case 23: + return !this.a && (this.a = new _4d(b5, this, 23)), this.a; + } + return bid(this, a - aLd((jGd(), eGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? eGd : d), a), b, c2); + }; + _2.lh = function HUd(a) { + var b, c2, d, e; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return (this.Bb & 256) == 0; + case 3: + return (this.Bb & 512) == 0; + case 4: + return this.s != 0; + case 5: + return this.t != 1; + case 6: + return e = this.t, e > 1 || e == -1; + case 7: + return c2 = this.s, c2 >= 1; + case 8: + return !!this.r && !this.q.e && LQd(this.q).i == 0; + case 9: + return !!this.q && !(!!this.r && !this.q.e && LQd(this.q).i == 0); + case 10: + return (this.Bb & zte) == 0; + case 11: + return (this.Bb & Dve) != 0; + case 12: + return (this.Bb & Rje) != 0; + case 13: + return this.j != null; + case 14: + return VId(this) != null; + case 15: + return (this.Bb & Cve) != 0; + case 16: + return (this.Bb & oie) != 0; + case 17: + return !!WId(this); + case 18: + return (this.Bb & ote) != 0; + case 19: + return d = zUd(this), !!d && (d.Bb & ote) != 0; + case 20: + return (this.Bb & Tje) == 0; + case 21: + return !!this.b; + case 22: + return !!yUd(this); + case 23: + return !!this.a && this.a.i != 0; + } + return cid(this, a - aLd((jGd(), eGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? eGd : b), a)); + }; + _2.sh = function IUd(a, b) { + var c2, d; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + cJd(this, GD(b)); + return; + case 2: + BId(this, Ccb(DD(b))); + return; + case 3: + CId(this, Ccb(DD(b))); + return; + case 4: + AId(this, BD(b, 19).a); + return; + case 5: + DId(this, BD(b, 19).a); + return; + case 8: + yId(this, BD(b, 138)); + return; + case 9: + d = xId(this, BD(b, 87), null); + !!d && d.Fi(); + return; + case 10: + ZId(this, Ccb(DD(b))); + return; + case 11: + fJd(this, Ccb(DD(b))); + return; + case 12: + dJd(this, Ccb(DD(b))); + return; + case 13: + $Id(this, GD(b)); + return; + case 15: + eJd(this, Ccb(DD(b))); + return; + case 16: + aJd(this, Ccb(DD(b))); + return; + case 18: + BUd(this, Ccb(DD(b))); + return; + case 20: + EUd(this, Ccb(DD(b))); + return; + case 21: + DUd(this, BD(b, 18)); + return; + case 23: + !this.a && (this.a = new _4d(b5, this, 23)); + Uxd(this.a); + !this.a && (this.a = new _4d(b5, this, 23)); + ytd(this.a, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), eGd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? eGd : c2), a), b); + }; + _2.zh = function JUd() { + return jGd(), eGd; + }; + _2.Bh = function KUd(a) { + var b, c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 4); + pnd(this, null); + return; + case 2: + BId(this, true); + return; + case 3: + CId(this, true); + return; + case 4: + AId(this, 0); + return; + case 5: + DId(this, 1); + return; + case 8: + yId(this, null); + return; + case 9: + c2 = xId(this, null, null); + !!c2 && c2.Fi(); + return; + case 10: + ZId(this, true); + return; + case 11: + fJd(this, false); + return; + case 12: + dJd(this, false); + return; + case 13: + this.i = null; + _Id(this, null); + return; + case 15: + eJd(this, false); + return; + case 16: + aJd(this, false); + return; + case 18: + CUd(this, false); + JD(this.Cb, 88) && XMd($Kd(BD(this.Cb, 88)), 2); + return; + case 20: + EUd(this, true); + return; + case 21: + DUd(this, null); + return; + case 23: + !this.a && (this.a = new _4d(b5, this, 23)); + Uxd(this.a); + return; + } + eid(this, a - aLd((jGd(), eGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? eGd : b), a)); + }; + _2.Gh = function LUd() { + AUd(this); + a2d(q1d((O6d(), M6d), this)); + wId(this); + this.Bb |= 1; + }; + _2.Lj = function MUd() { + return zUd(this); + }; + _2.qk = function NUd() { + var a; + return a = zUd(this), !!a && (a.Bb & ote) != 0; + }; + _2.rk = function OUd() { + return (this.Bb & ote) != 0; + }; + _2.sk = function PUd() { + return (this.Bb & Tje) != 0; + }; + _2.nk = function QUd(a, b) { + this.c = null; + return zId(this, a, b); + }; + _2.Ib = function RUd() { + var a; + if ((this.Db & 64) != 0) + return gJd(this); + a = new Jfb(gJd(this)); + a.a += " (containment: "; + Ffb(a, (this.Bb & ote) != 0); + a.a += ", resolveProxies: "; + Ffb(a, (this.Bb & Tje) != 0); + a.a += ")"; + return a.a; + }; + mdb(qte, "EReferenceImpl", 99); + bcb(548, 115, { 105: 1, 42: 1, 92: 1, 90: 1, 133: 1, 56: 1, 108: 1, 49: 1, 97: 1, 548: 1, 114: 1, 115: 1 }, XUd); + _2.Fb = function bVd(a) { + return this === a; + }; + _2.cd = function dVd() { + return this.b; + }; + _2.dd = function eVd() { + return this.c; + }; + _2.Hb = function fVd() { + return FCb(this); + }; + _2.Uh = function hVd(a) { + SUd(this, GD(a)); + }; + _2.ed = function iVd(a) { + return WUd(this, GD(a)); + }; + _2._g = function YUd(a, b, c2) { + var d; + switch (a) { + case 0: + return this.b; + case 1: + return this.c; + } + return bid(this, a - aLd((jGd(), fGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? fGd : d), a), b, c2); + }; + _2.lh = function ZUd(a) { + var b; + switch (a) { + case 0: + return this.b != null; + case 1: + return this.c != null; + } + return cid(this, a - aLd((jGd(), fGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? fGd : b), a)); + }; + _2.sh = function $Ud(a, b) { + var c2; + switch (a) { + case 0: + TUd(this, GD(b)); + return; + case 1: + VUd(this, GD(b)); + return; + } + did(this, a - aLd((jGd(), fGd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? fGd : c2), a), b); + }; + _2.zh = function _Ud() { + return jGd(), fGd; + }; + _2.Bh = function aVd(a) { + var b; + switch (a) { + case 0: + UUd(this, null); + return; + case 1: + VUd(this, null); + return; + } + eid(this, a - aLd((jGd(), fGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? fGd : b), a)); + }; + _2.Sh = function cVd() { + var a; + if (this.a == -1) { + a = this.b; + this.a = a == null ? 0 : LCb(a); + } + return this.a; + }; + _2.Th = function gVd(a) { + this.a = a; + }; + _2.Ib = function jVd() { + var a; + if ((this.Db & 64) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (key: "; + Efb(a, this.b); + a.a += ", value: "; + Efb(a, this.c); + a.a += ")"; + return a.a; + }; + _2.a = -1; + _2.b = null; + _2.c = null; + var x6 = mdb(qte, "EStringToStringMapEntryImpl", 548); + var D9 = odb(yve, "FeatureMap/Entry/Internal"); + bcb(565, 1, Xve); + _2.Ok = function mVd(a) { + return this.Pk(BD(a, 49)); + }; + _2.Pk = function nVd(a) { + return this.Ok(a); + }; + _2.Fb = function oVd(a) { + var b, c2; + if (this === a) { + return true; + } else if (JD(a, 72)) { + b = BD(a, 72); + if (b.ak() == this.c) { + c2 = this.dd(); + return c2 == null ? b.dd() == null : pb(c2, b.dd()); + } else { + return false; + } + } else { + return false; + } + }; + _2.ak = function pVd() { + return this.c; + }; + _2.Hb = function qVd() { + var a; + a = this.dd(); + return tb(this.c) ^ (a == null ? 0 : tb(a)); + }; + _2.Ib = function rVd() { + var a, b; + a = this.c; + b = bKd(a.Hj()).Ph(); + a.ne(); + return (b != null && b.length != 0 ? b + ":" + a.ne() : a.ne()) + "=" + this.dd(); + }; + mdb(qte, "EStructuralFeatureImpl/BasicFeatureMapEntry", 565); + bcb(776, 565, Xve, uVd); + _2.Pk = function vVd(a) { + return new uVd(this.c, a); + }; + _2.dd = function wVd() { + return this.a; + }; + _2.Qk = function xVd(a, b, c2) { + return sVd(this, a, this.a, b, c2); + }; + _2.Rk = function yVd(a, b, c2) { + return tVd(this, a, this.a, b, c2); + }; + mdb(qte, "EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry", 776); + bcb(1314, 1, {}, zVd); + _2.Pj = function AVd(a, b, c2, d, e) { + var f2; + f2 = BD(gid(a, this.b), 215); + return f2.nl(this.a).Wj(d); + }; + _2.Qj = function BVd(a, b, c2, d, e) { + var f2; + f2 = BD(gid(a, this.b), 215); + return f2.el(this.a, d, e); + }; + _2.Rj = function CVd(a, b, c2, d, e) { + var f2; + f2 = BD(gid(a, this.b), 215); + return f2.fl(this.a, d, e); + }; + _2.Sj = function DVd(a, b, c2) { + var d; + d = BD(gid(a, this.b), 215); + return d.nl(this.a).fj(); + }; + _2.Tj = function EVd(a, b, c2, d) { + var e; + e = BD(gid(a, this.b), 215); + e.nl(this.a).Wb(d); + }; + _2.Uj = function FVd(a, b, c2) { + return BD(gid(a, this.b), 215).nl(this.a); + }; + _2.Vj = function GVd(a, b, c2) { + var d; + d = BD(gid(a, this.b), 215); + d.nl(this.a).Xj(); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator", 1314); + bcb(89, 1, {}, IVd, JVd, KVd, LVd); + _2.Pj = function MVd(a, b, c2, d, e) { + var f2; + f2 = b.Ch(c2); + f2 == null && b.Dh(c2, f2 = HVd(this, a)); + if (!e) { + switch (this.e) { + case 50: + case 41: + return BD(f2, 589).sj(); + case 40: + return BD(f2, 215).kl(); + } + } + return f2; + }; + _2.Qj = function NVd(a, b, c2, d, e) { + var f2, g; + g = b.Ch(c2); + g == null && b.Dh(c2, g = HVd(this, a)); + f2 = BD(g, 69).lk(d, e); + return f2; + }; + _2.Rj = function OVd(a, b, c2, d, e) { + var f2; + f2 = b.Ch(c2); + f2 != null && (e = BD(f2, 69).mk(d, e)); + return e; + }; + _2.Sj = function PVd(a, b, c2) { + var d; + d = b.Ch(c2); + return d != null && BD(d, 76).fj(); + }; + _2.Tj = function QVd(a, b, c2, d) { + var e; + e = BD(b.Ch(c2), 76); + !e && b.Dh(c2, e = HVd(this, a)); + e.Wb(d); + }; + _2.Uj = function RVd(a, b, c2) { + var d, e; + e = b.Ch(c2); + e == null && b.Dh(c2, e = HVd(this, a)); + if (JD(e, 76)) { + return BD(e, 76); + } else { + d = BD(b.Ch(c2), 15); + return new iYd(d); + } + }; + _2.Vj = function SVd(a, b, c2) { + var d; + d = BD(b.Ch(c2), 76); + !d && b.Dh(c2, d = HVd(this, a)); + d.Xj(); + }; + _2.b = 0; + _2.e = 0; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateMany", 89); + bcb(504, 1, {}); + _2.Qj = function WVd(a, b, c2, d, e) { + throw vbb(new bgb()); + }; + _2.Rj = function XVd(a, b, c2, d, e) { + throw vbb(new bgb()); + }; + _2.Uj = function YVd(a, b, c2) { + return new ZVd(this, a, b, c2); + }; + var TVd; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingle", 504); + bcb(1331, 1, zve, ZVd); + _2.Wj = function $Vd(a) { + return this.a.Pj(this.c, this.d, this.b, a, true); + }; + _2.fj = function _Vd() { + return this.a.Sj(this.c, this.d, this.b); + }; + _2.Wb = function aWd(a) { + this.a.Tj(this.c, this.d, this.b, a); + }; + _2.Xj = function bWd() { + this.a.Vj(this.c, this.d, this.b); + }; + _2.b = 0; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingle/1", 1331); + bcb(769, 504, {}, cWd); + _2.Pj = function dWd(a, b, c2, d, e) { + return Nid(a, a.eh(), a.Vg()) == this.b ? this.sk() && d ? aid(a) : a.eh() : null; + }; + _2.Qj = function eWd(a, b, c2, d, e) { + var f2, g; + !!a.eh() && (e = (f2 = a.Vg(), f2 >= 0 ? a.Qg(e) : a.eh().ih(a, -1 - f2, null, e))); + g = bLd(a.Tg(), this.e); + return a.Sg(d, g, e); + }; + _2.Rj = function fWd(a, b, c2, d, e) { + var f2; + f2 = bLd(a.Tg(), this.e); + return a.Sg(null, f2, e); + }; + _2.Sj = function gWd(a, b, c2) { + var d; + d = bLd(a.Tg(), this.e); + return !!a.eh() && a.Vg() == d; + }; + _2.Tj = function hWd(a, b, c2, d) { + var e, f2, g, h, i3; + if (d != null && !fKd(this.a, d)) { + throw vbb(new Cdb(Yve + (JD(d, 56) ? gLd(BD(d, 56).Tg()) : idb(rb(d))) + Zve + this.a + "'")); + } + e = a.eh(); + g = bLd(a.Tg(), this.e); + if (PD(d) !== PD(e) || a.Vg() != g && d != null) { + if (p6d(a, BD(d, 56))) + throw vbb(new Wdb(ste + a.Ib())); + i3 = null; + !!e && (i3 = (f2 = a.Vg(), f2 >= 0 ? a.Qg(i3) : a.eh().ih(a, -1 - f2, null, i3))); + h = BD(d, 49); + !!h && (i3 = h.gh(a, bLd(h.Tg(), this.b), null, i3)); + i3 = a.Sg(h, g, i3); + !!i3 && i3.Fi(); + } else { + a.Lg() && a.Mg() && Uhd(a, new nSd(a, 1, g, d, d)); + } + }; + _2.Vj = function iWd(a, b, c2) { + var d, e, f2, g; + d = a.eh(); + if (d) { + g = (e = a.Vg(), e >= 0 ? a.Qg(null) : a.eh().ih(a, -1 - e, null, null)); + f2 = bLd(a.Tg(), this.e); + g = a.Sg(null, f2, g); + !!g && g.Fi(); + } else { + a.Lg() && a.Mg() && Uhd(a, new DSd(a, 1, this.e, null, null)); + } + }; + _2.sk = function jWd() { + return false; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleContainer", 769); + bcb(1315, 769, {}, kWd); + _2.sk = function lWd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving", 1315); + bcb(563, 504, {}); + _2.Pj = function oWd(a, b, c2, d, e) { + var f2; + return f2 = b.Ch(c2), f2 == null ? this.b : PD(f2) === PD(TVd) ? null : f2; + }; + _2.Sj = function pWd(a, b, c2) { + var d; + d = b.Ch(c2); + return d != null && (PD(d) === PD(TVd) || !pb(d, this.b)); + }; + _2.Tj = function qWd(a, b, c2, d) { + var e, f2; + if (a.Lg() && a.Mg()) { + e = (f2 = b.Ch(c2), f2 == null ? this.b : PD(f2) === PD(TVd) ? null : f2); + if (d == null) { + if (this.c != null) { + b.Dh(c2, null); + d = this.b; + } else + this.b != null ? b.Dh(c2, TVd) : b.Dh(c2, null); + } else { + this.Sk(d); + b.Dh(c2, d); + } + Uhd(a, this.d.Tk(a, 1, this.e, e, d)); + } else { + if (d == null) { + this.c != null ? b.Dh(c2, null) : this.b != null ? b.Dh(c2, TVd) : b.Dh(c2, null); + } else { + this.Sk(d); + b.Dh(c2, d); + } + } + }; + _2.Vj = function rWd(a, b, c2) { + var d, e; + if (a.Lg() && a.Mg()) { + d = (e = b.Ch(c2), e == null ? this.b : PD(e) === PD(TVd) ? null : e); + b.Eh(c2); + Uhd(a, this.d.Tk(a, 1, this.e, d, this.b)); + } else { + b.Eh(c2); + } + }; + _2.Sk = function sWd(a) { + throw vbb(new Bdb()); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData", 563); + bcb($ve, 1, {}, DWd); + _2.Tk = function EWd(a, b, c2, d, e) { + return new DSd(a, b, c2, d, e); + }; + _2.Uk = function FWd(a, b, c2, d, e, f2) { + return new FSd(a, b, c2, d, e, f2); + }; + var tWd, uWd, vWd, wWd, xWd, yWd, zWd, AWd, BWd; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator", $ve); + bcb(1332, $ve, {}, GWd); + _2.Tk = function HWd(a, b, c2, d, e) { + return new ISd(a, b, c2, Ccb(DD(d)), Ccb(DD(e))); + }; + _2.Uk = function IWd(a, b, c2, d, e, f2) { + return new JSd(a, b, c2, Ccb(DD(d)), Ccb(DD(e)), f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1", 1332); + bcb(1333, $ve, {}, JWd); + _2.Tk = function KWd(a, b, c2, d, e) { + return new rSd(a, b, c2, BD(d, 217).a, BD(e, 217).a); + }; + _2.Uk = function LWd(a, b, c2, d, e, f2) { + return new sSd(a, b, c2, BD(d, 217).a, BD(e, 217).a, f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2", 1333); + bcb(1334, $ve, {}, MWd); + _2.Tk = function NWd(a, b, c2, d, e) { + return new tSd(a, b, c2, BD(d, 172).a, BD(e, 172).a); + }; + _2.Uk = function OWd(a, b, c2, d, e, f2) { + return new uSd(a, b, c2, BD(d, 172).a, BD(e, 172).a, f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3", 1334); + bcb(1335, $ve, {}, PWd); + _2.Tk = function QWd(a, b, c2, d, e) { + return new vSd(a, b, c2, Edb(ED(d)), Edb(ED(e))); + }; + _2.Uk = function RWd(a, b, c2, d, e, f2) { + return new wSd(a, b, c2, Edb(ED(d)), Edb(ED(e)), f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4", 1335); + bcb(1336, $ve, {}, SWd); + _2.Tk = function TWd(a, b, c2, d, e) { + return new xSd(a, b, c2, BD(d, 155).a, BD(e, 155).a); + }; + _2.Uk = function UWd(a, b, c2, d, e, f2) { + return new ySd(a, b, c2, BD(d, 155).a, BD(e, 155).a, f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5", 1336); + bcb(1337, $ve, {}, VWd); + _2.Tk = function WWd(a, b, c2, d, e) { + return new zSd(a, b, c2, BD(d, 19).a, BD(e, 19).a); + }; + _2.Uk = function XWd(a, b, c2, d, e, f2) { + return new ASd(a, b, c2, BD(d, 19).a, BD(e, 19).a, f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6", 1337); + bcb(1338, $ve, {}, YWd); + _2.Tk = function ZWd(a, b, c2, d, e) { + return new BSd(a, b, c2, BD(d, 162).a, BD(e, 162).a); + }; + _2.Uk = function $Wd(a, b, c2, d, e, f2) { + return new CSd(a, b, c2, BD(d, 162).a, BD(e, 162).a, f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7", 1338); + bcb(1339, $ve, {}, _Wd); + _2.Tk = function aXd(a, b, c2, d, e) { + return new GSd(a, b, c2, BD(d, 184).a, BD(e, 184).a); + }; + _2.Uk = function bXd(a, b, c2, d, e, f2) { + return new HSd(a, b, c2, BD(d, 184).a, BD(e, 184).a, f2); + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8", 1339); + bcb(1317, 563, {}, cXd); + _2.Sk = function dXd(a) { + if (!this.a.wj(a)) { + throw vbb(new Cdb(Yve + rb(a) + Zve + this.a + "'")); + } + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic", 1317); + bcb(1318, 563, {}, eXd); + _2.Sk = function fXd(a) { + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic", 1318); + bcb(770, 563, {}); + _2.Sj = function gXd(a, b, c2) { + var d; + d = b.Ch(c2); + return d != null; + }; + _2.Tj = function hXd(a, b, c2, d) { + var e, f2; + if (a.Lg() && a.Mg()) { + e = true; + f2 = b.Ch(c2); + if (f2 == null) { + e = false; + f2 = this.b; + } else + PD(f2) === PD(TVd) && (f2 = null); + if (d == null) { + if (this.c != null) { + b.Dh(c2, null); + d = this.b; + } else { + b.Dh(c2, TVd); + } + } else { + this.Sk(d); + b.Dh(c2, d); + } + Uhd(a, this.d.Uk(a, 1, this.e, f2, d, !e)); + } else { + if (d == null) { + this.c != null ? b.Dh(c2, null) : b.Dh(c2, TVd); + } else { + this.Sk(d); + b.Dh(c2, d); + } + } + }; + _2.Vj = function iXd(a, b, c2) { + var d, e; + if (a.Lg() && a.Mg()) { + d = true; + e = b.Ch(c2); + if (e == null) { + d = false; + e = this.b; + } else + PD(e) === PD(TVd) && (e = null); + b.Eh(c2); + Uhd(a, this.d.Uk(a, 2, this.e, e, this.b, d)); + } else { + b.Eh(c2); + } + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable", 770); + bcb(1319, 770, {}, jXd); + _2.Sk = function kXd(a) { + if (!this.a.wj(a)) { + throw vbb(new Cdb(Yve + rb(a) + Zve + this.a + "'")); + } + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic", 1319); + bcb(1320, 770, {}, lXd); + _2.Sk = function mXd(a) { + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic", 1320); + bcb(398, 504, {}, nXd); + _2.Pj = function pXd(a, b, c2, d, e) { + var f2, g, h, i3, j; + j = b.Ch(c2); + if (this.Kj() && PD(j) === PD(TVd)) { + return null; + } else if (this.sk() && d && j != null) { + h = BD(j, 49); + if (h.kh()) { + i3 = xid(a, h); + if (h != i3) { + if (!fKd(this.a, i3)) { + throw vbb(new Cdb(Yve + rb(i3) + Zve + this.a + "'")); + } + b.Dh(c2, j = i3); + if (this.rk()) { + f2 = BD(i3, 49); + g = h.ih(a, !this.b ? -1 - bLd(a.Tg(), this.e) : bLd(h.Tg(), this.b), null, null); + !f2.eh() && (g = f2.gh(a, !this.b ? -1 - bLd(a.Tg(), this.e) : bLd(f2.Tg(), this.b), null, g)); + !!g && g.Fi(); + } + a.Lg() && a.Mg() && Uhd(a, new DSd(a, 9, this.e, h, i3)); + } + } + return j; + } else { + return j; + } + }; + _2.Qj = function qXd(a, b, c2, d, e) { + var f2, g; + g = b.Ch(c2); + PD(g) === PD(TVd) && (g = null); + b.Dh(c2, d); + if (this.bj()) { + if (PD(g) !== PD(d) && g != null) { + f2 = BD(g, 49); + e = f2.ih(a, bLd(f2.Tg(), this.b), null, e); + } + } else + this.rk() && g != null && (e = BD(g, 49).ih(a, -1 - bLd(a.Tg(), this.e), null, e)); + if (a.Lg() && a.Mg()) { + !e && (e = new Ixd(4)); + e.Ei(new DSd(a, 1, this.e, g, d)); + } + return e; + }; + _2.Rj = function rXd(a, b, c2, d, e) { + var f2; + f2 = b.Ch(c2); + PD(f2) === PD(TVd) && (f2 = null); + b.Eh(c2); + if (a.Lg() && a.Mg()) { + !e && (e = new Ixd(4)); + this.Kj() ? e.Ei(new DSd(a, 2, this.e, f2, null)) : e.Ei(new DSd(a, 1, this.e, f2, null)); + } + return e; + }; + _2.Sj = function sXd(a, b, c2) { + var d; + d = b.Ch(c2); + return d != null; + }; + _2.Tj = function tXd(a, b, c2, d) { + var e, f2, g, h, i3; + if (d != null && !fKd(this.a, d)) { + throw vbb(new Cdb(Yve + (JD(d, 56) ? gLd(BD(d, 56).Tg()) : idb(rb(d))) + Zve + this.a + "'")); + } + i3 = b.Ch(c2); + h = i3 != null; + this.Kj() && PD(i3) === PD(TVd) && (i3 = null); + g = null; + if (this.bj()) { + if (PD(i3) !== PD(d)) { + if (i3 != null) { + e = BD(i3, 49); + g = e.ih(a, bLd(e.Tg(), this.b), null, g); + } + if (d != null) { + e = BD(d, 49); + g = e.gh(a, bLd(e.Tg(), this.b), null, g); + } + } + } else if (this.rk()) { + if (PD(i3) !== PD(d)) { + i3 != null && (g = BD(i3, 49).ih(a, -1 - bLd(a.Tg(), this.e), null, g)); + d != null && (g = BD(d, 49).gh(a, -1 - bLd(a.Tg(), this.e), null, g)); + } + } + d == null && this.Kj() ? b.Dh(c2, TVd) : b.Dh(c2, d); + if (a.Lg() && a.Mg()) { + f2 = new FSd(a, 1, this.e, i3, d, this.Kj() && !h); + if (!g) { + Uhd(a, f2); + } else { + g.Ei(f2); + g.Fi(); + } + } else + !!g && g.Fi(); + }; + _2.Vj = function uXd(a, b, c2) { + var d, e, f2, g, h; + h = b.Ch(c2); + g = h != null; + this.Kj() && PD(h) === PD(TVd) && (h = null); + f2 = null; + if (h != null) { + if (this.bj()) { + d = BD(h, 49); + f2 = d.ih(a, bLd(d.Tg(), this.b), null, f2); + } else + this.rk() && (f2 = BD(h, 49).ih(a, -1 - bLd(a.Tg(), this.e), null, f2)); + } + b.Eh(c2); + if (a.Lg() && a.Mg()) { + e = new FSd(a, this.Kj() ? 2 : 1, this.e, h, null, g); + if (!f2) { + Uhd(a, e); + } else { + f2.Ei(e); + f2.Fi(); + } + } else + !!f2 && f2.Fi(); + }; + _2.bj = function vXd() { + return false; + }; + _2.rk = function wXd() { + return false; + }; + _2.sk = function xXd() { + return false; + }; + _2.Kj = function yXd() { + return false; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObject", 398); + bcb(564, 398, {}, zXd); + _2.rk = function AXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment", 564); + bcb(1323, 564, {}, BXd); + _2.sk = function CXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving", 1323); + bcb(772, 564, {}, DXd); + _2.Kj = function EXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable", 772); + bcb(1325, 772, {}, FXd); + _2.sk = function GXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving", 1325); + bcb(640, 564, {}, HXd); + _2.bj = function IXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse", 640); + bcb(1324, 640, {}, JXd); + _2.sk = function KXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving", 1324); + bcb(773, 640, {}, LXd); + _2.Kj = function MXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable", 773); + bcb(1326, 773, {}, NXd); + _2.sk = function OXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving", 1326); + bcb(641, 398, {}, PXd); + _2.sk = function QXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving", 641); + bcb(1327, 641, {}, RXd); + _2.Kj = function SXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable", 1327); + bcb(774, 641, {}, TXd); + _2.bj = function UXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse", 774); + bcb(1328, 774, {}, VXd); + _2.Kj = function WXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable", 1328); + bcb(1321, 398, {}, XXd); + _2.Kj = function YXd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable", 1321); + bcb(771, 398, {}, ZXd); + _2.bj = function $Xd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse", 771); + bcb(1322, 771, {}, _Xd); + _2.Kj = function aYd() { + return true; + }; + mdb(qte, "EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable", 1322); + bcb(775, 565, Xve, dYd); + _2.Pk = function eYd(a) { + return new dYd(this.a, this.c, a); + }; + _2.dd = function fYd() { + return this.b; + }; + _2.Qk = function gYd(a, b, c2) { + return bYd(this, a, this.b, c2); + }; + _2.Rk = function hYd(a, b, c2) { + return cYd(this, a, this.b, c2); + }; + mdb(qte, "EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry", 775); + bcb(1329, 1, zve, iYd); + _2.Wj = function jYd(a) { + return this.a; + }; + _2.fj = function kYd() { + return JD(this.a, 95) ? BD(this.a, 95).fj() : !this.a.dc(); + }; + _2.Wb = function lYd(a) { + this.a.$b(); + this.a.Gc(BD(a, 15)); + }; + _2.Xj = function mYd() { + JD(this.a, 95) ? BD(this.a, 95).Xj() : this.a.$b(); + }; + mdb(qte, "EStructuralFeatureImpl/SettingMany", 1329); + bcb(1330, 565, Xve, nYd); + _2.Ok = function oYd(a) { + return new sYd((Q8d(), P8d), this.b.Ih(this.a, a)); + }; + _2.dd = function pYd() { + return null; + }; + _2.Qk = function qYd(a, b, c2) { + return c2; + }; + _2.Rk = function rYd(a, b, c2) { + return c2; + }; + mdb(qte, "EStructuralFeatureImpl/SimpleContentFeatureMapEntry", 1330); + bcb(642, 565, Xve, sYd); + _2.Ok = function tYd(a) { + return new sYd(this.c, a); + }; + _2.dd = function uYd() { + return this.a; + }; + _2.Qk = function vYd(a, b, c2) { + return c2; + }; + _2.Rk = function wYd(a, b, c2) { + return c2; + }; + mdb(qte, "EStructuralFeatureImpl/SimpleFeatureMapEntry", 642); + bcb(391, 497, oue, xYd); + _2.ri = function yYd(a) { + return KC(c5, Uhe, 26, a, 0, 1); + }; + _2.ni = function zYd() { + return false; + }; + mdb(qte, "ESuperAdapter/1", 391); + bcb(444, 438, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 108: 1, 836: 1, 49: 1, 97: 1, 150: 1, 444: 1, 114: 1, 115: 1 }, BYd); + _2._g = function CYd(a, b, c2) { + var d; + switch (a) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), this.Ab; + case 1: + return this.zb; + case 2: + return !this.a && (this.a = new KYd(this, j5, this)), this.a; + } + return bid(this, a - aLd((jGd(), iGd)), XKd((d = BD(Ajd(this, 16), 26), !d ? iGd : d), a), b, c2); + }; + _2.jh = function DYd(a, b, c2) { + var d, e; + switch (b) { + case 0: + return !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)), Txd(this.Ab, a, c2); + case 2: + return !this.a && (this.a = new KYd(this, j5, this)), Txd(this.a, a, c2); + } + return e = BD(XKd((d = BD(Ajd(this, 16), 26), !d ? (jGd(), iGd) : d), b), 66), e.Nj().Rj(this, yjd(this), b - aLd((jGd(), iGd)), a, c2); + }; + _2.lh = function EYd(a) { + var b; + switch (a) { + case 0: + return !!this.Ab && this.Ab.i != 0; + case 1: + return this.zb != null; + case 2: + return !!this.a && this.a.i != 0; + } + return cid(this, a - aLd((jGd(), iGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? iGd : b), a)); + }; + _2.sh = function FYd(a, b) { + var c2; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + ytd(this.Ab, BD(b, 14)); + return; + case 1: + pnd(this, GD(b)); + return; + case 2: + !this.a && (this.a = new KYd(this, j5, this)); + Uxd(this.a); + !this.a && (this.a = new KYd(this, j5, this)); + ytd(this.a, BD(b, 14)); + return; + } + did(this, a - aLd((jGd(), iGd)), XKd((c2 = BD(Ajd(this, 16), 26), !c2 ? iGd : c2), a), b); + }; + _2.zh = function GYd() { + return jGd(), iGd; + }; + _2.Bh = function HYd(a) { + var b; + switch (a) { + case 0: + !this.Ab && (this.Ab = new cUd(a5, this, 0, 3)); + Uxd(this.Ab); + return; + case 1: + pnd(this, null); + return; + case 2: + !this.a && (this.a = new KYd(this, j5, this)); + Uxd(this.a); + return; + } + eid(this, a - aLd((jGd(), iGd)), XKd((b = BD(Ajd(this, 16), 26), !b ? iGd : b), a)); + }; + mdb(qte, "ETypeParameterImpl", 444); + bcb(445, 85, Pve, KYd); + _2.cj = function LYd(a, b) { + return IYd(this, BD(a, 87), b); + }; + _2.dj = function MYd(a, b) { + return JYd(this, BD(a, 87), b); + }; + mdb(qte, "ETypeParameterImpl/1", 445); + bcb(634, 43, fke, NYd); + _2.ec = function OYd() { + return new RYd(this); + }; + mdb(qte, "ETypeParameterImpl/2", 634); + bcb(556, eie, fie, RYd); + _2.Fc = function SYd(a) { + return PYd(this, BD(a, 87)); + }; + _2.Gc = function TYd(a) { + var b, c2, d; + d = false; + for (c2 = a.Kc(); c2.Ob(); ) { + b = BD(c2.Pb(), 87); + Rhb(this.a, b, "") == null && (d = true); + } + return d; + }; + _2.$b = function UYd() { + Uhb(this.a); + }; + _2.Hc = function VYd(a) { + return Mhb(this.a, a); + }; + _2.Kc = function WYd() { + var a; + return a = new nib(new eib(this.a).a), new ZYd(a); + }; + _2.Mc = function XYd(a) { + return QYd(this, a); + }; + _2.gc = function YYd() { + return Vhb(this.a); + }; + mdb(qte, "ETypeParameterImpl/2/1", 556); + bcb(557, 1, aie, ZYd); + _2.Nb = function $Yd(a) { + Rrb(this, a); + }; + _2.Pb = function aZd() { + return BD(lib(this.a).cd(), 87); + }; + _2.Ob = function _Yd() { + return this.a.b; + }; + _2.Qb = function bZd() { + mib(this.a); + }; + mdb(qte, "ETypeParameterImpl/2/1/1", 557); + bcb(1276, 43, fke, cZd); + _2._b = function dZd(a) { + return ND(a) ? Qhb(this, a) : !!irb(this.f, a); + }; + _2.xc = function eZd(a) { + var b, c2; + b = ND(a) ? Phb(this, a) : Wd(irb(this.f, a)); + if (JD(b, 837)) { + c2 = BD(b, 837); + b = c2._j(); + Rhb(this, BD(a, 235), b); + return b; + } else + return b != null ? b : a == null ? (g5d(), f5d) : null; + }; + mdb(qte, "EValidatorRegistryImpl", 1276); + bcb(1313, 704, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 1941: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1 }, mZd); + _2.Ih = function nZd(a, b) { + switch (a.yj()) { + case 21: + case 22: + case 23: + case 24: + case 26: + case 31: + case 32: + case 37: + case 38: + case 39: + case 40: + case 43: + case 44: + case 48: + case 49: + case 20: + return b == null ? null : fcb(b); + case 25: + return gZd(b); + case 27: + return hZd(b); + case 28: + return iZd(b); + case 29: + return b == null ? null : CQd(Pmd[0], BD(b, 199)); + case 41: + return b == null ? "" : hdb(BD(b, 290)); + case 42: + return fcb(b); + case 50: + return GD(b); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + _2.Jh = function oZd(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q; + switch (a.G == -1 && (a.G = (m = bKd(a), m ? HLd(m.Mh(), a) : -1)), a.G) { + case 0: + return c2 = new OJd(), c2; + case 1: + return b = new RHd(), b; + case 2: + return d = new hLd(), d; + case 4: + return e = new MPd(), e; + case 5: + return f2 = new aQd(), f2; + case 6: + return g = new rQd(), g; + case 7: + return h = new $md(), h; + case 10: + return j = new MGd(), j; + case 11: + return k = new SSd(), k; + case 12: + return l = new eod(), l; + case 13: + return n = new rUd(), n; + case 14: + return o2 = new FUd(), o2; + case 17: + return p = new XUd(), p; + case 18: + return i3 = new UQd(), i3; + case 19: + return q = new BYd(), q; + default: + throw vbb(new Wdb(xte + a.zb + ute)); + } + }; + _2.Kh = function pZd(a, b) { + switch (a.yj()) { + case 20: + return b == null ? null : new tgb(b); + case 21: + return b == null ? null : new Ygb(b); + case 23: + case 22: + return b == null ? null : fZd(b); + case 26: + case 24: + return b == null ? null : Scb(Icb(b, -128, 127) << 24 >> 24); + case 25: + return Xmd(b); + case 27: + return jZd(b); + case 28: + return kZd(b); + case 29: + return lZd(b); + case 32: + case 31: + return b == null ? null : Hcb(b); + case 38: + case 37: + return b == null ? null : new Odb(b); + case 40: + case 39: + return b == null ? null : meb(Icb(b, Rie, Ohe)); + case 41: + return null; + case 42: + return b == null ? null : null; + case 44: + case 43: + return b == null ? null : Aeb(Jcb(b)); + case 49: + case 48: + return b == null ? null : Web(Icb(b, awe, 32767) << 16 >> 16); + case 50: + return b; + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + mdb(qte, "EcoreFactoryImpl", 1313); + bcb(547, 179, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 1939: 1, 49: 1, 97: 1, 150: 1, 179: 1, 547: 1, 114: 1, 115: 1, 675: 1 }, AZd); + _2.gb = false; + _2.hb = false; + var rZd, sZd = false; + mdb(qte, "EcorePackageImpl", 547); + bcb(1184, 1, { 837: 1 }, EZd); + _2._j = function FZd() { + return I6d(), H6d; + }; + mdb(qte, "EcorePackageImpl/1", 1184); + bcb(1193, 1, nwe, GZd); + _2.wj = function HZd(a) { + return JD(a, 147); + }; + _2.xj = function IZd(a) { + return KC(k5, Uhe, 147, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/10", 1193); + bcb(1194, 1, nwe, JZd); + _2.wj = function KZd(a) { + return JD(a, 191); + }; + _2.xj = function LZd(a) { + return KC(l5, Uhe, 191, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/11", 1194); + bcb(1195, 1, nwe, MZd); + _2.wj = function NZd(a) { + return JD(a, 56); + }; + _2.xj = function OZd(a) { + return KC(m5, Uhe, 56, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/12", 1195); + bcb(1196, 1, nwe, PZd); + _2.wj = function QZd(a) { + return JD(a, 399); + }; + _2.xj = function RZd(a) { + return KC(n5, Nve, 59, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/13", 1196); + bcb(1197, 1, nwe, SZd); + _2.wj = function TZd(a) { + return JD(a, 235); + }; + _2.xj = function UZd(a) { + return KC(o5, Uhe, 235, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/14", 1197); + bcb(1198, 1, nwe, VZd); + _2.wj = function WZd(a) { + return JD(a, 509); + }; + _2.xj = function XZd(a) { + return KC(p5, Uhe, 2017, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/15", 1198); + bcb(1199, 1, nwe, YZd); + _2.wj = function ZZd(a) { + return JD(a, 99); + }; + _2.xj = function $Zd(a) { + return KC(q5, Mve, 18, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/16", 1199); + bcb(1200, 1, nwe, _Zd); + _2.wj = function a$d(a) { + return JD(a, 170); + }; + _2.xj = function b$d(a) { + return KC(t5, Mve, 170, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/17", 1200); + bcb(1201, 1, nwe, c$d); + _2.wj = function d$d(a) { + return JD(a, 472); + }; + _2.xj = function e$d(a) { + return KC(v52, Uhe, 472, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/18", 1201); + bcb(1202, 1, nwe, f$d); + _2.wj = function g$d(a) { + return JD(a, 548); + }; + _2.xj = function h$d(a) { + return KC(x6, kve, 548, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/19", 1202); + bcb(1185, 1, nwe, i$d); + _2.wj = function j$d(a) { + return JD(a, 322); + }; + _2.xj = function k$d(a) { + return KC(b5, Mve, 34, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/2", 1185); + bcb(1203, 1, nwe, l$d); + _2.wj = function m$d(a) { + return JD(a, 241); + }; + _2.xj = function n$d(a) { + return KC(j5, Tve, 87, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/20", 1203); + bcb(1204, 1, nwe, o$d); + _2.wj = function p$d(a) { + return JD(a, 444); + }; + _2.xj = function q$d(a) { + return KC(u5, Uhe, 836, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/21", 1204); + bcb(1205, 1, nwe, r$d); + _2.wj = function s$d(a) { + return KD(a); + }; + _2.xj = function t$d(a) { + return KC(wI, nie, 476, a, 8, 1); + }; + mdb(qte, "EcorePackageImpl/22", 1205); + bcb(1206, 1, nwe, u$d); + _2.wj = function v$d(a) { + return JD(a, 190); + }; + _2.xj = function w$d(a) { + return KC(SD, nie, 190, a, 0, 2); + }; + mdb(qte, "EcorePackageImpl/23", 1206); + bcb(1207, 1, nwe, x$d); + _2.wj = function y$d(a) { + return JD(a, 217); + }; + _2.xj = function z$d(a) { + return KC(xI, nie, 217, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/24", 1207); + bcb(1208, 1, nwe, A$d); + _2.wj = function B$d(a) { + return JD(a, 172); + }; + _2.xj = function C$d(a) { + return KC(yI, nie, 172, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/25", 1208); + bcb(1209, 1, nwe, D$d); + _2.wj = function E$d(a) { + return JD(a, 199); + }; + _2.xj = function F$d(a) { + return KC($J, nie, 199, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/26", 1209); + bcb(1210, 1, nwe, G$d); + _2.wj = function H$d(a) { + return false; + }; + _2.xj = function I$d(a) { + return KC(O4, Uhe, 2110, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/27", 1210); + bcb(1211, 1, nwe, J$d); + _2.wj = function K$d(a) { + return LD(a); + }; + _2.xj = function L$d(a) { + return KC(BI, nie, 333, a, 7, 1); + }; + mdb(qte, "EcorePackageImpl/28", 1211); + bcb(1212, 1, nwe, M$d); + _2.wj = function N$d(a) { + return JD(a, 58); + }; + _2.xj = function O$d(a) { + return KC(T4, eme, 58, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/29", 1212); + bcb(1186, 1, nwe, P$d); + _2.wj = function Q$d(a) { + return JD(a, 510); + }; + _2.xj = function R$d(a) { + return KC(a5, { 3: 1, 4: 1, 5: 1, 1934: 1 }, 590, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/3", 1186); + bcb(1213, 1, nwe, S$d); + _2.wj = function T$d(a) { + return JD(a, 573); + }; + _2.xj = function U$d(a) { + return KC(U4, Uhe, 1940, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/30", 1213); + bcb(1214, 1, nwe, V$d); + _2.wj = function W$d(a) { + return JD(a, 153); + }; + _2.xj = function X$d(a) { + return KC(O9, eme, 153, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/31", 1214); + bcb(1215, 1, nwe, Y$d); + _2.wj = function Z$d(a) { + return JD(a, 72); + }; + _2.xj = function $$d(a) { + return KC(E9, owe, 72, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/32", 1215); + bcb(1216, 1, nwe, _$d); + _2.wj = function a_d(a) { + return JD(a, 155); + }; + _2.xj = function b_d(a) { + return KC(FI, nie, 155, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/33", 1216); + bcb(1217, 1, nwe, c_d); + _2.wj = function d_d(a) { + return JD(a, 19); + }; + _2.xj = function e_d(a) { + return KC(JI, nie, 19, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/34", 1217); + bcb(1218, 1, nwe, f_d); + _2.wj = function g_d(a) { + return JD(a, 290); + }; + _2.xj = function h_d(a) { + return KC(AI, Uhe, 290, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/35", 1218); + bcb(1219, 1, nwe, i_d); + _2.wj = function j_d(a) { + return JD(a, 162); + }; + _2.xj = function k_d(a) { + return KC(MI, nie, 162, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/36", 1219); + bcb(1220, 1, nwe, l_d); + _2.wj = function m_d(a) { + return JD(a, 83); + }; + _2.xj = function n_d(a) { + return KC(DK, Uhe, 83, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/37", 1220); + bcb(1221, 1, nwe, o_d); + _2.wj = function p_d(a) { + return JD(a, 591); + }; + _2.xj = function q_d(a) { + return KC(v8, Uhe, 591, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/38", 1221); + bcb(1222, 1, nwe, r_d); + _2.wj = function s_d(a) { + return false; + }; + _2.xj = function t_d(a) { + return KC(u8, Uhe, 2111, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/39", 1222); + bcb(1187, 1, nwe, u_d); + _2.wj = function v_d(a) { + return JD(a, 88); + }; + _2.xj = function w_d(a) { + return KC(c5, Uhe, 26, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/4", 1187); + bcb(1223, 1, nwe, x_d); + _2.wj = function y_d(a) { + return JD(a, 184); + }; + _2.xj = function z_d(a) { + return KC(UI, nie, 184, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/40", 1223); + bcb(1224, 1, nwe, A_d); + _2.wj = function B_d(a) { + return ND(a); + }; + _2.xj = function C_d(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(qte, "EcorePackageImpl/41", 1224); + bcb(1225, 1, nwe, D_d); + _2.wj = function E_d(a) { + return JD(a, 588); + }; + _2.xj = function F_d(a) { + return KC(X4, Uhe, 588, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/42", 1225); + bcb(1226, 1, nwe, G_d); + _2.wj = function H_d(a) { + return false; + }; + _2.xj = function I_d(a) { + return KC(V4, nie, 2112, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/43", 1226); + bcb(1227, 1, nwe, J_d); + _2.wj = function K_d(a) { + return JD(a, 42); + }; + _2.xj = function L_d(a) { + return KC(CK, zie, 42, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/44", 1227); + bcb(1188, 1, nwe, M_d); + _2.wj = function N_d(a) { + return JD(a, 138); + }; + _2.xj = function O_d(a) { + return KC(d5, Uhe, 138, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/5", 1188); + bcb(1189, 1, nwe, P_d); + _2.wj = function Q_d(a) { + return JD(a, 148); + }; + _2.xj = function R_d(a) { + return KC(f5, Uhe, 148, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/6", 1189); + bcb(1190, 1, nwe, S_d); + _2.wj = function T_d(a) { + return JD(a, 457); + }; + _2.xj = function U_d(a) { + return KC(h5, Uhe, 671, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/7", 1190); + bcb(1191, 1, nwe, V_d); + _2.wj = function W_d(a) { + return JD(a, 573); + }; + _2.xj = function X_d(a) { + return KC(g5, Uhe, 678, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/8", 1191); + bcb(1192, 1, nwe, Y_d); + _2.wj = function Z_d(a) { + return JD(a, 471); + }; + _2.xj = function $_d(a) { + return KC(i5, Uhe, 471, a, 0, 1); + }; + mdb(qte, "EcorePackageImpl/9", 1192); + bcb(1025, 1982, ive, c0d); + _2.bi = function d0d(a, b) { + __d(this, BD(b, 415)); + }; + _2.fi = function e0d(a, b) { + a0d(this, a, BD(b, 415)); + }; + mdb(qte, "MinimalEObjectImpl/1ArrayDelegatingAdapterList", 1025); + bcb(1026, 143, fve, f0d); + _2.Ai = function g0d() { + return this.a.a; + }; + mdb(qte, "MinimalEObjectImpl/1ArrayDelegatingAdapterList/1", 1026); + bcb(1053, 1052, {}, i0d); + mdb("org.eclipse.emf.ecore.plugin", "EcorePlugin", 1053); + var v8 = odb(pwe, "Resource"); + bcb(781, 1378, qwe); + _2.Yk = function m0d(a) { + }; + _2.Zk = function n0d(a) { + }; + _2.Vk = function o0d() { + return !this.a && (this.a = new z0d(this)), this.a; + }; + _2.Wk = function p0d(a) { + var b, c2, d, e, f2; + d = a.length; + if (d > 0) { + BCb(0, a.length); + if (a.charCodeAt(0) == 47) { + f2 = new Skb(4); + e = 1; + for (b = 1; b < d; ++b) { + BCb(b, a.length); + if (a.charCodeAt(b) == 47) { + Ekb(f2, e == b ? "" : a.substr(e, b - e)); + e = b + 1; + } + } + Ekb(f2, a.substr(e)); + return j0d(this, f2); + } else { + BCb(d - 1, a.length); + if (a.charCodeAt(d - 1) == 63) { + c2 = lfb(a, wfb(63), d - 2); + c2 > 0 && (a = a.substr(0, c2)); + } + } + } + return k0d(this, a); + }; + _2.Xk = function q0d() { + return this.c; + }; + _2.Ib = function r0d() { + var a; + return hdb(this.gm) + "@" + (a = tb(this) >>> 0, a.toString(16)) + " uri='" + this.d + "'"; + }; + _2.b = false; + mdb(rwe, "ResourceImpl", 781); + bcb(1379, 781, qwe, s0d); + mdb(rwe, "BinaryResourceImpl", 1379); + bcb(1169, 694, pue); + _2.si = function v0d(a) { + return JD(a, 56) ? t0d(this, BD(a, 56)) : JD(a, 591) ? new Fyd(BD(a, 591).Vk()) : PD(a) === PD(this.f) ? BD(a, 14).Kc() : (LCd(), KCd.a); + }; + _2.Ob = function w0d() { + return u0d(this); + }; + _2.a = false; + mdb(yve, "EcoreUtil/ContentTreeIterator", 1169); + bcb(1380, 1169, pue, x0d); + _2.si = function y0d(a) { + return PD(a) === PD(this.f) ? BD(a, 15).Kc() : new C6d(BD(a, 56)); + }; + mdb(rwe, "ResourceImpl/5", 1380); + bcb(648, 1994, Ove, z0d); + _2.Hc = function A0d(a) { + return this.i <= 4 ? pud(this, a) : JD(a, 49) && BD(a, 49).Zg() == this.a; + }; + _2.bi = function B0d(a, b) { + a == this.i - 1 && (this.a.b || (this.a.b = true, null)); + }; + _2.di = function C0d(a, b) { + a == 0 ? this.a.b || (this.a.b = true, null) : Atd(this, a, b); + }; + _2.fi = function D0d(a, b) { + }; + _2.gi = function E0d(a, b, c2) { + }; + _2.aj = function F0d() { + return 2; + }; + _2.Ai = function G0d() { + return this.a; + }; + _2.bj = function H0d() { + return true; + }; + _2.cj = function I0d(a, b) { + var c2; + c2 = BD(a, 49); + b = c2.wh(this.a, b); + return b; + }; + _2.dj = function J0d(a, b) { + var c2; + c2 = BD(a, 49); + return c2.wh(null, b); + }; + _2.ej = function K0d() { + return false; + }; + _2.hi = function L0d() { + return true; + }; + _2.ri = function M0d(a) { + return KC(m5, Uhe, 56, a, 0, 1); + }; + _2.ni = function N0d() { + return false; + }; + mdb(rwe, "ResourceImpl/ContentsEList", 648); + bcb(957, 1964, Lie, O0d); + _2.Zc = function P0d(a) { + return this.a._h(a); + }; + _2.gc = function Q0d() { + return this.a.gc(); + }; + mdb(yve, "AbstractSequentialInternalEList/1", 957); + var K6d, L6d, M6d, N6d; + bcb(624, 1, {}, y1d); + var R0d, S0d; + mdb(yve, "BasicExtendedMetaData", 624); + bcb(1160, 1, {}, C1d); + _2.$k = function D1d() { + return null; + }; + _2._k = function E1d() { + this.a == -2 && A1d(this, W0d(this.d, this.b)); + return this.a; + }; + _2.al = function F1d() { + return null; + }; + _2.bl = function G1d() { + return mmb(), mmb(), jmb; + }; + _2.ne = function H1d() { + this.c == Gwe && B1d(this, _0d(this.d, this.b)); + return this.c; + }; + _2.cl = function I1d() { + return 0; + }; + _2.a = -2; + _2.c = Gwe; + mdb(yve, "BasicExtendedMetaData/EClassExtendedMetaDataImpl", 1160); + bcb(1161, 1, {}, O1d); + _2.$k = function P1d() { + this.a == (T0d(), R0d) && J1d(this, V0d(this.f, this.b)); + return this.a; + }; + _2._k = function Q1d() { + return 0; + }; + _2.al = function R1d() { + this.c == (T0d(), R0d) && K1d(this, Z0d(this.f, this.b)); + return this.c; + }; + _2.bl = function S1d() { + !this.d && L1d(this, $0d(this.f, this.b)); + return this.d; + }; + _2.ne = function T1d() { + this.e == Gwe && M1d(this, _0d(this.f, this.b)); + return this.e; + }; + _2.cl = function U1d() { + this.g == -2 && N1d(this, c1d(this.f, this.b)); + return this.g; + }; + _2.e = Gwe; + _2.g = -2; + mdb(yve, "BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl", 1161); + bcb(1159, 1, {}, Y1d); + _2.b = false; + _2.c = false; + mdb(yve, "BasicExtendedMetaData/EPackageExtendedMetaDataImpl", 1159); + bcb(1162, 1, {}, j2d); + _2.c = -2; + _2.e = Gwe; + _2.f = Gwe; + mdb(yve, "BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl", 1162); + bcb(585, 622, Pve, k2d); + _2.aj = function l2d() { + return this.c; + }; + _2.Fk = function m2d() { + return false; + }; + _2.li = function n2d(a, b) { + return b; + }; + _2.c = 0; + mdb(yve, "EDataTypeEList", 585); + var O9 = odb(yve, "FeatureMap"); + bcb(75, 585, { 3: 1, 4: 1, 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 54: 1, 67: 1, 63: 1, 58: 1, 76: 1, 153: 1, 215: 1, 1937: 1, 69: 1, 95: 1 }, u3d); + _2.Vc = function v3d(a, b) { + o2d(this, a, BD(b, 72)); + }; + _2.Fc = function w3d(a) { + return r2d(this, BD(a, 72)); + }; + _2.Yh = function B3d(a) { + w2d(this, BD(a, 72)); + }; + _2.cj = function M3d(a, b) { + return O2d(this, BD(a, 72), b); + }; + _2.dj = function N3d(a, b) { + return Q2d(this, BD(a, 72), b); + }; + _2.ii = function P3d(a, b) { + return W2d(this, a, b); + }; + _2.li = function R3d(a, b) { + return _2d(this, a, BD(b, 72)); + }; + _2._c = function T3d(a, b) { + return c3d(this, a, BD(b, 72)); + }; + _2.jj = function X3d(a, b) { + return i3d(this, BD(a, 72), b); + }; + _2.kj = function Y3d(a, b) { + return k3d(this, BD(a, 72), b); + }; + _2.lj = function Z3d(a, b, c2) { + return l3d(this, BD(a, 72), BD(b, 72), c2); + }; + _2.oi = function _3d(a, b) { + return t3d(this, a, BD(b, 72)); + }; + _2.dl = function x3d(a, b) { + return q2d(this, a, b); + }; + _2.Wc = function y3d(a, b) { + var c2, d, e, f2, g, h, i3, j, k; + j = new zud(b.gc()); + for (e = b.Kc(); e.Ob(); ) { + d = BD(e.Pb(), 72); + f2 = d.ak(); + if (T6d(this.e, f2)) { + (!f2.hi() || !E2d(this, f2, d.dd()) && !pud(j, d)) && wtd(j, d); + } else { + k = S6d(this.e.Tg(), f2); + c2 = BD(this.g, 119); + g = true; + for (h = 0; h < this.i; ++h) { + i3 = c2[h]; + if (k.rl(i3.ak())) { + BD(Gtd(this, h, d), 72); + g = false; + break; + } + } + g && wtd(j, d); + } + } + return xtd(this, a, j); + }; + _2.Gc = function z3d(a) { + var b, c2, d, e, f2, g, h, i3, j; + i3 = new zud(a.gc()); + for (d = a.Kc(); d.Ob(); ) { + c2 = BD(d.Pb(), 72); + e = c2.ak(); + if (T6d(this.e, e)) { + (!e.hi() || !E2d(this, e, c2.dd()) && !pud(i3, c2)) && wtd(i3, c2); + } else { + j = S6d(this.e.Tg(), e); + b = BD(this.g, 119); + f2 = true; + for (g = 0; g < this.i; ++g) { + h = b[g]; + if (j.rl(h.ak())) { + BD(Gtd(this, g, c2), 72); + f2 = false; + break; + } + } + f2 && wtd(i3, c2); + } + } + return ytd(this, i3); + }; + _2.Wh = function A3d(a) { + this.j = -1; + return Pxd(this, this.i, a); + }; + _2.el = function C3d(a, b, c2) { + return x2d(this, a, b, c2); + }; + _2.mk = function D3d(a, b) { + return B2d(this, a, b); + }; + _2.fl = function E3d(a, b, c2) { + return C2d(this, a, b, c2); + }; + _2.gl = function F3d() { + return this; + }; + _2.hl = function G3d(a, b) { + return K2d(this, a, b); + }; + _2.il = function H3d(a) { + return BD(qud(this, a), 72).ak(); + }; + _2.jl = function I3d(a) { + return BD(qud(this, a), 72).dd(); + }; + _2.kl = function J3d() { + return this.b; + }; + _2.bj = function K3d() { + return true; + }; + _2.ij = function L3d() { + return true; + }; + _2.ll = function O3d(a) { + return !R2d(this, a); + }; + _2.ri = function Q3d(a) { + return KC(D9, owe, 332, a, 0, 1); + }; + _2.Gk = function S3d(a) { + return a3d(this, a); + }; + _2.Wb = function U3d(a) { + d3d(this, a); + }; + _2.ml = function V3d(a, b) { + f3d(this, a, b); + }; + _2.nl = function W3d(a) { + return g3d(this, a); + }; + _2.ol = function $3d(a) { + s3d(this, a); + }; + mdb(yve, "BasicFeatureMap", 75); + bcb(1851, 1, jie); + _2.Nb = function f4d(a) { + Rrb(this, a); + }; + _2.Rb = function e4d(b) { + if (this.g == -1) { + throw vbb(new Ydb()); + } + a4d(this); + try { + p2d(this.e, this.b, this.a, b); + this.d = this.e.j; + d4d(this); + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + }; + _2.Ob = function g4d() { + return b4d(this); + }; + _2.Sb = function h4d() { + return c4d(this); + }; + _2.Pb = function i4d() { + return d4d(this); + }; + _2.Tb = function j4d() { + return this.a; + }; + _2.Ub = function k4d() { + var a; + if (c4d(this)) { + a4d(this); + this.g = --this.a; + if (this.Lk()) { + a = b3d(this.e, this.b, this.c, this.a, this.j); + this.j = a; + } + this.i = 0; + return this.j; + } else { + throw vbb(new utb()); + } + }; + _2.Vb = function l4d() { + return this.a - 1; + }; + _2.Qb = function m4d() { + if (this.g == -1) { + throw vbb(new Ydb()); + } + a4d(this); + try { + Z2d(this.e, this.b, this.g); + this.d = this.e.j; + if (this.g < this.a) { + --this.a; + --this.c; + } + --this.g; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + }; + _2.Lk = function n4d() { + return false; + }; + _2.Wb = function o4d(b) { + if (this.g == -1) { + throw vbb(new Ydb()); + } + a4d(this); + try { + e3d(this.e, this.b, this.g, b); + this.d = this.e.j; + } catch (a) { + a = ubb(a); + if (JD(a, 73)) { + throw vbb(new Apb()); + } else + throw vbb(a); + } + }; + _2.a = 0; + _2.c = 0; + _2.d = 0; + _2.f = false; + _2.g = 0; + _2.i = 0; + mdb(yve, "FeatureMapUtil/BasicFeatureEIterator", 1851); + bcb(410, 1851, jie, p4d); + _2.pl = function q4d() { + var a, b, c2; + c2 = this.e.i; + a = BD(this.e.g, 119); + while (this.c < c2) { + b = a[this.c]; + if (this.k.rl(b.ak())) { + this.j = this.f ? b : b.dd(); + this.i = 2; + return true; + } + ++this.c; + } + this.i = 1; + this.g = -1; + return false; + }; + _2.ql = function r4d() { + var a, b; + a = BD(this.e.g, 119); + while (--this.c >= 0) { + b = a[this.c]; + if (this.k.rl(b.ak())) { + this.j = this.f ? b : b.dd(); + this.i = -2; + return true; + } + } + this.i = -1; + this.g = -1; + return false; + }; + mdb(yve, "BasicFeatureMap/FeatureEIterator", 410); + bcb(662, 410, jie, s4d); + _2.Lk = function t4d() { + return true; + }; + mdb(yve, "BasicFeatureMap/ResolvingFeatureEIterator", 662); + bcb(955, 486, Vve, u4d); + _2.Gi = function v4d() { + return this; + }; + mdb(yve, "EContentsEList/1", 955); + bcb(956, 486, Vve, w4d); + _2.Lk = function x4d() { + return false; + }; + mdb(yve, "EContentsEList/2", 956); + bcb(954, 279, Wve, y4d); + _2.Nk = function z4d(a) { + }; + _2.Ob = function A4d() { + return false; + }; + _2.Sb = function B4d() { + return false; + }; + mdb(yve, "EContentsEList/FeatureIteratorImpl/1", 954); + bcb(825, 585, Pve, C4d); + _2.ci = function D4d() { + this.a = true; + }; + _2.fj = function E4d() { + return this.a; + }; + _2.Xj = function F4d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _2.a = false; + mdb(yve, "EDataTypeEList/Unsettable", 825); + bcb(1849, 585, Pve, G4d); + _2.hi = function H4d() { + return true; + }; + mdb(yve, "EDataTypeUniqueEList", 1849); + bcb(1850, 825, Pve, I4d); + _2.hi = function J4d() { + return true; + }; + mdb(yve, "EDataTypeUniqueEList/Unsettable", 1850); + bcb(139, 85, Pve, K4d); + _2.Ek = function L4d() { + return true; + }; + _2.li = function M4d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentEList/Resolving", 139); + bcb(1163, 545, Pve, N4d); + _2.Ek = function O4d() { + return true; + }; + _2.li = function P4d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentEList/Unsettable/Resolving", 1163); + bcb(748, 16, Pve, Q4d); + _2.ci = function R4d() { + this.a = true; + }; + _2.fj = function S4d() { + return this.a; + }; + _2.Xj = function T4d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _2.a = false; + mdb(yve, "EObjectContainmentWithInverseEList/Unsettable", 748); + bcb(1173, 748, Pve, U4d); + _2.Ek = function V4d() { + return true; + }; + _2.li = function W4d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectContainmentWithInverseEList/Unsettable/Resolving", 1173); + bcb(743, 496, Pve, X4d); + _2.ci = function Y4d() { + this.a = true; + }; + _2.fj = function Z4d() { + return this.a; + }; + _2.Xj = function $4d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _2.a = false; + mdb(yve, "EObjectEList/Unsettable", 743); + bcb(328, 496, Pve, _4d); + _2.Ek = function a5d() { + return true; + }; + _2.li = function b5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectResolvingEList", 328); + bcb(1641, 743, Pve, c5d); + _2.Ek = function d5d() { + return true; + }; + _2.li = function e5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectResolvingEList/Unsettable", 1641); + bcb(1381, 1, {}, h5d); + var f5d; + mdb(yve, "EObjectValidator", 1381); + bcb(546, 496, Pve, i5d); + _2.zk = function j5d() { + return this.d; + }; + _2.Ak = function k5d() { + return this.b; + }; + _2.bj = function l5d() { + return true; + }; + _2.Dk = function m5d() { + return true; + }; + _2.b = 0; + mdb(yve, "EObjectWithInverseEList", 546); + bcb(1176, 546, Pve, n5d); + _2.Ck = function o5d() { + return true; + }; + mdb(yve, "EObjectWithInverseEList/ManyInverse", 1176); + bcb(625, 546, Pve, p5d); + _2.ci = function q5d() { + this.a = true; + }; + _2.fj = function r5d() { + return this.a; + }; + _2.Xj = function s5d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _2.a = false; + mdb(yve, "EObjectWithInverseEList/Unsettable", 625); + bcb(1175, 625, Pve, t5d); + _2.Ck = function u5d() { + return true; + }; + mdb(yve, "EObjectWithInverseEList/Unsettable/ManyInverse", 1175); + bcb(749, 546, Pve, v5d); + _2.Ek = function w5d() { + return true; + }; + _2.li = function x5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectWithInverseResolvingEList", 749); + bcb(31, 749, Pve, y5d); + _2.Ck = function z5d() { + return true; + }; + mdb(yve, "EObjectWithInverseResolvingEList/ManyInverse", 31); + bcb(750, 625, Pve, A5d); + _2.Ek = function B5d() { + return true; + }; + _2.li = function C5d(a, b) { + return ILd(this, a, BD(b, 56)); + }; + mdb(yve, "EObjectWithInverseResolvingEList/Unsettable", 750); + bcb(1174, 750, Pve, D5d); + _2.Ck = function E5d() { + return true; + }; + mdb(yve, "EObjectWithInverseResolvingEList/Unsettable/ManyInverse", 1174); + bcb(1164, 622, Pve); + _2.ai = function F5d() { + return (this.b & 1792) == 0; + }; + _2.ci = function G5d() { + this.b |= 1; + }; + _2.Bk = function H5d() { + return (this.b & 4) != 0; + }; + _2.bj = function I5d() { + return (this.b & 40) != 0; + }; + _2.Ck = function J5d() { + return (this.b & 16) != 0; + }; + _2.Dk = function K5d() { + return (this.b & 8) != 0; + }; + _2.Ek = function L5d() { + return (this.b & Dve) != 0; + }; + _2.rk = function M5d() { + return (this.b & 32) != 0; + }; + _2.Fk = function N5d() { + return (this.b & zte) != 0; + }; + _2.wj = function O5d(a) { + return !this.d ? this.ak().Yj().wj(a) : qEd(this.d, a); + }; + _2.fj = function P5d() { + return (this.b & 2) != 0 ? (this.b & 1) != 0 : this.i != 0; + }; + _2.hi = function Q5d() { + return (this.b & 128) != 0; + }; + _2.Xj = function S5d() { + var a; + Uxd(this); + if ((this.b & 2) != 0) { + if (oid(this.e)) { + a = (this.b & 1) != 0; + this.b &= -2; + GLd(this, new qSd(this.e, 2, bLd(this.e.Tg(), this.ak()), a, false)); + } else { + this.b &= -2; + } + } + }; + _2.ni = function T5d() { + return (this.b & 1536) == 0; + }; + _2.b = 0; + mdb(yve, "EcoreEList/Generic", 1164); + bcb(1165, 1164, Pve, U5d); + _2.ak = function V5d() { + return this.a; + }; + mdb(yve, "EcoreEList/Dynamic", 1165); + bcb(747, 63, oue, W5d); + _2.ri = function X5d(a) { + return izd(this.a.a, a); + }; + mdb(yve, "EcoreEMap/1", 747); + bcb(746, 85, Pve, Y5d); + _2.bi = function Z5d(a, b) { + uAd(this.b, BD(b, 133)); + }; + _2.di = function $5d(a, b) { + tAd(this.b); + }; + _2.ei = function _5d(a, b, c2) { + var d; + ++(d = this.b, BD(b, 133), d).e; + }; + _2.fi = function a6d(a, b) { + vAd(this.b, BD(b, 133)); + }; + _2.gi = function b6d(a, b, c2) { + vAd(this.b, BD(c2, 133)); + PD(c2) === PD(b) && BD(c2, 133).Th(CAd(BD(b, 133).cd())); + uAd(this.b, BD(b, 133)); + }; + mdb(yve, "EcoreEMap/DelegateEObjectContainmentEList", 746); + bcb(1171, 151, Ave, c6d); + mdb(yve, "EcoreEMap/Unsettable", 1171); + bcb(1172, 746, Pve, d6d); + _2.ci = function e6d() { + this.a = true; + }; + _2.fj = function f6d() { + return this.a; + }; + _2.Xj = function g6d() { + var a; + Uxd(this); + if (oid(this.e)) { + a = this.a; + this.a = false; + Uhd(this.e, new qSd(this.e, 2, this.c, a, false)); + } else { + this.a = false; + } + }; + _2.a = false; + mdb(yve, "EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList", 1172); + bcb(1168, 228, fke, A6d); + _2.a = false; + _2.b = false; + mdb(yve, "EcoreUtil/Copier", 1168); + bcb(745, 1, aie, C6d); + _2.Nb = function D6d(a) { + Rrb(this, a); + }; + _2.Ob = function E6d() { + return B6d(this); + }; + _2.Pb = function F6d() { + var a; + B6d(this); + a = this.b; + this.b = null; + return a; + }; + _2.Qb = function G6d() { + this.a.Qb(); + }; + mdb(yve, "EcoreUtil/ProperContentIterator", 745); + bcb(1382, 1381, {}, J6d); + var H6d; + mdb(yve, "EcoreValidator", 1382); + var P6d; + odb(yve, "FeatureMapUtil/Validator"); + bcb(1260, 1, { 1942: 1 }, U6d); + _2.rl = function V6d(a) { + return true; + }; + mdb(yve, "FeatureMapUtil/1", 1260); + bcb(757, 1, { 1942: 1 }, Z6d); + _2.rl = function $6d(a) { + var b; + if (this.c == a) + return true; + b = DD(Ohb(this.a, a)); + if (b == null) { + if (Y6d(this, a)) { + _6d(this.a, a, (Bcb(), Acb)); + return true; + } else { + _6d(this.a, a, (Bcb(), zcb)); + return false; + } + } else { + return b == (Bcb(), Acb); + } + }; + _2.e = false; + var W6d; + mdb(yve, "FeatureMapUtil/BasicValidator", 757); + bcb(758, 43, fke, a7d); + mdb(yve, "FeatureMapUtil/BasicValidator/Cache", 758); + bcb(501, 52, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 76: 1, 69: 1, 95: 1 }, f7d); + _2.Vc = function g7d(a, b) { + p2d(this.c, this.b, a, b); + }; + _2.Fc = function h7d(a) { + return q2d(this.c, this.b, a); + }; + _2.Wc = function i7d(a, b) { + return s2d(this.c, this.b, a, b); + }; + _2.Gc = function j7d(a) { + return b7d(this, a); + }; + _2.Xh = function k7d(a, b) { + u2d(this.c, this.b, a, b); + }; + _2.lk = function l7d(a, b) { + return x2d(this.c, this.b, a, b); + }; + _2.pi = function m7d(a) { + return J2d(this.c, this.b, a, false); + }; + _2.Zh = function n7d() { + return y2d(this.c, this.b); + }; + _2.$h = function o7d() { + return z2d(this.c, this.b); + }; + _2._h = function p7d(a) { + return A2d(this.c, this.b, a); + }; + _2.mk = function q7d(a, b) { + return c7d(this, a, b); + }; + _2.$b = function r7d() { + d7d(this); + }; + _2.Hc = function s7d(a) { + return E2d(this.c, this.b, a); + }; + _2.Ic = function t7d(a) { + return G2d(this.c, this.b, a); + }; + _2.Xb = function u7d(a) { + return J2d(this.c, this.b, a, true); + }; + _2.Wj = function v7d(a) { + return this; + }; + _2.Xc = function w7d(a) { + return L2d(this.c, this.b, a); + }; + _2.dc = function x7d() { + return e7d(this); + }; + _2.fj = function y7d() { + return !R2d(this.c, this.b); + }; + _2.Kc = function z7d() { + return S2d(this.c, this.b); + }; + _2.Yc = function A7d() { + return U2d(this.c, this.b); + }; + _2.Zc = function B7d(a) { + return V2d(this.c, this.b, a); + }; + _2.ii = function C7d(a, b) { + return X2d(this.c, this.b, a, b); + }; + _2.ji = function D7d(a, b) { + Y2d(this.c, this.b, a, b); + }; + _2.$c = function E7d(a) { + return Z2d(this.c, this.b, a); + }; + _2.Mc = function F7d(a) { + return $2d(this.c, this.b, a); + }; + _2._c = function G7d(a, b) { + return e3d(this.c, this.b, a, b); + }; + _2.Wb = function H7d(a) { + D2d(this.c, this.b); + b7d(this, BD(a, 15)); + }; + _2.gc = function I7d() { + return n3d(this.c, this.b); + }; + _2.Pc = function J7d() { + return o3d(this.c, this.b); + }; + _2.Qc = function K7d(a) { + return q3d(this.c, this.b, a); + }; + _2.Ib = function L7d() { + var a, b; + b = new Hfb(); + b.a += "["; + for (a = y2d(this.c, this.b); b4d(a); ) { + Efb(b, xfb(d4d(a))); + b4d(a) && (b.a += She, b); + } + b.a += "]"; + return b.a; + }; + _2.Xj = function M7d() { + D2d(this.c, this.b); + }; + mdb(yve, "FeatureMapUtil/FeatureEList", 501); + bcb(627, 36, fve, O7d); + _2.yi = function P7d(a) { + return N7d(this, a); + }; + _2.Di = function Q7d(a) { + var b, c2, d, e, f2, g, h; + switch (this.d) { + case 1: + case 2: { + f2 = a.Ai(); + if (PD(f2) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.g = a.zi(); + a.xi() == 1 && (this.d = 1); + return true; + } + break; + } + case 3: { + e = a.xi(); + switch (e) { + case 3: { + f2 = a.Ai(); + if (PD(f2) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.d = 5; + b = new zud(2); + wtd(b, this.g); + wtd(b, a.zi()); + this.g = b; + return true; + } + break; + } + } + break; + } + case 5: { + e = a.xi(); + switch (e) { + case 3: { + f2 = a.Ai(); + if (PD(f2) === PD(this.c) && N7d(this, null) == a.yi(null)) { + c2 = BD(this.g, 14); + c2.Fc(a.zi()); + return true; + } + break; + } + } + break; + } + case 4: { + e = a.xi(); + switch (e) { + case 3: { + f2 = a.Ai(); + if (PD(f2) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.d = 1; + this.g = a.zi(); + return true; + } + break; + } + case 4: { + f2 = a.Ai(); + if (PD(f2) === PD(this.c) && N7d(this, null) == a.yi(null)) { + this.d = 6; + h = new zud(2); + wtd(h, this.n); + wtd(h, a.Bi()); + this.n = h; + g = OC(GC(WD, 1), oje, 25, 15, [this.o, a.Ci()]); + this.g = g; + return true; + } + break; + } + } + break; + } + case 6: { + e = a.xi(); + switch (e) { + case 4: { + f2 = a.Ai(); + if (PD(f2) === PD(this.c) && N7d(this, null) == a.yi(null)) { + c2 = BD(this.n, 14); + c2.Fc(a.Bi()); + g = BD(this.g, 48); + d = KC(WD, oje, 25, g.length + 1, 15, 1); + $fb(g, 0, d, 0, g.length); + d[g.length] = a.Ci(); + this.g = d; + return true; + } + break; + } + } + break; + } + } + return false; + }; + mdb(yve, "FeatureMapUtil/FeatureENotificationImpl", 627); + bcb(552, 501, { 20: 1, 28: 1, 52: 1, 14: 1, 15: 1, 58: 1, 76: 1, 153: 1, 215: 1, 1937: 1, 69: 1, 95: 1 }, R7d); + _2.dl = function S7d(a, b) { + return q2d(this.c, a, b); + }; + _2.el = function T7d(a, b, c2) { + return x2d(this.c, a, b, c2); + }; + _2.fl = function U7d(a, b, c2) { + return C2d(this.c, a, b, c2); + }; + _2.gl = function V7d() { + return this; + }; + _2.hl = function W7d(a, b) { + return K2d(this.c, a, b); + }; + _2.il = function X7d(a) { + return BD(J2d(this.c, this.b, a, false), 72).ak(); + }; + _2.jl = function Y7d(a) { + return BD(J2d(this.c, this.b, a, false), 72).dd(); + }; + _2.kl = function Z7d() { + return this.a; + }; + _2.ll = function $7d(a) { + return !R2d(this.c, a); + }; + _2.ml = function _7d(a, b) { + f3d(this.c, a, b); + }; + _2.nl = function a8d(a) { + return g3d(this.c, a); + }; + _2.ol = function b8d(a) { + s3d(this.c, a); + }; + mdb(yve, "FeatureMapUtil/FeatureFeatureMap", 552); + bcb(1259, 1, zve, c8d); + _2.Wj = function d8d(a) { + return J2d(this.b, this.a, -1, a); + }; + _2.fj = function e8d() { + return !R2d(this.b, this.a); + }; + _2.Wb = function f8d(a) { + f3d(this.b, this.a, a); + }; + _2.Xj = function g8d() { + D2d(this.b, this.a); + }; + mdb(yve, "FeatureMapUtil/FeatureValue", 1259); + var h8d, i8d, j8d, k8d, l8d; + var Q9 = odb(Iwe, "AnyType"); + bcb(666, 60, Tie, n8d); + mdb(Iwe, "InvalidDatatypeValueException", 666); + var S9 = odb(Iwe, Jwe); + var T9 = odb(Iwe, Kwe); + var U9 = odb(Iwe, Lwe); + var o8d; + var q8d; + var s8d, t8d, u8d, v8d, w8d, x8d, y8d, z8d, A8d, B8d, C8d, D8d, E8d, F8d, G8d, H8d, I8d, J8d, K8d, L8d, M8d, N8d, O8d, P8d; + bcb(830, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 843: 1 }, R8d); + _2._g = function S8d(a, b, c2) { + switch (a) { + case 0: + if (c2) + return !this.c && (this.c = new u3d(this, 0)), this.c; + return !this.c && (this.c = new u3d(this, 0)), this.c.b; + case 1: + if (c2) + return !this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153); + return (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).kl(); + case 2: + if (c2) + return !this.b && (this.b = new u3d(this, 2)), this.b; + return !this.b && (this.b = new u3d(this, 2)), this.b.b; + } + return bid(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c2); + }; + _2.jh = function T8d(a, b, c2) { + var d; + switch (b) { + case 0: + return !this.c && (this.c = new u3d(this, 0)), B2d(this.c, a, c2); + case 1: + return (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 69)).mk(a, c2); + case 2: + return !this.b && (this.b = new u3d(this, 2)), B2d(this.b, a, c2); + } + return d = BD(XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), b), 66), d.Nj().Rj(this, Aid(this), b - aLd(this.zh()), a, c2); + }; + _2.lh = function U8d(a) { + switch (a) { + case 0: + return !!this.c && this.c.i != 0; + case 1: + return !(!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).dc(); + case 2: + return !!this.b && this.b.i != 0; + } + return cid(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _2.sh = function V8d(a, b) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + d3d(this.c, b); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).Wb(b); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + d3d(this.b, b); + return; + } + did(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _2.zh = function W8d() { + return Q8d(), s8d; + }; + _2.Bh = function X8d(a) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + Uxd(this.c); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).$b(); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + Uxd(this.b); + return; + } + eid(this, a - aLd(this.zh()), XKd((this.j & 2) == 0 ? this.zh() : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _2.Ib = function Y8d() { + var a; + if ((this.j & 4) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (mixed: "; + Dfb(a, this.c); + a.a += ", anyAttribute: "; + Dfb(a, this.b); + a.a += ")"; + return a.a; + }; + mdb(Mwe, "AnyTypeImpl", 830); + bcb(667, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 2021: 1, 667: 1 }, _8d); + _2._g = function a9d(a, b, c2) { + switch (a) { + case 0: + return this.a; + case 1: + return this.b; + } + return bid(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c2); + }; + _2.lh = function b9d(a) { + switch (a) { + case 0: + return this.a != null; + case 1: + return this.b != null; + } + return cid(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _2.sh = function c9d(a, b) { + switch (a) { + case 0: + Z8d(this, GD(b)); + return; + case 1: + $8d(this, GD(b)); + return; + } + did(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _2.zh = function d9d() { + return Q8d(), F8d; + }; + _2.Bh = function e9d(a) { + switch (a) { + case 0: + this.a = null; + return; + case 1: + this.b = null; + return; + } + eid(this, a - aLd((Q8d(), F8d)), XKd((this.j & 2) == 0 ? F8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _2.Ib = function f9d() { + var a; + if ((this.j & 4) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (data: "; + Efb(a, this.a); + a.a += ", target: "; + Efb(a, this.b); + a.a += ")"; + return a.a; + }; + _2.a = null; + _2.b = null; + mdb(Mwe, "ProcessingInstructionImpl", 667); + bcb(668, 830, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 843: 1, 2022: 1, 668: 1 }, i9d); + _2._g = function j9d(a, b, c2) { + switch (a) { + case 0: + if (c2) + return !this.c && (this.c = new u3d(this, 0)), this.c; + return !this.c && (this.c = new u3d(this, 0)), this.c.b; + case 1: + if (c2) + return !this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153); + return (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).kl(); + case 2: + if (c2) + return !this.b && (this.b = new u3d(this, 2)), this.b; + return !this.b && (this.b = new u3d(this, 2)), this.b.b; + case 3: + return !this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)); + case 4: + return j6d(this.a, (!this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)))); + case 5: + return this.a; + } + return bid(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c2); + }; + _2.lh = function k9d(a) { + switch (a) { + case 0: + return !!this.c && this.c.i != 0; + case 1: + return !(!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).dc(); + case 2: + return !!this.b && this.b.i != 0; + case 3: + return !this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)) != null; + case 4: + return j6d(this.a, (!this.c && (this.c = new u3d(this, 0)), GD(K2d(this.c, (Q8d(), I8d), true)))) != null; + case 5: + return !!this.a; + } + return cid(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _2.sh = function l9d(a, b) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + d3d(this.c, b); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(BD(T2d(this.c, (Q8d(), t8d)), 153), 215)).Wb(b); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + d3d(this.b, b); + return; + case 3: + h9d(this, GD(b)); + return; + case 4: + h9d(this, h6d(this.a, b)); + return; + case 5: + g9d(this, BD(b, 148)); + return; + } + did(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _2.zh = function m9d() { + return Q8d(), H8d; + }; + _2.Bh = function n9d(a) { + switch (a) { + case 0: + !this.c && (this.c = new u3d(this, 0)); + Uxd(this.c); + return; + case 1: + (!this.c && (this.c = new u3d(this, 0)), BD(T2d(this.c, (Q8d(), t8d)), 153)).$b(); + return; + case 2: + !this.b && (this.b = new u3d(this, 2)); + Uxd(this.b); + return; + case 3: + !this.c && (this.c = new u3d(this, 0)); + f3d(this.c, (Q8d(), I8d), null); + return; + case 4: + h9d(this, h6d(this.a, null)); + return; + case 5: + this.a = null; + return; + } + eid(this, a - aLd((Q8d(), H8d)), XKd((this.j & 2) == 0 ? H8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + mdb(Mwe, "SimpleAnyTypeImpl", 668); + bcb(669, 506, { 105: 1, 92: 1, 90: 1, 56: 1, 49: 1, 97: 1, 2023: 1, 669: 1 }, o9d); + _2._g = function p9d(a, b, c2) { + switch (a) { + case 0: + if (c2) + return !this.a && (this.a = new u3d(this, 0)), this.a; + return !this.a && (this.a = new u3d(this, 0)), this.a.b; + case 1: + return c2 ? (!this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)), this.b) : (!this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)), FAd(this.b)); + case 2: + return c2 ? (!this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)), this.c) : (!this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)), FAd(this.c)); + case 3: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), L8d)); + case 4: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), M8d)); + case 5: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), O8d)); + case 6: + return !this.a && (this.a = new u3d(this, 0)), T2d(this.a, (Q8d(), P8d)); + } + return bid(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b, c2); + }; + _2.jh = function q9d(a, b, c2) { + var d; + switch (b) { + case 0: + return !this.a && (this.a = new u3d(this, 0)), B2d(this.a, a, c2); + case 1: + return !this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)), bId(this.b, a, c2); + case 2: + return !this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)), bId(this.c, a, c2); + case 5: + return !this.a && (this.a = new u3d(this, 0)), c7d(T2d(this.a, (Q8d(), O8d)), a, c2); + } + return d = BD(XKd((this.j & 2) == 0 ? (Q8d(), K8d) : (!this.k && (this.k = new HGd()), this.k).ck(), b), 66), d.Nj().Rj(this, Aid(this), b - aLd((Q8d(), K8d)), a, c2); + }; + _2.lh = function r9d(a) { + switch (a) { + case 0: + return !!this.a && this.a.i != 0; + case 1: + return !!this.b && this.b.f != 0; + case 2: + return !!this.c && this.c.f != 0; + case 3: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), L8d))); + case 4: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), M8d))); + case 5: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), O8d))); + case 6: + return !this.a && (this.a = new u3d(this, 0)), !e7d(T2d(this.a, (Q8d(), P8d))); + } + return cid(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _2.sh = function s9d(a, b) { + switch (a) { + case 0: + !this.a && (this.a = new u3d(this, 0)); + d3d(this.a, b); + return; + case 1: + !this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)); + cId(this.b, b); + return; + case 2: + !this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)); + cId(this.c, b); + return; + case 3: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), L8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, L8d), BD(b, 14)); + return; + case 4: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), M8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, M8d), BD(b, 14)); + return; + case 5: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), O8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, O8d), BD(b, 14)); + return; + case 6: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), P8d))); + !this.a && (this.a = new u3d(this, 0)); + b7d(T2d(this.a, P8d), BD(b, 14)); + return; + } + did(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a), b); + }; + _2.zh = function t9d() { + return Q8d(), K8d; + }; + _2.Bh = function u9d(a) { + switch (a) { + case 0: + !this.a && (this.a = new u3d(this, 0)); + Uxd(this.a); + return; + case 1: + !this.b && (this.b = new dId((jGd(), fGd), x6, this, 1)); + this.b.c.$b(); + return; + case 2: + !this.c && (this.c = new dId((jGd(), fGd), x6, this, 2)); + this.c.c.$b(); + return; + case 3: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), L8d))); + return; + case 4: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), M8d))); + return; + case 5: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), O8d))); + return; + case 6: + !this.a && (this.a = new u3d(this, 0)); + d7d(T2d(this.a, (Q8d(), P8d))); + return; + } + eid(this, a - aLd((Q8d(), K8d)), XKd((this.j & 2) == 0 ? K8d : (!this.k && (this.k = new HGd()), this.k).ck(), a)); + }; + _2.Ib = function v9d() { + var a; + if ((this.j & 4) != 0) + return Eid(this); + a = new Jfb(Eid(this)); + a.a += " (mixed: "; + Dfb(a, this.a); + a.a += ")"; + return a.a; + }; + mdb(Mwe, "XMLTypeDocumentRootImpl", 669); + bcb(1919, 704, { 105: 1, 92: 1, 90: 1, 471: 1, 147: 1, 56: 1, 108: 1, 49: 1, 97: 1, 150: 1, 114: 1, 115: 1, 2024: 1 }, U9d); + _2.Ih = function V9d(a, b) { + switch (a.yj()) { + case 7: + case 8: + case 9: + case 10: + case 16: + case 22: + case 23: + case 24: + case 25: + case 26: + case 32: + case 33: + case 34: + case 36: + case 37: + case 44: + case 45: + case 50: + case 51: + case 53: + case 55: + case 56: + case 57: + case 58: + case 60: + case 61: + case 4: + return b == null ? null : fcb(b); + case 19: + case 28: + case 29: + case 35: + case 38: + case 39: + case 41: + case 46: + case 52: + case 54: + case 5: + return GD(b); + case 6: + return C9d(BD(b, 190)); + case 12: + case 47: + case 49: + case 11: + return Vmd(this, a, b); + case 13: + return b == null ? null : qgb(BD(b, 240)); + case 15: + case 14: + return b == null ? null : D9d(Edb(ED(b))); + case 17: + return E9d((Q8d(), b)); + case 18: + return E9d(b); + case 21: + case 20: + return b == null ? null : F9d(BD(b, 155).a); + case 27: + return G9d(BD(b, 190)); + case 30: + return H9d((Q8d(), BD(b, 15))); + case 31: + return H9d(BD(b, 15)); + case 40: + return K9d((Q8d(), b)); + case 42: + return I9d((Q8d(), b)); + case 43: + return I9d(b); + case 59: + case 48: + return J9d((Q8d(), b)); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + _2.Jh = function W9d(a) { + var b, c2, d, e, f2; + switch (a.G == -1 && (a.G = (c2 = bKd(a), c2 ? HLd(c2.Mh(), a) : -1)), a.G) { + case 0: + return b = new R8d(), b; + case 1: + return d = new _8d(), d; + case 2: + return e = new i9d(), e; + case 3: + return f2 = new o9d(), f2; + default: + throw vbb(new Wdb(xte + a.zb + ute)); + } + }; + _2.Kh = function X9d(a, b) { + var c2, d, e, f2, g, h, i3, j, k, l, m, n, o2, p, q, r; + switch (a.yj()) { + case 5: + case 52: + case 4: + return b; + case 6: + return L9d(b); + case 8: + case 7: + return b == null ? null : B9d(b); + case 9: + return b == null ? null : Scb(Icb((d = Qge(b, true), d.length > 0 && (BCb(0, d.length), d.charCodeAt(0) == 43) ? d.substr(1) : d), -128, 127) << 24 >> 24); + case 10: + return b == null ? null : Scb(Icb((e = Qge(b, true), e.length > 0 && (BCb(0, e.length), e.charCodeAt(0) == 43) ? e.substr(1) : e), -128, 127) << 24 >> 24); + case 11: + return GD(Wmd(this, (Q8d(), w8d), b)); + case 12: + return GD(Wmd(this, (Q8d(), x8d), b)); + case 13: + return b == null ? null : new tgb(Qge(b, true)); + case 15: + case 14: + return M9d(b); + case 16: + return GD(Wmd(this, (Q8d(), y8d), b)); + case 17: + return N9d((Q8d(), b)); + case 18: + return N9d(b); + case 28: + case 29: + case 35: + case 38: + case 39: + case 41: + case 54: + case 19: + return Qge(b, true); + case 21: + case 20: + return O9d(b); + case 22: + return GD(Wmd(this, (Q8d(), z8d), b)); + case 23: + return GD(Wmd(this, (Q8d(), A8d), b)); + case 24: + return GD(Wmd(this, (Q8d(), B8d), b)); + case 25: + return GD(Wmd(this, (Q8d(), C8d), b)); + case 26: + return GD(Wmd(this, (Q8d(), D8d), b)); + case 27: + return P9d(b); + case 30: + return Q9d((Q8d(), b)); + case 31: + return Q9d(b); + case 32: + return b == null ? null : meb(Icb((k = Qge(b, true), k.length > 0 && (BCb(0, k.length), k.charCodeAt(0) == 43) ? k.substr(1) : k), Rie, Ohe)); + case 33: + return b == null ? null : new Ygb((l = Qge(b, true), l.length > 0 && (BCb(0, l.length), l.charCodeAt(0) == 43) ? l.substr(1) : l)); + case 34: + return b == null ? null : meb(Icb((m = Qge(b, true), m.length > 0 && (BCb(0, m.length), m.charCodeAt(0) == 43) ? m.substr(1) : m), Rie, Ohe)); + case 36: + return b == null ? null : Aeb(Jcb((n = Qge(b, true), n.length > 0 && (BCb(0, n.length), n.charCodeAt(0) == 43) ? n.substr(1) : n))); + case 37: + return b == null ? null : Aeb(Jcb((o2 = Qge(b, true), o2.length > 0 && (BCb(0, o2.length), o2.charCodeAt(0) == 43) ? o2.substr(1) : o2))); + case 40: + return T9d((Q8d(), b)); + case 42: + return R9d((Q8d(), b)); + case 43: + return R9d(b); + case 44: + return b == null ? null : new Ygb((p = Qge(b, true), p.length > 0 && (BCb(0, p.length), p.charCodeAt(0) == 43) ? p.substr(1) : p)); + case 45: + return b == null ? null : new Ygb((q = Qge(b, true), q.length > 0 && (BCb(0, q.length), q.charCodeAt(0) == 43) ? q.substr(1) : q)); + case 46: + return Qge(b, false); + case 47: + return GD(Wmd(this, (Q8d(), E8d), b)); + case 59: + case 48: + return S9d((Q8d(), b)); + case 49: + return GD(Wmd(this, (Q8d(), G8d), b)); + case 50: + return b == null ? null : Web(Icb((r = Qge(b, true), r.length > 0 && (BCb(0, r.length), r.charCodeAt(0) == 43) ? r.substr(1) : r), awe, 32767) << 16 >> 16); + case 51: + return b == null ? null : Web(Icb((f2 = Qge(b, true), f2.length > 0 && (BCb(0, f2.length), f2.charCodeAt(0) == 43) ? f2.substr(1) : f2), awe, 32767) << 16 >> 16); + case 53: + return GD(Wmd(this, (Q8d(), J8d), b)); + case 55: + return b == null ? null : Web(Icb((g = Qge(b, true), g.length > 0 && (BCb(0, g.length), g.charCodeAt(0) == 43) ? g.substr(1) : g), awe, 32767) << 16 >> 16); + case 56: + return b == null ? null : Web(Icb((h = Qge(b, true), h.length > 0 && (BCb(0, h.length), h.charCodeAt(0) == 43) ? h.substr(1) : h), awe, 32767) << 16 >> 16); + case 57: + return b == null ? null : Aeb(Jcb((i3 = Qge(b, true), i3.length > 0 && (BCb(0, i3.length), i3.charCodeAt(0) == 43) ? i3.substr(1) : i3))); + case 58: + return b == null ? null : Aeb(Jcb((j = Qge(b, true), j.length > 0 && (BCb(0, j.length), j.charCodeAt(0) == 43) ? j.substr(1) : j))); + case 60: + return b == null ? null : meb(Icb((c2 = Qge(b, true), c2.length > 0 && (BCb(0, c2.length), c2.charCodeAt(0) == 43) ? c2.substr(1) : c2), Rie, Ohe)); + case 61: + return b == null ? null : meb(Icb(Qge(b, true), Rie, Ohe)); + default: + throw vbb(new Wdb(tte + a.ne() + ute)); + } + }; + var w9d, x9d, y9d, z9d; + mdb(Mwe, "XMLTypeFactoryImpl", 1919); + bcb(586, 179, { 105: 1, 92: 1, 90: 1, 147: 1, 191: 1, 56: 1, 235: 1, 108: 1, 49: 1, 97: 1, 150: 1, 179: 1, 114: 1, 115: 1, 675: 1, 1945: 1, 586: 1 }, cae); + _2.N = false; + _2.O = false; + var Z9d = false; + mdb(Mwe, "XMLTypePackageImpl", 586); + bcb(1852, 1, { 837: 1 }, fae); + _2._j = function gae() { + return Uge(), Tge; + }; + mdb(Mwe, "XMLTypePackageImpl/1", 1852); + bcb(1861, 1, nwe, hae); + _2.wj = function iae(a) { + return ND(a); + }; + _2.xj = function jae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/10", 1861); + bcb(1862, 1, nwe, kae); + _2.wj = function lae(a) { + return ND(a); + }; + _2.xj = function mae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/11", 1862); + bcb(1863, 1, nwe, nae); + _2.wj = function oae(a) { + return ND(a); + }; + _2.xj = function pae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/12", 1863); + bcb(1864, 1, nwe, qae); + _2.wj = function rae(a) { + return LD(a); + }; + _2.xj = function sae(a) { + return KC(BI, nie, 333, a, 7, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/13", 1864); + bcb(1865, 1, nwe, tae); + _2.wj = function uae(a) { + return ND(a); + }; + _2.xj = function vae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/14", 1865); + bcb(1866, 1, nwe, wae); + _2.wj = function xae(a) { + return JD(a, 15); + }; + _2.xj = function yae(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/15", 1866); + bcb(1867, 1, nwe, zae); + _2.wj = function Aae(a) { + return JD(a, 15); + }; + _2.xj = function Bae(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/16", 1867); + bcb(1868, 1, nwe, Cae); + _2.wj = function Dae(a) { + return ND(a); + }; + _2.xj = function Eae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/17", 1868); + bcb(1869, 1, nwe, Fae); + _2.wj = function Gae(a) { + return JD(a, 155); + }; + _2.xj = function Hae(a) { + return KC(FI, nie, 155, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/18", 1869); + bcb(1870, 1, nwe, Iae); + _2.wj = function Jae(a) { + return ND(a); + }; + _2.xj = function Kae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/19", 1870); + bcb(1853, 1, nwe, Lae); + _2.wj = function Mae(a) { + return JD(a, 843); + }; + _2.xj = function Nae(a) { + return KC(Q9, Uhe, 843, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/2", 1853); + bcb(1871, 1, nwe, Oae); + _2.wj = function Pae(a) { + return ND(a); + }; + _2.xj = function Qae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/20", 1871); + bcb(1872, 1, nwe, Rae); + _2.wj = function Sae(a) { + return ND(a); + }; + _2.xj = function Tae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/21", 1872); + bcb(1873, 1, nwe, Uae); + _2.wj = function Vae(a) { + return ND(a); + }; + _2.xj = function Wae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/22", 1873); + bcb(1874, 1, nwe, Xae); + _2.wj = function Yae(a) { + return ND(a); + }; + _2.xj = function Zae(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/23", 1874); + bcb(1875, 1, nwe, $ae); + _2.wj = function _ae(a) { + return JD(a, 190); + }; + _2.xj = function abe(a) { + return KC(SD, nie, 190, a, 0, 2); + }; + mdb(Mwe, "XMLTypePackageImpl/24", 1875); + bcb(1876, 1, nwe, bbe); + _2.wj = function cbe(a) { + return ND(a); + }; + _2.xj = function dbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/25", 1876); + bcb(1877, 1, nwe, ebe); + _2.wj = function fbe(a) { + return ND(a); + }; + _2.xj = function gbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/26", 1877); + bcb(1878, 1, nwe, hbe); + _2.wj = function ibe(a) { + return JD(a, 15); + }; + _2.xj = function jbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/27", 1878); + bcb(1879, 1, nwe, kbe); + _2.wj = function lbe(a) { + return JD(a, 15); + }; + _2.xj = function mbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/28", 1879); + bcb(1880, 1, nwe, nbe); + _2.wj = function obe(a) { + return ND(a); + }; + _2.xj = function pbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/29", 1880); + bcb(1854, 1, nwe, qbe); + _2.wj = function rbe(a) { + return JD(a, 667); + }; + _2.xj = function sbe(a) { + return KC(S9, Uhe, 2021, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/3", 1854); + bcb(1881, 1, nwe, tbe); + _2.wj = function ube(a) { + return JD(a, 19); + }; + _2.xj = function vbe(a) { + return KC(JI, nie, 19, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/30", 1881); + bcb(1882, 1, nwe, wbe); + _2.wj = function xbe(a) { + return ND(a); + }; + _2.xj = function ybe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/31", 1882); + bcb(1883, 1, nwe, zbe); + _2.wj = function Abe(a) { + return JD(a, 162); + }; + _2.xj = function Bbe(a) { + return KC(MI, nie, 162, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/32", 1883); + bcb(1884, 1, nwe, Cbe); + _2.wj = function Dbe(a) { + return ND(a); + }; + _2.xj = function Ebe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/33", 1884); + bcb(1885, 1, nwe, Fbe); + _2.wj = function Gbe(a) { + return ND(a); + }; + _2.xj = function Hbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/34", 1885); + bcb(1886, 1, nwe, Ibe); + _2.wj = function Jbe(a) { + return ND(a); + }; + _2.xj = function Kbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/35", 1886); + bcb(1887, 1, nwe, Lbe); + _2.wj = function Mbe(a) { + return ND(a); + }; + _2.xj = function Nbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/36", 1887); + bcb(1888, 1, nwe, Obe); + _2.wj = function Pbe(a) { + return JD(a, 15); + }; + _2.xj = function Qbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/37", 1888); + bcb(1889, 1, nwe, Rbe); + _2.wj = function Sbe(a) { + return JD(a, 15); + }; + _2.xj = function Tbe(a) { + return KC(yK, eme, 15, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/38", 1889); + bcb(1890, 1, nwe, Ube); + _2.wj = function Vbe(a) { + return ND(a); + }; + _2.xj = function Wbe(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/39", 1890); + bcb(1855, 1, nwe, Xbe); + _2.wj = function Ybe(a) { + return JD(a, 668); + }; + _2.xj = function Zbe(a) { + return KC(T9, Uhe, 2022, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/4", 1855); + bcb(1891, 1, nwe, $be); + _2.wj = function _be(a) { + return ND(a); + }; + _2.xj = function ace(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/40", 1891); + bcb(1892, 1, nwe, bce); + _2.wj = function cce(a) { + return ND(a); + }; + _2.xj = function dce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/41", 1892); + bcb(1893, 1, nwe, ece); + _2.wj = function fce(a) { + return ND(a); + }; + _2.xj = function gce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/42", 1893); + bcb(1894, 1, nwe, hce); + _2.wj = function ice(a) { + return ND(a); + }; + _2.xj = function jce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/43", 1894); + bcb(1895, 1, nwe, kce); + _2.wj = function lce(a) { + return ND(a); + }; + _2.xj = function mce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/44", 1895); + bcb(1896, 1, nwe, nce); + _2.wj = function oce(a) { + return JD(a, 184); + }; + _2.xj = function pce(a) { + return KC(UI, nie, 184, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/45", 1896); + bcb(1897, 1, nwe, qce); + _2.wj = function rce(a) { + return ND(a); + }; + _2.xj = function sce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/46", 1897); + bcb(1898, 1, nwe, tce); + _2.wj = function uce(a) { + return ND(a); + }; + _2.xj = function vce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/47", 1898); + bcb(1899, 1, nwe, wce); + _2.wj = function xce(a) { + return ND(a); + }; + _2.xj = function yce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/48", 1899); + bcb(nje, 1, nwe, zce); + _2.wj = function Ace(a) { + return JD(a, 184); + }; + _2.xj = function Bce(a) { + return KC(UI, nie, 184, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/49", nje); + bcb(1856, 1, nwe, Cce); + _2.wj = function Dce(a) { + return JD(a, 669); + }; + _2.xj = function Ece(a) { + return KC(U9, Uhe, 2023, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/5", 1856); + bcb(1901, 1, nwe, Fce); + _2.wj = function Gce(a) { + return JD(a, 162); + }; + _2.xj = function Hce(a) { + return KC(MI, nie, 162, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/50", 1901); + bcb(1902, 1, nwe, Ice); + _2.wj = function Jce(a) { + return ND(a); + }; + _2.xj = function Kce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/51", 1902); + bcb(1903, 1, nwe, Lce); + _2.wj = function Mce(a) { + return JD(a, 19); + }; + _2.xj = function Nce(a) { + return KC(JI, nie, 19, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/52", 1903); + bcb(1857, 1, nwe, Oce); + _2.wj = function Pce(a) { + return ND(a); + }; + _2.xj = function Qce(a) { + return KC(ZI, nie, 2, a, 6, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/6", 1857); + bcb(1858, 1, nwe, Rce); + _2.wj = function Sce(a) { + return JD(a, 190); + }; + _2.xj = function Tce(a) { + return KC(SD, nie, 190, a, 0, 2); + }; + mdb(Mwe, "XMLTypePackageImpl/7", 1858); + bcb(1859, 1, nwe, Uce); + _2.wj = function Vce(a) { + return KD(a); + }; + _2.xj = function Wce(a) { + return KC(wI, nie, 476, a, 8, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/8", 1859); + bcb(1860, 1, nwe, Xce); + _2.wj = function Yce(a) { + return JD(a, 217); + }; + _2.xj = function Zce(a) { + return KC(xI, nie, 217, a, 0, 1); + }; + mdb(Mwe, "XMLTypePackageImpl/9", 1860); + var $ce, _ce; + var fde, gde; + var kde; + bcb(50, 60, Tie, mde); + mdb(kxe, "RegEx/ParseException", 50); + bcb(820, 1, {}, ude); + _2.sl = function vde(a) { + return a < this.j && bfb(this.i, a) == 63; + }; + _2.tl = function wde() { + var a, b, c2, d, e; + if (this.c != 10) + throw vbb(new mde(tvd((h0d(), uue)))); + a = this.a; + switch (a) { + case 101: + a = 27; + break; + case 102: + a = 12; + break; + case 110: + a = 10; + break; + case 114: + a = 13; + break; + case 116: + a = 9; + break; + case 120: + nde(this); + if (this.c != 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + if (this.a == 123) { + e = 0; + c2 = 0; + do { + nde(this); + if (this.c != 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + if ((e = yde(this.a)) < 0) + break; + if (c2 > c2 * 16) + throw vbb(new mde(tvd((h0d(), Uue)))); + c2 = c2 * 16 + e; + } while (true); + if (this.a != 125) + throw vbb(new mde(tvd((h0d(), Vue)))); + if (c2 > lxe) + throw vbb(new mde(tvd((h0d(), Wue)))); + a = c2; + } else { + e = 0; + if (this.c != 0 || (e = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + c2 = e; + nde(this); + if (this.c != 0 || (e = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + c2 = c2 * 16 + e; + a = c2; + } + break; + case 117: + d = 0; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + a = b; + break; + case 118: + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + nde(this); + if (this.c != 0 || (d = yde(this.a)) < 0) + throw vbb(new mde(tvd((h0d(), Tue)))); + b = b * 16 + d; + if (b > lxe) + throw vbb(new mde(tvd((h0d(), "parser.descappe.4")))); + a = b; + break; + case 65: + case 90: + case 122: + throw vbb(new mde(tvd((h0d(), Xue)))); + } + return a; + }; + _2.ul = function xde(a) { + var b, c2; + switch (a) { + case 100: + c2 = (this.e & 32) == 32 ? Kfe("Nd", true) : (wfe(), cfe); + break; + case 68: + c2 = (this.e & 32) == 32 ? Kfe("Nd", false) : (wfe(), jfe); + break; + case 119: + c2 = (this.e & 32) == 32 ? Kfe("IsWord", true) : (wfe(), sfe); + break; + case 87: + c2 = (this.e & 32) == 32 ? Kfe("IsWord", false) : (wfe(), lfe); + break; + case 115: + c2 = (this.e & 32) == 32 ? Kfe("IsSpace", true) : (wfe(), nfe); + break; + case 83: + c2 = (this.e & 32) == 32 ? Kfe("IsSpace", false) : (wfe(), kfe); + break; + default: + throw vbb(new hz((b = a, mxe + b.toString(16)))); + } + return c2; + }; + _2.vl = function zde(a) { + var b, c2, d, e, f2, g, h, i3, j, k, l, m; + this.b = 1; + nde(this); + b = null; + if (this.c == 0 && this.a == 94) { + nde(this); + if (a) { + k = (wfe(), wfe(), new $fe(5)); + } else { + b = (wfe(), wfe(), new $fe(4)); + Ufe(b, 0, lxe); + k = new $fe(4); + } + } else { + k = (wfe(), wfe(), new $fe(4)); + } + e = true; + while ((m = this.c) != 1) { + if (m == 0 && this.a == 93 && !e) + break; + e = false; + c2 = this.a; + d = false; + if (m == 10) { + switch (c2) { + case 100: + case 68: + case 119: + case 87: + case 115: + case 83: + Xfe(k, this.ul(c2)); + d = true; + break; + case 105: + case 73: + case 99: + case 67: + c2 = this.Ll(k, c2); + c2 < 0 && (d = true); + break; + case 112: + case 80: + l = tde(this, c2); + if (!l) + throw vbb(new mde(tvd((h0d(), Iue)))); + Xfe(k, l); + d = true; + break; + default: + c2 = this.tl(); + } + } else if (m == 20) { + g = gfb(this.i, 58, this.d); + if (g < 0) + throw vbb(new mde(tvd((h0d(), Jue)))); + h = true; + if (bfb(this.i, this.d) == 94) { + ++this.d; + h = false; + } + f2 = qfb(this.i, this.d, g); + i3 = Lfe(f2, h, (this.e & 512) == 512); + if (!i3) + throw vbb(new mde(tvd((h0d(), Lue)))); + Xfe(k, i3); + d = true; + if (g + 1 >= this.j || bfb(this.i, g + 1) != 93) + throw vbb(new mde(tvd((h0d(), Jue)))); + this.d = g + 2; + } + nde(this); + if (!d) { + if (this.c != 0 || this.a != 45) { + Ufe(k, c2, c2); + } else { + nde(this); + if ((m = this.c) == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + if (m == 0 && this.a == 93) { + Ufe(k, c2, c2); + Ufe(k, 45, 45); + } else { + j = this.a; + m == 10 && (j = this.tl()); + nde(this); + Ufe(k, c2, j); + } + } + } + (this.e & zte) == zte && this.c == 0 && this.a == 44 && nde(this); + } + if (this.c == 1) + throw vbb(new mde(tvd((h0d(), Kue)))); + if (b) { + Zfe(b, k); + k = b; + } + Yfe(k); + Vfe(k); + this.b = 0; + nde(this); + return k; + }; + _2.wl = function Ade() { + var a, b, c2, d; + c2 = this.vl(false); + while ((d = this.c) != 7) { + a = this.a; + if (d == 0 && (a == 45 || a == 38) || d == 4) { + nde(this); + if (this.c != 9) + throw vbb(new mde(tvd((h0d(), Que)))); + b = this.vl(false); + if (d == 4) + Xfe(c2, b); + else if (a == 45) + Zfe(c2, b); + else if (a == 38) + Wfe(c2, b); + else + throw vbb(new hz("ASSERT")); + } else { + throw vbb(new mde(tvd((h0d(), Rue)))); + } + } + nde(this); + return c2; + }; + _2.xl = function Bde() { + var a, b; + a = this.a - 48; + b = (wfe(), wfe(), new Hge(12, null, a)); + !this.g && (this.g = new Wvb()); + Tvb(this.g, new cge(a)); + nde(this); + return b; + }; + _2.yl = function Cde() { + nde(this); + return wfe(), ofe; + }; + _2.zl = function Dde() { + nde(this); + return wfe(), mfe; + }; + _2.Al = function Ede() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Bl = function Fde() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Cl = function Gde() { + nde(this); + return Ife(); + }; + _2.Dl = function Hde() { + nde(this); + return wfe(), qfe; + }; + _2.El = function Ide() { + nde(this); + return wfe(), tfe; + }; + _2.Fl = function Jde() { + var a; + if (this.d >= this.j || ((a = bfb(this.i, this.d++)) & 65504) != 64) + throw vbb(new mde(tvd((h0d(), Eue)))); + nde(this); + return wfe(), wfe(), new ige(0, a - 64); + }; + _2.Gl = function Kde() { + nde(this); + return Jfe(); + }; + _2.Hl = function Lde() { + nde(this); + return wfe(), ufe; + }; + _2.Il = function Mde() { + var a; + a = (wfe(), wfe(), new ige(0, 105)); + nde(this); + return a; + }; + _2.Jl = function Nde() { + nde(this); + return wfe(), rfe; + }; + _2.Kl = function Ode() { + nde(this); + return wfe(), pfe; + }; + _2.Ll = function Pde(a, b) { + return this.tl(); + }; + _2.Ml = function Qde() { + nde(this); + return wfe(), hfe; + }; + _2.Nl = function Rde() { + var a, b, c2, d, e; + if (this.d + 1 >= this.j) + throw vbb(new mde(tvd((h0d(), Bue)))); + d = -1; + b = null; + a = bfb(this.i, this.d); + if (49 <= a && a <= 57) { + d = a - 48; + !this.g && (this.g = new Wvb()); + Tvb(this.g, new cge(d)); + ++this.d; + if (bfb(this.i, this.d) != 41) + throw vbb(new mde(tvd((h0d(), yue)))); + ++this.d; + } else { + a == 63 && --this.d; + nde(this); + b = qde(this); + switch (b.e) { + case 20: + case 21: + case 22: + case 23: + break; + case 8: + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + break; + default: + throw vbb(new mde(tvd((h0d(), Cue)))); + } + } + nde(this); + e = rde(this); + c2 = null; + if (e.e == 2) { + if (e.em() != 2) + throw vbb(new mde(tvd((h0d(), Due)))); + c2 = e.am(1); + e = e.am(0); + } + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return wfe(), wfe(), new vge(d, b, e, c2); + }; + _2.Ol = function Sde() { + nde(this); + return wfe(), ife; + }; + _2.Pl = function Tde() { + var a; + nde(this); + a = Cfe(24, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _2.Ql = function Ude() { + var a; + nde(this); + a = Cfe(20, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _2.Rl = function Vde() { + var a; + nde(this); + a = Cfe(22, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _2.Sl = function Wde() { + var a, b, c2, d, e; + a = 0; + c2 = 0; + b = -1; + while (this.d < this.j) { + b = bfb(this.i, this.d); + e = Uee(b); + if (e == 0) + break; + a |= e; + ++this.d; + } + if (this.d >= this.j) + throw vbb(new mde(tvd((h0d(), zue)))); + if (b == 45) { + ++this.d; + while (this.d < this.j) { + b = bfb(this.i, this.d); + e = Uee(b); + if (e == 0) + break; + c2 |= e; + ++this.d; + } + if (this.d >= this.j) + throw vbb(new mde(tvd((h0d(), zue)))); + } + if (b == 58) { + ++this.d; + nde(this); + d = Dfe(rde(this), a, c2); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + } else if (b == 41) { + ++this.d; + nde(this); + d = Dfe(rde(this), a, c2); + } else + throw vbb(new mde(tvd((h0d(), Aue)))); + return d; + }; + _2.Tl = function Xde() { + var a; + nde(this); + a = Cfe(21, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _2.Ul = function Yde() { + var a; + nde(this); + a = Cfe(23, rde(this)); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _2.Vl = function Zde() { + var a, b; + nde(this); + a = this.f++; + b = Efe(rde(this), a); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return b; + }; + _2.Wl = function $de() { + var a; + nde(this); + a = Efe(rde(this), 0); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _2.Xl = function _de(a) { + nde(this); + if (this.c == 5) { + nde(this); + return Bfe(a, (wfe(), wfe(), new lge(9, a))); + } else + return Bfe(a, (wfe(), wfe(), new lge(3, a))); + }; + _2.Yl = function aee(a) { + var b; + nde(this); + b = (wfe(), wfe(), new Lge(2)); + if (this.c == 5) { + nde(this); + Kge(b, ffe); + Kge(b, a); + } else { + Kge(b, a); + Kge(b, ffe); + } + return b; + }; + _2.Zl = function bee(a) { + nde(this); + if (this.c == 5) { + nde(this); + return wfe(), wfe(), new lge(9, a); + } else + return wfe(), wfe(), new lge(3, a); + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + _2.d = 0; + _2.e = 0; + _2.f = 1; + _2.g = null; + _2.j = 0; + mdb(kxe, "RegEx/RegexParser", 820); + bcb(1824, 820, {}, hee); + _2.sl = function iee(a) { + return false; + }; + _2.tl = function jee() { + return eee(this); + }; + _2.ul = function lee(a) { + return fee(a); + }; + _2.vl = function mee(a) { + return gee(this); + }; + _2.wl = function nee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.xl = function oee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.yl = function pee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.zl = function qee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Al = function ree() { + nde(this); + return fee(67); + }; + _2.Bl = function see() { + nde(this); + return fee(73); + }; + _2.Cl = function tee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Dl = function uee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.El = function vee2() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Fl = function wee() { + nde(this); + return fee(99); + }; + _2.Gl = function xee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Hl = function yee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Il = function zee() { + nde(this); + return fee(105); + }; + _2.Jl = function Aee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Kl = function Bee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Ll = function Cee(a, b) { + return Xfe(a, fee(b)), -1; + }; + _2.Ml = function Dee() { + nde(this); + return wfe(), wfe(), new ige(0, 94); + }; + _2.Nl = function Eee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Ol = function Fee() { + nde(this); + return wfe(), wfe(), new ige(0, 36); + }; + _2.Pl = function Gee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Ql = function Hee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Rl = function Iee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Sl = function Jee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Tl = function Kee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Ul = function Lee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Vl = function Mee() { + var a; + nde(this); + a = Efe(rde(this), 0); + if (this.c != 7) + throw vbb(new mde(tvd((h0d(), yue)))); + nde(this); + return a; + }; + _2.Wl = function Nee() { + throw vbb(new mde(tvd((h0d(), Yue)))); + }; + _2.Xl = function Oee(a) { + nde(this); + return Bfe(a, (wfe(), wfe(), new lge(3, a))); + }; + _2.Yl = function Pee(a) { + var b; + nde(this); + b = (wfe(), wfe(), new Lge(2)); + Kge(b, a); + Kge(b, ffe); + return b; + }; + _2.Zl = function Qee(a) { + nde(this); + return wfe(), wfe(), new lge(3, a); + }; + var cee = null, dee = null; + mdb(kxe, "RegEx/ParserForXMLSchema", 1824); + bcb(117, 1, yxe, xfe); + _2.$l = function yfe(a) { + throw vbb(new hz("Not supported.")); + }; + _2._l = function Gfe() { + return -1; + }; + _2.am = function Hfe(a) { + return null; + }; + _2.bm = function Mfe() { + return null; + }; + _2.cm = function Pfe(a) { + }; + _2.dm = function Qfe(a) { + }; + _2.em = function Rfe() { + return 0; + }; + _2.Ib = function Sfe() { + return this.fm(0); + }; + _2.fm = function Tfe(a) { + return this.e == 11 ? "." : ""; + }; + _2.e = 0; + var Yee, Zee, $ee, _ee, afe, bfe = null, cfe, dfe = null, efe, ffe, gfe = null, hfe, ife, jfe, kfe, lfe, mfe, nfe, ofe, pfe, qfe, rfe, sfe, tfe, ufe; + var lbb = mdb(kxe, "RegEx/Token", 117); + bcb(136, 117, { 3: 1, 136: 1, 117: 1 }, $fe); + _2.fm = function bge(a) { + var b, c2, d; + if (this.e == 4) { + if (this == efe) + c2 = "."; + else if (this == cfe) + c2 = "\\d"; + else if (this == sfe) + c2 = "\\w"; + else if (this == nfe) + c2 = "\\s"; + else { + d = new Hfb(); + d.a += "["; + for (b = 0; b < this.b.length; b += 2) { + (a & zte) != 0 && b > 0 && (d.a += ",", d); + if (this.b[b] === this.b[b + 1]) { + Efb(d, age(this.b[b])); + } else { + Efb(d, age(this.b[b])); + d.a += "-"; + Efb(d, age(this.b[b + 1])); + } + } + d.a += "]"; + c2 = d.a; + } + } else { + if (this == jfe) + c2 = "\\D"; + else if (this == lfe) + c2 = "\\W"; + else if (this == kfe) + c2 = "\\S"; + else { + d = new Hfb(); + d.a += "[^"; + for (b = 0; b < this.b.length; b += 2) { + (a & zte) != 0 && b > 0 && (d.a += ",", d); + if (this.b[b] === this.b[b + 1]) { + Efb(d, age(this.b[b])); + } else { + Efb(d, age(this.b[b])); + d.a += "-"; + Efb(d, age(this.b[b + 1])); + } + } + d.a += "]"; + c2 = d.a; + } + } + return c2; + }; + _2.a = false; + _2.c = false; + mdb(kxe, "RegEx/RangeToken", 136); + bcb(584, 1, { 584: 1 }, cge); + _2.a = 0; + mdb(kxe, "RegEx/RegexParser/ReferencePosition", 584); + bcb(583, 1, { 3: 1, 583: 1 }, ege); + _2.Fb = function fge(a) { + var b; + if (a == null) + return false; + if (!JD(a, 583)) + return false; + b = BD(a, 583); + return dfb(this.b, b.b) && this.a == b.a; + }; + _2.Hb = function gge() { + return LCb(this.b + "/" + See(this.a)); + }; + _2.Ib = function hge() { + return this.c.fm(this.a); + }; + _2.a = 0; + mdb(kxe, "RegEx/RegularExpression", 583); + bcb(223, 117, yxe, ige); + _2._l = function jge() { + return this.a; + }; + _2.fm = function kge(a) { + var b, c2, d; + switch (this.e) { + case 0: + switch (this.a) { + case 124: + case 42: + case 43: + case 63: + case 40: + case 41: + case 46: + case 91: + case 123: + case 92: + d = "\\" + HD(this.a & aje); + break; + case 12: + d = "\\f"; + break; + case 10: + d = "\\n"; + break; + case 13: + d = "\\r"; + break; + case 9: + d = "\\t"; + break; + case 27: + d = "\\e"; + break; + default: + if (this.a >= Tje) { + c2 = (b = this.a >>> 0, "0" + b.toString(16)); + d = "\\v" + qfb(c2, c2.length - 6, c2.length); + } else + d = "" + HD(this.a & aje); + } + break; + case 8: + this == hfe || this == ife ? d = "" + HD(this.a & aje) : d = "\\" + HD(this.a & aje); + break; + default: + d = null; + } + return d; + }; + _2.a = 0; + mdb(kxe, "RegEx/Token/CharToken", 223); + bcb(309, 117, yxe, lge); + _2.am = function mge(a) { + return this.a; + }; + _2.cm = function nge(a) { + this.b = a; + }; + _2.dm = function oge(a) { + this.c = a; + }; + _2.em = function pge() { + return 1; + }; + _2.fm = function qge(a) { + var b; + if (this.e == 3) { + if (this.c < 0 && this.b < 0) { + b = this.a.fm(a) + "*"; + } else if (this.c == this.b) { + b = this.a.fm(a) + "{" + this.c + "}"; + } else if (this.c >= 0 && this.b >= 0) { + b = this.a.fm(a) + "{" + this.c + "," + this.b + "}"; + } else if (this.c >= 0 && this.b < 0) { + b = this.a.fm(a) + "{" + this.c + ",}"; + } else + throw vbb(new hz("Token#toString(): CLOSURE " + this.c + She + this.b)); + } else { + if (this.c < 0 && this.b < 0) { + b = this.a.fm(a) + "*?"; + } else if (this.c == this.b) { + b = this.a.fm(a) + "{" + this.c + "}?"; + } else if (this.c >= 0 && this.b >= 0) { + b = this.a.fm(a) + "{" + this.c + "," + this.b + "}?"; + } else if (this.c >= 0 && this.b < 0) { + b = this.a.fm(a) + "{" + this.c + ",}?"; + } else + throw vbb(new hz("Token#toString(): NONGREEDYCLOSURE " + this.c + She + this.b)); + } + return b; + }; + _2.b = 0; + _2.c = 0; + mdb(kxe, "RegEx/Token/ClosureToken", 309); + bcb(821, 117, yxe, rge); + _2.am = function sge(a) { + return a == 0 ? this.a : this.b; + }; + _2.em = function tge() { + return 2; + }; + _2.fm = function uge(a) { + var b; + this.b.e == 3 && this.b.am(0) == this.a ? b = this.a.fm(a) + "+" : this.b.e == 9 && this.b.am(0) == this.a ? b = this.a.fm(a) + "+?" : b = this.a.fm(a) + ("" + this.b.fm(a)); + return b; + }; + mdb(kxe, "RegEx/Token/ConcatToken", 821); + bcb(1822, 117, yxe, vge); + _2.am = function wge(a) { + if (a == 0) + return this.d; + if (a == 1) + return this.b; + throw vbb(new hz("Internal Error: " + a)); + }; + _2.em = function xge() { + return !this.b ? 1 : 2; + }; + _2.fm = function yge(a) { + var b; + this.c > 0 ? b = "(?(" + this.c + ")" : this.a.e == 8 ? b = "(?(" + this.a + ")" : b = "(?" + this.a; + !this.b ? b += this.d + ")" : b += this.d + "|" + this.b + ")"; + return b; + }; + _2.c = 0; + mdb(kxe, "RegEx/Token/ConditionToken", 1822); + bcb(1823, 117, yxe, zge); + _2.am = function Age(a) { + return this.b; + }; + _2.em = function Bge() { + return 1; + }; + _2.fm = function Cge(a) { + return "(?" + (this.a == 0 ? "" : See(this.a)) + (this.c == 0 ? "" : See(this.c)) + ":" + this.b.fm(a) + ")"; + }; + _2.a = 0; + _2.c = 0; + mdb(kxe, "RegEx/Token/ModifierToken", 1823); + bcb(822, 117, yxe, Dge); + _2.am = function Ege(a) { + return this.a; + }; + _2.em = function Fge() { + return 1; + }; + _2.fm = function Gge(a) { + var b; + b = null; + switch (this.e) { + case 6: + this.b == 0 ? b = "(?:" + this.a.fm(a) + ")" : b = "(" + this.a.fm(a) + ")"; + break; + case 20: + b = "(?=" + this.a.fm(a) + ")"; + break; + case 21: + b = "(?!" + this.a.fm(a) + ")"; + break; + case 22: + b = "(?<=" + this.a.fm(a) + ")"; + break; + case 23: + b = "(?" + this.a.fm(a) + ")"; + } + return b; + }; + _2.b = 0; + mdb(kxe, "RegEx/Token/ParenToken", 822); + bcb(521, 117, { 3: 1, 117: 1, 521: 1 }, Hge); + _2.bm = function Ige() { + return this.b; + }; + _2.fm = function Jge(a) { + return this.e == 12 ? "\\" + this.a : Wee(this.b); + }; + _2.a = 0; + mdb(kxe, "RegEx/Token/StringToken", 521); + bcb(465, 117, yxe, Lge); + _2.$l = function Mge(a) { + Kge(this, a); + }; + _2.am = function Nge(a) { + return BD(Uvb(this.a, a), 117); + }; + _2.em = function Oge() { + return !this.a ? 0 : this.a.a.c.length; + }; + _2.fm = function Pge(a) { + var b, c2, d, e, f2; + if (this.e == 1) { + if (this.a.a.c.length == 2) { + b = BD(Uvb(this.a, 0), 117); + c2 = BD(Uvb(this.a, 1), 117); + c2.e == 3 && c2.am(0) == b ? e = b.fm(a) + "+" : c2.e == 9 && c2.am(0) == b ? e = b.fm(a) + "+?" : e = b.fm(a) + ("" + c2.fm(a)); + } else { + f2 = new Hfb(); + for (d = 0; d < this.a.a.c.length; d++) { + Efb(f2, BD(Uvb(this.a, d), 117).fm(a)); + } + e = f2.a; + } + return e; + } + if (this.a.a.c.length == 2 && BD(Uvb(this.a, 1), 117).e == 7) { + e = BD(Uvb(this.a, 0), 117).fm(a) + "?"; + } else if (this.a.a.c.length == 2 && BD(Uvb(this.a, 0), 117).e == 7) { + e = BD(Uvb(this.a, 1), 117).fm(a) + "??"; + } else { + f2 = new Hfb(); + Efb(f2, BD(Uvb(this.a, 0), 117).fm(a)); + for (d = 1; d < this.a.a.c.length; d++) { + f2.a += "|"; + Efb(f2, BD(Uvb(this.a, d), 117).fm(a)); + } + e = f2.a; + } + return e; + }; + mdb(kxe, "RegEx/Token/UnionToken", 465); + bcb(518, 1, { 592: 1 }, Rge); + _2.Ib = function Sge() { + return this.a.b; + }; + mdb(zxe, "XMLTypeUtil/PatternMatcherImpl", 518); + bcb(1622, 1381, {}, Vge); + var Tge; + mdb(zxe, "XMLTypeValidator", 1622); + bcb(264, 1, vie, Yge); + _2.Jc = function Zge(a) { + reb(this, a); + }; + _2.Kc = function $ge() { + return (this.b - this.a) * this.c < 0 ? Wge : new she(this); + }; + _2.a = 0; + _2.b = 0; + _2.c = 0; + var Wge; + mdb(Bxe, "ExclusiveRange", 264); + bcb(1068, 1, jie, dhe); + _2.Rb = function ehe(a) { + BD(a, 19); + _ge(); + }; + _2.Nb = function fhe(a) { + Rrb(this, a); + }; + _2.Pb = function ihe() { + return ahe(); + }; + _2.Ub = function khe() { + return bhe(); + }; + _2.Wb = function nhe(a) { + BD(a, 19); + che(); + }; + _2.Ob = function ghe() { + return false; + }; + _2.Sb = function hhe() { + return false; + }; + _2.Tb = function jhe() { + return -1; + }; + _2.Vb = function lhe() { + return -1; + }; + _2.Qb = function mhe() { + throw vbb(new cgb(Exe)); + }; + mdb(Bxe, "ExclusiveRange/1", 1068); + bcb(254, 1, jie, she); + _2.Rb = function the(a) { + BD(a, 19); + ohe(); + }; + _2.Nb = function uhe(a) { + Rrb(this, a); + }; + _2.Pb = function xhe() { + return phe(this); + }; + _2.Ub = function zhe() { + return qhe(this); + }; + _2.Wb = function Che(a) { + BD(a, 19); + rhe(); + }; + _2.Ob = function vhe() { + return this.c.c < 0 ? this.a >= this.c.b : this.a <= this.c.b; + }; + _2.Sb = function whe() { + return this.b > 0; + }; + _2.Tb = function yhe() { + return this.b; + }; + _2.Vb = function Ahe() { + return this.b - 1; + }; + _2.Qb = function Bhe() { + throw vbb(new cgb(Exe)); + }; + _2.a = 0; + _2.b = 0; + mdb(Bxe, "ExclusiveRange/RangeIterator", 254); + var TD = pdb(Fve, "C"); + var WD = pdb(Ive, "I"); + var sbb = pdb(Khe, "Z"); + var XD = pdb(Jve, "J"); + var SD = pdb(Eve, "B"); + var UD = pdb(Gve, "D"); + var VD = pdb(Hve, "F"); + var rbb = pdb(Kve, "S"); + var h1 = odb("org.eclipse.elk.core.labels", "ILabelManager"); + var O4 = odb(Tte, "DiagnosticChain"); + var u8 = odb(pwe, "ResourceSet"); + var V4 = mdb(Tte, "InvocationTargetException", null); + var Ihe = (Az(), Dz); + var gwtOnLoad = gwtOnLoad = Zbb; + Xbb(hcb); + $bb("permProps", [[[Fxe, Gxe], [Hxe, "gecko1_8"]], [[Fxe, Gxe], [Hxe, "ie10"]], [[Fxe, Gxe], [Hxe, "ie8"]], [[Fxe, Gxe], [Hxe, "ie9"]], [[Fxe, Gxe], [Hxe, "safari"]]]); + gwtOnLoad(null, "elk", null); + }).call(this); + }).call(this, typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, {}], 3: [function(require, module3, exports3) { + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _possibleConstructorReturn(self2, call) { + if (!self2) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return call && (typeof call === "object" || typeof call === "function") ? call : self2; + } + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); + if (superClass) + Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + } + var ELK2 = require("./elk-api.js").default; + var ELKNode = function(_ELK) { + _inherits(ELKNode2, _ELK); + function ELKNode2() { + var options2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + _classCallCheck(this, ELKNode2); + var optionsClone = Object.assign({}, options2); + var workerThreadsExist = false; + try { + require.resolve("web-worker"); + workerThreadsExist = true; + } catch (e) { + } + if (options2.workerUrl) { + if (workerThreadsExist) { + var Worker2 = require("web-worker"); + optionsClone.workerFactory = function(url) { + return new Worker2(url); + }; + } else { + console.warn("Web worker requested but 'web-worker' package not installed. \nConsider installing the package or pass your own 'workerFactory' to ELK's constructor.\n... Falling back to non-web worker version."); + } + } + if (!optionsClone.workerFactory) { + var _require = require("./elk-worker.min.js"), _Worker = _require.Worker; + optionsClone.workerFactory = function(url) { + return new _Worker(url); + }; + } + return _possibleConstructorReturn(this, (ELKNode2.__proto__ || Object.getPrototypeOf(ELKNode2)).call(this, optionsClone)); + } + return ELKNode2; + }(ELK2); + Object.defineProperty(module3.exports, "__esModule", { + value: true + }); + module3.exports = ELKNode; + ELKNode.default = ELKNode; + }, { "./elk-api.js": 1, "./elk-worker.min.js": 2, "web-worker": 4 }], 4: [function(require, module3, exports3) { + module3.exports = Worker; + }, {}] }, {}, [3])(3); + }); + })(elk_bundled); + var elk_bundledExports = elk_bundled.exports; + const ELK = /* @__PURE__ */ getDefaultExportFromCjs(elk_bundledExports); + const elk = new ELK(); + let portPos = {}; + const conf = {}; + let nodeDb = {}; + const addVertices = async function(vert, svgId, root2, doc, diagObj, parentLookupDb, graph) { + const svg2 = root2.select(`[id="${svgId}"]`); + const nodes2 = svg2.insert("g").attr("class", "nodes"); + const keys2 = Object.keys(vert); + await Promise.all( + keys2.map(async function(id2) { + const vertex = vert[id2]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles2 = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + const labelData = { width: 0, height: 0 }; + const ports = [ + { + id: vertex.id + "-west", + layoutOptions: { + "port.side": "WEST" + } + }, + { + id: vertex.id + "-east", + layoutOptions: { + "port.side": "EAST" + } + }, + { + id: vertex.id + "-south", + layoutOptions: { + "port.side": "SOUTH" + } + }, + { + id: vertex.id + "-north", + layoutOptions: { + "port.side": "NORTH" + } + } + ]; + let radious = 0; + let _shape = ""; + let layoutOptions = {}; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + layoutOptions = { + portConstraints: "FIXED_SIDE" + }; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const node2 = { + labelStyle: styles2.labelStyle, + shape: _shape, + labelText: vertexText, + labelType: vertex.labelType, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: getConfig$2().flowchart.padding + }; + let boundingBox; + let nodeEl; + if (node2.type !== "group") { + nodeEl = await insertNode(nodes2, node2, vertex.dir); + boundingBox = nodeEl.node().getBBox(); + } else { + doc.createElementNS("http://www.w3.org/2000/svg", "text"); + const { shapeSvg, bbox } = await labelHelper(nodes2, node2, void 0, true); + labelData.width = bbox.width; + labelData.wrappingWidth = getConfig$2().flowchart.wrappingWidth; + labelData.height = bbox.height; + labelData.labelNode = shapeSvg.node(); + node2.labelData = labelData; + } + const data = { + id: vertex.id, + ports: vertex.type === "diamond" ? ports : [], + // labelStyle: styles.labelStyle, + // shape: _shape, + layoutOptions, + labelText: vertexText, + labelData, + // labels: [{ text: vertexText }], + // rx: radius, + // ry: radius, + // class: classStr, + // style: styles.style, + // link: vertex.link, + // linkTarget: vertex.linkTarget, + // tooltip: diagObj.db.getTooltip(vertex.id) || '', + domId: diagObj.db.lookUpDomId(vertex.id), + // haveCallback: vertex.haveCallback, + width: boundingBox == null ? void 0 : boundingBox.width, + height: boundingBox == null ? void 0 : boundingBox.height, + // dir: vertex.dir, + type: vertex.type, + // props: vertex.props, + // padding: getConfig().flowchart.padding, + // boundingBox, + el: nodeEl, + parent: parentLookupDb.parentById[vertex.id] + }; + nodeDb[node2.id] = data; + }) + ); + return graph; + }; + const getNextPosition = (position2, edgeDirection, graphDirection) => { + const portPos2 = { + TB: { + in: { + north: "north" + }, + out: { + south: "west", + west: "east", + east: "south" + } + }, + LR: { + in: { + west: "west" + }, + out: { + east: "south", + south: "north", + north: "east" + } + }, + RL: { + in: { + east: "east" + }, + out: { + west: "north", + north: "south", + south: "west" + } + }, + BT: { + in: { + south: "south" + }, + out: { + north: "east", + east: "west", + west: "north" + } + } + }; + portPos2.TD = portPos2.TB; + log$1.info("abc88", graphDirection, edgeDirection, position2); + return portPos2[graphDirection][edgeDirection][position2]; + }; + const getNextPort = (node2, edgeDirection, graphDirection) => { + log$1.info("getNextPort abc88", { node: node2, edgeDirection, graphDirection }); + if (!portPos[node2]) { + switch (graphDirection) { + case "TB": + case "TD": + portPos[node2] = { + inPosition: "north", + outPosition: "south" + }; + break; + case "BT": + portPos[node2] = { + inPosition: "south", + outPosition: "north" + }; + break; + case "RL": + portPos[node2] = { + inPosition: "east", + outPosition: "west" + }; + break; + case "LR": + portPos[node2] = { + inPosition: "west", + outPosition: "east" + }; + break; + } + } + const result = edgeDirection === "in" ? portPos[node2].inPosition : portPos[node2].outPosition; + if (edgeDirection === "in") { + portPos[node2].inPosition = getNextPosition( + portPos[node2].inPosition, + edgeDirection, + graphDirection + ); + } else { + portPos[node2].outPosition = getNextPosition( + portPos[node2].outPosition, + edgeDirection, + graphDirection + ); + } + return result; + }; + const getEdgeStartEndPoint = (edge, dir2) => { + let source = edge.start; + let target = edge.end; + const sourceId = source; + const targetId = target; + const startNode = nodeDb[source]; + const endNode = nodeDb[target]; + if (!startNode || !endNode) { + return { source, target }; + } + if (startNode.type === "diamond") { + source = `${source}-${getNextPort(source, "out", dir2)}`; + } + if (endNode.type === "diamond") { + target = `${target}-${getNextPort(target, "in", dir2)}`; + } + return { source, target, sourceId, targetId }; + }; + const addEdges = function(edges2, diagObj, graph, svg2) { + log$1.info("abc78 edges = ", edges2); + const labelsEl = svg2.insert("g").attr("class", "edgeLabels"); + let linkIdCnt = {}; + let dir2 = diagObj.db.getDirection(); + let defaultStyle2; + let defaultLabelStyle; + if (edges2.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges2.defaultStyle); + defaultStyle2 = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges2.forEach(function(edge) { + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + log$1.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + log$1.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + log$1.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle2 !== void 0) { + style = defaultStyle2; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles2 = getStylesFromArray(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges2.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges2.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = edge.text.replace(common$1.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + const labelEl = insertEdgeLabel(labelsEl, edgeData); + const { source, target, sourceId, targetId } = getEdgeStartEndPoint(edge, dir2); + log$1.debug("abc78 source and target", source, target); + graph.edges.push({ + id: "e" + edge.start + edge.end, + sources: [source], + targets: [target], + sourceId, + targetId, + labelEl, + labels: [ + { + width: edgeData.width, + height: edgeData.height, + orgWidth: edgeData.width, + orgHeight: edgeData.height, + text: edgeData.label, + layoutOptions: { + "edgeLabels.inline": "true", + "edgeLabels.placement": "CENTER" + } + } + ], + edgeData + }); + }); + return graph; + }; + const addMarkersToEdge = function(svgPath, edgeData, diagramType, arrowMarkerAbsolute, id2) { + let url = ""; + if (arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (edgeData.arrowTypeStart) { + case "arrow_cross": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-crossStart)" + ); + break; + case "arrow_point": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-pointStart)" + ); + break; + case "arrow_barb": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-barbStart)" + ); + break; + case "arrow_circle": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-circleStart)" + ); + break; + case "aggregation": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-aggregationStart)" + ); + break; + case "extension": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-extensionStart)" + ); + break; + case "composition": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-compositionStart)" + ); + break; + case "dependency": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-dependencyStart)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-start", + "url(" + url + "#" + id2 + "_" + diagramType + "-lollipopStart)" + ); + break; + } + switch (edgeData.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + id2 + "_" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-aggregationEnd)" + ); + break; + case "extension": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-extensionEnd)" + ); + break; + case "composition": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-compositionEnd)" + ); + break; + case "dependency": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-dependencyEnd)" + ); + break; + case "lollipop": + svgPath.attr( + "marker-end", + "url(" + url + "#" + id2 + "_" + diagramType + "-lollipopEnd)" + ); + break; + } + }; + const getClasses = function(text2, diagObj) { + log$1.info("Extracting classes"); + return diagObj.db.getClasses(); + }; + const addSubGraphs = function(db2) { + const parentLookupDb = { parentById: {}, childrenById: {} }; + const subgraphs = db2.getSubGraphs(); + log$1.info("Subgraphs - ", subgraphs); + subgraphs.forEach(function(subgraph) { + subgraph.nodes.forEach(function(node2) { + parentLookupDb.parentById[node2] = subgraph.id; + if (parentLookupDb.childrenById[subgraph.id] === void 0) { + parentLookupDb.childrenById[subgraph.id] = []; + } + parentLookupDb.childrenById[subgraph.id].push(node2); + }); + }); + subgraphs.forEach(function(subgraph) { + ({ id: subgraph.id }); + if (parentLookupDb.parentById[subgraph.id] !== void 0) { + parentLookupDb.parentById[subgraph.id]; + } + }); + return parentLookupDb; + }; + const calcOffset = function(src, dest, parentLookupDb) { + const ancestor = findCommonAncestor(src, dest, parentLookupDb); + if (ancestor === void 0 || ancestor === "root") { + return { x: 0, y: 0 }; + } + const ancestorOffset = nodeDb[ancestor].offset; + return { x: ancestorOffset.posX, y: ancestorOffset.posY }; + }; + const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb, id2) { + const offset = calcOffset(edge.sourceId, edge.targetId, parentLookupDb); + const src = edge.sections[0].startPoint; + const dest = edge.sections[0].endPoint; + const segments = edge.sections[0].bendPoints ? edge.sections[0].bendPoints : []; + const segPoints = segments.map((segment) => [segment.x + offset.x, segment.y + offset.y]); + const points = [ + [src.x + offset.x, src.y + offset.y], + ...segPoints, + [dest.x + offset.x, dest.y + offset.y] + ]; + const { x: x2, y: y2 } = getLineFunctionsWithOffset(edge.edgeData); + const curve = line$1().x(x2).y(y2).curve(curveLinear); + const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path " + edgeData.classes).attr("fill", "none"); + const edgeG = edgesEl.insert("g").attr("class", "edgeLabel"); + const edgeWithLabel = d3select(edgeG.node().appendChild(edge.labelEl)); + const box = edgeWithLabel.node().firstChild.getBoundingClientRect(); + edgeWithLabel.attr("width", box.width); + edgeWithLabel.attr("height", box.height); + edgeG.attr( + "transform", + `translate(${edge.labels[0].x + offset.x}, ${edge.labels[0].y + offset.y})` + ); + addMarkersToEdge(edgePath, edgeData, diagObj.type, diagObj.arrowMarkerAbsolute, id2); + }; + const insertChildren = (nodeArray, parentLookupDb) => { + nodeArray.forEach((node2) => { + if (!node2.children) { + node2.children = []; + } + const childIds = parentLookupDb.childrenById[node2.id]; + if (childIds) { + childIds.forEach((childId) => { + node2.children.push(nodeDb[childId]); + }); + } + insertChildren(node2.children, parentLookupDb); + }); + }; + const draw$3 = async function(text2, id2, _version, diagObj) { + var _a; + nodeDb = {}; + portPos = {}; + const renderEl = d3select("body").append("div").attr("style", "height:400px").attr("id", "cy"); + let graph = { + id: "root", + layoutOptions: { + "elk.hierarchyHandling": "INCLUDE_CHILDREN", + "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", + "elk.layered.spacing.edgeNodeBetweenLayers": "30", + // 'elk.layered.mergeEdges': 'true', + "elk.direction": "DOWN" + // 'elk.ports.sameLayerEdges': true, + // 'nodePlacement.strategy': 'SIMPLE', + }, + children: [], + edges: [] + }; + log$1.info("Drawing flowchart using v3 renderer", elk); + let dir2 = diagObj.db.getDirection(); + switch (dir2) { + case "BT": + graph.layoutOptions["elk.direction"] = "UP"; + break; + case "TB": + graph.layoutOptions["elk.direction"] = "DOWN"; + break; + case "LR": + graph.layoutOptions["elk.direction"] = "RIGHT"; + break; + case "RL": + graph.layoutOptions["elk.direction"] = "LEFT"; + break; + } + const { securityLevel, flowchart: conf2 } = getConfig$2(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const svg2 = root2.select(`[id="${id2}"]`); + const markers2 = ["point", "circle", "cross"]; + insertMarkers$4(svg2, markers2, diagObj.type, id2); + const vert = diagObj.db.getVertices(); + let subG; + const subGraphs2 = diagObj.db.getSubGraphs(); + log$1.info("Subgraphs - ", subGraphs2); + for (let i2 = subGraphs2.length - 1; i2 >= 0; i2--) { + subG = subGraphs2[i2]; + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const subGraphsEl = svg2.insert("g").attr("class", "subgraphs"); + const parentLookupDb = addSubGraphs(diagObj.db); + graph = await addVertices(vert, id2, root2, doc, diagObj, parentLookupDb, graph); + const edgesEl = svg2.insert("g").attr("class", "edges edgePath"); + const edges2 = diagObj.db.getEdges(); + graph = addEdges(edges2, diagObj, graph, svg2); + const nodes2 = Object.keys(nodeDb); + nodes2.forEach((nodeId) => { + const node2 = nodeDb[nodeId]; + if (!node2.parent) { + graph.children.push(node2); + } + if (parentLookupDb.childrenById[nodeId] !== void 0) { + node2.labels = [ + { + text: node2.labelText, + layoutOptions: { + "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" + }, + width: node2.labelData.width, + height: node2.labelData.height + // width: 100, + // height: 100, + } + ]; + delete node2.x; + delete node2.y; + delete node2.width; + delete node2.height; + } + }); + insertChildren(graph.children, parentLookupDb); + log$1.info("after layout", JSON.stringify(graph, null, 2)); + const g = await elk.layout(graph); + drawNodes$1(0, 0, g.children, svg2, subGraphsEl, diagObj, 0); + log$1.info("after layout", g); + (_a = g.edges) == null ? void 0 : _a.map((edge) => { + insertEdge(edgesEl, edge, edge.edgeData, diagObj, parentLookupDb, id2); + }); + setupGraphViewbox$1({}, svg2, conf2.diagramPadding, conf2.useMaxWidth); + renderEl.remove(); + }; + const drawNodes$1 = (relX, relY, nodeArray, svg2, subgraphsEl, diagObj, depth) => { + nodeArray.forEach(function(node2) { + if (node2) { + nodeDb[node2.id].offset = { + posX: node2.x + relX, + posY: node2.y + relY, + x: relX, + y: relY, + depth, + width: node2.width, + height: node2.height + }; + if (node2.type === "group") { + const subgraphEl = subgraphsEl.insert("g").attr("class", "subgraph"); + subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node2.x + relX).attr("y", node2.y + relY).attr("width", node2.width).attr("height", node2.height); + const label = subgraphEl.insert("g").attr("class", "label"); + const labelCentering = getConfig$2().flowchart.htmlLabels ? node2.labelData.width / 2 : 0; + label.attr( + "transform", + `translate(${node2.labels[0].x + relX + node2.x + labelCentering}, ${node2.labels[0].y + relY + node2.y + 3})` + ); + label.node().appendChild(node2.labelData.labelNode); + log$1.info("Id (UGH)= ", node2.type, node2.labels); + } else { + log$1.info("Id (UGH)= ", node2.id); + node2.el.attr( + "transform", + `translate(${node2.x + relX + node2.width / 2}, ${node2.y + relY + node2.height / 2})` + ); + } + } + }); + nodeArray.forEach(function(node2) { + if (node2 && node2.type === "group") { + drawNodes$1(relX + node2.x, relY + node2.y, node2.children, svg2, subgraphsEl, diagObj, depth + 1); + } + }); + }; + const renderer$2 = { + getClasses, + draw: draw$3 + }; + const genSections$2 = (options2) => { + let sections2 = ""; + for (let i2 = 0; i2 < 5; i2++) { + sections2 += ` + .subgraph-lvl-${i2} { + fill: ${options2[`surface${i2}`]}; + stroke: ${options2[`surfacePeer${i2}`]}; + } + `; + } + return sections2; + }; + const getStyles$2 = (options2) => `.label { + font-family: ${options2.fontFamily}; + color: ${options2.nodeTextColor || options2.textColor}; + } + .cluster-label text { + fill: ${options2.titleColor}; + } + .cluster-label span { + color: ${options2.titleColor}; + } + + .label text,span { + fill: ${options2.nodeTextColor || options2.textColor}; + color: ${options2.nodeTextColor || options2.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options2.mainBkg}; + stroke: ${options2.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options2.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options2.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options2.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options2.edgeLabelBackground}; + rect { + opacity: 0.85; + background-color: ${options2.edgeLabelBackground}; + fill: ${options2.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${options2.clusterBkg}; + stroke: ${options2.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options2.titleColor}; + } + + .cluster span { + color: ${options2.titleColor}; + } + /* .cluster div { + color: ${options2.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options2.fontFamily}; + font-size: 12px; + background: ${options2.tertiaryColor}; + border: 1px solid ${options2.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + + .flowchart-label text { + text-anchor: middle; + } + + ${genSections$2(options2)} +`; + const styles$1 = getStyles$2; + const diagram$3 = { + db: db$a, + renderer: renderer$2, + parser: parser$p, + styles: styles$1 + }; + const flowchartElkDefinition = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$3 + }, Symbol.toStringTag, { value: "Module" })); + var parser$3 = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.getCommonDb().setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 15: + yy.addTask($$[$0], 0, ""); + this.$ = $$[$0]; + break; + case 16: + yy.addEvent($$[$0].substr(2)); + this.$ = $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])], + defaultActions: {}, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 21; + case 16: + return 20; + case 17: + return 6; + case 18: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$3.parser = parser$3; + const parser$4 = parser$3; + let currentSection = ""; + let currentTaskId = 0; + const sections = []; + const tasks = []; + const rawTasks = []; + const getCommonDb = () => commonDb; + const clear$2 = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + clear$l(); + }; + const addSection = function(txt) { + currentSection = txt; + sections.push(txt); + }; + const getSections = function() { + return sections; + }; + const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; + }; + const addTask = function(period, length2, event) { + const rawTask = { + id: currentTaskId++, + section: currentSection, + type: currentSection, + task: period, + score: length2 ? length2 : 0, + //if event is defined, then add it the events array + events: event ? [event] : [] + }; + rawTasks.push(rawTask); + }; + const addEvent = function(event) { + const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1); + currentTask.events.push(event); + }; + const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); + }; + const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i2, rawTask] of rawTasks.entries()) { + compileTask(i2); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; + }; + const timelineDb = { + clear: clear$2, + getCommonDb, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + addEvent + }; + const db$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addEvent, + addSection, + addTask, + addTaskOrg, + clear: clear$2, + default: timelineDb, + getCommonDb, + getSections, + getTasks + }, Symbol.toStringTag, { value: "Module" })); + const MAX_SECTIONS$1 = 12; + const drawRect = function(elem, rectData) { + const rectElem = elem.append("rect"); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.y); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", rectData.width); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (rectData.class !== void 0) { + rectElem.attr("class", rectData.class); + } + return rectElem; + }; + const drawFace = function(element2, faceData) { + const radius = 15; + const circleElement = element2.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element2.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc = d3arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc = d3arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; + }; + const drawCircle = function(element2, circleData) { + const circleElement = element2.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; + }; + const drawText = function(elem, textData) { + const nText = textData.text.replace(//gi, " "); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.text(nText); + return textElem; + }; + const drawLabel = function(elem, txtObject) { + function genPoints(x2, y2, width2, height, cut) { + return x2 + "," + y2 + " " + (x2 + width2) + "," + y2 + " " + (x2 + width2) + "," + (y2 + height - cut) + " " + (x2 + width2 - cut * 1.2) + "," + (y2 + height) + " " + x2 + "," + (y2 + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); + }; + const drawSection = function(elem, section, conf2) { + const g = elem.append("g"); + const rect2 = getNoteRect(); + rect2.x = section.x; + rect2.y = section.y; + rect2.fill = section.fill; + rect2.width = conf2.width; + rect2.height = conf2.height; + rect2.class = "journey-section section-type-" + section.num; + rect2.rx = 3; + rect2.ry = 3; + drawRect(g, rect2); + _drawTextCandidateFunc(conf2)( + section.text, + g, + rect2.x, + rect2.y, + rect2.width, + rect2.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); + }; + let taskCount = -1; + const drawTask = function(elem, task, conf2) { + const center2 = task.x + conf2.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center2).attr("y1", task.y).attr("x2", center2).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center2, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect2 = getNoteRect(); + rect2.x = task.x; + rect2.y = task.y; + rect2.fill = task.fill; + rect2.width = conf2.width; + rect2.height = conf2.height; + rect2.class = "task task-type-" + task.num; + rect2.rx = 3; + rect2.ry = 3; + drawRect(g, rect2); + task.x + 14; + _drawTextCandidateFunc(conf2)( + task.task, + g, + rect2.x, + rect2.y, + rect2.width, + rect2.height, + { class: "task" }, + conf2, + task.colour + ); + }; + const drawBackgroundRect = function(elem, bounds2) { + const rectElem = drawRect(elem, { + x: bounds2.startx, + y: bounds2.starty, + width: bounds2.stopx - bounds2.startx, + height: bounds2.stopy - bounds2.starty, + fill: bounds2.fill, + class: "rect" + }); + rectElem.lower(); + }; + const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + "text-anchor": "start", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; + }; + const getNoteRect = function() { + return { + x: 0, + y: 0, + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; + }; + const _drawTextCandidateFunc = function() { + function byText(content2, g, x2, y2, width2, height, textAttrs, colour) { + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2 + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content2); + _setTextAttrs(text2, textAttrs); + } + function byTspan(content2, g, x2, y2, width2, height, textAttrs, conf2, colour) { + const { taskFontSize, taskFontFamily } = conf2; + const lines = content2.split(//gi); + for (let i2 = 0; i2 < lines.length; i2++) { + const dy = i2 * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text2 = g.append("text").attr("x", x2 + width2 / 2).attr("y", y2).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text2.append("tspan").attr("x", x2 + width2 / 2).attr("dy", dy).text(lines[i2]); + text2.attr("y", y2 + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text2, textAttrs); + } + } + function byFo(content2, g, x2, y2, width2, height, textAttrs, conf2) { + const body = g.append("switch"); + const f2 = body.append("foreignObject").attr("x", x2).attr("y", y2).attr("width", width2).attr("height", height).attr("position", "fixed"); + const text2 = f2.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text2.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content2); + byTspan(content2, body, x2, y2, width2, height, textAttrs, conf2); + _setTextAttrs(text2, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; + }(); + const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); + }; + function wrap(text2, width2) { + text2.each(function() { + var text3 = d3select(this), words = text3.text().split(/(\s+|
)/).reverse(), word, line2 = [], lineHeight = 1.1, y2 = text3.attr("y"), dy = parseFloat(text3.attr("dy")), tspan = text3.text(null).append("tspan").attr("x", 0).attr("y", y2).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line2.push(word); + tspan.text(line2.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width2 || word === "
") { + line2.pop(); + tspan.text(line2.join(" ").trim()); + if (word === "
") { + line2 = [""]; + } else { + line2 = [word]; + } + tspan = text3.append("tspan").attr("x", 0).attr("y", y2).attr("dy", lineHeight + "em").text(word); + } + } + }); + } + const drawNode$1 = function(elem, node2, fullSection, conf2) { + const section = fullSection % MAX_SECTIONS$1 - 1; + const nodeElem = elem.append("g"); + node2.section = section; + nodeElem.attr( + "class", + (node2.class ? node2.class + " " : "") + "timeline-node " + ("section-" + section) + ); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node2.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node2.width); + const bbox = txt.node().getBBox(); + const fontSize = conf2.fontSize && conf2.fontSize.replace ? conf2.fontSize.replace("px", "") : conf2.fontSize; + node2.height = bbox.height + fontSize * 1.1 * 0.5 + node2.padding; + node2.height = Math.max(node2.height, node2.maxHeight); + node2.width = node2.width + 2 * node2.padding; + textElem.attr("transform", "translate(" + node2.width / 2 + ", " + node2.padding / 2 + ")"); + defaultBkg$1(bkgElem, node2, section); + return node2; + }; + const getVirtualNodeHeight = function(elem, node2, conf2) { + const textElem = elem.append("g"); + const txt = textElem.append("text").text(node2.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node2.width); + const bbox = txt.node().getBBox(); + const fontSize = conf2.fontSize && conf2.fontSize.replace ? conf2.fontSize.replace("px", "") : conf2.fontSize; + textElem.remove(); + return bbox.height + fontSize * 1.1 * 0.5 + node2.padding; + }; + const defaultBkg$1 = function(elem, node2, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node2.id).attr("class", "node-bkg node-" + node2.type).attr( + "d", + `M0 ${node2.height - rd} v${-node2.height + 2 * rd} q0,-5 5,-5 h${node2.width - 2 * rd} q5,0 5,5 v${node2.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node2.height).attr("x2", node2.width).attr("y2", node2.height); + }; + const svgDraw$1 = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + getTextObj, + getNoteRect, + initGraphics, + drawNode: drawNode$1, + getVirtualNodeHeight + }; + const draw$2 = function(text2, id2, version2, diagObj) { + var _a, _b; + const conf2 = getConfig$2(); + const LEFT_MARGIN2 = conf2.leftMargin ?? 50; + log$1.debug("timeline", diagObj.db); + const securityLevel = conf2.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = root2.select("#" + id2); + svg2.append("g"); + const tasks2 = diagObj.db.getTasks(); + const title2 = diagObj.db.getCommonDb().getDiagramTitle(); + log$1.debug("task", tasks2); + svgDraw$1.initGraphics(svg2); + const sections2 = diagObj.db.getSections(); + log$1.debug("sections", sections2); + let maxSectionHeight = 0; + let maxTaskHeight = 0; + let depthY = 0; + let sectionBeginY = 0; + let masterX = 50 + LEFT_MARGIN2; + let masterY = 50; + sectionBeginY = 50; + let sectionNumber = 0; + let hasSections = true; + sections2.forEach(function(section) { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + const sectionHeight = svgDraw$1.getVirtualNodeHeight(svg2, sectionNode, conf2); + log$1.debug("sectionHeight before draw", sectionHeight); + maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20); + }); + let maxEventCount = 0; + let maxEventLineLength = 0; + log$1.debug("tasks.length", tasks2.length); + for (const [i2, task] of tasks2.entries()) { + const taskNode = { + number: i2, + descr: task, + section: task.section, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + const taskHeight = svgDraw$1.getVirtualNodeHeight(svg2, taskNode, conf2); + log$1.debug("taskHeight before draw", taskHeight); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20); + maxEventCount = Math.max(maxEventCount, task.events.length); + let maxEventLineLengthTemp = 0; + for (let j = 0; j < task.events.length; j++) { + const event = task.events[j]; + const eventNode = { + descr: event, + section: task.section, + number: task.section, + width: 150, + padding: 20, + maxHeight: 50 + }; + maxEventLineLengthTemp += svgDraw$1.getVirtualNodeHeight(svg2, eventNode, conf2); + } + maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp); + } + log$1.debug("maxSectionHeight before draw", maxSectionHeight); + log$1.debug("maxTaskHeight before draw", maxTaskHeight); + if (sections2 && sections2.length > 0) { + sections2.forEach((section) => { + const tasksForSection = tasks2.filter((task) => task.section === section); + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 200 * Math.max(tasksForSection.length, 1) - 50, + padding: 20, + maxHeight: maxSectionHeight + }; + log$1.debug("sectionNode", sectionNode); + const sectionNodeWrapper = svg2.append("g"); + const node2 = svgDraw$1.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf2); + log$1.debug("sectionNode output", node2); + sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); + masterY += maxSectionHeight + 50; + if (tasksForSection.length > 0) { + drawTasks( + svg2, + tasksForSection, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf2, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + false + ); + } + masterX += 200 * Math.max(tasksForSection.length, 1); + masterY = sectionBeginY; + sectionNumber++; + }); + } else { + hasSections = false; + drawTasks( + svg2, + tasks2, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf2, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + true + ); + } + const box = svg2.node().getBBox(); + log$1.debug("bounds", box); + if (title2) { + svg2.append("text").text(title2).attr("x", box.width / 2 - LEFT_MARGIN2).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20); + } + depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; + const lineWrapper = svg2.append("g").attr("class", "lineWrapper"); + lineWrapper.append("line").attr("x1", LEFT_MARGIN2).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN2).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + setupGraphViewbox$1( + void 0, + svg2, + ((_a = conf2.timeline) == null ? void 0 : _a.padding) ?? 50, + ((_b = conf2.timeline) == null ? void 0 : _b.useMaxWidth) ?? false + ); + }; + const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf2, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { + var _a; + for (const task of tasks2) { + const taskNode = { + descr: task.task, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + log$1.debug("taskNode", taskNode); + const taskWrapper = diagram2.append("g").attr("class", "taskWrapper"); + const node2 = svgDraw$1.drawNode(taskWrapper, taskNode, sectionColor, conf2); + const taskHeight = node2.height; + log$1.debug("taskHeight after draw", taskHeight); + taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight); + if (task.events) { + const lineWrapper = diagram2.append("g").attr("class", "lineWrapper"); + let lineLength = maxTaskHeight; + masterY += 100; + lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf2); + masterY -= 100; + lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( + "y2", + masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + } + masterX = masterX + 200; + if (isWithoutSections && !((_a = conf2.timeline) == null ? void 0 : _a.disableMulticolor)) { + sectionColor++; + } + } + masterY = masterY - 10; + }; + const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf2) { + let maxEventHeight = 0; + const eventBeginY = masterY; + masterY = masterY + 100; + for (const event of events) { + const eventNode = { + descr: event, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: 50 + }; + log$1.debug("eventNode", eventNode); + const eventWrapper = diagram2.append("g").attr("class", "eventWrapper"); + const node2 = svgDraw$1.drawNode(eventWrapper, eventNode, sectionColor, conf2); + const eventHeight = node2.height; + maxEventHeight = maxEventHeight + eventHeight; + eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + masterY = masterY + 10 + eventHeight; + } + masterY = eventBeginY; + return maxEventHeight; + }; + const renderer$1 = { + setConf: () => { + }, + draw: draw$2 + }; + const genSections$1 = (options2) => { + let sections2 = ""; + for (let i2 = 0; i2 < options2.THEME_COLOR_LIMIT; i2++) { + options2["lineColor" + i2] = options2["lineColor" + i2] || options2["cScaleInv" + i2]; + if (isDark$1(options2["lineColor" + i2])) { + options2["lineColor" + i2] = lighten$1(options2["lineColor" + i2], 20); + } else { + options2["lineColor" + i2] = darken$1(options2["lineColor" + i2], 20); + } + } + for (let i2 = 0; i2 < options2.THEME_COLOR_LIMIT; i2++) { + const sw = "" + (17 - 3 * i2); + sections2 += ` + .section-${i2 - 1} rect, .section-${i2 - 1} path, .section-${i2 - 1} circle, .section-${i2 - 1} path { + fill: ${options2["cScale" + i2]}; + } + .section-${i2 - 1} text { + fill: ${options2["cScaleLabel" + i2]}; + } + .node-icon-${i2 - 1} { + font-size: 40px; + color: ${options2["cScaleLabel" + i2]}; + } + .section-edge-${i2 - 1}{ + stroke: ${options2["cScale" + i2]}; + } + .edge-depth-${i2 - 1}{ + stroke-width: ${sw}; + } + .section-${i2 - 1} line { + stroke: ${options2["cScaleInv" + i2]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${options2["cScaleLabel" + i2]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections2; + }; + const getStyles$1 = (options2) => ` + .edge { + stroke-width: 3; + } + ${genSections$1(options2)} + .section-root rect, .section-root path, .section-root circle { + fill: ${options2.git0}; + } + .section-root text { + fill: ${options2.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`; + const styles = getStyles$1; + const diagram$2 = { + db: db$1, + renderer: renderer$1, + parser: parser$4, + styles + }; + const timelineDefinition = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$2 + }, Symbol.toStringTag, { value: "Module" })); + var parser$2 = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, + productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 6: + case 7: + return yy; + case 8: + yy.getLogger().trace("Stop NL "); + break; + case 9: + yy.getLogger().trace("Stop EOF "); + break; + case 11: + yy.getLogger().trace("Stop NL2 "); + break; + case 12: + yy.getLogger().trace("Stop EOF2 "); + break; + case 15: + yy.getLogger().info("Node: ", $$[$0].id); + yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 16: + yy.getLogger().trace("Icon: ", $$[$0]); + yy.decorateNode({ icon: $$[$0] }); + break; + case 17: + case 21: + yy.decorateNode({ class: $$[$0] }); + break; + case 18: + yy.getLogger().trace("SPACELIST"); + break; + case 19: + yy.getLogger().trace("Node: ", $$[$0].id); + yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 20: + yy.decorateNode({ icon: $$[$0] }); + break; + case 25: + yy.getLogger().trace("node found ..", $$[$0 - 2]); + this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + case 26: + this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; + break; + case 27: + yy.getLogger().trace("node found ..", $$[$0 - 3]); + this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])], + defaultActions: { 2: [2, 1], 6: [2, 2] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + yy.getLogger().trace("Found comment", yy_.yytext); + return 6; + case 1: + return 8; + case 2: + this.begin("CLASS"); + break; + case 3: + this.popState(); + return 16; + case 4: + this.popState(); + break; + case 5: + yy.getLogger().trace("Begin icon"); + this.begin("ICON"); + break; + case 6: + yy.getLogger().trace("SPACELINE"); + return 6; + case 7: + return 7; + case 8: + return 15; + case 9: + yy.getLogger().trace("end icon"); + this.popState(); + break; + case 10: + yy.getLogger().trace("Exploding node"); + this.begin("NODE"); + return 19; + case 11: + yy.getLogger().trace("Cloud"); + this.begin("NODE"); + return 19; + case 12: + yy.getLogger().trace("Explosion Bang"); + this.begin("NODE"); + return 19; + case 13: + yy.getLogger().trace("Cloud Bang"); + this.begin("NODE"); + return 19; + case 14: + this.begin("NODE"); + return 19; + case 15: + this.begin("NODE"); + return 19; + case 16: + this.begin("NODE"); + return 19; + case 17: + this.begin("NODE"); + return 19; + case 18: + return 13; + case 19: + return 22; + case 20: + return 11; + case 21: + this.begin("NSTR2"); + break; + case 22: + return "NODE_DESCR"; + case 23: + this.popState(); + break; + case 24: + yy.getLogger().trace("Starting NSTR"); + this.begin("NSTR"); + break; + case 25: + yy.getLogger().trace("description:", yy_.yytext); + return "NODE_DESCR"; + case 26: + this.popState(); + break; + case 27: + this.popState(); + yy.getLogger().trace("node end ))"); + return "NODE_DEND"; + case 28: + this.popState(); + yy.getLogger().trace("node end )"); + return "NODE_DEND"; + case 29: + this.popState(); + yy.getLogger().trace("node end ...", yy_.yytext); + return "NODE_DEND"; + case 30: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 31: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 32: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 33: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 34: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 35: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + case 36: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + } + }, + rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], + conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser$2.parser = parser$2; + const mindmapParser = parser$2; + const sanitizeText = (text2) => sanitizeText$6(text2, getConfig$2()); + let nodes$1 = []; + let cnt = 0; + let elements = {}; + const clear$1 = () => { + nodes$1 = []; + cnt = 0; + elements = {}; + }; + const getParent = function(level) { + for (let i2 = nodes$1.length - 1; i2 >= 0; i2--) { + if (nodes$1[i2].level < level) { + return nodes$1[i2]; + } + } + return null; + }; + const getMindmap = () => { + return nodes$1.length > 0 ? nodes$1[0] : null; + }; + const addNode = (level, id2, descr, type2) => { + log$1.info("addNode", level, id2, descr, type2); + const conf2 = getConfig$2(); + const node2 = { + id: cnt++, + nodeId: sanitizeText(id2), + level, + descr: sanitizeText(descr), + type: type2, + children: [], + width: getConfig$2().mindmap.maxNodeWidth + }; + switch (node2.type) { + case nodeType.ROUNDED_RECT: + node2.padding = 2 * conf2.mindmap.padding; + break; + case nodeType.RECT: + node2.padding = 2 * conf2.mindmap.padding; + break; + case nodeType.HEXAGON: + node2.padding = 2 * conf2.mindmap.padding; + break; + default: + node2.padding = conf2.mindmap.padding; + } + const parent = getParent(level); + if (parent) { + parent.children.push(node2); + nodes$1.push(node2); + } else { + if (nodes$1.length === 0) { + nodes$1.push(node2); + } else { + let error = new Error( + 'There can be only one root. No parent could be found for ("' + node2.descr + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } + } + }; + const nodeType = { + DEFAULT: 0, + NO_BORDER: 0, + ROUNDED_RECT: 1, + RECT: 2, + CIRCLE: 3, + CLOUD: 4, + BANG: 5, + HEXAGON: 6 + }; + const getType = (startStr, endStr) => { + log$1.debug("In get type", startStr, endStr); + switch (startStr) { + case "[": + return nodeType.RECT; + case "(": + return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD; + case "((": + return nodeType.CIRCLE; + case ")": + return nodeType.CLOUD; + case "))": + return nodeType.BANG; + case "{{": + return nodeType.HEXAGON; + default: + return nodeType.DEFAULT; + } + }; + const setElementForId = (id2, element2) => { + elements[id2] = element2; + }; + const decorateNode = (decoration) => { + const node2 = nodes$1[nodes$1.length - 1]; + if (decoration && decoration.icon) { + node2.icon = sanitizeText(decoration.icon); + } + if (decoration && decoration.class) { + node2.class = sanitizeText(decoration.class); + } + }; + const type2Str = (type2) => { + switch (type2) { + case nodeType.DEFAULT: + return "no-border"; + case nodeType.RECT: + return "rect"; + case nodeType.ROUNDED_RECT: + return "rounded-rect"; + case nodeType.CIRCLE: + return "circle"; + case nodeType.CLOUD: + return "cloud"; + case nodeType.BANG: + return "bang"; + case nodeType.HEXAGON: + return "hexgon"; + default: + return "no-border"; + } + }; + let parseError; + const setErrorHandler = (handler) => { + parseError = handler; + }; + const getLogger = () => log$1; + const getNodeById = (id2) => nodes$1[id2]; + const getElementById = (id2) => elements[id2]; + const mindmapDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addNode, + clear: clear$1, + decorateNode, + getElementById, + getLogger, + getMindmap, + getNodeById, + getType, + nodeType, + get parseError() { + return parseError; + }, + sanitizeText, + setElementForId, + setErrorHandler, + type2Str + }, Symbol.toStringTag, { value: "Module" })); + const MAX_SECTIONS = 12; + const defaultBkg = function(elem, node2, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node2.id).attr("class", "node-bkg node-" + type2Str(node2.type)).attr( + "d", + `M0 ${node2.height - rd} v${-node2.height + 2 * rd} q0,-5 5,-5 h${node2.width - 2 * rd} q5,0 5,5 v${node2.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node2.height).attr("x2", node2.width).attr("y2", node2.height); + }; + const rectBkg = function(elem, node2) { + elem.append("rect").attr("id", "node-" + node2.id).attr("class", "node-bkg node-" + type2Str(node2.type)).attr("height", node2.height).attr("width", node2.width); + }; + const cloudBkg = function(elem, node2) { + const w2 = node2.width; + const h = node2.height; + const r1 = 0.15 * w2; + const r2 = 0.25 * w2; + const r3 = 0.35 * w2; + const r4 = 0.2 * w2; + elem.append("path").attr("id", "node-" + node2.id).attr("class", "node-bkg node-" + type2Str(node2.type)).attr( + "d", + `M0 0 a${r1},${r1} 0 0,1 ${w2 * 0.25},${-1 * w2 * 0.1} + a${r3},${r3} 1 0,1 ${w2 * 0.4},${-1 * w2 * 0.1} + a${r2},${r2} 1 0,1 ${w2 * 0.35},${1 * w2 * 0.2} + + a${r1},${r1} 1 0,1 ${w2 * 0.15},${1 * h * 0.35} + a${r4},${r4} 1 0,1 ${-1 * w2 * 0.15},${1 * h * 0.65} + + a${r2},${r1} 1 0,1 ${-1 * w2 * 0.25},${w2 * 0.15} + a${r3},${r3} 1 0,1 ${-1 * w2 * 0.5},${0} + a${r1},${r1} 1 0,1 ${-1 * w2 * 0.25},${-1 * w2 * 0.15} + + a${r1},${r1} 1 0,1 ${-1 * w2 * 0.1},${-1 * h * 0.35} + a${r4},${r4} 1 0,1 ${w2 * 0.1},${-1 * h * 0.65} + + H0 V0 Z` + ); + }; + const bangBkg = function(elem, node2) { + const w2 = node2.width; + const h = node2.height; + const r = 0.15 * w2; + elem.append("path").attr("id", "node-" + node2.id).attr("class", "node-bkg node-" + type2Str(node2.type)).attr( + "d", + `M0 0 a${r},${r} 1 0,0 ${w2 * 0.25},${-1 * h * 0.1} + a${r},${r} 1 0,0 ${w2 * 0.25},${0} + a${r},${r} 1 0,0 ${w2 * 0.25},${0} + a${r},${r} 1 0,0 ${w2 * 0.25},${1 * h * 0.1} + + a${r},${r} 1 0,0 ${w2 * 0.15},${1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34} + a${r},${r} 1 0,0 ${-1 * w2 * 0.15},${1 * h * 0.33} + + a${r},${r} 1 0,0 ${-1 * w2 * 0.25},${h * 0.15} + a${r},${r} 1 0,0 ${-1 * w2 * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w2 * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w2 * 0.25},${-1 * h * 0.15} + + a${r},${r} 1 0,0 ${-1 * w2 * 0.1},${-1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} + a${r},${r} 1 0,0 ${w2 * 0.1},${-1 * h * 0.33} + + H0 V0 Z` + ); + }; + const circleBkg = function(elem, node2) { + elem.append("circle").attr("id", "node-" + node2.id).attr("class", "node-bkg node-" + type2Str(node2.type)).attr("r", node2.width / 2); + }; + function insertPolygonShape(parent, w2, h, points, node2) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + (node2.width - w2) / 2 + ", " + h + ")"); + } + const hexagonBkg = function(elem, node2) { + const h = node2.height; + const f2 = 4; + const m = h / f2; + const w2 = node2.width - node2.padding + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w2 - m, y: 0 }, + { x: w2, y: -h / 2 }, + { x: w2 - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + insertPolygonShape(elem, w2, h, points, node2); + }; + const roundedRectBkg = function(elem, node2) { + elem.append("rect").attr("id", "node-" + node2.id).attr("class", "node-bkg node-" + type2Str(node2.type)).attr("height", node2.height).attr("rx", node2.padding).attr("ry", node2.padding).attr("width", node2.width); + }; + const drawNode = function(elem, node2, fullSection, conf2) { + const htmlLabels = conf2.htmlLabels; + const section = fullSection % (MAX_SECTIONS - 1); + const nodeElem = elem.append("g"); + node2.section = section; + let sectionClass = "section-" + section; + if (section < 0) { + sectionClass += " section-root"; + } + nodeElem.attr("class", (node2.class ? node2.class + " " : "") + "mindmap-node " + sectionClass); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const description = node2.descr.replace(/()/g, "\n"); + createText(textElem, description, { + useHtmlLabels: htmlLabels, + width: node2.width, + classes: "mindmap-node-label" + }); + if (!htmlLabels) { + textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"); + } + const bbox = textElem.node().getBBox(); + const fontSize = conf2.fontSize.replace ? conf2.fontSize.replace("px", "") : conf2.fontSize; + node2.height = bbox.height + fontSize * 1.1 * 0.5 + node2.padding; + node2.width = bbox.width + 2 * node2.padding; + if (node2.icon) { + if (node2.type === nodeType.CIRCLE) { + node2.height += 50; + node2.width += 50; + const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node2.width).attr("style", "text-align: center;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node2.icon); + textElem.attr( + "transform", + "translate(" + node2.width / 2 + ", " + (node2.height / 2 - 1.5 * node2.padding) + ")" + ); + } else { + node2.width += 50; + const orgHeight = node2.height; + node2.height = Math.max(orgHeight, 60); + const heightDiff = Math.abs(node2.height - orgHeight); + const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node2.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node2.icon); + textElem.attr( + "transform", + "translate(" + (25 + node2.width / 2) + ", " + (heightDiff / 2 + node2.padding / 2) + ")" + ); + } + } else { + if (!htmlLabels) { + const dx = node2.width / 2; + const dy = node2.padding / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } else { + const dx = (node2.width - bbox.width) / 2; + const dy = (node2.height - bbox.height) / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } + } + switch (node2.type) { + case nodeType.DEFAULT: + defaultBkg(bkgElem, node2, section); + break; + case nodeType.ROUNDED_RECT: + roundedRectBkg(bkgElem, node2); + break; + case nodeType.RECT: + rectBkg(bkgElem, node2); + break; + case nodeType.CIRCLE: + bkgElem.attr("transform", "translate(" + node2.width / 2 + ", " + +node2.height / 2 + ")"); + circleBkg(bkgElem, node2); + break; + case nodeType.CLOUD: + cloudBkg(bkgElem, node2); + break; + case nodeType.BANG: + bangBkg(bkgElem, node2); + break; + case nodeType.HEXAGON: + hexagonBkg(bkgElem, node2); + break; + } + setElementForId(node2.id, nodeElem); + return node2.height; + }; + const drawEdge = function drawEdge2(edgesElem, mindmap2, parent, depth, fullSection) { + const section = fullSection % (MAX_SECTIONS - 1); + const sx = parent.x + parent.width / 2; + const sy = parent.y + parent.height / 2; + const ex = mindmap2.x + mindmap2.width / 2; + const ey = mindmap2.y + mindmap2.height / 2; + const mx = ex > sx ? sx + Math.abs(sx - ex) / 2 : sx - Math.abs(sx - ex) / 2; + const my = ey > sy ? sy + Math.abs(sy - ey) / 2 : sy - Math.abs(sy - ey) / 2; + const qx = ex > sx ? Math.abs(sx - mx) / 2 + sx : -Math.abs(sx - mx) / 2 + sx; + const qy = ey > sy ? Math.abs(sy - my) / 2 + sy : -Math.abs(sy - my) / 2 + sy; + edgesElem.append("path").attr( + "d", + parent.direction === "TB" || parent.direction === "BT" ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}` : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}` + ).attr("class", "edge section-edge-" + section + " edge-depth-" + depth); + }; + const positionNode = function(node2) { + const nodeElem = getElementById(node2.id); + const x2 = node2.x || 0; + const y2 = node2.y || 0; + nodeElem.attr("transform", "translate(" + x2 + "," + y2 + ")"); + }; + const svgDraw = { drawNode, positionNode, drawEdge }; + var cytoscape_umd = { exports: {} }; + (function(module2, exports2) { + (function(global2, factory) { + module2.exports = factory(); + })(commonjsGlobal, function() { + function _typeof(obj) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { + return typeof obj2; + } : function(obj2) { + return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }, _typeof(obj); + } + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i3 = 0; i3 < props.length; i3++) { + var descriptor = props[i3]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) + _defineProperties(Constructor.prototype, protoProps); + if (staticProps) + _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; + } + function _defineProperty$1(obj, key, value2) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value2, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value2; + } + return obj; + } + function _slicedToArray(arr, i3) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i3) || _unsupportedIterableToArray(arr, i3) || _nonIterableRest(); + } + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) + return arr; + } + function _iterableToArrayLimit(arr, i3) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + if (_i == null) + return; + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i3 && _arr.length === i3) + break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) + _i["return"](); + } finally { + if (_d) + throw _e; + } + } + return _arr; + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) + return; + if (typeof o === "string") + return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) + n = o.constructor.name; + if (n === "Map" || n === "Set") + return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i3 = 0, arr2 = new Array(len); i3 < len; i3++) + arr2[i3] = arr[i3]; + return arr2; + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var window$1 = typeof window === "undefined" ? null : window; + var navigator2 = window$1 ? window$1.navigator : null; + window$1 ? window$1.document : null; + var typeofstr = _typeof(""); + var typeofobj = _typeof({}); + var typeoffn = _typeof(function() { + }); + var typeofhtmlele = typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement); + var instanceStr = function instanceStr2(obj) { + return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null; + }; + var string2 = function string3(obj) { + return obj != null && _typeof(obj) == typeofstr; + }; + var fn$6 = function fn2(obj) { + return obj != null && _typeof(obj) === typeoffn; + }; + var array2 = function array3(obj) { + return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array); + }; + var plainObject = function plainObject2(obj) { + return obj != null && _typeof(obj) === typeofobj && !array2(obj) && obj.constructor === Object; + }; + var object2 = function object3(obj) { + return obj != null && _typeof(obj) === typeofobj; + }; + var number$12 = function number3(obj) { + return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj); + }; + var integer = function integer2(obj) { + return number$12(obj) && Math.floor(obj) === obj; + }; + var htmlElement = function htmlElement2(obj) { + if ("undefined" === typeofhtmlele) { + return void 0; + } else { + return null != obj && obj instanceof HTMLElement; + } + }; + var elementOrCollection = function elementOrCollection2(obj) { + return element2(obj) || collection(obj); + }; + var element2 = function element3(obj) { + return instanceStr(obj) === "collection" && obj._private.single; + }; + var collection = function collection2(obj) { + return instanceStr(obj) === "collection" && !obj._private.single; + }; + var core2 = function core3(obj) { + return instanceStr(obj) === "core"; + }; + var stylesheet = function stylesheet2(obj) { + return instanceStr(obj) === "stylesheet"; + }; + var event = function event2(obj) { + return instanceStr(obj) === "event"; + }; + var emptyString = function emptyString2(obj) { + if (obj === void 0 || obj === null) { + return true; + } else if (obj === "" || obj.match(/^\s+$/)) { + return true; + } + return false; + }; + var domElement = function domElement2(obj) { + if (typeof HTMLElement === "undefined") { + return false; + } else { + return obj instanceof HTMLElement; + } + }; + var boundingBox = function boundingBox2(obj) { + return plainObject(obj) && number$12(obj.x1) && number$12(obj.x2) && number$12(obj.y1) && number$12(obj.y2); + }; + var promise = function promise2(obj) { + return object2(obj) && fn$6(obj.then); + }; + var ms = function ms2() { + return navigator2 && navigator2.userAgent.match(/msie|trident|edge/i); + }; + var memoize$1 = function memoize3(fn2, keyFn) { + if (!keyFn) { + keyFn = function keyFn2() { + if (arguments.length === 1) { + return arguments[0]; + } else if (arguments.length === 0) { + return "undefined"; + } + var args = []; + for (var i3 = 0; i3 < arguments.length; i3++) { + args.push(arguments[i3]); + } + return args.join("$"); + }; + } + var memoizedFn = function memoizedFn2() { + var self2 = this; + var args = arguments; + var ret; + var k = keyFn.apply(self2, args); + var cache2 = memoizedFn2.cache; + if (!(ret = cache2[k])) { + ret = cache2[k] = fn2.apply(self2, args); + } + return ret; + }; + memoizedFn.cache = {}; + return memoizedFn; + }; + var camel2dash = memoize$1(function(str2) { + return str2.replace(/([A-Z])/g, function(v) { + return "-" + v.toLowerCase(); + }); + }); + var dash2camel = memoize$1(function(str2) { + return str2.replace(/(-\w)/g, function(v) { + return v[1].toUpperCase(); + }); + }); + var prependCamel = memoize$1(function(prefix, str2) { + return prefix + str2[0].toUpperCase() + str2.substring(1); + }, function(prefix, str2) { + return prefix + "$" + str2; + }); + var capitalize = function capitalize2(str2) { + if (emptyString(str2)) { + return str2; + } + return str2.charAt(0).toUpperCase() + str2.substring(1); + }; + var number2 = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))"; + var rgba2 = "rgb[a]?\\((" + number2 + "[%]?)\\s*,\\s*(" + number2 + "[%]?)\\s*,\\s*(" + number2 + "[%]?)(?:\\s*,\\s*(" + number2 + "))?\\)"; + var rgbaNoBackRefs = "rgb[a]?\\((?:" + number2 + "[%]?)\\s*,\\s*(?:" + number2 + "[%]?)\\s*,\\s*(?:" + number2 + "[%]?)(?:\\s*,\\s*(?:" + number2 + "))?\\)"; + var hsla2 = "hsl[a]?\\((" + number2 + ")\\s*,\\s*(" + number2 + "[%])\\s*,\\s*(" + number2 + "[%])(?:\\s*,\\s*(" + number2 + "))?\\)"; + var hslaNoBackRefs = "hsl[a]?\\((?:" + number2 + ")\\s*,\\s*(?:" + number2 + "[%])\\s*,\\s*(?:" + number2 + "[%])(?:\\s*,\\s*(?:" + number2 + "))?\\)"; + var hex3 = "\\#[0-9a-fA-F]{3}"; + var hex6 = "\\#[0-9a-fA-F]{6}"; + var ascending2 = function ascending3(a, b) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + }; + var descending2 = function descending3(a, b) { + return -1 * ascending2(a, b); + }; + var extend2 = Object.assign != null ? Object.assign.bind(Object) : function(tgt) { + var args = arguments; + for (var i3 = 1; i3 < args.length; i3++) { + var obj = args[i3]; + if (obj == null) { + continue; + } + var keys2 = Object.keys(obj); + for (var j = 0; j < keys2.length; j++) { + var k = keys2[j]; + tgt[k] = obj[k]; + } + } + return tgt; + }; + var hex2tuple = function hex2tuple2(hex2) { + if (!(hex2.length === 4 || hex2.length === 7) || hex2[0] !== "#") { + return; + } + var shortHex = hex2.length === 4; + var r, g, b; + var base = 16; + if (shortHex) { + r = parseInt(hex2[1] + hex2[1], base); + g = parseInt(hex2[2] + hex2[2], base); + b = parseInt(hex2[3] + hex2[3], base); + } else { + r = parseInt(hex2[1] + hex2[2], base); + g = parseInt(hex2[3] + hex2[4], base); + b = parseInt(hex2[5] + hex2[6], base); + } + return [r, g, b]; + }; + var hsl2tuple = function hsl2tuple2(hsl2) { + var ret; + var h, s, l, a, r, g, b; + function hue2rgb(p3, q2, t) { + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p3 + (q2 - p3) * 6 * t; + if (t < 1 / 2) + return q2; + if (t < 2 / 3) + return p3 + (q2 - p3) * (2 / 3 - t) * 6; + return p3; + } + var m = new RegExp("^" + hsla2 + "$").exec(hsl2); + if (m) { + h = parseInt(m[1]); + if (h < 0) { + h = (360 - -1 * h % 360) % 360; + } else if (h > 360) { + h = h % 360; + } + h /= 360; + s = parseFloat(m[2]); + if (s < 0 || s > 100) { + return; + } + s = s / 100; + l = parseFloat(m[3]); + if (l < 0 || l > 100) { + return; + } + l = l / 100; + a = m[4]; + if (a !== void 0) { + a = parseFloat(a); + if (a < 0 || a > 1) { + return; + } + } + if (s === 0) { + r = g = b = Math.round(l * 255); + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p2 = 2 * l - q; + r = Math.round(255 * hue2rgb(p2, q, h + 1 / 3)); + g = Math.round(255 * hue2rgb(p2, q, h)); + b = Math.round(255 * hue2rgb(p2, q, h - 1 / 3)); + } + ret = [r, g, b, a]; + } + return ret; + }; + var rgb2tuple = function rgb2tuple2(rgb2) { + var ret; + var m = new RegExp("^" + rgba2 + "$").exec(rgb2); + if (m) { + ret = []; + var isPct = []; + for (var i3 = 1; i3 <= 3; i3++) { + var channel2 = m[i3]; + if (channel2[channel2.length - 1] === "%") { + isPct[i3] = true; + } + channel2 = parseFloat(channel2); + if (isPct[i3]) { + channel2 = channel2 / 100 * 255; + } + if (channel2 < 0 || channel2 > 255) { + return; + } + ret.push(Math.floor(channel2)); + } + var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3]; + var allArePct = isPct[1] && isPct[2] && isPct[3]; + if (atLeastOneIsPct && !allArePct) { + return; + } + var alpha = m[4]; + if (alpha !== void 0) { + alpha = parseFloat(alpha); + if (alpha < 0 || alpha > 1) { + return; + } + ret.push(alpha); + } + } + return ret; + }; + var colorname2tuple = function colorname2tuple2(color2) { + return colors2[color2.toLowerCase()]; + }; + var color2tuple = function color2tuple2(color2) { + return (array2(color2) ? color2 : null) || colorname2tuple(color2) || hex2tuple(color2) || rgb2tuple(color2) || hsl2tuple(color2); + }; + var colors2 = { + // special colour names + transparent: [0, 0, 0, 0], + // NB alpha === 0 + // regular colours + aliceblue: [240, 248, 255], + antiquewhite: [250, 235, 215], + aqua: [0, 255, 255], + aquamarine: [127, 255, 212], + azure: [240, 255, 255], + beige: [245, 245, 220], + bisque: [255, 228, 196], + black: [0, 0, 0], + blanchedalmond: [255, 235, 205], + blue: [0, 0, 255], + blueviolet: [138, 43, 226], + brown: [165, 42, 42], + burlywood: [222, 184, 135], + cadetblue: [95, 158, 160], + chartreuse: [127, 255, 0], + chocolate: [210, 105, 30], + coral: [255, 127, 80], + cornflowerblue: [100, 149, 237], + cornsilk: [255, 248, 220], + crimson: [220, 20, 60], + cyan: [0, 255, 255], + darkblue: [0, 0, 139], + darkcyan: [0, 139, 139], + darkgoldenrod: [184, 134, 11], + darkgray: [169, 169, 169], + darkgreen: [0, 100, 0], + darkgrey: [169, 169, 169], + darkkhaki: [189, 183, 107], + darkmagenta: [139, 0, 139], + darkolivegreen: [85, 107, 47], + darkorange: [255, 140, 0], + darkorchid: [153, 50, 204], + darkred: [139, 0, 0], + darksalmon: [233, 150, 122], + darkseagreen: [143, 188, 143], + darkslateblue: [72, 61, 139], + darkslategray: [47, 79, 79], + darkslategrey: [47, 79, 79], + darkturquoise: [0, 206, 209], + darkviolet: [148, 0, 211], + deeppink: [255, 20, 147], + deepskyblue: [0, 191, 255], + dimgray: [105, 105, 105], + dimgrey: [105, 105, 105], + dodgerblue: [30, 144, 255], + firebrick: [178, 34, 34], + floralwhite: [255, 250, 240], + forestgreen: [34, 139, 34], + fuchsia: [255, 0, 255], + gainsboro: [220, 220, 220], + ghostwhite: [248, 248, 255], + gold: [255, 215, 0], + goldenrod: [218, 165, 32], + gray: [128, 128, 128], + grey: [128, 128, 128], + green: [0, 128, 0], + greenyellow: [173, 255, 47], + honeydew: [240, 255, 240], + hotpink: [255, 105, 180], + indianred: [205, 92, 92], + indigo: [75, 0, 130], + ivory: [255, 255, 240], + khaki: [240, 230, 140], + lavender: [230, 230, 250], + lavenderblush: [255, 240, 245], + lawngreen: [124, 252, 0], + lemonchiffon: [255, 250, 205], + lightblue: [173, 216, 230], + lightcoral: [240, 128, 128], + lightcyan: [224, 255, 255], + lightgoldenrodyellow: [250, 250, 210], + lightgray: [211, 211, 211], + lightgreen: [144, 238, 144], + lightgrey: [211, 211, 211], + lightpink: [255, 182, 193], + lightsalmon: [255, 160, 122], + lightseagreen: [32, 178, 170], + lightskyblue: [135, 206, 250], + lightslategray: [119, 136, 153], + lightslategrey: [119, 136, 153], + lightsteelblue: [176, 196, 222], + lightyellow: [255, 255, 224], + lime: [0, 255, 0], + limegreen: [50, 205, 50], + linen: [250, 240, 230], + magenta: [255, 0, 255], + maroon: [128, 0, 0], + mediumaquamarine: [102, 205, 170], + mediumblue: [0, 0, 205], + mediumorchid: [186, 85, 211], + mediumpurple: [147, 112, 219], + mediumseagreen: [60, 179, 113], + mediumslateblue: [123, 104, 238], + mediumspringgreen: [0, 250, 154], + mediumturquoise: [72, 209, 204], + mediumvioletred: [199, 21, 133], + midnightblue: [25, 25, 112], + mintcream: [245, 255, 250], + mistyrose: [255, 228, 225], + moccasin: [255, 228, 181], + navajowhite: [255, 222, 173], + navy: [0, 0, 128], + oldlace: [253, 245, 230], + olive: [128, 128, 0], + olivedrab: [107, 142, 35], + orange: [255, 165, 0], + orangered: [255, 69, 0], + orchid: [218, 112, 214], + palegoldenrod: [238, 232, 170], + palegreen: [152, 251, 152], + paleturquoise: [175, 238, 238], + palevioletred: [219, 112, 147], + papayawhip: [255, 239, 213], + peachpuff: [255, 218, 185], + peru: [205, 133, 63], + pink: [255, 192, 203], + plum: [221, 160, 221], + powderblue: [176, 224, 230], + purple: [128, 0, 128], + red: [255, 0, 0], + rosybrown: [188, 143, 143], + royalblue: [65, 105, 225], + saddlebrown: [139, 69, 19], + salmon: [250, 128, 114], + sandybrown: [244, 164, 96], + seagreen: [46, 139, 87], + seashell: [255, 245, 238], + sienna: [160, 82, 45], + silver: [192, 192, 192], + skyblue: [135, 206, 235], + slateblue: [106, 90, 205], + slategray: [112, 128, 144], + slategrey: [112, 128, 144], + snow: [255, 250, 250], + springgreen: [0, 255, 127], + steelblue: [70, 130, 180], + tan: [210, 180, 140], + teal: [0, 128, 128], + thistle: [216, 191, 216], + tomato: [255, 99, 71], + turquoise: [64, 224, 208], + violet: [238, 130, 238], + wheat: [245, 222, 179], + white: [255, 255, 255], + whitesmoke: [245, 245, 245], + yellow: [255, 255, 0], + yellowgreen: [154, 205, 50] + }; + var setMap = function setMap2(options2) { + var obj = options2.map; + var keys2 = options2.keys; + var l = keys2.length; + for (var i3 = 0; i3 < l; i3++) { + var key = keys2[i3]; + if (plainObject(key)) { + throw Error("Tried to set map with object key"); + } + if (i3 < keys2.length - 1) { + if (obj[key] == null) { + obj[key] = {}; + } + obj = obj[key]; + } else { + obj[key] = options2.value; + } + } + }; + var getMap = function getMap2(options2) { + var obj = options2.map; + var keys2 = options2.keys; + var l = keys2.length; + for (var i3 = 0; i3 < l; i3++) { + var key = keys2[i3]; + if (plainObject(key)) { + throw Error("Tried to get map with object key"); + } + obj = obj[key]; + if (obj == null) { + return obj; + } + } + return obj; + }; + function isObject2(value2) { + var type2 = typeof value2; + return value2 != null && (type2 == "object" || type2 == "function"); + } + var isObject_12 = isObject2; + var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : {}; + function createCommonjsModule(fn2, module3) { + return module3 = { exports: {} }, fn2(module3, module3.exports), module3.exports; + } + var freeGlobal2 = typeof commonjsGlobal$1 == "object" && commonjsGlobal$1 && commonjsGlobal$1.Object === Object && commonjsGlobal$1; + var _freeGlobal = freeGlobal2; + var freeSelf2 = typeof self == "object" && self && self.Object === Object && self; + var root2 = _freeGlobal || freeSelf2 || Function("return this")(); + var _root = root2; + var now2 = function() { + return _root.Date.now(); + }; + var now_1 = now2; + var reWhitespace2 = /\s/; + function trimmedEndIndex2(string3) { + var index2 = string3.length; + while (index2-- && reWhitespace2.test(string3.charAt(index2))) { + } + return index2; + } + var _trimmedEndIndex = trimmedEndIndex2; + var reTrimStart2 = /^\s+/; + function baseTrim2(string3) { + return string3 ? string3.slice(0, _trimmedEndIndex(string3) + 1).replace(reTrimStart2, "") : string3; + } + var _baseTrim = baseTrim2; + var Symbol$12 = _root.Symbol; + var _Symbol = Symbol$12; + var objectProto$52 = Object.prototype; + var hasOwnProperty$42 = objectProto$52.hasOwnProperty; + var nativeObjectToString$12 = objectProto$52.toString; + var symToStringTag$12 = _Symbol ? _Symbol.toStringTag : void 0; + function getRawTag2(value2) { + var isOwn = hasOwnProperty$42.call(value2, symToStringTag$12), tag = value2[symToStringTag$12]; + try { + value2[symToStringTag$12] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString$12.call(value2); + if (unmasked) { + if (isOwn) { + value2[symToStringTag$12] = tag; + } else { + delete value2[symToStringTag$12]; + } + } + return result; + } + var _getRawTag = getRawTag2; + var objectProto$42 = Object.prototype; + var nativeObjectToString2 = objectProto$42.toString; + function objectToString2(value2) { + return nativeObjectToString2.call(value2); + } + var _objectToString = objectToString2; + var nullTag2 = "[object Null]", undefinedTag2 = "[object Undefined]"; + var symToStringTag2 = _Symbol ? _Symbol.toStringTag : void 0; + function baseGetTag2(value2) { + if (value2 == null) { + return value2 === void 0 ? undefinedTag2 : nullTag2; + } + return symToStringTag2 && symToStringTag2 in Object(value2) ? _getRawTag(value2) : _objectToString(value2); + } + var _baseGetTag = baseGetTag2; + function isObjectLike2(value2) { + return value2 != null && typeof value2 == "object"; + } + var isObjectLike_1 = isObjectLike2; + var symbolTag2 = "[object Symbol]"; + function isSymbol2(value2) { + return typeof value2 == "symbol" || isObjectLike_1(value2) && _baseGetTag(value2) == symbolTag2; + } + var isSymbol_1 = isSymbol2; + var NAN2 = 0 / 0; + var reIsBadHex2 = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary2 = /^0b[01]+$/i; + var reIsOctal2 = /^0o[0-7]+$/i; + var freeParseInt2 = parseInt; + function toNumber2(value2) { + if (typeof value2 == "number") { + return value2; + } + if (isSymbol_1(value2)) { + return NAN2; + } + if (isObject_12(value2)) { + var other = typeof value2.valueOf == "function" ? value2.valueOf() : value2; + value2 = isObject_12(other) ? other + "" : other; + } + if (typeof value2 != "string") { + return value2 === 0 ? value2 : +value2; + } + value2 = _baseTrim(value2); + var isBinary2 = reIsBinary2.test(value2); + return isBinary2 || reIsOctal2.test(value2) ? freeParseInt2(value2.slice(2), isBinary2 ? 2 : 8) : reIsBadHex2.test(value2) ? NAN2 : +value2; + } + var toNumber_1 = toNumber2; + var FUNC_ERROR_TEXT$1 = "Expected a function"; + var nativeMax2 = Math.max, nativeMin = Math.min; + function debounce(func, wait, options2) { + var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; + if (typeof func != "function") { + throw new TypeError(FUNC_ERROR_TEXT$1); + } + wait = toNumber_1(wait) || 0; + if (isObject_12(options2)) { + leading = !!options2.leading; + maxing = "maxWait" in options2; + maxWait = maxing ? nativeMax2(toNumber_1(options2.maxWait) || 0, wait) : maxWait; + trailing = "trailing" in options2 ? !!options2.trailing : trailing; + } + function invokeFunc(time2) { + var args = lastArgs, thisArg = lastThis; + lastArgs = lastThis = void 0; + lastInvokeTime = time2; + result = func.apply(thisArg, args); + return result; + } + function leadingEdge(time2) { + lastInvokeTime = time2; + timerId = setTimeout(timerExpired, wait); + return leading ? invokeFunc(time2) : result; + } + function remainingWait(time2) { + var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + function shouldInvoke(time2) { + var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime; + return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + } + function timerExpired() { + var time2 = now_1(); + if (shouldInvoke(time2)) { + return trailingEdge(time2); + } + timerId = setTimeout(timerExpired, remainingWait(time2)); + } + function trailingEdge(time2) { + timerId = void 0; + if (trailing && lastArgs) { + return invokeFunc(time2); + } + lastArgs = lastThis = void 0; + return result; + } + function cancel() { + if (timerId !== void 0) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = void 0; + } + function flush() { + return timerId === void 0 ? result : trailingEdge(now_1()); + } + function debounced() { + var time2 = now_1(), isInvoking = shouldInvoke(time2); + lastArgs = arguments; + lastThis = this; + lastCallTime = time2; + if (isInvoking) { + if (timerId === void 0) { + return leadingEdge(lastCallTime); + } + if (maxing) { + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === void 0) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + var debounce_1 = debounce; + var performance2 = window$1 ? window$1.performance : null; + var pnow = performance2 && performance2.now ? function() { + return performance2.now(); + } : function() { + return Date.now(); + }; + var raf = function() { + if (window$1) { + if (window$1.requestAnimationFrame) { + return function(fn2) { + window$1.requestAnimationFrame(fn2); + }; + } else if (window$1.mozRequestAnimationFrame) { + return function(fn2) { + window$1.mozRequestAnimationFrame(fn2); + }; + } else if (window$1.webkitRequestAnimationFrame) { + return function(fn2) { + window$1.webkitRequestAnimationFrame(fn2); + }; + } else if (window$1.msRequestAnimationFrame) { + return function(fn2) { + window$1.msRequestAnimationFrame(fn2); + }; + } + } + return function(fn2) { + if (fn2) { + setTimeout(function() { + fn2(pnow()); + }, 1e3 / 60); + } + }; + }(); + var requestAnimationFrame2 = function requestAnimationFrame3(fn2) { + return raf(fn2); + }; + var performanceNow = pnow; + var DEFAULT_HASH_SEED = 9261; + var K2 = 65599; + var DEFAULT_HASH_SEED_ALT = 5381; + var hashIterableInts = function hashIterableInts2(iterator) { + var seed = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_HASH_SEED; + var hash = seed; + var entry; + for (; ; ) { + entry = iterator.next(); + if (entry.done) { + break; + } + hash = hash * K2 + entry.value | 0; + } + return hash; + }; + var hashInt = function hashInt2(num) { + var seed = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_HASH_SEED; + return seed * K2 + num | 0; + }; + var hashIntAlt = function hashIntAlt2(num) { + var seed = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_HASH_SEED_ALT; + return (seed << 5) + seed + num | 0; + }; + var combineHashes = function combineHashes2(hash1, hash2) { + return hash1 * 2097152 + hash2; + }; + var combineHashesArray = function combineHashesArray2(hashes) { + return hashes[0] * 2097152 + hashes[1]; + }; + var hashArrays = function hashArrays2(hashes1, hashes2) { + return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])]; + }; + var hashIntsArray = function hashIntsArray2(ints, seed) { + var entry = { + value: 0, + done: false + }; + var i3 = 0; + var length2 = ints.length; + var iterator = { + next: function next2() { + if (i3 < length2) { + entry.value = ints[i3++]; + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashString = function hashString2(str2, seed) { + var entry = { + value: 0, + done: false + }; + var i3 = 0; + var length2 = str2.length; + var iterator = { + next: function next2() { + if (i3 < length2) { + entry.value = str2.charCodeAt(i3++); + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashStrings = function hashStrings2() { + return hashStringsArray(arguments); + }; + var hashStringsArray = function hashStringsArray2(strs) { + var hash; + for (var i3 = 0; i3 < strs.length; i3++) { + var str2 = strs[i3]; + if (i3 === 0) { + hash = hashString(str2); + } else { + hash = hashString(str2, hash); + } + } + return hash; + }; + var warningsEnabled = true; + var warnSupported = console.warn != null; + var traceSupported = console.trace != null; + var MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; + var trueify = function trueify2() { + return true; + }; + var falsify = function falsify2() { + return false; + }; + var zeroify = function zeroify2() { + return 0; + }; + var noop$12 = function noop3() { + }; + var error = function error2(msg) { + throw new Error(msg); + }; + var warnings = function warnings2(enabled) { + if (enabled !== void 0) { + warningsEnabled = !!enabled; + } else { + return warningsEnabled; + } + }; + var warn = function warn2(msg) { + if (!warnings()) { + return; + } + if (warnSupported) { + console.warn(msg); + } else { + console.log(msg); + if (traceSupported) { + console.trace(); + } + } + }; + var clone2 = function clone3(obj) { + return extend2({}, obj); + }; + var copy2 = function copy3(obj) { + if (obj == null) { + return obj; + } + if (array2(obj)) { + return obj.slice(); + } else if (plainObject(obj)) { + return clone2(obj); + } else { + return obj; + } + }; + var copyArray$1 = function copyArray3(arr) { + return arr.slice(); + }; + var uuid = function uuid2(a, b) { + for ( + // loop :) + b = a = ""; + // b - result , a - numeric letiable + a++ < 36; + // + b += a * 51 & 52 ? ( + // return a random number or 4 + (a ^ 15 ? ( + // generate a random number from 0 to 15 + 8 ^ Math.random() * (a ^ 20 ? 16 : 4) + ) : 4).toString(16) + ) : "-" + ) { + } + return b; + }; + var _staticEmptyObject = {}; + var staticEmptyObject = function staticEmptyObject2() { + return _staticEmptyObject; + }; + var defaults$g = function defaults3(_defaults) { + var keys2 = Object.keys(_defaults); + return function(opts) { + var filledOpts = {}; + for (var i3 = 0; i3 < keys2.length; i3++) { + var key = keys2[i3]; + var optVal = opts == null ? void 0 : opts[key]; + filledOpts[key] = optVal === void 0 ? _defaults[key] : optVal; + } + return filledOpts; + }; + }; + var removeFromArray = function removeFromArray2(arr, ele, oneCopy) { + for (var i3 = arr.length - 1; i3 >= 0; i3--) { + if (arr[i3] === ele) { + arr.splice(i3, 1); + if (oneCopy) { + break; + } + } + } + }; + var clearArray = function clearArray2(arr) { + arr.splice(0, arr.length); + }; + var push2 = function push3(arr, otherArr) { + for (var i3 = 0; i3 < otherArr.length; i3++) { + var el = otherArr[i3]; + arr.push(el); + } + }; + var getPrefixedProperty = function getPrefixedProperty2(obj, propName, prefix) { + if (prefix) { + propName = prependCamel(prefix, propName); + } + return obj[propName]; + }; + var setPrefixedProperty = function setPrefixedProperty2(obj, propName, prefix, value2) { + if (prefix) { + propName = prependCamel(prefix, propName); + } + obj[propName] = value2; + }; + var ObjectMap = /* @__PURE__ */ function() { + function ObjectMap2() { + _classCallCheck(this, ObjectMap2); + this._obj = {}; + } + _createClass(ObjectMap2, [{ + key: "set", + value: function set3(key, val) { + this._obj[key] = val; + return this; + } + }, { + key: "delete", + value: function _delete(key) { + this._obj[key] = void 0; + return this; + } + }, { + key: "clear", + value: function clear2() { + this._obj = {}; + } + }, { + key: "has", + value: function has2(key) { + return this._obj[key] !== void 0; + } + }, { + key: "get", + value: function get3(key) { + return this._obj[key]; + } + }]); + return ObjectMap2; + }(); + var Map$22 = typeof Map !== "undefined" ? Map : ObjectMap; + var undef = "undefined"; + var ObjectSet = /* @__PURE__ */ function() { + function ObjectSet2(arrayOrObjectSet) { + _classCallCheck(this, ObjectSet2); + this._obj = /* @__PURE__ */ Object.create(null); + this.size = 0; + if (arrayOrObjectSet != null) { + var arr; + if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) { + arr = arrayOrObjectSet.toArray(); + } else { + arr = arrayOrObjectSet; + } + for (var i3 = 0; i3 < arr.length; i3++) { + this.add(arr[i3]); + } + } + } + _createClass(ObjectSet2, [{ + key: "instanceString", + value: function instanceString() { + return "set"; + } + }, { + key: "add", + value: function add(val) { + var o = this._obj; + if (o[val] !== 1) { + o[val] = 1; + this.size++; + } + } + }, { + key: "delete", + value: function _delete(val) { + var o = this._obj; + if (o[val] === 1) { + o[val] = 0; + this.size--; + } + } + }, { + key: "clear", + value: function clear2() { + this._obj = /* @__PURE__ */ Object.create(null); + } + }, { + key: "has", + value: function has2(val) { + return this._obj[val] === 1; + } + }, { + key: "toArray", + value: function toArray2() { + var _this = this; + return Object.keys(this._obj).filter(function(key) { + return _this.has(key); + }); + } + }, { + key: "forEach", + value: function forEach2(callback, thisArg) { + return this.toArray().forEach(callback, thisArg); + } + }]); + return ObjectSet2; + }(); + var Set$12 = (typeof Set === "undefined" ? "undefined" : _typeof(Set)) !== undef ? Set : ObjectSet; + var Element = function Element2(cy, params) { + var restore = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; + if (cy === void 0 || params === void 0 || !core2(cy)) { + error("An element must have a core reference and parameters set"); + return; + } + var group = params.group; + if (group == null) { + if (params.data && params.data.source != null && params.data.target != null) { + group = "edges"; + } else { + group = "nodes"; + } + } + if (group !== "nodes" && group !== "edges") { + error("An element must be of type `nodes` or `edges`; you specified `" + group + "`"); + return; + } + this.length = 1; + this[0] = this; + var _p = this._private = { + cy, + single: true, + // indicates this is an element + data: params.data || {}, + // data object + position: params.position || { + x: 0, + y: 0 + }, + // (x, y) position pair + autoWidth: void 0, + // width and height of nodes calculated by the renderer when set to special 'auto' value + autoHeight: void 0, + autoPadding: void 0, + compoundBoundsClean: false, + // whether the compound dimensions need to be recalculated the next time dimensions are read + listeners: [], + // array of bound listeners + group, + // string; 'nodes' or 'edges' + style: {}, + // properties as set by the style + rstyle: {}, + // properties for style sent from the renderer to the core + styleCxts: [], + // applied style contexts from the styler + styleKeys: {}, + // per-group keys of style property values + removed: true, + // whether it's inside the vis; true if removed (set true here since we call restore) + selected: params.selected ? true : false, + // whether it's selected + selectable: params.selectable === void 0 ? true : params.selectable ? true : false, + // whether it's selectable + locked: params.locked ? true : false, + // whether the element is locked (cannot be moved) + grabbed: false, + // whether the element is grabbed by the mouse; renderer sets this privately + grabbable: params.grabbable === void 0 ? true : params.grabbable ? true : false, + // whether the element can be grabbed + pannable: params.pannable === void 0 ? group === "edges" ? true : false : params.pannable ? true : false, + // whether the element has passthrough panning enabled + active: false, + // whether the element is active from user interaction + classes: new Set$12(), + // map ( className => true ) + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + rscratch: {}, + // object in which the renderer can store information + scratch: params.scratch || {}, + // scratch objects + edges: [], + // array of connected edges + children: [], + // array of children + parent: params.parent && params.parent.isNode() ? params.parent : null, + // parent ref + traversalCache: {}, + // cache of output of traversal functions + backgrounding: false, + // whether background images are loading + bbCache: null, + // cache of the current bounding box + bbCacheShift: { + x: 0, + y: 0 + }, + // shift applied to cached bb to be applied on next get + bodyBounds: null, + // bounds cache of element body, w/o overlay + overlayBounds: null, + // bounds cache of element body, including overlay + labelBounds: { + // bounds cache of labels + all: null, + source: null, + target: null, + main: null + }, + arrowBounds: { + // bounds cache of edge arrows + source: null, + target: null, + "mid-source": null, + "mid-target": null + } + }; + if (_p.position.x == null) { + _p.position.x = 0; + } + if (_p.position.y == null) { + _p.position.y = 0; + } + if (params.renderedPosition) { + var rpos = params.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + _p.position = { + x: (rpos.x - pan.x) / zoom, + y: (rpos.y - pan.y) / zoom + }; + } + var classes2 = []; + if (array2(params.classes)) { + classes2 = params.classes; + } else if (string2(params.classes)) { + classes2 = params.classes.split(/\s+/); + } + for (var i3 = 0, l = classes2.length; i3 < l; i3++) { + var cls = classes2[i3]; + if (!cls || cls === "") { + continue; + } + _p.classes.add(cls); + } + this.createEmitter(); + var bypass = params.style || params.css; + if (bypass) { + warn("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."); + this.style(bypass); + } + if (restore === void 0 || restore) { + this.restore(); + } + }; + var defineSearch = function defineSearch2(params) { + params = { + bfs: params.bfs || !params.dfs, + dfs: params.dfs || !params.bfs + }; + return function searchFn(roots, fn2, directed) { + var options2; + if (plainObject(roots) && !elementOrCollection(roots)) { + options2 = roots; + roots = options2.roots || options2.root; + fn2 = options2.visit; + directed = options2.directed; + } + directed = arguments.length === 2 && !fn$6(fn2) ? fn2 : directed; + fn2 = fn$6(fn2) ? fn2 : function() { + }; + var cy = this._private.cy; + var v = roots = string2(roots) ? this.filter(roots) : roots; + var Q = []; + var connectedNodes = []; + var connectedBy = {}; + var id2depth = {}; + var V = {}; + var j = 0; + var found; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges2 = _this$byGroup.edges; + for (var i3 = 0; i3 < v.length; i3++) { + var vi = v[i3]; + var viId = vi.id(); + if (vi.isNode()) { + Q.unshift(vi); + if (params.bfs) { + V[viId] = true; + connectedNodes.push(vi); + } + id2depth[viId] = 0; + } + } + var _loop = function _loop2() { + var v2 = params.bfs ? Q.shift() : Q.pop(); + var vId = v2.id(); + if (params.dfs) { + if (V[vId]) { + return "continue"; + } + V[vId] = true; + connectedNodes.push(v2); + } + var depth = id2depth[vId]; + var prevEdge = connectedBy[vId]; + var src = prevEdge != null ? prevEdge.source() : null; + var tgt = prevEdge != null ? prevEdge.target() : null; + var prevNode = prevEdge == null ? void 0 : v2.same(src) ? tgt[0] : src[0]; + var ret = void 0; + ret = fn2(v2, prevEdge, prevNode, j++, depth); + if (ret === true) { + found = v2; + return "break"; + } + if (ret === false) { + return "break"; + } + var vwEdges = v2.connectedEdges().filter(function(e3) { + return (!directed || e3.source().same(v2)) && edges2.has(e3); + }); + for (var _i2 = 0; _i2 < vwEdges.length; _i2++) { + var e = vwEdges[_i2]; + var w2 = e.connectedNodes().filter(function(n) { + return !n.same(v2) && nodes2.has(n); + }); + var wId = w2.id(); + if (w2.length !== 0 && !V[wId]) { + w2 = w2[0]; + Q.push(w2); + if (params.bfs) { + V[wId] = true; + connectedNodes.push(w2); + } + connectedBy[wId] = e; + id2depth[wId] = id2depth[vId] + 1; + } + } + }; + while (Q.length !== 0) { + var _ret = _loop(); + if (_ret === "continue") + continue; + if (_ret === "break") + break; + } + var connectedEles = cy.collection(); + for (var _i = 0; _i < connectedNodes.length; _i++) { + var node2 = connectedNodes[_i]; + var edge = connectedBy[node2.id()]; + if (edge != null) { + connectedEles.push(edge); + } + connectedEles.push(node2); + } + return { + path: cy.collection(connectedEles), + found: cy.collection(found) + }; + }; + }; + var elesfn$v = { + breadthFirstSearch: defineSearch({ + bfs: true + }), + depthFirstSearch: defineSearch({ + dfs: true + }) + }; + elesfn$v.bfs = elesfn$v.breadthFirstSearch; + elesfn$v.dfs = elesfn$v.depthFirstSearch; + var heap$1 = createCommonjsModule(function(module3, exports3) { + (function() { + var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min3, nlargest, nsmallest, updateItem, _siftdown, _siftup; + floor = Math.floor, min3 = Math.min; + defaultCmp = function(x2, y2) { + if (x2 < y2) { + return -1; + } + if (x2 > y2) { + return 1; + } + return 0; + }; + insort = function(a, x2, lo, hi, cmp) { + var mid; + if (lo == null) { + lo = 0; + } + if (cmp == null) { + cmp = defaultCmp; + } + if (lo < 0) { + throw new Error("lo must be non-negative"); + } + if (hi == null) { + hi = a.length; + } + while (lo < hi) { + mid = floor((lo + hi) / 2); + if (cmp(x2, a[mid]) < 0) { + hi = mid; + } else { + lo = mid + 1; + } + } + return [].splice.apply(a, [lo, lo - lo].concat(x2)), x2; + }; + heappush = function(array3, item, cmp) { + if (cmp == null) { + cmp = defaultCmp; + } + array3.push(item); + return _siftdown(array3, 0, array3.length - 1, cmp); + }; + heappop = function(array3, cmp) { + var lastelt, returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + lastelt = array3.pop(); + if (array3.length) { + returnitem = array3[0]; + array3[0] = lastelt; + _siftup(array3, 0, cmp); + } else { + returnitem = lastelt; + } + return returnitem; + }; + heapreplace = function(array3, item, cmp) { + var returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + returnitem = array3[0]; + array3[0] = item; + _siftup(array3, 0, cmp); + return returnitem; + }; + heappushpop = function(array3, item, cmp) { + var _ref; + if (cmp == null) { + cmp = defaultCmp; + } + if (array3.length && cmp(array3[0], item) < 0) { + _ref = [array3[0], item], item = _ref[0], array3[0] = _ref[1]; + _siftup(array3, 0, cmp); + } + return item; + }; + heapify = function(array3, cmp) { + var i3, _i, _len, _ref1, _results, _results1; + if (cmp == null) { + cmp = defaultCmp; + } + _ref1 = function() { + _results1 = []; + for (var _j = 0, _ref = floor(array3.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--) { + _results1.push(_j); + } + return _results1; + }.apply(this).reverse(); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + i3 = _ref1[_i]; + _results.push(_siftup(array3, i3, cmp)); + } + return _results; + }; + updateItem = function(array3, item, cmp) { + var pos; + if (cmp == null) { + cmp = defaultCmp; + } + pos = array3.indexOf(item); + if (pos === -1) { + return; + } + _siftdown(array3, 0, pos, cmp); + return _siftup(array3, pos, cmp); + }; + nlargest = function(array3, n, cmp) { + var elem, result, _i, _len, _ref; + if (cmp == null) { + cmp = defaultCmp; + } + result = array3.slice(0, n); + if (!result.length) { + return result; + } + heapify(result, cmp); + _ref = array3.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + heappushpop(result, elem, cmp); + } + return result.sort(cmp).reverse(); + }; + nsmallest = function(array3, n, cmp) { + var elem, los, result, _i, _j, _len, _ref, _ref1, _results; + if (cmp == null) { + cmp = defaultCmp; + } + if (n * 10 <= array3.length) { + result = array3.slice(0, n).sort(cmp); + if (!result.length) { + return result; + } + los = result[result.length - 1]; + _ref = array3.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + if (cmp(elem, los) < 0) { + insort(result, elem, 0, null, cmp); + result.pop(); + los = result[result.length - 1]; + } + } + return result; + } + heapify(array3, cmp); + _results = []; + for (_j = 0, _ref1 = min3(n, array3.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; 0 <= _ref1 ? ++_j : --_j) { + _results.push(heappop(array3, cmp)); + } + return _results; + }; + _siftdown = function(array3, startpos, pos, cmp) { + var newitem, parent, parentpos; + if (cmp == null) { + cmp = defaultCmp; + } + newitem = array3[pos]; + while (pos > startpos) { + parentpos = pos - 1 >> 1; + parent = array3[parentpos]; + if (cmp(newitem, parent) < 0) { + array3[pos] = parent; + pos = parentpos; + continue; + } + break; + } + return array3[pos] = newitem; + }; + _siftup = function(array3, pos, cmp) { + var childpos, endpos, newitem, rightpos, startpos; + if (cmp == null) { + cmp = defaultCmp; + } + endpos = array3.length; + startpos = pos; + newitem = array3[pos]; + childpos = 2 * pos + 1; + while (childpos < endpos) { + rightpos = childpos + 1; + if (rightpos < endpos && !(cmp(array3[childpos], array3[rightpos]) < 0)) { + childpos = rightpos; + } + array3[pos] = array3[childpos]; + pos = childpos; + childpos = 2 * pos + 1; + } + array3[pos] = newitem; + return _siftdown(array3, startpos, pos, cmp); + }; + Heap = function() { + Heap2.push = heappush; + Heap2.pop = heappop; + Heap2.replace = heapreplace; + Heap2.pushpop = heappushpop; + Heap2.heapify = heapify; + Heap2.updateItem = updateItem; + Heap2.nlargest = nlargest; + Heap2.nsmallest = nsmallest; + function Heap2(cmp) { + this.cmp = cmp != null ? cmp : defaultCmp; + this.nodes = []; + } + Heap2.prototype.push = function(x2) { + return heappush(this.nodes, x2, this.cmp); + }; + Heap2.prototype.pop = function() { + return heappop(this.nodes, this.cmp); + }; + Heap2.prototype.peek = function() { + return this.nodes[0]; + }; + Heap2.prototype.contains = function(x2) { + return this.nodes.indexOf(x2) !== -1; + }; + Heap2.prototype.replace = function(x2) { + return heapreplace(this.nodes, x2, this.cmp); + }; + Heap2.prototype.pushpop = function(x2) { + return heappushpop(this.nodes, x2, this.cmp); + }; + Heap2.prototype.heapify = function() { + return heapify(this.nodes, this.cmp); + }; + Heap2.prototype.updateItem = function(x2) { + return updateItem(this.nodes, x2, this.cmp); + }; + Heap2.prototype.clear = function() { + return this.nodes = []; + }; + Heap2.prototype.empty = function() { + return this.nodes.length === 0; + }; + Heap2.prototype.size = function() { + return this.nodes.length; + }; + Heap2.prototype.clone = function() { + var heap2; + heap2 = new Heap2(); + heap2.nodes = this.nodes.slice(0); + return heap2; + }; + Heap2.prototype.toArray = function() { + return this.nodes.slice(0); + }; + Heap2.prototype.insert = Heap2.prototype.push; + Heap2.prototype.top = Heap2.prototype.peek; + Heap2.prototype.front = Heap2.prototype.peek; + Heap2.prototype.has = Heap2.prototype.contains; + Heap2.prototype.copy = Heap2.prototype.clone; + return Heap2; + }(); + (function(root3, factory) { + { + return module3.exports = factory(); + } + })(this, function() { + return Heap; + }); + }).call(commonjsGlobal$1); + }); + var heap = heap$1; + var dijkstraDefaults = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$u = { + dijkstra: function dijkstra(options2) { + if (!plainObject(options2)) { + var args = arguments; + options2 = { + root: args[0], + weight: args[1], + directed: args[2] + }; + } + var _dijkstraDefaults = dijkstraDefaults(options2), root3 = _dijkstraDefaults.root, weight = _dijkstraDefaults.weight, directed = _dijkstraDefaults.directed; + var eles = this; + var weightFn = weight; + var source = string2(root3) ? this.filter(root3)[0] : root3[0]; + var dist3 = {}; + var prev2 = {}; + var knownDist = {}; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges2 = _this$byGroup.edges; + edges2.unmergeBy(function(ele) { + return ele.isLoop(); + }); + var getDist2 = function getDist3(node3) { + return dist3[node3.id()]; + }; + var setDist = function setDist2(node3, d) { + dist3[node3.id()] = d; + Q.updateItem(node3); + }; + var Q = new heap(function(a, b) { + return getDist2(a) - getDist2(b); + }); + for (var i3 = 0; i3 < nodes2.length; i3++) { + var node2 = nodes2[i3]; + dist3[node2.id()] = node2.same(source) ? 0 : Infinity; + Q.push(node2); + } + var distBetween = function distBetween2(u2, v2) { + var uvs = (directed ? u2.edgesTo(v2) : u2.edgesWith(v2)).intersect(edges2); + var smallestDistance = Infinity; + var smallestEdge; + for (var _i = 0; _i < uvs.length; _i++) { + var edge = uvs[_i]; + var _weight = weightFn(edge); + if (_weight < smallestDistance || !smallestEdge) { + smallestDistance = _weight; + smallestEdge = edge; + } + } + return { + edge: smallestEdge, + dist: smallestDistance + }; + }; + while (Q.size() > 0) { + var u = Q.pop(); + var smalletsDist = getDist2(u); + var uid = u.id(); + knownDist[uid] = smalletsDist; + if (smalletsDist === Infinity) { + continue; + } + var neighbors = u.neighborhood().intersect(nodes2); + for (var _i2 = 0; _i2 < neighbors.length; _i2++) { + var v = neighbors[_i2]; + var vid = v.id(); + var vDist = distBetween(u, v); + var alt = smalletsDist + vDist.dist; + if (alt < getDist2(v)) { + setDist(v, alt); + prev2[vid] = { + node: u, + edge: vDist.edge + }; + } + } + } + return { + distanceTo: function distanceTo(node3) { + var target = string2(node3) ? nodes2.filter(node3)[0] : node3[0]; + return knownDist[target.id()]; + }, + pathTo: function pathTo(node3) { + var target = string2(node3) ? nodes2.filter(node3)[0] : node3[0]; + var S = []; + var u2 = target; + var uid2 = u2.id(); + if (target.length > 0) { + S.unshift(target); + while (prev2[uid2]) { + var p2 = prev2[uid2]; + S.unshift(p2.edge); + S.unshift(p2.node); + u2 = p2.node; + uid2 = u2.id(); + } + } + return eles.spawn(S); + } + }; + } + }; + var elesfn$t = { + // kruskal's algorithm (finds min spanning tree, assuming undirected graph) + // implemented from pseudocode from wikipedia + kruskal: function kruskal(weightFn) { + weightFn = weightFn || function(edge2) { + return 1; + }; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges2 = _this$byGroup.edges; + var numNodes = nodes2.length; + var forest = new Array(numNodes); + var A = nodes2; + var findSetIndex = function findSetIndex2(ele) { + for (var i4 = 0; i4 < forest.length; i4++) { + var eles = forest[i4]; + if (eles.has(ele)) { + return i4; + } + } + }; + for (var i3 = 0; i3 < numNodes; i3++) { + forest[i3] = this.spawn(nodes2[i3]); + } + var S = edges2.sort(function(a, b) { + return weightFn(a) - weightFn(b); + }); + for (var _i = 0; _i < S.length; _i++) { + var edge = S[_i]; + var u = edge.source()[0]; + var v = edge.target()[0]; + var setUIndex = findSetIndex(u); + var setVIndex = findSetIndex(v); + var setU = forest[setUIndex]; + var setV = forest[setVIndex]; + if (setUIndex !== setVIndex) { + A.merge(edge); + setU.merge(setV); + forest.splice(setVIndex, 1); + } + } + return A; + } + }; + var aStarDefaults = defaults$g({ + root: null, + goal: null, + weight: function weight(edge) { + return 1; + }, + heuristic: function heuristic(edge) { + return 0; + }, + directed: false + }); + var elesfn$s = { + // Implemented from pseudocode from wikipedia + aStar: function aStar(options2) { + var cy = this.cy(); + var _aStarDefaults = aStarDefaults(options2), root3 = _aStarDefaults.root, goal = _aStarDefaults.goal, heuristic = _aStarDefaults.heuristic, directed = _aStarDefaults.directed, weight = _aStarDefaults.weight; + root3 = cy.collection(root3)[0]; + goal = cy.collection(goal)[0]; + var sid = root3.id(); + var tid = goal.id(); + var gScore = {}; + var fScore = {}; + var closedSetIds = {}; + var openSet = new heap(function(a, b) { + return fScore[a.id()] - fScore[b.id()]; + }); + var openSetIds = new Set$12(); + var cameFrom = {}; + var cameFromEdge = {}; + var addToOpenSet = function addToOpenSet2(ele, id2) { + openSet.push(ele); + openSetIds.add(id2); + }; + var cMin, cMinId; + var popFromOpenSet = function popFromOpenSet2() { + cMin = openSet.pop(); + cMinId = cMin.id(); + openSetIds["delete"](cMinId); + }; + var isInOpenSet = function isInOpenSet2(id2) { + return openSetIds.has(id2); + }; + addToOpenSet(root3, sid); + gScore[sid] = 0; + fScore[sid] = heuristic(root3); + var steps = 0; + while (openSet.size() > 0) { + popFromOpenSet(); + steps++; + if (cMinId === tid) { + var path2 = []; + var pathNode = goal; + var pathNodeId = tid; + var pathEdge = cameFromEdge[pathNodeId]; + for (; ; ) { + path2.unshift(pathNode); + if (pathEdge != null) { + path2.unshift(pathEdge); + } + pathNode = cameFrom[pathNodeId]; + if (pathNode == null) { + break; + } + pathNodeId = pathNode.id(); + pathEdge = cameFromEdge[pathNodeId]; + } + return { + found: true, + distance: gScore[cMinId], + path: this.spawn(path2), + steps + }; + } + closedSetIds[cMinId] = true; + var vwEdges = cMin._private.edges; + for (var i3 = 0; i3 < vwEdges.length; i3++) { + var e = vwEdges[i3]; + if (!this.hasElementWithId(e.id())) { + continue; + } + if (directed && e.data("source") !== cMinId) { + continue; + } + var wSrc = e.source(); + var wTgt = e.target(); + var w2 = wSrc.id() !== cMinId ? wSrc : wTgt; + var wid = w2.id(); + if (!this.hasElementWithId(wid)) { + continue; + } + if (closedSetIds[wid]) { + continue; + } + var tempScore = gScore[cMinId] + weight(e); + if (!isInOpenSet(wid)) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w2); + addToOpenSet(w2, wid); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + continue; + } + if (tempScore < gScore[wid]) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w2); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + } + } + } + return { + found: false, + distance: void 0, + path: void 0, + steps + }; + } + }; + var floydWarshallDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$r = { + // Implemented from pseudocode from wikipedia + floydWarshall: function floydWarshall(options2) { + var cy = this.cy(); + var _floydWarshallDefault = floydWarshallDefaults(options2), weight = _floydWarshallDefault.weight, directed = _floydWarshallDefault.directed; + var weightFn = weight; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges2 = _this$byGroup.edges; + var N = nodes2.length; + var Nsq = N * N; + var indexOf = function indexOf2(node2) { + return nodes2.indexOf(node2); + }; + var atIndex = function atIndex2(i4) { + return nodes2[i4]; + }; + var dist3 = new Array(Nsq); + for (var n = 0; n < Nsq; n++) { + var j = n % N; + var i3 = (n - j) / N; + if (i3 === j) { + dist3[n] = 0; + } else { + dist3[n] = Infinity; + } + } + var next2 = new Array(Nsq); + var edgeNext = new Array(Nsq); + for (var _i = 0; _i < edges2.length; _i++) { + var edge = edges2[_i]; + var src = edge.source()[0]; + var tgt = edge.target()[0]; + if (src === tgt) { + continue; + } + var s = indexOf(src); + var t = indexOf(tgt); + var st = s * N + t; + var _weight = weightFn(edge); + if (dist3[st] > _weight) { + dist3[st] = _weight; + next2[st] = t; + edgeNext[st] = edge; + } + if (!directed) { + var ts = t * N + s; + if (!directed && dist3[ts] > _weight) { + dist3[ts] = _weight; + next2[ts] = s; + edgeNext[ts] = edge; + } + } + } + for (var k = 0; k < N; k++) { + for (var _i2 = 0; _i2 < N; _i2++) { + var ik = _i2 * N + k; + for (var _j = 0; _j < N; _j++) { + var ij = _i2 * N + _j; + var kj = k * N + _j; + if (dist3[ik] + dist3[kj] < dist3[ij]) { + dist3[ij] = dist3[ik] + dist3[kj]; + next2[ij] = next2[ik]; + } + } + } + } + var getArgEle = function getArgEle2(ele) { + return (string2(ele) ? cy.filter(ele) : ele)[0]; + }; + var indexOfArgEle = function indexOfArgEle2(ele) { + return indexOf(getArgEle(ele)); + }; + var res = { + distance: function distance2(from2, to) { + var i4 = indexOfArgEle(from2); + var j2 = indexOfArgEle(to); + return dist3[i4 * N + j2]; + }, + path: function path2(from2, to) { + var i4 = indexOfArgEle(from2); + var j2 = indexOfArgEle(to); + var fromNode = atIndex(i4); + if (i4 === j2) { + return fromNode.collection(); + } + if (next2[i4 * N + j2] == null) { + return cy.collection(); + } + var path3 = cy.collection(); + var prev2 = i4; + var edge2; + path3.merge(fromNode); + while (i4 !== j2) { + prev2 = i4; + i4 = next2[i4 * N + j2]; + edge2 = edgeNext[prev2 * N + i4]; + path3.merge(edge2); + path3.merge(atIndex(i4)); + } + return path3; + } + }; + return res; + } + // floydWarshall + }; + var bellmanFordDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false, + root: null + }); + var elesfn$q = { + // Implemented from pseudocode from wikipedia + bellmanFord: function bellmanFord(options2) { + var _this = this; + var _bellmanFordDefaults = bellmanFordDefaults(options2), weight = _bellmanFordDefaults.weight, directed = _bellmanFordDefaults.directed, root3 = _bellmanFordDefaults.root; + var weightFn = weight; + var eles = this; + var cy = this.cy(); + var _this$byGroup = this.byGroup(), edges2 = _this$byGroup.edges, nodes2 = _this$byGroup.nodes; + var numNodes = nodes2.length; + var infoMap = new Map$22(); + var hasNegativeWeightCycle = false; + var negativeWeightCycles = []; + root3 = cy.collection(root3)[0]; + edges2.unmergeBy(function(edge2) { + return edge2.isLoop(); + }); + var numEdges = edges2.length; + var getInfo3 = function getInfo4(node3) { + var obj = infoMap.get(node3.id()); + if (!obj) { + obj = {}; + infoMap.set(node3.id(), obj); + } + return obj; + }; + var getNodeFromTo = function getNodeFromTo2(to) { + return (string2(to) ? cy.$(to) : to)[0]; + }; + var distanceTo = function distanceTo2(to) { + return getInfo3(getNodeFromTo(to)).dist; + }; + var pathTo = function pathTo2(to) { + var thisStart = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : root3; + var end2 = getNodeFromTo(to); + var path2 = []; + var node3 = end2; + for (; ; ) { + if (node3 == null) { + return _this.spawn(); + } + var _getInfo = getInfo3(node3), edge2 = _getInfo.edge, pred = _getInfo.pred; + path2.unshift(node3[0]); + if (node3.same(thisStart) && path2.length > 0) { + break; + } + if (edge2 != null) { + path2.unshift(edge2); + } + node3 = pred; + } + return eles.spawn(path2); + }; + for (var i3 = 0; i3 < numNodes; i3++) { + var node2 = nodes2[i3]; + var info2 = getInfo3(node2); + if (node2.same(root3)) { + info2.dist = 0; + } else { + info2.dist = Infinity; + } + info2.pred = null; + info2.edge = null; + } + var replacedEdge = false; + var checkForEdgeReplacement = function checkForEdgeReplacement2(node1, node22, edge2, info1, info22, weight2) { + var dist3 = info1.dist + weight2; + if (dist3 < info22.dist && !edge2.same(info1.edge)) { + info22.dist = dist3; + info22.pred = node1; + info22.edge = edge2; + replacedEdge = true; + } + }; + for (var _i = 1; _i < numNodes; _i++) { + replacedEdge = false; + for (var e = 0; e < numEdges; e++) { + var edge = edges2[e]; + var src = edge.source(); + var tgt = edge.target(); + var _weight = weightFn(edge); + var srcInfo = getInfo3(src); + var tgtInfo = getInfo3(tgt); + checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight); + if (!directed) { + checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight); + } + } + if (!replacedEdge) { + break; + } + } + if (replacedEdge) { + var negativeWeightCycleIds = []; + for (var _e = 0; _e < numEdges; _e++) { + var _edge = edges2[_e]; + var _src = _edge.source(); + var _tgt = _edge.target(); + var _weight2 = weightFn(_edge); + var srcDist = getInfo3(_src).dist; + var tgtDist = getInfo3(_tgt).dist; + if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) { + if (!hasNegativeWeightCycle) { + warn("Graph contains a negative weight cycle for Bellman-Ford"); + hasNegativeWeightCycle = true; + } + if (options2.findNegativeWeightCycles !== false) { + var negativeNodes = []; + if (srcDist + _weight2 < tgtDist) { + negativeNodes.push(_src); + } + if (!directed && tgtDist + _weight2 < srcDist) { + negativeNodes.push(_tgt); + } + var numNegativeNodes = negativeNodes.length; + for (var n = 0; n < numNegativeNodes; n++) { + var start2 = negativeNodes[n]; + var cycle = [start2]; + cycle.push(getInfo3(start2).edge); + var _node = getInfo3(start2).pred; + while (cycle.indexOf(_node) === -1) { + cycle.push(_node); + cycle.push(getInfo3(_node).edge); + _node = getInfo3(_node).pred; + } + cycle = cycle.slice(cycle.indexOf(_node)); + var smallestId = cycle[0].id(); + var smallestIndex = 0; + for (var c2 = 2; c2 < cycle.length; c2 += 2) { + if (cycle[c2].id() < smallestId) { + smallestId = cycle[c2].id(); + smallestIndex = c2; + } + } + cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex)); + cycle.push(cycle[0]); + var cycleId = cycle.map(function(el) { + return el.id(); + }).join(","); + if (negativeWeightCycleIds.indexOf(cycleId) === -1) { + negativeWeightCycles.push(eles.spawn(cycle)); + negativeWeightCycleIds.push(cycleId); + } + } + } else { + break; + } + } + } + } + return { + distanceTo, + pathTo, + hasNegativeWeightCycle, + negativeWeightCycles + }; + } + // bellmanFord + }; + var sqrt2 = Math.sqrt(2); + var collapse = function collapse2(edgeIndex, nodeMap, remainingEdges) { + if (remainingEdges.length === 0) { + error("Karger-Stein must be run on a connected (sub)graph"); + } + var edgeInfo = remainingEdges[edgeIndex]; + var sourceIn = edgeInfo[1]; + var targetIn = edgeInfo[2]; + var partition1 = nodeMap[sourceIn]; + var partition2 = nodeMap[targetIn]; + var newEdges = remainingEdges; + for (var i3 = newEdges.length - 1; i3 >= 0; i3--) { + var edge = newEdges[i3]; + var src = edge[1]; + var tgt = edge[2]; + if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) { + newEdges.splice(i3, 1); + } + } + for (var _i = 0; _i < newEdges.length; _i++) { + var _edge = newEdges[_i]; + if (_edge[1] === partition2) { + newEdges[_i] = _edge.slice(); + newEdges[_i][1] = partition1; + } else if (_edge[2] === partition2) { + newEdges[_i] = _edge.slice(); + newEdges[_i][2] = partition1; + } + } + for (var _i2 = 0; _i2 < nodeMap.length; _i2++) { + if (nodeMap[_i2] === partition2) { + nodeMap[_i2] = partition1; + } + } + return newEdges; + }; + var contractUntil = function contractUntil2(metaNodeMap, remainingEdges, size2, sizeLimit) { + while (size2 > sizeLimit) { + var edgeIndex = Math.floor(Math.random() * remainingEdges.length); + remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges); + size2--; + } + return remainingEdges; + }; + var elesfn$p = { + // Computes the minimum cut of an undirected graph + // Returns the correct answer with high probability + kargerStein: function kargerStein() { + var _this = this; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges2 = _this$byGroup.edges; + edges2.unmergeBy(function(edge) { + return edge.isLoop(); + }); + var numNodes = nodes2.length; + var numEdges = edges2.length; + var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2)); + var stopSize = Math.floor(numNodes / sqrt2); + if (numNodes < 2) { + error("At least 2 nodes are required for Karger-Stein algorithm"); + return void 0; + } + var edgeIndexes = []; + for (var i3 = 0; i3 < numEdges; i3++) { + var e = edges2[i3]; + edgeIndexes.push([i3, nodes2.indexOf(e.source()), nodes2.indexOf(e.target())]); + } + var minCutSize = Infinity; + var minCutEdgeIndexes = []; + var minCutNodeMap = new Array(numNodes); + var metaNodeMap = new Array(numNodes); + var metaNodeMap2 = new Array(numNodes); + var copyNodesMap = function copyNodesMap2(from2, to) { + for (var _i3 = 0; _i3 < numNodes; _i3++) { + to[_i3] = from2[_i3]; + } + }; + for (var iter = 0; iter <= numIter; iter++) { + for (var _i4 = 0; _i4 < numNodes; _i4++) { + metaNodeMap[_i4] = _i4; + } + var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize); + var edgesState2 = edgesState.slice(); + copyNodesMap(metaNodeMap, metaNodeMap2); + var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2); + var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2); + if (res1.length <= res2.length && res1.length < minCutSize) { + minCutSize = res1.length; + minCutEdgeIndexes = res1; + copyNodesMap(metaNodeMap, minCutNodeMap); + } else if (res2.length <= res1.length && res2.length < minCutSize) { + minCutSize = res2.length; + minCutEdgeIndexes = res2; + copyNodesMap(metaNodeMap2, minCutNodeMap); + } + } + var cut = this.spawn(minCutEdgeIndexes.map(function(e3) { + return edges2[e3[0]]; + })); + var partition1 = this.spawn(); + var partition2 = this.spawn(); + var witnessNodePartition = minCutNodeMap[0]; + for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) { + var partitionId = minCutNodeMap[_i5]; + var node2 = nodes2[_i5]; + if (partitionId === witnessNodePartition) { + partition1.merge(node2); + } else { + partition2.merge(node2); + } + } + var constructComponent = function constructComponent2(subset) { + var component = _this.spawn(); + subset.forEach(function(node3) { + component.merge(node3); + node3.connectedEdges().forEach(function(edge) { + if (_this.contains(edge) && !cut.contains(edge)) { + component.merge(edge); + } + }); + }); + return component; + }; + var components = [constructComponent(partition1), constructComponent(partition2)]; + var ret = { + cut, + components, + // n.b. partitions are included to be compatible with the old api spec + // (could be removed in a future major version) + partition1, + partition2 + }; + return ret; + } + }; + var copyPosition = function copyPosition2(p2) { + return { + x: p2.x, + y: p2.y + }; + }; + var modelToRenderedPosition = function modelToRenderedPosition2(p2, zoom, pan) { + return { + x: p2.x * zoom + pan.x, + y: p2.y * zoom + pan.y + }; + }; + var renderedToModelPosition = function renderedToModelPosition2(p2, zoom, pan) { + return { + x: (p2.x - pan.x) / zoom, + y: (p2.y - pan.y) / zoom + }; + }; + var array2point = function array2point2(arr) { + return { + x: arr[0], + y: arr[1] + }; + }; + var min2 = function min3(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var min4 = Infinity; + for (var i3 = begin; i3 < end2; i3++) { + var val = arr[i3]; + if (isFinite(val)) { + min4 = Math.min(val, min4); + } + } + return min4; + }; + var max2 = function max3(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var max4 = -Infinity; + for (var i3 = begin; i3 < end2; i3++) { + var val = arr[i3]; + if (isFinite(val)) { + max4 = Math.max(val, max4); + } + } + return max4; + }; + var mean = function mean2(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var total = 0; + var n = 0; + for (var i3 = begin; i3 < end2; i3++) { + var val = arr[i3]; + if (isFinite(val)) { + total += val; + n++; + } + } + return total / n; + }; + var median = function median2(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var copy3 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var sort2 = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var includeHoles = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + if (copy3) { + arr = arr.slice(begin, end2); + } else { + if (end2 < arr.length) { + arr.splice(end2, arr.length - end2); + } + if (begin > 0) { + arr.splice(0, begin); + } + } + var off = 0; + for (var i3 = arr.length - 1; i3 >= 0; i3--) { + var v = arr[i3]; + if (includeHoles) { + if (!isFinite(v)) { + arr[i3] = -Infinity; + off++; + } + } else { + arr.splice(i3, 1); + } + } + if (sort2) { + arr.sort(function(a, b) { + return a - b; + }); + } + var len = arr.length; + var mid = Math.floor(len / 2); + if (len % 2 !== 0) { + return arr[mid + 1 + off]; + } else { + return (arr[mid - 1 + off] + arr[mid + off]) / 2; + } + }; + var deg2rad = function deg2rad2(deg) { + return Math.PI * deg / 180; + }; + var getAngleFromDisp = function getAngleFromDisp2(dispX, dispY) { + return Math.atan2(dispY, dispX) - Math.PI / 2; + }; + var log2 = Math.log2 || function(n) { + return Math.log(n) / Math.log(2); + }; + var signum = function signum2(x2) { + if (x2 > 0) { + return 1; + } else if (x2 < 0) { + return -1; + } else { + return 0; + } + }; + var dist2 = function dist3(p1, p2) { + return Math.sqrt(sqdist(p1, p2)); + }; + var sqdist = function sqdist2(p1, p2) { + var dx = p2.x - p1.x; + var dy = p2.y - p1.y; + return dx * dx + dy * dy; + }; + var inPlaceSumNormalize = function inPlaceSumNormalize2(v) { + var length2 = v.length; + var total = 0; + for (var i3 = 0; i3 < length2; i3++) { + total += v[i3]; + } + for (var _i = 0; _i < length2; _i++) { + v[_i] = v[_i] / total; + } + return v; + }; + var qbezierAt = function qbezierAt2(p0, p1, p2, t) { + return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2; + }; + var qbezierPtAt = function qbezierPtAt2(p0, p1, p2, t) { + return { + x: qbezierAt(p0.x, p1.x, p2.x, t), + y: qbezierAt(p0.y, p1.y, p2.y, t) + }; + }; + var lineAt = function lineAt2(p0, p1, t, d) { + var vec = { + x: p1.x - p0.x, + y: p1.y - p0.y + }; + var vecDist = dist2(p0, p1); + var normVec = { + x: vec.x / vecDist, + y: vec.y / vecDist + }; + t = t == null ? 0 : t; + d = d != null ? d : t * vecDist; + return { + x: p0.x + normVec.x * d, + y: p0.y + normVec.y * d + }; + }; + var bound = function bound2(min3, val, max3) { + return Math.max(min3, Math.min(max3, val)); + }; + var makeBoundingBox = function makeBoundingBox2(bb) { + if (bb == null) { + return { + x1: Infinity, + y1: Infinity, + x2: -Infinity, + y2: -Infinity, + w: 0, + h: 0 + }; + } else if (bb.x1 != null && bb.y1 != null) { + if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x2, + y2: bb.y2, + w: bb.x2 - bb.x1, + h: bb.y2 - bb.y1 + }; + } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x1 + bb.w, + y2: bb.y1 + bb.h, + w: bb.w, + h: bb.h + }; + } + } + }; + var copyBoundingBox = function copyBoundingBox2(bb) { + return { + x1: bb.x1, + x2: bb.x2, + w: bb.w, + y1: bb.y1, + y2: bb.y2, + h: bb.h + }; + }; + var clearBoundingBox = function clearBoundingBox2(bb) { + bb.x1 = Infinity; + bb.y1 = Infinity; + bb.x2 = -Infinity; + bb.y2 = -Infinity; + bb.w = 0; + bb.h = 0; + }; + var updateBoundingBox = function updateBoundingBox2(bb1, bb2) { + bb1.x1 = Math.min(bb1.x1, bb2.x1); + bb1.x2 = Math.max(bb1.x2, bb2.x2); + bb1.w = bb1.x2 - bb1.x1; + bb1.y1 = Math.min(bb1.y1, bb2.y1); + bb1.y2 = Math.max(bb1.y2, bb2.y2); + bb1.h = bb1.y2 - bb1.y1; + }; + var expandBoundingBoxByPoint = function expandBoundingBoxByPoint2(bb, x2, y2) { + bb.x1 = Math.min(bb.x1, x2); + bb.x2 = Math.max(bb.x2, x2); + bb.w = bb.x2 - bb.x1; + bb.y1 = Math.min(bb.y1, y2); + bb.y2 = Math.max(bb.y2, y2); + bb.h = bb.y2 - bb.y1; + }; + var expandBoundingBox = function expandBoundingBox2(bb) { + var padding2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + bb.x1 -= padding2; + bb.x2 += padding2; + bb.y1 -= padding2; + bb.y2 += padding2; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + var expandBoundingBoxSides = function expandBoundingBoxSides2(bb) { + var padding2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0]; + var top2, right2, bottom2, left2; + if (padding2.length === 1) { + top2 = right2 = bottom2 = left2 = padding2[0]; + } else if (padding2.length === 2) { + top2 = bottom2 = padding2[0]; + left2 = right2 = padding2[1]; + } else if (padding2.length === 4) { + var _padding = _slicedToArray(padding2, 4); + top2 = _padding[0]; + right2 = _padding[1]; + bottom2 = _padding[2]; + left2 = _padding[3]; + } + bb.x1 -= left2; + bb.x2 += right2; + bb.y1 -= top2; + bb.y2 += bottom2; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + var assignBoundingBox = function assignBoundingBox2(bb1, bb2) { + bb1.x1 = bb2.x1; + bb1.y1 = bb2.y1; + bb1.x2 = bb2.x2; + bb1.y2 = bb2.y2; + bb1.w = bb1.x2 - bb1.x1; + bb1.h = bb1.y2 - bb1.y1; + }; + var boundingBoxesIntersect = function boundingBoxesIntersect2(bb1, bb2) { + if (bb1.x1 > bb2.x2) { + return false; + } + if (bb2.x1 > bb1.x2) { + return false; + } + if (bb1.x2 < bb2.x1) { + return false; + } + if (bb2.x2 < bb1.x1) { + return false; + } + if (bb1.y2 < bb2.y1) { + return false; + } + if (bb2.y2 < bb1.y1) { + return false; + } + if (bb1.y1 > bb2.y2) { + return false; + } + if (bb2.y1 > bb1.y2) { + return false; + } + return true; + }; + var inBoundingBox = function inBoundingBox2(bb, x2, y2) { + return bb.x1 <= x2 && x2 <= bb.x2 && bb.y1 <= y2 && y2 <= bb.y2; + }; + var pointInBoundingBox = function pointInBoundingBox2(bb, pt) { + return inBoundingBox(bb, pt.x, pt.y); + }; + var boundingBoxInBoundingBox = function boundingBoxInBoundingBox2(bb1, bb2) { + return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2); + }; + var roundRectangleIntersectLine = function roundRectangleIntersectLine2(x2, y2, nodeX, nodeY, width2, height, padding2) { + var cornerRadius = getRoundRectangleRadius(width2, height); + var halfWidth = width2 / 2; + var halfHeight = height / 2; + var straightLineIntersections; + { + var topStartX = nodeX - halfWidth + cornerRadius - padding2; + var topStartY = nodeY - halfHeight - padding2; + var topEndX = nodeX + halfWidth - cornerRadius + padding2; + var topEndY = topStartY; + straightLineIntersections = finiteLinesIntersect(x2, y2, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + { + var rightStartX = nodeX + halfWidth + padding2; + var rightStartY = nodeY - halfHeight + cornerRadius - padding2; + var rightEndX = rightStartX; + var rightEndY = nodeY + halfHeight - cornerRadius + padding2; + straightLineIntersections = finiteLinesIntersect(x2, y2, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + { + var bottomStartX = nodeX - halfWidth + cornerRadius - padding2; + var bottomStartY = nodeY + halfHeight + padding2; + var bottomEndX = nodeX + halfWidth - cornerRadius + padding2; + var bottomEndY = bottomStartY; + straightLineIntersections = finiteLinesIntersect(x2, y2, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + { + var leftStartX = nodeX - halfWidth - padding2; + var leftStartY = nodeY - halfHeight + cornerRadius - padding2; + var leftEndX = leftStartX; + var leftEndY = nodeY + halfHeight - cornerRadius + padding2; + straightLineIntersections = finiteLinesIntersect(x2, y2, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + var arcIntersections; + { + var topLeftCenterX = nodeX - halfWidth + cornerRadius; + var topLeftCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x2, y2, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding2); + if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + { + var topRightCenterX = nodeX + halfWidth - cornerRadius; + var topRightCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x2, y2, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding2); + if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + { + var bottomRightCenterX = nodeX + halfWidth - cornerRadius; + var bottomRightCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x2, y2, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding2); + if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + { + var bottomLeftCenterX = nodeX - halfWidth + cornerRadius; + var bottomLeftCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x2, y2, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding2); + if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + return []; + }; + var inLineVicinity = function inLineVicinity2(x2, y2, lx1, ly1, lx2, ly2, tolerance) { + var t = tolerance; + var x1 = Math.min(lx1, lx2); + var x22 = Math.max(lx1, lx2); + var y1 = Math.min(ly1, ly2); + var y22 = Math.max(ly1, ly2); + return x1 - t <= x2 && x2 <= x22 + t && y1 - t <= y2 && y2 <= y22 + t; + }; + var inBezierVicinity = function inBezierVicinity2(x2, y2, x1, y1, x22, y22, x3, y3, tolerance) { + var bb = { + x1: Math.min(x1, x3, x22) - tolerance, + x2: Math.max(x1, x3, x22) + tolerance, + y1: Math.min(y1, y3, y22) - tolerance, + y2: Math.max(y1, y3, y22) + tolerance + }; + if (x2 < bb.x1 || x2 > bb.x2 || y2 < bb.y1 || y2 > bb.y2) { + return false; + } else { + return true; + } + }; + var solveQuadratic = function solveQuadratic2(a, b, c2, val) { + c2 -= val; + var r = b * b - 4 * a * c2; + if (r < 0) { + return []; + } + var sqrtR = Math.sqrt(r); + var denom = 2 * a; + var root1 = (-b + sqrtR) / denom; + var root22 = (-b - sqrtR) / denom; + return [root1, root22]; + }; + var solveCubic = function solveCubic2(a, b, c2, d, result) { + var epsilon2 = 1e-5; + if (a === 0) { + a = epsilon2; + } + b /= a; + c2 /= a; + d /= a; + var discriminant, q, r, dum1, s, t, term1, r13; + q = (3 * c2 - b * b) / 9; + r = -(27 * d) + b * (9 * c2 - 2 * (b * b)); + r /= 54; + discriminant = q * q * q + r * r; + result[1] = 0; + term1 = b / 3; + if (discriminant > 0) { + s = r + Math.sqrt(discriminant); + s = s < 0 ? -Math.pow(-s, 1 / 3) : Math.pow(s, 1 / 3); + t = r - Math.sqrt(discriminant); + t = t < 0 ? -Math.pow(-t, 1 / 3) : Math.pow(t, 1 / 3); + result[0] = -term1 + s + t; + term1 += (s + t) / 2; + result[4] = result[2] = -term1; + term1 = Math.sqrt(3) * (-t + s) / 2; + result[3] = term1; + result[5] = -term1; + return; + } + result[5] = result[3] = 0; + if (discriminant === 0) { + r13 = r < 0 ? -Math.pow(-r, 1 / 3) : Math.pow(r, 1 / 3); + result[0] = -term1 + 2 * r13; + result[4] = result[2] = -(r13 + term1); + return; + } + q = -q; + dum1 = q * q * q; + dum1 = Math.acos(r / Math.sqrt(dum1)); + r13 = 2 * Math.sqrt(q); + result[0] = -term1 + r13 * Math.cos(dum1 / 3); + result[2] = -term1 + r13 * Math.cos((dum1 + 2 * Math.PI) / 3); + result[4] = -term1 + r13 * Math.cos((dum1 + 4 * Math.PI) / 3); + return; + }; + var sqdistToQuadraticBezier = function sqdistToQuadraticBezier2(x2, y2, x1, y1, x22, y22, x3, y3) { + var a = 1 * x1 * x1 - 4 * x1 * x22 + 2 * x1 * x3 + 4 * x22 * x22 - 4 * x22 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y22 + 2 * y1 * y3 + 4 * y22 * y22 - 4 * y22 * y3 + y3 * y3; + var b = 1 * 9 * x1 * x22 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x22 * x22 + 3 * x22 * x3 + 9 * y1 * y22 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y22 * y22 + 3 * y22 * y3; + var c2 = 1 * 3 * x1 * x1 - 6 * x1 * x22 + x1 * x3 - x1 * x2 + 2 * x22 * x22 + 2 * x22 * x2 - x3 * x2 + 3 * y1 * y1 - 6 * y1 * y22 + y1 * y3 - y1 * y2 + 2 * y22 * y22 + 2 * y22 * y2 - y3 * y2; + var d = 1 * x1 * x22 - x1 * x1 + x1 * x2 - x22 * x2 + y1 * y22 - y1 * y1 + y1 * y2 - y22 * y2; + var roots = []; + solveCubic(a, b, c2, d, roots); + var zeroThreshold = 1e-7; + var params = []; + for (var index2 = 0; index2 < 6; index2 += 2) { + if (Math.abs(roots[index2 + 1]) < zeroThreshold && roots[index2] >= 0 && roots[index2] <= 1) { + params.push(roots[index2]); + } + } + params.push(1); + params.push(0); + var minDistanceSquared = -1; + var curX, curY, distSquared; + for (var i3 = 0; i3 < params.length; i3++) { + curX = Math.pow(1 - params[i3], 2) * x1 + 2 * (1 - params[i3]) * params[i3] * x22 + params[i3] * params[i3] * x3; + curY = Math.pow(1 - params[i3], 2) * y1 + 2 * (1 - params[i3]) * params[i3] * y22 + params[i3] * params[i3] * y3; + distSquared = Math.pow(curX - x2, 2) + Math.pow(curY - y2, 2); + if (minDistanceSquared >= 0) { + if (distSquared < minDistanceSquared) { + minDistanceSquared = distSquared; + } + } else { + minDistanceSquared = distSquared; + } + } + return minDistanceSquared; + }; + var sqdistToFiniteLine = function sqdistToFiniteLine2(x2, y2, x1, y1, x22, y22) { + var offset = [x2 - x1, y2 - y1]; + var line2 = [x22 - x1, y22 - y1]; + var lineSq = line2[0] * line2[0] + line2[1] * line2[1]; + var hypSq = offset[0] * offset[0] + offset[1] * offset[1]; + var dotProduct = offset[0] * line2[0] + offset[1] * line2[1]; + var adjSq = dotProduct * dotProduct / lineSq; + if (dotProduct < 0) { + return hypSq; + } + if (adjSq > lineSq) { + return (x2 - x22) * (x2 - x22) + (y2 - y22) * (y2 - y22); + } + return hypSq - adjSq; + }; + var pointInsidePolygonPoints = function pointInsidePolygonPoints2(x2, y2, points) { + var x1, y1, x22, y22; + var y3; + var up = 0; + for (var i3 = 0; i3 < points.length / 2; i3++) { + x1 = points[i3 * 2]; + y1 = points[i3 * 2 + 1]; + if (i3 + 1 < points.length / 2) { + x22 = points[(i3 + 1) * 2]; + y22 = points[(i3 + 1) * 2 + 1]; + } else { + x22 = points[(i3 + 1 - points.length / 2) * 2]; + y22 = points[(i3 + 1 - points.length / 2) * 2 + 1]; + } + if (x1 == x2 && x22 == x2) + ; + else if (x1 >= x2 && x2 >= x22 || x1 <= x2 && x2 <= x22) { + y3 = (x2 - x1) / (x22 - x1) * (y22 - y1) + y1; + if (y3 > y2) { + up++; + } + } else { + continue; + } + } + if (up % 2 === 0) { + return false; + } else { + return true; + } + }; + var pointInsidePolygon = function pointInsidePolygon2(x2, y2, basePoints, centerX, centerY, width2, height, direction2, padding2) { + var transformedPoints = new Array(basePoints.length); + var angle; + if (direction2[0] != null) { + angle = Math.atan(direction2[1] / direction2[0]); + if (direction2[0] < 0) { + angle = angle + Math.PI / 2; + } else { + angle = -angle - Math.PI / 2; + } + } else { + angle = direction2; + } + var cos3 = Math.cos(-angle); + var sin3 = Math.sin(-angle); + for (var i3 = 0; i3 < transformedPoints.length / 2; i3++) { + transformedPoints[i3 * 2] = width2 / 2 * (basePoints[i3 * 2] * cos3 - basePoints[i3 * 2 + 1] * sin3); + transformedPoints[i3 * 2 + 1] = height / 2 * (basePoints[i3 * 2 + 1] * cos3 + basePoints[i3 * 2] * sin3); + transformedPoints[i3 * 2] += centerX; + transformedPoints[i3 * 2 + 1] += centerY; + } + var points; + if (padding2 > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding2); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + return pointInsidePolygonPoints(x2, y2, points); + }; + var pointInsideRoundPolygon = function pointInsideRoundPolygon2(x2, y2, basePoints, centerX, centerY, width2, height) { + var cutPolygonPoints = new Array(basePoints.length); + var halfW = width2 / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width2, height); + var squaredCornerRadius = cornerRadius * cornerRadius; + for (var i3 = 0; i3 < basePoints.length / 4; i3++) { + var sourceUv = void 0, destUv = void 0; + if (i3 === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i3 * 4 - 2; + } + destUv = i3 * 4 + 2; + var px = centerX + halfW * basePoints[i3 * 4]; + var py = centerY + halfH * basePoints[i3 * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + cutPolygonPoints[i3 * 4] = cp0x; + cutPolygonPoints[i3 * 4 + 1] = cp0y; + cutPolygonPoints[i3 * 4 + 2] = cp1x; + cutPolygonPoints[i3 * 4 + 3] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + var squaredDistance = Math.pow(cx - x2, 2) + Math.pow(cy - y2, 2); + if (squaredDistance <= squaredCornerRadius) { + return true; + } + } + return pointInsidePolygonPoints(x2, y2, cutPolygonPoints); + }; + var joinLines = function joinLines2(lineSet) { + var vertices2 = new Array(lineSet.length / 2); + var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY; + var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY; + for (var i3 = 0; i3 < lineSet.length / 4; i3++) { + currentLineStartX = lineSet[i3 * 4]; + currentLineStartY = lineSet[i3 * 4 + 1]; + currentLineEndX = lineSet[i3 * 4 + 2]; + currentLineEndY = lineSet[i3 * 4 + 3]; + if (i3 < lineSet.length / 4 - 1) { + nextLineStartX = lineSet[(i3 + 1) * 4]; + nextLineStartY = lineSet[(i3 + 1) * 4 + 1]; + nextLineEndX = lineSet[(i3 + 1) * 4 + 2]; + nextLineEndY = lineSet[(i3 + 1) * 4 + 3]; + } else { + nextLineStartX = lineSet[0]; + nextLineStartY = lineSet[1]; + nextLineEndX = lineSet[2]; + nextLineEndY = lineSet[3]; + } + var intersection2 = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true); + vertices2[i3 * 2] = intersection2[0]; + vertices2[i3 * 2 + 1] = intersection2[1]; + } + return vertices2; + }; + var expandPolygon = function expandPolygon2(points, pad2) { + var expandedLineSet = new Array(points.length * 2); + var currentPointX, currentPointY, nextPointX, nextPointY; + for (var i3 = 0; i3 < points.length / 2; i3++) { + currentPointX = points[i3 * 2]; + currentPointY = points[i3 * 2 + 1]; + if (i3 < points.length / 2 - 1) { + nextPointX = points[(i3 + 1) * 2]; + nextPointY = points[(i3 + 1) * 2 + 1]; + } else { + nextPointX = points[0]; + nextPointY = points[1]; + } + var offsetX = nextPointY - currentPointY; + var offsetY = -(nextPointX - currentPointX); + var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY); + var normalizedOffsetX = offsetX / offsetLength; + var normalizedOffsetY = offsetY / offsetLength; + expandedLineSet[i3 * 4] = currentPointX + normalizedOffsetX * pad2; + expandedLineSet[i3 * 4 + 1] = currentPointY + normalizedOffsetY * pad2; + expandedLineSet[i3 * 4 + 2] = nextPointX + normalizedOffsetX * pad2; + expandedLineSet[i3 * 4 + 3] = nextPointY + normalizedOffsetY * pad2; + } + return expandedLineSet; + }; + var intersectLineEllipse = function intersectLineEllipse2(x2, y2, centerX, centerY, ellipseWradius, ellipseHradius) { + var dispX = centerX - x2; + var dispY = centerY - y2; + dispX /= ellipseWradius; + dispY /= ellipseHradius; + var len = Math.sqrt(dispX * dispX + dispY * dispY); + var newLength = len - 1; + if (newLength < 0) { + return []; + } + var lenProportion = newLength / len; + return [(centerX - x2) * lenProportion + x2, (centerY - y2) * lenProportion + y2]; + }; + var checkInEllipse = function checkInEllipse2(x2, y2, width2, height, centerX, centerY, padding2) { + x2 -= centerX; + y2 -= centerY; + x2 /= width2 / 2 + padding2; + y2 /= height / 2 + padding2; + return x2 * x2 + y2 * y2 <= 1; + }; + var intersectLineCircle = function intersectLineCircle2(x1, y1, x2, y2, centerX, centerY, radius) { + var d = [x2 - x1, y2 - y1]; + var f2 = [x1 - centerX, y1 - centerY]; + var a = d[0] * d[0] + d[1] * d[1]; + var b = 2 * (f2[0] * d[0] + f2[1] * d[1]); + var c2 = f2[0] * f2[0] + f2[1] * f2[1] - radius * radius; + var discriminant = b * b - 4 * a * c2; + if (discriminant < 0) { + return []; + } + var t12 = (-b + Math.sqrt(discriminant)) / (2 * a); + var t22 = (-b - Math.sqrt(discriminant)) / (2 * a); + var tMin = Math.min(t12, t22); + var tMax = Math.max(t12, t22); + var inRangeParams = []; + if (tMin >= 0 && tMin <= 1) { + inRangeParams.push(tMin); + } + if (tMax >= 0 && tMax <= 1) { + inRangeParams.push(tMax); + } + if (inRangeParams.length === 0) { + return []; + } + var nearIntersectionX = inRangeParams[0] * d[0] + x1; + var nearIntersectionY = inRangeParams[0] * d[1] + y1; + if (inRangeParams.length > 1) { + if (inRangeParams[0] == inRangeParams[1]) { + return [nearIntersectionX, nearIntersectionY]; + } else { + var farIntersectionX = inRangeParams[1] * d[0] + x1; + var farIntersectionY = inRangeParams[1] * d[1] + y1; + return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY]; + } + } else { + return [nearIntersectionX, nearIntersectionY]; + } + }; + var midOfThree = function midOfThree2(a, b, c2) { + if (b <= a && a <= c2 || c2 <= a && a <= b) { + return a; + } else if (a <= b && b <= c2 || c2 <= b && b <= a) { + return b; + } else { + return c2; + } + }; + var finiteLinesIntersect = function finiteLinesIntersect2(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) { + var dx13 = x1 - x3; + var dx21 = x2 - x1; + var dx43 = x4 - x3; + var dy13 = y1 - y3; + var dy21 = y2 - y1; + var dy43 = y4 - y3; + var ua_t = dx43 * dy13 - dy43 * dx13; + var ub_t = dx21 * dy13 - dy21 * dx13; + var u_b = dy43 * dx21 - dx43 * dy21; + if (u_b !== 0) { + var ua = ua_t / u_b; + var ub = ub_t / u_b; + var flptThreshold = 1e-3; + var _min = 0 - flptThreshold; + var _max = 1 + flptThreshold; + if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) { + return [x1 + ua * dx21, y1 + ua * dy21]; + } else { + if (!infiniteLines) { + return []; + } else { + return [x1 + ua * dx21, y1 + ua * dy21]; + } + } + } else { + if (ua_t === 0 || ub_t === 0) { + if (midOfThree(x1, x2, x4) === x4) { + return [x4, y4]; + } + if (midOfThree(x1, x2, x3) === x3) { + return [x3, y3]; + } + if (midOfThree(x3, x4, x2) === x2) { + return [x2, y2]; + } + return []; + } else { + return []; + } + } + }; + var polygonIntersectLine = function polygonIntersectLine2(x2, y2, basePoints, centerX, centerY, width2, height, padding2) { + var intersections = []; + var intersection2; + var transformedPoints = new Array(basePoints.length); + var doTransform = true; + if (width2 == null) { + doTransform = false; + } + var points; + if (doTransform) { + for (var i3 = 0; i3 < transformedPoints.length / 2; i3++) { + transformedPoints[i3 * 2] = basePoints[i3 * 2] * width2 + centerX; + transformedPoints[i3 * 2 + 1] = basePoints[i3 * 2 + 1] * height + centerY; + } + if (padding2 > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding2); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + } else { + points = basePoints; + } + var currentX, currentY, nextX, nextY; + for (var _i2 = 0; _i2 < points.length / 2; _i2++) { + currentX = points[_i2 * 2]; + currentY = points[_i2 * 2 + 1]; + if (_i2 < points.length / 2 - 1) { + nextX = points[(_i2 + 1) * 2]; + nextY = points[(_i2 + 1) * 2 + 1]; + } else { + nextX = points[0]; + nextY = points[1]; + } + intersection2 = finiteLinesIntersect(x2, y2, centerX, centerY, currentX, currentY, nextX, nextY); + if (intersection2.length !== 0) { + intersections.push(intersection2[0], intersection2[1]); + } + } + return intersections; + }; + var roundPolygonIntersectLine = function roundPolygonIntersectLine2(x2, y2, basePoints, centerX, centerY, width2, height, padding2) { + var intersections = []; + var intersection2; + var lines = new Array(basePoints.length); + var halfW = width2 / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width2, height); + for (var i3 = 0; i3 < basePoints.length / 4; i3++) { + var sourceUv = void 0, destUv = void 0; + if (i3 === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i3 * 4 - 2; + } + destUv = i3 * 4 + 2; + var px = centerX + halfW * basePoints[i3 * 4]; + var py = centerY + halfH * basePoints[i3 * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + if (i3 === 0) { + lines[basePoints.length - 2] = cp0x; + lines[basePoints.length - 1] = cp0y; + } else { + lines[i3 * 4 - 2] = cp0x; + lines[i3 * 4 - 1] = cp0y; + } + lines[i3 * 4] = cp1x; + lines[i3 * 4 + 1] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + intersection2 = intersectLineCircle(x2, y2, centerX, centerY, cx, cy, cornerRadius); + if (intersection2.length !== 0) { + intersections.push(intersection2[0], intersection2[1]); + } + } + for (var _i3 = 0; _i3 < lines.length / 4; _i3++) { + intersection2 = finiteLinesIntersect(x2, y2, centerX, centerY, lines[_i3 * 4], lines[_i3 * 4 + 1], lines[_i3 * 4 + 2], lines[_i3 * 4 + 3], false); + if (intersection2.length !== 0) { + intersections.push(intersection2[0], intersection2[1]); + } + } + if (intersections.length > 2) { + var lowestIntersection = [intersections[0], intersections[1]]; + var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x2, 2) + Math.pow(lowestIntersection[1] - y2, 2); + for (var _i4 = 1; _i4 < intersections.length / 2; _i4++) { + var squaredDistance = Math.pow(intersections[_i4 * 2] - x2, 2) + Math.pow(intersections[_i4 * 2 + 1] - y2, 2); + if (squaredDistance <= lowestSquaredDistance) { + lowestIntersection[0] = intersections[_i4 * 2]; + lowestIntersection[1] = intersections[_i4 * 2 + 1]; + lowestSquaredDistance = squaredDistance; + } + } + return lowestIntersection; + } + return intersections; + }; + var shortenIntersection = function shortenIntersection2(intersection2, offset, amount) { + var disp = [intersection2[0] - offset[0], intersection2[1] - offset[1]]; + var length2 = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]); + var lenRatio = (length2 - amount) / length2; + if (lenRatio < 0) { + lenRatio = 1e-5; + } + return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]]; + }; + var generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare2(sides, rotationRadians) { + var points = generateUnitNgonPoints(sides, rotationRadians); + points = fitPolygonToSquare(points); + return points; + }; + var fitPolygonToSquare = function fitPolygonToSquare2(points) { + var x2, y2; + var sides = points.length / 2; + var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity; + for (var i3 = 0; i3 < sides; i3++) { + x2 = points[2 * i3]; + y2 = points[2 * i3 + 1]; + minX = Math.min(minX, x2); + maxX = Math.max(maxX, x2); + minY = Math.min(minY, y2); + maxY = Math.max(maxY, y2); + } + var sx = 2 / (maxX - minX); + var sy = 2 / (maxY - minY); + for (var _i5 = 0; _i5 < sides; _i5++) { + x2 = points[2 * _i5] = points[2 * _i5] * sx; + y2 = points[2 * _i5 + 1] = points[2 * _i5 + 1] * sy; + minX = Math.min(minX, x2); + maxX = Math.max(maxX, x2); + minY = Math.min(minY, y2); + maxY = Math.max(maxY, y2); + } + if (minY < -1) { + for (var _i6 = 0; _i6 < sides; _i6++) { + y2 = points[2 * _i6 + 1] = points[2 * _i6 + 1] + (-1 - minY); + } + } + return points; + }; + var generateUnitNgonPoints = function generateUnitNgonPoints2(sides, rotationRadians) { + var increment = 1 / sides * 2 * Math.PI; + var startAngle = sides % 2 === 0 ? Math.PI / 2 + increment / 2 : Math.PI / 2; + startAngle += rotationRadians; + var points = new Array(sides * 2); + var currentAngle; + for (var i3 = 0; i3 < sides; i3++) { + currentAngle = i3 * increment + startAngle; + points[2 * i3] = Math.cos(currentAngle); + points[2 * i3 + 1] = Math.sin(-currentAngle); + } + return points; + }; + var getRoundRectangleRadius = function getRoundRectangleRadius2(width2, height) { + return Math.min(width2 / 4, height / 4, 8); + }; + var getRoundPolygonRadius = function getRoundPolygonRadius2(width2, height) { + return Math.min(width2 / 10, height / 10, 8); + }; + var getCutRectangleCornerLength = function getCutRectangleCornerLength2() { + return 8; + }; + var bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff2(p0, p1, p2) { + return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0]; + }; + var getBarrelCurveConstants = function getBarrelCurveConstants2(width2, height) { + return { + heightOffset: Math.min(15, 0.05 * height), + widthOffset: Math.min(100, 0.25 * width2), + ctrlPtOffsetPct: 0.05 + }; + }; + var pageRankDefaults = defaults$g({ + dampingFactor: 0.8, + precision: 1e-6, + iterations: 200, + weight: function weight(edge) { + return 1; + } + }); + var elesfn$o = { + pageRank: function pageRank(options2) { + var _pageRankDefaults = pageRankDefaults(options2), dampingFactor = _pageRankDefaults.dampingFactor, precision = _pageRankDefaults.precision, iterations = _pageRankDefaults.iterations, weight = _pageRankDefaults.weight; + var cy = this._private.cy; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges2 = _this$byGroup.edges; + var numNodes = nodes2.length; + var numNodesSqd = numNodes * numNodes; + var numEdges = edges2.length; + var matrix = new Array(numNodesSqd); + var columnSum = new Array(numNodes); + var additionalProb = (1 - dampingFactor) / numNodes; + for (var i3 = 0; i3 < numNodes; i3++) { + for (var j = 0; j < numNodes; j++) { + var n = i3 * numNodes + j; + matrix[n] = 0; + } + columnSum[i3] = 0; + } + for (var _i = 0; _i < numEdges; _i++) { + var edge = edges2[_i]; + var srcId = edge.data("source"); + var tgtId = edge.data("target"); + if (srcId === tgtId) { + continue; + } + var s = nodes2.indexOfId(srcId); + var t = nodes2.indexOfId(tgtId); + var w2 = weight(edge); + var _n = t * numNodes + s; + matrix[_n] += w2; + columnSum[s] += w2; + } + var p2 = 1 / numNodes + additionalProb; + for (var _j = 0; _j < numNodes; _j++) { + if (columnSum[_j] === 0) { + for (var _i2 = 0; _i2 < numNodes; _i2++) { + var _n2 = _i2 * numNodes + _j; + matrix[_n2] = p2; + } + } else { + for (var _i3 = 0; _i3 < numNodes; _i3++) { + var _n3 = _i3 * numNodes + _j; + matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb; + } + } + } + var eigenvector = new Array(numNodes); + var temp = new Array(numNodes); + var previous2; + for (var _i4 = 0; _i4 < numNodes; _i4++) { + eigenvector[_i4] = 1; + } + for (var iter = 0; iter < iterations; iter++) { + for (var _i5 = 0; _i5 < numNodes; _i5++) { + temp[_i5] = 0; + } + for (var _i6 = 0; _i6 < numNodes; _i6++) { + for (var _j2 = 0; _j2 < numNodes; _j2++) { + var _n4 = _i6 * numNodes + _j2; + temp[_i6] += matrix[_n4] * eigenvector[_j2]; + } + } + inPlaceSumNormalize(temp); + previous2 = eigenvector; + eigenvector = temp; + temp = previous2; + var diff = 0; + for (var _i7 = 0; _i7 < numNodes; _i7++) { + var delta = previous2[_i7] - eigenvector[_i7]; + diff += delta * delta; + } + if (diff < precision) { + break; + } + } + var res = { + rank: function rank2(node2) { + node2 = cy.collection(node2)[0]; + return eigenvector[nodes2.indexOf(node2)]; + } + }; + return res; + } + // pageRank + }; + var defaults$f = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false, + alpha: 0 + }); + var elesfn$n = { + degreeCentralityNormalized: function degreeCentralityNormalized(options2) { + options2 = defaults$f(options2); + var cy = this.cy(); + var nodes2 = this.nodes(); + var numNodes = nodes2.length; + if (!options2.directed) { + var degrees2 = {}; + var maxDegree = 0; + for (var i3 = 0; i3 < numNodes; i3++) { + var node2 = nodes2[i3]; + options2.root = node2; + var currDegree = this.degreeCentrality(options2); + if (maxDegree < currDegree.degree) { + maxDegree = currDegree.degree; + } + degrees2[node2.id()] = currDegree.degree; + } + return { + degree: function degree(node3) { + if (maxDegree === 0) { + return 0; + } + if (string2(node3)) { + node3 = cy.filter(node3); + } + return degrees2[node3.id()] / maxDegree; + } + }; + } else { + var indegrees = {}; + var outdegrees = {}; + var maxIndegree = 0; + var maxOutdegree = 0; + for (var _i = 0; _i < numNodes; _i++) { + var _node = nodes2[_i]; + var id2 = _node.id(); + options2.root = _node; + var _currDegree = this.degreeCentrality(options2); + if (maxIndegree < _currDegree.indegree) + maxIndegree = _currDegree.indegree; + if (maxOutdegree < _currDegree.outdegree) + maxOutdegree = _currDegree.outdegree; + indegrees[id2] = _currDegree.indegree; + outdegrees[id2] = _currDegree.outdegree; + } + return { + indegree: function indegree(node3) { + if (maxIndegree == 0) { + return 0; + } + if (string2(node3)) { + node3 = cy.filter(node3); + } + return indegrees[node3.id()] / maxIndegree; + }, + outdegree: function outdegree(node3) { + if (maxOutdegree === 0) { + return 0; + } + if (string2(node3)) { + node3 = cy.filter(node3); + } + return outdegrees[node3.id()] / maxOutdegree; + } + }; + } + }, + // degreeCentralityNormalized + // Implemented from the algorithm in Opsahl's paper + // "Node centrality in weighted networks: Generalizing degree and shortest paths" + // check the heading 2 "Degree" + degreeCentrality: function degreeCentrality(options2) { + options2 = defaults$f(options2); + var cy = this.cy(); + var callingEles = this; + var _options = options2, root3 = _options.root, weight = _options.weight, directed = _options.directed, alpha = _options.alpha; + root3 = cy.collection(root3)[0]; + if (!directed) { + var connEdges = root3.connectedEdges().intersection(callingEles); + var k = connEdges.length; + var s = 0; + for (var i3 = 0; i3 < connEdges.length; i3++) { + s += weight(connEdges[i3]); + } + return { + degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha) + }; + } else { + var edges2 = root3.connectedEdges(); + var incoming = edges2.filter(function(edge) { + return edge.target().same(root3) && callingEles.has(edge); + }); + var outgoing = edges2.filter(function(edge) { + return edge.source().same(root3) && callingEles.has(edge); + }); + var k_in = incoming.length; + var k_out = outgoing.length; + var s_in = 0; + var s_out = 0; + for (var _i2 = 0; _i2 < incoming.length; _i2++) { + s_in += weight(incoming[_i2]); + } + for (var _i3 = 0; _i3 < outgoing.length; _i3++) { + s_out += weight(outgoing[_i3]); + } + return { + indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha), + outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha) + }; + } + } + // degreeCentrality + }; + elesfn$n.dc = elesfn$n.degreeCentrality; + elesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized; + var defaults$e = defaults$g({ + harmonic: true, + weight: function weight() { + return 1; + }, + directed: false, + root: null + }); + var elesfn$m = { + closenessCentralityNormalized: function closenessCentralityNormalized(options2) { + var _defaults = defaults$e(options2), harmonic = _defaults.harmonic, weight = _defaults.weight, directed = _defaults.directed; + var cy = this.cy(); + var closenesses = {}; + var maxCloseness = 0; + var nodes2 = this.nodes(); + var fw = this.floydWarshall({ + weight, + directed + }); + for (var i3 = 0; i3 < nodes2.length; i3++) { + var currCloseness = 0; + var node_i = nodes2[i3]; + for (var j = 0; j < nodes2.length; j++) { + if (i3 !== j) { + var d = fw.distance(node_i, nodes2[j]); + if (harmonic) { + currCloseness += 1 / d; + } else { + currCloseness += d; + } + } + } + if (!harmonic) { + currCloseness = 1 / currCloseness; + } + if (maxCloseness < currCloseness) { + maxCloseness = currCloseness; + } + closenesses[node_i.id()] = currCloseness; + } + return { + closeness: function closeness(node2) { + if (maxCloseness == 0) { + return 0; + } + if (string2(node2)) { + node2 = cy.filter(node2)[0].id(); + } else { + node2 = node2.id(); + } + return closenesses[node2] / maxCloseness; + } + }; + }, + // Implemented from pseudocode from wikipedia + closenessCentrality: function closenessCentrality(options2) { + var _defaults2 = defaults$e(options2), root3 = _defaults2.root, weight = _defaults2.weight, directed = _defaults2.directed, harmonic = _defaults2.harmonic; + root3 = this.filter(root3)[0]; + var dijkstra = this.dijkstra({ + root: root3, + weight, + directed + }); + var totalDistance = 0; + var nodes2 = this.nodes(); + for (var i3 = 0; i3 < nodes2.length; i3++) { + var n = nodes2[i3]; + if (!n.same(root3)) { + var d = dijkstra.distanceTo(n); + if (harmonic) { + totalDistance += 1 / d; + } else { + totalDistance += d; + } + } + } + return harmonic ? totalDistance : 1 / totalDistance; + } + // closenessCentrality + }; + elesfn$m.cc = elesfn$m.closenessCentrality; + elesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized; + var defaults$d = defaults$g({ + weight: null, + directed: false + }); + var elesfn$l = { + // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes + betweennessCentrality: function betweennessCentrality(options2) { + var _defaults = defaults$d(options2), directed = _defaults.directed, weight = _defaults.weight; + var weighted = weight != null; + var cy = this.cy(); + var V = this.nodes(); + var A = {}; + var _C = {}; + var max3 = 0; + var C = { + set: function set3(key, val) { + _C[key] = val; + if (val > max3) { + max3 = val; + } + }, + get: function get3(key) { + return _C[key]; + } + }; + for (var i3 = 0; i3 < V.length; i3++) { + var v = V[i3]; + var vid = v.id(); + if (directed) { + A[vid] = v.outgoers().nodes(); + } else { + A[vid] = v.openNeighborhood().nodes(); + } + C.set(vid, 0); + } + var _loop = function _loop2(s2) { + var sid = V[s2].id(); + var S = []; + var P = {}; + var g = {}; + var d = {}; + var Q = new heap(function(a, b) { + return d[a] - d[b]; + }); + for (var _i = 0; _i < V.length; _i++) { + var _vid = V[_i].id(); + P[_vid] = []; + g[_vid] = 0; + d[_vid] = Infinity; + } + g[sid] = 1; + d[sid] = 0; + Q.push(sid); + while (!Q.empty()) { + var _v = Q.pop(); + S.push(_v); + if (weighted) { + for (var j = 0; j < A[_v].length; j++) { + var w2 = A[_v][j]; + var vEle = cy.getElementById(_v); + var edge = void 0; + if (vEle.edgesTo(w2).length > 0) { + edge = vEle.edgesTo(w2)[0]; + } else { + edge = w2.edgesTo(vEle)[0]; + } + var edgeWeight = weight(edge); + w2 = w2.id(); + if (d[w2] > d[_v] + edgeWeight) { + d[w2] = d[_v] + edgeWeight; + if (Q.nodes.indexOf(w2) < 0) { + Q.push(w2); + } else { + Q.updateItem(w2); + } + g[w2] = 0; + P[w2] = []; + } + if (d[w2] == d[_v] + edgeWeight) { + g[w2] = g[w2] + g[_v]; + P[w2].push(_v); + } + } + } else { + for (var _j = 0; _j < A[_v].length; _j++) { + var _w = A[_v][_j].id(); + if (d[_w] == Infinity) { + Q.push(_w); + d[_w] = d[_v] + 1; + } + if (d[_w] == d[_v] + 1) { + g[_w] = g[_w] + g[_v]; + P[_w].push(_v); + } + } + } + } + var e = {}; + for (var _i2 = 0; _i2 < V.length; _i2++) { + e[V[_i2].id()] = 0; + } + while (S.length > 0) { + var _w2 = S.pop(); + for (var _j2 = 0; _j2 < P[_w2].length; _j2++) { + var _v2 = P[_w2][_j2]; + e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]); + } + if (_w2 != V[s2].id()) { + C.set(_w2, C.get(_w2) + e[_w2]); + } + } + }; + for (var s = 0; s < V.length; s++) { + _loop(s); + } + var ret = { + betweenness: function betweenness(node2) { + var id2 = cy.collection(node2).id(); + return C.get(id2); + }, + betweennessNormalized: function betweennessNormalized(node2) { + if (max3 == 0) { + return 0; + } + var id2 = cy.collection(node2).id(); + return C.get(id2) / max3; + } + }; + ret.betweennessNormalised = ret.betweennessNormalized; + return ret; + } + // betweennessCentrality + }; + elesfn$l.bc = elesfn$l.betweennessCentrality; + var defaults$c = defaults$g({ + expandFactor: 2, + // affects time of computation and cluster granularity to some extent: M * M + inflateFactor: 2, + // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) + multFactor: 1, + // optional self loops for each node. Use a neutral value to improve cluster computations. + maxIterations: 20, + // maximum number of iterations of the MCL algorithm in a single run + attributes: [ + // attributes/features used to group nodes, ie. similarity values between nodes + function(edge) { + return 1; + } + ] + }); + var setOptions$3 = function setOptions3(options2) { + return defaults$c(options2); + }; + var getSimilarity$1 = function getSimilarity2(edge, attributes) { + var total = 0; + for (var i3 = 0; i3 < attributes.length; i3++) { + total += attributes[i3](edge); + } + return total; + }; + var addLoops = function addLoops2(M, n, val) { + for (var i3 = 0; i3 < n; i3++) { + M[i3 * n + i3] = val; + } + }; + var normalize2 = function normalize3(M, n) { + var sum2; + for (var col = 0; col < n; col++) { + sum2 = 0; + for (var row = 0; row < n; row++) { + sum2 += M[row * n + col]; + } + for (var _row = 0; _row < n; _row++) { + M[_row * n + col] = M[_row * n + col] / sum2; + } + } + }; + var mmult = function mmult2(A, B, n) { + var C = new Array(n * n); + for (var i3 = 0; i3 < n; i3++) { + for (var j = 0; j < n; j++) { + C[i3 * n + j] = 0; + } + for (var k = 0; k < n; k++) { + for (var _j = 0; _j < n; _j++) { + C[i3 * n + _j] += A[i3 * n + k] * B[k * n + _j]; + } + } + } + return C; + }; + var expand = function expand2(M, n, expandFactor) { + var _M = M.slice(0); + for (var p2 = 1; p2 < expandFactor; p2++) { + M = mmult(M, _M, n); + } + return M; + }; + var inflate = function inflate2(M, n, inflateFactor) { + var _M = new Array(n * n); + for (var i3 = 0; i3 < n * n; i3++) { + _M[i3] = Math.pow(M[i3], inflateFactor); + } + normalize2(_M, n); + return _M; + }; + var hasConverged = function hasConverged2(M, _M, n2, roundFactor) { + for (var i3 = 0; i3 < n2; i3++) { + var v1 = Math.round(M[i3] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); + var v2 = Math.round(_M[i3] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); + if (v1 !== v2) { + return false; + } + } + return true; + }; + var assign$2 = function assign2(M, n, nodes2, cy) { + var clusters = []; + for (var i3 = 0; i3 < n; i3++) { + var cluster = []; + for (var j = 0; j < n; j++) { + if (Math.round(M[i3 * n + j] * 1e3) / 1e3 > 0) { + cluster.push(nodes2[j]); + } + } + if (cluster.length !== 0) { + clusters.push(cy.collection(cluster)); + } + } + return clusters; + }; + var isDuplicate = function isDuplicate2(c1, c2) { + for (var i3 = 0; i3 < c1.length; i3++) { + if (!c2[i3] || c1[i3].id() !== c2[i3].id()) { + return false; + } + } + return true; + }; + var removeDuplicates = function removeDuplicates2(clusters) { + for (var i3 = 0; i3 < clusters.length; i3++) { + for (var j = 0; j < clusters.length; j++) { + if (i3 != j && isDuplicate(clusters[i3], clusters[j])) { + clusters.splice(j, 1); + } + } + } + return clusters; + }; + var markovClustering = function markovClustering2(options2) { + var nodes2 = this.nodes(); + var edges2 = this.edges(); + var cy = this.cy(); + var opts = setOptions$3(options2); + var id2position = {}; + for (var i3 = 0; i3 < nodes2.length; i3++) { + id2position[nodes2[i3].id()] = i3; + } + var n = nodes2.length, n2 = n * n; + var M = new Array(n2), _M; + for (var _i = 0; _i < n2; _i++) { + M[_i] = 0; + } + for (var e = 0; e < edges2.length; e++) { + var edge = edges2[e]; + var _i2 = id2position[edge.source().id()]; + var j = id2position[edge.target().id()]; + var sim = getSimilarity$1(edge, opts.attributes); + M[_i2 * n + j] += sim; + M[j * n + _i2] += sim; + } + addLoops(M, n, opts.multFactor); + normalize2(M, n); + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + _M = expand(M, n, opts.expandFactor); + M = inflate(_M, n, opts.inflateFactor); + if (!hasConverged(M, _M, n2, 4)) { + isStillMoving = true; + } + iterations++; + } + var clusters = assign$2(M, n, nodes2, cy); + clusters = removeDuplicates(clusters); + return clusters; + }; + var markovClustering$1 = { + markovClustering, + mcl: markovClustering + }; + var identity2 = function identity3(x2) { + return x2; + }; + var absDiff = function absDiff2(p2, q) { + return Math.abs(q - p2); + }; + var addAbsDiff = function addAbsDiff2(total, p2, q) { + return total + absDiff(p2, q); + }; + var addSquaredDiff = function addSquaredDiff2(total, p2, q) { + return total + Math.pow(q - p2, 2); + }; + var sqrt3 = function sqrt4(x2) { + return Math.sqrt(x2); + }; + var maxAbsDiff = function maxAbsDiff2(currentMax, p2, q) { + return Math.max(currentMax, absDiff(p2, q)); + }; + var getDistance = function getDistance2(length2, getP, getQ, init2, visit) { + var post = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : identity2; + var ret = init2; + var p2, q; + for (var dim = 0; dim < length2; dim++) { + p2 = getP(dim); + q = getQ(dim); + ret = visit(ret, p2, q); + } + return post(ret); + }; + var distances = { + euclidean: function euclidean(length2, getP, getQ) { + if (length2 >= 2) { + return getDistance(length2, getP, getQ, 0, addSquaredDiff, sqrt3); + } else { + return getDistance(length2, getP, getQ, 0, addAbsDiff); + } + }, + squaredEuclidean: function squaredEuclidean(length2, getP, getQ) { + return getDistance(length2, getP, getQ, 0, addSquaredDiff); + }, + manhattan: function manhattan(length2, getP, getQ) { + return getDistance(length2, getP, getQ, 0, addAbsDiff); + }, + max: function max3(length2, getP, getQ) { + return getDistance(length2, getP, getQ, -Infinity, maxAbsDiff); + } + }; + distances["squared-euclidean"] = distances["squaredEuclidean"]; + distances["squaredeuclidean"] = distances["squaredEuclidean"]; + function clusteringDistance(method, length2, getP, getQ, nodeP, nodeQ) { + var impl2; + if (fn$6(method)) { + impl2 = method; + } else { + impl2 = distances[method] || distances.euclidean; + } + if (length2 === 0 && fn$6(method)) { + return impl2(nodeP, nodeQ); + } else { + return impl2(length2, getP, getQ, nodeP, nodeQ); + } + } + var defaults$b = defaults$g({ + k: 2, + m: 2, + sensitivityThreshold: 1e-4, + distance: "euclidean", + maxIterations: 10, + attributes: [], + testMode: false, + testCentroids: null + }); + var setOptions$2 = function setOptions3(options2) { + return defaults$b(options2); + }; + var getDist = function getDist2(type2, node2, centroid, attributes, mode) { + var noNodeP = mode !== "kMedoids"; + var getP = noNodeP ? function(i3) { + return centroid[i3]; + } : function(i3) { + return attributes[i3](centroid); + }; + var getQ = function getQ2(i3) { + return attributes[i3](node2); + }; + var nodeP = centroid; + var nodeQ = node2; + return clusteringDistance(type2, attributes.length, getP, getQ, nodeP, nodeQ); + }; + var randomCentroids = function randomCentroids2(nodes2, k, attributes) { + var ndim = attributes.length; + var min3 = new Array(ndim); + var max3 = new Array(ndim); + var centroids = new Array(k); + var centroid = null; + for (var i3 = 0; i3 < ndim; i3++) { + min3[i3] = nodes2.min(attributes[i3]).value; + max3[i3] = nodes2.max(attributes[i3]).value; + } + for (var c2 = 0; c2 < k; c2++) { + centroid = []; + for (var _i = 0; _i < ndim; _i++) { + centroid[_i] = Math.random() * (max3[_i] - min3[_i]) + min3[_i]; + } + centroids[c2] = centroid; + } + return centroids; + }; + var classify = function classify2(node2, centroids, distance2, attributes, type2) { + var min3 = Infinity; + var index2 = 0; + for (var i3 = 0; i3 < centroids.length; i3++) { + var dist3 = getDist(distance2, node2, centroids[i3], attributes, type2); + if (dist3 < min3) { + min3 = dist3; + index2 = i3; + } + } + return index2; + }; + var buildCluster = function buildCluster2(centroid, nodes2, assignment) { + var cluster = []; + var node2 = null; + for (var n = 0; n < nodes2.length; n++) { + node2 = nodes2[n]; + if (assignment[node2.id()] === centroid) { + cluster.push(node2); + } + } + return cluster; + }; + var haveValuesConverged = function haveValuesConverged2(v1, v2, sensitivityThreshold) { + return Math.abs(v2 - v1) <= sensitivityThreshold; + }; + var haveMatricesConverged = function haveMatricesConverged2(v1, v2, sensitivityThreshold) { + for (var i3 = 0; i3 < v1.length; i3++) { + for (var j = 0; j < v1[i3].length; j++) { + var diff = Math.abs(v1[i3][j] - v2[i3][j]); + if (diff > sensitivityThreshold) { + return false; + } + } + } + return true; + }; + var seenBefore = function seenBefore2(node2, medoids, n) { + for (var i3 = 0; i3 < n; i3++) { + if (node2 === medoids[i3]) + return true; + } + return false; + }; + var randomMedoids = function randomMedoids2(nodes2, k) { + var medoids = new Array(k); + if (nodes2.length < 50) { + for (var i3 = 0; i3 < k; i3++) { + var node2 = nodes2[Math.floor(Math.random() * nodes2.length)]; + while (seenBefore(node2, medoids, i3)) { + node2 = nodes2[Math.floor(Math.random() * nodes2.length)]; + } + medoids[i3] = node2; + } + } else { + for (var _i2 = 0; _i2 < k; _i2++) { + medoids[_i2] = nodes2[Math.floor(Math.random() * nodes2.length)]; + } + } + return medoids; + }; + var findCost = function findCost2(potentialNewMedoid, cluster, attributes) { + var cost = 0; + for (var n = 0; n < cluster.length; n++) { + cost += getDist("manhattan", cluster[n], potentialNewMedoid, attributes, "kMedoids"); + } + return cost; + }; + var kMeans = function kMeans2(options2) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var node2 = null; + var opts = setOptions$2(options2); + var clusters = new Array(opts.k); + var assignment = {}; + var centroids; + if (opts.testMode) { + if (typeof opts.testCentroids === "number") { + opts.testCentroids; + centroids = randomCentroids(nodes2, opts.k, opts.attributes); + } else if (_typeof(opts.testCentroids) === "object") { + centroids = opts.testCentroids; + } else { + centroids = randomCentroids(nodes2, opts.k, opts.attributes); + } + } else { + centroids = randomCentroids(nodes2, opts.k, opts.attributes); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + for (var n = 0; n < nodes2.length; n++) { + node2 = nodes2[n]; + assignment[node2.id()] = classify(node2, centroids, opts.distance, opts.attributes, "kMeans"); + } + isStillMoving = false; + for (var c2 = 0; c2 < opts.k; c2++) { + var cluster = buildCluster(c2, nodes2, assignment); + if (cluster.length === 0) { + continue; + } + var ndim = opts.attributes.length; + var centroid = centroids[c2]; + var newCentroid = new Array(ndim); + var sum2 = new Array(ndim); + for (var d = 0; d < ndim; d++) { + sum2[d] = 0; + for (var i3 = 0; i3 < cluster.length; i3++) { + node2 = cluster[i3]; + sum2[d] += opts.attributes[d](node2); + } + newCentroid[d] = sum2[d] / cluster.length; + if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) { + isStillMoving = true; + } + } + centroids[c2] = newCentroid; + clusters[c2] = cy.collection(cluster); + } + iterations++; + } + return clusters; + }; + var kMedoids = function kMedoids2(options2) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var node2 = null; + var opts = setOptions$2(options2); + var clusters = new Array(opts.k); + var medoids; + var assignment = {}; + var curCost; + var minCosts = new Array(opts.k); + if (opts.testMode) { + if (typeof opts.testCentroids === "number") + ; + else if (_typeof(opts.testCentroids) === "object") { + medoids = opts.testCentroids; + } else { + medoids = randomMedoids(nodes2, opts.k); + } + } else { + medoids = randomMedoids(nodes2, opts.k); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + for (var n = 0; n < nodes2.length; n++) { + node2 = nodes2[n]; + assignment[node2.id()] = classify(node2, medoids, opts.distance, opts.attributes, "kMedoids"); + } + isStillMoving = false; + for (var m = 0; m < medoids.length; m++) { + var cluster = buildCluster(m, nodes2, assignment); + if (cluster.length === 0) { + continue; + } + minCosts[m] = findCost(medoids[m], cluster, opts.attributes); + for (var _n = 0; _n < cluster.length; _n++) { + curCost = findCost(cluster[_n], cluster, opts.attributes); + if (curCost < minCosts[m]) { + minCosts[m] = curCost; + medoids[m] = cluster[_n]; + isStillMoving = true; + } + } + clusters[m] = cy.collection(cluster); + } + iterations++; + } + return clusters; + }; + var updateCentroids = function updateCentroids2(centroids, nodes2, U, weight, opts) { + var numerator, denominator; + for (var n = 0; n < nodes2.length; n++) { + for (var c2 = 0; c2 < centroids.length; c2++) { + weight[n][c2] = Math.pow(U[n][c2], opts.m); + } + } + for (var _c = 0; _c < centroids.length; _c++) { + for (var dim = 0; dim < opts.attributes.length; dim++) { + numerator = 0; + denominator = 0; + for (var _n2 = 0; _n2 < nodes2.length; _n2++) { + numerator += weight[_n2][_c] * opts.attributes[dim](nodes2[_n2]); + denominator += weight[_n2][_c]; + } + centroids[_c][dim] = numerator / denominator; + } + } + }; + var updateMembership = function updateMembership2(U, _U, centroids, nodes2, opts) { + for (var i3 = 0; i3 < U.length; i3++) { + _U[i3] = U[i3].slice(); + } + var sum2, numerator, denominator; + var pow = 2 / (opts.m - 1); + for (var c2 = 0; c2 < centroids.length; c2++) { + for (var n = 0; n < nodes2.length; n++) { + sum2 = 0; + for (var k = 0; k < centroids.length; k++) { + numerator = getDist(opts.distance, nodes2[n], centroids[c2], opts.attributes, "cmeans"); + denominator = getDist(opts.distance, nodes2[n], centroids[k], opts.attributes, "cmeans"); + sum2 += Math.pow(numerator / denominator, pow); + } + U[n][c2] = 1 / sum2; + } + } + }; + var assign$1 = function assign2(nodes2, U, opts, cy) { + var clusters = new Array(opts.k); + for (var c2 = 0; c2 < clusters.length; c2++) { + clusters[c2] = []; + } + var max3; + var index2; + for (var n = 0; n < U.length; n++) { + max3 = -Infinity; + index2 = -1; + for (var _c2 = 0; _c2 < U[0].length; _c2++) { + if (U[n][_c2] > max3) { + max3 = U[n][_c2]; + index2 = _c2; + } + } + clusters[index2].push(nodes2[n]); + } + for (var _c3 = 0; _c3 < clusters.length; _c3++) { + clusters[_c3] = cy.collection(clusters[_c3]); + } + return clusters; + }; + var fuzzyCMeans = function fuzzyCMeans2(options2) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var opts = setOptions$2(options2); + var clusters; + var centroids; + var U; + var _U; + var weight; + _U = new Array(nodes2.length); + for (var i3 = 0; i3 < nodes2.length; i3++) { + _U[i3] = new Array(opts.k); + } + U = new Array(nodes2.length); + for (var _i3 = 0; _i3 < nodes2.length; _i3++) { + U[_i3] = new Array(opts.k); + } + for (var _i4 = 0; _i4 < nodes2.length; _i4++) { + var total = 0; + for (var j = 0; j < opts.k; j++) { + U[_i4][j] = Math.random(); + total += U[_i4][j]; + } + for (var _j = 0; _j < opts.k; _j++) { + U[_i4][_j] = U[_i4][_j] / total; + } + } + centroids = new Array(opts.k); + for (var _i5 = 0; _i5 < opts.k; _i5++) { + centroids[_i5] = new Array(opts.attributes.length); + } + weight = new Array(nodes2.length); + for (var _i6 = 0; _i6 < nodes2.length; _i6++) { + weight[_i6] = new Array(opts.k); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + updateCentroids(centroids, nodes2, U, weight, opts); + updateMembership(U, _U, centroids, nodes2, opts); + if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) { + isStillMoving = true; + } + iterations++; + } + clusters = assign$1(nodes2, U, opts, cy); + return { + clusters, + degreeOfMembership: U + }; + }; + var kClustering = { + kMeans, + kMedoids, + fuzzyCMeans, + fcm: fuzzyCMeans + }; + var defaults$a = defaults$g({ + distance: "euclidean", + // distance metric to compare nodes + linkage: "min", + // linkage criterion : how to determine the distance between clusters of nodes + mode: "threshold", + // mode:'threshold' => clusters must be threshold distance apart + threshold: Infinity, + // the distance threshold + // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters + addDendrogram: false, + // whether to add the dendrogram to the graph for viz + dendrogramDepth: 0, + // depth at which dendrogram branches are merged into the returned clusters + attributes: [] + // array of attr functions + }); + var linkageAliases = { + "single": "min", + "complete": "max" + }; + var setOptions$1 = function setOptions3(options2) { + var opts = defaults$a(options2); + var preferredAlias = linkageAliases[opts.linkage]; + if (preferredAlias != null) { + opts.linkage = preferredAlias; + } + return opts; + }; + var mergeClosest = function mergeClosest2(clusters, index2, dists, mins, opts) { + var minKey = 0; + var min3 = Infinity; + var dist3; + var attrs = opts.attributes; + var getDist2 = function getDist3(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function(i4) { + return attrs[i4](n1); + }, function(i4) { + return attrs[i4](n2); + }, n1, n2); + }; + for (var i3 = 0; i3 < clusters.length; i3++) { + var key = clusters[i3].key; + var _dist = dists[key][mins[key]]; + if (_dist < min3) { + minKey = key; + min3 = _dist; + } + } + if (opts.mode === "threshold" && min3 >= opts.threshold || opts.mode === "dendrogram" && clusters.length === 1) { + return false; + } + var c1 = index2[minKey]; + var c2 = index2[mins[minKey]]; + var merged; + if (opts.mode === "dendrogram") { + merged = { + left: c1, + right: c2, + key: c1.key + }; + } else { + merged = { + value: c1.value.concat(c2.value), + key: c1.key + }; + } + clusters[c1.index] = merged; + clusters.splice(c2.index, 1); + index2[c1.key] = merged; + for (var _i = 0; _i < clusters.length; _i++) { + var cur = clusters[_i]; + if (c1.key === cur.key) { + dist3 = Infinity; + } else if (opts.linkage === "min") { + dist3 = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) { + dist3 = dists[c2.key][cur.key]; + } + } else if (opts.linkage === "max") { + dist3 = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) { + dist3 = dists[c2.key][cur.key]; + } + } else if (opts.linkage === "mean") { + dist3 = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size); + } else { + if (opts.mode === "dendrogram") + dist3 = getDist2(cur.value, c1.value); + else + dist3 = getDist2(cur.value[0], c1.value[0]); + } + dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist3; + } + for (var _i2 = 0; _i2 < clusters.length; _i2++) { + var key1 = clusters[_i2].key; + if (mins[key1] === c1.key || mins[key1] === c2.key) { + var _min = key1; + for (var j = 0; j < clusters.length; j++) { + var key2 = clusters[j].key; + if (dists[key1][key2] < dists[key1][_min]) { + _min = key2; + } + } + mins[key1] = _min; + } + clusters[_i2].index = _i2; + } + c1.key = c2.key = c1.index = c2.index = null; + return true; + }; + var getAllChildren = function getAllChildren2(root3, arr, cy) { + if (!root3) + return; + if (root3.value) { + arr.push(root3.value); + } else { + if (root3.left) + getAllChildren2(root3.left, arr); + if (root3.right) + getAllChildren2(root3.right, arr); + } + }; + var buildDendrogram = function buildDendrogram2(root3, cy) { + if (!root3) + return ""; + if (root3.left && root3.right) { + var leftStr = buildDendrogram2(root3.left, cy); + var rightStr = buildDendrogram2(root3.right, cy); + var node2 = cy.add({ + group: "nodes", + data: { + id: leftStr + "," + rightStr + } + }); + cy.add({ + group: "edges", + data: { + source: leftStr, + target: node2.id() + } + }); + cy.add({ + group: "edges", + data: { + source: rightStr, + target: node2.id() + } + }); + return node2.id(); + } else if (root3.value) { + return root3.value.id(); + } + }; + var buildClustersFromTree = function buildClustersFromTree2(root3, k, cy) { + if (!root3) + return []; + var left2 = [], right2 = [], leaves = []; + if (k === 0) { + if (root3.left) + getAllChildren(root3.left, left2); + if (root3.right) + getAllChildren(root3.right, right2); + leaves = left2.concat(right2); + return [cy.collection(leaves)]; + } else if (k === 1) { + if (root3.value) { + return [cy.collection(root3.value)]; + } else { + if (root3.left) + getAllChildren(root3.left, left2); + if (root3.right) + getAllChildren(root3.right, right2); + return [cy.collection(left2), cy.collection(right2)]; + } + } else { + if (root3.value) { + return [cy.collection(root3.value)]; + } else { + if (root3.left) + left2 = buildClustersFromTree2(root3.left, k - 1, cy); + if (root3.right) + right2 = buildClustersFromTree2(root3.right, k - 1, cy); + return left2.concat(right2); + } + } + }; + var hierarchicalClustering = function hierarchicalClustering2(options2) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var opts = setOptions$1(options2); + var attrs = opts.attributes; + var getDist2 = function getDist3(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function(i4) { + return attrs[i4](n1); + }, function(i4) { + return attrs[i4](n2); + }, n1, n2); + }; + var clusters = []; + var dists = []; + var mins = []; + var index2 = []; + for (var n = 0; n < nodes2.length; n++) { + var cluster = { + value: opts.mode === "dendrogram" ? nodes2[n] : [nodes2[n]], + key: n, + index: n + }; + clusters[n] = cluster; + index2[n] = cluster; + dists[n] = []; + mins[n] = 0; + } + for (var i3 = 0; i3 < clusters.length; i3++) { + for (var j = 0; j <= i3; j++) { + var dist3 = void 0; + if (opts.mode === "dendrogram") { + dist3 = i3 === j ? Infinity : getDist2(clusters[i3].value, clusters[j].value); + } else { + dist3 = i3 === j ? Infinity : getDist2(clusters[i3].value[0], clusters[j].value[0]); + } + dists[i3][j] = dist3; + dists[j][i3] = dist3; + if (dist3 < dists[i3][mins[i3]]) { + mins[i3] = j; + } + } + } + var merged = mergeClosest(clusters, index2, dists, mins, opts); + while (merged) { + merged = mergeClosest(clusters, index2, dists, mins, opts); + } + var retClusters; + if (opts.mode === "dendrogram") { + retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy); + if (opts.addDendrogram) + buildDendrogram(clusters[0], cy); + } else { + retClusters = new Array(clusters.length); + clusters.forEach(function(cluster2, i4) { + cluster2.key = cluster2.index = null; + retClusters[i4] = cy.collection(cluster2.value); + }); + } + return retClusters; + }; + var hierarchicalClustering$1 = { + hierarchicalClustering, + hca: hierarchicalClustering + }; + var defaults$9 = defaults$g({ + distance: "euclidean", + // distance metric to compare attributes between two nodes + preference: "median", + // suitability of a data point to serve as an exemplar + damping: 0.8, + // damping factor between [0.5, 1) + maxIterations: 1e3, + // max number of iterations to run + minIterations: 100, + // min number of iterations to run in order for clustering to stop + attributes: [ + // functions to quantify the similarity between any two points + // e.g. node => node.data('weight') + ] + }); + var setOptions2 = function setOptions3(options2) { + var dmp = options2.damping; + var pref = options2.preference; + if (!(0.5 <= dmp && dmp < 1)) { + error("Damping must range on [0.5, 1). Got: ".concat(dmp)); + } + var validPrefs = ["median", "mean", "min", "max"]; + if (!(validPrefs.some(function(v) { + return v === pref; + }) || number$12(pref))) { + error("Preference must be one of [".concat(validPrefs.map(function(p2) { + return "'".concat(p2, "'"); + }).join(", "), "] or a number. Got: ").concat(pref)); + } + return defaults$9(options2); + }; + var getSimilarity = function getSimilarity2(type2, n1, n2, attributes) { + var attr = function attr2(n, i3) { + return attributes[i3](n); + }; + return -clusteringDistance(type2, attributes.length, function(i3) { + return attr(n1, i3); + }, function(i3) { + return attr(n2, i3); + }, n1, n2); + }; + var getPreference = function getPreference2(S, preference) { + var p2 = null; + if (preference === "median") { + p2 = median(S); + } else if (preference === "mean") { + p2 = mean(S); + } else if (preference === "min") { + p2 = min2(S); + } else if (preference === "max") { + p2 = max2(S); + } else { + p2 = preference; + } + return p2; + }; + var findExemplars = function findExemplars2(n, R, A) { + var indices = []; + for (var i3 = 0; i3 < n; i3++) { + if (R[i3 * n + i3] + A[i3 * n + i3] > 0) { + indices.push(i3); + } + } + return indices; + }; + var assignClusters = function assignClusters2(n, S, exemplars) { + var clusters = []; + for (var i3 = 0; i3 < n; i3++) { + var index2 = -1; + var max3 = -Infinity; + for (var ei = 0; ei < exemplars.length; ei++) { + var e = exemplars[ei]; + if (S[i3 * n + e] > max3) { + index2 = e; + max3 = S[i3 * n + e]; + } + } + if (index2 > 0) { + clusters.push(index2); + } + } + for (var _ei = 0; _ei < exemplars.length; _ei++) { + clusters[exemplars[_ei]] = exemplars[_ei]; + } + return clusters; + }; + var assign = function assign2(n, S, exemplars) { + var clusters = assignClusters(n, S, exemplars); + for (var ei = 0; ei < exemplars.length; ei++) { + var ii = []; + for (var c2 = 0; c2 < clusters.length; c2++) { + if (clusters[c2] === exemplars[ei]) { + ii.push(c2); + } + } + var maxI = -1; + var maxSum = -Infinity; + for (var i3 = 0; i3 < ii.length; i3++) { + var sum2 = 0; + for (var j = 0; j < ii.length; j++) { + sum2 += S[ii[j] * n + ii[i3]]; + } + if (sum2 > maxSum) { + maxI = i3; + maxSum = sum2; + } + } + exemplars[ei] = ii[maxI]; + } + clusters = assignClusters(n, S, exemplars); + return clusters; + }; + var affinityPropagation = function affinityPropagation2(options2) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var opts = setOptions2(options2); + var id2position = {}; + for (var i3 = 0; i3 < nodes2.length; i3++) { + id2position[nodes2[i3].id()] = i3; + } + var n; + var n2; + var S; + var p2; + var R; + var A; + n = nodes2.length; + n2 = n * n; + S = new Array(n2); + for (var _i = 0; _i < n2; _i++) { + S[_i] = -Infinity; + } + for (var _i2 = 0; _i2 < n; _i2++) { + for (var j = 0; j < n; j++) { + if (_i2 !== j) { + S[_i2 * n + j] = getSimilarity(opts.distance, nodes2[_i2], nodes2[j], opts.attributes); + } + } + } + p2 = getPreference(S, opts.preference); + for (var _i3 = 0; _i3 < n; _i3++) { + S[_i3 * n + _i3] = p2; + } + R = new Array(n2); + for (var _i4 = 0; _i4 < n2; _i4++) { + R[_i4] = 0; + } + A = new Array(n2); + for (var _i5 = 0; _i5 < n2; _i5++) { + A[_i5] = 0; + } + var old = new Array(n); + var Rp = new Array(n); + var se = new Array(n); + for (var _i6 = 0; _i6 < n; _i6++) { + old[_i6] = 0; + Rp[_i6] = 0; + se[_i6] = 0; + } + var e = new Array(n * opts.minIterations); + for (var _i7 = 0; _i7 < e.length; _i7++) { + e[_i7] = 0; + } + var iter; + for (iter = 0; iter < opts.maxIterations; iter++) { + for (var _i8 = 0; _i8 < n; _i8++) { + var max3 = -Infinity, max22 = -Infinity, maxI = -1, AS = 0; + for (var _j = 0; _j < n; _j++) { + old[_j] = R[_i8 * n + _j]; + AS = A[_i8 * n + _j] + S[_i8 * n + _j]; + if (AS >= max3) { + max22 = max3; + max3 = AS; + maxI = _j; + } else if (AS > max22) { + max22 = AS; + } + } + for (var _j2 = 0; _j2 < n; _j2++) { + R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max3) + opts.damping * old[_j2]; + } + R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max22) + opts.damping * old[maxI]; + } + for (var _i9 = 0; _i9 < n; _i9++) { + var sum2 = 0; + for (var _j3 = 0; _j3 < n; _j3++) { + old[_j3] = A[_j3 * n + _i9]; + Rp[_j3] = Math.max(0, R[_j3 * n + _i9]); + sum2 += Rp[_j3]; + } + sum2 -= Rp[_i9]; + Rp[_i9] = R[_i9 * n + _i9]; + sum2 += Rp[_i9]; + for (var _j4 = 0; _j4 < n; _j4++) { + A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum2 - Rp[_j4]) + opts.damping * old[_j4]; + } + A[_i9 * n + _i9] = (1 - opts.damping) * (sum2 - Rp[_i9]) + opts.damping * old[_i9]; + } + var K3 = 0; + for (var _i10 = 0; _i10 < n; _i10++) { + var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0; + e[iter % opts.minIterations * n + _i10] = E; + K3 += E; + } + if (K3 > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) { + var _sum = 0; + for (var _i11 = 0; _i11 < n; _i11++) { + se[_i11] = 0; + for (var _j5 = 0; _j5 < opts.minIterations; _j5++) { + se[_i11] += e[_j5 * n + _i11]; + } + if (se[_i11] === 0 || se[_i11] === opts.minIterations) { + _sum++; + } + } + if (_sum === n) { + break; + } + } + } + var exemplarsIndices = findExemplars(n, R, A); + var clusterIndices = assign(n, S, exemplarsIndices); + var clusters = {}; + for (var c2 = 0; c2 < exemplarsIndices.length; c2++) { + clusters[exemplarsIndices[c2]] = []; + } + for (var _i12 = 0; _i12 < nodes2.length; _i12++) { + var pos = id2position[nodes2[_i12].id()]; + var clusterIndex = clusterIndices[pos]; + if (clusterIndex != null) { + clusters[clusterIndex].push(nodes2[_i12]); + } + } + var retClusters = new Array(exemplarsIndices.length); + for (var _c = 0; _c < exemplarsIndices.length; _c++) { + retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]); + } + return retClusters; + }; + var affinityPropagation$1 = { + affinityPropagation, + ap: affinityPropagation + }; + var hierholzerDefaults = defaults$g({ + root: void 0, + directed: false + }); + var elesfn$k = { + hierholzer: function hierholzer(options2) { + if (!plainObject(options2)) { + var args = arguments; + options2 = { + root: args[0], + directed: args[1] + }; + } + var _hierholzerDefaults = hierholzerDefaults(options2), root3 = _hierholzerDefaults.root, directed = _hierholzerDefaults.directed; + var eles = this; + var dflag = false; + var oddIn; + var oddOut; + var startVertex; + if (root3) + startVertex = string2(root3) ? this.filter(root3)[0].id() : root3[0].id(); + var nodes2 = {}; + var edges2 = {}; + if (directed) { + eles.forEach(function(ele) { + var id2 = ele.id(); + if (ele.isNode()) { + var ind = ele.indegree(true); + var outd = ele.outdegree(true); + var d1 = ind - outd; + var d2 = outd - ind; + if (d1 == 1) { + if (oddIn) + dflag = true; + else + oddIn = id2; + } else if (d2 == 1) { + if (oddOut) + dflag = true; + else + oddOut = id2; + } else if (d2 > 1 || d1 > 1) { + dflag = true; + } + nodes2[id2] = []; + ele.outgoers().forEach(function(e) { + if (e.isEdge()) + nodes2[id2].push(e.id()); + }); + } else { + edges2[id2] = [void 0, ele.target().id()]; + } + }); + } else { + eles.forEach(function(ele) { + var id2 = ele.id(); + if (ele.isNode()) { + var d2 = ele.degree(true); + if (d2 % 2) { + if (!oddIn) + oddIn = id2; + else if (!oddOut) + oddOut = id2; + else + dflag = true; + } + nodes2[id2] = []; + ele.connectedEdges().forEach(function(e) { + return nodes2[id2].push(e.id()); + }); + } else { + edges2[id2] = [ele.source().id(), ele.target().id()]; + } + }); + } + var result = { + found: false, + trail: void 0 + }; + if (dflag) + return result; + else if (oddOut && oddIn) { + if (directed) { + if (startVertex && oddOut != startVertex) { + return result; + } + startVertex = oddOut; + } else { + if (startVertex && oddOut != startVertex && oddIn != startVertex) { + return result; + } else if (!startVertex) { + startVertex = oddOut; + } + } + } else { + if (!startVertex) + startVertex = eles[0].id(); + } + var walk = function walk2(v) { + var currentNode = v; + var subtour2 = [v]; + var adj, adjTail, adjHead; + while (nodes2[currentNode].length) { + adj = nodes2[currentNode].shift(); + adjTail = edges2[adj][0]; + adjHead = edges2[adj][1]; + if (currentNode != adjHead) { + nodes2[adjHead] = nodes2[adjHead].filter(function(e) { + return e != adj; + }); + currentNode = adjHead; + } else if (!directed && currentNode != adjTail) { + nodes2[adjTail] = nodes2[adjTail].filter(function(e) { + return e != adj; + }); + currentNode = adjTail; + } + subtour2.unshift(adj); + subtour2.unshift(currentNode); + } + return subtour2; + }; + var trail = []; + var subtour = []; + subtour = walk(startVertex); + while (subtour.length != 1) { + if (nodes2[subtour[0]].length == 0) { + trail.unshift(eles.getElementById(subtour.shift())); + trail.unshift(eles.getElementById(subtour.shift())); + } else { + subtour = walk(subtour.shift()).concat(subtour); + } + } + trail.unshift(eles.getElementById(subtour.shift())); + for (var d in nodes2) { + if (nodes2[d].length) { + return result; + } + } + result.found = true; + result.trail = this.spawn(trail, true); + return result; + } + }; + var hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected2() { + var eles = this; + var nodes2 = {}; + var id2 = 0; + var edgeCount2 = 0; + var components = []; + var stack = []; + var visitedEdges = {}; + var buildComponent = function buildComponent2(x2, y2) { + var i3 = stack.length - 1; + var cutset = []; + var component = eles.spawn(); + while (stack[i3].x != x2 || stack[i3].y != y2) { + cutset.push(stack.pop().edge); + i3--; + } + cutset.push(stack.pop().edge); + cutset.forEach(function(edge) { + var connectedNodes = edge.connectedNodes().intersection(eles); + component.merge(edge); + connectedNodes.forEach(function(node2) { + var nodeId = node2.id(); + var connectedEdges = node2.connectedEdges().intersection(eles); + component.merge(node2); + if (!nodes2[nodeId].cutVertex) { + component.merge(connectedEdges); + } else { + component.merge(connectedEdges.filter(function(edge2) { + return edge2.isLoop(); + })); + } + }); + }); + components.push(component); + }; + var biconnectedSearch = function biconnectedSearch2(root3, currentNode, parent) { + if (root3 === parent) + edgeCount2 += 1; + nodes2[currentNode] = { + id: id2, + low: id2++, + cutVertex: false + }; + var edges2 = eles.getElementById(currentNode).connectedEdges().intersection(eles); + if (edges2.size() === 0) { + components.push(eles.spawn(eles.getElementById(currentNode))); + } else { + var sourceId, targetId, otherNodeId, edgeId; + edges2.forEach(function(edge) { + sourceId = edge.source().id(); + targetId = edge.target().id(); + otherNodeId = sourceId === currentNode ? targetId : sourceId; + if (otherNodeId !== parent) { + edgeId = edge.id(); + if (!visitedEdges[edgeId]) { + visitedEdges[edgeId] = true; + stack.push({ + x: currentNode, + y: otherNodeId, + edge + }); + } + if (!(otherNodeId in nodes2)) { + biconnectedSearch2(root3, otherNodeId, currentNode); + nodes2[currentNode].low = Math.min(nodes2[currentNode].low, nodes2[otherNodeId].low); + if (nodes2[currentNode].id <= nodes2[otherNodeId].low) { + nodes2[currentNode].cutVertex = true; + buildComponent(currentNode, otherNodeId); + } + } else { + nodes2[currentNode].low = Math.min(nodes2[currentNode].low, nodes2[otherNodeId].id); + } + } + }); + } + }; + eles.forEach(function(ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes2)) { + edgeCount2 = 0; + biconnectedSearch(nodeId, nodeId); + nodes2[nodeId].cutVertex = edgeCount2 > 1; + } + } + }); + var cutVertices = Object.keys(nodes2).filter(function(id3) { + return nodes2[id3].cutVertex; + }).map(function(id3) { + return eles.getElementById(id3); + }); + return { + cut: eles.spawn(cutVertices), + components + }; + }; + var hopcroftTarjanBiconnected$1 = { + hopcroftTarjanBiconnected, + htbc: hopcroftTarjanBiconnected, + htb: hopcroftTarjanBiconnected, + hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected + }; + var tarjanStronglyConnected = function tarjanStronglyConnected2() { + var eles = this; + var nodes2 = {}; + var index2 = 0; + var components = []; + var stack = []; + var cut = eles.spawn(eles); + var stronglyConnectedSearch = function stronglyConnectedSearch2(sourceNodeId) { + stack.push(sourceNodeId); + nodes2[sourceNodeId] = { + index: index2, + low: index2++, + explored: false + }; + var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles); + connectedEdges.forEach(function(edge) { + var targetNodeId = edge.target().id(); + if (targetNodeId !== sourceNodeId) { + if (!(targetNodeId in nodes2)) { + stronglyConnectedSearch2(targetNodeId); + } + if (!nodes2[targetNodeId].explored) { + nodes2[sourceNodeId].low = Math.min(nodes2[sourceNodeId].low, nodes2[targetNodeId].low); + } + } + }); + if (nodes2[sourceNodeId].index === nodes2[sourceNodeId].low) { + var componentNodes = eles.spawn(); + for (; ; ) { + var nodeId = stack.pop(); + componentNodes.merge(eles.getElementById(nodeId)); + nodes2[nodeId].low = nodes2[sourceNodeId].index; + nodes2[nodeId].explored = true; + if (nodeId === sourceNodeId) { + break; + } + } + var componentEdges = componentNodes.edgesWith(componentNodes); + var component = componentNodes.merge(componentEdges); + components.push(component); + cut = cut.difference(component); + } + }; + eles.forEach(function(ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes2)) { + stronglyConnectedSearch(nodeId); + } + } + }); + return { + cut, + components + }; + }; + var tarjanStronglyConnected$1 = { + tarjanStronglyConnected, + tsc: tarjanStronglyConnected, + tscc: tarjanStronglyConnected, + tarjanStronglyConnectedComponents: tarjanStronglyConnected + }; + var elesfn$j = {}; + [elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function(props) { + extend2(elesfn$j, props); + }); + /*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + */ + var STATE_PENDING = 0; + var STATE_FULFILLED = 1; + var STATE_REJECTED = 2; + var api = function api2(executor) { + if (!(this instanceof api2)) + return new api2(executor); + this.id = "Thenable/1.0.7"; + this.state = STATE_PENDING; + this.fulfillValue = void 0; + this.rejectReason = void 0; + this.onFulfilled = []; + this.onRejected = []; + this.proxy = { + then: this.then.bind(this) + }; + if (typeof executor === "function") + executor.call(this, this.fulfill.bind(this), this.reject.bind(this)); + }; + api.prototype = { + /* promise resolving methods */ + fulfill: function fulfill(value2) { + return deliver(this, STATE_FULFILLED, "fulfillValue", value2); + }, + reject: function reject(value2) { + return deliver(this, STATE_REJECTED, "rejectReason", value2); + }, + /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ + then: function then(onFulfilled, onRejected) { + var curr = this; + var next2 = new api(); + curr.onFulfilled.push(resolver2(onFulfilled, next2, "fulfill")); + curr.onRejected.push(resolver2(onRejected, next2, "reject")); + execute(curr); + return next2.proxy; + } + }; + var deliver = function deliver2(curr, state2, name2, value2) { + if (curr.state === STATE_PENDING) { + curr.state = state2; + curr[name2] = value2; + execute(curr); + } + return curr; + }; + var execute = function execute2(curr) { + if (curr.state === STATE_FULFILLED) + execute_handlers(curr, "onFulfilled", curr.fulfillValue); + else if (curr.state === STATE_REJECTED) + execute_handlers(curr, "onRejected", curr.rejectReason); + }; + var execute_handlers = function execute_handlers2(curr, name2, value2) { + if (curr[name2].length === 0) + return; + var handlers = curr[name2]; + curr[name2] = []; + var func = function func2() { + for (var i3 = 0; i3 < handlers.length; i3++) { + handlers[i3](value2); + } + }; + if (typeof setImmediate === "function") + setImmediate(func); + else + setTimeout(func, 0); + }; + var resolver2 = function resolver3(cb, next2, method) { + return function(value2) { + if (typeof cb !== "function") + next2[method].call(next2, value2); + else { + var result; + try { + result = cb(value2); + } catch (e) { + next2.reject(e); + return; + } + resolve(next2, result); + } + }; + }; + var resolve = function resolve2(promise2, x2) { + if (promise2 === x2 || promise2.proxy === x2) { + promise2.reject(new TypeError("cannot resolve promise with itself")); + return; + } + var then; + if (_typeof(x2) === "object" && x2 !== null || typeof x2 === "function") { + try { + then = x2.then; + } catch (e) { + promise2.reject(e); + return; + } + } + if (typeof then === "function") { + var resolved = false; + try { + then.call( + x2, + /* resolvePromise */ + /* [Promises/A+ 2.3.3.3.1] */ + function(y2) { + if (resolved) + return; + resolved = true; + if (y2 === x2) + promise2.reject(new TypeError("circular thenable chain")); + else + resolve2(promise2, y2); + }, + /* rejectPromise */ + /* [Promises/A+ 2.3.3.3.2] */ + function(r) { + if (resolved) + return; + resolved = true; + promise2.reject(r); + } + ); + } catch (e) { + if (!resolved) + promise2.reject(e); + } + return; + } + promise2.fulfill(x2); + }; + api.all = function(ps) { + return new api(function(resolveAll2, rejectAll) { + var vals = new Array(ps.length); + var doneCount = 0; + var fulfill = function fulfill2(i4, val) { + vals[i4] = val; + doneCount++; + if (doneCount === ps.length) { + resolveAll2(vals); + } + }; + for (var i3 = 0; i3 < ps.length; i3++) { + (function(i4) { + var p2 = ps[i4]; + var isPromise = p2 != null && p2.then != null; + if (isPromise) { + p2.then(function(val2) { + fulfill(i4, val2); + }, function(err) { + rejectAll(err); + }); + } else { + var val = p2; + fulfill(i4, val); + } + })(i3); + } + }); + }; + api.resolve = function(val) { + return new api(function(resolve2, reject) { + resolve2(val); + }); + }; + api.reject = function(val) { + return new api(function(resolve2, reject) { + reject(val); + }); + }; + var Promise$12 = typeof Promise !== "undefined" ? Promise : api; + var Animation = function Animation2(target, opts, opts2) { + var isCore = core2(target); + var isEle = !isCore; + var _p = this._private = extend2({ + duration: 1e3 + }, opts, opts2); + _p.target = target; + _p.style = _p.style || _p.css; + _p.started = false; + _p.playing = false; + _p.hooked = false; + _p.applying = false; + _p.progress = 0; + _p.completes = []; + _p.frames = []; + if (_p.complete && fn$6(_p.complete)) { + _p.completes.push(_p.complete); + } + if (isEle) { + var pos = target.position(); + _p.startPosition = _p.startPosition || { + x: pos.x, + y: pos.y + }; + _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style); + } + if (isCore) { + var pan = target.pan(); + _p.startPan = { + x: pan.x, + y: pan.y + }; + _p.startZoom = target.zoom(); + } + this.length = 1; + this[0] = this; + }; + var anifn = Animation.prototype; + extend2(anifn, { + instanceString: function instanceString() { + return "animation"; + }, + hook: function hook() { + var _p = this._private; + if (!_p.hooked) { + var q; + var tAni = _p.target._private.animation; + if (_p.queue) { + q = tAni.queue; + } else { + q = tAni.current; + } + q.push(this); + if (elementOrCollection(_p.target)) { + _p.target.cy().addToAnimationPool(_p.target); + } + _p.hooked = true; + } + return this; + }, + play: function play() { + var _p = this._private; + if (_p.progress === 1) { + _p.progress = 0; + } + _p.playing = true; + _p.started = false; + _p.stopped = false; + this.hook(); + return this; + }, + playing: function playing() { + return this._private.playing; + }, + apply: function apply2() { + var _p = this._private; + _p.applying = true; + _p.started = false; + _p.stopped = false; + this.hook(); + return this; + }, + applying: function applying() { + return this._private.applying; + }, + pause: function pause() { + var _p = this._private; + _p.playing = false; + _p.started = false; + return this; + }, + stop: function stop() { + var _p = this._private; + _p.playing = false; + _p.started = false; + _p.stopped = true; + return this; + }, + rewind: function rewind() { + return this.progress(0); + }, + fastforward: function fastforward() { + return this.progress(1); + }, + time: function time2(t) { + var _p = this._private; + if (t === void 0) { + return _p.progress * _p.duration; + } else { + return this.progress(t / _p.duration); + } + }, + progress: function progress(p2) { + var _p = this._private; + var wasPlaying = _p.playing; + if (p2 === void 0) { + return _p.progress; + } else { + if (wasPlaying) { + this.pause(); + } + _p.progress = p2; + _p.started = false; + if (wasPlaying) { + this.play(); + } + } + return this; + }, + completed: function completed() { + return this._private.progress === 1; + }, + reverse: function reverse() { + var _p = this._private; + var wasPlaying = _p.playing; + if (wasPlaying) { + this.pause(); + } + _p.progress = 1 - _p.progress; + _p.started = false; + var swap = function swap2(a, b) { + var _pa = _p[a]; + if (_pa == null) { + return; + } + _p[a] = _p[b]; + _p[b] = _pa; + }; + swap("zoom", "startZoom"); + swap("pan", "startPan"); + swap("position", "startPosition"); + if (_p.style) { + for (var i3 = 0; i3 < _p.style.length; i3++) { + var prop = _p.style[i3]; + var name2 = prop.name; + var startStyleProp = _p.startStyle[name2]; + _p.startStyle[name2] = prop; + _p.style[i3] = startStyleProp; + } + } + if (wasPlaying) { + this.play(); + } + return this; + }, + promise: function promise2(type2) { + var _p = this._private; + var arr; + switch (type2) { + case "frame": + arr = _p.frames; + break; + default: + case "complete": + case "completed": + arr = _p.completes; + } + return new Promise$12(function(resolve2, reject) { + arr.push(function() { + resolve2(); + }); + }); + } + }); + anifn.complete = anifn.completed; + anifn.run = anifn.play; + anifn.running = anifn.playing; + var define$3 = { + animated: function animated() { + return function animatedImpl() { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all2 = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return false; + } + var ele = all2[0]; + if (ele) { + return ele._private.animation.current.length > 0; + } + }; + }, + // animated + clearQueue: function clearQueue() { + return function clearQueueImpl() { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all2 = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i3 = 0; i3 < all2.length; i3++) { + var ele = all2[i3]; + ele._private.animation.queue = []; + } + return this; + }; + }, + // clearQueue + delay: function delay() { + return function delayImpl(time2, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animate({ + delay: time2, + duration: time2, + complete + }); + }; + }, + // delay + delayAnimation: function delayAnimation() { + return function delayAnimationImpl(time2, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animation({ + delay: time2, + duration: time2, + complete + }); + }; + }, + // delay + animation: function animation() { + return function animationImpl(properties, params) { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all2 = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + var isCore = !selfIsArrayLike; + var isEles = !isCore; + if (!cy.styleEnabled()) { + return this; + } + var style = cy.style(); + properties = extend2({}, properties, params); + var propertiesEmpty = Object.keys(properties).length === 0; + if (propertiesEmpty) { + return new Animation(all2[0], properties); + } + if (properties.duration === void 0) { + properties.duration = 400; + } + switch (properties.duration) { + case "slow": + properties.duration = 600; + break; + case "fast": + properties.duration = 200; + break; + } + if (isEles) { + properties.style = style.getPropsList(properties.style || properties.css); + properties.css = void 0; + } + if (isEles && properties.renderedPosition != null) { + var rpos = properties.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + properties.position = renderedToModelPosition(rpos, zoom, pan); + } + if (isCore && properties.panBy != null) { + var panBy = properties.panBy; + var cyPan = cy.pan(); + properties.pan = { + x: cyPan.x + panBy.x, + y: cyPan.y + panBy.y + }; + } + var center2 = properties.center || properties.centre; + if (isCore && center2 != null) { + var centerPan = cy.getCenterPan(center2.eles, properties.zoom); + if (centerPan != null) { + properties.pan = centerPan; + } + } + if (isCore && properties.fit != null) { + var fit = properties.fit; + var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding); + if (fitVp != null) { + properties.pan = fitVp.pan; + properties.zoom = fitVp.zoom; + } + } + if (isCore && plainObject(properties.zoom)) { + var vp = cy.getZoomedViewport(properties.zoom); + if (vp != null) { + if (vp.zoomed) { + properties.zoom = vp.zoom; + } + if (vp.panned) { + properties.pan = vp.pan; + } + } else { + properties.zoom = null; + } + } + return new Animation(all2[0], properties); + }; + }, + // animate + animate: function animate() { + return function animateImpl(properties, params) { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all2 = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + if (params) { + properties = extend2({}, properties, params); + } + for (var i3 = 0; i3 < all2.length; i3++) { + var ele = all2[i3]; + var queue = ele.animated() && (properties.queue === void 0 || properties.queue); + var ani = ele.animation(properties, queue ? { + queue: true + } : void 0); + ani.play(); + } + return this; + }; + }, + // animate + stop: function stop() { + return function stopImpl(clearQueue, jumpToEnd) { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all2 = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i3 = 0; i3 < all2.length; i3++) { + var ele = all2[i3]; + var _p = ele._private; + var anis = _p.animation.current; + for (var j = 0; j < anis.length; j++) { + var ani = anis[j]; + var ani_p = ani._private; + if (jumpToEnd) { + ani_p.duration = 0; + } + } + if (clearQueue) { + _p.animation.queue = []; + } + if (!jumpToEnd) { + _p.animation.current = []; + } + } + cy.notify("draw"); + return this; + }; + } + // stop + }; + var isArray2 = Array.isArray; + var isArray_1 = isArray2; + var reIsDeepProp2 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp2 = /^\w*$/; + function isKey2(value2, object3) { + if (isArray_1(value2)) { + return false; + } + var type2 = typeof value2; + if (type2 == "number" || type2 == "symbol" || type2 == "boolean" || value2 == null || isSymbol_1(value2)) { + return true; + } + return reIsPlainProp2.test(value2) || !reIsDeepProp2.test(value2) || object3 != null && value2 in Object(object3); + } + var _isKey = isKey2; + var asyncTag2 = "[object AsyncFunction]", funcTag2 = "[object Function]", genTag2 = "[object GeneratorFunction]", proxyTag2 = "[object Proxy]"; + function isFunction2(value2) { + if (!isObject_12(value2)) { + return false; + } + var tag = _baseGetTag(value2); + return tag == funcTag2 || tag == genTag2 || tag == asyncTag2 || tag == proxyTag2; + } + var isFunction_1 = isFunction2; + var coreJsData2 = _root["__core-js_shared__"]; + var _coreJsData = coreJsData2; + var maskSrcKey2 = function() { + var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + function isMasked2(func) { + return !!maskSrcKey2 && maskSrcKey2 in func; + } + var _isMasked = isMasked2; + var funcProto$12 = Function.prototype; + var funcToString$12 = funcProto$12.toString; + function toSource2(func) { + if (func != null) { + try { + return funcToString$12.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var _toSource = toSource2; + var reRegExpChar2 = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor2 = /^\[object .+?Constructor\]$/; + var funcProto2 = Function.prototype, objectProto$32 = Object.prototype; + var funcToString2 = funcProto2.toString; + var hasOwnProperty$32 = objectProto$32.hasOwnProperty; + var reIsNative2 = RegExp( + "^" + funcToString2.call(hasOwnProperty$32).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + function baseIsNative2(value2) { + if (!isObject_12(value2) || _isMasked(value2)) { + return false; + } + var pattern = isFunction_1(value2) ? reIsNative2 : reIsHostCtor2; + return pattern.test(_toSource(value2)); + } + var _baseIsNative = baseIsNative2; + function getValue$1(object3, key) { + return object3 == null ? void 0 : object3[key]; + } + var _getValue = getValue$1; + function getNative2(object3, key) { + var value2 = _getValue(object3, key); + return _baseIsNative(value2) ? value2 : void 0; + } + var _getNative = getNative2; + var nativeCreate2 = _getNative(Object, "create"); + var _nativeCreate = nativeCreate2; + function hashClear2() { + this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; + this.size = 0; + } + var _hashClear = hashClear2; + function hashDelete2(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + var _hashDelete = hashDelete2; + var HASH_UNDEFINED$12 = "__lodash_hash_undefined__"; + var objectProto$22 = Object.prototype; + var hasOwnProperty$22 = objectProto$22.hasOwnProperty; + function hashGet2(key) { + var data2 = this.__data__; + if (_nativeCreate) { + var result = data2[key]; + return result === HASH_UNDEFINED$12 ? void 0 : result; + } + return hasOwnProperty$22.call(data2, key) ? data2[key] : void 0; + } + var _hashGet = hashGet2; + var objectProto$12 = Object.prototype; + var hasOwnProperty$12 = objectProto$12.hasOwnProperty; + function hashHas2(key) { + var data2 = this.__data__; + return _nativeCreate ? data2[key] !== void 0 : hasOwnProperty$12.call(data2, key); + } + var _hashHas = hashHas2; + var HASH_UNDEFINED2 = "__lodash_hash_undefined__"; + function hashSet2(key, value2) { + var data2 = this.__data__; + this.size += this.has(key) ? 0 : 1; + data2[key] = _nativeCreate && value2 === void 0 ? HASH_UNDEFINED2 : value2; + return this; + } + var _hashSet = hashSet2; + function Hash2(entries2) { + var index2 = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index2 < length2) { + var entry = entries2[index2]; + this.set(entry[0], entry[1]); + } + } + Hash2.prototype.clear = _hashClear; + Hash2.prototype["delete"] = _hashDelete; + Hash2.prototype.get = _hashGet; + Hash2.prototype.has = _hashHas; + Hash2.prototype.set = _hashSet; + var _Hash = Hash2; + function listCacheClear2() { + this.__data__ = []; + this.size = 0; + } + var _listCacheClear = listCacheClear2; + function eq2(value2, other) { + return value2 === other || value2 !== value2 && other !== other; + } + var eq_1 = eq2; + function assocIndexOf2(array3, key) { + var length2 = array3.length; + while (length2--) { + if (eq_1(array3[length2][0], key)) { + return length2; + } + } + return -1; + } + var _assocIndexOf = assocIndexOf2; + var arrayProto2 = Array.prototype; + var splice2 = arrayProto2.splice; + function listCacheDelete2(key) { + var data2 = this.__data__, index2 = _assocIndexOf(data2, key); + if (index2 < 0) { + return false; + } + var lastIndex = data2.length - 1; + if (index2 == lastIndex) { + data2.pop(); + } else { + splice2.call(data2, index2, 1); + } + --this.size; + return true; + } + var _listCacheDelete = listCacheDelete2; + function listCacheGet2(key) { + var data2 = this.__data__, index2 = _assocIndexOf(data2, key); + return index2 < 0 ? void 0 : data2[index2][1]; + } + var _listCacheGet = listCacheGet2; + function listCacheHas2(key) { + return _assocIndexOf(this.__data__, key) > -1; + } + var _listCacheHas = listCacheHas2; + function listCacheSet2(key, value2) { + var data2 = this.__data__, index2 = _assocIndexOf(data2, key); + if (index2 < 0) { + ++this.size; + data2.push([key, value2]); + } else { + data2[index2][1] = value2; + } + return this; + } + var _listCacheSet = listCacheSet2; + function ListCache2(entries2) { + var index2 = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index2 < length2) { + var entry = entries2[index2]; + this.set(entry[0], entry[1]); + } + } + ListCache2.prototype.clear = _listCacheClear; + ListCache2.prototype["delete"] = _listCacheDelete; + ListCache2.prototype.get = _listCacheGet; + ListCache2.prototype.has = _listCacheHas; + ListCache2.prototype.set = _listCacheSet; + var _ListCache = ListCache2; + var Map$12 = _getNative(_root, "Map"); + var _Map = Map$12; + function mapCacheClear2() { + this.size = 0; + this.__data__ = { + "hash": new _Hash(), + "map": new (_Map || _ListCache)(), + "string": new _Hash() + }; + } + var _mapCacheClear = mapCacheClear2; + function isKeyable2(value2) { + var type2 = typeof value2; + return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value2 !== "__proto__" : value2 === null; + } + var _isKeyable = isKeyable2; + function getMapData2(map2, key) { + var data2 = map2.__data__; + return _isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map; + } + var _getMapData = getMapData2; + function mapCacheDelete2(key) { + var result = _getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + var _mapCacheDelete = mapCacheDelete2; + function mapCacheGet2(key) { + return _getMapData(this, key).get(key); + } + var _mapCacheGet = mapCacheGet2; + function mapCacheHas2(key) { + return _getMapData(this, key).has(key); + } + var _mapCacheHas = mapCacheHas2; + function mapCacheSet2(key, value2) { + var data2 = _getMapData(this, key), size2 = data2.size; + data2.set(key, value2); + this.size += data2.size == size2 ? 0 : 1; + return this; + } + var _mapCacheSet = mapCacheSet2; + function MapCache2(entries2) { + var index2 = -1, length2 = entries2 == null ? 0 : entries2.length; + this.clear(); + while (++index2 < length2) { + var entry = entries2[index2]; + this.set(entry[0], entry[1]); + } + } + MapCache2.prototype.clear = _mapCacheClear; + MapCache2.prototype["delete"] = _mapCacheDelete; + MapCache2.prototype.get = _mapCacheGet; + MapCache2.prototype.has = _mapCacheHas; + MapCache2.prototype.set = _mapCacheSet; + var _MapCache = MapCache2; + var FUNC_ERROR_TEXT2 = "Expected a function"; + function memoize2(func, resolver3) { + if (typeof func != "function" || resolver3 != null && typeof resolver3 != "function") { + throw new TypeError(FUNC_ERROR_TEXT2); + } + var memoized = function() { + var args = arguments, key = resolver3 ? resolver3.apply(this, args) : args[0], cache2 = memoized.cache; + if (cache2.has(key)) { + return cache2.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache2.set(key, result) || cache2; + return result; + }; + memoized.cache = new (memoize2.Cache || _MapCache)(); + return memoized; + } + memoize2.Cache = _MapCache; + var memoize_1 = memoize2; + var MAX_MEMOIZE_SIZE2 = 500; + function memoizeCapped2(func) { + var result = memoize_1(func, function(key) { + if (cache2.size === MAX_MEMOIZE_SIZE2) { + cache2.clear(); + } + return key; + }); + var cache2 = result.cache; + return result; + } + var _memoizeCapped = memoizeCapped2; + var rePropName2 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar2 = /\\(\\)?/g; + var stringToPath2 = _memoizeCapped(function(string3) { + var result = []; + if (string3.charCodeAt(0) === 46) { + result.push(""); + } + string3.replace(rePropName2, function(match2, number3, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar2, "$1") : number3 || match2); + }); + return result; + }); + var _stringToPath = stringToPath2; + function arrayMap2(array3, iteratee) { + var index2 = -1, length2 = array3 == null ? 0 : array3.length, result = Array(length2); + while (++index2 < length2) { + result[index2] = iteratee(array3[index2], index2, array3); + } + return result; + } + var _arrayMap = arrayMap2; + var INFINITY$12 = 1 / 0; + var symbolProto2 = _Symbol ? _Symbol.prototype : void 0, symbolToString2 = symbolProto2 ? symbolProto2.toString : void 0; + function baseToString2(value2) { + if (typeof value2 == "string") { + return value2; + } + if (isArray_1(value2)) { + return _arrayMap(value2, baseToString2) + ""; + } + if (isSymbol_1(value2)) { + return symbolToString2 ? symbolToString2.call(value2) : ""; + } + var result = value2 + ""; + return result == "0" && 1 / value2 == -INFINITY$12 ? "-0" : result; + } + var _baseToString = baseToString2; + function toString$12(value2) { + return value2 == null ? "" : _baseToString(value2); + } + var toString_1 = toString$12; + function castPath2(value2, object3) { + if (isArray_1(value2)) { + return value2; + } + return _isKey(value2, object3) ? [value2] : _stringToPath(toString_1(value2)); + } + var _castPath = castPath2; + var INFINITY2 = 1 / 0; + function toKey2(value2) { + if (typeof value2 == "string" || isSymbol_1(value2)) { + return value2; + } + var result = value2 + ""; + return result == "0" && 1 / value2 == -INFINITY2 ? "-0" : result; + } + var _toKey = toKey2; + function baseGet2(object3, path2) { + path2 = _castPath(path2, object3); + var index2 = 0, length2 = path2.length; + while (object3 != null && index2 < length2) { + object3 = object3[_toKey(path2[index2++])]; + } + return index2 && index2 == length2 ? object3 : void 0; + } + var _baseGet = baseGet2; + function get2(object3, path2, defaultValue) { + var result = object3 == null ? void 0 : _baseGet(object3, path2); + return result === void 0 ? defaultValue : result; + } + var get_1 = get2; + var defineProperty2 = function() { + try { + var func = _getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + var _defineProperty = defineProperty2; + function baseAssignValue2(object3, key, value2) { + if (key == "__proto__" && _defineProperty) { + _defineProperty(object3, key, { + "configurable": true, + "enumerable": true, + "value": value2, + "writable": true + }); + } else { + object3[key] = value2; + } + } + var _baseAssignValue = baseAssignValue2; + var objectProto2 = Object.prototype; + var hasOwnProperty2 = objectProto2.hasOwnProperty; + function assignValue2(object3, key, value2) { + var objValue = object3[key]; + if (!(hasOwnProperty2.call(object3, key) && eq_1(objValue, value2)) || value2 === void 0 && !(key in object3)) { + _baseAssignValue(object3, key, value2); + } + } + var _assignValue = assignValue2; + var MAX_SAFE_INTEGER2 = 9007199254740991; + var reIsUint2 = /^(?:0|[1-9]\d*)$/; + function isIndex2(value2, length2) { + var type2 = typeof value2; + length2 = length2 == null ? MAX_SAFE_INTEGER2 : length2; + return !!length2 && (type2 == "number" || type2 != "symbol" && reIsUint2.test(value2)) && (value2 > -1 && value2 % 1 == 0 && value2 < length2); + } + var _isIndex = isIndex2; + function baseSet2(object3, path2, value2, customizer) { + if (!isObject_12(object3)) { + return object3; + } + path2 = _castPath(path2, object3); + var index2 = -1, length2 = path2.length, lastIndex = length2 - 1, nested = object3; + while (nested != null && ++index2 < length2) { + var key = _toKey(path2[index2]), newValue = value2; + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return object3; + } + if (index2 != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : void 0; + if (newValue === void 0) { + newValue = isObject_12(objValue) ? objValue : _isIndex(path2[index2 + 1]) ? [] : {}; + } + } + _assignValue(nested, key, newValue); + nested = nested[key]; + } + return object3; + } + var _baseSet = baseSet2; + function set2(object3, path2, value2) { + return object3 == null ? object3 : _baseSet(object3, path2, value2); + } + var set_1 = set2; + function copyArray2(source, array3) { + var index2 = -1, length2 = source.length; + array3 || (array3 = Array(length2)); + while (++index2 < length2) { + array3[index2] = source[index2]; + } + return array3; + } + var _copyArray = copyArray2; + function toPath(value2) { + if (isArray_1(value2)) { + return _arrayMap(value2, _toKey); + } + return isSymbol_1(value2) ? [value2] : _copyArray(_stringToPath(toString_1(value2))); + } + var toPath_1 = toPath; + var define$2 = { + // access data field + data: function data2(params) { + var defaults3 = { + field: "data", + bindingEvent: "data", + allowBinding: false, + allowSetting: false, + allowGetting: false, + settingEvent: "data", + settingTriggersEvent: false, + triggerFnName: "trigger", + immutableKeys: {}, + // key => true if immutable + updateStyle: false, + beforeGet: function beforeGet(self2) { + }, + beforeSet: function beforeSet(self2, obj) { + }, + onSet: function onSet(self2) { + }, + canSet: function canSet(self2) { + return true; + } + }; + params = extend2({}, defaults3, params); + return function dataImpl(name2, value2) { + var p2 = params; + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all2 = selfIsArrayLike ? self2 : [self2]; + var single = selfIsArrayLike ? self2[0] : self2; + if (string2(name2)) { + var isPathLike = name2.indexOf(".") !== -1; + var path2 = isPathLike && toPath_1(name2); + if (p2.allowGetting && value2 === void 0) { + var ret; + if (single) { + p2.beforeGet(single); + if (path2 && single._private[p2.field][name2] === void 0) { + ret = get_1(single._private[p2.field], path2); + } else { + ret = single._private[p2.field][name2]; + } + } + return ret; + } else if (p2.allowSetting && value2 !== void 0) { + var valid2 = !p2.immutableKeys[name2]; + if (valid2) { + var change2 = _defineProperty$1({}, name2, value2); + p2.beforeSet(self2, change2); + for (var i3 = 0, l = all2.length; i3 < l; i3++) { + var ele = all2[i3]; + if (p2.canSet(ele)) { + if (path2 && single._private[p2.field][name2] === void 0) { + set_1(ele._private[p2.field], path2, value2); + } else { + ele._private[p2.field][name2] = value2; + } + } + } + if (p2.updateStyle) { + self2.updateStyle(); + } + p2.onSet(self2); + if (p2.settingTriggersEvent) { + self2[p2.triggerFnName](p2.settingEvent); + } + } + } + } else if (p2.allowSetting && plainObject(name2)) { + var obj = name2; + var k, v; + var keys2 = Object.keys(obj); + p2.beforeSet(self2, obj); + for (var _i = 0; _i < keys2.length; _i++) { + k = keys2[_i]; + v = obj[k]; + var _valid = !p2.immutableKeys[k]; + if (_valid) { + for (var j = 0; j < all2.length; j++) { + var _ele = all2[j]; + if (p2.canSet(_ele)) { + _ele._private[p2.field][k] = v; + } + } + } + } + if (p2.updateStyle) { + self2.updateStyle(); + } + p2.onSet(self2); + if (p2.settingTriggersEvent) { + self2[p2.triggerFnName](p2.settingEvent); + } + } else if (p2.allowBinding && fn$6(name2)) { + var fn2 = name2; + self2.on(p2.bindingEvent, fn2); + } else if (p2.allowGetting && name2 === void 0) { + var _ret; + if (single) { + p2.beforeGet(single); + _ret = single._private[p2.field]; + } + return _ret; + } + return self2; + }; + }, + // data + // remove data field + removeData: function removeData(params) { + var defaults3 = { + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: false, + immutableKeys: {} + // key => true if immutable + }; + params = extend2({}, defaults3, params); + return function removeDataImpl(names) { + var p2 = params; + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all2 = selfIsArrayLike ? self2 : [self2]; + if (string2(names)) { + var keys2 = names.split(/\s+/); + var l = keys2.length; + for (var i3 = 0; i3 < l; i3++) { + var key = keys2[i3]; + if (emptyString(key)) { + continue; + } + var valid2 = !p2.immutableKeys[key]; + if (valid2) { + for (var i_a = 0, l_a = all2.length; i_a < l_a; i_a++) { + all2[i_a]._private[p2.field][key] = void 0; + } + } + } + if (p2.triggerEvent) { + self2[p2.triggerFnName](p2.event); + } + } else if (names === void 0) { + for (var _i_a = 0, _l_a = all2.length; _i_a < _l_a; _i_a++) { + var _privateFields = all2[_i_a]._private[p2.field]; + var _keys = Object.keys(_privateFields); + for (var _i2 = 0; _i2 < _keys.length; _i2++) { + var _key = _keys[_i2]; + var validKeyToDelete = !p2.immutableKeys[_key]; + if (validKeyToDelete) { + _privateFields[_key] = void 0; + } + } + } + if (p2.triggerEvent) { + self2[p2.triggerFnName](p2.event); + } + } + return self2; + }; + } + // removeData + }; + var define$1 = { + eventAliasesOn: function eventAliasesOn(proto) { + var p2 = proto; + p2.addListener = p2.listen = p2.bind = p2.on; + p2.unlisten = p2.unbind = p2.off = p2.removeListener; + p2.trigger = p2.emit; + p2.pon = p2.promiseOn = function(events, selector2) { + var self2 = this; + var args = Array.prototype.slice.call(arguments, 0); + return new Promise$12(function(resolve2, reject) { + var callback = function callback2(e) { + self2.off.apply(self2, offArgs); + resolve2(e); + }; + var onArgs = args.concat([callback]); + var offArgs = onArgs.concat([]); + self2.on.apply(self2, onArgs); + }); + }; + } + }; + var define3 = {}; + [define$3, define$2, define$1].forEach(function(m) { + extend2(define3, m); + }); + var elesfn$i = { + animate: define3.animate(), + animation: define3.animation(), + animated: define3.animated(), + clearQueue: define3.clearQueue(), + delay: define3.delay(), + delayAnimation: define3.delayAnimation(), + stop: define3.stop() + }; + var elesfn$h = { + classes: function classes2(_classes) { + var self2 = this; + if (_classes === void 0) { + var ret = []; + self2[0]._private.classes.forEach(function(cls2) { + return ret.push(cls2); + }); + return ret; + } else if (!array2(_classes)) { + _classes = (_classes || "").match(/\S+/g) || []; + } + var changed = []; + var classesSet = new Set$12(_classes); + for (var j = 0; j < self2.length; j++) { + var ele = self2[j]; + var _p = ele._private; + var eleClasses = _p.classes; + var changedEle = false; + for (var i3 = 0; i3 < _classes.length; i3++) { + var cls = _classes[i3]; + var eleHasClass = eleClasses.has(cls); + if (!eleHasClass) { + changedEle = true; + break; + } + } + if (!changedEle) { + changedEle = eleClasses.size !== _classes.length; + } + if (changedEle) { + _p.classes = classesSet; + changed.push(ele); + } + } + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit("class"); + } + return self2; + }, + addClass: function addClass2(classes2) { + return this.toggleClass(classes2, true); + }, + hasClass: function hasClass(className) { + var ele = this[0]; + return ele != null && ele._private.classes.has(className); + }, + toggleClass: function toggleClass(classes2, toggle) { + if (!array2(classes2)) { + classes2 = classes2.match(/\S+/g) || []; + } + var self2 = this; + var toggleUndefd = toggle === void 0; + var changed = []; + for (var i3 = 0, il = self2.length; i3 < il; i3++) { + var ele = self2[i3]; + var eleClasses = ele._private.classes; + var changedEle = false; + for (var j = 0; j < classes2.length; j++) { + var cls = classes2[j]; + var hasClass = eleClasses.has(cls); + var changedNow = false; + if (toggle || toggleUndefd && !hasClass) { + eleClasses.add(cls); + changedNow = true; + } else if (!toggle || toggleUndefd && hasClass) { + eleClasses["delete"](cls); + changedNow = true; + } + if (!changedEle && changedNow) { + changed.push(ele); + changedEle = true; + } + } + } + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit("class"); + } + return self2; + }, + removeClass: function removeClass(classes2) { + return this.toggleClass(classes2, false); + }, + flashClass: function flashClass(classes2, duration) { + var self2 = this; + if (duration == null) { + duration = 250; + } else if (duration === 0) { + return self2; + } + self2.addClass(classes2); + setTimeout(function() { + self2.removeClass(classes2); + }, duration); + return self2; + } + }; + elesfn$h.className = elesfn$h.classNames = elesfn$h.classes; + var tokens = { + metaChar: "[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]", + // chars we need to escape in let names, etc + comparatorOp: "=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=", + // binary comparison op (used in data selectors) + boolOp: "\\?|\\!|\\^", + // boolean (unary) operators (used in data selectors) + string: `"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`, + // string literals (used in data selectors) -- doublequotes | singlequotes + number: number2, + // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 + meta: "degree|indegree|outdegree", + // allowed metadata fields (i.e. allowed functions to use from Collection) + separator: "\\s*,\\s*", + // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass + descendant: "\\s+", + child: "\\s+>\\s+", + subject: "\\$", + group: "node|edge|\\*", + directedEdge: "\\s+->\\s+", + undirectedEdge: "\\s+<->\\s+" + }; + tokens.variable = "(?:[\\w-.]|(?:\\\\" + tokens.metaChar + "))+"; + tokens.className = "(?:[\\w-]|(?:\\\\" + tokens.metaChar + "))+"; + tokens.value = tokens.string + "|" + tokens.number; + tokens.id = tokens.variable; + (function() { + var ops, op, i3; + ops = tokens.comparatorOp.split("|"); + for (i3 = 0; i3 < ops.length; i3++) { + op = ops[i3]; + tokens.comparatorOp += "|@" + op; + } + ops = tokens.comparatorOp.split("|"); + for (i3 = 0; i3 < ops.length; i3++) { + op = ops[i3]; + if (op.indexOf("!") >= 0) { + continue; + } + if (op === "=") { + continue; + } + tokens.comparatorOp += "|\\!" + op; + } + })(); + var newQuery = function newQuery2() { + return { + checks: [] + }; + }; + var Type2 = { + /** E.g. node */ + GROUP: 0, + /** A collection of elements */ + COLLECTION: 1, + /** A filter(ele) function */ + FILTER: 2, + /** E.g. [foo > 1] */ + DATA_COMPARE: 3, + /** E.g. [foo] */ + DATA_EXIST: 4, + /** E.g. [?foo] */ + DATA_BOOL: 5, + /** E.g. [[degree > 2]] */ + META_COMPARE: 6, + /** E.g. :selected */ + STATE: 7, + /** E.g. #foo */ + ID: 8, + /** E.g. .foo */ + CLASS: 9, + /** E.g. #foo <-> #bar */ + UNDIRECTED_EDGE: 10, + /** E.g. #foo -> #bar */ + DIRECTED_EDGE: 11, + /** E.g. $#foo -> #bar */ + NODE_SOURCE: 12, + /** E.g. #foo -> $#bar */ + NODE_TARGET: 13, + /** E.g. $#foo <-> #bar */ + NODE_NEIGHBOR: 14, + /** E.g. #foo > #bar */ + CHILD: 15, + /** E.g. #foo #bar */ + DESCENDANT: 16, + /** E.g. $#foo > #bar */ + PARENT: 17, + /** E.g. $#foo #bar */ + ANCESTOR: 18, + /** E.g. #foo > $bar > #baz */ + COMPOUND_SPLIT: 19, + /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ + TRUE: 20 + }; + var stateSelectors = [{ + selector: ":selected", + matches: function matches2(ele) { + return ele.selected(); + } + }, { + selector: ":unselected", + matches: function matches2(ele) { + return !ele.selected(); + } + }, { + selector: ":selectable", + matches: function matches2(ele) { + return ele.selectable(); + } + }, { + selector: ":unselectable", + matches: function matches2(ele) { + return !ele.selectable(); + } + }, { + selector: ":locked", + matches: function matches2(ele) { + return ele.locked(); + } + }, { + selector: ":unlocked", + matches: function matches2(ele) { + return !ele.locked(); + } + }, { + selector: ":visible", + matches: function matches2(ele) { + return ele.visible(); + } + }, { + selector: ":hidden", + matches: function matches2(ele) { + return !ele.visible(); + } + }, { + selector: ":transparent", + matches: function matches2(ele) { + return ele.transparent(); + } + }, { + selector: ":grabbed", + matches: function matches2(ele) { + return ele.grabbed(); + } + }, { + selector: ":free", + matches: function matches2(ele) { + return !ele.grabbed(); + } + }, { + selector: ":removed", + matches: function matches2(ele) { + return ele.removed(); + } + }, { + selector: ":inside", + matches: function matches2(ele) { + return !ele.removed(); + } + }, { + selector: ":grabbable", + matches: function matches2(ele) { + return ele.grabbable(); + } + }, { + selector: ":ungrabbable", + matches: function matches2(ele) { + return !ele.grabbable(); + } + }, { + selector: ":animated", + matches: function matches2(ele) { + return ele.animated(); + } + }, { + selector: ":unanimated", + matches: function matches2(ele) { + return !ele.animated(); + } + }, { + selector: ":parent", + matches: function matches2(ele) { + return ele.isParent(); + } + }, { + selector: ":childless", + matches: function matches2(ele) { + return ele.isChildless(); + } + }, { + selector: ":child", + matches: function matches2(ele) { + return ele.isChild(); + } + }, { + selector: ":orphan", + matches: function matches2(ele) { + return ele.isOrphan(); + } + }, { + selector: ":nonorphan", + matches: function matches2(ele) { + return ele.isChild(); + } + }, { + selector: ":compound", + matches: function matches2(ele) { + if (ele.isNode()) { + return ele.isParent(); + } else { + return ele.source().isParent() || ele.target().isParent(); + } + } + }, { + selector: ":loop", + matches: function matches2(ele) { + return ele.isLoop(); + } + }, { + selector: ":simple", + matches: function matches2(ele) { + return ele.isSimple(); + } + }, { + selector: ":active", + matches: function matches2(ele) { + return ele.active(); + } + }, { + selector: ":inactive", + matches: function matches2(ele) { + return !ele.active(); + } + }, { + selector: ":backgrounding", + matches: function matches2(ele) { + return ele.backgrounding(); + } + }, { + selector: ":nonbackgrounding", + matches: function matches2(ele) { + return !ele.backgrounding(); + } + }].sort(function(a, b) { + return descending2(a.selector, b.selector); + }); + var lookup = function() { + var selToFn = {}; + var s; + for (var i3 = 0; i3 < stateSelectors.length; i3++) { + s = stateSelectors[i3]; + selToFn[s.selector] = s.matches; + } + return selToFn; + }(); + var stateSelectorMatches = function stateSelectorMatches2(sel, ele) { + return lookup[sel](ele); + }; + var stateSelectorRegex = "(" + stateSelectors.map(function(s) { + return s.selector; + }).join("|") + ")"; + var cleanMetaChars = function cleanMetaChars2(str2) { + return str2.replace(new RegExp("\\\\(" + tokens.metaChar + ")", "g"), function(match2, $1) { + return $1; + }); + }; + var replaceLastQuery = function replaceLastQuery2(selector2, examiningQuery, replacementQuery) { + selector2[selector2.length - 1] = replacementQuery; + }; + var exprs = [{ + name: "group", + // just used for identifying when debugging + query: true, + regex: "(" + tokens.group + ")", + populate: function populate(selector2, query, _ref) { + var _ref2 = _slicedToArray(_ref, 1), group = _ref2[0]; + query.checks.push({ + type: Type2.GROUP, + value: group === "*" ? group : group + "s" + }); + } + }, { + name: "state", + query: true, + regex: stateSelectorRegex, + populate: function populate(selector2, query, _ref3) { + var _ref4 = _slicedToArray(_ref3, 1), state2 = _ref4[0]; + query.checks.push({ + type: Type2.STATE, + value: state2 + }); + } + }, { + name: "id", + query: true, + regex: "\\#(" + tokens.id + ")", + populate: function populate(selector2, query, _ref5) { + var _ref6 = _slicedToArray(_ref5, 1), id2 = _ref6[0]; + query.checks.push({ + type: Type2.ID, + value: cleanMetaChars(id2) + }); + } + }, { + name: "className", + query: true, + regex: "\\.(" + tokens.className + ")", + populate: function populate(selector2, query, _ref7) { + var _ref8 = _slicedToArray(_ref7, 1), className = _ref8[0]; + query.checks.push({ + type: Type2.CLASS, + value: cleanMetaChars(className) + }); + } + }, { + name: "dataExists", + query: true, + regex: "\\[\\s*(" + tokens.variable + ")\\s*\\]", + populate: function populate(selector2, query, _ref9) { + var _ref10 = _slicedToArray(_ref9, 1), variable = _ref10[0]; + query.checks.push({ + type: Type2.DATA_EXIST, + field: cleanMetaChars(variable) + }); + } + }, { + name: "dataCompare", + query: true, + regex: "\\[\\s*(" + tokens.variable + ")\\s*(" + tokens.comparatorOp + ")\\s*(" + tokens.value + ")\\s*\\]", + populate: function populate(selector2, query, _ref11) { + var _ref12 = _slicedToArray(_ref11, 3), variable = _ref12[0], comparatorOp = _ref12[1], value2 = _ref12[2]; + var valueIsString = new RegExp("^" + tokens.string + "$").exec(value2) != null; + if (valueIsString) { + value2 = value2.substring(1, value2.length - 1); + } else { + value2 = parseFloat(value2); + } + query.checks.push({ + type: Type2.DATA_COMPARE, + field: cleanMetaChars(variable), + operator: comparatorOp, + value: value2 + }); + } + }, { + name: "dataBool", + query: true, + regex: "\\[\\s*(" + tokens.boolOp + ")\\s*(" + tokens.variable + ")\\s*\\]", + populate: function populate(selector2, query, _ref13) { + var _ref14 = _slicedToArray(_ref13, 2), boolOp = _ref14[0], variable = _ref14[1]; + query.checks.push({ + type: Type2.DATA_BOOL, + field: cleanMetaChars(variable), + operator: boolOp + }); + } + }, { + name: "metaCompare", + query: true, + regex: "\\[\\[\\s*(" + tokens.meta + ")\\s*(" + tokens.comparatorOp + ")\\s*(" + tokens.number + ")\\s*\\]\\]", + populate: function populate(selector2, query, _ref15) { + var _ref16 = _slicedToArray(_ref15, 3), meta2 = _ref16[0], comparatorOp = _ref16[1], number3 = _ref16[2]; + query.checks.push({ + type: Type2.META_COMPARE, + field: cleanMetaChars(meta2), + operator: comparatorOp, + value: parseFloat(number3) + }); + } + }, { + name: "nextQuery", + separator: true, + regex: tokens.separator, + populate: function populate(selector2, query) { + var currentSubject = selector2.currentSubject; + var edgeCount2 = selector2.edgeCount; + var compoundCount = selector2.compoundCount; + var lastQ = selector2[selector2.length - 1]; + if (currentSubject != null) { + lastQ.subject = currentSubject; + selector2.currentSubject = null; + } + lastQ.edgeCount = edgeCount2; + lastQ.compoundCount = compoundCount; + selector2.edgeCount = 0; + selector2.compoundCount = 0; + var nextQuery = selector2[selector2.length++] = newQuery(); + return nextQuery; + } + }, { + name: "directedEdge", + separator: true, + regex: tokens.directedEdge, + populate: function populate(selector2, query) { + if (selector2.currentSubject == null) { + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type2.DIRECTED_EDGE, + source, + target + }); + replaceLastQuery(selector2, query, edgeQuery); + selector2.edgeCount++; + return target; + } else { + var srcTgtQ = newQuery(); + var _source = query; + var _target = newQuery(); + srcTgtQ.checks.push({ + type: Type2.NODE_SOURCE, + source: _source, + target: _target + }); + replaceLastQuery(selector2, query, srcTgtQ); + selector2.edgeCount++; + return _target; + } + } + }, { + name: "undirectedEdge", + separator: true, + regex: tokens.undirectedEdge, + populate: function populate(selector2, query) { + if (selector2.currentSubject == null) { + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type2.UNDIRECTED_EDGE, + nodes: [source, target] + }); + replaceLastQuery(selector2, query, edgeQuery); + selector2.edgeCount++; + return target; + } else { + var nhoodQ = newQuery(); + var node2 = query; + var neighbor = newQuery(); + nhoodQ.checks.push({ + type: Type2.NODE_NEIGHBOR, + node: node2, + neighbor + }); + replaceLastQuery(selector2, query, nhoodQ); + return neighbor; + } + } + }, { + name: "child", + separator: true, + regex: tokens.child, + populate: function populate(selector2, query) { + if (selector2.currentSubject == null) { + var parentChildQuery = newQuery(); + var child = newQuery(); + var parent = selector2[selector2.length - 1]; + parentChildQuery.checks.push({ + type: Type2.CHILD, + parent, + child + }); + replaceLastQuery(selector2, query, parentChildQuery); + selector2.compoundCount++; + return child; + } else if (selector2.currentSubject === query) { + var compound = newQuery(); + var left2 = selector2[selector2.length - 1]; + var right2 = newQuery(); + var subject = newQuery(); + var _child = newQuery(); + var _parent = newQuery(); + compound.checks.push({ + type: Type2.COMPOUND_SPLIT, + left: left2, + right: right2, + subject + }); + subject.checks = query.checks; + query.checks = [{ + type: Type2.TRUE + }]; + _parent.checks.push({ + type: Type2.TRUE + }); + right2.checks.push({ + type: Type2.PARENT, + // type is swapped on right side queries + parent: _parent, + child: _child + // empty for now + }); + replaceLastQuery(selector2, left2, compound); + selector2.currentSubject = subject; + selector2.compoundCount++; + return _child; + } else { + var _parent2 = newQuery(); + var _child2 = newQuery(); + var pcQChecks = [{ + type: Type2.PARENT, + parent: _parent2, + child: _child2 + }]; + _parent2.checks = query.checks; + query.checks = pcQChecks; + selector2.compoundCount++; + return _child2; + } + } + }, { + name: "descendant", + separator: true, + regex: tokens.descendant, + populate: function populate(selector2, query) { + if (selector2.currentSubject == null) { + var ancChQuery = newQuery(); + var descendant = newQuery(); + var ancestor = selector2[selector2.length - 1]; + ancChQuery.checks.push({ + type: Type2.DESCENDANT, + ancestor, + descendant + }); + replaceLastQuery(selector2, query, ancChQuery); + selector2.compoundCount++; + return descendant; + } else if (selector2.currentSubject === query) { + var compound = newQuery(); + var left2 = selector2[selector2.length - 1]; + var right2 = newQuery(); + var subject = newQuery(); + var _descendant = newQuery(); + var _ancestor = newQuery(); + compound.checks.push({ + type: Type2.COMPOUND_SPLIT, + left: left2, + right: right2, + subject + }); + subject.checks = query.checks; + query.checks = [{ + type: Type2.TRUE + }]; + _ancestor.checks.push({ + type: Type2.TRUE + }); + right2.checks.push({ + type: Type2.ANCESTOR, + // type is swapped on right side queries + ancestor: _ancestor, + descendant: _descendant + // empty for now + }); + replaceLastQuery(selector2, left2, compound); + selector2.currentSubject = subject; + selector2.compoundCount++; + return _descendant; + } else { + var _ancestor2 = newQuery(); + var _descendant2 = newQuery(); + var adQChecks = [{ + type: Type2.ANCESTOR, + ancestor: _ancestor2, + descendant: _descendant2 + }]; + _ancestor2.checks = query.checks; + query.checks = adQChecks; + selector2.compoundCount++; + return _descendant2; + } + } + }, { + name: "subject", + modifier: true, + regex: tokens.subject, + populate: function populate(selector2, query) { + if (selector2.currentSubject != null && selector2.currentSubject !== query) { + warn("Redefinition of subject in selector `" + selector2.toString() + "`"); + return false; + } + selector2.currentSubject = query; + var topQ = selector2[selector2.length - 1]; + var topChk = topQ.checks[0]; + var topType = topChk == null ? null : topChk.type; + if (topType === Type2.DIRECTED_EDGE) { + topChk.type = Type2.NODE_TARGET; + } else if (topType === Type2.UNDIRECTED_EDGE) { + topChk.type = Type2.NODE_NEIGHBOR; + topChk.node = topChk.nodes[1]; + topChk.neighbor = topChk.nodes[0]; + topChk.nodes = null; + } + } + }]; + exprs.forEach(function(e) { + return e.regexObj = new RegExp("^" + e.regex); + }); + var consumeExpr = function consumeExpr2(remaining) { + var expr; + var match2; + var name2; + for (var j = 0; j < exprs.length; j++) { + var e = exprs[j]; + var n = e.name; + var m = remaining.match(e.regexObj); + if (m != null) { + match2 = m; + expr = e; + name2 = n; + var consumed = m[0]; + remaining = remaining.substring(consumed.length); + break; + } + } + return { + expr, + match: match2, + name: name2, + remaining + }; + }; + var consumeWhitespace = function consumeWhitespace2(remaining) { + var match2 = remaining.match(/^\s+/); + if (match2) { + var consumed = match2[0]; + remaining = remaining.substring(consumed.length); + } + return remaining; + }; + var parse2 = function parse3(selector2) { + var self2 = this; + var remaining = self2.inputText = selector2; + var currentQuery = self2[0] = newQuery(); + self2.length = 1; + remaining = consumeWhitespace(remaining); + for (; ; ) { + var exprInfo = consumeExpr(remaining); + if (exprInfo.expr == null) { + warn("The selector `" + selector2 + "`is invalid"); + return false; + } else { + var args = exprInfo.match.slice(1); + var ret = exprInfo.expr.populate(self2, currentQuery, args); + if (ret === false) { + return false; + } else if (ret != null) { + currentQuery = ret; + } + } + remaining = exprInfo.remaining; + if (remaining.match(/^\s*$/)) { + break; + } + } + var lastQ = self2[self2.length - 1]; + if (self2.currentSubject != null) { + lastQ.subject = self2.currentSubject; + } + lastQ.edgeCount = self2.edgeCount; + lastQ.compoundCount = self2.compoundCount; + for (var i3 = 0; i3 < self2.length; i3++) { + var q = self2[i3]; + if (q.compoundCount > 0 && q.edgeCount > 0) { + warn("The selector `" + selector2 + "` is invalid because it uses both a compound selector and an edge selector"); + return false; + } + if (q.edgeCount > 1) { + warn("The selector `" + selector2 + "` is invalid because it uses multiple edge selectors"); + return false; + } else if (q.edgeCount === 1) { + warn("The selector `" + selector2 + "` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes."); + } + } + return true; + }; + var toString2 = function toString3() { + if (this.toStringCache != null) { + return this.toStringCache; + } + var clean = function clean2(obj) { + if (obj == null) { + return ""; + } else { + return obj; + } + }; + var cleanVal = function cleanVal2(val) { + if (string2(val)) { + return '"' + val + '"'; + } else { + return clean(val); + } + }; + var space = function space2(val) { + return " " + val + " "; + }; + var checkToString = function checkToString2(check, subject) { + var type2 = check.type, value2 = check.value; + switch (type2) { + case Type2.GROUP: { + var group = clean(value2); + return group.substring(0, group.length - 1); + } + case Type2.DATA_COMPARE: { + var field = check.field, operator = check.operator; + return "[" + field + space(clean(operator)) + cleanVal(value2) + "]"; + } + case Type2.DATA_BOOL: { + var _operator = check.operator, _field = check.field; + return "[" + clean(_operator) + _field + "]"; + } + case Type2.DATA_EXIST: { + var _field2 = check.field; + return "[" + _field2 + "]"; + } + case Type2.META_COMPARE: { + var _operator2 = check.operator, _field3 = check.field; + return "[[" + _field3 + space(clean(_operator2)) + cleanVal(value2) + "]]"; + } + case Type2.STATE: { + return value2; + } + case Type2.ID: { + return "#" + value2; + } + case Type2.CLASS: { + return "." + value2; + } + case Type2.PARENT: + case Type2.CHILD: { + return queryToString(check.parent, subject) + space(">") + queryToString(check.child, subject); + } + case Type2.ANCESTOR: + case Type2.DESCENDANT: { + return queryToString(check.ancestor, subject) + " " + queryToString(check.descendant, subject); + } + case Type2.COMPOUND_SPLIT: { + var lhs = queryToString(check.left, subject); + var sub = queryToString(check.subject, subject); + var rhs = queryToString(check.right, subject); + return lhs + (lhs.length > 0 ? " " : "") + sub + rhs; + } + case Type2.TRUE: { + return ""; + } + } + }; + var queryToString = function queryToString2(query2, subject) { + return query2.checks.reduce(function(str3, chk, i4) { + return str3 + (subject === query2 && i4 === 0 ? "$" : "") + checkToString(chk, subject); + }, ""); + }; + var str2 = ""; + for (var i3 = 0; i3 < this.length; i3++) { + var query = this[i3]; + str2 += queryToString(query, query.subject); + if (this.length > 1 && i3 < this.length - 1) { + str2 += ", "; + } + } + this.toStringCache = str2; + return str2; + }; + var parse$12 = { + parse: parse2, + toString: toString2 + }; + var valCmp = function valCmp2(fieldVal, operator, value2) { + var matches2; + var isFieldStr = string2(fieldVal); + var isFieldNum = number$12(fieldVal); + var isValStr = string2(value2); + var fieldStr, valStr; + var caseInsensitive = false; + var notExpr = false; + var isIneqCmp = false; + if (operator.indexOf("!") >= 0) { + operator = operator.replace("!", ""); + notExpr = true; + } + if (operator.indexOf("@") >= 0) { + operator = operator.replace("@", ""); + caseInsensitive = true; + } + if (isFieldStr || isValStr || caseInsensitive) { + fieldStr = !isFieldStr && !isFieldNum ? "" : "" + fieldVal; + valStr = "" + value2; + } + if (caseInsensitive) { + fieldVal = fieldStr = fieldStr.toLowerCase(); + value2 = valStr = valStr.toLowerCase(); + } + switch (operator) { + case "*=": + matches2 = fieldStr.indexOf(valStr) >= 0; + break; + case "$=": + matches2 = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0; + break; + case "^=": + matches2 = fieldStr.indexOf(valStr) === 0; + break; + case "=": + matches2 = fieldVal === value2; + break; + case ">": + isIneqCmp = true; + matches2 = fieldVal > value2; + break; + case ">=": + isIneqCmp = true; + matches2 = fieldVal >= value2; + break; + case "<": + isIneqCmp = true; + matches2 = fieldVal < value2; + break; + case "<=": + isIneqCmp = true; + matches2 = fieldVal <= value2; + break; + default: + matches2 = false; + break; + } + if (notExpr && (fieldVal != null || !isIneqCmp)) { + matches2 = !matches2; + } + return matches2; + }; + var boolCmp = function boolCmp2(fieldVal, operator) { + switch (operator) { + case "?": + return fieldVal ? true : false; + case "!": + return fieldVal ? false : true; + case "^": + return fieldVal === void 0; + } + }; + var existCmp = function existCmp2(fieldVal) { + return fieldVal !== void 0; + }; + var data$1 = function data2(ele, field) { + return ele.data(field); + }; + var meta = function meta2(ele, field) { + return ele[field](); + }; + var match = []; + var matches$1 = function matches2(query, ele) { + return query.checks.every(function(chk) { + return match[chk.type](chk, ele); + }); + }; + match[Type2.GROUP] = function(check, ele) { + var group = check.value; + return group === "*" || group === ele.group(); + }; + match[Type2.STATE] = function(check, ele) { + var stateSelector = check.value; + return stateSelectorMatches(stateSelector, ele); + }; + match[Type2.ID] = function(check, ele) { + var id2 = check.value; + return ele.id() === id2; + }; + match[Type2.CLASS] = function(check, ele) { + var cls = check.value; + return ele.hasClass(cls); + }; + match[Type2.META_COMPARE] = function(check, ele) { + var field = check.field, operator = check.operator, value2 = check.value; + return valCmp(meta(ele, field), operator, value2); + }; + match[Type2.DATA_COMPARE] = function(check, ele) { + var field = check.field, operator = check.operator, value2 = check.value; + return valCmp(data$1(ele, field), operator, value2); + }; + match[Type2.DATA_BOOL] = function(check, ele) { + var field = check.field, operator = check.operator; + return boolCmp(data$1(ele, field), operator); + }; + match[Type2.DATA_EXIST] = function(check, ele) { + var field = check.field; + check.operator; + return existCmp(data$1(ele, field)); + }; + match[Type2.UNDIRECTED_EDGE] = function(check, ele) { + var qA = check.nodes[0]; + var qB = check.nodes[1]; + var src = ele.source(); + var tgt = ele.target(); + return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt); + }; + match[Type2.NODE_NEIGHBOR] = function(check, ele) { + return matches$1(check.node, ele) && ele.neighborhood().some(function(n) { + return n.isNode() && matches$1(check.neighbor, n); + }); + }; + match[Type2.DIRECTED_EDGE] = function(check, ele) { + return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target()); + }; + match[Type2.NODE_SOURCE] = function(check, ele) { + return matches$1(check.source, ele) && ele.outgoers().some(function(n) { + return n.isNode() && matches$1(check.target, n); + }); + }; + match[Type2.NODE_TARGET] = function(check, ele) { + return matches$1(check.target, ele) && ele.incomers().some(function(n) { + return n.isNode() && matches$1(check.source, n); + }); + }; + match[Type2.CHILD] = function(check, ele) { + return matches$1(check.child, ele) && matches$1(check.parent, ele.parent()); + }; + match[Type2.PARENT] = function(check, ele) { + return matches$1(check.parent, ele) && ele.children().some(function(c2) { + return matches$1(check.child, c2); + }); + }; + match[Type2.DESCENDANT] = function(check, ele) { + return matches$1(check.descendant, ele) && ele.ancestors().some(function(a) { + return matches$1(check.ancestor, a); + }); + }; + match[Type2.ANCESTOR] = function(check, ele) { + return matches$1(check.ancestor, ele) && ele.descendants().some(function(d) { + return matches$1(check.descendant, d); + }); + }; + match[Type2.COMPOUND_SPLIT] = function(check, ele) { + return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele); + }; + match[Type2.TRUE] = function() { + return true; + }; + match[Type2.COLLECTION] = function(check, ele) { + var collection2 = check.value; + return collection2.has(ele); + }; + match[Type2.FILTER] = function(check, ele) { + var filter3 = check.value; + return filter3(ele); + }; + var filter2 = function filter3(collection2) { + var self2 = this; + if (self2.length === 1 && self2[0].checks.length === 1 && self2[0].checks[0].type === Type2.ID) { + return collection2.getElementById(self2[0].checks[0].value).collection(); + } + var selectorFunction = function selectorFunction2(element3) { + for (var j = 0; j < self2.length; j++) { + var query = self2[j]; + if (matches$1(query, element3)) { + return true; + } + } + return false; + }; + if (self2.text() == null) { + selectorFunction = function selectorFunction2() { + return true; + }; + } + return collection2.filter(selectorFunction); + }; + var matches = function matches2(ele) { + var self2 = this; + for (var j = 0; j < self2.length; j++) { + var query = self2[j]; + if (matches$1(query, ele)) { + return true; + } + } + return false; + }; + var matching = { + matches, + filter: filter2 + }; + var Selector = function Selector2(selector2) { + this.inputText = selector2; + this.currentSubject = null; + this.compoundCount = 0; + this.edgeCount = 0; + this.length = 0; + if (selector2 == null || string2(selector2) && selector2.match(/^\s*$/)) + ; + else if (elementOrCollection(selector2)) { + this.addQuery({ + checks: [{ + type: Type2.COLLECTION, + value: selector2.collection() + }] + }); + } else if (fn$6(selector2)) { + this.addQuery({ + checks: [{ + type: Type2.FILTER, + value: selector2 + }] + }); + } else if (string2(selector2)) { + if (!this.parse(selector2)) { + this.invalid = true; + } + } else { + error("A selector must be created from a string; found "); + } + }; + var selfn = Selector.prototype; + [parse$12, matching].forEach(function(p2) { + return extend2(selfn, p2); + }); + selfn.text = function() { + return this.inputText; + }; + selfn.size = function() { + return this.length; + }; + selfn.eq = function(i3) { + return this[i3]; + }; + selfn.sameText = function(otherSel) { + return !this.invalid && !otherSel.invalid && this.text() === otherSel.text(); + }; + selfn.addQuery = function(q) { + this[this.length++] = q; + }; + selfn.selector = selfn.toString; + var elesfn$g = { + allAre: function allAre(selector2) { + var selObj = new Selector(selector2); + return this.every(function(ele) { + return selObj.matches(ele); + }); + }, + is: function is(selector2) { + var selObj = new Selector(selector2); + return this.some(function(ele) { + return selObj.matches(ele); + }); + }, + some: function some(fn2, thisArg) { + for (var i3 = 0; i3 < this.length; i3++) { + var ret = !thisArg ? fn2(this[i3], i3, this) : fn2.apply(thisArg, [this[i3], i3, this]); + if (ret) { + return true; + } + } + return false; + }, + every: function every(fn2, thisArg) { + for (var i3 = 0; i3 < this.length; i3++) { + var ret = !thisArg ? fn2(this[i3], i3, this) : fn2.apply(thisArg, [this[i3], i3, this]); + if (!ret) { + return false; + } + } + return true; + }, + same: function same(collection2) { + if (this === collection2) { + return true; + } + collection2 = this.cy().collection(collection2); + var thisLength = this.length; + var collectionLength = collection2.length; + if (thisLength !== collectionLength) { + return false; + } + if (thisLength === 1) { + return this[0] === collection2[0]; + } + return this.every(function(ele) { + return collection2.hasElementWithId(ele.id()); + }); + }, + anySame: function anySame(collection2) { + collection2 = this.cy().collection(collection2); + return this.some(function(ele) { + return collection2.hasElementWithId(ele.id()); + }); + }, + allAreNeighbors: function allAreNeighbors(collection2) { + collection2 = this.cy().collection(collection2); + var nhood = this.neighborhood(); + return collection2.every(function(ele) { + return nhood.hasElementWithId(ele.id()); + }); + }, + contains: function contains(collection2) { + collection2 = this.cy().collection(collection2); + var self2 = this; + return collection2.every(function(ele) { + return self2.hasElementWithId(ele.id()); + }); + } + }; + elesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors; + elesfn$g.has = elesfn$g.contains; + elesfn$g.equal = elesfn$g.equals = elesfn$g.same; + var cache = function cache2(fn2, name2) { + return function traversalCache(arg1, arg2, arg3, arg4) { + var selectorOrEles = arg1; + var eles = this; + var key; + if (selectorOrEles == null) { + key = ""; + } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) { + key = selectorOrEles.id(); + } + if (eles.length === 1 && key) { + var _p = eles[0]._private; + var tch = _p.traversalCache = _p.traversalCache || {}; + var ch = tch[name2] = tch[name2] || []; + var hash = hashString(key); + var cacheHit = ch[hash]; + if (cacheHit) { + return cacheHit; + } else { + return ch[hash] = fn2.call(eles, arg1, arg2, arg3, arg4); + } + } else { + return fn2.call(eles, arg1, arg2, arg3, arg4); + } + }; + }; + var elesfn$f = { + parent: function parent(selector2) { + var parents2 = []; + if (this.length === 1) { + var parent2 = this[0]._private.parent; + if (parent2) { + return parent2; + } + } + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var _parent = ele._private.parent; + if (_parent) { + parents2.push(_parent); + } + } + return this.spawn(parents2, true).filter(selector2); + }, + parents: function parents2(selector2) { + var parents3 = []; + var eles = this.parent(); + while (eles.nonempty()) { + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + parents3.push(ele); + } + eles = eles.parent(); + } + return this.spawn(parents3, true).filter(selector2); + }, + commonAncestors: function commonAncestors(selector2) { + var ancestors; + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var parents2 = ele.parents(); + ancestors = ancestors || parents2; + ancestors = ancestors.intersect(parents2); + } + return ancestors.filter(selector2); + }, + orphans: function orphans(selector2) { + return this.stdFilter(function(ele) { + return ele.isOrphan(); + }).filter(selector2); + }, + nonorphans: function nonorphans(selector2) { + return this.stdFilter(function(ele) { + return ele.isChild(); + }).filter(selector2); + }, + children: cache(function(selector2) { + var children2 = []; + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var eleChildren = ele._private.children; + for (var j = 0; j < eleChildren.length; j++) { + children2.push(eleChildren[j]); + } + } + return this.spawn(children2, true).filter(selector2); + }, "children"), + siblings: function siblings(selector2) { + return this.parent().children().not(this).filter(selector2); + }, + isParent: function isParent() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length !== 0; + } + }, + isChildless: function isChildless() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length === 0; + } + }, + isChild: function isChild() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent != null; + } + }, + isOrphan: function isOrphan() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent == null; + } + }, + descendants: function descendants2(selector2) { + var elements2 = []; + function add(eles) { + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + elements2.push(ele); + if (ele.children().nonempty()) { + add(ele.children()); + } + } + } + add(this.children()); + return this.spawn(elements2, true).filter(selector2); + } + }; + function forEachCompound(eles, fn2, includeSelf, recursiveStep) { + var q = []; + var did = new Set$12(); + var cy = eles.cy(); + var hasCompounds = cy.hasCompoundNodes(); + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + if (includeSelf) { + q.push(ele); + } else if (hasCompounds) { + recursiveStep(q, did, ele); + } + } + while (q.length > 0) { + var _ele = q.shift(); + fn2(_ele); + did.add(_ele.id()); + if (hasCompounds) { + recursiveStep(q, did, _ele); + } + } + return eles; + } + function addChildren(q, did, ele) { + if (ele.isParent()) { + var children2 = ele._private.children; + for (var i3 = 0; i3 < children2.length; i3++) { + var child = children2[i3]; + if (!did.has(child.id())) { + q.push(child); + } + } + } + } + elesfn$f.forEachDown = function(fn2) { + var includeSelf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return forEachCompound(this, fn2, includeSelf, addChildren); + }; + function addParent(q, did, ele) { + if (ele.isChild()) { + var parent = ele._private.parent; + if (!did.has(parent.id())) { + q.push(parent); + } + } + } + elesfn$f.forEachUp = function(fn2) { + var includeSelf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return forEachCompound(this, fn2, includeSelf, addParent); + }; + function addParentAndChildren(q, did, ele) { + addParent(q, did, ele); + addChildren(q, did, ele); + } + elesfn$f.forEachUpAndDown = function(fn2) { + var includeSelf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return forEachCompound(this, fn2, includeSelf, addParentAndChildren); + }; + elesfn$f.ancestors = elesfn$f.parents; + var fn$5, elesfn$e; + fn$5 = elesfn$e = { + data: define3.data({ + field: "data", + bindingEvent: "data", + allowBinding: true, + allowSetting: true, + settingEvent: "data", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + immutableKeys: { + "id": true, + "source": true, + "target": true, + "parent": true + }, + updateStyle: true + }), + removeData: define3.removeData({ + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: true, + immutableKeys: { + "id": true, + "source": true, + "target": true, + "parent": true + }, + updateStyle: true + }), + scratch: define3.data({ + field: "scratch", + bindingEvent: "scratch", + allowBinding: true, + allowSetting: true, + settingEvent: "scratch", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + updateStyle: true + }), + removeScratch: define3.removeData({ + field: "scratch", + event: "scratch", + triggerFnName: "trigger", + triggerEvent: true, + updateStyle: true + }), + rscratch: define3.data({ + field: "rscratch", + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: true + }), + removeRscratch: define3.removeData({ + field: "rscratch", + triggerEvent: false + }), + id: function id2() { + var ele = this[0]; + if (ele) { + return ele._private.data.id; + } + } + }; + fn$5.attr = fn$5.data; + fn$5.removeAttr = fn$5.removeData; + var data = elesfn$e; + var elesfn$d = {}; + function defineDegreeFunction(callback) { + return function(includeLoops) { + var self2 = this; + if (includeLoops === void 0) { + includeLoops = true; + } + if (self2.length === 0) { + return; + } + if (self2.isNode() && !self2.removed()) { + var degree = 0; + var node2 = self2[0]; + var connectedEdges = node2._private.edges; + for (var i3 = 0; i3 < connectedEdges.length; i3++) { + var edge = connectedEdges[i3]; + if (!includeLoops && edge.isLoop()) { + continue; + } + degree += callback(node2, edge); + } + return degree; + } else { + return; + } + }; + } + extend2(elesfn$d, { + degree: defineDegreeFunction(function(node2, edge) { + if (edge.source().same(edge.target())) { + return 2; + } else { + return 1; + } + }), + indegree: defineDegreeFunction(function(node2, edge) { + if (edge.target().same(node2)) { + return 1; + } else { + return 0; + } + }), + outdegree: defineDegreeFunction(function(node2, edge) { + if (edge.source().same(node2)) { + return 1; + } else { + return 0; + } + }) + }); + function defineDegreeBoundsFunction(degreeFn, callback) { + return function(includeLoops) { + var ret; + var nodes2 = this.nodes(); + for (var i3 = 0; i3 < nodes2.length; i3++) { + var ele = nodes2[i3]; + var degree = ele[degreeFn](includeLoops); + if (degree !== void 0 && (ret === void 0 || callback(degree, ret))) { + ret = degree; + } + } + return ret; + }; + } + extend2(elesfn$d, { + minDegree: defineDegreeBoundsFunction("degree", function(degree, min3) { + return degree < min3; + }), + maxDegree: defineDegreeBoundsFunction("degree", function(degree, max3) { + return degree > max3; + }), + minIndegree: defineDegreeBoundsFunction("indegree", function(degree, min3) { + return degree < min3; + }), + maxIndegree: defineDegreeBoundsFunction("indegree", function(degree, max3) { + return degree > max3; + }), + minOutdegree: defineDegreeBoundsFunction("outdegree", function(degree, min3) { + return degree < min3; + }), + maxOutdegree: defineDegreeBoundsFunction("outdegree", function(degree, max3) { + return degree > max3; + }) + }); + extend2(elesfn$d, { + totalDegree: function totalDegree(includeLoops) { + var total = 0; + var nodes2 = this.nodes(); + for (var i3 = 0; i3 < nodes2.length; i3++) { + total += nodes2[i3].degree(includeLoops); + } + return total; + } + }); + var fn$4, elesfn$c; + var beforePositionSet = function beforePositionSet2(eles, newPos, silent) { + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + if (!ele.locked()) { + var oldPos = ele._private.position; + var delta = { + x: newPos.x != null ? newPos.x - oldPos.x : 0, + y: newPos.y != null ? newPos.y - oldPos.y : 0 + }; + if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) { + ele.children().shift(delta, silent); + } + ele.dirtyBoundingBoxCache(); + } + } + }; + var positionDef = { + field: "position", + bindingEvent: "position", + allowBinding: true, + allowSetting: true, + settingEvent: "position", + settingTriggersEvent: true, + triggerFnName: "emitAndNotify", + allowGetting: true, + validKeys: ["x", "y"], + beforeGet: function beforeGet(ele) { + ele.updateCompoundBounds(); + }, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, false); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + }, + canSet: function canSet(ele) { + return !ele.locked(); + } + }; + fn$4 = elesfn$c = { + position: define3.data(positionDef), + // position but no notification to renderer + silentPosition: define3.data(extend2({}, positionDef, { + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: false, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, true); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + } + })), + positions: function positions(pos, silent) { + if (plainObject(pos)) { + if (silent) { + this.silentPosition(pos); + } else { + this.position(pos); + } + } else if (fn$6(pos)) { + var _fn = pos; + var cy = this.cy(); + cy.startBatch(); + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var _pos = void 0; + if (_pos = _fn(ele, i3)) { + if (silent) { + ele.silentPosition(_pos); + } else { + ele.position(_pos); + } + } + } + cy.endBatch(); + } + return this; + }, + silentPositions: function silentPositions(pos) { + return this.positions(pos, true); + }, + shift: function shift(dim, val, silent) { + var delta; + if (plainObject(dim)) { + delta = { + x: number$12(dim.x) ? dim.x : 0, + y: number$12(dim.y) ? dim.y : 0 + }; + silent = val; + } else if (string2(dim) && number$12(val)) { + delta = { + x: 0, + y: 0 + }; + delta[dim] = val; + } + if (delta != null) { + var cy = this.cy(); + cy.startBatch(); + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) { + continue; + } + var pos = ele.position(); + var newPos = { + x: pos.x + delta.x, + y: pos.y + delta.y + }; + if (silent) { + ele.silentPosition(newPos); + } else { + ele.position(newPos); + } + } + cy.endBatch(); + } + return this; + }, + silentShift: function silentShift(dim, val) { + if (plainObject(dim)) { + this.shift(dim, true); + } else if (string2(dim) && number$12(val)) { + this.shift(dim, val, true); + } + return this; + }, + // get/set the rendered (i.e. on screen) positon of the element + renderedPosition: function renderedPosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var rpos = plainObject(dim) ? dim : void 0; + var setting = rpos !== void 0 || val !== void 0 && string2(dim); + if (ele && ele.isNode()) { + if (setting) { + for (var i3 = 0; i3 < this.length; i3++) { + var _ele = this[i3]; + if (val !== void 0) { + _ele.position(dim, (val - pan[dim]) / zoom); + } else if (rpos !== void 0) { + _ele.position(renderedToModelPosition(rpos, zoom, pan)); + } + } + } else { + var pos = ele.position(); + rpos = modelToRenderedPosition(pos, zoom, pan); + if (dim === void 0) { + return rpos; + } else { + return rpos[dim]; + } + } + } else if (!setting) { + return void 0; + } + return this; + }, + // get/set the position relative to the parent + relativePosition: function relativePosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var ppos = plainObject(dim) ? dim : void 0; + var setting = ppos !== void 0 || val !== void 0 && string2(dim); + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele && ele.isNode()) { + if (setting) { + for (var i3 = 0; i3 < this.length; i3++) { + var _ele2 = this[i3]; + var parent = hasCompoundNodes ? _ele2.parent() : null; + var hasParent = parent && parent.length > 0; + var relativeToParent = hasParent; + if (hasParent) { + parent = parent[0]; + } + var origin = relativeToParent ? parent.position() : { + x: 0, + y: 0 + }; + if (val !== void 0) { + _ele2.position(dim, val + origin[dim]); + } else if (ppos !== void 0) { + _ele2.position({ + x: ppos.x + origin.x, + y: ppos.y + origin.y + }); + } + } + } else { + var pos = ele.position(); + var _parent = hasCompoundNodes ? ele.parent() : null; + var _hasParent = _parent && _parent.length > 0; + var _relativeToParent = _hasParent; + if (_hasParent) { + _parent = _parent[0]; + } + var _origin = _relativeToParent ? _parent.position() : { + x: 0, + y: 0 + }; + ppos = { + x: pos.x - _origin.x, + y: pos.y - _origin.y + }; + if (dim === void 0) { + return ppos; + } else { + return ppos[dim]; + } + } + } else if (!setting) { + return void 0; + } + return this; + } + }; + fn$4.modelPosition = fn$4.point = fn$4.position; + fn$4.modelPositions = fn$4.points = fn$4.positions; + fn$4.renderedPoint = fn$4.renderedPosition; + fn$4.relativePoint = fn$4.relativePosition; + var position2 = elesfn$c; + var fn$3, elesfn$b; + fn$3 = elesfn$b = {}; + elesfn$b.renderedBoundingBox = function(options2) { + var bb = this.boundingBox(options2); + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var x1 = bb.x1 * zoom + pan.x; + var x2 = bb.x2 * zoom + pan.x; + var y1 = bb.y1 * zoom + pan.y; + var y2 = bb.y2 * zoom + pan.y; + return { + x1, + x2, + y1, + y2, + w: x2 - x1, + h: y2 - y1 + }; + }; + elesfn$b.dirtyCompoundBoundsCache = function() { + var silent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false; + var cy = this.cy(); + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + this.forEachUp(function(ele) { + if (ele.isParent()) { + var _p = ele._private; + _p.compoundBoundsClean = false; + _p.bbCache = null; + if (!silent) { + ele.emitAndNotify("bounds"); + } + } + }); + return this; + }; + elesfn$b.updateCompoundBounds = function() { + var force = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false; + var cy = this.cy(); + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + if (!force && cy.batching()) { + return this; + } + function update2(parent) { + if (!parent.isParent()) { + return; + } + var _p2 = parent._private; + var children2 = parent.children(); + var includeLabels = parent.pstyle("compound-sizing-wrt-labels").value === "include"; + var min3 = { + width: { + val: parent.pstyle("min-width").pfValue, + left: parent.pstyle("min-width-bias-left"), + right: parent.pstyle("min-width-bias-right") + }, + height: { + val: parent.pstyle("min-height").pfValue, + top: parent.pstyle("min-height-bias-top"), + bottom: parent.pstyle("min-height-bias-bottom") + } + }; + var bb = children2.boundingBox({ + includeLabels, + includeOverlays: false, + // updating the compound bounds happens outside of the regular + // cache cycle (i.e. before fired events) + useCache: false + }); + var pos = _p2.position; + if (bb.w === 0 || bb.h === 0) { + bb = { + w: parent.pstyle("width").pfValue, + h: parent.pstyle("height").pfValue + }; + bb.x1 = pos.x - bb.w / 2; + bb.x2 = pos.x + bb.w / 2; + bb.y1 = pos.y - bb.h / 2; + bb.y2 = pos.y + bb.h / 2; + } + function computeBiasValues(propDiff, propBias, propBiasComplement) { + var biasDiff = 0; + var biasComplementDiff = 0; + var biasTotal = propBias + propBiasComplement; + if (propDiff > 0 && biasTotal > 0) { + biasDiff = propBias / biasTotal * propDiff; + biasComplementDiff = propBiasComplement / biasTotal * propDiff; + } + return { + biasDiff, + biasComplementDiff + }; + } + function computePaddingValues(width2, height, paddingObject, relativeTo) { + if (paddingObject.units === "%") { + switch (relativeTo) { + case "width": + return width2 > 0 ? paddingObject.pfValue * width2 : 0; + case "height": + return height > 0 ? paddingObject.pfValue * height : 0; + case "average": + return width2 > 0 && height > 0 ? paddingObject.pfValue * (width2 + height) / 2 : 0; + case "min": + return width2 > 0 && height > 0 ? width2 > height ? paddingObject.pfValue * height : paddingObject.pfValue * width2 : 0; + case "max": + return width2 > 0 && height > 0 ? width2 > height ? paddingObject.pfValue * width2 : paddingObject.pfValue * height : 0; + default: + return 0; + } + } else if (paddingObject.units === "px") { + return paddingObject.pfValue; + } else { + return 0; + } + } + var leftVal = min3.width.left.value; + if (min3.width.left.units === "px" && min3.width.val > 0) { + leftVal = leftVal * 100 / min3.width.val; + } + var rightVal = min3.width.right.value; + if (min3.width.right.units === "px" && min3.width.val > 0) { + rightVal = rightVal * 100 / min3.width.val; + } + var topVal = min3.height.top.value; + if (min3.height.top.units === "px" && min3.height.val > 0) { + topVal = topVal * 100 / min3.height.val; + } + var bottomVal = min3.height.bottom.value; + if (min3.height.bottom.units === "px" && min3.height.val > 0) { + bottomVal = bottomVal * 100 / min3.height.val; + } + var widthBiasDiffs = computeBiasValues(min3.width.val - bb.w, leftVal, rightVal); + var diffLeft = widthBiasDiffs.biasDiff; + var diffRight = widthBiasDiffs.biasComplementDiff; + var heightBiasDiffs = computeBiasValues(min3.height.val - bb.h, topVal, bottomVal); + var diffTop = heightBiasDiffs.biasDiff; + var diffBottom = heightBiasDiffs.biasComplementDiff; + _p2.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle("padding"), parent.pstyle("padding-relative-to").value); + _p2.autoWidth = Math.max(bb.w, min3.width.val); + pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2; + _p2.autoHeight = Math.max(bb.h, min3.height.val); + pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2; + } + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var _p = ele._private; + if (!_p.compoundBoundsClean || force) { + update2(ele); + if (!cy.batching()) { + _p.compoundBoundsClean = true; + } + } + } + return this; + }; + var noninf = function noninf2(x2) { + if (x2 === Infinity || x2 === -Infinity) { + return 0; + } + return x2; + }; + var updateBounds = function updateBounds2(b, x1, y1, x2, y2) { + if (x2 - x1 === 0 || y2 - y1 === 0) { + return; + } + if (x1 == null || y1 == null || x2 == null || y2 == null) { + return; + } + b.x1 = x1 < b.x1 ? x1 : b.x1; + b.x2 = x2 > b.x2 ? x2 : b.x2; + b.y1 = y1 < b.y1 ? y1 : b.y1; + b.y2 = y2 > b.y2 ? y2 : b.y2; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + }; + var updateBoundsFromBox = function updateBoundsFromBox2(b, b2) { + if (b2 == null) { + return b; + } + return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2); + }; + var prefixedProperty = function prefixedProperty2(obj, field, prefix) { + return getPrefixedProperty(obj, field, prefix); + }; + var updateBoundsFromArrow = function updateBoundsFromArrow2(bounds3, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var halfArW = rstyle.arrowWidth / 2; + var arrowType = ele.pstyle(prefix + "-arrow-shape").value; + var x2; + var y2; + if (arrowType !== "none") { + if (prefix === "source") { + x2 = rstyle.srcX; + y2 = rstyle.srcY; + } else if (prefix === "target") { + x2 = rstyle.tgtX; + y2 = rstyle.tgtY; + } else { + x2 = rstyle.midX; + y2 = rstyle.midY; + } + var bbs = _p.arrowBounds = _p.arrowBounds || {}; + var bb = bbs[prefix] = bbs[prefix] || {}; + bb.x1 = x2 - halfArW; + bb.y1 = y2 - halfArW; + bb.x2 = x2 + halfArW; + bb.y2 = y2 + halfArW; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + expandBoundingBox(bb, 1); + updateBounds(bounds3, bb.x1, bb.y1, bb.x2, bb.y2); + } + }; + var updateBoundsFromLabel = function updateBoundsFromLabel2(bounds3, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var prefixDash; + if (prefix) { + prefixDash = prefix + "-"; + } else { + prefixDash = ""; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var label = ele.pstyle(prefixDash + "label").strValue; + if (label) { + var halign = ele.pstyle("text-halign"); + var valign = ele.pstyle("text-valign"); + var labelWidth = prefixedProperty(rstyle, "labelWidth", prefix); + var labelHeight = prefixedProperty(rstyle, "labelHeight", prefix); + var labelX = prefixedProperty(rstyle, "labelX", prefix); + var labelY = prefixedProperty(rstyle, "labelY", prefix); + var marginX = ele.pstyle(prefixDash + "text-margin-x").pfValue; + var marginY = ele.pstyle(prefixDash + "text-margin-y").pfValue; + var isEdge = ele.isEdge(); + var rotation = ele.pstyle(prefixDash + "text-rotation"); + var outlineWidth = ele.pstyle("text-outline-width").pfValue; + var borderWidth = ele.pstyle("text-border-width").pfValue; + var halfBorderWidth = borderWidth / 2; + var padding2 = ele.pstyle("text-background-padding").pfValue; + var marginOfError = 2; + var lh = labelHeight; + var lw = labelWidth; + var lw_2 = lw / 2; + var lh_2 = lh / 2; + var lx1, lx2, ly1, ly2; + if (isEdge) { + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + } else { + switch (halign.value) { + case "left": + lx1 = labelX - lw; + lx2 = labelX; + break; + case "center": + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + break; + case "right": + lx1 = labelX; + lx2 = labelX + lw; + break; + } + switch (valign.value) { + case "top": + ly1 = labelY - lh; + ly2 = labelY; + break; + case "center": + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + break; + case "bottom": + ly1 = labelY; + ly2 = labelY + lh; + break; + } + } + lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding2 - marginOfError; + lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding2 + marginOfError; + ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding2 - marginOfError; + ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding2 + marginOfError; + var bbPrefix = prefix || "main"; + var bbs = _p.labelBounds; + var bb = bbs[bbPrefix] = bbs[bbPrefix] || {}; + bb.x1 = lx1; + bb.y1 = ly1; + bb.x2 = lx2; + bb.y2 = ly2; + bb.w = lx2 - lx1; + bb.h = ly2 - ly1; + var isAutorotate = isEdge && rotation.strValue === "autorotate"; + var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0; + if (isAutorotate || isPfValue) { + var theta = isAutorotate ? prefixedProperty(_p.rstyle, "labelAngle", prefix) : rotation.pfValue; + var cos3 = Math.cos(theta); + var sin3 = Math.sin(theta); + var xo = (lx1 + lx2) / 2; + var yo = (ly1 + ly2) / 2; + if (!isEdge) { + switch (halign.value) { + case "left": + xo = lx2; + break; + case "right": + xo = lx1; + break; + } + switch (valign.value) { + case "top": + yo = ly2; + break; + case "bottom": + yo = ly1; + break; + } + } + var rotate = function rotate2(x2, y2) { + x2 = x2 - xo; + y2 = y2 - yo; + return { + x: x2 * cos3 - y2 * sin3 + xo, + y: x2 * sin3 + y2 * cos3 + yo + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + } + var bbPrefixRot = bbPrefix + "Rot"; + var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {}; + bbRot.x1 = lx1; + bbRot.y1 = ly1; + bbRot.x2 = lx2; + bbRot.y2 = ly2; + bbRot.w = lx2 - lx1; + bbRot.h = ly2 - ly1; + updateBounds(bounds3, lx1, ly1, lx2, ly2); + updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2); + } + return bounds3; + }; + var boundingBoxImpl = function boundingBoxImpl2(ele, options2) { + var cy = ele._private.cy; + var styleEnabled = cy.styleEnabled(); + var headless = cy.headless(); + var bounds3 = makeBoundingBox(); + var _p = ele._private; + var isNode = ele.isNode(); + var isEdge = ele.isEdge(); + var ex1, ex2, ey1, ey2; + var x2, y2; + var rstyle = _p.rstyle; + var manualExpansion = isNode && styleEnabled ? ele.pstyle("bounds-expansion").pfValue : [0]; + var isDisplayed = function isDisplayed2(ele2) { + return ele2.pstyle("display").value !== "none"; + }; + var displayed = !styleEnabled || isDisplayed(ele) && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target())); + if (displayed) { + var overlayOpacity = 0; + var overlayPadding = 0; + if (styleEnabled && options2.includeOverlays) { + overlayOpacity = ele.pstyle("overlay-opacity").value; + if (overlayOpacity !== 0) { + overlayPadding = ele.pstyle("overlay-padding").value; + } + } + var underlayOpacity = 0; + var underlayPadding = 0; + if (styleEnabled && options2.includeUnderlays) { + underlayOpacity = ele.pstyle("underlay-opacity").value; + if (underlayOpacity !== 0) { + underlayPadding = ele.pstyle("underlay-padding").value; + } + } + var padding2 = Math.max(overlayPadding, underlayPadding); + var w2 = 0; + var wHalf = 0; + if (styleEnabled) { + w2 = ele.pstyle("width").pfValue; + wHalf = w2 / 2; + } + if (isNode && options2.includeNodes) { + var pos = ele.position(); + x2 = pos.x; + y2 = pos.y; + var _w = ele.outerWidth(); + var halfW = _w / 2; + var h = ele.outerHeight(); + var halfH = h / 2; + ex1 = x2 - halfW; + ex2 = x2 + halfW; + ey1 = y2 - halfH; + ey2 = y2 + halfH; + updateBounds(bounds3, ex1, ey1, ex2, ey2); + } else if (isEdge && options2.includeEdges) { + if (styleEnabled && !headless) { + var curveStyle = ele.pstyle("curve-style").strValue; + ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY); + ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY); + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds3, ex1, ey1, ex2, ey2); + if (curveStyle === "haystack") { + var hpts = rstyle.haystackPts; + if (hpts && hpts.length === 2) { + ex1 = hpts[0].x; + ey1 = hpts[0].y; + ex2 = hpts[1].x; + ey2 = hpts[1].y; + if (ex1 > ex2) { + var temp = ex1; + ex1 = ex2; + ex2 = temp; + } + if (ey1 > ey2) { + var _temp = ey1; + ey1 = ey2; + ey2 = _temp; + } + updateBounds(bounds3, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf); + } + } else if (curveStyle === "bezier" || curveStyle === "unbundled-bezier" || curveStyle === "segments" || curveStyle === "taxi") { + var pts2; + switch (curveStyle) { + case "bezier": + case "unbundled-bezier": + pts2 = rstyle.bezierPts; + break; + case "segments": + case "taxi": + pts2 = rstyle.linePts; + break; + } + if (pts2 != null) { + for (var j = 0; j < pts2.length; j++) { + var pt = pts2[j]; + ex1 = pt.x - wHalf; + ex2 = pt.x + wHalf; + ey1 = pt.y - wHalf; + ey2 = pt.y + wHalf; + updateBounds(bounds3, ex1, ey1, ex2, ey2); + } + } + } + } else { + var n1 = ele.source(); + var n1pos = n1.position(); + var n2 = ele.target(); + var n2pos = n2.position(); + ex1 = n1pos.x; + ex2 = n2pos.x; + ey1 = n1pos.y; + ey2 = n2pos.y; + if (ex1 > ex2) { + var _temp2 = ex1; + ex1 = ex2; + ex2 = _temp2; + } + if (ey1 > ey2) { + var _temp3 = ey1; + ey1 = ey2; + ey2 = _temp3; + } + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds3, ex1, ey1, ex2, ey2); + } + } + if (styleEnabled && options2.includeEdges && isEdge) { + updateBoundsFromArrow(bounds3, ele, "mid-source"); + updateBoundsFromArrow(bounds3, ele, "mid-target"); + updateBoundsFromArrow(bounds3, ele, "source"); + updateBoundsFromArrow(bounds3, ele, "target"); + } + if (styleEnabled) { + var ghost = ele.pstyle("ghost").value === "yes"; + if (ghost) { + var gx = ele.pstyle("ghost-offset-x").pfValue; + var gy = ele.pstyle("ghost-offset-y").pfValue; + updateBounds(bounds3, bounds3.x1 + gx, bounds3.y1 + gy, bounds3.x2 + gx, bounds3.y2 + gy); + } + } + var bbBody = _p.bodyBounds = _p.bodyBounds || {}; + assignBoundingBox(bbBody, bounds3); + expandBoundingBoxSides(bbBody, manualExpansion); + expandBoundingBox(bbBody, 1); + if (styleEnabled) { + ex1 = bounds3.x1; + ex2 = bounds3.x2; + ey1 = bounds3.y1; + ey2 = bounds3.y2; + updateBounds(bounds3, ex1 - padding2, ey1 - padding2, ex2 + padding2, ey2 + padding2); + } + var bbOverlay = _p.overlayBounds = _p.overlayBounds || {}; + assignBoundingBox(bbOverlay, bounds3); + expandBoundingBoxSides(bbOverlay, manualExpansion); + expandBoundingBox(bbOverlay, 1); + var bbLabels = _p.labelBounds = _p.labelBounds || {}; + if (bbLabels.all != null) { + clearBoundingBox(bbLabels.all); + } else { + bbLabels.all = makeBoundingBox(); + } + if (styleEnabled && options2.includeLabels) { + if (options2.includeMainLabels) { + updateBoundsFromLabel(bounds3, ele, null); + } + if (isEdge) { + if (options2.includeSourceLabels) { + updateBoundsFromLabel(bounds3, ele, "source"); + } + if (options2.includeTargetLabels) { + updateBoundsFromLabel(bounds3, ele, "target"); + } + } + } + } + bounds3.x1 = noninf(bounds3.x1); + bounds3.y1 = noninf(bounds3.y1); + bounds3.x2 = noninf(bounds3.x2); + bounds3.y2 = noninf(bounds3.y2); + bounds3.w = noninf(bounds3.x2 - bounds3.x1); + bounds3.h = noninf(bounds3.y2 - bounds3.y1); + if (bounds3.w > 0 && bounds3.h > 0 && displayed) { + expandBoundingBoxSides(bounds3, manualExpansion); + expandBoundingBox(bounds3, 1); + } + return bounds3; + }; + var getKey = function getKey2(opts) { + var i3 = 0; + var tf = function tf2(val) { + return (val ? 1 : 0) << i3++; + }; + var key = 0; + key += tf(opts.incudeNodes); + key += tf(opts.includeEdges); + key += tf(opts.includeLabels); + key += tf(opts.includeMainLabels); + key += tf(opts.includeSourceLabels); + key += tf(opts.includeTargetLabels); + key += tf(opts.includeOverlays); + return key; + }; + var getBoundingBoxPosKey = function getBoundingBoxPosKey2(ele) { + if (ele.isEdge()) { + var p1 = ele.source().position(); + var p2 = ele.target().position(); + var r = function r2(x2) { + return Math.round(x2); + }; + return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]); + } else { + return 0; + } + }; + var cachedBoundingBoxImpl = function cachedBoundingBoxImpl2(ele, opts) { + var _p = ele._private; + var bb; + var isEdge = ele.isEdge(); + var key = opts == null ? defBbOptsKey : getKey(opts); + var usingDefOpts = key === defBbOptsKey; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame; + var isDirty = function isDirty2(ele2) { + return ele2._private.bbCache == null || ele2._private.styleDirty; + }; + var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target()); + if (needRecalc) { + if (!isPosKeySame) { + ele.recalculateRenderedStyle(useCache); + } + bb = boundingBoxImpl(ele, defBbOpts); + _p.bbCache = bb; + _p.bbCachePosKey = currPosKey; + } else { + bb = _p.bbCache; + } + if (!usingDefOpts) { + var isNode = ele.isNode(); + bb = makeBoundingBox(); + if (opts.includeNodes && isNode || opts.includeEdges && !isNode) { + if (opts.includeOverlays) { + updateBoundsFromBox(bb, _p.overlayBounds); + } else { + updateBoundsFromBox(bb, _p.bodyBounds); + } + } + if (opts.includeLabels) { + if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) { + updateBoundsFromBox(bb, _p.labelBounds.all); + } else { + if (opts.includeMainLabels) { + updateBoundsFromBox(bb, _p.labelBounds.mainRot); + } + if (opts.includeSourceLabels) { + updateBoundsFromBox(bb, _p.labelBounds.sourceRot); + } + if (opts.includeTargetLabels) { + updateBoundsFromBox(bb, _p.labelBounds.targetRot); + } + } + } + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } + return bb; + }; + var defBbOpts = { + includeNodes: true, + includeEdges: true, + includeLabels: true, + includeMainLabels: true, + includeSourceLabels: true, + includeTargetLabels: true, + includeOverlays: true, + includeUnderlays: true, + useCache: true + }; + var defBbOptsKey = getKey(defBbOpts); + var filledBbOpts = defaults$g(defBbOpts); + elesfn$b.boundingBox = function(options2) { + var bounds3; + if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options2 === void 0 || options2.useCache === void 0 || options2.useCache === true)) { + if (options2 === void 0) { + options2 = defBbOpts; + } else { + options2 = filledBbOpts(options2); + } + bounds3 = cachedBoundingBoxImpl(this[0], options2); + } else { + bounds3 = makeBoundingBox(); + options2 = options2 || defBbOpts; + var opts = filledBbOpts(options2); + var eles = this; + var cy = eles.cy(); + var styleEnabled = cy.styleEnabled(); + if (styleEnabled) { + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var _p = ele._private; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame && !_p.styleDirty; + ele.recalculateRenderedStyle(useCache); + } + } + this.updateCompoundBounds(!options2.useCache); + for (var _i = 0; _i < eles.length; _i++) { + var _ele = eles[_i]; + updateBoundsFromBox(bounds3, cachedBoundingBoxImpl(_ele, opts)); + } + } + bounds3.x1 = noninf(bounds3.x1); + bounds3.y1 = noninf(bounds3.y1); + bounds3.x2 = noninf(bounds3.x2); + bounds3.y2 = noninf(bounds3.y2); + bounds3.w = noninf(bounds3.x2 - bounds3.x1); + bounds3.h = noninf(bounds3.y2 - bounds3.y1); + return bounds3; + }; + elesfn$b.dirtyBoundingBoxCache = function() { + for (var i3 = 0; i3 < this.length; i3++) { + var _p = this[i3]._private; + _p.bbCache = null; + _p.bbCachePosKey = null; + _p.bodyBounds = null; + _p.overlayBounds = null; + _p.labelBounds.all = null; + _p.labelBounds.source = null; + _p.labelBounds.target = null; + _p.labelBounds.main = null; + _p.labelBounds.sourceRot = null; + _p.labelBounds.targetRot = null; + _p.labelBounds.mainRot = null; + _p.arrowBounds.source = null; + _p.arrowBounds.target = null; + _p.arrowBounds["mid-source"] = null; + _p.arrowBounds["mid-target"] = null; + } + this.emitAndNotify("bounds"); + return this; + }; + elesfn$b.boundingBoxAt = function(fn2) { + var nodes2 = this.nodes(); + var cy = this.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + var parents2 = cy.collection(); + if (hasCompoundNodes) { + parents2 = nodes2.filter(function(node2) { + return node2.isParent(); + }); + nodes2 = nodes2.not(parents2); + } + if (plainObject(fn2)) { + var obj = fn2; + fn2 = function fn3() { + return obj; + }; + } + var storeOldPos = function storeOldPos2(node2, i3) { + return node2._private.bbAtOldPos = fn2(node2, i3); + }; + var getOldPos = function getOldPos2(node2) { + return node2._private.bbAtOldPos; + }; + cy.startBatch(); + nodes2.forEach(storeOldPos).silentPositions(fn2); + if (hasCompoundNodes) { + parents2.dirtyCompoundBoundsCache(); + parents2.dirtyBoundingBoxCache(); + parents2.updateCompoundBounds(true); + } + var bb = copyBoundingBox(this.boundingBox({ + useCache: false + })); + nodes2.silentPositions(getOldPos); + if (hasCompoundNodes) { + parents2.dirtyCompoundBoundsCache(); + parents2.dirtyBoundingBoxCache(); + parents2.updateCompoundBounds(true); + } + cy.endBatch(); + return bb; + }; + fn$3.boundingbox = fn$3.bb = fn$3.boundingBox; + fn$3.renderedBoundingbox = fn$3.renderedBoundingBox; + var bounds2 = elesfn$b; + var fn$2, elesfn$a; + fn$2 = elesfn$a = {}; + var defineDimFns = function defineDimFns2(opts) { + opts.uppercaseName = capitalize(opts.name); + opts.autoName = "auto" + opts.uppercaseName; + opts.labelName = "label" + opts.uppercaseName; + opts.outerName = "outer" + opts.uppercaseName; + opts.uppercaseOuterName = capitalize(opts.outerName); + fn$2[opts.name] = function dimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + if (ele.isParent()) { + ele.updateCompoundBounds(); + return _p[opts.autoName] || 0; + } + var d = ele.pstyle(opts.name); + switch (d.strValue) { + case "label": + ele.recalculateRenderedStyle(); + return _p.rstyle[opts.labelName] || 0; + default: + return d.pfValue; + } + } else { + return 1; + } + } + }; + fn$2["outer" + opts.uppercaseName] = function outerDimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + var dim = ele[opts.name](); + var border = ele.pstyle("border-width").pfValue; + var padding2 = 2 * ele.padding(); + return dim + border + padding2; + } else { + return 1; + } + } + }; + fn$2["rendered" + opts.uppercaseName] = function renderedDimImpl() { + var ele = this[0]; + if (ele) { + var d = ele[opts.name](); + return d * this.cy().zoom(); + } + }; + fn$2["rendered" + opts.uppercaseOuterName] = function renderedOuterDimImpl() { + var ele = this[0]; + if (ele) { + var od = ele[opts.outerName](); + return od * this.cy().zoom(); + } + }; + }; + defineDimFns({ + name: "width" + }); + defineDimFns({ + name: "height" + }); + elesfn$a.padding = function() { + var ele = this[0]; + var _p = ele._private; + if (ele.isParent()) { + ele.updateCompoundBounds(); + if (_p.autoPadding !== void 0) { + return _p.autoPadding; + } else { + return ele.pstyle("padding").pfValue; + } + } else { + return ele.pstyle("padding").pfValue; + } + }; + elesfn$a.paddedHeight = function() { + var ele = this[0]; + return ele.height() + 2 * ele.padding(); + }; + elesfn$a.paddedWidth = function() { + var ele = this[0]; + return ele.width() + 2 * ele.padding(); + }; + var widthHeight = elesfn$a; + var ifEdge = function ifEdge2(ele, getValue3) { + if (ele.isEdge()) { + return getValue3(ele); + } + }; + var ifEdgeRenderedPosition = function ifEdgeRenderedPosition2(ele, getPoint) { + if (ele.isEdge()) { + var cy = ele.cy(); + return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan()); + } + }; + var ifEdgeRenderedPositions = function ifEdgeRenderedPositions2(ele, getPoints) { + if (ele.isEdge()) { + var cy = ele.cy(); + var pan = cy.pan(); + var zoom = cy.zoom(); + return getPoints(ele).map(function(p2) { + return modelToRenderedPosition(p2, zoom, pan); + }); + } + }; + var controlPoints2 = function controlPoints3(ele) { + return ele.renderer().getControlPoints(ele); + }; + var segmentPoints = function segmentPoints2(ele) { + return ele.renderer().getSegmentPoints(ele); + }; + var sourceEndpoint = function sourceEndpoint2(ele) { + return ele.renderer().getSourceEndpoint(ele); + }; + var targetEndpoint = function targetEndpoint2(ele) { + return ele.renderer().getTargetEndpoint(ele); + }; + var midpoint = function midpoint2(ele) { + return ele.renderer().getEdgeMidpoint(ele); + }; + var pts = { + controlPoints: { + get: controlPoints2, + mult: true + }, + segmentPoints: { + get: segmentPoints, + mult: true + }, + sourceEndpoint: { + get: sourceEndpoint + }, + targetEndpoint: { + get: targetEndpoint + }, + midpoint: { + get: midpoint + } + }; + var renderedName = function renderedName2(name2) { + return "rendered" + name2[0].toUpperCase() + name2.substr(1); + }; + var edgePoints = Object.keys(pts).reduce(function(obj, name2) { + var spec = pts[name2]; + var rName = renderedName(name2); + obj[name2] = function() { + return ifEdge(this, spec.get); + }; + if (spec.mult) { + obj[rName] = function() { + return ifEdgeRenderedPositions(this, spec.get); + }; + } else { + obj[rName] = function() { + return ifEdgeRenderedPosition(this, spec.get); + }; + } + return obj; + }, {}); + var dimensions = extend2({}, position2, bounds2, widthHeight, edgePoints); + /*! + Event object based on jQuery events, MIT license + + https://jquery.org/license/ + https://tldrlegal.com/license/mit-license + https://github.com/jquery/jquery/blob/master/src/event.js + */ + var Event = function Event2(src, props) { + this.recycle(src, props); + }; + function returnFalse() { + return false; + } + function returnTrue() { + return true; + } + Event.prototype = { + instanceString: function instanceString() { + return "event"; + }, + recycle: function recycle(src, props) { + this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse; + if (src != null && src.preventDefault) { + this.type = src.type; + this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse; + } else if (src != null && src.type) { + props = src; + } else { + this.type = src; + } + if (props != null) { + this.originalEvent = props.originalEvent; + this.type = props.type != null ? props.type : this.type; + this.cy = props.cy; + this.target = props.target; + this.position = props.position; + this.renderedPosition = props.renderedPosition; + this.namespace = props.namespace; + this.layout = props.layout; + } + if (this.cy != null && this.position != null && this.renderedPosition == null) { + var pos = this.position; + var zoom = this.cy.zoom(); + var pan = this.cy.pan(); + this.renderedPosition = { + x: pos.x * zoom + pan.x, + y: pos.y * zoom + pan.y + }; + } + this.timeStamp = src && src.timeStamp || Date.now(); + }, + preventDefault: function preventDefault() { + this.isDefaultPrevented = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + if (e.preventDefault) { + e.preventDefault(); + } + }, + stopPropagation: function stopPropagation() { + this.isPropagationStopped = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + if (e.stopPropagation) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function stopImmediatePropagation() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse + }; + var eventRegex = /^([^.]+)(\.(?:[^.]+))?$/; + var universalNamespace = ".*"; + var defaults$8 = { + qualifierCompare: function qualifierCompare(q1, q2) { + return q1 === q2; + }, + eventMatches: function eventMatches() { + return true; + }, + addEventFields: function addEventFields() { + }, + callbackContext: function callbackContext(context) { + return context; + }, + beforeEmit: function beforeEmit() { + }, + afterEmit: function afterEmit() { + }, + bubble: function bubble() { + return false; + }, + parent: function parent() { + return null; + }, + context: null + }; + var defaultsKeys = Object.keys(defaults$8); + var emptyOpts = {}; + function Emitter() { + var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : emptyOpts; + var context = arguments.length > 1 ? arguments[1] : void 0; + for (var i3 = 0; i3 < defaultsKeys.length; i3++) { + var key = defaultsKeys[i3]; + this[key] = opts[key] || defaults$8[key]; + } + this.context = context || this.context; + this.listeners = []; + this.emitting = 0; + } + var p = Emitter.prototype; + var forEachEvent = function forEachEvent2(self2, handler, events, qualifier, callback, conf2, confOverrides) { + if (fn$6(qualifier)) { + callback = qualifier; + qualifier = null; + } + if (confOverrides) { + if (conf2 == null) { + conf2 = confOverrides; + } else { + conf2 = extend2({}, conf2, confOverrides); + } + } + var eventList = array2(events) ? events : events.split(/\s+/); + for (var i3 = 0; i3 < eventList.length; i3++) { + var evt = eventList[i3]; + if (emptyString(evt)) { + continue; + } + var match2 = evt.match(eventRegex); + if (match2) { + var type2 = match2[1]; + var namespace2 = match2[2] ? match2[2] : null; + var ret = handler(self2, evt, type2, namespace2, qualifier, callback, conf2); + if (ret === false) { + break; + } + } + } + }; + var makeEventObj = function makeEventObj2(self2, obj) { + self2.addEventFields(self2.context, obj); + return new Event(obj.type, obj); + }; + var forEachEventObj = function forEachEventObj2(self2, handler, events) { + if (event(events)) { + handler(self2, events); + return; + } else if (plainObject(events)) { + handler(self2, makeEventObj(self2, events)); + return; + } + var eventList = array2(events) ? events : events.split(/\s+/); + for (var i3 = 0; i3 < eventList.length; i3++) { + var evt = eventList[i3]; + if (emptyString(evt)) { + continue; + } + var match2 = evt.match(eventRegex); + if (match2) { + var type2 = match2[1]; + var namespace2 = match2[2] ? match2[2] : null; + var eventObj = makeEventObj(self2, { + type: type2, + namespace: namespace2, + target: self2.context + }); + handler(self2, eventObj); + } + } + }; + p.on = p.addListener = function(events, qualifier, callback, conf2, confOverrides) { + forEachEvent(this, function(self2, event2, type2, namespace2, qualifier2, callback2, conf3) { + if (fn$6(callback2)) { + self2.listeners.push({ + event: event2, + // full event string + callback: callback2, + // callback to run + type: type2, + // the event type (e.g. 'click') + namespace: namespace2, + // the event namespace (e.g. ".foo") + qualifier: qualifier2, + // a restriction on whether to match this emitter + conf: conf3 + // additional configuration + }); + } + }, events, qualifier, callback, conf2, confOverrides); + return this; + }; + p.one = function(events, qualifier, callback, conf2) { + return this.on(events, qualifier, callback, conf2, { + one: true + }); + }; + p.removeListener = p.off = function(events, qualifier, callback, conf2) { + var _this = this; + if (this.emitting !== 0) { + this.listeners = copyArray$1(this.listeners); + } + var listeners = this.listeners; + var _loop = function _loop2(i4) { + var listener = listeners[i4]; + forEachEvent(_this, function(self2, event2, type2, namespace2, qualifier2, callback2) { + if ((listener.type === type2 || events === "*") && (!namespace2 && listener.namespace !== ".*" || listener.namespace === namespace2) && (!qualifier2 || self2.qualifierCompare(listener.qualifier, qualifier2)) && (!callback2 || listener.callback === callback2)) { + listeners.splice(i4, 1); + return false; + } + }, events, qualifier, callback, conf2); + }; + for (var i3 = listeners.length - 1; i3 >= 0; i3--) { + _loop(i3); + } + return this; + }; + p.removeAllListeners = function() { + return this.removeListener("*"); + }; + p.emit = p.trigger = function(events, extraParams, manualCallback) { + var listeners = this.listeners; + var numListenersBeforeEmit = listeners.length; + this.emitting++; + if (!array2(extraParams)) { + extraParams = [extraParams]; + } + forEachEventObj(this, function(self2, eventObj) { + if (manualCallback != null) { + listeners = [{ + event: eventObj.event, + type: eventObj.type, + namespace: eventObj.namespace, + callback: manualCallback + }]; + numListenersBeforeEmit = listeners.length; + } + var _loop2 = function _loop22(i4) { + var listener = listeners[i4]; + if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self2.eventMatches(self2.context, listener, eventObj)) { + var args = [eventObj]; + if (extraParams != null) { + push2(args, extraParams); + } + self2.beforeEmit(self2.context, listener, eventObj); + if (listener.conf && listener.conf.one) { + self2.listeners = self2.listeners.filter(function(l) { + return l !== listener; + }); + } + var context = self2.callbackContext(self2.context, listener, eventObj); + var ret = listener.callback.apply(context, args); + self2.afterEmit(self2.context, listener, eventObj); + if (ret === false) { + eventObj.stopPropagation(); + eventObj.preventDefault(); + } + } + }; + for (var i3 = 0; i3 < numListenersBeforeEmit; i3++) { + _loop2(i3); + } + if (self2.bubble(self2.context) && !eventObj.isPropagationStopped()) { + self2.parent(self2.context).emit(eventObj, extraParams); + } + }, events); + this.emitting--; + return this; + }; + var emitterOptions$1 = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(ele, listener, eventObj) { + var selector2 = listener.qualifier; + if (selector2 != null) { + return ele !== eventObj.target && element2(eventObj.target) && selector2.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(ele, evt) { + evt.cy = ele.cy(); + evt.target = ele; + }, + callbackContext: function callbackContext(ele, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : ele; + }, + beforeEmit: function beforeEmit(context, listener) { + if (listener.conf && listener.conf.once) { + listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback); + } + }, + bubble: function bubble() { + return true; + }, + parent: function parent(ele) { + return ele.isChild() ? ele.parent() : ele.cy(); + } + }; + var argSelector$1 = function argSelector2(arg) { + if (string2(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + var elesfn$9 = { + createEmitter: function createEmitter() { + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var _p = ele._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions$1, ele); + } + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector2, callback) { + var argSel = argSelector$1(selector2); + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + ele.emitter().on(events, argSel, callback); + } + return this; + }, + removeListener: function removeListener(events, selector2, callback) { + var argSel = argSelector$1(selector2); + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + ele.emitter().removeListener(events, argSel, callback); + } + return this; + }, + removeAllListeners: function removeAllListeners() { + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + ele.emitter().removeAllListeners(); + } + return this; + }, + one: function one2(events, selector2, callback) { + var argSel = argSelector$1(selector2); + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + ele.emitter().one(events, argSel, callback); + } + return this; + }, + once: function once(events, selector2, callback) { + var argSel = argSelector$1(selector2); + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + ele.emitter().on(events, argSel, callback, { + once: true, + onceCollection: this + }); + } + }, + emit: function emit(events, extraParams) { + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + ele.emitter().emit(events, extraParams); + } + return this; + }, + emitAndNotify: function emitAndNotify(event2, extraParams) { + if (this.length === 0) { + return; + } + this.cy().notify(event2, this); + this.emit(event2, extraParams); + return this; + } + }; + define3.eventAliasesOn(elesfn$9); + var elesfn$8 = { + nodes: function nodes2(selector2) { + return this.filter(function(ele) { + return ele.isNode(); + }).filter(selector2); + }, + edges: function edges2(selector2) { + return this.filter(function(ele) { + return ele.isEdge(); + }).filter(selector2); + }, + // internal helper to get nodes and edges as separate collections with single iteration over elements + byGroup: function byGroup() { + var nodes2 = this.spawn(); + var edges2 = this.spawn(); + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + if (ele.isNode()) { + nodes2.push(ele); + } else { + edges2.push(ele); + } + } + return { + nodes: nodes2, + edges: edges2 + }; + }, + filter: function filter3(_filter, thisArg) { + if (_filter === void 0) { + return this; + } else if (string2(_filter) || elementOrCollection(_filter)) { + return new Selector(_filter).filter(this); + } else if (fn$6(_filter)) { + var filterEles = this.spawn(); + var eles = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var include = thisArg ? _filter.apply(thisArg, [ele, i3, eles]) : _filter(ele, i3, eles); + if (include) { + filterEles.push(ele); + } + } + return filterEles; + } + return this.spawn(); + }, + not: function not(toRemove) { + if (!toRemove) { + return this; + } else { + if (string2(toRemove)) { + toRemove = this.filter(toRemove); + } + var elements2 = this.spawn(); + for (var i3 = 0; i3 < this.length; i3++) { + var element3 = this[i3]; + var remove2 = toRemove.has(element3); + if (!remove2) { + elements2.push(element3); + } + } + return elements2; + } + }, + absoluteComplement: function absoluteComplement() { + var cy = this.cy(); + return cy.mutableElements().not(this); + }, + intersect: function intersect2(other) { + if (string2(other)) { + var selector2 = other; + return this.filter(selector2); + } + var elements2 = this.spawn(); + var col1 = this; + var col2 = other; + var col1Smaller = this.length < other.length; + var colS = col1Smaller ? col1 : col2; + var colL = col1Smaller ? col2 : col1; + for (var i3 = 0; i3 < colS.length; i3++) { + var ele = colS[i3]; + if (colL.has(ele)) { + elements2.push(ele); + } + } + return elements2; + }, + xor: function xor(other) { + var cy = this._private.cy; + if (string2(other)) { + other = cy.$(other); + } + var elements2 = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add2(col, other2) { + for (var i3 = 0; i3 < col.length; i3++) { + var ele = col[i3]; + var id2 = ele._private.data.id; + var inOther = other2.hasElementWithId(id2); + if (!inOther) { + elements2.push(ele); + } + } + }; + add(col1, col2); + add(col2, col1); + return elements2; + }, + diff: function diff(other) { + var cy = this._private.cy; + if (string2(other)) { + other = cy.$(other); + } + var left2 = this.spawn(); + var right2 = this.spawn(); + var both = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add2(col, other2, retEles) { + for (var i3 = 0; i3 < col.length; i3++) { + var ele = col[i3]; + var id2 = ele._private.data.id; + var inOther = other2.hasElementWithId(id2); + if (inOther) { + both.merge(ele); + } else { + retEles.push(ele); + } + } + }; + add(col1, col2, left2); + add(col2, col1, right2); + return { + left: left2, + right: right2, + both + }; + }, + add: function add(toAdd) { + var cy = this._private.cy; + if (!toAdd) { + return this; + } + if (string2(toAdd)) { + var selector2 = toAdd; + toAdd = cy.mutableElements().filter(selector2); + } + var elements2 = this.spawnSelf(); + for (var i3 = 0; i3 < toAdd.length; i3++) { + var ele = toAdd[i3]; + var add2 = !this.has(ele); + if (add2) { + elements2.push(ele); + } + } + return elements2; + }, + // in place merge on calling collection + merge: function merge2(toAdd) { + var _p = this._private; + var cy = _p.cy; + if (!toAdd) { + return this; + } + if (toAdd && string2(toAdd)) { + var selector2 = toAdd; + toAdd = cy.mutableElements().filter(selector2); + } + var map2 = _p.map; + for (var i3 = 0; i3 < toAdd.length; i3++) { + var toAddEle = toAdd[i3]; + var id2 = toAddEle._private.data.id; + var add = !map2.has(id2); + if (add) { + var index2 = this.length++; + this[index2] = toAddEle; + map2.set(id2, { + ele: toAddEle, + index: index2 + }); + } + } + return this; + }, + unmergeAt: function unmergeAt(i3) { + var ele = this[i3]; + var id2 = ele.id(); + var _p = this._private; + var map2 = _p.map; + this[i3] = void 0; + map2["delete"](id2); + var unmergedLastEle = i3 === this.length - 1; + if (this.length > 1 && !unmergedLastEle) { + var lastEleI = this.length - 1; + var lastEle = this[lastEleI]; + var lastEleId = lastEle._private.data.id; + this[lastEleI] = void 0; + this[i3] = lastEle; + map2.set(lastEleId, { + ele: lastEle, + index: i3 + }); + } + this.length--; + return this; + }, + // remove single ele in place in calling collection + unmergeOne: function unmergeOne(ele) { + ele = ele[0]; + var _p = this._private; + var id2 = ele._private.data.id; + var map2 = _p.map; + var entry = map2.get(id2); + if (!entry) { + return this; + } + var i3 = entry.index; + this.unmergeAt(i3); + return this; + }, + // remove eles in place on calling collection + unmerge: function unmerge(toRemove) { + var cy = this._private.cy; + if (!toRemove) { + return this; + } + if (toRemove && string2(toRemove)) { + var selector2 = toRemove; + toRemove = cy.mutableElements().filter(selector2); + } + for (var i3 = 0; i3 < toRemove.length; i3++) { + this.unmergeOne(toRemove[i3]); + } + return this; + }, + unmergeBy: function unmergeBy(toRmFn) { + for (var i3 = this.length - 1; i3 >= 0; i3--) { + var ele = this[i3]; + if (toRmFn(ele)) { + this.unmergeAt(i3); + } + } + return this; + }, + map: function map2(mapFn, thisArg) { + var arr = []; + var eles = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var ret = thisArg ? mapFn.apply(thisArg, [ele, i3, eles]) : mapFn(ele, i3, eles); + arr.push(ret); + } + return arr; + }, + reduce: function reduce2(fn2, initialValue) { + var val = initialValue; + var eles = this; + for (var i3 = 0; i3 < eles.length; i3++) { + val = fn2(val, eles[i3], i3, eles); + } + return val; + }, + max: function max3(valFn, thisArg) { + var max4 = -Infinity; + var maxEle; + var eles = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var val = thisArg ? valFn.apply(thisArg, [ele, i3, eles]) : valFn(ele, i3, eles); + if (val > max4) { + max4 = val; + maxEle = ele; + } + } + return { + value: max4, + ele: maxEle + }; + }, + min: function min3(valFn, thisArg) { + var min4 = Infinity; + var minEle; + var eles = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var val = thisArg ? valFn.apply(thisArg, [ele, i3, eles]) : valFn(ele, i3, eles); + if (val < min4) { + min4 = val; + minEle = ele; + } + } + return { + value: min4, + ele: minEle + }; + } + }; + var fn$1 = elesfn$8; + fn$1["u"] = fn$1["|"] = fn$1["+"] = fn$1.union = fn$1.or = fn$1.add; + fn$1["\\"] = fn$1["!"] = fn$1["-"] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not; + fn$1["n"] = fn$1["&"] = fn$1["."] = fn$1.and = fn$1.intersection = fn$1.intersect; + fn$1["^"] = fn$1["(+)"] = fn$1["(-)"] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor; + fn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter; + fn$1.complement = fn$1.abscomp = fn$1.absoluteComplement; + var elesfn$7 = { + isNode: function isNode() { + return this.group() === "nodes"; + }, + isEdge: function isEdge() { + return this.group() === "edges"; + }, + isLoop: function isLoop() { + return this.isEdge() && this.source()[0] === this.target()[0]; + }, + isSimple: function isSimple() { + return this.isEdge() && this.source()[0] !== this.target()[0]; + }, + group: function group() { + var ele = this[0]; + if (ele) { + return ele._private.group; + } + } + }; + var zIndexSort = function zIndexSort2(a, b) { + var cy = a.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + function getDepth(ele) { + var style = ele.pstyle("z-compound-depth"); + if (style.value === "auto") { + return hasCompoundNodes ? ele.zDepth() : 0; + } else if (style.value === "bottom") { + return -1; + } else if (style.value === "top") { + return MAX_INT$1; + } + return 0; + } + var depthDiff = getDepth(a) - getDepth(b); + if (depthDiff !== 0) { + return depthDiff; + } + function getEleDepth(ele) { + var style = ele.pstyle("z-index-compare"); + if (style.value === "auto") { + return ele.isNode() ? 1 : 0; + } + return 0; + } + var eleDiff = getEleDepth(a) - getEleDepth(b); + if (eleDiff !== 0) { + return eleDiff; + } + var zDiff = a.pstyle("z-index").value - b.pstyle("z-index").value; + if (zDiff !== 0) { + return zDiff; + } + return a.poolIndex() - b.poolIndex(); + }; + var elesfn$6 = { + forEach: function forEach2(fn2, thisArg) { + if (fn$6(fn2)) { + var N = this.length; + for (var i3 = 0; i3 < N; i3++) { + var ele = this[i3]; + var ret = thisArg ? fn2.apply(thisArg, [ele, i3, this]) : fn2(ele, i3, this); + if (ret === false) { + break; + } + } + } + return this; + }, + toArray: function toArray2() { + var array3 = []; + for (var i3 = 0; i3 < this.length; i3++) { + array3.push(this[i3]); + } + return array3; + }, + slice: function slice2(start2, end2) { + var array3 = []; + var thisSize = this.length; + if (end2 == null) { + end2 = thisSize; + } + if (start2 == null) { + start2 = 0; + } + if (start2 < 0) { + start2 = thisSize + start2; + } + if (end2 < 0) { + end2 = thisSize + end2; + } + for (var i3 = start2; i3 >= 0 && i3 < end2 && i3 < thisSize; i3++) { + array3.push(this[i3]); + } + return this.spawn(array3); + }, + size: function size2() { + return this.length; + }, + eq: function eq3(i3) { + return this[i3] || this.spawn(); + }, + first: function first() { + return this[0] || this.spawn(); + }, + last: function last2() { + return this[this.length - 1] || this.spawn(); + }, + empty: function empty2() { + return this.length === 0; + }, + nonempty: function nonempty() { + return !this.empty(); + }, + sort: function sort2(sortFn) { + if (!fn$6(sortFn)) { + return this; + } + var sorted = this.toArray().sort(sortFn); + return this.spawn(sorted); + }, + sortByZIndex: function sortByZIndex() { + return this.sort(zIndexSort); + }, + zDepth: function zDepth() { + var ele = this[0]; + if (!ele) { + return void 0; + } + var _p = ele._private; + var group = _p.group; + if (group === "nodes") { + var depth = _p.data.parent ? ele.parents().size() : 0; + if (!ele.isParent()) { + return MAX_INT$1 - 1; + } + return depth; + } else { + var src = _p.source; + var tgt = _p.target; + var srcDepth = src.zDepth(); + var tgtDepth = tgt.zDepth(); + return Math.max(srcDepth, tgtDepth, 0); + } + } + }; + elesfn$6.each = elesfn$6.forEach; + var defineSymbolIterator = function defineSymbolIterator2() { + var typeofUndef = "undefined"; + var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; + if (isIteratorSupported) { + elesfn$6[Symbol.iterator] = function() { + var _this = this; + var entry = { + value: void 0, + done: false + }; + var i3 = 0; + var length2 = this.length; + return _defineProperty$1({ + next: function next2() { + if (i3 < length2) { + entry.value = _this[i3++]; + } else { + entry.value = void 0; + entry.done = true; + } + return entry; + } + }, Symbol.iterator, function() { + return this; + }); + }; + } + }; + defineSymbolIterator(); + var getLayoutDimensionOptions = defaults$g({ + nodeDimensionsIncludeLabels: false + }); + var elesfn$5 = { + // Calculates and returns node dimensions { x, y } based on options given + layoutDimensions: function layoutDimensions(options2) { + options2 = getLayoutDimensionOptions(options2); + var dims; + if (!this.takesUpSpace()) { + dims = { + w: 0, + h: 0 + }; + } else if (options2.nodeDimensionsIncludeLabels) { + var bbDim = this.boundingBox(); + dims = { + w: bbDim.w, + h: bbDim.h + }; + } else { + dims = { + w: this.outerWidth(), + h: this.outerHeight() + }; + } + if (dims.w === 0 || dims.h === 0) { + dims.w = dims.h = 1; + } + return dims; + }, + // using standard layout options, apply position function (w/ or w/o animation) + layoutPositions: function layoutPositions(layout3, options2, fn2) { + var nodes2 = this.nodes().filter(function(n) { + return !n.isParent(); + }); + var cy = this.cy(); + var layoutEles = options2.eles; + var getMemoizeKey = function getMemoizeKey2(node3) { + return node3.id(); + }; + var fnMem = memoize$1(fn2, getMemoizeKey); + layout3.emit({ + type: "layoutstart", + layout: layout3 + }); + layout3.animations = []; + var calculateSpacing = function calculateSpacing2(spacing, nodesBb, pos) { + var center2 = { + x: nodesBb.x1 + nodesBb.w / 2, + y: nodesBb.y1 + nodesBb.h / 2 + }; + var spacingVector = { + // scale from center of bounding box (not necessarily 0,0) + x: (pos.x - center2.x) * spacing, + y: (pos.y - center2.y) * spacing + }; + return { + x: center2.x + spacingVector.x, + y: center2.y + spacingVector.y + }; + }; + var useSpacingFactor = options2.spacingFactor && options2.spacingFactor !== 1; + var spacingBb = function spacingBb2() { + if (!useSpacingFactor) { + return null; + } + var bb2 = makeBoundingBox(); + for (var i4 = 0; i4 < nodes2.length; i4++) { + var node3 = nodes2[i4]; + var pos = fnMem(node3, i4); + expandBoundingBoxByPoint(bb2, pos.x, pos.y); + } + return bb2; + }; + var bb = spacingBb(); + var getFinalPos = memoize$1(function(node3, i4) { + var newPos2 = fnMem(node3, i4); + if (useSpacingFactor) { + var spacing = Math.abs(options2.spacingFactor); + newPos2 = calculateSpacing(spacing, bb, newPos2); + } + if (options2.transform != null) { + newPos2 = options2.transform(node3, newPos2); + } + return newPos2; + }, getMemoizeKey); + if (options2.animate) { + for (var i3 = 0; i3 < nodes2.length; i3++) { + var node2 = nodes2[i3]; + var newPos = getFinalPos(node2, i3); + var animateNode = options2.animateFilter == null || options2.animateFilter(node2, i3); + if (animateNode) { + var ani = node2.animation({ + position: newPos, + duration: options2.animationDuration, + easing: options2.animationEasing + }); + layout3.animations.push(ani); + } else { + node2.position(newPos); + } + } + if (options2.fit) { + var fitAni = cy.animation({ + fit: { + boundingBox: layoutEles.boundingBoxAt(getFinalPos), + padding: options2.padding + }, + duration: options2.animationDuration, + easing: options2.animationEasing + }); + layout3.animations.push(fitAni); + } else if (options2.zoom !== void 0 && options2.pan !== void 0) { + var zoomPanAni = cy.animation({ + zoom: options2.zoom, + pan: options2.pan, + duration: options2.animationDuration, + easing: options2.animationEasing + }); + layout3.animations.push(zoomPanAni); + } + layout3.animations.forEach(function(ani2) { + return ani2.play(); + }); + layout3.one("layoutready", options2.ready); + layout3.emit({ + type: "layoutready", + layout: layout3 + }); + Promise$12.all(layout3.animations.map(function(ani2) { + return ani2.promise(); + })).then(function() { + layout3.one("layoutstop", options2.stop); + layout3.emit({ + type: "layoutstop", + layout: layout3 + }); + }); + } else { + nodes2.positions(getFinalPos); + if (options2.fit) { + cy.fit(options2.eles, options2.padding); + } + if (options2.zoom != null) { + cy.zoom(options2.zoom); + } + if (options2.pan) { + cy.pan(options2.pan); + } + layout3.one("layoutready", options2.ready); + layout3.emit({ + type: "layoutready", + layout: layout3 + }); + layout3.one("layoutstop", options2.stop); + layout3.emit({ + type: "layoutstop", + layout: layout3 + }); + } + return this; + }, + layout: function layout3(options2) { + var cy = this.cy(); + return cy.makeLayout(extend2({}, options2, { + eles: this + })); + } + }; + elesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout; + function styleCache(key, fn2, ele) { + var _p = ele._private; + var cache2 = _p.styleCache = _p.styleCache || []; + var val; + if ((val = cache2[key]) != null) { + return val; + } else { + val = cache2[key] = fn2(ele); + return val; + } + } + function cacheStyleFunction(key, fn2) { + key = hashString(key); + return function cachedStyleFunction(ele) { + return styleCache(key, fn2, ele); + }; + } + function cachePrototypeStyleFunction(key, fn2) { + key = hashString(key); + var selfFn = function selfFn2(ele) { + return fn2.call(ele); + }; + return function cachedPrototypeStyleFunction() { + var ele = this[0]; + if (ele) { + return styleCache(key, selfFn, ele); + } + }; + } + var elesfn$4 = { + recalculateRenderedStyle: function recalculateRenderedStyle(useCache) { + var cy = this.cy(); + var renderer3 = cy.renderer(); + var styleEnabled = cy.styleEnabled(); + if (renderer3 && styleEnabled) { + renderer3.recalculateRenderedStyle(this, useCache); + } + return this; + }, + dirtyStyleCache: function dirtyStyleCache() { + var cy = this.cy(); + var dirty = function dirty2(ele) { + return ele._private.styleCache = null; + }; + if (cy.hasCompoundNodes()) { + var eles; + eles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + eles.merge(eles.connectedEdges()); + eles.forEach(dirty); + } else { + this.forEach(function(ele) { + dirty(ele); + ele.connectedEdges().forEach(dirty); + }); + } + return this; + }, + // fully updates (recalculates) the style for the elements + updateStyle: function updateStyle(notifyRenderer) { + var cy = this._private.cy; + if (!cy.styleEnabled()) { + return this; + } + if (cy.batching()) { + var bEles = cy._private.batchStyleEles; + bEles.merge(this); + return this; + } + var hasCompounds = cy.hasCompoundNodes(); + var updatedEles = this; + notifyRenderer = notifyRenderer || notifyRenderer === void 0 ? true : false; + if (hasCompounds) { + updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + } + var changedEles = updatedEles; + if (notifyRenderer) { + changedEles.emitAndNotify("style"); + } else { + changedEles.emit("style"); + } + updatedEles.forEach(function(ele) { + return ele._private.styleDirty = true; + }); + return this; + }, + // private: clears dirty flag and recalculates style + cleanStyle: function cleanStyle() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return; + } + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + if (ele._private.styleDirty) { + ele._private.styleDirty = false; + cy.style().apply(ele); + } + } + }, + // get the internal parsed style object for the specified property + parsedStyle: function parsedStyle(property2) { + var includeNonDefault = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var ele = this[0]; + var cy = ele.cy(); + if (!cy.styleEnabled()) { + return; + } + if (ele) { + this.cleanStyle(); + var overriddenStyle = ele._private.style[property2]; + if (overriddenStyle != null) { + return overriddenStyle; + } else if (includeNonDefault) { + return cy.style().getDefaultProperty(property2); + } else { + return null; + } + } + }, + numericStyle: function numericStyle(property2) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + var pstyle = ele.pstyle(property2); + return pstyle.pfValue !== void 0 ? pstyle.pfValue : pstyle.value; + } + }, + numericStyleUnits: function numericStyleUnits(property2) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + return ele.pstyle(property2).units; + } + }, + // get the specified css property as a rendered value (i.e. on-screen value) + // or get the whole rendered style if no property specified (NB doesn't allow setting) + renderedStyle: function renderedStyle(property2) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var ele = this[0]; + if (ele) { + return cy.style().getRenderedStyle(ele, property2); + } + }, + // read the calculated css style of the element or override the style (via a bypass) + style: function style(name2, value2) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style2 = cy.style(); + if (plainObject(name2)) { + var props = name2; + style2.applyBypass(this, props, updateTransitions); + this.emitAndNotify("style"); + } else if (string2(name2)) { + if (value2 === void 0) { + var ele = this[0]; + if (ele) { + return style2.getStylePropertyValue(ele, name2); + } else { + return; + } + } else { + style2.applyBypass(this, name2, value2, updateTransitions); + this.emitAndNotify("style"); + } + } else if (name2 === void 0) { + var _ele = this[0]; + if (_ele) { + return style2.getRawStyle(_ele); + } else { + return; + } + } + return this; + }, + removeStyle: function removeStyle(names) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style = cy.style(); + var eles = this; + if (names === void 0) { + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + style.removeAllBypasses(ele, updateTransitions); + } + } else { + names = names.split(/\s+/); + for (var _i = 0; _i < eles.length; _i++) { + var _ele2 = eles[_i]; + style.removeBypasses(_ele2, names, updateTransitions); + } + } + this.emitAndNotify("style"); + return this; + }, + show: function show() { + this.css("display", "element"); + return this; + }, + hide: function hide() { + this.css("display", "none"); + return this; + }, + effectiveOpacity: function effectiveOpacity() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return 1; + } + var hasCompoundNodes = cy.hasCompoundNodes(); + var ele = this[0]; + if (ele) { + var _p = ele._private; + var parentOpacity = ele.pstyle("opacity").value; + if (!hasCompoundNodes) { + return parentOpacity; + } + var parents2 = !_p.data.parent ? null : ele.parents(); + if (parents2) { + for (var i3 = 0; i3 < parents2.length; i3++) { + var parent = parents2[i3]; + var opacity = parent.pstyle("opacity").value; + parentOpacity = opacity * parentOpacity; + } + } + return parentOpacity; + } + }, + transparent: function transparent() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + var hasCompoundNodes = ele.cy().hasCompoundNodes(); + if (ele) { + if (!hasCompoundNodes) { + return ele.pstyle("opacity").value === 0; + } else { + return ele.effectiveOpacity() === 0; + } + } + }, + backgrounding: function backgrounding() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + return ele._private.backgrounding ? true : false; + } + }; + function checkCompound(ele, parentOk) { + var _p = ele._private; + var parents2 = _p.data.parent ? ele.parents() : null; + if (parents2) { + for (var i3 = 0; i3 < parents2.length; i3++) { + var parent = parents2[i3]; + if (!parentOk(parent)) { + return false; + } + } + } + return true; + } + function defineDerivedStateFunction(specs) { + var ok = specs.ok; + var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; + var parentOk = specs.parentOk || specs.ok; + return function() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return true; + } + var ele = this[0]; + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele) { + var _p = ele._private; + if (!ok(ele)) { + return false; + } + if (ele.isNode()) { + return !hasCompoundNodes || checkCompound(ele, parentOk); + } else { + var src = _p.source; + var tgt = _p.target; + return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); + } + } + }; + } + var eleTakesUpSpace = cacheStyleFunction("eleTakesUpSpace", function(ele) { + return ele.pstyle("display").value === "element" && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true); + }); + elesfn$4.takesUpSpace = cachePrototypeStyleFunction("takesUpSpace", defineDerivedStateFunction({ + ok: eleTakesUpSpace + })); + var eleInteractive = cacheStyleFunction("eleInteractive", function(ele) { + return ele.pstyle("events").value === "yes" && ele.pstyle("visibility").value === "visible" && eleTakesUpSpace(ele); + }); + var parentInteractive = cacheStyleFunction("parentInteractive", function(parent) { + return parent.pstyle("visibility").value === "visible" && eleTakesUpSpace(parent); + }); + elesfn$4.interactive = cachePrototypeStyleFunction("interactive", defineDerivedStateFunction({ + ok: eleInteractive, + parentOk: parentInteractive, + edgeOkViaNode: eleTakesUpSpace + })); + elesfn$4.noninteractive = function() { + var ele = this[0]; + if (ele) { + return !ele.interactive(); + } + }; + var eleVisible = cacheStyleFunction("eleVisible", function(ele) { + return ele.pstyle("visibility").value === "visible" && ele.pstyle("opacity").pfValue !== 0 && eleTakesUpSpace(ele); + }); + var edgeVisibleViaNode = eleTakesUpSpace; + elesfn$4.visible = cachePrototypeStyleFunction("visible", defineDerivedStateFunction({ + ok: eleVisible, + edgeOkViaNode: edgeVisibleViaNode + })); + elesfn$4.hidden = function() { + var ele = this[0]; + if (ele) { + return !ele.visible(); + } + }; + elesfn$4.isBundledBezier = cachePrototypeStyleFunction("isBundledBezier", function() { + if (!this.cy().styleEnabled()) { + return false; + } + return !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace(); + }); + elesfn$4.bypass = elesfn$4.css = elesfn$4.style; + elesfn$4.renderedCss = elesfn$4.renderedStyle; + elesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle; + elesfn$4.pstyle = elesfn$4.parsedStyle; + var elesfn$3 = {}; + function defineSwitchFunction(params) { + return function() { + var args = arguments; + var changedEles = []; + if (args.length === 2) { + var data2 = args[0]; + var handler = args[1]; + this.on(params.event, data2, handler); + } else if (args.length === 1 && fn$6(args[0])) { + var _handler = args[0]; + this.on(params.event, _handler); + } else if (args.length === 0 || args.length === 1 && array2(args[0])) { + var addlEvents = args.length === 1 ? args[0] : null; + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var able = !params.ableField || ele._private[params.ableField]; + var changed = ele._private[params.field] != params.value; + if (params.overrideAble) { + var overrideAble = params.overrideAble(ele); + if (overrideAble !== void 0) { + able = overrideAble; + if (!overrideAble) { + return this; + } + } + } + if (able) { + ele._private[params.field] = params.value; + if (changed) { + changedEles.push(ele); + } + } + } + var changedColl = this.spawn(changedEles); + changedColl.updateStyle(); + changedColl.emit(params.event); + if (addlEvents) { + changedColl.emit(addlEvents); + } + } + return this; + }; + } + function defineSwitchSet(params) { + elesfn$3[params.field] = function() { + var ele = this[0]; + if (ele) { + if (params.overrideField) { + var val = params.overrideField(ele); + if (val !== void 0) { + return val; + } + } + return ele._private[params.field]; + } + }; + elesfn$3[params.on] = defineSwitchFunction({ + event: params.on, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: true + }); + elesfn$3[params.off] = defineSwitchFunction({ + event: params.off, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: false + }); + } + defineSwitchSet({ + field: "locked", + overrideField: function overrideField(ele) { + return ele.cy().autolock() ? true : void 0; + }, + on: "lock", + off: "unlock" + }); + defineSwitchSet({ + field: "grabbable", + overrideField: function overrideField(ele) { + return ele.cy().autoungrabify() || ele.pannable() ? false : void 0; + }, + on: "grabify", + off: "ungrabify" + }); + defineSwitchSet({ + field: "selected", + ableField: "selectable", + overrideAble: function overrideAble(ele) { + return ele.cy().autounselectify() ? false : void 0; + }, + on: "select", + off: "unselect" + }); + defineSwitchSet({ + field: "selectable", + overrideField: function overrideField(ele) { + return ele.cy().autounselectify() ? false : void 0; + }, + on: "selectify", + off: "unselectify" + }); + elesfn$3.deselect = elesfn$3.unselect; + elesfn$3.grabbed = function() { + var ele = this[0]; + if (ele) { + return ele._private.grabbed; + } + }; + defineSwitchSet({ + field: "active", + on: "activate", + off: "unactivate" + }); + defineSwitchSet({ + field: "pannable", + on: "panify", + off: "unpanify" + }); + elesfn$3.inactive = function() { + var ele = this[0]; + if (ele) { + return !ele._private.active; + } + }; + var elesfn$2 = {}; + var defineDagExtremity = function defineDagExtremity2(params) { + return function dagExtremityImpl(selector2) { + var eles = this; + var ret = []; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + if (!ele.isNode()) { + continue; + } + var disqualified = false; + var edges2 = ele.connectedEdges(); + for (var j = 0; j < edges2.length; j++) { + var edge = edges2[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { + disqualified = true; + break; + } + } + if (!disqualified) { + ret.push(ele); + } + } + return this.spawn(ret, true).filter(selector2); + }; + }; + var defineDagOneHop = function defineDagOneHop2(params) { + return function(selector2) { + var eles = this; + var oEles = []; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + if (!ele.isNode()) { + continue; + } + var edges2 = ele.connectedEdges(); + for (var j = 0; j < edges2.length; j++) { + var edge = edges2[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.outgoing && src === ele) { + oEles.push(edge); + oEles.push(tgt); + } else if (params.incoming && tgt === ele) { + oEles.push(edge); + oEles.push(src); + } + } + } + return this.spawn(oEles, true).filter(selector2); + }; + }; + var defineDagAllHops = function defineDagAllHops2(params) { + return function(selector2) { + var eles = this; + var sEles = []; + var sElesIds = {}; + for (; ; ) { + var next2 = params.outgoing ? eles.outgoers() : eles.incomers(); + if (next2.length === 0) { + break; + } + var newNext = false; + for (var i3 = 0; i3 < next2.length; i3++) { + var n = next2[i3]; + var nid = n.id(); + if (!sElesIds[nid]) { + sElesIds[nid] = true; + sEles.push(n); + newNext = true; + } + } + if (!newNext) { + break; + } + eles = next2; + } + return this.spawn(sEles, true).filter(selector2); + }; + }; + elesfn$2.clearTraversalCache = function() { + for (var i3 = 0; i3 < this.length; i3++) { + this[i3]._private.traversalCache = null; + } + }; + extend2(elesfn$2, { + // get the root nodes in the DAG + roots: defineDagExtremity({ + noIncomingEdges: true + }), + // get the leaf nodes in the DAG + leaves: defineDagExtremity({ + noOutgoingEdges: true + }), + // normally called children in graph theory + // these nodes =edges=> outgoing nodes + outgoers: cache(defineDagOneHop({ + outgoing: true + }), "outgoers"), + // aka DAG descendants + successors: defineDagAllHops({ + outgoing: true + }), + // normally called parents in graph theory + // these nodes <=edges= incoming nodes + incomers: cache(defineDagOneHop({ + incoming: true + }), "incomers"), + // aka DAG ancestors + predecessors: defineDagAllHops({ + incoming: true + }) + }); + extend2(elesfn$2, { + neighborhood: cache(function(selector2) { + var elements2 = []; + var nodes2 = this.nodes(); + for (var i3 = 0; i3 < nodes2.length; i3++) { + var node2 = nodes2[i3]; + var connectedEdges = node2.connectedEdges(); + for (var j = 0; j < connectedEdges.length; j++) { + var edge = connectedEdges[j]; + var src = edge.source(); + var tgt = edge.target(); + var otherNode = node2 === src ? tgt : src; + if (otherNode.length > 0) { + elements2.push(otherNode[0]); + } + elements2.push(edge[0]); + } + } + return this.spawn(elements2, true).filter(selector2); + }, "neighborhood"), + closedNeighborhood: function closedNeighborhood(selector2) { + return this.neighborhood().add(this).filter(selector2); + }, + openNeighborhood: function openNeighborhood(selector2) { + return this.neighborhood(selector2); + } + }); + elesfn$2.neighbourhood = elesfn$2.neighborhood; + elesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood; + elesfn$2.openNeighbourhood = elesfn$2.openNeighborhood; + extend2(elesfn$2, { + source: cache(function sourceImpl(selector2) { + var ele = this[0]; + var src; + if (ele) { + src = ele._private.source || ele.cy().collection(); + } + return src && selector2 ? src.filter(selector2) : src; + }, "source"), + target: cache(function targetImpl(selector2) { + var ele = this[0]; + var tgt; + if (ele) { + tgt = ele._private.target || ele.cy().collection(); + } + return tgt && selector2 ? tgt.filter(selector2) : tgt; + }, "target"), + sources: defineSourceFunction({ + attr: "source" + }), + targets: defineSourceFunction({ + attr: "target" + }) + }); + function defineSourceFunction(params) { + return function sourceImpl(selector2) { + var sources = []; + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var src = ele._private[params.attr]; + if (src) { + sources.push(src); + } + } + return this.spawn(sources, true).filter(selector2); + }; + } + extend2(elesfn$2, { + edgesWith: cache(defineEdgesWithFunction(), "edgesWith"), + edgesTo: cache(defineEdgesWithFunction({ + thisIsSrc: true + }), "edgesTo") + }); + function defineEdgesWithFunction(params) { + return function edgesWithImpl(otherNodes) { + var elements2 = []; + var cy = this._private.cy; + var p2 = params || {}; + if (string2(otherNodes)) { + otherNodes = cy.$(otherNodes); + } + for (var h = 0; h < otherNodes.length; h++) { + var edges2 = otherNodes[h]._private.edges; + for (var i3 = 0; i3 < edges2.length; i3++) { + var edge = edges2[i3]; + var edgeData = edge._private.data; + var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); + var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); + var edgeConnectsThisAndOther = thisToOther || otherToThis; + if (!edgeConnectsThisAndOther) { + continue; + } + if (p2.thisIsSrc || p2.thisIsTgt) { + if (p2.thisIsSrc && !thisToOther) { + continue; + } + if (p2.thisIsTgt && !otherToThis) { + continue; + } + } + elements2.push(edge); + } + } + return this.spawn(elements2, true); + }; + } + extend2(elesfn$2, { + connectedEdges: cache(function(selector2) { + var retEles = []; + var eles = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var node2 = eles[i3]; + if (!node2.isNode()) { + continue; + } + var edges2 = node2._private.edges; + for (var j = 0; j < edges2.length; j++) { + var edge = edges2[j]; + retEles.push(edge); + } + } + return this.spawn(retEles, true).filter(selector2); + }, "connectedEdges"), + connectedNodes: cache(function(selector2) { + var retEles = []; + var eles = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var edge = eles[i3]; + if (!edge.isEdge()) { + continue; + } + retEles.push(edge.source()[0]); + retEles.push(edge.target()[0]); + } + return this.spawn(retEles, true).filter(selector2); + }, "connectedNodes"), + parallelEdges: cache(defineParallelEdgesFunction(), "parallelEdges"), + codirectedEdges: cache(defineParallelEdgesFunction({ + codirected: true + }), "codirectedEdges") + }); + function defineParallelEdgesFunction(params) { + var defaults3 = { + codirected: false + }; + params = extend2({}, defaults3, params); + return function parallelEdgesImpl(selector2) { + var elements2 = []; + var edges2 = this.edges(); + var p2 = params; + for (var i3 = 0; i3 < edges2.length; i3++) { + var edge1 = edges2[i3]; + var edge1_p = edge1._private; + var src1 = edge1_p.source; + var srcid1 = src1._private.data.id; + var tgtid1 = edge1_p.data.target; + var srcEdges1 = src1._private.edges; + for (var j = 0; j < srcEdges1.length; j++) { + var edge2 = srcEdges1[j]; + var edge2data = edge2._private.data; + var tgtid2 = edge2data.target; + var srcid2 = edge2data.source; + var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; + var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; + if (p2.codirected && codirected || !p2.codirected && (codirected || oppdirected)) { + elements2.push(edge2); + } + } + } + return this.spawn(elements2, true).filter(selector2); + }; + } + extend2(elesfn$2, { + components: function components(root3) { + var self2 = this; + var cy = self2.cy(); + var visited = cy.collection(); + var unvisited = root3 == null ? self2.nodes() : root3.nodes(); + var components2 = []; + if (root3 != null && unvisited.empty()) { + unvisited = root3.sources(); + } + var visitInComponent = function visitInComponent2(node2, component) { + visited.merge(node2); + unvisited.unmerge(node2); + component.merge(node2); + }; + if (unvisited.empty()) { + return self2.spawn(); + } + var _loop = function _loop2() { + var cmpt = cy.collection(); + components2.push(cmpt); + var root4 = unvisited[0]; + visitInComponent(root4, cmpt); + self2.bfs({ + directed: false, + roots: root4, + visit: function visit(v) { + return visitInComponent(v, cmpt); + } + }); + cmpt.forEach(function(node2) { + node2.connectedEdges().forEach(function(e) { + if (self2.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { + cmpt.merge(e); + } + }); + }); + }; + do { + _loop(); + } while (unvisited.length > 0); + return components2; + }, + component: function component() { + var ele = this[0]; + return ele.cy().mutableElements().components(ele)[0]; + } + }); + elesfn$2.componentsOf = elesfn$2.components; + var Collection = function Collection2(cy, elements2) { + var unique = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; + var removed = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false; + if (cy === void 0) { + error("A collection must have a reference to the core"); + return; + } + var map2 = new Map$22(); + var createdElements = false; + if (!elements2) { + elements2 = []; + } else if (elements2.length > 0 && plainObject(elements2[0]) && !element2(elements2[0])) { + createdElements = true; + var eles = []; + var elesIds = new Set$12(); + for (var i3 = 0, l = elements2.length; i3 < l; i3++) { + var json2 = elements2[i3]; + if (json2.data == null) { + json2.data = {}; + } + var _data = json2.data; + if (_data.id == null) { + _data.id = uuid(); + } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { + continue; + } + var ele = new Element(cy, json2, false); + eles.push(ele); + elesIds.add(_data.id); + } + elements2 = eles; + } + this.length = 0; + for (var _i = 0, _l = elements2.length; _i < _l; _i++) { + var element$1 = elements2[_i][0]; + if (element$1 == null) { + continue; + } + var id2 = element$1._private.data.id; + if (!unique || !map2.has(id2)) { + if (unique) { + map2.set(id2, { + index: this.length, + ele: element$1 + }); + } + this[this.length] = element$1; + this.length++; + } + } + this._private = { + eles: this, + cy, + get map() { + if (this.lazyMap == null) { + this.rebuildMap(); + } + return this.lazyMap; + }, + set map(m) { + this.lazyMap = m; + }, + rebuildMap: function rebuildMap() { + var m = this.lazyMap = new Map$22(); + var eles2 = this.eles; + for (var _i2 = 0; _i2 < eles2.length; _i2++) { + var _ele = eles2[_i2]; + m.set(_ele.id(), { + index: _i2, + ele: _ele + }); + } + } + }; + if (unique) { + this._private.map = map2; + } + if (createdElements && !removed) { + this.restore(); + } + }; + var elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype); + elesfn$1.instanceString = function() { + return "collection"; + }; + elesfn$1.spawn = function(eles, unique) { + return new Collection(this.cy(), eles, unique); + }; + elesfn$1.spawnSelf = function() { + return this.spawn(this); + }; + elesfn$1.cy = function() { + return this._private.cy; + }; + elesfn$1.renderer = function() { + return this._private.cy.renderer(); + }; + elesfn$1.element = function() { + return this[0]; + }; + elesfn$1.collection = function() { + if (collection(this)) { + return this; + } else { + return new Collection(this._private.cy, [this]); + } + }; + elesfn$1.unique = function() { + return new Collection(this._private.cy, this, true); + }; + elesfn$1.hasElementWithId = function(id2) { + id2 = "" + id2; + return this._private.map.has(id2); + }; + elesfn$1.getElementById = function(id2) { + id2 = "" + id2; + var cy = this._private.cy; + var entry = this._private.map.get(id2); + return entry ? entry.ele : new Collection(cy); + }; + elesfn$1.$id = elesfn$1.getElementById; + elesfn$1.poolIndex = function() { + var cy = this._private.cy; + var eles = cy._private.elements; + var id2 = this[0]._private.data.id; + return eles._private.map.get(id2).index; + }; + elesfn$1.indexOf = function(ele) { + var id2 = ele[0]._private.data.id; + return this._private.map.get(id2).index; + }; + elesfn$1.indexOfId = function(id2) { + id2 = "" + id2; + return this._private.map.get(id2).index; + }; + elesfn$1.json = function(obj) { + var ele = this.element(); + var cy = this.cy(); + if (ele == null && obj) { + return this; + } + if (ele == null) { + return void 0; + } + var p2 = ele._private; + if (plainObject(obj)) { + cy.startBatch(); + if (obj.data) { + ele.data(obj.data); + var _data2 = p2.data; + if (ele.isEdge()) { + var move = false; + var spec = {}; + var src = obj.data.source; + var tgt = obj.data.target; + if (src != null && src != _data2.source) { + spec.source = "" + src; + move = true; + } + if (tgt != null && tgt != _data2.target) { + spec.target = "" + tgt; + move = true; + } + if (move) { + ele = ele.move(spec); + } + } else { + var newParentValSpecd = "parent" in obj.data; + var parent = obj.data.parent; + if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) { + if (parent === void 0) { + parent = null; + } + if (parent != null) { + parent = "" + parent; + } + ele = ele.move({ + parent + }); + } + } + } + if (obj.position) { + ele.position(obj.position); + } + var checkSwitch = function checkSwitch2(k, trueFnName, falseFnName) { + var obj_k = obj[k]; + if (obj_k != null && obj_k !== p2[k]) { + if (obj_k) { + ele[trueFnName](); + } else { + ele[falseFnName](); + } + } + }; + checkSwitch("removed", "remove", "restore"); + checkSwitch("selected", "select", "unselect"); + checkSwitch("selectable", "selectify", "unselectify"); + checkSwitch("locked", "lock", "unlock"); + checkSwitch("grabbable", "grabify", "ungrabify"); + checkSwitch("pannable", "panify", "unpanify"); + if (obj.classes != null) { + ele.classes(obj.classes); + } + cy.endBatch(); + return this; + } else if (obj === void 0) { + var json2 = { + data: copy2(p2.data), + position: copy2(p2.position), + group: p2.group, + removed: p2.removed, + selected: p2.selected, + selectable: p2.selectable, + locked: p2.locked, + grabbable: p2.grabbable, + pannable: p2.pannable, + classes: null + }; + json2.classes = ""; + var i3 = 0; + p2.classes.forEach(function(cls) { + return json2.classes += i3++ === 0 ? cls : " " + cls; + }); + return json2; + } + }; + elesfn$1.jsons = function() { + var jsons = []; + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var json2 = ele.json(); + jsons.push(json2); + } + return jsons; + }; + elesfn$1.clone = function() { + var cy = this.cy(); + var elesArr = []; + for (var i3 = 0; i3 < this.length; i3++) { + var ele = this[i3]; + var json2 = ele.json(); + var clone3 = new Element(cy, json2, false); + elesArr.push(clone3); + } + return new Collection(cy, elesArr); + }; + elesfn$1.copy = elesfn$1.clone; + elesfn$1.restore = function() { + var notifyRenderer = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; + var addToPool = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var self2 = this; + var cy = self2.cy(); + var cy_p = cy._private; + var nodes2 = []; + var edges2 = []; + var elements2; + for (var _i3 = 0, l = self2.length; _i3 < l; _i3++) { + var ele = self2[_i3]; + if (addToPool && !ele.removed()) { + continue; + } + if (ele.isNode()) { + nodes2.push(ele); + } else { + edges2.push(ele); + } + } + elements2 = nodes2.concat(edges2); + var i3; + var removeFromElements = function removeFromElements2() { + elements2.splice(i3, 1); + i3--; + }; + for (i3 = 0; i3 < elements2.length; i3++) { + var _ele2 = elements2[i3]; + var _private = _ele2._private; + var _data3 = _private.data; + _ele2.clearTraversalCache(); + if (!addToPool && !_private.removed) + ; + else if (_data3.id === void 0) { + _data3.id = uuid(); + } else if (number$12(_data3.id)) { + _data3.id = "" + _data3.id; + } else if (emptyString(_data3.id) || !string2(_data3.id)) { + error("Can not create element with invalid string ID `" + _data3.id + "`"); + removeFromElements(); + continue; + } else if (cy.hasElementWithId(_data3.id)) { + error("Can not create second element with ID `" + _data3.id + "`"); + removeFromElements(); + continue; + } + var id2 = _data3.id; + if (_ele2.isNode()) { + var pos = _private.position; + if (pos.x == null) { + pos.x = 0; + } + if (pos.y == null) { + pos.y = 0; + } + } + if (_ele2.isEdge()) { + var edge = _ele2; + var fields = ["source", "target"]; + var fieldsLength = fields.length; + var badSourceOrTarget = false; + for (var j = 0; j < fieldsLength; j++) { + var field = fields[j]; + var val = _data3[field]; + if (number$12(val)) { + val = _data3[field] = "" + _data3[field]; + } + if (val == null || val === "") { + error("Can not create edge `" + id2 + "` with unspecified " + field); + badSourceOrTarget = true; + } else if (!cy.hasElementWithId(val)) { + error("Can not create edge `" + id2 + "` with nonexistant " + field + " `" + val + "`"); + badSourceOrTarget = true; + } + } + if (badSourceOrTarget) { + removeFromElements(); + continue; + } + var src = cy.getElementById(_data3.source); + var tgt = cy.getElementById(_data3.target); + if (src.same(tgt)) { + src._private.edges.push(edge); + } else { + src._private.edges.push(edge); + tgt._private.edges.push(edge); + } + edge._private.source = src; + edge._private.target = tgt; + } + _private.map = new Map$22(); + _private.map.set(id2, { + ele: _ele2, + index: 0 + }); + _private.removed = false; + if (addToPool) { + cy.addToPool(_ele2); + } + } + for (var _i4 = 0; _i4 < nodes2.length; _i4++) { + var node2 = nodes2[_i4]; + var _data4 = node2._private.data; + if (number$12(_data4.parent)) { + _data4.parent = "" + _data4.parent; + } + var parentId = _data4.parent; + var specifiedParent = parentId != null; + if (specifiedParent || node2._private.parent) { + var parent = node2._private.parent ? cy.collection().merge(node2._private.parent) : cy.getElementById(parentId); + if (parent.empty()) { + _data4.parent = void 0; + } else if (parent[0].removed()) { + warn("Node added with missing parent, reference to parent removed"); + _data4.parent = void 0; + node2._private.parent = null; + } else { + var selfAsParent = false; + var ancestor = parent; + while (!ancestor.empty()) { + if (node2.same(ancestor)) { + selfAsParent = true; + _data4.parent = void 0; + break; + } + ancestor = ancestor.parent(); + } + if (!selfAsParent) { + parent[0]._private.children.push(node2); + node2._private.parent = parent[0]; + cy_p.hasCompoundNodes = true; + } + } + } + } + if (elements2.length > 0) { + var restored = elements2.length === self2.length ? self2 : new Collection(cy, elements2); + for (var _i5 = 0; _i5 < restored.length; _i5++) { + var _ele3 = restored[_i5]; + if (_ele3.isNode()) { + continue; + } + _ele3.parallelEdges().clearTraversalCache(); + _ele3.source().clearTraversalCache(); + _ele3.target().clearTraversalCache(); + } + var toUpdateStyle; + if (cy_p.hasCompoundNodes) { + toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent()); + } else { + toUpdateStyle = restored; + } + toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer); + if (notifyRenderer) { + restored.emitAndNotify("add"); + } else if (addToPool) { + restored.emit("add"); + } + } + return self2; + }; + elesfn$1.removed = function() { + var ele = this[0]; + return ele && ele._private.removed; + }; + elesfn$1.inside = function() { + var ele = this[0]; + return ele && !ele._private.removed; + }; + elesfn$1.remove = function() { + var notifyRenderer = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; + var removeFromPool = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var self2 = this; + var elesToRemove = []; + var elesToRemoveIds = {}; + var cy = self2._private.cy; + function addConnectedEdges(node2) { + var edges2 = node2._private.edges; + for (var i4 = 0; i4 < edges2.length; i4++) { + add(edges2[i4]); + } + } + function addChildren2(node2) { + var children2 = node2._private.children; + for (var i4 = 0; i4 < children2.length; i4++) { + add(children2[i4]); + } + } + function add(ele2) { + var alreadyAdded = elesToRemoveIds[ele2.id()]; + if (removeFromPool && ele2.removed() || alreadyAdded) { + return; + } else { + elesToRemoveIds[ele2.id()] = true; + } + if (ele2.isNode()) { + elesToRemove.push(ele2); + addConnectedEdges(ele2); + addChildren2(ele2); + } else { + elesToRemove.unshift(ele2); + } + } + for (var i3 = 0, l = self2.length; i3 < l; i3++) { + var ele = self2[i3]; + add(ele); + } + function removeEdgeRef(node2, edge) { + var connectedEdges = node2._private.edges; + removeFromArray(connectedEdges, edge); + node2.clearTraversalCache(); + } + function removeParallelRef(pllEdge2) { + pllEdge2.clearTraversalCache(); + } + var alteredParents = []; + alteredParents.ids = {}; + function removeChildRef(parent2, ele2) { + ele2 = ele2[0]; + parent2 = parent2[0]; + var children2 = parent2._private.children; + var pid = parent2.id(); + removeFromArray(children2, ele2); + ele2._private.parent = null; + if (!alteredParents.ids[pid]) { + alteredParents.ids[pid] = true; + alteredParents.push(parent2); + } + } + self2.dirtyCompoundBoundsCache(); + if (removeFromPool) { + cy.removeFromPool(elesToRemove); + } + for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) { + var _ele4 = elesToRemove[_i6]; + if (_ele4.isEdge()) { + var src = _ele4.source()[0]; + var tgt = _ele4.target()[0]; + removeEdgeRef(src, _ele4); + removeEdgeRef(tgt, _ele4); + var pllEdges = _ele4.parallelEdges(); + for (var j = 0; j < pllEdges.length; j++) { + var pllEdge = pllEdges[j]; + removeParallelRef(pllEdge); + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + } + } else { + var parent = _ele4.parent(); + if (parent.length !== 0) { + removeChildRef(parent, _ele4); + } + } + if (removeFromPool) { + _ele4._private.removed = true; + } + } + var elesStillInside = cy._private.elements; + cy._private.hasCompoundNodes = false; + for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) { + var _ele5 = elesStillInside[_i7]; + if (_ele5.isParent()) { + cy._private.hasCompoundNodes = true; + break; + } + } + var removedElements = new Collection(this.cy(), elesToRemove); + if (removedElements.size() > 0) { + if (notifyRenderer) { + removedElements.emitAndNotify("remove"); + } else if (removeFromPool) { + removedElements.emit("remove"); + } + } + for (var _i8 = 0; _i8 < alteredParents.length; _i8++) { + var _ele6 = alteredParents[_i8]; + if (!removeFromPool || !_ele6.removed()) { + _ele6.updateStyle(); + } + } + return removedElements; + }; + elesfn$1.move = function(struct) { + var cy = this._private.cy; + var eles = this; + var notifyRenderer = false; + var modifyPool = false; + var toString3 = function toString4(id2) { + return id2 == null ? id2 : "" + id2; + }; + if (struct.source !== void 0 || struct.target !== void 0) { + var srcId = toString3(struct.source); + var tgtId = toString3(struct.target); + var srcExists = srcId != null && cy.hasElementWithId(srcId); + var tgtExists = tgtId != null && cy.hasElementWithId(tgtId); + if (srcExists || tgtExists) { + cy.batch(function() { + eles.remove(notifyRenderer, modifyPool); + eles.emitAndNotify("moveout"); + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var _data5 = ele._private.data; + if (ele.isEdge()) { + if (srcExists) { + _data5.source = srcId; + } + if (tgtExists) { + _data5.target = tgtId; + } + } + } + eles.restore(notifyRenderer, modifyPool); + }); + eles.emitAndNotify("move"); + } + } else if (struct.parent !== void 0) { + var parentId = toString3(struct.parent); + var parentExists = parentId === null || cy.hasElementWithId(parentId); + if (parentExists) { + var pidToAssign = parentId === null ? void 0 : parentId; + cy.batch(function() { + var updated = eles.remove(notifyRenderer, modifyPool); + updated.emitAndNotify("moveout"); + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var _data6 = ele._private.data; + if (ele.isNode()) { + _data6.parent = pidToAssign; + } + } + updated.restore(notifyRenderer, modifyPool); + }); + eles.emitAndNotify("move"); + } + } + return this; + }; + [elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function(props) { + extend2(elesfn$1, props); + }); + var corefn$9 = { + add: function add(opts) { + var elements2; + var cy = this; + if (elementOrCollection(opts)) { + var eles = opts; + if (eles._private.cy === cy) { + elements2 = eles.restore(); + } else { + var jsons = []; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + jsons.push(ele.json()); + } + elements2 = new Collection(cy, jsons); + } + } else if (array2(opts)) { + var _jsons = opts; + elements2 = new Collection(cy, _jsons); + } else if (plainObject(opts) && (array2(opts.nodes) || array2(opts.edges))) { + var elesByGroup = opts; + var _jsons2 = []; + var grs = ["nodes", "edges"]; + for (var _i = 0, il = grs.length; _i < il; _i++) { + var group = grs[_i]; + var elesArray = elesByGroup[group]; + if (array2(elesArray)) { + for (var j = 0, jl = elesArray.length; j < jl; j++) { + var json2 = extend2({ + group + }, elesArray[j]); + _jsons2.push(json2); + } + } + } + elements2 = new Collection(cy, _jsons2); + } else { + var _json = opts; + elements2 = new Element(cy, _json).collection(); + } + return elements2; + }, + remove: function remove2(collection2) { + if (elementOrCollection(collection2)) + ; + else if (string2(collection2)) { + var selector2 = collection2; + collection2 = this.$(selector2); + } + return collection2.remove(); + } + }; + /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + function generateCubicBezier(mX1, mY1, mX2, mY2) { + var NEWTON_ITERATIONS = 4, NEWTON_MIN_SLOPE = 1e-3, SUBDIVISION_PRECISION = 1e-7, SUBDIVISION_MAX_ITERATIONS = 10, kSplineTableSize = 11, kSampleStepSize = 1 / (kSplineTableSize - 1), float32ArraySupported = typeof Float32Array !== "undefined"; + if (arguments.length !== 4) { + return false; + } + for (var i3 = 0; i3 < 4; ++i3) { + if (typeof arguments[i3] !== "number" || isNaN(arguments[i3]) || !isFinite(arguments[i3])) { + return false; + } + } + mX1 = Math.min(mX1, 1); + mX2 = Math.min(mX2, 1); + mX1 = Math.max(mX1, 0); + mX2 = Math.max(mX2, 0); + var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); + function A(aA1, aA2) { + return 1 - 3 * aA2 + 3 * aA1; + } + function B(aA1, aA2) { + return 3 * aA2 - 6 * aA1; + } + function C(aA1) { + return 3 * aA1; + } + function calcBezier(aT, aA1, aA2) { + return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; + } + function getSlope(aT, aA1, aA2) { + return 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT + C(aA1); + } + function newtonRaphsonIterate(aX, aGuessT) { + for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0) { + return aGuessT; + } + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; + } + function calcSampleValues() { + for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { + mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); + } + } + function binarySubdivide(aX, aA, aB) { + var currentX, currentT, i4 = 0; + do { + currentT = aA + (aB - aA) / 2; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i4 < SUBDIVISION_MAX_ITERATIONS); + return currentT; + } + function getTForX(aX) { + var intervalStart = 0, currentSample = 1, lastSample = kSplineTableSize - 1; + for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + var dist3 = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), guessForT = intervalStart + dist3 * kSampleStepSize, initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= NEWTON_MIN_SLOPE) { + return newtonRaphsonIterate(aX, guessForT); + } else if (initialSlope === 0) { + return guessForT; + } else { + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); + } + } + var _precomputed = false; + function precompute() { + _precomputed = true; + if (mX1 !== mY1 || mX2 !== mY2) { + calcSampleValues(); + } + } + var f2 = function f3(aX) { + if (!_precomputed) { + precompute(); + } + if (mX1 === mY1 && mX2 === mY2) { + return aX; + } + if (aX === 0) { + return 0; + } + if (aX === 1) { + return 1; + } + return calcBezier(getTForX(aX), mY1, mY2); + }; + f2.getControlPoints = function() { + return [{ + x: mX1, + y: mY1 + }, { + x: mX2, + y: mY2 + }]; + }; + var str2 = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; + f2.toString = function() { + return str2; + }; + return f2; + } + /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + var generateSpringRK4 = function() { + function springAccelerationForState(state2) { + return -state2.tension * state2.x - state2.friction * state2.v; + } + function springEvaluateStateWithDerivative(initialState, dt, derivative) { + var state2 = { + x: initialState.x + derivative.dx * dt, + v: initialState.v + derivative.dv * dt, + tension: initialState.tension, + friction: initialState.friction + }; + return { + dx: state2.v, + dv: springAccelerationForState(state2) + }; + } + function springIntegrateState(state2, dt) { + var a = { + dx: state2.v, + dv: springAccelerationForState(state2) + }, b = springEvaluateStateWithDerivative(state2, dt * 0.5, a), c2 = springEvaluateStateWithDerivative(state2, dt * 0.5, b), d = springEvaluateStateWithDerivative(state2, dt, c2), dxdt = 1 / 6 * (a.dx + 2 * (b.dx + c2.dx) + d.dx), dvdt = 1 / 6 * (a.dv + 2 * (b.dv + c2.dv) + d.dv); + state2.x = state2.x + dxdt * dt; + state2.v = state2.v + dvdt * dt; + return state2; + } + return function springRK4Factory(tension, friction, duration) { + var initState = { + x: -1, + v: 0, + tension: null, + friction: null + }, path2 = [0], time_lapsed = 0, tolerance = 1 / 1e4, DT = 16 / 1e3, have_duration, dt, last_state; + tension = parseFloat(tension) || 500; + friction = parseFloat(friction) || 20; + duration = duration || null; + initState.tension = tension; + initState.friction = friction; + have_duration = duration !== null; + if (have_duration) { + time_lapsed = springRK4Factory(tension, friction); + dt = time_lapsed / duration * DT; + } else { + dt = DT; + } + for (; ; ) { + last_state = springIntegrateState(last_state || initState, dt); + path2.push(1 + last_state.x); + time_lapsed += 16; + if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { + break; + } + } + return !have_duration ? time_lapsed : function(percentComplete) { + return path2[percentComplete * (path2.length - 1) | 0]; + }; + }; + }(); + var cubicBezier = function cubicBezier2(t12, p1, t22, p2) { + var bezier = generateCubicBezier(t12, p1, t22, p2); + return function(start2, end2, percent) { + return start2 + (end2 - start2) * bezier(percent); + }; + }; + var easings = { + "linear": function linear2(start2, end2, percent) { + return start2 + (end2 - start2) * percent; + }, + // default easings + "ease": cubicBezier(0.25, 0.1, 0.25, 1), + "ease-in": cubicBezier(0.42, 0, 1, 1), + "ease-out": cubicBezier(0, 0, 0.58, 1), + "ease-in-out": cubicBezier(0.42, 0, 0.58, 1), + // sine + "ease-in-sine": cubicBezier(0.47, 0, 0.745, 0.715), + "ease-out-sine": cubicBezier(0.39, 0.575, 0.565, 1), + "ease-in-out-sine": cubicBezier(0.445, 0.05, 0.55, 0.95), + // quad + "ease-in-quad": cubicBezier(0.55, 0.085, 0.68, 0.53), + "ease-out-quad": cubicBezier(0.25, 0.46, 0.45, 0.94), + "ease-in-out-quad": cubicBezier(0.455, 0.03, 0.515, 0.955), + // cubic + "ease-in-cubic": cubicBezier(0.55, 0.055, 0.675, 0.19), + "ease-out-cubic": cubicBezier(0.215, 0.61, 0.355, 1), + "ease-in-out-cubic": cubicBezier(0.645, 0.045, 0.355, 1), + // quart + "ease-in-quart": cubicBezier(0.895, 0.03, 0.685, 0.22), + "ease-out-quart": cubicBezier(0.165, 0.84, 0.44, 1), + "ease-in-out-quart": cubicBezier(0.77, 0, 0.175, 1), + // quint + "ease-in-quint": cubicBezier(0.755, 0.05, 0.855, 0.06), + "ease-out-quint": cubicBezier(0.23, 1, 0.32, 1), + "ease-in-out-quint": cubicBezier(0.86, 0, 0.07, 1), + // expo + "ease-in-expo": cubicBezier(0.95, 0.05, 0.795, 0.035), + "ease-out-expo": cubicBezier(0.19, 1, 0.22, 1), + "ease-in-out-expo": cubicBezier(1, 0, 0, 1), + // circ + "ease-in-circ": cubicBezier(0.6, 0.04, 0.98, 0.335), + "ease-out-circ": cubicBezier(0.075, 0.82, 0.165, 1), + "ease-in-out-circ": cubicBezier(0.785, 0.135, 0.15, 0.86), + // user param easings... + "spring": function spring(tension, friction, duration) { + if (duration === 0) { + return easings.linear; + } + var spring2 = generateSpringRK4(tension, friction, duration); + return function(start2, end2, percent) { + return start2 + (end2 - start2) * spring2(percent); + }; + }, + "cubic-bezier": cubicBezier + }; + function getEasedValue(type2, start2, end2, percent, easingFn) { + if (percent === 1) { + return end2; + } + if (start2 === end2) { + return end2; + } + var val = easingFn(start2, end2, percent); + if (type2 == null) { + return val; + } + if (type2.roundValue || type2.color) { + val = Math.round(val); + } + if (type2.min !== void 0) { + val = Math.max(val, type2.min); + } + if (type2.max !== void 0) { + val = Math.min(val, type2.max); + } + return val; + } + function getValue2(prop, spec) { + if (prop.pfValue != null || prop.value != null) { + if (prop.pfValue != null && (spec == null || spec.type.units !== "%")) { + return prop.pfValue; + } else { + return prop.value; + } + } else { + return prop; + } + } + function ease(startProp, endProp, percent, easingFn, propSpec) { + var type2 = propSpec != null ? propSpec.type : null; + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + var start2 = getValue2(startProp, propSpec); + var end2 = getValue2(endProp, propSpec); + if (number$12(start2) && number$12(end2)) { + return getEasedValue(type2, start2, end2, percent, easingFn); + } else if (array2(start2) && array2(end2)) { + var easedArr = []; + for (var i3 = 0; i3 < end2.length; i3++) { + var si = start2[i3]; + var ei = end2[i3]; + if (si != null && ei != null) { + var val = getEasedValue(type2, si, ei, percent, easingFn); + easedArr.push(val); + } else { + easedArr.push(ei); + } + } + return easedArr; + } + return void 0; + } + function step$1(self2, ani, now3, isCore) { + var isEles = !isCore; + var _p = self2._private; + var ani_p = ani._private; + var pEasing = ani_p.easing; + var startTime = ani_p.startTime; + var cy = isCore ? self2 : self2.cy(); + var style = cy.style(); + if (!ani_p.easingImpl) { + if (pEasing == null) { + ani_p.easingImpl = easings["linear"]; + } else { + var easingVals; + if (string2(pEasing)) { + var easingProp = style.parse("transition-timing-function", pEasing); + easingVals = easingProp.value; + } else { + easingVals = pEasing; + } + var name2, args; + if (string2(easingVals)) { + name2 = easingVals; + args = []; + } else { + name2 = easingVals[1]; + args = easingVals.slice(2).map(function(n) { + return +n; + }); + } + if (args.length > 0) { + if (name2 === "spring") { + args.push(ani_p.duration); + } + ani_p.easingImpl = easings[name2].apply(null, args); + } else { + ani_p.easingImpl = easings[name2]; + } + } + } + var easing = ani_p.easingImpl; + var percent; + if (ani_p.duration === 0) { + percent = 1; + } else { + percent = (now3 - startTime) / ani_p.duration; + } + if (ani_p.applying) { + percent = ani_p.progress; + } + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (ani_p.delay == null) { + var startPos = ani_p.startPosition; + var endPos = ani_p.position; + if (endPos && isEles && !self2.locked()) { + var newPos = {}; + if (valid(startPos.x, endPos.x)) { + newPos.x = ease(startPos.x, endPos.x, percent, easing); + } + if (valid(startPos.y, endPos.y)) { + newPos.y = ease(startPos.y, endPos.y, percent, easing); + } + self2.position(newPos); + } + var startPan = ani_p.startPan; + var endPan = ani_p.pan; + var pan = _p.pan; + var animatingPan = endPan != null && isCore; + if (animatingPan) { + if (valid(startPan.x, endPan.x)) { + pan.x = ease(startPan.x, endPan.x, percent, easing); + } + if (valid(startPan.y, endPan.y)) { + pan.y = ease(startPan.y, endPan.y, percent, easing); + } + self2.emit("pan"); + } + var startZoom = ani_p.startZoom; + var endZoom = ani_p.zoom; + var animatingZoom = endZoom != null && isCore; + if (animatingZoom) { + if (valid(startZoom, endZoom)) { + _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); + } + self2.emit("zoom"); + } + if (animatingPan || animatingZoom) { + self2.emit("viewport"); + } + var props = ani_p.style; + if (props && props.length > 0 && isEles) { + for (var i3 = 0; i3 < props.length; i3++) { + var prop = props[i3]; + var _name = prop.name; + var end2 = prop; + var start2 = ani_p.startStyle[_name]; + var propSpec = style.properties[start2.name]; + var easedVal = ease(start2, end2, percent, easing, propSpec); + style.overrideBypass(self2, _name, easedVal); + } + self2.emit("style"); + } + } + ani_p.progress = percent; + return percent; + } + function valid(start2, end2) { + if (start2 == null || end2 == null) { + return false; + } + if (number$12(start2) && number$12(end2)) { + return true; + } else if (start2 && end2) { + return true; + } + return false; + } + function startAnimation(self2, ani, now3, isCore) { + var ani_p = ani._private; + ani_p.started = true; + ani_p.startTime = now3 - ani_p.progress * ani_p.duration; + } + function stepAll(now3, cy) { + var eles = cy._private.aniEles; + var doneEles = []; + function stepOne(ele2, isCore) { + var _p = ele2._private; + var current = _p.animation.current; + var queue = _p.animation.queue; + var ranAnis = false; + if (current.length === 0) { + var next2 = queue.shift(); + if (next2) { + current.push(next2); + } + } + var callbacks = function callbacks2(_callbacks) { + for (var j = _callbacks.length - 1; j >= 0; j--) { + var cb = _callbacks[j]; + cb(); + } + _callbacks.splice(0, _callbacks.length); + }; + for (var i3 = current.length - 1; i3 >= 0; i3--) { + var ani = current[i3]; + var ani_p = ani._private; + if (ani_p.stopped) { + current.splice(i3, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.frames); + continue; + } + if (!ani_p.playing && !ani_p.applying) { + continue; + } + if (ani_p.playing && ani_p.applying) { + ani_p.applying = false; + } + if (!ani_p.started) { + startAnimation(ele2, ani, now3); + } + step$1(ele2, ani, now3, isCore); + if (ani_p.applying) { + ani_p.applying = false; + } + callbacks(ani_p.frames); + if (ani_p.step != null) { + ani_p.step(now3); + } + if (ani.completed()) { + current.splice(i3, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.completes); + } + ranAnis = true; + } + if (!isCore && current.length === 0 && queue.length === 0) { + doneEles.push(ele2); + } + return ranAnis; + } + var ranEleAni = false; + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + var handledThisEle = stepOne(ele); + ranEleAni = ranEleAni || handledThisEle; + } + var ranCoreAni = stepOne(cy, true); + if (ranEleAni || ranCoreAni) { + if (eles.length > 0) { + cy.notify("draw", eles); + } else { + cy.notify("draw"); + } + } + eles.unmerge(doneEles); + cy.emit("step"); + } + var corefn$8 = { + // pull in animation functions + animate: define3.animate(), + animation: define3.animation(), + animated: define3.animated(), + clearQueue: define3.clearQueue(), + delay: define3.delay(), + delayAnimation: define3.delayAnimation(), + stop: define3.stop(), + addToAnimationPool: function addToAnimationPool(eles) { + var cy = this; + if (!cy.styleEnabled()) { + return; + } + cy._private.aniEles.merge(eles); + }, + stopAnimationLoop: function stopAnimationLoop() { + this._private.animationsRunning = false; + }, + startAnimationLoop: function startAnimationLoop() { + var cy = this; + cy._private.animationsRunning = true; + if (!cy.styleEnabled()) { + return; + } + function headlessStep() { + if (!cy._private.animationsRunning) { + return; + } + requestAnimationFrame2(function animationStep(now3) { + stepAll(now3, cy); + headlessStep(); + }); + } + var renderer3 = cy.renderer(); + if (renderer3 && renderer3.beforeRender) { + renderer3.beforeRender(function rendererAnimationStep(willDraw, now3) { + stepAll(now3, cy); + }, renderer3.beforeRenderPriorities.animations); + } else { + headlessStep(); + } + } + }; + var emitterOptions = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(cy, listener, eventObj) { + var selector2 = listener.qualifier; + if (selector2 != null) { + return cy !== eventObj.target && element2(eventObj.target) && selector2.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(cy, evt) { + evt.cy = cy; + evt.target = cy; + }, + callbackContext: function callbackContext(cy, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : cy; + } + }; + var argSelector = function argSelector2(arg) { + if (string2(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + var elesfn = { + createEmitter: function createEmitter() { + var _p = this._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions, this); + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector2, callback) { + this.emitter().on(events, argSelector(selector2), callback); + return this; + }, + removeListener: function removeListener(events, selector2, callback) { + this.emitter().removeListener(events, argSelector(selector2), callback); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + one: function one2(events, selector2, callback) { + this.emitter().one(events, argSelector(selector2), callback); + return this; + }, + once: function once(events, selector2, callback) { + this.emitter().one(events, argSelector(selector2), callback); + return this; + }, + emit: function emit(events, extraParams) { + this.emitter().emit(events, extraParams); + return this; + }, + emitAndNotify: function emitAndNotify(event2, eles) { + this.emit(event2); + this.notify(event2, eles); + return this; + } + }; + define3.eventAliasesOn(elesfn); + var corefn$7 = { + png: function png(options2) { + var renderer3 = this._private.renderer; + options2 = options2 || {}; + return renderer3.png(options2); + }, + jpg: function jpg(options2) { + var renderer3 = this._private.renderer; + options2 = options2 || {}; + options2.bg = options2.bg || "#fff"; + return renderer3.jpg(options2); + } + }; + corefn$7.jpeg = corefn$7.jpg; + var corefn$6 = { + layout: function layout3(options2) { + var cy = this; + if (options2 == null) { + error("Layout options must be specified to make a layout"); + return; + } + if (options2.name == null) { + error("A `name` must be specified to make a layout"); + return; + } + var name2 = options2.name; + var Layout2 = cy.extension("layout", name2); + if (Layout2 == null) { + error("No such layout `" + name2 + "` found. Did you forget to import it and `cytoscape.use()` it?"); + return; + } + var eles; + if (string2(options2.eles)) { + eles = cy.$(options2.eles); + } else { + eles = options2.eles != null ? options2.eles : cy.$(); + } + var layout4 = new Layout2(extend2({}, options2, { + cy, + eles + })); + return layout4; + } + }; + corefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout; + var corefn$5 = { + notify: function notify(eventName, eventEles) { + var _p = this._private; + if (this.batching()) { + _p.batchNotifications = _p.batchNotifications || {}; + var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection(); + if (eventEles != null) { + eles.merge(eventEles); + } + return; + } + if (!_p.notificationsEnabled) { + return; + } + var renderer3 = this.renderer(); + if (this.destroyed() || !renderer3) { + return; + } + renderer3.notify(eventName, eventEles); + }, + notifications: function notifications(bool2) { + var p2 = this._private; + if (bool2 === void 0) { + return p2.notificationsEnabled; + } else { + p2.notificationsEnabled = bool2 ? true : false; + } + return this; + }, + noNotifications: function noNotifications(callback) { + this.notifications(false); + callback(); + this.notifications(true); + }, + batching: function batching() { + return this._private.batchCount > 0; + }, + startBatch: function startBatch() { + var _p = this._private; + if (_p.batchCount == null) { + _p.batchCount = 0; + } + if (_p.batchCount === 0) { + _p.batchStyleEles = this.collection(); + _p.batchNotifications = {}; + } + _p.batchCount++; + return this; + }, + endBatch: function endBatch() { + var _p = this._private; + if (_p.batchCount === 0) { + return this; + } + _p.batchCount--; + if (_p.batchCount === 0) { + _p.batchStyleEles.updateStyle(); + var renderer3 = this.renderer(); + Object.keys(_p.batchNotifications).forEach(function(eventName) { + var eles = _p.batchNotifications[eventName]; + if (eles.empty()) { + renderer3.notify(eventName); + } else { + renderer3.notify(eventName, eles); + } + }); + } + return this; + }, + batch: function batch(callback) { + this.startBatch(); + callback(); + this.endBatch(); + return this; + }, + // for backwards compatibility + batchData: function batchData(map2) { + var cy = this; + return this.batch(function() { + var ids = Object.keys(map2); + for (var i3 = 0; i3 < ids.length; i3++) { + var id2 = ids[i3]; + var data2 = map2[id2]; + var ele = cy.getElementById(id2); + ele.data(data2); + } + }); + } + }; + var rendererDefaults = defaults$g({ + hideEdgesOnViewport: false, + textureOnViewport: false, + motionBlur: false, + motionBlurOpacity: 0.05, + pixelRatio: void 0, + desktopTapThreshold: 4, + touchTapThreshold: 8, + wheelSensitivity: 1, + debug: false, + showFps: false + }); + var corefn$4 = { + renderTo: function renderTo(context, zoom, pan, pxRatio) { + var r = this._private.renderer; + r.renderTo(context, zoom, pan, pxRatio); + return this; + }, + renderer: function renderer3() { + return this._private.renderer; + }, + forceRender: function forceRender() { + this.notify("draw"); + return this; + }, + resize: function resize() { + this.invalidateSize(); + this.emitAndNotify("resize"); + return this; + }, + initRenderer: function initRenderer(options2) { + var cy = this; + var RendererProto = cy.extension("renderer", options2.name); + if (RendererProto == null) { + error("Can not initialise: No such renderer `".concat(options2.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); + return; + } + if (options2.wheelSensitivity !== void 0) { + warn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); + } + var rOpts = rendererDefaults(options2); + rOpts.cy = cy; + cy._private.renderer = new RendererProto(rOpts); + this.notify("init"); + }, + destroyRenderer: function destroyRenderer() { + var cy = this; + cy.notify("destroy"); + var domEle = cy.container(); + if (domEle) { + domEle._cyreg = null; + while (domEle.childNodes.length > 0) { + domEle.removeChild(domEle.childNodes[0]); + } + } + cy._private.renderer = null; + cy.mutableElements().forEach(function(ele) { + var _p = ele._private; + _p.rscratch = {}; + _p.rstyle = {}; + _p.animation.current = []; + _p.animation.queue = []; + }); + }, + onRender: function onRender(fn2) { + return this.on("render", fn2); + }, + offRender: function offRender(fn2) { + return this.off("render", fn2); + } + }; + corefn$4.invalidateDimensions = corefn$4.resize; + var corefn$3 = { + // get a collection + // - empty collection on no args + // - collection of elements in the graph on selector arg + // - guarantee a returned collection when elements or collection specified + collection: function collection2(eles, opts) { + if (string2(eles)) { + return this.$(eles); + } else if (elementOrCollection(eles)) { + return eles.collection(); + } else if (array2(eles)) { + if (!opts) { + opts = {}; + } + return new Collection(this, eles, opts.unique, opts.removed); + } + return new Collection(this); + }, + nodes: function nodes2(selector2) { + var nodes3 = this.$(function(ele) { + return ele.isNode(); + }); + if (selector2) { + return nodes3.filter(selector2); + } + return nodes3; + }, + edges: function edges2(selector2) { + var edges3 = this.$(function(ele) { + return ele.isEdge(); + }); + if (selector2) { + return edges3.filter(selector2); + } + return edges3; + }, + // search the graph like jQuery + $: function $(selector2) { + var eles = this._private.elements; + if (selector2) { + return eles.filter(selector2); + } else { + return eles.spawnSelf(); + } + }, + mutableElements: function mutableElements() { + return this._private.elements; + } + }; + corefn$3.elements = corefn$3.filter = corefn$3.$; + var styfn$8 = {}; + var TRUE = "t"; + var FALSE = "f"; + styfn$8.apply = function(eles) { + var self2 = this; + var _p = self2._private; + var cy = _p.cy; + var updatedEles = cy.collection(); + for (var ie = 0; ie < eles.length; ie++) { + var ele = eles[ie]; + var cxtMeta = self2.getContextMeta(ele); + if (cxtMeta.empty) { + continue; + } + var cxtStyle = self2.getContextStyle(cxtMeta); + var app = self2.applyContextStyle(cxtMeta, cxtStyle, ele); + if (ele._private.appliedInitStyle) { + self2.updateTransitions(ele, app.diffProps); + } else { + ele._private.appliedInitStyle = true; + } + var hintsDiff = self2.updateStyleHints(ele); + if (hintsDiff) { + updatedEles.push(ele); + } + } + return updatedEles; + }; + styfn$8.getPropertiesDiff = function(oldCxtKey, newCxtKey) { + var self2 = this; + var cache2 = self2._private.propDiffs = self2._private.propDiffs || {}; + var dualCxtKey = oldCxtKey + "-" + newCxtKey; + var cachedVal = cache2[dualCxtKey]; + if (cachedVal) { + return cachedVal; + } + var diffProps = []; + var addedProp = {}; + for (var i3 = 0; i3 < self2.length; i3++) { + var cxt = self2[i3]; + var oldHasCxt = oldCxtKey[i3] === TRUE; + var newHasCxt = newCxtKey[i3] === TRUE; + var cxtHasDiffed = oldHasCxt !== newHasCxt; + var cxtHasMappedProps = cxt.mappedProperties.length > 0; + if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) { + var props = void 0; + if (cxtHasDiffed && cxtHasMappedProps) { + props = cxt.properties; + } else if (cxtHasDiffed) { + props = cxt.properties; + } else if (cxtHasMappedProps) { + props = cxt.mappedProperties; + } + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + var name2 = prop.name; + var laterCxtOverrides = false; + for (var k = i3 + 1; k < self2.length; k++) { + var laterCxt = self2[k]; + var hasLaterCxt = newCxtKey[k] === TRUE; + if (!hasLaterCxt) { + continue; + } + laterCxtOverrides = laterCxt.properties[prop.name] != null; + if (laterCxtOverrides) { + break; + } + } + if (!addedProp[name2] && !laterCxtOverrides) { + addedProp[name2] = true; + diffProps.push(name2); + } + } + } + } + cache2[dualCxtKey] = diffProps; + return diffProps; + }; + styfn$8.getContextMeta = function(ele) { + var self2 = this; + var cxtKey = ""; + var diffProps; + var prevKey = ele._private.styleCxtKey || ""; + for (var i3 = 0; i3 < self2.length; i3++) { + var context = self2[i3]; + var contextSelectorMatches = context.selector && context.selector.matches(ele); + if (contextSelectorMatches) { + cxtKey += TRUE; + } else { + cxtKey += FALSE; + } + } + diffProps = self2.getPropertiesDiff(prevKey, cxtKey); + ele._private.styleCxtKey = cxtKey; + return { + key: cxtKey, + diffPropNames: diffProps, + empty: diffProps.length === 0 + }; + }; + styfn$8.getContextStyle = function(cxtMeta) { + var cxtKey = cxtMeta.key; + var self2 = this; + var cxtStyles = this._private.contextStyles = this._private.contextStyles || {}; + if (cxtStyles[cxtKey]) { + return cxtStyles[cxtKey]; + } + var style = { + _private: { + key: cxtKey + } + }; + for (var i3 = 0; i3 < self2.length; i3++) { + var cxt = self2[i3]; + var hasCxt = cxtKey[i3] === TRUE; + if (!hasCxt) { + continue; + } + for (var j = 0; j < cxt.properties.length; j++) { + var prop = cxt.properties[j]; + style[prop.name] = prop; + } + } + cxtStyles[cxtKey] = style; + return style; + }; + styfn$8.applyContextStyle = function(cxtMeta, cxtStyle, ele) { + var self2 = this; + var diffProps = cxtMeta.diffPropNames; + var retDiffProps = {}; + var types = self2.types; + for (var i3 = 0; i3 < diffProps.length; i3++) { + var diffPropName = diffProps[i3]; + var cxtProp = cxtStyle[diffPropName]; + var eleProp = ele.pstyle(diffPropName); + if (!cxtProp) { + if (!eleProp) { + continue; + } else if (eleProp.bypass) { + cxtProp = { + name: diffPropName, + deleteBypassed: true + }; + } else { + cxtProp = { + name: diffPropName, + "delete": true + }; + } + } + if (eleProp === cxtProp) { + continue; + } + if (cxtProp.mapped === types.fn && eleProp != null && eleProp.mapping != null && eleProp.mapping.value === cxtProp.value) { + var mapping = eleProp.mapping; + var fnValue = mapping.fnValue = cxtProp.value(ele); + if (fnValue === mapping.prevFnValue) { + continue; + } + } + var retDiffProp = retDiffProps[diffPropName] = { + prev: eleProp + }; + self2.applyParsedProperty(ele, cxtProp); + retDiffProp.next = ele.pstyle(diffPropName); + if (retDiffProp.next && retDiffProp.next.bypass) { + retDiffProp.next = retDiffProp.next.bypassed; + } + } + return { + diffProps: retDiffProps + }; + }; + styfn$8.updateStyleHints = function(ele) { + var _p = ele._private; + var self2 = this; + var propNames = self2.propertyGroupNames; + var propGrKeys = self2.propertyGroupKeys; + var propHash = function propHash2(ele2, propNames2, seedKey) { + return self2.getPropertiesHash(ele2, propNames2, seedKey); + }; + var oldStyleKey = _p.styleKey; + if (ele.removed()) { + return false; + } + var isNode = _p.group === "nodes"; + var overriddenStyles = ele._private.style; + propNames = Object.keys(overriddenStyles); + for (var i3 = 0; i3 < propGrKeys.length; i3++) { + var grKey = propGrKeys[i3]; + _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + } + var updateGrKey1 = function updateGrKey12(val, grKey2) { + return _p.styleKeys[grKey2][0] = hashInt(val, _p.styleKeys[grKey2][0]); + }; + var updateGrKey2 = function updateGrKey22(val, grKey2) { + return _p.styleKeys[grKey2][1] = hashIntAlt(val, _p.styleKeys[grKey2][1]); + }; + var updateGrKey = function updateGrKey3(val, grKey2) { + updateGrKey1(val, grKey2); + updateGrKey2(val, grKey2); + }; + var updateGrKeyWStr = function updateGrKeyWStr2(strVal, grKey2) { + for (var j = 0; j < strVal.length; j++) { + var ch = strVal.charCodeAt(j); + updateGrKey1(ch, grKey2); + updateGrKey2(ch, grKey2); + } + }; + var N = 2e9; + var cleanNum = function cleanNum2(val) { + return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; + }; + for (var _i = 0; _i < propNames.length; _i++) { + var name2 = propNames[_i]; + var parsedProp = overriddenStyles[name2]; + if (parsedProp == null) { + continue; + } + var propInfo = this.properties[name2]; + var type2 = propInfo.type; + var _grKey = propInfo.groupKey; + var normalizedNumberVal = void 0; + if (propInfo.hashOverride != null) { + normalizedNumberVal = propInfo.hashOverride(ele, parsedProp); + } else if (parsedProp.pfValue != null) { + normalizedNumberVal = parsedProp.pfValue; + } + var numberVal = propInfo.enums == null ? parsedProp.value : null; + var haveNormNum = normalizedNumberVal != null; + var haveUnitedNum = numberVal != null; + var haveNum = haveNormNum || haveUnitedNum; + var units = parsedProp.units; + if (type2.number && haveNum && !type2.multiple) { + var v = haveNormNum ? normalizedNumberVal : numberVal; + updateGrKey(cleanNum(v), _grKey); + if (!haveNormNum && units != null) { + updateGrKeyWStr(units, _grKey); + } + } else { + updateGrKeyWStr(parsedProp.strValue, _grKey); + } + } + var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) { + var _grKey2 = propGrKeys[_i2]; + var grHash = _p.styleKeys[_grKey2]; + hash[0] = hashInt(grHash[0], hash[0]); + hash[1] = hashIntAlt(grHash[1], hash[1]); + } + _p.styleKey = combineHashes(hash[0], hash[1]); + var sk = _p.styleKeys; + _p.labelDimsKey = combineHashesArray(sk.labelDimensions); + var labelKeys = propHash(ele, ["label"], sk.labelDimensions); + _p.labelKey = combineHashesArray(labelKeys); + _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys)); + if (!isNode) { + var sourceLabelKeys = propHash(ele, ["source-label"], sk.labelDimensions); + _p.sourceLabelKey = combineHashesArray(sourceLabelKeys); + _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys)); + var targetLabelKeys = propHash(ele, ["target-label"], sk.labelDimensions); + _p.targetLabelKey = combineHashesArray(targetLabelKeys); + _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys)); + } + if (isNode) { + var _p$styleKeys = _p.styleKeys, nodeBody = _p$styleKeys.nodeBody, nodeBorder = _p$styleKeys.nodeBorder, backgroundImage = _p$styleKeys.backgroundImage, compound = _p$styleKeys.compound, pie2 = _p$styleKeys.pie; + var nodeKeys = [nodeBody, nodeBorder, backgroundImage, compound, pie2].filter(function(k) { + return k != null; + }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]); + _p.nodeKey = combineHashesArray(nodeKeys); + _p.hasPie = pie2 != null && pie2[0] !== DEFAULT_HASH_SEED && pie2[1] !== DEFAULT_HASH_SEED_ALT; + } + return oldStyleKey !== _p.styleKey; + }; + styfn$8.clearStyleHints = function(ele) { + var _p = ele._private; + _p.styleCxtKey = ""; + _p.styleKeys = {}; + _p.styleKey = null; + _p.labelKey = null; + _p.labelStyleKey = null; + _p.sourceLabelKey = null; + _p.sourceLabelStyleKey = null; + _p.targetLabelKey = null; + _p.targetLabelStyleKey = null; + _p.nodeKey = null; + _p.hasPie = null; + }; + styfn$8.applyParsedProperty = function(ele, parsedProp) { + var self2 = this; + var prop = parsedProp; + var style = ele._private.style; + var flatProp; + var types = self2.types; + var type2 = self2.properties[prop.name].type; + var propIsBypass = prop.bypass; + var origProp = style[prop.name]; + var origPropIsBypass = origProp && origProp.bypass; + var _p = ele._private; + var flatPropMapping = "mapping"; + var getVal = function getVal2(p2) { + if (p2 == null) { + return null; + } else if (p2.pfValue != null) { + return p2.pfValue; + } else { + return p2.value; + } + }; + var checkTriggers = function checkTriggers2() { + var fromVal = getVal(origProp); + var toVal = getVal(prop); + self2.checkTriggers(ele, prop.name, fromVal, toVal); + }; + if (prop && prop.name.substr(0, 3) === "pie") { + warn("The pie style properties are deprecated. Create charts using background images instead."); + } + if (parsedProp.name === "curve-style" && ele.isEdge() && // loops must be bundled beziers + (parsedProp.value !== "bezier" && ele.isLoop() || // edges connected to compound nodes can not be haystacks + parsedProp.value === "haystack" && (ele.source().isParent() || ele.target().isParent()))) { + prop = parsedProp = this.parse(parsedProp.name, "bezier", propIsBypass); + } + if (prop["delete"]) { + style[prop.name] = void 0; + checkTriggers(); + return true; + } + if (prop.deleteBypassed) { + if (!origProp) { + checkTriggers(); + return true; + } else if (origProp.bypass) { + origProp.bypassed = void 0; + checkTriggers(); + return true; + } else { + return false; + } + } + if (prop.deleteBypass) { + if (!origProp) { + checkTriggers(); + return true; + } else if (origProp.bypass) { + style[prop.name] = origProp.bypassed; + checkTriggers(); + return true; + } else { + return false; + } + } + var printMappingErr = function printMappingErr2() { + warn("Do not assign mappings to elements without corresponding data (i.e. ele `" + ele.id() + "` has no mapping for property `" + prop.name + "` with data field `" + prop.field + "`); try a `[" + prop.field + "]` selector to limit scope to elements with `" + prop.field + "` defined"); + }; + switch (prop.mapped) { + case types.mapData: { + var fields = prop.field.split("."); + var fieldVal = _p.data; + for (var i3 = 0; i3 < fields.length && fieldVal; i3++) { + var field = fields[i3]; + fieldVal = fieldVal[field]; + } + if (fieldVal == null) { + printMappingErr(); + return false; + } + var percent; + if (!number$12(fieldVal)) { + warn("Do not use continuous mappers without specifying numeric data (i.e. `" + prop.field + ": " + fieldVal + "` for `" + ele.id() + "` is non-numeric)"); + return false; + } else { + var fieldWidth = prop.fieldMax - prop.fieldMin; + if (fieldWidth === 0) { + percent = 0; + } else { + percent = (fieldVal - prop.fieldMin) / fieldWidth; + } + } + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (type2.color) { + var r1 = prop.valueMin[0]; + var r2 = prop.valueMax[0]; + var g1 = prop.valueMin[1]; + var g2 = prop.valueMax[1]; + var b1 = prop.valueMin[2]; + var b2 = prop.valueMax[2]; + var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3]; + var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3]; + var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)]; + flatProp = { + // colours are simple, so just create the flat property instead of expensive string parsing + bypass: prop.bypass, + // we're a bypass if the mapping property is a bypass + name: prop.name, + value: clr, + strValue: "rgb(" + clr[0] + ", " + clr[1] + ", " + clr[2] + ")" + }; + } else if (type2.number) { + var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent; + flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping); + } else { + return false; + } + if (!flatProp) { + printMappingErr(); + return false; + } + flatProp.mapping = prop; + prop = flatProp; + break; + } + case types.data: { + var _fields = prop.field.split("."); + var _fieldVal = _p.data; + for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) { + var _field = _fields[_i3]; + _fieldVal = _fieldVal[_field]; + } + if (_fieldVal != null) { + flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping); + } + if (!flatProp) { + printMappingErr(); + return false; + } + flatProp.mapping = prop; + prop = flatProp; + break; + } + case types.fn: { + var fn2 = prop.value; + var fnRetVal = prop.fnValue != null ? prop.fnValue : fn2(ele); + prop.prevFnValue = fnRetVal; + if (fnRetVal == null) { + warn("Custom function mappers may not return null (i.e. `" + prop.name + "` for ele `" + ele.id() + "` is null)"); + return false; + } + flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping); + if (!flatProp) { + warn("Custom function mappers may not return invalid values for the property type (i.e. `" + prop.name + "` for ele `" + ele.id() + "` is invalid)"); + return false; + } + flatProp.mapping = copy2(prop); + prop = flatProp; + break; + } + case void 0: + break; + default: + return false; + } + if (propIsBypass) { + if (origPropIsBypass) { + prop.bypassed = origProp.bypassed; + } else { + prop.bypassed = origProp; + } + style[prop.name] = prop; + } else { + if (origPropIsBypass) { + origProp.bypassed = prop; + } else { + style[prop.name] = prop; + } + } + checkTriggers(); + return true; + }; + styfn$8.cleanElements = function(eles, keepBypasses) { + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + this.clearStyleHints(ele); + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + if (!keepBypasses) { + ele._private.style = {}; + } else { + var style = ele._private.style; + var propNames = Object.keys(style); + for (var j = 0; j < propNames.length; j++) { + var propName = propNames[j]; + var eleProp = style[propName]; + if (eleProp != null) { + if (eleProp.bypass) { + eleProp.bypassed = null; + } else { + style[propName] = null; + } + } + } + } + } + }; + styfn$8.update = function() { + var cy = this._private.cy; + var eles = cy.mutableElements(); + eles.updateStyle(); + }; + styfn$8.updateTransitions = function(ele, diffProps) { + var self2 = this; + var _p = ele._private; + var props = ele.pstyle("transition-property").value; + var duration = ele.pstyle("transition-duration").pfValue; + var delay = ele.pstyle("transition-delay").pfValue; + if (props.length > 0 && duration > 0) { + var style = {}; + var anyPrev = false; + for (var i3 = 0; i3 < props.length; i3++) { + var prop = props[i3]; + var styProp = ele.pstyle(prop); + var diffProp = diffProps[prop]; + if (!diffProp) { + continue; + } + var prevProp = diffProp.prev; + var fromProp = prevProp; + var toProp = diffProp.next != null ? diffProp.next : styProp; + var diff = false; + var initVal = void 0; + var initDt = 1e-6; + if (!fromProp) { + continue; + } + if (number$12(fromProp.pfValue) && number$12(toProp.pfValue)) { + diff = toProp.pfValue - fromProp.pfValue; + initVal = fromProp.pfValue + initDt * diff; + } else if (number$12(fromProp.value) && number$12(toProp.value)) { + diff = toProp.value - fromProp.value; + initVal = fromProp.value + initDt * diff; + } else if (array2(fromProp.value) && array2(toProp.value)) { + diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2]; + initVal = fromProp.strValue; + } + if (diff) { + style[prop] = toProp.strValue; + this.applyBypass(ele, prop, initVal); + anyPrev = true; + } + } + if (!anyPrev) { + return; + } + _p.transitioning = true; + new Promise$12(function(resolve2) { + if (delay > 0) { + ele.delayAnimation(delay).play().promise().then(resolve2); + } else { + resolve2(); + } + }).then(function() { + return ele.animation({ + style, + duration, + easing: ele.pstyle("transition-timing-function").value, + queue: false + }).play().promise(); + }).then(function() { + self2.removeBypasses(ele, props); + ele.emitAndNotify("style"); + _p.transitioning = false; + }); + } else if (_p.transitioning) { + this.removeBypasses(ele, props); + ele.emitAndNotify("style"); + _p.transitioning = false; + } + }; + styfn$8.checkTrigger = function(ele, name2, fromValue, toValue, getTrigger, onTrigger) { + var prop = this.properties[name2]; + var triggerCheck = getTrigger(prop); + if (triggerCheck != null && triggerCheck(fromValue, toValue)) { + onTrigger(prop); + } + }; + styfn$8.checkZOrderTrigger = function(ele, name2, fromValue, toValue) { + var _this = this; + this.checkTrigger(ele, name2, fromValue, toValue, function(prop) { + return prop.triggersZOrder; + }, function() { + _this._private.cy.notify("zorder", ele); + }); + }; + styfn$8.checkBoundsTrigger = function(ele, name2, fromValue, toValue) { + this.checkTrigger(ele, name2, fromValue, toValue, function(prop) { + return prop.triggersBounds; + }, function(prop) { + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + if ( + // only for beziers -- so performance of other edges isn't affected + prop.triggersBoundsOfParallelBeziers && (name2 === "curve-style" && (fromValue === "bezier" || toValue === "bezier") || name2 === "display" && (fromValue === "none" || toValue === "none")) + ) { + ele.parallelEdges().forEach(function(pllEdge) { + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + }); + } + }); + }; + styfn$8.checkTriggers = function(ele, name2, fromValue, toValue) { + ele.dirtyStyleCache(); + this.checkZOrderTrigger(ele, name2, fromValue, toValue); + this.checkBoundsTrigger(ele, name2, fromValue, toValue); + }; + var styfn$7 = {}; + styfn$7.applyBypass = function(eles, name2, value2, updateTransitions) { + var self2 = this; + var props = []; + var isBypass = true; + if (name2 === "*" || name2 === "**") { + if (value2 !== void 0) { + for (var i3 = 0; i3 < self2.properties.length; i3++) { + var prop = self2.properties[i3]; + var _name = prop.name; + var parsedProp = this.parse(_name, value2, true); + if (parsedProp) { + props.push(parsedProp); + } + } + } + } else if (string2(name2)) { + var _parsedProp = this.parse(name2, value2, true); + if (_parsedProp) { + props.push(_parsedProp); + } + } else if (plainObject(name2)) { + var specifiedProps = name2; + updateTransitions = value2; + var names = Object.keys(specifiedProps); + for (var _i = 0; _i < names.length; _i++) { + var _name2 = names[_i]; + var _value = specifiedProps[_name2]; + if (_value === void 0) { + _value = specifiedProps[dash2camel(_name2)]; + } + if (_value !== void 0) { + var _parsedProp2 = this.parse(_name2, _value, true); + if (_parsedProp2) { + props.push(_parsedProp2); + } + } + } + } else { + return false; + } + if (props.length === 0) { + return false; + } + var ret = false; + for (var _i2 = 0; _i2 < eles.length; _i2++) { + var ele = eles[_i2]; + var diffProps = {}; + var diffProp = void 0; + for (var j = 0; j < props.length; j++) { + var _prop = props[j]; + if (updateTransitions) { + var prevProp = ele.pstyle(_prop.name); + diffProp = diffProps[_prop.name] = { + prev: prevProp + }; + } + ret = this.applyParsedProperty(ele, copy2(_prop)) || ret; + if (updateTransitions) { + diffProp.next = ele.pstyle(_prop.name); + } + } + if (ret) { + this.updateStyleHints(ele); + } + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } + return ret; + }; + styfn$7.overrideBypass = function(eles, name2, value2) { + name2 = camel2dash(name2); + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var prop = ele._private.style[name2]; + var type2 = this.properties[name2].type; + var isColor = type2.color; + var isMulti = type2.mutiple; + var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value; + if (!prop || !prop.bypass) { + this.applyBypass(ele, name2, value2); + } else { + prop.value = value2; + if (prop.pfValue != null) { + prop.pfValue = value2; + } + if (isColor) { + prop.strValue = "rgb(" + value2.join(",") + ")"; + } else if (isMulti) { + prop.strValue = value2.join(" "); + } else { + prop.strValue = "" + value2; + } + this.updateStyleHints(ele); + } + this.checkTriggers(ele, name2, oldValue, value2); + } + }; + styfn$7.removeAllBypasses = function(eles, updateTransitions) { + return this.removeBypasses(eles, this.propertyNames, updateTransitions); + }; + styfn$7.removeBypasses = function(eles, props, updateTransitions) { + var isBypass = true; + for (var j = 0; j < eles.length; j++) { + var ele = eles[j]; + var diffProps = {}; + for (var i3 = 0; i3 < props.length; i3++) { + var name2 = props[i3]; + var prop = this.properties[name2]; + var prevProp = ele.pstyle(prop.name); + if (!prevProp || !prevProp.bypass) { + continue; + } + var value2 = ""; + var parsedProp = this.parse(name2, value2, true); + var diffProp = diffProps[prop.name] = { + prev: prevProp + }; + this.applyParsedProperty(ele, parsedProp); + diffProp.next = ele.pstyle(prop.name); + } + this.updateStyleHints(ele); + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } + }; + var styfn$6 = {}; + styfn$6.getEmSizeInPixels = function() { + var px = this.containerCss("font-size"); + if (px != null) { + return parseFloat(px); + } else { + return 1; + } + }; + styfn$6.containerCss = function(propName) { + var cy = this._private.cy; + var domElement2 = cy.container(); + if (window$1 && domElement2 && window$1.getComputedStyle) { + return window$1.getComputedStyle(domElement2).getPropertyValue(propName); + } + }; + var styfn$5 = {}; + styfn$5.getRenderedStyle = function(ele, prop) { + if (prop) { + return this.getStylePropertyValue(ele, prop, true); + } else { + return this.getRawStyle(ele, true); + } + }; + styfn$5.getRawStyle = function(ele, isRenderedVal) { + var self2 = this; + ele = ele[0]; + if (ele) { + var rstyle = {}; + for (var i3 = 0; i3 < self2.properties.length; i3++) { + var prop = self2.properties[i3]; + var val = self2.getStylePropertyValue(ele, prop.name, isRenderedVal); + if (val != null) { + rstyle[prop.name] = val; + rstyle[dash2camel(prop.name)] = val; + } + } + return rstyle; + } + }; + styfn$5.getIndexedStyle = function(ele, property2, subproperty, index2) { + var pstyle = ele.pstyle(property2)[subproperty][index2]; + return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property2)[subproperty][0]; + }; + styfn$5.getStylePropertyValue = function(ele, propName, isRenderedVal) { + var self2 = this; + ele = ele[0]; + if (ele) { + var prop = self2.properties[propName]; + if (prop.alias) { + prop = prop.pointsTo; + } + var type2 = prop.type; + var styleProp = ele.pstyle(prop.name); + if (styleProp) { + var value2 = styleProp.value, units = styleProp.units, strValue = styleProp.strValue; + if (isRenderedVal && type2.number && value2 != null && number$12(value2)) { + var zoom = ele.cy().zoom(); + var getRenderedValue = function getRenderedValue2(val) { + return val * zoom; + }; + var getValueStringWithUnits = function getValueStringWithUnits2(val, units2) { + return getRenderedValue(val) + units2; + }; + var isArrayValue = array2(value2); + var haveUnits = isArrayValue ? units.every(function(u) { + return u != null; + }) : units != null; + if (haveUnits) { + if (isArrayValue) { + return value2.map(function(v, i3) { + return getValueStringWithUnits(v, units[i3]); + }).join(" "); + } else { + return getValueStringWithUnits(value2, units); + } + } else { + if (isArrayValue) { + return value2.map(function(v) { + return string2(v) ? v : "" + getRenderedValue(v); + }).join(" "); + } else { + return "" + getRenderedValue(value2); + } + } + } else if (strValue != null) { + return strValue; + } + } + return null; + } + }; + styfn$5.getAnimationStartStyle = function(ele, aniProps) { + var rstyle = {}; + for (var i3 = 0; i3 < aniProps.length; i3++) { + var aniProp = aniProps[i3]; + var name2 = aniProp.name; + var styleProp = ele.pstyle(name2); + if (styleProp !== void 0) { + if (plainObject(styleProp)) { + styleProp = this.parse(name2, styleProp.strValue); + } else { + styleProp = this.parse(name2, styleProp); + } + } + if (styleProp) { + rstyle[name2] = styleProp; + } + } + return rstyle; + }; + styfn$5.getPropsList = function(propsObj) { + var self2 = this; + var rstyle = []; + var style = propsObj; + var props = self2.properties; + if (style) { + var names = Object.keys(style); + for (var i3 = 0; i3 < names.length; i3++) { + var name2 = names[i3]; + var val = style[name2]; + var prop = props[name2] || props[camel2dash(name2)]; + var styleProp = this.parse(prop.name, val); + if (styleProp) { + rstyle.push(styleProp); + } + } + } + return rstyle; + }; + styfn$5.getNonDefaultPropertiesHash = function(ele, propNames, seed) { + var hash = seed.slice(); + var name2, val, strVal, chVal; + var i3, j; + for (i3 = 0; i3 < propNames.length; i3++) { + name2 = propNames[i3]; + val = ele.pstyle(name2, false); + if (val == null) { + continue; + } else if (val.pfValue != null) { + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } else { + strVal = val.strValue; + for (j = 0; j < strVal.length; j++) { + chVal = strVal.charCodeAt(j); + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } + } + } + return hash; + }; + styfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash; + var styfn$4 = {}; + styfn$4.appendFromJson = function(json2) { + var style = this; + for (var i3 = 0; i3 < json2.length; i3++) { + var context = json2[i3]; + var selector2 = context.selector; + var props = context.style || context.css; + var names = Object.keys(props); + style.selector(selector2); + for (var j = 0; j < names.length; j++) { + var name2 = names[j]; + var value2 = props[name2]; + style.css(name2, value2); + } + } + return style; + }; + styfn$4.fromJson = function(json2) { + var style = this; + style.resetToDefault(); + style.appendFromJson(json2); + return style; + }; + styfn$4.json = function() { + var json2 = []; + for (var i3 = this.defaultLength; i3 < this.length; i3++) { + var cxt = this[i3]; + var selector2 = cxt.selector; + var props = cxt.properties; + var css = {}; + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + css[prop.name] = prop.strValue; + } + json2.push({ + selector: !selector2 ? "core" : selector2.toString(), + style: css + }); + } + return json2; + }; + var styfn$3 = {}; + styfn$3.appendFromString = function(string3) { + var self2 = this; + var style = this; + var remaining = "" + string3; + var selAndBlockStr; + var blockRem; + var propAndValStr; + remaining = remaining.replace(/[/][*](\s|.)+?[*][/]/g, ""); + function removeSelAndBlockFromRemaining() { + if (remaining.length > selAndBlockStr.length) { + remaining = remaining.substr(selAndBlockStr.length); + } else { + remaining = ""; + } + } + function removePropAndValFromRem() { + if (blockRem.length > propAndValStr.length) { + blockRem = blockRem.substr(propAndValStr.length); + } else { + blockRem = ""; + } + } + for (; ; ) { + var nothingLeftToParse = remaining.match(/^\s*$/); + if (nothingLeftToParse) { + break; + } + var selAndBlock = remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); + if (!selAndBlock) { + warn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + remaining); + break; + } + selAndBlockStr = selAndBlock[0]; + var selectorStr = selAndBlock[1]; + if (selectorStr !== "core") { + var selector2 = new Selector(selectorStr); + if (selector2.invalid) { + warn("Skipping parsing of block: Invalid selector found in string stylesheet: " + selectorStr); + removeSelAndBlockFromRemaining(); + continue; + } + } + var blockStr = selAndBlock[2]; + var invalidBlock = false; + blockRem = blockStr; + var props = []; + for (; ; ) { + var _nothingLeftToParse = blockRem.match(/^\s*$/); + if (_nothingLeftToParse) { + break; + } + var propAndVal = blockRem.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); + if (!propAndVal) { + warn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + blockStr); + invalidBlock = true; + break; + } + propAndValStr = propAndVal[0]; + var propStr = propAndVal[1]; + var valStr = propAndVal[2]; + var prop = self2.properties[propStr]; + if (!prop) { + warn("Skipping property: Invalid property name in: " + propAndValStr); + removePropAndValFromRem(); + continue; + } + var parsedProp = style.parse(propStr, valStr); + if (!parsedProp) { + warn("Skipping property: Invalid property definition in: " + propAndValStr); + removePropAndValFromRem(); + continue; + } + props.push({ + name: propStr, + val: valStr + }); + removePropAndValFromRem(); + } + if (invalidBlock) { + removeSelAndBlockFromRemaining(); + break; + } + style.selector(selectorStr); + for (var i3 = 0; i3 < props.length; i3++) { + var _prop = props[i3]; + style.css(_prop.name, _prop.val); + } + removeSelAndBlockFromRemaining(); + } + return style; + }; + styfn$3.fromString = function(string3) { + var style = this; + style.resetToDefault(); + style.appendFromString(string3); + return style; + }; + var styfn$2 = {}; + (function() { + var number$13 = number2; + var rgba3 = rgbaNoBackRefs; + var hsla3 = hslaNoBackRefs; + var hex3$1 = hex3; + var hex6$1 = hex6; + var data2 = function data3(prefix) { + return "^" + prefix + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; + }; + var mapData = function mapData2(prefix) { + var mapArg = number$13 + "|\\w+|" + rgba3 + "|" + hsla3 + "|" + hex3$1 + "|" + hex6$1; + return "^" + prefix + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + number$13 + ")\\s*\\,\\s*(" + number$13 + ")\\s*,\\s*(" + mapArg + ")\\s*\\,\\s*(" + mapArg + ")\\)$"; + }; + var urlRegexes = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; + styfn$2.types = { + time: { + number: true, + min: 0, + units: "s|ms", + implicitUnits: "ms" + }, + percent: { + number: true, + min: 0, + max: 100, + units: "%", + implicitUnits: "%" + }, + percentages: { + number: true, + min: 0, + max: 100, + units: "%", + implicitUnits: "%", + multiple: true + }, + zeroOneNumber: { + number: true, + min: 0, + max: 1, + unitless: true + }, + zeroOneNumbers: { + number: true, + min: 0, + max: 1, + unitless: true, + multiple: true + }, + nOneOneNumber: { + number: true, + min: -1, + max: 1, + unitless: true + }, + nonNegativeInt: { + number: true, + min: 0, + integer: true, + unitless: true + }, + position: { + enums: ["parent", "origin"] + }, + nodeSize: { + number: true, + min: 0, + enums: ["label"] + }, + number: { + number: true, + unitless: true + }, + numbers: { + number: true, + unitless: true, + multiple: true + }, + positiveNumber: { + number: true, + unitless: true, + min: 0, + strictMin: true + }, + size: { + number: true, + min: 0 + }, + bidirectionalSize: { + number: true + }, + // allows negative + bidirectionalSizeMaybePercent: { + number: true, + allowPercent: true + }, + // allows negative + bidirectionalSizes: { + number: true, + multiple: true + }, + // allows negative + sizeMaybePercent: { + number: true, + min: 0, + allowPercent: true + }, + axisDirection: { + enums: ["horizontal", "leftward", "rightward", "vertical", "upward", "downward", "auto"] + }, + paddingRelativeTo: { + enums: ["width", "height", "average", "min", "max"] + }, + bgWH: { + number: true, + min: 0, + allowPercent: true, + enums: ["auto"], + multiple: true + }, + bgPos: { + number: true, + allowPercent: true, + multiple: true + }, + bgRelativeTo: { + enums: ["inner", "include-padding"], + multiple: true + }, + bgRepeat: { + enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"], + multiple: true + }, + bgFit: { + enums: ["none", "contain", "cover"], + multiple: true + }, + bgCrossOrigin: { + enums: ["anonymous", "use-credentials"], + multiple: true + }, + bgClip: { + enums: ["none", "node"], + multiple: true + }, + bgContainment: { + enums: ["inside", "over"], + multiple: true + }, + color: { + color: true + }, + colors: { + color: true, + multiple: true + }, + fill: { + enums: ["solid", "linear-gradient", "radial-gradient"] + }, + bool: { + enums: ["yes", "no"] + }, + bools: { + enums: ["yes", "no"], + multiple: true + }, + lineStyle: { + enums: ["solid", "dotted", "dashed"] + }, + lineCap: { + enums: ["butt", "round", "square"] + }, + borderStyle: { + enums: ["solid", "dotted", "dashed", "double"] + }, + curveStyle: { + enums: ["bezier", "unbundled-bezier", "haystack", "segments", "straight", "straight-triangle", "taxi"] + }, + fontFamily: { + regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' + }, + fontStyle: { + enums: ["italic", "normal", "oblique"] + }, + fontWeight: { + enums: ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "800", "900", 100, 200, 300, 400, 500, 600, 700, 800, 900] + }, + textDecoration: { + enums: ["none", "underline", "overline", "line-through"] + }, + textTransform: { + enums: ["none", "uppercase", "lowercase"] + }, + textWrap: { + enums: ["none", "wrap", "ellipsis"] + }, + textOverflowWrap: { + enums: ["whitespace", "anywhere"] + }, + textBackgroundShape: { + enums: ["rectangle", "roundrectangle", "round-rectangle"] + }, + nodeShape: { + enums: ["rectangle", "roundrectangle", "round-rectangle", "cutrectangle", "cut-rectangle", "bottomroundrectangle", "bottom-round-rectangle", "barrel", "ellipse", "triangle", "round-triangle", "square", "pentagon", "round-pentagon", "hexagon", "round-hexagon", "concavehexagon", "concave-hexagon", "heptagon", "round-heptagon", "octagon", "round-octagon", "tag", "round-tag", "star", "diamond", "round-diamond", "vee", "rhomboid", "polygon"] + }, + overlayShape: { + enums: ["roundrectangle", "round-rectangle", "ellipse"] + }, + compoundIncludeLabels: { + enums: ["include", "exclude"] + }, + arrowShape: { + enums: ["tee", "triangle", "triangle-tee", "circle-triangle", "triangle-cross", "triangle-backcurve", "vee", "square", "circle", "diamond", "chevron", "none"] + }, + arrowFill: { + enums: ["filled", "hollow"] + }, + display: { + enums: ["element", "none"] + }, + visibility: { + enums: ["hidden", "visible"] + }, + zCompoundDepth: { + enums: ["bottom", "orphan", "auto", "top"] + }, + zIndexCompare: { + enums: ["auto", "manual"] + }, + valign: { + enums: ["top", "center", "bottom"] + }, + halign: { + enums: ["left", "center", "right"] + }, + justification: { + enums: ["left", "center", "right", "auto"] + }, + text: { + string: true + }, + data: { + mapping: true, + regex: data2("data") + }, + layoutData: { + mapping: true, + regex: data2("layoutData") + }, + scratch: { + mapping: true, + regex: data2("scratch") + }, + mapData: { + mapping: true, + regex: mapData("mapData") + }, + mapLayoutData: { + mapping: true, + regex: mapData("mapLayoutData") + }, + mapScratch: { + mapping: true, + regex: mapData("mapScratch") + }, + fn: { + mapping: true, + fn: true + }, + url: { + regexes: urlRegexes, + singleRegexMatchValue: true + }, + urls: { + regexes: urlRegexes, + singleRegexMatchValue: true, + multiple: true + }, + propList: { + propList: true + }, + angle: { + number: true, + units: "deg|rad", + implicitUnits: "rad" + }, + textRotation: { + number: true, + units: "deg|rad", + implicitUnits: "rad", + enums: ["none", "autorotate"] + }, + polygonPointList: { + number: true, + multiple: true, + evenMultiple: true, + min: -1, + max: 1, + unitless: true + }, + edgeDistances: { + enums: ["intersection", "node-position"] + }, + edgeEndpoint: { + number: true, + multiple: true, + units: "%|px|em|deg|rad", + implicitUnits: "px", + enums: ["inside-to-node", "outside-to-node", "outside-to-node-or-label", "outside-to-line", "outside-to-line-or-label"], + singleEnum: true, + validate: function validate2(valArr, unitsArr) { + switch (valArr.length) { + case 2: + return unitsArr[0] !== "deg" && unitsArr[0] !== "rad" && unitsArr[1] !== "deg" && unitsArr[1] !== "rad"; + case 1: + return string2(valArr[0]) || unitsArr[0] === "deg" || unitsArr[0] === "rad"; + default: + return false; + } + } + }, + easing: { + regexes: ["^(spring)\\s*\\(\\s*(" + number$13 + ")\\s*,\\s*(" + number$13 + ")\\s*\\)$", "^(cubic-bezier)\\s*\\(\\s*(" + number$13 + ")\\s*,\\s*(" + number$13 + ")\\s*,\\s*(" + number$13 + ")\\s*,\\s*(" + number$13 + ")\\s*\\)$"], + enums: ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "ease-in-sine", "ease-out-sine", "ease-in-out-sine", "ease-in-quad", "ease-out-quad", "ease-in-out-quad", "ease-in-cubic", "ease-out-cubic", "ease-in-out-cubic", "ease-in-quart", "ease-out-quart", "ease-in-out-quart", "ease-in-quint", "ease-out-quint", "ease-in-out-quint", "ease-in-expo", "ease-out-expo", "ease-in-out-expo", "ease-in-circ", "ease-out-circ", "ease-in-out-circ"] + }, + gradientDirection: { + enums: [ + "to-bottom", + "to-top", + "to-left", + "to-right", + "to-bottom-right", + "to-bottom-left", + "to-top-right", + "to-top-left", + "to-right-bottom", + "to-left-bottom", + "to-right-top", + "to-left-top" + // different order + ] + }, + boundsExpansion: { + number: true, + multiple: true, + min: 0, + validate: function validate2(valArr) { + var length2 = valArr.length; + return length2 === 1 || length2 === 2 || length2 === 4; + } + } + }; + var diff = { + zeroNonZero: function zeroNonZero(val1, val2) { + if ((val1 == null || val2 == null) && val1 !== val2) { + return true; + } + if (val1 == 0 && val2 != 0) { + return true; + } else if (val1 != 0 && val2 == 0) { + return true; + } else { + return false; + } + }, + any: function any(val1, val2) { + return val1 != val2; + }, + emptyNonEmpty: function emptyNonEmpty(str1, str2) { + var empty1 = emptyString(str1); + var empty2 = emptyString(str2); + return empty1 && !empty2 || !empty1 && empty2; + } + }; + var t = styfn$2.types; + var mainLabel = [{ + name: "label", + type: t.text, + triggersBounds: diff.any, + triggersZOrder: diff.emptyNonEmpty + }, { + name: "text-rotation", + type: t.textRotation, + triggersBounds: diff.any + }, { + name: "text-margin-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "text-margin-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }]; + var sourceLabel = [{ + name: "source-label", + type: t.text, + triggersBounds: diff.any + }, { + name: "source-text-rotation", + type: t.textRotation, + triggersBounds: diff.any + }, { + name: "source-text-margin-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "source-text-margin-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "source-text-offset", + type: t.size, + triggersBounds: diff.any + }]; + var targetLabel = [{ + name: "target-label", + type: t.text, + triggersBounds: diff.any + }, { + name: "target-text-rotation", + type: t.textRotation, + triggersBounds: diff.any + }, { + name: "target-text-margin-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "target-text-margin-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "target-text-offset", + type: t.size, + triggersBounds: diff.any + }]; + var labelDimensions = [{ + name: "font-family", + type: t.fontFamily, + triggersBounds: diff.any + }, { + name: "font-style", + type: t.fontStyle, + triggersBounds: diff.any + }, { + name: "font-weight", + type: t.fontWeight, + triggersBounds: diff.any + }, { + name: "font-size", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-transform", + type: t.textTransform, + triggersBounds: diff.any + }, { + name: "text-wrap", + type: t.textWrap, + triggersBounds: diff.any + }, { + name: "text-overflow-wrap", + type: t.textOverflowWrap, + triggersBounds: diff.any + }, { + name: "text-max-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-outline-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "line-height", + type: t.positiveNumber, + triggersBounds: diff.any + }]; + var commonLabel = [{ + name: "text-valign", + type: t.valign, + triggersBounds: diff.any + }, { + name: "text-halign", + type: t.halign, + triggersBounds: diff.any + }, { + name: "color", + type: t.color + }, { + name: "text-outline-color", + type: t.color + }, { + name: "text-outline-opacity", + type: t.zeroOneNumber + }, { + name: "text-background-color", + type: t.color + }, { + name: "text-background-opacity", + type: t.zeroOneNumber + }, { + name: "text-background-padding", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-border-opacity", + type: t.zeroOneNumber + }, { + name: "text-border-color", + type: t.color + }, { + name: "text-border-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-border-style", + type: t.borderStyle, + triggersBounds: diff.any + }, { + name: "text-background-shape", + type: t.textBackgroundShape, + triggersBounds: diff.any + }, { + name: "text-justification", + type: t.justification + }]; + var behavior = [{ + name: "events", + type: t.bool + }, { + name: "text-events", + type: t.bool + }]; + var visibility = [{ + name: "display", + type: t.display, + triggersZOrder: diff.any, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: "visibility", + type: t.visibility, + triggersZOrder: diff.any + }, { + name: "opacity", + type: t.zeroOneNumber, + triggersZOrder: diff.zeroNonZero + }, { + name: "text-opacity", + type: t.zeroOneNumber + }, { + name: "min-zoomed-font-size", + type: t.size + }, { + name: "z-compound-depth", + type: t.zCompoundDepth, + triggersZOrder: diff.any + }, { + name: "z-index-compare", + type: t.zIndexCompare, + triggersZOrder: diff.any + }, { + name: "z-index", + type: t.nonNegativeInt, + triggersZOrder: diff.any + }]; + var overlay = [{ + name: "overlay-padding", + type: t.size, + triggersBounds: diff.any + }, { + name: "overlay-color", + type: t.color + }, { + name: "overlay-opacity", + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: "overlay-shape", + type: t.overlayShape, + triggersBounds: diff.any + }]; + var underlay = [{ + name: "underlay-padding", + type: t.size, + triggersBounds: diff.any + }, { + name: "underlay-color", + type: t.color + }, { + name: "underlay-opacity", + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: "underlay-shape", + type: t.overlayShape, + triggersBounds: diff.any + }]; + var transition = [{ + name: "transition-property", + type: t.propList + }, { + name: "transition-duration", + type: t.time + }, { + name: "transition-delay", + type: t.time + }, { + name: "transition-timing-function", + type: t.easing + }]; + var nodeSizeHashOverride = function nodeSizeHashOverride2(ele, parsedProp) { + if (parsedProp.value === "label") { + return -ele.poolIndex(); + } else { + return parsedProp.pfValue; + } + }; + var nodeBody = [{ + name: "height", + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: "width", + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: "shape", + type: t.nodeShape, + triggersBounds: diff.any + }, { + name: "shape-polygon-points", + type: t.polygonPointList, + triggersBounds: diff.any + }, { + name: "background-color", + type: t.color + }, { + name: "background-fill", + type: t.fill + }, { + name: "background-opacity", + type: t.zeroOneNumber + }, { + name: "background-blacken", + type: t.nOneOneNumber + }, { + name: "background-gradient-stop-colors", + type: t.colors + }, { + name: "background-gradient-stop-positions", + type: t.percentages + }, { + name: "background-gradient-direction", + type: t.gradientDirection + }, { + name: "padding", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "padding-relative-to", + type: t.paddingRelativeTo, + triggersBounds: diff.any + }, { + name: "bounds-expansion", + type: t.boundsExpansion, + triggersBounds: diff.any + }]; + var nodeBorder = [{ + name: "border-color", + type: t.color + }, { + name: "border-opacity", + type: t.zeroOneNumber + }, { + name: "border-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "border-style", + type: t.borderStyle + }]; + var backgroundImage = [{ + name: "background-image", + type: t.urls + }, { + name: "background-image-crossorigin", + type: t.bgCrossOrigin + }, { + name: "background-image-opacity", + type: t.zeroOneNumbers + }, { + name: "background-image-containment", + type: t.bgContainment + }, { + name: "background-image-smoothing", + type: t.bools + }, { + name: "background-position-x", + type: t.bgPos + }, { + name: "background-position-y", + type: t.bgPos + }, { + name: "background-width-relative-to", + type: t.bgRelativeTo + }, { + name: "background-height-relative-to", + type: t.bgRelativeTo + }, { + name: "background-repeat", + type: t.bgRepeat + }, { + name: "background-fit", + type: t.bgFit + }, { + name: "background-clip", + type: t.bgClip + }, { + name: "background-width", + type: t.bgWH + }, { + name: "background-height", + type: t.bgWH + }, { + name: "background-offset-x", + type: t.bgPos + }, { + name: "background-offset-y", + type: t.bgPos + }]; + var compound = [{ + name: "position", + type: t.position, + triggersBounds: diff.any + }, { + name: "compound-sizing-wrt-labels", + type: t.compoundIncludeLabels, + triggersBounds: diff.any + }, { + name: "min-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "min-width-bias-left", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "min-width-bias-right", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "min-height", + type: t.size, + triggersBounds: diff.any + }, { + name: "min-height-bias-top", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "min-height-bias-bottom", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }]; + var edgeLine = [{ + name: "line-style", + type: t.lineStyle + }, { + name: "line-color", + type: t.color + }, { + name: "line-fill", + type: t.fill + }, { + name: "line-cap", + type: t.lineCap + }, { + name: "line-opacity", + type: t.zeroOneNumber + }, { + name: "line-dash-pattern", + type: t.numbers + }, { + name: "line-dash-offset", + type: t.number + }, { + name: "line-gradient-stop-colors", + type: t.colors + }, { + name: "line-gradient-stop-positions", + type: t.percentages + }, { + name: "curve-style", + type: t.curveStyle, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: "haystack-radius", + type: t.zeroOneNumber, + triggersBounds: diff.any + }, { + name: "source-endpoint", + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: "target-endpoint", + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: "control-point-step-size", + type: t.size, + triggersBounds: diff.any + }, { + name: "control-point-distances", + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: "control-point-weights", + type: t.numbers, + triggersBounds: diff.any + }, { + name: "segment-distances", + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: "segment-weights", + type: t.numbers, + triggersBounds: diff.any + }, { + name: "taxi-turn", + type: t.bidirectionalSizeMaybePercent, + triggersBounds: diff.any + }, { + name: "taxi-turn-min-distance", + type: t.size, + triggersBounds: diff.any + }, { + name: "taxi-direction", + type: t.axisDirection, + triggersBounds: diff.any + }, { + name: "edge-distances", + type: t.edgeDistances, + triggersBounds: diff.any + }, { + name: "arrow-scale", + type: t.positiveNumber, + triggersBounds: diff.any + }, { + name: "loop-direction", + type: t.angle, + triggersBounds: diff.any + }, { + name: "loop-sweep", + type: t.angle, + triggersBounds: diff.any + }, { + name: "source-distance-from-node", + type: t.size, + triggersBounds: diff.any + }, { + name: "target-distance-from-node", + type: t.size, + triggersBounds: diff.any + }]; + var ghost = [{ + name: "ghost", + type: t.bool, + triggersBounds: diff.any + }, { + name: "ghost-offset-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "ghost-offset-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "ghost-opacity", + type: t.zeroOneNumber + }]; + var core3 = [{ + name: "selection-box-color", + type: t.color + }, { + name: "selection-box-opacity", + type: t.zeroOneNumber + }, { + name: "selection-box-border-color", + type: t.color + }, { + name: "selection-box-border-width", + type: t.size + }, { + name: "active-bg-color", + type: t.color + }, { + name: "active-bg-opacity", + type: t.zeroOneNumber + }, { + name: "active-bg-size", + type: t.size + }, { + name: "outside-texture-bg-color", + type: t.color + }, { + name: "outside-texture-bg-opacity", + type: t.zeroOneNumber + }]; + var pie2 = []; + styfn$2.pieBackgroundN = 16; + pie2.push({ + name: "pie-size", + type: t.sizeMaybePercent + }); + for (var i3 = 1; i3 <= styfn$2.pieBackgroundN; i3++) { + pie2.push({ + name: "pie-" + i3 + "-background-color", + type: t.color + }); + pie2.push({ + name: "pie-" + i3 + "-background-size", + type: t.percent + }); + pie2.push({ + name: "pie-" + i3 + "-background-opacity", + type: t.zeroOneNumber + }); + } + var edgeArrow = []; + var arrowPrefixes = styfn$2.arrowPrefixes = ["source", "mid-source", "target", "mid-target"]; + [{ + name: "arrow-shape", + type: t.arrowShape, + triggersBounds: diff.any + }, { + name: "arrow-color", + type: t.color + }, { + name: "arrow-fill", + type: t.arrowFill + }].forEach(function(prop2) { + arrowPrefixes.forEach(function(prefix) { + var name2 = prefix + "-" + prop2.name; + var type2 = prop2.type, triggersBounds = prop2.triggersBounds; + edgeArrow.push({ + name: name2, + type: type2, + triggersBounds + }); + }); + }, {}); + var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, backgroundImage, pie2, compound, edgeLine, edgeArrow, core3); + var propGroups = styfn$2.propertyGroups = { + // common to all eles + behavior, + transition, + visibility, + overlay, + underlay, + ghost, + // labels + commonLabel, + labelDimensions, + mainLabel, + sourceLabel, + targetLabel, + // node props + nodeBody, + nodeBorder, + backgroundImage, + pie: pie2, + compound, + // edge props + edgeLine, + edgeArrow, + core: core3 + }; + var propGroupNames = styfn$2.propertyGroupNames = {}; + var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups); + propGroupKeys.forEach(function(key) { + propGroupNames[key] = propGroups[key].map(function(prop2) { + return prop2.name; + }); + propGroups[key].forEach(function(prop2) { + return prop2.groupKey = key; + }); + }); + var aliases = styfn$2.aliases = [{ + name: "content", + pointsTo: "label" + }, { + name: "control-point-distance", + pointsTo: "control-point-distances" + }, { + name: "control-point-weight", + pointsTo: "control-point-weights" + }, { + name: "edge-text-rotation", + pointsTo: "text-rotation" + }, { + name: "padding-left", + pointsTo: "padding" + }, { + name: "padding-right", + pointsTo: "padding" + }, { + name: "padding-top", + pointsTo: "padding" + }, { + name: "padding-bottom", + pointsTo: "padding" + }]; + styfn$2.propertyNames = props.map(function(p2) { + return p2.name; + }); + for (var _i = 0; _i < props.length; _i++) { + var prop = props[_i]; + props[prop.name] = prop; + } + for (var _i2 = 0; _i2 < aliases.length; _i2++) { + var alias = aliases[_i2]; + var pointsToProp = props[alias.pointsTo]; + var aliasProp = { + name: alias.name, + alias: true, + pointsTo: pointsToProp + }; + props.push(aliasProp); + props[alias.name] = aliasProp; + } + })(); + styfn$2.getDefaultProperty = function(name2) { + return this.getDefaultProperties()[name2]; + }; + styfn$2.getDefaultProperties = function() { + var _p = this._private; + if (_p.defaultProperties != null) { + return _p.defaultProperties; + } + var rawProps = extend2({ + // core props + "selection-box-color": "#ddd", + "selection-box-opacity": 0.65, + "selection-box-border-color": "#aaa", + "selection-box-border-width": 1, + "active-bg-color": "black", + "active-bg-opacity": 0.15, + "active-bg-size": 30, + "outside-texture-bg-color": "#000", + "outside-texture-bg-opacity": 0.125, + // common node/edge props + "events": "yes", + "text-events": "no", + "text-valign": "top", + "text-halign": "center", + "text-justification": "auto", + "line-height": 1, + "color": "#000", + "text-outline-color": "#000", + "text-outline-width": 0, + "text-outline-opacity": 1, + "text-opacity": 1, + "text-decoration": "none", + "text-transform": "none", + "text-wrap": "none", + "text-overflow-wrap": "whitespace", + "text-max-width": 9999, + "text-background-color": "#000", + "text-background-opacity": 0, + "text-background-shape": "rectangle", + "text-background-padding": 0, + "text-border-opacity": 0, + "text-border-width": 0, + "text-border-style": "solid", + "text-border-color": "#000", + "font-family": "Helvetica Neue, Helvetica, sans-serif", + "font-style": "normal", + "font-weight": "normal", + "font-size": 16, + "min-zoomed-font-size": 0, + "text-rotation": "none", + "source-text-rotation": "none", + "target-text-rotation": "none", + "visibility": "visible", + "display": "element", + "opacity": 1, + "z-compound-depth": "auto", + "z-index-compare": "auto", + "z-index": 0, + "label": "", + "text-margin-x": 0, + "text-margin-y": 0, + "source-label": "", + "source-text-offset": 0, + "source-text-margin-x": 0, + "source-text-margin-y": 0, + "target-label": "", + "target-text-offset": 0, + "target-text-margin-x": 0, + "target-text-margin-y": 0, + "overlay-opacity": 0, + "overlay-color": "#000", + "overlay-padding": 10, + "overlay-shape": "round-rectangle", + "underlay-opacity": 0, + "underlay-color": "#000", + "underlay-padding": 10, + "underlay-shape": "round-rectangle", + "transition-property": "none", + "transition-duration": 0, + "transition-delay": 0, + "transition-timing-function": "linear", + // node props + "background-blacken": 0, + "background-color": "#999", + "background-fill": "solid", + "background-opacity": 1, + "background-image": "none", + "background-image-crossorigin": "anonymous", + "background-image-opacity": 1, + "background-image-containment": "inside", + "background-image-smoothing": "yes", + "background-position-x": "50%", + "background-position-y": "50%", + "background-offset-x": 0, + "background-offset-y": 0, + "background-width-relative-to": "include-padding", + "background-height-relative-to": "include-padding", + "background-repeat": "no-repeat", + "background-fit": "none", + "background-clip": "node", + "background-width": "auto", + "background-height": "auto", + "border-color": "#000", + "border-opacity": 1, + "border-width": 0, + "border-style": "solid", + "height": 30, + "width": 30, + "shape": "ellipse", + "shape-polygon-points": "-1, -1, 1, -1, 1, 1, -1, 1", + "bounds-expansion": 0, + // node gradient + "background-gradient-direction": "to-bottom", + "background-gradient-stop-colors": "#999", + "background-gradient-stop-positions": "0%", + // ghost props + "ghost": "no", + "ghost-offset-y": 0, + "ghost-offset-x": 0, + "ghost-opacity": 0, + // compound props + "padding": 0, + "padding-relative-to": "width", + "position": "origin", + "compound-sizing-wrt-labels": "include", + "min-width": 0, + "min-width-bias-left": 0, + "min-width-bias-right": 0, + "min-height": 0, + "min-height-bias-top": 0, + "min-height-bias-bottom": 0 + }, { + // node pie bg + "pie-size": "100%" + }, [{ + name: "pie-{{i}}-background-color", + value: "black" + }, { + name: "pie-{{i}}-background-size", + value: "0%" + }, { + name: "pie-{{i}}-background-opacity", + value: 1 + }].reduce(function(css, prop2) { + for (var i4 = 1; i4 <= styfn$2.pieBackgroundN; i4++) { + var name3 = prop2.name.replace("{{i}}", i4); + var val2 = prop2.value; + css[name3] = val2; + } + return css; + }, {}), { + // edge props + "line-style": "solid", + "line-color": "#999", + "line-fill": "solid", + "line-cap": "butt", + "line-opacity": 1, + "line-gradient-stop-colors": "#999", + "line-gradient-stop-positions": "0%", + "control-point-step-size": 40, + "control-point-weights": 0.5, + "segment-weights": 0.5, + "segment-distances": 20, + "taxi-turn": "50%", + "taxi-turn-min-distance": 10, + "taxi-direction": "auto", + "edge-distances": "intersection", + "curve-style": "haystack", + "haystack-radius": 0, + "arrow-scale": 1, + "loop-direction": "-45deg", + "loop-sweep": "-90deg", + "source-distance-from-node": 0, + "target-distance-from-node": 0, + "source-endpoint": "outside-to-node", + "target-endpoint": "outside-to-node", + "line-dash-pattern": [6, 3], + "line-dash-offset": 0 + }, [{ + name: "arrow-shape", + value: "none" + }, { + name: "arrow-color", + value: "#999" + }, { + name: "arrow-fill", + value: "filled" + }].reduce(function(css, prop2) { + styfn$2.arrowPrefixes.forEach(function(prefix) { + var name3 = prefix + "-" + prop2.name; + var val2 = prop2.value; + css[name3] = val2; + }); + return css; + }, {})); + var parsedProps = {}; + for (var i3 = 0; i3 < this.properties.length; i3++) { + var prop = this.properties[i3]; + if (prop.pointsTo) { + continue; + } + var name2 = prop.name; + var val = rawProps[name2]; + var parsedProp = this.parse(name2, val); + parsedProps[name2] = parsedProp; + } + _p.defaultProperties = parsedProps; + return _p.defaultProperties; + }; + styfn$2.addDefaultStylesheet = function() { + this.selector(":parent").css({ + "shape": "rectangle", + "padding": 10, + "background-color": "#eee", + "border-color": "#ccc", + "border-width": 1 + }).selector("edge").css({ + "width": 3 + }).selector(":loop").css({ + "curve-style": "bezier" + }).selector("edge:compound").css({ + "curve-style": "bezier", + "source-endpoint": "outside-to-line", + "target-endpoint": "outside-to-line" + }).selector(":selected").css({ + "background-color": "#0169D9", + "line-color": "#0169D9", + "source-arrow-color": "#0169D9", + "target-arrow-color": "#0169D9", + "mid-source-arrow-color": "#0169D9", + "mid-target-arrow-color": "#0169D9" + }).selector(":parent:selected").css({ + "background-color": "#CCE1F9", + "border-color": "#aec8e5" + }).selector(":active").css({ + "overlay-color": "black", + "overlay-padding": 10, + "overlay-opacity": 0.25 + }); + this.defaultLength = this.length; + }; + var styfn$1 = {}; + styfn$1.parse = function(name2, value2, propIsBypass, propIsFlat) { + var self2 = this; + if (fn$6(value2)) { + return self2.parseImplWarn(name2, value2, propIsBypass, propIsFlat); + } + var flatKey = propIsFlat === "mapping" || propIsFlat === true || propIsFlat === false || propIsFlat == null ? "dontcare" : propIsFlat; + var bypassKey = propIsBypass ? "t" : "f"; + var valueKey = "" + value2; + var argHash = hashStrings(name2, valueKey, bypassKey, flatKey); + var propCache = self2.propCache = self2.propCache || []; + var ret; + if (!(ret = propCache[argHash])) { + ret = propCache[argHash] = self2.parseImplWarn(name2, value2, propIsBypass, propIsFlat); + } + if (propIsBypass || propIsFlat === "mapping") { + ret = copy2(ret); + if (ret) { + ret.value = copy2(ret.value); + } + } + return ret; + }; + styfn$1.parseImplWarn = function(name2, value2, propIsBypass, propIsFlat) { + var prop = this.parseImpl(name2, value2, propIsBypass, propIsFlat); + if (!prop && value2 != null) { + warn("The style property `".concat(name2, ": ").concat(value2, "` is invalid")); + } + if (prop && (prop.name === "width" || prop.name === "height") && value2 === "label") { + warn("The style value of `label` is deprecated for `" + prop.name + "`"); + } + return prop; + }; + styfn$1.parseImpl = function(name2, value2, propIsBypass, propIsFlat) { + var self2 = this; + name2 = camel2dash(name2); + var property2 = self2.properties[name2]; + var passedValue = value2; + var types = self2.types; + if (!property2) { + return null; + } + if (value2 === void 0) { + return null; + } + if (property2.alias) { + property2 = property2.pointsTo; + name2 = property2.name; + } + var valueIsString = string2(value2); + if (valueIsString) { + value2 = value2.trim(); + } + var type2 = property2.type; + if (!type2) { + return null; + } + if (propIsBypass && (value2 === "" || value2 === null)) { + return { + name: name2, + value: value2, + bypass: true, + deleteBypass: true + }; + } + if (fn$6(value2)) { + return { + name: name2, + value: value2, + strValue: "fn", + mapped: types.fn, + bypass: propIsBypass + }; + } + var data2, mapData; + if (!valueIsString || propIsFlat || value2.length < 7 || value2[1] !== "a") + ; + else if (value2.length >= 7 && value2[0] === "d" && (data2 = new RegExp(types.data.regex).exec(value2))) { + if (propIsBypass) { + return false; + } + var mapped = types.data; + return { + name: name2, + value: data2, + strValue: "" + value2, + mapped, + field: data2[1], + bypass: propIsBypass + }; + } else if (value2.length >= 10 && value2[0] === "m" && (mapData = new RegExp(types.mapData.regex).exec(value2))) { + if (propIsBypass) { + return false; + } + if (type2.multiple) { + return false; + } + var _mapped = types.mapData; + if (!(type2.color || type2.number)) { + return false; + } + var valueMin = this.parse(name2, mapData[4]); + if (!valueMin || valueMin.mapped) { + return false; + } + var valueMax = this.parse(name2, mapData[5]); + if (!valueMax || valueMax.mapped) { + return false; + } + if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) { + warn("`" + name2 + ": " + value2 + "` is not a valid mapper because the output range is zero; converting to `" + name2 + ": " + valueMin.strValue + "`"); + return this.parse(name2, valueMin.strValue); + } else if (type2.color) { + var c1 = valueMin.value; + var c2 = valueMax.value; + var same = c1[0] === c2[0] && c1[1] === c2[1] && c1[2] === c2[2] && // optional alpha + (c1[3] === c2[3] || (c1[3] == null || c1[3] === 1) && (c2[3] == null || c2[3] === 1)); + if (same) { + return false; + } + } + return { + name: name2, + value: mapData, + strValue: "" + value2, + mapped: _mapped, + field: mapData[1], + fieldMin: parseFloat(mapData[2]), + // min & max are numeric + fieldMax: parseFloat(mapData[3]), + valueMin: valueMin.value, + valueMax: valueMax.value, + bypass: propIsBypass + }; + } + if (type2.multiple && propIsFlat !== "multiple") { + var vals; + if (valueIsString) { + vals = value2.split(/\s+/); + } else if (array2(value2)) { + vals = value2; + } else { + vals = [value2]; + } + if (type2.evenMultiple && vals.length % 2 !== 0) { + return null; + } + var valArr = []; + var unitsArr = []; + var pfValArr = []; + var strVal = ""; + var hasEnum = false; + for (var i3 = 0; i3 < vals.length; i3++) { + var p2 = self2.parse(name2, vals[i3], propIsBypass, "multiple"); + hasEnum = hasEnum || string2(p2.value); + valArr.push(p2.value); + pfValArr.push(p2.pfValue != null ? p2.pfValue : p2.value); + unitsArr.push(p2.units); + strVal += (i3 > 0 ? " " : "") + p2.strValue; + } + if (type2.validate && !type2.validate(valArr, unitsArr)) { + return null; + } + if (type2.singleEnum && hasEnum) { + if (valArr.length === 1 && string2(valArr[0])) { + return { + name: name2, + value: valArr[0], + strValue: valArr[0], + bypass: propIsBypass + }; + } else { + return null; + } + } + return { + name: name2, + value: valArr, + pfValue: pfValArr, + strValue: strVal, + bypass: propIsBypass, + units: unitsArr + }; + } + var checkEnums = function checkEnums2() { + for (var _i = 0; _i < type2.enums.length; _i++) { + var en = type2.enums[_i]; + if (en === value2) { + return { + name: name2, + value: value2, + strValue: "" + value2, + bypass: propIsBypass + }; + } + } + return null; + }; + if (type2.number) { + var units; + var implicitUnits = "px"; + if (type2.units) { + units = type2.units; + } + if (type2.implicitUnits) { + implicitUnits = type2.implicitUnits; + } + if (!type2.unitless) { + if (valueIsString) { + var unitsRegex = "px|em" + (type2.allowPercent ? "|\\%" : ""); + if (units) { + unitsRegex = units; + } + var match2 = value2.match("^(" + number2 + ")(" + unitsRegex + ")?$"); + if (match2) { + value2 = match2[1]; + units = match2[2] || implicitUnits; + } + } else if (!units || type2.implicitUnits) { + units = implicitUnits; + } + } + value2 = parseFloat(value2); + if (isNaN(value2) && type2.enums === void 0) { + return null; + } + if (isNaN(value2) && type2.enums !== void 0) { + value2 = passedValue; + return checkEnums(); + } + if (type2.integer && !integer(value2)) { + return null; + } + if (type2.min !== void 0 && (value2 < type2.min || type2.strictMin && value2 === type2.min) || type2.max !== void 0 && (value2 > type2.max || type2.strictMax && value2 === type2.max)) { + return null; + } + var ret = { + name: name2, + value: value2, + strValue: "" + value2 + (units ? units : ""), + units, + bypass: propIsBypass + }; + if (type2.unitless || units !== "px" && units !== "em") { + ret.pfValue = value2; + } else { + ret.pfValue = units === "px" || !units ? value2 : this.getEmSizeInPixels() * value2; + } + if (units === "ms" || units === "s") { + ret.pfValue = units === "ms" ? value2 : 1e3 * value2; + } + if (units === "deg" || units === "rad") { + ret.pfValue = units === "rad" ? value2 : deg2rad(value2); + } + if (units === "%") { + ret.pfValue = value2 / 100; + } + return ret; + } else if (type2.propList) { + var props = []; + var propsStr = "" + value2; + if (propsStr === "none") + ; + else { + var propsSplit = propsStr.split(/\s*,\s*|\s+/); + for (var _i2 = 0; _i2 < propsSplit.length; _i2++) { + var propName = propsSplit[_i2].trim(); + if (self2.properties[propName]) { + props.push(propName); + } else { + warn("`" + propName + "` is not a valid property name"); + } + } + if (props.length === 0) { + return null; + } + } + return { + name: name2, + value: props, + strValue: props.length === 0 ? "none" : props.join(" "), + bypass: propIsBypass + }; + } else if (type2.color) { + var tuple = color2tuple(value2); + if (!tuple) { + return null; + } + return { + name: name2, + value: tuple, + pfValue: tuple, + strValue: "rgb(" + tuple[0] + "," + tuple[1] + "," + tuple[2] + ")", + // n.b. no spaces b/c of multiple support + bypass: propIsBypass + }; + } else if (type2.regex || type2.regexes) { + if (type2.enums) { + var enumProp = checkEnums(); + if (enumProp) { + return enumProp; + } + } + var regexes = type2.regexes ? type2.regexes : [type2.regex]; + for (var _i3 = 0; _i3 < regexes.length; _i3++) { + var regex = new RegExp(regexes[_i3]); + var m = regex.exec(value2); + if (m) { + return { + name: name2, + value: type2.singleRegexMatchValue ? m[1] : m, + strValue: "" + value2, + bypass: propIsBypass + }; + } + } + return null; + } else if (type2.string) { + return { + name: name2, + value: "" + value2, + strValue: "" + value2, + bypass: propIsBypass + }; + } else if (type2.enums) { + return checkEnums(); + } else { + return null; + } + }; + var Style = function Style2(cy) { + if (!(this instanceof Style2)) { + return new Style2(cy); + } + if (!core2(cy)) { + error("A style must have a core reference"); + return; + } + this._private = { + cy, + coreStyle: {} + }; + this.length = 0; + this.resetToDefault(); + }; + var styfn = Style.prototype; + styfn.instanceString = function() { + return "style"; + }; + styfn.clear = function() { + var _p = this._private; + var cy = _p.cy; + var eles = cy.elements(); + for (var i3 = 0; i3 < this.length; i3++) { + this[i3] = void 0; + } + this.length = 0; + _p.contextStyles = {}; + _p.propDiffs = {}; + this.cleanElements(eles, true); + eles.forEach(function(ele) { + var ele_p = ele[0]._private; + ele_p.styleDirty = true; + ele_p.appliedInitStyle = false; + }); + return this; + }; + styfn.resetToDefault = function() { + this.clear(); + this.addDefaultStylesheet(); + return this; + }; + styfn.core = function(propName) { + return this._private.coreStyle[propName] || this.getDefaultProperty(propName); + }; + styfn.selector = function(selectorStr) { + var selector2 = selectorStr === "core" ? null : new Selector(selectorStr); + var i3 = this.length++; + this[i3] = { + selector: selector2, + properties: [], + mappedProperties: [], + index: i3 + }; + return this; + }; + styfn.css = function() { + var self2 = this; + var args = arguments; + if (args.length === 1) { + var map2 = args[0]; + for (var i3 = 0; i3 < self2.properties.length; i3++) { + var prop = self2.properties[i3]; + var mapVal = map2[prop.name]; + if (mapVal === void 0) { + mapVal = map2[dash2camel(prop.name)]; + } + if (mapVal !== void 0) { + this.cssRule(prop.name, mapVal); + } + } + } else if (args.length === 2) { + this.cssRule(args[0], args[1]); + } + return this; + }; + styfn.style = styfn.css; + styfn.cssRule = function(name2, value2) { + var property2 = this.parse(name2, value2); + if (property2) { + var i3 = this.length - 1; + this[i3].properties.push(property2); + this[i3].properties[property2.name] = property2; + if (property2.name.match(/pie-(\d+)-background-size/) && property2.value) { + this._private.hasPie = true; + } + if (property2.mapped) { + this[i3].mappedProperties.push(property2); + } + var currentSelectorIsCore = !this[i3].selector; + if (currentSelectorIsCore) { + this._private.coreStyle[property2.name] = property2; + } + } + return this; + }; + styfn.append = function(style) { + if (stylesheet(style)) { + style.appendToStyle(this); + } else if (array2(style)) { + this.appendFromJson(style); + } else if (string2(style)) { + this.appendFromString(style); + } + return this; + }; + Style.fromJson = function(cy, json2) { + var style = new Style(cy); + style.fromJson(json2); + return style; + }; + Style.fromString = function(cy, string3) { + return new Style(cy).fromString(string3); + }; + [styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function(props) { + extend2(styfn, props); + }); + Style.types = styfn.types; + Style.properties = styfn.properties; + Style.propertyGroups = styfn.propertyGroups; + Style.propertyGroupNames = styfn.propertyGroupNames; + Style.propertyGroupKeys = styfn.propertyGroupKeys; + var corefn$2 = { + style: function style(newStyle) { + if (newStyle) { + var s = this.setStyle(newStyle); + s.update(); + } + return this._private.style; + }, + setStyle: function setStyle2(style) { + var _p = this._private; + if (stylesheet(style)) { + _p.style = style.generateStyle(this); + } else if (array2(style)) { + _p.style = Style.fromJson(this, style); + } else if (string2(style)) { + _p.style = Style.fromString(this, style); + } else { + _p.style = Style(this); + } + return _p.style; + }, + // e.g. cy.data() changed => recalc ele mappers + updateStyle: function updateStyle() { + this.mutableElements().updateStyle(); + } + }; + var defaultSelectionType = "single"; + var corefn$1 = { + autolock: function autolock(bool2) { + if (bool2 !== void 0) { + this._private.autolock = bool2 ? true : false; + } else { + return this._private.autolock; + } + return this; + }, + autoungrabify: function autoungrabify(bool2) { + if (bool2 !== void 0) { + this._private.autoungrabify = bool2 ? true : false; + } else { + return this._private.autoungrabify; + } + return this; + }, + autounselectify: function autounselectify(bool2) { + if (bool2 !== void 0) { + this._private.autounselectify = bool2 ? true : false; + } else { + return this._private.autounselectify; + } + return this; + }, + selectionType: function selectionType(selType) { + var _p = this._private; + if (_p.selectionType == null) { + _p.selectionType = defaultSelectionType; + } + if (selType !== void 0) { + if (selType === "additive" || selType === "single") { + _p.selectionType = selType; + } + } else { + return _p.selectionType; + } + return this; + }, + panningEnabled: function panningEnabled(bool2) { + if (bool2 !== void 0) { + this._private.panningEnabled = bool2 ? true : false; + } else { + return this._private.panningEnabled; + } + return this; + }, + userPanningEnabled: function userPanningEnabled(bool2) { + if (bool2 !== void 0) { + this._private.userPanningEnabled = bool2 ? true : false; + } else { + return this._private.userPanningEnabled; + } + return this; + }, + zoomingEnabled: function zoomingEnabled(bool2) { + if (bool2 !== void 0) { + this._private.zoomingEnabled = bool2 ? true : false; + } else { + return this._private.zoomingEnabled; + } + return this; + }, + userZoomingEnabled: function userZoomingEnabled(bool2) { + if (bool2 !== void 0) { + this._private.userZoomingEnabled = bool2 ? true : false; + } else { + return this._private.userZoomingEnabled; + } + return this; + }, + boxSelectionEnabled: function boxSelectionEnabled(bool2) { + if (bool2 !== void 0) { + this._private.boxSelectionEnabled = bool2 ? true : false; + } else { + return this._private.boxSelectionEnabled; + } + return this; + }, + pan: function pan() { + var args = arguments; + var pan2 = this._private.pan; + var dim, val, dims, x2, y2; + switch (args.length) { + case 0: + return pan2; + case 1: + if (string2(args[0])) { + dim = args[0]; + return pan2[dim]; + } else if (plainObject(args[0])) { + if (!this._private.panningEnabled) { + return this; + } + dims = args[0]; + x2 = dims.x; + y2 = dims.y; + if (number$12(x2)) { + pan2.x = x2; + } + if (number$12(y2)) { + pan2.y = y2; + } + this.emit("pan viewport"); + } + break; + case 2: + if (!this._private.panningEnabled) { + return this; + } + dim = args[0]; + val = args[1]; + if ((dim === "x" || dim === "y") && number$12(val)) { + pan2[dim] = val; + } + this.emit("pan viewport"); + break; + } + this.notify("viewport"); + return this; + }, + panBy: function panBy(arg0, arg1) { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x2, y2; + if (!this._private.panningEnabled) { + return this; + } + switch (args.length) { + case 1: + if (plainObject(arg0)) { + dims = args[0]; + x2 = dims.x; + y2 = dims.y; + if (number$12(x2)) { + pan.x += x2; + } + if (number$12(y2)) { + pan.y += y2; + } + this.emit("pan viewport"); + } + break; + case 2: + dim = arg0; + val = arg1; + if ((dim === "x" || dim === "y") && number$12(val)) { + pan[dim] += val; + } + this.emit("pan viewport"); + break; + } + this.notify("viewport"); + return this; + }, + fit: function fit(elements2, padding2) { + var viewportState = this.getFitViewport(elements2, padding2); + if (viewportState) { + var _p = this._private; + _p.zoom = viewportState.zoom; + _p.pan = viewportState.pan; + this.emit("pan zoom viewport"); + this.notify("viewport"); + } + return this; + }, + getFitViewport: function getFitViewport(elements2, padding2) { + if (number$12(elements2) && padding2 === void 0) { + padding2 = elements2; + elements2 = void 0; + } + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return; + } + var bb; + if (string2(elements2)) { + var sel = elements2; + elements2 = this.$(sel); + } else if (boundingBox(elements2)) { + var bbe = elements2; + bb = { + x1: bbe.x1, + y1: bbe.y1, + x2: bbe.x2, + y2: bbe.y2 + }; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } else if (!elementOrCollection(elements2)) { + elements2 = this.mutableElements(); + } + if (elementOrCollection(elements2) && elements2.empty()) { + return; + } + bb = bb || elements2.boundingBox(); + var w2 = this.width(); + var h = this.height(); + var zoom; + padding2 = number$12(padding2) ? padding2 : 0; + if (!isNaN(w2) && !isNaN(h) && w2 > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) { + zoom = Math.min((w2 - 2 * padding2) / bb.w, (h - 2 * padding2) / bb.h); + zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom; + zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom; + var pan = { + // now pan to middle + x: (w2 - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return { + zoom, + pan + }; + } + return; + }, + zoomRange: function zoomRange(min3, max3) { + var _p = this._private; + if (max3 == null) { + var opts = min3; + min3 = opts.min; + max3 = opts.max; + } + if (number$12(min3) && number$12(max3) && min3 <= max3) { + _p.minZoom = min3; + _p.maxZoom = max3; + } else if (number$12(min3) && max3 === void 0 && min3 <= _p.maxZoom) { + _p.minZoom = min3; + } else if (number$12(max3) && min3 === void 0 && max3 >= _p.minZoom) { + _p.maxZoom = max3; + } + return this; + }, + minZoom: function minZoom(zoom) { + if (zoom === void 0) { + return this._private.minZoom; + } else { + return this.zoomRange({ + min: zoom + }); + } + }, + maxZoom: function maxZoom2(zoom) { + if (zoom === void 0) { + return this._private.maxZoom; + } else { + return this.zoomRange({ + max: zoom + }); + } + }, + getZoomedViewport: function getZoomedViewport(params) { + var _p = this._private; + var currentPan = _p.pan; + var currentZoom = _p.zoom; + var pos; + var zoom; + var bail = false; + if (!_p.zoomingEnabled) { + bail = true; + } + if (number$12(params)) { + zoom = params; + } else if (plainObject(params)) { + zoom = params.level; + if (params.position != null) { + pos = modelToRenderedPosition(params.position, currentZoom, currentPan); + } else if (params.renderedPosition != null) { + pos = params.renderedPosition; + } + if (pos != null && !_p.panningEnabled) { + bail = true; + } + } + zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom; + zoom = zoom < _p.minZoom ? _p.minZoom : zoom; + if (bail || !number$12(zoom) || zoom === currentZoom || pos != null && (!number$12(pos.x) || !number$12(pos.y))) { + return null; + } + if (pos != null) { + var pan1 = currentPan; + var zoom1 = currentZoom; + var zoom2 = zoom; + var pan2 = { + x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x, + y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y + }; + return { + zoomed: true, + panned: true, + zoom: zoom2, + pan: pan2 + }; + } else { + return { + zoomed: true, + panned: false, + zoom, + pan: currentPan + }; + } + }, + zoom: function zoom(params) { + if (params === void 0) { + return this._private.zoom; + } else { + var vp = this.getZoomedViewport(params); + var _p = this._private; + if (vp == null || !vp.zoomed) { + return this; + } + _p.zoom = vp.zoom; + if (vp.panned) { + _p.pan.x = vp.pan.x; + _p.pan.y = vp.pan.y; + } + this.emit("zoom" + (vp.panned ? " pan" : "") + " viewport"); + this.notify("viewport"); + return this; + } + }, + viewport: function viewport(opts) { + var _p = this._private; + var zoomDefd = true; + var panDefd = true; + var events = []; + var zoomFailed = false; + var panFailed = false; + if (!opts) { + return this; + } + if (!number$12(opts.zoom)) { + zoomDefd = false; + } + if (!plainObject(opts.pan)) { + panDefd = false; + } + if (!zoomDefd && !panDefd) { + return this; + } + if (zoomDefd) { + var z = opts.zoom; + if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) { + zoomFailed = true; + } else { + _p.zoom = z; + events.push("zoom"); + } + } + if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) { + var p2 = opts.pan; + if (number$12(p2.x)) { + _p.pan.x = p2.x; + panFailed = false; + } + if (number$12(p2.y)) { + _p.pan.y = p2.y; + panFailed = false; + } + if (!panFailed) { + events.push("pan"); + } + } + if (events.length > 0) { + events.push("viewport"); + this.emit(events.join(" ")); + this.notify("viewport"); + } + return this; + }, + center: function center2(elements2) { + var pan = this.getCenterPan(elements2); + if (pan) { + this._private.pan = pan; + this.emit("pan viewport"); + this.notify("viewport"); + } + return this; + }, + getCenterPan: function getCenterPan(elements2, zoom) { + if (!this._private.panningEnabled) { + return; + } + if (string2(elements2)) { + var selector2 = elements2; + elements2 = this.mutableElements().filter(selector2); + } else if (!elementOrCollection(elements2)) { + elements2 = this.mutableElements(); + } + if (elements2.length === 0) { + return; + } + var bb = elements2.boundingBox(); + var w2 = this.width(); + var h = this.height(); + zoom = zoom === void 0 ? this._private.zoom : zoom; + var pan = { + // middle + x: (w2 - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return pan; + }, + reset: function reset2() { + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return this; + } + this.viewport({ + pan: { + x: 0, + y: 0 + }, + zoom: 1 + }); + return this; + }, + invalidateSize: function invalidateSize() { + this._private.sizeCache = null; + }, + size: function size2() { + var _p = this._private; + var container = _p.container; + return _p.sizeCache = _p.sizeCache || (container ? function() { + var style = window$1.getComputedStyle(container); + var val = function val2(name2) { + return parseFloat(style.getPropertyValue(name2)); + }; + return { + width: container.clientWidth - val("padding-left") - val("padding-right"), + height: container.clientHeight - val("padding-top") - val("padding-bottom") + }; + }() : { + // fallback if no container (not 0 b/c can be used for dividing etc) + width: 1, + height: 1 + }); + }, + width: function width2() { + return this.size().width; + }, + height: function height() { + return this.size().height; + }, + extent: function extent() { + var pan = this._private.pan; + var zoom = this._private.zoom; + var rb = this.renderedExtent(); + var b = { + x1: (rb.x1 - pan.x) / zoom, + x2: (rb.x2 - pan.x) / zoom, + y1: (rb.y1 - pan.y) / zoom, + y2: (rb.y2 - pan.y) / zoom + }; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + return b; + }, + renderedExtent: function renderedExtent() { + var width2 = this.width(); + var height = this.height(); + return { + x1: 0, + y1: 0, + x2: width2, + y2: height, + w: width2, + h: height + }; + }, + multiClickDebounceTime: function multiClickDebounceTime(_int) { + if (_int) + this._private.multiClickDebounceTime = _int; + else + return this._private.multiClickDebounceTime; + return this; + } + }; + corefn$1.centre = corefn$1.center; + corefn$1.autolockNodes = corefn$1.autolock; + corefn$1.autoungrabifyNodes = corefn$1.autoungrabify; + var fn = { + data: define3.data({ + field: "data", + bindingEvent: "data", + allowBinding: true, + allowSetting: true, + settingEvent: "data", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + updateStyle: true + }), + removeData: define3.removeData({ + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: true, + updateStyle: true + }), + scratch: define3.data({ + field: "scratch", + bindingEvent: "scratch", + allowBinding: true, + allowSetting: true, + settingEvent: "scratch", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + updateStyle: true + }), + removeScratch: define3.removeData({ + field: "scratch", + event: "scratch", + triggerFnName: "trigger", + triggerEvent: true, + updateStyle: true + }) + }; + fn.attr = fn.data; + fn.removeAttr = fn.removeData; + var Core = function Core2(opts) { + var cy = this; + opts = extend2({}, opts); + var container = opts.container; + if (container && !htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + var reg = container ? container._cyreg : null; + reg = reg || {}; + if (reg && reg.cy) { + reg.cy.destroy(); + reg = {}; + } + var readies = reg.readies = reg.readies || []; + if (container) { + container._cyreg = reg; + } + reg.cy = cy; + var head2 = window$1 !== void 0 && container !== void 0 && !opts.headless; + var options2 = opts; + options2.layout = extend2({ + name: head2 ? "grid" : "null" + }, options2.layout); + options2.renderer = extend2({ + name: head2 ? "canvas" : "null" + }, options2.renderer); + var defVal = function defVal2(def, val, altVal) { + if (val !== void 0) { + return val; + } else if (altVal !== void 0) { + return altVal; + } else { + return def; + } + }; + var _p = this._private = { + container, + // html dom ele container + ready: false, + // whether ready has been triggered + options: options2, + // cached options + elements: new Collection(this), + // elements in the graph + listeners: [], + // list of listeners + aniEles: new Collection(this), + // elements being animated + data: options2.data || {}, + // data for the core + scratch: {}, + // scratch object for core + layout: null, + renderer: null, + destroyed: false, + // whether destroy was called + notificationsEnabled: true, + // whether notifications are sent to the renderer + minZoom: 1e-50, + maxZoom: 1e50, + zoomingEnabled: defVal(true, options2.zoomingEnabled), + userZoomingEnabled: defVal(true, options2.userZoomingEnabled), + panningEnabled: defVal(true, options2.panningEnabled), + userPanningEnabled: defVal(true, options2.userPanningEnabled), + boxSelectionEnabled: defVal(true, options2.boxSelectionEnabled), + autolock: defVal(false, options2.autolock, options2.autolockNodes), + autoungrabify: defVal(false, options2.autoungrabify, options2.autoungrabifyNodes), + autounselectify: defVal(false, options2.autounselectify), + styleEnabled: options2.styleEnabled === void 0 ? head2 : options2.styleEnabled, + zoom: number$12(options2.zoom) ? options2.zoom : 1, + pan: { + x: plainObject(options2.pan) && number$12(options2.pan.x) ? options2.pan.x : 0, + y: plainObject(options2.pan) && number$12(options2.pan.y) ? options2.pan.y : 0 + }, + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + hasCompoundNodes: false, + multiClickDebounceTime: defVal(250, options2.multiClickDebounceTime) + }; + this.createEmitter(); + this.selectionType(options2.selectionType); + this.zoomRange({ + min: options2.minZoom, + max: options2.maxZoom + }); + var loadExtData = function loadExtData2(extData, next2) { + var anyIsPromise = extData.some(promise); + if (anyIsPromise) { + return Promise$12.all(extData).then(next2); + } else { + next2(extData); + } + }; + if (_p.styleEnabled) { + cy.setStyle([]); + } + var rendererOptions = extend2({}, options2, options2.renderer); + cy.initRenderer(rendererOptions); + var setElesAndLayout = function setElesAndLayout2(elements2, onload, ondone) { + cy.notifications(false); + var oldEles = cy.mutableElements(); + if (oldEles.length > 0) { + oldEles.remove(); + } + if (elements2 != null) { + if (plainObject(elements2) || array2(elements2)) { + cy.add(elements2); + } + } + cy.one("layoutready", function(e) { + cy.notifications(true); + cy.emit(e); + cy.one("load", onload); + cy.emitAndNotify("load"); + }).one("layoutstop", function() { + cy.one("done", ondone); + cy.emit("done"); + }); + var layoutOpts = extend2({}, cy._private.options.layout); + layoutOpts.eles = cy.elements(); + cy.layout(layoutOpts).run(); + }; + loadExtData([options2.style, options2.elements], function(thens) { + var initStyle = thens[0]; + var initEles = thens[1]; + if (_p.styleEnabled) { + cy.style().append(initStyle); + } + setElesAndLayout(initEles, function() { + cy.startAnimationLoop(); + _p.ready = true; + if (fn$6(options2.ready)) { + cy.on("ready", options2.ready); + } + for (var i3 = 0; i3 < readies.length; i3++) { + var fn2 = readies[i3]; + cy.on("ready", fn2); + } + if (reg) { + reg.readies = []; + } + cy.emit("ready"); + }, options2.done); + }); + }; + var corefn = Core.prototype; + extend2(corefn, { + instanceString: function instanceString() { + return "core"; + }, + isReady: function isReady() { + return this._private.ready; + }, + destroyed: function destroyed() { + return this._private.destroyed; + }, + ready: function ready(fn2) { + if (this.isReady()) { + this.emitter().emit("ready", [], fn2); + } else { + this.on("ready", fn2); + } + return this; + }, + destroy: function destroy() { + var cy = this; + if (cy.destroyed()) + return; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + this.emit("destroy"); + cy._private.destroyed = true; + return cy; + }, + hasElementWithId: function hasElementWithId(id2) { + return this._private.elements.hasElementWithId(id2); + }, + getElementById: function getElementById2(id2) { + return this._private.elements.getElementById(id2); + }, + hasCompoundNodes: function hasCompoundNodes() { + return this._private.hasCompoundNodes; + }, + headless: function headless() { + return this._private.renderer.isHeadless(); + }, + styleEnabled: function styleEnabled() { + return this._private.styleEnabled; + }, + addToPool: function addToPool(eles) { + this._private.elements.merge(eles); + return this; + }, + removeFromPool: function removeFromPool(eles) { + this._private.elements.unmerge(eles); + return this; + }, + container: function container() { + return this._private.container || null; + }, + mount: function mount(container) { + if (container == null) { + return; + } + var cy = this; + var _p = cy._private; + var options2 = _p.options; + if (!htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + cy.stopAnimationLoop(); + cy.destroyRenderer(); + _p.container = container; + _p.styleEnabled = true; + cy.invalidateSize(); + cy.initRenderer(extend2({}, options2, options2.renderer, { + // allow custom renderer name to be re-used, otherwise use canvas + name: options2.renderer.name === "null" ? "canvas" : options2.renderer.name + })); + cy.startAnimationLoop(); + cy.style(options2.style); + cy.emit("mount"); + return cy; + }, + unmount: function unmount() { + var cy = this; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + cy.initRenderer({ + name: "null" + }); + cy.emit("unmount"); + return cy; + }, + options: function options2() { + return copy2(this._private.options); + }, + json: function json2(obj) { + var cy = this; + var _p = cy._private; + var eles = cy.mutableElements(); + var getFreshRef = function getFreshRef2(ele) { + return cy.getElementById(ele.id()); + }; + if (plainObject(obj)) { + cy.startBatch(); + if (obj.elements) { + var idInJson = {}; + var updateEles = function updateEles2(jsons, gr2) { + var toAdd = []; + var toMod = []; + for (var i4 = 0; i4 < jsons.length; i4++) { + var json4 = jsons[i4]; + if (!json4.data.id) { + warn("cy.json() cannot handle elements without an ID attribute"); + continue; + } + var id2 = "" + json4.data.id; + var ele = cy.getElementById(id2); + idInJson[id2] = true; + if (ele.length !== 0) { + toMod.push({ + ele, + json: json4 + }); + } else { + if (gr2) { + json4.group = gr2; + toAdd.push(json4); + } else { + toAdd.push(json4); + } + } + } + cy.add(toAdd); + for (var _i = 0; _i < toMod.length; _i++) { + var _toMod$_i = toMod[_i], _ele = _toMod$_i.ele, _json = _toMod$_i.json; + _ele.json(_json); + } + }; + if (array2(obj.elements)) { + updateEles(obj.elements); + } else { + var grs = ["nodes", "edges"]; + for (var i3 = 0; i3 < grs.length; i3++) { + var gr = grs[i3]; + var elements2 = obj.elements[gr]; + if (array2(elements2)) { + updateEles(elements2, gr); + } + } + } + var parentsToRemove = cy.collection(); + eles.filter(function(ele) { + return !idInJson[ele.id()]; + }).forEach(function(ele) { + if (ele.isParent()) { + parentsToRemove.merge(ele); + } else { + ele.remove(); + } + }); + parentsToRemove.forEach(function(ele) { + return ele.children().move({ + parent: null + }); + }); + parentsToRemove.forEach(function(ele) { + return getFreshRef(ele).remove(); + }); + } + if (obj.style) { + cy.style(obj.style); + } + if (obj.zoom != null && obj.zoom !== _p.zoom) { + cy.zoom(obj.zoom); + } + if (obj.pan) { + if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) { + cy.pan(obj.pan); + } + } + if (obj.data) { + cy.data(obj.data); + } + var fields = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"]; + for (var _i2 = 0; _i2 < fields.length; _i2++) { + var f2 = fields[_i2]; + if (obj[f2] != null) { + cy[f2](obj[f2]); + } + } + cy.endBatch(); + return this; + } else { + var flat = !!obj; + var json3 = {}; + if (flat) { + json3.elements = this.elements().map(function(ele) { + return ele.json(); + }); + } else { + json3.elements = {}; + eles.forEach(function(ele) { + var group = ele.group(); + if (!json3.elements[group]) { + json3.elements[group] = []; + } + json3.elements[group].push(ele.json()); + }); + } + if (this._private.styleEnabled) { + json3.style = cy.style().json(); + } + json3.data = copy2(cy.data()); + var options2 = _p.options; + json3.zoomingEnabled = _p.zoomingEnabled; + json3.userZoomingEnabled = _p.userZoomingEnabled; + json3.zoom = _p.zoom; + json3.minZoom = _p.minZoom; + json3.maxZoom = _p.maxZoom; + json3.panningEnabled = _p.panningEnabled; + json3.userPanningEnabled = _p.userPanningEnabled; + json3.pan = copy2(_p.pan); + json3.boxSelectionEnabled = _p.boxSelectionEnabled; + json3.renderer = copy2(options2.renderer); + json3.hideEdgesOnViewport = options2.hideEdgesOnViewport; + json3.textureOnViewport = options2.textureOnViewport; + json3.wheelSensitivity = options2.wheelSensitivity; + json3.motionBlur = options2.motionBlur; + json3.multiClickDebounceTime = options2.multiClickDebounceTime; + return json3; + } + } + }); + corefn.$id = corefn.getElementById; + [corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function(props) { + extend2(corefn, props); + }); + var defaults$7 = { + fit: true, + // whether to fit the viewport to the graph + directed: false, + // whether the tree is directed downwards (or edges can point in any direction if false) + padding: 30, + // padding on fit + circle: false, + // put depths in concentric circles if true, put depths top down if false + grid: false, + // whether to create an even grid into which the DAG is placed (circle:false only) + spacingFactor: 1.75, + // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + roots: void 0, + // the roots of the trees + maximal: false, + // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only) + depthSort: void 0, + // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled, + animateFilter: function animateFilter(node2, i3) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node2, position3) { + return position3; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + var getInfo2 = function getInfo3(ele) { + return ele.scratch("breadthfirst"); + }; + var setInfo2 = function setInfo3(ele, obj) { + return ele.scratch("breadthfirst", obj); + }; + function BreadthFirstLayout(options2) { + this.options = extend2({}, defaults$7, options2); + } + BreadthFirstLayout.prototype.run = function() { + var params = this.options; + var options2 = params; + var cy = params.cy; + var eles = options2.eles; + var nodes2 = eles.nodes().filter(function(n2) { + return !n2.isParent(); + }); + var graph = eles; + var directed = options2.directed; + var maximal = options2.maximal || options2.maximalAdjustments > 0; + var bb = makeBoundingBox(options2.boundingBox ? options2.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var roots; + if (elementOrCollection(options2.roots)) { + roots = options2.roots; + } else if (array2(options2.roots)) { + var rootsArray = []; + for (var i3 = 0; i3 < options2.roots.length; i3++) { + var id2 = options2.roots[i3]; + var ele = cy.getElementById(id2); + rootsArray.push(ele); + } + roots = cy.collection(rootsArray); + } else if (string2(options2.roots)) { + roots = cy.$(options2.roots); + } else { + if (directed) { + roots = nodes2.roots(); + } else { + var components = eles.components(); + roots = cy.collection(); + var _loop = function _loop2(_i3) { + var comp = components[_i3]; + var maxDegree = comp.maxDegree(false); + var compRoots = comp.filter(function(ele2) { + return ele2.degree(false) === maxDegree; + }); + roots = roots.add(compRoots); + }; + for (var _i = 0; _i < components.length; _i++) { + _loop(_i); + } + } + } + var depths = []; + var foundByBfs = {}; + var addToDepth = function addToDepth2(ele2, d) { + if (depths[d] == null) { + depths[d] = []; + } + var i4 = depths[d].length; + depths[d].push(ele2); + setInfo2(ele2, { + index: i4, + depth: d + }); + }; + var changeDepth = function changeDepth2(ele2, newDepth) { + var _getInfo = getInfo2(ele2), depth = _getInfo.depth, index2 = _getInfo.index; + depths[depth][index2] = null; + addToDepth(ele2, newDepth); + }; + graph.bfs({ + roots, + directed: options2.directed, + visit: function visit(node2, edge, pNode, i4, depth) { + var ele2 = node2[0]; + var id3 = ele2.id(); + addToDepth(ele2, depth); + foundByBfs[id3] = true; + } + }); + var orphanNodes = []; + for (var _i2 = 0; _i2 < nodes2.length; _i2++) { + var _ele = nodes2[_i2]; + if (foundByBfs[_ele.id()]) { + continue; + } else { + orphanNodes.push(_ele); + } + } + var assignDepthsAt = function assignDepthsAt2(i4) { + var eles2 = depths[i4]; + for (var j = 0; j < eles2.length; j++) { + var _ele2 = eles2[j]; + if (_ele2 == null) { + eles2.splice(j, 1); + j--; + continue; + } + setInfo2(_ele2, { + depth: i4, + index: j + }); + } + }; + var assignDepths = function assignDepths2() { + for (var _i3 = 0; _i3 < depths.length; _i3++) { + assignDepthsAt(_i3); + } + }; + var adjustMaximally = function adjustMaximally2(ele2, shifted2) { + var eInfo = getInfo2(ele2); + var incomers = ele2.incomers().filter(function(el) { + return el.isNode() && eles.has(el); + }); + var maxDepth = -1; + var id3 = ele2.id(); + for (var k = 0; k < incomers.length; k++) { + var incmr = incomers[k]; + var iInfo = getInfo2(incmr); + maxDepth = Math.max(maxDepth, iInfo.depth); + } + if (eInfo.depth <= maxDepth) { + if (shifted2[id3]) { + return null; + } + changeDepth(ele2, maxDepth + 1); + shifted2[id3] = true; + return true; + } + return false; + }; + if (directed && maximal) { + var Q = []; + var shifted = {}; + var enqueue = function enqueue2(n2) { + return Q.push(n2); + }; + var dequeue = function dequeue2() { + return Q.shift(); + }; + nodes2.forEach(function(n2) { + return Q.push(n2); + }); + while (Q.length > 0) { + var _ele3 = dequeue(); + var didShift = adjustMaximally(_ele3, shifted); + if (didShift) { + _ele3.outgoers().filter(function(el) { + return el.isNode() && eles.has(el); + }).forEach(enqueue); + } else if (didShift === null) { + warn("Detected double maximal shift for node `" + _ele3.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); + break; + } + } + } + assignDepths(); + var minDistance = 0; + if (options2.avoidOverlap) { + for (var _i4 = 0; _i4 < nodes2.length; _i4++) { + var n = nodes2[_i4]; + var nbb = n.layoutDimensions(options2); + var w2 = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w2, h); + } + } + var cachedWeightedPercent = {}; + var getWeightedPercent = function getWeightedPercent2(ele2) { + if (cachedWeightedPercent[ele2.id()]) { + return cachedWeightedPercent[ele2.id()]; + } + var eleDepth = getInfo2(ele2).depth; + var neighbors = ele2.neighborhood(); + var percent = 0; + var samples = 0; + for (var _i5 = 0; _i5 < neighbors.length; _i5++) { + var neighbor = neighbors[_i5]; + if (neighbor.isEdge() || neighbor.isParent() || !nodes2.has(neighbor)) { + continue; + } + var bf = getInfo2(neighbor); + if (bf == null) { + continue; + } + var index2 = bf.index; + var depth = bf.depth; + if (index2 == null || depth == null) { + continue; + } + var nDepth = depths[depth].length; + if (depth < eleDepth) { + percent += index2 / nDepth; + samples++; + } + } + samples = Math.max(1, samples); + percent = percent / samples; + if (samples === 0) { + percent = 0; + } + cachedWeightedPercent[ele2.id()] = percent; + return percent; + }; + var sortFn = function sortFn2(a, b) { + var apct = getWeightedPercent(a); + var bpct = getWeightedPercent(b); + var diff = apct - bpct; + if (diff === 0) { + return ascending2(a.id(), b.id()); + } else { + return diff; + } + }; + if (options2.depthSort !== void 0) { + sortFn = options2.depthSort; + } + for (var _i6 = 0; _i6 < depths.length; _i6++) { + depths[_i6].sort(sortFn); + assignDepthsAt(_i6); + } + var orphanDepth = []; + for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) { + orphanDepth.push(orphanNodes[_i7]); + } + depths.unshift(orphanDepth); + assignDepths(); + var biggestDepthSize = 0; + for (var _i8 = 0; _i8 < depths.length; _i8++) { + biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize); + } + var center2 = { + x: bb.x1 + bb.w / 2, + y: bb.x1 + bb.h / 2 + }; + var maxDepthSize = depths.reduce(function(max3, eles2) { + return Math.max(max3, eles2.length); + }, 0); + var getPosition = function getPosition2(ele2) { + var _getInfo2 = getInfo2(ele2), depth = _getInfo2.depth, index2 = _getInfo2.index; + var depthSize = depths[depth].length; + var distanceX = Math.max(bb.w / ((options2.grid ? maxDepthSize : depthSize) + 1), minDistance); + var distanceY = Math.max(bb.h / (depths.length + 1), minDistance); + var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length); + radiusStepSize = Math.max(radiusStepSize, minDistance); + if (!options2.circle) { + var epos = { + x: center2.x + (index2 + 1 - (depthSize + 1) / 2) * distanceX, + y: (depth + 1) * distanceY + }; + return epos; + } else { + var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0); + var theta = 2 * Math.PI / depths[depth].length * index2; + if (depth === 0 && depths[0].length === 1) { + radius = 1; + } + return { + x: center2.x + radius * Math.cos(theta), + y: center2.y + radius * Math.sin(theta) + }; + } + }; + eles.nodes().layoutPositions(this, options2, getPosition); + return this; + }; + var defaults$6 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox and radius if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + radius: void 0, + // the radius of the circle + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: void 0, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + sort: void 0, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node2, i3) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node2, position3) { + return position3; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function CircleLayout(options2) { + this.options = extend2({}, defaults$6, options2); + } + CircleLayout.prototype.run = function() { + var params = this.options; + var options2 = params; + var cy = params.cy; + var eles = options2.eles; + var clockwise = options2.counterclockwise !== void 0 ? !options2.counterclockwise : options2.clockwise; + var nodes2 = eles.nodes().not(":parent"); + if (options2.sort) { + nodes2 = nodes2.sort(options2.sort); + } + var bb = makeBoundingBox(options2.boundingBox ? options2.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center2 = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var sweep = options2.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / nodes2.length : options2.sweep; + var dTheta = sweep / Math.max(1, nodes2.length - 1); + var r; + var minDistance = 0; + for (var i3 = 0; i3 < nodes2.length; i3++) { + var n = nodes2[i3]; + var nbb = n.layoutDimensions(options2); + var w2 = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w2, h); + } + if (number$12(options2.radius)) { + r = options2.radius; + } else if (nodes2.length <= 1) { + r = 0; + } else { + r = Math.min(bb.h, bb.w) / 2 - minDistance; + } + if (nodes2.length > 1 && options2.avoidOverlap) { + minDistance *= 1.75; + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); + r = Math.max(rMin, r); + } + var getPos = function getPos2(ele, i4) { + var theta = options2.startAngle + i4 * dTheta * (clockwise ? 1 : -1); + var rx = r * Math.cos(theta); + var ry = r * Math.sin(theta); + var pos = { + x: center2.x + rx, + y: center2.y + ry + }; + return pos; + }; + eles.nodes().layoutPositions(this, options2, getPos); + return this; + }; + var defaults$5 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: void 0, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + equidistant: false, + // whether levels have an equal radial distance betwen them, may cause bounding box overflow + minNodeSpacing: 10, + // min spacing between outside of nodes (used for radius adjustment) + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + height: void 0, + // height of layout area (overrides container height) + width: void 0, + // width of layout area (overrides container width) + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + concentric: function concentric(node2) { + return node2.degree(); + }, + levelWidth: function levelWidth(nodes2) { + return nodes2.maxDegree() / 4; + }, + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node2, i3) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node2, position3) { + return position3; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function ConcentricLayout(options2) { + this.options = extend2({}, defaults$5, options2); + } + ConcentricLayout.prototype.run = function() { + var params = this.options; + var options2 = params; + var clockwise = options2.counterclockwise !== void 0 ? !options2.counterclockwise : options2.clockwise; + var cy = params.cy; + var eles = options2.eles; + var nodes2 = eles.nodes().not(":parent"); + var bb = makeBoundingBox(options2.boundingBox ? options2.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center2 = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var nodeValues = []; + var maxNodeSize = 0; + for (var i3 = 0; i3 < nodes2.length; i3++) { + var node2 = nodes2[i3]; + var value2 = void 0; + value2 = options2.concentric(node2); + nodeValues.push({ + value: value2, + node: node2 + }); + node2._private.scratch.concentric = value2; + } + nodes2.updateStyle(); + for (var _i = 0; _i < nodes2.length; _i++) { + var _node = nodes2[_i]; + var nbb = _node.layoutDimensions(options2); + maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h); + } + nodeValues.sort(function(a, b) { + return b.value - a.value; + }); + var levelWidth = options2.levelWidth(nodes2); + var levels = [[]]; + var currentLevel = levels[0]; + for (var _i2 = 0; _i2 < nodeValues.length; _i2++) { + var val = nodeValues[_i2]; + if (currentLevel.length > 0) { + var diff = Math.abs(currentLevel[0].value - val.value); + if (diff >= levelWidth) { + currentLevel = []; + levels.push(currentLevel); + } + } + currentLevel.push(val); + } + var minDist = maxNodeSize + options2.minNodeSpacing; + if (!options2.avoidOverlap) { + var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1; + var maxR = Math.min(bb.w, bb.h) / 2 - minDist; + var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0); + minDist = Math.min(minDist, rStep); + } + var r = 0; + for (var _i3 = 0; _i3 < levels.length; _i3++) { + var level = levels[_i3]; + var sweep = options2.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / level.length : options2.sweep; + var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1); + if (level.length > 1 && options2.avoidOverlap) { + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); + r = Math.max(rMin, r); + } + level.r = r; + r += minDist; + } + if (options2.equidistant) { + var rDeltaMax = 0; + var _r = 0; + for (var _i4 = 0; _i4 < levels.length; _i4++) { + var _level = levels[_i4]; + var rDelta = _level.r - _r; + rDeltaMax = Math.max(rDeltaMax, rDelta); + } + _r = 0; + for (var _i5 = 0; _i5 < levels.length; _i5++) { + var _level2 = levels[_i5]; + if (_i5 === 0) { + _r = _level2.r; + } + _level2.r = _r; + _r += rDeltaMax; + } + } + var pos = {}; + for (var _i6 = 0; _i6 < levels.length; _i6++) { + var _level3 = levels[_i6]; + var _dTheta = _level3.dTheta; + var _r2 = _level3.r; + for (var j = 0; j < _level3.length; j++) { + var _val = _level3[j]; + var theta = options2.startAngle + (clockwise ? 1 : -1) * _dTheta * j; + var p2 = { + x: center2.x + _r2 * Math.cos(theta), + y: center2.y + _r2 * Math.sin(theta) + }; + pos[_val.node.id()] = p2; + } + } + eles.nodes().layoutPositions(this, options2, function(ele) { + var id2 = ele.id(); + return pos[id2]; + }); + return this; + }; + var DEBUG; + var defaults$4 = { + // Called on `layoutready` + ready: function ready() { + }, + // Called on `layoutstop` + stop: function stop() { + }, + // Whether to animate while running the layout + // true : Animate continuously as the layout is running + // false : Just show the end result + // 'end' : Animate with the end result, from the initial positions to the end positions + animate: true, + // Easing of the animation for animate:'end' + animationEasing: void 0, + // The duration of the animation for animate:'end' + animationDuration: void 0, + // A function that determines whether the node should be animated + // All nodes animated by default on animate enabled + // Non-animated nodes are positioned immediately when the layout starts + animateFilter: function animateFilter(node2, i3) { + return true; + }, + // The layout animates only after this many milliseconds for animate:true + // (prevents flashing on fast runs) + animationThreshold: 250, + // Number of iterations between consecutive screen positions update + refresh: 20, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 30, + // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + boundingBox: void 0, + // Excludes the label when calculating node bounding boxes for the layout algorithm + nodeDimensionsIncludeLabels: false, + // Randomize the initial positions of the nodes (true) or use existing positions (false) + randomize: false, + // Extra spacing between components in non-compound graphs + componentSpacing: 40, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: function nodeRepulsion2(node2) { + return 2048; + }, + // Node repulsion (overlapping) multiplier + nodeOverlap: 4, + // Ideal edge (non nested) length + idealEdgeLength: function idealEdgeLength(edge) { + return 32; + }, + // Divisor to compute edge forces + edgeElasticity: function edgeElasticity(edge) { + return 32; + }, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 1.2, + // Gravity force (constant) + gravity: 1, + // Maximum number of iterations to perform + numIter: 1e3, + // Initial temperature (maximum node displacement) + initialTemp: 1e3, + // Cooling factor (how the temperature is reduced between consecutive iterations + coolingFactor: 0.99, + // Lower temperature threshold (below this point the layout will end) + minTemp: 1 + }; + function CoseLayout(options2) { + this.options = extend2({}, defaults$4, options2); + this.options.layout = this; + } + CoseLayout.prototype.run = function() { + var options2 = this.options; + var cy = options2.cy; + var layout3 = this; + layout3.stopped = false; + if (options2.animate === true || options2.animate === false) { + layout3.emit({ + type: "layoutstart", + layout: layout3 + }); + } + if (true === options2.debug) { + DEBUG = true; + } else { + DEBUG = false; + } + var layoutInfo = createLayoutInfo(cy, layout3, options2); + if (DEBUG) { + printLayoutInfo(layoutInfo); + } + if (options2.randomize) { + randomizePositions(layoutInfo); + } + var startTime = performanceNow(); + var refresh = function refresh2() { + refreshPositions(layoutInfo, cy, options2); + if (true === options2.fit) { + cy.fit(options2.padding); + } + }; + var mainLoop = function mainLoop2(i4) { + if (layout3.stopped || i4 >= options2.numIter) { + return false; + } + step(layoutInfo, options2); + layoutInfo.temperature = layoutInfo.temperature * options2.coolingFactor; + if (layoutInfo.temperature < options2.minTemp) { + return false; + } + return true; + }; + var done = function done2() { + if (options2.animate === true || options2.animate === false) { + refresh(); + layout3.one("layoutstop", options2.stop); + layout3.emit({ + type: "layoutstop", + layout: layout3 + }); + } else { + var nodes2 = options2.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options2, nodes2); + nodes2.layoutPositions(layout3, options2, getScaledPos); + } + }; + var i3 = 0; + var loopRet = true; + if (options2.animate === true) { + var frame2 = function frame3() { + var f2 = 0; + while (loopRet && f2 < options2.refresh) { + loopRet = mainLoop(i3); + i3++; + f2++; + } + if (!loopRet) { + separateComponents(layoutInfo, options2); + done(); + } else { + var now3 = performanceNow(); + if (now3 - startTime >= options2.animationThreshold) { + refresh(); + } + requestAnimationFrame2(frame3); + } + }; + frame2(); + } else { + while (loopRet) { + loopRet = mainLoop(i3); + i3++; + } + separateComponents(layoutInfo, options2); + done(); + } + return this; + }; + CoseLayout.prototype.stop = function() { + this.stopped = true; + if (this.thread) { + this.thread.stop(); + } + this.emit("layoutstop"); + return this; + }; + CoseLayout.prototype.destroy = function() { + if (this.thread) { + this.thread.stop(); + } + return this; + }; + var createLayoutInfo = function createLayoutInfo2(cy, layout3, options2) { + var edges2 = options2.eles.edges(); + var nodes2 = options2.eles.nodes(); + var layoutInfo = { + isCompound: cy.hasCompoundNodes(), + layoutNodes: [], + idToIndex: {}, + nodeSize: nodes2.size(), + graphSet: [], + indexToGraph: [], + layoutEdges: [], + edgeSize: edges2.size(), + temperature: options2.initialTemp, + clientWidth: cy.width(), + clientHeight: cy.width(), + boundingBox: makeBoundingBox(options2.boundingBox ? options2.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }) + }; + var components = options2.eles.components(); + var id2cmptId = {}; + for (var i3 = 0; i3 < components.length; i3++) { + var component = components[i3]; + for (var j = 0; j < component.length; j++) { + var node2 = component[j]; + id2cmptId[node2.id()] = i3; + } + } + for (var i3 = 0; i3 < layoutInfo.nodeSize; i3++) { + var n = nodes2[i3]; + var nbb = n.layoutDimensions(options2); + var tempNode = {}; + tempNode.isLocked = n.locked(); + tempNode.id = n.data("id"); + tempNode.parentId = n.data("parent"); + tempNode.cmptId = id2cmptId[n.id()]; + tempNode.children = []; + tempNode.positionX = n.position("x"); + tempNode.positionY = n.position("y"); + tempNode.offsetX = 0; + tempNode.offsetY = 0; + tempNode.height = nbb.w; + tempNode.width = nbb.h; + tempNode.maxX = tempNode.positionX + tempNode.width / 2; + tempNode.minX = tempNode.positionX - tempNode.width / 2; + tempNode.maxY = tempNode.positionY + tempNode.height / 2; + tempNode.minY = tempNode.positionY - tempNode.height / 2; + tempNode.padLeft = parseFloat(n.style("padding")); + tempNode.padRight = parseFloat(n.style("padding")); + tempNode.padTop = parseFloat(n.style("padding")); + tempNode.padBottom = parseFloat(n.style("padding")); + tempNode.nodeRepulsion = fn$6(options2.nodeRepulsion) ? options2.nodeRepulsion(n) : options2.nodeRepulsion; + layoutInfo.layoutNodes.push(tempNode); + layoutInfo.idToIndex[tempNode.id] = i3; + } + var queue = []; + var start2 = 0; + var end2 = -1; + var tempGraph = []; + for (var i3 = 0; i3 < layoutInfo.nodeSize; i3++) { + var n = layoutInfo.layoutNodes[i3]; + var p_id = n.parentId; + if (null != p_id) { + layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); + } else { + queue[++end2] = n.id; + tempGraph.push(n.id); + } + } + layoutInfo.graphSet.push(tempGraph); + while (start2 <= end2) { + var node_id = queue[start2++]; + var node_ix = layoutInfo.idToIndex[node_id]; + var node2 = layoutInfo.layoutNodes[node_ix]; + var children2 = node2.children; + if (children2.length > 0) { + layoutInfo.graphSet.push(children2); + for (var i3 = 0; i3 < children2.length; i3++) { + queue[++end2] = children2[i3]; + } + } + } + for (var i3 = 0; i3 < layoutInfo.graphSet.length; i3++) { + var graph = layoutInfo.graphSet[i3]; + for (var j = 0; j < graph.length; j++) { + var index2 = layoutInfo.idToIndex[graph[j]]; + layoutInfo.indexToGraph[index2] = i3; + } + } + for (var i3 = 0; i3 < layoutInfo.edgeSize; i3++) { + var e = edges2[i3]; + var tempEdge = {}; + tempEdge.id = e.data("id"); + tempEdge.sourceId = e.data("source"); + tempEdge.targetId = e.data("target"); + var idealLength = fn$6(options2.idealEdgeLength) ? options2.idealEdgeLength(e) : options2.idealEdgeLength; + var elasticity = fn$6(options2.edgeElasticity) ? options2.edgeElasticity(e) : options2.edgeElasticity; + var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId]; + var targetIx = layoutInfo.idToIndex[tempEdge.targetId]; + var sourceGraph = layoutInfo.indexToGraph[sourceIx]; + var targetGraph = layoutInfo.indexToGraph[targetIx]; + if (sourceGraph != targetGraph) { + var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo); + var lcaGraph = layoutInfo.graphSet[lca]; + var depth = 0; + var tempNode = layoutInfo.layoutNodes[sourceIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + tempNode = layoutInfo.layoutNodes[targetIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + idealLength *= depth * options2.nestingFactor; + } + tempEdge.idealLength = idealLength; + tempEdge.elasticity = elasticity; + layoutInfo.layoutEdges.push(tempEdge); + } + return layoutInfo; + }; + var findLCA = function findLCA2(node1, node2, layoutInfo) { + var res = findLCA_aux(node1, node2, 0, layoutInfo); + if (2 > res.count) { + return 0; + } else { + return res.graph; + } + }; + var findLCA_aux = function findLCA_aux2(node1, node2, graphIx, layoutInfo) { + var graph = layoutInfo.graphSet[graphIx]; + if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) { + return { + count: 2, + graph: graphIx + }; + } + var c2 = 0; + for (var i3 = 0; i3 < graph.length; i3++) { + var nodeId = graph[i3]; + var nodeIx = layoutInfo.idToIndex[nodeId]; + var children2 = layoutInfo.layoutNodes[nodeIx].children; + if (0 === children2.length) { + continue; + } + var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children2[0]]]; + var result = findLCA_aux2(node1, node2, childGraphIx, layoutInfo); + if (0 === result.count) { + continue; + } else if (1 === result.count) { + c2++; + if (2 === c2) { + break; + } + } else { + return result; + } + } + return { + count: c2, + graph: graphIx + }; + }; + var printLayoutInfo; + var randomizePositions = function randomizePositions2(layoutInfo, cy) { + var width2 = layoutInfo.clientWidth; + var height = layoutInfo.clientHeight; + for (var i3 = 0; i3 < layoutInfo.nodeSize; i3++) { + var n = layoutInfo.layoutNodes[i3]; + if (0 === n.children.length && !n.isLocked) { + n.positionX = Math.random() * width2; + n.positionY = Math.random() * height; + } + } + }; + var getScaleInBoundsFn = function getScaleInBoundsFn2(layoutInfo, options2, nodes2) { + var bb = layoutInfo.boundingBox; + var coseBB = { + x1: Infinity, + x2: -Infinity, + y1: Infinity, + y2: -Infinity + }; + if (options2.boundingBox) { + nodes2.forEach(function(node2) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node2.data("id")]]; + coseBB.x1 = Math.min(coseBB.x1, lnode.positionX); + coseBB.x2 = Math.max(coseBB.x2, lnode.positionX); + coseBB.y1 = Math.min(coseBB.y1, lnode.positionY); + coseBB.y2 = Math.max(coseBB.y2, lnode.positionY); + }); + coseBB.w = coseBB.x2 - coseBB.x1; + coseBB.h = coseBB.y2 - coseBB.y1; + } + return function(ele, i3) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data("id")]]; + if (options2.boundingBox) { + var pctX = (lnode.positionX - coseBB.x1) / coseBB.w; + var pctY = (lnode.positionY - coseBB.y1) / coseBB.h; + return { + x: bb.x1 + pctX * bb.w, + y: bb.y1 + pctY * bb.h + }; + } else { + return { + x: lnode.positionX, + y: lnode.positionY + }; + } + }; + }; + var refreshPositions = function refreshPositions2(layoutInfo, cy, options2) { + var layout3 = options2.layout; + var nodes2 = options2.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options2, nodes2); + nodes2.positions(getScaledPos); + if (true !== layoutInfo.ready) { + layoutInfo.ready = true; + layout3.one("layoutready", options2.ready); + layout3.emit({ + type: "layoutready", + layout: this + }); + } + }; + var step = function step2(layoutInfo, options2, _step) { + calculateNodeForces(layoutInfo, options2); + calculateEdgeForces(layoutInfo); + calculateGravityForces(layoutInfo, options2); + propagateForces(layoutInfo); + updatePositions(layoutInfo); + }; + var calculateNodeForces = function calculateNodeForces2(layoutInfo, options2) { + for (var i3 = 0; i3 < layoutInfo.graphSet.length; i3++) { + var graph = layoutInfo.graphSet[i3]; + var numNodes = graph.length; + for (var j = 0; j < numNodes; j++) { + var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + for (var k = j + 1; k < numNodes; k++) { + var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]]; + nodeRepulsion(node1, node2, layoutInfo, options2); + } + } + } + }; + var randomDistance = function randomDistance2(max3) { + return -max3 + 2 * max3 * Math.random(); + }; + var nodeRepulsion = function nodeRepulsion2(node1, node2, layoutInfo, options2) { + var cmptId1 = node1.cmptId; + var cmptId2 = node2.cmptId; + if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) { + return; + } + var directionX = node2.positionX - node1.positionX; + var directionY = node2.positionY - node1.positionY; + var maxRandDist = 1; + if (0 === directionX && 0 === directionY) { + directionX = randomDistance(maxRandDist); + directionY = randomDistance(maxRandDist); + } + var overlap = nodesOverlap(node1, node2, directionX, directionY); + if (overlap > 0) { + var force = options2.nodeOverlap * overlap; + var distance2 = Math.sqrt(directionX * directionX + directionY * directionY); + var forceX = force * directionX / distance2; + var forceY = force * directionY / distance2; + } else { + var point1 = findClippingPoint(node1, directionX, directionY); + var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY); + var distanceX = point2.x - point1.x; + var distanceY = point2.y - point1.y; + var distanceSqr = distanceX * distanceX + distanceY * distanceY; + var distance2 = Math.sqrt(distanceSqr); + var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr; + var forceX = force * distanceX / distance2; + var forceY = force * distanceY / distance2; + } + if (!node1.isLocked) { + node1.offsetX -= forceX; + node1.offsetY -= forceY; + } + if (!node2.isLocked) { + node2.offsetX += forceX; + node2.offsetY += forceY; + } + return; + }; + var nodesOverlap = function nodesOverlap2(node1, node2, dX, dY) { + if (dX > 0) { + var overlapX = node1.maxX - node2.minX; + } else { + var overlapX = node2.maxX - node1.minX; + } + if (dY > 0) { + var overlapY = node1.maxY - node2.minY; + } else { + var overlapY = node2.maxY - node1.minY; + } + if (overlapX >= 0 && overlapY >= 0) { + return Math.sqrt(overlapX * overlapX + overlapY * overlapY); + } else { + return 0; + } + }; + var findClippingPoint = function findClippingPoint2(node2, dX, dY) { + var X = node2.positionX; + var Y = node2.positionY; + var H = node2.height || 1; + var W = node2.width || 1; + var dirSlope = dY / dX; + var nodeSlope = H / W; + var res = {}; + if (0 === dX && 0 < dY) { + res.x = X; + res.y = Y + H / 2; + return res; + } + if (0 === dX && 0 > dY) { + res.x = X; + res.y = Y + H / 2; + return res; + } + if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X + W / 2; + res.y = Y + W * dY / 2 / dX; + return res; + } + if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X - W / 2; + res.y = Y - W * dY / 2 / dX; + return res; + } + if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X + H * dX / 2 / dY; + res.y = Y + H / 2; + return res; + } + if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X - H * dX / 2 / dY; + res.y = Y - H / 2; + return res; + } + return res; + }; + var calculateEdgeForces = function calculateEdgeForces2(layoutInfo, options2) { + for (var i3 = 0; i3 < layoutInfo.edgeSize; i3++) { + var edge = layoutInfo.layoutEdges[i3]; + var sourceIx = layoutInfo.idToIndex[edge.sourceId]; + var source = layoutInfo.layoutNodes[sourceIx]; + var targetIx = layoutInfo.idToIndex[edge.targetId]; + var target = layoutInfo.layoutNodes[targetIx]; + var directionX = target.positionX - source.positionX; + var directionY = target.positionY - source.positionY; + if (0 === directionX && 0 === directionY) { + continue; + } + var point1 = findClippingPoint(source, directionX, directionY); + var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY); + var lx = point2.x - point1.x; + var ly = point2.y - point1.y; + var l = Math.sqrt(lx * lx + ly * ly); + var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity; + if (0 !== l) { + var forceX = force * lx / l; + var forceY = force * ly / l; + } else { + var forceX = 0; + var forceY = 0; + } + if (!source.isLocked) { + source.offsetX += forceX; + source.offsetY += forceY; + } + if (!target.isLocked) { + target.offsetX -= forceX; + target.offsetY -= forceY; + } + } + }; + var calculateGravityForces = function calculateGravityForces2(layoutInfo, options2) { + if (options2.gravity === 0) { + return; + } + var distThreshold = 1; + for (var i3 = 0; i3 < layoutInfo.graphSet.length; i3++) { + var graph = layoutInfo.graphSet[i3]; + var numNodes = graph.length; + if (0 === i3) { + var centerX = layoutInfo.clientHeight / 2; + var centerY = layoutInfo.clientWidth / 2; + } else { + var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]]; + var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]]; + var centerX = parent.positionX; + var centerY = parent.positionY; + } + for (var j = 0; j < numNodes; j++) { + var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + if (node2.isLocked) { + continue; + } + var dx = centerX - node2.positionX; + var dy = centerY - node2.positionY; + var d = Math.sqrt(dx * dx + dy * dy); + if (d > distThreshold) { + var fx = options2.gravity * dx / d; + var fy = options2.gravity * dy / d; + node2.offsetX += fx; + node2.offsetY += fy; + } + } + } + }; + var propagateForces = function propagateForces2(layoutInfo, options2) { + var queue = []; + var start2 = 0; + var end2 = -1; + queue.push.apply(queue, layoutInfo.graphSet[0]); + end2 += layoutInfo.graphSet[0].length; + while (start2 <= end2) { + var nodeId = queue[start2++]; + var nodeIndex = layoutInfo.idToIndex[nodeId]; + var node2 = layoutInfo.layoutNodes[nodeIndex]; + var children2 = node2.children; + if (0 < children2.length && !node2.isLocked) { + var offX = node2.offsetX; + var offY = node2.offsetY; + for (var i3 = 0; i3 < children2.length; i3++) { + var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children2[i3]]]; + childNode.offsetX += offX; + childNode.offsetY += offY; + queue[++end2] = children2[i3]; + } + node2.offsetX = 0; + node2.offsetY = 0; + } + } + }; + var updatePositions = function updatePositions2(layoutInfo, options2) { + for (var i3 = 0; i3 < layoutInfo.nodeSize; i3++) { + var n = layoutInfo.layoutNodes[i3]; + if (0 < n.children.length) { + n.maxX = void 0; + n.minX = void 0; + n.maxY = void 0; + n.minY = void 0; + } + } + for (var i3 = 0; i3 < layoutInfo.nodeSize; i3++) { + var n = layoutInfo.layoutNodes[i3]; + if (0 < n.children.length || n.isLocked) { + continue; + } + var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature); + n.positionX += tempForce.x; + n.positionY += tempForce.y; + n.offsetX = 0; + n.offsetY = 0; + n.minX = n.positionX - n.width; + n.maxX = n.positionX + n.width; + n.minY = n.positionY - n.height; + n.maxY = n.positionY + n.height; + updateAncestryBoundaries(n, layoutInfo); + } + for (var i3 = 0; i3 < layoutInfo.nodeSize; i3++) { + var n = layoutInfo.layoutNodes[i3]; + if (0 < n.children.length && !n.isLocked) { + n.positionX = (n.maxX + n.minX) / 2; + n.positionY = (n.maxY + n.minY) / 2; + n.width = n.maxX - n.minX; + n.height = n.maxY - n.minY; + } + } + }; + var limitForce = function limitForce2(forceX, forceY, max3) { + var force = Math.sqrt(forceX * forceX + forceY * forceY); + if (force > max3) { + var res = { + x: max3 * forceX / force, + y: max3 * forceY / force + }; + } else { + var res = { + x: forceX, + y: forceY + }; + } + return res; + }; + var updateAncestryBoundaries = function updateAncestryBoundaries2(node2, layoutInfo) { + var parentId = node2.parentId; + if (null == parentId) { + return; + } + var p2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; + var flag = false; + if (null == p2.maxX || node2.maxX + p2.padRight > p2.maxX) { + p2.maxX = node2.maxX + p2.padRight; + flag = true; + } + if (null == p2.minX || node2.minX - p2.padLeft < p2.minX) { + p2.minX = node2.minX - p2.padLeft; + flag = true; + } + if (null == p2.maxY || node2.maxY + p2.padBottom > p2.maxY) { + p2.maxY = node2.maxY + p2.padBottom; + flag = true; + } + if (null == p2.minY || node2.minY - p2.padTop < p2.minY) { + p2.minY = node2.minY - p2.padTop; + flag = true; + } + if (flag) { + return updateAncestryBoundaries2(p2, layoutInfo); + } + return; + }; + var separateComponents = function separateComponents2(layoutInfo, options2) { + var nodes2 = layoutInfo.layoutNodes; + var components = []; + for (var i3 = 0; i3 < nodes2.length; i3++) { + var node2 = nodes2[i3]; + var cid = node2.cmptId; + var component = components[cid] = components[cid] || []; + component.push(node2); + } + var totalA = 0; + for (var i3 = 0; i3 < components.length; i3++) { + var c2 = components[i3]; + if (!c2) { + continue; + } + c2.x1 = Infinity; + c2.x2 = -Infinity; + c2.y1 = Infinity; + c2.y2 = -Infinity; + for (var j = 0; j < c2.length; j++) { + var n = c2[j]; + c2.x1 = Math.min(c2.x1, n.positionX - n.width / 2); + c2.x2 = Math.max(c2.x2, n.positionX + n.width / 2); + c2.y1 = Math.min(c2.y1, n.positionY - n.height / 2); + c2.y2 = Math.max(c2.y2, n.positionY + n.height / 2); + } + c2.w = c2.x2 - c2.x1; + c2.h = c2.y2 - c2.y1; + totalA += c2.w * c2.h; + } + components.sort(function(c1, c22) { + return c22.w * c22.h - c1.w * c1.h; + }); + var x2 = 0; + var y2 = 0; + var usedW = 0; + var rowH = 0; + var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight; + for (var i3 = 0; i3 < components.length; i3++) { + var c2 = components[i3]; + if (!c2) { + continue; + } + for (var j = 0; j < c2.length; j++) { + var n = c2[j]; + if (!n.isLocked) { + n.positionX += x2 - c2.x1; + n.positionY += y2 - c2.y1; + } + } + x2 += c2.w + options2.componentSpacing; + usedW += c2.w + options2.componentSpacing; + rowH = Math.max(rowH, c2.h); + if (usedW > maxRowW) { + y2 += rowH + options2.componentSpacing; + x2 = 0; + usedW = 0; + rowH = 0; + } + } + }; + var defaults$3 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // padding used on fit + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + avoidOverlapPadding: 10, + // extra spacing around nodes when avoidOverlap: true + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + condense: false, + // uses all available space on false, uses minimal space on true + rows: void 0, + // force num of rows in the grid + cols: void 0, + // force num of columns in the grid + position: function position3(node2) { + }, + // returns { row, col } for element + sort: void 0, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node2, i3) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node2, position3) { + return position3; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function GridLayout(options2) { + this.options = extend2({}, defaults$3, options2); + } + GridLayout.prototype.run = function() { + var params = this.options; + var options2 = params; + var cy = params.cy; + var eles = options2.eles; + var nodes2 = eles.nodes().not(":parent"); + if (options2.sort) { + nodes2 = nodes2.sort(options2.sort); + } + var bb = makeBoundingBox(options2.boundingBox ? options2.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + if (bb.h === 0 || bb.w === 0) { + eles.nodes().layoutPositions(this, options2, function(ele) { + return { + x: bb.x1, + y: bb.y1 + }; + }); + } else { + var cells = nodes2.size(); + var splits = Math.sqrt(cells * bb.h / bb.w); + var rows = Math.round(splits); + var cols = Math.round(bb.w / bb.h * splits); + var small = function small2(val) { + if (val == null) { + return Math.min(rows, cols); + } else { + var min3 = Math.min(rows, cols); + if (min3 == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var large = function large2(val) { + if (val == null) { + return Math.max(rows, cols); + } else { + var max3 = Math.max(rows, cols); + if (max3 == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var oRows = options2.rows; + var oCols = options2.cols != null ? options2.cols : options2.columns; + if (oRows != null && oCols != null) { + rows = oRows; + cols = oCols; + } else if (oRows != null && oCols == null) { + rows = oRows; + cols = Math.ceil(cells / rows); + } else if (oRows == null && oCols != null) { + cols = oCols; + rows = Math.ceil(cells / cols); + } else if (cols * rows > cells) { + var sm = small(); + var lg = large(); + if ((sm - 1) * lg >= cells) { + small(sm - 1); + } else if ((lg - 1) * sm >= cells) { + large(lg - 1); + } + } else { + while (cols * rows < cells) { + var _sm = small(); + var _lg = large(); + if ((_lg + 1) * _sm >= cells) { + large(_lg + 1); + } else { + small(_sm + 1); + } + } + } + var cellWidth = bb.w / cols; + var cellHeight = bb.h / rows; + if (options2.condense) { + cellWidth = 0; + cellHeight = 0; + } + if (options2.avoidOverlap) { + for (var i3 = 0; i3 < nodes2.length; i3++) { + var node2 = nodes2[i3]; + var pos = node2._private.position; + if (pos.x == null || pos.y == null) { + pos.x = 0; + pos.y = 0; + } + var nbb = node2.layoutDimensions(options2); + var p2 = options2.avoidOverlapPadding; + var w2 = nbb.w + p2; + var h = nbb.h + p2; + cellWidth = Math.max(cellWidth, w2); + cellHeight = Math.max(cellHeight, h); + } + } + var cellUsed = {}; + var used = function used2(row2, col2) { + return cellUsed["c-" + row2 + "-" + col2] ? true : false; + }; + var use = function use2(row2, col2) { + cellUsed["c-" + row2 + "-" + col2] = true; + }; + var row = 0; + var col = 0; + var moveToNextCell = function moveToNextCell2() { + col++; + if (col >= cols) { + col = 0; + row++; + } + }; + var id2manPos = {}; + for (var _i = 0; _i < nodes2.length; _i++) { + var _node = nodes2[_i]; + var rcPos = options2.position(_node); + if (rcPos && (rcPos.row !== void 0 || rcPos.col !== void 0)) { + var _pos = { + row: rcPos.row, + col: rcPos.col + }; + if (_pos.col === void 0) { + _pos.col = 0; + while (used(_pos.row, _pos.col)) { + _pos.col++; + } + } else if (_pos.row === void 0) { + _pos.row = 0; + while (used(_pos.row, _pos.col)) { + _pos.row++; + } + } + id2manPos[_node.id()] = _pos; + use(_pos.row, _pos.col); + } + } + var getPos = function getPos2(element3, i4) { + var x2, y2; + if (element3.locked() || element3.isParent()) { + return false; + } + var rcPos2 = id2manPos[element3.id()]; + if (rcPos2) { + x2 = rcPos2.col * cellWidth + cellWidth / 2 + bb.x1; + y2 = rcPos2.row * cellHeight + cellHeight / 2 + bb.y1; + } else { + while (used(row, col)) { + moveToNextCell(); + } + x2 = col * cellWidth + cellWidth / 2 + bb.x1; + y2 = row * cellHeight + cellHeight / 2 + bb.y1; + use(row, col); + moveToNextCell(); + } + return { + x: x2, + y: y2 + }; + }; + nodes2.layoutPositions(this, options2, getPos); + } + return this; + }; + var defaults$2 = { + ready: function ready() { + }, + // on layoutready + stop: function stop() { + } + // on layoutstop + }; + function NullLayout(options2) { + this.options = extend2({}, defaults$2, options2); + } + NullLayout.prototype.run = function() { + var options2 = this.options; + var eles = options2.eles; + var layout3 = this; + options2.cy; + layout3.emit("layoutstart"); + eles.nodes().positions(function() { + return { + x: 0, + y: 0 + }; + }); + layout3.one("layoutready", options2.ready); + layout3.emit("layoutready"); + layout3.one("layoutstop", options2.stop); + layout3.emit("layoutstop"); + return this; + }; + NullLayout.prototype.stop = function() { + return this; + }; + var defaults$12 = { + positions: void 0, + // map of (node id) => (position obj); or function(node){ return somPos; } + zoom: void 0, + // the zoom level to set (prob want fit = false if set) + pan: void 0, + // the pan level to set (prob want fit = false if set) + fit: true, + // whether to fit to viewport + padding: 30, + // padding on fit + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node2, i3) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node2, position3) { + return position3; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function PresetLayout(options2) { + this.options = extend2({}, defaults$12, options2); + } + PresetLayout.prototype.run = function() { + var options2 = this.options; + var eles = options2.eles; + var nodes2 = eles.nodes(); + var posIsFn = fn$6(options2.positions); + function getPosition(node2) { + if (options2.positions == null) { + return copyPosition(node2.position()); + } + if (posIsFn) { + return options2.positions(node2); + } + var pos = options2.positions[node2._private.data.id]; + if (pos == null) { + return null; + } + return pos; + } + nodes2.layoutPositions(this, options2, function(node2, i3) { + var position3 = getPosition(node2); + if (node2.locked() || position3 == null) { + return false; + } + return position3; + }); + return this; + }; + var defaults2 = { + fit: true, + // whether to fit to viewport + padding: 30, + // fit padding + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node2, i3) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node2, position3) { + return position3; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function RandomLayout(options2) { + this.options = extend2({}, defaults2, options2); + } + RandomLayout.prototype.run = function() { + var options2 = this.options; + var cy = options2.cy; + var eles = options2.eles; + var bb = makeBoundingBox(options2.boundingBox ? options2.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var getPos = function getPos2(node2, i3) { + return { + x: bb.x1 + Math.round(Math.random() * bb.w), + y: bb.y1 + Math.round(Math.random() * bb.h) + }; + }; + eles.nodes().layoutPositions(this, options2, getPos); + return this; + }; + var layout2 = [{ + name: "breadthfirst", + impl: BreadthFirstLayout + }, { + name: "circle", + impl: CircleLayout + }, { + name: "concentric", + impl: ConcentricLayout + }, { + name: "cose", + impl: CoseLayout + }, { + name: "grid", + impl: GridLayout + }, { + name: "null", + impl: NullLayout + }, { + name: "preset", + impl: PresetLayout + }, { + name: "random", + impl: RandomLayout + }]; + function NullRenderer(options2) { + this.options = options2; + this.notifications = 0; + } + var noop2 = function noop3() { + }; + var throwImgErr = function throwImgErr2() { + throw new Error("A headless instance can not render images"); + }; + NullRenderer.prototype = { + recalculateRenderedStyle: noop2, + notify: function notify() { + this.notifications++; + }, + init: noop2, + isHeadless: function isHeadless() { + return true; + }, + png: throwImgErr, + jpg: throwImgErr + }; + var BRp$f = {}; + BRp$f.arrowShapeWidth = 0.3; + BRp$f.registerArrowShapes = function() { + var arrowShapes = this.arrowShapes = {}; + var renderer3 = this; + var bbCollide = function bbCollide2(x2, y2, size2, angle, translation, edgeWidth, padding2) { + var x1 = translation.x - size2 / 2 - padding2; + var x22 = translation.x + size2 / 2 + padding2; + var y1 = translation.y - size2 / 2 - padding2; + var y22 = translation.y + size2 / 2 + padding2; + var inside = x1 <= x2 && x2 <= x22 && y1 <= y2 && y2 <= y22; + return inside; + }; + var transform = function transform2(x2, y2, size2, angle, translation) { + var xRotated = x2 * Math.cos(angle) - y2 * Math.sin(angle); + var yRotated = x2 * Math.sin(angle) + y2 * Math.cos(angle); + var xScaled = xRotated * size2; + var yScaled = yRotated * size2; + var xTranslated = xScaled + translation.x; + var yTranslated = yScaled + translation.y; + return { + x: xTranslated, + y: yTranslated + }; + }; + var transformPoints = function transformPoints2(pts2, size2, angle, translation) { + var retPts = []; + for (var i3 = 0; i3 < pts2.length; i3 += 2) { + var x2 = pts2[i3]; + var y2 = pts2[i3 + 1]; + retPts.push(transform(x2, y2, size2, angle, translation)); + } + return retPts; + }; + var pointsToArr = function pointsToArr2(pts2) { + var ret = []; + for (var i3 = 0; i3 < pts2.length; i3++) { + var p2 = pts2[i3]; + ret.push(p2.x, p2.y); + } + return ret; + }; + var standardGap = function standardGap2(edge) { + return edge.pstyle("width").pfValue * edge.pstyle("arrow-scale").pfValue * 2; + }; + var defineArrowShape = function defineArrowShape2(name2, defn) { + if (string2(defn)) { + defn = arrowShapes[defn]; + } + arrowShapes[name2] = extend2({ + name: name2, + points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], + collide: function collide(x2, y2, size2, angle, translation, padding2) { + var points = pointsToArr(transformPoints(this.points, size2 + 2 * padding2, angle, translation)); + var inside = pointInsidePolygonPoints(x2, y2, points); + return inside; + }, + roughCollide: bbCollide, + draw: function draw2(context, size2, angle, translation) { + var points = transformPoints(this.points, size2, angle, translation); + renderer3.arrowShapeImpl("polygon")(context, points); + }, + spacing: function spacing(edge) { + return 0; + }, + gap: standardGap + }, defn); + }; + defineArrowShape("none", { + collide: falsify, + roughCollide: falsify, + draw: noop$12, + spacing: zeroify, + gap: zeroify + }); + defineArrowShape("triangle", { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3] + }); + defineArrowShape("arrow", "triangle"); + defineArrowShape("triangle-backcurve", { + points: arrowShapes["triangle"].points, + controlPoint: [0, -0.15], + roughCollide: bbCollide, + draw: function draw2(context, size2, angle, translation, edgeWidth) { + var ptsTrans = transformPoints(this.points, size2, angle, translation); + var ctrlPt = this.controlPoint; + var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size2, angle, translation); + renderer3.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans); + }, + gap: function gap(edge) { + return standardGap(edge) * 0.8; + } + }); + defineArrowShape("triangle-tee", { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], + collide: function collide(x2, y2, size2, angle, translation, edgeWidth, padding2) { + var triPts = pointsToArr(transformPoints(this.points, size2 + 2 * padding2, angle, translation)); + var teePts = pointsToArr(transformPoints(this.pointsTee, size2 + 2 * padding2, angle, translation)); + var inside = pointInsidePolygonPoints(x2, y2, triPts) || pointInsidePolygonPoints(x2, y2, teePts); + return inside; + }, + draw: function draw2(context, size2, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size2, angle, translation); + var teePts = transformPoints(this.pointsTee, size2, angle, translation); + renderer3.arrowShapeImpl(this.name)(context, triPts, teePts); + } + }); + defineArrowShape("circle-triangle", { + radius: 0.15, + pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], + collide: function collide(x2, y2, size2, angle, translation, edgeWidth, padding2) { + var t = translation; + var circleInside = Math.pow(t.x - x2, 2) + Math.pow(t.y - y2, 2) <= Math.pow((size2 + 2 * padding2) * this.radius, 2); + var triPts = pointsToArr(transformPoints(this.points, size2 + 2 * padding2, angle, translation)); + return pointInsidePolygonPoints(x2, y2, triPts) || circleInside; + }, + draw: function draw2(context, size2, angle, translation, edgeWidth) { + var triPts = transformPoints(this.pointsTr, size2, angle, translation); + renderer3.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size2); + }, + spacing: function spacing(edge) { + return renderer3.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.radius; + } + }); + defineArrowShape("triangle-cross", { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + baseCrossLinePts: [ + -0.15, + -0.4, + // first half of the rectangle + -0.15, + -0.4, + 0.15, + -0.4, + // second half of the rectangle + 0.15, + -0.4 + ], + crossLinePts: function crossLinePts(size2, edgeWidth) { + var p2 = this.baseCrossLinePts.slice(); + var shiftFactor = edgeWidth / size2; + var y0 = 3; + var y1 = 5; + p2[y0] = p2[y0] - shiftFactor; + p2[y1] = p2[y1] - shiftFactor; + return p2; + }, + collide: function collide(x2, y2, size2, angle, translation, edgeWidth, padding2) { + var triPts = pointsToArr(transformPoints(this.points, size2 + 2 * padding2, angle, translation)); + var teePts = pointsToArr(transformPoints(this.crossLinePts(size2, edgeWidth), size2 + 2 * padding2, angle, translation)); + var inside = pointInsidePolygonPoints(x2, y2, triPts) || pointInsidePolygonPoints(x2, y2, teePts); + return inside; + }, + draw: function draw2(context, size2, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size2, angle, translation); + var crossLinePts = transformPoints(this.crossLinePts(size2, edgeWidth), size2, angle, translation); + renderer3.arrowShapeImpl(this.name)(context, triPts, crossLinePts); + } + }); + defineArrowShape("vee", { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], + gap: function gap(edge) { + return standardGap(edge) * 0.525; + } + }); + defineArrowShape("circle", { + radius: 0.15, + collide: function collide(x2, y2, size2, angle, translation, edgeWidth, padding2) { + var t = translation; + var inside = Math.pow(t.x - x2, 2) + Math.pow(t.y - y2, 2) <= Math.pow((size2 + 2 * padding2) * this.radius, 2); + return inside; + }, + draw: function draw2(context, size2, angle, translation, edgeWidth) { + renderer3.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size2); + }, + spacing: function spacing(edge) { + return renderer3.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.radius; + } + }); + defineArrowShape("tee", { + points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], + spacing: function spacing(edge) { + return 1; + }, + gap: function gap(edge) { + return 1; + } + }); + defineArrowShape("square", { + points: [-0.15, 0, 0.15, 0, 0.15, -0.3, -0.15, -0.3] + }); + defineArrowShape("diamond", { + points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], + gap: function gap(edge) { + return edge.pstyle("width").pfValue * edge.pstyle("arrow-scale").value; + } + }); + defineArrowShape("chevron", { + points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], + gap: function gap(edge) { + return 0.95 * edge.pstyle("width").pfValue * edge.pstyle("arrow-scale").value; + } + }); + }; + var BRp$e = {}; + BRp$e.projectIntoViewport = function(clientX, clientY) { + var cy = this.cy; + var offsets = this.findContainerClientCoords(); + var offsetLeft = offsets[0]; + var offsetTop = offsets[1]; + var scale = offsets[4]; + var pan = cy.pan(); + var zoom = cy.zoom(); + var x2 = ((clientX - offsetLeft) / scale - pan.x) / zoom; + var y2 = ((clientY - offsetTop) / scale - pan.y) / zoom; + return [x2, y2]; + }; + BRp$e.findContainerClientCoords = function() { + if (this.containerBB) { + return this.containerBB; + } + var container = this.container; + var rect2 = container.getBoundingClientRect(); + var style = window$1.getComputedStyle(container); + var styleValue2 = function styleValue3(name2) { + return parseFloat(style.getPropertyValue(name2)); + }; + var padding2 = { + left: styleValue2("padding-left"), + right: styleValue2("padding-right"), + top: styleValue2("padding-top"), + bottom: styleValue2("padding-bottom") + }; + var border = { + left: styleValue2("border-left-width"), + right: styleValue2("border-right-width"), + top: styleValue2("border-top-width"), + bottom: styleValue2("border-bottom-width") + }; + var clientWidth = container.clientWidth; + var clientHeight = container.clientHeight; + var paddingHor = padding2.left + padding2.right; + var paddingVer = padding2.top + padding2.bottom; + var borderHor = border.left + border.right; + var scale = rect2.width / (clientWidth + borderHor); + var unscaledW = clientWidth - paddingHor; + var unscaledH = clientHeight - paddingVer; + var left2 = rect2.left + padding2.left + border.left; + var top2 = rect2.top + padding2.top + border.top; + return this.containerBB = [left2, top2, unscaledW, unscaledH, scale]; + }; + BRp$e.invalidateContainerClientCoordsCache = function() { + this.containerBB = null; + }; + BRp$e.findNearestElement = function(x2, y2, interactiveElementsOnly, isTouch) { + return this.findNearestElements(x2, y2, interactiveElementsOnly, isTouch)[0]; + }; + BRp$e.findNearestElements = function(x2, y2, interactiveElementsOnly, isTouch) { + var self2 = this; + var r = this; + var eles = r.getCachedZSortedEles(); + var near = []; + var zoom = r.cy.zoom(); + var hasCompounds = r.cy.hasCompoundNodes(); + var edgeThreshold = (isTouch ? 24 : 8) / zoom; + var nodeThreshold = (isTouch ? 8 : 2) / zoom; + var labelThreshold = (isTouch ? 8 : 2) / zoom; + var minSqDist = Infinity; + var nearEdge; + var nearNode; + if (interactiveElementsOnly) { + eles = eles.interactive; + } + function addEle(ele2, sqDist) { + if (ele2.isNode()) { + if (nearNode) { + return; + } else { + nearNode = ele2; + near.push(ele2); + } + } + if (ele2.isEdge() && (sqDist == null || sqDist < minSqDist)) { + if (nearEdge) { + if (nearEdge.pstyle("z-compound-depth").value === ele2.pstyle("z-compound-depth").value && nearEdge.pstyle("z-compound-depth").value === ele2.pstyle("z-compound-depth").value) { + for (var i4 = 0; i4 < near.length; i4++) { + if (near[i4].isEdge()) { + near[i4] = ele2; + nearEdge = ele2; + minSqDist = sqDist != null ? sqDist : minSqDist; + break; + } + } + } + } else { + near.push(ele2); + nearEdge = ele2; + minSqDist = sqDist != null ? sqDist : minSqDist; + } + } + } + function checkNode(node2) { + var width2 = node2.outerWidth() + 2 * nodeThreshold; + var height = node2.outerHeight() + 2 * nodeThreshold; + var hw = width2 / 2; + var hh = height / 2; + var pos = node2.position(); + if (pos.x - hw <= x2 && x2 <= pos.x + hw && pos.y - hh <= y2 && y2 <= pos.y + hh) { + var shape = r.nodeShapes[self2.getNodeShape(node2)]; + if (shape.checkPoint(x2, y2, 0, width2, height, pos.x, pos.y)) { + addEle(node2, 0); + return true; + } + } + } + function checkEdge(edge) { + var _p = edge._private; + var rs = _p.rscratch; + var styleWidth = edge.pstyle("width").pfValue; + var scale = edge.pstyle("arrow-scale").value; + var width2 = styleWidth / 2 + edgeThreshold; + var widthSq = width2 * width2; + var width22 = width2 * 2; + var src = _p.source; + var tgt = _p.target; + var sqDist; + if (rs.edgeType === "segments" || rs.edgeType === "straight" || rs.edgeType === "haystack") { + var pts2 = rs.allpts; + for (var i4 = 0; i4 + 3 < pts2.length; i4 += 2) { + if (inLineVicinity(x2, y2, pts2[i4], pts2[i4 + 1], pts2[i4 + 2], pts2[i4 + 3], width22) && widthSq > (sqDist = sqdistToFiniteLine(x2, y2, pts2[i4], pts2[i4 + 1], pts2[i4 + 2], pts2[i4 + 3]))) { + addEle(edge, sqDist); + return true; + } + } + } else if (rs.edgeType === "bezier" || rs.edgeType === "multibezier" || rs.edgeType === "self" || rs.edgeType === "compound") { + var pts2 = rs.allpts; + for (var i4 = 0; i4 + 5 < rs.allpts.length; i4 += 4) { + if (inBezierVicinity(x2, y2, pts2[i4], pts2[i4 + 1], pts2[i4 + 2], pts2[i4 + 3], pts2[i4 + 4], pts2[i4 + 5], width22) && widthSq > (sqDist = sqdistToQuadraticBezier(x2, y2, pts2[i4], pts2[i4 + 1], pts2[i4 + 2], pts2[i4 + 3], pts2[i4 + 4], pts2[i4 + 5]))) { + addEle(edge, sqDist); + return true; + } + } + } + var src = src || _p.source; + var tgt = tgt || _p.target; + var arSize = self2.getArrowWidth(styleWidth, scale); + var arrows2 = [{ + name: "source", + x: rs.arrowStartX, + y: rs.arrowStartY, + angle: rs.srcArrowAngle + }, { + name: "target", + x: rs.arrowEndX, + y: rs.arrowEndY, + angle: rs.tgtArrowAngle + }, { + name: "mid-source", + x: rs.midX, + y: rs.midY, + angle: rs.midsrcArrowAngle + }, { + name: "mid-target", + x: rs.midX, + y: rs.midY, + angle: rs.midtgtArrowAngle + }]; + for (var i4 = 0; i4 < arrows2.length; i4++) { + var ar = arrows2[i4]; + var shape = r.arrowShapes[edge.pstyle(ar.name + "-arrow-shape").value]; + var edgeWidth = edge.pstyle("width").pfValue; + if (shape.roughCollide(x2, y2, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold) && shape.collide(x2, y2, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold)) { + addEle(edge); + return true; + } + } + if (hasCompounds && near.length > 0) { + checkNode(src); + checkNode(tgt); + } + } + function preprop(obj, name2, pre) { + return getPrefixedProperty(obj, name2, pre); + } + function checkLabel(ele2, prefix) { + var _p = ele2._private; + var th = labelThreshold; + var prefixDash; + if (prefix) { + prefixDash = prefix + "-"; + } else { + prefixDash = ""; + } + ele2.boundingBox(); + var bb = _p.labelBounds[prefix || "main"]; + var text2 = ele2.pstyle(prefixDash + "label").value; + var eventsEnabled = ele2.pstyle("text-events").strValue === "yes"; + if (!eventsEnabled || !text2) { + return; + } + var lx = preprop(_p.rscratch, "labelX", prefix); + var ly = preprop(_p.rscratch, "labelY", prefix); + var theta = preprop(_p.rscratch, "labelAngle", prefix); + var ox = ele2.pstyle(prefixDash + "text-margin-x").pfValue; + var oy = ele2.pstyle(prefixDash + "text-margin-y").pfValue; + var lx1 = bb.x1 - th - ox; + var lx2 = bb.x2 + th - ox; + var ly1 = bb.y1 - th - oy; + var ly2 = bb.y2 + th - oy; + if (theta) { + var cos3 = Math.cos(theta); + var sin3 = Math.sin(theta); + var rotate = function rotate2(x3, y3) { + x3 = x3 - lx; + y3 = y3 - ly; + return { + x: x3 * cos3 - y3 * sin3 + lx, + y: x3 * sin3 + y3 * cos3 + ly + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + var points = [ + // with the margin added after the rotation is applied + px1y1.x + ox, + px1y1.y + oy, + px2y1.x + ox, + px2y1.y + oy, + px2y2.x + ox, + px2y2.y + oy, + px1y2.x + ox, + px1y2.y + oy + ]; + if (pointInsidePolygonPoints(x2, y2, points)) { + addEle(ele2); + return true; + } + } else { + if (inBoundingBox(bb, x2, y2)) { + addEle(ele2); + return true; + } + } + } + for (var i3 = eles.length - 1; i3 >= 0; i3--) { + var ele = eles[i3]; + if (ele.isNode()) { + checkNode(ele) || checkLabel(ele); + } else { + checkEdge(ele) || checkLabel(ele) || checkLabel(ele, "source") || checkLabel(ele, "target"); + } + } + return near; + }; + BRp$e.getAllInBox = function(x1, y1, x2, y2) { + var eles = this.getCachedZSortedEles().interactive; + var box = []; + var x1c = Math.min(x1, x2); + var x2c = Math.max(x1, x2); + var y1c = Math.min(y1, y2); + var y2c = Math.max(y1, y2); + x1 = x1c; + x2 = x2c; + y1 = y1c; + y2 = y2c; + var boxBb = makeBoundingBox({ + x1, + y1, + x2, + y2 + }); + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + if (ele.isNode()) { + var node2 = ele; + var nodeBb = node2.boundingBox({ + includeNodes: true, + includeEdges: false, + includeLabels: false + }); + if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) { + box.push(node2); + } + } else { + var edge = ele; + var _p = edge._private; + var rs = _p.rscratch; + if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) { + continue; + } + if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) { + continue; + } + if (rs.edgeType === "bezier" || rs.edgeType === "multibezier" || rs.edgeType === "self" || rs.edgeType === "compound" || rs.edgeType === "segments" || rs.edgeType === "haystack") { + var pts2 = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts; + var allInside = true; + for (var i3 = 0; i3 < pts2.length; i3++) { + if (!pointInBoundingBox(boxBb, pts2[i3])) { + allInside = false; + break; + } + } + if (allInside) { + box.push(edge); + } + } else if (rs.edgeType === "haystack" || rs.edgeType === "straight") { + box.push(edge); + } + } + } + return box; + }; + var BRp$d = {}; + BRp$d.calculateArrowAngles = function(edge) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === "haystack"; + var isBezier = rs.edgeType === "bezier"; + var isMultibezier = rs.edgeType === "multibezier"; + var isSegments = rs.edgeType === "segments"; + var isCompound = rs.edgeType === "compound"; + var isSelf = rs.edgeType === "self"; + var dispX, dispY; + var startX, startY, endX, endY, midX, midY; + if (isHaystack) { + startX = rs.haystackPts[0]; + startY = rs.haystackPts[1]; + endX = rs.haystackPts[2]; + endY = rs.haystackPts[3]; + } else { + startX = rs.arrowStartX; + startY = rs.arrowStartY; + endX = rs.arrowEndX; + endY = rs.arrowEndY; + } + midX = rs.midX; + midY = rs.midY; + if (isSegments) { + dispX = startX - rs.segpts[0]; + dispY = startY - rs.segpts[1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts2 = rs.allpts; + var bX = qbezierAt(pts2[0], pts2[2], pts2[4], 0.1); + var bY = qbezierAt(pts2[1], pts2[3], pts2[5], 0.1); + dispX = startX - bX; + dispY = startY - bY; + } else { + dispX = startX - midX; + dispY = startY - midY; + } + rs.srcArrowAngle = getAngleFromDisp(dispX, dispY); + var midX = rs.midX; + var midY = rs.midY; + if (isHaystack) { + midX = (startX + endX) / 2; + midY = (startY + endY) / 2; + } + dispX = endX - startX; + dispY = endY - startY; + if (isSegments) { + var pts2 = rs.allpts; + if (pts2.length / 2 % 2 === 0) { + var i22 = pts2.length / 2; + var i1 = i22 - 2; + dispX = pts2[i22] - pts2[i1]; + dispY = pts2[i22 + 1] - pts2[i1 + 1]; + } else { + var i22 = pts2.length / 2 - 1; + var i1 = i22 - 2; + var i3 = i22 + 2; + dispX = pts2[i22] - pts2[i1]; + dispY = pts2[i22 + 1] - pts2[i1 + 1]; + } + } else if (isMultibezier || isCompound || isSelf) { + var pts2 = rs.allpts; + var cpts = rs.ctrlpts; + var bp0x, bp0y; + var bp1x, bp1y; + if (cpts.length / 2 % 2 === 0) { + var p0 = pts2.length / 2 - 1; + var ic = p0 + 2; + var p1 = ic + 2; + bp0x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 0); + bp0y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 0); + bp1x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 1e-4); + bp1y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 1e-4); + } else { + var ic = pts2.length / 2 - 1; + var p0 = ic - 2; + var p1 = ic + 2; + bp0x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 0.4999); + bp0y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 0.4999); + bp1x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 0.5); + bp1y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 0.5); + } + dispX = bp1x - bp0x; + dispY = bp1y - bp0y; + } + rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY); + rs.midDispX = dispX; + rs.midDispY = dispY; + dispX *= -1; + dispY *= -1; + if (isSegments) { + var pts2 = rs.allpts; + if (pts2.length / 2 % 2 === 0) + ; + else { + var i22 = pts2.length / 2 - 1; + var i3 = i22 + 2; + dispX = -(pts2[i3] - pts2[i22]); + dispY = -(pts2[i3 + 1] - pts2[i22 + 1]); + } + } + rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY); + if (isSegments) { + dispX = endX - rs.segpts[rs.segpts.length - 2]; + dispY = endY - rs.segpts[rs.segpts.length - 1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts2 = rs.allpts; + var l = pts2.length; + var bX = qbezierAt(pts2[l - 6], pts2[l - 4], pts2[l - 2], 0.9); + var bY = qbezierAt(pts2[l - 5], pts2[l - 3], pts2[l - 1], 0.9); + dispX = endX - bX; + dispY = endY - bY; + } else { + dispX = endX - midX; + dispY = endY - midY; + } + rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY); + }; + BRp$d.getArrowWidth = BRp$d.getArrowHeight = function(edgeWidth, scale) { + var cache2 = this.arrowWidthCache = this.arrowWidthCache || {}; + var cachedVal = cache2[edgeWidth + ", " + scale]; + if (cachedVal) { + return cachedVal; + } + cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale; + cache2[edgeWidth + ", " + scale] = cachedVal; + return cachedVal; + }; + var BRp$c = {}; + BRp$c.findHaystackPoints = function(edges2) { + for (var i3 = 0; i3 < edges2.length; i3++) { + var edge = edges2[i3]; + var _p = edge._private; + var rs = _p.rscratch; + if (!rs.haystack) { + var angle = Math.random() * 2 * Math.PI; + rs.source = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + angle = Math.random() * 2 * Math.PI; + rs.target = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + } + var src = _p.source; + var tgt = _p.target; + var srcPos = src.position(); + var tgtPos = tgt.position(); + var srcW = src.width(); + var tgtW = tgt.width(); + var srcH = src.height(); + var tgtH = tgt.height(); + var radius = edge.pstyle("haystack-radius").value; + var halfRadius = radius / 2; + rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y]; + rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2; + rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2; + rs.edgeType = "haystack"; + rs.haystack = true; + this.storeEdgeProjections(edge); + this.calculateArrowAngles(edge); + this.recalculateEdgeLabelProjections(edge); + this.calculateLabelAngles(edge); + } + }; + BRp$c.findSegmentsPoints = function(edge, pairInfo) { + var rs = edge._private.rscratch; + var posPts = pairInfo.posPts, intersectionPts = pairInfo.intersectionPts, vectorNormInverse = pairInfo.vectorNormInverse; + var edgeDistances = edge.pstyle("edge-distances").value; + var segmentWs = edge.pstyle("segment-weights"); + var segmentDs = edge.pstyle("segment-distances"); + var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length); + rs.edgeType = "segments"; + rs.segpts = []; + for (var s = 0; s < segmentsN; s++) { + var w2 = segmentWs.pfValue[s]; + var d = segmentDs.pfValue[s]; + var w1 = 1 - w2; + var w22 = w2; + var midptPts = edgeDistances === "node-position" ? posPts : intersectionPts; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w22, + y: midptPts.y1 * w1 + midptPts.y2 * w22 + }; + rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d); + } + }; + BRp$c.findLoopPoints = function(edge, pairInfo, i3, edgeIsUnbundled) { + var rs = edge._private.rscratch; + var dirCounts = pairInfo.dirCounts, srcPos = pairInfo.srcPos; + var ctrlptDists = edge.pstyle("control-point-distances"); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : void 0; + var loopDir = edge.pstyle("loop-direction").pfValue; + var loopSwp = edge.pstyle("loop-sweep").pfValue; + var stepSize = edge.pstyle("control-point-step-size").pfValue; + rs.edgeType = "self"; + var j = i3; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopAngle = loopDir - Math.PI / 2; + var outAngle = loopAngle - loopSwp / 2; + var inAngle = loopAngle + loopSwp / 2; + var dc = String(loopDir + "_" + loopSwp); + j = dirCounts[dc] === void 0 ? dirCounts[dc] = 0 : ++dirCounts[dc]; + rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)]; + }; + BRp$c.findCompoundLoopPoints = function(edge, pairInfo, i3, edgeIsUnbundled) { + var rs = edge._private.rscratch; + rs.edgeType = "compound"; + var srcPos = pairInfo.srcPos, tgtPos = pairInfo.tgtPos, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH; + var stepSize = edge.pstyle("control-point-step-size").pfValue; + var ctrlptDists = edge.pstyle("control-point-distances"); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : void 0; + var j = i3; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopW = 50; + var loopaPos = { + x: srcPos.x - srcW / 2, + y: srcPos.y - srcH / 2 + }; + var loopbPos = { + x: tgtPos.x - tgtW / 2, + y: tgtPos.y - tgtH / 2 + }; + var loopPos = { + x: Math.min(loopaPos.x, loopbPos.x), + y: Math.min(loopaPos.y, loopbPos.y) + }; + var minCompoundStretch = 0.5; + var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01)); + var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01)); + rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y]; + }; + BRp$c.findStraightEdgePoints = function(edge) { + edge._private.rscratch.edgeType = "straight"; + }; + BRp$c.findBezierPoints = function(edge, pairInfo, i3, edgeIsUnbundled, edgeIsSwapped) { + var rs = edge._private.rscratch; + var vectorNormInverse = pairInfo.vectorNormInverse, posPts = pairInfo.posPts, intersectionPts = pairInfo.intersectionPts; + var edgeDistances = edge.pstyle("edge-distances").value; + var stepSize = edge.pstyle("control-point-step-size").pfValue; + var ctrlptDists = edge.pstyle("control-point-distances"); + var ctrlptWs = edge.pstyle("control-point-weights"); + var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1; + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : void 0; + var ctrlptWeight = ctrlptWs.value[0]; + var multi = edgeIsUnbundled; + rs.edgeType = multi ? "multibezier" : "bezier"; + rs.ctrlpts = []; + for (var b = 0; b < bezierN; b++) { + var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i3) * stepSize * (edgeIsSwapped ? -1 : 1); + var manctrlptDist = void 0; + var sign2 = signum(normctrlptDist); + if (multi) { + ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; + ctrlptWeight = ctrlptWs.value[b]; + } + if (edgeIsUnbundled) { + manctrlptDist = ctrlptDist; + } else { + manctrlptDist = ctrlptDist !== void 0 ? sign2 * ctrlptDist : void 0; + } + var distanceFromMidpoint = manctrlptDist !== void 0 ? manctrlptDist : normctrlptDist; + var w1 = 1 - ctrlptWeight; + var w2 = ctrlptWeight; + var midptPts = edgeDistances === "node-position" ? posPts : intersectionPts; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint); + } + }; + BRp$c.findTaxiPoints = function(edge, pairInfo) { + var rs = edge._private.rscratch; + rs.edgeType = "segments"; + var VERTICAL = "vertical"; + var HORIZONTAL = "horizontal"; + var LEFTWARD = "leftward"; + var RIGHTWARD = "rightward"; + var DOWNWARD = "downward"; + var UPWARD = "upward"; + var AUTO = "auto"; + var posPts = pairInfo.posPts, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH; + var edgeDistances = edge.pstyle("edge-distances").value; + var dIncludesNodeBody = edgeDistances !== "node-position"; + var taxiDir = edge.pstyle("taxi-direction").value; + var rawTaxiDir = taxiDir; + var taxiTurn = edge.pstyle("taxi-turn"); + var turnIsPercent = taxiTurn.units === "%"; + var taxiTurnPfVal = taxiTurn.pfValue; + var turnIsNegative = taxiTurnPfVal < 0; + var minD = edge.pstyle("taxi-turn-min-distance").pfValue; + var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0; + var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0; + var pdx = posPts.x2 - posPts.x1; + var pdy = posPts.y2 - posPts.y1; + var subDWH = function subDWH2(dxy, dwh) { + if (dxy > 0) { + return Math.max(dxy - dwh, 0); + } else { + return Math.min(dxy + dwh, 0); + } + }; + var dx = subDWH(pdx, dw); + var dy = subDWH(pdy, dh); + var isExplicitDir = false; + if (rawTaxiDir === AUTO) { + taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL; + } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) { + taxiDir = VERTICAL; + isExplicitDir = true; + } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) { + taxiDir = HORIZONTAL; + isExplicitDir = true; + } + var isVert = taxiDir === VERTICAL; + var l = isVert ? dy : dx; + var pl = isVert ? pdy : pdx; + var sgnL = signum(pl); + var forcedDir = false; + if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) { + sgnL *= -1; + l = sgnL * Math.abs(l); + forcedDir = true; + } + var d; + if (turnIsPercent) { + var p2 = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal; + d = p2 * l; + } else { + var k = taxiTurnPfVal < 0 ? l : 0; + d = k + taxiTurnPfVal * sgnL; + } + var getIsTooClose = function getIsTooClose2(d2) { + return Math.abs(d2) < minD || Math.abs(d2) >= Math.abs(l); + }; + var isTooCloseSrc = getIsTooClose(d); + var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d)); + var isTooClose = isTooCloseSrc || isTooCloseTgt; + if (isTooClose && !forcedDir) { + if (isVert) { + var lShapeInsideSrc = Math.abs(pl) <= srcH / 2; + var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2; + if (lShapeInsideSrc) { + var x2 = (posPts.x1 + posPts.x2) / 2; + var y1 = posPts.y1, y2 = posPts.y2; + rs.segpts = [x2, y1, x2, y2]; + } else if (lShapeInsideTgt) { + var y3 = (posPts.y1 + posPts.y2) / 2; + var x1 = posPts.x1, x22 = posPts.x2; + rs.segpts = [x1, y3, x22, y3]; + } else { + rs.segpts = [posPts.x1, posPts.y2]; + } + } else { + var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2; + var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2; + if (_lShapeInsideSrc) { + var _y = (posPts.y1 + posPts.y2) / 2; + var _x = posPts.x1, _x2 = posPts.x2; + rs.segpts = [_x, _y, _x2, _y]; + } else if (_lShapeInsideTgt) { + var _x3 = (posPts.x1 + posPts.x2) / 2; + var _y2 = posPts.y1, _y3 = posPts.y2; + rs.segpts = [_x3, _y2, _x3, _y3]; + } else { + rs.segpts = [posPts.x2, posPts.y1]; + } + } + } else { + if (isVert) { + var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0); + var _x4 = posPts.x1, _x5 = posPts.x2; + rs.segpts = [_x4, _y4, _x5, _y4]; + } else { + var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0); + var _y5 = posPts.y1, _y6 = posPts.y2; + rs.segpts = [_x6, _y5, _x6, _y6]; + } + } + }; + BRp$c.tryToCorrectInvalidPoints = function(edge, pairInfo) { + var rs = edge._private.rscratch; + if (rs.edgeType === "bezier") { + var srcPos = pairInfo.srcPos, tgtPos = pairInfo.tgtPos, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH, srcShape = pairInfo.srcShape, tgtShape = pairInfo.tgtShape; + var badStart = !number$12(rs.startX) || !number$12(rs.startY); + var badAStart = !number$12(rs.arrowStartX) || !number$12(rs.arrowStartY); + var badEnd = !number$12(rs.endX) || !number$12(rs.endY); + var badAEnd = !number$12(rs.arrowEndX) || !number$12(rs.arrowEndY); + var minCpADistFactor = 3; + var arrowW = this.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.arrowShapeWidth; + var minCpADist = minCpADistFactor * arrowW; + var startACpDist = dist2({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.startX, + y: rs.startY + }); + var closeStartACp = startACpDist < minCpADist; + var endACpDist = dist2({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.endX, + y: rs.endY + }); + var closeEndACp = endACpDist < minCpADist; + var overlapping = false; + if (badStart || badAStart || closeStartACp) { + overlapping = true; + var cpD = { + // delta + x: rs.ctrlpts[0] - srcPos.x, + y: rs.ctrlpts[1] - srcPos.y + }; + var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); + var cpM = { + // normalised delta + x: cpD.x / cpL, + y: cpD.y / cpL + }; + var radius = Math.max(srcW, srcH); + var cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + cpM.x * 2 * radius, + y: rs.ctrlpts[1] + cpM.y * 2 * radius + }; + var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0); + if (closeStartACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist); + } else { + rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist; + rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist; + } + } + if (badEnd || badAEnd || closeEndACp) { + overlapping = true; + var _cpD = { + // delta + x: rs.ctrlpts[0] - tgtPos.x, + y: rs.ctrlpts[1] - tgtPos.y + }; + var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); + var _cpM = { + // normalised delta + x: _cpD.x / _cpL, + y: _cpD.y / _cpL + }; + var _radius = Math.max(srcW, srcH); + var _cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + _cpM.x * 2 * _radius, + y: rs.ctrlpts[1] + _cpM.y * 2 * _radius + }; + var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0); + if (closeEndACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist); + } else { + rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist; + rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist; + } + } + if (overlapping) { + this.findEndpoints(edge); + } + } + }; + BRp$c.storeAllpts = function(edge) { + var rs = edge._private.rscratch; + if (rs.edgeType === "multibezier" || rs.edgeType === "bezier" || rs.edgeType === "self" || rs.edgeType === "compound") { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) { + rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]); + if (b + 3 < rs.ctrlpts.length) { + rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2); + } + } + rs.allpts.push(rs.endX, rs.endY); + var m, mt; + if (rs.ctrlpts.length / 2 % 2 === 0) { + m = rs.allpts.length / 2 - 1; + rs.midX = rs.allpts[m]; + rs.midY = rs.allpts[m + 1]; + } else { + m = rs.allpts.length / 2 - 3; + mt = 0.5; + rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt); + rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt); + } + } else if (rs.edgeType === "straight") { + rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY]; + rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4; + rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4; + } else if (rs.edgeType === "segments") { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + rs.allpts.push.apply(rs.allpts, rs.segpts); + rs.allpts.push(rs.endX, rs.endY); + if (rs.segpts.length % 4 === 0) { + var i22 = rs.segpts.length / 2; + var i1 = i22 - 2; + rs.midX = (rs.segpts[i1] + rs.segpts[i22]) / 2; + rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i22 + 1]) / 2; + } else { + var _i = rs.segpts.length / 2 - 1; + rs.midX = rs.segpts[_i]; + rs.midY = rs.segpts[_i + 1]; + } + } + }; + BRp$c.checkForInvalidEdgeWarning = function(edge) { + var rs = edge[0]._private.rscratch; + if (rs.nodesOverlap || number$12(rs.startX) && number$12(rs.startY) && number$12(rs.endX) && number$12(rs.endY)) { + rs.loggedErr = false; + } else { + if (!rs.loggedErr) { + rs.loggedErr = true; + warn("Edge `" + edge.id() + "` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."); + } + } + }; + BRp$c.findEdgeControlPoints = function(edges2) { + var _this = this; + if (!edges2 || edges2.length === 0) { + return; + } + var r = this; + var cy = r.cy; + var hasCompounds = cy.hasCompoundNodes(); + var hashTable = { + map: new Map$22(), + get: function get3(pairId2) { + var map2 = this.map.get(pairId2[0]); + if (map2 != null) { + return map2.get(pairId2[1]); + } else { + return null; + } + }, + set: function set3(pairId2, val) { + var map2 = this.map.get(pairId2[0]); + if (map2 == null) { + map2 = new Map$22(); + this.map.set(pairId2[0], map2); + } + map2.set(pairId2[1], val); + } + }; + var pairIds = []; + var haystackEdges = []; + for (var i3 = 0; i3 < edges2.length; i3++) { + var edge = edges2[i3]; + var _p = edge._private; + var curveStyle = edge.pstyle("curve-style").value; + if (edge.removed() || !edge.takesUpSpace()) { + continue; + } + if (curveStyle === "haystack") { + haystackEdges.push(edge); + continue; + } + var edgeIsUnbundled = curveStyle === "unbundled-bezier" || curveStyle === "segments" || curveStyle === "straight" || curveStyle === "straight-triangle" || curveStyle === "taxi"; + var edgeIsBezier = curveStyle === "unbundled-bezier" || curveStyle === "bezier"; + var src = _p.source; + var tgt = _p.target; + var srcIndex = src.poolIndex(); + var tgtIndex = tgt.poolIndex(); + var pairId = [srcIndex, tgtIndex].sort(); + var tableEntry = hashTable.get(pairId); + if (tableEntry == null) { + tableEntry = { + eles: [] + }; + hashTable.set(pairId, tableEntry); + pairIds.push(pairId); + } + tableEntry.eles.push(edge); + if (edgeIsUnbundled) { + tableEntry.hasUnbundled = true; + } + if (edgeIsBezier) { + tableEntry.hasBezier = true; + } + } + var _loop = function _loop2(p3) { + var pairId2 = pairIds[p3]; + var pairInfo = hashTable.get(pairId2); + var swappedpairInfo = void 0; + if (!pairInfo.hasUnbundled) { + var pllEdges = pairInfo.eles[0].parallelEdges().filter(function(e) { + return e.isBundledBezier(); + }); + clearArray(pairInfo.eles); + pllEdges.forEach(function(edge2) { + return pairInfo.eles.push(edge2); + }); + pairInfo.eles.sort(function(edge1, edge2) { + return edge1.poolIndex() - edge2.poolIndex(); + }); + } + var firstEdge = pairInfo.eles[0]; + var src2 = firstEdge.source(); + var tgt2 = firstEdge.target(); + if (src2.poolIndex() > tgt2.poolIndex()) { + var temp = src2; + src2 = tgt2; + tgt2 = temp; + } + var srcPos = pairInfo.srcPos = src2.position(); + var tgtPos = pairInfo.tgtPos = tgt2.position(); + var srcW = pairInfo.srcW = src2.outerWidth(); + var srcH = pairInfo.srcH = src2.outerHeight(); + var tgtW = pairInfo.tgtW = tgt2.outerWidth(); + var tgtH = pairInfo.tgtH = tgt2.outerHeight(); + var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src2)]; + var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt2)]; + pairInfo.dirCounts = { + "north": 0, + "west": 0, + "south": 0, + "east": 0, + "northwest": 0, + "southwest": 0, + "northeast": 0, + "southeast": 0 + }; + for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) { + var _edge = pairInfo.eles[_i2]; + var rs = _edge[0]._private.rscratch; + var _curveStyle = _edge.pstyle("curve-style").value; + var _edgeIsUnbundled = _curveStyle === "unbundled-bezier" || _curveStyle === "segments" || _curveStyle === "taxi"; + var edgeIsSwapped = !src2.same(_edge.source()); + if (!pairInfo.calculatedIntersection && src2 !== tgt2 && (pairInfo.hasBezier || pairInfo.hasUnbundled)) { + pairInfo.calculatedIntersection = true; + var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0); + var srcIntn = pairInfo.srcIntn = srcOutside; + var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0); + var tgtIntn = pairInfo.tgtIntn = tgtOutside; + var intersectionPts = pairInfo.intersectionPts = { + x1: srcOutside[0], + x2: tgtOutside[0], + y1: srcOutside[1], + y2: tgtOutside[1] + }; + var posPts = pairInfo.posPts = { + x1: srcPos.x, + x2: tgtPos.x, + y1: srcPos.y, + y2: tgtPos.y + }; + var dy = tgtOutside[1] - srcOutside[1]; + var dx = tgtOutside[0] - srcOutside[0]; + var l = Math.sqrt(dx * dx + dy * dy); + var vector = pairInfo.vector = { + x: dx, + y: dy + }; + var vectorNorm = pairInfo.vectorNorm = { + x: vector.x / l, + y: vector.y / l + }; + var vectorNormInverse = { + x: -vectorNorm.y, + y: vectorNorm.x + }; + pairInfo.nodesOverlap = !number$12(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y); + pairInfo.vectorNormInverse = vectorNormInverse; + swappedpairInfo = { + nodesOverlap: pairInfo.nodesOverlap, + dirCounts: pairInfo.dirCounts, + calculatedIntersection: true, + hasBezier: pairInfo.hasBezier, + hasUnbundled: pairInfo.hasUnbundled, + eles: pairInfo.eles, + srcPos: tgtPos, + tgtPos: srcPos, + srcW: tgtW, + srcH: tgtH, + tgtW: srcW, + tgtH: srcH, + srcIntn: tgtIntn, + tgtIntn: srcIntn, + srcShape: tgtShape, + tgtShape: srcShape, + posPts: { + x1: posPts.x2, + y1: posPts.y2, + x2: posPts.x1, + y2: posPts.y1 + }, + intersectionPts: { + x1: intersectionPts.x2, + y1: intersectionPts.y2, + x2: intersectionPts.x1, + y2: intersectionPts.y1 + }, + vector: { + x: -vector.x, + y: -vector.y + }, + vectorNorm: { + x: -vectorNorm.x, + y: -vectorNorm.y + }, + vectorNormInverse: { + x: -vectorNormInverse.x, + y: -vectorNormInverse.y + } + }; + } + var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo; + rs.nodesOverlap = passedPairInfo.nodesOverlap; + rs.srcIntn = passedPairInfo.srcIntn; + rs.tgtIntn = passedPairInfo.tgtIntn; + if (hasCompounds && (src2.isParent() || src2.isChild() || tgt2.isParent() || tgt2.isChild()) && (src2.parents().anySame(tgt2) || tgt2.parents().anySame(src2) || src2.same(tgt2) && src2.isParent())) { + _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (src2 === tgt2) { + _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (_curveStyle === "segments") { + _this.findSegmentsPoints(_edge, passedPairInfo); + } else if (_curveStyle === "taxi") { + _this.findTaxiPoints(_edge, passedPairInfo); + } else if (_curveStyle === "straight" || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) { + _this.findStraightEdgePoints(_edge); + } else { + _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped); + } + _this.findEndpoints(_edge); + _this.tryToCorrectInvalidPoints(_edge, passedPairInfo); + _this.checkForInvalidEdgeWarning(_edge); + _this.storeAllpts(_edge); + _this.storeEdgeProjections(_edge); + _this.calculateArrowAngles(_edge); + _this.recalculateEdgeLabelProjections(_edge); + _this.calculateLabelAngles(_edge); + } + }; + for (var p2 = 0; p2 < pairIds.length; p2++) { + _loop(p2); + } + this.findHaystackPoints(haystackEdges); + }; + function getPts(pts2) { + var retPts = []; + if (pts2 == null) { + return; + } + for (var i3 = 0; i3 < pts2.length; i3 += 2) { + var x2 = pts2[i3]; + var y2 = pts2[i3 + 1]; + retPts.push({ + x: x2, + y: y2 + }); + } + return retPts; + } + BRp$c.getSegmentPoints = function(edge) { + var rs = edge[0]._private.rscratch; + var type2 = rs.edgeType; + if (type2 === "segments") { + this.recalculateRenderedStyle(edge); + return getPts(rs.segpts); + } + }; + BRp$c.getControlPoints = function(edge) { + var rs = edge[0]._private.rscratch; + var type2 = rs.edgeType; + if (type2 === "bezier" || type2 === "multibezier" || type2 === "self" || type2 === "compound") { + this.recalculateRenderedStyle(edge); + return getPts(rs.ctrlpts); + } + }; + BRp$c.getEdgeMidpoint = function(edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + return { + x: rs.midX, + y: rs.midY + }; + }; + var BRp$b = {}; + BRp$b.manualEndptToPx = function(node2, prop) { + var r = this; + var npos = node2.position(); + var w2 = node2.outerWidth(); + var h = node2.outerHeight(); + if (prop.value.length === 2) { + var p2 = [prop.pfValue[0], prop.pfValue[1]]; + if (prop.units[0] === "%") { + p2[0] = p2[0] * w2; + } + if (prop.units[1] === "%") { + p2[1] = p2[1] * h; + } + p2[0] += npos.x; + p2[1] += npos.y; + return p2; + } else { + var angle = prop.pfValue[0]; + angle = -Math.PI / 2 + angle; + var l = 2 * Math.max(w2, h); + var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l]; + return r.nodeShapes[this.getNodeShape(node2)].intersectLine(npos.x, npos.y, w2, h, _p[0], _p[1], 0); + } + }; + BRp$b.findEndpoints = function(edge) { + var r = this; + var intersect2; + var source = edge.source()[0]; + var target = edge.target()[0]; + var srcPos = source.position(); + var tgtPos = target.position(); + var tgtArShape = edge.pstyle("target-arrow-shape").value; + var srcArShape = edge.pstyle("source-arrow-shape").value; + var tgtDist = edge.pstyle("target-distance-from-node").pfValue; + var srcDist = edge.pstyle("source-distance-from-node").pfValue; + var curveStyle = edge.pstyle("curve-style").value; + var rs = edge._private.rscratch; + var et = rs.edgeType; + var taxi = curveStyle === "taxi"; + var self2 = et === "self" || et === "compound"; + var bezier = et === "bezier" || et === "multibezier" || self2; + var multi = et !== "bezier"; + var lines = et === "straight" || et === "segments"; + var segments = et === "segments"; + var hasEndpts = bezier || multi || lines; + var overrideEndpts = self2 || taxi; + var srcManEndpt = edge.pstyle("source-endpoint"); + var srcManEndptVal = overrideEndpts ? "outside-to-node" : srcManEndpt.value; + var tgtManEndpt = edge.pstyle("target-endpoint"); + var tgtManEndptVal = overrideEndpts ? "outside-to-node" : tgtManEndpt.value; + rs.srcManEndpt = srcManEndpt; + rs.tgtManEndpt = tgtManEndpt; + var p1; + var p2; + var p1_i; + var p2_i; + if (bezier) { + var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]]; + var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart; + p1 = cpEnd; + p2 = cpStart; + } else if (lines) { + var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2); + var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2); + p1 = tgtArrowFromPt; + p2 = srcArrowFromPt; + } + if (tgtManEndptVal === "inside-to-node") { + intersect2 = [tgtPos.x, tgtPos.y]; + } else if (tgtManEndpt.units) { + intersect2 = this.manualEndptToPx(target, tgtManEndpt); + } else if (tgtManEndptVal === "outside-to-line") { + intersect2 = rs.tgtIntn; + } else { + if (tgtManEndptVal === "outside-to-node" || tgtManEndptVal === "outside-to-node-or-label") { + p1_i = p1; + } else if (tgtManEndptVal === "outside-to-line" || tgtManEndptVal === "outside-to-line-or-label") { + p1_i = [srcPos.x, srcPos.y]; + } + intersect2 = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0); + if (tgtManEndptVal === "outside-to-node-or-label" || tgtManEndptVal === "outside-to-line-or-label") { + var trs = target._private.rscratch; + var lw = trs.labelWidth; + var lh = trs.labelHeight; + var lx = trs.labelX; + var ly = trs.labelY; + var lw2 = lw / 2; + var lh2 = lh / 2; + var va = target.pstyle("text-valign").value; + if (va === "top") { + ly -= lh2; + } else if (va === "bottom") { + ly += lh2; + } + var ha = target.pstyle("text-halign").value; + if (ha === "left") { + lx -= lw2; + } else if (ha === "right") { + lx += lw2; + } + var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y); + if (labelIntersect.length > 0) { + var refPt = srcPos; + var intSqdist = sqdist(refPt, array2point(intersect2)); + var labIntSqdist = sqdist(refPt, array2point(labelIntersect)); + var minSqDist = intSqdist; + if (labIntSqdist < intSqdist) { + intersect2 = labelIntersect; + minSqDist = labIntSqdist; + } + if (labelIntersect.length > 2) { + var labInt2SqDist = sqdist(refPt, { + x: labelIntersect[2], + y: labelIntersect[3] + }); + if (labInt2SqDist < minSqDist) { + intersect2 = [labelIntersect[2], labelIntersect[3]]; + } + } + } + } + } + var arrowEnd = shortenIntersection(intersect2, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist); + var edgeEnd = shortenIntersection(intersect2, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist); + rs.endX = edgeEnd[0]; + rs.endY = edgeEnd[1]; + rs.arrowEndX = arrowEnd[0]; + rs.arrowEndY = arrowEnd[1]; + if (srcManEndptVal === "inside-to-node") { + intersect2 = [srcPos.x, srcPos.y]; + } else if (srcManEndpt.units) { + intersect2 = this.manualEndptToPx(source, srcManEndpt); + } else if (srcManEndptVal === "outside-to-line") { + intersect2 = rs.srcIntn; + } else { + if (srcManEndptVal === "outside-to-node" || srcManEndptVal === "outside-to-node-or-label") { + p2_i = p2; + } else if (srcManEndptVal === "outside-to-line" || srcManEndptVal === "outside-to-line-or-label") { + p2_i = [tgtPos.x, tgtPos.y]; + } + intersect2 = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0); + if (srcManEndptVal === "outside-to-node-or-label" || srcManEndptVal === "outside-to-line-or-label") { + var srs = source._private.rscratch; + var _lw = srs.labelWidth; + var _lh = srs.labelHeight; + var _lx = srs.labelX; + var _ly = srs.labelY; + var _lw2 = _lw / 2; + var _lh2 = _lh / 2; + var _va = source.pstyle("text-valign").value; + if (_va === "top") { + _ly -= _lh2; + } else if (_va === "bottom") { + _ly += _lh2; + } + var _ha = source.pstyle("text-halign").value; + if (_ha === "left") { + _lx -= _lw2; + } else if (_ha === "right") { + _lx += _lw2; + } + var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y); + if (_labelIntersect.length > 0) { + var _refPt = tgtPos; + var _intSqdist = sqdist(_refPt, array2point(intersect2)); + var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect)); + var _minSqDist = _intSqdist; + if (_labIntSqdist < _intSqdist) { + intersect2 = [_labelIntersect[0], _labelIntersect[1]]; + _minSqDist = _labIntSqdist; + } + if (_labelIntersect.length > 2) { + var _labInt2SqDist = sqdist(_refPt, { + x: _labelIntersect[2], + y: _labelIntersect[3] + }); + if (_labInt2SqDist < _minSqDist) { + intersect2 = [_labelIntersect[2], _labelIntersect[3]]; + } + } + } + } + } + var arrowStart = shortenIntersection(intersect2, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist); + var edgeStart = shortenIntersection(intersect2, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist); + rs.startX = edgeStart[0]; + rs.startY = edgeStart[1]; + rs.arrowStartX = arrowStart[0]; + rs.arrowStartY = arrowStart[1]; + if (hasEndpts) { + if (!number$12(rs.startX) || !number$12(rs.startY) || !number$12(rs.endX) || !number$12(rs.endY)) { + rs.badLine = true; + } else { + rs.badLine = false; + } + } + }; + BRp$b.getSourceEndpoint = function(edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case "haystack": + return { + x: rs.haystackPts[0], + y: rs.haystackPts[1] + }; + default: + return { + x: rs.arrowStartX, + y: rs.arrowStartY + }; + } + }; + BRp$b.getTargetEndpoint = function(edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case "haystack": + return { + x: rs.haystackPts[2], + y: rs.haystackPts[3] + }; + default: + return { + x: rs.arrowEndX, + y: rs.arrowEndY + }; + } + }; + var BRp$a = {}; + function pushBezierPts(r, edge, pts2) { + var qbezierAt$1 = function qbezierAt$12(p1, p22, p3, t) { + return qbezierAt(p1, p22, p3, t); + }; + var _p = edge._private; + var bpts = _p.rstyle.bezierPts; + for (var i3 = 0; i3 < r.bezierProjPcts.length; i3++) { + var p2 = r.bezierProjPcts[i3]; + bpts.push({ + x: qbezierAt$1(pts2[0], pts2[2], pts2[4], p2), + y: qbezierAt$1(pts2[1], pts2[3], pts2[5], p2) + }); + } + } + BRp$a.storeEdgeProjections = function(edge) { + var _p = edge._private; + var rs = _p.rscratch; + var et = rs.edgeType; + _p.rstyle.bezierPts = null; + _p.rstyle.linePts = null; + _p.rstyle.haystackPts = null; + if (et === "multibezier" || et === "bezier" || et === "self" || et === "compound") { + _p.rstyle.bezierPts = []; + for (var i3 = 0; i3 + 5 < rs.allpts.length; i3 += 4) { + pushBezierPts(this, edge, rs.allpts.slice(i3, i3 + 6)); + } + } else if (et === "segments") { + var lpts = _p.rstyle.linePts = []; + for (var i3 = 0; i3 + 1 < rs.allpts.length; i3 += 2) { + lpts.push({ + x: rs.allpts[i3], + y: rs.allpts[i3 + 1] + }); + } + } else if (et === "haystack") { + var hpts = rs.haystackPts; + _p.rstyle.haystackPts = [{ + x: hpts[0], + y: hpts[1] + }, { + x: hpts[2], + y: hpts[3] + }]; + } + _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.arrowShapeWidth; + }; + BRp$a.recalculateEdgeProjections = function(edges2) { + this.findEdgeControlPoints(edges2); + }; + var BRp$9 = {}; + BRp$9.recalculateNodeLabelProjection = function(node2) { + var content2 = node2.pstyle("label").strValue; + if (emptyString(content2)) { + return; + } + var textX, textY; + var _p = node2._private; + var nodeWidth = node2.width(); + var nodeHeight = node2.height(); + var padding2 = node2.padding(); + var nodePos = node2.position(); + var textHalign = node2.pstyle("text-halign").strValue; + var textValign = node2.pstyle("text-valign").strValue; + var rs = _p.rscratch; + var rstyle = _p.rstyle; + switch (textHalign) { + case "left": + textX = nodePos.x - nodeWidth / 2 - padding2; + break; + case "right": + textX = nodePos.x + nodeWidth / 2 + padding2; + break; + default: + textX = nodePos.x; + } + switch (textValign) { + case "top": + textY = nodePos.y - nodeHeight / 2 - padding2; + break; + case "bottom": + textY = nodePos.y + nodeHeight / 2 + padding2; + break; + default: + textY = nodePos.y; + } + rs.labelX = textX; + rs.labelY = textY; + rstyle.labelX = textX; + rstyle.labelY = textY; + this.calculateLabelAngles(node2); + this.applyLabelDimensions(node2); + }; + var lineAngleFromDelta = function lineAngleFromDelta2(dx, dy) { + var angle = Math.atan(dy / dx); + if (dx === 0 && angle < 0) { + angle = angle * -1; + } + return angle; + }; + var lineAngle = function lineAngle2(p0, p1) { + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + return lineAngleFromDelta(dx, dy); + }; + var bezierAngle = function bezierAngle2(p0, p1, p2, t) { + var t02 = bound(0, t - 1e-3, 1); + var t12 = bound(0, t + 1e-3, 1); + var lp0 = qbezierPtAt(p0, p1, p2, t02); + var lp1 = qbezierPtAt(p0, p1, p2, t12); + return lineAngle(lp0, lp1); + }; + BRp$9.recalculateEdgeLabelProjections = function(edge) { + var p2; + var _p = edge._private; + var rs = _p.rscratch; + var r = this; + var content2 = { + mid: edge.pstyle("label").strValue, + source: edge.pstyle("source-label").strValue, + target: edge.pstyle("target-label").strValue + }; + if (content2.mid || content2.source || content2.target) + ; + else { + return; + } + p2 = { + x: rs.midX, + y: rs.midY + }; + var setRs = function setRs2(propName, prefix, value2) { + setPrefixedProperty(_p.rscratch, propName, prefix, value2); + setPrefixedProperty(_p.rstyle, propName, prefix, value2); + }; + setRs("labelX", null, p2.x); + setRs("labelY", null, p2.y); + var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY); + setRs("labelAutoAngle", null, midAngle); + var createControlPointInfo = function createControlPointInfo2() { + if (createControlPointInfo2.cache) { + return createControlPointInfo2.cache; + } + var ctrlpts = []; + for (var i3 = 0; i3 + 5 < rs.allpts.length; i3 += 4) { + var p0 = { + x: rs.allpts[i3], + y: rs.allpts[i3 + 1] + }; + var p1 = { + x: rs.allpts[i3 + 2], + y: rs.allpts[i3 + 3] + }; + var p22 = { + x: rs.allpts[i3 + 4], + y: rs.allpts[i3 + 5] + }; + ctrlpts.push({ + p0, + p1, + p2: p22, + startDist: 0, + length: 0, + segments: [] + }); + } + var bpts = _p.rstyle.bezierPts; + var nProjs = r.bezierProjPcts.length; + function addSegment(cp2, p02, p12, t02, t12) { + var length2 = dist2(p02, p12); + var prevSegment = cp2.segments[cp2.segments.length - 1]; + var segment = { + p0: p02, + p1: p12, + t0: t02, + t1: t12, + startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0, + length: length2 + }; + cp2.segments.push(segment); + cp2.length += length2; + } + for (var _i = 0; _i < ctrlpts.length; _i++) { + var cp = ctrlpts[_i]; + var prevCp = ctrlpts[_i - 1]; + if (prevCp) { + cp.startDist = prevCp.startDist + prevCp.length; + } + addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); + for (var j = 0; j < nProjs - 1; j++) { + addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]); + } + addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); + } + return createControlPointInfo2.cache = ctrlpts; + }; + var calculateEndProjection = function calculateEndProjection2(prefix) { + var angle; + var isSrc = prefix === "source"; + if (!content2[prefix]) { + return; + } + var offset = edge.pstyle(prefix + "-text-offset").pfValue; + switch (rs.edgeType) { + case "self": + case "compound": + case "bezier": + case "multibezier": { + var cps = createControlPointInfo(); + var selected; + var startDist = 0; + var totalDist = 0; + for (var i3 = 0; i3 < cps.length; i3++) { + var _cp = cps[isSrc ? i3 : cps.length - 1 - i3]; + for (var j = 0; j < _cp.segments.length; j++) { + var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j]; + var lastSeg = i3 === cps.length - 1 && j === _cp.segments.length - 1; + startDist = totalDist; + totalDist += _seg.length; + if (totalDist >= offset || lastSeg) { + selected = { + cp: _cp, + segment: _seg + }; + break; + } + } + if (selected) { + break; + } + } + var cp = selected.cp; + var seg = selected.segment; + var tSegment = (offset - startDist) / seg.length; + var segDt = seg.t1 - seg.t0; + var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment; + t = bound(0, t, 1); + p2 = qbezierPtAt(cp.p0, cp.p1, cp.p2, t); + angle = bezierAngle(cp.p0, cp.p1, cp.p2, t); + break; + } + case "straight": + case "segments": + case "haystack": { + var d = 0, di, d0; + var p0, p1; + var l = rs.allpts.length; + for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) { + if (isSrc) { + p0 = { + x: rs.allpts[_i2], + y: rs.allpts[_i2 + 1] + }; + p1 = { + x: rs.allpts[_i2 + 2], + y: rs.allpts[_i2 + 3] + }; + } else { + p0 = { + x: rs.allpts[l - 2 - _i2], + y: rs.allpts[l - 1 - _i2] + }; + p1 = { + x: rs.allpts[l - 4 - _i2], + y: rs.allpts[l - 3 - _i2] + }; + } + di = dist2(p0, p1); + d0 = d; + d += di; + if (d >= offset) { + break; + } + } + var pD = offset - d0; + var _t = pD / di; + _t = bound(0, _t, 1); + p2 = lineAt(p0, p1, _t); + angle = lineAngle(p0, p1); + break; + } + } + setRs("labelX", prefix, p2.x); + setRs("labelY", prefix, p2.y); + setRs("labelAutoAngle", prefix, angle); + }; + calculateEndProjection("source"); + calculateEndProjection("target"); + this.applyLabelDimensions(edge); + }; + BRp$9.applyLabelDimensions = function(ele) { + this.applyPrefixedLabelDimensions(ele); + if (ele.isEdge()) { + this.applyPrefixedLabelDimensions(ele, "source"); + this.applyPrefixedLabelDimensions(ele, "target"); + } + }; + BRp$9.applyPrefixedLabelDimensions = function(ele, prefix) { + var _p = ele._private; + var text2 = this.getLabelText(ele, prefix); + var labelDims = this.calculateLabelDimensions(ele, text2); + var lineHeight = ele.pstyle("line-height").pfValue; + var textWrap = ele.pstyle("text-wrap").strValue; + var lines = getPrefixedProperty(_p.rscratch, "labelWrapCachedLines", prefix) || []; + var numLines = textWrap !== "wrap" ? 1 : Math.max(lines.length, 1); + var normPerLineHeight = labelDims.height / numLines; + var labelLineHeight = normPerLineHeight * lineHeight; + var width2 = labelDims.width; + var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight; + setPrefixedProperty(_p.rstyle, "labelWidth", prefix, width2); + setPrefixedProperty(_p.rscratch, "labelWidth", prefix, width2); + setPrefixedProperty(_p.rstyle, "labelHeight", prefix, height); + setPrefixedProperty(_p.rscratch, "labelHeight", prefix, height); + setPrefixedProperty(_p.rscratch, "labelLineHeight", prefix, labelLineHeight); + }; + BRp$9.getLabelText = function(ele, prefix) { + var _p = ele._private; + var pfd = prefix ? prefix + "-" : ""; + var text2 = ele.pstyle(pfd + "label").strValue; + var textTransform = ele.pstyle("text-transform").value; + var rscratch = function rscratch2(propName, value2) { + if (value2) { + setPrefixedProperty(_p.rscratch, propName, prefix, value2); + return value2; + } else { + return getPrefixedProperty(_p.rscratch, propName, prefix); + } + }; + if (!text2) { + return ""; + } + if (textTransform == "none") + ; + else if (textTransform == "uppercase") { + text2 = text2.toUpperCase(); + } else if (textTransform == "lowercase") { + text2 = text2.toLowerCase(); + } + var wrapStyle = ele.pstyle("text-wrap").value; + if (wrapStyle === "wrap") { + var labelKey = rscratch("labelKey"); + if (labelKey != null && rscratch("labelWrapKey") === labelKey) { + return rscratch("labelWrapCachedText"); + } + var zwsp = "​"; + var lines = text2.split("\n"); + var maxW = ele.pstyle("text-max-width").pfValue; + var overflow = ele.pstyle("text-overflow-wrap").value; + var overflowAny = overflow === "anywhere"; + var wrappedLines = []; + var wordsRegex = /[\s\u200b]+/; + var wordSeparator = overflowAny ? "" : " "; + for (var l = 0; l < lines.length; l++) { + var line2 = lines[l]; + var lineDims = this.calculateLabelDimensions(ele, line2); + var lineW = lineDims.width; + if (overflowAny) { + var processedLine = line2.split("").join(zwsp); + line2 = processedLine; + } + if (lineW > maxW) { + var words = line2.split(wordsRegex); + var subline = ""; + for (var w2 = 0; w2 < words.length; w2++) { + var word = words[w2]; + var testLine = subline.length === 0 ? word : subline + wordSeparator + word; + var testDims = this.calculateLabelDimensions(ele, testLine); + var testW = testDims.width; + if (testW <= maxW) { + subline += word + wordSeparator; + } else { + if (subline) { + wrappedLines.push(subline); + } + subline = word + wordSeparator; + } + } + if (!subline.match(/^[\s\u200b]+$/)) { + wrappedLines.push(subline); + } + } else { + wrappedLines.push(line2); + } + } + rscratch("labelWrapCachedLines", wrappedLines); + text2 = rscratch("labelWrapCachedText", wrappedLines.join("\n")); + rscratch("labelWrapKey", labelKey); + } else if (wrapStyle === "ellipsis") { + var _maxW = ele.pstyle("text-max-width").pfValue; + var ellipsized = ""; + var ellipsis = "…"; + var incLastCh = false; + if (this.calculateLabelDimensions(ele, text2).width < _maxW) { + return text2; + } + for (var i3 = 0; i3 < text2.length; i3++) { + var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text2[i3] + ellipsis).width; + if (widthWithNextCh > _maxW) { + break; + } + ellipsized += text2[i3]; + if (i3 === text2.length - 1) { + incLastCh = true; + } + } + if (!incLastCh) { + ellipsized += ellipsis; + } + return ellipsized; + } + return text2; + }; + BRp$9.getLabelJustification = function(ele) { + var justification = ele.pstyle("text-justification").strValue; + var textHalign = ele.pstyle("text-halign").strValue; + if (justification === "auto") { + if (ele.isNode()) { + switch (textHalign) { + case "left": + return "right"; + case "right": + return "left"; + default: + return "center"; + } + } else { + return "center"; + } + } else { + return justification; + } + }; + BRp$9.calculateLabelDimensions = function(ele, text2) { + var r = this; + var cacheKey = hashString(text2, ele._private.labelDimsKey); + var cache2 = r.labelDimCache || (r.labelDimCache = []); + var existingVal = cache2[cacheKey]; + if (existingVal != null) { + return existingVal; + } + var padding2 = 0; + var fStyle = ele.pstyle("font-style").strValue; + var size2 = ele.pstyle("font-size").pfValue; + var family = ele.pstyle("font-family").strValue; + var weight = ele.pstyle("font-weight").strValue; + var canvas = this.labelCalcCanvas; + var c2d = this.labelCalcCanvasContext; + if (!canvas) { + canvas = this.labelCalcCanvas = document.createElement("canvas"); + c2d = this.labelCalcCanvasContext = canvas.getContext("2d"); + var ds = canvas.style; + ds.position = "absolute"; + ds.left = "-9999px"; + ds.top = "-9999px"; + ds.zIndex = "-1"; + ds.visibility = "hidden"; + ds.pointerEvents = "none"; + } + c2d.font = "".concat(fStyle, " ").concat(weight, " ").concat(size2, "px ").concat(family); + var width2 = 0; + var height = 0; + var lines = text2.split("\n"); + for (var i3 = 0; i3 < lines.length; i3++) { + var line2 = lines[i3]; + var metrics = c2d.measureText(line2); + var w2 = Math.ceil(metrics.width); + var h = size2; + width2 = Math.max(w2, width2); + height += h; + } + width2 += padding2; + height += padding2; + return cache2[cacheKey] = { + width: width2, + height + }; + }; + BRp$9.calculateLabelAngle = function(ele, prefix) { + var _p = ele._private; + var rs = _p.rscratch; + var isEdge = ele.isEdge(); + var prefixDash = prefix ? prefix + "-" : ""; + var rot = ele.pstyle(prefixDash + "text-rotation"); + var rotStr = rot.strValue; + if (rotStr === "none") { + return 0; + } else if (isEdge && rotStr === "autorotate") { + return rs.labelAutoAngle; + } else if (rotStr === "autorotate") { + return 0; + } else { + return rot.pfValue; + } + }; + BRp$9.calculateLabelAngles = function(ele) { + var r = this; + var isEdge = ele.isEdge(); + var _p = ele._private; + var rs = _p.rscratch; + rs.labelAngle = r.calculateLabelAngle(ele); + if (isEdge) { + rs.sourceLabelAngle = r.calculateLabelAngle(ele, "source"); + rs.targetLabelAngle = r.calculateLabelAngle(ele, "target"); + } + }; + var BRp$8 = {}; + var TOO_SMALL_CUT_RECT = 28; + var warnedCutRect = false; + BRp$8.getNodeShape = function(node2) { + var r = this; + var shape = node2.pstyle("shape").value; + if (shape === "cutrectangle" && (node2.width() < TOO_SMALL_CUT_RECT || node2.height() < TOO_SMALL_CUT_RECT)) { + if (!warnedCutRect) { + warn("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"); + warnedCutRect = true; + } + return "rectangle"; + } + if (node2.isParent()) { + if (shape === "rectangle" || shape === "roundrectangle" || shape === "round-rectangle" || shape === "cutrectangle" || shape === "cut-rectangle" || shape === "barrel") { + return shape; + } else { + return "rectangle"; + } + } + if (shape === "polygon") { + var points = node2.pstyle("shape-polygon-points").value; + return r.nodeShapes.makePolygon(points).name; + } + return shape; + }; + var BRp$7 = {}; + BRp$7.registerCalculationListeners = function() { + var cy = this.cy; + var elesToUpdate = cy.collection(); + var r = this; + var enqueue = function enqueue2(eles) { + var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + elesToUpdate.merge(eles); + if (dirtyStyleCaches) { + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var _p = ele._private; + var rstyle = _p.rstyle; + rstyle.clean = false; + rstyle.cleanConnected = false; + } + } + }; + r.binder(cy).on("bounds.* dirty.*", function onDirtyBounds(e) { + var ele = e.target; + enqueue(ele); + }).on("style.* background.*", function onDirtyStyle(e) { + var ele = e.target; + enqueue(ele, false); + }); + var updateEleCalcs = function updateEleCalcs2(willDraw) { + if (willDraw) { + var fns = r.onUpdateEleCalcsFns; + elesToUpdate.cleanStyle(); + for (var i3 = 0; i3 < elesToUpdate.length; i3++) { + var ele = elesToUpdate[i3]; + var rstyle = ele._private.rstyle; + if (ele.isNode() && !rstyle.cleanConnected) { + enqueue(ele.connectedEdges()); + rstyle.cleanConnected = true; + } + } + if (fns) { + for (var _i = 0; _i < fns.length; _i++) { + var fn2 = fns[_i]; + fn2(willDraw, elesToUpdate); + } + } + r.recalculateRenderedStyle(elesToUpdate); + elesToUpdate = cy.collection(); + } + }; + r.flushRenderedStyleQueue = function() { + updateEleCalcs(true); + }; + r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs); + }; + BRp$7.onUpdateEleCalcs = function(fn2) { + var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; + fns.push(fn2); + }; + BRp$7.recalculateRenderedStyle = function(eles, useCache) { + var isCleanConnected = function isCleanConnected2(ele2) { + return ele2._private.rstyle.cleanConnected; + }; + var edges2 = []; + var nodes2 = []; + if (this.destroyed) { + return; + } + if (useCache === void 0) { + useCache = true; + } + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var _p = ele._private; + var rstyle = _p.rstyle; + if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) { + rstyle.clean = false; + } + if (useCache && rstyle.clean || ele.removed()) { + continue; + } + if (ele.pstyle("display").value === "none") { + continue; + } + if (_p.group === "nodes") { + nodes2.push(ele); + } else { + edges2.push(ele); + } + rstyle.clean = true; + } + for (var _i2 = 0; _i2 < nodes2.length; _i2++) { + var _ele = nodes2[_i2]; + var _p2 = _ele._private; + var _rstyle = _p2.rstyle; + var pos = _ele.position(); + this.recalculateNodeLabelProjection(_ele); + _rstyle.nodeX = pos.x; + _rstyle.nodeY = pos.y; + _rstyle.nodeW = _ele.pstyle("width").pfValue; + _rstyle.nodeH = _ele.pstyle("height").pfValue; + } + this.recalculateEdgeProjections(edges2); + for (var _i3 = 0; _i3 < edges2.length; _i3++) { + var _ele2 = edges2[_i3]; + var _p3 = _ele2._private; + var _rstyle2 = _p3.rstyle; + var rs = _p3.rscratch; + _rstyle2.srcX = rs.arrowStartX; + _rstyle2.srcY = rs.arrowStartY; + _rstyle2.tgtX = rs.arrowEndX; + _rstyle2.tgtY = rs.arrowEndY; + _rstyle2.midX = rs.midX; + _rstyle2.midY = rs.midY; + _rstyle2.labelAngle = rs.labelAngle; + _rstyle2.sourceLabelAngle = rs.sourceLabelAngle; + _rstyle2.targetLabelAngle = rs.targetLabelAngle; + } + }; + var BRp$6 = {}; + BRp$6.updateCachedGrabbedEles = function() { + var eles = this.cachedZSortedEles; + if (!eles) { + return; + } + eles.drag = []; + eles.nondrag = []; + var grabTargets = []; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var rs = ele._private.rscratch; + if (ele.grabbed() && !ele.isParent()) { + grabTargets.push(ele); + } else if (rs.inDragLayer) { + eles.drag.push(ele); + } else { + eles.nondrag.push(ele); + } + } + for (var i3 = 0; i3 < grabTargets.length; i3++) { + var ele = grabTargets[i3]; + eles.drag.push(ele); + } + }; + BRp$6.invalidateCachedZSortedEles = function() { + this.cachedZSortedEles = null; + }; + BRp$6.getCachedZSortedEles = function(forceRecalc) { + if (forceRecalc || !this.cachedZSortedEles) { + var eles = this.cy.mutableElements().toArray(); + eles.sort(zIndexSort); + eles.interactive = eles.filter(function(ele) { + return ele.interactive(); + }); + this.cachedZSortedEles = eles; + this.updateCachedGrabbedEles(); + } else { + eles = this.cachedZSortedEles; + } + return eles; + }; + var BRp$5 = {}; + [BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function(props) { + extend2(BRp$5, props); + }); + var BRp$4 = {}; + BRp$4.getCachedImage = function(url, crossOrigin, onLoad) { + var r = this; + var imageCache = r.imageCache = r.imageCache || {}; + var cache2 = imageCache[url]; + if (cache2) { + if (!cache2.image.complete) { + cache2.image.addEventListener("load", onLoad); + } + return cache2.image; + } else { + cache2 = imageCache[url] = imageCache[url] || {}; + var image = cache2.image = new Image(); + image.addEventListener("load", onLoad); + image.addEventListener("error", function() { + image.error = true; + }); + var dataUriPrefix = "data:"; + var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix; + if (!isDataUri) { + image.crossOrigin = crossOrigin; + } + image.src = url; + return image; + } + }; + var BRp$3 = {}; + BRp$3.registerBinding = function(target, event2, handler, useCapture) { + var args = Array.prototype.slice.apply(arguments, [1]); + var b = this.binder(target); + return b.on.apply(b, args); + }; + BRp$3.binder = function(tgt) { + var r = this; + var tgtIsDom = tgt === window || tgt === document || tgt === document.body || domElement(tgt); + if (r.supportsPassiveEvents == null) { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, "passive", { + get: function get3() { + supportsPassive = true; + return true; + } + }); + window.addEventListener("test", null, opts); + } catch (err) { + } + r.supportsPassiveEvents = supportsPassive; + } + var on = function on2(event2, handler, useCapture) { + var args = Array.prototype.slice.call(arguments); + if (tgtIsDom && r.supportsPassiveEvents) { + args[2] = { + capture: useCapture != null ? useCapture : false, + passive: false, + once: false + }; + } + r.bindings.push({ + target: tgt, + args + }); + (tgt.addEventListener || tgt.on).apply(tgt, args); + return this; + }; + return { + on, + addEventListener: on, + addListener: on, + bind: on + }; + }; + BRp$3.nodeIsDraggable = function(node2) { + return node2 && node2.isNode() && !node2.locked() && node2.grabbable(); + }; + BRp$3.nodeIsGrabbable = function(node2) { + return this.nodeIsDraggable(node2) && node2.interactive(); + }; + BRp$3.load = function() { + var r = this; + var isSelected = function isSelected2(ele) { + return ele.selected(); + }; + var triggerEvents = function triggerEvents2(target, names, e, position3) { + if (target == null) { + target = r.cy; + } + for (var i3 = 0; i3 < names.length; i3++) { + var name2 = names[i3]; + target.emit({ + originalEvent: e, + type: name2, + position: position3 + }); + } + }; + var isMultSelKeyDown = function isMultSelKeyDown2(e) { + return e.shiftKey || e.metaKey || e.ctrlKey; + }; + var allowPanningPassthrough = function allowPanningPassthrough2(down, downs) { + var allowPassthrough = true; + if (r.cy.hasCompoundNodes() && down && down.pannable()) { + for (var i3 = 0; downs && i3 < downs.length; i3++) { + var down = downs[i3]; + if (down.isNode() && down.isParent() && !down.pannable()) { + allowPassthrough = false; + break; + } + } + } else { + allowPassthrough = true; + } + return allowPassthrough; + }; + var setGrabbed = function setGrabbed2(ele) { + ele[0]._private.grabbed = true; + }; + var setFreed = function setFreed2(ele) { + ele[0]._private.grabbed = false; + }; + var setInDragLayer = function setInDragLayer2(ele) { + ele[0]._private.rscratch.inDragLayer = true; + }; + var setOutDragLayer = function setOutDragLayer2(ele) { + ele[0]._private.rscratch.inDragLayer = false; + }; + var setGrabTarget = function setGrabTarget2(ele) { + ele[0]._private.rscratch.isGrabTarget = true; + }; + var removeGrabTarget = function removeGrabTarget2(ele) { + ele[0]._private.rscratch.isGrabTarget = false; + }; + var addToDragList = function addToDragList2(ele, opts) { + var list2 = opts.addToList; + var listHasEle = list2.has(ele); + if (!listHasEle && ele.grabbable() && !ele.locked()) { + list2.merge(ele); + setGrabbed(ele); + } + }; + var addDescendantsToDrag = function addDescendantsToDrag2(node2, opts) { + if (!node2.cy().hasCompoundNodes()) { + return; + } + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } + var innerNodes = node2.descendants(); + if (opts.inDragLayer) { + innerNodes.forEach(setInDragLayer); + innerNodes.connectedEdges().forEach(setInDragLayer); + } + if (opts.addToList) { + addToDragList(innerNodes, opts); + } + }; + var addNodesToDrag = function addNodesToDrag2(nodes2, opts) { + opts = opts || {}; + var hasCompoundNodes = nodes2.cy().hasCompoundNodes(); + if (opts.inDragLayer) { + nodes2.forEach(setInDragLayer); + nodes2.neighborhood().stdFilter(function(ele) { + return !hasCompoundNodes || ele.isEdge(); + }).forEach(setInDragLayer); + } + if (opts.addToList) { + nodes2.forEach(function(ele) { + addToDragList(ele, opts); + }); + } + addDescendantsToDrag(nodes2, opts); + updateAncestorsInDragLayer(nodes2, { + inDragLayer: opts.inDragLayer + }); + r.updateCachedGrabbedEles(); + }; + var addNodeToDrag = addNodesToDrag; + var freeDraggedElements = function freeDraggedElements2(grabbedEles) { + if (!grabbedEles) { + return; + } + r.getCachedZSortedEles().forEach(function(ele) { + setFreed(ele); + setOutDragLayer(ele); + removeGrabTarget(ele); + }); + r.updateCachedGrabbedEles(); + }; + var updateAncestorsInDragLayer = function updateAncestorsInDragLayer2(node2, opts) { + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } + if (!node2.cy().hasCompoundNodes()) { + return; + } + var parent = node2.ancestors().orphans(); + if (parent.same(node2)) { + return; + } + var nodes2 = parent.descendants().spawnSelf().merge(parent).unmerge(node2).unmerge(node2.descendants()); + var edges2 = nodes2.connectedEdges(); + if (opts.inDragLayer) { + edges2.forEach(setInDragLayer); + nodes2.forEach(setInDragLayer); + } + if (opts.addToList) { + nodes2.forEach(function(ele) { + addToDragList(ele, opts); + }); + } + }; + var blurActiveDomElement = function blurActiveDomElement2() { + if (document.activeElement != null && document.activeElement.blur != null) { + document.activeElement.blur(); + } + }; + var haveMutationsApi = typeof MutationObserver !== "undefined"; + var haveResizeObserverApi = typeof ResizeObserver !== "undefined"; + if (haveMutationsApi) { + r.removeObserver = new MutationObserver(function(mutns) { + for (var i3 = 0; i3 < mutns.length; i3++) { + var mutn = mutns[i3]; + var rNodes = mutn.removedNodes; + if (rNodes) { + for (var j = 0; j < rNodes.length; j++) { + var rNode = rNodes[j]; + if (rNode === r.container) { + r.destroy(); + break; + } + } + } + } + }); + if (r.container.parentNode) { + r.removeObserver.observe(r.container.parentNode, { + childList: true + }); + } + } else { + r.registerBinding(r.container, "DOMNodeRemoved", function(e) { + r.destroy(); + }); + } + var onResize = debounce_1(function() { + r.cy.resize(); + }, 100); + if (haveMutationsApi) { + r.styleObserver = new MutationObserver(onResize); + r.styleObserver.observe(r.container, { + attributes: true + }); + } + r.registerBinding(window, "resize", onResize); + if (haveResizeObserverApi) { + r.resizeObserver = new ResizeObserver(onResize); + r.resizeObserver.observe(r.container); + } + var forEachUp = function forEachUp2(domEle, fn2) { + while (domEle != null) { + fn2(domEle); + domEle = domEle.parentNode; + } + }; + var invalidateCoords = function invalidateCoords2() { + r.invalidateContainerClientCoordsCache(); + }; + forEachUp(r.container, function(domEle) { + r.registerBinding(domEle, "transitionend", invalidateCoords); + r.registerBinding(domEle, "animationend", invalidateCoords); + r.registerBinding(domEle, "scroll", invalidateCoords); + }); + r.registerBinding(r.container, "contextmenu", function(e) { + e.preventDefault(); + }); + var inBoxSelection = function inBoxSelection2() { + return r.selection[4] !== 0; + }; + var eventInContainer = function eventInContainer2(e) { + var containerPageCoords = r.findContainerClientCoords(); + var x2 = containerPageCoords[0]; + var y2 = containerPageCoords[1]; + var width2 = containerPageCoords[2]; + var height = containerPageCoords[3]; + var positions = e.touches ? e.touches : [e]; + var atLeastOnePosInside = false; + for (var i3 = 0; i3 < positions.length; i3++) { + var p2 = positions[i3]; + if (x2 <= p2.clientX && p2.clientX <= x2 + width2 && y2 <= p2.clientY && p2.clientY <= y2 + height) { + atLeastOnePosInside = true; + break; + } + } + if (!atLeastOnePosInside) { + return false; + } + var container = r.container; + var target = e.target; + var tParent = target.parentNode; + var containerIsTarget = false; + while (tParent) { + if (tParent === container) { + containerIsTarget = true; + break; + } + tParent = tParent.parentNode; + } + if (!containerIsTarget) { + return false; + } + return true; + }; + r.registerBinding(r.container, "mousedown", function mousedownHandler(e) { + if (!eventInContainer(e)) { + return; + } + e.preventDefault(); + blurActiveDomElement(); + r.hoverData.capture = true; + r.hoverData.which = e.which; + var cy = r.cy; + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var select = r.selection; + var nears = r.findNearestElements(pos[0], pos[1], true, false); + var near = nears[0]; + var draggedElements = r.dragData.possibleDragElements; + r.hoverData.mdownPos = pos; + r.hoverData.mdownGPos = gpos; + var checkForTaphold = function checkForTaphold2() { + r.hoverData.tapholdCancelled = false; + clearTimeout(r.hoverData.tapholdTimeout); + r.hoverData.tapholdTimeout = setTimeout(function() { + if (r.hoverData.tapholdCancelled) { + return; + } else { + var ele = r.hoverData.down; + if (ele) { + ele.emit({ + originalEvent: e, + type: "taphold", + position: { + x: pos[0], + y: pos[1] + } + }); + } else { + cy.emit({ + originalEvent: e, + type: "taphold", + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + }, r.tapholdDuration); + }; + if (e.which == 3) { + r.hoverData.cxtStarted = true; + var cxtEvt = { + originalEvent: e, + type: "cxttapstart", + position: { + x: pos[0], + y: pos[1] + } + }; + if (near) { + near.activate(); + near.emit(cxtEvt); + r.hoverData.down = near; + } else { + cy.emit(cxtEvt); + } + r.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); + r.hoverData.cxtDragged = false; + } else if (e.which == 1) { + if (near) { + near.activate(); + } + { + if (near != null) { + if (r.nodeIsGrabbable(near)) { + var makeEvent = function makeEvent2(type2) { + return { + originalEvent: e, + type: type2, + position: { + x: pos[0], + y: pos[1] + } + }; + }; + var triggerGrab = function triggerGrab2(ele) { + ele.emit(makeEvent("grab")); + }; + setGrabTarget(near); + if (!near.selected()) { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + addNodeToDrag(near, { + addToList: draggedElements + }); + near.emit(makeEvent("grabon")).emit(makeEvent("grab")); + } else { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + var selectedNodes = cy.$(function(ele) { + return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedElements + }); + near.emit(makeEvent("grabon")); + selectedNodes.forEach(triggerGrab); + } + r.redrawHint("eles", true); + r.redrawHint("drag", true); + } + } + r.hoverData.down = near; + r.hoverData.downs = nears; + r.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); + } + triggerEvents(near, ["mousedown", "tapstart", "vmousedown"], e, { + x: pos[0], + y: pos[1] + }); + if (near == null) { + select[4] = 1; + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint("select", true); + r.redraw(); + } else if (near.pannable()) { + select[4] = 1; + } + checkForTaphold(); + } + select[0] = select[2] = pos[0]; + select[1] = select[3] = pos[1]; + }, false); + r.registerBinding(window, "mousemove", function mousemoveHandler(e) { + var capture = r.hoverData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var preventDefault = false; + var cy = r.cy; + var zoom = cy.zoom(); + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var mdownPos = r.hoverData.mdownPos; + var mdownGPos = r.hoverData.mdownGPos; + var select = r.selection; + var near = null; + if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) { + near = r.findNearestElement(pos[0], pos[1], true, false); + } + var last2 = r.hoverData.last; + var down = r.hoverData.down; + var disp = [pos[0] - select[2], pos[1] - select[3]]; + var draggedElements = r.dragData.possibleDragElements; + var isOverThresholdDrag; + if (mdownGPos) { + var dx = gpos[0] - mdownGPos[0]; + var dx2 = dx * dx; + var dy = gpos[1] - mdownGPos[1]; + var dy2 = dy * dy; + var dist22 = dx2 + dy2; + r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist22 >= r.desktopTapThreshold2; + } + var multSelKeyDown = isMultSelKeyDown(e); + if (isOverThresholdDrag) { + r.hoverData.tapholdCancelled = true; + } + var updateDragDelta = function updateDragDelta2() { + var dragDelta2 = r.hoverData.dragDelta = r.hoverData.dragDelta || []; + if (dragDelta2.length === 0) { + dragDelta2.push(disp[0]); + dragDelta2.push(disp[1]); + } else { + dragDelta2[0] += disp[0]; + dragDelta2[1] += disp[1]; + } + }; + preventDefault = true; + triggerEvents(near, ["mousemove", "vmousemove", "tapdrag"], e, { + x: pos[0], + y: pos[1] + }); + var goIntoBoxMode = function goIntoBoxMode2() { + r.data.bgActivePosistion = void 0; + if (!r.hoverData.selecting) { + cy.emit({ + originalEvent: e, + type: "boxstart", + position: { + x: pos[0], + y: pos[1] + } + }); + } + select[4] = 1; + r.hoverData.selecting = true; + r.redrawHint("select", true); + r.redraw(); + }; + if (r.hoverData.which === 3) { + if (isOverThresholdDrag) { + var cxtEvt = { + originalEvent: e, + type: "cxtdrag", + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + r.hoverData.cxtDragged = true; + if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) { + if (r.hoverData.cxtOver) { + r.hoverData.cxtOver.emit({ + originalEvent: e, + type: "cxtdragout", + position: { + x: pos[0], + y: pos[1] + } + }); + } + r.hoverData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: "cxtdragover", + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + } + } else if (r.hoverData.dragging) { + preventDefault = true; + if (cy.panningEnabled() && cy.userPanningEnabled()) { + var deltaP; + if (r.hoverData.justStartedPan) { + var mdPos = r.hoverData.mdownPos; + deltaP = { + x: (pos[0] - mdPos[0]) * zoom, + y: (pos[1] - mdPos[1]) * zoom + }; + r.hoverData.justStartedPan = false; + } else { + deltaP = { + x: disp[0] * zoom, + y: disp[1] * zoom + }; + } + cy.panBy(deltaP); + cy.emit("dragpan"); + r.hoverData.dragged = true; + } + pos = r.projectIntoViewport(e.clientX, e.clientY); + } else if (select[4] == 1 && (down == null || down.pannable())) { + if (isOverThresholdDrag) { + if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) { + goIntoBoxMode(); + } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs); + if (allowPassthrough) { + r.hoverData.dragging = true; + r.hoverData.justStartedPan = true; + select[4] = 0; + r.data.bgActivePosistion = array2point(mdownPos); + r.redrawHint("select", true); + r.redraw(); + } + } + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + } + } else { + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + if ((!down || !down.grabbed()) && near != last2) { + if (last2) { + triggerEvents(last2, ["mouseout", "tapdragout"], e, { + x: pos[0], + y: pos[1] + }); + } + if (near) { + triggerEvents(near, ["mouseover", "tapdragover"], e, { + x: pos[0], + y: pos[1] + }); + } + r.hoverData.last = near; + } + if (down) { + if (isOverThresholdDrag) { + if (cy.boxSelectionEnabled() && multSelKeyDown) { + if (down && down.grabbed()) { + freeDraggedElements(draggedElements); + down.emit("freeon"); + draggedElements.emit("free"); + if (r.dragData.didDrag) { + down.emit("dragfreeon"); + draggedElements.emit("dragfree"); + } + } + goIntoBoxMode(); + } else if (down && down.grabbed() && r.nodeIsDraggable(down)) { + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + r.redrawHint("eles", true); + } + r.dragData.didDrag = true; + if (!r.hoverData.draggingEles) { + addNodesToDrag(draggedElements, { + inDragLayer: true + }); + } + var totalShift = { + x: 0, + y: 0 + }; + if (number$12(disp[0]) && number$12(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + var dragDelta = r.hoverData.dragDelta; + if (dragDelta && number$12(dragDelta[0]) && number$12(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedElements.silentShift(totalShift).emit("position drag"); + r.redrawHint("drag", true); + r.redraw(); + } + } else { + updateDragDelta(); + } + } + preventDefault = true; + } + select[2] = pos[0]; + select[3] = pos[1]; + if (preventDefault) { + if (e.stopPropagation) + e.stopPropagation(); + if (e.preventDefault) + e.preventDefault(); + return false; + } + }, false); + var clickTimeout, didDoubleClick, prevClickTimeStamp; + r.registerBinding(window, "mouseup", function mouseupHandler(e) { + var capture = r.hoverData.capture; + if (!capture) { + return; + } + r.hoverData.capture = false; + var cy = r.cy; + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var select = r.selection; + var near = r.findNearestElement(pos[0], pos[1], true, false); + var draggedElements = r.dragData.possibleDragElements; + var down = r.hoverData.down; + var multSelKeyDown = isMultSelKeyDown(e); + if (r.data.bgActivePosistion) { + r.redrawHint("select", true); + r.redraw(); + } + r.hoverData.tapholdCancelled = true; + r.data.bgActivePosistion = void 0; + if (down) { + down.unactivate(); + } + if (r.hoverData.which === 3) { + var cxtEvt = { + originalEvent: e, + type: "cxttapend", + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (!r.hoverData.cxtDragged) { + var cxtTap = { + originalEvent: e, + type: "cxttap", + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtTap); + } else { + cy.emit(cxtTap); + } + } + r.hoverData.cxtDragged = false; + r.hoverData.which = null; + } else if (r.hoverData.which === 1) { + triggerEvents(near, ["mouseup", "tapend", "vmouseup"], e, { + x: pos[0], + y: pos[1] + }); + if (!r.dragData.didDrag && // didn't move a node around + !r.hoverData.dragged && // didn't pan + !r.hoverData.selecting && // not box selection + !r.hoverData.isOverThresholdDrag) { + triggerEvents(down, ["click", "tap", "vclick"], e, { + x: pos[0], + y: pos[1] + }); + didDoubleClick = false; + if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { + clickTimeout && clearTimeout(clickTimeout); + didDoubleClick = true; + prevClickTimeStamp = null; + triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { + x: pos[0], + y: pos[1] + }); + } else { + clickTimeout = setTimeout(function() { + if (didDoubleClick) + return; + triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { + x: pos[0], + y: pos[1] + }); + }, cy.multiClickDebounceTime()); + prevClickTimeStamp = e.timeStamp; + } + } + if (down == null && !r.dragData.didDrag && !r.hoverData.selecting && !r.hoverData.dragged && !isMultSelKeyDown(e)) { + cy.$(isSelected).unselect(["tapunselect"]); + if (draggedElements.length > 0) { + r.redrawHint("eles", true); + } + r.dragData.possibleDragElements = draggedElements = cy.collection(); + } + if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) { + if (near != null && near._private.selectable) { + if (r.hoverData.dragging) + ; + else if (cy.selectionType() === "additive" || multSelKeyDown) { + if (near.selected()) { + near.unselect(["tapunselect"]); + } else { + near.select(["tapselect"]); + } + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(near).unselect(["tapunselect"]); + near.select(["tapselect"]); + } + } + r.redrawHint("eles", true); + } + } + if (r.hoverData.selecting) { + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + r.redrawHint("select", true); + if (box.length > 0) { + r.redrawHint("eles", true); + } + cy.emit({ + type: "boxend", + originalEvent: e, + position: { + x: pos[0], + y: pos[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected2(ele) { + return ele.selectable() && !ele.selected(); + }; + if (cy.selectionType() === "additive") { + box.emit("box").stdFilter(eleWouldBeSelected).select().emit("boxselect"); + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(box).unselect(); + } + box.emit("box").stdFilter(eleWouldBeSelected).select().emit("boxselect"); + } + r.redraw(); + } + if (r.hoverData.dragging) { + r.hoverData.dragging = false; + r.redrawHint("select", true); + r.redrawHint("eles", true); + r.redraw(); + } + if (!select[4]) { + r.redrawHint("drag", true); + r.redrawHint("eles", true); + var downWasGrabbed = down && down.grabbed(); + freeDraggedElements(draggedElements); + if (downWasGrabbed) { + down.emit("freeon"); + draggedElements.emit("free"); + if (r.dragData.didDrag) { + down.emit("dragfreeon"); + draggedElements.emit("dragfree"); + } + } + } + } + select[4] = 0; + r.hoverData.down = null; + r.hoverData.cxtStarted = false; + r.hoverData.draggingEles = false; + r.hoverData.selecting = false; + r.hoverData.isOverThresholdDrag = false; + r.dragData.didDrag = false; + r.hoverData.dragged = false; + r.hoverData.dragDelta = []; + r.hoverData.mdownPos = null; + r.hoverData.mdownGPos = null; + }, false); + var wheelHandler = function wheelHandler2(e) { + if (r.scrollingPage) { + return; + } + var cy = r.cy; + var zoom = cy.zoom(); + var pan = cy.pan(); + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y]; + if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) { + e.preventDefault(); + return; + } + if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) { + e.preventDefault(); + r.data.wheelZooming = true; + clearTimeout(r.data.wheelTimeout); + r.data.wheelTimeout = setTimeout(function() { + r.data.wheelZooming = false; + r.redrawHint("eles", true); + r.redraw(); + }, 150); + var diff; + if (e.deltaY != null) { + diff = e.deltaY / -250; + } else if (e.wheelDeltaY != null) { + diff = e.wheelDeltaY / 1e3; + } else { + diff = e.wheelDelta / 1e3; + } + diff = diff * r.wheelSensitivity; + var needsWheelFix = e.deltaMode === 1; + if (needsWheelFix) { + diff *= 33; + } + var newZoom = cy.zoom() * Math.pow(10, diff); + if (e.type === "gesturechange") { + newZoom = r.gestureStartZoom * e.scale; + } + cy.zoom({ + level: newZoom, + renderedPosition: { + x: rpos[0], + y: rpos[1] + } + }); + cy.emit(e.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); + } + }; + r.registerBinding(r.container, "wheel", wheelHandler, true); + r.registerBinding(window, "scroll", function scrollHandler(e) { + r.scrollingPage = true; + clearTimeout(r.scrollingPageTimeout); + r.scrollingPageTimeout = setTimeout(function() { + r.scrollingPage = false; + }, 250); + }, true); + r.registerBinding(r.container, "gesturestart", function gestureStartHandler(e) { + r.gestureStartZoom = r.cy.zoom(); + if (!r.hasTouchStarted) { + e.preventDefault(); + } + }, true); + r.registerBinding(r.container, "gesturechange", function(e) { + if (!r.hasTouchStarted) { + wheelHandler(e); + } + }, true); + r.registerBinding(r.container, "mouseout", function mouseOutHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: "mouseout", + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + r.registerBinding(r.container, "mouseover", function mouseOverHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: "mouseover", + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + var f1x1, f1y1, f2x1, f2y1; + var distance1, distance1Sq; + var center1, modelCenter1; + var offsetLeft, offsetTop; + var containerWidth, containerHeight; + var twoFingersStartInside; + var distance2 = function distance3(x1, y1, x2, y2) { + return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); + }; + var distanceSq = function distanceSq2(x1, y1, x2, y2) { + return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); + }; + var touchstartHandler; + r.registerBinding(r.container, "touchstart", touchstartHandler = function touchstartHandler2(e) { + r.hasTouchStarted = true; + if (!eventInContainer(e)) { + return; + } + blurActiveDomElement(); + r.touchData.capture = true; + r.data.bgActivePosistion = void 0; + var cy = r.cy; + var now3 = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now3[0] = pos[0]; + now3[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now3[2] = pos[0]; + now3[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now3[4] = pos[0]; + now3[5] = pos[1]; + } + if (e.touches[1]) { + r.touchData.singleTouchMoved = true; + freeDraggedElements(r.dragData.touchDragEles); + var offsets = r.findContainerClientCoords(); + offsetLeft = offsets[0]; + offsetTop = offsets[1]; + containerWidth = offsets[2]; + containerHeight = offsets[3]; + f1x1 = e.touches[0].clientX - offsetLeft; + f1y1 = e.touches[0].clientY - offsetTop; + f2x1 = e.touches[1].clientX - offsetLeft; + f2y1 = e.touches[1].clientY - offsetTop; + twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight; + var pan = cy.pan(); + var zoom = cy.zoom(); + distance1 = distance2(f1x1, f1y1, f2x1, f2y1); + distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1); + center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2]; + modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom]; + var cxtDistThreshold = 200; + var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; + if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) { + var near1 = r.findNearestElement(now3[0], now3[1], true, true); + var near2 = r.findNearestElement(now3[2], now3[3], true, true); + if (near1 && near1.isNode()) { + near1.activate().emit({ + originalEvent: e, + type: "cxttapstart", + position: { + x: now3[0], + y: now3[1] + } + }); + r.touchData.start = near1; + } else if (near2 && near2.isNode()) { + near2.activate().emit({ + originalEvent: e, + type: "cxttapstart", + position: { + x: now3[0], + y: now3[1] + } + }); + r.touchData.start = near2; + } else { + cy.emit({ + originalEvent: e, + type: "cxttapstart", + position: { + x: now3[0], + y: now3[1] + } + }); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = true; + r.touchData.cxtDragged = false; + r.data.bgActivePosistion = void 0; + r.redraw(); + return; + } + } + if (e.touches[2]) { + if (cy.boxSelectionEnabled()) { + e.preventDefault(); + } + } else if (e.touches[1]) + ; + else if (e.touches[0]) { + var nears = r.findNearestElements(now3[0], now3[1], true, true); + var near = nears[0]; + if (near != null) { + near.activate(); + r.touchData.start = near; + r.touchData.starts = nears; + if (r.nodeIsGrabbable(near)) { + var draggedEles = r.dragData.touchDragEles = cy.collection(); + var selectedNodes = null; + r.redrawHint("eles", true); + r.redrawHint("drag", true); + if (near.selected()) { + selectedNodes = cy.$(function(ele) { + return ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedEles + }); + } else { + addNodeToDrag(near, { + addToList: draggedEles + }); + } + setGrabTarget(near); + var makeEvent = function makeEvent2(type2) { + return { + originalEvent: e, + type: type2, + position: { + x: now3[0], + y: now3[1] + } + }; + }; + near.emit(makeEvent("grabon")); + if (selectedNodes) { + selectedNodes.forEach(function(n) { + n.emit(makeEvent("grab")); + }); + } else { + near.emit(makeEvent("grab")); + } + } + } + triggerEvents(near, ["touchstart", "tapstart", "vmousedown"], e, { + x: now3[0], + y: now3[1] + }); + if (near == null) { + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint("select", true); + r.redraw(); + } + r.touchData.singleTouchMoved = false; + r.touchData.singleTouchStartTime = +/* @__PURE__ */ new Date(); + clearTimeout(r.touchData.tapholdTimeout); + r.touchData.tapholdTimeout = setTimeout(function() { + if (r.touchData.singleTouchMoved === false && !r.pinching && !r.touchData.selecting) { + triggerEvents(r.touchData.start, ["taphold"], e, { + x: now3[0], + y: now3[1] + }); + } + }, r.tapholdDuration); + } + if (e.touches.length >= 1) { + var sPos = r.touchData.startPosition = []; + for (var i3 = 0; i3 < now3.length; i3++) { + sPos[i3] = earlier[i3] = now3[i3]; + } + var touch0 = e.touches[0]; + r.touchData.startGPosition = [touch0.clientX, touch0.clientY]; + } + }, false); + var touchmoveHandler; + r.registerBinding(window, "touchmove", touchmoveHandler = function touchmoveHandler2(e) { + var capture = r.touchData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var select = r.selection; + var cy = r.cy; + var now3 = r.touchData.now; + var earlier = r.touchData.earlier; + var zoom = cy.zoom(); + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now3[0] = pos[0]; + now3[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now3[2] = pos[0]; + now3[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now3[4] = pos[0]; + now3[5] = pos[1]; + } + var startGPos = r.touchData.startGPosition; + var isOverThresholdDrag; + if (capture && e.touches[0] && startGPos) { + var disp = []; + for (var j = 0; j < now3.length; j++) { + disp[j] = now3[j] - earlier[j]; + } + var dx = e.touches[0].clientX - startGPos[0]; + var dx2 = dx * dx; + var dy = e.touches[0].clientY - startGPos[1]; + var dy2 = dy * dy; + var dist22 = dx2 + dy2; + isOverThresholdDrag = dist22 >= r.touchTapThreshold2; + } + if (capture && r.touchData.cxt) { + e.preventDefault(); + var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; + var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2); + var factorSq = distance2Sq / distance1Sq; + var distThreshold = 150; + var distThresholdSq = distThreshold * distThreshold; + var factorThreshold = 1.5; + var factorThresholdSq = factorThreshold * factorThreshold; + if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) { + r.touchData.cxt = false; + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + var cxtEvt = { + originalEvent: e, + type: "cxttapend", + position: { + x: now3[0], + y: now3[1] + } + }; + if (r.touchData.start) { + r.touchData.start.unactivate().emit(cxtEvt); + r.touchData.start = null; + } else { + cy.emit(cxtEvt); + } + } + } + if (capture && r.touchData.cxt) { + var cxtEvt = { + originalEvent: e, + type: "cxtdrag", + position: { + x: now3[0], + y: now3[1] + } + }; + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + if (r.touchData.start) { + r.touchData.start.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxtDragged = true; + var near = r.findNearestElement(now3[0], now3[1], true, true); + if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) { + if (r.touchData.cxtOver) { + r.touchData.cxtOver.emit({ + originalEvent: e, + type: "cxtdragout", + position: { + x: now3[0], + y: now3[1] + } + }); + } + r.touchData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: "cxtdragover", + position: { + x: now3[0], + y: now3[1] + } + }); + } + } + } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) { + e.preventDefault(); + r.data.bgActivePosistion = void 0; + this.lastThreeTouch = +/* @__PURE__ */ new Date(); + if (!r.touchData.selecting) { + cy.emit({ + originalEvent: e, + type: "boxstart", + position: { + x: now3[0], + y: now3[1] + } + }); + } + r.touchData.selecting = true; + r.touchData.didSelect = true; + select[4] = 1; + if (!select || select.length === 0 || select[0] === void 0) { + select[0] = (now3[0] + now3[2] + now3[4]) / 3; + select[1] = (now3[1] + now3[3] + now3[5]) / 3; + select[2] = (now3[0] + now3[2] + now3[4]) / 3 + 1; + select[3] = (now3[1] + now3[3] + now3[5]) / 3 + 1; + } else { + select[2] = (now3[0] + now3[2] + now3[4]) / 3; + select[3] = (now3[1] + now3[3] + now3[5]) / 3; + } + r.redrawHint("select", true); + r.redraw(); + } else if (capture && e.touches[1] && !r.touchData.didSelect && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) { + e.preventDefault(); + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + var draggedEles = r.dragData.touchDragEles; + if (draggedEles) { + r.redrawHint("drag", true); + for (var i3 = 0; i3 < draggedEles.length; i3++) { + var de_p = draggedEles[i3]._private; + de_p.grabbed = false; + de_p.rscratch.inDragLayer = false; + } + } + var _start = r.touchData.start; + var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; + var distance22 = distance2(f1x2, f1y2, f2x2, f2y2); + var factor = distance22 / distance1; + if (twoFingersStartInside) { + var df1x = f1x2 - f1x1; + var df1y = f1y2 - f1y1; + var df2x = f2x2 - f2x1; + var df2y = f2y2 - f2y1; + var tx = (df1x + df2x) / 2; + var ty = (df1y + df2y) / 2; + var zoom1 = cy.zoom(); + var zoom2 = zoom1 * factor; + var pan1 = cy.pan(); + var ctrx = modelCenter1[0] * zoom1 + pan1.x; + var ctry = modelCenter1[1] * zoom1 + pan1.y; + var pan2 = { + x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, + y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry + }; + if (_start && _start.active()) { + var draggedEles = r.dragData.touchDragEles; + freeDraggedElements(draggedEles); + r.redrawHint("drag", true); + r.redrawHint("eles", true); + _start.unactivate().emit("freeon"); + draggedEles.emit("free"); + if (r.dragData.didDrag) { + _start.emit("dragfreeon"); + draggedEles.emit("dragfree"); + } + } + cy.viewport({ + zoom: zoom2, + pan: pan2, + cancelOnFailedZoom: true + }); + cy.emit("pinchzoom"); + distance1 = distance22; + f1x1 = f1x2; + f1y1 = f1y2; + f2x1 = f2x2; + f2y1 = f2y2; + r.pinching = true; + } + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now3[0] = pos[0]; + now3[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now3[2] = pos[0]; + now3[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now3[4] = pos[0]; + now3[5] = pos[1]; + } + } else if (e.touches[0] && !r.touchData.didSelect) { + var start2 = r.touchData.start; + var last2 = r.touchData.last; + var near; + if (!r.hoverData.draggingEles && !r.swipePanning) { + near = r.findNearestElement(now3[0], now3[1], true, true); + } + if (capture && start2 != null) { + e.preventDefault(); + } + if (capture && start2 != null && r.nodeIsDraggable(start2)) { + if (isOverThresholdDrag) { + var draggedEles = r.dragData.touchDragEles; + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + addNodesToDrag(draggedEles, { + inDragLayer: true + }); + } + r.dragData.didDrag = true; + var totalShift = { + x: 0, + y: 0 + }; + if (number$12(disp[0]) && number$12(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + r.redrawHint("eles", true); + var dragDelta = r.touchData.dragDelta; + if (dragDelta && number$12(dragDelta[0]) && number$12(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedEles.silentShift(totalShift).emit("position drag"); + r.redrawHint("drag", true); + if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) { + r.redrawHint("eles", true); + } + r.redraw(); + } else { + var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + } + } + { + triggerEvents(start2 || near, ["touchmove", "tapdrag", "vmousemove"], e, { + x: now3[0], + y: now3[1] + }); + if ((!start2 || !start2.grabbed()) && near != last2) { + if (last2) { + last2.emit({ + originalEvent: e, + type: "tapdragout", + position: { + x: now3[0], + y: now3[1] + } + }); + } + if (near) { + near.emit({ + originalEvent: e, + type: "tapdragover", + position: { + x: now3[0], + y: now3[1] + } + }); + } + } + r.touchData.last = near; + } + if (capture) { + for (var i3 = 0; i3 < now3.length; i3++) { + if (now3[i3] && r.touchData.startPosition[i3] && isOverThresholdDrag) { + r.touchData.singleTouchMoved = true; + } + } + } + if (capture && (start2 == null || start2.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(start2, r.touchData.starts); + if (allowPassthrough) { + e.preventDefault(); + if (!r.data.bgActivePosistion) { + r.data.bgActivePosistion = array2point(r.touchData.startPosition); + } + if (r.swipePanning) { + cy.panBy({ + x: disp[0] * zoom, + y: disp[1] * zoom + }); + cy.emit("dragpan"); + } else if (isOverThresholdDrag) { + r.swipePanning = true; + cy.panBy({ + x: dx * zoom, + y: dy * zoom + }); + cy.emit("dragpan"); + if (start2) { + start2.unactivate(); + r.redrawHint("select", true); + r.touchData.start = null; + } + } + } + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now3[0] = pos[0]; + now3[1] = pos[1]; + } + } + for (var j = 0; j < now3.length; j++) { + earlier[j] = now3[j]; + } + if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) { + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + r.redraw(); + } + }, false); + var touchcancelHandler; + r.registerBinding(window, "touchcancel", touchcancelHandler = function touchcancelHandler2(e) { + var start2 = r.touchData.start; + r.touchData.capture = false; + if (start2) { + start2.unactivate(); + } + }); + var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; + r.registerBinding(window, "touchend", touchendHandler = function touchendHandler2(e) { + var start2 = r.touchData.start; + var capture = r.touchData.capture; + if (capture) { + if (e.touches.length === 0) { + r.touchData.capture = false; + } + e.preventDefault(); + } else { + return; + } + var select = r.selection; + r.swipePanning = false; + r.hoverData.draggingEles = false; + var cy = r.cy; + var zoom = cy.zoom(); + var now3 = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now3[0] = pos[0]; + now3[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now3[2] = pos[0]; + now3[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now3[4] = pos[0]; + now3[5] = pos[1]; + } + if (start2) { + start2.unactivate(); + } + var ctxTapend; + if (r.touchData.cxt) { + ctxTapend = { + originalEvent: e, + type: "cxttapend", + position: { + x: now3[0], + y: now3[1] + } + }; + if (start2) { + start2.emit(ctxTapend); + } else { + cy.emit(ctxTapend); + } + if (!r.touchData.cxtDragged) { + var ctxTap = { + originalEvent: e, + type: "cxttap", + position: { + x: now3[0], + y: now3[1] + } + }; + if (start2) { + start2.emit(ctxTap); + } else { + cy.emit(ctxTap); + } + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = false; + r.touchData.start = null; + r.redraw(); + return; + } + if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) { + r.touchData.selecting = false; + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + select[0] = void 0; + select[1] = void 0; + select[2] = void 0; + select[3] = void 0; + select[4] = 0; + r.redrawHint("select", true); + cy.emit({ + type: "boxend", + originalEvent: e, + position: { + x: now3[0], + y: now3[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected2(ele) { + return ele.selectable() && !ele.selected(); + }; + box.emit("box").stdFilter(eleWouldBeSelected).select().emit("boxselect"); + if (box.nonempty()) { + r.redrawHint("eles", true); + } + r.redraw(); + } + if (start2 != null) { + start2.unactivate(); + } + if (e.touches[2]) { + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + } else if (e.touches[1]) + ; + else if (e.touches[0]) + ; + else if (!e.touches[0]) { + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + var draggedEles = r.dragData.touchDragEles; + if (start2 != null) { + var startWasGrabbed = start2._private.grabbed; + freeDraggedElements(draggedEles); + r.redrawHint("drag", true); + r.redrawHint("eles", true); + if (startWasGrabbed) { + start2.emit("freeon"); + draggedEles.emit("free"); + if (r.dragData.didDrag) { + start2.emit("dragfreeon"); + draggedEles.emit("dragfree"); + } + } + triggerEvents(start2, ["touchend", "tapend", "vmouseup", "tapdragout"], e, { + x: now3[0], + y: now3[1] + }); + start2.unactivate(); + r.touchData.start = null; + } else { + var near = r.findNearestElement(now3[0], now3[1], true, true); + triggerEvents(near, ["touchend", "tapend", "vmouseup", "tapdragout"], e, { + x: now3[0], + y: now3[1] + }); + } + var dx = r.touchData.startPosition[0] - now3[0]; + var dx2 = dx * dx; + var dy = r.touchData.startPosition[1] - now3[1]; + var dy2 = dy * dy; + var dist22 = dx2 + dy2; + var rdist2 = dist22 * zoom * zoom; + if (!r.touchData.singleTouchMoved) { + if (!start2) { + cy.$(":selected").unselect(["tapunselect"]); + } + triggerEvents(start2, ["tap", "vclick"], e, { + x: now3[0], + y: now3[1] + }); + didDoubleTouch = false; + if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { + touchTimeout && clearTimeout(touchTimeout); + didDoubleTouch = true; + prevTouchTimeStamp = null; + triggerEvents(start2, ["dbltap", "vdblclick"], e, { + x: now3[0], + y: now3[1] + }); + } else { + touchTimeout = setTimeout(function() { + if (didDoubleTouch) + return; + triggerEvents(start2, ["onetap", "voneclick"], e, { + x: now3[0], + y: now3[1] + }); + }, cy.multiClickDebounceTime()); + prevTouchTimeStamp = e.timeStamp; + } + } + if (start2 != null && !r.dragData.didDrag && start2._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching) { + if (cy.selectionType() === "single") { + cy.$(isSelected).unmerge(start2).unselect(["tapunselect"]); + start2.select(["tapselect"]); + } else { + if (start2.selected()) { + start2.unselect(["tapunselect"]); + } else { + start2.select(["tapselect"]); + } + } + r.redrawHint("eles", true); + } + r.touchData.singleTouchMoved = true; + } + for (var j = 0; j < now3.length; j++) { + earlier[j] = now3[j]; + } + r.dragData.didDrag = false; + if (e.touches.length === 0) { + r.touchData.dragDelta = []; + r.touchData.startPosition = null; + r.touchData.startGPosition = null; + r.touchData.didSelect = false; + } + if (e.touches.length < 2) { + if (e.touches.length === 1) { + r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY]; + } + r.pinching = false; + r.redrawHint("eles", true); + r.redraw(); + } + }, false); + if (typeof TouchEvent === "undefined") { + var pointers = []; + var makeTouch = function makeTouch2(e) { + return { + clientX: e.clientX, + clientY: e.clientY, + force: 1, + identifier: e.pointerId, + pageX: e.pageX, + pageY: e.pageY, + radiusX: e.width / 2, + radiusY: e.height / 2, + screenX: e.screenX, + screenY: e.screenY, + target: e.target + }; + }; + var makePointer = function makePointer2(e) { + return { + event: e, + touch: makeTouch(e) + }; + }; + var addPointer = function addPointer2(e) { + pointers.push(makePointer(e)); + }; + var removePointer = function removePointer2(e) { + for (var i3 = 0; i3 < pointers.length; i3++) { + var p2 = pointers[i3]; + if (p2.event.pointerId === e.pointerId) { + pointers.splice(i3, 1); + return; + } + } + }; + var updatePointer = function updatePointer2(e) { + var p2 = pointers.filter(function(p3) { + return p3.event.pointerId === e.pointerId; + })[0]; + p2.event = e; + p2.touch = makeTouch(e); + }; + var addTouchesToEvent = function addTouchesToEvent2(e) { + e.touches = pointers.map(function(p2) { + return p2.touch; + }); + }; + var pointerIsMouse = function pointerIsMouse2(e) { + return e.pointerType === "mouse" || e.pointerType === 4; + }; + r.registerBinding(r.container, "pointerdown", function(e) { + if (pointerIsMouse(e)) { + return; + } + e.preventDefault(); + addPointer(e); + addTouchesToEvent(e); + touchstartHandler(e); + }); + r.registerBinding(r.container, "pointerup", function(e) { + if (pointerIsMouse(e)) { + return; + } + removePointer(e); + addTouchesToEvent(e); + touchendHandler(e); + }); + r.registerBinding(r.container, "pointercancel", function(e) { + if (pointerIsMouse(e)) { + return; + } + removePointer(e); + addTouchesToEvent(e); + touchcancelHandler(e); + }); + r.registerBinding(r.container, "pointermove", function(e) { + if (pointerIsMouse(e)) { + return; + } + e.preventDefault(); + updatePointer(e); + addTouchesToEvent(e); + touchmoveHandler(e); + }); + } + }; + var BRp$2 = {}; + BRp$2.generatePolygon = function(name2, points) { + return this.nodeShapes[name2] = { + renderer: this, + name: name2, + points, + draw: function draw2(context, centerX, centerY, width2, height) { + this.renderer.nodeShapeImpl("polygon", context, centerX, centerY, width2, height, this.points); + }, + intersectLine: function intersectLine2(nodeX, nodeY, width2, height, x2, y2, padding2) { + return polygonIntersectLine(x2, y2, this.points, nodeX, nodeY, width2 / 2, height / 2, padding2); + }, + checkPoint: function checkPoint(x2, y2, padding2, width2, height, centerX, centerY) { + return pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2, height, [0, -1], padding2); + } + }; + }; + BRp$2.generateEllipse = function() { + return this.nodeShapes["ellipse"] = { + renderer: this, + name: "ellipse", + draw: function draw2(context, centerX, centerY, width2, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width2, height); + }, + intersectLine: function intersectLine2(nodeX, nodeY, width2, height, x2, y2, padding2) { + return intersectLineEllipse(x2, y2, nodeX, nodeY, width2 / 2 + padding2, height / 2 + padding2); + }, + checkPoint: function checkPoint(x2, y2, padding2, width2, height, centerX, centerY) { + return checkInEllipse(x2, y2, width2, height, centerX, centerY, padding2); + } + }; + }; + BRp$2.generateRoundPolygon = function(name2, points) { + var allPoints = new Array(points.length * 2); + for (var i3 = 0; i3 < points.length / 2; i3++) { + var sourceIndex = i3 * 2; + var destIndex = void 0; + if (i3 < points.length / 2 - 1) { + destIndex = (i3 + 1) * 2; + } else { + destIndex = 0; + } + allPoints[i3 * 4] = points[sourceIndex]; + allPoints[i3 * 4 + 1] = points[sourceIndex + 1]; + var xDest = points[destIndex] - points[sourceIndex]; + var yDest = points[destIndex + 1] - points[sourceIndex + 1]; + var norm = Math.sqrt(xDest * xDest + yDest * yDest); + allPoints[i3 * 4 + 2] = xDest / norm; + allPoints[i3 * 4 + 3] = yDest / norm; + } + return this.nodeShapes[name2] = { + renderer: this, + name: name2, + points: allPoints, + draw: function draw2(context, centerX, centerY, width2, height) { + this.renderer.nodeShapeImpl("round-polygon", context, centerX, centerY, width2, height, this.points); + }, + intersectLine: function intersectLine2(nodeX, nodeY, width2, height, x2, y2, padding2) { + return roundPolygonIntersectLine(x2, y2, this.points, nodeX, nodeY, width2, height); + }, + checkPoint: function checkPoint(x2, y2, padding2, width2, height, centerX, centerY) { + return pointInsideRoundPolygon(x2, y2, this.points, centerX, centerY, width2, height); + } + }; + }; + BRp$2.generateRoundRectangle = function() { + return this.nodeShapes["round-rectangle"] = this.nodeShapes["roundrectangle"] = { + renderer: this, + name: "round-rectangle", + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width2, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width2, height); + }, + intersectLine: function intersectLine2(nodeX, nodeY, width2, height, x2, y2, padding2) { + return roundRectangleIntersectLine(x2, y2, nodeX, nodeY, width2, height, padding2); + }, + checkPoint: function checkPoint(x2, y2, padding2, width2, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width2, height); + var diam = cornerRadius * 2; + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2, height - diam, [0, -1], padding2)) { + return true; + } + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2 - diam, height, [0, -1], padding2)) { + return true; + } + if (checkInEllipse(x2, y2, diam, diam, centerX - width2 / 2 + cornerRadius, centerY - height / 2 + cornerRadius, padding2)) { + return true; + } + if (checkInEllipse(x2, y2, diam, diam, centerX + width2 / 2 - cornerRadius, centerY - height / 2 + cornerRadius, padding2)) { + return true; + } + if (checkInEllipse(x2, y2, diam, diam, centerX + width2 / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding2)) { + return true; + } + if (checkInEllipse(x2, y2, diam, diam, centerX - width2 / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding2)) { + return true; + } + return false; + } + }; + }; + BRp$2.generateCutRectangle = function() { + return this.nodeShapes["cut-rectangle"] = this.nodeShapes["cutrectangle"] = { + renderer: this, + name: "cut-rectangle", + cornerLength: getCutRectangleCornerLength(), + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width2, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width2, height); + }, + generateCutTrianglePts: function generateCutTrianglePts(width2, height, centerX, centerY) { + var cl = this.cornerLength; + var hh = height / 2; + var hw = width2 / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + return { + topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl], + topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl], + bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl], + bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl] + }; + }, + intersectLine: function intersectLine2(nodeX, nodeY, width2, height, x2, y2, padding2) { + var cPts = this.generateCutTrianglePts(width2 + 2 * padding2, height + 2 * padding2, nodeX, nodeY); + var pts2 = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]); + return polygonIntersectLine(x2, y2, pts2, nodeX, nodeY); + }, + checkPoint: function checkPoint(x2, y2, padding2, width2, height, centerX, centerY) { + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2, height - 2 * this.cornerLength, [0, -1], padding2)) { + return true; + } + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2 - 2 * this.cornerLength, height, [0, -1], padding2)) { + return true; + } + var cutTrianglePts = this.generateCutTrianglePts(width2, height, centerX, centerY); + return pointInsidePolygonPoints(x2, y2, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x2, y2, cutTrianglePts.topRight) || pointInsidePolygonPoints(x2, y2, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x2, y2, cutTrianglePts.bottomLeft); + } + }; + }; + BRp$2.generateBarrel = function() { + return this.nodeShapes["barrel"] = { + renderer: this, + name: "barrel", + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width2, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width2, height); + }, + intersectLine: function intersectLine2(nodeX, nodeY, width2, height, x2, y2, padding2) { + var t02 = 0.15; + var t12 = 0.5; + var t22 = 0.85; + var bPts = this.generateBarrelBezierPts(width2 + 2 * padding2, height + 2 * padding2, nodeX, nodeY); + var approximateBarrelCurvePts = function approximateBarrelCurvePts2(pts3) { + var m0 = qbezierPtAt({ + x: pts3[0], + y: pts3[1] + }, { + x: pts3[2], + y: pts3[3] + }, { + x: pts3[4], + y: pts3[5] + }, t02); + var m1 = qbezierPtAt({ + x: pts3[0], + y: pts3[1] + }, { + x: pts3[2], + y: pts3[3] + }, { + x: pts3[4], + y: pts3[5] + }, t12); + var m2 = qbezierPtAt({ + x: pts3[0], + y: pts3[1] + }, { + x: pts3[2], + y: pts3[3] + }, { + x: pts3[4], + y: pts3[5] + }, t22); + return [pts3[0], pts3[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts3[4], pts3[5]]; + }; + var pts2 = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft)); + return polygonIntersectLine(x2, y2, pts2, nodeX, nodeY); + }, + generateBarrelBezierPts: function generateBarrelBezierPts(width2, height, centerX, centerY) { + var hh = height / 2; + var hw = width2 / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + var curveConstants = getBarrelCurveConstants(width2, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width2; + var pts2 = { + topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin], + topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset], + bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd], + bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset] + }; + pts2.topLeft.isTop = true; + pts2.topRight.isTop = true; + pts2.bottomLeft.isBottom = true; + pts2.bottomRight.isBottom = true; + return pts2; + }, + checkPoint: function checkPoint(x2, y2, padding2, width2, height, centerX, centerY) { + var curveConstants = getBarrelCurveConstants(width2, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2, height - 2 * hOffset, [0, -1], padding2)) { + return true; + } + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2 - 2 * wOffset, height, [0, -1], padding2)) { + return true; + } + var barrelCurvePts = this.generateBarrelBezierPts(width2, height, centerX, centerY); + var getCurveT = function getCurveT2(x3, y3, curvePts) { + var x0 = curvePts[4]; + var x1 = curvePts[2]; + var x22 = curvePts[0]; + var y02 = curvePts[5]; + var y23 = curvePts[1]; + var xMin = Math.min(x0, x22); + var xMax = Math.max(x0, x22); + var yMin = Math.min(y02, y23); + var yMax = Math.max(y02, y23); + if (xMin <= x3 && x3 <= xMax && yMin <= y3 && y3 <= yMax) { + var coeff = bezierPtsToQuadCoeff(x0, x1, x22); + var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x3); + var validRoots = roots.filter(function(r) { + return 0 <= r && r <= 1; + }); + if (validRoots.length > 0) { + return validRoots[0]; + } + } + return null; + }; + var curveRegions = Object.keys(barrelCurvePts); + for (var i3 = 0; i3 < curveRegions.length; i3++) { + var corner = curveRegions[i3]; + var cornerPts = barrelCurvePts[corner]; + var t = getCurveT(x2, y2, cornerPts); + if (t == null) { + continue; + } + var y0 = cornerPts[5]; + var y1 = cornerPts[3]; + var y22 = cornerPts[1]; + var bezY = qbezierAt(y0, y1, y22, t); + if (cornerPts.isTop && bezY <= y2) { + return true; + } + if (cornerPts.isBottom && y2 <= bezY) { + return true; + } + } + return false; + } + }; + }; + BRp$2.generateBottomRoundrectangle = function() { + return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes["bottomroundrectangle"] = { + renderer: this, + name: "bottom-round-rectangle", + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width2, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width2, height); + }, + intersectLine: function intersectLine2(nodeX, nodeY, width2, height, x2, y2, padding2) { + var topStartX = nodeX - (width2 / 2 + padding2); + var topStartY = nodeY - (height / 2 + padding2); + var topEndY = topStartY; + var topEndX = nodeX + (width2 / 2 + padding2); + var topIntersections = finiteLinesIntersect(x2, y2, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (topIntersections.length > 0) { + return topIntersections; + } + return roundRectangleIntersectLine(x2, y2, nodeX, nodeY, width2, height, padding2); + }, + checkPoint: function checkPoint(x2, y2, padding2, width2, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width2, height); + var diam = 2 * cornerRadius; + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2, height - diam, [0, -1], padding2)) { + return true; + } + if (pointInsidePolygon(x2, y2, this.points, centerX, centerY, width2 - diam, height, [0, -1], padding2)) { + return true; + } + var outerWidth = width2 / 2 + 2 * padding2; + var outerHeight = height / 2 + 2 * padding2; + var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight]; + if (pointInsidePolygonPoints(x2, y2, points)) { + return true; + } + if (checkInEllipse(x2, y2, diam, diam, centerX + width2 / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding2)) { + return true; + } + if (checkInEllipse(x2, y2, diam, diam, centerX - width2 / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding2)) { + return true; + } + return false; + } + }; + }; + BRp$2.registerNodeShapes = function() { + var nodeShapes = this.nodeShapes = {}; + var renderer3 = this; + this.generateEllipse(); + this.generatePolygon("triangle", generateUnitNgonPointsFitToSquare(3, 0)); + this.generateRoundPolygon("round-triangle", generateUnitNgonPointsFitToSquare(3, 0)); + this.generatePolygon("rectangle", generateUnitNgonPointsFitToSquare(4, 0)); + nodeShapes["square"] = nodeShapes["rectangle"]; + this.generateRoundRectangle(); + this.generateCutRectangle(); + this.generateBarrel(); + this.generateBottomRoundrectangle(); + { + var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0]; + this.generatePolygon("diamond", diamondPoints); + this.generateRoundPolygon("round-diamond", diamondPoints); + } + this.generatePolygon("pentagon", generateUnitNgonPointsFitToSquare(5, 0)); + this.generateRoundPolygon("round-pentagon", generateUnitNgonPointsFitToSquare(5, 0)); + this.generatePolygon("hexagon", generateUnitNgonPointsFitToSquare(6, 0)); + this.generateRoundPolygon("round-hexagon", generateUnitNgonPointsFitToSquare(6, 0)); + this.generatePolygon("heptagon", generateUnitNgonPointsFitToSquare(7, 0)); + this.generateRoundPolygon("round-heptagon", generateUnitNgonPointsFitToSquare(7, 0)); + this.generatePolygon("octagon", generateUnitNgonPointsFitToSquare(8, 0)); + this.generateRoundPolygon("round-octagon", generateUnitNgonPointsFitToSquare(8, 0)); + var star5Points = new Array(20); + { + var outerPoints = generateUnitNgonPoints(5, 0); + var innerPoints = generateUnitNgonPoints(5, Math.PI / 5); + var innerRadius = 0.5 * (3 - Math.sqrt(5)); + innerRadius *= 1.57; + for (var i3 = 0; i3 < innerPoints.length / 2; i3++) { + innerPoints[i3 * 2] *= innerRadius; + innerPoints[i3 * 2 + 1] *= innerRadius; + } + for (var i3 = 0; i3 < 20 / 4; i3++) { + star5Points[i3 * 4] = outerPoints[i3 * 2]; + star5Points[i3 * 4 + 1] = outerPoints[i3 * 2 + 1]; + star5Points[i3 * 4 + 2] = innerPoints[i3 * 2]; + star5Points[i3 * 4 + 3] = innerPoints[i3 * 2 + 1]; + } + } + star5Points = fitPolygonToSquare(star5Points); + this.generatePolygon("star", star5Points); + this.generatePolygon("vee", [-1, -1, 0, -0.333, 1, -1, 0, 1]); + this.generatePolygon("rhomboid", [-1, -1, 0.333, -1, 1, 1, -0.333, 1]); + this.nodeShapes["concavehexagon"] = this.generatePolygon("concave-hexagon", [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); + { + var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; + this.generatePolygon("tag", tagPoints); + this.generateRoundPolygon("round-tag", tagPoints); + } + nodeShapes.makePolygon = function(points) { + var key = points.join("$"); + var name2 = "polygon-" + key; + var shape; + if (shape = this[name2]) { + return shape; + } + return renderer3.generatePolygon(name2, points); + }; + }; + var BRp$1 = {}; + BRp$1.timeToRender = function() { + return this.redrawTotalTime / this.redrawCount; + }; + BRp$1.redraw = function(options2) { + options2 = options2 || staticEmptyObject(); + var r = this; + if (r.averageRedrawTime === void 0) { + r.averageRedrawTime = 0; + } + if (r.lastRedrawTime === void 0) { + r.lastRedrawTime = 0; + } + if (r.lastDrawTime === void 0) { + r.lastDrawTime = 0; + } + r.requestedFrame = true; + r.renderOptions = options2; + }; + BRp$1.beforeRender = function(fn2, priority) { + if (this.destroyed) { + return; + } + if (priority == null) { + error("Priority is not optional for beforeRender"); + } + var cbs = this.beforeRenderCallbacks; + cbs.push({ + fn: fn2, + priority + }); + cbs.sort(function(a, b) { + return b.priority - a.priority; + }); + }; + var beforeRenderCallbacks = function beforeRenderCallbacks2(r, willDraw, startTime) { + var cbs = r.beforeRenderCallbacks; + for (var i3 = 0; i3 < cbs.length; i3++) { + cbs[i3].fn(willDraw, startTime); + } + }; + BRp$1.startRenderLoop = function() { + var r = this; + var cy = r.cy; + if (r.renderLoopStarted) { + return; + } else { + r.renderLoopStarted = true; + } + var renderFn = function renderFn2(requestTime) { + if (r.destroyed) { + return; + } + if (cy.batching()) + ; + else if (r.requestedFrame && !r.skipFrame) { + beforeRenderCallbacks(r, true, requestTime); + var startTime = performanceNow(); + r.render(r.renderOptions); + var endTime = r.lastDrawTime = performanceNow(); + if (r.averageRedrawTime === void 0) { + r.averageRedrawTime = endTime - startTime; + } + if (r.redrawCount === void 0) { + r.redrawCount = 0; + } + r.redrawCount++; + if (r.redrawTotalTime === void 0) { + r.redrawTotalTime = 0; + } + var duration = endTime - startTime; + r.redrawTotalTime += duration; + r.lastRedrawTime = duration; + r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; + r.requestedFrame = false; + } else { + beforeRenderCallbacks(r, false, requestTime); + } + r.skipFrame = false; + requestAnimationFrame2(renderFn2); + }; + requestAnimationFrame2(renderFn); + }; + var BaseRenderer = function BaseRenderer2(options2) { + this.init(options2); + }; + var BR = BaseRenderer; + var BRp = BR.prototype; + BRp.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; + BRp.init = function(options2) { + var r = this; + r.options = options2; + r.cy = options2.cy; + var ctr = r.container = options2.cy.container(); + if (window$1) { + var document2 = window$1.document; + var head2 = document2.head; + var stylesheetId = "__________cytoscape_stylesheet"; + var className = "__________cytoscape_container"; + var stylesheetAlreadyExists = document2.getElementById(stylesheetId) != null; + if (ctr.className.indexOf(className) < 0) { + ctr.className = (ctr.className || "") + " " + className; + } + if (!stylesheetAlreadyExists) { + var stylesheet2 = document2.createElement("style"); + stylesheet2.id = stylesheetId; + stylesheet2.innerHTML = "." + className + " { position: relative; }"; + head2.insertBefore(stylesheet2, head2.children[0]); + } + var computedStyle = window$1.getComputedStyle(ctr); + var position3 = computedStyle.getPropertyValue("position"); + if (position3 === "static") { + warn("A Cytoscape container has style position:static and so can not use UI extensions properly"); + } + } + r.selection = [void 0, void 0, void 0, void 0, 0]; + r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95]; + r.hoverData = { + down: null, + last: null, + downTime: null, + triggerMode: null, + dragging: false, + initialPan: [null, null], + capture: false + }; + r.dragData = { + possibleDragElements: [] + }; + r.touchData = { + start: null, + capture: false, + // These 3 fields related to tap, taphold events + startPosition: [null, null, null, null, null, null], + singleTouchStartTime: null, + singleTouchMoved: true, + now: [null, null, null, null, null, null], + earlier: [null, null, null, null, null, null] + }; + r.redraws = 0; + r.showFps = options2.showFps; + r.debug = options2.debug; + r.hideEdgesOnViewport = options2.hideEdgesOnViewport; + r.textureOnViewport = options2.textureOnViewport; + r.wheelSensitivity = options2.wheelSensitivity; + r.motionBlurEnabled = options2.motionBlur; + r.forcedPixelRatio = number$12(options2.pixelRatio) ? options2.pixelRatio : null; + r.motionBlur = options2.motionBlur; + r.motionBlurOpacity = options2.motionBlurOpacity; + r.motionBlurTransparency = 1 - r.motionBlurOpacity; + r.motionBlurPxRatio = 1; + r.mbPxRBlurry = 1; + r.minMbLowQualFrames = 4; + r.fullQualityMb = false; + r.clearedForMotionBlur = []; + r.desktopTapThreshold = options2.desktopTapThreshold; + r.desktopTapThreshold2 = options2.desktopTapThreshold * options2.desktopTapThreshold; + r.touchTapThreshold = options2.touchTapThreshold; + r.touchTapThreshold2 = options2.touchTapThreshold * options2.touchTapThreshold; + r.tapholdDuration = 500; + r.bindings = []; + r.beforeRenderCallbacks = []; + r.beforeRenderPriorities = { + // higher priority execs before lower one + animations: 400, + eleCalcs: 300, + eleTxrDeq: 200, + lyrTxrDeq: 150, + lyrTxrSkip: 100 + }; + r.registerNodeShapes(); + r.registerArrowShapes(); + r.registerCalculationListeners(); + }; + BRp.notify = function(eventName, eles) { + var r = this; + var cy = r.cy; + if (this.destroyed) { + return; + } + if (eventName === "init") { + r.load(); + return; + } + if (eventName === "destroy") { + r.destroy(); + return; + } + if (eventName === "add" || eventName === "remove" || eventName === "move" && cy.hasCompoundNodes() || eventName === "load" || eventName === "zorder" || eventName === "mount") { + r.invalidateCachedZSortedEles(); + } + if (eventName === "viewport") { + r.redrawHint("select", true); + } + if (eventName === "load" || eventName === "resize" || eventName === "mount") { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + } + r.redrawHint("eles", true); + r.redrawHint("drag", true); + this.startRenderLoop(); + this.redraw(); + }; + BRp.destroy = function() { + var r = this; + r.destroyed = true; + r.cy.stopAnimationLoop(); + for (var i3 = 0; i3 < r.bindings.length; i3++) { + var binding = r.bindings[i3]; + var b = binding; + var tgt = b.target; + (tgt.off || tgt.removeEventListener).apply(tgt, b.args); + } + r.bindings = []; + r.beforeRenderCallbacks = []; + r.onUpdateEleCalcsFns = []; + if (r.removeObserver) { + r.removeObserver.disconnect(); + } + if (r.styleObserver) { + r.styleObserver.disconnect(); + } + if (r.resizeObserver) { + r.resizeObserver.disconnect(); + } + if (r.labelCalcDiv) { + try { + document.body.removeChild(r.labelCalcDiv); + } catch (e) { + } + } + }; + BRp.isHeadless = function() { + return false; + }; + [BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function(props) { + extend2(BRp, props); + }); + var fullFpsTime = 1e3 / 60; + var defs = { + setupDequeueing: function setupDequeueing(opts) { + return function setupDequeueingImpl() { + var self2 = this; + var r = this.renderer; + if (self2.dequeueingSetup) { + return; + } else { + self2.dequeueingSetup = true; + } + var queueRedraw = debounce_1(function() { + r.redrawHint("eles", true); + r.redrawHint("drag", true); + r.redraw(); + }, opts.deqRedrawThreshold); + var dequeue = function dequeue2(willDraw, frameStartTime) { + var startTime = performanceNow(); + var avgRenderTime = r.averageRedrawTime; + var renderTime = r.lastRedrawTime; + var deqd = []; + var extent = r.cy.extent(); + var pixelRatio = r.getPixelRatio(); + if (!willDraw) { + r.flushRenderedStyleQueue(); + } + while (true) { + var now3 = performanceNow(); + var duration = now3 - startTime; + var frameDuration = now3 - frameStartTime; + if (renderTime < fullFpsTime) { + var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0); + if (frameDuration >= opts.deqFastCost * timeAvailable) { + break; + } + } else { + if (willDraw) { + if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) { + break; + } + } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) { + break; + } + } + var thisDeqd = opts.deq(self2, pixelRatio, extent); + if (thisDeqd.length > 0) { + for (var i3 = 0; i3 < thisDeqd.length; i3++) { + deqd.push(thisDeqd[i3]); + } + } else { + break; + } + } + if (deqd.length > 0) { + opts.onDeqd(self2, deqd); + if (!willDraw && opts.shouldRedraw(self2, deqd, pixelRatio, extent)) { + queueRedraw(); + } + } + }; + var priority = opts.priority || noop$12; + r.beforeRender(dequeue, priority(self2)); + }; + } + }; + var ElementTextureCacheLookup = /* @__PURE__ */ function() { + function ElementTextureCacheLookup2(getKey2) { + var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : falsify; + _classCallCheck(this, ElementTextureCacheLookup2); + this.idsByKey = new Map$22(); + this.keyForId = new Map$22(); + this.cachesByLvl = new Map$22(); + this.lvls = []; + this.getKey = getKey2; + this.doesEleInvalidateKey = doesEleInvalidateKey; + } + _createClass(ElementTextureCacheLookup2, [{ + key: "getIdsFor", + value: function getIdsFor(key) { + if (key == null) { + error("Can not get id list for null key"); + } + var idsByKey = this.idsByKey; + var ids = this.idsByKey.get(key); + if (!ids) { + ids = new Set$12(); + idsByKey.set(key, ids); + } + return ids; + } + }, { + key: "addIdForKey", + value: function addIdForKey(key, id2) { + if (key != null) { + this.getIdsFor(key).add(id2); + } + } + }, { + key: "deleteIdForKey", + value: function deleteIdForKey(key, id2) { + if (key != null) { + this.getIdsFor(key)["delete"](id2); + } + } + }, { + key: "getNumberOfIdsForKey", + value: function getNumberOfIdsForKey(key) { + if (key == null) { + return 0; + } else { + return this.getIdsFor(key).size; + } + } + }, { + key: "updateKeyMappingFor", + value: function updateKeyMappingFor(ele) { + var id2 = ele.id(); + var prevKey = this.keyForId.get(id2); + var currKey = this.getKey(ele); + this.deleteIdForKey(prevKey, id2); + this.addIdForKey(currKey, id2); + this.keyForId.set(id2, currKey); + } + }, { + key: "deleteKeyMappingFor", + value: function deleteKeyMappingFor(ele) { + var id2 = ele.id(); + var prevKey = this.keyForId.get(id2); + this.deleteIdForKey(prevKey, id2); + this.keyForId["delete"](id2); + } + }, { + key: "keyHasChangedFor", + value: function keyHasChangedFor(ele) { + var id2 = ele.id(); + var prevKey = this.keyForId.get(id2); + var newKey = this.getKey(ele); + return prevKey !== newKey; + } + }, { + key: "isInvalid", + value: function isInvalid(ele) { + return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); + } + }, { + key: "getCachesAt", + value: function getCachesAt(lvl) { + var cachesByLvl = this.cachesByLvl, lvls = this.lvls; + var caches = cachesByLvl.get(lvl); + if (!caches) { + caches = new Map$22(); + cachesByLvl.set(lvl, caches); + lvls.push(lvl); + } + return caches; + } + }, { + key: "getCache", + value: function getCache(key, lvl) { + return this.getCachesAt(lvl).get(key); + } + }, { + key: "get", + value: function get3(ele, lvl) { + var key = this.getKey(ele); + var cache2 = this.getCache(key, lvl); + if (cache2 != null) { + this.updateKeyMappingFor(ele); + } + return cache2; + } + }, { + key: "getForCachedKey", + value: function getForCachedKey(ele, lvl) { + var key = this.keyForId.get(ele.id()); + var cache2 = this.getCache(key, lvl); + return cache2; + } + }, { + key: "hasCache", + value: function hasCache(key, lvl) { + return this.getCachesAt(lvl).has(key); + } + }, { + key: "has", + value: function has2(ele, lvl) { + var key = this.getKey(ele); + return this.hasCache(key, lvl); + } + }, { + key: "setCache", + value: function setCache(key, lvl, cache2) { + cache2.key = key; + this.getCachesAt(lvl).set(key, cache2); + } + }, { + key: "set", + value: function set3(ele, lvl, cache2) { + var key = this.getKey(ele); + this.setCache(key, lvl, cache2); + this.updateKeyMappingFor(ele); + } + }, { + key: "deleteCache", + value: function deleteCache(key, lvl) { + this.getCachesAt(lvl)["delete"](key); + } + }, { + key: "delete", + value: function _delete(ele, lvl) { + var key = this.getKey(ele); + this.deleteCache(key, lvl); + } + }, { + key: "invalidateKey", + value: function invalidateKey(key) { + var _this = this; + this.lvls.forEach(function(lvl) { + return _this.deleteCache(key, lvl); + }); + } + // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) + }, { + key: "invalidate", + value: function invalidate(ele) { + var id2 = ele.id(); + var key = this.keyForId.get(id2); + this.deleteKeyMappingFor(ele); + var entireKeyInvalidated = this.doesEleInvalidateKey(ele); + if (entireKeyInvalidated) { + this.invalidateKey(key); + } + return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; + } + }]); + return ElementTextureCacheLookup2; + }(); + var minTxrH = 25; + var txrStepH = 50; + var minLvl$1 = -4; + var maxLvl$1 = 3; + var maxZoom$1 = 7.99; + var eleTxrSpacing = 8; + var defTxrWidth = 1024; + var maxTxrW = 1024; + var maxTxrH = 1024; + var minUtility = 0.2; + var maxFullness = 0.8; + var maxFullnessChecks = 10; + var deqCost$1 = 0.15; + var deqAvgCost$1 = 0.1; + var deqNoDrawCost$1 = 0.9; + var deqFastCost$1 = 0.9; + var deqRedrawThreshold$1 = 100; + var maxDeqSize$1 = 1; + var getTxrReasons = { + dequeue: "dequeue", + downscale: "downscale", + highQuality: "highQuality" + }; + var initDefaults = defaults$g({ + getKey: null, + doesEleInvalidateKey: falsify, + drawElement: null, + getBoundingBox: null, + getRotationPoint: null, + getRotationOffset: null, + isVisible: trueify, + allowEdgeTxrCaching: true, + allowParentTxrCaching: true + }); + var ElementTextureCache = function ElementTextureCache2(renderer3, initOptions) { + var self2 = this; + self2.renderer = renderer3; + self2.onDequeues = []; + var opts = initDefaults(initOptions); + extend2(self2, opts); + self2.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); + self2.setupDequeueing(); + }; + var ETCp = ElementTextureCache.prototype; + ETCp.reasons = getTxrReasons; + ETCp.getTextureQueue = function(txrH) { + var self2 = this; + self2.eleImgCaches = self2.eleImgCaches || {}; + return self2.eleImgCaches[txrH] = self2.eleImgCaches[txrH] || []; + }; + ETCp.getRetiredTextureQueue = function(txrH) { + var self2 = this; + var rtxtrQs = self2.eleImgCaches.retired = self2.eleImgCaches.retired || {}; + var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || []; + return rtxtrQ; + }; + ETCp.getElementQueue = function() { + var self2 = this; + var q = self2.eleCacheQueue = self2.eleCacheQueue || new heap(function(a, b) { + return b.reqs - a.reqs; + }); + return q; + }; + ETCp.getElementKeyToQueue = function() { + var self2 = this; + var k2q = self2.eleKeyToCacheQueue = self2.eleKeyToCacheQueue || {}; + return k2q; + }; + ETCp.getElement = function(ele, bb, pxRatio, lvl, reason) { + var self2 = this; + var r = this.renderer; + var zoom = r.cy.zoom(); + var lookup2 = this.lookup; + if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) { + return null; + } + if (!self2.allowEdgeTxrCaching && ele.isEdge() || !self2.allowParentTxrCaching && ele.isParent()) { + return null; + } + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + } + if (lvl < minLvl$1) { + lvl = minLvl$1; + } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) { + return null; + } + var scale = Math.pow(2, lvl); + var eleScaledH = bb.h * scale; + var eleScaledW = bb.w * scale; + var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale); + if (!this.isVisible(ele, scaledLabelShown)) { + return null; + } + var eleCache = lookup2.get(ele, lvl); + if (eleCache && eleCache.invalidated) { + eleCache.invalidated = false; + eleCache.texture.invalidatedWidth -= eleCache.width; + } + if (eleCache) { + return eleCache; + } + var txrH; + if (eleScaledH <= minTxrH) { + txrH = minTxrH; + } else if (eleScaledH <= txrStepH) { + txrH = txrStepH; + } else { + txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH; + } + if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) { + return null; + } + var txrQ = self2.getTextureQueue(txrH); + var txr = txrQ[txrQ.length - 2]; + var addNewTxr = function addNewTxr2() { + return self2.recycleTexture(txrH, eleScaledW) || self2.addTexture(txrH, eleScaledW); + }; + if (!txr) { + txr = txrQ[txrQ.length - 1]; + } + if (!txr) { + txr = addNewTxr(); + } + if (txr.width - txr.usedWidth < eleScaledW) { + txr = addNewTxr(); + } + var scalableFrom = function scalableFrom2(otherCache) { + return otherCache && otherCache.scaledLabelShown === scaledLabelShown; + }; + var deqing = reason && reason === getTxrReasons.dequeue; + var highQualityReq = reason && reason === getTxrReasons.highQuality; + var downscaleReq = reason && reason === getTxrReasons.downscale; + var higherCache; + for (var l = lvl + 1; l <= maxLvl$1; l++) { + var c2 = lookup2.get(ele, l); + if (c2) { + higherCache = c2; + break; + } + } + var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; + var downscale = function downscale2() { + txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH); + }; + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH); + if (scalableFrom(oneUpCache)) { + downscale(); + } else if (scalableFrom(higherCache)) { + if (highQualityReq) { + for (var _l = higherCache.level; _l > lvl; _l--) { + oneUpCache = self2.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale); + } + downscale(); + } else { + self2.queueElement(ele, higherCache.level - 1); + return higherCache; + } + } else { + var lowerCache; + if (!deqing && !highQualityReq && !downscaleReq) { + for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) { + var _c = lookup2.get(ele, _l2); + if (_c) { + lowerCache = _c; + break; + } + } + } + if (scalableFrom(lowerCache)) { + self2.queueElement(ele, lvl); + return lowerCache; + } + txr.context.translate(txr.usedWidth, 0); + txr.context.scale(scale, scale); + this.drawElement(txr.context, ele, bb, scaledLabelShown, false); + txr.context.scale(1 / scale, 1 / scale); + txr.context.translate(-txr.usedWidth, 0); + } + eleCache = { + x: txr.usedWidth, + texture: txr, + level: lvl, + scale, + width: eleScaledW, + height: eleScaledH, + scaledLabelShown + }; + txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing); + txr.eleCaches.push(eleCache); + lookup2.set(ele, lvl, eleCache); + self2.checkTextureFullness(txr); + return eleCache; + }; + ETCp.invalidateElements = function(eles) { + for (var i3 = 0; i3 < eles.length; i3++) { + this.invalidateElement(eles[i3]); + } + }; + ETCp.invalidateElement = function(ele) { + var self2 = this; + var lookup2 = self2.lookup; + var caches = []; + var invalid = lookup2.isInvalid(ele); + if (!invalid) { + return; + } + for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) { + var cache2 = lookup2.getForCachedKey(ele, lvl); + if (cache2) { + caches.push(cache2); + } + } + var noOtherElesUseCache = lookup2.invalidate(ele); + if (noOtherElesUseCache) { + for (var i3 = 0; i3 < caches.length; i3++) { + var _cache = caches[i3]; + var txr = _cache.texture; + txr.invalidatedWidth += _cache.width; + _cache.invalidated = true; + self2.checkTextureUtility(txr); + } + } + self2.removeFromQueue(ele); + }; + ETCp.checkTextureUtility = function(txr) { + if (txr.invalidatedWidth >= minUtility * txr.width) { + this.retireTexture(txr); + } + }; + ETCp.checkTextureFullness = function(txr) { + var self2 = this; + var txrQ = self2.getTextureQueue(txr.height); + if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) { + removeFromArray(txrQ, txr); + } else { + txr.fullnessChecks++; + } + }; + ETCp.retireTexture = function(txr) { + var self2 = this; + var txrH = txr.height; + var txrQ = self2.getTextureQueue(txrH); + var lookup2 = this.lookup; + removeFromArray(txrQ, txr); + txr.retired = true; + var eleCaches = txr.eleCaches; + for (var i3 = 0; i3 < eleCaches.length; i3++) { + var eleCache = eleCaches[i3]; + lookup2.deleteCache(eleCache.key, eleCache.level); + } + clearArray(eleCaches); + var rtxtrQ = self2.getRetiredTextureQueue(txrH); + rtxtrQ.push(txr); + }; + ETCp.addTexture = function(txrH, minW) { + var self2 = this; + var txrQ = self2.getTextureQueue(txrH); + var txr = {}; + txrQ.push(txr); + txr.eleCaches = []; + txr.height = txrH; + txr.width = Math.max(defTxrWidth, minW); + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + txr.canvas = self2.renderer.makeOffscreenCanvas(txr.width, txr.height); + txr.context = txr.canvas.getContext("2d"); + return txr; + }; + ETCp.recycleTexture = function(txrH, minW) { + var self2 = this; + var txrQ = self2.getTextureQueue(txrH); + var rtxtrQ = self2.getRetiredTextureQueue(txrH); + for (var i3 = 0; i3 < rtxtrQ.length; i3++) { + var txr = rtxtrQ[i3]; + if (txr.width >= minW) { + txr.retired = false; + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + clearArray(txr.eleCaches); + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(0, 0, txr.width, txr.height); + removeFromArray(rtxtrQ, txr); + txrQ.push(txr); + return txr; + } + } + }; + ETCp.queueElement = function(ele, lvl) { + var self2 = this; + var q = self2.getElementQueue(); + var k2q = self2.getElementKeyToQueue(); + var key = this.getKey(ele); + var existingReq = k2q[key]; + if (existingReq) { + existingReq.level = Math.max(existingReq.level, lvl); + existingReq.eles.merge(ele); + existingReq.reqs++; + q.updateItem(existingReq); + } else { + var req = { + eles: ele.spawn().merge(ele), + level: lvl, + reqs: 1, + key + }; + q.push(req); + k2q[key] = req; + } + }; + ETCp.dequeue = function(pxRatio) { + var self2 = this; + var q = self2.getElementQueue(); + var k2q = self2.getElementKeyToQueue(); + var dequeued = []; + var lookup2 = self2.lookup; + for (var i3 = 0; i3 < maxDeqSize$1; i3++) { + if (q.size() > 0) { + var req = q.pop(); + var key = req.key; + var ele = req.eles[0]; + var cacheExists = lookup2.hasCache(ele, req.level); + k2q[key] = null; + if (cacheExists) { + continue; + } + dequeued.push(req); + var bb = self2.getBoundingBox(ele); + self2.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue); + } else { + break; + } + } + return dequeued; + }; + ETCp.removeFromQueue = function(ele) { + var self2 = this; + var q = self2.getElementQueue(); + var k2q = self2.getElementKeyToQueue(); + var key = this.getKey(ele); + var req = k2q[key]; + if (req != null) { + if (req.eles.length === 1) { + req.reqs = MAX_INT$1; + q.updateItem(req); + q.pop(); + k2q[key] = null; + } else { + req.eles.unmerge(ele); + } + } + }; + ETCp.onDequeue = function(fn2) { + this.onDequeues.push(fn2); + }; + ETCp.offDequeue = function(fn2) { + removeFromArray(this.onDequeues, fn2); + }; + ETCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold$1, + deqCost: deqCost$1, + deqAvgCost: deqAvgCost$1, + deqNoDrawCost: deqNoDrawCost$1, + deqFastCost: deqFastCost$1, + deq: function deq(self2, pxRatio, extent) { + return self2.dequeue(pxRatio, extent); + }, + onDeqd: function onDeqd(self2, deqd) { + for (var i3 = 0; i3 < self2.onDequeues.length; i3++) { + var fn2 = self2.onDequeues[i3]; + fn2(deqd); + } + }, + shouldRedraw: function shouldRedraw(self2, deqd, pxRatio, extent) { + for (var i3 = 0; i3 < deqd.length; i3++) { + var eles = deqd[i3].eles; + for (var j = 0; j < eles.length; j++) { + var bb = eles[j].boundingBox(); + if (boundingBoxesIntersect(bb, extent)) { + return true; + } + } + } + return false; + }, + priority: function priority(self2) { + return self2.renderer.beforeRenderPriorities.eleTxrDeq; + } + }); + var defNumLayers = 1; + var minLvl = -4; + var maxLvl = 2; + var maxZoom = 3.99; + var deqRedrawThreshold = 50; + var refineEleDebounceTime = 50; + var deqCost = 0.15; + var deqAvgCost = 0.1; + var deqNoDrawCost = 0.9; + var deqFastCost = 0.9; + var maxDeqSize = 1; + var invalidThreshold = 250; + var maxLayerArea = 4e3 * 4e3; + var useHighQualityEleTxrReqs = true; + var LayeredTextureCache = function LayeredTextureCache2(renderer3) { + var self2 = this; + var r = self2.renderer = renderer3; + var cy = r.cy; + self2.layersByLevel = {}; + self2.firstGet = true; + self2.lastInvalidationTime = performanceNow() - 2 * invalidThreshold; + self2.skipping = false; + self2.eleTxrDeqs = cy.collection(); + self2.scheduleElementRefinement = debounce_1(function() { + self2.refineElementTextures(self2.eleTxrDeqs); + self2.eleTxrDeqs.unmerge(self2.eleTxrDeqs); + }, refineEleDebounceTime); + r.beforeRender(function(willDraw, now3) { + if (now3 - self2.lastInvalidationTime <= invalidThreshold) { + self2.skipping = true; + } else { + self2.skipping = false; + } + }, r.beforeRenderPriorities.lyrTxrSkip); + var qSort = function qSort2(a, b) { + return b.reqs - a.reqs; + }; + self2.layersQueue = new heap(qSort); + self2.setupDequeueing(); + }; + var LTCp = LayeredTextureCache.prototype; + var layerIdPool = 0; + var MAX_INT = Math.pow(2, 53) - 1; + LTCp.makeLayer = function(bb, lvl) { + var scale = Math.pow(2, lvl); + var w2 = Math.ceil(bb.w * scale); + var h = Math.ceil(bb.h * scale); + var canvas = this.renderer.makeOffscreenCanvas(w2, h); + var layer = { + id: layerIdPool = ++layerIdPool % MAX_INT, + bb, + level: lvl, + width: w2, + height: h, + canvas, + context: canvas.getContext("2d"), + eles: [], + elesQueue: [], + reqs: 0 + }; + var cxt = layer.context; + var dx = -layer.bb.x1; + var dy = -layer.bb.y1; + cxt.scale(scale, scale); + cxt.translate(dx, dy); + return layer; + }; + LTCp.getLayers = function(eles, pxRatio, lvl) { + var self2 = this; + var r = self2.renderer; + var cy = r.cy; + var zoom = cy.zoom(); + var firstGet = self2.firstGet; + self2.firstGet = false; + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + if (lvl < minLvl) { + lvl = minLvl; + } else if (zoom >= maxZoom || lvl > maxLvl) { + return null; + } + } + self2.validateLayersElesOrdering(lvl, eles); + var layersByLvl = self2.layersByLevel; + var scale = Math.pow(2, lvl); + var layers = layersByLvl[lvl] = layersByLvl[lvl] || []; + var bb; + var lvlComplete = self2.levelIsComplete(lvl, eles); + var tmpLayers; + var checkTempLevels = function checkTempLevels2() { + var canUseAsTmpLvl = function canUseAsTmpLvl2(l) { + self2.validateLayersElesOrdering(l, eles); + if (self2.levelIsComplete(l, eles)) { + tmpLayers = layersByLvl[l]; + return true; + } + }; + var checkLvls = function checkLvls2(dir2) { + if (tmpLayers) { + return; + } + for (var l = lvl + dir2; minLvl <= l && l <= maxLvl; l += dir2) { + if (canUseAsTmpLvl(l)) { + break; + } + } + }; + checkLvls(1); + checkLvls(-1); + for (var i4 = layers.length - 1; i4 >= 0; i4--) { + var layer2 = layers[i4]; + if (layer2.invalid) { + removeFromArray(layers, layer2); + } + } + }; + if (!lvlComplete) { + checkTempLevels(); + } else { + return layers; + } + var getBb = function getBb2() { + if (!bb) { + bb = makeBoundingBox(); + for (var i4 = 0; i4 < eles.length; i4++) { + updateBoundingBox(bb, eles[i4].boundingBox()); + } + } + return bb; + }; + var makeLayer = function makeLayer2(opts) { + opts = opts || {}; + var after = opts.after; + getBb(); + var area = bb.w * scale * (bb.h * scale); + if (area > maxLayerArea) { + return null; + } + var layer2 = self2.makeLayer(bb, lvl); + if (after != null) { + var index2 = layers.indexOf(after) + 1; + layers.splice(index2, 0, layer2); + } else if (opts.insert === void 0 || opts.insert) { + layers.unshift(layer2); + } + return layer2; + }; + if (self2.skipping && !firstGet) { + return null; + } + var layer = null; + var maxElesPerLayer = eles.length / defNumLayers; + var allowLazyQueueing = !firstGet; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + var existingLayer = caches[lvl]; + if (existingLayer) { + layer = existingLayer; + continue; + } + if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) { + layer = makeLayer({ + insert: true, + after: layer + }); + if (!layer) { + return null; + } + } + if (tmpLayers || allowLazyQueueing) { + self2.queueLayer(layer, ele); + } else { + self2.drawEleInLayer(layer, ele, lvl, pxRatio); + } + layer.eles.push(ele); + caches[lvl] = layer; + } + if (tmpLayers) { + return tmpLayers; + } + if (allowLazyQueueing) { + return null; + } + return layers; + }; + LTCp.getEleLevelForLayerLevel = function(lvl, pxRatio) { + return lvl; + }; + LTCp.drawEleInLayer = function(layer, ele, lvl, pxRatio) { + var self2 = this; + var r = this.renderer; + var context = layer.context; + var bb = ele.boundingBox(); + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + lvl = self2.getEleLevelForLayerLevel(lvl, pxRatio); + { + r.setImgSmoothing(context, false); + } + { + r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs); + } + { + r.setImgSmoothing(context, true); + } + }; + LTCp.levelIsComplete = function(lvl, eles) { + var self2 = this; + var layers = self2.layersByLevel[lvl]; + if (!layers || layers.length === 0) { + return false; + } + var numElesInLayers = 0; + for (var i3 = 0; i3 < layers.length; i3++) { + var layer = layers[i3]; + if (layer.reqs > 0) { + return false; + } + if (layer.invalid) { + return false; + } + numElesInLayers += layer.eles.length; + } + if (numElesInLayers !== eles.length) { + return false; + } + return true; + }; + LTCp.validateLayersElesOrdering = function(lvl, eles) { + var layers = this.layersByLevel[lvl]; + if (!layers) { + return; + } + for (var i3 = 0; i3 < layers.length; i3++) { + var layer = layers[i3]; + var offset = -1; + for (var j = 0; j < eles.length; j++) { + if (layer.eles[0] === eles[j]) { + offset = j; + break; + } + } + if (offset < 0) { + this.invalidateLayer(layer); + continue; + } + var o = offset; + for (var j = 0; j < layer.eles.length; j++) { + if (layer.eles[j] !== eles[o + j]) { + this.invalidateLayer(layer); + break; + } + } + } + }; + LTCp.updateElementsInLayers = function(eles, update2) { + var self2 = this; + var isEles = element2(eles[0]); + for (var i3 = 0; i3 < eles.length; i3++) { + var req = isEles ? null : eles[i3]; + var ele = isEles ? eles[i3] : eles[i3].ele; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + for (var l = minLvl; l <= maxLvl; l++) { + var layer = caches[l]; + if (!layer) { + continue; + } + if (req && self2.getEleLevelForLayerLevel(layer.level) !== req.level) { + continue; + } + update2(layer, ele, req); + } + } + }; + LTCp.haveLayers = function() { + var self2 = this; + var haveLayers = false; + for (var l = minLvl; l <= maxLvl; l++) { + var layers = self2.layersByLevel[l]; + if (layers && layers.length > 0) { + haveLayers = true; + break; + } + } + return haveLayers; + }; + LTCp.invalidateElements = function(eles) { + var self2 = this; + if (eles.length === 0) { + return; + } + self2.lastInvalidationTime = performanceNow(); + if (eles.length === 0 || !self2.haveLayers()) { + return; + } + self2.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) { + self2.invalidateLayer(layer); + }); + }; + LTCp.invalidateLayer = function(layer) { + this.lastInvalidationTime = performanceNow(); + if (layer.invalid) { + return; + } + var lvl = layer.level; + var eles = layer.eles; + var layers = this.layersByLevel[lvl]; + removeFromArray(layers, layer); + layer.elesQueue = []; + layer.invalid = true; + if (layer.replacement) { + layer.replacement.invalid = true; + } + for (var i3 = 0; i3 < eles.length; i3++) { + var caches = eles[i3]._private.rscratch.imgLayerCaches; + if (caches) { + caches[lvl] = null; + } + } + }; + LTCp.refineElementTextures = function(eles) { + var self2 = this; + self2.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) { + var rLyr = layer.replacement; + if (!rLyr) { + rLyr = layer.replacement = self2.makeLayer(layer.bb, layer.level); + rLyr.replaces = layer; + rLyr.eles = layer.eles; + } + if (!rLyr.reqs) { + for (var i3 = 0; i3 < rLyr.eles.length; i3++) { + self2.queueLayer(rLyr, rLyr.eles[i3]); + } + } + }); + }; + LTCp.enqueueElementRefinement = function(ele) { + this.eleTxrDeqs.merge(ele); + this.scheduleElementRefinement(); + }; + LTCp.queueLayer = function(layer, ele) { + var self2 = this; + var q = self2.layersQueue; + var elesQ = layer.elesQueue; + var hasId = elesQ.hasId = elesQ.hasId || {}; + if (layer.replacement) { + return; + } + if (ele) { + if (hasId[ele.id()]) { + return; + } + elesQ.push(ele); + hasId[ele.id()] = true; + } + if (layer.reqs) { + layer.reqs++; + q.updateItem(layer); + } else { + layer.reqs = 1; + q.push(layer); + } + }; + LTCp.dequeue = function(pxRatio) { + var self2 = this; + var q = self2.layersQueue; + var deqd = []; + var eleDeqs = 0; + while (eleDeqs < maxDeqSize) { + if (q.size() === 0) { + break; + } + var layer = q.peek(); + if (layer.replacement) { + q.pop(); + continue; + } + if (layer.replaces && layer !== layer.replaces.replacement) { + q.pop(); + continue; + } + if (layer.invalid) { + q.pop(); + continue; + } + var ele = layer.elesQueue.shift(); + if (ele) { + self2.drawEleInLayer(layer, ele, layer.level, pxRatio); + eleDeqs++; + } + if (deqd.length === 0) { + deqd.push(true); + } + if (layer.elesQueue.length === 0) { + q.pop(); + layer.reqs = 0; + if (layer.replaces) { + self2.applyLayerReplacement(layer); + } + self2.requestRedraw(); + } + } + return deqd; + }; + LTCp.applyLayerReplacement = function(layer) { + var self2 = this; + var layersInLevel = self2.layersByLevel[layer.level]; + var replaced = layer.replaces; + var index2 = layersInLevel.indexOf(replaced); + if (index2 < 0 || replaced.invalid) { + return; + } + layersInLevel[index2] = layer; + for (var i3 = 0; i3 < layer.eles.length; i3++) { + var _p = layer.eles[i3]._private; + var cache2 = _p.imgLayerCaches = _p.imgLayerCaches || {}; + if (cache2) { + cache2[layer.level] = layer; + } + } + self2.requestRedraw(); + }; + LTCp.requestRedraw = debounce_1(function() { + var r = this.renderer; + r.redrawHint("eles", true); + r.redrawHint("drag", true); + r.redraw(); + }, 100); + LTCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold, + deqCost, + deqAvgCost, + deqNoDrawCost, + deqFastCost, + deq: function deq(self2, pxRatio) { + return self2.dequeue(pxRatio); + }, + onDeqd: noop$12, + shouldRedraw: trueify, + priority: function priority(self2) { + return self2.renderer.beforeRenderPriorities.lyrTxrDeq; + } + }); + var CRp$a = {}; + var impl; + function polygon(context, points) { + for (var i3 = 0; i3 < points.length; i3++) { + var pt = points[i3]; + context.lineTo(pt.x, pt.y); + } + } + function triangleBackcurve(context, points, controlPoint) { + var firstPt; + for (var i3 = 0; i3 < points.length; i3++) { + var pt = points[i3]; + if (i3 === 0) { + firstPt = pt; + } + context.lineTo(pt.x, pt.y); + } + context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y); + } + function triangleTee(context, trianglePoints, teePoints) { + if (context.beginPath) { + context.beginPath(); + } + var triPts = trianglePoints; + for (var i3 = 0; i3 < triPts.length; i3++) { + var pt = triPts[i3]; + context.lineTo(pt.x, pt.y); + } + var teePts = teePoints; + var firstTeePt = teePoints[0]; + context.moveTo(firstTeePt.x, firstTeePt.y); + for (var i3 = 1; i3 < teePts.length; i3++) { + var pt = teePts[i3]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } + } + function circleTriangle(context, trianglePoints, rx, ry, r) { + if (context.beginPath) { + context.beginPath(); + } + context.arc(rx, ry, r, 0, Math.PI * 2, false); + var triPts = trianglePoints; + var firstTrPt = triPts[0]; + context.moveTo(firstTrPt.x, firstTrPt.y); + for (var i3 = 0; i3 < triPts.length; i3++) { + var pt = triPts[i3]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } + } + function circle2(context, rx, ry, r) { + context.arc(rx, ry, r, 0, Math.PI * 2, false); + } + CRp$a.arrowShapeImpl = function(name2) { + return (impl || (impl = { + "polygon": polygon, + "triangle-backcurve": triangleBackcurve, + "triangle-tee": triangleTee, + "circle-triangle": circleTriangle, + "triangle-cross": triangleTee, + "circle": circle2 + }))[name2]; + }; + var CRp$9 = {}; + CRp$9.drawElement = function(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) { + var r = this; + if (ele.isNode()) { + r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } else { + r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } + }; + CRp$9.drawElementOverlay = function(context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeOverlay(context, ele); + } else { + r.drawEdgeOverlay(context, ele); + } + }; + CRp$9.drawElementUnderlay = function(context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeUnderlay(context, ele); + } else { + r.drawEdgeUnderlay(context, ele); + } + }; + CRp$9.drawCachedElementPortion = function(context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity2) { + var r = this; + var bb = eleTxrCache.getBoundingBox(ele); + if (bb.w === 0 || bb.h === 0) { + return; + } + var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason); + if (eleCache != null) { + var opacity = getOpacity2(r, ele); + if (opacity === 0) { + return; + } + var theta = getRotation(r, ele); + var x1 = bb.x1, y1 = bb.y1, w2 = bb.w, h = bb.h; + var x2, y2, sx, sy, smooth; + if (theta !== 0) { + var rotPt = eleTxrCache.getRotationPoint(ele); + sx = rotPt.x; + sy = rotPt.y; + context.translate(sx, sy); + context.rotate(theta); + smooth = r.getImgSmoothing(context); + if (!smooth) { + r.setImgSmoothing(context, true); + } + var off = eleTxrCache.getRotationOffset(ele); + x2 = off.x; + y2 = off.y; + } else { + x2 = x1; + y2 = y1; + } + var oldGlobalAlpha; + if (opacity !== 1) { + oldGlobalAlpha = context.globalAlpha; + context.globalAlpha = oldGlobalAlpha * opacity; + } + context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x2, y2, w2, h); + if (opacity !== 1) { + context.globalAlpha = oldGlobalAlpha; + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-sx, -sy); + if (!smooth) { + r.setImgSmoothing(context, false); + } + } + } else { + eleTxrCache.drawElement(context, ele); + } + }; + var getZeroRotation = function getZeroRotation2() { + return 0; + }; + var getLabelRotation = function getLabelRotation2(r, ele) { + return r.getTextAngle(ele, null); + }; + var getSourceLabelRotation = function getSourceLabelRotation2(r, ele) { + return r.getTextAngle(ele, "source"); + }; + var getTargetLabelRotation = function getTargetLabelRotation2(r, ele) { + return r.getTextAngle(ele, "target"); + }; + var getOpacity = function getOpacity2(r, ele) { + return ele.effectiveOpacity(); + }; + var getTextOpacity = function getTextOpacity2(e, ele) { + return ele.pstyle("text-opacity").pfValue * ele.effectiveOpacity(); + }; + CRp$9.drawCachedElement = function(context, ele, pxRatio, extent, lvl, requestHighQuality) { + var r = this; + var _r$data = r.data, eleTxrCache = _r$data.eleTxrCache, lblTxrCache = _r$data.lblTxrCache, slbTxrCache = _r$data.slbTxrCache, tlbTxrCache = _r$data.tlbTxrCache; + var bb = ele.boundingBox(); + var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + if (!extent || boundingBoxesIntersect(bb, extent)) { + var isEdge = ele.isEdge(); + var badLine = ele.element()._private.rscratch.badLine; + r.drawElementUnderlay(context, ele); + r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity); + if (!isEdge || !badLine) { + r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity); + } + if (isEdge && !badLine) { + r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity); + r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity); + } + r.drawElementOverlay(context, ele); + } + }; + CRp$9.drawElements = function(context, eles) { + var r = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + r.drawElement(context, ele); + } + }; + CRp$9.drawCachedElements = function(context, eles, pxRatio, extent) { + var r = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + CRp$9.drawCachedNodes = function(context, eles, pxRatio, extent) { + var r = this; + for (var i3 = 0; i3 < eles.length; i3++) { + var ele = eles[i3]; + if (!ele.isNode()) { + continue; + } + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + CRp$9.drawLayeredElements = function(context, eles, pxRatio, extent) { + var r = this; + var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio); + if (layers) { + for (var i3 = 0; i3 < layers.length; i3++) { + var layer = layers[i3]; + var bb = layer.bb; + if (bb.w === 0 || bb.h === 0) { + continue; + } + context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h); + } + } else { + r.drawCachedElements(context, eles, pxRatio, extent); + } + }; + var CRp$8 = {}; + CRp$8.drawEdge = function(context, edge, shiftToOriginWithBb) { + var drawLabel2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + var r = this; + var rs = edge._private.rscratch; + if (shouldDrawOpacity && !edge.visible()) { + return; + } + if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) { + return; + } + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + var opacity = shouldDrawOpacity ? edge.pstyle("opacity").value : 1; + var lineOpacity = shouldDrawOpacity ? edge.pstyle("line-opacity").value : 1; + var curveStyle = edge.pstyle("curve-style").value; + var lineStyle = edge.pstyle("line-style").value; + var edgeWidth = edge.pstyle("width").pfValue; + var lineCap = edge.pstyle("line-cap").value; + var effectiveLineOpacity = opacity * lineOpacity; + var effectiveArrowOpacity = opacity * lineOpacity; + var drawLine = function drawLine2() { + var strokeOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : effectiveLineOpacity; + if (curveStyle === "straight-triangle") { + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgeTrianglePath(edge, context, rs.allpts); + } else { + context.lineWidth = edgeWidth; + context.lineCap = lineCap; + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgePath(edge, context, rs.allpts, lineStyle); + context.lineCap = "butt"; + } + }; + var drawOverlay = function drawOverlay2() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeOverlay(context, edge); + }; + var drawUnderlay = function drawUnderlay2() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeUnderlay(context, edge); + }; + var drawArrows2 = function drawArrows3() { + var arrowOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : effectiveArrowOpacity; + r.drawArrowheads(context, edge, arrowOpacity); + }; + var drawText2 = function drawText3() { + r.drawElementText(context, edge, null, drawLabel2); + }; + context.lineJoin = "round"; + var ghost = edge.pstyle("ghost").value === "yes"; + if (ghost) { + var gx = edge.pstyle("ghost-offset-x").pfValue; + var gy = edge.pstyle("ghost-offset-y").pfValue; + var ghostOpacity = edge.pstyle("ghost-opacity").value; + var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; + context.translate(gx, gy); + drawLine(effectiveGhostOpacity); + drawArrows2(effectiveGhostOpacity); + context.translate(-gx, -gy); + } + drawUnderlay(); + drawLine(); + drawArrows2(); + drawOverlay(); + drawText2(); + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + var drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay2(overlayOrUnderlay) { + if (!["overlay", "underlay"].includes(overlayOrUnderlay)) { + throw new Error("Invalid state"); + } + return function(context, edge) { + if (!edge.visible()) { + return; + } + var opacity = edge.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + if (opacity === 0) { + return; + } + var r = this; + var usePaths = r.usePaths(); + var rs = edge._private.rscratch; + var padding2 = edge.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var width2 = 2 * padding2; + var color2 = edge.pstyle("".concat(overlayOrUnderlay, "-color")).value; + context.lineWidth = width2; + if (rs.edgeType === "self" && !usePaths) { + context.lineCap = "butt"; + } else { + context.lineCap = "round"; + } + r.colorStrokeStyle(context, color2[0], color2[1], color2[2], opacity); + r.drawEdgePath(edge, context, rs.allpts, "solid"); + }; + }; + CRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay("overlay"); + CRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay("underlay"); + CRp$8.drawEdgePath = function(edge, context, pts2, type2) { + var rs = edge._private.rscratch; + var canvasCxt = context; + var path2; + var pathCacheHit = false; + var usePaths = this.usePaths(); + var lineDashPattern = edge.pstyle("line-dash-pattern").pfValue; + var lineDashOffset = edge.pstyle("line-dash-offset").pfValue; + if (usePaths) { + var pathCacheKey = pts2.join("$"); + var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; + if (keyMatches) { + path2 = context = rs.pathCache; + pathCacheHit = true; + } else { + path2 = context = new Path2D(); + rs.pathCacheKey = pathCacheKey; + rs.pathCache = path2; + } + } + if (canvasCxt.setLineDash) { + switch (type2) { + case "dotted": + canvasCxt.setLineDash([1, 1]); + break; + case "dashed": + canvasCxt.setLineDash(lineDashPattern); + canvasCxt.lineDashOffset = lineDashOffset; + break; + case "solid": + canvasCxt.setLineDash([]); + break; + } + } + if (!pathCacheHit && !rs.badLine) { + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(pts2[0], pts2[1]); + switch (rs.edgeType) { + case "bezier": + case "self": + case "compound": + case "multibezier": + for (var i3 = 2; i3 + 3 < pts2.length; i3 += 4) { + context.quadraticCurveTo(pts2[i3], pts2[i3 + 1], pts2[i3 + 2], pts2[i3 + 3]); + } + break; + case "straight": + case "segments": + case "haystack": + for (var _i = 2; _i + 1 < pts2.length; _i += 2) { + context.lineTo(pts2[_i], pts2[_i + 1]); + } + break; + } + } + context = canvasCxt; + if (usePaths) { + context.stroke(path2); + } else { + context.stroke(); + } + if (context.setLineDash) { + context.setLineDash([]); + } + }; + CRp$8.drawEdgeTrianglePath = function(edge, context, pts2) { + context.fillStyle = context.strokeStyle; + var edgeWidth = edge.pstyle("width").pfValue; + for (var i3 = 0; i3 + 1 < pts2.length; i3 += 2) { + var vector = [pts2[i3 + 2] - pts2[i3], pts2[i3 + 3] - pts2[i3 + 1]]; + var length2 = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); + var normal2 = [vector[1] / length2, -vector[0] / length2]; + var triangleHead = [normal2[0] * edgeWidth / 2, normal2[1] * edgeWidth / 2]; + context.beginPath(); + context.moveTo(pts2[i3] - triangleHead[0], pts2[i3 + 1] - triangleHead[1]); + context.lineTo(pts2[i3] + triangleHead[0], pts2[i3 + 1] + triangleHead[1]); + context.lineTo(pts2[i3 + 2], pts2[i3 + 3]); + context.closePath(); + context.fill(); + } + }; + CRp$8.drawArrowheads = function(context, edge, opacity) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === "haystack"; + if (!isHaystack) { + this.drawArrowhead(context, edge, "source", rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity); + } + this.drawArrowhead(context, edge, "mid-target", rs.midX, rs.midY, rs.midtgtArrowAngle, opacity); + this.drawArrowhead(context, edge, "mid-source", rs.midX, rs.midY, rs.midsrcArrowAngle, opacity); + if (!isHaystack) { + this.drawArrowhead(context, edge, "target", rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity); + } + }; + CRp$8.drawArrowhead = function(context, edge, prefix, x2, y2, angle, opacity) { + if (isNaN(x2) || x2 == null || isNaN(y2) || y2 == null || isNaN(angle) || angle == null) { + return; + } + var self2 = this; + var arrowShape = edge.pstyle(prefix + "-arrow-shape").value; + if (arrowShape === "none") { + return; + } + var arrowClearFill = edge.pstyle(prefix + "-arrow-fill").value === "hollow" ? "both" : "filled"; + var arrowFill = edge.pstyle(prefix + "-arrow-fill").value; + var edgeWidth = edge.pstyle("width").pfValue; + var edgeOpacity = edge.pstyle("opacity").value; + if (opacity === void 0) { + opacity = edgeOpacity; + } + var gco = context.globalCompositeOperation; + if (opacity !== 1 || arrowFill === "hollow") { + context.globalCompositeOperation = "destination-out"; + self2.colorFillStyle(context, 255, 255, 255, 1); + self2.colorStrokeStyle(context, 255, 255, 255, 1); + self2.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, x2, y2, angle); + context.globalCompositeOperation = gco; + } + var color2 = edge.pstyle(prefix + "-arrow-color").value; + self2.colorFillStyle(context, color2[0], color2[1], color2[2], opacity); + self2.colorStrokeStyle(context, color2[0], color2[1], color2[2], opacity); + self2.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, x2, y2, angle); + }; + CRp$8.drawArrowShape = function(edge, context, fill, edgeWidth, shape, x2, y2, angle) { + var r = this; + var usePaths = this.usePaths() && shape !== "triangle-cross"; + var pathCacheHit = false; + var path2; + var canvasContext = context; + var translation = { + x: x2, + y: y2 + }; + var scale = edge.pstyle("arrow-scale").value; + var size2 = this.getArrowWidth(edgeWidth, scale); + var shapeImpl = r.arrowShapes[shape]; + if (usePaths) { + var cache2 = r.arrowPathCache = r.arrowPathCache || []; + var key = hashString(shape); + var cachedPath = cache2[key]; + if (cachedPath != null) { + path2 = context = cachedPath; + pathCacheHit = true; + } else { + path2 = context = new Path2D(); + cache2[key] = path2; + } + } + if (!pathCacheHit) { + if (context.beginPath) { + context.beginPath(); + } + if (usePaths) { + shapeImpl.draw(context, 1, 0, { + x: 0, + y: 0 + }, 1); + } else { + shapeImpl.draw(context, size2, angle, translation, edgeWidth); + } + if (context.closePath) { + context.closePath(); + } + } + context = canvasContext; + if (usePaths) { + context.translate(x2, y2); + context.rotate(angle); + context.scale(size2, size2); + } + if (fill === "filled" || fill === "both") { + if (usePaths) { + context.fill(path2); + } else { + context.fill(); + } + } + if (fill === "hollow" || fill === "both") { + context.lineWidth = (shapeImpl.matchEdgeWidth ? edgeWidth : 1) / (usePaths ? size2 : 1); + context.lineJoin = "miter"; + if (usePaths) { + context.stroke(path2); + } else { + context.stroke(); + } + } + if (usePaths) { + context.scale(1 / size2, 1 / size2); + context.rotate(-angle); + context.translate(-x2, -y2); + } + }; + var CRp$7 = {}; + CRp$7.safeDrawImage = function(context, img, ix, iy, iw, ih, x2, y2, w2, h) { + if (iw <= 0 || ih <= 0 || w2 <= 0 || h <= 0) { + return; + } + try { + context.drawImage(img, ix, iy, iw, ih, x2, y2, w2, h); + } catch (e) { + warn(e); + } + }; + CRp$7.drawInscribedImage = function(context, img, node2, index2, nodeOpacity) { + var r = this; + var pos = node2.position(); + var nodeX = pos.x; + var nodeY = pos.y; + var styleObj = node2.cy().style(); + var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj); + var fit = getIndexedStyle(node2, "background-fit", "value", index2); + var repeat2 = getIndexedStyle(node2, "background-repeat", "value", index2); + var nodeW = node2.width(); + var nodeH = node2.height(); + var paddingX2 = node2.padding() * 2; + var nodeTW = nodeW + (getIndexedStyle(node2, "background-width-relative-to", "value", index2) === "inner" ? 0 : paddingX2); + var nodeTH = nodeH + (getIndexedStyle(node2, "background-height-relative-to", "value", index2) === "inner" ? 0 : paddingX2); + var rs = node2._private.rscratch; + var clip = getIndexedStyle(node2, "background-clip", "value", index2); + var shouldClip = clip === "node"; + var imgOpacity = getIndexedStyle(node2, "background-image-opacity", "value", index2) * nodeOpacity; + var smooth = getIndexedStyle(node2, "background-image-smoothing", "value", index2); + var imgW = img.width || img.cachedW; + var imgH = img.height || img.cachedH; + if (null == imgW || null == imgH) { + document.body.appendChild(img); + imgW = img.cachedW = img.width || img.offsetWidth; + imgH = img.cachedH = img.height || img.offsetHeight; + document.body.removeChild(img); + } + var w2 = imgW; + var h = imgH; + if (getIndexedStyle(node2, "background-width", "value", index2) !== "auto") { + if (getIndexedStyle(node2, "background-width", "units", index2) === "%") { + w2 = getIndexedStyle(node2, "background-width", "pfValue", index2) * nodeTW; + } else { + w2 = getIndexedStyle(node2, "background-width", "pfValue", index2); + } + } + if (getIndexedStyle(node2, "background-height", "value", index2) !== "auto") { + if (getIndexedStyle(node2, "background-height", "units", index2) === "%") { + h = getIndexedStyle(node2, "background-height", "pfValue", index2) * nodeTH; + } else { + h = getIndexedStyle(node2, "background-height", "pfValue", index2); + } + } + if (w2 === 0 || h === 0) { + return; + } + if (fit === "contain") { + var scale = Math.min(nodeTW / w2, nodeTH / h); + w2 *= scale; + h *= scale; + } else if (fit === "cover") { + var scale = Math.max(nodeTW / w2, nodeTH / h); + w2 *= scale; + h *= scale; + } + var x2 = nodeX - nodeTW / 2; + var posXUnits = getIndexedStyle(node2, "background-position-x", "units", index2); + var posXPfVal = getIndexedStyle(node2, "background-position-x", "pfValue", index2); + if (posXUnits === "%") { + x2 += (nodeTW - w2) * posXPfVal; + } else { + x2 += posXPfVal; + } + var offXUnits = getIndexedStyle(node2, "background-offset-x", "units", index2); + var offXPfVal = getIndexedStyle(node2, "background-offset-x", "pfValue", index2); + if (offXUnits === "%") { + x2 += (nodeTW - w2) * offXPfVal; + } else { + x2 += offXPfVal; + } + var y2 = nodeY - nodeTH / 2; + var posYUnits = getIndexedStyle(node2, "background-position-y", "units", index2); + var posYPfVal = getIndexedStyle(node2, "background-position-y", "pfValue", index2); + if (posYUnits === "%") { + y2 += (nodeTH - h) * posYPfVal; + } else { + y2 += posYPfVal; + } + var offYUnits = getIndexedStyle(node2, "background-offset-y", "units", index2); + var offYPfVal = getIndexedStyle(node2, "background-offset-y", "pfValue", index2); + if (offYUnits === "%") { + y2 += (nodeTH - h) * offYPfVal; + } else { + y2 += offYPfVal; + } + if (rs.pathCache) { + x2 -= nodeX; + y2 -= nodeY; + nodeX = 0; + nodeY = 0; + } + var gAlpha = context.globalAlpha; + context.globalAlpha = imgOpacity; + var smoothingEnabled = r.getImgSmoothing(context); + var isSmoothingSwitched = false; + if (smooth === "no" && smoothingEnabled) { + r.setImgSmoothing(context, false); + isSmoothingSwitched = true; + } else if (smooth === "yes" && !smoothingEnabled) { + r.setImgSmoothing(context, true); + isSmoothingSwitched = true; + } + if (repeat2 === "no-repeat") { + if (shouldClip) { + context.save(); + if (rs.pathCache) { + context.clip(rs.pathCache); + } else { + r.nodeShapes[r.getNodeShape(node2)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.clip(); + } + } + r.safeDrawImage(context, img, 0, 0, imgW, imgH, x2, y2, w2, h); + if (shouldClip) { + context.restore(); + } + } else { + var pattern = context.createPattern(img, repeat2); + context.fillStyle = pattern; + r.nodeShapes[r.getNodeShape(node2)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.translate(x2, y2); + context.fill(); + context.translate(-x2, -y2); + } + context.globalAlpha = gAlpha; + if (isSmoothingSwitched) { + r.setImgSmoothing(context, smoothingEnabled); + } + }; + var CRp$6 = {}; + CRp$6.eleTextBiggerThanMin = function(ele, scale) { + if (!scale) { + var zoom = ele.cy().zoom(); + var pxRatio = this.getPixelRatio(); + var lvl = Math.ceil(log2(zoom * pxRatio)); + scale = Math.pow(2, lvl); + } + var computedSize = ele.pstyle("font-size").pfValue * scale; + var minSize = ele.pstyle("min-zoomed-font-size").pfValue; + if (computedSize < minSize) { + return false; + } + return true; + }; + CRp$6.drawElementText = function(context, ele, shiftToOriginWithBb, force, prefix) { + var useEleOpacity = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + var r = this; + if (force == null) { + if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) { + return; + } + } else if (force === false) { + return; + } + if (ele.isNode()) { + var label = ele.pstyle("label"); + if (!label || !label.value) { + return; + } + var justification = r.getLabelJustification(ele); + context.textAlign = justification; + context.textBaseline = "bottom"; + } else { + var badLine = ele.element()._private.rscratch.badLine; + var _label = ele.pstyle("label"); + var srcLabel = ele.pstyle("source-label"); + var tgtLabel = ele.pstyle("target-label"); + if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) { + return; + } + context.textAlign = "center"; + context.textBaseline = "bottom"; + } + var applyRotation = !shiftToOriginWithBb; + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + if (prefix == null) { + r.drawText(context, ele, null, applyRotation, useEleOpacity); + if (ele.isEdge()) { + r.drawText(context, ele, "source", applyRotation, useEleOpacity); + r.drawText(context, ele, "target", applyRotation, useEleOpacity); + } + } else { + r.drawText(context, ele, prefix, applyRotation, useEleOpacity); + } + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + CRp$6.getFontCache = function(context) { + var cache2; + this.fontCaches = this.fontCaches || []; + for (var i3 = 0; i3 < this.fontCaches.length; i3++) { + cache2 = this.fontCaches[i3]; + if (cache2.context === context) { + return cache2; + } + } + cache2 = { + context + }; + this.fontCaches.push(cache2); + return cache2; + }; + CRp$6.setupTextStyle = function(context, ele) { + var useEleOpacity = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; + var labelStyle = ele.pstyle("font-style").strValue; + var labelSize = ele.pstyle("font-size").pfValue + "px"; + var labelFamily = ele.pstyle("font-family").strValue; + var labelWeight = ele.pstyle("font-weight").strValue; + var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle("text-opacity").value : 1; + var outlineOpacity = ele.pstyle("text-outline-opacity").value * opacity; + var color2 = ele.pstyle("color").value; + var outlineColor = ele.pstyle("text-outline-color").value; + context.font = labelStyle + " " + labelWeight + " " + labelSize + " " + labelFamily; + context.lineJoin = "round"; + this.colorFillStyle(context, color2[0], color2[1], color2[2], opacity); + this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity); + }; + function roundRect(ctx, x2, y2, width2, height) { + var radius = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5; + ctx.beginPath(); + ctx.moveTo(x2 + radius, y2); + ctx.lineTo(x2 + width2 - radius, y2); + ctx.quadraticCurveTo(x2 + width2, y2, x2 + width2, y2 + radius); + ctx.lineTo(x2 + width2, y2 + height - radius); + ctx.quadraticCurveTo(x2 + width2, y2 + height, x2 + width2 - radius, y2 + height); + ctx.lineTo(x2 + radius, y2 + height); + ctx.quadraticCurveTo(x2, y2 + height, x2, y2 + height - radius); + ctx.lineTo(x2, y2 + radius); + ctx.quadraticCurveTo(x2, y2, x2 + radius, y2); + ctx.closePath(); + ctx.fill(); + } + CRp$6.getTextAngle = function(ele, prefix) { + var theta; + var _p = ele._private; + var rscratch = _p.rscratch; + var pdash = prefix ? prefix + "-" : ""; + var rotation = ele.pstyle(pdash + "text-rotation"); + var textAngle = getPrefixedProperty(rscratch, "labelAngle", prefix); + if (rotation.strValue === "autorotate") { + theta = ele.isEdge() ? textAngle : 0; + } else if (rotation.strValue === "none") { + theta = 0; + } else { + theta = rotation.pfValue; + } + return theta; + }; + CRp$6.drawText = function(context, ele, prefix) { + var applyRotation = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var useEleOpacity = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var _p = ele._private; + var rscratch = _p.rscratch; + var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; + if (useEleOpacity && (parentOpacity === 0 || ele.pstyle("text-opacity").value === 0)) { + return; + } + if (prefix === "main") { + prefix = null; + } + var textX = getPrefixedProperty(rscratch, "labelX", prefix); + var textY = getPrefixedProperty(rscratch, "labelY", prefix); + var orgTextX, orgTextY; + var text2 = this.getLabelText(ele, prefix); + if (text2 != null && text2 !== "" && !isNaN(textX) && !isNaN(textY)) { + this.setupTextStyle(context, ele, useEleOpacity); + var pdash = prefix ? prefix + "-" : ""; + var textW = getPrefixedProperty(rscratch, "labelWidth", prefix); + var textH = getPrefixedProperty(rscratch, "labelHeight", prefix); + var marginX = ele.pstyle(pdash + "text-margin-x").pfValue; + var marginY = ele.pstyle(pdash + "text-margin-y").pfValue; + var isEdge = ele.isEdge(); + var halign = ele.pstyle("text-halign").value; + var valign = ele.pstyle("text-valign").value; + if (isEdge) { + halign = "center"; + valign = "center"; + } + textX += marginX; + textY += marginY; + var theta; + if (!applyRotation) { + theta = 0; + } else { + theta = this.getTextAngle(ele, prefix); + } + if (theta !== 0) { + orgTextX = textX; + orgTextY = textY; + context.translate(orgTextX, orgTextY); + context.rotate(theta); + textX = 0; + textY = 0; + } + switch (valign) { + case "top": + break; + case "center": + textY += textH / 2; + break; + case "bottom": + textY += textH; + break; + } + var backgroundOpacity = ele.pstyle("text-background-opacity").value; + var borderOpacity = ele.pstyle("text-border-opacity").value; + var textBorderWidth = ele.pstyle("text-border-width").pfValue; + var backgroundPadding = ele.pstyle("text-background-padding").pfValue; + if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) { + var bgX = textX - backgroundPadding; + switch (halign) { + case "left": + bgX -= textW; + break; + case "center": + bgX -= textW / 2; + break; + } + var bgY = textY - textH - backgroundPadding; + var bgW = textW + 2 * backgroundPadding; + var bgH = textH + 2 * backgroundPadding; + if (backgroundOpacity > 0) { + var textFill = context.fillStyle; + var textBackgroundColor = ele.pstyle("text-background-color").value; + context.fillStyle = "rgba(" + textBackgroundColor[0] + "," + textBackgroundColor[1] + "," + textBackgroundColor[2] + "," + backgroundOpacity * parentOpacity + ")"; + var styleShape = ele.pstyle("text-background-shape").strValue; + if (styleShape.indexOf("round") === 0) { + roundRect(context, bgX, bgY, bgW, bgH, 2); + } else { + context.fillRect(bgX, bgY, bgW, bgH); + } + context.fillStyle = textFill; + } + if (textBorderWidth > 0 && borderOpacity > 0) { + var textStroke = context.strokeStyle; + var textLineWidth = context.lineWidth; + var textBorderColor = ele.pstyle("text-border-color").value; + var textBorderStyle = ele.pstyle("text-border-style").value; + context.strokeStyle = "rgba(" + textBorderColor[0] + "," + textBorderColor[1] + "," + textBorderColor[2] + "," + borderOpacity * parentOpacity + ")"; + context.lineWidth = textBorderWidth; + if (context.setLineDash) { + switch (textBorderStyle) { + case "dotted": + context.setLineDash([1, 1]); + break; + case "dashed": + context.setLineDash([4, 2]); + break; + case "double": + context.lineWidth = textBorderWidth / 4; + context.setLineDash([]); + break; + case "solid": + context.setLineDash([]); + break; + } + } + context.strokeRect(bgX, bgY, bgW, bgH); + if (textBorderStyle === "double") { + var whiteWidth = textBorderWidth / 2; + context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2); + } + if (context.setLineDash) { + context.setLineDash([]); + } + context.lineWidth = textLineWidth; + context.strokeStyle = textStroke; + } + } + var lineWidth = 2 * ele.pstyle("text-outline-width").pfValue; + if (lineWidth > 0) { + context.lineWidth = lineWidth; + } + if (ele.pstyle("text-wrap").value === "wrap") { + var lines = getPrefixedProperty(rscratch, "labelWrapCachedLines", prefix); + var lineHeight = getPrefixedProperty(rscratch, "labelLineHeight", prefix); + var halfTextW = textW / 2; + var justification = this.getLabelJustification(ele); + if (justification === "auto") + ; + else if (halign === "left") { + if (justification === "left") { + textX += -textW; + } else if (justification === "center") { + textX += -halfTextW; + } + } else if (halign === "center") { + if (justification === "left") { + textX += -halfTextW; + } else if (justification === "right") { + textX += halfTextW; + } + } else if (halign === "right") { + if (justification === "center") { + textX += halfTextW; + } else if (justification === "right") { + textX += textW; + } + } + switch (valign) { + case "top": + textY -= (lines.length - 1) * lineHeight; + break; + case "center": + case "bottom": + textY -= (lines.length - 1) * lineHeight; + break; + } + for (var l = 0; l < lines.length; l++) { + if (lineWidth > 0) { + context.strokeText(lines[l], textX, textY); + } + context.fillText(lines[l], textX, textY); + textY += lineHeight; + } + } else { + if (lineWidth > 0) { + context.strokeText(text2, textX, textY); + } + context.fillText(text2, textX, textY); + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-orgTextX, -orgTextY); + } + } + }; + var CRp$5 = {}; + CRp$5.drawNode = function(context, node2, shiftToOriginWithBb) { + var drawLabel2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + var r = this; + var nodeWidth, nodeHeight; + var _p = node2._private; + var rs = _p.rscratch; + var pos = node2.position(); + if (!number$12(pos.x) || !number$12(pos.y)) { + return; + } + if (shouldDrawOpacity && !node2.visible()) { + return; + } + var eleOpacity = shouldDrawOpacity ? node2.effectiveOpacity() : 1; + var usePaths = r.usePaths(); + var path2; + var pathCacheHit = false; + var padding2 = node2.padding(); + nodeWidth = node2.width() + 2 * padding2; + nodeHeight = node2.height() + 2 * padding2; + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + var bgImgProp = node2.pstyle("background-image"); + var urls = bgImgProp.value; + var urlDefined = new Array(urls.length); + var image = new Array(urls.length); + var numImages = 0; + for (var i3 = 0; i3 < urls.length; i3++) { + var url = urls[i3]; + var defd = urlDefined[i3] = url != null && url !== "none"; + if (defd) { + var bgImgCrossOrigin = node2.cy().style().getIndexedStyle(node2, "background-image-crossorigin", "value", i3); + numImages++; + image[i3] = r.getCachedImage(url, bgImgCrossOrigin, function() { + _p.backgroundTimestamp = Date.now(); + node2.emitAndNotify("background"); + }); + } + } + var darkness = node2.pstyle("background-blacken").value; + var borderWidth = node2.pstyle("border-width").pfValue; + var bgOpacity = node2.pstyle("background-opacity").value * eleOpacity; + var borderColor = node2.pstyle("border-color").value; + var borderStyle = node2.pstyle("border-style").value; + var borderOpacity = node2.pstyle("border-opacity").value * eleOpacity; + context.lineJoin = "miter"; + var setupShapeColor = function setupShapeColor2() { + var bgOpy = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : bgOpacity; + r.eleFillStyle(context, node2, bgOpy); + }; + var setupBorderColor = function setupBorderColor2() { + var bdrOpy = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : borderOpacity; + r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy); + }; + var styleShape = node2.pstyle("shape").strValue; + var shapePts = node2.pstyle("shape-polygon-points").pfValue; + if (usePaths) { + context.translate(pos.x, pos.y); + var pathCache = r.nodePathCache = r.nodePathCache || []; + var key = hashStrings(styleShape === "polygon" ? styleShape + "," + shapePts.join(",") : styleShape, "" + nodeHeight, "" + nodeWidth); + var cachedPath = pathCache[key]; + if (cachedPath != null) { + path2 = cachedPath; + pathCacheHit = true; + rs.pathCache = path2; + } else { + path2 = new Path2D(); + pathCache[key] = rs.pathCache = path2; + } + } + var drawShape = function drawShape2() { + if (!pathCacheHit) { + var npos = pos; + if (usePaths) { + npos = { + x: 0, + y: 0 + }; + } + r.nodeShapes[r.getNodeShape(node2)].draw(path2 || context, npos.x, npos.y, nodeWidth, nodeHeight); + } + if (usePaths) { + context.fill(path2); + } else { + context.fill(); + } + }; + var drawImages = function drawImages2() { + var nodeOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : eleOpacity; + var inside = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var prevBging = _p.backgrounding; + var totalCompleted = 0; + for (var _i = 0; _i < image.length; _i++) { + var bgContainment = node2.cy().style().getIndexedStyle(node2, "background-image-containment", "value", _i); + if (inside && bgContainment === "over" || !inside && bgContainment === "inside") { + totalCompleted++; + continue; + } + if (urlDefined[_i] && image[_i].complete && !image[_i].error) { + totalCompleted++; + r.drawInscribedImage(context, image[_i], node2, _i, nodeOpacity); + } + } + _p.backgrounding = !(totalCompleted === numImages); + if (prevBging !== _p.backgrounding) { + node2.updateStyle(false); + } + }; + var drawPie = function drawPie2() { + var redrawShape = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false; + var pieOpacity = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : eleOpacity; + if (r.hasPie(node2)) { + r.drawPie(context, node2, pieOpacity); + if (redrawShape) { + if (!usePaths) { + r.nodeShapes[r.getNodeShape(node2)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight); + } + } + } + }; + var darken2 = function darken3() { + var darkenOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : eleOpacity; + var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity; + var c2 = darkness > 0 ? 0 : 255; + if (darkness !== 0) { + r.colorFillStyle(context, c2, c2, c2, opacity); + if (usePaths) { + context.fill(path2); + } else { + context.fill(); + } + } + }; + var drawBorder = function drawBorder2() { + if (borderWidth > 0) { + context.lineWidth = borderWidth; + context.lineCap = "butt"; + if (context.setLineDash) { + switch (borderStyle) { + case "dotted": + context.setLineDash([1, 1]); + break; + case "dashed": + context.setLineDash([4, 2]); + break; + case "solid": + case "double": + context.setLineDash([]); + break; + } + } + if (usePaths) { + context.stroke(path2); + } else { + context.stroke(); + } + if (borderStyle === "double") { + context.lineWidth = borderWidth / 3; + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = "destination-out"; + if (usePaths) { + context.stroke(path2); + } else { + context.stroke(); + } + context.globalCompositeOperation = gco; + } + if (context.setLineDash) { + context.setLineDash([]); + } + } + }; + var drawOverlay = function drawOverlay2() { + if (shouldDrawOverlay) { + r.drawNodeOverlay(context, node2, pos, nodeWidth, nodeHeight); + } + }; + var drawUnderlay = function drawUnderlay2() { + if (shouldDrawOverlay) { + r.drawNodeUnderlay(context, node2, pos, nodeWidth, nodeHeight); + } + }; + var drawText2 = function drawText3() { + r.drawElementText(context, node2, null, drawLabel2); + }; + var ghost = node2.pstyle("ghost").value === "yes"; + if (ghost) { + var gx = node2.pstyle("ghost-offset-x").pfValue; + var gy = node2.pstyle("ghost-offset-y").pfValue; + var ghostOpacity = node2.pstyle("ghost-opacity").value; + var effGhostOpacity = ghostOpacity * eleOpacity; + context.translate(gx, gy); + setupShapeColor(ghostOpacity * bgOpacity); + drawShape(); + drawImages(effGhostOpacity, true); + setupBorderColor(ghostOpacity * borderOpacity); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(effGhostOpacity, false); + darken2(effGhostOpacity); + context.translate(-gx, -gy); + } + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawUnderlay(); + if (usePaths) { + context.translate(pos.x, pos.y); + } + setupShapeColor(); + drawShape(); + drawImages(eleOpacity, true); + setupBorderColor(); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(eleOpacity, false); + darken2(); + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawText2(); + drawOverlay(); + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + var drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay2(overlayOrUnderlay) { + if (!["overlay", "underlay"].includes(overlayOrUnderlay)) { + throw new Error("Invalid state"); + } + return function(context, node2, pos, nodeWidth, nodeHeight) { + var r = this; + if (!node2.visible()) { + return; + } + var padding2 = node2.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var opacity = node2.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + var color2 = node2.pstyle("".concat(overlayOrUnderlay, "-color")).value; + var shape = node2.pstyle("".concat(overlayOrUnderlay, "-shape")).value; + if (opacity > 0) { + pos = pos || node2.position(); + if (nodeWidth == null || nodeHeight == null) { + var _padding = node2.padding(); + nodeWidth = node2.width() + 2 * _padding; + nodeHeight = node2.height() + 2 * _padding; + } + r.colorFillStyle(context, color2[0], color2[1], color2[2], opacity); + r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding2 * 2, nodeHeight + padding2 * 2); + context.fill(); + } + }; + }; + CRp$5.drawNodeOverlay = drawNodeOverlayUnderlay("overlay"); + CRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay("underlay"); + CRp$5.hasPie = function(node2) { + node2 = node2[0]; + return node2._private.hasPie; + }; + CRp$5.drawPie = function(context, node2, nodeOpacity, pos) { + node2 = node2[0]; + pos = pos || node2.position(); + var cyStyle = node2.cy().style(); + var pieSize = node2.pstyle("pie-size"); + var x2 = pos.x; + var y2 = pos.y; + var nodeW = node2.width(); + var nodeH = node2.height(); + var radius = Math.min(nodeW, nodeH) / 2; + var lastPercent = 0; + var usePaths = this.usePaths(); + if (usePaths) { + x2 = 0; + y2 = 0; + } + if (pieSize.units === "%") { + radius = radius * pieSize.pfValue; + } else if (pieSize.pfValue !== void 0) { + radius = pieSize.pfValue / 2; + } + for (var i3 = 1; i3 <= cyStyle.pieBackgroundN; i3++) { + var size2 = node2.pstyle("pie-" + i3 + "-background-size").value; + var color2 = node2.pstyle("pie-" + i3 + "-background-color").value; + var opacity = node2.pstyle("pie-" + i3 + "-background-opacity").value * nodeOpacity; + var percent = size2 / 100; + if (percent + lastPercent > 1) { + percent = 1 - lastPercent; + } + var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; + var angleDelta = 2 * Math.PI * percent; + var angleEnd = angleStart + angleDelta; + if (size2 === 0 || lastPercent >= 1 || lastPercent + percent > 1) { + continue; + } + context.beginPath(); + context.moveTo(x2, y2); + context.arc(x2, y2, radius, angleStart, angleEnd); + context.closePath(); + this.colorFillStyle(context, color2[0], color2[1], color2[2], opacity); + context.fill(); + lastPercent += percent; + } + }; + var CRp$4 = {}; + var motionBlurDelay = 100; + CRp$4.getPixelRatio = function() { + var context = this.data.contexts[0]; + if (this.forcedPixelRatio != null) { + return this.forcedPixelRatio; + } + var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; + return (window.devicePixelRatio || 1) / backingStore; + }; + CRp$4.paintCache = function(context) { + var caches = this.paintCaches = this.paintCaches || []; + var needToCreateCache = true; + var cache2; + for (var i3 = 0; i3 < caches.length; i3++) { + cache2 = caches[i3]; + if (cache2.context === context) { + needToCreateCache = false; + break; + } + } + if (needToCreateCache) { + cache2 = { + context + }; + caches.push(cache2); + } + return cache2; + }; + CRp$4.createGradientStyleFor = function(context, shapeStyleName, ele, fill, opacity) { + var gradientStyle; + var usePaths = this.usePaths(); + var colors3 = ele.pstyle(shapeStyleName + "-gradient-stop-colors").value, positions = ele.pstyle(shapeStyleName + "-gradient-stop-positions").pfValue; + if (fill === "radial-gradient") { + if (ele.isEdge()) { + var start2 = ele.sourceEndpoint(), end2 = ele.targetEndpoint(), mid = ele.midpoint(); + var d1 = dist2(start2, mid); + var d2 = dist2(end2, mid); + gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); + } else { + var pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), width2 = ele.paddedWidth(), height = ele.paddedHeight(); + gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width2, height)); + } + } else { + if (ele.isEdge()) { + var _start = ele.sourceEndpoint(), _end = ele.targetEndpoint(); + gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y); + } else { + var _pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), _width = ele.paddedWidth(), _height = ele.paddedHeight(), halfWidth = _width / 2, halfHeight = _height / 2; + var direction2 = ele.pstyle("background-gradient-direction").value; + switch (direction2) { + case "to-bottom": + gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight); + break; + case "to-top": + gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight); + break; + case "to-left": + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y); + break; + case "to-right": + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y); + break; + case "to-bottom-right": + case "to-right-bottom": + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight); + break; + case "to-top-right": + case "to-right-top": + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight); + break; + case "to-bottom-left": + case "to-left-bottom": + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight); + break; + case "to-top-left": + case "to-left-top": + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight); + break; + } + } + } + if (!gradientStyle) + return null; + var hasPositions = positions.length === colors3.length; + var length2 = colors3.length; + for (var i3 = 0; i3 < length2; i3++) { + gradientStyle.addColorStop(hasPositions ? positions[i3] : i3 / (length2 - 1), "rgba(" + colors3[i3][0] + "," + colors3[i3][1] + "," + colors3[i3][2] + "," + opacity + ")"); + } + return gradientStyle; + }; + CRp$4.gradientFillStyle = function(context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, "background", ele, fill, opacity); + if (!gradientStyle) + return null; + context.fillStyle = gradientStyle; + }; + CRp$4.colorFillStyle = function(context, r, g, b, a) { + context.fillStyle = "rgba(" + r + "," + g + "," + b + "," + a + ")"; + }; + CRp$4.eleFillStyle = function(context, ele, opacity) { + var backgroundFill = ele.pstyle("background-fill").value; + if (backgroundFill === "linear-gradient" || backgroundFill === "radial-gradient") { + this.gradientFillStyle(context, ele, backgroundFill, opacity); + } else { + var backgroundColor = ele.pstyle("background-color").value; + this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity); + } + }; + CRp$4.gradientStrokeStyle = function(context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, "line", ele, fill, opacity); + if (!gradientStyle) + return null; + context.strokeStyle = gradientStyle; + }; + CRp$4.colorStrokeStyle = function(context, r, g, b, a) { + context.strokeStyle = "rgba(" + r + "," + g + "," + b + "," + a + ")"; + }; + CRp$4.eleStrokeStyle = function(context, ele, opacity) { + var lineFill = ele.pstyle("line-fill").value; + if (lineFill === "linear-gradient" || lineFill === "radial-gradient") { + this.gradientStrokeStyle(context, ele, lineFill, opacity); + } else { + var lineColor = ele.pstyle("line-color").value; + this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity); + } + }; + CRp$4.matchCanvasSize = function(container) { + var r = this; + var data2 = r.data; + var bb = r.findContainerClientCoords(); + var width2 = bb[2]; + var height = bb[3]; + var pixelRatio = r.getPixelRatio(); + var mbPxRatio = r.motionBlurPxRatio; + if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) { + pixelRatio = mbPxRatio; + } + var canvasWidth = width2 * pixelRatio; + var canvasHeight = height * pixelRatio; + var canvas; + if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) { + return; + } + r.fontCaches = null; + var canvasContainer = data2.canvasContainer; + canvasContainer.style.width = width2 + "px"; + canvasContainer.style.height = height + "px"; + for (var i3 = 0; i3 < r.CANVAS_LAYERS; i3++) { + canvas = data2.canvases[i3]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width2 + "px"; + canvas.style.height = height + "px"; + } + for (var i3 = 0; i3 < r.BUFFER_COUNT; i3++) { + canvas = data2.bufferCanvases[i3]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width2 + "px"; + canvas.style.height = height + "px"; + } + r.textureMult = 1; + if (pixelRatio <= 1) { + canvas = data2.bufferCanvases[r.TEXTURE_BUFFER]; + r.textureMult = 2; + canvas.width = canvasWidth * r.textureMult; + canvas.height = canvasHeight * r.textureMult; + } + r.canvasWidth = canvasWidth; + r.canvasHeight = canvasHeight; + }; + CRp$4.renderTo = function(cxt, zoom, pan, pxRatio) { + this.render({ + forcedContext: cxt, + forcedZoom: zoom, + forcedPan: pan, + drawAllLayers: true, + forcedPxRatio: pxRatio + }); + }; + CRp$4.render = function(options2) { + options2 = options2 || staticEmptyObject(); + var forcedContext = options2.forcedContext; + var drawAllLayers = options2.drawAllLayers; + var drawOnlyNodeLayer = options2.drawOnlyNodeLayer; + var forcedZoom = options2.forcedZoom; + var forcedPan = options2.forcedPan; + var r = this; + var pixelRatio = options2.forcedPxRatio === void 0 ? this.getPixelRatio() : options2.forcedPxRatio; + var cy = r.cy; + var data2 = r.data; + var needDraw = data2.canvasNeedsRedraw; + var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); + var motionBlur = options2.motionBlur !== void 0 ? options2.motionBlur : r.motionBlur; + var mbPxRatio = r.motionBlurPxRatio; + var hasCompoundNodes = cy.hasCompoundNodes(); + var inNodeDragGesture = r.hoverData.draggingEles; + var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; + motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; + var motionBlurFadeEffect = motionBlur; + if (!forcedContext) { + if (r.prevPxRatio !== pixelRatio) { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + r.redrawHint("eles", true); + r.redrawHint("drag", true); + } + r.prevPxRatio = pixelRatio; + } + if (!forcedContext && r.motionBlurTimeout) { + clearTimeout(r.motionBlurTimeout); + } + if (motionBlur) { + if (r.mbFrames == null) { + r.mbFrames = 0; + } + r.mbFrames++; + if (r.mbFrames < 3) { + motionBlurFadeEffect = false; + } + if (r.mbFrames > r.minMbLowQualFrames) { + r.motionBlurPxRatio = r.mbPxRBlurry; + } + } + if (r.clearingMotionBlur) { + r.motionBlurPxRatio = 1; + } + if (r.textureDrawLastFrame && !textureDraw) { + needDraw[r.NODE] = true; + needDraw[r.SELECT_BOX] = true; + } + var style = cy.style(); + var zoom = cy.zoom(); + var effectiveZoom = forcedZoom !== void 0 ? forcedZoom : zoom; + var pan = cy.pan(); + var effectivePan = { + x: pan.x, + y: pan.y + }; + var vp = { + zoom, + pan: { + x: pan.x, + y: pan.y + } + }; + var prevVp = r.prevViewport; + var viewportIsDiff = prevVp === void 0 || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; + if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) { + r.motionBlurPxRatio = 1; + } + if (forcedPan) { + effectivePan = forcedPan; + } + effectiveZoom *= pixelRatio; + effectivePan.x *= pixelRatio; + effectivePan.y *= pixelRatio; + var eles = r.getCachedZSortedEles(); + function mbclear(context2, x2, y2, w2, h) { + var gco = context2.globalCompositeOperation; + context2.globalCompositeOperation = "destination-out"; + r.colorFillStyle(context2, 255, 255, 255, r.motionBlurTransparency); + context2.fillRect(x2, y2, w2, h); + context2.globalCompositeOperation = gco; + } + function setContextTransform(context2, clear3) { + var ePan, eZoom, w2, h; + if (!r.clearingMotionBlur && (context2 === data2.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context2 === data2.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) { + ePan = { + x: pan.x * mbPxRatio, + y: pan.y * mbPxRatio + }; + eZoom = zoom * mbPxRatio; + w2 = r.canvasWidth * mbPxRatio; + h = r.canvasHeight * mbPxRatio; + } else { + ePan = effectivePan; + eZoom = effectiveZoom; + w2 = r.canvasWidth; + h = r.canvasHeight; + } + context2.setTransform(1, 0, 0, 1, 0, 0); + if (clear3 === "motionBlur") { + mbclear(context2, 0, 0, w2, h); + } else if (!forcedContext && (clear3 === void 0 || clear3)) { + context2.clearRect(0, 0, w2, h); + } + if (!drawAllLayers) { + context2.translate(ePan.x, ePan.y); + context2.scale(eZoom, eZoom); + } + if (forcedPan) { + context2.translate(forcedPan.x, forcedPan.y); + } + if (forcedZoom) { + context2.scale(forcedZoom, forcedZoom); + } + } + if (!textureDraw) { + r.textureDrawLastFrame = false; + } + if (textureDraw) { + r.textureDrawLastFrame = true; + if (!r.textureCache) { + r.textureCache = {}; + r.textureCache.bb = cy.mutableElements().boundingBox(); + r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER]; + var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER]; + cxt.setTransform(1, 0, 0, 1, 0, 0); + cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult); + r.render({ + forcedContext: cxt, + drawOnlyNodeLayer: true, + forcedPxRatio: pixelRatio * r.textureMult + }); + var vp = r.textureCache.viewport = { + zoom: cy.zoom(), + pan: cy.pan(), + width: r.canvasWidth, + height: r.canvasHeight + }; + vp.mpan = { + x: (0 - vp.pan.x) / vp.zoom, + y: (0 - vp.pan.y) / vp.zoom + }; + } + needDraw[r.DRAG] = false; + needDraw[r.NODE] = false; + var context = data2.contexts[r.NODE]; + var texture = r.textureCache.texture; + var vp = r.textureCache.viewport; + context.setTransform(1, 0, 0, 1, 0, 0); + if (motionBlur) { + mbclear(context, 0, 0, vp.width, vp.height); + } else { + context.clearRect(0, 0, vp.width, vp.height); + } + var outsideBgColor = style.core("outside-texture-bg-color").value; + var outsideBgOpacity = style.core("outside-texture-bg-opacity").value; + r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity); + context.fillRect(0, 0, vp.width, vp.height); + var zoom = cy.zoom(); + setContextTransform(context, false); + context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + } else if (r.textureOnViewport && !forcedContext) { + r.textureCache = null; + } + var extent = cy.extent(); + var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated(); + var hideEdges = r.hideEdgesOnViewport && vpManip; + var needMbClear = []; + needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur; + if (needMbClear[r.NODE]) { + r.clearedForMotionBlur[r.NODE] = true; + } + needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur; + if (needMbClear[r.DRAG]) { + r.clearedForMotionBlur[r.DRAG] = true; + } + if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) { + var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data2.contexts[r.NODE]); + var clear2 = motionBlur && !useBuffer ? "motionBlur" : void 0; + setContextTransform(context, clear2); + if (hideEdges) { + r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent); + } else { + r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.nondrag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.NODE] = false; + } + } + if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) { + var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data2.contexts[r.DRAG]); + setContextTransform(context, motionBlur && !useBuffer ? "motionBlur" : void 0); + if (hideEdges) { + r.drawCachedNodes(context, eles.drag, pixelRatio, extent); + } else { + r.drawCachedElements(context, eles.drag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.drag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.DRAG] = false; + } + } + if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) { + var context = forcedContext || data2.contexts[r.SELECT_BOX]; + setContextTransform(context); + if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) { + var zoom = r.cy.zoom(); + var borderWidth = style.core("selection-box-border-width").value / zoom; + context.lineWidth = borderWidth; + context.fillStyle = "rgba(" + style.core("selection-box-color").value[0] + "," + style.core("selection-box-color").value[1] + "," + style.core("selection-box-color").value[2] + "," + style.core("selection-box-opacity").value + ")"; + context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + if (borderWidth > 0) { + context.strokeStyle = "rgba(" + style.core("selection-box-border-color").value[0] + "," + style.core("selection-box-border-color").value[1] + "," + style.core("selection-box-border-color").value[2] + "," + style.core("selection-box-opacity").value + ")"; + context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + } + } + if (data2.bgActivePosistion && !r.hoverData.selecting) { + var zoom = r.cy.zoom(); + var pos = data2.bgActivePosistion; + context.fillStyle = "rgba(" + style.core("active-bg-color").value[0] + "," + style.core("active-bg-color").value[1] + "," + style.core("active-bg-color").value[2] + "," + style.core("active-bg-opacity").value + ")"; + context.beginPath(); + context.arc(pos.x, pos.y, style.core("active-bg-size").pfValue / zoom, 0, 2 * Math.PI); + context.fill(); + } + var timeToRender = r.lastRedrawTime; + if (r.showFps && timeToRender) { + timeToRender = Math.round(timeToRender); + var fps = Math.round(1e3 / timeToRender); + context.setTransform(1, 0, 0, 1, 0, 0); + context.fillStyle = "rgba(255, 0, 0, 0.75)"; + context.strokeStyle = "rgba(255, 0, 0, 0.75)"; + context.lineWidth = 1; + context.fillText("1 frame = " + timeToRender + " ms = " + fps + " fps", 0, 20); + var maxFps = 60; + context.strokeRect(0, 30, 250, 20); + context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20); + } + if (!drawAllLayers) { + needDraw[r.SELECT_BOX] = false; + } + } + if (motionBlur && mbPxRatio !== 1) { + var cxtNode = data2.contexts[r.NODE]; + var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]; + var cxtDrag = data2.contexts[r.DRAG]; + var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]; + var drawMotionBlur = function drawMotionBlur2(cxt2, txt, needClear) { + cxt2.setTransform(1, 0, 0, 1, 0, 0); + if (needClear || !motionBlurFadeEffect) { + cxt2.clearRect(0, 0, r.canvasWidth, r.canvasHeight); + } else { + mbclear(cxt2, 0, 0, r.canvasWidth, r.canvasHeight); + } + var pxr = mbPxRatio; + cxt2.drawImage( + txt, + // img + 0, + 0, + // sx, sy + r.canvasWidth * pxr, + r.canvasHeight * pxr, + // sw, sh + 0, + 0, + // x, y + r.canvasWidth, + r.canvasHeight + // w, h + ); + }; + if (needDraw[r.NODE] || needMbClear[r.NODE]) { + drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); + needDraw[r.NODE] = false; + } + if (needDraw[r.DRAG] || needMbClear[r.DRAG]) { + drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]); + needDraw[r.DRAG] = false; + } + } + r.prevViewport = vp; + if (r.clearingMotionBlur) { + r.clearingMotionBlur = false; + r.motionBlurCleared = true; + r.motionBlur = true; + } + if (motionBlur) { + r.motionBlurTimeout = setTimeout(function() { + r.motionBlurTimeout = null; + r.clearedForMotionBlur[r.NODE] = false; + r.clearedForMotionBlur[r.DRAG] = false; + r.motionBlur = false; + r.clearingMotionBlur = !textureDraw; + r.mbFrames = 0; + needDraw[r.NODE] = true; + needDraw[r.DRAG] = true; + r.redraw(); + }, motionBlurDelay); + } + if (!forcedContext) { + cy.emit("render"); + } + }; + var CRp$3 = {}; + CRp$3.drawPolygonPath = function(context, x2, y2, width2, height, points) { + var halfW = width2 / 2; + var halfH = height / 2; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x2 + halfW * points[0], y2 + halfH * points[1]); + for (var i3 = 1; i3 < points.length / 2; i3++) { + context.lineTo(x2 + halfW * points[i3 * 2], y2 + halfH * points[i3 * 2 + 1]); + } + context.closePath(); + }; + CRp$3.drawRoundPolygonPath = function(context, x2, y2, width2, height, points) { + var halfW = width2 / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width2, height); + if (context.beginPath) { + context.beginPath(); + } + for (var _i = 0; _i < points.length / 4; _i++) { + var sourceUv = void 0, destUv = void 0; + if (_i === 0) { + sourceUv = points.length - 2; + } else { + sourceUv = _i * 4 - 2; + } + destUv = _i * 4 + 2; + var px = x2 + halfW * points[_i * 4]; + var py = y2 + halfH * points[_i * 4 + 1]; + var cosTheta = -points[sourceUv] * points[destUv] - points[sourceUv + 1] * points[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * points[sourceUv]; + var cp0y = py - offset * points[sourceUv + 1]; + var cp1x = px + offset * points[destUv]; + var cp1y = py + offset * points[destUv + 1]; + if (_i === 0) { + context.moveTo(cp0x, cp0y); + } else { + context.lineTo(cp0x, cp0y); + } + context.arcTo(px, py, cp1x, cp1y, cornerRadius); + } + context.closePath(); + }; + CRp$3.drawRoundRectanglePath = function(context, x2, y2, width2, height) { + var halfWidth = width2 / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width2, height); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x2, y2 - halfHeight); + context.arcTo(x2 + halfWidth, y2 - halfHeight, x2 + halfWidth, y2, cornerRadius); + context.arcTo(x2 + halfWidth, y2 + halfHeight, x2, y2 + halfHeight, cornerRadius); + context.arcTo(x2 - halfWidth, y2 + halfHeight, x2 - halfWidth, y2, cornerRadius); + context.arcTo(x2 - halfWidth, y2 - halfHeight, x2, y2 - halfHeight, cornerRadius); + context.lineTo(x2, y2 - halfHeight); + context.closePath(); + }; + CRp$3.drawBottomRoundRectanglePath = function(context, x2, y2, width2, height) { + var halfWidth = width2 / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width2, height); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x2, y2 - halfHeight); + context.lineTo(x2 + halfWidth, y2 - halfHeight); + context.lineTo(x2 + halfWidth, y2); + context.arcTo(x2 + halfWidth, y2 + halfHeight, x2, y2 + halfHeight, cornerRadius); + context.arcTo(x2 - halfWidth, y2 + halfHeight, x2 - halfWidth, y2, cornerRadius); + context.lineTo(x2 - halfWidth, y2 - halfHeight); + context.lineTo(x2, y2 - halfHeight); + context.closePath(); + }; + CRp$3.drawCutRectanglePath = function(context, x2, y2, width2, height) { + var halfWidth = width2 / 2; + var halfHeight = height / 2; + var cornerLength = getCutRectangleCornerLength(); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x2 - halfWidth + cornerLength, y2 - halfHeight); + context.lineTo(x2 + halfWidth - cornerLength, y2 - halfHeight); + context.lineTo(x2 + halfWidth, y2 - halfHeight + cornerLength); + context.lineTo(x2 + halfWidth, y2 + halfHeight - cornerLength); + context.lineTo(x2 + halfWidth - cornerLength, y2 + halfHeight); + context.lineTo(x2 - halfWidth + cornerLength, y2 + halfHeight); + context.lineTo(x2 - halfWidth, y2 + halfHeight - cornerLength); + context.lineTo(x2 - halfWidth, y2 - halfHeight + cornerLength); + context.closePath(); + }; + CRp$3.drawBarrelPath = function(context, x2, y2, width2, height) { + var halfWidth = width2 / 2; + var halfHeight = height / 2; + var xBegin = x2 - halfWidth; + var xEnd = x2 + halfWidth; + var yBegin = y2 - halfHeight; + var yEnd = y2 + halfHeight; + var barrelCurveConstants = getBarrelCurveConstants(width2, height); + var wOffset = barrelCurveConstants.widthOffset; + var hOffset = barrelCurveConstants.heightOffset; + var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(xBegin, yBegin + hOffset); + context.lineTo(xBegin, yEnd - hOffset); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd); + context.lineTo(xEnd - wOffset, yEnd); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset); + context.lineTo(xEnd, yBegin + hOffset); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin); + context.lineTo(xBegin + wOffset, yBegin); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset); + context.closePath(); + }; + var sin0 = Math.sin(0); + var cos0 = Math.cos(0); + var sin2 = {}; + var cos2 = {}; + var ellipseStepSize = Math.PI / 40; + for (var i2 = 0 * Math.PI; i2 < 2 * Math.PI; i2 += ellipseStepSize) { + sin2[i2] = Math.sin(i2); + cos2[i2] = Math.cos(i2); + } + CRp$3.drawEllipsePath = function(context, centerX, centerY, width2, height) { + if (context.beginPath) { + context.beginPath(); + } + if (context.ellipse) { + context.ellipse(centerX, centerY, width2 / 2, height / 2, 0, 0, 2 * Math.PI); + } else { + var xPos, yPos; + var rw = width2 / 2; + var rh = height / 2; + for (var i3 = 0 * Math.PI; i3 < 2 * Math.PI; i3 += ellipseStepSize) { + xPos = centerX - rw * sin2[i3] * sin0 + rw * cos2[i3] * cos0; + yPos = centerY + rh * cos2[i3] * sin0 + rh * sin2[i3] * cos0; + if (i3 === 0) { + context.moveTo(xPos, yPos); + } else { + context.lineTo(xPos, yPos); + } + } + } + context.closePath(); + }; + var CRp$2 = {}; + CRp$2.createBuffer = function(w2, h) { + var buffer = document.createElement("canvas"); + buffer.width = w2; + buffer.height = h; + return [buffer, buffer.getContext("2d")]; + }; + CRp$2.bufferCanvasImage = function(options2) { + var cy = this.cy; + var eles = cy.mutableElements(); + var bb = eles.boundingBox(); + var ctrRect = this.findContainerClientCoords(); + var width2 = options2.full ? Math.ceil(bb.w) : ctrRect[2]; + var height = options2.full ? Math.ceil(bb.h) : ctrRect[3]; + var specdMaxDims = number$12(options2.maxWidth) || number$12(options2.maxHeight); + var pxRatio = this.getPixelRatio(); + var scale = 1; + if (options2.scale !== void 0) { + width2 *= options2.scale; + height *= options2.scale; + scale = options2.scale; + } else if (specdMaxDims) { + var maxScaleW = Infinity; + var maxScaleH = Infinity; + if (number$12(options2.maxWidth)) { + maxScaleW = scale * options2.maxWidth / width2; + } + if (number$12(options2.maxHeight)) { + maxScaleH = scale * options2.maxHeight / height; + } + scale = Math.min(maxScaleW, maxScaleH); + width2 *= scale; + height *= scale; + } + if (!specdMaxDims) { + width2 *= pxRatio; + height *= pxRatio; + scale *= pxRatio; + } + var buffCanvas = document.createElement("canvas"); + buffCanvas.width = width2; + buffCanvas.height = height; + buffCanvas.style.width = width2 + "px"; + buffCanvas.style.height = height + "px"; + var buffCxt = buffCanvas.getContext("2d"); + if (width2 > 0 && height > 0) { + buffCxt.clearRect(0, 0, width2, height); + buffCxt.globalCompositeOperation = "source-over"; + var zsortedEles = this.getCachedZSortedEles(); + if (options2.full) { + buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(bb.x1 * scale, bb.y1 * scale); + } else { + var pan = cy.pan(); + var translation = { + x: pan.x * scale, + y: pan.y * scale + }; + scale *= cy.zoom(); + buffCxt.translate(translation.x, translation.y); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(-translation.x, -translation.y); + } + if (options2.bg) { + buffCxt.globalCompositeOperation = "destination-over"; + buffCxt.fillStyle = options2.bg; + buffCxt.rect(0, 0, width2, height); + buffCxt.fill(); + } + } + return buffCanvas; + }; + function b64ToBlob(b64, mimeType) { + var bytes = atob(b64); + var buff = new ArrayBuffer(bytes.length); + var buffUint8 = new Uint8Array(buff); + for (var i3 = 0; i3 < bytes.length; i3++) { + buffUint8[i3] = bytes.charCodeAt(i3); + } + return new Blob([buff], { + type: mimeType + }); + } + function b64UriToB64(b64uri) { + var i3 = b64uri.indexOf(","); + return b64uri.substr(i3 + 1); + } + function output(options2, canvas, mimeType) { + var getB64Uri = function getB64Uri2() { + return canvas.toDataURL(mimeType, options2.quality); + }; + switch (options2.output) { + case "blob-promise": + return new Promise$12(function(resolve2, reject) { + try { + canvas.toBlob(function(blob) { + if (blob != null) { + resolve2(blob); + } else { + reject(new Error("`canvas.toBlob()` sent a null value in its callback")); + } + }, mimeType, options2.quality); + } catch (err) { + reject(err); + } + }); + case "blob": + return b64ToBlob(b64UriToB64(getB64Uri()), mimeType); + case "base64": + return b64UriToB64(getB64Uri()); + case "base64uri": + default: + return getB64Uri(); + } + } + CRp$2.png = function(options2) { + return output(options2, this.bufferCanvasImage(options2), "image/png"); + }; + CRp$2.jpg = function(options2) { + return output(options2, this.bufferCanvasImage(options2), "image/jpeg"); + }; + var CRp$1 = {}; + CRp$1.nodeShapeImpl = function(name2, context, centerX, centerY, width2, height, points) { + switch (name2) { + case "ellipse": + return this.drawEllipsePath(context, centerX, centerY, width2, height); + case "polygon": + return this.drawPolygonPath(context, centerX, centerY, width2, height, points); + case "round-polygon": + return this.drawRoundPolygonPath(context, centerX, centerY, width2, height, points); + case "roundrectangle": + case "round-rectangle": + return this.drawRoundRectanglePath(context, centerX, centerY, width2, height); + case "cutrectangle": + case "cut-rectangle": + return this.drawCutRectanglePath(context, centerX, centerY, width2, height); + case "bottomroundrectangle": + case "bottom-round-rectangle": + return this.drawBottomRoundRectanglePath(context, centerX, centerY, width2, height); + case "barrel": + return this.drawBarrelPath(context, centerX, centerY, width2, height); + } + }; + var CR = CanvasRenderer; + var CRp = CanvasRenderer.prototype; + CRp.CANVAS_LAYERS = 3; + CRp.SELECT_BOX = 0; + CRp.DRAG = 1; + CRp.NODE = 2; + CRp.BUFFER_COUNT = 3; + CRp.TEXTURE_BUFFER = 0; + CRp.MOTIONBLUR_BUFFER_NODE = 1; + CRp.MOTIONBLUR_BUFFER_DRAG = 2; + function CanvasRenderer(options2) { + var r = this; + r.data = { + canvases: new Array(CRp.CANVAS_LAYERS), + contexts: new Array(CRp.CANVAS_LAYERS), + canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS), + bufferCanvases: new Array(CRp.BUFFER_COUNT), + bufferContexts: new Array(CRp.CANVAS_LAYERS) + }; + var tapHlOffAttr = "-webkit-tap-highlight-color"; + var tapHlOffStyle = "rgba(0,0,0,0)"; + r.data.canvasContainer = document.createElement("div"); + var containerStyle = r.data.canvasContainer.style; + r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; + containerStyle.position = "relative"; + containerStyle.zIndex = "0"; + containerStyle.overflow = "hidden"; + var container = options2.cy.container(); + container.appendChild(r.data.canvasContainer); + container.style[tapHlOffAttr] = tapHlOffStyle; + var styleMap = { + "-webkit-user-select": "none", + "-moz-user-select": "-moz-none", + "user-select": "none", + "-webkit-tap-highlight-color": "rgba(0,0,0,0)", + "outline-style": "none" + }; + if (ms()) { + styleMap["-ms-touch-action"] = "none"; + styleMap["touch-action"] = "none"; + } + for (var i3 = 0; i3 < CRp.CANVAS_LAYERS; i3++) { + var canvas = r.data.canvases[i3] = document.createElement("canvas"); + r.data.contexts[i3] = canvas.getContext("2d"); + Object.keys(styleMap).forEach(function(k) { + canvas.style[k] = styleMap[k]; + }); + canvas.style.position = "absolute"; + canvas.setAttribute("data-id", "layer" + i3); + canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i3); + r.data.canvasContainer.appendChild(canvas); + r.data.canvasNeedsRedraw[i3] = false; + } + r.data.topCanvas = r.data.canvases[0]; + r.data.canvases[CRp.NODE].setAttribute("data-id", "layer" + CRp.NODE + "-node"); + r.data.canvases[CRp.SELECT_BOX].setAttribute("data-id", "layer" + CRp.SELECT_BOX + "-selectbox"); + r.data.canvases[CRp.DRAG].setAttribute("data-id", "layer" + CRp.DRAG + "-drag"); + for (var i3 = 0; i3 < CRp.BUFFER_COUNT; i3++) { + r.data.bufferCanvases[i3] = document.createElement("canvas"); + r.data.bufferContexts[i3] = r.data.bufferCanvases[i3].getContext("2d"); + r.data.bufferCanvases[i3].style.position = "absolute"; + r.data.bufferCanvases[i3].setAttribute("data-id", "buffer" + i3); + r.data.bufferCanvases[i3].style.zIndex = String(-i3 - 1); + r.data.bufferCanvases[i3].style.visibility = "hidden"; + } + r.pathsEnabled = true; + var emptyBb = makeBoundingBox(); + var getBoxCenter = function getBoxCenter2(bb) { + return { + x: (bb.x1 + bb.x2) / 2, + y: (bb.y1 + bb.y2) / 2 + }; + }; + var getCenterOffset = function getCenterOffset2(bb) { + return { + x: -bb.w / 2, + y: -bb.h / 2 + }; + }; + var backgroundTimestampHasChanged = function backgroundTimestampHasChanged2(ele) { + var _p = ele[0]._private; + var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; + return !same; + }; + var getStyleKey = function getStyleKey2(ele) { + return ele[0]._private.nodeKey; + }; + var getLabelKey = function getLabelKey2(ele) { + return ele[0]._private.labelStyleKey; + }; + var getSourceLabelKey = function getSourceLabelKey2(ele) { + return ele[0]._private.sourceLabelStyleKey; + }; + var getTargetLabelKey = function getTargetLabelKey2(ele) { + return ele[0]._private.targetLabelStyleKey; + }; + var drawElement = function drawElement2(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElement(context, ele, bb, false, false, useEleOpacity); + }; + var drawLabel2 = function drawLabel3(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, "main", useEleOpacity); + }; + var drawSourceLabel = function drawSourceLabel2(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, "source", useEleOpacity); + }; + var drawTargetLabel = function drawTargetLabel2(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, "target", useEleOpacity); + }; + var getElementBox = function getElementBox2(ele) { + ele.boundingBox(); + return ele[0]._private.bodyBounds; + }; + var getLabelBox = function getLabelBox2(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.main || emptyBb; + }; + var getSourceLabelBox = function getSourceLabelBox2(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.source || emptyBb; + }; + var getTargetLabelBox = function getTargetLabelBox2(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.target || emptyBb; + }; + var isLabelVisibleAtScale = function isLabelVisibleAtScale2(ele, scaledLabelShown) { + return scaledLabelShown; + }; + var getElementRotationPoint = function getElementRotationPoint2(ele) { + return getBoxCenter(getElementBox(ele)); + }; + var addTextMargin = function addTextMargin2(prefix, pt, ele) { + var pre = prefix ? prefix + "-" : ""; + return { + x: pt.x + ele.pstyle(pre + "text-margin-x").pfValue, + y: pt.y + ele.pstyle(pre + "text-margin-y").pfValue + }; + }; + var getRsPt = function getRsPt2(ele, x2, y2) { + var rs = ele[0]._private.rscratch; + return { + x: rs[x2], + y: rs[y2] + }; + }; + var getLabelRotationPoint = function getLabelRotationPoint2(ele) { + return addTextMargin("", getRsPt(ele, "labelX", "labelY"), ele); + }; + var getSourceLabelRotationPoint = function getSourceLabelRotationPoint2(ele) { + return addTextMargin("source", getRsPt(ele, "sourceLabelX", "sourceLabelY"), ele); + }; + var getTargetLabelRotationPoint = function getTargetLabelRotationPoint2(ele) { + return addTextMargin("target", getRsPt(ele, "targetLabelX", "targetLabelY"), ele); + }; + var getElementRotationOffset = function getElementRotationOffset2(ele) { + return getCenterOffset(getElementBox(ele)); + }; + var getSourceLabelRotationOffset = function getSourceLabelRotationOffset2(ele) { + return getCenterOffset(getSourceLabelBox(ele)); + }; + var getTargetLabelRotationOffset = function getTargetLabelRotationOffset2(ele) { + return getCenterOffset(getTargetLabelBox(ele)); + }; + var getLabelRotationOffset = function getLabelRotationOffset2(ele) { + var bb = getLabelBox(ele); + var p2 = getCenterOffset(getLabelBox(ele)); + if (ele.isNode()) { + switch (ele.pstyle("text-halign").value) { + case "left": + p2.x = -bb.w; + break; + case "right": + p2.x = 0; + break; + } + switch (ele.pstyle("text-valign").value) { + case "top": + p2.y = -bb.h; + break; + case "bottom": + p2.y = 0; + break; + } + } + return p2; + }; + var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, { + getKey: getStyleKey, + doesEleInvalidateKey: backgroundTimestampHasChanged, + drawElement, + getBoundingBox: getElementBox, + getRotationPoint: getElementRotationPoint, + getRotationOffset: getElementRotationOffset, + allowEdgeTxrCaching: false, + allowParentTxrCaching: false + }); + var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, { + getKey: getLabelKey, + drawElement: drawLabel2, + getBoundingBox: getLabelBox, + getRotationPoint: getLabelRotationPoint, + getRotationOffset: getLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, { + getKey: getSourceLabelKey, + drawElement: drawSourceLabel, + getBoundingBox: getSourceLabelBox, + getRotationPoint: getSourceLabelRotationPoint, + getRotationOffset: getSourceLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, { + getKey: getTargetLabelKey, + drawElement: drawTargetLabel, + getBoundingBox: getTargetLabelBox, + getRotationPoint: getTargetLabelRotationPoint, + getRotationOffset: getTargetLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r); + r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) { + eleTxrCache.invalidateElements(eles); + lblTxrCache.invalidateElements(eles); + slbTxrCache.invalidateElements(eles); + tlbTxrCache.invalidateElements(eles); + lyrTxrCache.invalidateElements(eles); + for (var _i = 0; _i < eles.length; _i++) { + var _p = eles[_i]._private; + _p.oldBackgroundTimestamp = _p.backgroundTimestamp; + } + }); + var refineInLayers = function refineInLayers2(reqs) { + for (var i4 = 0; i4 < reqs.length; i4++) { + lyrTxrCache.enqueueElementRefinement(reqs[i4].ele); + } + }; + eleTxrCache.onDequeue(refineInLayers); + lblTxrCache.onDequeue(refineInLayers); + slbTxrCache.onDequeue(refineInLayers); + tlbTxrCache.onDequeue(refineInLayers); + } + CRp.redrawHint = function(group, bool2) { + var r = this; + switch (group) { + case "eles": + r.data.canvasNeedsRedraw[CRp.NODE] = bool2; + break; + case "drag": + r.data.canvasNeedsRedraw[CRp.DRAG] = bool2; + break; + case "select": + r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool2; + break; + } + }; + var pathsImpld = typeof Path2D !== "undefined"; + CRp.path2dEnabled = function(on) { + if (on === void 0) { + return this.pathsEnabled; + } + this.pathsEnabled = on ? true : false; + }; + CRp.usePaths = function() { + return pathsImpld && this.pathsEnabled; + }; + CRp.setImgSmoothing = function(context, bool2) { + if (context.imageSmoothingEnabled != null) { + context.imageSmoothingEnabled = bool2; + } else { + context.webkitImageSmoothingEnabled = bool2; + context.mozImageSmoothingEnabled = bool2; + context.msImageSmoothingEnabled = bool2; + } + }; + CRp.getImgSmoothing = function(context) { + if (context.imageSmoothingEnabled != null) { + return context.imageSmoothingEnabled; + } else { + return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; + } + }; + CRp.makeOffscreenCanvas = function(width2, height) { + var canvas; + if ((typeof OffscreenCanvas === "undefined" ? "undefined" : _typeof(OffscreenCanvas)) !== "undefined") { + canvas = new OffscreenCanvas(width2, height); + } else { + canvas = document.createElement("canvas"); + canvas.width = width2; + canvas.height = height; + } + return canvas; + }; + [CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function(props) { + extend2(CRp, props); + }); + var renderer2 = [{ + name: "null", + impl: NullRenderer + }, { + name: "base", + impl: BR + }, { + name: "canvas", + impl: CR + }]; + var incExts = [{ + type: "layout", + extensions: layout2 + }, { + type: "renderer", + extensions: renderer2 + }]; + var extensions = {}; + var modules = {}; + function setExtension(type2, name2, registrant) { + var ext = registrant; + var overrideErr = function overrideErr2(field) { + warn("Can not register `" + name2 + "` for `" + type2 + "` since `" + field + "` already exists in the prototype and can not be overridden"); + }; + if (type2 === "core") { + if (Core.prototype[name2]) { + return overrideErr(name2); + } else { + Core.prototype[name2] = registrant; + } + } else if (type2 === "collection") { + if (Collection.prototype[name2]) { + return overrideErr(name2); + } else { + Collection.prototype[name2] = registrant; + } + } else if (type2 === "layout") { + var Layout2 = function Layout3(options2) { + this.options = options2; + registrant.call(this, options2); + if (!plainObject(this._private)) { + this._private = {}; + } + this._private.cy = options2.cy; + this._private.listeners = []; + this.createEmitter(); + }; + var layoutProto = Layout2.prototype = Object.create(registrant.prototype); + var optLayoutFns = []; + for (var i3 = 0; i3 < optLayoutFns.length; i3++) { + var fnName = optLayoutFns[i3]; + layoutProto[fnName] = layoutProto[fnName] || function() { + return this; + }; + } + if (layoutProto.start && !layoutProto.run) { + layoutProto.run = function() { + this.start(); + return this; + }; + } else if (!layoutProto.start && layoutProto.run) { + layoutProto.start = function() { + this.run(); + return this; + }; + } + var regStop = registrant.prototype.stop; + layoutProto.stop = function() { + var opts = this.options; + if (opts && opts.animate) { + var anis = this.animations; + if (anis) { + for (var _i = 0; _i < anis.length; _i++) { + anis[_i].stop(); + } + } + } + if (regStop) { + regStop.call(this); + } else { + this.emit("layoutstop"); + } + return this; + }; + if (!layoutProto.destroy) { + layoutProto.destroy = function() { + return this; + }; + } + layoutProto.cy = function() { + return this._private.cy; + }; + var getCy = function getCy2(layout3) { + return layout3._private.cy; + }; + var emitterOpts = { + addEventFields: function addEventFields(layout3, evt) { + evt.layout = layout3; + evt.cy = getCy(layout3); + evt.target = layout3; + }, + bubble: function bubble() { + return true; + }, + parent: function parent(layout3) { + return getCy(layout3); + } + }; + extend2(layoutProto, { + createEmitter: function createEmitter() { + this._private.emitter = new Emitter(emitterOpts, this); + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(evt, cb) { + this.emitter().on(evt, cb); + return this; + }, + one: function one2(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + once: function once(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + removeListener: function removeListener(evt, cb) { + this.emitter().removeListener(evt, cb); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + emit: function emit(evt, params) { + this.emitter().emit(evt, params); + return this; + } + }); + define3.eventAliasesOn(layoutProto); + ext = Layout2; + } else if (type2 === "renderer" && name2 !== "null" && name2 !== "base") { + var BaseRenderer2 = getExtension("renderer", "base"); + var bProto = BaseRenderer2.prototype; + var RegistrantRenderer = registrant; + var rProto = registrant.prototype; + var Renderer = function Renderer2() { + BaseRenderer2.apply(this, arguments); + RegistrantRenderer.apply(this, arguments); + }; + var proto = Renderer.prototype; + for (var pName in bProto) { + var pVal = bProto[pName]; + var existsInR = rProto[pName] != null; + if (existsInR) { + return overrideErr(pName); + } + proto[pName] = pVal; + } + for (var _pName in rProto) { + proto[_pName] = rProto[_pName]; + } + bProto.clientFunctions.forEach(function(name3) { + proto[name3] = proto[name3] || function() { + error("Renderer does not implement `renderer." + name3 + "()` on its prototype"); + }; + }); + ext = Renderer; + } else if (type2 === "__proto__" || type2 === "constructor" || type2 === "prototype") { + return error(type2 + " is an illegal type to be registered, possibly lead to prototype pollutions"); + } + return setMap({ + map: extensions, + keys: [type2, name2], + value: ext + }); + } + function getExtension(type2, name2) { + return getMap({ + map: extensions, + keys: [type2, name2] + }); + } + function setModule(type2, name2, moduleType, moduleName, registrant) { + return setMap({ + map: modules, + keys: [type2, name2, moduleType, moduleName], + value: registrant + }); + } + function getModule(type2, name2, moduleType, moduleName) { + return getMap({ + map: modules, + keys: [type2, name2, moduleType, moduleName] + }); + } + var extension2 = function extension3() { + if (arguments.length === 2) { + return getExtension.apply(null, arguments); + } else if (arguments.length === 3) { + return setExtension.apply(null, arguments); + } else if (arguments.length === 4) { + return getModule.apply(null, arguments); + } else if (arguments.length === 5) { + return setModule.apply(null, arguments); + } else { + error("Invalid extension access syntax"); + } + }; + Core.prototype.extension = extension2; + incExts.forEach(function(group) { + group.extensions.forEach(function(ext) { + setExtension(group.type, ext.name, ext.impl); + }); + }); + var Stylesheet = function Stylesheet2() { + if (!(this instanceof Stylesheet2)) { + return new Stylesheet2(); + } + this.length = 0; + }; + var sheetfn = Stylesheet.prototype; + sheetfn.instanceString = function() { + return "stylesheet"; + }; + sheetfn.selector = function(selector2) { + var i3 = this.length++; + this[i3] = { + selector: selector2, + properties: [] + }; + return this; + }; + sheetfn.css = function(name2, value2) { + var i3 = this.length - 1; + if (string2(name2)) { + this[i3].properties.push({ + name: name2, + value: value2 + }); + } else if (plainObject(name2)) { + var map2 = name2; + var propNames = Object.keys(map2); + for (var j = 0; j < propNames.length; j++) { + var key = propNames[j]; + var mapVal = map2[key]; + if (mapVal == null) { + continue; + } + var prop = Style.properties[key] || Style.properties[dash2camel(key)]; + if (prop == null) { + continue; + } + var _name = prop.name; + var _value = mapVal; + this[i3].properties.push({ + name: _name, + value: _value + }); + } + } + return this; + }; + sheetfn.style = sheetfn.css; + sheetfn.generateStyle = function(cy) { + var style = new Style(cy); + return this.appendToStyle(style); + }; + sheetfn.appendToStyle = function(style) { + for (var i3 = 0; i3 < this.length; i3++) { + var context = this[i3]; + var selector2 = context.selector; + var props = context.properties; + style.selector(selector2); + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + style.css(prop.name, prop.value); + } + } + return style; + }; + var version2 = "3.23.0"; + var cytoscape2 = function cytoscape3(options2) { + if (options2 === void 0) { + options2 = {}; + } + if (plainObject(options2)) { + return new Core(options2); + } else if (string2(options2)) { + return extension2.apply(extension2, arguments); + } + }; + cytoscape2.use = function(ext) { + var args = Array.prototype.slice.call(arguments, 1); + args.unshift(cytoscape2); + ext.apply(null, args); + return this; + }; + cytoscape2.warnings = function(bool2) { + return warnings(bool2); + }; + cytoscape2.version = version2; + cytoscape2.stylesheet = cytoscape2.Stylesheet = Stylesheet; + return cytoscape2; + }); + })(cytoscape_umd); + var cytoscape_umdExports = cytoscape_umd.exports; + const cytoscape$1 = /* @__PURE__ */ getDefaultExportFromCjs(cytoscape_umdExports); + var cytoscapeCoseBilkent = { exports: {} }; + var coseBase = { exports: {} }; + var layoutBase = { exports: {} }; + var hasRequiredLayoutBase; + function requireLayoutBase() { + if (hasRequiredLayoutBase) + return layoutBase.exports; + hasRequiredLayoutBase = 1; + (function(module2, exports2) { + (function webpackUniversalModuleDefinition(root2, factory) { + module2.exports = factory(); + })(commonjsGlobal, function() { + return ( + /******/ + function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module3 = installedModules[moduleId] = { + /******/ + i: moduleId, + /******/ + l: false, + /******/ + exports: {} + /******/ + }; + modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__); + module3.l = true; + return module3.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value2) { + return value2; + }; + __webpack_require__.d = function(exports3, name2, getter) { + if (!__webpack_require__.o(exports3, name2)) { + Object.defineProperty(exports3, name2, { + /******/ + configurable: false, + /******/ + enumerable: true, + /******/ + get: getter + /******/ + }); + } + }; + __webpack_require__.n = function(module3) { + var getter = module3 && module3.__esModule ? ( + /******/ + function getDefault() { + return module3["default"]; + } + ) : ( + /******/ + function getModuleExports() { + return module3; + } + ); + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object2, property2) { + return Object.prototype.hasOwnProperty.call(object2, property2); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 26); + }([ + /* 0 */ + /***/ + function(module3, exports3, __webpack_require__) { + function LayoutConstants() { + } + LayoutConstants.QUALITY = 1; + LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; + LayoutConstants.DEFAULT_INCREMENTAL = false; + LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; + LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; + LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; + LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; + LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; + LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; + LayoutConstants.SIMPLE_NODE_SIZE = 40; + LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; + LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; + LayoutConstants.MIN_EDGE_LENGTH = 1; + LayoutConstants.WORLD_BOUNDARY = 1e6; + LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1e3; + LayoutConstants.WORLD_CENTER_X = 1200; + LayoutConstants.WORLD_CENTER_Y = 900; + module3.exports = LayoutConstants; + }, + /* 1 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LGraphObject = __webpack_require__(2); + var IGeometry = __webpack_require__(8); + var IMath = __webpack_require__(9); + function LEdge(source, target, vEdge) { + LGraphObject.call(this, vEdge); + this.isOverlapingSourceAndTarget = false; + this.vGraphObject = vEdge; + this.bendpoints = []; + this.source = source; + this.target = target; + } + LEdge.prototype = Object.create(LGraphObject.prototype); + for (var prop in LGraphObject) { + LEdge[prop] = LGraphObject[prop]; + } + LEdge.prototype.getSource = function() { + return this.source; + }; + LEdge.prototype.getTarget = function() { + return this.target; + }; + LEdge.prototype.isInterGraph = function() { + return this.isInterGraph; + }; + LEdge.prototype.getLength = function() { + return this.length; + }; + LEdge.prototype.isOverlapingSourceAndTarget = function() { + return this.isOverlapingSourceAndTarget; + }; + LEdge.prototype.getBendpoints = function() { + return this.bendpoints; + }; + LEdge.prototype.getLca = function() { + return this.lca; + }; + LEdge.prototype.getSourceInLca = function() { + return this.sourceInLca; + }; + LEdge.prototype.getTargetInLca = function() { + return this.targetInLca; + }; + LEdge.prototype.getOtherEnd = function(node2) { + if (this.source === node2) { + return this.target; + } else if (this.target === node2) { + return this.source; + } else { + throw "Node is not incident with this edge"; + } + }; + LEdge.prototype.getOtherEndInGraph = function(node2, graph) { + var otherEnd = this.getOtherEnd(node2); + var root2 = graph.getGraphManager().getRoot(); + while (true) { + if (otherEnd.getOwner() == graph) { + return otherEnd; + } + if (otherEnd.getOwner() == root2) { + break; + } + otherEnd = otherEnd.getOwner().getParent(); + } + return null; + }; + LEdge.prototype.updateLength = function() { + var clipPointCoordinates = new Array(4); + this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); + if (!this.isOverlapingSourceAndTarget) { + this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; + this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; + if (Math.abs(this.lengthX) < 1) { + this.lengthX = IMath.sign(this.lengthX); + } + if (Math.abs(this.lengthY) < 1) { + this.lengthY = IMath.sign(this.lengthY); + } + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + } + }; + LEdge.prototype.updateLengthSimple = function() { + this.lengthX = this.target.getCenterX() - this.source.getCenterX(); + this.lengthY = this.target.getCenterY() - this.source.getCenterY(); + if (Math.abs(this.lengthX) < 1) { + this.lengthX = IMath.sign(this.lengthX); + } + if (Math.abs(this.lengthY) < 1) { + this.lengthY = IMath.sign(this.lengthY); + } + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + }; + module3.exports = LEdge; + }, + /* 2 */ + /***/ + function(module3, exports3, __webpack_require__) { + function LGraphObject(vGraphObject) { + this.vGraphObject = vGraphObject; + } + module3.exports = LGraphObject; + }, + /* 3 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LGraphObject = __webpack_require__(2); + var Integer = __webpack_require__(10); + var RectangleD = __webpack_require__(13); + var LayoutConstants = __webpack_require__(0); + var RandomSeed = __webpack_require__(16); + var PointD = __webpack_require__(4); + function LNode(gm, loc, size2, vNode) { + if (size2 == null && vNode == null) { + vNode = loc; + } + LGraphObject.call(this, vNode); + if (gm.graphManager != null) + gm = gm.graphManager; + this.estimatedSize = Integer.MIN_VALUE; + this.inclusionTreeDepth = Integer.MAX_VALUE; + this.vGraphObject = vNode; + this.edges = []; + this.graphManager = gm; + if (size2 != null && loc != null) + this.rect = new RectangleD(loc.x, loc.y, size2.width, size2.height); + else + this.rect = new RectangleD(); + } + LNode.prototype = Object.create(LGraphObject.prototype); + for (var prop in LGraphObject) { + LNode[prop] = LGraphObject[prop]; + } + LNode.prototype.getEdges = function() { + return this.edges; + }; + LNode.prototype.getChild = function() { + return this.child; + }; + LNode.prototype.getOwner = function() { + return this.owner; + }; + LNode.prototype.getWidth = function() { + return this.rect.width; + }; + LNode.prototype.setWidth = function(width2) { + this.rect.width = width2; + }; + LNode.prototype.getHeight = function() { + return this.rect.height; + }; + LNode.prototype.setHeight = function(height) { + this.rect.height = height; + }; + LNode.prototype.getCenterX = function() { + return this.rect.x + this.rect.width / 2; + }; + LNode.prototype.getCenterY = function() { + return this.rect.y + this.rect.height / 2; + }; + LNode.prototype.getCenter = function() { + return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); + }; + LNode.prototype.getLocation = function() { + return new PointD(this.rect.x, this.rect.y); + }; + LNode.prototype.getRect = function() { + return this.rect; + }; + LNode.prototype.getDiagonal = function() { + return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); + }; + LNode.prototype.getHalfTheDiagonal = function() { + return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; + }; + LNode.prototype.setRect = function(upperLeft, dimension) { + this.rect.x = upperLeft.x; + this.rect.y = upperLeft.y; + this.rect.width = dimension.width; + this.rect.height = dimension.height; + }; + LNode.prototype.setCenter = function(cx, cy) { + this.rect.x = cx - this.rect.width / 2; + this.rect.y = cy - this.rect.height / 2; + }; + LNode.prototype.setLocation = function(x2, y2) { + this.rect.x = x2; + this.rect.y = y2; + }; + LNode.prototype.moveBy = function(dx, dy) { + this.rect.x += dx; + this.rect.y += dy; + }; + LNode.prototype.getEdgeListToNode = function(to) { + var edgeList = []; + var self2 = this; + self2.edges.forEach(function(edge) { + if (edge.target == to) { + if (edge.source != self2) + throw "Incorrect edge source!"; + edgeList.push(edge); + } + }); + return edgeList; + }; + LNode.prototype.getEdgesBetween = function(other) { + var edgeList = []; + var self2 = this; + self2.edges.forEach(function(edge) { + if (!(edge.source == self2 || edge.target == self2)) + throw "Incorrect edge source and/or target"; + if (edge.target == other || edge.source == other) { + edgeList.push(edge); + } + }); + return edgeList; + }; + LNode.prototype.getNeighborsList = function() { + var neighbors = /* @__PURE__ */ new Set(); + var self2 = this; + self2.edges.forEach(function(edge) { + if (edge.source == self2) { + neighbors.add(edge.target); + } else { + if (edge.target != self2) { + throw "Incorrect incidency!"; + } + neighbors.add(edge.source); + } + }); + return neighbors; + }; + LNode.prototype.withChildren = function() { + var withNeighborsList = /* @__PURE__ */ new Set(); + var childNode; + var children2; + withNeighborsList.add(this); + if (this.child != null) { + var nodes2 = this.child.getNodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + childNode = nodes2[i2]; + children2 = childNode.withChildren(); + children2.forEach(function(node2) { + withNeighborsList.add(node2); + }); + } + } + return withNeighborsList; + }; + LNode.prototype.getNoOfChildren = function() { + var noOfChildren = 0; + var childNode; + if (this.child == null) { + noOfChildren = 1; + } else { + var nodes2 = this.child.getNodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + childNode = nodes2[i2]; + noOfChildren += childNode.getNoOfChildren(); + } + } + if (noOfChildren == 0) { + noOfChildren = 1; + } + return noOfChildren; + }; + LNode.prototype.getEstimatedSize = function() { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; + }; + LNode.prototype.calcEstimatedSize = function() { + if (this.child == null) { + return this.estimatedSize = (this.rect.width + this.rect.height) / 2; + } else { + this.estimatedSize = this.child.calcEstimatedSize(); + this.rect.width = this.estimatedSize; + this.rect.height = this.estimatedSize; + return this.estimatedSize; + } + }; + LNode.prototype.scatter = function() { + var randomCenterX; + var randomCenterY; + var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; + var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; + this.rect.x = randomCenterX; + this.rect.y = randomCenterY; + }; + LNode.prototype.updateBounds = function() { + if (this.getChild() == null) { + throw "assert failed"; + } + if (this.getChild().getNodes().length != 0) { + var childGraph = this.getChild(); + childGraph.updateBounds(true); + this.rect.x = childGraph.getLeft(); + this.rect.y = childGraph.getTop(); + this.setWidth(childGraph.getRight() - childGraph.getLeft()); + this.setHeight(childGraph.getBottom() - childGraph.getTop()); + if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + var width2 = childGraph.getRight() - childGraph.getLeft(); + var height = childGraph.getBottom() - childGraph.getTop(); + if (this.labelWidth > width2) { + this.rect.x -= (this.labelWidth - width2) / 2; + this.setWidth(this.labelWidth); + } + if (this.labelHeight > height) { + if (this.labelPos == "center") { + this.rect.y -= (this.labelHeight - height) / 2; + } else if (this.labelPos == "top") { + this.rect.y -= this.labelHeight - height; + } + this.setHeight(this.labelHeight); + } + } + } + }; + LNode.prototype.getInclusionTreeDepth = function() { + if (this.inclusionTreeDepth == Integer.MAX_VALUE) { + throw "assert failed"; + } + return this.inclusionTreeDepth; + }; + LNode.prototype.transform = function(trans) { + var left2 = this.rect.x; + if (left2 > LayoutConstants.WORLD_BOUNDARY) { + left2 = LayoutConstants.WORLD_BOUNDARY; + } else if (left2 < -LayoutConstants.WORLD_BOUNDARY) { + left2 = -LayoutConstants.WORLD_BOUNDARY; + } + var top2 = this.rect.y; + if (top2 > LayoutConstants.WORLD_BOUNDARY) { + top2 = LayoutConstants.WORLD_BOUNDARY; + } else if (top2 < -LayoutConstants.WORLD_BOUNDARY) { + top2 = -LayoutConstants.WORLD_BOUNDARY; + } + var leftTop = new PointD(left2, top2); + var vLeftTop = trans.inverseTransformPoint(leftTop); + this.setLocation(vLeftTop.x, vLeftTop.y); + }; + LNode.prototype.getLeft = function() { + return this.rect.x; + }; + LNode.prototype.getRight = function() { + return this.rect.x + this.rect.width; + }; + LNode.prototype.getTop = function() { + return this.rect.y; + }; + LNode.prototype.getBottom = function() { + return this.rect.y + this.rect.height; + }; + LNode.prototype.getParent = function() { + if (this.owner == null) { + return null; + } + return this.owner.getParent(); + }; + module3.exports = LNode; + }, + /* 4 */ + /***/ + function(module3, exports3, __webpack_require__) { + function PointD(x2, y2) { + if (x2 == null && y2 == null) { + this.x = 0; + this.y = 0; + } else { + this.x = x2; + this.y = y2; + } + } + PointD.prototype.getX = function() { + return this.x; + }; + PointD.prototype.getY = function() { + return this.y; + }; + PointD.prototype.setX = function(x2) { + this.x = x2; + }; + PointD.prototype.setY = function(y2) { + this.y = y2; + }; + PointD.prototype.getDifference = function(pt) { + return new DimensionD(this.x - pt.x, this.y - pt.y); + }; + PointD.prototype.getCopy = function() { + return new PointD(this.x, this.y); + }; + PointD.prototype.translate = function(dim) { + this.x += dim.width; + this.y += dim.height; + return this; + }; + module3.exports = PointD; + }, + /* 5 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LGraphObject = __webpack_require__(2); + var Integer = __webpack_require__(10); + var LayoutConstants = __webpack_require__(0); + var LGraphManager = __webpack_require__(6); + var LNode = __webpack_require__(3); + var LEdge = __webpack_require__(1); + var RectangleD = __webpack_require__(13); + var Point2 = __webpack_require__(12); + var LinkedList = __webpack_require__(11); + function LGraph(parent, obj2, vGraph) { + LGraphObject.call(this, vGraph); + this.estimatedSize = Integer.MIN_VALUE; + this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; + this.edges = []; + this.nodes = []; + this.isConnected = false; + this.parent = parent; + if (obj2 != null && obj2 instanceof LGraphManager) { + this.graphManager = obj2; + } else if (obj2 != null && obj2 instanceof Layout) { + this.graphManager = obj2.graphManager; + } + } + LGraph.prototype = Object.create(LGraphObject.prototype); + for (var prop in LGraphObject) { + LGraph[prop] = LGraphObject[prop]; + } + LGraph.prototype.getNodes = function() { + return this.nodes; + }; + LGraph.prototype.getEdges = function() { + return this.edges; + }; + LGraph.prototype.getGraphManager = function() { + return this.graphManager; + }; + LGraph.prototype.getParent = function() { + return this.parent; + }; + LGraph.prototype.getLeft = function() { + return this.left; + }; + LGraph.prototype.getRight = function() { + return this.right; + }; + LGraph.prototype.getTop = function() { + return this.top; + }; + LGraph.prototype.getBottom = function() { + return this.bottom; + }; + LGraph.prototype.isConnected = function() { + return this.isConnected; + }; + LGraph.prototype.add = function(obj1, sourceNode, targetNode) { + if (sourceNode == null && targetNode == null) { + var newNode = obj1; + if (this.graphManager == null) { + throw "Graph has no graph mgr!"; + } + if (this.getNodes().indexOf(newNode) > -1) { + throw "Node already in graph!"; + } + newNode.owner = this; + this.getNodes().push(newNode); + return newNode; + } else { + var newEdge = obj1; + if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { + throw "Source or target not in graph!"; + } + if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { + throw "Both owners must be this graph!"; + } + if (sourceNode.owner != targetNode.owner) { + return null; + } + newEdge.source = sourceNode; + newEdge.target = targetNode; + newEdge.isInterGraph = false; + this.getEdges().push(newEdge); + sourceNode.edges.push(newEdge); + if (targetNode != sourceNode) { + targetNode.edges.push(newEdge); + } + return newEdge; + } + }; + LGraph.prototype.remove = function(obj) { + var node2 = obj; + if (obj instanceof LNode) { + if (node2 == null) { + throw "Node is null!"; + } + if (!(node2.owner != null && node2.owner == this)) { + throw "Owner graph is invalid!"; + } + if (this.graphManager == null) { + throw "Owner graph manager is invalid!"; + } + var edgesToBeRemoved = node2.edges.slice(); + var edge; + var s = edgesToBeRemoved.length; + for (var i2 = 0; i2 < s; i2++) { + edge = edgesToBeRemoved[i2]; + if (edge.isInterGraph) { + this.graphManager.remove(edge); + } else { + edge.source.owner.remove(edge); + } + } + var index2 = this.nodes.indexOf(node2); + if (index2 == -1) { + throw "Node not in owner node list!"; + } + this.nodes.splice(index2, 1); + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge == null) { + throw "Edge is null!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { + throw "Source and/or target owner is invalid!"; + } + var sourceIndex = edge.source.edges.indexOf(edge); + var targetIndex = edge.target.edges.indexOf(edge); + if (!(sourceIndex > -1 && targetIndex > -1)) { + throw "Source and/or target doesn't know this edge!"; + } + edge.source.edges.splice(sourceIndex, 1); + if (edge.target != edge.source) { + edge.target.edges.splice(targetIndex, 1); + } + var index2 = edge.source.owner.getEdges().indexOf(edge); + if (index2 == -1) { + throw "Not in owner's edge list!"; + } + edge.source.owner.getEdges().splice(index2, 1); + } + }; + LGraph.prototype.updateLeftTop = function() { + var top2 = Integer.MAX_VALUE; + var left2 = Integer.MAX_VALUE; + var nodeTop; + var nodeLeft; + var margin; + var nodes2 = this.getNodes(); + var s = nodes2.length; + for (var i2 = 0; i2 < s; i2++) { + var lNode = nodes2[i2]; + nodeTop = lNode.getTop(); + nodeLeft = lNode.getLeft(); + if (top2 > nodeTop) { + top2 = nodeTop; + } + if (left2 > nodeLeft) { + left2 = nodeLeft; + } + } + if (top2 == Integer.MAX_VALUE) { + return null; + } + if (nodes2[0].getParent().paddingLeft != void 0) { + margin = nodes2[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + this.left = left2 - margin; + this.top = top2 - margin; + return new Point2(this.left, this.top); + }; + LGraph.prototype.updateBounds = function(recursive) { + var left2 = Integer.MAX_VALUE; + var right2 = -Integer.MAX_VALUE; + var top2 = Integer.MAX_VALUE; + var bottom2 = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var margin; + var nodes2 = this.nodes; + var s = nodes2.length; + for (var i2 = 0; i2 < s; i2++) { + var lNode = nodes2[i2]; + if (recursive && lNode.child != null) { + lNode.updateBounds(); + } + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + if (left2 > nodeLeft) { + left2 = nodeLeft; + } + if (right2 < nodeRight) { + right2 = nodeRight; + } + if (top2 > nodeTop) { + top2 = nodeTop; + } + if (bottom2 < nodeBottom) { + bottom2 = nodeBottom; + } + } + var boundingRect = new RectangleD(left2, top2, right2 - left2, bottom2 - top2); + if (left2 == Integer.MAX_VALUE) { + this.left = this.parent.getLeft(); + this.right = this.parent.getRight(); + this.top = this.parent.getTop(); + this.bottom = this.parent.getBottom(); + } + if (nodes2[0].getParent().paddingLeft != void 0) { + margin = nodes2[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + this.left = boundingRect.x - margin; + this.right = boundingRect.x + boundingRect.width + margin; + this.top = boundingRect.y - margin; + this.bottom = boundingRect.y + boundingRect.height + margin; + }; + LGraph.calculateBounds = function(nodes2) { + var left2 = Integer.MAX_VALUE; + var right2 = -Integer.MAX_VALUE; + var top2 = Integer.MAX_VALUE; + var bottom2 = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var s = nodes2.length; + for (var i2 = 0; i2 < s; i2++) { + var lNode = nodes2[i2]; + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + if (left2 > nodeLeft) { + left2 = nodeLeft; + } + if (right2 < nodeRight) { + right2 = nodeRight; + } + if (top2 > nodeTop) { + top2 = nodeTop; + } + if (bottom2 < nodeBottom) { + bottom2 = nodeBottom; + } + } + var boundingRect = new RectangleD(left2, top2, right2 - left2, bottom2 - top2); + return boundingRect; + }; + LGraph.prototype.getInclusionTreeDepth = function() { + if (this == this.graphManager.getRoot()) { + return 1; + } else { + return this.parent.getInclusionTreeDepth(); + } + }; + LGraph.prototype.getEstimatedSize = function() { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; + }; + LGraph.prototype.calcEstimatedSize = function() { + var size2 = 0; + var nodes2 = this.nodes; + var s = nodes2.length; + for (var i2 = 0; i2 < s; i2++) { + var lNode = nodes2[i2]; + size2 += lNode.calcEstimatedSize(); + } + if (size2 == 0) { + this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; + } else { + this.estimatedSize = size2 / Math.sqrt(this.nodes.length); + } + return this.estimatedSize; + }; + LGraph.prototype.updateConnected = function() { + var self2 = this; + if (this.nodes.length == 0) { + this.isConnected = true; + return; + } + var queue = new LinkedList(); + var visited = /* @__PURE__ */ new Set(); + var currentNode = this.nodes[0]; + var neighborEdges; + var currentNeighbor; + var childrenOfNode = currentNode.withChildren(); + childrenOfNode.forEach(function(node2) { + queue.push(node2); + visited.add(node2); + }); + while (queue.length !== 0) { + currentNode = queue.shift(); + neighborEdges = currentNode.getEdges(); + var size2 = neighborEdges.length; + for (var i2 = 0; i2 < size2; i2++) { + var neighborEdge = neighborEdges[i2]; + currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); + if (currentNeighbor != null && !visited.has(currentNeighbor)) { + var childrenOfNeighbor = currentNeighbor.withChildren(); + childrenOfNeighbor.forEach(function(node2) { + queue.push(node2); + visited.add(node2); + }); + } + } + } + this.isConnected = false; + if (visited.size >= this.nodes.length) { + var noOfVisitedInThisGraph = 0; + visited.forEach(function(visitedNode) { + if (visitedNode.owner == self2) { + noOfVisitedInThisGraph++; + } + }); + if (noOfVisitedInThisGraph == this.nodes.length) { + this.isConnected = true; + } + } + }; + module3.exports = LGraph; + }, + /* 6 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LGraph; + var LEdge = __webpack_require__(1); + function LGraphManager(layout2) { + LGraph = __webpack_require__(5); + this.layout = layout2; + this.graphs = []; + this.edges = []; + } + LGraphManager.prototype.addRoot = function() { + var ngraph = this.layout.newGraph(); + var nnode = this.layout.newNode(null); + var root2 = this.add(ngraph, nnode); + this.setRootGraph(root2); + return this.rootGraph; + }; + LGraphManager.prototype.add = function(newGraph, parentNode, newEdge, sourceNode, targetNode) { + if (newEdge == null && sourceNode == null && targetNode == null) { + if (newGraph == null) { + throw "Graph is null!"; + } + if (parentNode == null) { + throw "Parent node is null!"; + } + if (this.graphs.indexOf(newGraph) > -1) { + throw "Graph already in this graph mgr!"; + } + this.graphs.push(newGraph); + if (newGraph.parent != null) { + throw "Already has a parent!"; + } + if (parentNode.child != null) { + throw "Already has a child!"; + } + newGraph.parent = parentNode; + parentNode.child = newGraph; + return newGraph; + } else { + targetNode = newEdge; + sourceNode = parentNode; + newEdge = newGraph; + var sourceGraph = sourceNode.getOwner(); + var targetGraph = targetNode.getOwner(); + if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { + throw "Source not in this graph mgr!"; + } + if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { + throw "Target not in this graph mgr!"; + } + if (sourceGraph == targetGraph) { + newEdge.isInterGraph = false; + return sourceGraph.add(newEdge, sourceNode, targetNode); + } else { + newEdge.isInterGraph = true; + newEdge.source = sourceNode; + newEdge.target = targetNode; + if (this.edges.indexOf(newEdge) > -1) { + throw "Edge already in inter-graph edge list!"; + } + this.edges.push(newEdge); + if (!(newEdge.source != null && newEdge.target != null)) { + throw "Edge source and/or target is null!"; + } + if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { + throw "Edge already in source and/or target incidency list!"; + } + newEdge.source.edges.push(newEdge); + newEdge.target.edges.push(newEdge); + return newEdge; + } + } + }; + LGraphManager.prototype.remove = function(lObj) { + if (lObj instanceof LGraph) { + var graph = lObj; + if (graph.getGraphManager() != this) { + throw "Graph not in this graph mgr"; + } + if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { + throw "Invalid parent node!"; + } + var edgesToBeRemoved = []; + edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); + var edge; + var s = edgesToBeRemoved.length; + for (var i2 = 0; i2 < s; i2++) { + edge = edgesToBeRemoved[i2]; + graph.remove(edge); + } + var nodesToBeRemoved = []; + nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); + var node2; + s = nodesToBeRemoved.length; + for (var i2 = 0; i2 < s; i2++) { + node2 = nodesToBeRemoved[i2]; + graph.remove(node2); + } + if (graph == this.rootGraph) { + this.setRootGraph(null); + } + var index2 = this.graphs.indexOf(graph); + this.graphs.splice(index2, 1); + graph.parent = null; + } else if (lObj instanceof LEdge) { + edge = lObj; + if (edge == null) { + throw "Edge is null!"; + } + if (!edge.isInterGraph) { + throw "Not an inter-graph edge!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { + throw "Source and/or target doesn't know this edge!"; + } + var index2 = edge.source.edges.indexOf(edge); + edge.source.edges.splice(index2, 1); + index2 = edge.target.edges.indexOf(edge); + edge.target.edges.splice(index2, 1); + if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { + throw "Edge owner graph or owner graph manager is null!"; + } + if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { + throw "Not in owner graph manager's edge list!"; + } + var index2 = edge.source.owner.getGraphManager().edges.indexOf(edge); + edge.source.owner.getGraphManager().edges.splice(index2, 1); + } + }; + LGraphManager.prototype.updateBounds = function() { + this.rootGraph.updateBounds(true); + }; + LGraphManager.prototype.getGraphs = function() { + return this.graphs; + }; + LGraphManager.prototype.getAllNodes = function() { + if (this.allNodes == null) { + var nodeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i2 = 0; i2 < s; i2++) { + nodeList = nodeList.concat(graphs[i2].getNodes()); + } + this.allNodes = nodeList; + } + return this.allNodes; + }; + LGraphManager.prototype.resetAllNodes = function() { + this.allNodes = null; + }; + LGraphManager.prototype.resetAllEdges = function() { + this.allEdges = null; + }; + LGraphManager.prototype.resetAllNodesToApplyGravitation = function() { + this.allNodesToApplyGravitation = null; + }; + LGraphManager.prototype.getAllEdges = function() { + if (this.allEdges == null) { + var edgeList = []; + var graphs = this.getGraphs(); + graphs.length; + for (var i2 = 0; i2 < graphs.length; i2++) { + edgeList = edgeList.concat(graphs[i2].getEdges()); + } + edgeList = edgeList.concat(this.edges); + this.allEdges = edgeList; + } + return this.allEdges; + }; + LGraphManager.prototype.getAllNodesToApplyGravitation = function() { + return this.allNodesToApplyGravitation; + }; + LGraphManager.prototype.setAllNodesToApplyGravitation = function(nodeList) { + if (this.allNodesToApplyGravitation != null) { + throw "assert failed"; + } + this.allNodesToApplyGravitation = nodeList; + }; + LGraphManager.prototype.getRoot = function() { + return this.rootGraph; + }; + LGraphManager.prototype.setRootGraph = function(graph) { + if (graph.getGraphManager() != this) { + throw "Root not in this graph mgr!"; + } + this.rootGraph = graph; + if (graph.parent == null) { + graph.parent = this.layout.newNode("Root node"); + } + }; + LGraphManager.prototype.getLayout = function() { + return this.layout; + }; + LGraphManager.prototype.isOneAncestorOfOther = function(firstNode, secondNode) { + if (!(firstNode != null && secondNode != null)) { + throw "assert failed"; + } + if (firstNode == secondNode) { + return true; + } + var ownerGraph = firstNode.getOwner(); + var parentNode; + do { + parentNode = ownerGraph.getParent(); + if (parentNode == null) { + break; + } + if (parentNode == secondNode) { + return true; + } + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + ownerGraph = secondNode.getOwner(); + do { + parentNode = ownerGraph.getParent(); + if (parentNode == null) { + break; + } + if (parentNode == firstNode) { + return true; + } + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + return false; + }; + LGraphManager.prototype.calcLowestCommonAncestors = function() { + var edge; + var sourceNode; + var targetNode; + var sourceAncestorGraph; + var targetAncestorGraph; + var edges2 = this.getAllEdges(); + var s = edges2.length; + for (var i2 = 0; i2 < s; i2++) { + edge = edges2[i2]; + sourceNode = edge.source; + targetNode = edge.target; + edge.lca = null; + edge.sourceInLca = sourceNode; + edge.targetInLca = targetNode; + if (sourceNode == targetNode) { + edge.lca = sourceNode.getOwner(); + continue; + } + sourceAncestorGraph = sourceNode.getOwner(); + while (edge.lca == null) { + edge.targetInLca = targetNode; + targetAncestorGraph = targetNode.getOwner(); + while (edge.lca == null) { + if (targetAncestorGraph == sourceAncestorGraph) { + edge.lca = targetAncestorGraph; + break; + } + if (targetAncestorGraph == this.rootGraph) { + break; + } + if (edge.lca != null) { + throw "assert failed"; + } + edge.targetInLca = targetAncestorGraph.getParent(); + targetAncestorGraph = edge.targetInLca.getOwner(); + } + if (sourceAncestorGraph == this.rootGraph) { + break; + } + if (edge.lca == null) { + edge.sourceInLca = sourceAncestorGraph.getParent(); + sourceAncestorGraph = edge.sourceInLca.getOwner(); + } + } + if (edge.lca == null) { + throw "assert failed"; + } + } + }; + LGraphManager.prototype.calcLowestCommonAncestor = function(firstNode, secondNode) { + if (firstNode == secondNode) { + return firstNode.getOwner(); + } + var firstOwnerGraph = firstNode.getOwner(); + do { + if (firstOwnerGraph == null) { + break; + } + var secondOwnerGraph = secondNode.getOwner(); + do { + if (secondOwnerGraph == null) { + break; + } + if (secondOwnerGraph == firstOwnerGraph) { + return secondOwnerGraph; + } + secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); + } while (true); + firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); + } while (true); + return firstOwnerGraph; + }; + LGraphManager.prototype.calcInclusionTreeDepths = function(graph, depth) { + if (graph == null && depth == null) { + graph = this.rootGraph; + depth = 1; + } + var node2; + var nodes2 = graph.getNodes(); + var s = nodes2.length; + for (var i2 = 0; i2 < s; i2++) { + node2 = nodes2[i2]; + node2.inclusionTreeDepth = depth; + if (node2.child != null) { + this.calcInclusionTreeDepths(node2.child, depth + 1); + } + } + }; + LGraphManager.prototype.includesInvalidEdge = function() { + var edge; + var s = this.edges.length; + for (var i2 = 0; i2 < s; i2++) { + edge = this.edges[i2]; + if (this.isOneAncestorOfOther(edge.source, edge.target)) { + return true; + } + } + return false; + }; + module3.exports = LGraphManager; + }, + /* 7 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LayoutConstants = __webpack_require__(0); + function FDLayoutConstants() { + } + for (var prop in LayoutConstants) { + FDLayoutConstants[prop] = LayoutConstants[prop]; + } + FDLayoutConstants.MAX_ITERATIONS = 2500; + FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; + FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; + FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500; + FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; + FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1; + FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; + FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; + FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; + FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; + FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; + FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; + FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1e3; + FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5e3; + FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100; + FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; + FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10; + FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; + FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; + FDLayoutConstants.MIN_EDGE_LENGTH = 1; + FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; + module3.exports = FDLayoutConstants; + }, + /* 8 */ + /***/ + function(module3, exports3, __webpack_require__) { + var Point2 = __webpack_require__(12); + function IGeometry() { + } + IGeometry.calcSeparationAmount = function(rectA, rectB, overlapAmount, separationBuffer) { + if (!rectA.intersects(rectB)) { + throw "assert failed"; + } + var directions = new Array(2); + this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); + overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); + overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); + if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { + overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); + } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { + overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); + } + if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { + overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); + } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { + overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); + } + var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); + if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { + slope = 1; + } + var moveByY = slope * overlapAmount[0]; + var moveByX = overlapAmount[1] / slope; + if (overlapAmount[0] < moveByX) { + moveByX = overlapAmount[0]; + } else { + moveByY = overlapAmount[1]; + } + overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); + overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); + }; + IGeometry.decideDirectionsForOverlappingNodes = function(rectA, rectB, directions) { + if (rectA.getCenterX() < rectB.getCenterX()) { + directions[0] = -1; + } else { + directions[0] = 1; + } + if (rectA.getCenterY() < rectB.getCenterY()) { + directions[1] = -1; + } else { + directions[1] = 1; + } + }; + IGeometry.getIntersection2 = function(rectA, rectB, result) { + var p1x = rectA.getCenterX(); + var p1y = rectA.getCenterY(); + var p2x = rectB.getCenterX(); + var p2y = rectB.getCenterY(); + if (rectA.intersects(rectB)) { + result[0] = p1x; + result[1] = p1y; + result[2] = p2x; + result[3] = p2y; + return true; + } + var topLeftAx = rectA.getX(); + var topLeftAy = rectA.getY(); + var topRightAx = rectA.getRight(); + var bottomLeftAx = rectA.getX(); + var bottomLeftAy = rectA.getBottom(); + var bottomRightAx = rectA.getRight(); + var halfWidthA = rectA.getWidthHalf(); + var halfHeightA = rectA.getHeightHalf(); + var topLeftBx = rectB.getX(); + var topLeftBy = rectB.getY(); + var topRightBx = rectB.getRight(); + var bottomLeftBx = rectB.getX(); + var bottomLeftBy = rectB.getBottom(); + var bottomRightBx = rectB.getRight(); + var halfWidthB = rectB.getWidthHalf(); + var halfHeightB = rectB.getHeightHalf(); + var clipPointAFound = false; + var clipPointBFound = false; + if (p1x === p2x) { + if (p1y > p2y) { + result[0] = p1x; + result[1] = topLeftAy; + result[2] = p2x; + result[3] = bottomLeftBy; + return false; + } else if (p1y < p2y) { + result[0] = p1x; + result[1] = bottomLeftAy; + result[2] = p2x; + result[3] = topLeftBy; + return false; + } else + ; + } else if (p1y === p2y) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = p1y; + result[2] = topRightBx; + result[3] = p2y; + return false; + } else if (p1x < p2x) { + result[0] = topRightAx; + result[1] = p1y; + result[2] = topLeftBx; + result[3] = p2y; + return false; + } else + ; + } else { + var slopeA = rectA.height / rectA.width; + var slopeB = rectB.height / rectB.width; + var slopePrime = (p2y - p1y) / (p2x - p1x); + var cardinalDirectionA = void 0; + var cardinalDirectionB = void 0; + var tempPointAx = void 0; + var tempPointAy = void 0; + var tempPointBx = void 0; + var tempPointBy = void 0; + if (-slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = bottomLeftAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } else { + result[0] = topRightAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + } else if (slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = topLeftAy; + clipPointAFound = true; + } else { + result[0] = bottomRightAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + } + if (-slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = bottomLeftBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } else { + result[2] = topRightBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + } else if (slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = topLeftBx; + result[3] = topLeftBy; + clipPointBFound = true; + } else { + result[2] = bottomRightBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + } + if (clipPointAFound && clipPointBFound) { + return false; + } + if (p1x > p2x) { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); + } else { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); + } + } else { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); + } else { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); + } + } + if (!clipPointAFound) { + switch (cardinalDirectionA) { + case 1: + tempPointAy = topLeftAy; + tempPointAx = p1x + -halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 2: + tempPointAx = bottomRightAx; + tempPointAy = p1y + halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 3: + tempPointAy = bottomLeftAy; + tempPointAx = p1x + halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 4: + tempPointAx = bottomLeftAx; + tempPointAy = p1y + -halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + } + } + if (!clipPointBFound) { + switch (cardinalDirectionB) { + case 1: + tempPointBy = topLeftBy; + tempPointBx = p2x + -halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 2: + tempPointBx = bottomRightBx; + tempPointBy = p2y + halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 3: + tempPointBy = bottomLeftBy; + tempPointBx = p2x + halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 4: + tempPointBx = bottomLeftBx; + tempPointBy = p2y + -halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + } + } + } + return false; + }; + IGeometry.getCardinalDirection = function(slope, slopePrime, line2) { + if (slope > slopePrime) { + return line2; + } else { + return 1 + line2 % 4; + } + }; + IGeometry.getIntersection = function(s1, s2, f1, f2) { + if (f2 == null) { + return this.getIntersection2(s1, s2, f1); + } + var x1 = s1.x; + var y1 = s1.y; + var x2 = s2.x; + var y2 = s2.y; + var x3 = f1.x; + var y3 = f1.y; + var x4 = f2.x; + var y4 = f2.y; + var x5 = void 0, y5 = void 0; + var a1 = void 0, a2 = void 0, b1 = void 0, b2 = void 0, c1 = void 0, c2 = void 0; + var denom = void 0; + a1 = y2 - y1; + b1 = x1 - x2; + c1 = x2 * y1 - x1 * y2; + a2 = y4 - y3; + b2 = x3 - x4; + c2 = x4 * y3 - x3 * y4; + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return null; + } + x5 = (b1 * c2 - b2 * c1) / denom; + y5 = (a2 * c1 - a1 * c2) / denom; + return new Point2(x5, y5); + }; + IGeometry.angleOfVector = function(Cx, Cy, Nx, Ny) { + var C_angle = void 0; + if (Cx !== Nx) { + C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); + if (Nx < Cx) { + C_angle += Math.PI; + } else if (Ny < Cy) { + C_angle += this.TWO_PI; + } + } else if (Ny < Cy) { + C_angle = this.ONE_AND_HALF_PI; + } else { + C_angle = this.HALF_PI; + } + return C_angle; + }; + IGeometry.doIntersect = function(p1, p2, p3, p4) { + var a = p1.x; + var b = p1.y; + var c2 = p2.x; + var d = p2.y; + var p = p3.x; + var q = p3.y; + var r = p4.x; + var s = p4.y; + var det = (c2 - a) * (s - q) - (r - p) * (d - b); + if (det === 0) { + return false; + } else { + var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; + var gamma2 = ((b - d) * (r - a) + (c2 - a) * (s - b)) / det; + return 0 < lambda && lambda < 1 && 0 < gamma2 && gamma2 < 1; + } + }; + IGeometry.HALF_PI = 0.5 * Math.PI; + IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; + IGeometry.TWO_PI = 2 * Math.PI; + IGeometry.THREE_PI = 3 * Math.PI; + module3.exports = IGeometry; + }, + /* 9 */ + /***/ + function(module3, exports3, __webpack_require__) { + function IMath() { + } + IMath.sign = function(value2) { + if (value2 > 0) { + return 1; + } else if (value2 < 0) { + return -1; + } else { + return 0; + } + }; + IMath.floor = function(value2) { + return value2 < 0 ? Math.ceil(value2) : Math.floor(value2); + }; + IMath.ceil = function(value2) { + return value2 < 0 ? Math.floor(value2) : Math.ceil(value2); + }; + module3.exports = IMath; + }, + /* 10 */ + /***/ + function(module3, exports3, __webpack_require__) { + function Integer() { + } + Integer.MAX_VALUE = 2147483647; + Integer.MIN_VALUE = -2147483648; + module3.exports = Integer; + }, + /* 11 */ + /***/ + function(module3, exports3, __webpack_require__) { + var _createClass = function() { + function defineProperties(target, props) { + for (var i2 = 0; i2 < props.length; i2++) { + var descriptor = props[i2]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var nodeFrom = function nodeFrom2(value2) { + return { value: value2, next: null, prev: null }; + }; + var add = function add2(prev2, node2, next2, list2) { + if (prev2 !== null) { + prev2.next = node2; + } else { + list2.head = node2; + } + if (next2 !== null) { + next2.prev = node2; + } else { + list2.tail = node2; + } + node2.prev = prev2; + node2.next = next2; + list2.length++; + return node2; + }; + var _remove = function _remove2(node2, list2) { + var prev2 = node2.prev, next2 = node2.next; + if (prev2 !== null) { + prev2.next = next2; + } else { + list2.head = next2; + } + if (next2 !== null) { + next2.prev = prev2; + } else { + list2.tail = prev2; + } + node2.prev = node2.next = null; + list2.length--; + return node2; + }; + var LinkedList = function() { + function LinkedList2(vals) { + var _this = this; + _classCallCheck(this, LinkedList2); + this.length = 0; + this.head = null; + this.tail = null; + if (vals != null) { + vals.forEach(function(v) { + return _this.push(v); + }); + } + } + _createClass(LinkedList2, [{ + key: "size", + value: function size2() { + return this.length; + } + }, { + key: "insertBefore", + value: function insertBefore(val, otherNode) { + return add(otherNode.prev, nodeFrom(val), otherNode, this); + } + }, { + key: "insertAfter", + value: function insertAfter(val, otherNode) { + return add(otherNode, nodeFrom(val), otherNode.next, this); + } + }, { + key: "insertNodeBefore", + value: function insertNodeBefore(newNode, otherNode) { + return add(otherNode.prev, newNode, otherNode, this); + } + }, { + key: "insertNodeAfter", + value: function insertNodeAfter(newNode, otherNode) { + return add(otherNode, newNode, otherNode.next, this); + } + }, { + key: "push", + value: function push2(val) { + return add(this.tail, nodeFrom(val), null, this); + } + }, { + key: "unshift", + value: function unshift(val) { + return add(null, nodeFrom(val), this.head, this); + } + }, { + key: "remove", + value: function remove2(node2) { + return _remove(node2, this); + } + }, { + key: "pop", + value: function pop() { + return _remove(this.tail, this).value; + } + }, { + key: "popNode", + value: function popNode() { + return _remove(this.tail, this); + } + }, { + key: "shift", + value: function shift() { + return _remove(this.head, this).value; + } + }, { + key: "shiftNode", + value: function shiftNode() { + return _remove(this.head, this); + } + }, { + key: "get_object_at", + value: function get_object_at(index2) { + if (index2 <= this.length()) { + var i2 = 1; + var current = this.head; + while (i2 < index2) { + current = current.next; + i2++; + } + return current.value; + } + } + }, { + key: "set_object_at", + value: function set_object_at(index2, value2) { + if (index2 <= this.length()) { + var i2 = 1; + var current = this.head; + while (i2 < index2) { + current = current.next; + i2++; + } + current.value = value2; + } + } + }]); + return LinkedList2; + }(); + module3.exports = LinkedList; + }, + /* 12 */ + /***/ + function(module3, exports3, __webpack_require__) { + function Point2(x2, y2, p) { + this.x = null; + this.y = null; + if (x2 == null && y2 == null && p == null) { + this.x = 0; + this.y = 0; + } else if (typeof x2 == "number" && typeof y2 == "number" && p == null) { + this.x = x2; + this.y = y2; + } else if (x2.constructor.name == "Point" && y2 == null && p == null) { + p = x2; + this.x = p.x; + this.y = p.y; + } + } + Point2.prototype.getX = function() { + return this.x; + }; + Point2.prototype.getY = function() { + return this.y; + }; + Point2.prototype.getLocation = function() { + return new Point2(this.x, this.y); + }; + Point2.prototype.setLocation = function(x2, y2, p) { + if (x2.constructor.name == "Point" && y2 == null && p == null) { + p = x2; + this.setLocation(p.x, p.y); + } else if (typeof x2 == "number" && typeof y2 == "number" && p == null) { + if (parseInt(x2) == x2 && parseInt(y2) == y2) { + this.move(x2, y2); + } else { + this.x = Math.floor(x2 + 0.5); + this.y = Math.floor(y2 + 0.5); + } + } + }; + Point2.prototype.move = function(x2, y2) { + this.x = x2; + this.y = y2; + }; + Point2.prototype.translate = function(dx, dy) { + this.x += dx; + this.y += dy; + }; + Point2.prototype.equals = function(obj) { + if (obj.constructor.name == "Point") { + var pt = obj; + return this.x == pt.x && this.y == pt.y; + } + return this == obj; + }; + Point2.prototype.toString = function() { + return new Point2().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; + }; + module3.exports = Point2; + }, + /* 13 */ + /***/ + function(module3, exports3, __webpack_require__) { + function RectangleD(x2, y2, width2, height) { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + if (x2 != null && y2 != null && width2 != null && height != null) { + this.x = x2; + this.y = y2; + this.width = width2; + this.height = height; + } + } + RectangleD.prototype.getX = function() { + return this.x; + }; + RectangleD.prototype.setX = function(x2) { + this.x = x2; + }; + RectangleD.prototype.getY = function() { + return this.y; + }; + RectangleD.prototype.setY = function(y2) { + this.y = y2; + }; + RectangleD.prototype.getWidth = function() { + return this.width; + }; + RectangleD.prototype.setWidth = function(width2) { + this.width = width2; + }; + RectangleD.prototype.getHeight = function() { + return this.height; + }; + RectangleD.prototype.setHeight = function(height) { + this.height = height; + }; + RectangleD.prototype.getRight = function() { + return this.x + this.width; + }; + RectangleD.prototype.getBottom = function() { + return this.y + this.height; + }; + RectangleD.prototype.intersects = function(a) { + if (this.getRight() < a.x) { + return false; + } + if (this.getBottom() < a.y) { + return false; + } + if (a.getRight() < this.x) { + return false; + } + if (a.getBottom() < this.y) { + return false; + } + return true; + }; + RectangleD.prototype.getCenterX = function() { + return this.x + this.width / 2; + }; + RectangleD.prototype.getMinX = function() { + return this.getX(); + }; + RectangleD.prototype.getMaxX = function() { + return this.getX() + this.width; + }; + RectangleD.prototype.getCenterY = function() { + return this.y + this.height / 2; + }; + RectangleD.prototype.getMinY = function() { + return this.getY(); + }; + RectangleD.prototype.getMaxY = function() { + return this.getY() + this.height; + }; + RectangleD.prototype.getWidthHalf = function() { + return this.width / 2; + }; + RectangleD.prototype.getHeightHalf = function() { + return this.height / 2; + }; + module3.exports = RectangleD; + }, + /* 14 */ + /***/ + function(module3, exports3, __webpack_require__) { + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + function UniqueIDGeneretor() { + } + UniqueIDGeneretor.lastID = 0; + UniqueIDGeneretor.createID = function(obj) { + if (UniqueIDGeneretor.isPrimitive(obj)) { + return obj; + } + if (obj.uniqueID != null) { + return obj.uniqueID; + } + obj.uniqueID = UniqueIDGeneretor.getString(); + UniqueIDGeneretor.lastID++; + return obj.uniqueID; + }; + UniqueIDGeneretor.getString = function(id2) { + if (id2 == null) + id2 = UniqueIDGeneretor.lastID; + return "Object#" + id2; + }; + UniqueIDGeneretor.isPrimitive = function(arg) { + var type2 = typeof arg === "undefined" ? "undefined" : _typeof(arg); + return arg == null || type2 != "object" && type2 != "function"; + }; + module3.exports = UniqueIDGeneretor; + }, + /* 15 */ + /***/ + function(module3, exports3, __webpack_require__) { + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i2 = 0, arr2 = Array(arr.length); i2 < arr.length; i2++) { + arr2[i2] = arr[i2]; + } + return arr2; + } else { + return Array.from(arr); + } + } + var LayoutConstants = __webpack_require__(0); + var LGraphManager = __webpack_require__(6); + var LNode = __webpack_require__(3); + var LEdge = __webpack_require__(1); + var LGraph = __webpack_require__(5); + var PointD = __webpack_require__(4); + var Transform2 = __webpack_require__(17); + var Emitter = __webpack_require__(27); + function Layout2(isRemoteUse) { + Emitter.call(this); + this.layoutQuality = LayoutConstants.QUALITY; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + this.edgeToDummyNodes = /* @__PURE__ */ new Map(); + this.graphManager = new LGraphManager(this); + this.isLayoutFinished = false; + this.isSubLayout = false; + this.isRemoteUse = false; + if (isRemoteUse != null) { + this.isRemoteUse = isRemoteUse; + } + } + Layout2.RANDOM_SEED = 1; + Layout2.prototype = Object.create(Emitter.prototype); + Layout2.prototype.getGraphManager = function() { + return this.graphManager; + }; + Layout2.prototype.getAllNodes = function() { + return this.graphManager.getAllNodes(); + }; + Layout2.prototype.getAllEdges = function() { + return this.graphManager.getAllEdges(); + }; + Layout2.prototype.getAllNodesToApplyGravitation = function() { + return this.graphManager.getAllNodesToApplyGravitation(); + }; + Layout2.prototype.newGraphManager = function() { + var gm = new LGraphManager(this); + this.graphManager = gm; + return gm; + }; + Layout2.prototype.newGraph = function(vGraph) { + return new LGraph(null, this.graphManager, vGraph); + }; + Layout2.prototype.newNode = function(vNode) { + return new LNode(this.graphManager, vNode); + }; + Layout2.prototype.newEdge = function(vEdge) { + return new LEdge(null, null, vEdge); + }; + Layout2.prototype.checkLayoutSuccess = function() { + return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); + }; + Layout2.prototype.runLayout = function() { + this.isLayoutFinished = false; + if (this.tilingPreLayout) { + this.tilingPreLayout(); + } + this.initParameters(); + var isLayoutSuccessfull; + if (this.checkLayoutSuccess()) { + isLayoutSuccessfull = false; + } else { + isLayoutSuccessfull = this.layout(); + } + if (LayoutConstants.ANIMATE === "during") { + return false; + } + if (isLayoutSuccessfull) { + if (!this.isSubLayout) { + this.doPostLayout(); + } + } + if (this.tilingPostLayout) { + this.tilingPostLayout(); + } + this.isLayoutFinished = true; + return isLayoutSuccessfull; + }; + Layout2.prototype.doPostLayout = function() { + if (!this.incremental) { + this.transform(); + } + this.update(); + }; + Layout2.prototype.update2 = function() { + if (this.createBendsAsNeeded) { + this.createBendpointsFromDummyNodes(); + this.graphManager.resetAllEdges(); + } + if (!this.isRemoteUse) { + var allEdges = this.graphManager.getAllEdges(); + for (var i2 = 0; i2 < allEdges.length; i2++) { + allEdges[i2]; + } + var nodes2 = this.graphManager.getRoot().getNodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + nodes2[i2]; + } + this.update(this.graphManager.getRoot()); + } + }; + Layout2.prototype.update = function(obj) { + if (obj == null) { + this.update2(); + } else if (obj instanceof LNode) { + var node2 = obj; + if (node2.getChild() != null) { + var nodes2 = node2.getChild().getNodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + update(nodes2[i2]); + } + } + if (node2.vGraphObject != null) { + var vNode = node2.vGraphObject; + vNode.update(node2); + } + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge.vGraphObject != null) { + var vEdge = edge.vGraphObject; + vEdge.update(edge); + } + } else if (obj instanceof LGraph) { + var graph = obj; + if (graph.vGraphObject != null) { + var vGraph = graph.vGraphObject; + vGraph.update(graph); + } + } + }; + Layout2.prototype.initParameters = function() { + if (!this.isSubLayout) { + this.layoutQuality = LayoutConstants.QUALITY; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + } + if (this.animationDuringLayout) { + this.animationOnLayout = false; + } + }; + Layout2.prototype.transform = function(newLeftTop) { + if (newLeftTop == void 0) { + this.transform(new PointD(0, 0)); + } else { + var trans = new Transform2(); + var leftTop = this.graphManager.getRoot().updateLeftTop(); + if (leftTop != null) { + trans.setWorldOrgX(newLeftTop.x); + trans.setWorldOrgY(newLeftTop.y); + trans.setDeviceOrgX(leftTop.x); + trans.setDeviceOrgY(leftTop.y); + var nodes2 = this.getAllNodes(); + var node2; + for (var i2 = 0; i2 < nodes2.length; i2++) { + node2 = nodes2[i2]; + node2.transform(trans); + } + } + } + }; + Layout2.prototype.positionNodesRandomly = function(graph) { + if (graph == void 0) { + this.positionNodesRandomly(this.getGraphManager().getRoot()); + this.getGraphManager().getRoot().updateBounds(true); + } else { + var lNode; + var childGraph; + var nodes2 = graph.getNodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + lNode = nodes2[i2]; + childGraph = lNode.getChild(); + if (childGraph == null) { + lNode.scatter(); + } else if (childGraph.getNodes().length == 0) { + lNode.scatter(); + } else { + this.positionNodesRandomly(childGraph); + lNode.updateBounds(); + } + } + } + }; + Layout2.prototype.getFlatForest = function() { + var flatForest = []; + var isForest = true; + var allNodes = this.graphManager.getRoot().getNodes(); + var isFlat = true; + for (var i2 = 0; i2 < allNodes.length; i2++) { + if (allNodes[i2].getChild() != null) { + isFlat = false; + } + } + if (!isFlat) { + return flatForest; + } + var visited = /* @__PURE__ */ new Set(); + var toBeVisited = []; + var parents2 = /* @__PURE__ */ new Map(); + var unProcessedNodes = []; + unProcessedNodes = unProcessedNodes.concat(allNodes); + while (unProcessedNodes.length > 0 && isForest) { + toBeVisited.push(unProcessedNodes[0]); + while (toBeVisited.length > 0 && isForest) { + var currentNode = toBeVisited[0]; + toBeVisited.splice(0, 1); + visited.add(currentNode); + var neighborEdges = currentNode.getEdges(); + for (var i2 = 0; i2 < neighborEdges.length; i2++) { + var currentNeighbor = neighborEdges[i2].getOtherEnd(currentNode); + if (parents2.get(currentNode) != currentNeighbor) { + if (!visited.has(currentNeighbor)) { + toBeVisited.push(currentNeighbor); + parents2.set(currentNeighbor, currentNode); + } else { + isForest = false; + break; + } + } + } + } + if (!isForest) { + flatForest = []; + } else { + var temp = [].concat(_toConsumableArray(visited)); + flatForest.push(temp); + for (var i2 = 0; i2 < temp.length; i2++) { + var value2 = temp[i2]; + var index2 = unProcessedNodes.indexOf(value2); + if (index2 > -1) { + unProcessedNodes.splice(index2, 1); + } + } + visited = /* @__PURE__ */ new Set(); + parents2 = /* @__PURE__ */ new Map(); + } + } + return flatForest; + }; + Layout2.prototype.createDummyNodesForBendpoints = function(edge) { + var dummyNodes = []; + var prev2 = edge.source; + var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); + for (var i2 = 0; i2 < edge.bendpoints.length; i2++) { + var dummyNode = this.newNode(null); + dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); + graph.add(dummyNode); + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev2, dummyNode); + dummyNodes.add(dummyNode); + prev2 = dummyNode; + } + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev2, edge.target); + this.edgeToDummyNodes.set(edge, dummyNodes); + if (edge.isInterGraph()) { + this.graphManager.remove(edge); + } else { + graph.remove(edge); + } + return dummyNodes; + }; + Layout2.prototype.createBendpointsFromDummyNodes = function() { + var edges2 = []; + edges2 = edges2.concat(this.graphManager.getAllEdges()); + edges2 = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges2); + for (var k = 0; k < edges2.length; k++) { + var lEdge = edges2[k]; + if (lEdge.bendpoints.length > 0) { + var path2 = this.edgeToDummyNodes.get(lEdge); + for (var i2 = 0; i2 < path2.length; i2++) { + var dummyNode = path2[i2]; + var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); + var ebp = lEdge.bendpoints.get(i2); + ebp.x = p.x; + ebp.y = p.y; + dummyNode.getOwner().remove(dummyNode); + } + this.graphManager.add(lEdge, lEdge.source, lEdge.target); + } + } + }; + Layout2.transform = function(sliderValue, defaultValue, minDiv, maxMul) { + if (minDiv != void 0 && maxMul != void 0) { + var value2 = defaultValue; + if (sliderValue <= 50) { + var minValue = defaultValue / minDiv; + value2 -= (defaultValue - minValue) / 50 * (50 - sliderValue); + } else { + var maxValue = defaultValue * maxMul; + value2 += (maxValue - defaultValue) / 50 * (sliderValue - 50); + } + return value2; + } else { + var a, b; + if (sliderValue <= 50) { + a = 9 * defaultValue / 500; + b = defaultValue / 10; + } else { + a = 9 * defaultValue / 50; + b = -8 * defaultValue; + } + return a * sliderValue + b; + } + }; + Layout2.findCenterOfTree = function(nodes2) { + var list2 = []; + list2 = list2.concat(nodes2); + var removedNodes = []; + var remainingDegrees = /* @__PURE__ */ new Map(); + var foundCenter = false; + var centerNode = null; + if (list2.length == 1 || list2.length == 2) { + foundCenter = true; + centerNode = list2[0]; + } + for (var i2 = 0; i2 < list2.length; i2++) { + var node2 = list2[i2]; + var degree = node2.getNeighborsList().size; + remainingDegrees.set(node2, node2.getNeighborsList().size); + if (degree == 1) { + removedNodes.push(node2); + } + } + var tempList = []; + tempList = tempList.concat(removedNodes); + while (!foundCenter) { + var tempList2 = []; + tempList2 = tempList2.concat(tempList); + tempList = []; + for (var i2 = 0; i2 < list2.length; i2++) { + var node2 = list2[i2]; + var index2 = list2.indexOf(node2); + if (index2 >= 0) { + list2.splice(index2, 1); + } + var neighbours = node2.getNeighborsList(); + neighbours.forEach(function(neighbour) { + if (removedNodes.indexOf(neighbour) < 0) { + var otherDegree = remainingDegrees.get(neighbour); + var newDegree = otherDegree - 1; + if (newDegree == 1) { + tempList.push(neighbour); + } + remainingDegrees.set(neighbour, newDegree); + } + }); + } + removedNodes = removedNodes.concat(tempList); + if (list2.length == 1 || list2.length == 2) { + foundCenter = true; + centerNode = list2[0]; + } + } + return centerNode; + }; + Layout2.prototype.setGraphManager = function(gm) { + this.graphManager = gm; + }; + module3.exports = Layout2; + }, + /* 16 */ + /***/ + function(module3, exports3, __webpack_require__) { + function RandomSeed() { + } + RandomSeed.seed = 1; + RandomSeed.x = 0; + RandomSeed.nextDouble = function() { + RandomSeed.x = Math.sin(RandomSeed.seed++) * 1e4; + return RandomSeed.x - Math.floor(RandomSeed.x); + }; + module3.exports = RandomSeed; + }, + /* 17 */ + /***/ + function(module3, exports3, __webpack_require__) { + var PointD = __webpack_require__(4); + function Transform2(x2, y2) { + this.lworldOrgX = 0; + this.lworldOrgY = 0; + this.ldeviceOrgX = 0; + this.ldeviceOrgY = 0; + this.lworldExtX = 1; + this.lworldExtY = 1; + this.ldeviceExtX = 1; + this.ldeviceExtY = 1; + } + Transform2.prototype.getWorldOrgX = function() { + return this.lworldOrgX; + }; + Transform2.prototype.setWorldOrgX = function(wox) { + this.lworldOrgX = wox; + }; + Transform2.prototype.getWorldOrgY = function() { + return this.lworldOrgY; + }; + Transform2.prototype.setWorldOrgY = function(woy) { + this.lworldOrgY = woy; + }; + Transform2.prototype.getWorldExtX = function() { + return this.lworldExtX; + }; + Transform2.prototype.setWorldExtX = function(wex) { + this.lworldExtX = wex; + }; + Transform2.prototype.getWorldExtY = function() { + return this.lworldExtY; + }; + Transform2.prototype.setWorldExtY = function(wey) { + this.lworldExtY = wey; + }; + Transform2.prototype.getDeviceOrgX = function() { + return this.ldeviceOrgX; + }; + Transform2.prototype.setDeviceOrgX = function(dox) { + this.ldeviceOrgX = dox; + }; + Transform2.prototype.getDeviceOrgY = function() { + return this.ldeviceOrgY; + }; + Transform2.prototype.setDeviceOrgY = function(doy) { + this.ldeviceOrgY = doy; + }; + Transform2.prototype.getDeviceExtX = function() { + return this.ldeviceExtX; + }; + Transform2.prototype.setDeviceExtX = function(dex) { + this.ldeviceExtX = dex; + }; + Transform2.prototype.getDeviceExtY = function() { + return this.ldeviceExtY; + }; + Transform2.prototype.setDeviceExtY = function(dey) { + this.ldeviceExtY = dey; + }; + Transform2.prototype.transformX = function(x2) { + var xDevice = 0; + var worldExtX = this.lworldExtX; + if (worldExtX != 0) { + xDevice = this.ldeviceOrgX + (x2 - this.lworldOrgX) * this.ldeviceExtX / worldExtX; + } + return xDevice; + }; + Transform2.prototype.transformY = function(y2) { + var yDevice = 0; + var worldExtY = this.lworldExtY; + if (worldExtY != 0) { + yDevice = this.ldeviceOrgY + (y2 - this.lworldOrgY) * this.ldeviceExtY / worldExtY; + } + return yDevice; + }; + Transform2.prototype.inverseTransformX = function(x2) { + var xWorld = 0; + var deviceExtX = this.ldeviceExtX; + if (deviceExtX != 0) { + xWorld = this.lworldOrgX + (x2 - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; + } + return xWorld; + }; + Transform2.prototype.inverseTransformY = function(y2) { + var yWorld = 0; + var deviceExtY = this.ldeviceExtY; + if (deviceExtY != 0) { + yWorld = this.lworldOrgY + (y2 - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; + } + return yWorld; + }; + Transform2.prototype.inverseTransformPoint = function(inPoint) { + var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); + return outPoint; + }; + module3.exports = Transform2; + }, + /* 18 */ + /***/ + function(module3, exports3, __webpack_require__) { + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i2 = 0, arr2 = Array(arr.length); i2 < arr.length; i2++) { + arr2[i2] = arr[i2]; + } + return arr2; + } else { + return Array.from(arr); + } + } + var Layout2 = __webpack_require__(15); + var FDLayoutConstants = __webpack_require__(7); + var LayoutConstants = __webpack_require__(0); + var IGeometry = __webpack_require__(8); + var IMath = __webpack_require__(9); + function FDLayout() { + Layout2.call(this); + this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.displacementThresholdPerNode = 3 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.totalDisplacement = 0; + this.oldTotalDisplacement = 0; + this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; + } + FDLayout.prototype = Object.create(Layout2.prototype); + for (var prop in Layout2) { + FDLayout[prop] = Layout2[prop]; + } + FDLayout.prototype.initParameters = function() { + Layout2.prototype.initParameters.call(this, arguments); + this.totalIterations = 0; + this.notAnimatedIterations = 0; + this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; + this.grid = []; + }; + FDLayout.prototype.calcIdealEdgeLengths = function() { + var edge; + var lcaDepth; + var source; + var target; + var sizeOfSourceInLca; + var sizeOfTargetInLca; + var allEdges = this.getGraphManager().getAllEdges(); + for (var i2 = 0; i2 < allEdges.length; i2++) { + edge = allEdges[i2]; + edge.idealLength = this.idealEdgeLength; + if (edge.isInterGraph) { + source = edge.getSource(); + target = edge.getTarget(); + sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); + sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); + if (this.useSmartIdealEdgeLengthCalculation) { + edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; + } + lcaDepth = edge.getLca().getInclusionTreeDepth(); + edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); + } + } + }; + FDLayout.prototype.initSpringEmbedder = function() { + var s = this.getAllNodes().length; + if (this.incremental) { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; + } else { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } else { + this.coolingFactor = 1; + } + this.initialCoolingFactor = this.coolingFactor; + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; + } + this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); + this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; + this.repulsionRange = this.calcRepulsionRange(); + }; + FDLayout.prototype.calcSpringForces = function() { + var lEdges = this.getAllEdges(); + var edge; + for (var i2 = 0; i2 < lEdges.length; i2++) { + edge = lEdges[i2]; + this.calcSpringForce(edge, edge.idealLength); + } + }; + FDLayout.prototype.calcRepulsionForces = function() { + var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; + var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + var i2, j; + var nodeA, nodeB; + var lNodes = this.getAllNodes(); + var processedNodeSet; + if (this.useFRGridVariant) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { + this.updateGrid(); + } + processedNodeSet = /* @__PURE__ */ new Set(); + for (i2 = 0; i2 < lNodes.length; i2++) { + nodeA = lNodes[i2]; + this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); + processedNodeSet.add(nodeA); + } + } else { + for (i2 = 0; i2 < lNodes.length; i2++) { + nodeA = lNodes[i2]; + for (j = i2 + 1; j < lNodes.length; j++) { + nodeB = lNodes[j]; + if (nodeA.getOwner() != nodeB.getOwner()) { + continue; + } + this.calcRepulsionForce(nodeA, nodeB); + } + } + } + }; + FDLayout.prototype.calcGravitationalForces = function() { + var node2; + var lNodes = this.getAllNodesToApplyGravitation(); + for (var i2 = 0; i2 < lNodes.length; i2++) { + node2 = lNodes[i2]; + this.calcGravitationalForce(node2); + } + }; + FDLayout.prototype.moveNodes = function() { + var lNodes = this.getAllNodes(); + var node2; + for (var i2 = 0; i2 < lNodes.length; i2++) { + node2 = lNodes[i2]; + node2.move(); + } + }; + FDLayout.prototype.calcSpringForce = function(edge, idealLength) { + var sourceNode = edge.getSource(); + var targetNode = edge.getTarget(); + var length2; + var springForce; + var springForceX; + var springForceY; + if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { + edge.updateLengthSimple(); + } else { + edge.updateLength(); + if (edge.isOverlapingSourceAndTarget) { + return; + } + } + length2 = edge.getLength(); + if (length2 == 0) + return; + springForce = this.springConstant * (length2 - idealLength); + springForceX = springForce * (edge.lengthX / length2); + springForceY = springForce * (edge.lengthY / length2); + sourceNode.springForceX += springForceX; + sourceNode.springForceY += springForceY; + targetNode.springForceX -= springForceX; + targetNode.springForceY -= springForceY; + }; + FDLayout.prototype.calcRepulsionForce = function(nodeA, nodeB) { + var rectA = nodeA.getRect(); + var rectB = nodeB.getRect(); + var overlapAmount = new Array(2); + var clipPoints = new Array(4); + var distanceX; + var distanceY; + var distanceSquared; + var distance2; + var repulsionForce; + var repulsionForceX; + var repulsionForceY; + if (rectA.intersects(rectB)) { + IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2); + repulsionForceX = 2 * overlapAmount[0]; + repulsionForceY = 2 * overlapAmount[1]; + var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); + nodeA.repulsionForceX -= childrenConstant * repulsionForceX; + nodeA.repulsionForceY -= childrenConstant * repulsionForceY; + nodeB.repulsionForceX += childrenConstant * repulsionForceX; + nodeB.repulsionForceY += childrenConstant * repulsionForceY; + } else { + if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) { + distanceX = rectB.getCenterX() - rectA.getCenterX(); + distanceY = rectB.getCenterY() - rectA.getCenterY(); + } else { + IGeometry.getIntersection(rectA, rectB, clipPoints); + distanceX = clipPoints[2] - clipPoints[0]; + distanceY = clipPoints[3] - clipPoints[1]; + } + if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; + } + if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; + } + distanceSquared = distanceX * distanceX + distanceY * distanceY; + distance2 = Math.sqrt(distanceSquared); + repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; + repulsionForceX = repulsionForce * distanceX / distance2; + repulsionForceY = repulsionForce * distanceY / distance2; + nodeA.repulsionForceX -= repulsionForceX; + nodeA.repulsionForceY -= repulsionForceY; + nodeB.repulsionForceX += repulsionForceX; + nodeB.repulsionForceY += repulsionForceY; + } + }; + FDLayout.prototype.calcGravitationalForce = function(node2) { + var ownerGraph; + var ownerCenterX; + var ownerCenterY; + var distanceX; + var distanceY; + var absDistanceX; + var absDistanceY; + var estimatedSize; + ownerGraph = node2.getOwner(); + ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; + ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; + distanceX = node2.getCenterX() - ownerCenterX; + distanceY = node2.getCenterY() - ownerCenterY; + absDistanceX = Math.abs(distanceX) + node2.getWidth() / 2; + absDistanceY = Math.abs(distanceY) + node2.getHeight() / 2; + if (node2.getOwner() == this.graphManager.getRoot()) { + estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node2.gravitationForceX = -this.gravityConstant * distanceX; + node2.gravitationForceY = -this.gravityConstant * distanceY; + } + } else { + estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node2.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; + node2.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; + } + } + }; + FDLayout.prototype.isConverged = function() { + var converged; + var oscilating = false; + if (this.totalIterations > this.maxIterations / 3) { + oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; + } + converged = this.totalDisplacement < this.totalDisplacementThreshold; + this.oldTotalDisplacement = this.totalDisplacement; + return converged || oscilating; + }; + FDLayout.prototype.animate = function() { + if (this.animationDuringLayout && !this.isSubLayout) { + if (this.notAnimatedIterations == this.animationPeriod) { + this.update(); + this.notAnimatedIterations = 0; + } else { + this.notAnimatedIterations++; + } + } + }; + FDLayout.prototype.calcNoOfChildrenForAllNodes = function() { + var node2; + var allNodes = this.graphManager.getAllNodes(); + for (var i2 = 0; i2 < allNodes.length; i2++) { + node2 = allNodes[i2]; + node2.noOfChildren = node2.getNoOfChildren(); + } + }; + FDLayout.prototype.calcGrid = function(graph) { + var sizeX = 0; + var sizeY = 0; + sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); + sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); + var grid = new Array(sizeX); + for (var i2 = 0; i2 < sizeX; i2++) { + grid[i2] = new Array(sizeY); + } + for (var i2 = 0; i2 < sizeX; i2++) { + for (var j = 0; j < sizeY; j++) { + grid[i2][j] = new Array(); + } + } + return grid; + }; + FDLayout.prototype.addNodeToGrid = function(v, left2, top2) { + var startX = 0; + var finishX = 0; + var startY = 0; + var finishY = 0; + startX = parseInt(Math.floor((v.getRect().x - left2) / this.repulsionRange)); + finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left2) / this.repulsionRange)); + startY = parseInt(Math.floor((v.getRect().y - top2) / this.repulsionRange)); + finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top2) / this.repulsionRange)); + for (var i2 = startX; i2 <= finishX; i2++) { + for (var j = startY; j <= finishY; j++) { + this.grid[i2][j].push(v); + v.setGridCoordinates(startX, finishX, startY, finishY); + } + } + }; + FDLayout.prototype.updateGrid = function() { + var i2; + var nodeA; + var lNodes = this.getAllNodes(); + this.grid = this.calcGrid(this.graphManager.getRoot()); + for (i2 = 0; i2 < lNodes.length; i2++) { + nodeA = lNodes[i2]; + this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + } + }; + FDLayout.prototype.calculateRepulsionForceOfANode = function(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { + var surrounding = /* @__PURE__ */ new Set(); + nodeA.surrounding = new Array(); + var nodeB; + var grid = this.grid; + for (var i2 = nodeA.startX - 1; i2 < nodeA.finishX + 2; i2++) { + for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { + if (!(i2 < 0 || j < 0 || i2 >= grid.length || j >= grid[0].length)) { + for (var k = 0; k < grid[i2][j].length; k++) { + nodeB = grid[i2][j][k]; + if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { + continue; + } + if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { + var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); + var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); + if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { + surrounding.add(nodeB); + } + } + } + } + } + } + nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); + } + for (i2 = 0; i2 < nodeA.surrounding.length; i2++) { + this.calcRepulsionForce(nodeA, nodeA.surrounding[i2]); + } + }; + FDLayout.prototype.calcRepulsionRange = function() { + return 0; + }; + module3.exports = FDLayout; + }, + /* 19 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LEdge = __webpack_require__(1); + var FDLayoutConstants = __webpack_require__(7); + function FDLayoutEdge(source, target, vEdge) { + LEdge.call(this, source, target, vEdge); + this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + } + FDLayoutEdge.prototype = Object.create(LEdge.prototype); + for (var prop in LEdge) { + FDLayoutEdge[prop] = LEdge[prop]; + } + module3.exports = FDLayoutEdge; + }, + /* 20 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LNode = __webpack_require__(3); + function FDLayoutNode(gm, loc, size2, vNode) { + LNode.call(this, gm, loc, size2, vNode); + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; + this.startX = 0; + this.finishX = 0; + this.startY = 0; + this.finishY = 0; + this.surrounding = []; + } + FDLayoutNode.prototype = Object.create(LNode.prototype); + for (var prop in LNode) { + FDLayoutNode[prop] = LNode[prop]; + } + FDLayoutNode.prototype.setGridCoordinates = function(_startX, _finishX, _startY, _finishY) { + this.startX = _startX; + this.finishX = _finishX; + this.startY = _startY; + this.finishY = _finishY; + }; + module3.exports = FDLayoutNode; + }, + /* 21 */ + /***/ + function(module3, exports3, __webpack_require__) { + function DimensionD2(width2, height) { + this.width = 0; + this.height = 0; + if (width2 !== null && height !== null) { + this.height = height; + this.width = width2; + } + } + DimensionD2.prototype.getWidth = function() { + return this.width; + }; + DimensionD2.prototype.setWidth = function(width2) { + this.width = width2; + }; + DimensionD2.prototype.getHeight = function() { + return this.height; + }; + DimensionD2.prototype.setHeight = function(height) { + this.height = height; + }; + module3.exports = DimensionD2; + }, + /* 22 */ + /***/ + function(module3, exports3, __webpack_require__) { + var UniqueIDGeneretor = __webpack_require__(14); + function HashMap() { + this.map = {}; + this.keys = []; + } + HashMap.prototype.put = function(key, value2) { + var theId = UniqueIDGeneretor.createID(key); + if (!this.contains(theId)) { + this.map[theId] = value2; + this.keys.push(key); + } + }; + HashMap.prototype.contains = function(key) { + UniqueIDGeneretor.createID(key); + return this.map[key] != null; + }; + HashMap.prototype.get = function(key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[theId]; + }; + HashMap.prototype.keySet = function() { + return this.keys; + }; + module3.exports = HashMap; + }, + /* 23 */ + /***/ + function(module3, exports3, __webpack_require__) { + var UniqueIDGeneretor = __webpack_require__(14); + function HashSet() { + this.set = {}; + } + HashSet.prototype.add = function(obj) { + var theId = UniqueIDGeneretor.createID(obj); + if (!this.contains(theId)) + this.set[theId] = obj; + }; + HashSet.prototype.remove = function(obj) { + delete this.set[UniqueIDGeneretor.createID(obj)]; + }; + HashSet.prototype.clear = function() { + this.set = {}; + }; + HashSet.prototype.contains = function(obj) { + return this.set[UniqueIDGeneretor.createID(obj)] == obj; + }; + HashSet.prototype.isEmpty = function() { + return this.size() === 0; + }; + HashSet.prototype.size = function() { + return Object.keys(this.set).length; + }; + HashSet.prototype.addAllTo = function(list2) { + var keys2 = Object.keys(this.set); + var length2 = keys2.length; + for (var i2 = 0; i2 < length2; i2++) { + list2.push(this.set[keys2[i2]]); + } + }; + HashSet.prototype.size = function() { + return Object.keys(this.set).length; + }; + HashSet.prototype.addAll = function(list2) { + var s = list2.length; + for (var i2 = 0; i2 < s; i2++) { + var v = list2[i2]; + this.add(v); + } + }; + module3.exports = HashSet; + }, + /* 24 */ + /***/ + function(module3, exports3, __webpack_require__) { + var _createClass = function() { + function defineProperties(target, props) { + for (var i2 = 0; i2 < props.length; i2++) { + var descriptor = props[i2]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var LinkedList = __webpack_require__(11); + var Quicksort = function() { + function Quicksort2(A, compareFunction) { + _classCallCheck(this, Quicksort2); + if (compareFunction !== null || compareFunction !== void 0) + this.compareFunction = this._defaultCompareFunction; + var length2 = void 0; + if (A instanceof LinkedList) + length2 = A.size(); + else + length2 = A.length; + this._quicksort(A, 0, length2 - 1); + } + _createClass(Quicksort2, [{ + key: "_quicksort", + value: function _quicksort(A, p, r) { + if (p < r) { + var q = this._partition(A, p, r); + this._quicksort(A, p, q); + this._quicksort(A, q + 1, r); + } + } + }, { + key: "_partition", + value: function _partition(A, p, r) { + var x2 = this._get(A, p); + var i2 = p; + var j = r; + while (true) { + while (this.compareFunction(x2, this._get(A, j))) { + j--; + } + while (this.compareFunction(this._get(A, i2), x2)) { + i2++; + } + if (i2 < j) { + this._swap(A, i2, j); + i2++; + j--; + } else + return j; + } + } + }, { + key: "_get", + value: function _get(object2, index2) { + if (object2 instanceof LinkedList) + return object2.get_object_at(index2); + else + return object2[index2]; + } + }, { + key: "_set", + value: function _set(object2, index2, value2) { + if (object2 instanceof LinkedList) + object2.set_object_at(index2, value2); + else + object2[index2] = value2; + } + }, { + key: "_swap", + value: function _swap(A, i2, j) { + var temp = this._get(A, i2); + this._set(A, i2, this._get(A, j)); + this._set(A, j, temp); + } + }, { + key: "_defaultCompareFunction", + value: function _defaultCompareFunction(a, b) { + return b > a; + } + }]); + return Quicksort2; + }(); + module3.exports = Quicksort; + }, + /* 25 */ + /***/ + function(module3, exports3, __webpack_require__) { + var _createClass = function() { + function defineProperties(target, props) { + for (var i2 = 0; i2 < props.length; i2++) { + var descriptor = props[i2]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var NeedlemanWunsch = function() { + function NeedlemanWunsch2(sequence1, sequence2) { + var match_score = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1; + var mismatch_penalty = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1; + var gap_penalty = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1; + _classCallCheck(this, NeedlemanWunsch2); + this.sequence1 = sequence1; + this.sequence2 = sequence2; + this.match_score = match_score; + this.mismatch_penalty = mismatch_penalty; + this.gap_penalty = gap_penalty; + this.iMax = sequence1.length + 1; + this.jMax = sequence2.length + 1; + this.grid = new Array(this.iMax); + for (var i2 = 0; i2 < this.iMax; i2++) { + this.grid[i2] = new Array(this.jMax); + for (var j = 0; j < this.jMax; j++) { + this.grid[i2][j] = 0; + } + } + this.tracebackGrid = new Array(this.iMax); + for (var _i = 0; _i < this.iMax; _i++) { + this.tracebackGrid[_i] = new Array(this.jMax); + for (var _j = 0; _j < this.jMax; _j++) { + this.tracebackGrid[_i][_j] = [null, null, null]; + } + } + this.alignments = []; + this.score = -1; + this.computeGrids(); + } + _createClass(NeedlemanWunsch2, [{ + key: "getScore", + value: function getScore() { + return this.score; + } + }, { + key: "getAlignments", + value: function getAlignments() { + return this.alignments; + } + // Main dynamic programming procedure + }, { + key: "computeGrids", + value: function computeGrids() { + for (var j = 1; j < this.jMax; j++) { + this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; + this.tracebackGrid[0][j] = [false, false, true]; + } + for (var i2 = 1; i2 < this.iMax; i2++) { + this.grid[i2][0] = this.grid[i2 - 1][0] + this.gap_penalty; + this.tracebackGrid[i2][0] = [false, true, false]; + } + for (var _i2 = 1; _i2 < this.iMax; _i2++) { + for (var _j2 = 1; _j2 < this.jMax; _j2++) { + var diag = void 0; + if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) + diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score; + else + diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; + var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; + var left2 = this.grid[_i2][_j2 - 1] + this.gap_penalty; + var maxOf = [diag, up, left2]; + var indices = this.arrayAllMaxIndexes(maxOf); + this.grid[_i2][_j2] = maxOf[indices[0]]; + this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; + } + } + this.score = this.grid[this.iMax - 1][this.jMax - 1]; + } + // Gets all possible valid sequence combinations + }, { + key: "alignmentTraceback", + value: function alignmentTraceback() { + var inProcessAlignments = []; + inProcessAlignments.push({ + pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); + while (inProcessAlignments[0]) { + var current = inProcessAlignments[0]; + var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; + if (directions[0]) { + inProcessAlignments.push({ + pos: [current.pos[0] - 1, current.pos[1] - 1], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (directions[1]) { + inProcessAlignments.push({ + pos: [current.pos[0] - 1, current.pos[1]], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: "-" + current.seq2 + }); + } + if (directions[2]) { + inProcessAlignments.push({ + pos: [current.pos[0], current.pos[1] - 1], + seq1: "-" + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (current.pos[0] === 0 && current.pos[1] === 0) + this.alignments.push({ + sequence1: current.seq1, + sequence2: current.seq2 + }); + inProcessAlignments.shift(); + } + return this.alignments; + } + // Helper Functions + }, { + key: "getAllIndexes", + value: function getAllIndexes(arr, val) { + var indexes = [], i2 = -1; + while ((i2 = arr.indexOf(val, i2 + 1)) !== -1) { + indexes.push(i2); + } + return indexes; + } + }, { + key: "arrayAllMaxIndexes", + value: function arrayAllMaxIndexes(array2) { + return this.getAllIndexes(array2, Math.max.apply(null, array2)); + } + }]); + return NeedlemanWunsch2; + }(); + module3.exports = NeedlemanWunsch; + }, + /* 26 */ + /***/ + function(module3, exports3, __webpack_require__) { + var layoutBase2 = function layoutBase3() { + return; + }; + layoutBase2.FDLayout = __webpack_require__(18); + layoutBase2.FDLayoutConstants = __webpack_require__(7); + layoutBase2.FDLayoutEdge = __webpack_require__(19); + layoutBase2.FDLayoutNode = __webpack_require__(20); + layoutBase2.DimensionD = __webpack_require__(21); + layoutBase2.HashMap = __webpack_require__(22); + layoutBase2.HashSet = __webpack_require__(23); + layoutBase2.IGeometry = __webpack_require__(8); + layoutBase2.IMath = __webpack_require__(9); + layoutBase2.Integer = __webpack_require__(10); + layoutBase2.Point = __webpack_require__(12); + layoutBase2.PointD = __webpack_require__(4); + layoutBase2.RandomSeed = __webpack_require__(16); + layoutBase2.RectangleD = __webpack_require__(13); + layoutBase2.Transform = __webpack_require__(17); + layoutBase2.UniqueIDGeneretor = __webpack_require__(14); + layoutBase2.Quicksort = __webpack_require__(24); + layoutBase2.LinkedList = __webpack_require__(11); + layoutBase2.LGraphObject = __webpack_require__(2); + layoutBase2.LGraph = __webpack_require__(5); + layoutBase2.LEdge = __webpack_require__(1); + layoutBase2.LGraphManager = __webpack_require__(6); + layoutBase2.LNode = __webpack_require__(3); + layoutBase2.Layout = __webpack_require__(15); + layoutBase2.LayoutConstants = __webpack_require__(0); + layoutBase2.NeedlemanWunsch = __webpack_require__(25); + module3.exports = layoutBase2; + }, + /* 27 */ + /***/ + function(module3, exports3, __webpack_require__) { + function Emitter() { + this.listeners = []; + } + var p = Emitter.prototype; + p.addListener = function(event, callback) { + this.listeners.push({ + event, + callback + }); + }; + p.removeListener = function(event, callback) { + for (var i2 = this.listeners.length; i2 >= 0; i2--) { + var l = this.listeners[i2]; + if (l.event === event && l.callback === callback) { + this.listeners.splice(i2, 1); + } + } + }; + p.emit = function(event, data) { + for (var i2 = 0; i2 < this.listeners.length; i2++) { + var l = this.listeners[i2]; + if (event === l.event) { + l.callback(data); + } + } + }; + module3.exports = Emitter; + } + /******/ + ]) + ); + }); + })(layoutBase); + return layoutBase.exports; + } + var hasRequiredCoseBase; + function requireCoseBase() { + if (hasRequiredCoseBase) + return coseBase.exports; + hasRequiredCoseBase = 1; + (function(module2, exports2) { + (function webpackUniversalModuleDefinition(root2, factory) { + module2.exports = factory(requireLayoutBase()); + })(commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE_0__) { + return ( + /******/ + function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module3 = installedModules[moduleId] = { + /******/ + i: moduleId, + /******/ + l: false, + /******/ + exports: {} + /******/ + }; + modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__); + module3.l = true; + return module3.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value2) { + return value2; + }; + __webpack_require__.d = function(exports3, name2, getter) { + if (!__webpack_require__.o(exports3, name2)) { + Object.defineProperty(exports3, name2, { + /******/ + configurable: false, + /******/ + enumerable: true, + /******/ + get: getter + /******/ + }); + } + }; + __webpack_require__.n = function(module3) { + var getter = module3 && module3.__esModule ? ( + /******/ + function getDefault() { + return module3["default"]; + } + ) : ( + /******/ + function getModuleExports() { + return module3; + } + ); + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object2, property2) { + return Object.prototype.hasOwnProperty.call(object2, property2); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 7); + }([ + /* 0 */ + /***/ + function(module3, exports3) { + module3.exports = __WEBPACK_EXTERNAL_MODULE_0__; + }, + /* 1 */ + /***/ + function(module3, exports3, __webpack_require__) { + var FDLayoutConstants = __webpack_require__(0).FDLayoutConstants; + function CoSEConstants() { + } + for (var prop in FDLayoutConstants) { + CoSEConstants[prop] = FDLayoutConstants[prop]; + } + CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; + CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; + CoSEConstants.TILE = true; + CoSEConstants.TILING_PADDING_VERTICAL = 10; + CoSEConstants.TILING_PADDING_HORIZONTAL = 10; + CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; + module3.exports = CoSEConstants; + }, + /* 2 */ + /***/ + function(module3, exports3, __webpack_require__) { + var FDLayoutEdge = __webpack_require__(0).FDLayoutEdge; + function CoSEEdge(source, target, vEdge) { + FDLayoutEdge.call(this, source, target, vEdge); + } + CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); + for (var prop in FDLayoutEdge) { + CoSEEdge[prop] = FDLayoutEdge[prop]; + } + module3.exports = CoSEEdge; + }, + /* 3 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LGraph = __webpack_require__(0).LGraph; + function CoSEGraph(parent, graphMgr, vGraph) { + LGraph.call(this, parent, graphMgr, vGraph); + } + CoSEGraph.prototype = Object.create(LGraph.prototype); + for (var prop in LGraph) { + CoSEGraph[prop] = LGraph[prop]; + } + module3.exports = CoSEGraph; + }, + /* 4 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LGraphManager = __webpack_require__(0).LGraphManager; + function CoSEGraphManager(layout2) { + LGraphManager.call(this, layout2); + } + CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); + for (var prop in LGraphManager) { + CoSEGraphManager[prop] = LGraphManager[prop]; + } + module3.exports = CoSEGraphManager; + }, + /* 5 */ + /***/ + function(module3, exports3, __webpack_require__) { + var FDLayoutNode = __webpack_require__(0).FDLayoutNode; + var IMath = __webpack_require__(0).IMath; + function CoSENode(gm, loc, size2, vNode) { + FDLayoutNode.call(this, gm, loc, size2, vNode); + } + CoSENode.prototype = Object.create(FDLayoutNode.prototype); + for (var prop in FDLayoutNode) { + CoSENode[prop] = FDLayoutNode[prop]; + } + CoSENode.prototype.move = function() { + var layout2 = this.graphManager.getLayout(); + this.displacementX = layout2.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; + this.displacementY = layout2.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; + if (Math.abs(this.displacementX) > layout2.coolingFactor * layout2.maxNodeDisplacement) { + this.displacementX = layout2.coolingFactor * layout2.maxNodeDisplacement * IMath.sign(this.displacementX); + } + if (Math.abs(this.displacementY) > layout2.coolingFactor * layout2.maxNodeDisplacement) { + this.displacementY = layout2.coolingFactor * layout2.maxNodeDisplacement * IMath.sign(this.displacementY); + } + if (this.child == null) { + this.moveBy(this.displacementX, this.displacementY); + } else if (this.child.getNodes().length == 0) { + this.moveBy(this.displacementX, this.displacementY); + } else { + this.propogateDisplacementToChildren(this.displacementX, this.displacementY); + } + layout2.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; + }; + CoSENode.prototype.propogateDisplacementToChildren = function(dX, dY) { + var nodes2 = this.getChild().getNodes(); + var node2; + for (var i2 = 0; i2 < nodes2.length; i2++) { + node2 = nodes2[i2]; + if (node2.getChild() == null) { + node2.moveBy(dX, dY); + node2.displacementX += dX; + node2.displacementY += dY; + } else { + node2.propogateDisplacementToChildren(dX, dY); + } + } + }; + CoSENode.prototype.setPred1 = function(pred12) { + this.pred1 = pred12; + }; + CoSENode.prototype.getPred1 = function() { + return pred1; + }; + CoSENode.prototype.getPred2 = function() { + return pred2; + }; + CoSENode.prototype.setNext = function(next2) { + this.next = next2; + }; + CoSENode.prototype.getNext = function() { + return next; + }; + CoSENode.prototype.setProcessed = function(processed2) { + this.processed = processed2; + }; + CoSENode.prototype.isProcessed = function() { + return processed; + }; + module3.exports = CoSENode; + }, + /* 6 */ + /***/ + function(module3, exports3, __webpack_require__) { + var FDLayout = __webpack_require__(0).FDLayout; + var CoSEGraphManager = __webpack_require__(4); + var CoSEGraph = __webpack_require__(3); + var CoSENode = __webpack_require__(5); + var CoSEEdge = __webpack_require__(2); + var CoSEConstants = __webpack_require__(1); + var FDLayoutConstants = __webpack_require__(0).FDLayoutConstants; + var LayoutConstants = __webpack_require__(0).LayoutConstants; + var Point2 = __webpack_require__(0).Point; + var PointD = __webpack_require__(0).PointD; + var Layout2 = __webpack_require__(0).Layout; + var Integer = __webpack_require__(0).Integer; + var IGeometry = __webpack_require__(0).IGeometry; + var LGraph = __webpack_require__(0).LGraph; + var Transform2 = __webpack_require__(0).Transform; + function CoSELayout() { + FDLayout.call(this); + this.toBeTiled = {}; + } + CoSELayout.prototype = Object.create(FDLayout.prototype); + for (var prop in FDLayout) { + CoSELayout[prop] = FDLayout[prop]; + } + CoSELayout.prototype.newGraphManager = function() { + var gm = new CoSEGraphManager(this); + this.graphManager = gm; + return gm; + }; + CoSELayout.prototype.newGraph = function(vGraph) { + return new CoSEGraph(null, this.graphManager, vGraph); + }; + CoSELayout.prototype.newNode = function(vNode) { + return new CoSENode(this.graphManager, vNode); + }; + CoSELayout.prototype.newEdge = function(vEdge) { + return new CoSEEdge(null, null, vEdge); + }; + CoSELayout.prototype.initParameters = function() { + FDLayout.prototype.initParameters.call(this, arguments); + if (!this.isSubLayout) { + if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { + this.idealEdgeLength = 10; + } else { + this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; + } + this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.prunedNodesAll = []; + this.growTreeIterations = 0; + this.afterGrowthIterations = 0; + this.isTreeGrowing = false; + this.isGrowthFinished = false; + this.coolingCycle = 0; + this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; + this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations; + this.coolingAdjuster = 1; + } + }; + CoSELayout.prototype.layout = function() { + var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + if (createBendsAsNeeded) { + this.createBendpoints(); + this.graphManager.resetAllEdges(); + } + this.level = 0; + return this.classicLayout(); + }; + CoSELayout.prototype.classicLayout = function() { + this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); + this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); + this.calcNoOfChildrenForAllNodes(); + this.graphManager.calcLowestCommonAncestors(); + this.graphManager.calcInclusionTreeDepths(); + this.graphManager.getRoot().calcEstimatedSize(); + this.calcIdealEdgeLengths(); + if (!this.incremental) { + var forest = this.getFlatForest(); + if (forest.length > 0) { + this.positionNodesRadially(forest); + } else { + this.reduceTrees(); + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection2 = this.nodesWithGravity.filter(function(x2) { + return allNodes.has(x2); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection2); + this.positionNodesRandomly(); + } + } else { + if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { + this.reduceTrees(); + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection2 = this.nodesWithGravity.filter(function(x2) { + return allNodes.has(x2); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection2); + } + } + this.initSpringEmbedder(); + this.runSpringEmbedder(); + return true; + }; + CoSELayout.prototype.tick = function() { + this.totalIterations++; + if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.isConverged()) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + this.coolingCycle++; + if (this.layoutQuality == 0) { + this.coolingAdjuster = this.coolingCycle; + } else if (this.layoutQuality == 1) { + this.coolingAdjuster = this.coolingCycle / 3; + } + this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature); + this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); + } + if (this.isTreeGrowing) { + if (this.growTreeIterations % 10 == 0) { + if (this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + this.growTree(this.prunedNodesAll); + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection2 = this.nodesWithGravity.filter(function(x2) { + return allNodes.has(x2); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection2); + this.graphManager.updateBounds(); + this.updateGrid(); + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } else { + this.isTreeGrowing = false; + this.isGrowthFinished = true; + } + } + this.growTreeIterations++; + } + if (this.isGrowthFinished) { + if (this.isConverged()) { + return true; + } + if (this.afterGrowthIterations % 10 == 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + } + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); + this.afterGrowthIterations++; + } + var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; + var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; + this.totalDisplacement = 0; + this.graphManager.updateBounds(); + this.calcSpringForces(); + this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); + this.calcGravitationalForces(); + this.moveNodes(); + this.animate(); + return false; + }; + CoSELayout.prototype.getPositionsData = function() { + var allNodes = this.graphManager.getAllNodes(); + var pData = {}; + for (var i2 = 0; i2 < allNodes.length; i2++) { + var rect2 = allNodes[i2].rect; + var id2 = allNodes[i2].id; + pData[id2] = { + id: id2, + x: rect2.getCenterX(), + y: rect2.getCenterY(), + w: rect2.width, + h: rect2.height + }; + } + return pData; + }; + CoSELayout.prototype.runSpringEmbedder = function() { + this.initialAnimationPeriod = 25; + this.animationPeriod = this.initialAnimationPeriod; + var layoutEnded = false; + if (FDLayoutConstants.ANIMATE === "during") { + this.emit("layoutstarted"); + } else { + while (!layoutEnded) { + layoutEnded = this.tick(); + } + this.graphManager.updateBounds(); + } + }; + CoSELayout.prototype.calculateNodesToApplyGravitationTo = function() { + var nodeList = []; + var graph; + var graphs = this.graphManager.getGraphs(); + var size2 = graphs.length; + var i2; + for (i2 = 0; i2 < size2; i2++) { + graph = graphs[i2]; + graph.updateConnected(); + if (!graph.isConnected) { + nodeList = nodeList.concat(graph.getNodes()); + } + } + return nodeList; + }; + CoSELayout.prototype.createBendpoints = function() { + var edges2 = []; + edges2 = edges2.concat(this.graphManager.getAllEdges()); + var visited = /* @__PURE__ */ new Set(); + var i2; + for (i2 = 0; i2 < edges2.length; i2++) { + var edge = edges2[i2]; + if (!visited.has(edge)) { + var source = edge.getSource(); + var target = edge.getTarget(); + if (source == target) { + edge.getBendpoints().push(new PointD()); + edge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(edge); + visited.add(edge); + } else { + var edgeList = []; + edgeList = edgeList.concat(source.getEdgeListToNode(target)); + edgeList = edgeList.concat(target.getEdgeListToNode(source)); + if (!visited.has(edgeList[0])) { + if (edgeList.length > 1) { + var k; + for (k = 0; k < edgeList.length; k++) { + var multiEdge = edgeList[k]; + multiEdge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(multiEdge); + } + } + edgeList.forEach(function(edge2) { + visited.add(edge2); + }); + } + } + } + if (visited.size == edges2.length) { + break; + } + } + }; + CoSELayout.prototype.positionNodesRadially = function(forest) { + var currentStartingPoint = new Point2(0, 0); + var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); + var height = 0; + var currentY = 0; + var currentX = 0; + var point2 = new PointD(0, 0); + for (var i2 = 0; i2 < forest.length; i2++) { + if (i2 % numberOfColumns == 0) { + currentX = 0; + currentY = height; + if (i2 != 0) { + currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; + } + height = 0; + } + var tree = forest[i2]; + var centerNode = Layout2.findCenterOfTree(tree); + currentStartingPoint.x = currentX; + currentStartingPoint.y = currentY; + point2 = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); + if (point2.y > height) { + height = Math.floor(point2.y); + } + currentX = Math.floor(point2.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); + } + this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point2.x / 2, LayoutConstants.WORLD_CENTER_Y - point2.y / 2)); + }; + CoSELayout.radialLayout = function(tree, centerNode, startingPoint) { + var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); + CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); + var bounds2 = LGraph.calculateBounds(tree); + var transform = new Transform2(); + transform.setDeviceOrgX(bounds2.getMinX()); + transform.setDeviceOrgY(bounds2.getMinY()); + transform.setWorldOrgX(startingPoint.x); + transform.setWorldOrgY(startingPoint.y); + for (var i2 = 0; i2 < tree.length; i2++) { + var node2 = tree[i2]; + node2.transform(transform); + } + var bottomRight = new PointD(bounds2.getMaxX(), bounds2.getMaxY()); + return transform.inverseTransformPoint(bottomRight); + }; + CoSELayout.branchRadialLayout = function(node2, parentOfNode, startAngle, endAngle, distance2, radialSeparation) { + var halfInterval = (endAngle - startAngle + 1) / 2; + if (halfInterval < 0) { + halfInterval += 180; + } + var nodeAngle = (halfInterval + startAngle) % 360; + var teta = nodeAngle * IGeometry.TWO_PI / 360; + var x_ = distance2 * Math.cos(teta); + var y_ = distance2 * Math.sin(teta); + node2.setCenter(x_, y_); + var neighborEdges = []; + neighborEdges = neighborEdges.concat(node2.getEdges()); + var childCount = neighborEdges.length; + if (parentOfNode != null) { + childCount--; + } + var branchCount = 0; + var incEdgesCount = neighborEdges.length; + var startIndex; + var edges2 = node2.getEdgesBetween(parentOfNode); + while (edges2.length > 1) { + var temp = edges2[0]; + edges2.splice(0, 1); + var index2 = neighborEdges.indexOf(temp); + if (index2 >= 0) { + neighborEdges.splice(index2, 1); + } + incEdgesCount--; + childCount--; + } + if (parentOfNode != null) { + startIndex = (neighborEdges.indexOf(edges2[0]) + 1) % incEdgesCount; + } else { + startIndex = 0; + } + var stepAngle = Math.abs(endAngle - startAngle) / childCount; + for (var i2 = startIndex; branchCount != childCount; i2 = ++i2 % incEdgesCount) { + var currentNeighbor = neighborEdges[i2].getOtherEnd(node2); + if (currentNeighbor == parentOfNode) { + continue; + } + var childStartAngle = (startAngle + branchCount * stepAngle) % 360; + var childEndAngle = (childStartAngle + stepAngle) % 360; + CoSELayout.branchRadialLayout(currentNeighbor, node2, childStartAngle, childEndAngle, distance2 + radialSeparation, radialSeparation); + branchCount++; + } + }; + CoSELayout.maxDiagonalInTree = function(tree) { + var maxDiagonal = Integer.MIN_VALUE; + for (var i2 = 0; i2 < tree.length; i2++) { + var node2 = tree[i2]; + var diagonal = node2.getDiagonal(); + if (diagonal > maxDiagonal) { + maxDiagonal = diagonal; + } + } + return maxDiagonal; + }; + CoSELayout.prototype.calcRepulsionRange = function() { + return 2 * (this.level + 1) * this.idealEdgeLength; + }; + CoSELayout.prototype.groupZeroDegreeMembers = function() { + var self2 = this; + var tempMemberGroups = {}; + this.memberGroups = {}; + this.idToDummyNode = {}; + var zeroDegree = []; + var allNodes = this.graphManager.getAllNodes(); + for (var i2 = 0; i2 < allNodes.length; i2++) { + var node2 = allNodes[i2]; + var parent = node2.getParent(); + if (this.getNodeDegreeWithChildren(node2) === 0 && (parent.id == void 0 || !this.getToBeTiled(parent))) { + zeroDegree.push(node2); + } + } + for (var i2 = 0; i2 < zeroDegree.length; i2++) { + var node2 = zeroDegree[i2]; + var p_id = node2.getParent().id; + if (typeof tempMemberGroups[p_id] === "undefined") + tempMemberGroups[p_id] = []; + tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node2); + } + Object.keys(tempMemberGroups).forEach(function(p_id2) { + if (tempMemberGroups[p_id2].length > 1) { + var dummyCompoundId = "DummyCompound_" + p_id2; + self2.memberGroups[dummyCompoundId] = tempMemberGroups[p_id2]; + var parent2 = tempMemberGroups[p_id2][0].getParent(); + var dummyCompound = new CoSENode(self2.graphManager); + dummyCompound.id = dummyCompoundId; + dummyCompound.paddingLeft = parent2.paddingLeft || 0; + dummyCompound.paddingRight = parent2.paddingRight || 0; + dummyCompound.paddingBottom = parent2.paddingBottom || 0; + dummyCompound.paddingTop = parent2.paddingTop || 0; + self2.idToDummyNode[dummyCompoundId] = dummyCompound; + var dummyParentGraph = self2.getGraphManager().add(self2.newGraph(), dummyCompound); + var parentGraph = parent2.getChild(); + parentGraph.add(dummyCompound); + for (var i3 = 0; i3 < tempMemberGroups[p_id2].length; i3++) { + var node3 = tempMemberGroups[p_id2][i3]; + parentGraph.remove(node3); + dummyParentGraph.add(node3); + } + } + }); + }; + CoSELayout.prototype.clearCompounds = function() { + var childGraphMap = {}; + var idToNode = {}; + this.performDFSOnCompounds(); + for (var i2 = 0; i2 < this.compoundOrder.length; i2++) { + idToNode[this.compoundOrder[i2].id] = this.compoundOrder[i2]; + childGraphMap[this.compoundOrder[i2].id] = [].concat(this.compoundOrder[i2].getChild().getNodes()); + this.graphManager.remove(this.compoundOrder[i2].getChild()); + this.compoundOrder[i2].child = null; + } + this.graphManager.resetAllNodes(); + this.tileCompoundMembers(childGraphMap, idToNode); + }; + CoSELayout.prototype.clearZeroDegreeMembers = function() { + var self2 = this; + var tiledZeroDegreePack = this.tiledZeroDegreePack = []; + Object.keys(this.memberGroups).forEach(function(id2) { + var compoundNode = self2.idToDummyNode[id2]; + tiledZeroDegreePack[id2] = self2.tileNodes(self2.memberGroups[id2], compoundNode.paddingLeft + compoundNode.paddingRight); + compoundNode.rect.width = tiledZeroDegreePack[id2].width; + compoundNode.rect.height = tiledZeroDegreePack[id2].height; + }); + }; + CoSELayout.prototype.repopulateCompounds = function() { + for (var i2 = this.compoundOrder.length - 1; i2 >= 0; i2--) { + var lCompoundNode = this.compoundOrder[i2]; + var id2 = lCompoundNode.id; + var horizontalMargin = lCompoundNode.paddingLeft; + var verticalMargin = lCompoundNode.paddingTop; + this.adjustLocations(this.tiledMemberPack[id2], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin); + } + }; + CoSELayout.prototype.repopulateZeroDegreeMembers = function() { + var self2 = this; + var tiledPack = this.tiledZeroDegreePack; + Object.keys(tiledPack).forEach(function(id2) { + var compoundNode = self2.idToDummyNode[id2]; + var horizontalMargin = compoundNode.paddingLeft; + var verticalMargin = compoundNode.paddingTop; + self2.adjustLocations(tiledPack[id2], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin); + }); + }; + CoSELayout.prototype.getToBeTiled = function(node2) { + var id2 = node2.id; + if (this.toBeTiled[id2] != null) { + return this.toBeTiled[id2]; + } + var childGraph = node2.getChild(); + if (childGraph == null) { + this.toBeTiled[id2] = false; + return false; + } + var children2 = childGraph.getNodes(); + for (var i2 = 0; i2 < children2.length; i2++) { + var theChild = children2[i2]; + if (this.getNodeDegree(theChild) > 0) { + this.toBeTiled[id2] = false; + return false; + } + if (theChild.getChild() == null) { + this.toBeTiled[theChild.id] = false; + continue; + } + if (!this.getToBeTiled(theChild)) { + this.toBeTiled[id2] = false; + return false; + } + } + this.toBeTiled[id2] = true; + return true; + }; + CoSELayout.prototype.getNodeDegree = function(node2) { + node2.id; + var edges2 = node2.getEdges(); + var degree = 0; + for (var i2 = 0; i2 < edges2.length; i2++) { + var edge = edges2[i2]; + if (edge.getSource().id !== edge.getTarget().id) { + degree = degree + 1; + } + } + return degree; + }; + CoSELayout.prototype.getNodeDegreeWithChildren = function(node2) { + var degree = this.getNodeDegree(node2); + if (node2.getChild() == null) { + return degree; + } + var children2 = node2.getChild().getNodes(); + for (var i2 = 0; i2 < children2.length; i2++) { + var child = children2[i2]; + degree += this.getNodeDegreeWithChildren(child); + } + return degree; + }; + CoSELayout.prototype.performDFSOnCompounds = function() { + this.compoundOrder = []; + this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); + }; + CoSELayout.prototype.fillCompexOrderByDFS = function(children2) { + for (var i2 = 0; i2 < children2.length; i2++) { + var child = children2[i2]; + if (child.getChild() != null) { + this.fillCompexOrderByDFS(child.getChild().getNodes()); + } + if (this.getToBeTiled(child)) { + this.compoundOrder.push(child); + } + } + }; + CoSELayout.prototype.adjustLocations = function(organization, x2, y2, compoundHorizontalMargin, compoundVerticalMargin) { + x2 += compoundHorizontalMargin; + y2 += compoundVerticalMargin; + var left2 = x2; + for (var i2 = 0; i2 < organization.rows.length; i2++) { + var row = organization.rows[i2]; + x2 = left2; + var maxHeight = 0; + for (var j = 0; j < row.length; j++) { + var lnode = row[j]; + lnode.rect.x = x2; + lnode.rect.y = y2; + x2 += lnode.rect.width + organization.horizontalPadding; + if (lnode.rect.height > maxHeight) + maxHeight = lnode.rect.height; + } + y2 += maxHeight + organization.verticalPadding; + } + }; + CoSELayout.prototype.tileCompoundMembers = function(childGraphMap, idToNode) { + var self2 = this; + this.tiledMemberPack = []; + Object.keys(childGraphMap).forEach(function(id2) { + var compoundNode = idToNode[id2]; + self2.tiledMemberPack[id2] = self2.tileNodes(childGraphMap[id2], compoundNode.paddingLeft + compoundNode.paddingRight); + compoundNode.rect.width = self2.tiledMemberPack[id2].width; + compoundNode.rect.height = self2.tiledMemberPack[id2].height; + }); + }; + CoSELayout.prototype.tileNodes = function(nodes2, minWidth) { + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + var organization = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: minWidth, + // assume minHeight equals to minWidth + verticalPadding, + horizontalPadding + }; + nodes2.sort(function(n1, n2) { + if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) + return -1; + if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) + return 1; + return 0; + }); + for (var i2 = 0; i2 < nodes2.length; i2++) { + var lNode = nodes2[i2]; + if (organization.rows.length == 0) { + this.insertNodeToRow(organization, lNode, 0, minWidth); + } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { + this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth); + } else { + this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); + } + this.shiftToLastRow(organization); + } + return organization; + }; + CoSELayout.prototype.insertNodeToRow = function(organization, node2, rowIndex, minWidth) { + var minCompoundSize = minWidth; + if (rowIndex == organization.rows.length) { + var secondDimension = []; + organization.rows.push(secondDimension); + organization.rowWidth.push(minCompoundSize); + organization.rowHeight.push(0); + } + var w2 = organization.rowWidth[rowIndex] + node2.rect.width; + if (organization.rows[rowIndex].length > 0) { + w2 += organization.horizontalPadding; + } + organization.rowWidth[rowIndex] = w2; + if (organization.width < w2) { + organization.width = w2; + } + var h = node2.rect.height; + if (rowIndex > 0) + h += organization.verticalPadding; + var extraHeight = 0; + if (h > organization.rowHeight[rowIndex]) { + extraHeight = organization.rowHeight[rowIndex]; + organization.rowHeight[rowIndex] = h; + extraHeight = organization.rowHeight[rowIndex] - extraHeight; + } + organization.height += extraHeight; + organization.rows[rowIndex].push(node2); + }; + CoSELayout.prototype.getShortestRowIndex = function(organization) { + var r = -1; + var min2 = Number.MAX_VALUE; + for (var i2 = 0; i2 < organization.rows.length; i2++) { + if (organization.rowWidth[i2] < min2) { + r = i2; + min2 = organization.rowWidth[i2]; + } + } + return r; + }; + CoSELayout.prototype.getLongestRowIndex = function(organization) { + var r = -1; + var max2 = Number.MIN_VALUE; + for (var i2 = 0; i2 < organization.rows.length; i2++) { + if (organization.rowWidth[i2] > max2) { + r = i2; + max2 = organization.rowWidth[i2]; + } + } + return r; + }; + CoSELayout.prototype.canAddHorizontal = function(organization, extraWidth, extraHeight) { + var sri = this.getShortestRowIndex(organization); + if (sri < 0) { + return true; + } + var min2 = organization.rowWidth[sri]; + if (min2 + organization.horizontalPadding + extraWidth <= organization.width) + return true; + var hDiff = 0; + if (organization.rowHeight[sri] < extraHeight) { + if (sri > 0) + hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; + } + var add_to_row_ratio; + if (organization.width - min2 >= extraWidth + organization.horizontalPadding) { + add_to_row_ratio = (organization.height + hDiff) / (min2 + extraWidth + organization.horizontalPadding); + } else { + add_to_row_ratio = (organization.height + hDiff) / organization.width; + } + hDiff = extraHeight + organization.verticalPadding; + var add_new_row_ratio; + if (organization.width < extraWidth) { + add_new_row_ratio = (organization.height + hDiff) / extraWidth; + } else { + add_new_row_ratio = (organization.height + hDiff) / organization.width; + } + if (add_new_row_ratio < 1) + add_new_row_ratio = 1 / add_new_row_ratio; + if (add_to_row_ratio < 1) + add_to_row_ratio = 1 / add_to_row_ratio; + return add_to_row_ratio < add_new_row_ratio; + }; + CoSELayout.prototype.shiftToLastRow = function(organization) { + var longest = this.getLongestRowIndex(organization); + var last2 = organization.rowWidth.length - 1; + var row = organization.rows[longest]; + var node2 = row[row.length - 1]; + var diff = node2.width + organization.horizontalPadding; + if (organization.width - organization.rowWidth[last2] > diff && longest != last2) { + row.splice(-1, 1); + organization.rows[last2].push(node2); + organization.rowWidth[longest] = organization.rowWidth[longest] - diff; + organization.rowWidth[last2] = organization.rowWidth[last2] + diff; + organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; + var maxHeight = Number.MIN_VALUE; + for (var i2 = 0; i2 < row.length; i2++) { + if (row[i2].height > maxHeight) + maxHeight = row[i2].height; + } + if (longest > 0) + maxHeight += organization.verticalPadding; + var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last2]; + organization.rowHeight[longest] = maxHeight; + if (organization.rowHeight[last2] < node2.height + organization.verticalPadding) + organization.rowHeight[last2] = node2.height + organization.verticalPadding; + var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last2]; + organization.height += finalTotal - prevTotal; + this.shiftToLastRow(organization); + } + }; + CoSELayout.prototype.tilingPreLayout = function() { + if (CoSEConstants.TILE) { + this.groupZeroDegreeMembers(); + this.clearCompounds(); + this.clearZeroDegreeMembers(); + } + }; + CoSELayout.prototype.tilingPostLayout = function() { + if (CoSEConstants.TILE) { + this.repopulateZeroDegreeMembers(); + this.repopulateCompounds(); + } + }; + CoSELayout.prototype.reduceTrees = function() { + var prunedNodesAll = []; + var containsLeaf = true; + var node2; + while (containsLeaf) { + var allNodes = this.graphManager.getAllNodes(); + var prunedNodesInStepTemp = []; + containsLeaf = false; + for (var i2 = 0; i2 < allNodes.length; i2++) { + node2 = allNodes[i2]; + if (node2.getEdges().length == 1 && !node2.getEdges()[0].isInterGraph && node2.getChild() == null) { + prunedNodesInStepTemp.push([node2, node2.getEdges()[0], node2.getOwner()]); + containsLeaf = true; + } + } + if (containsLeaf == true) { + var prunedNodesInStep = []; + for (var j = 0; j < prunedNodesInStepTemp.length; j++) { + if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { + prunedNodesInStep.push(prunedNodesInStepTemp[j]); + prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); + } + } + prunedNodesAll.push(prunedNodesInStep); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = prunedNodesAll; + }; + CoSELayout.prototype.growTree = function(prunedNodesAll) { + var lengthOfPrunedNodesInStep = prunedNodesAll.length; + var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; + var nodeData; + for (var i2 = 0; i2 < prunedNodesInStep.length; i2++) { + nodeData = prunedNodesInStep[i2]; + this.findPlaceforPrunedNode(nodeData); + nodeData[2].add(nodeData[0]); + nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); + } + prunedNodesAll.splice(prunedNodesAll.length - 1, 1); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + }; + CoSELayout.prototype.findPlaceforPrunedNode = function(nodeData) { + var gridForPrunedNode; + var nodeToConnect; + var prunedNode = nodeData[0]; + if (prunedNode == nodeData[1].source) { + nodeToConnect = nodeData[1].target; + } else { + nodeToConnect = nodeData[1].source; + } + var startGridX = nodeToConnect.startX; + var finishGridX = nodeToConnect.finishX; + var startGridY = nodeToConnect.startY; + var finishGridY = nodeToConnect.finishY; + var upNodeCount = 0; + var downNodeCount = 0; + var rightNodeCount = 0; + var leftNodeCount = 0; + var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; + if (startGridY > 0) { + for (var i2 = startGridX; i2 <= finishGridX; i2++) { + controlRegions[0] += this.grid[i2][startGridY - 1].length + this.grid[i2][startGridY].length - 1; + } + } + if (finishGridX < this.grid.length - 1) { + for (var i2 = startGridY; i2 <= finishGridY; i2++) { + controlRegions[1] += this.grid[finishGridX + 1][i2].length + this.grid[finishGridX][i2].length - 1; + } + } + if (finishGridY < this.grid[0].length - 1) { + for (var i2 = startGridX; i2 <= finishGridX; i2++) { + controlRegions[2] += this.grid[i2][finishGridY + 1].length + this.grid[i2][finishGridY].length - 1; + } + } + if (startGridX > 0) { + for (var i2 = startGridY; i2 <= finishGridY; i2++) { + controlRegions[3] += this.grid[startGridX - 1][i2].length + this.grid[startGridX][i2].length - 1; + } + } + var min2 = Integer.MAX_VALUE; + var minCount; + var minIndex; + for (var j = 0; j < controlRegions.length; j++) { + if (controlRegions[j] < min2) { + min2 = controlRegions[j]; + minCount = 1; + minIndex = j; + } else if (controlRegions[j] == min2) { + minCount++; + } + } + if (minCount == 3 && min2 == 0) { + if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { + gridForPrunedNode = 1; + } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 0; + } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 3; + } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 2; + } + } else if (minCount == 2 && min2 == 0) { + var random2 = Math.floor(Math.random() * 2); + if (controlRegions[0] == 0 && controlRegions[1] == 0) { + if (random2 == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 1; + } + } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { + if (random2 == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { + if (random2 == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 3; + } + } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { + if (random2 == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { + if (random2 == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 3; + } + } else { + if (random2 == 0) { + gridForPrunedNode = 2; + } else { + gridForPrunedNode = 3; + } + } + } else if (minCount == 4 && min2 == 0) { + var random2 = Math.floor(Math.random() * 4); + gridForPrunedNode = random2; + } else { + gridForPrunedNode = minIndex; + } + if (gridForPrunedNode == 0) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); + } else if (gridForPrunedNode == 1) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } else if (gridForPrunedNode == 2) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); + } else { + prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } + }; + module3.exports = CoSELayout; + }, + /* 7 */ + /***/ + function(module3, exports3, __webpack_require__) { + var coseBase2 = {}; + coseBase2.layoutBase = __webpack_require__(0); + coseBase2.CoSEConstants = __webpack_require__(1); + coseBase2.CoSEEdge = __webpack_require__(2); + coseBase2.CoSEGraph = __webpack_require__(3); + coseBase2.CoSEGraphManager = __webpack_require__(4); + coseBase2.CoSELayout = __webpack_require__(6); + coseBase2.CoSENode = __webpack_require__(5); + module3.exports = coseBase2; + } + /******/ + ]) + ); + }); + })(coseBase); + return coseBase.exports; + } + (function(module2, exports2) { + (function webpackUniversalModuleDefinition(root2, factory) { + module2.exports = factory(requireCoseBase()); + })(commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE_0__) { + return ( + /******/ + function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module3 = installedModules[moduleId] = { + /******/ + i: moduleId, + /******/ + l: false, + /******/ + exports: {} + /******/ + }; + modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__); + module3.l = true; + return module3.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value2) { + return value2; + }; + __webpack_require__.d = function(exports3, name2, getter) { + if (!__webpack_require__.o(exports3, name2)) { + Object.defineProperty(exports3, name2, { + /******/ + configurable: false, + /******/ + enumerable: true, + /******/ + get: getter + /******/ + }); + } + }; + __webpack_require__.n = function(module3) { + var getter = module3 && module3.__esModule ? ( + /******/ + function getDefault() { + return module3["default"]; + } + ) : ( + /******/ + function getModuleExports() { + return module3; + } + ); + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object2, property2) { + return Object.prototype.hasOwnProperty.call(object2, property2); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 1); + }([ + /* 0 */ + /***/ + function(module3, exports3) { + module3.exports = __WEBPACK_EXTERNAL_MODULE_0__; + }, + /* 1 */ + /***/ + function(module3, exports3, __webpack_require__) { + var LayoutConstants = __webpack_require__(0).layoutBase.LayoutConstants; + var FDLayoutConstants = __webpack_require__(0).layoutBase.FDLayoutConstants; + var CoSEConstants = __webpack_require__(0).CoSEConstants; + var CoSELayout = __webpack_require__(0).CoSELayout; + var CoSENode = __webpack_require__(0).CoSENode; + var PointD = __webpack_require__(0).layoutBase.PointD; + var DimensionD2 = __webpack_require__(0).layoutBase.DimensionD; + var defaults2 = { + // Called on `layoutready` + ready: function ready() { + }, + // Called on `layoutstop` + stop: function stop() { + }, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: "default", + // include labels in node dimensions + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: "end", + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 + }; + function extend2(defaults3, options2) { + var obj = {}; + for (var i2 in defaults3) { + obj[i2] = defaults3[i2]; + } + for (var i2 in options2) { + obj[i2] = options2[i2]; + } + return obj; + } + function _CoSELayout(_options) { + this.options = extend2(defaults2, _options); + getUserOptions(this.options); + } + var getUserOptions = function getUserOptions2(options2) { + if (options2.nodeRepulsion != null) + CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options2.nodeRepulsion; + if (options2.idealEdgeLength != null) + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options2.idealEdgeLength; + if (options2.edgeElasticity != null) + CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options2.edgeElasticity; + if (options2.nestingFactor != null) + CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options2.nestingFactor; + if (options2.gravity != null) + CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options2.gravity; + if (options2.numIter != null) + CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options2.numIter; + if (options2.gravityRange != null) + CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options2.gravityRange; + if (options2.gravityCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options2.gravityCompound; + if (options2.gravityRangeCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options2.gravityRangeCompound; + if (options2.initialEnergyOnIncremental != null) + CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options2.initialEnergyOnIncremental; + if (options2.quality == "draft") + LayoutConstants.QUALITY = 0; + else if (options2.quality == "proof") + LayoutConstants.QUALITY = 2; + else + LayoutConstants.QUALITY = 1; + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options2.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options2.randomize; + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options2.animate; + CoSEConstants.TILE = options2.tile; + CoSEConstants.TILING_PADDING_VERTICAL = typeof options2.tilingPaddingVertical === "function" ? options2.tilingPaddingVertical.call() : options2.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options2.tilingPaddingHorizontal === "function" ? options2.tilingPaddingHorizontal.call() : options2.tilingPaddingHorizontal; + }; + _CoSELayout.prototype.run = function() { + var ready; + var frameId; + var options2 = this.options; + this.idToLNode = {}; + var layout2 = this.layout = new CoSELayout(); + var self2 = this; + self2.stopped = false; + this.cy = this.options.cy; + this.cy.trigger({ type: "layoutstart", layout: this }); + var gm = layout2.newGraphManager(); + this.gm = gm; + var nodes2 = this.options.eles.nodes(); + var edges2 = this.options.eles.edges(); + this.root = gm.addRoot(); + this.processChildrenList(this.root, this.getTopMostNodes(nodes2), layout2); + for (var i2 = 0; i2 < edges2.length; i2++) { + var edge = edges2[i2]; + var sourceNode = this.idToLNode[edge.data("source")]; + var targetNode = this.idToLNode[edge.data("target")]; + if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { + var e1 = gm.add(layout2.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + } + } + var getPositions = function getPositions2(ele, i3) { + if (typeof ele === "number") { + ele = i3; + } + var theId = ele.data("id"); + var lNode = self2.idToLNode[theId]; + return { + x: lNode.getRect().getCenterX(), + y: lNode.getRect().getCenterY() + }; + }; + var iterateAnimated = function iterateAnimated2() { + var afterReposition = function afterReposition2() { + if (options2.fit) { + options2.cy.fit(options2.eles, options2.padding); + } + if (!ready) { + ready = true; + self2.cy.one("layoutready", options2.ready); + self2.cy.trigger({ type: "layoutready", layout: self2 }); + } + }; + var ticksPerFrame = self2.options.refresh; + var isDone; + for (var i3 = 0; i3 < ticksPerFrame && !isDone; i3++) { + isDone = self2.stopped || self2.layout.tick(); + } + if (isDone) { + if (layout2.checkLayoutSuccess() && !layout2.isSubLayout) { + layout2.doPostLayout(); + } + if (layout2.tilingPostLayout) { + layout2.tilingPostLayout(); + } + layout2.isLayoutFinished = true; + self2.options.eles.nodes().positions(getPositions); + afterReposition(); + self2.cy.one("layoutstop", self2.options.stop); + self2.cy.trigger({ type: "layoutstop", layout: self2 }); + if (frameId) { + cancelAnimationFrame(frameId); + } + ready = false; + return; + } + var animationData = self2.layout.getPositionsData(); + options2.eles.nodes().positions(function(ele, i4) { + if (typeof ele === "number") { + ele = i4; + } + if (!ele.isParent()) { + var theId = ele.id(); + var pNode = animationData[theId]; + var temp = ele; + while (pNode == null) { + pNode = animationData[temp.data("parent")] || animationData["DummyCompound_" + temp.data("parent")]; + animationData[theId] = pNode; + temp = temp.parent()[0]; + if (temp == void 0) { + break; + } + } + if (pNode != null) { + return { + x: pNode.x, + y: pNode.y + }; + } else { + return { + x: ele.position("x"), + y: ele.position("y") + }; + } + } + }); + afterReposition(); + frameId = requestAnimationFrame(iterateAnimated2); + }; + layout2.addListener("layoutstarted", function() { + if (self2.options.animate === "during") { + frameId = requestAnimationFrame(iterateAnimated); + } + }); + layout2.runLayout(); + if (this.options.animate !== "during") { + self2.options.eles.nodes().not(":parent").layoutPositions(self2, self2.options, getPositions); + ready = false; + } + return this; + }; + _CoSELayout.prototype.getTopMostNodes = function(nodes2) { + var nodesMap2 = {}; + for (var i2 = 0; i2 < nodes2.length; i2++) { + nodesMap2[nodes2[i2].id()] = true; + } + var roots = nodes2.filter(function(ele, i3) { + if (typeof ele === "number") { + ele = i3; + } + var parent = ele.parent()[0]; + while (parent != null) { + if (nodesMap2[parent.id()]) { + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + return roots; + }; + _CoSELayout.prototype.processChildrenList = function(parent, children2, layout2) { + var size2 = children2.length; + for (var i2 = 0; i2 < size2; i2++) { + var theChild = children2[i2]; + var children_of_children = theChild.children(); + var theNode; + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + if (theChild.outerWidth() != null && theChild.outerHeight() != null) { + theNode = parent.add(new CoSENode(layout2.graphManager, new PointD(theChild.position("x") - dimensions.w / 2, theChild.position("y") - dimensions.h / 2), new DimensionD2(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + theNode.id = theChild.data("id"); + theNode.paddingLeft = parseInt(theChild.css("padding")); + theNode.paddingTop = parseInt(theChild.css("padding")); + theNode.paddingRight = parseInt(theChild.css("padding")); + theNode.paddingBottom = parseInt(theChild.css("padding")); + if (this.options.nodeDimensionsIncludeLabels) { + if (theChild.isParent()) { + var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; + var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; + var labelPos = theChild.css("text-halign"); + theNode.labelWidth = labelWidth; + theNode.labelHeight = labelHeight; + theNode.labelPos = labelPos; + } + } + this.idToLNode[theChild.data("id")] = theNode; + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph; + theNewGraph = layout2.getGraphManager().add(layout2.newGraph(), theNode); + this.processChildrenList(theNewGraph, children_of_children, layout2); + } + } + }; + _CoSELayout.prototype.stop = function() { + this.stopped = true; + return this; + }; + var register = function register2(cytoscape2) { + cytoscape2("layout", "cose-bilkent", _CoSELayout); + }; + if (typeof cytoscape !== "undefined") { + register(cytoscape); + } + module3.exports = register; + } + /******/ + ]) + ); + }); + })(cytoscapeCoseBilkent); + var cytoscapeCoseBilkentExports = cytoscapeCoseBilkent.exports; + const coseBilkent = /* @__PURE__ */ getDefaultExportFromCjs(cytoscapeCoseBilkentExports); + cytoscape$1.use(coseBilkent); + function drawNodes(svg2, mindmap2, section, conf2) { + svgDraw.drawNode(svg2, mindmap2, section, conf2); + if (mindmap2.children) { + mindmap2.children.forEach((child, index2) => { + drawNodes(svg2, child, section < 0 ? index2 : section, conf2); + }); + } + } + function drawEdges(edgesEl, cy) { + cy.edges().map((edge, id2) => { + const data = edge.data(); + if (edge[0]._private.bodyBounds) { + const bounds2 = edge[0]._private.rscratch; + log$1.trace("Edge: ", id2, data); + edgesEl.insert("path").attr( + "d", + `M ${bounds2.startX},${bounds2.startY} L ${bounds2.midX},${bounds2.midY} L${bounds2.endX},${bounds2.endY} ` + ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); + } + }); + } + function addNodes(mindmap2, cy, conf2, level) { + cy.add({ + group: "nodes", + data: { + id: mindmap2.id, + labelText: mindmap2.descr, + height: mindmap2.height, + width: mindmap2.width, + level, + nodeId: mindmap2.id, + padding: mindmap2.padding, + type: mindmap2.type + }, + position: { + x: mindmap2.x, + y: mindmap2.y + } + }); + if (mindmap2.children) { + mindmap2.children.forEach((child) => { + addNodes(child, cy, conf2, level + 1); + cy.add({ + group: "edges", + data: { + id: `${mindmap2.id}_${child.id}`, + source: mindmap2.id, + target: child.id, + depth: level, + section: child.section + } + }); + }); + } + } + function layoutMindmap(node2, conf2) { + return new Promise((resolve) => { + const renderEl = d3select("body").append("div").attr("id", "cy").attr("style", "display:none"); + const cy = cytoscape$1({ + container: document.getElementById("cy"), + // container to render in + style: [ + { + selector: "edge", + style: { + "curve-style": "bezier" + } + } + ] + }); + renderEl.remove(); + addNodes(node2, cy, conf2, 0); + cy.nodes().forEach(function(n) { + n.layoutDimensions = () => { + const data = n.data(); + return { w: data.width, h: data.height }; + }; + }); + cy.layout({ + name: "cose-bilkent", + quality: "proof", + // headless: true, + styleEnabled: false, + animate: false + }).run(); + cy.ready((e) => { + log$1.info("Ready", e); + resolve(cy); + }); + }); + } + function positionNodes(cy) { + cy.nodes().map((node2, id2) => { + const data = node2.data(); + data.x = node2.position().x; + data.y = node2.position().y; + svgDraw.positionNode(data); + const el = getElementById(data.nodeId); + log$1.info("Id:", id2, "Position: (", node2.position().x, ", ", node2.position().y, ")", data); + el.attr( + "transform", + `translate(${node2.position().x - data.width / 2}, ${node2.position().y - data.height / 2})` + ); + el.attr("attr", `apa-${id2})`); + }); + } + const draw$1 = async (text2, id2, version2, diagObj) => { + const conf2 = getConfig$2(); + conf2.htmlLabels = false; + log$1.debug("Rendering mindmap diagram\n" + text2, diagObj.parser); + const securityLevel = getConfig$2().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = root2.select("#" + id2); + svg2.append("g"); + const mm = diagObj.db.getMindmap(); + const edgesElem = svg2.append("g"); + edgesElem.attr("class", "mindmap-edges"); + const nodesElem = svg2.append("g"); + nodesElem.attr("class", "mindmap-nodes"); + drawNodes(nodesElem, mm, -1, conf2); + const cy = await layoutMindmap(mm, conf2); + drawEdges(edgesElem, cy); + positionNodes(cy); + setupGraphViewbox$1(void 0, svg2, conf2.mindmap.padding, conf2.mindmap.useMaxWidth); + }; + const mindmapRenderer = { + draw: draw$1 + }; + const genSections = (options2) => { + let sections2 = ""; + for (let i2 = 0; i2 < options2.THEME_COLOR_LIMIT; i2++) { + options2["lineColor" + i2] = options2["lineColor" + i2] || options2["cScaleInv" + i2]; + if (isDark$1(options2["lineColor" + i2])) { + options2["lineColor" + i2] = lighten$1(options2["lineColor" + i2], 20); + } else { + options2["lineColor" + i2] = darken$1(options2["lineColor" + i2], 20); + } + } + for (let i2 = 0; i2 < options2.THEME_COLOR_LIMIT; i2++) { + const sw = "" + (17 - 3 * i2); + sections2 += ` + .section-${i2 - 1} rect, .section-${i2 - 1} path, .section-${i2 - 1} circle, .section-${i2 - 1} polygon, .section-${i2 - 1} path { + fill: ${options2["cScale" + i2]}; + } + .section-${i2 - 1} text { + fill: ${options2["cScaleLabel" + i2]}; + } + .node-icon-${i2 - 1} { + font-size: 40px; + color: ${options2["cScaleLabel" + i2]}; + } + .section-edge-${i2 - 1}{ + stroke: ${options2["cScale" + i2]}; + } + .edge-depth-${i2 - 1}{ + stroke-width: ${sw}; + } + .section-${i2 - 1} line { + stroke: ${options2["cScaleInv" + i2]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections2; + }; + const getStyles = (options2) => ` + .edge { + stroke-width: 3; + } + ${genSections(options2)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${options2.git0}; + } + .section-root text { + fill: ${options2.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`; + const mindmapStyles = getStyles; + const diagram$1 = { + db: mindmapDb, + renderer: mindmapRenderer, + parser: mindmapParser, + styles: mindmapStyles + }; + const mindmapDefinition = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram: diagram$1 + }, Symbol.toStringTag, { value: "Module" })); + var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" }, + productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 7: + const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"')); + const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"')); + const value2 = parseFloat($$[$0].trim()); + yy.addLink(source, target, value2); + break; + case 8: + case 9: + case 11: + this.$ = $$[$0]; + break; + case 10: + this.$ = $$[$0 - 1]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])], + defaultActions: { 11: [2, 1], 12: [2, 5] }, + parseError: function parseError2(str2, hash) { + if (hash.recoverable) { + this.trace(str2); + } else { + var error = new Error(str2); + error.hash = hash; + throw error; + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token2; + token2 = tstack.pop() || lexer2.lex() || EOF; + if (typeof token2 !== "number") { + if (token2 instanceof Array) { + tstack = token2; + token2 = tstack.pop(); + } + token2 = self2.symbols_[token2] || token2; + } + return token2; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str2, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str2, hash); + } else { + throw new Error(str2); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token2, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token2 = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token2) { + return token2; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token2, match, tempMatch, index2; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i2 = 0; i2 < rules.length; i2++) { + tempMatch = this._input.match(this.rules[rules[i2]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index2 = i2; + if (this.options.backtrack_lexer) { + token2 = this.test_match(tempMatch, rules[i2]); + if (token2 !== false) { + return token2; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token2 = this.test_match(match, rules[index2]); + if (token2 !== false) { + return token2; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "easy_keword_rules": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.pushState("csv"); + return 4; + case 1: + return 10; + case 2: + return 5; + case 3: + return 12; + case 4: + this.pushState("escaped_text"); + return 18; + case 5: + return 20; + case 6: + this.popState("escaped_text"); + return 18; + case 7: + return 19; + } + }, + rules: [/^(?:sankey-beta\b)/, /^(?:$)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:(\u002C))/, /^(?:(\u0022))/, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/, /^(?:(\u0022)(?!(\u0022)))/, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/], + conditions: { "csv": { "rules": [1, 2, 3, 4, 5, 6, 7], "inclusive": false }, "escaped_text": { "rules": [6, 7], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + parser.parser = parser; + const parser$1 = parser; + let links = []; + let nodes = []; + let nodesMap = {}; + const clear = () => { + links = []; + nodes = []; + nodesMap = {}; + clear$l(); + }; + class SankeyLink { + constructor(source, target, value2 = 0) { + this.source = source; + this.target = target; + this.value = value2; + } + } + const addLink = (source, target, value2) => { + links.push(new SankeyLink(source, target, value2)); + }; + class SankeyNode { + constructor(ID) { + this.ID = ID; + } + } + const findOrCreateNode = (ID) => { + ID = common$1.sanitizeText(ID, getConfig$2()); + if (!nodesMap[ID]) { + nodesMap[ID] = new SankeyNode(ID); + nodes.push(nodesMap[ID]); + } + return nodesMap[ID]; + }; + const getNodes = () => nodes; + const getLinks = () => links; + const getGraph = () => ({ + nodes: nodes.map((node2) => ({ id: node2.ID })), + links: links.map((link2) => ({ + source: link2.source.ID, + target: link2.target.ID, + value: link2.value + })) + }); + const db = { + nodesMap, + getConfig: () => getConfig$2().sankey, + getNodes, + getLinks, + getGraph, + addLink, + findOrCreateNode, + getAccTitle, + setAccTitle, + getAccDescription, + setAccDescription, + getDiagramTitle, + setDiagramTitle, + clear + }; + function max(values2, valueof) { + let max2; + if (valueof === void 0) { + for (const value2 of values2) { + if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) { + max2 = value2; + } + } + } else { + let index2 = -1; + for (let value2 of values2) { + if ((value2 = valueof(value2, ++index2, values2)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) { + max2 = value2; + } + } + } + return max2; + } + function min(values2, valueof) { + let min2; + if (valueof === void 0) { + for (const value2 of values2) { + if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) { + min2 = value2; + } + } + } else { + let index2 = -1; + for (let value2 of values2) { + if ((value2 = valueof(value2, ++index2, values2)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) { + min2 = value2; + } + } + } + return min2; + } + function sum(values2, valueof) { + let sum2 = 0; + if (valueof === void 0) { + for (let value2 of values2) { + if (value2 = +value2) { + sum2 += value2; + } + } + } else { + let index2 = -1; + for (let value2 of values2) { + if (value2 = +valueof(value2, ++index2, values2)) { + sum2 += value2; + } + } + } + return sum2; + } + function targetDepth(d) { + return d.target.depth; + } + function left(node2) { + return node2.depth; + } + function right(node2, n) { + return n - 1 - node2.height; + } + function justify(node2, n) { + return node2.sourceLinks.length ? node2.depth : n - 1; + } + function center(node2) { + return node2.targetLinks.length ? node2.depth : node2.sourceLinks.length ? min(node2.sourceLinks, targetDepth) - 1 : 0; + } + function constant$1(x2) { + return function() { + return x2; + }; + } + function ascendingSourceBreadth(a, b) { + return ascendingBreadth(a.source, b.source) || a.index - b.index; + } + function ascendingTargetBreadth(a, b) { + return ascendingBreadth(a.target, b.target) || a.index - b.index; + } + function ascendingBreadth(a, b) { + return a.y0 - b.y0; + } + function value(d) { + return d.value; + } + function defaultId(d) { + return d.index; + } + function defaultNodes(graph) { + return graph.nodes; + } + function defaultLinks(graph) { + return graph.links; + } + function find(nodeById, id2) { + const node2 = nodeById.get(id2); + if (!node2) + throw new Error("missing: " + id2); + return node2; + } + function computeLinkBreadths({ nodes: nodes2 }) { + for (const node2 of nodes2) { + let y0 = node2.y0; + let y1 = y0; + for (const link2 of node2.sourceLinks) { + link2.y0 = y0 + link2.width / 2; + y0 += link2.width; + } + for (const link2 of node2.targetLinks) { + link2.y1 = y1 + link2.width / 2; + y1 += link2.width; + } + } + } + function Sankey() { + let x0 = 0, y0 = 0, x1 = 1, y1 = 1; + let dx = 24; + let dy = 8, py; + let id2 = defaultId; + let align = justify; + let sort2; + let linkSort; + let nodes2 = defaultNodes; + let links2 = defaultLinks; + let iterations = 6; + function sankey2() { + const graph = { nodes: nodes2.apply(null, arguments), links: links2.apply(null, arguments) }; + computeNodeLinks(graph); + computeNodeValues(graph); + computeNodeDepths(graph); + computeNodeHeights(graph); + computeNodeBreadths(graph); + computeLinkBreadths(graph); + return graph; + } + sankey2.update = function(graph) { + computeLinkBreadths(graph); + return graph; + }; + sankey2.nodeId = function(_2) { + return arguments.length ? (id2 = typeof _2 === "function" ? _2 : constant$1(_2), sankey2) : id2; + }; + sankey2.nodeAlign = function(_2) { + return arguments.length ? (align = typeof _2 === "function" ? _2 : constant$1(_2), sankey2) : align; + }; + sankey2.nodeSort = function(_2) { + return arguments.length ? (sort2 = _2, sankey2) : sort2; + }; + sankey2.nodeWidth = function(_2) { + return arguments.length ? (dx = +_2, sankey2) : dx; + }; + sankey2.nodePadding = function(_2) { + return arguments.length ? (dy = py = +_2, sankey2) : dy; + }; + sankey2.nodes = function(_2) { + return arguments.length ? (nodes2 = typeof _2 === "function" ? _2 : constant$1(_2), sankey2) : nodes2; + }; + sankey2.links = function(_2) { + return arguments.length ? (links2 = typeof _2 === "function" ? _2 : constant$1(_2), sankey2) : links2; + }; + sankey2.linkSort = function(_2) { + return arguments.length ? (linkSort = _2, sankey2) : linkSort; + }; + sankey2.size = function(_2) { + return arguments.length ? (x0 = y0 = 0, x1 = +_2[0], y1 = +_2[1], sankey2) : [x1 - x0, y1 - y0]; + }; + sankey2.extent = function(_2) { + return arguments.length ? (x0 = +_2[0][0], x1 = +_2[1][0], y0 = +_2[0][1], y1 = +_2[1][1], sankey2) : [[x0, y0], [x1, y1]]; + }; + sankey2.iterations = function(_2) { + return arguments.length ? (iterations = +_2, sankey2) : iterations; + }; + function computeNodeLinks({ nodes: nodes3, links: links3 }) { + for (const [i2, node2] of nodes3.entries()) { + node2.index = i2; + node2.sourceLinks = []; + node2.targetLinks = []; + } + const nodeById = new Map(nodes3.map((d, i2) => [id2(d, i2, nodes3), d])); + for (const [i2, link2] of links3.entries()) { + link2.index = i2; + let { source, target } = link2; + if (typeof source !== "object") + source = link2.source = find(nodeById, source); + if (typeof target !== "object") + target = link2.target = find(nodeById, target); + source.sourceLinks.push(link2); + target.targetLinks.push(link2); + } + if (linkSort != null) { + for (const { sourceLinks, targetLinks } of nodes3) { + sourceLinks.sort(linkSort); + targetLinks.sort(linkSort); + } + } + } + function computeNodeValues({ nodes: nodes3 }) { + for (const node2 of nodes3) { + node2.value = node2.fixedValue === void 0 ? Math.max(sum(node2.sourceLinks, value), sum(node2.targetLinks, value)) : node2.fixedValue; + } + } + function computeNodeDepths({ nodes: nodes3 }) { + const n = nodes3.length; + let current = new Set(nodes3); + let next2 = /* @__PURE__ */ new Set(); + let x2 = 0; + while (current.size) { + for (const node2 of current) { + node2.depth = x2; + for (const { target } of node2.sourceLinks) { + next2.add(target); + } + } + if (++x2 > n) + throw new Error("circular link"); + current = next2; + next2 = /* @__PURE__ */ new Set(); + } + } + function computeNodeHeights({ nodes: nodes3 }) { + const n = nodes3.length; + let current = new Set(nodes3); + let next2 = /* @__PURE__ */ new Set(); + let x2 = 0; + while (current.size) { + for (const node2 of current) { + node2.height = x2; + for (const { source } of node2.targetLinks) { + next2.add(source); + } + } + if (++x2 > n) + throw new Error("circular link"); + current = next2; + next2 = /* @__PURE__ */ new Set(); + } + } + function computeNodeLayers({ nodes: nodes3 }) { + const x2 = max(nodes3, (d) => d.depth) + 1; + const kx = (x1 - x0 - dx) / (x2 - 1); + const columns = new Array(x2); + for (const node2 of nodes3) { + const i2 = Math.max(0, Math.min(x2 - 1, Math.floor(align.call(null, node2, x2)))); + node2.layer = i2; + node2.x0 = x0 + i2 * kx; + node2.x1 = node2.x0 + dx; + if (columns[i2]) + columns[i2].push(node2); + else + columns[i2] = [node2]; + } + if (sort2) + for (const column2 of columns) { + column2.sort(sort2); + } + return columns; + } + function initializeNodeBreadths(columns) { + const ky = min(columns, (c2) => (y1 - y0 - (c2.length - 1) * py) / sum(c2, value)); + for (const nodes3 of columns) { + let y2 = y0; + for (const node2 of nodes3) { + node2.y0 = y2; + node2.y1 = y2 + node2.value * ky; + y2 = node2.y1 + py; + for (const link2 of node2.sourceLinks) { + link2.width = link2.value * ky; + } + } + y2 = (y1 - y2 + py) / (nodes3.length + 1); + for (let i2 = 0; i2 < nodes3.length; ++i2) { + const node2 = nodes3[i2]; + node2.y0 += y2 * (i2 + 1); + node2.y1 += y2 * (i2 + 1); + } + reorderLinks(nodes3); + } + } + function computeNodeBreadths(graph) { + const columns = computeNodeLayers(graph); + py = Math.min(dy, (y1 - y0) / (max(columns, (c2) => c2.length) - 1)); + initializeNodeBreadths(columns); + for (let i2 = 0; i2 < iterations; ++i2) { + const alpha = Math.pow(0.99, i2); + const beta = Math.max(1 - alpha, (i2 + 1) / iterations); + relaxRightToLeft(columns, alpha, beta); + relaxLeftToRight(columns, alpha, beta); + } + } + function relaxLeftToRight(columns, alpha, beta) { + for (let i2 = 1, n = columns.length; i2 < n; ++i2) { + const column2 = columns[i2]; + for (const target of column2) { + let y2 = 0; + let w2 = 0; + for (const { source, value: value2 } of target.targetLinks) { + let v = value2 * (target.layer - source.layer); + y2 += targetTop(source, target) * v; + w2 += v; + } + if (!(w2 > 0)) + continue; + let dy2 = (y2 / w2 - target.y0) * alpha; + target.y0 += dy2; + target.y1 += dy2; + reorderNodeLinks(target); + } + if (sort2 === void 0) + column2.sort(ascendingBreadth); + resolveCollisions(column2, beta); + } + } + function relaxRightToLeft(columns, alpha, beta) { + for (let n = columns.length, i2 = n - 2; i2 >= 0; --i2) { + const column2 = columns[i2]; + for (const source of column2) { + let y2 = 0; + let w2 = 0; + for (const { target, value: value2 } of source.sourceLinks) { + let v = value2 * (target.layer - source.layer); + y2 += sourceTop(source, target) * v; + w2 += v; + } + if (!(w2 > 0)) + continue; + let dy2 = (y2 / w2 - source.y0) * alpha; + source.y0 += dy2; + source.y1 += dy2; + reorderNodeLinks(source); + } + if (sort2 === void 0) + column2.sort(ascendingBreadth); + resolveCollisions(column2, beta); + } + } + function resolveCollisions(nodes3, alpha) { + const i2 = nodes3.length >> 1; + const subject = nodes3[i2]; + resolveCollisionsBottomToTop(nodes3, subject.y0 - py, i2 - 1, alpha); + resolveCollisionsTopToBottom(nodes3, subject.y1 + py, i2 + 1, alpha); + resolveCollisionsBottomToTop(nodes3, y1, nodes3.length - 1, alpha); + resolveCollisionsTopToBottom(nodes3, y0, 0, alpha); + } + function resolveCollisionsTopToBottom(nodes3, y2, i2, alpha) { + for (; i2 < nodes3.length; ++i2) { + const node2 = nodes3[i2]; + const dy2 = (y2 - node2.y0) * alpha; + if (dy2 > 1e-6) + node2.y0 += dy2, node2.y1 += dy2; + y2 = node2.y1 + py; + } + } + function resolveCollisionsBottomToTop(nodes3, y2, i2, alpha) { + for (; i2 >= 0; --i2) { + const node2 = nodes3[i2]; + const dy2 = (node2.y1 - y2) * alpha; + if (dy2 > 1e-6) + node2.y0 -= dy2, node2.y1 -= dy2; + y2 = node2.y0 - py; + } + } + function reorderNodeLinks({ sourceLinks, targetLinks }) { + if (linkSort === void 0) { + for (const { source: { sourceLinks: sourceLinks2 } } of targetLinks) { + sourceLinks2.sort(ascendingTargetBreadth); + } + for (const { target: { targetLinks: targetLinks2 } } of sourceLinks) { + targetLinks2.sort(ascendingSourceBreadth); + } + } + } + function reorderLinks(nodes3) { + if (linkSort === void 0) { + for (const { sourceLinks, targetLinks } of nodes3) { + sourceLinks.sort(ascendingTargetBreadth); + targetLinks.sort(ascendingSourceBreadth); + } + } + } + function targetTop(source, target) { + let y2 = source.y0 - (source.sourceLinks.length - 1) * py / 2; + for (const { target: node2, width: width2 } of source.sourceLinks) { + if (node2 === target) + break; + y2 += width2 + py; + } + for (const { source: node2, width: width2 } of target.targetLinks) { + if (node2 === source) + break; + y2 -= width2; + } + return y2; + } + function sourceTop(source, target) { + let y2 = target.y0 - (target.targetLinks.length - 1) * py / 2; + for (const { source: node2, width: width2 } of target.targetLinks) { + if (node2 === source) + break; + y2 += width2 + py; + } + for (const { target: node2, width: width2 } of source.sourceLinks) { + if (node2 === target) + break; + y2 -= width2; + } + return y2; + } + return sankey2; + } + var pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon; + function Path() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; + this._ = ""; + } + function path() { + return new Path(); + } + Path.prototype = path.prototype = { + constructor: Path, + moveTo: function(x2, y2) { + this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x2, y2) { + this._ += "L" + (this._x1 = +x2) + "," + (this._y1 = +y2); + }, + quadraticCurveTo: function(x1, y1, x2, y2) { + this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x2) + "," + (this._y1 = +y2); + }, + bezierCurveTo: function(x1, y1, x2, y2, x3, y3) { + this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x3) + "," + (this._y1 = +y3); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } else if (!(l01_2 > epsilon)) + ; + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } else { + var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21; + if (Math.abs(t01 - 1) > epsilon) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); + } + this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x2, y2, r, a0, a1, ccw) { + x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw; + var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._ += "L" + x0 + "," + y0; + } + if (!r) + return; + if (da < 0) + da = da % tau + tau; + if (da > tauEpsilon) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x2 - dx) + "," + (y2 - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } else if (da > epsilon) { + this._ += "A" + r + "," + r + ",0," + +(da >= pi) + "," + cw + "," + (this._x1 = x2 + r * Math.cos(a1)) + "," + (this._y1 = y2 + r * Math.sin(a1)); + } + }, + rect: function(x2, y2, w2, h) { + this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2) + "h" + +w2 + "v" + +h + "h" + -w2 + "Z"; + }, + toString: function() { + return this._; + } + }; + function constant(x2) { + return function constant2() { + return x2; + }; + } + function x(p) { + return p[0]; + } + function y(p) { + return p[1]; + } + var slice = Array.prototype.slice; + function linkSource(d) { + return d.source; + } + function linkTarget(d) { + return d.target; + } + function link(curve) { + var source = linkSource, target = linkTarget, x$12 = x, y$12 = y, context = null; + function link2() { + var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); + if (!context) + context = buffer = path(); + curve(context, +x$12.apply(this, (argv[0] = s, argv)), +y$12.apply(this, argv), +x$12.apply(this, (argv[0] = t, argv)), +y$12.apply(this, argv)); + if (buffer) + return context = null, buffer + "" || null; + } + link2.source = function(_2) { + return arguments.length ? (source = _2, link2) : source; + }; + link2.target = function(_2) { + return arguments.length ? (target = _2, link2) : target; + }; + link2.x = function(_2) { + return arguments.length ? (x$12 = typeof _2 === "function" ? _2 : constant(+_2), link2) : x$12; + }; + link2.y = function(_2) { + return arguments.length ? (y$12 = typeof _2 === "function" ? _2 : constant(+_2), link2) : y$12; + }; + link2.context = function(_2) { + return arguments.length ? (context = _2 == null ? null : _2, link2) : context; + }; + return link2; + } + function curveHorizontal(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); + } + function linkHorizontal() { + return link(curveHorizontal); + } + function horizontalSource(d) { + return [d.source.x1, d.y0]; + } + function horizontalTarget(d) { + return [d.target.x0, d.y1]; + } + function d3SankeyLinkHorizontal() { + return linkHorizontal().source(horizontalSource).target(horizontalTarget); + } + const _Uid = class { + static next(name2) { + return new _Uid(name2 + ++_Uid.count); + } + constructor(id2) { + this.id = id2; + this.href = `#${id2}`; + } + toString() { + return "url(" + this.href + ")"; + } + }; + let Uid = _Uid; + Uid.count = 0; + const alignmentsMap = { + left, + right, + center, + justify + }; + const draw = function(text2, id2, _version, diagObj) { + const { securityLevel, sankey: conf2 } = getConfig$2(); + const defaultSankeyConfig = defaultConfig.sankey; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id2); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg2 = securityLevel === "sandbox" ? root2.select(`[id="${id2}"]`) : d3select(`[id="${id2}"]`); + const width2 = (conf2 == null ? void 0 : conf2.width) ?? defaultSankeyConfig.width; + const height = (conf2 == null ? void 0 : conf2.height) ?? defaultSankeyConfig.width; + const useMaxWidth = (conf2 == null ? void 0 : conf2.useMaxWidth) ?? defaultSankeyConfig.useMaxWidth; + const nodeAlignment = (conf2 == null ? void 0 : conf2.nodeAlignment) ?? defaultSankeyConfig.nodeAlignment; + const prefix = (conf2 == null ? void 0 : conf2.prefix) ?? defaultSankeyConfig.prefix; + const suffix = (conf2 == null ? void 0 : conf2.suffix) ?? defaultSankeyConfig.suffix; + const showValues = (conf2 == null ? void 0 : conf2.showValues) ?? defaultSankeyConfig.showValues; + configureSvgSize(svg2, height, width2, useMaxWidth); + const graph = diagObj.db.getGraph(); + const nodeAlign = alignmentsMap[nodeAlignment]; + const nodeWidth = 10; + const sankey2 = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([ + [0, 0], + [width2, height] + ]); + sankey2(graph); + const colorScheme = ordinal(d3schemeTableau10); + svg2.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) { + return "translate(" + d.x0 + "," + d.y0 + ")"; + }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => { + return d.y1 - d.y0; + }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id)); + const getText = ({ id: id22, value: value2 }) => { + if (!showValues) { + return id22; + } + return `${id22} +${prefix}${Math.round(value2 * 100) / 100}${suffix}`; + }; + svg2.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width2 / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width2 / 2 ? "start" : "end").text(getText); + const link2 = svg2.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"); + const linkColor = (conf2 == null ? void 0 : conf2.linkColor) || "gradient"; + if (linkColor === "gradient") { + const gradient = link2.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0); + gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id)); + gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id)); + } + let coloring; + switch (linkColor) { + case "gradient": + coloring = (d) => d.uid; + break; + case "source": + coloring = (d) => colorScheme(d.source.id); + break; + case "target": + coloring = (d) => colorScheme(d.target.id); + break; + default: + coloring = linkColor; + } + link2.append("path").attr("d", d3SankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width)); + }; + const renderer = { + draw + }; + const prepareTextForParsing = (text2) => { + const textToParse = text2.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(); + return textToParse; + }; + const originalParse = parser$1.parse.bind(parser$1); + parser$1.parse = (text2) => originalParse(prepareTextForParsing(text2)); + const diagram = { + parser: parser$1, + db, + renderer + }; + const sankeyDiagram = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + diagram + }, Symbol.toStringTag, { value: "Module" })); + return mermaid; +}); diff --git a/webroot/js/node_modules/mermaid/dist/mermaid.min.js b/webroot/js/node_modules/mermaid/dist/mermaid.min.js new file mode 100644 index 0000000..a7560b0 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid.min.js @@ -0,0 +1,1641 @@ +(function(wA,d0){typeof exports=="object"&&typeof module<"u"?module.exports=d0():typeof define=="function"&&define.amd?define(d0):(wA=typeof globalThis<"u"?globalThis:wA||self,wA.mermaid=d0())})(this,function(){"use strict";function wA(i){for(var a=[],f=1;f=Ot?nt:""+Array(Ot+1-qt.length).join(Nt)+nt},mt={s:bt,z:function(nt){var Ot=-nt.utcOffset(),Nt=Math.abs(Ot),qt=Math.floor(Nt/60),Ct=Nt%60;return(Ot<=0?"+":"-")+bt(qt,2,"0")+":"+bt(Ct,2,"0")},m:function nt(Ot,Nt){if(Ot.date()1)return nt(Tt[0])}else{var Ht=Ot.name;dt[Ht]=Ot,Ct=Ht}return!qt&&Ct&&(yt=Ct),Ct||!qt&&yt},X=function(nt,Ot){if(ht(nt))return nt.clone();var Nt=typeof Ot=="object"?Ot:{};return Nt.date=nt,Nt.args=arguments,new U(Nt)},pt=mt;pt.l=wt,pt.i=ht,pt.w=function(nt,Ot){return X(nt,{locale:Ot.$L,utc:Ot.$u,x:Ot.$x,$offset:Ot.$offset})};var U=function(){function nt(Nt){this.$L=wt(Nt.locale,null,!0),this.parse(Nt)}var Ot=nt.prototype;return Ot.parse=function(Nt){this.$d=function(qt){var Ct=qt.date,Z=qt.utc;if(Ct===null)return new Date(NaN);if(pt.u(Ct))return new Date;if(Ct instanceof Date)return new Date(Ct);if(typeof Ct=="string"&&!/Z$/i.test(Ct)){var Tt=Ct.match(it);if(Tt){var Ht=Tt[2]-1||0,It=(Tt[7]||"0").substring(0,3);return Z?new Date(Date.UTC(Tt[1],Ht,Tt[3]||1,Tt[4]||0,Tt[5]||0,Tt[6]||0,It)):new Date(Tt[1],Ht,Tt[3]||1,Tt[4]||0,Tt[5]||0,Tt[6]||0,It)}}return new Date(Ct)}(Nt),this.$x=Nt.x||{},this.init()},Ot.init=function(){var Nt=this.$d;this.$y=Nt.getFullYear(),this.$M=Nt.getMonth(),this.$D=Nt.getDate(),this.$W=Nt.getDay(),this.$H=Nt.getHours(),this.$m=Nt.getMinutes(),this.$s=Nt.getSeconds(),this.$ms=Nt.getMilliseconds()},Ot.$utils=function(){return pt},Ot.isValid=function(){return this.$d.toString()!==K},Ot.isSame=function(Nt,qt){var Ct=X(Nt);return this.startOf(qt)<=Ct&&Ct<=this.endOf(qt)},Ot.isAfter=function(Nt,qt){return X(Nt){},debug:(...i)=>{},info:(...i)=>{},warn:(...i)=>{},error:(...i)=>{},fatal:(...i)=>{}},jft=function(i="fatal"){let a=d5.fatal;typeof i=="string"?(i=i.toLowerCase(),i in d5&&(a=d5[i])):typeof i=="number"&&(a=i),Ut.trace=()=>{},Ut.debug=()=>{},Ut.info=()=>{},Ut.warn=()=>{},Ut.error=()=>{},Ut.fatal=()=>{},a<=d5.fatal&&(Ut.fatal=console.error?console.error.bind(console,W2("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",W2("FATAL"))),a<=d5.error&&(Ut.error=console.error?console.error.bind(console,W2("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",W2("ERROR"))),a<=d5.warn&&(Ut.warn=console.warn?console.warn.bind(console,W2("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",W2("WARN"))),a<=d5.info&&(Ut.info=console.info?console.info.bind(console,W2("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",W2("INFO"))),a<=d5.debug&&(Ut.debug=console.debug?console.debug.bind(console,W2("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",W2("DEBUG"))),a<=d5.trace&&(Ut.trace=console.debug?console.debug.bind(console,W2("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",W2("TRACE")))},W2=i=>`%c${g0().format("ss.SSS")} : ${i} : `;var $ft={};Object.defineProperty($ft,"__esModule",{value:!0});var Q6=$ft.sanitizeUrl=void 0,V5e=/^([^\w]*)(javascript|data|vbscript)/im,U5e=/&#(\w+)(^\w|;)?/g,W5e=/&(newline|tab);/gi,K5e=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Y5e=/^.+(:|:)/gim,X5e=[".","/"];function Q5e(i){return X5e.indexOf(i[0])>-1}function Z5e(i){return i.replace(U5e,function(a,f){return String.fromCharCode(f)})}function J5e(i){var a=Z5e(i||"").replace(W5e,"").replace(K5e,"").trim();if(!a)return"about:blank";if(Q5e(a))return a;var f=a.match(Y5e);if(!f)return a;var p=f[0];return V5e.test(p)?"about:blank":a}Q6=$ft.sanitizeUrl=J5e;function fU(i,a){return i==null||a==null?NaN:ia?1:i>=a?0:NaN}function txe(i,a){return i==null||a==null?NaN:ai?1:a>=i?0:NaN}function zft(i){let a,f,p;i.length!==2?(a=fU,f=(E,_)=>fU(i(E),_),p=(E,_)=>i(E)-_):(a=i===fU||i===txe?i:exe,f=i,p=i);function v(E,_,L=0,N=E.length){if(L>>1;f(E[B],_)<0?L=B+1:N=B}while(L>>1;f(E[B],_)<=0?L=B+1:N=B}while(LL&&p(E[B-1],_)>-p(E[B],_)?B-1:B}return{left:v,center:b,right:m}}function exe(){return 0}function nxe(i){return i===null?NaN:+i}const rxe=zft(fU).right;zft(nxe).center;const ixe=rxe;class DLt extends Map{constructor(a,f=oxe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:f}}),a!=null)for(const[p,v]of a)this.set(p,v)}get(a){return super.get(OLt(this,a))}has(a){return super.has(OLt(this,a))}set(a,f){return super.set(sxe(this,a),f)}delete(a){return super.delete(axe(this,a))}}function OLt({_intern:i,_key:a},f){const p=a(f);return i.has(p)?i.get(p):f}function sxe({_intern:i,_key:a},f){const p=a(f);return i.has(p)?i.get(p):(i.set(p,f),f)}function axe({_intern:i,_key:a},f){const p=a(f);return i.has(p)&&(f=i.get(p),i.delete(p)),f}function oxe(i){return i!==null&&typeof i=="object"?i.valueOf():i}var qft=Math.sqrt(50),Hft=Math.sqrt(10),Gft=Math.sqrt(2);function cxe(i,a,f){var p,v=-1,m,b,E;if(a=+a,i=+i,f=+f,i===a&&f>0)return[i];if((p=a0){let _=Math.round(i/E),L=Math.round(a/E);for(_*Ea&&--L,b=new Array(m=L-_+1);++va&&--L,b=new Array(m=L-_+1);++v=0?(m>=qft?10:m>=Hft?5:m>=Gft?2:1)*Math.pow(10,v):-Math.pow(10,-v)/(m>=qft?10:m>=Hft?5:m>=Gft?2:1)}function Vft(i,a,f){var p=Math.abs(a-i)/Math.max(0,f),v=Math.pow(10,Math.floor(Math.log(p)/Math.LN10)),m=p/v;return m>=qft?v*=10:m>=Hft?v*=5:m>=Gft&&(v*=2),a=p)&&(f=p);else{let p=-1;for(let v of i)(v=a(v,++p,i))!=null&&(f=v)&&(f=v)}return f}function lxe(i,a){let f;if(a===void 0)for(const p of i)p!=null&&(f>p||f===void 0&&p>=p)&&(f=p);else{let p=-1;for(let v of i)(v=a(v,++p,i))!=null&&(f>v||f===void 0&&v>=v)&&(f=v)}return f}function hxe(i){return i}var dU=1,Uft=2,Wft=3,gU=4,PLt=1e-6;function fxe(i){return"translate("+i+",0)"}function dxe(i){return"translate(0,"+i+")"}function gxe(i){return a=>+i(a)}function pxe(i,a){return a=Math.max(0,i.bandwidth()-a*2)/2,i.round()&&(a=Math.round(a)),f=>+i(f)+a}function bxe(){return!this.__axis}function FLt(i,a){var f=[],p=null,v=null,m=6,b=6,E=3,_=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=i===dU||i===gU?-1:1,N=i===gU||i===Uft?"x":"y",B=i===dU||i===Wft?fxe:dxe;function j(R){var z=p??(a.ticks?a.ticks.apply(a,f):a.domain()),K=v??(a.tickFormat?a.tickFormat.apply(a,f):hxe),it=Math.max(m,0)+E,st=a.range(),ut=+st[0]+_,bt=+st[st.length-1]+_,mt=(a.bandwidth?pxe:gxe)(a.copy(),_),yt=R.selection?R.selection():R,dt=yt.selectAll(".domain").data([null]),ht=yt.selectAll(".tick").data(z,a).order(),wt=ht.exit(),X=ht.enter().append("g").attr("class","tick"),pt=ht.select("line"),U=ht.select("text");dt=dt.merge(dt.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),ht=ht.merge(X),pt=pt.merge(X.append("line").attr("stroke","currentColor").attr(N+"2",L*m)),U=U.merge(X.append("text").attr("fill","currentColor").attr(N,L*it).attr("dy",i===dU?"0em":i===Wft?"0.71em":"0.32em")),R!==yt&&(dt=dt.transition(R),ht=ht.transition(R),pt=pt.transition(R),U=U.transition(R),wt=wt.transition(R).attr("opacity",PLt).attr("transform",function(xt){return isFinite(xt=mt(xt))?B(xt+_):this.getAttribute("transform")}),X.attr("opacity",PLt).attr("transform",function(xt){var nt=this.parentNode.__axis;return B((nt&&isFinite(nt=nt(xt))?nt:mt(xt))+_)})),wt.remove(),dt.attr("d",i===gU||i===Uft?b?"M"+L*b+","+ut+"H"+_+"V"+bt+"H"+L*b:"M"+_+","+ut+"V"+bt:b?"M"+ut+","+L*b+"V"+_+"H"+bt+"V"+L*b:"M"+ut+","+_+"H"+bt),ht.attr("opacity",1).attr("transform",function(xt){return B(mt(xt)+_)}),pt.attr(N+"2",L*m),U.attr(N,L*it).text(K),yt.filter(bxe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",i===Uft?"start":i===gU?"end":"middle"),yt.each(function(){this.__axis=mt})}return j.scale=function(R){return arguments.length?(a=R,j):a},j.ticks=function(){return f=Array.from(arguments),j},j.tickArguments=function(R){return arguments.length?(f=R==null?[]:Array.from(R),j):f.slice()},j.tickValues=function(R){return arguments.length?(p=R==null?null:Array.from(R),j):p&&p.slice()},j.tickFormat=function(R){return arguments.length?(v=R,j):v},j.tickSize=function(R){return arguments.length?(m=b=+R,j):m},j.tickSizeInner=function(R){return arguments.length?(m=+R,j):m},j.tickSizeOuter=function(R){return arguments.length?(b=+R,j):b},j.tickPadding=function(R){return arguments.length?(E=+R,j):E},j.offset=function(R){return arguments.length?(_=+R,j):_},j}function vxe(i){return FLt(dU,i)}function wxe(i){return FLt(Wft,i)}var mxe={value:()=>{}};function BLt(){for(var i=0,a=arguments.length,f={},p;i=0&&(p=f.slice(v+1),f=f.slice(0,v)),f&&!a.hasOwnProperty(f))throw new Error("unknown type: "+f);return{type:f,name:p}})}pU.prototype=BLt.prototype={constructor:pU,on:function(i,a){var f=this._,p=yxe(i+"",f),v,m=-1,b=p.length;if(arguments.length<2){for(;++m0)for(var f=new Array(v),p=0,v,m;p=0&&(a=i.slice(0,f))!=="xmlns"&&(i=i.slice(f+1)),jLt.hasOwnProperty(a)?{space:jLt[a],local:i}:i}function kxe(i){return function(){var a=this.ownerDocument,f=this.namespaceURI;return f===Kft&&a.documentElement.namespaceURI===Kft?a.createElement(i):a.createElementNS(f,i)}}function Exe(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function $Lt(i){var a=bU(i);return(a.local?Exe:kxe)(a)}function Txe(){}function Yft(i){return i==null?Txe:function(){return this.querySelector(i)}}function Cxe(i){typeof i!="function"&&(i=Yft(i));for(var a=this._groups,f=a.length,p=new Array(f),v=0;v=bt&&(bt=ut+1);!(yt=it[bt])&&++bt=0;)(b=p[v])&&(m&&b.compareDocumentPosition(m)^4&&m.parentNode.insertBefore(b,m),m=b);return this}function Yxe(i){i||(i=Xxe);function a(B,j){return B&&j?i(B.__data__,j.__data__):!B-!j}for(var f=this._groups,p=f.length,v=new Array(p),m=0;ma?1:i>=a?0:NaN}function Qxe(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function Zxe(){return Array.from(this)}function Jxe(){for(var i=this._groups,a=0,f=i.length;a1?this.each((a==null?l6e:typeof a=="function"?f6e:h6e)(i,a,f??"")):mA(this.node(),i)}function mA(i,a){return i.style.getPropertyValue(a)||ULt(i).getComputedStyle(i,null).getPropertyValue(a)}function g6e(i){return function(){delete this[i]}}function p6e(i,a){return function(){this[i]=a}}function b6e(i,a){return function(){var f=a.apply(this,arguments);f==null?delete this[i]:this[i]=f}}function v6e(i,a){return arguments.length>1?this.each((a==null?g6e:typeof a=="function"?b6e:p6e)(i,a)):this.node()[i]}function WLt(i){return i.trim().split(/^|\s+/)}function Xft(i){return i.classList||new KLt(i)}function KLt(i){this._node=i,this._names=WLt(i.getAttribute("class")||"")}KLt.prototype={add:function(i){var a=this._names.indexOf(i);a<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var a=this._names.indexOf(i);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function YLt(i,a){for(var f=Xft(i),p=-1,v=a.length;++p=0&&(f=a.slice(p+1),a=a.slice(0,p)),{type:a,name:f}})}function V6e(i){return function(){var a=this.__on;if(a){for(var f=0,p=-1,v=a.length,m;f>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):f===8?yU(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):f===4?yU(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=tke.exec(i))?new p0(a[1],a[2],a[3],1):(a=eke.exec(i))?new p0(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=nke.exec(i))?yU(a[1],a[2],a[3],a[4]):(a=rke.exec(i))?yU(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=ike.exec(i))?aMt(a[1],a[2]/100,a[3]/100,1):(a=ske.exec(i))?aMt(a[1],a[2]/100,a[3]/100,a[4]):JLt.hasOwnProperty(i)?nMt(JLt[i]):i==="transparent"?new p0(NaN,NaN,NaN,0):null}function nMt(i){return new p0(i>>16&255,i>>8&255,i&255,1)}function yU(i,a,f,p){return p<=0&&(i=a=f=NaN),new p0(i,a,f,p)}function rMt(i){return i instanceof R7||(i=j7(i)),i?(i=i.rgb(),new p0(i.r,i.g,i.b,i.opacity)):new p0}function Zft(i,a,f,p){return arguments.length===1?rMt(i):new p0(i,a,f,p??1)}function p0(i,a,f,p){this.r=+i,this.g=+a,this.b=+f,this.opacity=+p}xN(p0,Zft,wU(R7,{brighter(i){return i=i==null?mU:Math.pow(mU,i),new p0(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?kN:Math.pow(kN,i),new p0(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new p0($7(this.r),$7(this.g),$7(this.b),xU(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:iMt,formatHex:iMt,formatHex8:cke,formatRgb:sMt,toString:sMt}));function iMt(){return`#${z7(this.r)}${z7(this.g)}${z7(this.b)}`}function cke(){return`#${z7(this.r)}${z7(this.g)}${z7(this.b)}${z7((isNaN(this.opacity)?1:this.opacity)*255)}`}function sMt(){const i=xU(this.opacity);return`${i===1?"rgb(":"rgba("}${$7(this.r)}, ${$7(this.g)}, ${$7(this.b)}${i===1?")":`, ${i})`}`}function xU(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function $7(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function z7(i){return i=$7(i),(i<16?"0":"")+i.toString(16)}function aMt(i,a,f,p){return p<=0?i=a=f=NaN:f<=0||f>=1?i=a=NaN:a<=0&&(i=NaN),new Ww(i,a,f,p)}function oMt(i){if(i instanceof Ww)return new Ww(i.h,i.s,i.l,i.opacity);if(i instanceof R7||(i=j7(i)),!i)return new Ww;if(i instanceof Ww)return i;i=i.rgb();var a=i.r/255,f=i.g/255,p=i.b/255,v=Math.min(a,f,p),m=Math.max(a,f,p),b=NaN,E=m-v,_=(m+v)/2;return E?(a===m?b=(f-p)/E+(f0&&_<1?0:b,new Ww(b,E,_,i.opacity)}function uke(i,a,f,p){return arguments.length===1?oMt(i):new Ww(i,a,f,p??1)}function Ww(i,a,f,p){this.h=+i,this.s=+a,this.l=+f,this.opacity=+p}xN(Ww,uke,wU(R7,{brighter(i){return i=i==null?mU:Math.pow(mU,i),new Ww(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?kN:Math.pow(kN,i),new Ww(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,a=isNaN(i)||isNaN(this.s)?0:this.s,f=this.l,p=f+(f<.5?f:1-f)*a,v=2*f-p;return new p0(Jft(i>=240?i-240:i+120,v,p),Jft(i,v,p),Jft(i<120?i+240:i-120,v,p),this.opacity)},clamp(){return new Ww(cMt(this.h),kU(this.s),kU(this.l),xU(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=xU(this.opacity);return`${i===1?"hsl(":"hsla("}${cMt(this.h)}, ${kU(this.s)*100}%, ${kU(this.l)*100}%${i===1?")":`, ${i})`}`}}));function cMt(i){return i=(i||0)%360,i<0?i+360:i}function kU(i){return Math.max(0,Math.min(1,i||0))}function Jft(i,a,f){return(i<60?a+(f-a)*i/60:i<180?f:i<240?a+(f-a)*(240-i)/60:a)*255}const lke=Math.PI/180,hke=180/Math.PI,EU=18,uMt=.96422,lMt=1,hMt=.82521,fMt=4/29,xA=6/29,dMt=3*xA*xA,fke=xA*xA*xA;function gMt(i){if(i instanceof a3)return new a3(i.l,i.a,i.b,i.opacity);if(i instanceof g5)return pMt(i);i instanceof p0||(i=rMt(i));var a=r1t(i.r),f=r1t(i.g),p=r1t(i.b),v=t1t((.2225045*a+.7168786*f+.0606169*p)/lMt),m,b;return a===f&&f===p?m=b=v:(m=t1t((.4360747*a+.3850649*f+.1430804*p)/uMt),b=t1t((.0139322*a+.0971045*f+.7141733*p)/hMt)),new a3(116*v-16,500*(m-v),200*(v-b),i.opacity)}function dke(i,a,f,p){return arguments.length===1?gMt(i):new a3(i,a,f,p??1)}function a3(i,a,f,p){this.l=+i,this.a=+a,this.b=+f,this.opacity=+p}xN(a3,dke,wU(R7,{brighter(i){return new a3(this.l+EU*(i??1),this.a,this.b,this.opacity)},darker(i){return new a3(this.l-EU*(i??1),this.a,this.b,this.opacity)},rgb(){var i=(this.l+16)/116,a=isNaN(this.a)?i:i+this.a/500,f=isNaN(this.b)?i:i-this.b/200;return a=uMt*e1t(a),i=lMt*e1t(i),f=hMt*e1t(f),new p0(n1t(3.1338561*a-1.6168667*i-.4906146*f),n1t(-.9787684*a+1.9161415*i+.033454*f),n1t(.0719453*a-.2289914*i+1.4052427*f),this.opacity)}}));function t1t(i){return i>fke?Math.pow(i,1/3):i/dMt+fMt}function e1t(i){return i>xA?i*i*i:dMt*(i-fMt)}function n1t(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function r1t(i){return(i/=255)<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function gke(i){if(i instanceof g5)return new g5(i.h,i.c,i.l,i.opacity);if(i instanceof a3||(i=gMt(i)),i.a===0&&i.b===0)return new g5(NaN,0()=>i;function bMt(i,a){return function(f){return i+f*a}}function pke(i,a,f){return i=Math.pow(i,f),a=Math.pow(a,f)-i,f=1/f,function(p){return Math.pow(i+p*a,f)}}function bke(i,a){var f=a-i;return f?bMt(i,f>180||f<-180?f-360*Math.round(f/360):f):TU(isNaN(i)?a:i)}function vke(i){return(i=+i)==1?TN:function(a,f){return f-a?pke(a,f,i):TU(isNaN(a)?f:a)}}function TN(i,a){var f=a-i;return f?bMt(i,f):TU(isNaN(i)?a:i)}const CU=function i(a){var f=vke(a);function p(v,m){var b=f((v=Zft(v)).r,(m=Zft(m)).r),E=f(v.g,m.g),_=f(v.b,m.b),L=TN(v.opacity,m.opacity);return function(N){return v.r=b(N),v.g=E(N),v.b=_(N),v.opacity=L(N),v+""}}return p.gamma=i,p}(1);function wke(i,a){a||(a=[]);var f=i?Math.min(a.length,i.length):0,p=a.slice(),v;return function(m){for(v=0;vf&&(m=a.slice(f,m),E[b]?E[b]+=m:E[++b]=m),(p=p[0])===(v=v[0])?E[b]?E[b]+=v:E[++b]=v:(E[++b]=null,_.push({i:b,x:Kw(p,v)})),f=a1t.lastIndex;return f180?N+=360:N-L>180&&(L+=360),j.push({i:B.push(v(B)+"rotate(",null,p)-2,x:Kw(L,N)})):N&&B.push(v(B)+"rotate("+N+p)}function E(L,N,B,j){L!==N?j.push({i:B.push(v(B)+"skewX(",null,p)-2,x:Kw(L,N)}):N&&B.push(v(B)+"skewX("+N+p)}function _(L,N,B,j,R,z){if(L!==B||N!==j){var K=R.push(v(R)+"scale(",null,",",null,")");z.push({i:K-4,x:Kw(L,B)},{i:K-2,x:Kw(N,j)})}else(B!==1||j!==1)&&R.push(v(R)+"scale("+B+","+j+")")}return function(L,N){var B=[],j=[];return L=i(L),N=i(N),m(L.translateX,L.translateY,N.translateX,N.translateY,B,j),b(L.rotate,N.rotate,B,j),E(L.skewX,N.skewX,B,j),_(L.scaleX,L.scaleY,N.scaleX,N.scaleY,B,j),L=N=null,function(R){for(var z=-1,K=j.length,it;++z=0&&i._call.call(void 0,a),i=i._next;--kA}function TMt(){q7=(AU=AN.now())+LU,kA=CN=0;try{Oke()}finally{kA=0,Pke(),q7=0}}function Nke(){var i=AN.now(),a=i-AU;a>xMt&&(LU-=a,AU=i)}function Pke(){for(var i,a=SU,f,p=1/0;a;)a._call?(p>a._time&&(p=a._time),i=a,a=a._next):(f=a._next,a._next=null,a=i?i._next=f:SU=f);SN=i,l1t(p)}function l1t(i){if(!kA){CN&&(CN=clearTimeout(CN));var a=i-q7;a>24?(i<1/0&&(CN=setTimeout(TMt,i-AN.now()-LU)),_N&&(_N=clearInterval(_N))):(_N||(AU=AN.now(),_N=setInterval(Nke,xMt)),kA=1,kMt(TMt))}}function CMt(i,a,f){var p=new MU;return a=a==null?0:+a,p.restart(v=>{p.stop(),i(v+a)},a,f),p}var Fke=BLt("start","end","cancel","interrupt"),Bke=[],_Mt=0,SMt=1,h1t=2,IU=3,AMt=4,f1t=5,DU=6;function OU(i,a,f,p,v,m){var b=i.__transition;if(!b)i.__transition={};else if(f in b)return;Rke(i,f,{name:a,index:p,group:v,on:Fke,tween:Bke,time:m.time,delay:m.delay,duration:m.duration,ease:m.ease,timer:null,state:_Mt})}function d1t(i,a){var f=Yw(i,a);if(f.state>_Mt)throw new Error("too late; already scheduled");return f}function o3(i,a){var f=Yw(i,a);if(f.state>IU)throw new Error("too late; already running");return f}function Yw(i,a){var f=i.__transition;if(!f||!(f=f[a]))throw new Error("transition not found");return f}function Rke(i,a,f){var p=i.__transition,v;p[a]=f,f.timer=EMt(m,0,f.time);function m(L){f.state=SMt,f.timer.restart(b,f.delay,f.time),f.delay<=L&&b(L-f.delay)}function b(L){var N,B,j,R;if(f.state!==SMt)return _();for(N in p)if(R=p[N],R.name===f.name){if(R.state===IU)return CMt(b);R.state===AMt?(R.state=DU,R.timer.stop(),R.on.call("interrupt",i,i.__data__,R.index,R.group),delete p[N]):+Nh1t&&p.state=0&&(a=a.slice(0,f)),!a||a==="start"})}function p8e(i,a,f){var p,v,m=g8e(a)?d1t:o3;return function(){var b=m(this,i),E=b.on;E!==p&&(v=(p=E).copy()).on(a,f),b.on=v}}function b8e(i,a){var f=this._id;return arguments.length<2?Yw(this.node(),f).on.on(i):this.each(p8e(f,i,a))}function v8e(i){return function(){var a=this.parentNode;for(var f in this.__transition)if(+f!==i)return;a&&a.removeChild(this)}}function w8e(){return this.on("end.remove",v8e(this._id))}function m8e(i){var a=this._name,f=this._id;typeof i!="function"&&(i=Yft(i));for(var p=this._groups,v=p.length,m=new Array(v),b=0;bH7)if(!(Math.abs(N*E-_*L)>H7)||!v)this._+="L"+(this._x1=i)+","+(this._y1=a);else{var j=f-m,R=p-b,z=E*E+_*_,K=j*j+R*R,it=Math.sqrt(z),st=Math.sqrt(B),ut=v*Math.tan((p1t-Math.acos((z+B-K)/(2*it*st)))/2),bt=ut/st,mt=ut/it;Math.abs(bt-1)>H7&&(this._+="L"+(i+bt*L)+","+(a+bt*N)),this._+="A"+v+","+v+",0,0,"+ +(N*j>L*R)+","+(this._x1=i+mt*E)+","+(this._y1=a+mt*_)}},arc:function(i,a,f,p,v,m){i=+i,a=+a,f=+f,m=!!m;var b=f*Math.cos(p),E=f*Math.sin(p),_=i+b,L=a+E,N=1^m,B=m?p-v:v-p;if(f<0)throw new Error("negative radius: "+f);this._x1===null?this._+="M"+_+","+L:(Math.abs(this._x1-_)>H7||Math.abs(this._y1-L)>H7)&&(this._+="L"+_+","+L),f&&(B<0&&(B=B%b1t+b1t),B>G8e?this._+="A"+f+","+f+",0,1,"+N+","+(i-b)+","+(a-E)+"A"+f+","+f+",0,1,"+N+","+(this._x1=_)+","+(this._y1=L):B>H7&&(this._+="A"+f+","+f+",0,"+ +(B>=p1t)+","+N+","+(this._x1=i+f*Math.cos(v))+","+(this._y1=a+f*Math.sin(v))))},rect:function(i,a,f,p){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+a)+"h"+ +f+"v"+ +p+"h"+-f+"Z"},toString:function(){return this._}};function V8e(i){if(!i.ok)throw new Error(i.status+" "+i.statusText);return i.text()}function U8e(i,a){return fetch(i,a).then(V8e)}function W8e(i){return(a,f)=>U8e(a,f).then(p=>new DOMParser().parseFromString(p,i))}var K8e=W8e("image/svg+xml");function Y8e(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function NU(i,a){if((f=(i=a?i.toExponential(a-1):i.toExponential()).indexOf("e"))<0)return null;var f,p=i.slice(0,f);return[p.length>1?p[0]+p.slice(2):p,+i.slice(f+1)]}function EA(i){return i=NU(Math.abs(i)),i?i[1]:NaN}function X8e(i,a){return function(f,p){for(var v=f.length,m=[],b=0,E=i[0],_=0;v>0&&E>0&&(_+E+1>p&&(E=Math.max(1,p-_)),m.push(f.substring(v-=E,v+E)),!((_+=E+1)>p));)E=i[b=(b+1)%i.length];return m.reverse().join(a)}}function Q8e(i){return function(a){return a.replace(/[0-9]/g,function(f){return i[+f]})}}var Z8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function PU(i){if(!(a=Z8e.exec(i)))throw new Error("invalid format: "+i);var a;return new m1t({fill:a[1],align:a[2],sign:a[3],symbol:a[4],zero:a[5],width:a[6],comma:a[7],precision:a[8]&&a[8].slice(1),trim:a[9],type:a[10]})}PU.prototype=m1t.prototype;function m1t(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}m1t.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function J8e(i){t:for(var a=i.length,f=1,p=-1,v;f0&&(p=0);break}return p>0?i.slice(0,p)+i.slice(v+1):i}var DMt;function tEe(i,a){var f=NU(i,a);if(!f)return i+"";var p=f[0],v=f[1],m=v-(DMt=Math.max(-8,Math.min(8,Math.floor(v/3)))*3)+1,b=p.length;return m===b?p:m>b?p+new Array(m-b+1).join("0"):m>0?p.slice(0,m)+"."+p.slice(m):"0."+new Array(1-m).join("0")+NU(i,Math.max(0,a+m-1))[0]}function OMt(i,a){var f=NU(i,a);if(!f)return i+"";var p=f[0],v=f[1];return v<0?"0."+new Array(-v).join("0")+p:p.length>v+1?p.slice(0,v+1)+"."+p.slice(v+1):p+new Array(v-p.length+2).join("0")}const NMt={"%":(i,a)=>(i*100).toFixed(a),b:i=>Math.round(i).toString(2),c:i=>i+"",d:Y8e,e:(i,a)=>i.toExponential(a),f:(i,a)=>i.toFixed(a),g:(i,a)=>i.toPrecision(a),o:i=>Math.round(i).toString(8),p:(i,a)=>OMt(i*100,a),r:OMt,s:tEe,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function PMt(i){return i}var FMt=Array.prototype.map,BMt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function eEe(i){var a=i.grouping===void 0||i.thousands===void 0?PMt:X8e(FMt.call(i.grouping,Number),i.thousands+""),f=i.currency===void 0?"":i.currency[0]+"",p=i.currency===void 0?"":i.currency[1]+"",v=i.decimal===void 0?".":i.decimal+"",m=i.numerals===void 0?PMt:Q8e(FMt.call(i.numerals,String)),b=i.percent===void 0?"%":i.percent+"",E=i.minus===void 0?"−":i.minus+"",_=i.nan===void 0?"NaN":i.nan+"";function L(B){B=PU(B);var j=B.fill,R=B.align,z=B.sign,K=B.symbol,it=B.zero,st=B.width,ut=B.comma,bt=B.precision,mt=B.trim,yt=B.type;yt==="n"?(ut=!0,yt="g"):NMt[yt]||(bt===void 0&&(bt=12),mt=!0,yt="g"),(it||j==="0"&&R==="=")&&(it=!0,j="0",R="=");var dt=K==="$"?f:K==="#"&&/[boxX]/.test(yt)?"0"+yt.toLowerCase():"",ht=K==="$"?p:/[%p]/.test(yt)?b:"",wt=NMt[yt],X=/[defgprs%]/.test(yt);bt=bt===void 0?6:/[gprs]/.test(yt)?Math.max(1,Math.min(21,bt)):Math.max(0,Math.min(20,bt));function pt(U){var xt=dt,nt=ht,Ot,Nt,qt;if(yt==="c")nt=wt(U)+nt,U="";else{U=+U;var Ct=U<0||1/U<0;if(U=isNaN(U)?_:wt(Math.abs(U),bt),mt&&(U=J8e(U)),Ct&&+U==0&&z!=="+"&&(Ct=!1),xt=(Ct?z==="("?z:E:z==="-"||z==="("?"":z)+xt,nt=(yt==="s"?BMt[8+DMt/3]:"")+nt+(Ct&&z==="("?")":""),X){for(Ot=-1,Nt=U.length;++Otqt||qt>57){nt=(qt===46?v+U.slice(Ot+1):U.slice(Ot))+nt,U=U.slice(0,Ot);break}}}ut&&!it&&(U=a(U,1/0));var Z=xt.length+U.length+nt.length,Tt=Z>1)+xt+U+nt+Tt.slice(Z);break;default:U=Tt+xt+U+nt;break}return m(U)}return pt.toString=function(){return B+""},pt}function N(B,j){var R=L((B=PU(B),B.type="f",B)),z=Math.max(-8,Math.min(8,Math.floor(EA(j)/3)))*3,K=Math.pow(10,-z),it=BMt[8+z/3];return function(st){return R(K*st)+it}}return{format:L,formatPrefix:N}}var FU,RMt,jMt;nEe({thousands:",",grouping:[3],currency:["$",""]});function nEe(i){return FU=eEe(i),RMt=FU.format,jMt=FU.formatPrefix,FU}function rEe(i){return Math.max(0,-EA(Math.abs(i)))}function iEe(i,a){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(EA(a)/3)))*3-EA(Math.abs(i)))}function sEe(i,a){return i=Math.abs(i),a=Math.abs(a)-i,Math.max(0,EA(a)-EA(i))+1}function y1t(i,a){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(a).domain(i);break}return this}const $Mt=Symbol("implicit");function x1t(){var i=new DLt,a=[],f=[],p=$Mt;function v(m){let b=i.get(m);if(b===void 0){if(p!==$Mt)return p;i.set(m,b=a.push(m)-1)}return f[b%f.length]}return v.domain=function(m){if(!arguments.length)return a.slice();a=[],i=new DLt;for(const b of m)i.has(b)||i.set(b,a.push(b)-1);return v},v.range=function(m){return arguments.length?(f=Array.from(m),v):f.slice()},v.unknown=function(m){return arguments.length?(p=m,v):p},v.copy=function(){return x1t(a,f).unknown(p)},y1t.apply(v,arguments),v}function aEe(i){return function(){return i}}function oEe(i){return+i}var zMt=[0,1];function TA(i){return i}function k1t(i,a){return(a-=i=+i)?function(f){return(f-i)/a}:aEe(isNaN(a)?NaN:.5)}function cEe(i,a){var f;return i>a&&(f=i,i=a,a=f),function(p){return Math.max(i,Math.min(a,p))}}function uEe(i,a,f){var p=i[0],v=i[1],m=a[0],b=a[1];return v2?lEe:uEe,_=L=null,B}function B(j){return j==null||isNaN(j=+j)?m:(_||(_=E(i.map(p),a,f)))(p(b(j)))}return B.invert=function(j){return b(v((L||(L=E(a,i.map(p),Kw)))(j)))},B.domain=function(j){return arguments.length?(i=Array.from(j,oEe),N()):i.slice()},B.range=function(j){return arguments.length?(a=Array.from(j),N()):a.slice()},B.rangeRound=function(j){return a=Array.from(j),f=Cke,N()},B.clamp=function(j){return arguments.length?(b=j?!0:TA,N()):b!==TA},B.interpolate=function(j){return arguments.length?(f=j,N()):f},B.unknown=function(j){return arguments.length?(m=j,B):m},function(j,R){return p=j,v=R,N()}}function HMt(){return hEe()(TA,TA)}function fEe(i,a,f,p){var v=Vft(i,a,f),m;switch(p=PU(p??",f"),p.type){case"s":{var b=Math.max(Math.abs(i),Math.abs(a));return p.precision==null&&!isNaN(m=iEe(v,b))&&(p.precision=m),jMt(p,b)}case"":case"e":case"g":case"p":case"r":{p.precision==null&&!isNaN(m=sEe(v,Math.max(Math.abs(i),Math.abs(a))))&&(p.precision=m-(p.type==="e"));break}case"f":case"%":{p.precision==null&&!isNaN(m=rEe(v))&&(p.precision=m-(p.type==="%")*2);break}}return RMt(p)}function dEe(i){var a=i.domain;return i.ticks=function(f){var p=a();return cxe(p[0],p[p.length-1],f??10)},i.tickFormat=function(f,p){var v=a();return fEe(v[0],v[v.length-1],f??10,p)},i.nice=function(f){f==null&&(f=10);var p=a(),v=0,m=p.length-1,b=p[v],E=p[m],_,L,N=10;for(E0;){if(L=NLt(b,E,f),L===_)return p[v]=b,p[m]=E,a(p);if(L>0)b=Math.floor(b/L)*L,E=Math.ceil(E/L)*L;else if(L<0)b=Math.ceil(b*L)/L,E=Math.floor(E*L)/L;else break;_=L}return i},i}function BU(){var i=HMt();return i.copy=function(){return qMt(i,BU())},y1t.apply(i,arguments),dEe(i)}function gEe(i,a){i=i.slice();var f=0,p=i.length-1,v=i[f],m=i[p],b;return m0))return _;do _.push(L=new Date(+m)),a(m,E),i(m);while(L=b)for(;i(b),!m(b);)b.setTime(b-1)},function(b,E){if(b>=b)if(E<0)for(;++E<=0;)for(;a(b,-1),!m(b););else for(;--E>=0;)for(;a(b,1),!m(b););})},f&&(v.count=function(m,b){return E1t.setTime(+m),T1t.setTime(+b),i(E1t),i(T1t),Math.floor(f(E1t,T1t))},v.every=function(m){return m=Math.floor(m),!isFinite(m)||!(m>0)?null:m>1?v.filter(p?function(b){return p(b)%m===0}:function(b){return v.count(0,b)%m===0}):v}),v}var RU=rg(function(){},function(i,a){i.setTime(+i+a)},function(i,a){return a-i});RU.every=function(i){return i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?rg(function(a){a.setTime(Math.floor(a/i)*i)},function(a,f){a.setTime(+a+f*i)},function(a,f){return(f-a)/i}):RU};const C1t=RU;RU.range;const v5=1e3,c3=v5*60,G7=c3*60,V7=G7*24,_1t=V7*7,GMt=V7*30,S1t=V7*365;var VMt=rg(function(i){i.setTime(i-i.getMilliseconds())},function(i,a){i.setTime(+i+a*v5)},function(i,a){return(a-i)/v5},function(i){return i.getUTCSeconds()});const U7=VMt;VMt.range;var UMt=rg(function(i){i.setTime(i-i.getMilliseconds()-i.getSeconds()*v5)},function(i,a){i.setTime(+i+a*c3)},function(i,a){return(a-i)/c3},function(i){return i.getMinutes()});const jU=UMt;UMt.range;var WMt=rg(function(i){i.setTime(i-i.getMilliseconds()-i.getSeconds()*v5-i.getMinutes()*c3)},function(i,a){i.setTime(+i+a*G7)},function(i,a){return(a-i)/G7},function(i){return i.getHours()});const $U=WMt;WMt.range;var KMt=rg(i=>i.setHours(0,0,0,0),(i,a)=>i.setDate(i.getDate()+a),(i,a)=>(a-i-(a.getTimezoneOffset()-i.getTimezoneOffset())*c3)/V7,i=>i.getDate()-1);const CA=KMt;KMt.range;function W7(i){return rg(function(a){a.setDate(a.getDate()-(a.getDay()+7-i)%7),a.setHours(0,0,0,0)},function(a,f){a.setDate(a.getDate()+f*7)},function(a,f){return(f-a-(f.getTimezoneOffset()-a.getTimezoneOffset())*c3)/_1t})}var LN=W7(0),MN=W7(1),YMt=W7(2),XMt=W7(3),K7=W7(4),QMt=W7(5),ZMt=W7(6);LN.range,MN.range,YMt.range,XMt.range,K7.range,QMt.range,ZMt.range;var JMt=rg(function(i){i.setDate(1),i.setHours(0,0,0,0)},function(i,a){i.setMonth(i.getMonth()+a)},function(i,a){return a.getMonth()-i.getMonth()+(a.getFullYear()-i.getFullYear())*12},function(i){return i.getMonth()});const zU=JMt;JMt.range;var A1t=rg(function(i){i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,a){i.setFullYear(i.getFullYear()+a)},function(i,a){return a.getFullYear()-i.getFullYear()},function(i){return i.getFullYear()});A1t.every=function(i){return!isFinite(i=Math.floor(i))||!(i>0)?null:rg(function(a){a.setFullYear(Math.floor(a.getFullYear()/i)*i),a.setMonth(0,1),a.setHours(0,0,0,0)},function(a,f){a.setFullYear(a.getFullYear()+f*i)})};const Y7=A1t;A1t.range;var tIt=rg(function(i){i.setUTCHours(0,0,0,0)},function(i,a){i.setUTCDate(i.getUTCDate()+a)},function(i,a){return(a-i)/V7},function(i){return i.getUTCDate()-1});const eIt=tIt;tIt.range;function X7(i){return rg(function(a){a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+7-i)%7),a.setUTCHours(0,0,0,0)},function(a,f){a.setUTCDate(a.getUTCDate()+f*7)},function(a,f){return(f-a)/_1t})}var nIt=X7(0),qU=X7(1),pEe=X7(2),bEe=X7(3),_A=X7(4),vEe=X7(5),wEe=X7(6);nIt.range,qU.range,pEe.range,bEe.range,_A.range,vEe.range,wEe.range;var L1t=rg(function(i){i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,a){i.setUTCFullYear(i.getUTCFullYear()+a)},function(i,a){return a.getUTCFullYear()-i.getUTCFullYear()},function(i){return i.getUTCFullYear()});L1t.every=function(i){return!isFinite(i=Math.floor(i))||!(i>0)?null:rg(function(a){a.setUTCFullYear(Math.floor(a.getUTCFullYear()/i)*i),a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},function(a,f){a.setUTCFullYear(a.getUTCFullYear()+f*i)})};const IN=L1t;L1t.range;function mEe(i,a,f,p,v,m){const b=[[U7,1,v5],[U7,5,5*v5],[U7,15,15*v5],[U7,30,30*v5],[m,1,c3],[m,5,5*c3],[m,15,15*c3],[m,30,30*c3],[v,1,G7],[v,3,3*G7],[v,6,6*G7],[v,12,12*G7],[p,1,V7],[p,2,2*V7],[f,1,_1t],[a,1,GMt],[a,3,3*GMt],[i,1,S1t]];function E(L,N,B){const j=Nit).right(b,j);if(R===b.length)return i.every(Vft(L/S1t,N/S1t,B));if(R===0)return C1t.every(Math.max(Vft(L,N,B),1));const[z,K]=b[j/b[R-1][2]53)return null;"w"in re||(re.w=1),"Z"in re?(Oe=I1t(DN(re.y,0,1)),oe=Oe.getUTCDay(),Oe=oe>4||oe===0?qU.ceil(Oe):qU(Oe),Oe=eIt.offset(Oe,(re.V-1)*7),re.y=Oe.getUTCFullYear(),re.m=Oe.getUTCMonth(),re.d=Oe.getUTCDate()+(re.w+6)%7):(Oe=M1t(DN(re.y,0,1)),oe=Oe.getDay(),Oe=oe>4||oe===0?MN.ceil(Oe):MN(Oe),Oe=CA.offset(Oe,(re.V-1)*7),re.y=Oe.getFullYear(),re.m=Oe.getMonth(),re.d=Oe.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),oe="Z"in re?I1t(DN(re.y,0,1)).getUTCDay():M1t(DN(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(oe+5)%7:re.w+re.U*7-(oe+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,I1t(re)):M1t(re)}}function wt(we,_e,$t,re){for(var ie=0,Oe=_e.length,oe=$t.length,Ne,me;ie=oe)return-1;if(Ne=_e.charCodeAt(ie++),Ne===37){if(Ne=_e.charAt(ie++),me=yt[Ne in rIt?_e.charAt(ie++):Ne],!me||(re=me(we,$t,re))<0)return-1}else if(Ne!=$t.charCodeAt(re++))return-1}return re}function X(we,_e,$t){var re=L.exec(_e.slice($t));return re?(we.p=N.get(re[0].toLowerCase()),$t+re[0].length):-1}function pt(we,_e,$t){var re=R.exec(_e.slice($t));return re?(we.w=z.get(re[0].toLowerCase()),$t+re[0].length):-1}function U(we,_e,$t){var re=B.exec(_e.slice($t));return re?(we.w=j.get(re[0].toLowerCase()),$t+re[0].length):-1}function xt(we,_e,$t){var re=st.exec(_e.slice($t));return re?(we.m=ut.get(re[0].toLowerCase()),$t+re[0].length):-1}function nt(we,_e,$t){var re=K.exec(_e.slice($t));return re?(we.m=it.get(re[0].toLowerCase()),$t+re[0].length):-1}function Ot(we,_e,$t){return wt(we,a,_e,$t)}function Nt(we,_e,$t){return wt(we,f,_e,$t)}function qt(we,_e,$t){return wt(we,p,_e,$t)}function Ct(we){return b[we.getDay()]}function Z(we){return m[we.getDay()]}function Tt(we){return _[we.getMonth()]}function Ht(we){return E[we.getMonth()]}function It(we){return v[+(we.getHours()>=12)]}function Ft(we){return 1+~~(we.getMonth()/3)}function ke(we){return b[we.getUTCDay()]}function pn(we){return m[we.getUTCDay()]}function Me(we){return _[we.getUTCMonth()]}function ve(we){return E[we.getUTCMonth()]}function Ge(we){return v[+(we.getUTCHours()>=12)]}function Ke(we){return 1+~~(we.getUTCMonth()/3)}return{format:function(we){var _e=dt(we+="",bt);return _e.toString=function(){return we},_e},parse:function(we){var _e=ht(we+="",!1);return _e.toString=function(){return we},_e},utcFormat:function(we){var _e=dt(we+="",mt);return _e.toString=function(){return we},_e},utcParse:function(we){var _e=ht(we+="",!0);return _e.toString=function(){return we},_e}}}var rIt={"-":"",_:" ",0:"0"},K1=/^\s*\d+/,EEe=/^%/,TEe=/[\\^$*+?|[\]().{}]/g;function Dc(i,a,f){var p=i<0?"-":"",v=(p?-i:i)+"",m=v.length;return p+(m[a.toLowerCase(),f]))}function _Ee(i,a,f){var p=K1.exec(a.slice(f,f+1));return p?(i.w=+p[0],f+p[0].length):-1}function SEe(i,a,f){var p=K1.exec(a.slice(f,f+1));return p?(i.u=+p[0],f+p[0].length):-1}function AEe(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.U=+p[0],f+p[0].length):-1}function LEe(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.V=+p[0],f+p[0].length):-1}function MEe(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.W=+p[0],f+p[0].length):-1}function iIt(i,a,f){var p=K1.exec(a.slice(f,f+4));return p?(i.y=+p[0],f+p[0].length):-1}function sIt(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.y=+p[0]+(+p[0]>68?1900:2e3),f+p[0].length):-1}function IEe(i,a,f){var p=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(a.slice(f,f+6));return p?(i.Z=p[1]?0:-(p[2]+(p[3]||"00")),f+p[0].length):-1}function DEe(i,a,f){var p=K1.exec(a.slice(f,f+1));return p?(i.q=p[0]*3-3,f+p[0].length):-1}function OEe(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.m=p[0]-1,f+p[0].length):-1}function aIt(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.d=+p[0],f+p[0].length):-1}function NEe(i,a,f){var p=K1.exec(a.slice(f,f+3));return p?(i.m=0,i.d=+p[0],f+p[0].length):-1}function oIt(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.H=+p[0],f+p[0].length):-1}function PEe(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.M=+p[0],f+p[0].length):-1}function FEe(i,a,f){var p=K1.exec(a.slice(f,f+2));return p?(i.S=+p[0],f+p[0].length):-1}function BEe(i,a,f){var p=K1.exec(a.slice(f,f+3));return p?(i.L=+p[0],f+p[0].length):-1}function REe(i,a,f){var p=K1.exec(a.slice(f,f+6));return p?(i.L=Math.floor(p[0]/1e3),f+p[0].length):-1}function jEe(i,a,f){var p=EEe.exec(a.slice(f,f+1));return p?f+p[0].length:-1}function $Ee(i,a,f){var p=K1.exec(a.slice(f));return p?(i.Q=+p[0],f+p[0].length):-1}function zEe(i,a,f){var p=K1.exec(a.slice(f));return p?(i.s=+p[0],f+p[0].length):-1}function cIt(i,a){return Dc(i.getDate(),a,2)}function qEe(i,a){return Dc(i.getHours(),a,2)}function HEe(i,a){return Dc(i.getHours()%12||12,a,2)}function GEe(i,a){return Dc(1+CA.count(Y7(i),i),a,3)}function uIt(i,a){return Dc(i.getMilliseconds(),a,3)}function VEe(i,a){return uIt(i,a)+"000"}function UEe(i,a){return Dc(i.getMonth()+1,a,2)}function WEe(i,a){return Dc(i.getMinutes(),a,2)}function KEe(i,a){return Dc(i.getSeconds(),a,2)}function YEe(i){var a=i.getDay();return a===0?7:a}function XEe(i,a){return Dc(LN.count(Y7(i)-1,i),a,2)}function lIt(i){var a=i.getDay();return a>=4||a===0?K7(i):K7.ceil(i)}function QEe(i,a){return i=lIt(i),Dc(K7.count(Y7(i),i)+(Y7(i).getDay()===4),a,2)}function ZEe(i){return i.getDay()}function JEe(i,a){return Dc(MN.count(Y7(i)-1,i),a,2)}function t7e(i,a){return Dc(i.getFullYear()%100,a,2)}function e7e(i,a){return i=lIt(i),Dc(i.getFullYear()%100,a,2)}function n7e(i,a){return Dc(i.getFullYear()%1e4,a,4)}function r7e(i,a){var f=i.getDay();return i=f>=4||f===0?K7(i):K7.ceil(i),Dc(i.getFullYear()%1e4,a,4)}function i7e(i){var a=i.getTimezoneOffset();return(a>0?"-":(a*=-1,"+"))+Dc(a/60|0,"0",2)+Dc(a%60,"0",2)}function hIt(i,a){return Dc(i.getUTCDate(),a,2)}function s7e(i,a){return Dc(i.getUTCHours(),a,2)}function a7e(i,a){return Dc(i.getUTCHours()%12||12,a,2)}function o7e(i,a){return Dc(1+eIt.count(IN(i),i),a,3)}function fIt(i,a){return Dc(i.getUTCMilliseconds(),a,3)}function c7e(i,a){return fIt(i,a)+"000"}function u7e(i,a){return Dc(i.getUTCMonth()+1,a,2)}function l7e(i,a){return Dc(i.getUTCMinutes(),a,2)}function h7e(i,a){return Dc(i.getUTCSeconds(),a,2)}function f7e(i){var a=i.getUTCDay();return a===0?7:a}function d7e(i,a){return Dc(nIt.count(IN(i)-1,i),a,2)}function dIt(i){var a=i.getUTCDay();return a>=4||a===0?_A(i):_A.ceil(i)}function g7e(i,a){return i=dIt(i),Dc(_A.count(IN(i),i)+(IN(i).getUTCDay()===4),a,2)}function p7e(i){return i.getUTCDay()}function b7e(i,a){return Dc(qU.count(IN(i)-1,i),a,2)}function v7e(i,a){return Dc(i.getUTCFullYear()%100,a,2)}function w7e(i,a){return i=dIt(i),Dc(i.getUTCFullYear()%100,a,2)}function m7e(i,a){return Dc(i.getUTCFullYear()%1e4,a,4)}function y7e(i,a){var f=i.getUTCDay();return i=f>=4||f===0?_A(i):_A.ceil(i),Dc(i.getUTCFullYear()%1e4,a,4)}function x7e(){return"+0000"}function gIt(){return"%"}function pIt(i){return+i}function bIt(i){return Math.floor(+i/1e3)}var SA,HU;k7e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function k7e(i){return SA=kEe(i),HU=SA.format,SA.parse,SA.utcFormat,SA.utcParse,SA}function E7e(i){return new Date(i)}function T7e(i){return i instanceof Date?+i:+new Date(+i)}function vIt(i,a,f,p,v,m,b,E,_,L){var N=HMt(),B=N.invert,j=N.domain,R=L(".%L"),z=L(":%S"),K=L("%I:%M"),it=L("%I %p"),st=L("%a %d"),ut=L("%b %d"),bt=L("%B"),mt=L("%Y");function yt(dt){return(_(dt)1?0:i<-1?PN:Math.acos(i)}function mIt(i){return i>=1?GU:i<=-1?-GU:Math.asin(i)}function M7e(i){return i.innerRadius}function I7e(i){return i.outerRadius}function D7e(i){return i.startAngle}function O7e(i){return i.endAngle}function N7e(i){return i&&i.padAngle}function P7e(i,a,f,p,v,m,b,E){var _=f-i,L=p-a,N=b-v,B=E-m,j=B*_-N*L;if(!(j*jOt*Ot+Nt*Nt&&(wt=pt,X=U),{cx:wt,cy:X,x01:-N,y01:-B,x11:wt*(v/yt-1),y11:X*(v/yt-1)}}function LA(){var i=M7e,a=I7e,f=Yh(0),p=null,v=D7e,m=O7e,b=N7e,E=null;function _(){var L,N,B=+i.apply(this,arguments),j=+a.apply(this,arguments),R=v.apply(this,arguments)-GU,z=m.apply(this,arguments)-GU,K=wIt(z-R),it=z>R;if(E||(E=L=w1t()),jv0))E.moveTo(0,0);else if(K>VU-v0)E.moveTo(j*Q7(R),j*u3(R)),E.arc(0,0,j,R,z,!it),B>v0&&(E.moveTo(B*Q7(z),B*u3(z)),E.arc(0,0,B,z,R,it));else{var st=R,ut=z,bt=R,mt=z,yt=K,dt=K,ht=b.apply(this,arguments)/2,wt=ht>v0&&(p?+p.apply(this,arguments):AA(B*B+j*j)),X=D1t(wIt(j-B)/2,+f.apply(this,arguments)),pt=X,U=X,xt,nt;if(wt>v0){var Ot=mIt(wt/B*u3(ht)),Nt=mIt(wt/j*u3(ht));(yt-=Ot*2)>v0?(Ot*=it?1:-1,bt+=Ot,mt-=Ot):(yt=0,bt=mt=(R+z)/2),(dt-=Nt*2)>v0?(Nt*=it?1:-1,st+=Nt,ut-=Nt):(dt=0,st=ut=(R+z)/2)}var qt=j*Q7(st),Ct=j*u3(st),Z=B*Q7(mt),Tt=B*u3(mt);if(X>v0){var Ht=j*Q7(ut),It=j*u3(ut),Ft=B*Q7(bt),ke=B*u3(bt),pn;if(Kv0?U>v0?(xt=UU(Ft,ke,qt,Ct,j,U,it),nt=UU(Ht,It,Z,Tt,j,U,it),E.moveTo(xt.cx+xt.x01,xt.cy+xt.y01),Uv0)||!(yt>v0)?E.lineTo(Z,Tt):pt>v0?(xt=UU(Z,Tt,Ht,It,B,-pt,it),nt=UU(qt,Ct,Ft,ke,B,-pt,it),E.lineTo(xt.cx+xt.x01,xt.cy+xt.y01),pti?1:a>=i?0:NaN}function j7e(i){return i}function $7e(){var i=j7e,a=R7e,f=null,p=Yh(0),v=Yh(VU),m=Yh(0);function b(E){var _,L=(E=yIt(E)).length,N,B,j=0,R=new Array(L),z=new Array(L),K=+p.apply(this,arguments),it=Math.min(VU,Math.max(-VU,v.apply(this,arguments)-K)),st,ut=Math.min(Math.abs(it)/L,m.apply(this,arguments)),bt=ut*(it<0?-1:1),mt;for(_=0;_0&&(j+=mt);for(a!=null?R.sort(function(yt,dt){return a(z[yt],z[dt])}):f!=null&&R.sort(function(yt,dt){return f(E[yt],E[dt])}),_=0,B=j?(it-L*bt)/j:0;_0?mt*B:0)+bt,z[N]={data:E[N],index:_,value:mt,startAngle:K,endAngle:st,padAngle:ut};return z}return b.value=function(E){return arguments.length?(i=typeof E=="function"?E:Yh(+E),b):i},b.sortValues=function(E){return arguments.length?(a=E,f=null,b):a},b.sort=function(E){return arguments.length?(f=E,a=null,b):f},b.startAngle=function(E){return arguments.length?(p=typeof E=="function"?E:Yh(+E),b):p},b.endAngle=function(E){return arguments.length?(v=typeof E=="function"?E:Yh(+E),b):v},b.padAngle=function(E){return arguments.length?(m=typeof E=="function"?E:Yh(+E),b):m},b}class kIt{constructor(a,f){this._context=a,this._x=f}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(a,f){switch(a=+a,f=+f,this._point){case 0:{this._point=1,this._line?this._context.lineTo(a,f):this._context.moveTo(a,f);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+a)/2,this._y0,this._x0,f,a,f):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+f)/2,a,this._y0,a,f);break}}this._x0=a,this._y0=f}}function z7e(i){return new kIt(i,!0)}function q7e(i){return new kIt(i,!1)}function Z6(){}function WU(i,a,f){i._context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+a)/6,(i._y0+4*i._y1+f)/6)}function KU(i){this._context=i}KU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:WU(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:WU(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function FN(i){return new KU(i)}function EIt(i){this._context=i}EIt.prototype={areaStart:Z6,areaEnd:Z6,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._x2=i,this._y2=a;break;case 1:this._point=2,this._x3=i,this._y3=a;break;case 2:this._point=3,this._x4=i,this._y4=a,this._context.moveTo((this._x0+4*this._x1+i)/6,(this._y0+4*this._y1+a)/6);break;default:WU(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function H7e(i){return new EIt(i)}function TIt(i){this._context=i}TIt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var f=(this._x0+4*this._x1+i)/6,p=(this._y0+4*this._y1+a)/6;this._line?this._context.lineTo(f,p):this._context.moveTo(f,p);break;case 3:this._point=4;default:WU(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function G7e(i){return new TIt(i)}function CIt(i,a){this._basis=new KU(i),this._beta=a}CIt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var i=this._x,a=this._y,f=i.length-1;if(f>0)for(var p=i[0],v=a[0],m=i[f]-p,b=a[f]-v,E=-1,_;++E<=f;)_=E/f,this._basis.point(this._beta*i[E]+(1-this._beta)*(p+_*m),this._beta*a[E]+(1-this._beta)*(v+_*b));this._x=this._y=null,this._basis.lineEnd()},point:function(i,a){this._x.push(+i),this._y.push(+a)}};const V7e=function i(a){function f(p){return a===1?new KU(p):new CIt(p,a)}return f.beta=function(p){return i(+p)},f}(.85);function YU(i,a,f){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-a),i._y2+i._k*(i._y1-f),i._x2,i._y2)}function O1t(i,a){this._context=i,this._k=(1-a)/6}O1t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:YU(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2,this._x1=i,this._y1=a;break;case 2:this._point=3;default:YU(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const U7e=function i(a){function f(p){return new O1t(p,a)}return f.tension=function(p){return i(+p)},f}(0);function N1t(i,a){this._context=i,this._k=(1-a)/6}N1t.prototype={areaStart:Z6,areaEnd:Z6,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._x3=i,this._y3=a;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=a);break;case 2:this._point=3,this._x5=i,this._y5=a;break;default:YU(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const W7e=function i(a){function f(p){return new N1t(p,a)}return f.tension=function(p){return i(+p)},f}(0);function P1t(i,a){this._context=i,this._k=(1-a)/6}P1t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:YU(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const K7e=function i(a){function f(p){return new P1t(p,a)}return f.tension=function(p){return i(+p)},f}(0);function F1t(i,a,f){var p=i._x1,v=i._y1,m=i._x2,b=i._y2;if(i._l01_a>v0){var E=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,_=3*i._l01_a*(i._l01_a+i._l12_a);p=(p*E-i._x0*i._l12_2a+i._x2*i._l01_2a)/_,v=(v*E-i._y0*i._l12_2a+i._y2*i._l01_2a)/_}if(i._l23_a>v0){var L=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,N=3*i._l23_a*(i._l23_a+i._l12_a);m=(m*L+i._x1*i._l23_2a-a*i._l12_2a)/N,b=(b*L+i._y1*i._l23_2a-f*i._l12_2a)/N}i._context.bezierCurveTo(p,v,m,b,i._x2,i._y2)}function _It(i,a){this._context=i,this._alpha=a}_It.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,p=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+p*p,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3;default:F1t(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const Y7e=function i(a){function f(p){return a?new _It(p,a):new O1t(p,0)}return f.alpha=function(p){return i(+p)},f}(.5);function SIt(i,a){this._context=i,this._alpha=a}SIt.prototype={areaStart:Z6,areaEnd:Z6,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,p=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+p*p,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=a;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=a);break;case 2:this._point=3,this._x5=i,this._y5=a;break;default:F1t(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const X7e=function i(a){function f(p){return a?new SIt(p,a):new N1t(p,0)}return f.alpha=function(p){return i(+p)},f}(.5);function AIt(i,a){this._context=i,this._alpha=a}AIt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,p=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+p*p,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:F1t(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const Q7e=function i(a){function f(p){return a?new AIt(p,a):new P1t(p,0)}return f.alpha=function(p){return i(+p)},f}(.5);function LIt(i){this._context=i}LIt.prototype={areaStart:Z6,areaEnd:Z6,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(i,a){i=+i,a=+a,this._point?this._context.lineTo(i,a):(this._point=1,this._context.moveTo(i,a))}};function Z7e(i){return new LIt(i)}function MIt(i){return i<0?-1:1}function IIt(i,a,f){var p=i._x1-i._x0,v=a-i._x1,m=(i._y1-i._y0)/(p||v<0&&-0),b=(f-i._y1)/(v||p<0&&-0),E=(m*v+b*p)/(p+v);return(MIt(m)+MIt(b))*Math.min(Math.abs(m),Math.abs(b),.5*Math.abs(E))||0}function DIt(i,a){var f=i._x1-i._x0;return f?(3*(i._y1-i._y0)/f-a)/2:a}function B1t(i,a,f){var p=i._x0,v=i._y0,m=i._x1,b=i._y1,E=(m-p)/3;i._context.bezierCurveTo(p+E,v+E*a,m-E,b-E*f,m,b)}function XU(i){this._context=i}XU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:B1t(this,this._t0,DIt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){var f=NaN;if(i=+i,a=+a,!(i===this._x1&&a===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3,B1t(this,DIt(this,f=IIt(this,i,a)),f);break;default:B1t(this,this._t0,f=IIt(this,i,a));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a,this._t0=f}}};function OIt(i){this._context=new NIt(i)}(OIt.prototype=Object.create(XU.prototype)).point=function(i,a){XU.prototype.point.call(this,a,i)};function NIt(i){this._context=i}NIt.prototype={moveTo:function(i,a){this._context.moveTo(a,i)},closePath:function(){this._context.closePath()},lineTo:function(i,a){this._context.lineTo(a,i)},bezierCurveTo:function(i,a,f,p,v,m){this._context.bezierCurveTo(a,i,p,f,m,v)}};function J7e(i){return new XU(i)}function tTe(i){return new OIt(i)}function PIt(i){this._context=i}PIt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var i=this._x,a=this._y,f=i.length;if(f)if(this._line?this._context.lineTo(i[0],a[0]):this._context.moveTo(i[0],a[0]),f===2)this._context.lineTo(i[1],a[1]);else for(var p=FIt(i),v=FIt(a),m=0,b=1;b=0;--a)v[a]=(b[a]-v[a+1])/m[a];for(m[f-1]=(i[f]+v[f-1])/2,a=0;a=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,a),this._context.lineTo(i,a);else{var f=this._x*(1-this._t)+i*this._t;this._context.lineTo(f,this._y),this._context.lineTo(f,a)}break}}this._x=i,this._y=a}};function nTe(i){return new QU(i,.5)}function rTe(i){return new QU(i,0)}function iTe(i){return new QU(i,1)}function BN(i,a,f){this.k=i,this.x=a,this.y=f}BN.prototype={constructor:BN,scale:function(i){return i===1?this:new BN(this.k*i,this.x,this.y)},translate:function(i,a){return i===0&a===0?this:new BN(this.k,this.x+this.k*i,this.y+this.k*a)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},BN.prototype;/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:BIt,setPrototypeOf:RIt,isFrozen:sTe,getPrototypeOf:aTe,getOwnPropertyDescriptor:oTe}=Object;let{freeze:sg,seal:Xw,create:cTe}=Object,{apply:R1t,construct:j1t}=typeof Reflect<"u"&&Reflect;R1t||(R1t=function(a,f,p){return a.apply(f,p)}),sg||(sg=function(a){return a}),Xw||(Xw=function(a){return a}),j1t||(j1t=function(a,f){return new a(...f)});const uTe=K2(Array.prototype.forEach),jIt=K2(Array.prototype.pop),RN=K2(Array.prototype.push),ZU=K2(String.prototype.toLowerCase),$1t=K2(String.prototype.toString),lTe=K2(String.prototype.match),Qw=K2(String.prototype.replace),hTe=K2(String.prototype.indexOf),fTe=K2(String.prototype.trim),Mb=K2(RegExp.prototype.test),jN=dTe(TypeError);function K2(i){return function(a){for(var f=arguments.length,p=new Array(f>1?f-1:0),v=1;v/gm),wTe=Xw(/\${[\w\W]*}/gm),mTe=Xw(/^data-[\-\w.\u00B7-\uFFFF]/),yTe=Xw(/^aria-[\-\w]+$/),GIt=Xw(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xTe=Xw(/^(?:\w+script|data):/i),kTe=Xw(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),VIt=Xw(/^html$/i);var UIt=Object.freeze({__proto__:null,MUSTACHE_EXPR:bTe,ERB_EXPR:vTe,TMPLIT_EXPR:wTe,DATA_ATTR:mTe,ARIA_ATTR:yTe,IS_ALLOWED_URI:GIt,IS_SCRIPT_OR_DATA:xTe,ATTR_WHITESPACE:kTe,DOCTYPE_NAME:VIt});const ETe=()=>typeof window>"u"?null:window,TTe=function(a,f){if(typeof a!="object"||typeof a.createPolicy!="function")return null;let p=null;const v="data-tt-policy-suffix";f&&f.hasAttribute(v)&&(p=f.getAttribute(v));const m="dompurify"+(p?"#"+p:"");try{return a.createPolicy(m,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}};function WIt(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ETe();const a=Bi=>WIt(Bi);if(a.version="3.0.5",a.removed=[],!i||!i.document||i.document.nodeType!==9)return a.isSupported=!1,a;const f=i.document,p=f.currentScript;let{document:v}=i;const{DocumentFragment:m,HTMLTemplateElement:b,Node:E,Element:_,NodeFilter:L,NamedNodeMap:N=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:B,DOMParser:j,trustedTypes:R}=i,z=_.prototype,K=JU(z,"cloneNode"),it=JU(z,"nextSibling"),st=JU(z,"childNodes"),ut=JU(z,"parentNode");if(typeof b=="function"){const Bi=v.createElement("template");Bi.content&&Bi.content.ownerDocument&&(v=Bi.content.ownerDocument)}let bt,mt="";const{implementation:yt,createNodeIterator:dt,createDocumentFragment:ht,getElementsByTagName:wt}=v,{importNode:X}=f;let pt={};a.isSupported=typeof BIt=="function"&&typeof ut=="function"&&yt&&yt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:U,ERB_EXPR:xt,TMPLIT_EXPR:nt,DATA_ATTR:Ot,ARIA_ATTR:Nt,IS_SCRIPT_OR_DATA:qt,ATTR_WHITESPACE:Ct}=UIt;let{IS_ALLOWED_URI:Z}=UIt,Tt=null;const Ht=wo({},[...$It,...z1t,...q1t,...H1t,...zIt]);let It=null;const Ft=wo({},[...qIt,...G1t,...HIt,...tW]);let ke=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pn=null,Me=null,ve=!0,Ge=!0,Ke=!1,we=!0,_e=!1,$t=!1,re=!1,ie=!1,Oe=!1,oe=!1,Ne=!1,me=!0,cn=!1;const li="user-content-";let ya=!0,da=!1,Oo={},ds=null;const Dr=wo({},["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 nr=null;const di=wo({},["audio","video","img","source","image","track"]);let Ee=null;const Yn=wo({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",Ti="http://www.w3.org/2000/svg",gn="http://www.w3.org/1999/xhtml";let ks=gn,qa=!1,La=null;const Gs=wo({},[He,Ti,gn],$1t);let No;const vs=["application/xhtml+xml","text/html"],nu="text/html";let $s,Lu=null;const fm=v.createElement("form"),av=function(on){return on instanceof RegExp||on instanceof Function},Uu=function(on){if(!(Lu&&Lu===on)){if((!on||typeof on!="object")&&(on={}),on=MA(on),No=vs.indexOf(on.PARSER_MEDIA_TYPE)===-1?No=nu:No=on.PARSER_MEDIA_TYPE,$s=No==="application/xhtml+xml"?$1t:ZU,Tt="ALLOWED_TAGS"in on?wo({},on.ALLOWED_TAGS,$s):Ht,It="ALLOWED_ATTR"in on?wo({},on.ALLOWED_ATTR,$s):Ft,La="ALLOWED_NAMESPACES"in on?wo({},on.ALLOWED_NAMESPACES,$1t):Gs,Ee="ADD_URI_SAFE_ATTR"in on?wo(MA(Yn),on.ADD_URI_SAFE_ATTR,$s):Yn,nr="ADD_DATA_URI_TAGS"in on?wo(MA(di),on.ADD_DATA_URI_TAGS,$s):di,ds="FORBID_CONTENTS"in on?wo({},on.FORBID_CONTENTS,$s):Dr,pn="FORBID_TAGS"in on?wo({},on.FORBID_TAGS,$s):{},Me="FORBID_ATTR"in on?wo({},on.FORBID_ATTR,$s):{},Oo="USE_PROFILES"in on?on.USE_PROFILES:!1,ve=on.ALLOW_ARIA_ATTR!==!1,Ge=on.ALLOW_DATA_ATTR!==!1,Ke=on.ALLOW_UNKNOWN_PROTOCOLS||!1,we=on.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=on.SAFE_FOR_TEMPLATES||!1,$t=on.WHOLE_DOCUMENT||!1,Oe=on.RETURN_DOM||!1,oe=on.RETURN_DOM_FRAGMENT||!1,Ne=on.RETURN_TRUSTED_TYPE||!1,ie=on.FORCE_BODY||!1,me=on.SANITIZE_DOM!==!1,cn=on.SANITIZE_NAMED_PROPS||!1,ya=on.KEEP_CONTENT!==!1,da=on.IN_PLACE||!1,Z=on.ALLOWED_URI_REGEXP||GIt,ks=on.NAMESPACE||gn,ke=on.CUSTOM_ELEMENT_HANDLING||{},on.CUSTOM_ELEMENT_HANDLING&&av(on.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=on.CUSTOM_ELEMENT_HANDLING.tagNameCheck),on.CUSTOM_ELEMENT_HANDLING&&av(on.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=on.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),on.CUSTOM_ELEMENT_HANDLING&&typeof on.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ke.allowCustomizedBuiltInElements=on.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(Ge=!1),oe&&(Oe=!0),Oo&&(Tt=wo({},[...zIt]),It=[],Oo.html===!0&&(wo(Tt,$It),wo(It,qIt)),Oo.svg===!0&&(wo(Tt,z1t),wo(It,G1t),wo(It,tW)),Oo.svgFilters===!0&&(wo(Tt,q1t),wo(It,G1t),wo(It,tW)),Oo.mathMl===!0&&(wo(Tt,H1t),wo(It,HIt),wo(It,tW))),on.ADD_TAGS&&(Tt===Ht&&(Tt=MA(Tt)),wo(Tt,on.ADD_TAGS,$s)),on.ADD_ATTR&&(It===Ft&&(It=MA(It)),wo(It,on.ADD_ATTR,$s)),on.ADD_URI_SAFE_ATTR&&wo(Ee,on.ADD_URI_SAFE_ATTR,$s),on.FORBID_CONTENTS&&(ds===Dr&&(ds=MA(ds)),wo(ds,on.FORBID_CONTENTS,$s)),ya&&(Tt["#text"]=!0),$t&&wo(Tt,["html","head","body"]),Tt.table&&(wo(Tt,["tbody"]),delete pn.tbody),on.TRUSTED_TYPES_POLICY){if(typeof on.TRUSTED_TYPES_POLICY.createHTML!="function")throw jN('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof on.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw jN('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');bt=on.TRUSTED_TYPES_POLICY,mt=bt.createHTML("")}else bt===void 0&&(bt=TTe(R,p)),bt!==null&&typeof mt=="string"&&(mt=bt.createHTML(""));sg&&sg(on),Lu=on}},Zl=wo({},["mi","mo","mn","ms","mtext"]),Pa=wo({},["foreignobject","desc","title","annotation-xml"]),Al=wo({},["title","style","font","a","script"]),ua=wo({},z1t);wo(ua,q1t),wo(ua,gTe);const bc=wo({},H1t);wo(bc,pTe);const Cc=function(on){let kr=ut(on);(!kr||!kr.tagName)&&(kr={namespaceURI:ks,tagName:"template"});const Ei=ZU(on.tagName),Jo=ZU(kr.tagName);return La[on.namespaceURI]?on.namespaceURI===Ti?kr.namespaceURI===gn?Ei==="svg":kr.namespaceURI===He?Ei==="svg"&&(Jo==="annotation-xml"||Zl[Jo]):!!ua[Ei]:on.namespaceURI===He?kr.namespaceURI===gn?Ei==="math":kr.namespaceURI===Ti?Ei==="math"&&Pa[Jo]:!!bc[Ei]:on.namespaceURI===gn?kr.namespaceURI===Ti&&!Pa[Jo]||kr.namespaceURI===He&&!Zl[Jo]?!1:!bc[Ei]&&(Al[Ei]||!ua[Ei]):!!(No==="application/xhtml+xml"&&La[on.namespaceURI]):!1},ga=function(on){RN(a.removed,{element:on});try{on.parentNode.removeChild(on)}catch{on.remove()}},Ma=function(on,kr){try{RN(a.removed,{attribute:kr.getAttributeNode(on),from:kr})}catch{RN(a.removed,{attribute:null,from:kr})}if(kr.removeAttribute(on),on==="is"&&!It[on])if(Oe||oe)try{ga(kr)}catch{}else try{kr.setAttribute(on,"")}catch{}},Ha=function(on){let kr,Ei;if(ie)on=""+on;else{const tf=lTe(on,/^[\r\n\t ]+/);Ei=tf&&tf[0]}No==="application/xhtml+xml"&&ks===gn&&(on=''+on+"");const Jo=bt?bt.createHTML(on):on;if(ks===gn)try{kr=new j().parseFromString(Jo,No)}catch{}if(!kr||!kr.documentElement){kr=yt.createDocument(ks,"template",null);try{kr.documentElement.innerHTML=qa?mt:Jo}catch{}}const vc=kr.body||kr.documentElement;return on&&Ei&&vc.insertBefore(v.createTextNode(Ei),vc.childNodes[0]||null),ks===gn?wt.call(kr,$t?"html":"body")[0]:$t?kr.documentElement:vc},Ll=function(on){return dt.call(on.ownerDocument||on,on,L.SHOW_ELEMENT|L.SHOW_COMMENT|L.SHOW_TEXT,null,!1)},_c=function(on){return on instanceof B&&(typeof on.nodeName!="string"||typeof on.textContent!="string"||typeof on.removeChild!="function"||!(on.attributes instanceof N)||typeof on.removeAttribute!="function"||typeof on.setAttribute!="function"||typeof on.namespaceURI!="string"||typeof on.insertBefore!="function"||typeof on.hasChildNodes!="function")},ov=function(on){return typeof E=="object"?on instanceof E:on&&typeof on=="object"&&typeof on.nodeType=="number"&&typeof on.nodeName=="string"},Jl=function(on,kr,Ei){pt[on]&&uTe(pt[on],Jo=>{Jo.call(a,kr,Ei,Lu)})},Z1=function(on){let kr;if(Jl("beforeSanitizeElements",on,null),_c(on))return ga(on),!0;const Ei=$s(on.nodeName);if(Jl("uponSanitizeElement",on,{tagName:Ei,allowedTags:Tt}),on.hasChildNodes()&&!ov(on.firstElementChild)&&(!ov(on.content)||!ov(on.content.firstElementChild))&&Mb(/<[/\w]/g,on.innerHTML)&&Mb(/<[/\w]/g,on.textContent))return ga(on),!0;if(!Tt[Ei]||pn[Ei]){if(!pn[Ei]&&J1(Ei)&&(ke.tagNameCheck instanceof RegExp&&Mb(ke.tagNameCheck,Ei)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Ei)))return!1;if(ya&&!ds[Ei]){const Jo=ut(on)||on.parentNode,vc=st(on)||on.childNodes;if(vc&&Jo){const tf=vc.length;for(let Oc=tf-1;Oc>=0;--Oc)Jo.insertBefore(K(vc[Oc],!0),it(on))}}return ga(on),!0}return on instanceof _&&!Cc(on)||(Ei==="noscript"||Ei==="noembed"||Ei==="noframes")&&Mb(/<\/no(script|embed|frames)/i,on.innerHTML)?(ga(on),!0):(_e&&on.nodeType===3&&(kr=on.textContent,kr=Qw(kr,U," "),kr=Qw(kr,xt," "),kr=Qw(kr,nt," "),on.textContent!==kr&&(RN(a.removed,{element:on.cloneNode()}),on.textContent=kr)),Jl("afterSanitizeElements",on,null),!1)},Fd=function(on,kr,Ei){if(me&&(kr==="id"||kr==="name")&&(Ei in v||Ei in fm))return!1;if(!(Ge&&!Me[kr]&&Mb(Ot,kr))){if(!(ve&&Mb(Nt,kr))){if(!It[kr]||Me[kr]){if(!(J1(on)&&(ke.tagNameCheck instanceof RegExp&&Mb(ke.tagNameCheck,on)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(on))&&(ke.attributeNameCheck instanceof RegExp&&Mb(ke.attributeNameCheck,kr)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(kr))||kr==="is"&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&Mb(ke.tagNameCheck,Ei)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Ei))))return!1}else if(!Ee[kr]){if(!Mb(Z,Qw(Ei,Ct,""))){if(!((kr==="src"||kr==="xlink:href"||kr==="href")&&on!=="script"&&hTe(Ei,"data:")===0&&nr[on])){if(!(Ke&&!Mb(qt,Qw(Ei,Ct,"")))){if(Ei)return!1}}}}}}return!0},J1=function(on){return on.indexOf("-")>0},Bd=function(on){let kr,Ei,Jo,vc;Jl("beforeSanitizeAttributes",on,null);const{attributes:tf}=on;if(!tf)return;const Oc={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:It};for(vc=tf.length;vc--;){kr=tf[vc];const{name:ef,namespaceURI:nf}=kr;if(Ei=ef==="value"?kr.value:fTe(kr.value),Jo=$s(ef),Oc.attrName=Jo,Oc.attrValue=Ei,Oc.keepAttr=!0,Oc.forceKeepAttr=void 0,Jl("uponSanitizeAttribute",on,Oc),Ei=Oc.attrValue,Oc.forceKeepAttr||(Ma(ef,on),!Oc.keepAttr))continue;if(!we&&Mb(/\/>/i,Ei)){Ma(ef,on);continue}_e&&(Ei=Qw(Ei,U," "),Ei=Qw(Ei,xt," "),Ei=Qw(Ei,nt," "));const Xi=$s(on.nodeName);if(Fd(Xi,Jo,Ei)){if(cn&&(Jo==="id"||Jo==="name")&&(Ma(ef,on),Ei=li+Ei),bt&&typeof R=="object"&&typeof R.getAttributeType=="function"&&!nf)switch(R.getAttributeType(Xi,Jo)){case"TrustedHTML":{Ei=bt.createHTML(Ei);break}case"TrustedScriptURL":{Ei=bt.createScriptURL(Ei);break}}try{nf?on.setAttributeNS(nf,ef,Ei):on.setAttribute(ef,Ei),jIt(a.removed)}catch{}}}Jl("afterSanitizeAttributes",on,null)},E0=function Bi(on){let kr;const Ei=Ll(on);for(Jl("beforeSanitizeShadowDOM",on,null);kr=Ei.nextNode();)Jl("uponSanitizeShadowNode",kr,null),!Z1(kr)&&(kr.content instanceof m&&Bi(kr.content),Bd(kr));Jl("afterSanitizeShadowDOM",on,null)};return a.sanitize=function(Bi){let on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kr,Ei,Jo,vc;if(qa=!Bi,qa&&(Bi=""),typeof Bi!="string"&&!ov(Bi))if(typeof Bi.toString=="function"){if(Bi=Bi.toString(),typeof Bi!="string")throw jN("dirty is not a string, aborting")}else throw jN("toString is not a function");if(!a.isSupported)return Bi;if(re||Uu(on),a.removed=[],typeof Bi=="string"&&(da=!1),da){if(Bi.nodeName){const ef=$s(Bi.nodeName);if(!Tt[ef]||pn[ef])throw jN("root node is forbidden and cannot be sanitized in-place")}}else if(Bi instanceof E)kr=Ha(""),Ei=kr.ownerDocument.importNode(Bi,!0),Ei.nodeType===1&&Ei.nodeName==="BODY"||Ei.nodeName==="HTML"?kr=Ei:kr.appendChild(Ei);else{if(!Oe&&!_e&&!$t&&Bi.indexOf("<")===-1)return bt&&Ne?bt.createHTML(Bi):Bi;if(kr=Ha(Bi),!kr)return Oe?null:Ne?mt:""}kr&&ie&&ga(kr.firstChild);const tf=Ll(da?Bi:kr);for(;Jo=tf.nextNode();)Z1(Jo)||(Jo.content instanceof m&&E0(Jo.content),Bd(Jo));if(da)return Bi;if(Oe){if(oe)for(vc=ht.call(kr.ownerDocument);kr.firstChild;)vc.appendChild(kr.firstChild);else vc=kr;return(It.shadowroot||It.shadowrootmode)&&(vc=X.call(f,vc,!0)),vc}let Oc=$t?kr.outerHTML:kr.innerHTML;return $t&&Tt["!doctype"]&&kr.ownerDocument&&kr.ownerDocument.doctype&&kr.ownerDocument.doctype.name&&Mb(VIt,kr.ownerDocument.doctype.name)&&(Oc=" +`+Oc),_e&&(Oc=Qw(Oc,U," "),Oc=Qw(Oc,xt," "),Oc=Qw(Oc,nt," ")),bt&&Ne?bt.createHTML(Oc):Oc},a.setConfig=function(Bi){Uu(Bi),re=!0},a.clearConfig=function(){Lu=null,re=!1},a.isValidAttribute=function(Bi,on,kr){Lu||Uu({});const Ei=$s(Bi),Jo=$s(on);return Fd(Ei,Jo,kr)},a.addHook=function(Bi,on){typeof on=="function"&&(pt[Bi]=pt[Bi]||[],RN(pt[Bi],on))},a.removeHook=function(Bi){if(pt[Bi])return jIt(pt[Bi])},a.removeHooks=function(Bi){pt[Bi]&&(pt[Bi]=[])},a.removeAllHooks=function(){pt={}},a}var eW=WIt();const $N=//gi,CTe=i=>i?XIt(i).replace(/\\n/g,"#br#").split("#br#"):[""],KIt=i=>eW.sanitize(i),YIt=(i,a)=>{var f;if(((f=a.flowchart)==null?void 0:f.htmlLabels)!==!1){const p=a.securityLevel;p==="antiscript"||p==="strict"?i=KIt(i):p!=="loose"&&(i=XIt(i),i=i.replace(//g,">"),i=i.replace(/=/g,"="),i=LTe(i))}return i},Dd=(i,a)=>i&&(a.dompurifyConfig?i=eW.sanitize(YIt(i,a),a.dompurifyConfig).toString():i=eW.sanitize(YIt(i,a),{FORBID_TAGS:["style"]}).toString(),i),_Te=(i,a)=>typeof i=="string"?Dd(i,a):i.flat().map(f=>Dd(f,a)),STe=i=>$N.test(i),ATe=i=>i.split($N),LTe=i=>i.replace(/#br#/g,"
"),XIt=i=>i.replace($N,"#br#"),MTe=i=>{let a="";return i&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replaceAll(/\(/g,"\\("),a=a.replaceAll(/\)/g,"\\)")),a},s1=i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),ITe=function(...i){const a=i.filter(f=>!isNaN(f));return Math.max(...a)},DTe=function(...i){const a=i.filter(f=>!isNaN(f));return Math.min(...a)},zN=function(i){const a=i.split(/(,)/),f=[];for(let p=0;p0&&p+1Math.max(0,i.split(a).length-1),OTe=(i,a)=>{const f=V1t(i,"~"),p=V1t(a,"~");return f===1&&p===1},NTe=i=>{const a=V1t(i,"~");let f=!1;if(a<=1)return i;a%2!==0&&i.startsWith("~")&&(i=i.substring(1),f=!0);const p=[...i];let v=p.indexOf("~"),m=p.lastIndexOf("~");for(;v!==-1&&m!==-1&&v!==m;)p[v]="<",p[m]=">",v=p.indexOf("~"),m=p.lastIndexOf("~");return f&&p.unshift("~"),p.join("")},Yr={getRows:CTe,sanitizeText:Dd,sanitizeTextOrArray:_Te,hasBreaks:STe,splitBreaks:ATe,lineBreakRegex:$N,removeScript:KIt,getUrl:MTe,evaluate:s1,getMax:ITe,getMin:DTe},nW={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:i=>i>=255?255:i<0?0:i,g:i=>i>=255?255:i<0?0:i,b:i=>i>=255?255:i<0?0:i,h:i=>i%360,s:i=>i>=100?100:i<0?0:i,l:i=>i>=100?100:i<0?0:i,a:i=>i>=1?1:i<0?0:i},toLinear:i=>{const a=i/255;return i>.03928?Math.pow((a+.055)/1.055,2.4):a/12.92},hue2rgb:(i,a,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<1/6?i+(a-i)*6*f:f<1/2?a:f<2/3?i+(a-i)*(2/3-f)*6:i),hsl2rgb:({h:i,s:a,l:f},p)=>{if(!a)return f*2.55;i/=360,a/=100,f/=100;const v=f<.5?f*(1+a):f+a-f*a,m=2*f-v;switch(p){case"r":return nW.hue2rgb(m,v,i+1/3)*255;case"g":return nW.hue2rgb(m,v,i)*255;case"b":return nW.hue2rgb(m,v,i-1/3)*255}},rgb2hsl:({r:i,g:a,b:f},p)=>{i/=255,a/=255,f/=255;const v=Math.max(i,a,f),m=Math.min(i,a,f),b=(v+m)/2;if(p==="l")return b*100;if(v===m)return 0;const E=v-m,_=b>.5?E/(2-v-m):E/(v+m);if(p==="s")return _*100;switch(v){case i:return((a-f)/E+(aa>f?Math.min(a,Math.max(f,i)):Math.min(f,Math.max(a,i)),round:i=>Math.round(i*1e10)/1e10},unit:{dec2hex:i=>{const a=Math.round(i).toString(16);return a.length>1?a:`0${a}`}}},J6={};for(let i=0;i<=255;i++)J6[i]=fa.unit.dec2hex(i);const w0={ALL:0,RGB:1,HSL:2};class PTe{constructor(){this.type=w0.ALL}get(){return this.type}set(a){if(this.type&&this.type!==a)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=a}reset(){this.type=w0.ALL}is(a){return this.type===a}}const FTe=PTe;class BTe{constructor(a,f){this.color=f,this.changed=!1,this.data=a,this.type=new FTe}set(a,f){return this.color=f,this.changed=!1,this.data=a,this.type.type=w0.ALL,this}_ensureHSL(){const a=this.data,{h:f,s:p,l:v}=a;f===void 0&&(a.h=fa.channel.rgb2hsl(a,"h")),p===void 0&&(a.s=fa.channel.rgb2hsl(a,"s")),v===void 0&&(a.l=fa.channel.rgb2hsl(a,"l"))}_ensureRGB(){const a=this.data,{r:f,g:p,b:v}=a;f===void 0&&(a.r=fa.channel.hsl2rgb(a,"r")),p===void 0&&(a.g=fa.channel.hsl2rgb(a,"g")),v===void 0&&(a.b=fa.channel.hsl2rgb(a,"b"))}get r(){const a=this.data,f=a.r;return!this.type.is(w0.HSL)&&f!==void 0?f:(this._ensureHSL(),fa.channel.hsl2rgb(a,"r"))}get g(){const a=this.data,f=a.g;return!this.type.is(w0.HSL)&&f!==void 0?f:(this._ensureHSL(),fa.channel.hsl2rgb(a,"g"))}get b(){const a=this.data,f=a.b;return!this.type.is(w0.HSL)&&f!==void 0?f:(this._ensureHSL(),fa.channel.hsl2rgb(a,"b"))}get h(){const a=this.data,f=a.h;return!this.type.is(w0.RGB)&&f!==void 0?f:(this._ensureRGB(),fa.channel.rgb2hsl(a,"h"))}get s(){const a=this.data,f=a.s;return!this.type.is(w0.RGB)&&f!==void 0?f:(this._ensureRGB(),fa.channel.rgb2hsl(a,"s"))}get l(){const a=this.data,f=a.l;return!this.type.is(w0.RGB)&&f!==void 0?f:(this._ensureRGB(),fa.channel.rgb2hsl(a,"l"))}get a(){return this.data.a}set r(a){this.type.set(w0.RGB),this.changed=!0,this.data.r=a}set g(a){this.type.set(w0.RGB),this.changed=!0,this.data.g=a}set b(a){this.type.set(w0.RGB),this.changed=!0,this.data.b=a}set h(a){this.type.set(w0.HSL),this.changed=!0,this.data.h=a}set s(a){this.type.set(w0.HSL),this.changed=!0,this.data.s=a}set l(a){this.type.set(w0.HSL),this.changed=!0,this.data.l=a}set a(a){this.changed=!0,this.data.a=a}}const RTe=BTe,rW=new RTe({r:0,g:0,b:0,a:0},"transparent"),QIt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const a=i.match(QIt.re);if(!a)return;const f=a[1],p=parseInt(f,16),v=f.length,m=v%4===0,b=v>4,E=b?1:17,_=b?8:4,L=m?0:-1,N=b?255:15;return rW.set({r:(p>>_*(L+3)&N)*E,g:(p>>_*(L+2)&N)*E,b:(p>>_*(L+1)&N)*E,a:m?(p&N)*E/255:1},i)},stringify:i=>{const{r:a,g:f,b:p,a:v}=i;return v<1?`#${J6[Math.round(a)]}${J6[Math.round(f)]}${J6[Math.round(p)]}${J6[Math.round(v*255)]}`:`#${J6[Math.round(a)]}${J6[Math.round(f)]}${J6[Math.round(p)]}`}},qN=QIt,iW={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:i=>{const a=i.match(iW.hueRe);if(a){const[,f,p]=a;switch(p){case"grad":return fa.channel.clamp.h(parseFloat(f)*.9);case"rad":return fa.channel.clamp.h(parseFloat(f)*180/Math.PI);case"turn":return fa.channel.clamp.h(parseFloat(f)*360)}}return fa.channel.clamp.h(parseFloat(i))},parse:i=>{const a=i.charCodeAt(0);if(a!==104&&a!==72)return;const f=i.match(iW.re);if(!f)return;const[,p,v,m,b,E]=f;return rW.set({h:iW._hue2deg(p),s:fa.channel.clamp.s(parseFloat(v)),l:fa.channel.clamp.l(parseFloat(m)),a:b?fa.channel.clamp.a(E?parseFloat(b)/100:parseFloat(b)):1},i)},stringify:i=>{const{h:a,s:f,l:p,a:v}=i;return v<1?`hsla(${fa.lang.round(a)}, ${fa.lang.round(f)}%, ${fa.lang.round(p)}%, ${v})`:`hsl(${fa.lang.round(a)}, ${fa.lang.round(f)}%, ${fa.lang.round(p)}%)`}},sW=iW,aW={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:i=>{i=i.toLowerCase();const a=aW.colors[i];if(a)return qN.parse(a)},stringify:i=>{const a=qN.stringify(i);for(const f in aW.colors)if(aW.colors[f]===a)return f}},ZIt=aW,JIt={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:i=>{const a=i.charCodeAt(0);if(a!==114&&a!==82)return;const f=i.match(JIt.re);if(!f)return;const[,p,v,m,b,E,_,L,N]=f;return rW.set({r:fa.channel.clamp.r(v?parseFloat(p)*2.55:parseFloat(p)),g:fa.channel.clamp.g(b?parseFloat(m)*2.55:parseFloat(m)),b:fa.channel.clamp.b(_?parseFloat(E)*2.55:parseFloat(E)),a:L?fa.channel.clamp.a(N?parseFloat(L)/100:parseFloat(L)):1},i)},stringify:i=>{const{r:a,g:f,b:p,a:v}=i;return v<1?`rgba(${fa.lang.round(a)}, ${fa.lang.round(f)}, ${fa.lang.round(p)}, ${fa.lang.round(v)})`:`rgb(${fa.lang.round(a)}, ${fa.lang.round(f)}, ${fa.lang.round(p)})`}},oW=JIt,Zw={format:{keyword:ZIt,hex:qN,rgb:oW,rgba:oW,hsl:sW,hsla:sW},parse:i=>{if(typeof i!="string")return i;const a=qN.parse(i)||oW.parse(i)||sW.parse(i)||ZIt.parse(i);if(a)return a;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(w0.HSL)||i.data.r===void 0?sW.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?oW.stringify(i):qN.stringify(i)},tDt=(i,a)=>{const f=Zw.parse(i);for(const p in a)f[p]=fa.channel.clamp[p](a[p]);return Zw.stringify(f)},IA=(i,a,f=0,p=1)=>{if(typeof i!="number")return tDt(i,{a});const v=rW.set({r:fa.channel.clamp.r(i),g:fa.channel.clamp.g(a),b:fa.channel.clamp.b(f),a:fa.channel.clamp.a(p)});return Zw.stringify(v)},jTe=(i,a)=>fa.lang.round(Zw.parse(i)[a]),$Te=i=>{const{r:a,g:f,b:p}=Zw.parse(i),v=.2126*fa.channel.toLinear(a)+.7152*fa.channel.toLinear(f)+.0722*fa.channel.toLinear(p);return fa.lang.round(v)},zTe=i=>$Te(i)>=.5,J7=i=>!zTe(i),eDt=(i,a,f)=>{const p=Zw.parse(i),v=p[a],m=fa.channel.clamp[a](v+f);return v!==m&&(p[a]=m),Zw.stringify(p)},bs=(i,a)=>eDt(i,"l",a),js=(i,a)=>eDt(i,"l",-a),xn=(i,a)=>{const f=Zw.parse(i),p={};for(const v in a)a[v]&&(p[v]=f[v]+a[v]);return tDt(i,p)},qTe=(i,a,f=50)=>{const{r:p,g:v,b:m,a:b}=Zw.parse(i),{r:E,g:_,b:L,a:N}=Zw.parse(a),B=f/100,j=B*2-1,R=b-N,K=((j*R===-1?j:(j+R)/(1+j*R))+1)/2,it=1-K,st=p*K+E*it,ut=v*K+_*it,bt=m*K+L*it,mt=b*B+N*(1-B);return IA(st,ut,bt,mt)},Ii=(i,a=100)=>{const f=Zw.parse(i);return f.r=255-f.r,f.g=255-f.g,f.b=255-f.b,qTe(f,i,a)},ag=(i,a)=>a?xn(i,{s:-40,l:10}):xn(i,{s:-40,l:-10}),cW="#ffffff",uW="#f2f2f2";let HTe=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||xn(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||xn(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ag(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ag(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ag(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ag(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ii(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ii(this.tertiaryColor),this.lineColor=this.lineColor||Ii(this.background),this.arrowheadColor=this.arrowheadColor||Ii(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?js(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||js(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Ii(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||bs(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||xn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xn(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||xn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xn(this.primaryColor,{h:330}),this.darkMode)for(let f=0;f{this[p]=a[p]}),this.updateColors(),f.forEach(p=>{this[p]=a[p]})}};const GTe=i=>{const a=new HTe;return a.calculate(i),a};let VTe=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=bs(this.primaryColor,16),this.tertiaryColor=xn(this.primaryColor,{h:-160}),this.primaryBorderColor=Ii(this.background),this.secondaryBorderColor=ag(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ag(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.tertiaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=bs(Ii("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=IA(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=js("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=js(this.sectionBkgColor,10),this.taskBorderColor=IA(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=IA(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=bs(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=bs(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=bs(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=xn(this.primaryColor,{h:64}),this.fillType3=xn(this.secondaryColor,{h:64}),this.fillType4=xn(this.primaryColor,{h:-64}),this.fillType5=xn(this.secondaryColor,{h:-64}),this.fillType6=xn(this.primaryColor,{h:128}),this.fillType7=xn(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||xn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xn(this.primaryColor,{h:210}),this.cScale9=this.cScale9||xn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xn(this.primaryColor,{h:330});for(let a=0;a{this[p]=a[p]}),this.updateColors(),f.forEach(p=>{this[p]=a[p]})}};const UTe=i=>{const a=new VTe;return a.calculate(i),a};let WTe=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=xn(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=xn(this.primaryColor,{h:-160}),this.primaryBorderColor=ag(this.primaryColor,this.darkMode),this.secondaryBorderColor=ag(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ag(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.tertiaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=IA(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||xn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xn(this.primaryColor,{h:210}),this.cScale9=this.cScale9||xn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xn(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||js(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||js(this.tertiaryColor,40);for(let a=0;a{this[p]=a[p]}),this.updateColors(),f.forEach(p=>{this[p]=a[p]})}};const nDt=i=>{const a=new WTe;return a.calculate(i),a};let KTe=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=bs("#cde498",10),this.primaryBorderColor=ag(this.primaryColor,this.darkMode),this.secondaryBorderColor=ag(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ag(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.primaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=js(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||xn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||xn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||xn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||xn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||xn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||xn(this.primaryColor,{h:210}),this.cScale9=this.cScale9||xn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||xn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||xn(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||js(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||js(this.tertiaryColor,40);for(let a=0;a{this[p]=a[p]}),this.updateColors(),f.forEach(p=>{this[p]=a[p]})}};const YTe=i=>{const a=new KTe;return a.calculate(i),a};class XTe{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=bs(this.contrast,55),this.background="#ffffff",this.tertiaryColor=xn(this.primaryColor,{h:-160}),this.primaryBorderColor=ag(this.primaryColor,this.darkMode),this.secondaryBorderColor=ag(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ag(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.tertiaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=bs(this.contrast,55),this.border2=this.contrast,this.actorBorder=bs(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let a=0;a{this[p]=a[p]}),this.updateColors(),f.forEach(p=>{this[p]=a[p]})}}const w5={base:{getThemeVariables:GTe},dark:{getThemeVariables:UTe},default:{getThemeVariables:nDt},forest:{getThemeVariables:YTe},neutral:{getThemeVariables:i=>{const a=new XTe;return a.calculate(i),a}}},tk={flowchart:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},theme:"default",maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,fontSize:16},rDt={...tk,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:w5.default.getThemeVariables(),sequence:{...tk.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...tk.gantt,tickInterval:void 0,useWidth:void 0},c4:{...tk.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...tk.pie,useWidth:984},requirement:{...tk.requirement,useWidth:void 0},gitGraph:{...tk.gitGraph,useMaxWidth:!1},sankey:{...tk.sankey,useMaxWidth:!1}},iDt=(i,a="")=>Object.keys(i).reduce((f,p)=>Array.isArray(i[p])?f:typeof i[p]=="object"&&i[p]!==null?[...f,a+p,...iDt(i[p],"")]:[...f,a+p],[]),QTe=new Set(iDt(rDt,"")),Lf=rDt,lW=i=>{if(Ut.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(a=>lW(a));return}for(const a of Object.keys(i)){if(Ut.debug("Checking key",a),a.startsWith("__")||a.includes("proto")||a.includes("constr")||!QTe.has(a)||i[a]==null){Ut.debug("sanitize deleting key: ",a),delete i[a];continue}if(typeof i[a]=="object"){Ut.debug("sanitizing object",a),lW(i[a]);continue}const f=["themeCSS","fontFamily","altFontFamily"];for(const p of f)a.includes(p)&&(Ut.debug("sanitizing css option",a),i[a]=ZTe(i[a]))}if(i.themeVariables)for(const a of Object.keys(i.themeVariables)){const f=i.themeVariables[a];f!=null&&f.match&&!f.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[a]="")}Ut.debug("After sanitization",i)}},ZTe=i=>{let a=0,f=0;for(const p of i){if(a{for(const{id:a,detector:f,loader:p}of i)cDt(a,f,p)},cDt=(i,a,f)=>{DA[i]?Ut.error(`Detector with key ${i} already exists`):DA[i]={detector:a,loader:f},Ut.debug(`Detector with key ${i} added${f?" with loader":""}`)},t9e=i=>DA[i].loader,U1t=(i,a,{depth:f=2,clobber:p=!1}={})=>{const v={depth:f,clobber:p};return Array.isArray(a)&&!Array.isArray(i)?(a.forEach(m=>U1t(i,m,v)),i):Array.isArray(a)&&Array.isArray(i)?(a.forEach(m=>{i.includes(m)||i.push(m)}),i):i===void 0||f<=0?i!=null&&typeof i=="object"&&typeof a=="object"?Object.assign(i,a):a:(a!==void 0&&typeof i=="object"&&typeof a=="object"&&Object.keys(a).forEach(m=>{typeof a[m]=="object"&&(i[m]===void 0||typeof i[m]=="object")?(i[m]===void 0&&(i[m]=Array.isArray(a[m])?[]:{}),i[m]=U1t(i[m],a[m],{depth:f-1,clobber:p})):(p||typeof i[m]!="object"&&typeof a[m]!="object")&&(i[m]=a[m])}),i)},Y1=U1t;var e9e=typeof global=="object"&&global&&global.Object===Object&&global;const uDt=e9e;var n9e=typeof self=="object"&&self&&self.Object===Object&&self,r9e=uDt||n9e||Function("return this")();const Jw=r9e;var i9e=Jw.Symbol;const Y2=i9e;var lDt=Object.prototype,s9e=lDt.hasOwnProperty,a9e=lDt.toString,GN=Y2?Y2.toStringTag:void 0;function o9e(i){var a=s9e.call(i,GN),f=i[GN];try{i[GN]=void 0;var p=!0}catch{}var v=a9e.call(i);return p&&(a?i[GN]=f:delete i[GN]),v}var c9e=Object.prototype,u9e=c9e.toString;function l9e(i){return u9e.call(i)}var h9e="[object Null]",f9e="[object Undefined]",hDt=Y2?Y2.toStringTag:void 0;function tT(i){return i==null?i===void 0?f9e:h9e:hDt&&hDt in Object(i)?o9e(i):l9e(i)}function Ib(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}var d9e="[object AsyncFunction]",g9e="[object Function]",p9e="[object GeneratorFunction]",b9e="[object Proxy]";function OA(i){if(!Ib(i))return!1;var a=tT(i);return a==g9e||a==p9e||a==d9e||a==b9e}var v9e=Jw["__core-js_shared__"];const W1t=v9e;var fDt=function(){var i=/[^.]+$/.exec(W1t&&W1t.keys&&W1t.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function w9e(i){return!!fDt&&fDt in i}var m9e=Function.prototype,y9e=m9e.toString;function eT(i){if(i!=null){try{return y9e.call(i)}catch{}try{return i+""}catch{}}return""}var x9e=/[\\^$.*+?()[\]{}|]/g,k9e=/^\[object .+?Constructor\]$/,E9e=Function.prototype,T9e=Object.prototype,C9e=E9e.toString,_9e=T9e.hasOwnProperty,S9e=RegExp("^"+C9e.call(_9e).replace(x9e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function A9e(i){if(!Ib(i)||w9e(i))return!1;var a=OA(i)?S9e:k9e;return a.test(eT(i))}function L9e(i,a){return i==null?void 0:i[a]}function nT(i,a){var f=L9e(i,a);return A9e(f)?f:void 0}var M9e=nT(Object,"create");const VN=M9e;function I9e(){this.__data__=VN?VN(null):{},this.size=0}function D9e(i){var a=this.has(i)&&delete this.__data__[i];return this.size-=a?1:0,a}var O9e="__lodash_hash_undefined__",N9e=Object.prototype,P9e=N9e.hasOwnProperty;function F9e(i){var a=this.__data__;if(VN){var f=a[i];return f===O9e?void 0:f}return P9e.call(a,i)?a[i]:void 0}var B9e=Object.prototype,R9e=B9e.hasOwnProperty;function j9e(i){var a=this.__data__;return VN?a[i]!==void 0:R9e.call(a,i)}var $9e="__lodash_hash_undefined__";function z9e(i,a){var f=this.__data__;return this.size+=this.has(i)?0:1,f[i]=VN&&a===void 0?$9e:a,this}function rT(i){var a=-1,f=i==null?0:i.length;for(this.clear();++a-1}function K9e(i,a){var f=this.__data__,p=fW(f,i);return p<0?(++this.size,f.push([i,a])):f[p][1]=a,this}function m5(i){var a=-1,f=i==null?0:i.length;for(this.clear();++a-1&&i%1==0&&i<=ECe}function ek(i){return i!=null&&Z1t(i.length)&&!OA(i)}function CDt(i){return l3(i)&&ek(i)}function TCe(){return!1}var _Dt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,SDt=_Dt&&typeof module=="object"&&module&&!module.nodeType&&module,CCe=SDt&&SDt.exports===_Dt,ADt=CCe?Jw.Buffer:void 0,_Ce=ADt?ADt.isBuffer:void 0,SCe=_Ce||TCe;const BA=SCe;var ACe="[object Object]",LCe=Function.prototype,MCe=Object.prototype,LDt=LCe.toString,ICe=MCe.hasOwnProperty,DCe=LDt.call(Object);function MDt(i){if(!l3(i)||tT(i)!=ACe)return!1;var a=Q1t(i);if(a===null)return!0;var f=ICe.call(a,"constructor")&&a.constructor;return typeof f=="function"&&f instanceof f&&LDt.call(f)==DCe}var OCe="[object Arguments]",NCe="[object Array]",PCe="[object Boolean]",FCe="[object Date]",BCe="[object Error]",RCe="[object Function]",jCe="[object Map]",$Ce="[object Number]",zCe="[object Object]",qCe="[object RegExp]",HCe="[object Set]",GCe="[object String]",VCe="[object WeakMap]",UCe="[object ArrayBuffer]",WCe="[object DataView]",KCe="[object Float32Array]",YCe="[object Float64Array]",XCe="[object Int8Array]",QCe="[object Int16Array]",ZCe="[object Int32Array]",JCe="[object Uint8Array]",t_e="[object Uint8ClampedArray]",e_e="[object Uint16Array]",n_e="[object Uint32Array]",gl={};gl[KCe]=gl[YCe]=gl[XCe]=gl[QCe]=gl[ZCe]=gl[JCe]=gl[t_e]=gl[e_e]=gl[n_e]=!0,gl[OCe]=gl[NCe]=gl[UCe]=gl[PCe]=gl[WCe]=gl[FCe]=gl[BCe]=gl[RCe]=gl[jCe]=gl[$Ce]=gl[zCe]=gl[qCe]=gl[HCe]=gl[GCe]=gl[VCe]=!1;function r_e(i){return l3(i)&&Z1t(i.length)&&!!gl[tT(i)]}function wW(i){return function(a){return i(a)}}var IDt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,WN=IDt&&typeof module=="object"&&module&&!module.nodeType&&module,i_e=WN&&WN.exports===IDt,J1t=i_e&&uDt.process,s_e=function(){try{var i=WN&&WN.require&&WN.require("util").types;return i||J1t&&J1t.binding&&J1t.binding("util")}catch{}}();const RA=s_e;var DDt=RA&&RA.isTypedArray,a_e=DDt?wW(DDt):r_e;const mW=a_e;function tdt(i,a){if(!(a==="constructor"&&typeof i[a]=="function")&&a!="__proto__")return i[a]}var o_e=Object.prototype,c_e=o_e.hasOwnProperty;function yW(i,a,f){var p=i[a];(!(c_e.call(i,a)&&NA(p,f))||f===void 0&&!(a in i))&&pW(i,a,f)}function KN(i,a,f,p){var v=!f;f||(f={});for(var m=-1,b=a.length;++m-1&&i%1==0&&i0){if(++a>=E_e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}var S_e=__e(k_e);const BDt=S_e;function kW(i,a){return BDt(FDt(i,a,sT),i+"")}function YN(i,a,f){if(!Ib(f))return!1;var p=typeof a;return(p=="number"?ek(f)&&xW(a,f.length):p=="string"&&a in f)?NA(f[a],i):!1}function A_e(i){return kW(function(a,f){var p=-1,v=f.length,m=v>1?f[v-1]:void 0,b=v>2?f[2]:void 0;for(m=i.length>3&&typeof m=="function"?(v--,m):void 0,b&&YN(f[0],f[1],b)&&(m=v<3?void 0:m,v=1),a=Object(a);++pE.args);lW(b),p=Y1(p,[...b])}else p=f.args;if(!p)return;let v=hW(i,a);const m="config";return p[m]!==void 0&&(v==="flowchart-v2"&&(v="flowchart"),p[v]=p[m],delete p[m]),p},jDt=function(i,a=null){try{const f=new RegExp(`[%]{2}(?![{]${I_e.source})(?=[}][%]{2}).* +`,"ig");i=i.trim().replace(f,"").replace(/'/gm,'"'),Ut.debug(`Detecting diagram directive${a!==null?" type:"+a:""} based on the text:${i}`);let p;const v=[];for(;(p=HN.exec(i))!==null;)if(p.index===HN.lastIndex&&HN.lastIndex++,p&&!a||a&&p[1]&&p[1].match(a)||a&&p[2]&&p[2].match(a)){const m=p[1]?p[1]:p[2],b=p[3]?p[3].trim():p[4]?JSON.parse(p[4].trim()):null;v.push({type:m,args:b})}return v.length===0?{type:i,args:null}:v.length===1?v[0]:v}catch(f){return Ut.error(`ERROR: ${f.message} - Unable to parse directive type: '${a}' based on the text: '${i}'`),{type:void 0,args:null}}},O_e=function(i){return i.replace(HN,"")},N_e=function(i,a){for(const[f,p]of a.entries())if(p.match(i))return f;return-1};function X2(i,a){if(!i)return a;const f=`curve${i.charAt(0).toUpperCase()+i.slice(1)}`;return M_e[f]??a}function P_e(i,a){const f=i.trim();if(f)return a.securityLevel!=="loose"?Q6(f):f}const F_e=(i,...a)=>{const f=i.split("."),p=f.length-1,v=f[p];let m=window;for(let b=0;b{f+=$Dt(v,a),a=v});const p=f/2;return edt(i,p)}function R_e(i){return i.length===1?i[0]:B_e(i)}const zDt=(i,a=2)=>{const f=Math.pow(10,a);return Math.round(i*f)/f},edt=(i,a)=>{let f,p=a;for(const v of i){if(f){const m=$Dt(v,f);if(m=1)return{x:v.x,y:v.y};if(b>0&&b<1)return{x:zDt((1-b)*f.x+b*v.x,5),y:zDt((1-b)*f.y+b*v.y,5)}}}f=v}throw new Error("Could not find a suitable point for the given distance")},j_e=(i,a,f)=>{Ut.info(`our points ${JSON.stringify(a)}`),a[0]!==f&&(a=a.reverse());const v=edt(a,25),m=i?10:5,b=Math.atan2(a[0].y-v.y,a[0].x-v.x),E={x:0,y:0};return E.x=Math.sin(b)*m+(a[0].x+v.x)/2,E.y=-Math.cos(b)*m+(a[0].y+v.y)/2,E};function $_e(i,a,f){const p=structuredClone(f);Ut.info("our points",p),a!=="start_left"&&a!=="start_right"&&p.reverse();const v=25+i,m=edt(p,v),b=10+i*.5,E=Math.atan2(p[0].y-m.y,p[0].x-m.x),_={x:0,y:0};return a==="start_left"?(_.x=Math.sin(E+Math.PI)*b+(p[0].x+m.x)/2,_.y=-Math.cos(E+Math.PI)*b+(p[0].y+m.y)/2):a==="end_right"?(_.x=Math.sin(E-Math.PI)*b+(p[0].x+m.x)/2-5,_.y=-Math.cos(E-Math.PI)*b+(p[0].y+m.y)/2-5):a==="end_left"?(_.x=Math.sin(E)*b+(p[0].x+m.x)/2-5,_.y=-Math.cos(E)*b+(p[0].y+m.y)/2-5):(_.x=Math.sin(E)*b+(p[0].x+m.x)/2,_.y=-Math.cos(E)*b+(p[0].y+m.y)/2),_}function em(i){let a="",f="";for(const p of i)p!==void 0&&(p.startsWith("color:")||p.startsWith("text-align:")?f=f+p+";":a=a+p+";");return{style:a,labelStyle:f}}let qDt=0;const HDt=()=>(qDt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+qDt);function z_e(i){let a="";const f="0123456789abcdef",p=f.length;for(let v=0;vz_e(i.length),q_e=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},H_e=function(i,a){const f=a.text.replace(Yr.lineBreakRegex," "),[,p]=$A(a.fontSize),v=i.append("text");v.attr("x",a.x),v.attr("y",a.y),v.style("text-anchor",a.anchor),v.style("font-family",a.fontFamily),v.style("font-size",p),v.style("font-weight",a.fontWeight),v.attr("fill",a.fill),a.class!==void 0&&v.attr("class",a.class);const m=v.append("tspan");return m.attr("x",a.x+a.textMargin*2),m.attr("fill",a.fill),m.text(f),v},VDt=PA((i,a,f)=>{if(!i||(f=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},f),Yr.lineBreakRegex.test(i)))return i;const p=i.split(" "),v=[];let m="";return p.forEach((b,E)=>{const _=h3(`${b} `,f),L=h3(m,f);if(_>a){const{hyphenatedStrings:j,remainingWord:R}=G_e(b,a,"-",f);v.push(m,...j),m=R}else L+_>=a?(v.push(m),m=b):m=[m,b].filter(Boolean).join(" ");E+1===p.length&&v.push(m)}),v.filter(b=>b!=="").join(f.joinWith)},(i,a,f)=>`${i}${a}${f.fontSize}${f.fontWeight}${f.fontFamily}${f.joinWith}`),G_e=PA((i,a,f="-",p)=>{p=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},p);const v=[...i],m=[];let b="";return v.forEach((E,_)=>{const L=`${b}${E}`;if(h3(L,p)>=a){const B=_+1,j=v.length===B,R=`${L}${f}`;m.push(j?L:R),b=""}else b=L}),{hyphenatedStrings:m,remainingWord:b}},(i,a,f="-",p)=>`${i}${a}${f}${p.fontSize}${p.fontWeight}${p.fontFamily}`);function ndt(i,a){return rdt(i,a).height}function h3(i,a){return rdt(i,a).width}const rdt=PA((i,a)=>{const{fontSize:f=12,fontFamily:p="Arial",fontWeight:v=400}=a;if(!i)return{width:0,height:0};const[,m]=$A(f),b=["sans-serif",p],E=i.split(Yr.lineBreakRegex),_=[],L=yr("body");if(!L.remove)return{width:0,height:0,lineHeight:0};const N=L.append("svg");for(const j of b){let R=0;const z={width:0,height:0,lineHeight:0};for(const K of E){const it=q_e();it.text=K||RDt;const st=H_e(N,it).style("font-size",m).style("font-weight",v).style("font-family",j),ut=(st._groups||st)[0][0].getBBox();if(ut.width===0&&ut.height===0)throw new Error("svg element not in render tree");z.width=Math.round(Math.max(z.width,ut.width)),R=Math.round(ut.height),z.height+=R,z.lineHeight=Math.round(Math.max(z.lineHeight,R))}_.push(z)}N.remove();const B=isNaN(_[1].height)||isNaN(_[1].width)||isNaN(_[1].lineHeight)||_[0].height>_[1].height&&_[0].width>_[1].width&&_[0].lineHeight>_[1].lineHeight?0:1;return _[B]},(i,a)=>`${i}${a.fontSize}${a.fontWeight}${a.fontFamily}`);class V_e{constructor(a=!1,f){this.count=0,this.count=f?f.length:0,this.next=a?()=>this.count++:()=>Date.now()}}let TW;const U_e=function(i){return TW=TW||document.createElement("div"),i=escape(i).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),TW.innerHTML=i,unescape(TW.textContent)};function UDt(i){return"str"in i}const W_e=(i,a,f,p)=>{var m;if(!p)return;const v=(m=i.node())==null?void 0:m.getBBox();v&&i.append("text").text(p).attr("x",v.x+v.width/2).attr("y",-f).attr("class",a)},$A=i=>{if(typeof i=="number")return[i,i+"px"];const a=parseInt(i??"",10);return Number.isNaN(a)?[void 0,void 0]:i===String(a)?[a,i+"px"]:[a,i]};function idt(i,a){return EW({},i,a)}const $a={assignWithDepth:Y1,wrapLabel:VDt,calculateTextHeight:ndt,calculateTextWidth:h3,calculateTextDimensions:rdt,cleanAndMerge:idt,detectInit:D_e,detectDirective:jDt,isSubstringInArray:N_e,interpolateToCurve:X2,calcLabelPosition:R_e,calcCardinalityPosition:j_e,calcTerminalLabelPosition:$_e,formatUrl:P_e,getStylesFromArray:em,generateId:HDt,random:GDt,runFunc:F_e,entityDecode:U_e,insertTitle:W_e,parseFontSize:$A,InitIDGenerator:V_e};var WDt="comm",KDt="rule",YDt="decl",K_e="@import",Y_e="@keyframes",X_e=Math.abs,sdt=String.fromCharCode;function XDt(i){return i.trim()}function adt(i,a,f){return i.replace(a,f)}function Q_e(i,a){return i.indexOf(a)}function XN(i,a){return i.charCodeAt(a)|0}function QN(i,a,f){return i.slice(a,f)}function nk(i){return i.length}function QDt(i){return i.length}function CW(i,a){return a.push(i),i}var _W=1,zA=1,ZDt=0,Q2=0,If=0,qA="";function odt(i,a,f,p,v,m,b){return{value:i,root:a,parent:f,type:p,props:v,children:m,line:_W,column:zA,length:b,return:""}}function Z_e(){return If}function J_e(){return If=Q2>0?XN(qA,--Q2):0,zA--,If===10&&(zA=1,_W--),If}function nm(){return If=Q22||cdt(If)>3?"":" "}function rSe(i,a){for(;--a&&nm()&&!(If<48||If>102||If>57&&If<65||If>70&&If<97););return AW(i,SW()+(a<6&&aT()==32&&nm()==32))}function ldt(i){for(;nm();)switch(If){case i:return Q2;case 34:case 39:i!==34&&i!==39&&ldt(If);break;case 40:i===41&&ldt(i);break;case 92:nm();break}return Q2}function iSe(i,a){for(;nm()&&i+If!==47+10;)if(i+If===42+42&&aT()===47)break;return"/*"+AW(a,Q2-1)+"*"+sdt(i===47?i:nm())}function sSe(i){for(;!cdt(aT());)nm();return AW(i,Q2)}function aSe(i){return eSe(LW("",null,null,null,[""],i=tSe(i),0,[0],i))}function LW(i,a,f,p,v,m,b,E,_){for(var L=0,N=0,B=b,j=0,R=0,z=0,K=1,it=1,st=1,ut=0,bt="",mt=v,yt=m,dt=p,ht=bt;it;)switch(z=ut,ut=nm()){case 40:if(z!=108&&XN(ht,B-1)==58){Q_e(ht+=adt(udt(ut),"&","&\f"),"&\f")!=-1&&(st=-1);break}case 34:case 39:case 91:ht+=udt(ut);break;case 9:case 10:case 13:case 32:ht+=nSe(z);break;case 92:ht+=rSe(SW()-1,7);continue;case 47:switch(aT()){case 42:case 47:CW(oSe(iSe(nm(),SW()),a,f),_);break;default:ht+="/"}break;case 123*K:E[L++]=nk(ht)*st;case 125*K:case 59:case 0:switch(ut){case 0:case 125:it=0;case 59+N:R>0&&nk(ht)-B&&CW(R>32?tOt(ht+";",p,f,B-1):tOt(adt(ht," ","")+";",p,f,B-2),_);break;case 59:ht+=";";default:if(CW(dt=JDt(ht,a,f,L,N,v,E,bt,mt=[],yt=[],B),m),ut===123)if(N===0)LW(ht,a,dt,dt,mt,m,B,E,yt);else switch(j===99&&XN(ht,3)===110?100:j){case 100:case 109:case 115:LW(i,dt,dt,p&&CW(JDt(i,dt,dt,0,0,v,E,bt,v,mt=[],B),yt),v,yt,B,E,p?mt:yt);break;default:LW(ht,dt,dt,dt,[""],yt,0,E,yt)}}L=N=R=0,K=st=1,bt=ht="",B=b;break;case 58:B=1+nk(ht),R=z;default:if(K<1){if(ut==123)--K;else if(ut==125&&K++==0&&J_e()==125)continue}switch(ht+=sdt(ut),ut*K){case 38:st=N>0?1:(ht+="\f",-1);break;case 44:E[L++]=(nk(ht)-1)*st,st=1;break;case 64:aT()===45&&(ht+=udt(nm())),j=aT(),N=B=nk(bt=ht+=sSe(SW())),ut++;break;case 45:z===45&&nk(ht)==2&&(K=0)}}return m}function JDt(i,a,f,p,v,m,b,E,_,L,N){for(var B=v-1,j=v===0?m:[""],R=QDt(j),z=0,K=0,it=0;z0?j[st]+" "+ut:adt(ut,/&\f/g,j[st])))&&(_[it++]=bt);return odt(i,a,f,v===0?KDt:E,_,L,N)}function oSe(i,a,f){return odt(i,a,f,WDt,sdt(Z_e()),QN(i,2,-2),0)}function tOt(i,a,f,p){return odt(i,a,f,YDt,QN(i,0,p),QN(i,p+1,-1),p)}function hdt(i,a){for(var f="",p=QDt(i),v=0;v{let f=Y1({},i),p={};for(const v of a)sOt(v),p=Y1(p,v);if(f=Y1(f,p),p.theme&&p.theme in w5){const v=Y1({},nOt),m=Y1(v.themeVariables||{},p.themeVariables);f.theme&&f.theme in w5&&(f.themeVariables=w5[f.theme].getThemeVariables(m))}return ZN=f,oOt(ZN),ZN},uSe=i=>(sp=Y1({},oT),sp=Y1(sp,i),i.theme&&w5[i.theme]&&(sp.themeVariables=w5[i.theme].getThemeVariables(i.themeVariables)),MW(sp,HA),sp),lSe=i=>{nOt=Y1({},i)},hSe=i=>(sp=Y1(sp,i),MW(sp,HA),sp),rOt=()=>Y1({},sp),iOt=i=>(oOt(i),Y1(ZN,i),Le()),Le=()=>Y1({},ZN),sOt=i=>{i&&(["secure",...sp.secure??[]].forEach(a=>{Object.hasOwn(i,a)&&(Ut.debug(`Denied attempt to modify a secure key ${a}`,i[a]),delete i[a])}),Object.keys(i).forEach(a=>{a.startsWith("__")&&delete i[a]}),Object.keys(i).forEach(a=>{typeof i[a]=="string"&&(i[a].includes("<")||i[a].includes(">")||i[a].includes("url(data:"))&&delete i[a],typeof i[a]=="object"&&sOt(i[a])}))},fSe=i=>{lW(i),i.fontFamily&&(!i.themeVariables||!i.themeVariables.fontFamily)&&(i.themeVariables={fontFamily:i.fontFamily}),HA.push(i),MW(sp,HA)},IW=(i=sp)=>{HA=[],MW(i,HA)},dSe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},aOt={},gSe=i=>{aOt[i]||(Ut.warn(dSe[i]),aOt[i]=!0)},oOt=i=>{i&&(i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&gSe("LAZY_LOAD_DEPRECATED")},cOt="c4",pSe={id:cOt,detector:i=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>IIe);return{id:cOt,diagram:i}}},uOt="flowchart",bSe={id:uOt,detector:(i,a)=>{var f,p;return((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="dagre-wrapper"||((p=a==null?void 0:a.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:/^\s*graph/.test(i)},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>O$e);return{id:uOt,diagram:i}}},lOt="flowchart-v2",vSe={id:lOt,detector:(i,a)=>{var f,p,v;return((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="dagre-d3"||((p=a==null?void 0:a.flowchart)==null?void 0:p.defaultRenderer)==="elk"?!1:/^\s*graph/.test(i)&&((v=a==null?void 0:a.flowchart)==null?void 0:v.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(i)},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>N$e);return{id:lOt,diagram:i}}},hOt="er",wSe={id:hOt,detector:i=>/^\s*erDiagram/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>aze);return{id:hOt,diagram:i}}},fOt="gitGraph",mSe={id:fOt,detector:i=>/^\s*gitGraph/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Ize);return{id:fOt,diagram:i}}},dOt="gantt",ySe={id:dOt,detector:i=>/^\s*gantt/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>yqe);return{id:dOt,diagram:i}}},gOt="info",xSe={id:gOt,detector:i=>/^\s*info/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>kqe);return{id:gOt,diagram:i}}},pOt="pie",kSe={id:pOt,detector:i=>/^\s*pie/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Aqe);return{id:pOt,diagram:i}}},bOt="quadrantChart",ESe={id:bOt,detector:i=>/^\s*quadrantChart/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>Gqe);return{id:bOt,diagram:i}}},vOt="requirement",TSe={id:vOt,detector:i=>/^\s*requirement(Diagram)?/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>tHe);return{id:vOt,diagram:i}}},wOt="sequence",CSe={id:wOt,detector:i=>/^\s*sequenceDiagram/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>sGe);return{id:wOt,diagram:i}}},mOt="class",_Se={id:mOt,detector:(i,a)=>{var f;return((f=a==null?void 0:a.class)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(i)},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>LGe);return{id:mOt,diagram:i}}},yOt="classDiagram",SSe={id:yOt,detector:(i,a)=>{var f;return/^\s*classDiagram/.test(i)&&((f=a==null?void 0:a.class)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(i)},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>PGe);return{id:yOt,diagram:i}}},xOt="state",ASe={id:xOt,detector:(i,a)=>{var f;return((f=a==null?void 0:a.state)==null?void 0:f.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(i)},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>kVe);return{id:xOt,diagram:i}}},kOt="stateDiagram",LSe={id:kOt,detector:(i,a)=>{var f;return!!(/^\s*stateDiagram-v2/.test(i)||/^\s*stateDiagram/.test(i)&&((f=a==null?void 0:a.state)==null?void 0:f.defaultRenderer)==="dagre-wrapper")},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>zVe);return{id:kOt,diagram:i}}},EOt="journey",MSe={id:EOt,detector:i=>/^\s*journey/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>aUe);return{id:EOt,diagram:i}}},fdt=i=>{var v;const{securityLevel:a}=Le();let f=yr("body");if(a==="sandbox"){const b=((v=yr(`#i${i}`).node())==null?void 0:v.contentDocument)??document;f=yr(b.body)}return f.select(`#${i}`)},ISe=function(i,a){for(let f of a)i.attr(f[0],f[1])},DSe=function(i,a,f){let p=new Map;return f?(p.set("width","100%"),p.set("style",`max-width: ${a}px;`)):(p.set("height",i),p.set("width",a)),p},og=function(i,a,f,p){const v=DSe(a,f,p);ISe(i,v)},cT=function(i,a,f,p){const v=a.node().getBBox(),m=v.width,b=v.height;Ut.info(`SVG bounds: ${m}x${b}`,v);let E=0,_=0;Ut.info(`Graph bounds: ${E}x${_}`,i),E=m+f*2,_=b+f*2,Ut.info(`Calculated bounds: ${E}x${_}`),og(a,_,E,p);const L=`${v.x-f} ${v.y-f} ${v.width+2*f} ${v.height+2*f}`;a.attr("viewBox",L)},TOt={draw:(i,a,f)=>{Ut.debug(`renering svg for syntax error +`);const p=fdt(a);p.attr("viewBox","0 0 2412 512"),og(p,100,512,!0);const v=p.append("g");v.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),v.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),v.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),v.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),v.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),v.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),v.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),v.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${f}`)}},OSe=TOt,NSe={db:{},renderer:TOt,parser:{parser:{yy:{}},parse:()=>{}}},COt="flowchart-elk",PSe={id:COt,detector:(i,a)=>{var f;return!!(/^\s*flowchart-elk/.test(i)||/^\s*flowchart|graph/.test(i)&&((f=a==null?void 0:a.flowchart)==null?void 0:f.defaultRenderer)==="elk")},loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>kUe);return{id:COt,diagram:i}}},_Ot="timeline",FSe={id:_Ot,detector:i=>/^\s*timeline/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>zUe);return{id:_Ot,diagram:i}}},SOt="mindmap",BSe={id:SOt,detector:i=>/^\s*mindmap/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>vWe);return{id:SOt,diagram:i}}},AOt="sankey",RSe={id:AOt,detector:i=>/^\s*sankey-beta/.test(i),loader:async()=>{const{diagram:i}=await Promise.resolve().then(()=>WWe);return{id:AOt,diagram:i}}},DW={},jSe=(i,a,f)=>{let p="";return i in DW&&DW[i]?p=DW[i](f):Ut.warn(`No theme found for ${i}`),` & { + font-family: ${f.fontFamily}; + font-size: ${f.fontSize}; + fill: ${f.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${f.errorBkgColor}; + } + & .error-text { + fill: ${f.errorTextColor}; + stroke: ${f.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 2px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${f.lineColor}; + stroke: ${f.lineColor}; + } + & .marker.cross { + stroke: ${f.lineColor}; + } + + & svg { + font-family: ${f.fontFamily}; + font-size: ${f.fontSize}; + } + + ${p} + + ${a} +`},$Se=(i,a)=>{a!==void 0&&(DW[i]=a)},zSe=jSe;let ddt="",gdt="",pdt="";const bdt=i=>Dd(i,Le()),ap=()=>{ddt="",pdt="",gdt=""},cg=i=>{ddt=bdt(i).replace(/^\s+/g,"")},op=()=>ddt,cp=i=>{pdt=bdt(i).replace(/\n\s+/g,` +`)},up=()=>pdt,Z2=i=>{gdt=bdt(i)},Db=()=>gdt,LOt=Object.freeze(Object.defineProperty({__proto__:null,clear:ap,getAccDescription:up,getAccTitle:op,getDiagramTitle:Db,setAccDescription:cp,setAccTitle:cg,setDiagramTitle:Z2},Symbol.toStringTag,{value:"Module"})),qSe=Ut,HSe=jft,JN=Le,GSe=i=>Dd(i,JN()),MOt=cT,VSe=()=>LOt,OW={},NW=(i,a,f)=>{var p;if(OW[i])throw new Error(`Diagram ${i} already registered.`);OW[i]=a,f&&cDt(i,f),$Se(i,a.styles),(p=a.injectUtils)==null||p.call(a,qSe,HSe,JN,GSe,MOt,VSe(),()=>{})},vdt=i=>{if(i in OW)return OW[i];throw new USe(i)};class USe extends Error{constructor(a){super(`Diagram ${a} not found.`)}}let IOt=!1;const wdt=()=>{IOt||(IOt=!0,NW("error",NSe,i=>i.toLowerCase().trim()==="error"),NW("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},i=>i.toLowerCase().trimStart().startsWith("---")),oDt(pSe,SSe,_Se,wSe,ySe,xSe,kSe,TSe,CSe,PSe,vSe,bSe,BSe,FSe,mSe,LSe,ASe,MSe,ESe,RSe))};class DOt{constructor(a,f={}){this.text=a,this.metadata=f,this.type="graph",this.text+=` +`;const p=Le();try{this.type=hW(a,p)}catch(m){this.type="error",this.detectError=m}const v=vdt(this.type);Ut.debug("Type "+this.type),this.db=v.db,this.renderer=v.renderer,this.parser=v.parser,this.parser.parser.yy=this.db,this.init=v.init,this.parse()}parse(){var f,p,v,m,b;if(this.detectError)throw this.detectError;(p=(f=this.db).clear)==null||p.call(f);const a=Le();(v=this.init)==null||v.call(this,a),this.metadata.title&&((b=(m=this.db).setDiagramTitle)==null||b.call(m,this.metadata.title)),this.parser.parse(this.text)}async render(a,f){await this.renderer.draw(this.text,a,f,this)}getParser(){return this.parser}getType(){return this.type}}const mdt=async(i,a={})=>{const f=hW(i,Le());try{vdt(f)}catch{const v=t9e(f);if(!v)throw new aDt(`Diagram ${f} not found.`);const{id:m,diagram:b}=await v();NW(m,b)}return new DOt(i,a)};let ydt=[];const WSe=i=>{ydt.push(i)},KSe=()=>{ydt.forEach(i=>{i()}),ydt=[]};var YSe=xDt(Object.keys,Object);const XSe=YSe;var QSe=Object.prototype,ZSe=QSe.hasOwnProperty;function OOt(i){if(!vW(i))return XSe(i);var a=[];for(var f in Object(i))ZSe.call(i,f)&&f!="constructor"&&a.push(f);return a}var JSe=nT(Jw,"DataView");const xdt=JSe;var tAe=nT(Jw,"Promise");const kdt=tAe;var eAe=nT(Jw,"Set");const GA=eAe;var nAe=nT(Jw,"WeakMap");const Edt=nAe;var NOt="[object Map]",rAe="[object Object]",POt="[object Promise]",FOt="[object Set]",BOt="[object WeakMap]",ROt="[object DataView]",iAe=eT(xdt),sAe=eT(UN),aAe=eT(kdt),oAe=eT(GA),cAe=eT(Edt),uT=tT;(xdt&&uT(new xdt(new ArrayBuffer(1)))!=ROt||UN&&uT(new UN)!=NOt||kdt&&uT(kdt.resolve())!=POt||GA&&uT(new GA)!=FOt||Edt&&uT(new Edt)!=BOt)&&(uT=function(i){var a=tT(i),f=a==rAe?i.constructor:void 0,p=f?eT(f):"";if(p)switch(p){case iAe:return ROt;case sAe:return NOt;case aAe:return POt;case oAe:return FOt;case cAe:return BOt}return a});const VA=uT;var uAe="[object Map]",lAe="[object Set]",hAe=Object.prototype,fAe=hAe.hasOwnProperty;function tP(i){if(i==null)return!0;if(ek(i)&&(Mf(i)||typeof i=="string"||typeof i.splice=="function"||BA(i)||mW(i)||FA(i)))return!i.length;var a=VA(i);if(a==uAe||a==lAe)return!i.size;if(vW(i))return!OOt(i).length;for(var f in i)if(fAe.call(i,f))return!1;return!0}const dAe="graphics-document document";function gAe(i,a){i.attr("role",dAe),a!==""&&i.attr("aria-roledescription",a)}function pAe(i,a,f,p){if(i.insert!==void 0){if(f){const v=`chart-desc-${p}`;i.attr("aria-describedby",v),i.insert("desc",":first-child").attr("id",v).text(f)}if(a){const v=`chart-title-${p}`;i.attr("aria-labelledby",v),i.insert("title",":first-child").attr("id",v).text(a)}}}const bAe=i=>i.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function jOt(i){return typeof i>"u"||i===null}function vAe(i){return typeof i=="object"&&i!==null}function wAe(i){return Array.isArray(i)?i:jOt(i)?[]:[i]}function mAe(i,a){var f,p,v,m;if(a)for(m=Object.keys(a),f=0,p=m.length;fE&&(m=" ... ",a=p-E+m.length),f-p>E&&(b=" ...",f=p+E-b.length),{str:m+i.slice(a,f).replace(/\t/g,"→")+b,pos:p-a+m.length}}function Cdt(i,a){return ug.repeat(" ",a-i.length)+i}function AAe(i,a){if(a=Object.create(a||null),!i.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);for(var f=/\r?\n|\r|\0/g,p=[0],v=[],m,b=-1;m=f.exec(i.buffer);)v.push(m.index),p.push(m.index+m[0].length),i.position<=m.index&&b<0&&(b=p.length-2);b<0&&(b=p.length-1);var E="",_,L,N=Math.min(i.line+a.linesAfter,v.length).toString().length,B=a.maxLength-(a.indent+N+3);for(_=1;_<=a.linesBefore&&!(b-_<0);_++)L=Tdt(i.buffer,p[b-_],v[b-_],i.position-(p[b]-p[b-_]),B),E=ug.repeat(" ",a.indent)+Cdt((i.line-_+1).toString(),N)+" | "+L.str+` +`+E;for(L=Tdt(i.buffer,p[b],v[b],i.position,B),E+=ug.repeat(" ",a.indent)+Cdt((i.line+1).toString(),N)+" | "+L.str+` +`,E+=ug.repeat("-",a.indent+N+3+L.pos)+`^ +`,_=1;_<=a.linesAfter&&!(b+_>=v.length);_++)L=Tdt(i.buffer,p[b+_],v[b+_],i.position-(p[b]-p[b+_]),B),E+=ug.repeat(" ",a.indent)+Cdt((i.line+_+1).toString(),N)+" | "+L.str+` +`;return E.replace(/\n$/,"")}var LAe=AAe,MAe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],IAe=["scalar","sequence","mapping"];function DAe(i){var a={};return i!==null&&Object.keys(i).forEach(function(f){i[f].forEach(function(p){a[String(p)]=f})}),a}function OAe(i,a){if(a=a||{},Object.keys(a).forEach(function(f){if(MAe.indexOf(f)===-1)throw new x5('Unknown option "'+f+'" is met in definition of "'+i+'" YAML type.')}),this.options=a,this.tag=i,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(f){return f},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=DAe(a.styleAliases||null),IAe.indexOf(this.kind)===-1)throw new x5('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}var m0=OAe;function zOt(i,a){var f=[];return i[a].forEach(function(p){var v=f.length;f.forEach(function(m,b){m.tag===p.tag&&m.kind===p.kind&&m.multi===p.multi&&(v=b)}),f[v]=p}),f}function NAe(){var i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},a,f;function p(v){v.multi?(i.multi[v.kind].push(v),i.multi.fallback.push(v)):i[v.kind][v.tag]=i.fallback[v.tag]=v}for(a=0,f=arguments.length;a=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},octal:function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},decimal:function(i){return i.toString(10)},hexadecimal:function(i){return i>=0?"0x"+i.toString(16).toUpperCase():"-0x"+i.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),eLe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function nLe(i){return!(i===null||!eLe.test(i)||i[i.length-1]==="_")}function rLe(i){var a,f;return a=i.replace(/_/g,"").toLowerCase(),f=a[0]==="-"?-1:1,"+-".indexOf(a[0])>=0&&(a=a.slice(1)),a===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:a===".nan"?NaN:f*parseFloat(a,10)}var iLe=/^[-+]?[0-9]+e/;function sLe(i,a){var f;if(isNaN(i))switch(a){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===i)switch(a){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===i)switch(a){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ug.isNegativeZero(i))return"-0.0";return f=i.toString(10),iLe.test(f)?f.replace("e",".e"):f}function aLe(i){return Object.prototype.toString.call(i)==="[object Number]"&&(i%1!==0||ug.isNegativeZero(i))}var oLe=new m0("tag:yaml.org,2002:float",{kind:"scalar",resolve:nLe,construct:rLe,predicate:aLe,represent:sLe,defaultStyle:"lowercase"}),qOt=jAe.extend({implicit:[HAe,WAe,tLe,oLe]}),cLe=qOt,HOt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),GOt=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]))?))?$");function uLe(i){return i===null?!1:HOt.exec(i)!==null||GOt.exec(i)!==null}function lLe(i){var a,f,p,v,m,b,E,_=0,L=null,N,B,j;if(a=HOt.exec(i),a===null&&(a=GOt.exec(i)),a===null)throw new Error("Date resolve error");if(f=+a[1],p=+a[2]-1,v=+a[3],!a[4])return new Date(Date.UTC(f,p,v));if(m=+a[4],b=+a[5],E=+a[6],a[7]){for(_=a[7].slice(0,3);_.length<3;)_+="0";_=+_}return a[9]&&(N=+a[10],B=+(a[11]||0),L=(N*60+B)*6e4,a[9]==="-"&&(L=-L)),j=new Date(Date.UTC(f,p,v,m,b,E,_)),L&&j.setTime(j.getTime()-L),j}function hLe(i){return i.toISOString()}var fLe=new m0("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:uLe,construct:lLe,instanceOf:Date,represent:hLe});function dLe(i){return i==="<<"||i===null}var gLe=new m0("tag:yaml.org,2002:merge",{kind:"scalar",resolve:dLe}),Sdt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function pLe(i){if(i===null)return!1;var a,f,p=0,v=i.length,m=Sdt;for(f=0;f64)){if(a<0)return!1;p+=6}return p%8===0}function bLe(i){var a,f,p=i.replace(/[\r\n=]/g,""),v=p.length,m=Sdt,b=0,E=[];for(a=0;a>16&255),E.push(b>>8&255),E.push(b&255)),b=b<<6|m.indexOf(p.charAt(a));return f=v%4*6,f===0?(E.push(b>>16&255),E.push(b>>8&255),E.push(b&255)):f===18?(E.push(b>>10&255),E.push(b>>2&255)):f===12&&E.push(b>>4&255),new Uint8Array(E)}function vLe(i){var a="",f=0,p,v,m=i.length,b=Sdt;for(p=0;p>18&63],a+=b[f>>12&63],a+=b[f>>6&63],a+=b[f&63]),f=(f<<8)+i[p];return v=m%3,v===0?(a+=b[f>>18&63],a+=b[f>>12&63],a+=b[f>>6&63],a+=b[f&63]):v===2?(a+=b[f>>10&63],a+=b[f>>4&63],a+=b[f<<2&63],a+=b[64]):v===1&&(a+=b[f>>2&63],a+=b[f<<4&63],a+=b[64],a+=b[64]),a}function wLe(i){return Object.prototype.toString.call(i)==="[object Uint8Array]"}var mLe=new m0("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pLe,construct:bLe,predicate:wLe,represent:vLe}),yLe=Object.prototype.hasOwnProperty,xLe=Object.prototype.toString;function kLe(i){if(i===null)return!0;var a=[],f,p,v,m,b,E=i;for(f=0,p=E.length;f>10)+55296,(i-65536&1023)+56320)}for(var ZOt=new Array(256),JOt=new Array(256),WA=0;WA<256;WA++)ZOt[WA]=QOt(WA)?1:0,JOt[WA]=QOt(WA);function qLe(i,a){this.input=i,this.filename=a.filename||null,this.schema=a.schema||OLe,this.onWarning=a.onWarning||null,this.legacy=a.legacy||!1,this.json=a.json||!1,this.listener=a.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=i.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function tNt(i,a){var f={name:i.filename,buffer:i.input.slice(0,-1),position:i.position,line:i.line,column:i.position-i.lineStart};return f.snippet=LAe(f),new x5(a,f)}function _s(i,a){throw tNt(i,a)}function BW(i,a){i.onWarning&&i.onWarning.call(null,tNt(i,a))}var eNt={YAML:function(a,f,p){var v,m,b;a.version!==null&&_s(a,"duplication of %YAML directive"),p.length!==1&&_s(a,"YAML directive accepts exactly one argument"),v=/^([0-9]+)\.([0-9]+)$/.exec(p[0]),v===null&&_s(a,"ill-formed argument of the YAML directive"),m=parseInt(v[1],10),b=parseInt(v[2],10),m!==1&&_s(a,"unacceptable YAML version of the document"),a.version=p[0],a.checkLineBreaks=b<2,b!==1&&b!==2&&BW(a,"unsupported YAML version of the document")},TAG:function(a,f,p){var v,m;p.length!==2&&_s(a,"TAG directive accepts exactly two arguments"),v=p[0],m=p[1],KOt.test(v)||_s(a,"ill-formed tag handle (first argument) of the TAG directive"),rk.call(a.tagMap,v)&&_s(a,'there is a previously declared suffix for "'+v+'" tag handle'),YOt.test(m)||_s(a,"ill-formed tag prefix (second argument) of the TAG directive");try{m=decodeURIComponent(m)}catch{_s(a,"tag prefix is malformed: "+m)}a.tagMap[v]=m}};function ik(i,a,f,p){var v,m,b,E;if(a1&&(i.result+=ug.repeat(` +`,a-1))}function HLe(i,a,f){var p,v,m,b,E,_,L,N,B=i.kind,j=i.result,R;if(R=i.input.charCodeAt(i.position),lp(R)||UA(R)||R===35||R===38||R===42||R===33||R===124||R===62||R===39||R===34||R===37||R===64||R===96||(R===63||R===45)&&(v=i.input.charCodeAt(i.position+1),lp(v)||f&&UA(v)))return!1;for(i.kind="scalar",i.result="",m=b=i.position,E=!1;R!==0;){if(R===58){if(v=i.input.charCodeAt(i.position+1),lp(v)||f&&UA(v))break}else if(R===35){if(p=i.input.charCodeAt(i.position-1),lp(p))break}else{if(i.position===i.lineStart&&RW(i)||f&&UA(R))break;if(f3(R))if(_=i.line,L=i.lineStart,N=i.lineIndent,Df(i,!1,-1),i.lineIndent>=a){E=!0,R=i.input.charCodeAt(i.position);continue}else{i.position=b,i.line=_,i.lineStart=L,i.lineIndent=N;break}}E&&(ik(i,m,b,!1),Mdt(i,i.line-_),m=b=i.position,E=!1),lT(R)||(b=i.position+1),R=i.input.charCodeAt(++i.position)}return ik(i,m,b,!1),i.result?!0:(i.kind=B,i.result=j,!1)}function GLe(i,a){var f,p,v;if(f=i.input.charCodeAt(i.position),f!==39)return!1;for(i.kind="scalar",i.result="",i.position++,p=v=i.position;(f=i.input.charCodeAt(i.position))!==0;)if(f===39)if(ik(i,p,i.position,!0),f=i.input.charCodeAt(++i.position),f===39)p=i.position,i.position++,v=i.position;else return!0;else f3(f)?(ik(i,p,v,!0),Mdt(i,Df(i,!1,a)),p=v=i.position):i.position===i.lineStart&&RW(i)?_s(i,"unexpected end of the document within a single quoted scalar"):(i.position++,v=i.position);_s(i,"unexpected end of the stream within a single quoted scalar")}function VLe(i,a){var f,p,v,m,b,E;if(E=i.input.charCodeAt(i.position),E!==34)return!1;for(i.kind="scalar",i.result="",i.position++,f=p=i.position;(E=i.input.charCodeAt(i.position))!==0;){if(E===34)return ik(i,f,i.position,!0),i.position++,!0;if(E===92){if(ik(i,f,i.position,!0),E=i.input.charCodeAt(++i.position),f3(E))Df(i,!1,a);else if(E<256&&ZOt[E])i.result+=JOt[E],i.position++;else if((b=jLe(E))>0){for(v=b,m=0;v>0;v--)E=i.input.charCodeAt(++i.position),(b=RLe(E))>=0?m=(m<<4)+b:_s(i,"expected hexadecimal character");i.result+=zLe(m),i.position++}else _s(i,"unknown escape sequence");f=p=i.position}else f3(E)?(ik(i,f,p,!0),Mdt(i,Df(i,!1,a)),f=p=i.position):i.position===i.lineStart&&RW(i)?_s(i,"unexpected end of the document within a double quoted scalar"):(i.position++,p=i.position)}_s(i,"unexpected end of the stream within a double quoted scalar")}function ULe(i,a){var f=!0,p,v,m,b=i.tag,E,_=i.anchor,L,N,B,j,R,z=Object.create(null),K,it,st,ut;if(ut=i.input.charCodeAt(i.position),ut===91)N=93,R=!1,E=[];else if(ut===123)N=125,R=!0,E={};else return!1;for(i.anchor!==null&&(i.anchorMap[i.anchor]=E),ut=i.input.charCodeAt(++i.position);ut!==0;){if(Df(i,!0,a),ut=i.input.charCodeAt(i.position),ut===N)return i.position++,i.tag=b,i.anchor=_,i.kind=R?"mapping":"sequence",i.result=E,!0;f?ut===44&&_s(i,"expected the node content, but found ','"):_s(i,"missed comma between flow collection entries"),it=K=st=null,B=j=!1,ut===63&&(L=i.input.charCodeAt(i.position+1),lp(L)&&(B=j=!0,i.position++,Df(i,!0,a))),p=i.line,v=i.lineStart,m=i.position,YA(i,a,PW,!1,!0),it=i.tag,K=i.result,Df(i,!0,a),ut=i.input.charCodeAt(i.position),(j||i.line===p)&&ut===58&&(B=!0,ut=i.input.charCodeAt(++i.position),Df(i,!0,a),YA(i,a,PW,!1,!0),st=i.result),R?KA(i,E,z,it,K,st,p,v,m):B?E.push(KA(i,null,z,it,K,st,p,v,m)):E.push(K),Df(i,!0,a),ut=i.input.charCodeAt(i.position),ut===44?(f=!0,ut=i.input.charCodeAt(++i.position)):f=!1}_s(i,"unexpected end of the stream within a flow collection")}function WLe(i,a){var f,p,v=Adt,m=!1,b=!1,E=a,_=0,L=!1,N,B;if(B=i.input.charCodeAt(i.position),B===124)p=!1;else if(B===62)p=!0;else return!1;for(i.kind="scalar",i.result="";B!==0;)if(B=i.input.charCodeAt(++i.position),B===43||B===45)Adt===v?v=B===43?WOt:NLe:_s(i,"repeat of a chomping mode identifier");else if((N=$Le(B))>=0)N===0?_s(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):b?_s(i,"repeat of an indentation width identifier"):(E=a+N-1,b=!0);else break;if(lT(B)){do B=i.input.charCodeAt(++i.position);while(lT(B));if(B===35)do B=i.input.charCodeAt(++i.position);while(!f3(B)&&B!==0)}for(;B!==0;){for(Ldt(i),i.lineIndent=0,B=i.input.charCodeAt(i.position);(!b||i.lineIndentE&&(E=i.lineIndent),f3(B)){_++;continue}if(i.lineIndenta)&&_!==0)_s(i,"bad indentation of a sequence entry");else if(i.lineIndenta)&&(it&&(b=i.line,E=i.lineStart,_=i.position),YA(i,a,FW,!0,v)&&(it?z=i.result:K=i.result),it||(KA(i,B,j,R,z,K,b,E,_),R=z=K=null),Df(i,!0,-1),ut=i.input.charCodeAt(i.position)),(i.line===m||i.lineIndent>a)&&ut!==0)_s(i,"bad indentation of a mapping entry");else if(i.lineIndenta?_=1:i.lineIndent===a?_=0:i.lineIndenta?_=1:i.lineIndent===a?_=0:i.lineIndent tag; it should be "scalar", not "'+i.kind+'"'),B=0,j=i.implicitTypes.length;B"),i.result!==null&&z.kind!==i.kind&&_s(i,"unacceptable node kind for !<"+i.tag+'> tag; it should be "'+z.kind+'", not "'+i.kind+'"'),z.resolve(i.result,i.tag)?(i.result=z.construct(i.result,i.tag),i.anchor!==null&&(i.anchorMap[i.anchor]=i.result)):_s(i,"cannot resolve a node with !<"+i.tag+"> explicit tag")}return i.listener!==null&&i.listener("close",i),i.tag!==null||i.anchor!==null||N}function ZLe(i){var a=i.position,f,p,v,m=!1,b;for(i.version=null,i.checkLineBreaks=i.legacy,i.tagMap=Object.create(null),i.anchorMap=Object.create(null);(b=i.input.charCodeAt(i.position))!==0&&(Df(i,!0,-1),b=i.input.charCodeAt(i.position),!(i.lineIndent>0||b!==37));){for(m=!0,b=i.input.charCodeAt(++i.position),f=i.position;b!==0&&!lp(b);)b=i.input.charCodeAt(++i.position);for(p=i.input.slice(f,i.position),v=[],p.length<1&&_s(i,"directive name must not be less than one character in length");b!==0;){for(;lT(b);)b=i.input.charCodeAt(++i.position);if(b===35){do b=i.input.charCodeAt(++i.position);while(b!==0&&!f3(b));break}if(f3(b))break;for(f=i.position;b!==0&&!lp(b);)b=i.input.charCodeAt(++i.position);v.push(i.input.slice(f,i.position))}b!==0&&Ldt(i),rk.call(eNt,p)?eNt[p](i,p,v):BW(i,'unknown document directive "'+p+'"')}if(Df(i,!0,-1),i.lineIndent===0&&i.input.charCodeAt(i.position)===45&&i.input.charCodeAt(i.position+1)===45&&i.input.charCodeAt(i.position+2)===45?(i.position+=3,Df(i,!0,-1)):m&&_s(i,"directives end mark is expected"),YA(i,i.lineIndent-1,FW,!1,!0),Df(i,!0,-1),i.checkLineBreaks&&FLe.test(i.input.slice(a,i.position))&&BW(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&RW(i)){i.input.charCodeAt(i.position)===46&&(i.position+=3,Df(i,!0,-1));return}if(i.position"u"&&(f=a,a=null);var p=iNt(i,f);if(typeof a!="function")return p;for(var v=0,m=p.length;vi.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(a,f,p)=>"<"+f+p.replace(/="([^"]*)"/g,"='$1'")+">"),cMe=i=>{const{text:a,metadata:f}=aMe(i),{displayMode:p,title:v,config:m={}}=f;return p&&(m.gantt||(m.gantt={}),m.gantt.displayMode=p),{title:v,config:m,text:a}},uMe=i=>{const a=$a.detectInit(i)??{},f=$a.detectDirective(i,"wrap");return Array.isArray(f)?a.wrap=f.some(({type:p})=>{}):(f==null?void 0:f.type)==="wrap"&&(a.wrap=!0),{text:O_e(i),directive:a}};function lMe(i){const a=oMe(i),f=cMe(a),p=uMe(f.text),v=idt(f.config,p.directive);return i=bAe(p.text),{code:i,title:f.title,config:v}}const hMe=5e4,fMe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",dMe="sandbox",gMe="loose",pMe="http://www.w3.org/2000/svg",bMe="http://www.w3.org/1999/xlink",vMe="http://www.w3.org/1999/xhtml",wMe="100%",mMe="100%",yMe="border:0;margin:0;",xMe="margin:0",kMe="allow-top-navigation-by-user-activation allow-popups",EMe='The "iframe" tag is not supported by your browser.',TMe=["foreignobject"],CMe=["dominant-baseline"];function sNt(i){const a=lMe(i);return IW(),fSe(a.config??{}),a}async function _Me(i,a){wdt(),i=sNt(i).code;try{await mdt(i)}catch(f){if(a!=null&&a.suppressErrors)return!1;throw f}return!0}const SMe=function(i){let a=i;return a=a.replace(/style.*:\S*#.*;/g,function(f){return f.substring(0,f.length-1)}),a=a.replace(/classDef.*:\S*#.*;/g,function(f){return f.substring(0,f.length-1)}),a=a.replace(/#\w+;/g,function(f){const p=f.substring(1,f.length-1);return/^\+?\d+$/.test(p)?"fl°°"+p+"¶ß":"fl°"+p+"¶ß"}),a},nP=function(i){return i.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},aNt=(i,a,f=[])=>` +.${i} ${a} { ${f.join(" !important; ")} !important; }`,AMe=(i,a={})=>{var p;let f="";if(i.themeCSS!==void 0&&(f+=` +${i.themeCSS}`),i.fontFamily!==void 0&&(f+=` +:root { --mermaid-font-family: ${i.fontFamily}}`),i.altFontFamily!==void 0&&(f+=` +:root { --mermaid-alt-font-family: ${i.altFontFamily}}`),!tP(a)){const E=i.htmlLabels||((p=i.flowchart)==null?void 0:p.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const _ in a){const L=a[_];tP(L.styles)||E.forEach(N=>{f+=aNt(L.id,N,L.styles)}),tP(L.textStyles)||(f+=aNt(L.id,"tspan",L.textStyles))}}return f},LMe=(i,a,f,p)=>{const v=AMe(i,f),m=zSe(a,v,i.themeVariables);return hdt(aSe(`${p}{${m}}`),cSe)},MMe=(i="",a,f)=>{let p=i;return!f&&!a&&(p=p.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),p=nP(p),p=p.replace(/
/g,"
"),p},IMe=(i="",a)=>{var v,m;const f=(m=(v=a==null?void 0:a.viewBox)==null?void 0:v.baseVal)!=null&&m.height?a.viewBox.baseVal.height+"px":mMe,p=btoa(''+i+"");return``},oNt=(i,a,f,p,v)=>{const m=i.append("div");m.attr("id",f),p&&m.attr("style",p);const b=m.append("svg").attr("id",a).attr("width","100%").attr("xmlns",pMe);return v&&b.attr("xmlns:xlink",v),b.append("g"),i};function cNt(i,a){return i.append("iframe").attr("id",a).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const DMe=(i,a,f,p)=>{var v,m,b;(v=i.getElementById(a))==null||v.remove(),(m=i.getElementById(f))==null||m.remove(),(b=i.getElementById(p))==null||b.remove()},OMe=async function(i,a,f){var nt,Ot,Nt,qt,Ct,Z;wdt();const p=sNt(a);a=p.code;const v=Le();Ut.debug(v),a.length>((v==null?void 0:v.maxTextSize)??hMe)&&(a=fMe);const m="#"+i,b="i"+i,E="#"+b,_="d"+i,L="#"+_;let N=yr("body");const B=v.securityLevel===dMe,j=v.securityLevel===gMe,R=v.fontFamily;if(f!==void 0){if(f&&(f.innerHTML=""),B){const Tt=cNt(yr(f),b);N=yr(Tt.nodes()[0].contentDocument.body),N.node().style.margin=0}else N=yr(f);oNt(N,i,_,`font-family: ${R}`,bMe)}else{if(DMe(document,i,_,b),B){const Tt=cNt(yr("body"),b);N=yr(Tt.nodes()[0].contentDocument.body),N.node().style.margin=0}else N=yr("body");oNt(N,i,_)}a=SMe(a);let z,K;try{z=await mdt(a,{title:p.title})}catch(Tt){z=new DOt("error"),K=Tt}const it=N.select(L).node(),st=z.type,ut=it.firstChild,bt=ut.firstChild,mt=(Ot=(nt=z.renderer).getClasses)==null?void 0:Ot.call(nt,a,z),yt=LMe(v,st,mt,m),dt=document.createElement("style");dt.innerHTML=yt,ut.insertBefore(dt,bt);try{await z.renderer.draw(a,i,eOt,z)}catch(Tt){throw OSe.draw(a,i,eOt),Tt}const ht=N.select(`${L} svg`),wt=(qt=(Nt=z.db).getAccTitle)==null?void 0:qt.call(Nt),X=(Z=(Ct=z.db).getAccDescription)==null?void 0:Z.call(Ct);PMe(st,ht,wt,X),N.select(`[id="${i}"]`).selectAll("foreignobject > *").attr("xmlns",vMe);let pt=N.select(L).node().innerHTML;if(Ut.debug("config.arrowMarkerAbsolute",v.arrowMarkerAbsolute),pt=MMe(pt,B,s1(v.arrowMarkerAbsolute)),B){const Tt=N.select(L+" svg").node();pt=IMe(pt,Tt)}else j||(pt=eW.sanitize(pt,{ADD_TAGS:TMe,ADD_ATTR:CMe}));if(KSe(),K)throw K;const xt=yr(B?E:L).node();return xt&&"remove"in xt&&xt.remove(),{svg:pt,bindFunctions:z.db.bindFunctions}};function NMe(i={}){var f;i!=null&&i.fontFamily&&!((f=i.themeVariables)!=null&&f.fontFamily)&&(i.themeVariables||(i.themeVariables={}),i.themeVariables.fontFamily=i.fontFamily),lSe(i),i!=null&&i.theme&&i.theme in w5?i.themeVariables=w5[i.theme].getThemeVariables(i.themeVariables):i&&(i.themeVariables=w5.default.getThemeVariables(i.themeVariables));const a=typeof i=="object"?uSe(i):rOt();jft(a.logLevel),wdt()}function PMe(i,a,f,p){gAe(a,i),pAe(a,f,p,a.attr("id"))}const hT=Object.freeze({render:OMe,parse:_Me,getDiagramFromText:mdt,initialize:NMe,getConfig:Le,setConfig:iOt,getSiteConfig:rOt,updateSiteConfig:hSe,reset:()=>{IW()},globalReset:()=>{IW(oT)},defaultConfig:oT});jft(Le().logLevel),IW(Le());const FMe=async()=>{Ut.debug("Loading registered diagrams");const a=(await Promise.allSettled(Object.entries(DA).map(async([f,{detector:p,loader:v}])=>{if(v)try{vdt(f)}catch{try{const{diagram:b,id:E}=await v();NW(E,b,p)}catch(b){throw Ut.error(`Failed to load external diagram with key ${f}. Removing from detectors.`),delete DA[f],b}}}))).filter(f=>f.status==="rejected");if(a.length>0){Ut.error(`Failed to load ${a.length} external diagrams`);for(const f of a)Ut.error(f);throw new Error(`Failed to load ${a.length} external diagrams`)}},BMe=(i,a,f)=>{Ut.warn(i),UDt(i)?(f&&f(i.str,i.hash),a.push({...i,message:i.str,error:i})):(f&&f(i),i instanceof Error&&a.push({str:i.message,message:i.message,hash:i.name,error:i}))},uNt=async function(i={querySelector:".mermaid"}){try{await RMe(i)}catch(a){if(UDt(a)&&Ut.error(a.str),Ob.parseError&&Ob.parseError(a),!i.suppressErrors)throw Ut.error("Use the suppressErrors option to suppress these errors"),a}},RMe=async function({postRenderCallback:i,querySelector:a,nodes:f}={querySelector:".mermaid"}){const p=hT.getConfig();Ut.debug(`${i?"":"No "}Callback function found`);let v;if(f)v=f;else if(a)v=document.querySelectorAll(a);else throw new Error("Nodes and querySelector are both undefined");Ut.debug(`Found ${v.length} diagrams`),(p==null?void 0:p.startOnLoad)!==void 0&&(Ut.debug("Start On Load: "+(p==null?void 0:p.startOnLoad)),hT.updateSiteConfig({startOnLoad:p==null?void 0:p.startOnLoad}));const m=new $a.InitIDGenerator(p.deterministicIds,p.deterministicIDSeed);let b;const E=[];for(const _ of Array.from(v)){Ut.info("Rendering diagram: "+_.id);/*! Check if previously processed */if(_.getAttribute("data-processed"))continue;_.setAttribute("data-processed","true");const L=`mermaid-${m.next()}`;b=_.innerHTML,b=wA($a.entityDecode(b)).trim().replace(//gi,"
");const N=$a.detectInit(b);N&&Ut.debug("Detected early reinit: ",N);try{const{svg:B,bindFunctions:j}=await dNt(L,b,_);_.innerHTML=B,i&&await i(L),j&&j(_)}catch(B){BMe(B,E,Ob.parseError)}}if(E.length>0)throw E[0]},lNt=function(i){hT.initialize(i)},jMe=async function(i,a,f){Ut.warn("mermaid.init is deprecated. Please use run instead."),i&&lNt(i);const p={postRenderCallback:f,querySelector:".mermaid"};typeof a=="string"?p.querySelector=a:a&&(a instanceof HTMLElement?p.nodes=[a]:p.nodes=a),await uNt(p)},$Me=async(i,{lazyLoad:a=!0}={})=>{oDt(...i),a===!1&&await FMe()},hNt=function(){if(Ob.startOnLoad){const{startOnLoad:i}=hT.getConfig();i&&Ob.run().catch(a=>Ut.error("Mermaid failed to initialize",a))}};if(typeof document<"u"){/*! + * Wait for document loaded before starting the execution + */window.addEventListener("load",hNt,!1)}const zMe=function(i){Ob.parseError=i},jW=[];let Idt=!1;const fNt=async()=>{if(!Idt){for(Idt=!0;jW.length>0;){const i=jW.shift();if(i)try{await i()}catch(a){Ut.error("Error executing queue",a)}}Idt=!1}},qMe=async(i,a)=>new Promise((f,p)=>{const v=()=>new Promise((m,b)=>{hT.parse(i,a).then(E=>{m(E),f(E)},E=>{var _;Ut.error("Error parsing",E),(_=Ob.parseError)==null||_.call(Ob,E),b(E),p(E)})});jW.push(v),fNt().catch(p)}),dNt=(i,a,f)=>new Promise((p,v)=>{const m=()=>new Promise((b,E)=>{hT.render(i,a,f).then(_=>{b(_),p(_)},_=>{var L;Ut.error("Error parsing",_),(L=Ob.parseError)==null||L.call(Ob,_),E(_),v(_)})});jW.push(m),fNt().catch(v)}),Ob={startOnLoad:!0,mermaidAPI:hT,parse:qMe,render:dNt,init:jMe,run:uNt,registerExternalDiagrams:$Me,initialize:lNt,parseError:void 0,contentLoaded:hNt,setParseErrorHandler:zMe,detectType:hW};var $W=function(){var i=function(ds,Dr,nr,di){for(nr=nr||{},di=ds.length;di--;nr[ds[di]]=Dr);return nr},a=[1,24],f=[1,25],p=[1,26],v=[1,27],m=[1,28],b=[1,63],E=[1,64],_=[1,65],L=[1,66],N=[1,67],B=[1,68],j=[1,69],R=[1,29],z=[1,30],K=[1,31],it=[1,32],st=[1,33],ut=[1,34],bt=[1,35],mt=[1,36],yt=[1,37],dt=[1,38],ht=[1,39],wt=[1,40],X=[1,41],pt=[1,42],U=[1,43],xt=[1,44],nt=[1,45],Ot=[1,46],Nt=[1,47],qt=[1,48],Ct=[1,50],Z=[1,51],Tt=[1,52],Ht=[1,53],It=[1,54],Ft=[1,55],ke=[1,56],pn=[1,57],Me=[1,58],ve=[1,59],Ge=[1,60],Ke=[14,42],we=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],_e=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],$t=[1,82],re=[1,83],ie=[1,84],Oe=[1,85],oe=[12,14,42],Ne=[12,14,33,42],me=[12,14,33,42,76,77,79,80],cn=[12,33],li=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ya={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(Dr,nr,di,Ee,Yn,He,Ti){var gn=He.length-1;switch(Yn){case 3:Ee.setDirection("TB");break;case 4:Ee.setDirection("BT");break;case 5:Ee.setDirection("RL");break;case 6:Ee.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:Ee.setC4Type(He[gn-3]);break;case 19:Ee.setTitle(He[gn].substring(6)),this.$=He[gn].substring(6);break;case 20:Ee.setAccDescription(He[gn].substring(15)),this.$=He[gn].substring(15);break;case 21:this.$=He[gn].trim(),Ee.setTitle(this.$);break;case 22:case 23:this.$=He[gn].trim(),Ee.setAccDescription(this.$);break;case 28:case 29:He[gn].splice(2,0,"ENTERPRISE"),Ee.addPersonOrSystemBoundary(...He[gn]),this.$=He[gn];break;case 30:Ee.addPersonOrSystemBoundary(...He[gn]),this.$=He[gn];break;case 31:He[gn].splice(2,0,"CONTAINER"),Ee.addContainerBoundary(...He[gn]),this.$=He[gn];break;case 32:Ee.addDeploymentNode("node",...He[gn]),this.$=He[gn];break;case 33:Ee.addDeploymentNode("nodeL",...He[gn]),this.$=He[gn];break;case 34:Ee.addDeploymentNode("nodeR",...He[gn]),this.$=He[gn];break;case 35:Ee.popBoundaryParseStack();break;case 39:Ee.addPersonOrSystem("person",...He[gn]),this.$=He[gn];break;case 40:Ee.addPersonOrSystem("external_person",...He[gn]),this.$=He[gn];break;case 41:Ee.addPersonOrSystem("system",...He[gn]),this.$=He[gn];break;case 42:Ee.addPersonOrSystem("system_db",...He[gn]),this.$=He[gn];break;case 43:Ee.addPersonOrSystem("system_queue",...He[gn]),this.$=He[gn];break;case 44:Ee.addPersonOrSystem("external_system",...He[gn]),this.$=He[gn];break;case 45:Ee.addPersonOrSystem("external_system_db",...He[gn]),this.$=He[gn];break;case 46:Ee.addPersonOrSystem("external_system_queue",...He[gn]),this.$=He[gn];break;case 47:Ee.addContainer("container",...He[gn]),this.$=He[gn];break;case 48:Ee.addContainer("container_db",...He[gn]),this.$=He[gn];break;case 49:Ee.addContainer("container_queue",...He[gn]),this.$=He[gn];break;case 50:Ee.addContainer("external_container",...He[gn]),this.$=He[gn];break;case 51:Ee.addContainer("external_container_db",...He[gn]),this.$=He[gn];break;case 52:Ee.addContainer("external_container_queue",...He[gn]),this.$=He[gn];break;case 53:Ee.addComponent("component",...He[gn]),this.$=He[gn];break;case 54:Ee.addComponent("component_db",...He[gn]),this.$=He[gn];break;case 55:Ee.addComponent("component_queue",...He[gn]),this.$=He[gn];break;case 56:Ee.addComponent("external_component",...He[gn]),this.$=He[gn];break;case 57:Ee.addComponent("external_component_db",...He[gn]),this.$=He[gn];break;case 58:Ee.addComponent("external_component_queue",...He[gn]),this.$=He[gn];break;case 60:Ee.addRel("rel",...He[gn]),this.$=He[gn];break;case 61:Ee.addRel("birel",...He[gn]),this.$=He[gn];break;case 62:Ee.addRel("rel_u",...He[gn]),this.$=He[gn];break;case 63:Ee.addRel("rel_d",...He[gn]),this.$=He[gn];break;case 64:Ee.addRel("rel_l",...He[gn]),this.$=He[gn];break;case 65:Ee.addRel("rel_r",...He[gn]),this.$=He[gn];break;case 66:Ee.addRel("rel_b",...He[gn]),this.$=He[gn];break;case 67:He[gn].splice(0,1),Ee.addRel("rel",...He[gn]),this.$=He[gn];break;case 68:Ee.updateElStyle("update_el_style",...He[gn]),this.$=He[gn];break;case 69:Ee.updateRelStyle("update_rel_style",...He[gn]),this.$=He[gn];break;case 70:Ee.updateLayoutConfig("update_layout_config",...He[gn]),this.$=He[gn];break;case 71:this.$=[He[gn]];break;case 72:He[gn].unshift(He[gn-1]),this.$=He[gn];break;case 73:case 75:this.$=He[gn].trim();break;case 74:let ks={};ks[He[gn-1].trim()]=He[gn].trim(),this.$=ks;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:a,23:f,24:p,26:v,28:m,29:49,30:61,32:62,34:b,36:E,37:_,38:L,39:N,40:B,41:j,43:23,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge},{13:70,19:20,20:21,21:22,22:a,23:f,24:p,26:v,28:m,29:49,30:61,32:62,34:b,36:E,37:_,38:L,39:N,40:B,41:j,43:23,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge},{13:71,19:20,20:21,21:22,22:a,23:f,24:p,26:v,28:m,29:49,30:61,32:62,34:b,36:E,37:_,38:L,39:N,40:B,41:j,43:23,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge},{13:72,19:20,20:21,21:22,22:a,23:f,24:p,26:v,28:m,29:49,30:61,32:62,34:b,36:E,37:_,38:L,39:N,40:B,41:j,43:23,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge},{13:73,19:20,20:21,21:22,22:a,23:f,24:p,26:v,28:m,29:49,30:61,32:62,34:b,36:E,37:_,38:L,39:N,40:B,41:j,43:23,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge},{14:[1,74]},i(Ke,[2,13],{43:23,29:49,30:61,32:62,20:75,34:b,36:E,37:_,38:L,39:N,40:B,41:j,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge}),i(Ke,[2,14]),i(we,[2,16],{12:[1,76]}),i(Ke,[2,36],{12:[1,77]}),i(_e,[2,19]),i(_e,[2,20]),{25:[1,78]},{27:[1,79]},i(_e,[2,23]),{35:80,75:81,76:$t,77:re,79:ie,80:Oe},{35:86,75:81,76:$t,77:re,79:ie,80:Oe},{35:87,75:81,76:$t,77:re,79:ie,80:Oe},{35:88,75:81,76:$t,77:re,79:ie,80:Oe},{35:89,75:81,76:$t,77:re,79:ie,80:Oe},{35:90,75:81,76:$t,77:re,79:ie,80:Oe},{35:91,75:81,76:$t,77:re,79:ie,80:Oe},{35:92,75:81,76:$t,77:re,79:ie,80:Oe},{35:93,75:81,76:$t,77:re,79:ie,80:Oe},{35:94,75:81,76:$t,77:re,79:ie,80:Oe},{35:95,75:81,76:$t,77:re,79:ie,80:Oe},{35:96,75:81,76:$t,77:re,79:ie,80:Oe},{35:97,75:81,76:$t,77:re,79:ie,80:Oe},{35:98,75:81,76:$t,77:re,79:ie,80:Oe},{35:99,75:81,76:$t,77:re,79:ie,80:Oe},{35:100,75:81,76:$t,77:re,79:ie,80:Oe},{35:101,75:81,76:$t,77:re,79:ie,80:Oe},{35:102,75:81,76:$t,77:re,79:ie,80:Oe},{35:103,75:81,76:$t,77:re,79:ie,80:Oe},{35:104,75:81,76:$t,77:re,79:ie,80:Oe},i(oe,[2,59]),{35:105,75:81,76:$t,77:re,79:ie,80:Oe},{35:106,75:81,76:$t,77:re,79:ie,80:Oe},{35:107,75:81,76:$t,77:re,79:ie,80:Oe},{35:108,75:81,76:$t,77:re,79:ie,80:Oe},{35:109,75:81,76:$t,77:re,79:ie,80:Oe},{35:110,75:81,76:$t,77:re,79:ie,80:Oe},{35:111,75:81,76:$t,77:re,79:ie,80:Oe},{35:112,75:81,76:$t,77:re,79:ie,80:Oe},{35:113,75:81,76:$t,77:re,79:ie,80:Oe},{35:114,75:81,76:$t,77:re,79:ie,80:Oe},{35:115,75:81,76:$t,77:re,79:ie,80:Oe},{20:116,29:49,30:61,32:62,34:b,36:E,37:_,38:L,39:N,40:B,41:j,43:23,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge},{12:[1,118],33:[1,117]},{35:119,75:81,76:$t,77:re,79:ie,80:Oe},{35:120,75:81,76:$t,77:re,79:ie,80:Oe},{35:121,75:81,76:$t,77:re,79:ie,80:Oe},{35:122,75:81,76:$t,77:re,79:ie,80:Oe},{35:123,75:81,76:$t,77:re,79:ie,80:Oe},{35:124,75:81,76:$t,77:re,79:ie,80:Oe},{35:125,75:81,76:$t,77:re,79:ie,80:Oe},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},i(Ke,[2,15]),i(we,[2,17],{21:22,19:130,22:a,23:f,24:p,26:v,28:m}),i(Ke,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:a,23:f,24:p,26:v,28:m,34:b,36:E,37:_,38:L,39:N,40:B,41:j,44:R,45:z,46:K,47:it,48:st,49:ut,50:bt,51:mt,52:yt,53:dt,54:ht,55:wt,56:X,57:pt,58:U,59:xt,60:nt,61:Ot,62:Nt,63:qt,64:Ct,65:Z,66:Tt,67:Ht,68:It,69:Ft,70:ke,71:pn,72:Me,73:ve,74:Ge}),i(_e,[2,21]),i(_e,[2,22]),i(oe,[2,39]),i(Ne,[2,71],{75:81,35:132,76:$t,77:re,79:ie,80:Oe}),i(me,[2,73]),{78:[1,133]},i(me,[2,75]),i(me,[2,76]),i(oe,[2,40]),i(oe,[2,41]),i(oe,[2,42]),i(oe,[2,43]),i(oe,[2,44]),i(oe,[2,45]),i(oe,[2,46]),i(oe,[2,47]),i(oe,[2,48]),i(oe,[2,49]),i(oe,[2,50]),i(oe,[2,51]),i(oe,[2,52]),i(oe,[2,53]),i(oe,[2,54]),i(oe,[2,55]),i(oe,[2,56]),i(oe,[2,57]),i(oe,[2,58]),i(oe,[2,60]),i(oe,[2,61]),i(oe,[2,62]),i(oe,[2,63]),i(oe,[2,64]),i(oe,[2,65]),i(oe,[2,66]),i(oe,[2,67]),i(oe,[2,68]),i(oe,[2,69]),i(oe,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},i(cn,[2,28]),i(cn,[2,29]),i(cn,[2,30]),i(cn,[2,31]),i(cn,[2,32]),i(cn,[2,33]),i(cn,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},i(we,[2,18]),i(Ke,[2,38]),i(Ne,[2,72]),i(me,[2,74]),i(oe,[2,24]),i(oe,[2,35]),i(li,[2,25]),i(li,[2,26],{12:[1,138]}),i(li,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(Dr,nr){if(nr.recoverable)this.trace(Dr);else{var di=new Error(Dr);throw di.hash=nr,di}},parse:function(Dr){var nr=this,di=[0],Ee=[],Yn=[null],He=[],Ti=this.table,gn="",ks=0,qa=0,La=2,Gs=1,No=He.slice.call(arguments,1),vs=Object.create(this.lexer),nu={yy:{}};for(var $s in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$s)&&(nu.yy[$s]=this.yy[$s]);vs.setInput(Dr,nu.yy),nu.yy.lexer=vs,nu.yy.parser=this,typeof vs.yylloc>"u"&&(vs.yylloc={});var Lu=vs.yylloc;He.push(Lu);var fm=vs.options&&vs.options.ranges;typeof nu.yy.parseError=="function"?this.parseError=nu.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function av(){var Ll;return Ll=Ee.pop()||vs.lex()||Gs,typeof Ll!="number"&&(Ll instanceof Array&&(Ee=Ll,Ll=Ee.pop()),Ll=nr.symbols_[Ll]||Ll),Ll}for(var Uu,Zl,Pa,Al,ua={},bc,Cc,ga,Ma;;){if(Zl=di[di.length-1],this.defaultActions[Zl]?Pa=this.defaultActions[Zl]:((Uu===null||typeof Uu>"u")&&(Uu=av()),Pa=Ti[Zl]&&Ti[Zl][Uu]),typeof Pa>"u"||!Pa.length||!Pa[0]){var Ha="";Ma=[];for(bc in Ti[Zl])this.terminals_[bc]&&bc>La&&Ma.push("'"+this.terminals_[bc]+"'");vs.showPosition?Ha="Parse error on line "+(ks+1)+`: +`+vs.showPosition()+` +Expecting `+Ma.join(", ")+", got '"+(this.terminals_[Uu]||Uu)+"'":Ha="Parse error on line "+(ks+1)+": Unexpected "+(Uu==Gs?"end of input":"'"+(this.terminals_[Uu]||Uu)+"'"),this.parseError(Ha,{text:vs.match,token:this.terminals_[Uu]||Uu,line:vs.yylineno,loc:Lu,expected:Ma})}if(Pa[0]instanceof Array&&Pa.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Zl+", token: "+Uu);switch(Pa[0]){case 1:di.push(Uu),Yn.push(vs.yytext),He.push(vs.yylloc),di.push(Pa[1]),Uu=null,qa=vs.yyleng,gn=vs.yytext,ks=vs.yylineno,Lu=vs.yylloc;break;case 2:if(Cc=this.productions_[Pa[1]][1],ua.$=Yn[Yn.length-Cc],ua._$={first_line:He[He.length-(Cc||1)].first_line,last_line:He[He.length-1].last_line,first_column:He[He.length-(Cc||1)].first_column,last_column:He[He.length-1].last_column},fm&&(ua._$.range=[He[He.length-(Cc||1)].range[0],He[He.length-1].range[1]]),Al=this.performAction.apply(ua,[gn,qa,ks,nu.yy,Pa[1],Yn,He].concat(No)),typeof Al<"u")return Al;Cc&&(di=di.slice(0,-1*Cc*2),Yn=Yn.slice(0,-1*Cc),He=He.slice(0,-1*Cc)),di.push(this.productions_[Pa[1]][0]),Yn.push(ua.$),He.push(ua._$),ga=Ti[di[di.length-2]][di[di.length-1]],di.push(ga);break;case 3:return!0}}return!0}},da=function(){var ds={EOF:1,parseError:function(nr,di){if(this.yy.parser)this.yy.parser.parseError(nr,di);else throw new Error(nr)},setInput:function(Dr,nr){return this.yy=nr||this.yy||{},this._input=Dr,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Dr=this._input[0];this.yytext+=Dr,this.yyleng++,this.offset++,this.match+=Dr,this.matched+=Dr;var nr=Dr.match(/(?:\r\n?|\n).*/g);return nr?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Dr},unput:function(Dr){var nr=Dr.length,di=Dr.split(/(?:\r\n?|\n)/g);this._input=Dr+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-nr),this.offset-=nr;var Ee=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),di.length-1&&(this.yylineno-=di.length-1);var Yn=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:di?(di.length===Ee.length?this.yylloc.first_column:0)+Ee[Ee.length-di.length].length-di[0].length:this.yylloc.first_column-nr},this.options.ranges&&(this.yylloc.range=[Yn[0],Yn[0]+this.yyleng-nr]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Dr){this.unput(this.match.slice(Dr))},pastInput:function(){var Dr=this.matched.substr(0,this.matched.length-this.match.length);return(Dr.length>20?"...":"")+Dr.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Dr=this.match;return Dr.length<20&&(Dr+=this._input.substr(0,20-Dr.length)),(Dr.substr(0,20)+(Dr.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Dr=this.pastInput(),nr=new Array(Dr.length+1).join("-");return Dr+this.upcomingInput()+` +`+nr+"^"},test_match:function(Dr,nr){var di,Ee,Yn;if(this.options.backtrack_lexer&&(Yn={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Yn.yylloc.range=this.yylloc.range.slice(0))),Ee=Dr[0].match(/(?:\r\n?|\n).*/g),Ee&&(this.yylineno+=Ee.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ee?Ee[Ee.length-1].length-Ee[Ee.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Dr[0].length},this.yytext+=Dr[0],this.match+=Dr[0],this.matches=Dr,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Dr[0].length),this.matched+=Dr[0],di=this.performAction.call(this,this.yy,this,nr,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),di)return di;if(this._backtrack){for(var He in Yn)this[He]=Yn[He];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Dr,nr,di,Ee;this._more||(this.yytext="",this.match="");for(var Yn=this._currentRules(),He=0;Henr[0].length)){if(nr=di,Ee=He,this.options.backtrack_lexer){if(Dr=this.test_match(di,Yn[He]),Dr!==!1)return Dr;if(this._backtrack){nr=!1;continue}else return!1}else if(!this.options.flex)break}return nr?(Dr=this.test_match(nr,Yn[Ee]),Dr!==!1?Dr:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var nr=this.next();return nr||this.lex()},begin:function(nr){this.conditionStack.push(nr)},popState:function(){var nr=this.conditionStack.length-1;return nr>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(nr){return nr=this.conditionStack.length-1-Math.abs(nr||0),nr>=0?this.conditionStack[nr]:"INITIAL"},pushState:function(nr){this.begin(nr)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(nr,di,Ee,Yn){switch(Ee){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return ds}();ya.lexer=da;function Oo(){this.yy={}}return Oo.prototype=ya,ya.Parser=Oo,new Oo}();$W.parser=$W;const HMe=$W;let rm=[],sk=[""],lg="global",im="",d3=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],rP=[],Ddt="",Odt=!1,zW=4,qW=2;var gNt;const GMe=function(){return gNt},VMe=function(i){gNt=Dd(i,Le())},UMe=function(i,a,f,p,v,m,b,E,_){if(i==null||a===void 0||a===null||f===void 0||f===null||p===void 0||p===null)return;let L={};const N=rP.find(B=>B.from===a&&B.to===f);if(N?L=N:rP.push(L),L.type=i,L.from=a,L.to=f,L.label={text:p},v==null)L.techn={text:""};else if(typeof v=="object"){let[B,j]=Object.entries(v)[0];L[B]={text:j}}else L.techn={text:v};if(m==null)L.descr={text:""};else if(typeof m=="object"){let[B,j]=Object.entries(m)[0];L[B]={text:j}}else L.descr={text:m};if(typeof b=="object"){let[B,j]=Object.entries(b)[0];L[B]=j}else L.sprite=b;if(typeof E=="object"){let[B,j]=Object.entries(E)[0];L[B]=j}else L.tags=E;if(typeof _=="object"){let[B,j]=Object.entries(_)[0];L[B]=j}else L.link=_;L.wrap=ak()},WMe=function(i,a,f,p,v,m,b){if(a===null||f===null)return;let E={};const _=rm.find(L=>L.alias===a);if(_&&a===_.alias?E=_:(E.alias=a,rm.push(E)),f==null?E.label={text:""}:E.label={text:f},p==null)E.descr={text:""};else if(typeof p=="object"){let[L,N]=Object.entries(p)[0];E[L]={text:N}}else E.descr={text:p};if(typeof v=="object"){let[L,N]=Object.entries(v)[0];E[L]=N}else E.sprite=v;if(typeof m=="object"){let[L,N]=Object.entries(m)[0];E[L]=N}else E.tags=m;if(typeof b=="object"){let[L,N]=Object.entries(b)[0];E[L]=N}else E.link=b;E.typeC4Shape={text:i},E.parentBoundary=lg,E.wrap=ak()},KMe=function(i,a,f,p,v,m,b,E){if(a===null||f===null)return;let _={};const L=rm.find(N=>N.alias===a);if(L&&a===L.alias?_=L:(_.alias=a,rm.push(_)),f==null?_.label={text:""}:_.label={text:f},p==null)_.techn={text:""};else if(typeof p=="object"){let[N,B]=Object.entries(p)[0];_[N]={text:B}}else _.techn={text:p};if(v==null)_.descr={text:""};else if(typeof v=="object"){let[N,B]=Object.entries(v)[0];_[N]={text:B}}else _.descr={text:v};if(typeof m=="object"){let[N,B]=Object.entries(m)[0];_[N]=B}else _.sprite=m;if(typeof b=="object"){let[N,B]=Object.entries(b)[0];_[N]=B}else _.tags=b;if(typeof E=="object"){let[N,B]=Object.entries(E)[0];_[N]=B}else _.link=E;_.wrap=ak(),_.typeC4Shape={text:i},_.parentBoundary=lg},YMe=function(i,a,f,p,v,m,b,E){if(a===null||f===null)return;let _={};const L=rm.find(N=>N.alias===a);if(L&&a===L.alias?_=L:(_.alias=a,rm.push(_)),f==null?_.label={text:""}:_.label={text:f},p==null)_.techn={text:""};else if(typeof p=="object"){let[N,B]=Object.entries(p)[0];_[N]={text:B}}else _.techn={text:p};if(v==null)_.descr={text:""};else if(typeof v=="object"){let[N,B]=Object.entries(v)[0];_[N]={text:B}}else _.descr={text:v};if(typeof m=="object"){let[N,B]=Object.entries(m)[0];_[N]=B}else _.sprite=m;if(typeof b=="object"){let[N,B]=Object.entries(b)[0];_[N]=B}else _.tags=b;if(typeof E=="object"){let[N,B]=Object.entries(E)[0];_[N]=B}else _.link=E;_.wrap=ak(),_.typeC4Shape={text:i},_.parentBoundary=lg},XMe=function(i,a,f,p,v){if(i===null||a===null)return;let m={};const b=d3.find(E=>E.alias===i);if(b&&i===b.alias?m=b:(m.alias=i,d3.push(m)),a==null?m.label={text:""}:m.label={text:a},f==null)m.type={text:"system"};else if(typeof f=="object"){let[E,_]=Object.entries(f)[0];m[E]={text:_}}else m.type={text:f};if(typeof p=="object"){let[E,_]=Object.entries(p)[0];m[E]=_}else m.tags=p;if(typeof v=="object"){let[E,_]=Object.entries(v)[0];m[E]=_}else m.link=v;m.parentBoundary=lg,m.wrap=ak(),im=lg,lg=i,sk.push(im)},QMe=function(i,a,f,p,v){if(i===null||a===null)return;let m={};const b=d3.find(E=>E.alias===i);if(b&&i===b.alias?m=b:(m.alias=i,d3.push(m)),a==null?m.label={text:""}:m.label={text:a},f==null)m.type={text:"container"};else if(typeof f=="object"){let[E,_]=Object.entries(f)[0];m[E]={text:_}}else m.type={text:f};if(typeof p=="object"){let[E,_]=Object.entries(p)[0];m[E]=_}else m.tags=p;if(typeof v=="object"){let[E,_]=Object.entries(v)[0];m[E]=_}else m.link=v;m.parentBoundary=lg,m.wrap=ak(),im=lg,lg=i,sk.push(im)},ZMe=function(i,a,f,p,v,m,b,E){if(a===null||f===null)return;let _={};const L=d3.find(N=>N.alias===a);if(L&&a===L.alias?_=L:(_.alias=a,d3.push(_)),f==null?_.label={text:""}:_.label={text:f},p==null)_.type={text:"node"};else if(typeof p=="object"){let[N,B]=Object.entries(p)[0];_[N]={text:B}}else _.type={text:p};if(v==null)_.descr={text:""};else if(typeof v=="object"){let[N,B]=Object.entries(v)[0];_[N]={text:B}}else _.descr={text:v};if(typeof b=="object"){let[N,B]=Object.entries(b)[0];_[N]=B}else _.tags=b;if(typeof E=="object"){let[N,B]=Object.entries(E)[0];_[N]=B}else _.link=E;_.nodeType=i,_.parentBoundary=lg,_.wrap=ak(),im=lg,lg=a,sk.push(im)},JMe=function(){lg=im,sk.pop(),im=sk.pop(),sk.push(im)},tIe=function(i,a,f,p,v,m,b,E,_,L,N){let B=rm.find(j=>j.alias===a);if(!(B===void 0&&(B=d3.find(j=>j.alias===a),B===void 0))){if(f!=null)if(typeof f=="object"){let[j,R]=Object.entries(f)[0];B[j]=R}else B.bgColor=f;if(p!=null)if(typeof p=="object"){let[j,R]=Object.entries(p)[0];B[j]=R}else B.fontColor=p;if(v!=null)if(typeof v=="object"){let[j,R]=Object.entries(v)[0];B[j]=R}else B.borderColor=v;if(m!=null)if(typeof m=="object"){let[j,R]=Object.entries(m)[0];B[j]=R}else B.shadowing=m;if(b!=null)if(typeof b=="object"){let[j,R]=Object.entries(b)[0];B[j]=R}else B.shape=b;if(E!=null)if(typeof E=="object"){let[j,R]=Object.entries(E)[0];B[j]=R}else B.sprite=E;if(_!=null)if(typeof _=="object"){let[j,R]=Object.entries(_)[0];B[j]=R}else B.techn=_;if(L!=null)if(typeof L=="object"){let[j,R]=Object.entries(L)[0];B[j]=R}else B.legendText=L;if(N!=null)if(typeof N=="object"){let[j,R]=Object.entries(N)[0];B[j]=R}else B.legendSprite=N}},eIe=function(i,a,f,p,v,m,b){const E=rP.find(_=>_.from===a&&_.to===f);if(E!==void 0){if(p!=null)if(typeof p=="object"){let[_,L]=Object.entries(p)[0];E[_]=L}else E.textColor=p;if(v!=null)if(typeof v=="object"){let[_,L]=Object.entries(v)[0];E[_]=L}else E.lineColor=v;if(m!=null)if(typeof m=="object"){let[_,L]=Object.entries(m)[0];E[_]=parseInt(L)}else E.offsetX=parseInt(m);if(b!=null)if(typeof b=="object"){let[_,L]=Object.entries(b)[0];E[_]=parseInt(L)}else E.offsetY=parseInt(b)}},nIe=function(i,a,f){let p=zW,v=qW;if(typeof a=="object"){const m=Object.values(a)[0];p=parseInt(m)}else p=parseInt(a);if(typeof f=="object"){const m=Object.values(f)[0];v=parseInt(m)}else v=parseInt(f);p>=1&&(zW=p),v>=1&&(qW=v)},rIe=function(){return zW},iIe=function(){return qW},sIe=function(){return lg},aIe=function(){return im},pNt=function(i){return i==null?rm:rm.filter(a=>a.parentBoundary===i)},oIe=function(i){return rm.find(a=>a.alias===i)},cIe=function(i){return Object.keys(pNt(i))},uIe=function(i){return i==null?d3:d3.filter(a=>a.parentBoundary===i)},lIe=function(){return rP},hIe=function(){return Ddt},fIe=function(i){Odt=i},ak=function(){return Odt},Ndt={addPersonOrSystem:WMe,addPersonOrSystemBoundary:XMe,addContainer:KMe,addContainerBoundary:QMe,addComponent:YMe,addDeploymentNode:ZMe,popBoundaryParseStack:JMe,addRel:UMe,updateElStyle:tIe,updateRelStyle:eIe,updateLayoutConfig:nIe,autoWrap:ak,setWrap:fIe,getC4ShapeArray:pNt,getC4Shape:oIe,getC4ShapeKeys:cIe,getBoundarys:uIe,getCurrentBoundaryParse:sIe,getParentBoundaryParse:aIe,getRels:lIe,getTitle:hIe,getC4Type:GMe,getC4ShapeInRow:rIe,getC4BoundaryInRow:iIe,setAccTitle:cg,getAccTitle:op,getAccDescription:up,setAccDescription:cp,getConfig:()=>Le().c4,clear:function(){rm=[],d3=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],im="",lg="global",sk=[""],rP=[],sk=[""],Ddt="",Odt=!1,zW=4,qW=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(i){Ddt=Dd(i,Le())},setC4Type:VMe},HW=(i,a)=>{const f=i.append("rect");if(f.attr("x",a.x),f.attr("y",a.y),f.attr("fill",a.fill),f.attr("stroke",a.stroke),f.attr("width",a.width),f.attr("height",a.height),a.rx!==void 0&&f.attr("rx",a.rx),a.ry!==void 0&&f.attr("ry",a.ry),a.attrs!==void 0)for(const p in a.attrs)f.attr(p,a.attrs[p]);return a.class!==void 0&&f.attr("class",a.class),f},bNt=(i,a)=>{const f={x:a.startx,y:a.starty,width:a.stopx-a.startx,height:a.stopy-a.starty,fill:a.fill,stroke:a.stroke,class:"rect"};HW(i,f).lower()},dIe=(i,a)=>{const f=a.text.replace($N," "),p=i.append("text");p.attr("x",a.x),p.attr("y",a.y),p.attr("class","legend"),p.style("text-anchor",a.anchor),a.class!==void 0&&p.attr("class",a.class);const v=p.append("tspan");return v.attr("x",a.x+a.textMargin*2),v.text(f),p},gIe=(i,a,f,p)=>{const v=i.append("image");v.attr("x",a),v.attr("y",f);const m=Q6(p);v.attr("xlink:href",m)},pIe=(i,a,f,p)=>{const v=i.append("use");v.attr("x",a),v.attr("y",f);const m=Q6(p);v.attr("xlink:href",`#${m}`)},fT=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),Pdt=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),Fdt=function(i,a){return HW(i,a)},vNt=function(i,a,f,p,v,m){const b=i.append("image");b.attr("width",a),b.attr("height",f),b.attr("x",p),b.attr("y",v);let E=m.startsWith("data:image/png;base64")?m:Q6(m);b.attr("xlink:href",E)},bIe=(i,a,f)=>{const p=i.append("g");let v=0;for(let m of a){let b=m.textColor?m.textColor:"#444444",E=m.lineColor?m.lineColor:"#444444",_=m.offsetX?parseInt(m.offsetX):0,L=m.offsetY?parseInt(m.offsetY):0,N="";if(v===0){let j=p.append("line");j.attr("x1",m.startPoint.x),j.attr("y1",m.startPoint.y),j.attr("x2",m.endPoint.x),j.attr("y2",m.endPoint.y),j.attr("stroke-width","1"),j.attr("stroke",E),j.style("fill","none"),m.type!=="rel_b"&&j.attr("marker-end","url("+N+"#arrowhead)"),(m.type==="birel"||m.type==="rel_b")&&j.attr("marker-start","url("+N+"#arrowend)"),v=-1}else{let j=p.append("path");j.attr("fill","none").attr("stroke-width","1").attr("stroke",E).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",m.startPoint.x).replaceAll("starty",m.startPoint.y).replaceAll("controlx",m.startPoint.x+(m.endPoint.x-m.startPoint.x)/2-(m.endPoint.x-m.startPoint.x)/4).replaceAll("controly",m.startPoint.y+(m.endPoint.y-m.startPoint.y)/2).replaceAll("stopx",m.endPoint.x).replaceAll("stopy",m.endPoint.y)),m.type!=="rel_b"&&j.attr("marker-end","url("+N+"#arrowhead)"),(m.type==="birel"||m.type==="rel_b")&&j.attr("marker-start","url("+N+"#arrowend)")}let B=f.messageFont();k5(f)(m.label.text,p,Math.min(m.startPoint.x,m.endPoint.x)+Math.abs(m.endPoint.x-m.startPoint.x)/2+_,Math.min(m.startPoint.y,m.endPoint.y)+Math.abs(m.endPoint.y-m.startPoint.y)/2+L,m.label.width,m.label.height,{fill:b},B),m.techn&&m.techn.text!==""&&(B=f.messageFont(),k5(f)("["+m.techn.text+"]",p,Math.min(m.startPoint.x,m.endPoint.x)+Math.abs(m.endPoint.x-m.startPoint.x)/2+_,Math.min(m.startPoint.y,m.endPoint.y)+Math.abs(m.endPoint.y-m.startPoint.y)/2+f.messageFontSize+5+L,Math.max(m.label.width,m.techn.width),m.techn.height,{fill:b,"font-style":"italic"},B))}},vIe=function(i,a,f){const p=i.append("g");let v=a.bgColor?a.bgColor:"none",m=a.borderColor?a.borderColor:"#444444",b=a.fontColor?a.fontColor:"black",E={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};a.nodeType&&(E={"stroke-width":1});let _={x:a.x,y:a.y,fill:v,stroke:m,width:a.width,height:a.height,rx:2.5,ry:2.5,attrs:E};Fdt(p,_);let L=f.boundaryFont();L.fontWeight="bold",L.fontSize=L.fontSize+2,L.fontColor=b,k5(f)(a.label.text,p,a.x,a.y+a.label.Y,a.width,a.height,{fill:"#444444"},L),a.type&&a.type.text!==""&&(L=f.boundaryFont(),L.fontColor=b,k5(f)(a.type.text,p,a.x,a.y+a.type.Y,a.width,a.height,{fill:"#444444"},L)),a.descr&&a.descr.text!==""&&(L=f.boundaryFont(),L.fontSize=L.fontSize-2,L.fontColor=b,k5(f)(a.descr.text,p,a.x,a.y+a.descr.Y,a.width,a.height,{fill:"#444444"},L))},wIe=function(i,a,f){var B;let p=a.bgColor?a.bgColor:f[a.typeC4Shape.text+"_bg_color"],v=a.borderColor?a.borderColor:f[a.typeC4Shape.text+"_border_color"],m=a.fontColor?a.fontColor:"#FFFFFF",b="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(a.typeC4Shape.text){case"person":b="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":b="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const E=i.append("g");E.attr("class","person-man");const _=fT();switch(a.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":_.x=a.x,_.y=a.y,_.fill=p,_.width=a.width,_.height=a.height,_.stroke=v,_.rx=2.5,_.ry=2.5,_.attrs={"stroke-width":.5},Fdt(E,_);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":E.append("path").attr("fill",p).attr("stroke-width","0.5").attr("stroke",v).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2).replaceAll("height",a.height)),E.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",v).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("half",a.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":E.append("path").attr("fill",p).attr("stroke-width","0.5").attr("stroke",v).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",a.x).replaceAll("starty",a.y).replaceAll("width",a.width).replaceAll("half",a.height/2)),E.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",v).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",a.x+a.width).replaceAll("starty",a.y).replaceAll("half",a.height/2));break}let L=SIe(f,a.typeC4Shape.text);switch(E.append("text").attr("fill",m).attr("font-family",L.fontFamily).attr("font-size",L.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",a.typeC4Shape.width).attr("x",a.x+a.width/2-a.typeC4Shape.width/2).attr("y",a.y+a.typeC4Shape.Y).text("<<"+a.typeC4Shape.text+">>"),a.typeC4Shape.text){case"person":case"external_person":vNt(E,48,48,a.x+a.width/2-24,a.y+a.image.Y,b);break}let N=f[a.typeC4Shape.text+"Font"]();return N.fontWeight="bold",N.fontSize=N.fontSize+2,N.fontColor=m,k5(f)(a.label.text,E,a.x,a.y+a.label.Y,a.width,a.height,{fill:m},N),N=f[a.typeC4Shape.text+"Font"](),N.fontColor=m,a.techn&&((B=a.techn)==null?void 0:B.text)!==""?k5(f)(a.techn.text,E,a.x,a.y+a.techn.Y,a.width,a.height,{fill:m,"font-style":"italic"},N):a.type&&a.type.text!==""&&k5(f)(a.type.text,E,a.x,a.y+a.type.Y,a.width,a.height,{fill:m,"font-style":"italic"},N),a.descr&&a.descr.text!==""&&(N=f.personFont(),N.fontColor=m,k5(f)(a.descr.text,E,a.x,a.y+a.descr.Y,a.width,a.height,{fill:m},N)),a.height},mIe=function(i){i.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},yIe=function(i){i.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},xIe=function(i){i.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},kIe=function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},EIe=function(i){i.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},TIe=function(i){i.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},CIe=function(i){i.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},_Ie=function(i){const f=i.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);f.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),f.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},SIe=(i,a)=>({fontFamily:i[a+"FontFamily"],fontSize:i[a+"FontSize"],fontWeight:i[a+"FontWeight"]}),k5=function(){function i(v,m,b,E,_,L,N){const B=m.append("text").attr("x",b+_/2).attr("y",E+L/2+5).style("text-anchor","middle").text(v);p(B,N)}function a(v,m,b,E,_,L,N,B){const{fontSize:j,fontFamily:R,fontWeight:z}=B,K=v.split(Yr.lineBreakRegex);for(let it=0;it=this.data.widthLimit||p>=this.data.widthLimit||this.nextData.cnt>wNt)&&(f=this.nextData.startx+a.margin+fs.nextLinePaddingX,v=this.nextData.stopy+a.margin*2,this.nextData.stopx=p=f+a.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=m=v+a.height,this.nextData.cnt=1),a.x=f,a.y=v,this.updateVal(this.data,"startx",f,Math.min),this.updateVal(this.data,"starty",v,Math.min),this.updateVal(this.data,"stopx",p,Math.max),this.updateVal(this.data,"stopy",m,Math.max),this.updateVal(this.nextData,"startx",f,Math.min),this.updateVal(this.nextData,"starty",v,Math.min),this.updateVal(this.nextData,"stopx",p,Math.max),this.updateVal(this.nextData,"stopy",m,Math.max)}init(a){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},Rdt(a.db.getConfig())}bumpLastMargin(a){this.data.stopx+=a,this.data.stopy+=a}}const Rdt=function(i){Y1(fs,i),i.fontFamily&&(fs.personFontFamily=fs.systemFontFamily=fs.messageFontFamily=i.fontFamily),i.fontSize&&(fs.personFontSize=fs.systemFontSize=fs.messageFontSize=i.fontSize),i.fontWeight&&(fs.personFontWeight=fs.systemFontWeight=fs.messageFontWeight=i.fontWeight)},iP=(i,a)=>({fontFamily:i[a+"FontFamily"],fontSize:i[a+"FontSize"],fontWeight:i[a+"FontWeight"]}),UW=i=>({fontFamily:i.boundaryFontFamily,fontSize:i.boundaryFontSize,fontWeight:i.boundaryFontWeight}),AIe=i=>({fontFamily:i.messageFontFamily,fontSize:i.messageFontSize,fontWeight:i.messageFontWeight});function sm(i,a,f,p,v){if(!a[i].width)if(f)a[i].text=VDt(a[i].text,v,p),a[i].textLines=a[i].text.split(Yr.lineBreakRegex).length,a[i].width=v,a[i].height=ndt(a[i].text,p);else{let m=a[i].text.split(Yr.lineBreakRegex);a[i].textLines=m.length;let b=0;a[i].height=0,a[i].width=0;for(const E of m)a[i].width=Math.max(h3(E,p),a[i].width),b=ndt(E,p),a[i].height=a[i].height+b}}const yNt=function(i,a,f){a.x=f.data.startx,a.y=f.data.starty,a.width=f.data.stopx-f.data.startx,a.height=f.data.stopy-f.data.starty,a.label.y=fs.c4ShapeMargin-35;let p=a.wrap&&fs.wrap,v=UW(fs);v.fontSize=v.fontSize+2,v.fontWeight="bold";let m=h3(a.label.text,v);sm("label",a,p,v,m),g3.drawBoundary(i,a,fs)},xNt=function(i,a,f,p){let v=0;for(const m of p){v=0;const b=f[m];let E=iP(fs,b.typeC4Shape.text);switch(E.fontSize=E.fontSize-2,b.typeC4Shape.width=h3("«"+b.typeC4Shape.text+"»",E),b.typeC4Shape.height=E.fontSize+2,b.typeC4Shape.Y=fs.c4ShapePadding,v=b.typeC4Shape.Y+b.typeC4Shape.height-4,b.image={width:0,height:0,Y:0},b.typeC4Shape.text){case"person":case"external_person":b.image.width=48,b.image.height=48,b.image.Y=v,v=b.image.Y+b.image.height;break}b.sprite&&(b.image.width=48,b.image.height=48,b.image.Y=v,v=b.image.Y+b.image.height);let _=b.wrap&&fs.wrap,L=fs.width-fs.c4ShapePadding*2,N=iP(fs,b.typeC4Shape.text);if(N.fontSize=N.fontSize+2,N.fontWeight="bold",sm("label",b,_,N,L),b.label.Y=v+8,v=b.label.Y+b.label.height,b.type&&b.type.text!==""){b.type.text="["+b.type.text+"]";let R=iP(fs,b.typeC4Shape.text);sm("type",b,_,R,L),b.type.Y=v+5,v=b.type.Y+b.type.height}else if(b.techn&&b.techn.text!==""){b.techn.text="["+b.techn.text+"]";let R=iP(fs,b.techn.text);sm("techn",b,_,R,L),b.techn.Y=v+5,v=b.techn.Y+b.techn.height}let B=v,j=b.label.width;if(b.descr&&b.descr.text!==""){let R=iP(fs,b.typeC4Shape.text);sm("descr",b,_,R,L),b.descr.Y=v+20,v=b.descr.Y+b.descr.height,j=Math.max(b.label.width,b.descr.width),B=v-b.descr.textLines*5}j=j+fs.c4ShapePadding,b.width=Math.max(b.width||fs.width,j,fs.width),b.height=Math.max(b.height||fs.height,B,fs.height),b.margin=b.margin||fs.c4ShapeMargin,i.insert(b),g3.drawC4Shape(a,b,fs)}i.bumpLastMargin(fs.c4ShapeMargin)};let J2=class{constructor(a,f){this.x=a,this.y=f}},kNt=function(i,a){let f=i.x,p=i.y,v=a.x,m=a.y,b=f+i.width/2,E=p+i.height/2,_=Math.abs(f-v),L=Math.abs(p-m),N=L/_,B=i.height/i.width,j=null;return p==m&&fv?j=new J2(f,E):f==v&&pm&&(j=new J2(b,p)),f>v&&p=N?j=new J2(f,E+N*i.width/2):j=new J2(b-_/L*i.height/2,p+i.height):f=N?j=new J2(f+i.width,E+N*i.width/2):j=new J2(b+_/L*i.height/2,p+i.height):fm?B>=N?j=new J2(f+i.width,E-N*i.width/2):j=new J2(b+i.height/2*_/L,p):f>v&&p>m&&(B>=N?j=new J2(f,E-i.width/2*N):j=new J2(b-i.height/2*_/L,p)),j},LIe=function(i,a){let f={x:0,y:0};f.x=a.x+a.width/2,f.y=a.y+a.height/2;let p=kNt(i,f);f.x=i.x+i.width/2,f.y=i.y+i.height/2;let v=kNt(a,f);return{startPoint:p,endPoint:v}};const MIe=function(i,a,f,p){let v=0;for(let m of a){v=v+1;let b=m.wrap&&fs.wrap,E=AIe(fs);p.db.getC4Type()==="C4Dynamic"&&(m.label.text=v+": "+m.label.text);let L=h3(m.label.text,E);sm("label",m,b,E,L),m.techn&&m.techn.text!==""&&(L=h3(m.techn.text,E),sm("techn",m,b,E,L)),m.descr&&m.descr.text!==""&&(L=h3(m.descr.text,E),sm("descr",m,b,E,L));let N=f(m.from),B=f(m.to),j=LIe(N,B);m.startPoint=j.startPoint,m.endPoint=j.endPoint}g3.drawRels(i,a,fs)};function ENt(i,a,f,p,v){let m=new mNt(v);m.data.widthLimit=f.data.widthLimit/Math.min(Bdt,p.length);for(let[b,E]of p.entries()){let _=0;E.image={width:0,height:0,Y:0},E.sprite&&(E.image.width=48,E.image.height=48,E.image.Y=_,_=E.image.Y+E.image.height);let L=E.wrap&&fs.wrap,N=UW(fs);if(N.fontSize=N.fontSize+2,N.fontWeight="bold",sm("label",E,L,N,m.data.widthLimit),E.label.Y=_+8,_=E.label.Y+E.label.height,E.type&&E.type.text!==""){E.type.text="["+E.type.text+"]";let z=UW(fs);sm("type",E,L,z,m.data.widthLimit),E.type.Y=_+5,_=E.type.Y+E.type.height}if(E.descr&&E.descr.text!==""){let z=UW(fs);z.fontSize=z.fontSize-2,sm("descr",E,L,z,m.data.widthLimit),E.descr.Y=_+20,_=E.descr.Y+E.descr.height}if(b==0||b%Bdt===0){let z=f.data.startx+fs.diagramMarginX,K=f.data.stopy+fs.diagramMarginY+_;m.setData(z,z,K,K)}else{let z=m.data.stopx!==m.data.startx?m.data.stopx+fs.diagramMarginX:m.data.startx,K=m.data.starty;m.setData(z,z,K,K)}m.name=E.alias;let B=v.db.getC4ShapeArray(E.alias),j=v.db.getC4ShapeKeys(E.alias);j.length>0&&xNt(m,i,B,j),a=E.alias;let R=v.db.getBoundarys(a);R.length>0&&ENt(i,a,m,R,v),E.alias!=="global"&&yNt(i,E,m),f.data.stopy=Math.max(m.data.stopy+fs.c4ShapeMargin,f.data.stopy),f.data.stopx=Math.max(m.data.stopx+fs.c4ShapeMargin,f.data.stopx),GW=Math.max(GW,f.data.stopx),VW=Math.max(VW,f.data.stopy)}}const TNt={drawPersonOrSystemArray:xNt,drawBoundary:yNt,setConf:Rdt,draw:function(i,a,f,p){fs=Le().c4;const v=Le().securityLevel;let m;v==="sandbox"&&(m=yr("#i"+a));const b=yr(v==="sandbox"?m.nodes()[0].contentDocument.body:"body");let E=p.db;p.db.setWrap(fs.wrap),wNt=E.getC4ShapeInRow(),Bdt=E.getC4BoundaryInRow(),Ut.debug(`C:${JSON.stringify(fs,null,2)}`);const _=v==="sandbox"?b.select(`[id="${a}"]`):yr(`[id="${a}"]`);g3.insertComputerIcon(_),g3.insertDatabaseIcon(_),g3.insertClockIcon(_);let L=new mNt(p);L.setData(fs.diagramMarginX,fs.diagramMarginX,fs.diagramMarginY,fs.diagramMarginY),L.data.widthLimit=screen.availWidth,GW=fs.diagramMarginX,VW=fs.diagramMarginY;const N=p.db.getTitle();let B=p.db.getBoundarys("");ENt(_,"",L,B,p),g3.insertArrowHead(_),g3.insertArrowEnd(_),g3.insertArrowCrossHead(_),g3.insertArrowFilledHead(_),MIe(_,p.db.getRels(),p.db.getC4Shape,p),L.data.stopx=GW,L.data.stopy=VW;const j=L.data;let z=j.stopy-j.starty+2*fs.diagramMarginY;const it=j.stopx-j.startx+2*fs.diagramMarginX;N&&_.append("text").text(N).attr("x",(j.stopx-j.startx)/2-4*fs.diagramMarginX).attr("y",j.starty+fs.diagramMarginY),og(_,z,it,fs.useMaxWidth);const st=N?60:0;_.attr("viewBox",j.startx-fs.diagramMarginX+" -"+(fs.diagramMarginY+st)+" "+it+" "+(z+st)),Ut.debug("models:",j)}},IIe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:HMe,db:Ndt,renderer:TNt,styles:i=>`.person { + stroke: ${i.personBorder}; + fill: ${i.personBkg}; + } +`,init:({c4:i,wrap:a})=>{TNt.setConf(i),Ndt.setWrap(a)}}},Symbol.toStringTag,{value:"Module"}));var jdt=function(){var i=function(nf,Xi,Es,xa){for(Es=Es||{},xa=nf.length;xa--;Es[nf[xa]]=Xi);return Es},a=[1,4],f=[1,3],p=[1,5],v=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],m=[2,2],b=[1,13],E=[1,14],_=[1,15],L=[1,16],N=[1,23],B=[1,25],j=[1,26],R=[1,27],z=[1,49],K=[1,48],it=[1,29],st=[1,30],ut=[1,31],bt=[1,32],mt=[1,33],yt=[1,44],dt=[1,46],ht=[1,42],wt=[1,47],X=[1,43],pt=[1,50],U=[1,45],xt=[1,51],nt=[1,52],Ot=[1,34],Nt=[1,35],qt=[1,36],Ct=[1,37],Z=[1,57],Tt=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Ht=[1,61],It=[1,60],Ft=[1,62],ke=[8,9,11,73,75],pn=[1,88],Me=[1,93],ve=[1,92],Ge=[1,89],Ke=[1,85],we=[1,91],_e=[1,87],$t=[1,94],re=[1,90],ie=[1,95],Oe=[1,86],oe=[8,9,10,11,73,75],Ne=[8,9,10,11,44,73,75],me=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],cn=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],li=[42,58,86,99,102,103,106,108,111,112,113],ya=[1,121],da=[1,120],Oo=[1,128],ds=[1,142],Dr=[1,143],nr=[1,144],di=[1,145],Ee=[1,130],Yn=[1,132],He=[1,136],Ti=[1,137],gn=[1,138],ks=[1,139],qa=[1,140],La=[1,141],Gs=[1,146],No=[1,147],vs=[1,126],nu=[1,127],$s=[1,134],Lu=[1,129],fm=[1,133],av=[1,131],Uu=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Zl=[1,149],Pa=[8,9,11],Al=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],ua=[1,169],bc=[1,165],Cc=[1,166],ga=[1,170],Ma=[1,167],Ha=[1,168],Ll=[75,113,116],_c=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],ov=[10,103],Jl=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Z1=[1,235],Fd=[1,233],J1=[1,237],Bd=[1,231],E0=[1,232],Bi=[1,234],on=[1,236],kr=[1,238],Ei=[1,255],Jo=[8,9,11,103],vc=[8,9,10,11,58,81,102,103,106,107,108,109],tf={trace:function(){},yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeperator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,verticeStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:function(Xi,Es,xa,xi,Wc,Ce,gp){var Be=Ce.length-1;switch(Wc){case 2:this.$=[];break;case 3:(!Array.isArray(Ce[Be])||Ce[Be].length>0)&&Ce[Be-1].push(Ce[Be]),this.$=Ce[Be-1];break;case 4:case 176:this.$=Ce[Be];break;case 11:xi.setDirection("TB"),this.$="TB";break;case 12:xi.setDirection(Ce[Be-1]),this.$=Ce[Be-1];break;case 27:this.$=Ce[Be-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=xi.addSubGraph(Ce[Be-6],Ce[Be-1],Ce[Be-4]);break;case 34:this.$=xi.addSubGraph(Ce[Be-3],Ce[Be-1],Ce[Be-3]);break;case 35:this.$=xi.addSubGraph(void 0,Ce[Be-1],void 0);break;case 37:this.$=Ce[Be].trim(),xi.setAccTitle(this.$);break;case 38:case 39:this.$=Ce[Be].trim(),xi.setAccDescription(this.$);break;case 43:xi.addLink(Ce[Be-2].stmt,Ce[Be],Ce[Be-1]),this.$={stmt:Ce[Be],nodes:Ce[Be].concat(Ce[Be-2].nodes)};break;case 44:xi.addLink(Ce[Be-3].stmt,Ce[Be-1],Ce[Be-2]),this.$={stmt:Ce[Be-1],nodes:Ce[Be-1].concat(Ce[Be-3].nodes)};break;case 45:this.$={stmt:Ce[Be-1],nodes:Ce[Be-1]};break;case 46:this.$={stmt:Ce[Be],nodes:Ce[Be]};break;case 47:this.$=[Ce[Be]];break;case 48:this.$=Ce[Be-4].concat(Ce[Be]);break;case 49:this.$=Ce[Be];break;case 50:this.$=Ce[Be-2],xi.setClass(Ce[Be-2],Ce[Be]);break;case 51:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"square");break;case 52:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"doublecircle");break;case 53:this.$=Ce[Be-5],xi.addVertex(Ce[Be-5],Ce[Be-2],"circle");break;case 54:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"ellipse");break;case 55:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"stadium");break;case 56:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"subroutine");break;case 57:this.$=Ce[Be-7],xi.addVertex(Ce[Be-7],Ce[Be-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Ce[Be-5],Ce[Be-3]]]));break;case 58:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"cylinder");break;case 59:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"round");break;case 60:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"diamond");break;case 61:this.$=Ce[Be-5],xi.addVertex(Ce[Be-5],Ce[Be-2],"hexagon");break;case 62:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"odd");break;case 63:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"trapezoid");break;case 64:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"inv_trapezoid");break;case 65:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"lean_right");break;case 66:this.$=Ce[Be-3],xi.addVertex(Ce[Be-3],Ce[Be-1],"lean_left");break;case 67:this.$=Ce[Be],xi.addVertex(Ce[Be]);break;case 68:Ce[Be-1].text=Ce[Be],this.$=Ce[Be-1];break;case 69:case 70:Ce[Be-2].text=Ce[Be-1],this.$=Ce[Be-2];break;case 71:this.$=Ce[Be];break;case 72:var Ff=xi.destructLink(Ce[Be],Ce[Be-2]);this.$={type:Ff.type,stroke:Ff.stroke,length:Ff.length,text:Ce[Be-1]};break;case 73:this.$={text:Ce[Be],type:"text"};break;case 74:this.$={text:Ce[Be-1].text+""+Ce[Be],type:Ce[Be-1].type};break;case 75:this.$={text:Ce[Be],type:"string"};break;case 76:this.$={text:Ce[Be],type:"markdown"};break;case 77:var Ff=xi.destructLink(Ce[Be]);this.$={type:Ff.type,stroke:Ff.stroke,length:Ff.length};break;case 78:this.$=Ce[Be-1];break;case 79:this.$={text:Ce[Be],type:"text"};break;case 80:this.$={text:Ce[Be-1].text+""+Ce[Be],type:Ce[Be-1].type};break;case 81:this.$={text:Ce[Be],type:"string"};break;case 82:case 97:this.$={text:Ce[Be],type:"markdown"};break;case 94:this.$={text:Ce[Be],type:"text"};break;case 95:this.$={text:Ce[Be-1].text+""+Ce[Be],type:Ce[Be-1].type};break;case 96:this.$={text:Ce[Be],type:"text"};break;case 98:this.$=Ce[Be-4],xi.addClass(Ce[Be-2],Ce[Be]);break;case 99:this.$=Ce[Be-4],xi.setClass(Ce[Be-2],Ce[Be]);break;case 100:case 108:this.$=Ce[Be-1],xi.setClickEvent(Ce[Be-1],Ce[Be]);break;case 101:case 109:this.$=Ce[Be-3],xi.setClickEvent(Ce[Be-3],Ce[Be-2]),xi.setTooltip(Ce[Be-3],Ce[Be]);break;case 102:this.$=Ce[Be-2],xi.setClickEvent(Ce[Be-2],Ce[Be-1],Ce[Be]);break;case 103:this.$=Ce[Be-4],xi.setClickEvent(Ce[Be-4],Ce[Be-3],Ce[Be-2]),xi.setTooltip(Ce[Be-4],Ce[Be]);break;case 104:this.$=Ce[Be-2],xi.setLink(Ce[Be-2],Ce[Be]);break;case 105:this.$=Ce[Be-4],xi.setLink(Ce[Be-4],Ce[Be-2]),xi.setTooltip(Ce[Be-4],Ce[Be]);break;case 106:this.$=Ce[Be-4],xi.setLink(Ce[Be-4],Ce[Be-2],Ce[Be]);break;case 107:this.$=Ce[Be-6],xi.setLink(Ce[Be-6],Ce[Be-4],Ce[Be]),xi.setTooltip(Ce[Be-6],Ce[Be-2]);break;case 110:this.$=Ce[Be-1],xi.setLink(Ce[Be-1],Ce[Be]);break;case 111:this.$=Ce[Be-3],xi.setLink(Ce[Be-3],Ce[Be-2]),xi.setTooltip(Ce[Be-3],Ce[Be]);break;case 112:this.$=Ce[Be-3],xi.setLink(Ce[Be-3],Ce[Be-2],Ce[Be]);break;case 113:this.$=Ce[Be-5],xi.setLink(Ce[Be-5],Ce[Be-4],Ce[Be]),xi.setTooltip(Ce[Be-5],Ce[Be-2]);break;case 114:this.$=Ce[Be-4],xi.addVertex(Ce[Be-2],void 0,void 0,Ce[Be]);break;case 115:this.$=Ce[Be-4],xi.updateLink([Ce[Be-2]],Ce[Be]);break;case 116:this.$=Ce[Be-4],xi.updateLink(Ce[Be-2],Ce[Be]);break;case 117:this.$=Ce[Be-8],xi.updateLinkInterpolate([Ce[Be-6]],Ce[Be-2]),xi.updateLink([Ce[Be-6]],Ce[Be]);break;case 118:this.$=Ce[Be-8],xi.updateLinkInterpolate(Ce[Be-6],Ce[Be-2]),xi.updateLink(Ce[Be-6],Ce[Be]);break;case 119:this.$=Ce[Be-6],xi.updateLinkInterpolate([Ce[Be-4]],Ce[Be]);break;case 120:this.$=Ce[Be-6],xi.updateLinkInterpolate(Ce[Be-4],Ce[Be]);break;case 121:case 123:this.$=[Ce[Be]];break;case 122:case 124:Ce[Be-2].push(Ce[Be]),this.$=Ce[Be-2];break;case 126:this.$=Ce[Be-1]+Ce[Be];break;case 174:this.$=Ce[Be];break;case 175:this.$=Ce[Be-1]+""+Ce[Be];break;case 177:this.$=Ce[Be-1]+""+Ce[Be];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,9:a,10:f,12:p},{1:[3]},i(v,m,{5:6}),{4:7,9:a,10:f,12:p},{4:8,9:a,10:f,12:p},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:b,9:E,10:_,11:L,20:17,22:18,23:19,24:20,25:21,26:22,27:N,33:24,34:B,36:j,38:R,40:28,41:38,42:z,43:39,45:40,58:K,81:it,82:st,83:ut,84:bt,85:mt,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt,118:Ot,119:Nt,120:qt,121:Ct},i(v,[2,9]),i(v,[2,10]),i(v,[2,11]),{8:[1,54],9:[1,55],10:Z,15:53,18:56},i(Tt,[2,3]),i(Tt,[2,4]),i(Tt,[2,5]),i(Tt,[2,6]),i(Tt,[2,7]),i(Tt,[2,8]),{8:Ht,9:It,11:Ft,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:Ht,9:It,11:Ft,21:66},{8:Ht,9:It,11:Ft,21:67},{8:Ht,9:It,11:Ft,21:68},{8:Ht,9:It,11:Ft,21:69},{8:Ht,9:It,11:Ft,21:70},{8:Ht,9:It,10:[1,71],11:Ft,21:72},i(Tt,[2,36]),{35:[1,73]},{37:[1,74]},i(Tt,[2,39]),i(ke,[2,46],{18:75,10:Z}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:pn,42:Me,58:ve,77:[1,83],86:Ge,92:[1,80],94:[1,81],98:82,102:Ke,103:we,106:_e,108:$t,111:re,112:ie,113:Oe,117:84},i(Tt,[2,178]),i(Tt,[2,179]),i(Tt,[2,180]),i(Tt,[2,181]),i(oe,[2,47]),i(oe,[2,49],{44:[1,96]}),i(Ne,[2,67],{110:109,29:[1,97],42:z,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:K,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:yt,99:dt,102:ht,103:wt,106:X,108:pt,111:U,112:xt,113:nt}),i(me,[2,174]),i(me,[2,135]),i(me,[2,136]),i(me,[2,137]),i(me,[2,138]),i(me,[2,139]),i(me,[2,140]),i(me,[2,141]),i(me,[2,142]),i(me,[2,143]),i(me,[2,144]),i(me,[2,145]),i(v,[2,12]),i(v,[2,18]),i(v,[2,19]),{9:[1,110]},i(cn,[2,26],{18:111,10:Z}),i(Tt,[2,27]),{40:112,41:38,42:z,43:39,45:40,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt},i(Tt,[2,40]),i(Tt,[2,41]),i(Tt,[2,42]),i(li,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:ya,116:da},i([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),i(Tt,[2,28]),i(Tt,[2,29]),i(Tt,[2,30]),i(Tt,[2,31]),i(Tt,[2,32]),{10:Oo,12:ds,14:Dr,27:nr,28:122,32:di,42:Ee,58:Yn,73:He,77:[1,124],78:[1,125],80:135,81:Ti,82:gn,83:ks,84:qa,85:La,86:Gs,87:No,88:123,102:vs,106:nu,108:$s,111:Lu,112:fm,113:av},i(Uu,m,{5:148}),i(Tt,[2,37]),i(Tt,[2,38]),i(ke,[2,45],{42:Zl}),{42:z,45:150,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt},{99:[1,151],100:152,102:[1,153]},{42:z,45:154,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt},{42:z,45:155,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt},i(Pa,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},i(Pa,[2,108],{117:160,10:[1,159],14:pn,42:Me,58:ve,86:Ge,102:Ke,103:we,106:_e,108:$t,111:re,112:ie,113:Oe}),i(Pa,[2,110],{10:[1,161]}),i(Al,[2,176]),i(Al,[2,163]),i(Al,[2,164]),i(Al,[2,165]),i(Al,[2,166]),i(Al,[2,167]),i(Al,[2,168]),i(Al,[2,169]),i(Al,[2,170]),i(Al,[2,171]),i(Al,[2,172]),i(Al,[2,173]),{42:z,45:162,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt},{30:163,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:171,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:173,48:[1,172],65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:174,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:175,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:176,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{106:[1,177]},{30:178,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:179,63:[1,180],65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:181,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:182,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{30:183,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},i(me,[2,175]),i(v,[2,20]),i(cn,[2,25]),i(ke,[2,43],{18:184,10:Z}),i(li,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{75:[1,188],76:189,113:ya,116:da},i(Ll,[2,73]),i(Ll,[2,75]),i(Ll,[2,76]),i(Ll,[2,161]),i(Ll,[2,162]),{8:Ht,9:It,10:Oo,11:Ft,12:ds,14:Dr,21:191,27:nr,29:[1,190],32:di,42:Ee,58:Yn,73:He,80:135,81:Ti,82:gn,83:ks,84:qa,85:La,86:Gs,87:No,88:192,102:vs,106:nu,108:$s,111:Lu,112:fm,113:av},i(_c,[2,94]),i(_c,[2,96]),i(_c,[2,97]),i(_c,[2,150]),i(_c,[2,151]),i(_c,[2,152]),i(_c,[2,153]),i(_c,[2,154]),i(_c,[2,155]),i(_c,[2,156]),i(_c,[2,157]),i(_c,[2,158]),i(_c,[2,159]),i(_c,[2,160]),i(_c,[2,83]),i(_c,[2,84]),i(_c,[2,85]),i(_c,[2,86]),i(_c,[2,87]),i(_c,[2,88]),i(_c,[2,89]),i(_c,[2,90]),i(_c,[2,91]),i(_c,[2,92]),i(_c,[2,93]),{6:11,7:12,8:b,9:E,10:_,11:L,20:17,22:18,23:19,24:20,25:21,26:22,27:N,32:[1,193],33:24,34:B,36:j,38:R,40:28,41:38,42:z,43:39,45:40,58:K,81:it,82:st,83:ut,84:bt,85:mt,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt,118:Ot,119:Nt,120:qt,121:Ct},{10:Z,18:194},{10:[1,195],42:z,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:109,111:U,112:xt,113:nt},{10:[1,196]},{10:[1,197],103:[1,198]},i(ov,[2,121]),{10:[1,199],42:z,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:109,111:U,112:xt,113:nt},{10:[1,200],42:z,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:109,111:U,112:xt,113:nt},{77:[1,201]},i(Pa,[2,102],{10:[1,202]}),i(Pa,[2,104],{10:[1,203]}),{77:[1,204]},i(Al,[2,177]),{77:[1,205],95:[1,206]},i(oe,[2,50],{110:109,42:z,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,111:U,112:xt,113:nt}),{31:[1,207],65:ua,79:208,113:ga,114:Ma,115:Ha},i(Jl,[2,79]),i(Jl,[2,81]),i(Jl,[2,82]),i(Jl,[2,146]),i(Jl,[2,147]),i(Jl,[2,148]),i(Jl,[2,149]),{47:[1,209],65:ua,79:208,113:ga,114:Ma,115:Ha},{30:210,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{49:[1,211],65:ua,79:208,113:ga,114:Ma,115:Ha},{51:[1,212],65:ua,79:208,113:ga,114:Ma,115:Ha},{53:[1,213],65:ua,79:208,113:ga,114:Ma,115:Ha},{55:[1,214],65:ua,79:208,113:ga,114:Ma,115:Ha},{58:[1,215]},{62:[1,216],65:ua,79:208,113:ga,114:Ma,115:Ha},{64:[1,217],65:ua,79:208,113:ga,114:Ma,115:Ha},{30:218,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},{31:[1,219],65:ua,79:208,113:ga,114:Ma,115:Ha},{65:ua,67:[1,220],69:[1,221],79:208,113:ga,114:Ma,115:Ha},{65:ua,67:[1,223],69:[1,222],79:208,113:ga,114:Ma,115:Ha},i(ke,[2,44],{42:Zl}),i(li,[2,70]),i(li,[2,69]),{60:[1,224],65:ua,79:208,113:ga,114:Ma,115:Ha},i(li,[2,72]),i(Ll,[2,74]),{30:225,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},i(Uu,m,{5:226}),i(_c,[2,95]),i(Tt,[2,35]),{41:227,42:z,43:39,45:40,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt},{10:Z1,58:Fd,81:J1,89:228,102:Bd,104:229,105:230,106:E0,107:Bi,108:on,109:kr},{10:Z1,58:Fd,81:J1,89:239,101:[1,240],102:Bd,104:229,105:230,106:E0,107:Bi,108:on,109:kr},{10:Z1,58:Fd,81:J1,89:241,101:[1,242],102:Bd,104:229,105:230,106:E0,107:Bi,108:on,109:kr},{102:[1,243]},{10:Z1,58:Fd,81:J1,89:244,102:Bd,104:229,105:230,106:E0,107:Bi,108:on,109:kr},{42:z,45:245,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt},i(Pa,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},i(Pa,[2,109]),i(Pa,[2,111],{10:[1,249]}),i(Pa,[2,112]),i(Ne,[2,51]),i(Jl,[2,80]),i(Ne,[2,52]),{49:[1,250],65:ua,79:208,113:ga,114:Ma,115:Ha},i(Ne,[2,59]),i(Ne,[2,54]),i(Ne,[2,55]),i(Ne,[2,56]),{106:[1,251]},i(Ne,[2,58]),i(Ne,[2,60]),{64:[1,252],65:ua,79:208,113:ga,114:Ma,115:Ha},i(Ne,[2,62]),i(Ne,[2,63]),i(Ne,[2,65]),i(Ne,[2,64]),i(Ne,[2,66]),i([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:ua,79:208,113:ga,114:Ma,115:Ha},{6:11,7:12,8:b,9:E,10:_,11:L,20:17,22:18,23:19,24:20,25:21,26:22,27:N,32:[1,254],33:24,34:B,36:j,38:R,40:28,41:38,42:z,43:39,45:40,58:K,81:it,82:st,83:ut,84:bt,85:mt,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt,118:Ot,119:Nt,120:qt,121:Ct},i(oe,[2,48]),i(Pa,[2,114],{103:Ei}),i(Jo,[2,123],{105:256,10:Z1,58:Fd,81:J1,102:Bd,106:E0,107:Bi,108:on,109:kr}),i(vc,[2,125]),i(vc,[2,127]),i(vc,[2,128]),i(vc,[2,129]),i(vc,[2,130]),i(vc,[2,131]),i(vc,[2,132]),i(vc,[2,133]),i(vc,[2,134]),i(Pa,[2,115],{103:Ei}),{10:[1,257]},i(Pa,[2,116],{103:Ei}),{10:[1,258]},i(ov,[2,122]),i(Pa,[2,98],{103:Ei}),i(Pa,[2,99],{110:109,42:z,58:K,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,111:U,112:xt,113:nt}),i(Pa,[2,103]),i(Pa,[2,105],{10:[1,259]}),i(Pa,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:Ht,9:It,11:Ft,21:264},i(Tt,[2,34]),{10:Z1,58:Fd,81:J1,102:Bd,104:265,105:230,106:E0,107:Bi,108:on,109:kr},i(vc,[2,126]),{14:pn,42:Me,58:ve,86:Ge,98:266,102:Ke,103:we,106:_e,108:$t,111:re,112:ie,113:Oe,117:84},{14:pn,42:Me,58:ve,86:Ge,98:267,102:Ke,103:we,106:_e,108:$t,111:re,112:ie,113:Oe,117:84},{95:[1,268]},i(Pa,[2,113]),i(Ne,[2,53]),{30:269,65:ua,77:bc,78:Cc,79:164,113:ga,114:Ma,115:Ha},i(Ne,[2,61]),i(Uu,m,{5:270}),i(Jo,[2,124],{105:256,10:Z1,58:Fd,81:J1,102:Bd,106:E0,107:Bi,108:on,109:kr}),i(Pa,[2,119],{117:160,10:[1,271],14:pn,42:Me,58:ve,86:Ge,102:Ke,103:we,106:_e,108:$t,111:re,112:ie,113:Oe}),i(Pa,[2,120],{117:160,10:[1,272],14:pn,42:Me,58:ve,86:Ge,102:Ke,103:we,106:_e,108:$t,111:re,112:ie,113:Oe}),i(Pa,[2,107]),{31:[1,273],65:ua,79:208,113:ga,114:Ma,115:Ha},{6:11,7:12,8:b,9:E,10:_,11:L,20:17,22:18,23:19,24:20,25:21,26:22,27:N,32:[1,274],33:24,34:B,36:j,38:R,40:28,41:38,42:z,43:39,45:40,58:K,81:it,82:st,83:ut,84:bt,85:mt,86:yt,99:dt,102:ht,103:wt,106:X,108:pt,110:41,111:U,112:xt,113:nt,118:Ot,119:Nt,120:qt,121:Ct},{10:Z1,58:Fd,81:J1,89:275,102:Bd,104:229,105:230,106:E0,107:Bi,108:on,109:kr},{10:Z1,58:Fd,81:J1,89:276,102:Bd,104:229,105:230,106:E0,107:Bi,108:on,109:kr},i(Ne,[2,57]),i(Tt,[2,33]),i(Pa,[2,117],{103:Ei}),i(Pa,[2,118],{103:Ei})],defaultActions:{},parseError:function(Xi,Es){if(Es.recoverable)this.trace(Xi);else{var xa=new Error(Xi);throw xa.hash=Es,xa}},parse:function(Xi){var Es=this,xa=[0],xi=[],Wc=[null],Ce=[],gp=this.table,Be="",Ff=0,dg=0,dm=2,pk=1,x3=Ce.slice.call(arguments,1),Ml=Object.create(this.lexer),T0={yy:{}};for(var cv in this.yy)Object.prototype.hasOwnProperty.call(this.yy,cv)&&(T0.yy[cv]=this.yy[cv]);Ml.setInput(Xi,T0.yy),T0.yy.lexer=Ml,T0.yy.parser=this,typeof Ml.yylloc>"u"&&(Ml.yylloc={});var F5=Ml.yylloc;Ce.push(F5);var jb=Ml.options&&Ml.options.ranges;typeof T0.yy.parseError=="function"?this.parseError=T0.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function B5(){var gg;return gg=xi.pop()||Ml.lex()||pk,typeof gg!="number"&&(gg instanceof Array&&(xi=gg,gg=xi.pop()),gg=Es.symbols_[gg]||gg),gg}for(var l1,td,ed,R5,uv={},j5,pp,$5,k3;;){if(td=xa[xa.length-1],this.defaultActions[td]?ed=this.defaultActions[td]:((l1===null||typeof l1>"u")&&(l1=B5()),ed=gp[td]&&gp[td][l1]),typeof ed>"u"||!ed.length||!ed[0]){var gm="";k3=[];for(j5 in gp[td])this.terminals_[j5]&&j5>dm&&k3.push("'"+this.terminals_[j5]+"'");Ml.showPosition?gm="Parse error on line "+(Ff+1)+`: +`+Ml.showPosition()+` +Expecting `+k3.join(", ")+", got '"+(this.terminals_[l1]||l1)+"'":gm="Parse error on line "+(Ff+1)+": Unexpected "+(l1==pk?"end of input":"'"+(this.terminals_[l1]||l1)+"'"),this.parseError(gm,{text:Ml.match,token:this.terminals_[l1]||l1,line:Ml.yylineno,loc:F5,expected:k3})}if(ed[0]instanceof Array&&ed.length>1)throw new Error("Parse Error: multiple actions possible at state: "+td+", token: "+l1);switch(ed[0]){case 1:xa.push(l1),Wc.push(Ml.yytext),Ce.push(Ml.yylloc),xa.push(ed[1]),l1=null,dg=Ml.yyleng,Be=Ml.yytext,Ff=Ml.yylineno,F5=Ml.yylloc;break;case 2:if(pp=this.productions_[ed[1]][1],uv.$=Wc[Wc.length-pp],uv._$={first_line:Ce[Ce.length-(pp||1)].first_line,last_line:Ce[Ce.length-1].last_line,first_column:Ce[Ce.length-(pp||1)].first_column,last_column:Ce[Ce.length-1].last_column},jb&&(uv._$.range=[Ce[Ce.length-(pp||1)].range[0],Ce[Ce.length-1].range[1]]),R5=this.performAction.apply(uv,[Be,dg,Ff,T0.yy,ed[1],Wc,Ce].concat(x3)),typeof R5<"u")return R5;pp&&(xa=xa.slice(0,-1*pp*2),Wc=Wc.slice(0,-1*pp),Ce=Ce.slice(0,-1*pp)),xa.push(this.productions_[ed[1]][0]),Wc.push(uv.$),Ce.push(uv._$),$5=gp[xa[xa.length-2]][xa[xa.length-1]],xa.push($5);break;case 3:return!0}}return!0}},Oc=function(){var nf={EOF:1,parseError:function(Es,xa){if(this.yy.parser)this.yy.parser.parseError(Es,xa);else throw new Error(Es)},setInput:function(Xi,Es){return this.yy=Es||this.yy||{},this._input=Xi,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Xi=this._input[0];this.yytext+=Xi,this.yyleng++,this.offset++,this.match+=Xi,this.matched+=Xi;var Es=Xi.match(/(?:\r\n?|\n).*/g);return Es?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Xi},unput:function(Xi){var Es=Xi.length,xa=Xi.split(/(?:\r\n?|\n)/g);this._input=Xi+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Es),this.offset-=Es;var xi=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),xa.length-1&&(this.yylineno-=xa.length-1);var Wc=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:xa?(xa.length===xi.length?this.yylloc.first_column:0)+xi[xi.length-xa.length].length-xa[0].length:this.yylloc.first_column-Es},this.options.ranges&&(this.yylloc.range=[Wc[0],Wc[0]+this.yyleng-Es]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Xi){this.unput(this.match.slice(Xi))},pastInput:function(){var Xi=this.matched.substr(0,this.matched.length-this.match.length);return(Xi.length>20?"...":"")+Xi.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Xi=this.match;return Xi.length<20&&(Xi+=this._input.substr(0,20-Xi.length)),(Xi.substr(0,20)+(Xi.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Xi=this.pastInput(),Es=new Array(Xi.length+1).join("-");return Xi+this.upcomingInput()+` +`+Es+"^"},test_match:function(Xi,Es){var xa,xi,Wc;if(this.options.backtrack_lexer&&(Wc={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Wc.yylloc.range=this.yylloc.range.slice(0))),xi=Xi[0].match(/(?:\r\n?|\n).*/g),xi&&(this.yylineno+=xi.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:xi?xi[xi.length-1].length-xi[xi.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Xi[0].length},this.yytext+=Xi[0],this.match+=Xi[0],this.matches=Xi,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Xi[0].length),this.matched+=Xi[0],xa=this.performAction.call(this,this.yy,this,Es,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xa)return xa;if(this._backtrack){for(var Ce in Wc)this[Ce]=Wc[Ce];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Xi,Es,xa,xi;this._more||(this.yytext="",this.match="");for(var Wc=this._currentRules(),Ce=0;CeEs[0].length)){if(Es=xa,xi=Ce,this.options.backtrack_lexer){if(Xi=this.test_match(xa,Wc[Ce]),Xi!==!1)return Xi;if(this._backtrack){Es=!1;continue}else return!1}else if(!this.options.flex)break}return Es?(Xi=this.test_match(Es,Wc[xi]),Xi!==!1?Xi:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Es=this.next();return Es||this.lex()},begin:function(Es){this.conditionStack.push(Es)},popState:function(){var Es=this.conditionStack.length-1;return Es>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Es){return Es=this.conditionStack.length-1-Math.abs(Es||0),Es>=0?this.conditionStack[Es]:"INITIAL"},pushState:function(Es){this.begin(Es)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Es,xa,xi,Wc){switch(xi){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 11:this.popState();break;case 12:return 93;case 13:return"MD_STR";case 14:this.popState();break;case 15:this.begin("md_string");break;case 16:return"STR";case 17:this.popState();break;case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 27:this.popState();break;case 28:return 85;case 29:return Es.lex.firstGraph()&&this.begin("dir"),12;case 30:return Es.lex.firstGraph()&&this.begin("dir"),12;case 31:return Es.lex.firstGraph()&&this.begin("dir"),12;case 32:return 27;case 33:return 32;case 34:return 95;case 35:return 95;case 36:return 95;case 37:return 95;case 38:return this.popState(),13;case 39:return this.popState(),14;case 40:return this.popState(),14;case 41:return this.popState(),14;case 42:return this.popState(),14;case 43:return this.popState(),14;case 44:return this.popState(),14;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:return 108;case 55:return 44;case 56:return 58;case 57:return 42;case 58:return 8;case 59:return 103;case 60:return 112;case 61:return this.popState(),75;case 62:return this.pushState("edgeText"),73;case 63:return 116;case 64:return this.popState(),75;case 65:return this.pushState("thickEdgeText"),73;case 66:return 116;case 67:return this.popState(),75;case 68:return this.pushState("dottedEdgeText"),73;case 69:return 116;case 70:return 75;case 71:return this.popState(),51;case 72:return"TEXT";case 73:return this.pushState("ellipseText"),50;case 74:return this.popState(),53;case 75:return this.pushState("text"),52;case 76:return this.popState(),55;case 77:return this.pushState("text"),54;case 78:return 56;case 79:return this.pushState("text"),65;case 80:return this.popState(),62;case 81:return this.pushState("text"),61;case 82:return this.popState(),47;case 83:return this.pushState("text"),46;case 84:return this.popState(),67;case 85:return this.popState(),69;case 86:return 114;case 87:return this.pushState("trapText"),66;case 88:return this.pushState("trapText"),68;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 94:return 112;case 95:return 108;case 96:return 42;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;case 101:return this.pushState("text"),60;case 102:return this.popState(),49;case 103:return this.pushState("text"),48;case 104:return this.popState(),31;case 105:return this.pushState("text"),29;case 106:return this.popState(),64;case 107:return this.pushState("text"),63;case 108:return"TEXT";case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112:return 11}},rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|(?!\)+))/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}};return nf}();tf.lexer=Oc;function ef(){this.yy={}}return ef.prototype=tf,tf.Parser=ef,new ef}();jdt.parser=jdt;const $dt=jdt,DIe="flowchart-";let CNt=0,zdt=Le(),pl={},dT=[],XA={},E5=[],WW={},KW={},YW=0,qdt=!0,tv,XW,QW=[];const ZW=i=>Yr.sanitizeText(i,zdt),sP=function(i){const a=Object.keys(pl);for(const f of a)if(pl[f].id===i)return pl[f].domId;return i},_Nt=function(i,a,f,p,v,m,b={}){let E,_=i;_!==void 0&&_.trim().length!==0&&(pl[_]===void 0&&(pl[_]={id:_,labelType:"text",domId:DIe+_+"-"+CNt,styles:[],classes:[]}),CNt++,a!==void 0?(zdt=Le(),E=ZW(a.text.trim()),pl[_].labelType=a.type,E[0]==='"'&&E[E.length-1]==='"'&&(E=E.substring(1,E.length-1)),pl[_].text=E):pl[_].text===void 0&&(pl[_].text=i),f!==void 0&&(pl[_].type=f),p!=null&&p.forEach(function(L){pl[_].styles.push(L)}),v!=null&&v.forEach(function(L){pl[_].classes.push(L)}),m!==void 0&&(pl[_].dir=m),pl[_].props===void 0?pl[_].props=b:b!==void 0&&Object.assign(pl[_].props,b))},SNt=function(i,a,f){const m={start:i,end:a,type:void 0,text:"",labelType:"text"};Ut.info("abc78 Got edge...",m);const b=f.text;b!==void 0&&(m.text=ZW(b.text.trim()),m.text[0]==='"'&&m.text[m.text.length-1]==='"'&&(m.text=m.text.substring(1,m.text.length-1)),m.labelType=b.type),f!==void 0&&(m.type=f.type,m.stroke=f.stroke,m.length=f.length),dT.push(m)},ANt=function(i,a,f){Ut.info("addLink (abc78)",i,a,f);let p,v;for(p=0;p/)&&(tv="LR"),tv.match(/.*v/)&&(tv="TB"),tv==="TD"&&(tv="TB")},JW=function(i,a){i.split(",").forEach(function(f){let p=f;pl[p]!==void 0&&pl[p].classes.push(a),WW[p]!==void 0&&WW[p].classes.push(a)})},OIe=function(i,a){i.split(",").forEach(function(f){a!==void 0&&(KW[XW==="gen-1"?sP(f):f]=ZW(a))})},NIe=function(i,a,f){let p=sP(i);if(Le().securityLevel!=="loose"||a===void 0)return;let v=[];if(typeof f=="string"){v=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let m=0;m")),v.classed("hover",!0)}).on("mouseout",function(){a.transition().duration(500).style("opacity",0),yr(this).classed("hover",!1)})};QW.push(zNt);const qNt=function(i="gen-1"){pl={},XA={},dT=[],QW=[zNt],E5=[],WW={},YW=0,KW={},qdt=!0,XW=i,ap()},HNt=i=>{XW=i||"gen-2"},GNt=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},VNt=function(i,a,f){let p=i.text.trim(),v=f.text;i===f&&f.text.match(/\s/)&&(p=void 0);function m(N){const B={boolean:{},number:{},string:{}},j=[];let R;return{nodeList:N.filter(function(K){const it=typeof K;return K.stmt&&K.stmt==="dir"?(R=K.value,!1):K.trim()===""?!1:it in B?B[it].hasOwnProperty(K)?!1:B[it][K]=!0:j.includes(K)?!1:j.push(K)}),dir:R}}let b=[];const{nodeList:E,dir:_}=m(b.concat.apply(b,a));if(b=E,XW==="gen-1")for(let N=0;N2e3)return;if(UNt[aP]=a,E5[a].id===i)return{result:!0,count:0};let p=0,v=1;for(;p=0){const b=WNt(i,m);if(b.result)return{result:!0,count:v+b.count};v=v+b.count}p=p+1}return{result:!1,count:v}},KNt=function(i){return UNt[i]},YNt=function(){aP=-1,E5.length>0&&WNt("none",E5.length-1)},XNt=function(){return E5},QNt=()=>qdt?(qdt=!1,!0):!1,FIe=i=>{let a=i.trim(),f="arrow_open";switch(a[0]){case"<":f="arrow_point",a=a.slice(1);break;case"x":f="arrow_cross",a=a.slice(1);break;case"o":f="arrow_circle",a=a.slice(1);break}let p="normal";return a.includes("=")&&(p="thick"),a.includes(".")&&(p="dotted"),{type:f,stroke:p}},BIe=(i,a)=>{const f=a.length;let p=0;for(let v=0;v{const a=i.trim();let f=a.slice(0,-1),p="arrow_open";switch(a.slice(-1)){case"x":p="arrow_cross",a[0]==="x"&&(p="double_"+p,f=f.slice(1));break;case">":p="arrow_point",a[0]==="<"&&(p="double_"+p,f=f.slice(1));break;case"o":p="arrow_circle",a[0]==="o"&&(p="double_"+p,f=f.slice(1));break}let v="normal",m=f.length-1;f[0]==="="&&(v="thick"),f[0]==="~"&&(v="invisible");let b=BIe(".",f);return b&&(v="dotted",m=b),{type:p,stroke:v,length:m}},ZNt=(i,a)=>{const f=RIe(i);let p;if(a){if(p=FIe(a),p.stroke!==f.stroke)return{type:"INVALID",stroke:"INVALID"};if(p.type==="arrow_open")p.type=f.type;else{if(p.type!==f.type)return{type:"INVALID",stroke:"INVALID"};p.type="double_"+p.type}return p.type==="double_arrow"&&(p.type="double_arrow_point"),p.length=f.length,p}return f},JNt=(i,a)=>{let f=!1;return i.forEach(p=>{p.nodes.indexOf(a)>=0&&(f=!0)}),f},tPt=(i,a)=>{const f=[];return i.nodes.forEach((p,v)=>{JNt(a,p)||f.push(i.nodes[v])}),{nodes:f}},ePt={firstGraph:QNt},gT={defaultConfig:()=>oT.flowchart,setAccTitle:cg,getAccTitle:op,getAccDescription:up,setAccDescription:cp,addVertex:_Nt,lookUpDomId:sP,addLink:ANt,updateLinkInterpolate:LNt,updateLink:MNt,addClass:INt,setDirection:DNt,setClass:JW,setTooltip:OIe,getTooltip:NNt,setClickEvent:PNt,setLink:ONt,bindFunctions:FNt,getDirection:BNt,getVertices:RNt,getEdges:jNt,getClasses:$Nt,clear:qNt,setGen:HNt,defaultStyle:GNt,addSubGraph:VNt,getDepthFirstPos:KNt,indexNodes:YNt,getSubGraphs:XNt,destructLink:ZNt,lex:ePt,exists:JNt,makeUniq:tPt,setDiagramTitle:Z2,getDiagramTitle:Db},jIe=Object.freeze(Object.defineProperty({__proto__:null,addClass:INt,addLink:ANt,addSingleLink:SNt,addSubGraph:VNt,addVertex:_Nt,bindFunctions:FNt,clear:qNt,default:gT,defaultStyle:GNt,destructLink:ZNt,firstGraph:QNt,getClasses:$Nt,getDepthFirstPos:KNt,getDirection:BNt,getEdges:jNt,getSubGraphs:XNt,getTooltip:NNt,getVertices:RNt,indexNodes:YNt,lex:ePt,lookUpDomId:sP,setClass:JW,setClickEvent:PNt,setDirection:DNt,setGen:HNt,setLink:ONt,updateLink:MNt,updateLinkInterpolate:LNt},Symbol.toStringTag,{value:"Module"}));var $Ie="[object Symbol]";function pT(i){return typeof i=="symbol"||l3(i)&&tT(i)==$Ie}function QA(i,a){for(var f=-1,p=i==null?0:i.length,v=Array(p);++f-1}function Nb(i){return ek(i)?ODt(i):OOt(i)}var iDe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sDe=/^\w*$/;function Hdt(i,a){if(Mf(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||pT(i)?!0:sDe.test(i)||!iDe.test(i)||a!=null&&i in Object(a)}var aDe=500;function oDe(i){var a=PA(i,function(p){return f.size===aDe&&f.clear(),p}),f=a.cache;return a}var cDe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,uDe=/\\(\\)?/g,lDe=oDe(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(cDe,function(f,p,v,m){a.push(v?m.replace(uDe,"$1"):p||f)}),a});const hDe=lDe;function uPt(i){return i==null?"":iPt(i)}function eK(i,a){return Mf(i)?i:Hdt(i,a)?[i]:hDe(uPt(i))}var fDe=1/0;function oP(i){if(typeof i=="string"||pT(i))return i;var a=i+"";return a=="0"&&1/i==-fDe?"-0":a}function nK(i,a){a=eK(a,i);for(var f=0,p=a.length;i!=null&&f0&&f(E)?a>1?rK(E,a-1,f,p,v):Gdt(v,E):p||(v[v.length]=E)}return v}function ZA(i){var a=i==null?0:i.length;return a?rK(i,1):[]}function pDe(i){return BDt(FDt(i,void 0,ZA),i+"")}function bDe(i,a,f,p){var v=-1,m=i==null?0:i.length;for(p&&m&&(f=i[++v]);++vE))return!1;var L=m.get(i),N=m.get(a);if(L&&N)return L==a&&N==i;var B=-1,j=!0,R=f&GOe?new uP:void 0;for(m.set(i,a),m.set(a,i);++B2?a[2]:void 0;for(v&&YN(a[0],a[1],v)&&(p=1);++f-1?v[m?a[b]:b]:void 0}}var ONe=Math.max;function NNe(i,a,f){var p=i==null?0:i.length;if(!p)return-1;var v=f==null?0:ZIe(f);return v<0&&(v=ONe(p+v,0)),cPt(i,ok(a),v)}var PNe=DNe(NNe);const Zdt=PNe;function PPt(i,a){var f=-1,p=ek(i)?Array(i.length):[];return sK(i,function(v,m,b){p[++f]=a(v,m,b)}),p}function Of(i,a){var f=Mf(i)?QA:PPt;return f(i,ok(a))}function FNe(i,a){return i==null?i:Y1t(i,Qdt(a),iT)}function BNe(i,a){return i&&Xdt(i,Qdt(a))}function RNe(i,a){return i>a}var jNe=Object.prototype,$Ne=jNe.hasOwnProperty;function zNe(i,a){return i!=null&&$Ne.call(i,a)}function za(i,a){return i!=null&&IPt(i,a,zNe)}function qNe(i,a){return QA(a,function(f){return i[f]})}function C5(i){return i==null?[]:qNe(i,Nb(i))}function Xh(i){return i===void 0}function FPt(i,a){return ia||m&&b&&_&&!E&&!L||p&&b&&_||!f&&_||!v)return 1;if(!p&&!m&&!L&&i=E)return _;var L=f[p];return _*(L=="desc"?-1:1)}}return i.index-a.index}function KNe(i,a,f){a.length?a=QA(a,function(m){return Mf(m)?function(b){return nK(b,m.length===1?m[0]:m)}:m}):a=[sT];var p=-1;a=QA(a,wW(ok));var v=PPt(i,function(m,b,E){var _=QA(a,function(L){return L(m)});return{criteria:_,index:++p,value:m}});return VNe(v,function(m,b){return WNe(m,b,f)})}function YNe(i,a){return GNe(i,a,function(f,p){return DPt(i,p)})}var XNe=pDe(function(i,a){return i==null?{}:YNe(i,a)});const hP=XNe;var QNe=Math.ceil,ZNe=Math.max;function JNe(i,a,f,p){for(var v=-1,m=ZNe(QNe((a-i)/(f||1)),0),b=Array(m);m--;)b[p?m:++v]=i,i+=f;return b}function tPe(i){return function(a,f,p){return p&&typeof p!="number"&&YN(a,f,p)&&(f=p=void 0),a=tK(a),f===void 0?(f=a,a=0):f=tK(f),p=p===void 0?a1&&YN(i,a[0],a[1])?a=[]:f>2&&YN(a[0],a[1],a[2])&&(a=[a[0]]),KNe(i,rK(a,1),[])});const dP=rPe;var iPe=1/0,sPe=GA&&1/Wdt(new GA([,-0]))[1]==iPe?function(i){return new GA(i)}:JIe;const aPe=sPe;var oPe=200;function cPe(i,a,f){var p=-1,v=rDe,m=i.length,b=!0,E=[],_=E;if(f)b=!1,v=MNe;else if(m>=oPe){var L=a?null:aPe(i);if(L)return Wdt(L);b=!1,v=EPt,_=new uP}else _=a?[]:E;t:for(;++p1?v.setNode(m,f):v.setNode(m)}),this}setNode(a,f){return za(this._nodes,a)?(arguments.length>1&&(this._nodes[a]=f),this):(this._nodes[a]=arguments.length>1?f:this._defaultNodeLabelFn(a),this._isCompound&&(this._parent[a]=wT,this._children[a]={},this._children[wT][a]=!0),this._in[a]={},this._preds[a]={},this._out[a]={},this._sucs[a]={},++this._nodeCount,this)}node(a){return this._nodes[a]}hasNode(a){return za(this._nodes,a)}removeNode(a){var f=this;if(za(this._nodes,a)){var p=function(v){f.removeEdge(f._edgeObjs[v])};delete this._nodes[a],this._isCompound&&(this._removeFromParentsChildList(a),delete this._parent[a],cr(this.children(a),function(v){f.setParent(v)}),delete this._children[a]),cr(Nb(this._in[a]),p),delete this._in[a],delete this._preds[a],cr(Nb(this._out[a]),p),delete this._out[a],delete this._sucs[a],--this._nodeCount}return this}setParent(a,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Xh(f))f=wT;else{f+="";for(var p=f;!Xh(p);p=this.parent(p))if(p===a)throw new Error("Setting "+f+" as parent of "+a+" would create a cycle");this.setNode(f)}return this.setNode(a),this._removeFromParentsChildList(a),this._parent[a]=f,this._children[f][a]=!0,this}_removeFromParentsChildList(a){delete this._children[this._parent[a]][a]}parent(a){if(this._isCompound){var f=this._parent[a];if(f!==wT)return f}}children(a){if(Xh(a)&&(a=wT),this._isCompound){var f=this._children[a];if(f)return Nb(f)}else{if(a===wT)return this.nodes();if(this.hasNode(a))return[]}}predecessors(a){var f=this._preds[a];if(f)return Nb(f)}successors(a){var f=this._sucs[a];if(f)return Nb(f)}neighbors(a){var f=this.predecessors(a);if(f)return lPe(f,this.successors(a))}isLeaf(a){var f;return this.isDirected()?f=this.successors(a):f=this.neighbors(a),f.length===0}filterNodes(a){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var p=this;cr(this._nodes,function(b,E){a(E)&&f.setNode(E,b)}),cr(this._edgeObjs,function(b){f.hasNode(b.v)&&f.hasNode(b.w)&&f.setEdge(b,p.edge(b))});var v={};function m(b){var E=p.parent(b);return E===void 0||f.hasNode(E)?(v[b]=E,E):E in v?v[E]:m(E)}return this._isCompound&&cr(f.nodes(),function(b){f.setParent(b,m(b))}),f}setDefaultEdgeLabel(a){return OA(a)||(a=jA(a)),this._defaultEdgeLabelFn=a,this}edgeCount(){return this._edgeCount}edges(){return C5(this._edgeObjs)}setPath(a,f){var p=this,v=arguments;return fP(a,function(m,b){return v.length>1?p.setEdge(m,b,f):p.setEdge(m,b),b}),this}setEdge(){var a,f,p,v,m=!1,b=arguments[0];typeof b=="object"&&b!==null&&"v"in b?(a=b.v,f=b.w,p=b.name,arguments.length===2&&(v=arguments[1],m=!0)):(a=b,f=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],m=!0)),a=""+a,f=""+f,Xh(p)||(p=""+p);var E=gP(this._isDirected,a,f,p);if(za(this._edgeLabels,E))return m&&(this._edgeLabels[E]=v),this;if(!Xh(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(a),this.setNode(f),this._edgeLabels[E]=m?v:this._defaultEdgeLabelFn(a,f,p);var _=pPe(this._isDirected,a,f,p);return a=_.v,f=_.w,Object.freeze(_),this._edgeObjs[E]=_,RPt(this._preds[f],a),RPt(this._sucs[a],f),this._in[f][E]=_,this._out[a][E]=_,this._edgeCount++,this}edge(a,f,p){var v=arguments.length===1?e0t(this._isDirected,arguments[0]):gP(this._isDirected,a,f,p);return this._edgeLabels[v]}hasEdge(a,f,p){var v=arguments.length===1?e0t(this._isDirected,arguments[0]):gP(this._isDirected,a,f,p);return za(this._edgeLabels,v)}removeEdge(a,f,p){var v=arguments.length===1?e0t(this._isDirected,arguments[0]):gP(this._isDirected,a,f,p),m=this._edgeObjs[v];return m&&(a=m.v,f=m.w,delete this._edgeLabels[v],delete this._edgeObjs[v],jPt(this._preds[f],a),jPt(this._sucs[a],f),delete this._in[f][v],delete this._out[a][v],this._edgeCount--),this}inEdges(a,f){var p=this._in[a];if(p){var v=C5(p);return f?T5(v,function(m){return m.v===f}):v}}outEdges(a,f){var p=this._out[a];if(p){var v=C5(p);return f?T5(v,function(m){return m.w===f}):v}}nodeEdges(a,f){var p=this.inEdges(a,f);if(p)return p.concat(this.outEdges(a,f))}}a1.prototype._nodeCount=0,a1.prototype._edgeCount=0;function RPt(i,a){i[a]?i[a]++:i[a]=1}function jPt(i,a){--i[a]||delete i[a]}function gP(i,a,f,p){var v=""+a,m=""+f;if(!i&&v>m){var b=v;v=m,m=b}return v+BPt+m+BPt+(Xh(p)?gPe:p)}function pPe(i,a,f,p){var v=""+a,m=""+f;if(!i&&v>m){var b=v;v=m,m=b}var E={v,w:m};return p&&(E.name=p),E}function e0t(i,a){return gP(i,a.v,a.w,a.name)}class bPe{constructor(){var a={};a._next=a._prev=a,this._sentinel=a}dequeue(){var a=this._sentinel,f=a._prev;if(f!==a)return $Pt(f),f}enqueue(a){var f=this._sentinel;a._prev&&a._next&&$Pt(a),a._next=f._next,f._next._prev=a,f._next=a,a._prev=f}toString(){for(var a=[],f=this._sentinel,p=f._prev;p!==f;)a.push(JSON.stringify(p,vPe)),p=p._prev;return"["+a.join(", ")+"]"}}function $Pt(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function vPe(i,a){if(i!=="_next"&&i!=="_prev")return a}var wPe=jA(1);function mPe(i,a){if(i.nodeCount()<=1)return[];var f=xPe(i,a||wPe),p=yPe(f.graph,f.buckets,f.zeroIdx);return ZA(Of(p,function(v){return i.outEdges(v.v,v.w)}))}function yPe(i,a,f){for(var p=[],v=a[a.length-1],m=a[0],b;i.nodeCount();){for(;b=m.dequeue();)n0t(i,a,f,b);for(;b=v.dequeue();)n0t(i,a,f,b);if(i.nodeCount()){for(var E=a.length-2;E>0;--E)if(b=a[E].dequeue(),b){p=p.concat(n0t(i,a,f,b,!0));break}}}return p}function n0t(i,a,f,p,v){var m=v?[]:void 0;return cr(i.inEdges(p.v),function(b){var E=i.edge(b),_=i.node(b.v);v&&m.push({v:b.v,w:b.w}),_.out-=E,r0t(a,f,_)}),cr(i.outEdges(p.v),function(b){var E=i.edge(b),_=b.w,L=i.node(_);L.in-=E,r0t(a,f,L)}),i.removeNode(p.v),m}function xPe(i,a){var f=new a1,p=0,v=0;cr(i.nodes(),function(E){f.setNode(E,{v:E,in:0,out:0})}),cr(i.edges(),function(E){var _=f.edge(E.v,E.w)||0,L=a(E),N=_+L;f.setEdge(E.v,E.w,N),v=Math.max(v,f.node(E.v).out+=L),p=Math.max(p,f.node(E.w).in+=L)});var m=vT(v+p+3).map(function(){return new bPe}),b=p+1;return cr(f.nodes(),function(E){r0t(m,b,f.node(E))}),{graph:f,buckets:m,zeroIdx:b}}function r0t(i,a,f){f.out?f.in?i[f.out-f.in+a].enqueue(f):i[i.length-1].enqueue(f):i[0].enqueue(f)}function kPe(i){var a=i.graph().acyclicer==="greedy"?mPe(i,f(i)):EPe(i);cr(a,function(p){var v=i.edge(p);i.removeEdge(p),v.forwardName=p.name,v.reversed=!0,i.setEdge(p.w,p.v,v,cK("rev"))});function f(p){return function(v){return p.edge(v).weight}}}function EPe(i){var a=[],f={},p={};function v(m){za(p,m)||(p[m]=!0,f[m]=!0,cr(i.outEdges(m),function(b){za(f,b.w)?a.push(b):v(b.w)}),delete f[m])}return cr(i.nodes(),v),a}function TPe(i){cr(i.edges(),function(a){var f=i.edge(a);if(f.reversed){i.removeEdge(a);var p=f.forwardName;delete f.reversed,delete f.forwardName,i.setEdge(a.w,a.v,f,p)}})}function tL(i,a,f,p){var v;do v=cK(p);while(i.hasNode(v));return f.dummy=a,i.setNode(v,f),v}function CPe(i){var a=new a1().setGraph(i.graph());return cr(i.nodes(),function(f){a.setNode(f,i.node(f))}),cr(i.edges(),function(f){var p=a.edge(f.v,f.w)||{weight:0,minlen:1},v=i.edge(f);a.setEdge(f.v,f.w,{weight:p.weight+v.weight,minlen:Math.max(p.minlen,v.minlen)})}),a}function zPt(i){var a=new a1({multigraph:i.isMultigraph()}).setGraph(i.graph());return cr(i.nodes(),function(f){i.children(f).length||a.setNode(f,i.node(f))}),cr(i.edges(),function(f){a.setEdge(f,i.edge(f))}),a}function qPt(i,a){var f=i.x,p=i.y,v=a.x-f,m=a.y-p,b=i.width/2,E=i.height/2;if(!v&&!m)throw new Error("Not possible to find intersection inside of the rectangle");var _,L;return Math.abs(m)*b>Math.abs(v)*E?(m<0&&(E=-E),_=E*v/m,L=E):(v<0&&(b=-b),_=b,L=b*m/v),{x:f+_,y:p+L}}function uK(i){var a=Of(vT(GPt(i)+1),function(){return[]});return cr(i.nodes(),function(f){var p=i.node(f),v=p.rank;Xh(v)||(a[v][p.order]=f)}),a}function _Pe(i){var a=lP(Of(i.nodes(),function(f){return i.node(f).rank}));cr(i.nodes(),function(f){var p=i.node(f);za(p,"rank")&&(p.rank-=a)})}function SPe(i){var a=lP(Of(i.nodes(),function(m){return i.node(m).rank})),f=[];cr(i.nodes(),function(m){var b=i.node(m).rank-a;f[b]||(f[b]=[]),f[b].push(m)});var p=0,v=i.graph().nodeRankFactor;cr(f,function(m,b){Xh(m)&&b%v!==0?--p:p&&cr(m,function(E){i.node(E).rank+=p})})}function HPt(i,a,f,p){var v={width:0,height:0};return arguments.length>=4&&(v.rank=f,v.order=p),tL(i,"border",v,a)}function GPt(i){return bT(Of(i.nodes(),function(a){var f=i.node(a).rank;if(!Xh(f))return f}))}function APe(i,a){var f={lhs:[],rhs:[]};return cr(i,function(p){a(p)?f.lhs.push(p):f.rhs.push(p)}),f}function LPe(i,a){var f=OPt();try{return a()}finally{console.log(i+" time: "+(OPt()-f)+"ms")}}function MPe(i,a){return a()}function IPe(i){function a(f){var p=i.children(f),v=i.node(f);if(p.length&&cr(p,a),za(v,"minRank")){v.borderLeft=[],v.borderRight=[];for(var m=v.minRank,b=v.maxRank+1;mb.lim&&(E=b,_=!0);var L=T5(a.edges(),function(N){return _===nFt(i,i.node(N.v),E)&&_!==nFt(i,i.node(N.w),E)});return t0t(L,function(N){return pP(a,N)})}function eFt(i,a,f,p){var v=f.v,m=f.w;i.removeEdge(v,m),i.setEdge(p.v,p.w,{}),c0t(i),o0t(i,a),UPe(i,a)}function UPe(i,a){var f=Zdt(i.nodes(),function(v){return!a.node(v).parent}),p=GPe(i,f);p=p.slice(1),cr(p,function(v){var m=i.node(v).parent,b=a.edge(v,m),E=!1;b||(b=a.edge(m,v),E=!0),a.node(v).rank=a.node(m).rank+(E?b.minlen:-b.minlen)})}function WPe(i,a,f){return i.hasEdge(a,f)}function nFt(i,a,f){return f.low<=a.lim&&a.lim<=f.lim}function KPe(i){switch(i.graph().ranker){case"network-simplex":rFt(i);break;case"tight-tree":XPe(i);break;case"longest-path":YPe(i);break;default:rFt(i)}}var YPe=a0t;function XPe(i){a0t(i),KPt(i)}function rFt(i){mT(i)}function QPe(i){var a=tL(i,"root",{},"_root"),f=ZPe(i),p=bT(C5(f))-1,v=2*p+1;i.graph().nestingRoot=a,cr(i.edges(),function(b){i.edge(b).minlen*=v});var m=JPe(i)+1;cr(i.children(),function(b){iFt(i,a,v,m,p,f,b)}),i.graph().nodeRankFactor=v}function iFt(i,a,f,p,v,m,b){var E=i.children(b);if(!E.length){b!==a&&i.setEdge(a,b,{weight:0,minlen:f});return}var _=HPt(i,"_bt"),L=HPt(i,"_bb"),N=i.node(b);i.setParent(_,b),N.borderTop=_,i.setParent(L,b),N.borderBottom=L,cr(E,function(B){iFt(i,a,f,p,v,m,B);var j=i.node(B),R=j.borderTop?j.borderTop:B,z=j.borderBottom?j.borderBottom:B,K=j.borderTop?p:2*p,it=R!==z?1:v-m[b]+1;i.setEdge(_,R,{weight:K,minlen:it,nestingEdge:!0}),i.setEdge(z,L,{weight:K,minlen:it,nestingEdge:!0})}),i.parent(b)||i.setEdge(a,_,{weight:0,minlen:v+m[b]})}function ZPe(i){var a={};function f(p,v){var m=i.children(p);m&&m.length&&cr(m,function(b){f(b,v+1)}),a[p]=v}return cr(i.children(),function(p){f(p,1)}),a}function JPe(i){return fP(i.edges(),function(a,f){return a+i.edge(f).weight},0)}function tFe(i){var a=i.graph();i.removeNode(a.nestingRoot),delete a.nestingRoot,cr(i.edges(),function(f){var p=i.edge(f);p.nestingEdge&&i.removeEdge(f)})}function eFe(i,a,f){var p={},v;cr(f,function(m){for(var b=i.parent(m),E,_;b;){if(E=i.parent(b),E?(_=p[E],p[E]=b):(_=v,v=b),_&&_!==b){a.setEdge(_,b);return}b=E}})}function nFe(i,a,f){var p=rFe(i),v=new a1({compound:!0}).setGraph({root:p}).setDefaultNodeLabel(function(m){return i.node(m)});return cr(i.nodes(),function(m){var b=i.node(m),E=i.parent(m);(b.rank===a||b.minRank<=a&&a<=b.maxRank)&&(v.setNode(m),v.setParent(m,E||p),cr(i[f](m),function(_){var L=_.v===m?_.w:_.v,N=v.edge(L,m),B=Xh(N)?0:N.weight;v.setEdge(L,m,{weight:i.edge(_).weight+B})}),za(b,"minRank")&&v.setNode(m,{borderLeft:b.borderLeft[a],borderRight:b.borderRight[a]}))}),v}function rFe(i){for(var a;i.hasNode(a=cK("_root")););return a}function iFe(i,a){for(var f=0,p=1;p0;)N%2&&(B+=E[N+1]),N=N-1>>1,E[N]+=L.weight;_+=L.weight*B})),_}function aFe(i){var a={},f=T5(i.nodes(),function(E){return!i.children(E).length}),p=bT(Of(f,function(E){return i.node(E).rank})),v=Of(vT(p+1),function(){return[]});function m(E){if(!za(a,E)){a[E]=!0;var _=i.node(E);v[_.rank].push(E),cr(i.successors(E),m)}}var b=dP(f,function(E){return i.node(E).rank});return cr(b,m),v}function oFe(i,a){return Of(a,function(f){var p=i.inEdges(f);if(p.length){var v=fP(p,function(m,b){var E=i.edge(b),_=i.node(b.v);return{sum:m.sum+E.weight*_.order,weight:m.weight+E.weight}},{sum:0,weight:0});return{v:f,barycenter:v.sum/v.weight,weight:v.weight}}else return{v:f}})}function cFe(i,a){var f={};cr(i,function(v,m){var b=f[v.v]={indegree:0,in:[],out:[],vs:[v.v],i:m};Xh(v.barycenter)||(b.barycenter=v.barycenter,b.weight=v.weight)}),cr(a.edges(),function(v){var m=f[v.v],b=f[v.w];!Xh(m)&&!Xh(b)&&(b.indegree++,m.out.push(f[v.w]))});var p=T5(f,function(v){return!v.indegree});return uFe(p)}function uFe(i){var a=[];function f(m){return function(b){b.merged||(Xh(b.barycenter)||Xh(m.barycenter)||b.barycenter>=m.barycenter)&&lFe(m,b)}}function p(m){return function(b){b.in.push(m),--b.indegree===0&&i.push(b)}}for(;i.length;){var v=i.pop();a.push(v),cr(v.in.reverse(),f(v)),cr(v.out,p(v))}return Of(T5(a,function(m){return!m.merged}),function(m){return hP(m,["vs","i","barycenter","weight"])})}function lFe(i,a){var f=0,p=0;i.weight&&(f+=i.barycenter*i.weight,p+=i.weight),a.weight&&(f+=a.barycenter*a.weight,p+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=f/p,i.weight=p,i.i=Math.min(a.i,i.i),a.merged=!0}function hFe(i,a){var f=APe(i,function(N){return za(N,"barycenter")}),p=f.lhs,v=dP(f.rhs,function(N){return-N.i}),m=[],b=0,E=0,_=0;p.sort(fFe(!!a)),_=sFt(m,v,_),cr(p,function(N){_+=N.vs.length,m.push(N.vs),b+=N.barycenter*N.weight,E+=N.weight,_=sFt(m,v,_)});var L={vs:ZA(m)};return E&&(L.barycenter=b/E,L.weight=E),L}function sFt(i,a,f){for(var p;a.length&&(p=aK(a)).i<=f;)a.pop(),i.push(p.vs),f++;return f}function fFe(i){return function(a,f){return a.barycenterf.barycenter?1:i?f.i-a.i:a.i-f.i}}function aFt(i,a,f,p){var v=i.children(a),m=i.node(a),b=m?m.borderLeft:void 0,E=m?m.borderRight:void 0,_={};b&&(v=T5(v,function(z){return z!==b&&z!==E}));var L=oFe(i,v);cr(L,function(z){if(i.children(z.v).length){var K=aFt(i,z.v,f,p);_[z.v]=K,za(K,"barycenter")&&gFe(z,K)}});var N=cFe(L,f);dFe(N,_);var B=hFe(N,p);if(b&&(B.vs=ZA([b,B.vs,E]),i.predecessors(b).length)){var j=i.node(i.predecessors(b)[0]),R=i.node(i.predecessors(E)[0]);za(B,"barycenter")||(B.barycenter=0,B.weight=0),B.barycenter=(B.barycenter*B.weight+j.order+R.order)/(B.weight+2),B.weight+=2}return B}function dFe(i,a){cr(i,function(f){f.vs=ZA(f.vs.map(function(p){return a[p]?a[p].vs:p}))})}function gFe(i,a){Xh(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight)}function pFe(i){var a=GPt(i),f=oFt(i,vT(1,a+1),"inEdges"),p=oFt(i,vT(a-1,-1,-1),"outEdges"),v=aFe(i);cFt(i,v);for(var m=Number.POSITIVE_INFINITY,b,E=0,_=0;_<4;++E,++_){bFe(E%2?f:p,E%4>=2),v=uK(i);var L=iFe(i,v);Lb||E>a[_].lim));for(L=_,_=p;(_=i.parent(_))!==L;)m.push(_);return{path:v.concat(m.reverse()),lca:L}}function mFe(i){var a={},f=0;function p(v){var m=f;cr(i.children(v),p),a[v]={low:m,lim:f++}}return cr(i.children(),p),a}function yFe(i,a){var f={};function p(v,m){var b=0,E=0,_=v.length,L=aK(m);return cr(m,function(N,B){var j=kFe(i,N),R=j?i.node(j).order:_;(j||N===L)&&(cr(m.slice(E,B+1),function(z){cr(i.predecessors(z),function(K){var it=i.node(K),st=it.order;(stL)&&uFt(f,j,N)})})}function v(m,b){var E=-1,_,L=0;return cr(b,function(N,B){if(i.node(N).dummy==="border"){var j=i.predecessors(N);j.length&&(_=i.node(j[0]).order,p(b,L,B,E,_),L=B,E=_)}p(b,L,b.length,_,m.length)}),b}return fP(a,v),f}function kFe(i,a){if(i.node(a).dummy)return Zdt(i.predecessors(a),function(f){return i.node(f).dummy})}function uFt(i,a,f){if(a>f){var p=a;a=f,f=p}var v=i[a];v||(i[a]=v={}),v[f]=!0}function EFe(i,a,f){if(a>f){var p=a;a=f,f=p}return za(i[a],f)}function TFe(i,a,f,p){var v={},m={},b={};return cr(a,function(E){cr(E,function(_,L){v[_]=_,m[_]=_,b[_]=L})}),cr(a,function(E){var _=-1;cr(E,function(L){var N=p(L);if(N.length){N=dP(N,function(K){return b[K]});for(var B=(N.length-1)/2,j=Math.floor(B),R=Math.ceil(B);j<=R;++j){var z=N[j];m[L]===L&&_0}function b3(i,a,f){var p=i.x,v=i.y,m=[],b=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;a.forEach(function(z){b=Math.min(b,z.x),E=Math.min(E,z.y)});for(var _=p-i.width/2-b,L=v-i.height/2-E,N=0;N1&&m.sort(function(z,K){var it=z.x-f.x,st=z.y-f.y,ut=Math.sqrt(it*it+st*st),bt=K.x-f.x,mt=K.y-f.y,yt=Math.sqrt(bt*bt+mt*mt);return utMath.abs(v)*E?(m<0&&(E=-E),_=m===0?0:E*v/m,L=E):(v<0&&(b=-b),_=b,L=v===0?0:b*m/v),{x:f+_,y:p+L}}var y0t={rect:SBe,ellipse:ABe,circle:LBe,diamond:MBe};function _Be(i){y0t=i}function SBe(i,a,f){var p=i.insert("rect",":first-child").attr("rx",f.rx).attr("ry",f.ry).attr("x",-a.width/2).attr("y",-a.height/2).attr("width",a.width).attr("height",a.height);return f.intersect=function(v){return m0t(f,v)},p}function ABe(i,a,f){var p=a.width/2,v=a.height/2,m=i.insert("ellipse",":first-child").attr("x",-a.width/2).attr("y",-a.height/2).attr("rx",p).attr("ry",v);return f.intersect=function(b){return pFt(f,p,v,b)},m}function LBe(i,a,f){var p=Math.max(a.width,a.height)/2,v=i.insert("circle",":first-child").attr("x",-a.width/2).attr("y",-a.height/2).attr("r",p);return f.intersect=function(m){return TBe(f,p,m)},v}function MBe(i,a,f){var p=a.width*Math.SQRT2/2,v=a.height*Math.SQRT2/2,m=[{x:0,y:-v},{x:-p,y:0},{x:0,y:v},{x:p,y:0}],b=i.insert("polygon",":first-child").attr("points",m.map(function(E){return E.x+","+E.y}).join(" "));return f.intersect=function(E){return b3(f,m,E)},b}function IBe(){var i=function(a,f){NBe(f);var p=bP(a,"output"),v=bP(p,"clusters"),m=bP(p,"edgePaths"),b=b0t(bP(p,"edgeLabels"),f),E=w0t(bP(p,"nodes"),f,y0t);eL(f),EBe(E,f),kBe(b,f),v0t(m,f,f0t);var _=p0t(v,f);xBe(_,f),PBe(f)};return i.createNodes=function(a){return arguments.length?(yBe(a),i):w0t},i.createClusters=function(a){return arguments.length?(fBe(a),i):p0t},i.createEdgeLabels=function(a){return arguments.length?(dBe(a),i):b0t},i.createEdgePaths=function(a){return arguments.length?(gBe(a),i):v0t},i.shapes=function(a){return arguments.length?(_Be(a),i):y0t},i.arrows=function(a){return arguments.length?(sBe(a),i):f0t},i}var DBe={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},OBe={arrowhead:"normal",curve:ig};function NBe(i){i.nodes().forEach(function(a){var f=i.node(a);!za(f,"label")&&!i.children(a).length&&(f.label=a),za(f,"paddingX")&&JA(f,{paddingLeft:f.paddingX,paddingRight:f.paddingX}),za(f,"paddingY")&&JA(f,{paddingTop:f.paddingY,paddingBottom:f.paddingY}),za(f,"padding")&&JA(f,{paddingLeft:f.padding,paddingRight:f.padding,paddingTop:f.padding,paddingBottom:f.padding}),JA(f,DBe),cr(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(p){f[p]=Number(f[p])}),za(f,"width")&&(f._prevWidth=f.width),za(f,"height")&&(f._prevHeight=f.height)}),i.edges().forEach(function(a){var f=i.edge(a);za(f,"label")||(f.label=""),JA(f,OBe)})}function PBe(i){cr(i.nodes(),function(a){var f=i.node(a);za(f,"_prevWidth")?f.width=f._prevWidth:delete f.width,za(f,"_prevHeight")?f.height=f._prevHeight:delete f.height,delete f._prevWidth,delete f._prevHeight})}function bP(i,a){var f=i.select("g."+a);return f.empty()&&(f=i.append("g").attr("class",a)),f}function vFt(i,a,f){const p=a.width,v=a.height,m=(p+v)*.9,b=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],E=_5(i,m,m,b);return f.intersect=function(_){return b3(f,b,_)},E}function wFt(i,a,f){const v=a.height,m=v/4,b=a.width+2*m,E=[{x:m,y:0},{x:b-m,y:0},{x:b,y:-v/2},{x:b-m,y:-v},{x:m,y:-v},{x:0,y:-v/2}],_=_5(i,b,v,E);return f.intersect=function(L){return b3(f,E,L)},_}function mFt(i,a,f){const p=a.width,v=a.height,m=[{x:-v/2,y:0},{x:p,y:0},{x:p,y:-v},{x:-v/2,y:-v},{x:0,y:-v/2}],b=_5(i,p,v,m);return f.intersect=function(E){return b3(f,m,E)},b}function yFt(i,a,f){const p=a.width,v=a.height,m=[{x:-2*v/6,y:0},{x:p-v/6,y:0},{x:p+2*v/6,y:-v},{x:v/6,y:-v}],b=_5(i,p,v,m);return f.intersect=function(E){return b3(f,m,E)},b}function xFt(i,a,f){const p=a.width,v=a.height,m=[{x:2*v/6,y:0},{x:p+v/6,y:0},{x:p-2*v/6,y:-v},{x:-v/6,y:-v}],b=_5(i,p,v,m);return f.intersect=function(E){return b3(f,m,E)},b}function kFt(i,a,f){const p=a.width,v=a.height,m=[{x:-2*v/6,y:0},{x:p+2*v/6,y:0},{x:p-v/6,y:-v},{x:v/6,y:-v}],b=_5(i,p,v,m);return f.intersect=function(E){return b3(f,m,E)},b}function EFt(i,a,f){const p=a.width,v=a.height,m=[{x:v/6,y:0},{x:p-v/6,y:0},{x:p+2*v/6,y:-v},{x:-2*v/6,y:-v}],b=_5(i,p,v,m);return f.intersect=function(E){return b3(f,m,E)},b}function TFt(i,a,f){const p=a.width,v=a.height,m=[{x:0,y:0},{x:p+v/2,y:0},{x:p,y:-v/2},{x:p+v/2,y:-v},{x:0,y:-v}],b=_5(i,p,v,m);return f.intersect=function(E){return b3(f,m,E)},b}function CFt(i,a,f){const p=a.height,v=a.width+p/4,m=i.insert("rect",":first-child").attr("rx",p/2).attr("ry",p/2).attr("x",-v/2).attr("y",-p/2).attr("width",v).attr("height",p);return f.intersect=function(b){return m0t(f,b)},m}function _Ft(i,a,f){const p=a.width,v=a.height,m=[{x:0,y:0},{x:p,y:0},{x:p,y:-v},{x:0,y:-v},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-v},{x:-8,y:-v},{x:-8,y:0}],b=_5(i,p,v,m);return f.intersect=function(E){return b3(f,m,E)},b}function SFt(i,a,f){const p=a.width,v=p/2,m=v/(2.5+p/50),b=a.height+m,E="M 0,"+m+" a "+v+","+m+" 0,0,0 "+p+" 0 a "+v+","+m+" 0,0,0 "+-p+" 0 l 0,"+b+" a "+v+","+m+" 0,0,0 "+p+" 0 l 0,"+-b,_=i.attr("label-offset-y",m).insert("path",":first-child").attr("d",E).attr("transform","translate("+-p/2+","+-(b/2+m)+")");return f.intersect=function(L){const N=m0t(f,L),B=N.x-f.x;if(v!=0&&(Math.abs(B)f.height/2-m)){let j=m*m*(1-B*B/(v*v));j!=0&&(j=Math.sqrt(j)),j=m-j,L.y-f.y>0&&(j=-j),N.y+=j}return N},_}function FBe(i){i.shapes().question=vFt,i.shapes().hexagon=wFt,i.shapes().stadium=CFt,i.shapes().subroutine=_Ft,i.shapes().cylinder=SFt,i.shapes().rect_left_inv_arrow=mFt,i.shapes().lean_right=yFt,i.shapes().lean_left=xFt,i.shapes().trapezoid=kFt,i.shapes().inv_trapezoid=EFt,i.shapes().rect_right_inv_arrow=TFt}function BBe(i){i({question:vFt}),i({hexagon:wFt}),i({stadium:CFt}),i({subroutine:_Ft}),i({cylinder:SFt}),i({rect_left_inv_arrow:mFt}),i({lean_right:yFt}),i({lean_left:xFt}),i({trapezoid:kFt}),i({inv_trapezoid:EFt}),i({rect_right_inv_arrow:TFt})}function _5(i,a,f,p){return i.insert("polygon",":first-child").attr("points",p.map(function(v){return v.x+","+v.y}).join(" ")).attr("transform","translate("+-a/2+","+f/2+")")}const RBe={addToRender:FBe,addToRenderV2:BBe},AFt={},jBe=function(i){const a=Object.keys(i);for(const f of a)AFt[f]=i[f]},LFt=function(i,a,f,p,v,m){const b=p?p.select(`[id="${f}"]`):yr(`[id="${f}"]`),E=v||document;Object.keys(i).forEach(function(L){const N=i[L];let B="default";N.classes.length>0&&(B=N.classes.join(" "));const j=em(N.styles);let R=N.text!==void 0?N.text:N.id,z;if(s1(Le().flowchart.htmlLabels)){const st={label:R.replace(/fa[blrs]?:fa-[\w-]+/g,ut=>``)};z=d0t(b,st).node(),z.parentNode.removeChild(z)}else{const st=E.createElementNS("http://www.w3.org/2000/svg","text");st.setAttribute("style",j.labelStyle.replace("color:","fill:"));const ut=R.split(Yr.lineBreakRegex);for(const bt of ut){const mt=E.createElementNS("http://www.w3.org/2000/svg","tspan");mt.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),mt.setAttribute("dy","1em"),mt.setAttribute("x","1"),mt.textContent=bt,st.appendChild(mt)}z=st}let K=0,it="";switch(N.type){case"round":K=5,it="rect";break;case"square":it="rect";break;case"diamond":it="question";break;case"hexagon":it="hexagon";break;case"odd":it="rect_left_inv_arrow";break;case"lean_right":it="lean_right";break;case"lean_left":it="lean_left";break;case"trapezoid":it="trapezoid";break;case"inv_trapezoid":it="inv_trapezoid";break;case"odd_right":it="rect_left_inv_arrow";break;case"circle":it="circle";break;case"ellipse":it="ellipse";break;case"stadium":it="stadium";break;case"subroutine":it="subroutine";break;case"cylinder":it="cylinder";break;case"group":it="rect";break;default:it="rect"}Ut.warn("Adding node",N.id,N.domId),a.setNode(m.db.lookUpDomId(N.id),{labelType:"svg",labelStyle:j.labelStyle,shape:it,label:z,rx:K,ry:K,class:B,style:j.style,id:m.db.lookUpDomId(N.id)})})},MFt=function(i,a,f){let p=0,v,m;if(i.defaultStyle!==void 0){const b=em(i.defaultStyle);v=b.style,m=b.labelStyle}i.forEach(function(b){p++;const E="L-"+b.start+"-"+b.end,_="LS-"+b.start,L="LE-"+b.end,N={};b.type==="arrow_open"?N.arrowhead="none":N.arrowhead="normal";let B="",j="";if(b.style!==void 0){const R=em(b.style);B=R.style,j=R.labelStyle}else switch(b.stroke){case"normal":B="fill:none",v!==void 0&&(B=v),m!==void 0&&(j=m);break;case"dotted":B="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":B=" stroke-width: 3.5px;fill:none";break}N.style=B,N.labelStyle=j,b.interpolate!==void 0?N.curve=X2(b.interpolate,ig):i.defaultInterpolate!==void 0?N.curve=X2(i.defaultInterpolate,ig):N.curve=X2(AFt.curve,ig),b.text===void 0?b.style!==void 0&&(N.arrowheadStyle="fill: #333"):(N.arrowheadStyle="fill: #333",N.labelpos="c",s1(Le().flowchart.htmlLabels)?(N.labelType="html",N.label=`${b.text.replace(/fa[blrs]?:fa-[\w-]+/g,R=>``)}`):(N.labelType="text",N.label=b.text.replace(Yr.lineBreakRegex,` +`),b.style===void 0&&(N.style=N.style||"stroke: #333; stroke-width: 1.5px;fill:none"),N.labelStyle=N.labelStyle.replace("color:","fill:"))),N.id=E,N.class=_+" "+L,N.minlen=b.length||1,a.setEdge(f.db.lookUpDomId(b.start),f.db.lookUpDomId(b.end),N,p)})},$Be={setConf:jBe,addVertices:LFt,addEdges:MFt,getClasses:function(i,a){return Ut.info("Extracting classes"),a.db.getClasses()},draw:function(i,a,f,p){Ut.info("Drawing flowchart");const{securityLevel:v,flowchart:m}=Le();let b;v==="sandbox"&&(b=yr("#i"+a));const E=yr(v==="sandbox"?b.nodes()[0].contentDocument.body:"body"),_=v==="sandbox"?b.nodes()[0].contentDocument:document;let L=p.db.getDirection();L===void 0&&(L="TD");const N=m.nodeSpacing||50,B=m.rankSpacing||50,j=new a1({multigraph:!0,compound:!0}).setGraph({rankdir:L,nodesep:N,ranksep:B,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let R;const z=p.db.getSubGraphs();for(let dt=z.length-1;dt>=0;dt--)R=z[dt],p.db.addVertex(R.id,R.title,"group",void 0,R.classes);const K=p.db.getVertices();Ut.warn("Get vertices",K);const it=p.db.getEdges();let st=0;for(st=z.length-1;st>=0;st--){R=z[st],ZLt("cluster").append("text");for(let dt=0;dt{a.forEach(v=>{GBe[v](i,f,p)})},GBe={extension:(i,a,f)=>{Ut.trace("Making markers for ",f),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionStart").attr("class","marker extension "+a).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionEnd").attr("class","marker extension "+a).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionStart").attr("class","marker composition "+a).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionEnd").attr("class","marker composition "+a).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationStart").attr("class","marker aggregation "+a).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationEnd").attr("class","marker aggregation "+a).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyStart").attr("class","marker dependency "+a).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyEnd").attr("class","marker dependency "+a).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopStart").attr("class","marker lollipop "+a).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopEnd").attr("class","marker lollipop "+a).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},point:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-pointEnd").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",f+"_"+a+"-pointStart").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-circleEnd").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",f+"_"+a+"-circleStart").attr("class","marker "+a).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-crossEnd").attr("class","marker cross "+a).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",f+"_"+a+"-crossStart").attr("class","marker cross "+a).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},IFt=HBe;function VBe(i,a){a&&i.attr("style",a)}function UBe(i){const a=yr(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),f=a.append("xhtml:div"),p=i.label,v=i.isNode?"nodeLabel":"edgeLabel";return f.html('"+p+""),VBe(f,i.labelStyle),f.style("display","inline-block"),f.style("white-space","nowrap"),f.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}const hp=(i,a,f,p)=>{let v=i||"";if(typeof v=="object"&&(v=v[0]),s1(Le().flowchart.htmlLabels)){v=v.replace(/\\n|\n/g,"
"),Ut.info("vertexText"+v);const m={isNode:p,label:nP(v).replace(/fa[blrs]?:fa-[\w-]+/g,E=>``),labelStyle:a.replace("fill:","color:")};return UBe(m)}else{const m=document.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("style",a.replace("color:","fill:"));let b=[];typeof v=="string"?b=v.split(/\\n|\n|/gi):Array.isArray(v)?b=v:b=[];for(const E of b){const _=document.createElementNS("http://www.w3.org/2000/svg","tspan");_.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),_.setAttribute("dy","1em"),_.setAttribute("x","0"),f?_.setAttribute("class","title-row"):_.setAttribute("class","row"),_.textContent=E.trim(),m.appendChild(_)}return m}};function WBe(i,a){var{includeImageAlt:f=!0}=a||{};return DFt(i,f)}function DFt(i,a){return i&&typeof i=="object"&&(i.value||(a?i.alt:"")||"children"in i&&OFt(i.children,a)||Array.isArray(i)&&OFt(i,a))||""}function OFt(i,a){for(var f=[],p=-1;++pv?0:v+a:a=a>v?v:a,f=f>0?f:0,p.length<1e4)b=Array.from(p),b.unshift(a,f),[].splice.apply(i,b);else for(f&&[].splice.apply(i,[a,f]);m0?(v3(i,i.length,0,a),i):a}const NFt={}.hasOwnProperty;function KBe(i){const a={};let f=-1;for(;++fb))return;const ht=a.events.length;let wt=ht,X,pt;for(;wt--;)if(a.events[wt][0]==="exit"&&a.events[wt][1].type==="chunkFlow"){if(X){pt=a.events[wt][1].end;break}X=!0}for(st(p),dt=ht;dtbt;){const yt=f[mt];a.containerState=yt[1],yt[0].exit.call(a,i)}f.length=bt}function ut(){v.write([null]),m=void 0,v=void 0,a.containerState._closeFlow=void 0}}function aRe(i,a,f){return Gu(i,i.attempt(this.parser.constructs.document,a,f),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function BFt(i){if(i===null||nv(i)||tRe(i))return 1;if(eRe(i))return 2}function E0t(i,a,f){const p=[];let v=-1;for(;++v1&&i[f][1].end.offset-i[f][1].start.offset>1?2:1;const B=Object.assign({},i[p][1].end),j=Object.assign({},i[f][1].start);RFt(B,-_),RFt(j,_),b={type:_>1?"strongSequence":"emphasisSequence",start:B,end:Object.assign({},i[p][1].end)},E={type:_>1?"strongSequence":"emphasisSequence",start:Object.assign({},i[f][1].start),end:j},m={type:_>1?"strongText":"emphasisText",start:Object.assign({},i[p][1].end),end:Object.assign({},i[f][1].start)},v={type:_>1?"strong":"emphasis",start:Object.assign({},b.start),end:Object.assign({},E.end)},i[p][1].end=Object.assign({},b.start),i[f][1].start=Object.assign({},E.end),L=[],i[p][1].end.offset-i[p][1].start.offset&&(L=ev(L,[["enter",i[p][1],a],["exit",i[p][1],a]])),L=ev(L,[["enter",v,a],["enter",b,a],["exit",b,a],["enter",m,a]]),L=ev(L,E0t(a.parser.constructs.insideSpan.null,i.slice(p+1,f),a)),L=ev(L,[["exit",m,a],["enter",E,a],["exit",E,a],["exit",v,a]]),i[f][1].end.offset-i[f][1].start.offset?(N=2,L=ev(L,[["enter",i[f][1],a],["exit",i[f][1],a]])):N=0,v3(i,p-1,f-p+3,L),f=p+L.length-N-2;break}}for(f=-1;++f=4?b(L):f(L)}function b(L){return L===null?_(L):Na(L)?i.attempt(wRe,b,_)(L):(i.enter("codeFlowValue"),E(L))}function E(L){return L===null||Na(L)?(i.exit("codeFlowValue"),b(L)):(i.consume(L),E)}function _(L){return i.exit("codeIndented"),a(L)}}function yRe(i,a,f){const p=this;return v;function v(b){return p.parser.lazy[p.now().line]?f(b):Na(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),v):Gu(i,m,"linePrefix",4+1)(b)}function m(b){const E=p.events[p.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?a(b):Na(b)?v(b):f(b)}}const xRe={name:"codeText",tokenize:TRe,resolve:kRe,previous:ERe};function kRe(i){let a=i.length-4,f=3,p,v;if((i[f][1].type==="lineEnding"||i[f][1].type==="space")&&(i[a][1].type==="lineEnding"||i[a][1].type==="space")){for(p=f;++p=4?a(b):i.interrupt(p.parser.constructs.flow,f,a)(b)}}function VFt(i,a,f,p,v,m,b,E,_){const L=_||Number.POSITIVE_INFINITY;let N=0;return B;function B(st){return st===60?(i.enter(p),i.enter(v),i.enter(m),i.consume(st),i.exit(m),j):st===null||st===41||k0t(st)?f(st):(i.enter(p),i.enter(b),i.enter(E),i.enter("chunkString",{contentType:"string"}),K(st))}function j(st){return st===62?(i.enter(m),i.consume(st),i.exit(m),i.exit(v),i.exit(p),a):(i.enter(E),i.enter("chunkString",{contentType:"string"}),R(st))}function R(st){return st===62?(i.exit("chunkString"),i.exit(E),j(st)):st===null||st===60||Na(st)?f(st):(i.consume(st),st===92?z:R)}function z(st){return st===60||st===62||st===92?(i.consume(st),R):R(st)}function K(st){return st===40?++N>L?f(st):(i.consume(st),K):st===41?N--?(i.consume(st),K):(i.exit("chunkString"),i.exit(E),i.exit(b),i.exit(p),a(st)):st===null||nv(st)?N?f(st):(i.exit("chunkString"),i.exit(E),i.exit(b),i.exit(p),a(st)):k0t(st)?f(st):(i.consume(st),st===92?it:K)}function it(st){return st===40||st===41||st===92?(i.consume(st),K):K(st)}}function UFt(i,a,f,p,v,m){const b=this;let E=0,_;return L;function L(R){return i.enter(p),i.enter(v),i.consume(R),i.exit(v),i.enter(m),N}function N(R){return R===null||R===91||R===93&&!_||R===94&&!E&&"_hiddenFootnoteSupport"in b.parser.constructs||E>999?f(R):R===93?(i.exit(m),i.enter(v),i.consume(R),i.exit(v),i.exit(p),a):Na(R)?(i.enter("lineEnding"),i.consume(R),i.exit("lineEnding"),N):(i.enter("chunkString",{contentType:"string"}),B(R))}function B(R){return R===null||R===91||R===93||Na(R)||E++>999?(i.exit("chunkString"),N(R)):(i.consume(R),_=_||!Nf(R),R===92?j:B)}function j(R){return R===91||R===92||R===93?(i.consume(R),E++,B):B(R)}}function WFt(i,a,f,p,v,m){let b;return E;function E(j){return i.enter(p),i.enter(v),i.consume(j),i.exit(v),b=j===40?41:j,_}function _(j){return j===b?(i.enter(v),i.consume(j),i.exit(v),i.exit(p),a):(i.enter(m),L(j))}function L(j){return j===b?(i.exit(m),_(b)):j===null?f(j):Na(j)?(i.enter("lineEnding"),i.consume(j),i.exit("lineEnding"),Gu(i,L,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),N(j))}function N(j){return j===b||j===null||Na(j)?(i.exit("chunkString"),L(j)):(i.consume(j),j===92?B:N)}function B(j){return j===b||j===92?(i.consume(j),N):N(j)}}function vP(i,a){let f;return p;function p(v){return Na(v)?(i.enter("lineEnding"),i.consume(v),i.exit("lineEnding"),f=!0,p):Nf(v)?Gu(i,p,f?"linePrefix":"lineSuffix")(v):a(v)}}function nL(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const IRe={name:"definition",tokenize:ORe},DRe={tokenize:NRe,partial:!0};function ORe(i,a,f){const p=this;let v;return m;function m(_){return i.enter("definition"),UFt.call(p,i,b,f,"definitionLabel","definitionLabelMarker","definitionLabelString")(_)}function b(_){return v=nL(p.sliceSerialize(p.events[p.events.length-1][1]).slice(1,-1)),_===58?(i.enter("definitionMarker"),i.consume(_),i.exit("definitionMarker"),vP(i,VFt(i,i.attempt(DRe,Gu(i,E,"whitespace"),Gu(i,E,"whitespace")),f,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):f(_)}function E(_){return _===null||Na(_)?(i.exit("definition"),p.parser.defined.includes(v)||p.parser.defined.push(v),a(_)):f(_)}}function NRe(i,a,f){return p;function p(b){return nv(b)?vP(i,v)(b):f(b)}function v(b){return b===34||b===39||b===40?WFt(i,Gu(i,m,"whitespace"),f,"definitionTitle","definitionTitleMarker","definitionTitleString")(b):f(b)}function m(b){return b===null||Na(b)?a(b):f(b)}}const PRe={name:"hardBreakEscape",tokenize:FRe};function FRe(i,a,f){return p;function p(m){return i.enter("hardBreakEscape"),i.enter("escapeMarker"),i.consume(m),v}function v(m){return Na(m)?(i.exit("escapeMarker"),i.exit("hardBreakEscape"),a(m)):f(m)}}const BRe={name:"headingAtx",tokenize:jRe,resolve:RRe};function RRe(i,a){let f=i.length-2,p=3,v,m;return i[p][1].type==="whitespace"&&(p+=2),f-2>p&&i[f][1].type==="whitespace"&&(f-=2),i[f][1].type==="atxHeadingSequence"&&(p===f-1||f-4>p&&i[f-2][1].type==="whitespace")&&(f-=p+1===f?2:4),f>p&&(v={type:"atxHeadingText",start:i[p][1].start,end:i[f][1].end},m={type:"chunkText",start:i[p][1].start,end:i[f][1].end,contentType:"text"},v3(i,p,f-p+1,[["enter",v,a],["enter",m,a],["exit",m,a],["exit",v,a]])),i}function jRe(i,a,f){const p=this;let v=0;return m;function m(N){return i.enter("atxHeading"),i.enter("atxHeadingSequence"),b(N)}function b(N){return N===35&&v++<6?(i.consume(N),b):N===null||nv(N)?(i.exit("atxHeadingSequence"),p.interrupt?a(N):E(N)):f(N)}function E(N){return N===35?(i.enter("atxHeadingSequence"),_(N)):N===null||Na(N)?(i.exit("atxHeading"),a(N)):Nf(N)?Gu(i,E,"whitespace")(N):(i.enter("atxHeadingText"),L(N))}function _(N){return N===35?(i.consume(N),_):(i.exit("atxHeadingSequence"),E(N))}function L(N){return N===null||N===35||nv(N)?(i.exit("atxHeadingText"),E(N)):(i.consume(N),L)}}const $Re=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],KFt=["pre","script","style","textarea"],zRe={name:"htmlFlow",tokenize:GRe,resolveTo:HRe,concrete:!0},qRe={tokenize:VRe,partial:!0};function HRe(i){let a=i.length;for(;a--&&!(i[a][0]==="enter"&&i[a][1].type==="htmlFlow"););return a>1&&i[a-2][1].type==="linePrefix"&&(i[a][1].start=i[a-2][1].start,i[a+1][1].start=i[a-2][1].start,i.splice(a-2,2)),i}function GRe(i,a,f){const p=this;let v,m,b,E,_;return L;function L(Ft){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(Ft),N}function N(Ft){return Ft===33?(i.consume(Ft),B):Ft===47?(i.consume(Ft),z):Ft===63?(i.consume(Ft),v=3,p.interrupt?a:Tt):w3(Ft)?(i.consume(Ft),b=String.fromCharCode(Ft),m=!0,K):f(Ft)}function B(Ft){return Ft===45?(i.consume(Ft),v=2,j):Ft===91?(i.consume(Ft),v=5,b="CDATA[",E=0,R):w3(Ft)?(i.consume(Ft),v=4,p.interrupt?a:Tt):f(Ft)}function j(Ft){return Ft===45?(i.consume(Ft),p.interrupt?a:Tt):f(Ft)}function R(Ft){return Ft===b.charCodeAt(E++)?(i.consume(Ft),E===b.length?p.interrupt?a:U:R):f(Ft)}function z(Ft){return w3(Ft)?(i.consume(Ft),b=String.fromCharCode(Ft),K):f(Ft)}function K(Ft){return Ft===null||Ft===47||Ft===62||nv(Ft)?Ft!==47&&m&&KFt.includes(b.toLowerCase())?(v=1,p.interrupt?a(Ft):U(Ft)):$Re.includes(b.toLowerCase())?(v=6,Ft===47?(i.consume(Ft),it):p.interrupt?a(Ft):U(Ft)):(v=7,p.interrupt&&!p.parser.lazy[p.now().line]?f(Ft):m?ut(Ft):st(Ft)):Ft===45||om(Ft)?(i.consume(Ft),b+=String.fromCharCode(Ft),K):f(Ft)}function it(Ft){return Ft===62?(i.consume(Ft),p.interrupt?a:U):f(Ft)}function st(Ft){return Nf(Ft)?(i.consume(Ft),st):X(Ft)}function ut(Ft){return Ft===47?(i.consume(Ft),X):Ft===58||Ft===95||w3(Ft)?(i.consume(Ft),bt):Nf(Ft)?(i.consume(Ft),ut):X(Ft)}function bt(Ft){return Ft===45||Ft===46||Ft===58||Ft===95||om(Ft)?(i.consume(Ft),bt):mt(Ft)}function mt(Ft){return Ft===61?(i.consume(Ft),yt):Nf(Ft)?(i.consume(Ft),mt):ut(Ft)}function yt(Ft){return Ft===null||Ft===60||Ft===61||Ft===62||Ft===96?f(Ft):Ft===34||Ft===39?(i.consume(Ft),_=Ft,dt):Nf(Ft)?(i.consume(Ft),yt):(_=null,ht(Ft))}function dt(Ft){return Ft===null||Na(Ft)?f(Ft):Ft===_?(i.consume(Ft),wt):(i.consume(Ft),dt)}function ht(Ft){return Ft===null||Ft===34||Ft===39||Ft===60||Ft===61||Ft===62||Ft===96||nv(Ft)?mt(Ft):(i.consume(Ft),ht)}function wt(Ft){return Ft===47||Ft===62||Nf(Ft)?ut(Ft):f(Ft)}function X(Ft){return Ft===62?(i.consume(Ft),pt):f(Ft)}function pt(Ft){return Nf(Ft)?(i.consume(Ft),pt):Ft===null||Na(Ft)?U(Ft):f(Ft)}function U(Ft){return Ft===45&&v===2?(i.consume(Ft),Nt):Ft===60&&v===1?(i.consume(Ft),qt):Ft===62&&v===4?(i.consume(Ft),Ht):Ft===63&&v===3?(i.consume(Ft),Tt):Ft===93&&v===5?(i.consume(Ft),Z):Na(Ft)&&(v===6||v===7)?i.check(qRe,Ht,xt)(Ft):Ft===null||Na(Ft)?xt(Ft):(i.consume(Ft),U)}function xt(Ft){return i.exit("htmlFlowData"),nt(Ft)}function nt(Ft){return Ft===null?It(Ft):Na(Ft)?i.attempt({tokenize:Ot,partial:!0},nt,It)(Ft):(i.enter("htmlFlowData"),U(Ft))}function Ot(Ft,ke,pn){return Me;function Me(Ge){return Ft.enter("lineEnding"),Ft.consume(Ge),Ft.exit("lineEnding"),ve}function ve(Ge){return p.parser.lazy[p.now().line]?pn(Ge):ke(Ge)}}function Nt(Ft){return Ft===45?(i.consume(Ft),Tt):U(Ft)}function qt(Ft){return Ft===47?(i.consume(Ft),b="",Ct):U(Ft)}function Ct(Ft){return Ft===62&&KFt.includes(b.toLowerCase())?(i.consume(Ft),Ht):w3(Ft)&&b.length<8?(i.consume(Ft),b+=String.fromCharCode(Ft),Ct):U(Ft)}function Z(Ft){return Ft===93?(i.consume(Ft),Tt):U(Ft)}function Tt(Ft){return Ft===62?(i.consume(Ft),Ht):Ft===45&&v===2?(i.consume(Ft),Tt):U(Ft)}function Ht(Ft){return Ft===null||Na(Ft)?(i.exit("htmlFlowData"),It(Ft)):(i.consume(Ft),Ht)}function It(Ft){return i.exit("htmlFlow"),a(Ft)}}function VRe(i,a,f){return p;function p(v){return i.exit("htmlFlowData"),i.enter("lineEndingBlank"),i.consume(v),i.exit("lineEndingBlank"),i.attempt(lK,a,f)}}const URe={name:"htmlText",tokenize:WRe};function WRe(i,a,f){const p=this;let v,m,b,E;return _;function _(It){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(It),L}function L(It){return It===33?(i.consume(It),N):It===47?(i.consume(It),ht):It===63?(i.consume(It),yt):w3(It)?(i.consume(It),pt):f(It)}function N(It){return It===45?(i.consume(It),B):It===91?(i.consume(It),m="CDATA[",b=0,it):w3(It)?(i.consume(It),mt):f(It)}function B(It){return It===45?(i.consume(It),j):f(It)}function j(It){return It===null||It===62?f(It):It===45?(i.consume(It),R):z(It)}function R(It){return It===null||It===62?f(It):z(It)}function z(It){return It===null?f(It):It===45?(i.consume(It),K):Na(It)?(E=z,Z(It)):(i.consume(It),z)}function K(It){return It===45?(i.consume(It),Ht):z(It)}function it(It){return It===m.charCodeAt(b++)?(i.consume(It),b===m.length?st:it):f(It)}function st(It){return It===null?f(It):It===93?(i.consume(It),ut):Na(It)?(E=st,Z(It)):(i.consume(It),st)}function ut(It){return It===93?(i.consume(It),bt):st(It)}function bt(It){return It===62?Ht(It):It===93?(i.consume(It),bt):st(It)}function mt(It){return It===null||It===62?Ht(It):Na(It)?(E=mt,Z(It)):(i.consume(It),mt)}function yt(It){return It===null?f(It):It===63?(i.consume(It),dt):Na(It)?(E=yt,Z(It)):(i.consume(It),yt)}function dt(It){return It===62?Ht(It):yt(It)}function ht(It){return w3(It)?(i.consume(It),wt):f(It)}function wt(It){return It===45||om(It)?(i.consume(It),wt):X(It)}function X(It){return Na(It)?(E=X,Z(It)):Nf(It)?(i.consume(It),X):Ht(It)}function pt(It){return It===45||om(It)?(i.consume(It),pt):It===47||It===62||nv(It)?U(It):f(It)}function U(It){return It===47?(i.consume(It),Ht):It===58||It===95||w3(It)?(i.consume(It),xt):Na(It)?(E=U,Z(It)):Nf(It)?(i.consume(It),U):Ht(It)}function xt(It){return It===45||It===46||It===58||It===95||om(It)?(i.consume(It),xt):nt(It)}function nt(It){return It===61?(i.consume(It),Ot):Na(It)?(E=nt,Z(It)):Nf(It)?(i.consume(It),nt):U(It)}function Ot(It){return It===null||It===60||It===61||It===62||It===96?f(It):It===34||It===39?(i.consume(It),v=It,Nt):Na(It)?(E=Ot,Z(It)):Nf(It)?(i.consume(It),Ot):(i.consume(It),v=void 0,Ct)}function Nt(It){return It===v?(i.consume(It),qt):It===null?f(It):Na(It)?(E=Nt,Z(It)):(i.consume(It),Nt)}function qt(It){return It===62||It===47||nv(It)?U(It):f(It)}function Ct(It){return It===null||It===34||It===39||It===60||It===61||It===96?f(It):It===62||nv(It)?U(It):(i.consume(It),Ct)}function Z(It){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(It),i.exit("lineEnding"),Gu(i,Tt,"linePrefix",p.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tt(It){return i.enter("htmlTextData"),E(It)}function Ht(It){return It===62?(i.consume(It),i.exit("htmlTextData"),i.exit("htmlText"),a):f(It)}}const S0t={name:"labelEnd",tokenize:JRe,resolveTo:ZRe,resolveAll:QRe},KRe={tokenize:tje},YRe={tokenize:eje},XRe={tokenize:nje};function QRe(i){let a=-1,f;for(;++a-1&&(b[0]=b[0].slice(p)),m>0&&b.push(i[v].slice(0,m))),b}function _je(i,a){let f=-1;const p=[];let v;for(;++f13&&f<32||f>126&&f<160||f>55295&&f<57344||f>64975&&f<65008||(f&65535)===65535||(f&65535)===65534||f>1114111?"�":String.fromCharCode(f)}const Nje=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pje(i){return i.replace(Nje,Fje)}function Fje(i,a,f){if(a)return a;if(f.charCodeAt(0)===35){const v=f.charCodeAt(1),m=v===120||v===88;return JFt(f.slice(m?2:1),m?16:10)}return C0t(f)||i}function fK(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?tBt(i.position):"start"in i||"end"in i?tBt(i):"line"in i||"column"in i?L0t(i):""}function L0t(i){return eBt(i&&i.line)+":"+eBt(i&&i.column)}function tBt(i){return L0t(i&&i.start)+"-"+L0t(i&&i.end)}function eBt(i){return i&&typeof i=="number"?i:1}const nBt={}.hasOwnProperty,rBt=function(i,a,f){return typeof a!="string"&&(f=a,a=void 0),Bje(f)(Oje(Ije(f).document().write(Dje()(i,a,!0))))};function Bje(i){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:E(ya),autolinkProtocol:U,autolinkEmail:U,atxHeading:E(Ne),blockQuote:E($t),characterEscape:U,characterReference:U,codeFenced:E(re),codeFencedFenceInfo:_,codeFencedFenceMeta:_,codeIndented:E(re,_),codeText:E(ie,_),codeTextData:U,data:U,codeFlowValue:U,definition:E(Oe),definitionDestinationString:_,definitionLabelString:_,definitionTitleString:_,emphasis:E(oe),hardBreakEscape:E(me),hardBreakTrailing:E(me),htmlFlow:E(cn,_),htmlFlowData:U,htmlText:E(cn,_),htmlTextData:U,image:E(li),label:_,link:E(ya),listItem:E(Oo),listItemValue:z,listOrdered:E(da,R),listUnordered:E(da),paragraph:E(ds),reference:Me,referenceString:_,resourceDestinationString:_,resourceTitleString:_,setextHeading:E(Ne),strong:E(Dr),thematicBreak:E(di)},exit:{atxHeading:N(),atxHeadingSequence:ht,autolink:N(),autolinkEmail:_e,autolinkProtocol:we,blockQuote:N(),characterEscapeValue:xt,characterReferenceMarkerHexadecimal:Ge,characterReferenceMarkerNumeric:Ge,characterReferenceValue:Ke,codeFenced:N(ut),codeFencedFence:st,codeFencedFenceInfo:K,codeFencedFenceMeta:it,codeFlowValue:xt,codeIndented:N(bt),codeText:N(Ct),codeTextData:xt,data:xt,definition:N(),definitionDestinationString:dt,definitionLabelString:mt,definitionTitleString:yt,emphasis:N(),hardBreakEscape:N(Ot),hardBreakTrailing:N(Ot),htmlFlow:N(Nt),htmlFlowData:xt,htmlText:N(qt),htmlTextData:xt,image:N(Tt),label:It,labelText:Ht,lineEnding:nt,link:N(Z),listItem:N(),listOrdered:N(),listUnordered:N(),paragraph:N(),referenceString:ve,resourceDestinationString:Ft,resourceTitleString:ke,resource:pn,setextHeading:N(pt),setextHeadingLineSequence:X,setextHeadingText:wt,strong:N(),thematicBreak:N()}};iBt(a,(i||{}).mdastExtensions||[]);const f={};return p;function p(Ee){let Yn={type:"root",children:[]};const He={stack:[Yn],tokenStack:[],config:a,enter:L,exit:B,buffer:_,resume:j,setData:m,getData:b},Ti=[];let gn=-1;for(;++gn0){const ks=He.tokenStack[He.tokenStack.length-1];(ks[1]||sBt).call(He,void 0,ks[0])}for(Yn.position={start:uk(Ee.length>0?Ee[0][1].start:{line:1,column:1,offset:0}),end:uk(Ee.length>0?Ee[Ee.length-2][1].end:{line:1,column:1,offset:0})},gn=-1;++gn{N!==0&&(v++,p.push([])),L.split(" ").forEach(B=>{B&&p[v].push({content:B,type:E})})}):(b.type==="strong"||b.type==="emphasis")&&b.children.forEach(_=>{m(_,b.type)})}return f.forEach(b=>{b.type==="paragraph"&&b.children.forEach(E=>{m(E)})}),p}function zje(i){const{children:a}=rBt(i);function f(p){return p.type==="text"?p.value.replace(/\n/g,"
"):p.type==="strong"?`${p.children.map(f).join("")}`:p.type==="emphasis"?`${p.children.map(f).join("")}`:p.type==="paragraph"?`

${p.children.map(f).join("")}

`:`Unsupported markdown: ${p.type}`}return a.map(f).join("")}function qje(i){return Intl.Segmenter?[...new Intl.Segmenter().segment(i)].map(a=>a.segment):[...i]}function Hje(i,a){const f=qje(a.content);return aBt(i,[],f,a.type)}function aBt(i,a,f,p){if(f.length===0)return[{content:a.join(""),type:p},{content:"",type:p}];const[v,...m]=f,b=[...a,v];return i([{content:b.join(""),type:p}])?aBt(i,b,m,p):(a.length===0&&v&&(a.push(v),f.shift()),[{content:a.join(""),type:p},{content:f.join(""),type:p}])}function Gje(i,a){if(i.some(({content:f})=>f.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return M0t(i,a)}function M0t(i,a,f=[],p=[]){if(i.length===0)return p.length>0&&f.push(p),f.length>0?f:[];let v="";i[0].content===" "&&(v=" ",i.shift());const m=i.shift()??{content:" ",type:"normal"},b=[...p];if(v!==""&&b.push({content:v,type:"normal"}),b.push(m),a(b))return M0t(i,a,f,b);if(p.length>0)f.push(p),i.unshift(m);else if(m.content){const[E,_]=Hje(a,m);f.push([E]),_.content&&i.unshift(_)}return M0t(i,a,f)}function Vje(i,a){a&&i.attr("style",a)}function Uje(i,a,f,p,v=!1){const m=i.append("foreignObject"),b=m.append("xhtml:div"),E=a.label,_=a.isNode?"nodeLabel":"edgeLabel";b.html(` + "+E+""),Vje(b,a.labelStyle),b.style("display","table-cell"),b.style("white-space","nowrap"),b.style("max-width",f+"px"),b.attr("xmlns","http://www.w3.org/1999/xhtml"),v&&b.attr("class","labelBkg");let L=b.node().getBoundingClientRect();return L.width===f&&(b.style("display","table"),b.style("white-space","break-spaces"),b.style("width",f+"px"),L=b.node().getBoundingClientRect()),m.style("width",L.width),m.style("height",L.height),m.node()}function oBt(i,a,f){return i.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",a*f-.1+"em").attr("dy",f+"em")}function Wje(i,a,f){const p=i.append("text"),v=oBt(p,1,a);cBt(v,f);const m=v.node().getComputedTextLength();return p.remove(),m}function Kje(i,a,f,p=!1){const m=a.append("g"),b=m.insert("rect").attr("class","background"),E=m.append("text").attr("y","-10.1");let _=0;for(const L of f){const N=j=>Wje(m,1.1,j)<=i,B=N(L)?[L]:Gje(L,N);for(const j of B){const R=oBt(E,_,1.1);cBt(R,j),_++}}if(p){const L=E.node().getBBox(),N=2;return b.attr("x",-N).attr("y",-N).attr("width",L.width+2*N).attr("height",L.height+2*N),m.node()}else return E.node()}function cBt(i,a){i.text(""),a.forEach((f,p)=>{const v=i.append("tspan").attr("font-style",f.type==="emphasis"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",f.type==="strong"?"bold":"normal");p===0?v.text(f.content):v.text(" "+f.content)})}const dK=(i,a="",{style:f="",isTitle:p=!1,classes:v="",useHtmlLabels:m=!0,isNode:b=!0,width:E=200,addSvgBackground:_=!1}={})=>{if(Ut.info("createText",a,f,p,v,m,b,_),m){const L=zje(a),N={isNode:b,label:nP(L).replace(/fa[blrs]?:fa-[\w-]+/g,j=>``),labelStyle:f.replace("fill:","color:")};return Uje(i,N,E,v,_)}else{const L=$je(a);return Kje(E,i,L,_)}},Od=async(i,a,f,p)=>{let v;const m=a.useHtmlLabels||s1(Le().flowchart.htmlLabels);f?v=f:v="node default";const b=i.insert("g").attr("class",v).attr("id",a.domId||a.id),E=b.insert("g").attr("class","label").attr("style",a.labelStyle);let _;a.labelText===void 0?_="":_=typeof a.labelText=="string"?a.labelText:a.labelText[0];const L=E.node();let N;a.labelType==="markdown"?N=dK(E,Dd(nP(_),Le()),{useHtmlLabels:m,width:a.width||Le().flowchart.wrappingWidth,classes:"markdown-node-label"}):N=L.appendChild(hp(Dd(nP(_),Le()),a.labelStyle,!1,p));let B=N.getBBox();const j=a.padding/2;if(s1(Le().flowchart.htmlLabels)){const R=N.children[0],z=yr(N),K=R.getElementsByTagName("img");if(K){const it=_.replace(/]*>/g,"").trim()==="";await Promise.all([...K].map(st=>new Promise(ut=>{function bt(){if(st.style.display="flex",st.style.flexDirection="column",it){const mt=Le().fontSize?Le().fontSize:window.getComputedStyle(document.body).fontSize,yt=5;st.style.width=parseInt(mt,10)*yt+"px"}else st.style.width="100%";ut(st)}setTimeout(()=>{st.complete&&bt()}),st.addEventListener("error",bt),st.addEventListener("load",bt)})))}B=R.getBoundingClientRect(),z.attr("width",B.width),z.attr("height",B.height)}return m?E.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"):E.attr("transform","translate(0, "+-B.height/2+")"),a.centerLabel&&E.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),E.insert("rect",":first-child"),{shapeSvg:b,bbox:B,halfPadding:j,label:E}},Qh=(i,a)=>{const f=a.node().getBBox();i.width=f.width,i.height=f.height};function A5(i,a,f,p){return i.insert("polygon",":first-child").attr("points",p.map(function(v){return v.x+","+v.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-a/2+","+f/2+")")}let Ho={},cm={},uBt={};const Yje=()=>{cm={},uBt={},Ho={}},gK=(i,a)=>(Ut.trace("In isDecendant",a," ",i," = ",cm[a].includes(i)),!!cm[a].includes(i)),Xje=(i,a)=>(Ut.info("Decendants of ",a," is ",cm[a]),Ut.info("Edge is ",i),i.v===a||i.w===a?!1:cm[a]?cm[a].includes(i.v)||gK(i.v,a)||gK(i.w,a)||cm[a].includes(i.w):(Ut.debug("Tilt, ",a,",not in decendants"),!1)),lBt=(i,a,f,p)=>{Ut.warn("Copying children of ",i,"root",p,"data",a.node(i),p);const v=a.children(i)||[];i!==p&&v.push(i),Ut.warn("Copying (nodes) clusterId",i,"nodes",v),v.forEach(m=>{if(a.children(m).length>0)lBt(m,a,f,p);else{const b=a.node(m);Ut.info("cp ",m," to ",p," with parent ",i),f.setNode(m,b),p!==a.parent(m)&&(Ut.warn("Setting parent",m,a.parent(m)),f.setParent(m,a.parent(m))),i!==p&&m!==i?(Ut.debug("Setting parent",m,i),f.setParent(m,i)):(Ut.info("In copy ",i,"root",p,"data",a.node(i),p),Ut.debug("Not Setting parent for node=",m,"cluster!==rootId",i!==p,"node!==clusterId",m!==i));const E=a.edges(m);Ut.debug("Copying Edges",E),E.forEach(_=>{Ut.info("Edge",_);const L=a.edge(_.v,_.w,_.name);Ut.info("Edge data",L,p);try{Xje(_,p)?(Ut.info("Copying as ",_.v,_.w,L,_.name),f.setEdge(_.v,_.w,L,_.name),Ut.info("newGraph edges ",f.edges(),f.edge(f.edges()[0]))):Ut.info("Skipping copy of edge ",_.v,"-->",_.w," rootId: ",p," clusterId:",i)}catch(N){Ut.error(N)}})}Ut.debug("Removing node",m),a.removeNode(m)})},hBt=(i,a)=>{const f=a.children(i);let p=[...f];for(const v of f)uBt[v]=i,p=[...p,...hBt(v,a)];return p},wP=(i,a)=>{Ut.trace("Searching",i);const f=a.children(i);if(Ut.trace("Searching children of id ",i,f),f.length<1)return Ut.trace("This is a valid node",i),i;for(const p of f){const v=wP(p,a);if(v)return Ut.trace("Found replacement for",i," => ",v),v}},pK=i=>!Ho[i]||!Ho[i].externalConnections?i:Ho[i]?Ho[i].id:i,Qje=(i,a)=>{if(!i||a>10){Ut.debug("Opting out, no graph ");return}else Ut.debug("Opting in, graph ");i.nodes().forEach(function(f){i.children(f).length>0&&(Ut.warn("Cluster identified",f," Replacement id in edges: ",wP(f,i)),cm[f]=hBt(f,i),Ho[f]={id:wP(f,i),clusterData:i.node(f)})}),i.nodes().forEach(function(f){const p=i.children(f),v=i.edges();p.length>0?(Ut.debug("Cluster identified",f,cm),v.forEach(m=>{if(m.v!==f&&m.w!==f){const b=gK(m.v,f),E=gK(m.w,f);b^E&&(Ut.warn("Edge: ",m," leaves cluster ",f),Ut.warn("Decendants of XXX ",f,": ",cm[f]),Ho[f].externalConnections=!0)}})):Ut.debug("Not a cluster ",f,cm)}),i.edges().forEach(function(f){const p=i.edge(f);Ut.warn("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),Ut.warn("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(i.edge(f)));let v=f.v,m=f.w;if(Ut.warn("Fix XXX",Ho,"ids:",f.v,f.w,"Translating: ",Ho[f.v]," --- ",Ho[f.w]),Ho[f.v]&&Ho[f.w]&&Ho[f.v]===Ho[f.w]){Ut.warn("Fixing and trixing link to self - removing XXX",f.v,f.w,f.name),Ut.warn("Fixing and trixing - removing XXX",f.v,f.w,f.name),v=pK(f.v),m=pK(f.w),i.removeEdge(f.v,f.w,f.name);const b=f.w+"---"+f.v;i.setNode(b,{domId:b,id:b,labelStyle:"",labelText:p.label,padding:0,shape:"labelRect",style:""});const E=structuredClone(p),_=structuredClone(p);E.label="",E.arrowTypeEnd="none",_.label="",E.fromCluster=f.v,_.toCluster=f.v,i.setEdge(v,b,E,f.name+"-cyclic-special"),i.setEdge(b,m,_,f.name+"-cyclic-special")}else(Ho[f.v]||Ho[f.w])&&(Ut.warn("Fixing and trixing - removing XXX",f.v,f.w,f.name),v=pK(f.v),m=pK(f.w),i.removeEdge(f.v,f.w,f.name),v!==f.v&&(p.fromCluster=f.v),m!==f.w&&(p.toCluster=f.w),Ut.warn("Fix Replacing with XXX",v,m,f.name),i.setEdge(v,m,p,f.name))}),Ut.warn("Adjusted Graph",S5(i)),fBt(i,0),Ut.trace(Ho)},fBt=(i,a)=>{if(Ut.warn("extractor - ",a,S5(i),i.children("D")),a>10){Ut.error("Bailing out");return}let f=i.nodes(),p=!1;for(const v of f){const m=i.children(v);p=p||m.length>0}if(!p){Ut.debug("Done, no node has children",i.nodes());return}Ut.debug("Nodes = ",f,a);for(const v of f)if(Ut.debug("Extracting node",v,Ho,Ho[v]&&!Ho[v].externalConnections,!i.parent(v),i.node(v),i.children("D")," Depth ",a),!Ho[v])Ut.debug("Not a cluster",v,a);else if(!Ho[v].externalConnections&&i.children(v)&&i.children(v).length>0){Ut.warn("Cluster without external connections, without a parent and with children",v,a);let b=i.graph().rankdir==="TB"?"LR":"TB";Ho[v]&&Ho[v].clusterData&&Ho[v].clusterData.dir&&(b=Ho[v].clusterData.dir,Ut.warn("Fixing dir",Ho[v].clusterData.dir,b));const E=new a1({multigraph:!0,compound:!0}).setGraph({rankdir:b,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Ut.warn("Old graph before copy",S5(i)),lBt(v,i,E,v),i.setNode(v,{clusterNode:!0,id:v,clusterData:Ho[v].clusterData,labelText:Ho[v].labelText,graph:E}),Ut.warn("New graph after copy node: (",v,")",S5(E)),Ut.debug("Old graph after copy",S5(i))}else Ut.warn("Cluster ** ",v," **not meeting the criteria !externalConnections:",!Ho[v].externalConnections," no parent: ",!i.parent(v)," children ",i.children(v)&&i.children(v).length>0,i.children("D"),a),Ut.debug(Ho);f=i.nodes(),Ut.warn("New list of nodes",f);for(const v of f){const m=i.node(v);Ut.warn(" Now next level",v,m),m.clusterNode&&fBt(m.graph,a+1)}},dBt=(i,a)=>{if(a.length===0)return[];let f=Object.assign(a);return a.forEach(p=>{const v=i.children(p),m=dBt(i,v);f=[...f,...m]}),f},Zje=i=>dBt(i,i.children());function Jje(i,a){return i.intersect(a)}function gBt(i,a,f,p){var v=i.x,m=i.y,b=v-p.x,E=m-p.y,_=Math.sqrt(a*a*E*E+f*f*b*b),L=Math.abs(a*f*b/_);p.x0}function n$e(i,a,f){var p=i.x,v=i.y,m=[],b=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;typeof a.forEach=="function"?a.forEach(function(z){b=Math.min(b,z.x),E=Math.min(E,z.y)}):(b=Math.min(b,a.x),E=Math.min(E,a.y));for(var _=p-i.width/2-b,L=v-i.height/2-E,N=0;N1&&m.sort(function(z,K){var it=z.x-f.x,st=z.y-f.y,ut=Math.sqrt(it*it+st*st),bt=K.x-f.x,mt=K.y-f.y,yt=Math.sqrt(bt*bt+mt*mt);return ut{var f=i.x,p=i.y,v=a.x-f,m=a.y-p,b=i.width/2,E=i.height/2,_,L;return Math.abs(m)*b>Math.abs(v)*E?(m<0&&(E=-E),_=m===0?0:E*v/m,L=E):(v<0&&(b=-b),_=b,L=v===0?0:b*m/v),{x:f+_,y:p+L}},yh={node:Jje,circle:t$e,ellipse:gBt,polygon:n$e,rect:mP},r$e=async(i,a)=>{a.useHtmlLabels||Le().flowchart.htmlLabels||(a.centerLabel=!0);const{shapeSvg:p,bbox:v,halfPadding:m}=await Od(i,a,"node "+a.classes,!0);Ut.info("Classes = ",a.classes);const b=p.insert("rect",":first-child");return b.attr("rx",a.rx).attr("ry",a.ry).attr("x",-v.width/2-m).attr("y",-v.height/2-m).attr("width",v.width+a.padding).attr("height",v.height+a.padding),Qh(a,b),a.intersect=function(E){return yh.rect(a,E)},p},bBt=i=>i?" "+i:"",Pb=(i,a)=>`${a||"node default"}${bBt(i.classes)} ${bBt(i.class)}`,vBt=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=p.height+a.padding,b=v+m,E=[{x:b/2,y:0},{x:b,y:-b/2},{x:b/2,y:-b},{x:0,y:-b/2}];Ut.info("Question main (Circle)");const _=A5(f,b,b,E);return _.attr("style",a.style),Qh(a,_),a.intersect=function(L){return Ut.warn("Intersect called"),yh.polygon(a,E,L)},f},i$e=(i,a)=>{const f=i.insert("g").attr("class","node default").attr("id",a.domId||a.id),p=28,v=[{x:0,y:p/2},{x:p/2,y:0},{x:0,y:-p/2},{x:-p/2,y:0}];return f.insert("polygon",":first-child").attr("points",v.map(function(b){return b.x+","+b.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),a.width=28,a.height=28,a.intersect=function(b){return yh.circle(a,14,b)},f},s$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=4,m=p.height+a.padding,b=m/v,E=p.width+2*b+a.padding,_=[{x:b,y:0},{x:E-b,y:0},{x:E,y:-m/2},{x:E-b,y:-m},{x:b,y:-m},{x:0,y:-m/2}],L=A5(f,E,m,_);return L.attr("style",a.style),Qh(a,L),a.intersect=function(N){return yh.polygon(a,_,N)},f},a$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=p.height+a.padding,b=[{x:-m/2,y:0},{x:v,y:0},{x:v,y:-m},{x:-m/2,y:-m},{x:0,y:-m/2}];return A5(f,v,m,b).attr("style",a.style),a.width=v+m,a.height=m,a.intersect=function(_){return yh.polygon(a,b,_)},f},o$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a),!0),v=p.width+a.padding,m=p.height+a.padding,b=[{x:-2*m/6,y:0},{x:v-m/6,y:0},{x:v+2*m/6,y:-m},{x:m/6,y:-m}],E=A5(f,v,m,b);return E.attr("style",a.style),Qh(a,E),a.intersect=function(_){return yh.polygon(a,b,_)},f},c$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=p.height+a.padding,b=[{x:2*m/6,y:0},{x:v+m/6,y:0},{x:v-2*m/6,y:-m},{x:-m/6,y:-m}],E=A5(f,v,m,b);return E.attr("style",a.style),Qh(a,E),a.intersect=function(_){return yh.polygon(a,b,_)},f},u$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=p.height+a.padding,b=[{x:-2*m/6,y:0},{x:v+2*m/6,y:0},{x:v-m/6,y:-m},{x:m/6,y:-m}],E=A5(f,v,m,b);return E.attr("style",a.style),Qh(a,E),a.intersect=function(_){return yh.polygon(a,b,_)},f},l$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=p.height+a.padding,b=[{x:m/6,y:0},{x:v-m/6,y:0},{x:v+2*m/6,y:-m},{x:-2*m/6,y:-m}],E=A5(f,v,m,b);return E.attr("style",a.style),Qh(a,E),a.intersect=function(_){return yh.polygon(a,b,_)},f},h$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=p.height+a.padding,b=[{x:0,y:0},{x:v+m/2,y:0},{x:v,y:-m/2},{x:v+m/2,y:-m},{x:0,y:-m}],E=A5(f,v,m,b);return E.attr("style",a.style),Qh(a,E),a.intersect=function(_){return yh.polygon(a,b,_)},f},f$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=v/2,b=m/(2.5+v/50),E=p.height+b+a.padding,_="M 0,"+b+" a "+m+","+b+" 0,0,0 "+v+" 0 a "+m+","+b+" 0,0,0 "+-v+" 0 l 0,"+E+" a "+m+","+b+" 0,0,0 "+v+" 0 l 0,"+-E,L=f.attr("label-offset-y",b).insert("path",":first-child").attr("style",a.style).attr("d",_).attr("transform","translate("+-v/2+","+-(E/2+b)+")");return Qh(a,L),a.intersect=function(N){const B=yh.rect(a,N),j=B.x-a.x;if(m!=0&&(Math.abs(j)a.height/2-b)){let R=b*b*(1-j*j/(m*m));R!=0&&(R=Math.sqrt(R)),R=b-R,N.y-a.y>0&&(R=-R),B.y+=R}return B},f},d$e=async(i,a)=>{const{shapeSvg:f,bbox:p,halfPadding:v}=await Od(i,a,"node "+a.classes+" "+a.class,!0),m=f.insert("rect",":first-child"),b=p.width+a.padding,E=p.height+a.padding;if(m.attr("class","basic label-container").attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("x",-p.width/2-v).attr("y",-p.height/2-v).attr("width",b).attr("height",E),a.props){const _=new Set(Object.keys(a.props));a.props.borders&&(wBt(m,a.props.borders,b,E),_.delete("borders")),_.forEach(L=>{Ut.warn(`Unknown node property ${L}`)})}return Qh(a,m),a.intersect=function(_){return yh.rect(a,_)},f},g$e=async(i,a)=>{const{shapeSvg:f}=await Od(i,a,"label",!0);Ut.trace("Classes = ",a.class);const p=f.insert("rect",":first-child"),v=0,m=0;if(p.attr("width",v).attr("height",m),f.attr("class","label edgeLabel"),a.props){const b=new Set(Object.keys(a.props));a.props.borders&&(wBt(p,a.props.borders,v,m),b.delete("borders")),b.forEach(E=>{Ut.warn(`Unknown node property ${E}`)})}return Qh(a,p),a.intersect=function(b){return yh.rect(a,b)},f};function wBt(i,a,f,p){const v=[],m=E=>{v.push(E,0)},b=E=>{v.push(0,E)};a.includes("t")?(Ut.debug("add top border"),m(f)):b(f),a.includes("r")?(Ut.debug("add right border"),m(p)):b(p),a.includes("b")?(Ut.debug("add bottom border"),m(f)):b(f),a.includes("l")?(Ut.debug("add left border"),m(p)):b(p),i.attr("stroke-dasharray",v.join(" "))}const p$e=(i,a)=>{let f;a.classes?f="node "+a.classes:f="node default";const p=i.insert("g").attr("class",f).attr("id",a.domId||a.id),v=p.insert("rect",":first-child"),m=p.insert("line"),b=p.insert("g").attr("class","label"),E=a.labelText.flat?a.labelText.flat():a.labelText;let _="";typeof E=="object"?_=E[0]:_=E,Ut.info("Label text abc79",_,E,typeof E=="object");const L=b.node().appendChild(hp(_,a.labelStyle,!0,!0));let N={width:0,height:0};if(s1(Le().flowchart.htmlLabels)){const K=L.children[0],it=yr(L);N=K.getBoundingClientRect(),it.attr("width",N.width),it.attr("height",N.height)}Ut.info("Text 2",E);const B=E.slice(1,E.length);let j=L.getBBox();const R=b.node().appendChild(hp(B.join?B.join("
"):B,a.labelStyle,!0,!0));if(s1(Le().flowchart.htmlLabels)){const K=R.children[0],it=yr(R);N=K.getBoundingClientRect(),it.attr("width",N.width),it.attr("height",N.height)}const z=a.padding/2;return yr(R).attr("transform","translate( "+(N.width>j.width?0:(j.width-N.width)/2)+", "+(j.height+z+5)+")"),yr(L).attr("transform","translate( "+(N.width{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.height+a.padding,m=p.width+v/4+a.padding,b=f.insert("rect",":first-child").attr("style",a.style).attr("rx",v/2).attr("ry",v/2).attr("x",-m/2).attr("y",-v/2).attr("width",m).attr("height",v);return Qh(a,b),a.intersect=function(E){return yh.rect(a,E)},f},v$e=async(i,a)=>{const{shapeSvg:f,bbox:p,halfPadding:v}=await Od(i,a,Pb(a,void 0),!0),m=f.insert("circle",":first-child");return m.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("r",p.width/2+v).attr("width",p.width+a.padding).attr("height",p.height+a.padding),Ut.info("Circle main"),Qh(a,m),a.intersect=function(b){return Ut.info("Circle intersect",a,p.width/2+v,b),yh.circle(a,p.width/2+v,b)},f},w$e=async(i,a)=>{const{shapeSvg:f,bbox:p,halfPadding:v}=await Od(i,a,Pb(a,void 0),!0),m=5,b=f.insert("g",":first-child"),E=b.insert("circle"),_=b.insert("circle");return b.attr("class",a.class),E.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("r",p.width/2+v+m).attr("width",p.width+a.padding+m*2).attr("height",p.height+a.padding+m*2),_.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("r",p.width/2+v).attr("width",p.width+a.padding).attr("height",p.height+a.padding),Ut.info("DoubleCircle main"),Qh(a,E),a.intersect=function(L){return Ut.info("DoubleCircle intersect",a,p.width/2+v+m,L),yh.circle(a,p.width/2+v+m,L)},f},m$e=async(i,a)=>{const{shapeSvg:f,bbox:p}=await Od(i,a,Pb(a,void 0),!0),v=p.width+a.padding,m=p.height+a.padding,b=[{x:0,y:0},{x:v,y:0},{x:v,y:-m},{x:0,y:-m},{x:0,y:0},{x:-8,y:0},{x:v+8,y:0},{x:v+8,y:-m},{x:-8,y:-m},{x:-8,y:0}],E=A5(f,v,m,b);return E.attr("style",a.style),Qh(a,E),a.intersect=function(_){return yh.polygon(a,b,_)},f},y$e=(i,a)=>{const f=i.insert("g").attr("class","node default").attr("id",a.domId||a.id),p=f.insert("circle",":first-child");return p.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Qh(a,p),a.intersect=function(v){return yh.circle(a,7,v)},f},mBt=(i,a,f)=>{const p=i.insert("g").attr("class","node default").attr("id",a.domId||a.id);let v=70,m=10;f==="LR"&&(v=10,m=70);const b=p.append("rect").attr("x",-1*v/2).attr("y",-1*m/2).attr("width",v).attr("height",m).attr("class","fork-join");return Qh(a,b),a.height=a.height+a.padding/2,a.width=a.width+a.padding/2,a.intersect=function(E){return yh.rect(a,E)},p},yBt={rhombus:vBt,question:vBt,rect:d$e,labelRect:g$e,rectWithTitle:p$e,choice:i$e,circle:v$e,doublecircle:w$e,stadium:b$e,hexagon:s$e,rect_left_inv_arrow:a$e,lean_right:o$e,lean_left:c$e,trapezoid:u$e,inv_trapezoid:l$e,rect_right_inv_arrow:h$e,cylinder:f$e,start:y$e,end:(i,a)=>{const f=i.insert("g").attr("class","node default").attr("id",a.domId||a.id),p=f.insert("circle",":first-child"),v=f.insert("circle",":first-child");return v.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),p.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Qh(a,v),a.intersect=function(m){return yh.circle(a,7,m)},f},note:r$e,subroutine:m$e,fork:mBt,join:mBt,class_box:(i,a)=>{const f=a.padding/2,p=4,v=8;let m;a.classes?m="node "+a.classes:m="node default";const b=i.insert("g").attr("class",m).attr("id",a.domId||a.id),E=b.insert("rect",":first-child"),_=b.insert("line"),L=b.insert("line");let N=0,B=p;const j=b.insert("g").attr("class","label");let R=0;const z=a.classData.annotations&&a.classData.annotations[0],K=a.classData.annotations[0]?"«"+a.classData.annotations[0]+"»":"",it=j.node().appendChild(hp(K,a.labelStyle,!0,!0));let st=it.getBBox();if(s1(Le().flowchart.htmlLabels)){const wt=it.children[0],X=yr(it);st=wt.getBoundingClientRect(),X.attr("width",st.width),X.attr("height",st.height)}a.classData.annotations[0]&&(B+=st.height+p,N+=st.width);let ut=a.classData.label;a.classData.type!==void 0&&a.classData.type!==""&&(Le().flowchart.htmlLabels?ut+="<"+a.classData.type+">":ut+="<"+a.classData.type+">");const bt=j.node().appendChild(hp(ut,a.labelStyle,!0,!0));yr(bt).attr("class","classTitle");let mt=bt.getBBox();if(s1(Le().flowchart.htmlLabels)){const wt=bt.children[0],X=yr(bt);mt=wt.getBoundingClientRect(),X.attr("width",mt.width),X.attr("height",mt.height)}B+=mt.height+p,mt.width>N&&(N=mt.width);const yt=[];a.classData.members.forEach(wt=>{const X=wt.getDisplayDetails();let pt=X.displayText;Le().flowchart.htmlLabels&&(pt=pt.replace(//g,">"));const U=j.node().appendChild(hp(pt,X.cssStyle?X.cssStyle:a.labelStyle,!0,!0));let xt=U.getBBox();if(s1(Le().flowchart.htmlLabels)){const nt=U.children[0],Ot=yr(U);xt=nt.getBoundingClientRect(),Ot.attr("width",xt.width),Ot.attr("height",xt.height)}xt.width>N&&(N=xt.width),B+=xt.height+p,yt.push(U)}),B+=v;const dt=[];if(a.classData.methods.forEach(wt=>{const X=wt.getDisplayDetails();let pt=X.displayText;Le().flowchart.htmlLabels&&(pt=pt.replace(//g,">"));const U=j.node().appendChild(hp(pt,X.cssStyle?X.cssStyle:a.labelStyle,!0,!0));let xt=U.getBBox();if(s1(Le().flowchart.htmlLabels)){const nt=U.children[0],Ot=yr(U);xt=nt.getBoundingClientRect(),Ot.attr("width",xt.width),Ot.attr("height",xt.height)}xt.width>N&&(N=xt.width),B+=xt.height+p,dt.push(U)}),B+=v,z){let wt=(N-st.width)/2;yr(it).attr("transform","translate( "+(-1*N/2+wt)+", "+-1*B/2+")"),R=st.height+p}let ht=(N-mt.width)/2;return yr(bt).attr("transform","translate( "+(-1*N/2+ht)+", "+(-1*B/2+R)+")"),R+=mt.height+p,_.attr("class","divider").attr("x1",-N/2-f).attr("x2",N/2+f).attr("y1",-B/2-f+v+R).attr("y2",-B/2-f+v+R),R+=v,yt.forEach(wt=>{yr(wt).attr("transform","translate( "+-N/2+", "+(-1*B/2+R+v/2)+")");const X=wt==null?void 0:wt.getBBox();R+=((X==null?void 0:X.height)??0)+p}),R+=v,L.attr("class","divider").attr("x1",-N/2-f).attr("x2",N/2+f).attr("y1",-B/2-f+v+R).attr("y2",-B/2-f+v+R),R+=v,dt.forEach(wt=>{yr(wt).attr("transform","translate( "+-N/2+", "+(-1*B/2+R)+")");const X=wt==null?void 0:wt.getBBox();R+=((X==null?void 0:X.height)??0)+p}),E.attr("class","outer title-state").attr("x",-N/2-f).attr("y",-(B/2)-f).attr("width",N+a.padding).attr("height",B+a.padding),Qh(a,E),a.intersect=function(wt){return yh.rect(a,wt)},b}};let rL={};const xBt=async(i,a,f)=>{let p,v;if(a.link){let m;Le().securityLevel==="sandbox"?m="_top":a.linkTarget&&(m=a.linkTarget||"_blank"),p=i.insert("svg:a").attr("xlink:href",a.link).attr("target",m),v=await yBt[a.shape](p,a,f)}else v=await yBt[a.shape](i,a,f),p=v;return a.tooltip&&v.attr("title",a.tooltip),a.class&&v.attr("class","node default "+a.class),rL[a.id]=p,a.haveCallback&&rL[a.id].attr("class",rL[a.id].attr("class")+" clickable"),p},x$e=(i,a)=>{rL[a.id]=i},k$e=()=>{rL={}},kBt=i=>{const a=rL[i.id];Ut.trace("Transforming node",i.diff,i,"translate("+(i.x-i.width/2-5)+", "+i.width/2+")");const f=8,p=i.diff||0;return i.clusterNode?a.attr("transform","translate("+(i.x+p-i.width/2)+", "+(i.y-i.height/2-f)+")"):a.attr("transform","translate("+i.x+", "+i.y+")"),p},E$e={rect:(i,a)=>{Ut.info("Creating subgraph rect for ",a.id,a);const f=i.insert("g").attr("class","cluster"+(a.class?" "+a.class:"")).attr("id",a.id),p=f.insert("rect",":first-child"),v=s1(Le().flowchart.htmlLabels),m=f.insert("g").attr("class","cluster-label"),b=a.labelType==="markdown"?dK(m,a.labelText,{style:a.labelStyle,useHtmlLabels:v}):m.node().appendChild(hp(a.labelText,a.labelStyle,void 0,!0));let E=b.getBBox();if(s1(Le().flowchart.htmlLabels)){const j=b.children[0],R=yr(b);E=j.getBoundingClientRect(),R.attr("width",E.width),R.attr("height",E.height)}const _=0*a.padding,L=_/2,N=a.width<=E.width+_?E.width+_:a.width;a.width<=E.width+_?a.diff=(E.width-a.width)/2-a.padding/2:a.diff=-a.padding/2,Ut.trace("Data ",a,JSON.stringify(a)),p.attr("style",a.style).attr("rx",a.rx).attr("ry",a.ry).attr("x",a.x-N/2).attr("y",a.y-a.height/2-L).attr("width",N).attr("height",a.height+_),v?m.attr("transform","translate("+(a.x-E.width/2)+", "+(a.y-a.height/2)+")"):m.attr("transform","translate("+a.x+", "+(a.y-a.height/2)+")");const B=p.node().getBBox();return a.width=B.width,a.height=B.height,a.intersect=function(j){return mP(a,j)},f},roundedWithTitle:(i,a)=>{const f=i.insert("g").attr("class",a.classes).attr("id",a.id),p=f.insert("rect",":first-child"),v=f.insert("g").attr("class","cluster-label"),m=f.append("rect"),b=v.node().appendChild(hp(a.labelText,a.labelStyle,void 0,!0));let E=b.getBBox();if(s1(Le().flowchart.htmlLabels)){const j=b.children[0],R=yr(b);E=j.getBoundingClientRect(),R.attr("width",E.width),R.attr("height",E.height)}E=b.getBBox();const _=0*a.padding,L=_/2,N=a.width<=E.width+a.padding?E.width+a.padding:a.width;a.width<=E.width+a.padding?a.diff=(E.width+a.padding*0-a.width)/2:a.diff=-a.padding/2,p.attr("class","outer").attr("x",a.x-N/2-L).attr("y",a.y-a.height/2-L).attr("width",N+_).attr("height",a.height+_),m.attr("class","inner").attr("x",a.x-N/2-L).attr("y",a.y-a.height/2-L+E.height-1).attr("width",N+_).attr("height",a.height+_-E.height-3),v.attr("transform","translate("+(a.x-E.width/2)+", "+(a.y-a.height/2-a.padding/3+(s1(Le().flowchart.htmlLabels)?5:3))+")");const B=p.node().getBBox();return a.height=B.height,a.intersect=function(j){return mP(a,j)},f},noteGroup:(i,a)=>{const f=i.insert("g").attr("class","note-cluster").attr("id",a.id),p=f.insert("rect",":first-child"),v=0*a.padding,m=v/2;p.attr("rx",a.rx).attr("ry",a.ry).attr("x",a.x-a.width/2-m).attr("y",a.y-a.height/2-m).attr("width",a.width+v).attr("height",a.height+v).attr("fill","none");const b=p.node().getBBox();return a.width=b.width,a.height=b.height,a.intersect=function(E){return mP(a,E)},f},divider:(i,a)=>{const f=i.insert("g").attr("class",a.classes).attr("id",a.id),p=f.insert("rect",":first-child"),v=0*a.padding,m=v/2;p.attr("class","divider").attr("x",a.x-a.width/2-m).attr("y",a.y-a.height/2).attr("width",a.width+v).attr("height",a.height+v);const b=p.node().getBBox();return a.width=b.width,a.height=b.height,a.diff=-a.padding/2,a.intersect=function(E){return mP(a,E)},f}};let EBt={};const T$e=(i,a)=>{Ut.trace("Inserting cluster");const f=a.shape||"rect";EBt[a.id]=E$e[f](i,a)},C$e=()=>{EBt={}},lk={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function bK(i,a){i=vK(i),a=vK(a);const[f,p]=[i.x,i.y],[v,m]=[a.x,a.y],b=v-f,E=m-p;return{angle:Math.atan(E/b),deltaX:b,deltaY:E}}const vK=i=>Array.isArray(i)?{x:i[0],y:i[1]}:i,TBt=i=>({x:function(a,f,p){let v=0;if(f===0&&Object.hasOwn(lk,i.arrowTypeStart)){const{angle:m,deltaX:b}=bK(p[0],p[1]);v=lk[i.arrowTypeStart]*Math.cos(m)*(b>=0?1:-1)}else if(f===p.length-1&&Object.hasOwn(lk,i.arrowTypeEnd)){const{angle:m,deltaX:b}=bK(p[p.length-1],p[p.length-2]);v=lk[i.arrowTypeEnd]*Math.cos(m)*(b>=0?1:-1)}return vK(a).x+v},y:function(a,f,p){let v=0;if(f===0&&Object.hasOwn(lk,i.arrowTypeStart)){const{angle:m,deltaY:b}=bK(p[0],p[1]);v=lk[i.arrowTypeStart]*Math.abs(Math.sin(m))*(b>=0?1:-1)}else if(f===p.length-1&&Object.hasOwn(lk,i.arrowTypeEnd)){const{angle:m,deltaY:b}=bK(p[p.length-1],p[p.length-2]);v=lk[i.arrowTypeEnd]*Math.abs(Math.sin(m))*(b>=0?1:-1)}return vK(a).y+v}});let wK={},Nd={};const _$e=()=>{wK={},Nd={}},CBt=(i,a)=>{const f=s1(Le().flowchart.htmlLabels),p=a.labelType==="markdown"?dK(i,a.label,{style:a.labelStyle,useHtmlLabels:f,addSvgBackground:!0}):hp(a.label,a.labelStyle);Ut.info("abc82",a,a.labelType);const v=i.insert("g").attr("class","edgeLabel"),m=v.insert("g").attr("class","label");m.node().appendChild(p);let b=p.getBBox();if(f){const _=p.children[0],L=yr(p);b=_.getBoundingClientRect(),L.attr("width",b.width),L.attr("height",b.height)}m.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),wK[a.id]=v,a.width=b.width,a.height=b.height;let E;if(a.startLabelLeft){const _=hp(a.startLabelLeft,a.labelStyle),L=i.insert("g").attr("class","edgeTerminals"),N=L.insert("g").attr("class","inner");E=N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),Nd[a.id]||(Nd[a.id]={}),Nd[a.id].startLeft=L,mK(E,a.startLabelLeft)}if(a.startLabelRight){const _=hp(a.startLabelRight,a.labelStyle),L=i.insert("g").attr("class","edgeTerminals"),N=L.insert("g").attr("class","inner");E=L.node().appendChild(_),N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),Nd[a.id]||(Nd[a.id]={}),Nd[a.id].startRight=L,mK(E,a.startLabelRight)}if(a.endLabelLeft){const _=hp(a.endLabelLeft,a.labelStyle),L=i.insert("g").attr("class","edgeTerminals"),N=L.insert("g").attr("class","inner");E=N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),L.node().appendChild(_),Nd[a.id]||(Nd[a.id]={}),Nd[a.id].endLeft=L,mK(E,a.endLabelLeft)}if(a.endLabelRight){const _=hp(a.endLabelRight,a.labelStyle),L=i.insert("g").attr("class","edgeTerminals"),N=L.insert("g").attr("class","inner");E=N.node().appendChild(_);const B=_.getBBox();N.attr("transform","translate("+-B.width/2+", "+-B.height/2+")"),L.node().appendChild(_),Nd[a.id]||(Nd[a.id]={}),Nd[a.id].endRight=L,mK(E,a.endLabelRight)}return p};function mK(i,a){Le().flowchart.htmlLabels&&i&&(i.style.width=a.length*9+"px",i.style.height="12px")}const S$e=(i,a)=>{Ut.info("Moving label abc78 ",i.id,i.label,wK[i.id]);let f=a.updatedPath?a.updatedPath:a.originalPath;if(i.label){const p=wK[i.id];let v=i.x,m=i.y;if(f){const b=$a.calcLabelPosition(f);Ut.info("Moving label "+i.label+" from (",v,",",m,") to (",b.x,",",b.y,") abc78"),a.updatedPath&&(v=b.x,m=b.y)}p.attr("transform","translate("+v+", "+m+")")}if(i.startLabelLeft){const p=Nd[i.id].startLeft;let v=i.x,m=i.y;if(f){const b=$a.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",f);v=b.x,m=b.y}p.attr("transform","translate("+v+", "+m+")")}if(i.startLabelRight){const p=Nd[i.id].startRight;let v=i.x,m=i.y;if(f){const b=$a.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",f);v=b.x,m=b.y}p.attr("transform","translate("+v+", "+m+")")}if(i.endLabelLeft){const p=Nd[i.id].endLeft;let v=i.x,m=i.y;if(f){const b=$a.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",f);v=b.x,m=b.y}p.attr("transform","translate("+v+", "+m+")")}if(i.endLabelRight){const p=Nd[i.id].endRight;let v=i.x,m=i.y;if(f){const b=$a.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",f);v=b.x,m=b.y}p.attr("transform","translate("+v+", "+m+")")}},A$e=(i,a)=>{const f=i.x,p=i.y,v=Math.abs(a.x-f),m=Math.abs(a.y-p),b=i.width/2,E=i.height/2;return v>=b||m>=E},L$e=(i,a,f)=>{Ut.warn(`intersection calc abc89: + outsidePoint: ${JSON.stringify(a)} + insidePoint : ${JSON.stringify(f)} + node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const p=i.x,v=i.y,m=Math.abs(p-f.x),b=i.width/2;let E=f.xMath.abs(p-a.x)*_){let B=f.y{Ut.warn("abc88 cutPathAtIntersect",i,a);let f=[],p=i[0],v=!1;return i.forEach(m=>{if(Ut.info("abc88 checking point",m,a),!A$e(a,m)&&!v){const b=L$e(a,p,m);Ut.warn("abc88 inside",m,p,b),Ut.warn("abc88 intersection",b);let E=!1;f.forEach(_=>{E=E||_.x===b.x&&_.y===b.y}),f.some(_=>_.x===b.x&&_.y===b.y)?Ut.warn("abc88 no intersect",b,f):f.push(b),v=!0}else Ut.warn("abc88 outside",m,p),p=m,v||f.push(m)}),Ut.warn("abc88 returning points",f),f},M$e=function(i,a,f,p,v,m,b){let E=f.points,_=!1;const L=m.node(a.v);var N=m.node(a.w);Ut.info("abc88 InsertEdge: ",f),N.intersect&&L.intersect&&(E=E.slice(1,f.points.length-1),E.unshift(L.intersect(E[0])),Ut.info("Last point",E[E.length-1],N,N.intersect(E[E.length-1])),E.push(N.intersect(E[E.length-1]))),f.toCluster&&(Ut.info("to cluster abc88",p[f.toCluster]),E=_Bt(f.points,p[f.toCluster].node),_=!0),f.fromCluster&&(Ut.info("from cluster abc88",p[f.fromCluster]),E=_Bt(E.reverse(),p[f.fromCluster].node).reverse(),_=!0);const B=E.filter(mt=>!Number.isNaN(mt.y));let j=FN;f.curve&&(v==="graph"||v==="flowchart")&&(j=f.curve);const{x:R,y:z}=TBt(f),K=Z7().x(R).y(z).curve(j);let it;switch(f.thickness){case"normal":it="edge-thickness-normal";break;case"thick":it="edge-thickness-thick";break;case"invisible":it="edge-thickness-thick";break;default:it=""}switch(f.pattern){case"solid":it+=" edge-pattern-solid";break;case"dotted":it+=" edge-pattern-dotted";break;case"dashed":it+=" edge-pattern-dashed";break}const st=i.append("path").attr("d",K(B)).attr("id",f.id).attr("class"," "+it+(f.classes?" "+f.classes:"")).attr("style",f.style);let ut="";switch((Le().flowchart.arrowMarkerAbsolute||Le().state.arrowMarkerAbsolute)&&(ut=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,ut=ut.replace(/\(/g,"\\("),ut=ut.replace(/\)/g,"\\)")),Ut.info("arrowTypeStart",f.arrowTypeStart),Ut.info("arrowTypeEnd",f.arrowTypeEnd),f.arrowTypeStart){case"arrow_cross":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-crossStart)");break;case"arrow_point":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-pointStart)");break;case"arrow_barb":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-barbStart)");break;case"arrow_circle":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-circleStart)");break;case"aggregation":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-aggregationStart)");break;case"extension":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-extensionStart)");break;case"composition":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-compositionStart)");break;case"dependency":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-dependencyStart)");break;case"lollipop":st.attr("marker-start","url("+ut+"#"+b+"_"+v+"-lollipopStart)");break}switch(f.arrowTypeEnd){case"arrow_cross":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-crossEnd)");break;case"arrow_point":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-pointEnd)");break;case"arrow_barb":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-barbEnd)");break;case"arrow_circle":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-circleEnd)");break;case"aggregation":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-aggregationEnd)");break;case"extension":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-extensionEnd)");break;case"composition":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-compositionEnd)");break;case"dependency":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-dependencyEnd)");break;case"lollipop":st.attr("marker-end","url("+ut+"#"+b+"_"+v+"-lollipopEnd)");break}let bt={};return _&&(bt.updatedPath=E),bt.originalPath=f.points,bt},SBt=async(i,a,f,p,v)=>{Ut.info("Graph in recursive render: XXX",S5(a),v);const m=a.graph().rankdir;Ut.trace("Dir in recursive render - dir:",m);const b=i.insert("g").attr("class","root");a.nodes()?Ut.info("Recursive render XXX",a.nodes()):Ut.info("No nodes found for",a),a.edges().length>0&&Ut.trace("Recursive edges",a.edge(a.edges()[0]));const E=b.insert("g").attr("class","clusters"),_=b.insert("g").attr("class","edgePaths"),L=b.insert("g").attr("class","edgeLabels"),N=b.insert("g").attr("class","nodes");await Promise.all(a.nodes().map(async function(j){const R=a.node(j);if(v!==void 0){const z=JSON.parse(JSON.stringify(v.clusterData));Ut.info("Setting data for cluster XXX (",j,") ",z,v),a.setNode(v.id,z),a.parent(j)||(Ut.trace("Setting parent",j,v.id),a.setParent(j,v.id,z))}if(Ut.info("(Insert) Node XXX"+j+": "+JSON.stringify(a.node(j))),R&&R.clusterNode){Ut.info("Cluster identified",j,R.width,a.node(j));const z=await SBt(N,R.graph,f,p,a.node(j)),K=z.elem;Qh(R,K),R.diff=z.diff||0,Ut.info("Node bounds (abc123)",j,R,R.width,R.x,R.y),x$e(K,R),Ut.warn("Recursive render complete ",K,R)}else a.children(j).length>0?(Ut.info("Cluster - the non recursive path XXX",j,R.id,R,a),Ut.info(wP(R.id,a)),Ho[R.id]={id:wP(R.id,a),node:R}):(Ut.info("Node - the non recursive path",j,R.id,R),await xBt(N,a.node(j),m))})),a.edges().forEach(function(j){const R=a.edge(j.v,j.w,j.name);Ut.info("Edge "+j.v+" -> "+j.w+": "+JSON.stringify(j)),Ut.info("Edge "+j.v+" -> "+j.w+": ",j," ",JSON.stringify(a.edge(j))),Ut.info("Fix",Ho,"ids:",j.v,j.w,"Translateing: ",Ho[j.v],Ho[j.w]),CBt(L,R)}),a.edges().forEach(function(j){Ut.info("Edge "+j.v+" -> "+j.w+": "+JSON.stringify(j))}),Ut.info("#############################################"),Ut.info("### Layout ###"),Ut.info("#############################################"),Ut.info(a),eL(a),Ut.info("Graph after layout:",S5(a));let B=0;return Zje(a).forEach(function(j){const R=a.node(j);Ut.info("Position "+j+": "+JSON.stringify(a.node(j))),Ut.info("Position "+j+": ("+R.x,","+R.y,") width: ",R.width," height: ",R.height),R&&R.clusterNode?kBt(R):a.children(j).length>0?(T$e(E,R),Ho[R.id].node=R):kBt(R)}),a.edges().forEach(function(j){const R=a.edge(j);Ut.info("Edge "+j.v+" -> "+j.w+": "+JSON.stringify(R),R);const z=M$e(_,j,R,Ho,f,a,p);S$e(R,z)}),a.nodes().forEach(function(j){const R=a.node(j);Ut.info(j,R.type,R.diff),R.type==="group"&&(B=R.diff)}),{elem:b,diff:B}},I0t=async(i,a,f,p,v)=>{IFt(i,f,p,v),k$e(),_$e(),C$e(),Yje(),Ut.warn("Graph at first:",JSON.stringify(S5(a))),Qje(a),Ut.warn("Graph after:",JSON.stringify(S5(a))),await SBt(i,a,p,v)},ABt={},I$e=function(i){const a=Object.keys(i);for(const f of a)ABt[f]=i[f]},LBt=function(i,a,f,p,v,m){const b=p.select(`[id="${f}"]`);Object.keys(i).forEach(function(_){const L=i[_];let N="default";L.classes.length>0&&(N=L.classes.join(" ")),N=N+" flowchart-label";const B=em(L.styles);let j=L.text!==void 0?L.text:L.id,R;if(Ut.info("vertex",L,L.labelType),L.labelType==="markdown")Ut.info("vertex",L,L.labelType);else if(s1(Le().flowchart.htmlLabels)){const it={label:j.replace(/fa[blrs]?:fa-[\w-]+/g,st=>``)};R=d0t(b,it).node(),R.parentNode.removeChild(R)}else{const it=v.createElementNS("http://www.w3.org/2000/svg","text");it.setAttribute("style",B.labelStyle.replace("color:","fill:"));const st=j.split(Yr.lineBreakRegex);for(const ut of st){const bt=v.createElementNS("http://www.w3.org/2000/svg","tspan");bt.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),bt.setAttribute("dy","1em"),bt.setAttribute("x","1"),bt.textContent=ut,it.appendChild(bt)}R=it}let z=0,K="";switch(L.type){case"round":z=5,K="rect";break;case"square":K="rect";break;case"diamond":K="question";break;case"hexagon":K="hexagon";break;case"odd":K="rect_left_inv_arrow";break;case"lean_right":K="lean_right";break;case"lean_left":K="lean_left";break;case"trapezoid":K="trapezoid";break;case"inv_trapezoid":K="inv_trapezoid";break;case"odd_right":K="rect_left_inv_arrow";break;case"circle":K="circle";break;case"ellipse":K="ellipse";break;case"stadium":K="stadium";break;case"subroutine":K="subroutine";break;case"cylinder":K="cylinder";break;case"group":K="rect";break;case"doublecircle":K="doublecircle";break;default:K="rect"}a.setNode(L.id,{labelStyle:B.labelStyle,shape:K,labelText:j,labelType:L.labelType,rx:z,ry:z,class:N,style:B.style,id:L.id,link:L.link,linkTarget:L.linkTarget,tooltip:m.db.getTooltip(L.id)||"",domId:m.db.lookUpDomId(L.id),haveCallback:L.haveCallback,width:L.type==="group"?500:void 0,dir:L.dir,type:L.type,props:L.props,padding:Le().flowchart.padding}),Ut.info("setNode",{labelStyle:B.labelStyle,labelType:L.labelType,shape:K,labelText:j,rx:z,ry:z,class:N,style:B.style,id:L.id,domId:m.db.lookUpDomId(L.id),width:L.type==="group"?500:void 0,type:L.type,dir:L.dir,props:L.props,padding:Le().flowchart.padding})})},MBt=function(i,a,f){Ut.info("abc78 edges = ",i);let p=0,v={},m,b;if(i.defaultStyle!==void 0){const E=em(i.defaultStyle);m=E.style,b=E.labelStyle}i.forEach(function(E){p++;const _="L-"+E.start+"-"+E.end;v[_]===void 0?(v[_]=0,Ut.info("abc78 new entry",_,v[_])):(v[_]++,Ut.info("abc78 new entry",_,v[_]));let L=_+"-"+v[_];Ut.info("abc78 new link id to be used is",_,L,v[_]);const N="LS-"+E.start,B="LE-"+E.end,j={style:"",labelStyle:""};switch(j.minlen=E.length||1,E.type==="arrow_open"?j.arrowhead="none":j.arrowhead="normal",j.arrowTypeStart="arrow_open",j.arrowTypeEnd="arrow_open",E.type){case"double_arrow_cross":j.arrowTypeStart="arrow_cross";case"arrow_cross":j.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":j.arrowTypeStart="arrow_point";case"arrow_point":j.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":j.arrowTypeStart="arrow_circle";case"arrow_circle":j.arrowTypeEnd="arrow_circle";break}let R="",z="";switch(E.stroke){case"normal":R="fill:none;",m!==void 0&&(R=m),b!==void 0&&(z=b),j.thickness="normal",j.pattern="solid";break;case"dotted":j.thickness="normal",j.pattern="dotted",j.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":j.thickness="thick",j.pattern="solid",j.style="stroke-width: 3.5px;fill:none;";break;case"invisible":j.thickness="invisible",j.pattern="solid",j.style="stroke-width: 0;fill:none;";break}if(E.style!==void 0){const K=em(E.style);R=K.style,z=K.labelStyle}j.style=j.style+=R,j.labelStyle=j.labelStyle+=z,E.interpolate!==void 0?j.curve=X2(E.interpolate,ig):i.defaultInterpolate!==void 0?j.curve=X2(i.defaultInterpolate,ig):j.curve=X2(ABt.curve,ig),E.text===void 0?E.style!==void 0&&(j.arrowheadStyle="fill: #333"):(j.arrowheadStyle="fill: #333",j.labelpos="c"),j.labelType=E.labelType,j.label=E.text.replace(Yr.lineBreakRegex,` +`),E.style===void 0&&(j.style=j.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),j.labelStyle=j.labelStyle.replace("color:","fill:"),j.id=L,j.classes="flowchart-link "+N+" "+B,a.setEdge(E.start,E.end,j,p)})},D0t={setConf:I$e,addVertices:LBt,addEdges:MBt,getClasses:function(i,a){return a.db.getClasses()},draw:async function(i,a,f,p){Ut.info("Drawing flowchart");let v=p.db.getDirection();v===void 0&&(v="TD");const{securityLevel:m,flowchart:b}=Le(),E=b.nodeSpacing||50,_=b.rankSpacing||50;let L;m==="sandbox"&&(L=yr("#i"+a));const N=yr(m==="sandbox"?L.nodes()[0].contentDocument.body:"body"),B=m==="sandbox"?L.nodes()[0].contentDocument:document,j=new a1({multigraph:!0,compound:!0}).setGraph({rankdir:v,nodesep:E,ranksep:_,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let R;const z=p.db.getSubGraphs();Ut.info("Subgraphs - ",z);for(let yt=z.length-1;yt>=0;yt--)R=z[yt],Ut.info("Subgraph - ",R),p.db.addVertex(R.id,{text:R.title,type:R.labelType},"group",void 0,R.classes,R.dir);const K=p.db.getVertices(),it=p.db.getEdges();Ut.info("Edges",it);let st=0;for(st=z.length-1;st>=0;st--){R=z[st],ZLt("cluster").append("text");for(let yt=0;yt{const f=jTe,p=f(i,"r"),v=f(i,"g"),m=f(i,"b");return IA(p,v,m,a)},IBt=i=>`.label { + font-family: ${i.fontFamily}; + color: ${i.nodeTextColor||i.textColor}; + } + .cluster-label text { + fill: ${i.titleColor}; + } + .cluster-label span,p { + color: ${i.titleColor}; + } + + .label text,span,p { + fill: ${i.nodeTextColor||i.textColor}; + color: ${i.nodeTextColor||i.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${i.arrowheadColor}; + } + + .edgePath .path { + stroke: ${i.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${i.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${i.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${i.edgeLabelBackground}; + fill: ${i.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${D$e(i.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${i.clusterBkg}; + stroke: ${i.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${i.titleColor}; + } + + .cluster span,p { + color: ${i.titleColor}; + } + /* .cluster div { + color: ${i.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${i.fontFamily}; + font-size: 12px; + background: ${i.tertiaryColor}; + border: 1px solid ${i.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${i.textColor}; + } +`,O$e=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:$dt,db:gT,renderer:D0t,styles:IBt,init:i=>{i.flowchart||(i.flowchart={}),i.flowchart.arrowMarkerAbsolute=i.arrowMarkerAbsolute,$Be.setConf(i.flowchart),gT.clear(),gT.setGen("gen-1")}}},Symbol.toStringTag,{value:"Module"})),N$e=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:$dt,db:gT,renderer:D0t,styles:IBt,init:i=>{i.flowchart||(i.flowchart={}),i.flowchart.arrowMarkerAbsolute=i.arrowMarkerAbsolute,iOt({flowchart:{arrowMarkerAbsolute:i.arrowMarkerAbsolute}}),D0t.setConf(i.flowchart),gT.clear(),gT.setGen("gen-2")}}},Symbol.toStringTag,{value:"Module"}));var O0t=function(){var i=function(wt,X,pt,U){for(pt=pt||{},U=wt.length;U--;pt[wt[U]]=X);return pt},a=[6,8,10,20,22,24,26,27,28],f=[1,10],p=[1,11],v=[1,12],m=[1,13],b=[1,14],E=[1,15],_=[1,21],L=[1,22],N=[1,23],B=[1,24],j=[1,25],R=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],z=[1,34],K=[27,28,46,47],it=[41,42,43,44,45],st=[17,34],ut=[1,54],bt=[1,53],mt=[17,34,36,38],yt={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:function(X,pt,U,xt,nt,Ot,Nt){var qt=Ot.length-1;switch(nt){case 1:break;case 2:this.$=[];break;case 3:Ot[qt-1].push(Ot[qt]),this.$=Ot[qt-1];break;case 4:case 5:this.$=Ot[qt];break;case 6:case 7:this.$=[];break;case 8:xt.addEntity(Ot[qt-4]),xt.addEntity(Ot[qt-2]),xt.addRelationship(Ot[qt-4],Ot[qt],Ot[qt-2],Ot[qt-3]);break;case 9:xt.addEntity(Ot[qt-3]),xt.addAttributes(Ot[qt-3],Ot[qt-1]);break;case 10:xt.addEntity(Ot[qt-2]);break;case 11:xt.addEntity(Ot[qt]);break;case 12:xt.addEntity(Ot[qt-6],Ot[qt-4]),xt.addAttributes(Ot[qt-6],Ot[qt-1]);break;case 13:xt.addEntity(Ot[qt-5],Ot[qt-3]);break;case 14:xt.addEntity(Ot[qt-3],Ot[qt-1]);break;case 15:case 16:this.$=Ot[qt].trim(),xt.setAccTitle(this.$);break;case 17:case 18:this.$=Ot[qt].trim(),xt.setAccDescription(this.$);break;case 19:case 43:this.$=Ot[qt];break;case 20:case 41:case 42:this.$=Ot[qt].replace(/"/g,"");break;case 21:case 29:this.$=[Ot[qt]];break;case 22:Ot[qt].push(Ot[qt-1]),this.$=Ot[qt];break;case 23:this.$={attributeType:Ot[qt-1],attributeName:Ot[qt]};break;case 24:this.$={attributeType:Ot[qt-2],attributeName:Ot[qt-1],attributeKeyTypeList:Ot[qt]};break;case 25:this.$={attributeType:Ot[qt-2],attributeName:Ot[qt-1],attributeComment:Ot[qt]};break;case 26:this.$={attributeType:Ot[qt-3],attributeName:Ot[qt-2],attributeKeyTypeList:Ot[qt-1],attributeComment:Ot[qt]};break;case 27:case 28:case 31:this.$=Ot[qt];break;case 30:Ot[qt-2].push(Ot[qt]),this.$=Ot[qt-2];break;case 32:this.$=Ot[qt].replace(/"/g,"");break;case 33:this.$={cardA:Ot[qt],relType:Ot[qt-1],cardB:Ot[qt-2]};break;case 34:this.$=xt.Cardinality.ZERO_OR_ONE;break;case 35:this.$=xt.Cardinality.ZERO_OR_MORE;break;case 36:this.$=xt.Cardinality.ONE_OR_MORE;break;case 37:this.$=xt.Cardinality.ONLY_ONE;break;case 38:this.$=xt.Cardinality.MD_PARENT;break;case 39:this.$=xt.Identification.NON_IDENTIFYING;break;case 40:this.$=xt.Identification.IDENTIFYING;break}},table:[{3:1,4:[1,2]},{1:[3]},i(a,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:f,22:p,24:v,26:m,27:b,28:E},i(a,[2,7],{1:[2,1]}),i(a,[2,3]),{9:16,11:9,20:f,22:p,24:v,26:m,27:b,28:E},i(a,[2,5]),i(a,[2,6]),i(a,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:_,42:L,43:N,44:B,45:j}),{21:[1,26]},{23:[1,27]},{25:[1,28]},i(a,[2,18]),i(R,[2,19]),i(R,[2,20]),i(a,[2,4]),{11:29,27:b,28:E},{16:30,17:[1,31],29:32,30:33,34:z},{11:35,27:b,28:E},{40:36,46:[1,37],47:[1,38]},i(K,[2,34]),i(K,[2,35]),i(K,[2,36]),i(K,[2,37]),i(K,[2,38]),i(a,[2,15]),i(a,[2,16]),i(a,[2,17]),{13:[1,39]},{17:[1,40]},i(a,[2,10]),{16:41,17:[2,21],29:32,30:33,34:z},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:_,42:L,43:N,44:B,45:j},i(it,[2,39]),i(it,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},i(a,[2,9]),{17:[2,22]},i(st,[2,23],{32:50,33:51,35:52,37:ut,38:bt}),i([17,34,37,38],[2,28]),i(a,[2,14],{15:[1,55]}),i([27,28],[2,33]),i(a,[2,8]),i(a,[2,41]),i(a,[2,42]),i(a,[2,43]),i(st,[2,24],{33:56,36:[1,57],38:bt}),i(st,[2,25]),i(mt,[2,29]),i(st,[2,32]),i(mt,[2,31]),{16:58,17:[1,59],29:32,30:33,34:z},i(st,[2,26]),{35:60,37:ut},{17:[1,61]},i(a,[2,13]),i(mt,[2,30]),i(a,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(X,pt){if(pt.recoverable)this.trace(X);else{var U=new Error(X);throw U.hash=pt,U}},parse:function(X){var pt=this,U=[0],xt=[],nt=[null],Ot=[],Nt=this.table,qt="",Ct=0,Z=0,Tt=2,Ht=1,It=Ot.slice.call(arguments,1),Ft=Object.create(this.lexer),ke={yy:{}};for(var pn in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pn)&&(ke.yy[pn]=this.yy[pn]);Ft.setInput(X,ke.yy),ke.yy.lexer=Ft,ke.yy.parser=this,typeof Ft.yylloc>"u"&&(Ft.yylloc={});var Me=Ft.yylloc;Ot.push(Me);var ve=Ft.options&&Ft.options.ranges;typeof ke.yy.parseError=="function"?this.parseError=ke.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(){var cn;return cn=xt.pop()||Ft.lex()||Ht,typeof cn!="number"&&(cn instanceof Array&&(xt=cn,cn=xt.pop()),cn=pt.symbols_[cn]||cn),cn}for(var Ke,we,_e,$t,re={},ie,Oe,oe,Ne;;){if(we=U[U.length-1],this.defaultActions[we]?_e=this.defaultActions[we]:((Ke===null||typeof Ke>"u")&&(Ke=Ge()),_e=Nt[we]&&Nt[we][Ke]),typeof _e>"u"||!_e.length||!_e[0]){var me="";Ne=[];for(ie in Nt[we])this.terminals_[ie]&&ie>Tt&&Ne.push("'"+this.terminals_[ie]+"'");Ft.showPosition?me="Parse error on line "+(Ct+1)+`: +`+Ft.showPosition()+` +Expecting `+Ne.join(", ")+", got '"+(this.terminals_[Ke]||Ke)+"'":me="Parse error on line "+(Ct+1)+": Unexpected "+(Ke==Ht?"end of input":"'"+(this.terminals_[Ke]||Ke)+"'"),this.parseError(me,{text:Ft.match,token:this.terminals_[Ke]||Ke,line:Ft.yylineno,loc:Me,expected:Ne})}if(_e[0]instanceof Array&&_e.length>1)throw new Error("Parse Error: multiple actions possible at state: "+we+", token: "+Ke);switch(_e[0]){case 1:U.push(Ke),nt.push(Ft.yytext),Ot.push(Ft.yylloc),U.push(_e[1]),Ke=null,Z=Ft.yyleng,qt=Ft.yytext,Ct=Ft.yylineno,Me=Ft.yylloc;break;case 2:if(Oe=this.productions_[_e[1]][1],re.$=nt[nt.length-Oe],re._$={first_line:Ot[Ot.length-(Oe||1)].first_line,last_line:Ot[Ot.length-1].last_line,first_column:Ot[Ot.length-(Oe||1)].first_column,last_column:Ot[Ot.length-1].last_column},ve&&(re._$.range=[Ot[Ot.length-(Oe||1)].range[0],Ot[Ot.length-1].range[1]]),$t=this.performAction.apply(re,[qt,Z,Ct,ke.yy,_e[1],nt,Ot].concat(It)),typeof $t<"u")return $t;Oe&&(U=U.slice(0,-1*Oe*2),nt=nt.slice(0,-1*Oe),Ot=Ot.slice(0,-1*Oe)),U.push(this.productions_[_e[1]][0]),nt.push(re.$),Ot.push(re._$),oe=Nt[U[U.length-2]][U[U.length-1]],U.push(oe);break;case 3:return!0}}return!0}},dt=function(){var wt={EOF:1,parseError:function(pt,U){if(this.yy.parser)this.yy.parser.parseError(pt,U);else throw new Error(pt)},setInput:function(X,pt){return this.yy=pt||this.yy||{},this._input=X,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var X=this._input[0];this.yytext+=X,this.yyleng++,this.offset++,this.match+=X,this.matched+=X;var pt=X.match(/(?:\r\n?|\n).*/g);return pt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),X},unput:function(X){var pt=X.length,U=X.split(/(?:\r\n?|\n)/g);this._input=X+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-pt),this.offset-=pt;var xt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),U.length-1&&(this.yylineno-=U.length-1);var nt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:U?(U.length===xt.length?this.yylloc.first_column:0)+xt[xt.length-U.length].length-U[0].length:this.yylloc.first_column-pt},this.options.ranges&&(this.yylloc.range=[nt[0],nt[0]+this.yyleng-pt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(X){this.unput(this.match.slice(X))},pastInput:function(){var X=this.matched.substr(0,this.matched.length-this.match.length);return(X.length>20?"...":"")+X.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var X=this.match;return X.length<20&&(X+=this._input.substr(0,20-X.length)),(X.substr(0,20)+(X.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var X=this.pastInput(),pt=new Array(X.length+1).join("-");return X+this.upcomingInput()+` +`+pt+"^"},test_match:function(X,pt){var U,xt,nt;if(this.options.backtrack_lexer&&(nt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(nt.yylloc.range=this.yylloc.range.slice(0))),xt=X[0].match(/(?:\r\n?|\n).*/g),xt&&(this.yylineno+=xt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:xt?xt[xt.length-1].length-xt[xt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+X[0].length},this.yytext+=X[0],this.match+=X[0],this.matches=X,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(X[0].length),this.matched+=X[0],U=this.performAction.call(this,this.yy,this,pt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),U)return U;if(this._backtrack){for(var Ot in nt)this[Ot]=nt[Ot];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var X,pt,U,xt;this._more||(this.yytext="",this.match="");for(var nt=this._currentRules(),Ot=0;Otpt[0].length)){if(pt=U,xt=Ot,this.options.backtrack_lexer){if(X=this.test_match(U,nt[Ot]),X!==!1)return X;if(this._backtrack){pt=!1;continue}else return!1}else if(!this.options.flex)break}return pt?(X=this.test_match(pt,nt[xt]),X!==!1?X:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var pt=this.next();return pt||this.lex()},begin:function(pt){this.conditionStack.push(pt)},popState:function(){var pt=this.conditionStack.length-1;return pt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(pt){return pt=this.conditionStack.length-1-Math.abs(pt||0),pt>=0?this.conditionStack[pt]:"INITIAL"},pushState:function(pt){this.begin(pt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(pt,U,xt,nt){switch(xt){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return U.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return U.yytext[0];case 55:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return wt}();yt.lexer=dt;function ht(){this.yy={}}return ht.prototype=yt,yt.Parser=ht,new ht}();O0t.parser=O0t;const P$e=O0t;let hk={},N0t=[];const F$e={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},B$e={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},DBt=function(i,a=void 0){return hk[i]===void 0?(hk[i]={attributes:[],alias:a},Ut.info("Added new entity :",i)):hk[i]&&!hk[i].alias&&a&&(hk[i].alias=a,Ut.info(`Add alias '${a}' to entity '${i}'`)),hk[i]},R$e={Cardinality:F$e,Identification:B$e,getConfig:()=>Le().er,addEntity:DBt,addAttributes:function(i,a){let f=DBt(i),p;for(p=a.length-1;p>=0;p--)f.attributes.push(a[p]),Ut.debug("Added attribute ",a[p].attributeName)},getEntities:()=>hk,addRelationship:function(i,a,f,p){let v={entityA:i,roleA:a,entityB:f,relSpec:p};N0t.push(v),Ut.debug("Added new relationship :",v)},getRelationships:()=>N0t,clear:function(){hk={},N0t=[],ap()},setAccTitle:cg,getAccTitle:op,setAccDescription:cp,getAccDescription:up,setDiagramTitle:Z2,getDiagramTitle:Db},um={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},lm={ERMarkers:um,insertMarkers:function(i,a){let f;i.append("defs").append("marker").attr("id",um.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",um.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",um.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),i.append("defs").append("marker").attr("id",um.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),f=i.append("defs").append("marker").attr("id",um.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M9,0 L9,18"),f=i.append("defs").append("marker").attr("id",um.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M21,0 L21,18"),i.append("defs").append("marker").attr("id",um.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),i.append("defs").append("marker").attr("id",um.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),f=i.append("defs").append("marker").attr("id",um.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),f=i.append("defs").append("marker").attr("id",um.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}},j$e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function $$e(i){return typeof i=="string"&&j$e.test(i)}const Pd=[];for(let i=0;i<256;++i)Pd.push((i+256).toString(16).slice(1));function z$e(i,a=0){return(Pd[i[a+0]]+Pd[i[a+1]]+Pd[i[a+2]]+Pd[i[a+3]]+"-"+Pd[i[a+4]]+Pd[i[a+5]]+"-"+Pd[i[a+6]]+Pd[i[a+7]]+"-"+Pd[i[a+8]]+Pd[i[a+9]]+"-"+Pd[i[a+10]]+Pd[i[a+11]]+Pd[i[a+12]]+Pd[i[a+13]]+Pd[i[a+14]]+Pd[i[a+15]]).toLowerCase()}function q$e(i){if(!$$e(i))throw TypeError("Invalid UUID");let a;const f=new Uint8Array(16);return f[0]=(a=parseInt(i.slice(0,8),16))>>>24,f[1]=a>>>16&255,f[2]=a>>>8&255,f[3]=a&255,f[4]=(a=parseInt(i.slice(9,13),16))>>>8,f[5]=a&255,f[6]=(a=parseInt(i.slice(14,18),16))>>>8,f[7]=a&255,f[8]=(a=parseInt(i.slice(19,23),16))>>>8,f[9]=a&255,f[10]=(a=parseInt(i.slice(24,36),16))/1099511627776&255,f[11]=a/4294967296&255,f[12]=a>>>24&255,f[13]=a>>>16&255,f[14]=a>>>8&255,f[15]=a&255,f}function H$e(i){i=unescape(encodeURIComponent(i));const a=[];for(let f=0;f>>32-a}function K$e(i){const a=[1518500249,1859775393,2400959708,3395469782],f=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const b=unescape(encodeURIComponent(i));i=[];for(let E=0;E>>0;j=B,B=N,N=P0t(L,30)>>>0,L=_,_=K}f[0]=f[0]+_>>>0,f[1]=f[1]+L>>>0,f[2]=f[2]+N>>>0,f[3]=f[3]+B>>>0,f[4]=f[4]+j>>>0}return[f[0]>>24&255,f[0]>>16&255,f[0]>>8&255,f[0]&255,f[1]>>24&255,f[1]>>16&255,f[1]>>8&255,f[1]&255,f[2]>>24&255,f[2]>>16&255,f[2]>>8&255,f[2]&255,f[3]>>24&255,f[3]>>16&255,f[3]>>8&255,f[3]&255,f[4]>>24&255,f[4]>>16&255,f[4]>>8&255,f[4]&255]}const Y$e=U$e("v5",80,K$e),X$e=/[^\dA-Za-z](\W)*/g;let o1={},yP=new Map;const Q$e=function(i){const a=Object.keys(i);for(const f of a)o1[f]=i[f]},Z$e=(i,a,f)=>{const p=o1.entityPadding/3,v=o1.entityPadding/3,m=o1.fontSize*.85,b=a.node().getBBox(),E=[];let _=!1,L=!1,N=0,B=0,j=0,R=0,z=b.height+p*2,K=1;f.forEach(bt=>{bt.attributeKeyTypeList!==void 0&&bt.attributeKeyTypeList.length>0&&(_=!0),bt.attributeComment!==void 0&&(L=!0)}),f.forEach(bt=>{const mt=`${a.node().id}-attr-${K}`;let yt=0;const dt=zN(bt.attributeType),ht=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Le().fontFamily).style("font-size",m+"px").text(dt),wt=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Le().fontFamily).style("font-size",m+"px").text(bt.attributeName),X={};X.tn=ht,X.nn=wt;const pt=ht.node().getBBox(),U=wt.node().getBBox();if(N=Math.max(N,pt.width),B=Math.max(B,U.width),yt=Math.max(pt.height,U.height),_){const xt=bt.attributeKeyTypeList!==void 0?bt.attributeKeyTypeList.join(","):"",nt=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Le().fontFamily).style("font-size",m+"px").text(xt);X.kn=nt;const Ot=nt.node().getBBox();j=Math.max(j,Ot.width),yt=Math.max(yt,Ot.height)}if(L){const xt=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Le().fontFamily).style("font-size",m+"px").text(bt.attributeComment||"");X.cn=xt;const nt=xt.node().getBBox();R=Math.max(R,nt.width),yt=Math.max(yt,nt.height)}X.height=yt,E.push(X),z+=yt+p*2,K+=1});let it=4;_&&(it+=2),L&&(it+=2);const st=N+B+j+R,ut={width:Math.max(o1.minEntityWidth,Math.max(b.width+o1.entityPadding*2,st+v*it)),height:f.length>0?z:Math.max(o1.minEntityHeight,b.height+o1.entityPadding*2)};if(f.length>0){const bt=Math.max(0,(ut.width-st-v*it)/(it/2));a.attr("transform","translate("+ut.width/2+","+(p+b.height/2)+")");let mt=b.height+p*2,yt="attributeBoxOdd";E.forEach(dt=>{const ht=mt+p+dt.height/2;dt.tn.attr("transform","translate("+v+","+ht+")");const wt=i.insert("rect","#"+dt.tn.node().id).classed(`er ${yt}`,!0).attr("x",0).attr("y",mt).attr("width",N+v*2+bt).attr("height",dt.height+p*2),X=parseFloat(wt.attr("x"))+parseFloat(wt.attr("width"));dt.nn.attr("transform","translate("+(X+v)+","+ht+")");const pt=i.insert("rect","#"+dt.nn.node().id).classed(`er ${yt}`,!0).attr("x",X).attr("y",mt).attr("width",B+v*2+bt).attr("height",dt.height+p*2);let U=parseFloat(pt.attr("x"))+parseFloat(pt.attr("width"));if(_){dt.kn.attr("transform","translate("+(U+v)+","+ht+")");const xt=i.insert("rect","#"+dt.kn.node().id).classed(`er ${yt}`,!0).attr("x",U).attr("y",mt).attr("width",j+v*2+bt).attr("height",dt.height+p*2);U=parseFloat(xt.attr("x"))+parseFloat(xt.attr("width"))}L&&(dt.cn.attr("transform","translate("+(U+v)+","+ht+")"),i.insert("rect","#"+dt.cn.node().id).classed(`er ${yt}`,"true").attr("x",U).attr("y",mt).attr("width",R+v*2+bt).attr("height",dt.height+p*2)),mt+=dt.height+p*2,yt=yt==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else ut.height=Math.max(o1.minEntityHeight,z),a.attr("transform","translate("+ut.width/2+","+ut.height/2+")");return ut},J$e=function(i,a,f){const p=Object.keys(a);let v;return p.forEach(function(m){const b=sze(m,"entity");yP.set(m,b);const E=i.append("g").attr("id",b);v=v===void 0?b:v;const _="text-"+b,L=E.append("text").classed("er entityLabel",!0).attr("id",_).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",Le().fontFamily).style("font-size",o1.fontSize+"px").text(a[m].alias??m),{width:N,height:B}=Z$e(E,L,a[m].attributes),R=E.insert("rect","#"+_).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",N).attr("height",B).node().getBBox();f.setNode(b,{width:R.width,height:R.height,shape:"rect",id:b})}),v},tze=function(i,a){a.nodes().forEach(function(f){f!==void 0&&a.node(f)!==void 0&&i.select("#"+f).attr("transform","translate("+(a.node(f).x-a.node(f).width/2)+","+(a.node(f).y-a.node(f).height/2)+" )")})},OBt=function(i){return(i.entityA+i.roleA+i.entityB).replace(/\s/g,"")},eze=function(i,a){return i.forEach(function(f){a.setEdge(yP.get(f.entityA),yP.get(f.entityB),{relationship:f},OBt(f))}),i};let NBt=0;const nze=function(i,a,f,p,v){NBt++;const m=f.edge(yP.get(a.entityA),yP.get(a.entityB),OBt(a)),b=Z7().x(function(z){return z.x}).y(function(z){return z.y}).curve(FN),E=i.insert("path","#"+p).classed("er relationshipLine",!0).attr("d",b(m.points)).style("stroke",o1.stroke).style("fill","none");a.relSpec.relType===v.db.Identification.NON_IDENTIFYING&&E.attr("stroke-dasharray","8,8");let _="";switch(o1.arrowMarkerAbsolute&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),a.relSpec.cardA){case v.db.Cardinality.ZERO_OR_ONE:E.attr("marker-end","url("+_+"#"+lm.ERMarkers.ZERO_OR_ONE_END+")");break;case v.db.Cardinality.ZERO_OR_MORE:E.attr("marker-end","url("+_+"#"+lm.ERMarkers.ZERO_OR_MORE_END+")");break;case v.db.Cardinality.ONE_OR_MORE:E.attr("marker-end","url("+_+"#"+lm.ERMarkers.ONE_OR_MORE_END+")");break;case v.db.Cardinality.ONLY_ONE:E.attr("marker-end","url("+_+"#"+lm.ERMarkers.ONLY_ONE_END+")");break;case v.db.Cardinality.MD_PARENT:E.attr("marker-end","url("+_+"#"+lm.ERMarkers.MD_PARENT_END+")");break}switch(a.relSpec.cardB){case v.db.Cardinality.ZERO_OR_ONE:E.attr("marker-start","url("+_+"#"+lm.ERMarkers.ZERO_OR_ONE_START+")");break;case v.db.Cardinality.ZERO_OR_MORE:E.attr("marker-start","url("+_+"#"+lm.ERMarkers.ZERO_OR_MORE_START+")");break;case v.db.Cardinality.ONE_OR_MORE:E.attr("marker-start","url("+_+"#"+lm.ERMarkers.ONE_OR_MORE_START+")");break;case v.db.Cardinality.ONLY_ONE:E.attr("marker-start","url("+_+"#"+lm.ERMarkers.ONLY_ONE_START+")");break;case v.db.Cardinality.MD_PARENT:E.attr("marker-start","url("+_+"#"+lm.ERMarkers.MD_PARENT_START+")");break}const L=E.node().getTotalLength(),N=E.node().getPointAtLength(L*.5),B="rel"+NBt,R=i.append("text").classed("er relationshipLabel",!0).attr("id",B).attr("x",N.x).attr("y",N.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",Le().fontFamily).style("font-size",o1.fontSize+"px").text(a.roleA).node().getBBox();i.insert("rect","#"+B).classed("er relationshipLabelBox",!0).attr("x",N.x-R.width/2).attr("y",N.y-R.height/2).attr("width",R.width).attr("height",R.height)},rze=function(i,a,f,p){o1=Le().er,Ut.info("Drawing ER diagram");const v=Le().securityLevel;let m;v==="sandbox"&&(m=yr("#i"+a));const E=yr(v==="sandbox"?m.nodes()[0].contentDocument.body:"body").select(`[id='${a}']`);lm.insertMarkers(E,o1);let _;_=new a1({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:o1.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const L=J$e(E,p.db.getEntities(),_),N=eze(p.db.getRelationships(),_);eL(_),tze(E,_),N.forEach(function(K){nze(E,K,_,L,p)});const B=o1.diagramPadding;$a.insertTitle(E,"entityTitleText",o1.titleTopMargin,p.db.getDiagramTitle());const j=E.node().getBBox(),R=j.width+B*2,z=j.height+B*2;og(E,z,R,o1.useMaxWidth),E.attr("viewBox",`${j.x-B} ${j.y-B} ${R} ${z}`)},ize="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function sze(i="",a=""){const f=i.replace(X$e,"");return`${PBt(a)}${PBt(f)}${Y$e(i,ize)}`}function PBt(i=""){return i.length>0?`${i}-`:""}const aze=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:P$e,db:R$e,renderer:{setConf:Q$e,draw:rze},styles:i=>` + .entityBox { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${i.attributeBackgroundColorOdd}; + stroke: ${i.nodeBorder}; + } + + .attributeBoxEven { + fill: ${i.attributeBackgroundColorEven}; + stroke: ${i.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${i.tertiaryColor}; + opacity: 0.7; + background-color: ${i.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${i.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${i.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; + } + +`}},Symbol.toStringTag,{value:"Module"}));var F0t=function(){var i=function(yt,dt,ht,wt){for(ht=ht||{},wt=yt.length;wt--;ht[yt[wt]]=dt);return ht},a=[1,3],f=[1,6],p=[1,4],v=[1,5],m=[2,5],b=[1,12],E=[5,7,13,19,21,23,24,26,28,31,36,39,46],_=[7,13,19,21,23,24,26,28,31,36,39],L=[7,12,13,19,21,23,24,26,28,31,36,39],N=[7,13,46],B=[1,42],j=[1,41],R=[7,13,29,32,34,37,46],z=[1,55],K=[1,56],it=[1,57],st=[7,13,32,34,41,46],ut={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,COMMIT_TAG:34,EMPTYSTR:35,MERGE:36,COMMIT_TYPE:37,commitType:38,COMMIT:39,commit_arg:40,COMMIT_MSG:41,NORMAL:42,REVERSE:43,HIGHLIGHT:44,ID:45,";":46,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"COMMIT_TAG",35:"EMPTYSTR",36:"MERGE",37:"COMMIT_TYPE",39:"COMMIT",41:"COMMIT_MSG",42:"NORMAL",43:"REVERSE",44:"HIGHLIGHT",45:"ID",46:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,5],[18,5],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[40,0],[40,1],[38,1],[38,1],[38,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(dt,ht,wt,X,pt,U,xt){var nt=U.length-1;switch(pt){case 2:return U[nt];case 3:return U[nt-1];case 4:return X.setDirection(U[nt-3]),U[nt-1];case 6:X.setOptions(U[nt-1]),this.$=U[nt];break;case 7:U[nt-1]+=U[nt],this.$=U[nt-1];break;case 9:this.$=[];break;case 10:U[nt-1].push(U[nt]),this.$=U[nt-1];break;case 11:this.$=U[nt-1];break;case 16:this.$=U[nt].trim(),X.setAccTitle(this.$);break;case 17:case 18:this.$=U[nt].trim(),X.setAccDescription(this.$);break;case 19:X.addSection(U[nt].substr(8)),this.$=U[nt].substr(8);break;case 21:X.checkout(U[nt]);break;case 22:X.branch(U[nt]);break;case 23:X.branch(U[nt-2],U[nt]);break;case 24:X.cherryPick(U[nt],"",void 0);break;case 25:X.cherryPick(U[nt-2],"",U[nt]);break;case 26:case 28:X.cherryPick(U[nt-2],"","");break;case 27:X.cherryPick(U[nt],"",U[nt-2]);break;case 29:X.merge(U[nt],"","","");break;case 30:X.merge(U[nt-2],U[nt],"","");break;case 31:X.merge(U[nt-2],"",U[nt],"");break;case 32:X.merge(U[nt-2],"","",U[nt]);break;case 33:X.merge(U[nt-4],U[nt],"",U[nt-2]);break;case 34:X.merge(U[nt-4],"",U[nt],U[nt-2]);break;case 35:X.merge(U[nt-4],"",U[nt-2],U[nt]);break;case 36:X.merge(U[nt-4],U[nt-2],U[nt],"");break;case 37:X.merge(U[nt-4],U[nt-2],"",U[nt]);break;case 38:X.merge(U[nt-4],U[nt],U[nt-2],"");break;case 39:X.merge(U[nt-6],U[nt-4],U[nt-2],U[nt]);break;case 40:X.merge(U[nt-6],U[nt],U[nt-4],U[nt-2]);break;case 41:X.merge(U[nt-6],U[nt-4],U[nt],U[nt-2]);break;case 42:X.merge(U[nt-6],U[nt-2],U[nt-4],U[nt]);break;case 43:X.merge(U[nt-6],U[nt],U[nt-2],U[nt-4]);break;case 44:X.merge(U[nt-6],U[nt-2],U[nt],U[nt-4]);break;case 45:X.commit(U[nt]);break;case 46:X.commit("","",X.commitType.NORMAL,U[nt]);break;case 47:X.commit("","",U[nt],"");break;case 48:X.commit("","",U[nt],U[nt-2]);break;case 49:X.commit("","",U[nt-2],U[nt]);break;case 50:X.commit("",U[nt],X.commitType.NORMAL,"");break;case 51:X.commit("",U[nt-2],X.commitType.NORMAL,U[nt]);break;case 52:X.commit("",U[nt],X.commitType.NORMAL,U[nt-2]);break;case 53:X.commit("",U[nt-2],U[nt],"");break;case 54:X.commit("",U[nt],U[nt-2],"");break;case 55:X.commit("",U[nt-4],U[nt-2],U[nt]);break;case 56:X.commit("",U[nt-4],U[nt],U[nt-2]);break;case 57:X.commit("",U[nt-2],U[nt-4],U[nt]);break;case 58:X.commit("",U[nt],U[nt-4],U[nt-2]);break;case 59:X.commit("",U[nt],U[nt-2],U[nt-4]);break;case 60:X.commit("",U[nt-2],U[nt],U[nt-4]);break;case 61:X.commit(U[nt],"",X.commitType.NORMAL,"");break;case 62:X.commit(U[nt],"",X.commitType.NORMAL,U[nt-2]);break;case 63:X.commit(U[nt-2],"",X.commitType.NORMAL,U[nt]);break;case 64:X.commit(U[nt-2],"",U[nt],"");break;case 65:X.commit(U[nt],"",U[nt-2],"");break;case 66:X.commit(U[nt],U[nt-2],X.commitType.NORMAL,"");break;case 67:X.commit(U[nt-2],U[nt],X.commitType.NORMAL,"");break;case 68:X.commit(U[nt-4],"",U[nt-2],U[nt]);break;case 69:X.commit(U[nt-4],"",U[nt],U[nt-2]);break;case 70:X.commit(U[nt-2],"",U[nt-4],U[nt]);break;case 71:X.commit(U[nt],"",U[nt-4],U[nt-2]);break;case 72:X.commit(U[nt],"",U[nt-2],U[nt-4]);break;case 73:X.commit(U[nt-2],"",U[nt],U[nt-4]);break;case 74:X.commit(U[nt-4],U[nt],U[nt-2],"");break;case 75:X.commit(U[nt-4],U[nt-2],U[nt],"");break;case 76:X.commit(U[nt-2],U[nt],U[nt-4],"");break;case 77:X.commit(U[nt],U[nt-2],U[nt-4],"");break;case 78:X.commit(U[nt],U[nt-4],U[nt-2],"");break;case 79:X.commit(U[nt-2],U[nt-4],U[nt],"");break;case 80:X.commit(U[nt-4],U[nt],X.commitType.NORMAL,U[nt-2]);break;case 81:X.commit(U[nt-4],U[nt-2],X.commitType.NORMAL,U[nt]);break;case 82:X.commit(U[nt-2],U[nt],X.commitType.NORMAL,U[nt-4]);break;case 83:X.commit(U[nt],U[nt-2],X.commitType.NORMAL,U[nt-4]);break;case 84:X.commit(U[nt],U[nt-4],X.commitType.NORMAL,U[nt-2]);break;case 85:X.commit(U[nt-2],U[nt-4],X.commitType.NORMAL,U[nt]);break;case 86:X.commit(U[nt-6],U[nt-4],U[nt-2],U[nt]);break;case 87:X.commit(U[nt-6],U[nt-4],U[nt],U[nt-2]);break;case 88:X.commit(U[nt-6],U[nt-2],U[nt-4],U[nt]);break;case 89:X.commit(U[nt-6],U[nt],U[nt-4],U[nt-2]);break;case 90:X.commit(U[nt-6],U[nt-2],U[nt],U[nt-4]);break;case 91:X.commit(U[nt-6],U[nt],U[nt-2],U[nt-4]);break;case 92:X.commit(U[nt-4],U[nt-6],U[nt-2],U[nt]);break;case 93:X.commit(U[nt-4],U[nt-6],U[nt],U[nt-2]);break;case 94:X.commit(U[nt-2],U[nt-6],U[nt-4],U[nt]);break;case 95:X.commit(U[nt],U[nt-6],U[nt-4],U[nt-2]);break;case 96:X.commit(U[nt-2],U[nt-6],U[nt],U[nt-4]);break;case 97:X.commit(U[nt],U[nt-6],U[nt-2],U[nt-4]);break;case 98:X.commit(U[nt],U[nt-4],U[nt-2],U[nt-6]);break;case 99:X.commit(U[nt-2],U[nt-4],U[nt],U[nt-6]);break;case 100:X.commit(U[nt],U[nt-2],U[nt-4],U[nt-6]);break;case 101:X.commit(U[nt-2],U[nt],U[nt-4],U[nt-6]);break;case 102:X.commit(U[nt-4],U[nt-2],U[nt],U[nt-6]);break;case 103:X.commit(U[nt-4],U[nt],U[nt-2],U[nt-6]);break;case 104:X.commit(U[nt-2],U[nt-4],U[nt-6],U[nt]);break;case 105:X.commit(U[nt],U[nt-4],U[nt-6],U[nt-2]);break;case 106:X.commit(U[nt-2],U[nt],U[nt-6],U[nt-4]);break;case 107:X.commit(U[nt],U[nt-2],U[nt-6],U[nt-4]);break;case 108:X.commit(U[nt-4],U[nt-2],U[nt-6],U[nt]);break;case 109:X.commit(U[nt-4],U[nt],U[nt-6],U[nt-2]);break;case 110:this.$="";break;case 111:this.$=U[nt];break;case 112:this.$=X.commitType.NORMAL;break;case 113:this.$=X.commitType.REVERSE;break;case 114:this.$=X.commitType.HIGHLIGHT;break}},table:[{3:1,4:2,5:a,7:f,13:p,46:v},{1:[3]},{3:7,4:2,5:a,7:f,13:p,46:v},{6:8,7:m,8:[1,9],9:[1,10],10:11,13:b},i(E,[2,117]),i(E,[2,118]),i(E,[2,119]),{1:[2,1]},{7:[1,13]},{6:14,7:m,10:11,13:b},{8:[1,15]},i(_,[2,9],{11:16,12:[1,17]}),i(L,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:m,10:11,13:b},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],36:[1,33],39:[1,32]},i(L,[2,7]),{1:[2,3]},{7:[1,36]},i(_,[2,10]),{4:37,7:f,13:p,46:v},i(_,[2,12]),i(N,[2,13]),i(N,[2,14]),i(N,[2,15]),{20:[1,38]},{22:[1,39]},i(N,[2,18]),i(N,[2,19]),i(N,[2,20]),{27:40,33:B,45:j},i(N,[2,110],{40:43,32:[1,46],33:[1,48],34:[1,44],37:[1,45],41:[1,47]}),{27:49,33:B,45:j},{32:[1,50],34:[1,51]},{27:52,33:B,45:j},{1:[2,4]},i(_,[2,11]),i(N,[2,16]),i(N,[2,17]),i(N,[2,21]),i(R,[2,115]),i(R,[2,116]),i(N,[2,45]),{33:[1,53]},{38:54,42:z,43:K,44:it},{33:[1,58]},{33:[1,59]},i(N,[2,111]),i(N,[2,29],{32:[1,60],34:[1,62],37:[1,61]}),{33:[1,63]},{33:[1,64],35:[1,65]},i(N,[2,22],{29:[1,66]}),i(N,[2,46],{32:[1,68],37:[1,67],41:[1,69]}),i(N,[2,47],{32:[1,71],34:[1,70],41:[1,72]}),i(st,[2,112]),i(st,[2,113]),i(st,[2,114]),i(N,[2,50],{34:[1,73],37:[1,74],41:[1,75]}),i(N,[2,61],{32:[1,78],34:[1,76],37:[1,77]}),{33:[1,79]},{38:80,42:z,43:K,44:it},{33:[1,81]},i(N,[2,24],{34:[1,82]}),{32:[1,83]},{32:[1,84]},{30:[1,85]},{38:86,42:z,43:K,44:it},{33:[1,87]},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{38:93,42:z,43:K,44:it},{33:[1,94]},{33:[1,95]},{38:96,42:z,43:K,44:it},{33:[1,97]},i(N,[2,30],{34:[1,99],37:[1,98]}),i(N,[2,31],{32:[1,101],34:[1,100]}),i(N,[2,32],{32:[1,102],37:[1,103]}),{33:[1,104],35:[1,105]},{33:[1,106]},{33:[1,107]},i(N,[2,23]),i(N,[2,48],{32:[1,108],41:[1,109]}),i(N,[2,52],{37:[1,110],41:[1,111]}),i(N,[2,62],{32:[1,113],37:[1,112]}),i(N,[2,49],{32:[1,114],41:[1,115]}),i(N,[2,54],{34:[1,116],41:[1,117]}),i(N,[2,65],{32:[1,119],34:[1,118]}),i(N,[2,51],{37:[1,120],41:[1,121]}),i(N,[2,53],{34:[1,122],41:[1,123]}),i(N,[2,66],{34:[1,125],37:[1,124]}),i(N,[2,63],{32:[1,127],37:[1,126]}),i(N,[2,64],{32:[1,129],34:[1,128]}),i(N,[2,67],{34:[1,131],37:[1,130]}),{38:132,42:z,43:K,44:it},{33:[1,133]},{33:[1,134]},{33:[1,135]},{33:[1,136]},{38:137,42:z,43:K,44:it},i(N,[2,25]),i(N,[2,26]),i(N,[2,27]),i(N,[2,28]),{33:[1,138]},{33:[1,139]},{38:140,42:z,43:K,44:it},{33:[1,141]},{38:142,42:z,43:K,44:it},{33:[1,143]},{33:[1,144]},{33:[1,145]},{33:[1,146]},{33:[1,147]},{33:[1,148]},{33:[1,149]},{38:150,42:z,43:K,44:it},{33:[1,151]},{33:[1,152]},{33:[1,153]},{38:154,42:z,43:K,44:it},{33:[1,155]},{38:156,42:z,43:K,44:it},{33:[1,157]},{33:[1,158]},{33:[1,159]},{38:160,42:z,43:K,44:it},{33:[1,161]},i(N,[2,36],{34:[1,162]}),i(N,[2,37],{37:[1,163]}),i(N,[2,35],{32:[1,164]}),i(N,[2,38],{34:[1,165]}),i(N,[2,33],{37:[1,166]}),i(N,[2,34],{32:[1,167]}),i(N,[2,59],{41:[1,168]}),i(N,[2,72],{32:[1,169]}),i(N,[2,60],{41:[1,170]}),i(N,[2,83],{37:[1,171]}),i(N,[2,73],{32:[1,172]}),i(N,[2,82],{37:[1,173]}),i(N,[2,58],{41:[1,174]}),i(N,[2,71],{32:[1,175]}),i(N,[2,57],{41:[1,176]}),i(N,[2,77],{34:[1,177]}),i(N,[2,70],{32:[1,178]}),i(N,[2,76],{34:[1,179]}),i(N,[2,56],{41:[1,180]}),i(N,[2,84],{37:[1,181]}),i(N,[2,55],{41:[1,182]}),i(N,[2,78],{34:[1,183]}),i(N,[2,79],{34:[1,184]}),i(N,[2,85],{37:[1,185]}),i(N,[2,69],{32:[1,186]}),i(N,[2,80],{37:[1,187]}),i(N,[2,68],{32:[1,188]}),i(N,[2,74],{34:[1,189]}),i(N,[2,75],{34:[1,190]}),i(N,[2,81],{37:[1,191]}),{33:[1,192]},{38:193,42:z,43:K,44:it},{33:[1,194]},{33:[1,195]},{38:196,42:z,43:K,44:it},{33:[1,197]},{33:[1,198]},{33:[1,199]},{33:[1,200]},{38:201,42:z,43:K,44:it},{33:[1,202]},{38:203,42:z,43:K,44:it},{33:[1,204]},{33:[1,205]},{33:[1,206]},{33:[1,207]},{33:[1,208]},{33:[1,209]},{33:[1,210]},{38:211,42:z,43:K,44:it},{33:[1,212]},{33:[1,213]},{33:[1,214]},{38:215,42:z,43:K,44:it},{33:[1,216]},{38:217,42:z,43:K,44:it},{33:[1,218]},{33:[1,219]},{33:[1,220]},{38:221,42:z,43:K,44:it},i(N,[2,39]),i(N,[2,41]),i(N,[2,40]),i(N,[2,42]),i(N,[2,44]),i(N,[2,43]),i(N,[2,100]),i(N,[2,101]),i(N,[2,98]),i(N,[2,99]),i(N,[2,103]),i(N,[2,102]),i(N,[2,107]),i(N,[2,106]),i(N,[2,105]),i(N,[2,104]),i(N,[2,109]),i(N,[2,108]),i(N,[2,97]),i(N,[2,96]),i(N,[2,95]),i(N,[2,94]),i(N,[2,92]),i(N,[2,93]),i(N,[2,91]),i(N,[2,90]),i(N,[2,89]),i(N,[2,88]),i(N,[2,86]),i(N,[2,87])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(dt,ht){if(ht.recoverable)this.trace(dt);else{var wt=new Error(dt);throw wt.hash=ht,wt}},parse:function(dt){var ht=this,wt=[0],X=[],pt=[null],U=[],xt=this.table,nt="",Ot=0,Nt=0,qt=2,Ct=1,Z=U.slice.call(arguments,1),Tt=Object.create(this.lexer),Ht={yy:{}};for(var It in this.yy)Object.prototype.hasOwnProperty.call(this.yy,It)&&(Ht.yy[It]=this.yy[It]);Tt.setInput(dt,Ht.yy),Ht.yy.lexer=Tt,Ht.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var Ft=Tt.yylloc;U.push(Ft);var ke=Tt.options&&Tt.options.ranges;typeof Ht.yy.parseError=="function"?this.parseError=Ht.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pn(){var oe;return oe=X.pop()||Tt.lex()||Ct,typeof oe!="number"&&(oe instanceof Array&&(X=oe,oe=X.pop()),oe=ht.symbols_[oe]||oe),oe}for(var Me,ve,Ge,Ke,we={},_e,$t,re,ie;;){if(ve=wt[wt.length-1],this.defaultActions[ve]?Ge=this.defaultActions[ve]:((Me===null||typeof Me>"u")&&(Me=pn()),Ge=xt[ve]&&xt[ve][Me]),typeof Ge>"u"||!Ge.length||!Ge[0]){var Oe="";ie=[];for(_e in xt[ve])this.terminals_[_e]&&_e>qt&&ie.push("'"+this.terminals_[_e]+"'");Tt.showPosition?Oe="Parse error on line "+(Ot+1)+`: +`+Tt.showPosition()+` +Expecting `+ie.join(", ")+", got '"+(this.terminals_[Me]||Me)+"'":Oe="Parse error on line "+(Ot+1)+": Unexpected "+(Me==Ct?"end of input":"'"+(this.terminals_[Me]||Me)+"'"),this.parseError(Oe,{text:Tt.match,token:this.terminals_[Me]||Me,line:Tt.yylineno,loc:Ft,expected:ie})}if(Ge[0]instanceof Array&&Ge.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ve+", token: "+Me);switch(Ge[0]){case 1:wt.push(Me),pt.push(Tt.yytext),U.push(Tt.yylloc),wt.push(Ge[1]),Me=null,Nt=Tt.yyleng,nt=Tt.yytext,Ot=Tt.yylineno,Ft=Tt.yylloc;break;case 2:if($t=this.productions_[Ge[1]][1],we.$=pt[pt.length-$t],we._$={first_line:U[U.length-($t||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-($t||1)].first_column,last_column:U[U.length-1].last_column},ke&&(we._$.range=[U[U.length-($t||1)].range[0],U[U.length-1].range[1]]),Ke=this.performAction.apply(we,[nt,Nt,Ot,Ht.yy,Ge[1],pt,U].concat(Z)),typeof Ke<"u")return Ke;$t&&(wt=wt.slice(0,-1*$t*2),pt=pt.slice(0,-1*$t),U=U.slice(0,-1*$t)),wt.push(this.productions_[Ge[1]][0]),pt.push(we.$),U.push(we._$),re=xt[wt[wt.length-2]][wt[wt.length-1]],wt.push(re);break;case 3:return!0}}return!0}},bt=function(){var yt={EOF:1,parseError:function(ht,wt){if(this.yy.parser)this.yy.parser.parseError(ht,wt);else throw new Error(ht)},setInput:function(dt,ht){return this.yy=ht||this.yy||{},this._input=dt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var dt=this._input[0];this.yytext+=dt,this.yyleng++,this.offset++,this.match+=dt,this.matched+=dt;var ht=dt.match(/(?:\r\n?|\n).*/g);return ht?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),dt},unput:function(dt){var ht=dt.length,wt=dt.split(/(?:\r\n?|\n)/g);this._input=dt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ht),this.offset-=ht;var X=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),wt.length-1&&(this.yylineno-=wt.length-1);var pt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:wt?(wt.length===X.length?this.yylloc.first_column:0)+X[X.length-wt.length].length-wt[0].length:this.yylloc.first_column-ht},this.options.ranges&&(this.yylloc.range=[pt[0],pt[0]+this.yyleng-ht]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(dt){this.unput(this.match.slice(dt))},pastInput:function(){var dt=this.matched.substr(0,this.matched.length-this.match.length);return(dt.length>20?"...":"")+dt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var dt=this.match;return dt.length<20&&(dt+=this._input.substr(0,20-dt.length)),(dt.substr(0,20)+(dt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var dt=this.pastInput(),ht=new Array(dt.length+1).join("-");return dt+this.upcomingInput()+` +`+ht+"^"},test_match:function(dt,ht){var wt,X,pt;if(this.options.backtrack_lexer&&(pt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pt.yylloc.range=this.yylloc.range.slice(0))),X=dt[0].match(/(?:\r\n?|\n).*/g),X&&(this.yylineno+=X.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:X?X[X.length-1].length-X[X.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+dt[0].length},this.yytext+=dt[0],this.match+=dt[0],this.matches=dt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(dt[0].length),this.matched+=dt[0],wt=this.performAction.call(this,this.yy,this,ht,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),wt)return wt;if(this._backtrack){for(var U in pt)this[U]=pt[U];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var dt,ht,wt,X;this._more||(this.yytext="",this.match="");for(var pt=this._currentRules(),U=0;Uht[0].length)){if(ht=wt,X=U,this.options.backtrack_lexer){if(dt=this.test_match(wt,pt[U]),dt!==!1)return dt;if(this._backtrack){ht=!1;continue}else return!1}else if(!this.options.flex)break}return ht?(dt=this.test_match(ht,pt[X]),dt!==!1?dt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ht=this.next();return ht||this.lex()},begin:function(ht){this.conditionStack.push(ht)},popState:function(){var ht=this.conditionStack.length-1;return ht>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ht){return ht=this.conditionStack.length-1-Math.abs(ht||0),ht>=0?this.conditionStack[ht]:"INITIAL"},pushState:function(ht){this.begin(ht)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(ht,wt,X,pt){switch(X){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:break;case 9:break;case 10:return 5;case 11:return 39;case 12:return 32;case 13:return 37;case 14:return 41;case 15:return 42;case 16:return 43;case 17:return 44;case 18:return 34;case 19:return 28;case 20:return 29;case 21:return 36;case 22:return 31;case 23:return 26;case 24:return 9;case 25:return 9;case 26:return 8;case 27:return"CARET";case 28:this.begin("options");break;case 29:this.popState();break;case 30:return 12;case 31:return 35;case 32:this.begin("string");break;case 33:this.popState();break;case 34:return 33;case 35:return 30;case 36:return 45;case 37:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[29,30],inclusive:!1},string:{rules:[33,34],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,31,32,35,36,37,38],inclusive:!0}}};return yt}();ut.lexer=bt;function mt(){this.yy={}}return mt.prototype=ut,ut.Parser=mt,new mt}();F0t.parser=F0t;const oze=F0t;let yK=Le().gitGraph.mainBranchName,cze=Le().gitGraph.mainBranchOrder,c1={},hg=null,xP={};xP[yK]={name:yK,order:cze};let Pf={};Pf[yK]=hg;let X1=yK,FBt="LR",yT=0;function B0t(){return GDt({length:7})}function uze(i,a){const f=Object.create(null);return i.reduce((p,v)=>{const m=a(v);return f[m]||(f[m]=!0,p.push(v)),p},[])}const lze=function(i){FBt=i};let BBt={};const hze=function(i){Ut.debug("options str",i),i=i&&i.trim(),i=i||"{}";try{BBt=JSON.parse(i)}catch(a){Ut.error("error while parsing gitGraph options",a.message)}},fze=function(){return BBt},dze=function(i,a,f,p){Ut.debug("Entering commit:",i,a,f,p),a=Yr.sanitizeText(a,Le()),i=Yr.sanitizeText(i,Le()),p=Yr.sanitizeText(p,Le());const v={id:a||yT+"-"+B0t(),message:i,seq:yT++,type:f||kP.NORMAL,tag:p||"",parents:hg==null?[]:[hg.id],branch:X1};hg=v,c1[v.id]=v,Pf[X1]=v.id,Ut.debug("in pushCommit "+v.id)},gze=function(i,a){if(i=Yr.sanitizeText(i,Le()),Pf[i]===void 0)Pf[i]=hg!=null?hg.id:null,xP[i]={name:i,order:a?parseInt(a,10):null},RBt(i),Ut.debug("in createBranch");else{let f=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+i+'")');throw f.hash={text:"branch "+i,token:"branch "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+i+'"']},f}},pze=function(i,a,f,p){i=Yr.sanitizeText(i,Le()),a=Yr.sanitizeText(a,Le());const v=c1[Pf[X1]],m=c1[Pf[i]];if(X1===i){let E=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},E}else if(v===void 0||!v){let E=new Error('Incorrect usage of "merge". Current branch ('+X1+")has no commits");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},E}else if(Pf[i]===void 0){let E=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") does not exist");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+i]},E}else if(m===void 0||!m){let E=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") has no commits");throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},E}else if(v===m){let E=new Error('Incorrect usage of "merge". Both branches have same head');throw E.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},E}else if(a&&c1[a]!==void 0){let E=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw E.hash={text:"merge "+i+a+f+p,token:"merge "+i+a+f+p,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+i+" "+a+"_UNIQUE "+f+" "+p]},E}const b={id:a||yT+"-"+B0t(),message:"merged branch "+i+" into "+X1,seq:yT++,parents:[hg==null?null:hg.id,Pf[i]],branch:X1,type:kP.MERGE,customType:f,customId:!!a,tag:p||""};hg=b,c1[b.id]=b,Pf[X1]=b.id,Ut.debug(Pf),Ut.debug("in mergeBranch")},bze=function(i,a,f){if(Ut.debug("Entering cherryPick:",i,a,f),i=Yr.sanitizeText(i,Le()),a=Yr.sanitizeText(a,Le()),f=Yr.sanitizeText(f,Le()),!i||c1[i]===void 0){let m=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},m}let p=c1[i],v=p.branch;if(p.type===kP.MERGE){let m=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw m.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},m}if(!a||c1[a]===void 0){if(v===X1){let E=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw E.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},E}const m=c1[Pf[X1]];if(m===void 0||!m){let E=new Error('Incorrect usage of "cherry-pick". Current branch ('+X1+")has no commits");throw E.hash={text:"cherryPick "+i+" "+a,token:"cherryPick "+i+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},E}const b={id:yT+"-"+B0t(),message:"cherry-picked "+p+" into "+X1,seq:yT++,parents:[hg==null?null:hg.id,p.id],branch:X1,type:kP.CHERRY_PICK,tag:f??"cherry-pick:"+p.id};hg=b,c1[b.id]=b,Pf[X1]=b.id,Ut.debug(Pf),Ut.debug("in cherryPick")}},RBt=function(i){if(i=Yr.sanitizeText(i,Le()),Pf[i]===void 0){let a=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+i+'")');throw a.hash={text:"checkout "+i,token:"checkout "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+i+'"']},a}else{X1=i;const a=Pf[X1];hg=c1[a]}};function jBt(i,a,f){const p=i.indexOf(a);p===-1?i.push(f):i.splice(p,1,f)}function $Bt(i){const a=i.reduce((v,m)=>v.seq>m.seq?v:m,i[0]);let f="";i.forEach(function(v){v===a?f+=" *":f+=" |"});const p=[f,a.id,a.seq];for(let v in Pf)Pf[v]===a.id&&p.push(v);if(Ut.debug(p.join(" ")),a.parents&&a.parents.length==2){const v=c1[a.parents[0]];jBt(i,a,v),i.push(c1[a.parents[1]])}else{if(a.parents.length==0)return;{const v=c1[a.parents];jBt(i,a,v)}}i=uze(i,v=>v.id),$Bt(i)}const vze=function(){Ut.debug(c1);const i=zBt()[0];$Bt([i])},wze=function(){c1={},hg=null;let i=Le().gitGraph.mainBranchName,a=Le().gitGraph.mainBranchOrder;Pf={},Pf[i]=null,xP={},xP[i]={name:i,order:a},X1=i,yT=0,ap()},mze=function(){return Object.values(xP).map((a,f)=>a.order!==null?a:{...a,order:parseFloat(`0.${f}`,10)}).sort((a,f)=>a.order-f.order).map(({name:a})=>({name:a}))},yze=function(){return Pf},xze=function(){return c1},zBt=function(){const i=Object.keys(c1).map(function(a){return c1[a]});return i.forEach(function(a){Ut.debug(a.id)}),i.sort((a,f)=>a.seq-f.seq),i},kze=function(){return X1},Eze=function(){return FBt},Tze=function(){return hg},kP={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Cze={getConfig:()=>Le().gitGraph,setDirection:lze,setOptions:hze,getOptions:fze,commit:dze,branch:gze,merge:pze,cherryPick:bze,checkout:RBt,prettyPrint:vze,clear:wze,getBranchesAsObjArray:mze,getBranches:yze,getCommits:xze,getCommitsArray:zBt,getCurrentBranch:kze,getDirection:Eze,getHead:Tze,setAccTitle:cg,getAccTitle:op,getAccDescription:up,setAccDescription:cp,setDiagramTitle:Z2,getDiagramTitle:Db,commitType:kP};let EP={};const Fb={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},xT=8;let Q1={},TP={},xK=[],CP=0,y0="LR";const _ze=()=>{Q1={},TP={},EP={},CP=0,xK=[],y0="LR"},qBt=i=>{const a=document.createElementNS("http://www.w3.org/2000/svg","text");let f=[];typeof i=="string"?f=i.split(/\\n|\n|/gi):Array.isArray(i)?f=i:f=[];for(const p of f){const v=document.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","0"),v.setAttribute("class","row"),v.textContent=p.trim(),a.appendChild(v)}return a},HBt=(i,a,f)=>{const p=JN().gitGraph,v=i.append("g").attr("class","commit-bullets"),m=i.append("g").attr("class","commit-labels");let b=0;y0==="TB"&&(b=30),Object.keys(a).sort((L,N)=>a[L].seq-a[N].seq).forEach(L=>{const N=a[L],B=y0==="TB"?b+10:Q1[N.branch].pos,j=y0==="TB"?Q1[N.branch].pos:b+10;if(f){let R,z=N.customType!==void 0&&N.customType!==""?N.customType:N.type;switch(z){case Fb.NORMAL:R="commit-normal";break;case Fb.REVERSE:R="commit-reverse";break;case Fb.HIGHLIGHT:R="commit-highlight";break;case Fb.MERGE:R="commit-merge";break;case Fb.CHERRY_PICK:R="commit-cherry-pick";break;default:R="commit-normal"}if(z===Fb.HIGHLIGHT){const K=v.append("rect");K.attr("x",j-10),K.attr("y",B-10),K.attr("height",20),K.attr("width",20),K.attr("class",`commit ${N.id} commit-highlight${Q1[N.branch].index%xT} ${R}-outer`),v.append("rect").attr("x",j-6).attr("y",B-6).attr("height",12).attr("width",12).attr("class",`commit ${N.id} commit${Q1[N.branch].index%xT} ${R}-inner`)}else if(z===Fb.CHERRY_PICK)v.append("circle").attr("cx",j).attr("cy",B).attr("r",10).attr("class",`commit ${N.id} ${R}`),v.append("circle").attr("cx",j-3).attr("cy",B+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${N.id} ${R}`),v.append("circle").attr("cx",j+3).attr("cy",B+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${N.id} ${R}`),v.append("line").attr("x1",j+3).attr("y1",B+1).attr("x2",j).attr("y2",B-5).attr("stroke","#fff").attr("class",`commit ${N.id} ${R}`),v.append("line").attr("x1",j-3).attr("y1",B+1).attr("x2",j).attr("y2",B-5).attr("stroke","#fff").attr("class",`commit ${N.id} ${R}`);else{const K=v.append("circle");if(K.attr("cx",j),K.attr("cy",B),K.attr("r",N.type===Fb.MERGE?9:10),K.attr("class",`commit ${N.id} commit${Q1[N.branch].index%xT}`),z===Fb.MERGE){const it=v.append("circle");it.attr("cx",j),it.attr("cy",B),it.attr("r",6),it.attr("class",`commit ${R} ${N.id} commit${Q1[N.branch].index%xT}`)}z===Fb.REVERSE&&v.append("path").attr("d",`M ${j-5},${B-5}L${j+5},${B+5}M${j-5},${B+5}L${j+5},${B-5}`).attr("class",`commit ${R} ${N.id} commit${Q1[N.branch].index%xT}`)}}if(y0==="TB"?TP[N.id]={x:j,y:b+10}:TP[N.id]={x:b+10,y:B},f){if(N.type!==Fb.CHERRY_PICK&&(N.customId&&N.type===Fb.MERGE||N.type!==Fb.MERGE)&&p.showCommitLabel){const K=m.append("g"),it=K.insert("rect").attr("class","commit-label-bkg"),st=K.append("text").attr("x",b).attr("y",B+25).attr("class","commit-label").text(N.id);let ut=st.node().getBBox();if(it.attr("x",b+10-ut.width/2-2).attr("y",B+13.5).attr("width",ut.width+2*2).attr("height",ut.height+2*2),y0==="TB"&&(it.attr("x",j-(ut.width+4*4+5)).attr("y",B-12),st.attr("x",j-(ut.width+4*4)).attr("y",B+ut.height-12)),y0!=="TB"&&st.attr("x",b+10-ut.width/2),p.rotateCommitLabel)if(y0==="TB")st.attr("transform","rotate(-45, "+j+", "+B+")"),it.attr("transform","rotate(-45, "+j+", "+B+")");else{let bt=-7.5-(ut.width+10)/25*9.5,mt=10+ut.width/25*8.5;K.attr("transform","translate("+bt+", "+mt+") rotate(-45, "+b+", "+B+")")}}if(N.tag){const K=m.insert("polygon"),it=m.append("circle"),st=m.append("text").attr("y",B-16).attr("class","tag-label").text(N.tag);let ut=st.node().getBBox();st.attr("x",b+10-ut.width/2);const bt=ut.height/2,mt=B-19.2;K.attr("class","tag-label-bkg").attr("points",` + ${b-ut.width/2-4/2},${mt+2} + ${b-ut.width/2-4/2},${mt-2} + ${b+10-ut.width/2-4},${mt-bt-2} + ${b+10+ut.width/2+4},${mt-bt-2} + ${b+10+ut.width/2+4},${mt+bt+2} + ${b+10-ut.width/2-4},${mt+bt+2}`),it.attr("cx",b-ut.width/2+4/2).attr("cy",mt).attr("r",1.5).attr("class","tag-hole"),y0==="TB"&&(K.attr("class","tag-label-bkg").attr("points",` + ${j},${b+2} + ${j},${b-2} + ${j+10},${b-bt-2} + ${j+10+ut.width+4},${b-bt-2} + ${j+10+ut.width+4},${b+bt+2} + ${j+10},${b+bt+2}`).attr("transform","translate(12,12) rotate(45, "+j+","+b+")"),it.attr("cx",j+4/2).attr("cy",b).attr("transform","translate(12,12) rotate(45, "+j+","+b+")"),st.attr("x",j+5).attr("y",b+3).attr("transform","translate(14,14) rotate(45, "+j+","+b+")"))}}b+=50,b>CP&&(CP=b)})},Sze=(i,a,f)=>Object.keys(f).filter(m=>f[m].branch===a.branch&&f[m].seq>i.seq&&f[m].seq0,_P=(i,a,f=0)=>{const p=i+Math.abs(i-a)/2;if(f>5)return p;if(xK.every(b=>Math.abs(b-p)>=10))return xK.push(p),p;const m=Math.abs(i-a);return _P(i,a-m/5,f+1)},Aze=(i,a,f,p)=>{const v=TP[a.id],m=TP[f.id],b=Sze(a,f,p);let E="",_="",L=0,N=0,B=Q1[f.branch].index,j;if(b){E="A 10 10, 0, 0, 0,",_="A 10 10, 0, 0, 1,",L=10,N=10,B=Q1[f.branch].index;const R=v.ym.x&&(E="A 20 20, 0, 0, 0,",_="A 20 20, 0, 0, 1,",L=20,N=20,B=Q1[a.branch].index,j=`M ${v.x} ${v.y} L ${v.x} ${m.y-L} ${_} ${v.x-N} ${m.y} L ${m.x} ${m.y}`),v.x===m.x&&(B=Q1[a.branch].index,j=`M ${v.x} ${v.y} L ${v.x+L} ${v.y} ${E} ${v.x+N} ${m.y+L} L ${m.x} ${m.y}`)):(v.ym.y&&(E="A 20 20, 0, 0, 0,",L=20,N=20,B=Q1[a.branch].index,j=`M ${v.x} ${v.y} L ${m.x-L} ${v.y} ${E} ${m.x} ${v.y-N} L ${m.x} ${m.y}`),v.y===m.y&&(B=Q1[a.branch].index,j=`M ${v.x} ${v.y} L ${v.x} ${m.y-L} ${E} ${v.x+N} ${m.y} L ${m.x} ${m.y}`));i.append("path").attr("d",j).attr("class","arrow arrow"+B%xT)},Lze=(i,a)=>{const f=i.append("g").attr("class","commit-arrows");Object.keys(a).forEach(p=>{const v=a[p];v.parents&&v.parents.length>0&&v.parents.forEach(m=>{Aze(f,a[m],v,a)})})},Mze=(i,a)=>{const f=JN().gitGraph,p=i.append("g");a.forEach((v,m)=>{const b=m%xT,E=Q1[v.name].pos,_=p.append("line");_.attr("x1",0),_.attr("y1",E),_.attr("x2",CP),_.attr("y2",E),_.attr("class","branch branch"+b),y0==="TB"&&(_.attr("y1",30),_.attr("x1",E),_.attr("y2",CP),_.attr("x2",E)),xK.push(E);let L=v.name;const N=qBt(L),B=p.insert("rect"),R=p.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+b);R.node().appendChild(N);let z=N.getBBox();B.attr("class","branchLabelBkg label"+b).attr("rx",4).attr("ry",4).attr("x",-z.width-4-(f.rotateCommitLabel===!0?30:0)).attr("y",-z.height/2+8).attr("width",z.width+18).attr("height",z.height+4),R.attr("transform","translate("+(-z.width-14-(f.rotateCommitLabel===!0?30:0))+", "+(E-z.height/2-1)+")"),y0==="TB"&&(B.attr("x",E-z.width/2-10).attr("y",0),R.attr("transform","translate("+(E-z.width/2-5)+", 0)")),y0!=="TB"&&B.attr("transform","translate(-19, "+(E-z.height/2)+")")})},Ize=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:oze,db:Cze,renderer:{draw:function(i,a,f,p){_ze();const v=JN(),m=v.gitGraph;Ut.debug("in gitgraph renderer",i+` +`,"id:",a,f),EP=p.db.getCommits();const b=p.db.getBranchesAsObjArray();y0=p.db.getDirection();const E=yr(`[id="${a}"]`);let _=0;b.forEach((L,N)=>{const B=qBt(L.name),j=E.append("g"),R=j.insert("g").attr("class","branchLabel"),z=R.insert("g").attr("class","label branch-label");z.node().appendChild(B);let K=B.getBBox();Q1[L.name]={pos:_,index:N},_+=50+(m.rotateCommitLabel?40:0)+(y0==="TB"?K.width/2:0),z.remove(),R.remove(),j.remove()}),HBt(E,EP,!1),m.showBranches&&Mze(E,b),Lze(E,EP),HBt(E,EP,!0),$a.insertTitle(E,"gitTitleText",m.titleTopMargin,p.db.getDiagramTitle()),MOt(void 0,E,m.diagramPadding,m.useMaxWidth??v.useMaxWidth)}},styles:i=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(a=>` + .branch-label${a} { fill: ${i["gitBranchLabel"+a]}; } + .commit${a} { stroke: ${i["git"+a]}; fill: ${i["git"+a]}; } + .commit-highlight${a} { stroke: ${i["gitInv"+a]}; fill: ${i["gitInv"+a]}; } + .label${a} { fill: ${i["git"+a]}; } + .arrow${a} { stroke: ${i["git"+a]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${i.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${i.commitLabelFontSize}; fill: ${i.commitLabelColor};} + .commit-label-bkg { font-size: ${i.commitLabelFontSize}; fill: ${i.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${i.tagLabelFontSize}; fill: ${i.tagLabelColor};} + .tag-label-bkg { fill: ${i.tagLabelBackground}; stroke: ${i.tagLabelBorder}; } + .tag-hole { fill: ${i.textColor}; } + + .commit-merge { + stroke: ${i.primaryColor}; + fill: ${i.primaryColor}; + } + .commit-reverse { + stroke: ${i.primaryColor}; + fill: ${i.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${i.primaryColor}; + fill: ${i.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${i.textColor}; + } +`}},Symbol.toStringTag,{value:"Module"}));var R0t=function(){var i=function(U,xt,nt,Ot){for(nt=nt||{},Ot=U.length;Ot--;nt[U[Ot]]=xt);return nt},a=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],f=[1,25],p=[1,26],v=[1,27],m=[1,28],b=[1,29],E=[1,30],_=[1,31],L=[1,9],N=[1,10],B=[1,11],j=[1,12],R=[1,13],z=[1,14],K=[1,15],it=[1,16],st=[1,18],ut=[1,19],bt=[1,20],mt=[1,21],yt=[1,22],dt=[1,24],ht=[1,32],wt={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(xt,nt,Ot,Nt,qt,Ct,Z){var Tt=Ct.length-1;switch(qt){case 1:return Ct[Tt-1];case 2:this.$=[];break;case 3:Ct[Tt-1].push(Ct[Tt]),this.$=Ct[Tt-1];break;case 4:case 5:this.$=Ct[Tt];break;case 6:case 7:this.$=[];break;case 8:Nt.setWeekday("monday");break;case 9:Nt.setWeekday("tuesday");break;case 10:Nt.setWeekday("wednesday");break;case 11:Nt.setWeekday("thursday");break;case 12:Nt.setWeekday("friday");break;case 13:Nt.setWeekday("saturday");break;case 14:Nt.setWeekday("sunday");break;case 15:Nt.setDateFormat(Ct[Tt].substr(11)),this.$=Ct[Tt].substr(11);break;case 16:Nt.enableInclusiveEndDates(),this.$=Ct[Tt].substr(18);break;case 17:Nt.TopAxis(),this.$=Ct[Tt].substr(8);break;case 18:Nt.setAxisFormat(Ct[Tt].substr(11)),this.$=Ct[Tt].substr(11);break;case 19:Nt.setTickInterval(Ct[Tt].substr(13)),this.$=Ct[Tt].substr(13);break;case 20:Nt.setExcludes(Ct[Tt].substr(9)),this.$=Ct[Tt].substr(9);break;case 21:Nt.setIncludes(Ct[Tt].substr(9)),this.$=Ct[Tt].substr(9);break;case 22:Nt.setTodayMarker(Ct[Tt].substr(12)),this.$=Ct[Tt].substr(12);break;case 24:Nt.setDiagramTitle(Ct[Tt].substr(6)),this.$=Ct[Tt].substr(6);break;case 25:this.$=Ct[Tt].trim(),Nt.setAccTitle(this.$);break;case 26:case 27:this.$=Ct[Tt].trim(),Nt.setAccDescription(this.$);break;case 28:Nt.addSection(Ct[Tt].substr(8)),this.$=Ct[Tt].substr(8);break;case 30:Nt.addTask(Ct[Tt-1],Ct[Tt]),this.$="task";break;case 31:this.$=Ct[Tt-1],Nt.setClickEvent(Ct[Tt-1],Ct[Tt],null);break;case 32:this.$=Ct[Tt-2],Nt.setClickEvent(Ct[Tt-2],Ct[Tt-1],Ct[Tt]);break;case 33:this.$=Ct[Tt-2],Nt.setClickEvent(Ct[Tt-2],Ct[Tt-1],null),Nt.setLink(Ct[Tt-2],Ct[Tt]);break;case 34:this.$=Ct[Tt-3],Nt.setClickEvent(Ct[Tt-3],Ct[Tt-2],Ct[Tt-1]),Nt.setLink(Ct[Tt-3],Ct[Tt]);break;case 35:this.$=Ct[Tt-2],Nt.setClickEvent(Ct[Tt-2],Ct[Tt],null),Nt.setLink(Ct[Tt-2],Ct[Tt-1]);break;case 36:this.$=Ct[Tt-3],Nt.setClickEvent(Ct[Tt-3],Ct[Tt-1],Ct[Tt]),Nt.setLink(Ct[Tt-3],Ct[Tt-2]);break;case 37:this.$=Ct[Tt-1],Nt.setLink(Ct[Tt-1],Ct[Tt]);break;case 38:case 44:this.$=Ct[Tt-1]+" "+Ct[Tt];break;case 39:case 40:case 42:this.$=Ct[Tt-2]+" "+Ct[Tt-1]+" "+Ct[Tt];break;case 41:case 43:this.$=Ct[Tt-3]+" "+Ct[Tt-2]+" "+Ct[Tt-1]+" "+Ct[Tt];break}},table:[{3:1,4:[1,2]},{1:[3]},i(a,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:f,13:p,14:v,15:m,16:b,17:E,18:_,19:L,20:N,21:B,22:j,23:R,24:z,25:K,26:it,27:st,28:ut,30:bt,32:mt,33:yt,34:23,35:dt,37:ht},i(a,[2,7],{1:[2,1]}),i(a,[2,3]),{9:33,11:17,12:f,13:p,14:v,15:m,16:b,17:E,18:_,19:L,20:N,21:B,22:j,23:R,24:z,25:K,26:it,27:st,28:ut,30:bt,32:mt,33:yt,34:23,35:dt,37:ht},i(a,[2,5]),i(a,[2,6]),i(a,[2,15]),i(a,[2,16]),i(a,[2,17]),i(a,[2,18]),i(a,[2,19]),i(a,[2,20]),i(a,[2,21]),i(a,[2,22]),i(a,[2,23]),i(a,[2,24]),{29:[1,34]},{31:[1,35]},i(a,[2,27]),i(a,[2,28]),i(a,[2,29]),{36:[1,36]},i(a,[2,8]),i(a,[2,9]),i(a,[2,10]),i(a,[2,11]),i(a,[2,12]),i(a,[2,13]),i(a,[2,14]),{38:[1,37],40:[1,38]},i(a,[2,4]),i(a,[2,25]),i(a,[2,26]),i(a,[2,30]),i(a,[2,31],{39:[1,39],40:[1,40]}),i(a,[2,37],{38:[1,41]}),i(a,[2,32],{40:[1,42]}),i(a,[2,33]),i(a,[2,35],{39:[1,43]}),i(a,[2,34]),i(a,[2,36])],defaultActions:{},parseError:function(xt,nt){if(nt.recoverable)this.trace(xt);else{var Ot=new Error(xt);throw Ot.hash=nt,Ot}},parse:function(xt){var nt=this,Ot=[0],Nt=[],qt=[null],Ct=[],Z=this.table,Tt="",Ht=0,It=0,Ft=2,ke=1,pn=Ct.slice.call(arguments,1),Me=Object.create(this.lexer),ve={yy:{}};for(var Ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ge)&&(ve.yy[Ge]=this.yy[Ge]);Me.setInput(xt,ve.yy),ve.yy.lexer=Me,ve.yy.parser=this,typeof Me.yylloc>"u"&&(Me.yylloc={});var Ke=Me.yylloc;Ct.push(Ke);var we=Me.options&&Me.options.ranges;typeof ve.yy.parseError=="function"?this.parseError=ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(){var da;return da=Nt.pop()||Me.lex()||ke,typeof da!="number"&&(da instanceof Array&&(Nt=da,da=Nt.pop()),da=nt.symbols_[da]||da),da}for(var $t,re,ie,Oe,oe={},Ne,me,cn,li;;){if(re=Ot[Ot.length-1],this.defaultActions[re]?ie=this.defaultActions[re]:(($t===null||typeof $t>"u")&&($t=_e()),ie=Z[re]&&Z[re][$t]),typeof ie>"u"||!ie.length||!ie[0]){var ya="";li=[];for(Ne in Z[re])this.terminals_[Ne]&&Ne>Ft&&li.push("'"+this.terminals_[Ne]+"'");Me.showPosition?ya="Parse error on line "+(Ht+1)+`: +`+Me.showPosition()+` +Expecting `+li.join(", ")+", got '"+(this.terminals_[$t]||$t)+"'":ya="Parse error on line "+(Ht+1)+": Unexpected "+($t==ke?"end of input":"'"+(this.terminals_[$t]||$t)+"'"),this.parseError(ya,{text:Me.match,token:this.terminals_[$t]||$t,line:Me.yylineno,loc:Ke,expected:li})}if(ie[0]instanceof Array&&ie.length>1)throw new Error("Parse Error: multiple actions possible at state: "+re+", token: "+$t);switch(ie[0]){case 1:Ot.push($t),qt.push(Me.yytext),Ct.push(Me.yylloc),Ot.push(ie[1]),$t=null,It=Me.yyleng,Tt=Me.yytext,Ht=Me.yylineno,Ke=Me.yylloc;break;case 2:if(me=this.productions_[ie[1]][1],oe.$=qt[qt.length-me],oe._$={first_line:Ct[Ct.length-(me||1)].first_line,last_line:Ct[Ct.length-1].last_line,first_column:Ct[Ct.length-(me||1)].first_column,last_column:Ct[Ct.length-1].last_column},we&&(oe._$.range=[Ct[Ct.length-(me||1)].range[0],Ct[Ct.length-1].range[1]]),Oe=this.performAction.apply(oe,[Tt,It,Ht,ve.yy,ie[1],qt,Ct].concat(pn)),typeof Oe<"u")return Oe;me&&(Ot=Ot.slice(0,-1*me*2),qt=qt.slice(0,-1*me),Ct=Ct.slice(0,-1*me)),Ot.push(this.productions_[ie[1]][0]),qt.push(oe.$),Ct.push(oe._$),cn=Z[Ot[Ot.length-2]][Ot[Ot.length-1]],Ot.push(cn);break;case 3:return!0}}return!0}},X=function(){var U={EOF:1,parseError:function(nt,Ot){if(this.yy.parser)this.yy.parser.parseError(nt,Ot);else throw new Error(nt)},setInput:function(xt,nt){return this.yy=nt||this.yy||{},this._input=xt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var xt=this._input[0];this.yytext+=xt,this.yyleng++,this.offset++,this.match+=xt,this.matched+=xt;var nt=xt.match(/(?:\r\n?|\n).*/g);return nt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),xt},unput:function(xt){var nt=xt.length,Ot=xt.split(/(?:\r\n?|\n)/g);this._input=xt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-nt),this.offset-=nt;var Nt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ot.length-1&&(this.yylineno-=Ot.length-1);var qt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ot?(Ot.length===Nt.length?this.yylloc.first_column:0)+Nt[Nt.length-Ot.length].length-Ot[0].length:this.yylloc.first_column-nt},this.options.ranges&&(this.yylloc.range=[qt[0],qt[0]+this.yyleng-nt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(xt){this.unput(this.match.slice(xt))},pastInput:function(){var xt=this.matched.substr(0,this.matched.length-this.match.length);return(xt.length>20?"...":"")+xt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var xt=this.match;return xt.length<20&&(xt+=this._input.substr(0,20-xt.length)),(xt.substr(0,20)+(xt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var xt=this.pastInput(),nt=new Array(xt.length+1).join("-");return xt+this.upcomingInput()+` +`+nt+"^"},test_match:function(xt,nt){var Ot,Nt,qt;if(this.options.backtrack_lexer&&(qt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(qt.yylloc.range=this.yylloc.range.slice(0))),Nt=xt[0].match(/(?:\r\n?|\n).*/g),Nt&&(this.yylineno+=Nt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Nt?Nt[Nt.length-1].length-Nt[Nt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+xt[0].length},this.yytext+=xt[0],this.match+=xt[0],this.matches=xt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(xt[0].length),this.matched+=xt[0],Ot=this.performAction.call(this,this.yy,this,nt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ot)return Ot;if(this._backtrack){for(var Ct in qt)this[Ct]=qt[Ct];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var xt,nt,Ot,Nt;this._more||(this.yytext="",this.match="");for(var qt=this._currentRules(),Ct=0;Ctnt[0].length)){if(nt=Ot,Nt=Ct,this.options.backtrack_lexer){if(xt=this.test_match(Ot,qt[Ct]),xt!==!1)return xt;if(this._backtrack){nt=!1;continue}else return!1}else if(!this.options.flex)break}return nt?(xt=this.test_match(nt,qt[Nt]),xt!==!1?xt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var nt=this.next();return nt||this.lex()},begin:function(nt){this.conditionStack.push(nt)},popState:function(){var nt=this.conditionStack.length-1;return nt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(nt){return nt=this.conditionStack.length-1-Math.abs(nt||0),nt>=0?this.conditionStack[nt]:"INITIAL"},pushState:function(nt){this.begin(nt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(nt,Ot,Nt,qt){switch(Nt){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:break;case 15:this.begin("href");break;case 16:this.popState();break;case 17:return 40;case 18:this.begin("callbackname");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callbackargs");break;case 21:return 38;case 22:this.popState();break;case 23:return 39;case 24:this.begin("click");break;case 25:this.popState();break;case 26:return 37;case 27:return 4;case 28:return 19;case 29:return 20;case 30:return 21;case 31:return 22;case 32:return 23;case 33:return 25;case 34:return 24;case 35:return 26;case 36:return 12;case 37:return 13;case 38:return 14;case 39:return 15;case 40:return 16;case 41:return 17;case 42:return 18;case 43:return"date";case 44:return 27;case 45:return"accDescription";case 46:return 33;case 47:return 35;case 48:return 36;case 49:return":";case 50:return 6;case 51:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[22,23],inclusive:!1},callbackname:{rules:[19,20,21],inclusive:!1},href:{rules:[16,17],inclusive:!1},click:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,18,24,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return U}();wt.lexer=X;function pt(){this.yy={}}return pt.prototype=wt,wt.Parser=pt,new pt}();R0t.parser=R0t;const Dze=R0t;var GBt={exports:{}};(function(i,a){(function(f,p){i.exports=p()})(d0,function(){var f="day";return function(p,v,m){var b=function(L){return L.add(4-L.isoWeekday(),f)},E=v.prototype;E.isoWeekYear=function(){return b(this).year()},E.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),f);var N,B,j,R,z=b(this),K=(N=this.isoWeekYear(),B=this.$u,j=(B?m.utc:m)().year(N).startOf("year"),R=4-j.isoWeekday(),j.isoWeekday()>4&&(R+=7),j.add(R,f));return z.diff(K,"week")+1},E.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var _=E.startOf;E.startOf=function(L,N){var B=this.$utils(),j=!!B.u(N)||N;return B.p(L)==="isoweek"?j?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):_.bind(this)(L,N)}}})})(GBt);var Oze=GBt.exports;const Nze=B7(Oze);var VBt={exports:{}};(function(i,a){(function(f,p){i.exports=p()})(d0,function(){var f={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},p=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,v=/\d\d/,m=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,E={},_=function(K){return(K=+K)+(K>68?1900:2e3)},L=function(K){return function(it){this[K]=+it}},N=[/[+-]\d\d:?(\d\d)?|Z/,function(K){(this.zone||(this.zone={})).offset=function(it){if(!it||it==="Z")return 0;var st=it.match(/([+-]|\d\d)/g),ut=60*st[1]+(+st[2]||0);return ut===0?0:st[0]==="+"?-ut:ut}(K)}],B=function(K){var it=E[K];return it&&(it.indexOf?it:it.s.concat(it.f))},j=function(K,it){var st,ut=E.meridiem;if(ut){for(var bt=1;bt<=24;bt+=1)if(K.indexOf(ut(bt,0,it))>-1){st=bt>12;break}}else st=K===(it?"pm":"PM");return st},R={A:[b,function(K){this.afternoon=j(K,!1)}],a:[b,function(K){this.afternoon=j(K,!0)}],S:[/\d/,function(K){this.milliseconds=100*+K}],SS:[v,function(K){this.milliseconds=10*+K}],SSS:[/\d{3}/,function(K){this.milliseconds=+K}],s:[m,L("seconds")],ss:[m,L("seconds")],m:[m,L("minutes")],mm:[m,L("minutes")],H:[m,L("hours")],h:[m,L("hours")],HH:[m,L("hours")],hh:[m,L("hours")],D:[m,L("day")],DD:[v,L("day")],Do:[b,function(K){var it=E.ordinal,st=K.match(/\d+/);if(this.day=st[0],it)for(var ut=1;ut<=31;ut+=1)it(ut).replace(/\[|\]/g,"")===K&&(this.day=ut)}],M:[m,L("month")],MM:[v,L("month")],MMM:[b,function(K){var it=B("months"),st=(B("monthsShort")||it.map(function(ut){return ut.slice(0,3)})).indexOf(K)+1;if(st<1)throw new Error;this.month=st%12||st}],MMMM:[b,function(K){var it=B("months").indexOf(K)+1;if(it<1)throw new Error;this.month=it%12||it}],Y:[/[+-]?\d+/,L("year")],YY:[v,function(K){this.year=_(K)}],YYYY:[/\d{4}/,L("year")],Z:N,ZZ:N};function z(K){var it,st;it=K,st=E&&E.formats;for(var ut=(K=it.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(X,pt,U){var xt=U&&U.toUpperCase();return pt||st[U]||f[U]||st[xt].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(nt,Ot,Nt){return Ot||Nt.slice(1)})})).match(p),bt=ut.length,mt=0;mt-1)return new Date((Ct==="X"?1e3:1)*qt);var Tt=z(Ct)(qt),Ht=Tt.year,It=Tt.month,Ft=Tt.day,ke=Tt.hours,pn=Tt.minutes,Me=Tt.seconds,ve=Tt.milliseconds,Ge=Tt.zone,Ke=new Date,we=Ft||(Ht||It?1:Ke.getDate()),_e=Ht||Ke.getFullYear(),$t=0;Ht&&!It||($t=It>0?It-1:Ke.getMonth());var re=ke||0,ie=pn||0,Oe=Me||0,oe=ve||0;return Ge?new Date(Date.UTC(_e,$t,we,re,ie,Oe,oe+60*Ge.offset*1e3)):Z?new Date(Date.UTC(_e,$t,we,re,ie,Oe,oe)):new Date(_e,$t,we,re,ie,Oe,oe)}catch{return new Date("")}}(yt,wt,dt),this.init(),xt&&xt!==!0&&(this.$L=this.locale(xt).$L),U&&yt!=this.format(wt)&&(this.$d=new Date("")),E={}}else if(wt instanceof Array)for(var nt=wt.length,Ot=1;Ot<=nt;Ot+=1){ht[1]=wt[Ot-1];var Nt=st.apply(this,ht);if(Nt.isValid()){this.$d=Nt.$d,this.$L=Nt.$L,this.init();break}Ot===nt&&(this.$d=new Date(""))}else bt.call(this,mt)}}})})(VBt);var Pze=VBt.exports;const Fze=B7(Pze);var UBt={exports:{}};(function(i,a){(function(f,p){i.exports=p()})(d0,function(){return function(f,p){var v=p.prototype,m=v.format;v.format=function(b){var E=this,_=this.$locale();if(!this.isValid())return m.bind(this)(b);var L=this.$utils(),N=(b||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(B){switch(B){case"Q":return Math.ceil((E.$M+1)/3);case"Do":return _.ordinal(E.$D);case"gggg":return E.weekYear();case"GGGG":return E.isoWeekYear();case"wo":return _.ordinal(E.week(),"W");case"w":case"ww":return L.s(E.week(),B==="w"?1:2,"0");case"W":case"WW":return L.s(E.isoWeek(),B==="W"?1:2,"0");case"k":case"kk":return L.s(String(E.$H===0?24:E.$H),B==="k"?1:2,"0");case"X":return Math.floor(E.$d.getTime()/1e3);case"x":return E.$d.getTime();case"z":return"["+E.offsetName()+"]";case"zzz":return"["+E.offsetName("long")+"]";default:return B}});return m.bind(this)(N)}}})})(UBt);var Bze=UBt.exports;const Rze=B7(Bze);g0.extend(Nze),g0.extend(Fze),g0.extend(Rze);let m3="",j0t="",$0t,z0t="",SP=[],AP=[],q0t={},H0t=[],kK=[],iL="",G0t="";const WBt=["active","done","crit","milestone"];let V0t=[],LP=!1,U0t=!1,W0t="sunday",K0t=0;const jze=function(){H0t=[],kK=[],iL="",V0t=[],EK=0,X0t=void 0,TK=void 0,u1=[],m3="",j0t="",G0t="",$0t=void 0,z0t="",SP=[],AP=[],LP=!1,U0t=!1,K0t=0,q0t={},ap(),W0t="sunday"},$ze=function(i){j0t=i},zze=function(){return j0t},qze=function(i){$0t=i},Hze=function(){return $0t},Gze=function(i){z0t=i},Vze=function(){return z0t},Uze=function(i){m3=i},Wze=function(){LP=!0},Kze=function(){return LP},Yze=function(){U0t=!0},Xze=function(){return U0t},Qze=function(i){G0t=i},Zze=function(){return G0t},Jze=function(){return m3},tqe=function(i){SP=i.toLowerCase().split(/[\s,]+/)},eqe=function(){return SP},nqe=function(i){AP=i.toLowerCase().split(/[\s,]+/)},rqe=function(){return AP},iqe=function(){return q0t},sqe=function(i){iL=i,H0t.push(i)},aqe=function(){return H0t},oqe=function(){let i=JBt();const a=10;let f=0;for(;!i&&f=6&&f.includes("weekends")||f.includes(i.format("dddd").toLowerCase())?!0:f.includes(i.format(a.trim()))},cqe=function(i){W0t=i},uqe=function(){return W0t},YBt=function(i,a,f,p){if(!f.length||i.manualEndTime)return;let v;i.startTime instanceof Date?v=g0(i.startTime):v=g0(i.startTime,a,!0),v=v.add(1,"d");let m;i.endTime instanceof Date?m=g0(i.endTime):m=g0(i.endTime,a,!0);const[b,E]=lqe(v,m,a,f,p);i.endTime=b.toDate(),i.renderEndTime=E},lqe=function(i,a,f,p,v){let m=!1,b=null;for(;i<=a;)m||(b=a.toDate()),m=KBt(i,f,p,v),m&&(a=a.add(1,"d")),i=i.add(1,"d");return[a,b]},Y0t=function(i,a,f){f=f.trim();const v=/^after\s+([\d\w- ]+)/.exec(f.trim());if(v!==null){let b=null;if(v[1].split(" ").forEach(function(E){let _=aL(E);_!==void 0&&(b?_.endTime>b.endTime&&(b=_):b=_)}),b)return b.endTime;{const E=new Date;return E.setHours(0,0,0,0),E}}let m=g0(f,a.trim(),!0);if(m.isValid())return m.toDate();{Ut.debug("Invalid date:"+f),Ut.debug("With date format:"+a.trim());const b=new Date(f);if(b===void 0||isNaN(b.getTime())||b.getFullYear()<-1e4||b.getFullYear()>1e4)throw new Error("Invalid date:"+f);return b}},XBt=function(i){const a=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(i.trim());return a!==null?[Number.parseFloat(a[1]),a[2]]:[NaN,"ms"]},QBt=function(i,a,f,p=!1){f=f.trim();let v=g0(f,a.trim(),!0);if(v.isValid())return p&&(v=v.add(1,"d")),v.toDate();let m=g0(i);const[b,E]=XBt(f);if(!Number.isNaN(b)){const _=m.add(b,E);_.isValid()&&(m=_)}return m.toDate()};let EK=0;const sL=function(i){return i===void 0?(EK=EK+1,"task"+EK):i},hqe=function(i,a){let f;a.substr(0,1)===":"?f=a.substr(1,a.length):f=a;const p=f.split(","),v={};nRt(p,v,WBt);for(let b=0;b{window.open(f,"_self")}),q0t[p]=f)}),tRt(i,"clickable")},tRt=function(i,a){i.split(",").forEach(function(f){let p=aL(f);p!==void 0&&p.classes.push(a)})},bqe=function(i,a,f){if(Le().securityLevel!=="loose"||a===void 0)return;let p=[];if(typeof f=="string"){p=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let m=0;m{$a.runFunc(a,...p)})},eRt=function(i,a){V0t.push(function(){const f=document.querySelector(`[id="${i}"]`);f!==null&&f.addEventListener("click",function(){a()})},function(){const f=document.querySelector(`[id="${i}-text"]`);f!==null&&f.addEventListener("click",function(){a()})})},vqe={getConfig:()=>Le().gantt,clear:jze,setDateFormat:Uze,getDateFormat:Jze,enableInclusiveEndDates:Wze,endDatesAreInclusive:Kze,enableTopAxis:Yze,topAxisEnabled:Xze,setAxisFormat:$ze,getAxisFormat:zze,setTickInterval:qze,getTickInterval:Hze,setTodayMarker:Gze,getTodayMarker:Vze,setAccTitle:cg,getAccTitle:op,setDiagramTitle:Z2,getDiagramTitle:Db,setDisplayMode:Qze,getDisplayMode:Zze,setAccDescription:cp,getAccDescription:up,addSection:sqe,getSections:aqe,getTasks:oqe,addTask:dqe,findTaskById:aL,addTaskOrg:gqe,setIncludes:tqe,getIncludes:eqe,setExcludes:nqe,getExcludes:rqe,setClickEvent:function(i,a,f){i.split(",").forEach(function(p){bqe(p,a,f)}),tRt(i,"clickable")},setLink:pqe,getLinks:iqe,bindFunctions:function(i){V0t.forEach(function(a){a(i)})},parseDuration:XBt,isInvalidDate:KBt,setWeekday:cqe,getWeekday:uqe};function nRt(i,a,f){let p=!0;for(;p;)p=!1,f.forEach(function(v){const m="^\\s*"+v+"\\s*$",b=new RegExp(m);i[0].match(b)&&(a[v]=!0,i.shift(1),p=!0)})}const wqe=function(){Ut.debug("Something is calling, setConf, remove the call")},rRt={monday:MN,tuesday:YMt,wednesday:XMt,thursday:K7,friday:QMt,saturday:ZMt,sunday:LN},mqe=(i,a)=>{let f=[...i].map(()=>-1/0),p=[...i].sort((m,b)=>m.startTime-b.startTime||m.order-b.order),v=0;for(const m of p)for(let b=0;b=f[b]){f[b]=m.endTime,m.order=b+a,b>v&&(v=b);break}return v};let L5;const yqe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:Dze,db:vqe,renderer:{setConf:wqe,draw:function(i,a,f,p){const v=Le().gantt,m=Le().securityLevel;let b;m==="sandbox"&&(b=yr("#i"+a));const E=yr(m==="sandbox"?b.nodes()[0].contentDocument.body:"body"),_=m==="sandbox"?b.nodes()[0].contentDocument:document,L=_.getElementById(a);L5=L.parentElement.offsetWidth,L5===void 0&&(L5=1200),v.useWidth!==void 0&&(L5=v.useWidth);const N=p.db.getTasks();let B=[];for(const wt of N)B.push(wt.type);B=ht(B);const j={};let R=2*v.topPadding;if(p.db.getDisplayMode()==="compact"||v.displayMode==="compact"){const wt={};for(const pt of N)wt[pt.section]===void 0?wt[pt.section]=[pt]:wt[pt.section].push(pt);let X=0;for(const pt of Object.keys(wt)){const U=mqe(wt[pt],X)+1;X+=U,R+=U*(v.barHeight+v.barGap),j[pt]=U}}else{R+=N.length*(v.barHeight+v.barGap);for(const wt of B)j[wt]=N.filter(X=>X.type===wt).length}L.setAttribute("viewBox","0 0 "+L5+" "+R);const z=E.select(`[id="${a}"]`),K=C7e().domain([lxe(N,function(wt){return wt.startTime}),uxe(N,function(wt){return wt.endTime})]).rangeRound([0,L5-v.leftPadding-v.rightPadding]);function it(wt,X){const pt=wt.startTime,U=X.startTime;let xt=0;return pt>U?xt=1:ptHt.order))].map(Ht=>wt.find(It=>It.order===Ht));z.append("g").selectAll("rect").data(qt).enter().append("rect").attr("x",0).attr("y",function(Ht,It){return It=Ht.order,It*X+pt-2}).attr("width",function(){return Ot-v.rightPadding/2}).attr("height",X).attr("class",function(Ht){for(const[It,Ft]of B.entries())if(Ht.type===Ft)return"section section"+It%v.numberSectionStyles;return"section section0"});const Ct=z.append("g").selectAll("rect").data(wt).enter(),Z=p.db.getLinks();if(Ct.append("rect").attr("id",function(Ht){return Ht.id}).attr("rx",3).attr("ry",3).attr("x",function(Ht){return Ht.milestone?K(Ht.startTime)+U+.5*(K(Ht.endTime)-K(Ht.startTime))-.5*xt:K(Ht.startTime)+U}).attr("y",function(Ht,It){return It=Ht.order,It*X+pt}).attr("width",function(Ht){return Ht.milestone?xt:K(Ht.renderEndTime||Ht.endTime)-K(Ht.startTime)}).attr("height",xt).attr("transform-origin",function(Ht,It){return It=Ht.order,(K(Ht.startTime)+U+.5*(K(Ht.endTime)-K(Ht.startTime))).toString()+"px "+(It*X+pt+.5*xt).toString()+"px"}).attr("class",function(Ht){const It="task";let Ft="";Ht.classes.length>0&&(Ft=Ht.classes.join(" "));let ke=0;for(const[Me,ve]of B.entries())Ht.type===ve&&(ke=Me%v.numberSectionStyles);let pn="";return Ht.active?Ht.crit?pn+=" activeCrit":pn=" active":Ht.done?Ht.crit?pn=" doneCrit":pn=" done":Ht.crit&&(pn+=" crit"),pn.length===0&&(pn=" task"),Ht.milestone&&(pn=" milestone "+pn),pn+=ke,pn+=" "+Ft,It+pn}),Ct.append("text").attr("id",function(Ht){return Ht.id+"-text"}).text(function(Ht){return Ht.task}).attr("font-size",v.fontSize).attr("x",function(Ht){let It=K(Ht.startTime),Ft=K(Ht.renderEndTime||Ht.endTime);Ht.milestone&&(It+=.5*(K(Ht.endTime)-K(Ht.startTime))-.5*xt),Ht.milestone&&(Ft=It+xt);const ke=this.getBBox().width;return ke>Ft-It?Ft+ke+1.5*v.leftPadding>Ot?It+U-5:Ft+U+5:(Ft-It)/2+It+U}).attr("y",function(Ht,It){return It=Ht.order,It*X+v.barHeight/2+(v.fontSize/2-2)+pt}).attr("text-height",xt).attr("class",function(Ht){const It=K(Ht.startTime);let Ft=K(Ht.endTime);Ht.milestone&&(Ft=It+xt);const ke=this.getBBox().width;let pn="";Ht.classes.length>0&&(pn=Ht.classes.join(" "));let Me=0;for(const[Ge,Ke]of B.entries())Ht.type===Ke&&(Me=Ge%v.numberSectionStyles);let ve="";return Ht.active&&(Ht.crit?ve="activeCritText"+Me:ve="activeText"+Me),Ht.done?Ht.crit?ve=ve+" doneCritText"+Me:ve=ve+" doneText"+Me:Ht.crit&&(ve=ve+" critText"+Me),Ht.milestone&&(ve+=" milestoneText"),ke>Ft-It?Ft+ke+1.5*v.leftPadding>Ot?pn+" taskTextOutsideLeft taskTextOutside"+Me+" "+ve:pn+" taskTextOutsideRight taskTextOutside"+Me+" "+ve+" width-"+ke:pn+" taskText taskText"+Me+" "+ve+" width-"+ke}),Le().securityLevel==="sandbox"){let Ht;Ht=yr("#i"+a);const It=Ht.nodes()[0].contentDocument;Ct.filter(function(Ft){return Z[Ft.id]!==void 0}).each(function(Ft){var ke=It.querySelector("#"+Ft.id),pn=It.querySelector("#"+Ft.id+"-text");const Me=ke.parentNode;var ve=It.createElement("a");ve.setAttribute("xlink:href",Z[Ft.id]),ve.setAttribute("target","_top"),Me.appendChild(ve),ve.appendChild(ke),ve.appendChild(pn)})}}function bt(wt,X,pt,U,xt,nt,Ot,Nt){if(Ot.length===0&&Nt.length===0)return;let qt,Ct;for(const{startTime:ke,endTime:pn}of nt)(qt===void 0||keCt)&&(Ct=pn);if(!qt||!Ct)return;if(g0(Ct).diff(g0(qt),"year")>5){Ut.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const Z=p.db.getDateFormat(),Tt=[];let Ht=null,It=g0(qt);for(;It.valueOf()<=Ct;)p.db.isInvalidDate(It,Z,Ot,Nt)?Ht?Ht.end=It:Ht={start:It,end:It}:Ht&&(Tt.push(Ht),Ht=null),It=It.add(1,"d");z.append("g").selectAll("rect").data(Tt).enter().append("rect").attr("id",function(ke){return"exclude-"+ke.start.format("YYYY-MM-DD")}).attr("x",function(ke){return K(ke.start)+pt}).attr("y",v.gridLineStartPadding).attr("width",function(ke){const pn=ke.end.add(1,"day");return K(pn)-K(ke.start)}).attr("height",xt-X-v.gridLineStartPadding).attr("transform-origin",function(ke,pn){return(K(ke.start)+pt+.5*(K(ke.end)-K(ke.start))).toString()+"px "+(pn*wt+.5*xt).toString()+"px"}).attr("class","exclude-range")}function mt(wt,X,pt,U){let xt=wxe(K).tickSize(-U+X+v.gridLineStartPadding).tickFormat(HU(p.db.getAxisFormat()||v.axisFormat||"%Y-%m-%d"));const Ot=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(p.db.getTickInterval()||v.tickInterval);if(Ot!==null){const Nt=Ot[1],qt=Ot[2],Ct=p.db.getWeekday()||v.weekday;switch(qt){case"millisecond":xt.ticks(C1t.every(Nt));break;case"second":xt.ticks(U7.every(Nt));break;case"minute":xt.ticks(jU.every(Nt));break;case"hour":xt.ticks($U.every(Nt));break;case"day":xt.ticks(CA.every(Nt));break;case"week":xt.ticks(rRt[Ct].every(Nt));break;case"month":xt.ticks(zU.every(Nt));break}}if(z.append("g").attr("class","grid").attr("transform","translate("+wt+", "+(U-50)+")").call(xt).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),p.db.topAxisEnabled()||v.topAxis){let Nt=vxe(K).tickSize(-U+X+v.gridLineStartPadding).tickFormat(HU(p.db.getAxisFormat()||v.axisFormat||"%Y-%m-%d"));if(Ot!==null){const qt=Ot[1],Ct=Ot[2],Z=p.db.getWeekday()||v.weekday;switch(Ct){case"millisecond":Nt.ticks(C1t.every(qt));break;case"second":Nt.ticks(U7.every(qt));break;case"minute":Nt.ticks(jU.every(qt));break;case"hour":Nt.ticks($U.every(qt));break;case"day":Nt.ticks(CA.every(qt));break;case"week":Nt.ticks(rRt[Z].every(qt));break;case"month":Nt.ticks(zU.every(qt));break}}z.append("g").attr("class","grid").attr("transform","translate("+wt+", "+X+")").call(Nt).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function yt(wt,X){let pt=0;const U=Object.keys(j).map(xt=>[xt,j[xt]]);z.append("g").selectAll("text").data(U).enter().append(function(xt){const nt=xt[0].split(Yr.lineBreakRegex),Ot=-(nt.length-1)/2,Nt=_.createElementNS("http://www.w3.org/2000/svg","text");Nt.setAttribute("dy",Ot+"em");for(const[qt,Ct]of nt.entries()){const Z=_.createElementNS("http://www.w3.org/2000/svg","tspan");Z.setAttribute("alignment-baseline","central"),Z.setAttribute("x","10"),qt>0&&Z.setAttribute("dy","1em"),Z.textContent=Ct,Nt.appendChild(Z)}return Nt}).attr("x",10).attr("y",function(xt,nt){if(nt>0)for(let Ot=0;Ot` + .mermaid-main-font { + font-family: "trebuchet ms", verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + .exclude-range { + fill: ${i.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${i.sectionBkgColor}; + } + + .section2 { + fill: ${i.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${i.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${i.titleColor}; + } + + .sectionTitle1 { + fill: ${i.titleColor}; + } + + .sectionTitle2 { + fill: ${i.titleColor}; + } + + .sectionTitle3 { + fill: ${i.titleColor}; + } + + .sectionTitle { + text-anchor: start; + // font-size: ${i.ganttFontSize}; + // text-height: 14px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${i.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + text { + font-family: ${i.fontFamily}; + fill: ${i.textColor}; + } + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${i.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + // .taskText:not([font-size]) { + // font-size: ${i.ganttFontSize}; + // } + + .taskTextOutsideRight { + fill: ${i.taskTextDarkColor}; + text-anchor: start; + // font-size: ${i.ganttFontSize}; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + + } + + .taskTextOutsideLeft { + fill: ${i.taskTextDarkColor}; + text-anchor: end; + // font-size: ${i.ganttFontSize}; + } + + /* Special case clickable */ + .task.clickable { + cursor: pointer; + } + .taskText.clickable { + cursor: pointer; + fill: ${i.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${i.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${i.taskTextClickableColor} !important; + font-weight: bold; + } + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${i.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${i.taskBkgColor}; + stroke: ${i.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${i.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${i.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${i.activeTaskBkgColor}; + stroke: ${i.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${i.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${i.doneTaskBorderColor}; + fill: ${i.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${i.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${i.critBorderColor}; + fill: ${i.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${i.critBorderColor}; + fill: ${i.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${i.critBorderColor}; + fill: ${i.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${i.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${i.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${i.textColor} ; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } +`}},Symbol.toStringTag,{value:"Module"}));var Q0t=function(){var i=function(m,b,E,_){for(E=E||{},_=m.length;_--;E[m[_]]=b);return E},a=[6,9,10],f={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(b,E,_,L,N,B,j){switch(B.length-1,N){case 1:return L;case 4:break;case 6:L.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},i(a,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},i(a,[2,3]),i(a,[2,4]),i(a,[2,5]),i(a,[2,6])],defaultActions:{4:[2,1]},parseError:function(b,E){if(E.recoverable)this.trace(b);else{var _=new Error(b);throw _.hash=E,_}},parse:function(b){var E=this,_=[0],L=[],N=[null],B=[],j=this.table,R="",z=0,K=0,it=2,st=1,ut=B.slice.call(arguments,1),bt=Object.create(this.lexer),mt={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(mt.yy[yt]=this.yy[yt]);bt.setInput(b,mt.yy),mt.yy.lexer=bt,mt.yy.parser=this,typeof bt.yylloc>"u"&&(bt.yylloc={});var dt=bt.yylloc;B.push(dt);var ht=bt.options&&bt.options.ranges;typeof mt.yy.parseError=="function"?this.parseError=mt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wt(){var Tt;return Tt=L.pop()||bt.lex()||st,typeof Tt!="number"&&(Tt instanceof Array&&(L=Tt,Tt=L.pop()),Tt=E.symbols_[Tt]||Tt),Tt}for(var X,pt,U,xt,nt={},Ot,Nt,qt,Ct;;){if(pt=_[_.length-1],this.defaultActions[pt]?U=this.defaultActions[pt]:((X===null||typeof X>"u")&&(X=wt()),U=j[pt]&&j[pt][X]),typeof U>"u"||!U.length||!U[0]){var Z="";Ct=[];for(Ot in j[pt])this.terminals_[Ot]&&Ot>it&&Ct.push("'"+this.terminals_[Ot]+"'");bt.showPosition?Z="Parse error on line "+(z+1)+`: +`+bt.showPosition()+` +Expecting `+Ct.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(X==st?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Z,{text:bt.match,token:this.terminals_[X]||X,line:bt.yylineno,loc:dt,expected:Ct})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+X);switch(U[0]){case 1:_.push(X),N.push(bt.yytext),B.push(bt.yylloc),_.push(U[1]),X=null,K=bt.yyleng,R=bt.yytext,z=bt.yylineno,dt=bt.yylloc;break;case 2:if(Nt=this.productions_[U[1]][1],nt.$=N[N.length-Nt],nt._$={first_line:B[B.length-(Nt||1)].first_line,last_line:B[B.length-1].last_line,first_column:B[B.length-(Nt||1)].first_column,last_column:B[B.length-1].last_column},ht&&(nt._$.range=[B[B.length-(Nt||1)].range[0],B[B.length-1].range[1]]),xt=this.performAction.apply(nt,[R,K,z,mt.yy,U[1],N,B].concat(ut)),typeof xt<"u")return xt;Nt&&(_=_.slice(0,-1*Nt*2),N=N.slice(0,-1*Nt),B=B.slice(0,-1*Nt)),_.push(this.productions_[U[1]][0]),N.push(nt.$),B.push(nt._$),qt=j[_[_.length-2]][_[_.length-1]],_.push(qt);break;case 3:return!0}}return!0}},p=function(){var m={EOF:1,parseError:function(E,_){if(this.yy.parser)this.yy.parser.parseError(E,_);else throw new Error(E)},setInput:function(b,E){return this.yy=E||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var E=b.match(/(?:\r\n?|\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var E=b.length,_=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),_.length-1&&(this.yylineno-=_.length-1);var N=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:_?(_.length===L.length?this.yylloc.first_column:0)+L[L.length-_.length].length-_[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),E=new Array(b.length+1).join("-");return b+this.upcomingInput()+` +`+E+"^"},test_match:function(b,E){var _,L,N;if(this.options.backtrack_lexer&&(N={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(N.yylloc.range=this.yylloc.range.slice(0))),L=b[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],_=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_)return _;if(this._backtrack){for(var B in N)this[B]=N[B];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,E,_,L;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),B=0;BE[0].length)){if(E=_,L=B,this.options.backtrack_lexer){if(b=this.test_match(_,N[B]),b!==!1)return b;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(b=this.test_match(E,N[L]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var E=this.next();return E||this.lex()},begin:function(E){this.conditionStack.push(E)},popState:function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},pushState:function(E){this.begin(E)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(E,_,L,N){switch(L){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return m}();f.lexer=p;function v(){this.yy={}}return v.prototype=f,f.Parser=v,new v}();Q0t.parser=Q0t;const xqe=Q0t,iRt={info:!1};let Z0t=iRt.info;const kqe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:xqe,db:{clear:()=>{Z0t=iRt.info},setInfo:i=>{Z0t=i},getInfo:()=>Z0t},renderer:{draw:(i,a,f)=>{Ut.debug(`rendering info diagram +`+i);const p=fdt(a);og(p,100,400,!0),p.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${f}`)}}}},Symbol.toStringTag,{value:"Module"}));var J0t=function(){var i=function(bt,mt,yt,dt){for(yt=yt||{},dt=bt.length;dt--;yt[bt[dt]]=mt);return yt},a=[1,3],f=[1,4],p=[1,5],v=[1,6],m=[1,10,12,14,16,18,19,20,21,22],b=[2,4],E=[1,5,10,12,14,16,18,19,20,21,22],_=[20,21,22],L=[2,7],N=[1,12],B=[1,13],j=[1,14],R=[1,15],z=[1,16],K=[1,17],it={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(mt,yt,dt,ht,wt,X,pt){var U=X.length-1;switch(wt){case 3:ht.setShowData(!0);break;case 6:this.$=X[U-1];break;case 8:ht.addSection(X[U-1],ht.cleanupValue(X[U]));break;case 9:this.$=X[U].trim(),ht.setDiagramTitle(this.$);break;case 10:this.$=X[U].trim(),ht.setAccTitle(this.$);break;case 11:case 12:this.$=X[U].trim(),ht.setAccDescription(this.$);break;case 13:ht.addSection(X[U].substr(8)),this.$=X[U].substr(8);break}},table:[{3:1,4:2,5:a,20:f,21:p,22:v},{1:[3]},{3:7,4:2,5:a,20:f,21:p,22:v},i(m,b,{6:8,7:[1,9]}),i(E,[2,14]),i(E,[2,15]),i(E,[2,16]),{1:[2,1]},i(_,L,{8:10,9:11,1:[2,2],10:N,12:B,14:j,16:R,18:z,19:K}),i(m,b,{6:18}),i(m,[2,5]),{4:19,20:f,21:p,22:v},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},i(_,[2,12]),i(_,[2,13]),i(_,L,{8:10,9:11,1:[2,3],10:N,12:B,14:j,16:R,18:z,19:K}),i(m,[2,6]),i(_,[2,8]),i(_,[2,9]),i(_,[2,10]),i(_,[2,11])],defaultActions:{7:[2,1]},parseError:function(mt,yt){if(yt.recoverable)this.trace(mt);else{var dt=new Error(mt);throw dt.hash=yt,dt}},parse:function(mt){var yt=this,dt=[0],ht=[],wt=[null],X=[],pt=this.table,U="",xt=0,nt=0,Ot=2,Nt=1,qt=X.slice.call(arguments,1),Ct=Object.create(this.lexer),Z={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(Z.yy[Tt]=this.yy[Tt]);Ct.setInput(mt,Z.yy),Z.yy.lexer=Ct,Z.yy.parser=this,typeof Ct.yylloc>"u"&&(Ct.yylloc={});var Ht=Ct.yylloc;X.push(Ht);var It=Ct.options&&Ct.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ft(){var ie;return ie=ht.pop()||Ct.lex()||Nt,typeof ie!="number"&&(ie instanceof Array&&(ht=ie,ie=ht.pop()),ie=yt.symbols_[ie]||ie),ie}for(var ke,pn,Me,ve,Ge={},Ke,we,_e,$t;;){if(pn=dt[dt.length-1],this.defaultActions[pn]?Me=this.defaultActions[pn]:((ke===null||typeof ke>"u")&&(ke=Ft()),Me=pt[pn]&&pt[pn][ke]),typeof Me>"u"||!Me.length||!Me[0]){var re="";$t=[];for(Ke in pt[pn])this.terminals_[Ke]&&Ke>Ot&&$t.push("'"+this.terminals_[Ke]+"'");Ct.showPosition?re="Parse error on line "+(xt+1)+`: +`+Ct.showPosition()+` +Expecting `+$t.join(", ")+", got '"+(this.terminals_[ke]||ke)+"'":re="Parse error on line "+(xt+1)+": Unexpected "+(ke==Nt?"end of input":"'"+(this.terminals_[ke]||ke)+"'"),this.parseError(re,{text:Ct.match,token:this.terminals_[ke]||ke,line:Ct.yylineno,loc:Ht,expected:$t})}if(Me[0]instanceof Array&&Me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pn+", token: "+ke);switch(Me[0]){case 1:dt.push(ke),wt.push(Ct.yytext),X.push(Ct.yylloc),dt.push(Me[1]),ke=null,nt=Ct.yyleng,U=Ct.yytext,xt=Ct.yylineno,Ht=Ct.yylloc;break;case 2:if(we=this.productions_[Me[1]][1],Ge.$=wt[wt.length-we],Ge._$={first_line:X[X.length-(we||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(we||1)].first_column,last_column:X[X.length-1].last_column},It&&(Ge._$.range=[X[X.length-(we||1)].range[0],X[X.length-1].range[1]]),ve=this.performAction.apply(Ge,[U,nt,xt,Z.yy,Me[1],wt,X].concat(qt)),typeof ve<"u")return ve;we&&(dt=dt.slice(0,-1*we*2),wt=wt.slice(0,-1*we),X=X.slice(0,-1*we)),dt.push(this.productions_[Me[1]][0]),wt.push(Ge.$),X.push(Ge._$),_e=pt[dt[dt.length-2]][dt[dt.length-1]],dt.push(_e);break;case 3:return!0}}return!0}},st=function(){var bt={EOF:1,parseError:function(yt,dt){if(this.yy.parser)this.yy.parser.parseError(yt,dt);else throw new Error(yt)},setInput:function(mt,yt){return this.yy=yt||this.yy||{},this._input=mt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var mt=this._input[0];this.yytext+=mt,this.yyleng++,this.offset++,this.match+=mt,this.matched+=mt;var yt=mt.match(/(?:\r\n?|\n).*/g);return yt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),mt},unput:function(mt){var yt=mt.length,dt=mt.split(/(?:\r\n?|\n)/g);this._input=mt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-yt),this.offset-=yt;var ht=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),dt.length-1&&(this.yylineno-=dt.length-1);var wt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:dt?(dt.length===ht.length?this.yylloc.first_column:0)+ht[ht.length-dt.length].length-dt[0].length:this.yylloc.first_column-yt},this.options.ranges&&(this.yylloc.range=[wt[0],wt[0]+this.yyleng-yt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(mt){this.unput(this.match.slice(mt))},pastInput:function(){var mt=this.matched.substr(0,this.matched.length-this.match.length);return(mt.length>20?"...":"")+mt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var mt=this.match;return mt.length<20&&(mt+=this._input.substr(0,20-mt.length)),(mt.substr(0,20)+(mt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var mt=this.pastInput(),yt=new Array(mt.length+1).join("-");return mt+this.upcomingInput()+` +`+yt+"^"},test_match:function(mt,yt){var dt,ht,wt;if(this.options.backtrack_lexer&&(wt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(wt.yylloc.range=this.yylloc.range.slice(0))),ht=mt[0].match(/(?:\r\n?|\n).*/g),ht&&(this.yylineno+=ht.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ht?ht[ht.length-1].length-ht[ht.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+mt[0].length},this.yytext+=mt[0],this.match+=mt[0],this.matches=mt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(mt[0].length),this.matched+=mt[0],dt=this.performAction.call(this,this.yy,this,yt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),dt)return dt;if(this._backtrack){for(var X in wt)this[X]=wt[X];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var mt,yt,dt,ht;this._more||(this.yytext="",this.match="");for(var wt=this._currentRules(),X=0;Xyt[0].length)){if(yt=dt,ht=X,this.options.backtrack_lexer){if(mt=this.test_match(dt,wt[X]),mt!==!1)return mt;if(this._backtrack){yt=!1;continue}else return!1}else if(!this.options.flex)break}return yt?(mt=this.test_match(yt,wt[ht]),mt!==!1?mt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var yt=this.next();return yt||this.lex()},begin:function(yt){this.conditionStack.push(yt)},popState:function(){var yt=this.conditionStack.length-1;return yt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(yt){return yt=this.conditionStack.length-1-Math.abs(yt||0),yt>=0?this.conditionStack[yt]:"INITIAL"},pushState:function(yt){this.begin(yt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(yt,dt,ht,wt){switch(ht){case 0:break;case 1:break;case 2:return 20;case 3:break;case 4:break;case 5:return this.begin("title"),12;case 6:return this.popState(),"title_value";case 7:return this.begin("acc_title"),14;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),16;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"txt";case 17:return 5;case 18:return 7;case 19:return"value";case 20:return 22}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[6],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,7,9,11,14,17,18,19,20],inclusive:!0}}};return bt}();it.lexer=st;function ut(){this.yy={}}return ut.prototype=it,it.Parser=ut,new ut}();J0t.parser=J0t;const Eqe=J0t,sRt=Lf.pie,CK={sections:{},showData:!1,config:sRt};let _K=CK.sections,tgt=CK.showData;const Tqe=structuredClone(sRt),Cqe={getConfig:()=>structuredClone(Tqe),clear:()=>{_K=structuredClone(CK.sections),tgt=CK.showData,ap()},setDiagramTitle:Z2,getDiagramTitle:Db,setAccTitle:cg,getAccTitle:op,setAccDescription:cp,getAccDescription:up,addSection:(i,a)=>{i=Dd(i,Le()),_K[i]===void 0&&(_K[i]=a,Ut.debug(`added new section: ${i}, with value: ${a}`))},getSections:()=>_K,cleanupValue:i=>(i.substring(0,1)===":"&&(i=i.substring(1).trim()),Number(i.trim())),setShowData:i=>{tgt=i},getShowData:()=>tgt},_qe=i=>` + .pieCircle{ + stroke: ${i.pieStrokeColor}; + stroke-width : ${i.pieStrokeWidth}; + opacity : ${i.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${i.pieOuterStrokeColor}; + stroke-width: ${i.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${i.pieTitleTextSize}; + fill: ${i.pieTitleTextColor}; + font-family: ${i.fontFamily}; + } + .slice { + font-family: ${i.fontFamily}; + fill: ${i.pieSectionTextColor}; + font-size:${i.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${i.pieLegendTextColor}; + font-family: ${i.fontFamily}; + font-size: ${i.pieLegendTextSize}; + } +`,Sqe=i=>{const a=Object.entries(i).map(p=>({label:p[0],value:p[1]})).sort((p,v)=>v.value-p.value);return $7e().value(p=>p.value)(a)},Aqe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:Eqe,db:Cqe,renderer:{draw:(i,a,f,p)=>{var pt,U;Ut.debug(`rendering pie chart +`+i);const v=p.db,m=Le(),b=idt(v.getConfig(),m.pie),E=450,_=((U=(pt=document.getElementById(a))==null?void 0:pt.parentElement)==null?void 0:U.offsetWidth)??b.useWidth,L=fdt(a);L.attr("viewBox",`0 0 ${_} ${E}`),og(L,E,_,b.useMaxWidth);const N=40,B=18,j=4,R=L.append("g");R.attr("transform","translate("+_/2+","+E/2+")");const{themeVariables:z}=m;let[K]=$A(z.pieOuterStrokeWidth);K??(K=2);const it=b.textPosition,st=Math.min(_,E)/2-N,ut=LA().innerRadius(0).outerRadius(st),bt=LA().innerRadius(st*it).outerRadius(st*it);R.append("circle").attr("cx",0).attr("cy",0).attr("r",st+K/2).attr("class","pieOuterCircle");const mt=v.getSections(),yt=Sqe(mt),dt=[z.pie1,z.pie2,z.pie3,z.pie4,z.pie5,z.pie6,z.pie7,z.pie8,z.pie9,z.pie10,z.pie11,z.pie12],ht=x1t(dt);R.selectAll("mySlices").data(yt).enter().append("path").attr("d",ut).attr("fill",xt=>ht(xt.data.label)).attr("class","pieCircle");let wt=0;Object.keys(mt).forEach(xt=>{wt+=mt[xt]}),R.selectAll("mySlices").data(yt).enter().append("text").text(xt=>(xt.data.value/wt*100).toFixed(0)+"%").attr("transform",xt=>"translate("+bt.centroid(xt)+")").style("text-anchor","middle").attr("class","slice"),R.append("text").text(v.getDiagramTitle()).attr("x",0).attr("y",-(E-50)/2).attr("class","pieTitleText");const X=R.selectAll(".legend").data(ht.domain()).enter().append("g").attr("class","legend").attr("transform",(xt,nt)=>{const Ot=B+j,Nt=Ot*ht.domain().length/2,qt=12*B,Ct=nt*Ot-Nt;return"translate("+qt+","+Ct+")"});X.append("rect").attr("width",B).attr("height",B).style("fill",ht).style("stroke",ht),X.data(yt).append("text").attr("x",B+j).attr("y",B-j).text(xt=>{const{label:nt,value:Ot}=xt.data;return v.getShowData()?`${nt} [${Ot}]`:nt})}},styles:_qe}},Symbol.toStringTag,{value:"Module"}));var egt=function(){var i=function(Me,ve,Ge,Ke){for(Ge=Ge||{},Ke=Me.length;Ke--;Ge[Me[Ke]]=ve);return Ge},a=[1,3],f=[1,4],p=[1,5],v=[1,6],m=[1,7],b=[1,5,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],E=[1,5,6,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],_=[32,33,34],L=[2,7],N=[1,13],B=[1,17],j=[1,18],R=[1,19],z=[1,20],K=[1,21],it=[1,22],st=[1,23],ut=[1,24],bt=[1,25],mt=[1,26],yt=[1,27],dt=[1,30],ht=[1,31],wt=[1,32],X=[1,33],pt=[1,34],U=[1,35],xt=[1,36],nt=[1,37],Ot=[1,38],Nt=[1,39],qt=[1,40],Ct=[1,41],Z=[1,42],Tt=[1,57],Ht=[1,58],It=[5,22,26,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51],Ft={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,QUADRANT:6,document:7,line:8,statement:9,axisDetails:10,quadrantDetails:11,points:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,text:21,point_start:22,point_x:23,point_y:24,"X-AXIS":25,"AXIS-TEXT-DELIMITER":26,"Y-AXIS":27,QUADRANT_1:28,QUADRANT_2:29,QUADRANT_3:30,QUADRANT_4:31,NEWLINE:32,SEMI:33,EOF:34,alphaNumToken:35,textNoTagsToken:36,STR:37,MD_STR:38,alphaNum:39,PUNCTUATION:40,AMP:41,NUM:42,ALPHA:43,COMMA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,UNDERSCORE:50,MINUS:51,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",6:"QUADRANT",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",22:"point_start",23:"point_x",24:"point_y",25:"X-AXIS",26:"AXIS-TEXT-DELIMITER",27:"Y-AXIS",28:"QUADRANT_1",29:"QUADRANT_2",30:"QUADRANT_3",31:"QUADRANT_4",32:"NEWLINE",33:"SEMI",34:"EOF",37:"STR",38:"MD_STR",40:"PUNCTUATION",41:"AMP",42:"NUM",43:"ALPHA",44:"COMMA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"UNDERSCORE",51:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,1],[9,1],[9,1],[9,2],[9,2],[9,2],[9,1],[9,1],[12,4],[10,4],[10,3],[10,2],[10,4],[10,3],[10,2],[11,2],[11,2],[11,2],[11,2],[4,1],[4,1],[4,1],[21,1],[21,2],[21,1],[21,1],[39,1],[39,2],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[36,1],[36,1],[36,1]],performAction:function(ve,Ge,Ke,we,_e,$t,re){var ie=$t.length-1;switch(_e){case 12:this.$=$t[ie].trim(),we.setDiagramTitle(this.$);break;case 13:this.$=$t[ie].trim(),we.setAccTitle(this.$);break;case 14:case 15:this.$=$t[ie].trim(),we.setAccDescription(this.$);break;case 16:we.addSection($t[ie].substr(8)),this.$=$t[ie].substr(8);break;case 17:we.addPoint($t[ie-3],$t[ie-1],$t[ie]);break;case 18:we.setXAxisLeftText($t[ie-2]),we.setXAxisRightText($t[ie]);break;case 19:$t[ie-1].text+=" ⟶ ",we.setXAxisLeftText($t[ie-1]);break;case 20:we.setXAxisLeftText($t[ie]);break;case 21:we.setYAxisBottomText($t[ie-2]),we.setYAxisTopText($t[ie]);break;case 22:$t[ie-1].text+=" ⟶ ",we.setYAxisBottomText($t[ie-1]);break;case 23:we.setYAxisBottomText($t[ie]);break;case 24:we.setQuadrant1Text($t[ie]);break;case 25:we.setQuadrant2Text($t[ie]);break;case 26:we.setQuadrant3Text($t[ie]);break;case 27:we.setQuadrant4Text($t[ie]);break;case 31:this.$={text:$t[ie],type:"text"};break;case 32:this.$={text:$t[ie-1].text+""+$t[ie],type:$t[ie-1].type};break;case 33:this.$={text:$t[ie],type:"text"};break;case 34:this.$={text:$t[ie],type:"markdown"};break;case 35:this.$=$t[ie];break;case 36:this.$=$t[ie-1]+""+$t[ie];break}},table:[{3:1,4:2,5:a,6:f,32:p,33:v,34:m},{1:[3]},{3:8,4:2,5:a,6:f,32:p,33:v,34:m},{3:9,4:2,5:a,6:f,32:p,33:v,34:m},i(b,[2,4],{7:10}),i(E,[2,28]),i(E,[2,29]),i(E,[2,30]),{1:[2,1]},{1:[2,2]},i(_,L,{8:11,9:12,10:14,11:15,12:16,21:28,35:29,1:[2,3],5:N,13:B,15:j,17:R,19:z,20:K,25:it,27:st,28:ut,29:bt,30:mt,31:yt,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z}),i(b,[2,5]),{4:43,32:p,33:v,34:m},i(_,L,{10:14,11:15,12:16,21:28,35:29,9:44,5:N,13:B,15:j,17:R,19:z,20:K,25:it,27:st,28:ut,29:bt,30:mt,31:yt,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z}),i(_,[2,9]),i(_,[2,10]),i(_,[2,11]),{14:[1,45]},{16:[1,46]},{18:[1,47]},i(_,[2,15]),i(_,[2,16]),{21:48,35:29,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z},{21:49,35:29,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z},{21:50,35:29,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z},{21:51,35:29,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z},{21:52,35:29,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z},{21:53,35:29,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z},{5:Tt,22:[1,54],35:56,36:55,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht},i(It,[2,31]),i(It,[2,33]),i(It,[2,34]),i(It,[2,37]),i(It,[2,38]),i(It,[2,39]),i(It,[2,40]),i(It,[2,41]),i(It,[2,42]),i(It,[2,43]),i(It,[2,44]),i(It,[2,45]),i(It,[2,46]),i(It,[2,47]),i(b,[2,6]),i(_,[2,8]),i(_,[2,12]),i(_,[2,13]),i(_,[2,14]),i(_,[2,20],{36:55,35:56,5:Tt,26:[1,59],40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),i(_,[2,23],{36:55,35:56,5:Tt,26:[1,60],40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),i(_,[2,24],{36:55,35:56,5:Tt,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),i(_,[2,25],{36:55,35:56,5:Tt,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),i(_,[2,26],{36:55,35:56,5:Tt,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),i(_,[2,27],{36:55,35:56,5:Tt,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),{23:[1,61]},i(It,[2,32]),i(It,[2,48]),i(It,[2,49]),i(It,[2,50]),i(_,[2,19],{35:29,21:62,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z}),i(_,[2,22],{35:29,21:63,37:dt,38:ht,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z}),{24:[1,64]},i(_,[2,18],{36:55,35:56,5:Tt,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),i(_,[2,21],{36:55,35:56,5:Tt,40:wt,41:X,42:pt,43:U,44:xt,45:nt,46:Ot,47:Nt,48:qt,49:Ct,50:Z,51:Ht}),i(_,[2,17])],defaultActions:{8:[2,1],9:[2,2]},parseError:function(ve,Ge){if(Ge.recoverable)this.trace(ve);else{var Ke=new Error(ve);throw Ke.hash=Ge,Ke}},parse:function(ve){var Ge=this,Ke=[0],we=[],_e=[null],$t=[],re=this.table,ie="",Oe=0,oe=0,Ne=2,me=1,cn=$t.slice.call(arguments,1),li=Object.create(this.lexer),ya={yy:{}};for(var da in this.yy)Object.prototype.hasOwnProperty.call(this.yy,da)&&(ya.yy[da]=this.yy[da]);li.setInput(ve,ya.yy),ya.yy.lexer=li,ya.yy.parser=this,typeof li.yylloc>"u"&&(li.yylloc={});var Oo=li.yylloc;$t.push(Oo);var ds=li.options&&li.options.ranges;typeof ya.yy.parseError=="function"?this.parseError=ya.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dr(){var Gs;return Gs=we.pop()||li.lex()||me,typeof Gs!="number"&&(Gs instanceof Array&&(we=Gs,Gs=we.pop()),Gs=Ge.symbols_[Gs]||Gs),Gs}for(var nr,di,Ee,Yn,He={},Ti,gn,ks,qa;;){if(di=Ke[Ke.length-1],this.defaultActions[di]?Ee=this.defaultActions[di]:((nr===null||typeof nr>"u")&&(nr=Dr()),Ee=re[di]&&re[di][nr]),typeof Ee>"u"||!Ee.length||!Ee[0]){var La="";qa=[];for(Ti in re[di])this.terminals_[Ti]&&Ti>Ne&&qa.push("'"+this.terminals_[Ti]+"'");li.showPosition?La="Parse error on line "+(Oe+1)+`: +`+li.showPosition()+` +Expecting `+qa.join(", ")+", got '"+(this.terminals_[nr]||nr)+"'":La="Parse error on line "+(Oe+1)+": Unexpected "+(nr==me?"end of input":"'"+(this.terminals_[nr]||nr)+"'"),this.parseError(La,{text:li.match,token:this.terminals_[nr]||nr,line:li.yylineno,loc:Oo,expected:qa})}if(Ee[0]instanceof Array&&Ee.length>1)throw new Error("Parse Error: multiple actions possible at state: "+di+", token: "+nr);switch(Ee[0]){case 1:Ke.push(nr),_e.push(li.yytext),$t.push(li.yylloc),Ke.push(Ee[1]),nr=null,oe=li.yyleng,ie=li.yytext,Oe=li.yylineno,Oo=li.yylloc;break;case 2:if(gn=this.productions_[Ee[1]][1],He.$=_e[_e.length-gn],He._$={first_line:$t[$t.length-(gn||1)].first_line,last_line:$t[$t.length-1].last_line,first_column:$t[$t.length-(gn||1)].first_column,last_column:$t[$t.length-1].last_column},ds&&(He._$.range=[$t[$t.length-(gn||1)].range[0],$t[$t.length-1].range[1]]),Yn=this.performAction.apply(He,[ie,oe,Oe,ya.yy,Ee[1],_e,$t].concat(cn)),typeof Yn<"u")return Yn;gn&&(Ke=Ke.slice(0,-1*gn*2),_e=_e.slice(0,-1*gn),$t=$t.slice(0,-1*gn)),Ke.push(this.productions_[Ee[1]][0]),_e.push(He.$),$t.push(He._$),ks=re[Ke[Ke.length-2]][Ke[Ke.length-1]],Ke.push(ks);break;case 3:return!0}}return!0}},ke=function(){var Me={EOF:1,parseError:function(Ge,Ke){if(this.yy.parser)this.yy.parser.parseError(Ge,Ke);else throw new Error(Ge)},setInput:function(ve,Ge){return this.yy=Ge||this.yy||{},this._input=ve,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ve=this._input[0];this.yytext+=ve,this.yyleng++,this.offset++,this.match+=ve,this.matched+=ve;var Ge=ve.match(/(?:\r\n?|\n).*/g);return Ge?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ve},unput:function(ve){var Ge=ve.length,Ke=ve.split(/(?:\r\n?|\n)/g);this._input=ve+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ge),this.offset-=Ge;var we=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ke.length-1&&(this.yylineno-=Ke.length-1);var _e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ke?(Ke.length===we.length?this.yylloc.first_column:0)+we[we.length-Ke.length].length-Ke[0].length:this.yylloc.first_column-Ge},this.options.ranges&&(this.yylloc.range=[_e[0],_e[0]+this.yyleng-Ge]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(ve){this.unput(this.match.slice(ve))},pastInput:function(){var ve=this.matched.substr(0,this.matched.length-this.match.length);return(ve.length>20?"...":"")+ve.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var ve=this.match;return ve.length<20&&(ve+=this._input.substr(0,20-ve.length)),(ve.substr(0,20)+(ve.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var ve=this.pastInput(),Ge=new Array(ve.length+1).join("-");return ve+this.upcomingInput()+` +`+Ge+"^"},test_match:function(ve,Ge){var Ke,we,_e;if(this.options.backtrack_lexer&&(_e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_e.yylloc.range=this.yylloc.range.slice(0))),we=ve[0].match(/(?:\r\n?|\n).*/g),we&&(this.yylineno+=we.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:we?we[we.length-1].length-we[we.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ve[0].length},this.yytext+=ve[0],this.match+=ve[0],this.matches=ve,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ve[0].length),this.matched+=ve[0],Ke=this.performAction.call(this,this.yy,this,Ge,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ke)return Ke;if(this._backtrack){for(var $t in _e)this[$t]=_e[$t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ve,Ge,Ke,we;this._more||(this.yytext="",this.match="");for(var _e=this._currentRules(),$t=0;$t<_e.length;$t++)if(Ke=this._input.match(this.rules[_e[$t]]),Ke&&(!Ge||Ke[0].length>Ge[0].length)){if(Ge=Ke,we=$t,this.options.backtrack_lexer){if(ve=this.test_match(Ke,_e[$t]),ve!==!1)return ve;if(this._backtrack){Ge=!1;continue}else return!1}else if(!this.options.flex)break}return Ge?(ve=this.test_match(Ge,_e[we]),ve!==!1?ve:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Ge=this.next();return Ge||this.lex()},begin:function(Ge){this.conditionStack.push(Ge)},popState:function(){var Ge=this.conditionStack.length-1;return Ge>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Ge){return Ge=this.conditionStack.length-1-Math.abs(Ge||0),Ge>=0?this.conditionStack[Ge]:"INITIAL"},pushState:function(Ge){this.begin(Ge)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Ge,Ke,we,_e){switch(we){case 0:break;case 1:break;case 2:return 32;case 3:break;case 4:return this.begin("title"),13;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),15;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),17;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 25;case 14:return 27;case 15:return 26;case 16:return 28;case 17:return 29;case 18:return 30;case 19:return 31;case 20:this.begin("md_string");break;case 21:return"MD_STR";case 22:this.popState();break;case 23:this.begin("string");break;case 24:this.popState();break;case 25:return"STR";case 26:return this.begin("point_start"),22;case 27:return this.begin("point_x"),23;case 28:this.popState();break;case 29:this.popState(),this.begin("point_y");break;case 30:return this.popState(),24;case 31:return 6;case 32:return 43;case 33:return"COLON";case 34:return 45;case 35:return 44;case 36:return 46;case 37:return 46;case 38:return 47;case 39:return 49;case 40:return 50;case 41:return 48;case 42:return 41;case 43:return 51;case 44:return 42;case 45:return 5;case 46:return 33;case 47:return 40;case 48:return 34}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{point_y:{rules:[30],inclusive:!1},point_x:{rules:[29],inclusive:!1},point_start:{rules:[27,28],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[21,22],inclusive:!1},string:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,23,26,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return Me}();Ft.lexer=ke;function pn(){this.yy={}}return pn.prototype=Ft,Ft.Parser=pn,new pn}();egt.parser=egt;const Lqe=egt,fg=nDt();class Mqe{constructor(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var a,f,p,v,m,b,E,_,L,N,B,j,R,z,K,it,st,ut;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((a=Lf.quadrantChart)==null?void 0:a.chartWidth)||500,chartWidth:((f=Lf.quadrantChart)==null?void 0:f.chartHeight)||500,titlePadding:((p=Lf.quadrantChart)==null?void 0:p.titlePadding)||10,titleFontSize:((v=Lf.quadrantChart)==null?void 0:v.titleFontSize)||20,quadrantPadding:((m=Lf.quadrantChart)==null?void 0:m.quadrantPadding)||5,xAxisLabelPadding:((b=Lf.quadrantChart)==null?void 0:b.xAxisLabelPadding)||5,yAxisLabelPadding:((E=Lf.quadrantChart)==null?void 0:E.yAxisLabelPadding)||5,xAxisLabelFontSize:((_=Lf.quadrantChart)==null?void 0:_.xAxisLabelFontSize)||16,yAxisLabelFontSize:((L=Lf.quadrantChart)==null?void 0:L.yAxisLabelFontSize)||16,quadrantLabelFontSize:((N=Lf.quadrantChart)==null?void 0:N.quadrantLabelFontSize)||16,quadrantTextTopPadding:((B=Lf.quadrantChart)==null?void 0:B.quadrantTextTopPadding)||5,pointTextPadding:((j=Lf.quadrantChart)==null?void 0:j.pointTextPadding)||5,pointLabelFontSize:((R=Lf.quadrantChart)==null?void 0:R.pointLabelFontSize)||12,pointRadius:((z=Lf.quadrantChart)==null?void 0:z.pointRadius)||5,xAxisPosition:((K=Lf.quadrantChart)==null?void 0:K.xAxisPosition)||"top",yAxisPosition:((it=Lf.quadrantChart)==null?void 0:it.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((st=Lf.quadrantChart)==null?void 0:st.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((ut=Lf.quadrantChart)==null?void 0:ut.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:fg.quadrant1Fill,quadrant2Fill:fg.quadrant2Fill,quadrant3Fill:fg.quadrant3Fill,quadrant4Fill:fg.quadrant4Fill,quadrant1TextFill:fg.quadrant1TextFill,quadrant2TextFill:fg.quadrant2TextFill,quadrant3TextFill:fg.quadrant3TextFill,quadrant4TextFill:fg.quadrant4TextFill,quadrantPointFill:fg.quadrantPointFill,quadrantPointTextFill:fg.quadrantPointTextFill,quadrantXAxisTextFill:fg.quadrantXAxisTextFill,quadrantYAxisTextFill:fg.quadrantYAxisTextFill,quadrantTitleFill:fg.quadrantTitleFill,quadrantInternalBorderStrokeFill:fg.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:fg.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),Ut.info("clear called")}setData(a){this.data={...this.data,...a}}addPoints(a){this.data.points=[...a,...this.data.points]}setConfig(a){Ut.trace("setConfig called with: ",a),this.config={...this.config,...a}}setThemeConfig(a){Ut.trace("setThemeConfig called with: ",a),this.themeConfig={...this.themeConfig,...a}}calculateSpace(a,f,p,v){const m=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,b={top:a==="top"&&f?m:0,bottom:a==="bottom"&&f?m:0},E=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,_={left:this.config.yAxisPosition==="left"&&p?E:0,right:this.config.yAxisPosition==="right"&&p?E:0},L=this.config.titleFontSize+this.config.titlePadding*2,N={top:v?L:0},B=this.config.quadrantPadding+_.left,j=this.config.quadrantPadding+b.top+N.top,R=this.config.chartWidth-this.config.quadrantPadding*2-_.left-_.right,z=this.config.chartHeight-this.config.quadrantPadding*2-b.top-b.bottom-N.top,K=R/2,it=z/2;return{xAxisSpace:b,yAxisSpace:_,titleSpace:N,quadrantSpace:{quadrantLeft:B,quadrantTop:j,quadrantWidth:R,quadrantHalfWidth:K,quadrantHeight:z,quadrantHalfHeight:it}}}getAxisLabels(a,f,p,v){const{quadrantSpace:m,titleSpace:b}=v,{quadrantHalfHeight:E,quadrantHeight:_,quadrantLeft:L,quadrantHalfWidth:N,quadrantTop:B,quadrantWidth:j}=m,R=this.data.points.length===0,z=[];return this.data.xAxisLeftText&&f&&z.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:L+(R?N/2:0),y:a==="top"?this.config.xAxisLabelPadding+b.top:this.config.xAxisLabelPadding+B+_+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:R?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&f&&z.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:L+N+(R?N/2:0),y:a==="top"?this.config.xAxisLabelPadding+b.top:this.config.xAxisLabelPadding+B+_+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:R?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&p&&z.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+L+j+this.config.quadrantPadding,y:B+_-(R?E/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:R?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&p&&z.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+L+j+this.config.quadrantPadding,y:B+E-(R?E/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:R?"center":"left",horizontalPos:"top",rotation:-90}),z}getQuadrants(a){const{quadrantSpace:f}=a,{quadrantHalfHeight:p,quadrantLeft:v,quadrantHalfWidth:m,quadrantTop:b}=f,E=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:v+m,y:b,width:m,height:p,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:v,y:b,width:m,height:p,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:v,y:b+p,width:m,height:p,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:v+m,y:b+p,width:m,height:p,fill:this.themeConfig.quadrant4Fill}];for(const _ of E)_.text.x=_.x+_.width/2,this.data.points.length===0?(_.text.y=_.y+_.height/2,_.text.horizontalPos="middle"):(_.text.y=_.y+this.config.quadrantTextTopPadding,_.text.horizontalPos="top");return E}getQuadrantPoints(a){const{quadrantSpace:f}=a,{quadrantHeight:p,quadrantLeft:v,quadrantTop:m,quadrantWidth:b}=f,E=BU().domain([0,1]).range([v,b+v]),_=BU().domain([0,1]).range([p+m,m]);return this.data.points.map(N=>({x:E(N.x),y:_(N.y),fill:this.themeConfig.quadrantPointFill,radius:this.config.pointRadius,text:{text:N.text,fill:this.themeConfig.quadrantPointTextFill,x:E(N.x),y:_(N.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0}}))}getBorders(a){const f=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:p}=a,{quadrantHalfHeight:v,quadrantHeight:m,quadrantLeft:b,quadrantHalfWidth:E,quadrantTop:_,quadrantWidth:L}=p;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:b-f,y1:_,x2:b+L+f,y2:_},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:b+L,y1:_+f,x2:b+L,y2:_+m-f},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:b-f,y1:_+m,x2:b+L+f,y2:_+m},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:b,y1:_+f,x2:b,y2:_+m-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:b+E,y1:_+f,x2:b+E,y2:_+m-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:b+f,y1:_+v,x2:b+L-f,y2:_+v}]}getTitle(a){if(a)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const a=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),f=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),p=this.config.showTitle&&!!this.data.titleText,v=this.data.points.length>0?"bottom":this.config.xAxisPosition,m=this.calculateSpace(v,a,f,p);return{points:this.getQuadrantPoints(m),quadrants:this.getQuadrants(m),axisLabels:this.getAxisLabels(v,a,f,m),borderLines:this.getBorders(m),title:this.getTitle(p)}}}const Iqe=Le();function M5(i){return Dd(i.trim(),Iqe)}const x0=new Mqe;function Dqe(i){x0.setData({quadrant1Text:M5(i.text)})}function Oqe(i){x0.setData({quadrant2Text:M5(i.text)})}function Nqe(i){x0.setData({quadrant3Text:M5(i.text)})}function Pqe(i){x0.setData({quadrant4Text:M5(i.text)})}function Fqe(i){x0.setData({xAxisLeftText:M5(i.text)})}function Bqe(i){x0.setData({xAxisRightText:M5(i.text)})}function Rqe(i){x0.setData({yAxisTopText:M5(i.text)})}function jqe(i){x0.setData({yAxisBottomText:M5(i.text)})}function $qe(i,a,f){x0.addPoints([{x:a,y:f,text:M5(i.text)}])}function zqe(i){x0.setConfig({chartWidth:i})}function qqe(i){x0.setConfig({chartHeight:i})}function Hqe(){const i=Le(),{themeVariables:a,quadrantChart:f}=i;return f&&x0.setConfig(f),x0.setThemeConfig({quadrant1Fill:a.quadrant1Fill,quadrant2Fill:a.quadrant2Fill,quadrant3Fill:a.quadrant3Fill,quadrant4Fill:a.quadrant4Fill,quadrant1TextFill:a.quadrant1TextFill,quadrant2TextFill:a.quadrant2TextFill,quadrant3TextFill:a.quadrant3TextFill,quadrant4TextFill:a.quadrant4TextFill,quadrantPointFill:a.quadrantPointFill,quadrantPointTextFill:a.quadrantPointTextFill,quadrantXAxisTextFill:a.quadrantXAxisTextFill,quadrantYAxisTextFill:a.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:a.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:a.quadrantInternalBorderStrokeFill,quadrantTitleFill:a.quadrantTitleFill}),x0.setData({titleText:Db()}),x0.build()}const Gqe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:Lqe,db:{setWidth:zqe,setHeight:qqe,setQuadrant1Text:Dqe,setQuadrant2Text:Oqe,setQuadrant3Text:Nqe,setQuadrant4Text:Pqe,setXAxisLeftText:Fqe,setXAxisRightText:Bqe,setYAxisTopText:Rqe,setYAxisBottomText:jqe,addPoint:$qe,getQuadrantData:Hqe,clear:function(){x0.clear(),ap()},setAccTitle:cg,getAccTitle:op,setDiagramTitle:Z2,getDiagramTitle:Db,getAccDescription:up,setAccDescription:cp},renderer:{draw:(i,a,f,p)=>{var wt,X,pt;function v(U){return U==="top"?"hanging":"middle"}function m(U){return U==="left"?"start":"middle"}function b(U){return`translate(${U.x}, ${U.y}) rotate(${U.rotation||0})`}const E=Le();Ut.debug(`Rendering quadrant chart +`+i);const _=E.securityLevel;let L;_==="sandbox"&&(L=yr("#i"+a));const B=yr(_==="sandbox"?L.nodes()[0].contentDocument.body:"body").select(`[id="${a}"]`),j=B.append("g").attr("class","main"),R=((wt=E.quadrantChart)==null?void 0:wt.chartWidth)||500,z=((X=E.quadrantChart)==null?void 0:X.chartHeight)||500;og(B,z,R,((pt=E.quadrantChart)==null?void 0:pt.useMaxWidth)||!0),B.attr("viewBox","0 0 "+R+" "+z),p.db.setHeight(z),p.db.setWidth(R);const K=p.db.getQuadrantData(),it=j.append("g").attr("class","quadrants"),st=j.append("g").attr("class","border"),ut=j.append("g").attr("class","data-points"),bt=j.append("g").attr("class","labels"),mt=j.append("g").attr("class","title");K.title&&mt.append("text").attr("x",0).attr("y",0).attr("fill",K.title.fill).attr("font-size",K.title.fontSize).attr("dominant-baseline",v(K.title.horizontalPos)).attr("text-anchor",m(K.title.verticalPos)).attr("transform",b(K.title)).text(K.title.text),K.borderLines&&st.selectAll("line").data(K.borderLines).enter().append("line").attr("x1",U=>U.x1).attr("y1",U=>U.y1).attr("x2",U=>U.x2).attr("y2",U=>U.y2).style("stroke",U=>U.strokeFill).style("stroke-width",U=>U.strokeWidth);const yt=it.selectAll("g.quadrant").data(K.quadrants).enter().append("g").attr("class","quadrant");yt.append("rect").attr("x",U=>U.x).attr("y",U=>U.y).attr("width",U=>U.width).attr("height",U=>U.height).attr("fill",U=>U.fill),yt.append("text").attr("x",0).attr("y",0).attr("fill",U=>U.text.fill).attr("font-size",U=>U.text.fontSize).attr("dominant-baseline",U=>v(U.text.horizontalPos)).attr("text-anchor",U=>m(U.text.verticalPos)).attr("transform",U=>b(U.text)).text(U=>U.text.text),bt.selectAll("g.label").data(K.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(U=>U.text).attr("fill",U=>U.fill).attr("font-size",U=>U.fontSize).attr("dominant-baseline",U=>v(U.horizontalPos)).attr("text-anchor",U=>m(U.verticalPos)).attr("transform",U=>b(U));const ht=ut.selectAll("g.data-point").data(K.points).enter().append("g").attr("class","data-point");ht.append("circle").attr("cx",U=>U.x).attr("cy",U=>U.y).attr("r",U=>U.radius).attr("fill",U=>U.fill),ht.append("text").attr("x",0).attr("y",0).text(U=>U.text.text).attr("fill",U=>U.text.fill).attr("font-size",U=>U.text.fontSize).attr("dominant-baseline",U=>v(U.text.horizontalPos)).attr("text-anchor",U=>m(U.text.verticalPos)).attr("transform",U=>b(U.text))}},styles:()=>""}},Symbol.toStringTag,{value:"Module"}));var ngt=function(){var i=function(Me,ve,Ge,Ke){for(Ge=Ge||{},Ke=Me.length;Ke--;Ge[Me[Ke]]=ve);return Ge},a=[1,3],f=[1,4],p=[1,5],v=[1,6],m=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],b=[1,18],E=[2,7],_=[1,22],L=[1,23],N=[1,24],B=[1,25],j=[1,26],R=[1,27],z=[1,20],K=[1,28],it=[1,29],st=[62,63],ut=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],bt=[1,47],mt=[1,48],yt=[1,49],dt=[1,50],ht=[1,51],wt=[1,52],X=[1,53],pt=[53,54],U=[1,64],xt=[1,60],nt=[1,61],Ot=[1,62],Nt=[1,63],qt=[1,65],Ct=[1,69],Z=[1,70],Tt=[1,67],Ht=[1,68],It=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],Ft={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:function(ve,Ge,Ke,we,_e,$t,re){var ie=$t.length-1;switch(_e){case 4:this.$=$t[ie].trim(),we.setAccTitle(this.$);break;case 5:case 6:this.$=$t[ie].trim(),we.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:we.addRequirement($t[ie-3],$t[ie-4]);break;case 14:we.setNewReqId($t[ie-2]);break;case 15:we.setNewReqText($t[ie-2]);break;case 16:we.setNewReqRisk($t[ie-2]);break;case 17:we.setNewReqVerifyMethod($t[ie-2]);break;case 20:this.$=we.RequirementType.REQUIREMENT;break;case 21:this.$=we.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=we.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=we.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=we.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=we.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=we.RiskLevel.LOW_RISK;break;case 27:this.$=we.RiskLevel.MED_RISK;break;case 28:this.$=we.RiskLevel.HIGH_RISK;break;case 29:this.$=we.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=we.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=we.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=we.VerifyType.VERIFY_TEST;break;case 33:we.addElement($t[ie-3]);break;case 34:we.setNewElementType($t[ie-2]);break;case 35:we.setNewElementDocRef($t[ie-2]);break;case 38:we.addRelationship($t[ie-2],$t[ie],$t[ie-4]);break;case 39:we.addRelationship($t[ie-2],$t[ie-4],$t[ie]);break;case 40:this.$=we.Relationships.CONTAINS;break;case 41:this.$=we.Relationships.COPIES;break;case 42:this.$=we.Relationships.DERIVES;break;case 43:this.$=we.Relationships.SATISFIES;break;case 44:this.$=we.Relationships.VERIFIES;break;case 45:this.$=we.Relationships.REFINES;break;case 46:this.$=we.Relationships.TRACES;break}},table:[{3:1,4:2,6:a,9:f,11:p,13:v},{1:[3]},{3:8,4:2,5:[1,7],6:a,9:f,11:p,13:v},{5:[1,9]},{10:[1,10]},{12:[1,11]},i(m,[2,6]),{3:12,4:2,6:a,9:f,11:p,13:v},{1:[2,2]},{4:17,5:b,7:13,8:E,9:f,11:p,13:v,14:14,15:15,16:16,17:19,23:21,31:_,32:L,33:N,34:B,35:j,36:R,44:z,62:K,63:it},i(m,[2,4]),i(m,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:b,7:31,8:E,9:f,11:p,13:v,14:14,15:15,16:16,17:19,23:21,31:_,32:L,33:N,34:B,35:j,36:R,44:z,62:K,63:it},{4:17,5:b,7:32,8:E,9:f,11:p,13:v,14:14,15:15,16:16,17:19,23:21,31:_,32:L,33:N,34:B,35:j,36:R,44:z,62:K,63:it},{4:17,5:b,7:33,8:E,9:f,11:p,13:v,14:14,15:15,16:16,17:19,23:21,31:_,32:L,33:N,34:B,35:j,36:R,44:z,62:K,63:it},{4:17,5:b,7:34,8:E,9:f,11:p,13:v,14:14,15:15,16:16,17:19,23:21,31:_,32:L,33:N,34:B,35:j,36:R,44:z,62:K,63:it},{4:17,5:b,7:35,8:E,9:f,11:p,13:v,14:14,15:15,16:16,17:19,23:21,31:_,32:L,33:N,34:B,35:j,36:R,44:z,62:K,63:it},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},i(st,[2,20]),i(st,[2,21]),i(st,[2,22]),i(st,[2,23]),i(st,[2,24]),i(st,[2,25]),i(ut,[2,49]),i(ut,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:bt,56:mt,57:yt,58:dt,59:ht,60:wt,61:X},{52:54,55:bt,56:mt,57:yt,58:dt,59:ht,60:wt,61:X},{5:[1,55]},{5:[1,56]},{53:[1,57]},i(pt,[2,40]),i(pt,[2,41]),i(pt,[2,42]),i(pt,[2,43]),i(pt,[2,44]),i(pt,[2,45]),i(pt,[2,46]),{54:[1,58]},{5:U,20:59,21:xt,24:nt,26:Ot,28:Nt,30:qt},{5:Ct,30:Z,46:66,47:Tt,49:Ht},{23:71,62:K,63:it},{23:72,62:K,63:it},i(It,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:U,20:77,21:xt,24:nt,26:Ot,28:Nt,30:qt},i(It,[2,19]),i(It,[2,33]),{22:[1,78]},{22:[1,79]},{5:Ct,30:Z,46:80,47:Tt,49:Ht},i(It,[2,37]),i(It,[2,38]),i(It,[2,39]),{23:81,62:K,63:it},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},i(It,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},i(It,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:U,20:106,21:xt,24:nt,26:Ot,28:Nt,30:qt},{5:U,20:107,21:xt,24:nt,26:Ot,28:Nt,30:qt},{5:U,20:108,21:xt,24:nt,26:Ot,28:Nt,30:qt},{5:U,20:109,21:xt,24:nt,26:Ot,28:Nt,30:qt},{5:Ct,30:Z,46:110,47:Tt,49:Ht},{5:Ct,30:Z,46:111,47:Tt,49:Ht},i(It,[2,14]),i(It,[2,15]),i(It,[2,16]),i(It,[2,17]),i(It,[2,34]),i(It,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:function(ve,Ge){if(Ge.recoverable)this.trace(ve);else{var Ke=new Error(ve);throw Ke.hash=Ge,Ke}},parse:function(ve){var Ge=this,Ke=[0],we=[],_e=[null],$t=[],re=this.table,ie="",Oe=0,oe=0,Ne=2,me=1,cn=$t.slice.call(arguments,1),li=Object.create(this.lexer),ya={yy:{}};for(var da in this.yy)Object.prototype.hasOwnProperty.call(this.yy,da)&&(ya.yy[da]=this.yy[da]);li.setInput(ve,ya.yy),ya.yy.lexer=li,ya.yy.parser=this,typeof li.yylloc>"u"&&(li.yylloc={});var Oo=li.yylloc;$t.push(Oo);var ds=li.options&&li.options.ranges;typeof ya.yy.parseError=="function"?this.parseError=ya.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dr(){var Gs;return Gs=we.pop()||li.lex()||me,typeof Gs!="number"&&(Gs instanceof Array&&(we=Gs,Gs=we.pop()),Gs=Ge.symbols_[Gs]||Gs),Gs}for(var nr,di,Ee,Yn,He={},Ti,gn,ks,qa;;){if(di=Ke[Ke.length-1],this.defaultActions[di]?Ee=this.defaultActions[di]:((nr===null||typeof nr>"u")&&(nr=Dr()),Ee=re[di]&&re[di][nr]),typeof Ee>"u"||!Ee.length||!Ee[0]){var La="";qa=[];for(Ti in re[di])this.terminals_[Ti]&&Ti>Ne&&qa.push("'"+this.terminals_[Ti]+"'");li.showPosition?La="Parse error on line "+(Oe+1)+`: +`+li.showPosition()+` +Expecting `+qa.join(", ")+", got '"+(this.terminals_[nr]||nr)+"'":La="Parse error on line "+(Oe+1)+": Unexpected "+(nr==me?"end of input":"'"+(this.terminals_[nr]||nr)+"'"),this.parseError(La,{text:li.match,token:this.terminals_[nr]||nr,line:li.yylineno,loc:Oo,expected:qa})}if(Ee[0]instanceof Array&&Ee.length>1)throw new Error("Parse Error: multiple actions possible at state: "+di+", token: "+nr);switch(Ee[0]){case 1:Ke.push(nr),_e.push(li.yytext),$t.push(li.yylloc),Ke.push(Ee[1]),nr=null,oe=li.yyleng,ie=li.yytext,Oe=li.yylineno,Oo=li.yylloc;break;case 2:if(gn=this.productions_[Ee[1]][1],He.$=_e[_e.length-gn],He._$={first_line:$t[$t.length-(gn||1)].first_line,last_line:$t[$t.length-1].last_line,first_column:$t[$t.length-(gn||1)].first_column,last_column:$t[$t.length-1].last_column},ds&&(He._$.range=[$t[$t.length-(gn||1)].range[0],$t[$t.length-1].range[1]]),Yn=this.performAction.apply(He,[ie,oe,Oe,ya.yy,Ee[1],_e,$t].concat(cn)),typeof Yn<"u")return Yn;gn&&(Ke=Ke.slice(0,-1*gn*2),_e=_e.slice(0,-1*gn),$t=$t.slice(0,-1*gn)),Ke.push(this.productions_[Ee[1]][0]),_e.push(He.$),$t.push(He._$),ks=re[Ke[Ke.length-2]][Ke[Ke.length-1]],Ke.push(ks);break;case 3:return!0}}return!0}},ke=function(){var Me={EOF:1,parseError:function(Ge,Ke){if(this.yy.parser)this.yy.parser.parseError(Ge,Ke);else throw new Error(Ge)},setInput:function(ve,Ge){return this.yy=Ge||this.yy||{},this._input=ve,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ve=this._input[0];this.yytext+=ve,this.yyleng++,this.offset++,this.match+=ve,this.matched+=ve;var Ge=ve.match(/(?:\r\n?|\n).*/g);return Ge?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ve},unput:function(ve){var Ge=ve.length,Ke=ve.split(/(?:\r\n?|\n)/g);this._input=ve+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ge),this.offset-=Ge;var we=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ke.length-1&&(this.yylineno-=Ke.length-1);var _e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ke?(Ke.length===we.length?this.yylloc.first_column:0)+we[we.length-Ke.length].length-Ke[0].length:this.yylloc.first_column-Ge},this.options.ranges&&(this.yylloc.range=[_e[0],_e[0]+this.yyleng-Ge]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(ve){this.unput(this.match.slice(ve))},pastInput:function(){var ve=this.matched.substr(0,this.matched.length-this.match.length);return(ve.length>20?"...":"")+ve.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var ve=this.match;return ve.length<20&&(ve+=this._input.substr(0,20-ve.length)),(ve.substr(0,20)+(ve.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var ve=this.pastInput(),Ge=new Array(ve.length+1).join("-");return ve+this.upcomingInput()+` +`+Ge+"^"},test_match:function(ve,Ge){var Ke,we,_e;if(this.options.backtrack_lexer&&(_e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_e.yylloc.range=this.yylloc.range.slice(0))),we=ve[0].match(/(?:\r\n?|\n).*/g),we&&(this.yylineno+=we.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:we?we[we.length-1].length-we[we.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ve[0].length},this.yytext+=ve[0],this.match+=ve[0],this.matches=ve,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ve[0].length),this.matched+=ve[0],Ke=this.performAction.call(this,this.yy,this,Ge,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ke)return Ke;if(this._backtrack){for(var $t in _e)this[$t]=_e[$t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ve,Ge,Ke,we;this._more||(this.yytext="",this.match="");for(var _e=this._currentRules(),$t=0;$t<_e.length;$t++)if(Ke=this._input.match(this.rules[_e[$t]]),Ke&&(!Ge||Ke[0].length>Ge[0].length)){if(Ge=Ke,we=$t,this.options.backtrack_lexer){if(ve=this.test_match(Ke,_e[$t]),ve!==!1)return ve;if(this._backtrack){Ge=!1;continue}else return!1}else if(!this.options.flex)break}return Ge?(ve=this.test_match(Ge,_e[we]),ve!==!1?ve:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Ge=this.next();return Ge||this.lex()},begin:function(Ge){this.conditionStack.push(Ge)},popState:function(){var Ge=this.conditionStack.length-1;return Ge>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Ge){return Ge=this.conditionStack.length-1-Math.abs(Ge||0),Ge>=0?this.conditionStack[Ge]:"INITIAL"},pushState:function(Ge){this.begin(Ge)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Ge,Ke,we,_e){switch(we){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return Ke.yytext=Ke.yytext.trim(),62}},rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return Me}();Ft.lexer=ke;function pn(){this.yy={}}return pn.prototype=Ft,Ft.Parser=pn,new pn}();ngt.parser=ngt;const Vqe=ngt;let rgt=[],dp={},MP={},fk={},IP={};const Uqe={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:()=>Le().req,addRequirement:(i,a)=>(MP[i]===void 0&&(MP[i]={name:i,type:a,id:dp.id,text:dp.text,risk:dp.risk,verifyMethod:dp.verifyMethod}),dp={},MP[i]),getRequirements:()=>MP,setNewReqId:i=>{dp!==void 0&&(dp.id=i)},setNewReqText:i=>{dp!==void 0&&(dp.text=i)},setNewReqRisk:i=>{dp!==void 0&&(dp.risk=i)},setNewReqVerifyMethod:i=>{dp!==void 0&&(dp.verifyMethod=i)},setAccTitle:cg,getAccTitle:op,setAccDescription:cp,getAccDescription:up,addElement:i=>(IP[i]===void 0&&(IP[i]={name:i,type:fk.type,docRef:fk.docRef},Ut.info("Added new requirement: ",i)),fk={},IP[i]),getElements:()=>IP,setNewElementType:i=>{fk!==void 0&&(fk.type=i)},setNewElementDocRef:i=>{fk!==void 0&&(fk.docRef=i)},addRelationship:(i,a,f)=>{rgt.push({type:i,src:a,dst:f})},getRelationships:()=>rgt,clear:()=>{rgt=[],dp={},MP={},fk={},IP={},ap()}},Wqe=i=>` + + marker { + fill: ${i.relationColor}; + stroke: ${i.relationColor}; + } + + marker.cross { + stroke: ${i.lineColor}; + } + + svg { + font-family: ${i.fontFamily}; + font-size: ${i.fontSize}; + } + + .reqBox { + fill: ${i.requirementBackground}; + fill-opacity: 1.0; + stroke: ${i.requirementBorderColor}; + stroke-width: ${i.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${i.requirementTextColor}; + } + .reqLabelBox { + fill: ${i.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${i.requirementBorderColor}; + stroke-width: ${i.requirementBorderSize}; + } + .relationshipLine { + stroke: ${i.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${i.relationLabelColor}; + } + +`,igt={CONTAINS:"contains",ARROW:"arrow"},aRt={ReqMarkers:igt,insertLineEndings:(i,a)=>{let f=i.append("defs").append("marker").attr("id",igt.CONTAINS+"_line_ending").attr("refX",0).attr("refY",a.line_height/2).attr("markerWidth",a.line_height).attr("markerHeight",a.line_height).attr("orient","auto").append("g");f.append("circle").attr("cx",a.line_height/2).attr("cy",a.line_height/2).attr("r",a.line_height/2).attr("fill","none"),f.append("line").attr("x1",0).attr("x2",a.line_height).attr("y1",a.line_height/2).attr("y2",a.line_height/2).attr("stroke-width",1),f.append("line").attr("y1",0).attr("y2",a.line_height).attr("x1",a.line_height/2).attr("x2",a.line_height/2).attr("stroke-width",1),i.append("defs").append("marker").attr("id",igt.ARROW+"_line_ending").attr("refX",a.line_height).attr("refY",.5*a.line_height).attr("markerWidth",a.line_height).attr("markerHeight",a.line_height).attr("orient","auto").append("path").attr("d",`M0,0 + L${a.line_height},${a.line_height/2} + M${a.line_height},${a.line_height/2} + L0,${a.line_height}`).attr("stroke-width",1)}};let xh={},oRt=0;const cRt=(i,a)=>i.insert("rect","#"+a).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",xh.rect_min_width+"px").attr("height",xh.rect_min_height+"px"),uRt=(i,a,f)=>{let p=xh.rect_min_width/2,v=i.append("text").attr("class","req reqLabel reqTitle").attr("id",a).attr("x",p).attr("y",xh.rect_padding).attr("dominant-baseline","hanging"),m=0;f.forEach(L=>{m==0?v.append("tspan").attr("text-anchor","middle").attr("x",xh.rect_min_width/2).attr("dy",0).text(L):v.append("tspan").attr("text-anchor","middle").attr("x",xh.rect_min_width/2).attr("dy",xh.line_height*.75).text(L),m++});let b=1.5*xh.rect_padding,E=m*xh.line_height*.75,_=b+E;return i.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",xh.rect_min_width).attr("y1",_).attr("y2",_),{titleNode:v,y:_}},lRt=(i,a,f,p)=>{let v=i.append("text").attr("class","req reqLabel").attr("id",a).attr("x",xh.rect_padding).attr("y",p).attr("dominant-baseline","hanging"),m=0;const b=30;let E=[];return f.forEach(_=>{let L=_.length;for(;L>b&&m<3;){let N=_.substring(0,b);_=_.substring(b,_.length),L=_.length,E[E.length]=N,m++}if(m==3){let N=E[E.length-1];E[E.length-1]=N.substring(0,N.length-4)+"..."}else E[E.length]=_;m=0}),E.forEach(_=>{v.append("tspan").attr("x",xh.rect_padding).attr("dy",xh.line_height).text(_)}),v},Kqe=(i,a,f,p)=>{const v=a.node().getTotalLength(),m=a.node().getPointAtLength(v*.5),b="rel"+oRt;oRt++;const _=i.append("text").attr("class","req relationshipLabel").attr("id",b).attr("x",m.x).attr("y",m.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(p).node().getBBox();i.insert("rect","#"+b).attr("class","req reqLabelBox").attr("x",m.x-_.width/2).attr("y",m.y-_.height/2).attr("width",_.width).attr("height",_.height).attr("fill","white").attr("fill-opacity","85%")},Yqe=function(i,a,f,p,v){const m=f.edge(oL(a.src),oL(a.dst)),b=Z7().x(function(_){return _.x}).y(function(_){return _.y}),E=i.insert("path","#"+p).attr("class","er relationshipLine").attr("d",b(m.points)).attr("fill","none");a.type==v.db.Relationships.CONTAINS?E.attr("marker-start","url("+Yr.getUrl(xh.arrowMarkerAbsolute)+"#"+a.type+"_line_ending)"):(E.attr("stroke-dasharray","10,7"),E.attr("marker-end","url("+Yr.getUrl(xh.arrowMarkerAbsolute)+"#"+aRt.ReqMarkers.ARROW+"_line_ending)")),Kqe(i,E,xh,`<<${a.type}>>`)},Xqe=(i,a,f)=>{Object.keys(i).forEach(p=>{let v=i[p];p=oL(p),Ut.info("Added new requirement: ",p);const m=f.append("g").attr("id",p),b="req-"+p,E=cRt(m,b);let _=uRt(m,p+"_title",[`<<${v.type}>>`,`${v.name}`]);lRt(m,p+"_body",[`Id: ${v.id}`,`Text: ${v.text}`,`Risk: ${v.risk}`,`Verification: ${v.verifyMethod}`],_.y);const L=E.node().getBBox();a.setNode(p,{width:L.width,height:L.height,shape:"rect",id:p})})},Qqe=(i,a,f)=>{Object.keys(i).forEach(p=>{let v=i[p];const m=oL(p),b=f.append("g").attr("id",m),E="element-"+m,_=cRt(b,E);let L=uRt(b,E+"_title",["<>",`${p}`]);lRt(b,E+"_body",[`Type: ${v.type||"Not Specified"}`,`Doc Ref: ${v.docRef||"None"}`],L.y);const N=_.node().getBBox();a.setNode(m,{width:N.width,height:N.height,shape:"rect",id:m})})},Zqe=(i,a)=>(i.forEach(function(f){let p=oL(f.src),v=oL(f.dst);a.setEdge(p,v,{relationship:f})}),i),Jqe=function(i,a){a.nodes().forEach(function(f){f!==void 0&&a.node(f)!==void 0&&(i.select("#"+f),i.select("#"+f).attr("transform","translate("+(a.node(f).x-a.node(f).width/2)+","+(a.node(f).y-a.node(f).height/2)+" )"))})},oL=i=>i.replace(/\s/g,"").replace(/\./g,"_"),tHe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:Vqe,db:Uqe,renderer:{draw:(i,a,f,p)=>{xh=Le().requirement;const v=xh.securityLevel;let m;v==="sandbox"&&(m=yr("#i"+a));const E=yr(v==="sandbox"?m.nodes()[0].contentDocument.body:"body").select(`[id='${a}']`);aRt.insertLineEndings(E,xh);const _=new a1({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:xh.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let L=p.db.getRequirements(),N=p.db.getElements(),B=p.db.getRelationships();Xqe(L,_,E),Qqe(N,_,E),Zqe(B,_),eL(_),Jqe(E,_),B.forEach(function(it){Yqe(E,it,_,a,p)});const j=xh.rect_padding,R=E.node().getBBox(),z=R.width+j*2,K=R.height+j*2;og(E,K,z,xh.useMaxWidth),E.attr("viewBox",`${R.x-j} ${R.y-j} ${z} ${K}`)}},styles:Wqe}},Symbol.toStringTag,{value:"Module"}));var sgt=function(){var i=function(we,_e,$t,re){for($t=$t||{},re=we.length;re--;$t[we[re]]=_e);return $t},a=[1,2],f=[1,3],p=[1,4],v=[2,4],m=[1,9],b=[1,11],E=[1,13],_=[1,14],L=[1,16],N=[1,17],B=[1,18],j=[1,24],R=[1,25],z=[1,26],K=[1,27],it=[1,28],st=[1,29],ut=[1,30],bt=[1,31],mt=[1,32],yt=[1,33],dt=[1,34],ht=[1,35],wt=[1,36],X=[1,37],pt=[1,38],U=[1,39],xt=[1,41],nt=[1,42],Ot=[1,43],Nt=[1,44],qt=[1,45],Ct=[1,46],Z=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],Tt=[4,5,16,50,52,53],Ht=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],It=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],Ft=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],ke=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],pn=[68,69,70],Me=[1,120],ve={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,DOTTED_ARROW:74,SOLID_CROSS:75,DOTTED_CROSS:76,SOLID_POINT:77,DOTTED_POINT:78,TXT:79,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"DOTTED_ARROW",75:"SOLID_CROSS",76:"DOTTED_CROSS",77:"SOLID_POINT",78:"DOTTED_POINT",79:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:function(_e,$t,re,ie,Oe,oe,Ne){var me=oe.length-1;switch(Oe){case 3:return ie.apply(oe[me]),oe[me];case 4:case 9:this.$=[];break;case 5:case 10:oe[me-1].push(oe[me]),this.$=oe[me-1];break;case 6:case 7:case 11:case 12:this.$=oe[me];break;case 8:case 13:this.$=[];break;case 15:oe[me].type="createParticipant",this.$=oe[me];break;case 16:oe[me-1].unshift({type:"boxStart",boxData:ie.parseBoxData(oe[me-2])}),oe[me-1].push({type:"boxEnd",boxText:oe[me-2]}),this.$=oe[me-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(oe[me-2]),sequenceIndexStep:Number(oe[me-1]),sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(oe[me-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ie.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:ie.LINETYPE.ACTIVE_START,actor:oe[me-1]};break;case 23:this.$={type:"activeEnd",signalType:ie.LINETYPE.ACTIVE_END,actor:oe[me-1]};break;case 29:ie.setDiagramTitle(oe[me].substring(6)),this.$=oe[me].substring(6);break;case 30:ie.setDiagramTitle(oe[me].substring(7)),this.$=oe[me].substring(7);break;case 31:this.$=oe[me].trim(),ie.setAccTitle(this.$);break;case 32:case 33:this.$=oe[me].trim(),ie.setAccDescription(this.$);break;case 34:oe[me-1].unshift({type:"loopStart",loopText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.LOOP_START}),oe[me-1].push({type:"loopEnd",loopText:oe[me-2],signalType:ie.LINETYPE.LOOP_END}),this.$=oe[me-1];break;case 35:oe[me-1].unshift({type:"rectStart",color:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.RECT_START}),oe[me-1].push({type:"rectEnd",color:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.RECT_END}),this.$=oe[me-1];break;case 36:oe[me-1].unshift({type:"optStart",optText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.OPT_START}),oe[me-1].push({type:"optEnd",optText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.OPT_END}),this.$=oe[me-1];break;case 37:oe[me-1].unshift({type:"altStart",altText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.ALT_START}),oe[me-1].push({type:"altEnd",signalType:ie.LINETYPE.ALT_END}),this.$=oe[me-1];break;case 38:oe[me-1].unshift({type:"parStart",parText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.PAR_START}),oe[me-1].push({type:"parEnd",signalType:ie.LINETYPE.PAR_END}),this.$=oe[me-1];break;case 39:oe[me-1].unshift({type:"parStart",parText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.PAR_OVER_START}),oe[me-1].push({type:"parEnd",signalType:ie.LINETYPE.PAR_END}),this.$=oe[me-1];break;case 40:oe[me-1].unshift({type:"criticalStart",criticalText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.CRITICAL_START}),oe[me-1].push({type:"criticalEnd",signalType:ie.LINETYPE.CRITICAL_END}),this.$=oe[me-1];break;case 41:oe[me-1].unshift({type:"breakStart",breakText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.BREAK_START}),oe[me-1].push({type:"breakEnd",optText:ie.parseMessage(oe[me-2]),signalType:ie.LINETYPE.BREAK_END}),this.$=oe[me-1];break;case 43:this.$=oe[me-3].concat([{type:"option",optionText:ie.parseMessage(oe[me-1]),signalType:ie.LINETYPE.CRITICAL_OPTION},oe[me]]);break;case 45:this.$=oe[me-3].concat([{type:"and",parText:ie.parseMessage(oe[me-1]),signalType:ie.LINETYPE.PAR_AND},oe[me]]);break;case 47:this.$=oe[me-3].concat([{type:"else",altText:ie.parseMessage(oe[me-1]),signalType:ie.LINETYPE.ALT_ELSE},oe[me]]);break;case 48:oe[me-3].draw="participant",oe[me-3].type="addParticipant",oe[me-3].description=ie.parseMessage(oe[me-1]),this.$=oe[me-3];break;case 49:oe[me-1].draw="participant",oe[me-1].type="addParticipant",this.$=oe[me-1];break;case 50:oe[me-3].draw="actor",oe[me-3].type="addParticipant",oe[me-3].description=ie.parseMessage(oe[me-1]),this.$=oe[me-3];break;case 51:oe[me-1].draw="actor",oe[me-1].type="addParticipant",this.$=oe[me-1];break;case 52:oe[me-1].type="destroyParticipant",this.$=oe[me-1];break;case 53:this.$=[oe[me-1],{type:"addNote",placement:oe[me-2],actor:oe[me-1].actor,text:oe[me]}];break;case 54:oe[me-2]=[].concat(oe[me-1],oe[me-1]).slice(0,2),oe[me-2][0]=oe[me-2][0].actor,oe[me-2][1]=oe[me-2][1].actor,this.$=[oe[me-1],{type:"addNote",placement:ie.PLACEMENT.OVER,actor:oe[me-2].slice(0,2),text:oe[me]}];break;case 55:this.$=[oe[me-1],{type:"addLinks",actor:oe[me-1].actor,text:oe[me]}];break;case 56:this.$=[oe[me-1],{type:"addALink",actor:oe[me-1].actor,text:oe[me]}];break;case 57:this.$=[oe[me-1],{type:"addProperties",actor:oe[me-1].actor,text:oe[me]}];break;case 58:this.$=[oe[me-1],{type:"addDetails",actor:oe[me-1].actor,text:oe[me]}];break;case 61:this.$=[oe[me-2],oe[me]];break;case 62:this.$=oe[me];break;case 63:this.$=ie.PLACEMENT.LEFTOF;break;case 64:this.$=ie.PLACEMENT.RIGHTOF;break;case 65:this.$=[oe[me-4],oe[me-1],{type:"addMessage",from:oe[me-4].actor,to:oe[me-1].actor,signalType:oe[me-3],msg:oe[me],activate:!0},{type:"activeStart",signalType:ie.LINETYPE.ACTIVE_START,actor:oe[me-1]}];break;case 66:this.$=[oe[me-4],oe[me-1],{type:"addMessage",from:oe[me-4].actor,to:oe[me-1].actor,signalType:oe[me-3],msg:oe[me]},{type:"activeEnd",signalType:ie.LINETYPE.ACTIVE_END,actor:oe[me-4]}];break;case 67:this.$=[oe[me-3],oe[me-1],{type:"addMessage",from:oe[me-3].actor,to:oe[me-1].actor,signalType:oe[me-2],msg:oe[me]}];break;case 68:this.$={type:"addParticipant",actor:oe[me]};break;case 69:this.$=ie.LINETYPE.SOLID_OPEN;break;case 70:this.$=ie.LINETYPE.DOTTED_OPEN;break;case 71:this.$=ie.LINETYPE.SOLID;break;case 72:this.$=ie.LINETYPE.DOTTED;break;case 73:this.$=ie.LINETYPE.SOLID_CROSS;break;case 74:this.$=ie.LINETYPE.DOTTED_CROSS;break;case 75:this.$=ie.LINETYPE.SOLID_POINT;break;case 76:this.$=ie.LINETYPE.DOTTED_POINT;break;case 77:this.$=ie.parseMessage(oe[me].trim().substring(1));break}},table:[{3:1,4:a,5:f,6:p},{1:[3]},{3:5,4:a,5:f,6:p},{3:6,4:a,5:f,6:p},i([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],v,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:m,5:b,8:8,9:10,12:12,13:E,14:_,17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},i(Z,[2,5]),{9:47,12:12,13:E,14:_,17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},i(Z,[2,7]),i(Z,[2,8]),i(Z,[2,14]),{12:48,50:X,52:pt,53:U},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:Ct},{22:55,70:Ct},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},i(Z,[2,29]),i(Z,[2,30]),{32:[1,61]},{34:[1,62]},i(Z,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:Ct},{22:72,70:Ct},{22:73,70:Ct},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82]},{55:83,57:[1,84],65:[1,85],66:[1,86]},{22:87,70:Ct},{22:88,70:Ct},{22:89,70:Ct},{22:90,70:Ct},i([5,51,64,71,72,73,74,75,76,77,78,79],[2,68]),i(Z,[2,6]),i(Z,[2,15]),i(Tt,[2,9],{10:91}),i(Z,[2,17]),{5:[1,93],19:[1,92]},{5:[1,94]},i(Z,[2,21]),{5:[1,95]},{5:[1,96]},i(Z,[2,24]),i(Z,[2,25]),i(Z,[2,26]),i(Z,[2,27]),i(Z,[2,28]),i(Z,[2,31]),i(Z,[2,32]),i(Ht,v,{7:97}),i(Ht,v,{7:98}),i(Ht,v,{7:99}),i(It,v,{40:100,7:101}),i(Ft,v,{42:102,7:103}),i(Ft,v,{7:103,42:104}),i(ke,v,{45:105,7:106}),i(Ht,v,{7:107}),{5:[1,109],51:[1,108]},{5:[1,111],51:[1,110]},{5:[1,112]},{22:115,68:[1,113],69:[1,114],70:Ct},i(pn,[2,69]),i(pn,[2,70]),i(pn,[2,71]),i(pn,[2,72]),i(pn,[2,73]),i(pn,[2,74]),i(pn,[2,75]),i(pn,[2,76]),{22:116,70:Ct},{22:118,58:117,70:Ct},{70:[2,63]},{70:[2,64]},{56:119,79:Me},{56:121,79:Me},{56:122,79:Me},{56:123,79:Me},{4:[1,126],5:[1,128],11:125,12:127,16:[1,124],50:X,52:pt,53:U},{5:[1,129]},i(Z,[2,19]),i(Z,[2,20]),i(Z,[2,22]),i(Z,[2,23]),{4:m,5:b,8:8,9:10,12:12,13:E,14:_,16:[1,130],17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},{4:m,5:b,8:8,9:10,12:12,13:E,14:_,16:[1,131],17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},{4:m,5:b,8:8,9:10,12:12,13:E,14:_,16:[1,132],17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},{16:[1,133]},{4:m,5:b,8:8,9:10,12:12,13:E,14:_,16:[2,46],17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,49:[1,134],50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},{16:[1,135]},{4:m,5:b,8:8,9:10,12:12,13:E,14:_,16:[2,44],17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,48:[1,136],50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},{16:[1,137]},{16:[1,138]},{4:m,5:b,8:8,9:10,12:12,13:E,14:_,16:[2,42],17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,47:[1,139],50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},{4:m,5:b,8:8,9:10,12:12,13:E,14:_,16:[1,140],17:15,18:L,21:N,22:40,23:B,24:19,25:20,26:21,27:22,28:23,29:j,30:R,31:z,33:K,35:it,36:st,37:ut,38:bt,39:mt,41:yt,43:dt,44:ht,46:wt,50:X,52:pt,53:U,54:xt,59:nt,60:Ot,61:Nt,62:qt,70:Ct},{15:[1,141]},i(Z,[2,49]),{15:[1,142]},i(Z,[2,51]),i(Z,[2,52]),{22:143,70:Ct},{22:144,70:Ct},{56:145,79:Me},{56:146,79:Me},{56:147,79:Me},{64:[1,148],79:[2,62]},{5:[2,55]},{5:[2,77]},{5:[2,56]},{5:[2,57]},{5:[2,58]},i(Z,[2,16]),i(Tt,[2,10]),{12:149,50:X,52:pt,53:U},i(Tt,[2,12]),i(Tt,[2,13]),i(Z,[2,18]),i(Z,[2,34]),i(Z,[2,35]),i(Z,[2,36]),i(Z,[2,37]),{15:[1,150]},i(Z,[2,38]),{15:[1,151]},i(Z,[2,39]),i(Z,[2,40]),{15:[1,152]},i(Z,[2,41]),{5:[1,153]},{5:[1,154]},{56:155,79:Me},{56:156,79:Me},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:157,70:Ct},i(Tt,[2,11]),i(It,v,{7:101,40:158}),i(Ft,v,{7:103,42:159}),i(ke,v,{7:106,45:160}),i(Z,[2,48]),i(Z,[2,50]),{5:[2,65]},{5:[2,66]},{79:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],85:[2,63],86:[2,64],119:[2,55],120:[2,77],121:[2,56],122:[2,57],123:[2,58],145:[2,67],146:[2,53],147:[2,54],155:[2,65],156:[2,66],157:[2,61],158:[2,47],159:[2,45],160:[2,43]},parseError:function(_e,$t){if($t.recoverable)this.trace(_e);else{var re=new Error(_e);throw re.hash=$t,re}},parse:function(_e){var $t=this,re=[0],ie=[],Oe=[null],oe=[],Ne=this.table,me="",cn=0,li=0,ya=2,da=1,Oo=oe.slice.call(arguments,1),ds=Object.create(this.lexer),Dr={yy:{}};for(var nr in this.yy)Object.prototype.hasOwnProperty.call(this.yy,nr)&&(Dr.yy[nr]=this.yy[nr]);ds.setInput(_e,Dr.yy),Dr.yy.lexer=ds,Dr.yy.parser=this,typeof ds.yylloc>"u"&&(ds.yylloc={});var di=ds.yylloc;oe.push(di);var Ee=ds.options&&ds.options.ranges;typeof Dr.yy.parseError=="function"?this.parseError=Dr.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Yn(){var $s;return $s=ie.pop()||ds.lex()||da,typeof $s!="number"&&($s instanceof Array&&(ie=$s,$s=ie.pop()),$s=$t.symbols_[$s]||$s),$s}for(var He,Ti,gn,ks,qa={},La,Gs,No,vs;;){if(Ti=re[re.length-1],this.defaultActions[Ti]?gn=this.defaultActions[Ti]:((He===null||typeof He>"u")&&(He=Yn()),gn=Ne[Ti]&&Ne[Ti][He]),typeof gn>"u"||!gn.length||!gn[0]){var nu="";vs=[];for(La in Ne[Ti])this.terminals_[La]&&La>ya&&vs.push("'"+this.terminals_[La]+"'");ds.showPosition?nu="Parse error on line "+(cn+1)+`: +`+ds.showPosition()+` +Expecting `+vs.join(", ")+", got '"+(this.terminals_[He]||He)+"'":nu="Parse error on line "+(cn+1)+": Unexpected "+(He==da?"end of input":"'"+(this.terminals_[He]||He)+"'"),this.parseError(nu,{text:ds.match,token:this.terminals_[He]||He,line:ds.yylineno,loc:di,expected:vs})}if(gn[0]instanceof Array&&gn.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ti+", token: "+He);switch(gn[0]){case 1:re.push(He),Oe.push(ds.yytext),oe.push(ds.yylloc),re.push(gn[1]),He=null,li=ds.yyleng,me=ds.yytext,cn=ds.yylineno,di=ds.yylloc;break;case 2:if(Gs=this.productions_[gn[1]][1],qa.$=Oe[Oe.length-Gs],qa._$={first_line:oe[oe.length-(Gs||1)].first_line,last_line:oe[oe.length-1].last_line,first_column:oe[oe.length-(Gs||1)].first_column,last_column:oe[oe.length-1].last_column},Ee&&(qa._$.range=[oe[oe.length-(Gs||1)].range[0],oe[oe.length-1].range[1]]),ks=this.performAction.apply(qa,[me,li,cn,Dr.yy,gn[1],Oe,oe].concat(Oo)),typeof ks<"u")return ks;Gs&&(re=re.slice(0,-1*Gs*2),Oe=Oe.slice(0,-1*Gs),oe=oe.slice(0,-1*Gs)),re.push(this.productions_[gn[1]][0]),Oe.push(qa.$),oe.push(qa._$),No=Ne[re[re.length-2]][re[re.length-1]],re.push(No);break;case 3:return!0}}return!0}},Ge=function(){var we={EOF:1,parseError:function($t,re){if(this.yy.parser)this.yy.parser.parseError($t,re);else throw new Error($t)},setInput:function(_e,$t){return this.yy=$t||this.yy||{},this._input=_e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var _e=this._input[0];this.yytext+=_e,this.yyleng++,this.offset++,this.match+=_e,this.matched+=_e;var $t=_e.match(/(?:\r\n?|\n).*/g);return $t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_e},unput:function(_e){var $t=_e.length,re=_e.split(/(?:\r\n?|\n)/g);this._input=_e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$t),this.offset-=$t;var ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),re.length-1&&(this.yylineno-=re.length-1);var Oe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:re?(re.length===ie.length?this.yylloc.first_column:0)+ie[ie.length-re.length].length-re[0].length:this.yylloc.first_column-$t},this.options.ranges&&(this.yylloc.range=[Oe[0],Oe[0]+this.yyleng-$t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_e){this.unput(this.match.slice(_e))},pastInput:function(){var _e=this.matched.substr(0,this.matched.length-this.match.length);return(_e.length>20?"...":"")+_e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _e=this.match;return _e.length<20&&(_e+=this._input.substr(0,20-_e.length)),(_e.substr(0,20)+(_e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _e=this.pastInput(),$t=new Array(_e.length+1).join("-");return _e+this.upcomingInput()+` +`+$t+"^"},test_match:function(_e,$t){var re,ie,Oe;if(this.options.backtrack_lexer&&(Oe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Oe.yylloc.range=this.yylloc.range.slice(0))),ie=_e[0].match(/(?:\r\n?|\n).*/g),ie&&(this.yylineno+=ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ie?ie[ie.length-1].length-ie[ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_e[0].length},this.yytext+=_e[0],this.match+=_e[0],this.matches=_e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_e[0].length),this.matched+=_e[0],re=this.performAction.call(this,this.yy,this,$t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),re)return re;if(this._backtrack){for(var oe in Oe)this[oe]=Oe[oe];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _e,$t,re,ie;this._more||(this.yytext="",this.match="");for(var Oe=this._currentRules(),oe=0;oe$t[0].length)){if($t=re,ie=oe,this.options.backtrack_lexer){if(_e=this.test_match(re,Oe[oe]),_e!==!1)return _e;if(this._backtrack){$t=!1;continue}else return!1}else if(!this.options.flex)break}return $t?(_e=this.test_match($t,Oe[ie]),_e!==!1?_e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var $t=this.next();return $t||this.lex()},begin:function($t){this.conditionStack.push($t)},popState:function(){var $t=this.conditionStack.length-1;return $t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function($t){return $t=this.conditionStack.length-1-Math.abs($t||0),$t>=0?this.conditionStack[$t]:"INITIAL"},pushState:function($t){this.begin($t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function($t,re,ie,Oe){switch(ie){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return re.yytext=re.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return re.yytext=re.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 71;case 56:return 72;case 57:return 75;case 58:return 76;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 68;case 63:return 69;case 64:return 5;case 65:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65],inclusive:!0}}};return we}();ve.lexer=Ge;function Ke(){this.yy={}}return Ke.prototype=ve,ve.Parser=Ke,new Ke}();sgt.parser=sgt;const eHe=sgt;let DP,I5={},agt={},ogt={},cL=[],Bb=[],SK=!1,cgt,D5,OP,uL;const nHe=function(i){cL.push({name:i.text,wrap:i.wrap===void 0&&kT()||!!i.wrap,fill:i.color,actorKeys:[]}),D5=cL.slice(-1)[0]},ugt=function(i,a,f,p){let v=D5;const m=I5[i];if(m){if(D5&&m.box&&D5!==m.box)throw new Error("A same participant should only be defined in one Box: "+m.name+" can't be in '"+m.box.name+"' and in '"+D5.name+"' at the same time.");if(v=m.box?m.box:D5,m.box=v,m&&a===m.name&&f==null)return}(f==null||f.text==null)&&(f={text:a,wrap:null,type:p}),(p==null||f.text==null)&&(f={text:a,wrap:null,type:p}),I5[i]={box:v,name:a,description:f.text,wrap:f.wrap===void 0&&kT()||!!f.wrap,prevActor:DP,links:{},properties:{},actorCnt:null,rectData:null,type:p||"participant"},DP&&I5[DP]&&(I5[DP].nextActor=i),D5&&D5.actorKeys.push(i),DP=i},rHe=i=>{let a,f=0;for(a=0;a>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},b}return Bb.push({from:i,to:a,message:f.text,wrap:f.wrap===void 0&&kT()||!!f.wrap,type:p,activate:v}),!0},sHe=function(){return cL.length>0},aHe=function(){return cL.some(i=>i.name)},oHe=function(){return Bb},cHe=function(){return cL},uHe=function(){return I5},lHe=function(){return agt},hHe=function(){return ogt},NP=function(i){return I5[i]},fHe=function(){return Object.keys(I5)},dHe=function(){SK=!0},gHe=function(){SK=!1},pHe=()=>SK,bHe=function(i){cgt=i},kT=()=>cgt!==void 0?cgt:Le().sequence.wrap,vHe=function(){I5={},agt={},ogt={},cL=[],Bb=[],SK=!1,ap()},wHe=function(i){const a=i.trim(),f={text:a.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:a.match(/^:?wrap:/)!==null?!0:a.match(/^:?nowrap:/)!==null?!1:void 0};return Ut.debug("parseMessage:",f),f},mHe=function(i){const a=i.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let f=a!=null&&a[1]?a[1].trim():"transparent",p=a!=null&&a[2]?a[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",f)||(f="transparent",p=i.trim());else{const m=new Option().style;m.color=f,m.color!==f&&(f="transparent",p=i.trim())}return{color:f,text:p!==void 0?Dd(p.replace(/^:?(?:no)?wrap:/,""),Le()):void 0,wrap:p!==void 0?p.match(/^:?wrap:/)!==null?!0:p.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},PP={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},yHe={FILLED:0,OPEN:1},xHe={LEFTOF:0,RIGHTOF:1,OVER:2},hRt=function(i,a,f){f.text,f.wrap===void 0&&kT()||f.wrap;const p=[].concat(i,i);Bb.push({from:p[0],to:p[1],message:f.text,wrap:f.wrap===void 0&&kT()||!!f.wrap,type:PP.NOTE,placement:a})},fRt=function(i,a){const f=NP(i);try{let p=Dd(a.text,Le());p=p.replace(/&/g,"&"),p=p.replace(/=/g,"=");const v=JSON.parse(p);lgt(f,v)}catch(p){Ut.error("error while parsing actor link text",p)}},kHe=function(i,a){const f=NP(i);try{const b={};let E=Dd(a.text,Le());var p=E.indexOf("@");E=E.replace(/&/g,"&"),E=E.replace(/=/g,"=");var v=E.slice(0,p-1).trim(),m=E.slice(p+1).trim();b[v]=m,lgt(f,b)}catch(b){Ut.error("error while parsing actor link text",b)}};function lgt(i,a){if(i.links==null)i.links=a;else for(let f in a)i.links[f]=a[f]}const dRt=function(i,a){const f=NP(i);try{let p=Dd(a.text,Le());const v=JSON.parse(p);gRt(f,v)}catch(p){Ut.error("error while parsing actor properties text",p)}};function gRt(i,a){if(i.properties==null)i.properties=a;else for(let f in a)i.properties[f]=a[f]}function EHe(){D5=void 0}const pRt=function(i,a){const f=NP(i),p=document.getElementById(a.text);try{const v=p.innerHTML,m=JSON.parse(v);m.properties&&gRt(f,m.properties),m.links&&lgt(f,m.links)}catch(v){Ut.error("error while parsing actor details text",v)}},THe=function(i,a){if(i!==void 0&&i.properties!==void 0)return i.properties[a]},bRt=function(i){if(Array.isArray(i))i.forEach(function(a){bRt(a)});else switch(i.type){case"sequenceIndex":Bb.push({from:void 0,to:void 0,message:{start:i.sequenceIndex,step:i.sequenceIndexStep,visible:i.sequenceVisible},wrap:!1,type:i.signalType});break;case"addParticipant":ugt(i.actor,i.actor,i.description,i.draw);break;case"createParticipant":if(I5[i.actor])throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");OP=i.actor,ugt(i.actor,i.actor,i.description,i.draw),agt[i.actor]=Bb.length;break;case"destroyParticipant":uL=i.actor,ogt[i.actor]=Bb.length;break;case"activeStart":Zh(i.actor,void 0,void 0,i.signalType);break;case"activeEnd":Zh(i.actor,void 0,void 0,i.signalType);break;case"addNote":hRt(i.actor,i.placement,i.text);break;case"addLinks":fRt(i.actor,i.text);break;case"addALink":kHe(i.actor,i.text);break;case"addProperties":dRt(i.actor,i.text);break;case"addDetails":pRt(i.actor,i.text);break;case"addMessage":if(OP){if(i.to!==OP)throw new Error("The created participant "+OP+" does not have an associated creating message after its declaration. Please check the sequence diagram.");OP=void 0}else if(uL){if(i.to!==uL&&i.from!==uL)throw new Error("The destroyed participant "+uL+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");uL=void 0}Zh(i.from,i.to,i.msg,i.signalType,i.activate);break;case"boxStart":nHe(i.boxData);break;case"boxEnd":EHe();break;case"loopStart":Zh(void 0,void 0,i.loopText,i.signalType);break;case"loopEnd":Zh(void 0,void 0,void 0,i.signalType);break;case"rectStart":Zh(void 0,void 0,i.color,i.signalType);break;case"rectEnd":Zh(void 0,void 0,void 0,i.signalType);break;case"optStart":Zh(void 0,void 0,i.optText,i.signalType);break;case"optEnd":Zh(void 0,void 0,void 0,i.signalType);break;case"altStart":Zh(void 0,void 0,i.altText,i.signalType);break;case"else":Zh(void 0,void 0,i.altText,i.signalType);break;case"altEnd":Zh(void 0,void 0,void 0,i.signalType);break;case"setAccTitle":cg(i.text);break;case"parStart":Zh(void 0,void 0,i.parText,i.signalType);break;case"and":Zh(void 0,void 0,i.parText,i.signalType);break;case"parEnd":Zh(void 0,void 0,void 0,i.signalType);break;case"criticalStart":Zh(void 0,void 0,i.criticalText,i.signalType);break;case"option":Zh(void 0,void 0,i.optionText,i.signalType);break;case"criticalEnd":Zh(void 0,void 0,void 0,i.signalType);break;case"breakStart":Zh(void 0,void 0,i.breakText,i.signalType);break;case"breakEnd":Zh(void 0,void 0,void 0,i.signalType);break}},vRt={addActor:ugt,addMessage:iHe,addSignal:Zh,addLinks:fRt,addDetails:pRt,addProperties:dRt,autoWrap:kT,setWrap:bHe,enableSequenceNumbers:dHe,disableSequenceNumbers:gHe,showSequenceNumbers:pHe,getMessages:oHe,getActors:uHe,getCreatedActors:lHe,getDestroyedActors:hHe,getActor:NP,getActorKeys:fHe,getActorProperty:THe,getAccTitle:op,getBoxes:cHe,getDiagramTitle:Db,setDiagramTitle:Z2,getConfig:()=>Le().sequence,clear:vHe,parseMessage:wHe,parseBoxData:mHe,LINETYPE:PP,ARROWTYPE:yHe,PLACEMENT:xHe,addNote:hRt,setAccTitle:cg,apply:bRt,setAccDescription:cp,getAccDescription:up,hasAtLeastOneBox:sHe,hasAtLeastOneBoxWithTitle:aHe},CHe=i=>`.actor { + stroke: ${i.actorBorder}; + fill: ${i.actorBkg}; + } + + text.actor > tspan { + fill: ${i.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${i.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${i.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${i.signalColor}; + } + + #arrowhead path { + fill: ${i.signalColor}; + stroke: ${i.signalColor}; + } + + .sequenceNumber { + fill: ${i.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${i.signalColor}; + } + + #crosshead path { + fill: ${i.signalColor}; + stroke: ${i.signalColor}; + } + + .messageText { + fill: ${i.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${i.labelBoxBorderColor}; + fill: ${i.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${i.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${i.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${i.labelBoxBorderColor}; + fill: ${i.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${i.noteBorderColor}; + fill: ${i.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${i.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${i.activationBkgColor}; + stroke: ${i.activationBorderColor}; + } + + .activation1 { + fill: ${i.activationBkgColor}; + stroke: ${i.activationBorderColor}; + } + + .activation2 { + fill: ${i.activationBkgColor}; + stroke: ${i.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${i.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${i.actorBorder}; + fill: ${i.actorBkg}; + } + .actor-man circle, line { + stroke: ${i.actorBorder}; + fill: ${i.actorBkg}; + stroke-width: 2px; + } +`,ET=18*2,hgt=function(i,a){return HW(i,a)},wRt=(i,a)=>{WSe(()=>{const f=document.querySelectorAll(i);f.length!==0&&(f[0].addEventListener("mouseover",function(){LHe("actor"+a+"_popup")}),f[0].addEventListener("mouseout",function(){MHe("actor"+a+"_popup")}))})},_He=function(i,a,f,p,v){if(a.links===void 0||a.links===null||Object.keys(a.links).length===0)return{height:0,width:0};const m=a.links,b=a.actorCnt,E=a.rectData;var _="none";v&&(_="block !important");const L=i.append("g");L.attr("id","actor"+b+"_popup"),L.attr("class","actorPopupMenu"),L.attr("display",_),wRt("#actor"+b+"_popup",b);var N="";E.class!==void 0&&(N=" "+E.class);let B=E.width>f?E.width:f;const j=L.append("rect");if(j.attr("class","actorPopupMenuPanel"+N),j.attr("x",E.x),j.attr("y",E.height),j.attr("fill",E.fill),j.attr("stroke",E.stroke),j.attr("width",B),j.attr("height",E.height),j.attr("rx",E.rx),j.attr("ry",E.ry),m!=null){var R=20;for(let it in m){var z=L.append("a"),K=Q6(m[it]);z.attr("xlink:href",K),z.attr("target","_blank"),UHe(p)(it,z,E.x+10,E.height+R,B,20,{class:"actor"},p),R+=30}}return j.attr("height",R),{height:E.height+R,width:B}},SHe=function(i){return"var pu = document.getElementById('"+i+"'); if (pu != null) { pu.style.display = 'block'; }"},AHe=function(i){return"var pu = document.getElementById('"+i+"'); if (pu != null) { pu.style.display = 'none'; }"},LHe=function(i){var a=document.getElementById(i);a!=null&&(a.style.display="block")},MHe=function(i){var a=document.getElementById(i);a!=null&&(a.style.display="none")},lL=function(i,a){let f=0,p=0;const v=a.text.split(Yr.lineBreakRegex),[m,b]=$A(a.fontSize);let E=[],_=0,L=()=>a.y;if(a.valign!==void 0&&a.textMargin!==void 0&&a.textMargin>0)switch(a.valign){case"top":case"start":L=()=>Math.round(a.y+a.textMargin);break;case"middle":case"center":L=()=>Math.round(a.y+(f+p+a.textMargin)/2);break;case"bottom":case"end":L=()=>Math.round(a.y+(f+p+2*a.textMargin)-a.textMargin);break}if(a.anchor!==void 0&&a.textMargin!==void 0&&a.width!==void 0)switch(a.anchor){case"left":case"start":a.x=Math.round(a.x+a.textMargin),a.anchor="start",a.dominantBaseline="middle",a.alignmentBaseline="middle";break;case"middle":case"center":a.x=Math.round(a.x+a.width/2),a.anchor="middle",a.dominantBaseline="middle",a.alignmentBaseline="middle";break;case"right":case"end":a.x=Math.round(a.x+a.width-a.textMargin),a.anchor="end",a.dominantBaseline="middle",a.alignmentBaseline="middle";break}for(let[N,B]of v.entries()){a.textMargin!==void 0&&a.textMargin===0&&m!==void 0&&(_=N*m);const j=i.append("text");j.attr("x",a.x),j.attr("y",L()),a.anchor!==void 0&&j.attr("text-anchor",a.anchor).attr("dominant-baseline",a.dominantBaseline).attr("alignment-baseline",a.alignmentBaseline),a.fontFamily!==void 0&&j.style("font-family",a.fontFamily),b!==void 0&&j.style("font-size",b),a.fontWeight!==void 0&&j.style("font-weight",a.fontWeight),a.fill!==void 0&&j.attr("fill",a.fill),a.class!==void 0&&j.attr("class",a.class),a.dy!==void 0?j.attr("dy",a.dy):_!==0&&j.attr("dy",_);const R=B||RDt;if(a.tspan){const z=j.append("tspan");z.attr("x",a.x),a.fill!==void 0&&z.attr("fill",a.fill),z.text(R)}else j.text(R);a.valign!==void 0&&a.textMargin!==void 0&&a.textMargin>0&&(p+=(j._groups||j)[0][0].getBBox().height,f=p),E.push(j)}return E},mRt=function(i,a){function f(v,m,b,E,_){return v+","+m+" "+(v+b)+","+m+" "+(v+b)+","+(m+E-_)+" "+(v+b-_*1.2)+","+(m+E)+" "+v+","+(m+E)}const p=i.append("polygon");return p.attr("points",f(a.x,a.y,a.width,a.height,7)),p.attr("class","labelBox"),a.y=a.y+a.height/2,lL(i,a),p};let hm=-1;const yRt=(i,a,f,p)=>{i.select&&f.forEach(v=>{const m=a[v],b=i.select("#actor"+m.actorCnt);!p.mirrorActors&&m.stopy?b.attr("y2",m.stopy+m.height/2):p.mirrorActors&&b.attr("y2",m.stopy)})},IHe=function(i,a,f,p){const v=p?a.stopy:a.starty,m=a.x+a.width/2,b=v+5,E=i.append("g").lower();var _=E;p||(hm++,_.append("line").attr("id","actor"+hm).attr("x1",m).attr("y1",b).attr("x2",m).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),_=E.append("g"),a.actorCnt=hm,a.links!=null&&(_.attr("id","root-"+hm),wRt("#root-"+hm,hm)));const L=fT();var N="actor";a.properties!=null&&a.properties.class?N=a.properties.class:L.fill="#eaeaea",L.x=a.x,L.y=v,L.width=a.width,L.height=a.height,L.class=N,L.rx=3,L.ry=3;const B=hgt(_,L);if(a.rectData=L,a.properties!=null&&a.properties.icon){const R=a.properties.icon.trim();R.charAt(0)==="@"?pIe(_,L.x+L.width-20,L.y+10,R.substr(1)):gIe(_,L.x+L.width-20,L.y+10,R)}fgt(f)(a.description,_,L.x,L.y,L.width,L.height,{class:"actor"},f);let j=a.height;if(B.node){const R=B.node().getBBox();a.height=R.height,j=R.height}return j},DHe=function(i,a,f,p){const v=p?a.stopy:a.starty,m=a.x+a.width/2,b=v+80;i.lower(),p||(hm++,i.append("line").attr("id","actor"+hm).attr("x1",m).attr("y1",b).attr("x2",m).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),a.actorCnt=hm);const E=i.append("g");E.attr("class","actor-man");const _=fT();_.x=a.x,_.y=v,_.fill="#eaeaea",_.width=a.width,_.height=a.height,_.class="actor",_.rx=3,_.ry=3,E.append("line").attr("id","actor-man-torso"+hm).attr("x1",m).attr("y1",v+25).attr("x2",m).attr("y2",v+45),E.append("line").attr("id","actor-man-arms"+hm).attr("x1",m-ET/2).attr("y1",v+33).attr("x2",m+ET/2).attr("y2",v+33),E.append("line").attr("x1",m-ET/2).attr("y1",v+60).attr("x2",m).attr("y2",v+45),E.append("line").attr("x1",m).attr("y1",v+45).attr("x2",m+ET/2-2).attr("y2",v+60);const L=E.append("circle");L.attr("cx",a.x+a.width/2),L.attr("cy",v+10),L.attr("r",15),L.attr("width",a.width),L.attr("height",a.height);const N=E.node().getBBox();return a.height=N.height,fgt(f)(a.description,E,_.x,_.y+35,_.width,_.height,{class:"actor"},f),a.height},OHe=function(i,a,f,p){switch(a.type){case"actor":return DHe(i,a,f,p);case"participant":return IHe(i,a,f,p)}},NHe=function(i,a,f){const v=i.append("g");xRt(v,a),a.name&&fgt(f)(a.name,v,a.x,a.y+(a.textMaxHeight||0)/2,a.width,0,{class:"text"},f),v.lower()},PHe=function(i){return i.append("g")},FHe=function(i,a,f,p,v){const m=fT(),b=a.anchored;m.x=a.startx,m.y=a.starty,m.class="activation"+v%3,m.width=a.stopx-a.startx,m.height=f-a.starty,hgt(b,m)},BHe=function(i,a,f,p){const{boxMargin:v,boxTextMargin:m,labelBoxHeight:b,labelBoxWidth:E,messageFontFamily:_,messageFontSize:L,messageFontWeight:N}=p,B=i.append("g"),j=function(K,it,st,ut){return B.append("line").attr("x1",K).attr("y1",it).attr("x2",st).attr("y2",ut).attr("class","loopLine")};j(a.startx,a.starty,a.stopx,a.starty),j(a.stopx,a.starty,a.stopx,a.stopy),j(a.startx,a.stopy,a.stopx,a.stopy),j(a.startx,a.starty,a.startx,a.stopy),a.sections!==void 0&&a.sections.forEach(function(K){j(a.startx,K.y,a.stopx,K.y).style("stroke-dasharray","3, 3")});let R=Pdt();R.text=f,R.x=a.startx,R.y=a.starty,R.fontFamily=_,R.fontSize=L,R.fontWeight=N,R.anchor="middle",R.valign="middle",R.tspan=!1,R.width=E||50,R.height=b||20,R.textMargin=m,R.class="labelText",mRt(B,R),R=kRt(),R.text=a.title,R.x=a.startx+E/2+(a.stopx-a.startx)/2,R.y=a.starty+v+m,R.anchor="middle",R.valign="middle",R.textMargin=m,R.class="loopText",R.fontFamily=_,R.fontSize=L,R.fontWeight=N,R.wrap=!0;let z=lL(B,R);return a.sectionTitles!==void 0&&a.sectionTitles.forEach(function(K,it){if(K.message){R.text=K.message,R.x=a.startx+(a.stopx-a.startx)/2,R.y=a.sections[it].y+v+m,R.class="loopText",R.anchor="middle",R.valign="middle",R.tspan=!1,R.fontFamily=_,R.fontSize=L,R.fontWeight=N,R.wrap=a.wrap,z=lL(B,R);let st=Math.round(z.map(ut=>(ut._groups||ut)[0][0].getBBox().height).reduce((ut,bt)=>ut+bt));a.sections[it].height+=st-(v+m)}}),a.height=Math.round(a.stopy-a.starty),B},xRt=function(i,a){bNt(i,a)},RHe=function(i){i.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},jHe=function(i){i.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},$He=function(i){i.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},zHe=function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},qHe=function(i){i.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},HHe=function(i){i.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},GHe=function(i){i.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},kRt=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},VHe=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},fgt=function(){function i(v,m,b,E,_,L,N){const B=m.append("text").attr("x",b+_/2).attr("y",E+L/2+5).style("text-anchor","middle").text(v);p(B,N)}function a(v,m,b,E,_,L,N,B){const{actorFontSize:j,actorFontFamily:R,actorFontWeight:z}=B,[K,it]=$A(j),st=v.split(Yr.lineBreakRegex);for(let ut=0;uti.height||0))+(this.loops.length===0?0:this.loops.map(i=>i.height||0).reduce((i,a)=>i+a))+(this.messages.length===0?0:this.messages.map(i=>i.height||0).reduce((i,a)=>i+a))+(this.notes.length===0?0:this.notes.map(i=>i.height||0).reduce((i,a)=>i+a))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(i){this.boxes.push(i)},addActor:function(i){this.actors.push(i)},addLoop:function(i){this.loops.push(i)},addMessage:function(i){this.messages.push(i)},addNote:function(i){this.notes.push(i)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,TRt(Le())},updateVal:function(i,a,f,p){i[a]===void 0?i[a]=f:i[a]=p(f,i[a])},updateBounds:function(i,a,f,p){const v=this;let m=0;function b(E){return function(L){m++;const N=v.sequenceItems.length-m+1;v.updateVal(L,"starty",a-N*fn.boxMargin,Math.min),v.updateVal(L,"stopy",p+N*fn.boxMargin,Math.max),v.updateVal(Pr.data,"startx",i-N*fn.boxMargin,Math.min),v.updateVal(Pr.data,"stopx",f+N*fn.boxMargin,Math.max),E!=="activation"&&(v.updateVal(L,"startx",i-N*fn.boxMargin,Math.min),v.updateVal(L,"stopx",f+N*fn.boxMargin,Math.max),v.updateVal(Pr.data,"starty",a-N*fn.boxMargin,Math.min),v.updateVal(Pr.data,"stopy",p+N*fn.boxMargin,Math.max))}}this.sequenceItems.forEach(b()),this.activations.forEach(b("activation"))},insert:function(i,a,f,p){const v=Yr.getMin(i,f),m=Yr.getMax(i,f),b=Yr.getMin(a,p),E=Yr.getMax(a,p);this.updateVal(Pr.data,"startx",v,Math.min),this.updateVal(Pr.data,"starty",b,Math.min),this.updateVal(Pr.data,"stopx",m,Math.max),this.updateVal(Pr.data,"stopy",E,Math.max),this.updateBounds(v,b,m,E)},newActivation:function(i,a,f){const p=f[i.from.actor],v=AK(i.from.actor).length||0,m=p.x+p.width/2+(v-1)*fn.activationWidth/2;this.activations.push({startx:m,starty:this.verticalPos+2,stopx:m+fn.activationWidth,stopy:void 0,actor:i.from.actor,anchored:Jh.anchorElement(a)})},endActivation:function(i){const a=this.activations.map(function(f){return f.actor}).lastIndexOf(i.from.actor);return this.activations.splice(a,1)[0]},createLoop:function(i={message:void 0,wrap:!1,width:void 0},a){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:i.message,wrap:i.wrap,width:i.width,height:0,fill:a}},newLoop:function(i={message:void 0,wrap:!1,width:void 0},a){this.sequenceItems.push(this.createLoop(i,a))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},addSectionToLoop:function(i){const a=this.sequenceItems.pop();a.sections=a.sections||[],a.sectionTitles=a.sectionTitles||[],a.sections.push({y:Pr.getVerticalPos(),height:0}),a.sectionTitles.push(i),this.sequenceItems.push(a)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(i){this.verticalPos=this.verticalPos+i,this.data.stopy=Yr.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},WHe=function(i,a){Pr.bumpVerticalPos(fn.boxMargin),a.height=fn.boxMargin,a.starty=Pr.getVerticalPos();const f=fT();f.x=a.startx,f.y=a.starty,f.width=a.width||fn.width,f.class="note";const p=i.append("g"),v=Jh.drawRect(p,f),m=Pdt();m.x=a.startx,m.y=a.starty,m.width=f.width,m.dy="1em",m.text=a.message,m.class="noteText",m.fontFamily=fn.noteFontFamily,m.fontSize=fn.noteFontSize,m.fontWeight=fn.noteFontWeight,m.anchor=fn.noteAlign,m.textMargin=fn.noteMargin,m.valign="center";const b=lL(p,m),E=Math.round(b.map(_=>(_._groups||_)[0][0].getBBox().height).reduce((_,L)=>_+L));v.attr("height",E+2*fn.noteMargin),a.height+=E+2*fn.noteMargin,Pr.bumpVerticalPos(E+2*fn.noteMargin),a.stopy=a.starty+E+2*fn.noteMargin,a.stopx=a.startx+f.width,Pr.insert(a.startx,a.starty,a.stopx,a.stopy),Pr.models.addNote(a)},TT=i=>({fontFamily:i.messageFontFamily,fontSize:i.messageFontSize,fontWeight:i.messageFontWeight}),hL=i=>({fontFamily:i.noteFontFamily,fontSize:i.noteFontSize,fontWeight:i.noteFontWeight}),dgt=i=>({fontFamily:i.actorFontFamily,fontSize:i.actorFontSize,fontWeight:i.actorFontWeight});function KHe(i,a){Pr.bumpVerticalPos(10);const{startx:f,stopx:p,message:v}=a,m=Yr.splitBreaks(v).length,b=$a.calculateTextDimensions(v,TT(fn)),E=b.height/m;a.height+=E,Pr.bumpVerticalPos(E);let _,L=b.height-10;const N=b.width;if(f===p){_=Pr.getVerticalPos()+L,fn.rightAngles||(L+=fn.boxMargin,_=Pr.getVerticalPos()+L),L+=30;const B=Yr.getMax(N/2,fn.width/2);Pr.insert(f-B,Pr.getVerticalPos()-10+L,p+B,Pr.getVerticalPos()+30+L)}else L+=fn.boxMargin,_=Pr.getVerticalPos()+L,Pr.insert(f,_-10,p,_);return Pr.bumpVerticalPos(L),a.height+=L,a.stopy=a.starty+a.height,Pr.insert(a.fromBounds,a.starty,a.toBounds,a.stopy),_}const YHe=function(i,a,f,p){const{startx:v,stopx:m,starty:b,message:E,type:_,sequenceIndex:L,sequenceVisible:N}=a,B=$a.calculateTextDimensions(E,TT(fn)),j=Pdt();j.x=v,j.y=b+10,j.width=m-v,j.class="messageText",j.dy="1em",j.text=E,j.fontFamily=fn.messageFontFamily,j.fontSize=fn.messageFontSize,j.fontWeight=fn.messageFontWeight,j.anchor=fn.messageAlign,j.valign="center",j.textMargin=fn.wrapPadding,j.tspan=!1,lL(i,j);const R=B.width;let z;v===m?fn.rightAngles?z=i.append("path").attr("d",`M ${v},${f} H ${v+Yr.getMax(fn.width/2,R/2)} V ${f+25} H ${v}`):z=i.append("path").attr("d","M "+v+","+f+" C "+(v+60)+","+(f-10)+" "+(v+60)+","+(f+30)+" "+v+","+(f+20)):(z=i.append("line"),z.attr("x1",v),z.attr("y1",f),z.attr("x2",m),z.attr("y2",f)),_===p.db.LINETYPE.DOTTED||_===p.db.LINETYPE.DOTTED_CROSS||_===p.db.LINETYPE.DOTTED_POINT||_===p.db.LINETYPE.DOTTED_OPEN?(z.style("stroke-dasharray","3, 3"),z.attr("class","messageLine1")):z.attr("class","messageLine0");let K="";fn.arrowMarkerAbsolute&&(K=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,K=K.replace(/\(/g,"\\("),K=K.replace(/\)/g,"\\)")),z.attr("stroke-width",2),z.attr("stroke","none"),z.style("fill","none"),(_===p.db.LINETYPE.SOLID||_===p.db.LINETYPE.DOTTED)&&z.attr("marker-end","url("+K+"#arrowhead)"),(_===p.db.LINETYPE.SOLID_POINT||_===p.db.LINETYPE.DOTTED_POINT)&&z.attr("marker-end","url("+K+"#filled-head)"),(_===p.db.LINETYPE.SOLID_CROSS||_===p.db.LINETYPE.DOTTED_CROSS)&&z.attr("marker-end","url("+K+"#crosshead)"),(N||fn.showSequenceNumbers)&&(z.attr("marker-start","url("+K+"#sequencenumber)"),i.append("text").attr("x",v).attr("y",f+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(L))},XHe=function(i,a,f,p,v,m,b){let E=0,_=0,L,N=0;for(const B of p){const j=a[B],R=j.box;L&&L!=R&&(b||Pr.models.addBox(L),_+=fn.boxMargin+L.margin),R&&R!=L&&(b||(R.x=E+_,R.y=v),_+=R.margin),j.width=j.width||fn.width,j.height=Yr.getMax(j.height||fn.height,fn.height),j.margin=j.margin||fn.actorMargin,N=Yr.getMax(N,j.height),f[j.name]&&(_+=j.width/2),j.x=E+_,j.starty=Pr.getVerticalPos(),Pr.insert(j.x,v,j.x+j.width,j.height),E+=j.width+_,j.box&&(j.box.width=E+R.margin-j.box.x),_=j.margin,L=j.box,Pr.models.addActor(j)}L&&!b&&Pr.models.addBox(L),Pr.bumpVerticalPos(N)},ggt=function(i,a,f,p){if(p){let v=0;Pr.bumpVerticalPos(fn.boxMargin*2);for(const m of f){const b=a[m];b.stopy||(b.stopy=Pr.getVerticalPos());const E=Jh.drawActor(i,b,fn,!0);v=Yr.getMax(v,E)}Pr.bumpVerticalPos(v+fn.boxMargin)}else for(const v of f){const m=a[v];Jh.drawActor(i,m,fn,!1)}},ERt=function(i,a,f,p){let v=0,m=0;for(const b of f){const E=a[b],_=tGe(E),L=Jh.drawPopup(i,E,_,fn,fn.forceMenus,p);L.height>v&&(v=L.height),L.width+E.x>m&&(m=L.width+E.x)}return{maxHeight:v,maxWidth:m}},TRt=function(i){Y1(fn,i),i.fontFamily&&(fn.actorFontFamily=fn.noteFontFamily=fn.messageFontFamily=i.fontFamily),i.fontSize&&(fn.actorFontSize=fn.noteFontSize=fn.messageFontSize=i.fontSize),i.fontWeight&&(fn.actorFontWeight=fn.noteFontWeight=fn.messageFontWeight=i.fontWeight)},AK=function(i){return Pr.activations.filter(function(a){return a.actor===i})},CRt=function(i,a){const f=a[i],p=AK(i),v=p.reduce(function(b,E){return Yr.getMin(b,E.startx)},f.x+f.width/2-1),m=p.reduce(function(b,E){return Yr.getMax(b,E.stopx)},f.x+f.width/2+1);return[v,m]};function y3(i,a,f,p,v){Pr.bumpVerticalPos(f);let m=p;if(a.id&&a.message&&i[a.id]){const b=i[a.id].width,E=TT(fn);a.message=$a.wrapLabel(`[${a.message}]`,b-2*fn.wrapPadding,E),a.width=b,a.wrap=!0;const _=$a.calculateTextDimensions(a.message,E),L=Yr.getMax(_.height,fn.labelBoxHeight);m=p+L,Ut.debug(`${L} - ${a.message}`)}v(a),Pr.bumpVerticalPos(m)}function QHe(i,a,f,p,v,m,b){function E(L,N){L.x{Ct.add(Z.from),Ct.add(Z.to)}),z=z.filter(Z=>Ct.has(Z))}XHe(L,N,B,z,0,K,!1);const mt=iGe(K,N,bt,p);Jh.insertArrowHead(L),Jh.insertArrowCrossHead(L),Jh.insertArrowFilledHead(L),Jh.insertSequenceNumber(L);function yt(Ct,Z){const Tt=Pr.endActivation(Ct);Tt.starty+18>Z&&(Tt.starty=Z-6,Z+=12),Jh.drawActivation(L,Tt,Z,fn,AK(Ct.from.actor).length),Pr.insert(Tt.startx,Z-10,Tt.stopx,Z)}let dt=1,ht=1;const wt=[],X=[];K.forEach(function(Ct,Z){let Tt,Ht,It;switch(Ct.type){case p.db.LINETYPE.NOTE:Pr.resetVerticalPos(),Ht=Ct.noteModel,WHe(L,Ht);break;case p.db.LINETYPE.ACTIVE_START:Pr.newActivation(Ct,L,N);break;case p.db.LINETYPE.ACTIVE_END:yt(Ct,Pr.getVerticalPos());break;case p.db.LINETYPE.LOOP_START:y3(mt,Ct,fn.boxMargin,fn.boxMargin+fn.boxTextMargin,Ft=>Pr.newLoop(Ft));break;case p.db.LINETYPE.LOOP_END:Tt=Pr.endLoop(),Jh.drawLoop(L,Tt,"loop",fn),Pr.bumpVerticalPos(Tt.stopy-Pr.getVerticalPos()),Pr.models.addLoop(Tt);break;case p.db.LINETYPE.RECT_START:y3(mt,Ct,fn.boxMargin,fn.boxMargin,Ft=>Pr.newLoop(void 0,Ft.message));break;case p.db.LINETYPE.RECT_END:Tt=Pr.endLoop(),X.push(Tt),Pr.models.addLoop(Tt),Pr.bumpVerticalPos(Tt.stopy-Pr.getVerticalPos());break;case p.db.LINETYPE.OPT_START:y3(mt,Ct,fn.boxMargin,fn.boxMargin+fn.boxTextMargin,Ft=>Pr.newLoop(Ft));break;case p.db.LINETYPE.OPT_END:Tt=Pr.endLoop(),Jh.drawLoop(L,Tt,"opt",fn),Pr.bumpVerticalPos(Tt.stopy-Pr.getVerticalPos()),Pr.models.addLoop(Tt);break;case p.db.LINETYPE.ALT_START:y3(mt,Ct,fn.boxMargin,fn.boxMargin+fn.boxTextMargin,Ft=>Pr.newLoop(Ft));break;case p.db.LINETYPE.ALT_ELSE:y3(mt,Ct,fn.boxMargin+fn.boxTextMargin,fn.boxMargin,Ft=>Pr.addSectionToLoop(Ft));break;case p.db.LINETYPE.ALT_END:Tt=Pr.endLoop(),Jh.drawLoop(L,Tt,"alt",fn),Pr.bumpVerticalPos(Tt.stopy-Pr.getVerticalPos()),Pr.models.addLoop(Tt);break;case p.db.LINETYPE.PAR_START:case p.db.LINETYPE.PAR_OVER_START:y3(mt,Ct,fn.boxMargin,fn.boxMargin+fn.boxTextMargin,Ft=>Pr.newLoop(Ft)),Pr.saveVerticalPos();break;case p.db.LINETYPE.PAR_AND:y3(mt,Ct,fn.boxMargin+fn.boxTextMargin,fn.boxMargin,Ft=>Pr.addSectionToLoop(Ft));break;case p.db.LINETYPE.PAR_END:Tt=Pr.endLoop(),Jh.drawLoop(L,Tt,"par",fn),Pr.bumpVerticalPos(Tt.stopy-Pr.getVerticalPos()),Pr.models.addLoop(Tt);break;case p.db.LINETYPE.AUTONUMBER:dt=Ct.message.start||dt,ht=Ct.message.step||ht,Ct.message.visible?p.db.enableSequenceNumbers():p.db.disableSequenceNumbers();break;case p.db.LINETYPE.CRITICAL_START:y3(mt,Ct,fn.boxMargin,fn.boxMargin+fn.boxTextMargin,Ft=>Pr.newLoop(Ft));break;case p.db.LINETYPE.CRITICAL_OPTION:y3(mt,Ct,fn.boxMargin+fn.boxTextMargin,fn.boxMargin,Ft=>Pr.addSectionToLoop(Ft));break;case p.db.LINETYPE.CRITICAL_END:Tt=Pr.endLoop(),Jh.drawLoop(L,Tt,"critical",fn),Pr.bumpVerticalPos(Tt.stopy-Pr.getVerticalPos()),Pr.models.addLoop(Tt);break;case p.db.LINETYPE.BREAK_START:y3(mt,Ct,fn.boxMargin,fn.boxMargin+fn.boxTextMargin,Ft=>Pr.newLoop(Ft));break;case p.db.LINETYPE.BREAK_END:Tt=Pr.endLoop(),Jh.drawLoop(L,Tt,"break",fn),Pr.bumpVerticalPos(Tt.stopy-Pr.getVerticalPos()),Pr.models.addLoop(Tt);break;default:try{It=Ct.msgModel,It.starty=Pr.getVerticalPos(),It.sequenceIndex=dt,It.sequenceVisible=p.db.showSequenceNumbers();const Ft=KHe(L,It);QHe(Ct,It,Ft,Z,N,B,j),wt.push({messageModel:It,lineStartY:Ft}),Pr.models.addMessage(It)}catch(Ft){Ut.error("error while drawing message",Ft)}}[p.db.LINETYPE.SOLID_OPEN,p.db.LINETYPE.DOTTED_OPEN,p.db.LINETYPE.SOLID,p.db.LINETYPE.DOTTED,p.db.LINETYPE.SOLID_CROSS,p.db.LINETYPE.DOTTED_CROSS,p.db.LINETYPE.SOLID_POINT,p.db.LINETYPE.DOTTED_POINT].includes(Ct.type)&&(dt=dt+ht)}),Ut.debug("createdActors",B),Ut.debug("destroyedActors",j),ggt(L,N,z,!1),wt.forEach(Ct=>YHe(L,Ct.messageModel,Ct.lineStartY,p)),fn.mirrorActors&&ggt(L,N,z,!0),X.forEach(Ct=>Jh.drawBackgroundRect(L,Ct)),yRt(L,N,z,fn),Pr.models.boxes.forEach(function(Ct){Ct.height=Pr.getVerticalPos()-Ct.y,Pr.insert(Ct.x,Ct.y,Ct.x+Ct.width,Ct.height),Ct.startx=Ct.x,Ct.starty=Ct.y,Ct.stopx=Ct.startx+Ct.width,Ct.stopy=Ct.starty+Ct.height,Ct.stroke="rgb(0,0,0, 0.5)",Jh.drawBox(L,Ct,fn)}),st&&Pr.bumpVerticalPos(fn.boxMargin);const pt=ERt(L,N,z,_),{bounds:U}=Pr.getBounds();let xt=U.stopy-U.starty;xt{const b=i[m];b.wrap&&(b.description=$a.wrapLabel(b.description,fn.width-2*fn.wrapPadding,dgt(fn)));const E=$a.calculateTextDimensions(b.description,dgt(fn));b.width=b.wrap?fn.width:Yr.getMax(fn.width,E.width+2*fn.wrapPadding),b.height=b.wrap?Yr.getMax(E.height,fn.height):fn.height,p=Yr.getMax(p,b.height)});for(const m in a){const b=i[m];if(!b)continue;const E=i[b.nextActor];if(!E){const B=a[m]+fn.actorMargin-b.width/2;b.margin=Yr.getMax(B,fn.actorMargin);continue}const L=a[m]+fn.actorMargin-b.width/2-E.width/2;b.margin=Yr.getMax(L,fn.actorMargin)}let v=0;return f.forEach(m=>{const b=TT(fn);let E=m.actorKeys.reduce((N,B)=>N+=i[B].width+(i[B].margin||0),0);E-=2*fn.boxTextMargin,m.wrap&&(m.name=$a.wrapLabel(m.name,E-2*fn.wrapPadding,b));const _=$a.calculateTextDimensions(m.name,b);v=Yr.getMax(_.height,v);const L=Yr.getMax(E,_.width+2*fn.wrapPadding);if(m.margin=fn.boxTextMargin,Em.textMaxHeight=v),Yr.getMax(p,fn.height)}const nGe=function(i,a,f){const p=a[i.from].x,v=a[i.to].x,m=i.wrap&&i.message;let b=$a.calculateTextDimensions(m?$a.wrapLabel(i.message,fn.width,hL(fn)):i.message,hL(fn));const E={width:m?fn.width:Yr.getMax(fn.width,b.width+2*fn.noteMargin),height:0,startx:a[i.from].x,stopx:0,starty:0,stopy:0,message:i.message};return i.placement===f.db.PLACEMENT.RIGHTOF?(E.width=m?Yr.getMax(fn.width,b.width):Yr.getMax(a[i.from].width/2+a[i.to].width/2,b.width+2*fn.noteMargin),E.startx=p+(a[i.from].width+fn.actorMargin)/2):i.placement===f.db.PLACEMENT.LEFTOF?(E.width=m?Yr.getMax(fn.width,b.width+2*fn.noteMargin):Yr.getMax(a[i.from].width/2+a[i.to].width/2,b.width+2*fn.noteMargin),E.startx=p-E.width+(a[i.from].width-fn.actorMargin)/2):i.to===i.from?(b=$a.calculateTextDimensions(m?$a.wrapLabel(i.message,Yr.getMax(fn.width,a[i.from].width),hL(fn)):i.message,hL(fn)),E.width=m?Yr.getMax(fn.width,a[i.from].width):Yr.getMax(a[i.from].width,fn.width,b.width+2*fn.noteMargin),E.startx=p+(a[i.from].width-E.width)/2):(E.width=Math.abs(p+a[i.from].width/2-(v+a[i.to].width/2))+fn.actorMargin,E.startx=p2,B=K=>E?-K:K;i.from===i.to?L=_:(i.activate&&!N&&(L+=B(fn.activationWidth/2-1)),[f.db.LINETYPE.SOLID_OPEN,f.db.LINETYPE.DOTTED_OPEN].includes(i.type)||(L+=B(3)));const j=[p,v,m,b],R=Math.abs(_-L);i.wrap&&i.message&&(i.message=$a.wrapLabel(i.message,Yr.getMax(R+2*fn.wrapPadding,fn.width),TT(fn)));const z=$a.calculateTextDimensions(i.message,TT(fn));return{width:Yr.getMax(i.wrap?0:z.width+2*fn.wrapPadding,R+2*fn.wrapPadding,fn.width),height:0,startx:_,stopx:L,starty:0,stopy:0,message:i.message,type:i.type,wrap:i.wrap,fromBounds:Math.min.apply(null,j),toBounds:Math.max.apply(null,j)}},iGe=function(i,a,f,p){const v={},m=[];let b,E,_;return i.forEach(function(L){switch(L.id=$a.random({length:10}),L.type){case p.db.LINETYPE.LOOP_START:case p.db.LINETYPE.ALT_START:case p.db.LINETYPE.OPT_START:case p.db.LINETYPE.PAR_START:case p.db.LINETYPE.PAR_OVER_START:case p.db.LINETYPE.CRITICAL_START:case p.db.LINETYPE.BREAK_START:m.push({id:L.id,msg:L.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case p.db.LINETYPE.ALT_ELSE:case p.db.LINETYPE.PAR_AND:case p.db.LINETYPE.CRITICAL_OPTION:L.message&&(b=m.pop(),v[b.id]=b,v[L.id]=b,m.push(b));break;case p.db.LINETYPE.LOOP_END:case p.db.LINETYPE.ALT_END:case p.db.LINETYPE.OPT_END:case p.db.LINETYPE.PAR_END:case p.db.LINETYPE.CRITICAL_END:case p.db.LINETYPE.BREAK_END:b=m.pop(),v[b.id]=b;break;case p.db.LINETYPE.ACTIVE_START:{const B=a[L.from?L.from.actor:L.to.actor],j=AK(L.from?L.from.actor:L.to.actor).length,R=B.x+B.width/2+(j-1)*fn.activationWidth/2,z={startx:R,stopx:R+fn.activationWidth,actor:L.from.actor,enabled:!0};Pr.activations.push(z)}break;case p.db.LINETYPE.ACTIVE_END:{const B=Pr.activations.map(j=>j.actor).lastIndexOf(L.from.actor);delete Pr.activations.splice(B,1)[0]}break}L.placement!==void 0?(E=nGe(L,a,p),L.noteModel=E,m.forEach(B=>{b=B,b.from=Yr.getMin(b.from,E.startx),b.to=Yr.getMax(b.to,E.startx+E.width),b.width=Yr.getMax(b.width,Math.abs(b.from-b.to))-fn.labelBoxWidth})):(_=rGe(L,a,p),L.msgModel=_,_.startx&&_.stopx&&m.length>0&&m.forEach(B=>{if(b=B,_.startx===_.stopx){const j=a[L.from],R=a[L.to];b.from=Yr.getMin(j.x-_.width/2,j.x-j.width/2,b.from),b.to=Yr.getMax(R.x+_.width/2,R.x+j.width/2,b.to),b.width=Yr.getMax(b.width,Math.abs(b.to-b.from))-fn.labelBoxWidth}else b.from=Yr.getMin(_.startx,b.from),b.to=Yr.getMax(_.stopx,b.to),b.width=Yr.getMax(b.width,_.width)-fn.labelBoxWidth}))}),Pr.activations=[],Ut.debug("Loop type widths:",v),v},sGe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:eHe,db:vRt,renderer:{bounds:Pr,drawActors:ggt,drawActorsPopup:ERt,setConf:TRt,draw:ZHe},styles:CHe,init:({wrap:i})=>{vRt.setWrap(i)}}},Symbol.toStringTag,{value:"Module"}));var pgt=function(){var i=function(_e,$t,re,ie){for(re=re||{},ie=_e.length;ie--;re[_e[ie]]=$t);return re},a=[1,16],f=[1,17],p=[1,18],v=[1,37],m=[1,38],b=[1,24],E=[1,22],_=[1,23],L=[1,29],N=[1,30],B=[1,31],j=[1,32],R=[1,33],z=[1,34],K=[1,25],it=[1,26],st=[1,27],ut=[1,28],bt=[1,42],mt=[1,39],yt=[1,40],dt=[1,41],ht=[1,43],wt=[1,9],X=[1,8,9],pt=[1,54],U=[1,55],xt=[1,56],nt=[1,57],Ot=[1,58],Nt=[1,59],qt=[1,60],Ct=[1,8,9,38],Z=[1,71],Tt=[1,8,9,12,13,21,36,38,41,58,59,60,61,62,63,64,69,71],Ht=[1,8,9,12,13,19,21,36,38,41,45,58,59,60,61,62,63,64,69,71,84,86,87,88,89],It=[13,84,86,87,88,89],Ft=[13,63,64,84,86,87,88,89],ke=[13,58,59,60,61,62,84,86,87,88,89],pn=[1,90],Me=[1,8,9,36,38,41],ve=[1,8,9,21],Ge={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,cssClassStatement:27,noteStatement:28,direction:29,acc_title:30,acc_title_value:31,acc_descr:32,acc_descr_value:33,acc_descr_multiline_value:34,namespaceIdentifier:35,STRUCT_START:36,classStatements:37,STRUCT_STOP:38,NAMESPACE:39,classIdentifier:40,STYLE_SEPARATOR:41,members:42,CLASS:43,ANNOTATION_START:44,ANNOTATION_END:45,MEMBER:46,SEPARATOR:47,relation:48,NOTE_FOR:49,noteText:50,NOTE:51,direction_tb:52,direction_bt:53,direction_rl:54,direction_lr:55,relationType:56,lineType:57,AGGREGATION:58,EXTENSION:59,COMPOSITION:60,DEPENDENCY:61,LOLLIPOP:62,LINE:63,DOTTED_LINE:64,CALLBACK:65,LINK:66,LINK_TARGET:67,CLICK:68,CALLBACK_NAME:69,CALLBACK_ARGS:70,HREF:71,CSSCLASS:72,commentToken:73,textToken:74,graphCodeTokens:75,textNoTagsToken:76,TAGSTART:77,TAGEND:78,"==":79,"--":80,PCT:81,DEFAULT:82,SPACE:83,MINUS:84,keywords:85,UNICODE_TEXT:86,NUM:87,ALPHA:88,BQUOTE_STR:89,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",30:"acc_title",31:"acc_title_value",32:"acc_descr",33:"acc_descr_value",34:"acc_descr_multiline_value",36:"STRUCT_START",38:"STRUCT_STOP",39:"NAMESPACE",41:"STYLE_SEPARATOR",43:"CLASS",44:"ANNOTATION_START",45:"ANNOTATION_END",46:"MEMBER",47:"SEPARATOR",49:"NOTE_FOR",51:"NOTE",52:"direction_tb",53:"direction_bt",54:"direction_rl",55:"direction_lr",58:"AGGREGATION",59:"EXTENSION",60:"COMPOSITION",61:"DEPENDENCY",62:"LOLLIPOP",63:"LINE",64:"DOTTED_LINE",65:"CALLBACK",66:"LINK",67:"LINK_TARGET",68:"CLICK",69:"CALLBACK_NAME",70:"CALLBACK_ARGS",71:"HREF",72:"CSSCLASS",75:"graphCodeTokens",77:"TAGSTART",78:"TAGEND",79:"==",80:"--",81:"PCT",82:"DEFAULT",83:"SPACE",84:"MINUS",85:"keywords",86:"UNICODE_TEXT",87:"NUM",88:"ALPHA",89:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[35,2],[37,1],[37,2],[37,3],[23,1],[23,3],[23,4],[23,6],[40,2],[40,3],[25,4],[42,1],[42,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[28,3],[28,2],[29,1],[29,1],[29,1],[29,1],[48,3],[48,2],[48,2],[48,1],[56,1],[56,1],[56,1],[56,1],[56,1],[57,1],[57,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[73,1],[73,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[76,1],[76,1],[76,1],[76,1],[16,1],[16,1],[16,1],[16,1],[18,1],[50,1]],performAction:function($t,re,ie,Oe,oe,Ne,me){var cn=Ne.length-1;switch(oe){case 8:this.$=Ne[cn-1];break;case 9:case 11:case 12:this.$=Ne[cn];break;case 10:case 13:this.$=Ne[cn-1]+Ne[cn];break;case 14:case 15:this.$=Ne[cn-1]+"~"+Ne[cn]+"~";break;case 16:Oe.addRelation(Ne[cn]);break;case 17:Ne[cn-1].title=Oe.cleanupLabel(Ne[cn]),Oe.addRelation(Ne[cn-1]);break;case 26:this.$=Ne[cn].trim(),Oe.setAccTitle(this.$);break;case 27:case 28:this.$=Ne[cn].trim(),Oe.setAccDescription(this.$);break;case 29:Oe.addClassesToNamespace(Ne[cn-3],Ne[cn-1]);break;case 30:Oe.addClassesToNamespace(Ne[cn-4],Ne[cn-1]);break;case 31:this.$=Ne[cn],Oe.addNamespace(Ne[cn]);break;case 32:this.$=[Ne[cn]];break;case 33:this.$=[Ne[cn-1]];break;case 34:Ne[cn].unshift(Ne[cn-2]),this.$=Ne[cn];break;case 36:Oe.setCssClass(Ne[cn-2],Ne[cn]);break;case 37:Oe.addMembers(Ne[cn-3],Ne[cn-1]);break;case 38:Oe.setCssClass(Ne[cn-5],Ne[cn-3]),Oe.addMembers(Ne[cn-5],Ne[cn-1]);break;case 39:this.$=Ne[cn],Oe.addClass(Ne[cn]);break;case 40:this.$=Ne[cn-1],Oe.addClass(Ne[cn-1]),Oe.setClassLabel(Ne[cn-1],Ne[cn]);break;case 41:Oe.addAnnotation(Ne[cn],Ne[cn-2]);break;case 42:this.$=[Ne[cn]];break;case 43:Ne[cn].push(Ne[cn-1]),this.$=Ne[cn];break;case 44:break;case 45:Oe.addMember(Ne[cn-1],Oe.cleanupLabel(Ne[cn]));break;case 46:break;case 47:break;case 48:this.$={id1:Ne[cn-2],id2:Ne[cn],relation:Ne[cn-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:Ne[cn-3],id2:Ne[cn],relation:Ne[cn-1],relationTitle1:Ne[cn-2],relationTitle2:"none"};break;case 50:this.$={id1:Ne[cn-3],id2:Ne[cn],relation:Ne[cn-2],relationTitle1:"none",relationTitle2:Ne[cn-1]};break;case 51:this.$={id1:Ne[cn-4],id2:Ne[cn],relation:Ne[cn-2],relationTitle1:Ne[cn-3],relationTitle2:Ne[cn-1]};break;case 52:Oe.addNote(Ne[cn],Ne[cn-1]);break;case 53:Oe.addNote(Ne[cn]);break;case 54:Oe.setDirection("TB");break;case 55:Oe.setDirection("BT");break;case 56:Oe.setDirection("RL");break;case 57:Oe.setDirection("LR");break;case 58:this.$={type1:Ne[cn-2],type2:Ne[cn],lineType:Ne[cn-1]};break;case 59:this.$={type1:"none",type2:Ne[cn],lineType:Ne[cn-1]};break;case 60:this.$={type1:Ne[cn-1],type2:"none",lineType:Ne[cn]};break;case 61:this.$={type1:"none",type2:"none",lineType:Ne[cn]};break;case 62:this.$=Oe.relationType.AGGREGATION;break;case 63:this.$=Oe.relationType.EXTENSION;break;case 64:this.$=Oe.relationType.COMPOSITION;break;case 65:this.$=Oe.relationType.DEPENDENCY;break;case 66:this.$=Oe.relationType.LOLLIPOP;break;case 67:this.$=Oe.lineType.LINE;break;case 68:this.$=Oe.lineType.DOTTED_LINE;break;case 69:case 75:this.$=Ne[cn-2],Oe.setClickEvent(Ne[cn-1],Ne[cn]);break;case 70:case 76:this.$=Ne[cn-3],Oe.setClickEvent(Ne[cn-2],Ne[cn-1]),Oe.setTooltip(Ne[cn-2],Ne[cn]);break;case 71:this.$=Ne[cn-2],Oe.setLink(Ne[cn-1],Ne[cn]);break;case 72:this.$=Ne[cn-3],Oe.setLink(Ne[cn-2],Ne[cn-1],Ne[cn]);break;case 73:this.$=Ne[cn-3],Oe.setLink(Ne[cn-2],Ne[cn-1]),Oe.setTooltip(Ne[cn-2],Ne[cn]);break;case 74:this.$=Ne[cn-4],Oe.setLink(Ne[cn-3],Ne[cn-2],Ne[cn]),Oe.setTooltip(Ne[cn-3],Ne[cn-1]);break;case 77:this.$=Ne[cn-3],Oe.setClickEvent(Ne[cn-2],Ne[cn-1],Ne[cn]);break;case 78:this.$=Ne[cn-4],Oe.setClickEvent(Ne[cn-3],Ne[cn-2],Ne[cn-1]),Oe.setTooltip(Ne[cn-3],Ne[cn]);break;case 79:this.$=Ne[cn-3],Oe.setLink(Ne[cn-2],Ne[cn]);break;case 80:this.$=Ne[cn-4],Oe.setLink(Ne[cn-3],Ne[cn-1],Ne[cn]);break;case 81:this.$=Ne[cn-4],Oe.setLink(Ne[cn-3],Ne[cn-1]),Oe.setTooltip(Ne[cn-3],Ne[cn]);break;case 82:this.$=Ne[cn-5],Oe.setLink(Ne[cn-4],Ne[cn-2],Ne[cn]),Oe.setTooltip(Ne[cn-4],Ne[cn-1]);break;case 83:Oe.setCssClass(Ne[cn-1],Ne[cn]);break}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:a,32:f,34:p,35:20,39:v,40:21,43:m,44:b,46:E,47:_,49:L,51:N,52:B,53:j,54:R,55:z,65:K,66:it,68:st,72:ut,84:bt,86:mt,87:yt,88:dt,89:ht},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(wt,[2,5],{8:[1,44]}),{8:[1,45]},i(X,[2,16],{21:[1,46]}),i(X,[2,18]),i(X,[2,19]),i(X,[2,20]),i(X,[2,21]),i(X,[2,22]),i(X,[2,23]),i(X,[2,24]),i(X,[2,25]),{31:[1,47]},{33:[1,48]},i(X,[2,28]),i(X,[2,44],{48:49,56:52,57:53,13:[1,50],21:[1,51],58:pt,59:U,60:xt,61:nt,62:Ot,63:Nt,64:qt}),{36:[1,61]},i(Ct,[2,35],{36:[1,63],41:[1,62]}),i(X,[2,46]),i(X,[2,47]),{16:64,84:bt,86:mt,87:yt,88:dt},{16:35,17:65,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},{16:35,17:66,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},{16:35,17:67,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},{13:[1,68]},{16:35,17:69,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},{13:Z,50:70},i(X,[2,54]),i(X,[2,55]),i(X,[2,56]),i(X,[2,57]),i(Tt,[2,11],{16:35,18:36,17:72,19:[1,73],84:bt,86:mt,87:yt,88:dt,89:ht}),i(Tt,[2,12],{19:[1,74]}),{15:75,16:76,84:bt,86:mt,87:yt,88:dt},{16:35,17:77,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},i(Ht,[2,97]),i(Ht,[2,98]),i(Ht,[2,99]),i(Ht,[2,100]),i([1,8,9,12,13,19,21,36,38,41,58,59,60,61,62,63,64,69,71],[2,101]),i(wt,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,17:19,35:20,40:21,16:35,18:36,5:78,30:a,32:f,34:p,39:v,43:m,44:b,46:E,47:_,49:L,51:N,52:B,53:j,54:R,55:z,65:K,66:it,68:st,72:ut,84:bt,86:mt,87:yt,88:dt,89:ht}),{5:79,10:5,16:35,17:19,18:36,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:a,32:f,34:p,35:20,39:v,40:21,43:m,44:b,46:E,47:_,49:L,51:N,52:B,53:j,54:R,55:z,65:K,66:it,68:st,72:ut,84:bt,86:mt,87:yt,88:dt,89:ht},i(X,[2,17]),i(X,[2,26]),i(X,[2,27]),{13:[1,81],16:35,17:80,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},{48:82,56:52,57:53,58:pt,59:U,60:xt,61:nt,62:Ot,63:Nt,64:qt},i(X,[2,45]),{57:83,63:Nt,64:qt},i(It,[2,61],{56:84,58:pt,59:U,60:xt,61:nt,62:Ot}),i(Ft,[2,62]),i(Ft,[2,63]),i(Ft,[2,64]),i(Ft,[2,65]),i(Ft,[2,66]),i(ke,[2,67]),i(ke,[2,68]),{8:[1,86],23:87,37:85,40:21,43:m},{16:88,84:bt,86:mt,87:yt,88:dt},{42:89,46:pn},{45:[1,91]},{13:[1,92]},{13:[1,93]},{69:[1,94],71:[1,95]},{16:96,84:bt,86:mt,87:yt,88:dt},{13:Z,50:97},i(X,[2,53]),i(X,[2,102]),i(Tt,[2,13]),i(Tt,[2,14]),i(Tt,[2,15]),{36:[2,31]},{15:98,16:76,36:[2,9],84:bt,86:mt,87:yt,88:dt},i(Me,[2,39],{11:99,12:[1,100]}),i(wt,[2,7]),{9:[1,101]},i(ve,[2,48]),{16:35,17:102,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},{13:[1,104],16:35,17:103,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},i(It,[2,60],{56:105,58:pt,59:U,60:xt,61:nt,62:Ot}),i(It,[2,59]),{38:[1,106]},{23:87,37:107,40:21,43:m},{8:[1,108],38:[2,32]},i(Ct,[2,36],{36:[1,109]}),{38:[1,110]},{38:[2,42],42:111,46:pn},{16:35,17:112,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},i(X,[2,69],{13:[1,113]}),i(X,[2,71],{13:[1,115],67:[1,114]}),i(X,[2,75],{13:[1,116],70:[1,117]}),{13:[1,118]},i(X,[2,83]),i(X,[2,52]),{36:[2,10]},i(Me,[2,40]),{13:[1,119]},{1:[2,4]},i(ve,[2,50]),i(ve,[2,49]),{16:35,17:120,18:36,84:bt,86:mt,87:yt,88:dt,89:ht},i(It,[2,58]),i(X,[2,29]),{38:[1,121]},{23:87,37:122,38:[2,33],40:21,43:m},{42:123,46:pn},i(Ct,[2,37]),{38:[2,43]},i(X,[2,41]),i(X,[2,70]),i(X,[2,72]),i(X,[2,73],{67:[1,124]}),i(X,[2,76]),i(X,[2,77],{13:[1,125]}),i(X,[2,79],{13:[1,127],67:[1,126]}),{14:[1,128]},i(ve,[2,51]),i(X,[2,30]),{38:[2,34]},{38:[1,129]},i(X,[2,74]),i(X,[2,78]),i(X,[2,80]),i(X,[2,81],{67:[1,130]}),i(Me,[2,8]),i(Ct,[2,38]),i(X,[2,82])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],75:[2,31],98:[2,10],101:[2,4],111:[2,43],122:[2,34]},parseError:function($t,re){if(re.recoverable)this.trace($t);else{var ie=new Error($t);throw ie.hash=re,ie}},parse:function($t){var re=this,ie=[0],Oe=[],oe=[null],Ne=[],me=this.table,cn="",li=0,ya=0,da=2,Oo=1,ds=Ne.slice.call(arguments,1),Dr=Object.create(this.lexer),nr={yy:{}};for(var di in this.yy)Object.prototype.hasOwnProperty.call(this.yy,di)&&(nr.yy[di]=this.yy[di]);Dr.setInput($t,nr.yy),nr.yy.lexer=Dr,nr.yy.parser=this,typeof Dr.yylloc>"u"&&(Dr.yylloc={});var Ee=Dr.yylloc;Ne.push(Ee);var Yn=Dr.options&&Dr.options.ranges;typeof nr.yy.parseError=="function"?this.parseError=nr.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function He(){var Lu;return Lu=Oe.pop()||Dr.lex()||Oo,typeof Lu!="number"&&(Lu instanceof Array&&(Oe=Lu,Lu=Oe.pop()),Lu=re.symbols_[Lu]||Lu),Lu}for(var Ti,gn,ks,qa,La={},Gs,No,vs,nu;;){if(gn=ie[ie.length-1],this.defaultActions[gn]?ks=this.defaultActions[gn]:((Ti===null||typeof Ti>"u")&&(Ti=He()),ks=me[gn]&&me[gn][Ti]),typeof ks>"u"||!ks.length||!ks[0]){var $s="";nu=[];for(Gs in me[gn])this.terminals_[Gs]&&Gs>da&&nu.push("'"+this.terminals_[Gs]+"'");Dr.showPosition?$s="Parse error on line "+(li+1)+`: +`+Dr.showPosition()+` +Expecting `+nu.join(", ")+", got '"+(this.terminals_[Ti]||Ti)+"'":$s="Parse error on line "+(li+1)+": Unexpected "+(Ti==Oo?"end of input":"'"+(this.terminals_[Ti]||Ti)+"'"),this.parseError($s,{text:Dr.match,token:this.terminals_[Ti]||Ti,line:Dr.yylineno,loc:Ee,expected:nu})}if(ks[0]instanceof Array&&ks.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gn+", token: "+Ti);switch(ks[0]){case 1:ie.push(Ti),oe.push(Dr.yytext),Ne.push(Dr.yylloc),ie.push(ks[1]),Ti=null,ya=Dr.yyleng,cn=Dr.yytext,li=Dr.yylineno,Ee=Dr.yylloc;break;case 2:if(No=this.productions_[ks[1]][1],La.$=oe[oe.length-No],La._$={first_line:Ne[Ne.length-(No||1)].first_line,last_line:Ne[Ne.length-1].last_line,first_column:Ne[Ne.length-(No||1)].first_column,last_column:Ne[Ne.length-1].last_column},Yn&&(La._$.range=[Ne[Ne.length-(No||1)].range[0],Ne[Ne.length-1].range[1]]),qa=this.performAction.apply(La,[cn,ya,li,nr.yy,ks[1],oe,Ne].concat(ds)),typeof qa<"u")return qa;No&&(ie=ie.slice(0,-1*No*2),oe=oe.slice(0,-1*No),Ne=Ne.slice(0,-1*No)),ie.push(this.productions_[ks[1]][0]),oe.push(La.$),Ne.push(La._$),vs=me[ie[ie.length-2]][ie[ie.length-1]],ie.push(vs);break;case 3:return!0}}return!0}},Ke=function(){var _e={EOF:1,parseError:function(re,ie){if(this.yy.parser)this.yy.parser.parseError(re,ie);else throw new Error(re)},setInput:function($t,re){return this.yy=re||this.yy||{},this._input=$t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var $t=this._input[0];this.yytext+=$t,this.yyleng++,this.offset++,this.match+=$t,this.matched+=$t;var re=$t.match(/(?:\r\n?|\n).*/g);return re?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),$t},unput:function($t){var re=$t.length,ie=$t.split(/(?:\r\n?|\n)/g);this._input=$t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-re),this.offset-=re;var Oe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ie.length-1&&(this.yylineno-=ie.length-1);var oe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ie?(ie.length===Oe.length?this.yylloc.first_column:0)+Oe[Oe.length-ie.length].length-ie[0].length:this.yylloc.first_column-re},this.options.ranges&&(this.yylloc.range=[oe[0],oe[0]+this.yyleng-re]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function($t){this.unput(this.match.slice($t))},pastInput:function(){var $t=this.matched.substr(0,this.matched.length-this.match.length);return($t.length>20?"...":"")+$t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var $t=this.match;return $t.length<20&&($t+=this._input.substr(0,20-$t.length)),($t.substr(0,20)+($t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var $t=this.pastInput(),re=new Array($t.length+1).join("-");return $t+this.upcomingInput()+` +`+re+"^"},test_match:function($t,re){var ie,Oe,oe;if(this.options.backtrack_lexer&&(oe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(oe.yylloc.range=this.yylloc.range.slice(0))),Oe=$t[0].match(/(?:\r\n?|\n).*/g),Oe&&(this.yylineno+=Oe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Oe?Oe[Oe.length-1].length-Oe[Oe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+$t[0].length},this.yytext+=$t[0],this.match+=$t[0],this.matches=$t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice($t[0].length),this.matched+=$t[0],ie=this.performAction.call(this,this.yy,this,re,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ie)return ie;if(this._backtrack){for(var Ne in oe)this[Ne]=oe[Ne];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var $t,re,ie,Oe;this._more||(this.yytext="",this.match="");for(var oe=this._currentRules(),Ne=0;Nere[0].length)){if(re=ie,Oe=Ne,this.options.backtrack_lexer){if($t=this.test_match(ie,oe[Ne]),$t!==!1)return $t;if(this._backtrack){re=!1;continue}else return!1}else if(!this.options.flex)break}return re?($t=this.test_match(re,oe[Oe]),$t!==!1?$t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var re=this.next();return re||this.lex()},begin:function(re){this.conditionStack.push(re)},popState:function(){var re=this.conditionStack.length-1;return re>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(re){return re=this.conditionStack.length-1-Math.abs(re||0),re>=0?this.conditionStack[re]:"INITIAL"},pushState:function(re){this.begin(re)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(re,ie,Oe,oe){switch(Oe){case 0:return 52;case 1:return 53;case 2:return 54;case 3:return 55;case 4:break;case 5:break;case 6:return this.begin("acc_title"),30;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),32;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 69;case 22:this.popState();break;case 23:return 70;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return this.begin("namespace"),39;case 28:return this.popState(),8;case 29:break;case 30:return this.begin("namespace-body"),36;case 31:return this.popState(),38;case 32:return"EOF_IN_STRUCT";case 33:return 8;case 34:break;case 35:return"EDGE_STATE";case 36:return this.begin("class"),43;case 37:return this.popState(),8;case 38:break;case 39:return this.popState(),this.popState(),38;case 40:return this.begin("class-body"),36;case 41:return this.popState(),38;case 42:return"EOF_IN_STRUCT";case 43:return"EDGE_STATE";case 44:return"OPEN_IN_STRUCT";case 45:break;case 46:return"MEMBER";case 47:return 72;case 48:return 65;case 49:return 66;case 50:return 68;case 51:return 49;case 52:return 51;case 53:return 44;case 54:return 45;case 55:return 71;case 56:this.popState();break;case 57:return"GENERICTYPE";case 58:this.begin("generic");break;case 59:this.popState();break;case 60:return"BQUOTE_STR";case 61:this.begin("bqstring");break;case 62:return 67;case 63:return 67;case 64:return 67;case 65:return 67;case 66:return 59;case 67:return 59;case 68:return 61;case 69:return 61;case 70:return 60;case 71:return 58;case 72:return 62;case 73:return 63;case 74:return 64;case 75:return 21;case 76:return 41;case 77:return 84;case 78:return"DOT";case 79:return"PLUS";case 80:return 81;case 81:return"EQUALS";case 82:return"EQUALS";case 83:return 88;case 84:return 12;case 85:return 14;case 86:return"PUNCTUATION";case 87:return 87;case 88:return 86;case 89:return 83;case 90:return 9}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,31,32,33,34,35,36,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},namespace:{rules:[26,27,28,29,30,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},"class-body":{rules:[26,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},class:{rules:[26,37,38,39,40,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_descr:{rules:[9,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},acc_title:{rules:[7,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},callback_args:{rules:[22,23,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},callback_name:{rules:[19,20,21,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},href:{rules:[26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},struct:{rules:[26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},generic:{rules:[26,47,48,49,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},bqstring:{rules:[26,47,48,49,50,51,52,53,54,55,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},string:{rules:[24,25,26,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,36,47,48,49,50,51,52,53,54,55,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90],inclusive:!0}}};return _e}();Ge.lexer=Ke;function we(){this.yy={}}return we.prototype=Ge,Ge.Parser=we,new we}();pgt.parser=pgt;const _Rt=pgt,SRt=["#","+","~","-",""];class ARt{constructor(a,f){this.memberType=f,this.visibility="",this.classifier="";const p=Dd(a,Le());this.parseMember(p)}getDisplayDetails(){let a=this.visibility+zN(this.id);this.memberType==="method"&&(a+=`(${zN(this.parameters.trim())})`,this.returnType&&(a+=" : "+zN(this.returnType))),a=a.trim();const f=this.parseClassifier();return{displayText:a,cssStyle:f}}parseMember(a){let f="";if(this.memberType==="method"){const p=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/,v=a.match(p);if(v){const m=v[1]?v[1].trim():"";if(SRt.includes(m)&&(this.visibility=m),this.id=v[2].trim(),this.parameters=v[3]?v[3].trim():"",f=v[4]?v[4].trim():"",this.returnType=v[5]?v[5].trim():"",f===""){const b=this.returnType.substring(this.returnType.length-1);b.match(/[$*]/)&&(f=b,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const p=a.length,v=a.substring(0,1),m=a.substring(p-1);SRt.includes(v)&&(this.visibility=v),m.match(/[*?]/)&&(f=m),this.id=a.substring(this.visibility===""?0:1,f===""?p:p-1)}this.classifier=f}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}const LK="classId-";let bgt=[],Ql={},MK=[],LRt=0,dk={},vgt=0,FP=[];const CT=i=>Yr.sanitizeText(i,Le()),fL=function(i){const a=Yr.sanitizeText(i,Le());let f="",p=a;if(a.indexOf("~")>0){const v=a.split("~");p=CT(v[0]),f=CT(v[1])}return{className:p,type:f}},aGe=function(i,a){const f=Yr.sanitizeText(i,Le());a&&(a=CT(a));const{className:p}=fL(f);Ql[p].label=a},IK=function(i){const a=Yr.sanitizeText(i,Le()),{className:f,type:p}=fL(a);if(Object.hasOwn(Ql,f))return;const v=Yr.sanitizeText(f,Le());Ql[v]={id:v,type:p,label:v,cssClasses:[],methods:[],members:[],annotations:[],domId:LK+v+"-"+LRt},LRt++},MRt=function(i){const a=Yr.sanitizeText(i,Le());if(a in Ql)return Ql[a].domId;throw new Error("Class not found: "+a)},oGe=function(){bgt=[],Ql={},MK=[],FP=[],FP.push(DRt),dk={},vgt=0,ap()},cGe=function(i){return Ql[i]},uGe=function(){return Ql},lGe=function(){return bgt},hGe=function(){return MK},fGe=function(i){Ut.debug("Adding relation: "+JSON.stringify(i)),IK(i.id1),IK(i.id2),i.id1=fL(i.id1).className,i.id2=fL(i.id2).className,i.relationTitle1=Yr.sanitizeText(i.relationTitle1.trim(),Le()),i.relationTitle2=Yr.sanitizeText(i.relationTitle2.trim(),Le()),bgt.push(i)},dGe=function(i,a){const f=fL(i).className;Ql[f].annotations.push(a)},IRt=function(i,a){IK(i);const f=fL(i).className,p=Ql[f];if(typeof a=="string"){const v=a.trim();v.startsWith("<<")&&v.endsWith(">>")?p.annotations.push(CT(v.substring(2,v.length-2))):v.indexOf(")")>0?p.methods.push(new ARt(v,"method")):v&&p.members.push(new ARt(v,"attribute"))}},gGe=function(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(f=>IRt(i,f)))},pGe=function(i,a){const f={id:`note${MK.length}`,class:a,text:i};MK.push(f)},bGe=function(i){return i.startsWith(":")&&(i=i.substring(1)),CT(i.trim())},wgt=function(i,a){i.split(",").forEach(function(f){let p=f;f[0].match(/\d/)&&(p=LK+p),Ql[p]!==void 0&&Ql[p].cssClasses.push(a)})},vGe=function(i,a){i.split(",").forEach(function(f){a!==void 0&&(Ql[f].tooltip=CT(a))})},wGe=function(i,a){return a?dk[a].classes[i].tooltip:Ql[i].tooltip},mGe=function(i,a,f){const p=Le();i.split(",").forEach(function(v){let m=v;v[0].match(/\d/)&&(m=LK+m),Ql[m]!==void 0&&(Ql[m].link=$a.formatUrl(a,p),p.securityLevel==="sandbox"?Ql[m].linkTarget="_top":typeof f=="string"?Ql[m].linkTarget=CT(f):Ql[m].linkTarget="_blank")}),wgt(i,"clickable")},yGe=function(i,a,f){i.split(",").forEach(function(p){xGe(p,a,f),Ql[p].haveCallback=!0}),wgt(i,"clickable")},xGe=function(i,a,f){const p=Yr.sanitizeText(i,Le());if(Le().securityLevel!=="loose"||a===void 0)return;const m=p;if(Ql[m]!==void 0){const b=MRt(m);let E=[];if(typeof f=="string"){E=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let _=0;_")),v.classed("hover",!0)}).on("mouseout",function(){a.transition().duration(500).style("opacity",0),yr(this).classed("hover",!1)})};FP.push(DRt);let ORt="TB";const DK={setAccTitle:cg,getAccTitle:op,getAccDescription:up,setAccDescription:cp,getConfig:()=>Le().class,addClass:IK,bindFunctions:kGe,clear:oGe,getClass:cGe,getClasses:uGe,getNotes:hGe,addAnnotation:dGe,addNote:pGe,getRelations:lGe,addRelation:fGe,getDirection:()=>ORt,setDirection:i=>{ORt=i},addMember:IRt,addMembers:gGe,cleanupLabel:bGe,lineType:EGe,relationType:TGe,setClickEvent:yGe,setCssClass:wgt,setLink:mGe,getTooltip:wGe,setTooltip:vGe,lookUpDomId:MRt,setDiagramTitle:Z2,getDiagramTitle:Db,setClassLabel:aGe,addNamespace:function(i){dk[i]===void 0&&(dk[i]={id:i,classes:{},children:{},domId:LK+i+"-"+vgt},vgt++)},addClassesToNamespace:function(i,a){dk[i]!==void 0&&a.map(f=>{Ql[f].parent=i,dk[i].classes[f]=Ql[f]})},getNamespace:function(i){return dk[i]},getNamespaces:function(){return dk}},NRt=i=>`g.classGroup text { + fill: ${i.nodeBorder}; + fill: ${i.classText}; + stroke: none; + font-family: ${i.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${i.classText}; +} +.edgeLabel .label rect { + fill: ${i.mainBkg}; +} +.label text { + fill: ${i.classText}; +} +.edgeLabel .label span { + background: ${i.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${i.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; +} + +g.classGroup line { + stroke: ${i.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${i.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${i.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${i.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${i.lineColor} !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${i.lineColor} !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${i.lineColor} !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${i.lineColor} !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${i.mainBkg} !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${i.mainBkg} !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${i.textColor}; +} +`;let PRt=0;const CGe=function(i,a,f,p,v){const m=function(ut){switch(ut){case v.db.relationType.AGGREGATION:return"aggregation";case v.db.relationType.EXTENSION:return"extension";case v.db.relationType.COMPOSITION:return"composition";case v.db.relationType.DEPENDENCY:return"dependency";case v.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(ut=>!Number.isNaN(ut.y));const b=a.points,E=Z7().x(function(ut){return ut.x}).y(function(ut){return ut.y}).curve(FN),_=i.append("path").attr("d",E(b)).attr("id","edge"+PRt).attr("class","relation");let L="";p.arrowMarkerAbsolute&&(L=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,L=L.replace(/\(/g,"\\("),L=L.replace(/\)/g,"\\)")),f.relation.lineType==1&&_.attr("class","relation dashed-line"),f.relation.lineType==10&&_.attr("class","relation dotted-line"),f.relation.type1!=="none"&&_.attr("marker-start","url("+L+"#"+m(f.relation.type1)+"Start)"),f.relation.type2!=="none"&&_.attr("marker-end","url("+L+"#"+m(f.relation.type2)+"End)");let N,B;const j=a.points.length;let R=$a.calcLabelPosition(a.points);N=R.x,B=R.y;let z,K,it,st;if(j%2!==0&&j>1){let ut=$a.calcCardinalityPosition(f.relation.type1!=="none",a.points,a.points[0]),bt=$a.calcCardinalityPosition(f.relation.type2!=="none",a.points,a.points[j-1]);Ut.debug("cardinality_1_point "+JSON.stringify(ut)),Ut.debug("cardinality_2_point "+JSON.stringify(bt)),z=ut.x,K=ut.y,it=bt.x,st=bt.y}if(f.title!==void 0){const ut=i.append("g").attr("class","classLabel"),bt=ut.append("text").attr("class","label").attr("x",N).attr("y",B).attr("fill","red").attr("text-anchor","middle").text(f.title);window.label=bt;const mt=bt.node().getBBox();ut.insert("rect",":first-child").attr("class","box").attr("x",mt.x-p.padding/2).attr("y",mt.y-p.padding/2).attr("width",mt.width+p.padding).attr("height",mt.height+p.padding)}Ut.info("Rendering relation "+JSON.stringify(f)),f.relationTitle1!==void 0&&f.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",z).attr("y",K).attr("fill","black").attr("font-size","6").text(f.relationTitle1),f.relationTitle2!==void 0&&f.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",it).attr("y",st).attr("fill","black").attr("font-size","6").text(f.relationTitle2),PRt++},_Ge=function(i,a,f,p){Ut.debug("Rendering class ",a,f);const v=a.id,m={id:v,label:a.id,width:0,height:0},b=i.append("g").attr("id",p.db.lookUpDomId(v)).attr("class","classGroup");let E;a.link?E=b.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",f.textHeight+f.padding).attr("x",0):E=b.append("text").attr("y",f.textHeight+f.padding).attr("x",0);let _=!0;a.annotations.forEach(function(bt){const mt=E.append("tspan").text("«"+bt+"»");_||mt.attr("dy",f.textHeight),_=!1});let L=FRt(a);const N=E.append("tspan").text(L).attr("class","title");_||N.attr("dy",f.textHeight);const B=E.node().getBBox().height;let j,R,z;if(a.members.length>0){j=b.append("line").attr("x1",0).attr("y1",f.padding+B+f.dividerMargin/2).attr("y2",f.padding+B+f.dividerMargin/2);const bt=b.append("text").attr("x",f.padding).attr("y",B+f.dividerMargin+f.textHeight).attr("fill","white").attr("class","classText");_=!0,a.members.forEach(function(mt){BRt(bt,mt,_,f),_=!1}),R=bt.node().getBBox()}if(a.methods.length>0){z=b.append("line").attr("x1",0).attr("y1",f.padding+B+f.dividerMargin+R.height).attr("y2",f.padding+B+f.dividerMargin+R.height);const bt=b.append("text").attr("x",f.padding).attr("y",B+2*f.dividerMargin+R.height+f.textHeight).attr("fill","white").attr("class","classText");_=!0,a.methods.forEach(function(mt){BRt(bt,mt,_,f),_=!1})}const K=b.node().getBBox();var it=" ";a.cssClasses.length>0&&(it=it+a.cssClasses.join(" "));const ut=b.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",K.width+2*f.padding).attr("height",K.height+f.padding+.5*f.dividerMargin).attr("class",it).node().getBBox().width;return E.node().childNodes.forEach(function(bt){bt.setAttribute("x",(ut-bt.getBBox().width)/2)}),a.tooltip&&E.insert("title").text(a.tooltip),j&&j.attr("x2",ut),z&&z.attr("x2",ut),m.width=ut,m.height=K.height+f.padding+.5*f.dividerMargin,m},FRt=function(i){let a=i.id;return i.type&&(a+="<"+zN(i.type)+">"),a},SGe=function(i,a,f,p){Ut.debug("Rendering note ",a,f);const v=a.id,m={id:v,text:a.text,width:0,height:0},b=i.append("g").attr("id",v).attr("class","classGroup");let E=b.append("text").attr("y",f.textHeight+f.padding).attr("x",0);const _=JSON.parse(`"${a.text}"`).split(` +`);_.forEach(function(j){Ut.debug(`Adding line: ${j}`),E.append("tspan").text(j).attr("class","title").attr("dy",f.textHeight)});const L=b.node().getBBox(),B=b.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",L.width+2*f.padding).attr("height",L.height+_.length*f.textHeight+f.padding+.5*f.dividerMargin).node().getBBox().width;return E.node().childNodes.forEach(function(j){j.setAttribute("x",(B-j.getBBox().width)/2)}),m.width=B,m.height=L.height+_.length*f.textHeight+f.padding+.5*f.dividerMargin,m},BRt=function(i,a,f,p){const{displayText:v,cssStyle:m}=a.getDisplayDetails(),b=i.append("tspan").attr("x",p.padding).text(v);m!==""&&b.attr("style",a.cssStyle),f||b.attr("dy",p.textHeight)},mgt={getClassTitleString:FRt,drawClass:_Ge,drawEdge:CGe,drawNote:SGe};let OK={};const NK=20,BP=function(i){const a=Object.entries(OK).find(f=>f[1].label===i);if(a)return a[0]},AGe=function(i){i.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},LGe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:_Rt,db:DK,renderer:{draw:function(i,a,f,p){const v=Le().class;OK={},Ut.info("Rendering diagram "+i);const m=Le().securityLevel;let b;m==="sandbox"&&(b=yr("#i"+a));const E=yr(m==="sandbox"?b.nodes()[0].contentDocument.body:"body"),_=E.select(`[id='${a}']`);AGe(_);const L=new a1({multigraph:!0});L.setGraph({isMultiGraph:!0}),L.setDefaultEdgeLabel(function(){return{}});const N=p.db.getClasses(),B=Object.keys(N);for(const ut of B){const bt=N[ut],mt=mgt.drawClass(_,bt,v,p);OK[mt.id]=mt,L.setNode(mt.id,mt),Ut.info("Org height: "+mt.height)}p.db.getRelations().forEach(function(ut){Ut.info("tjoho"+BP(ut.id1)+BP(ut.id2)+JSON.stringify(ut)),L.setEdge(BP(ut.id1),BP(ut.id2),{relation:ut},ut.title||"DEFAULT")}),p.db.getNotes().forEach(function(ut){Ut.debug(`Adding note: ${JSON.stringify(ut)}`);const bt=mgt.drawNote(_,ut,v,p);OK[bt.id]=bt,L.setNode(bt.id,bt),ut.class&&ut.class in N&&L.setEdge(ut.id,BP(ut.class),{relation:{id1:ut.id,id2:ut.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),eL(L),L.nodes().forEach(function(ut){ut!==void 0&&L.node(ut)!==void 0&&(Ut.debug("Node "+ut+": "+JSON.stringify(L.node(ut))),E.select("#"+(p.db.lookUpDomId(ut)||ut)).attr("transform","translate("+(L.node(ut).x-L.node(ut).width/2)+","+(L.node(ut).y-L.node(ut).height/2)+" )"))}),L.edges().forEach(function(ut){ut!==void 0&&L.edge(ut)!==void 0&&(Ut.debug("Edge "+ut.v+" -> "+ut.w+": "+JSON.stringify(L.edge(ut))),mgt.drawEdge(_,L.edge(ut),L.edge(ut).relation,v,p))});const z=_.node().getBBox(),K=z.width+NK*2,it=z.height+NK*2;og(_,it,K,v.useMaxWidth);const st=`${z.x-NK} ${z.y-NK} ${K} ${it}`;Ut.debug(`viewBox ${st}`),_.attr("viewBox",st)}},styles:NRt,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,DK.clear()}}},Symbol.toStringTag,{value:"Module"})),ygt=i=>Yr.sanitizeText(i,Le());let xgt={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const MGe=function(i,a,f,p){const v=Object.keys(i);Ut.info("keys:",v),Ut.info(i),v.forEach(function(m){var L,N;const b=i[m],_={shape:"rect",id:b.id,domId:b.domId,labelText:ygt(b.id),labelStyle:"",style:"fill: none; stroke: black",padding:((L=Le().flowchart)==null?void 0:L.padding)??((N=Le().class)==null?void 0:N.padding)};a.setNode(b.id,_),RRt(b.classes,a,f,p,b.id),Ut.info("setNode",_)})},RRt=function(i,a,f,p,v){const m=Object.keys(i);Ut.info("keys:",m),Ut.info(i),m.filter(b=>i[b].parent==v).forEach(function(b){var z,K;const E=i[b],_=E.cssClasses.join(" "),L={labelStyle:"",style:""},N=E.label??E.id,B=0,j="class_box",R={labelStyle:L.labelStyle,shape:j,labelText:ygt(N),classData:E,rx:B,ry:B,class:_,style:L.style,id:E.id,domId:E.domId,tooltip:p.db.getTooltip(E.id,v)||"",haveCallback:E.haveCallback,link:E.link,width:E.type==="group"?500:void 0,type:E.type,padding:((z=Le().flowchart)==null?void 0:z.padding)??((K=Le().class)==null?void 0:K.padding)};a.setNode(E.id,R),v&&a.setParent(E.id,v),Ut.info("setNode",R)})},IGe=function(i,a,f,p){Ut.info(i),i.forEach(function(v,m){var K,it;const b=v,E="",_={labelStyle:"",style:""},L=b.text,N=0,B="note",j={labelStyle:_.labelStyle,shape:B,labelText:ygt(L),noteData:b,rx:N,ry:N,class:E,style:_.style,id:b.id,domId:b.id,tooltip:"",type:"note",padding:((K=Le().flowchart)==null?void 0:K.padding)??((it=Le().class)==null?void 0:it.padding)};if(a.setNode(b.id,j),Ut.info("setNode",j),!b.class||!(b.class in p))return;const R=f+m,z={id:`edgeNote${R}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:X2(xgt.curve,ig)};a.setEdge(b.id,b.class,z,R)})},DGe=function(i,a){const f=Le().flowchart;let p=0;i.forEach(function(v){var b;p++;const m={classes:"relation",pattern:v.relation.lineType==1?"dashed":"solid",id:"id"+p,arrowhead:v.type==="arrow_open"?"none":"normal",startLabelRight:v.relationTitle1==="none"?"":v.relationTitle1,endLabelLeft:v.relationTitle2==="none"?"":v.relationTitle2,arrowTypeStart:jRt(v.relation.type1),arrowTypeEnd:jRt(v.relation.type2),style:"fill:none",labelStyle:"",curve:X2(f==null?void 0:f.curve,ig)};if(Ut.info(m,v),v.style!==void 0){const E=em(v.style);m.style=E.style,m.labelStyle=E.labelStyle}v.text=v.title,v.text===void 0?v.style!==void 0&&(m.arrowheadStyle="fill: #333"):(m.arrowheadStyle="fill: #333",m.labelpos="c",((b=Le().flowchart)==null?void 0:b.htmlLabels)??Le().htmlLabels?(m.labelType="html",m.label=''+v.text+""):(m.labelType="text",m.label=v.text.replace(Yr.lineBreakRegex,` +`),v.style===void 0&&(m.style=m.style||"stroke: #333; stroke-width: 1.5px;fill:none"),m.labelStyle=m.labelStyle.replace("color:","fill:"))),a.setEdge(v.id1,v.id2,m,p)})},OGe=function(i){xgt={...xgt,...i}},NGe=async function(i,a,f,p){Ut.info("Drawing class - ",a);const v=Le().flowchart??Le().class,m=Le().securityLevel;Ut.info("config:",v);const b=(v==null?void 0:v.nodeSpacing)??50,E=(v==null?void 0:v.rankSpacing)??50,_=new a1({multigraph:!0,compound:!0}).setGraph({rankdir:p.db.getDirection(),nodesep:b,ranksep:E,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),L=p.db.getNamespaces(),N=p.db.getClasses(),B=p.db.getRelations(),j=p.db.getNotes();Ut.info(B),MGe(L,_,a,p),RRt(N,_,a,p),DGe(B,_),IGe(j,_,B.length+1,N);let R;m==="sandbox"&&(R=yr("#i"+a));const z=yr(m==="sandbox"?R.nodes()[0].contentDocument.body:"body"),K=z.select(`[id="${a}"]`),it=z.select("#"+a+" g");if(await I0t(it,_,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",a),$a.insertTitle(K,"classTitleText",(v==null?void 0:v.titleTopMargin)??5,p.db.getDiagramTitle()),cT(_,K,v==null?void 0:v.diagramPadding,v==null?void 0:v.useMaxWidth),!(v!=null&&v.htmlLabels)){const st=m==="sandbox"?R.nodes()[0].contentDocument:document,ut=st.querySelectorAll('[id="'+a+'"] .edgeLabel .label');for(const bt of ut){const mt=bt.getBBox(),yt=st.createElementNS("http://www.w3.org/2000/svg","rect");yt.setAttribute("rx",0),yt.setAttribute("ry",0),yt.setAttribute("width",mt.width),yt.setAttribute("height",mt.height),bt.insertBefore(yt,bt.firstChild)}}};function jRt(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}const PGe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:_Rt,db:DK,renderer:{setConf:OGe,draw:NGe},styles:NRt,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,DK.clear()}}},Symbol.toStringTag,{value:"Module"}));var kgt=function(){var i=function(Ct,Z,Tt,Ht){for(Tt=Tt||{},Ht=Ct.length;Ht--;Tt[Ct[Ht]]=Z);return Tt},a=[1,2],f=[1,3],p=[1,4],v=[2,4],m=[1,9],b=[1,11],E=[1,15],_=[1,16],L=[1,17],N=[1,18],B=[1,30],j=[1,19],R=[1,20],z=[1,21],K=[1,22],it=[1,23],st=[1,25],ut=[1,26],bt=[1,27],mt=[1,28],yt=[1,29],dt=[1,32],ht=[1,33],wt=[1,34],X=[1,35],pt=[1,31],U=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],xt=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],nt=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],Ot={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"-->":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"-->",15:"HIDE_EMPTY",16:"scale",17:"WIDTH",18:"COMPOSIT_STATE",19:"STRUCT_START",20:"STRUCT_STOP",21:"STATE_DESCR",22:"AS",23:"ID",24:"FORK",25:"JOIN",26:"CHOICE",27:"CONCURRENT",28:"note",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(Z,Tt,Ht,It,Ft,ke,pn){var Me=ke.length-1;switch(Ft){case 3:return It.setRootDoc(ke[Me]),ke[Me];case 4:this.$=[];break;case 5:ke[Me]!="nl"&&(ke[Me-1].push(ke[Me]),this.$=ke[Me-1]);break;case 6:case 7:this.$=ke[Me];break;case 8:this.$="nl";break;case 11:this.$=ke[Me];break;case 12:const we=ke[Me-1];we.description=It.trimColon(ke[Me]),this.$=we;break;case 13:this.$={stmt:"relation",state1:ke[Me-2],state2:ke[Me]};break;case 14:const _e=It.trimColon(ke[Me]);this.$={stmt:"relation",state1:ke[Me-3],state2:ke[Me-1],description:_e};break;case 18:this.$={stmt:"state",id:ke[Me-3],type:"default",description:"",doc:ke[Me-1]};break;case 19:var ve=ke[Me],Ge=ke[Me-2].trim();if(ke[Me].match(":")){var Ke=ke[Me].split(":");ve=Ke[0],Ge=[Ge,Ke[1]]}this.$={stmt:"state",id:ve,type:"default",description:Ge};break;case 20:this.$={stmt:"state",id:ke[Me-3],type:"default",description:ke[Me-5],doc:ke[Me-1]};break;case 21:this.$={stmt:"state",id:ke[Me],type:"fork"};break;case 22:this.$={stmt:"state",id:ke[Me],type:"join"};break;case 23:this.$={stmt:"state",id:ke[Me],type:"choice"};break;case 24:this.$={stmt:"state",id:It.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:ke[Me-1].trim(),note:{position:ke[Me-2].trim(),text:ke[Me].trim()}};break;case 28:this.$=ke[Me].trim(),It.setAccTitle(this.$);break;case 29:case 30:this.$=ke[Me].trim(),It.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:ke[Me-1].trim(),classes:ke[Me].trim()};break;case 33:this.$={stmt:"applyClass",id:ke[Me-1].trim(),styleClass:ke[Me].trim()};break;case 34:It.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:It.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:It.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:It.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:ke[Me].trim(),type:"default",description:""};break;case 42:this.$={stmt:"state",id:ke[Me-2].trim(),classes:[ke[Me].trim()],type:"default",description:""};break;case 43:this.$={stmt:"state",id:ke[Me-2].trim(),classes:[ke[Me].trim()],type:"default",description:""};break}},table:[{3:1,4:a,5:f,6:p},{1:[3]},{3:5,4:a,5:f,6:p},{3:6,4:a,5:f,6:p},i([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],v,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:m,5:b,8:8,9:10,10:12,11:13,12:14,15:E,16:_,18:L,21:N,23:B,24:j,25:R,26:z,27:K,28:it,31:24,32:st,34:ut,36:bt,37:mt,41:yt,44:dt,45:ht,46:wt,47:X,50:pt},i(U,[2,5]),{9:36,10:12,11:13,12:14,15:E,16:_,18:L,21:N,23:B,24:j,25:R,26:z,27:K,28:it,31:24,32:st,34:ut,36:bt,37:mt,41:yt,44:dt,45:ht,46:wt,47:X,50:pt},i(U,[2,7]),i(U,[2,8]),i(U,[2,9]),i(U,[2,10]),i(U,[2,11],{13:[1,37],14:[1,38]}),i(U,[2,15]),{17:[1,39]},i(U,[2,17],{19:[1,40]}),{22:[1,41]},i(U,[2,21]),i(U,[2,22]),i(U,[2,23]),i(U,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},i(U,[2,27]),{33:[1,46]},{35:[1,47]},i(U,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},i(xt,[2,40],{51:[1,51]}),i(xt,[2,41],{51:[1,52]}),i(U,[2,34]),i(U,[2,35]),i(U,[2,36]),i(U,[2,37]),i(U,[2,6]),i(U,[2,12]),{12:53,23:B,50:pt},i(U,[2,16]),i(nt,v,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},i(U,[2,28]),i(U,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},i(U,[2,13],{13:[1,63]}),{4:m,5:b,8:8,9:10,10:12,11:13,12:14,15:E,16:_,18:L,20:[1,64],21:N,23:B,24:j,25:R,26:z,27:K,28:it,31:24,32:st,34:ut,36:bt,37:mt,41:yt,44:dt,45:ht,46:wt,47:X,50:pt},i(U,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},i(U,[2,31]),i(U,[2,32]),i(U,[2,33]),i(xt,[2,42]),i(xt,[2,43]),i(U,[2,14]),i(U,[2,18]),i(nt,v,{7:68}),i(U,[2,25]),i(U,[2,26]),{4:m,5:b,8:8,9:10,10:12,11:13,12:14,15:E,16:_,18:L,20:[1,69],21:N,23:B,24:j,25:R,26:z,27:K,28:it,31:24,32:st,34:ut,36:bt,37:mt,41:yt,44:dt,45:ht,46:wt,47:X,50:pt},i(U,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(Z,Tt){if(Tt.recoverable)this.trace(Z);else{var Ht=new Error(Z);throw Ht.hash=Tt,Ht}},parse:function(Z){var Tt=this,Ht=[0],It=[],Ft=[null],ke=[],pn=this.table,Me="",ve=0,Ge=0,Ke=2,we=1,_e=ke.slice.call(arguments,1),$t=Object.create(this.lexer),re={yy:{}};for(var ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ie)&&(re.yy[ie]=this.yy[ie]);$t.setInput(Z,re.yy),re.yy.lexer=$t,re.yy.parser=this,typeof $t.yylloc>"u"&&($t.yylloc={});var Oe=$t.yylloc;ke.push(Oe);var oe=$t.options&&$t.options.ranges;typeof re.yy.parseError=="function"?this.parseError=re.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(){var Ee;return Ee=It.pop()||$t.lex()||we,typeof Ee!="number"&&(Ee instanceof Array&&(It=Ee,Ee=It.pop()),Ee=Tt.symbols_[Ee]||Ee),Ee}for(var me,cn,li,ya,da={},Oo,ds,Dr,nr;;){if(cn=Ht[Ht.length-1],this.defaultActions[cn]?li=this.defaultActions[cn]:((me===null||typeof me>"u")&&(me=Ne()),li=pn[cn]&&pn[cn][me]),typeof li>"u"||!li.length||!li[0]){var di="";nr=[];for(Oo in pn[cn])this.terminals_[Oo]&&Oo>Ke&&nr.push("'"+this.terminals_[Oo]+"'");$t.showPosition?di="Parse error on line "+(ve+1)+`: +`+$t.showPosition()+` +Expecting `+nr.join(", ")+", got '"+(this.terminals_[me]||me)+"'":di="Parse error on line "+(ve+1)+": Unexpected "+(me==we?"end of input":"'"+(this.terminals_[me]||me)+"'"),this.parseError(di,{text:$t.match,token:this.terminals_[me]||me,line:$t.yylineno,loc:Oe,expected:nr})}if(li[0]instanceof Array&&li.length>1)throw new Error("Parse Error: multiple actions possible at state: "+cn+", token: "+me);switch(li[0]){case 1:Ht.push(me),Ft.push($t.yytext),ke.push($t.yylloc),Ht.push(li[1]),me=null,Ge=$t.yyleng,Me=$t.yytext,ve=$t.yylineno,Oe=$t.yylloc;break;case 2:if(ds=this.productions_[li[1]][1],da.$=Ft[Ft.length-ds],da._$={first_line:ke[ke.length-(ds||1)].first_line,last_line:ke[ke.length-1].last_line,first_column:ke[ke.length-(ds||1)].first_column,last_column:ke[ke.length-1].last_column},oe&&(da._$.range=[ke[ke.length-(ds||1)].range[0],ke[ke.length-1].range[1]]),ya=this.performAction.apply(da,[Me,Ge,ve,re.yy,li[1],Ft,ke].concat(_e)),typeof ya<"u")return ya;ds&&(Ht=Ht.slice(0,-1*ds*2),Ft=Ft.slice(0,-1*ds),ke=ke.slice(0,-1*ds)),Ht.push(this.productions_[li[1]][0]),Ft.push(da.$),ke.push(da._$),Dr=pn[Ht[Ht.length-2]][Ht[Ht.length-1]],Ht.push(Dr);break;case 3:return!0}}return!0}},Nt=function(){var Ct={EOF:1,parseError:function(Tt,Ht){if(this.yy.parser)this.yy.parser.parseError(Tt,Ht);else throw new Error(Tt)},setInput:function(Z,Tt){return this.yy=Tt||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var Tt=Z.match(/(?:\r\n?|\n).*/g);return Tt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},unput:function(Z){var Tt=Z.length,Ht=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Tt),this.offset-=Tt;var It=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ht.length-1&&(this.yylineno-=Ht.length-1);var Ft=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ht?(Ht.length===It.length?this.yylloc.first_column:0)+It[It.length-Ht.length].length-Ht[0].length:this.yylloc.first_column-Tt},this.options.ranges&&(this.yylloc.range=[Ft[0],Ft[0]+this.yyleng-Tt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Z){this.unput(this.match.slice(Z))},pastInput:function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Z=this.pastInput(),Tt=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+` +`+Tt+"^"},test_match:function(Z,Tt){var Ht,It,Ft;if(this.options.backtrack_lexer&&(Ft={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ft.yylloc.range=this.yylloc.range.slice(0))),It=Z[0].match(/(?:\r\n?|\n).*/g),It&&(this.yylineno+=It.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:It?It[It.length-1].length-It[It.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Z[0].length),this.matched+=Z[0],Ht=this.performAction.call(this,this.yy,this,Tt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ht)return Ht;if(this._backtrack){for(var ke in Ft)this[ke]=Ft[ke];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,Tt,Ht,It;this._more||(this.yytext="",this.match="");for(var Ft=this._currentRules(),ke=0;keTt[0].length)){if(Tt=Ht,It=ke,this.options.backtrack_lexer){if(Z=this.test_match(Ht,Ft[ke]),Z!==!1)return Z;if(this._backtrack){Tt=!1;continue}else return!1}else if(!this.options.flex)break}return Tt?(Z=this.test_match(Tt,Ft[It]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Tt=this.next();return Tt||this.lex()},begin:function(Tt){this.conditionStack.push(Tt)},popState:function(){var Tt=this.conditionStack.length-1;return Tt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Tt){return Tt=this.conditionStack.length-1-Math.abs(Tt||0),Tt>=0?this.conditionStack[Tt]:"INITIAL"},pushState:function(Tt){this.begin(Tt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Tt,Ht,It,Ft){switch(It){case 0:return 40;case 1:return 44;case 2:return 45;case 3:return 46;case 4:return 47;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),16;case 13:return 17;case 14:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 29:return this.pushState("SCALE"),16;case 30:return 17;case 31:this.popState();break;case 32:this.pushState("STATE");break;case 33:return this.popState(),Ht.yytext=Ht.yytext.slice(0,-8).trim(),24;case 34:return this.popState(),Ht.yytext=Ht.yytext.slice(0,-8).trim(),25;case 35:return this.popState(),Ht.yytext=Ht.yytext.slice(0,-10).trim(),26;case 36:return this.popState(),Ht.yytext=Ht.yytext.slice(0,-8).trim(),24;case 37:return this.popState(),Ht.yytext=Ht.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),Ht.yytext=Ht.yytext.slice(0,-10).trim(),26;case 39:return 44;case 40:return 45;case 41:return 46;case 42:return 47;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:return this.popState(),"ID";case 46:this.popState();break;case 47:return"STATE_DESCR";case 48:return 18;case 49:this.popState();break;case 50:return this.popState(),this.pushState("struct"),19;case 51:break;case 52:return this.popState(),20;case 53:break;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 59:break;case 60:return"NOTE_TEXT";case 61:return this.popState(),"ID";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),Ht.yytext=Ht.yytext.substr(2).trim(),30;case 64:return this.popState(),Ht.yytext=Ht.yytext.slice(0,-8).trim(),30;case 65:return 6;case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return Ht.yytext=Ht.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 74:return 5;case 75:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};return Ct}();Ot.lexer=Nt;function qt(){this.yy={}}return qt.prototype=Ot,Ot.Parser=qt,new qt}();kgt.parser=kgt;const $Rt=kgt,FGe="LR",BGe="TB",PK="state",Egt="relation",RGe="classDef",jGe="applyClass",RP="default",zRt="divider",Tgt="[*]",qRt="start",HRt=Tgt,GRt="end",VRt="color",URt="fill",$Ge="bgFill",zGe=",";function WRt(){return{}}let KRt=FGe,FK=[],jP=WRt();const YRt=()=>({relations:[],states:{},documents:{}});let BK={root:YRt()},k0=BK.root,$P=0,XRt=0;const qGe={LINE:0,DOTTED_LINE:1},HGe={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},RK=i=>JSON.parse(JSON.stringify(i)),GGe=i=>{Ut.info("Setting root doc",i),FK=i},VGe=()=>FK,jK=(i,a,f)=>{if(a.stmt===Egt)jK(i,a.state1,!0),jK(i,a.state2,!1);else if(a.stmt===PK&&(a.id==="[*]"?(a.id=f?i.id+"_start":i.id+"_end",a.start=f):a.id=a.id.trim()),a.doc){const p=[];let v=[],m;for(m=0;m0&&v.length>0){const b={stmt:PK,id:HDt(),type:"divider",doc:RK(v)};p.push(RK(b)),a.doc=p}a.doc.forEach(b=>jK(a,b,!0))}},UGe=()=>(jK({id:"root"},{id:"root",doc:FK},!0),{id:"root",doc:FK}),WGe=i=>{let a;i.doc?a=i.doc:a=i,Ut.info(a),QRt(!0),Ut.info("Extract",a),a.forEach(f=>{switch(f.stmt){case PK:_T(f.id.trim(),f.type,f.doc,f.description,f.note,f.classes,f.styles,f.textStyles);break;case Egt:ZRt(f.state1,f.state2,f.description);break;case RGe:JRt(f.id.trim(),f.classes);break;case jGe:Agt(f.id.trim(),f.styleClass);break}})},_T=function(i,a=RP,f=null,p=null,v=null,m=null,b=null,E=null){const _=i==null?void 0:i.trim();k0.states[_]===void 0?(Ut.info("Adding state ",_,p),k0.states[_]={id:_,descriptions:[],type:a,doc:f,note:v,classes:[],styles:[],textStyles:[]}):(k0.states[_].doc||(k0.states[_].doc=f),k0.states[_].type||(k0.states[_].type=a)),p&&(Ut.info("Setting state description",_,p),typeof p=="string"&&Sgt(_,p.trim()),typeof p=="object"&&p.forEach(L=>Sgt(_,L.trim()))),v&&(k0.states[_].note=v,k0.states[_].note.text=Yr.sanitizeText(k0.states[_].note.text,Le())),m&&(Ut.info("Setting state classes",_,m),(typeof m=="string"?[m]:m).forEach(N=>Agt(_,N.trim()))),b&&(Ut.info("Setting state styles",_,b),(typeof b=="string"?[b]:b).forEach(N=>rVe(_,N.trim()))),E&&(Ut.info("Setting state styles",_,b),(typeof E=="string"?[E]:E).forEach(N=>iVe(_,N.trim())))},QRt=function(i){BK={root:YRt()},k0=BK.root,$P=0,jP=WRt(),i||ap()},zP=function(i){return k0.states[i]},KGe=function(){return k0.states},YGe=function(){Ut.info("Documents = ",BK)},XGe=function(){return k0.relations};function Cgt(i=""){let a=i;return i===Tgt&&($P++,a=`${qRt}${$P}`),a}function _gt(i="",a=RP){return i===Tgt?qRt:a}function QGe(i=""){let a=i;return i===HRt&&($P++,a=`${GRt}${$P}`),a}function ZGe(i="",a=RP){return i===HRt?GRt:a}function JGe(i,a,f){let p=Cgt(i.id.trim()),v=_gt(i.id.trim(),i.type),m=Cgt(a.id.trim()),b=_gt(a.id.trim(),a.type);_T(p,v,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),_T(m,b,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles),k0.relations.push({id1:p,id2:m,relationTitle:Yr.sanitizeText(f,Le())})}const ZRt=function(i,a,f){if(typeof i=="object")JGe(i,a,f);else{const p=Cgt(i.trim()),v=_gt(i),m=QGe(a.trim()),b=ZGe(a);_T(p,v),_T(m,b),k0.relations.push({id1:p,id2:m,title:Yr.sanitizeText(f,Le())})}},Sgt=function(i,a){const f=k0.states[i],p=a.startsWith(":")?a.replace(":","").trim():a;f.descriptions.push(Yr.sanitizeText(p,Le()))},tVe=function(i){return i.substring(0,1)===":"?i.substr(2).trim():i.trim()},eVe=()=>(XRt++,"divider-id-"+XRt),JRt=function(i,a=""){jP[i]===void 0&&(jP[i]={id:i,styles:[],textStyles:[]});const f=jP[i];a!=null&&a.split(zGe).forEach(p=>{const v=p.replace(/([^;]*);/,"$1").trim();if(p.match(VRt)){const b=v.replace(URt,$Ge).replace(VRt,URt);f.textStyles.push(b)}f.styles.push(v)})},nVe=function(){return jP},Agt=function(i,a){i.split(",").forEach(function(f){let p=zP(f);if(p===void 0){const v=f.trim();_T(v),p=zP(v)}p.classes.push(a)})},rVe=function(i,a){const f=zP(i);f!==void 0&&f.textStyles.push(a)},iVe=function(i,a){const f=zP(i);f!==void 0&&f.textStyles.push(a)},O5={getConfig:()=>Le().state,addState:_T,clear:QRt,getState:zP,getStates:KGe,getRelations:XGe,getClasses:nVe,getDirection:()=>KRt,addRelation:ZRt,getDividerId:eVe,setDirection:i=>{KRt=i},cleanupLabel:tVe,lineType:qGe,relationType:HGe,logDocuments:YGe,getRootDoc:VGe,setRootDoc:GGe,getRootDocV2:UGe,extract:WGe,trimColon:i=>i&&i[0]===":"?i.substr(1).trim():i.trim(),getAccTitle:op,setAccTitle:cg,getAccDescription:up,setAccDescription:cp,addStyleClass:JRt,setCssClass:Agt,addDescription:Sgt,setDiagramTitle:Z2,getDiagramTitle:Db},tjt=i=>` +defs #statediagram-barbEnd { + fill: ${i.transitionColor}; + stroke: ${i.transitionColor}; + } +g.stateGroup text { + fill: ${i.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${i.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${i.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; +} + +g.stateGroup line { + stroke: ${i.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${i.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${i.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${i.noteBorderColor}; + fill: ${i.noteBkgColor}; + + text { + fill: ${i.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${i.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${i.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel .label text { + fill: ${i.transitionLabelColor||i.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${i.transitionLabelColor||i.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${i.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${i.specialStateColor}; + stroke: ${i.specialStateColor}; +} + +.node .fork-join { + fill: ${i.specialStateColor}; + stroke: ${i.specialStateColor}; +} + +.node circle.state-end { + fill: ${i.innerEndBackground}; + stroke: ${i.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${i.compositeBackground||i.background}; + // stroke: ${i.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${i.stateBkg||i.mainBkg}; + stroke: ${i.stateBorder||i.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${i.mainBkg}; + stroke: ${i.stateBorder||i.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${i.lineColor}; +} + +.statediagram-cluster rect { + fill: ${i.compositeTitleBackground}; + stroke: ${i.stateBorder||i.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${i.stateLabelColor}; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${i.stateBorder||i.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${i.compositeBackground||i.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${i.altBackground?i.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${i.altBackground?i.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${i.noteBkgColor}; + stroke: ${i.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${i.noteBkgColor}; + stroke: ${i.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${i.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${i.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${i.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${i.lineColor}; + stroke: ${i.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${i.textColor}; +} +`,Lgt={},sVe=(i,a)=>{Lgt[i]=a},aVe=i=>Lgt[i],ejt=()=>Object.keys(Lgt),oVe={get:aVe,set:sVe,keys:ejt,size:()=>ejt().length},cVe=i=>i.append("circle").attr("class","start-state").attr("r",Le().state.sizeUnit).attr("cx",Le().state.padding+Le().state.sizeUnit).attr("cy",Le().state.padding+Le().state.sizeUnit),uVe=i=>i.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Le().state.textHeight).attr("class","divider").attr("x2",Le().state.textHeight*2).attr("y1",0).attr("y2",0),lVe=(i,a)=>{const f=i.append("text").attr("x",2*Le().state.padding).attr("y",Le().state.textHeight+2*Le().state.padding).attr("font-size",Le().state.fontSize).attr("class","state-title").text(a.id),p=f.node().getBBox();return i.insert("rect",":first-child").attr("x",Le().state.padding).attr("y",Le().state.padding).attr("width",p.width+2*Le().state.padding).attr("height",p.height+2*Le().state.padding).attr("rx",Le().state.radius),f},hVe=(i,a)=>{const f=function(j,R,z){const K=j.append("tspan").attr("x",2*Le().state.padding).text(R);z||K.attr("dy",Le().state.textHeight)},v=i.append("text").attr("x",2*Le().state.padding).attr("y",Le().state.textHeight+1.3*Le().state.padding).attr("font-size",Le().state.fontSize).attr("class","state-title").text(a.descriptions[0]).node().getBBox(),m=v.height,b=i.append("text").attr("x",Le().state.padding).attr("y",m+Le().state.padding*.4+Le().state.dividerMargin+Le().state.textHeight).attr("class","state-description");let E=!0,_=!0;a.descriptions.forEach(function(j){E||(f(b,j,_),_=!1),E=!1});const L=i.append("line").attr("x1",Le().state.padding).attr("y1",Le().state.padding+m+Le().state.dividerMargin/2).attr("y2",Le().state.padding+m+Le().state.dividerMargin/2).attr("class","descr-divider"),N=b.node().getBBox(),B=Math.max(N.width,v.width);return L.attr("x2",B+3*Le().state.padding),i.insert("rect",":first-child").attr("x",Le().state.padding).attr("y",Le().state.padding).attr("width",B+2*Le().state.padding).attr("height",N.height+m+2*Le().state.padding).attr("rx",Le().state.radius),i},fVe=(i,a,f)=>{const p=Le().state.padding,v=2*Le().state.padding,m=i.node().getBBox(),b=m.width,E=m.x,_=i.append("text").attr("x",0).attr("y",Le().state.titleShift).attr("font-size",Le().state.fontSize).attr("class","state-title").text(a.id),N=_.node().getBBox().width+v;let B=Math.max(N,b);B===b&&(B=B+v);let j;const R=i.node().getBBox();a.doc,j=E-p,N>b&&(j=(b-B)/2+p),Math.abs(E-R.x)b&&(j=E-(N-b)/2);const z=1-Le().state.textHeight;return i.insert("rect",":first-child").attr("x",j).attr("y",z).attr("class",f?"alt-composit":"composit").attr("width",B).attr("height",R.height+Le().state.textHeight+Le().state.titleShift+1).attr("rx","0"),_.attr("x",j+p),N<=b&&_.attr("x",E+(B-v)/2-N/2+p),i.insert("rect",":first-child").attr("x",j).attr("y",Le().state.titleShift-Le().state.textHeight-Le().state.padding).attr("width",B).attr("height",Le().state.textHeight*3).attr("rx",Le().state.radius),i.insert("rect",":first-child").attr("x",j).attr("y",Le().state.titleShift-Le().state.textHeight-Le().state.padding).attr("width",B).attr("height",R.height+3+2*Le().state.textHeight).attr("rx",Le().state.radius),i},dVe=i=>(i.append("circle").attr("class","end-state-outer").attr("r",Le().state.sizeUnit+Le().state.miniPadding).attr("cx",Le().state.padding+Le().state.sizeUnit+Le().state.miniPadding).attr("cy",Le().state.padding+Le().state.sizeUnit+Le().state.miniPadding),i.append("circle").attr("class","end-state-inner").attr("r",Le().state.sizeUnit).attr("cx",Le().state.padding+Le().state.sizeUnit+2).attr("cy",Le().state.padding+Le().state.sizeUnit+2)),gVe=(i,a)=>{let f=Le().state.forkWidth,p=Le().state.forkHeight;if(a.parentId){let v=f;f=p,p=v}return i.append("rect").style("stroke","black").style("fill","black").attr("width",f).attr("height",p).attr("x",Le().state.padding).attr("y",Le().state.padding)},pVe=(i,a,f,p)=>{let v=0;const m=p.append("text");m.style("text-anchor","start"),m.attr("class","noteText");let b=i.replace(/\r\n/g,"
");b=b.replace(/\n/g,"
");const E=b.split(Yr.lineBreakRegex);let _=1.25*Le().state.noteMargin;for(const L of E){const N=L.trim();if(N.length>0){const B=m.append("tspan");if(B.text(N),_===0){const j=B.node().getBBox();_+=j.height}v+=_,B.attr("x",a+Le().state.noteMargin),B.attr("y",f+v+1.25*Le().state.noteMargin)}}return{textWidth:m.node().getBBox().width,textHeight:v}},bVe=(i,a)=>{a.attr("class","state-note");const f=a.append("rect").attr("x",0).attr("y",Le().state.padding),p=a.append("g"),{textWidth:v,textHeight:m}=pVe(i,0,0,p);return f.attr("height",m+2*Le().state.noteMargin),f.attr("width",v+Le().state.noteMargin*2),f},njt=function(i,a){const f=a.id,p={id:f,label:a.id,width:0,height:0},v=i.append("g").attr("id",f).attr("class","stateGroup");a.type==="start"&&cVe(v),a.type==="end"&&dVe(v),(a.type==="fork"||a.type==="join")&&gVe(v,a),a.type==="note"&&bVe(a.note.text,v),a.type==="divider"&&uVe(v),a.type==="default"&&a.descriptions.length===0&&lVe(v,a),a.type==="default"&&a.descriptions.length>0&&hVe(v,a);const m=v.node().getBBox();return p.width=m.width+2*Le().state.padding,p.height=m.height+2*Le().state.padding,oVe.set(f,p),p};let rjt=0;const vVe=function(i,a,f){const p=function(_){switch(_){case O5.relationType.AGGREGATION:return"aggregation";case O5.relationType.EXTENSION:return"extension";case O5.relationType.COMPOSITION:return"composition";case O5.relationType.DEPENDENCY:return"dependency"}};a.points=a.points.filter(_=>!Number.isNaN(_.y));const v=a.points,m=Z7().x(function(_){return _.x}).y(function(_){return _.y}).curve(FN),b=i.append("path").attr("d",m(v)).attr("id","edge"+rjt).attr("class","transition");let E="";if(Le().state.arrowMarkerAbsolute&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\("),E=E.replace(/\)/g,"\\)")),b.attr("marker-end","url("+E+"#"+p(O5.relationType.DEPENDENCY)+"End)"),f.title!==void 0){const _=i.append("g").attr("class","stateLabel"),{x:L,y:N}=$a.calcLabelPosition(a.points),B=Yr.getRows(f.title);let j=0;const R=[];let z=0,K=0;for(let ut=0;ut<=B.length;ut++){const bt=_.append("text").attr("text-anchor","middle").text(B[ut]).attr("x",L).attr("y",N+j),mt=bt.node().getBBox();z=Math.max(z,mt.width),K=Math.min(K,mt.x),Ut.info(mt.x,L,N+j),j===0&&(j=bt.node().getBBox().height,Ut.info("Title height",j,N)),R.push(bt)}let it=j*B.length;if(B.length>1){const ut=(B.length-1)*j*.5;R.forEach((bt,mt)=>bt.attr("y",N+mt*j-ut)),it=j*B.length}const st=_.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",L-z/2-Le().state.padding/2).attr("y",N-it/2-Le().state.padding/2-3.5).attr("width",z+Le().state.padding).attr("height",it+Le().state.padding),Ut.info(st)}rjt++};let Rb;const Mgt={},wVe=function(){},mVe=function(i){i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},yVe=function(i,a,f,p){Rb=Le().state;const v=Le().securityLevel;let m;v==="sandbox"&&(m=yr("#i"+a));const b=yr(v==="sandbox"?m.nodes()[0].contentDocument.body:"body"),E=v==="sandbox"?m.nodes()[0].contentDocument:document;Ut.debug("Rendering diagram "+i);const _=b.select(`[id='${a}']`);mVe(_);const L=p.db.getRootDoc();ijt(L,_,void 0,!1,b,E,p);const N=Rb.padding,B=_.node().getBBox(),j=B.width+N*2,R=B.height+N*2,z=j*1.75;og(_,R,z,Rb.useMaxWidth),_.attr("viewBox",`${B.x-Rb.padding} ${B.y-Rb.padding} `+j+" "+R)},xVe=i=>i?i.length*Rb.fontSizeFactor:1,ijt=(i,a,f,p,v,m,b)=>{const E=new a1({compound:!0,multigraph:!0});let _,L=!0;for(_=0;_{const mt=bt.parentElement;let yt=0,dt=0;mt&&(mt.parentElement&&(yt=mt.parentElement.getBBox().width),dt=parseInt(mt.getAttribute("data-x-shift"),10),Number.isNaN(dt)&&(dt=0)),bt.setAttribute("x1",0-dt+8),bt.setAttribute("x2",yt-dt-8)})):Ut.debug("No Node "+st+": "+JSON.stringify(E.node(st)))});let K=z.getBBox();E.edges().forEach(function(st){st!==void 0&&E.edge(st)!==void 0&&(Ut.debug("Edge "+st.v+" -> "+st.w+": "+JSON.stringify(E.edge(st))),vVe(a,E.edge(st),E.edge(st).relation))}),K=z.getBBox();const it={id:f||"root",label:f||"root",width:0,height:0};return it.width=K.width+2*Rb.padding,it.height=K.height+2*Rb.padding,Ut.debug("Doc rendered",it,E),it},kVe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:$Rt,db:O5,renderer:{setConf:wVe,draw:yVe},styles:tjt,init:i=>{i.state||(i.state={}),i.state.arrowMarkerAbsolute=i.arrowMarkerAbsolute,O5.clear()}}},Symbol.toStringTag,{value:"Module"})),$K="rect",Igt="rectWithTitle",EVe="start",TVe="end",CVe="divider",_Ve="roundedWithTitle",SVe="note",AVe="noteGroup",dL="statediagram",LVe=`${dL}-state`,sjt="transition",MVe="note",IVe=`${sjt} note-edge`,DVe=`${dL}-${MVe}`,OVe=`${dL}-cluster`,NVe=`${dL}-cluster-alt`,ajt="parent",ojt="note",PVe="state",Dgt="----",FVe=`${Dgt}${ojt}`,cjt=`${Dgt}${ajt}`,ujt="fill:none",ljt="fill: #333",hjt="c",fjt="text",djt="normal";let zK={},gk=0;const BVe=function(i){const a=Object.keys(i);for(const f of a)i[f]},RVe=function(i,a){return a.db.extract(a.db.getRootDocV2()),a.db.getClasses()};function jVe(i){return i==null?"":i.classes?i.classes.join(" "):""}function Ogt(i="",a=0,f="",p=Dgt){const v=f!==null&&f.length>0?`${p}${f}`:"";return`${PVe}-${i}${v}-${a}`}const qP=(i,a,f,p,v,m)=>{const b=f.id,E=jVe(p[b]);if(b!=="root"){let _=$K;f.start===!0&&(_=EVe),f.start===!1&&(_=TVe),f.type!==RP&&(_=f.type),zK[b]||(zK[b]={id:b,shape:_,description:Yr.sanitizeText(b,Le()),classes:`${E} ${LVe}`});const L=zK[b];f.description&&(Array.isArray(L.description)?(L.shape=Igt,L.description.push(f.description)):L.description.length>0?(L.shape=Igt,L.description===b?L.description=[f.description]:L.description=[L.description,f.description]):(L.shape=$K,L.description=f.description),L.description=Yr.sanitizeTextOrArray(L.description,Le())),L.description.length===1&&L.shape===Igt&&(L.shape=$K),!L.type&&f.doc&&(Ut.info("Setting cluster for ",b,Ngt(f)),L.type="group",L.dir=Ngt(f),L.shape=f.type===zRt?CVe:_Ve,L.classes=L.classes+" "+OVe+" "+(m?NVe:""));const N={labelStyle:"",shape:L.shape,labelText:L.description,classes:L.classes,style:"",id:b,dir:L.dir,domId:Ogt(b,gk),type:L.type,padding:15};if(N.centerLabel=!0,f.note){const B={labelStyle:"",shape:SVe,labelText:f.note.text,classes:DVe,style:"",id:b+FVe+"-"+gk,domId:Ogt(b,gk,ojt),type:L.type,padding:15},j={labelStyle:"",shape:AVe,labelText:f.note.text,classes:L.classes,style:"",id:b+cjt,domId:Ogt(b,gk,ajt),type:"group",padding:0};gk++;const R=b+cjt;i.setNode(R,j),i.setNode(B.id,B),i.setNode(b,N),i.setParent(b,R),i.setParent(B.id,R);let z=b,K=B.id;f.note.position==="left of"&&(z=B.id,K=b),i.setEdge(z,K,{arrowhead:"none",arrowType:"",style:ujt,labelStyle:"",classes:IVe,arrowheadStyle:ljt,labelpos:hjt,labelType:fjt,thickness:djt})}else i.setNode(b,N)}a&&a.id!=="root"&&(Ut.trace("Setting node ",b," to be child of its parent ",a.id),i.setParent(b,a.id)),f.doc&&(Ut.trace("Adding nodes children "),$Ve(i,f,f.doc,p,v,!m))},$Ve=(i,a,f,p,v,m)=>{Ut.trace("items",f),f.forEach(b=>{switch(b.stmt){case PK:qP(i,a,b,p,v,m);break;case RP:qP(i,a,b,p,v,m);break;case Egt:{qP(i,a,b.state1,p,v,m),qP(i,a,b.state2,p,v,m);const E={id:"edge"+gk,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:ujt,labelStyle:"",label:Yr.sanitizeText(b.description,Le()),arrowheadStyle:ljt,labelpos:hjt,labelType:fjt,thickness:djt,classes:sjt};i.setEdge(b.state1.id,b.state2.id,E,gk),gk++}break}})},Ngt=(i,a=BGe)=>{let f=a;if(i.doc)for(let p=0;p{i.state||(i.state={}),i.state.arrowMarkerAbsolute=i.arrowMarkerAbsolute,O5.clear()}}},Symbol.toStringTag,{value:"Module"}));var Pgt=function(){var i=function(B,j,R,z){for(R=R||{},z=B.length;z--;R[B[z]]=j);return R},a=[6,8,10,11,12,14,16,17,18],f=[1,9],p=[1,10],v=[1,11],m=[1,12],b=[1,13],E=[1,14],_={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(j,R,z,K,it,st,ut){var bt=st.length-1;switch(it){case 1:return st[bt-1];case 2:this.$=[];break;case 3:st[bt-1].push(st[bt]),this.$=st[bt-1];break;case 4:case 5:this.$=st[bt];break;case 6:case 7:this.$=[];break;case 8:K.setDiagramTitle(st[bt].substr(6)),this.$=st[bt].substr(6);break;case 9:this.$=st[bt].trim(),K.setAccTitle(this.$);break;case 10:case 11:this.$=st[bt].trim(),K.setAccDescription(this.$);break;case 12:K.addSection(st[bt].substr(8)),this.$=st[bt].substr(8);break;case 13:K.addTask(st[bt-1],st[bt]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},i(a,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:f,12:p,14:v,16:m,17:b,18:E},i(a,[2,7],{1:[2,1]}),i(a,[2,3]),{9:15,11:f,12:p,14:v,16:m,17:b,18:E},i(a,[2,5]),i(a,[2,6]),i(a,[2,8]),{13:[1,16]},{15:[1,17]},i(a,[2,11]),i(a,[2,12]),{19:[1,18]},i(a,[2,4]),i(a,[2,9]),i(a,[2,10]),i(a,[2,13])],defaultActions:{},parseError:function(j,R){if(R.recoverable)this.trace(j);else{var z=new Error(j);throw z.hash=R,z}},parse:function(j){var R=this,z=[0],K=[],it=[null],st=[],ut=this.table,bt="",mt=0,yt=0,dt=2,ht=1,wt=st.slice.call(arguments,1),X=Object.create(this.lexer),pt={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(pt.yy[U]=this.yy[U]);X.setInput(j,pt.yy),pt.yy.lexer=X,pt.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var xt=X.yylloc;st.push(xt);var nt=X.options&&X.options.ranges;typeof pt.yy.parseError=="function"?this.parseError=pt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Me;return Me=K.pop()||X.lex()||ht,typeof Me!="number"&&(Me instanceof Array&&(K=Me,Me=K.pop()),Me=R.symbols_[Me]||Me),Me}for(var Nt,qt,Ct,Z,Tt={},Ht,It,Ft,ke;;){if(qt=z[z.length-1],this.defaultActions[qt]?Ct=this.defaultActions[qt]:((Nt===null||typeof Nt>"u")&&(Nt=Ot()),Ct=ut[qt]&&ut[qt][Nt]),typeof Ct>"u"||!Ct.length||!Ct[0]){var pn="";ke=[];for(Ht in ut[qt])this.terminals_[Ht]&&Ht>dt&&ke.push("'"+this.terminals_[Ht]+"'");X.showPosition?pn="Parse error on line "+(mt+1)+`: +`+X.showPosition()+` +Expecting `+ke.join(", ")+", got '"+(this.terminals_[Nt]||Nt)+"'":pn="Parse error on line "+(mt+1)+": Unexpected "+(Nt==ht?"end of input":"'"+(this.terminals_[Nt]||Nt)+"'"),this.parseError(pn,{text:X.match,token:this.terminals_[Nt]||Nt,line:X.yylineno,loc:xt,expected:ke})}if(Ct[0]instanceof Array&&Ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+qt+", token: "+Nt);switch(Ct[0]){case 1:z.push(Nt),it.push(X.yytext),st.push(X.yylloc),z.push(Ct[1]),Nt=null,yt=X.yyleng,bt=X.yytext,mt=X.yylineno,xt=X.yylloc;break;case 2:if(It=this.productions_[Ct[1]][1],Tt.$=it[it.length-It],Tt._$={first_line:st[st.length-(It||1)].first_line,last_line:st[st.length-1].last_line,first_column:st[st.length-(It||1)].first_column,last_column:st[st.length-1].last_column},nt&&(Tt._$.range=[st[st.length-(It||1)].range[0],st[st.length-1].range[1]]),Z=this.performAction.apply(Tt,[bt,yt,mt,pt.yy,Ct[1],it,st].concat(wt)),typeof Z<"u")return Z;It&&(z=z.slice(0,-1*It*2),it=it.slice(0,-1*It),st=st.slice(0,-1*It)),z.push(this.productions_[Ct[1]][0]),it.push(Tt.$),st.push(Tt._$),Ft=ut[z[z.length-2]][z[z.length-1]],z.push(Ft);break;case 3:return!0}}return!0}},L=function(){var B={EOF:1,parseError:function(R,z){if(this.yy.parser)this.yy.parser.parseError(R,z);else throw new Error(R)},setInput:function(j,R){return this.yy=R||this.yy||{},this._input=j,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var j=this._input[0];this.yytext+=j,this.yyleng++,this.offset++,this.match+=j,this.matched+=j;var R=j.match(/(?:\r\n?|\n).*/g);return R?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),j},unput:function(j){var R=j.length,z=j.split(/(?:\r\n?|\n)/g);this._input=j+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var it=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===K.length?this.yylloc.first_column:0)+K[K.length-z.length].length-z[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[it[0],it[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(j){this.unput(this.match.slice(j))},pastInput:function(){var j=this.matched.substr(0,this.matched.length-this.match.length);return(j.length>20?"...":"")+j.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var j=this.match;return j.length<20&&(j+=this._input.substr(0,20-j.length)),(j.substr(0,20)+(j.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var j=this.pastInput(),R=new Array(j.length+1).join("-");return j+this.upcomingInput()+` +`+R+"^"},test_match:function(j,R){var z,K,it;if(this.options.backtrack_lexer&&(it={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(it.yylloc.range=this.yylloc.range.slice(0))),K=j[0].match(/(?:\r\n?|\n).*/g),K&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-K[K.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],z=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var st in it)this[st]=it[st];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var j,R,z,K;this._more||(this.yytext="",this.match="");for(var it=this._currentRules(),st=0;stR[0].length)){if(R=z,K=st,this.options.backtrack_lexer){if(j=this.test_match(z,it[st]),j!==!1)return j;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(j=this.test_match(R,it[K]),j!==!1?j:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var R=this.next();return R||this.lex()},begin:function(R){this.conditionStack.push(R)},popState:function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},pushState:function(R){this.begin(R)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(R,z,K,it){switch(K){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return B}();_.lexer=L;function N(){this.yy={}}return N.prototype=_,_.Parser=N,new N}();Pgt.parser=Pgt;const qVe=Pgt;let gL="";const Fgt=[],HP=[],GP=[],HVe=function(){Fgt.length=0,HP.length=0,gL="",GP.length=0,ap()},GVe=function(i){gL=i,Fgt.push(i)},VVe=function(){return Fgt},UVe=function(){let i=gjt();const a=100;let f=0;for(;!i&&f{f.people&&i.push(...f.people)}),[...new Set(i)].sort()},KVe=function(i,a){const f=a.substr(1).split(":");let p=0,v=[];f.length===1?(p=Number(f[0]),v=[]):(p=Number(f[0]),v=f[1].split(","));const m=v.map(E=>E.trim()),b={section:gL,type:gL,people:m,task:i,score:p};GP.push(b)},YVe=function(i){const a={section:gL,type:gL,description:i,task:i,classes:[]};HP.push(a)},gjt=function(){const i=function(f){return GP[f].processed};let a=!0;for(const[f,p]of GP.entries())i(f),a=a&&p.processed;return a},pjt={getConfig:()=>Le().journey,clear:HVe,setDiagramTitle:Z2,getDiagramTitle:Db,setAccTitle:cg,getAccTitle:op,setAccDescription:cp,getAccDescription:up,addSection:GVe,getSections:VVe,getTasks:UVe,addTask:KVe,addTaskOrg:YVe,getActors:function(){return WVe()}},XVe=i=>`.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${i.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${i.textColor} + } + + .legend { + fill: ${i.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${i.textColor} + } + + .face { + ${i.faceColor?`fill: ${i.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${i.arrowheadColor}; + } + + .edgePath .path { + stroke: ${i.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${i.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${i.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${i.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${i.tertiaryColor}; + border: 1px solid ${i.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${i.fillType0?`fill: ${i.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${i.fillType0?`fill: ${i.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${i.fillType0?`fill: ${i.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${i.fillType0?`fill: ${i.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${i.fillType0?`fill: ${i.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${i.fillType0?`fill: ${i.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${i.fillType0?`fill: ${i.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${i.fillType0?`fill: ${i.fillType7}`:""}; + } + + .actor-0 { + ${i.actor0?`fill: ${i.actor0}`:""}; + } + .actor-1 { + ${i.actor1?`fill: ${i.actor1}`:""}; + } + .actor-2 { + ${i.actor2?`fill: ${i.actor2}`:""}; + } + .actor-3 { + ${i.actor3?`fill: ${i.actor3}`:""}; + } + .actor-4 { + ${i.actor4?`fill: ${i.actor4}`:""}; + } + .actor-5 { + ${i.actor5?`fill: ${i.actor5}`:""}; + } +`,Bgt=function(i,a){return HW(i,a)},QVe=function(i,a){const p=i.append("circle").attr("cx",a.cx).attr("cy",a.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),v=i.append("g");v.append("circle").attr("cx",a.cx-15/3).attr("cy",a.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),v.append("circle").attr("cx",a.cx+15/3).attr("cy",a.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function m(_){const L=LA().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",L).attr("transform","translate("+a.cx+","+(a.cy+2)+")")}function b(_){const L=LA().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",L).attr("transform","translate("+a.cx+","+(a.cy+7)+")")}function E(_){_.append("line").attr("class","mouth").attr("stroke",2).attr("x1",a.cx-5).attr("y1",a.cy+7).attr("x2",a.cx+5).attr("y2",a.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a.score>3?m(v):a.score<3?b(v):E(v),p},bjt=function(i,a){const f=i.append("circle");return f.attr("cx",a.cx),f.attr("cy",a.cy),f.attr("class","actor-"+a.pos),f.attr("fill",a.fill),f.attr("stroke",a.stroke),f.attr("r",a.r),f.class!==void 0&&f.attr("class",f.class),a.title!==void 0&&f.append("title").text(a.title),f},vjt=function(i,a){return dIe(i,a)},ZVe=function(i,a){function f(v,m,b,E,_){return v+","+m+" "+(v+b)+","+m+" "+(v+b)+","+(m+E-_)+" "+(v+b-_*1.2)+","+(m+E)+" "+v+","+(m+E)}const p=i.append("polygon");p.attr("points",f(a.x,a.y,50,20,7)),p.attr("class","labelBox"),a.y=a.y+a.labelMargin,a.x=a.x+.5*a.labelMargin,vjt(i,a)},JVe=function(i,a,f){const p=i.append("g"),v=fT();v.x=a.x,v.y=a.y,v.fill=a.fill,v.width=f.width*a.taskCount+f.diagramMarginX*(a.taskCount-1),v.height=f.height,v.class="journey-section section-type-"+a.num,v.rx=3,v.ry=3,Bgt(p,v),mjt(f)(a.text,p,v.x,v.y,v.width,v.height,{class:"journey-section section-type-"+a.num},f,a.colour)};let wjt=-1;const tUe=function(i,a,f){const p=a.x+f.width/2,v=i.append("g");wjt++;const m=300+5*30;v.append("line").attr("id","task"+wjt).attr("x1",p).attr("y1",a.y).attr("x2",p).attr("y2",m).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),QVe(v,{cx:p,cy:300+(5-a.score)*30,score:a.score});const b=fT();b.x=a.x,b.y=a.y,b.fill=a.fill,b.width=f.width,b.height=f.height,b.class="task task-type-"+a.num,b.rx=3,b.ry=3,Bgt(v,b);let E=a.x+14;a.people.forEach(_=>{const L=a.actors[_].color,N={cx:E,cy:a.y,r:7,fill:L,stroke:"#000",title:_,pos:a.actors[_].position};bjt(v,N),E+=10}),mjt(f)(a.task,v,b.x,b.y,b.width,b.height,{class:"task"},f,a.colour)},eUe=function(i,a){bNt(i,a)},mjt=function(){function i(v,m,b,E,_,L,N,B){const j=m.append("text").attr("x",b+_/2).attr("y",E+L/2+5).style("font-color",B).style("text-anchor","middle").text(v);p(j,N)}function a(v,m,b,E,_,L,N,B,j){const{taskFontSize:R,taskFontFamily:z}=B,K=v.split(//gi);for(let it=0;it{const v=N5[p].color,m={cx:20,cy:f,r:7,fill:v,stroke:"#000",pos:N5[p].position};VP.drawCircle(i,m);const b={x:40,y:f+7,fill:"#666",text:p,textMargin:a.boxTextMargin|5};VP.drawText(i,b),f+=20})}const qK=Le().journey,ST=qK.leftMargin,iUe=function(i,a,f,p){const v=Le().journey,m=Le().securityLevel;let b;m==="sandbox"&&(b=yr("#i"+a));const E=yr(m==="sandbox"?b.nodes()[0].contentDocument.body:"body");rv.init();const _=E.select("#"+a);VP.initGraphics(_);const L=p.db.getTasks(),N=p.db.getDiagramTitle(),B=p.db.getActors();for(const st in N5)delete N5[st];let j=0;B.forEach(st=>{N5[st]={color:v.actorColours[j%v.actorColours.length],position:j},j++}),rUe(_),rv.insert(0,0,ST,Object.keys(N5).length*50),sUe(_,L,0);const R=rv.getBounds();N&&_.append("text").text(N).attr("x",ST).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const z=R.stopy-R.starty+2*v.diagramMarginY,K=ST+R.stopx+2*v.diagramMarginX;og(_,z,K,v.useMaxWidth),_.append("line").attr("x1",ST).attr("y1",v.height*4).attr("x2",K-ST-4).attr("y2",v.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const it=N?70:0;_.attr("viewBox",`${R.startx} -25 ${K} ${z+it}`),_.attr("preserveAspectRatio","xMinYMin meet"),_.attr("height",z+it+25)},rv={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(i,a,f,p){i[a]===void 0?i[a]=f:i[a]=p(f,i[a])},updateBounds:function(i,a,f,p){const v=Le().journey,m=this;let b=0;function E(_){return function(N){b++;const B=m.sequenceItems.length-b+1;m.updateVal(N,"starty",a-B*v.boxMargin,Math.min),m.updateVal(N,"stopy",p+B*v.boxMargin,Math.max),m.updateVal(rv.data,"startx",i-B*v.boxMargin,Math.min),m.updateVal(rv.data,"stopx",f+B*v.boxMargin,Math.max),_!=="activation"&&(m.updateVal(N,"startx",i-B*v.boxMargin,Math.min),m.updateVal(N,"stopx",f+B*v.boxMargin,Math.max),m.updateVal(rv.data,"starty",a-B*v.boxMargin,Math.min),m.updateVal(rv.data,"stopy",p+B*v.boxMargin,Math.max))}}this.sequenceItems.forEach(E())},insert:function(i,a,f,p){const v=Math.min(i,f),m=Math.max(i,f),b=Math.min(a,p),E=Math.max(a,p);this.updateVal(rv.data,"startx",v,Math.min),this.updateVal(rv.data,"starty",b,Math.min),this.updateVal(rv.data,"stopx",m,Math.max),this.updateVal(rv.data,"stopy",E,Math.max),this.updateBounds(v,b,m,E)},bumpVerticalPos:function(i){this.verticalPos=this.verticalPos+i,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Rgt=qK.sectionFills,yjt=qK.sectionColours,sUe=function(i,a,f){const p=Le().journey;let v="";const m=p.height*2+p.diagramMarginY,b=f+m;let E=0,_="#CCC",L="black",N=0;for(const[B,j]of a.entries()){if(v!==j.section){_=Rgt[E%Rgt.length],N=E%Rgt.length,L=yjt[E%yjt.length];let z=0;const K=j.section;for(let st=B;st(N5[K]&&(z[K]=N5[K]),z),{});j.x=B*p.taskMargin+B*p.width+ST,j.y=b,j.width=p.diagramMarginX,j.height=p.diagramMarginY,j.colour=L,j.fill=_,j.num=N,j.actors=R,VP.drawTask(i,j,p),rv.insert(j.x,j.y,j.x+j.width+p.taskMargin,300+5*30)}},xjt={setConf:nUe,draw:iUe},aUe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:qVe,db:pjt,renderer:xjt,styles:XVe,init:i=>{xjt.setConf(i.journey),pjt.clear()}}},Symbol.toStringTag,{value:"Module"})),oUe=(i,a,f)=>{const{parentById:p}=f,v=new Set;let m=i;for(;m;){if(v.add(m),m===a)return m;m=p[m]}for(m=a;m;){if(v.has(m))return m;m=p[m]}return"root"};function HK(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kjt={exports:{}};(function(i,a){(function(f){i.exports=f()})(function(){return function(){function f(p,v,m){function b(L,N){if(!v[L]){if(!p[L]){var B=typeof HK=="function"&&HK;if(!N&&B)return B(L,!0);if(E)return E(L,!0);var j=new Error("Cannot find module '"+L+"'");throw j.code="MODULE_NOT_FOUND",j}var R=v[L]={exports:{}};p[L][0].call(R.exports,function(z){var K=p[L][1][z];return b(K||z)},R,R.exports,f,p,v,m)}return v[L].exports}for(var E=typeof HK=="function"&&HK,_=0;_0&&arguments[0]!==void 0?arguments[0]:{},j=B.defaultLayoutOptions,R=j===void 0?{}:j,z=B.algorithms,K=z===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:z,it=B.workerFactory,st=B.workerUrl;if(b(this,L),this.defaultLayoutOptions=R,this.initialized=!1,typeof st>"u"&&typeof it>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var ut=it;typeof st<"u"&&typeof it>"u"&&(ut=function(yt){return new Worker(yt)});var bt=ut(st);if(typeof bt.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new _(bt),this.worker.postMessage({cmd:"register",algorithms:K}).then(function(mt){return N.initialized=!0}).catch(console.err)}return m(L,[{key:"layout",value:function(B){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=j.layoutOptions,z=R===void 0?this.defaultLayoutOptions:R,K=j.logging,it=K===void 0?!1:K,st=j.measureExecutionTime,ut=st===void 0?!1:st;return B?this.worker.postMessage({cmd:"layout",graph:B,layoutOptions:z,options:{logging:it,measureExecutionTime:ut}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),L}();v.default=E;var _=function(){function L(N){var B=this;if(b(this,L),N===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=N,this.worker.onmessage=function(j){setTimeout(function(){B.receive(B,j)},0)}}return m(L,[{key:"postMessage",value:function(B){var j=this.id||0;this.id=j+1,B.id=j;var R=this;return new Promise(function(z,K){R.resolvers[j]=function(it,st){it?(R.convertGwtStyleError(it),K(it)):z(st)},R.worker.postMessage(B)})}},{key:"receive",value:function(B,j){var R=j.data,z=B.resolvers[R.id];z&&(delete B.resolvers[R.id],R.error?z(R.error):z(null,R.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(B){if(B){var j=B.__java$exception;j&&(j.cause&&j.cause.backingJsObject&&(B.cause=j.cause.backingJsObject,this.convertGwtStyleError(B.cause)),delete B.__java$exception)}}}]),L}()},{}],2:[function(f,p,v){(function(m){(function(){var b;typeof window<"u"?b=window:typeof m<"u"?b=m:typeof self<"u"&&(b=self);var E;function _(){}function L(){}function N(){}function B(){}function j(){}function R(){}function z(){}function K(){}function it(){}function st(){}function ut(){}function bt(){}function mt(){}function yt(){}function dt(){}function ht(){}function wt(){}function X(){}function pt(){}function U(){}function xt(){}function nt(){}function Ot(){}function Nt(){}function qt(){}function Ct(){}function Z(){}function Tt(){}function Ht(){}function It(){}function Ft(){}function ke(){}function pn(){}function Me(){}function ve(){}function Ge(){}function Ke(){}function we(){}function _e(){}function $t(){}function re(){}function ie(){}function Oe(){}function oe(){}function Ne(){}function me(){}function cn(){}function li(){}function ya(){}function da(){}function Oo(){}function ds(){}function Dr(){}function nr(){}function di(){}function Ee(){}function Yn(){}function He(){}function Ti(){}function gn(){}function ks(){}function qa(){}function La(){}function Gs(){}function No(){}function vs(){}function nu(){}function $s(){}function Lu(){}function fm(){}function av(){}function Uu(){}function Zl(){}function Pa(){}function Al(){}function ua(){}function bc(){}function Cc(){}function ga(){}function Ma(){}function Ha(){}function Ll(){}function _c(){}function ov(){}function Jl(){}function Z1(){}function Fd(){}function J1(){}function Bd(){}function E0(){}function Bi(){}function on(){}function kr(){}function Ei(){}function Jo(){}function vc(){}function tf(){}function Oc(){}function ef(){}function nf(){}function Xi(){}function Es(){}function xa(){}function xi(){}function Wc(){}function Ce(){}function gp(){}function Be(){}function Ff(){}function dg(){}function dm(){}function pk(){}function x3(){}function Ml(){}function T0(){}function cv(){}function F5(){}function jb(){}function B5(){}function l1(){}function td(){}function ed(){}function R5(){}function uv(){}function j5(){}function pp(){}function $5(){}function k3(){}function gm(){}function gg(){}function wL(){}function bl(){}function WP(){}function Sc(){}function QK(){}function $b(){}function ZK(){}function IT(){}function JK(){}function KP(){}function Bf(){}function pm(){}function mL(){}function YP(){}function bp(){}function bm(){}function tY(){}function zb(){}function eY(){}function nY(){}function z5(){}function DT(){}function XP(){}function bk(){}function rY(){}function vk(){}function iY(){}function sY(){}function aY(){}function oY(){}function cY(){}function uY(){}function lY(){}function hY(){}function fY(){}function dY(){}function gY(){}function yL(){}function pY(){}function bY(){}function OT(){}function QP(){}function q5(){}function vY(){}function wY(){}function mY(){}function yY(){}function xY(){}function NT(){}function xL(){}function ZP(){}function E3(){}function T3(){}function kY(){}function rf(){}function H5(){}function EY(){}function wk(){}function Rd(){}function TY(){}function CY(){}function _Y(){}function SY(){}function PT(){}function kL(){}function JP(){}function EL(){}function G5(){}function AY(){}function tF(){}function eF(){}function LY(){}function MY(){}function IY(){}function DY(){}function OY(){}function NY(){}function jd(){}function lv(){}function PY(){}function nF(){}function rF(){}function FY(){}function C3(){}function mk(){}function TL(){}function vm(){}function yk(){}function BY(){}function FT(){}function nd(){}function iF(){}function CL(){}function xk(){}function _L(){}function sF(){}function RY(){}function SL(){}function jY(){}function $Y(){}function aF(){}function V5(){}function oF(){}function U5(){}function zY(){}function AL(){}function qY(){}function HY(){}function GY(){}function VY(){}function cF(){}function UY(){}function WY(){}function KY(){}function uF(){}function YY(){}function XY(){}function QY(){}function lF(){}function ZY(){}function JY(){}function hF(){}function fF(){}function dF(){}function tX(){}function eX(){}function kk(){}function W5(){}function BT(){}function nX(){}function LL(){}function RT(){}function ML(){}function gF(){}function pF(){}function rX(){}function iX(){}function sX(){}function bF(){}function vF(){}function aX(){}function oX(){}function cX(){}function uX(){}function lX(){}function wF(){}function hX(){}function fX(){}function dX(){}function gX(){}function mF(){}function jT(){}function pX(){}function bX(){}function yF(){}function vX(){}function wX(){}function mX(){}function yX(){}function xX(){}function kX(){}function xF(){}function EX(){}function kF(){}function TX(){}function CX(){}function _X(){}function $T(){}function SX(){}function zT(){}function AX(){}function EF(){}function TF(){}function CF(){}function _F(){}function hv(){}function SF(){}function AF(){}function LF(){}function MF(){}function LX(){}function K5(){}function qT(){}function _3(){}function MX(){}function IX(){}function HT(){}function DX(){}function OX(){}function NX(){}function PX(){}function FX(){}function BX(){}function RX(){}function jX(){}function $X(){}function zX(){}function qX(){}function IL(){}function IF(){}function HX(){}function GX(){}function VX(){}function DF(){}function UX(){}function WX(){}function KX(){}function YX(){}function XX(){}function QX(){}function OF(){}function NF(){}function ZX(){}function PF(){}function FF(){}function JX(){}function tQ(){}function eQ(){}function DL(){}function nQ(){}function Ek(){}function rQ(){}function iQ(){}function sQ(){}function BF(){}function aQ(){}function oQ(){}function cQ(){}function uQ(){}function lQ(){}function hQ(){}function fQ(){}function dQ(){}function gQ(){}function pQ(){}function bQ(){}function vQ(){}function Y5(){}function RF(){}function wQ(){}function mQ(){}function yQ(){}function jF(){}function xQ(){}function GT(){}function kQ(){}function EQ(){}function TQ(){}function CQ(){}function _Q(){}function SQ(){}function AQ(){}function LQ(){}function MQ(){}function IQ(){}function X5(){}function DQ(){}function OQ(){}function NQ(){}function PQ(){}function FQ(){}function BQ(){}function RQ(){}function jQ(){}function VT(){}function $Q(){}function zQ(){}function qQ(){}function HQ(){}function GQ(){}function VQ(){}function UQ(){}function WQ(){}function Q5(){}function $F(){}function KQ(){}function OL(){}function YQ(){}function XQ(){}function QQ(){}function ZQ(){}function JQ(){}function tZ(){}function eZ(){}function zF(){}function nZ(){}function qF(){}function rZ(){}function HF(){}function GF(){}function VF(){}function iZ(){}function sZ(){}function UT(){}function NL(){}function WT(){}function aZ(){}function oZ(){}function PL(){}function cZ(){}function uZ(){}function UF(){}function lZ(){}function hZ(){}function fZ(){}function dZ(){}function gZ(){}function pZ(){}function bZ(){}function vZ(){}function wZ(){}function mZ(){}function pg(){}function yZ(){}function wm(){}function WF(){}function xZ(){}function kZ(){}function EZ(){}function TZ(){}function CZ(){}function _Z(){}function SZ(){}function AZ(){}function LZ(){}function Ac(){}function MZ(){}function KT(){}function tc(){}function Kc(){}function zi(){}function FL(){}function IZ(){}function DZ(){}function OZ(){}function Z5(){}function mm(){}function Ue(){}function NZ(){}function PZ(){}function FZ(){}function BZ(){}function RZ(){}function KF(){}function jZ(){}function $Z(){}function BL(){}function zZ(){}function Wu(){}function Mu(){}function qZ(){}function HZ(){}function GZ(){}function ym(){}function fv(){}function vp(){}function rd(){}function J5(){}function YT(){}function Tk(){}function YF(){}function VZ(){}function Ck(){}function XF(){}function UZ(){}function XT(){}function tx(){}function ex(){}function wp(){}function QF(){}function _k(){}function ZF(){}function JF(){}function nx(){}function qb(){}function C0(){}function mp(){}function S3(){}function Sk(){}function QT(){}function tB(){}function WZ(){}function eB(){}function nB(){}function rB(){}function Ak(){}function iB(){}function sB(){}function KZ(){}function Lk(){}function Mk(){}function xm(){}function RL(){}function YZ(){}function XZ(){}function QZ(){}function ZZ(){}function JZ(){}function tJ(){}function eJ(){}function nJ(){}function aB(){}function rJ(){}function iJ(){}function sJ(){}function oB(){}function Ik(){}function ZT(){}function cB(){}function aJ(){}function uB(){}function lB(){}function oJ(){}function JT(){}function km(){}function hB(){}function fB(){}function cJ(){}function uJ(){}function t9(){}function dB(){}function gB(){}function uc(){}function lJ(){}function pB(){}function e9(){}function hJ(){}function fJ(){}function n9(){}function bB(){}function r9(){}function i9(){}function Rf(){}function jL(){}function $L(){}function rx(){}function dJ(){}function gJ(){}function pJ(){}function bJ(){}function Em(){}function vB(){}function ix(){}function h1(){}function wB(){}function mB(){}function yB(){}function xB(){}function kB(){}function EB(){}function jf(){}function hu(){}function vJ(){}function wJ(){}function mJ(){}function fu(){}function s9(){}function TB(){}function CB(){}function sx(){}function yJ(){}function Dk(){}function xJ(){}function _B(){}function kJ(){}function EJ(){}function a9(){}function SB(){}function zL(){}function o9(){}function TJ(){}function CJ(){}function qL(){}function c9(){}function f1(){}function Ok(){}function _J(){}function Nk(){}function HL(){}function Hb(){}function u9(){}function GL(){}function $f(){}function l9(){}function d1(){}function g1(){}function SJ(){}function AJ(){}function A3(){}function Pk(){}function Fk(){}function h9(){}function LJ(){}function ax(){}function VL(){}function AB(){}function MJ(){}function f9(){I9()}function IJ(){Sit()}function LB(){i_()}function UL(){Kz()}function DJ(){P4t()}function d9(){Zf()}function OJ(){U3t()}function NJ(){JI()}function PJ(){wM()}function FJ(){vM()}function BJ(){GM()}function MB(){yGt()}function RJ(){Xx()}function jJ(){LR()}function $J(){IJt()}function IB(){Gee()}function zJ(){ute()}function qJ(){_Qt()}function g9(){J8()}function HJ(){Zp()}function GJ(){Vee()}function VJ(){mZt()}function UJ(){Axt()}function WJ(){Dse()}function KJ(){SQt()}function DB(){Te()}function YJ(){CQt()}function OB(){Uee()}function XJ(){Yne()}function WL(){LQt()}function QJ(){gte()}function NB(){xGt()}function ZJ(){b5t()}function PB(){ay()}function JJ(){mne()}function FB(){rD()}function BB(){nat()}function RB(){ust()}function KL(){hw()}function L3(){fyt()}function p9(){AQt()}function id(){$ue()}function jB(){d5t()}function Bk(){Kst()}function YL(){O$()}function ttt(){eq()}function yp(){ci()}function $B(){bz()}function zB(){y3t()}function qB(){yq()}function th(){pKt()}function XL(){hit()}function HB(){txt()}function Rk(t){On(t)}function b9(t){this.a=t}function jk(t){this.a=t}function GB(t){this.a=t}function ox(t){this.a=t}function dv(t){this.a=t}function $k(t){this.a=t}function VB(t){this.a=t}function ett(t){this.a=t}function QL(t){this.a=t}function M3(t){this.a=t}function ZL(t){this.a=t}function v9(t){this.a=t}function ntt(t){this.a=t}function w9(t){this.a=t}function m9(t){this.a=t}function cx(t){this.a=t}function JL(t){this.a=t}function tM(t){this.a=t}function rtt(t){this.a=t}function itt(t){this.a=t}function stt(t){this.a=t}function UB(t){this.b=t}function att(t){this.c=t}function ott(t){this.a=t}function ctt(t){this.a=t}function utt(t){this.a=t}function ltt(t){this.a=t}function htt(t){this.a=t}function ftt(t){this.a=t}function dtt(t){this.a=t}function gtt(t){this.a=t}function ux(t){this.a=t}function ptt(t){this.a=t}function zk(t){this.a=t}function kh(t){this.a=t}function btt(t){this.a=t}function lx(t){this.a=t}function qk(t){this.a=t}function y9(t){this.a=t}function Hk(t){this.a=t}function bg(){this.a=[]}function vtt(t,e){t.a=e}function ept(t,e){t.a=e}function npt(t,e){t.b=e}function rpt(t,e){t.b=e}function ipt(t,e){t.b=e}function eM(t,e){t.j=e}function spt(t,e){t.g=e}function apt(t,e){t.i=e}function wtt(t,e){t.c=e}function p1(t,e){t.d=e}function mtt(t,e){t.d=e}function opt(t,e){t.c=e}function _0(t,e){t.k=e}function ytt(t,e){t.c=e}function WB(t,e){t.c=e}function KB(t,e){t.a=e}function xtt(t,e){t.a=e}function cpt(t,e){t.f=e}function upt(t,e){t.a=e}function gv(t,e){t.b=e}function nM(t,e){t.d=e}function x9(t,e){t.i=e}function YB(t,e){t.o=e}function lpt(t,e){t.r=e}function hpt(t,e){t.a=e}function XB(t,e){t.b=e}function pv(t,e){t.e=e}function ktt(t,e){t.f=e}function k9(t,e){t.g=e}function hx(t,e){t.e=e}function fpt(t,e){t.f=e}function Gk(t,e){t.f=e}function Ett(t,e){t.n=e}function vg(t,e){t.a=e}function dpt(t,e){t.a=e}function I3(t,e){t.c=e}function Ttt(t,e){t.c=e}function Ctt(t,e){t.d=e}function QB(t,e){t.e=e}function ZB(t,e){t.g=e}function _tt(t,e){t.a=e}function Vk(t,e){t.c=e}function E9(t,e){t.d=e}function gpt(t,e){t.e=e}function Stt(t,e){t.f=e}function Att(t,e){t.j=e}function Ltt(t,e){t.a=e}function ppt(t,e){t.b=e}function wc(t,e){t.a=e}function JB(t){t.b=t.a}function Mtt(t){t.c=t.d.d}function fx(t){this.d=t}function wg(t){this.a=t}function Tm(t){this.a=t}function rM(t){this.a=t}function b1(t){this.a=t}function dx(t){this.a=t}function Itt(t){this.a=t}function tR(t){this.a=t}function D3(t){this.a=t}function iM(t){this.a=t}function Cm(t){this.a=t}function eR(t){this.a=t}function v1(t){this.a=t}function y(t){this.a=t}function g(t){this.a=t}function x(t){this.b=t}function T(t){this.b=t}function A(t){this.b=t}function D(t){this.a=t}function O(t){this.a=t}function $(t){this.a=t}function q(t){this.c=t}function S(t){this.c=t}function G(t){this.c=t}function W(t){this.a=t}function et(t){this.a=t}function at(t){this.a=t}function lt(t){this.a=t}function ft(t){this.a=t}function At(t){this.a=t}function kt(t){this.a=t}function Mt(t){this.a=t}function Dt(t){this.a=t}function jt(t){this.a=t}function Zt(t){this.a=t}function Kt(t){this.a=t}function zt(t){this.a=t}function ee(t){this.a=t}function Vt(t){this.a=t}function fe(t){this.a=t}function ge(t){this.a=t}function ne(t){this.a=t}function Pe(t){this.a=t}function pe(t){this.a=t}function bn(t){this.a=t}function ze(t){this.a=t}function Ve(t){this.a=t}function En(t){this.a=t}function Dn(t){this.a=t}function Kn(t){this.a=t}function Sn(t){this.a=t}function Wn(t){this.a=t}function rr(t){this.a=t}function vr(t){this.a=t}function ur(t){this.a=t}function tr(t){this.a=t}function wn(t){this.a=t}function gr(t){this.a=t}function fr(t){this.a=t}function Jr(t){this.a=t}function wi(t){this.a=t}function Ks(t){this.a=t}function ka(t){this.a=t}function Ci(t){this.a=t}function hi(t){this.a=t}function gs(t){this.a=t}function qi(t){this.a=t}function Si(t){this.a=t}function Ui(t){this.a=t}function Ga(t){this.e=t}function Ys(t){this.a=t}function zs(t){this.a=t}function Er(t){this.a=t}function Qt(t){this.a=t}function jn(t){this.a=t}function _r(t){this.a=t}function ir(t){this.a=t}function sr(t){this.a=t}function Ia(t){this.a=t}function $r(t){this.a=t}function Ki(t){this.a=t}function Po(t){this.a=t}function Nc(t){this.a=t}function Za(t){this.a=t}function mc(t){this.a=t}function Ea(t){this.a=t}function Ja(t){this.a=t}function vl(t){this.a=t}function zf(t){this.a=t}function xp(t){this.a=t}function kp(t){this.a=t}function qf(t){this.a=t}function mg(t){this.a=t}function sd(t){this.a=t}function bv(t){this.a=t}function _m(t){this.a=t}function gx(t){this.a=t}function O3(t){this.a=t}function px(t){this.a=t}function T9(t){this.a=t}function N3(t){this.a=t}function $d(t){this.a=t}function w1(t){this.a=t}function zd(t){this.a=t}function C9(t){this.a=t}function Gb(t){this.a=t}function nR(t){this.a=t}function Dtt(t){this.a=t}function Ott(t){this.a=t}function Ntt(t){this.a=t}function Ptt(t){this.a=t}function Ftt(t){this.a=t}function Btt(t){this.a=t}function Rtt(t){this.a=t}function Uk(t){this.a=t}function sM(t){this.a=t}function _9(t){this.a=t}function rR(t){this.a=t}function iR(t){this.a=t}function jtt(t){this.a=t}function Ep(t){this.a=t}function aM(t){this.a=t}function sR(t){this.a=t}function Wk(t){this.c=t}function Tp(t){this.b=t}function $tt(t){this.a=t}function l$t(t){this.a=t}function h$t(t){this.a=t}function f$t(t){this.a=t}function d$t(t){this.a=t}function g$t(t){this.a=t}function p$t(t){this.a=t}function b$t(t){this.a=t}function v$t(t){this.a=t}function w$t(t){this.a=t}function m$t(t){this.a=t}function y$t(t){this.a=t}function x$t(t){this.a=t}function k$t(t){this.a=t}function E$t(t){this.a=t}function T$t(t){this.a=t}function C$t(t){this.a=t}function _$t(t){this.a=t}function S$t(t){this.a=t}function A$t(t){this.a=t}function L$t(t){this.a=t}function M$t(t){this.a=t}function I$t(t){this.a=t}function D$t(t){this.a=t}function Cp(t){this.a=t}function bx(t){this.a=t}function O$t(t){this.a=t}function N$t(t){this.a=t}function P$t(t){this.a=t}function F$t(t){this.a=t}function B$t(t){this.a=t}function R$t(t){this.a=t}function j$t(t){this.a=t}function $$t(t){this.a=t}function z$t(t){this.a=t}function q$t(t){this.a=t}function H$t(t){this.a=t}function G$t(t){this.a=t}function V$t(t){this.a=t}function U$t(t){this.a=t}function W$t(t){this.a=t}function K$t(t){this.a=t}function aR(t){this.a=t}function Y$t(t){this.a=t}function X$t(t){this.a=t}function Q$t(t){this.a=t}function Z$t(t){this.a=t}function J$t(t){this.a=t}function tzt(t){this.a=t}function ezt(t){this.a=t}function nzt(t){this.a=t}function rzt(t){this.a=t}function izt(t){this.a=t}function szt(t){this.a=t}function azt(t){this.a=t}function ozt(t){this.a=t}function czt(t){this.a=t}function uzt(t){this.a=t}function lzt(t){this.a=t}function hzt(t){this.a=t}function fzt(t){this.a=t}function dzt(t){this.a=t}function gzt(t){this.a=t}function pzt(t){this.a=t}function bzt(t){this.a=t}function vzt(t){this.a=t}function wzt(t){this.a=t}function mzt(t){this.a=t}function yzt(t){this.a=t}function xzt(t){this.a=t}function kzt(t){this.a=t}function bpt(t){this.a=t}function Gi(t){this.b=t}function Ezt(t){this.f=t}function vpt(t){this.a=t}function Tzt(t){this.a=t}function Czt(t){this.a=t}function _zt(t){this.a=t}function Szt(t){this.a=t}function Azt(t){this.a=t}function Lzt(t){this.a=t}function Mzt(t){this.a=t}function Izt(t){this.a=t}function oM(t){this.a=t}function Dzt(t){this.a=t}function Ozt(t){this.b=t}function wpt(t){this.c=t}function oR(t){this.e=t}function Nzt(t){this.a=t}function cR(t){this.a=t}function uR(t){this.a=t}function ztt(t){this.a=t}function Pzt(t){this.a=t}function Fzt(t){this.d=t}function mpt(t){this.a=t}function ypt(t){this.a=t}function vv(t){this.e=t}function KWe(){this.a=0}function P3(){pUt(this)}function le(){Yet(this)}function Cr(){Yu(this)}function qtt(){mXt(this)}function Bzt(){}function wv(){this.c=tLt}function YWe(t,e){e.Wb(t)}function Rzt(t,e){t.b+=e}function jzt(t){t.b=new set}function rt(t){return t.e}function XWe(t){return t.a}function QWe(t){return t.a}function ZWe(t){return t.a}function JWe(t){return t.a}function tKe(t){return t.a}function eKe(){return null}function nKe(){return null}function rKe(){abt(),g5n()}function iKe(t){t.b.tf(t.e)}function S9(t,e){t.b=e-t.b}function A9(t,e){t.a=e-t.a}function $zt(t,e){e.ad(t.a)}function sKe(t,e){Fs(e,t)}function aKe(t,e,n){t.Od(n,e)}function cM(t,e){t.e=e,e.b=t}function xpt(t){hd(),this.a=t}function zzt(t){hd(),this.a=t}function qzt(t){hd(),this.a=t}function kpt(t){Gm(),this.a=t}function Hzt(t){T8(),kut.be(t)}function Vb(){ZUt.call(this)}function Ept(){ZUt.call(this)}function Tpt(){Vb.call(this)}function Htt(){Vb.call(this)}function Gzt(){Vb.call(this)}function uM(){Vb.call(this)}function Iu(){Vb.call(this)}function L9(){Vb.call(this)}function Or(){Vb.call(this)}function eh(){Vb.call(this)}function Vzt(){Vb.call(this)}function lc(){Vb.call(this)}function Uzt(){Vb.call(this)}function Wzt(){this.a=this}function lR(){this.Bb|=256}function Kzt(){this.b=new XVt}function Cpt(){Cpt=Z,new Cr}function _pt(){Tpt.call(this)}function Yzt(t,e){t.length=e}function hR(t,e){ue(t.a,e)}function oKe(t,e){B4t(t.c,e)}function cKe(t,e){Ns(t.b,e)}function uKe(t,e){qz(t.a,e)}function lKe(t,e){Fit(t.a,e)}function Kk(t,e){mi(t.e,e)}function vx(t){iq(t.c,t.b)}function hKe(t,e){t.kc().Nb(e)}function Spt(t){this.a=uln(t)}function qs(){this.a=new Cr}function Xzt(){this.a=new Cr}function fR(){this.a=new le}function Gtt(){this.a=new le}function Apt(){this.a=new le}function Eh(){this.a=new av}function Ub(){this.a=new SJt}function Lpt(){this.a=new F5}function Mpt(){this.a=new fGt}function Qzt(){this.a=new tZt}function Ipt(){this.a=new bQt}function Dpt(){this.a=new $Wt}function Zzt(){this.a=new le}function Opt(){this.a=new le}function Jzt(){this.a=new le}function tqt(){this.a=new le}function eqt(){this.d=new le}function nqt(){this.a=new qs}function rqt(){this.a=new Cr}function iqt(){this.b=new Cr}function sqt(){this.b=new le}function Npt(){this.e=new le}function aqt(){this.d=new le}function oqt(){this.a=new HJ}function cqt(){le.call(this)}function Ppt(){fR.call(this)}function uqt(){xj.call(this)}function lqt(){Opt.call(this)}function Vtt(){M9.call(this)}function M9(){Bzt.call(this)}function wx(){Bzt.call(this)}function Fpt(){wx.call(this)}function hqt(){WXt.call(this)}function fqt(){WXt.call(this)}function dqt(){Hpt.call(this)}function gqt(){Hpt.call(this)}function pqt(){Hpt.call(this)}function bqt(){Gpt.call(this)}function Du(){Qi.call(this)}function Bpt(){ym.call(this)}function Rpt(){ym.call(this)}function vqt(){Oqt.call(this)}function wqt(){Oqt.call(this)}function mqt(){Cr.call(this)}function yqt(){Cr.call(this)}function xqt(){Cr.call(this)}function kqt(){qs.call(this)}function Utt(){zee.call(this)}function Eqt(){lR.call(this)}function Wtt(){g2t.call(this)}function Ktt(){g2t.call(this)}function jpt(){Cr.call(this)}function Ytt(){Cr.call(this)}function Tqt(){Cr.call(this)}function $pt(){_k.call(this)}function Cqt(){_k.call(this)}function _qt(){$pt.call(this)}function Sqt(){VL.call(this)}function Aqt(t){fee.call(this,t)}function Lqt(t){fee.call(this,t)}function zpt(t){QL.call(this,t)}function qpt(t){nGt.call(this,t)}function fKe(t){qpt.call(this,t)}function dKe(t){nGt.call(this,t)}function Yk(){this.a=new Qi}function Hpt(){this.a=new qs}function Gpt(){this.a=new Cr}function Mqt(){this.a=new le}function Iqt(){this.j=new le}function Vpt(){this.a=new VF}function Dqt(){this.a=new SHt}function Oqt(){this.a=new QF}function Xtt(){Xtt=Z,but=new Qqt}function Qtt(){Qtt=Z,put=new Xqt}function I9(){I9=Z,gut=new L}function dR(){dR=Z,mut=new XUt}function gKe(t){qpt.call(this,t)}function pKe(t){qpt.call(this,t)}function Nqt(t){Lrt.call(this,t)}function Pqt(t){Lrt.call(this,t)}function Fqt(t){cKt.call(this,t)}function Ztt(t){P0n.call(this,t)}function mv(t){Mm.call(this,t)}function D9(t){CR.call(this,t)}function Upt(t){CR.call(this,t)}function Bqt(t){CR.call(this,t)}function Go(t){kYt.call(this,t)}function Rqt(t){Go.call(this,t)}function mx(){Hk.call(this,{})}function gR(t){u8(),this.a=t}function O9(t){t.b=null,t.c=0}function bKe(t,e){t.e=e,jce(t,e)}function vKe(t,e){t.a=e,xgn(t)}function Jtt(t,e,n){t.a[e.g]=n}function wKe(t,e,n){B1n(n,t,e)}function mKe(t,e){GQe(e.i,t.n)}function jqt(t,e){Vcn(t).td(e)}function yKe(t,e){return t*t/e}function $qt(t,e){return t.g-e.g}function xKe(t){return new y9(t)}function kKe(t){return new Hm(t)}function pR(t){Go.call(this,t)}function mo(t){Go.call(this,t)}function zqt(t){Go.call(this,t)}function tet(t){kYt.call(this,t)}function eet(t){lyt(),this.a=t}function qqt(t){gKt(),this.a=t}function Sm(t){Ont(),this.f=t}function net(t){Ont(),this.f=t}function Xk(t){Go.call(this,t)}function Pn(t){Go.call(this,t)}function Fo(t){Go.call(this,t)}function Hqt(t){Go.call(this,t)}function yx(t){Go.call(this,t)}function je(t){return On(t),t}function Xt(t){return On(t),t}function lM(t){return On(t),t}function Wpt(t){return On(t),t}function EKe(t){return On(t),t}function N9(t){return t.b==t.c}function Am(t){return!!t&&t.b}function TKe(t){return!!t&&t.k}function CKe(t){return!!t&&t.j}function wl(t){On(t),this.a=t}function Kpt(t){return l2(t),t}function P9(t){awt(t,t.length)}function yg(t){Go.call(this,t)}function ad(t){Go.call(this,t)}function ret(t){Go.call(this,t)}function F3(t){Go.call(this,t)}function F9(t){Go.call(this,t)}function Fr(t){Go.call(this,t)}function iet(t){D2t.call(this,t,0)}function set(){$wt.call(this,12,3)}function Ypt(){Ypt=Z,X8t=new pt}function Gqt(){Gqt=Z,Y8t=new _}function bR(){bR=Z,sS=new mt}function Vqt(){Vqt=Z,yge=new dt}function Uqt(){throw rt(new Or)}function Xpt(){throw rt(new Or)}function Wqt(){throw rt(new Or)}function _Ke(){throw rt(new Or)}function SKe(){throw rt(new Or)}function AKe(){throw rt(new Or)}function aet(){this.a=Br(Ar(Ka))}function xx(t){hd(),this.a=Ar(t)}function Kqt(t,e){t.Td(e),e.Sd(t)}function LKe(t,e){t.a.ec().Mc(e)}function MKe(t,e,n){t.c.lf(e,n)}function Qpt(t){mo.call(this,t)}function od(t){Pn.call(this,t)}function xg(){dx.call(this,"")}function B9(){dx.call(this,"")}function _p(){dx.call(this,"")}function Lm(){dx.call(this,"")}function Zpt(t){mo.call(this,t)}function Qk(t){T.call(this,t)}function oet(t){fj.call(this,t)}function Yqt(t){Qk.call(this,t)}function Xqt(){w9.call(this,null)}function Qqt(){w9.call(this,null)}function vR(){vR=Z,T8()}function Zqt(){Zqt=Z,Mge=ldn()}function Jqt(t){return t.a?t.b:0}function IKe(t){return t.a?t.b:0}function DKe(t,e){return t.a-e.a}function OKe(t,e){return t.a-e.a}function NKe(t,e){return t.a-e.a}function wR(t,e){return Mmt(t,e)}function ot(t,e){return mQt(t,e)}function PKe(t,e){return e in t.a}function tHt(t,e){return t.f=e,t}function FKe(t,e){return t.b=e,t}function eHt(t,e){return t.c=e,t}function BKe(t,e){return t.g=e,t}function Jpt(t,e){return t.a=e,t}function tbt(t,e){return t.f=e,t}function RKe(t,e){return t.k=e,t}function ebt(t,e){return t.a=e,t}function jKe(t,e){return t.e=e,t}function nbt(t,e){return t.e=e,t}function $Ke(t,e){return t.f=e,t}function zKe(t,e){t.b=!0,t.d=e}function qKe(t,e){t.b=new yo(e)}function HKe(t,e,n){e.td(t.a[n])}function GKe(t,e,n){e.we(t.a[n])}function VKe(t,e){return t.b-e.b}function UKe(t,e){return t.g-e.g}function WKe(t,e){return t.s-e.s}function KKe(t,e){return t?0:e-1}function nHt(t,e){return t?0:e-1}function YKe(t,e){return t?e-1:0}function XKe(t,e){return e.Yf(t)}function yv(t,e){return t.b=e,t}function mR(t,e){return t.a=e,t}function xv(t,e){return t.c=e,t}function kv(t,e){return t.d=e,t}function Ev(t,e){return t.e=e,t}function rbt(t,e){return t.f=e,t}function R9(t,e){return t.a=e,t}function Zk(t,e){return t.b=e,t}function Jk(t,e){return t.c=e,t}function Ze(t,e){return t.c=e,t}function kn(t,e){return t.b=e,t}function Je(t,e){return t.d=e,t}function tn(t,e){return t.e=e,t}function QKe(t,e){return t.f=e,t}function en(t,e){return t.g=e,t}function nn(t,e){return t.a=e,t}function rn(t,e){return t.i=e,t}function sn(t,e){return t.j=e,t}function rHt(t,e){return t.k=e,t}function ZKe(t,e){return t.j=e,t}function JKe(t,e){Zp(),Uo(e,t)}function tYe(t,e,n){Ktn(t.a,e,n)}function iHt(t){xXt.call(this,t)}function ibt(t){xXt.call(this,t)}function yR(t){bnt.call(this,t)}function sHt(t){vln.call(this,t)}function Sp(t){Kv.call(this,t)}function aHt(t){irt.call(this,t)}function oHt(t){irt.call(this,t)}function cHt(){u2t.call(this,"")}function Ta(){this.a=0,this.b=0}function uHt(){this.b=0,this.a=0}function lHt(t,e){t.b=0,ty(t,e)}function eYe(t,e){t.c=e,t.b=!0}function hHt(t,e){return t.c._b(e)}function Hf(t){return t.e&&t.e()}function cet(t){return t?t.d:null}function fHt(t,e){return Rre(t.b,e)}function nYe(t){return t?t.g:null}function rYe(t){return t?t.i:null}function Ap(t){return L0(t),t.o}function Tv(){Tv=Z,A4e=x1n()}function dHt(){dHt=Z,ta=Odn()}function t8(){t8=Z,JAt=E1n()}function gHt(){gHt=Z,f5e=k1n()}function sbt(){sbt=Z,pc=wgn()}function abt(){abt=Z,Tb=z8()}function pHt(){throw rt(new Or)}function bHt(){throw rt(new Or)}function vHt(){throw rt(new Or)}function wHt(){throw rt(new Or)}function mHt(){throw rt(new Or)}function yHt(){throw rt(new Or)}function xR(t){this.a=new kx(t)}function obt(t){phe(),S5n(this,t)}function Lp(t){this.a=new Bnt(t)}function B3(t,e){for(;t.ye(e););}function cbt(t,e){for(;t.sd(e););}function R3(t,e){return t.a+=e,t}function uet(t,e){return t.a+=e,t}function kg(t,e){return t.a+=e,t}function Cv(t,e){return t.a+=e,t}function j9(t){return $p(t),t.a}function kR(t){return t.b!=t.d.c}function xHt(t){return t.l|t.m<<22}function ubt(t,e){return t.d[e.p]}function kHt(t,e){return ovn(t,e)}function lbt(t,e,n){t.splice(e,n)}function EHt(t){t.c?aue(t):oue(t)}function ER(t){this.a=0,this.b=t}function THt(){this.a=new dD(f_t)}function CHt(){this.b=new dD(ZCt)}function _Ht(){this.b=new dD(zht)}function SHt(){this.b=new dD(zht)}function AHt(){throw rt(new Or)}function LHt(){throw rt(new Or)}function MHt(){throw rt(new Or)}function IHt(){throw rt(new Or)}function DHt(){throw rt(new Or)}function OHt(){throw rt(new Or)}function NHt(){throw rt(new Or)}function PHt(){throw rt(new Or)}function FHt(){throw rt(new Or)}function BHt(){throw rt(new Or)}function iYe(){throw rt(new lc)}function sYe(){throw rt(new lc)}function hM(t){this.a=new RHt(t)}function RHt(t){bon(this,t,bdn())}function fM(t){return!t||sXt(t)}function dM(t){return U1[t]!=-1}function aYe(){zH!=0&&(zH=0),qH=-1}function jHt(){dut==null&&(dut=[])}function oYe(t,e){Hst(Wt(t.a),e)}function cYe(t,e){Hst(Wt(t.a),e)}function gM(t,e){W3.call(this,t,e)}function e8(t,e){gM.call(this,t,e)}function hbt(t,e){this.b=t,this.c=e}function $Ht(t,e){this.b=t,this.a=e}function zHt(t,e){this.a=t,this.b=e}function qHt(t,e){this.a=t,this.b=e}function HHt(t,e){this.a=t,this.b=e}function GHt(t,e){this.a=t,this.b=e}function VHt(t,e){this.a=t,this.b=e}function UHt(t,e){this.a=t,this.b=e}function WHt(t,e){this.a=t,this.b=e}function KHt(t,e){this.a=t,this.b=e}function YHt(t,e){this.b=t,this.a=e}function XHt(t,e){this.b=t,this.a=e}function QHt(t,e){this.b=t,this.a=e}function ZHt(t,e){this.b=t,this.a=e}function Gr(t,e){this.f=t,this.g=e}function n8(t,e){this.e=t,this.d=e}function _v(t,e){this.g=t,this.i=e}function het(t,e){this.a=t,this.b=e}function JHt(t,e){this.a=t,this.f=e}function tGt(t,e){this.b=t,this.c=e}function uYe(t,e){this.a=t,this.b=e}function eGt(t,e){this.a=t,this.b=e}function fet(t,e){this.a=t,this.b=e}function nGt(t){x2t(t.dc()),this.c=t}function TR(t){this.b=u(Ar(t),83)}function rGt(t){this.a=u(Ar(t),83)}function Mm(t){this.a=u(Ar(t),15)}function iGt(t){this.a=u(Ar(t),15)}function CR(t){this.b=u(Ar(t),47)}function _R(){this.q=new b.Date}function qd(){qd=Z,hEt=new Tt}function r8(){r8=Z,ZE=new Nt}function $9(t){return t.f.c+t.g.c}function pM(t,e){return t.b.Hc(e)}function sGt(t,e){return t.b.Ic(e)}function aGt(t,e){return t.b.Qc(e)}function oGt(t,e){return t.b.Hc(e)}function cGt(t,e){return t.c.uc(e)}function S0(t,e){return t.a._b(e)}function uGt(t,e){return yi(t.c,e)}function lGt(t,e){return kl(t.b,e)}function hGt(t,e){return t>e&&e0}function get(t,e){return yc(t,e)<0}function U9(t,e){return t.a.get(e)}function kYe(t,e){return e.split(t)}function MGt(t,e){return kl(t.e,e)}function mbt(t){return On(t),!1}function FR(t){_n.call(this,t,21)}function EYe(t,e){oQt.call(this,t,e)}function BR(t,e){Gr.call(this,t,e)}function pet(t,e){Gr.call(this,t,e)}function ybt(t){Xnt(),cKt.call(this,t)}function xbt(t,e){hYt(t,t.length,e)}function yM(t,e){$Yt(t,t.length,e)}function TYe(t,e,n){e.ud(t.a.Ge(n))}function CYe(t,e,n){e.we(t.a.Fe(n))}function _Ye(t,e,n){e.td(t.a.Kb(n))}function SYe(t,e,n){t.Mb(n)&&e.td(n)}function W9(t,e,n){t.splice(e,0,n)}function AYe(t,e){return Nu(t.e,e)}function RR(t,e){this.d=t,this.e=e}function IGt(t,e){this.b=t,this.a=e}function DGt(t,e){this.b=t,this.a=e}function kbt(t,e){this.b=t,this.a=e}function OGt(t,e){this.a=t,this.b=e}function NGt(t,e){this.a=t,this.b=e}function PGt(t,e){this.a=t,this.b=e}function FGt(t,e){this.a=t,this.b=e}function Tx(t,e){this.a=t,this.b=e}function Ebt(t,e){this.b=t,this.a=e}function Tbt(t,e){this.b=t,this.a=e}function jR(t,e){Gr.call(this,t,e)}function $R(t,e){Gr.call(this,t,e)}function Cbt(t,e){Gr.call(this,t,e)}function _bt(t,e){Gr.call(this,t,e)}function j3(t,e){Gr.call(this,t,e)}function bet(t,e){Gr.call(this,t,e)}function vet(t,e){Gr.call(this,t,e)}function wet(t,e){Gr.call(this,t,e)}function zR(t,e){Gr.call(this,t,e)}function Sbt(t,e){Gr.call(this,t,e)}function met(t,e){Gr.call(this,t,e)}function xM(t,e){Gr.call(this,t,e)}function qR(t,e){Gr.call(this,t,e)}function yet(t,e){Gr.call(this,t,e)}function K9(t,e){Gr.call(this,t,e)}function Abt(t,e){Gr.call(this,t,e)}function ws(t,e){Gr.call(this,t,e)}function HR(t,e){Gr.call(this,t,e)}function BGt(t,e){this.a=t,this.b=e}function RGt(t,e){this.a=t,this.b=e}function jGt(t,e){this.a=t,this.b=e}function $Gt(t,e){this.a=t,this.b=e}function zGt(t,e){this.a=t,this.b=e}function qGt(t,e){this.a=t,this.b=e}function HGt(t,e){this.a=t,this.b=e}function GGt(t,e){this.a=t,this.b=e}function VGt(t,e){this.a=t,this.b=e}function Lbt(t,e){this.b=t,this.a=e}function UGt(t,e){this.b=t,this.a=e}function WGt(t,e){this.b=t,this.a=e}function KGt(t,e){this.b=t,this.a=e}function a8(t,e){this.c=t,this.d=e}function YGt(t,e){this.e=t,this.d=e}function XGt(t,e){this.a=t,this.b=e}function QGt(t,e){this.b=e,this.c=t}function GR(t,e){Gr.call(this,t,e)}function kM(t,e){Gr.call(this,t,e)}function xet(t,e){Gr.call(this,t,e)}function Y9(t,e){Gr.call(this,t,e)}function Mbt(t,e){Gr.call(this,t,e)}function ket(t,e){Gr.call(this,t,e)}function Eet(t,e){Gr.call(this,t,e)}function EM(t,e){Gr.call(this,t,e)}function Ibt(t,e){Gr.call(this,t,e)}function Tet(t,e){Gr.call(this,t,e)}function X9(t,e){Gr.call(this,t,e)}function Dbt(t,e){Gr.call(this,t,e)}function Q9(t,e){Gr.call(this,t,e)}function Z9(t,e){Gr.call(this,t,e)}function Dm(t,e){Gr.call(this,t,e)}function Cet(t,e){Gr.call(this,t,e)}function _et(t,e){Gr.call(this,t,e)}function Obt(t,e){Gr.call(this,t,e)}function J9(t,e){Gr.call(this,t,e)}function Aet(t,e){Gr.call(this,t,e)}function VR(t,e){Gr.call(this,t,e)}function TM(t,e){Gr.call(this,t,e)}function CM(t,e){Gr.call(this,t,e)}function Cx(t,e){Gr.call(this,t,e)}function Let(t,e){Gr.call(this,t,e)}function Nbt(t,e){Gr.call(this,t,e)}function Met(t,e){Gr.call(this,t,e)}function Iet(t,e){Gr.call(this,t,e)}function Pbt(t,e){Gr.call(this,t,e)}function Det(t,e){Gr.call(this,t,e)}function Oet(t,e){Gr.call(this,t,e)}function Net(t,e){Gr.call(this,t,e)}function Pet(t,e){Gr.call(this,t,e)}function Fbt(t,e){Gr.call(this,t,e)}function ZGt(t,e){this.b=t,this.a=e}function JGt(t,e){this.a=t,this.b=e}function tVt(t,e){this.a=t,this.b=e}function eVt(t,e){this.a=t,this.b=e}function nVt(t,e){this.a=t,this.b=e}function Bbt(t,e){Gr.call(this,t,e)}function Rbt(t,e){Gr.call(this,t,e)}function rVt(t,e){this.b=t,this.d=e}function jbt(t,e){Gr.call(this,t,e)}function $bt(t,e){Gr.call(this,t,e)}function iVt(t,e){this.a=t,this.b=e}function sVt(t,e){this.a=t,this.b=e}function UR(t,e){Gr.call(this,t,e)}function tC(t,e){Gr.call(this,t,e)}function zbt(t,e){Gr.call(this,t,e)}function qbt(t,e){Gr.call(this,t,e)}function Hbt(t,e){Gr.call(this,t,e)}function Fet(t,e){Gr.call(this,t,e)}function Gbt(t,e){Gr.call(this,t,e)}function Bet(t,e){Gr.call(this,t,e)}function WR(t,e){Gr.call(this,t,e)}function Ret(t,e){Gr.call(this,t,e)}function jet(t,e){Gr.call(this,t,e)}function _M(t,e){Gr.call(this,t,e)}function $et(t,e){Gr.call(this,t,e)}function Vbt(t,e){Gr.call(this,t,e)}function SM(t,e){Gr.call(this,t,e)}function Ubt(t,e){Gr.call(this,t,e)}function LYe(t,e){return Nu(t.c,e)}function MYe(t,e){return Nu(e.b,t)}function IYe(t,e){return-t.b.Je(e)}function Wbt(t,e){return Nu(t.g,e)}function AM(t,e){Gr.call(this,t,e)}function _x(t,e){Gr.call(this,t,e)}function aVt(t,e){this.a=t,this.b=e}function oVt(t,e){this.a=t,this.b=e}function $e(t,e){this.a=t,this.b=e}function eC(t,e){Gr.call(this,t,e)}function nC(t,e){Gr.call(this,t,e)}function LM(t,e){Gr.call(this,t,e)}function zet(t,e){Gr.call(this,t,e)}function KR(t,e){Gr.call(this,t,e)}function rC(t,e){Gr.call(this,t,e)}function qet(t,e){Gr.call(this,t,e)}function YR(t,e){Gr.call(this,t,e)}function $3(t,e){Gr.call(this,t,e)}function MM(t,e){Gr.call(this,t,e)}function iC(t,e){Gr.call(this,t,e)}function sC(t,e){Gr.call(this,t,e)}function IM(t,e){Gr.call(this,t,e)}function XR(t,e){Gr.call(this,t,e)}function z3(t,e){Gr.call(this,t,e)}function QR(t,e){Gr.call(this,t,e)}function cVt(t,e){this.a=t,this.b=e}function uVt(t,e){this.a=t,this.b=e}function lVt(t,e){this.a=t,this.b=e}function hVt(t,e){this.a=t,this.b=e}function fVt(t,e){this.a=t,this.b=e}function dVt(t,e){this.a=t,this.b=e}function la(t,e){this.a=t,this.b=e}function ZR(t,e){Gr.call(this,t,e)}function gVt(t,e){this.a=t,this.b=e}function pVt(t,e){this.a=t,this.b=e}function bVt(t,e){this.a=t,this.b=e}function vVt(t,e){this.a=t,this.b=e}function wVt(t,e){this.a=t,this.b=e}function mVt(t,e){this.a=t,this.b=e}function yVt(t,e){this.b=t,this.a=e}function xVt(t,e){this.b=t,this.a=e}function kVt(t,e){this.b=t,this.a=e}function EVt(t,e){this.b=t,this.a=e}function TVt(t,e){this.a=t,this.b=e}function CVt(t,e){this.a=t,this.b=e}function DYe(t,e){c2n(t.a,u(e,56))}function _Vt(t,e){yan(t.a,u(e,11))}function OYe(t,e){return g8(),e!=t}function SVt(){return Zqt(),new Mge}function AVt(){prt(),this.b=new qs}function LVt(){hq(),this.a=new qs}function MVt(){jwt(),Kvt.call(this)}function Sx(t,e){Gr.call(this,t,e)}function IVt(t,e){this.a=t,this.b=e}function DVt(t,e){this.a=t,this.b=e}function JR(t,e){this.a=t,this.b=e}function OVt(t,e){this.a=t,this.b=e}function NVt(t,e){this.a=t,this.b=e}function PVt(t,e){this.a=t,this.b=e}function FVt(t,e){this.d=t,this.b=e}function Kbt(t,e){this.d=t,this.e=e}function BVt(t,e){this.f=t,this.c=e}function DM(t,e){this.b=t,this.c=e}function Ybt(t,e){this.i=t,this.g=e}function RVt(t,e){this.e=t,this.a=e}function jVt(t,e){this.a=t,this.b=e}function Xbt(t,e){t.i=null,ez(t,e)}function NYe(t,e){t&&ki(cN,t,e)}function $Vt(t,e){return Wit(t.a,e)}function tj(t){return VI(t.c,t.b)}function ec(t){return t?t.dd():null}function Gt(t){return t??null}function Om(t){return typeof t===u6}function Nm(t){return typeof t===Lxt}function ea(t){return typeof t===Oat}function Dp(t,e){return t.Hd().Xb(e)}function ej(t,e){return Xon(t.Kc(),e)}function Av(t,e){return yc(t,e)==0}function PYe(t,e){return yc(t,e)>=0}function aC(t,e){return yc(t,e)!=0}function FYe(t){return""+(On(t),t)}function OM(t,e){return t.substr(e)}function zVt(t){return al(t),t.d.gc()}function Het(t){return Dpn(t,t.c),t}function nj(t){return mC(t==null),t}function oC(t,e){return t.a+=""+e,t}function fo(t,e){return t.a+=""+e,t}function cC(t,e){return t.a+=""+e,t}function hc(t,e){return t.a+=""+e,t}function Vr(t,e){return t.a+=""+e,t}function Qbt(t,e){return t.a+=""+e,t}function qVt(t,e){hs(t,e,t.a,t.a.a)}function Kb(t,e){hs(t,e,t.c.b,t.c)}function BYe(t,e,n){Qse(e,Fst(t,n))}function RYe(t,e,n){Qse(e,Fst(t,n))}function jYe(t,e){Ian(new er(t),e)}function HVt(t,e){t.q.setTime(Vv(e))}function GVt(t,e){rwt.call(this,t,e)}function VVt(t,e){rwt.call(this,t,e)}function Get(t,e){rwt.call(this,t,e)}function UVt(t){Yu(this),VC(this,t)}function Zbt(t){return An(t,0),null}function Gf(t){return t.a=0,t.b=0,t}function WVt(t,e){return t.a=e.g+1,t}function $Ye(t,e){return t.j[e.p]==2}function Jbt(t){return ken(u(t,79))}function KVt(){KVt=Z,Tpe=Wr(Jit())}function YVt(){YVt=Z,zbe=Wr(Ice())}function XVt(){this.b=new kx(Qm(12))}function QVt(){this.b=0,this.a=!1}function ZVt(){this.b=0,this.a=!1}function uC(t){this.a=t,f9.call(this)}function JVt(t){this.a=t,f9.call(this)}function mn(t,e){Os.call(this,t,e)}function Vet(t,e){jm.call(this,t,e)}function q3(t,e){Ybt.call(this,t,e)}function Uet(t,e){U8.call(this,t,e)}function tUt(t,e){NM.call(this,t,e)}function ri(t,e){NR(),ki(nU,t,e)}function Wet(t,e){return Dl(t.a,0,e)}function eUt(t,e){return t.a.a.a.cc(e)}function nUt(t,e){return Gt(t)===Gt(e)}function zYe(t,e){return Ls(t.a,e.a)}function qYe(t,e){return du(t.a,e.a)}function HYe(t,e){return BYt(t.a,e.a)}function cd(t,e){return t.indexOf(e)}function Lv(t,e){return t==e?0:t?1:-1}function rj(t){return t<10?"0"+t:""+t}function GYe(t){return Ar(t),new uC(t)}function rUt(t){return ru(t.l,t.m,t.h)}function o8(t){return ps((On(t),t))}function VYe(t){return ps((On(t),t))}function iUt(t,e){return du(t.g,e.g)}function Bo(t){return typeof t===Lxt}function UYe(t){return t==_w||t==Dy}function WYe(t){return t==_w||t==Iy}function t2t(t){return Ro(t.b.b,t,0)}function sUt(t){this.a=SVt(),this.b=t}function aUt(t){this.a=SVt(),this.b=t}function KYe(t,e){return ue(t.a,e),e}function YYe(t,e){return ue(t.c,e),t}function oUt(t,e){return Rl(t.a,e),t}function XYe(t,e){return lf(),e.a+=t}function QYe(t,e){return lf(),e.a+=t}function ZYe(t,e){return lf(),e.c+=t}function e2t(t,e){D8(t,0,t.length,e)}function A0(){kt.call(this,new n2)}function cUt(){Fj.call(this,0,0,0,0)}function Ax(){ih.call(this,0,0,0,0)}function yo(t){this.a=t.a,this.b=t.b}function Op(t){return t==jh||t==kf}function c8(t){return t==Z0||t==Q0}function uUt(t){return t==t5||t==J4}function H3(t){return t!=H1&&t!=yb}function ml(t){return t.Lg()&&t.Mg()}function lUt(t){return Zj(u(t,118))}function ij(t){return Rl(new Hs,t)}function hUt(t,e){return new U8(e,t)}function JYe(t,e){return new U8(e,t)}function n2t(t,e,n){W$(t,e),K$(t,n)}function sj(t,e,n){Qv(t,e),Xv(t,n)}function m1(t,e,n){yu(t,e),xu(t,n)}function aj(t,e,n){F8(t,e),R8(t,n)}function oj(t,e,n){B8(t,e),j8(t,n)}function Ket(t,e){Z8(t,e),$8(t,t.D)}function r2t(t){BVt.call(this,t,!0)}function fUt(t,e,n){U2t.call(this,t,e,n)}function Np(t){Jp(),tcn.call(this,t)}function dUt(){BR.call(this,"Head",1)}function gUt(){BR.call(this,"Tail",3)}function Yet(t){t.c=Pt(Xn,Ie,1,0,5,1)}function pUt(t){t.a=Pt(Xn,Ie,1,8,5,1)}function bUt(t){mu(t.xf(),new ur(t))}function G3(t){return t!=null?Hi(t):0}function tXe(t,e){return Zm(e,k1(t))}function eXe(t,e){return Zm(e,k1(t))}function nXe(t,e){return t[t.length]=e}function rXe(t,e){return t[t.length]=e}function i2t(t){return ntn(t.b.Kc(),t.a)}function iXe(t,e){return tz(Knt(t.d),e)}function sXe(t,e){return tz(Knt(t.g),e)}function aXe(t,e){return tz(Knt(t.j),e)}function eo(t,e){Os.call(this,t.b,e)}function Mv(t){Fj.call(this,t,t,t,t)}function s2t(t){return t.b&&bat(t),t.a}function a2t(t){return t.b&&bat(t),t.c}function oXe(t,e){R1||(t.b=e)}function Xet(t,e,n){return Ji(t,e,n),n}function vUt(t,e,n){Ji(t.c[e.g],e.g,n)}function cXe(t,e,n){u(t.c,69).Xh(e,n)}function uXe(t,e,n){m1(n,n.i+t,n.j+e)}function lXe(t,e){Mr(Lc(t.a),IQt(e))}function hXe(t,e){Mr(il(t.a),DQt(e))}function lC(t){gi(),vv.call(this,t)}function fXe(t){return t==null?0:Hi(t)}function wUt(){wUt=Z,yht=new e_(pft)}function Nr(){Nr=Z,new mUt,new le}function mUt(){new Cr,new Cr,new Cr}function o2t(){o2t=Z,Cpt(),Q8t=new Cr}function y1(){y1=Z,b.Math.log(2)}function nh(){nh=Z,f0=(CGt(),N4e)}function dXe(){throw rt(new yg(sge))}function gXe(){throw rt(new yg(sge))}function pXe(){throw rt(new yg(age))}function bXe(){throw rt(new yg(age))}function yUt(t){this.a=t,Cvt.call(this,t)}function Qet(t){this.a=t,TR.call(this,t)}function Zet(t){this.a=t,TR.call(this,t)}function Xs(t,e){Lnt(t.c,t.c.length,e)}function Vo(t){return t.ae?1:0}function kUt(t,e){return yc(t,e)>0?t:e}function ru(t,e,n){return{l:t,m:e,h:n}}function vXe(t,e){t.a!=null&&_Vt(e,t.a)}function EUt(t){t.a=new Ht,t.c=new Ht}function cj(t){this.b=t,this.a=new le}function TUt(t){this.b=new Ce,this.a=t}function u2t(t){evt.call(this),this.a=t}function CUt(){BR.call(this,"Range",2)}function _Ut(){r4t(),this.a=new dD(C7t)}function wXe(t,e){Ar(e),Y3(t).Jc(new st)}function mXe(t,e){return Ol(),e.n.b+=t}function yXe(t,e,n){return ki(t.g,n,e)}function xXe(t,e,n){return ki(t.k,n,e)}function kXe(t,e){return ki(t.a,e.a,e)}function V3(t,e,n){return E3t(e,n,t.c)}function l2t(t){return new $e(t.c,t.d)}function EXe(t){return new $e(t.c,t.d)}function nc(t){return new $e(t.a,t.b)}function SUt(t,e){return U3n(t.a,e,null)}function TXe(t){Da(t,null),sa(t,null)}function AUt(t){vrt(t,null),wrt(t,null)}function LUt(){NM.call(this,null,null)}function MUt(){bj.call(this,null,null)}function h2t(t){this.a=t,Cr.call(this)}function CXe(t){this.b=(vn(),new q(t))}function uj(t){t.j=Pt(lEt,te,310,0,0,1)}function _Xe(t,e,n){t.c.Vc(e,u(n,133))}function SXe(t,e,n){t.c.ji(e,u(n,133))}function IUt(t,e){xr(t),t.Gc(u(e,15))}function hC(t,e){return c3n(t.c,t.b,e)}function AXe(t,e){return new JUt(t.Kc(),e)}function Jet(t,e){return Scn(t.Kc(),e)!=-1}function f2t(t,e){return t.a.Bc(e)!=null}function lj(t){return t.Ob()?t.Pb():null}function DUt(t){return Ah(t,0,t.length)}function Et(t,e){return t!=null&&rst(t,e)}function LXe(t,e){t.q.setHours(e),y_(t,e)}function OUt(t,e){t.c&&(Fvt(e),sQt(e))}function MXe(t,e,n){u(t.Kb(n),164).Nb(e)}function IXe(t,e,n){return j3n(t,e,n),n}function NUt(t,e,n){t.a=e^1502,t.b=n^fot}function tnt(t,e,n){return t.a[e.g][n.g]}function x1(t,e){return t.a[e.c.p][e.p]}function DXe(t,e){return t.e[e.c.p][e.p]}function OXe(t,e){return t.c[e.c.p][e.p]}function NXe(t,e){return t.j[e.p]=Hbn(e)}function PXe(t,e){return pmt(t.f,e.tg())}function FXe(t,e){return pmt(t.b,e.tg())}function BXe(t,e){return t.a0?e*e/t:e*e*100}function cQe(t,e){return t>0?e/(t*t):e*100}function uQe(t,e,n){return ue(e,rie(t,n))}function lQe(t,e,n){O$(),t.Xe(e)&&n.td(t)}function h8(t,e,n){var r;r=t.Zc(e),r.Rb(n)}function Fm(t,e,n){return t.a+=e,t.b+=n,t}function hQe(t,e,n){return t.a*=e,t.b*=n,t}function BM(t,e,n){return t.a-=e,t.b-=n,t}function F2t(t,e){return t.a=e.a,t.b=e.b,t}function mj(t){return t.a=-t.a,t.b=-t.b,t}function hWt(t){this.c=t,this.a=1,this.b=1}function fWt(t){this.c=t,yu(t,0),xu(t,0)}function dWt(t){Qi.call(this),zC(this,t)}function gWt(t){Iat(),jzt(this),this.mf(t)}function pWt(t,e){V9(),NM.call(this,t,e)}function B2t(t,e){Eg(),bj.call(this,t,e)}function bWt(t,e){Eg(),bj.call(this,t,e)}function vWt(t,e){Eg(),B2t.call(this,t,e)}function yl(t,e,n){Tl.call(this,t,e,n,2)}function ont(t,e){nh(),Pj.call(this,t,e)}function wWt(t,e){nh(),ont.call(this,t,e)}function R2t(t,e){nh(),ont.call(this,t,e)}function mWt(t,e){nh(),R2t.call(this,t,e)}function j2t(t,e){nh(),Pj.call(this,t,e)}function yWt(t,e){nh(),j2t.call(this,t,e)}function xWt(t,e){nh(),Pj.call(this,t,e)}function fQe(t,e){return t.c.Fc(u(e,133))}function $2t(t,e,n){return Eq(mI(t,e),n)}function dQe(t,e,n){return e.Qk(t.e,t.c,n)}function gQe(t,e,n){return e.Rk(t.e,t.c,n)}function cnt(t,e){return Kp(t.e,u(e,49))}function pQe(t,e,n){JC(il(t.a),e,DQt(n))}function bQe(t,e,n){JC(Lc(t.a),e,IQt(n))}function z2t(t,e){e.$modCount=t.$modCount}function bC(){bC=Z,$S=new Gi("root")}function f8(){f8=Z,lN=new vqt,new wqt}function kWt(){this.a=new Hv,this.b=new Hv}function q2t(){zee.call(this),this.Bb|=Ya}function EWt(){Gr.call(this,"GROW_TREE",0)}function vQe(t){return t==null?null:P4n(t)}function wQe(t){return t==null?null:H0n(t)}function mQe(t){return t==null?null:$o(t)}function yQe(t){return t==null?null:$o(t)}function L0(t){t.o==null&&vbn(t)}function Re(t){return mC(t==null||Om(t)),t}function ye(t){return mC(t==null||Nm(t)),t}function Br(t){return mC(t==null||ea(t)),t}function H2t(t){this.q=new b.Date(Vv(t))}function RM(t,e){this.c=t,n8.call(this,t,e)}function yj(t,e){this.a=t,RM.call(this,t,e)}function xQe(t,e){this.d=t,Mtt(this),this.b=e}function G2t(t,e){jrt.call(this,t),this.a=e}function V2t(t,e){jrt.call(this,t),this.a=e}function kQe(t){w3t.call(this,0,0),this.f=t}function U2t(t,e,n){I$.call(this,t,e,n,null)}function TWt(t,e,n){I$.call(this,t,e,n,null)}function EQe(t,e,n){return t.ue(e,n)<=0?n:e}function TQe(t,e,n){return t.ue(e,n)<=0?e:n}function CQe(t,e){return u(Wv(t.b,e),149)}function _Qe(t,e){return u(Wv(t.c,e),229)}function unt(t){return u(Fe(t.a,t.b),287)}function CWt(t){return new $e(t.c,t.d+t.a)}function _Wt(t){return Ol(),uUt(u(t,197))}function Bm(){Bm=Z,t7t=un((_l(),V2))}function SQe(t,e){e.a?fvn(t,e):ent(t.a,e.b)}function SWt(t,e){R1||ue(t.a,e)}function AQe(t,e){return vM(),V8(e.d.i,t)}function LQe(t,e){return Xx(),new Lue(e,t)}function ld(t,e){return tI(e,Yxt),t.f=e,t}function W2t(t,e,n){return n=zl(t,e,3,n),n}function K2t(t,e,n){return n=zl(t,e,6,n),n}function Y2t(t,e,n){return n=zl(t,e,9,n),n}function jM(t,e,n){++t.j,t.Ki(),Brt(t,e,n)}function AWt(t,e,n){++t.j,t.Hi(e,t.oi(e,n))}function LWt(t,e,n){var r;r=t.Zc(e),r.Rb(n)}function MWt(t,e,n){return uxt(t.c,t.b,e,n)}function X2t(t,e){return(e&vi)%t.d.length}function Os(t,e){Gi.call(this,t),this.a=e}function Q2t(t,e){wpt.call(this,t),this.a=e}function lnt(t,e){wpt.call(this,t),this.a=e}function IWt(t,e){this.c=t,Kv.call(this,e)}function DWt(t,e){this.a=t,Ozt.call(this,e)}function $M(t,e){this.a=t,Ozt.call(this,e)}function OWt(t){this.a=(Bl(t,my),new Yc(t))}function NWt(t){this.a=(Bl(t,my),new Yc(t))}function zM(t){return!t.a&&(t.a=new ut),t.a}function PWt(t){return t>8?0:t+1}function MQe(t,e){return Fn(),t==e?0:t?1:-1}function Z2t(t,e,n){return Nx(t,u(e,22),n)}function IQe(t,e,n){return t.apply(e,n)}function FWt(t,e,n){return t.a+=Ah(e,0,n),t}function J2t(t,e){var n;return n=t.e,t.e=e,n}function DQe(t,e){var n;n=t[hot],n.call(t,e)}function OQe(t,e){var n;n=t[hot],n.call(t,e)}function Rm(t,e){t.a.Vc(t.b,e),++t.b,t.c=-1}function BWt(t){Yu(t.e),t.d.b=t.d,t.d.a=t.d}function qM(t){t.b?qM(t.b):t.f.c.zc(t.e,t.d)}function NQe(t,e,n){Wb(),vtt(t,e.Ce(t.a,n))}function PQe(t,e){return cet(mie(t.a,e,!0))}function FQe(t,e){return cet(yie(t.a,e,!0))}function uf(t,e){return wR(new Array(e),t)}function hnt(t){return String.fromCharCode(t)}function BQe(t){return t==null?null:t.message}function RWt(){this.a=new le,this.b=new le}function jWt(){this.a=new F5,this.b=new Kzt}function $Wt(){this.b=new Ta,this.c=new le}function tvt(){this.d=new Ta,this.e=new Ta}function evt(){this.n=new Ta,this.o=new Ta}function xj(){this.n=new wx,this.i=new Ax}function zWt(){this.a=new jJ,this.b=new zX}function qWt(){this.a=new le,this.d=new le}function HWt(){this.b=new qs,this.a=new qs}function GWt(){this.b=new Cr,this.a=new Cr}function VWt(){this.b=new CHt,this.a=new NQ}function UWt(){xj.call(this),this.a=new Ta}function vC(t){ccn.call(this,t,(P$(),Aut))}function nvt(t,e,n,r){Fj.call(this,t,e,n,r)}function RQe(t,e,n){n!=null&&Z$(e,gst(t,n))}function jQe(t,e,n){n!=null&&J$(e,gst(t,n))}function rvt(t,e,n){return n=zl(t,e,11,n),n}function Li(t,e){return t.a+=e.a,t.b+=e.b,t}function na(t,e){return t.a-=e.a,t.b-=e.b,t}function $Qe(t,e){return t.n.a=(On(e),e+10)}function zQe(t,e){return t.n.a=(On(e),e+10)}function qQe(t,e){return e==t||fE(cq(e),t)}function WWt(t,e){return ki(t.a,e,"")==null}function HQe(t,e){return vM(),!V8(e.d.i,t)}function GQe(t,e){Op(t.f)?obn(t,e):Vdn(t,e)}function VQe(t,e){var n;return n=e.Hh(t.a),n}function jm(t,e){mo.call(this,X_+t+S2+e)}function Ix(t,e,n,r){he.call(this,t,e,n,r)}function ivt(t,e,n,r){he.call(this,t,e,n,r)}function KWt(t,e,n,r){ivt.call(this,t,e,n,r)}function YWt(t,e,n,r){Uj.call(this,t,e,n,r)}function fnt(t,e,n,r){Uj.call(this,t,e,n,r)}function svt(t,e,n,r){Uj.call(this,t,e,n,r)}function XWt(t,e,n,r){fnt.call(this,t,e,n,r)}function avt(t,e,n,r){fnt.call(this,t,e,n,r)}function Cn(t,e,n,r){svt.call(this,t,e,n,r)}function QWt(t,e,n,r){avt.call(this,t,e,n,r)}function ZWt(t,e,n,r){iwt.call(this,t,e,n,r)}function JWt(t,e,n){this.a=t,D2t.call(this,e,n)}function tKt(t,e,n){this.c=e,this.b=n,this.a=t}function UQe(t,e,n){return t.d=u(e.Kb(n),164)}function ovt(t,e){return t.Aj().Nh().Kh(t,e)}function cvt(t,e){return t.Aj().Nh().Ih(t,e)}function eKt(t,e){return On(t),Gt(t)===Gt(e)}function hn(t,e){return On(t),Gt(t)===Gt(e)}function dnt(t,e){return cet(mie(t.a,e,!1))}function gnt(t,e){return cet(yie(t.a,e,!1))}function WQe(t,e){return t.b.sd(new NGt(t,e))}function KQe(t,e){return t.b.sd(new PGt(t,e))}function nKt(t,e){return t.b.sd(new FGt(t,e))}function uvt(t,e,n){return t.lastIndexOf(e,n)}function YQe(t,e,n){return Ls(t[e.b],t[n.b])}function XQe(t,e){return Jt(e,(Te(),_O),t)}function QQe(t,e){return du(e.a.d.p,t.a.d.p)}function ZQe(t,e){return du(t.a.d.p,e.a.d.p)}function JQe(t,e){return Ls(t.c-t.s,e.c-e.s)}function rKt(t){return t.c?Ro(t.c.a,t,0):-1}function tZe(t){return t<100?null:new Sp(t)}function Dx(t){return t==G2||t==h0||t==Vc}function iKt(t,e){return Et(e,15)&&lue(t.c,e)}function eZe(t,e){R1||e&&(t.d=e)}function pnt(t,e){var n;return n=e,!!Dyt(t,n)}function lvt(t,e){this.c=t,qnt.call(this,t,e)}function sKt(t){this.c=t,Get.call(this,Iq,0)}function aKt(t,e){atn.call(this,t,t.length,e)}function nZe(t,e,n){return u(t.c,69).lk(e,n)}function kj(t,e,n){return u(t.c,69).mk(e,n)}function rZe(t,e,n){return dQe(t,u(e,332),n)}function hvt(t,e,n){return gQe(t,u(e,332),n)}function iZe(t,e,n){return iae(t,u(e,332),n)}function oKt(t,e,n){return n0n(t,u(e,332),n)}function wC(t,e){return e==null?null:ny(t.b,e)}function fvt(t){return Nm(t)?(On(t),t):t.ke()}function Ej(t){return!isNaN(t)&&!isFinite(t)}function cKt(t){hd(),this.a=(vn(),new Qk(t))}function HM(t){g8(),this.d=t,this.a=new P3}function rh(t,e,n){this.a=t,this.b=e,this.c=n}function uKt(t,e,n){this.a=t,this.b=e,this.c=n}function lKt(t,e,n){this.d=t,this.b=n,this.a=e}function bnt(t){EUt(this),_h(this),Ua(this,t)}function Pu(t){Yet(this),Svt(this.c,0,t.Pc())}function hKt(t){El(t.a),cte(t.c,t.b),t.b=null}function fKt(t){this.a=t,qd(),ku(Date.now())}function dKt(){dKt=Z,IEt=new _,YH=new _}function vnt(){vnt=Z,kEt=new It,Ige=new Ft}function gKt(){gKt=Z,j4e=Pt(Xn,Ie,1,0,5,1)}function pKt(){pKt=Z,r5e=Pt(Xn,Ie,1,0,5,1)}function dvt(){dvt=Z,i5e=Pt(Xn,Ie,1,0,5,1)}function hd(){hd=Z,new xpt((vn(),vn(),io))}function sZe(t){return P$(),Ur((mte(),Nge),t)}function aZe(t){return I1(),Ur((RJt(),$ge),t)}function oZe(t){return Nz(),Ur((VZt(),Uge),t)}function cZe(t){return $$(),Ur((UZt(),Wge),t)}function uZe(t){return gq(),Ur((Dne(),Kge),t)}function lZe(t){return Kf(),Ur((PJt(),Qge),t)}function hZe(t){return Xu(),Ur((FJt(),Jge),t)}function fZe(t){return wu(),Ur((BJt(),epe),t)}function dZe(t){return Lq(),Ur((KVt(),Tpe),t)}function gZe(t){return tw(),Ur((xte(),_pe),t)}function pZe(t){return n6(),Ur((kte(),Ape),t)}function bZe(t){return s_(),Ur((Ete(),Ipe),t)}function vZe(t){return AR(),Ur((EZt(),Dpe),t)}function wZe(t){return z$(),Ur((WZt(),Ype),t)}function mZe(t){return jC(),Ur((jJt(),bbe),t)}function yZe(t){return Wa(),Ur((Jte(),ybe),t)}function xZe(t){return K8(),Ur((yte(),Cbe),t)}function kZe(t){return ew(),Ur(($Jt(),Ibe),t)}function gvt(t,e){if(!t)throw rt(new Pn(e))}function EZe(t){return Gn(),Ur((yee(),Pbe),t)}function pvt(t){Fj.call(this,t.d,t.c,t.a,t.b)}function wnt(t){Fj.call(this,t.d,t.c,t.a,t.b)}function bvt(t,e,n){this.b=t,this.c=e,this.a=n}function Tj(t,e,n){this.b=t,this.a=e,this.c=n}function bKt(t,e,n){this.a=t,this.b=e,this.c=n}function vvt(t,e,n){this.a=t,this.b=e,this.c=n}function vKt(t,e,n){this.a=t,this.b=e,this.c=n}function wvt(t,e,n){this.a=t,this.b=e,this.c=n}function wKt(t,e,n){this.b=t,this.a=e,this.c=n}function Cj(t,e,n){this.e=e,this.b=t,this.d=n}function TZe(t,e,n){return Wb(),t.a.Od(e,n),e}function mnt(t){var e;return e=new Uu,e.e=t,e}function mvt(t){var e;return e=new eqt,e.b=t,e}function GM(){GM=Z,cG=new _Y,uG=new SY}function lf(){lf=Z,Ybe=new bX,Xbe=new yF}function CZe(t){return dz(),Ur((Cte(),Gbe),t)}function _Ze(t){return M1(),Ur((Ste(),Jbe),t)}function SZe(t){return fq(),Ur((xne(),o2e),t)}function AZe(t){return i6(),Ur((Eee(),c2e),t)}function LZe(t){return D$(),Ur((JZt(),u2e),t)}function MZe(t){return Yx(),Ur((zJt(),l2e),t)}function IZe(t){return g4(),Ur((Kte(),e2e),t)}function DZe(t){return Jv(),Ur((GJt(),a2e),t)}function OZe(t){return X$(),Ur((qJt(),h2e),t)}function NZe(t){return v2(),Ur((Ute(),f2e),t)}function PZe(t){return TI(),Ur((YZt(),d2e),t)}function FZe(t){return u2(),Ur((HJt(),p2e),t)}function BZe(t){return nq(),Ur((See(),b2e),t)}function RZe(t){return bI(),Ur((XZt(),v2e),t)}function jZe(t){return nD(),Ur((Cee(),w2e),t)}function $Ze(t){return gE(),Ur((Tee(),m2e),t)}function zZe(t){return oo(),Ur((Wne(),y2e),t)}function qZe(t){return W8(),Ur((UJt(),x2e),t)}function HZe(t){return B0(),Ur((VJt(),E2e),t)}function GZe(t){return x$(),Ur((tJt(),T2e),t)}function VZe(t){return hh(),Ur((Yte(),C2e),t)}function UZe(t){return Zz(),Ur((_ee(),$we),t)}function WZe(t){return YC(),Ur((WJt(),zwe),t)}function KZe(t){return sy(),Ur((Ate(),qwe),t)}function YZe(t){return so(),Ur((XJt(),Kwe),t)}function XZe(t){return w4(),Ur((yne(),Gwe),t)}function QZe(t){return j0(),Ur((YJt(),Vwe),t)}function ZZe(t){return yI(),Ur((ZZt(),Uwe),t)}function JZe(t){return uz(),Ur((KJt(),Ywe),t)}function tJe(t){return a_(),Ur((Wte(),Hwe),t)}function eJe(t){return lI(),Ur((QZt(),Xwe),t)}function nJe(t){return tE(),Ur((ZJt(),Qwe),t)}function rJe(t){return oz(),Ur((JJt(),Zwe),t)}function iJe(t){return gz(),Ur((QJt(),Jwe),t)}function sJe(t){return Zv(),Ur((tte(),fme),t)}function aJe(t){return BC(),Ur((nJt(),vme),t)}function oJe(t){return dd(),Ur((rJt(),Tme),t)}function cJe(t){return E1(),Ur((iJt(),_me),t)}function uJe(t){return Vf(),Ur((eJt(),zme),t)}function lJe(t){return qv(),Ur((sJt(),Kme),t)}function hJe(t){return uE(),Ur((Tte(),Yme),t)}function fJe(t){return f_(),Ur((Aee(),Qme),t)}function dJe(t){return d$(),Ur((cJt(),hye),t)}function gJe(t){return iz(),Ur((oJt(),vye),t)}function pJe(t){return v$(),Ur((aJt(),fye),t)}function bJe(t){return Cz(),Ur((ete(),mye),t)}function vJe(t){return N$(),Ur((uJt(),yye),t)}function wJe(t){return RI(),Ur((nte(),xye),t)}function mJe(t){return Gz(),Ur((_te(),Fye),t)}function yJe(t){return cz(),Ur((ite(),Bye),t)}function xJe(t){return Tz(),Ur((rte(),Rye),t)}function kJe(t){return yE(),Ur((Zte(),i3e),t)}function EJe(t){return GI(),Ur((ste(),s3e),t)}function TJe(t){return MR(),Ur((xZt(),a3e),t)}function CJe(t){return IR(),Ur((yZt(),c3e),t)}function _Je(t){return hI(),Ur((hJt(),u3e),t)}function SJe(t){return iD(),Ur((Xte(),l3e),t)}function AJe(t){return H9(),Ur((kZt(),_3e),t)}function LJe(t){return NI(),Ur((lJt(),S3e),t)}function MJe(t){return Xf(),Ur((Qte(),O3e),t)}function IJe(t){return jg(),Ur((kne(),P3e),t)}function DJe(t){return Qd(),Ur((kee(),F3e),t)}function OJe(t){return cy(),Ur((xee(),q3e),t)}function NJe(t){return ro(),Ur((YVt(),zbe),t)}function PJe(t){return q8(),Ur((KZt(),$be),t)}function FJe(t){return ao(),Ur((tee(),r4e),t)}function BJe(t){return A1(),Ur((ote(),i4e),t)}function RJe(t){return q0(),Ur((Ite(),s4e),t)}function jJe(t){return tq(),Ur((Mee(),a4e),t)}function $Je(t){return $0(),Ur((ate(),c4e),t)}function zJe(t){return jl(),Ur((Mte(),l4e),t)}function qJe(t){return fy(),Ur((Ine(),h4e),t)}function HJe(t){return c4(),Ur((eee(),f4e),t)}function GJe(t){return oa(),Ur((bee(),d4e),t)}function VJe(t){return Qu(),Ur((Lee(),g4e),t)}function UJe(t){return _l(),Ur((Ote(),y4e),t)}function WJe(t){return cl(),Ur((Kne(),x4e),t)}function KJe(t){return be(),Ur((nee(),p4e),t)}function YJe(t){return Az(),Ur((Dte(),k4e),t)}function XJe(t){return Cl(),Ur((Lte(),C4e),t)}function QJe(t){return vE(),Ur((Ene(),R4e),t)}function ZJe(t,e){return On(t),t+(On(e),e)}function JJe(t,e){return qd(),Mr(Wt(t.a),e)}function ttn(t,e){return qd(),Mr(Wt(t.a),e)}function ynt(t,e){this.c=t,this.a=e,this.b=e-t}function mKt(t,e,n){this.a=t,this.b=e,this.c=n}function yvt(t,e,n){this.a=t,this.b=e,this.c=n}function xvt(t,e,n){this.a=t,this.b=e,this.c=n}function yKt(t,e,n){this.a=t,this.b=e,this.c=n}function xKt(t,e,n){this.a=t,this.b=e,this.c=n}function Cg(t,e,n){this.e=t,this.a=e,this.c=n}function kKt(t,e,n){nh(),Owt.call(this,t,e,n)}function xnt(t,e,n){nh(),vwt.call(this,t,e,n)}function kvt(t,e,n){nh(),vwt.call(this,t,e,n)}function Evt(t,e,n){nh(),vwt.call(this,t,e,n)}function EKt(t,e,n){nh(),xnt.call(this,t,e,n)}function Tvt(t,e,n){nh(),xnt.call(this,t,e,n)}function TKt(t,e,n){nh(),Tvt.call(this,t,e,n)}function CKt(t,e,n){nh(),kvt.call(this,t,e,n)}function _Kt(t,e,n){nh(),Evt.call(this,t,e,n)}function VM(t,e){return Ar(t),Ar(e),new WHt(t,e)}function Ox(t,e){return Ar(t),Ar(e),new jKt(t,e)}function etn(t,e){return Ar(t),Ar(e),new $Kt(t,e)}function ntn(t,e){return Ar(t),Ar(e),new YHt(t,e)}function u(t,e){return mC(t==null||rst(t,e)),t}function d8(t){var e;return e=new le,Xrt(e,t),e}function rtn(t){var e;return e=new qs,Xrt(e,t),e}function SKt(t){var e;return e=new Mpt,lit(e,t),e}function UM(t){var e;return e=new Qi,lit(e,t),e}function itn(t){return!t.e&&(t.e=new le),t.e}function stn(t){return!t.c&&(t.c=new xm),t.c}function ue(t,e){return t.c[t.c.length]=e,!0}function AKt(t,e){this.c=t,this.b=e,this.a=!1}function Cvt(t){this.d=t,Mtt(this),this.b=Qtn(t.d)}function LKt(){this.a=";,;",this.b="",this.c=""}function atn(t,e,n){MYt.call(this,e,n),this.a=t}function MKt(t,e,n){this.b=t,GVt.call(this,e,n)}function _vt(t,e,n){this.c=t,RR.call(this,e,n)}function Svt(t,e,n){Y4t(n,0,t,e,n.length,!1)}function Gd(t,e,n,r,s){t.b=e,t.c=n,t.d=r,t.a=s}function otn(t,e){e&&(t.b=e,t.a=($p(e),e.a))}function Avt(t,e,n,r,s){t.d=e,t.c=n,t.a=r,t.b=s}function Lvt(t){var e,n;e=t.b,n=t.c,t.b=n,t.c=e}function Mvt(t){var e,n;n=t.d,e=t.a,t.d=e,t.a=n}function Ivt(t){return Vp(den(Bo(t)?Sh(t):t))}function ctn(t,e){return du(UKt(t.d),UKt(e.d))}function utn(t,e){return e==(be(),Bn)?t.c:t.d}function g8(){g8=Z,XCt=(be(),Bn),gV=Hn}function IKt(){this.b=Xt(ye(De((Zf(),Vut))))}function DKt(t){return Wb(),Pt(Xn,Ie,1,t,5,1)}function ltn(t){return new $e(t.c+t.b,t.d+t.a)}function htn(t,e){return LR(),du(t.d.p,e.d.p)}function knt(t){return Qn(t.b!=0),ch(t,t.a.a)}function ftn(t){return Qn(t.b!=0),ch(t,t.c.b)}function Dvt(t,e){if(!t)throw rt(new zqt(e))}function _j(t,e){if(!t)throw rt(new Pn(e))}function Ovt(t,e,n){a8.call(this,t,e),this.b=n}function WM(t,e,n){Kbt.call(this,t,e),this.c=n}function OKt(t,e,n){lee.call(this,e,n),this.d=t}function Nvt(t){dvt(),_k.call(this),this.th(t)}function NKt(t,e,n){this.a=t,q3.call(this,e,n)}function PKt(t,e,n){this.a=t,q3.call(this,e,n)}function Sj(t,e,n){Kbt.call(this,t,e),this.c=n}function FKt(){L8(),Ien.call(this,(Mp(),Uh))}function BKt(t){return t!=null&&!Hit(t,iA,sA)}function dtn(t,e){return(Ure(t)<<4|Ure(e))&ms}function gtn(t,e){return Qj(),hst(t,e),new lXt(t,e)}function Yb(t,e){var n;t.n&&(n=e,ue(t.f,n))}function p8(t,e,n){var r;r=new Hm(n),Wf(t,e,r)}function ptn(t,e){var n;return n=t.c,Zmt(t,e),n}function Pvt(t,e){return e<0?t.g=-1:t.g=e,t}function Aj(t,e){return Jan(t),t.a*=e,t.b*=e,t}function RKt(t,e,n,r,s){t.c=e,t.d=n,t.b=r,t.a=s}function ni(t,e){return hs(t,e,t.c.b,t.c),!0}function Fvt(t){t.a.b=t.b,t.b.a=t.a,t.a=t.b=null}function Ent(t){this.b=t,this.a=Pv(this.b.a).Ed()}function jKt(t,e){this.b=t,this.a=e,f9.call(this)}function $Kt(t,e){this.a=t,this.b=e,f9.call(this)}function zKt(t,e){MYt.call(this,e,1040),this.a=t}function KM(t){return t==0||isNaN(t)?t:t<0?-1:1}function btn(t){return jx(),Zd(t)==ts(Xp(t))}function vtn(t){return jx(),Xp(t)==ts(Zd(t))}function Nv(t,e){return l_(t,new a8(e.a,e.b))}function wtn(t){return!Va(t)&&t.c.i.c==t.d.i.c}function Lj(t){var e;return e=t.n,t.a.b+e.d+e.a}function qKt(t){var e;return e=t.n,t.e.b+e.d+e.a}function Bvt(t){var e;return e=t.n,t.e.a+e.b+e.c}function HKt(t){return gi(),new Vd(0,t)}function mtn(t){return t.a?t.a:rrt(t)}function mC(t){if(!t)throw rt(new Xk(null))}function GKt(){GKt=Z,Lft=(vn(),new D(iut))}function Mj(){Mj=Z,new N3t((Xtt(),but),(Qtt(),put))}function VKt(){VKt=Z,sEt=Pt(ja,te,19,256,0,1)}function Tnt(t,e,n,r){u3t.call(this,t,e,n,r,0,0)}function ytn(t,e,n){return ki(t.b,u(n.b,17),e)}function xtn(t,e,n){return ki(t.b,u(n.b,17),e)}function ktn(t,e){return ue(t,new $e(e.a,e.b))}function Etn(t,e){return t.c=e)throw rt(new _pt)}function sen(t,e,n){return Ji(e,0,zvt(e[0],n[0])),e}function aen(t,e,n){e.Ye(n,Xt(ye(Jn(t.b,n)))*t.a)}function LYt(t,e,n){return y4(),H8(t,e)&&H8(t,n)}function TC(t){return Qu(),!t.Hc(tg)&&!t.Hc(xb)}function Gj(t){return new $e(t.c+t.b/2,t.d+t.a/2)}function Fnt(t,e){return e.kh()?Kp(t.b,u(e,49)):e}function rwt(t,e){this.e=t,this.d=e&64?e|bd:e}function MYt(t,e){this.c=0,this.d=t,this.b=e|64|bd}function Vj(t){this.b=new Yc(11),this.a=(X3(),t)}function Bnt(t){this.b=null,this.a=(X3(),t||mEt)}function IYt(t){this.a=tse(t.a),this.b=new Pu(t.b)}function DYt(t){this.b=t,Lx.call(this,t),PUt(this)}function OYt(t){this.b=t,PM.call(this,t),FUt(this)}function qm(t,e,n){this.a=t,Ix.call(this,e,n,5,6)}function iwt(t,e,n,r){this.b=t,Ss.call(this,e,n,r)}function Qs(t,e,n,r,s){qrt.call(this,t,e,n,r,s,-1)}function CC(t,e,n,r,s){gI.call(this,t,e,n,r,s,-1)}function he(t,e,n,r){Ss.call(this,t,e,n),this.b=r}function Uj(t,e,n,r){WM.call(this,t,e,n),this.b=r}function NYt(t){BVt.call(this,t,!1),this.a=!1}function PYt(t,e){this.b=t,att.call(this,t.b),this.a=e}function FYt(t,e){Gm(),uYe.call(this,t,yz(new wl(e)))}function Wj(t,e){return gi(),new wwt(t,e,0)}function Rnt(t,e){return gi(),new wwt(6,t,e)}function oen(t,e){return hn(t.substr(0,e.length),e)}function kl(t,e){return ea(e)?art(t,e):!!Ao(t.f,e)}function pa(t,e){for(On(e);t.Ob();)e.td(t.Pb())}function K3(t,e,n){Jp(),this.e=t,this.d=e,this.a=n}function _g(t,e,n,r){var s;s=t.i,s.i=e,s.a=n,s.b=r}function swt(t){var e;for(e=t;e.f;)e=e.f;return e}function Fx(t){var e;return e=KC(t),Qn(e!=null),e}function cen(t){var e;return e=Wun(t),Qn(e!=null),e}function v8(t,e){var n;return n=t.a.gc(),bmt(e,n),n-e}function awt(t,e){var n;for(n=0;n0?b.Math.log(t/e):-100}function BYt(t,e){return yc(t,e)<0?-1:yc(t,e)>0?1:0}function hwt(t,e,n){return Ale(t,u(e,46),u(n,167))}function RYt(t,e){return u(ewt(Pv(t.a)).Xb(e),42).cd()}function ven(t,e){return $an(e,t.length),new zKt(t,e)}function qnt(t,e){this.d=t,er.call(this,t),this.e=e}function Fv(t){this.d=(On(t),t),this.a=0,this.c=Iq}function fwt(t,e){vv.call(this,1),this.a=t,this.b=e}function jYt(t,e){return t.c?jYt(t.c,e):ue(t.b,e),t}function wen(t,e,n){var r;return r=Xm(t,e),_rt(t,e,n),r}function dwt(t,e){var n;return n=t.slice(0,e),Mmt(n,t)}function $Yt(t,e,n){var r;for(r=0;r=t.g}function Qnt(t,e,n){var r;return r=cit(t,e,n),z5t(t,r)}function Bx(t,e){var n;n=t.a.length,Xm(t,n),_rt(t,n,e)}function eXt(t,e){var n;n=console[t],n.call(console,e)}function nXt(t,e){var n;++t.j,n=t.Vi(),t.Ii(t.oi(n,e))}function Men(t,e,n){u(e.b,65),mu(e.a,new yvt(t,n,e))}function vwt(t,e,n){oR.call(this,e),this.a=t,this.b=n}function wwt(t,e,n){vv.call(this,t),this.a=e,this.b=n}function mwt(t,e,n){this.a=t,wpt.call(this,e),this.b=n}function rXt(t,e,n){this.a=t,Ywt.call(this,8,e,null,n)}function Ien(t){this.a=(On(Kr),Kr),this.b=t,new jpt}function iXt(t){this.c=t,this.b=this.c.a,this.a=this.c.e}function ywt(t){this.c=t,this.b=t.a.d.a,z2t(t.a.e,this)}function El(t){Pm(t.c!=-1),t.d.$c(t.c),t.b=t.c,t.c=-1}function AC(t){return b.Math.sqrt(t.a*t.a+t.b*t.b)}function Rv(t,e){return b8(e,t.a.c.length),Fe(t.a,e)}function fd(t,e){return Gt(t)===Gt(e)||t!=null&&yi(t,e)}function Den(t){return 0>=t?new fbt:won(t-1)}function Oen(t){return n3?art(n3,t):!1}function sXt(t){return t?t.dc():!t.Kc().Ob()}function Fa(t){return!t.a&&t.c?t.c.b:t.a}function Nen(t){return!t.a&&(t.a=new Ss(kb,t,4)),t.a}function jv(t){return!t.d&&(t.d=new Ss(ho,t,1)),t.d}function On(t){if(t==null)throw rt(new L9);return t}function LC(t){t.c?t.c.He():(t.d=!0,j2n(t))}function $p(t){t.c?$p(t.c):(d2(t),t.d=!0)}function aXt(t){Twt(t.a),t.b=Pt(Xn,Ie,1,t.b.length,5,1)}function Pen(t,e){return du(e.j.c.length,t.j.c.length)}function Fen(t,e){t.c<0||t.b.b=0?t.Bh(n):Q4t(t,e)}function oXt(t){var e,n;return e=t.c.i.c,n=t.d.i.c,e==n}function Ren(t){if(t.p!=4)throw rt(new Iu);return t.e}function jen(t){if(t.p!=3)throw rt(new Iu);return t.e}function $en(t){if(t.p!=6)throw rt(new Iu);return t.f}function zen(t){if(t.p!=6)throw rt(new Iu);return t.k}function qen(t){if(t.p!=3)throw rt(new Iu);return t.j}function Hen(t){if(t.p!=4)throw rt(new Iu);return t.j}function xwt(t){return!t.b&&(t.b=new cR(new Ytt)),t.b}function $v(t){return t.c==-2&&Vk(t,o0n(t.g,t.b)),t.c}function y8(t,e){var n;return n=Unt("",t),n.n=e,n.i=1,n}function Gen(t,e){Int(u(e.b,65),t),mu(e.a,new Jr(t))}function Ven(t,e){Mr((!t.a&&(t.a=new $M(t,t)),t.a),e)}function cXt(t,e){this.b=t,qnt.call(this,t,e),PUt(this)}function uXt(t,e){this.b=t,lvt.call(this,t,e),FUt(this)}function kwt(t,e,n,r){_v.call(this,t,e),this.d=n,this.a=r}function Xj(t,e,n,r){_v.call(this,t,n),this.a=e,this.f=r}function lXt(t,e){CXe.call(this,mon(Ar(t),Ar(e))),this.a=e}function hXt(){L4t.call(this,L2,(gHt(),f5e)),d3n(this)}function fXt(){L4t.call(this,Ph,(t8(),JAt)),kyn(this)}function dXt(){Gr.call(this,"DELAUNAY_TRIANGULATION",0)}function Uen(t){return String.fromCharCode.apply(null,t)}function ki(t,e,n){return ea(e)?xo(t,e,n):su(t.f,e,n)}function Ewt(t){return vn(),t?t.ve():(X3(),X3(),xEt)}function Wen(t,e,n){return Qx(),n.pg(t,u(e.cd(),146))}function gXt(t,e){return Mj(),new N3t(new YUt(t),new KUt(e))}function Ken(t){return Bl(t,Bat),q$(Oa(Oa(5,t),t/10|0))}function Qj(){Qj=Z,hge=new Ztt(ct(ot(M2,1),Dq,42,0,[]))}function pXt(t){return!t.d&&(t.d=new T(t.c.Cc())),t.d}function x8(t){return!t.a&&(t.a=new Yqt(t.c.vc())),t.a}function bXt(t){return!t.b&&(t.b=new Qk(t.c.ec())),t.b}function Wd(t,e){for(;e-- >0;)t=t<<1|(t<0?1:0);return t}function Pc(t,e){return Gt(t)===Gt(e)||t!=null&&yi(t,e)}function Yen(t,e){return Fn(),u(e.b,19).ar&&++r,r}function I0(t){var e,n;return n=(e=new wv,e),P8(n,t),n}function nrt(t){var e,n;return n=(e=new wv,e),D4t(n,t),n}function lnn(t,e){var n;return n=Jn(t.f,e),uyt(e,n),null}function rrt(t){var e;return e=xon(t),e||null}function _Xt(t){return!t.b&&(t.b=new he(Ws,t,12,3)),t.b}function hnn(t){return t!=null&&pM(rU,t.toLowerCase())}function fnn(t,e){return Ls(Fu(t)*xl(t),Fu(e)*xl(e))}function dnn(t,e){return Ls(Fu(t)*xl(t),Fu(e)*xl(e))}function gnn(t,e){return Ls(t.d.c+t.d.b/2,e.d.c+e.d.b/2)}function pnn(t,e){return Ls(t.g.c+t.g.b/2,e.g.c+e.g.b/2)}function SXt(t,e,n){n.a?xu(t,e.b-t.f/2):yu(t,e.a-t.g/2)}function AXt(t,e,n,r){this.a=t,this.b=e,this.c=n,this.d=r}function LXt(t,e,n,r){this.a=t,this.b=e,this.c=n,this.d=r}function Zb(t,e,n,r){this.e=t,this.a=e,this.c=n,this.d=r}function MXt(t,e,n,r){this.a=t,this.c=e,this.d=n,this.b=r}function IXt(t,e,n,r){nh(),EJt.call(this,e,n,r),this.a=t}function DXt(t,e,n,r){nh(),EJt.call(this,e,n,r),this.a=t}function OXt(t,e){this.a=t,xQe.call(this,t,u(t.d,15).Zc(e))}function irt(t){this.f=t,this.c=this.f.e,t.f>0&&Vse(this)}function NXt(t,e,n,r){this.b=t,this.c=r,Get.call(this,e,n)}function PXt(t){return Qn(t.b=0&&hn(t.substr(n,e.length),e)}function zp(t,e,n,r,s,o,h){return new Art(t.e,e,n,r,s,o,h)}function ZXt(t,e,n,r,s,o){this.a=t,eit.call(this,e,n,r,s,o)}function JXt(t,e,n,r,s,o){this.a=t,eit.call(this,e,n,r,s,o)}function tQt(t,e){this.g=t,this.d=ct(ot(o0,1),zg,10,0,[e])}function Sg(t,e){this.e=t,this.a=Xn,this.b=Eue(e),this.c=e}function eQt(t,e){xj.call(this),Rmt(this),this.a=t,this.c=e}function eI(t,e,n,r){Ji(t.c[e.g],n.g,r),Ji(t.c[n.g],e.g,r)}function urt(t,e,n,r){Ji(t.c[e.g],e.g,n),Ji(t.b[e.g],e.g,r)}function Bnn(){return lI(),ct(ot(zCt,1),ae,376,0,[bht,DO])}function Rnn(){return bI(),ct(ot(OTt,1),ae,479,0,[DTt,FG])}function jnn(){return TI(),ct(ot(MTt,1),ae,419,0,[NG,LTt])}function $nn(){return D$(),ct(ot(kTt,1),ae,422,0,[xTt,vlt])}function znn(){return x$(),ct(ot(UTt,1),ae,420,0,[Dlt,VTt])}function qnn(){return yI(),ct(ot(BCt,1),ae,421,0,[dht,ght])}function Hnn(){return BC(),ct(ot(bme,1),ae,523,0,[NS,OS])}function Gnn(){return Vf(),ct(ot($me,1),ae,520,0,[Uy,pb])}function Vnn(){return dd(),ct(ot(Eme,1),ae,516,0,[Rw,Kg])}function Unn(){return E1(),ct(ot(Cme,1),ae,515,0,[j2,z1])}function Wnn(){return qv(),ct(ot(Wme,1),ae,455,0,[bb,e5])}function Knn(){return v$(),ct(ot(h_t,1),ae,425,0,[Iht,l_t])}function Ynn(){return d$(),ct(ot(u_t,1),ae,480,0,[Mht,c_t])}function Xnn(){return iz(),ct(ot(f_t,1),ae,495,0,[TV,E7])}function Qnn(){return N$(),ct(ot(g_t,1),ae,426,0,[d_t,Pht])}function Znn(){return NI(),ct(ot(vSt,1),ae,429,0,[OV,bSt])}function Jnn(){return hI(),ct(ot(Y_t,1),ae,430,0,[Ght,IV])}function trn(){return Nz(),ct(ot(NEt,1),ae,428,0,[Iut,OEt])}function ern(){return $$(),ct(ot(FEt,1),ae,427,0,[PEt,Dut])}function nrn(){return z$(),ct(ot(l7t,1),ae,424,0,[Hut,rG])}function rrn(){return q8(),ct(ot(jbe,1),ae,511,0,[pO,nlt])}function c$(t,e,n,r){return n>=0?t.jh(e,n,r):t.Sg(null,n,r)}function lrt(t){return t.b.b==0?t.a.$e():knt(t.b)}function irn(t){if(t.p!=5)throw rt(new Iu);return Sr(t.f)}function srn(t){if(t.p!=5)throw rt(new Iu);return Sr(t.k)}function Dwt(t){return Gt(t.a)===Gt((hit(),_ft))&&a3n(t),t.a}function nQt(t){this.a=u(Ar(t),271),this.b=(vn(),new C2t(t))}function rQt(t,e){hpt(this,new $e(t.a,t.b)),XB(this,UM(e))}function qv(){qv=Z,bb=new $bt(d6,0),e5=new $bt(g6,1)}function dd(){dd=Z,Rw=new Rbt(g6,0),Kg=new Rbt(d6,1)}function Hv(){pKe.call(this,new kx(Qm(12))),x2t(!0),this.a=2}function hrt(t,e,n){gi(),vv.call(this,t),this.b=e,this.a=n}function Owt(t,e,n){nh(),oR.call(this,e),this.a=t,this.b=n}function iQt(t){xj.call(this),Rmt(this),this.a=t,this.c=!0}function sQt(t){var e;e=t.c.d.b,t.b=e,t.a=t.c.d,e.a=t.c.d.b=t}function u$(t){var e;fon(t.a),bUt(t.a),e=new tr(t.a),c3t(e)}function arn(t,e){gue(t,!0),mu(t.e.wf(),new bvt(t,!0,e))}function l$(t,e){return RZt(e),uon(t,Pt(Tr,Xr,25,e,15,1),e)}function orn(t,e){return jx(),t==ts(Zd(e))||t==ts(Xp(e))}function Fc(t,e){return e==null?ec(Ao(t.f,null)):U9(t.g,e)}function crn(t){return t.b==0?null:(Qn(t.b!=0),ch(t,t.a.a))}function ps(t){return Math.max(Math.min(t,vi),-2147483648)|0}function urn(t,e){var n=xut[t.charCodeAt(0)];return n??t}function h$(t,e){return r$(t,"set1"),r$(e,"set2"),new eGt(t,e)}function lrn(t,e){var n;return n=ion(t.f,e),Li(mj(n),t.f.d)}function IC(t,e){var n,r;return n=e,r=new $t,nhe(t,n,r),r.d}function frt(t,e,n,r){var s;s=new UWt,e.a[n.g]=s,Nx(t.b,r,s)}function Nwt(t,e,n){var r;r=t.Yg(e),r>=0?t.sh(r,n):E5t(t,e,n)}function Q3(t,e,n){g$(),t&&ki(Eft,t,e),t&&ki(cN,t,n)}function aQt(t,e,n){this.i=new le,this.b=t,this.g=e,this.a=n}function f$(t,e,n){this.c=new le,this.e=t,this.f=e,this.b=n}function Pwt(t,e,n){this.a=new le,this.e=t,this.f=e,this.c=n}function oQt(t,e){uj(this),this.f=e,this.g=t,n$(this),this._d()}function nI(t,e){var n;n=t.q.getHours(),t.q.setDate(e),y_(t,n)}function cQt(t,e){var n;for(Ar(e),n=t.a;n;n=n.c)e.Od(n.g,n.i)}function uQt(t){var e;return e=new xR(Qm(t.length)),_yt(e,t),e}function hrn(t){function e(){}return e.prototype=t||{},new e}function frn(t,e){return Rne(t,e)?(Fee(t),!0):!1}function D0(t,e){if(e==null)throw rt(new L9);return uhn(t,e)}function drn(t){if(t.qe())return null;var e=t.n;return $H[e]}function rI(t){return t.Db>>16!=3?null:u(t.Cb,33)}function k1(t){return t.Db>>16!=9?null:u(t.Cb,33)}function lQt(t){return t.Db>>16!=6?null:u(t.Cb,79)}function hQt(t){return t.Db>>16!=7?null:u(t.Cb,235)}function fQt(t){return t.Db>>16!=7?null:u(t.Cb,160)}function ts(t){return t.Db>>16!=11?null:u(t.Cb,33)}function dQt(t,e){var n;return n=t.Yg(e),n>=0?t.lh(n):zst(t,e)}function gQt(t,e){var n;return n=new $vt(e),pae(n,t),new Pu(n)}function Fwt(t){var e;return e=t.d,e=t.si(t.f),Mr(t,e),e.Ob()}function pQt(t,e){return t.b+=e.b,t.c+=e.c,t.d+=e.d,t.a+=e.a,t}function drt(t,e){return b.Math.abs(t)0}function bQt(){this.a=new A0,this.e=new qs,this.g=0,this.i=0}function vQt(t){this.a=t,this.b=Pt(dme,te,1944,t.e.length,0,2)}function grt(t,e,n){var r;r=ire(t,e,n),t.b=new rz(r.c.length)}function E1(){E1=Z,j2=new Bbt(yot,0),z1=new Bbt("UP",1)}function d$(){d$=Z,Mht=new zbt(I1e,0),c_t=new zbt("FAN",1)}function g$(){g$=Z,Eft=new Cr,cN=new Cr,NYe(Lge,new XT)}function prn(t){if(t.p!=0)throw rt(new Iu);return aC(t.f,0)}function brn(t){if(t.p!=0)throw rt(new Iu);return aC(t.k,0)}function wQt(t){return t.Db>>16!=3?null:u(t.Cb,147)}function C8(t){return t.Db>>16!=6?null:u(t.Cb,235)}function Vm(t){return t.Db>>16!=17?null:u(t.Cb,26)}function mQt(t,e){var n=t.a=t.a||[];return n[e]||(n[e]=t.le(e))}function vrn(t,e){var n;return n=t.a.get(e),n??new Array}function wrn(t,e){var n;n=t.q.getHours(),t.q.setMonth(e),y_(t,n)}function xo(t,e,n){return e==null?su(t.f,null,n):nw(t.g,e,n)}function DC(t,e,n,r,s,o){return new F0(t.e,e,t.aj(),n,r,s,o)}function iI(t,e,n){return t.a=Dl(t.a,0,e)+(""+n)+OM(t.a,e),t}function mrn(t,e,n){return ue(t.a,(Qj(),hst(e,n),new _v(e,n))),t}function Bwt(t){return E2t(t.c),t.e=t.a=t.c,t.c=t.c.c,++t.d,t.a.f}function yQt(t){return E2t(t.e),t.c=t.a=t.e,t.e=t.e.e,--t.d,t.a.f}function sa(t,e){t.d&&vu(t.d.e,t),t.d=e,t.d&&ue(t.d.e,t)}function Da(t,e){t.c&&vu(t.c.g,t),t.c=e,t.c&&ue(t.c.g,t)}function ko(t,e){t.c&&vu(t.c.a,t),t.c=e,t.c&&ue(t.c.a,t)}function Uo(t,e){t.i&&vu(t.i.j,t),t.i=e,t.i&&ue(t.i.j,t)}function xQt(t,e,n){this.a=e,this.c=t,this.b=(Ar(n),new Pu(n))}function kQt(t,e,n){this.a=e,this.c=t,this.b=(Ar(n),new Pu(n))}function EQt(t,e){this.a=t,this.c=nc(this.a),this.b=new o$(e)}function yrn(t){var e;return d2(t),e=new qs,Ri(t,new Ve(e))}function Um(t,e){if(t<0||t>e)throw rt(new mo(qxt+t+Hxt+e))}function Rwt(t,e){return dYt(t.a,e)?cwt(t,u(e,22).g,null):null}function xrn(t){return Iit(),Fn(),u(t.a,81).d.e!=0}function TQt(){TQt=Z,gge=Wr((dR(),ct(ot(dge,1),ae,538,0,[mut])))}function CQt(){CQt=Z,tme=Ku(new Hs,(Wa(),Io),(ro(),bO))}function jwt(){jwt=Z,eme=Ku(new Hs,(Wa(),Io),(ro(),bO))}function _Qt(){_Qt=Z,rme=Ku(new Hs,(Wa(),Io),(ro(),bO))}function SQt(){SQt=Z,wme=bi(new Hs,(Wa(),Io),(ro(),fS))}function Ol(){Ol=Z,xme=bi(new Hs,(Wa(),Io),(ro(),fS))}function AQt(){AQt=Z,kme=bi(new Hs,(Wa(),Io),(ro(),fS))}function prt(){prt=Z,Sme=bi(new Hs,(Wa(),Io),(ro(),fS))}function LQt(){LQt=Z,dye=Ku(new Hs,(uE(),FS),(f_(),xht))}function t2(t,e,n,r){this.c=t,this.d=r,vrt(this,e),wrt(this,n)}function zx(t){this.c=new Qi,this.b=t.b,this.d=t.c,this.a=t.a}function brt(t){this.a=b.Math.cos(t),this.b=b.Math.sin(t)}function vrt(t,e){t.a&&vu(t.a.k,t),t.a=e,t.a&&ue(t.a.k,t)}function wrt(t,e){t.b&&vu(t.b.f,t),t.b=e,t.b&&ue(t.b.f,t)}function MQt(t,e){Men(t,t.b,t.c),u(t.b.b,65),e&&u(e.b,65).b}function krn(t,e){e3t(t,e),Et(t.Cb,88)&&hy(rl(u(t.Cb,88)),2)}function mrt(t,e){Et(t.Cb,88)&&hy(rl(u(t.Cb,88)),4),Xc(t,e)}function p$(t,e){Et(t.Cb,179)&&(u(t.Cb,179).tb=null),Xc(t,e)}function Bc(t,e){return to(),Yrt(e)?new Ij(e,t):new DM(e,t)}function Ern(t,e){var n,r;n=e.c,r=n!=null,r&&Bx(t,new Hm(e.c))}function IQt(t){var e,n;return n=(t8(),e=new wv,e),P8(n,t),n}function DQt(t){var e,n;return n=(t8(),e=new wv,e),P8(n,t),n}function OQt(t,e){var n;return n=new Ch(t),e.c[e.c.length]=n,n}function NQt(t,e){var n;return n=u(ny($x(t.a),e),14),n?n.gc():0}function PQt(t){var e;return d2(t),e=(X3(),X3(),yEt),G$(t,e)}function FQt(t){for(var e;;)if(e=t.Pb(),!t.Ob())return e}function $wt(t,e){dKe.call(this,new kx(Qm(t))),Bl(e,Yhe),this.a=e}function Kd(t,e,n){Hre(e,n,t.gc()),this.c=t,this.a=e,this.b=n-e}function BQt(t,e,n){var r;Hre(e,n,t.c.length),r=n-e,lbt(t.c,e,r)}function Trn(t,e){NUt(t,Sr(Ps(Fp(e,24),Pq)),Sr(Ps(e,Pq)))}function An(t,e){if(t<0||t>=e)throw rt(new mo(qxt+t+Hxt+e))}function Rr(t,e){if(t<0||t>=e)throw rt(new Zpt(qxt+t+Hxt+e))}function _n(t,e){this.b=(On(t),t),this.a=e&yy?e:e|64|bd}function RQt(t){pUt(this),Yzt(this.a,Tyt(b.Math.max(8,t))<<1)}function T1(t){return Ko(ct(ot(Us,1),te,8,0,[t.i.n,t.n,t.a]))}function Crn(){return I1(),ct(ot(ll,1),ae,132,0,[MEt,Gl,Ly])}function _rn(){return Kf(),ct(ot(My,1),ae,232,0,[sc,tu,ac])}function Srn(){return Xu(),ct(ot(Zge,1),ae,461,0,[Sd,cb,mf])}function Arn(){return wu(),ct(ot(tpe,1),ae,462,0,[e1,ub,yf])}function Lrn(){return ew(),ct(ot(A7t,1),ae,423,0,[$4,S7t,Jut])}function Mrn(){return jC(),ct(ot(T7t,1),ae,379,0,[Wut,Uut,Kut])}function Irn(){return YC(),ct(ot(SCt,1),ae,378,0,[oht,_Ct,uV])}function Drn(){return Yx(),ct(ot(TTt,1),ae,314,0,[S6,wO,ETt])}function Orn(){return X$(),ct(ot(_Tt,1),ae,337,0,[CTt,OG,wlt])}function Nrn(){return u2(),ct(ot(g2e,1),ae,450,0,[xlt,u7,G4])}function Prn(){return Jv(),ct(ot(clt,1),ae,361,0,[Aw,hb,Sw])}function Frn(){return B0(),ct(ot(k2e,1),ae,303,0,[yO,U4,A6])}function Brn(){return W8(),ct(ot(Ilt,1),ae,292,0,[Llt,Mlt,mO])}function Rrn(){return so(),ct(ot(Wwe,1),ae,452,0,[MS,Ju,eu])}function jrn(){return j0(),ct(ot(FCt,1),ae,339,0,[gb,PCt,fht])}function $rn(){return uz(),ct(ot($Ct,1),ae,375,0,[RCt,pht,jCt])}function zrn(){return gz(),ct(ot(WCt,1),ae,377,0,[mht,x7,Vy])}function qrn(){return tE(),ct(ot(HCt,1),ae,336,0,[vht,qCt,IS])}function Hrn(){return oz(),ct(ot(UCt,1),ae,338,0,[VCt,wht,GCt])}function Grn(){return Zv(),ct(ot(hme,1),ae,454,0,[OO,DS,dV])}function Vrn(){return Cz(),ct(ot(wye,1),ae,442,0,[Nht,Dht,Oht])}function Urn(){return RI(),ct(ot(v_t,1),ae,380,0,[CV,p_t,b_t])}function Wrn(){return Tz(),ct(ot(P_t,1),ae,381,0,[N_t,$ht,O_t])}function Krn(){return cz(),ct(ot(I_t,1),ae,293,0,[jht,M_t,L_t])}function Yrn(){return GI(),ct(ot(zht,1),ae,437,0,[AV,LV,MV])}function Xrn(){return $0(),ct(ot(TAt,1),ae,334,0,[HV,Zg,YS])}function Qrn(){return A1(),ct(ot(fAt,1),ae,272,0,[_7,Yy,S7])}function Zrn(t,e){return mbn(t,e,Et(e,99)&&(u(e,18).Bb&Ya)!=0)}function Jrn(t,e,n){var r;return r=E_(t,e,!1),r.b<=e&&r.a<=n}function jQt(t,e,n){var r;r=new CQ,r.b=e,r.a=n,++e.b,ue(t.d,r)}function tin(t,e){var n;return n=(On(t),t).g,P2t(!!n),On(e),n(e)}function zwt(t,e){var n,r;return r=v8(t,e),n=t.a.Zc(r),new tGt(t,n)}function ein(t){return t.Db>>16!=6?null:u(Gst(t),235)}function nin(t){if(t.p!=2)throw rt(new Iu);return Sr(t.f)&ms}function rin(t){if(t.p!=2)throw rt(new Iu);return Sr(t.k)&ms}function iin(t){return t.a==(L8(),oU)&&_tt(t,Pbn(t.g,t.b)),t.a}function qx(t){return t.d==(L8(),oU)&&E9(t,Awn(t.g,t.b)),t.d}function J(t){return Qn(t.ar?1:0}function $Qt(t,e){var n,r;return n=Grt(e),r=n,u(Jn(t.c,r),19).a}function zQt(t,e){var n;for(n=t+"";n.length0&&t.a[--t.d]==0;);t.a[t.d++]==0&&(t.e=0)}function aZt(t){return t.a?t.e.length==0?t.a.a:t.a.a+(""+t.e):t.c}function pin(t){return!!t.a&&il(t.a.a).i!=0&&!(t.b&&cst(t.b))}function bin(t){return!!t.u&&Lc(t.u.a).i!=0&&!(t.n&&ost(t.n))}function oZt(t){return _nt(t.e.Hd().gc()*t.c.Hd().gc(),16,new ox(t))}function vin(t,e){return BYt(ku(t.q.getTime()),ku(e.q.getTime()))}function gd(t){return u(D1(t,Pt(tlt,Fot,17,t.c.length,0,1)),474)}function sI(t){return u(D1(t,Pt(o0,zg,10,t.c.length,0,1)),193)}function win(t){return Ol(),!Va(t)&&!(!Va(t)&&t.c.i.c==t.d.i.c)}function cZt(t,e,n){var r;r=(Ar(t),new Pu(t)),Kfn(new xQt(r,e,n))}function aI(t,e,n){var r;r=(Ar(t),new Pu(t)),Yfn(new kQt(r,e,n))}function uZt(t,e){var n;return n=1-e,t.a[n]=nz(t.a[n],n),nz(t,e)}function lZt(t,e){var n;t.e=new Vpt,n=gy(e),Xs(n,t.c),rue(t,n,0)}function aa(t,e,n,r){var s;s=new WF,s.a=e,s.b=n,s.c=r,ni(t.a,s)}function xe(t,e,n,r){var s;s=new WF,s.a=e,s.b=n,s.c=r,ni(t.b,s)}function ff(t){var e,n,r;return e=new GYt,n=uat(e,t),r4n(e),r=n,r}function Wwt(){var t,e,n;return e=(n=(t=new wv,t),n),ue(uLt,e),e}function w$(t){return t.j.c=Pt(Xn,Ie,1,0,5,1),Twt(t.c),Zen(t.a),t}function Z3(t){return q9(),Et(t.g,10)?u(t.g,10):null}function min(t){return Y3(t).dc()?!1:(wXe(t,new ht),!0)}function yin(t){if(!("stack"in t))try{throw t}catch{}return t}function oI(t,e){if(t<0||t>=e)throw rt(new mo(Ogn(t,e)));return t}function hZt(t,e,n){if(t<0||en)throw rt(new mo(ign(t,e,n)))}function Ert(t,e){if(Ns(t.a,e),e.d)throw rt(new Go(vfe));e.d=t}function Trt(t,e){if(e.$modCount!=t.$modCount)throw rt(new eh)}function fZt(t,e){return Et(e,42)?dst(t.a,u(e,42)):!1}function dZt(t,e){return Et(e,42)?dst(t.a,u(e,42)):!1}function gZt(t,e){return Et(e,42)?dst(t.a,u(e,42)):!1}function xin(t,e){return t.a<=t.b?(e.ud(t.a++),!0):!1}function Vv(t){var e;return Bo(t)?(e=t,e==-0?0:e):Man(t)}function m$(t){var e;return $p(t),e=new Ke,B3(t.a,new bn(e)),e}function pZt(t){var e;return $p(t),e=new Ge,B3(t.a,new pe(e)),e}function ha(t,e){this.a=t,fx.call(this,t),Um(e,t.gc()),this.b=e}function Kwt(t){this.e=t,this.b=this.e.a.entries(),this.a=new Array}function kin(t){return _nt(t.e.Hd().gc()*t.c.Hd().gc(),273,new GB(t))}function y$(t){return new Yc((Bl(t,Bat),q$(Oa(Oa(5,t),t/10|0))))}function bZt(t){return u(D1(t,Pt(Fbe,Kfe,11,t.c.length,0,1)),1943)}function Ein(t,e,n){return n.f.c.length>0?hwt(t.a,e,n):hwt(t.b,e,n)}function Tin(t,e,n){t.d&&vu(t.d.e,t),t.d=e,t.d&&$m(t.d.e,n,t)}function Crt(t,e){v5n(e,t),Mvt(t.d),Mvt(u(Q(t,(Te(),nV)),207))}function NC(t,e){b5n(e,t),Lvt(t.d),Lvt(u(Q(t,(Te(),nV)),207))}function Uv(t,e){var n,r;return n=D0(t,e),r=null,n&&(r=n.fe()),r}function _8(t,e){var n,r;return n=Xm(t,e),r=null,n&&(r=n.ie()),r}function PC(t,e){var n,r;return n=D0(t,e),r=null,n&&(r=n.ie()),r}function O0(t,e){var n,r;return n=D0(t,e),r=null,n&&(r=j4t(n)),r}function Cin(t,e,n){var r;return r=oE(n),vq(t.g,r,e),vq(t.i,e,n),e}function _in(t,e,n){var r;r=thn();try{return IQe(t,e,n)}finally{Bin(r)}}function vZt(t){var e;e=t.Wg(),this.a=Et(e,69)?u(e,69).Zh():e.Kc()}function Hs(){Iqt.call(this),this.j.c=Pt(Xn,Ie,1,0,5,1),this.a=-1}function Ywt(t,e,n,r){this.d=t,this.n=e,this.g=n,this.o=r,this.p=-1}function wZt(t,e,n,r){this.e=r,this.d=null,this.c=t,this.a=e,this.b=n}function Xwt(t,e,n){this.d=new sR(this),this.e=t,this.i=e,this.f=n}function x$(){x$=Z,Dlt=new Obt(NE,0),VTt=new Obt("TOP_LEFT",1)}function mZt(){mZt=Z,YCt=gXt(de(1),de(4)),KCt=gXt(de(1),de(2))}function yZt(){yZt=Z,c3e=Wr((IR(),ct(ot(o3e,1),ae,551,0,[Hht])))}function xZt(){xZt=Z,a3e=Wr((MR(),ct(ot(K_t,1),ae,482,0,[qht])))}function kZt(){kZt=Z,_3e=Wr((H9(),ct(ot(pSt,1),ae,530,0,[jO])))}function EZt(){EZt=Z,Dpe=Wr((AR(),ct(ot(r7t,1),ae,481,0,[Rut])))}function Sin(){return tw(),ct(ot(Cpe,1),ae,406,0,[aO,sO,Fut,But])}function Ain(){return P$(),ct(ot(KH,1),ae,297,0,[Aut,_Et,SEt,AEt])}function Lin(){return s_(),ct(ot(Mpe,1),ae,394,0,[hO,JH,tG,fO])}function Min(){return n6(),ct(ot(Spe,1),ae,323,0,[cO,oO,uO,lO])}function Iin(){return K8(),ct(ot(Tbe,1),ae,405,0,[_w,Dy,Iy,j4])}function Din(){return dz(),ct(ot(Hbe,1),ae,360,0,[alt,_G,SG,vO])}function TZt(t,e,n,r){return Et(n,54)?new lWt(t,e,n,r):new twt(t,e,n,r)}function Oin(){return M1(),ct(ot(Zbe,1),ae,411,0,[_6,i7,s7,olt])}function Nin(t){var e;return t.j==(be(),mr)&&(e=Uoe(t),Nu(e,Hn))}function Pin(t,e){var n;n=e.a,Da(n,e.c.d),sa(n,e.d.d),Jm(n.a,t.n)}function CZt(t,e){return u(Ov(qj(u(Ai(t.k,e),15).Oc(),z4)),113)}function _Zt(t,e){return u(Ov(Hj(u(Ai(t.k,e),15).Oc(),z4)),113)}function Fin(t){return new _n(Oon(u(t.a.dd(),14).gc(),t.a.cd()),16)}function S8(t){return Et(t,14)?u(t,14).dc():!t.Kc().Ob()}function Hx(t){return q9(),Et(t.g,145)?u(t.g,145):null}function SZt(t){if(t.e.g!=t.b)throw rt(new eh);return!!t.c&&t.d>0}function ti(t){return Qn(t.b!=t.d.c),t.c=t.b,t.b=t.b.a,++t.a,t.c.c}function Qwt(t,e){On(e),Ji(t.a,t.c,e),t.c=t.c+1&t.a.length-1,Ase(t)}function qp(t,e){On(e),t.b=t.b-1&t.a.length-1,Ji(t.a,t.b,e),Ase(t)}function AZt(t,e){var n;for(n=t.j.c.length;n0&&Ic(t.g,0,e,0,t.i),e}function DZt(t,e){NR();var n;return n=u(Jn(nU,t),55),!n||n.wj(e)}function Yin(t){if(t.p!=1)throw rt(new Iu);return Sr(t.f)<<24>>24}function Xin(t){if(t.p!=1)throw rt(new Iu);return Sr(t.k)<<24>>24}function Qin(t){if(t.p!=7)throw rt(new Iu);return Sr(t.k)<<16>>16}function Zin(t){if(t.p!=7)throw rt(new Iu);return Sr(t.f)<<16>>16}function N0(t){var e;for(e=0;t.Ob();)t.Pb(),e=Oa(e,1);return q$(e)}function OZt(t,e){var n;return n=new Lm,t.xd(n),n.a+="..",e.yd(n),n.a}function Jin(t,e,n){var r;r=u(Jn(t.g,n),57),ue(t.a.c,new la(e,r))}function tsn(t,e,n){return Pnt(ye(ec(Ao(t.f,e))),ye(ec(Ao(t.f,n))))}function k$(t,e,n){return mq(t,e,n,Et(e,99)&&(u(e,18).Bb&Ya)!=0)}function esn(t,e,n){return EE(t,e,n,Et(e,99)&&(u(e,18).Bb&Ya)!=0)}function nsn(t,e,n){return Cbn(t,e,n,Et(e,99)&&(u(e,18).Bb&Ya)!=0)}function tmt(t,e){return t==(Gn(),Ds)&&e==Ds?4:t==Ds||e==Ds?8:32}function NZt(t,e){return Gt(e)===Gt(t)?"(this Map)":e==null?Tu:$o(e)}function rsn(t,e){return u(e==null?ec(Ao(t.f,null)):U9(t.g,e),281)}function PZt(t,e,n){var r;return r=oE(n),ki(t.b,r,e),ki(t.c,e,n),e}function FZt(t,e){var n;for(n=e;n;)Fm(t,n.i,n.j),n=ts(n);return t}function emt(t,e){var n;return n=JM(d8(new Vrt(t,e))),Oj(new Vrt(t,e)),n}function Yd(t,e){to();var n;return n=u(t,66).Mj(),B0n(n,e),n.Ok(e)}function isn(t,e,n,r,s){var o;o=Mbn(s,n,r),ue(e,Agn(s,o)),m0n(t,s,e)}function BZt(t,e,n){t.i=0,t.e=0,e!=n&&(cre(t,e,n),ore(t,e,n))}function nmt(t,e){var n;n=t.q.getHours(),t.q.setFullYear(e+nb),y_(t,n)}function ssn(t,e,n){if(n){var r=n.ee();t.a[e]=r(n)}else delete t.a[e]}function _rt(t,e,n){if(n){var r=n.ee();n=r(n)}else n=void 0;t.a[e]=n}function RZt(t){if(t<0)throw rt(new Hqt("Negative array size: "+t))}function Lc(t){return t.n||(rl(t),t.n=new vYt(t,ho,t),So(t)),t.n}function FC(t){return Qn(t.a=0&&t.a[n]===e[n];n--);return n<0}function HZt(t,e){J8();var n;return n=t.j.g-e.j.g,n!=0?n:0}function GZt(t,e){return On(e),t.a!=null?Gtn(e.Kb(t.a)):WH}function E$(t){var e;return t?new $vt(t):(e=new A0,lit(e,t),e)}function Pl(t,e){var n;return e.b.Kb(Fte(t,e.c.Ee(),(n=new Dn(e),n)))}function T$(t){E4t(),NUt(this,Sr(Ps(Fp(t,24),Pq)),Sr(Ps(t,Pq)))}function VZt(){VZt=Z,Uge=Wr((Nz(),ct(ot(NEt,1),ae,428,0,[Iut,OEt])))}function UZt(){UZt=Z,Wge=Wr(($$(),ct(ot(FEt,1),ae,427,0,[PEt,Dut])))}function WZt(){WZt=Z,Ype=Wr((z$(),ct(ot(l7t,1),ae,424,0,[Hut,rG])))}function KZt(){KZt=Z,$be=Wr((q8(),ct(ot(jbe,1),ae,511,0,[pO,nlt])))}function YZt(){YZt=Z,d2e=Wr((TI(),ct(ot(MTt,1),ae,419,0,[NG,LTt])))}function XZt(){XZt=Z,v2e=Wr((bI(),ct(ot(OTt,1),ae,479,0,[DTt,FG])))}function QZt(){QZt=Z,Xwe=Wr((lI(),ct(ot(zCt,1),ae,376,0,[bht,DO])))}function ZZt(){ZZt=Z,Uwe=Wr((yI(),ct(ot(BCt,1),ae,421,0,[dht,ght])))}function JZt(){JZt=Z,u2e=Wr((D$(),ct(ot(kTt,1),ae,422,0,[xTt,vlt])))}function tJt(){tJt=Z,T2e=Wr((x$(),ct(ot(UTt,1),ae,420,0,[Dlt,VTt])))}function eJt(){eJt=Z,zme=Wr((Vf(),ct(ot($me,1),ae,520,0,[Uy,pb])))}function nJt(){nJt=Z,vme=Wr((BC(),ct(ot(bme,1),ae,523,0,[NS,OS])))}function rJt(){rJt=Z,Tme=Wr((dd(),ct(ot(Eme,1),ae,516,0,[Rw,Kg])))}function iJt(){iJt=Z,_me=Wr((E1(),ct(ot(Cme,1),ae,515,0,[j2,z1])))}function sJt(){sJt=Z,Kme=Wr((qv(),ct(ot(Wme,1),ae,455,0,[bb,e5])))}function aJt(){aJt=Z,fye=Wr((v$(),ct(ot(h_t,1),ae,425,0,[Iht,l_t])))}function oJt(){oJt=Z,vye=Wr((iz(),ct(ot(f_t,1),ae,495,0,[TV,E7])))}function cJt(){cJt=Z,hye=Wr((d$(),ct(ot(u_t,1),ae,480,0,[Mht,c_t])))}function uJt(){uJt=Z,yye=Wr((N$(),ct(ot(g_t,1),ae,426,0,[d_t,Pht])))}function lJt(){lJt=Z,S3e=Wr((NI(),ct(ot(vSt,1),ae,429,0,[OV,bSt])))}function hJt(){hJt=Z,u3e=Wr((hI(),ct(ot(Y_t,1),ae,430,0,[Ght,IV])))}function BC(){BC=Z,NS=new Fbt("UPPER",0),OS=new Fbt("LOWER",1)}function usn(t,e){var n;n=new mx,Jb(n,"x",e.a),Jb(n,"y",e.b),Bx(t,n)}function lsn(t,e){var n;n=new mx,Jb(n,"x",e.a),Jb(n,"y",e.b),Bx(t,n)}function hsn(t,e){var n,r;r=!1;do n=Jne(t,e),r=r|n;while(n);return r}function smt(t,e){var n,r;for(n=e,r=0;n>0;)r+=t.a[n],n-=n&-n;return r}function fJt(t,e){var n;for(n=e;n;)Fm(t,-n.i,-n.j),n=ts(n);return t}function va(t,e){var n,r;for(On(e),r=t.Kc();r.Ob();)n=r.Pb(),e.td(n)}function dJt(t,e){var n;return n=e.cd(),new _v(n,t.e.pc(n,u(e.dd(),14)))}function hs(t,e,n,r){var s;s=new Ht,s.c=e,s.b=n,s.a=r,r.b=n.a=s,++t.b}function ah(t,e,n){var r;return r=(An(e,t.c.length),t.c[e]),t.c[e]=n,r}function fsn(t,e,n){return u(e==null?su(t.f,null,n):nw(t.g,e,n),281)}function Mrt(t){return t.c&&t.d?qwt(t.c)+"->"+qwt(t.d):"e_"+Iv(t)}function A8(t,e){return(d2(t),j9(new Tn(t,new Lmt(e,t.a)))).sd(JE)}function dsn(){return Wa(),ct(ot(C7t,1),ae,356,0,[Ad,lb,ou,qc,Io])}function gsn(){return be(),ct(ot(Xa,1),xc,61,0,[Zo,Nn,Hn,mr,Bn])}function psn(t){return vR(),function(){return _in(t,this,arguments)}}function bsn(){return Date.now?Date.now():new Date().getTime()}function Va(t){return!t.c||!t.d?!1:!!t.c.i&&t.c.i==t.d.i}function gJt(t){if(!t.c.Sb())throw rt(new lc);return t.a=!0,t.c.Ub()}function cI(t){t.i=0,yM(t.b,null),yM(t.c,null),t.a=null,t.e=null,++t.g}function amt(t){EYe.call(this,t==null?Tu:$o(t),Et(t,78)?u(t,78):null)}function pJt(t){$he(),jzt(this),this.a=new Qi,Oyt(this,t),ni(this.a,t)}function bJt(){Yet(this),this.b=new $e(ss,ss),this.a=new $e(Ts,Ts)}function vJt(t,e){this.c=0,this.b=e,VVt.call(this,t,17493),this.a=this.c}function Irt(t){C$(),!R1&&(this.c=t,this.e=!0,this.a=new le)}function C$(){C$=Z,R1=!0,Fge=!1,Bge=!1,jge=!1,Rge=!1}function omt(t,e){return Et(e,149)?hn(t.c,u(e,149).c):!1}function cmt(t,e){var n;return n=0,t&&(n+=t.f.a/2),e&&(n+=e.f.a/2),n}function Drt(t,e){var n;return n=u(Wv(t.d,e),23),n||u(Wv(t.e,e),23)}function wJt(t){this.b=t,er.call(this,t),this.a=u(In(this.b.a,4),126)}function mJt(t){this.b=t,Mx.call(this,t),this.a=u(In(this.b.a,4),126)}function rl(t){return t.t||(t.t=new Lzt(t),JC(new qqt(t),0,t.t)),t.t}function vsn(){return ao(),ct(ot(WS,1),ae,103,0,[c0,kf,jh,Q0,Z0])}function wsn(){return c4(),ct(ot(QS,1),ae,249,0,[mb,JO,CAt,XS,_At])}function msn(){return Xf(),ct(ot(Qg,1),ae,175,0,[qn,Js,Id,$2,Xg])}function ysn(){return iD(),ct(ot(J_t,1),ae,316,0,[X_t,Vht,Z_t,Uht,Q_t])}function xsn(){return a_(),ct(ot(LCt,1),ae,315,0,[ACt,lht,hht,AS,LS])}function ksn(){return v2(),ct(ot(ATt,1),ae,335,0,[mlt,STt,ylt,pS,gS])}function Esn(){return yE(),ct(ot(r3e,1),ae,355,0,[n5,R6,qS,zS,HS])}function Tsn(){return g4(),ct(ot(t2e,1),ae,363,0,[LG,IG,DG,MG,AG])}function Csn(){return hh(),ct(ot(s9t,1),ae,163,0,[CO,yS,fb,xS,Fy])}function L8(){L8=Z;var t,e;aU=(t8(),e=new lR,e),oU=(t=new Utt,t)}function yJt(t){var e;return t.c||(e=t.r,Et(e,88)&&(t.c=u(e,26))),t.c}function _sn(t){return t.e=3,t.d=t.Yb(),t.e!=2?(t.e=0,!0):!1}function Ort(t){var e,n,r;return e=t&ul,n=t>>22&ul,r=t<0?W0:0,ru(e,n,r)}function Ssn(t){var e,n,r,s;for(n=t,r=0,s=n.length;r0?wie(t,e):$ce(t,-e)}function umt(t,e){return e==0||t.e==0?t:e>0?$ce(t,e):wie(t,-e)}function Lr(t){if(zr(t))return t.c=t.a,t.a.Pb();throw rt(new lc)}function kJt(t){var e,n;return e=t.c.i,n=t.d.i,e.k==(Gn(),xs)&&n.k==xs}function Nrt(t){var e;return e=new zv,Lo(e,t),Jt(e,(Te(),_o),null),e}function Prt(t,e,n){var r;return r=t.Yg(e),r>=0?t._g(r,n,!0):lw(t,e,n)}function lmt(t,e,n,r){var s;for(s=0;se)throw rt(new mo(U4t(t,e,"index")));return t}function Frt(t,e,n,r){var s;return s=Pt(Tr,Xr,25,e,15,1),$dn(s,t,e,n,r),s}function Lsn(t,e){var n;n=t.q.getHours()+(e/60|0),t.q.setMinutes(e),y_(t,n)}function Msn(t,e){return b.Math.min(Hp(e.a,t.d.d.c),Hp(e.b,t.d.d.c))}function Ux(t,e){return ea(e)?e==null?u5t(t.f,null):Pne(t.g,e):u5t(t.f,e)}function S1(t){this.c=t,this.a=new S(this.c.a),this.b=new S(this.c.b)}function _$(){this.e=new le,this.c=new le,this.d=new le,this.b=new le}function SJt(){this.g=new Apt,this.b=new Apt,this.a=new le,this.k=new le}function AJt(t,e,n){this.a=t,this.c=e,this.d=n,ue(e.e,this),ue(n.b,this)}function LJt(t,e){GVt.call(this,e.rd(),e.qd()&-6),On(t),this.a=t,this.b=e}function MJt(t,e){VVt.call(this,e.rd(),e.qd()&-6),On(t),this.a=t,this.b=e}function vmt(t,e){Get.call(this,e.rd(),e.qd()&-6),On(t),this.a=t,this.b=e}function S$(t,e,n){this.a=t,this.b=e,this.c=n,ue(t.t,this),ue(e.i,this)}function A$(){this.b=new Qi,this.a=new Qi,this.b=new Qi,this.a=new Qi}function L$(){L$=Z,GS=new Gi("org.eclipse.elk.labels.labelManager")}function IJt(){IJt=Z,bTt=new Os("separateLayerConnections",(dz(),alt))}function Vf(){Vf=Z,Uy=new jbt("REGULAR",0),pb=new jbt("CRITICAL",1)}function lI(){lI=Z,bht=new Pbt("STACKED",0),DO=new Pbt("SEQUENCED",1)}function hI(){hI=Z,Ght=new Vbt("FIXED",0),IV=new Vbt("CENTER_NODE",1)}function Isn(t,e){var n;return n=P3n(t,e),t.b=new rz(n.c.length),Wyn(t,n)}function Dsn(t,e,n){var r;return++t.e,--t.f,r=u(t.d[e].$c(n),133),r.dd()}function DJt(t){var e;return t.a||(e=t.r,Et(e,148)&&(t.a=u(e,148))),t.a}function wmt(t){if(t.a){if(t.e)return wmt(t.e)}else return t;return null}function Osn(t,e){return t.pe.p?-1:0}function M$(t,e){return On(e),t.c=0,"Initial capacity must not be negative")}function PJt(){PJt=Z,Qge=Wr((Kf(),ct(ot(My,1),ae,232,0,[sc,tu,ac])))}function FJt(){FJt=Z,Jge=Wr((Xu(),ct(ot(Zge,1),ae,461,0,[Sd,cb,mf])))}function BJt(){BJt=Z,epe=Wr((wu(),ct(ot(tpe,1),ae,462,0,[e1,ub,yf])))}function RJt(){RJt=Z,$ge=Wr((I1(),ct(ot(ll,1),ae,132,0,[MEt,Gl,Ly])))}function jJt(){jJt=Z,bbe=Wr((jC(),ct(ot(T7t,1),ae,379,0,[Wut,Uut,Kut])))}function $Jt(){$Jt=Z,Ibe=Wr((ew(),ct(ot(A7t,1),ae,423,0,[$4,S7t,Jut])))}function zJt(){zJt=Z,l2e=Wr((Yx(),ct(ot(TTt,1),ae,314,0,[S6,wO,ETt])))}function qJt(){qJt=Z,h2e=Wr((X$(),ct(ot(_Tt,1),ae,337,0,[CTt,OG,wlt])))}function HJt(){HJt=Z,p2e=Wr((u2(),ct(ot(g2e,1),ae,450,0,[xlt,u7,G4])))}function GJt(){GJt=Z,a2e=Wr((Jv(),ct(ot(clt,1),ae,361,0,[Aw,hb,Sw])))}function VJt(){VJt=Z,E2e=Wr((B0(),ct(ot(k2e,1),ae,303,0,[yO,U4,A6])))}function UJt(){UJt=Z,x2e=Wr((W8(),ct(ot(Ilt,1),ae,292,0,[Llt,Mlt,mO])))}function WJt(){WJt=Z,zwe=Wr((YC(),ct(ot(SCt,1),ae,378,0,[oht,_Ct,uV])))}function KJt(){KJt=Z,Ywe=Wr((uz(),ct(ot($Ct,1),ae,375,0,[RCt,pht,jCt])))}function YJt(){YJt=Z,Vwe=Wr((j0(),ct(ot(FCt,1),ae,339,0,[gb,PCt,fht])))}function XJt(){XJt=Z,Kwe=Wr((so(),ct(ot(Wwe,1),ae,452,0,[MS,Ju,eu])))}function QJt(){QJt=Z,Jwe=Wr((gz(),ct(ot(WCt,1),ae,377,0,[mht,x7,Vy])))}function ZJt(){ZJt=Z,Qwe=Wr((tE(),ct(ot(HCt,1),ae,336,0,[vht,qCt,IS])))}function JJt(){JJt=Z,Zwe=Wr((oz(),ct(ot(UCt,1),ae,338,0,[VCt,wht,GCt])))}function tte(){tte=Z,fme=Wr((Zv(),ct(ot(hme,1),ae,454,0,[OO,DS,dV])))}function ete(){ete=Z,mye=Wr((Cz(),ct(ot(wye,1),ae,442,0,[Nht,Dht,Oht])))}function nte(){nte=Z,xye=Wr((RI(),ct(ot(v_t,1),ae,380,0,[CV,p_t,b_t])))}function rte(){rte=Z,Rye=Wr((Tz(),ct(ot(P_t,1),ae,381,0,[N_t,$ht,O_t])))}function ite(){ite=Z,Bye=Wr((cz(),ct(ot(I_t,1),ae,293,0,[jht,M_t,L_t])))}function ste(){ste=Z,s3e=Wr((GI(),ct(ot(zht,1),ae,437,0,[AV,LV,MV])))}function ate(){ate=Z,c4e=Wr(($0(),ct(ot(TAt,1),ae,334,0,[HV,Zg,YS])))}function ote(){ote=Z,i4e=Wr((A1(),ct(ot(fAt,1),ae,272,0,[_7,Yy,S7])))}function $sn(){return oa(),ct(ot(SAt,1),ae,98,0,[yb,H1,L7,G2,h0,Vc])}function r2(t,e){return!t.o&&(t.o=new Tl((Zc(),Eb),$w,t,0)),Wit(t.o,e)}function zsn(t){return!t.g&&(t.g=new Tk),!t.g.d&&(t.g.d=new _zt(t)),t.g.d}function qsn(t){return!t.g&&(t.g=new Tk),!t.g.a&&(t.g.a=new Szt(t)),t.g.a}function Hsn(t){return!t.g&&(t.g=new Tk),!t.g.b&&(t.g.b=new Czt(t)),t.g.b}function fI(t){return!t.g&&(t.g=new Tk),!t.g.c&&(t.g.c=new Azt(t)),t.g.c}function Gsn(t,e,n){var r,s;for(s=new U8(e,t),r=0;rn||e=0?t._g(n,!0,!0):lw(t,e,!0)}function oan(t,e){return Ls(Xt(ye(Q(t,(se(),Dw)))),Xt(ye(Q(e,Dw))))}function gte(){gte=Z,gye=aw(aw(OR(new Hs,(uE(),PS)),(f_(),wV)),kht)}function can(t,e,n){var r;return r=ire(t,e,n),t.b=new rz(r.c.length),N5t(t,r)}function uan(t){if(t.b<=0)throw rt(new lc);return--t.b,t.a-=t.c.c,de(t.a)}function lan(t){var e;if(!t.a)throw rt(new wXt);return e=t.a,t.a=ts(t.a),e}function han(t){for(;!t.a;)if(!nKt(t.c,new ze(t)))return!1;return!0}function Kx(t){var e;return Ar(t),Et(t,198)?(e=u(t,198),e):new stt(t)}function fan(t){O$(),u(t.We((ci(),Ky)),174).Fc((Qu(),tN)),t.Ye(hft,null)}function O$(){O$=Z,M3e=new wZ,D3e=new mZ,I3e=Xcn((ci(),hft),M3e,vb,D3e)}function N$(){N$=Z,d_t=new Gbt("LEAF_NUMBER",0),Pht=new Gbt("NODE_SIZE",1)}function dan(t,e,n){t.a=e,t.c=n,t.b.a.$b(),_h(t.d),t.e.a.c=Pt(Xn,Ie,1,0,5,1)}function Hrt(t){t.a=Pt(Tr,Xr,25,t.b+1,15,1),t.c=Pt(Tr,Xr,25,t.b,15,1),t.d=0}function gan(t,e){t.a.ue(e.d,t.b)>0&&(ue(t.c,new Ovt(e.c,e.d,t.d)),t.b=e.d)}function Amt(t,e){if(t.g==null||e>=t.i)throw rt(new Vet(e,t.i));return t.g[e]}function pte(t,e,n){if(Q8(t,n),n!=null&&!t.wj(n))throw rt(new Htt);return n}function bte(t){var e;if(t.Ek())for(e=t.i-1;e>=0;--e)St(t,e);return Jwt(t)}function pan(t){var e,n;if(!t.b)return null;for(n=t.b;e=n.a[0];)n=e;return n}function ban(t,e){var n,r;return RZt(e),n=(r=t.slice(0,e),Mmt(r,t)),n.length=e,n}function D8(t,e,n,r){var s;r=(X3(),r||mEt),s=t.slice(e,n),W4t(s,t,e,n,-e,r)}function oh(t,e,n,r,s){return e<0?lw(t,n,r):u(n,66).Nj().Pj(t,t.yh(),e,r,s)}function van(t){return Et(t,172)?""+u(t,172).a:t==null?null:$o(t)}function wan(t){return Et(t,172)?""+u(t,172).a:t==null?null:$o(t)}function vte(t,e){if(e.a)throw rt(new Go(vfe));Ns(t.a,e),e.a=t,!t.j&&(t.j=e)}function Lmt(t,e){Get.call(this,e.rd(),e.qd()&-16449),On(t),this.a=t,this.c=e}function wte(t,e){var n,r;return r=e/t.c.Hd().gc()|0,n=e%t.c.Hd().gc(),Wx(t,r,n)}function Xu(){Xu=Z,Sd=new vet(d6,0),cb=new vet(NE,1),mf=new vet(g6,2)}function P$(){P$=Z,Aut=new BR("All",0),_Et=new dUt,SEt=new CUt,AEt=new gUt}function mte(){mte=Z,Nge=Wr((P$(),ct(ot(KH,1),ae,297,0,[Aut,_Et,SEt,AEt])))}function yte(){yte=Z,Cbe=Wr((K8(),ct(ot(Tbe,1),ae,405,0,[_w,Dy,Iy,j4])))}function xte(){xte=Z,_pe=Wr((tw(),ct(ot(Cpe,1),ae,406,0,[aO,sO,Fut,But])))}function kte(){kte=Z,Ape=Wr((n6(),ct(ot(Spe,1),ae,323,0,[cO,oO,uO,lO])))}function Ete(){Ete=Z,Ipe=Wr((s_(),ct(ot(Mpe,1),ae,394,0,[hO,JH,tG,fO])))}function Tte(){Tte=Z,Yme=Wr((uE(),ct(ot(ZCt,1),ae,393,0,[vV,PS,PO,FS])))}function Cte(){Cte=Z,Gbe=Wr((dz(),ct(ot(Hbe,1),ae,360,0,[alt,_G,SG,vO])))}function _te(){_te=Z,Fye=Wr((Gz(),ct(ot(A_t,1),ae,340,0,[Rht,__t,S_t,C_t])))}function Ste(){Ste=Z,Jbe=Wr((M1(),ct(ot(Zbe,1),ae,411,0,[_6,i7,s7,olt])))}function Ate(){Ate=Z,qwe=Wr((sy(),ct(ot(uht,1),ae,197,0,[lV,cht,t5,J4])))}function Lte(){Lte=Z,C4e=Wr((Cl(),ct(ot(T4e,1),ae,396,0,[Yl,PAt,NAt,FAt])))}function Mte(){Mte=Z,l4e=Wr((jl(),ct(ot(u4e,1),ae,285,0,[ZO,u0,wb,QO])))}function Ite(){Ite=Z,s4e=Wr((q0(),ct(ot(pft,1),ae,218,0,[gft,XO,A7,H6])))}function Dte(){Dte=Z,k4e=Wr((Az(),ct(ot(OAt,1),ae,311,0,[wft,MAt,DAt,IAt])))}function Ote(){Ote=Z,y4e=Wr((_l(),ct(ot(tA,1),ae,374,0,[nN,V2,eN,Xy])))}function Nte(){Nte=Z,yq(),vLt=ss,S5e=Ts,wLt=new D3(ss),A5e=new D3(Ts)}function bI(){bI=Z,DTt=new Dbt(K0,0),FG=new Dbt("IMPROVE_STRAIGHTNESS",1)}function man(t,e){return g8(),ue(t,new la(e,de(e.e.c.length+e.g.c.length)))}function yan(t,e){return g8(),ue(t,new la(e,de(e.e.c.length+e.g.c.length)))}function Mmt(t,e){return xI(e)!=10&&ct(sl(e),e.hm,e.__elementTypeId$,xI(e),t),t}function vu(t,e){var n;return n=Ro(t,e,0),n==-1?!1:(Ag(t,n),!0)}function Pte(t,e){var n;return n=u(Ux(t.e,e),387),n?(Fvt(n),n.e):null}function O8(t){var e;return Bo(t)&&(e=0-t,!isNaN(e))?e:Vp(Y8(t))}function Ro(t,e,n){for(;n=0?jz(t,n,!0,!0):lw(t,e,!0)}function Pmt(t,e){q9();var n,r;return n=Hx(t),r=Hx(e),!!n&&!!r&&!Qie(n.k,r.k)}function Ean(t,e){yu(t,e==null||Ej((On(e),e))||isNaN((On(e),e))?0:(On(e),e))}function Tan(t,e){xu(t,e==null||Ej((On(e),e))||isNaN((On(e),e))?0:(On(e),e))}function Can(t,e){Qv(t,e==null||Ej((On(e),e))||isNaN((On(e),e))?0:(On(e),e))}function _an(t,e){Xv(t,e==null||Ej((On(e),e))||isNaN((On(e),e))?0:(On(e),e))}function $te(t){(this.q?this.q:(vn(),vn(),a0)).Ac(t.q?t.q:(vn(),vn(),a0))}function San(t,e){return Et(e,99)&&u(e,18).Bb&Ya?new Uet(e,t):new U8(e,t)}function Aan(t,e){return Et(e,99)&&u(e,18).Bb&Ya?new Uet(e,t):new U8(e,t)}function zte(t,e){e7t=new gp,Lpe=e,cS=t,u(cS.b,65),xmt(cS,e7t,null),Nle(cS)}function Krt(t,e,n){var r;return r=t.g[e],fC(t,e,t.oi(e,n)),t.gi(e,n,r),t.ci(),r}function j$(t,e){var n;return n=t.Xc(e),n>=0?(t.$c(n),!0):!1}function Yrt(t){var e;return t.d!=t.r&&(e=Lh(t),t.e=!!e&&e.Cj()==k0e,t.d=e),t.e}function Xrt(t,e){var n;for(Ar(t),Ar(e),n=!1;e.Ob();)n=n|t.Fc(e.Pb());return n}function Wv(t,e){var n;return n=u(Jn(t.e,e),387),n?(OUt(t,n),n.e):null}function qte(t){var e,n;return e=t/60|0,n=t%60,n==0?""+e:""+e+":"+(""+n)}function Wo(t,e){var n,r;return d2(t),r=new vmt(e,t.a),n=new sKt(r),new Tn(t,n)}function Xm(t,e){var n=t.a[e],r=(pit(),Eut)[typeof n];return r?r(n):jyt(typeof n)}function Lan(t){switch(t.g){case 0:return vi;case 1:return-1;default:return 0}}function Man(t){return n4t(t,(N8(),tEt))<0?-UXe(Y8(t)):t.l+t.m*f6+t.h*x2}function xI(t){return t.__elementTypeCategory$==null?10:t.__elementTypeCategory$}function Qrt(t){var e;return e=t.b.c.length==0?null:Fe(t.b,0),e!=null&&oit(t,0),e}function Hte(t,e){for(;e[0]=0;)++e[0]}function kI(t,e){this.e=e,this.a=Fne(t),this.a<54?this.f=Vv(t):this.c=KI(t)}function Gte(t,e,n,r){gi(),vv.call(this,26),this.c=t,this.a=e,this.d=n,this.b=r}function Xd(t,e,n){var r,s;for(r=10,s=0;st.a[r]&&(r=n);return r}function Fan(t,e){var n;return n=rw(t.e.c,e.e.c),n==0?Ls(t.e.d,e.e.d):n}function J3(t,e){return e.e==0||t.e==0?QE:(bE(),Zst(t,e))}function Ban(t,e){if(!t)throw rt(new Pn($2n("Enum constant undefined: %s",e)))}function $C(){$C=Z,Abe=new gg,Lbe=new k3,_be=new QK,Sbe=new $b,Mbe=new ZK}function $$(){$$=Z,PEt=new _bt("BY_SIZE",0),Dut=new _bt("BY_SIZE_AND_SHAPE",1)}function z$(){z$=Z,Hut=new Sbt("EADES",0),rG=new Sbt("FRUCHTERMAN_REINGOLD",1)}function TI(){TI=Z,NG=new Ibt("READING_DIRECTION",0),LTt=new Ibt("ROTATION",1)}function Ute(){Ute=Z,f2e=Wr((v2(),ct(ot(ATt,1),ae,335,0,[mlt,STt,ylt,pS,gS])))}function Wte(){Wte=Z,Hwe=Wr((a_(),ct(ot(LCt,1),ae,315,0,[ACt,lht,hht,AS,LS])))}function Kte(){Kte=Z,e2e=Wr((g4(),ct(ot(t2e,1),ae,363,0,[LG,IG,DG,MG,AG])))}function Yte(){Yte=Z,C2e=Wr((hh(),ct(ot(s9t,1),ae,163,0,[CO,yS,fb,xS,Fy])))}function Xte(){Xte=Z,l3e=Wr((iD(),ct(ot(J_t,1),ae,316,0,[X_t,Vht,Z_t,Uht,Q_t])))}function Qte(){Qte=Z,O3e=Wr((Xf(),ct(ot(Qg,1),ae,175,0,[qn,Js,Id,$2,Xg])))}function Zte(){Zte=Z,i3e=Wr((yE(),ct(ot(r3e,1),ae,355,0,[n5,R6,qS,zS,HS])))}function Jte(){Jte=Z,ybe=Wr((Wa(),ct(ot(C7t,1),ae,356,0,[Ad,lb,ou,qc,Io])))}function tee(){tee=Z,r4e=Wr((ao(),ct(ot(WS,1),ae,103,0,[c0,kf,jh,Q0,Z0])))}function eee(){eee=Z,f4e=Wr((c4(),ct(ot(QS,1),ae,249,0,[mb,JO,CAt,XS,_At])))}function nee(){nee=Z,p4e=Wr((be(),ct(ot(Xa,1),xc,61,0,[Zo,Nn,Hn,mr,Bn])))}function Zrt(t,e){var n;return n=u(Jn(t.a,e),134),n||(n=new xa,ki(t.a,e,n)),n}function ree(t){var e;return e=u(Q(t,(se(),Lw)),305),e?e.a==t:!1}function iee(t){var e;return e=u(Q(t,(se(),Lw)),305),e?e.i==t:!1}function see(t,e){return On(e),nwt(t),t.d.Ob()?(e.td(t.d.Pb()),!0):!1}function q$(t){return yc(t,vi)>0?vi:yc(t,_a)<0?_a:Sr(t)}function Qm(t){return t<3?(Bl(t,Jhe),t+1):t=0&&e=-.01&&t.a<=P1&&(t.a=0),t.b>=-.01&&t.b<=P1&&(t.b=0),t}function oee(t,e){return e==(vnt(),vnt(),Ige)?t.toLocaleLowerCase():t.toLowerCase()}function Bmt(t){return(t.i&2?"interface ":t.i&1?"":"class ")+(L0(t),t.o)}function To(t){var e,n;n=(e=new Wtt,e),Mr((!t.q&&(t.q=new he(Vh,t,11,10)),t.q),n)}function Ran(t,e){var n;return n=e>0?e-1:e,rHt(ZKe(Dee(Pvt(new Yk,n),t.n),t.j),t.k)}function jan(t,e,n,r){var s;t.j=-1,a5t(t,$4t(t,e,n),(to(),s=u(e,66).Mj(),s.Ok(r)))}function cee(t){this.g=t,this.f=new le,this.a=b.Math.min(this.g.c.c,this.g.d.c)}function uee(t){this.b=new le,this.a=new le,this.c=new le,this.d=new le,this.e=t}function lee(t,e){this.a=new Cr,this.e=new Cr,this.b=(YC(),uV),this.c=t,this.b=e}function hee(t,e,n){xj.call(this),Rmt(this),this.a=t,this.c=n,this.b=e.d,this.f=e.e}function fee(t){this.d=t,this.c=t.c.vc().Kc(),this.b=null,this.a=null,this.e=(dR(),mut)}function Kv(t){if(t<0)throw rt(new Pn("Illegal Capacity: "+t));this.g=this.ri(t)}function $an(t,e){if(0>t||t>e)throw rt(new Qpt("fromIndex: 0, toIndex: "+t+jxt+e))}function zan(t){var e;if(t.a==t.b.a)throw rt(new lc);return e=t.a,t.c=e,t.a=t.a.e,e}function H$(t){var e;Pm(!!t.c),e=t.c.a,ch(t.d,t.c),t.b==t.c?t.b=e:--t.a,t.c=null}function G$(t,e){var n;return d2(t),n=new NXt(t,t.a.rd(),t.a.qd()|4,e),new Tn(t,n)}function qan(t,e){var n,r;return n=u(ny(t.d,e),14),n?(r=e,t.e.pc(r,n)):null}function V$(t,e){var n,r;for(r=t.Kc();r.Ob();)n=u(r.Pb(),70),Jt(n,(se(),D6),e)}function Han(t){var e;return e=Xt(ye(Q(t,(Te(),Ug)))),e<0&&(e=0,Jt(t,Ug,e)),e}function Gan(t,e,n){var r;r=b.Math.max(0,t.b/2-.5),c_(n,r,1),ue(e,new RGt(n,r))}function Van(t,e,n){var r;return r=t.a.e[u(e.a,10).p]-t.a.e[u(n.a,10).p],ps(KM(r))}function dee(t,e,n,r,s,o){var h;h=Nrt(r),Da(h,s),sa(h,o),ln(t.a,r,new Tj(h,e,n.f))}function gee(t,e){var n;if(n=gD(t.Tg(),e),!n)throw rt(new Pn(ab+e+Fct));return n}function Zm(t,e){var n;for(n=t;ts(n);)if(n=ts(n),n==e)return!0;return!1}function Uan(t,e){var n,r,s;for(r=e.a.cd(),n=u(e.a.dd(),14).gc(),s=0;s0&&(t.a/=e,t.b/=e),t}function Fl(t){var e;return t.w?t.w:(e=ein(t),e&&!e.kh()&&(t.w=e),e)}function ton(t){var e;return t==null?null:(e=u(t,190),e0n(e,e.length))}function St(t,e){if(t.g==null||e>=t.i)throw rt(new Vet(e,t.i));return t.li(e,t.g[e])}function eon(t){var e,n;for(e=t.a.d.j,n=t.c.d.j;e!=n;)pf(t.b,e),e=kz(e);pf(t.b,e)}function non(t){var e;for(e=0;e=14&&e<=16))),t}function wee(t,e,n){var r=function(){return t.apply(r,arguments)};return e.apply(r,n),r}function mee(t,e,n){var r,s;r=e;do s=Xt(t.p[r.p])+n,t.p[r.p]=s,r=t.a[r.p];while(r!=e)}function P8(t,e){var n,r;r=t.a,n=Fun(t,e,null),r!=e&&!t.e&&(n=_E(t,e,n)),n&&n.Fi()}function jmt(t,e){return y1(),gf(eb),b.Math.abs(t-e)<=eb||t==e||isNaN(t)&&isNaN(e)}function $mt(t,e){return y1(),gf(eb),b.Math.abs(t-e)<=eb||t==e||isNaN(t)&&isNaN(e)}function son(t,e){return Zp(),du(t.b.c.length-t.e.c.length,e.b.c.length-e.e.c.length)}function t4(t,e){return rYe(HC(t,e,Sr(Ca(e0,Wd(Sr(Ca(e==null?0:Hi(e),n0)),15)))))}function yee(){yee=Z,Pbe=Wr((Gn(),ct(ot(elt,1),ae,267,0,[Ds,Zs,xs,Hc,Sl,j1])))}function xee(){xee=Z,q3e=Wr((cy(),ct(ot(nft,1),ae,291,0,[eft,VO,GO,tft,qO,HO])))}function kee(){kee=Z,F3e=Wr((Qd(),ct(ot(kSt,1),ae,248,0,[Zht,$O,zO,FV,NV,PV])))}function Eee(){Eee=Z,c2e=Wr((i6(),ct(ot(c7,1),ae,227,0,[o7,dS,a7,Oy,H4,q4])))}function Tee(){Tee=Z,m2e=Wr((gE(),ct(ot(GTt,1),ae,275,0,[bS,$Tt,HTt,qTt,zTt,jTt])))}function Cee(){Cee=Z,w2e=Wr((nD(),ct(ot(RTt,1),ae,274,0,[BG,PTt,BTt,NTt,FTt,Slt])))}function _ee(){_ee=Z,$we=Wr((Zz(),ct(ot(CCt,1),ae,313,0,[aht,ECt,sht,kCt,TCt,cV])))}function See(){See=Z,b2e=Wr((nq(),ct(ot(ITt,1),ae,276,0,[Elt,klt,Clt,Tlt,_lt,PG])))}function Aee(){Aee=Z,Qme=Wr((f_(),ct(ot(Xme,1),ae,327,0,[wV,kht,Tht,Eht,Cht,xht])))}function Lee(){Lee=Z,g4e=Wr((Qu(),ct(ot(GV,1),ae,273,0,[xb,tg,tN,JS,ZS,G6])))}function Mee(){Mee=Z,a4e=Wr((tq(),ct(ot(wAt,1),ae,312,0,[bft,pAt,vAt,dAt,bAt,gAt])))}function aon(){return fy(),ct(ot(lo,1),ae,93,0,[Ef,J0,Tf,_f,l0,zh,Ul,Cf,$h])}function W$(t,e){var n;n=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,0,n,t.a))}function K$(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,1,n,t.b))}function F8(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,3,n,t.b))}function Xv(t,e){var n;n=t.f,t.f=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,3,n,t.f))}function Qv(t,e){var n;n=t.g,t.g=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,4,n,t.g))}function yu(t,e){var n;n=t.i,t.i=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,5,n,t.i))}function xu(t,e){var n;n=t.j,t.j=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,6,n,t.j))}function B8(t,e){var n;n=t.j,t.j=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,1,n,t.j))}function R8(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,4,n,t.c))}function j8(t,e){var n;n=t.k,t.k=e,t.Db&4&&!(t.Db&1)&&mi(t,new Km(t,2,n,t.k))}function tit(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&mi(t,new Srt(t,2,n,t.d))}function Ig(t,e){var n;n=t.s,t.s=e,t.Db&4&&!(t.Db&1)&&mi(t,new Srt(t,4,n,t.s))}function ty(t,e){var n;n=t.t,t.t=e,t.Db&4&&!(t.Db&1)&&mi(t,new Srt(t,5,n,t.t))}function $8(t,e){var n;n=t.F,t.F=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,5,n,e))}function CI(t,e){var n;return n=u(Jn((NR(),nU),t),55),n?n.xj(e):Pt(Xn,Ie,1,e,5,1)}function R0(t,e){var n,r;return n=e in t.a,n&&(r=D0(t,e).he(),r)?r.a:null}function oon(t,e){var n,r,s;return n=(r=(Tv(),s=new YT,s),e&&A5t(r,e),r),Ymt(n,t),n}function Iee(t,e,n){if(Q8(t,n),!t.Bk()&&n!=null&&!t.wj(n))throw rt(new Htt);return n}function Dee(t,e){return t.n=e,t.n?(t.f=new le,t.e=new le):(t.f=null,t.e=null),t}function jr(t,e,n,r,s,o){var h;return h=Unt(t,e),Nee(n,h),h.i=s?8:0,h.f=r,h.e=s,h.g=o,h}function zmt(t,e,n,r,s){this.d=e,this.k=r,this.f=s,this.o=-1,this.p=1,this.c=t,this.a=n}function qmt(t,e,n,r,s){this.d=e,this.k=r,this.f=s,this.o=-1,this.p=2,this.c=t,this.a=n}function Hmt(t,e,n,r,s){this.d=e,this.k=r,this.f=s,this.o=-1,this.p=6,this.c=t,this.a=n}function Gmt(t,e,n,r,s){this.d=e,this.k=r,this.f=s,this.o=-1,this.p=7,this.c=t,this.a=n}function Vmt(t,e,n,r,s){this.d=e,this.j=r,this.e=s,this.o=-1,this.p=4,this.c=t,this.a=n}function Oee(t,e){var n,r,s,o;for(r=e,s=0,o=r.length;s=0),ohn(t.d,t.c)<0&&(t.a=t.a-1&t.d.a.length-1,t.b=t.d.c),t.c=-1}function Umt(t){return t.a<54?t.f<0?-1:t.f>0?1:0:(!t.c&&(t.c=jI(t.f)),t.c).e}function gf(t){if(!(t>=0))throw rt(new Pn("tolerance ("+t+") must be >= 0"));return t}function z8(){return Xht||(Xht=new kue,s4(Xht,ct(ot(R4,1),Ie,130,0,[new yp]))),Xht}function so(){so=Z,MS=new Met(O_,0),Ju=new Met("INPUT",1),eu=new Met("OUTPUT",2)}function X$(){X$=Z,CTt=new Eet("ARD",0),OG=new Eet("MSD",1),wlt=new Eet("MANUAL",2)}function Zv(){Zv=Z,OO=new Pet("BARYCENTER",0),DS=new Pet(a1e,1),dV=new Pet(o1e,2)}function _I(t,e){var n;if(n=t.gc(),e<0||e>n)throw rt(new jm(e,n));return new lvt(t,e)}function Bee(t,e){var n;return Et(e,42)?t.c.Mc(e):(n=Wit(t,e),Iz(t,e),n)}function po(t,e,n){return f2(t,e),Xc(t,n),Ig(t,0),ty(t,1),Pg(t,!0),Ng(t,!0),t}function Bl(t,e){if(t<0)throw rt(new Pn(e+" cannot be negative but was: "+t));return t}function Ree(t,e){var n,r;for(n=0,r=t.gc();n0?u(Fe(n.a,r-1),10):null}function qC(t,e){var n;n=t.k,t.k=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,2,n,t.k))}function Z$(t,e){var n;n=t.f,t.f=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,8,n,t.f))}function J$(t,e){var n;n=t.i,t.i=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,7,n,t.i))}function Ymt(t,e){var n;n=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,8,n,t.a))}function Xmt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,0,n,t.b))}function Qmt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,0,n,t.b))}function Zmt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,1,n,t.c))}function Jmt(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,1,n,t.c))}function nit(t,e){var n;n=t.c,t.c=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,4,n,t.c))}function tyt(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,1,n,t.d))}function rit(t,e){var n;n=t.D,t.D=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,2,n,t.D))}function iit(t,e){t.r>0&&t.c0&&t.g!=0&&iit(t.i,e/t.r*t.i.d))}function bon(t,e,n){var r;t.b=e,t.a=n,r=(t.a&512)==512?new Sqt:new VL,t.c=Dvn(r,t.b,t.a)}function Wee(t,e){return V0(t.e,e)?(to(),Yrt(e)?new Ij(e,t):new DM(e,t)):new jVt(e,t)}function tz(t,e){return nYe(GC(t.a,e,Sr(Ca(e0,Wd(Sr(Ca(e==null?0:Hi(e),n0)),15)))))}function von(t,e,n){return Ym(t,new fe(e),new Yn,new ge(n),ct(ot(ll,1),ae,132,0,[]))}function won(t){var e,n;return 0>t?new fbt:(e=t+1,n=new vJt(e,t),new V2t(null,n))}function mon(t,e){vn();var n;return n=new kx(1),ea(t)?xo(n,t,e):su(n.f,t,e),new q(n)}function yon(t,e){var n,r;return n=t.o+t.p,r=e.o+e.p,ne?(e<<=1,e>0?e:A_):e}function sit(t){switch(k2t(t.e!=3),t.e){case 2:return!1;case 0:return!0}return _sn(t)}function Yee(t,e){var n;return Et(e,8)?(n=u(e,8),t.a==n.a&&t.b==n.b):!1}function ait(t,e,n){var r,s,o;return o=e>>5,s=e&31,r=Ps(zm(t.n[n][o],Sr(M0(s,1))),3),r}function kon(t,e){var n,r;for(r=e.vc().Kc();r.Ob();)n=u(r.Pb(),42),Yz(t,n.cd(),n.dd())}function Eon(t,e){var n;n=new gp,u(e.b,65),u(e.b,65),u(e.b,65),mu(e.a,new xvt(t,n,e))}function eyt(t,e){var n;n=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,21,n,t.b))}function nyt(t,e){var n;n=t.d,t.d=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,11,n,t.d))}function ez(t,e){var n;n=t.j,t.j=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,13,n,t.j))}function Xee(t,e,n){var r,s,o;for(o=t.a.length-1,s=t.b,r=0;r>>31;r!=0&&(t[n]=r)}function Oon(t,e){vn();var n,r;for(r=new le,n=0;n0&&(this.g=this.ri(this.i+(this.i/8|0)+1),t.Qc(this.g))}function is(t,e){Sj.call(this,a5e,t,e),this.b=this,this.a=au(t.Tg(),yn(this.e.Tg(),this.c))}function VC(t,e){var n,r;for(On(e),r=e.vc().Kc();r.Ob();)n=u(r.Pb(),42),t.zc(n.cd(),n.dd())}function Hon(t,e,n){var r;for(r=n.Kc();r.Ob();)if(!k$(t,e,r.Pb()))return!1;return!0}function Gon(t,e,n,r,s){var o;return n&&(o=Vi(e.Tg(),t.c),s=n.gh(e,-1-(o==-1?r:o),null,s)),s}function Von(t,e,n,r,s){var o;return n&&(o=Vi(e.Tg(),t.c),s=n.ih(e,-1-(o==-1?r:o),null,s)),s}function pne(t){var e;if(t.b==-2){if(t.e==0)e=-1;else for(e=0;t.a[e]==0;e++);t.b=e}return t.b}function bne(t){switch(t.g){case 2:return be(),Bn;case 4:return be(),Hn;default:return t}}function vne(t){switch(t.g){case 1:return be(),mr;case 3:return be(),Nn;default:return t}}function Uon(t){var e,n,r;return t.j==(be(),Nn)&&(e=Uoe(t),n=Nu(e,Hn),r=Nu(e,Bn),r||r&&n)}function Won(t){var e,n;return e=u(t.e&&t.e(),9),n=u(dwt(e,e.length),9),new rh(e,n,e.length)}function Kon(t,e){wr(e,s1e,1),c3t(gYe(new tr((z9(),new trt(t,!1,!1,new YP))))),or(e)}function SI(t,e){return Fn(),ea(t)?pmt(t,Br(e)):Nm(t)?Pnt(t,ye(e)):Om(t)?Ztn(t,Re(e)):t.wd(e)}function cyt(t,e){e.q=t,t.d=b.Math.max(t.d,e.r),t.b+=e.d+(t.a.c.length==0?0:t.c),ue(t.a,e)}function H8(t,e){var n,r,s,o;return s=t.c,n=t.c+t.b,o=t.d,r=t.d+t.a,e.a>s&&e.ao&&e.b1||t.Ob())return++t.a,t.g=0,e=t.i,t.Ob(),e;throw rt(new lc)}function acn(t){wUt();var e;return AGt(yht,t)||(e=new SQ,e.a=t,Z2t(yht,t,e)),u(go(yht,t),635)}function Sh(t){var e,n,r,s;return s=t,r=0,s<0&&(s+=x2,r=W0),n=ps(s/f6),e=ps(s-n*f6),ru(e,n,r)}function AI(t){var e,n,r;for(r=0,n=new Ex(t.a);n.a>22),s=t.h+e.h+(r>>22),ru(n&ul,r&ul,s&W0)}function Bne(t,e){var n,r,s;return n=t.l-e.l,r=t.m-e.m+(n>>22),s=t.h-e.h+(r>>22),ru(n&ul,r&ul,s&W0)}function DI(t){var e;return t<128?(e=(ZKt(),iEt)[t],!e&&(e=iEt[t]=new tR(t)),e):new tR(t)}function Wi(t){var e;return Et(t,78)?t:(e=t&&t.__java$exception,e||(e=new _re(t),Hzt(e)),e)}function OI(t){if(Et(t,186))return u(t,118);if(t)return null;throw rt(new yx(Dde))}function Rne(t,e){if(e==null)return!1;for(;t.a!=t.b;)if(yi(e,mz(t)))return!0;return!1}function gyt(t){return t.a.Ob()?!0:t.a!=t.d?!1:(t.a=new Kwt(t.e.f),t.a.Ob())}function As(t,e){var n,r;return n=e.Pc(),r=n.length,r==0?!1:(Svt(t.c,t.c.length,n),!0)}function xcn(t,e,n){var r,s;for(s=e.vc().Kc();s.Ob();)r=u(s.Pb(),42),t.yc(r.cd(),r.dd(),n);return t}function jne(t,e){var n,r;for(r=new S(t.b);r.a=0,"Negative initial capacity"),_j(e>=0,"Non-positive load factor"),Yu(this)}function bit(t,e,n){return t>=128?!1:t<64?aC(Ps(M0(1,t),n),0):aC(Ps(M0(1,t-64),e),0)}function Mcn(t,e){return!t||!e||t==e?!1:rw(t.b.c,e.b.c+e.b.b)<0&&rw(e.b.c,t.b.c+t.b.b)<0}function Qne(t){var e,n,r;return n=t.n,r=t.o,e=t.d,new ih(n.a-e.b,n.b-e.d,r.a+(e.b+e.c),r.b+(e.d+e.a))}function Icn(t){var e,n,r,s;for(n=t.a,r=0,s=n.length;rr)throw rt(new jm(e,r));return t.hi()&&(n=gQt(t,n)),t.Vh(e,n)}function FI(t,e,n){return n==null?(!t.q&&(t.q=new Cr),Ux(t.q,e)):(!t.q&&(t.q=new Cr),ki(t.q,e,n)),t}function Jt(t,e,n){return n==null?(!t.q&&(t.q=new Cr),Ux(t.q,e)):(!t.q&&(t.q=new Cr),ki(t.q,e,n)),t}function Zne(t){var e,n;return n=new _$,Lo(n,t),Jt(n,(Gp(),C6),t),e=new Cr,Pmn(t,n,e),o4n(t,n,e),n}function Ncn(t){y4();var e,n,r;for(n=Pt(Us,te,8,2,0,1),r=0,e=0;e<2;e++)r+=.5,n[e]=pfn(r,t);return n}function Jne(t,e){var n,r,s,o;for(n=!1,r=t.a[e].length,o=0;o>=1);return e}function ere(t){var e,n;return n=lD(t.h),n==32?(e=lD(t.m),e==32?lD(t.l)+32:e+20-10):n-12}function KC(t){var e;return e=t.a[t.b],e==null?null:(Ji(t.a,t.b,null),t.b=t.b+1&t.a.length-1,e)}function nre(t){var e,n;return e=t.t-t.k[t.o.p]*t.d+t.j[t.o.p]>t.f,n=t.u+t.e[t.o.p]*t.d>t.f*t.s*t.d,e||n}function pz(t,e,n){var r,s;return r=new $rt(e,n),s=new $t,t.b=Wce(t,t.b,r,s),s.b||++t.c,t.b.b=!1,s.d}function rre(t,e,n){var r,s,o,h;for(h=QC(e,n),o=0,s=h.Kc();s.Ob();)r=u(s.Pb(),11),ki(t.c,r,de(o++))}function Up(t){var e,n;for(n=new S(t.a.b);n.an&&(n=t[e]);return n}function ire(t,e,n){var r;return r=new le,I5t(t,e,r,(be(),Hn),!0,!1),I5t(t,n,r,Bn,!1,!1),r}function wit(t,e,n){var r,s,o,h;return o=null,h=e,s=Uv(h,"labels"),r=new TVt(t,n),o=(Jpn(r.a,r.b,s),s),o}function Fcn(t,e,n,r){var s;return s=w5t(t,e,n,r),!s&&(s=Bun(t,n,r),s&&!E4(t,e,s))?null:s}function Bcn(t,e,n,r){var s;return s=m5t(t,e,n,r),!s&&(s=Pit(t,n,r),s&&!E4(t,e,s))?null:s}function sre(t,e){var n;for(n=0;n1||e>=0&&t.b<3)}function BI(t){var e,n,r;for(e=new Du,r=ei(t,0);r.b!=r.d.c;)n=u(ti(r),8),h8(e,0,new yo(n));return e}function l2(t){var e,n;for(n=new S(t.a.b);n.ar?1:0}function Oyt(t,e){return Lce(t,e)?(ln(t.b,u(Q(e,(se(),Ny)),21),e),ni(t.a,e),!0):!1}function Ycn(t){var e,n;e=u(Q(t,(se(),Zu)),10),e&&(n=e.c,vu(n.a,e),n.a.c.length==0&&vu(Fa(e).b,n))}function hre(t){return R1?Pt(Pge,dfe,572,0,0,1):u(D1(t.a,Pt(Pge,dfe,572,t.a.c.length,0,1)),842)}function Xcn(t,e,n,r){return Qj(),new Ztt(ct(ot(M2,1),Dq,42,0,[(hst(t,e),new _v(t,e)),(hst(n,r),new _v(n,r))]))}function i4(t,e,n){var r,s;return s=(r=new Wtt,r),po(s,e,n),Mr((!t.q&&(t.q=new he(Vh,t,11,10)),t.q),s),s}function kit(t){var e,n,r,s;for(s=kYe(P4e,t),n=s.length,r=Pt(Ae,te,2,n,6,1),e=0;e=t.b.c.length||(Nyt(t,2*e+1),n=2*e+2,n=0&&t[r]===e[r];r--);return r<0?0:get(Ps(t[r],co),Ps(e[r],co))?-1:1}function Qcn(t,e){var n,r;for(r=ei(t,0);r.b!=r.d.c;)n=u(ti(r),214),n.e.length>0&&(e.td(n),n.i&&Vun(n))}function Tit(t,e){var n,r;return r=u(In(t.a,4),126),n=Pt(Tft,Jct,415,e,0,1),r!=null&&Ic(r,0,n,0,r.length),n}function dre(t,e){var n;return n=new eat((t.f&256)!=0,t.i,t.a,t.d,(t.f&16)!=0,t.j,t.g,e),t.e!=null||(n.c=t),n}function Zcn(t,e){var n,r;for(r=t.Zb().Cc().Kc();r.Ob();)if(n=u(r.Pb(),14),n.Hc(e))return!0;return!1}function Cit(t,e,n,r,s){var o,h;for(h=n;h<=s;h++)for(o=e;o<=r;o++)if(l4(t,o,h))return!0;return!1}function gre(t,e,n){var r,s,o,h;for(On(n),h=!1,o=t.Zc(e),s=n.Kc();s.Ob();)r=s.Pb(),o.Rb(r),h=!0;return h}function Jcn(t,e){var n;return t===e?!0:Et(e,83)?(n=u(e,83),F4t(Pv(t),n.vc())):!1}function pre(t,e,n){var r,s;for(s=n.Kc();s.Ob();)if(r=u(s.Pb(),42),t.re(e,r.dd()))return!0;return!1}function bre(t,e,n){return t.d[e.p][n.p]||(Yhn(t,e,n),t.d[e.p][n.p]=!0,t.d[n.p][e.p]=!0),t.a[e.p][n.p]}function Q8(t,e){if(!t.ai()&&e==null)throw rt(new Pn("The 'no null' constraint is violated"));return e}function Z8(t,e){t.D==null&&t.B!=null&&(t.D=t.B,t.B=null),rit(t,e==null?null:(On(e),e)),t.C&&t.yk(null)}function tun(t,e){var n;return!t||t==e||!Vs(e,(se(),Iw))?!1:(n=u(Q(e,(se(),Iw)),10),n!=t)}function _it(t){switch(t.i){case 2:return!0;case 1:return!1;case-1:++t.c;default:return t.pl()}}function vre(t){switch(t.i){case-2:return!0;case-1:return!1;case 1:--t.c;default:return t.ql()}}function wre(t){oQt.call(this,"The given string does not match the expected format for individual spacings.",t)}function Cl(){Cl=Z,Yl=new ZR("ELK",0),PAt=new ZR("JSON",1),NAt=new ZR("DOT",2),FAt=new ZR("SVG",3)}function RI(){RI=Z,CV=new Bet(K0,0),p_t=new Bet("RADIAL_COMPACTION",1),b_t=new Bet("WEDGE_COMPACTION",2)}function I1(){I1=Z,MEt=new pet("CONCURRENT",0),Gl=new pet("IDENTITY_FINISH",1),Ly=new pet("UNORDERED",2)}function Sit(){Sit=Z,s7t=(AR(),Rut),i7t=new mn(t6t,s7t),Ope=new Gi(e6t),Npe=new Gi(n6t),Ppe=new Gi(r6t)}function J8(){J8=Z,wTt=new U5,mTt=new zY,Wbe=new AL,Ube=new qY,Vbe=new HY,vTt=(On(Vbe),new pn)}function tE(){tE=Z,vht=new Det("CONSERVATIVE",0),qCt=new Det("CONSERVATIVE_SOFT",1),IS=new Det("SLOPPY",2)}function bz(){bz=Z,EAt=new Mv(15),o4e=new eo((ci(),q2),EAt),KS=z6,mAt=G3e,yAt=z2,kAt=a5,xAt=jV}function Ait(t,e,n){var r,s,o;for(r=new Qi,o=ei(n,0);o.b!=o.d.c;)s=u(ti(o),8),ni(r,new yo(s));gre(t,e,r)}function eun(t){var e,n,r;for(e=0,r=Pt(Us,te,8,t.b,0,1),n=ei(t,0);n.b!=n.d.c;)r[e++]=u(ti(n),8);return r}function Fyt(t){var e;return e=(!t.a&&(t.a=new he(eg,t,9,5)),t.a),e.i!=0?mYe(u(St(e,0),678)):null}function nun(t,e){var n;return n=Oa(t,e),get(yrt(t,e),0)|PYe(yrt(t,n),0)?n:Oa(Iq,yrt(zm(n,63),1))}function run(t,e){var n;n=De((Vit(),oV))!=null&&e.wg()!=null?Xt(ye(e.wg()))/Xt(ye(De(oV))):1,ki(t.b,e,n)}function iun(t,e){var n,r;return n=u(t.d.Bc(e),14),n?(r=t.e.hc(),r.Gc(n),t.e.d-=n.gc(),n.$b(),r):null}function Byt(t,e){var n,r;if(r=t.c[e],r!=0)for(t.c[e]=0,t.d-=r,n=e+1;n0)return b8(e-1,t.a.c.length),Ag(t.a,e-1);throw rt(new Vzt)}function sun(t,e,n){if(e<0)throw rt(new mo(q1e+e));ee)throw rt(new Pn(Fq+t+gfe+e));if(t<0||e>n)throw rt(new Qpt(Fq+t+zxt+e+jxt+n))}function xre(t){if(!t.a||!(t.a.i&8))throw rt(new Fo("Enumeration class expected for layout option "+t.f))}function ey(t){var e;++t.j,t.i==0?t.g=null:t.ihH?t-n>hH:n-t>hH}function Mit(t,e){return!t||e&&!t.j||Et(t,124)&&u(t,124).a.b==0?0:t.Re()}function wz(t,e){return!t||e&&!t.k||Et(t,124)&&u(t,124).a.a==0?0:t.Se()}function jI(t){return Jp(),t<0?t!=-1?new D3t(-1,-t):_ut:t<=10?wEt[ps(t)]:new D3t(1,t)}function jyt(t){throw pit(),rt(new Rqt("Unexpected typeof result '"+t+"'; please report this bug to the GWT team"))}function _re(t){Gqt(),uj(this),n$(this),this.e=t,jce(this,t),this.g=t==null?Tu:$o(t),this.a="",this.b=t,this.a=""}function $yt(){this.a=new oZ,this.f=new O$t(this),this.b=new N$t(this),this.i=new P$t(this),this.e=new F$t(this)}function Sre(){gKe.call(this,new Emt(Qm(16))),Bl(2,Yhe),this.b=2,this.a=new kwt(null,null,0,null),cM(this.a,this.a)}function YC(){YC=Z,oht=new Aet("DUMMY_NODE_OVER",0),_Ct=new Aet("DUMMY_NODE_UNDER",1),uV=new Aet("EQUAL",2)}function Iit(){Iit=Z,Xut=uQt(ct(ot(WS,1),ae,103,0,[(ao(),jh),kf])),Qut=uQt(ct(ot(WS,1),ae,103,0,[Z0,Q0]))}function Dit(t){return(be(),_u).Hc(t.j)?Xt(ye(Q(t,(se(),g7)))):Ko(ct(ot(Us,1),te,8,0,[t.i.n,t.n,t.a])).b}function lun(t){var e,n,r,s;for(r=t.b.a,n=r.a.ec().Kc();n.Ob();)e=u(n.Pb(),561),s=new mce(e,t.e,t.f),ue(t.g,s)}function f2(t,e){var n,r,s;r=t.nk(e,null),s=null,e&&(s=(t8(),n=new wv,n),P8(s,t.r)),r=O1(t,s,r),r&&r.Fi()}function hun(t,e){var n,r;for(r=ol(t.d,1)!=0,n=!0;n;)n=!1,n=e.c.Tf(e.e,r),n=n|pD(t,e,r,!1),r=!r;iyt(t)}function zyt(t,e){var n,r,s;return r=!1,n=e.q.d,e.ds&&(Jse(e.q,s),r=n!=e.q.d)),r}function Are(t,e){var n,r,s,o,h,d,w,k;return w=e.i,k=e.j,r=t.f,s=r.i,o=r.j,h=w-s,d=k-o,n=b.Math.sqrt(h*h+d*d),n}function qyt(t,e){var n,r;return r=Dz(t),r||(n=(Tat(),toe(e)),r=new Fzt(n),Mr(r.Vk(),t)),r}function $I(t,e){var n,r;return n=u(t.c.Bc(e),14),n?(r=t.hc(),r.Gc(n),t.d-=n.gc(),n.$b(),t.mc(r)):t.jc()}function Lre(t,e){var n;for(n=0;n=t.c.b:t.a<=t.c.b))throw rt(new lc);return e=t.a,t.a+=t.c.c,++t.b,de(e)}function gun(t){var e;return e=new cee(t),aI(t.a,Mbe,new wl(ct(ot(gO,1),Ie,369,0,[e]))),e.d&&ue(e.f,e.d),e.f}function Oit(t){var e;return e=new u2t(t.a),Lo(e,t),Jt(e,(se(),_i),t),e.o.a=t.g,e.o.b=t.f,e.n.a=t.i,e.n.b=t.j,e}function pun(t,e,n,r){var s,o;for(o=t.Kc();o.Ob();)s=u(o.Pb(),70),s.n.a=e.a+(r.a-s.o.a)/2,s.n.b=e.b,e.b+=s.o.b+n}function bun(t,e,n){var r,s;for(s=e.a.a.ec().Kc();s.Ob();)if(r=u(s.Pb(),57),qXt(t,r,n))return!0;return!1}function vun(t){var e,n;for(n=new S(t.r);n.a=0?e:-e;r>0;)r%2==0?(n*=n,r=r/2|0):(s*=n,r-=1);return e<0?1/s:s}function xun(t,e){var n,r,s;for(s=1,n=t,r=e>=0?e:-e;r>0;)r%2==0?(n*=n,r=r/2|0):(s*=n,r-=1);return e<0?1/s:s}function Fre(t){var e,n;if(t!=null)for(n=0;n0&&(n=u(Fe(t.a,t.a.c.length-1),570),Oyt(n,e))||ue(t.a,new pJt(e))}function _un(t){lf();var e,n;e=t.d.c-t.e.c,n=u(t.g,145),mu(n.b,new C9(e)),mu(n.c,new Gb(e)),va(n.i,new nR(e))}function $re(t){var e;return e=new _p,e.a+="VerticalSegment ",hc(e,t.e),e.a+=" ",Vr(e,m2t(new aet,new S(t.k))),e.a}function Sun(t){var e;return e=u(Wv(t.c.c,""),229),e||(e=new zx(Jk(Zk(new wm,""),"Other")),p2(t.c.c,"",e)),e}function XC(t){var e;return t.Db&64?bf(t):(e=new Th(bf(t)),e.a+=" (name: ",fo(e,t.zb),e.a+=")",e.a)}function Wyt(t,e,n){var r,s;return s=t.sb,t.sb=e,t.Db&4&&!(t.Db&1)&&(r=new Qs(t,1,4,s,e),n?n.Ei(r):n=r),n}function Nit(t,e){var n,r,s;for(n=0,s=Yo(t,e).Kc();s.Ob();)r=u(s.Pb(),11),n+=Q(r,(se(),Zu))!=null?1:0;return n}function a4(t,e,n){var r,s,o;for(r=0,o=ei(t,0);o.b!=o.d.c&&(s=Xt(ye(ti(o))),!(s>n));)s>=e&&++r;return r}function Aun(t,e,n){var r,s;return r=new F0(t.e,3,13,null,(s=e.c,s||(dn(),V1)),Fg(t,e),!1),n?n.Ei(r):n=r,n}function Lun(t,e,n){var r,s;return r=new F0(t.e,4,13,(s=e.c,s||(dn(),V1)),null,Fg(t,e),!1),n?n.Ei(r):n=r,n}function Kyt(t,e,n){var r,s;return s=t.r,t.r=e,t.Db&4&&!(t.Db&1)&&(r=new Qs(t,1,8,s,t.r),n?n.Ei(r):n=r),n}function Og(t,e){var n,r;return n=u(e,676),r=n.vk(),!r&&n.wk(r=Et(e,88)?new FVt(t,u(e,26)):new rZt(t,u(e,148))),r}function zI(t,e,n){var r;t.qi(t.i+1),r=t.oi(e,n),e!=t.i&&Ic(t.g,e,t.g,e+1,t.i-e),Ji(t.g,e,r),++t.i,t.bi(e,n),t.ci()}function Mun(t,e){var n;return e.a&&(n=e.a.a.length,t.a?Vr(t.a,t.b):t.a=new Il(t.d),sZt(t.a,e.a,e.d.length,n)),t}function Iun(t,e){var n,r,s,o;if(e.vi(t.a),o=u(In(t.a,8),1936),o!=null)for(n=o,r=0,s=n.length;rn)throw rt(new mo(Fq+t+zxt+e+", size: "+n));if(t>e)throw rt(new Pn(Fq+t+gfe+e))}function lh(t,e,n){if(e<0)Q4t(t,n);else{if(!n.Ij())throw rt(new Pn(ab+n.ne()+W_));u(n,66).Nj().Vj(t,t.yh(),e)}}function Nun(t,e,n,r,s,o,h,d){var w;for(w=n;o=r||e=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t>=48&&t<=57?t-48:0}function Wre(t){var e;return t.Db&64?bf(t):(e=new Th(bf(t)),e.a+=" (source: ",fo(e,t.d),e.a+=")",e.a)}function Fun(t,e,n){var r,s;return s=t.a,t.a=e,t.Db&4&&!(t.Db&1)&&(r=new Qs(t,1,5,s,t.a),n?v4t(n,r):n=r),n}function Ng(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,2,n,e))}function Xyt(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,8,n,e))}function xz(t,e){var n;n=(t.Bb&256)!=0,e?t.Bb|=256:t.Bb&=-257,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,8,n,e))}function Pg(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,3,n,e))}function Qyt(t,e){var n;n=(t.Bb&512)!=0,e?t.Bb|=512:t.Bb&=-513,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,9,n,e))}function ZC(t,e){var n;return t.b==-1&&t.a&&(n=t.a.Gj(),t.b=n?t.c.Xg(t.a.aj(),n):Vi(t.c.Tg(),t.a)),t.c.Og(t.b,e)}function de(t){var e,n;return t>-129&&t<128?(e=t+128,n=(VKt(),sEt)[e],!n&&(n=sEt[e]=new iM(t)),n):new iM(t)}function eE(t){var e,n;return t>-129&&t<128?(e=t+128,n=(QKt(),uEt)[e],!n&&(n=uEt[e]=new eR(t)),n):new eR(t)}function Zyt(t){var e,n;return e=t.k,e==(Gn(),xs)?(n=u(Q(t,(se(),oc)),61),n==(be(),Nn)||n==mr):!1}function Bun(t,e,n){var r,s,o;return o=(s=wE(t.b,e),s),o&&(r=u(Eq(mI(t,o),""),26),r)?w5t(t,r,e,n):null}function Pit(t,e,n){var r,s,o;return o=(s=wE(t.b,e),s),o&&(r=u(Eq(mI(t,o),""),26),r)?m5t(t,r,e,n):null}function Kre(t,e){var n,r;for(r=new er(t);r.e!=r.i.gc();)if(n=u(dr(r),138),Gt(e)===Gt(n))return!0;return!1}function JC(t,e,n){var r;if(r=t.gc(),e>r)throw rt(new jm(e,r));if(t.hi()&&t.Hc(n))throw rt(new Pn(XD));t.Xh(e,n)}function Run(t,e){var n;if(n=t4(t.i,e),n==null)throw rt(new ad("Node did not exist in input."));return uyt(e,n),null}function jun(t,e){var n;if(n=gD(t,e),Et(n,322))return u(n,34);throw rt(new Pn(ab+e+"' is not a valid attribute"))}function $un(t,e,n){var r,s;for(s=Et(e,99)&&u(e,18).Bb&Ya?new Uet(e,t):new U8(e,t),r=0;re?1:t==e?t==0?Ls(1/t,1/e):0:isNaN(t)?isNaN(e)?0:1:-1}function Yun(t,e){wr(e,"Sort end labels",1),us(Ri(Wo(new Tn(null,new _n(t.b,16)),new QP),new q5),new vY),or(e)}function t_(t,e,n){var r,s;return t.ej()?(s=t.fj(),r=qst(t,e,n),t.$i(t.Zi(7,de(n),r,e,s)),r):qst(t,e,n)}function Fit(t,e){var n,r,s;t.d==null?(++t.e,--t.f):(s=e.cd(),n=e.Sh(),r=(n&vi)%t.d.length,Dsn(t,r,fce(t,r,n,s)))}function nE(t,e){var n;n=(t.Bb&wf)!=0,e?t.Bb|=wf:t.Bb&=-1025,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,10,n,e))}function rE(t,e){var n;n=(t.Bb&yy)!=0,e?t.Bb|=yy:t.Bb&=-4097,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,12,n,e))}function iE(t,e){var n;n=(t.Bb&zu)!=0,e?t.Bb|=zu:t.Bb&=-8193,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,15,n,e))}function sE(t,e){var n;n=(t.Bb&Ay)!=0,e?t.Bb|=Ay:t.Bb&=-2049,t.Db&4&&!(t.Db&1)&&mi(t,new df(t,1,11,n,e))}function Xun(t,e){var n;return n=Ls(t.b.c,e.b.c),n!=0||(n=Ls(t.a.a,e.a.a),n!=0)?n:Ls(t.a.b,e.a.b)}function Qun(t,e){var n;if(n=Jn(t.k,e),n==null)throw rt(new ad("Port did not exist in input."));return uyt(e,n),null}function Zun(t){var e,n;for(n=vce(Fl(t)).Kc();n.Ob();)if(e=Br(n.Pb()),m_(t,e))return asn((_Gt(),W4e),e);return null}function Jun(t,e){var n,r,s,o,h;for(h=au(t.e.Tg(),e),o=0,n=u(t.g,119),s=0;s>10)+OD&ms,e[1]=(t&1023)+56320&ms,Ah(e,0,e.length)}function Ez(t){var e,n;return n=u(Q(t,(Te(),Vl)),103),n==(ao(),c0)?(e=Xt(ye(Q(t,UG))),e>=1?kf:Q0):n}function nln(t){switch(u(Q(t,(Te(),X0)),218).g){case 1:return new BX;case 3:return new qX;default:return new FX}}function d2(t){if(t.c)d2(t.c);else if(t.d)throw rt(new Fo("Stream already terminated, can't be modified or used"))}function jit(t){var e;return t.Db&64?bf(t):(e=new Th(bf(t)),e.a+=" (identifier: ",fo(e,t.k),e.a+=")",e.a)}function Zre(t,e,n){var r,s;return r=(Tv(),s=new vp,s),W$(r,e),K$(r,n),t&&Mr((!t.a&&(t.a=new Ss(Hh,t,5)),t.a),r),r}function $it(t,e,n,r){var s,o;return On(r),On(n),s=t.xc(e),o=s==null?n:dGt(u(s,15),u(n,14)),o==null?t.Bc(e):t.zc(e,o),o}function un(t){var e,n,r,s;return n=(e=u(Hf((r=t.gm,s=r.f,s==Hr?r:s)),9),new rh(e,u(uf(e,e.length),9),0)),pf(n,t),n}function rln(t,e,n){var r,s;for(s=t.a.ec().Kc();s.Ob();)if(r=u(s.Pb(),10),II(n,u(Fe(e,r.p),14)))return r;return null}function iln(t,e,n){var r;try{Rcn(t,e,n)}catch(s){throw s=Wi(s),Et(s,597)?(r=s,rt(new amt(r))):rt(s)}return e}function Yp(t,e){var n;return Bo(t)&&Bo(e)&&(n=t-e,DD>1,t.k=n-1>>1}function zit(){E4t();var t,e,n;n=txn+++Date.now(),t=ps(b.Math.floor(n*PD))&Pq,e=ps(n-t*Rxt),this.a=t^1502,this.b=e^fot}function z0(t){var e,n,r;for(e=new le,r=new S(t.j);r.a34028234663852886e22?ss:e<-34028234663852886e22?Ts:e}function Jre(t){return t-=t>>1&1431655765,t=(t>>2&858993459)+(t&858993459),t=(t>>4)+t&252645135,t+=t>>8,t+=t>>16,t&63}function tie(t){var e,n,r,s;for(e=new NWt(t.Hd().gc()),s=0,r=Kx(t.Hd().Kc());r.Ob();)n=r.Pb(),mrn(e,n,de(s++));return G0n(e.a)}function lln(t,e){var n,r,s;for(s=new Cr,r=e.vc().Kc();r.Ob();)n=u(r.Pb(),42),ki(s,n.cd(),ecn(t,u(n.dd(),15)));return s}function i3t(t,e){t.n.c.length==0&&ue(t.n,new f$(t.s,t.t,t.i)),ue(t.b,e),$3t(u(Fe(t.n,t.n.c.length-1),211),e),lle(t,e)}function o4(t){return(t.c!=t.b.b||t.i!=t.g.b)&&(t.a.c=Pt(Xn,Ie,1,0,5,1),As(t.a,t.b),As(t.a,t.g),t.c=t.b.b,t.i=t.g.b),t.a}function qit(t,e){var n,r,s;for(s=0,r=u(e.Kb(t),20).Kc();r.Ob();)n=u(r.Pb(),17),je(Re(Q(n,(se(),$1))))||++s;return s}function hln(t,e){var n,r,s;r=Z3(e),s=Xt(ye(iy(r,(Te(),xf)))),n=b.Math.max(0,s/2-.5),c_(e,n,1),ue(t,new UGt(e,n))}function hh(){hh=Z,CO=new CM(K0,0),yS=new CM("FIRST",1),fb=new CM(c1e,2),xS=new CM("LAST",3),Fy=new CM(u1e,4)}function q0(){q0=Z,gft=new KR(O_,0),XO=new KR("POLYLINE",1),A7=new KR("ORTHOGONAL",2),H6=new KR("SPLINES",3)}function Tz(){Tz=Z,N_t=new jet("ASPECT_RATIO_DRIVEN",0),$ht=new jet("MAX_SCALE_DRIVEN",1),O_t=new jet("AREA_DRIVEN",2)}function GI(){GI=Z,AV=new $et("P1_STRUCTURE",0),LV=new $et("P2_PROCESSING_ORDER",1),MV=new $et("P3_EXECUTION",2)}function Cz(){Cz=Z,Nht=new Fet("OVERLAP_REMOVAL",0),Dht=new Fet("COMPACTION",1),Oht=new Fet("GRAPH_SIZE_CALCULATION",2)}function rw(t,e){return y1(),gf(eb),b.Math.abs(t-e)<=eb||t==e||isNaN(t)&&isNaN(e)?0:te?1:Lv(isNaN(t),isNaN(e))}function eie(t,e){var n,r;for(n=ei(t,0);n.b!=n.d.c;){if(r=lM(ye(ti(n))),r==e)return;if(r>e){krt(n);break}}XM(n,e)}function an(t,e){var n,r,s,o,h;if(n=e.f,p2(t.c.d,n,e),e.g!=null)for(s=e.g,o=0,h=s.length;oe&&r.ue(t[o-1],t[o])>0;--o)h=t[o],Ji(t,o,t[o-1]),Ji(t,o-1,h)}function fh(t,e,n,r){if(e<0)E5t(t,n,r);else{if(!n.Ij())throw rt(new Pn(ab+n.ne()+W_));u(n,66).Nj().Tj(t,t.yh(),e,r)}}function _z(t,e){if(e==t.d)return t.e;if(e==t.e)return t.d;throw rt(new Pn("Node "+e+" not part of edge "+t))}function dln(t,e){switch(e.g){case 2:return t.b;case 1:return t.c;case 4:return t.d;case 3:return t.a;default:return!1}}function nie(t,e){switch(e.g){case 2:return t.b;case 1:return t.c;case 4:return t.d;case 3:return t.a;default:return!1}}function s3t(t,e,n,r){switch(e){case 3:return t.f;case 4:return t.g;case 5:return t.i;case 6:return t.j}return Yyt(t,e,n,r)}function gln(t){return t.k!=(Gn(),Ds)?!1:A8(new Tn(null,new Fv(new ar(lr(Ms(t).a.Kc(),new z)))),new LF)}function pln(t){return t.e==null?t:(!t.c&&(t.c=new eat((t.f&256)!=0,t.i,t.a,t.d,(t.f&16)!=0,t.j,t.g,null)),t.c)}function bln(t,e){return t.h==ID&&t.m==0&&t.l==0?(e&&(ob=ru(0,0,0)),rUt((N8(),J8t))):(e&&(ob=ru(t.l,t.m,t.h)),ru(0,0,0))}function $o(t){var e;return Array.isArray(t)&&t.im===Ct?Ap(sl(t))+"@"+(e=Hi(t)>>>0,e.toString(16)):t.toString()}function e_(t){var e;this.a=(e=u(t.e&&t.e(),9),new rh(e,u(uf(e,e.length),9),0)),this.b=Pt(Xn,Ie,1,this.a.a.length,5,1)}function vln(t){var e,n,r;for(this.a=new A0,r=new S(t);r.a0&&(Rr(e-1,t.length),t.charCodeAt(e-1)==58)&&!Hit(t,iA,sA))}function Hit(t,e,n){var r,s;for(r=0,s=t.length;r=s)return e.c+n;return e.c+e.b.gc()}function kln(t,e){f8();var n,r,s,o;for(r=bte(t),s=e,D8(r,0,r.length,s),n=0;n0&&(r+=s,++n);return n>1&&(r+=t.d*(n-1)),r}function o3t(t){var e,n,r;for(r=new xg,r.a+="[",e=0,n=t.gc();e0&&this.b>0&&qvt(this.c,this.b,this.a)}function l3t(t){Vit(),this.c=_1(ct(ot(wxn,1),Ie,831,0,[Rwe])),this.b=new Cr,this.a=t,ki(this.b,oV,1),mu(jwe,new V$t(this))}function rie(t,e){var n;return t.d?kl(t.b,e)?u(Jn(t.b,e),51):(n=e.Kf(),ki(t.b,e,n),n):e.Kf()}function h3t(t,e){var n;return Gt(t)===Gt(e)?!0:Et(e,91)?(n=u(e,91),t.e==n.e&&t.d==n.d&&csn(t,n.a)):!1}function Jx(t){switch(be(),t.g){case 4:return Nn;case 1:return Hn;case 3:return mr;case 2:return Bn;default:return Zo}}function f3t(t,e){switch(e){case 3:return t.f!=0;case 4:return t.g!=0;case 5:return t.i!=0;case 6:return t.j!=0}return hyt(t,e)}function Aln(t){switch(t.g){case 0:return new rZ;case 1:return new HF;default:throw rt(new Pn(xct+(t.f!=null?t.f:""+t.g)))}}function iie(t){switch(t.g){case 0:return new qF;case 1:return new GF;default:throw rt(new Pn(Bot+(t.f!=null?t.f:""+t.g)))}}function sie(t){switch(t.g){case 0:return new Gpt;case 1:return new bqt;default:throw rt(new Pn(pH+(t.f!=null?t.f:""+t.g)))}}function Lln(t){switch(t.g){case 1:return new ZQ;case 2:return new kWt;default:throw rt(new Pn(xct+(t.f!=null?t.f:""+t.g)))}}function Mln(t){var e,n;if(t.b)return t.b;for(n=R1?null:t.d;n;){if(e=R1?null:n.b,e)return e;n=R1?null:n.d}return s8(),LEt}function Iln(t){var e,n,r;return t.e==0?0:(e=t.d<<5,n=t.a[t.d-1],t.e<0&&(r=pne(t),r==t.d-1&&(--n,n=n|0)),e-=lD(n),e)}function Dln(t){var e,n,r;return t>5,e=t&31,r=Pt(Tr,Xr,25,n+1,15,1),r[n]=1<3;)s*=10,--o;t=(t+(s>>1))/s|0}return r.i=t,!0}function Nln(t){return Iit(),Fn(),!!(nie(u(t.a,81).j,u(t.b,103))||u(t.a,81).d.e!=0&&nie(u(t.a,81).j,u(t.b,103)))}function Pln(t){O$(),u(t.We((ci(),vb)),174).Hc((cl(),WV))&&(u(t.We(Ky),174).Fc((Qu(),G6)),u(t.We(vb),174).Mc(WV))}function oie(t,e){var n,r;if(e){for(n=0;n=0;--r)for(e=n[r],s=0;s>1,this.k=e-1>>1}function zln(t,e){wr(e,"End label post-processing",1),us(Ri(Wo(new Tn(null,new _n(t.b,16)),new hY),new fY),new dY),or(e)}function qln(t,e,n){var r,s;return r=Xt(t.p[e.i.p])+Xt(t.d[e.i.p])+e.n.b+e.a.b,s=Xt(t.p[n.i.p])+Xt(t.d[n.i.p])+n.n.b+n.a.b,s-r}function Hln(t,e,n){var r,s;for(r=Ps(n,co),s=0;yc(r,0)!=0&&s0&&(Rr(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e))}function Vln(t){var e;return t==null?null:new Np((e=$c(t,!0),e.length>0&&(Rr(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e))}function m3t(t,e){var n;return t.i>0&&(e.lengtht.i&&Ji(e,t.i,null),e}function Qc(t,e,n){var r,s,o;return t.ej()?(r=t.i,o=t.fj(),zI(t,r,e),s=t.Zi(3,null,e,r,o),n?n.Ei(s):n=s):zI(t,t.i,e),n}function Uln(t,e,n){var r,s;return r=new F0(t.e,4,10,(s=e.c,Et(s,88)?u(s,26):(dn(),Wh)),null,Fg(t,e),!1),n?n.Ei(r):n=r,n}function Wln(t,e,n){var r,s;return r=new F0(t.e,3,10,null,(s=e.c,Et(s,88)?u(s,26):(dn(),Wh)),Fg(t,e),!1),n?n.Ei(r):n=r,n}function lie(t){Bm();var e;return e=new yo(u(t.e.We((ci(),a5)),8)),t.B.Hc((cl(),M7))&&(e.a<=0&&(e.a=20),e.b<=0&&(e.b=20)),e}function hie(t){sy();var e;return(t.q?t.q:(vn(),vn(),a0))._b((Te(),Nw))?e=u(Q(t,Nw),197):e=u(Q(Fa(t),CS),197),e}function iy(t,e){var n,r;return r=null,Vs(t,(Te(),sV))&&(n=u(Q(t,sV),94),n.Xe(e)&&(r=n.We(e))),r==null&&(r=Q(Fa(t),e)),r}function fie(t,e){var n,r,s;return Et(e,42)?(n=u(e,42),r=n.cd(),s=ny(t.Rc(),r),fd(s,n.dd())&&(s!=null||t.Rc()._b(r))):!1}function Wit(t,e){var n,r,s;return t.f>0?(t.qj(),r=e==null?0:Hi(e),s=(r&vi)%t.d.length,n=fce(t,s,r,e),n!=-1):!1}function Yf(t,e){var n,r,s;return t.f>0&&(t.qj(),r=e==null?0:Hi(e),s=(r&vi)%t.d.length,n=r5t(t,s,r,e),n)?n.dd():null}function VI(t,e){var n,r,s,o;for(o=au(t.e.Tg(),e),n=u(t.g,119),s=0;s1?C1(M0(e.a[1],32),Ps(e.a[0],co)):Ps(e.a[0],co),Vv(Ca(e.e,n))))}function UI(t,e){var n;return Bo(t)&&Bo(e)&&(n=t%e,DD>5,e&=31,s=t.d+n+(e==0?0:1),r=Pt(Tr,Xr,25,s,15,1),Kdn(r,t.a,n,e),o=new K3(t.e,s,r),OC(o),o}function x3t(t,e,n){var r,s;r=u(Fc(O7,e),117),s=u(Fc(hA,e),117),n?(xo(O7,t,r),xo(hA,t,s)):(xo(hA,t,r),xo(O7,t,s))}function mie(t,e,n){var r,s,o;for(s=null,o=t.b;o;){if(r=t.a.ue(e,o.d),n&&r==0)return o;r>=0?o=o.a[1]:(s=o,o=o.a[0])}return s}function yie(t,e,n){var r,s,o;for(s=null,o=t.b;o;){if(r=t.a.ue(e,o.d),n&&r==0)return o;r<=0?o=o.a[0]:(s=o,o=o.a[1])}return s}function Zln(t,e,n,r){var s,o,h;return s=!1,O3n(t.f,n,r)&&(Ehn(t.f,t.a[e][n],t.a[e][r]),o=t.a[e],h=o[r],o[r]=o[n],o[n]=h,s=!0),s}function k3t(t,e,n,r,s){var o,h,d;for(h=s;e.b!=e.c;)o=u(Fx(e),10),d=u(Yo(o,r).Xb(0),11),t.d[d.p]=h++,n.c[n.c.length]=d;return h}function E3t(t,e,n){var r,s,o,h,d;return h=t.k,d=e.k,r=n[h.g][d.g],s=ye(iy(t,r)),o=ye(iy(e,r)),b.Math.max((On(s),s),(On(o),o))}function Jln(t,e,n){var r,s,o,h;for(r=n/t.c.length,s=0,h=new S(t);h.a2e3&&(vge=t,qH=b.setTimeout(aYe,10))),zH++==0?(Nan((Ypt(),X8t)),!0):!1}function ehn(t,e){var n,r,s;for(r=new ar(lr(Ms(t).a.Kc(),new z));zr(r);)if(n=u(Lr(r),17),s=n.d.i,s.c==e)return!1;return!0}function T3t(t,e){var n,r;if(Et(e,245)){r=u(e,245);try{return n=t.vd(r),n==0}catch(s){if(s=Wi(s),!Et(s,205))throw rt(s)}}return!1}function nhn(){return Error.stackTraceLimit>0?(b.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function rhn(t,e){return y1(),y1(),gf(eb),(b.Math.abs(t-e)<=eb||t==e||isNaN(t)&&isNaN(e)?0:te?1:Lv(isNaN(t),isNaN(e)))>0}function C3t(t,e){return y1(),y1(),gf(eb),(b.Math.abs(t-e)<=eb||t==e||isNaN(t)&&isNaN(e)?0:te?1:Lv(isNaN(t),isNaN(e)))<0}function Eie(t,e){return y1(),y1(),gf(eb),(b.Math.abs(t-e)<=eb||t==e||isNaN(t)&&isNaN(e)?0:te?1:Lv(isNaN(t),isNaN(e)))<=0}function Yit(t,e){for(var n=0;!e[n]||e[n]=="";)n++;for(var r=e[n++];noot)return n.fh();if(r=n.Zg(),r||n==t)break}return r}function _3t(t){return g$(),Et(t,156)?u(Jn(cN,Lge),288).vg(t):kl(cN,sl(t))?u(Jn(cN,sl(t)),288).vg(t):null}function shn(t){if(Oz(qE,t))return Fn(),YE;if(Oz(Oct,t))return Fn(),I2;throw rt(new Pn("Expecting true or false"))}function ahn(t,e){if(e.c==t)return e.d;if(e.d==t)return e.c;throw rt(new Pn("Input edge is not connected to the input port."))}function Lie(t,e){return t.e>e.e?1:t.ee.d?t.e:t.d=48&&t<48+b.Math.min(10,10)?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1}function Iie(t,e){var n;return Gt(e)===Gt(t)?!0:!Et(e,21)||(n=u(e,21),n.gc()!=t.gc())?!1:t.Ic(n)}function ohn(t,e){var n,r,s,o;return r=t.a.length-1,n=e-t.b&r,o=t.c-e&r,s=t.c-t.b&r,oWt(n=o?(aun(t,e),-1):(oun(t,e),1)}function chn(t,e){var n,r;for(n=(Rr(e,t.length),t.charCodeAt(e)),r=e+1;re.e?1:t.fe.f?1:Hi(t)-Hi(e)}function Oz(t,e){return On(t),e==null?!1:hn(t,e)?!0:t.length==e.length&&hn(t.toLowerCase(),e.toLowerCase())}function vhn(t,e){var n,r,s,o;for(r=0,s=e.gc();r0&&yc(t,128)<0?(e=Sr(t)+128,n=(XKt(),aEt)[e],!n&&(n=aEt[e]=new Cm(t)),n):new Cm(t)}function Oie(t,e){var n,r;return n=e.Hh(t.a),n&&(r=Br(Yf((!n.b&&(n.b=new yl((dn(),Qa),cc,n)),n.b),oi)),r!=null)?r:e.ne()}function whn(t,e){var n,r;return n=e.Hh(t.a),n&&(r=Br(Yf((!n.b&&(n.b=new yl((dn(),Qa),cc,n)),n.b),oi)),r!=null)?r:e.ne()}function mhn(t,e){prt();var n,r;for(r=new ar(lr(z0(t).a.Kc(),new z));zr(r);)if(n=u(Lr(r),17),n.d.i==e||n.c.i==e)return n;return null}function L3t(t,e,n){this.c=t,this.f=new le,this.e=new Ta,this.j=new Rvt,this.n=new Rvt,this.b=e,this.g=new ih(e.c,e.d,e.b,e.a),this.a=n}function Xit(t){var e,n,r,s;for(this.a=new A0,this.d=new qs,this.e=0,n=t,r=0,s=n.length;r0):!1}function Fie(t){var e;Gt(qe(t,(ci(),r5)))===Gt(($0(),HV))&&(ts(t)?(e=u(qe(ts(t),r5),334),bo(t,r5,e)):bo(t,r5,YS))}function Ehn(t,e,n){var r,s;Ist(t.e,e,n,(be(),Bn)),Ist(t.i,e,n,Hn),t.a&&(s=u(Q(e,(se(),_i)),11),r=u(Q(n,_i),11),xrt(t.g,s,r))}function Bie(t,e,n){var r,s,o;r=e.c.p,o=e.p,t.b[r][o]=new tQt(t,e),n&&(t.a[r][o]=new Wk(e),s=u(Q(e,(se(),Iw)),10),s&&ln(t.d,s,e))}function Rie(t,e){var n,r,s;if(ue(nG,t),e.Fc(t),n=u(Jn(qut,t),21),n)for(s=n.Kc();s.Ob();)r=u(s.Pb(),33),Ro(nG,r,0)!=-1||Rie(r,e)}function Thn(t,e,n){var r;(Fge?(Mln(t),!0):Bge||jge?(s8(),!0):Rge&&(s8(),!1))&&(r=new fKt(e),r.b=n,S0n(t,r))}function Qit(t,e){var n;n=!t.A.Hc((_l(),V2))||t.q==(oa(),Vc),t.u.Hc((Qu(),tg))?n?U4n(t,e):ghe(t,e):t.u.Hc(xb)&&(n?h4n(t,e):Ahe(t,e))}function cE(t,e){var n,r;if(++t.j,e!=null&&(n=(r=t.a.Cb,Et(r,97)?u(r,97).Jg():null),mpn(e,n))){t6(t.a,4,n);return}t6(t.a,4,u(e,126))}function jie(t,e,n){return new ih(b.Math.min(t.a,e.a)-n/2,b.Math.min(t.b,e.b)-n/2,b.Math.abs(t.a-e.a)+n,b.Math.abs(t.b-e.b)+n)}function Chn(t,e){var n,r;return n=du(t.a.c.p,e.a.c.p),n!=0?n:(r=du(t.a.d.i.p,e.a.d.i.p),r!=0?r:du(e.a.d.p,t.a.d.p))}function _hn(t,e,n){var r,s,o,h;return o=e.j,h=n.j,o!=h?o.g-h.g:(r=t.f[e.p],s=t.f[n.p],r==0&&s==0?0:r==0?-1:s==0?1:Ls(r,s))}function $ie(t,e,n){var r,s,o;if(!n[e.d])for(n[e.d]=!0,s=new S(o4(e));s.a=s)return s;for(e=e>0?e:0;er&&Ji(e,r,null),e}function qie(t,e){var n,r;for(r=t.a.length,e.lengthr&&Ji(e,r,null),e}function p2(t,e,n){var r,s,o;return s=u(Jn(t.e,e),387),s?(o=J2t(s,n),OUt(t,s),o):(r=new _vt(t,e,n),ki(t.e,e,r),sQt(r),null)}function Lhn(t){var e;if(t==null)return null;if(e=Ebn($c(t,!0)),e==null)throw rt(new ret("Invalid hexBinary value: '"+t+"'"));return e}function KI(t){return Jp(),yc(t,0)<0?yc(t,-1)!=0?new g4t(-1,O8(t)):_ut:yc(t,10)<=0?wEt[Sr(t)]:new g4t(1,t)}function Jit(){return Lq(),ct(ot(Epe,1),ae,159,0,[xpe,ype,kpe,fpe,hpe,dpe,bpe,ppe,gpe,mpe,wpe,vpe,upe,cpe,lpe,ape,spe,ope,rpe,npe,ipe,Put])}function Hie(t){var e;this.d=new le,this.j=new Ta,this.g=new Ta,e=t.g.b,this.f=u(Q(Fa(e),(Te(),Vl)),103),this.e=Xt(ye(Fz(e,Gy)))}function Gie(t){this.b=new le,this.e=new le,this.d=t,this.a=!j9(Ri(new Tn(null,new Fv(new S1(t.b))),new Zt(new MF))).sd((Wb(),JE))}function Xf(){Xf=Z,qn=new AM("PARENTS",0),Js=new AM("NODES",1),Id=new AM("EDGES",2),$2=new AM("PORTS",3),Xg=new AM("LABELS",4)}function c4(){c4=Z,mb=new MM("DISTRIBUTED",0),JO=new MM("JUSTIFIED",1),CAt=new MM("BEGIN",2),XS=new MM(NE,3),_At=new MM("END",4)}function Mhn(t){var e;switch(e=t.yi(null),e){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function tst(t){switch(t.g){case 1:return ao(),Z0;case 4:return ao(),jh;case 2:return ao(),kf;case 3:return ao(),Q0}return ao(),c0}function Ihn(t,e,n){var r;switch(r=n.q.getFullYear()-nb+nb,r<0&&(r=-r),e){case 1:t.a+=r;break;case 2:Xd(t,r%100,2);break;default:Xd(t,r,e)}}function ei(t,e){var n,r;if(Um(e,t.b),e>=t.b>>1)for(r=t.c,n=t.b;n>e;--n)r=r.b;else for(r=t.a.a,n=0;n=64&&e<128&&(s=C1(s,M0(1,e-64)));return s}function Fz(t,e){var n,r;return r=null,Vs(t,(ci(),q6))&&(n=u(Q(t,q6),94),n.Xe(e)&&(r=n.We(e))),r==null&&Fa(t)&&(r=Q(Fa(t),e)),r}function Wie(t,e){var n,r,s;s=e.d.i,r=s.k,!(r==(Gn(),Ds)||r==j1)&&(n=new ar(lr(Ms(s).a.Kc(),new z)),zr(n)&&ki(t.k,e,u(Lr(n),17)))}function est(t,e){var n,r,s;return r=yn(t.Tg(),e),n=e-t.Ah(),n<0?(s=t.Yg(r),s>=0?t.lh(s):zst(t,r)):n<0?zst(t,r):u(r,66).Nj().Sj(t,t.yh(),n)}function De(t){var e;if(Et(t.a,4)){if(e=_3t(t.a),e==null)throw rt(new Fo(G1e+t.b+"'. "+H1e+(L0(uN),uN.k)+a8t));return e}else return t.a}function Nhn(t){var e;if(t==null)return null;if(e=t5n($c(t,!0)),e==null)throw rt(new ret("Invalid base64Binary value: '"+t+"'"));return e}function dr(t){var e;try{return e=t.i.Xb(t.e),t.mj(),t.g=t.e++,e}catch(n){throw n=Wi(n),Et(n,73)?(t.mj(),rt(new lc)):rt(n)}}function nst(t){var e;try{return e=t.c.ki(t.e),t.mj(),t.g=t.e++,e}catch(n){throw n=Wi(n),Et(n,73)?(t.mj(),rt(new lc)):rt(n)}}function i_(){i_=Z,c7t=(ci(),iAt),$ut=FSt,Fpe=$6,o7t=q2,$pe=(Kz(),$Et),jpe=REt,zpe=qEt,Rpe=BEt,Bpe=(Sit(),i7t),jut=Ope,a7t=Npe,eG=Ppe}function Bz(t){switch(pbt(),this.c=new le,this.d=t,t.g){case 0:case 2:this.a=Ewt(_7t),this.b=ss;break;case 3:case 1:this.a=_7t,this.b=Ts}}function Kie(t,e,n){var r,s;if(t.c)yu(t.c,t.c.i+e),xu(t.c,t.c.j+n);else for(s=new S(t.b);s.a0&&(ue(t.b,new AKt(e.a,n)),r=e.a.length,0r&&(e.a+=DUt(Pt(mh,vd,25,-r,15,1))))}function Yie(t,e){var n,r,s;for(n=t.o,s=u(u(Ai(t.r,e),21),84).Kc();s.Ob();)r=u(s.Pb(),111),r.e.a=Bfn(r,n.a),r.e.b=n.b*Xt(ye(r.b.We(ZH)))}function Fhn(t,e){var n,r,s,o;return s=t.k,n=Xt(ye(Q(t,(se(),Dw)))),o=e.k,r=Xt(ye(Q(e,Dw))),o!=(Gn(),xs)?-1:s!=xs?1:n==r?0:n=0?t.hh(e,n,r):(t.eh()&&(r=(s=t.Vg(),s>=0?t.Qg(r):t.eh().ih(t,-1-s,null,r))),t.Sg(e,n,r))}function I3t(t,e){switch(e){case 7:!t.e&&(t.e=new Cn(Ws,t,7,4)),xr(t.e);return;case 8:!t.d&&(t.d=new Cn(Ws,t,8,5)),xr(t.d);return}v3t(t,e)}function Qf(t,e){var n;n=t.Zc(e);try{return n.Pb()}catch(r){throw r=Wi(r),Et(r,109)?rt(new mo("Can't get element "+e)):rt(r)}}function D3t(t,e){this.e=t,e=0&&(n.d=t.t);break;case 3:t.t>=0&&(n.a=t.t)}t.C&&(n.b=t.C.b,n.c=t.C.c)}function n6(){n6=Z,cO=new $R(Rq,0),oO=new $R(xot,1),uO=new $R(kot,2),lO=new $R(Eot,3),cO.a=!1,oO.a=!0,uO.a=!1,lO.a=!0}function s_(){s_=Z,hO=new jR(Rq,0),JH=new jR(xot,1),tG=new jR(kot,2),fO=new jR(Eot,3),hO.a=!1,JH.a=!0,tG.a=!1,fO.a=!0}function zhn(t){var e;e=t.a;do e=u(Lr(new ar(lr(jo(e).a.Kc(),new z))),17).c.i,e.k==(Gn(),Zs)&&t.b.Fc(e);while(e.k==(Gn(),Zs));t.b=a2(t.b)}function qhn(t){var e,n,r;for(r=t.c.a,t.p=(Ar(r),new Pu(r)),n=new S(r);n.an.b)return!0}return!1}function rst(t,e){return ea(t)?!!lge[e]:t.hm?!!t.hm[e]:Nm(t)?!!uge[e]:Om(t)?!!cge[e]:!1}function bo(t,e,n){return n==null?(!t.o&&(t.o=new Tl((Zc(),Eb),$w,t,0)),Iz(t.o,e)):(!t.o&&(t.o=new Tl((Zc(),Eb),$w,t,0)),Yz(t.o,e,n)),t}function Uhn(t,e,n,r){var s,o;o=e.Xe((ci(),s5))?u(e.We(s5),21):t.j,s=Pun(o),s!=(Lq(),Put)&&(n&&!S3t(s)||B4t(Tbn(t,s,r),e))}function jz(t,e,n,r){var s,o,h;return o=yn(t.Tg(),e),s=e-t.Ah(),s<0?(h=t.Yg(o),h>=0?t._g(h,n,!0):lw(t,o,n)):u(o,66).Nj().Pj(t,t.yh(),s,n,r)}function Whn(t,e,n,r){var s,o,h;n.mh(e)&&(to(),Yrt(e)?(s=u(n.ah(e),153),vhn(t,s)):(o=(h=e,h?u(r,49).xh(h):null),o&&YWe(n.ah(e),o)))}function Khn(t){switch(t.g){case 1:return tw(),aO;case 3:return tw(),sO;case 2:return tw(),But;case 4:return tw(),Fut;default:return null}}function O3t(t){switch(typeof t){case Oat:return Bg(t);case Lxt:return ps(t);case u6:return Fn(),t?1231:1237;default:return t==null?0:Iv(t)}}function Yhn(t,e,n){if(t.e)switch(t.b){case 1:Tnn(t.c,e,n);break;case 0:Cnn(t.c,e,n)}else BZt(t.c,e,n);t.a[e.p][n.p]=t.c.i,t.a[n.p][e.p]=t.c.e}function tse(t){var e,n;if(t==null)return null;for(n=Pt(o0,te,193,t.length,0,2),e=0;e=0)return s;if(t.Fk()){for(r=0;r=s)throw rt(new jm(e,s));if(t.hi()&&(r=t.Xc(n),r>=0&&r!=e))throw rt(new Pn(XD));return t.mi(e,n)}function N3t(t,e){if(this.a=u(Ar(t),245),this.b=u(Ar(e),245),t.vd(e)>0||t==(Qtt(),put)||e==(Xtt(),but))throw rt(new Pn("Invalid range: "+OZt(t,e)))}function ese(t){var e,n;for(this.b=new le,this.c=t,this.a=!1,n=new S(t.a);n.a0),(e&-e)==e)return ps(e*ol(t,31)*4656612873077393e-25);do n=ol(t,31),r=n%e;while(n-r+(e-1)<0);return ps(r)}function Bg(t){dKt();var e,n,r;return n=":"+t,r=YH[n],r!=null?ps((On(r),r)):(r=IEt[n],e=r==null?z2n(t):ps((On(r),r)),bnn(),YH[n]=e,e)}function rse(t,e,n){wr(n,"Compound graph preprocessor",1),t.a=new Hv,uhe(t,e,null),Ayn(t,e),l2n(t),Jt(e,(se(),XTt),t.a),t.a=null,Yu(t.b),or(n)}function Zhn(t,e,n){switch(n.g){case 1:t.a=e.a/2,t.b=0;break;case 2:t.a=e.a,t.b=e.b/2;break;case 3:t.a=e.a/2,t.b=e.b;break;case 4:t.a=0,t.b=e.b/2}}function Jhn(t){var e,n,r;for(r=u(Ai(t.a,(g4(),IG)),15).Kc();r.Ob();)n=u(r.Pb(),101),e=W3t(n),w8(t,n,e[0],(Jv(),Sw),0),w8(t,n,e[1],Aw,1)}function tfn(t){var e,n,r;for(r=u(Ai(t.a,(g4(),DG)),15).Kc();r.Ob();)n=u(r.Pb(),101),e=W3t(n),w8(t,n,e[0],(Jv(),Sw),0),w8(t,n,e[1],Aw,1)}function ist(t){switch(t.g){case 0:return null;case 1:return new rne;case 2:return new Vpt;default:throw rt(new Pn(xct+(t.f!=null?t.f:""+t.g)))}}function YI(t,e,n){var r,s;for(kcn(t,e-t.s,n-t.t),s=new S(t.n);s.a1&&(o=Qhn(t,e)),o}function sst(t){var e;return t.f&&t.f.kh()&&(e=u(t.f,49),t.f=u(Kp(t,e),82),t.f!=e&&t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,9,8,e,t.f))),t.f}function ast(t){var e;return t.i&&t.i.kh()&&(e=u(t.i,49),t.i=u(Kp(t,e),82),t.i!=e&&t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,9,7,e,t.i))),t.i}function no(t){var e;return t.b&&t.b.Db&64&&(e=t.b,t.b=u(Kp(t,e),18),t.b!=e&&t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,9,21,e,t.b))),t.b}function qz(t,e){var n,r,s;t.d==null?(++t.e,++t.f):(r=e.Sh(),v2n(t,t.f+1),s=(r&vi)%t.d.length,n=t.d[s],!n&&(n=t.d[s]=t.uj()),n.Fc(e),++t.f)}function B3t(t,e,n){var r;return e.Kj()?!1:e.Zj()!=-2?(r=e.zj(),r==null?n==null:yi(r,n)):e.Hj()==t.e.Tg()&&n==null}function Hz(){var t;Bl(16,Jhe),t=Kee(16),this.b=Pt(wut,LD,317,t,0,1),this.c=Pt(wut,LD,317,t,0,1),this.a=null,this.e=null,this.i=0,this.f=t-1,this.g=0}function H0(t){evt.call(this),this.k=(Gn(),Ds),this.j=(Bl(6,my),new Yc(6)),this.b=(Bl(2,my),new Yc(2)),this.d=new Vtt,this.f=new Fpt,this.a=t}function nfn(t){var e,n;t.c.length<=1||(e=eue(t,(be(),mr)),Hae(t,u(e.a,19).a,u(e.b,19).a),n=eue(t,Bn),Hae(t,u(n.a,19).a,u(n.b,19).a))}function a_(){a_=Z,ACt=new TM("SIMPLE",0),lht=new TM(jot,1),hht=new TM("LINEAR_SEGMENTS",2),AS=new TM("BRANDES_KOEPF",3),LS=new TM(C1e,4)}function R3t(t,e,n){Dx(u(Q(e,(Te(),os)),98))||(Dmt(t,e,Rg(e,n)),Dmt(t,e,Rg(e,(be(),mr))),Dmt(t,e,Rg(e,Nn)),vn(),Xs(e.j,new aM(t)))}function ise(t,e,n,r){var s,o,h;for(s=u(Ai(r?t.a:t.b,e),21),h=s.Kc();h.Ob();)if(o=u(h.Pb(),33),dq(t,n,o))return!0;return!1}function ost(t){var e,n;for(n=new er(t);n.e!=n.i.gc();)if(e=u(dr(n),87),e.e||(!e.d&&(e.d=new Ss(ho,e,1)),e.d).i!=0)return!0;return!1}function cst(t){var e,n;for(n=new er(t);n.e!=n.i.gc();)if(e=u(dr(n),87),e.e||(!e.d&&(e.d=new Ss(ho,e,1)),e.d).i!=0)return!0;return!1}function rfn(t){var e,n,r;for(e=0,r=new S(t.c.a);r.a102?-1:t<=57?t-48:t<65?-1:t<=70?t-65+10:t<97?-1:t-97+10}function hst(t,e){if(t==null)throw rt(new yx("null key in entry: null="+e));if(e==null)throw rt(new yx("null value in entry: "+t+"=null"))}function ifn(t,e){for(var n,r;t.Ob();)if(!e.Ob()||(n=t.Pb(),r=e.Pb(),!(Gt(n)===Gt(r)||n!=null&&yi(n,r))))return!1;return!e.Ob()}function ase(t,e){var n;return n=ct(ot(ia,1),vo,25,15,[Mit(t.a[0],e),Mit(t.a[1],e),Mit(t.a[2],e)]),t.d&&(n[0]=b.Math.max(n[0],n[2]),n[2]=n[0]),n}function ose(t,e){var n;return n=ct(ot(ia,1),vo,25,15,[wz(t.a[0],e),wz(t.a[1],e),wz(t.a[2],e)]),t.d&&(n[0]=b.Math.max(n[0],n[2]),n[2]=n[0]),n}function v2(){v2=Z,mlt=new EM("GREEDY",0),STt=new EM(h1e,1),ylt=new EM(jot,2),pS=new EM("MODEL_ORDER",3),gS=new EM("GREEDY_MODEL_ORDER",4)}function cse(t,e){var n,r,s;for(t.b[e.g]=1,r=ei(e.d,0);r.b!=r.d.c;)n=u(ti(r),188),s=n.c,t.b[s.g]==1?ni(t.a,n):t.b[s.g]==2?t.b[s.g]=1:cse(t,s)}function sfn(t,e){var n,r,s;for(s=new Yc(e.gc()),r=e.Kc();r.Ob();)n=u(r.Pb(),286),n.c==n.f?pE(t,n,n.c):rgn(t,n)||(s.c[s.c.length]=n);return s}function afn(t,e,n){var r,s,o,h,d;for(d=t.r+e,t.r+=e,t.d+=n,r=n/t.n.c.length,s=0,h=new S(t.n);h.ao&&Ji(e,o,null),e}function yfn(t,e){var n,r;if(r=t.gc(),e==null){for(n=0;n0&&(w+=s),k[C]=h,h+=d*(w+r)}function bse(t){var e,n,r;for(r=t.f,t.n=Pt(ia,vo,25,r,15,1),t.d=Pt(ia,vo,25,r,15,1),e=0;e0?t.c:0),++s;t.b=r,t.d=o}function Sfn(t,e){var n,r,s,o,h;for(r=0,s=0,n=0,h=new S(e);h.a0?t.g:0),++n;t.c=s,t.d=r}function xse(t,e){var n;return n=ct(ot(ia,1),vo,25,15,[F3t(t,(Kf(),sc),e),F3t(t,tu,e),F3t(t,ac,e)]),t.f&&(n[0]=b.Math.max(n[0],n[2]),n[2]=n[0]),n}function Afn(t,e,n){var r;try{bq(t,e+t.j,n+t.k,!1,!0)}catch(s){throw s=Wi(s),Et(s,73)?(r=s,rt(new mo(r.g+$q+e+Ka+n+")."))):rt(s)}}function Lfn(t,e,n){var r;try{bq(t,e+t.j,n+t.k,!0,!1)}catch(s){throw s=Wi(s),Et(s,73)?(r=s,rt(new mo(r.g+$q+e+Ka+n+")."))):rt(s)}}function kse(t){var e;Vs(t,(Te(),Ow))&&(e=u(Q(t,Ow),21),e.Hc((fy(),Ef))?(e.Mc(Ef),e.Fc(Tf)):e.Hc(Tf)&&(e.Mc(Tf),e.Fc(Ef)))}function Ese(t){var e;Vs(t,(Te(),Ow))&&(e=u(Q(t,Ow),21),e.Hc((fy(),_f))?(e.Mc(_f),e.Fc(zh)):e.Hc(zh)&&(e.Mc(zh),e.Fc(_f)))}function Mfn(t,e,n){wr(n,"Self-Loop ordering",1),us(pu(Ri(Ri(Wo(new Tn(null,new _n(e.b,16)),new cF),new UY),new WY),new KY),new _m(t)),or(n)}function QI(t,e,n,r){var s,o;for(s=e;s0&&(s.b+=e),s}function Uz(t,e){var n,r,s;for(s=new Ta,r=t.Kc();r.Ob();)n=u(r.Pb(),37),w_(n,0,s.b),s.b+=n.f.b+e,s.a=b.Math.max(s.a,n.f.a);return s.a>0&&(s.a+=e),s}function Cse(t){var e,n,r;for(r=vi,n=new S(t.a);n.a>16==6?t.Cb.ih(t,5,r1,e):(r=no(u(yn((n=u(In(t,16),26),n||t.zh()),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function Pfn(t){T8();var e=t.e;if(e&&e.stack){var n=e.stack,r=e+` +`;return n.substring(0,r.length)==r&&(n=n.substring(r.length)),n.split(` +`)}return[]}function Ffn(t){var e;return e=(qee(),kge),e[t>>>28]|e[t>>24&15]<<4|e[t>>20&15]<<8|e[t>>16&15]<<12|e[t>>12&15]<<16|e[t>>8&15]<<20|e[t>>4&15]<<24|e[t&15]<<28}function Ase(t){var e,n,r;t.b==t.c&&(r=t.a.length,n=Tyt(b.Math.max(8,r))<<1,t.b!=0?(e=uf(t.a,n),Xee(t,e,r),t.a=e,t.b=0):Yzt(t.a,n),t.c=r)}function Bfn(t,e){var n;return n=t.b,n.Xe((ci(),hl))?n.Hf()==(be(),Bn)?-n.rf().a-Xt(ye(n.We(hl))):e+Xt(ye(n.We(hl))):n.Hf()==(be(),Bn)?-n.rf().a:e}function ZI(t){var e;return t.b.c.length!=0&&u(Fe(t.b,0),70).a?u(Fe(t.b,0),70).a:(e=rrt(t),e??""+(t.c?Ro(t.c.a,t,0):-1))}function Wz(t){var e;return t.f.c.length!=0&&u(Fe(t.f,0),70).a?u(Fe(t.f,0),70).a:(e=rrt(t),e??""+(t.i?Ro(t.i.j,t,0):-1))}function Rfn(t,e){var n,r;if(e<0||e>=t.gc())return null;for(n=e;n0?t.c:0),s=b.Math.max(s,e.d),++r;t.e=o,t.b=s}function $fn(t){var e,n;if(!t.b)for(t.b=y$(u(t.f,118).Ag().i),n=new er(u(t.f,118).Ag());n.e!=n.i.gc();)e=u(dr(n),137),ue(t.b,new net(e));return t.b}function zfn(t,e){var n,r,s;if(e.dc())return f8(),f8(),lN;for(n=new IWt(t,e.gc()),s=new er(t);s.e!=s.i.gc();)r=dr(s),e.Hc(r)&&Mr(n,r);return n}function V3t(t,e,n,r){return e==0?r?(!t.o&&(t.o=new Tl((Zc(),Eb),$w,t,0)),t.o):(!t.o&&(t.o=new Tl((Zc(),Eb),$w,t,0)),fI(t.o)):jz(t,e,n,r)}function mst(t){var e,n;if(t.rb)for(e=0,n=t.rb.i;e>22),s+=r>>22,s<0)?!1:(t.l=n&ul,t.m=r&ul,t.h=s&W0,!0)}function Vfn(t,e,n,r,s,o,h){var d,w;return!(e.Ae()&&(w=t.a.ue(n,r),w<0||!s&&w==0)||e.Be()&&(d=t.a.ue(n,o),d>0||!h&&d==0))}function Ufn(t,e){J8();var n;if(n=t.j.g-e.j.g,n!=0)return 0;switch(t.j.g){case 2:return qit(e,mTt)-qit(t,mTt);case 4:return qit(t,wTt)-qit(e,wTt)}return 0}function Wfn(t){switch(t.g){case 0:return klt;case 1:return Elt;case 2:return Tlt;case 3:return Clt;case 4:return PG;case 5:return _lt;default:return null}}function Co(t,e,n){var r,s;return r=(s=new Ktt,f2(s,e),Xc(s,n),Mr((!t.c&&(t.c=new he(zw,t,12,10)),t.c),s),s),Ig(r,0),ty(r,1),Pg(r,!0),Ng(r,!0),r}function r6(t,e){var n,r;if(e>=t.i)throw rt(new Vet(e,t.i));return++t.j,n=t.g[e],r=t.i-e-1,r>0&&Ic(t.g,e+1,t.g,e,r),Ji(t.g,--t.i,null),t.fi(e,n),t.ci(),n}function Lse(t,e){var n,r;return t.Db>>16==17?t.Cb.ih(t,21,Gh,e):(r=no(u(yn((n=u(In(t,16),26),n||t.zh()),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function Kfn(t){var e,n,r,s;for(vn(),Xs(t.c,t.a),s=new S(t.c);s.an.a.c.length))throw rt(new Pn("index must be >= 0 and <= layer node count"));t.c&&vu(t.c.a,t),t.c=n,n&&$m(n.a,e,t)}function Nse(t,e){var n,r,s;for(r=new ar(lr(z0(t).a.Kc(),new z));zr(r);)return n=u(Lr(r),17),s=u(e.Kb(n),10),new jk(Ar(s.n.b+s.o.b/2));return I9(),I9(),gut}function Pse(t,e){this.c=new Cr,this.a=t,this.b=e,this.d=u(Q(t,(se(),Y4)),304),Gt(Q(t,(Te(),iCt)))===Gt((bI(),FG))?this.e=new fqt:this.e=new hqt}function t1n(t,e){var n,r,s,o;for(o=0,r=new S(t);r.a>16==6?t.Cb.ih(t,6,Ws,e):(r=no(u(yn((n=u(In(t,16),26),n||(Zc(),YV)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function Q3t(t,e){var n,r;return t.Db>>16==7?t.Cb.ih(t,1,sN,e):(r=no(u(yn((n=u(In(t,16),26),n||(Zc(),RAt)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function Z3t(t,e){var n,r;return t.Db>>16==9?t.Cb.ih(t,9,ns,e):(r=no(u(yn((n=u(In(t,16),26),n||(Zc(),$At)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function Bse(t,e){var n,r;return t.Db>>16==5?t.Cb.ih(t,9,iU,e):(r=no(u(yn((n=u(In(t,16),26),n||(dn(),tp)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function J3t(t,e){var n,r;return t.Db>>16==3?t.Cb.ih(t,0,oN,e):(r=no(u(yn((n=u(In(t,16),26),n||(dn(),Jg)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function Rse(t,e){var n,r;return t.Db>>16==7?t.Cb.ih(t,6,r1,e):(r=no(u(yn((n=u(In(t,16),26),n||(dn(),np)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function jse(){this.a=new XF,this.g=new Hz,this.j=new Hz,this.b=new Cr,this.d=new Hz,this.i=new Hz,this.k=new Cr,this.c=new Cr,this.e=new Cr,this.f=new Cr}function i1n(t,e,n){var r,s,o;for(n<0&&(n=0),o=t.i,s=n;soot)return lE(t,r);if(r==t)return!0}}return!1}function a1n(t){switch(gj(),t.q.g){case 5:Eoe(t,(be(),Nn)),Eoe(t,mr);break;case 4:wce(t,(be(),Nn)),wce(t,mr);break;default:whe(t,(be(),Nn)),whe(t,mr)}}function o1n(t){switch(gj(),t.q.g){case 5:Roe(t,(be(),Hn)),Roe(t,Bn);break;case 4:Yie(t,(be(),Hn)),Yie(t,Bn);break;default:mhe(t,(be(),Hn)),mhe(t,Bn)}}function c1n(t){var e,n;e=u(Q(t,(Zf(),rbe)),19),e?(n=e.a,n==0?Jt(t,(Gp(),aG),new zit):Jt(t,(Gp(),aG),new T$(n))):Jt(t,(Gp(),aG),new T$(1))}function u1n(t,e){var n;switch(n=t.i,e.g){case 1:return-(t.n.b+t.o.b);case 2:return t.n.a-n.o.a;case 3:return t.n.b-n.o.b;case 4:return-(t.n.a+t.o.a)}return 0}function l1n(t,e){switch(t.g){case 0:return e==(hh(),fb)?_G:SG;case 1:return e==(hh(),fb)?_G:vO;case 2:return e==(hh(),fb)?vO:SG;default:return vO}}function tD(t,e){var n,r,s;for(vu(t.a,e),t.e-=e.r+(t.a.c.length==0?0:t.c),s=jkt,r=new S(t.a);r.a>16==3?t.Cb.ih(t,12,ns,e):(r=no(u(yn((n=u(In(t,16),26),n||(Zc(),BAt)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function e4t(t,e){var n,r;return t.Db>>16==11?t.Cb.ih(t,10,ns,e):(r=no(u(yn((n=u(In(t,16),26),n||(Zc(),jAt)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function $se(t,e){var n,r;return t.Db>>16==10?t.Cb.ih(t,11,Gh,e):(r=no(u(yn((n=u(In(t,16),26),n||(dn(),ep)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function zse(t,e){var n,r;return t.Db>>16==10?t.Cb.ih(t,12,Vh,e):(r=no(u(yn((n=u(In(t,16),26),n||(dn(),e3)),t.Db>>16),18)),t.Cb.ih(t,r.n,r.f,e))}function Lh(t){var e;return!(t.Bb&1)&&t.r&&t.r.kh()&&(e=u(t.r,49),t.r=u(Kp(t,e),138),t.r!=e&&t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,9,8,e,t.r))),t.r}function xst(t,e,n){var r;return r=ct(ot(ia,1),vo,25,15,[_4t(t,(Kf(),sc),e,n),_4t(t,tu,e,n),_4t(t,ac,e,n)]),t.f&&(r[0]=b.Math.max(r[0],r[2]),r[2]=r[0]),r}function h1n(t,e){var n,r,s;if(s=sfn(t,e),s.c.length!=0)for(Xs(s,new FY),n=s.c.length,r=0;r>19,k=e.h>>19,w!=k?k-w:(s=t.h,d=e.h,s!=d?s-d:(r=t.m,h=e.m,r!=h?r-h:(n=t.l,o=e.l,n-o)))}function Kz(){Kz=Z,HEt=(gq(),Out),qEt=new mn(Gxt,HEt),zEt=($$(),Dut),$Et=new mn(Vxt,zEt),jEt=(Nz(),Iut),REt=new mn(Uxt,jEt),BEt=new mn(Wxt,(Fn(),!0))}function c_(t,e,n){var r,s;r=e*n,Et(t.g,145)?(s=Hx(t),s.f.d?s.f.a||(t.d.a+=r+P1):(t.d.d-=r+P1,t.d.a+=r+P1)):Et(t.g,10)&&(t.d.d-=r,t.d.a+=2*r)}function qse(t,e,n){var r,s,o,h,d;for(s=t[n.g],d=new S(e.d);d.a0?t.g:0),++n;e.b=r,e.e=s}function Hse(t){var e,n,r;if(r=t.b,hGt(t.i,r.length)){for(n=r.length*2,t.b=Pt(wut,LD,317,n,0,1),t.c=Pt(wut,LD,317,n,0,1),t.f=n-1,t.i=0,e=t.a;e;e=e.c)oD(t,e,e);++t.g}}function m1n(t,e,n,r){var s,o,h,d;for(s=0;sh&&(d=h/r),s>o&&(w=o/s),ud(t,b.Math.min(d,w)),t}function x1n(){yq();var t,e;try{if(e=u(f4t((Mp(),Uh),GE),2014),e)return e}catch(n){if(n=Wi(n),Et(n,102))t=n,Jvt((Nr(),t));else throw rt(n)}return new J5}function k1n(){Nte();var t,e;try{if(e=u(f4t((Mp(),Uh),L2),2024),e)return e}catch(n){if(n=Wi(n),Et(n,102))t=n,Jvt((Nr(),t));else throw rt(n)}return new Em}function E1n(){yq();var t,e;try{if(e=u(f4t((Mp(),Uh),Ph),1941),e)return e}catch(n){if(n=Wi(n),Et(n,102))t=n,Jvt((Nr(),t));else throw rt(n)}return new YZ}function T1n(t,e,n){var r,s;return s=t.e,t.e=e,t.Db&4&&!(t.Db&1)&&(r=new Qs(t,1,4,s,e),n?n.Ei(r):n=r),s!=e&&(e?n=_E(t,oq(t,e),n):n=_E(t,t.a,n)),n}function Gse(){_R.call(this),this.e=-1,this.a=!1,this.p=_a,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=_a}function C1n(t,e){var n,r,s;if(r=t.b.d.d,t.a||(r+=t.b.d.a),s=e.b.d.d,e.a||(s+=e.b.d.a),n=Ls(r,s),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function _1n(t,e){var n,r,s;if(r=t.b.b.d,t.a||(r+=t.b.b.a),s=e.b.b.d,e.a||(s+=e.b.b.a),n=Ls(r,s),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function S1n(t,e){var n,r,s;if(r=t.b.g.d,t.a||(r+=t.b.g.a),s=e.b.g.d,e.a||(s+=e.b.g.a),n=Ls(r,s),n==0){if(!t.a&&e.a)return-1;if(!e.a&&t.a)return 1}return n}function r4t(){r4t=Z,vbe=Ku(bi(bi(bi(new Hs,(Wa(),qc),(ro(),iTt)),qc,sTt),Io,aTt),Io,W7t),mbe=bi(bi(new Hs,qc,$7t),qc,K7t),wbe=Ku(new Hs,Io,X7t)}function A1n(t){var e,n,r,s,o;for(e=u(Q(t,(se(),mS)),83),o=t.n,r=e.Cc().Kc();r.Ob();)n=u(r.Pb(),306),s=n.i,s.c+=o.a,s.d+=o.b,n.c?aue(n):oue(n);Jt(t,mS,null)}function L1n(t,e,n){var r,s;switch(s=t.b,r=s.d,e.g){case 1:return-r.d-n;case 2:return s.o.a+r.c+n;case 3:return s.o.b+r.a+n;case 4:return-r.b-n;default:return-1}}function M1n(t){var e,n,r,s,o;if(r=0,s=FE,t.b)for(e=0;e<360;e++)n=e*.017453292519943295,W5t(t,t.d,0,0,I4,n),o=t.b.ig(t.d),o0&&(h=(o&vi)%t.d.length,s=r5t(t,h,o,e),s)?(d=s.ed(n),d):(r=t.tj(o,e,n),t.c.Fc(r),null)}function a4t(t,e){var n,r,s,o;switch(Og(t,e)._k()){case 3:case 2:{for(n=k4(e),s=0,o=n.i;s=0;r--)if(hn(t[r].d,e)||hn(t[r].d,n)){t.length>=r+1&&t.splice(0,r+1);break}return t}function eD(t,e){var n;return Bo(t)&&Bo(e)&&(n=t/e,DD0&&(t.b+=2,t.a+=r):(t.b+=1,t.a+=b.Math.min(r,s))}function Qse(t,e){var n,r;if(r=!1,ea(e)&&(r=!0,Bx(t,new Hm(Br(e)))),r||Et(e,236)&&(r=!0,Bx(t,(n=fvt(u(e,236)),new y9(n)))),!r)throw rt(new tet(x8t))}function K1n(t,e,n,r){var s,o,h;return s=new F0(t.e,1,10,(h=e.c,Et(h,88)?u(h,26):(dn(),Wh)),(o=n.c,Et(o,88)?u(o,26):(dn(),Wh)),Fg(t,e),!1),r?r.Ei(s):r=s,r}function u4t(t){var e,n;switch(u(Q(Fa(t),(Te(),X9t)),420).g){case 0:return e=t.n,n=t.o,new $e(e.a+n.a/2,e.b+n.b/2);case 1:return new yo(t.n);default:return null}}function nD(){nD=Z,BG=new Q9(K0,0),PTt=new Q9("LEFTUP",1),BTt=new Q9("RIGHTUP",2),NTt=new Q9("LEFTDOWN",3),FTt=new Q9("RIGHTDOWN",4),Slt=new Q9("BALANCED",5)}function Y1n(t,e,n){var r,s,o;if(r=Ls(t.a[e.p],t.a[n.p]),r==0){if(s=u(Q(e,(se(),I6)),15),o=u(Q(n,I6),15),s.Hc(n))return-1;if(o.Hc(e))return 1}return r}function X1n(t){switch(t.g){case 1:return new tZ;case 2:return new eZ;case 3:return new JQ;case 0:return null;default:throw rt(new Pn(xct+(t.f!=null?t.f:""+t.g)))}}function l4t(t,e,n){switch(e){case 1:!t.n&&(t.n=new he(qo,t,1,7)),xr(t.n),!t.n&&(t.n=new he(qo,t,1,7)),rs(t.n,u(n,14));return;case 2:qC(t,Br(n));return}Myt(t,e,n)}function h4t(t,e,n){switch(e){case 3:Xv(t,Xt(ye(n)));return;case 4:Qv(t,Xt(ye(n)));return;case 5:yu(t,Xt(ye(n)));return;case 6:xu(t,Xt(ye(n)));return}l4t(t,e,n)}function Xz(t,e,n){var r,s,o;o=(r=new Ktt,r),s=O1(o,e,null),s&&s.Fi(),Xc(o,n),Mr((!t.c&&(t.c=new he(zw,t,12,10)),t.c),o),Ig(o,0),ty(o,1),Pg(o,!0),Ng(o,!0)}function f4t(t,e){var n,r,s;return n=U9(t.g,e),Et(n,235)?(s=u(n,235),s.Qh()==null,s.Nh()):Et(n,498)?(r=u(n,1938),s=r.b,s):null}function Q1n(t,e,n,r){var s,o;return Ar(e),Ar(n),o=u(wC(t.d,e),19),jte(!!o,"Row %s not in %s",e,t.e),s=u(wC(t.b,n),19),jte(!!s,"Column %s not in %s",n,t.c),Gne(t,o.a,s.a,r)}function Zse(t,e,n,r,s,o,h){var d,w,k,C,M;if(C=s[o],k=o==h-1,d=k?r:0,M=mse(d,C),r!=10&&ct(ot(t,h-o),e[o],n[o],d,M),!k)for(++o,w=0;w1||d==-1?(o=u(w,15),s.Wb(ihn(t,o))):s.Wb(uat(t,u(w,56)))))}function idn(t,e,n,r){jHt();var s=dut;function o(){for(var h=0;hwct)return n;s>-1e-6&&++n}return n}function p4t(t,e){var n;e!=t.b?(n=null,t.b&&(n=c$(t.b,t,-4,n)),e&&(n=e6(e,t,-4,n)),n=Nre(t,e,n),n&&n.Fi()):t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,3,e,e))}function eae(t,e){var n;e!=t.f?(n=null,t.f&&(n=c$(t.f,t,-1,n)),e&&(n=e6(e,t,-1,n)),n=Pre(t,e,n),n&&n.Fi()):t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,0,e,e))}function nae(t){var e,n,r;if(t==null)return null;if(n=u(t,15),n.dc())return"";for(r=new xg,e=n.Kc();e.Ob();)fo(r,(Di(),Br(e.Pb()))),r.a+=" ";return Wet(r,r.a.length-1)}function rae(t){var e,n,r;if(t==null)return null;if(n=u(t,15),n.dc())return"";for(r=new xg,e=n.Kc();e.Ob();)fo(r,(Di(),Br(e.Pb()))),r.a+=" ";return Wet(r,r.a.length-1)}function fdn(t,e,n){var r,s;return r=t.c[e.c.p][e.p],s=t.c[n.c.p][n.p],r.a!=null&&s.a!=null?Pnt(r.a,s.a):r.a!=null?-1:s.a!=null?1:0}function ddn(t,e){var n,r,s,o,h,d;if(e)for(o=e.a.length,n=new Qb(o),d=(n.b-n.a)*n.c<0?(Ip(),Ab):new Pp(n);d.Ob();)h=u(d.Pb(),19),s=_8(e,h.a),r=new izt(t),nnn(r.a,s)}function gdn(t,e){var n,r,s,o,h,d;if(e)for(o=e.a.length,n=new Qb(o),d=(n.b-n.a)*n.c<0?(Ip(),Ab):new Pp(n);d.Ob();)h=u(d.Pb(),19),s=_8(e,h.a),r=new Y$t(t),enn(r.a,s)}function pdn(t){var e;if(t!=null&&t.length>0&&ba(t,t.length-1)==33)try{return e=toe(Dl(t,0,t.length-1)),e.e==null}catch(n){if(n=Wi(n),!Et(n,32))throw rt(n)}return!1}function iae(t,e,n){var r,s,o;return r=e.ak(),o=e.dd(),s=r.$j()?zp(t,3,r,null,o,EE(t,r,o,Et(r,99)&&(u(r,18).Bb&Ya)!=0),!0):zp(t,1,r,r.zj(),o,-1,!0),n?n.Ei(s):n=s,n}function bdn(){var t,e,n;for(e=0,t=0;t<1;t++){if(n=o5t((Rr(t,1),"X".charCodeAt(t))),n==0)throw rt(new Fr("Unknown Option: "+"X".substr(t)));e|=n}return e}function vdn(t,e,n){var r,s,o;switch(r=Fa(e),s=Ez(r),o=new Mc,Uo(o,e),n.g){case 1:Fs(o,HI(Jx(s)));break;case 2:Fs(o,Jx(s))}return Jt(o,(Te(),zy),ye(Q(t,zy))),o}function b4t(t){var e,n;return e=u(Lr(new ar(lr(jo(t.a).a.Kc(),new z))),17),n=u(Lr(new ar(lr(Ms(t.a).a.Kc(),new z))),17),je(Re(Q(e,(se(),$1))))||je(Re(Q(n,$1)))}function g4(){g4=Z,LG=new kM("ONE_SIDE",0),IG=new kM("TWO_SIDES_CORNER",1),DG=new kM("TWO_SIDES_OPPOSING",2),MG=new kM("THREE_SIDES",3),AG=new kM("FOUR_SIDES",4)}function Cst(t,e,n,r,s){var o,h;o=u(Pl(Ri(e.Oc(),new OX),i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[(I1(),Gl)]))),15),h=u(o2(t.b,n,r),15),s==0?h.Wc(0,o):h.Gc(o)}function wdn(t,e){var n,r,s,o,h;for(o=new S(e.a);o.a0&&Mse(this,this.c-1,(be(),Hn)),this.c0&&t[0].length>0&&(this.c=je(Re(Q(Fa(t[0][0]),(se(),ZTt))))),this.a=Pt(ome,te,2018,t.length,0,2),this.b=Pt(cme,te,2019,t.length,0,2),this.d=new Sre}function Edn(t){return t.c.length==0?!1:(An(0,t.c.length),u(t.c[0],17)).c.i.k==(Gn(),Zs)?!0:A8(pu(new Tn(null,new _n(t,16)),new cQ),new uQ)}function Tdn(t,e,n){return wr(n,"Tree layout",1),w$(t.b),Ud(t.b,(uE(),vV),vV),Ud(t.b,PS,PS),Ud(t.b,PO,PO),Ud(t.b,FS,FS),t.a=Tq(t.b,e),J2n(t,e,Rc(n,1)),or(n),e}function aae(t,e){var n,r,s,o,h,d,w;for(d=gy(e),o=e.f,w=e.g,h=b.Math.sqrt(o*o+w*w),s=0,r=new S(d);r.a=0?(n=eD(t,Nq),r=UI(t,Nq)):(e=zm(t,1),n=eD(e,5e8),r=UI(e,5e8),r=Oa(M0(r,1),Ps(t,1))),C1(M0(r,32),Ps(n,co))}function uae(t,e,n){var r,s;switch(r=(Qn(e.b!=0),u(ch(e,e.a.a),8)),n.g){case 0:r.b=0;break;case 2:r.b=t.f;break;case 3:r.a=0;break;default:r.a=t.g}return s=ei(e,0),XM(s,r),e}function lae(t,e,n,r){var s,o,h,d,w;switch(w=t.b,o=e.d,h=o.j,d=M3t(h,w.d[h.g],n),s=Li(nc(o.n),o.a),o.j.g){case 1:case 3:d.a+=s.a;break;case 2:case 4:d.b+=s.b}hs(r,d,r.c.b,r.c)}function Fdn(t,e,n){var r,s,o,h;for(h=Ro(t.e,e,0),o=new Npt,o.b=n,r=new ha(t.e,h);r.b1;e>>=1)e&1&&(r=J3(r,n)),n.d==1?n=J3(n,n):n=new Nie(Hue(n.a,n.d,Pt(Tr,Xr,25,n.d<<1,15,1)));return r=J3(r,n),r}function E4t(){E4t=Z;var t,e,n,r;for(TEt=Pt(ia,vo,25,25,15,1),CEt=Pt(ia,vo,25,33,15,1),r=152587890625e-16,e=32;e>=0;e--)CEt[e]=r,r*=.5;for(n=1,t=24;t>=0;t--)TEt[t]=n,n*=.5}function qdn(t){var e,n;if(je(Re(qe(t,(Te(),$y))))){for(n=new ar(lr(G0(t).a.Kc(),new z));zr(n);)if(e=u(Lr(n),79),uw(e)&&je(Re(qe(e,P2))))return!0}return!1}function hae(t,e){var n,r,s;Ns(t.f,e)&&(e.b=t,r=e.c,Ro(t.j,r,0)!=-1||ue(t.j,r),s=e.d,Ro(t.j,s,0)!=-1||ue(t.j,s),n=e.a.b,n.c.length!=0&&(!t.i&&(t.i=new Hie(t)),icn(t.i,n)))}function Hdn(t){var e,n,r,s,o;return n=t.c.d,r=n.j,s=t.d.d,o=s.j,r==o?n.p=0&&hn(t.substr(e,3),"GMT")||e>=0&&hn(t.substr(e,3),"UTC"))&&(n[0]=e+3),X5t(t,n,r)}function Vdn(t,e){var n,r,s,o,h;for(o=t.g.a,h=t.g.b,r=new S(t.d);r.an;o--)t[o]|=e[o-n-1]>>>h,t[o-1]=e[o-n-1]<=t.f)break;o.c[o.c.length]=n}return o}function C4t(t){var e,n,r,s;for(e=null,s=new S(t.wf());s.a0&&Ic(t.g,e,t.g,e+r,d),h=n.Kc(),t.i+=r,s=0;so&&oen(k,oee(n[d],kEt))&&(s=d,o=w);return s>=0&&(r[0]=e+o),s}function Zdn(t,e){var n;if(n=iUt(t.b.Hf(),e.b.Hf()),n!=0)return n;switch(t.b.Hf().g){case 1:case 2:return du(t.b.sf(),e.b.sf());case 3:case 4:return du(e.b.sf(),t.b.sf())}return 0}function Jdn(t){var e,n,r;for(r=t.e.c.length,t.a=Xb(Tr,[te,Xr],[48,25],15,[r,r],2),n=new S(t.c);n.a>4&15,o=t[r]&15,h[s++]=zAt[n],h[s++]=zAt[o];return Ah(h,0,h.length)}function n0n(t,e,n){var r,s,o;return r=e.ak(),o=e.dd(),s=r.$j()?zp(t,4,r,o,null,EE(t,r,o,Et(r,99)&&(u(r,18).Bb&Ya)!=0),!0):zp(t,r.Kj()?2:1,r,o,r.zj(),-1,!0),n?n.Ei(s):n=s,n}function Eu(t){var e,n;return t>=Ya?(e=OD+(t-Ya>>10&1023)&ms,n=56320+(t-Ya&1023)&ms,String.fromCharCode(e)+(""+String.fromCharCode(n))):String.fromCharCode(t&ms)}function r0n(t,e){Bm();var n,r,s,o;return s=u(u(Ai(t.r,e),21),84),s.gc()>=2?(r=u(s.Kc().Pb(),111),n=t.u.Hc((Qu(),JS)),o=t.u.Hc(G6),!r.a&&!n&&(s.gc()==2||o)):!1}function gae(t,e,n,r,s){var o,h,d;for(o=Qce(t,e,n,r,s),d=!1;!o;)sq(t,s,!0),d=!0,o=Qce(t,e,n,r,s);d&&sq(t,s,!1),h=git(s),h.c.length!=0&&(t.d&&t.d.lg(h),gae(t,s,n,r,h))}function tq(){tq=Z,bft=new rC(K0,0),pAt=new rC("DIRECTED",1),vAt=new rC("UNDIRECTED",2),dAt=new rC("ASSOCIATION",3),bAt=new rC("GENERALIZATION",4),gAt=new rC("DEPENDENCY",5)}function i0n(t,e){var n;if(!k1(t))throw rt(new Fo(ude));switch(n=k1(t),e.g){case 1:return-(t.j+t.f);case 2:return t.i-n.g;case 3:return t.j-n.f;case 4:return-(t.i+t.g)}return 0}function dE(t,e){var n,r;for(On(e),r=t.b.c.length,ue(t.b,e);r>0;){if(n=r,r=(r-1)/2|0,t.a.ue(Fe(t.b,r),e)<=0)return ah(t.b,n,e),!0;ah(t.b,n,Fe(t.b,r))}return ah(t.b,r,e),!0}function _4t(t,e,n,r){var s,o;if(s=0,n)s=wz(t.a[n.g][e.g],r);else for(o=0;o=d)}function S4t(t,e,n,r){var s;if(s=!1,ea(r)&&(s=!0,p8(e,n,Br(r))),s||Om(r)&&(s=!0,S4t(t,e,n,r)),s||Et(r,236)&&(s=!0,Jb(e,n,u(r,236))),!s)throw rt(new tet(x8t))}function a0n(t,e){var n,r,s;if(n=e.Hh(t.a),n&&(s=Yf((!n.b&&(n.b=new yl((dn(),Qa),cc,n)),n.b),Nh),s!=null)){for(r=1;r<(Ru(),hLt).length;++r)if(hn(hLt[r],s))return r}return 0}function o0n(t,e){var n,r,s;if(n=e.Hh(t.a),n&&(s=Yf((!n.b&&(n.b=new yl((dn(),Qa),cc,n)),n.b),Nh),s!=null)){for(r=1;r<(Ru(),fLt).length;++r)if(hn(fLt[r],s))return r}return 0}function pae(t,e){var n,r,s,o;if(On(e),o=t.a.gc(),o0?1:0;o.a[s]!=n;)o=o.a[s],s=t.a.ue(n.d,o.d)>0?1:0;o.a[s]=r,r.b=n.b,r.a[0]=n.a[0],r.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}function l0n(t){Qu();var e,n;return e=ji(tg,ct(ot(GV,1),ae,273,0,[xb])),!(AI(h$(e,t))>1||(n=ji(JS,ct(ot(GV,1),ae,273,0,[ZS,G6])),AI(h$(n,t))>1))}function L4t(t,e){var n;n=Fc((Mp(),Uh),t),Et(n,498)?xo(Uh,t,new NVt(this,e)):xo(Uh,t,this),Dst(this,e),e==(t8(),JAt)?(this.wb=u(this,1939),u(e,1941)):this.wb=(jp(),Ln)}function h0n(t){var e,n,r;if(t==null)return null;for(e=null,n=0;n=$g?"error":r>=900?"warn":r>=800?"info":"log"),eXt(n,t.a),t.b&&L5t(e,n,t.b,"Exception: ",!0))}function Q(t,e){var n,r;return r=(!t.q&&(t.q=new Cr),Jn(t.q,e)),r??(n=e.wg(),Et(n,4)&&(n==null?(!t.q&&(t.q=new Cr),Ux(t.q,e)):(!t.q&&(t.q=new Cr),ki(t.q,e,n))),n)}function Wa(){Wa=Z,Ad=new xM("P1_CYCLE_BREAKING",0),lb=new xM("P2_LAYERING",1),ou=new xM("P3_NODE_ORDERING",2),qc=new xM("P4_NODE_PLACEMENT",3),Io=new xM("P5_EDGE_ROUTING",4)}function mae(t,e){var n,r,s,o,h;for(s=e==1?Qut:Xut,r=s.a.ec().Kc();r.Ob();)for(n=u(r.Pb(),103),h=u(Ai(t.f.c,n),21).Kc();h.Ob();)o=u(h.Pb(),46),vu(t.b.b,o.b),vu(t.b.a,u(o.b,81).d)}function f0n(t,e){$C();var n;if(t.c==e.c){if(t.b==e.b||Bon(t.b,e.b)){if(n=UYe(t.b)?1:-1,t.a&&!e.a)return n;if(!t.a&&e.a)return-n}return du(t.b.g,e.b.g)}else return Ls(t.c,e.c)}function d0n(t,e){var n;wr(e,"Hierarchical port position processing",1),n=t.b,n.c.length>0&&Rue((An(0,n.c.length),u(n.c[0],29)),t),n.c.length>1&&Rue(u(Fe(n,n.c.length-1),29),t),or(e)}function yae(t,e){var n,r,s;if(I4t(t,e))return!0;for(r=new S(e);r.a=s||e<0)throw rt(new mo(Wct+e+S2+s));if(n>=s||n<0)throw rt(new mo(Kct+n+S2+s));return e!=n?r=(o=t.Ti(n),t.Hi(e,o),o):r=t.Oi(n),r}function Eae(t){var e,n,r;if(r=t,t)for(e=0,n=t.Ug();n;n=n.Ug()){if(++e>oot)return Eae(n);if(r=n,n==t)throw rt(new Fo("There is a cycle in the containment hierarchy of "+t))}return r}function Qp(t){var e,n,r;for(r=new c2(Ka,"[","]"),n=t.Kc();n.Ob();)e=n.Pb(),P0(r,Gt(e)===Gt(t)?"(this Collection)":e==null?Tu:$o(e));return r.a?r.e.length==0?r.a.a:r.a.a+(""+r.e):r.c}function I4t(t,e){var n,r;if(r=!1,e.gc()<2)return!1;for(n=0;nr&&(Rr(e-1,t.length),t.charCodeAt(e-1)<=32);)--e;return r>0||e1&&(t.j.b+=t.e)):(t.j.a+=n.a,t.j.b=b.Math.max(t.j.b,n.b),t.d.c.length>1&&(t.j.a+=t.e))}function Zp(){Zp=Z,r2e=ct(ot(Xa,1),xc,61,0,[(be(),Nn),Hn,mr]),n2e=ct(ot(Xa,1),xc,61,0,[Hn,mr,Bn]),i2e=ct(ot(Xa,1),xc,61,0,[mr,Bn,Nn]),s2e=ct(ot(Xa,1),xc,61,0,[Bn,Nn,Hn])}function p0n(t,e,n,r){var s,o,h,d,w,k,C;if(h=t.c.d,d=t.d.d,h.j!=d.j)for(C=t.b,s=h.j,w=null;s!=d.j;)w=e==0?kz(s):t3t(s),o=M3t(s,C.d[s.g],n),k=M3t(w,C.d[w.g],n),ni(r,Li(o,k)),s=w}function b0n(t,e,n,r){var s,o,h,d,w;return h=Ise(t.a,e,n),d=u(h.a,19).a,o=u(h.b,19).a,r&&(w=u(Q(e,(se(),Zu)),10),s=u(Q(n,Zu),10),w&&s&&(BZt(t.b,w,s),d+=t.b.i,o+=t.b.e)),d>o}function Cae(t){var e,n,r,s,o,h,d,w,k;for(this.a=tse(t),this.b=new le,n=t,r=0,s=n.length;runt(t.d).c?(t.i+=t.g.c,Kit(t.d)):unt(t.d).c>unt(t.g).c?(t.e+=t.d.c,Kit(t.g)):(t.i+=nYt(t.g),t.e+=nYt(t.d),Kit(t.g),Kit(t.d))}function m0n(t,e,n){var r,s,o,h;for(o=e.q,h=e.r,new t2((Vf(),pb),e,o,1),new t2(pb,o,h,1),s=new S(n);s.ad&&(w=d/r),s>o&&(k=o/s),h=b.Math.min(w,k),t.a+=h*(e.a-t.a),t.b+=h*(e.b-t.b)}function E0n(t,e,n,r,s){var o,h;for(h=!1,o=u(Fe(n.b,0),33);Rmn(t,e,o,r,s)&&(h=!0,ndn(n,o),n.b.c.length!=0);)o=u(Fe(n.b,0),33);return n.b.c.length==0&&tD(n.j,n),h&&Vz(e.q),h}function T0n(t,e){y4();var n,r,s,o;if(e.b<2)return!1;for(o=ei(e,0),n=u(ti(o),8),r=n;o.b!=o.d.c;){if(s=u(ti(o),8),Qst(t,r,s))return!0;r=s}return!!Qst(t,r,n)}function O4t(t,e,n,r){var s,o;return n==0?(!t.o&&(t.o=new Tl((Zc(),Eb),$w,t,0)),kj(t.o,e,r)):(o=u(yn((s=u(In(t,16),26),s||t.zh()),n),66),o.Nj().Rj(t,iu(t),n-Zn(t.zh()),e,r))}function Dst(t,e){var n;e!=t.sb?(n=null,t.sb&&(n=u(t.sb,49).ih(t,1,nA,n)),e&&(n=u(e,49).gh(t,1,nA,n)),n=Wyt(t,e,n),n&&n.Fi()):t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,4,e,e))}function C0n(t,e){var n,r,s,o;if(e)s=R0(e,"x"),n=new ezt(t),F8(n.a,(On(s),s)),o=R0(e,"y"),r=new nzt(t),R8(r.a,(On(o),o));else throw rt(new ad("All edge sections need an end point."))}function _0n(t,e){var n,r,s,o;if(e)s=R0(e,"x"),n=new Z$t(t),B8(n.a,(On(s),s)),o=R0(e,"y"),r=new J$t(t),j8(r.a,(On(o),o));else throw rt(new ad("All edge sections need a start point."))}function S0n(t,e){var n,r,s,o,h,d,w;for(r=hre(t),o=0,d=r.length;o>22-e,s=t.h<>22-e):e<44?(n=0,r=t.l<>44-e):(n=0,r=0,s=t.l<t)throw rt(new Pn("k must be smaller than n"));return e==0||e==t?1:t==0?0:o4t(t)/(o4t(e)*o4t(t-e))}function N4t(t,e){var n,r,s,o;for(n=new r2t(t);n.g==null&&!n.c?Fwt(n):n.g==null||n.i!=0&&u(n.g[n.i-1],47).Ob();)if(o=u(aq(n),56),Et(o,160))for(r=u(o,160),s=0;s>4],e[n*2+1]=uU[o&15];return Ah(e,0,e.length)}function G0n(t){Qj();var e,n,r;switch(r=t.c.length,r){case 0:return hge;case 1:return e=u(poe(new S(t)),42),gtn(e.cd(),e.dd());default:return n=u(D1(t,Pt(M2,Dq,42,t.c.length,0,1)),165),new Ztt(n)}}function V0n(t){var e,n,r,s,o,h;for(e=new P3,n=new P3,qp(e,t),qp(n,t);n.b!=n.c;)for(s=u(Fx(n),37),h=new S(s.a);h.a0&&vD(t,n,e),s):Spn(t,e,n)}function Oae(t,e,n){var r,s,o,h;if(e.b!=0){for(r=new Qi,h=ei(e,0);h.b!=h.d.c;)o=u(ti(h),86),Ua(r,byt(o)),s=o.e,s.a=u(Q(o,(fc(),Lht)),19).a,s.b=u(Q(o,t_t),19).a;Oae(t,r,Rc(n,r.b/t.a|0))}}function Nae(t,e){var n,r,s,o,h;if(t.e<=e||Jrn(t,t.g,e))return t.g;for(o=t.r,r=t.g,h=t.r,s=(o-r)/2+r;r+11&&(t.e.b+=t.a)):(t.e.a+=n.a,t.e.b=b.Math.max(t.e.b,n.b),t.d.c.length>1&&(t.e.a+=t.a))}function X0n(t){var e,n,r,s;switch(s=t.i,e=s.b,r=s.j,n=s.g,s.a.g){case 0:n.a=(t.g.b.o.a-r.a)/2;break;case 1:n.a=e.d.n.a+e.d.a.a;break;case 2:n.a=e.d.n.a+e.d.a.a-r.a;break;case 3:n.b=e.d.n.b+e.d.a.b}}function Pae(t,e,n,r,s){if(rr&&(t.a=r),t.bs&&(t.b=s),t}function Q0n(t){if(Et(t,149))return _2n(u(t,149));if(Et(t,229))return Eln(u(t,229));if(Et(t,23))return M0n(u(t,23));throw rt(new Pn(k8t+Qp(new wl(ct(ot(Xn,1),Ie,1,5,[t])))))}function Z0n(t,e,n,r,s){var o,h,d;for(o=!0,h=0;h>>s|n[h+r+1]<>>s,++h}return o}function R4t(t,e,n,r){var s,o,h;if(e.k==(Gn(),Zs)){for(o=new ar(lr(jo(e).a.Kc(),new z));zr(o);)if(s=u(Lr(o),17),h=s.c.i.k,h==Zs&&t.c.a[s.c.i.c.p]==r&&t.c.a[e.c.p]==n)return!0}return!1}function J0n(t,e){var n,r,s,o;return e&=63,n=t.h&W0,e<22?(o=n>>>e,s=t.m>>e|n<<22-e,r=t.l>>e|t.m<<22-e):e<44?(o=0,s=n>>>e-22,r=t.m>>e-22|t.h<<44-e):(o=0,s=0,r=n>>>e-44),ru(r&ul,s&ul,o&W0)}function Fae(t,e,n,r){var s;this.b=r,this.e=t==(Zv(),DS),s=e[n],this.d=Xb(dl,[te,i0],[177,25],16,[s.length,s.length],2),this.a=Xb(Tr,[te,Xr],[48,25],15,[s.length,s.length],2),this.c=new y4t(e,n)}function tgn(t){var e,n,r;for(t.k=new $wt((be(),ct(ot(Xa,1),xc,61,0,[Zo,Nn,Hn,mr,Bn])).length,t.j.c.length),r=new S(t.j);r.a=n)return pE(t,e,r.p),!0;return!1}function Rae(t){var e;return t.Db&64?Ost(t):(e=new Il(h8t),!t.a||Vr(Vr((e.a+=' "',e),t.a),'"'),Vr(Cv(Vr(Cv(Vr(Cv(Vr(Cv((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function jae(t,e,n){var r,s,o,h,d;for(d=au(t.e.Tg(),e),s=u(t.g,119),r=0,h=0;hn?U4t(t,n,"start index"):e<0||e>n?U4t(e,n,"end index"):v_("end index (%s) must not be less than start index (%s)",ct(ot(Xn,1),Ie,1,5,[de(e),de(t)]))}function zae(t,e){var n,r,s,o;for(r=0,s=t.length;r0&&qae(t,o,n));e.p=0}function Xe(t){var e;this.c=new Qi,this.f=t.e,this.e=t.d,this.i=t.g,this.d=t.c,this.b=t.b,this.k=t.j,this.a=t.a,t.i?this.j=t.i:this.j=(e=u(Hf(Qg),9),new rh(e,u(uf(e,e.length),9),0)),this.g=t.f}function agn(t){var e,n,r,s;for(e=Rp(Vr(new Il("Predicates."),"and"),40),n=!0,s=new fx(t);s.b0?d[h-1]:Pt(o0,zg,10,0,0,1),s=d[h],k=h=0?t.Bh(s):Q4t(t,r);else throw rt(new Pn(ab+r.ne()+W_));else throw rt(new Pn(yde+e+xde));else lh(t,n,r)}function j4t(t){var e,n;if(n=null,e=!1,Et(t,204)&&(e=!0,n=u(t,204).a),e||Et(t,258)&&(e=!0,n=""+u(t,258).a),e||Et(t,483)&&(e=!0,n=""+u(t,483).a),!e)throw rt(new tet(x8t));return n}function Uae(t,e){var n,r;if(t.f){for(;e.Ob();)if(n=u(e.Pb(),72),r=n.ak(),Et(r,99)&&u(r,18).Bb&dc&&(!t.e||r.Gj()!=I7||r.aj()!=0)&&n.dd()!=null)return e.Ub(),!0;return!1}else return e.Ob()}function Wae(t,e){var n,r;if(t.f){for(;e.Sb();)if(n=u(e.Ub(),72),r=n.ak(),Et(r,99)&&u(r,18).Bb&dc&&(!t.e||r.Gj()!=I7||r.aj()!=0)&&n.dd()!=null)return e.Pb(),!0;return!1}else return e.Sb()}function $4t(t,e,n){var r,s,o,h,d,w;for(w=au(t.e.Tg(),e),r=0,d=t.i,s=u(t.g,119),h=0;h1&&(e.c[e.c.length]=o))}function lgn(t){var e,n,r,s;for(n=new Qi,Ua(n,t.o),r=new Ppt;n.b!=0;)e=u(n.b==0?null:(Qn(n.b!=0),ch(n,n.a.a)),508),s=_he(t,e,!0),s&&ue(r.a,e);for(;r.a.c.length!=0;)e=u(mre(r),508),_he(t,e,!1)}function jg(){jg=Z,mSt=new _x(O_,0),Aa=new _x("BOOLEAN",1),gc=new _x("INT",2),T7=new _x("STRING",3),Do=new _x("DOUBLE",4),cs=new _x("ENUM",5),j6=new _x("ENUMSET",6),q1=new _x("OBJECT",7)}function h_(t,e){var n,r,s,o,h;r=b.Math.min(t.c,e.c),o=b.Math.min(t.d,e.d),s=b.Math.max(t.c+t.b,e.c+e.b),h=b.Math.max(t.d+t.a,e.d+e.a),s=(s/2|0))for(this.e=r?r.c:null,this.d=s;n++0;)Bwt(this);this.b=e,this.a=null}function dgn(t,e){var n,r;e.a?F2n(t,e):(n=u(gnt(t.b,e.b),57),n&&n==t.a[e.b.f]&&n.a&&n.a!=e.b.a&&n.c.Fc(e.b),r=u(dnt(t.b,e.b),57),r&&t.a[r.f]==e.b&&r.a&&r.a!=e.b.a&&e.b.c.Fc(r),ent(t.b,e.b))}function Yae(t,e){var n,r;if(n=u(go(t.b,e),124),u(u(Ai(t.r,e),21),84).dc()){n.n.b=0,n.n.c=0;return}n.n.b=t.C.b,n.n.c=t.C.c,t.A.Hc((_l(),V2))&&mue(t,e),r=Hhn(t,e),Jst(t,e)==(c4(),mb)&&(r+=2*t.w),n.a.a=r}function Xae(t,e){var n,r;if(n=u(go(t.b,e),124),u(u(Ai(t.r,e),21),84).dc()){n.n.d=0,n.n.a=0;return}n.n.d=t.C.d,n.n.a=t.C.a,t.A.Hc((_l(),V2))&&yue(t,e),r=Ghn(t,e),Jst(t,e)==(c4(),mb)&&(r+=2*t.w),n.a.b=r}function ggn(t,e){var n,r,s,o;for(o=new le,r=new S(e);r.an.a&&(r.Hc((cy(),qO))?s=(e.a-n.a)/2:r.Hc(HO)&&(s=e.a-n.a)),e.b>n.b&&(r.Hc((cy(),VO))?o=(e.b-n.b)/2:r.Hc(GO)&&(o=e.b-n.b)),A4t(t,s,o)}function ioe(t,e,n,r,s,o,h,d,w,k,C,M,F){Et(t.Cb,88)&&hy(rl(u(t.Cb,88)),4),Xc(t,n),t.f=h,rE(t,d),sE(t,w),nE(t,k),iE(t,C),Pg(t,M),aE(t,F),Ng(t,!0),Ig(t,s),t.ok(o),f2(t,e),r!=null&&(t.i=null,ez(t,r))}function soe(t){var e,n;if(t.f){for(;t.n>0;){if(e=u(t.k.Xb(t.n-1),72),n=e.ak(),Et(n,99)&&u(n,18).Bb&dc&&(!t.e||n.Gj()!=I7||n.aj()!=0)&&e.dd()!=null)return!0;--t.n}return!1}else return t.n>0}function U4t(t,e,n){if(t<0)return v_(Hhe,ct(ot(Xn,1),Ie,1,5,[n,de(t)]));if(e<0)throw rt(new Pn(Ghe+e));return v_("%s (%s) must not be greater than size (%s)",ct(ot(Xn,1),Ie,1,5,[n,de(t),de(e)]))}function W4t(t,e,n,r,s,o){var h,d,w,k;if(h=r-n,h<7){fln(e,n,r,o);return}if(w=n+s,d=r+s,k=w+(d-w>>1),W4t(e,t,w,k,-s,o),W4t(e,t,k,d,-s,o),o.ue(t[k-1],t[k])<=0){for(;n=0?t.sh(o,n):E5t(t,s,n);else throw rt(new Pn(ab+s.ne()+W_));else throw rt(new Pn(yde+e+xde));else fh(t,r,s,n)}function aoe(t){var e,n,r,s;if(n=u(t,49).qh(),n)try{if(r=null,e=wE((Mp(),Uh),que(pln(n))),e&&(s=e.rh(),s&&(r=s.Wk(EKe(n.e)))),r&&r!=t)return aoe(r)}catch(o){if(o=Wi(o),!Et(o,60))throw rt(o)}return t}function su(t,e,n){var r,s,o,h;if(h=e==null?0:t.b.se(e),s=(r=t.a.get(h),r??new Array),s.length==0)t.a.set(h,s);else if(o=kre(t,e,s),o)return o.ed(n);return Ji(s,s.length,new RR(e,n)),++t.c,a$(t.b),null}function ooe(t,e){var n,r;return w$(t.a),Ud(t.a,(iz(),TV),TV),Ud(t.a,E7,E7),r=new Hs,bi(r,E7,(Cz(),Nht)),Gt(qe(e,(ay(),Bht)))!==Gt((RI(),CV))&&bi(r,E7,Dht),bi(r,E7,Oht),oUt(t.a,r),n=Tq(t.a,e),n}function coe(t){if(!t)return Vqt(),yge;var e=t.valueOf?t.valueOf():t;if(e!==t){var n=Eut[typeof e];return n?n(e):jyt(typeof e)}else return t instanceof Array||t instanceof b.Array?new lx(t):new Hk(t)}function uoe(t,e,n){var r,s,o;switch(o=t.o,r=u(go(t.p,n),244),s=r.i,s.b=uD(r),s.a=cD(r),s.b=b.Math.max(s.b,o.a),s.b>o.a&&!e&&(s.b=o.a),s.c=-(s.b-o.a)/2,n.g){case 1:s.d=-s.a;break;case 3:s.d=o.b}fat(r),dat(r)}function loe(t,e,n){var r,s,o;switch(o=t.o,r=u(go(t.p,n),244),s=r.i,s.b=uD(r),s.a=cD(r),s.a=b.Math.max(s.a,o.b),s.a>o.b&&!e&&(s.a=o.b),s.d=-(s.a-o.b)/2,n.g){case 4:s.c=-s.b;break;case 2:s.c=o.a}fat(r),dat(r)}function Lgn(t,e){var n,r,s,o,h;if(!e.dc()){if(s=u(e.Xb(0),128),e.gc()==1){Bce(t,s,s,1,0,e);return}for(n=1;n0)try{s=$l(e,_a,vi)}catch(o){throw o=Wi(o),Et(o,127)?(r=o,rt(new F$(r))):rt(o)}return n=(!t.a&&(t.a=new ztt(t)),t.a),s=0?u(St(n,s),56):null}function Ogn(t,e){if(t<0)return v_(Hhe,ct(ot(Xn,1),Ie,1,5,["index",de(t)]));if(e<0)throw rt(new Pn(Ghe+e));return v_("%s (%s) must be less than size (%s)",ct(ot(Xn,1),Ie,1,5,["index",de(t),de(e)]))}function Ngn(t){var e,n,r,s,o;if(t==null)return Tu;for(o=new c2(Ka,"[","]"),n=t,r=0,s=n.length;r0)for(h=t.c.d,d=t.d.d,s=ud(na(new $e(d.a,d.b),h),1/(r+1)),o=new $e(h.a,h.b),n=new S(t.a);n.a=0?t._g(n,!0,!0):lw(t,s,!0),153)),u(r,215).ol(e);else throw rt(new Pn(ab+e.ne()+W_))}function Z4t(t){var e,n;return t>-0x800000000000&&t<0x800000000000?t==0?0:(e=t<0,e&&(t=-t),n=ps(b.Math.floor(b.Math.log(t)/.6931471805599453)),(!e||t!=b.Math.pow(2,n))&&++n,n):Fne(ku(t))}function Wgn(t){var e,n,r,s,o,h,d;for(o=new A0,n=new S(t);n.a2&&d.e.b+d.j.b<=2&&(s=d,r=h),o.a.zc(s,o),s.q=r);return o}function woe(t,e){var n,r,s;return r=new H0(t),Lo(r,e),Jt(r,(se(),GG),e),Jt(r,(Te(),os),(oa(),Vc)),Jt(r,Ld,(Qd(),PV)),_0(r,(Gn(),xs)),n=new Mc,Uo(n,r),Fs(n,(be(),Bn)),s=new Mc,Uo(s,r),Fs(s,Hn),r}function moe(t){switch(t.g){case 0:return new eet((Zv(),OO));case 1:return new OB;case 2:return new JJ;default:throw rt(new Pn("No implementation is available for the crossing minimizer "+(t.f!=null?t.f:""+t.g)))}}function yoe(t,e){var n,r,s,o,h;for(t.c[e.p]=!0,ue(t.a,e),h=new S(e.j);h.a=o)h.$b();else for(s=h.Kc(),r=0;r0?Xpt():h<0&&Toe(t,e,-h),!0):!1}function cD(t){var e,n,r,s,o,h,d;if(d=0,t.b==0){for(h=ase(t,!0),e=0,r=h,s=0,o=r.length;s0&&(d+=n,++e);e>1&&(d+=t.c*(e-1))}else d=Jqt(lne(Jj(Ri($nt(t.a),new Al),new ua)));return d>0?d+t.n.d+t.n.a:0}function uD(t){var e,n,r,s,o,h,d;if(d=0,t.b==0)d=Jqt(lne(Jj(Ri($nt(t.a),new Zl),new Pa)));else{for(h=ose(t,!0),e=0,r=h,s=0,o=r.length;s0&&(d+=n,++e);e>1&&(d+=t.c*(e-1))}return d>0?d+t.n.b+t.n.c:0}function epn(t,e){var n,r,s,o;for(o=u(go(t.b,e),124),n=o.a,s=u(u(Ai(t.r,e),21),84).Kc();s.Ob();)r=u(s.Pb(),111),r.c&&(n.a=b.Math.max(n.a,Bvt(r.c)));if(n.a>0)switch(e.g){case 2:o.n.c=t.s;break;case 4:o.n.b=t.s}}function npn(t,e){var n,r,s;return n=u(Q(e,(Zf(),t7)),19).a-u(Q(t,t7),19).a,n==0?(r=na(nc(u(Q(t,(Gp(),dO)),8)),u(Q(t,lS),8)),s=na(nc(u(Q(e,dO),8)),u(Q(e,lS),8)),Ls(r.a*r.b,s.a*s.b)):n}function rpn(t,e){var n,r,s;return n=u(Q(e,(hw(),EV)),19).a-u(Q(t,EV),19).a,n==0?(r=na(nc(u(Q(t,(fc(),FO)),8)),u(Q(t,BS),8)),s=na(nc(u(Q(e,FO),8)),u(Q(e,BS),8)),Ls(r.a*r.b,s.a*s.b)):n}function Coe(t){var e,n;return n=new _p,n.a+="e_",e=fcn(t),e!=null&&(n.a+=""+e),t.c&&t.d&&(Vr((n.a+=" ",n),Wz(t.c)),Vr(hc((n.a+="[",n),t.c.i),"]"),Vr((n.a+=Pot,n),Wz(t.d)),Vr(hc((n.a+="[",n),t.d.i),"]")),n.a}function _oe(t){switch(t.g){case 0:return new WL;case 1:return new QJ;case 2:return new XJ;case 3:return new NB;default:throw rt(new Pn("No implementation is available for the layout phase "+(t.f!=null?t.f:""+t.g)))}}function t5t(t,e,n,r,s){var o;switch(o=0,s.g){case 1:o=b.Math.max(0,e.b+t.b-(n.b+r));break;case 3:o=b.Math.max(0,-t.b-r);break;case 2:o=b.Math.max(0,-t.a-r);break;case 4:o=b.Math.max(0,e.a+t.a-(n.a+r))}return o}function ipn(t,e,n){var r,s,o,h,d;if(n)for(s=n.a.length,r=new Qb(s),d=(r.b-r.a)*r.c<0?(Ip(),Ab):new Pp(r);d.Ob();)h=u(d.Pb(),19),o=_8(n,h.a),p8t in o.a||Vct in o.a?pwn(t,o,e):x5n(t,o,e),qXe(u(Jn(t.b,oE(o)),79))}function e5t(t){var e,n;switch(t.b){case-1:return!0;case 0:return n=t.t,n>1||n==-1?(t.b=-1,!0):(e=Lh(t),e&&(to(),e.Cj()==k0e)?(t.b=-1,!0):(t.b=1,!1));default:case 1:return!1}}function spn(t,e){var n,r,s,o,h;for(r=(!e.s&&(e.s=new he(Au,e,21,17)),e.s),o=null,s=0,h=r.i;s=0&&r=0?t._g(n,!0,!0):lw(t,s,!0),153)),u(r,215).ll(e);throw rt(new Pn(ab+e.ne()+Fct))}function lpn(){vbt();var t;return o5e?u(wE((Mp(),Uh),Ph),1939):(ri(M2,new Rf),V3n(),t=u(Et(Fc((Mp(),Uh),Ph),547)?Fc(Uh,Ph):new fXt,547),o5e=!0,z5n(t),U5n(t),ki((bbt(),ZAt),t,new XZ),xo(Uh,Ph,t),t)}function hpn(t,e){var n,r,s,o;t.j=-1,ml(t.e)?(n=t.i,o=t.i!=0,uI(t,e),r=new F0(t.e,3,t.c,null,e,n,o),s=e.Qk(t.e,t.c,null),s=iae(t,e,s),s?(s.Ei(r),s.Fi()):mi(t.e,r)):(uI(t,e),s=e.Qk(t.e,t.c,null),s&&s.Fi())}function rq(t,e){var n,r,s;if(s=0,r=e[0],r>=t.length)return-1;for(n=(Rr(r,t.length),t.charCodeAt(r));n>=48&&n<=57&&(s=s*10+(n-48),++r,!(r>=t.length));)n=(Rr(r,t.length),t.charCodeAt(r));return r>e[0]?e[0]=r:s=-1,s}function fpn(t){var e,n,r,s,o;return s=u(t.a,19).a,o=u(t.b,19).a,n=s,r=o,e=b.Math.max(b.Math.abs(s),b.Math.abs(o)),s<=0&&s==o?(n=0,r=o-1):s==-e&&o!=e?(n=o,r=s,o>=0&&++n):(n=-o,r=s),new la(de(n),de(r))}function dpn(t,e,n,r){var s,o,h,d,w,k;for(s=0;s=0&&k>=0&&w=t.i)throw rt(new mo(Wct+e+S2+t.i));if(n>=t.i)throw rt(new mo(Kct+n+S2+t.i));return r=t.g[n],e!=n&&(e>16),e=r>>16&16,n=16-e,t=t>>e,r=t-256,e=r>>16&8,n+=e,t<<=e,r=t-yy,e=r>>16&4,n+=e,t<<=e,r=t-bd,e=r>>16&2,n+=e,t<<=e,r=t>>14,e=r&~(r>>1),n+2-e)}function ppn(t){jx();var e,n,r,s;for(nG=new le,qut=new Cr,zut=new le,e=(!t.a&&(t.a=new he(ns,t,10,11)),t.a),W4n(e),s=new er(e);s.e!=s.i.gc();)r=u(dr(s),33),Ro(nG,r,0)==-1&&(n=new le,ue(zut,n),Rie(r,n));return zut}function bpn(t,e,n){var r,s,o,h;t.a=n.b.d,Et(e,352)?(s=m4(u(e,79),!1,!1),o=sD(s),r=new ka(t),va(o,r),yD(o,s),e.We((ci(),i5))!=null&&va(u(e.We(i5),74),r)):(h=u(e,470),h.Hg(h.Dg()+t.a.a),h.Ig(h.Eg()+t.a.b))}function Aoe(t,e){var n,r,s,o,h,d,w,k;for(k=Xt(ye(Q(e,(Te(),_S)))),w=t[0].n.a+t[0].o.a+t[0].d.c+k,d=1;d=0?n:(d=AC(na(new $e(h.c+h.b/2,h.d+h.a/2),new $e(o.c+o.b/2,o.d+o.a/2))),-(Xue(o,h)-1)*d)}function wpn(t,e,n){var r;us(new Tn(null,(!n.a&&(n.a=new he(Zi,n,6,6)),new _n(n.a,16))),new fVt(t,e)),us(new Tn(null,(!n.n&&(n.n=new he(qo,n,1,7)),new _n(n.n,16))),new dVt(t,e)),r=u(qe(n,(ci(),i5)),74),r&&ayt(r,t,e)}function lw(t,e,n){var r,s,o;if(o=E4((Ru(),ma),t.Tg(),e),o)return to(),u(o,66).Oj()||(o=qx(Eo(ma,o))),s=(r=t.Yg(o),u(r>=0?t._g(r,!0,!0):lw(t,o,!0),153)),u(s,215).hl(e,n);throw rt(new Pn(ab+e.ne()+Fct))}function r5t(t,e,n,r){var s,o,h,d,w;if(s=t.d[e],s){if(o=s.g,w=s.i,r!=null){for(d=0;d=n&&(r=e,k=(w.c+w.a)/2,h=k-n,w.c<=k-n&&(s=new ynt(w.c,h),$m(t,r++,s)),d=k+n,d<=w.a&&(o=new ynt(d,w.a),Um(r,t.c.length),W9(t.c,r,o)))}function i5t(t){var e;if(!t.c&&t.g==null)t.d=t.si(t.f),Mr(t,t.d),e=t.d;else{if(t.g==null)return!0;if(t.i==0)return!1;e=u(t.g[t.i-1],47)}return e==t.b&&null.km>=null.jm()?(aq(t),i5t(t)):e.Ob()}function kpn(t,e,n){var r,s,o,h,d;if(d=n,!d&&(d=Pvt(new Yk,0)),wr(d,Vfe,1),Xle(t.c,e),h=F3n(t.a,e),h.gc()==1)Dle(u(h.Xb(0),37),d);else for(o=1/h.gc(),s=h.Kc();s.Ob();)r=u(s.Pb(),37),Dle(r,Rc(d,o));MKe(t.a,h,e),Fvn(e),or(d)}function Ioe(t){if(this.a=t,t.c.i.k==(Gn(),xs))this.c=t.c,this.d=u(Q(t.c.i,(se(),oc)),61);else if(t.d.i.k==xs)this.c=t.d,this.d=u(Q(t.d.i,(se(),oc)),61);else throw rt(new Pn("Edge "+t+" is not an external edge."))}function Doe(t,e){var n,r,s;s=t.b,t.b=e,t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,3,s,t.b)),e?e!=t&&(Xc(t,e.zb),tit(t,e.d),n=(r=e.c,r??e.zb),nit(t,n==null||hn(n,e.zb)?null:n)):(Xc(t,null),tit(t,0),nit(t,null))}function Ooe(t){var e,n;if(t.f){for(;t.n=h)throw rt(new jm(e,h));return s=n[e],h==1?r=null:(r=Pt(Tft,Jct,415,h-1,0,1),Ic(n,0,r,0,e),o=h-e-1,o>0&&Ic(n,e+1,r,e,o)),cE(t,r),noe(t,e,s),s}function a6(){a6=Z,W6=u(St(Wt((sbt(),pc).qb),6),34),U6=u(St(Wt(pc.qb),3),34),Mft=u(St(Wt(pc.qb),4),34),Ift=u(St(Wt(pc.qb),5),18),Qz(W6),Qz(U6),Qz(Mft),Qz(Ift),h5e=new wl(ct(ot(Au,1),P4,170,0,[W6,U6]))}function Boe(t,e){var n;this.d=new M9,this.b=e,this.e=new yo(e.qf()),n=t.u.Hc((Qu(),tN)),t.u.Hc(tg)?t.D?this.a=n&&!e.If():this.a=!0:t.u.Hc(xb)?n?this.a=!(e.zf().Kc().Ob()||e.Bf().Kc().Ob()):this.a=!1:this.a=!1}function Roe(t,e){var n,r,s,o;for(n=t.o.a,o=u(u(Ai(t.r,e),21),84).Kc();o.Ob();)s=u(o.Pb(),111),s.e.a=(r=s.b,r.Xe((ci(),hl))?r.Hf()==(be(),Bn)?-r.rf().a-Xt(ye(r.We(hl))):n+Xt(ye(r.We(hl))):r.Hf()==(be(),Bn)?-r.rf().a:n)}function joe(t,e){var n,r,s,o;n=u(Q(t,(Te(),Vl)),103),o=u(qe(e,v7),61),s=u(Q(t,os),98),s!=(oa(),H1)&&s!=yb?o==(be(),Zo)&&(o=nxt(e,n),o==Zo&&(o=Jx(n))):(r=Ile(e),r>0?o=Jx(n):o=HI(Jx(n))),bo(e,v7,o)}function _pn(t,e){var n,r,s,o,h;for(h=t.j,e.a!=e.b&&Xs(h,new K5),s=h.c.length/2|0,r=0;r0&&vD(t,n,e),o):r.a!=null?(vD(t,e,n),-1):s.a!=null?(vD(t,n,e),1):0}function $oe(t,e){var n,r,s,o;t.ej()?(n=t.Vi(),o=t.fj(),++t.j,t.Hi(n,t.oi(n,e)),r=t.Zi(3,null,e,n,o),t.bj()?(s=t.cj(e,null),s?(s.Ei(r),s.Fi()):t.$i(r)):t.$i(r)):(nXt(t,e),t.bj()&&(s=t.cj(e,null),s&&s.Fi()))}function iq(t,e){var n,r,s,o,h;for(h=au(t.e.Tg(),e),s=new tx,n=u(t.g,119),o=t.i;--o>=0;)r=n[o],h.rl(r.ak())&&Mr(s,r);!Lhe(t,s)&&ml(t.e)&&Kk(t,e.$j()?zp(t,6,e,(vn(),io),null,-1,!1):zp(t,e.Kj()?2:1,e,null,null,-1,!1))}function bE(){bE=Z;var t,e;for(T6=Pt(B4,te,91,32,0,1),oS=Pt(B4,te,91,32,0,1),t=1,e=0;e<=18;e++)T6[e]=KI(t),oS[e]=KI(M0(t,e)),t=Ca(t,5);for(;eh)||e.q&&(r=e.C,h=r.c.c.a-r.o.a/2,s=r.n.a-n,s>h)))}function Lpn(t,e){var n;wr(e,"Partition preprocessing",1),n=u(Pl(Ri(Wo(Ri(new Tn(null,new _n(t.a,16)),new $Y),new aF),new V5),i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[(I1(),Gl)]))),15),us(n.Oc(),new oF),or(e)}function zoe(t){prt();var e,n,r,s,o,h,d;for(n=new n2,s=new S(t.e.b);s.a1?t.e*=Xt(t.a):t.f/=Xt(t.a),lun(t),phn(t),Qvn(t),Jt(t.b,(i_(),eG),t.g)}function Voe(t,e,n){var r,s,o,h,d,w;for(r=0,w=n,e||(r=n*(t.c.length-1),w*=-1),o=new S(t);o.a=0?(e||(e=new B9,r>0&&fo(e,t.substr(0,r))),e.a+="\\",m8(e,n&ms)):e&&m8(e,n&ms);return e?e.a:t}function Rpn(t){var e;if(!t.a)throw rt(new Fo("IDataType class expected for layout option "+t.f));if(e=Uin(t.a),e==null)throw rt(new Fo("Couldn't create new instance of property '"+t.f+"'. "+H1e+(L0(uN),uN.k)+a8t));return u(e,414)}function Gst(t){var e,n,r,s,o;return o=t.eh(),o&&o.kh()&&(s=Kp(t,o),s!=o)?(n=t.Vg(),r=(e=t.Vg(),e>=0?t.Qg(null):t.eh().ih(t,-1-e,null,null)),t.Rg(u(s,49),n),r&&r.Fi(),t.Lg()&&t.Mg()&&n>-1&&mi(t,new Qs(t,9,n,o,s)),s):o}function Xoe(t){var e,n,r,s,o,h,d,w;for(h=0,o=t.f.e,r=0;r>5,s>=t.d)return t.e<0;if(n=t.a[s],e=1<<(e&31),t.e<0){if(r=pne(t),s>16)),15).Xc(o),d0&&(!(Op(t.a.c)&&e.n.d)&&!(c8(t.a.c)&&e.n.b)&&(e.g.d+=b.Math.max(0,r/2-.5)),!(Op(t.a.c)&&e.n.a)&&!(c8(t.a.c)&&e.n.c)&&(e.g.a-=r-1))}function Joe(t){var e,n,r,s,o;if(s=new le,o=Uue(t,s),e=u(Q(t,(se(),Zu)),10),e)for(r=new S(e.j);r.a>e,o=t.m>>e|n<<22-e,s=t.l>>e|t.m<<22-e):e<44?(h=r?W0:0,o=n>>e-22,s=t.m>>e-22|n<<44-e):(h=r?W0:0,o=r?ul:0,s=n>>e-44),ru(s&ul,o&ul,h&W0)}function Vst(t){var e,n,r,s,o,h;for(this.c=new le,this.d=t,r=ss,s=ss,e=Ts,n=Ts,h=ei(t,0);h.b!=h.d.c;)o=u(ti(h),8),r=b.Math.min(r,o.a),s=b.Math.min(s,o.b),e=b.Math.max(e,o.a),n=b.Math.max(n,o.b);this.a=new ih(r,s,e-r,n-s)}function nce(t,e){var n,r,s,o,h,d;for(o=new S(t.b);o.a0&&Et(e,42)&&(t.a.qj(),k=u(e,42),w=k.cd(),o=w==null?0:Hi(w),h=X2t(t.a,o),n=t.a.d[h],n)){for(r=u(n.g,367),C=n.i,d=0;d=2)for(n=s.Kc(),e=ye(n.Pb());n.Ob();)o=e,e=ye(n.Pb()),r=b.Math.min(r,(On(e),e-(On(o),o)));return r}function Ypn(t,e){var n,r,s,o,h;r=new Qi,hs(r,e,r.c.b,r.c);do for(n=(Qn(r.b!=0),u(ch(r,r.a.a),86)),t.b[n.g]=1,o=ei(n.d,0);o.b!=o.d.c;)s=u(ti(o),188),h=s.c,t.b[h.g]==1?ni(t.a,s):t.b[h.g]==2?t.b[h.g]=1:hs(r,h,r.c.b,r.c);while(r.b!=0)}function Xpn(t,e){var n,r,s;if(Gt(e)===Gt(Ar(t)))return!0;if(!Et(e,15)||(r=u(e,15),s=t.gc(),s!=r.gc()))return!1;if(Et(r,54)){for(n=0;n0&&(s=n),h=new S(t.f.e);h.a0?(e-=1,n-=1):r>=0&&s<0?(e+=1,n+=1):r>0&&s>=0?(e-=1,n+=1):(e+=1,n-=1),new la(de(e),de(n))}function gbn(t,e){return t.ce.c?1:t.be.b?1:t.a!=e.a?Hi(t.a)-Hi(e.a):t.d==(BC(),NS)&&e.d==OS?-1:t.d==OS&&e.d==NS?1:0}function uce(t,e){var n,r,s,o,h;return o=e.a,o.c.i==e.b?h=o.d:h=o.c,o.c.i==e.b?r=o.c:r=o.d,s=qln(t.a,h,r),s>0&&s0):s<0&&-s0):!1}function pbn(t,e,n,r){var s,o,h,d,w,k,C,M;for(s=(e-t.d)/t.c.c.length,o=0,t.a+=n,t.d=e,M=new S(t.c);M.a>24;return h}function vbn(t){if(t.pe()){var e=t.c;e.qe()?t.o="["+e.n:e.pe()?t.o="["+e.ne():t.o="[L"+e.ne()+";",t.b=e.me()+"[]",t.k=e.oe()+"[]";return}var n=t.j,r=t.d;r=r.split("/"),t.o=Yit(".",[n,Yit("$",r)]),t.b=Yit(".",[n,Yit(".",r)]),t.k=r[r.length-1]}function wbn(t,e){var n,r,s,o,h;for(h=null,o=new S(t.e.a);o.a=0;e-=2)for(n=0;n<=e;n+=2)(t.b[n]>t.b[n+2]||t.b[n]===t.b[n+2]&&t.b[n+1]>t.b[n+3])&&(r=t.b[n+2],t.b[n+2]=t.b[n],t.b[n]=r,r=t.b[n+3],t.b[n+3]=t.b[n+1],t.b[n+1]=r);t.c=!0}}function lce(t,e){var n,r,s,o,h,d,w,k;for(h=e==1?Qut:Xut,o=h.a.ec().Kc();o.Ob();)for(s=u(o.Pb(),103),w=u(Ai(t.f.c,s),21).Kc();w.Ob();)switch(d=u(w.Pb(),46),r=u(d.b,81),k=u(d.a,189),n=k.c,s.g){case 2:case 1:r.g.d+=n;break;case 4:case 3:r.g.c+=n}}function xbn(t,e){var n,r,s,o,h,d,w,k,C;for(k=-1,C=0,h=t,d=0,w=h.length;d0&&++C;++k}return C}function bf(t){var e,n;return n=new Il(Ap(t.gm)),n.a+="@",Vr(n,(e=Hi(t)>>>0,e.toString(16))),t.kh()?(n.a+=" (eProxyURI: ",hc(n,t.qh()),t.$g()&&(n.a+=" eClass: ",hc(n,t.$g())),n.a+=")"):t.$g()&&(n.a+=" (eClass: ",hc(n,t.$g()),n.a+=")"),n.a}function p_(t){var e,n,r,s;if(t.e)throw rt(new Fo((L0(Mut),bot+Mut.k+vot)));for(t.d==(ao(),c0)&&_q(t,jh),n=new S(t.a.a);n.a>24}return n}function Tbn(t,e,n){var r,s,o;if(s=u(go(t.i,e),306),!s)if(s=new hee(t.d,e,n),Nx(t.i,e,s),S3t(e))$Xe(t.a,e.c,e.b,s);else switch(o=hgn(e),r=u(go(t.p,o),244),o.g){case 1:case 3:s.j=!0,Jtt(r,e.b,s);break;case 4:case 2:s.k=!0,Jtt(r,e.c,s)}return s}function Cbn(t,e,n,r){var s,o,h,d,w,k;if(d=new tx,w=au(t.e.Tg(),e),s=u(t.g,119),to(),u(e,66).Oj())for(h=0;h=0)return s;for(o=1,d=new S(e.j);d.a0&&e.ue((An(s-1,t.c.length),u(t.c[s-1],10)),o)>0;)ah(t,s,(An(s-1,t.c.length),u(t.c[s-1],10))),--s;An(s,t.c.length),t.c[s]=o}n.a=new Cr,n.b=new Cr}function _bn(t,e,n){var r,s,o,h,d,w,k,C;for(C=(r=u(e.e&&e.e(),9),new rh(r,u(uf(r,r.length),9),0)),w=py(n,"[\\[\\]\\s,]+"),o=w,h=0,d=o.length;h0&&(!(Op(t.a.c)&&e.n.d)&&!(c8(t.a.c)&&e.n.b)&&(e.g.d-=b.Math.max(0,r/2-.5)),!(Op(t.a.c)&&e.n.a)&&!(c8(t.a.c)&&e.n.c)&&(e.g.a+=b.Math.max(0,r-1)))}function pce(t,e,n){var r,s;if((t.c-t.b&t.a.length-1)==2)e==(be(),Nn)||e==Hn?(V$(u(KC(t),15),(jl(),u0)),V$(u(KC(t),15),wb)):(V$(u(KC(t),15),(jl(),wb)),V$(u(KC(t),15),u0));else for(s=new MC(t);s.a!=s.b;)r=u(mz(s),15),V$(r,n)}function Abn(t,e){var n,r,s,o,h,d,w;for(s=d8(new vpt(t)),d=new ha(s,s.c.length),o=d8(new vpt(e)),w=new ha(o,o.c.length),h=null;d.b>0&&w.b>0&&(n=(Qn(d.b>0),u(d.a.Xb(d.c=--d.b),33)),r=(Qn(w.b>0),u(w.a.Xb(w.c=--w.b),33)),n==r);)h=n;return h}function ol(t,e){var n,r,s,o,h,d;return o=t.a*fot+t.b*1502,d=t.b*fot+11,n=b.Math.floor(d*PD),o+=n,d-=n*Rxt,o%=Rxt,t.a=o,t.b=d,e<=24?b.Math.floor(t.a*TEt[e]):(s=t.a*(1<=2147483648&&(r-=cot),r)}function bce(t,e,n){var r,s,o,h;$Qt(t,e)>$Qt(t,n)?(r=Yo(n,(be(),Hn)),t.d=r.dc()?0:Cnt(u(r.Xb(0),11)),h=Yo(e,Bn),t.b=h.dc()?0:Cnt(u(h.Xb(0),11))):(s=Yo(n,(be(),Bn)),t.d=s.dc()?0:Cnt(u(s.Xb(0),11)),o=Yo(e,Hn),t.b=o.dc()?0:Cnt(u(o.Xb(0),11)))}function vce(t){var e,n,r,s,o,h,d;if(t&&(e=t.Hh(Ph),e&&(h=Br(Yf((!e.b&&(e.b=new yl((dn(),Qa),cc,e)),e.b),"conversionDelegates")),h!=null))){for(d=new le,r=py(h,"\\w+"),s=0,o=r.length;st.c));h++)s.a>=t.s&&(o<0&&(o=h),d=h);return w=(t.s+t.c)/2,o>=0&&(r=hwn(t,e,o,d),w=yYe((An(r,e.c.length),u(e.c[r],329))),xpn(e,r,n)),w}function Kst(){Kst=Z,Wye=new eo((ci(),$6),1.3),R_t=RSt,V_t=new Mv(15),t3e=new eo(q2,V_t),n3e=new eo(H2,15),Kye=BV,Qye=z2,Zye=a5,Jye=vb,Xye=s5,q_t=YO,e3e=Ky,G_t=(d5t(),Gye),z_t=qye,H_t=Hye,U_t=Vye,j_t=zye,$_t=RV,Yye=$St,RO=$ye,B_t=jye,W_t=Uye}function Ir(t,e,n){var r,s,o,h,d,w,k;for(h=(o=new JF,o),tyt(h,(On(e),e)),k=(!h.b&&(h.b=new yl((dn(),Qa),cc,h)),h.b),w=1;w0&&i3n(this,s)}function y5t(t,e,n,r,s,o){var h,d,w;if(!s[e.b]){for(s[e.b]=!0,h=r,!h&&(h=new _$),ue(h.e,e),w=o[e.b].Kc();w.Ob();)d=u(w.Pb(),282),!(d.d==n||d.c==n)&&(d.c!=e&&y5t(t,d.c,e,h,s,o),d.d!=e&&y5t(t,d.d,e,h,s,o),ue(h.c,d),As(h.d,d.b));return h}return null}function Ibn(t){var e,n,r,s,o,h,d;for(e=0,s=new S(t.e);s.a=2}function Dbn(t,e){var n,r,s,o;for(wr(e,"Self-Loop pre-processing",1),r=new S(t.a);r.a1||(e=ji(Ef,ct(ot(lo,1),ae,93,0,[J0,Tf])),AI(h$(e,t))>1)||(r=ji(_f,ct(ot(lo,1),ae,93,0,[l0,zh])),AI(h$(r,t))>1))}function Pbn(t,e){var n,r,s;return n=e.Hh(t.a),n&&(s=Br(Yf((!n.b&&(n.b=new yl((dn(),Qa),cc,n)),n.b),"affiliation")),s!=null)?(r=dj(s,Eu(35)),r==-1?Pit(t,kC(t,Fl(e.Hj())),s):r==0?Pit(t,null,s.substr(1)):Pit(t,s.substr(0,r),s.substr(r+1))):null}function Fbn(t){var e,n,r;try{return t==null?Tu:$o(t)}catch(s){if(s=Wi(s),Et(s,102))return e=s,r=Ap(sl(t))+"@"+(n=(qd(),O3t(t)>>>0),n.toString(16)),Thn(Ecn(),(s8(),"Exception during lenientFormat for "+r),e),"<"+r+" threw "+Ap(e.gm)+">";throw rt(s)}}function yce(t){switch(t.g){case 0:return new GJ;case 1:return new IB;case 2:return new kGt;case 3:return new DL;case 4:return new HWt;case 5:return new VJ;default:throw rt(new Pn("No implementation is available for the layerer "+(t.f!=null?t.f:""+t.g)))}}function x5t(t,e,n){var r,s,o;for(o=new S(t.t);o.a0&&(r.b.n-=r.c,r.b.n<=0&&r.b.u>0&&ni(e,r.b));for(s=new S(t.i);s.a0&&(r.a.u-=r.c,r.a.u<=0&&r.a.n>0&&ni(n,r.a))}function aq(t){var e,n,r,s,o;if(t.g==null&&(t.d=t.si(t.f),Mr(t,t.d),t.c))return o=t.f,o;if(e=u(t.g[t.i-1],47),s=e.Pb(),t.e=e,n=t.si(s),n.Ob())t.d=n,Mr(t,n);else for(t.d=null;!e.Ob()&&(Ji(t.g,--t.i,null),t.i!=0);)r=u(t.g[t.i-1],47),e=r;return s}function Bbn(t,e){var n,r,s,o,h,d;if(r=e,s=r.ak(),V0(t.e,s)){if(s.hi()&&k$(t,s,r.dd()))return!1}else for(d=au(t.e.Tg(),s),n=u(t.g,119),o=0;o1||n>1)return 2;return e+n==1?2:0}function kce(t,e,n){var r,s,o,h,d;for(wr(n,"ELK Force",1),je(Re(qe(e,(Zf(),d7t))))||u$((r=new rr((Im(),new Sm(e))),r)),d=Zne(e),c1n(d),zcn(t,u(Q(d,f7t),424)),h=hle(t.a,d),o=h.Kc();o.Ob();)s=u(o.Pb(),231),Ewn(t.b,s,Rc(n,1/h.gc()));d=The(h),xhe(d),or(n)}function Gbn(t,e){var n,r,s,o,h;if(wr(e,"Breaking Point Processor",1),l4n(t),je(Re(Q(t,(Te(),yCt))))){for(s=new S(t.b);s.a=0?t._g(r,!0,!0):lw(t,o,!0),153)),u(s,215).ml(e,n)}else throw rt(new Pn(ab+e.ne()+W_))}function Kbn(t,e){var n,r,s,o,h;for(n=new le,s=Wo(new Tn(null,new _n(t,16)),new zQ),o=Wo(new Tn(null,new _n(t,16)),new qQ),h=xan(Fsn(Jj(S2n(ct(ot(rxn,1),Ie,833,0,[s,o])),new HQ))),r=1;r=2*e&&ue(n,new ynt(h[r-1]+e,h[r]-e));return n}function Ybn(t,e,n){wr(n,"Eades radial",1),n.n&&e&&hf(n,ff(e),(Cl(),Yl)),t.d=u(qe(e,(bC(),$S)),33),t.c=Xt(ye(qe(e,(ay(),SV)))),t.e=ist(u(qe(e,BO),293)),t.a=Aln(u(qe(e,T_t),426)),t.b=X1n(u(qe(e,E_t),340)),M1n(t),n.n&&e&&hf(n,ff(e),(Cl(),Yl))}function Xbn(t,e,n){var r,s,o,h,d,w,k,C;if(n)for(o=n.a.length,r=new Qb(o),d=(r.b-r.a)*r.c<0?(Ip(),Ab):new Pp(r);d.Ob();)h=u(d.Pb(),19),s=_8(n,h.a),s&&(w=Kin(t,(k=(Tv(),C=new Rpt,C),e&&T5t(k,e),k),s),qC(w,O0(s,Cd)),Jz(s,w),K4t(s,w),wit(t,s,w))}function cq(t){var e,n,r,s,o,h;if(!t.j){if(h=new QT,e=aA,o=e.a.zc(t,e),o==null){for(r=new er(So(t));r.e!=r.i.gc();)n=u(dr(r),26),s=cq(n),rs(h,s),Mr(h,n);e.a.Bc(t)!=null}ey(h),t.j=new q3((u(St(Wt((jp(),Ln).o),11),18),h.i),h.g),rl(t).b&=-33}return t.j}function Qbn(t){var e,n,r,s;if(t==null)return null;if(r=$c(t,!0),s=nO.length,hn(r.substr(r.length-s,s),nO)){if(n=r.length,n==4){if(e=(Rr(0,r.length),r.charCodeAt(0)),e==43)return wLt;if(e==45)return A5e}else if(n==3)return wLt}return new Spt(r)}function Zbn(t){var e,n,r;return n=t.l,n&n-1||(r=t.m,r&r-1)||(e=t.h,e&e-1)||e==0&&r==0&&n==0?-1:e==0&&r==0&&n!=0?Wmt(n):e==0&&r!=0&&n==0?Wmt(r)+22:e!=0&&r==0&&n==0?Wmt(e)+44:-1}function Jbn(t,e){var n,r,s,o,h;for(wr(e,"Edge joining",1),n=je(Re(Q(t,(Te(),nht)))),s=new S(t.b);s.a1)for(s=new S(t.a);s.a0),o.a.Xb(o.c=--o.b),Rm(o,s),Qn(o.b3&&Xd(t,0,e-3))}function r2n(t){var e,n,r,s;return Gt(Q(t,(Te(),jy)))===Gt(($0(),Zg))?!t.e&&Gt(Q(t,_O))!==Gt((W8(),mO)):(r=u(Q(t,Glt),292),s=je(Re(Q(t,Vlt)))||Gt(Q(t,ES))===Gt((Yx(),wO)),e=u(Q(t,B9t),19).a,n=t.a.c.length,!s&&r!=(W8(),mO)&&(e==0||e>n))}function i2n(t){var e,n;for(n=0;n0);n++);if(n>0&&n0);e++);return e>0&&n>16!=6&&e){if(lE(t,e))throw rt(new Pn(K_+qoe(t)));r=null,t.Cb&&(r=(n=t.Db>>16,n>=0?X3t(t,r):t.Cb.ih(t,-1-n,null,r))),e&&(r=e6(e,t,6,r)),r=K2t(t,e,r),r&&r.Fi()}else t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,6,e,e))}function T5t(t,e){var n,r;if(e!=t.Cb||t.Db>>16!=9&&e){if(lE(t,e))throw rt(new Pn(K_+Tue(t)));r=null,t.Cb&&(r=(n=t.Db>>16,n>=0?Z3t(t,r):t.Cb.ih(t,-1-n,null,r))),e&&(r=e6(e,t,9,r)),r=Y2t(t,e,r),r&&r.Fi()}else t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,9,e,e))}function Xst(t,e){var n,r;if(e!=t.Cb||t.Db>>16!=3&&e){if(lE(t,e))throw rt(new Pn(K_+Ele(t)));r=null,t.Cb&&(r=(n=t.Db>>16,n>=0?t4t(t,r):t.Cb.ih(t,-1-n,null,r))),e&&(r=e6(e,t,12,r)),r=W2t(t,e,r),r&&r.Fi()}else t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,3,e,e))}function mE(t){var e,n,r,s,o;if(r=Lh(t),o=t.j,o==null&&r)return t.$j()?null:r.zj();if(Et(r,148)){if(n=r.Aj(),n&&(s=n.Nh(),s!=t.i)){if(e=u(r,148),e.Ej())try{t.g=s.Kh(e,o)}catch(h){if(h=Wi(h),Et(h,78))t.g=null;else throw rt(h)}t.i=s}return t.g}return null}function Cce(t){var e;return e=new le,ue(e,new Tx(new $e(t.c,t.d),new $e(t.c+t.b,t.d))),ue(e,new Tx(new $e(t.c,t.d),new $e(t.c,t.d+t.a))),ue(e,new Tx(new $e(t.c+t.b,t.d+t.a),new $e(t.c+t.b,t.d))),ue(e,new Tx(new $e(t.c+t.b,t.d+t.a),new $e(t.c,t.d+t.a))),e}function _ce(t,e,n,r){var s,o,h;if(h=c4t(e,n),r.c[r.c.length]=e,t.j[h.p]==-1||t.j[h.p]==2||t.a[e.p])return r;for(t.j[h.p]=-1,o=new ar(lr(z0(h).a.Kc(),new z));zr(o);)if(s=u(Lr(o),17),!(!(!Va(s)&&!(!Va(s)&&s.c.i.c==s.d.i.c))||s==e))return _ce(t,s,h,r);return r}function s2n(t,e,n){var r,s,o;for(o=e.a.ec().Kc();o.Ob();)s=u(o.Pb(),79),r=u(Jn(t.b,s),266),!r&&(ts(Zd(s))==ts(Xp(s))?yvn(t,s,n):Zd(s)==ts(Xp(s))?Jn(t.c,s)==null&&Jn(t.b,Xp(s))!=null&&she(t,s,n,!1):Jn(t.d,s)==null&&Jn(t.b,Zd(s))!=null&&she(t,s,n,!0))}function a2n(t,e){var n,r,s,o,h,d,w;for(s=t.Kc();s.Ob();)for(r=u(s.Pb(),10),d=new Mc,Uo(d,r),Fs(d,(be(),Hn)),Jt(d,(se(),VG),(Fn(),!0)),h=e.Kc();h.Ob();)o=u(h.Pb(),10),w=new Mc,Uo(w,o),Fs(w,Bn),Jt(w,VG,!0),n=new zv,Jt(n,VG,!0),Da(n,d),sa(n,w)}function o2n(t,e,n,r){var s,o,h,d;s=xie(t,e,n),o=xie(t,n,e),h=u(Jn(t.c,e),112),d=u(Jn(t.c,n),112),sr.b.g&&(o.c[o.c.length]=r);return o}function yE(){yE=Z,n5=new _M("CANDIDATE_POSITION_LAST_PLACED_RIGHT",0),R6=new _M("CANDIDATE_POSITION_LAST_PLACED_BELOW",1),qS=new _M("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT",2),zS=new _M("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW",3),HS=new _M("WHOLE_DRAWING",4)}function c2n(t,e){if(Et(e,239))return Run(t,u(e,33));if(Et(e,186))return Qun(t,u(e,118));if(Et(e,354))return lnn(t,u(e,137));if(Et(e,352))return Nmn(t,u(e,79));if(e)return null;throw rt(new Pn(k8t+Qp(new wl(ct(ot(Xn,1),Ie,1,5,[e])))))}function u2n(t){var e,n,r,s,o,h,d;for(o=new Qi,s=new S(t.d.a);s.a1)for(e=Dv((n=new Ub,++t.b,n),t.d),d=ei(o,0);d.b!=d.d.c;)h=u(ti(d),121),vf(of(af(cf(sf(new Eh,1),0),e),h))}function C5t(t,e){var n,r;if(e!=t.Cb||t.Db>>16!=11&&e){if(lE(t,e))throw rt(new Pn(K_+H5t(t)));r=null,t.Cb&&(r=(n=t.Db>>16,n>=0?e4t(t,r):t.Cb.ih(t,-1-n,null,r))),e&&(r=e6(e,t,10,r)),r=rvt(t,e,r),r&&r.Fi()}else t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,11,e,e))}function l2n(t){var e,n,r,s;for(r=new h2(new wg(t.b).a);r.b;)n=Yv(r),s=u(n.cd(),11),e=u(n.dd(),10),Jt(e,(se(),_i),s),Jt(s,Zu,e),Jt(s,kO,(Fn(),!0)),Fs(s,u(Q(e,oc),61)),Q(e,oc),Jt(s.i,(Te(),os),(oa(),L7)),u(Q(Fa(s.i),Gc),21).Fc((oo(),f7))}function h2n(t,e,n){var r,s,o,h,d,w;if(o=0,h=0,t.c)for(w=new S(t.d.i.j);w.ao.a?-1:s.aw){for(C=t.d,t.d=Pt(HAt,I8t,63,2*w+4,0,1),o=0;o=9223372036854776e3?(N8(),Z8t):(s=!1,t<0&&(s=!0,t=-t),r=0,t>=x2&&(r=ps(t/x2),t-=r*x2),n=0,t>=f6&&(n=ps(t/f6),t-=n*f6),e=ps(t),o=ru(e,n,r),s&&vit(o),o)}function x2n(t,e){var n,r,s,o;for(n=!e||!t.u.Hc((Qu(),tg)),o=0,s=new S(t.e.Cf());s.a=-e&&r==e?new la(de(n-1),de(r)):new la(de(n),de(r-1))}function Ice(){return ro(),ct(ot(hxn,1),ae,77,0,[U7t,H7t,hS,rlt,hTt,gG,TG,r7,uTt,tTt,oTt,n7,lTt,Q7t,fTt,B7t,wG,ilt,fG,xG,gTt,yG,R7t,cTt,pTt,kG,dTt,dG,K7t,sTt,iTt,CG,z7t,hG,bG,$7t,e7,nTt,Z7t,aTt,fS,G7t,q7t,rTt,J7t,vG,EG,j7t,mG,eTt,pG,Y7t,W7t,bO,lG,X7t,V7t])}function C2n(t,e,n){t.d=0,t.b=0,e.k==(Gn(),Hc)&&n.k==Hc&&u(Q(e,(se(),_i)),10)==u(Q(n,_i),10)&&(Grt(e).j==(be(),Nn)?bce(t,e,n):bce(t,n,e)),e.k==Hc&&n.k==Zs?Grt(e).j==(be(),Nn)?t.d=1:t.b=1:n.k==Hc&&e.k==Zs&&(Grt(n).j==(be(),Nn)?t.b=1:t.d=1),ffn(t,e,n)}function _2n(t){var e,n,r,s,o,h,d,w,k,C,M;return M=T4t(t),e=t.a,w=e!=null,w&&p8(M,"category",t.a),s=fM(new Tm(t.d)),h=!s,h&&(k=new bg,Wf(M,"knownOptions",k),n=new mzt(k),va(new Tm(t.d),n)),o=fM(t.g),d=!o,d&&(C=new bg,Wf(M,"supportedFeatures",C),r=new yzt(C),va(t.g,r)),M}function S2n(t){var e,n,r,s,o,h,d,w,k;for(r=!1,e=336,n=0,o=new OWt(t.length),d=t,w=0,k=d.length;w>16!=7&&e){if(lE(t,e))throw rt(new Pn(K_+Rae(t)));r=null,t.Cb&&(r=(n=t.Db>>16,n>=0?Q3t(t,r):t.Cb.ih(t,-1-n,null,r))),e&&(r=u(e,49).gh(t,1,sN,r)),r=Yvt(t,e,r),r&&r.Fi()}else t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,7,e,e))}function Dce(t,e){var n,r;if(e!=t.Cb||t.Db>>16!=3&&e){if(lE(t,e))throw rt(new Pn(K_+Wre(t)));r=null,t.Cb&&(r=(n=t.Db>>16,n>=0?J3t(t,r):t.Cb.ih(t,-1-n,null,r))),e&&(r=u(e,49).gh(t,0,oN,r)),r=Xvt(t,e,r),r&&r.Fi()}else t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,3,e,e))}function Zst(t,e){bE();var n,r,s,o,h,d,w,k,C;return e.d>t.d&&(d=t,t=e,e=d),e.d<63?vvn(t,e):(h=(t.d&-2)<<4,k=umt(t,h),C=umt(e,h),r=gat(t,Gx(k,h)),s=gat(e,Gx(C,h)),w=Zst(k,C),n=Zst(r,s),o=Zst(gat(k,r),gat(s,C)),o=kat(kat(o,w),n),o=Gx(o,h),w=Gx(w,h<<1),kat(kat(w,o),n))}function L2n(t,e,n){var r,s,o,h,d;for(h=QC(t,n),d=Pt(o0,zg,10,e.length,0,1),r=0,o=h.Kc();o.Ob();)s=u(o.Pb(),11),je(Re(Q(s,(se(),kO))))&&(d[r++]=u(Q(s,Zu),10));if(r=0;o+=n?1:-1)h=h|e.c.Sf(w,o,n,r&&!je(Re(Q(e.j,(se(),Mw))))&&!je(Re(Q(e.j,(se(),K4))))),h=h|e.q._f(w,o,n),h=h|vue(t,w[o],n,r);return Ns(t.c,e),h}function lq(t,e,n){var r,s,o,h,d,w,k,C,M,F;for(C=bZt(t.j),M=0,F=C.length;M1&&(t.a=!0),Vtn(u(n.b,65),Li(nc(u(e.b,65).c),ud(na(nc(u(n.b,65).a),u(e.b,65).a),s))),MQt(t,e),Oce(t,n)}function Nce(t){var e,n,r,s,o,h,d;for(o=new S(t.a.a);o.a0&&o>0?h.p=e++:r>0?h.p=n++:o>0?h.p=s++:h.p=n++}vn(),Xs(t.j,new _L)}function N2n(t){var e,n;n=null,e=u(Fe(t.g,0),17);do{if(n=e.d.i,Vs(n,(se(),Rh)))return u(Q(n,Rh),11).i;if(n.k!=(Gn(),Ds)&&zr(new ar(lr(Ms(n).a.Kc(),new z))))e=u(Lr(new ar(lr(Ms(n).a.Kc(),new z))),17);else if(n.k!=Ds)return null}while(n&&n.k!=(Gn(),Ds));return n}function P2n(t,e){var n,r,s,o,h,d,w,k,C;for(d=e.j,h=e.g,w=u(Fe(d,d.c.length-1),113),C=(An(0,d.c.length),u(d.c[0],113)),k=vst(t,h,w,C),o=1;ok&&(w=n,C=s,k=r);e.a=C,e.c=w}function F2n(t,e){var n,r;if(r=YM(t.b,e.b),!r)throw rt(new Fo("Invalid hitboxes for scanline constraint calculation."));(zne(e.b,u(FQe(t.b,e.b),57))||zne(e.b,u(PQe(t.b,e.b),57)))&&(qd(),e.b+""),t.a[e.b.f]=u(gnt(t.b,e.b),57),n=u(dnt(t.b,e.b),57),n&&(t.a[n.f]=e.b)}function vf(t){if(!t.a.d||!t.a.e)throw rt(new Fo((L0(Yge),Yge.k+" must have a source and target "+(L0(JEt),JEt.k)+" specified.")));if(t.a.d==t.a.e)throw rt(new Fo("Network simplex does not support self-loops: "+t.a+" "+t.a.d+" "+t.a.e));return pj(t.a.d.g,t.a),pj(t.a.e.b,t.a),t.a}function B2n(t,e,n){var r,s,o,h,d,w,k;for(k=new Lp(new w$t(t)),h=ct(ot(Fbe,1),Kfe,11,0,[e,n]),d=0,w=h.length;dw-t.b&&dw-t.a&&d0&&++H;++F}return H}function W2n(t,e){var n,r,s,o,h;for(h=u(Q(e,(hw(),a_t)),425),o=ei(e.b,0);o.b!=o.d.c;)if(s=u(ti(o),86),t.b[s.g]==0){switch(h.g){case 0:cse(t,s);break;case 1:Ypn(t,s)}t.b[s.g]=2}for(r=ei(t.a,0);r.b!=r.d.c;)n=u(ti(r),188),ry(n.b.d,n,!0),ry(n.c.b,n,!0);Jt(e,(fc(),JCt),t.a)}function au(t,e){to();var n,r,s,o;return e?e==(Di(),_5e)||(e==g5e||e==U2||e==d5e)&&t!=bLt?new xxt(t,e):(r=u(e,677),n=r.pk(),n||(k8(Eo((Ru(),ma),e)),n=r.pk()),o=(!n.i&&(n.i=new Cr),n.i),s=u(ec(Ao(o.f,t)),1942),!s&&ki(o,t,s=new xxt(t,e)),s):l5e}function K2n(t,e){var n,r,s,o,h,d,w,k,C;for(w=u(Q(t,(se(),_i)),11),k=Ko(ct(ot(Us,1),te,8,0,[w.i.n,w.n,w.a])).a,C=t.i.n.b,n=gd(t.e),s=n,o=0,h=s.length;o0?o.a?(d=o.b.rf().a,n>d&&(s=(n-d)/2,o.d.b=s,o.d.c=s)):o.d.c=t.s+n:TC(t.u)&&(r=C4t(o.b),r.c<0&&(o.d.b=-r.c),r.c+r.b>o.b.rf().a&&(o.d.c=r.c+r.b-o.b.rf().a))}function Z2n(t,e){var n,r,s,o;for(wr(e,"Semi-Interactive Crossing Minimization Processor",1),n=!1,s=new S(t.b);s.a=0){if(e==n)return new la(de(-e-1),de(-e-1));if(e==-n)return new la(de(-e),de(n+1))}return b.Math.abs(e)>b.Math.abs(n)?e<0?new la(de(-e),de(n)):new la(de(-e),de(n+1)):new la(de(e+1),de(n))}function evn(t){var e,n;n=u(Q(t,(Te(),cu)),163),e=u(Q(t,(se(),O2)),303),n==(hh(),fb)?(Jt(t,cu,CO),Jt(t,O2,(B0(),U4))):n==Fy?(Jt(t,cu,CO),Jt(t,O2,(B0(),A6))):e==(B0(),U4)?(Jt(t,cu,fb),Jt(t,O2,yO)):e==A6&&(Jt(t,cu,Fy),Jt(t,O2,yO))}function hq(){hq=Z,NO=new AQ,Pme=bi(new Hs,(Wa(),ou),(ro(),fG)),Rme=Ku(bi(new Hs,ou,yG),Io,mG),jme=aw(aw(OR(Ku(bi(new Hs,Ad,TG),Io,EG),qc),kG),CG),Fme=Ku(bi(bi(bi(new Hs,lb,gG),qc,bG),qc,e7),Io,pG),Bme=Ku(bi(bi(new Hs,qc,e7),qc,hG),Io,lG)}function b_(){b_=Z,qme=bi(Ku(new Hs,(Wa(),Io),(ro(),Y7t)),ou,fG),Ume=aw(aw(OR(Ku(bi(new Hs,Ad,TG),Io,EG),qc),kG),CG),Hme=Ku(bi(bi(bi(new Hs,lb,gG),qc,bG),qc,e7),Io,pG),Vme=bi(bi(new Hs,ou,yG),Io,mG),Gme=Ku(bi(bi(new Hs,qc,e7),qc,hG),Io,lG)}function nvn(t,e,n,r,s){var o,h;(!Va(e)&&e.c.i.c==e.d.i.c||!Yee(Ko(ct(ot(Us,1),te,8,0,[s.i.n,s.n,s.a])),n))&&!Va(e)&&(e.c==s?h8(e.a,0,new yo(n)):ni(e.a,new yo(n)),r&&!S0(t.a,n)&&(h=u(Q(e,(Te(),_o)),74),h||(h=new Du,Jt(e,_o,h)),o=new yo(n),hs(h,o,h.c.b,h.c),Ns(t.a,o)))}function rvn(t){var e,n;for(n=new ar(lr(jo(t).a.Kc(),new z));zr(n);)if(e=u(Lr(n),17),e.c.i.k!=(Gn(),Sl))throw rt(new F3(Rot+ZI(t)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function ivn(t,e,n){var r,s,o,h,d,w,k;if(s=Jre(t.Db&254),s==0)t.Eb=n;else{if(s==1)d=Pt(Xn,Ie,1,2,5,1),o=bst(t,e),o==0?(d[0]=n,d[1]=t.Eb):(d[0]=t.Eb,d[1]=n);else for(d=Pt(Xn,Ie,1,s+1,5,1),h=s2(t.Eb),r=2,w=0,k=0;r<=128;r<<=1)r==e?d[k++]=n:t.Db&r&&(d[k++]=h[w++]);t.Eb=d}t.Db|=e}function Fce(t,e,n){var r,s,o,h;for(this.b=new le,s=0,r=0,h=new S(t);h.a0&&(o=u(Fe(this.b,0),167),s+=o.o,r+=o.p),s*=2,r*=2,e>1?s=ps(b.Math.ceil(s*e)):r=ps(b.Math.ceil(r/e)),this.a=new w3t(s,r)}function Bce(t,e,n,r,s,o){var h,d,w,k,C,M,F,H,V,Y,tt,gt;for(C=r,e.j&&e.o?(H=u(Jn(t.f,e.A),57),Y=H.d.c+H.d.b,--C):Y=e.a.c+e.a.b,M=s,n.q&&n.o?(H=u(Jn(t.f,n.C),57),k=H.d.c,++M):k=n.a.c,tt=k-Y,w=b.Math.max(2,M-C),d=tt/w,V=Y+d,F=C;F=0;h+=s?1:-1){for(d=e[h],w=r==(be(),Hn)?s?Yo(d,r):a2(Yo(d,r)):s?a2(Yo(d,r)):Yo(d,r),o&&(t.c[d.p]=w.gc()),M=w.Kc();M.Ob();)C=u(M.Pb(),11),t.d[C.p]=k++;As(n,w)}}function Rce(t,e,n){var r,s,o,h,d,w,k,C;for(o=Xt(ye(t.b.Kc().Pb())),k=Xt(ye(dcn(e.b))),r=ud(nc(t.a),k-n),s=ud(nc(e.a),n-o),C=Li(r,s),ud(C,1/(k-o)),this.a=C,this.b=new le,d=!0,h=t.b.Kc(),h.Pb();h.Ob();)w=Xt(ye(h.Pb())),d&&w-n>wct&&(this.b.Fc(n),d=!1),this.b.Fc(w);d&&this.b.Fc(n)}function svn(t){var e,n,r,s;if(bwn(t,t.n),t.d.c.length>0){for(P9(t.c);l5t(t,u(J(new S(t.e.a)),121))>5,e&=31,r>=t.d)return t.e<0?(Jp(),_ut):(Jp(),QE);if(o=t.d-r,s=Pt(Tr,Xr,25,o+1,15,1),Z0n(s,o,t.a,r,e),t.e<0){for(n=0;n0&&t.a[n]<<32-e){for(n=0;n=0?!1:(n=E4((Ru(),ma),s,e),n?(r=n.Zj(),(r>1||r==-1)&&$v(Eo(ma,n))!=3):!0)):!1}function uvn(t,e,n,r){var s,o,h,d,w;return d=Mo(u(St((!e.b&&(e.b=new Cn(br,e,4,7)),e.b),0),82)),w=Mo(u(St((!e.c&&(e.c=new Cn(br,e,5,8)),e.c),0),82)),ts(d)==ts(w)||Zm(w,d)?null:(h=rI(e),h==n?r:(o=u(Jn(t.a,h),10),o&&(s=o.e,s)?s:null))}function lvn(t,e){var n;switch(n=u(Q(t,(Te(),ZG)),276),wr(e,"Label side selection ("+n+")",1),n.g){case 0:nce(t,(jl(),u0));break;case 1:nce(t,(jl(),wb));break;case 2:vle(t,(jl(),u0));break;case 3:vle(t,(jl(),wb));break;case 4:Zce(t,(jl(),u0));break;case 5:Zce(t,(jl(),wb))}or(e)}function D5t(t,e,n){var r,s,o,h,d,w;if(r=YKe(n,t.length),h=t[r],h[0].k==(Gn(),xs))for(o=nHt(n,h.length),w=e.j,s=0;s0&&(n[0]+=t.d,h-=n[0]),n[2]>0&&(n[2]+=t.d,h-=n[2]),o=b.Math.max(0,h),n[1]=b.Math.max(n[1],h),hmt(t,tu,s.c+r.b+n[0]-(n[1]-h)/2,n),e==tu&&(t.c.b=o,t.c.c=s.c+r.b+(o-h)/2)}function Yce(){this.c=Pt(ia,vo,25,(be(),ct(ot(Xa,1),xc,61,0,[Zo,Nn,Hn,mr,Bn])).length,15,1),this.b=Pt(ia,vo,25,ct(ot(Xa,1),xc,61,0,[Zo,Nn,Hn,mr,Bn]).length,15,1),this.a=Pt(ia,vo,25,ct(ot(Xa,1),xc,61,0,[Zo,Nn,Hn,mr,Bn]).length,15,1),xbt(this.c,ss),xbt(this.b,Ts),xbt(this.a,Ts)}function jc(t,e,n){var r,s,o,h;if(e<=n?(s=e,o=n):(s=n,o=e),r=0,t.b==null)t.b=Pt(Tr,Xr,25,2,15,1),t.b[0]=s,t.b[1]=o,t.c=!0;else{if(r=t.b.length,t.b[r-1]+1==s){t.b[r-1]=o;return}h=Pt(Tr,Xr,25,r+2,15,1),Ic(t.b,0,h,0,r),t.b=h,t.b[r-1]>=s&&(t.c=!1,t.a=!1),t.b[r++]=s,t.b[r]=o,t.c||b4(t)}}function wvn(t,e,n){var r,s,o,h,d,w,k;for(k=e.d,t.a=new Yc(k.c.length),t.c=new Cr,d=new S(k);d.a=0?t._g(k,!1,!0):lw(t,n,!1),58));t:for(o=M.Kc();o.Ob();){for(s=u(o.Pb(),56),C=0;C1;)dy(s,s.i-1);return r}function Evn(t,e){var n,r,s,o,h,d,w;for(wr(e,"Comment post-processing",1),o=new S(t.b);o.at.d[h.p]&&(n+=smt(t.b,o),qp(t.a,de(o)));for(;!N9(t.a);)Fmt(t.b,u(Fx(t.a),19).a)}return n}function Jce(t,e,n){var r,s,o,h;for(o=(!e.a&&(e.a=new he(ns,e,10,11)),e.a).i,s=new er((!e.a&&(e.a=new he(ns,e,10,11)),e.a));s.e!=s.i.gc();)r=u(dr(s),33),(!r.a&&(r.a=new he(ns,r,10,11)),r.a).i==0||(o+=Jce(t,r,!1));if(n)for(h=ts(e);h;)o+=(!h.a&&(h.a=new he(ns,h,10,11)),h.a).i,h=ts(h);return o}function dy(t,e){var n,r,s,o;return t.ej()?(r=null,s=t.fj(),t.ij()&&(r=t.kj(t.pi(e),null)),n=t.Zi(4,o=r6(t,e),null,e,s),t.bj()&&o!=null&&(r=t.dj(o,r)),r?(r.Ei(n),r.Fi()):t.$i(n),o):(o=r6(t,e),t.bj()&&o!=null&&(r=t.dj(o,null),r&&r.Fi()),o)}function Cvn(t){var e,n,r,s,o,h,d,w,k,C;for(k=t.a,e=new qs,w=0,r=new S(t.d);r.ad.d&&(C=d.d+d.a+k));n.c.d=C,e.a.zc(n,e),w=b.Math.max(w,n.c.d+n.c.a)}return w}function oo(){oo=Z,RG=new Dm("COMMENTS",0),bh=new Dm("EXTERNAL_PORTS",1),vS=new Dm("HYPEREDGES",2),jG=new Dm("HYPERNODES",3),f7=new Dm("NON_FREE_PORTS",4),V4=new Dm("NORTH_SOUTH_PORTS",5),wS=new Dm(d1e,6),l7=new Dm("CENTER_LABELS",7),h7=new Dm("END_LABELS",8),$G=new Dm("PARTITIONS",9)}function gy(t){var e,n,r,s,o;for(s=new le,e=new yC((!t.a&&(t.a=new he(ns,t,10,11)),t.a)),r=new ar(lr(G0(t).a.Kc(),new z));zr(r);)n=u(Lr(r),79),Et(St((!n.b&&(n.b=new Cn(br,n,4,7)),n.b),0),186)||(o=Mo(u(St((!n.c&&(n.c=new Cn(br,n,5,8)),n.c),0),82)),e.a._b(o)||(s.c[s.c.length]=o));return s}function _vn(t){var e,n,r,s,o,h;for(o=new qs,e=new yC((!t.a&&(t.a=new he(ns,t,10,11)),t.a)),s=new ar(lr(G0(t).a.Kc(),new z));zr(s);)r=u(Lr(s),79),Et(St((!r.b&&(r.b=new Cn(br,r,4,7)),r.b),0),186)||(h=Mo(u(St((!r.c&&(r.c=new Cn(br,r,5,8)),r.c),0),82)),e.a._b(h)||(n=o.a.zc(h,o),n==null));return o}function Svn(t,e,n,r,s){return r<0?(r=p4(t,s,ct(ot(Ae,1),te,2,6,[$at,zat,qat,Hat,l6,Gat,Vat,Uat,Wat,Kat,Yat,Xat]),e),r<0&&(r=p4(t,s,ct(ot(Ae,1),te,2,6,["Jan","Feb","Mar","Apr",l6,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),r<0?!1:(n.k=r,!0)):r>0?(n.k=r-1,!0):!1}function Avn(t,e,n,r,s){return r<0?(r=p4(t,s,ct(ot(Ae,1),te,2,6,[$at,zat,qat,Hat,l6,Gat,Vat,Uat,Wat,Kat,Yat,Xat]),e),r<0&&(r=p4(t,s,ct(ot(Ae,1),te,2,6,["Jan","Feb","Mar","Apr",l6,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),e)),r<0?!1:(n.k=r,!0)):r>0?(n.k=r-1,!0):!1}function Lvn(t,e,n,r,s,o){var h,d,w,k;if(d=32,r<0){if(e[0]>=t.length||(d=ba(t,e[0]),d!=43&&d!=45)||(++e[0],r=rq(t,e),r<0))return!1;d==45&&(r=-r)}return d==32&&e[0]-n==2&&s.b==2&&(w=new _R,k=w.q.getFullYear()-nb+nb-80,h=k%100,o.a=r==h,r+=(k/100|0)*100+(r=k&&(w=r);w&&(C=b.Math.max(C,w.a.o.a)),C>F&&(M=k,F=C)}return M}function Dvn(t,e,n){var r,s,o;if(t.e=n,t.d=0,t.b=0,t.f=1,t.i=e,(t.e&16)==16&&(t.i=wwn(t.i)),t.j=t.i.length,fi(t),o=sw(t),t.d!=t.j)throw rt(new Fr(qr((Nr(),Pde))));if(t.g){for(r=0;rF1e?Xs(w,t.b):r<=F1e&&r>B1e?Xs(w,t.d):r<=B1e&&r>R1e?Xs(w,t.c):r<=R1e&&Xs(w,t.a),o=rue(t,w,o);return s}function Jp(){Jp=Z;var t;for(GH=new Lg(1,1),Sut=new Lg(1,10),QE=new Lg(0,0),_ut=new Lg(-1,1),wEt=ct(ot(B4,1),te,91,0,[QE,GH,new Lg(1,2),new Lg(1,3),new Lg(1,4),new Lg(1,5),new Lg(1,6),new Lg(1,7),new Lg(1,8),new Lg(1,9),Sut]),VH=Pt(B4,te,91,32,0,1),t=0;t1,d&&(r=new $e(s,n.b),ni(e.a,r)),zC(e.a,ct(ot(Us,1),te,8,0,[F,M]))}function cue(t){Sv(t,new w2(Ev(yv(kv(xv(new pg,vH),"ELK Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new zZ))),xe(t,vH,ww,AAt),xe(t,vH,ky,15),xe(t,vH,Hq,de(0)),xe(t,vH,b6,BE)}function P5t(){P5t=Z;var t,e,n,r,s,o;for(lA=Pt(Hu,N4,25,255,15,1),uU=Pt(mh,vd,25,16,15,1),e=0;e<255;e++)lA[e]=-1;for(n=57;n>=48;n--)lA[n]=n-48<<24>>24;for(r=70;r>=65;r--)lA[r]=r-65+10<<24>>24;for(s=102;s>=97;s--)lA[s]=s-97+10<<24>>24;for(o=0;o<10;o++)uU[o]=48+o&ms;for(t=10;t<=15;t++)uU[t]=65+t-10&ms}function dq(t,e,n){var r,s,o,h,d,w,k,C;return d=e.i-t.g/2,w=n.i-t.g/2,k=e.j-t.g/2,C=n.j-t.g/2,o=e.g+t.g/2,h=n.g+t.g/2,r=e.f+t.g/2,s=n.f+t.g/2,d>19)return"-"+uue(Y8(t));for(n=t,r="";!(n.l==0&&n.m==0&&n.h==0);){if(s=Ort(Nq),n=dxt(n,s,!0),e=""+xHt(ob),!(n.l==0&&n.m==0&&n.h==0))for(o=9-e.length;o>0;o--)e="0"+e;r=e+r}return r}function Rvn(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var t="__proto__",e=Object.create(null);if(e[t]!==void 0)return!1;var n=Object.getOwnPropertyNames(e);return!(n.length!=0||(e[t]=42,e[t]!==42)||Object.getOwnPropertyNames(e).length==0)}function jvn(t){var e,n,r,s,o,h,d;for(e=!1,n=0,s=new S(t.d.b);s.a=t.a||!k4t(e,n))return-1;if(S8(u(r.Kb(e),20)))return 1;for(s=0,h=u(r.Kb(e),20).Kc();h.Ob();)if(o=u(h.Pb(),17),w=o.c.i==e?o.d.i:o.c.i,d=B5t(t,w,n,r),d==-1||(s=b.Math.max(s,d),s>t.c-1))return-1;return s+1}function lue(t,e){var n,r,s,o,h,d;if(Gt(e)===Gt(t))return!0;if(!Et(e,15)||(r=u(e,15),d=t.gc(),r.gc()!=d))return!1;if(h=r.Kc(),t.ni()){for(n=0;n0){if(t.qj(),e!=null){for(o=0;o>24;case 97:case 98:case 99:case 100:case 101:case 102:return t-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return t-65+10<<24>>24;default:throw rt(new od("Invalid hexadecimal"))}}function Hvn(t,e,n){var r,s,o,h;for(wr(n,"Processor order nodes",2),t.a=Xt(ye(Q(e,(hw(),o_t)))),s=new Qi,h=ei(e.b,0);h.b!=h.d.c;)o=u(ti(h),86),je(Re(Q(o,(fc(),Wy))))&&hs(s,o,s.c.b,s.c);r=(Qn(s.b!=0),u(s.a.a.c,86)),Mle(t,r),!n.b&&iit(n,1),q5t(t,r,0-Xt(ye(Q(r,(fc(),xV))))/2,0),!n.b&&iit(n,1),or(n)}function gq(){gq=Z,QEt=new j3("SPIRAL",0),WEt=new j3("LINE_BY_LINE",1),KEt=new j3("MANHATTAN",2),UEt=new j3("JITTER",3),Out=new j3("QUADRANTS_LINE_BY_LINE",4),XEt=new j3("QUADRANTS_MANHATTAN",5),YEt=new j3("QUADRANTS_JITTER",6),VEt=new j3("COMBINE_LINE_BY_LINE_MANHATTAN",7),GEt=new j3("COMBINE_JITTER_MANHATTAN",8)}function fue(t,e,n,r){var s,o,h,d,w,k;for(w=kst(t,n),k=kst(e,n),s=!1;w&&k&&(r||jfn(w,k,n));)h=kst(w,n),d=kst(k,n),vI(e),vI(t),o=w.c,_at(w,!1),_at(k,!1),n?(oy(e,k.p,o),e.p=k.p,oy(t,w.p+1,o),t.p=w.p):(oy(t,w.p,o),t.p=w.p,oy(e,k.p+1,o),e.p=k.p),ko(w,null),ko(k,null),w=h,k=d,s=!0;return s}function Gvn(t,e,n,r){var s,o,h,d,w;for(s=!1,o=!1,d=new S(r.j);d.a=e.length)throw rt(new mo("Greedy SwitchDecider: Free layer not in graph."));this.c=e[t],this.e=new HM(r),cit(this.e,this.c,(be(),Bn)),this.i=new HM(r),cit(this.i,this.c,Hn),this.f=new lYt(this.c),this.a=!o&&s.i&&!s.s&&this.c[0].k==(Gn(),xs),this.a&&ogn(this,t,e.length)}function gue(t,e){var n,r,s,o,h,d;o=!t.B.Hc((cl(),rN)),h=t.B.Hc(vft),t.a=new uie(h,o,t.c),t.n&&Swt(t.a.n,t.n),Jtt(t.g,(Kf(),tu),t.a),e||(r=new r_(1,o,t.c),r.n.a=t.k,Nx(t.p,(be(),Nn),r),s=new r_(1,o,t.c),s.n.d=t.k,Nx(t.p,mr,s),d=new r_(0,o,t.c),d.n.c=t.k,Nx(t.p,Bn,d),n=new r_(0,o,t.c),n.n.b=t.k,Nx(t.p,Hn,n))}function Uvn(t){var e,n,r;switch(e=u(Q(t.d,(Te(),X0)),218),e.g){case 2:n=k5n(t);break;case 3:n=(r=new le,us(Ri(pu(Wo(Wo(new Tn(null,new _n(t.d.b,16)),new CX),new _X),new $T),new pX),new Ptt(r)),r);break;default:throw rt(new Fo("Compaction not supported for "+e+" edges."))}Gyn(t,n),va(new Tm(t.g),new Ott(t))}function Wvn(t,e){var n;return n=new xa,e&&Lo(n,u(Jn(t.a,sN),94)),Et(e,470)&&Lo(n,u(Jn(t.a,aN),94)),Et(e,354)?(Lo(n,u(Jn(t.a,qo),94)),n):(Et(e,82)&&Lo(n,u(Jn(t.a,br),94)),Et(e,239)?(Lo(n,u(Jn(t.a,ns),94)),n):Et(e,186)?(Lo(n,u(Jn(t.a,fl),94)),n):(Et(e,352)&&Lo(n,u(Jn(t.a,Ws),94)),n))}function Zf(){Zf=Z,t7=new eo((ci(),zV),de(1)),sG=new eo(H2,80),sbe=new eo(sAt,5),Xpe=new eo($6,BE),rbe=new eo(fft,de(1)),ibe=new eo(dft,(Fn(),!0)),g7t=new Mv(50),ebe=new eo(q2,g7t),h7t=RV,p7t=US,Qpe=new eo(rft,!1),d7t=YO,tbe=vb,Jpe=z2,Zpe=s5,nbe=Ky,f7t=(P4t(),Hpe),Vut=Wpe,iG=qpe,Gut=Gpe,b7t=Upe}function Kvn(t){var e,n,r,s,o,h,d,w;for(w=new bJt,d=new S(t.a);d.a0&&e=0)return!1;if(e.p=n.b,ue(n.e,e),s==(Gn(),Zs)||s==Hc){for(h=new S(e.j);h.a1||h==-1)&&(o|=16),s.Bb&dc&&(o|=64)),n.Bb&Ya&&(o|=Ay),o|=wf):Et(e,457)?o|=512:(r=e.Bj(),r&&r.i&1&&(o|=256)),t.Bb&512&&(o|=128),o}function v_(t,e){var n,r,s,o,h;for(t=t==null?Tu:(On(t),t),s=0;st.d[d.p]&&(n+=smt(t.b,o),qp(t.a,de(o)))):++h;for(n+=t.b.d*h;!N9(t.a);)Fmt(t.b,u(Fx(t.a),19).a)}return n}function rwn(t,e){var n;return t.f==Lft?(n=$v(Eo((Ru(),ma),e)),t.e?n==4&&e!=(a6(),W6)&&e!=(a6(),U6)&&e!=(a6(),Mft)&&e!=(a6(),Ift):n==2):t.d&&(t.d.Hc(e)||t.d.Hc(qx(Eo((Ru(),ma),e)))||t.d.Hc(E4((Ru(),ma),t.b,e)))?!0:t.f&&_5t((Ru(),t.f),ZM(Eo(ma,e)))?(n=$v(Eo(ma,e)),t.e?n==4:n==2):!1}function iwn(t,e,n,r){var s,o,h,d,w,k,C,M;return h=u(qe(n,(ci(),z6)),8),w=h.a,C=h.b+t,s=b.Math.atan2(C,w),s<0&&(s+=I4),s+=e,s>I4&&(s-=I4),d=u(qe(r,z6),8),k=d.a,M=d.b+t,o=b.Math.atan2(M,k),o<0&&(o+=I4),o+=e,o>I4&&(o-=I4),y1(),gf(1e-10),b.Math.abs(s-o)<=1e-10||s==o||isNaN(s)&&isNaN(o)?0:so?1:Lv(isNaN(s),isNaN(o))}function rat(t){var e,n,r,s,o,h,d;for(d=new Cr,r=new S(t.a.b);r.a=t.o)throw rt(new _pt);d=e>>5,h=e&31,o=M0(1,Sr(M0(h,1))),s?t.n[n][d]=C1(t.n[n][d],o):t.n[n][d]=Ps(t.n[n][d],Ivt(o)),o=M0(o,1),r?t.n[n][d]=C1(t.n[n][d],o):t.n[n][d]=Ps(t.n[n][d],Ivt(o))}catch(w){throw w=Wi(w),Et(w,320)?rt(new mo(Tot+t.o+"*"+t.p+Cot+e+Ka+n+_ot)):rt(w)}}function q5t(t,e,n,r){var s,o,h;e&&(o=Xt(ye(Q(e,(fc(),Yg))))+r,h=n+Xt(ye(Q(e,xV)))/2,Jt(e,Lht,de(Sr(ku(b.Math.round(o))))),Jt(e,t_t,de(Sr(ku(b.Math.round(h))))),e.d.b==0||q5t(t,u(lj((s=ei(new Cp(e).a.d,0),new bx(s))),86),n+Xt(ye(Q(e,xV)))+t.a,r+Xt(ye(Q(e,k7)))),Q(e,Aht)!=null&&q5t(t,u(Q(e,Aht),86),n,r))}function awn(t,e){var n,r,s,o,h,d,w,k,C,M,F;for(w=Fa(e.a),s=Xt(ye(Q(w,(Te(),R2))))*2,C=Xt(ye(Q(w,Z4))),k=b.Math.max(s,C),o=Pt(ia,vo,25,e.f-e.c+1,15,1),r=-k,n=0,d=e.b.Kc();d.Ob();)h=u(d.Pb(),10),r+=t.a[h.c.p]+k,o[n++]=r;for(r+=t.a[e.a.c.p]+k,o[n++]=r,F=new S(e.e);F.a0&&(r=(!t.n&&(t.n=new he(qo,t,1,7)),u(St(t.n,0),137)).a,!r||Vr(Vr((e.a+=' "',e),r),'"'))),Vr(Cv(Vr(Cv(Vr(Cv(Vr(Cv((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function Tue(t){var e,n,r;return t.Db&64?Ost(t):(e=new Il(d8t),n=t.k,n?Vr(Vr((e.a+=' "',e),n),'"'):(!t.n&&(t.n=new he(qo,t,1,7)),t.n.i>0&&(r=(!t.n&&(t.n=new he(qo,t,1,7)),u(St(t.n,0),137)).a,!r||Vr(Vr((e.a+=' "',e),r),'"'))),Vr(Cv(Vr(Cv(Vr(Cv(Vr(Cv((e.a+=" (",e),t.i),","),t.j)," | "),t.g),","),t.f),")"),e.a)}function sat(t,e){var n,r,s,o,h,d,w;if(e==null||e.length==0)return null;if(s=u(Fc(t.a,e),149),!s){for(r=(d=new b1(t.b).a.vc().Kc(),new v1(d));r.a.Ob();)if(n=(o=u(r.a.Pb(),42),u(o.dd(),149)),h=n.c,w=e.length,hn(h.substr(h.length-w,w),e)&&(e.length==h.length||ba(h,h.length-e.length-1)==46)){if(s)return null;s=n}s&&xo(t.a,e,s)}return s}function uwn(t,e){var n,r,s,o;return n=new Jl,r=u(Pl(pu(new Tn(null,new _n(t.f,16)),n),Ym(new cn,new li,new di,new Ee,ct(ot(ll,1),ae,132,0,[(I1(),Ly),Gl]))),21),s=r.gc(),r=u(Pl(pu(new Tn(null,new _n(e.f,16)),n),Ym(new cn,new li,new di,new Ee,ct(ot(ll,1),ae,132,0,[Ly,Gl]))),21),o=r.gc(),ss.p?(Fs(o,mr),o.d&&(d=o.o.b,e=o.a.b,o.a.b=d-e)):o.j==mr&&s.p>t.p&&(Fs(o,Nn),o.d&&(d=o.o.b,e=o.a.b,o.a.b=-(d-e)));break}return s}function hwn(t,e,n,r){var s,o,h,d,w,k,C,M,F,H,V;if(o=n,n1,d&&(r=new $e(s,n.b),ni(e.a,r)),zC(e.a,ct(ot(Us,1),te,8,0,[F,M]))}function aat(t,e,n){var r,s,o,h,d,w;if(e)if(n<=-1){if(r=yn(e.Tg(),-1-n),Et(r,99))return u(r,18);for(h=u(e.ah(r),153),d=0,w=h.gc();d0){for(s=w.length;s>0&&w[s-1]=="";)--s;s=40,h&&kmn(t),_yn(t),svn(t),n=Yre(t),r=0;n&&r0&&ni(t.f,o)):(t.c[h]-=k+1,t.c[h]<=0&&t.a[h]>0&&ni(t.e,o))))}function Bwn(t){var e,n,r,s,o,h,d,w,k;for(d=new Lp(u(Ar(new Fd),62)),k=Ts,n=new S(t.d);n.a=0&&wn?e:n;k<=M;++k)k==n?d=r++:(o=s[k],C=V.rl(o.ak()),k==e&&(w=k==M&&!C?r-1:r),C&&++r);return F=u(t_(t,e,n),72),d!=w&&Kk(t,new gI(t.e,7,h,de(d),H.dd(),w)),F}}else return u(qst(t,e,n),72);return u(t_(t,e,n),72)}function zwn(t,e){var n,r,s,o,h,d,w;for(wr(e,"Port order processing",1),w=u(Q(t,(Te(),hCt)),421),r=new S(t.b);r.a=0&&(d=Gfn(t,h),!(d&&(k<22?w.l|=1<>>1,h.m=C>>>1|(M&1)<<21,h.l=F>>>1|(C&1)<<21,--k;return n&&vit(w),o&&(r?(ob=Y8(t),s&&(ob=Bne(ob,(N8(),J8t)))):ob=ru(t.l,t.m,t.h)),w}function Gwn(t,e){var n,r,s,o,h,d,w,k,C,M;for(k=t.e[e.c.p][e.p]+1,w=e.c.a.c.length+1,d=new S(t.a);d.a0&&(Rr(0,t.length),t.charCodeAt(0)==45||(Rr(0,t.length),t.charCodeAt(0)==43))?1:0,r=h;rn)throw rt(new od(vw+t+'"'));return d}function Vwn(t){var e,n,r,s,o,h,d;for(h=new Qi,o=new S(t.a);o.a1)&&e==1&&u(t.a[t.b],10).k==(Gn(),Sl)?c6(u(t.a[t.b],10),(jl(),u0)):r&&(!n||(t.c-t.b&t.a.length-1)>1)&&e==1&&u(t.a[t.c-1&t.a.length-1],10).k==(Gn(),Sl)?c6(u(t.a[t.c-1&t.a.length-1],10),(jl(),wb)):(t.c-t.b&t.a.length-1)==2?(c6(u(KC(t),10),(jl(),u0)),c6(u(KC(t),10),wb)):jbn(t,s),rmt(t)}function Kwn(t,e,n){var r,s,o,h,d;for(o=0,s=new er((!t.a&&(t.a=new he(ns,t,10,11)),t.a));s.e!=s.i.gc();)r=u(dr(s),33),h="",(!r.n&&(r.n=new he(qo,r,1,7)),r.n).i==0||(h=u(St((!r.n&&(r.n=new he(qo,r,1,7)),r.n),0),137).a),d=new yit(o++,e,h),Lo(d,r),Jt(d,(fc(),jS),r),d.e.b=r.j+r.f/2,d.f.a=b.Math.max(r.g,1),d.e.a=r.i+r.g/2,d.f.b=b.Math.max(r.f,1),ni(e.b,d),su(n.f,r,d)}function Ywn(t){var e,n,r,s,o;r=u(Q(t,(se(),_i)),33),o=u(qe(r,(Te(),F2)),174).Hc((_l(),V2)),t.e||(s=u(Q(t,Gc),21),e=new $e(t.f.a+t.d.b+t.d.c,t.f.b+t.d.d+t.d.a),s.Hc((oo(),bh))?(bo(r,os,(oa(),Vc)),gw(r,e.a,e.b,!1,!0)):je(Re(qe(r,Zlt)))||gw(r,e.a,e.b,!0,!0)),o?bo(r,F2,un(V2)):bo(r,F2,(n=u(Hf(tA),9),new rh(n,u(uf(n,n.length),9),0)))}function X5t(t,e,n){var r,s,o,h;if(e[0]>=t.length)return n.o=0,!0;switch(ba(t,e[0])){case 43:s=1;break;case 45:s=-1;break;default:return n.o=0,!0}if(++e[0],o=e[0],h=rq(t,e),h==0&&e[0]==o)return!1;if(e[0]=0&&d!=n&&(o=new Qs(t,1,d,h,null),r?r.Ei(o):r=o),n>=0&&(o=new Qs(t,1,n,d==n?h:null,e),r?r.Ei(o):r=o)),r}function que(t){var e,n,r;if(t.b==null){if(r=new xg,t.i!=null&&(fo(r,t.i),r.a+=":"),t.f&256){for(t.f&256&&t.a!=null&&(hnn(t.i)||(r.a+="//"),fo(r,t.a)),t.d!=null&&(r.a+="/",fo(r,t.d)),t.f&16&&(r.a+="/"),e=0,n=t.j.length;eF?!1:(M=(w=E_(r,F,!1),w.a),C+d+M<=e.b&&(dI(n,o-n.s),n.c=!0,dI(r,o-n.s),YI(r,n.s,n.t+n.d+d),r.k=!0,cyt(n.q,r),H=!0,s&&(Y$(e,r),r.j=e,t.c.length>h&&(tD((An(h,t.c.length),u(t.c[h],200)),r),(An(h,t.c.length),u(t.c[h],200)).a.c.length==0&&Ag(t,h)))),H)}function rmn(t,e){var n,r,s,o,h,d;if(wr(e,"Partition midprocessing",1),s=new Hv,us(Ri(new Tn(null,new _n(t.a,16)),new RY),new bv(s)),s.d!=0){for(d=u(Pl(PQt((o=s.i,new Tn(null,(o||(s.i=new W3(s,s.c))).Nc()))),i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[(I1(),Gl)]))),15),r=d.Kc(),n=u(r.Pb(),19);r.Ob();)h=u(r.Pb(),19),a2n(u(Ai(s,n),21),u(Ai(s,h),21)),n=h;or(e)}}function Vue(t,e,n){var r,s,o,h,d,w,k,C;if(e.p==0){for(e.p=1,h=n,h||(s=new le,o=(r=u(Hf(Xa),9),new rh(r,u(uf(r,r.length),9),0)),h=new la(s,o)),u(h.a,15).Fc(e),e.k==(Gn(),xs)&&u(h.b,21).Fc(u(Q(e,(se(),oc)),61)),w=new S(e.j);w.a0){if(s=u(t.Ab.g,1934),e==null){for(o=0;o1)for(r=new S(s);r.an.s&&dd&&(d=s,C.c=Pt(Xn,Ie,1,0,5,1)),s==d&&ue(C,new la(n.c.i,n)));vn(),Xs(C,t.c),$m(t.b,w.p,C)}}function umn(t,e){var n,r,s,o,h,d,w,k,C;for(h=new S(e.b);h.ad&&(d=s,C.c=Pt(Xn,Ie,1,0,5,1)),s==d&&ue(C,new la(n.d.i,n)));vn(),Xs(C,t.c),$m(t.f,w.p,C)}}function Wue(t){Sv(t,new w2(Ev(yv(kv(xv(new pg,xw),"ELK Box"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges."),new IZ))),xe(t,xw,ww,SSt),xe(t,xw,ky,15),xe(t,xw,jD,de(0)),xe(t,xw,gH,De(TSt)),xe(t,xw,L4,De(R3e)),xe(t,xw,v6,De(j3e)),xe(t,xw,b6,V1e),xe(t,xw,$D,De(CSt)),xe(t,xw,w6,De(_St)),xe(t,xw,o8t,De(Jht)),xe(t,xw,cH,De(B3e))}function Kue(t,e){var n,r,s,o,h,d,w,k,C;if(s=t.i,h=s.o.a,o=s.o.b,h<=0&&o<=0)return be(),Zo;switch(k=t.n.a,C=t.n.b,d=t.o.a,n=t.o.b,e.g){case 2:case 1:if(k<0)return be(),Bn;if(k+d>h)return be(),Hn;break;case 4:case 3:if(C<0)return be(),Nn;if(C+n>o)return be(),mr}return w=(k+d/2)/h,r=(C+n/2)/o,w+r<=1&&w-r<=0?(be(),Bn):w+r>=1&&w-r>=0?(be(),Hn):r<.5?(be(),Nn):(be(),mr)}function lmn(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y;for(n=!1,C=Xt(ye(Q(e,(Te(),Bw)))),V=eb*C,s=new S(e.b);s.aw+V&&(Y=M.g+F.g,F.a=(F.g*F.a+M.g*M.a)/Y,F.g=Y,M.f=F,n=!0)),o=d,M=F;return n}function Yue(t,e,n,r,s,o,h){var d,w,k,C,M,F;for(F=new Ax,k=e.Kc();k.Ob();)for(d=u(k.Pb(),839),M=new S(d.wf());M.a0?d.a?(k=d.b.rf().b,s>k&&(t.v||d.c.d.c.length==1?(h=(s-k)/2,d.d.d=h,d.d.a=h):(n=u(Fe(d.c.d,0),181).rf().b,r=(n-k)/2,d.d.d=b.Math.max(0,r),d.d.a=s-r-k))):d.d.a=t.t+s:TC(t.u)&&(o=C4t(d.b),o.d<0&&(d.d.d=-o.d),o.d+o.a>d.b.rf().b&&(d.d.a=o.d+o.a-d.b.rf().b))}function dmn(t,e){var n;switch(xI(t)){case 6:return ea(e);case 7:return Nm(e);case 8:return Om(e);case 3:return Array.isArray(e)&&(n=xI(e),!(n>=14&&n<=16));case 11:return e!=null&&typeof e===Nat;case 12:return e!=null&&(typeof e===CD||typeof e==Nat);case 0:return rst(e,t.__elementTypeId$);case 2:return znt(e)&&e.im!==Ct;case 1:return znt(e)&&e.im!==Ct||rst(e,t.__elementTypeId$);default:return!0}}function Xue(t,e){var n,r,s,o;return r=b.Math.min(b.Math.abs(t.c-(e.c+e.b)),b.Math.abs(t.c+t.b-e.c)),o=b.Math.min(b.Math.abs(t.d-(e.d+e.a)),b.Math.abs(t.d+t.a-e.d)),n=b.Math.abs(t.c+t.b/2-(e.c+e.b/2)),n>t.b/2+e.b/2||(s=b.Math.abs(t.d+t.a/2-(e.d+e.a/2)),s>t.a/2+e.a/2)?1:n==0&&s==0?0:n==0?o/s+1:s==0?r/n+1:b.Math.min(r/n,o/s)+1}function Que(t,e){var n,r,s,o,h,d;return s=Umt(t),d=Umt(e),s==d?t.e==e.e&&t.a<54&&e.a<54?t.fe.f?1:0:(r=t.e-e.e,n=(t.d>0?t.d:b.Math.floor((t.a-1)*cfe)+1)-(e.d>0?e.d:b.Math.floor((e.a-1)*cfe)+1),n>r+1?s:n0&&(h=J3(h,mle(r))),Lie(o,h))):s0&&t.d!=(jC(),Kut)&&(d+=h*(r.d.a+t.a[e.b][r.b]*(e.d.a-r.d.a)/n)),n>0&&t.d!=(jC(),Uut)&&(w+=h*(r.d.b+t.a[e.b][r.b]*(e.d.b-r.d.b)/n)));switch(t.d.g){case 1:return new $e(d/o,e.d.b);case 2:return new $e(e.d.a,w/o);default:return new $e(d/o,w/o)}}function Zue(t,e){J8();var n,r,s,o,h;if(h=u(Q(t.i,(Te(),os)),98),o=t.j.g-e.j.g,o!=0||!(h==(oa(),G2)||h==h0||h==Vc))return 0;if(h==(oa(),G2)&&(n=u(Q(t,Wg),19),r=u(Q(e,Wg),19),n&&r&&(s=n.a-r.a,s!=0)))return s;switch(t.j.g){case 1:return Ls(t.n.a,e.n.a);case 2:return Ls(t.n.b,e.n.b);case 3:return Ls(e.n.a,t.n.a);case 4:return Ls(e.n.b,t.n.b);default:throw rt(new Fo(b6t))}}function Jue(t){var e,n,r,s,o,h;for(n=(!t.a&&(t.a=new Ss(Hh,t,5)),t.a).i+2,h=new Yc(n),ue(h,new $e(t.j,t.k)),us(new Tn(null,(!t.a&&(t.a=new Ss(Hh,t,5)),new _n(t.a,16))),new W$t(h)),ue(h,new $e(t.b,t.c)),e=1;e0&&(PI(w,!1,(ao(),jh)),PI(w,!0,kf)),mu(e.g,new GGt(t,n)),ki(t.g,e,n)}function ele(){ele=Z;var t;for(oEt=ct(ot(Tr,1),Xr,25,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),Tut=Pt(Tr,Xr,25,37,15,1),Ege=ct(ot(Tr,1),Xr,25,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),cEt=Pt(Lb,aot,25,37,14,1),t=2;t<=36;t++)Tut[t]=ps(b.Math.pow(t,oEt[t])),cEt[t]=eD(Iq,Tut[t])}function pmn(t){var e;if((!t.a&&(t.a=new he(Zi,t,6,6)),t.a).i!=1)throw rt(new Pn(lde+(!t.a&&(t.a=new he(Zi,t,6,6)),t.a).i));return e=new Du,OI(u(St((!t.b&&(t.b=new Cn(br,t,4,7)),t.b),0),82))&&Ua(e,Bhe(t,OI(u(St((!t.b&&(t.b=new Cn(br,t,4,7)),t.b),0),82)),!1)),OI(u(St((!t.c&&(t.c=new Cn(br,t,5,8)),t.c),0),82))&&Ua(e,Bhe(t,OI(u(St((!t.c&&(t.c=new Cn(br,t,5,8)),t.c),0),82)),!0)),e}function nle(t,e){var n,r,s,o,h;for(e.d?s=t.a.c==(dd(),Rw)?jo(e.b):Ms(e.b):s=t.a.c==(dd(),Kg)?jo(e.b):Ms(e.b),o=!1,r=new ar(lr(s.a.Kc(),new z));zr(r);)if(n=u(Lr(r),17),h=je(t.a.f[t.a.g[e.b.p].p]),!(!h&&!Va(n)&&n.c.i.c==n.d.i.c)&&!(je(t.a.n[t.a.g[e.b.p].p])||je(t.a.n[t.a.g[e.b.p].p]))&&(o=!0,S0(t.b,t.a.g[Cfn(n,e.b).p])))return e.c=!0,e.a=n,e;return e.c=o,e.a=null,e}function bmn(t,e,n,r,s){var o,h,d,w,k,C,M;for(vn(),Xs(t,new jZ),d=new ha(t,0),M=new le,o=0;d.bo*2?(C=new U$(M),k=Fu(h)/xl(h),w=Mat(C,e,new wx,n,r,s,k),Li(Gf(C.e),w),M.c=Pt(Xn,Ie,1,0,5,1),o=0,M.c[M.c.length]=C,M.c[M.c.length]=h,o=Fu(C)*xl(C)+Fu(h)*xl(h)):(M.c[M.c.length]=h,o+=Fu(h)*xl(h));return M}function Z5t(t,e,n){var r,s,o,h,d,w,k;if(r=n.gc(),r==0)return!1;if(t.ej())if(w=t.fj(),d3t(t,e,n),h=r==1?t.Zi(3,null,n.Kc().Pb(),e,w):t.Zi(5,null,n,e,w),t.bj()){for(d=r<100?null:new Sp(r),o=e+r,s=e;s0){for(h=0;h>16==-15&&t.Cb.nh()&&Urt(new qrt(t.Cb,9,13,n,t.c,Fg(il(u(t.Cb,59)),t))):Et(t.Cb,88)&&t.Db>>16==-23&&t.Cb.nh()&&(e=t.c,Et(e,88)||(e=(dn(),Wh)),Et(n,88)||(n=(dn(),Wh)),Urt(new qrt(t.Cb,9,10,n,e,Fg(Lc(u(t.Cb,26)),t)))))),t.c}function vmn(t,e){var n,r,s,o,h,d,w,k,C,M;for(wr(e,"Hypernodes processing",1),s=new S(t.b);s.an);return s}function ile(t,e){var n,r,s;r=ol(t.d,1)!=0,!je(Re(Q(e.j,(se(),Mw))))&&!je(Re(Q(e.j,K4)))||Gt(Q(e.j,(Te(),db)))===Gt((j0(),gb))?e.c.Tf(e.e,r):r=je(Re(Q(e.j,Mw))),pD(t,e,r,!0),je(Re(Q(e.j,K4)))&&Jt(e.j,K4,(Fn(),!1)),je(Re(Q(e.j,Mw)))&&(Jt(e.j,Mw,(Fn(),!1)),Jt(e.j,K4,!0)),n=Rst(t,e);do{if(iyt(t),n==0)return 0;r=!r,s=n,pD(t,e,r,!1),n=Rst(t,e)}while(s>n);return s}function sle(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V;if(e==n)return!0;if(e=c5t(t,e),n=c5t(t,n),r=lst(e),r){if(C=lst(n),C!=r)return C?(w=r.Dj(),V=C.Dj(),w==V&&w!=null):!1;if(h=(!e.d&&(e.d=new Ss(ho,e,1)),e.d),o=h.i,F=(!n.d&&(n.d=new Ss(ho,n,1)),n.d),o==F.i){for(k=0;k0,d=_z(e,o),L2t(n?d.b:d.g,e),o4(d).c.length==1&&hs(r,d,r.c.b,r.c),s=new la(o,e),qp(t.o,s),vu(t.e.a,o))}function ule(t,e){var n,r,s,o,h,d,w;return r=b.Math.abs(Gj(t.b).a-Gj(e.b).a),d=b.Math.abs(Gj(t.b).b-Gj(e.b).b),s=0,w=0,n=1,h=1,r>t.b.b/2+e.b.b/2&&(s=b.Math.min(b.Math.abs(t.b.c-(e.b.c+e.b.b)),b.Math.abs(t.b.c+t.b.b-e.b.c)),n=1-s/r),d>t.b.a/2+e.b.a/2&&(w=b.Math.min(b.Math.abs(t.b.d-(e.b.d+e.b.a)),b.Math.abs(t.b.d+t.b.a-e.b.d)),h=1-w/d),o=b.Math.min(n,h),(1-o)*b.Math.sqrt(r*r+d*d)}function Emn(t){var e,n,r,s;for(Lat(t,t.e,t.f,(qv(),bb),!0,t.c,t.i),Lat(t,t.e,t.f,bb,!1,t.c,t.i),Lat(t,t.e,t.f,e5,!0,t.c,t.i),Lat(t,t.e,t.f,e5,!1,t.c,t.i),Cmn(t,t.c,t.e,t.f,t.i),r=new ha(t.i,0);r.b=65;n--)U1[n]=n-65<<24>>24;for(r=122;r>=97;r--)U1[r]=r-97+26<<24>>24;for(s=57;s>=48;s--)U1[s]=s-48+52<<24>>24;for(U1[43]=62,U1[47]=63,o=0;o<=25;o++)rp[o]=65+o&ms;for(h=26,w=0;h<=51;++h,w++)rp[h]=97+w&ms;for(t=52,d=0;t<=61;++t,d++)rp[t]=48+d&ms;rp[62]=43,rp[63]=47}function Tmn(t,e){var n,r,s,o,h,d,w,k,C,M,F,H;if(t.dc())return new Ta;for(k=0,M=0,s=t.Kc();s.Ob();)r=u(s.Pb(),37),o=r.f,k=b.Math.max(k,o.a),M+=o.a*o.b;for(k=b.Math.max(k,b.Math.sqrt(M)*Xt(ye(Q(u(t.Kc().Pb(),37),(Te(),UG))))),F=0,H=0,w=0,n=e,d=t.Kc();d.Ob();)h=u(d.Pb(),37),C=h.f,F+C.a>k&&(F=0,H+=w+e,w=0),w_(h,F,H),n=b.Math.max(n,F+C.a),w=b.Math.max(w,C.b),F+=C.a+e;return new $e(n+e,H+w+e)}function Cmn(t,e,n,r,s){var o,h,d,w,k,C,M;for(h=new S(e);h.ao)return be(),Hn;break;case 4:case 3:if(w<0)return be(),Nn;if(w+t.f>s)return be(),mr}return h=(d+t.g/2)/o,n=(w+t.f/2)/s,h+n<=1&&h-n<=0?(be(),Bn):h+n>=1&&h-n>=0?(be(),Hn):n<.5?(be(),Nn):(be(),mr)}function _mn(t,e,n,r,s){var o,h;if(o=Oa(Ps(e[0],co),Ps(r[0],co)),t[0]=Sr(o),o=Fp(o,32),n>=s){for(h=1;h0&&(s.b[h++]=0,s.b[h++]=o.b[0]-1),e=1;e0&&(nM(w,w.d-s.d),s.c==(Vf(),pb)&&upt(w,w.a-s.d),w.d<=0&&w.i>0&&hs(e,w,e.c.b,e.c)));for(o=new S(t.f);o.a0&&(x9(d,d.i-s.d),s.c==(Vf(),pb)&&gv(d,d.b-s.d),d.i<=0&&d.d>0&&hs(n,d,n.c.b,n.c)))}function Smn(t,e,n){var r,s,o,h,d,w,k,C;for(wr(n,"Processor compute fanout",1),Yu(t.b),Yu(t.a),d=null,o=ei(e.b,0);!d&&o.b!=o.d.c;)k=u(ti(o),86),je(Re(Q(k,(fc(),Wy))))&&(d=k);for(w=new Qi,hs(w,d,w.c.b,w.c),yhe(t,w),C=ei(e.b,0);C.b!=C.d.c;)k=u(ti(C),86),h=Br(Q(k,(fc(),RS))),s=Fc(t.b,h)!=null?u(Fc(t.b,h),19).a:0,Jt(k,mV,de(s)),r=1+(Fc(t.a,h)!=null?u(Fc(t.a,h),19).a:0),Jt(k,Zme,de(r));or(n)}function Amn(t,e,n,r,s){var o,h,d,w,k,C,M,F,H,V;for(F=hdn(t,n),w=0;w0),r.a.Xb(r.c=--r.b),M>F+w&&El(r);for(h=new S(H);h.a0),r.a.Xb(r.c=--r.b)}}function Lmn(){gi();var t,e,n,r,s,o;if(Oft)return Oft;for(t=new Nl(4),vy(t,tb(hut,!0)),__(t,tb("M",!0)),__(t,tb("C",!0)),o=new Nl(4),r=0;r<11;r++)jc(o,r,r);return e=new Nl(4),vy(e,tb("M",!0)),jc(e,4448,4607),jc(e,65438,65439),s=new lC(2),m2(s,t),m2(s,fA),n=new lC(2),n.$l(Bj(o,tb("L",!0))),n.$l(e),n=new Wm(3,n),n=new fwt(s,n),Oft=n,Oft}function Mmn(t){var e,n;if(e=Br(qe(t,(ci(),VS))),!Cne(e,t)&&!r2(t,C7)&&((!t.a&&(t.a=new he(ns,t,10,11)),t.a).i!=0||je(Re(qe(t,WO)))))if(e==null||uy(e).length==0){if(!Cne(Vn,t))throw n=Vr(Vr(new Il("Unable to load default layout algorithm "),Vn)," for unconfigured node "),Cq(t,n),rt(new F3(n.a))}else throw n=Vr(Vr(new Il("Layout algorithm '"),e),"' not found for "),Cq(t,n),rt(new F3(n.a))}function fat(t){var e,n,r,s,o,h,d,w,k,C,M,F,H;if(n=t.i,e=t.n,t.b==0)for(H=n.c+e.b,F=n.b-e.b-e.c,h=t.a,w=0,C=h.length;w0&&(M-=r[0]+t.c,r[0]+=t.c),r[2]>0&&(M-=r[2]+t.c),r[1]=b.Math.max(r[1],M),jj(t.a[1],n.c+e.b+r[0]-(r[1]-M)/2,r[1]);for(o=t.a,d=0,k=o.length;d0?(t.n.c.length-1)*t.i:0,r=new S(t.n);r.a1)for(r=ei(s,0);r.b!=r.d.c;)for(n=u(ti(r),231),o=0,w=new S(n.e);w.a0&&(e[0]+=t.c,M-=e[0]),e[2]>0&&(M-=e[2]+t.c),e[1]=b.Math.max(e[1],M),$j(t.a[1],r.d+n.d+e[0]-(e[1]-M)/2,e[1]);else for(V=r.d+n.d,H=r.a-n.d-n.a,h=t.a,w=0,C=h.length;w=0&&o!=n))throw rt(new Pn(XD));for(s=0,w=0;w0||rw(s.b.d,t.b.d+t.b.a)==0&&r.b<0||rw(s.b.d+s.b.a,t.b.d)==0&&r.b>0){d=0;break}}else d=b.Math.min(d,doe(t,s,r));d=b.Math.min(d,dle(t,o,d,r))}return d}function yD(t,e){var n,r,s,o,h,d,w;if(t.b<2)throw rt(new Pn("The vector chain must contain at least a source and a target point."));for(s=(Qn(t.b!=0),u(t.a.a.c,8)),oj(e,s.a,s.b),w=new Lx((!e.a&&(e.a=new Ss(Hh,e,5)),e.a)),h=ei(t,1);h.aXt(x1(h.g,h.d[0]).a)?(Qn(w.b>0),w.a.Xb(w.c=--w.b),Rm(w,h),s=!0):d.e&&d.e.gc()>0&&(o=(!d.e&&(d.e=new le),d.e).Mc(e),k=(!d.e&&(d.e=new le),d.e).Mc(n),(o||k)&&((!d.e&&(d.e=new le),d.e).Fc(h),++h.c));s||(r.c[r.c.length]=h)}function ble(t){var e,n,r;if(H3(u(Q(t,(Te(),os)),98)))for(n=new S(t.j);n.a>>0,"0"+e.toString(16)),r="\\x"+Dl(n,n.length-2,n.length)):t>=Ya?(n=(e=t>>>0,"0"+e.toString(16)),r="\\v"+Dl(n,n.length-6,n.length)):r=""+String.fromCharCode(t&ms)}return r}function gat(t,e){var n,r,s,o,h,d,w,k,C,M;if(h=t.e,w=e.e,w==0)return t;if(h==0)return e.e==0?e:new K3(-e.e,e.d,e.a);if(o=t.d,d=e.d,o+d==2)return n=Ps(t.a[0],co),r=Ps(e.a[0],co),h<0&&(n=O8(n)),w<0&&(r=O8(r)),KI(Yp(n,r));if(s=o!=d?o>d?1:-1:Pyt(t.a,e.a,o),s==-1)M=-w,C=h==w?Frt(e.a,d,t.a,o):Rrt(e.a,d,t.a,o);else if(M=h,h==w){if(s==0)return Jp(),QE;C=Frt(t.a,o,e.a,d)}else C=Rrt(t.a,o,e.a,d);return k=new K3(M,C.length,C),OC(k),k}function sxt(t){var e,n,r,s,o,h;for(this.e=new le,this.a=new le,n=t.b-1;n<3;n++)h8(t,0,u(Qf(t,0),8));if(t.b<4)throw rt(new Pn("At (least dimension + 1) control points are necessary!"));for(this.b=3,this.d=!0,this.c=!1,kbn(this,t.b+this.b-1),h=new le,o=new S(this.e),e=0;e=e.o&&n.f<=e.f||e.a*.5<=n.f&&e.a*1.5>=n.f){if(h=u(Fe(e.n,e.n.c.length-1),211),h.e+h.d+n.g+s<=r&&(o=u(Fe(e.n,e.n.c.length-1),211),o.f-t.f+n.f<=t.b||t.a.c.length==1))return i3t(e,n),!0;if(e.s+n.g<=r&&(e.t+e.d+n.f+s<=t.b||t.a.c.length==1))return ue(e.b,n),d=u(Fe(e.n,e.n.c.length-1),211),ue(e.n,new f$(e.s,d.f+d.a+e.i,e.i)),$3t(u(Fe(e.n,e.n.c.length-1),211),n),lle(e,n),!0}return!1}function wle(t,e,n){var r,s,o,h;return t.ej()?(s=null,o=t.fj(),r=t.Zi(1,h=Krt(t,e,n),n,e,o),t.bj()&&!(t.ni()&&h!=null?yi(h,n):Gt(h)===Gt(n))?(h!=null&&(s=t.dj(h,s)),s=t.cj(n,s),t.ij()&&(s=t.lj(h,n,s)),s?(s.Ei(r),s.Fi()):t.$i(r)):(t.ij()&&(s=t.lj(h,n,s)),s?(s.Ei(r),s.Fi()):t.$i(r)),h):(h=Krt(t,e,n),t.bj()&&!(t.ni()&&h!=null?yi(h,n):Gt(h)===Gt(n))&&(s=null,h!=null&&(s=t.dj(h,null)),s=t.cj(n,s),s&&s.Fi()),h)}function y_(t,e){var n,r,s,o,h,d,w,k;e%=24,t.q.getHours()!=e&&(r=new b.Date(t.q.getTime()),r.setDate(r.getDate()+1),d=t.q.getTimezoneOffset()-r.getTimezoneOffset(),d>0&&(w=d/60|0,k=d%60,s=t.q.getDate(),n=t.q.getHours(),n+w>=24&&++s,o=new b.Date(t.q.getFullYear(),t.q.getMonth(),s,e+w,t.q.getMinutes()+k,t.q.getSeconds(),t.q.getMilliseconds()),t.q.setTime(o.getTime()))),h=t.q.getTime(),t.q.setTime(h+36e5),t.q.getHours()!=e&&t.q.setTime(h)}function jmn(t,e){var n,r,s,o,h;if(wr(e,"Path-Like Graph Wrapping",1),t.b.c.length==0){or(e);return}if(s=new f5t(t),h=(s.i==null&&(s.i=syt(s,new OF)),Xt(s.i)*s.f),n=h/(s.i==null&&(s.i=syt(s,new OF)),Xt(s.i)),s.b>n){or(e);return}switch(u(Q(t,(Te(),rht)),337).g){case 2:o=new PF;break;case 0:o=new DF;break;default:o=new FF}if(r=o.Vf(t,s),!o.Wf())switch(u(Q(t,aV),338).g){case 2:r=goe(s,r);break;case 1:r=dae(s,r)}Fyn(t,s,r),or(e)}function $mn(t,e){var n,r,s,o;if(Trn(t.d,t.e),t.c.a.$b(),Xt(ye(Q(e.j,(Te(),YG))))!=0||Xt(ye(Q(e.j,YG)))!=0)for(n=FE,Gt(Q(e.j,db))!==Gt((j0(),gb))&&Jt(e.j,(se(),Mw),(Fn(),!0)),o=u(Q(e.j,SS),19).a,s=0;ss&&++k,ue(h,(An(d+k,e.c.length),u(e.c[d+k],19))),w+=(An(d+k,e.c.length),u(e.c[d+k],19)).a-r,++n;n1&&(w>Fu(d)*xl(d)/2||h.b==0)&&(M=new U$(F),C=Fu(d)/xl(d),k=Mat(M,e,new wx,n,r,s,C),Li(Gf(M.e),k),d=M,H.c[H.c.length]=M,w=0,F.c=Pt(Xn,Ie,1,0,5,1)));return As(H,F),H}function Hmn(t,e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y;if(n.mh(e)&&(C=(H=e,H?u(r,49).xh(H):null),C))if(Y=n.bh(e,t.a),V=e.t,V>1||V==-1)if(M=u(Y,69),F=u(C,69),M.dc())F.$b();else for(h=!!no(e),o=0,d=t.a?M.Kc():M.Zh();d.Ob();)k=u(d.Pb(),56),s=u(Wv(t,k),56),s?(h?(w=F.Xc(s),w==-1?F.Xh(o,s):o!=w&&F.ji(o,s)):F.Xh(o,s),++o):t.b&&!h&&(F.Xh(o,k),++o);else Y==null?C.Wb(null):(s=Wv(t,Y),s==null?t.b&&!no(e)&&C.Wb(Y):C.Wb(s))}function Gmn(t,e){var n,r,s,o,h,d,w,k;for(n=new CY,s=new ar(lr(jo(e).a.Kc(),new z));zr(s);)if(r=u(Lr(s),17),!Va(r)&&(d=r.c.i,k4t(d,uG))){if(k=B5t(t,d,uG,cG),k==-1)continue;n.b=b.Math.max(n.b,k),!n.a&&(n.a=new le),ue(n.a,d)}for(h=new ar(lr(Ms(e).a.Kc(),new z));zr(h);)if(o=u(Lr(h),17),!Va(o)&&(w=o.d.i,k4t(w,cG))){if(k=B5t(t,w,cG,uG),k==-1)continue;n.d=b.Math.max(n.d,k),!n.c&&(n.c=new le),ue(n.c,w)}return n}function mle(t){bE();var e,n,r,s;if(e=ps(t),t1e6)throw rt(new pR("power of ten too big"));if(t<=vi)return Gx(hD(T6[1],e),e);for(r=hD(T6[1],vi),s=r,n=ku(t-vi),e=ps(t%vi);yc(n,vi)>0;)s=J3(s,r),n=Yp(n,vi);for(s=J3(s,hD(T6[1],e)),s=Gx(s,vi),n=ku(t-vi);yc(n,vi)>0;)s=Gx(s,vi),n=Yp(n,vi);return s=Gx(s,e),s}function Vmn(t,e){var n,r,s,o,h,d,w,k,C;for(wr(e,"Hierarchical port dummy size processing",1),w=new le,C=new le,r=Xt(ye(Q(t,(Te(),Q4)))),n=r*2,o=new S(t.b);o.ak&&r>k)C=d,k=Xt(e.p[d.p])+Xt(e.d[d.p])+d.o.b+d.d.a;else{s=!1,n.n&&Yb(n,"bk node placement breaks on "+d+" which should have been after "+C);break}if(!s)break}return n.n&&Yb(n,e+" is feasible: "+s),s}function Xmn(t,e,n,r){var s,o,h,d,w,k,C;for(d=-1,C=new S(t);C.a=tt&&t.e[w.p]>V*t.b||_t>=n*tt)&&(F.c[F.c.length]=d,d=new le,Ua(h,o),o.a.$b(),k-=C,H=b.Math.max(H,k*t.b+Y),k+=_t,Lt=_t,_t=0,C=0,Y=0);return new la(H,F)}function tyn(t){var e,n,r,s,o,h,d,w,k,C,M,F,H;for(n=(k=new b1(t.c.b).a.vc().Kc(),new v1(k));n.a.Ob();)e=(d=u(n.a.Pb(),42),u(d.dd(),149)),s=e.a,s==null&&(s=""),r=_Qe(t.c,s),!r&&s.length==0&&(r=Sun(t)),r&&!ry(r.c,e,!1)&&ni(r.c,e);for(h=ei(t.a,0);h.b!=h.d.c;)o=u(ti(h),478),C=Drt(t.c,o.a),H=Drt(t.c,o.b),C&&H&&ni(C.c,new la(H,o.c));for(_h(t.a),F=ei(t.b,0);F.b!=F.d.c;)M=u(ti(F),478),e=CQe(t.c,M.a),w=Drt(t.c,M.b),e&&w&&pYe(e,w,M.c);_h(t.b)}function eyn(t,e,n){var r,s,o,h,d,w,k,C,M,F,H;o=new Hk(t),h=new jse,s=(cI(h.g),cI(h.j),Yu(h.b),cI(h.d),cI(h.i),Yu(h.k),Yu(h.c),Yu(h.e),H=koe(h,o,null),hce(h,o),H),e&&(k=new Hk(e),d=hyn(k),N4t(s,ct(ot(wSt,1),Ie,527,0,[d]))),F=!1,M=!1,n&&(k=new Hk(n),xH in k.a&&(F=D0(k,xH).ge().a),Nde in k.a&&(M=D0(k,Nde).ge().a)),C=rHt(Dee(new Yk,F),M),K0n(new gZ,s,C),xH in o.a&&Wf(o,xH,null),(F||M)&&(w=new mx,ple(C,w,F,M),Wf(o,xH,w)),r=new lzt(h),qcn(new r2t(s),r)}function nyn(t,e,n){var r,s,o,h,d,w,k,C,M;for(h=new Gse,k=ct(ot(Tr,1),Xr,25,15,[0]),s=-1,o=0,r=0,w=0;w0){if(s<0&&C.a&&(s=w,o=k[0],r=0),s>=0){if(d=C.b,w==s&&(d-=r++,d==0))return 0;if(!khe(e,k,C,d,h)){w=s-1,k[0]=o;continue}}else if(s=-1,!khe(e,k,C,0,h))return 0}else{if(s=-1,ba(C.c,0)==32){if(M=k[0],Hte(e,k),k[0]>M)continue}else if(Fnn(e,C.c,k[0])){k[0]+=C.c.length;continue}return 0}return F4n(h,n)?k[0]:0}function k_(t){var e,n,r,s,o,h,d,w;if(!t.f){if(w=new C0,d=new C0,e=aA,h=e.a.zc(t,e),h==null){for(o=new er(So(t));o.e!=o.i.gc();)s=u(dr(o),26),rs(w,k_(s));e.a.Bc(t)!=null,e.a.gc()==0}for(r=(!t.s&&(t.s=new he(Au,t,21,17)),new er(t.s));r.e!=r.i.gc();)n=u(dr(r),170),Et(n,99)&&Mr(d,u(n,18));ey(d),t.r=new PKt(t,(u(St(Wt((jp(),Ln).o),6),18),d.i),d.g),rs(w,t.r),ey(w),t.f=new q3((u(St(Wt(Ln.o),5),18),w.i),w.g),rl(t).b&=-3}return t.f}function ryn(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V;for(h=t.o,r=Pt(Tr,Xr,25,h,15,1),s=Pt(Tr,Xr,25,h,15,1),n=t.p,e=Pt(Tr,Xr,25,n,15,1),o=Pt(Tr,Xr,25,n,15,1),k=0;k=0&&!l4(t,C,M);)--M;s[C]=M}for(H=0;H=0&&!l4(t,d,V);)--d;o[V]=d}for(w=0;we[F]&&Fr[w]&&bq(t,w,F,!1,!0)}function axt(t){var e,n,r,s,o,h,d,w;n=je(Re(Q(t,(Zf(),Qpe)))),o=t.a.c.d,d=t.a.d.d,n?(h=ud(na(new $e(d.a,d.b),o),.5),w=ud(nc(t.e),.5),e=na(Li(new $e(o.a,o.b),h),w),F2t(t.d,e)):(s=Xt(ye(Q(t.a,sbe))),r=t.d,o.a>=d.a?o.b>=d.b?(r.a=d.a+(o.a-d.a)/2+s,r.b=d.b+(o.b-d.b)/2-s-t.e.b):(r.a=d.a+(o.a-d.a)/2+s,r.b=o.b+(d.b-o.b)/2+s):o.b>=d.b?(r.a=o.a+(d.a-o.a)/2+s,r.b=d.b+(o.b-d.b)/2+s):(r.a=o.a+(d.a-o.a)/2+s,r.b=o.b+(d.b-o.b)/2-s-t.e.b))}function $c(t,e){var n,r,s,o,h,d,w;if(t==null)return null;if(o=t.length,o==0)return"";for(w=Pt(mh,vd,25,o,15,1),kmt(0,o,t.length),kmt(0,o,w.length),zYt(t,0,o,w,0),n=null,d=e,s=0,h=0;s0?Dl(n.a,0,o-1):""):t.substr(0,o-1):n?n.a:t}function kle(t){Sv(t,new w2(Ev(yv(kv(xv(new pg,T2),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new dg))),xe(t,T2,Aot,De(c7t)),xe(t,T2,Lot,De($ut)),xe(t,T2,b6,De(Fpe)),xe(t,T2,ww,De(o7t)),xe(t,T2,Vxt,De($pe)),xe(t,T2,Uxt,De(jpe)),xe(t,T2,Gxt,De(zpe)),xe(t,T2,Wxt,De(Rpe)),xe(t,T2,t6t,De(Bpe)),xe(t,T2,e6t,De(jut)),xe(t,T2,n6t,De(a7t)),xe(t,T2,r6t,De(eG))}function oxt(t,e,n,r){var s,o,h,d,w,k,C,M,F;if(o=new H0(t),_0(o,(Gn(),Hc)),Jt(o,(Te(),os),(oa(),Vc)),s=0,e){for(h=new Mc,Jt(h,(se(),_i),e),Jt(o,_i,e.i),Fs(h,(be(),Bn)),Uo(h,o),F=gd(e.e),k=F,C=0,M=k.length;C0)if(n-=r.length-e,n>=0){for(s.a+="0.";n>D2.length;n-=D2.length)tYt(s,D2);FWt(s,D2,ps(n)),Vr(s,r.substr(e))}else n=e-n,Vr(s,Dl(r,e,ps(n))),s.a+=".",Vr(s,OM(r,ps(n)));else{for(Vr(s,r.substr(e));n<-D2.length;n+=D2.length)tYt(s,D2);FWt(s,D2,ps(-n))}return s.a}function cxt(t,e,n,r){var s,o,h,d,w,k,C,M,F;return w=na(new $e(n.a,n.b),t),k=w.a*e.b-w.b*e.a,C=e.a*r.b-e.b*r.a,M=(w.a*r.b-w.b*r.a)/C,F=k/C,C==0?k==0?(s=Li(new $e(n.a,n.b),ud(new $e(r.a,r.b),.5)),o=Hp(t,s),h=Hp(Li(new $e(t.a,t.b),e),s),d=b.Math.sqrt(r.a*r.a+r.b*r.b)*.5,o=0&&M<=1&&F>=0&&F<=1?Li(new $e(t.a,t.b),ud(new $e(e.a,e.b),M)):null}function syn(t,e,n){var r,s,o,h,d;if(r=u(Q(t,(Te(),Hlt)),21),n.a>e.a&&(r.Hc((cy(),qO))?t.c.a+=(n.a-e.a)/2:r.Hc(HO)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(r.Hc((cy(),VO))?t.c.b+=(n.b-e.b)/2:r.Hc(GO)&&(t.c.b+=n.b-e.b)),u(Q(t,(se(),Gc)),21).Hc((oo(),bh))&&(n.a>e.a||n.b>e.b))for(d=new S(t.a);d.ae.a&&(r.Hc((cy(),qO))?t.c.a+=(n.a-e.a)/2:r.Hc(HO)&&(t.c.a+=n.a-e.a)),n.b>e.b&&(r.Hc((cy(),VO))?t.c.b+=(n.b-e.b)/2:r.Hc(GO)&&(t.c.b+=n.b-e.b)),u(Q(t,(se(),Gc)),21).Hc((oo(),bh))&&(n.a>e.a||n.b>e.b))for(h=new S(t.a);h.ae&&(s=0,o+=C.b+n,M.c[M.c.length]=C,C=new Vwt(o,n),r=new xit(0,C.f,C,n),Y$(C,r),s=0),r.b.c.length==0||w.f>=r.o&&w.f<=r.f||r.a*.5<=w.f&&r.a*1.5>=w.f?i3t(r,w):(h=new xit(r.s+r.r+n,C.f,C,n),Y$(C,h),i3t(h,w)),s=w.i+w.g;return M.c[M.c.length]=C,M}function k4(t){var e,n,r,s,o,h,d,w;if(!t.a){if(t.o=null,w=new Mzt(t),e=new mp,n=aA,d=n.a.zc(t,n),d==null){for(h=new er(So(t));h.e!=h.i.gc();)o=u(dr(h),26),rs(w,k4(o));n.a.Bc(t)!=null,n.a.gc()==0}for(s=(!t.s&&(t.s=new he(Au,t,21,17)),new er(t.s));s.e!=s.i.gc();)r=u(dr(s),170),Et(r,322)&&Mr(e,u(r,34));ey(e),t.k=new NKt(t,(u(St(Wt((jp(),Ln).o),7),18),e.i),e.g),rs(w,t.k),ey(w),t.a=new q3((u(St(Wt(Ln.o),4),18),w.i),w.g),rl(t).b&=-2}return t.a}function uyn(t,e,n,r,s,o,h){var d,w,k,C,M,F;return M=!1,w=Mce(n.q,e.f+e.b-n.q.f),F=s-(n.q.e+w-h),F=(An(o,t.c.length),u(t.c[o],200)).e,C=(d=E_(r,F,!1),d.a),C>e.b&&!k)?!1:((k||C<=e.b)&&(k&&C>e.b?(n.d=C,dI(n,Nae(n,C))):(Jse(n.q,w),n.c=!0),dI(r,s-(n.s+n.r)),YI(r,n.q.e+n.q.d,e.f),Y$(e,r),t.c.length>o&&(tD((An(o,t.c.length),u(t.c[o],200)),r),(An(o,t.c.length),u(t.c[o],200)).a.c.length==0&&Ag(t,o)),M=!0),M)}function uxt(t,e,n,r){var s,o,h,d,w,k,C;if(C=au(t.e.Tg(),e),s=0,o=u(t.g,119),w=null,to(),u(e,66).Oj()){for(d=0;dt.o.a&&(C=(w-t.o.a)/2,d.b=b.Math.max(d.b,C),d.c=b.Math.max(d.c,C))}}function hyn(t){var e,n,r,s,o,h,d,w;for(o=new eZt,YYe(o,(Qx(),A3e)),r=(s=uit(t,Pt(Ae,te,2,0,6,1)),new fx(new wl(new fet(t,s).b)));r.b0?t.i:0)>e&&w>0&&(o=0,h+=w+t.i,s=b.Math.max(s,F),r+=w+t.i,w=0,F=0,n&&(++M,ue(t.n,new f$(t.s,h,t.i))),d=0),F+=k.g+(d>0?t.i:0),w=b.Math.max(w,k.f),n&&$3t(u(Fe(t.n,M),211),k),o+=k.g+(d>0?t.i:0),++d;return s=b.Math.max(s,F),r+=w,n&&(t.r=s,t.d=r,G3t(t.j)),new ih(t.s,t.t,s,r)}function Ic(t,e,n,r,s){qd();var o,h,d,w,k,C,M,F,H;if(uwt(t,"src"),uwt(n,"dest"),F=sl(t),w=sl(n),Dvt((F.i&4)!=0,"srcType is not an array"),Dvt((w.i&4)!=0,"destType is not an array"),M=F.c,h=w.c,Dvt(M.i&1?M==h:(h.i&1)==0,"Array types don't match"),H=t.length,k=n.length,e<0||r<0||s<0||e+s>H||r+s>k)throw rt(new Tpt);if(!(M.i&1)&&F!=w)if(C=s2(t),o=s2(n),Gt(t)===Gt(n)&&er;)Ji(o,d,C[--e]);else for(d=r+s;r0&&Y4t(t,e,n,r,s,!0)}function wat(){wat=Z,Cge=ct(ot(Tr,1),Xr,25,15,[_a,1162261467,A_,1220703125,362797056,1977326743,A_,387420489,Nq,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,128e7,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729e6,887503681,A_,1291467969,1544804416,1838265625,60466176]),_ge=ct(ot(Tr,1),Xr,25,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])}function fyn(t){var e,n,r,s,o,h,d,w;for(s=new S(t.b);s.a=t.b.length?(o[s++]=h.b[r++],o[s++]=h.b[r++]):r>=h.b.length?(o[s++]=t.b[n++],o[s++]=t.b[n++]):h.b[r]0?t.i:0)),++e;for(Tln(t.n,w),t.d=n,t.r=r,t.g=0,t.f=0,t.e=0,t.o=ss,t.p=ss,o=new S(t.b);o.a0&&(s=(!t.n&&(t.n=new he(qo,t,1,7)),u(St(t.n,0),137)).a,!s||Vr(Vr((e.a+=' "',e),s),'"'))),n=(!t.b&&(t.b=new Cn(br,t,4,7)),!(t.b.i<=1&&(!t.c&&(t.c=new Cn(br,t,5,8)),t.c.i<=1))),n?e.a+=" [":e.a+=" ",Vr(e,m2t(new aet,new er(t.b))),n&&(e.a+="]"),e.a+=Pot,n&&(e.a+="["),Vr(e,m2t(new aet,new er(t.c))),n&&(e.a+="]"),e.a)}function mat(t,e){var n,r,s,o,h,d,w;if(t.a){if(d=t.a.ne(),w=null,d!=null?e.a+=""+d:(h=t.a.Dj(),h!=null&&(o=cd(h,Eu(91)),o!=-1?(w=h.substr(o),e.a+=""+Dl(h==null?Tu:(On(h),h),0,o)):e.a+=""+h)),t.d&&t.d.i!=0){for(s=!0,e.a+="<",r=new er(t.d);r.e!=r.i.gc();)n=u(dr(r),87),s?s=!1:e.a+=Ka,mat(n,e);e.a+=">"}w!=null&&(e.a+=""+w)}else t.e?(d=t.e.zb,d!=null&&(e.a+=""+d)):(e.a+="?",t.b?(e.a+=" super ",mat(t.b,e)):t.f&&(e.a+=" extends ",mat(t.f,e)))}function pyn(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn;for(Yt=t.c,ce=e.c,n=Ro(Yt.a,t,0),r=Ro(ce.a,e,0),_t=u(iw(t,(so(),Ju)).Kc().Pb(),11),Qe=u(iw(t,eu).Kc().Pb(),11),Bt=u(iw(e,Ju).Kc().Pb(),11),Rn=u(iw(e,eu).Kc().Pb(),11),gt=gd(_t.e),Se=gd(Qe.g),Lt=gd(Bt.e),We=gd(Rn.g),oy(t,r,ce),h=Lt,C=0,V=h.length;CC?new t2((Vf(),Uy),n,e,k-C):k>0&&C>0&&(new t2((Vf(),Uy),e,n,0),new t2(Uy,n,e,0))),h)}function Cle(t,e){var n,r,s,o,h,d;for(h=new h2(new wg(t.f.b).a);h.b;){if(o=Yv(h),s=u(o.cd(),594),e==1){if(s.gf()!=(ao(),Z0)&&s.gf()!=Q0)continue}else if(s.gf()!=(ao(),jh)&&s.gf()!=kf)continue;switch(r=u(u(o.dd(),46).b,81),d=u(u(o.dd(),46).a,189),n=d.c,s.gf().g){case 2:r.g.c=t.e.a,r.g.b=b.Math.max(1,r.g.b+n);break;case 1:r.g.c=r.g.c+n,r.g.b=b.Math.max(1,r.g.b-n);break;case 4:r.g.d=t.e.b,r.g.a=b.Math.max(1,r.g.a+n);break;case 3:r.g.d=r.g.d+n,r.g.a=b.Math.max(1,r.g.a-n)}}}function byn(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y;for(d=Pt(Tr,Xr,25,e.b.c.length,15,1),k=Pt(elt,ae,267,e.b.c.length,0,1),w=Pt(o0,zg,10,e.b.c.length,0,1),M=t.a,F=0,H=M.length;F0&&w[r]&&(V=V3(t.b,w[r],s)),Y=b.Math.max(Y,s.c.c.b+V);for(o=new S(C.e);o.a1)throw rt(new Pn(eO));w||(o=Yd(e,r.Kc().Pb()),h.Fc(o))}return yyt(t,$4t(t,e,n),h)}function myn(t,e){var n,r,s,o;for(non(e.b.j),us(pu(new Tn(null,new _n(e.d,16)),new jX),new $X),o=new S(e.d);o.at.o.b||(n=Yo(t,Hn),d=e.d+e.a+(n.gc()-1)*h,d>t.o.b)))}function kat(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V;if(h=t.e,w=e.e,h==0)return e;if(w==0)return t;if(o=t.d,d=e.d,o+d==2)return n=Ps(t.a[0],co),r=Ps(e.a[0],co),h==w?(C=Oa(n,r),V=Sr(C),H=Sr(zm(C,32)),H==0?new Lg(h,V):new K3(h,2,ct(ot(Tr,1),Xr,25,15,[V,H]))):KI(h<0?Yp(r,n):Yp(n,r));if(h==w)F=h,M=o>=d?Rrt(t.a,o,e.a,d):Rrt(e.a,d,t.a,o);else{if(s=o!=d?o>d?1:-1:Pyt(t.a,e.a,o),s==0)return Jp(),QE;s==1?(F=h,M=Frt(t.a,o,e.a,d)):(F=w,M=Frt(e.a,d,t.a,o))}return k=new K3(F,M.length,M),OC(k),k}function Eat(t,e,n,r,s,o,h){var d,w,k,C,M,F,H;return M=je(Re(Q(e,(Te(),rCt)))),F=null,o==(so(),Ju)&&r.c.i==n?F=r.c:o==eu&&r.d.i==n&&(F=r.d),k=h,!k||!M||F?(C=(be(),Zo),F?C=F.j:H3(u(Q(n,os),98))&&(C=o==Ju?Bn:Hn),w=Eyn(t,e,n,o,C,r),d=Nrt((Fa(n),r)),o==Ju?(Da(d,u(Fe(w.j,0),11)),sa(d,s)):(Da(d,s),sa(d,u(Fe(w.j,0),11))),k=new Gre(r,d,w,u(Q(w,(se(),_i)),11),o,!F)):(ue(k.e,r),H=b.Math.max(Xt(ye(Q(k.d,Ug))),Xt(ye(Q(r,Ug)))),Jt(k.d,Ug,H)),ln(t.a,r,new Tj(k.d,e,o)),k}function Eq(t,e){var n,r,s,o,h,d,w,k,C,M;if(C=null,t.d&&(C=u(Fc(t.d,e),138)),!C){if(o=t.a.Mh(),M=o.i,!t.d||$9(t.d)!=M){for(w=new Cr,t.d&&VC(w,t.d),k=w.f.c+w.g.c,d=k;d0?(H=(V-1)*n,d&&(H+=r),C&&(H+=r),H=t.b[s+1])s+=2;else if(n0)for(r=new Pu(u(Ai(t.a,o),21)),vn(),Xs(r,new Si(e)),s=new ha(o.b,0);s.bYt)?(w=2,h=vi):w==0?(w=1,h=Se):(w=0,h=Se)):(H=Se>=h||h-Se0?1:Lv(isNaN(r),isNaN(0)))>=0^(gf(Ed),(b.Math.abs(d)<=Ed||d==0||isNaN(d)&&isNaN(0)?0:d<0?-1:d>0?1:Lv(isNaN(d),isNaN(0)))>=0)?b.Math.max(d,r):(gf(Ed),(b.Math.abs(r)<=Ed||r==0||isNaN(r)&&isNaN(0)?0:r<0?-1:r>0?1:Lv(isNaN(r),isNaN(0)))>0?b.Math.sqrt(d*d+r*r):-b.Math.sqrt(d*d+r*r))}function m2(t,e){var n,r,s,o,h,d;if(e){if(!t.a&&(t.a=new fR),t.e==2){hR(t.a,e);return}if(e.e==1){for(s=0;s=Ya?fo(n,r3t(r)):m8(n,r&ms),h=new hrt(10,null,0),len(t.a,h,d-1)):(n=(h.bm().length+o,new B9),fo(n,h.bm())),e.e==0?(r=e._l(),r>=Ya?fo(n,r3t(r)):m8(n,r&ms)):fo(n,e.bm()),u(h,521).b=n.a}}function Ole(t){var e,n,r,s,o;return t.g!=null?t.g:t.a<32?(t.g=K4n(ku(t.f),ps(t.e)),t.g):(s=Dat((!t.c&&(t.c=jI(t.f)),t.c),0),t.e==0?s:(e=(!t.c&&(t.c=jI(t.f)),t.c).e<0?2:1,n=s.length,r=-t.e+n-e,o=new _p,o.a+=""+s,t.e>0&&r>=-6?r>=0?iI(o,n-ps(t.e),String.fromCharCode(46)):(o.a=Dl(o.a,0,e-1)+"0."+OM(o.a,e-1),iI(o,e+1,Ah(D2,0,-ps(r)-1))):(n-e>=1&&(iI(o,e,String.fromCharCode(46)),++n),iI(o,n,String.fromCharCode(69)),r>0&&iI(o,++n,String.fromCharCode(43)),iI(o,++n,""+EC(ku(r)))),t.g=o.a,t.g))}function Fyn(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt;if(!n.dc()){for(d=0,F=0,r=n.Kc(),V=u(r.Pb(),19).a;d1&&(w=k.mg(w,t.a,d));return w.c.length==1?u(Fe(w,w.c.length-1),220):w.c.length==2?Cyn((An(0,w.c.length),u(w.c[0],220)),(An(1,w.c.length),u(w.c[1],220)),h,o):null}function Nle(t){var e,n,r,s,o,h;for(mu(t.a,new xi),n=new S(t.a);n.a=b.Math.abs(r.b)?(r.b=0,o.d+o.a>h.d&&o.dh.c&&o.c0){if(e=new Ybt(t.i,t.g),n=t.i,o=n<100?null:new Sp(n),t.ij())for(r=0;r0){for(d=t.g,k=t.i,RC(t),o=k<100?null:new Sp(k),r=0;r>13|(t.m&15)<<9,s=t.m>>4&8191,o=t.m>>17|(t.h&255)<<5,h=(t.h&1048320)>>8,d=e.l&8191,w=e.l>>13|(e.m&15)<<9,k=e.m>>4&8191,C=e.m>>17|(e.h&255)<<5,M=(e.h&1048320)>>8,We=n*d,Qe=r*d,Rn=s*d,zn=o*d,hr=h*d,w!=0&&(Qe+=n*w,Rn+=r*w,zn+=s*w,hr+=o*w),k!=0&&(Rn+=n*k,zn+=r*k,hr+=s*k),C!=0&&(zn+=n*C,hr+=r*C),M!=0&&(hr+=n*M),H=We&ul,V=(Qe&511)<<13,F=H+V,tt=We>>22,gt=Qe>>9,Lt=(Rn&262143)<<4,_t=(zn&31)<<17,Y=tt+gt+Lt+_t,Yt=Rn>>18,ce=zn>>5,Se=(hr&4095)<<8,Bt=Yt+ce+Se,Y+=F>>22,F&=ul,Bt+=Y>>22,Y&=ul,Bt&=W0,ru(F,Y,Bt)}function Ple(t){var e,n,r,s,o,h,d;if(d=u(Fe(t.j,0),11),d.g.c.length!=0&&d.e.c.length!=0)throw rt(new Fo("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(d.g.c.length!=0){for(o=ss,n=new S(d.g);n.a4)if(t.wj(e)){if(t.rk()){if(s=u(e,49),r=s.Ug(),w=r==t.e&&(t.Dk()?s.Og(s.Vg(),t.zk())==t.Ak():-1-s.Vg()==t.aj()),t.Ek()&&!w&&!r&&s.Zg()){for(o=0;o0&&(k=t.n.a/o);break;case 2:case 4:s=t.i.o.b,s>0&&(k=t.n.b/s)}Jt(t,(se(),Dw),k)}if(w=t.o,h=t.a,r)h.a=r.a,h.b=r.b,t.d=!0;else if(e!=H1&&e!=yb&&d!=Zo)switch(d.g){case 1:h.a=w.a/2;break;case 2:h.a=w.a,h.b=w.b/2;break;case 3:h.a=w.a/2,h.b=w.b;break;case 4:h.b=w.b/2}else h.a=w.a/2,h.b=w.b/2}function C_(t){var e,n,r,s,o,h,d,w,k,C;if(t.ej())if(C=t.Vi(),w=t.fj(),C>0)if(e=new oyt(t.Gi()),n=C,o=n<100?null:new Sp(n),jM(t,n,e.g),s=n==1?t.Zi(4,St(e,0),null,0,w):t.Zi(6,e,null,-1,w),t.bj()){for(r=new er(e);r.e!=r.i.gc();)o=t.dj(dr(r),o);o?(o.Ei(s),o.Fi()):t.$i(s)}else o?(o.Ei(s),o.Fi()):t.$i(s);else jM(t,t.Vi(),t.Wi()),t.$i(t.Zi(6,(vn(),io),null,-1,w));else if(t.bj())if(C=t.Vi(),C>0){for(d=t.Wi(),k=C,jM(t,C,d),o=k<100?null:new Sp(k),r=0;rt.d[h.p]&&(n+=smt(t.b,o)*u(w.b,19).a,qp(t.a,de(o)));for(;!N9(t.a);)Fmt(t.b,u(Fx(t.a),19).a)}return n}function Kyn(t,e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt;for(M=new yo(u(qe(t,(eq(),_St)),8)),M.a=b.Math.max(M.a-n.b-n.c,0),M.b=b.Math.max(M.b-n.d-n.a,0),s=ye(qe(t,ESt)),(s==null||(On(s),s<=0))&&(s=1.3),d=new le,V=new er((!t.a&&(t.a=new he(ns,t,10,11)),t.a));V.e!=V.i.gc();)H=u(dr(V),33),h=new fWt(H),d.c[d.c.length]=h;switch(F=u(qe(t,Jht),311),F.g){case 3:tt=bmn(d,e,M.a,M.b,(k=r,On(s),k));break;case 1:tt=qmn(d,e,M.a,M.b,(C=r,On(s),C));break;default:tt=Qyn(d,e,M.a,M.b,(w=r,On(s),w))}o=new U$(tt),Y=Mat(o,e,n,M.a,M.b,r,(On(s),s)),gw(t,Y.a,Y.b,!1,!0)}function Yyn(t,e){var n,r,s,o;n=e.b,o=new Pu(n.j),s=0,r=n.j,r.c=Pt(Xn,Ie,1,0,5,1),Bv(u(o2(t.b,(be(),Nn),(Jv(),Aw)),15),n),s=QI(o,s,new AX,r),Bv(u(o2(t.b,Nn,hb),15),n),s=QI(o,s,new zT,r),Bv(u(o2(t.b,Nn,Sw),15),n),Bv(u(o2(t.b,Hn,Aw),15),n),Bv(u(o2(t.b,Hn,hb),15),n),s=QI(o,s,new EF,r),Bv(u(o2(t.b,Hn,Sw),15),n),Bv(u(o2(t.b,mr,Aw),15),n),s=QI(o,s,new TF,r),Bv(u(o2(t.b,mr,hb),15),n),s=QI(o,s,new CF,r),Bv(u(o2(t.b,mr,Sw),15),n),Bv(u(o2(t.b,Bn,Aw),15),n),s=QI(o,s,new IX,r),Bv(u(o2(t.b,Bn,hb),15),n),Bv(u(o2(t.b,Bn,Sw),15),n)}function Xyn(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y;for(wr(e,"Layer size calculation",1),C=ss,k=Ts,s=!1,d=new S(t.b);d.a.5?gt-=h*2*(V-.5):V<.5&&(gt+=o*2*(.5-V)),s=d.d.b,gttt.a-Y-C&&(gt=tt.a-Y-C),d.n.a=e+gt}}function Qyn(t,e,n,r,s){var o,h,d,w,k,C,M,F,H,V,Y,tt;for(d=Pt(ia,vo,25,t.c.length,15,1),F=new Vj(new KF),K3t(F,t),k=0,Y=new le;F.b.c.length!=0;)if(h=u(F.b.c.length==0?null:Fe(F.b,0),157),k>1&&Fu(h)*xl(h)/2>d[0]){for(o=0;od[o];)++o;V=new Kd(Y,0,o+1),M=new U$(V),C=Fu(h)/xl(h),w=Mat(M,e,new wx,n,r,s,C),Li(Gf(M.e),w),M8(dE(F,M)),H=new Kd(Y,o+1,Y.c.length),K3t(F,H),Y.c=Pt(Xn,Ie,1,0,5,1),k=0,hYt(d,d.length,0)}else tt=F.b.c.length==0?null:Fe(F.b,0),tt!=null&&oit(F,0),k>0&&(d[k]=d[k-1]),d[k]+=Fu(h)*xl(h),++k,Y.c[Y.c.length]=h;return Y}function Zyn(t){var e,n,r,s,o;if(r=u(Q(t,(Te(),cu)),163),r==(hh(),fb)){for(n=new ar(lr(jo(t).a.Kc(),new z));zr(n);)if(e=u(Lr(n),17),!kJt(e))throw rt(new F3(Rot+ZI(t)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(r==Fy){for(o=new ar(lr(Ms(t).a.Kc(),new z));zr(o);)if(s=u(Lr(o),17),!kJt(s))throw rt(new F3(Rot+ZI(t)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}}function Jyn(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V;for(wr(e,"Label dummy removal",1),r=Xt(ye(Q(t,(Te(),B6)))),s=Xt(ye(Q(t,Gy))),k=u(Q(t,Vl),103),w=new S(t.b);w.a0&&qae(t,d,M);for(s=new S(M);s.a>19&&(e=Y8(e),w=!w),h=Zbn(e),o=!1,s=!1,r=!1,t.h==ID&&t.m==0&&t.l==0)if(s=!0,o=!0,h==-1)t=rUt((N8(),Z8t)),r=!0,w=!w;else return d=h5t(t,h),w&&vit(d),n&&(ob=ru(0,0,0)),d;else t.h>>19&&(o=!0,t=Y8(t),r=!0,w=!w);return h!=-1?jcn(t,h,w,o,n):n4t(t,e)<0?(n&&(o?ob=Y8(t):ob=ru(t.l,t.m,t.h)),ru(0,0,0)):Hwn(r?t:ru(t.l,t.m,t.h),e,w,o,s,n)}function Tq(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V;if(t.e&&t.c.ce.f||e.g>t.f)){for(n=0,r=0,h=t.w.a.ec().Kc();h.Ob();)s=u(h.Pb(),11),Lit(Ko(ct(ot(Us,1),te,8,0,[s.i.n,s.n,s.a])).b,e.g,e.f)&&++n;for(d=t.r.a.ec().Kc();d.Ob();)s=u(d.Pb(),11),Lit(Ko(ct(ot(Us,1),te,8,0,[s.i.n,s.n,s.a])).b,e.g,e.f)&&--n;for(w=e.w.a.ec().Kc();w.Ob();)s=u(w.Pb(),11),Lit(Ko(ct(ot(Us,1),te,8,0,[s.i.n,s.n,s.a])).b,t.g,t.f)&&++r;for(o=e.r.a.ec().Kc();o.Ob();)s=u(o.Pb(),11),Lit(Ko(ct(ot(Us,1),te,8,0,[s.i.n,s.n,s.a])).b,t.g,t.f)&&--r;n=0)return s=cln(t,e.substr(1,h-1)),C=e.substr(h+1,w-(h+1)),r5n(t,C,s)}else{if(n=-1,rEt==null&&(rEt=new RegExp("\\d")),rEt.test(String.fromCharCode(d))&&(n=uvt(e,Eu(46),w-1),n>=0)){r=u(Prt(t,gee(t,e.substr(1,n-1)),!1),58),k=0;try{k=$l(e.substr(n+1),_a,vi)}catch(F){throw F=Wi(F),Et(F,127)?(o=F,rt(new F$(o))):rt(F)}if(k=0)return n;switch($v(Eo(t,n))){case 2:{if(hn("",Og(t,n.Hj()).ne())){if(w=ZM(Eo(t,n)),d=k8(Eo(t,n)),C=w5t(t,e,w,d),C)return C;for(s=V5t(t,e),h=0,M=s.gc();h1)throw rt(new Pn(eO));for(C=au(t.e.Tg(),e),r=u(t.g,119),h=0;h1,k=new S1(F.b);Vo(k.a)||Vo(k.b);)w=u(Vo(k.a)?J(k.a):J(k.b),17),M=w.c==F?w.d:w.c,b.Math.abs(Ko(ct(ot(Us,1),te,8,0,[M.i.n,M.n,M.a])).b-h.b)>1&&nvn(t,w,h,o,F)}}function h3n(t){var e,n,r,s,o,h;if(s=new ha(t.e,0),r=new ha(t.a,0),t.d)for(n=0;nwct;){for(o=e,h=0;b.Math.abs(e-o)0),s.a.Xb(s.c=--s.b),Amn(t,t.b-h,o,r,s),Qn(s.b0),r.a.Xb(r.c=--r.b)}if(!t.d)for(n=0;n0?(t.f[C.p]=H/(C.e.c.length+C.g.c.length),t.c=b.Math.min(t.c,t.f[C.p]),t.b=b.Math.max(t.b,t.f[C.p])):d&&(t.f[C.p]=H)}}function d3n(t){t.b=null,t.bb=null,t.fb=null,t.qb=null,t.a=null,t.c=null,t.d=null,t.e=null,t.f=null,t.n=null,t.M=null,t.L=null,t.Q=null,t.R=null,t.K=null,t.db=null,t.eb=null,t.g=null,t.i=null,t.j=null,t.k=null,t.gb=null,t.o=null,t.p=null,t.q=null,t.r=null,t.$=null,t.ib=null,t.S=null,t.T=null,t.t=null,t.s=null,t.u=null,t.v=null,t.w=null,t.B=null,t.A=null,t.C=null,t.D=null,t.F=null,t.G=null,t.H=null,t.I=null,t.J=null,t.P=null,t.Z=null,t.U=null,t.V=null,t.W=null,t.X=null,t.Y=null,t._=null,t.ab=null,t.cb=null,t.hb=null,t.nb=null,t.lb=null,t.mb=null,t.ob=null,t.pb=null,t.jb=null,t.kb=null,t.N=!1,t.O=!1}function g3n(t,e,n){var r,s,o,h;for(wr(n,"Graph transformation ("+t.a+")",1),h=Gv(e.a),o=new S(e.b);o.a0&&(t.a=w+(H-1)*o,e.c.b+=t.a,e.f.b+=t.a)),V.a.gc()!=0&&(F=new Gnt(1,o),H=vxt(F,e,V,Y,e.f.b+w-e.c.b),H>0&&(e.f.b+=w+(H-1)*o))}function CE(t,e){var n,r,s,o;o=t.F,e==null?(t.F=null,Z8(t,null)):(t.F=(On(e),e),r=cd(e,Eu(60)),r!=-1?(s=e.substr(0,r),cd(e,Eu(46))==-1&&!hn(s,u6)&&!hn(s,Q_)&&!hn(s,TH)&&!hn(s,Z_)&&!hn(s,J_)&&!hn(s,tS)&&!hn(s,eS)&&!hn(s,nS)&&(s=E0e),n=dj(e,Eu(62)),n!=-1&&(s+=""+e.substr(n+1)),Z8(t,s)):(s=e,cd(e,Eu(46))==-1&&(r=cd(e,Eu(91)),r!=-1&&(s=e.substr(0,r)),!hn(s,u6)&&!hn(s,Q_)&&!hn(s,TH)&&!hn(s,Z_)&&!hn(s,J_)&&!hn(s,tS)&&!hn(s,eS)&&!hn(s,nS)?(s=E0e,r!=-1&&(s+=""+e.substr(r))):s=e),Z8(t,s),s==e&&(t.F=t.D))),t.Db&4&&!(t.Db&1)&&mi(t,new Qs(t,1,5,o,e))}function b3n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t;if(Y=e.b.c.length,!(Y<3)){for(H=Pt(Tr,Xr,25,Y,15,1),M=0,C=new S(e.b);C.ah)&&Ns(t.b,u(tt.b,17));++d}o=h}}}function gxt(t,e){var n;if(e==null||hn(e,Tu)||e.length==0&&t.k!=(jg(),j6))return null;switch(t.k.g){case 1:return Oz(e,qE)?(Fn(),YE):Oz(e,Oct)?(Fn(),I2):null;case 2:try{return de($l(e,_a,vi))}catch(r){if(r=Wi(r),Et(r,127))return null;throw rt(r)}case 4:try{return ly(e)}catch(r){if(r=Wi(r),Et(r,127))return null;throw rt(r)}case 3:return e;case 5:return xre(t),Soe(t,e);case 6:return xre(t),_bn(t,t.a,e);case 7:try{return n=Rpn(t),n.Jf(e),n}catch(r){if(r=Wi(r),Et(r,32))return null;throw rt(r)}default:throw rt(new Fo("Invalid type set for this layout option."))}}function v3n(t){$C();var e,n,r,s,o,h,d;for(d=new Zzt,n=new S(t);n.a=d.b.c)&&(d.b=e),(!d.c||e.c<=d.c.c)&&(d.d=d.c,d.c=e),(!d.e||e.d>=d.e.d)&&(d.e=e),(!d.f||e.d<=d.f.d)&&(d.f=e);return r=new Bz((K8(),_w)),aI(t,Lbe,new wl(ct(ot(gO,1),Ie,369,0,[r]))),h=new Bz(Dy),aI(t,Abe,new wl(ct(ot(gO,1),Ie,369,0,[h]))),s=new Bz(Iy),aI(t,Sbe,new wl(ct(ot(gO,1),Ie,369,0,[s]))),o=new Bz(j4),aI(t,_be,new wl(ct(ot(gO,1),Ie,369,0,[o]))),Yst(r.c,_w),Yst(s.c,Iy),Yst(o.c,j4),Yst(h.c,Dy),d.a.c=Pt(Xn,Ie,1,0,5,1),As(d.a,r.c),As(d.a,a2(s.c)),As(d.a,o.c),As(d.a,a2(h.c)),d}function pxt(t){var e;switch(t.d){case 1:{if(t.hj())return t.o!=-2;break}case 2:{if(t.hj())return t.o==-2;break}case 3:case 5:case 4:case 6:case 7:return t.o>-2;default:return!1}switch(e=t.gj(),t.p){case 0:return e!=null&&je(Re(e))!=aC(t.k,0);case 1:return e!=null&&u(e,217).a!=Sr(t.k)<<24>>24;case 2:return e!=null&&u(e,172).a!=(Sr(t.k)&ms);case 6:return e!=null&&aC(u(e,162).a,t.k);case 5:return e!=null&&u(e,19).a!=Sr(t.k);case 7:return e!=null&&u(e,184).a!=Sr(t.k)<<16>>16;case 3:return e!=null&&Xt(ye(e))!=t.j;case 4:return e!=null&&u(e,155).a!=t.j;default:return e==null?t.n!=null:!yi(e,t.n)}}function ED(t,e,n){var r,s,o,h;return t.Fk()&&t.Ek()&&(h=Fnt(t,u(n,56)),Gt(h)!==Gt(n))?(t.Oi(e),t.Ui(e,pte(t,e,h)),t.rk()&&(o=(s=u(n,49),t.Dk()?t.Bk()?s.ih(t.b,no(u(yn(bu(t.b),t.aj()),18)).n,u(yn(bu(t.b),t.aj()).Yj(),26).Bj(),null):s.ih(t.b,Vi(s.Tg(),no(u(yn(bu(t.b),t.aj()),18))),null,null):s.ih(t.b,-1-t.aj(),null,null)),!u(h,49).eh()&&(o=(r=u(h,49),t.Dk()?t.Bk()?r.gh(t.b,no(u(yn(bu(t.b),t.aj()),18)).n,u(yn(bu(t.b),t.aj()).Yj(),26).Bj(),o):r.gh(t.b,Vi(r.Tg(),no(u(yn(bu(t.b),t.aj()),18))),null,o):r.gh(t.b,-1-t.aj(),null,o))),o&&o.Fi()),ml(t.b)&&t.$i(t.Zi(9,n,h,e,!1)),h):n}function jle(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt;for(C=Xt(ye(Q(t,(Te(),Fw)))),r=Xt(ye(Q(t,gCt))),F=new Wu,Jt(F,Fw,C+r),k=e,gt=k.d,Y=k.c.i,Lt=k.d.i,tt=t2t(Y.c),_t=t2t(Lt.c),s=new le,M=tt;M<=_t;M++)d=new H0(t),_0(d,(Gn(),Zs)),Jt(d,(se(),_i),k),Jt(d,os,(oa(),Vc)),Jt(d,sV,F),H=u(Fe(t.b,M),29),M==tt?oy(d,H.a.c.length-n,H):ko(d,H),Bt=Xt(ye(Q(k,Ug))),Bt<0&&(Bt=0,Jt(k,Ug,Bt)),d.o.b=Bt,V=b.Math.floor(Bt/2),h=new Mc,Fs(h,(be(),Bn)),Uo(h,d),h.n.b=V,w=new Mc,Fs(w,Hn),Uo(w,d),w.n.b=V,sa(k,h),o=new zv,Lo(o,k),Jt(o,_o,null),Da(o,w),sa(o,gt),y1n(d,k,o),s.c[s.c.length]=o,k=o;return s}function _at(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t;for(w=u(Rg(t,(be(),Bn)).Kc().Pb(),11).e,H=u(Rg(t,Hn).Kc().Pb(),11).g,d=w.c.length,_t=T1(u(Fe(t.j,0),11));d-- >0;){for(Y=(An(0,w.c.length),u(w.c[0],17)),s=(An(0,H.c.length),u(H.c[0],17)),Lt=s.d.e,o=Ro(Lt,s,0),Tin(Y,s.d,o),Da(s,null),sa(s,null),V=Y.a,e&&ni(V,new yo(_t)),r=ei(s.a,0);r.b!=r.d.c;)n=u(ti(r),8),ni(V,new yo(n));for(gt=Y.b,F=new S(s.b);F.a0&&(h=b.Math.max(h,dne(t.C.b+r.d.b,s))),C=r,M=s,F=o;t.C&&t.C.c>0&&(H=F+t.C.c,k&&(H+=C.d.c),h=b.Math.max(h,(y1(),gf(P1),b.Math.abs(M-1)<=P1||M==1||isNaN(M)&&isNaN(1)?0:H/(1-M)))),n.n.b=0,n.a.a=h}function zle(t,e){var n,r,s,o,h,d,w,k,C,M,F,H;if(n=u(go(t.b,e),124),w=u(u(Ai(t.r,e),21),84),w.dc()){n.n.d=0,n.n.a=0;return}for(k=t.u.Hc((Qu(),tg)),h=0,t.A.Hc((_l(),V2))&&yue(t,e),d=w.Kc(),C=null,F=0,M=0;d.Ob();)r=u(d.Pb(),111),o=Xt(ye(r.b.We((gj(),ZH)))),s=r.b.rf().b,C?(H=M+C.d.a+t.w+r.d.d,h=b.Math.max(h,(y1(),gf(P1),b.Math.abs(F-o)<=P1||F==o||isNaN(F)&&isNaN(o)?0:H/(o-F)))):t.C&&t.C.d>0&&(h=b.Math.max(h,dne(t.C.d+r.d.d,o))),C=r,F=o,M=s;t.C&&t.C.a>0&&(H=M+t.C.a,k&&(H+=C.d.a),h=b.Math.max(h,(y1(),gf(P1),b.Math.abs(F-1)<=P1||F==1||isNaN(F)&&isNaN(1)?0:H/(1-F)))),n.n.d=0,n.a.b=h}function qle(t,e,n){var r,s,o,h,d,w;for(this.g=t,d=e.d.length,w=n.d.length,this.d=Pt(o0,zg,10,d+w,0,1),h=0;h0?Jrt(this,this.f/this.a):x1(e.g,e.d[0]).a!=null&&x1(n.g,n.d[0]).a!=null?Jrt(this,(Xt(x1(e.g,e.d[0]).a)+Xt(x1(n.g,n.d[0]).a))/2):x1(e.g,e.d[0]).a!=null?Jrt(this,x1(e.g,e.d[0]).a):x1(n.g,n.d[0]).a!=null&&Jrt(this,x1(n.g,n.d[0]).a)}function w3n(t,e){var n,r,s,o,h,d,w,k,C,M;for(t.a=new XYt(Won(WS)),r=new S(e.a);r.a=1&&(tt-h>0&&M>=0?(w.n.a+=Y,w.n.b+=o*h):tt-h<0&&C>=0&&(w.n.a+=Y*tt,w.n.b+=o));t.o.a=e.a,t.o.b=e.b,Jt(t,(Te(),F2),(_l(),r=u(Hf(tA),9),new rh(r,u(uf(r,r.length),9),0)))}function k3n(t,e,n,r,s,o){var h;if(!(e==null||!Hit(e,YAt,XAt)))throw rt(new Pn("invalid scheme: "+e));if(!t&&!(n!=null&&cd(n,Eu(35))==-1&&n.length>0&&(Rr(0,n.length),n.charCodeAt(0)!=47)))throw rt(new Pn("invalid opaquePart: "+n));if(t&&!(e!=null&&pM(rU,e.toLowerCase()))&&!(n==null||!Hit(n,iA,sA)))throw rt(new Pn(l0e+n));if(t&&e!=null&&pM(rU,e.toLowerCase())&&!pdn(n))throw rt(new Pn(l0e+n));if(!mln(r))throw rt(new Pn("invalid device: "+r));if(!fun(s))throw h=s==null?"invalid segments: null":"invalid segment: "+cun(s),rt(new Pn(h));if(!(o==null||cd(o,Eu(35))==-1))throw rt(new Pn("invalid query: "+o))}function E3n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt;for(wr(e,"Calculate Graph Size",1),e.n&&t&&hf(e,ff(t),(Cl(),Yl)),d=FE,w=FE,o=jkt,h=jkt,M=new er((!t.a&&(t.a=new he(ns,t,10,11)),t.a));M.e!=M.i.gc();)k=u(dr(M),33),V=k.i,Y=k.j,gt=k.g,r=k.f,s=u(qe(k,(ci(),KO)),142),d=b.Math.min(d,V-s.b),w=b.Math.min(w,Y-s.d),o=b.Math.max(o,V+gt+s.c),h=b.Math.max(h,Y+r+s.a);for(H=u(qe(t,(ci(),q2)),116),F=new $e(d-H.b,w-H.d),C=new er((!t.a&&(t.a=new he(ns,t,10,11)),t.a));C.e!=C.i.gc();)k=u(dr(C),33),yu(k,k.i-F.a),xu(k,k.j-F.b);tt=o-d+(H.b+H.c),n=h-w+(H.d+H.a),Qv(t,tt),Xv(t,n),e.n&&t&&hf(e,ff(t),(Cl(),Yl))}function Vle(t){var e,n,r,s,o,h,d,w,k,C;for(r=new le,h=new S(t.e.a);h.a0){Rz(t,n,0),n.a+=String.fromCharCode(r),s=chn(e,o),Rz(t,n,s),o+=s-1;continue}r==39?o+11)for(Y=Pt(Tr,Xr,25,t.b.b.c.length,15,1),M=0,k=new S(t.b.b);k.a=d&&s<=w)d<=s&&o<=w?(n[C++]=s,n[C++]=o,r+=2):d<=s?(n[C++]=s,n[C++]=w,t.b[r]=w+1,h+=2):o<=w?(n[C++]=d,n[C++]=o,r+=2):(n[C++]=d,n[C++]=w,t.b[r]=w+1);else if(web)&&d<10);nbt(t.c,new $5),Ule(t),fen(t.c),y3n(t.f)}function S3n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt;if(je(Re(Q(n,(Te(),$y)))))for(d=new S(n.j);d.a=2){for(w=ei(n,0),h=u(ti(w),8),d=u(ti(w),8);d.a0&&PI(k,!0,(ao(),kf)),d.k==(Gn(),xs)&&mXt(k),ki(t.f,d,e)}}function I3n(t,e,n){var r,s,o,h,d,w,k,C,M,F;switch(wr(n,"Node promotion heuristic",1),t.g=e,B4n(t),t.q=u(Q(e,(Te(),Xlt)),260),C=u(Q(t.g,tCt),19).a,o=new iF,t.q.g){case 2:case 1:TE(t,o);break;case 3:for(t.q=(w4(),fV),TE(t,o),w=0,d=new S(t.a);d.at.j&&(t.q=MO,TE(t,o));break;case 4:for(t.q=(w4(),fV),TE(t,o),k=0,s=new S(t.b);s.at.k&&(t.q=IO,TE(t,o));break;case 6:F=ps(b.Math.ceil(t.f.length*C/100)),TE(t,new kp(F));break;case 5:M=ps(b.Math.ceil(t.d*C/100)),TE(t,new qf(M));break;default:TE(t,o)}Tvn(t,e),or(n)}function Kle(t,e,n){var r,s,o,h;this.j=t,this.e=m4t(t),this.o=this.j.e,this.i=!!this.o,this.p=this.i?u(Fe(n,Fa(this.o).p),214):null,s=u(Q(t,(se(),Gc)),21),this.g=s.Hc((oo(),bh)),this.b=new le,this.d=new bie(this.e),h=u(Q(this.j,O6),230),this.q=ucn(e,h,this.e),this.k=new vQt(this),o=_1(ct(ot(Qbe,1),Ie,225,0,[this,this.d,this.k,this.q])),e==(Zv(),OO)&&!je(Re(Q(t,(Te(),By))))?(r=new x4t(this.e),o.c[o.c.length]=r,this.c=new Xwt(r,h,u(this.q,402))):e==OO&&je(Re(Q(t,(Te(),By))))?(r=new x4t(this.e),o.c[o.c.length]=r,this.c=new Jee(r,h,u(this.q,402))):this.c=new QGt(e,this),ue(o,this.c),Lle(o,this.e),this.s=d5n(this.k)}function D3n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt;for(M=u(lj((h=ei(new Cp(e).a.d,0),new bx(h))),86),V=M?u(Q(M,(fc(),Sht)),86):null,s=1;M&&V;){for(w=0,Bt=0,n=M,r=V,d=0;d=t.i?(++t.i,ue(t.a,de(1)),ue(t.b,C)):(r=t.c[e.p][1],ah(t.a,k,de(u(Fe(t.a,k),19).a+1-r)),ah(t.b,k,Xt(ye(Fe(t.b,k)))+C-r*t.e)),(t.q==(w4(),MO)&&(u(Fe(t.a,k),19).a>t.j||u(Fe(t.a,k-1),19).a>t.j)||t.q==IO&&(Xt(ye(Fe(t.b,k)))>t.k||Xt(ye(Fe(t.b,k-1)))>t.k))&&(w=!1),h=new ar(lr(jo(e).a.Kc(),new z));zr(h);)o=u(Lr(h),17),d=o.c.i,t.f[d.p]==k&&(M=Yle(t,d),s=s+u(M.a,19).a,w=w&&je(Re(M.b)));return t.f[e.p]=k,s=s+t.c[e.p][0],new la(de(s),(Fn(),!!w))}function vxt(t,e,n,r,s){var o,h,d,w,k,C,M,F,H,V,Y,tt,gt;for(M=new Cr,h=new le,voe(t,n,t.d.fg(),h,M),voe(t,r,t.d.gg(),h,M),t.b=.2*(Y=ace(Wo(new Tn(null,new _n(h,16)),new GQ)),tt=ace(Wo(new Tn(null,new _n(h,16)),new VQ)),b.Math.min(Y,tt)),o=0,d=0;d=2&&(gt=Ace(h,!0,F),!t.e&&(t.e=new D$t(t)),lhn(t.e,gt,h,t.b)),cae(h,F),K3n(h),H=-1,C=new S(h);C.ad)}function N3n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y;for(n=u(Q(t,(Te(),os)),98),h=t.f,o=t.d,d=h.a+o.b+o.c,w=0-o.d-t.c.b,C=h.b+o.d+o.a-t.c.b,k=new le,M=new le,s=new S(e);s.a0),u(C.a.Xb(C.c=--C.b),17));o!=r&&C.b>0;)t.a[o.p]=!0,t.a[r.p]=!0,o=(Qn(C.b>0),u(C.a.Xb(C.c=--C.b),17));C.b>0&&El(C)}}function Jle(t,e,n){var r,s,o,h,d,w,k,C,M;if(t.a!=e.Aj())throw rt(new Pn(HE+e.ne()+kw));if(r=Og((Ru(),ma),e).$k(),r)return r.Aj().Nh().Ih(r,n);if(h=Og(ma,e).al(),h){if(n==null)return null;if(d=u(n,15),d.dc())return"";for(M=new xg,o=d.Kc();o.Ob();)s=o.Pb(),fo(M,h.Aj().Nh().Ih(h,s)),M.a+=" ";return Wet(M,M.a.length-1)}if(C=Og(ma,e).bl(),!C.dc()){for(k=C.Kc();k.Ob();)if(w=u(k.Pb(),148),w.wj(n))try{if(M=w.Aj().Nh().Ih(w,n),M!=null)return M}catch(F){if(F=Wi(F),!Et(F,102))throw rt(F)}throw rt(new Pn("Invalid value: '"+n+"' for datatype :"+e.ne()))}return u(e,834).Fj(),n==null?null:Et(n,172)?""+u(n,172).a:sl(n)==HH?SUt(rA[0],u(n,199)):$o(n)}function $3n(t){var e,n,r,s,o,h,d,w,k,C;for(k=new Qi,d=new Qi,o=new S(t);o.a-1){for(s=ei(d,0);s.b!=s.d.c;)r=u(ti(s),128),r.v=h;for(;d.b!=0;)for(r=u(yst(d,0),128),n=new S(r.i);n.a0&&(n+=w.n.a+w.o.a/2,++M),V=new S(w.j);V.a0&&(n/=M),gt=Pt(ia,vo,25,r.a.c.length,15,1),d=0,k=new S(r.a);k.a=d&&s<=w)d<=s&&o<=w?r+=2:d<=s?(t.b[r]=w+1,h+=2):o<=w?(n[C++]=s,n[C++]=d-1,r+=2):(n[C++]=s,n[C++]=d-1,t.b[r]=w+1,h+=2);else if(w0?s-=864e5:s+=864e5,w=new H2t(Oa(ku(e.q.getTime()),s))),C=new Lm,k=t.a.length,o=0;o=97&&r<=122||r>=65&&r<=90){for(h=o+1;h=k)throw rt(new Pn("Missing trailing '"));h+10&&n.c==0&&(!e&&(e=new le),e.c[e.c.length]=n);if(e)for(;e.c.length!=0;){if(n=u(Ag(e,0),233),n.b&&n.b.c.length>0){for(o=(!n.b&&(n.b=new le),new S(n.b));o.aRo(t,n,0))return new la(s,n)}else if(Xt(x1(s.g,s.d[0]).a)>Xt(x1(n.g,n.d[0]).a))return new la(s,n)}for(d=(!n.e&&(n.e=new le),n.e).Kc();d.Ob();)h=u(d.Pb(),233),w=(!h.b&&(h.b=new le),h.b),Um(0,w.c.length),W9(w.c,0,n),h.c==w.c.length&&(e.c[e.c.length]=h)}return null}function ihe(t,e){var n,r,s,o,h,d,w,k,C;if(t==null)return Tu;if(w=e.a.zc(t,e),w!=null)return"[...]";for(n=new c2(Ka,"[","]"),s=t,o=0,h=s.length;o=14&&C<=16))?e.a._b(r)?(n.a?Vr(n.a,n.b):n.a=new Il(n.d),cC(n.a,"[...]")):(d=s2(r),k=new yC(e),P0(n,ihe(d,k))):Et(r,177)?P0(n,Bgn(u(r,177))):Et(r,190)?P0(n,_dn(u(r,190))):Et(r,195)?P0(n,F0n(u(r,195))):Et(r,2012)?P0(n,Sdn(u(r,2012))):Et(r,48)?P0(n,Fgn(u(r,48))):Et(r,364)?P0(n,Xgn(u(r,364))):Et(r,832)?P0(n,Pgn(u(r,832))):Et(r,104)&&P0(n,Ngn(u(r,104))):P0(n,r==null?Tu:$o(r));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function she(t,e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t;for(d=m4(e,!1,!1),gt=sD(d),r&&(gt=BI(gt)),_t=Xt(ye(qe(e,(i_(),$ut)))),tt=(Qn(gt.b!=0),u(gt.a.a.c,8)),M=u(Qf(gt,1),8),gt.b>2?(C=new le,As(C,new Kd(gt,1,gt.b)),o=Rhe(C,_t+t.a),Lt=new Vst(o),Lo(Lt,e),n.c[n.c.length]=Lt):r?Lt=u(Jn(t.b,Zd(e)),266):Lt=u(Jn(t.b,Xp(e)),266),w=Zd(e),r&&(w=Xp(e)),h=ngn(tt,w),k=_t+t.a,h.a?(k+=b.Math.abs(tt.b-M.b),Y=new $e(M.a,(M.b+tt.b)/2)):(k+=b.Math.abs(tt.a-M.a),Y=new $e((M.a+tt.a)/2,M.b)),r?ki(t.d,e,new q3t(Lt,h,Y,k)):ki(t.c,e,new q3t(Lt,h,Y,k)),ki(t.b,e,Lt),V=(!e.n&&(e.n=new he(qo,e,1,7)),e.n),H=new er(V);H.e!=H.i.gc();)F=u(dr(H),137),s=bD(t,F,!0,0,0),n.c[n.c.length]=s}function K3n(t){var e,n,r,s,o,h,d,w,k,C;for(k=new le,d=new le,h=new S(t);h.a-1){for(o=new S(d);o.a0)&&(YB(w,b.Math.min(w.o,s.o-1)),x9(w,w.i-1),w.i==0&&(d.c[d.c.length]=w))}}function _E(t,e,n){var r,s,o,h,d,w,k;if(k=t.c,!e&&(e=tLt),t.c=e,t.Db&4&&!(t.Db&1)&&(w=new Qs(t,1,2,k,t.c),n?n.Ei(w):n=w),k!=e){if(Et(t.Cb,284))t.Db>>16==-10?n=u(t.Cb,284).nk(e,n):t.Db>>16==-15&&(!e&&(e=(dn(),V1)),!k&&(k=(dn(),V1)),t.Cb.nh()&&(w=new F0(t.Cb,1,13,k,e,Fg(il(u(t.Cb,59)),t),!1),n?n.Ei(w):n=w));else if(Et(t.Cb,88))t.Db>>16==-23&&(Et(e,88)||(e=(dn(),Wh)),Et(k,88)||(k=(dn(),Wh)),t.Cb.nh()&&(w=new F0(t.Cb,1,10,k,e,Fg(Lc(u(t.Cb,26)),t),!1),n?n.Ei(w):n=w));else if(Et(t.Cb,444))for(d=u(t.Cb,836),h=(!d.b&&(d.b=new cR(new Ytt)),d.b),o=(r=new h2(new wg(h.a).a),new uR(r));o.a.b;)s=u(Yv(o.a).cd(),87),n=_E(s,oq(s,d),n)}return n}function Y3n(t,e){var n,r,s,o,h,d,w,k,C,M,F;for(h=je(Re(qe(t,(Te(),$y)))),F=u(qe(t,qy),21),w=!1,k=!1,M=new er((!t.c&&(t.c=new he(fl,t,9,9)),t.c));M.e!=M.i.gc()&&(!w||!k);){for(o=u(dr(M),118),d=0,s=Bp(L1(ct(ot(B1,1),Ie,20,0,[(!o.d&&(o.d=new Cn(Ws,o,8,5)),o.d),(!o.e&&(o.e=new Cn(Ws,o,7,4)),o.e)])));zr(s)&&(r=u(Lr(s),79),C=h&&uw(r)&&je(Re(qe(r,P2))),n=Fle((!r.b&&(r.b=new Cn(br,r,4,7)),r.b),o)?t==ts(Mo(u(St((!r.c&&(r.c=new Cn(br,r,5,8)),r.c),0),82))):t==ts(Mo(u(St((!r.b&&(r.b=new Cn(br,r,4,7)),r.b),0),82))),!((C||n)&&(++d,d>1))););(d>0||F.Hc((Qu(),tg))&&(!o.n&&(o.n=new he(qo,o,1,7)),o.n).i>0)&&(w=!0),d>1&&(k=!0)}w&&e.Fc((oo(),bh)),k&&e.Fc((oo(),vS))}function ahe(t){var e,n,r,s,o,h,d,w,k,C,M,F;if(F=u(qe(t,(ci(),z2)),21),F.dc())return null;if(d=0,h=0,F.Hc((_l(),nN))){for(C=u(qe(t,US),98),r=2,n=2,s=2,o=2,e=ts(t)?u(qe(ts(t),jw),103):u(qe(t,jw),103),k=new er((!t.c&&(t.c=new he(fl,t,9,9)),t.c));k.e!=k.i.gc();)if(w=u(dr(k),118),M=u(qe(w,o5),61),M==(be(),Zo)&&(M=nxt(w,e),bo(w,o5,M)),C==(oa(),Vc))switch(M.g){case 1:r=b.Math.max(r,w.i+w.g);break;case 2:n=b.Math.max(n,w.j+w.f);break;case 3:s=b.Math.max(s,w.i+w.g);break;case 4:o=b.Math.max(o,w.j+w.f)}else switch(M.g){case 1:r+=w.g+2;break;case 2:n+=w.f+2;break;case 3:s+=w.g+2;break;case 4:o+=w.f+2}d=b.Math.max(r,s),h=b.Math.max(n,o)}return gw(t,d,h,!0,!0)}function Sat(t,e,n,r,s){var o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt;for(Lt=u(Pl(G$(Ri(new Tn(null,new _n(e.d,16)),new Uk(n)),new sM(n)),i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[(I1(),Gl)]))),15),M=vi,C=_a,w=new S(e.b.j);w.a0,k?k&&(F=gt.p,h?++F:--F,M=u(Fe(gt.c.a,F),10),r=Qne(M),H=!(Qst(r,ce,n[0])||LYt(r,ce,n[0]))):H=!0),V=!1,Yt=e.D.i,Yt&&Yt.c&&d.e&&(C=h&&Yt.p>0||!h&&Yt.p0&&(e.a+=Ka),Cq(u(dr(d),160),e);for(e.a+=Pot,w=new Lx((!r.c&&(r.c=new Cn(br,r,5,8)),r.c));w.e!=w.i.gc();)w.e>0&&(e.a+=Ka),Cq(u(dr(w),160),e);e.a+=")"}}function e4n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H;if(o=u(Q(t,(se(),_i)),79),!!o){for(r=t.a,s=new yo(n),Li(s,V1n(t)),V8(t.d.i,t.c.i)?(F=t.c,M=Ko(ct(ot(Us,1),te,8,0,[F.n,F.a])),na(M,n)):M=T1(t.c),hs(r,M,r.a,r.a.a),H=T1(t.d),Q(t,$lt)!=null&&Li(H,u(Q(t,$lt),8)),hs(r,H,r.c.b,r.c),Jm(r,s),h=m4(o,!0,!0),Z$(h,u(St((!o.b&&(o.b=new Cn(br,o,4,7)),o.b),0),82)),J$(h,u(St((!o.c&&(o.c=new Cn(br,o,5,8)),o.c),0),82)),yD(r,h),C=new S(t.b);C.a=0){for(w=null,d=new ha(C.a,k+1);d.bh?1:Lv(isNaN(0),isNaN(h)))<0&&(gf(Ed),(b.Math.abs(h-1)<=Ed||h==1||isNaN(h)&&isNaN(1)?0:h<1?-1:h>1?1:Lv(isNaN(h),isNaN(1)))<0)&&(gf(Ed),(b.Math.abs(0-d)<=Ed||d==0||isNaN(0)&&isNaN(d)?0:0d?1:Lv(isNaN(0),isNaN(d)))<0)&&(gf(Ed),(b.Math.abs(d-1)<=Ed||d==1||isNaN(d)&&isNaN(1)?0:d<1?-1:d>1?1:Lv(isNaN(d),isNaN(1)))<0)),o)}function r4n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce;for(M=new ywt(new Mt(t));M.b!=M.c.a.d;)for(C=hte(M),d=u(C.d,56),e=u(C.e,56),h=d.Tg(),Y=0,Bt=(h.i==null&&pd(h),h.i).length;Y=0&&Y=k.c.c.length?C=tmt((Gn(),Ds),Zs):C=tmt((Gn(),Zs),Zs),C*=2,o=n.a.g,n.a.g=b.Math.max(o,o+(C-o)),h=n.b.g,n.b.g=b.Math.max(h,h+(C-h)),s=e}}function a4n(t,e,n,r,s){var o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt;for(Yt=SKt(t),C=new le,d=t.c.length,M=d-1,F=d+1;Yt.a.c!=0;){for(;n.b!=0;)_t=(Qn(n.b!=0),u(ch(n,n.a.a),112)),IC(Yt.a,_t)!=null,_t.g=M--,rxt(_t,e,n,r);for(;e.b!=0;)Bt=(Qn(e.b!=0),u(ch(e,e.a.a),112)),IC(Yt.a,Bt)!=null,Bt.g=F++,rxt(Bt,e,n,r);for(k=_a,gt=(h=new vC(new gC(new y(Yt.a).a).b),new g(h));mM(gt.a.a);){if(tt=(o=wj(gt.a),u(o.cd(),112)),!r&&tt.b>0&&tt.a<=0){C.c=Pt(Xn,Ie,1,0,5,1),C.c[C.c.length]=tt;break}Y=tt.i-tt.d,Y>=k&&(Y>k&&(C.c=Pt(Xn,Ie,1,0,5,1),k=Y),C.c[C.c.length]=tt)}C.c.length!=0&&(w=u(Fe(C,zz(s,C.c.length)),112),IC(Yt.a,w)!=null,w.g=F++,rxt(w,e,n,r),C.c=Pt(Xn,Ie,1,0,5,1))}for(Lt=t.c.length+1,V=new S(t);V.a0&&(F.d+=C.n.d,F.d+=C.d),F.a>0&&(F.a+=C.n.a,F.a+=C.d),F.b>0&&(F.b+=C.n.b,F.b+=C.d),F.c>0&&(F.c+=C.n.c,F.c+=C.d),F}function che(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V;for(F=n.d,M=n.c,o=new $e(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a),h=o.b,k=new S(t.a);k.a0&&(t.c[e.c.p][e.p].d+=ol(t.i,24)*PD*.07000000029802322-.03500000014901161,t.c[e.c.p][e.p].a=t.c[e.c.p][e.p].d/t.c[e.c.p][e.p].b)}}function g4n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt;for(V=new S(t);V.ar.d,r.d=b.Math.max(r.d,e),d&&n&&(r.d=b.Math.max(r.d,r.a),r.a=r.d+s);break;case 3:n=e>r.a,r.a=b.Math.max(r.a,e),d&&n&&(r.a=b.Math.max(r.a,r.d),r.d=r.a+s);break;case 2:n=e>r.c,r.c=b.Math.max(r.c,e),d&&n&&(r.c=b.Math.max(r.b,r.c),r.b=r.c+s);break;case 4:n=e>r.b,r.b=b.Math.max(r.b,e),d&&n&&(r.b=b.Math.max(r.b,r.c),r.c=r.b+s)}}}function w4n(t){var e,n,r,s,o,h,d,w,k,C,M;for(k=new S(t);k.a0||C.j==Bn&&C.e.c.length-C.g.c.length<0)){e=!1;break}for(s=new S(C.g);s.a=k&&Yt>=tt&&(F+=V.n.b+Y.n.b+Y.a.b-Bt,++d));if(n)for(h=new S(Lt.e);h.a=k&&Yt>=tt&&(F+=V.n.b+Y.n.b+Y.a.b-Bt,++d))}d>0&&(ce+=F/d,++H)}H>0?(e.a=s*ce/H,e.g=H):(e.a=0,e.g=0)}function y4n(t,e){var n,r,s,o,h,d,w,k,C,M,F;for(s=new S(t.a.b);s.aTs||e.o==j2&&C0&&yu(gt,Bt*ce),Yt>0&&xu(gt,Yt*Se);for(UC(t.b,new cv),e=new le,d=new h2(new wg(t.c).a);d.b;)h=Yv(d),r=u(h.cd(),79),n=u(h.dd(),395).a,s=m4(r,!1,!1),M=uae(Zd(r),sD(s),n),yD(M,s),_t=xae(r),_t&&Ro(e,_t,0)==-1&&(e.c[e.c.length]=_t,SXt(_t,(Qn(M.b!=0),u(M.a.a.c,8)),n));for(tt=new h2(new wg(t.d).a);tt.b;)Y=Yv(tt),r=u(Y.cd(),79),n=u(Y.dd(),395).a,s=m4(r,!1,!1),M=uae(Xp(r),BI(sD(s)),n),M=BI(M),yD(M,s),_t=kae(r),_t&&Ro(e,_t,0)==-1&&(e.c[e.c.length]=_t,SXt(_t,(Qn(M.b!=0),u(M.c.b.c,8)),n))}function hhe(t,e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se;if(n.c.length!=0){for(H=new le,F=new S(n);F.a1)for(H=new hxt(V,_t,r),va(_t,new iVt(t,H)),h.c[h.c.length]=H,M=_t.a.ec().Kc();M.Ob();)C=u(M.Pb(),46),vu(o,C.b);if(d.a.gc()>1)for(H=new hxt(V,d,r),va(d,new sVt(t,H)),h.c[h.c.length]=H,M=d.a.ec().Kc();M.Ob();)C=u(M.Pb(),46),vu(o,C.b)}}function dhe(t){Sv(t,new w2(mR(Ev(yv(kv(xv(new pg,Td),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new nZ),Td))),xe(t,Td,uH,De(Nye)),xe(t,Td,ky,De(Pye)),xe(t,Td,L4,De(Mye)),xe(t,Td,w6,De(Iye)),xe(t,Td,v6,De(Dye)),xe(t,Td,RE,De(Lye)),xe(t,Td,F_,De(k_t)),xe(t,Td,jE,De(Oye)),xe(t,Td,Ect,De(Fht)),xe(t,Td,kct,De(Bht)),xe(t,Td,Vkt,De(E_t)),xe(t,Td,zkt,De(_V)),xe(t,Td,qkt,De(SV)),xe(t,Td,Hkt,De(BO)),xe(t,Td,Gkt,De(T_t))}function yxt(t){var e;if(this.r=rnn(new bc,new Cc),this.b=new e_(u(Ar(Xa),290)),this.p=new e_(u(Ar(Xa),290)),this.i=new e_(u(Ar(Epe),290)),this.e=t,this.o=new yo(t.rf()),this.D=t.Df()||je(Re(t.We((ci(),WO)))),this.A=u(t.We((ci(),z2)),21),this.B=u(t.We(vb),21),this.q=u(t.We(US),98),this.u=u(t.We(Ky),21),!l0n(this.u))throw rt(new F3("Invalid port label placement: "+this.u));if(this.v=je(Re(t.We(nAt))),this.j=u(t.We(s5),21),!Nbn(this.j))throw rt(new F3("Invalid node label placement: "+this.j));this.n=u(o_(t,HSt),116),this.k=Xt(ye(o_(t,qV))),this.d=Xt(ye(o_(t,aAt))),this.w=Xt(ye(o_(t,hAt))),this.s=Xt(ye(o_(t,oAt))),this.t=Xt(ye(o_(t,cAt))),this.C=u(o_(t,uAt),142),this.c=2*this.d,e=!this.B.Hc((cl(),rN)),this.f=new r_(0,e,0),this.g=new r_(1,e,0),Jtt(this.f,(Kf(),tu),this.g)}function L4n(t,e,n,r,s){var o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn;for(_t=0,V=0,H=0,F=1,Lt=new er((!t.a&&(t.a=new he(ns,t,10,11)),t.a));Lt.e!=Lt.i.gc();)tt=u(dr(Lt),33),F+=N0(new ar(lr(G0(tt).a.Kc(),new z))),We=tt.g,V=b.Math.max(V,We),M=tt.f,H=b.Math.max(H,M),_t+=We*M;for(Y=(!t.a&&(t.a=new he(ns,t,10,11)),t.a).i,h=_t+2*r*r*F*Y,o=b.Math.sqrt(h),w=b.Math.max(o*n,V),d=b.Math.max(o/n,H),gt=new er((!t.a&&(t.a=new he(ns,t,10,11)),t.a));gt.e!=gt.i.gc();)tt=u(dr(gt),33),Qe=s.b+(ol(e,26)*L_+ol(e,27)*M_)*(w-tt.g),Rn=s.b+(ol(e,26)*L_+ol(e,27)*M_)*(d-tt.f),yu(tt,Qe),xu(tt,Rn);for(Se=w+(s.b+s.c),ce=d+(s.d+s.a),Yt=new er((!t.a&&(t.a=new he(ns,t,10,11)),t.a));Yt.e!=Yt.i.gc();)for(Bt=u(dr(Yt),33),C=new ar(lr(G0(Bt).a.Kc(),new z));zr(C);)k=u(Lr(C),79),g_(k)||M5n(k,e,Se,ce);Se+=s.b+s.c,ce+=s.d+s.a,gw(t,Se,ce,!1,!0)}function Sq(t){var e,n,r,s,o,h,d,w,k,C,M;if(t==null)throw rt(new od(Tu));if(k=t,o=t.length,w=!1,o>0&&(e=(Rr(0,t.length),t.charCodeAt(0)),(e==45||e==43)&&(t=t.substr(1),--o,w=e==45)),o==0)throw rt(new od(vw+k+'"'));for(;t.length>0&&(Rr(0,t.length),t.charCodeAt(0)==48);)t=t.substr(1),--o;if(o>(ele(),Ege)[10])throw rt(new od(vw+k+'"'));for(s=0;s0&&(M=-parseInt(t.substr(0,r),10),t=t.substr(r),o-=r,n=!1);o>=h;){if(r=parseInt(t.substr(0,h),10),t=t.substr(h),o-=h,n)n=!1;else{if(yc(M,d)<0)throw rt(new od(vw+k+'"'));M=Ca(M,C)}M=Yp(M,r)}if(yc(M,0)>0)throw rt(new od(vw+k+'"'));if(!w&&(M=O8(M),yc(M,0)<0))throw rt(new od(vw+k+'"'));return M}function xxt(t,e){GKt();var n,r,s,o,h,d,w;if(this.a=new h2t(this),this.b=t,this.c=e,this.f=jnt(Eo((Ru(),ma),e)),this.f.dc())if((d=a4t(ma,t))==e)for(this.e=!0,this.d=new le,this.f=new Ck,this.f.Fc(L2),u(Eq(mI(ma,Fl(t)),""),26)==t&&this.f.Fc(kC(ma,Fl(t))),s=oat(ma,t).Kc();s.Ob();)switch(r=u(s.Pb(),170),$v(Eo(ma,r))){case 4:{this.d.Fc(r);break}case 5:{this.f.Gc(jnt(Eo(ma,r)));break}}else if(to(),u(e,66).Oj())for(this.e=!0,this.f=null,this.d=new le,h=0,w=(t.i==null&&pd(t),t.i).length;h=0&&h0&&(u(go(t.b,e),124).a.b=n)}function M4n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt;for(wr(e,"Comment pre-processing",1),n=0,w=new S(t.a);w.a0&&(w=(Rr(0,e.length),e.charCodeAt(0)),w!=64)){if(w==37&&(M=e.lastIndexOf("%"),k=!1,M!=0&&(M==F-1||(k=(Rr(M+1,e.length),e.charCodeAt(M+1)==46))))){if(h=e.substr(1,M-1),_t=hn("%",h)?null:Ext(h),r=0,k)try{r=$l(e.substr(M+2),_a,vi)}catch(Bt){throw Bt=Wi(Bt),Et(Bt,127)?(d=Bt,rt(new F$(d))):rt(Bt)}for(tt=ryt(t.Wg());tt.Ob();)if(V=hz(tt),Et(V,510)&&(s=u(V,590),Lt=s.d,(_t==null?Lt==null:hn(_t,Lt))&&r--==0))return s;return null}if(C=e.lastIndexOf("."),H=C==-1?e:e.substr(0,C),n=0,C!=-1)try{n=$l(e.substr(C+1),_a,vi)}catch(Bt){if(Bt=Wi(Bt),Et(Bt,127))H=e;else throw rt(Bt)}for(H=hn("%",H)?null:Ext(H),Y=ryt(t.Wg());Y.Ob();)if(V=hz(Y),Et(V,191)&&(o=u(V,191),gt=o.ne(),(H==null?gt==null:hn(H,gt))&&n--==0))return o;return null}return Rle(t,e)}function O4n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn;for(ce=new le,V=new S(t.b);V.a=e.length)return{done:!0};var s=e[r++];return{value:[s,n.get(s)],done:!1}}}},Rvn()||(t.prototype.createObject=function(){return{}},t.prototype.get=function(e){return this.obj[":"+e]},t.prototype.set=function(e,n){this.obj[":"+e]=n},t.prototype[hot]=function(e){delete this.obj[":"+e]},t.prototype.keys=function(){var e=[];for(var n in this.obj)n.charCodeAt(0)==58&&e.push(n.substring(1));return e}),t}function P4n(t){ext();var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt;if(t==null)return null;if(M=t.length*8,M==0)return"";for(d=M%24,H=M/24|0,F=d!=0?H+1:H,o=null,o=Pt(mh,vd,25,F*4,15,1),k=0,C=0,e=0,n=0,r=0,h=0,s=0,w=0;w>24,k=(e&3)<<24>>24,V=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,Y=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,tt=r&-128?(r>>6^252)<<24>>24:r>>6<<24>>24,o[h++]=rp[V],o[h++]=rp[Y|k<<4],o[h++]=rp[C<<2|tt],o[h++]=rp[r&63];return d==8?(e=t[s],k=(e&3)<<24>>24,V=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,o[h++]=rp[V],o[h++]=rp[k<<4],o[h++]=61,o[h++]=61):d==16&&(e=t[s],n=t[s+1],C=(n&15)<<24>>24,k=(e&3)<<24>>24,V=e&-128?(e>>2^192)<<24>>24:e>>2<<24>>24,Y=n&-128?(n>>4^240)<<24>>24:n>>4<<24>>24,o[h++]=rp[V],o[h++]=rp[Y|k<<4],o[h++]=rp[C<<2],o[h++]=61),Ah(o,0,o.length)}function F4n(t,e){var n,r,s,o,h,d,w;if(t.e==0&&t.p>0&&(t.p=-(t.p-1)),t.p>_a&&nmt(e,t.p-nb),h=e.q.getDate(),nI(e,1),t.k>=0&&wrn(e,t.k),t.c>=0?nI(e,t.c):t.k>=0?(w=new Eyt(e.q.getFullYear()-nb,e.q.getMonth(),35),r=35-w.q.getDate(),nI(e,b.Math.min(r,h))):nI(e,h),t.f<0&&(t.f=e.q.getHours()),t.b>0&&t.f<12&&(t.f+=12),LXe(e,t.f==24&&t.g?0:t.f),t.j>=0&&Lsn(e,t.j),t.n>=0&&Wsn(e,t.n),t.i>=0&&HVt(e,Oa(Ca(eD(ku(e.q.getTime()),$g),$g),t.i)),t.a&&(s=new _R,nmt(s,s.q.getFullYear()-nb-80),get(ku(e.q.getTime()),ku(s.q.getTime()))&&nmt(e,s.q.getFullYear()-nb+100)),t.d>=0){if(t.c==-1)n=(7+t.d-e.q.getDay())%7,n>3&&(n-=7),d=e.q.getMonth(),nI(e,e.q.getDate()+n),e.q.getMonth()!=d&&nI(e,e.q.getDate()+(n>0?-7:7));else if(e.q.getDay()!=t.d)return!1}return t.o>_a&&(o=e.q.getTimezoneOffset(),HVt(e,Oa(ku(e.q.getTime()),(t.o-o)*60*$g))),!0}function bhe(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt;if(s=Q(e,(se(),_i)),!!Et(s,239)){for(V=u(s,33),Y=e.e,F=new yo(e.c),o=e.d,F.a+=o.b,F.b+=o.d,Bt=u(qe(V,(Te(),iV)),174),Nu(Bt,(cl(),VV))&&(H=u(qe(V,aCt),116),ept(H,o.a),mtt(H,o.d),npt(H,o.b),opt(H,o.c)),n=new le,C=new S(e.a);C.a0&&ue(t.p,C),ue(t.o,C);e-=r,H=w+e,k+=e*t.e,ah(t.a,d,de(H)),ah(t.b,d,k),t.j=b.Math.max(t.j,H),t.k=b.Math.max(t.k,k),t.d+=e,e+=Y}}function be(){be=Z;var t;Zo=new IM(O_,0),Nn=new IM(Rq,1),Hn=new IM(xot,2),mr=new IM(kot,3),Bn=new IM(Eot,4),G1=(vn(),new Qk((t=u(Hf(Xa),9),new rh(t,u(uf(t,t.length),9),0)))),Sf=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[]))),vh=Dg(ji(Hn,ct(ot(Xa,1),xc,61,0,[]))),Wl=Dg(ji(mr,ct(ot(Xa,1),xc,61,0,[]))),qh=Dg(ji(Bn,ct(ot(Xa,1),xc,61,0,[]))),_u=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[mr]))),uu=Dg(ji(Hn,ct(ot(Xa,1),xc,61,0,[Bn]))),Af=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[Bn]))),tl=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[Hn]))),Kl=Dg(ji(mr,ct(ot(Xa,1),xc,61,0,[Bn]))),wh=Dg(ji(Hn,ct(ot(Xa,1),xc,61,0,[mr]))),el=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[Hn,Bn]))),Cu=Dg(ji(Hn,ct(ot(Xa,1),xc,61,0,[mr,Bn]))),Su=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[mr,Bn]))),qu=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[Hn,mr]))),Uc=Dg(ji(Nn,ct(ot(Xa,1),xc,61,0,[Hn,mr,Bn])))}function yhe(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t;if(e.b!=0){for(H=new Qi,d=null,V=null,r=ps(b.Math.floor(b.Math.log(e.b)*b.Math.LOG10E)+1),w=0,_t=ei(e,0);_t.b!=_t.d.c;)for(gt=u(ti(_t),86),Gt(V)!==Gt(Q(gt,(fc(),RS)))&&(V=Br(Q(gt,RS)),w=0),V!=null?d=V+zQt(w++,r):d=zQt(w++,r),Jt(gt,RS,d),tt=(s=ei(new Cp(gt).a.d,0),new bx(s));kR(tt.a);)Y=u(ti(tt.a),188).c,hs(H,Y,H.c.b,H.c),Jt(Y,RS,d);for(F=new Cr,h=0;h=w){Qn(gt.b>0),gt.a.Xb(gt.c=--gt.b);break}else Y.a>k&&(s?(As(s.b,Y.b),s.a=b.Math.max(s.a,Y.a),El(gt)):(ue(Y.b,M),Y.c=b.Math.min(Y.c,k),Y.a=b.Math.max(Y.a,w),s=Y));s||(s=new sqt,s.c=k,s.a=w,Rm(gt,s),ue(s.b,M))}for(d=e.b,C=0,tt=new S(r);tt.ad?1:0:(t.b&&(t.b._b(o)&&(s=u(t.b.xc(o),19).a),t.b._b(w)&&(d=u(t.b.xc(w),19).a)),sd?1:0)):e.e.c.length!=0&&n.g.c.length!=0?1:-1}function $4n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se;for(wr(e,l1e,1),Y=new le,ce=new le,k=new S(t.b);k.a0&&(_t-=H),fxt(h,_t),C=0,F=new S(h.a);F.a0),d.a.Xb(d.c=--d.b)),w=.4*r*C,!o&&d.be.d.c){if(H=t.c[e.a.d],tt=t.c[M.a.d],H==tt)continue;vf(of(af(cf(sf(new Eh,1),100),H),tt))}}}}}function Ext(t){Tat();var e,n,r,s,o,h,d,w;if(t==null)return null;if(s=cd(t,Eu(37)),s<0)return t;for(w=new Il(t.substr(0,s)),e=Pt(Hu,N4,25,4,15,1),d=0,r=0,h=t.length;ss+2&&bit((Rr(s+1,t.length),t.charCodeAt(s+1)),WAt,KAt)&&bit((Rr(s+2,t.length),t.charCodeAt(s+2)),WAt,KAt))if(n=dtn((Rr(s+1,t.length),t.charCodeAt(s+1)),(Rr(s+2,t.length),t.charCodeAt(s+2))),s+=2,r>0?(n&192)==128?e[d++]=n<<24>>24:r=0:n>=128&&((n&224)==192?(e[d++]=n<<24>>24,r=2):(n&240)==224?(e[d++]=n<<24>>24,r=3):(n&248)==240&&(e[d++]=n<<24>>24,r=4)),r>0){if(d==r){switch(d){case 2:{Rp(w,((e[0]&31)<<6|e[1]&63)&ms);break}case 3:{Rp(w,((e[0]&15)<<12|(e[1]&63)<<6|e[2]&63)&ms);break}}d=0,r=0}}else{for(o=0;o0){if(h+r>t.length)return!1;d=rq(t.substr(0,h+r),e)}else d=rq(t,e);switch(o){case 71:return d=p4(t,h,ct(ot(Ae,1),te,2,6,[nfe,rfe]),e),s.e=d,!0;case 77:return Svn(t,e,s,d,h);case 76:return Avn(t,e,s,d,h);case 69:return mgn(t,e,h,s);case 99:return ygn(t,e,h,s);case 97:return d=p4(t,h,ct(ot(Ae,1),te,2,6,["AM","PM"]),e),s.b=d,!0;case 121:return Lvn(t,e,h,d,n,s);case 100:return d<=0?!1:(s.c=d,!0);case 83:return d<0?!1:Oln(d,h,e[0],s);case 104:d==12&&(d=0);case 75:case 72:return d<0?!1:(s.f=d,s.g=!1,!0);case 107:return d<0?!1:(s.f=d,s.g=!0,!0);case 109:return d<0?!1:(s.j=d,!0);case 115:return d<0?!1:(s.n=d,!0);case 90:if(hce&&(V.c=ce-V.b),ue(h.d,new Dnt(V,Jyt(h,V))),Lt=e==Nn?b.Math.max(Lt,Y.b+k.b.rf().b):b.Math.min(Lt,Y.b));for(Lt+=e==Nn?t.t:-t.t,_t=p3t((h.e=Lt,h)),_t>0&&(u(go(t.b,e),124).a.b=_t),C=F.Kc();C.Ob();)k=u(C.Pb(),111),!(!k.c||k.c.d.c.length<=0)&&(V=k.c.i,V.c-=k.e.a,V.d-=k.e.b)}function W4n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H;for(e=new Cr,w=new er(t);w.e!=w.i.gc();){for(d=u(dr(w),33),n=new qs,ki(qut,d,n),H=new dm,s=u(Pl(new Tn(null,new Fv(new ar(lr(fD(d).a.Kc(),new z)))),fYt(H,i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[(I1(),Gl)])))),83),Pee(n,u(s.xc((Fn(),!0)),14),new pk),r=u(Pl(Ri(u(s.xc(!1),15).Lc(),new x3),i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[Gl]))),15),h=r.Kc();h.Ob();)o=u(h.Pb(),79),F=xae(o),F&&(k=u(ec(Ao(e.f,F)),21),k||(k=zce(F),su(e.f,F,k)),Ua(n,k));for(s=u(Pl(new Tn(null,new Fv(new ar(lr(G0(d).a.Kc(),new z)))),fYt(H,i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[Gl])))),83),Pee(n,u(s.xc(!0),14),new Ml),r=u(Pl(Ri(u(s.xc(!1),15).Lc(),new T0),i2(new _e,new we,new nr,ct(ot(ll,1),ae,132,0,[Gl]))),15),M=r.Kc();M.Ob();)C=u(M.Pb(),79),F=kae(C),F&&(k=u(ec(Ao(e.f,F)),21),k||(k=zce(F),su(e.f,F,k)),Ua(n,k))}}function K4n(t,e){wat();var n,r,s,o,h,d,w,k,C,M,F,H,V,Y;if(w=yc(t,0)<0,w&&(t=O8(t)),yc(t,0)==0)switch(e){case 0:return"0";case 1:return DE;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return H=new _p,e<0?H.a+="0E+":H.a+="0E",H.a+=e==_a?"2147483648":""+-e,H.a}C=18,M=Pt(mh,vd,25,C+1,15,1),n=C,Y=t;do k=Y,Y=eD(Y,10),M[--n]=Sr(Oa(48,Yp(k,Ca(Y,10))))&ms;while(yc(Y,0)!=0);if(s=Yp(Yp(Yp(C,n),e),1),e==0)return w&&(M[--n]=45),Ah(M,n,C-n);if(e>0&&yc(s,-6)>=0){if(yc(s,0)>=0){for(o=n+Sr(s),d=C-1;d>=o;d--)M[d+1]=M[d];return M[++o]=46,w&&(M[--n]=45),Ah(M,n,C-n+1)}for(h=2;get(h,Oa(O8(s),1));h++)M[--n]=48;return M[--n]=46,M[--n]=48,w&&(M[--n]=45),Ah(M,n,C-n)}return V=n+1,r=C,F=new Lm,w&&(F.a+="-"),r-V>=1?(Rp(F,M[n]),F.a+=".",F.a+=Ah(M,n+1,C-n-1)):F.a+=Ah(M,n,C-n),F.a+="E",yc(s,0)>0&&(F.a+="+"),F.a+=""+EC(s),F.a}function Y4n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H;if(t.e.a.$b(),t.f.a.$b(),t.c.c=Pt(Xn,Ie,1,0,5,1),t.i.c=Pt(Xn,Ie,1,0,5,1),t.g.a.$b(),e)for(h=new S(e.a);h.a=1&&(Yt-k>0&&V>=0?(yu(M,M.i+Bt),xu(M,M.j+w*k)):Yt-k<0&&H>=0&&(yu(M,M.i+Bt*Yt),xu(M,M.j+w)));return bo(t,(ci(),z2),(_l(),o=u(Hf(tA),9),new rh(o,u(uf(o,o.length),9),0))),new $e(ce,C)}function Ehe(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V;if(H=ts(Mo(u(St((!t.b&&(t.b=new Cn(br,t,4,7)),t.b),0),82))),V=ts(Mo(u(St((!t.c&&(t.c=new Cn(br,t,5,8)),t.c),0),82))),M=H==V,d=new Ta,e=u(qe(t,(bz(),mAt)),74),e&&e.b>=2){if((!t.a&&(t.a=new he(Zi,t,6,6)),t.a).i==0)n=(Tv(),s=new rd,s),Mr((!t.a&&(t.a=new he(Zi,t,6,6)),t.a),n);else if((!t.a&&(t.a=new he(Zi,t,6,6)),t.a).i>1)for(F=new Lx((!t.a&&(t.a=new he(Zi,t,6,6)),t.a));F.e!=F.i.gc();)u_(F);yD(e,u(St((!t.a&&(t.a=new he(Zi,t,6,6)),t.a),0),202))}if(M)for(r=new er((!t.a&&(t.a=new he(Zi,t,6,6)),t.a));r.e!=r.i.gc();)for(n=u(dr(r),202),k=new er((!n.a&&(n.a=new Ss(Hh,n,5)),n.a));k.e!=k.i.gc();)w=u(dr(k),469),d.a=b.Math.max(d.a,w.a),d.b=b.Math.max(d.b,w.b);for(h=new er((!t.n&&(t.n=new he(qo,t,1,7)),t.n));h.e!=h.i.gc();)o=u(dr(h),137),C=u(qe(o,KS),8),C&&m1(o,C.a,C.b),M&&(d.a=b.Math.max(d.a,o.i+o.g),d.b=b.Math.max(d.b,o.j+o.f));return d}function X4n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We;for(_t=e.c.length,s=new x4(t.a,n,null,null),We=Pt(ia,vo,25,_t,15,1),Y=Pt(ia,vo,25,_t,15,1),V=Pt(ia,vo,25,_t,15,1),tt=0,d=0;d<_t;d++)Y[d]=vi,V[d]=_a;for(w=0;w<_t;w++)for(r=(An(w,e.c.length),u(e.c[w],180)),We[w]=Wst(r),We[tt]>We[w]&&(tt=w),M=new S(t.a.b);M.aH&&(o&&(Kb(ce,F),Kb(We,de(k.b-1))),pi=n.b,Rs+=F+e,F=0,C=b.Math.max(C,n.b+n.c+hr)),yu(d,pi),xu(d,Rs),C=b.Math.max(C,pi+hr+n.c),F=b.Math.max(F,M),pi+=hr+e;if(C=b.Math.max(C,r),zn=Rs+F+n.a,znyd,Qe=b.Math.abs(F.b-V.b)>yd,(!n&&We&&Qe||n&&(We||Qe))&&ni(tt.a,Bt)),Ua(tt.a,r),r.b==0?F=Bt:F=(Qn(r.b!=0),u(r.c.b.c,8)),gcn(H,M,Y),fne(s)==Se&&(Fa(Se.i)!=s.a&&(Y=new Ta,z4t(Y,Fa(Se.i),Lt)),Jt(tt,$lt,Y)),R0n(H,tt,Lt),C.a.zc(H,C);Da(tt,Yt),sa(tt,Se)}for(k=C.a.ec().Kc();k.Ob();)w=u(k.Pb(),17),Da(w,null),sa(w,null);or(e)}function The(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt;if(t.gc()==1)return u(t.Xb(0),231);if(t.gc()<=0)return new _$;for(s=t.Kc();s.Ob();){for(n=u(s.Pb(),231),V=0,C=vi,M=vi,w=_a,k=_a,H=new S(n.e);H.ad&&(_t=0,Bt+=h+gt,h=0),Fwn(Y,n,_t,Bt),e=b.Math.max(e,_t+tt.a),h=b.Math.max(h,tt.b),_t+=tt.a+gt;return Y}function Che(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V;switch(C=new Du,t.a.g){case 3:F=u(Q(e.e,(se(),N2)),15),H=u(Q(e.j,N2),15),V=u(Q(e.f,N2),15),n=u(Q(e.e,X4),15),r=u(Q(e.j,X4),15),s=u(Q(e.f,X4),15),h=new le,As(h,F),H.Jc(new QX),As(h,Et(H,152)?Vx(u(H,152)):Et(H,131)?u(H,131).a:Et(H,54)?new mv(H):new Mm(H)),As(h,V),o=new le,As(o,n),As(o,Et(r,152)?Vx(u(r,152)):Et(r,131)?u(r,131).a:Et(r,54)?new mv(r):new Mm(r)),As(o,s),Jt(e.f,N2,h),Jt(e.f,X4,o),Jt(e.f,i9t,e.f),Jt(e.e,N2,null),Jt(e.e,X4,null),Jt(e.j,N2,null),Jt(e.j,X4,null);break;case 1:Ua(C,e.e.a),ni(C,e.i.n),Ua(C,a2(e.j.a)),ni(C,e.a.n),Ua(C,e.f.a);break;default:Ua(C,e.e.a),Ua(C,a2(e.j.a)),Ua(C,e.f.a)}_h(e.f.a),Ua(e.f.a,C),Da(e.f,e.e.c),d=u(Q(e.e,(Te(),_o)),74),k=u(Q(e.j,_o),74),w=u(Q(e.f,_o),74),(d||k||w)&&(M=new Du,lwt(M,w),lwt(M,k),lwt(M,d),Jt(e.f,_o,M)),Da(e.j,null),sa(e.j,null),Da(e.e,null),sa(e.e,null),ko(e.a,null),ko(e.i,null),e.g&&Che(t,e.g)}function t5n(t){ext();var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt;if(t==null||(o=R$(t),V=zun(o),V%4!=0))return null;if(Y=V/4|0,Y==0)return Pt(Hu,N4,25,0,15,1);for(M=null,e=0,n=0,r=0,s=0,h=0,d=0,w=0,k=0,H=0,F=0,C=0,M=Pt(Hu,N4,25,Y*3,15,1);H>4)<<24>>24,M[F++]=((n&15)<<4|r>>2&15)<<24>>24,M[F++]=(r<<6|s)<<24>>24}return!dM(h=o[C++])||!dM(d=o[C++])?null:(e=U1[h],n=U1[d],w=o[C++],k=o[C++],U1[w]==-1||U1[k]==-1?w==61&&k==61?n&15?null:(tt=Pt(Hu,N4,25,H*3+1,15,1),Ic(M,0,tt,0,H*3),tt[F]=(e<<2|n>>4)<<24>>24,tt):w!=61&&k==61?(r=U1[w],r&3?null:(tt=Pt(Hu,N4,25,H*3+2,15,1),Ic(M,0,tt,0,H*3),tt[F++]=(e<<2|n>>4)<<24>>24,tt[F]=((n&15)<<4|r>>2&15)<<24>>24,tt)):null:(r=U1[w],s=U1[k],M[F++]=(e<<2|n>>4)<<24>>24,M[F++]=((n&15)<<4|r>>2&15)<<24>>24,M[F++]=(r<<6|s)<<24>>24,M))}function e5n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt;for(wr(e,l1e,1),V=u(Q(t,(Te(),X0)),218),s=new S(t.b);s.a=2){for(Y=!0,F=new S(o.j),n=u(J(F),11),H=null;F.a0&&(s=u(Fe(tt.c.a,ce-1),10),h=t.i[s.p],We=b.Math.ceil(V3(t.n,s,tt)),o=Yt.a.e-tt.d.d-(h.a.e+s.o.b+s.d.a)-We),k=ss,ce0&&Se.a.e.e-Se.a.a-(Se.b.e.e-Se.b.a)<0,V=_t.a.e.e-_t.a.a-(_t.b.e.e-_t.b.a)<0&&Se.a.e.e-Se.a.a-(Se.b.e.e-Se.b.a)>0,H=_t.a.e.e+_t.b.aSe.b.e.e+Se.a.a,Bt=0,!Y&&!V&&(F?o+M>0?Bt=M:k-r>0&&(Bt=r):H&&(o+d>0?Bt=d:k-Lt>0&&(Bt=Lt))),Yt.a.e+=Bt,Yt.b&&(Yt.d.e+=Bt),!1))}function She(t,e,n){var r,s,o,h,d,w,k,C,M,F;if(r=new ih(e.qf().a,e.qf().b,e.rf().a,e.rf().b),s=new Ax,t.c)for(h=new S(e.wf());h.ak&&(r.a+=DUt(Pt(mh,vd,25,-k,15,1))),r.a+="Is",cd(w,Eu(32))>=0)for(s=0;s=r.o.b/2}else Lt=!M;Lt?(gt=u(Q(r,(se(),N6)),15),gt?F?o=gt:(s=u(Q(r,L6),15),s?gt.gc()<=s.gc()?o=gt:o=s:(o=new le,Jt(r,L6,o))):(o=new le,Jt(r,N6,o))):(s=u(Q(r,(se(),L6)),15),s?M?o=s:(gt=u(Q(r,N6),15),gt?s.gc()<=gt.gc()?o=s:o=gt:(o=new le,Jt(r,N6,o))):(o=new le,Jt(r,L6,o))),o.Fc(t),Jt(t,(se(),zG),n),e.d==n?(sa(e,null),n.e.c.length+n.g.c.length==0&&Uo(n,null),Ycn(n)):(Da(e,null),n.e.c.length+n.g.c.length==0&&Uo(n,null)),_h(e.a)}function s5n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr,pi;for(Lt=new ha(t.b,0),C=e.Kc(),V=0,k=u(C.Pb(),19).a,Yt=0,n=new qs,Se=new A0;Lt.b=t.a&&(r=Gmn(t,Lt),C=b.Math.max(C,r.b),Bt=b.Math.max(Bt,r.d),ue(d,new la(Lt,r)));for(We=new le,k=0;k0),tt.a.Xb(tt.c=--tt.b),Qe=new Ch(t.b),Rm(tt,Qe),Qn(tt.b0?(k=0,tt&&(k+=d),k+=(Qe-1)*h,_t&&(k+=d),We&&_t&&(k=b.Math.max(k,H2n(_t,h,Lt,Se))),k0){for(F=C<100?null:new Sp(C),k=new oyt(e),V=k.g,gt=Pt(Tr,Xr,25,C,15,1),r=0,Bt=new Kv(C),s=0;s=0;)if(H!=null?yi(H,V[w]):Gt(H)===Gt(V[w])){gt.length<=r&&(tt=gt,gt=Pt(Tr,Xr,25,2*gt.length,15,1),Ic(tt,0,gt,0,r)),gt[r++]=s,Mr(Bt,V[w]);break t}if(H=H,Gt(H)===Gt(d))break}}if(k=Bt,V=Bt.g,C=r,r>gt.length&&(tt=gt,gt=Pt(Tr,Xr,25,r,15,1),Ic(tt,0,gt,0,r)),r>0){for(_t=!0,o=0;o=0;)r6(t,gt[h]);if(r!=C){for(s=C;--s>=r;)r6(k,s);tt=gt,gt=Pt(Tr,Xr,25,r,15,1),Ic(tt,0,gt,0,r)}e=k}}}else for(e=zfn(t,e),s=t.i;--s>=0;)e.Hc(t.g[s])&&(r6(t,s),_t=!0);if(_t){if(gt!=null){for(n=e.gc(),M=n==1?DC(t,4,e.Kc().Pb(),null,gt[0],Y):DC(t,6,e,gt,gt[0],Y),F=n<100?null:new Sp(n),s=e.Kc();s.Ob();)H=s.Pb(),F=hvt(t,u(H,72),F);F?(F.Ei(M),F.Fi()):mi(t.e,M)}else{for(F=tZe(e.gc()),s=e.Kc();s.Ob();)H=s.Pb(),F=hvt(t,u(H,72),F);F&&F.Fi()}return!0}else return!1}function l5n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t;for(n=new ese(e),n.a||Wwn(e),k=Kvn(e),w=new Hv,tt=new Yce,Y=new S(e.a);Y.a0||n.o==z1&&s0?(M=u(Fe(F.c.a,h-1),10),We=V3(t.b,F,M),tt=F.n.b-F.d.d-(M.n.b+M.o.b+M.d.a+We)):tt=F.n.b-F.d.d,k=b.Math.min(tt,k),hh?xE(t,e,n):xE(t,n,e),sh?1:0}return r=u(Q(e,(se(),Tc)),19).a,o=u(Q(n,Tc),19).a,r>o?xE(t,e,n):xE(t,n,e),ro?1:0}function Txt(t,e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt;if(je(Re(qe(e,(ci(),$V)))))return vn(),vn(),io;if(k=(!e.a&&(e.a=new he(ns,e,10,11)),e.a).i!=0,M=Zgn(e),C=!M.dc(),k||C){if(s=u(qe(e,C7),149),!s)throw rt(new F3("Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout."));if(Lt=Wbt(s,(vE(),JV)),Fie(e),!k&&C&&!Lt)return vn(),vn(),io;if(w=new le,Gt(qe(e,r5))===Gt(($0(),Zg))&&(Wbt(s,QV)||Wbt(s,XV)))for(H=wue(t,e),V=new Qi,Ua(V,(!e.a&&(e.a=new he(ns,e,10,11)),e.a));V.b!=0;)F=u(V.b==0?null:(Qn(V.b!=0),ch(V,V.a.a)),33),Fie(F),gt=Gt(qe(F,r5))===Gt(YS),gt||r2(F,VS)&&!omt(s,qe(F,C7))?(d=Txt(t,F,n,r),As(w,d),bo(F,r5,YS),Pue(F)):Ua(V,(!F.a&&(F.a=new he(ns,F,10,11)),F.a));else for(H=(!e.a&&(e.a=new he(ns,e,10,11)),e.a).i,h=new er((!e.a&&(e.a=new he(ns,e,10,11)),e.a));h.e!=h.i.gc();)o=u(dr(h),33),d=Txt(t,o,n,r),As(w,d),Pue(o);for(tt=new S(w);tt.a=0?H=Jx(d):H=HI(Jx(d)),t.Ye(v7,H)),k=new Ta,F=!1,t.Xe(Pw)?(F2t(k,u(t.We(Pw),8)),F=!0):jXe(k,h.a/2,h.b/2),H.g){case 4:Jt(C,cu,(hh(),fb)),Jt(C,HG,(u2(),G4)),C.o.b=h.b,Y<0&&(C.o.a=-Y),Fs(M,(be(),Hn)),F||(k.a=h.a),k.a-=h.a;break;case 2:Jt(C,cu,(hh(),Fy)),Jt(C,HG,(u2(),u7)),C.o.b=h.b,Y<0&&(C.o.a=-Y),Fs(M,(be(),Bn)),F||(k.a=0);break;case 1:Jt(C,O2,(B0(),U4)),C.o.a=h.a,Y<0&&(C.o.b=-Y),Fs(M,(be(),mr)),F||(k.b=h.b),k.b-=h.b;break;case 3:Jt(C,O2,(B0(),A6)),C.o.a=h.a,Y<0&&(C.o.b=-Y),Fs(M,(be(),Nn)),F||(k.b=0)}if(F2t(M.n,k),Jt(C,Pw,k),e==G2||e==h0||e==Vc){if(V=0,e==G2&&t.Xe(Wg))switch(H.g){case 1:case 2:V=u(t.We(Wg),19).a;break;case 3:case 4:V=-u(t.We(Wg),19).a}else switch(H.g){case 4:case 2:V=o.b,e==h0&&(V/=s.b);break;case 1:case 3:V=o.a,e==h0&&(V/=s.a)}Jt(C,Dw,V)}return Jt(C,oc,H),C}function d5n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe;if(n=Xt(ye(Q(t.a.j,(Te(),R9t)))),n<-1||!t.a.i||Dx(u(Q(t.a.o,os),98))||Yo(t.a.o,(be(),Hn)).gc()<2&&Yo(t.a.o,Bn).gc()<2)return!0;if(t.a.c.Rf())return!1;for(Yt=0,Bt=0,_t=new le,w=t.a.e,k=0,C=w.length;k=n}function g5n(){abt();function t(r){var s=this;this.dispatch=function(o){var h=o.data;switch(h.cmd){case"algorithms":var d=g3t((vn(),new T(new b1(Tb.b))));r.postMessage({id:h.id,data:d});break;case"categories":var w=g3t((vn(),new T(new b1(Tb.c))));r.postMessage({id:h.id,data:w});break;case"options":var k=g3t((vn(),new T(new b1(Tb.d))));r.postMessage({id:h.id,data:k});break;case"register":x3n(h.algorithms),r.postMessage({id:h.id});break;case"layout":eyn(h.graph,h.layoutOptions||{},h.options||{}),r.postMessage({id:h.id,data:h.graph});break}},this.saveDispatch=function(o){try{s.dispatch(o)}catch(h){r.postMessage({id:o.data.id,error:h})}}}function e(r){var s=this;this.dispatcher=new t({postMessage:function(o){s.onmessage({data:o})}}),this.postMessage=function(o){setTimeout(function(){s.dispatcher.saveDispatch({data:o})},0)}}if(typeof document===pot&&typeof self!==pot){var n=new t(self);self.onmessage=n.saveDispatch}else typeof p!==pot&&p.exports&&(Object.defineProperty(v,"__esModule",{value:!0}),p.exports={default:e,Worker:e})}function p5n(t){t.N||(t.N=!0,t.b=ic(t,0),es(t.b,0),es(t.b,1),es(t.b,2),t.bb=ic(t,1),es(t.bb,0),es(t.bb,1),t.fb=ic(t,2),es(t.fb,3),es(t.fb,4),Pi(t.fb,5),t.qb=ic(t,3),es(t.qb,0),Pi(t.qb,1),Pi(t.qb,2),es(t.qb,3),es(t.qb,4),Pi(t.qb,5),es(t.qb,6),t.a=ai(t,4),t.c=ai(t,5),t.d=ai(t,6),t.e=ai(t,7),t.f=ai(t,8),t.g=ai(t,9),t.i=ai(t,10),t.j=ai(t,11),t.k=ai(t,12),t.n=ai(t,13),t.o=ai(t,14),t.p=ai(t,15),t.q=ai(t,16),t.s=ai(t,17),t.r=ai(t,18),t.t=ai(t,19),t.u=ai(t,20),t.v=ai(t,21),t.w=ai(t,22),t.B=ai(t,23),t.A=ai(t,24),t.C=ai(t,25),t.D=ai(t,26),t.F=ai(t,27),t.G=ai(t,28),t.H=ai(t,29),t.J=ai(t,30),t.I=ai(t,31),t.K=ai(t,32),t.M=ai(t,33),t.L=ai(t,34),t.P=ai(t,35),t.Q=ai(t,36),t.R=ai(t,37),t.S=ai(t,38),t.T=ai(t,39),t.U=ai(t,40),t.V=ai(t,41),t.X=ai(t,42),t.W=ai(t,43),t.Y=ai(t,44),t.Z=ai(t,45),t.$=ai(t,46),t._=ai(t,47),t.ab=ai(t,48),t.cb=ai(t,49),t.db=ai(t,50),t.eb=ai(t,51),t.gb=ai(t,52),t.hb=ai(t,53),t.ib=ai(t,54),t.jb=ai(t,55),t.kb=ai(t,56),t.lb=ai(t,57),t.mb=ai(t,58),t.nb=ai(t,59),t.ob=ai(t,60),t.pb=ai(t,61))}function b5n(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt;if(Lt=0,e.f.a==0)for(tt=new S(t);tt.ak&&(An(k,e.c.length),u(e.c[k],200)).a.c.length==0;)vu(e,(An(k,e.c.length),e.c[k]));if(!w){--o;continue}if(nmn(e,C,s,w,F,n,k,r)){M=!0;continue}if(F){if(uyn(e,C,s,w,n,k,r)){M=!0;continue}else if(zyt(C,s)){s.c=!0,M=!0;continue}}else if(zyt(C,s)){s.c=!0,M=!0;continue}if(M)continue}if(zyt(C,s)){s.c=!0,M=!0,w&&(w.k=!1);continue}else Vz(s.q)}return M}function Mat(t,e,n,r,s,o,h){var d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr,pi,Rs;for(Y=0,Rn=0,k=new S(t.b);k.aY&&(o&&(Kb(ce,H),Kb(We,de(C.b-1)),ue(t.d,V),d.c=Pt(Xn,Ie,1,0,5,1)),pi=n.b,Rs+=H+e,H=0,M=b.Math.max(M,n.b+n.c+hr)),d.c[d.c.length]=w,Kie(w,pi,Rs),M=b.Math.max(M,pi+hr+n.c),H=b.Math.max(H,F),pi+=hr+e,V=w;if(As(t.a,d),ue(t.d,u(Fe(d,d.c.length-1),157)),M=b.Math.max(M,r),zn=Rs+H+n.a,zn1&&(h=b.Math.min(h,b.Math.abs(u(Qf(d.a,1),8).b-C.b)))));else for(Y=new S(e.j);Y.as&&(o=F.a-s,h=vi,r.c=Pt(Xn,Ie,1,0,5,1),s=F.a),F.a>=s&&(r.c[r.c.length]=d,d.a.b>1&&(h=b.Math.min(h,b.Math.abs(u(Qf(d.a,d.a.b-2),8).b-F.b)))));if(r.c.length!=0&&o>e.o.a/2&&h>e.o.b/2){for(H=new Mc,Uo(H,e),Fs(H,(be(),Nn)),H.n.a=e.o.a/2,gt=new Mc,Uo(gt,e),Fs(gt,mr),gt.n.a=e.o.a/2,gt.n.b=e.o.b,w=new S(r);w.a=k.b?Da(d,gt):Da(d,H)):(k=u(ftn(d.a),8),tt=d.a.b==0?T1(d.c):u(vj(d.a),8),tt.b>=k.b?sa(d,gt):sa(d,H)),M=u(Q(d,(Te(),_o)),74),M&&ry(M,k,!0);e.n.a=s-e.o.a/2}}function x5n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr,pi,Rs,Xl,Kh;if(Rn=null,hr=e,zn=PZt(t,IZt(n),hr),qC(zn,O0(hr,Cd)),pi=u(t4(t.g,s6(D0(hr,jct))),33),F=D0(hr,"sourcePort"),r=null,F&&(r=s6(F)),Rs=u(t4(t.j,r),118),!pi)throw d=oE(hr),V="An edge must have a source node (edge id: '"+d,Y=V+VE,rt(new ad(Y));if(Rs&&!fd(k1(Rs),pi))throw w=O0(hr,Cd),tt="The source port of an edge must be a port of the edge's source node (edge id: '"+w,gt=tt+VE,rt(new ad(gt));if(We=(!zn.b&&(zn.b=new Cn(br,zn,4,7)),zn.b),o=null,Rs?o=Rs:o=pi,Mr(We,o),Xl=u(t4(t.g,s6(D0(hr,E8t))),33),H=D0(hr,"targetPort"),s=null,H&&(s=s6(H)),Kh=u(t4(t.j,s),118),!Xl)throw M=oE(hr),Lt="An edge must have a target node (edge id: '"+M,_t=Lt+VE,rt(new ad(_t));if(Kh&&!fd(k1(Kh),Xl))throw k=O0(hr,Cd),Bt="The target port of an edge must be a port of the edge's target node (edge id: '"+k,Yt=Bt+VE,rt(new ad(Yt));if(Qe=(!zn.c&&(zn.c=new Cn(br,zn,5,8)),zn.c),h=null,Kh?h=Kh:h=Xl,Mr(Qe,h),(!zn.b&&(zn.b=new Cn(br,zn,4,7)),zn.b).i==0||(!zn.c&&(zn.c=new Cn(br,zn,5,8)),zn.c).i==0)throw C=O0(hr,Cd),ce=Sde+C,Se=ce+VE,rt(new ad(Se));return Jz(hr,zn),hbn(hr,zn),Rn=wit(t,hr,zn),Rn}function Dhe(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn;return M=Tmn(gu(t,(be(),G1)),e),V=h4(gu(t,Sf),e),Bt=h4(gu(t,Wl),e),We=Uz(gu(t,qh),e),F=Uz(gu(t,vh),e),Lt=h4(gu(t,Af),e),Y=h4(gu(t,tl),e),ce=h4(gu(t,Kl),e),Yt=h4(gu(t,wh),e),Qe=Uz(gu(t,uu),e),gt=h4(gu(t,_u),e),_t=h4(gu(t,el),e),Se=h4(gu(t,Cu),e),Rn=Uz(gu(t,Su),e),H=Uz(gu(t,qu),e),tt=h4(gu(t,Uc),e),n=r4(ct(ot(ia,1),vo,25,15,[Lt.a,We.a,ce.a,Rn.a])),r=r4(ct(ot(ia,1),vo,25,15,[V.a,M.a,Bt.a,tt.a])),s=gt.a,o=r4(ct(ot(ia,1),vo,25,15,[Y.a,F.a,Yt.a,H.a])),k=r4(ct(ot(ia,1),vo,25,15,[Lt.b,V.b,Y.b,_t.b])),w=r4(ct(ot(ia,1),vo,25,15,[We.b,M.b,F.b,tt.b])),C=Qe.b,d=r4(ct(ot(ia,1),vo,25,15,[ce.b,Bt.b,Yt.b,Se.b])),Mg(gu(t,G1),n+s,k+C),Mg(gu(t,Uc),n+s,k+C),Mg(gu(t,Sf),n+s,0),Mg(gu(t,Wl),n+s,k+C+w),Mg(gu(t,qh),0,k+C),Mg(gu(t,vh),n+s+r,k+C),Mg(gu(t,tl),n+s+r,0),Mg(gu(t,Kl),0,k+C+w),Mg(gu(t,wh),n+s+r,k+C+w),Mg(gu(t,uu),0,k),Mg(gu(t,_u),n,0),Mg(gu(t,Cu),0,k+C+w),Mg(gu(t,qu),n+s+r,0),h=new Ta,h.a=r4(ct(ot(ia,1),vo,25,15,[n+r+s+o,Qe.a,_t.a,Se.a])),h.b=r4(ct(ot(ia,1),vo,25,15,[k+w+C+d,gt.b,Rn.b,H.b])),h}function k5n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt;for(Y=new le,F=new S(t.d.b);F.as.d.d+s.d.a?C.f.d=!0:(C.f.d=!0,C.f.a=!0))),r.b!=r.d.c&&(e=n);C&&(o=u(Jn(t.f,h.d.i),57),e.bo.d.d+o.d.a?C.f.d=!0:(C.f.d=!0,C.f.a=!0))}for(d=new ar(lr(jo(H).a.Kc(),new z));zr(d);)h=u(Lr(d),17),h.a.b!=0&&(e=u(vj(h.a),8),h.d.j==(be(),Nn)&&(tt=new x_(e,new $e(e.a,s.d.d),s,h),tt.f.a=!0,tt.a=h.d,Y.c[Y.c.length]=tt),h.d.j==mr&&(tt=new x_(e,new $e(e.a,s.d.d+s.d.a),s,h),tt.f.d=!0,tt.a=h.d,Y.c[Y.c.length]=tt))}return Y}function E5n(t,e,n){var r,s,o,h,d,w,k,C,M;if(wr(n,"Network simplex node placement",1),t.e=e,t.n=u(Q(e,(se(),Y4)),304),$yn(t),ydn(t),us(Wo(new Tn(null,new _n(t.e.b,16)),new fQ),new C$t(t)),us(Ri(Wo(Ri(Wo(new Tn(null,new _n(t.e.b,16)),new GT),new kQ),new EQ),new TQ),new T$t(t)),je(Re(Q(t.e,(Te(),TS))))&&(h=Rc(n,1),wr(h,"Straight Edges Pre-Processing",1),s4n(t),or(h)),efn(t.f),o=u(Q(e,SS),19).a*t.f.a.c.length,cat(Jpt(tbt(mnt(t.f),o),!1),Rc(n,1)),t.d.a.gc()!=0){for(h=Rc(n,1),wr(h,"Flexible Where Space Processing",1),d=u(Ov(Hj(pu(new Tn(null,new _n(t.f.a,16)),new dQ),new aQ)),19).a,w=u(Ov(qj(pu(new Tn(null,new _n(t.f.a,16)),new gQ),new oQ)),19).a,k=w-d,C=Dv(new Ub,t.f),M=Dv(new Ub,t.f),vf(of(af(sf(cf(new Eh,2e4),k),C),M)),us(Ri(Ri($nt(t.i),new pQ),new bQ),new kXt(d,C,k,M)),s=t.d.a.ec().Kc();s.Ob();)r=u(s.Pb(),213),r.g=1;cat(Jpt(tbt(mnt(t.f),o),!1),Rc(h,1)),or(h)}je(Re(Q(e,TS)))&&(h=Rc(n,1),wr(h,"Straight Edges Post-Processing",1),lgn(t),or(h)),H3n(t),t.e=null,t.f=null,t.i=null,t.c=null,Yu(t.k),t.j=null,t.a=null,t.o=null,t.d.a.$b(),or(n)}function T5n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt;for(d=new S(t.a.b);d.a0)if(r=M.gc(),k=ps(b.Math.floor((r+1)/2))-1,s=ps(b.Math.ceil((r+1)/2))-1,e.o==z1)for(C=s;C>=k;C--)e.a[Bt.p]==Bt&&(Y=u(M.Xb(C),46),V=u(Y.a,10),!S0(n,Y.b)&&H>t.b.e[V.p]&&(e.a[V.p]=Bt,e.g[Bt.p]=e.g[V.p],e.a[Bt.p]=e.g[Bt.p],e.f[e.g[Bt.p].p]=(Fn(),!!(je(e.f[e.g[Bt.p].p])&Bt.k==(Gn(),Zs))),H=t.b.e[V.p]));else for(C=k;C<=s;C++)e.a[Bt.p]==Bt&&(gt=u(M.Xb(C),46),tt=u(gt.a,10),!S0(n,gt.b)&&H=V&&(Lt>V&&(H.c=Pt(Xn,Ie,1,0,5,1),V=Lt),H.c[H.c.length]=h);H.c.length!=0&&(F=u(Fe(H,zz(e,H.c.length)),128),zn.a.Bc(F)!=null,F.s=Y++,x5t(F,Qe,ce),H.c=Pt(Xn,Ie,1,0,5,1))}for(Bt=t.c.length+1,d=new S(t);d.aRn.s&&(El(n),vu(Rn.i,r),r.c>0&&(r.a=Rn,ue(Rn.t,r),r.b=Se,ue(Se.i,r)))}function Cxt(t){var e,n,r,s,o;switch(e=t.c,e){case 11:return t.Ml();case 12:return t.Ol();case 14:return t.Ql();case 15:return t.Tl();case 16:return t.Rl();case 17:return t.Ul();case 21:return fi(t),gi(),gi(),fA;case 10:switch(t.a){case 65:return t.yl();case 90:return t.Dl();case 122:return t.Kl();case 98:return t.El();case 66:return t.zl();case 60:return t.Jl();case 62:return t.Hl()}}switch(o=m5n(t),e=t.c,e){case 3:return t.Zl(o);case 4:return t.Xl(o);case 5:return t.Yl(o);case 0:if(t.a==123&&t.d=48&&e<=57){for(r=e-48;s=48&&e<=57;)if(r=r*10+e-48,r<0)throw rt(new Fr(qr((Nr(),L8t))))}else throw rt(new Fr(qr((Nr(),e0e))));if(n=r,e==44){if(s>=t.j)throw rt(new Fr(qr((Nr(),r0e))));if((e=ba(t.i,s++))>=48&&e<=57){for(n=e-48;s=48&&e<=57;)if(n=n*10+e-48,n<0)throw rt(new Fr(qr((Nr(),L8t))));if(r>n)throw rt(new Fr(qr((Nr(),i0e))))}else n=-1}if(e!=125)throw rt(new Fr(qr((Nr(),n0e))));t.sl(s)?(o=(gi(),gi(),new Wm(9,o)),t.d=s+1):(o=(gi(),gi(),new Wm(3,o)),t.d=s),o.dm(r),o.cm(n),fi(t)}}return o}function Ohe(t,e,n,r,s){var o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn;for(Y=new Yc(e.b),Bt=new Yc(e.b),F=new Yc(e.b),We=new Yc(e.b),tt=new Yc(e.b),Se=ei(e,0);Se.b!=Se.d.c;)for(Yt=u(ti(Se),11),d=new S(Yt.g);d.a0,gt=Yt.g.c.length>0,k&>?F.c[F.c.length]=Yt:k?Y.c[Y.c.length]=Yt:gt&&(Bt.c[Bt.c.length]=Yt);for(V=new S(Y);V.a1)for(V=new Lx((!t.a&&(t.a=new he(Zi,t,6,6)),t.a));V.e!=V.i.gc();)u_(V);for(h=u(St((!t.a&&(t.a=new he(Zi,t,6,6)),t.a),0),202),tt=pi,pi>Yt+Bt?tt=Yt+Bt:pice+Y?gt=ce+Y:RsYt-Bt&&ttce-Y&>pi+hr?We=pi+hr:YtRs+Se?Qe=Rs+Se:cepi-hr&&WeRs-Se&&Qen&&(F=n-1),H=bN+ol(e,24)*PD*M-M/2,H<0?H=1:H>r&&(H=r-1),s=(Tv(),w=new vp,w),W$(s,F),K$(s,H),Mr((!h.a&&(h.a=new Ss(Hh,h,5)),h.a),s)}function Te(){Te=Z,Jlt=(ci(),Z3e),dCt=J3e,AO=iAt,xf=t4e,B6=sAt,Fw=e4e,Gy=aAt,m7=oAt,y7=cAt,tht=qV,Bw=H2,eht=n4e,_S=hAt,sV=q6,SO=(Axt(),Yve),Q4=Xve,R2=Qve,Z4=Zve,Pwe=new eo(zV,de(0)),w7=Uve,fCt=Wve,F6=Kve,xCt=ywe,gCt=ewe,pCt=iwe,rht=hwe,bCt=owe,vCt=uwe,aV=Twe,iht=xwe,mCt=bwe,wCt=gwe,yCt=wwe,Nw=$ve,CS=zve,Klt=ive,G9t=ave,oCt=new Mv(12),aCt=new eo(q2,oCt),z9t=(q0(),A7),X0=new eo(NSt,z9t),zy=new eo(hl,0),Fwe=new eo(fft,de(1)),UG=new eo($6,BE),B2=$V,os=US,v7=o5,Awe=UO,Ld=H3e,jy=r5,Bwe=new eo(dft,(Fn(),!0)),$y=WO,P2=sft,F2=z2,iV=vb,Zlt=jV,$9t=(ao(),c0),Vl=new eo(jw,$9t),Ow=s5,nV=HSt,qy=Ky,Nwe=hft,lCt=nAt,uCt=(c4(),JO),new eo(QSt,uCt),Iwe=oft,Dwe=cft,Owe=uft,Mwe=aft,nht=twe,eCt=Ave,Xlt=Sve,SS=Jve,cu=yve,Ry=X2e,ES=Y2e,By=F2e,B9t=B2e,Glt=z2e,_O=R2e,Vlt=W2e,nCt=Lve,rCt=Mve,X9t=gve,rV=Gve,Qlt=Ove,Ylt=uve,sCt=Rve,H9t=nve,Wlt=rve,Hlt=BV,iCt=Ive,KG=L2e,N9t=A2e,WG=S2e,W9t=fve,U9t=hve,K9t=dve,p7=a5,_o=i5,Ug=FSt,Md=ift,Ult=rft,R9t=H2e,Wg=lft,kS=U3e,JG=W3e,Pw=JSt,cCt=K3e,b7=Y3e,Z9t=kve,J9t=Tve,Hy=z6,zlt=_2e,tCt=_ve,ZG=J2e,QG=Z2e,eV=KO,Q9t=vve,TS=Pve,LO=uAt,j9t=Q2e,hCt=Vve,q9t=tve,Lwe=mve,Swe=V2e,Y9t=$St,tV=xve,XG=U2e,db=P2e,F9t=O2e,YG=I2e,P9t=D2e,qlt=N2e,P6=M2e,V9t=lve}function Dat(t,e){wat();var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr,pi;if(We=t.e,V=t.d,s=t.a,We==0)switch(e){case 0:return"0";case 1:return DE;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return ce=new _p,e<0?ce.a+="0E+":ce.a+="0E",ce.a+=-e,ce.a}if(_t=V*10+1+7,Bt=Pt(mh,vd,25,_t+1,15,1),n=_t,V==1)if(d=s[0],d<0){pi=Ps(d,co);do Y=pi,pi=eD(pi,10),Bt[--n]=48+Sr(Yp(Y,Ca(pi,10)))&ms;while(yc(pi,0)!=0)}else{pi=d;do Y=pi,pi=pi/10|0,Bt[--n]=48+(Y-pi*10)&ms;while(pi!=0)}else{Rn=Pt(Tr,Xr,25,V,15,1),hr=V,Ic(s,0,Rn,0,hr);t:for(;;){for(Se=0,k=hr-1;k>=0;k--)zn=Oa(M0(Se,32),Ps(Rn[k],co)),gt=Pdn(zn),Rn[k]=Sr(gt),Se=Sr(Fp(gt,32));Lt=Sr(Se),tt=n;do Bt[--n]=48+Lt%10&ms;while((Lt=Lt/10|0)!=0&&n!=0);for(r=9-tt+n,w=0;w0;w++)Bt[--n]=48;for(M=hr-1;Rn[M]==0;M--)if(M==0)break t;hr=M+1}for(;Bt[n]==48;)++n}if(H=We<0,h=_t-n-e-1,e==0)return H&&(Bt[--n]=45),Ah(Bt,n,_t-n);if(e>0&&h>=-6){if(h>=0){for(C=n+h,F=_t-1;F>=C;F--)Bt[F+1]=Bt[F];return Bt[++C]=46,H&&(Bt[--n]=45),Ah(Bt,n,_t-n+1)}for(M=2;M<-h+1;M++)Bt[--n]=48;return Bt[--n]=46,Bt[--n]=48,H&&(Bt[--n]=45),Ah(Bt,n,_t-n)}return Qe=n+1,o=_t,Yt=new Lm,H&&(Yt.a+="-"),o-Qe>=1?(Rp(Yt,Bt[n]),Yt.a+=".",Yt.a+=Ah(Bt,n+1,_t-n-1)):Yt.a+=Ah(Bt,n,_t-n),Yt.a+="E",h>0&&(Yt.a+="+"),Yt.a+=""+h,Yt.a}function Fhe(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce;switch(t.c=e,t.g=new Cr,n=(Im(),new Sm(t.c)),r=new tr(n),c3t(r),_t=Br(qe(t.c,(rD(),rSt))),w=u(qe(t.c,Kht),316),Yt=u(qe(t.c,Yht),429),h=u(qe(t.c,tSt),482),Bt=u(qe(t.c,Wht),430),t.j=Xt(ye(qe(t.c,d3e))),d=t.a,w.g){case 0:d=t.a;break;case 1:d=t.b;break;case 2:d=t.i;break;case 3:d=t.e;break;case 4:d=t.f;break;default:throw rt(new Pn(pH+(w.f!=null?w.f:""+w.g)))}if(t.d=new aQt(d,Yt,h),Jt(t.d,(G8(),uS),Re(qe(t.c,h3e))),t.d.c=je(Re(qe(t.c,eSt))),i$(t.c).i==0)return t.d;for(M=new er(i$(t.c));M.e!=M.i.gc();){for(C=u(dr(M),33),H=C.g/2,F=C.f/2,ce=new $e(C.i+H,C.j+F);kl(t.g,ce);)Fm(ce,(b.Math.random()-.5)*yd,(b.Math.random()-.5)*yd);Y=u(qe(C,(ci(),KO)),142),tt=new EQt(ce,new ih(ce.a-H-t.j/2-Y.b,ce.b-F-t.j/2-Y.d,C.g+t.j+(Y.b+Y.c),C.f+t.j+(Y.d+Y.a))),ue(t.d.i,tt),ki(t.g,ce,new la(tt,C))}switch(Bt.g){case 0:if(_t==null)t.d.d=u(Fe(t.d.i,0),65);else for(Lt=new S(t.d.i);Lt.a1&&hs(C,gt,C.c.b,C.c),H$(s)));gt=Lt}return C}function I5n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr,pi,Rs,Xl,Kh,W1;for(wr(n,"Greedy cycle removal",1),_t=e.a,W1=_t.c.length,t.a=Pt(Tr,Xr,25,W1,15,1),t.c=Pt(Tr,Xr,25,W1,15,1),t.b=Pt(Tr,Xr,25,W1,15,1),k=0,gt=new S(_t);gt.a0?hr+1:1);for(h=new S(ce.g);h.a0?hr+1:1)}t.c[k]==0?ni(t.e,Y):t.a[k]==0&&ni(t.f,Y),++k}for(V=-1,H=1,M=new le,t.d=u(Q(e,(se(),O6)),230);W1>0;){for(;t.e.b!=0;)Rs=u(knt(t.e),10),t.b[Rs.p]=V--,K5t(t,Rs),--W1;for(;t.f.b!=0;)Xl=u(knt(t.f),10),t.b[Xl.p]=H++,K5t(t,Xl),--W1;if(W1>0){for(F=_a,Lt=new S(_t);Lt.a=F&&(Bt>F&&(M.c=Pt(Xn,Ie,1,0,5,1),F=Bt),M.c[M.c.length]=Y));C=t.Zf(M),t.b[C.p]=H++,K5t(t,C),--W1}}for(pi=_t.c.length+1,k=0;k<_t.c.length;k++)t.b[k]<0&&(t.b[k]+=pi);for(tt=new S(_t);tt.at.b[Kh]&&(dw(r,!0),Jt(e,xO,(Fn(),!0)));t.a=null,t.c=null,t.b=null,_h(t.f),_h(t.e),or(n)}function Rhe(t,e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt;for(r=new le,d=new le,tt=e/2,H=t.gc(),s=u(t.Xb(0),8),gt=u(t.Xb(1),8),V=Ust(s.a,s.b,gt.a,gt.b,tt),ue(r,(An(0,V.c.length),u(V.c[0],8))),ue(d,(An(1,V.c.length),u(V.c[1],8))),k=2;k=0;w--)ni(n,(An(w,h.c.length),u(h.c[w],8)));return n}function D5n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H;if(h=!0,M=null,r=null,s=null,e=!1,H=G4e,k=null,o=null,d=0,w=Zit(t,d,YAt,XAt),w=0&&hn(t.substr(d,2),"//")?(d+=2,w=Zit(t,d,iA,sA),r=t.substr(d,w-d),d=w):M!=null&&(d==t.length||(Rr(d,t.length),t.charCodeAt(d)!=47))&&(h=!1,w=_2t(t,Eu(35),d),w==-1&&(w=t.length),r=t.substr(d,w-d),d=w);if(!n&&d0&&ba(C,C.length-1)==58&&(s=C,d=w)),d=t.j){t.a=-1,t.c=1;return}if(e=ba(t.i,t.d++),t.a=e,t.b==1){switch(e){case 92:if(r=10,t.d>=t.j)throw rt(new Fr(qr((Nr(),kH))));t.a=ba(t.i,t.d++);break;case 45:(t.e&512)==512&&t.d=t.j||ba(t.i,t.d)!=63)break;if(++t.d>=t.j)throw rt(new Fr(qr((Nr(),Xct))));switch(e=ba(t.i,t.d++),e){case 58:r=13;break;case 61:r=14;break;case 33:r=15;break;case 91:r=19;break;case 62:r=18;break;case 60:if(t.d>=t.j)throw rt(new Fr(qr((Nr(),Xct))));if(e=ba(t.i,t.d++),e==61)r=16;else if(e==33)r=17;else throw rt(new Fr(qr((Nr(),Bde))));break;case 35:for(;t.d=t.j)throw rt(new Fr(qr((Nr(),kH))));t.a=ba(t.i,t.d++);break;default:r=0}t.c=r}function N5n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr;if(Se=u(Q(t,(Te(),os)),98),Se!=(oa(),H1)&&Se!=yb){for(V=t.b,H=V.c.length,C=new Yc((Bl(H+2,Bat),q$(Oa(Oa(5,H+2),(H+2)/10|0)))),Y=new Yc((Bl(H+2,Bat),q$(Oa(Oa(5,H+2),(H+2)/10|0)))),ue(C,new Cr),ue(C,new Cr),ue(Y,new le),ue(Y,new le),ce=new le,e=0;e=Yt||!ehn(gt,r))&&(r=OQt(e,C)),ko(gt,r),o=new ar(lr(jo(gt).a.Kc(),new z));zr(o);)s=u(Lr(o),17),!t.a[s.p]&&(Y=s.c.i,--t.e[Y.p],t.e[Y.p]==0&&M8(dE(H,Y)));for(k=C.c.length-1;k>=0;--k)ue(e.b,(An(k,C.c.length),u(C.c[k],29)));e.a.c=Pt(Xn,Ie,1,0,5,1),or(n)}function jhe(t){var e,n,r,s,o,h,d,w,k;for(t.b=1,fi(t),e=null,t.c==0&&t.a==94?(fi(t),e=(gi(),gi(),new Nl(4)),jc(e,0,WE),d=new Nl(4)):d=(gi(),gi(),new Nl(4)),s=!0;(k=t.c)!=1;){if(k==0&&t.a==93&&!s){e&&(__(e,d),d=e);break}if(n=t.a,r=!1,k==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:vy(d,kE(n)),r=!0;break;case 105:case 73:case 99:case 67:n=(vy(d,kE(n)),-1),n<0&&(r=!0);break;case 112:case 80:if(w=n5t(t,n),!w)throw rt(new Fr(qr((Nr(),Qct))));vy(d,w),r=!0;break;default:n=F5t(t)}else if(k==24&&!s){if(e&&(__(e,d),d=e),o=jhe(t),__(d,o),t.c!=0||t.a!=93)throw rt(new Fr(qr((Nr(),Wde))));break}if(fi(t),!r){if(k==0){if(n==91)throw rt(new Fr(qr((Nr(),S8t))));if(n==93)throw rt(new Fr(qr((Nr(),A8t))));if(n==45&&!s&&t.a!=93)throw rt(new Fr(qr((Nr(),Zct))))}if(t.c!=0||t.a!=45||n==45&&s)jc(d,n,n);else{if(fi(t),(k=t.c)==1)throw rt(new Fr(qr((Nr(),EH))));if(k==0&&t.a==93)jc(d,n,n),jc(d,45,45);else{if(k==0&&t.a==93||k==24)throw rt(new Fr(qr((Nr(),Zct))));if(h=t.a,k==0){if(h==91)throw rt(new Fr(qr((Nr(),S8t))));if(h==93)throw rt(new Fr(qr((Nr(),A8t))));if(h==45)throw rt(new Fr(qr((Nr(),Zct))))}else k==10&&(h=F5t(t));if(fi(t),n>h)throw rt(new Fr(qr((Nr(),Xde))));jc(d,n,h)}}}s=!1}if(t.c==1)throw rt(new Fr(qr((Nr(),EH))));return b4(d),T_(d),t.b=0,fi(t),d}function F5n(t){Ir(t.c,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#decimal"])),Ir(t.d,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#integer"])),Ir(t.e,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#boolean"])),Ir(t.f,Kr,ct(ot(Ae,1),te,2,6,[Sa,"EBoolean",oi,"EBoolean:Object"])),Ir(t.i,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#byte"])),Ir(t.g,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Ir(t.j,Kr,ct(ot(Ae,1),te,2,6,[Sa,"EByte",oi,"EByte:Object"])),Ir(t.n,Kr,ct(ot(Ae,1),te,2,6,[Sa,"EChar",oi,"EChar:Object"])),Ir(t.t,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#double"])),Ir(t.u,Kr,ct(ot(Ae,1),te,2,6,[Sa,"EDouble",oi,"EDouble:Object"])),Ir(t.F,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#float"])),Ir(t.G,Kr,ct(ot(Ae,1),te,2,6,[Sa,"EFloat",oi,"EFloat:Object"])),Ir(t.I,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#int"])),Ir(t.J,Kr,ct(ot(Ae,1),te,2,6,[Sa,"EInt",oi,"EInt:Object"])),Ir(t.N,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#long"])),Ir(t.O,Kr,ct(ot(Ae,1),te,2,6,[Sa,"ELong",oi,"ELong:Object"])),Ir(t.Z,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#short"])),Ir(t.$,Kr,ct(ot(Ae,1),te,2,6,[Sa,"EShort",oi,"EShort:Object"])),Ir(t._,Kr,ct(ot(Ae,1),te,2,6,[Sa,"http://www.w3.org/2001/XMLSchema#string"]))}function B5n(t){var e,n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr;if(t.c.length==1)return An(0,t.c.length),u(t.c[0],135);if(t.c.length<=0)return new A$;for(w=new S(t);w.aM&&(zn=0,hr+=C+Se,C=0),Wbn(Yt,h,zn,hr),e=b.Math.max(e,zn+ce.a),C=b.Math.max(C,ce.b),zn+=ce.a+Se;for(Bt=new Cr,n=new Cr,Qe=new S(t);Qe.aWst(o))&&(M=o);for(!M&&(M=(An(0,tt.c.length),u(tt.c[0],180))),Y=new S(e.b);Y.a=-1900?1:0,n>=4?Vr(t,ct(ot(Ae,1),te,2,6,[nfe,rfe])[d]):Vr(t,ct(ot(Ae,1),te,2,6,["BC","AD"])[d]);break;case 121:Ihn(t,n,r);break;case 77:Pwn(t,n,r);break;case 107:w=s.q.getHours(),w==0?Xd(t,24,n):Xd(t,w,n);break;case 83:n2n(t,n,s);break;case 69:C=r.q.getDay(),n==5?Vr(t,ct(ot(Ae,1),te,2,6,["S","M","T","W","T","F","S"])[C]):n==4?Vr(t,ct(ot(Ae,1),te,2,6,[Qat,Zat,Jat,tot,eot,not,rot])[C]):Vr(t,ct(ot(Ae,1),te,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[C]);break;case 97:s.q.getHours()>=12&&s.q.getHours()<24?Vr(t,ct(ot(Ae,1),te,2,6,["AM","PM"])[1]):Vr(t,ct(ot(Ae,1),te,2,6,["AM","PM"])[0]);break;case 104:M=s.q.getHours()%12,M==0?Xd(t,12,n):Xd(t,M,n);break;case 75:F=s.q.getHours()%12,Xd(t,F,n);break;case 72:H=s.q.getHours(),Xd(t,H,n);break;case 99:V=r.q.getDay(),n==5?Vr(t,ct(ot(Ae,1),te,2,6,["S","M","T","W","T","F","S"])[V]):n==4?Vr(t,ct(ot(Ae,1),te,2,6,[Qat,Zat,Jat,tot,eot,not,rot])[V]):n==3?Vr(t,ct(ot(Ae,1),te,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[V]):Xd(t,V,1);break;case 76:Y=r.q.getMonth(),n==5?Vr(t,ct(ot(Ae,1),te,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[Y]):n==4?Vr(t,ct(ot(Ae,1),te,2,6,[$at,zat,qat,Hat,l6,Gat,Vat,Uat,Wat,Kat,Yat,Xat])[Y]):n==3?Vr(t,ct(ot(Ae,1),te,2,6,["Jan","Feb","Mar","Apr",l6,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[Y]):Xd(t,Y+1,n);break;case 81:tt=r.q.getMonth()/3|0,n<4?Vr(t,ct(ot(Ae,1),te,2,6,["Q1","Q2","Q3","Q4"])[tt]):Vr(t,ct(ot(Ae,1),te,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[tt]);break;case 100:gt=r.q.getDate(),Xd(t,gt,n);break;case 109:k=s.q.getMinutes(),Xd(t,k,n);break;case 115:h=s.q.getSeconds(),Xd(t,h,n);break;case 122:n<4?Vr(t,o.c[0]):Vr(t,o.c[1]);break;case 118:Vr(t,o.b);break;case 90:n<3?Vr(t,Vgn(o)):n==3?Vr(t,Kgn(o)):Vr(t,Ygn(o.a));break;default:return!1}return!0}function Sxt(t,e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr,pi;if(_ue(e),w=u(St((!e.b&&(e.b=new Cn(br,e,4,7)),e.b),0),82),C=u(St((!e.c&&(e.c=new Cn(br,e,5,8)),e.c),0),82),d=Mo(w),k=Mo(C),h=(!e.a&&(e.a=new he(Zi,e,6,6)),e.a).i==0?null:u(St((!e.a&&(e.a=new he(Zi,e,6,6)),e.a),0),202),Se=u(Jn(t.a,d),10),zn=u(Jn(t.a,k),10),We=null,hr=null,Et(w,186)&&(ce=u(Jn(t.a,w),299),Et(ce,11)?We=u(ce,11):Et(ce,10)&&(Se=u(ce,10),We=u(Fe(Se.j,0),11))),Et(C,186)&&(Rn=u(Jn(t.a,C),299),Et(Rn,11)?hr=u(Rn,11):Et(Rn,10)&&(zn=u(Rn,10),hr=u(Fe(zn.j,0),11))),!Se||!zn)throw rt(new F9("The source or the target of edge "+e+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(Y=new zv,Lo(Y,e),Jt(Y,(se(),_i),e),Jt(Y,(Te(),_o),null),H=u(Q(r,Gc),21),Se==zn&&H.Fc((oo(),wS)),We||(Yt=(so(),eu),Qe=null,h&&H3(u(Q(Se,os),98))&&(Qe=new $e(h.j,h.k),FZt(Qe,rI(e)),fJt(Qe,n),Zm(k,d)&&(Yt=Ju,Li(Qe,Se.n))),We=Tle(Se,Qe,Yt,r)),hr||(Yt=(so(),Ju),pi=null,h&&H3(u(Q(zn,os),98))&&(pi=new $e(h.b,h.c),FZt(pi,rI(e)),fJt(pi,n)),hr=Tle(zn,pi,Yt,Fa(zn))),Da(Y,We),sa(Y,hr),(We.e.c.length>1||We.g.c.length>1||hr.e.c.length>1||hr.g.c.length>1)&&H.Fc((oo(),vS)),F=new er((!e.n&&(e.n=new he(qo,e,1,7)),e.n));F.e!=F.i.gc();)if(M=u(dr(F),137),!je(Re(qe(M,B2)))&&M.a)switch(tt=Oit(M),ue(Y.b,tt),u(Q(tt,Md),272).g){case 1:case 2:H.Fc((oo(),h7));break;case 0:H.Fc((oo(),l7)),Jt(tt,Md,(A1(),_7))}if(o=u(Q(r,ES),314),gt=u(Q(r,rV),315),s=o==(Yx(),wO)||gt==(a_(),lht),h&&(!h.a&&(h.a=new Ss(Hh,h,5)),h.a).i!=0&&s){for(Lt=sD(h),V=new Du,Bt=ei(Lt,0);Bt.b!=Bt.d.c;)_t=u(ti(Bt),8),ni(V,new yo(_t));Jt(Y,JTt,V)}return Y}function z5n(t){t.gb||(t.gb=!0,t.b=ic(t,0),es(t.b,18),Pi(t.b,19),t.a=ic(t,1),es(t.a,1),Pi(t.a,2),Pi(t.a,3),Pi(t.a,4),Pi(t.a,5),t.o=ic(t,2),es(t.o,8),es(t.o,9),Pi(t.o,10),Pi(t.o,11),Pi(t.o,12),Pi(t.o,13),Pi(t.o,14),Pi(t.o,15),Pi(t.o,16),Pi(t.o,17),Pi(t.o,18),Pi(t.o,19),Pi(t.o,20),Pi(t.o,21),Pi(t.o,22),Pi(t.o,23),To(t.o),To(t.o),To(t.o),To(t.o),To(t.o),To(t.o),To(t.o),To(t.o),To(t.o),To(t.o),t.p=ic(t,3),es(t.p,2),es(t.p,3),es(t.p,4),es(t.p,5),Pi(t.p,6),Pi(t.p,7),To(t.p),To(t.p),t.q=ic(t,4),es(t.q,8),t.v=ic(t,5),Pi(t.v,9),To(t.v),To(t.v),To(t.v),t.w=ic(t,6),es(t.w,2),es(t.w,3),es(t.w,4),Pi(t.w,5),t.B=ic(t,7),Pi(t.B,1),To(t.B),To(t.B),To(t.B),t.Q=ic(t,8),Pi(t.Q,0),To(t.Q),t.R=ic(t,9),es(t.R,1),t.S=ic(t,10),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),To(t.S),t.T=ic(t,11),Pi(t.T,10),Pi(t.T,11),Pi(t.T,12),Pi(t.T,13),Pi(t.T,14),To(t.T),To(t.T),t.U=ic(t,12),es(t.U,2),es(t.U,3),Pi(t.U,4),Pi(t.U,5),Pi(t.U,6),Pi(t.U,7),To(t.U),t.V=ic(t,13),Pi(t.V,10),t.W=ic(t,14),es(t.W,18),es(t.W,19),es(t.W,20),Pi(t.W,21),Pi(t.W,22),Pi(t.W,23),t.bb=ic(t,15),es(t.bb,10),es(t.bb,11),es(t.bb,12),es(t.bb,13),es(t.bb,14),es(t.bb,15),es(t.bb,16),Pi(t.bb,17),To(t.bb),To(t.bb),t.eb=ic(t,16),es(t.eb,2),es(t.eb,3),es(t.eb,4),es(t.eb,5),es(t.eb,6),es(t.eb,7),Pi(t.eb,8),Pi(t.eb,9),t.ab=ic(t,17),es(t.ab,0),es(t.ab,1),t.H=ic(t,18),Pi(t.H,0),Pi(t.H,1),Pi(t.H,2),Pi(t.H,3),Pi(t.H,4),Pi(t.H,5),To(t.H),t.db=ic(t,19),Pi(t.db,2),t.c=ai(t,20),t.d=ai(t,21),t.e=ai(t,22),t.f=ai(t,23),t.i=ai(t,24),t.g=ai(t,25),t.j=ai(t,26),t.k=ai(t,27),t.n=ai(t,28),t.r=ai(t,29),t.s=ai(t,30),t.t=ai(t,31),t.u=ai(t,32),t.fb=ai(t,33),t.A=ai(t,34),t.C=ai(t,35),t.D=ai(t,36),t.F=ai(t,37),t.G=ai(t,38),t.I=ai(t,39),t.J=ai(t,40),t.L=ai(t,41),t.M=ai(t,42),t.N=ai(t,43),t.O=ai(t,44),t.P=ai(t,45),t.X=ai(t,46),t.Y=ai(t,47),t.Z=ai(t,48),t.$=ai(t,49),t._=ai(t,50),t.cb=ai(t,51),t.K=ai(t,52))}function ci(){ci=Z;var t,e;VS=new Gi(U1e),C7=new Gi(W1e),LSt=(Qd(),Zht),H3e=new mn(gkt,LSt),$6=new mn(b6,null),G3e=new Gi(c8t),ISt=(cy(),ji(eft,ct(ot(nft,1),ae,291,0,[tft]))),BV=new mn(cH,ISt),UO=new mn(KD,(Fn(),!1)),DSt=(ao(),c0),jw=new mn(vkt,DSt),PSt=(q0(),gft),NSt=new mn(UD,PSt),RSt=new mn(gH,!1),jSt=($0(),HV),r5=new mn(oH,jSt),YSt=new Mv(12),q2=new mn(ww,YSt),RV=new mn($D,!1),$St=new mn(pct,!1),YO=new mn(F_,!1),tAt=(oa(),yb),US=new mn(Not,tAt),z6=new Gi(uH),zV=new Gi(jD),fft=new Gi(Hq),dft=new Gi(P_),zSt=new Du,i5=new mn(_kt,zSt),U3e=new mn(Lkt,!1),W3e=new mn(Mkt,!1),qSt=new M9,KO=new mn(Dkt,qSt),$V=new mn(fkt,!1),Q3e=new mn(K1e,1),new mn(Y1e,!0),de(0),new mn(X1e,de(100)),new mn(Q1e,!1),de(0),new mn(Z1e,de(4e3)),de(0),new mn(J1e,de(400)),new mn(tde,!1),new mn(ede,!1),new mn(nde,!0),new mn(rde,!1),MSt=(Az(),wft),V3e=new mn(o8t,MSt),Z3e=new mn(tkt,10),J3e=new mn(ekt,10),iAt=new mn(Aot,20),t4e=new mn(nkt,10),sAt=new mn(Oot,2),e4e=new mn(rkt,10),aAt=new mn(ikt,0),qV=new mn(okt,5),oAt=new mn(skt,1),cAt=new mn(akt,1),H2=new mn(ky,20),n4e=new mn(ckt,10),hAt=new mn(ukt,10),q6=new Gi(lkt),lAt=new cUt,uAt=new mn(Okt,lAt),Y3e=new Gi(gct),XSt=!1,K3e=new mn(dct,XSt),GSt=new Mv(5),HSt=new mn(wkt,GSt),VSt=(fy(),e=u(Hf(lo),9),new rh(e,u(uf(e,e.length),9),0)),s5=new mn(RE,VSt),ZSt=(c4(),mb),QSt=new mn(xkt,ZSt),oft=new Gi(kkt),cft=new Gi(Ekt),uft=new Gi(Tkt),aft=new Gi(Ckt),USt=(t=u(Hf(tA),9),new rh(t,u(uf(t,t.length),9),0)),z2=new mn(L4,USt),KSt=un((cl(),M7)),vb=new mn(v6,KSt),WSt=new $e(0,0),a5=new mn(w6,WSt),jV=new mn(fct,!1),OSt=(A1(),_7),ift=new mn(Skt,OSt),rft=new mn(Gq,!1),de(1),new mn(ide,null),JSt=new Gi(Ikt),lft=new Gi(Akt),rAt=(be(),Zo),o5=new mn(dkt,rAt),hl=new Gi(hkt),eAt=(Qu(),un(xb)),Ky=new mn(jE,eAt),hft=new mn(mkt,!1),nAt=new mn(ykt,!0),WO=new mn(pkt,!1),sft=new mn(bkt,!1),FSt=new mn(Lot,1),BSt=(tq(),bft),new mn(sde,BSt),X3e=!0}function se(){se=Z;var t,e;_i=new Gi(l6t),YTt=new Gi("coordinateOrigin"),Rlt=new Gi("processors"),KTt=new Os("compoundNode",(Fn(),!1)),kO=new Os("insideConnections",!1),JTt=new Gi("originalBendpoints"),t9t=new Gi("originalDummyNodePosition"),e9t=new Gi("originalLabelEdge"),TO=new Gi("representedLabels"),mS=new Gi("endLabels"),M6=new Gi("endLabel.origin"),D6=new Os("labelSide",(jl(),ZO)),W4=new Os("maxEdgeThickness",0),$1=new Os("reversed",!1),O6=new Gi(zfe),n1=new Os("longEdgeSource",null),Rh=new Os("longEdgeTarget",null),Py=new Os("longEdgeHasLabelDummies",!1),EO=new Os("longEdgeBeforeLabelDummy",!1),HG=new Os("edgeConstraint",(u2(),xlt)),Iw=new Gi("inLayerLayoutUnit"),O2=new Os("inLayerConstraint",(B0(),yO)),I6=new Os("inLayerSuccessorConstraint",new le),ZTt=new Os("inLayerSuccessorConstraintBetweenNonDummies",!1),Zu=new Gi("portDummy"),qG=new Os("crossingHint",de(0)),Gc=new Os("graphProperties",(e=u(Hf(Alt),9),new rh(e,u(uf(e,e.length),9),0))),oc=new Os("externalPortSide",(be(),Zo)),QTt=new Os("externalPortSize",new Ta),Olt=new Gi("externalPortReplacedDummies"),GG=new Gi("externalPortReplacedDummy"),Ny=new Os("externalPortConnections",(t=u(Hf(Xa),9),new rh(t,u(uf(t,t.length),9),0))),Dw=new Os(Ofe,0),WTt=new Gi("barycenterAssociates"),N6=new Gi("TopSideComments"),L6=new Gi("BottomSideComments"),zG=new Gi("CommentConnectionPort"),Plt=new Os("inputCollect",!1),Blt=new Os("outputCollect",!1),xO=new Os("cyclic",!1),XTt=new Gi("crossHierarchyMap"),$lt=new Gi("targetOffset"),new Os("splineLabelSize",new Ta),Y4=new Gi("spacings"),VG=new Os("partitionConstraint",!1),Lw=new Gi("breakingPoint.info"),i9t=new Gi("splines.survivingEdge"),N2=new Gi("splines.route.start"),X4=new Gi("splines.edgeChain"),r9t=new Gi("originalPortConstraints"),d7=new Gi("selfLoopHolder"),g7=new Gi("splines.nsPortY"),Tc=new Gi("modelOrder"),Flt=new Gi("longEdgeTargetNode"),Mw=new Os(g1e,!1),K4=new Os(g1e,!1),Nlt=new Gi("layerConstraints.hiddenNodes"),n9t=new Gi("layerConstraints.opposidePort"),jlt=new Gi("targetNode.modelOrder")}function Axt(){Axt=Z,p9t=(TI(),NG),Q2e=new mn(w6t,p9t),uve=new mn(m6t,(Fn(),!1)),x9t=(x$(),Dlt),gve=new mn(Kq,x9t),Lve=new mn(y6t,!1),Mve=new mn(x6t,!0),_2e=new mn(k6t,!1),L9t=(yI(),dht),Vve=new mn(E6t,L9t),de(1),Jve=new mn(T6t,de(7)),twe=new mn(C6t,!1),lve=new mn(_6t,!1),g9t=(v2(),mlt),X2e=new mn($ot,g9t),T9t=(Zz(),aht),Ave=new mn(GD,T9t),k9t=(hh(),CO),yve=new mn(S6t,k9t),de(-1),mve=new mn(A6t,de(-1)),de(-1),xve=new mn(L6t,de(-1)),de(-1),kve=new mn(zot,de(4)),de(-1),Tve=new mn(qot,de(2)),E9t=(w4(),hV),Sve=new mn(Hot,E9t),de(0),_ve=new mn(Got,de(0)),vve=new mn(Vot,de(vi)),d9t=(Yx(),S6),Y2e=new mn($_,d9t),F2e=new mn(M6t,!1),H2e=new mn(Uot,.1),W2e=new mn(Wot,!1),de(-1),V2e=new mn(I6t,de(-1)),de(-1),U2e=new mn(D6t,de(-1)),de(0),B2e=new mn(O6t,de(40)),f9t=(W8(),Mlt),z2e=new mn(Kot,f9t),h9t=mO,R2e=new mn(Yq,h9t),A9t=(a_(),AS),Gve=new mn(M4,A9t),Pve=new Gi(Xq),C9t=(bI(),FG),Ive=new mn(Yot,C9t),_9t=(nD(),BG),Ove=new mn(Xot,_9t),Rve=new mn(Qot,.3),$ve=new Gi(Zot),S9t=(sy(),lV),zve=new mn(Jot,S9t),w9t=(uz(),pht),nve=new mn(N6t,w9t),m9t=(lI(),bht),rve=new mn(P6t,m9t),y9t=(tE(),IS),ive=new mn(Qq,y9t),ave=new mn(Zq,.2),tve=new mn(tct,2),Yve=new mn(F6t,null),Qve=new mn(B6t,10),Xve=new mn(R6t,10),Zve=new mn(j6t,20),de(0),Uve=new mn($6t,de(0)),de(0),Wve=new mn(z6t,de(0)),de(0),Kve=new mn(q6t,de(0)),S2e=new mn(ect,!1),o9t=(gE(),bS),L2e=new mn(H6t,o9t),a9t=(D$(),vlt),A2e=new mn(G6t,a9t),fve=new mn(Jq,!1),de(0),hve=new mn(nct,de(16)),de(0),dve=new mn(rct,de(5)),D9t=(gz(),mht),ywe=new mn(Y0,D9t),ewe=new mn(tH,10),iwe=new mn(eH,1),I9t=(X$(),OG),hwe=new mn(z_,I9t),owe=new Gi(ict),M9t=de(1),de(0),uwe=new mn(sct,M9t),O9t=(oz(),wht),Twe=new mn(nH,O9t),xwe=new Gi(rH),bwe=new mn(iH,!0),gwe=new mn(sH,2),wwe=new mn(act,!0),v9t=(nq(),PG),J2e=new mn(V6t,v9t),b9t=(i6(),o7),Z2e=new mn(U6t,b9t),l9t=(j0(),gb),P2e=new mn(aH,l9t),N2e=new mn(W6t,!1),c9t=(ew(),$4),M2e=new mn(oct,c9t),u9t=(YC(),oht),O2e=new mn(K6t,u9t),I2e=new mn(cct,0),D2e=new mn(uct,0),bve=ylt,pve=wO,Eve=cV,Cve=cV,wve=sht,G2e=($0(),Zg),K2e=S6,q2e=S6,j2e=S6,$2e=Zg,Fve=LS,Bve=AS,Dve=AS,Nve=AS,jve=hht,Hve=LS,qve=LS,sve=(q0(),H6),ove=H6,cve=IS,eve=XO,nwe=x7,rwe=Vy,swe=x7,awe=Vy,fwe=x7,dwe=Vy,cwe=wlt,lwe=OG,Cwe=x7,_we=Vy,kwe=x7,Ewe=Vy,vwe=Vy,pwe=Vy,mwe=Vy}function ro(){ro=Z,U7t=new ws("DIRECTION_PREPROCESSOR",0),H7t=new ws("COMMENT_PREPROCESSOR",1),hS=new ws("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),rlt=new ws("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),hTt=new ws("PARTITION_PREPROCESSOR",4),gG=new ws("LABEL_DUMMY_INSERTER",5),TG=new ws("SELF_LOOP_PREPROCESSOR",6),r7=new ws("LAYER_CONSTRAINT_PREPROCESSOR",7),uTt=new ws("PARTITION_MIDPROCESSOR",8),tTt=new ws("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),oTt=new ws("NODE_PROMOTION",10),n7=new ws("LAYER_CONSTRAINT_POSTPROCESSOR",11),lTt=new ws("PARTITION_POSTPROCESSOR",12),Q7t=new ws("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),fTt=new ws("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),B7t=new ws("BREAKING_POINT_INSERTER",15),wG=new ws("LONG_EDGE_SPLITTER",16),ilt=new ws("PORT_SIDE_PROCESSOR",17),fG=new ws("INVERTED_PORT_PROCESSOR",18),xG=new ws("PORT_LIST_SORTER",19),gTt=new ws("SORT_BY_INPUT_ORDER_OF_MODEL",20),yG=new ws("NORTH_SOUTH_PORT_PREPROCESSOR",21),R7t=new ws("BREAKING_POINT_PROCESSOR",22),cTt=new ws(a1e,23),pTt=new ws(o1e,24),kG=new ws("SELF_LOOP_PORT_RESTORER",25),dTt=new ws("SINGLE_EDGE_GRAPH_WRAPPER",26),dG=new ws("IN_LAYER_CONSTRAINT_PROCESSOR",27),K7t=new ws("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",28),sTt=new ws("LABEL_AND_NODE_SIZE_PROCESSOR",29),iTt=new ws("INNERMOST_NODE_MARGIN_CALCULATOR",30),CG=new ws("SELF_LOOP_ROUTER",31),z7t=new ws("COMMENT_NODE_MARGIN_CALCULATOR",32),hG=new ws("END_LABEL_PREPROCESSOR",33),bG=new ws("LABEL_DUMMY_SWITCHER",34),$7t=new ws("CENTER_LABEL_MANAGEMENT_PROCESSOR",35),e7=new ws("LABEL_SIDE_SELECTOR",36),nTt=new ws("HYPEREDGE_DUMMY_MERGER",37),Z7t=new ws("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",38),aTt=new ws("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",39),fS=new ws("HIERARCHICAL_PORT_POSITION_PROCESSOR",40),G7t=new ws("CONSTRAINTS_POSTPROCESSOR",41),q7t=new ws("COMMENT_POSTPROCESSOR",42),rTt=new ws("HYPERNODE_PROCESSOR",43),J7t=new ws("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",44),vG=new ws("LONG_EDGE_JOINER",45),EG=new ws("SELF_LOOP_POSTPROCESSOR",46),j7t=new ws("BREAKING_POINT_REMOVER",47),mG=new ws("NORTH_SOUTH_PORT_POSTPROCESSOR",48),eTt=new ws("HORIZONTAL_COMPACTOR",49),pG=new ws("LABEL_DUMMY_REMOVER",50),Y7t=new ws("FINAL_SPLINE_BENDPOINTS_CALCULATOR",51),W7t=new ws("END_LABEL_SORTER",52),bO=new ws("REVERSED_EDGE_RESTORER",53),lG=new ws("END_LABEL_POSTPROCESSOR",54),X7t=new ws("HIERARCHICAL_NODE_RESIZER",55),V7t=new ws("DIRECTION_POSTPROCESSOR",56)}function q5n(t,e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe,Rn,zn,hr,pi,Rs,Xl,Kh,W1,hU,bN,dA,vN,P7,Nft,z5e,Pft,ip,Vw,F7,wN,mN,Y6,Fft,gA,q5e,MLt,Uw,pA,Bft,X6,bA,i3,vA,Rft,H5e;for(MLt=0,pi=e,Kh=0,bN=pi.length;Kh0&&(t.a[ip.p]=MLt++)}for(bA=0,Rs=n,W1=0,dA=Rs.length;W10;){for(ip=(Qn(mN.b>0),u(mN.a.Xb(mN.c=--mN.b),11)),wN=0,d=new S(ip.e);d.a0&&(ip.j==(be(),Nn)?(t.a[ip.p]=bA,++bA):(t.a[ip.p]=bA+vN+Nft,++Nft))}bA+=Nft}for(F7=new Cr,V=new A0,hr=e,Xl=0,hU=hr.length;Xlk.b&&(k.b=Y6)):ip.i.c==q5e&&(Y6k.c&&(k.c=Y6));for(D8(Y,0,Y.length,null),X6=Pt(Tr,Xr,25,Y.length,15,1),r=Pt(Tr,Xr,25,bA+1,15,1),gt=0;gt0;)Se%2>0&&(s+=Rft[Se+1]),Se=(Se-1)/2|0,++Rft[Se];for(Qe=Pt(pme,Ie,362,Y.length*2,0,1),Bt=0;Bt'?":hn(Bde,t)?"'(?<' or '(? toIndex: ",zxt=", toIndex: ",qxt="Index: ",Hxt=", Size: ",OE="org.eclipse.elk.alg.common",Oi={62:1},pfe="org.eclipse.elk.alg.common.compaction",bfe="Scanline/EventHandler",r0="org.eclipse.elk.alg.common.compaction.oned",vfe="CNode belongs to another CGroup.",wfe="ISpacingsHandler/1",bot="The ",vot=" instance has been finished already.",mfe="The direction ",yfe=" is not supported by the CGraph instance.",xfe="OneDimensionalCompactor",kfe="OneDimensionalCompactor/lambda$0$Type",Efe="Quadruplet",Tfe="ScanlineConstraintCalculator",Cfe="ScanlineConstraintCalculator/ConstraintsScanlineHandler",_fe="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",Sfe="ScanlineConstraintCalculator/Timestamp",Afe="ScanlineConstraintCalculator/lambda$0$Type",wd={169:1,45:1},wot="org.eclipse.elk.alg.common.compaction.options",Qo="org.eclipse.elk.core.data",Gxt="org.eclipse.elk.polyomino.traversalStrategy",Vxt="org.eclipse.elk.polyomino.lowLevelSort",Uxt="org.eclipse.elk.polyomino.highLevelSort",Wxt="org.eclipse.elk.polyomino.fill",Ih={130:1},mot="polyomino",D_="org.eclipse.elk.alg.common.networksimplex",i0={177:1,3:1,4:1},Lfe="org.eclipse.elk.alg.common.nodespacing",k2="org.eclipse.elk.alg.common.nodespacing.cellsystem",NE="CENTER",Mfe={212:1,326:1},Kxt={3:1,4:1,5:1,595:1},d6="LEFT",g6="RIGHT",Yxt="Vertical alignment cannot be null",Xxt="BOTTOM",Bq="org.eclipse.elk.alg.common.nodespacing.internal",O_="UNDEFINED",P1=.01,FD="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",Ife="LabelPlacer/lambda$0$Type",Dfe="LabelPlacer/lambda$1$Type",Ofe="portRatioOrPosition",PE="org.eclipse.elk.alg.common.overlaps",yot="DOWN",md="org.eclipse.elk.alg.common.polyomino",Rq="NORTH",xot="EAST",kot="SOUTH",Eot="WEST",jq="org.eclipse.elk.alg.common.polyomino.structures",Qxt="Direction",Tot="Grid is only of size ",Cot=". Requested point (",_ot=") is out of bounds.",$q=" Given center based coordinates were (",BD="org.eclipse.elk.graph.properties",Nfe="IPropertyHolder",Zxt={3:1,94:1,134:1},p6="org.eclipse.elk.alg.common.spore",Pfe="org.eclipse.elk.alg.common.utils",E2={209:1},S4="org.eclipse.elk.core",Ffe="Connected Components Compaction",Bfe="org.eclipse.elk.alg.disco",zq="org.eclipse.elk.alg.disco.graph",Sot="org.eclipse.elk.alg.disco.options",Jxt="CompactionStrategy",t6t="org.eclipse.elk.disco.componentCompaction.strategy",e6t="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",n6t="org.eclipse.elk.disco.debug.discoGraph",r6t="org.eclipse.elk.disco.debug.discoPolys",Rfe="componentCompaction",T2="org.eclipse.elk.disco",Aot="org.eclipse.elk.spacing.componentComponent",Lot="org.eclipse.elk.edge.thickness",b6="org.eclipse.elk.aspectRatio",ww="org.eclipse.elk.padding",A4="org.eclipse.elk.alg.disco.transform",Mot=1.5707963267948966,FE=17976931348623157e292,xy={3:1,4:1,5:1,192:1},i6t={3:1,6:1,4:1,5:1,106:1,120:1},s6t="org.eclipse.elk.alg.force",a6t="ComponentsProcessor",jfe="ComponentsProcessor/1",RD="org.eclipse.elk.alg.force.graph",$fe="Component Layout",o6t="org.eclipse.elk.alg.force.model",qq="org.eclipse.elk.force.model",c6t="org.eclipse.elk.force.iterations",u6t="org.eclipse.elk.force.repulsivePower",Iot="org.eclipse.elk.force.temperature",yd=.001,Dot="org.eclipse.elk.force.repulsion",N_="org.eclipse.elk.alg.force.options",BE=1.600000023841858,ql="org.eclipse.elk.force",jD="org.eclipse.elk.priority",ky="org.eclipse.elk.spacing.nodeNode",Oot="org.eclipse.elk.spacing.edgeLabel",Hq="org.eclipse.elk.randomSeed",P_="org.eclipse.elk.separateConnectedComponents",$D="org.eclipse.elk.interactive",Not="org.eclipse.elk.portConstraints",Gq="org.eclipse.elk.edgeLabels.inline",F_="org.eclipse.elk.omitNodeMicroLayout",v6="org.eclipse.elk.nodeSize.options",L4="org.eclipse.elk.nodeSize.constraints",RE="org.eclipse.elk.nodeLabels.placement",jE="org.eclipse.elk.portLabels.placement",l6t="origin",zfe="random",qfe="boundingBox.upLeft",Hfe="boundingBox.lowRight",h6t="org.eclipse.elk.stress.fixed",f6t="org.eclipse.elk.stress.desiredEdgeLength",d6t="org.eclipse.elk.stress.dimension",g6t="org.eclipse.elk.stress.epsilon",p6t="org.eclipse.elk.stress.iterationLimit",rb="org.eclipse.elk.stress",Gfe="ELK Stress",w6="org.eclipse.elk.nodeSize.minimum",Vq="org.eclipse.elk.alg.force.stress",Vfe="Layered layout",m6="org.eclipse.elk.alg.layered",zD="org.eclipse.elk.alg.layered.compaction.components",B_="org.eclipse.elk.alg.layered.compaction.oned",Uq="org.eclipse.elk.alg.layered.compaction.oned.algs",C2="org.eclipse.elk.alg.layered.compaction.recthull",xd="org.eclipse.elk.alg.layered.components",K0="NONE",xc={3:1,6:1,4:1,9:1,5:1,122:1},Ufe={3:1,6:1,4:1,5:1,141:1,106:1,120:1},Wq="org.eclipse.elk.alg.layered.compound",as={51:1},Jc="org.eclipse.elk.alg.layered.graph",Pot=" -> ",Wfe="Not supported by LGraph",b6t="Port side is undefined",Fot={3:1,6:1,4:1,5:1,474:1,141:1,106:1,120:1},zg={3:1,6:1,4:1,5:1,141:1,193:1,203:1,106:1,120:1},Kfe={3:1,6:1,4:1,5:1,141:1,1943:1,203:1,106:1,120:1},Yfe=`([{"' \r +`,Xfe=`)]}"' \r +`,Qfe="The given string contains parts that cannot be parsed as numbers.",qD="org.eclipse.elk.core.math",Zfe={3:1,4:1,142:1,207:1,414:1},Jfe={3:1,4:1,116:1,207:1,414:1},Vn="org.eclipse.elk.layered",qg="org.eclipse.elk.alg.layered.graph.transform",t1e="ElkGraphImporter",e1e="ElkGraphImporter/lambda$0$Type",n1e="ElkGraphImporter/lambda$1$Type",r1e="ElkGraphImporter/lambda$2$Type",i1e="ElkGraphImporter/lambda$4$Type",s1e="Node margin calculation",$n="org.eclipse.elk.alg.layered.intermediate",a1e="ONE_SIDED_GREEDY_SWITCH",o1e="TWO_SIDED_GREEDY_SWITCH",Bot="No implementation is available for the layout processor ",v6t="IntermediateProcessorStrategy",Rot="Node '",c1e="FIRST_SEPARATE",u1e="LAST_SEPARATE",l1e="Odd port side processing",Cs="org.eclipse.elk.alg.layered.intermediate.compaction",R_="org.eclipse.elk.alg.layered.intermediate.greedyswitch",s0="org.eclipse.elk.alg.layered.p3order.counting",HD={225:1},y6="org.eclipse.elk.alg.layered.intermediate.loops",Hl="org.eclipse.elk.alg.layered.intermediate.loops.ordering",ib="org.eclipse.elk.alg.layered.intermediate.loops.routing",j_="org.eclipse.elk.alg.layered.intermediate.preserveorder",kd="org.eclipse.elk.alg.layered.intermediate.wrapping",kc="org.eclipse.elk.alg.layered.options",jot="INTERACTIVE",h1e="DEPTH_FIRST",f1e="EDGE_LENGTH",d1e="SELF_LOOPS",g1e="firstTryWithInitialOrder",w6t="org.eclipse.elk.layered.directionCongruency",m6t="org.eclipse.elk.layered.feedbackEdges",Kq="org.eclipse.elk.layered.interactiveReferencePoint",y6t="org.eclipse.elk.layered.mergeEdges",x6t="org.eclipse.elk.layered.mergeHierarchyEdges",k6t="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",E6t="org.eclipse.elk.layered.portSortingStrategy",T6t="org.eclipse.elk.layered.thoroughness",C6t="org.eclipse.elk.layered.unnecessaryBendpoints",_6t="org.eclipse.elk.layered.generatePositionAndLayerIds",$ot="org.eclipse.elk.layered.cycleBreaking.strategy",GD="org.eclipse.elk.layered.layering.strategy",S6t="org.eclipse.elk.layered.layering.layerConstraint",A6t="org.eclipse.elk.layered.layering.layerChoiceConstraint",L6t="org.eclipse.elk.layered.layering.layerId",zot="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",qot="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",Hot="org.eclipse.elk.layered.layering.nodePromotion.strategy",Got="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",Vot="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",$_="org.eclipse.elk.layered.crossingMinimization.strategy",M6t="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",Uot="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",Wot="org.eclipse.elk.layered.crossingMinimization.semiInteractive",I6t="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",D6t="org.eclipse.elk.layered.crossingMinimization.positionId",O6t="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",Kot="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",Yq="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",M4="org.eclipse.elk.layered.nodePlacement.strategy",Xq="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",Yot="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",Xot="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",Qot="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",Zot="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",Jot="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",N6t="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",P6t="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",Qq="org.eclipse.elk.layered.edgeRouting.splines.mode",Zq="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",tct="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",F6t="org.eclipse.elk.layered.spacing.baseValue",B6t="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",R6t="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",j6t="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",$6t="org.eclipse.elk.layered.priority.direction",z6t="org.eclipse.elk.layered.priority.shortness",q6t="org.eclipse.elk.layered.priority.straightness",ect="org.eclipse.elk.layered.compaction.connectedComponents",H6t="org.eclipse.elk.layered.compaction.postCompaction.strategy",G6t="org.eclipse.elk.layered.compaction.postCompaction.constraints",Jq="org.eclipse.elk.layered.highDegreeNodes.treatment",nct="org.eclipse.elk.layered.highDegreeNodes.threshold",rct="org.eclipse.elk.layered.highDegreeNodes.treeHeight",Y0="org.eclipse.elk.layered.wrapping.strategy",tH="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",eH="org.eclipse.elk.layered.wrapping.correctionFactor",z_="org.eclipse.elk.layered.wrapping.cutting.strategy",ict="org.eclipse.elk.layered.wrapping.cutting.cuts",sct="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",nH="org.eclipse.elk.layered.wrapping.validify.strategy",rH="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",iH="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",sH="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",act="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",V6t="org.eclipse.elk.layered.edgeLabels.sideSelection",U6t="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",aH="org.eclipse.elk.layered.considerModelOrder.strategy",W6t="org.eclipse.elk.layered.considerModelOrder.noModelOrder",oct="org.eclipse.elk.layered.considerModelOrder.components",K6t="org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy",cct="org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence",uct="org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence",lct="layering",p1e="layering.minWidth",b1e="layering.nodePromotion",VD="crossingMinimization",oH="org.eclipse.elk.hierarchyHandling",v1e="crossingMinimization.greedySwitch",w1e="nodePlacement",m1e="nodePlacement.bk",y1e="edgeRouting",UD="org.eclipse.elk.edgeRouting",F1="spacing",Y6t="priority",X6t="compaction",x1e="compaction.postCompaction",k1e="Specifies whether and how post-process compaction is applied.",Q6t="highDegreeNodes",Z6t="wrapping",E1e="wrapping.cutting",T1e="wrapping.validify",J6t="wrapping.multiEdge",hct="edgeLabels",WD="considerModelOrder",tkt="org.eclipse.elk.spacing.commentComment",ekt="org.eclipse.elk.spacing.commentNode",nkt="org.eclipse.elk.spacing.edgeEdge",rkt="org.eclipse.elk.spacing.edgeNode",ikt="org.eclipse.elk.spacing.labelLabel",skt="org.eclipse.elk.spacing.labelPortHorizontal",akt="org.eclipse.elk.spacing.labelPortVertical",okt="org.eclipse.elk.spacing.labelNode",ckt="org.eclipse.elk.spacing.nodeSelfLoop",ukt="org.eclipse.elk.spacing.portPort",lkt="org.eclipse.elk.spacing.individual",hkt="org.eclipse.elk.port.borderOffset",fkt="org.eclipse.elk.noLayout",dkt="org.eclipse.elk.port.side",KD="org.eclipse.elk.debugMode",gkt="org.eclipse.elk.alignment",pkt="org.eclipse.elk.insideSelfLoops.activate",bkt="org.eclipse.elk.insideSelfLoops.yo",fct="org.eclipse.elk.nodeSize.fixedGraphSize",vkt="org.eclipse.elk.direction",wkt="org.eclipse.elk.nodeLabels.padding",mkt="org.eclipse.elk.portLabels.nextToPortIfPossible",ykt="org.eclipse.elk.portLabels.treatAsGroup",xkt="org.eclipse.elk.portAlignment.default",kkt="org.eclipse.elk.portAlignment.north",Ekt="org.eclipse.elk.portAlignment.south",Tkt="org.eclipse.elk.portAlignment.west",Ckt="org.eclipse.elk.portAlignment.east",cH="org.eclipse.elk.contentAlignment",_kt="org.eclipse.elk.junctionPoints",Skt="org.eclipse.elk.edgeLabels.placement",Akt="org.eclipse.elk.port.index",Lkt="org.eclipse.elk.commentBox",Mkt="org.eclipse.elk.hypernode",Ikt="org.eclipse.elk.port.anchor",dct="org.eclipse.elk.partitioning.activate",gct="org.eclipse.elk.partitioning.partition",uH="org.eclipse.elk.position",Dkt="org.eclipse.elk.margins",Okt="org.eclipse.elk.spacing.portsSurrounding",pct="org.eclipse.elk.interactiveLayout",Ec="org.eclipse.elk.core.util",Nkt={3:1,4:1,5:1,593:1},C1e="NETWORK_SIMPLEX",zc={123:1,51:1},lH="org.eclipse.elk.alg.layered.p1cycles",Ey="org.eclipse.elk.alg.layered.p2layers",Pkt={402:1,225:1},_1e={832:1,3:1,4:1},$u="org.eclipse.elk.alg.layered.p3order",uo="org.eclipse.elk.alg.layered.p4nodes",S1e={3:1,4:1,5:1,840:1},Ed=1e-5,sb="org.eclipse.elk.alg.layered.p4nodes.bk",bct="org.eclipse.elk.alg.layered.p5edges",Jf="org.eclipse.elk.alg.layered.p5edges.orthogonal",vct="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",wct=1e-6,Ty="org.eclipse.elk.alg.layered.p5edges.splines",mct=.09999999999999998,hH=1e-8,A1e=4.71238898038469,L1e=3.141592653589793,q_="org.eclipse.elk.alg.mrtree",H_="org.eclipse.elk.alg.mrtree.graph",x6="org.eclipse.elk.alg.mrtree.intermediate",M1e="Set neighbors in level",I1e="DESCENDANTS",Fkt="org.eclipse.elk.mrtree.weighting",Bkt="org.eclipse.elk.mrtree.searchOrder",fH="org.eclipse.elk.alg.mrtree.options",Hg="org.eclipse.elk.mrtree",D1e="org.eclipse.elk.tree",Rkt="org.eclipse.elk.alg.radial",I4=6.283185307179586,jkt=5e-324,O1e="org.eclipse.elk.alg.radial.intermediate",yct="org.eclipse.elk.alg.radial.intermediate.compaction",N1e={3:1,4:1,5:1,106:1},$kt="org.eclipse.elk.alg.radial.intermediate.optimization",xct="No implementation is available for the layout option ",G_="org.eclipse.elk.alg.radial.options",zkt="org.eclipse.elk.radial.orderId",qkt="org.eclipse.elk.radial.radius",kct="org.eclipse.elk.radial.compactor",Ect="org.eclipse.elk.radial.compactionStepSize",Hkt="org.eclipse.elk.radial.sorter",Gkt="org.eclipse.elk.radial.wedgeCriteria",Vkt="org.eclipse.elk.radial.optimizationCriteria",Td="org.eclipse.elk.radial",P1e="org.eclipse.elk.alg.radial.p1position.wedge",Ukt="org.eclipse.elk.alg.radial.sorting",F1e=5.497787143782138,B1e=3.9269908169872414,R1e=2.356194490192345,j1e="org.eclipse.elk.alg.rectpacking",dH="org.eclipse.elk.alg.rectpacking.firstiteration",Tct="org.eclipse.elk.alg.rectpacking.options",Wkt="org.eclipse.elk.rectpacking.optimizationGoal",Kkt="org.eclipse.elk.rectpacking.lastPlaceShift",Ykt="org.eclipse.elk.rectpacking.currentPosition",Xkt="org.eclipse.elk.rectpacking.desiredPosition",Qkt="org.eclipse.elk.rectpacking.onlyFirstIteration",Zkt="org.eclipse.elk.rectpacking.rowCompaction",Cct="org.eclipse.elk.rectpacking.expandToAspectRatio",Jkt="org.eclipse.elk.rectpacking.targetWidth",gH="org.eclipse.elk.expandNodes",Dh="org.eclipse.elk.rectpacking",YD="org.eclipse.elk.alg.rectpacking.util",pH="No implementation available for ",Cy="org.eclipse.elk.alg.spore",_y="org.eclipse.elk.alg.spore.options",mw="org.eclipse.elk.sporeCompaction",_ct="org.eclipse.elk.underlyingLayoutAlgorithm",t8t="org.eclipse.elk.processingOrder.treeConstruction",e8t="org.eclipse.elk.processingOrder.spanningTreeCostFunction",Sct="org.eclipse.elk.processingOrder.preferredRoot",Act="org.eclipse.elk.processingOrder.rootSelection",Lct="org.eclipse.elk.structure.structureExtractionStrategy",n8t="org.eclipse.elk.compaction.compactionStrategy",r8t="org.eclipse.elk.compaction.orthogonal",i8t="org.eclipse.elk.overlapRemoval.maxIterations",s8t="org.eclipse.elk.overlapRemoval.runScanline",Mct="processingOrder",$1e="overlapRemoval",$E="org.eclipse.elk.sporeOverlap",z1e="org.eclipse.elk.alg.spore.p1structure",Ict="org.eclipse.elk.alg.spore.p2processingorder",Dct="org.eclipse.elk.alg.spore.p3execution",q1e="Invalid index: ",zE="org.eclipse.elk.core.alg",D4={331:1},Sy={288:1},H1e="Make sure its type is registered with the ",a8t=" utility class.",qE="true",Oct="false",G1e="Couldn't clone property '",yw=.05,Oh="org.eclipse.elk.core.options",V1e=1.2999999523162842,xw="org.eclipse.elk.box",o8t="org.eclipse.elk.box.packingMode",U1e="org.eclipse.elk.algorithm",W1e="org.eclipse.elk.resolvedAlgorithm",c8t="org.eclipse.elk.bendPoints",W5n="org.eclipse.elk.labelManager",K1e="org.eclipse.elk.scaleFactor",Y1e="org.eclipse.elk.animate",X1e="org.eclipse.elk.animTimeFactor",Q1e="org.eclipse.elk.layoutAncestors",Z1e="org.eclipse.elk.maxAnimTime",J1e="org.eclipse.elk.minAnimTime",tde="org.eclipse.elk.progressBar",ede="org.eclipse.elk.validateGraph",nde="org.eclipse.elk.validateOptions",rde="org.eclipse.elk.zoomToFit",K5n="org.eclipse.elk.font.name",ide="org.eclipse.elk.font.size",sde="org.eclipse.elk.edge.type",ade="partitioning",ode="nodeLabels",bH="portAlignment",Nct="nodeSize",Pct="port",u8t="portLabels",cde="insideSelfLoops",V_="org.eclipse.elk.fixed",vH="org.eclipse.elk.random",ude="port must have a parent node to calculate the port side",lde="The edge needs to have exactly one edge section. Found: ",U_="org.eclipse.elk.core.util.adapters",dh="org.eclipse.emf.ecore",O4="org.eclipse.elk.graph",hde="EMapPropertyHolder",fde="ElkBendPoint",dde="ElkGraphElement",gde="ElkConnectableShape",l8t="ElkEdge",pde="ElkEdgeSection",bde="EModelElement",vde="ENamedElement",h8t="ElkLabel",f8t="ElkNode",d8t="ElkPort",wde={92:1,90:1},k6="org.eclipse.emf.common.notify.impl",ab="The feature '",W_="' is not a valid changeable feature",mde="Expecting null",Fct="' is not a valid feature",yde="The feature ID",xde=" is not a valid feature ID",dc=32768,kde={105:1,92:1,90:1,56:1,49:1,97:1},Mn="org.eclipse.emf.ecore.impl",_2="org.eclipse.elk.graph.impl",K_="Recursive containment not allowed for ",HE="The datatype '",kw="' is not a valid classifier",Bct="The value '",N4={190:1,3:1,4:1},Rct="The class '",GE="http://www.eclipse.org/elk/ElkGraph",wf=1024,g8t="property",Y_="value",jct="source",Ede="properties",Tde="identifier",$ct="height",zct="width",qct="parent",Hct="text",Gct="children",Cde="hierarchical",p8t="sources",Vct="targets",b8t="sections",wH="bendPoints",v8t="outgoingShape",w8t="incomingShape",m8t="outgoingSections",y8t="incomingSections",Ra="org.eclipse.emf.common.util",x8t="Severe implementation error in the Json to ElkGraph importer.",Cd="id",wa="org.eclipse.elk.graph.json",k8t="Unhandled parameter types: ",_de="startPoint",Sde="An edge must have at least one source and one target (edge id: '",VE="').",Ade="Referenced edge section does not exist: ",Lde=" (edge id: '",E8t="target",Mde="sourcePoint",Ide="targetPoint",mH="group",oi="name",Dde="connectableShape cannot be null",Ode="edge cannot be null",Uct="Passed edge is not 'simple'.",yH="org.eclipse.elk.graph.util",XD="The 'no duplicates' constraint is violated",Wct="targetIndex=",S2=", size=",Kct="sourceIndex=",_d={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1},Yct={3:1,4:1,20:1,28:1,52:1,14:1,47:1,15:1,54:1,67:1,63:1,58:1,588:1},xH="logging",Nde="measureExecutionTime",Pde="parser.parse.1",Fde="parser.parse.2",kH="parser.next.1",Xct="parser.next.2",Bde="parser.next.3",Rde="parser.next.4",A2="parser.factor.1",T8t="parser.factor.2",jde="parser.factor.3",$de="parser.factor.4",zde="parser.factor.5",qde="parser.factor.6",Hde="parser.atom.1",Gde="parser.atom.2",Vde="parser.atom.3",C8t="parser.atom.4",Qct="parser.atom.5",_8t="parser.cc.1",EH="parser.cc.2",Ude="parser.cc.3",Wde="parser.cc.5",S8t="parser.cc.6",A8t="parser.cc.7",Zct="parser.cc.8",Kde="parser.ope.1",Yde="parser.ope.2",Xde="parser.ope.3",Gg="parser.descape.1",Qde="parser.descape.2",Zde="parser.descape.3",Jde="parser.descape.4",t0e="parser.descape.5",gh="parser.process.1",e0e="parser.quantifier.1",n0e="parser.quantifier.2",r0e="parser.quantifier.3",i0e="parser.quantifier.4",L8t="parser.quantifier.5",s0e="org.eclipse.emf.common.notify",M8t={415:1,672:1},a0e={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1},QD={366:1,143:1},X_="index=",Jct={3:1,4:1,5:1,126:1},o0e={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,58:1},I8t={3:1,6:1,4:1,5:1,192:1},c0e={3:1,4:1,5:1,165:1,367:1},u0e=";/?:@&=+$,",l0e="invalid authority: ",h0e="EAnnotation",f0e="ETypedElement",d0e="EStructuralFeature",g0e="EAttribute",p0e="EClassifier",b0e="EEnumLiteral",v0e="EGenericType",w0e="EOperation",m0e="EParameter",y0e="EReference",x0e="ETypeParameter",$i="org.eclipse.emf.ecore.util",tut={76:1},D8t={3:1,20:1,14:1,15:1,58:1,589:1,76:1,69:1,95:1},k0e="org.eclipse.emf.ecore.util.FeatureMap$Entry",zu=8192,Ay=2048,Q_="byte",TH="char",Z_="double",J_="float",tS="int",eS="long",nS="short",E0e="java.lang.Object",P4={3:1,4:1,5:1,247:1},O8t={3:1,4:1,5:1,673:1},T0e={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,69:1},zo={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,69:1,95:1},ZD="mixed",Kr="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",Nh="kind",C0e={3:1,4:1,5:1,674:1},N8t={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1,76:1,69:1,95:1},CH={20:1,28:1,52:1,14:1,15:1,58:1,69:1},_H={47:1,125:1,279:1},SH={72:1,332:1},AH="The value of type '",LH="' must be of type '",F4=1316,Ph="http://www.eclipse.org/emf/2002/Ecore",MH=-32768,Ew="constraints",Sa="baseType",_0e="getEStructuralFeature",S0e="getFeatureID",rS="feature",A0e="getOperationID",P8t="operation",L0e="defaultValue",M0e="eTypeParameters",I0e="isInstance",D0e="getEEnumLiteral",O0e="eContainingClass",ii={55:1},N0e={3:1,4:1,5:1,119:1},P0e="org.eclipse.emf.ecore.resource",F0e={92:1,90:1,591:1,1935:1},eut="org.eclipse.emf.ecore.resource.impl",F8t="unspecified",JD="simple",IH="attribute",B0e="attributeWildcard",DH="element",nut="elementWildcard",t1="collapse",rut="itemType",OH="namespace",tO="##targetNamespace",Fh="whiteSpace",B8t="wildcards",L2="http://www.eclipse.org/emf/2003/XMLType",iut="##any",UE="uninitialized",eO="The multiplicity constraint is violated",NH="org.eclipse.emf.ecore.xml.type",R0e="ProcessingInstruction",j0e="SimpleAnyType",$0e="XMLTypeDocumentRoot",ys="org.eclipse.emf.ecore.xml.type.impl",nO="INF",z0e="processing",q0e="ENTITIES_._base",R8t="minLength",j8t="ENTITY",PH="NCName",H0e="IDREFS_._base",$8t="integer",sut="token",aut="pattern",G0e="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",z8t="\\i\\c*",V0e="[\\i-[:]][\\c-[:]]*",U0e="nonPositiveInteger",rO="maxInclusive",q8t="NMTOKEN",W0e="NMTOKENS_._base",H8t="nonNegativeInteger",iO="minInclusive",K0e="normalizedString",Y0e="unsignedByte",X0e="unsignedInt",Q0e="18446744073709551615",Z0e="unsignedShort",J0e="processingInstruction",Vg="org.eclipse.emf.ecore.xml.type.internal",WE=1114111,tge="Internal Error: shorthands: \\u",iS="xml:isDigit",out="xml:isWord",cut="xml:isSpace",uut="xml:isNameChar",lut="xml:isInitialNameChar",ege="09٠٩۰۹०९০৯੦੯૦૯୦୯௧௯౦౯೦೯൦൯๐๙໐໙༠༩",nge="AZazÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁΆΆΈΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆאתװײءغفيٱڷںھۀێېۓەەۥۦअहऽऽक़ॡঅঌএঐওনপরললশহড়ঢ়য়ৡৰৱਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹਖ਼ੜਫ਼ਫ਼ੲੴઅઋઍઍએઑઓનપરલળવહઽઽૠૠଅଌଏଐଓନପରଲଳଶହଽଽଡ଼ଢ଼ୟୡஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹఅఌఎఐఒనపళవహౠౡಅಌಎಐಒನಪಳವಹೞೞೠೡഅഌഎഐഒനപഹൠൡกฮะะาำเๅກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະະາຳຽຽເໄཀཇཉཀྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼΩΩKÅ℮℮ↀↂ〇〇〡〩ぁゔァヺㄅㄬ一龥가힣",rge="Private Use",hut="ASSIGNED",fut="\0€ÿĀſƀɏɐʯʰ˿̀ͯͰϿЀӿ԰֏֐׿؀ۿ܀ݏހ޿ऀॿঀ৿਀੿઀૿଀୿஀௿ఀ౿ಀ೿ഀൿ඀෿฀๿຀໿ༀ࿿က႟Ⴀჿᄀᇿሀ፿Ꭰ᏿᐀ᙿ ᚟ᚠ᛿ក៿᠀᢯Ḁỿἀ῿ ⁰₟₠⃏⃐⃿℀⅏⅐↏←⇿∀⋿⌀⏿␀␿⑀⑟①⓿─╿▀▟■◿☀⛿✀➿⠀⣿⺀⻿⼀⿟⿰⿿ 〿぀ゟ゠ヿ㄀ㄯ㄰㆏㆐㆟ㆠㆿ㈀㋿㌀㏿㐀䶵一鿿ꀀ꒏꒐꓏가힣豈﫿ffﭏﭐ﷿︠︯︰﹏﹐﹯ﹰ﻾\uFEFF\uFEFF＀￯",G8t="UNASSIGNED",KE={3:1,117:1},ige="org.eclipse.emf.ecore.xml.type.util",FH={3:1,4:1,5:1,368:1},V8t="org.eclipse.xtext.xbase.lib",sge="Cannot add elements to a Range",age="Cannot set elements in a Range",oge="Cannot remove elements from a Range",BH="locale",RH="default",jH="user.agent",l,$H,dut;b.goog=b.goog||{},b.goog.global=b.goog.global||b,y0n(),I(1,null,{},_),l.Fb=function(e){return nUt(this,e)},l.Gb=function(){return this.gm},l.Hb=function(){return Iv(this)},l.Ib=function(){var e;return Ap(sl(this))+"@"+(e=Hi(this)>>>0,e.toString(16))},l.equals=function(t){return this.Fb(t)},l.hashCode=function(){return this.Hb()},l.toString=function(){return this.Ib()};var cge,uge,lge;I(290,1,{290:1,2026:1},kyt),l.le=function(e){var n;return n=new kyt,n.i=4,e>1?n.c=mQt(this,e-1):n.c=this,n},l.me=function(){return L0(this),this.b},l.ne=function(){return Ap(this)},l.oe=function(){return L0(this),this.k},l.pe=function(){return(this.i&4)!=0},l.qe=function(){return(this.i&1)!=0},l.Ib=function(){return Bmt(this)},l.i=0;var Xn=P(Xo,"Object",1),U8t=P(Xo,"Class",290);I(1998,1,_D),P(SD,"Optional",1998),I(1170,1998,_D,L),l.Fb=function(e){return e===this},l.Hb=function(){return 2040732332},l.Ib=function(){return"Optional.absent()"},l.Jb=function(e){return Ar(e),I9(),gut};var gut;P(SD,"Absent",1170),I(628,1,{},aet),P(SD,"Joiner",628);var Y5n=Yi(SD,"Predicate");I(582,1,{169:1,582:1,3:1,45:1},b9),l.Mb=function(e){return sre(this,e)},l.Lb=function(e){return sre(this,e)},l.Fb=function(e){var n;return Et(e,582)?(n=u(e,582),p5t(this.a,n.a)):!1},l.Hb=function(){return Syt(this.a)+306654252},l.Ib=function(){return agn(this.a)},P(SD,"Predicates/AndPredicate",582),I(408,1998,{408:1,3:1},jk),l.Fb=function(e){var n;return Et(e,408)?(n=u(e,408),yi(this.a,n.a)):!1},l.Hb=function(){return 1502476572+Hi(this.a)},l.Ib=function(){return Vhe+this.a+")"},l.Jb=function(e){return new jk(r$(e.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},P(SD,"Present",408),I(198,1,SE),l.Nb=function(e){pa(this,e)},l.Qb=function(){Uqt()},P(Ye,"UnmodifiableIterator",198),I(1978,198,AE),l.Qb=function(){Uqt()},l.Rb=function(e){throw rt(new Or)},l.Wb=function(e){throw rt(new Or)},P(Ye,"UnmodifiableListIterator",1978),I(386,1978,AE),l.Ob=function(){return this.c0},l.Pb=function(){if(this.c>=this.d)throw rt(new lc);return this.Xb(this.c++)},l.Tb=function(){return this.c},l.Ub=function(){if(this.c<=0)throw rt(new lc);return this.Xb(--this.c)},l.Vb=function(){return this.c-1},l.c=0,l.d=0,P(Ye,"AbstractIndexedListIterator",386),I(699,198,SE),l.Ob=function(){return sit(this)},l.Pb=function(){return Imt(this)},l.e=1,P(Ye,"AbstractIterator",699),I(1986,1,{224:1}),l.Zb=function(){var e;return e=this.f,e||(this.f=this.ac())},l.Fb=function(e){return Eit(this,e)},l.Hb=function(){return Hi(this.Zb())},l.dc=function(){return this.gc()==0},l.ec=function(){return Px(this)},l.Ib=function(){return $o(this.Zb())},P(Ye,"AbstractMultimap",1986),I(726,1986,y2),l.$b=function(){Q$(this)},l._b=function(e){return hHt(this,e)},l.ac=function(){return new n8(this,this.c)},l.ic=function(e){return this.hc()},l.bc=function(){return new W3(this,this.c)},l.jc=function(){return this.mc(this.hc())},l.kc=function(){return new Lqt(this)},l.lc=function(){return Mst(this.c.vc().Nc(),new B,64,this.d)},l.cc=function(e){return Ai(this,e)},l.fc=function(e){return $I(this,e)},l.gc=function(){return this.d},l.mc=function(e){return vn(),new T(e)},l.nc=function(){return new Aqt(this)},l.oc=function(){return Mst(this.c.Cc().Nc(),new N,64,this.d)},l.pc=function(e,n){return new I$(this,e,n,null)},l.d=0,P(Ye,"AbstractMapBasedMultimap",726),I(1631,726,y2),l.hc=function(){return new Yc(this.a)},l.jc=function(){return vn(),vn(),io},l.cc=function(e){return u(Ai(this,e),15)},l.fc=function(e){return u($I(this,e),15)},l.Zb=function(){return $x(this)},l.Fb=function(e){return Eit(this,e)},l.qc=function(e){return u(Ai(this,e),15)},l.rc=function(e){return u($I(this,e),15)},l.mc=function(e){return JM(u(e,15))},l.pc=function(e,n){return TZt(this,e,u(n,15),null)},P(Ye,"AbstractListMultimap",1631),I(732,1,ra),l.Nb=function(e){pa(this,e)},l.Ob=function(){return this.c.Ob()||this.e.Ob()},l.Pb=function(){var e;return this.e.Ob()||(e=u(this.c.Pb(),42),this.b=e.cd(),this.a=u(e.dd(),14),this.e=this.a.Kc()),this.sc(this.b,this.e.Pb())},l.Qb=function(){this.e.Qb(),this.a.dc()&&this.c.Qb(),--this.d.d},P(Ye,"AbstractMapBasedMultimap/Itr",732),I(1099,732,ra,Aqt),l.sc=function(e,n){return n},P(Ye,"AbstractMapBasedMultimap/1",1099),I(1100,1,{},N),l.Kb=function(e){return u(e,14).Nc()},P(Ye,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1100),I(1101,732,ra,Lqt),l.sc=function(e,n){return new _v(e,n)},P(Ye,"AbstractMapBasedMultimap/2",1101);var W8t=Yi(pr,"Map");I(1967,1,bw),l.wc=function(e){UC(this,e)},l.yc=function(e,n,r){return $it(this,e,n,r)},l.$b=function(){this.vc().$b()},l.tc=function(e){return dst(this,e)},l._b=function(e){return!!w4t(this,e,!1)},l.uc=function(e){var n,r,s;for(r=this.vc().Kc();r.Ob();)if(n=u(r.Pb(),42),s=n.dd(),Gt(e)===Gt(s)||e!=null&&yi(e,s))return!0;return!1},l.Fb=function(e){var n,r,s;if(e===this)return!0;if(!Et(e,83)||(s=u(e,83),this.gc()!=s.gc()))return!1;for(r=s.vc().Kc();r.Ob();)if(n=u(r.Pb(),42),!this.tc(n))return!1;return!0},l.xc=function(e){return ec(w4t(this,e,!1))},l.Hb=function(){return vyt(this.vc())},l.dc=function(){return this.gc()==0},l.ec=function(){return new Tm(this)},l.zc=function(e,n){throw rt(new yg("Put not supported on this map"))},l.Ac=function(e){VC(this,e)},l.Bc=function(e){return ec(w4t(this,e,!0))},l.gc=function(){return this.vc().gc()},l.Ib=function(){return oae(this)},l.Cc=function(){return new b1(this)},P(pr,"AbstractMap",1967),I(1987,1967,bw),l.bc=function(){return new TR(this)},l.vc=function(){return EYt(this)},l.ec=function(){var e;return e=this.g,e||(this.g=this.bc())},l.Cc=function(){var e;return e=this.i,e||(this.i=new rGt(this))},P(Ye,"Maps/ViewCachingAbstractMap",1987),I(389,1987,bw,n8),l.xc=function(e){return qan(this,e)},l.Bc=function(e){return iun(this,e)},l.$b=function(){this.d==this.e.c?this.e.$b():Oj(new jvt(this))},l._b=function(e){return Rre(this.d,e)},l.Ec=function(){return new $k(this)},l.Dc=function(){return this.Ec()},l.Fb=function(e){return this===e||yi(this.d,e)},l.Hb=function(){return Hi(this.d)},l.ec=function(){return this.e.ec()},l.gc=function(){return this.d.gc()},l.Ib=function(){return $o(this.d)},P(Ye,"AbstractMapBasedMultimap/AsMap",389);var B1=Yi(Xo,"Iterable");I(28,1,wy),l.Jc=function(e){va(this,e)},l.Lc=function(){return this.Oc()},l.Nc=function(){return new _n(this,0)},l.Oc=function(){return new Tn(null,this.Nc())},l.Fc=function(e){throw rt(new yg("Add not supported on this collection"))},l.Gc=function(e){return Ua(this,e)},l.$b=function(){Twt(this)},l.Hc=function(e){return ry(this,e,!1)},l.Ic=function(e){return II(this,e)},l.dc=function(){return this.gc()==0},l.Mc=function(e){return ry(this,e,!0)},l.Pc=function(){return Zvt(this)},l.Qc=function(e){return XI(this,e)},l.Ib=function(){return Qp(this)},P(pr,"AbstractCollection",28);var Bh=Yi(pr,"Set");I(N1,28,ju),l.Nc=function(){return new _n(this,1)},l.Fb=function(e){return Iie(this,e)},l.Hb=function(){return vyt(this)},P(pr,"AbstractSet",N1),I(1970,N1,ju),P(Ye,"Sets/ImprovedAbstractSet",1970),I(1971,1970,ju),l.$b=function(){this.Rc().$b()},l.Hc=function(e){return fie(this,e)},l.dc=function(){return this.Rc().dc()},l.Mc=function(e){var n;return this.Hc(e)?(n=u(e,42),this.Rc().ec().Mc(n.cd())):!1},l.gc=function(){return this.Rc().gc()},P(Ye,"Maps/EntrySet",1971),I(1097,1971,ju,$k),l.Hc=function(e){return Uyt(this.a.d.vc(),e)},l.Kc=function(){return new jvt(this.a)},l.Rc=function(){return this.a},l.Mc=function(e){var n;return Uyt(this.a.d.vc(),e)?(n=u(e,42),Asn(this.a.e,n.cd()),!0):!1},l.Nc=function(){return VM(this.a.d.vc().Nc(),new VB(this.a))},P(Ye,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1097),I(1098,1,{},VB),l.Kb=function(e){return dJt(this.a,u(e,42))},P(Ye,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1098),I(730,1,ra,jvt),l.Nb=function(e){pa(this,e)},l.Pb=function(){var e;return e=u(this.b.Pb(),42),this.a=u(e.dd(),14),dJt(this.c,e)},l.Ob=function(){return this.b.Ob()},l.Qb=function(){n4(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},P(Ye,"AbstractMapBasedMultimap/AsMap/AsMapIterator",730),I(532,1970,ju,TR),l.$b=function(){this.b.$b()},l.Hc=function(e){return this.b._b(e)},l.Jc=function(e){Ar(e),this.b.wc(new gtt(e))},l.dc=function(){return this.b.dc()},l.Kc=function(){return new D9(this.b.vc().Kc())},l.Mc=function(e){return this.b._b(e)?(this.b.Bc(e),!0):!1},l.gc=function(){return this.b.gc()},P(Ye,"Maps/KeySet",532),I(318,532,ju,W3),l.$b=function(){var e;Oj((e=this.b.vc().Kc(),new hbt(this,e)))},l.Ic=function(e){return this.b.ec().Ic(e)},l.Fb=function(e){return this===e||yi(this.b.ec(),e)},l.Hb=function(){return Hi(this.b.ec())},l.Kc=function(){var e;return e=this.b.vc().Kc(),new hbt(this,e)},l.Mc=function(e){var n,r;return r=0,n=u(this.b.Bc(e),14),n&&(r=n.gc(),n.$b(),this.a.d-=r),r>0},l.Nc=function(){return this.b.ec().Nc()},P(Ye,"AbstractMapBasedMultimap/KeySet",318),I(731,1,ra,hbt),l.Nb=function(e){pa(this,e)},l.Ob=function(){return this.c.Ob()},l.Pb=function(){return this.a=u(this.c.Pb(),42),this.a.cd()},l.Qb=function(){var e;n4(!!this.a),e=u(this.a.dd(),14),this.c.Qb(),this.b.a.d-=e.gc(),e.$b(),this.a=null},P(Ye,"AbstractMapBasedMultimap/KeySet/1",731),I(491,389,{83:1,161:1},RM),l.bc=function(){return this.Sc()},l.ec=function(){return this.Tc()},l.Sc=function(){return new gM(this.c,this.Uc())},l.Tc=function(){var e;return e=this.b,e||(this.b=this.Sc())},l.Uc=function(){return u(this.d,161)},P(Ye,"AbstractMapBasedMultimap/SortedAsMap",491),I(542,491,Uhe,yj),l.bc=function(){return new e8(this.a,u(u(this.d,161),171))},l.Sc=function(){return new e8(this.a,u(u(this.d,161),171))},l.ec=function(){var e;return e=this.b,u(e||(this.b=new e8(this.a,u(u(this.d,161),171))),271)},l.Tc=function(){var e;return e=this.b,u(e||(this.b=new e8(this.a,u(u(this.d,161),171))),271)},l.Uc=function(){return u(u(this.d,161),171)},P(Ye,"AbstractMapBasedMultimap/NavigableAsMap",542),I(490,318,Whe,gM),l.Nc=function(){return this.b.ec().Nc()},P(Ye,"AbstractMapBasedMultimap/SortedKeySet",490),I(388,490,Mxt,e8),P(Ye,"AbstractMapBasedMultimap/NavigableKeySet",388),I(541,28,wy,I$),l.Fc=function(e){var n,r;return al(this),r=this.d.dc(),n=this.d.Fc(e),n&&(++this.f.d,r&&qM(this)),n},l.Gc=function(e){var n,r,s;return e.dc()?!1:(s=(al(this),this.d.gc()),n=this.d.Gc(e),n&&(r=this.d.gc(),this.f.d+=r-s,s==0&&qM(this)),n)},l.$b=function(){var e;e=(al(this),this.d.gc()),e!=0&&(this.d.$b(),this.f.d-=e,Rj(this))},l.Hc=function(e){return al(this),this.d.Hc(e)},l.Ic=function(e){return al(this),this.d.Ic(e)},l.Fb=function(e){return e===this?!0:(al(this),yi(this.d,e))},l.Hb=function(){return al(this),Hi(this.d)},l.Kc=function(){return al(this),new Cvt(this)},l.Mc=function(e){var n;return al(this),n=this.d.Mc(e),n&&(--this.f.d,Rj(this)),n},l.gc=function(){return zVt(this)},l.Nc=function(){return al(this),this.d.Nc()},l.Ib=function(){return al(this),$o(this.d)},P(Ye,"AbstractMapBasedMultimap/WrappedCollection",541);var ph=Yi(pr,"List");I(728,541,{20:1,28:1,14:1,15:1},twt),l.ad=function(e){e4(this,e)},l.Nc=function(){return al(this),this.d.Nc()},l.Vc=function(e,n){var r;al(this),r=this.d.dc(),u(this.d,15).Vc(e,n),++this.a.d,r&&qM(this)},l.Wc=function(e,n){var r,s,o;return n.dc()?!1:(o=(al(this),this.d.gc()),r=u(this.d,15).Wc(e,n),r&&(s=this.d.gc(),this.a.d+=s-o,o==0&&qM(this)),r)},l.Xb=function(e){return al(this),u(this.d,15).Xb(e)},l.Xc=function(e){return al(this),u(this.d,15).Xc(e)},l.Yc=function(){return al(this),new yUt(this)},l.Zc=function(e){return al(this),new OXt(this,e)},l.$c=function(e){var n;return al(this),n=u(this.d,15).$c(e),--this.a.d,Rj(this),n},l._c=function(e,n){return al(this),u(this.d,15)._c(e,n)},l.bd=function(e,n){return al(this),TZt(this.a,this.e,u(this.d,15).bd(e,n),this.b?this.b:this)},P(Ye,"AbstractMapBasedMultimap/WrappedList",728),I(1096,728,{20:1,28:1,14:1,15:1,54:1},lWt),P(Ye,"AbstractMapBasedMultimap/RandomAccessWrappedList",1096),I(620,1,ra,Cvt),l.Nb=function(e){pa(this,e)},l.Ob=function(){return E8(this),this.b.Ob()},l.Pb=function(){return E8(this),this.b.Pb()},l.Qb=function(){WUt(this)},P(Ye,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",620),I(729,620,Jd,yUt,OXt),l.Qb=function(){WUt(this)},l.Rb=function(e){var n;n=zVt(this.a)==0,(E8(this),u(this.b,125)).Rb(e),++this.a.a.d,n&&qM(this.a)},l.Sb=function(){return(E8(this),u(this.b,125)).Sb()},l.Tb=function(){return(E8(this),u(this.b,125)).Tb()},l.Ub=function(){return(E8(this),u(this.b,125)).Ub()},l.Vb=function(){return(E8(this),u(this.b,125)).Vb()},l.Wb=function(e){(E8(this),u(this.b,125)).Wb(e)},P(Ye,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",729),I(727,541,Whe,U2t),l.Nc=function(){return al(this),this.d.Nc()},P(Ye,"AbstractMapBasedMultimap/WrappedSortedSet",727),I(1095,727,Mxt,fUt),P(Ye,"AbstractMapBasedMultimap/WrappedNavigableSet",1095),I(1094,541,ju,TWt),l.Nc=function(){return al(this),this.d.Nc()},P(Ye,"AbstractMapBasedMultimap/WrappedSet",1094),I(1103,1,{},B),l.Kb=function(e){return Nsn(u(e,42))},P(Ye,"AbstractMapBasedMultimap/lambda$1$Type",1103),I(1102,1,{},ett),l.Kb=function(e){return new _v(this.a,e)},P(Ye,"AbstractMapBasedMultimap/lambda$2$Type",1102);var M2=Yi(pr,"Map/Entry");I(345,1,Mq),l.Fb=function(e){var n;return Et(e,42)?(n=u(e,42),fd(this.cd(),n.cd())&&fd(this.dd(),n.dd())):!1},l.Hb=function(){var e,n;return e=this.cd(),n=this.dd(),(e==null?0:Hi(e))^(n==null?0:Hi(n))},l.ed=function(e){throw rt(new Or)},l.Ib=function(){return this.cd()+"="+this.dd()},P(Ye,Khe,345),I(1988,28,wy),l.$b=function(){this.fd().$b()},l.Hc=function(e){var n;return Et(e,42)?(n=u(e,42),gin(this.fd(),n.cd(),n.dd())):!1},l.Mc=function(e){var n;return Et(e,42)?(n=u(e,42),iZt(this.fd(),n.cd(),n.dd())):!1},l.gc=function(){return this.fd().d},P(Ye,"Multimaps/Entries",1988),I(733,1988,wy,QL),l.Kc=function(){return this.a.kc()},l.fd=function(){return this.a},l.Nc=function(){return this.a.lc()},P(Ye,"AbstractMultimap/Entries",733),I(734,733,ju,zpt),l.Nc=function(){return this.a.lc()},l.Fb=function(e){return F4t(this,e)},l.Hb=function(){return sne(this)},P(Ye,"AbstractMultimap/EntrySet",734),I(735,28,wy,M3),l.$b=function(){this.a.$b()},l.Hc=function(e){return Zcn(this.a,e)},l.Kc=function(){return this.a.nc()},l.gc=function(){return this.a.d},l.Nc=function(){return this.a.oc()},P(Ye,"AbstractMultimap/Values",735),I(1989,28,{835:1,20:1,28:1,14:1}),l.Jc=function(e){Ar(e),Y3(this).Jc(new dtt(e))},l.Nc=function(){var e;return e=Y3(this).Nc(),Mst(e,new wt,64|e.qd()&1296,this.a.d)},l.Fc=function(e){return Xpt(),!0},l.Gc=function(e){return Ar(this),Ar(e),Et(e,543)?min(u(e,835)):!e.dc()&&Xrt(this,e.Kc())},l.Hc=function(e){var n;return n=u(ny($x(this.a),e),14),(n?n.gc():0)>0},l.Fb=function(e){return fbn(this,e)},l.Hb=function(){return Hi(Y3(this))},l.dc=function(){return Y3(this).dc()},l.Mc=function(e){return Toe(this,e,1)>0},l.Ib=function(){return $o(Y3(this))},P(Ye,"AbstractMultiset",1989),I(1991,1970,ju),l.$b=function(){Q$(this.a.a)},l.Hc=function(e){var n,r;return Et(e,492)?(r=u(e,416),u(r.a.dd(),14).gc()<=0?!1:(n=NQt(this.a,r.a.cd()),n==u(r.a.dd(),14).gc())):!1},l.Mc=function(e){var n,r,s,o;return Et(e,492)&&(r=u(e,416),n=r.a.cd(),s=u(r.a.dd(),14).gc(),s!=0)?(o=this.a,tpn(o,n,s)):!1},P(Ye,"Multisets/EntrySet",1991),I(1109,1991,ju,ZL),l.Kc=function(){return new Bqt(EYt($x(this.a.a)).Kc())},l.gc=function(){return $x(this.a.a).gc()},P(Ye,"AbstractMultiset/EntrySet",1109),I(619,726,y2),l.hc=function(){return this.gd()},l.jc=function(){return this.hd()},l.cc=function(e){return this.jd(e)},l.fc=function(e){return this.kd(e)},l.Zb=function(){var e;return e=this.f,e||(this.f=this.ac())},l.hd=function(){return vn(),vn(),UH},l.Fb=function(e){return Eit(this,e)},l.jd=function(e){return u(Ai(this,e),21)},l.kd=function(e){return u($I(this,e),21)},l.mc=function(e){return vn(),new Qk(u(e,21))},l.pc=function(e,n){return new TWt(this,e,u(n,21))},P(Ye,"AbstractSetMultimap",619),I(1657,619,y2),l.hc=function(){return new Lp(this.b)},l.gd=function(){return new Lp(this.b)},l.jc=function(){return pwt(new Lp(this.b))},l.hd=function(){return pwt(new Lp(this.b))},l.cc=function(e){return u(u(Ai(this,e),21),84)},l.jd=function(e){return u(u(Ai(this,e),21),84)},l.fc=function(e){return u(u($I(this,e),21),84)},l.kd=function(e){return u(u($I(this,e),21),84)},l.mc=function(e){return Et(e,271)?pwt(u(e,271)):(vn(),new C2t(u(e,84)))},l.Zb=function(){var e;return e=this.f,e||(this.f=Et(this.c,171)?new yj(this,u(this.c,171)):Et(this.c,161)?new RM(this,u(this.c,161)):new n8(this,this.c))},l.pc=function(e,n){return Et(n,271)?new fUt(this,e,u(n,271)):new U2t(this,e,u(n,84))},P(Ye,"AbstractSortedSetMultimap",1657),I(1658,1657,y2),l.Zb=function(){var e;return e=this.f,u(u(e||(this.f=Et(this.c,171)?new yj(this,u(this.c,171)):Et(this.c,161)?new RM(this,u(this.c,161)):new n8(this,this.c)),161),171)},l.ec=function(){var e;return e=this.i,u(u(e||(this.i=Et(this.c,171)?new e8(this,u(this.c,171)):Et(this.c,161)?new gM(this,u(this.c,161)):new W3(this,this.c)),84),271)},l.bc=function(){return Et(this.c,171)?new e8(this,u(this.c,171)):Et(this.c,161)?new gM(this,u(this.c,161)):new W3(this,this.c)},P(Ye,"AbstractSortedKeySortedSetMultimap",1658),I(2010,1,{1947:1}),l.Fb=function(e){return H1n(this,e)},l.Hb=function(){var e;return vyt((e=this.g,e||(this.g=new v9(this))))},l.Ib=function(){var e;return oae((e=this.f,e||(this.f=new v2t(this))))},P(Ye,"AbstractTable",2010),I(665,N1,ju,v9),l.$b=function(){Wqt()},l.Hc=function(e){var n,r;return Et(e,468)?(n=u(e,682),r=u(ny(UYt(this.a),Dp(n.c.e,n.b)),83),!!r&&Uyt(r.vc(),new _v(Dp(n.c.c,n.a),Wx(n.c,n.b,n.a)))):!1},l.Kc=function(){return Snn(this.a)},l.Mc=function(e){var n,r;return Et(e,468)?(n=u(e,682),r=u(ny(UYt(this.a),Dp(n.c.e,n.b)),83),!!r&&Cun(r.vc(),new _v(Dp(n.c.c,n.a),Wx(n.c,n.b,n.a)))):!1},l.gc=function(){return iYt(this.a)},l.Nc=function(){return kin(this.a)},P(Ye,"AbstractTable/CellSet",665),I(1928,28,wy,ntt),l.$b=function(){Wqt()},l.Hc=function(e){return Ndn(this.a,e)},l.Kc=function(){return Ann(this.a)},l.gc=function(){return iYt(this.a)},l.Nc=function(){return oZt(this.a)},P(Ye,"AbstractTable/Values",1928),I(1632,1631,y2),P(Ye,"ArrayListMultimapGwtSerializationDependencies",1632),I(513,1632,y2,set,$wt),l.hc=function(){return new Yc(this.a)},l.a=0,P(Ye,"ArrayListMultimap",513),I(664,2010,{664:1,1947:1,3:1},Noe),P(Ye,"ArrayTable",664),I(1924,386,AE,zUt),l.Xb=function(e){return new xyt(this.a,e)},P(Ye,"ArrayTable/1",1924),I(1925,1,{},GB),l.ld=function(e){return new xyt(this.a,e)},P(Ye,"ArrayTable/1methodref$getCell$Type",1925),I(2011,1,{682:1}),l.Fb=function(e){var n;return e===this?!0:Et(e,468)?(n=u(e,682),fd(Dp(this.c.e,this.b),Dp(n.c.e,n.b))&&fd(Dp(this.c.c,this.a),Dp(n.c.c,n.a))&&fd(Wx(this.c,this.b,this.a),Wx(n.c,n.b,n.a))):!1},l.Hb=function(){return vz(ct(ot(Xn,1),Ie,1,5,[Dp(this.c.e,this.b),Dp(this.c.c,this.a),Wx(this.c,this.b,this.a)]))},l.Ib=function(){return"("+Dp(this.c.e,this.b)+","+Dp(this.c.c,this.a)+")="+Wx(this.c,this.b,this.a)},P(Ye,"Tables/AbstractCell",2011),I(468,2011,{468:1,682:1},xyt),l.a=0,l.b=0,l.d=0,P(Ye,"ArrayTable/2",468),I(1927,1,{},ox),l.ld=function(e){return wte(this.a,e)},P(Ye,"ArrayTable/2methodref$getValue$Type",1927),I(1926,386,AE,qUt),l.Xb=function(e){return wte(this.a,e)},P(Ye,"ArrayTable/3",1926),I(1979,1967,bw),l.$b=function(){Oj(this.kc())},l.vc=function(){return new ux(this)},l.lc=function(){return new yXt(this.kc(),this.gc())},P(Ye,"Maps/IteratorBasedAbstractMap",1979),I(828,1979,bw),l.$b=function(){throw rt(new Or)},l._b=function(e){return fHt(this.c,e)},l.kc=function(){return new HUt(this,this.c.b.c.gc())},l.lc=function(){return _nt(this.c.b.c.gc(),16,new dv(this))},l.xc=function(e){var n;return n=u(wC(this.c,e),19),n?this.nd(n.a):null},l.dc=function(){return this.c.b.c.dc()},l.ec=function(){return Nnt(this.c)},l.zc=function(e,n){var r;if(r=u(wC(this.c,e),19),!r)throw rt(new Pn(this.md()+" "+e+" not in "+Nnt(this.c)));return this.od(r.a,n)},l.Bc=function(e){throw rt(new Or)},l.gc=function(){return this.c.b.c.gc()},P(Ye,"ArrayTable/ArrayMap",828),I(1923,1,{},dv),l.ld=function(e){return KYt(this.a,e)},P(Ye,"ArrayTable/ArrayMap/0methodref$getEntry$Type",1923),I(1921,345,Mq,UHt),l.cd=function(){return HXe(this.a,this.b)},l.dd=function(){return this.a.nd(this.b)},l.ed=function(e){return this.a.od(this.b,e)},l.b=0,P(Ye,"ArrayTable/ArrayMap/1",1921),I(1922,386,AE,HUt),l.Xb=function(e){return KYt(this.a,e)},P(Ye,"ArrayTable/ArrayMap/2",1922),I(1920,828,bw,PYt),l.md=function(){return"Column"},l.nd=function(e){return Wx(this.b,this.a,e)},l.od=function(e,n){return Gne(this.b,this.a,e,n)},l.a=0,P(Ye,"ArrayTable/Row",1920),I(829,828,bw,v2t),l.nd=function(e){return new PYt(this.a,e)},l.zc=function(e,n){return u(n,83),_Ke()},l.od=function(e,n){return u(n,83),SKe()},l.md=function(){return"Row"},P(Ye,"ArrayTable/RowMap",829),I(1120,1,Mh,WHt),l.qd=function(){return this.a.qd()&-262},l.rd=function(){return this.a.rd()},l.Nb=function(e){this.a.Nb(new qHt(e,this.b))},l.sd=function(e){return this.a.sd(new zHt(e,this.b))},P(Ye,"CollectSpliterators/1",1120),I(1121,1,Un,zHt),l.td=function(e){this.a.td(this.b.Kb(e))},P(Ye,"CollectSpliterators/1/lambda$0$Type",1121),I(1122,1,Un,qHt),l.td=function(e){this.a.td(this.b.Kb(e))},P(Ye,"CollectSpliterators/1/lambda$1$Type",1122),I(1123,1,Mh,wZt),l.qd=function(){return this.a},l.rd=function(){return this.d&&(this.b=kUt(this.b,this.d.rd())),kUt(this.b,0)},l.Nb=function(e){this.d&&(this.d.Nb(e),this.d=null),this.c.Nb(new $Ht(this.e,e)),this.b=0},l.sd=function(e){for(;;){if(this.d&&this.d.sd(e))return aC(this.b,Iq)&&(this.b=Yp(this.b,1)),!0;if(this.d=null,!this.c.sd(new HHt(this,this.e)))return!1}},l.a=0,l.b=0,P(Ye,"CollectSpliterators/1FlatMapSpliterator",1123),I(1124,1,Un,HHt),l.td=function(e){UQe(this.a,this.b,e)},P(Ye,"CollectSpliterators/1FlatMapSpliterator/lambda$0$Type",1124),I(1125,1,Un,$Ht),l.td=function(e){MXe(this.b,this.a,e)},P(Ye,"CollectSpliterators/1FlatMapSpliterator/lambda$1$Type",1125),I(1117,1,Mh,tKt),l.qd=function(){return 16464|this.b},l.rd=function(){return this.a.rd()},l.Nb=function(e){this.a.xe(new VHt(e,this.c))},l.sd=function(e){return this.a.ye(new GHt(e,this.c))},l.b=0,P(Ye,"CollectSpliterators/1WithCharacteristics",1117),I(1118,1,AD,GHt),l.ud=function(e){this.a.td(this.b.ld(e))},P(Ye,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1118),I(1119,1,AD,VHt),l.ud=function(e){this.a.td(this.b.ld(e))},P(Ye,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1119),I(245,1,Pat),l.wd=function(e){return this.vd(u(e,245))},l.vd=function(e){var n;return e==(Xtt(),but)?1:e==(Qtt(),put)?-1:(n=(Mj(),SI(this.a,e.a)),n!=0?n:Et(this,519)==Et(e,519)?0:Et(this,519)?1:-1)},l.zd=function(){return this.a},l.Fb=function(e){return T3t(this,e)},P(Ye,"Cut",245),I(1761,245,Pat,Xqt),l.vd=function(e){return e==this?0:1},l.xd=function(e){throw rt(new Ept)},l.yd=function(e){e.a+="+∞)"},l.zd=function(){throw rt(new Fo(Xhe))},l.Hb=function(){return qd(),O3t(this)},l.Ad=function(e){return!1},l.Ib=function(){return"+∞"};var put;P(Ye,"Cut/AboveAll",1761),I(519,245,{245:1,519:1,3:1,35:1},KUt),l.xd=function(e){hc((e.a+="(",e),this.a)},l.yd=function(e){Rp(hc(e,this.a),93)},l.Hb=function(){return~Hi(this.a)},l.Ad=function(e){return Mj(),SI(this.a,e)<0},l.Ib=function(){return"/"+this.a+"\\"},P(Ye,"Cut/AboveValue",519),I(1760,245,Pat,Qqt),l.vd=function(e){return e==this?0:-1},l.xd=function(e){e.a+="(-∞"},l.yd=function(e){throw rt(new Ept)},l.zd=function(){throw rt(new Fo(Xhe))},l.Hb=function(){return qd(),O3t(this)},l.Ad=function(e){return!0},l.Ib=function(){return"-∞"};var but;P(Ye,"Cut/BelowAll",1760),I(1762,245,Pat,YUt),l.xd=function(e){hc((e.a+="[",e),this.a)},l.yd=function(e){Rp(hc(e,this.a),41)},l.Hb=function(){return Hi(this.a)},l.Ad=function(e){return Mj(),SI(this.a,e)<=0},l.Ib=function(){return"\\"+this.a+"/"},P(Ye,"Cut/BelowValue",1762),I(537,1,t0),l.Jc=function(e){va(this,e)},l.Ib=function(){return eln(u(r$(this,"use Optional.orNull() instead of Optional.or(null)"),20).Kc())},P(Ye,"FluentIterable",537),I(433,537,t0,uC),l.Kc=function(){return new ar(lr(this.a.Kc(),new z))},P(Ye,"FluentIterable/2",433),I(1046,537,t0,JVt),l.Kc=function(){return Bp(this)},P(Ye,"FluentIterable/3",1046),I(708,386,AE,w2t),l.Xb=function(e){return this.a[e].Kc()},P(Ye,"FluentIterable/3/1",708),I(1972,1,{}),l.Ib=function(){return $o(this.Bd().b)},P(Ye,"ForwardingObject",1972),I(1973,1972,Qhe),l.Bd=function(){return this.Cd()},l.Jc=function(e){va(this,e)},l.Lc=function(){return this.Oc()},l.Nc=function(){return new _n(this,0)},l.Oc=function(){return new Tn(null,this.Nc())},l.Fc=function(e){return this.Cd(),bHt()},l.Gc=function(e){return this.Cd(),vHt()},l.$b=function(){this.Cd(),wHt()},l.Hc=function(e){return this.Cd().Hc(e)},l.Ic=function(e){return this.Cd().Ic(e)},l.dc=function(){return this.Cd().b.dc()},l.Kc=function(){return this.Cd().Kc()},l.Mc=function(e){return this.Cd(),mHt()},l.gc=function(){return this.Cd().b.gc()},l.Pc=function(){return this.Cd().Pc()},l.Qc=function(e){return this.Cd().Qc(e)},P(Ye,"ForwardingCollection",1973),I(1980,28,Ixt),l.Kc=function(){return this.Ed()},l.Fc=function(e){throw rt(new Or)},l.Gc=function(e){throw rt(new Or)},l.$b=function(){throw rt(new Or)},l.Hc=function(e){return e!=null&&ry(this,e,!1)},l.Dd=function(){switch(this.gc()){case 0:return Gm(),Gm(),vut;case 1:return Gm(),new Snt(Ar(this.Ed().Pb()));default:return new FYt(this,this.Pc())}},l.Mc=function(e){throw rt(new Or)},P(Ye,"ImmutableCollection",1980),I(712,1980,Ixt,xpt),l.Kc=function(){return Kx(this.a.Kc())},l.Hc=function(e){return e!=null&&this.a.Hc(e)},l.Ic=function(e){return this.a.Ic(e)},l.dc=function(){return this.a.dc()},l.Ed=function(){return Kx(this.a.Kc())},l.gc=function(){return this.a.gc()},l.Pc=function(){return this.a.Pc()},l.Qc=function(e){return this.a.Qc(e)},l.Ib=function(){return $o(this.a)},P(Ye,"ForwardingImmutableCollection",712),I(152,1980,S_),l.Kc=function(){return this.Ed()},l.Yc=function(){return this.Fd(0)},l.Zc=function(e){return this.Fd(e)},l.ad=function(e){e4(this,e)},l.Nc=function(){return new _n(this,16)},l.bd=function(e,n){return this.Gd(e,n)},l.Vc=function(e,n){throw rt(new Or)},l.Wc=function(e,n){throw rt(new Or)},l.Fb=function(e){return Xpn(this,e)},l.Hb=function(){return ocn(this)},l.Xc=function(e){return e==null?-1:yfn(this,e)},l.Ed=function(){return this.Fd(0)},l.Fd=function(e){return O2t(this,e)},l.$c=function(e){throw rt(new Or)},l._c=function(e,n){throw rt(new Or)},l.Gd=function(e,n){var r;return yz((r=new iGt(this),new Kd(r,e,n)))};var vut;P(Ye,"ImmutableList",152),I(2006,152,S_),l.Kc=function(){return Kx(this.Hd().Kc())},l.bd=function(e,n){return yz(this.Hd().bd(e,n))},l.Hc=function(e){return e!=null&&this.Hd().Hc(e)},l.Ic=function(e){return this.Hd().Ic(e)},l.Fb=function(e){return yi(this.Hd(),e)},l.Xb=function(e){return Dp(this,e)},l.Hb=function(){return Hi(this.Hd())},l.Xc=function(e){return this.Hd().Xc(e)},l.dc=function(){return this.Hd().dc()},l.Ed=function(){return Kx(this.Hd().Kc())},l.gc=function(){return this.Hd().gc()},l.Gd=function(e,n){return yz(this.Hd().bd(e,n))},l.Pc=function(){return this.Hd().Qc(Pt(Xn,Ie,1,this.Hd().gc(),5,1))},l.Qc=function(e){return this.Hd().Qc(e)},l.Ib=function(){return $o(this.Hd())},P(Ye,"ForwardingImmutableList",2006),I(714,1,LE),l.vc=function(){return Pv(this)},l.wc=function(e){UC(this,e)},l.ec=function(){return Nnt(this)},l.yc=function(e,n,r){return $it(this,e,n,r)},l.Cc=function(){return this.Ld()},l.$b=function(){throw rt(new Or)},l._b=function(e){return this.xc(e)!=null},l.uc=function(e){return this.Ld().Hc(e)},l.Jd=function(){return new zzt(this)},l.Kd=function(){return new qzt(this)},l.Fb=function(e){return Jcn(this,e)},l.Hb=function(){return Pv(this).Hb()},l.dc=function(){return this.gc()==0},l.zc=function(e,n){return AKe()},l.Bc=function(e){throw rt(new Or)},l.Ib=function(){return I0n(this)},l.Ld=function(){return this.e?this.e:this.e=this.Kd()},l.c=null,l.d=null,l.e=null;var hge;P(Ye,"ImmutableMap",714),I(715,714,LE),l._b=function(e){return fHt(this,e)},l.uc=function(e){return cGt(this.b,e)},l.Id=function(){return Bre(new m9(this))},l.Jd=function(){return Bre(bXt(this.b))},l.Kd=function(){return hd(),new xpt(pXt(this.b))},l.Fb=function(e){return uGt(this.b,e)},l.xc=function(e){return wC(this,e)},l.Hb=function(){return Hi(this.b.c)},l.dc=function(){return this.b.c.dc()},l.gc=function(){return this.b.c.gc()},l.Ib=function(){return $o(this.b.c)},P(Ye,"ForwardingImmutableMap",715),I(1974,1973,Fat),l.Bd=function(){return this.Md()},l.Cd=function(){return this.Md()},l.Nc=function(){return new _n(this,1)},l.Fb=function(e){return e===this||this.Md().Fb(e)},l.Hb=function(){return this.Md().Hb()},P(Ye,"ForwardingSet",1974),I(1069,1974,Fat,m9),l.Bd=function(){return x8(this.a.b)},l.Cd=function(){return x8(this.a.b)},l.Hc=function(e){if(Et(e,42)&&u(e,42).cd()==null)return!1;try{return oGt(x8(this.a.b),e)}catch(n){if(n=Wi(n),Et(n,205))return!1;throw rt(n)}},l.Md=function(){return x8(this.a.b)},l.Qc=function(e){var n;return n=QXt(x8(this.a.b),e),x8(this.a.b).b.gc()=0?"+":"")+(r/60|0),n=rj(b.Math.abs(r)%60),(vae(),Sge)[this.q.getDay()]+" "+Age[this.q.getMonth()]+" "+rj(this.q.getDate())+" "+rj(this.q.getHours())+":"+rj(this.q.getMinutes())+":"+rj(this.q.getSeconds())+" GMT"+e+n+" "+this.q.getFullYear()};var HH=P(pr,"Date",199);I(1915,199,afe,Gse),l.a=!1,l.b=0,l.c=0,l.d=0,l.e=0,l.f=0,l.g=!1,l.i=0,l.j=0,l.k=0,l.n=0,l.o=0,l.p=0,P("com.google.gwt.i18n.shared.impl","DateRecord",1915),I(1966,1,{}),l.fe=function(){return null},l.ge=function(){return null},l.he=function(){return null},l.ie=function(){return null},l.je=function(){return null},P(h6,"JSONValue",1966),I(216,1966,{216:1},bg,lx),l.Fb=function(e){return Et(e,216)?Hwt(this.a,u(e,216).a):!1},l.ee=function(){return XWe},l.Hb=function(){return Mwt(this.a)},l.fe=function(){return this},l.Ib=function(){var e,n,r;for(r=new Il("["),n=0,e=this.a.length;n0&&(r.a+=","),hc(r,Xm(this,n));return r.a+="]",r.a},P(h6,"JSONArray",216),I(483,1966,{483:1},qk),l.ee=function(){return QWe},l.ge=function(){return this},l.Ib=function(){return Fn(),""+this.a},l.a=!1;var wge,mge;P(h6,"JSONBoolean",483),I(985,60,U0,Rqt),P(h6,"JSONException",985),I(1023,1966,{},dt),l.ee=function(){return nKe},l.Ib=function(){return Tu};var yge;P(h6,"JSONNull",1023),I(258,1966,{258:1},y9),l.Fb=function(e){return Et(e,258)?this.a==u(e,258).a:!1},l.ee=function(){return ZWe},l.Hb=function(){return o8(this.a)},l.he=function(){return this},l.Ib=function(){return this.a+""},l.a=0,P(h6,"JSONNumber",258),I(183,1966,{183:1},mx,Hk),l.Fb=function(e){return Et(e,183)?Hwt(this.a,u(e,183).a):!1},l.ee=function(){return JWe},l.Hb=function(){return Mwt(this.a)},l.ie=function(){return this},l.Ib=function(){var e,n,r,s,o,h,d;for(d=new Il("{"),e=!0,h=uit(this,Pt(Ae,te,2,0,6,1)),r=h,s=0,o=r.length;s=0?":"+this.c:"")+")"},l.c=0;var lEt=P(Xo,"StackTraceElement",310);lge={3:1,475:1,35:1,2:1};var Ae=P(Xo,Dxt,2);I(107,418,{475:1},xg,B9,Th),P(Xo,"StringBuffer",107),I(100,418,{475:1},_p,Lm,Il),P(Xo,"StringBuilder",100),I(687,73,sot,Zpt),P(Xo,"StringIndexOutOfBoundsException",687),I(2043,1,{});var hEt;I(844,1,{},ke),l.Kb=function(e){return u(e,78).e},P(Xo,"Throwable/lambda$0$Type",844),I(41,60,{3:1,102:1,60:1,78:1,41:1},Or,yg),P(Xo,"UnsupportedOperationException",41),I(240,236,{3:1,35:1,236:1,240:1},kI,obt),l.wd=function(e){return Que(this,u(e,240))},l.ke=function(){return ly(Ole(this))},l.Fb=function(e){var n;return this===e?!0:Et(e,240)?(n=u(e,240),this.e==n.e&&Que(this,n)==0):!1},l.Hb=function(){var e;return this.b!=0?this.b:this.a<54?(e=ku(this.f),this.b=Sr(Ps(e,-1)),this.b=33*this.b+Sr(Ps(Fp(e,32),-1)),this.b=17*this.b+ps(this.e),this.b):(this.b=17*Ire(this.c)+ps(this.e),this.b)},l.Ib=function(){return Ole(this)},l.a=0,l.b=0,l.d=0,l.e=0,l.f=0;var Tge,D2,fEt,dEt,gEt,pEt,bEt,vEt,Cut=P("java.math","BigDecimal",240);I(91,236,{3:1,35:1,236:1,91:1},D3t,Lg,K3,g4t,Nie,Np),l.wd=function(e){return Lie(this,u(e,91))},l.ke=function(){return ly(Dat(this,0))},l.Fb=function(e){return h3t(this,e)},l.Hb=function(){return Ire(this)},l.Ib=function(){return Dat(this,0)},l.b=-2,l.c=0,l.d=0,l.e=0;var _ut,GH,wEt,Sut,VH,QE,B4=P("java.math","BigInteger",91),Cge,_ge,T6,oS;I(488,1967,bw),l.$b=function(){Yu(this)},l._b=function(e){return kl(this,e)},l.uc=function(e){return pre(this,e,this.g)||pre(this,e,this.f)},l.vc=function(){return new wg(this)},l.xc=function(e){return Jn(this,e)},l.zc=function(e,n){return ki(this,e,n)},l.Bc=function(e){return Ux(this,e)},l.gc=function(){return $9(this)},P(pr,"AbstractHashMap",488),I(261,N1,ju,wg),l.$b=function(){this.a.$b()},l.Hc=function(e){return dZt(this,e)},l.Kc=function(){return new h2(this.a)},l.Mc=function(e){var n;return dZt(this,e)?(n=u(e,42).cd(),this.a.Bc(n),!0):!1},l.gc=function(){return this.a.gc()},P(pr,"AbstractHashMap/EntrySet",261),I(262,1,ra,h2),l.Nb=function(e){pa(this,e)},l.Pb=function(){return Yv(this)},l.Ob=function(){return this.b},l.Qb=function(){lte(this)},l.b=!1,P(pr,"AbstractHashMap/EntrySetIterator",262),I(417,1,ra,fx),l.Nb=function(e){pa(this,e)},l.Ob=function(){return mM(this)},l.Pb=function(){return PXt(this)},l.Qb=function(){El(this)},l.b=0,l.c=-1,P(pr,"AbstractList/IteratorImpl",417),I(96,417,Jd,ha),l.Qb=function(){El(this)},l.Rb=function(e){Rm(this,e)},l.Sb=function(){return this.b>0},l.Tb=function(){return this.b},l.Ub=function(){return Qn(this.b>0),this.a.Xb(this.c=--this.b)},l.Vb=function(){return this.b-1},l.Wb=function(e){Pm(this.c!=-1),this.a._c(this.c,e)},P(pr,"AbstractList/ListIteratorImpl",96),I(219,52,IE,Kd),l.Vc=function(e,n){Um(e,this.b),this.c.Vc(this.a+e,n),++this.b},l.Xb=function(e){return An(e,this.b),this.c.Xb(this.a+e)},l.$c=function(e){var n;return An(e,this.b),n=this.c.$c(this.a+e),--this.b,n},l._c=function(e,n){return An(e,this.b),this.c._c(this.a+e,n)},l.gc=function(){return this.b},l.a=0,l.b=0,P(pr,"AbstractList/SubList",219),I(384,N1,ju,Tm),l.$b=function(){this.a.$b()},l.Hc=function(e){return this.a._b(e)},l.Kc=function(){var e;return e=this.a.vc().Kc(),new rM(e)},l.Mc=function(e){return this.a._b(e)?(this.a.Bc(e),!0):!1},l.gc=function(){return this.a.gc()},P(pr,"AbstractMap/1",384),I(691,1,ra,rM),l.Nb=function(e){pa(this,e)},l.Ob=function(){return this.a.Ob()},l.Pb=function(){var e;return e=u(this.a.Pb(),42),e.cd()},l.Qb=function(){this.a.Qb()},P(pr,"AbstractMap/1/1",691),I(226,28,wy,b1),l.$b=function(){this.a.$b()},l.Hc=function(e){return this.a.uc(e)},l.Kc=function(){var e;return e=this.a.vc().Kc(),new v1(e)},l.gc=function(){return this.a.gc()},P(pr,"AbstractMap/2",226),I(294,1,ra,v1),l.Nb=function(e){pa(this,e)},l.Ob=function(){return this.a.Ob()},l.Pb=function(){var e;return e=u(this.a.Pb(),42),e.dd()},l.Qb=function(){this.a.Qb()},P(pr,"AbstractMap/2/1",294),I(484,1,{484:1,42:1}),l.Fb=function(e){var n;return Et(e,42)?(n=u(e,42),Pc(this.d,n.cd())&&Pc(this.e,n.dd())):!1},l.cd=function(){return this.d},l.dd=function(){return this.e},l.Hb=function(){return G3(this.d)^G3(this.e)},l.ed=function(e){return J2t(this,e)},l.Ib=function(){return this.d+"="+this.e},P(pr,"AbstractMap/AbstractEntry",484),I(383,484,{484:1,383:1,42:1},RR),P(pr,"AbstractMap/SimpleEntry",383),I(1984,1,uot),l.Fb=function(e){var n;return Et(e,42)?(n=u(e,42),Pc(this.cd(),n.cd())&&Pc(this.dd(),n.dd())):!1},l.Hb=function(){return G3(this.cd())^G3(this.dd())},l.Ib=function(){return this.cd()+"="+this.dd()},P(pr,Khe,1984),I(1992,1967,Uhe),l.tc=function(e){return xJt(this,e)},l._b=function(e){return pnt(this,e)},l.vc=function(){return new x(this)},l.xc=function(e){var n;return n=e,ec(Dyt(this,n))},l.ec=function(){return new y(this)},P(pr,"AbstractNavigableMap",1992),I(739,N1,ju,x),l.Hc=function(e){return Et(e,42)&&xJt(this.b,u(e,42))},l.Kc=function(){return new vC(this.b)},l.Mc=function(e){var n;return Et(e,42)?(n=u(e,42),cte(this.b,n)):!1},l.gc=function(){return this.b.c},P(pr,"AbstractNavigableMap/EntrySet",739),I(493,N1,Mxt,y),l.Nc=function(){return new FR(this)},l.$b=function(){O9(this.a)},l.Hc=function(e){return pnt(this.a,e)},l.Kc=function(){var e;return e=new vC(new gC(this.a).b),new g(e)},l.Mc=function(e){return pnt(this.a,e)?(IC(this.a,e),!0):!1},l.gc=function(){return this.a.c},P(pr,"AbstractNavigableMap/NavigableKeySet",493),I(494,1,ra,g),l.Nb=function(e){pa(this,e)},l.Ob=function(){return mM(this.a.a)},l.Pb=function(){var e;return e=wj(this.a),e.cd()},l.Qb=function(){hKt(this.a)},P(pr,"AbstractNavigableMap/NavigableKeySet/1",494),I(2004,28,wy),l.Fc=function(e){return M8(dE(this,e)),!0},l.Gc=function(e){return On(e),_j(e!=this,"Can't add a queue to itself"),Ua(this,e)},l.$b=function(){for(;Qrt(this)!=null;);},P(pr,"AbstractQueue",2004),I(302,28,{4:1,20:1,28:1,14:1},P3,RQt),l.Fc=function(e){return Qwt(this,e),!0},l.$b=function(){rmt(this)},l.Hc=function(e){return Rne(new MC(this),e)},l.dc=function(){return N9(this)},l.Kc=function(){return new MC(this)},l.Mc=function(e){return frn(new MC(this),e)},l.gc=function(){return this.c-this.b&this.a.length-1},l.Nc=function(){return new _n(this,272)},l.Qc=function(e){var n;return n=this.c-this.b&this.a.length-1,e.lengthn&&Ji(e,n,null),e},l.b=0,l.c=0,P(pr,"ArrayDeque",302),I(446,1,ra,MC),l.Nb=function(e){pa(this,e)},l.Ob=function(){return this.a!=this.b},l.Pb=function(){return mz(this)},l.Qb=function(){Fee(this)},l.a=0,l.b=0,l.c=-1,P(pr,"ArrayDeque/IteratorImpl",446),I(12,52,ufe,le,Yc,Pu),l.Vc=function(e,n){$m(this,e,n)},l.Fc=function(e){return ue(this,e)},l.Wc=function(e,n){return Ryt(this,e,n)},l.Gc=function(e){return As(this,e)},l.$b=function(){this.c=Pt(Xn,Ie,1,0,5,1)},l.Hc=function(e){return Ro(this,e,0)!=-1},l.Jc=function(e){mu(this,e)},l.Xb=function(e){return Fe(this,e)},l.Xc=function(e){return Ro(this,e,0)},l.dc=function(){return this.c.length==0},l.Kc=function(){return new S(this)},l.$c=function(e){return Ag(this,e)},l.Mc=function(e){return vu(this,e)},l.Ud=function(e,n){BQt(this,e,n)},l._c=function(e,n){return ah(this,e,n)},l.gc=function(){return this.c.length},l.ad=function(e){Xs(this,e)},l.Pc=function(){return int(this)},l.Qc=function(e){return D1(this,e)};var X5n=P(pr,"ArrayList",12);I(7,1,ra,S),l.Nb=function(e){pa(this,e)},l.Ob=function(){return Vo(this)},l.Pb=function(){return J(this)},l.Qb=function(){_C(this)},l.a=0,l.b=-1,P(pr,"ArrayList/1",7),I(2013,b.Function,{},xt),l.te=function(e,n){return Ls(e,n)},I(154,52,lfe,wl),l.Hc=function(e){return Ree(this,e)!=-1},l.Jc=function(e){var n,r,s,o;for(On(e),r=this.a,s=0,o=r.length;s>>0,e.toString(16)))},l.f=0,l.i=Ts;var XH=P(r0,"CNode",57);I(814,1,{},Dpt),P(r0,"CNode/CNodeBuilder",814);var qge;I(1525,1,{},No),l.Oe=function(e,n){return 0},l.Pe=function(e,n){return 0},P(r0,wfe,1525),I(1790,1,{},vs),l.Le=function(e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt;for(C=ss,s=new S(e.a.b);s.as.d.c||s.d.c==h.d.c&&s.d.b0?e+this.n.d+this.n.a:0},l.Se=function(){var e,n,r,s,o;if(o=0,this.e)this.b?o=this.b.a:this.a[1][1]&&(o=this.a[1][1].Se());else if(this.g)o=a3t(this,xst(this,null,!0));else for(n=(Kf(),ct(ot(My,1),ae,232,0,[sc,tu,ac])),r=0,s=n.length;r0?o+this.n.b+this.n.c:0},l.Te=function(){var e,n,r,s,o;if(this.g)for(e=xst(this,null,!1),r=(Kf(),ct(ot(My,1),ae,232,0,[sc,tu,ac])),s=0,o=r.length;s0&&(s[0]+=this.d,r-=s[0]),s[2]>0&&(s[2]+=this.d,r-=s[2]),this.c.a=b.Math.max(0,r),this.c.d=n.d+e.d+(this.c.a-r)/2,s[1]=b.Math.max(s[1],r),lmt(this,tu,n.d+e.d+s[0]-(s[1]-r)/2,s)},l.b=null,l.d=0,l.e=!1,l.f=!1,l.g=!1;var Nut=0,QH=0;P(k2,"GridContainerCell",1473),I(461,22,{3:1,35:1,22:1,461:1},vet);var cb,Sd,mf,Zge=jr(k2,"HorizontalLabelAlignment",461,Hr,Srn,hZe),Jge;I(306,212,{212:1,306:1},iQt,hee,eQt),l.Re=function(){return qKt(this)},l.Se=function(){return Bvt(this)},l.a=0,l.c=!1;var axn=P(k2,"LabelCell",306);I(244,326,{212:1,326:1,244:1},r_),l.Re=function(){return cD(this)},l.Se=function(){return uD(this)},l.Te=function(){fat(this)},l.Ue=function(){dat(this)},l.b=0,l.c=0,l.d=!1,P(k2,"StripContainerCell",244),I(1626,1,ui,Zl),l.Mb=function(e){return TKe(u(e,212))},P(k2,"StripContainerCell/lambda$0$Type",1626),I(1627,1,{},Pa),l.Fe=function(e){return u(e,212).Se()},P(k2,"StripContainerCell/lambda$1$Type",1627),I(1628,1,ui,Al),l.Mb=function(e){return CKe(u(e,212))},P(k2,"StripContainerCell/lambda$2$Type",1628),I(1629,1,{},ua),l.Fe=function(e){return u(e,212).Re()},P(k2,"StripContainerCell/lambda$3$Type",1629),I(462,22,{3:1,35:1,22:1,462:1},wet);var yf,ub,e1,tpe=jr(k2,"VerticalLabelAlignment",462,Hr,Arn,fZe),epe;I(789,1,{},yxt),l.c=0,l.d=0,l.k=0,l.s=0,l.t=0,l.v=!1,l.w=0,l.D=!1,P(Bq,"NodeContext",789),I(1471,1,Oi,bc),l.ue=function(e,n){return iUt(u(e,61),u(n,61))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Bq,"NodeContext/0methodref$comparePortSides$Type",1471),I(1472,1,Oi,Cc),l.ue=function(e,n){return Zdn(u(e,111),u(n,111))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Bq,"NodeContext/1methodref$comparePortContexts$Type",1472),I(159,22,{3:1,35:1,22:1,159:1},uh);var npe,rpe,ipe,spe,ape,ope,cpe,upe,lpe,hpe,fpe,dpe,gpe,ppe,bpe,vpe,wpe,mpe,ype,xpe,kpe,Put,Epe=jr(Bq,"NodeLabelLocation",159,Hr,Jit,dZe),Tpe;I(111,1,{111:1},Boe),l.a=!1,P(Bq,"PortContext",111),I(1476,1,Un,ga),l.td=function(e){EHt(u(e,306))},P(FD,Ife,1476),I(1477,1,ui,Ma),l.Mb=function(e){return!!u(e,111).c},P(FD,Dfe,1477),I(1478,1,Un,Ha),l.td=function(e){EHt(u(e,111).c)},P(FD,"LabelPlacer/lambda$2$Type",1478);var t7t;I(1475,1,Un,_c),l.td=function(e){Bm(),iKe(u(e,111))},P(FD,"NodeLabelAndSizeUtilities/lambda$0$Type",1475),I(790,1,Un,bvt),l.td=function(e){bYe(this.b,this.c,this.a,u(e,181))},l.a=!1,l.c=!1,P(FD,"NodeLabelCellCreator/lambda$0$Type",790),I(1474,1,Un,wn),l.td=function(e){oKe(this.a,u(e,181))},P(FD,"PortContextCreator/lambda$0$Type",1474);var ZH;I(1829,1,{},ov),P(PE,"GreedyRectangleStripOverlapRemover",1829),I(1830,1,Oi,Ll),l.ue=function(e,n){return KXe(u(e,222),u(n,222))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(PE,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1830),I(1786,1,{},eqt),l.a=5,l.e=0,P(PE,"RectangleStripOverlapRemover",1786),I(1787,1,Oi,Z1),l.ue=function(e,n){return YXe(u(e,222),u(n,222))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(PE,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1787),I(1789,1,Oi,Fd),l.ue=function(e,n){return men(u(e,222),u(n,222))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(PE,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1789),I(406,22,{3:1,35:1,22:1,406:1},zR);var sO,Fut,But,aO,Cpe=jr(PE,"RectangleStripOverlapRemover/OverlapRemovalDirection",406,Hr,Sin,gZe),_pe;I(222,1,{222:1},Dnt),P(PE,"RectangleStripOverlapRemover/RectangleNode",222),I(1788,1,Un,gr),l.td=function(e){Efn(this.a,u(e,222))},P(PE,"RectangleStripOverlapRemover/lambda$1$Type",1788),I(1304,1,Oi,J1),l.ue=function(e,n){return Lyn(u(e,167),u(n,167))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(md,"PolyominoCompactor/CornerCasesGreaterThanRestComparator",1304),I(1307,1,{},Bd),l.Kb=function(e){return u(e,324).a},P(md,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type",1307),I(1308,1,ui,E0),l.Mb=function(e){return u(e,323).a},P(md,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type",1308),I(1309,1,ui,Bi),l.Mb=function(e){return u(e,323).a},P(md,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type",1309),I(1302,1,Oi,on),l.ue=function(e,n){return uwn(u(e,167),u(n,167))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(md,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator",1302),I(1305,1,{},Jl),l.Kb=function(e){return u(e,324).a},P(md,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type",1305),I(767,1,Oi,kr),l.ue=function(e,n){return hcn(u(e,167),u(n,167))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(md,"PolyominoCompactor/MinNumOfExtensionsComparator",767),I(1300,1,Oi,Ei),l.ue=function(e,n){return yon(u(e,321),u(n,321))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(md,"PolyominoCompactor/MinPerimeterComparator",1300),I(1301,1,Oi,Jo),l.ue=function(e,n){return Xhn(u(e,321),u(n,321))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(md,"PolyominoCompactor/MinPerimeterComparatorWithShape",1301),I(1303,1,Oi,vc),l.ue=function(e,n){return Dwn(u(e,167),u(n,167))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(md,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator",1303),I(1306,1,{},tf),l.Kb=function(e){return u(e,324).a},P(md,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type",1306),I(777,1,{},Ebt),l.Ce=function(e,n){return Ein(this,u(e,46),u(n,167))},P(md,"SuccessorCombination",777),I(644,1,{},Oc),l.Ce=function(e,n){var r;return fpn((r=u(e,46),u(n,167),r))},P(md,"SuccessorJitter",644),I(643,1,{},ef),l.Ce=function(e,n){var r;return tvn((r=u(e,46),u(n,167),r))},P(md,"SuccessorLineByLine",643),I(568,1,{},nf),l.Ce=function(e,n){var r;return dbn((r=u(e,46),u(n,167),r))},P(md,"SuccessorManhattan",568),I(1356,1,{},Xi),l.Ce=function(e,n){var r;return T2n((r=u(e,46),u(n,167),r))},P(md,"SuccessorMaxNormWindingInMathPosSense",1356),I(400,1,{},fr),l.Ce=function(e,n){return hwt(this,e,n)},l.c=!1,l.d=!1,l.e=!1,l.f=!1,P(md,"SuccessorQuadrantsGeneric",400),I(1357,1,{},Es),l.Kb=function(e){return u(e,324).a},P(md,"SuccessorQuadrantsGeneric/lambda$0$Type",1357),I(323,22,{3:1,35:1,22:1,323:1},$R),l.a=!1;var oO,cO,uO,lO,Spe=jr(jq,Qxt,323,Hr,Min,pZe),Ape;I(1298,1,{}),l.Ib=function(){var e,n,r,s,o,h;for(r=" ",e=de(0),o=0;o=0?"b"+e+"["+Mrt(this.a)+"]":"b["+Mrt(this.a)+"]"):"b_"+Iv(this)},P(RD,"FBendpoint",559),I(282,134,{3:1,282:1,94:1,134:1},RWt),l.Ib=function(){return Mrt(this)},P(RD,"FEdge",282),I(231,134,{3:1,231:1,94:1,134:1},_$);var cxn=P(RD,"FGraph",231);I(447,357,{3:1,447:1,357:1,94:1,134:1},zZt),l.Ib=function(){return this.b==null||this.b.length==0?"l["+Mrt(this.a)+"]":"l_"+this.b},P(RD,"FLabel",447),I(144,357,{3:1,144:1,357:1,94:1,134:1},QYt),l.Ib=function(){return qwt(this)},l.b=0,P(RD,"FNode",144),I(2003,1,{}),l.bf=function(e){J5t(this,e)},l.cf=function(){yse(this)},l.d=0,P(o6t,"AbstractForceModel",2003),I(631,2003,{631:1},Mne),l.af=function(e,n){var r,s,o,h,d;return boe(this.f,e,n),o=na(nc(n.d),e.d),d=b.Math.sqrt(o.a*o.a+o.b*o.b),s=b.Math.max(0,d-AC(e.e)/2-AC(n.e)/2),r=are(this.e,e,n),r>0?h=-ben(s,this.c)*r:h=cQe(s,this.b)*u(Q(e,(Zf(),t7)),19).a,ud(o,h/d),o},l.bf=function(e){J5t(this,e),this.a=u(Q(e,(Zf(),iG)),19).a,this.c=Xt(ye(Q(e,sG))),this.b=Xt(ye(Q(e,Gut)))},l.df=function(e){return e0&&(h-=yKe(s,this.a)*r),ud(o,h*this.b/d),o},l.bf=function(e){var n,r,s,o,h,d,w;for(J5t(this,e),this.b=Xt(ye(Q(e,(Zf(),Vut)))),this.c=this.b/u(Q(e,iG),19).a,s=e.e.c.length,h=0,o=0,w=new S(e.e);w.a0},l.a=0,l.b=0,l.c=0,P(o6t,"FruchtermanReingoldModel",632),I(849,1,Ih,DJ),l.Qe=function(e){an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,qq),""),"Force Model"),"Determines the model for force calculation."),u7t),(jg(),cs)),l7t),un((Xf(),qn))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,c6t),""),"Iterations"),"The number of iterations on the force model."),de(300)),gc),ja),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,u6t),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),de(0)),gc),ja),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Iot),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),yd),Do),ca),un(qn)))),aa(e,Iot,qq,Kpe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Dot),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),Do),ca),un(qn)))),aa(e,Dot,qq,Vpe),vhe((new d9,e))};var qpe,Hpe,u7t,Gpe,Vpe,Upe,Wpe,Kpe;P(N_,"ForceMetaDataProvider",849),I(424,22,{3:1,35:1,22:1,424:1},Sbt);var Hut,rG,l7t=jr(N_,"ForceModelStrategy",424,Hr,nrn,wZe),Ype;I(988,1,Ih,d9),l.Qe=function(e){vhe(e)};var Xpe,Qpe,h7t,iG,f7t,Zpe,Jpe,tbe,d7t,ebe,g7t,p7t,nbe,t7,rbe,Gut,b7t,ibe,sbe,sG,Vut;P(N_,"ForceOptions",988),I(989,1,{},B5),l.$e=function(){var e;return e=new Lpt,e},l._e=function(e){},P(N_,"ForceOptions/ForceFactory",989);var dO,lS,C6,aG;I(850,1,Ih,OJ),l.Qe=function(e){an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,h6t),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(Fn(),!1)),(jg(),Aa)),Bs),un((Xf(),Js))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,f6t),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),Do),ca),ji(qn,ct(ot(Qg,1),ae,175,0,[Id]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,d6t),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),v7t),cs),T7t),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,g6t),""),"Stress Epsilon"),"Termination criterion for the iterative process."),yd),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,p6t),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),de(vi)),gc),ja),un(qn)))),ehe((new NJ,e))};var abe,obe,v7t,cbe,ube,lbe;P(N_,"StressMetaDataProvider",850),I(992,1,Ih,NJ),l.Qe=function(e){ehe(e)};var oG,w7t,m7t,y7t,x7t,k7t,hbe,fbe,dbe,gbe,E7t,pbe;P(N_,"StressOptions",992),I(993,1,{},l1),l.$e=function(){var e;return e=new jWt,e},l._e=function(e){},P(N_,"StressOptions/StressFactory",993),I(1128,209,E2,jWt),l.Ze=function(e,n){var r,s,o,h,d;for(wr(n,Gfe,1),je(Re(qe(e,(JI(),x7t))))?je(Re(qe(e,E7t)))||u$((r=new rr((Im(),new Sm(e))),r)):kce(new Lpt,e,Rc(n,1)),o=Zne(e),s=hle(this.a,o),d=s.Kc();d.Ob();)h=u(d.Pb(),231),!(h.e.c.length<=1)&&(Syn(this.b,h),sbn(this.b),mu(h.d,new td));o=The(s),xhe(o),or(n)},P(Vq,"StressLayoutProvider",1128),I(1129,1,Un,td),l.td=function(e){axt(u(e,447))},P(Vq,"StressLayoutProvider/lambda$0$Type",1129),I(990,1,{},Kzt),l.c=0,l.e=0,l.g=0,P(Vq,"StressMajorization",990),I(379,22,{3:1,35:1,22:1,379:1},met);var Uut,Wut,Kut,T7t=jr(Vq,"StressMajorization/Dimension",379,Hr,Mrn,mZe),bbe;I(991,1,Oi,Ci),l.ue=function(e,n){return YQe(this.a,u(e,144),u(n,144))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Vq,"StressMajorization/lambda$0$Type",991),I(1229,1,{},tZt),P(m6,"ElkLayered",1229),I(1230,1,Un,ed),l.td=function(e){apn(u(e,37))},P(m6,"ElkLayered/lambda$0$Type",1230),I(1231,1,Un,hi),l.td=function(e){XQe(this.a,u(e,37))},P(m6,"ElkLayered/lambda$1$Type",1231),I(1263,1,{},_Ut);var vbe,wbe,mbe;P(m6,"GraphConfigurator",1263),I(759,1,Un,gs),l.td=function(e){Aae(this.a,u(e,10))},P(m6,"GraphConfigurator/lambda$0$Type",759),I(760,1,{},R5),l.Kb=function(e){return r4t(),new Tn(null,new _n(u(e,29).a,16))},P(m6,"GraphConfigurator/lambda$1$Type",760),I(761,1,Un,qi),l.td=function(e){Aae(this.a,u(e,10))},P(m6,"GraphConfigurator/lambda$2$Type",761),I(1127,209,E2,Qzt),l.Ze=function(e,n){var r;r=Kmn(new rqt,e),Gt(qe(e,(Te(),jy)))===Gt(($0(),Zg))?_ln(this.a,r,n):kpn(this.a,r,n),bhe(new FJ,r)},P(m6,"LayeredLayoutProvider",1127),I(356,22,{3:1,35:1,22:1,356:1},xM);var Ad,lb,ou,qc,Io,C7t=jr(m6,"LayeredPhases",356,Hr,dsn,yZe),ybe;I(1651,1,{},jee),l.i=0;var xbe;P(zD,"ComponentsToCGraphTransformer",1651);var kbe;I(1652,1,{},uv),l.ef=function(e,n){return b.Math.min(e.a!=null?Xt(e.a):e.c.i,n.a!=null?Xt(n.a):n.c.i)},l.ff=function(e,n){return b.Math.min(e.a!=null?Xt(e.a):e.c.i,n.a!=null?Xt(n.a):n.c.i)},P(zD,"ComponentsToCGraphTransformer/1",1652),I(81,1,{81:1}),l.i=0,l.k=!0,l.o=Ts;var Yut=P(B_,"CNode",81);I(460,81,{460:1,81:1},A2t,L3t),l.Ib=function(){return""},P(zD,"ComponentsToCGraphTransformer/CRectNode",460),I(1623,1,{},j5);var Xut,Qut;P(zD,"OneDimensionalComponentsCompaction",1623),I(1624,1,{},pp),l.Kb=function(e){return xrn(u(e,46))},l.Fb=function(e){return this===e},P(zD,"OneDimensionalComponentsCompaction/lambda$0$Type",1624),I(1625,1,{},$5),l.Kb=function(e){return Nln(u(e,46))},l.Fb=function(e){return this===e},P(zD,"OneDimensionalComponentsCompaction/lambda$1$Type",1625),I(1654,1,{},XYt),P(B_,"CGraph",1654),I(189,1,{189:1},Xit),l.b=0,l.c=0,l.e=0,l.g=!0,l.i=Ts,P(B_,"CGroup",189),I(1653,1,{},wL),l.ef=function(e,n){return b.Math.max(e.a!=null?Xt(e.a):e.c.i,n.a!=null?Xt(n.a):n.c.i)},l.ff=function(e,n){return b.Math.max(e.a!=null?Xt(e.a):e.c.i,n.a!=null?Xt(n.a):n.c.i)},P(B_,wfe,1653),I(1655,1,{},Loe),l.d=!1;var Ebe,Zut=P(B_,xfe,1655);I(1656,1,{},bl),l.Kb=function(e){return gbt(),Fn(),u(u(e,46).a,81).d.e!=0},l.Fb=function(e){return this===e},P(B_,kfe,1656),I(823,1,{},Rvt),l.a=!1,l.b=!1,l.c=!1,l.d=!1,P(B_,Efe,823),I(1825,1,{},gYt),P(Uq,Tfe,1825);var gO=Yi(C2,bfe);I(1826,1,{369:1},VXt),l.Ke=function(e){pvn(this,u(e,466))},P(Uq,Cfe,1826),I(1827,1,Oi,WP),l.ue=function(e,n){return pnn(u(e,81),u(n,81))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Uq,_fe,1827),I(466,1,{466:1},Lbt),l.a=!1,P(Uq,Sfe,466),I(1828,1,Oi,Sc),l.ue=function(e,n){return S1n(u(e,466),u(n,466))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Uq,Afe,1828),I(140,1,{140:1},a8,Ovt),l.Fb=function(e){var n;return e==null||uxn!=sl(e)?!1:(n=u(e,140),Pc(this.c,n.c)&&Pc(this.d,n.d))},l.Hb=function(){return vz(ct(ot(Xn,1),Ie,1,5,[this.c,this.d]))},l.Ib=function(){return"("+this.c+Ka+this.d+(this.a?"cx":"")+this.b+")"},l.a=!0,l.c=0,l.d=0;var uxn=P(C2,"Point",140);I(405,22,{3:1,35:1,22:1,405:1},qR);var _w,Iy,j4,Dy,Tbe=jr(C2,"Point/Quadrant",405,Hr,Iin,xZe),Cbe;I(1642,1,{},Zzt),l.b=null,l.c=null,l.d=null,l.e=null,l.f=null;var _be,Sbe,Abe,Lbe,Mbe;P(C2,"RectilinearConvexHull",1642),I(574,1,{369:1},Bz),l.Ke=function(e){gan(this,u(e,140))},l.b=0;var _7t;P(C2,"RectilinearConvexHull/MaximalElementsEventHandler",574),I(1644,1,Oi,gm),l.ue=function(e,n){return inn(ye(e),ye(n))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(C2,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1644),I(1643,1,{369:1},cee),l.Ke=function(e){A2n(this,u(e,140))},l.a=0,l.b=null,l.c=null,l.d=null,l.e=null,P(C2,"RectilinearConvexHull/RectangleEventHandler",1643),I(1645,1,Oi,gg),l.ue=function(e,n){return oin(u(e,140),u(n,140))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(C2,"RectilinearConvexHull/lambda$0$Type",1645),I(1646,1,Oi,k3),l.ue=function(e,n){return cin(u(e,140),u(n,140))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(C2,"RectilinearConvexHull/lambda$1$Type",1646),I(1647,1,Oi,QK),l.ue=function(e,n){return lin(u(e,140),u(n,140))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(C2,"RectilinearConvexHull/lambda$2$Type",1647),I(1648,1,Oi,$b),l.ue=function(e,n){return uin(u(e,140),u(n,140))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(C2,"RectilinearConvexHull/lambda$3$Type",1648),I(1649,1,Oi,ZK),l.ue=function(e,n){return f0n(u(e,140),u(n,140))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(C2,"RectilinearConvexHull/lambda$4$Type",1649),I(1650,1,{},kQt),P(C2,"Scanline",1650),I(2005,1,{}),P(xd,"AbstractGraphPlacer",2005),I(325,1,{325:1},gWt),l.mf=function(e){return this.nf(e)?(ln(this.b,u(Q(e,(se(),Ny)),21),e),!0):!1},l.nf=function(e){var n,r,s,o;for(n=u(Q(e,(se(),Ny)),21),o=u(Ai(Ni,n),21),s=o.Kc();s.Ob();)if(r=u(s.Pb(),21),!u(Ai(this.b,r),15).dc())return!1;return!0};var Ni;P(xd,"ComponentGroup",325),I(765,2005,{},Opt),l.of=function(e){var n,r;for(r=new S(this.a);r.aV&&(ce=0,Se+=H+o,H=0),gt=d.c,w_(d,ce+gt.a,Se+gt.b),Gf(gt),r=b.Math.max(r,ce+_t.a),H=b.Math.max(H,_t.b),ce+=_t.a+o;if(n.f.a=r,n.f.b=Se+H,je(Re(Q(h,WG)))){for(s=new IT,_xt(s,e,o),F=e.Kc();F.Ob();)M=u(F.Pb(),37),Li(Gf(M.c),s.e);Li(Gf(n.f),s.a)}_mt(n,e)},P(xd,"SimpleRowGraphPlacer",1291),I(1292,1,Oi,Bf),l.ue=function(e,n){return lcn(u(e,37),u(n,37))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(xd,"SimpleRowGraphPlacer/1",1292);var Dbe;I(1262,1,wd,pm),l.Lb=function(e){var n;return n=u(Q(u(e,243).b,(Te(),_o)),74),!!n&&n.b!=0},l.Fb=function(e){return this===e},l.Mb=function(e){var n;return n=u(Q(u(e,243).b,(Te(),_o)),74),!!n&&n.b!=0},P(Wq,"CompoundGraphPostprocessor/1",1262),I(1261,1,as,iqt),l.pf=function(e,n){rse(this,u(e,37),n)},P(Wq,"CompoundGraphPreprocessor",1261),I(441,1,{441:1},Gre),l.c=!1,P(Wq,"CompoundGraphPreprocessor/ExternalPort",441),I(243,1,{243:1},Tj),l.Ib=function(){return snt(this.c)+":"+Coe(this.b)},P(Wq,"CrossHierarchyEdge",243),I(763,1,Oi,Si),l.ue=function(e,n){return Jfn(this,u(e,243),u(n,243))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Wq,"CrossHierarchyEdgeComparator",763),I(299,134,{3:1,299:1,94:1,134:1}),l.p=0,P(Jc,"LGraphElement",299),I(17,299,{3:1,17:1,299:1,94:1,134:1},zv),l.Ib=function(){return Coe(this)};var tlt=P(Jc,"LEdge",17);I(37,299,{3:1,20:1,37:1,299:1,94:1,134:1},Kmt),l.Jc=function(e){va(this,e)},l.Kc=function(){return new S(this.b)},l.Ib=function(){return this.b.c.length==0?"G-unlayered"+Qp(this.a):this.a.c.length==0?"G-layered"+Qp(this.b):"G[layerless"+Qp(this.a)+", layers"+Qp(this.b)+"]"};var Obe=P(Jc,"LGraph",37),Nbe;I(657,1,{}),l.qf=function(){return this.e.n},l.We=function(e){return Q(this.e,e)},l.rf=function(){return this.e.o},l.sf=function(){return this.e.p},l.Xe=function(e){return Vs(this.e,e)},l.tf=function(e){this.e.n.a=e.a,this.e.n.b=e.b},l.uf=function(e){this.e.o.a=e.a,this.e.o.b=e.b},l.vf=function(e){this.e.p=e},P(Jc,"LGraphAdapters/AbstractLShapeAdapter",657),I(577,1,{839:1},Ui),l.wf=function(){var e,n;if(!this.b)for(this.b=Hd(this.a.b.c.length),n=new S(this.a.b);n.a0&&Mre((Rr(n-1,e.length),e.charCodeAt(n-1)),Xfe);)--n;if(h> ",e),Wz(r)),Vr(hc((e.a+="[",e),r.i),"]")),e.a},l.c=!0,l.d=!1;var I7t,D7t,O7t,N7t,P7t,F7t,Fbe=P(Jc,"LPort",11);I(397,1,t0,Ys),l.Jc=function(e){va(this,e)},l.Kc=function(){var e;return e=new S(this.a.e),new zs(e)},P(Jc,"LPort/1",397),I(1290,1,ra,zs),l.Nb=function(e){pa(this,e)},l.Pb=function(){return u(J(this.a),17).c},l.Ob=function(){return Vo(this.a)},l.Qb=function(){_C(this.a)},P(Jc,"LPort/1/1",1290),I(359,1,t0,Er),l.Jc=function(e){va(this,e)},l.Kc=function(){var e;return e=new S(this.a.g),new Qt(e)},P(Jc,"LPort/2",359),I(762,1,ra,Qt),l.Nb=function(e){pa(this,e)},l.Pb=function(){return u(J(this.a),17).d},l.Ob=function(){return Vo(this.a)},l.Qb=function(){_C(this.a)},P(Jc,"LPort/2/1",762),I(1283,1,t0,VGt),l.Jc=function(e){va(this,e)},l.Kc=function(){return new S1(this)},P(Jc,"LPort/CombineIter",1283),I(201,1,ra,S1),l.Nb=function(e){pa(this,e)},l.Qb=function(){pHt()},l.Ob=function(){return pC(this)},l.Pb=function(){return Vo(this.a)?J(this.a):J(this.b)},P(Jc,"LPort/CombineIter/1",201),I(1285,1,wd,bp),l.Lb=function(e){return _Yt(e)},l.Fb=function(e){return this===e},l.Mb=function(e){return Bu(),u(e,11).e.c.length!=0},P(Jc,"LPort/lambda$0$Type",1285),I(1284,1,wd,bm),l.Lb=function(e){return SYt(e)},l.Fb=function(e){return this===e},l.Mb=function(e){return Bu(),u(e,11).g.c.length!=0},P(Jc,"LPort/lambda$1$Type",1284),I(1286,1,wd,tY),l.Lb=function(e){return Bu(),u(e,11).j==(be(),Nn)},l.Fb=function(e){return this===e},l.Mb=function(e){return Bu(),u(e,11).j==(be(),Nn)},P(Jc,"LPort/lambda$2$Type",1286),I(1287,1,wd,zb),l.Lb=function(e){return Bu(),u(e,11).j==(be(),Hn)},l.Fb=function(e){return this===e},l.Mb=function(e){return Bu(),u(e,11).j==(be(),Hn)},P(Jc,"LPort/lambda$3$Type",1287),I(1288,1,wd,eY),l.Lb=function(e){return Bu(),u(e,11).j==(be(),mr)},l.Fb=function(e){return this===e},l.Mb=function(e){return Bu(),u(e,11).j==(be(),mr)},P(Jc,"LPort/lambda$4$Type",1288),I(1289,1,wd,nY),l.Lb=function(e){return Bu(),u(e,11).j==(be(),Bn)},l.Fb=function(e){return this===e},l.Mb=function(e){return Bu(),u(e,11).j==(be(),Bn)},P(Jc,"LPort/lambda$5$Type",1289),I(29,299,{3:1,20:1,299:1,29:1,94:1,134:1},Ch),l.Jc=function(e){va(this,e)},l.Kc=function(){return new S(this.a)},l.Ib=function(){return"L_"+Ro(this.b.b,this,0)+Qp(this.a)},P(Jc,"Layer",29),I(1342,1,{},rqt),P(qg,t1e,1342),I(1346,1,{},z5),l.Kb=function(e){return Mo(u(e,82))},P(qg,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1346),I(1349,1,{},DT),l.Kb=function(e){return Mo(u(e,82))},P(qg,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1349),I(1343,1,Un,jn),l.td=function(e){joe(this.a,u(e,118))},P(qg,e1e,1343),I(1344,1,Un,_r),l.td=function(e){joe(this.a,u(e,118))},P(qg,n1e,1344),I(1345,1,{},XP),l.Kb=function(e){return new Tn(null,new _n(Jen(u(e,79)),16))},P(qg,r1e,1345),I(1347,1,ui,ir),l.Mb=function(e){return tXe(this.a,u(e,33))},P(qg,i1e,1347),I(1348,1,{},bk),l.Kb=function(e){return new Tn(null,new _n(tnn(u(e,79)),16))},P(qg,"ElkGraphImporter/lambda$5$Type",1348),I(1350,1,ui,sr),l.Mb=function(e){return eXe(this.a,u(e,33))},P(qg,"ElkGraphImporter/lambda$7$Type",1350),I(1351,1,ui,rY),l.Mb=function(e){return vnn(u(e,79))},P(qg,"ElkGraphImporter/lambda$8$Type",1351),I(1278,1,{},FJ);var Bbe;P(qg,"ElkGraphLayoutTransferrer",1278),I(1279,1,ui,Ia),l.Mb=function(e){return HQe(this.a,u(e,17))},P(qg,"ElkGraphLayoutTransferrer/lambda$0$Type",1279),I(1280,1,Un,$r),l.td=function(e){vM(),ue(this.a,u(e,17))},P(qg,"ElkGraphLayoutTransferrer/lambda$1$Type",1280),I(1281,1,ui,Ki),l.Mb=function(e){return AQe(this.a,u(e,17))},P(qg,"ElkGraphLayoutTransferrer/lambda$2$Type",1281),I(1282,1,Un,Po),l.td=function(e){vM(),ue(this.a,u(e,17))},P(qg,"ElkGraphLayoutTransferrer/lambda$3$Type",1282),I(1485,1,as,vk),l.pf=function(e,n){Mon(u(e,37),n)},P($n,"CommentNodeMarginCalculator",1485),I(1486,1,{},iY),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"CommentNodeMarginCalculator/lambda$0$Type",1486),I(1487,1,Un,sY),l.td=function(e){lyn(u(e,10))},P($n,"CommentNodeMarginCalculator/lambda$1$Type",1487),I(1488,1,as,aY),l.pf=function(e,n){Evn(u(e,37),n)},P($n,"CommentPostprocessor",1488),I(1489,1,as,oY),l.pf=function(e,n){M4n(u(e,37),n)},P($n,"CommentPreprocessor",1489),I(1490,1,as,cY),l.pf=function(e,n){Ubn(u(e,37),n)},P($n,"ConstraintsPostprocessor",1490),I(1491,1,as,uY),l.pf=function(e,n){Jon(u(e,37),n)},P($n,"EdgeAndLayerConstraintEdgeReverser",1491),I(1492,1,as,lY),l.pf=function(e,n){zln(u(e,37),n)},P($n,"EndLabelPostprocessor",1492),I(1493,1,{},hY),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"EndLabelPostprocessor/lambda$0$Type",1493),I(1494,1,ui,fY),l.Mb=function(e){return Pnn(u(e,10))},P($n,"EndLabelPostprocessor/lambda$1$Type",1494),I(1495,1,Un,dY),l.td=function(e){A1n(u(e,10))},P($n,"EndLabelPostprocessor/lambda$2$Type",1495),I(1496,1,as,gY),l.pf=function(e,n){vgn(u(e,37),n)},P($n,"EndLabelPreprocessor",1496),I(1497,1,{},yL),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"EndLabelPreprocessor/lambda$0$Type",1497),I(1498,1,Un,vKt),l.td=function(e){vYe(this.a,this.b,this.c,u(e,10))},l.a=0,l.b=0,l.c=!1,P($n,"EndLabelPreprocessor/lambda$1$Type",1498),I(1499,1,ui,pY),l.Mb=function(e){return Gt(Q(u(e,70),(Te(),Md)))===Gt((A1(),S7))},P($n,"EndLabelPreprocessor/lambda$2$Type",1499),I(1500,1,Un,Nc),l.td=function(e){ni(this.a,u(e,70))},P($n,"EndLabelPreprocessor/lambda$3$Type",1500),I(1501,1,ui,bY),l.Mb=function(e){return Gt(Q(u(e,70),(Te(),Md)))===Gt((A1(),Yy))},P($n,"EndLabelPreprocessor/lambda$4$Type",1501),I(1502,1,Un,Za),l.td=function(e){ni(this.a,u(e,70))},P($n,"EndLabelPreprocessor/lambda$5$Type",1502),I(1551,1,as,PJ),l.pf=function(e,n){Yun(u(e,37),n)};var Rbe;P($n,"EndLabelSorter",1551),I(1552,1,Oi,OT),l.ue=function(e,n){return Chn(u(e,456),u(n,456))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"EndLabelSorter/1",1552),I(456,1,{456:1},BXt),P($n,"EndLabelSorter/LabelGroup",456),I(1553,1,{},QP),l.Kb=function(e){return wM(),new Tn(null,new _n(u(e,29).a,16))},P($n,"EndLabelSorter/lambda$0$Type",1553),I(1554,1,ui,q5),l.Mb=function(e){return wM(),u(e,10).k==(Gn(),Ds)},P($n,"EndLabelSorter/lambda$1$Type",1554),I(1555,1,Un,vY),l.td=function(e){A0n(u(e,10))},P($n,"EndLabelSorter/lambda$2$Type",1555),I(1556,1,ui,wY),l.Mb=function(e){return wM(),Gt(Q(u(e,70),(Te(),Md)))===Gt((A1(),Yy))},P($n,"EndLabelSorter/lambda$3$Type",1556),I(1557,1,ui,mY),l.Mb=function(e){return wM(),Gt(Q(u(e,70),(Te(),Md)))===Gt((A1(),S7))},P($n,"EndLabelSorter/lambda$4$Type",1557),I(1503,1,as,yY),l.pf=function(e,n){xyn(this,u(e,37))},l.b=0,l.c=0,P($n,"FinalSplineBendpointsCalculator",1503),I(1504,1,{},xY),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"FinalSplineBendpointsCalculator/lambda$0$Type",1504),I(1505,1,{},NT),l.Kb=function(e){return new Tn(null,new Fv(new ar(lr(Ms(u(e,10)).a.Kc(),new z))))},P($n,"FinalSplineBendpointsCalculator/lambda$1$Type",1505),I(1506,1,ui,xL),l.Mb=function(e){return!Va(u(e,17))},P($n,"FinalSplineBendpointsCalculator/lambda$2$Type",1506),I(1507,1,ui,ZP),l.Mb=function(e){return Vs(u(e,17),(se(),N2))},P($n,"FinalSplineBendpointsCalculator/lambda$3$Type",1507),I(1508,1,Un,mc),l.td=function(e){Nwn(this.a,u(e,128))},P($n,"FinalSplineBendpointsCalculator/lambda$4$Type",1508),I(1509,1,Un,E3),l.td=function(e){Bst(u(e,17).a)},P($n,"FinalSplineBendpointsCalculator/lambda$5$Type",1509),I(792,1,as,Ea),l.pf=function(e,n){g3n(this,u(e,37),n)},P($n,"GraphTransformer",792),I(511,22,{3:1,35:1,22:1,511:1},Abt);var nlt,pO,jbe=jr($n,"GraphTransformer/Mode",511,Hr,rrn,PJe),$be;I(1510,1,as,T3),l.pf=function(e,n){G2n(u(e,37),n)},P($n,"HierarchicalNodeResizingProcessor",1510),I(1511,1,as,kY),l.pf=function(e,n){Con(u(e,37),n)},P($n,"HierarchicalPortConstraintProcessor",1511),I(1512,1,Oi,rf),l.ue=function(e,n){return Fhn(u(e,10),u(n,10))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"HierarchicalPortConstraintProcessor/NodeComparator",1512),I(1513,1,as,H5),l.pf=function(e,n){Vmn(u(e,37),n)},P($n,"HierarchicalPortDummySizeProcessor",1513),I(1514,1,as,EY),l.pf=function(e,n){qvn(this,u(e,37),n)},l.a=0,P($n,"HierarchicalPortOrthogonalEdgeRouter",1514),I(1515,1,Oi,wk),l.ue=function(e,n){return WXe(u(e,10),u(n,10))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"HierarchicalPortOrthogonalEdgeRouter/1",1515),I(1516,1,Oi,Rd),l.ue=function(e,n){return oan(u(e,10),u(n,10))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"HierarchicalPortOrthogonalEdgeRouter/2",1516),I(1517,1,as,TY),l.pf=function(e,n){d0n(u(e,37),n)},P($n,"HierarchicalPortPositionProcessor",1517),I(1518,1,as,BJ),l.pf=function(e,n){c5n(this,u(e,37))},l.a=0,l.c=0;var cG,uG;P($n,"HighDegreeNodeLayeringProcessor",1518),I(571,1,{571:1},CY),l.b=-1,l.d=-1,P($n,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",571),I(1519,1,{},_Y),l.Kb=function(e){return GM(),jo(u(e,10))},l.Fb=function(e){return this===e},P($n,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1519),I(1520,1,{},SY),l.Kb=function(e){return GM(),Ms(u(e,10))},l.Fb=function(e){return this===e},P($n,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1520),I(1526,1,as,PT),l.pf=function(e,n){mmn(this,u(e,37),n)},P($n,"HyperedgeDummyMerger",1526),I(793,1,{},wvt),l.a=!1,l.b=!1,l.c=!1,P($n,"HyperedgeDummyMerger/MergeState",793),I(1527,1,{},kL),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"HyperedgeDummyMerger/lambda$0$Type",1527),I(1528,1,{},JP),l.Kb=function(e){return new Tn(null,new _n(u(e,10).j,16))},P($n,"HyperedgeDummyMerger/lambda$1$Type",1528),I(1529,1,Un,EL),l.td=function(e){u(e,11).p=-1},P($n,"HyperedgeDummyMerger/lambda$2$Type",1529),I(1530,1,as,G5),l.pf=function(e,n){vmn(u(e,37),n)},P($n,"HypernodesProcessor",1530),I(1531,1,as,AY),l.pf=function(e,n){wmn(u(e,37),n)},P($n,"InLayerConstraintProcessor",1531),I(1532,1,as,tF),l.pf=function(e,n){Kon(u(e,37),n)},P($n,"InnermostNodeMarginCalculator",1532),I(1533,1,as,eF),l.pf=function(e,n){C4n(this,u(e,37))},l.a=Ts,l.b=Ts,l.c=ss,l.d=ss;var lxn=P($n,"InteractiveExternalPortPositioner",1533);I(1534,1,{},LY),l.Kb=function(e){return u(e,17).d.i},l.Fb=function(e){return this===e},P($n,"InteractiveExternalPortPositioner/lambda$0$Type",1534),I(1535,1,{},Ja),l.Kb=function(e){return XXe(this.a,ye(e))},l.Fb=function(e){return this===e},P($n,"InteractiveExternalPortPositioner/lambda$1$Type",1535),I(1536,1,{},MY),l.Kb=function(e){return u(e,17).c.i},l.Fb=function(e){return this===e},P($n,"InteractiveExternalPortPositioner/lambda$2$Type",1536),I(1537,1,{},vl),l.Kb=function(e){return QXe(this.a,ye(e))},l.Fb=function(e){return this===e},P($n,"InteractiveExternalPortPositioner/lambda$3$Type",1537),I(1538,1,{},zf),l.Kb=function(e){return $Qe(this.a,ye(e))},l.Fb=function(e){return this===e},P($n,"InteractiveExternalPortPositioner/lambda$4$Type",1538),I(1539,1,{},xp),l.Kb=function(e){return zQe(this.a,ye(e))},l.Fb=function(e){return this===e},P($n,"InteractiveExternalPortPositioner/lambda$5$Type",1539),I(77,22,{3:1,35:1,22:1,77:1,234:1},ws),l.Kf=function(){switch(this.g){case 15:return new UX;case 22:return new WX;case 47:return new XX;case 28:case 35:return new C3;case 32:return new vk;case 42:return new aY;case 1:return new oY;case 41:return new cY;case 56:return new Ea((q8(),pO));case 0:return new Ea((q8(),nlt));case 2:return new uY;case 54:return new lY;case 33:return new gY;case 51:return new yY;case 55:return new T3;case 13:return new kY;case 38:return new H5;case 44:return new EY;case 40:return new TY;case 9:return new BJ;case 49:return new rWt;case 37:return new PT;case 43:return new G5;case 27:return new AY;case 30:return new tF;case 3:return new eF;case 18:return new DY;case 29:return new OY;case 5:return new MB;case 50:return new IY;case 34:return new RJ;case 36:return new mk;case 52:return new PJ;case 11:return new vm;case 7:return new $J;case 39:return new yk;case 45:return new BY;case 16:return new FT;case 10:return new nd;case 48:return new CL;case 21:return new xk;case 23:return new eet((Zv(),DS));case 8:return new sF;case 12:return new SL;case 4:return new jY;case 19:return new g9;case 17:return new GY;case 53:return new VY;case 6:return new fF;case 25:return new oqt;case 46:return new YY;case 31:return new zWt;case 14:return new LL;case 26:return new JX;case 20:return new rX;case 24:return new eet((Zv(),dV));default:throw rt(new Pn(Bot+(this.f!=null?this.f:""+this.g)))}};var B7t,R7t,j7t,$7t,z7t,q7t,H7t,G7t,V7t,U7t,hS,lG,hG,W7t,K7t,Y7t,X7t,Q7t,Z7t,J7t,fS,tTt,eTt,nTt,rTt,iTt,rlt,fG,dG,sTt,gG,pG,bG,e7,n7,r7,aTt,vG,wG,oTt,mG,yG,cTt,uTt,lTt,hTt,xG,ilt,bO,kG,EG,TG,CG,fTt,dTt,gTt,pTt,hxn=jr($n,v6t,77,Hr,Ice,NJe),zbe;I(1540,1,as,DY),l.pf=function(e,n){S4n(u(e,37),n)},P($n,"InvertedPortProcessor",1540),I(1541,1,as,OY),l.pf=function(e,n){Swn(u(e,37),n)},P($n,"LabelAndNodeSizeProcessor",1541),I(1542,1,ui,NY),l.Mb=function(e){return u(e,10).k==(Gn(),Ds)},P($n,"LabelAndNodeSizeProcessor/lambda$0$Type",1542),I(1543,1,ui,jd),l.Mb=function(e){return u(e,10).k==(Gn(),xs)},P($n,"LabelAndNodeSizeProcessor/lambda$1$Type",1543),I(1544,1,Un,wKt),l.td=function(e){wYe(this.b,this.a,this.c,u(e,10))},l.a=!1,l.c=!1,P($n,"LabelAndNodeSizeProcessor/lambda$2$Type",1544),I(1545,1,as,MB),l.pf=function(e,n){Q3n(u(e,37),n)};var qbe;P($n,"LabelDummyInserter",1545),I(1546,1,wd,lv),l.Lb=function(e){return Gt(Q(u(e,70),(Te(),Md)))===Gt((A1(),_7))},l.Fb=function(e){return this===e},l.Mb=function(e){return Gt(Q(u(e,70),(Te(),Md)))===Gt((A1(),_7))},P($n,"LabelDummyInserter/1",1546),I(1547,1,as,IY),l.pf=function(e,n){Jyn(u(e,37),n)},P($n,"LabelDummyRemover",1547),I(1548,1,ui,PY),l.Mb=function(e){return je(Re(Q(u(e,70),(Te(),Ult))))},P($n,"LabelDummyRemover/lambda$0$Type",1548),I(1359,1,as,RJ),l.pf=function(e,n){A3n(this,u(e,37),n)},l.a=null;var slt;P($n,"LabelDummySwitcher",1359),I(286,1,{286:1},Lue),l.c=0,l.d=null,l.f=0,P($n,"LabelDummySwitcher/LabelDummyInfo",286),I(1360,1,{},nF),l.Kb=function(e){return Xx(),new Tn(null,new _n(u(e,29).a,16))},P($n,"LabelDummySwitcher/lambda$0$Type",1360),I(1361,1,ui,rF),l.Mb=function(e){return Xx(),u(e,10).k==(Gn(),Sl)},P($n,"LabelDummySwitcher/lambda$1$Type",1361),I(1362,1,{},mg),l.Kb=function(e){return LQe(this.a,u(e,10))},P($n,"LabelDummySwitcher/lambda$2$Type",1362),I(1363,1,Un,sd),l.td=function(e){Aen(this.a,u(e,286))},P($n,"LabelDummySwitcher/lambda$3$Type",1363),I(1364,1,Oi,FY),l.ue=function(e,n){return nen(u(e,286),u(n,286))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"LabelDummySwitcher/lambda$4$Type",1364),I(791,1,as,C3),l.pf=function(e,n){jsn(u(e,37),n)},P($n,"LabelManagementProcessor",791),I(1549,1,as,mk),l.pf=function(e,n){lvn(u(e,37),n)},P($n,"LabelSideSelector",1549),I(1550,1,ui,TL),l.Mb=function(e){return je(Re(Q(u(e,70),(Te(),Ult))))},P($n,"LabelSideSelector/lambda$0$Type",1550),I(1558,1,as,vm),l.pf=function(e,n){Umn(u(e,37),n)},P($n,"LayerConstraintPostprocessor",1558),I(1559,1,as,$J),l.pf=function(e,n){abn(u(e,37),n)};var bTt;P($n,"LayerConstraintPreprocessor",1559),I(360,22,{3:1,35:1,22:1,360:1},HR);var vO,_G,SG,alt,Hbe=jr($n,"LayerConstraintPreprocessor/HiddenNodeConnections",360,Hr,Din,CZe),Gbe;I(1560,1,as,yk),l.pf=function(e,n){Xyn(u(e,37),n)},P($n,"LayerSizeAndGraphHeightCalculator",1560),I(1561,1,as,BY),l.pf=function(e,n){Jbn(u(e,37),n)},P($n,"LongEdgeJoiner",1561),I(1562,1,as,FT),l.pf=function(e,n){Iyn(u(e,37),n)},P($n,"LongEdgeSplitter",1562),I(1563,1,as,nd),l.pf=function(e,n){I3n(this,u(e,37),n)},l.d=0,l.e=0,l.i=0,l.j=0,l.k=0,l.n=0,P($n,"NodePromotion",1563),I(1564,1,{},iF),l.Kb=function(e){return u(e,46),Fn(),!0},l.Fb=function(e){return this===e},P($n,"NodePromotion/lambda$0$Type",1564),I(1565,1,{},kp),l.Kb=function(e){return Yen(this.a,u(e,46))},l.Fb=function(e){return this===e},l.a=0,P($n,"NodePromotion/lambda$1$Type",1565),I(1566,1,{},qf),l.Kb=function(e){return Xen(this.a,u(e,46))},l.Fb=function(e){return this===e},l.a=0,P($n,"NodePromotion/lambda$2$Type",1566),I(1567,1,as,CL),l.pf=function(e,n){e5n(u(e,37),n)},P($n,"NorthSouthPortPostprocessor",1567),I(1568,1,as,xk),l.pf=function(e,n){$4n(u(e,37),n)},P($n,"NorthSouthPortPreprocessor",1568),I(1569,1,Oi,_L),l.ue=function(e,n){return pcn(u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"NorthSouthPortPreprocessor/lambda$0$Type",1569),I(1570,1,as,sF),l.pf=function(e,n){rmn(u(e,37),n)},P($n,"PartitionMidprocessor",1570),I(1571,1,ui,RY),l.Mb=function(e){return Vs(u(e,10),(Te(),b7))},P($n,"PartitionMidprocessor/lambda$0$Type",1571),I(1572,1,Un,bv),l.td=function(e){wnn(this.a,u(e,10))},P($n,"PartitionMidprocessor/lambda$1$Type",1572),I(1573,1,as,SL),l.pf=function(e,n){m2n(u(e,37),n)},P($n,"PartitionPostprocessor",1573),I(1574,1,as,jY),l.pf=function(e,n){Lpn(u(e,37),n)},P($n,"PartitionPreprocessor",1574),I(1575,1,ui,$Y),l.Mb=function(e){return Vs(u(e,10),(Te(),b7))},P($n,"PartitionPreprocessor/lambda$0$Type",1575),I(1576,1,{},aF),l.Kb=function(e){return new Tn(null,new Fv(new ar(lr(Ms(u(e,10)).a.Kc(),new z))))},P($n,"PartitionPreprocessor/lambda$1$Type",1576),I(1577,1,ui,V5),l.Mb=function(e){return khn(u(e,17))},P($n,"PartitionPreprocessor/lambda$2$Type",1577),I(1578,1,Un,oF),l.td=function(e){Ccn(u(e,17))},P($n,"PartitionPreprocessor/lambda$3$Type",1578),I(1579,1,as,g9),l.pf=function(e,n){zwn(u(e,37),n)};var vTt,Vbe,Ube,Wbe,wTt,mTt;P($n,"PortListSorter",1579),I(1580,1,{},U5),l.Kb=function(e){return J8(),u(e,11).e},P($n,"PortListSorter/lambda$0$Type",1580),I(1581,1,{},zY),l.Kb=function(e){return J8(),u(e,11).g},P($n,"PortListSorter/lambda$1$Type",1581),I(1582,1,Oi,AL),l.ue=function(e,n){return HZt(u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"PortListSorter/lambda$2$Type",1582),I(1583,1,Oi,qY),l.ue=function(e,n){return Ufn(u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"PortListSorter/lambda$3$Type",1583),I(1584,1,Oi,HY),l.ue=function(e,n){return Zue(u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"PortListSorter/lambda$4$Type",1584),I(1585,1,as,GY),l.pf=function(e,n){tbn(u(e,37),n)},P($n,"PortSideProcessor",1585),I(1586,1,as,VY),l.pf=function(e,n){ewn(u(e,37),n)},P($n,"ReversedEdgeRestorer",1586),I(1591,1,as,oqt),l.pf=function(e,n){Mfn(this,u(e,37),n)},P($n,"SelfLoopPortRestorer",1591),I(1592,1,{},cF),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"SelfLoopPortRestorer/lambda$0$Type",1592),I(1593,1,ui,UY),l.Mb=function(e){return u(e,10).k==(Gn(),Ds)},P($n,"SelfLoopPortRestorer/lambda$1$Type",1593),I(1594,1,ui,WY),l.Mb=function(e){return Vs(u(e,10),(se(),d7))},P($n,"SelfLoopPortRestorer/lambda$2$Type",1594),I(1595,1,{},KY),l.Kb=function(e){return u(Q(u(e,10),(se(),d7)),403)},P($n,"SelfLoopPortRestorer/lambda$3$Type",1595),I(1596,1,Un,_m),l.td=function(e){j0n(this.a,u(e,403))},P($n,"SelfLoopPortRestorer/lambda$4$Type",1596),I(794,1,Un,uF),l.td=function(e){tgn(u(e,101))},P($n,"SelfLoopPortRestorer/lambda$5$Type",794),I(1597,1,as,YY),l.pf=function(e,n){jhn(u(e,37),n)},P($n,"SelfLoopPostProcessor",1597),I(1598,1,{},XY),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"SelfLoopPostProcessor/lambda$0$Type",1598),I(1599,1,ui,QY),l.Mb=function(e){return u(e,10).k==(Gn(),Ds)},P($n,"SelfLoopPostProcessor/lambda$1$Type",1599),I(1600,1,ui,lF),l.Mb=function(e){return Vs(u(e,10),(se(),d7))},P($n,"SelfLoopPostProcessor/lambda$2$Type",1600),I(1601,1,Un,ZY),l.td=function(e){U1n(u(e,10))},P($n,"SelfLoopPostProcessor/lambda$3$Type",1601),I(1602,1,{},JY),l.Kb=function(e){return new Tn(null,new _n(u(e,101).f,1))},P($n,"SelfLoopPostProcessor/lambda$4$Type",1602),I(1603,1,Un,gx),l.td=function(e){Pin(this.a,u(e,409))},P($n,"SelfLoopPostProcessor/lambda$5$Type",1603),I(1604,1,ui,hF),l.Mb=function(e){return!!u(e,101).i},P($n,"SelfLoopPostProcessor/lambda$6$Type",1604),I(1605,1,Un,O3),l.td=function(e){mKe(this.a,u(e,101))},P($n,"SelfLoopPostProcessor/lambda$7$Type",1605),I(1587,1,as,fF),l.pf=function(e,n){Dbn(u(e,37),n)},P($n,"SelfLoopPreProcessor",1587),I(1588,1,{},dF),l.Kb=function(e){return new Tn(null,new _n(u(e,101).f,1))},P($n,"SelfLoopPreProcessor/lambda$0$Type",1588),I(1589,1,{},tX),l.Kb=function(e){return u(e,409).a},P($n,"SelfLoopPreProcessor/lambda$1$Type",1589),I(1590,1,Un,eX),l.td=function(e){TXe(u(e,17))},P($n,"SelfLoopPreProcessor/lambda$2$Type",1590),I(1606,1,as,zWt),l.pf=function(e,n){L0n(this,u(e,37),n)},P($n,"SelfLoopRouter",1606),I(1607,1,{},kk),l.Kb=function(e){return new Tn(null,new _n(u(e,29).a,16))},P($n,"SelfLoopRouter/lambda$0$Type",1607),I(1608,1,ui,W5),l.Mb=function(e){return u(e,10).k==(Gn(),Ds)},P($n,"SelfLoopRouter/lambda$1$Type",1608),I(1609,1,ui,BT),l.Mb=function(e){return Vs(u(e,10),(se(),d7))},P($n,"SelfLoopRouter/lambda$2$Type",1609),I(1610,1,{},nX),l.Kb=function(e){return u(Q(u(e,10),(se(),d7)),403)},P($n,"SelfLoopRouter/lambda$3$Type",1610),I(1611,1,Un,BGt),l.td=function(e){unn(this.a,this.b,u(e,403))},P($n,"SelfLoopRouter/lambda$4$Type",1611),I(1612,1,as,LL),l.pf=function(e,n){Z2n(u(e,37),n)},P($n,"SemiInteractiveCrossMinProcessor",1612),I(1613,1,ui,RT),l.Mb=function(e){return u(e,10).k==(Gn(),Ds)},P($n,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1613),I(1614,1,ui,ML),l.Mb=function(e){return rYt(u(e,10))._b((Te(),Hy))},P($n,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1614),I(1615,1,Oi,gF),l.ue=function(e,n){return Son(u(e,10),u(n,10))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($n,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1615),I(1616,1,{},pF),l.Ce=function(e,n){return _nn(u(e,10),u(n,10))},P($n,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1616),I(1618,1,as,rX),l.pf=function(e,n){Wmn(u(e,37),n)},P($n,"SortByInputModelProcessor",1618),I(1619,1,ui,iX),l.Mb=function(e){return u(e,11).g.c.length!=0},P($n,"SortByInputModelProcessor/lambda$0$Type",1619),I(1620,1,Un,px),l.td=function(e){sgn(this.a,u(e,11))},P($n,"SortByInputModelProcessor/lambda$1$Type",1620),I(1693,803,{},Zee),l.Me=function(e){var n,r,s,o;switch(this.c=e,this.a.g){case 2:n=new le,us(Ri(new Tn(null,new _n(this.c.a.b,16)),new mF),new qGt(this,n)),aD(this,new vF),mu(n,new aX),n.c=Pt(Xn,Ie,1,0,5,1),us(Ri(new Tn(null,new _n(this.c.a.b,16)),new oX),new N3(n)),aD(this,new cX),mu(n,new uX),n.c=Pt(Xn,Ie,1,0,5,1),r=xUt(hne(Jj(new Tn(null,new _n(this.c.a.b,16)),new $d(this))),new lX),us(new Tn(null,new _n(this.c.a.a,16)),new jGt(r,n)),aD(this,new hX),mu(n,new sX),n.c=Pt(Xn,Ie,1,0,5,1);break;case 3:s=new le,aD(this,new bF),o=xUt(hne(Jj(new Tn(null,new _n(this.c.a.b,16)),new T9(this))),new wF),us(Ri(new Tn(null,new _n(this.c.a.b,16)),new fX),new zGt(o,s)),aD(this,new dX),mu(s,new gX),s.c=Pt(Xn,Ie,1,0,5,1);break;default:throw rt(new Uzt)}},l.b=0,P(Cs,"EdgeAwareScanlineConstraintCalculation",1693),I(1694,1,wd,bF),l.Lb=function(e){return Et(u(e,57).g,145)},l.Fb=function(e){return this===e},l.Mb=function(e){return Et(u(e,57).g,145)},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1694),I(1695,1,{},T9),l.Fe=function(e){return Rgn(this.a,u(e,57))},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1695),I(1703,1,Oq,RGt),l.Vd=function(){c_(this.a,this.b,-1)},l.b=0,P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1703),I(1705,1,wd,vF),l.Lb=function(e){return Et(u(e,57).g,145)},l.Fb=function(e){return this===e},l.Mb=function(e){return Et(u(e,57).g,145)},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1705),I(1706,1,Un,aX),l.td=function(e){u(e,365).Vd()},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1706),I(1707,1,ui,oX),l.Mb=function(e){return Et(u(e,57).g,10)},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1707),I(1709,1,Un,N3),l.td=function(e){hln(this.a,u(e,57))},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1709),I(1708,1,Oq,UGt),l.Vd=function(){c_(this.b,this.a,-1)},l.a=0,P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1708),I(1710,1,wd,cX),l.Lb=function(e){return Et(u(e,57).g,10)},l.Fb=function(e){return this===e},l.Mb=function(e){return Et(u(e,57).g,10)},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1710),I(1711,1,Un,uX),l.td=function(e){u(e,365).Vd()},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1711),I(1712,1,{},$d),l.Fe=function(e){return jgn(this.a,u(e,57))},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1712),I(1713,1,{},lX),l.De=function(){return 0},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1713),I(1696,1,{},wF),l.De=function(){return 0},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1696),I(1715,1,Un,jGt),l.td=function(e){Utn(this.a,this.b,u(e,307))},l.a=0,P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1715),I(1714,1,Oq,$Gt),l.Vd=function(){cce(this.a,this.b,-1)},l.b=0,P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1714),I(1716,1,wd,hX),l.Lb=function(e){return u(e,57),!0},l.Fb=function(e){return this===e},l.Mb=function(e){return u(e,57),!0},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1716),I(1717,1,Un,sX),l.td=function(e){u(e,365).Vd()},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1717),I(1697,1,ui,fX),l.Mb=function(e){return Et(u(e,57).g,10)},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1697),I(1699,1,Un,zGt),l.td=function(e){Wtn(this.a,this.b,u(e,57))},l.a=0,P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1699),I(1698,1,Oq,WGt),l.Vd=function(){c_(this.b,this.a,-1)},l.a=0,P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1698),I(1700,1,wd,dX),l.Lb=function(e){return u(e,57),!0},l.Fb=function(e){return this===e},l.Mb=function(e){return u(e,57),!0},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1700),I(1701,1,Un,gX),l.td=function(e){u(e,365).Vd()},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1701),I(1702,1,ui,mF),l.Mb=function(e){return Et(u(e,57).g,145)},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1702),I(1704,1,Un,qGt),l.td=function(e){Gan(this.a,this.b,u(e,57))},P(Cs,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1704),I(1521,1,as,rWt),l.pf=function(e,n){Ryn(this,u(e,37),n)};var Kbe;P(Cs,"HorizontalGraphCompactor",1521),I(1522,1,{},w1),l.Oe=function(e,n){var r,s,o;return Pmt(e,n)||(r=Z3(e),s=Z3(n),r&&r.k==(Gn(),xs)||s&&s.k==(Gn(),xs))?0:(o=u(Q(this.a.a,(se(),Y4)),304),ZXe(o,r?r.k:(Gn(),Zs),s?s.k:(Gn(),Zs)))},l.Pe=function(e,n){var r,s,o;return Pmt(e,n)?1:(r=Z3(e),s=Z3(n),o=u(Q(this.a.a,(se(),Y4)),304),M2t(o,r?r.k:(Gn(),Zs),s?s.k:(Gn(),Zs)))},P(Cs,"HorizontalGraphCompactor/1",1522),I(1523,1,{},jT),l.Ne=function(e,n){return q9(),e.a.i==0},P(Cs,"HorizontalGraphCompactor/lambda$0$Type",1523),I(1524,1,{},zd),l.Ne=function(e,n){return knn(this.a,e,n)},P(Cs,"HorizontalGraphCompactor/lambda$1$Type",1524),I(1664,1,{},Bte);var Ybe,Xbe;P(Cs,"LGraphToCGraphTransformer",1664),I(1672,1,ui,pX),l.Mb=function(e){return e!=null},P(Cs,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1672),I(1665,1,{},bX),l.Kb=function(e){return lf(),$o(Q(u(u(e,57).g,10),(se(),_i)))},P(Cs,"LGraphToCGraphTransformer/lambda$0$Type",1665),I(1666,1,{},yF),l.Kb=function(e){return lf(),$re(u(u(e,57).g,145))},P(Cs,"LGraphToCGraphTransformer/lambda$1$Type",1666),I(1675,1,ui,vX),l.Mb=function(e){return lf(),Et(u(e,57).g,10)},P(Cs,"LGraphToCGraphTransformer/lambda$10$Type",1675),I(1676,1,Un,wX),l.td=function(e){xnn(u(e,57))},P(Cs,"LGraphToCGraphTransformer/lambda$11$Type",1676),I(1677,1,ui,mX),l.Mb=function(e){return lf(),Et(u(e,57).g,145)},P(Cs,"LGraphToCGraphTransformer/lambda$12$Type",1677),I(1681,1,Un,yX),l.td=function(e){_un(u(e,57))},P(Cs,"LGraphToCGraphTransformer/lambda$13$Type",1681),I(1678,1,Un,C9),l.td=function(e){XYe(this.a,u(e,8))},l.a=0,P(Cs,"LGraphToCGraphTransformer/lambda$14$Type",1678),I(1679,1,Un,Gb),l.td=function(e){ZYe(this.a,u(e,110))},l.a=0,P(Cs,"LGraphToCGraphTransformer/lambda$15$Type",1679),I(1680,1,Un,nR),l.td=function(e){QYe(this.a,u(e,8))},l.a=0,P(Cs,"LGraphToCGraphTransformer/lambda$16$Type",1680),I(1682,1,{},xX),l.Kb=function(e){return lf(),new Tn(null,new Fv(new ar(lr(Ms(u(e,10)).a.Kc(),new z))))},P(Cs,"LGraphToCGraphTransformer/lambda$17$Type",1682),I(1683,1,ui,kX),l.Mb=function(e){return lf(),Va(u(e,17))},P(Cs,"LGraphToCGraphTransformer/lambda$18$Type",1683),I(1684,1,Un,Dtt),l.td=function(e){Dan(this.a,u(e,17))},P(Cs,"LGraphToCGraphTransformer/lambda$19$Type",1684),I(1668,1,Un,Ott),l.td=function(e){fin(this.a,u(e,145))},P(Cs,"LGraphToCGraphTransformer/lambda$2$Type",1668),I(1685,1,{},xF),l.Kb=function(e){return lf(),new Tn(null,new _n(u(e,29).a,16))},P(Cs,"LGraphToCGraphTransformer/lambda$20$Type",1685),I(1686,1,{},EX),l.Kb=function(e){return lf(),new Tn(null,new Fv(new ar(lr(Ms(u(e,10)).a.Kc(),new z))))},P(Cs,"LGraphToCGraphTransformer/lambda$21$Type",1686),I(1687,1,{},kF),l.Kb=function(e){return lf(),u(Q(u(e,17),(se(),N2)),15)},P(Cs,"LGraphToCGraphTransformer/lambda$22$Type",1687),I(1688,1,ui,TX),l.Mb=function(e){return tQe(u(e,15))},P(Cs,"LGraphToCGraphTransformer/lambda$23$Type",1688),I(1689,1,Un,Ntt),l.td=function(e){Lgn(this.a,u(e,15))},P(Cs,"LGraphToCGraphTransformer/lambda$24$Type",1689),I(1667,1,Un,HGt),l.td=function(e){Jin(this.a,this.b,u(e,145))},P(Cs,"LGraphToCGraphTransformer/lambda$3$Type",1667),I(1669,1,{},CX),l.Kb=function(e){return lf(),new Tn(null,new _n(u(e,29).a,16))},P(Cs,"LGraphToCGraphTransformer/lambda$4$Type",1669),I(1670,1,{},_X),l.Kb=function(e){return lf(),new Tn(null,new Fv(new ar(lr(Ms(u(e,10)).a.Kc(),new z))))},P(Cs,"LGraphToCGraphTransformer/lambda$5$Type",1670),I(1671,1,{},$T),l.Kb=function(e){return lf(),u(Q(u(e,17),(se(),N2)),15)},P(Cs,"LGraphToCGraphTransformer/lambda$6$Type",1671),I(1673,1,Un,Ptt),l.td=function(e){opn(this.a,u(e,15))},P(Cs,"LGraphToCGraphTransformer/lambda$8$Type",1673),I(1674,1,Un,GGt),l.td=function(e){yXe(this.a,this.b,u(e,145))},P(Cs,"LGraphToCGraphTransformer/lambda$9$Type",1674),I(1663,1,{},SX),l.Le=function(e){var n,r,s,o,h;for(this.a=e,this.d=new Gtt,this.c=Pt(JEt,Ie,121,this.a.a.a.c.length,0,1),this.b=0,r=new S(this.a.a.a);r.a=tt&&(ue(h,de(M)),_t=b.Math.max(_t,Bt[M-1]-F),w+=Y,gt+=Bt[M-1]-gt,F=Bt[M-1],Y=k[M]),Y=b.Math.max(Y,k[M]),++M;w+=Y}V=b.Math.min(1/_t,1/n.b/w),V>s&&(s=V,r=h)}return r},l.Wf=function(){return!1},P(kd,"MSDCutIndexHeuristic",802),I(1617,1,as,JX),l.pf=function(e,n){jmn(u(e,37),n)},P(kd,"SingleEdgeGraphWrapper",1617),I(227,22,{3:1,35:1,22:1,227:1},Y9);var q4,a7,o7,Oy,dS,H4,c7=jr(kc,"CenterEdgeLabelPlacementStrategy",227,Hr,Xsn,AZe),c2e;I(422,22,{3:1,35:1,22:1,422:1},Mbt);var xTt,vlt,kTt=jr(kc,"ConstraintCalculationStrategy",422,Hr,$nn,LZe),u2e;I(314,22,{3:1,35:1,22:1,314:1,246:1,234:1},ket),l.Kf=function(){return moe(this)},l.Xf=function(){return moe(this)};var wO,S6,ETt,TTt=jr(kc,"CrossingMinimizationStrategy",314,Hr,Drn,MZe),l2e;I(337,22,{3:1,35:1,22:1,337:1},Eet);var CTt,wlt,OG,_Tt=jr(kc,"CuttingStrategy",337,Hr,Orn,OZe),h2e;I(335,22,{3:1,35:1,22:1,335:1,246:1,234:1},EM),l.Kf=function(){return sce(this)},l.Xf=function(){return sce(this)};var STt,mlt,gS,ylt,pS,ATt=jr(kc,"CycleBreakingStrategy",335,Hr,ksn,NZe),f2e;I(419,22,{3:1,35:1,22:1,419:1},Ibt);var NG,LTt,MTt=jr(kc,"DirectionCongruency",419,Hr,jnn,PZe),d2e;I(450,22,{3:1,35:1,22:1,450:1},Tet);var u7,xlt,G4,g2e=jr(kc,"EdgeConstraint",450,Hr,Nrn,FZe),p2e;I(276,22,{3:1,35:1,22:1,276:1},X9);var klt,Elt,Tlt,Clt,PG,_lt,ITt=jr(kc,"EdgeLabelSideSelection",276,Hr,tan,BZe),b2e;I(479,22,{3:1,35:1,22:1,479:1},Dbt);var FG,DTt,OTt=jr(kc,"EdgeStraighteningStrategy",479,Hr,Rnn,RZe),v2e;I(274,22,{3:1,35:1,22:1,274:1},Q9);var Slt,NTt,PTt,BG,FTt,BTt,RTt=jr(kc,"FixedAlignment",274,Hr,Zsn,jZe),w2e;I(275,22,{3:1,35:1,22:1,275:1},Z9);var jTt,$Tt,zTt,qTt,bS,HTt,GTt=jr(kc,"GraphCompactionStrategy",275,Hr,Qsn,$Ze),m2e;I(256,22,{3:1,35:1,22:1,256:1},Dm);var l7,RG,h7,bh,vS,jG,f7,V4,$G,wS,Alt=jr(kc,"GraphProperties",256,Hr,jon,zZe),y2e;I(292,22,{3:1,35:1,22:1,292:1},Cet);var mO,Llt,Mlt,Ilt=jr(kc,"GreedySwitchType",292,Hr,Brn,qZe),x2e;I(303,22,{3:1,35:1,22:1,303:1},_et);var A6,yO,U4,k2e=jr(kc,"InLayerConstraint",303,Hr,Frn,HZe),E2e;I(420,22,{3:1,35:1,22:1,420:1},Obt);var Dlt,VTt,UTt=jr(kc,"InteractiveReferencePoint",420,Hr,znn,GZe),T2e,WTt,L6,Lw,zG,KTt,YTt,qG,XTt,xO,HG,mS,M6,Ny,Olt,GG,oc,QTt,Mw,Gc,Nlt,Plt,kO,O2,Iw,I6,ZTt,D6,EO,Py,n1,Rh,Flt,W4,Tc,_i,JTt,t9t,e9t,n9t,r9t,Blt,VG,Zu,Dw,Rlt,O6,TO,$1,K4,d7,Y4,X4,g7,N2,i9t,jlt,$lt,N6;I(163,22,{3:1,35:1,22:1,163:1},CM);var yS,fb,xS,Fy,CO,s9t=jr(kc,"LayerConstraint",163,Hr,Csn,VZe),C2e;I(848,1,Ih,UJ),l.Qe=function(e){an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,w6t),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),p9t),(jg(),cs)),MTt),un((Xf(),qn))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,m6t),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(Fn(),!1)),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Kq),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),x9t),cs),UTt),un(qn)))),aa(e,Kq,$ot,bve),aa(e,Kq,$_,pve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,y6t),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,x6t),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),Aa),Bs),un(qn)))),an(e,new Xe(QKe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,k6t),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),Aa),Bs),un($2)),ct(ot(Ae,1),te,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,E6t),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),L9t),cs),BCt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,T6t),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),de(7)),gc),ja),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,C6t),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,_6t),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,$ot),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),g9t),cs),ATt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,GD),lct),"Node Layering Strategy"),"Strategy for node layering."),T9t),cs),CCt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,S6t),lct),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),k9t),cs),s9t),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,A6t),lct),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),de(-1)),gc),ja),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,L6t),lct),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),de(-1)),gc),ja),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,zot),p1e),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),de(4)),gc),ja),un(qn)))),aa(e,zot,GD,Eve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,qot),p1e),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),de(2)),gc),ja),un(qn)))),aa(e,qot,GD,Cve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Hot),b1e),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),E9t),cs),NCt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Got),b1e),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),de(0)),gc),ja),un(qn)))),aa(e,Got,Hot,null),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Vot),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),de(vi)),gc),ja),un(qn)))),aa(e,Vot,GD,wve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,$_),VD),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),d9t),cs),TTt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,M6t),VD),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Uot),VD),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),Do),ca),un(qn)))),aa(e,Uot,oH,G2e),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Wot),VD),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),Aa),Bs),un(qn)))),aa(e,Wot,$_,K2e),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,I6t),VD),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),de(-1)),gc),ja),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,D6t),VD),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),de(-1)),gc),ja),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,O6t),v1e),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),de(40)),gc),ja),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Kot),v1e),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),f9t),cs),Ilt),un(qn)))),aa(e,Kot,$_,q2e),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Yq),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),h9t),cs),Ilt),un(qn)))),aa(e,Yq,$_,j2e),aa(e,Yq,oH,$2e),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,M4),w1e),"Node Placement Strategy"),"Strategy for node placement."),A9t),cs),LCt),un(qn)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Xq),w1e),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),Aa),Bs),un(qn)))),aa(e,Xq,M4,Fve),aa(e,Xq,M4,Bve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Yot),m1e),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),C9t),cs),OTt),un(qn)))),aa(e,Yot,M4,Dve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Xot),m1e),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),_9t),cs),RTt),un(qn)))),aa(e,Xot,M4,Nve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Qot),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),Do),ca),un(qn)))),aa(e,Qot,M4,jve),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Zot),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),cs),uht),un(Js)))),aa(e,Zot,M4,Hve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Jot),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),S9t),cs),uht),un(qn)))),aa(e,Jot,M4,qve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,N6t),y1e),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),w9t),cs),$Ct),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,P6t),y1e),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),m9t),cs),zCt),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Qq),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),y9t),cs),HCt),un(qn)))),aa(e,Qq,UD,sve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Zq),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),Do),ca),un(qn)))),aa(e,Zq,UD,ove),aa(e,Zq,Qq,cve),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,tct),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),Do),ca),un(qn)))),aa(e,tct,UD,eve),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,F6t),F1),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,B6t),F1),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,R6t),F1),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,j6t),F1),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,$6t),Y6t),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),de(0)),gc),ja),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,z6t),Y6t),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),de(0)),gc),ja),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,q6t),Y6t),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),de(0)),gc),ja),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ect),X6t),Ffe),"Tries to further compact components (disconnected sub-graphs)."),!1),Aa),Bs),un(qn)))),aa(e,ect,P_,!0),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,H6t),x1e),"Post Compaction Strategy"),k1e),o9t),cs),GTt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,G6t),x1e),"Post Compaction Constraint Calculation"),k1e),a9t),cs),kTt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Jq),Q6t),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,nct),Q6t),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),de(16)),gc),ja),un(qn)))),aa(e,nct,Jq,!0),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,rct),Q6t),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),de(5)),gc),ja),un(qn)))),aa(e,rct,Jq,!0),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Y0),Z6t),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),D9t),cs),WCt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,tH),Z6t),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),Do),ca),un(qn)))),aa(e,tH,Y0,nwe),aa(e,tH,Y0,rwe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,eH),Z6t),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),Do),ca),un(qn)))),aa(e,eH,Y0,swe),aa(e,eH,Y0,awe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,z_),E1e),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),I9t),cs),_Tt),un(qn)))),aa(e,z_,Y0,fwe),aa(e,z_,Y0,dwe),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,ict),E1e),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),q1),ph),un(qn)))),aa(e,ict,z_,cwe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,sct),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),M9t),gc),ja),un(qn)))),aa(e,sct,z_,lwe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,nH),T1e),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),O9t),cs),UCt),un(qn)))),aa(e,nH,Y0,Cwe),aa(e,nH,Y0,_we),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,rH),T1e),"Valid Indices for Wrapping"),null),q1),ph),un(qn)))),aa(e,rH,Y0,kwe),aa(e,rH,Y0,Ewe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,iH),J6t),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),Aa),Bs),un(qn)))),aa(e,iH,Y0,vwe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,sH),J6t),"Distance Penalty When Improving Cuts"),null),2),Do),ca),un(qn)))),aa(e,sH,Y0,pwe),aa(e,sH,iH,!0),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,act),J6t),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),Aa),Bs),un(qn)))),aa(e,act,Y0,mwe),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,V6t),hct),"Edge Label Side Selection"),"Method to decide on edge label sides."),v9t),cs),ITt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,U6t),hct),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),b9t),cs),c7),ji(qn,ct(ot(Qg,1),ae,175,0,[Xg]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,aH),WD),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),l9t),cs),FCt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,W6t),WD),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),Aa),Bs),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,oct),WD),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),c9t),cs),A7t),un(qn)))),aa(e,oct,P_,null),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,K6t),WD),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),u9t),cs),SCt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,cct),WD),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),Do),ca),un(qn)))),aa(e,cct,aH,null),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,uct),WD),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),Do),ca),un(qn)))),aa(e,uct,aH,null),zhe((new DB,e))};var _2e,S2e,A2e,a9t,L2e,o9t,M2e,c9t,I2e,D2e,O2e,u9t,N2e,P2e,l9t,F2e,B2e,R2e,h9t,j2e,$2e,z2e,f9t,q2e,H2e,G2e,V2e,U2e,W2e,K2e,Y2e,d9t,X2e,g9t,Q2e,p9t,Z2e,b9t,J2e,v9t,tve,eve,nve,w9t,rve,m9t,ive,y9t,sve,ave,ove,cve,uve,lve,hve,fve,dve,gve,x9t,pve,bve,vve,wve,mve,yve,k9t,xve,kve,Eve,Tve,Cve,_ve,Sve,E9t,Ave,T9t,Lve,Mve,Ive,C9t,Dve,Ove,_9t,Nve,Pve,Fve,Bve,Rve,jve,$ve,zve,S9t,qve,Hve,Gve,A9t,Vve,L9t,Uve,Wve,Kve,Yve,Xve,Qve,Zve,Jve,twe,ewe,nwe,rwe,iwe,swe,awe,owe,cwe,uwe,M9t,lwe,hwe,I9t,fwe,dwe,gwe,pwe,bwe,vwe,wwe,mwe,ywe,D9t,xwe,kwe,Ewe,Twe,O9t,Cwe,_we;P(kc,"LayeredMetaDataProvider",848),I(986,1,Ih,DB),l.Qe=function(e){zhe(e)};var Ld,zlt,UG,kS,WG,N9t,KG,P6,YG,P9t,F9t,qlt,db,Hlt,By,B9t,_O,Glt,R9t,Swe,XG,Vlt,ES,Ry,Awe,Vl,j9t,$9t,QG,Ult,Md,ZG,X0,z9t,q9t,H9t,Wlt,Klt,G9t,Ug,Ylt,V9t,jy,U9t,W9t,K9t,JG,$y,P2,Y9t,X9t,_o,Q9t,Lwe,cu,tV,Z9t,J9t,tCt,Xlt,eCt,eV,nCt,rCt,nV,Ow,iCt,Qlt,TS,sCt,Nw,CS,rV,F2,Zlt,p7,iV,B2,aCt,oCt,cCt,b7,uCt,Mwe,Iwe,Dwe,Owe,Pw,zy,os,Wg,Nwe,qy,lCt,v7,hCt,Hy,Pwe,w7,fCt,F6,Fwe,Bwe,SO,Jlt,dCt,AO,xf,Q4,B6,Fw,R2,sV,Gy,tht,m7,y7,Bw,Z4,eht,LO,_S,SS,nht,gCt,pCt,bCt,vCt,rht,wCt,mCt,yCt,xCt,iht,aV;P(kc,"LayeredOptions",986),I(987,1,{},eQ),l.$e=function(){var e;return e=new Qzt,e},l._e=function(e){},P(kc,"LayeredOptions/LayeredFactory",987),I(1372,1,{}),l.a=0;var Rwe;P(Ec,"ElkSpacings/AbstractSpacingsBuilder",1372),I(779,1372,{},l3t);var oV,jwe;P(kc,"LayeredSpacings/LayeredSpacingsBuilder",779),I(313,22,{3:1,35:1,22:1,313:1,246:1,234:1},J9),l.Kf=function(){return yce(this)},l.Xf=function(){return yce(this)};var sht,kCt,ECt,cV,aht,TCt,CCt=jr(kc,"LayeringStrategy",313,Hr,Jsn,UZe),$we;I(378,22,{3:1,35:1,22:1,378:1},Aet);var oht,_Ct,uV,SCt=jr(kc,"LongEdgeOrderingStrategy",378,Hr,Irn,WZe),zwe;I(197,22,{3:1,35:1,22:1,197:1},VR);var J4,t5,lV,cht,uht=jr(kc,"NodeFlexibility",197,Hr,Rin,KZe),qwe;I(315,22,{3:1,35:1,22:1,315:1,246:1,234:1},TM),l.Kf=function(){return ice(this)},l.Xf=function(){return ice(this)};var AS,lht,hht,LS,ACt,LCt=jr(kc,"NodePlacementStrategy",315,Hr,xsn,tJe),Hwe;I(260,22,{3:1,35:1,22:1,260:1},Cx);var MCt,MO,ICt,DCt,IO,OCt,hV,fV,NCt=jr(kc,"NodePromotionStrategy",260,Hr,Zan,XZe),Gwe;I(339,22,{3:1,35:1,22:1,339:1},Let);var PCt,gb,fht,FCt=jr(kc,"OrderingStrategy",339,Hr,jrn,QZe),Vwe;I(421,22,{3:1,35:1,22:1,421:1},Nbt);var dht,ght,BCt=jr(kc,"PortSortingStrategy",421,Hr,qnn,ZZe),Uwe;I(452,22,{3:1,35:1,22:1,452:1},Met);var Ju,eu,MS,Wwe=jr(kc,"PortType",452,Hr,Rrn,YZe),Kwe;I(375,22,{3:1,35:1,22:1,375:1},Iet);var RCt,pht,jCt,$Ct=jr(kc,"SelfLoopDistributionStrategy",375,Hr,$rn,JZe),Ywe;I(376,22,{3:1,35:1,22:1,376:1},Pbt);var DO,bht,zCt=jr(kc,"SelfLoopOrderingStrategy",376,Hr,Bnn,eJe),Xwe;I(304,1,{304:1},Hle),P(kc,"Spacings",304),I(336,22,{3:1,35:1,22:1,336:1},Det);var vht,qCt,IS,HCt=jr(kc,"SplineRoutingMode",336,Hr,qrn,nJe),Qwe;I(338,22,{3:1,35:1,22:1,338:1},Oet);var wht,GCt,VCt,UCt=jr(kc,"ValidifyStrategy",338,Hr,Hrn,rJe),Zwe;I(377,22,{3:1,35:1,22:1,377:1},Net);var Vy,mht,x7,WCt=jr(kc,"WrappingStrategy",377,Hr,zrn,iJe),Jwe;I(1383,1,zc,YJ),l.Yf=function(e){return u(e,37),tme},l.pf=function(e,n){Oyn(this,u(e,37),n)};var tme;P(lH,"DepthFirstCycleBreaker",1383),I(782,1,zc,Kvt),l.Yf=function(e){return u(e,37),eme},l.pf=function(e,n){I5n(this,u(e,37),n)},l.Zf=function(e){return u(Fe(e,zz(this.d,e.c.length)),10)};var eme;P(lH,"GreedyCycleBreaker",782),I(1386,782,zc,MVt),l.Zf=function(e){var n,r,s,o;for(o=null,n=vi,s=new S(e);s.a1&&(je(Re(Q(Fa((An(0,e.c.length),u(e.c[0],10))),(Te(),By))))?gce(e,this.d,u(this,660)):(vn(),Xs(e,this.d)),Nne(this.e,e))},l.Sf=function(e,n,r,s){var o,h,d,w,k,C,M;for(n!=sYt(r,e.length)&&(h=e[n-(r?1:-1)],mmt(this.f,h,r?(so(),eu):(so(),Ju))),o=e[n][0],M=!s||o.k==(Gn(),xs),C=_1(e[n]),this.ag(C,M,!1,r),d=0,k=new S(C);k.a"),e0?grt(this.a,e[n-1],e[n]):!r&&n1&&(je(Re(Q(Fa((An(0,e.c.length),u(e.c[0],10))),(Te(),By))))?gce(e,this.d,this):(vn(),Xs(e,this.d)),je(Re(Q(Fa((An(0,e.c.length),u(e.c[0],10))),By)))||Nne(this.e,e))},P($u,"ModelOrderBarycenterHeuristic",660),I(1803,1,Oi,g$t),l.ue=function(e,n){return W0n(this.a,u(e,10),u(n,10))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P($u,"ModelOrderBarycenterHeuristic/lambda$0$Type",1803),I(1403,1,zc,JJ),l.Yf=function(e){var n;return u(e,37),n=ij(gme),bi(n,(Wa(),ou),(ro(),xG)),n},l.pf=function(e,n){Dnn((u(e,37),n))};var gme;P($u,"NoCrossingMinimizer",1403),I(796,402,Pkt,ibt),l.$f=function(e,n,r){var s,o,h,d,w,k,C,M,F,H,V;switch(F=this.g,r.g){case 1:{for(o=0,h=0,M=new S(e.j);M.a1&&(o.j==(be(),Hn)?this.b[e]=!0:o.j==Bn&&e>0&&(this.b[e-1]=!0))},l.f=0,P(s0,"AllCrossingsCounter",1798),I(587,1,{},rz),l.b=0,l.d=0,P(s0,"BinaryIndexedTree",587),I(524,1,{},HM);var XCt,gV;P(s0,"CrossingsCounter",524),I(1906,1,Oi,p$t),l.ue=function(e,n){return Ptn(this.a,u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(s0,"CrossingsCounter/lambda$0$Type",1906),I(1907,1,Oi,b$t),l.ue=function(e,n){return Ftn(this.a,u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(s0,"CrossingsCounter/lambda$1$Type",1907),I(1908,1,Oi,v$t),l.ue=function(e,n){return Btn(this.a,u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(s0,"CrossingsCounter/lambda$2$Type",1908),I(1909,1,Oi,w$t),l.ue=function(e,n){return Rtn(this.a,u(e,11),u(n,11))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(s0,"CrossingsCounter/lambda$3$Type",1909),I(1910,1,Un,m$t),l.td=function(e){man(this.a,u(e,11))},P(s0,"CrossingsCounter/lambda$4$Type",1910),I(1911,1,ui,y$t),l.Mb=function(e){return OYe(this.a,u(e,11))},P(s0,"CrossingsCounter/lambda$5$Type",1911),I(1912,1,Un,x$t),l.td=function(e){_Vt(this,e)},P(s0,"CrossingsCounter/lambda$6$Type",1912),I(1913,1,Un,ZGt),l.td=function(e){var n;g8(),qp(this.b,(n=this.a,u(e,11),n))},P(s0,"CrossingsCounter/lambda$7$Type",1913),I(826,1,wd,BF),l.Lb=function(e){return g8(),Vs(u(e,11),(se(),Zu))},l.Fb=function(e){return this===e},l.Mb=function(e){return g8(),Vs(u(e,11),(se(),Zu))},P(s0,"CrossingsCounter/lambda$8$Type",826),I(1905,1,{},k$t),P(s0,"HyperedgeCrossingsCounter",1905),I(467,1,{35:1,467:1},qWt),l.wd=function(e){return bhn(this,u(e,467))},l.b=0,l.c=0,l.e=0,l.f=0;var fxn=P(s0,"HyperedgeCrossingsCounter/Hyperedge",467);I(362,1,{35:1,362:1},e$),l.wd=function(e){return gbn(this,u(e,362))},l.b=0,l.c=0;var pme=P(s0,"HyperedgeCrossingsCounter/HyperedgeCorner",362);I(523,22,{3:1,35:1,22:1,523:1},Fbt);var OS,NS,bme=jr(s0,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",523,Hr,Hnn,aJe),vme;I(1405,1,zc,KJ),l.Yf=function(e){return u(Q(u(e,37),(se(),Gc)),21).Hc((oo(),bh))?wme:null},l.pf=function(e,n){P1n(this,u(e,37),n)};var wme;P(uo,"InteractiveNodePlacer",1405),I(1406,1,zc,WJ),l.Yf=function(e){return u(Q(u(e,37),(se(),Gc)),21).Hc((oo(),bh))?mme:null},l.pf=function(e,n){mfn(this,u(e,37),n)};var mme,pV,bV;P(uo,"LinearSegmentsNodePlacer",1406),I(257,1,{35:1,257:1},Npt),l.wd=function(e){return VKe(this,u(e,257))},l.Fb=function(e){var n;return Et(e,257)?(n=u(e,257),this.b==n.b):!1},l.Hb=function(){return this.b},l.Ib=function(){return"ls"+Qp(this.e)},l.a=0,l.b=0,l.c=-1,l.d=-1,l.g=0;var yme=P(uo,"LinearSegmentsNodePlacer/LinearSegment",257);I(1408,1,zc,pYt),l.Yf=function(e){return u(Q(u(e,37),(se(),Gc)),21).Hc((oo(),bh))?xme:null},l.pf=function(e,n){E5n(this,u(e,37),n)},l.b=0,l.g=0;var xme;P(uo,"NetworkSimplexPlacer",1408),I(1427,1,Oi,aQ),l.ue=function(e,n){return du(u(e,19).a,u(n,19).a)},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(uo,"NetworkSimplexPlacer/0methodref$compare$Type",1427),I(1429,1,Oi,oQ),l.ue=function(e,n){return du(u(e,19).a,u(n,19).a)},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(uo,"NetworkSimplexPlacer/1methodref$compare$Type",1429),I(649,1,{649:1},JGt);var dxn=P(uo,"NetworkSimplexPlacer/EdgeRep",649);I(401,1,{401:1},_wt),l.b=!1;var gxn=P(uo,"NetworkSimplexPlacer/NodeRep",401);I(508,12,{3:1,4:1,20:1,28:1,52:1,12:1,14:1,15:1,54:1,508:1},cqt),P(uo,"NetworkSimplexPlacer/Path",508),I(1409,1,{},cQ),l.Kb=function(e){return u(e,17).d.i.k},P(uo,"NetworkSimplexPlacer/Path/lambda$0$Type",1409),I(1410,1,ui,uQ),l.Mb=function(e){return u(e,267)==(Gn(),Zs)},P(uo,"NetworkSimplexPlacer/Path/lambda$1$Type",1410),I(1411,1,{},lQ),l.Kb=function(e){return u(e,17).d.i},P(uo,"NetworkSimplexPlacer/Path/lambda$2$Type",1411),I(1412,1,ui,E$t),l.Mb=function(e){return _Wt(hie(u(e,10)))},P(uo,"NetworkSimplexPlacer/Path/lambda$3$Type",1412),I(1413,1,ui,hQ),l.Mb=function(e){return Ttn(u(e,11))},P(uo,"NetworkSimplexPlacer/lambda$0$Type",1413),I(1414,1,Un,tVt),l.td=function(e){xXe(this.a,this.b,u(e,11))},P(uo,"NetworkSimplexPlacer/lambda$1$Type",1414),I(1423,1,Un,T$t),l.td=function(e){zgn(this.a,u(e,17))},P(uo,"NetworkSimplexPlacer/lambda$10$Type",1423),I(1424,1,{},fQ),l.Kb=function(e){return Ol(),new Tn(null,new _n(u(e,29).a,16))},P(uo,"NetworkSimplexPlacer/lambda$11$Type",1424),I(1425,1,Un,C$t),l.td=function(e){Bvn(this.a,u(e,10))},P(uo,"NetworkSimplexPlacer/lambda$12$Type",1425),I(1426,1,{},dQ),l.Kb=function(e){return Ol(),de(u(e,121).e)},P(uo,"NetworkSimplexPlacer/lambda$13$Type",1426),I(1428,1,{},gQ),l.Kb=function(e){return Ol(),de(u(e,121).e)},P(uo,"NetworkSimplexPlacer/lambda$15$Type",1428),I(1430,1,ui,pQ),l.Mb=function(e){return Ol(),u(e,401).c.k==(Gn(),Ds)},P(uo,"NetworkSimplexPlacer/lambda$17$Type",1430),I(1431,1,ui,bQ),l.Mb=function(e){return Ol(),u(e,401).c.j.c.length>1},P(uo,"NetworkSimplexPlacer/lambda$18$Type",1431),I(1432,1,Un,kXt),l.td=function(e){Sln(this.c,this.b,this.d,this.a,u(e,401))},l.c=0,l.d=0,P(uo,"NetworkSimplexPlacer/lambda$19$Type",1432),I(1415,1,{},vQ),l.Kb=function(e){return Ol(),new Tn(null,new _n(u(e,29).a,16))},P(uo,"NetworkSimplexPlacer/lambda$2$Type",1415),I(1433,1,Un,_$t),l.td=function(e){mXe(this.a,u(e,11))},l.a=0,P(uo,"NetworkSimplexPlacer/lambda$20$Type",1433),I(1434,1,{},Y5),l.Kb=function(e){return Ol(),new Tn(null,new _n(u(e,29).a,16))},P(uo,"NetworkSimplexPlacer/lambda$21$Type",1434),I(1435,1,Un,S$t),l.td=function(e){NXe(this.a,u(e,10))},P(uo,"NetworkSimplexPlacer/lambda$22$Type",1435),I(1436,1,ui,RF),l.Mb=function(e){return _Wt(e)},P(uo,"NetworkSimplexPlacer/lambda$23$Type",1436),I(1437,1,{},wQ),l.Kb=function(e){return Ol(),new Tn(null,new _n(u(e,29).a,16))},P(uo,"NetworkSimplexPlacer/lambda$24$Type",1437),I(1438,1,ui,A$t),l.Mb=function(e){return $Ye(this.a,u(e,10))},P(uo,"NetworkSimplexPlacer/lambda$25$Type",1438),I(1439,1,Un,eVt),l.td=function(e){ugn(this.a,this.b,u(e,10))},P(uo,"NetworkSimplexPlacer/lambda$26$Type",1439),I(1440,1,ui,mQ),l.Mb=function(e){return Ol(),!Va(u(e,17))},P(uo,"NetworkSimplexPlacer/lambda$27$Type",1440),I(1441,1,ui,yQ),l.Mb=function(e){return Ol(),!Va(u(e,17))},P(uo,"NetworkSimplexPlacer/lambda$28$Type",1441),I(1442,1,{},L$t),l.Ce=function(e,n){return IXe(this.a,u(e,29),u(n,29))},P(uo,"NetworkSimplexPlacer/lambda$29$Type",1442),I(1416,1,{},jF),l.Kb=function(e){return Ol(),new Tn(null,new Fv(new ar(lr(Ms(u(e,10)).a.Kc(),new z))))},P(uo,"NetworkSimplexPlacer/lambda$3$Type",1416),I(1417,1,ui,xQ),l.Mb=function(e){return Ol(),win(u(e,17))},P(uo,"NetworkSimplexPlacer/lambda$4$Type",1417),I(1418,1,Un,M$t),l.td=function(e){Fmn(this.a,u(e,17))},P(uo,"NetworkSimplexPlacer/lambda$5$Type",1418),I(1419,1,{},GT),l.Kb=function(e){return Ol(),new Tn(null,new _n(u(e,29).a,16))},P(uo,"NetworkSimplexPlacer/lambda$6$Type",1419),I(1420,1,ui,kQ),l.Mb=function(e){return Ol(),u(e,10).k==(Gn(),Ds)},P(uo,"NetworkSimplexPlacer/lambda$7$Type",1420),I(1421,1,{},EQ),l.Kb=function(e){return Ol(),new Tn(null,new Fv(new ar(lr(z0(u(e,10)).a.Kc(),new z))))},P(uo,"NetworkSimplexPlacer/lambda$8$Type",1421),I(1422,1,ui,TQ),l.Mb=function(e){return Ol(),wtn(u(e,17))},P(uo,"NetworkSimplexPlacer/lambda$9$Type",1422),I(1404,1,zc,p9),l.Yf=function(e){return u(Q(u(e,37),(se(),Gc)),21).Hc((oo(),bh))?kme:null},l.pf=function(e,n){vyn(u(e,37),n)};var kme;P(uo,"SimpleNodePlacer",1404),I(180,1,{180:1},x4),l.Ib=function(){var e;return e="",this.c==(dd(),Rw)?e+=g6:this.c==Kg&&(e+=d6),this.o==(E1(),j2)?e+=yot:this.o==z1?e+="UP":e+="BALANCED",e},P(sb,"BKAlignedLayout",180),I(516,22,{3:1,35:1,22:1,516:1},Rbt);var Kg,Rw,Eme=jr(sb,"BKAlignedLayout/HDirection",516,Hr,Vnn,oJe),Tme;I(515,22,{3:1,35:1,22:1,515:1},Bbt);var j2,z1,Cme=jr(sb,"BKAlignedLayout/VDirection",515,Hr,Unn,cJe),_me;I(1634,1,{},nVt),P(sb,"BKAligner",1634),I(1637,1,{},Pse),P(sb,"BKCompactor",1637),I(654,1,{654:1},CQ),l.a=0,P(sb,"BKCompactor/ClassEdge",654),I(458,1,{458:1},aqt),l.a=null,l.b=0,P(sb,"BKCompactor/ClassNode",458),I(1407,1,zc,AVt),l.Yf=function(e){return u(Q(u(e,37),(se(),Gc)),21).Hc((oo(),bh))?Sme:null},l.pf=function(e,n){R5n(this,u(e,37),n)},l.d=!1;var Sme;P(sb,"BKNodePlacer",1407),I(1635,1,{},_Q),l.d=0,P(sb,"NeighborhoodInformation",1635),I(1636,1,Oi,I$t),l.ue=function(e,n){return Van(this,u(e,46),u(n,46))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(sb,"NeighborhoodInformation/NeighborComparator",1636),I(808,1,{}),P(sb,"ThresholdStrategy",808),I(1763,808,{},hqt),l.bg=function(e,n,r){return this.a.o==(E1(),z1)?ss:Ts},l.cg=function(){},P(sb,"ThresholdStrategy/NullThresholdStrategy",1763),I(579,1,{579:1},rVt),l.c=!1,l.d=!1,P(sb,"ThresholdStrategy/Postprocessable",579),I(1764,808,{},fqt),l.bg=function(e,n,r){var s,o,h;return o=n==r,s=this.a.a[r.p]==n,o||s?(h=e,this.a.c==(dd(),Rw)?(o&&(h=yat(this,n,!0)),!isNaN(h)&&!isFinite(h)&&s&&(h=yat(this,r,!1))):(o&&(h=yat(this,n,!0)),!isNaN(h)&&!isFinite(h)&&s&&(h=yat(this,r,!1))),h):e},l.cg=function(){for(var e,n,r,s,o;this.d.b!=0;)o=u(crn(this.d),579),s=nle(this,o),s.a&&(e=s.a,r=je(this.a.f[this.a.g[o.b.p].p]),!(!r&&!Va(e)&&e.c.i.c==e.d.i.c)&&(n=uce(this,o),n||KYe(this.e,o)));for(;this.e.a.c.length!=0;)uce(this,u(mre(this.e),579))},P(sb,"ThresholdStrategy/SimpleThresholdStrategy",1764),I(635,1,{635:1,246:1,234:1},SQ),l.Kf=function(){return Lne(this)},l.Xf=function(){return Lne(this)};var yht;P(bct,"EdgeRouterFactory",635),I(1458,1,zc,id),l.Yf=function(e){return bvn(u(e,37))},l.pf=function(e,n){Tyn(u(e,37),n)};var Ame,Lme,Mme,Ime,Dme,QCt,Ome,Nme;P(bct,"OrthogonalEdgeRouter",1458),I(1451,1,zc,LVt),l.Yf=function(e){return $1n(u(e,37))},l.pf=function(e,n){G4n(this,u(e,37),n)};var Pme,Fme,Bme,Rme,NO,jme;P(bct,"PolylineEdgeRouter",1451),I(1452,1,wd,AQ),l.Lb=function(e){return dyt(u(e,10))},l.Fb=function(e){return this===e},l.Mb=function(e){return dyt(u(e,10))},P(bct,"PolylineEdgeRouter/1",1452),I(1809,1,ui,LQ),l.Mb=function(e){return u(e,129).c==(Vf(),pb)},P(Jf,"HyperEdgeCycleDetector/lambda$0$Type",1809),I(1810,1,{},MQ),l.Ge=function(e){return u(e,129).d},P(Jf,"HyperEdgeCycleDetector/lambda$1$Type",1810),I(1811,1,ui,IQ),l.Mb=function(e){return u(e,129).c==(Vf(),pb)},P(Jf,"HyperEdgeCycleDetector/lambda$2$Type",1811),I(1812,1,{},X5),l.Ge=function(e){return u(e,129).d},P(Jf,"HyperEdgeCycleDetector/lambda$3$Type",1812),I(1813,1,{},DQ),l.Ge=function(e){return u(e,129).d},P(Jf,"HyperEdgeCycleDetector/lambda$4$Type",1813),I(1814,1,{},OQ),l.Ge=function(e){return u(e,129).d},P(Jf,"HyperEdgeCycleDetector/lambda$5$Type",1814),I(112,1,{35:1,112:1},LI),l.wd=function(e){return UKe(this,u(e,112))},l.Fb=function(e){var n;return Et(e,112)?(n=u(e,112),this.g==n.g):!1},l.Hb=function(){return this.g},l.Ib=function(){var e,n,r,s;for(e=new Il("{"),s=new S(this.n);s.a"+this.b+" ("+rQe(this.c)+")"},l.d=0,P(Jf,"HyperEdgeSegmentDependency",129),I(520,22,{3:1,35:1,22:1,520:1},jbt);var pb,Uy,$me=jr(Jf,"HyperEdgeSegmentDependency/DependencyType",520,Hr,Gnn,uJe),zme;I(1815,1,{},D$t),P(Jf,"HyperEdgeSegmentSplitter",1815),I(1816,1,{},uHt),l.a=0,l.b=0,P(Jf,"HyperEdgeSegmentSplitter/AreaRating",1816),I(329,1,{329:1},ynt),l.a=0,l.b=0,l.c=0,P(Jf,"HyperEdgeSegmentSplitter/FreeArea",329),I(1817,1,Oi,$Q),l.ue=function(e,n){return JQe(u(e,112),u(n,112))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Jf,"HyperEdgeSegmentSplitter/lambda$0$Type",1817),I(1818,1,Un,EXt),l.td=function(e){isn(this.a,this.d,this.c,this.b,u(e,112))},l.b=0,P(Jf,"HyperEdgeSegmentSplitter/lambda$1$Type",1818),I(1819,1,{},zQ),l.Kb=function(e){return new Tn(null,new _n(u(e,112).e,16))},P(Jf,"HyperEdgeSegmentSplitter/lambda$2$Type",1819),I(1820,1,{},qQ),l.Kb=function(e){return new Tn(null,new _n(u(e,112).j,16))},P(Jf,"HyperEdgeSegmentSplitter/lambda$3$Type",1820),I(1821,1,{},HQ),l.Fe=function(e){return Xt(ye(e))},P(Jf,"HyperEdgeSegmentSplitter/lambda$4$Type",1821),I(655,1,{},Gnt),l.a=0,l.b=0,l.c=0,P(Jf,"OrthogonalRoutingGenerator",655),I(1638,1,{},GQ),l.Kb=function(e){return new Tn(null,new _n(u(e,112).e,16))},P(Jf,"OrthogonalRoutingGenerator/lambda$0$Type",1638),I(1639,1,{},VQ),l.Kb=function(e){return new Tn(null,new _n(u(e,112).j,16))},P(Jf,"OrthogonalRoutingGenerator/lambda$1$Type",1639),I(661,1,{}),P(vct,"BaseRoutingDirectionStrategy",661),I(1807,661,{},dqt),l.dg=function(e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt;if(!(e.r&&!e.q))for(M=n+e.o*r,C=new S(e.n);C.ayd&&(h=M,o=e,s=new $e(F,h),ni(d.a,s),fw(this,d,o,s,!1),H=e.r,H&&(V=Xt(ye(Qf(H.e,0))),s=new $e(V,h),ni(d.a,s),fw(this,d,o,s,!1),h=n+H.o*r,o=H,s=new $e(V,h),ni(d.a,s),fw(this,d,o,s,!1)),s=new $e(tt,h),ni(d.a,s),fw(this,d,o,s,!1)))},l.eg=function(e){return e.i.n.a+e.n.a+e.a.a},l.fg=function(){return be(),mr},l.gg=function(){return be(),Nn},P(vct,"NorthToSouthRoutingStrategy",1807),I(1808,661,{},gqt),l.dg=function(e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt;if(!(e.r&&!e.q))for(M=n-e.o*r,C=new S(e.n);C.ayd&&(h=M,o=e,s=new $e(F,h),ni(d.a,s),fw(this,d,o,s,!1),H=e.r,H&&(V=Xt(ye(Qf(H.e,0))),s=new $e(V,h),ni(d.a,s),fw(this,d,o,s,!1),h=n-H.o*r,o=H,s=new $e(V,h),ni(d.a,s),fw(this,d,o,s,!1)),s=new $e(tt,h),ni(d.a,s),fw(this,d,o,s,!1)))},l.eg=function(e){return e.i.n.a+e.n.a+e.a.a},l.fg=function(){return be(),Nn},l.gg=function(){return be(),mr},P(vct,"SouthToNorthRoutingStrategy",1808),I(1806,661,{},pqt),l.dg=function(e,n,r){var s,o,h,d,w,k,C,M,F,H,V,Y,tt;if(!(e.r&&!e.q))for(M=n+e.o*r,C=new S(e.n);C.ayd&&(h=M,o=e,s=new $e(h,F),ni(d.a,s),fw(this,d,o,s,!0),H=e.r,H&&(V=Xt(ye(Qf(H.e,0))),s=new $e(h,V),ni(d.a,s),fw(this,d,o,s,!0),h=n+H.o*r,o=H,s=new $e(h,V),ni(d.a,s),fw(this,d,o,s,!0)),s=new $e(h,tt),ni(d.a,s),fw(this,d,o,s,!0)))},l.eg=function(e){return e.i.n.b+e.n.b+e.a.b},l.fg=function(){return be(),Hn},l.gg=function(){return be(),Bn},P(vct,"WestToEastRoutingStrategy",1806),I(813,1,{},sxt),l.Ib=function(){return Qp(this.a)},l.b=0,l.c=!1,l.d=!1,l.f=0,P(Ty,"NubSpline",813),I(407,1,{407:1},Rce,rQt),P(Ty,"NubSpline/PolarCP",407),I(1453,1,zc,Sse),l.Yf=function(e){return Ldn(u(e,37))},l.pf=function(e,n){u5n(this,u(e,37),n)};var qme,Hme,Gme,Vme,Ume;P(Ty,"SplineEdgeRouter",1453),I(268,1,{268:1},S$),l.Ib=function(){return this.a+" ->("+this.c+") "+this.b},l.c=0,P(Ty,"SplineEdgeRouter/Dependency",268),I(455,22,{3:1,35:1,22:1,455:1},$bt);var bb,e5,Wme=jr(Ty,"SplineEdgeRouter/SideToProcess",455,Hr,Wnn,lJe),Kme;I(1454,1,ui,jQ),l.Mb=function(e){return b_(),!u(e,128).o},P(Ty,"SplineEdgeRouter/lambda$0$Type",1454),I(1455,1,{},RQ),l.Ge=function(e){return b_(),u(e,128).v+1},P(Ty,"SplineEdgeRouter/lambda$1$Type",1455),I(1456,1,Un,iVt),l.td=function(e){ytn(this.a,this.b,u(e,46))},P(Ty,"SplineEdgeRouter/lambda$2$Type",1456),I(1457,1,Un,sVt),l.td=function(e){xtn(this.a,this.b,u(e,46))},P(Ty,"SplineEdgeRouter/lambda$3$Type",1457),I(128,1,{35:1,128:1},eoe,hxt),l.wd=function(e){return WKe(this,u(e,128))},l.b=0,l.e=!1,l.f=0,l.g=0,l.j=!1,l.k=!1,l.n=0,l.o=!1,l.p=!1,l.q=!1,l.s=0,l.u=0,l.v=0,l.F=0,P(Ty,"SplineSegment",128),I(459,1,{459:1},VT),l.a=0,l.b=!1,l.c=!1,l.d=!1,l.e=!1,l.f=0,P(Ty,"SplineSegment/EdgeInformation",459),I(1234,1,{},NQ),P(q_,a6t,1234),I(1235,1,Oi,PQ),l.ue=function(e,n){return rpn(u(e,135),u(n,135))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(q_,jfe,1235),I(1233,1,{},CHt),P(q_,"MrTree",1233),I(393,22,{3:1,35:1,22:1,393:1,246:1,234:1},UR),l.Kf=function(){return _oe(this)},l.Xf=function(){return _oe(this)};var vV,PS,PO,FS,ZCt=jr(q_,"TreeLayoutPhases",393,Hr,jin,hJe),Yme;I(1130,209,E2,VWt),l.Ze=function(e,n){var r,s,o,h,d,w,k;for(je(Re(qe(e,(hw(),i_t))))||u$((r=new rr((Im(),new Sm(e))),r)),d=(w=new A$,Lo(w,e),Jt(w,(fc(),jS),e),k=new Cr,Kwn(e,w,k),hmn(e,w,k),w),h=imn(this.a,d),o=new S(h);o.a"+b$(this.c):"e_"+Hi(this)},P(H_,"TEdge",188),I(135,134,{3:1,135:1,94:1,134:1},A$),l.Ib=function(){var e,n,r,s,o;for(o=null,s=ei(this.b,0);s.b!=s.d.c;)r=u(ti(s),86),o+=(r.c==null||r.c.length==0?"n_"+r.g:"n_"+r.c)+` +`;for(n=ei(this.a,0);n.b!=n.d.c;)e=u(ti(n),188),o+=(e.b&&e.c?b$(e.b)+"->"+b$(e.c):"e_"+Hi(e))+` +`;return o};var pxn=P(H_,"TGraph",135);I(633,502,{3:1,502:1,633:1,94:1,134:1}),P(H_,"TShape",633),I(86,633,{3:1,502:1,86:1,633:1,94:1,134:1},yit),l.Ib=function(){return b$(this)};var bxn=P(H_,"TNode",86);I(255,1,t0,Cp),l.Jc=function(e){va(this,e)},l.Kc=function(){var e;return e=ei(this.a.d,0),new bx(e)},P(H_,"TNode/2",255),I(358,1,ra,bx),l.Nb=function(e){pa(this,e)},l.Pb=function(){return u(ti(this.a),188).c},l.Ob=function(){return kR(this.a)},l.Qb=function(){H$(this.a)},P(H_,"TNode/2/1",358),I(1840,1,as,GWt),l.pf=function(e,n){Smn(this,u(e,135),n)},P(x6,"FanProcessor",1840),I(327,22,{3:1,35:1,22:1,327:1,234:1},tC),l.Kf=function(){switch(this.g){case 0:return new Mqt;case 1:return new GWt;case 2:return new Q5;case 3:return new UQ;case 4:return new KQ;case 5:return new OL;default:throw rt(new Pn(Bot+(this.f!=null?this.f:""+this.g)))}};var xht,kht,Eht,Tht,Cht,wV,Xme=jr(x6,v6t,327,Hr,ean,fJe),Qme;I(1843,1,as,UQ),l.pf=function(e,n){ubn(this,u(e,135),n)},l.a=0,P(x6,"LevelHeightProcessor",1843),I(1844,1,t0,WQ),l.Jc=function(e){va(this,e)},l.Kc=function(){return vn(),r8(),ZE},P(x6,"LevelHeightProcessor/1",1844),I(1841,1,as,Q5),l.pf=function(e,n){bgn(this,u(e,135),n)},l.a=0,P(x6,"NeighborsProcessor",1841),I(1842,1,t0,$F),l.Jc=function(e){va(this,e)},l.Kc=function(){return vn(),r8(),ZE},P(x6,"NeighborsProcessor/1",1842),I(1845,1,as,KQ),l.pf=function(e,n){cbn(this,u(e,135),n)},l.a=0,P(x6,"NodePositionProcessor",1845),I(1839,1,as,Mqt),l.pf=function(e,n){Nyn(this,u(e,135))},P(x6,"RootProcessor",1839),I(1846,1,as,OL),l.pf=function(e,n){Hun(u(e,135))},P(x6,"Untreeifyer",1846);var FO,BS,Zme,_ht,mV,RS,Sht,yV,xV,k7,jS,kV,Yg,JCt,Jme,Aht,Wy,Lht,t_t;I(851,1,Ih,L3),l.Qe=function(e){an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Fkt),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),n_t),(jg(),cs)),u_t),un((Xf(),qn))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Bkt),""),"Search Order"),"Which search order to use when computing a spanning tree."),e_t),cs),h_t),un(qn)))),Zle((new KL,e))};var tye,e_t,eye,n_t;P(fH,"MrTreeMetaDataProvider",851),I(994,1,Ih,KL),l.Qe=function(e){Zle(e)};var nye,r_t,rye,iye,sye,aye,i_t,oye,s_t,cye,EV,a_t,uye,o_t,lye;P(fH,"MrTreeOptions",994),I(995,1,{},YQ),l.$e=function(){var e;return e=new VWt,e},l._e=function(e){},P(fH,"MrTreeOptions/MrtreeFactory",995),I(480,22,{3:1,35:1,22:1,480:1},zbt);var Mht,c_t,u_t=jr(fH,"OrderWeighting",480,Hr,Ynn,dJe),hye;I(425,22,{3:1,35:1,22:1,425:1},qbt);var l_t,Iht,h_t=jr(fH,"TreeifyingOrder",425,Hr,Knn,pJe),fye;I(1459,1,zc,WL),l.Yf=function(e){return u(e,135),dye},l.pf=function(e,n){qon(this,u(e,135),n)};var dye;P("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1459),I(1460,1,zc,QJ),l.Yf=function(e){return u(e,135),gye},l.pf=function(e,n){_gn(this,u(e,135),n)};var gye;P("org.eclipse.elk.alg.mrtree.p2order","NodeOrderer",1460),I(1461,1,zc,XJ),l.Yf=function(e){return u(e,135),pye},l.pf=function(e,n){Hvn(this,u(e,135),n)},l.a=0;var pye;P("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1461),I(1462,1,zc,NB),l.Yf=function(e){return u(e,135),bye},l.pf=function(e,n){p1n(u(e,135),n)};var bye;P("org.eclipse.elk.alg.mrtree.p4route","EdgeRouter",1462);var $S;I(495,22,{3:1,35:1,22:1,495:1,246:1,234:1},Hbt),l.Kf=function(){return iie(this)},l.Xf=function(){return iie(this)};var TV,E7,f_t=jr(Rkt,"RadialLayoutPhases",495,Hr,Xnn,gJe),vye;I(1131,209,E2,THt),l.Ze=function(e,n){var r,s,o,h,d,w;if(r=ooe(this,e),wr(n,"Radial layout",r.c.length),je(Re(qe(e,(ay(),k_t))))||u$((s=new rr((Im(),new Sm(e))),s)),w=Ddn(e),bo(e,(bC(),$S),w),!w)throw rt(new Pn("The given graph is not a tree!"));for(o=Xt(ye(qe(e,SV))),o==0&&(o=xoe(e)),bo(e,SV,o),d=new S(ooe(this,e));d.a0&&Lre((Rr(n-1,e.length),e.charCodeAt(n-1)),Xfe);)--n;if(s>=n)throw rt(new Pn("The given string does not contain any numbers."));if(o=py(e.substr(s,n-s),`,|;|\r| +`),o.length!=2)throw rt(new Pn("Exactly two numbers are expected, "+o.length+" were found."));try{this.a=ly(uy(o[0])),this.b=ly(uy(o[1]))}catch(h){throw h=Wi(h),Et(h,127)?(r=h,rt(new Pn(Qfe+r))):rt(h)}},l.Ib=function(){return"("+this.a+","+this.b+")"},l.a=0,l.b=0;var Us=P(qD,"KVector",8);I(74,68,{3:1,4:1,20:1,28:1,52:1,14:1,68:1,15:1,74:1,414:1},Du,yR,dWt),l.Pc=function(){return eun(this)},l.Jf=function(e){var n,r,s,o,h,d;s=py(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | +`),_h(this);try{for(r=0,h=0,o=0,d=0;r0&&(h%2==0?o=ly(s[r]):d=ly(s[r]),h>0&&h%2!=0&&ni(this,new $e(o,d)),++h),++r}catch(w){throw w=Wi(w),Et(w,127)?(n=w,rt(new Pn("The given string does not match the expected format for vectors."+n))):rt(w)}},l.Ib=function(){var e,n,r;for(e=new Il("("),n=ei(this,0);n.b!=n.d.c;)r=u(ti(n),8),Vr(e,r.a+","+r.b),n.b!=n.d.c&&(e.a+="; ");return(e.a+=")",e).a};var xSt=P(qD,"KVectorChain",74);I(248,22,{3:1,35:1,22:1,248:1},eC);var Zht,NV,PV,$O,zO,FV,kSt=jr(Oh,"Alignment",248,Hr,Ysn,DJe),F3e;I(979,1,Ih,ttt),l.Qe=function(e){Wue(e)};var ESt,Jht,B3e,TSt,CSt,R3e,_St,j3e,$3e,SSt,ASt,z3e;P(Oh,"BoxLayouterOptions",979),I(980,1,{},IZ),l.$e=function(){var e;return e=new BZ,e},l._e=function(e){},P(Oh,"BoxLayouterOptions/BoxFactory",980),I(291,22,{3:1,35:1,22:1,291:1},nC);var qO,tft,HO,GO,VO,eft,nft=jr(Oh,"ContentAlignment",291,Hr,Ksn,OJe),q3e;I(684,1,Ih,yp),l.Qe=function(e){an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,U1e),""),"Layout Algorithm"),"Select a specific layout algorithm."),(jg(),T7)),Ae),un((Xf(),qn))))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,W1e),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),q1),mxn),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,gkt),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),LSt),cs),kSt),un(Js)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,b6),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,c8t),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),q1),xSt),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,cH),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),ISt),j6),nft),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,KD),""),"Debug Mode"),"Whether additional debug information shall be generated."),(Fn(),!1)),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,vkt),""),Qxt),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),DSt),cs),WS),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,UD),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),PSt),cs),pft),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,gH),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,oH),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),jSt),cs),TAt),ji(qn,ct(ot(Qg,1),ae,175,0,[Js]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ww),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),YSt),q1),M7t),ji(qn,ct(ot(Qg,1),ae,175,0,[Js]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,$D),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,pct),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,F_),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Not),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),tAt),cs),SAt),un(Js)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,uH),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),q1),Us),ji(Js,ct(ot(Qg,1),ae,175,0,[$2,Xg]))))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,jD),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),gc),ja),ji(Js,ct(ot(Qg,1),ae,175,0,[Id]))))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Hq),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),gc),ja),un(qn)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,P_),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,_kt),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),zSt),q1),xSt),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Lkt),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),Aa),Bs),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Mkt),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),Aa),Bs),un(Js)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,W5n),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),q1),Txn),ji(qn,ct(ot(Qg,1),ae,175,0,[Xg]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Dkt),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),qSt),q1),L7t),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,fkt),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),Aa),Bs),ji(Js,ct(ot(Qg,1),ae,175,0,[Id,$2,Xg]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,K1e),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),Do),ca),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Y1e),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,X1e),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),de(100)),gc),ja),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Q1e),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Z1e),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),de(4e3)),gc),ja),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,J1e),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),de(400)),gc),ja),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,tde),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ede),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,nde),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,rde),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,o8t),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),MSt),cs),OAt),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,tkt),F1),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ekt),F1),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Aot),F1),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,nkt),F1),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Oot),F1),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,rkt),F1),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ikt),F1),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,okt),F1),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,skt),F1),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,akt),F1),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ky),F1),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ckt),F1),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),Do),ca),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ukt),F1),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),Do),ca),ji(qn,ct(ot(Qg,1),ae,175,0,[Js]))))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,lkt),F1),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),q1),E4e),ji(Js,ct(ot(Qg,1),ae,175,0,[Id,$2,Xg]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Okt),F1),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),lAt),q1),L7t),un(qn)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,gct),ade),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),gc),ja),ji(qn,ct(ot(Qg,1),ae,175,0,[Js]))))),aa(e,gct,dct,X3e),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,dct),ade),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),XSt),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,wkt),ode),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),GSt),q1),M7t),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,RE),ode),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),VSt),j6),lo),ji(Js,ct(ot(Qg,1),ae,175,0,[Xg]))))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,xkt),bH),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),ZSt),cs),QS),un(Js)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,kkt),bH),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),cs),QS),un(Js)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Ekt),bH),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),cs),QS),un(Js)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Tkt),bH),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),cs),QS),un(Js)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Ckt),bH),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),cs),QS),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,L4),Nct),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),USt),j6),tA),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,v6),Nct),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),KSt),j6),LAt),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,w6),Nct),"Node Size Minimum"),"The minimal size to which a node can be reduced."),WSt),q1),Us),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,fct),Nct),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),Aa),Bs),un(qn)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Skt),hct),"Edge Label Placement"),"Gives a hint on where to put edge labels."),OSt),cs),fAt),un(Xg)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Gq),hct),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),Aa),Bs),un(Xg)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,K5n),"font"),"Font Name"),"Font name used for a label."),T7),Ae),un(Xg)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,ide),"font"),"Font Size"),"Font size used for a label."),gc),ja),un(Xg)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Ikt),Pct),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),q1),Us),un($2)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,Akt),Pct),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),gc),ja),un($2)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,dkt),Pct),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),rAt),cs),Xa),un($2)))),an(e,new Xe(rn(nn(sn(Ze(en(Je(tn(new Ue,hkt),Pct),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),Do),ca),un($2)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,jE),u8t),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),eAt),j6),GV),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,mkt),u8t),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),Aa),Bs),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,ykt),u8t),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),Aa),Bs),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,pkt),cde),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),Aa),Bs),un(Js)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,bkt),cde),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),Aa),Bs),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,Lot),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),Do),ca),un(Id)))),an(e,new Xe(rn(nn(sn(kn(Ze(en(Je(tn(new Ue,sde),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),BSt),cs),wAt),un(Id)))),G9(e,new zx(R9(Jk(Zk(new wm,Vn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),G9(e,new zx(R9(Jk(Zk(new wm,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),G9(e,new zx(R9(Jk(Zk(new wm,ql),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),G9(e,new zx(R9(Jk(Zk(new wm,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),G9(e,new zx(R9(Jk(Zk(new wm,D1e),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),G9(e,new zx(R9(Jk(Zk(new wm,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),G9(e,new zx(R9(Jk(Zk(new wm,Td),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),Due((new $B,e)),Wue((new ttt,e)),cue((new zB,e))};var VS,H3e,LSt,$6,G3e,V3e,MSt,U3e,BV,ISt,UO,jw,DSt,rft,ift,OSt,NSt,PSt,FSt,BSt,RSt,r5,jSt,W3e,WO,sft,RV,$St,i5,zSt,KO,qSt,HSt,GSt,s5,VSt,z2,USt,jV,a5,WSt,vb,KSt,$V,YO,q2,YSt,K3e,XSt,Y3e,X3e,QSt,ZSt,aft,oft,cft,uft,JSt,hl,US,tAt,lft,hft,Ky,eAt,nAt,o5,rAt,z6,zV,fft,C7,Q3e,dft,Z3e,J3e,iAt,t4e,sAt,e4e,q6,aAt,qV,oAt,cAt,H2,n4e,uAt,lAt,hAt;P(Oh,"CoreOptions",684),I(103,22,{3:1,35:1,22:1,103:1},LM);var Q0,jh,kf,c0,Z0,WS=jr(Oh,Qxt,103,Hr,vsn,FJe),r4e;I(272,22,{3:1,35:1,22:1,272:1},zet);var _7,Yy,S7,fAt=jr(Oh,"EdgeLabelPlacement",272,Hr,Qrn,BJe),i4e;I(218,22,{3:1,35:1,22:1,218:1},KR);var A7,XO,H6,gft,pft=jr(Oh,"EdgeRouting",218,Hr,Hin,RJe),s4e;I(312,22,{3:1,35:1,22:1,312:1},rC);var dAt,gAt,pAt,bAt,bft,vAt,wAt=jr(Oh,"EdgeType",312,Hr,ran,jJe),a4e;I(977,1,Ih,$B),l.Qe=function(e){Due(e)};var mAt,yAt,xAt,kAt,o4e,EAt,KS;P(Oh,"FixedLayouterOptions",977),I(978,1,{},BL),l.$e=function(){var e;return e=new PZ,e},l._e=function(e){},P(Oh,"FixedLayouterOptions/FixedFactory",978),I(334,22,{3:1,35:1,22:1,334:1},qet);var Zg,HV,YS,TAt=jr(Oh,"HierarchyHandling",334,Hr,Xrn,$Je),c4e;I(285,22,{3:1,35:1,22:1,285:1},YR);var u0,wb,QO,ZO,u4e=jr(Oh,"LabelSide",285,Hr,qin,zJe),l4e;I(93,22,{3:1,35:1,22:1,93:1},$3);var J0,Ef,$h,Tf,Ul,Cf,zh,l0,_f,lo=jr(Oh,"NodeLabelPlacement",93,Hr,aon,qJe),h4e;I(249,22,{3:1,35:1,22:1,249:1},MM);var CAt,XS,mb,_At,JO,QS=jr(Oh,"PortAlignment",249,Hr,wsn,HJe),f4e;I(98,22,{3:1,35:1,22:1,98:1},iC);var G2,Vc,h0,L7,H1,yb,SAt=jr(Oh,"PortConstraints",98,Hr,$sn,GJe),d4e;I(273,22,{3:1,35:1,22:1,273:1},sC);var ZS,JS,tg,tN,xb,G6,GV=jr(Oh,"PortLabelPlacement",273,Hr,nan,VJe),g4e;I(61,22,{3:1,35:1,22:1,61:1},IM);var Hn,Nn,vh,wh,Cu,uu,G1,Sf,tl,qu,Uc,el,_u,Su,Af,Wl,Kl,qh,mr,Zo,Bn,Xa=jr(Oh,"PortSide",61,Hr,gsn,KJe),p4e;I(981,1,Ih,zB),l.Qe=function(e){cue(e)};var b4e,v4e,AAt,w4e,m4e;P(Oh,"RandomLayouterOptions",981),I(982,1,{},zZ),l.$e=function(){var e;return e=new HZ,e},l._e=function(e){},P(Oh,"RandomLayouterOptions/RandomFactory",982),I(374,22,{3:1,35:1,22:1,374:1},XR);var Xy,eN,nN,V2,tA=jr(Oh,"SizeConstraint",374,Hr,zin,UJe),y4e;I(259,22,{3:1,35:1,22:1,259:1},z3);var rN,VV,M7,vft,iN,eA,UV,WV,KV,LAt=jr(Oh,"SizeOptions",259,Hr,don,WJe),x4e;I(370,1,{1949:1},Yk),l.b=!1,l.c=0,l.d=-1,l.e=null,l.f=null,l.g=-1,l.j=!1,l.k=!1,l.n=!1,l.o=0,l.q=0,l.r=0,P(Ec,"BasicProgressMonitor",370),I(972,209,E2,BZ),l.Ze=function(e,n){var r,s,o,h,d,w,k,C,M;switch(wr(n,"Box layout",2),o=lM(ye(qe(e,(eq(),z3e)))),h=u(qe(e,$3e),116),r=je(Re(qe(e,TSt))),s=je(Re(qe(e,CSt))),u(qe(e,Jht),311).g){case 0:d=(w=new Pu((!e.a&&(e.a=new he(ns,e,10,11)),e.a)),vn(),Xs(w,new G$t(s)),w),k=G4t(e),C=ye(qe(e,ESt)),(C==null||(On(C),C<=0))&&(C=1.3),M=Z4n(d,o,h,k.a,k.b,r,(On(C),C)),gw(e,M.a,M.b,!1,!0);break;default:Kyn(e,o,h,r)}or(n)},P(Ec,"BoxLayoutProvider",972),I(973,1,Oi,G$t),l.ue=function(e,n){return b2n(this,u(e,33),u(n,33))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},l.a=!1,P(Ec,"BoxLayoutProvider/1",973),I(157,1,{157:1},U$,fWt),l.Ib=function(){return this.c?H5t(this.c):Qp(this.b)},P(Ec,"BoxLayoutProvider/Group",157),I(311,22,{3:1,35:1,22:1,311:1},QR);var MAt,IAt,DAt,wft,OAt=jr(Ec,"BoxLayoutProvider/PackingMode",311,Hr,Gin,YJe),k4e;I(974,1,Oi,RZ),l.ue=function(e,n){return mnn(u(e,157),u(n,157))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Ec,"BoxLayoutProvider/lambda$0$Type",974),I(975,1,Oi,KF),l.ue=function(e,n){return fnn(u(e,157),u(n,157))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Ec,"BoxLayoutProvider/lambda$1$Type",975),I(976,1,Oi,jZ),l.ue=function(e,n){return dnn(u(e,157),u(n,157))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(Ec,"BoxLayoutProvider/lambda$2$Type",976),I(1365,1,{831:1},$Z),l.qg=function(e,n){return DR(),!Et(n,160)||kHt((Qx(),u(e,160)),n)},P(Ec,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1365),I(1366,1,Un,V$t),l.td=function(e){run(this.a,u(e,146))},P(Ec,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1366),I(1367,1,Un,FZ),l.td=function(e){u(e,94),DR()},P(Ec,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1367),I(1371,1,Un,U$t),l.td=function(e){Aon(this.a,u(e,94))},P(Ec,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1371),I(1369,1,ui,cVt),l.Mb=function(e){return Hcn(this.a,this.b,u(e,146))},P(Ec,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1369),I(1368,1,ui,uVt),l.Mb=function(e){return aQe(this.a,this.b,u(e,831))},P(Ec,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1368),I(1370,1,Un,lVt),l.td=function(e){aen(this.a,this.b,u(e,146))},P(Ec,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1370),I(935,1,{},NZ),l.Kb=function(e){return lUt(e)},l.Fb=function(e){return this===e},P(Ec,"ElkUtil/lambda$0$Type",935),I(936,1,Un,hVt),l.td=function(e){wpn(this.a,this.b,u(e,79))},l.a=0,l.b=0,P(Ec,"ElkUtil/lambda$1$Type",936),I(937,1,Un,fVt),l.td=function(e){wKe(this.a,this.b,u(e,202))},l.a=0,l.b=0,P(Ec,"ElkUtil/lambda$2$Type",937),I(938,1,Un,dVt),l.td=function(e){uXe(this.a,this.b,u(e,137))},l.a=0,l.b=0,P(Ec,"ElkUtil/lambda$3$Type",938),I(939,1,Un,W$t),l.td=function(e){ktn(this.a,u(e,469))},P(Ec,"ElkUtil/lambda$4$Type",939),I(342,1,{35:1,342:1},KWe),l.wd=function(e){return BXe(this,u(e,236))},l.Fb=function(e){var n;return Et(e,342)?(n=u(e,342),this.a==n.a):!1},l.Hb=function(){return ps(this.a)},l.Ib=function(){return this.a+" (exclusive)"},l.a=0,P(Ec,"ExclusiveBounds/ExclusiveLowerBound",342),I(1138,209,E2,PZ),l.Ze=function(e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt,_t,Bt,Yt,ce,Se,We,Qe;for(wr(n,"Fixed Layout",1),h=u(qe(e,(ci(),NSt)),218),F=0,H=0,_t=new er((!e.a&&(e.a=new he(ns,e,10,11)),e.a));_t.e!=_t.i.gc();){for(gt=u(dr(_t),33),Qe=u(qe(gt,(bz(),KS)),8),Qe&&(m1(gt,Qe.a,Qe.b),u(qe(gt,yAt),174).Hc((_l(),Xy))&&(V=u(qe(gt,kAt),8),V.a>0&&V.b>0&&gw(gt,V.a,V.b,!0,!0))),F=b.Math.max(F,gt.i+gt.g),H=b.Math.max(H,gt.j+gt.f),C=new er((!gt.n&&(gt.n=new he(qo,gt,1,7)),gt.n));C.e!=C.i.gc();)w=u(dr(C),137),Qe=u(qe(w,KS),8),Qe&&m1(w,Qe.a,Qe.b),F=b.Math.max(F,gt.i+w.i+w.g),H=b.Math.max(H,gt.j+w.j+w.f);for(ce=new er((!gt.c&&(gt.c=new he(fl,gt,9,9)),gt.c));ce.e!=ce.i.gc();)for(Yt=u(dr(ce),118),Qe=u(qe(Yt,KS),8),Qe&&m1(Yt,Qe.a,Qe.b),Se=gt.i+Yt.i,We=gt.j+Yt.j,F=b.Math.max(F,Se+Yt.g),H=b.Math.max(H,We+Yt.f),k=new er((!Yt.n&&(Yt.n=new he(qo,Yt,1,7)),Yt.n));k.e!=k.i.gc();)w=u(dr(k),137),Qe=u(qe(w,KS),8),Qe&&m1(w,Qe.a,Qe.b),F=b.Math.max(F,Se+w.i+w.g),H=b.Math.max(H,We+w.j+w.f);for(o=new ar(lr(G0(gt).a.Kc(),new z));zr(o);)r=u(Lr(o),79),M=Ehe(r),F=b.Math.max(F,M.a),H=b.Math.max(H,M.b);for(s=new ar(lr(fD(gt).a.Kc(),new z));zr(s);)r=u(Lr(s),79),ts(Zd(r))!=e&&(M=Ehe(r),F=b.Math.max(F,M.a),H=b.Math.max(H,M.b))}if(h==(q0(),A7))for(Lt=new er((!e.a&&(e.a=new he(ns,e,10,11)),e.a));Lt.e!=Lt.i.gc();)for(gt=u(dr(Lt),33),s=new ar(lr(G0(gt).a.Kc(),new z));zr(s);)r=u(Lr(s),79),d=pmn(r),d.b==0?bo(r,i5,null):bo(r,i5,d);je(Re(qe(e,(bz(),xAt))))||(Bt=u(qe(e,o4e),116),tt=F+Bt.b+Bt.c,Y=H+Bt.d+Bt.a,gw(e,tt,Y,!0,!0)),or(n)},P(Ec,"FixedLayoutProvider",1138),I(373,134,{3:1,414:1,373:1,94:1,134:1},Wu,$te),l.Jf=function(e){var n,r,s,o,h,d,w,k,C;if(e)try{for(k=py(e,";,;"),h=k,d=0,w=h.length;d>16&ms|n^s<<16},l.Kc=function(){return new K$t(this)},l.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+$o(this.b)+")":this.b==null?"pair("+$o(this.a)+",null)":"pair("+$o(this.a)+","+$o(this.b)+")"},P(Ec,"Pair",46),I(983,1,ra,K$t),l.Nb=function(e){pa(this,e)},l.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},l.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw rt(new lc)},l.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),rt(new Iu)},l.b=!1,l.c=!1,P(Ec,"Pair/1",983),I(448,1,{448:1},TXt),l.Fb=function(e){return Pc(this.a,u(e,448).a)&&Pc(this.c,u(e,448).c)&&Pc(this.d,u(e,448).d)&&Pc(this.b,u(e,448).b)},l.Hb=function(){return vz(ct(ot(Xn,1),Ie,1,5,[this.a,this.c,this.d,this.b]))},l.Ib=function(){return"("+this.a+Ka+this.c+Ka+this.d+Ka+this.b+")"},P(Ec,"Quadruple",448),I(1126,209,E2,HZ),l.Ze=function(e,n){var r,s,o,h,d;if(wr(n,"Random Layout",1),(!e.a&&(e.a=new he(ns,e,10,11)),e.a).i==0){or(n);return}h=u(qe(e,(y3t(),w4e)),19),h&&h.a!=0?o=new T$(h.a):o=new zit,r=lM(ye(qe(e,b4e))),d=lM(ye(qe(e,m4e))),s=u(qe(e,v4e),116),L4n(e,o,r,d,s),or(n)},P(Ec,"RandomLayoutProvider",1126);var _4e;I(553,1,{}),l.qf=function(){return new $e(this.f.i,this.f.j)},l.We=function(e){return XXt(e,(ci(),hl))?qe(this.f,S4e):qe(this.f,e)},l.rf=function(){return new $e(this.f.g,this.f.f)},l.sf=function(){return this.g},l.Xe=function(e){return r2(this.f,e)},l.tf=function(e){yu(this.f,e.a),xu(this.f,e.b)},l.uf=function(e){Qv(this.f,e.a),Xv(this.f,e.b)},l.vf=function(e){this.g=e},l.g=0;var S4e;P(U_,"ElkGraphAdapters/AbstractElkGraphElementAdapter",553),I(554,1,{839:1},aR),l.wf=function(){var e,n;if(!this.b)for(this.b=y$(Zj(this.a).i),n=new er(Zj(this.a));n.e!=n.i.gc();)e=u(dr(n),137),ue(this.b,new net(e));return this.b},l.b=null,P(U_,"ElkGraphAdapters/ElkEdgeAdapter",554),I(301,553,{},Sm),l.xf=function(){return Tse(this)},l.a=null,P(U_,"ElkGraphAdapters/ElkGraphAdapter",301),I(630,553,{181:1},net),P(U_,"ElkGraphAdapters/ElkLabelAdapter",630),I(629,553,{680:1},rnt),l.wf=function(){return Ifn(this)},l.Af=function(){var e;return e=u(qe(this.f,(ci(),KO)),142),!e&&(e=new M9),e},l.Cf=function(){return Dfn(this)},l.Ef=function(e){var n;n=new wnt(e),bo(this.f,(ci(),KO),n)},l.Ff=function(e){bo(this.f,(ci(),q2),new pvt(e))},l.yf=function(){return this.d},l.zf=function(){var e,n;if(!this.a)for(this.a=new le,n=new ar(lr(fD(u(this.f,33)).a.Kc(),new z));zr(n);)e=u(Lr(n),79),ue(this.a,new aR(e));return this.a},l.Bf=function(){var e,n;if(!this.c)for(this.c=new le,n=new ar(lr(G0(u(this.f,33)).a.Kc(),new z));zr(n);)e=u(Lr(n),79),ue(this.c,new aR(e));return this.c},l.Df=function(){return i$(u(this.f,33)).i!=0||je(Re(u(this.f,33).We((ci(),WO))))},l.Gf=function(){kan(this,(Im(),_4e))},l.a=null,l.b=null,l.c=null,l.d=null,l.e=null,P(U_,"ElkGraphAdapters/ElkNodeAdapter",629),I(1266,553,{838:1},Ezt),l.wf=function(){return $fn(this)},l.zf=function(){var e,n;if(!this.a)for(this.a=Hd(u(this.f,118).xg().i),n=new er(u(this.f,118).xg());n.e!=n.i.gc();)e=u(dr(n),79),ue(this.a,new aR(e));return this.a},l.Bf=function(){var e,n;if(!this.c)for(this.c=Hd(u(this.f,118).yg().i),n=new er(u(this.f,118).yg());n.e!=n.i.gc();)e=u(dr(n),79),ue(this.c,new aR(e));return this.c},l.Hf=function(){return u(u(this.f,118).We((ci(),o5)),61)},l.If=function(){var e,n,r,s,o,h,d,w;for(s=k1(u(this.f,118)),r=new er(u(this.f,118).yg());r.e!=r.i.gc();)for(e=u(dr(r),79),w=new er((!e.c&&(e.c=new Cn(br,e,5,8)),e.c));w.e!=w.i.gc();){if(d=u(dr(w),82),Zm(Mo(d),s))return!0;if(Mo(d)==s&&je(Re(qe(e,(ci(),sft)))))return!0}for(n=new er(u(this.f,118).xg());n.e!=n.i.gc();)for(e=u(dr(n),79),h=new er((!e.b&&(e.b=new Cn(br,e,4,7)),e.b));h.e!=h.i.gc();)if(o=u(dr(h),82),Zm(Mo(o),s))return!0;return!1},l.a=null,l.b=null,l.c=null,P(U_,"ElkGraphAdapters/ElkPortAdapter",1266),I(1267,1,Oi,GZ),l.ue=function(e,n){return cwn(u(e,118),u(n,118))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(U_,"ElkGraphAdapters/PortComparator",1267);var kb=Yi(dh,"EObject"),I7=Yi(O4,hde),Hh=Yi(O4,fde),sN=Yi(O4,dde),aN=Yi(O4,"ElkShape"),br=Yi(O4,gde),Ws=Yi(O4,l8t),Zi=Yi(O4,pde),oN=Yi(dh,bde),nA=Yi(dh,"EFactory"),A4e,mft=Yi(dh,vde),r1=Yi(dh,"EPackage"),ta,L4e,M4e,BAt,YV,I4e,RAt,jAt,$At,Eb,D4e,O4e,qo=Yi(O4,h8t),ns=Yi(O4,f8t),fl=Yi(O4,d8t);I(90,1,wde),l.Jg=function(){return this.Kg(),null},l.Kg=function(){return null},l.Lg=function(){return this.Kg(),!1},l.Mg=function(){return!1},l.Ng=function(e){mi(this,e)},P(k6,"BasicNotifierImpl",90),I(97,90,kde),l.nh=function(){return ml(this)},l.Og=function(e,n){return e},l.Pg=function(){throw rt(new Or)},l.Qg=function(e){var n;return n=no(u(yn(this.Tg(),this.Vg()),18)),this.eh().ih(this,n.n,n.f,e)},l.Rg=function(e,n){throw rt(new Or)},l.Sg=function(e,n,r){return zl(this,e,n,r)},l.Tg=function(){var e;return this.Pg()&&(e=this.Pg().ck(),e)?e:this.zh()},l.Ug=function(){return Gst(this)},l.Vg=function(){throw rt(new Or)},l.Wg=function(){var e,n;return n=this.ph().dk(),!n&&this.Pg().ik(n=(V9(),e=Dwt(pd(this.Tg())),e==null?Sft:new NM(this,e))),n},l.Xg=function(e,n){return e},l.Yg=function(e){var n;return n=e.Gj(),n?e.aj():Vi(this.Tg(),e)},l.Zg=function(){var e;return e=this.Pg(),e?e.fk():null},l.$g=function(){return this.Pg()?this.Pg().ck():null},l._g=function(e,n,r){return jz(this,e,n,r)},l.ah=function(e){return I8(this,e)},l.bh=function(e,n){return Prt(this,e,n)},l.dh=function(){var e;return e=this.Pg(),!!e&&e.gk()},l.eh=function(){throw rt(new Or)},l.fh=function(){return Dz(this)},l.gh=function(e,n,r,s){return e6(this,e,n,s)},l.hh=function(e,n,r){var s;return s=u(yn(this.Tg(),n),66),s.Nj().Qj(this,this.yh(),n-this.Ah(),e,r)},l.ih=function(e,n,r,s){return c$(this,e,n,s)},l.jh=function(e,n,r){var s;return s=u(yn(this.Tg(),n),66),s.Nj().Rj(this,this.yh(),n-this.Ah(),e,r)},l.kh=function(){return!!this.Pg()&&!!this.Pg().ek()},l.lh=function(e){return est(this,e)},l.mh=function(e){return dQt(this,e)},l.oh=function(e){return Rle(this,e)},l.ph=function(){throw rt(new Or)},l.qh=function(){return this.Pg()?this.Pg().ek():null},l.rh=function(){return Dz(this)},l.sh=function(e,n){jst(this,e,n)},l.th=function(e){this.ph().hk(e)},l.uh=function(e){this.ph().kk(e)},l.vh=function(e){this.ph().jk(e)},l.wh=function(e,n){var r,s,o,h;return h=this.Zg(),h&&e&&(n=Ba(h.Vk(),this,n),h.Zk(this)),s=this.eh(),s&&(aat(this,this.eh(),this.Vg()).Bb&Ya?(o=s.fh(),o&&(e?!h&&o.Zk(this):o.Yk(this))):(n=(r=this.Vg(),r>=0?this.Qg(n):this.eh().ih(this,-1-r,null,n)),n=this.Sg(null,-1,n))),this.uh(e),n},l.xh=function(e){var n,r,s,o,h,d,w,k;if(r=this.Tg(),h=Vi(r,e),n=this.Ah(),h>=n)return u(e,66).Nj().Uj(this,this.yh(),h-n);if(h<=-1)if(d=E4((Ru(),ma),r,e),d){if(to(),u(d,66).Oj()||(d=qx(Eo(ma,d))),o=(s=this.Yg(d),u(s>=0?this._g(s,!0,!0):lw(this,d,!0),153)),k=d.Zj(),k>1||k==-1)return u(u(o,215).hl(e,!1),76)}else throw rt(new Pn(ab+e.ne()+Fct));else if(e.$j())return s=this.Yg(e),u(s>=0?this._g(s,!1,!0):lw(this,e,!1),76);return w=new OVt(this,e),w},l.yh=function(){return Omt(this)},l.zh=function(){return(jp(),Ln).S},l.Ah=function(){return Zn(this.zh())},l.Bh=function(e){Nst(this,e)},l.Ib=function(){return bf(this)},P(Mn,"BasicEObjectImpl",97);var N4e;I(114,97,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1}),l.Ch=function(e){var n;return n=Nmt(this),n[e]},l.Dh=function(e,n){var r;r=Nmt(this),Ji(r,e,n)},l.Eh=function(e){var n;n=Nmt(this),Ji(n,e,null)},l.Jg=function(){return u(In(this,4),126)},l.Kg=function(){throw rt(new Or)},l.Lg=function(){return(this.Db&4)!=0},l.Pg=function(){throw rt(new Or)},l.Fh=function(e){t6(this,2,e)},l.Rg=function(e,n){this.Db=n<<16|this.Db&255,this.Fh(e)},l.Tg=function(){return bu(this)},l.Vg=function(){return this.Db>>16},l.Wg=function(){var e,n;return V9(),n=Dwt(pd((e=u(In(this,16),26),e||this.zh()))),n==null?Sft:new NM(this,n)},l.Mg=function(){return(this.Db&1)==0},l.Zg=function(){return u(In(this,128),1935)},l.$g=function(){return u(In(this,16),26)},l.dh=function(){return(this.Db&32)!=0},l.eh=function(){return u(In(this,2),49)},l.kh=function(){return(this.Db&64)!=0},l.ph=function(){throw rt(new Or)},l.qh=function(){return u(In(this,64),281)},l.th=function(e){t6(this,16,e)},l.uh=function(e){t6(this,128,e)},l.vh=function(e){t6(this,64,e)},l.yh=function(){return iu(this)},l.Db=0,P(Mn,"MinimalEObjectImpl",114),I(115,114,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),l.Fh=function(e){this.Cb=e},l.eh=function(){return this.Cb},P(Mn,"MinimalEObjectImpl/Container",115),I(1985,115,{105:1,413:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),l._g=function(e,n,r){return V3t(this,e,n,r)},l.jh=function(e,n,r){return O4t(this,e,n,r)},l.lh=function(e){return Gwt(this,e)},l.sh=function(e,n){Myt(this,e,n)},l.zh=function(){return Zc(),O4e},l.Bh=function(e){myt(this,e)},l.Ve=function(){return Vie(this)},l.We=function(e){return qe(this,e)},l.Xe=function(e){return r2(this,e)},l.Ye=function(e,n){return bo(this,e,n)},P(_2,"EMapPropertyHolderImpl",1985),I(567,115,{105:1,469:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},vp),l._g=function(e,n,r){switch(e){case 0:return this.a;case 1:return this.b}return jz(this,e,n,r)},l.lh=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return est(this,e)},l.sh=function(e,n){switch(e){case 0:W$(this,Xt(ye(n)));return;case 1:K$(this,Xt(ye(n)));return}jst(this,e,n)},l.zh=function(){return Zc(),L4e},l.Bh=function(e){switch(e){case 0:W$(this,0);return;case 1:K$(this,0);return}Nst(this,e)},l.Ib=function(){var e;return this.Db&64?bf(this):(e=new Th(bf(this)),e.a+=" (x: ",R3(e,this.a),e.a+=", y: ",R3(e,this.b),e.a+=")",e.a)},l.a=0,l.b=0,P(_2,"ElkBendPointImpl",567),I(723,1985,{105:1,413:1,160:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),l._g=function(e,n,r){return Yyt(this,e,n,r)},l.hh=function(e,n,r){return Ast(this,e,n,r)},l.jh=function(e,n,r){return fit(this,e,n,r)},l.lh=function(e){return hyt(this,e)},l.sh=function(e,n){l4t(this,e,n)},l.zh=function(){return Zc(),I4e},l.Bh=function(e){Vyt(this,e)},l.zg=function(){return this.k},l.Ag=function(){return Zj(this)},l.Ib=function(){return jit(this)},l.k=null,P(_2,"ElkGraphElementImpl",723),I(724,723,{105:1,413:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),l._g=function(e,n,r){return s3t(this,e,n,r)},l.lh=function(e){return f3t(this,e)},l.sh=function(e,n){h4t(this,e,n)},l.zh=function(){return Zc(),D4e},l.Bh=function(e){v3t(this,e)},l.Bg=function(){return this.f},l.Cg=function(){return this.g},l.Dg=function(){return this.i},l.Eg=function(){return this.j},l.Fg=function(e,n){sj(this,e,n)},l.Gg=function(e,n){m1(this,e,n)},l.Hg=function(e){yu(this,e)},l.Ig=function(e){xu(this,e)},l.Ib=function(){return Ost(this)},l.f=0,l.g=0,l.i=0,l.j=0,P(_2,"ElkShapeImpl",724),I(725,724,{105:1,413:1,82:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),l._g=function(e,n,r){return j3t(this,e,n,r)},l.hh=function(e,n,r){return i4t(this,e,n,r)},l.jh=function(e,n,r){return s4t(this,e,n,r)},l.lh=function(e){return Ayt(this,e)},l.sh=function(e,n){g5t(this,e,n)},l.zh=function(){return Zc(),M4e},l.Bh=function(e){I3t(this,e)},l.xg=function(){return!this.d&&(this.d=new Cn(Ws,this,8,5)),this.d},l.yg=function(){return!this.e&&(this.e=new Cn(Ws,this,7,4)),this.e},P(_2,"ElkConnectableShapeImpl",725),I(352,723,{105:1,413:1,79:1,160:1,352:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},fv),l.Qg=function(e){return t4t(this,e)},l._g=function(e,n,r){switch(e){case 3:return rI(this);case 4:return!this.b&&(this.b=new Cn(br,this,4,7)),this.b;case 5:return!this.c&&(this.c=new Cn(br,this,5,8)),this.c;case 6:return!this.a&&(this.a=new he(Zi,this,6,6)),this.a;case 7:return Fn(),!this.b&&(this.b=new Cn(br,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new Cn(br,this,5,8)),this.c.i<=1));case 8:return Fn(),!!g_(this);case 9:return Fn(),!!uw(this);case 10:return Fn(),!this.b&&(this.b=new Cn(br,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Cn(br,this,5,8)),this.c.i!=0)}return Yyt(this,e,n,r)},l.hh=function(e,n,r){var s;switch(n){case 3:return this.Cb&&(r=(s=this.Db>>16,s>=0?t4t(this,r):this.Cb.ih(this,-1-s,null,r))),W2t(this,u(e,33),r);case 4:return!this.b&&(this.b=new Cn(br,this,4,7)),Qc(this.b,e,r);case 5:return!this.c&&(this.c=new Cn(br,this,5,8)),Qc(this.c,e,r);case 6:return!this.a&&(this.a=new he(Zi,this,6,6)),Qc(this.a,e,r)}return Ast(this,e,n,r)},l.jh=function(e,n,r){switch(n){case 3:return W2t(this,null,r);case 4:return!this.b&&(this.b=new Cn(br,this,4,7)),Ba(this.b,e,r);case 5:return!this.c&&(this.c=new Cn(br,this,5,8)),Ba(this.c,e,r);case 6:return!this.a&&(this.a=new he(Zi,this,6,6)),Ba(this.a,e,r)}return fit(this,e,n,r)},l.lh=function(e){switch(e){case 3:return!!rI(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new Cn(br,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new Cn(br,this,5,8)),this.c.i<=1));case 8:return g_(this);case 9:return uw(this);case 10:return!this.b&&(this.b=new Cn(br,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Cn(br,this,5,8)),this.c.i!=0)}return hyt(this,e)},l.sh=function(e,n){switch(e){case 3:Xst(this,u(n,33));return;case 4:!this.b&&(this.b=new Cn(br,this,4,7)),xr(this.b),!this.b&&(this.b=new Cn(br,this,4,7)),rs(this.b,u(n,14));return;case 5:!this.c&&(this.c=new Cn(br,this,5,8)),xr(this.c),!this.c&&(this.c=new Cn(br,this,5,8)),rs(this.c,u(n,14));return;case 6:!this.a&&(this.a=new he(Zi,this,6,6)),xr(this.a),!this.a&&(this.a=new he(Zi,this,6,6)),rs(this.a,u(n,14));return}l4t(this,e,n)},l.zh=function(){return Zc(),BAt},l.Bh=function(e){switch(e){case 3:Xst(this,null);return;case 4:!this.b&&(this.b=new Cn(br,this,4,7)),xr(this.b);return;case 5:!this.c&&(this.c=new Cn(br,this,5,8)),xr(this.c);return;case 6:!this.a&&(this.a=new he(Zi,this,6,6)),xr(this.a);return}Vyt(this,e)},l.Ib=function(){return Ele(this)},P(_2,"ElkEdgeImpl",352),I(439,1985,{105:1,413:1,202:1,439:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},rd),l.Qg=function(e){return X3t(this,e)},l._g=function(e,n,r){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new Ss(Hh,this,5)),this.a;case 6:return lQt(this);case 7:return n?ast(this):this.i;case 8:return n?sst(this):this.f;case 9:return!this.g&&(this.g=new Cn(Zi,this,9,10)),this.g;case 10:return!this.e&&(this.e=new Cn(Zi,this,10,9)),this.e;case 11:return this.d}return V3t(this,e,n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 6:return this.Cb&&(r=(o=this.Db>>16,o>=0?X3t(this,r):this.Cb.ih(this,-1-o,null,r))),K2t(this,u(e,79),r);case 9:return!this.g&&(this.g=new Cn(Zi,this,9,10)),Qc(this.g,e,r);case 10:return!this.e&&(this.e=new Cn(Zi,this,10,9)),Qc(this.e,e,r)}return h=u(yn((s=u(In(this,16),26),s||(Zc(),YV)),n),66),h.Nj().Qj(this,iu(this),n-Zn((Zc(),YV)),e,r)},l.jh=function(e,n,r){switch(n){case 5:return!this.a&&(this.a=new Ss(Hh,this,5)),Ba(this.a,e,r);case 6:return K2t(this,null,r);case 9:return!this.g&&(this.g=new Cn(Zi,this,9,10)),Ba(this.g,e,r);case 10:return!this.e&&(this.e=new Cn(Zi,this,10,9)),Ba(this.e,e,r)}return O4t(this,e,n,r)},l.lh=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!lQt(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return Gwt(this,e)},l.sh=function(e,n){switch(e){case 1:B8(this,Xt(ye(n)));return;case 2:j8(this,Xt(ye(n)));return;case 3:F8(this,Xt(ye(n)));return;case 4:R8(this,Xt(ye(n)));return;case 5:!this.a&&(this.a=new Ss(Hh,this,5)),xr(this.a),!this.a&&(this.a=new Ss(Hh,this,5)),rs(this.a,u(n,14));return;case 6:Tce(this,u(n,79));return;case 7:J$(this,u(n,82));return;case 8:Z$(this,u(n,82));return;case 9:!this.g&&(this.g=new Cn(Zi,this,9,10)),xr(this.g),!this.g&&(this.g=new Cn(Zi,this,9,10)),rs(this.g,u(n,14));return;case 10:!this.e&&(this.e=new Cn(Zi,this,10,9)),xr(this.e),!this.e&&(this.e=new Cn(Zi,this,10,9)),rs(this.e,u(n,14));return;case 11:nyt(this,Br(n));return}Myt(this,e,n)},l.zh=function(){return Zc(),YV},l.Bh=function(e){switch(e){case 1:B8(this,0);return;case 2:j8(this,0);return;case 3:F8(this,0);return;case 4:R8(this,0);return;case 5:!this.a&&(this.a=new Ss(Hh,this,5)),xr(this.a);return;case 6:Tce(this,null);return;case 7:J$(this,null);return;case 8:Z$(this,null);return;case 9:!this.g&&(this.g=new Cn(Zi,this,9,10)),xr(this.g);return;case 10:!this.e&&(this.e=new Cn(Zi,this,10,9)),xr(this.e);return;case 11:nyt(this,null);return}myt(this,e)},l.Ib=function(){return qoe(this)},l.b=0,l.c=0,l.d=null,l.j=0,l.k=0,P(_2,"ElkEdgeSectionImpl",439),I(150,115,{105:1,92:1,90:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1}),l._g=function(e,n,r){var s;return e==0?(!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab):oh(this,e-Zn(this.zh()),yn((s=u(In(this,16),26),s||this.zh()),e),n,r)},l.hh=function(e,n,r){var s,o;return n==0?(!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r)):(o=u(yn((s=u(In(this,16),26),s||this.zh()),n),66),o.Nj().Qj(this,iu(this),n-Zn(this.zh()),e,r))},l.jh=function(e,n,r){var s,o;return n==0?(!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r)):(o=u(yn((s=u(In(this,16),26),s||this.zh()),n),66),o.Nj().Rj(this,iu(this),n-Zn(this.zh()),e,r))},l.lh=function(e){var n;return e==0?!!this.Ab&&this.Ab.i!=0:sh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.oh=function(e){return kxt(this,e)},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return}fh(this,e-Zn(this.zh()),yn((r=u(In(this,16),26),r||this.zh()),e),n)},l.uh=function(e){t6(this,128,e)},l.zh=function(){return dn(),Z4e},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return}lh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.Gh=function(){this.Bb|=1},l.Hh=function(e){return m_(this,e)},l.Bb=0,P(Mn,"EModelElementImpl",150),I(704,150,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},qB),l.Ih=function(e,n){return Jle(this,e,n)},l.Jh=function(e){var n,r,s,o,h;if(this.a!=Fl(e)||e.Bb&256)throw rt(new Pn(Rct+e.zb+kw));for(s=So(e);Lc(s.a).i!=0;){if(r=u(ED(s,0,(n=u(St(Lc(s.a),0),87),h=n.c,Et(h,88)?u(h,26):(dn(),Wh))),26),cw(r))return o=Fl(r).Nh().Jh(r),u(o,49).th(e),o;s=So(r)}return(e.D!=null?e.D:e.B)=="java.util.Map$Entry"?new KKt(e):new Nvt(e)},l.Kh=function(e,n){return pw(this,e,n)},l._g=function(e,n,r){var s;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.a}return oh(this,e-Zn((dn(),Sb)),yn((s=u(In(this,16),26),s||Sb),e),n,r)},l.hh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 1:return this.a&&(r=u(this.a,49).ih(this,4,r1,r)),Hyt(this,u(e,235),r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),Sb)),n),66),o.Nj().Qj(this,iu(this),n-Zn((dn(),Sb)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 1:return Hyt(this,null,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),Sb)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),Sb)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return sh(this,e-Zn((dn(),Sb)),yn((n=u(In(this,16),26),n||Sb),e))},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:Tae(this,u(n,235));return}fh(this,e-Zn((dn(),Sb)),yn((r=u(In(this,16),26),r||Sb),e),n)},l.zh=function(){return dn(),Sb},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Tae(this,null);return}lh(this,e-Zn((dn(),Sb)),yn((n=u(In(this,16),26),n||Sb),e))};var rA,zAt,P4e;P(Mn,"EFactoryImpl",704),I(wf,704,{105:1,2014:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},J5),l.Ih=function(e,n){switch(e.yj()){case 12:return u(n,146).tg();case 13:return $o(n);default:throw rt(new Pn(HE+e.ne()+kw))}},l.Jh=function(e){var n,r,s,o,h,d,w,k;switch(e.G==-1&&(e.G=(n=Fl(e),n?Fg(n.Mh(),e):-1)),e.G){case 4:return h=new YT,h;case 6:return d=new Bpt,d;case 7:return w=new Rpt,w;case 8:return s=new fv,s;case 9:return r=new vp,r;case 10:return o=new rd,o;case 11:return k=new YF,k;default:throw rt(new Pn(Rct+e.zb+kw))}},l.Kh=function(e,n){switch(e.yj()){case 13:case 12:return null;default:throw rt(new Pn(HE+e.ne()+kw))}},P(_2,"ElkGraphFactoryImpl",wf),I(438,150,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1}),l.Wg=function(){var e,n;return n=(e=u(In(this,16),26),Dwt(pd(e||this.zh()))),n==null?(V9(),V9(),Sft):new pWt(this,n)},l._g=function(e,n,r){var s;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.ne()}return oh(this,e-Zn(this.zh()),yn((s=u(In(this,16),26),s||this.zh()),e),n,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return sh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:this.Lh(Br(n));return}fh(this,e-Zn(this.zh()),yn((r=u(In(this,16),26),r||this.zh()),e),n)},l.zh=function(){return dn(),J4e},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:this.Lh(null);return}lh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.ne=function(){return this.zb},l.Lh=function(e){Xc(this,e)},l.Ib=function(){return XC(this)},l.zb=null,P(Mn,"ENamedElementImpl",438),I(179,438,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},YXt),l.Qg=function(e){return Rse(this,e)},l._g=function(e,n,r){var s;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new qm(this,i1,this)),this.rb;case 6:return!this.vb&&(this.vb=new Ix(r1,this,6,7)),this.vb;case 7:return n?this.Db>>16==7?u(this.Cb,235):null:hQt(this)}return oh(this,e-Zn((dn(),np)),yn((s=u(In(this,16),26),s||np),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 4:return this.sb&&(r=u(this.sb,49).ih(this,1,nA,r)),Wyt(this,u(e,471),r);case 5:return!this.rb&&(this.rb=new qm(this,i1,this)),Qc(this.rb,e,r);case 6:return!this.vb&&(this.vb=new Ix(r1,this,6,7)),Qc(this.vb,e,r);case 7:return this.Cb&&(r=(o=this.Db>>16,o>=0?Rse(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,7,r)}return h=u(yn((s=u(In(this,16),26),s||(dn(),np)),n),66),h.Nj().Qj(this,iu(this),n-Zn((dn(),np)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 4:return Wyt(this,null,r);case 5:return!this.rb&&(this.rb=new qm(this,i1,this)),Ba(this.rb,e,r);case 6:return!this.vb&&(this.vb=new Ix(r1,this,6,7)),Ba(this.vb,e,r);case 7:return zl(this,null,7,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),np)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),np)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!hQt(this)}return sh(this,e-Zn((dn(),np)),yn((n=u(In(this,16),26),n||np),e))},l.oh=function(e){var n;return n=M2n(this,e),n||kxt(this,e)},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:Xc(this,Br(n));return;case 2:az(this,Br(n));return;case 3:sz(this,Br(n));return;case 4:Dst(this,u(n,471));return;case 5:!this.rb&&(this.rb=new qm(this,i1,this)),xr(this.rb),!this.rb&&(this.rb=new qm(this,i1,this)),rs(this.rb,u(n,14));return;case 6:!this.vb&&(this.vb=new Ix(r1,this,6,7)),xr(this.vb),!this.vb&&(this.vb=new Ix(r1,this,6,7)),rs(this.vb,u(n,14));return}fh(this,e-Zn((dn(),np)),yn((r=u(In(this,16),26),r||np),e),n)},l.vh=function(e){var n,r;if(e&&this.rb)for(r=new er(this.rb);r.e!=r.i.gc();)n=dr(r),Et(n,351)&&(u(n,351).w=null);t6(this,64,e)},l.zh=function(){return dn(),np},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Xc(this,null);return;case 2:az(this,null);return;case 3:sz(this,null);return;case 4:Dst(this,null);return;case 5:!this.rb&&(this.rb=new qm(this,i1,this)),xr(this.rb);return;case 6:!this.vb&&(this.vb=new Ix(r1,this,6,7)),xr(this.vb);return}lh(this,e-Zn((dn(),np)),yn((n=u(In(this,16),26),n||np),e))},l.Gh=function(){mst(this)},l.Mh=function(){return!this.rb&&(this.rb=new qm(this,i1,this)),this.rb},l.Nh=function(){return this.sb},l.Oh=function(){return this.ub},l.Ph=function(){return this.xb},l.Qh=function(){return this.yb},l.Rh=function(e){this.ub=e},l.Ib=function(){var e;return this.Db&64?XC(this):(e=new Th(XC(this)),e.a+=" (nsURI: ",fo(e,this.yb),e.a+=", nsPrefix: ",fo(e,this.xb),e.a+=")",e.a)},l.xb=null,l.yb=null,P(Mn,"EPackageImpl",179),I(555,179,{105:1,2016:1,555:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},Qoe),l.q=!1,l.r=!1;var F4e=!1;P(_2,"ElkGraphPackageImpl",555),I(354,724,{105:1,413:1,160:1,137:1,470:1,354:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},YT),l.Qg=function(e){return Q3t(this,e)},l._g=function(e,n,r){switch(e){case 7:return fQt(this);case 8:return this.a}return s3t(this,e,n,r)},l.hh=function(e,n,r){var s;switch(n){case 7:return this.Cb&&(r=(s=this.Db>>16,s>=0?Q3t(this,r):this.Cb.ih(this,-1-s,null,r))),Yvt(this,u(e,160),r)}return Ast(this,e,n,r)},l.jh=function(e,n,r){return n==7?Yvt(this,null,r):fit(this,e,n,r)},l.lh=function(e){switch(e){case 7:return!!fQt(this);case 8:return!hn("",this.a)}return f3t(this,e)},l.sh=function(e,n){switch(e){case 7:A5t(this,u(n,160));return;case 8:Ymt(this,Br(n));return}h4t(this,e,n)},l.zh=function(){return Zc(),RAt},l.Bh=function(e){switch(e){case 7:A5t(this,null);return;case 8:Ymt(this,"");return}v3t(this,e)},l.Ib=function(){return Rae(this)},l.a="",P(_2,"ElkLabelImpl",354),I(239,725,{105:1,413:1,82:1,160:1,33:1,470:1,239:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},Bpt),l.Qg=function(e){return e4t(this,e)},l._g=function(e,n,r){switch(e){case 9:return!this.c&&(this.c=new he(fl,this,9,9)),this.c;case 10:return!this.a&&(this.a=new he(ns,this,10,11)),this.a;case 11:return ts(this);case 12:return!this.b&&(this.b=new he(Ws,this,12,3)),this.b;case 13:return Fn(),!this.a&&(this.a=new he(ns,this,10,11)),this.a.i>0}return j3t(this,e,n,r)},l.hh=function(e,n,r){var s;switch(n){case 9:return!this.c&&(this.c=new he(fl,this,9,9)),Qc(this.c,e,r);case 10:return!this.a&&(this.a=new he(ns,this,10,11)),Qc(this.a,e,r);case 11:return this.Cb&&(r=(s=this.Db>>16,s>=0?e4t(this,r):this.Cb.ih(this,-1-s,null,r))),rvt(this,u(e,33),r);case 12:return!this.b&&(this.b=new he(Ws,this,12,3)),Qc(this.b,e,r)}return i4t(this,e,n,r)},l.jh=function(e,n,r){switch(n){case 9:return!this.c&&(this.c=new he(fl,this,9,9)),Ba(this.c,e,r);case 10:return!this.a&&(this.a=new he(ns,this,10,11)),Ba(this.a,e,r);case 11:return rvt(this,null,r);case 12:return!this.b&&(this.b=new he(Ws,this,12,3)),Ba(this.b,e,r)}return s4t(this,e,n,r)},l.lh=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!ts(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new he(ns,this,10,11)),this.a.i>0}return Ayt(this,e)},l.sh=function(e,n){switch(e){case 9:!this.c&&(this.c=new he(fl,this,9,9)),xr(this.c),!this.c&&(this.c=new he(fl,this,9,9)),rs(this.c,u(n,14));return;case 10:!this.a&&(this.a=new he(ns,this,10,11)),xr(this.a),!this.a&&(this.a=new he(ns,this,10,11)),rs(this.a,u(n,14));return;case 11:C5t(this,u(n,33));return;case 12:!this.b&&(this.b=new he(Ws,this,12,3)),xr(this.b),!this.b&&(this.b=new he(Ws,this,12,3)),rs(this.b,u(n,14));return}g5t(this,e,n)},l.zh=function(){return Zc(),jAt},l.Bh=function(e){switch(e){case 9:!this.c&&(this.c=new he(fl,this,9,9)),xr(this.c);return;case 10:!this.a&&(this.a=new he(ns,this,10,11)),xr(this.a);return;case 11:C5t(this,null);return;case 12:!this.b&&(this.b=new he(Ws,this,12,3)),xr(this.b);return}I3t(this,e)},l.Ib=function(){return H5t(this)},P(_2,"ElkNodeImpl",239),I(186,725,{105:1,413:1,82:1,160:1,118:1,470:1,186:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},Rpt),l.Qg=function(e){return Z3t(this,e)},l._g=function(e,n,r){return e==9?k1(this):j3t(this,e,n,r)},l.hh=function(e,n,r){var s;switch(n){case 9:return this.Cb&&(r=(s=this.Db>>16,s>=0?Z3t(this,r):this.Cb.ih(this,-1-s,null,r))),Y2t(this,u(e,33),r)}return i4t(this,e,n,r)},l.jh=function(e,n,r){return n==9?Y2t(this,null,r):s4t(this,e,n,r)},l.lh=function(e){return e==9?!!k1(this):Ayt(this,e)},l.sh=function(e,n){switch(e){case 9:T5t(this,u(n,33));return}g5t(this,e,n)},l.zh=function(){return Zc(),$At},l.Bh=function(e){switch(e){case 9:T5t(this,null);return}I3t(this,e)},l.Ib=function(){return Tue(this)},P(_2,"ElkPortImpl",186);var B4e=Yi(Ra,"BasicEMap/Entry");I(1092,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,114:1,115:1},YF),l.Fb=function(e){return this===e},l.cd=function(){return this.b},l.Hb=function(){return Iv(this)},l.Uh=function(e){Xmt(this,u(e,146))},l._g=function(e,n,r){switch(e){case 0:return this.b;case 1:return this.c}return jz(this,e,n,r)},l.lh=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return est(this,e)},l.sh=function(e,n){switch(e){case 0:Xmt(this,u(n,146));return;case 1:Jmt(this,n);return}jst(this,e,n)},l.zh=function(){return Zc(),Eb},l.Bh=function(e){switch(e){case 0:Xmt(this,null);return;case 1:Jmt(this,null);return}Nst(this,e)},l.Sh=function(){var e;return this.a==-1&&(e=this.b,this.a=e?Hi(e):0),this.a},l.dd=function(){return this.c},l.Th=function(e){this.a=e},l.ed=function(e){var n;return n=this.c,Jmt(this,e),n},l.Ib=function(){var e;return this.Db&64?bf(this):(e=new _p,Vr(Vr(Vr(e,this.b?this.b.tg():Tu),Pot),dC(this.c)),e.a)},l.a=-1,l.c=null;var $w=P(_2,"ElkPropertyToValueMapEntryImpl",1092);I(984,1,{},XF),P(wa,"JsonAdapter",984),I(210,60,U0,ad),P(wa,"JsonImportException",210),I(857,1,{},jse),P(wa,"JsonImporter",857),I(891,1,{},gVt),P(wa,"JsonImporter/lambda$0$Type",891),I(892,1,{},pVt),P(wa,"JsonImporter/lambda$1$Type",892),I(900,1,{},Y$t),P(wa,"JsonImporter/lambda$10$Type",900),I(902,1,{},bVt),P(wa,"JsonImporter/lambda$11$Type",902),I(903,1,{},vVt),P(wa,"JsonImporter/lambda$12$Type",903),I(909,1,{},LXt),P(wa,"JsonImporter/lambda$13$Type",909),I(908,1,{},AXt),P(wa,"JsonImporter/lambda$14$Type",908),I(904,1,{},wVt),P(wa,"JsonImporter/lambda$15$Type",904),I(905,1,{},mVt),P(wa,"JsonImporter/lambda$16$Type",905),I(906,1,{},yVt),P(wa,"JsonImporter/lambda$17$Type",906),I(907,1,{},xVt),P(wa,"JsonImporter/lambda$18$Type",907),I(912,1,{},X$t),P(wa,"JsonImporter/lambda$19$Type",912),I(893,1,{},Q$t),P(wa,"JsonImporter/lambda$2$Type",893),I(910,1,{},Z$t),P(wa,"JsonImporter/lambda$20$Type",910),I(911,1,{},J$t),P(wa,"JsonImporter/lambda$21$Type",911),I(915,1,{},tzt),P(wa,"JsonImporter/lambda$22$Type",915),I(913,1,{},ezt),P(wa,"JsonImporter/lambda$23$Type",913),I(914,1,{},nzt),P(wa,"JsonImporter/lambda$24$Type",914),I(917,1,{},rzt),P(wa,"JsonImporter/lambda$25$Type",917),I(916,1,{},izt),P(wa,"JsonImporter/lambda$26$Type",916),I(918,1,Un,kVt),l.td=function(e){san(this.b,this.a,Br(e))},P(wa,"JsonImporter/lambda$27$Type",918),I(919,1,Un,EVt),l.td=function(e){aan(this.b,this.a,Br(e))},P(wa,"JsonImporter/lambda$28$Type",919),I(920,1,{},TVt),P(wa,"JsonImporter/lambda$29$Type",920),I(896,1,{},szt),P(wa,"JsonImporter/lambda$3$Type",896),I(921,1,{},CVt),P(wa,"JsonImporter/lambda$30$Type",921),I(922,1,{},azt),P(wa,"JsonImporter/lambda$31$Type",922),I(923,1,{},ozt),P(wa,"JsonImporter/lambda$32$Type",923),I(924,1,{},czt),P(wa,"JsonImporter/lambda$33$Type",924),I(925,1,{},uzt),P(wa,"JsonImporter/lambda$34$Type",925),I(859,1,{},lzt),P(wa,"JsonImporter/lambda$35$Type",859),I(929,1,{},yKt),P(wa,"JsonImporter/lambda$36$Type",929),I(926,1,Un,hzt),l.td=function(e){usn(this.a,u(e,469))},P(wa,"JsonImporter/lambda$37$Type",926),I(927,1,Un,IVt),l.td=function(e){BYe(this.a,this.b,u(e,202))},P(wa,"JsonImporter/lambda$38$Type",927),I(928,1,Un,DVt),l.td=function(e){RYe(this.a,this.b,u(e,202))},P(wa,"JsonImporter/lambda$39$Type",928),I(894,1,{},fzt),P(wa,"JsonImporter/lambda$4$Type",894),I(930,1,Un,dzt),l.td=function(e){lsn(this.a,u(e,8))},P(wa,"JsonImporter/lambda$40$Type",930),I(895,1,{},gzt),P(wa,"JsonImporter/lambda$5$Type",895),I(899,1,{},pzt),P(wa,"JsonImporter/lambda$6$Type",899),I(897,1,{},bzt),P(wa,"JsonImporter/lambda$7$Type",897),I(898,1,{},vzt),P(wa,"JsonImporter/lambda$8$Type",898),I(901,1,{},wzt),P(wa,"JsonImporter/lambda$9$Type",901),I(948,1,Un,mzt),l.td=function(e){Bx(this.a,new Hm(Br(e)))},P(wa,"JsonMetaDataConverter/lambda$0$Type",948),I(949,1,Un,yzt),l.td=function(e){_en(this.a,u(e,237))},P(wa,"JsonMetaDataConverter/lambda$1$Type",949),I(950,1,Un,xzt),l.td=function(e){Ern(this.a,u(e,149))},P(wa,"JsonMetaDataConverter/lambda$2$Type",950),I(951,1,Un,kzt),l.td=function(e){Sen(this.a,u(e,175))},P(wa,"JsonMetaDataConverter/lambda$3$Type",951),I(237,22,{3:1,35:1,22:1,237:1},Sx);var XV,QV,yft,ZV,JV,tU,xft,kft,eU=jr(BD,"GraphFeature",237,Hr,Yan,QJe),R4e;I(13,1,{35:1,146:1},Gi,Os,mn,eo),l.wd=function(e){return FXe(this,u(e,146))},l.Fb=function(e){return XXt(this,e)},l.wg=function(){return De(this)},l.tg=function(){return this.b},l.Hb=function(){return Bg(this.b)},l.Ib=function(){return this.b},P(BD,"Property",13),I(818,1,Oi,bpt),l.ue=function(e,n){return tln(this,u(e,94),u(n,94))},l.Fb=function(e){return this===e},l.ve=function(){return new ft(this)},P(BD,"PropertyHolderComparator",818),I(695,1,ra,vpt),l.Nb=function(e){pa(this,e)},l.Pb=function(){return lan(this)},l.Qb=function(){pHt()},l.Ob=function(){return!!this.a},P(yH,"ElkGraphUtil/AncestorIterator",695);var qAt=Yi(Ra,"EList");I(67,52,{20:1,28:1,52:1,14:1,15:1,67:1,58:1}),l.Vc=function(e,n){JC(this,e,n)},l.Fc=function(e){return Mr(this,e)},l.Wc=function(e,n){return yyt(this,e,n)},l.Gc=function(e){return rs(this,e)},l.Zh=function(){return new Mx(this)},l.$h=function(){return new PM(this)},l._h=function(e){return _I(this,e)},l.ai=function(){return!0},l.bi=function(e,n){},l.ci=function(){},l.di=function(e,n){Brt(this,e,n)},l.ei=function(e,n,r){},l.fi=function(e,n){},l.gi=function(e,n,r){},l.Fb=function(e){return lue(this,e)},l.Hb=function(){return pyt(this)},l.hi=function(){return!1},l.Kc=function(){return new er(this)},l.Yc=function(){return new Lx(this)},l.Zc=function(e){var n;if(n=this.gc(),e<0||e>n)throw rt(new jm(e,n));return new qnt(this,e)},l.ji=function(e,n){this.ii(e,this.Xc(n))},l.Mc=function(e){return j$(this,e)},l.li=function(e,n){return n},l._c=function(e,n){return u4(this,e,n)},l.Ib=function(){return o3t(this)},l.ni=function(){return!0},l.oi=function(e,n){return Q8(this,n)},P(Ra,"AbstractEList",67),I(63,67,_d,tx,Kv,oyt),l.Vh=function(e,n){return Lst(this,e,n)},l.Wh=function(e){return fse(this,e)},l.Xh=function(e,n){zI(this,e,n)},l.Yh=function(e){uI(this,e)},l.pi=function(e){return Amt(this,e)},l.$b=function(){RC(this)},l.Hc=function(e){return fE(this,e)},l.Xb=function(e){return St(this,e)},l.qi=function(e){var n,r,s;++this.j,r=this.g==null?0:this.g.length,e>r&&(s=this.g,n=r+(r/2|0)+4,n=0?(this.$c(n),!0):!1},l.mi=function(e,n){return this.Ui(e,this.oi(e,n))},l.gc=function(){return this.Vi()},l.Pc=function(){return this.Wi()},l.Qc=function(e){return this.Xi(e)},l.Ib=function(){return this.Yi()},P(Ra,"DelegatingEList",1995),I(1996,1995,a0e),l.Vh=function(e,n){return Z5t(this,e,n)},l.Wh=function(e){return this.Vh(this.Vi(),e)},l.Xh=function(e,n){Yoe(this,e,n)},l.Yh=function(e){$oe(this,e)},l.ai=function(){return!this.bj()},l.$b=function(){C_(this)},l.Zi=function(e,n,r,s,o){return new ZXt(this,e,n,r,s,o)},l.$i=function(e){mi(this.Ai(),e)},l._i=function(){return null},l.aj=function(){return-1},l.Ai=function(){return null},l.bj=function(){return!1},l.cj=function(e,n){return n},l.dj=function(e,n){return n},l.ej=function(){return!1},l.fj=function(){return!this.Ri()},l.ii=function(e,n){var r,s;return this.ej()?(s=this.fj(),r=M4t(this,e,n),this.$i(this.Zi(7,de(n),r,e,s)),r):M4t(this,e,n)},l.$c=function(e){var n,r,s,o;return this.ej()?(r=null,s=this.fj(),n=this.Zi(4,o=Dj(this,e),null,e,s),this.bj()&&o?(r=this.dj(o,r),r?(r.Ei(n),r.Fi()):this.$i(n)):r?(r.Ei(n),r.Fi()):this.$i(n),o):(o=Dj(this,e),this.bj()&&o&&(r=this.dj(o,null),r&&r.Fi()),o)},l.mi=function(e,n){return rle(this,e,n)},P(k6,"DelegatingNotifyingListImpl",1996),I(143,1,QD),l.Ei=function(e){return v4t(this,e)},l.Fi=function(){Urt(this)},l.xi=function(){return this.d},l._i=function(){return null},l.gj=function(){return null},l.yi=function(e){return-1},l.zi=function(){return Hce(this)},l.Ai=function(){return null},l.Bi=function(){return O5t(this)},l.Ci=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},l.hj=function(){return!1},l.Di=function(e){var n,r,s,o,h,d,w,k,C,M,F;switch(this.d){case 1:case 2:switch(o=e.xi(),o){case 1:case 2:if(h=e.Ai(),Gt(h)===Gt(this.Ai())&&this.yi(null)==e.yi(null))return this.g=e.zi(),e.xi()==1&&(this.d=1),!0}case 4:{switch(o=e.xi(),o){case 4:{if(h=e.Ai(),Gt(h)===Gt(this.Ai())&&this.yi(null)==e.yi(null))return C=pxt(this),k=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,d=e.Ci(),this.d=6,F=new Kv(2),k<=d?(Mr(F,this.n),Mr(F,e.Bi()),this.g=ct(ot(Tr,1),Xr,25,15,[this.o=k,d+1])):(Mr(F,e.Bi()),Mr(F,this.n),this.g=ct(ot(Tr,1),Xr,25,15,[this.o=d,k])),this.n=F,C||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(o=e.xi(),o){case 4:{if(h=e.Ai(),Gt(h)===Gt(this.Ai())&&this.yi(null)==e.yi(null)){for(C=pxt(this),d=e.Ci(),M=u(this.g,48),s=Pt(Tr,Xr,25,M.length+1,15,1),n=0;n>>0,n.toString(16))),s.a+=" (eventType: ",this.d){case 1:{s.a+="SET";break}case 2:{s.a+="UNSET";break}case 3:{s.a+="ADD";break}case 5:{s.a+="ADD_MANY";break}case 4:{s.a+="REMOVE";break}case 6:{s.a+="REMOVE_MANY";break}case 7:{s.a+="MOVE";break}case 8:{s.a+="REMOVING_ADAPTER";break}case 9:{s.a+="RESOLVE";break}default:{uet(s,this.d);break}}if(Iue(this)&&(s.a+=", touch: true"),s.a+=", position: ",uet(s,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),s.a+=", notifier: ",oC(s,this.Ai()),s.a+=", feature: ",oC(s,this._i()),s.a+=", oldValue: ",oC(s,O5t(this)),s.a+=", newValue: ",this.d==6&&Et(this.g,48)){for(r=u(this.g,48),s.a+="[",e=0;e10?((!this.b||this.c.j!=this.a)&&(this.b=new yC(this),this.a=this.j),S0(this.b,e)):fE(this,e)},l.ni=function(){return!0},l.a=0,P(Ra,"AbstractEList/1",953),I(295,73,sot,jm),P(Ra,"AbstractEList/BasicIndexOutOfBoundsException",295),I(40,1,ra,er),l.Nb=function(e){pa(this,e)},l.mj=function(){if(this.i.j!=this.f)throw rt(new eh)},l.nj=function(){return dr(this)},l.Ob=function(){return this.e!=this.i.gc()},l.Pb=function(){return this.nj()},l.Qb=function(){u_(this)},l.e=0,l.f=0,l.g=-1,P(Ra,"AbstractEList/EIterator",40),I(278,40,Jd,Lx,qnt),l.Qb=function(){u_(this)},l.Rb=function(e){gie(this,e)},l.oj=function(){var e;try{return e=this.d.Xb(--this.e),this.mj(),this.g=this.e,e}catch(n){throw n=Wi(n),Et(n,73)?(this.mj(),rt(new lc)):rt(n)}},l.pj=function(e){pse(this,e)},l.Sb=function(){return this.e!=0},l.Tb=function(){return this.e},l.Ub=function(){return this.oj()},l.Vb=function(){return this.e-1},l.Wb=function(e){this.pj(e)},P(Ra,"AbstractEList/EListIterator",278),I(341,40,ra,Mx),l.nj=function(){return nst(this)},l.Qb=function(){throw rt(new Or)},P(Ra,"AbstractEList/NonResolvingEIterator",341),I(385,278,Jd,PM,lvt),l.Rb=function(e){throw rt(new Or)},l.nj=function(){var e;try{return e=this.c.ki(this.e),this.mj(),this.g=this.e++,e}catch(n){throw n=Wi(n),Et(n,73)?(this.mj(),rt(new lc)):rt(n)}},l.oj=function(){var e;try{return e=this.c.ki(--this.e),this.mj(),this.g=this.e,e}catch(n){throw n=Wi(n),Et(n,73)?(this.mj(),rt(new lc)):rt(n)}},l.Qb=function(){throw rt(new Or)},l.Wb=function(e){throw rt(new Or)},P(Ra,"AbstractEList/NonResolvingEListIterator",385),I(1982,67,o0e),l.Vh=function(e,n){var r,s,o,h,d,w,k,C,M,F,H;if(o=n.gc(),o!=0){for(C=u(In(this.a,4),126),M=C==null?0:C.length,H=M+o,s=Tit(this,H),F=M-e,F>0&&Ic(C,e,s,e+o,F),k=n.Kc(),d=0;dr)throw rt(new jm(e,r));return new uXt(this,e)},l.$b=function(){var e,n;++this.j,e=u(In(this.a,4),126),n=e==null?0:e.length,cE(this,null),Brt(this,n,e)},l.Hc=function(e){var n,r,s,o,h;if(n=u(In(this.a,4),126),n!=null){if(e!=null){for(s=n,o=0,h=s.length;o=r)throw rt(new jm(e,r));return n[e]},l.Xc=function(e){var n,r,s;if(n=u(In(this.a,4),126),n!=null){if(e!=null){for(r=0,s=n.length;rr)throw rt(new jm(e,r));return new cXt(this,e)},l.ii=function(e,n){var r,s,o;if(r=kie(this),o=r==null?0:r.length,e>=o)throw rt(new mo(Wct+e+S2+o));if(n>=o)throw rt(new mo(Kct+n+S2+o));return s=r[n],e!=n&&(e0&&Ic(e,0,n,0,r),n},l.Qc=function(e){var n,r,s;return n=u(In(this.a,4),126),s=n==null?0:n.length,s>0&&(e.lengths&&Ji(e,s,null),e};var j4e;P(Ra,"ArrayDelegatingEList",1982),I(1038,40,ra,wJt),l.mj=function(){if(this.b.j!=this.f||Gt(u(In(this.b.a,4),126))!==Gt(this.a))throw rt(new eh)},l.Qb=function(){u_(this),this.a=u(In(this.b.a,4),126)},P(Ra,"ArrayDelegatingEList/EIterator",1038),I(706,278,Jd,DYt,cXt),l.mj=function(){if(this.b.j!=this.f||Gt(u(In(this.b.a,4),126))!==Gt(this.a))throw rt(new eh)},l.pj=function(e){pse(this,e),this.a=u(In(this.b.a,4),126)},l.Qb=function(){u_(this),this.a=u(In(this.b.a,4),126)},P(Ra,"ArrayDelegatingEList/EListIterator",706),I(1039,341,ra,mJt),l.mj=function(){if(this.b.j!=this.f||Gt(u(In(this.b.a,4),126))!==Gt(this.a))throw rt(new eh)},P(Ra,"ArrayDelegatingEList/NonResolvingEIterator",1039),I(707,385,Jd,OYt,uXt),l.mj=function(){if(this.b.j!=this.f||Gt(u(In(this.b.a,4),126))!==Gt(this.a))throw rt(new eh)},P(Ra,"ArrayDelegatingEList/NonResolvingEListIterator",707),I(606,295,sot,Vet),P(Ra,"BasicEList/BasicIndexOutOfBoundsException",606),I(696,63,_d,Ybt),l.Vc=function(e,n){throw rt(new Or)},l.Fc=function(e){throw rt(new Or)},l.Wc=function(e,n){throw rt(new Or)},l.Gc=function(e){throw rt(new Or)},l.$b=function(){throw rt(new Or)},l.qi=function(e){throw rt(new Or)},l.Kc=function(){return this.Zh()},l.Yc=function(){return this.$h()},l.Zc=function(e){return this._h(e)},l.ii=function(e,n){throw rt(new Or)},l.ji=function(e,n){throw rt(new Or)},l.$c=function(e){throw rt(new Or)},l.Mc=function(e){throw rt(new Or)},l._c=function(e,n){throw rt(new Or)},P(Ra,"BasicEList/UnmodifiableEList",696),I(705,1,{3:1,20:1,14:1,15:1,58:1,589:1}),l.Vc=function(e,n){_Xe(this,e,u(n,42))},l.Fc=function(e){return fQe(this,u(e,42))},l.Jc=function(e){va(this,e)},l.Xb=function(e){return u(St(this.c,e),133)},l.ii=function(e,n){return u(this.c.ii(e,n),42)},l.ji=function(e,n){SXe(this,e,u(n,42))},l.Lc=function(){return new Tn(null,new _n(this,16))},l.$c=function(e){return u(this.c.$c(e),42)},l._c=function(e,n){return yen(this,e,u(n,42))},l.ad=function(e){e4(this,e)},l.Nc=function(){return new _n(this,16)},l.Oc=function(){return new Tn(null,new _n(this,16))},l.Wc=function(e,n){return this.c.Wc(e,n)},l.Gc=function(e){return this.c.Gc(e)},l.$b=function(){this.c.$b()},l.Hc=function(e){return this.c.Hc(e)},l.Ic=function(e){return II(this.c,e)},l.qj=function(){var e,n,r;if(this.d==null){for(this.d=Pt(HAt,I8t,63,2*this.f+1,0,1),r=this.e,this.f=0,n=this.c.Kc();n.e!=n.i.gc();)e=u(n.nj(),133),qz(this,e);this.e=r}},l.Fb=function(e){return iKt(this,e)},l.Hb=function(){return pyt(this.c)},l.Xc=function(e){return this.c.Xc(e)},l.rj=function(){this.c=new Tzt(this)},l.dc=function(){return this.f==0},l.Kc=function(){return this.c.Kc()},l.Yc=function(){return this.c.Yc()},l.Zc=function(e){return this.c.Zc(e)},l.sj=function(){return fI(this)},l.tj=function(e,n,r){return new xKt(e,n,r)},l.uj=function(){return new wp},l.Mc=function(e){return Bee(this,e)},l.gc=function(){return this.f},l.bd=function(e,n){return new Kd(this.c,e,n)},l.Pc=function(){return this.c.Pc()},l.Qc=function(e){return this.c.Qc(e)},l.Ib=function(){return o3t(this.c)},l.e=0,l.f=0,P(Ra,"BasicEMap",705),I(1033,63,_d,Tzt),l.bi=function(e,n){uKe(this,u(n,133))},l.ei=function(e,n,r){var s;++(s=this,u(n,133),s).a.e},l.fi=function(e,n){lKe(this,u(n,133))},l.gi=function(e,n,r){JXe(this,u(n,133),u(r,133))},l.di=function(e,n){Sne(this.a)},P(Ra,"BasicEMap/1",1033),I(1034,63,_d,wp),l.ri=function(e){return Pt(xxn,c0e,612,e,0,1)},P(Ra,"BasicEMap/2",1034),I(1035,N1,ju,Czt),l.$b=function(){this.a.c.$b()},l.Hc=function(e){return Wit(this.a,e)},l.Kc=function(){return this.a.f==0?(f8(),lN.a):new aHt(this.a)},l.Mc=function(e){var n;return n=this.a.f,Iz(this.a,e),this.a.f!=n},l.gc=function(){return this.a.f},P(Ra,"BasicEMap/3",1035),I(1036,28,wy,_zt),l.$b=function(){this.a.c.$b()},l.Hc=function(e){return hue(this.a,e)},l.Kc=function(){return this.a.f==0?(f8(),lN.a):new oHt(this.a)},l.gc=function(){return this.a.f},P(Ra,"BasicEMap/4",1036),I(1037,N1,ju,Szt),l.$b=function(){this.a.c.$b()},l.Hc=function(e){var n,r,s,o,h,d,w,k,C;if(this.a.f>0&&Et(e,42)&&(this.a.qj(),k=u(e,42),w=k.cd(),o=w==null?0:Hi(w),h=X2t(this.a,o),n=this.a.d[h],n)){for(r=u(n.g,367),C=n.i,d=0;d"+this.c},l.a=0;var xxn=P(Ra,"BasicEMap/EntryImpl",612);I(536,1,{},Tk),P(Ra,"BasicEMap/View",536);var lN;I(768,1,{}),l.Fb=function(e){return p5t((vn(),io),e)},l.Hb=function(){return Syt((vn(),io))},l.Ib=function(){return Qp((vn(),io))},P(Ra,"ECollections/BasicEmptyUnmodifiableEList",768),I(1312,1,Jd,QF),l.Nb=function(e){pa(this,e)},l.Rb=function(e){throw rt(new Or)},l.Ob=function(){return!1},l.Sb=function(){return!1},l.Pb=function(){throw rt(new lc)},l.Tb=function(){return 0},l.Ub=function(){throw rt(new lc)},l.Vb=function(){return-1},l.Qb=function(){throw rt(new Or)},l.Wb=function(e){throw rt(new Or)},P(Ra,"ECollections/BasicEmptyUnmodifiableEList/1",1312),I(1310,768,{20:1,14:1,15:1,58:1},vqt),l.Vc=function(e,n){AHt()},l.Fc=function(e){return LHt()},l.Wc=function(e,n){return MHt()},l.Gc=function(e){return IHt()},l.$b=function(){DHt()},l.Hc=function(e){return!1},l.Ic=function(e){return!1},l.Jc=function(e){va(this,e)},l.Xb=function(e){return Zbt((vn(),e)),null},l.Xc=function(e){return-1},l.dc=function(){return!0},l.Kc=function(){return this.a},l.Yc=function(){return this.a},l.Zc=function(e){return this.a},l.ii=function(e,n){return OHt()},l.ji=function(e,n){NHt()},l.Lc=function(){return new Tn(null,new _n(this,16))},l.$c=function(e){return PHt()},l.Mc=function(e){return FHt()},l._c=function(e,n){return BHt()},l.gc=function(){return 0},l.ad=function(e){e4(this,e)},l.Nc=function(){return new _n(this,16)},l.Oc=function(){return new Tn(null,new _n(this,16))},l.bd=function(e,n){return vn(),new Kd(io,e,n)},l.Pc=function(){return Zvt((vn(),io))},l.Qc=function(e){return vn(),XI(io,e)},P(Ra,"ECollections/EmptyUnmodifiableEList",1310),I(1311,768,{20:1,14:1,15:1,58:1,589:1},wqt),l.Vc=function(e,n){AHt()},l.Fc=function(e){return LHt()},l.Wc=function(e,n){return MHt()},l.Gc=function(e){return IHt()},l.$b=function(){DHt()},l.Hc=function(e){return!1},l.Ic=function(e){return!1},l.Jc=function(e){va(this,e)},l.Xb=function(e){return Zbt((vn(),e)),null},l.Xc=function(e){return-1},l.dc=function(){return!0},l.Kc=function(){return this.a},l.Yc=function(){return this.a},l.Zc=function(e){return this.a},l.ii=function(e,n){return OHt()},l.ji=function(e,n){NHt()},l.Lc=function(){return new Tn(null,new _n(this,16))},l.$c=function(e){return PHt()},l.Mc=function(e){return FHt()},l._c=function(e,n){return BHt()},l.gc=function(){return 0},l.ad=function(e){e4(this,e)},l.Nc=function(){return new _n(this,16)},l.Oc=function(){return new Tn(null,new _n(this,16))},l.bd=function(e,n){return vn(),new Kd(io,e,n)},l.Pc=function(){return Zvt((vn(),io))},l.Qc=function(e){return vn(),XI(io,e)},l.sj=function(){return vn(),vn(),a0},P(Ra,"ECollections/EmptyUnmodifiableEMap",1311);var VAt=Yi(Ra,"Enumerator"),nU;I(281,1,{281:1},eat),l.Fb=function(e){var n;return this===e?!0:Et(e,281)?(n=u(e,281),this.f==n.f&&ztn(this.i,n.i)&&Ant(this.a,this.f&256?n.f&256?n.a:null:n.f&256?null:n.a)&&Ant(this.d,n.d)&&Ant(this.g,n.g)&&Ant(this.e,n.e)&&Phn(this,n)):!1},l.Hb=function(){return this.f},l.Ib=function(){return que(this)},l.f=0;var $4e=0,z4e=0,q4e=0,H4e=0,UAt=0,WAt=0,KAt=0,YAt=0,XAt=0,G4e,iA=0,sA=0,V4e=0,U4e=0,rU,QAt;P(Ra,"URI",281),I(1091,43,_4,mqt),l.zc=function(e,n){return u(xo(this,Br(e),u(n,281)),281)},P(Ra,"URI/URICache",1091),I(497,63,_d,Ck,Nj),l.hi=function(){return!0},P(Ra,"UniqueEList",497),I(581,60,U0,F$),P(Ra,"WrappedException",581);var Zr=Yi(dh,h0e),Qy=Yi(dh,f0e),Au=Yi(dh,d0e),Zy=Yi(dh,g0e),i1=Yi(dh,p0e),Gh=Yi(dh,"EClass"),Cft=Yi(dh,"EDataType"),W4e;I(1183,43,_4,yqt),l.xc=function(e){return ea(e)?Fc(this,e):ec(Ao(this.f,e))},P(dh,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1183);var iU=Yi(dh,"EEnum"),eg=Yi(dh,b0e),ho=Yi(dh,v0e),Vh=Yi(dh,w0e),Uh,zw=Yi(dh,m0e),Jy=Yi(dh,y0e);I(1029,1,{},VZ),l.Ib=function(){return"NIL"},P(dh,"EStructuralFeature/Internal/DynamicValueHolder/1",1029);var K4e;I(1028,43,_4,xqt),l.xc=function(e){return ea(e)?Fc(this,e):ec(Ao(this.f,e))},P(dh,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1028);var lu=Yi(dh,x0e),V6=Yi(dh,"EValidator/PatternMatcher"),ZAt,JAt,Ln,Jg,t3,Cb,Y4e,X4e,Q4e,_b,tp,Sb,qw,V1,Z4e,J4e,Wh,ep,t5e,np,e3,c5,Qa,e5e,n5e,Hw,sU=Yi($i,"FeatureMap/Entry");I(535,1,{72:1},JR),l.ak=function(){return this.a},l.dd=function(){return this.b},P(Mn,"BasicEObjectImpl/1",535),I(1027,1,tut,OVt),l.Wj=function(e){return Prt(this.a,this.b,e)},l.fj=function(){return dQt(this.a,this.b)},l.Wb=function(e){Nwt(this.a,this.b,e)},l.Xj=function(){Ben(this.a,this.b)},P(Mn,"BasicEObjectImpl/4",1027),I(1983,1,{108:1}),l.bk=function(e){this.e=e==0?r5e:Pt(Xn,Ie,1,e,5,1)},l.Ch=function(e){return this.e[e]},l.Dh=function(e,n){this.e[e]=n},l.Eh=function(e){this.e[e]=null},l.ck=function(){return this.c},l.dk=function(){throw rt(new Or)},l.ek=function(){throw rt(new Or)},l.fk=function(){return this.d},l.gk=function(){return this.e!=null},l.hk=function(e){this.c=e},l.ik=function(e){throw rt(new Or)},l.jk=function(e){throw rt(new Or)},l.kk=function(e){this.d=e};var r5e;P(Mn,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1983),I(185,1983,{108:1},th),l.dk=function(){return this.a},l.ek=function(){return this.b},l.ik=function(e){this.a=e},l.jk=function(e){this.b=e},P(Mn,"BasicEObjectImpl/EPropertiesHolderImpl",185),I(506,97,kde,_k),l.Kg=function(){return this.f},l.Pg=function(){return this.k},l.Rg=function(e,n){this.g=e,this.i=n},l.Tg=function(){return this.j&2?this.ph().ck():this.zh()},l.Vg=function(){return this.i},l.Mg=function(){return(this.j&1)!=0},l.eh=function(){return this.g},l.kh=function(){return(this.j&4)!=0},l.ph=function(){return!this.k&&(this.k=new th),this.k},l.th=function(e){this.ph().hk(e),e?this.j|=2:this.j&=-3},l.vh=function(e){this.ph().jk(e),e?this.j|=4:this.j&=-5},l.zh=function(){return(jp(),Ln).S},l.i=0,l.j=1,P(Mn,"EObjectImpl",506),I(780,506,{105:1,92:1,90:1,56:1,108:1,49:1,97:1},Nvt),l.Ch=function(e){return this.e[e]},l.Dh=function(e,n){this.e[e]=n},l.Eh=function(e){this.e[e]=null},l.Tg=function(){return this.d},l.Yg=function(e){return Vi(this.d,e)},l.$g=function(){return this.d},l.dh=function(){return this.e!=null},l.ph=function(){return!this.k&&(this.k=new ZF),this.k},l.th=function(e){this.d=e},l.yh=function(){var e;return this.e==null&&(e=Zn(this.d),this.e=e==0?i5e:Pt(Xn,Ie,1,e,5,1)),this},l.Ah=function(){return 0};var i5e;P(Mn,"DynamicEObjectImpl",780),I(1376,780,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1},KKt),l.Fb=function(e){return this===e},l.Hb=function(){return Iv(this)},l.th=function(e){this.d=e,this.b=gD(e,"key"),this.c=gD(e,Y_)},l.Sh=function(){var e;return this.a==-1&&(e=Wrt(this,this.b),this.a=e==null?0:Hi(e)),this.a},l.cd=function(){return Wrt(this,this.b)},l.dd=function(){return Wrt(this,this.c)},l.Th=function(e){this.a=e},l.Uh=function(e){Nwt(this,this.b,e)},l.ed=function(e){var n;return n=Wrt(this,this.c),Nwt(this,this.c,e),n},l.a=0,P(Mn,"DynamicEObjectImpl/BasicEMapEntry",1376),I(1377,1,{108:1},ZF),l.bk=function(e){throw rt(new Or)},l.Ch=function(e){throw rt(new Or)},l.Dh=function(e,n){throw rt(new Or)},l.Eh=function(e){throw rt(new Or)},l.ck=function(){throw rt(new Or)},l.dk=function(){return this.a},l.ek=function(){return this.b},l.fk=function(){return this.c},l.gk=function(){throw rt(new Or)},l.hk=function(e){throw rt(new Or)},l.ik=function(e){this.a=e},l.jk=function(e){this.b=e},l.kk=function(e){this.c=e},P(Mn,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1377),I(510,150,{105:1,92:1,90:1,590:1,147:1,56:1,108:1,49:1,97:1,510:1,150:1,114:1,115:1},JF),l.Qg=function(e){return J3t(this,e)},l._g=function(e,n,r){var s;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.d;case 2:return r?(!this.b&&(this.b=new yl((dn(),Qa),cc,this)),this.b):(!this.b&&(this.b=new yl((dn(),Qa),cc,this)),fI(this.b));case 3:return wQt(this);case 4:return!this.a&&(this.a=new Ss(kb,this,4)),this.a;case 5:return!this.c&&(this.c=new U3(kb,this,5)),this.c}return oh(this,e-Zn((dn(),Jg)),yn((s=u(In(this,16),26),s||Jg),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 3:return this.Cb&&(r=(o=this.Db>>16,o>=0?J3t(this,r):this.Cb.ih(this,-1-o,null,r))),Xvt(this,u(e,147),r)}return h=u(yn((s=u(In(this,16),26),s||(dn(),Jg)),n),66),h.Nj().Qj(this,iu(this),n-Zn((dn(),Jg)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 2:return!this.b&&(this.b=new yl((dn(),Qa),cc,this)),kj(this.b,e,r);case 3:return Xvt(this,null,r);case 4:return!this.a&&(this.a=new Ss(kb,this,4)),Ba(this.a,e,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),Jg)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),Jg)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!wQt(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return sh(this,e-Zn((dn(),Jg)),yn((n=u(In(this,16),26),n||Jg),e))},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:_tn(this,Br(n));return;case 2:!this.b&&(this.b=new yl((dn(),Qa),cc,this)),lz(this.b,n);return;case 3:Dce(this,u(n,147));return;case 4:!this.a&&(this.a=new Ss(kb,this,4)),xr(this.a),!this.a&&(this.a=new Ss(kb,this,4)),rs(this.a,u(n,14));return;case 5:!this.c&&(this.c=new U3(kb,this,5)),xr(this.c),!this.c&&(this.c=new U3(kb,this,5)),rs(this.c,u(n,14));return}fh(this,e-Zn((dn(),Jg)),yn((r=u(In(this,16),26),r||Jg),e),n)},l.zh=function(){return dn(),Jg},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:tyt(this,null);return;case 2:!this.b&&(this.b=new yl((dn(),Qa),cc,this)),this.b.c.$b();return;case 3:Dce(this,null);return;case 4:!this.a&&(this.a=new Ss(kb,this,4)),xr(this.a);return;case 5:!this.c&&(this.c=new U3(kb,this,5)),xr(this.c);return}lh(this,e-Zn((dn(),Jg)),yn((n=u(In(this,16),26),n||Jg),e))},l.Ib=function(){return Wre(this)},l.d=null,P(Mn,"EAnnotationImpl",510),I(151,705,D8t,Tl),l.Xh=function(e,n){cXe(this,e,u(n,42))},l.lk=function(e,n){return nZe(this,u(e,42),n)},l.pi=function(e){return u(u(this.c,69).pi(e),133)},l.Zh=function(){return u(this.c,69).Zh()},l.$h=function(){return u(this.c,69).$h()},l._h=function(e){return u(this.c,69)._h(e)},l.mk=function(e,n){return kj(this,e,n)},l.Wj=function(e){return u(this.c,76).Wj(e)},l.rj=function(){},l.fj=function(){return u(this.c,76).fj()},l.tj=function(e,n,r){var s;return s=u(Fl(this.b).Nh().Jh(this.b),133),s.Th(e),s.Uh(n),s.ed(r),s},l.uj=function(){return new mpt(this)},l.Wb=function(e){lz(this,e)},l.Xj=function(){u(this.c,76).Xj()},P($i,"EcoreEMap",151),I(158,151,D8t,yl),l.qj=function(){var e,n,r,s,o,h;if(this.d==null){for(h=Pt(HAt,I8t,63,2*this.f+1,0,1),r=this.c.Kc();r.e!=r.i.gc();)n=u(r.nj(),133),s=n.Sh(),o=(s&vi)%h.length,e=h[o],!e&&(e=h[o]=new mpt(this)),e.Fc(n);this.d=h}},P(Mn,"EAnnotationImpl/1",158),I(284,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,472:1,49:1,97:1,150:1,284:1,114:1,115:1}),l._g=function(e,n,r){var s,o;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Fn(),!!(this.Bb&256);case 3:return Fn(),!!(this.Bb&512);case 4:return de(this.s);case 5:return de(this.t);case 6:return Fn(),!!this.$j();case 7:return Fn(),o=this.s,o>=1;case 8:return n?Lh(this):this.r;case 9:return this.q}return oh(this,e-Zn(this.zh()),yn((s=u(In(this,16),26),s||this.zh()),e),n,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 9:return Vnt(this,r)}return o=u(yn((s=u(In(this,16),26),s||this.zh()),n),66),o.Nj().Rj(this,iu(this),n-Zn(this.zh()),e,r)},l.lh=function(e){var n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return r=this.s,r>=1;case 8:return!!this.r&&!this.q.e&&jv(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&jv(this.q).i==0)}return sh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.sh=function(e,n){var r,s;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:this.Lh(Br(n));return;case 2:Ng(this,je(Re(n)));return;case 3:Pg(this,je(Re(n)));return;case 4:Ig(this,u(n,19).a);return;case 5:this.ok(u(n,19).a);return;case 8:f2(this,u(n,138));return;case 9:s=O1(this,u(n,87),null),s&&s.Fi();return}fh(this,e-Zn(this.zh()),yn((r=u(In(this,16),26),r||this.zh()),e),n)},l.zh=function(){return dn(),n5e},l.Bh=function(e){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:this.Lh(null);return;case 2:Ng(this,!0);return;case 3:Pg(this,!0);return;case 4:Ig(this,0);return;case 5:this.ok(1);return;case 8:f2(this,null);return;case 9:r=O1(this,null,null),r&&r.Fi();return}lh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.Gh=function(){Lh(this),this.Bb|=1},l.Yj=function(){return Lh(this)},l.Zj=function(){return this.t},l.$j=function(){var e;return e=this.t,e>1||e==-1},l.hi=function(){return(this.Bb&512)!=0},l.nk=function(e,n){return Kyt(this,e,n)},l.ok=function(e){ty(this,e)},l.Ib=function(){return s5t(this)},l.s=0,l.t=1,P(Mn,"ETypedElementImpl",284),I(449,284,{105:1,92:1,90:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,449:1,284:1,114:1,115:1,677:1}),l.Qg=function(e){return Lse(this,e)},l._g=function(e,n,r){var s,o;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Fn(),!!(this.Bb&256);case 3:return Fn(),!!(this.Bb&512);case 4:return de(this.s);case 5:return de(this.t);case 6:return Fn(),!!this.$j();case 7:return Fn(),o=this.s,o>=1;case 8:return n?Lh(this):this.r;case 9:return this.q;case 10:return Fn(),!!(this.Bb&wf);case 11:return Fn(),!!(this.Bb&Ay);case 12:return Fn(),!!(this.Bb&yy);case 13:return this.j;case 14:return mE(this);case 15:return Fn(),!!(this.Bb&zu);case 16:return Fn(),!!(this.Bb&bd);case 17:return Vm(this)}return oh(this,e-Zn(this.zh()),yn((s=u(In(this,16),26),s||this.zh()),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 17:return this.Cb&&(r=(o=this.Db>>16,o>=0?Lse(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,17,r)}return h=u(yn((s=u(In(this,16),26),s||this.zh()),n),66),h.Nj().Qj(this,iu(this),n-Zn(this.zh()),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 9:return Vnt(this,r);case 17:return zl(this,null,17,r)}return o=u(yn((s=u(In(this,16),26),s||this.zh()),n),66),o.Nj().Rj(this,iu(this),n-Zn(this.zh()),e,r)},l.lh=function(e){var n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return r=this.s,r>=1;case 8:return!!this.r&&!this.q.e&&jv(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&jv(this.q).i==0);case 10:return(this.Bb&wf)==0;case 11:return(this.Bb&Ay)!=0;case 12:return(this.Bb&yy)!=0;case 13:return this.j!=null;case 14:return mE(this)!=null;case 15:return(this.Bb&zu)!=0;case 16:return(this.Bb&bd)!=0;case 17:return!!Vm(this)}return sh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.sh=function(e,n){var r,s;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:mrt(this,Br(n));return;case 2:Ng(this,je(Re(n)));return;case 3:Pg(this,je(Re(n)));return;case 4:Ig(this,u(n,19).a);return;case 5:this.ok(u(n,19).a);return;case 8:f2(this,u(n,138));return;case 9:s=O1(this,u(n,87),null),s&&s.Fi();return;case 10:nE(this,je(Re(n)));return;case 11:sE(this,je(Re(n)));return;case 12:rE(this,je(Re(n)));return;case 13:Xbt(this,Br(n));return;case 15:iE(this,je(Re(n)));return;case 16:aE(this,je(Re(n)));return}fh(this,e-Zn(this.zh()),yn((r=u(In(this,16),26),r||this.zh()),e),n)},l.zh=function(){return dn(),e5e},l.Bh=function(e){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Et(this.Cb,88)&&hy(rl(u(this.Cb,88)),4),Xc(this,null);return;case 2:Ng(this,!0);return;case 3:Pg(this,!0);return;case 4:Ig(this,0);return;case 5:this.ok(1);return;case 8:f2(this,null);return;case 9:r=O1(this,null,null),r&&r.Fi();return;case 10:nE(this,!0);return;case 11:sE(this,!1);return;case 12:rE(this,!1);return;case 13:this.i=null,ez(this,null);return;case 15:iE(this,!1);return;case 16:aE(this,!1);return}lh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.Gh=function(){k8(Eo((Ru(),ma),this)),Lh(this),this.Bb|=1},l.Gj=function(){return this.f},l.zj=function(){return mE(this)},l.Hj=function(){return Vm(this)},l.Lj=function(){return null},l.pk=function(){return this.k},l.aj=function(){return this.n},l.Mj=function(){return Qz(this)},l.Nj=function(){var e,n,r,s,o,h,d,w,k;return this.p||(r=Vm(this),(r.i==null&&pd(r),r.i).length,s=this.Lj(),s&&Zn(Vm(s)),o=Lh(this),d=o.Bj(),e=d?d.i&1?d==dl?Bs:d==Tr?ja:d==r3?XE:d==ia?ca:d==Lb?Tw:d==f5?Cw:d==Hu?E6:aS:d:null,n=mE(this),w=o.zj(),aln(this),this.Bb&bd&&((h=a4t((Ru(),ma),r))&&h!=this||(h=qx(Eo(ma,this))))?this.p=new PVt(this,h):this.$j()?this.rk()?s?this.Bb&zu?e?this.sk()?this.p=new Zb(47,e,this,s):this.p=new Zb(5,e,this,s):this.sk()?this.p=new e2(46,this,s):this.p=new e2(4,this,s):e?this.sk()?this.p=new Zb(49,e,this,s):this.p=new Zb(7,e,this,s):this.sk()?this.p=new e2(48,this,s):this.p=new e2(6,this,s):this.Bb&zu?e?e==M2?this.p=new Cg(50,B4e,this):this.sk()?this.p=new Cg(43,e,this):this.p=new Cg(1,e,this):this.sk()?this.p=new Sg(42,this):this.p=new Sg(0,this):e?e==M2?this.p=new Cg(41,B4e,this):this.sk()?this.p=new Cg(45,e,this):this.p=new Cg(3,e,this):this.sk()?this.p=new Sg(44,this):this.p=new Sg(2,this):Et(o,148)?e==sU?this.p=new Sg(40,this):this.Bb&512?this.Bb&zu?e?this.p=new Cg(9,e,this):this.p=new Sg(8,this):e?this.p=new Cg(11,e,this):this.p=new Sg(10,this):this.Bb&zu?e?this.p=new Cg(13,e,this):this.p=new Sg(12,this):e?this.p=new Cg(15,e,this):this.p=new Sg(14,this):s?(k=s.t,k>1||k==-1?this.sk()?this.Bb&zu?e?this.p=new Zb(25,e,this,s):this.p=new e2(24,this,s):e?this.p=new Zb(27,e,this,s):this.p=new e2(26,this,s):this.Bb&zu?e?this.p=new Zb(29,e,this,s):this.p=new e2(28,this,s):e?this.p=new Zb(31,e,this,s):this.p=new e2(30,this,s):this.sk()?this.Bb&zu?e?this.p=new Zb(33,e,this,s):this.p=new e2(32,this,s):e?this.p=new Zb(35,e,this,s):this.p=new e2(34,this,s):this.Bb&zu?e?this.p=new Zb(37,e,this,s):this.p=new e2(36,this,s):e?this.p=new Zb(39,e,this,s):this.p=new e2(38,this,s)):this.sk()?this.Bb&zu?e?this.p=new Cg(17,e,this):this.p=new Sg(16,this):e?this.p=new Cg(19,e,this):this.p=new Sg(18,this):this.Bb&zu?e?this.p=new Cg(21,e,this):this.p=new Sg(20,this):e?this.p=new Cg(23,e,this):this.p=new Sg(22,this):this.qk()?this.sk()?this.p=new kKt(u(o,26),this,s):this.p=new Owt(u(o,26),this,s):Et(o,148)?e==sU?this.p=new Sg(40,this):this.Bb&zu?e?this.p=new yYt(n,w,this,(Uit(),d==Tr?aLt:d==dl?eLt:d==Lb?oLt:d==r3?sLt:d==ia?iLt:d==f5?cLt:d==Hu?nLt:d==mh?rLt:Aft)):this.p=new DXt(u(o,148),n,w,this):e?this.p=new mYt(n,w,this,(Uit(),d==Tr?aLt:d==dl?eLt:d==Lb?oLt:d==r3?sLt:d==ia?iLt:d==f5?cLt:d==Hu?nLt:d==mh?rLt:Aft)):this.p=new IXt(u(o,148),n,w,this):this.rk()?s?this.Bb&zu?this.sk()?this.p=new TKt(u(o,26),this,s):this.p=new Tvt(u(o,26),this,s):this.sk()?this.p=new EKt(u(o,26),this,s):this.p=new xnt(u(o,26),this,s):this.Bb&zu?this.sk()?this.p=new mWt(u(o,26),this):this.p=new R2t(u(o,26),this):this.sk()?this.p=new wWt(u(o,26),this):this.p=new ont(u(o,26),this):this.sk()?s?this.Bb&zu?this.p=new CKt(u(o,26),this,s):this.p=new kvt(u(o,26),this,s):this.Bb&zu?this.p=new yWt(u(o,26),this):this.p=new j2t(u(o,26),this):s?this.Bb&zu?this.p=new _Kt(u(o,26),this,s):this.p=new Evt(u(o,26),this,s):this.Bb&zu?this.p=new xWt(u(o,26),this):this.p=new Pj(u(o,26),this)),this.p},l.Ij=function(){return(this.Bb&wf)!=0},l.qk=function(){return!1},l.rk=function(){return!1},l.Jj=function(){return(this.Bb&bd)!=0},l.Oj=function(){return Yrt(this)},l.sk=function(){return!1},l.Kj=function(){return(this.Bb&zu)!=0},l.tk=function(e){this.k=e},l.Lh=function(e){mrt(this,e)},l.Ib=function(){return pq(this)},l.e=!1,l.n=0,P(Mn,"EStructuralFeatureImpl",449),I(322,449,{105:1,92:1,90:1,34:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,322:1,150:1,449:1,284:1,114:1,115:1,677:1},Utt),l._g=function(e,n,r){var s,o;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Fn(),!!(this.Bb&256);case 3:return Fn(),!!(this.Bb&512);case 4:return de(this.s);case 5:return de(this.t);case 6:return Fn(),!!e5t(this);case 7:return Fn(),o=this.s,o>=1;case 8:return n?Lh(this):this.r;case 9:return this.q;case 10:return Fn(),!!(this.Bb&wf);case 11:return Fn(),!!(this.Bb&Ay);case 12:return Fn(),!!(this.Bb&yy);case 13:return this.j;case 14:return mE(this);case 15:return Fn(),!!(this.Bb&zu);case 16:return Fn(),!!(this.Bb&bd);case 17:return Vm(this);case 18:return Fn(),!!(this.Bb&dc);case 19:return n?dit(this):DJt(this)}return oh(this,e-Zn((dn(),t3)),yn((s=u(In(this,16),26),s||t3),e),n,r)},l.lh=function(e){var n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return e5t(this);case 7:return r=this.s,r>=1;case 8:return!!this.r&&!this.q.e&&jv(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&jv(this.q).i==0);case 10:return(this.Bb&wf)==0;case 11:return(this.Bb&Ay)!=0;case 12:return(this.Bb&yy)!=0;case 13:return this.j!=null;case 14:return mE(this)!=null;case 15:return(this.Bb&zu)!=0;case 16:return(this.Bb&bd)!=0;case 17:return!!Vm(this);case 18:return(this.Bb&dc)!=0;case 19:return!!DJt(this)}return sh(this,e-Zn((dn(),t3)),yn((n=u(In(this,16),26),n||t3),e))},l.sh=function(e,n){var r,s;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:mrt(this,Br(n));return;case 2:Ng(this,je(Re(n)));return;case 3:Pg(this,je(Re(n)));return;case 4:Ig(this,u(n,19).a);return;case 5:lHt(this,u(n,19).a);return;case 8:f2(this,u(n,138));return;case 9:s=O1(this,u(n,87),null),s&&s.Fi();return;case 10:nE(this,je(Re(n)));return;case 11:sE(this,je(Re(n)));return;case 12:rE(this,je(Re(n)));return;case 13:Xbt(this,Br(n));return;case 15:iE(this,je(Re(n)));return;case 16:aE(this,je(Re(n)));return;case 18:Rit(this,je(Re(n)));return}fh(this,e-Zn((dn(),t3)),yn((r=u(In(this,16),26),r||t3),e),n)},l.zh=function(){return dn(),t3},l.Bh=function(e){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Et(this.Cb,88)&&hy(rl(u(this.Cb,88)),4),Xc(this,null);return;case 2:Ng(this,!0);return;case 3:Pg(this,!0);return;case 4:Ig(this,0);return;case 5:this.b=0,ty(this,1);return;case 8:f2(this,null);return;case 9:r=O1(this,null,null),r&&r.Fi();return;case 10:nE(this,!0);return;case 11:sE(this,!1);return;case 12:rE(this,!1);return;case 13:this.i=null,ez(this,null);return;case 15:iE(this,!1);return;case 16:aE(this,!1);return;case 18:Rit(this,!1);return}lh(this,e-Zn((dn(),t3)),yn((n=u(In(this,16),26),n||t3),e))},l.Gh=function(){dit(this),k8(Eo((Ru(),ma),this)),Lh(this),this.Bb|=1},l.$j=function(){return e5t(this)},l.nk=function(e,n){return this.b=0,this.a=null,Kyt(this,e,n)},l.ok=function(e){lHt(this,e)},l.Ib=function(){var e;return this.Db&64?pq(this):(e=new Th(pq(this)),e.a+=" (iD: ",kg(e,(this.Bb&dc)!=0),e.a+=")",e.a)},l.b=0,P(Mn,"EAttributeImpl",322),I(351,438,{105:1,92:1,90:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,351:1,150:1,114:1,115:1,676:1}),l.uk=function(e){return e.Tg()==this},l.Qg=function(e){return wst(this,e)},l.Rg=function(e,n){this.w=null,this.Db=n<<16|this.Db&255,this.Cb=e},l._g=function(e,n,r){var s;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return cw(this);case 4:return this.zj();case 5:return this.F;case 6:return n?Fl(this):C8(this);case 7:return!this.A&&(this.A=new Ou(lu,this,7)),this.A}return oh(this,e-Zn(this.zh()),yn((s=u(In(this,16),26),s||this.zh()),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 6:return this.Cb&&(r=(o=this.Db>>16,o>=0?wst(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,6,r)}return h=u(yn((s=u(In(this,16),26),s||this.zh()),n),66),h.Nj().Qj(this,iu(this),n-Zn(this.zh()),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 6:return zl(this,null,6,r);case 7:return!this.A&&(this.A=new Ou(lu,this,7)),Ba(this.A,e,r)}return o=u(yn((s=u(In(this,16),26),s||this.zh()),n),66),o.Nj().Rj(this,iu(this),n-Zn(this.zh()),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!cw(this);case 4:return this.zj()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!C8(this);case 7:return!!this.A&&this.A.i!=0}return sh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:p$(this,Br(n));return;case 2:Ket(this,Br(n));return;case 5:CE(this,Br(n));return;case 7:!this.A&&(this.A=new Ou(lu,this,7)),xr(this.A),!this.A&&(this.A=new Ou(lu,this,7)),rs(this.A,u(n,14));return}fh(this,e-Zn(this.zh()),yn((r=u(In(this,16),26),r||this.zh()),e),n)},l.zh=function(){return dn(),Y4e},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Et(this.Cb,179)&&(u(this.Cb,179).tb=null),Xc(this,null);return;case 2:Z8(this,null),$8(this,this.D);return;case 5:CE(this,null);return;case 7:!this.A&&(this.A=new Ou(lu,this,7)),xr(this.A);return}lh(this,e-Zn(this.zh()),yn((n=u(In(this,16),26),n||this.zh()),e))},l.yj=function(){var e;return this.G==-1&&(this.G=(e=Fl(this),e?Fg(e.Mh(),this):-1)),this.G},l.zj=function(){return null},l.Aj=function(){return Fl(this)},l.vk=function(){return this.v},l.Bj=function(){return cw(this)},l.Cj=function(){return this.D!=null?this.D:this.B},l.Dj=function(){return this.F},l.wj=function(e){return lat(this,e)},l.wk=function(e){this.v=e},l.xk=function(e){cne(this,e)},l.yk=function(e){this.C=e},l.Lh=function(e){p$(this,e)},l.Ib=function(){return Sz(this)},l.C=null,l.D=null,l.G=-1,P(Mn,"EClassifierImpl",351),I(88,351,{105:1,92:1,90:1,26:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,88:1,351:1,150:1,473:1,114:1,115:1,676:1},XL),l.uk=function(e){return qQe(this,e.Tg())},l._g=function(e,n,r){var s;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return cw(this);case 4:return null;case 5:return this.F;case 6:return n?Fl(this):C8(this);case 7:return!this.A&&(this.A=new Ou(lu,this,7)),this.A;case 8:return Fn(),!!(this.Bb&256);case 9:return Fn(),!!(this.Bb&512);case 10:return So(this);case 11:return!this.q&&(this.q=new he(Vh,this,11,10)),this.q;case 12:return k4(this);case 13:return k_(this);case 14:return k_(this),this.r;case 15:return k4(this),this.k;case 16:return V4t(this);case 17:return pat(this);case 18:return pd(this);case 19:return cq(this);case 20:return k4(this),this.o;case 21:return!this.s&&(this.s=new he(Au,this,21,17)),this.s;case 22:return Lc(this);case 23:return tat(this)}return oh(this,e-Zn((dn(),Cb)),yn((s=u(In(this,16),26),s||Cb),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 6:return this.Cb&&(r=(o=this.Db>>16,o>=0?wst(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,6,r);case 11:return!this.q&&(this.q=new he(Vh,this,11,10)),Qc(this.q,e,r);case 21:return!this.s&&(this.s=new he(Au,this,21,17)),Qc(this.s,e,r)}return h=u(yn((s=u(In(this,16),26),s||(dn(),Cb)),n),66),h.Nj().Qj(this,iu(this),n-Zn((dn(),Cb)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 6:return zl(this,null,6,r);case 7:return!this.A&&(this.A=new Ou(lu,this,7)),Ba(this.A,e,r);case 11:return!this.q&&(this.q=new he(Vh,this,11,10)),Ba(this.q,e,r);case 21:return!this.s&&(this.s=new he(Au,this,21,17)),Ba(this.s,e,r);case 22:return Ba(Lc(this),e,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),Cb)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),Cb)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!cw(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!C8(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&Lc(this.u.a).i!=0&&!(this.n&&ost(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return k4(this).i!=0;case 13:return k_(this).i!=0;case 14:return k_(this),this.r.i!=0;case 15:return k4(this),this.k.i!=0;case 16:return V4t(this).i!=0;case 17:return pat(this).i!=0;case 18:return pd(this).i!=0;case 19:return cq(this).i!=0;case 20:return k4(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&ost(this.n);case 23:return tat(this).i!=0}return sh(this,e-Zn((dn(),Cb)),yn((n=u(In(this,16),26),n||Cb),e))},l.oh=function(e){var n;return n=this.i==null||this.q&&this.q.i!=0?null:gD(this,e),n||kxt(this,e)},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:p$(this,Br(n));return;case 2:Ket(this,Br(n));return;case 5:CE(this,Br(n));return;case 7:!this.A&&(this.A=new Ou(lu,this,7)),xr(this.A),!this.A&&(this.A=new Ou(lu,this,7)),rs(this.A,u(n,14));return;case 8:Xyt(this,je(Re(n)));return;case 9:Qyt(this,je(Re(n)));return;case 10:C_(So(this)),rs(So(this),u(n,14));return;case 11:!this.q&&(this.q=new he(Vh,this,11,10)),xr(this.q),!this.q&&(this.q=new he(Vh,this,11,10)),rs(this.q,u(n,14));return;case 21:!this.s&&(this.s=new he(Au,this,21,17)),xr(this.s),!this.s&&(this.s=new he(Au,this,21,17)),rs(this.s,u(n,14));return;case 22:xr(Lc(this)),rs(Lc(this),u(n,14));return}fh(this,e-Zn((dn(),Cb)),yn((r=u(In(this,16),26),r||Cb),e),n)},l.zh=function(){return dn(),Cb},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Et(this.Cb,179)&&(u(this.Cb,179).tb=null),Xc(this,null);return;case 2:Z8(this,null),$8(this,this.D);return;case 5:CE(this,null);return;case 7:!this.A&&(this.A=new Ou(lu,this,7)),xr(this.A);return;case 8:Xyt(this,!1);return;case 9:Qyt(this,!1);return;case 10:this.u&&C_(this.u);return;case 11:!this.q&&(this.q=new he(Vh,this,11,10)),xr(this.q);return;case 21:!this.s&&(this.s=new he(Au,this,21,17)),xr(this.s);return;case 22:this.n&&xr(this.n);return}lh(this,e-Zn((dn(),Cb)),yn((n=u(In(this,16),26),n||Cb),e))},l.Gh=function(){var e,n;if(k4(this),k_(this),V4t(this),pat(this),pd(this),cq(this),tat(this),RC(stn(rl(this))),this.s)for(e=0,n=this.s.i;e=0;--n)St(this,n);return m3t(this,e)},l.Xj=function(){xr(this)},l.oi=function(e,n){return Iee(this,e,n)},P($i,"EcoreEList",622),I(496,622,zo,WM),l.ai=function(){return!1},l.aj=function(){return this.c},l.bj=function(){return!1},l.Fk=function(){return!0},l.hi=function(){return!0},l.li=function(e,n){return n},l.ni=function(){return!1},l.c=0,P($i,"EObjectEList",496),I(85,496,zo,Ss),l.bj=function(){return!0},l.Dk=function(){return!1},l.rk=function(){return!0},P($i,"EObjectContainmentEList",85),I(545,85,zo,hj),l.ci=function(){this.b=!0},l.fj=function(){return this.b},l.Xj=function(){var e;xr(this),ml(this.e)?(e=this.b,this.b=!1,mi(this.e,new df(this.e,2,this.c,e,!1))):this.b=!1},l.b=!1,P($i,"EObjectContainmentEList/Unsettable",545),I(1140,545,zo,vYt),l.ii=function(e,n){var r,s;return r=u(t_(this,e,n),87),ml(this.e)&&Kk(this,new gI(this.a,7,(dn(),X4e),de(n),(s=r.c,Et(s,88)?u(s,26):Wh),e)),r},l.jj=function(e,n){return Wln(this,u(e,87),n)},l.kj=function(e,n){return Uln(this,u(e,87),n)},l.lj=function(e,n,r){return K1n(this,u(e,87),u(n,87),r)},l.Zi=function(e,n,r,s,o){switch(e){case 3:return DC(this,e,n,r,s,this.i>1);case 5:return DC(this,e,n,r,s,this.i-u(r,15).gc()>0);default:return new F0(this.e,e,this.c,n,r,s,!0)}},l.ij=function(){return!0},l.fj=function(){return ost(this)},l.Xj=function(){xr(this)},P(Mn,"EClassImpl/1",1140),I(1154,1153,M8t),l.ui=function(e){var n,r,s,o,h,d,w;if(r=e.xi(),r!=8){if(s=Mhn(e),s==0)switch(r){case 1:case 9:{w=e.Bi(),w!=null&&(n=rl(u(w,473)),!n.c&&(n.c=new xm),j$(n.c,e.Ai())),d=e.zi(),d!=null&&(o=u(d,473),o.Bb&1||(n=rl(o),!n.c&&(n.c=new xm),Mr(n.c,u(e.Ai(),26))));break}case 3:{d=e.zi(),d!=null&&(o=u(d,473),o.Bb&1||(n=rl(o),!n.c&&(n.c=new xm),Mr(n.c,u(e.Ai(),26))));break}case 5:{if(d=e.zi(),d!=null)for(h=u(d,14).Kc();h.Ob();)o=u(h.Pb(),473),o.Bb&1||(n=rl(o),!n.c&&(n.c=new xm),Mr(n.c,u(e.Ai(),26)));break}case 4:{w=e.Bi(),w!=null&&(o=u(w,473),o.Bb&1||(n=rl(o),!n.c&&(n.c=new xm),j$(n.c,e.Ai())));break}case 6:{if(w=e.Bi(),w!=null)for(h=u(w,14).Kc();h.Ob();)o=u(h.Pb(),473),o.Bb&1||(n=rl(o),!n.c&&(n.c=new xm),j$(n.c,e.Ai()));break}}this.Hk(s)}},l.Hk=function(e){bue(this,e)},l.b=63,P(Mn,"ESuperAdapter",1154),I(1155,1154,M8t,Lzt),l.Hk=function(e){hy(this,e)},P(Mn,"EClassImpl/10",1155),I(1144,696,zo),l.Vh=function(e,n){return Lst(this,e,n)},l.Wh=function(e){return fse(this,e)},l.Xh=function(e,n){zI(this,e,n)},l.Yh=function(e){uI(this,e)},l.pi=function(e){return Amt(this,e)},l.mi=function(e,n){return Krt(this,e,n)},l.lk=function(e,n){throw rt(new Or)},l.Zh=function(){return new Mx(this)},l.$h=function(){return new PM(this)},l._h=function(e){return _I(this,e)},l.mk=function(e,n){throw rt(new Or)},l.Wj=function(e){return this},l.fj=function(){return this.i!=0},l.Wb=function(e){throw rt(new Or)},l.Xj=function(){throw rt(new Or)},P($i,"EcoreEList/UnmodifiableEList",1144),I(319,1144,zo,q3),l.ni=function(){return!1},P($i,"EcoreEList/UnmodifiableEList/FastCompare",319),I(1147,319,zo,tre),l.Xc=function(e){var n,r,s;if(Et(e,170)&&(n=u(e,170),r=n.aj(),r!=-1)){for(s=this.i;r4)if(this.wj(e)){if(this.rk()){if(s=u(e,49),r=s.Ug(),w=r==this.b&&(this.Dk()?s.Og(s.Vg(),u(yn(bu(this.b),this.aj()).Yj(),26).Bj())==no(u(yn(bu(this.b),this.aj()),18)).n:-1-s.Vg()==this.aj()),this.Ek()&&!w&&!r&&s.Zg()){for(o=0;o1||s==-1)):!1},l.Dk=function(){var e,n,r;return n=yn(bu(this.b),this.aj()),Et(n,99)?(e=u(n,18),r=no(e),!!r):!1},l.Ek=function(){var e,n;return n=yn(bu(this.b),this.aj()),Et(n,99)?(e=u(n,18),(e.Bb&Ya)!=0):!1},l.Xc=function(e){var n,r,s,o;if(s=this.Qi(e),s>=0)return s;if(this.Fk()){for(r=0,o=this.Vi();r=0;--e)ED(this,e,this.Oi(e));return this.Wi()},l.Qc=function(e){var n;if(this.Ek())for(n=this.Vi()-1;n>=0;--n)ED(this,n,this.Oi(n));return this.Xi(e)},l.Xj=function(){C_(this)},l.oi=function(e,n){return pte(this,e,n)},P($i,"DelegatingEcoreEList",742),I(1150,742,N8t,DWt),l.Hi=function(e,n){bQe(this,e,u(n,26))},l.Ii=function(e){lXe(this,u(e,26))},l.Oi=function(e){var n,r;return n=u(St(Lc(this.a),e),87),r=n.c,Et(r,88)?u(r,26):(dn(),Wh)},l.Ti=function(e){var n,r;return n=u(dy(Lc(this.a),e),87),r=n.c,Et(r,88)?u(r,26):(dn(),Wh)},l.Ui=function(e,n){return vfn(this,e,u(n,26))},l.ai=function(){return!1},l.Zi=function(e,n,r,s,o){return null},l.Ji=function(){return new Izt(this)},l.Ki=function(){xr(Lc(this.a))},l.Li=function(e){return Vre(this,e)},l.Mi=function(e){var n,r;for(r=e.Kc();r.Ob();)if(n=r.Pb(),!Vre(this,n))return!1;return!0},l.Ni=function(e){var n,r,s;if(Et(e,15)&&(s=u(e,15),s.gc()==Lc(this.a).i)){for(n=s.Kc(),r=new er(this);n.Ob();)if(Gt(n.Pb())!==Gt(dr(r)))return!1;return!0}return!1},l.Pi=function(){var e,n,r,s,o;for(r=1,n=new er(Lc(this.a));n.e!=n.i.gc();)e=u(dr(n),87),s=(o=e.c,Et(o,88)?u(o,26):(dn(),Wh)),r=31*r+(s?Iv(s):0);return r},l.Qi=function(e){var n,r,s,o;for(s=0,r=new er(Lc(this.a));r.e!=r.i.gc();){if(n=u(dr(r),87),Gt(e)===Gt((o=n.c,Et(o,88)?u(o,26):(dn(),Wh))))return s;++s}return-1},l.Ri=function(){return Lc(this.a).i==0},l.Si=function(){return null},l.Vi=function(){return Lc(this.a).i},l.Wi=function(){var e,n,r,s,o,h;for(h=Lc(this.a).i,o=Pt(Xn,Ie,1,h,5,1),r=0,n=new er(Lc(this.a));n.e!=n.i.gc();)e=u(dr(n),87),o[r++]=(s=e.c,Et(s,88)?u(s,26):(dn(),Wh));return o},l.Xi=function(e){var n,r,s,o,h,d,w;for(w=Lc(this.a).i,e.lengthw&&Ji(e,w,null),s=0,r=new er(Lc(this.a));r.e!=r.i.gc();)n=u(dr(r),87),h=(d=n.c,Et(d,88)?u(d,26):(dn(),Wh)),Ji(e,s++,h);return e},l.Yi=function(){var e,n,r,s,o;for(o=new xg,o.a+="[",e=Lc(this.a),n=0,s=Lc(this.a).i;n>16,o>=0?wst(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,6,r);case 9:return!this.a&&(this.a=new he(eg,this,9,5)),Qc(this.a,e,r)}return h=u(yn((s=u(In(this,16),26),s||(dn(),_b)),n),66),h.Nj().Qj(this,iu(this),n-Zn((dn(),_b)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 6:return zl(this,null,6,r);case 7:return!this.A&&(this.A=new Ou(lu,this,7)),Ba(this.A,e,r);case 9:return!this.a&&(this.a=new he(eg,this,9,5)),Ba(this.a,e,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),_b)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),_b)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!cw(this);case 4:return!!Fyt(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!C8(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return sh(this,e-Zn((dn(),_b)),yn((n=u(In(this,16),26),n||_b),e))},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:p$(this,Br(n));return;case 2:Ket(this,Br(n));return;case 5:CE(this,Br(n));return;case 7:!this.A&&(this.A=new Ou(lu,this,7)),xr(this.A),!this.A&&(this.A=new Ou(lu,this,7)),rs(this.A,u(n,14));return;case 8:xz(this,je(Re(n)));return;case 9:!this.a&&(this.a=new he(eg,this,9,5)),xr(this.a),!this.a&&(this.a=new he(eg,this,9,5)),rs(this.a,u(n,14));return}fh(this,e-Zn((dn(),_b)),yn((r=u(In(this,16),26),r||_b),e),n)},l.zh=function(){return dn(),_b},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Et(this.Cb,179)&&(u(this.Cb,179).tb=null),Xc(this,null);return;case 2:Z8(this,null),$8(this,this.D);return;case 5:CE(this,null);return;case 7:!this.A&&(this.A=new Ou(lu,this,7)),xr(this.A);return;case 8:xz(this,!0);return;case 9:!this.a&&(this.a=new he(eg,this,9,5)),xr(this.a);return}lh(this,e-Zn((dn(),_b)),yn((n=u(In(this,16),26),n||_b),e))},l.Gh=function(){var e,n;if(this.a)for(e=0,n=this.a.i;e>16==5?u(this.Cb,671):null}return oh(this,e-Zn((dn(),tp)),yn((s=u(In(this,16),26),s||tp),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 5:return this.Cb&&(r=(o=this.Db>>16,o>=0?Bse(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,5,r)}return h=u(yn((s=u(In(this,16),26),s||(dn(),tp)),n),66),h.Nj().Qj(this,iu(this),n-Zn((dn(),tp)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 5:return zl(this,null,5,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),tp)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),tp)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&u(this.Cb,671))}return sh(this,e-Zn((dn(),tp)),yn((n=u(In(this,16),26),n||tp),e))},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:Xc(this,Br(n));return;case 2:tit(this,u(n,19).a);return;case 3:Doe(this,u(n,1940));return;case 4:nit(this,Br(n));return}fh(this,e-Zn((dn(),tp)),yn((r=u(In(this,16),26),r||tp),e),n)},l.zh=function(){return dn(),tp},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Xc(this,null);return;case 2:tit(this,0);return;case 3:Doe(this,null);return;case 4:nit(this,null);return}lh(this,e-Zn((dn(),tp)),yn((n=u(In(this,16),26),n||tp),e))},l.Ib=function(){var e;return e=this.c,e??this.zb},l.b=null,l.c=null,l.d=0,P(Mn,"EEnumLiteralImpl",573);var kxn=Yi(Mn,"EFactoryImpl/InternalEDateTimeFormat");I(489,1,{2015:1},oM),P(Mn,"EFactoryImpl/1ClientInternalEDateTimeFormat",489),I(241,115,{105:1,92:1,90:1,87:1,56:1,108:1,49:1,97:1,241:1,114:1,115:1},wv),l.Sg=function(e,n,r){var s;return r=zl(this,e,n,r),this.e&&Et(e,170)&&(s=oq(this,this.e),s!=this.c&&(r=_E(this,s,r))),r},l._g=function(e,n,r){var s;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new Ss(ho,this,1)),this.d;case 2:return n?wq(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return n?lst(this):this.a}return oh(this,e-Zn((dn(),qw)),yn((s=u(In(this,16),26),s||qw),e),n,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return Pre(this,null,r);case 1:return!this.d&&(this.d=new Ss(ho,this,1)),Ba(this.d,e,r);case 3:return Nre(this,null,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),qw)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),qw)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return sh(this,e-Zn((dn(),qw)),yn((n=u(In(this,16),26),n||qw),e))},l.sh=function(e,n){var r;switch(e){case 0:eae(this,u(n,87));return;case 1:!this.d&&(this.d=new Ss(ho,this,1)),xr(this.d),!this.d&&(this.d=new Ss(ho,this,1)),rs(this.d,u(n,14));return;case 3:p4t(this,u(n,87));return;case 4:D4t(this,u(n,836));return;case 5:P8(this,u(n,138));return}fh(this,e-Zn((dn(),qw)),yn((r=u(In(this,16),26),r||qw),e),n)},l.zh=function(){return dn(),qw},l.Bh=function(e){var n;switch(e){case 0:eae(this,null);return;case 1:!this.d&&(this.d=new Ss(ho,this,1)),xr(this.d);return;case 3:p4t(this,null);return;case 4:D4t(this,null);return;case 5:P8(this,null);return}lh(this,e-Zn((dn(),qw)),yn((n=u(In(this,16),26),n||qw),e))},l.Ib=function(){var e;return e=new Il(bf(this)),e.a+=" (expression: ",mat(this,e),e.a+=")",e.a};var tLt;P(Mn,"EGenericTypeImpl",241),I(1969,1964,CH),l.Xh=function(e,n){LWt(this,e,n)},l.lk=function(e,n){return LWt(this,this.gc(),e),n},l.pi=function(e){return Qf(this.Gi(),e)},l.Zh=function(){return this.$h()},l.Gi=function(){return new Pzt(this)},l.$h=function(){return this._h(0)},l._h=function(e){return this.Gi().Zc(e)},l.mk=function(e,n){return ry(this,e,!0),n},l.ii=function(e,n){var r,s;return s=yst(this,n),r=this.Zc(e),r.Rb(s),s},l.ji=function(e,n){var r;ry(this,n,!0),r=this.Zc(e),r.Rb(n)},P($i,"AbstractSequentialInternalEList",1969),I(486,1969,CH,NM),l.pi=function(e){return Qf(this.Gi(),e)},l.Zh=function(){return this.b==null?(Eg(),Eg(),hN):this.Jk()},l.Gi=function(){return new tUt(this.a,this.b)},l.$h=function(){return this.b==null?(Eg(),Eg(),hN):this.Jk()},l._h=function(e){var n,r;if(this.b==null){if(e<0||e>1)throw rt(new mo(X_+e+", size=0"));return Eg(),Eg(),hN}for(r=this.Jk(),n=0;n0;)if(n=this.c[--this.d],(!this.e||n.Gj()!=I7||n.aj()!=0)&&(!this.Mk()||this.b.mh(n))){if(h=this.b.bh(n,this.Lk()),this.f=(to(),u(n,66).Oj()),this.f||n.$j()){if(this.Lk()?(s=u(h,15),this.k=s):(s=u(h,69),this.k=this.j=s),Et(this.k,54)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j._h(this.k.gc()):this.k.Zc(this.k.gc()),this.p?Wae(this,this.p):soe(this))return o=this.p?this.p.Ub():this.j?this.j.pi(--this.n):this.k.Xb(--this.n),this.f?(e=u(o,72),e.ak(),r=e.dd(),this.i=r):(r=o,this.i=r),this.g=-3,!0}else if(h!=null)return this.k=null,this.p=null,r=h,this.i=r,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return o=this.p?this.p.Ub():this.j?this.j.pi(--this.n):this.k.Xb(--this.n),this.f?(e=u(o,72),e.ak(),r=e.dd(),this.i=r):(r=o,this.i=r),this.g=-3,!0}},l.Pb=function(){return hz(this)},l.Tb=function(){return this.a},l.Ub=function(){var e;if(this.g<-1||this.Sb())return--this.a,this.g=0,e=this.i,this.Sb(),e;throw rt(new lc)},l.Vb=function(){return this.a-1},l.Qb=function(){throw rt(new Or)},l.Lk=function(){return!1},l.Wb=function(e){throw rt(new Or)},l.Mk=function(){return!0},l.a=0,l.d=0,l.f=!1,l.g=0,l.n=0,l.o=0;var hN;P($i,"EContentsEList/FeatureIteratorImpl",279),I(697,279,_H,B2t),l.Lk=function(){return!0},P($i,"EContentsEList/ResolvingFeatureIteratorImpl",697),I(1157,697,_H,vWt),l.Mk=function(){return!1},P(Mn,"ENamedElementImpl/1/1",1157),I(1158,279,_H,bWt),l.Mk=function(){return!1},P(Mn,"ENamedElementImpl/1/2",1158),I(36,143,QD,Km,Srt,Qs,qrt,F0,df,zmt,VQt,qmt,UQt,fmt,WQt,Vmt,KQt,dmt,YQt,Hmt,XQt,CC,gI,srt,Gmt,QQt,gmt,ZQt),l._i=function(){return Cmt(this)},l.gj=function(){var e;return e=Cmt(this),e?e.zj():null},l.yi=function(e){return this.b==-1&&this.a&&(this.b=this.c.Xg(this.a.aj(),this.a.Gj())),this.c.Og(this.b,e)},l.Ai=function(){return this.c},l.hj=function(){var e;return e=Cmt(this),e?e.Kj():!1},l.b=-1,P(Mn,"ENotificationImpl",36),I(399,284,{105:1,92:1,90:1,147:1,191:1,56:1,59:1,108:1,472:1,49:1,97:1,150:1,399:1,284:1,114:1,115:1},Wtt),l.Qg=function(e){return $se(this,e)},l._g=function(e,n,r){var s,o,h;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Fn(),!!(this.Bb&256);case 3:return Fn(),!!(this.Bb&512);case 4:return de(this.s);case 5:return de(this.t);case 6:return Fn(),h=this.t,h>1||h==-1;case 7:return Fn(),o=this.s,o>=1;case 8:return n?Lh(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,26):null;case 11:return!this.d&&(this.d=new Ou(lu,this,11)),this.d;case 12:return!this.c&&(this.c=new he(zw,this,12,10)),this.c;case 13:return!this.a&&(this.a=new $M(this,this)),this.a;case 14:return il(this)}return oh(this,e-Zn((dn(),ep)),yn((s=u(In(this,16),26),s||ep),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 10:return this.Cb&&(r=(o=this.Db>>16,o>=0?$se(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,10,r);case 12:return!this.c&&(this.c=new he(zw,this,12,10)),Qc(this.c,e,r)}return h=u(yn((s=u(In(this,16),26),s||(dn(),ep)),n),66),h.Nj().Qj(this,iu(this),n-Zn((dn(),ep)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 9:return Vnt(this,r);case 10:return zl(this,null,10,r);case 11:return!this.d&&(this.d=new Ou(lu,this,11)),Ba(this.d,e,r);case 12:return!this.c&&(this.c=new he(zw,this,12,10)),Ba(this.c,e,r);case 14:return Ba(il(this),e,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),ep)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),ep)),e,r)},l.lh=function(e){var n,r,s;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return s=this.t,s>1||s==-1;case 7:return r=this.s,r>=1;case 8:return!!this.r&&!this.q.e&&jv(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&jv(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,26));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&il(this.a.a).i!=0&&!(this.b&&cst(this.b));case 14:return!!this.b&&cst(this.b)}return sh(this,e-Zn((dn(),ep)),yn((n=u(In(this,16),26),n||ep),e))},l.sh=function(e,n){var r,s;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:Xc(this,Br(n));return;case 2:Ng(this,je(Re(n)));return;case 3:Pg(this,je(Re(n)));return;case 4:Ig(this,u(n,19).a);return;case 5:ty(this,u(n,19).a);return;case 8:f2(this,u(n,138));return;case 9:s=O1(this,u(n,87),null),s&&s.Fi();return;case 11:!this.d&&(this.d=new Ou(lu,this,11)),xr(this.d),!this.d&&(this.d=new Ou(lu,this,11)),rs(this.d,u(n,14));return;case 12:!this.c&&(this.c=new he(zw,this,12,10)),xr(this.c),!this.c&&(this.c=new he(zw,this,12,10)),rs(this.c,u(n,14));return;case 13:!this.a&&(this.a=new $M(this,this)),C_(this.a),!this.a&&(this.a=new $M(this,this)),rs(this.a,u(n,14));return;case 14:xr(il(this)),rs(il(this),u(n,14));return}fh(this,e-Zn((dn(),ep)),yn((r=u(In(this,16),26),r||ep),e),n)},l.zh=function(){return dn(),ep},l.Bh=function(e){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Xc(this,null);return;case 2:Ng(this,!0);return;case 3:Pg(this,!0);return;case 4:Ig(this,0);return;case 5:ty(this,1);return;case 8:f2(this,null);return;case 9:r=O1(this,null,null),r&&r.Fi();return;case 11:!this.d&&(this.d=new Ou(lu,this,11)),xr(this.d);return;case 12:!this.c&&(this.c=new he(zw,this,12,10)),xr(this.c);return;case 13:this.a&&C_(this.a);return;case 14:this.b&&xr(this.b);return}lh(this,e-Zn((dn(),ep)),yn((n=u(In(this,16),26),n||ep),e))},l.Gh=function(){var e,n;if(this.c)for(e=0,n=this.c.i;ew&&Ji(e,w,null),s=0,r=new er(il(this.a));r.e!=r.i.gc();)n=u(dr(r),87),h=(d=n.c,d||(dn(),V1)),Ji(e,s++,h);return e},l.Yi=function(){var e,n,r,s,o;for(o=new xg,o.a+="[",e=il(this.a),n=0,s=il(this.a).i;n1);case 5:return DC(this,e,n,r,s,this.i-u(r,15).gc()>0);default:return new F0(this.e,e,this.c,n,r,s,!0)}},l.ij=function(){return!0},l.fj=function(){return cst(this)},l.Xj=function(){xr(this)},P(Mn,"EOperationImpl/2",1341),I(498,1,{1938:1,498:1},NVt),P(Mn,"EPackageImpl/1",498),I(16,85,zo,he),l.zk=function(){return this.d},l.Ak=function(){return this.b},l.Dk=function(){return!0},l.b=0,P($i,"EObjectContainmentWithInverseEList",16),I(353,16,zo,Ix),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectContainmentWithInverseEList/Resolving",353),I(298,353,zo,qm),l.ci=function(){this.a.tb=null},P(Mn,"EPackageImpl/2",298),I(1228,1,{},tB),P(Mn,"EPackageImpl/3",1228),I(718,43,_4,jpt),l._b=function(e){return ea(e)?art(this,e):!!Ao(this.f,e)},P(Mn,"EPackageRegistryImpl",718),I(509,284,{105:1,92:1,90:1,147:1,191:1,56:1,2017:1,108:1,472:1,49:1,97:1,150:1,509:1,284:1,114:1,115:1},Ktt),l.Qg=function(e){return zse(this,e)},l._g=function(e,n,r){var s,o,h;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Fn(),!!(this.Bb&256);case 3:return Fn(),!!(this.Bb&512);case 4:return de(this.s);case 5:return de(this.t);case 6:return Fn(),h=this.t,h>1||h==-1;case 7:return Fn(),o=this.s,o>=1;case 8:return n?Lh(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,59):null}return oh(this,e-Zn((dn(),e3)),yn((s=u(In(this,16),26),s||e3),e),n,r)},l.hh=function(e,n,r){var s,o,h;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Qc(this.Ab,e,r);case 10:return this.Cb&&(r=(o=this.Db>>16,o>=0?zse(this,r):this.Cb.ih(this,-1-o,null,r))),zl(this,e,10,r)}return h=u(yn((s=u(In(this,16),26),s||(dn(),e3)),n),66),h.Nj().Qj(this,iu(this),n-Zn((dn(),e3)),e,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 9:return Vnt(this,r);case 10:return zl(this,null,10,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),e3)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),e3)),e,r)},l.lh=function(e){var n,r,s;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return s=this.t,s>1||s==-1;case 7:return r=this.s,r>=1;case 8:return!!this.r&&!this.q.e&&jv(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&jv(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,59))}return sh(this,e-Zn((dn(),e3)),yn((n=u(In(this,16),26),n||e3),e))},l.zh=function(){return dn(),e3},P(Mn,"EParameterImpl",509),I(99,449,{105:1,92:1,90:1,147:1,191:1,56:1,18:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,99:1,449:1,284:1,114:1,115:1,677:1},q2t),l._g=function(e,n,r){var s,o,h,d;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Fn(),!!(this.Bb&256);case 3:return Fn(),!!(this.Bb&512);case 4:return de(this.s);case 5:return de(this.t);case 6:return Fn(),d=this.t,d>1||d==-1;case 7:return Fn(),o=this.s,o>=1;case 8:return n?Lh(this):this.r;case 9:return this.q;case 10:return Fn(),!!(this.Bb&wf);case 11:return Fn(),!!(this.Bb&Ay);case 12:return Fn(),!!(this.Bb&yy);case 13:return this.j;case 14:return mE(this);case 15:return Fn(),!!(this.Bb&zu);case 16:return Fn(),!!(this.Bb&bd);case 17:return Vm(this);case 18:return Fn(),!!(this.Bb&dc);case 19:return Fn(),h=no(this),!!(h&&h.Bb&dc);case 20:return Fn(),!!(this.Bb&Ya);case 21:return n?no(this):this.b;case 22:return n?Cyt(this):yJt(this);case 23:return!this.a&&(this.a=new U3(Zy,this,23)),this.a}return oh(this,e-Zn((dn(),c5)),yn((s=u(In(this,16),26),s||c5),e),n,r)},l.lh=function(e){var n,r,s,o;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return o=this.t,o>1||o==-1;case 7:return r=this.s,r>=1;case 8:return!!this.r&&!this.q.e&&jv(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&jv(this.q).i==0);case 10:return(this.Bb&wf)==0;case 11:return(this.Bb&Ay)!=0;case 12:return(this.Bb&yy)!=0;case 13:return this.j!=null;case 14:return mE(this)!=null;case 15:return(this.Bb&zu)!=0;case 16:return(this.Bb&bd)!=0;case 17:return!!Vm(this);case 18:return(this.Bb&dc)!=0;case 19:return s=no(this),!!s&&(s.Bb&dc)!=0;case 20:return(this.Bb&Ya)==0;case 21:return!!this.b;case 22:return!!yJt(this);case 23:return!!this.a&&this.a.i!=0}return sh(this,e-Zn((dn(),c5)),yn((n=u(In(this,16),26),n||c5),e))},l.sh=function(e,n){var r,s;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:mrt(this,Br(n));return;case 2:Ng(this,je(Re(n)));return;case 3:Pg(this,je(Re(n)));return;case 4:Ig(this,u(n,19).a);return;case 5:ty(this,u(n,19).a);return;case 8:f2(this,u(n,138));return;case 9:s=O1(this,u(n,87),null),s&&s.Fi();return;case 10:nE(this,je(Re(n)));return;case 11:sE(this,je(Re(n)));return;case 12:rE(this,je(Re(n)));return;case 13:Xbt(this,Br(n));return;case 15:iE(this,je(Re(n)));return;case 16:aE(this,je(Re(n)));return;case 18:krn(this,je(Re(n)));return;case 20:n3t(this,je(Re(n)));return;case 21:eyt(this,u(n,18));return;case 23:!this.a&&(this.a=new U3(Zy,this,23)),xr(this.a),!this.a&&(this.a=new U3(Zy,this,23)),rs(this.a,u(n,14));return}fh(this,e-Zn((dn(),c5)),yn((r=u(In(this,16),26),r||c5),e),n)},l.zh=function(){return dn(),c5},l.Bh=function(e){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Et(this.Cb,88)&&hy(rl(u(this.Cb,88)),4),Xc(this,null);return;case 2:Ng(this,!0);return;case 3:Pg(this,!0);return;case 4:Ig(this,0);return;case 5:ty(this,1);return;case 8:f2(this,null);return;case 9:r=O1(this,null,null),r&&r.Fi();return;case 10:nE(this,!0);return;case 11:sE(this,!1);return;case 12:rE(this,!1);return;case 13:this.i=null,ez(this,null);return;case 15:iE(this,!1);return;case 16:aE(this,!1);return;case 18:e3t(this,!1),Et(this.Cb,88)&&hy(rl(u(this.Cb,88)),2);return;case 20:n3t(this,!0);return;case 21:eyt(this,null);return;case 23:!this.a&&(this.a=new U3(Zy,this,23)),xr(this.a);return}lh(this,e-Zn((dn(),c5)),yn((n=u(In(this,16),26),n||c5),e))},l.Gh=function(){Cyt(this),k8(Eo((Ru(),ma),this)),Lh(this),this.Bb|=1},l.Lj=function(){return no(this)},l.qk=function(){var e;return e=no(this),!!e&&(e.Bb&dc)!=0},l.rk=function(){return(this.Bb&dc)!=0},l.sk=function(){return(this.Bb&Ya)!=0},l.nk=function(e,n){return this.c=null,Kyt(this,e,n)},l.Ib=function(){var e;return this.Db&64?pq(this):(e=new Th(pq(this)),e.a+=" (containment: ",kg(e,(this.Bb&dc)!=0),e.a+=", resolveProxies: ",kg(e,(this.Bb&Ya)!=0),e.a+=")",e.a)},P(Mn,"EReferenceImpl",99),I(548,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,548:1,114:1,115:1},WZ),l.Fb=function(e){return this===e},l.cd=function(){return this.b},l.dd=function(){return this.c},l.Hb=function(){return Iv(this)},l.Uh=function(e){Stn(this,Br(e))},l.ed=function(e){return ptn(this,Br(e))},l._g=function(e,n,r){var s;switch(e){case 0:return this.b;case 1:return this.c}return oh(this,e-Zn((dn(),Qa)),yn((s=u(In(this,16),26),s||Qa),e),n,r)},l.lh=function(e){var n;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return sh(this,e-Zn((dn(),Qa)),yn((n=u(In(this,16),26),n||Qa),e))},l.sh=function(e,n){var r;switch(e){case 0:Atn(this,Br(n));return;case 1:Zmt(this,Br(n));return}fh(this,e-Zn((dn(),Qa)),yn((r=u(In(this,16),26),r||Qa),e),n)},l.zh=function(){return dn(),Qa},l.Bh=function(e){var n;switch(e){case 0:Qmt(this,null);return;case 1:Zmt(this,null);return}lh(this,e-Zn((dn(),Qa)),yn((n=u(In(this,16),26),n||Qa),e))},l.Sh=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:Bg(e)),this.a},l.Th=function(e){this.a=e},l.Ib=function(){var e;return this.Db&64?bf(this):(e=new Th(bf(this)),e.a+=" (key: ",fo(e,this.b),e.a+=", value: ",fo(e,this.c),e.a+=")",e.a)},l.a=-1,l.b=null,l.c=null;var cc=P(Mn,"EStringToStringMapEntryImpl",548),a5e=Yi($i,"FeatureMap/Entry/Internal");I(565,1,SH),l.Ok=function(e){return this.Pk(u(e,49))},l.Pk=function(e){return this.Ok(e)},l.Fb=function(e){var n,r;return this===e?!0:Et(e,72)?(n=u(e,72),n.ak()==this.c?(r=this.dd(),r==null?n.dd()==null:yi(r,n.dd())):!1):!1},l.ak=function(){return this.c},l.Hb=function(){var e;return e=this.dd(),Hi(this.c)^(e==null?0:Hi(e))},l.Ib=function(){var e,n;return e=this.c,n=Fl(e.Hj()).Ph(),e.ne(),(n!=null&&n.length!=0?n+":"+e.ne():e.ne())+"="+this.dd()},P(Mn,"EStructuralFeatureImpl/BasicFeatureMapEntry",565),I(776,565,SH,Q2t),l.Pk=function(e){return new Q2t(this.c,e)},l.dd=function(){return this.a},l.Qk=function(e,n,r){return Gon(this,e,this.a,n,r)},l.Rk=function(e,n,r){return Von(this,e,this.a,n,r)},P(Mn,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",776),I(1314,1,{},PVt),l.Pj=function(e,n,r,s,o){var h;return h=u(I8(e,this.b),215),h.nl(this.a).Wj(s)},l.Qj=function(e,n,r,s,o){var h;return h=u(I8(e,this.b),215),h.el(this.a,s,o)},l.Rj=function(e,n,r,s,o){var h;return h=u(I8(e,this.b),215),h.fl(this.a,s,o)},l.Sj=function(e,n,r){var s;return s=u(I8(e,this.b),215),s.nl(this.a).fj()},l.Tj=function(e,n,r,s){var o;o=u(I8(e,this.b),215),o.nl(this.a).Wb(s)},l.Uj=function(e,n,r){return u(I8(e,this.b),215).nl(this.a)},l.Vj=function(e,n,r){var s;s=u(I8(e,this.b),215),s.nl(this.a).Xj()},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1314),I(89,1,{},Cg,Zb,Sg,e2),l.Pj=function(e,n,r,s,o){var h;if(h=n.Ch(r),h==null&&n.Dh(r,h=Aq(this,e)),!o)switch(this.e){case 50:case 41:return u(h,589).sj();case 40:return u(h,215).kl()}return h},l.Qj=function(e,n,r,s,o){var h,d;return d=n.Ch(r),d==null&&n.Dh(r,d=Aq(this,e)),h=u(d,69).lk(s,o),h},l.Rj=function(e,n,r,s,o){var h;return h=n.Ch(r),h!=null&&(o=u(h,69).mk(s,o)),o},l.Sj=function(e,n,r){var s;return s=n.Ch(r),s!=null&&u(s,76).fj()},l.Tj=function(e,n,r,s){var o;o=u(n.Ch(r),76),!o&&n.Dh(r,o=Aq(this,e)),o.Wb(s)},l.Uj=function(e,n,r){var s,o;return o=n.Ch(r),o==null&&n.Dh(r,o=Aq(this,e)),Et(o,76)?u(o,76):(s=u(n.Ch(r),15),new Nzt(s))},l.Vj=function(e,n,r){var s;s=u(n.Ch(r),76),!s&&n.Dh(r,s=Aq(this,e)),s.Xj()},l.b=0,l.e=0,P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateMany",89),I(504,1,{}),l.Qj=function(e,n,r,s,o){throw rt(new Or)},l.Rj=function(e,n,r,s,o){throw rt(new Or)},l.Uj=function(e,n,r){return new MXt(this,e,n,r)};var f0;P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingle",504),I(1331,1,tut,MXt),l.Wj=function(e){return this.a.Pj(this.c,this.d,this.b,e,!0)},l.fj=function(){return this.a.Sj(this.c,this.d,this.b)},l.Wb=function(e){this.a.Tj(this.c,this.d,this.b,e)},l.Xj=function(){this.a.Vj(this.c,this.d,this.b)},l.b=0,P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1331),I(769,504,{},Owt),l.Pj=function(e,n,r,s,o){return aat(e,e.eh(),e.Vg())==this.b?this.sk()&&s?Gst(e):e.eh():null},l.Qj=function(e,n,r,s,o){var h,d;return e.eh()&&(o=(h=e.Vg(),h>=0?e.Qg(o):e.eh().ih(e,-1-h,null,o))),d=Vi(e.Tg(),this.e),e.Sg(s,d,o)},l.Rj=function(e,n,r,s,o){var h;return h=Vi(e.Tg(),this.e),e.Sg(null,h,o)},l.Sj=function(e,n,r){var s;return s=Vi(e.Tg(),this.e),!!e.eh()&&e.Vg()==s},l.Tj=function(e,n,r,s){var o,h,d,w,k;if(s!=null&&!lat(this.a,s))throw rt(new Xk(AH+(Et(s,56)?d4t(u(s,56).Tg()):Bmt(sl(s)))+LH+this.a+"'"));if(o=e.eh(),d=Vi(e.Tg(),this.e),Gt(s)!==Gt(o)||e.Vg()!=d&&s!=null){if(lE(e,u(s,56)))throw rt(new Pn(K_+e.Ib()));k=null,o&&(k=(h=e.Vg(),h>=0?e.Qg(k):e.eh().ih(e,-1-h,null,k))),w=u(s,49),w&&(k=w.gh(e,Vi(w.Tg(),this.b),null,k)),k=e.Sg(w,d,k),k&&k.Fi()}else e.Lg()&&e.Mg()&&mi(e,new Qs(e,1,d,s,s))},l.Vj=function(e,n,r){var s,o,h,d;s=e.eh(),s?(d=(o=e.Vg(),o>=0?e.Qg(null):e.eh().ih(e,-1-o,null,null)),h=Vi(e.Tg(),this.e),d=e.Sg(null,h,d),d&&d.Fi()):e.Lg()&&e.Mg()&&mi(e,new CC(e,1,this.e,null,null))},l.sk=function(){return!1},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",769),I(1315,769,{},kKt),l.sk=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1315),I(563,504,{}),l.Pj=function(e,n,r,s,o){var h;return h=n.Ch(r),h==null?this.b:Gt(h)===Gt(f0)?null:h},l.Sj=function(e,n,r){var s;return s=n.Ch(r),s!=null&&(Gt(s)===Gt(f0)||!yi(s,this.b))},l.Tj=function(e,n,r,s){var o,h;e.Lg()&&e.Mg()?(o=(h=n.Ch(r),h==null?this.b:Gt(h)===Gt(f0)?null:h),s==null?this.c!=null?(n.Dh(r,null),s=this.b):this.b!=null?n.Dh(r,f0):n.Dh(r,null):(this.Sk(s),n.Dh(r,s)),mi(e,this.d.Tk(e,1,this.e,o,s))):s==null?this.c!=null?n.Dh(r,null):this.b!=null?n.Dh(r,f0):n.Dh(r,null):(this.Sk(s),n.Dh(r,s))},l.Vj=function(e,n,r){var s,o;e.Lg()&&e.Mg()?(s=(o=n.Ch(r),o==null?this.b:Gt(o)===Gt(f0)?null:o),n.Eh(r),mi(e,this.d.Tk(e,1,this.e,s,this.b))):n.Eh(r)},l.Sk=function(e){throw rt(new Gzt)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",563),I(F4,1,{},eB),l.Tk=function(e,n,r,s,o){return new CC(e,n,r,s,o)},l.Uk=function(e,n,r,s,o,h){return new srt(e,n,r,s,o,h)};var eLt,nLt,rLt,iLt,sLt,aLt,oLt,Aft,cLt;P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",F4),I(1332,F4,{},nB),l.Tk=function(e,n,r,s,o){return new gmt(e,n,r,je(Re(s)),je(Re(o)))},l.Uk=function(e,n,r,s,o,h){return new ZQt(e,n,r,je(Re(s)),je(Re(o)),h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1332),I(1333,F4,{},rB),l.Tk=function(e,n,r,s,o){return new zmt(e,n,r,u(s,217).a,u(o,217).a)},l.Uk=function(e,n,r,s,o,h){return new VQt(e,n,r,u(s,217).a,u(o,217).a,h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1333),I(1334,F4,{},Ak),l.Tk=function(e,n,r,s,o){return new qmt(e,n,r,u(s,172).a,u(o,172).a)},l.Uk=function(e,n,r,s,o,h){return new UQt(e,n,r,u(s,172).a,u(o,172).a,h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1334),I(1335,F4,{},iB),l.Tk=function(e,n,r,s,o){return new fmt(e,n,r,Xt(ye(s)),Xt(ye(o)))},l.Uk=function(e,n,r,s,o,h){return new WQt(e,n,r,Xt(ye(s)),Xt(ye(o)),h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1335),I(1336,F4,{},sB),l.Tk=function(e,n,r,s,o){return new Vmt(e,n,r,u(s,155).a,u(o,155).a)},l.Uk=function(e,n,r,s,o,h){return new KQt(e,n,r,u(s,155).a,u(o,155).a,h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1336),I(1337,F4,{},KZ),l.Tk=function(e,n,r,s,o){return new dmt(e,n,r,u(s,19).a,u(o,19).a)},l.Uk=function(e,n,r,s,o,h){return new YQt(e,n,r,u(s,19).a,u(o,19).a,h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1337),I(1338,F4,{},Lk),l.Tk=function(e,n,r,s,o){return new Hmt(e,n,r,u(s,162).a,u(o,162).a)},l.Uk=function(e,n,r,s,o,h){return new XQt(e,n,r,u(s,162).a,u(o,162).a,h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1338),I(1339,F4,{},Mk),l.Tk=function(e,n,r,s,o){return new Gmt(e,n,r,u(s,184).a,u(o,184).a)},l.Uk=function(e,n,r,s,o,h){return new QQt(e,n,r,u(s,184).a,u(o,184).a,h)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1339),I(1317,563,{},IXt),l.Sk=function(e){if(!this.a.wj(e))throw rt(new Xk(AH+sl(e)+LH+this.a+"'"))},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1317),I(1318,563,{},mYt),l.Sk=function(e){},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1318),I(770,563,{}),l.Sj=function(e,n,r){var s;return s=n.Ch(r),s!=null},l.Tj=function(e,n,r,s){var o,h;e.Lg()&&e.Mg()?(o=!0,h=n.Ch(r),h==null?(o=!1,h=this.b):Gt(h)===Gt(f0)&&(h=null),s==null?this.c!=null?(n.Dh(r,null),s=this.b):n.Dh(r,f0):(this.Sk(s),n.Dh(r,s)),mi(e,this.d.Uk(e,1,this.e,h,s,!o))):s==null?this.c!=null?n.Dh(r,null):n.Dh(r,f0):(this.Sk(s),n.Dh(r,s))},l.Vj=function(e,n,r){var s,o;e.Lg()&&e.Mg()?(s=!0,o=n.Ch(r),o==null?(s=!1,o=this.b):Gt(o)===Gt(f0)&&(o=null),n.Eh(r),mi(e,this.d.Uk(e,2,this.e,o,this.b,s))):n.Eh(r)},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",770),I(1319,770,{},DXt),l.Sk=function(e){if(!this.a.wj(e))throw rt(new Xk(AH+sl(e)+LH+this.a+"'"))},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1319),I(1320,770,{},yYt),l.Sk=function(e){},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1320),I(398,504,{},Pj),l.Pj=function(e,n,r,s,o){var h,d,w,k,C;if(C=n.Ch(r),this.Kj()&&Gt(C)===Gt(f0))return null;if(this.sk()&&s&&C!=null){if(w=u(C,49),w.kh()&&(k=Kp(e,w),w!=k)){if(!lat(this.a,k))throw rt(new Xk(AH+sl(k)+LH+this.a+"'"));n.Dh(r,C=k),this.rk()&&(h=u(k,49),d=w.ih(e,this.b?Vi(w.Tg(),this.b):-1-Vi(e.Tg(),this.e),null,null),!h.eh()&&(d=h.gh(e,this.b?Vi(h.Tg(),this.b):-1-Vi(e.Tg(),this.e),null,d)),d&&d.Fi()),e.Lg()&&e.Mg()&&mi(e,new CC(e,9,this.e,w,k))}return C}else return C},l.Qj=function(e,n,r,s,o){var h,d;return d=n.Ch(r),Gt(d)===Gt(f0)&&(d=null),n.Dh(r,s),this.bj()?Gt(d)!==Gt(s)&&d!=null&&(h=u(d,49),o=h.ih(e,Vi(h.Tg(),this.b),null,o)):this.rk()&&d!=null&&(o=u(d,49).ih(e,-1-Vi(e.Tg(),this.e),null,o)),e.Lg()&&e.Mg()&&(!o&&(o=new Sp(4)),o.Ei(new CC(e,1,this.e,d,s))),o},l.Rj=function(e,n,r,s,o){var h;return h=n.Ch(r),Gt(h)===Gt(f0)&&(h=null),n.Eh(r),e.Lg()&&e.Mg()&&(!o&&(o=new Sp(4)),this.Kj()?o.Ei(new CC(e,2,this.e,h,null)):o.Ei(new CC(e,1,this.e,h,null))),o},l.Sj=function(e,n,r){var s;return s=n.Ch(r),s!=null},l.Tj=function(e,n,r,s){var o,h,d,w,k;if(s!=null&&!lat(this.a,s))throw rt(new Xk(AH+(Et(s,56)?d4t(u(s,56).Tg()):Bmt(sl(s)))+LH+this.a+"'"));k=n.Ch(r),w=k!=null,this.Kj()&&Gt(k)===Gt(f0)&&(k=null),d=null,this.bj()?Gt(k)!==Gt(s)&&(k!=null&&(o=u(k,49),d=o.ih(e,Vi(o.Tg(),this.b),null,d)),s!=null&&(o=u(s,49),d=o.gh(e,Vi(o.Tg(),this.b),null,d))):this.rk()&&Gt(k)!==Gt(s)&&(k!=null&&(d=u(k,49).ih(e,-1-Vi(e.Tg(),this.e),null,d)),s!=null&&(d=u(s,49).gh(e,-1-Vi(e.Tg(),this.e),null,d))),s==null&&this.Kj()?n.Dh(r,f0):n.Dh(r,s),e.Lg()&&e.Mg()?(h=new srt(e,1,this.e,k,s,this.Kj()&&!w),d?(d.Ei(h),d.Fi()):mi(e,h)):d&&d.Fi()},l.Vj=function(e,n,r){var s,o,h,d,w;w=n.Ch(r),d=w!=null,this.Kj()&&Gt(w)===Gt(f0)&&(w=null),h=null,w!=null&&(this.bj()?(s=u(w,49),h=s.ih(e,Vi(s.Tg(),this.b),null,h)):this.rk()&&(h=u(w,49).ih(e,-1-Vi(e.Tg(),this.e),null,h))),n.Eh(r),e.Lg()&&e.Mg()?(o=new srt(e,this.Kj()?2:1,this.e,w,null,d),h?(h.Ei(o),h.Fi()):mi(e,o)):h&&h.Fi()},l.bj=function(){return!1},l.rk=function(){return!1},l.sk=function(){return!1},l.Kj=function(){return!1},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",398),I(564,398,{},ont),l.rk=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",564),I(1323,564,{},wWt),l.sk=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1323),I(772,564,{},R2t),l.Kj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",772),I(1325,772,{},mWt),l.sk=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1325),I(640,564,{},xnt),l.bj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",640),I(1324,640,{},EKt),l.sk=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1324),I(773,640,{},Tvt),l.Kj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",773),I(1326,773,{},TKt),l.sk=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1326),I(641,398,{},j2t),l.sk=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",641),I(1327,641,{},yWt),l.Kj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1327),I(774,641,{},kvt),l.bj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",774),I(1328,774,{},CKt),l.Kj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1328),I(1321,398,{},xWt),l.Kj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1321),I(771,398,{},Evt),l.bj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",771),I(1322,771,{},_Kt),l.Kj=function(){return!0},P(Mn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1322),I(775,565,SH,mwt),l.Pk=function(e){return new mwt(this.a,this.c,e)},l.dd=function(){return this.b},l.Qk=function(e,n,r){return Vsn(this,e,this.b,r)},l.Rk=function(e,n,r){return Usn(this,e,this.b,r)},P(Mn,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",775),I(1329,1,tut,Nzt),l.Wj=function(e){return this.a},l.fj=function(){return Et(this.a,95)?u(this.a,95).fj():!this.a.dc()},l.Wb=function(e){this.a.$b(),this.a.Gc(u(e,15))},l.Xj=function(){Et(this.a,95)?u(this.a,95).Xj():this.a.$b()},P(Mn,"EStructuralFeatureImpl/SettingMany",1329),I(1330,565,SH,$Zt),l.Ok=function(e){return new lnt((Di(),uA),this.b.Ih(this.a,e))},l.dd=function(){return null},l.Qk=function(e,n,r){return r},l.Rk=function(e,n,r){return r},P(Mn,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1330),I(642,565,SH,lnt),l.Ok=function(e){return new lnt(this.c,e)},l.dd=function(){return this.a},l.Qk=function(e,n,r){return r},l.Rk=function(e,n,r){return r},P(Mn,"EStructuralFeatureImpl/SimpleFeatureMapEntry",642),I(391,497,_d,xm),l.ri=function(e){return Pt(Gh,Ie,26,e,0,1)},l.ni=function(){return!1},P(Mn,"ESuperAdapter/1",391),I(444,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,836:1,49:1,97:1,150:1,444:1,114:1,115:1},RL),l._g=function(e,n,r){var s;switch(e){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new xC(this,ho,this)),this.a}return oh(this,e-Zn((dn(),Hw)),yn((s=u(In(this,16),26),s||Hw),e),n,r)},l.jh=function(e,n,r){var s,o;switch(n){case 0:return!this.Ab&&(this.Ab=new he(Zr,this,0,3)),Ba(this.Ab,e,r);case 2:return!this.a&&(this.a=new xC(this,ho,this)),Ba(this.a,e,r)}return o=u(yn((s=u(In(this,16),26),s||(dn(),Hw)),n),66),o.Nj().Rj(this,iu(this),n-Zn((dn(),Hw)),e,r)},l.lh=function(e){var n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return sh(this,e-Zn((dn(),Hw)),yn((n=u(In(this,16),26),n||Hw),e))},l.sh=function(e,n){var r;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab),!this.Ab&&(this.Ab=new he(Zr,this,0,3)),rs(this.Ab,u(n,14));return;case 1:Xc(this,Br(n));return;case 2:!this.a&&(this.a=new xC(this,ho,this)),xr(this.a),!this.a&&(this.a=new xC(this,ho,this)),rs(this.a,u(n,14));return}fh(this,e-Zn((dn(),Hw)),yn((r=u(In(this,16),26),r||Hw),e),n)},l.zh=function(){return dn(),Hw},l.Bh=function(e){var n;switch(e){case 0:!this.Ab&&(this.Ab=new he(Zr,this,0,3)),xr(this.Ab);return;case 1:Xc(this,null);return;case 2:!this.a&&(this.a=new xC(this,ho,this)),xr(this.a);return}lh(this,e-Zn((dn(),Hw)),yn((n=u(In(this,16),26),n||Hw),e))},P(Mn,"ETypeParameterImpl",444),I(445,85,zo,xC),l.cj=function(e,n){return Udn(this,u(e,87),n)},l.dj=function(e,n){return Wdn(this,u(e,87),n)},P(Mn,"ETypeParameterImpl/1",445),I(634,43,_4,Ytt),l.ec=function(){return new cR(this)},P(Mn,"ETypeParameterImpl/2",634),I(556,N1,ju,cR),l.Fc=function(e){return WWt(this,u(e,87))},l.Gc=function(e){var n,r,s;for(s=!1,r=e.Kc();r.Ob();)n=u(r.Pb(),87),ki(this.a,n,"")==null&&(s=!0);return s},l.$b=function(){Yu(this.a)},l.Hc=function(e){return kl(this.a,e)},l.Kc=function(){var e;return e=new h2(new wg(this.a).a),new uR(e)},l.Mc=function(e){return OJt(this,e)},l.gc=function(){return $9(this.a)},P(Mn,"ETypeParameterImpl/2/1",556),I(557,1,ra,uR),l.Nb=function(e){pa(this,e)},l.Pb=function(){return u(Yv(this.a).cd(),87)},l.Ob=function(){return this.a.b},l.Qb=function(){lte(this.a)},P(Mn,"ETypeParameterImpl/2/1/1",557),I(1276,43,_4,Tqt),l._b=function(e){return ea(e)?art(this,e):!!Ao(this.f,e)},l.xc=function(e){var n,r;return n=ea(e)?Fc(this,e):ec(Ao(this.f,e)),Et(n,837)?(r=u(n,837),n=r._j(),ki(this,u(e,235),n),n):n??(e==null?(det(),c5e):null)},P(Mn,"EValidatorRegistryImpl",1276),I(1313,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,1941:1,49:1,97:1,150:1,114:1,115:1},YZ),l.Ih=function(e,n){switch(e.yj()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return n==null?null:$o(n);case 25:return ton(n);case 27:return van(n);case 28:return wan(n);case 29:return n==null?null:SUt(rA[0],u(n,199));case 41:return n==null?"":Ap(u(n,290));case 42:return $o(n);case 50:return Br(n);default:throw rt(new Pn(HE+e.ne()+kw))}},l.Jh=function(e){var n,r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt;switch(e.G==-1&&(e.G=(H=Fl(e),H?Fg(H.Mh(),e):-1)),e.G){case 0:return r=new Utt,r;case 1:return n=new JF,n;case 2:return s=new XL,s;case 4:return o=new lR,o;case 5:return h=new Eqt,h;case 6:return d=new Wzt,d;case 7:return w=new qB,w;case 10:return C=new _k,C;case 11:return M=new Wtt,M;case 12:return F=new YXt,F;case 13:return V=new Ktt,V;case 14:return Y=new q2t,Y;case 17:return tt=new WZ,tt;case 18:return k=new wv,k;case 19:return gt=new RL,gt;default:throw rt(new Pn(Rct+e.zb+kw))}},l.Kh=function(e,n){switch(e.yj()){case 20:return n==null?null:new obt(n);case 21:return n==null?null:new Np(n);case 23:case 22:return n==null?null:shn(n);case 26:case 24:return n==null?null:EI($l(n,-128,127)<<24>>24);case 25:return bbn(n);case 27:return qfn(n);case 28:return Hfn(n);case 29:return h0n(n);case 32:case 31:return n==null?null:ly(n);case 38:case 37:return n==null?null:new Spt(n);case 40:case 39:return n==null?null:de($l(n,_a,vi));case 41:return null;case 42:return n==null,null;case 44:case 43:return n==null?null:g2(Sq(n));case 49:case 48:return n==null?null:eE($l(n,MH,32767)<<16>>16);case 50:return n;default:throw rt(new Pn(HE+e.ne()+kw))}},P(Mn,"EcoreFactoryImpl",1313),I(547,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,1939:1,49:1,97:1,150:1,179:1,547:1,114:1,115:1,675:1},fXt),l.gb=!1,l.hb=!1;var uLt,o5e=!1;P(Mn,"EcorePackageImpl",547),I(1184,1,{837:1},XZ),l._j=function(){return QUt(),u5e},P(Mn,"EcorePackageImpl/1",1184),I(1193,1,ii,QZ),l.wj=function(e){return Et(e,147)},l.xj=function(e){return Pt(oN,Ie,147,e,0,1)},P(Mn,"EcorePackageImpl/10",1193),I(1194,1,ii,ZZ),l.wj=function(e){return Et(e,191)},l.xj=function(e){return Pt(mft,Ie,191,e,0,1)},P(Mn,"EcorePackageImpl/11",1194),I(1195,1,ii,JZ),l.wj=function(e){return Et(e,56)},l.xj=function(e){return Pt(kb,Ie,56,e,0,1)},P(Mn,"EcorePackageImpl/12",1195),I(1196,1,ii,tJ),l.wj=function(e){return Et(e,399)},l.xj=function(e){return Pt(Vh,O8t,59,e,0,1)},P(Mn,"EcorePackageImpl/13",1196),I(1197,1,ii,eJ),l.wj=function(e){return Et(e,235)},l.xj=function(e){return Pt(r1,Ie,235,e,0,1)},P(Mn,"EcorePackageImpl/14",1197),I(1198,1,ii,nJ),l.wj=function(e){return Et(e,509)},l.xj=function(e){return Pt(zw,Ie,2017,e,0,1)},P(Mn,"EcorePackageImpl/15",1198),I(1199,1,ii,aB),l.wj=function(e){return Et(e,99)},l.xj=function(e){return Pt(Jy,P4,18,e,0,1)},P(Mn,"EcorePackageImpl/16",1199),I(1200,1,ii,rJ),l.wj=function(e){return Et(e,170)},l.xj=function(e){return Pt(Au,P4,170,e,0,1)},P(Mn,"EcorePackageImpl/17",1200),I(1201,1,ii,iJ),l.wj=function(e){return Et(e,472)},l.xj=function(e){return Pt(Qy,Ie,472,e,0,1)},P(Mn,"EcorePackageImpl/18",1201),I(1202,1,ii,sJ),l.wj=function(e){return Et(e,548)},l.xj=function(e){return Pt(cc,c0e,548,e,0,1)},P(Mn,"EcorePackageImpl/19",1202),I(1185,1,ii,oB),l.wj=function(e){return Et(e,322)},l.xj=function(e){return Pt(Zy,P4,34,e,0,1)},P(Mn,"EcorePackageImpl/2",1185),I(1203,1,ii,Ik),l.wj=function(e){return Et(e,241)},l.xj=function(e){return Pt(ho,C0e,87,e,0,1)},P(Mn,"EcorePackageImpl/20",1203),I(1204,1,ii,ZT),l.wj=function(e){return Et(e,444)},l.xj=function(e){return Pt(lu,Ie,836,e,0,1)},P(Mn,"EcorePackageImpl/21",1204),I(1205,1,ii,cB),l.wj=function(e){return Om(e)},l.xj=function(e){return Pt(Bs,te,476,e,8,1)},P(Mn,"EcorePackageImpl/22",1205),I(1206,1,ii,aJ),l.wj=function(e){return Et(e,190)},l.xj=function(e){return Pt(Hu,te,190,e,0,2)},P(Mn,"EcorePackageImpl/23",1206),I(1207,1,ii,uB),l.wj=function(e){return Et(e,217)},l.xj=function(e){return Pt(E6,te,217,e,0,1)},P(Mn,"EcorePackageImpl/24",1207),I(1208,1,ii,lB),l.wj=function(e){return Et(e,172)},l.xj=function(e){return Pt(aS,te,172,e,0,1)},P(Mn,"EcorePackageImpl/25",1208),I(1209,1,ii,oJ),l.wj=function(e){return Et(e,199)},l.xj=function(e){return Pt(HH,te,199,e,0,1)},P(Mn,"EcorePackageImpl/26",1209),I(1210,1,ii,JT),l.wj=function(e){return!1},l.xj=function(e){return Pt(SLt,Ie,2110,e,0,1)},P(Mn,"EcorePackageImpl/27",1210),I(1211,1,ii,km),l.wj=function(e){return Nm(e)},l.xj=function(e){return Pt(ca,te,333,e,7,1)},P(Mn,"EcorePackageImpl/28",1211),I(1212,1,ii,hB),l.wj=function(e){return Et(e,58)},l.xj=function(e){return Pt(qAt,xy,58,e,0,1)},P(Mn,"EcorePackageImpl/29",1212),I(1186,1,ii,fB),l.wj=function(e){return Et(e,510)},l.xj=function(e){return Pt(Zr,{3:1,4:1,5:1,1934:1},590,e,0,1)},P(Mn,"EcorePackageImpl/3",1186),I(1213,1,ii,cJ),l.wj=function(e){return Et(e,573)},l.xj=function(e){return Pt(VAt,Ie,1940,e,0,1)},P(Mn,"EcorePackageImpl/30",1213),I(1214,1,ii,uJ),l.wj=function(e){return Et(e,153)},l.xj=function(e){return Pt(gLt,xy,153,e,0,1)},P(Mn,"EcorePackageImpl/31",1214),I(1215,1,ii,t9),l.wj=function(e){return Et(e,72)},l.xj=function(e){return Pt(sU,N0e,72,e,0,1)},P(Mn,"EcorePackageImpl/32",1215),I(1216,1,ii,dB),l.wj=function(e){return Et(e,155)},l.xj=function(e){return Pt(XE,te,155,e,0,1)},P(Mn,"EcorePackageImpl/33",1216),I(1217,1,ii,gB),l.wj=function(e){return Et(e,19)},l.xj=function(e){return Pt(ja,te,19,e,0,1)},P(Mn,"EcorePackageImpl/34",1217),I(1218,1,ii,uc),l.wj=function(e){return Et(e,290)},l.xj=function(e){return Pt(U8t,Ie,290,e,0,1)},P(Mn,"EcorePackageImpl/35",1218),I(1219,1,ii,lJ),l.wj=function(e){return Et(e,162)},l.xj=function(e){return Pt(Tw,te,162,e,0,1)},P(Mn,"EcorePackageImpl/36",1219),I(1220,1,ii,pB),l.wj=function(e){return Et(e,83)},l.xj=function(e){return Pt(W8t,Ie,83,e,0,1)},P(Mn,"EcorePackageImpl/37",1220),I(1221,1,ii,e9),l.wj=function(e){return Et(e,591)},l.xj=function(e){return Pt(lLt,Ie,591,e,0,1)},P(Mn,"EcorePackageImpl/38",1221),I(1222,1,ii,hJ),l.wj=function(e){return!1},l.xj=function(e){return Pt(ALt,Ie,2111,e,0,1)},P(Mn,"EcorePackageImpl/39",1222),I(1187,1,ii,fJ),l.wj=function(e){return Et(e,88)},l.xj=function(e){return Pt(Gh,Ie,26,e,0,1)},P(Mn,"EcorePackageImpl/4",1187),I(1223,1,ii,n9),l.wj=function(e){return Et(e,184)},l.xj=function(e){return Pt(Cw,te,184,e,0,1)},P(Mn,"EcorePackageImpl/40",1223),I(1224,1,ii,bB),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(Mn,"EcorePackageImpl/41",1224),I(1225,1,ii,r9),l.wj=function(e){return Et(e,588)},l.xj=function(e){return Pt(GAt,Ie,588,e,0,1)},P(Mn,"EcorePackageImpl/42",1225),I(1226,1,ii,i9),l.wj=function(e){return!1},l.xj=function(e){return Pt(LLt,te,2112,e,0,1)},P(Mn,"EcorePackageImpl/43",1226),I(1227,1,ii,Rf),l.wj=function(e){return Et(e,42)},l.xj=function(e){return Pt(M2,Dq,42,e,0,1)},P(Mn,"EcorePackageImpl/44",1227),I(1188,1,ii,jL),l.wj=function(e){return Et(e,138)},l.xj=function(e){return Pt(i1,Ie,138,e,0,1)},P(Mn,"EcorePackageImpl/5",1188),I(1189,1,ii,$L),l.wj=function(e){return Et(e,148)},l.xj=function(e){return Pt(Cft,Ie,148,e,0,1)},P(Mn,"EcorePackageImpl/6",1189),I(1190,1,ii,rx),l.wj=function(e){return Et(e,457)},l.xj=function(e){return Pt(iU,Ie,671,e,0,1)},P(Mn,"EcorePackageImpl/7",1190),I(1191,1,ii,dJ),l.wj=function(e){return Et(e,573)},l.xj=function(e){return Pt(eg,Ie,678,e,0,1)},P(Mn,"EcorePackageImpl/8",1191),I(1192,1,ii,gJ),l.wj=function(e){return Et(e,471)},l.xj=function(e){return Pt(nA,Ie,471,e,0,1)},P(Mn,"EcorePackageImpl/9",1192),I(1025,1982,o0e,qqt),l.bi=function(e,n){Iun(this,u(n,415))},l.fi=function(e,n){noe(this,e,u(n,415))},P(Mn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1025),I(1026,143,QD,rXt),l.Ai=function(){return this.a.a},P(Mn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1026),I(1053,1052,{},mUt),P("org.eclipse.emf.ecore.plugin","EcorePlugin",1053);var lLt=Yi(P0e,"Resource");I(781,1378,F0e),l.Yk=function(e){},l.Zk=function(e){},l.Vk=function(){return!this.a&&(this.a=new ztt(this)),this.a},l.Wk=function(e){var n,r,s,o,h;if(s=e.length,s>0)if(Rr(0,e.length),e.charCodeAt(0)==47){for(h=new Yc(4),o=1,n=1;n0&&(e=e.substr(0,r)));return Jgn(this,e)},l.Xk=function(){return this.c},l.Ib=function(){var e;return Ap(this.gm)+"@"+(e=Hi(this)>>>0,e.toString(16))+" uri='"+this.d+"'"},l.b=!1,P(eut,"ResourceImpl",781),I(1379,781,F0e,Fzt),P(eut,"BinaryResourceImpl",1379),I(1169,694,Yct),l.si=function(e){return Et(e,56)?Nnn(this,u(e,56)):Et(e,591)?new er(u(e,591).Vk()):Gt(e)===Gt(this.f)?u(e,14).Kc():(f8(),lN.a)},l.Ob=function(){return i5t(this)},l.a=!1,P($i,"EcoreUtil/ContentTreeIterator",1169),I(1380,1169,Yct,NYt),l.si=function(e){return Gt(e)===Gt(this.f)?u(e,15).Kc():new vZt(u(e,56))},P(eut,"ResourceImpl/5",1380),I(648,1994,T0e,ztt),l.Hc=function(e){return this.i<=4?fE(this,e):Et(e,49)&&u(e,49).Zg()==this.a},l.bi=function(e,n){e==this.i-1&&(this.a.b||(this.a.b=!0))},l.di=function(e,n){e==0?this.a.b||(this.a.b=!0):Brt(this,e,n)},l.fi=function(e,n){},l.gi=function(e,n,r){},l.aj=function(){return 2},l.Ai=function(){return this.a},l.bj=function(){return!0},l.cj=function(e,n){var r;return r=u(e,49),n=r.wh(this.a,n),n},l.dj=function(e,n){var r;return r=u(e,49),r.wh(null,n)},l.ej=function(){return!1},l.hi=function(){return!0},l.ri=function(e){return Pt(kb,Ie,56,e,0,1)},l.ni=function(){return!1},P(eut,"ResourceImpl/ContentsEList",648),I(957,1964,IE,Pzt),l.Zc=function(e){return this.a._h(e)},l.gc=function(){return this.a.gc()},P($i,"AbstractSequentialInternalEList/1",957);var hLt,fLt,ma,dLt;I(624,1,{},FKt);var aU,oU;P($i,"BasicExtendedMetaData",624),I(1160,1,{},FVt),l.$k=function(){return null},l._k=function(){return this.a==-2&&vg(this,a0n(this.d,this.b)),this.a},l.al=function(){return null},l.bl=function(){return vn(),vn(),io},l.ne=function(){return this.c==UE&&I3(this,Oie(this.d,this.b)),this.c},l.cl=function(){return 0},l.a=-2,l.c=UE,P($i,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1160),I(1161,1,{},rZt),l.$k=function(){return this.a==(L8(),aU)&&dpt(this,k2n(this.f,this.b)),this.a},l._k=function(){return 0},l.al=function(){return this.c==(L8(),aU)&&Ttt(this,E2n(this.f,this.b)),this.c},l.bl=function(){return!this.d&&Ctt(this,kwn(this.f,this.b)),this.d},l.ne=function(){return this.e==UE&&QB(this,Oie(this.f,this.b)),this.e},l.cl=function(){return this.g==-2&&ZB(this,Cdn(this.f,this.b)),this.g},l.e=UE,l.g=-2,P($i,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1161),I(1159,1,{},RVt),l.b=!1,l.c=!1,P($i,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1159),I(1162,1,{},nZt),l.c=-2,l.e=UE,l.f=UE,P($i,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1162),I(585,622,zo,Sj),l.aj=function(){return this.c},l.Fk=function(){return!1},l.li=function(e,n){return n},l.c=0,P($i,"EDataTypeEList",585);var gLt=Yi($i,"FeatureMap");I(75,585,{3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},is),l.Vc=function(e,n){w2n(this,e,u(n,72))},l.Fc=function(e){return Bbn(this,u(e,72))},l.Yh=function(e){Een(this,u(e,72))},l.cj=function(e,n){return rZe(this,u(e,72),n)},l.dj=function(e,n){return hvt(this,u(e,72),n)},l.ii=function(e,n){return $wn(this,e,n)},l.li=function(e,n){return m3n(this,e,u(n,72))},l._c=function(e,n){return cvn(this,e,u(n,72))},l.jj=function(e,n){return iZe(this,u(e,72),n)},l.kj=function(e,n){return oKt(this,u(e,72),n)},l.lj=function(e,n,r){return cdn(this,u(e,72),u(n,72),r)},l.oi=function(e,n){return Sst(this,e,u(n,72))},l.dl=function(e,n){return U5t(this,e,n)},l.Wc=function(e,n){var r,s,o,h,d,w,k,C,M;for(C=new Kv(n.gc()),o=n.Kc();o.Ob();)if(s=u(o.Pb(),72),h=s.ak(),V0(this.e,h))(!h.hi()||!k$(this,h,s.dd())&&!fE(C,s))&&Mr(C,s);else{for(M=au(this.e.Tg(),h),r=u(this.g,119),d=!0,w=0;w=0;)if(n=e[this.c],this.k.rl(n.ak()))return this.j=this.f?n:n.dd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},P($i,"BasicFeatureMap/FeatureEIterator",410),I(662,410,Jd,Uet),l.Lk=function(){return!0},P($i,"BasicFeatureMap/ResolvingFeatureEIterator",662),I(955,486,CH,LUt),l.Gi=function(){return this},P($i,"EContentsEList/1",955),I(956,486,CH,tUt),l.Lk=function(){return!1},P($i,"EContentsEList/2",956),I(954,279,_H,MUt),l.Nk=function(e){},l.Ob=function(){return!1},l.Sb=function(){return!1},P($i,"EContentsEList/FeatureIteratorImpl/1",954),I(825,585,zo,b2t),l.ci=function(){this.a=!0},l.fj=function(){return this.a},l.Xj=function(){var e;xr(this),ml(this.e)?(e=this.a,this.a=!1,mi(this.e,new df(this.e,2,this.c,e,!1))):this.a=!1},l.a=!1,P($i,"EDataTypeEList/Unsettable",825),I(1849,585,zo,RUt),l.hi=function(){return!0},P($i,"EDataTypeUniqueEList",1849),I(1850,825,zo,jUt),l.hi=function(){return!0},P($i,"EDataTypeUniqueEList/Unsettable",1850),I(139,85,zo,Ou),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectContainmentEList/Resolving",139),I(1163,545,zo,BUt),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectContainmentEList/Unsettable/Resolving",1163),I(748,16,zo,ivt),l.ci=function(){this.a=!0},l.fj=function(){return this.a},l.Xj=function(){var e;xr(this),ml(this.e)?(e=this.a,this.a=!1,mi(this.e,new df(this.e,2,this.c,e,!1))):this.a=!1},l.a=!1,P($i,"EObjectContainmentWithInverseEList/Unsettable",748),I(1173,748,zo,KWt),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1173),I(743,496,zo,p2t),l.ci=function(){this.a=!0},l.fj=function(){return this.a},l.Xj=function(){var e;xr(this),ml(this.e)?(e=this.a,this.a=!1,mi(this.e,new df(this.e,2,this.c,e,!1))):this.a=!1},l.a=!1,P($i,"EObjectEList/Unsettable",743),I(328,496,zo,U3),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectResolvingEList",328),I(1641,743,zo,$Ut),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectResolvingEList/Unsettable",1641),I(1381,1,{},pJ);var c5e;P($i,"EObjectValidator",1381),I(546,496,zo,Uj),l.zk=function(){return this.d},l.Ak=function(){return this.b},l.bj=function(){return!0},l.Dk=function(){return!0},l.b=0,P($i,"EObjectWithInverseEList",546),I(1176,546,zo,YWt),l.Ck=function(){return!0},P($i,"EObjectWithInverseEList/ManyInverse",1176),I(625,546,zo,fnt),l.ci=function(){this.a=!0},l.fj=function(){return this.a},l.Xj=function(){var e;xr(this),ml(this.e)?(e=this.a,this.a=!1,mi(this.e,new df(this.e,2,this.c,e,!1))):this.a=!1},l.a=!1,P($i,"EObjectWithInverseEList/Unsettable",625),I(1175,625,zo,XWt),l.Ck=function(){return!0},P($i,"EObjectWithInverseEList/Unsettable/ManyInverse",1175),I(749,546,zo,svt),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectWithInverseResolvingEList",749),I(31,749,zo,Cn),l.Ck=function(){return!0},P($i,"EObjectWithInverseResolvingEList/ManyInverse",31),I(750,625,zo,avt),l.Ek=function(){return!0},l.li=function(e,n){return o6(this,e,u(n,56))},P($i,"EObjectWithInverseResolvingEList/Unsettable",750),I(1174,750,zo,QWt),l.Ck=function(){return!0},P($i,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1174),I(1164,622,zo),l.ai=function(){return(this.b&1792)==0},l.ci=function(){this.b|=1},l.Bk=function(){return(this.b&4)!=0},l.bj=function(){return(this.b&40)!=0},l.Ck=function(){return(this.b&16)!=0},l.Dk=function(){return(this.b&8)!=0},l.Ek=function(){return(this.b&Ay)!=0},l.rk=function(){return(this.b&32)!=0},l.Fk=function(){return(this.b&wf)!=0},l.wj=function(e){return this.d?DZt(this.d,e):this.ak().Yj().wj(e)},l.fj=function(){return this.b&2?(this.b&1)!=0:this.i!=0},l.hi=function(){return(this.b&128)!=0},l.Xj=function(){var e;xr(this),this.b&2&&(ml(this.e)?(e=(this.b&1)!=0,this.b&=-2,Kk(this,new df(this.e,2,Vi(this.e.Tg(),this.ak()),e,!1))):this.b&=-2)},l.ni=function(){return(this.b&1536)==0},l.b=0,P($i,"EcoreEList/Generic",1164),I(1165,1164,zo,zXt),l.ak=function(){return this.a},P($i,"EcoreEList/Dynamic",1165),I(747,63,_d,mpt),l.ri=function(e){return CI(this.a.a,e)},P($i,"EcoreEMap/1",747),I(746,85,zo,iwt),l.bi=function(e,n){qz(this.b,u(n,133))},l.di=function(e,n){Sne(this.b)},l.ei=function(e,n,r){var s;++(s=this.b,u(n,133),s).e},l.fi=function(e,n){Fit(this.b,u(n,133))},l.gi=function(e,n,r){Fit(this.b,u(r,133)),Gt(r)===Gt(n)&&u(r,133).Th(fXe(u(n,133).cd())),qz(this.b,u(n,133))},P($i,"EcoreEMap/DelegateEObjectContainmentEList",746),I(1171,151,D8t,$ee),P($i,"EcoreEMap/Unsettable",1171),I(1172,746,zo,ZWt),l.ci=function(){this.a=!0},l.fj=function(){return this.a},l.Xj=function(){var e;xr(this),ml(this.e)?(e=this.a,this.a=!1,mi(this.e,new df(this.e,2,this.c,e,!1))):this.a=!1},l.a=!1,P($i,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1172),I(1168,228,_4,GYt),l.a=!1,l.b=!1,P($i,"EcoreUtil/Copier",1168),I(745,1,ra,vZt),l.Nb=function(e){pa(this,e)},l.Ob=function(){return die(this)},l.Pb=function(){var e;return die(this),e=this.b,this.b=null,e},l.Qb=function(){this.a.Qb()},P($i,"EcoreUtil/ProperContentIterator",745),I(1382,1381,{},HB);var u5e;P($i,"EcoreValidator",1382);var l5e;Yi($i,"FeatureMapUtil/Validator"),I(1260,1,{1942:1},bJ),l.rl=function(e){return!0},P($i,"FeatureMapUtil/1",1260),I(757,1,{1942:1},xxt),l.rl=function(e){var n;return this.c==e?!0:(n=Re(Jn(this.a,e)),n==null?rwn(this,e)?(CJt(this.a,e,(Fn(),YE)),!0):(CJt(this.a,e,(Fn(),I2)),!1):n==(Fn(),YE))},l.e=!1;var Lft;P($i,"FeatureMapUtil/BasicValidator",757),I(758,43,_4,h2t),P($i,"FeatureMapUtil/BasicValidator/Cache",758),I(501,52,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,69:1,95:1},DM),l.Vc=function(e,n){qce(this.c,this.b,e,n)},l.Fc=function(e){return U5t(this.c,this.b,e)},l.Wc=function(e,n){return wyn(this.c,this.b,e,n)},l.Gc=function(e){return hC(this,e)},l.Xh=function(e,n){jan(this.c,this.b,e,n)},l.lk=function(e,n){return $5t(this.c,this.b,e,n)},l.pi=function(e){return xq(this.c,this.b,e,!1)},l.Zh=function(){return hUt(this.c,this.b)},l.$h=function(){return JYe(this.c,this.b)},l._h=function(e){return Gsn(this.c,this.b,e)},l.mk=function(e,n){return MWt(this,e,n)},l.$b=function(){vx(this)},l.Hc=function(e){return k$(this.c,this.b,e)},l.Ic=function(e){return Hon(this.c,this.b,e)},l.Xb=function(e){return xq(this.c,this.b,e,!0)},l.Wj=function(e){return this},l.Xc=function(e){return esn(this.c,this.b,e)},l.dc=function(){return tj(this)},l.fj=function(){return!VI(this.c,this.b)},l.Kc=function(){return San(this.c,this.b)},l.Yc=function(){return Aan(this.c,this.b)},l.Zc=function(e){return $un(this.c,this.b,e)},l.ii=function(e,n){return ale(this.c,this.b,e,n)},l.ji=function(e,n){Rsn(this.c,this.b,e,n)},l.$c=function(e){return jae(this.c,this.b,e)},l.Mc=function(e){return Twn(this.c,this.b,e)},l._c=function(e,n){return fle(this.c,this.b,e,n)},l.Wb=function(e){iq(this.c,this.b),hC(this,u(e,15))},l.gc=function(){return Jun(this.c,this.b)},l.Pc=function(){return Zrn(this.c,this.b)},l.Qc=function(e){return nsn(this.c,this.b,e)},l.Ib=function(){var e,n;for(n=new xg,n.a+="[",e=hUt(this.c,this.b);_it(e);)fo(n,dC($z(e))),_it(e)&&(n.a+=Ka);return n.a+="]",n.a},l.Xj=function(){iq(this.c,this.b)},P($i,"FeatureMapUtil/FeatureEList",501),I(627,36,QD,Art),l.yi=function(e){return ZC(this,e)},l.Di=function(e){var n,r,s,o,h,d,w;switch(this.d){case 1:case 2:{if(h=e.Ai(),Gt(h)===Gt(this.c)&&ZC(this,null)==e.yi(null))return this.g=e.zi(),e.xi()==1&&(this.d=1),!0;break}case 3:{switch(o=e.xi(),o){case 3:{if(h=e.Ai(),Gt(h)===Gt(this.c)&&ZC(this,null)==e.yi(null))return this.d=5,n=new Kv(2),Mr(n,this.g),Mr(n,e.zi()),this.g=n,!0;break}}break}case 5:{switch(o=e.xi(),o){case 3:{if(h=e.Ai(),Gt(h)===Gt(this.c)&&ZC(this,null)==e.yi(null))return r=u(this.g,14),r.Fc(e.zi()),!0;break}}break}case 4:{switch(o=e.xi(),o){case 3:{if(h=e.Ai(),Gt(h)===Gt(this.c)&&ZC(this,null)==e.yi(null))return this.d=1,this.g=e.zi(),!0;break}case 4:{if(h=e.Ai(),Gt(h)===Gt(this.c)&&ZC(this,null)==e.yi(null))return this.d=6,w=new Kv(2),Mr(w,this.n),Mr(w,e.Bi()),this.n=w,d=ct(ot(Tr,1),Xr,25,15,[this.o,e.Ci()]),this.g=d,!0;break}}break}case 6:{switch(o=e.xi(),o){case 4:{if(h=e.Ai(),Gt(h)===Gt(this.c)&&ZC(this,null)==e.yi(null))return r=u(this.n,14),r.Fc(e.Bi()),d=u(this.g,48),s=Pt(Tr,Xr,25,d.length+1,15,1),Ic(d,0,s,0,d.length),s[d.length]=e.Ci(),this.g=s,!0;break}}break}}return!1},P($i,"FeatureMapUtil/FeatureENotificationImpl",627),I(552,501,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},Ij),l.dl=function(e,n){return U5t(this.c,e,n)},l.el=function(e,n,r){return $5t(this.c,e,n,r)},l.fl=function(e,n,r){return uxt(this.c,e,n,r)},l.gl=function(){return this},l.hl=function(e,n){return kD(this.c,e,n)},l.il=function(e){return u(xq(this.c,this.b,e,!1),72).ak()},l.jl=function(e){return u(xq(this.c,this.b,e,!1),72).dd()},l.kl=function(){return this.a},l.ll=function(e){return!VI(this.c,e)},l.ml=function(e,n){kq(this.c,e,n)},l.nl=function(e){return Wee(this.c,e)},l.ol=function(e){vse(this.c,e)},P($i,"FeatureMapUtil/FeatureFeatureMap",552),I(1259,1,tut,jVt),l.Wj=function(e){return xq(this.b,this.a,-1,e)},l.fj=function(){return!VI(this.b,this.a)},l.Wb=function(e){kq(this.b,this.a,e)},l.Xj=function(){iq(this.b,this.a)},P($i,"FeatureMapUtil/FeatureValue",1259);var U6,Mft,Ift,W6,h5e,fN=Yi(NH,"AnyType");I(666,60,U0,ret),P(NH,"InvalidDatatypeValueException",666);var cU=Yi(NH,R0e),dN=Yi(NH,j0e),pLt=Yi(NH,$0e),f5e,pc,bLt,U2,d5e,g5e,p5e,b5e,v5e,w5e,m5e,y5e,x5e,k5e,E5e,u5,T5e,l5,oA,C5e,Gw,gN,pN,_5e,cA,uA;I(830,506,{105:1,92:1,90:1,56:1,49:1,97:1,843:1},$pt),l._g=function(e,n,r){switch(e){case 0:return r?(!this.c&&(this.c=new is(this,0)),this.c):(!this.c&&(this.c=new is(this,0)),this.c.b);case 1:return r?(!this.c&&(this.c=new is(this,0)),u(Bc(this.c,(Di(),U2)),153)):(!this.c&&(this.c=new is(this,0)),u(u(Bc(this.c,(Di(),U2)),153),215)).kl();case 2:return r?(!this.b&&(this.b=new is(this,2)),this.b):(!this.b&&(this.b=new is(this,2)),this.b.b)}return oh(this,e-Zn(this.zh()),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():this.zh(),e),n,r)},l.jh=function(e,n,r){var s;switch(n){case 0:return!this.c&&(this.c=new is(this,0)),wD(this.c,e,r);case 1:return(!this.c&&(this.c=new is(this,0)),u(u(Bc(this.c,(Di(),U2)),153),69)).mk(e,r);case 2:return!this.b&&(this.b=new is(this,2)),wD(this.b,e,r)}return s=u(yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():this.zh(),n),66),s.Nj().Rj(this,Omt(this),n-Zn(this.zh()),e,r)},l.lh=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new is(this,0)),u(Bc(this.c,(Di(),U2)),153)).dc();case 2:return!!this.b&&this.b.i!=0}return sh(this,e-Zn(this.zh()),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():this.zh(),e))},l.sh=function(e,n){switch(e){case 0:!this.c&&(this.c=new is(this,0)),QM(this.c,n);return;case 1:(!this.c&&(this.c=new is(this,0)),u(u(Bc(this.c,(Di(),U2)),153),215)).Wb(n);return;case 2:!this.b&&(this.b=new is(this,2)),QM(this.b,n);return}fh(this,e-Zn(this.zh()),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():this.zh(),e),n)},l.zh=function(){return Di(),bLt},l.Bh=function(e){switch(e){case 0:!this.c&&(this.c=new is(this,0)),xr(this.c);return;case 1:(!this.c&&(this.c=new is(this,0)),u(Bc(this.c,(Di(),U2)),153)).$b();return;case 2:!this.b&&(this.b=new is(this,2)),xr(this.b);return}lh(this,e-Zn(this.zh()),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():this.zh(),e))},l.Ib=function(){var e;return this.j&4?bf(this):(e=new Th(bf(this)),e.a+=" (mixed: ",oC(e,this.c),e.a+=", anyAttribute: ",oC(e,this.b),e.a+=")",e.a)},P(ys,"AnyTypeImpl",830),I(667,506,{105:1,92:1,90:1,56:1,49:1,97:1,2021:1,667:1},vB),l._g=function(e,n,r){switch(e){case 0:return this.a;case 1:return this.b}return oh(this,e-Zn((Di(),u5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():u5,e),n,r)},l.lh=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return sh(this,e-Zn((Di(),u5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():u5,e))},l.sh=function(e,n){switch(e){case 0:Ltt(this,Br(n));return;case 1:ppt(this,Br(n));return}fh(this,e-Zn((Di(),u5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():u5,e),n)},l.zh=function(){return Di(),u5},l.Bh=function(e){switch(e){case 0:this.a=null;return;case 1:this.b=null;return}lh(this,e-Zn((Di(),u5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():u5,e))},l.Ib=function(){var e;return this.j&4?bf(this):(e=new Th(bf(this)),e.a+=" (data: ",fo(e,this.a),e.a+=", target: ",fo(e,this.b),e.a+=")",e.a)},l.a=null,l.b=null,P(ys,"ProcessingInstructionImpl",667),I(668,830,{105:1,92:1,90:1,56:1,49:1,97:1,843:1,2022:1,668:1},_qt),l._g=function(e,n,r){switch(e){case 0:return r?(!this.c&&(this.c=new is(this,0)),this.c):(!this.c&&(this.c=new is(this,0)),this.c.b);case 1:return r?(!this.c&&(this.c=new is(this,0)),u(Bc(this.c,(Di(),U2)),153)):(!this.c&&(this.c=new is(this,0)),u(u(Bc(this.c,(Di(),U2)),153),215)).kl();case 2:return r?(!this.b&&(this.b=new is(this,2)),this.b):(!this.b&&(this.b=new is(this,2)),this.b.b);case 3:return!this.c&&(this.c=new is(this,0)),Br(kD(this.c,(Di(),oA),!0));case 4:return ovt(this.a,(!this.c&&(this.c=new is(this,0)),Br(kD(this.c,(Di(),oA),!0))));case 5:return this.a}return oh(this,e-Zn((Di(),l5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():l5,e),n,r)},l.lh=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new is(this,0)),u(Bc(this.c,(Di(),U2)),153)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new is(this,0)),Br(kD(this.c,(Di(),oA),!0))!=null;case 4:return ovt(this.a,(!this.c&&(this.c=new is(this,0)),Br(kD(this.c,(Di(),oA),!0))))!=null;case 5:return!!this.a}return sh(this,e-Zn((Di(),l5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():l5,e))},l.sh=function(e,n){switch(e){case 0:!this.c&&(this.c=new is(this,0)),QM(this.c,n);return;case 1:(!this.c&&(this.c=new is(this,0)),u(u(Bc(this.c,(Di(),U2)),153),215)).Wb(n);return;case 2:!this.b&&(this.b=new is(this,2)),QM(this.b,n);return;case 3:Uwt(this,Br(n));return;case 4:Uwt(this,cvt(this.a,n));return;case 5:wc(this,u(n,148));return}fh(this,e-Zn((Di(),l5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():l5,e),n)},l.zh=function(){return Di(),l5},l.Bh=function(e){switch(e){case 0:!this.c&&(this.c=new is(this,0)),xr(this.c);return;case 1:(!this.c&&(this.c=new is(this,0)),u(Bc(this.c,(Di(),U2)),153)).$b();return;case 2:!this.b&&(this.b=new is(this,2)),xr(this.b);return;case 3:!this.c&&(this.c=new is(this,0)),kq(this.c,(Di(),oA),null);return;case 4:Uwt(this,cvt(this.a,null));return;case 5:this.a=null;return}lh(this,e-Zn((Di(),l5)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():l5,e))},P(ys,"SimpleAnyTypeImpl",668),I(669,506,{105:1,92:1,90:1,56:1,49:1,97:1,2023:1,669:1},Cqt),l._g=function(e,n,r){switch(e){case 0:return r?(!this.a&&(this.a=new is(this,0)),this.a):(!this.a&&(this.a=new is(this,0)),this.a.b);case 1:return r?(!this.b&&(this.b=new Tl((dn(),Qa),cc,this,1)),this.b):(!this.b&&(this.b=new Tl((dn(),Qa),cc,this,1)),fI(this.b));case 2:return r?(!this.c&&(this.c=new Tl((dn(),Qa),cc,this,2)),this.c):(!this.c&&(this.c=new Tl((dn(),Qa),cc,this,2)),fI(this.c));case 3:return!this.a&&(this.a=new is(this,0)),Bc(this.a,(Di(),gN));case 4:return!this.a&&(this.a=new is(this,0)),Bc(this.a,(Di(),pN));case 5:return!this.a&&(this.a=new is(this,0)),Bc(this.a,(Di(),cA));case 6:return!this.a&&(this.a=new is(this,0)),Bc(this.a,(Di(),uA))}return oh(this,e-Zn((Di(),Gw)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():Gw,e),n,r)},l.jh=function(e,n,r){var s;switch(n){case 0:return!this.a&&(this.a=new is(this,0)),wD(this.a,e,r);case 1:return!this.b&&(this.b=new Tl((dn(),Qa),cc,this,1)),kj(this.b,e,r);case 2:return!this.c&&(this.c=new Tl((dn(),Qa),cc,this,2)),kj(this.c,e,r);case 5:return!this.a&&(this.a=new is(this,0)),MWt(Bc(this.a,(Di(),cA)),e,r)}return s=u(yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():(Di(),Gw),n),66),s.Nj().Rj(this,Omt(this),n-Zn((Di(),Gw)),e,r)},l.lh=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new is(this,0)),!tj(Bc(this.a,(Di(),gN)));case 4:return!this.a&&(this.a=new is(this,0)),!tj(Bc(this.a,(Di(),pN)));case 5:return!this.a&&(this.a=new is(this,0)),!tj(Bc(this.a,(Di(),cA)));case 6:return!this.a&&(this.a=new is(this,0)),!tj(Bc(this.a,(Di(),uA)))}return sh(this,e-Zn((Di(),Gw)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():Gw,e))},l.sh=function(e,n){switch(e){case 0:!this.a&&(this.a=new is(this,0)),QM(this.a,n);return;case 1:!this.b&&(this.b=new Tl((dn(),Qa),cc,this,1)),lz(this.b,n);return;case 2:!this.c&&(this.c=new Tl((dn(),Qa),cc,this,2)),lz(this.c,n);return;case 3:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),gN))),!this.a&&(this.a=new is(this,0)),hC(Bc(this.a,gN),u(n,14));return;case 4:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),pN))),!this.a&&(this.a=new is(this,0)),hC(Bc(this.a,pN),u(n,14));return;case 5:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),cA))),!this.a&&(this.a=new is(this,0)),hC(Bc(this.a,cA),u(n,14));return;case 6:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),uA))),!this.a&&(this.a=new is(this,0)),hC(Bc(this.a,uA),u(n,14));return}fh(this,e-Zn((Di(),Gw)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():Gw,e),n)},l.zh=function(){return Di(),Gw},l.Bh=function(e){switch(e){case 0:!this.a&&(this.a=new is(this,0)),xr(this.a);return;case 1:!this.b&&(this.b=new Tl((dn(),Qa),cc,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new Tl((dn(),Qa),cc,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),gN)));return;case 4:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),pN)));return;case 5:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),cA)));return;case 6:!this.a&&(this.a=new is(this,0)),vx(Bc(this.a,(Di(),uA)));return}lh(this,e-Zn((Di(),Gw)),yn(this.j&2?(!this.k&&(this.k=new th),this.k).ck():Gw,e))},l.Ib=function(){var e;return this.j&4?bf(this):(e=new Th(bf(this)),e.a+=" (mixed: ",oC(e,this.a),e.a+=")",e.a)},P(ys,"XMLTypeDocumentRootImpl",669),I(1919,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1,2024:1},Em),l.Ih=function(e,n){switch(e.yj()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return n==null?null:$o(n);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return Br(n);case 6:return vQe(u(n,190));case 12:case 47:case 49:case 11:return Jle(this,e,n);case 13:return n==null?null:iyn(u(n,240));case 15:case 14:return n==null?null:gen(Xt(ye(n)));case 17:return nae((Di(),n));case 18:return nae(n);case 21:case 20:return n==null?null:pen(u(n,155).a);case 27:return wQe(u(n,190));case 30:return wse((Di(),u(n,15)));case 31:return wse(u(n,15));case 40:return yQe((Di(),n));case 42:return rae((Di(),n));case 43:return rae(n);case 59:case 48:return mQe((Di(),n));default:throw rt(new Pn(HE+e.ne()+kw))}},l.Jh=function(e){var n,r,s,o,h;switch(e.G==-1&&(e.G=(r=Fl(e),r?Fg(r.Mh(),e):-1)),e.G){case 0:return n=new $pt,n;case 1:return s=new vB,s;case 2:return o=new _qt,o;case 3:return h=new Cqt,h;default:throw rt(new Pn(Rct+e.zb+kw))}},l.Kh=function(e,n){var r,s,o,h,d,w,k,C,M,F,H,V,Y,tt,gt,Lt;switch(e.yj()){case 5:case 52:case 4:return n;case 6:return Nhn(n);case 8:case 7:return n==null?null:xdn(n);case 9:return n==null?null:EI($l((s=$c(n,!0),s.length>0&&(Rr(0,s.length),s.charCodeAt(0)==43)?s.substr(1):s),-128,127)<<24>>24);case 10:return n==null?null:EI($l((o=$c(n,!0),o.length>0&&(Rr(0,o.length),o.charCodeAt(0)==43)?o.substr(1):o),-128,127)<<24>>24);case 11:return Br(pw(this,(Di(),p5e),n));case 12:return Br(pw(this,(Di(),b5e),n));case 13:return n==null?null:new obt($c(n,!0));case 15:case 14:return qbn(n);case 16:return Br(pw(this,(Di(),v5e),n));case 17:return Tie((Di(),n));case 18:return Tie(n);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return $c(n,!0);case 21:case 20:return Qbn(n);case 22:return Br(pw(this,(Di(),w5e),n));case 23:return Br(pw(this,(Di(),m5e),n));case 24:return Br(pw(this,(Di(),y5e),n));case 25:return Br(pw(this,(Di(),x5e),n));case 26:return Br(pw(this,(Di(),k5e),n));case 27:return Lhn(n);case 30:return Cie((Di(),n));case 31:return Cie(n);case 32:return n==null?null:de($l((M=$c(n,!0),M.length>0&&(Rr(0,M.length),M.charCodeAt(0)==43)?M.substr(1):M),_a,vi));case 33:return n==null?null:new Np((F=$c(n,!0),F.length>0&&(Rr(0,F.length),F.charCodeAt(0)==43)?F.substr(1):F));case 34:return n==null?null:de($l((H=$c(n,!0),H.length>0&&(Rr(0,H.length),H.charCodeAt(0)==43)?H.substr(1):H),_a,vi));case 36:return n==null?null:g2(Sq((V=$c(n,!0),V.length>0&&(Rr(0,V.length),V.charCodeAt(0)==43)?V.substr(1):V)));case 37:return n==null?null:g2(Sq((Y=$c(n,!0),Y.length>0&&(Rr(0,Y.length),Y.charCodeAt(0)==43)?Y.substr(1):Y)));case 40:return Vln((Di(),n));case 42:return _ie((Di(),n));case 43:return _ie(n);case 44:return n==null?null:new Np((tt=$c(n,!0),tt.length>0&&(Rr(0,tt.length),tt.charCodeAt(0)==43)?tt.substr(1):tt));case 45:return n==null?null:new Np((gt=$c(n,!0),gt.length>0&&(Rr(0,gt.length),gt.charCodeAt(0)==43)?gt.substr(1):gt));case 46:return $c(n,!1);case 47:return Br(pw(this,(Di(),E5e),n));case 59:case 48:return Gln((Di(),n));case 49:return Br(pw(this,(Di(),T5e),n));case 50:return n==null?null:eE($l((Lt=$c(n,!0),Lt.length>0&&(Rr(0,Lt.length),Lt.charCodeAt(0)==43)?Lt.substr(1):Lt),MH,32767)<<16>>16);case 51:return n==null?null:eE($l((h=$c(n,!0),h.length>0&&(Rr(0,h.length),h.charCodeAt(0)==43)?h.substr(1):h),MH,32767)<<16>>16);case 53:return Br(pw(this,(Di(),C5e),n));case 55:return n==null?null:eE($l((d=$c(n,!0),d.length>0&&(Rr(0,d.length),d.charCodeAt(0)==43)?d.substr(1):d),MH,32767)<<16>>16);case 56:return n==null?null:eE($l((w=$c(n,!0),w.length>0&&(Rr(0,w.length),w.charCodeAt(0)==43)?w.substr(1):w),MH,32767)<<16>>16);case 57:return n==null?null:g2(Sq((k=$c(n,!0),k.length>0&&(Rr(0,k.length),k.charCodeAt(0)==43)?k.substr(1):k)));case 58:return n==null?null:g2(Sq((C=$c(n,!0),C.length>0&&(Rr(0,C.length),C.charCodeAt(0)==43)?C.substr(1):C)));case 60:return n==null?null:de($l((r=$c(n,!0),r.length>0&&(Rr(0,r.length),r.charCodeAt(0)==43)?r.substr(1):r),_a,vi));case 61:return n==null?null:de($l($c(n,!0),_a,vi));default:throw rt(new Pn(HE+e.ne()+kw))}};var S5e,vLt,A5e,wLt;P(ys,"XMLTypeFactoryImpl",1919),I(586,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1,1945:1,586:1},hXt),l.N=!1,l.O=!1;var L5e=!1;P(ys,"XMLTypePackageImpl",586),I(1852,1,{837:1},ix),l._j=function(){return txt(),R5e},P(ys,"XMLTypePackageImpl/1",1852),I(1861,1,ii,h1),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/10",1861),I(1862,1,ii,wB),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/11",1862),I(1863,1,ii,mB),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/12",1863),I(1864,1,ii,yB),l.wj=function(e){return Nm(e)},l.xj=function(e){return Pt(ca,te,333,e,7,1)},P(ys,"XMLTypePackageImpl/13",1864),I(1865,1,ii,xB),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/14",1865),I(1866,1,ii,kB),l.wj=function(e){return Et(e,15)},l.xj=function(e){return Pt(ph,xy,15,e,0,1)},P(ys,"XMLTypePackageImpl/15",1866),I(1867,1,ii,EB),l.wj=function(e){return Et(e,15)},l.xj=function(e){return Pt(ph,xy,15,e,0,1)},P(ys,"XMLTypePackageImpl/16",1867),I(1868,1,ii,jf),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/17",1868),I(1869,1,ii,hu),l.wj=function(e){return Et(e,155)},l.xj=function(e){return Pt(XE,te,155,e,0,1)},P(ys,"XMLTypePackageImpl/18",1869),I(1870,1,ii,vJ),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/19",1870),I(1853,1,ii,wJ),l.wj=function(e){return Et(e,843)},l.xj=function(e){return Pt(fN,Ie,843,e,0,1)},P(ys,"XMLTypePackageImpl/2",1853),I(1871,1,ii,mJ),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/20",1871),I(1872,1,ii,fu),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/21",1872),I(1873,1,ii,s9),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/22",1873),I(1874,1,ii,TB),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/23",1874),I(1875,1,ii,CB),l.wj=function(e){return Et(e,190)},l.xj=function(e){return Pt(Hu,te,190,e,0,2)},P(ys,"XMLTypePackageImpl/24",1875),I(1876,1,ii,sx),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/25",1876),I(1877,1,ii,yJ),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/26",1877),I(1878,1,ii,Dk),l.wj=function(e){return Et(e,15)},l.xj=function(e){return Pt(ph,xy,15,e,0,1)},P(ys,"XMLTypePackageImpl/27",1878),I(1879,1,ii,xJ),l.wj=function(e){return Et(e,15)},l.xj=function(e){return Pt(ph,xy,15,e,0,1)},P(ys,"XMLTypePackageImpl/28",1879),I(1880,1,ii,_B),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/29",1880),I(1854,1,ii,kJ),l.wj=function(e){return Et(e,667)},l.xj=function(e){return Pt(cU,Ie,2021,e,0,1)},P(ys,"XMLTypePackageImpl/3",1854),I(1881,1,ii,EJ),l.wj=function(e){return Et(e,19)},l.xj=function(e){return Pt(ja,te,19,e,0,1)},P(ys,"XMLTypePackageImpl/30",1881),I(1882,1,ii,a9),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/31",1882),I(1883,1,ii,SB),l.wj=function(e){return Et(e,162)},l.xj=function(e){return Pt(Tw,te,162,e,0,1)},P(ys,"XMLTypePackageImpl/32",1883),I(1884,1,ii,zL),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/33",1884),I(1885,1,ii,o9),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/34",1885),I(1886,1,ii,TJ),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/35",1886),I(1887,1,ii,CJ),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/36",1887),I(1888,1,ii,qL),l.wj=function(e){return Et(e,15)},l.xj=function(e){return Pt(ph,xy,15,e,0,1)},P(ys,"XMLTypePackageImpl/37",1888),I(1889,1,ii,c9),l.wj=function(e){return Et(e,15)},l.xj=function(e){return Pt(ph,xy,15,e,0,1)},P(ys,"XMLTypePackageImpl/38",1889),I(1890,1,ii,f1),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/39",1890),I(1855,1,ii,Ok),l.wj=function(e){return Et(e,668)},l.xj=function(e){return Pt(dN,Ie,2022,e,0,1)},P(ys,"XMLTypePackageImpl/4",1855),I(1891,1,ii,_J),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/40",1891),I(1892,1,ii,Nk),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/41",1892),I(1893,1,ii,HL),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/42",1893),I(1894,1,ii,Hb),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/43",1894),I(1895,1,ii,u9),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/44",1895),I(1896,1,ii,GL),l.wj=function(e){return Et(e,184)},l.xj=function(e){return Pt(Cw,te,184,e,0,1)},P(ys,"XMLTypePackageImpl/45",1896),I(1897,1,ii,$f),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/46",1897),I(1898,1,ii,l9),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/47",1898),I(1899,1,ii,d1),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/48",1899),I(nb,1,ii,g1),l.wj=function(e){return Et(e,184)},l.xj=function(e){return Pt(Cw,te,184,e,0,1)},P(ys,"XMLTypePackageImpl/49",nb),I(1856,1,ii,SJ),l.wj=function(e){return Et(e,669)},l.xj=function(e){return Pt(pLt,Ie,2023,e,0,1)},P(ys,"XMLTypePackageImpl/5",1856),I(1901,1,ii,AJ),l.wj=function(e){return Et(e,162)},l.xj=function(e){return Pt(Tw,te,162,e,0,1)},P(ys,"XMLTypePackageImpl/50",1901),I(1902,1,ii,A3),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/51",1902),I(1903,1,ii,Pk),l.wj=function(e){return Et(e,19)},l.xj=function(e){return Pt(ja,te,19,e,0,1)},P(ys,"XMLTypePackageImpl/52",1903),I(1857,1,ii,Fk),l.wj=function(e){return ea(e)},l.xj=function(e){return Pt(Ae,te,2,e,6,1)},P(ys,"XMLTypePackageImpl/6",1857),I(1858,1,ii,h9),l.wj=function(e){return Et(e,190)},l.xj=function(e){return Pt(Hu,te,190,e,0,2)},P(ys,"XMLTypePackageImpl/7",1858),I(1859,1,ii,LJ),l.wj=function(e){return Om(e)},l.xj=function(e){return Pt(Bs,te,476,e,8,1)},P(ys,"XMLTypePackageImpl/8",1859),I(1860,1,ii,ax),l.wj=function(e){return Et(e,217)},l.xj=function(e){return Pt(E6,te,217,e,0,1)},P(ys,"XMLTypePackageImpl/9",1860);var U1,rp,lA,uU,vt;I(50,60,U0,Fr),P(Vg,"RegEx/ParseException",50),I(820,1,{},VL),l.sl=function(e){return er*16)throw rt(new Fr(qr((Nr(),Qde))));r=r*16+o}while(!0);if(this.a!=125)throw rt(new Fr(qr((Nr(),Zde))));if(r>WE)throw rt(new Fr(qr((Nr(),Jde))));e=r}else{if(o=0,this.c!=0||(o=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(r=o,fi(this),this.c!=0||(o=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));r=r*16+o,e=r}break;case 117:if(s=0,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=n*16+s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=n*16+s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));n=n*16+s,e=n;break;case 118:if(fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=n*16+s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=n*16+s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=n*16+s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=n*16+s,fi(this),this.c!=0||(s=b2(this.a))<0)throw rt(new Fr(qr((Nr(),Gg))));if(n=n*16+s,n>WE)throw rt(new Fr(qr((Nr(),"parser.descappe.4"))));e=n;break;case 65:case 90:case 122:throw rt(new Fr(qr((Nr(),t0e))))}return e},l.ul=function(e){var n,r;switch(e){case 100:r=(this.e&32)==32?tb("Nd",!0):(gi(),lU);break;case 68:r=(this.e&32)==32?tb("Nd",!1):(gi(),TLt);break;case 119:r=(this.e&32)==32?tb("IsWord",!0):(gi(),N7);break;case 87:r=(this.e&32)==32?tb("IsWord",!1):(gi(),_Lt);break;case 115:r=(this.e&32)==32?tb("IsSpace",!0):(gi(),K6);break;case 83:r=(this.e&32)==32?tb("IsSpace",!1):(gi(),CLt);break;default:throw rt(new Go((n=e,tge+n.toString(16))))}return r},l.vl=function(e){var n,r,s,o,h,d,w,k,C,M,F,H;for(this.b=1,fi(this),n=null,this.c==0&&this.a==94?(fi(this),e?M=(gi(),gi(),new Nl(5)):(n=(gi(),gi(),new Nl(4)),jc(n,0,WE),M=new Nl(4))):M=(gi(),gi(),new Nl(4)),o=!0;(H=this.c)!=1&&!(H==0&&this.a==93&&!o);){if(o=!1,r=this.a,s=!1,H==10)switch(r){case 100:case 68:case 119:case 87:case 115:case 83:vy(M,this.ul(r)),s=!0;break;case 105:case 73:case 99:case 67:r=this.Ll(M,r),r<0&&(s=!0);break;case 112:case 80:if(F=n5t(this,r),!F)throw rt(new Fr(qr((Nr(),Qct))));vy(M,F),s=!0;break;default:r=this.tl()}else if(H==20){if(d=l8(this.i,58,this.d),d<0)throw rt(new Fr(qr((Nr(),_8t))));if(w=!0,ba(this.i,this.d)==94&&(++this.d,w=!1),h=Dl(this.i,this.d,d),k=fte(h,w,(this.e&512)==512),!k)throw rt(new Fr(qr((Nr(),Ude))));if(vy(M,k),s=!0,d+1>=this.j||ba(this.i,d+1)!=93)throw rt(new Fr(qr((Nr(),_8t))));this.d=d+2}if(fi(this),!s)if(this.c!=0||this.a!=45)jc(M,r,r);else{if(fi(this),(H=this.c)==1)throw rt(new Fr(qr((Nr(),EH))));H==0&&this.a==93?(jc(M,r,r),jc(M,45,45)):(C=this.a,H==10&&(C=this.tl()),fi(this),jc(M,r,C))}(this.e&wf)==wf&&this.c==0&&this.a==44&&fi(this)}if(this.c==1)throw rt(new Fr(qr((Nr(),EH))));return n&&(__(n,M),M=n),b4(M),T_(M),this.b=0,fi(this),M},l.wl=function(){var e,n,r,s;for(r=this.vl(!1);(s=this.c)!=7;)if(e=this.a,s==0&&(e==45||e==38)||s==4){if(fi(this),this.c!=9)throw rt(new Fr(qr((Nr(),Kde))));if(n=this.vl(!1),s==4)vy(r,n);else if(e==45)__(r,n);else if(e==38)Wle(r,n);else throw rt(new Go("ASSERT"))}else throw rt(new Fr(qr((Nr(),Yde))));return fi(this),r},l.xl=function(){var e,n;return e=this.a-48,n=(gi(),gi(),new hrt(12,null,e)),!this.g&&(this.g=new fR),hR(this.g,new ypt(e)),fi(this),n},l.yl=function(){return fi(this),gi(),D5e},l.zl=function(){return fi(this),gi(),I5e},l.Al=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Bl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Cl=function(){return fi(this),Ucn()},l.Dl=function(){return fi(this),gi(),N5e},l.El=function(){return fi(this),gi(),F5e},l.Fl=function(){var e;if(this.d>=this.j||((e=ba(this.i,this.d++))&65504)!=64)throw rt(new Fr(qr((Nr(),Hde))));return fi(this),gi(),gi(),new Vd(0,e-64)},l.Gl=function(){return fi(this),Lmn()},l.Hl=function(){return fi(this),gi(),B5e},l.Il=function(){var e;return e=(gi(),gi(),new Vd(0,105)),fi(this),e},l.Jl=function(){return fi(this),gi(),P5e},l.Kl=function(){return fi(this),gi(),O5e},l.Ll=function(e,n){return this.tl()},l.Ml=function(){return fi(this),gi(),kLt},l.Nl=function(){var e,n,r,s,o;if(this.d+1>=this.j)throw rt(new Fr(qr((Nr(),$de))));if(s=-1,n=null,e=ba(this.i,this.d),49<=e&&e<=57){if(s=e-48,!this.g&&(this.g=new fR),hR(this.g,new ypt(s)),++this.d,ba(this.i,this.d)!=41)throw rt(new Fr(qr((Nr(),A2))));++this.d}else switch(e==63&&--this.d,fi(this),n=Cxt(this),n.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw rt(new Fr(qr((Nr(),A2))));break;default:throw rt(new Fr(qr((Nr(),zde))))}if(fi(this),o=sw(this),r=null,o.e==2){if(o.em()!=2)throw rt(new Fr(qr((Nr(),qde))));r=o.am(1),o=o.am(0)}if(this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),gi(),gi(),new Gte(s,n,o,r)},l.Ol=function(){return fi(this),gi(),ELt},l.Pl=function(){var e;if(fi(this),e=Wj(24,sw(this)),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),e},l.Ql=function(){var e;if(fi(this),e=Wj(20,sw(this)),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),e},l.Rl=function(){var e;if(fi(this),e=Wj(22,sw(this)),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),e},l.Sl=function(){var e,n,r,s,o;for(e=0,r=0,n=-1;this.d=this.j)throw rt(new Fr(qr((Nr(),T8t))));if(n==45){for(++this.d;this.d=this.j)throw rt(new Fr(qr((Nr(),T8t))))}if(n==58){if(++this.d,fi(this),s=YYt(sw(this),e,r),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));fi(this)}else if(n==41)++this.d,fi(this),s=YYt(sw(this),e,r);else throw rt(new Fr(qr((Nr(),jde))));return s},l.Tl=function(){var e;if(fi(this),e=Wj(21,sw(this)),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),e},l.Ul=function(){var e;if(fi(this),e=Wj(23,sw(this)),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),e},l.Vl=function(){var e,n;if(fi(this),e=this.f++,n=Rnt(sw(this),e),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),n},l.Wl=function(){var e;if(fi(this),e=Rnt(sw(this),0),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),e},l.Xl=function(e){return fi(this),this.c==5?(fi(this),Bj(e,(gi(),gi(),new Wm(9,e)))):Bj(e,(gi(),gi(),new Wm(3,e)))},l.Yl=function(e){var n;return fi(this),n=(gi(),gi(),new lC(2)),this.c==5?(fi(this),m2(n,fA),m2(n,e)):(m2(n,e),m2(n,fA)),n},l.Zl=function(e){return fi(this),this.c==5?(fi(this),gi(),gi(),new Wm(9,e)):(gi(),gi(),new Wm(3,e))},l.a=0,l.b=0,l.c=0,l.d=0,l.e=0,l.f=1,l.g=null,l.j=0,P(Vg,"RegEx/RegexParser",820),I(1824,820,{},Sqt),l.sl=function(e){return!1},l.tl=function(){return F5t(this)},l.ul=function(e){return kE(e)},l.vl=function(e){return jhe(this)},l.wl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.xl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.yl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.zl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Al=function(){return fi(this),kE(67)},l.Bl=function(){return fi(this),kE(73)},l.Cl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Dl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.El=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Fl=function(){return fi(this),kE(99)},l.Gl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Hl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Il=function(){return fi(this),kE(105)},l.Jl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Kl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Ll=function(e,n){return vy(e,kE(n)),-1},l.Ml=function(){return fi(this),gi(),gi(),new Vd(0,94)},l.Nl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Ol=function(){return fi(this),gi(),gi(),new Vd(0,36)},l.Pl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Ql=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Rl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Sl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Tl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Ul=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Vl=function(){var e;if(fi(this),e=Rnt(sw(this),0),this.c!=7)throw rt(new Fr(qr((Nr(),A2))));return fi(this),e},l.Wl=function(){throw rt(new Fr(qr((Nr(),gh))))},l.Xl=function(e){return fi(this),Bj(e,(gi(),gi(),new Wm(3,e)))},l.Yl=function(e){var n;return fi(this),n=(gi(),gi(),new lC(2)),m2(n,e),m2(n,fA),n},l.Zl=function(e){return fi(this),gi(),gi(),new Wm(3,e)};var h5=null,D7=null;P(Vg,"RegEx/ParserForXMLSchema",1824),I(117,1,KE,vv),l.$l=function(e){throw rt(new Go("Not supported."))},l._l=function(){return-1},l.am=function(e){return null},l.bm=function(){return null},l.cm=function(e){},l.dm=function(e){},l.em=function(){return 0},l.Ib=function(){return this.fm(0)},l.fm=function(e){return this.e==11?".":""},l.e=0;var mLt,O7,hA,M5e,yLt,n3=null,lU,Dft=null,xLt,fA,Oft=null,kLt,ELt,TLt,CLt,_Lt,I5e,K6,D5e,O5e,N5e,P5e,N7,F5e,B5e,Exn=P(Vg,"RegEx/Token",117);I(136,117,{3:1,136:1,117:1},Nl),l.fm=function(e){var n,r,s;if(this.e==4)if(this==xLt)r=".";else if(this==lU)r="\\d";else if(this==N7)r="\\w";else if(this==K6)r="\\s";else{for(s=new xg,s.a+="[",n=0;n0&&(s.a+=","),this.b[n]===this.b[n+1]?fo(s,xD(this.b[n])):(fo(s,xD(this.b[n])),s.a+="-",fo(s,xD(this.b[n+1])));s.a+="]",r=s.a}else if(this==TLt)r="\\D";else if(this==_Lt)r="\\W";else if(this==CLt)r="\\S";else{for(s=new xg,s.a+="[^",n=0;n0&&(s.a+=","),this.b[n]===this.b[n+1]?fo(s,xD(this.b[n])):(fo(s,xD(this.b[n])),s.a+="-",fo(s,xD(this.b[n+1])));s.a+="]",r=s.a}return r},l.a=!1,l.c=!1,P(Vg,"RegEx/RangeToken",136),I(584,1,{584:1},ypt),l.a=0,P(Vg,"RegEx/RegexParser/ReferencePosition",584),I(583,1,{3:1,583:1},RHt),l.Fb=function(e){var n;return e==null||!Et(e,583)?!1:(n=u(e,583),hn(this.b,n.b)&&this.a==n.a)},l.Hb=function(){return Bg(this.b+"/"+M5t(this.a))},l.Ib=function(){return this.c.fm(this.a)},l.a=0,P(Vg,"RegEx/RegularExpression",583),I(223,117,KE,Vd),l._l=function(){return this.a},l.fm=function(e){var n,r,s;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:s="\\"+hnt(this.a&ms);break;case 12:s="\\f";break;case 10:s="\\n";break;case 13:s="\\r";break;case 9:s="\\t";break;case 27:s="\\e";break;default:this.a>=Ya?(r=(n=this.a>>>0,"0"+n.toString(16)),s="\\v"+Dl(r,r.length-6,r.length)):s=""+hnt(this.a&ms)}break;case 8:this==kLt||this==ELt?s=""+hnt(this.a&ms):s="\\"+hnt(this.a&ms);break;default:s=null}return s},l.a=0,P(Vg,"RegEx/Token/CharToken",223),I(309,117,KE,Wm),l.am=function(e){return this.a},l.cm=function(e){this.b=e},l.dm=function(e){this.c=e},l.em=function(){return 1},l.fm=function(e){var n;if(this.e==3)if(this.c<0&&this.b<0)n=this.a.fm(e)+"*";else if(this.c==this.b)n=this.a.fm(e)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)n=this.a.fm(e)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)n=this.a.fm(e)+"{"+this.c+",}";else throw rt(new Go("Token#toString(): CLOSURE "+this.c+Ka+this.b));else if(this.c<0&&this.b<0)n=this.a.fm(e)+"*?";else if(this.c==this.b)n=this.a.fm(e)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)n=this.a.fm(e)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)n=this.a.fm(e)+"{"+this.c+",}?";else throw rt(new Go("Token#toString(): NONGREEDYCLOSURE "+this.c+Ka+this.b));return n},l.b=0,l.c=0,P(Vg,"RegEx/Token/ClosureToken",309),I(821,117,KE,fwt),l.am=function(e){return e==0?this.a:this.b},l.em=function(){return 2},l.fm=function(e){var n;return this.b.e==3&&this.b.am(0)==this.a?n=this.a.fm(e)+"+":this.b.e==9&&this.b.am(0)==this.a?n=this.a.fm(e)+"+?":n=this.a.fm(e)+(""+this.b.fm(e)),n},P(Vg,"RegEx/Token/ConcatToken",821),I(1822,117,KE,Gte),l.am=function(e){if(e==0)return this.d;if(e==1)return this.b;throw rt(new Go("Internal Error: "+e))},l.em=function(){return this.b?2:1},l.fm=function(e){var n;return this.c>0?n="(?("+this.c+")":this.a.e==8?n="(?("+this.a+")":n="(?"+this.a,this.b?n+=this.d+"|"+this.b+")":n+=this.d+")",n},l.c=0,P(Vg,"RegEx/Token/ConditionToken",1822),I(1823,117,KE,GQt),l.am=function(e){return this.b},l.em=function(){return 1},l.fm=function(e){return"(?"+(this.a==0?"":M5t(this.a))+(this.c==0?"":M5t(this.c))+":"+this.b.fm(e)+")"},l.a=0,l.c=0,P(Vg,"RegEx/Token/ModifierToken",1823),I(822,117,KE,wwt),l.am=function(e){return this.a},l.em=function(){return 1},l.fm=function(e){var n;switch(n=null,this.e){case 6:this.b==0?n="(?:"+this.a.fm(e)+")":n="("+this.a.fm(e)+")";break;case 20:n="(?="+this.a.fm(e)+")";break;case 21:n="(?!"+this.a.fm(e)+")";break;case 22:n="(?<="+this.a.fm(e)+")";break;case 23:n="(?"+this.a.fm(e)+")"}return n},l.b=0,P(Vg,"RegEx/Token/ParenToken",822),I(521,117,{3:1,117:1,521:1},hrt),l.bm=function(){return this.b},l.fm=function(e){return this.e==12?"\\"+this.a:Bpn(this.b)},l.a=0,P(Vg,"RegEx/Token/StringToken",521),I(465,117,KE,lC),l.$l=function(e){m2(this,e)},l.am=function(e){return u(Rv(this.a,e),117)},l.em=function(){return this.a?this.a.a.c.length:0},l.fm=function(e){var n,r,s,o,h;if(this.e==1){if(this.a.a.c.length==2)n=u(Rv(this.a,0),117),r=u(Rv(this.a,1),117),r.e==3&&r.am(0)==n?o=n.fm(e)+"+":r.e==9&&r.am(0)==n?o=n.fm(e)+"+?":o=n.fm(e)+(""+r.fm(e));else{for(h=new xg,s=0;s=this.c.b:this.a<=this.c.b},l.Sb=function(){return this.b>0},l.Tb=function(){return this.b},l.Vb=function(){return this.b-1},l.Qb=function(){throw rt(new yg(oge))},l.a=0,l.b=0,P(V8t,"ExclusiveRange/RangeIterator",254);var mh=y8(TH,"C"),Tr=y8(tS,"I"),dl=y8(u6,"Z"),Lb=y8(eS,"J"),Hu=y8(Q_,"B"),ia=y8(Z_,"D"),r3=y8(J_,"F"),f5=y8(nS,"S"),Txn=Yi("org.eclipse.elk.core.labels","ILabelManager"),SLt=Yi(Ra,"DiagnosticChain"),ALt=Yi(P0e,"ResourceSet"),LLt=P(Ra,"InvocationTargetException",null),j5e=(vR(),psn),$5e=$5e=idn;lon(rKe),Fon("permProps",[[[BH,RH],[jH,"gecko1_8"]],[[BH,RH],[jH,"ie10"]],[[BH,RH],[jH,"ie8"]],[[BH,RH],[jH,"ie9"]],[[BH,RH],[jH,"safari"]]]),$5e(null,"elk",null)}).call(this)}).call(this,typeof d0<"u"?d0:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(f,p,v){function m(N,B){if(!(N instanceof B))throw new TypeError("Cannot call a class as a function")}function b(N,B){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:N}function E(N,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);N.prototype=Object.create(B&&B.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(N,B):N.__proto__=B)}var _=f("./elk-api.js").default,L=function(N){E(B,N);function B(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};m(this,B);var R=Object.assign({},j),z=!1;try{f.resolve("web-worker"),z=!0}catch{}if(j.workerUrl)if(z){var K=f("web-worker");R.workerFactory=function(ut){return new K(ut)}}else console.warn(`Web worker requested but 'web-worker' package not installed. +Consider installing the package or pass your own 'workerFactory' to ELK's constructor. +... Falling back to non-web worker version.`);if(!R.workerFactory){var it=f("./elk-worker.min.js"),st=it.Worker;R.workerFactory=function(ut){return new st(ut)}}return b(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,R))}return B}(_);Object.defineProperty(p.exports,"__esModule",{value:!0}),p.exports=L,L.default=L},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(f,p,v){p.exports=Worker},{}]},{},[3])(3)})})(kjt);var cUe=kjt.exports;const uUe=B7(cUe),Ejt=new uUe;let iv={};const lUe={};let P5={};const hUe=async function(i,a,f,p,v,m,b){const _=f.select(`[id="${a}"]`).insert("g").attr("class","nodes"),L=Object.keys(i);return await Promise.all(L.map(async function(N){const B=i[N];let j="default";B.classes.length>0&&(j=B.classes.join(" ")),j=j+" flowchart-label";const R=em(B.styles);let z=B.text!==void 0?B.text:B.id;const K={width:0,height:0},it=[{id:B.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:B.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:B.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:B.id+"-north",layoutOptions:{"port.side":"NORTH"}}];let st=0,ut="",bt={};switch(B.type){case"round":st=5,ut="rect";break;case"square":ut="rect";break;case"diamond":ut="question",bt={portConstraints:"FIXED_SIDE"};break;case"hexagon":ut="hexagon";break;case"odd":ut="rect_left_inv_arrow";break;case"lean_right":ut="lean_right";break;case"lean_left":ut="lean_left";break;case"trapezoid":ut="trapezoid";break;case"inv_trapezoid":ut="inv_trapezoid";break;case"odd_right":ut="rect_left_inv_arrow";break;case"circle":ut="circle";break;case"ellipse":ut="ellipse";break;case"stadium":ut="stadium";break;case"subroutine":ut="subroutine";break;case"cylinder":ut="cylinder";break;case"group":ut="rect";break;case"doublecircle":ut="doublecircle";break;default:ut="rect"}const mt={labelStyle:R.labelStyle,shape:ut,labelText:z,labelType:B.labelType,rx:st,ry:st,class:j,style:R.style,id:B.id,link:B.link,linkTarget:B.linkTarget,tooltip:v.db.getTooltip(B.id)||"",domId:v.db.lookUpDomId(B.id),haveCallback:B.haveCallback,width:B.type==="group"?500:void 0,dir:B.dir,type:B.type,props:B.props,padding:Le().flowchart.padding};let yt,dt;if(mt.type!=="group")dt=await xBt(_,mt,B.dir),yt=dt.node().getBBox();else{p.createElementNS("http://www.w3.org/2000/svg","text");const{shapeSvg:wt,bbox:X}=await Od(_,mt,void 0,!0);K.width=X.width,K.wrappingWidth=Le().flowchart.wrappingWidth,K.height=X.height,K.labelNode=wt.node(),mt.labelData=K}const ht={id:B.id,ports:B.type==="diamond"?it:[],layoutOptions:bt,labelText:z,labelData:K,domId:v.db.lookUpDomId(B.id),width:yt==null?void 0:yt.width,height:yt==null?void 0:yt.height,type:B.type,el:dt,parent:m.parentById[B.id]};P5[mt.id]=ht})),b},Tjt=(i,a,f)=>{const p={TB:{in:{north:"north"},out:{south:"west",west:"east",east:"south"}},LR:{in:{west:"west"},out:{east:"south",south:"north",north:"east"}},RL:{in:{east:"east"},out:{west:"north",north:"south",south:"west"}},BT:{in:{south:"south"},out:{north:"east",east:"west",west:"north"}}};return p.TD=p.TB,Ut.info("abc88",f,a,i),p[f][a][i]},Cjt=(i,a,f)=>{if(Ut.info("getNextPort abc88",{node:i,edgeDirection:a,graphDirection:f}),!iv[i])switch(f){case"TB":case"TD":iv[i]={inPosition:"north",outPosition:"south"};break;case"BT":iv[i]={inPosition:"south",outPosition:"north"};break;case"RL":iv[i]={inPosition:"east",outPosition:"west"};break;case"LR":iv[i]={inPosition:"west",outPosition:"east"};break}const p=a==="in"?iv[i].inPosition:iv[i].outPosition;return a==="in"?iv[i].inPosition=Tjt(iv[i].inPosition,a,f):iv[i].outPosition=Tjt(iv[i].outPosition,a,f),p},fUe=(i,a)=>{let f=i.start,p=i.end;const v=f,m=p,b=P5[f],E=P5[p];return!b||!E?{source:f,target:p}:(b.type==="diamond"&&(f=`${f}-${Cjt(f,"out",a)}`),E.type==="diamond"&&(p=`${p}-${Cjt(p,"in",a)}`),{source:f,target:p,sourceId:v,targetId:m})},dUe=function(i,a,f,p){Ut.info("abc78 edges = ",i);const v=p.insert("g").attr("class","edgeLabels");let m={},b=a.db.getDirection(),E,_;if(i.defaultStyle!==void 0){const L=em(i.defaultStyle);E=L.style,_=L.labelStyle}return i.forEach(function(L){const N="L-"+L.start+"-"+L.end;m[N]===void 0?(m[N]=0,Ut.info("abc78 new entry",N,m[N])):(m[N]++,Ut.info("abc78 new entry",N,m[N]));let B=N+"-"+m[N];Ut.info("abc78 new link id to be used is",N,B,m[N]);const j="LS-"+L.start,R="LE-"+L.end,z={style:"",labelStyle:""};switch(z.minlen=L.length||1,L.type==="arrow_open"?z.arrowhead="none":z.arrowhead="normal",z.arrowTypeStart="arrow_open",z.arrowTypeEnd="arrow_open",L.type){case"double_arrow_cross":z.arrowTypeStart="arrow_cross";case"arrow_cross":z.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":z.arrowTypeStart="arrow_point";case"arrow_point":z.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":z.arrowTypeStart="arrow_circle";case"arrow_circle":z.arrowTypeEnd="arrow_circle";break}let K="",it="";switch(L.stroke){case"normal":K="fill:none;",E!==void 0&&(K=E),_!==void 0&&(it=_),z.thickness="normal",z.pattern="solid";break;case"dotted":z.thickness="normal",z.pattern="dotted",z.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":z.thickness="thick",z.pattern="solid",z.style="stroke-width: 3.5px;fill:none;";break}if(L.style!==void 0){const dt=em(L.style);K=dt.style,it=dt.labelStyle}z.style=z.style+=K,z.labelStyle=z.labelStyle+=it,L.interpolate!==void 0?z.curve=X2(L.interpolate,ig):i.defaultInterpolate!==void 0?z.curve=X2(i.defaultInterpolate,ig):z.curve=X2(lUe.curve,ig),L.text===void 0?L.style!==void 0&&(z.arrowheadStyle="fill: #333"):(z.arrowheadStyle="fill: #333",z.labelpos="c"),z.labelType=L.labelType,z.label=L.text.replace(Yr.lineBreakRegex,` +`),L.style===void 0&&(z.style=z.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),z.labelStyle=z.labelStyle.replace("color:","fill:"),z.id=B,z.classes="flowchart-link "+j+" "+R;const st=CBt(v,z),{source:ut,target:bt,sourceId:mt,targetId:yt}=fUe(L,b);Ut.debug("abc78 source and target",ut,bt),f.edges.push({id:"e"+L.start+L.end,sources:[ut],targets:[bt],sourceId:mt,targetId:yt,labelEl:st,labels:[{width:z.width,height:z.height,orgWidth:z.width,orgHeight:z.height,text:z.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:z})}),f},gUe=function(i,a,f,p,v){let m="";switch(p&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),a.arrowTypeStart){case"arrow_cross":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-crossStart)");break;case"arrow_point":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-pointStart)");break;case"arrow_barb":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-barbStart)");break;case"arrow_circle":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-circleStart)");break;case"aggregation":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-aggregationStart)");break;case"extension":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-extensionStart)");break;case"composition":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-compositionStart)");break;case"dependency":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-dependencyStart)");break;case"lollipop":i.attr("marker-start","url("+m+"#"+v+"_"+f+"-lollipopStart)");break}switch(a.arrowTypeEnd){case"arrow_cross":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-crossEnd)");break;case"arrow_point":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-pointEnd)");break;case"arrow_barb":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-barbEnd)");break;case"arrow_circle":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-circleEnd)");break;case"aggregation":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-aggregationEnd)");break;case"extension":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-extensionEnd)");break;case"composition":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-compositionEnd)");break;case"dependency":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-dependencyEnd)");break;case"lollipop":i.attr("marker-end","url("+m+"#"+v+"_"+f+"-lollipopEnd)");break}},pUe=function(i,a){return Ut.info("Extracting classes"),a.db.getClasses()},bUe=function(i){const a={parentById:{},childrenById:{}},f=i.getSubGraphs();return Ut.info("Subgraphs - ",f),f.forEach(function(p){p.nodes.forEach(function(v){a.parentById[v]=p.id,a.childrenById[p.id]===void 0&&(a.childrenById[p.id]=[]),a.childrenById[p.id].push(v)})}),f.forEach(function(p){p.id,a.parentById[p.id]!==void 0&&a.parentById[p.id]}),a},vUe=function(i,a,f){const p=oUe(i,a,f);if(p===void 0||p==="root")return{x:0,y:0};const v=P5[p].offset;return{x:v.posX,y:v.posY}},wUe=function(i,a,f,p,v,m){const b=vUe(a.sourceId,a.targetId,v),E=a.sections[0].startPoint,_=a.sections[0].endPoint,N=(a.sections[0].bendPoints?a.sections[0].bendPoints:[]).map(bt=>[bt.x+b.x,bt.y+b.y]),B=[[E.x+b.x,E.y+b.y],...N,[_.x+b.x,_.y+b.y]],{x:j,y:R}=TBt(a.edgeData),z=Z7().x(j).y(R).curve(ig),K=i.insert("path").attr("d",z(B)).attr("class","path "+f.classes).attr("fill","none"),it=i.insert("g").attr("class","edgeLabel"),st=yr(it.node().appendChild(a.labelEl)),ut=st.node().firstChild.getBoundingClientRect();st.attr("width",ut.width),st.attr("height",ut.height),it.attr("transform",`translate(${a.labels[0].x+b.x}, ${a.labels[0].y+b.y})`),gUe(K,f,p.type,p.arrowMarkerAbsolute,m)},_jt=(i,a)=>{i.forEach(f=>{f.children||(f.children=[]);const p=a.childrenById[f.id];p&&p.forEach(v=>{f.children.push(P5[v])}),_jt(f.children,a)})},mUe=async function(i,a,f,p){var ht;P5={},iv={};const v=yr("body").append("div").attr("style","height:400px").attr("id","cy");let m={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","org.eclipse.elk.padding":"[top=100, left=100, bottom=110, right=110]","elk.layered.spacing.edgeNodeBetweenLayers":"30","elk.direction":"DOWN"},children:[],edges:[]};switch(Ut.info("Drawing flowchart using v3 renderer",Ejt),p.db.getDirection()){case"BT":m.layoutOptions["elk.direction"]="UP";break;case"TB":m.layoutOptions["elk.direction"]="DOWN";break;case"LR":m.layoutOptions["elk.direction"]="RIGHT";break;case"RL":m.layoutOptions["elk.direction"]="LEFT";break}const{securityLevel:E,flowchart:_}=Le();let L;E==="sandbox"&&(L=yr("#i"+a));const N=yr(E==="sandbox"?L.nodes()[0].contentDocument.body:"body"),B=E==="sandbox"?L.nodes()[0].contentDocument:document,j=N.select(`[id="${a}"]`);IFt(j,["point","circle","cross"],p.type,a);const z=p.db.getVertices();let K;const it=p.db.getSubGraphs();Ut.info("Subgraphs - ",it);for(let wt=it.length-1;wt>=0;wt--)K=it[wt],p.db.addVertex(K.id,{text:K.title,type:K.labelType},"group",void 0,K.classes,K.dir);const st=j.insert("g").attr("class","subgraphs"),ut=bUe(p.db);m=await hUe(z,a,N,B,p,ut,m);const bt=j.insert("g").attr("class","edges edgePath"),mt=p.db.getEdges();m=dUe(mt,p,m,j),Object.keys(P5).forEach(wt=>{const X=P5[wt];X.parent||m.children.push(X),ut.childrenById[wt]!==void 0&&(X.labels=[{text:X.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:X.labelData.width,height:X.labelData.height}],delete X.x,delete X.y,delete X.width,delete X.height)}),_jt(m.children,ut),Ut.info("after layout",JSON.stringify(m,null,2));const dt=await Ejt.layout(m);Sjt(0,0,dt.children,j,st,p,0),Ut.info("after layout",dt),(ht=dt.edges)==null||ht.map(wt=>{wUe(bt,wt,wt.edgeData,p,ut,a)}),cT({},j,_.diagramPadding,_.useMaxWidth),v.remove()},Sjt=(i,a,f,p,v,m,b)=>{f.forEach(function(E){if(E)if(P5[E.id].offset={posX:E.x+i,posY:E.y+a,x:i,y:a,depth:b,width:E.width,height:E.height},E.type==="group"){const _=v.insert("g").attr("class","subgraph");_.insert("rect").attr("class","subgraph subgraph-lvl-"+b%5+" node").attr("x",E.x+i).attr("y",E.y+a).attr("width",E.width).attr("height",E.height);const L=_.insert("g").attr("class","label"),N=Le().flowchart.htmlLabels?E.labelData.width/2:0;L.attr("transform",`translate(${E.labels[0].x+i+E.x+N}, ${E.labels[0].y+a+E.y+3})`),L.node().appendChild(E.labelData.labelNode),Ut.info("Id (UGH)= ",E.type,E.labels)}else Ut.info("Id (UGH)= ",E.id),E.el.attr("transform",`translate(${E.x+i+E.width/2}, ${E.y+a+E.height/2})`)}),f.forEach(function(E){E&&E.type==="group"&&Sjt(i+E.x,a+E.y,E.children,p,v,m,b+1)})},yUe={getClasses:pUe,draw:mUe},xUe=i=>{let a="";for(let f=0;f<5;f++)a+=` + .subgraph-lvl-${f} { + fill: ${i[`surface${f}`]}; + stroke: ${i[`surfacePeer${f}`]}; + } + `;return a},kUe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{db:jIe,renderer:yUe,parser:$dt,styles:i=>`.label { + font-family: ${i.fontFamily}; + color: ${i.nodeTextColor||i.textColor}; + } + .cluster-label text { + fill: ${i.titleColor}; + } + .cluster-label span { + color: ${i.titleColor}; + } + + .label text,span { + fill: ${i.nodeTextColor||i.textColor}; + color: ${i.nodeTextColor||i.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${i.arrowheadColor}; + } + + .edgePath .path { + stroke: ${i.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${i.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${i.edgeLabelBackground}; + rect { + opacity: 0.85; + background-color: ${i.edgeLabelBackground}; + fill: ${i.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${i.clusterBkg}; + stroke: ${i.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${i.titleColor}; + } + + .cluster span { + color: ${i.titleColor}; + } + /* .cluster div { + color: ${i.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${i.fontFamily}; + font-size: 12px; + background: ${i.tertiaryColor}; + border: 1px solid ${i.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${i.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + + .flowchart-label text { + text-anchor: middle; + } + + ${xUe(i)} +`}},Symbol.toStringTag,{value:"Module"}));var jgt=function(){var i=function(j,R,z,K){for(z=z||{},K=j.length;K--;z[j[K]]=R);return z},a=[6,8,10,11,12,14,16,17,20,21],f=[1,9],p=[1,10],v=[1,11],m=[1,12],b=[1,13],E=[1,16],_=[1,17],L={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(R,z,K,it,st,ut,bt){var mt=ut.length-1;switch(st){case 1:return ut[mt-1];case 2:this.$=[];break;case 3:ut[mt-1].push(ut[mt]),this.$=ut[mt-1];break;case 4:case 5:this.$=ut[mt];break;case 6:case 7:this.$=[];break;case 8:it.getCommonDb().setDiagramTitle(ut[mt].substr(6)),this.$=ut[mt].substr(6);break;case 9:this.$=ut[mt].trim(),it.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=ut[mt].trim(),it.getCommonDb().setAccDescription(this.$);break;case 12:it.addSection(ut[mt].substr(8)),this.$=ut[mt].substr(8);break;case 15:it.addTask(ut[mt],0,""),this.$=ut[mt];break;case 16:it.addEvent(ut[mt].substr(2)),this.$=ut[mt];break}},table:[{3:1,4:[1,2]},{1:[3]},i(a,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:f,12:p,14:v,16:m,17:b,18:14,19:15,20:E,21:_},i(a,[2,7],{1:[2,1]}),i(a,[2,3]),{9:18,11:f,12:p,14:v,16:m,17:b,18:14,19:15,20:E,21:_},i(a,[2,5]),i(a,[2,6]),i(a,[2,8]),{13:[1,19]},{15:[1,20]},i(a,[2,11]),i(a,[2,12]),i(a,[2,13]),i(a,[2,14]),i(a,[2,15]),i(a,[2,16]),i(a,[2,4]),i(a,[2,9]),i(a,[2,10])],defaultActions:{},parseError:function(R,z){if(z.recoverable)this.trace(R);else{var K=new Error(R);throw K.hash=z,K}},parse:function(R){var z=this,K=[0],it=[],st=[null],ut=[],bt=this.table,mt="",yt=0,dt=0,ht=2,wt=1,X=ut.slice.call(arguments,1),pt=Object.create(this.lexer),U={yy:{}};for(var xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xt)&&(U.yy[xt]=this.yy[xt]);pt.setInput(R,U.yy),U.yy.lexer=pt,U.yy.parser=this,typeof pt.yylloc>"u"&&(pt.yylloc={});var nt=pt.yylloc;ut.push(nt);var Ot=pt.options&&pt.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Nt(){var ve;return ve=it.pop()||pt.lex()||wt,typeof ve!="number"&&(ve instanceof Array&&(it=ve,ve=it.pop()),ve=z.symbols_[ve]||ve),ve}for(var qt,Ct,Z,Tt,Ht={},It,Ft,ke,pn;;){if(Ct=K[K.length-1],this.defaultActions[Ct]?Z=this.defaultActions[Ct]:((qt===null||typeof qt>"u")&&(qt=Nt()),Z=bt[Ct]&&bt[Ct][qt]),typeof Z>"u"||!Z.length||!Z[0]){var Me="";pn=[];for(It in bt[Ct])this.terminals_[It]&&It>ht&&pn.push("'"+this.terminals_[It]+"'");pt.showPosition?Me="Parse error on line "+(yt+1)+`: +`+pt.showPosition()+` +Expecting `+pn.join(", ")+", got '"+(this.terminals_[qt]||qt)+"'":Me="Parse error on line "+(yt+1)+": Unexpected "+(qt==wt?"end of input":"'"+(this.terminals_[qt]||qt)+"'"),this.parseError(Me,{text:pt.match,token:this.terminals_[qt]||qt,line:pt.yylineno,loc:nt,expected:pn})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ct+", token: "+qt);switch(Z[0]){case 1:K.push(qt),st.push(pt.yytext),ut.push(pt.yylloc),K.push(Z[1]),qt=null,dt=pt.yyleng,mt=pt.yytext,yt=pt.yylineno,nt=pt.yylloc;break;case 2:if(Ft=this.productions_[Z[1]][1],Ht.$=st[st.length-Ft],Ht._$={first_line:ut[ut.length-(Ft||1)].first_line,last_line:ut[ut.length-1].last_line,first_column:ut[ut.length-(Ft||1)].first_column,last_column:ut[ut.length-1].last_column},Ot&&(Ht._$.range=[ut[ut.length-(Ft||1)].range[0],ut[ut.length-1].range[1]]),Tt=this.performAction.apply(Ht,[mt,dt,yt,U.yy,Z[1],st,ut].concat(X)),typeof Tt<"u")return Tt;Ft&&(K=K.slice(0,-1*Ft*2),st=st.slice(0,-1*Ft),ut=ut.slice(0,-1*Ft)),K.push(this.productions_[Z[1]][0]),st.push(Ht.$),ut.push(Ht._$),ke=bt[K[K.length-2]][K[K.length-1]],K.push(ke);break;case 3:return!0}}return!0}},N=function(){var j={EOF:1,parseError:function(z,K){if(this.yy.parser)this.yy.parser.parseError(z,K);else throw new Error(z)},setInput:function(R,z){return this.yy=z||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var z=R.match(/(?:\r\n?|\n).*/g);return z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},unput:function(R){var z=R.length,K=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z),this.offset-=z;var it=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),K.length-1&&(this.yylineno-=K.length-1);var st=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:K?(K.length===it.length?this.yylloc.first_column:0)+it[it.length-K.length].length-K[0].length:this.yylloc.first_column-z},this.options.ranges&&(this.yylloc.range=[st[0],st[0]+this.yyleng-z]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(R){this.unput(this.match.slice(R))},pastInput:function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var R=this.pastInput(),z=new Array(R.length+1).join("-");return R+this.upcomingInput()+` +`+z+"^"},test_match:function(R,z){var K,it,st;if(this.options.backtrack_lexer&&(st={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(st.yylloc.range=this.yylloc.range.slice(0))),it=R[0].match(/(?:\r\n?|\n).*/g),it&&(this.yylineno+=it.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:it?it[it.length-1].length-it[it.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],K=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),K)return K;if(this._backtrack){for(var ut in st)this[ut]=st[ut];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,z,K,it;this._more||(this.yytext="",this.match="");for(var st=this._currentRules(),ut=0;utz[0].length)){if(z=K,it=ut,this.options.backtrack_lexer){if(R=this.test_match(K,st[ut]),R!==!1)return R;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(R=this.test_match(z,st[it]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var z=this.next();return z||this.lex()},begin:function(z){this.conditionStack.push(z)},popState:function(){var z=this.conditionStack.length-1;return z>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(z){return z=this.conditionStack.length-1-Math.abs(z||0),z>=0?this.conditionStack[z]:"INITIAL"},pushState:function(z){this.begin(z)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(z,K,it,st){switch(it){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return j}();L.lexer=N;function B(){this.yy={}}return B.prototype=L,L.Parser=B,new B}();jgt.parser=jgt;const EUe=jgt;let pL="",Ajt=0;const $gt=[],GK=[],bL=[],Ljt=()=>LOt,Mjt=function(){$gt.length=0,GK.length=0,pL="",bL.length=0,ap()},Ijt=function(i){pL=i,$gt.push(i)},Djt=function(){return $gt},Ojt=function(){let i=Bjt();const a=100;let f=0;for(;!i&&ff.id===Ajt-1).events.push(i)},Fjt=function(i){const a={section:pL,type:pL,description:i,task:i,classes:[]};GK.push(a)},Bjt=function(){const i=function(f){return bL[f].processed};let a=!0;for(const[f,p]of bL.entries())i(f),a=a&&p.processed;return a},TUe=Object.freeze(Object.defineProperty({__proto__:null,addEvent:Pjt,addSection:Ijt,addTask:Njt,addTaskOrg:Fjt,clear:Mjt,default:{clear:Mjt,getCommonDb:Ljt,addSection:Ijt,getSections:Djt,getTasks:Ojt,addTask:Njt,addTaskOrg:Fjt,addEvent:Pjt},getCommonDb:Ljt,getSections:Djt,getTasks:Ojt},Symbol.toStringTag,{value:"Module"})),CUe=12,VK=function(i,a){const f=i.append("rect");return f.attr("x",a.x),f.attr("y",a.y),f.attr("fill",a.fill),f.attr("stroke",a.stroke),f.attr("width",a.width),f.attr("height",a.height),f.attr("rx",a.rx),f.attr("ry",a.ry),a.class!==void 0&&f.attr("class",a.class),f},_Ue=function(i,a){const p=i.append("circle").attr("cx",a.cx).attr("cy",a.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),v=i.append("g");v.append("circle").attr("cx",a.cx-15/3).attr("cy",a.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),v.append("circle").attr("cx",a.cx+15/3).attr("cy",a.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function m(_){const L=LA().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",L).attr("transform","translate("+a.cx+","+(a.cy+2)+")")}function b(_){const L=LA().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",L).attr("transform","translate("+a.cx+","+(a.cy+7)+")")}function E(_){_.append("line").attr("class","mouth").attr("stroke",2).attr("x1",a.cx-5).attr("y1",a.cy+7).attr("x2",a.cx+5).attr("y2",a.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a.score>3?m(v):a.score<3?b(v):E(v),p},SUe=function(i,a){const f=i.append("circle");return f.attr("cx",a.cx),f.attr("cy",a.cy),f.attr("class","actor-"+a.pos),f.attr("fill",a.fill),f.attr("stroke",a.stroke),f.attr("r",a.r),f.class!==void 0&&f.attr("class",f.class),a.title!==void 0&&f.append("title").text(a.title),f},Rjt=function(i,a){const f=a.text.replace(//gi," "),p=i.append("text");p.attr("x",a.x),p.attr("y",a.y),p.attr("class","legend"),p.style("text-anchor",a.anchor),a.class!==void 0&&p.attr("class",a.class);const v=p.append("tspan");return v.attr("x",a.x+a.textMargin*2),v.text(f),p},AUe=function(i,a){function f(v,m,b,E,_){return v+","+m+" "+(v+b)+","+m+" "+(v+b)+","+(m+E-_)+" "+(v+b-_*1.2)+","+(m+E)+" "+v+","+(m+E)}const p=i.append("polygon");p.attr("points",f(a.x,a.y,50,20,7)),p.attr("class","labelBox"),a.y=a.y+a.labelMargin,a.x=a.x+.5*a.labelMargin,Rjt(i,a)},LUe=function(i,a,f){const p=i.append("g"),v=zgt();v.x=a.x,v.y=a.y,v.fill=a.fill,v.width=f.width,v.height=f.height,v.class="journey-section section-type-"+a.num,v.rx=3,v.ry=3,VK(p,v),$jt(f)(a.text,p,v.x,v.y,v.width,v.height,{class:"journey-section section-type-"+a.num},f,a.colour)};let jjt=-1;const MUe=function(i,a,f){const p=a.x+f.width/2,v=i.append("g");jjt++;const m=300+5*30;v.append("line").attr("id","task"+jjt).attr("x1",p).attr("y1",a.y).attr("x2",p).attr("y2",m).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),_Ue(v,{cx:p,cy:300+(5-a.score)*30,score:a.score});const b=zgt();b.x=a.x,b.y=a.y,b.fill=a.fill,b.width=f.width,b.height=f.height,b.class="task task-type-"+a.num,b.rx=3,b.ry=3,VK(v,b),a.x+14,$jt(f)(a.task,v,b.x,b.y,b.width,b.height,{class:"task"},f,a.colour)},IUe=function(i,a){VK(i,{x:a.startx,y:a.starty,width:a.stopx-a.startx,height:a.stopy-a.starty,fill:a.fill,class:"rect"}).lower()},DUe=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},zgt=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},$jt=function(){function i(v,m,b,E,_,L,N,B){const j=m.append("text").attr("x",b+_/2).attr("y",E+L/2+5).style("font-color",B).style("text-anchor","middle").text(v);p(j,N)}function a(v,m,b,E,_,L,N,B,j){const{taskFontSize:R,taskFontFamily:z}=B,K=v.split(//gi);for(let it=0;it)/).reverse(),v,m=[],b=1.1,E=f.attr("y"),_=parseFloat(f.attr("dy")),L=f.text(null).append("tspan").attr("x",0).attr("y",E).attr("dy",_+"em");for(let N=0;Na||v==="
")&&(m.pop(),L.text(m.join(" ").trim()),v==="
"?m=[""]:m=[v],L=f.append("tspan").attr("x",0).attr("y",E).attr("dy",b+"em").text(v))})}const NUe=function(i,a,f,p){const v=f%CUe-1,m=i.append("g");a.section=v,m.attr("class",(a.class?a.class+" ":"")+"timeline-node "+("section-"+v));const b=m.append("g"),E=m.append("g"),L=E.append("text").text(a.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(zjt,a.width).node().getBBox(),N=p.fontSize&&p.fontSize.replace?p.fontSize.replace("px",""):p.fontSize;return a.height=L.height+N*1.1*.5+a.padding,a.height=Math.max(a.height,a.maxHeight),a.width=a.width+2*a.padding,E.attr("transform","translate("+a.width/2+", "+a.padding/2+")"),FUe(b,a,v),a},PUe=function(i,a,f){const p=i.append("g"),m=p.append("text").text(a.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(zjt,a.width).node().getBBox(),b=f.fontSize&&f.fontSize.replace?f.fontSize.replace("px",""):f.fontSize;return p.remove(),m.height+b*1.1*.5+a.padding},FUe=function(i,a,f){i.append("path").attr("id","node-"+a.id).attr("class","node-bkg node-"+a.type).attr("d",`M0 ${a.height-5} v${-a.height+2*5} q0,-5 5,-5 h${a.width-2*5} q5,0 5,5 v${a.height-5} H0 Z`),i.append("line").attr("class","node-line-"+f).attr("x1",0).attr("y1",a.height).attr("x2",a.width).attr("y2",a.height)},AT={drawRect:VK,drawCircle:SUe,drawSection:LUe,drawText:Rjt,drawLabel:AUe,drawTask:MUe,drawBackgroundRect:IUe,getTextObj:DUe,getNoteRect:zgt,initGraphics:OUe,drawNode:NUe,getVirtualNodeHeight:PUe},BUe=function(i,a,f,p){var X,pt;const v=Le(),m=v.leftMargin??50;Ut.debug("timeline",p.db);const b=v.securityLevel;let E;b==="sandbox"&&(E=yr("#i"+a));const L=yr(b==="sandbox"?E.nodes()[0].contentDocument.body:"body").select("#"+a);L.append("g");const N=p.db.getTasks(),B=p.db.getCommonDb().getDiagramTitle();Ut.debug("task",N),AT.initGraphics(L);const j=p.db.getSections();Ut.debug("sections",j);let R=0,z=0,K=0,it=0,st=50+m,ut=50;it=50;let bt=0,mt=!0;j.forEach(function(U){const xt={number:bt,descr:U,section:bt,width:150,padding:20,maxHeight:R},nt=AT.getVirtualNodeHeight(L,xt,v);Ut.debug("sectionHeight before draw",nt),R=Math.max(R,nt+20)});let yt=0,dt=0;Ut.debug("tasks.length",N.length);for(const[U,xt]of N.entries()){const nt={number:U,descr:xt,section:xt.section,width:150,padding:20,maxHeight:z},Ot=AT.getVirtualNodeHeight(L,nt,v);Ut.debug("taskHeight before draw",Ot),z=Math.max(z,Ot+20),yt=Math.max(yt,xt.events.length);let Nt=0;for(let qt=0;qt0?j.forEach(U=>{const xt=N.filter(qt=>qt.section===U),nt={number:bt,descr:U,section:bt,width:200*Math.max(xt.length,1)-50,padding:20,maxHeight:R};Ut.debug("sectionNode",nt);const Ot=L.append("g"),Nt=AT.drawNode(Ot,nt,bt,v);Ut.debug("sectionNode output",Nt),Ot.attr("transform",`translate(${st}, ${it})`),ut+=R+50,xt.length>0&&qjt(L,xt,bt,st,ut,z,v,yt,dt,R,!1),st+=200*Math.max(xt.length,1),ut=it,bt++}):(mt=!1,qjt(L,N,bt,st,ut,z,v,yt,dt,R,!0));const ht=L.node().getBBox();Ut.debug("bounds",ht),B&&L.append("text").text(B).attr("x",ht.width/2-m).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),K=mt?R+z+150:z+100,L.append("g").attr("class","lineWrapper").append("line").attr("x1",m).attr("y1",K).attr("x2",ht.width+3*m).attr("y2",K).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),cT(void 0,L,((X=v.timeline)==null?void 0:X.padding)??50,((pt=v.timeline)==null?void 0:pt.useMaxWidth)??!1)},qjt=function(i,a,f,p,v,m,b,E,_,L,N){var B;for(const j of a){const R={descr:j.task,section:f,number:f,width:150,padding:20,maxHeight:m};Ut.debug("taskNode",R);const z=i.append("g").attr("class","taskWrapper"),it=AT.drawNode(z,R,f,b).height;if(Ut.debug("taskHeight after draw",it),z.attr("transform",`translate(${p}, ${v})`),m=Math.max(m,it),j.events){const st=i.append("g").attr("class","lineWrapper");let ut=m;v+=100,ut=ut+RUe(i,j.events,f,p,v,b),v-=100,st.append("line").attr("x1",p+190/2).attr("y1",v+m).attr("x2",p+190/2).attr("y2",v+m+(N?m:L)+_+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}p=p+200,N&&!((B=b.timeline)!=null&&B.disableMulticolor)&&f++}v=v-10},RUe=function(i,a,f,p,v,m){let b=0;const E=v;v=v+100;for(const _ of a){const L={descr:_,section:f,number:f,width:150,padding:20,maxHeight:50};Ut.debug("eventNode",L);const N=i.append("g").attr("class","eventWrapper"),j=AT.drawNode(N,L,f,m).height;b=b+j,N.attr("transform",`translate(${p}, ${v})`),v=v+10+j}return v=E,b},jUe={setConf:()=>{},draw:BUe},$Ue=i=>{let a="";for(let f=0;f` + .edge { + stroke-width: 3; + } + ${$Ue(i)} + .section-root rect, .section-root path, .section-root circle { + fill: ${i.git0}; + } + .section-root text { + fill: ${i.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`}},Symbol.toStringTag,{value:"Module"}));var qgt=function(){var i=function(mt,yt,dt,ht){for(dt=dt||{},ht=mt.length;ht--;dt[mt[ht]]=yt);return dt},a=[1,4],f=[1,13],p=[1,12],v=[1,15],m=[1,16],b=[1,20],E=[1,19],_=[6,7,8],L=[1,26],N=[1,24],B=[1,25],j=[6,7,11],R=[1,6,13,15,16,19,22],z=[1,33],K=[1,34],it=[1,6,7,11,13,15,16,19,22],st={trace:function(){},yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:function(yt,dt,ht,wt,X,pt,U){var xt=pt.length-1;switch(X){case 6:case 7:return wt;case 8:wt.getLogger().trace("Stop NL ");break;case 9:wt.getLogger().trace("Stop EOF ");break;case 11:wt.getLogger().trace("Stop NL2 ");break;case 12:wt.getLogger().trace("Stop EOF2 ");break;case 15:wt.getLogger().info("Node: ",pt[xt].id),wt.addNode(pt[xt-1].length,pt[xt].id,pt[xt].descr,pt[xt].type);break;case 16:wt.getLogger().trace("Icon: ",pt[xt]),wt.decorateNode({icon:pt[xt]});break;case 17:case 21:wt.decorateNode({class:pt[xt]});break;case 18:wt.getLogger().trace("SPACELIST");break;case 19:wt.getLogger().trace("Node: ",pt[xt].id),wt.addNode(0,pt[xt].id,pt[xt].descr,pt[xt].type);break;case 20:wt.decorateNode({icon:pt[xt]});break;case 25:wt.getLogger().trace("node found ..",pt[xt-2]),this.$={id:pt[xt-1],descr:pt[xt-1],type:wt.getType(pt[xt-2],pt[xt])};break;case 26:this.$={id:pt[xt],descr:pt[xt],type:wt.nodeType.DEFAULT};break;case 27:wt.getLogger().trace("node found ..",pt[xt-3]),this.$={id:pt[xt-3],descr:pt[xt-1],type:wt.getType(pt[xt-2],pt[xt])};break}},table:[{3:1,4:2,5:3,6:[1,5],8:a},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:a},{6:f,7:[1,10],9:9,12:11,13:p,14:14,15:v,16:m,17:17,18:18,19:b,22:E},i(_,[2,3]),{1:[2,2]},i(_,[2,4]),i(_,[2,5]),{1:[2,6],6:f,12:21,13:p,14:14,15:v,16:m,17:17,18:18,19:b,22:E},{6:f,9:22,12:11,13:p,14:14,15:v,16:m,17:17,18:18,19:b,22:E},{6:L,7:N,10:23,11:B},i(j,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:b,22:E}),i(j,[2,18]),i(j,[2,19]),i(j,[2,20]),i(j,[2,21]),i(j,[2,23]),i(j,[2,24]),i(j,[2,26],{19:[1,30]}),{20:[1,31]},{6:L,7:N,10:32,11:B},{1:[2,7],6:f,12:21,13:p,14:14,15:v,16:m,17:17,18:18,19:b,22:E},i(R,[2,14],{7:z,11:K}),i(it,[2,8]),i(it,[2,9]),i(it,[2,10]),i(j,[2,15]),i(j,[2,16]),i(j,[2,17]),{20:[1,35]},{21:[1,36]},i(R,[2,13],{7:z,11:K}),i(it,[2,11]),i(it,[2,12]),{21:[1,37]},i(j,[2,25]),i(j,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(yt,dt){if(dt.recoverable)this.trace(yt);else{var ht=new Error(yt);throw ht.hash=dt,ht}},parse:function(yt){var dt=this,ht=[0],wt=[],X=[null],pt=[],U=this.table,xt="",nt=0,Ot=0,Nt=2,qt=1,Ct=pt.slice.call(arguments,1),Z=Object.create(this.lexer),Tt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(Tt.yy[Ht]=this.yy[Ht]);Z.setInput(yt,Tt.yy),Tt.yy.lexer=Z,Tt.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var It=Z.yylloc;pt.push(It);var Ft=Z.options&&Z.options.ranges;typeof Tt.yy.parseError=="function"?this.parseError=Tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(){var Oe;return Oe=wt.pop()||Z.lex()||qt,typeof Oe!="number"&&(Oe instanceof Array&&(wt=Oe,Oe=wt.pop()),Oe=dt.symbols_[Oe]||Oe),Oe}for(var pn,Me,ve,Ge,Ke={},we,_e,$t,re;;){if(Me=ht[ht.length-1],this.defaultActions[Me]?ve=this.defaultActions[Me]:((pn===null||typeof pn>"u")&&(pn=ke()),ve=U[Me]&&U[Me][pn]),typeof ve>"u"||!ve.length||!ve[0]){var ie="";re=[];for(we in U[Me])this.terminals_[we]&&we>Nt&&re.push("'"+this.terminals_[we]+"'");Z.showPosition?ie="Parse error on line "+(nt+1)+`: +`+Z.showPosition()+` +Expecting `+re.join(", ")+", got '"+(this.terminals_[pn]||pn)+"'":ie="Parse error on line "+(nt+1)+": Unexpected "+(pn==qt?"end of input":"'"+(this.terminals_[pn]||pn)+"'"),this.parseError(ie,{text:Z.match,token:this.terminals_[pn]||pn,line:Z.yylineno,loc:It,expected:re})}if(ve[0]instanceof Array&&ve.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Me+", token: "+pn);switch(ve[0]){case 1:ht.push(pn),X.push(Z.yytext),pt.push(Z.yylloc),ht.push(ve[1]),pn=null,Ot=Z.yyleng,xt=Z.yytext,nt=Z.yylineno,It=Z.yylloc;break;case 2:if(_e=this.productions_[ve[1]][1],Ke.$=X[X.length-_e],Ke._$={first_line:pt[pt.length-(_e||1)].first_line,last_line:pt[pt.length-1].last_line,first_column:pt[pt.length-(_e||1)].first_column,last_column:pt[pt.length-1].last_column},Ft&&(Ke._$.range=[pt[pt.length-(_e||1)].range[0],pt[pt.length-1].range[1]]),Ge=this.performAction.apply(Ke,[xt,Ot,nt,Tt.yy,ve[1],X,pt].concat(Ct)),typeof Ge<"u")return Ge;_e&&(ht=ht.slice(0,-1*_e*2),X=X.slice(0,-1*_e),pt=pt.slice(0,-1*_e)),ht.push(this.productions_[ve[1]][0]),X.push(Ke.$),pt.push(Ke._$),$t=U[ht[ht.length-2]][ht[ht.length-1]],ht.push($t);break;case 3:return!0}}return!0}},ut=function(){var mt={EOF:1,parseError:function(dt,ht){if(this.yy.parser)this.yy.parser.parseError(dt,ht);else throw new Error(dt)},setInput:function(yt,dt){return this.yy=dt||this.yy||{},this._input=yt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var yt=this._input[0];this.yytext+=yt,this.yyleng++,this.offset++,this.match+=yt,this.matched+=yt;var dt=yt.match(/(?:\r\n?|\n).*/g);return dt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),yt},unput:function(yt){var dt=yt.length,ht=yt.split(/(?:\r\n?|\n)/g);this._input=yt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-dt),this.offset-=dt;var wt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ht.length-1&&(this.yylineno-=ht.length-1);var X=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ht?(ht.length===wt.length?this.yylloc.first_column:0)+wt[wt.length-ht.length].length-ht[0].length:this.yylloc.first_column-dt},this.options.ranges&&(this.yylloc.range=[X[0],X[0]+this.yyleng-dt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(yt){this.unput(this.match.slice(yt))},pastInput:function(){var yt=this.matched.substr(0,this.matched.length-this.match.length);return(yt.length>20?"...":"")+yt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var yt=this.match;return yt.length<20&&(yt+=this._input.substr(0,20-yt.length)),(yt.substr(0,20)+(yt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var yt=this.pastInput(),dt=new Array(yt.length+1).join("-");return yt+this.upcomingInput()+` +`+dt+"^"},test_match:function(yt,dt){var ht,wt,X;if(this.options.backtrack_lexer&&(X={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(X.yylloc.range=this.yylloc.range.slice(0))),wt=yt[0].match(/(?:\r\n?|\n).*/g),wt&&(this.yylineno+=wt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:wt?wt[wt.length-1].length-wt[wt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+yt[0].length},this.yytext+=yt[0],this.match+=yt[0],this.matches=yt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(yt[0].length),this.matched+=yt[0],ht=this.performAction.call(this,this.yy,this,dt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ht)return ht;if(this._backtrack){for(var pt in X)this[pt]=X[pt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var yt,dt,ht,wt;this._more||(this.yytext="",this.match="");for(var X=this._currentRules(),pt=0;ptdt[0].length)){if(dt=ht,wt=pt,this.options.backtrack_lexer){if(yt=this.test_match(ht,X[pt]),yt!==!1)return yt;if(this._backtrack){dt=!1;continue}else return!1}else if(!this.options.flex)break}return dt?(yt=this.test_match(dt,X[wt]),yt!==!1?yt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var dt=this.next();return dt||this.lex()},begin:function(dt){this.conditionStack.push(dt)},popState:function(){var dt=this.conditionStack.length-1;return dt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(dt){return dt=this.conditionStack.length-1-Math.abs(dt||0),dt>=0?this.conditionStack[dt]:"INITIAL"},pushState:function(dt){this.begin(dt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(dt,ht,wt,X){switch(wt){case 0:return dt.getLogger().trace("Found comment",ht.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:dt.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return dt.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:dt.getLogger().trace("end icon"),this.popState();break;case 10:return dt.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return dt.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return dt.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return dt.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:dt.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return dt.getLogger().trace("description:",ht.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),dt.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),dt.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),dt.getLogger().trace("node end ...",ht.yytext),"NODE_DEND";case 30:return this.popState(),dt.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),dt.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),dt.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),dt.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),dt.getLogger().trace("node end (("),"NODE_DEND";case 35:return dt.getLogger().trace("Long description:",ht.yytext),20;case 36:return dt.getLogger().trace("Long description:",ht.yytext),20}},rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return mt}();st.lexer=ut;function bt(){this.yy={}}return bt.prototype=st,st.Parser=bt,new bt}();qgt.parser=qgt;const qUe=qgt,UP=i=>Dd(i,Le());let sv=[],Hjt=0,Hgt={};const HUe=()=>{sv=[],Hjt=0,Hgt={}},GUe=function(i){for(let a=sv.length-1;a>=0;a--)if(sv[a].levelsv.length>0?sv[0]:null,UUe=(i,a,f,p)=>{Ut.info("addNode",i,a,f,p);const v=Le(),m={id:Hjt++,nodeId:UP(a),level:i,descr:UP(f),type:p,children:[],width:Le().mindmap.maxNodeWidth};switch(m.type){case Vu.ROUNDED_RECT:m.padding=2*v.mindmap.padding;break;case Vu.RECT:m.padding=2*v.mindmap.padding;break;case Vu.HEXAGON:m.padding=2*v.mindmap.padding;break;default:m.padding=v.mindmap.padding}const b=GUe(i);if(b)b.children.push(m),sv.push(m);else if(sv.length===0)sv.push(m);else{let E=new Error('There can be only one root. No parent could be found for ("'+m.descr+'")');throw E.hash={text:"branch "+name,token:"branch "+name,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+name+'"']},E}},Vu={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},WUe=(i,a)=>{switch(Ut.debug("In get type",i,a),i){case"[":return Vu.RECT;case"(":return a===")"?Vu.ROUNDED_RECT:Vu.CLOUD;case"((":return Vu.CIRCLE;case")":return Vu.CLOUD;case"))":return Vu.BANG;case"{{":return Vu.HEXAGON;default:return Vu.DEFAULT}},Gjt=(i,a)=>{Hgt[i]=a},KUe=i=>{const a=sv[sv.length-1];i&&i.icon&&(a.icon=UP(i.icon)),i&&i.class&&(a.class=UP(i.class))},LT=i=>{switch(i){case Vu.DEFAULT:return"no-border";case Vu.RECT:return"rect";case Vu.ROUNDED_RECT:return"rounded-rect";case Vu.CIRCLE:return"circle";case Vu.CLOUD:return"cloud";case Vu.BANG:return"bang";case Vu.HEXAGON:return"hexgon";default:return"no-border"}};let Vjt;const YUe=i=>{Vjt=i},XUe=()=>Ut,QUe=i=>sv[i],Ggt=i=>Hgt[i],ZUe=Object.freeze(Object.defineProperty({__proto__:null,addNode:UUe,clear:HUe,decorateNode:KUe,getElementById:Ggt,getLogger:XUe,getMindmap:VUe,getNodeById:QUe,getType:WUe,nodeType:Vu,get parseError(){return Vjt},sanitizeText:UP,setElementForId:Gjt,setErrorHandler:YUe,type2Str:LT},Symbol.toStringTag,{value:"Module"})),Ujt=12,JUe=function(i,a,f){i.append("path").attr("id","node-"+a.id).attr("class","node-bkg node-"+LT(a.type)).attr("d",`M0 ${a.height-5} v${-a.height+2*5} q0,-5 5,-5 h${a.width-2*5} q5,0 5,5 v${a.height-5} H0 Z`),i.append("line").attr("class","node-line-"+f).attr("x1",0).attr("y1",a.height).attr("x2",a.width).attr("y2",a.height)},tWe=function(i,a){i.append("rect").attr("id","node-"+a.id).attr("class","node-bkg node-"+LT(a.type)).attr("height",a.height).attr("width",a.width)},eWe=function(i,a){const f=a.width,p=a.height,v=.15*f,m=.25*f,b=.35*f,E=.2*f;i.append("path").attr("id","node-"+a.id).attr("class","node-bkg node-"+LT(a.type)).attr("d",`M0 0 a${v},${v} 0 0,1 ${f*.25},${-1*f*.1} + a${b},${b} 1 0,1 ${f*.4},${-1*f*.1} + a${m},${m} 1 0,1 ${f*.35},${1*f*.2} + + a${v},${v} 1 0,1 ${f*.15},${1*p*.35} + a${E},${E} 1 0,1 ${-1*f*.15},${1*p*.65} + + a${m},${v} 1 0,1 ${-1*f*.25},${f*.15} + a${b},${b} 1 0,1 ${-1*f*.5},0 + a${v},${v} 1 0,1 ${-1*f*.25},${-1*f*.15} + + a${v},${v} 1 0,1 ${-1*f*.1},${-1*p*.35} + a${E},${E} 1 0,1 ${f*.1},${-1*p*.65} + + H0 V0 Z`)},nWe=function(i,a){const f=a.width,p=a.height,v=.15*f;i.append("path").attr("id","node-"+a.id).attr("class","node-bkg node-"+LT(a.type)).attr("d",`M0 0 a${v},${v} 1 0,0 ${f*.25},${-1*p*.1} + a${v},${v} 1 0,0 ${f*.25},0 + a${v},${v} 1 0,0 ${f*.25},0 + a${v},${v} 1 0,0 ${f*.25},${1*p*.1} + + a${v},${v} 1 0,0 ${f*.15},${1*p*.33} + a${v*.8},${v*.8} 1 0,0 0,${1*p*.34} + a${v},${v} 1 0,0 ${-1*f*.15},${1*p*.33} + + a${v},${v} 1 0,0 ${-1*f*.25},${p*.15} + a${v},${v} 1 0,0 ${-1*f*.25},0 + a${v},${v} 1 0,0 ${-1*f*.25},0 + a${v},${v} 1 0,0 ${-1*f*.25},${-1*p*.15} + + a${v},${v} 1 0,0 ${-1*f*.1},${-1*p*.33} + a${v*.8},${v*.8} 1 0,0 0,${-1*p*.34} + a${v},${v} 1 0,0 ${f*.1},${-1*p*.33} + + H0 V0 Z`)},rWe=function(i,a){i.append("circle").attr("id","node-"+a.id).attr("class","node-bkg node-"+LT(a.type)).attr("r",a.width/2)};function iWe(i,a,f,p,v){return i.insert("polygon",":first-child").attr("points",p.map(function(m){return m.x+","+m.y}).join(" ")).attr("transform","translate("+(v.width-a)/2+", "+f+")")}const sWe=function(i,a){const f=a.height,v=f/4,m=a.width-a.padding+2*v,b=[{x:v,y:0},{x:m-v,y:0},{x:m,y:-f/2},{x:m-v,y:-f},{x:v,y:-f},{x:0,y:-f/2}];iWe(i,m,f,b,a)},aWe=function(i,a){i.append("rect").attr("id","node-"+a.id).attr("class","node-bkg node-"+LT(a.type)).attr("height",a.height).attr("rx",a.padding).attr("ry",a.padding).attr("width",a.width)},Wjt={drawNode:function(i,a,f,p){const v=p.htmlLabels,m=f%(Ujt-1),b=i.append("g");a.section=m;let E="section-"+m;m<0&&(E+=" section-root"),b.attr("class",(a.class?a.class+" ":"")+"mindmap-node "+E);const _=b.append("g"),L=b.append("g"),N=a.descr.replace(/()/g,` +`);dK(L,N,{useHtmlLabels:v,width:a.width,classes:"mindmap-node-label"}),v||L.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const B=L.node().getBBox(),j=p.fontSize.replace?p.fontSize.replace("px",""):p.fontSize;if(a.height=B.height+j*1.1*.5+a.padding,a.width=B.width+2*a.padding,a.icon)if(a.type===Vu.CIRCLE)a.height+=50,a.width+=50,b.append("foreignObject").attr("height","50px").attr("width",a.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+m+" "+a.icon),L.attr("transform","translate("+a.width/2+", "+(a.height/2-1.5*a.padding)+")");else{a.width+=50;const R=a.height;a.height=Math.max(R,60);const z=Math.abs(a.height-R);b.append("foreignObject").attr("width","60px").attr("height",a.height).attr("style","text-align: center;margin-top:"+z/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+m+" "+a.icon),L.attr("transform","translate("+(25+a.width/2)+", "+(z/2+a.padding/2)+")")}else if(v){const R=(a.width-B.width)/2,z=(a.height-B.height)/2;L.attr("transform","translate("+R+", "+z+")")}else{const R=a.width/2,z=a.padding/2;L.attr("transform","translate("+R+", "+z+")")}switch(a.type){case Vu.DEFAULT:JUe(_,a,m);break;case Vu.ROUNDED_RECT:aWe(_,a);break;case Vu.RECT:tWe(_,a);break;case Vu.CIRCLE:_.attr("transform","translate("+a.width/2+", "+ +a.height/2+")"),rWe(_,a);break;case Vu.CLOUD:eWe(_,a);break;case Vu.BANG:nWe(_,a);break;case Vu.HEXAGON:sWe(_,a);break}return Gjt(a.id,b),a.height},positionNode:function(i){const a=Ggt(i.id),f=i.x||0,p=i.y||0;a.attr("transform","translate("+f+","+p+")")},drawEdge:function(a,f,p,v,m){const b=m%(Ujt-1),E=p.x+p.width/2,_=p.y+p.height/2,L=f.x+f.width/2,N=f.y+f.height/2,B=L>E?E+Math.abs(E-L)/2:E-Math.abs(E-L)/2,j=N>_?_+Math.abs(_-N)/2:_-Math.abs(_-N)/2,R=L>E?Math.abs(E-B)/2+E:-Math.abs(E-B)/2+E,z=N>_?Math.abs(_-j)/2+_:-Math.abs(_-j)/2+_;a.append("path").attr("d",p.direction==="TB"||p.direction==="BT"?`M${E},${_} Q${E},${z} ${B},${j} T${L},${N}`:`M${E},${_} Q${R},${_} ${B},${j} T${L},${N}`).attr("class","edge section-edge-"+b+" edge-depth-"+v)}};var Kjt={exports:{}};(function(i,a){(function(f,p){i.exports=p()})(d0,function(){function f(y){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},f(y)}function p(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")}function v(y,g){for(var x=0;xy.length)&&(g=y.length);for(var x=0,T=new Array(g);x"u"?null:window,z=R?R.navigator:null;R&&R.document;var K=f(""),it=f({}),st=f(function(){}),ut=typeof HTMLElement>"u"?"undefined":f(HTMLElement),bt=function(g){return g&&g.instanceString&&yt(g.instanceString)?g.instanceString():null},mt=function(g){return g!=null&&f(g)==K},yt=function(g){return g!=null&&f(g)===st},dt=function(g){return!xt(g)&&(Array.isArray?Array.isArray(g):g!=null&&g instanceof Array)},ht=function(g){return g!=null&&f(g)===it&&!dt(g)&&g.constructor===Object},wt=function(g){return g!=null&&f(g)===it},X=function(g){return g!=null&&f(g)===f(1)&&!isNaN(g)},pt=function(g){return X(g)&&Math.floor(g)===g},U=function(g){if(ut!=="undefined")return g!=null&&g instanceof HTMLElement},xt=function(g){return nt(g)||Ot(g)},nt=function(g){return bt(g)==="collection"&&g._private.single},Ot=function(g){return bt(g)==="collection"&&!g._private.single},Nt=function(g){return bt(g)==="core"},qt=function(g){return bt(g)==="stylesheet"},Ct=function(g){return bt(g)==="event"},Z=function(g){return g==null?!0:!!(g===""||g.match(/^\s+$/))},Tt=function(g){return typeof HTMLElement>"u"?!1:g instanceof HTMLElement},Ht=function(g){return ht(g)&&X(g.x1)&&X(g.x2)&&X(g.y1)&&X(g.y2)},It=function(g){return wt(g)&&yt(g.then)},Ft=function(){return z&&z.userAgent.match(/msie|trident|edge/i)},ke=function(g,x){x||(x=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var D=[],O=0;Ox?1:0},Ne=function(g,x){return-1*oe(g,x)},me=Object.assign!=null?Object.assign.bind(Object):function(y){for(var g=arguments,x=1;x1&&(At-=1),At<1/6?lt+(ft-lt)*6*At:At<1/2?ft:At<2/3?lt+(ft-lt)*(2/3-At)*6:lt}var W=new RegExp("^"+$t+"$").exec(g);if(W){if(T=parseInt(W[1]),T<0?T=(360- -1*T%360)%360:T>360&&(T=T%360),T/=360,A=parseFloat(W[2]),A<0||A>100||(A=A/100,D=parseFloat(W[3]),D<0||D>100)||(D=D/100,O=W[4],O!==void 0&&(O=parseFloat(O),O<0||O>1)))return;if(A===0)$=q=S=Math.round(D*255);else{var et=D<.5?D*(1+A):D+A-D*A,at=2*D-et;$=Math.round(255*G(at,et,T+1/3)),q=Math.round(255*G(at,et,T)),S=Math.round(255*G(at,et,T-1/3))}x=[$,q,S,O]}return x},ya=function(g){var x,T=new RegExp("^"+we+"$").exec(g);if(T){x=[];for(var A=[],D=1;D<=3;D++){var O=T[D];if(O[O.length-1]==="%"&&(A[D]=!0),O=parseFloat(O),A[D]&&(O=O/100*255),O<0||O>255)return;x.push(Math.floor(O))}var $=A[1]||A[2]||A[3],q=A[1]&&A[2]&&A[3];if($&&!q)return;var S=T[4];if(S!==void 0){if(S=parseFloat(S),S<0||S>1)return;x.push(S)}}return x},da=function(g){return ds[g.toLowerCase()]},Oo=function(g){return(dt(g)?g:null)||da(g)||cn(g)||ya(g)||li(g)},ds={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Dr=function(g){for(var x=g.map,T=g.keys,A=T.length,D=0;D=g||zt<0||W&&ee>=D}function kt(){var Kt=No();if(At(Kt))return Mt(Kt);$=setTimeout(kt,ft(Kt))}function Mt(Kt){return $=void 0,et&&T?at(Kt):(T=A=void 0,O)}function Dt(){$!==void 0&&clearTimeout($),S=0,T=q=A=$=void 0}function jt(){return $===void 0?O:Mt(No())}function Zt(){var Kt=No(),zt=At(Kt);if(T=arguments,A=this,q=Kt,zt){if($===void 0)return lt(q);if(W)return clearTimeout($),$=setTimeout(kt,g),at(q)}return $===void 0&&($=setTimeout(kt,g)),O}return Zt.cancel=Dt,Zt.flush=jt,Zt}var Wc=xi,Ce=R?R.performance:null,gp=Ce&&Ce.now?function(){return Ce.now()}:function(){return Date.now()},Be=function(){if(R){if(R.requestAnimationFrame)return function(y){R.requestAnimationFrame(y)};if(R.mozRequestAnimationFrame)return function(y){R.mozRequestAnimationFrame(y)};if(R.webkitRequestAnimationFrame)return function(y){R.webkitRequestAnimationFrame(y)};if(R.msRequestAnimationFrame)return function(y){R.msRequestAnimationFrame(y)}}return function(y){y&&setTimeout(function(){y(gp())},1e3/60)}}(),Ff=function(g){return Be(g)},dg=gp,dm=9261,pk=65599,x3=5381,Ml=function(g){for(var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dm,T=x,A;A=g.next(),!A.done;)T=T*pk+A.value|0;return T},T0=function(g){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dm;return x*pk+g|0},cv=function(g){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x3;return(x<<5)+x+g|0},F5=function(g,x){return g*2097152+x},jb=function(g){return g[0]*2097152+g[1]},B5=function(g,x){return[T0(g[0],x[0]),cv(g[1],x[1])]},l1=function(g,x){var T={value:0,done:!1},A=0,D=g.length,O={next:function(){return A=0&&!(g[A]===x&&(g.splice(A,1),T));A--);},mL=function(g){g.splice(0,g.length)},YP=function(g,x){for(var T=0;T"u"?"undefined":f(Set))!==eY?Set:nY,DT=function(g,x){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(g===void 0||x===void 0||!Nt(g)){bl("An element must have a core reference and parameters set");return}var A=x.group;if(A==null&&(x.data&&x.data.source!=null&&x.data.target!=null?A="edges":A="nodes"),A!=="nodes"&&A!=="edges"){bl("An element must be of type `nodes` or `edges`; you specified `"+A+"`");return}this.length=1,this[0]=this;var D=this._private={cy:g,single:!0,data:x.data||{},position:x.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:A,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!x.selected,selectable:x.selectable===void 0?!0:!!x.selectable,locked:!!x.locked,grabbed:!1,grabbable:x.grabbable===void 0?!0:!!x.grabbable,pannable:x.pannable===void 0?A==="edges":!!x.pannable,active:!1,classes:new z5,animation:{current:[],queue:[]},rscratch:{},scratch:x.scratch||{},edges:[],children:[],parent:x.parent&&x.parent.isNode()?x.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(D.position.x==null&&(D.position.x=0),D.position.y==null&&(D.position.y=0),x.renderedPosition){var O=x.renderedPosition,$=g.pan(),q=g.zoom();D.position={x:(O.x-$.x)/q,y:(O.y-$.y)/q}}var S=[];dt(x.classes)?S=x.classes:mt(x.classes)&&(S=x.classes.split(/\s+/));for(var G=0,W=S.length;GMt?1:0},G=function(kt,Mt,Dt,jt,Zt){var Kt;if(Dt==null&&(Dt=0),Zt==null&&(Zt=T),Dt<0)throw new Error("lo must be non-negative");for(jt==null&&(jt=kt.length);Dtfe;0<=fe?Vt++:Vt--)ee.push(Vt);return ee}.apply(this).reverse(),zt=[],jt=0,Zt=Kt.length;jtge;0<=ge?++ee:--ee)ne.push(O(kt,Dt));return ne},ft=function(kt,Mt,Dt,jt){var Zt,Kt,zt;for(jt==null&&(jt=T),Zt=kt[Dt];Dt>Mt;){if(zt=Dt-1>>1,Kt=kt[zt],jt(Zt,Kt)<0){kt[Dt]=Kt,Dt=zt;continue}break}return kt[Dt]=Zt},At=function(kt,Mt,Dt){var jt,Zt,Kt,zt,ee;for(Dt==null&&(Dt=T),Zt=kt.length,ee=Mt,Kt=kt[Mt],jt=2*Mt+1;jt0;){var Kt=Mt.pop(),zt=At(Kt),ee=Kt.id();if(et[ee]=zt,zt!==1/0)for(var Vt=Kt.neighborhood().intersect(lt),fe=0;fe0)for(En.unshift(Ve);W[Kn];){var Sn=W[Kn];En.unshift(Sn.edge),En.unshift(Sn.node),Dn=Sn.node,Kn=Dn.id()}return $.spawn(En)}}}},aY={kruskal:function(g){g=g||function(Dt){return 1};for(var x=this.byGroup(),T=x.nodes,A=x.edges,D=T.length,O=new Array(D),$=T,q=function(jt){for(var Zt=0;Zt0;){if(Zt(),zt++,jt===G){for(var ee=[],Vt=D,fe=G,ge=kt[fe];ee.unshift(Vt),ge!=null&&ee.unshift(ge),Vt=At[fe],Vt!=null;)fe=Vt.id(),ge=kt[fe];return{found:!0,distance:W[jt],path:this.spawn(ee),steps:zt}}at[jt]=!0;for(var ne=Dt._private.edges,Pe=0;Pege&&(lt[fe]=ge,Mt[fe]=Vt,Dt[fe]=Zt),!D){var ne=Vt*G+ee;!D&<[ne]>ge&&(lt[ne]=ge,Mt[ne]=ee,Dt[ne]=Zt)}}}for(var Pe=0;Pe1&&arguments[1]!==void 0?arguments[1]:O,Ga=Dt(Si),Ys=[],zs=Ga;;){if(zs==null)return x.spawn();var Er=Mt(zs),Qt=Er.edge,jn=Er.pred;if(Ys.unshift(zs[0]),zs.same(Ui)&&Ys.length>0)break;Qt!=null&&Ys.unshift(Qt),zs=jn}return q.spawn(Ys)},Kt=0;Kt=0;G--){var W=S[G],et=W[1],at=W[2];(x[et]===$&&x[at]===q||x[et]===q&&x[at]===$)&&S.splice(G,1)}for(var lt=0;ltA;){var D=Math.floor(Math.random()*x.length);x=gY(D,g,x),T--}return x},pY={kargerStein:function(){var g=this,x=this.byGroup(),T=x.nodes,A=x.edges;A.unmergeBy(function(En){return En.isLoop()});var D=T.length,O=A.length,$=Math.ceil(Math.pow(Math.log(D)/Math.LN2,2)),q=Math.floor(D/dY);if(D<2){bl("At least 2 nodes are required for Karger-Stein algorithm");return}for(var S=[],G=0;G1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.length,A=1/0,D=x;D1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.length,A=-1/0,D=x;D1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.length,A=0,D=0,O=x;O1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.length,A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,D=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,O=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;A?g=g.slice(x,T):(T0&&g.splice(0,x));for(var $=0,q=g.length-1;q>=0;q--){var S=g[q];O?isFinite(S)||(g[q]=-1/0,$++):g.splice(q,1)}D&&g.sort(function(et,at){return et-at});var G=g.length,W=Math.floor(G/2);return G%2!==0?g[W+1+$]:(g[W-1+$]+g[W+$])/2},xY=function(g){return Math.PI*g/180},NT=function(g,x){return Math.atan2(x,g)-Math.PI/2},xL=Math.log2||function(y){return Math.log(y)/Math.log(2)},ZP=function(g){return g>0?1:g<0?-1:0},E3=function(g,x){return Math.sqrt(T3(g,x))},T3=function(g,x){var T=x.x-g.x,A=x.y-g.y;return T*T+A*A},kY=function(g){for(var x=g.length,T=0,A=0;A=g.x1&&g.y2>=g.y1)return{x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,w:g.x2-g.x1,h:g.y2-g.y1};if(g.w!=null&&g.h!=null&&g.w>=0&&g.h>=0)return{x1:g.x1,y1:g.y1,x2:g.x1+g.w,y2:g.y1+g.h,w:g.w,h:g.h}}},TY=function(g){return{x1:g.x1,x2:g.x2,w:g.w,y1:g.y1,y2:g.y2,h:g.h}},CY=function(g){g.x1=1/0,g.y1=1/0,g.x2=-1/0,g.y2=-1/0,g.w=0,g.h=0},_Y=function(g,x){g.x1=Math.min(g.x1,x.x1),g.x2=Math.max(g.x2,x.x2),g.w=g.x2-g.x1,g.y1=Math.min(g.y1,x.y1),g.y2=Math.max(g.y2,x.y2),g.h=g.y2-g.y1},SY=function(g,x,T){g.x1=Math.min(g.x1,x),g.x2=Math.max(g.x2,x),g.w=g.x2-g.x1,g.y1=Math.min(g.y1,T),g.y2=Math.max(g.y2,T),g.h=g.y2-g.y1},PT=function(g){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return g.x1-=x,g.x2+=x,g.y1-=x,g.y2+=x,g.w=g.x2-g.x1,g.h=g.y2-g.y1,g},kL=function(g){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],T,A,D,O;if(x.length===1)T=A=D=O=x[0];else if(x.length===2)T=D=x[0],O=A=x[1];else if(x.length===4){var $=E(x,4);T=$[0],A=$[1],D=$[2],O=$[3]}return g.x1-=O,g.x2+=A,g.y1-=T,g.y2+=D,g.w=g.x2-g.x1,g.h=g.y2-g.y1,g},JP=function(g,x){g.x1=x.x1,g.y1=x.y1,g.x2=x.x2,g.y2=x.y2,g.w=g.x2-g.x1,g.h=g.y2-g.y1},EL=function(g,x){return!(g.x1>x.x2||x.x1>g.x2||g.x2x.y2||x.y1>g.y2)},G5=function(g,x,T){return g.x1<=x&&x<=g.x2&&g.y1<=T&&T<=g.y2},AY=function(g,x){return G5(g,x.x,x.y)},tF=function(g,x){return G5(g,x.x1,x.y1)&&G5(g,x.x2,x.y2)},eF=function(g,x,T,A,D,O,$){var q=xk(D,O),S=D/2,G=O/2,W;{var et=T-S+q-$,at=A-G-$,lt=T+S-q+$,ft=at;if(W=vm(g,x,T,A,et,at,lt,ft,!1),W.length>0)return W}{var At=T+S+$,kt=A-G+q-$,Mt=At,Dt=A+G-q+$;if(W=vm(g,x,T,A,At,kt,Mt,Dt,!1),W.length>0)return W}{var jt=T-S+q-$,Zt=A+G+$,Kt=T+S-q+$,zt=Zt;if(W=vm(g,x,T,A,jt,Zt,Kt,zt,!1),W.length>0)return W}{var ee=T-S-$,Vt=A-G+q-$,fe=ee,ge=A+G-q+$;if(W=vm(g,x,T,A,ee,Vt,fe,ge,!1),W.length>0)return W}var ne;{var Pe=T-S+q,pe=A-G+q;if(ne=mk(g,x,T,A,Pe,pe,q+$),ne.length>0&&ne[0]<=Pe&&ne[1]<=pe)return[ne[0],ne[1]]}{var bn=T+S-q,ze=A-G+q;if(ne=mk(g,x,T,A,bn,ze,q+$),ne.length>0&&ne[0]>=bn&&ne[1]<=ze)return[ne[0],ne[1]]}{var Ve=T+S-q,En=A+G-q;if(ne=mk(g,x,T,A,Ve,En,q+$),ne.length>0&&ne[0]>=Ve&&ne[1]>=En)return[ne[0],ne[1]]}{var Dn=T-S+q,Kn=A+G-q;if(ne=mk(g,x,T,A,Dn,Kn,q+$),ne.length>0&&ne[0]<=Dn&&ne[1]>=Kn)return[ne[0],ne[1]]}return[]},LY=function(g,x,T,A,D,O,$){var q=$,S=Math.min(T,D),G=Math.max(T,D),W=Math.min(A,O),et=Math.max(A,O);return S-q<=g&&g<=G+q&&W-q<=x&&x<=et+q},MY=function(g,x,T,A,D,O,$,q,S){var G={x1:Math.min(T,$,D)-S,x2:Math.max(T,$,D)+S,y1:Math.min(A,q,O)-S,y2:Math.max(A,q,O)+S};return!(gG.x2||xG.y2)},IY=function(g,x,T,A){T-=A;var D=x*x-4*g*T;if(D<0)return[];var O=Math.sqrt(D),$=2*g,q=(-x+O)/$,S=(-x-O)/$;return[q,S]},DY=function(g,x,T,A,D){var O=1e-5;g===0&&(g=O),x/=g,T/=g,A/=g;var $,q,S,G,W,et,at,lt;if(q=(3*T-x*x)/9,S=-(27*A)+x*(9*T-2*(x*x)),S/=54,$=q*q*q+S*S,D[1]=0,at=x/3,$>0){W=S+Math.sqrt($),W=W<0?-Math.pow(-W,1/3):Math.pow(W,1/3),et=S-Math.sqrt($),et=et<0?-Math.pow(-et,1/3):Math.pow(et,1/3),D[0]=-at+W+et,at+=(W+et)/2,D[4]=D[2]=-at,at=Math.sqrt(3)*(-et+W)/2,D[3]=at,D[5]=-at;return}if(D[5]=D[3]=0,$===0){lt=S<0?-Math.pow(-S,1/3):Math.pow(S,1/3),D[0]=-at+2*lt,D[4]=D[2]=-(lt+at);return}q=-q,G=q*q*q,G=Math.acos(S/Math.sqrt(G)),lt=2*Math.sqrt(q),D[0]=-at+lt*Math.cos(G/3),D[2]=-at+lt*Math.cos((G+2*Math.PI)/3),D[4]=-at+lt*Math.cos((G+4*Math.PI)/3)},OY=function(g,x,T,A,D,O,$,q){var S=1*T*T-4*T*D+2*T*$+4*D*D-4*D*$+$*$+A*A-4*A*O+2*A*q+4*O*O-4*O*q+q*q,G=1*9*T*D-3*T*T-3*T*$-6*D*D+3*D*$+9*A*O-3*A*A-3*A*q-6*O*O+3*O*q,W=1*3*T*T-6*T*D+T*$-T*g+2*D*D+2*D*g-$*g+3*A*A-6*A*O+A*q-A*x+2*O*O+2*O*x-q*x,et=1*T*D-T*T+T*g-D*g+A*O-A*A+A*x-O*x,at=[];DY(S,G,W,et,at);for(var lt=1e-7,ft=[],At=0;At<6;At+=2)Math.abs(at[At+1])=0&&at[At]<=1&&ft.push(at[At]);ft.push(1),ft.push(0);for(var kt=-1,Mt,Dt,jt,Zt=0;Zt=0?jtS?(g-D)*(g-D)+(x-O)*(x-O):G-et},jd=function(g,x,T){for(var A,D,O,$,q,S=0,G=0;G=g&&g>=O||A<=g&&g<=O)q=(g-A)/(O-A)*($-D)+D,q>x&&S++;else continue;return S%2!==0},lv=function(g,x,T,A,D,O,$,q,S){var G=new Array(T.length),W;q[0]!=null?(W=Math.atan(q[1]/q[0]),q[0]<0?W=W+Math.PI/2:W=-W-Math.PI/2):W=q;for(var et=Math.cos(-W),at=Math.sin(-W),lt=0;lt0){var At=rF(G,-S);ft=nF(At)}else ft=G;return jd(g,x,ft)},PY=function(g,x,T,A,D,O,$){for(var q=new Array(T.length),S=O/2,G=$/2,W=_L(O,$),et=W*W,at=0;at=0&&At<=1&&Mt.push(At),kt>=0&&kt<=1&&Mt.push(kt),Mt.length===0)return[];var Dt=Mt[0]*q[0]+g,jt=Mt[0]*q[1]+x;if(Mt.length>1){if(Mt[0]==Mt[1])return[Dt,jt];var Zt=Mt[1]*q[0]+g,Kt=Mt[1]*q[1]+x;return[Dt,jt,Zt,Kt]}else return[Dt,jt]},TL=function(g,x,T){return x<=g&&g<=T||T<=g&&g<=x?g:g<=x&&x<=T||T<=x&&x<=g?x:T},vm=function(g,x,T,A,D,O,$,q,S){var G=g-D,W=T-g,et=$-D,at=x-O,lt=A-x,ft=q-O,At=et*at-ft*G,kt=W*at-lt*G,Mt=ft*W-et*lt;if(Mt!==0){var Dt=At/Mt,jt=kt/Mt,Zt=.001,Kt=0-Zt,zt=1+Zt;return Kt<=Dt&&Dt<=zt&&Kt<=jt&&jt<=zt?[g+Dt*W,x+Dt*lt]:S?[g+Dt*W,x+Dt*lt]:[]}else return At===0||kt===0?TL(g,T,$)===$?[$,q]:TL(g,T,D)===D?[D,O]:TL(D,$,T)===T?[T,A]:[]:[]},yk=function(g,x,T,A,D,O,$,q){var S=[],G,W=new Array(T.length),et=!0;O==null&&(et=!1);var at;if(et){for(var lt=0;lt0){var ft=rF(W,-q);at=nF(ft)}else at=W}else at=T;for(var At,kt,Mt,Dt,jt=0;jt2){for(var ze=[S[0],S[1]],Ve=Math.pow(ze[0]-g,2)+Math.pow(ze[1]-x,2),En=1;EnG&&(G=jt)},get:function(Dt){return S[Dt]}},et=0;et<$.length;et++){var at=$[et],lt=at.id();T?q[lt]=at.outgoers().nodes():q[lt]=at.openNeighborhood().nodes(),W.set(lt,0)}for(var ft=function(Dt){for(var jt=$[Dt].id(),Zt=[],Kt={},zt={},ee={},Vt=new vk(function(ur,tr){return ee[ur]-ee[tr]}),fe=0;fe<$.length;fe++){var ge=$[fe].id();Kt[ge]=[],zt[ge]=0,ee[ge]=1/0}for(zt[jt]=1,ee[jt]=0,Vt.push(jt);!Vt.empty();){var ne=Vt.pop();if(Zt.push(ne),D)for(var Pe=0;Pe0?ze=bn.edgesTo(pe)[0]:ze=pe.edgesTo(bn)[0];var Ve=A(ze);pe=pe.id(),ee[pe]>ee[ne]+Ve&&(ee[pe]=ee[ne]+Ve,Vt.nodes.indexOf(pe)<0?Vt.push(pe):Vt.updateItem(pe),zt[pe]=0,Kt[pe]=[]),ee[pe]==ee[ne]+Ve&&(zt[pe]=zt[pe]+zt[ne],Kt[pe].push(ne))}else for(var En=0;En0;){for(var Wn=Zt.pop(),rr=0;rr0&&$.push(T[q]);$.length!==0&&D.push(A.collection($))}return D},XY=function(g,x){for(var T=0;T5&&arguments[5]!==void 0?arguments[5]:JY,$=A,q,S,G=0;G=2?kk(g,x,T,0,dF,tX):kk(g,x,T,0,fF)},squaredEuclidean:function(g,x,T){return kk(g,x,T,0,dF)},manhattan:function(g,x,T){return kk(g,x,T,0,fF)},max:function(g,x,T){return kk(g,x,T,-1/0,eX)}};W5["squared-euclidean"]=W5.squaredEuclidean,W5.squaredeuclidean=W5.squaredEuclidean;function BT(y,g,x,T,A,D){var O;return yt(y)?O=y:O=W5[y]||W5.euclidean,g===0&&yt(y)?O(A,D):O(g,x,T,A,D)}var nX=Bf({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),LL=function(g){return nX(g)},RT=function(g,x,T,A,D){var O=D!=="kMedoids",$=O?function(W){return T[W]}:function(W){return A[W](T)},q=function(et){return A[et](x)},S=T,G=x;return BT(g,A.length,$,q,S,G)},ML=function(g,x,T){for(var A=T.length,D=new Array(A),O=new Array(A),$=new Array(x),q=null,S=0;ST)return!1}return!0},sX=function(g,x,T){for(var A=0;A$&&($=x[S][G],q=G);D[q].push(g[S])}for(var W=0;W=D.threshold||D.mode==="dendrogram"&&g.length===1)return!1;var lt=x[O],ft=x[A[O]],At;D.mode==="dendrogram"?At={left:lt,right:ft,key:lt.key}:At={value:lt.value.concat(ft.value),key:lt.key},g[lt.index]=At,g.splice(ft.index,1),x[lt.key]=At;for(var kt=0;ktT[ft.key][Mt.key]&&(q=T[ft.key][Mt.key])):D.linkage==="max"?(q=T[lt.key][Mt.key],T[lt.key][Mt.key]0&&A.push(D);return A},xF=function(g,x,T){for(var A=[],D=0;D$&&(O=S,$=x[D*g+S])}O>0&&A.push(O)}for(var G=0;GS&&(q=G,S=W)}T[D]=O[q]}return A=xF(g,x,T),A},kF=function(g){for(var x=this.cy(),T=this.nodes(),A=mX(g),D={},O=0;O=ge?(ne=ge,ge=pe,Pe=bn):pe>ne&&(ne=pe);for(var ze=0;ze<$;ze++)W[fe*$+ze]=(1-A.damping)*(S[fe*$+ze]-ge)+A.damping*Dt[ze];W[fe*$+Pe]=(1-A.damping)*(S[fe*$+Pe]-ne)+A.damping*Dt[Pe]}for(var Ve=0;Ve<$;Ve++){for(var En=0,Dn=0;Dn<$;Dn++)Dt[Dn]=et[Dn*$+Ve],jt[Dn]=Math.max(0,W[Dn*$+Ve]),En+=jt[Dn];En-=jt[Ve],jt[Ve]=W[Ve*$+Ve],En+=jt[Ve];for(var Kn=0;Kn<$;Kn++)et[Kn*$+Ve]=(1-A.damping)*Math.min(0,En-jt[Kn])+A.damping*Dt[Kn];et[Ve*$+Ve]=(1-A.damping)*(En-jt[Ve])+A.damping*Dt[Ve]}for(var Sn=0,Wn=0;Wn<$;Wn++){var rr=et[Wn*$+Wn]+W[Wn*$+Wn]>0?1:0;zt[Vt%A.minIterations*$+Wn]=rr,Sn+=rr}if(Sn>0&&(Vt>=A.minIterations-1||Vt==A.maxIterations-1)){for(var vr=0,ur=0;ur<$;ur++){Zt[ur]=0;for(var tr=0;tr1||Kt>1)&&($=!0),W[Dt]=[],Mt.outgoers().forEach(function(ee){ee.isEdge()&&W[Dt].push(ee.id())})}else et[Dt]=[void 0,Mt.target().id()]}):O.forEach(function(Mt){var Dt=Mt.id();if(Mt.isNode()){var jt=Mt.degree(!0);jt%2&&(q?S?$=!0:S=Dt:q=Dt),W[Dt]=[],Mt.connectedEdges().forEach(function(Zt){return W[Dt].push(Zt.id())})}else et[Dt]=[Mt.source().id(),Mt.target().id()]});var at={found:!1,trail:void 0};if($)return at;if(S&&q)if(D){if(G&&S!=G)return at;G=S}else{if(G&&S!=G&&q!=G)return at;G||(G=S)}else G||(G=O[0].id());var lt=function(Dt){for(var jt=Dt,Zt=[Dt],Kt,zt,ee;W[jt].length;)Kt=W[jt].shift(),zt=et[Kt][0],ee=et[Kt][1],jt!=ee?(W[ee]=W[ee].filter(function(Vt){return Vt!=Kt}),jt=ee):!D&&jt!=zt&&(W[zt]=W[zt].filter(function(Vt){return Vt!=Kt}),jt=zt),Zt.unshift(Kt),Zt.unshift(jt);return Zt},ft=[],At=[];for(At=lt(G);At.length!=1;)W[At[0]].length==0?(ft.unshift(O.getElementById(At.shift())),ft.unshift(O.getElementById(At.shift()))):At=lt(At.shift()).concat(At);ft.unshift(O.getElementById(At.shift()));for(var kt in W)if(W[kt].length)return at;return at.found=!0,at.trail=this.spawn(ft,!0),at}},$T=function(){var g=this,x={},T=0,A=0,D=[],O=[],$={},q=function(et,at){for(var lt=O.length-1,ft=[],At=g.spawn();O[lt].x!=et||O[lt].y!=at;)ft.push(O.pop().edge),lt--;ft.push(O.pop().edge),ft.forEach(function(kt){var Mt=kt.connectedNodes().intersection(g);At.merge(kt),Mt.forEach(function(Dt){var jt=Dt.id(),Zt=Dt.connectedEdges().intersection(g);At.merge(Dt),x[jt].cutVertex?At.merge(Zt.filter(function(Kt){return Kt.isLoop()})):At.merge(Zt)})}),D.push(At)},S=function W(et,at,lt){et===lt&&(A+=1),x[at]={id:T,low:T++,cutVertex:!1};var ft=g.getElementById(at).connectedEdges().intersection(g);if(ft.size()===0)D.push(g.spawn(g.getElementById(at)));else{var At,kt,Mt,Dt;ft.forEach(function(jt){At=jt.source().id(),kt=jt.target().id(),Mt=At===at?kt:At,Mt!==lt&&(Dt=jt.id(),$[Dt]||($[Dt]=!0,O.push({x:at,y:Mt,edge:jt})),Mt in x?x[at].low=Math.min(x[at].low,x[Mt].id):(W(et,Mt,at),x[at].low=Math.min(x[at].low,x[Mt].low),x[at].id<=x[Mt].low&&(x[at].cutVertex=!0,q(at,Mt))))})}};g.forEach(function(W){if(W.isNode()){var et=W.id();et in x||(A=0,S(et,et),x[et].cutVertex=A>1)}});var G=Object.keys(x).filter(function(W){return x[W].cutVertex}).map(function(W){return g.getElementById(W)});return{cut:g.spawn(G),components:D}},SX={hopcroftTarjanBiconnected:$T,htbc:$T,htb:$T,hopcroftTarjanBiconnectedComponents:$T},zT=function(){var g=this,x={},T=0,A=[],D=[],O=g.spawn(g),$=function q(S){D.push(S),x[S]={index:T,low:T++,explored:!1};var G=g.getElementById(S).connectedEdges().intersection(g);if(G.forEach(function(ft){var At=ft.target().id();At!==S&&(At in x||q(At),x[At].explored||(x[S].low=Math.min(x[S].low,x[At].low)))}),x[S].index===x[S].low){for(var W=g.spawn();;){var et=D.pop();if(W.merge(g.getElementById(et)),x[et].low=x[S].index,x[et].explored=!0,et===S)break}var at=W.edgesWith(W),lt=W.merge(at);A.push(lt),O=O.difference(lt)}};return g.forEach(function(q){if(q.isNode()){var S=q.id();S in x||$(S)}}),{cut:O,components:A}},AX={tarjanStronglyConnected:zT,tsc:zT,tscc:zT,tarjanStronglyConnectedComponents:zT},EF={};[bk,sY,aY,cY,lY,fY,pY,$Y,V5,U5,AL,ZY,hX,vX,TX,_X,SX,AX].forEach(function(y){me(EF,y)});/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/var TF=0,CF=1,_F=2,hv=function y(g){if(!(this instanceof y))return new y(g);this.id="Thenable/1.0.7",this.state=TF,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof g=="function"&&g.call(this,this.fulfill.bind(this),this.reject.bind(this))};hv.prototype={fulfill:function(g){return SF(this,CF,"fulfillValue",g)},reject:function(g){return SF(this,_F,"rejectReason",g)},then:function(g,x){var T=this,A=new hv;return T.onFulfilled.push(MF(g,A,"fulfill")),T.onRejected.push(MF(x,A,"reject")),AF(T),A.proxy}};var SF=function(g,x,T,A){return g.state===TF&&(g.state=x,g[T]=A,AF(g)),g},AF=function(g){g.state===CF?LF(g,"onFulfilled",g.fulfillValue):g.state===_F&&LF(g,"onRejected",g.rejectReason)},LF=function(g,x,T){if(g[x].length!==0){var A=g[x];g[x]=[];var D=function(){for(var $=0;$0}},clearQueue:function(){return function(){var x=this,T=x.length!==void 0,A=T?x:[x],D=this._private.cy||this;if(!D.styleEnabled())return this;for(var O=0;O-1}var LQ=AQ;function MQ(y,g){var x=this.__data__,T=GT(x,y);return T<0?(++this.size,x.push([y,g])):x[T][1]=g,this}var IQ=MQ;function X5(y){var g=-1,x=y==null?0:y.length;for(this.clear();++g-1&&y%1==0&&y0&&this.spawn(A).updateStyle().emit("class"),x},addClass:function(g){return this.toggleClass(g,!0)},hasClass:function(g){var x=this[0];return x!=null&&x._private.classes.has(g)},toggleClass:function(g,x){dt(g)||(g=g.match(/\S+/g)||[]);for(var T=this,A=x===void 0,D=[],O=0,$=T.length;O<$;O++)for(var q=T[O],S=q._private.classes,G=!1,W=0;W0&&this.spawn(D).updateStyle().emit("class"),T},removeClass:function(g){return this.toggleClass(g,!1)},flashClass:function(g,x){var T=this;if(x==null)x=250;else if(x===0)return T;return T.addClass(g),setTimeout(function(){T.removeClass(g)},x),T}};KT.className=KT.classNames=KT.classes;var tc={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ke,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};tc.variable="(?:[\\w-.]|(?:\\\\"+tc.metaChar+"))+",tc.className="(?:[\\w-]|(?:\\\\"+tc.metaChar+"))+",tc.value=tc.string+"|"+tc.number,tc.id=tc.variable,function(){var y,g,x;for(y=tc.comparatorOp.split("|"),x=0;x=0)&&g!=="="&&(tc.comparatorOp+="|\\!"+g)}();var Kc=function(){return{checks:[]}},zi={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},FL=[{selector:":selected",matches:function(g){return g.selected()}},{selector:":unselected",matches:function(g){return!g.selected()}},{selector:":selectable",matches:function(g){return g.selectable()}},{selector:":unselectable",matches:function(g){return!g.selectable()}},{selector:":locked",matches:function(g){return g.locked()}},{selector:":unlocked",matches:function(g){return!g.locked()}},{selector:":visible",matches:function(g){return g.visible()}},{selector:":hidden",matches:function(g){return!g.visible()}},{selector:":transparent",matches:function(g){return g.transparent()}},{selector:":grabbed",matches:function(g){return g.grabbed()}},{selector:":free",matches:function(g){return!g.grabbed()}},{selector:":removed",matches:function(g){return g.removed()}},{selector:":inside",matches:function(g){return!g.removed()}},{selector:":grabbable",matches:function(g){return g.grabbable()}},{selector:":ungrabbable",matches:function(g){return!g.grabbable()}},{selector:":animated",matches:function(g){return g.animated()}},{selector:":unanimated",matches:function(g){return!g.animated()}},{selector:":parent",matches:function(g){return g.isParent()}},{selector:":childless",matches:function(g){return g.isChildless()}},{selector:":child",matches:function(g){return g.isChild()}},{selector:":orphan",matches:function(g){return g.isOrphan()}},{selector:":nonorphan",matches:function(g){return g.isChild()}},{selector:":compound",matches:function(g){return g.isNode()?g.isParent():g.source().isParent()||g.target().isParent()}},{selector:":loop",matches:function(g){return g.isLoop()}},{selector:":simple",matches:function(g){return g.isSimple()}},{selector:":active",matches:function(g){return g.active()}},{selector:":inactive",matches:function(g){return!g.active()}},{selector:":backgrounding",matches:function(g){return g.backgrounding()}},{selector:":nonbackgrounding",matches:function(g){return!g.backgrounding()}}].sort(function(y,g){return Ne(y.selector,g.selector)}),IZ=function(){for(var y={},g,x=0;x0&&G.edgeCount>0)return Sc("The selector `"+g+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(G.edgeCount>1)return Sc("The selector `"+g+"` is invalid because it uses multiple edge selectors"),!1;G.edgeCount===1&&Sc("The selector `"+g+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},BZ=function(){if(this.toStringCache!=null)return this.toStringCache;for(var g=function(G){return G??""},x=function(G){return mt(G)?'"'+G+'"':g(G)},T=function(G){return" "+G+" "},A=function(G,W){var et=G.type,at=G.value;switch(et){case zi.GROUP:{var lt=g(at);return lt.substring(0,lt.length-1)}case zi.DATA_COMPARE:{var ft=G.field,At=G.operator;return"["+ft+T(g(At))+x(at)+"]"}case zi.DATA_BOOL:{var kt=G.operator,Mt=G.field;return"["+g(kt)+Mt+"]"}case zi.DATA_EXIST:{var Dt=G.field;return"["+Dt+"]"}case zi.META_COMPARE:{var jt=G.operator,Zt=G.field;return"[["+Zt+T(g(jt))+x(at)+"]]"}case zi.STATE:return at;case zi.ID:return"#"+at;case zi.CLASS:return"."+at;case zi.PARENT:case zi.CHILD:return D(G.parent,W)+T(">")+D(G.child,W);case zi.ANCESTOR:case zi.DESCENDANT:return D(G.ancestor,W)+" "+D(G.descendant,W);case zi.COMPOUND_SPLIT:{var Kt=D(G.left,W),zt=D(G.subject,W),ee=D(G.right,W);return Kt+(Kt.length>0?" ":"")+zt+ee}case zi.TRUE:return""}},D=function(G,W){return G.checks.reduce(function(et,at,lt){return et+(W===G&<===0?"$":"")+A(at,W)},"")},O="",$=0;$1&&$=0&&(x=x.replace("!",""),W=!0),x.indexOf("@")>=0&&(x=x.replace("@",""),G=!0),(D||$||G)&&(q=!D&&!O?"":""+g,S=""+T),G&&(g=q=q.toLowerCase(),T=S=S.toLowerCase()),x){case"*=":A=q.indexOf(S)>=0;break;case"$=":A=q.indexOf(S,q.length-S.length)>=0;break;case"^=":A=q.indexOf(S)===0;break;case"=":A=g===T;break;case">":et=!0,A=g>T;break;case">=":et=!0,A=g>=T;break;case"<":et=!0,A=g0;){var G=A.shift();g(G),D.add(G.id()),$&&T(A,D,G)}return y}function Tk(y,g,x){if(x.isParent())for(var T=x._private.children,A=0;A1&&arguments[1]!==void 0?arguments[1]:!0;return YT(this,y,g,Tk)};function YF(y,g,x){if(x.isChild()){var T=x._private.parent;g.has(T.id())||y.push(T)}}J5.forEachUp=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return YT(this,y,g,YF)};function VZ(y,g,x){YF(y,g,x),Tk(y,g,x)}J5.forEachUpAndDown=function(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return YT(this,y,g,VZ)},J5.ancestors=J5.parents;var Ck,XF;Ck=XF={data:Ac.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Ac.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ac.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ac.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ac.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ac.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var g=this[0];if(g)return g._private.data.id}},Ck.attr=Ck.data,Ck.removeAttr=Ck.removeData;var UZ=XF,XT={};function tx(y){return function(g){var x=this;if(g===void 0&&(g=!0),x.length!==0)if(x.isNode()&&!x.removed()){for(var T=0,A=x[0],D=A._private.edges,O=0;Og}),minIndegree:ex("indegree",function(y,g){return yg}),minOutdegree:ex("outdegree",function(y,g){return yg})}),me(XT,{totalDegree:function(g){for(var x=0,T=this.nodes(),A=0;A0,et=W;W&&(G=G[0]);var at=et?G.position():{x:0,y:0};x!==void 0?S.position(g,x+at[g]):D!==void 0&&S.position({x:D.x+at.x,y:D.y+at.y})}else{var lt=T.position(),ft=$?T.parent():null,At=ft&&ft.length>0,kt=At;At&&(ft=ft[0]);var Mt=kt?ft.position():{x:0,y:0};return D={x:lt.x-Mt.x,y:lt.y-Mt.y},g===void 0?D:D[g]}else if(!O)return;return this}},wp.modelPosition=wp.point=wp.position,wp.modelPositions=wp.points=wp.positions,wp.renderedPoint=wp.renderedPosition,wp.relativePoint=wp.relativePosition;var JF=QF,nx,qb;nx=qb={},qb.renderedBoundingBox=function(y){var g=this.boundingBox(y),x=this.cy(),T=x.zoom(),A=x.pan(),D=g.x1*T+A.x,O=g.x2*T+A.x,$=g.y1*T+A.y,q=g.y2*T+A.y;return{x1:D,x2:O,y1:$,y2:q,w:O-D,h:q-$}},qb.dirtyCompoundBoundsCache=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=this.cy();return!g.styleEnabled()||!g.hasCompoundNodes()?this:(this.forEachUp(function(x){if(x.isParent()){var T=x._private;T.compoundBoundsClean=!1,T.bbCache=null,y||x.emitAndNotify("bounds")}}),this)},qb.updateCompoundBounds=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=this.cy();if(!g.styleEnabled()||!g.hasCompoundNodes())return this;if(!y&&g.batching())return this;function x(O){if(!O.isParent())return;var $=O._private,q=O.children(),S=O.pstyle("compound-sizing-wrt-labels").value==="include",G={width:{val:O.pstyle("min-width").pfValue,left:O.pstyle("min-width-bias-left"),right:O.pstyle("min-width-bias-right")},height:{val:O.pstyle("min-height").pfValue,top:O.pstyle("min-height-bias-top"),bottom:O.pstyle("min-height-bias-bottom")}},W=q.boundingBox({includeLabels:S,includeOverlays:!1,useCache:!1}),et=$.position;(W.w===0||W.h===0)&&(W={w:O.pstyle("width").pfValue,h:O.pstyle("height").pfValue},W.x1=et.x-W.w/2,W.x2=et.x+W.w/2,W.y1=et.y-W.h/2,W.y2=et.y+W.h/2);function at(Vt,fe,ge){var ne=0,Pe=0,pe=fe+ge;return Vt>0&&pe>0&&(ne=fe/pe*Vt,Pe=ge/pe*Vt),{biasDiff:ne,biasComplementDiff:Pe}}function lt(Vt,fe,ge,ne){if(ge.units==="%")switch(ne){case"width":return Vt>0?ge.pfValue*Vt:0;case"height":return fe>0?ge.pfValue*fe:0;case"average":return Vt>0&&fe>0?ge.pfValue*(Vt+fe)/2:0;case"min":return Vt>0&&fe>0?Vt>fe?ge.pfValue*fe:ge.pfValue*Vt:0;case"max":return Vt>0&&fe>0?Vt>fe?ge.pfValue*Vt:ge.pfValue*fe:0;default:return 0}else return ge.units==="px"?ge.pfValue:0}var ft=G.width.left.value;G.width.left.units==="px"&&G.width.val>0&&(ft=ft*100/G.width.val);var At=G.width.right.value;G.width.right.units==="px"&&G.width.val>0&&(At=At*100/G.width.val);var kt=G.height.top.value;G.height.top.units==="px"&&G.height.val>0&&(kt=kt*100/G.height.val);var Mt=G.height.bottom.value;G.height.bottom.units==="px"&&G.height.val>0&&(Mt=Mt*100/G.height.val);var Dt=at(G.width.val-W.w,ft,At),jt=Dt.biasDiff,Zt=Dt.biasComplementDiff,Kt=at(G.height.val-W.h,kt,Mt),zt=Kt.biasDiff,ee=Kt.biasComplementDiff;$.autoPadding=lt(W.w,W.h,O.pstyle("padding"),O.pstyle("padding-relative-to").value),$.autoWidth=Math.max(W.w,G.width.val),et.x=(-jt+W.x1+W.x2+Zt)/2,$.autoHeight=Math.max(W.h,G.height.val),et.y=(-zt+W.y1+W.y2+ee)/2}for(var T=0;Tg.x2?A:g.x2,g.y1=Tg.y2?D:g.y2,g.w=g.x2-g.x1,g.h=g.y2-g.y1)},S3=function(g,x){return x==null?g:mp(g,x.x1,x.y1,x.x2,x.y2)},Sk=function(g,x,T){return bp(g,x,T)},QT=function(g,x,T){if(!x.cy().headless()){var A=x._private,D=A.rstyle,O=D.arrowWidth/2,$=x.pstyle(T+"-arrow-shape").value,q,S;if($!=="none"){T==="source"?(q=D.srcX,S=D.srcY):T==="target"?(q=D.tgtX,S=D.tgtY):(q=D.midX,S=D.midY);var G=A.arrowBounds=A.arrowBounds||{},W=G[T]=G[T]||{};W.x1=q-O,W.y1=S-O,W.x2=q+O,W.y2=S+O,W.w=W.x2-W.x1,W.h=W.y2-W.y1,PT(W,1),mp(g,W.x1,W.y1,W.x2,W.y2)}}},tB=function(g,x,T){if(!x.cy().headless()){var A;T?A=T+"-":A="";var D=x._private,O=D.rstyle,$=x.pstyle(A+"label").strValue;if($){var q=x.pstyle("text-halign"),S=x.pstyle("text-valign"),G=Sk(O,"labelWidth",T),W=Sk(O,"labelHeight",T),et=Sk(O,"labelX",T),at=Sk(O,"labelY",T),lt=x.pstyle(A+"text-margin-x").pfValue,ft=x.pstyle(A+"text-margin-y").pfValue,At=x.isEdge(),kt=x.pstyle(A+"text-rotation"),Mt=x.pstyle("text-outline-width").pfValue,Dt=x.pstyle("text-border-width").pfValue,jt=Dt/2,Zt=x.pstyle("text-background-padding").pfValue,Kt=2,zt=W,ee=G,Vt=ee/2,fe=zt/2,ge,ne,Pe,pe;if(At)ge=et-Vt,ne=et+Vt,Pe=at-fe,pe=at+fe;else{switch(q.value){case"left":ge=et-ee,ne=et;break;case"center":ge=et-Vt,ne=et+Vt;break;case"right":ge=et,ne=et+ee;break}switch(S.value){case"top":Pe=at-zt,pe=at;break;case"center":Pe=at-fe,pe=at+fe;break;case"bottom":Pe=at,pe=at+zt;break}}ge+=lt-Math.max(Mt,jt)-Zt-Kt,ne+=lt+Math.max(Mt,jt)+Zt+Kt,Pe+=ft-Math.max(Mt,jt)-Zt-Kt,pe+=ft+Math.max(Mt,jt)+Zt+Kt;var bn=T||"main",ze=D.labelBounds,Ve=ze[bn]=ze[bn]||{};Ve.x1=ge,Ve.y1=Pe,Ve.x2=ne,Ve.y2=pe,Ve.w=ne-ge,Ve.h=pe-Pe;var En=At&&kt.strValue==="autorotate",Dn=kt.pfValue!=null&&kt.pfValue!==0;if(En||Dn){var Kn=En?Sk(D.rstyle,"labelAngle",T):kt.pfValue,Sn=Math.cos(Kn),Wn=Math.sin(Kn),rr=(ge+ne)/2,vr=(Pe+pe)/2;if(!At){switch(q.value){case"left":rr=ne;break;case"right":rr=ge;break}switch(S.value){case"top":vr=pe;break;case"bottom":vr=Pe;break}}var ur=function(ka,Ci){return ka=ka-rr,Ci=Ci-vr,{x:ka*Sn-Ci*Wn+rr,y:ka*Wn+Ci*Sn+vr}},tr=ur(ge,Pe),wn=ur(ge,pe),gr=ur(ne,Pe),fr=ur(ne,pe);ge=Math.min(tr.x,wn.x,gr.x,fr.x),ne=Math.max(tr.x,wn.x,gr.x,fr.x),Pe=Math.min(tr.y,wn.y,gr.y,fr.y),pe=Math.max(tr.y,wn.y,gr.y,fr.y)}var Jr=bn+"Rot",wi=ze[Jr]=ze[Jr]||{};wi.x1=ge,wi.y1=Pe,wi.x2=ne,wi.y2=pe,wi.w=ne-ge,wi.h=pe-Pe,mp(g,ge,Pe,ne,pe),mp(D.labelBounds.all,ge,Pe,ne,pe)}return g}},WZ=function(g,x){var T=g._private.cy,A=T.styleEnabled(),D=T.headless(),O=Rd(),$=g._private,q=g.isNode(),S=g.isEdge(),G,W,et,at,lt,ft,At=$.rstyle,kt=q&&A?g.pstyle("bounds-expansion").pfValue:[0],Mt=function(gs){return gs.pstyle("display").value!=="none"},Dt=!A||Mt(g)&&(!S||Mt(g.source())&&Mt(g.target()));if(Dt){var jt=0,Zt=0;A&&x.includeOverlays&&(jt=g.pstyle("overlay-opacity").value,jt!==0&&(Zt=g.pstyle("overlay-padding").value));var Kt=0,zt=0;A&&x.includeUnderlays&&(Kt=g.pstyle("underlay-opacity").value,Kt!==0&&(zt=g.pstyle("underlay-padding").value));var ee=Math.max(Zt,zt),Vt=0,fe=0;if(A&&(Vt=g.pstyle("width").pfValue,fe=Vt/2),q&&x.includeNodes){var ge=g.position();lt=ge.x,ft=ge.y;var ne=g.outerWidth(),Pe=ne/2,pe=g.outerHeight(),bn=pe/2;G=lt-Pe,W=lt+Pe,et=ft-bn,at=ft+bn,mp(O,G,et,W,at)}else if(S&&x.includeEdges)if(A&&!D){var ze=g.pstyle("curve-style").strValue;if(G=Math.min(At.srcX,At.midX,At.tgtX),W=Math.max(At.srcX,At.midX,At.tgtX),et=Math.min(At.srcY,At.midY,At.tgtY),at=Math.max(At.srcY,At.midY,At.tgtY),G-=fe,W+=fe,et-=fe,at+=fe,mp(O,G,et,W,at),ze==="haystack"){var Ve=At.haystackPts;if(Ve&&Ve.length===2){if(G=Ve[0].x,et=Ve[0].y,W=Ve[1].x,at=Ve[1].y,G>W){var En=G;G=W,W=En}if(et>at){var Dn=et;et=at,at=Dn}mp(O,G-fe,et-fe,W+fe,at+fe)}}else if(ze==="bezier"||ze==="unbundled-bezier"||ze==="segments"||ze==="taxi"){var Kn;switch(ze){case"bezier":case"unbundled-bezier":Kn=At.bezierPts;break;case"segments":case"taxi":Kn=At.linePts;break}if(Kn!=null)for(var Sn=0;SnW){var wn=G;G=W,W=wn}if(et>at){var gr=et;et=at,at=gr}G-=fe,W+=fe,et-=fe,at+=fe,mp(O,G,et,W,at)}if(A&&x.includeEdges&&S&&(QT(O,g,"mid-source"),QT(O,g,"mid-target"),QT(O,g,"source"),QT(O,g,"target")),A){var fr=g.pstyle("ghost").value==="yes";if(fr){var Jr=g.pstyle("ghost-offset-x").pfValue,wi=g.pstyle("ghost-offset-y").pfValue;mp(O,O.x1+Jr,O.y1+wi,O.x2+Jr,O.y2+wi)}}var Ks=$.bodyBounds=$.bodyBounds||{};JP(Ks,O),kL(Ks,kt),PT(Ks,1),A&&(G=O.x1,W=O.x2,et=O.y1,at=O.y2,mp(O,G-ee,et-ee,W+ee,at+ee));var ka=$.overlayBounds=$.overlayBounds||{};JP(ka,O),kL(ka,kt),PT(ka,1);var Ci=$.labelBounds=$.labelBounds||{};Ci.all!=null?CY(Ci.all):Ci.all=Rd(),A&&x.includeLabels&&(x.includeMainLabels&&tB(O,g,null),S&&(x.includeSourceLabels&&tB(O,g,"source"),x.includeTargetLabels&&tB(O,g,"target")))}return O.x1=C0(O.x1),O.y1=C0(O.y1),O.x2=C0(O.x2),O.y2=C0(O.y2),O.w=C0(O.x2-O.x1),O.h=C0(O.y2-O.y1),O.w>0&&O.h>0&&Dt&&(kL(O,kt),PT(O,1)),O},eB=function(g){var x=0,T=function(O){return(O?1:0)<0&&arguments[0]!==void 0?arguments[0]:oJ,g=arguments.length>1?arguments[1]:void 0,x=0;x=0;$--)O($);return this},km.removeAllListeners=function(){return this.removeListener("*")},km.emit=km.trigger=function(y,g,x){var T=this.listeners,A=T.length;return this.emitting++,dt(g)||(g=[g]),cJ(this,function(D,O){x!=null&&(T=[{event:O.event,type:O.type,namespace:O.namespace,callback:x}],A=T.length);for(var $=function(G){var W=T[G];if(W.type===O.type&&(!W.namespace||W.namespace===O.namespace||W.namespace===aJ)&&D.eventMatches(D.context,W,O)){var et=[O];g!=null&&YP(et,g),D.beforeEmit(D.context,W,O),W.conf&&W.conf.one&&(D.listeners=D.listeners.filter(function(ft){return ft!==W}));var at=D.callbackContext(D.context,W,O),lt=W.callback.apply(at,et);D.afterEmit(D.context,W,O),lt===!1&&(O.stopPropagation(),O.preventDefault())}},q=0;q1&&!O){var $=this.length-1,q=this[$],S=q._private.data.id;this[$]=void 0,this[g]=q,D.set(S,{ele:q,index:g})}return this.length--,this},unmergeOne:function(g){g=g[0];var x=this._private,T=g._private.data.id,A=x.map,D=A.get(T);if(!D)return this;var O=D.index;return this.unmergeAt(O),this},unmerge:function(g){var x=this._private.cy;if(!g)return this;if(g&&mt(g)){var T=g;g=x.mutableElements().filter(T)}for(var A=0;A=0;x--){var T=this[x];g(T)&&this.unmergeAt(x)}return this},map:function(g,x){for(var T=[],A=this,D=0;DT&&(T=q,A=$)}return{value:T,ele:A}},min:function(g,x){for(var T=1/0,A,D=this,O=0;O=0&&D"u"?"undefined":f(Symbol))!=g&&f(Symbol.iterator)!=g;x&&(e9[Symbol.iterator]=function(){var T=this,A={value:void 0,done:!1},D=0,O=this.length;return b({next:function(){return D1&&arguments[1]!==void 0?arguments[1]:!0,T=this[0],A=T.cy();if(A.styleEnabled()&&T){this.cleanStyle();var D=T._private.style[g];return D??(x?A.style().getDefaultProperty(g):null)}},numericStyle:function(g){var x=this[0];if(x.cy().styleEnabled()&&x){var T=x.pstyle(g);return T.pfValue!==void 0?T.pfValue:T.value}},numericStyleUnits:function(g){var x=this[0];if(x.cy().styleEnabled()&&x)return x.pstyle(g).units},renderedStyle:function(g){var x=this.cy();if(!x.styleEnabled())return this;var T=this[0];if(T)return x.style().getRenderedStyle(T,g)},style:function(g,x){var T=this.cy();if(!T.styleEnabled())return this;var A=!1,D=T.style();if(ht(g)){var O=g;D.applyBypass(this,O,A),this.emitAndNotify("style")}else if(mt(g))if(x===void 0){var $=this[0];return $?D.getStylePropertyValue($,g):void 0}else D.applyBypass(this,g,x,A),this.emitAndNotify("style");else if(g===void 0){var q=this[0];return q?D.getRawStyle(q):void 0}return this},removeStyle:function(g){var x=this.cy();if(!x.styleEnabled())return this;var T=!1,A=x.style(),D=this;if(g===void 0)for(var O=0;O0&&g.push(G[0]),g.push($[0])}return this.spawn(g,!0).filter(y)},"neighborhood"),closedNeighborhood:function(g){return this.neighborhood().add(this).filter(g)},openNeighborhood:function(g){return this.neighborhood(g)}}),h1.neighbourhood=h1.neighborhood,h1.closedNeighbourhood=h1.closedNeighborhood,h1.openNeighbourhood=h1.openNeighborhood,me(h1,{source:rd(function(g){var x=this[0],T;return x&&(T=x._private.source||x.cy().collection()),T&&g?T.filter(g):T},"source"),target:rd(function(g){var x=this[0],T;return x&&(T=x._private.target||x.cy().collection()),T&&g?T.filter(g):T},"target"),sources:xB({attr:"source"}),targets:xB({attr:"target"})});function xB(y){return function(x){for(var T=[],A=0;A0);return O},component:function(){var g=this[0];return g.cy().mutableElements().components(g)[0]}}),h1.componentsOf=h1.components;var jf=function(g,x){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(g===void 0){bl("A collection must have a reference to the core");return}var D=new zb,O=!1;if(!x)x=[];else if(x.length>0&&ht(x[0])&&!nt(x[0])){O=!0;for(var $=[],q=new z5,S=0,G=x.length;S0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,x=this,T=x.cy(),A=T._private,D=[],O=[],$,q=0,S=x.length;q0){for(var Dn=$.length===x.length?x:new jf(T,$),Kn=0;Kn0&&arguments[0]!==void 0?arguments[0]:!0,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,x=this,T=[],A={},D=x._private.cy;function O(pe){for(var bn=pe._private.edges,ze=0;ze0&&(y?ge.emitAndNotify("remove"):g&&ge.emit("remove"));for(var ne=0;ne0?ne=pe:ge=pe;while(Math.abs(Pe)>O&&++bn<$);return pe}function Zt(fe){for(var ge=0,ne=1,Pe=q-1;ne!==Pe&&et[ne]<=fe;++ne)ge+=S;--ne;var pe=(fe-et[ne])/(et[ne+1]-et[ne]),bn=ge+pe*S,ze=kt(bn,y,x);return ze>=D?Mt(fe,bn):ze===0?bn:jt(fe,ge,ge+S)}var Kt=!1;function zt(){Kt=!0,(y!==g||x!==T)&&Dt()}var ee=function(ge){return Kt||zt(),y===g&&x===T?ge:ge===0?0:ge===1?1:At(Zt(ge),g,T)};ee.getControlPoints=function(){return[{x:y,y:g},{x,y:T}]};var Vt="generateBezier("+[y,g,x,T]+")";return ee.toString=function(){return Vt},ee}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var mJ=function(){function y(T){return-T.tension*T.x-T.friction*T.v}function g(T,A,D){var O={x:T.x+D.dx*A,v:T.v+D.dv*A,tension:T.tension,friction:T.friction};return{dx:O.v,dv:y(O)}}function x(T,A){var D={dx:T.v,dv:y(T)},O=g(T,A*.5,D),$=g(T,A*.5,O),q=g(T,A,$),S=1/6*(D.dx+2*(O.dx+$.dx)+q.dx),G=1/6*(D.dv+2*(O.dv+$.dv)+q.dv);return T.x=T.x+S*A,T.v=T.v+G*A,T}return function T(A,D,O){var $={x:-1,v:0,tension:null,friction:null},q=[0],S=0,G=1/1e4,W=16/1e3,et,at,lt;for(A=parseFloat(A)||500,D=parseFloat(D)||20,O=O||null,$.tension=A,$.friction=D,et=O!==null,et?(S=T(A,D),at=S/O*W):at=W;lt=x(lt||$,at),q.push(1+lt.x),S+=16,Math.abs(lt.x)>G&&Math.abs(lt.v)>G;);return et?function(ft){return q[ft*(q.length-1)|0]}:S}}(),fu=function(g,x,T,A){var D=wJ(g,x,T,A);return function(O,$,q){return O+($-O)*D(q)}},s9={linear:function(g,x,T){return g+(x-g)*T},ease:fu(.25,.1,.25,1),"ease-in":fu(.42,0,1,1),"ease-out":fu(0,0,.58,1),"ease-in-out":fu(.42,0,.58,1),"ease-in-sine":fu(.47,0,.745,.715),"ease-out-sine":fu(.39,.575,.565,1),"ease-in-out-sine":fu(.445,.05,.55,.95),"ease-in-quad":fu(.55,.085,.68,.53),"ease-out-quad":fu(.25,.46,.45,.94),"ease-in-out-quad":fu(.455,.03,.515,.955),"ease-in-cubic":fu(.55,.055,.675,.19),"ease-out-cubic":fu(.215,.61,.355,1),"ease-in-out-cubic":fu(.645,.045,.355,1),"ease-in-quart":fu(.895,.03,.685,.22),"ease-out-quart":fu(.165,.84,.44,1),"ease-in-out-quart":fu(.77,0,.175,1),"ease-in-quint":fu(.755,.05,.855,.06),"ease-out-quint":fu(.23,1,.32,1),"ease-in-out-quint":fu(.86,0,.07,1),"ease-in-expo":fu(.95,.05,.795,.035),"ease-out-expo":fu(.19,1,.22,1),"ease-in-out-expo":fu(1,0,0,1),"ease-in-circ":fu(.6,.04,.98,.335),"ease-out-circ":fu(.075,.82,.165,1),"ease-in-out-circ":fu(.785,.135,.15,.86),spring:function(g,x,T){if(T===0)return s9.linear;var A=mJ(g,x,T);return function(D,O,$){return D+(O-D)*A($)}},"cubic-bezier":fu};function TB(y,g,x,T,A){if(T===1||g===x)return x;var D=A(g,x,T);return y==null||((y.roundValue||y.color)&&(D=Math.round(D)),y.min!==void 0&&(D=Math.max(D,y.min)),y.max!==void 0&&(D=Math.min(D,y.max))),D}function CB(y,g){return y.pfValue!=null||y.value!=null?y.pfValue!=null&&(g==null||g.type.units!=="%")?y.pfValue:y.value:y}function sx(y,g,x,T,A){var D=A!=null?A.type:null;x<0?x=0:x>1&&(x=1);var O=CB(y,A),$=CB(g,A);if(X(O)&&X($))return TB(D,O,$,x,T);if(dt(O)&&dt($)){for(var q=[],S=0;S<$.length;S++){var G=O[S],W=$[S];if(G!=null&&W!=null){var et=TB(D,G,W,x,T);q.push(et)}else q.push(W)}return q}}function yJ(y,g,x,T){var A=!T,D=y._private,O=g._private,$=O.easing,q=O.startTime,S=T?y:y.cy(),G=S.style();if(!O.easingImpl)if($==null)O.easingImpl=s9.linear;else{var W;if(mt($)){var et=G.parse("transition-timing-function",$);W=et.value}else W=$;var at,lt;mt(W)?(at=W,lt=[]):(at=W[1],lt=W.slice(2).map(function(Dn){return+Dn})),lt.length>0?(at==="spring"&<.push(O.duration),O.easingImpl=s9[at].apply(null,lt)):O.easingImpl=s9[at]}var ft=O.easingImpl,At;if(O.duration===0?At=1:At=(x-q)/O.duration,O.applying&&(At=O.progress),At<0?At=0:At>1&&(At=1),O.delay==null){var kt=O.startPosition,Mt=O.position;if(Mt&&A&&!y.locked()){var Dt={};Dk(kt.x,Mt.x)&&(Dt.x=sx(kt.x,Mt.x,At,ft)),Dk(kt.y,Mt.y)&&(Dt.y=sx(kt.y,Mt.y,At,ft)),y.position(Dt)}var jt=O.startPan,Zt=O.pan,Kt=D.pan,zt=Zt!=null&&T;zt&&(Dk(jt.x,Zt.x)&&(Kt.x=sx(jt.x,Zt.x,At,ft)),Dk(jt.y,Zt.y)&&(Kt.y=sx(jt.y,Zt.y,At,ft)),y.emit("pan"));var ee=O.startZoom,Vt=O.zoom,fe=Vt!=null&&T;fe&&(Dk(ee,Vt)&&(D.zoom=wk(D.minZoom,sx(ee,Vt,At,ft),D.maxZoom)),y.emit("zoom")),(zt||fe)&&y.emit("viewport");var ge=O.style;if(ge&&ge.length>0&&A){for(var ne=0;ne=0;zt--){var ee=Kt[zt];ee()}Kt.splice(0,Kt.length)},Mt=at.length-1;Mt>=0;Mt--){var Dt=at[Mt],jt=Dt._private;if(jt.stopped){at.splice(Mt,1),jt.hooked=!1,jt.playing=!1,jt.started=!1,kt(jt.frames);continue}!jt.playing&&!jt.applying||(jt.playing&&jt.applying&&(jt.applying=!1),jt.started||xJ(G,Dt,y),yJ(G,Dt,y,W),jt.applying&&(jt.applying=!1),kt(jt.frames),jt.step!=null&&jt.step(y),Dt.completed()&&(at.splice(Mt,1),jt.hooked=!1,jt.playing=!1,jt.started=!1,kt(jt.completes)),ft=!0)}return!W&&at.length===0&<.length===0&&T.push(G),ft}for(var D=!1,O=0;O0?g.notify("draw",x):g.notify("draw")),x.unmerge(T),g.emit("step")}var kJ={animate:Ac.animate(),animation:Ac.animation(),animated:Ac.animated(),clearQueue:Ac.clearQueue(),delay:Ac.delay(),delayAnimation:Ac.delayAnimation(),stop:Ac.stop(),addToAnimationPool:function(g){var x=this;x.styleEnabled()&&x._private.aniEles.merge(g)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var g=this;if(g._private.animationsRunning=!0,!g.styleEnabled())return;function x(){g._private.animationsRunning&&Ff(function(D){_B(D,g),x()})}var T=g.renderer();T&&T.beforeRender?T.beforeRender(function(D,O){_B(O,g)},T.beforeRenderPriorities.animations):x()}},EJ={qualifierCompare:function(g,x){return g==null||x==null?g==null&&x==null:g.sameText(x)},eventMatches:function(g,x,T){var A=x.qualifier;return A!=null?g!==T.target&&nt(T.target)&&A.matches(T.target):!0},addEventFields:function(g,x){x.cy=g,x.target=g},callbackContext:function(g,x,T){return x.qualifier!=null?T.target:g}},a9=function(g){return mt(g)?new ym(g):g},SB={createEmitter:function(){var g=this._private;return g.emitter||(g.emitter=new JT(EJ,this)),this},emitter:function(){return this._private.emitter},on:function(g,x,T){return this.emitter().on(g,a9(x),T),this},removeListener:function(g,x,T){return this.emitter().removeListener(g,a9(x),T),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(g,x,T){return this.emitter().one(g,a9(x),T),this},once:function(g,x,T){return this.emitter().one(g,a9(x),T),this},emit:function(g,x){return this.emitter().emit(g,x),this},emitAndNotify:function(g,x){return this.emit(g),this.notify(g,x),this}};Ac.eventAliasesOn(SB);var zL={png:function(g){var x=this._private.renderer;return g=g||{},x.png(g)},jpg:function(g){var x=this._private.renderer;return g=g||{},g.bg=g.bg||"#fff",x.jpg(g)}};zL.jpeg=zL.jpg;var o9={layout:function(g){var x=this;if(g==null){bl("Layout options must be specified to make a layout");return}if(g.name==null){bl("A `name` must be specified to make a layout");return}var T=g.name,A=x.extension("layout",T);if(A==null){bl("No such layout `"+T+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var D;mt(g.eles)?D=x.$(g.eles):D=g.eles!=null?g.eles:x.$();var O=new A(me({},g,{cy:x,eles:D}));return O}};o9.createLayout=o9.makeLayout=o9.layout;var TJ={notify:function(g,x){var T=this._private;if(this.batching()){T.batchNotifications=T.batchNotifications||{};var A=T.batchNotifications[g]=T.batchNotifications[g]||this.collection();x!=null&&A.merge(x);return}if(T.notificationsEnabled){var D=this.renderer();this.destroyed()||!D||D.notify(g,x)}},notifications:function(g){var x=this._private;return g===void 0?x.notificationsEnabled:(x.notificationsEnabled=!!g,this)},noNotifications:function(g){this.notifications(!1),g(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var g=this._private;return g.batchCount==null&&(g.batchCount=0),g.batchCount===0&&(g.batchStyleEles=this.collection(),g.batchNotifications={}),g.batchCount++,this},endBatch:function(){var g=this._private;if(g.batchCount===0)return this;if(g.batchCount--,g.batchCount===0){g.batchStyleEles.updateStyle();var x=this.renderer();Object.keys(g.batchNotifications).forEach(function(T){var A=g.batchNotifications[T];A.empty()?x.notify(T):x.notify(T,A)})}return this},batch:function(g){return this.startBatch(),g(),this.endBatch(),this},batchData:function(g){var x=this;return this.batch(function(){for(var T=Object.keys(g),A=0;A0;)x.removeChild(x.childNodes[0]);g._private.renderer=null,g.mutableElements().forEach(function(T){var A=T._private;A.rscratch={},A.rstyle={},A.animation.current=[],A.animation.queue=[]})},onRender:function(g){return this.on("render",g)},offRender:function(g){return this.off("render",g)}};qL.invalidateDimensions=qL.resize;var c9={collection:function(g,x){return mt(g)?this.$(g):xt(g)?g.collection():dt(g)?(x||(x={}),new jf(this,g,x.unique,x.removed)):new jf(this)},nodes:function(g){var x=this.$(function(T){return T.isNode()});return g?x.filter(g):x},edges:function(g){var x=this.$(function(T){return T.isEdge()});return g?x.filter(g):x},$:function(g){var x=this._private.elements;return g?x.filter(g):x.spawnSelf()},mutableElements:function(){return this._private.elements}};c9.elements=c9.filter=c9.$;var f1={},Ok="t",_J="f";f1.apply=function(y){for(var g=this,x=g._private,T=x.cy,A=T.collection(),D=0;D0;if(et||W&&at){var lt=void 0;et&&at||et?lt=S.properties:at&&(lt=S.mappedProperties);for(var ft=0;ft1&&(jt=1),$.color){var Kt=T.valueMin[0],zt=T.valueMax[0],ee=T.valueMin[1],Vt=T.valueMax[1],fe=T.valueMin[2],ge=T.valueMax[2],ne=T.valueMin[3]==null?1:T.valueMin[3],Pe=T.valueMax[3]==null?1:T.valueMax[3],pe=[Math.round(Kt+(zt-Kt)*jt),Math.round(ee+(Vt-ee)*jt),Math.round(fe+(ge-fe)*jt),Math.round(ne+(Pe-ne)*jt)];D={bypass:T.bypass,name:T.name,value:pe,strValue:"rgb("+pe[0]+", "+pe[1]+", "+pe[2]+")"}}else if($.number){var bn=T.valueMin+(T.valueMax-T.valueMin)*jt;D=this.parse(T.name,bn,T.bypass,et)}else return!1;if(!D)return ft(),!1;D.mapping=T,T=D;break}case O.data:{for(var ze=T.field.split("."),Ve=W.data,En=0;En0&&D>0){for(var $={},q=!1,S=0;S0?y.delayAnimation(O).play().promise().then(Dt):Dt()}).then(function(){return y.animation({style:$,duration:D,easing:y.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){x.removeBypasses(y,A),y.emitAndNotify("style"),T.transitioning=!1})}else T.transitioning&&(this.removeBypasses(y,A),y.emitAndNotify("style"),T.transitioning=!1)},f1.checkTrigger=function(y,g,x,T,A,D){var O=this.properties[g],$=A(O);$!=null&&$(x,T)&&D(O)},f1.checkZOrderTrigger=function(y,g,x,T){var A=this;this.checkTrigger(y,g,x,T,function(D){return D.triggersZOrder},function(){A._private.cy.notify("zorder",y)})},f1.checkBoundsTrigger=function(y,g,x,T){this.checkTrigger(y,g,x,T,function(A){return A.triggersBounds},function(A){y.dirtyCompoundBoundsCache(),y.dirtyBoundingBoxCache(),A.triggersBoundsOfParallelBeziers&&(g==="curve-style"&&(x==="bezier"||T==="bezier")||g==="display"&&(x==="none"||T==="none"))&&y.parallelEdges().forEach(function(D){D.isBundledBezier()&&D.dirtyBoundingBoxCache()})})},f1.checkTriggers=function(y,g,x,T){y.dirtyStyleCache(),this.checkZOrderTrigger(y,g,x,T),this.checkBoundsTrigger(y,g,x,T)};var Nk={};Nk.applyBypass=function(y,g,x,T){var A=this,D=[],O=!0;if(g==="*"||g==="**"){if(x!==void 0)for(var $=0;$A.length?T=T.substr(A.length):T=""}function q(){D.length>O.length?D=D.substr(O.length):D=""}for(;;){var S=T.match(/^\s*$/);if(S)break;var G=T.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!G){Sc("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+T);break}A=G[0];var W=G[1];if(W!=="core"){var et=new ym(W);if(et.invalid){Sc("Skipping parsing of block: Invalid selector found in string stylesheet: "+W),$();continue}}var at=G[2],lt=!1;D=at;for(var ft=[];;){var At=D.match(/^\s*$/);if(At)break;var kt=D.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!kt){Sc("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+at),lt=!0;break}O=kt[0];var Mt=kt[1],Dt=kt[2],jt=g.properties[Mt];if(!jt){Sc("Skipping property: Invalid property name in: "+O),q();continue}var Zt=x.parse(Mt,Dt);if(!Zt){Sc("Skipping property: Invalid property definition in: "+O),q();continue}ft.push({name:Mt,val:Dt}),q()}if(lt){$();break}x.selector(W);for(var Kt=0;Kt=7&&g[0]==="d"&&(G=new RegExp($.data.regex).exec(g))){if(x)return!1;var et=$.data;return{name:y,value:G,strValue:""+g,mapped:et,field:G[1],bypass:x}}else if(g.length>=10&&g[0]==="m"&&(W=new RegExp($.mapData.regex).exec(g))){if(x||S.multiple)return!1;var at=$.mapData;if(!(S.color||S.number))return!1;var lt=this.parse(y,W[4]);if(!lt||lt.mapped)return!1;var ft=this.parse(y,W[5]);if(!ft||ft.mapped)return!1;if(lt.pfValue===ft.pfValue||lt.strValue===ft.strValue)return Sc("`"+y+": "+g+"` is not a valid mapper because the output range is zero; converting to `"+y+": "+lt.strValue+"`"),this.parse(y,lt.strValue);if(S.color){var At=lt.value,kt=ft.value,Mt=At[0]===kt[0]&&At[1]===kt[1]&&At[2]===kt[2]&&(At[3]===kt[3]||(At[3]==null||At[3]===1)&&(kt[3]==null||kt[3]===1));if(Mt)return!1}return{name:y,value:W,strValue:""+g,mapped:at,field:W[1],fieldMin:parseFloat(W[2]),fieldMax:parseFloat(W[3]),valueMin:lt.value,valueMax:ft.value,bypass:x}}}if(S.multiple&&T!=="multiple"){var Dt;if(q?Dt=g.split(/\s+/):dt(g)?Dt=g:Dt=[g],S.evenMultiple&&Dt.length%2!==0)return null;for(var jt=[],Zt=[],Kt=[],zt="",ee=!1,Vt=0;Vt0?" ":"")+fe.strValue}return S.validate&&!S.validate(jt,Zt)?null:S.singleEnum&&ee?jt.length===1&&mt(jt[0])?{name:y,value:jt[0],strValue:jt[0],bypass:x}:null:{name:y,value:jt,pfValue:Kt,strValue:zt,bypass:x,units:Zt}}var ge=function(){for(var fr=0;frS.max||S.strictMax&&g===S.max))return null;var ze={name:y,value:g,strValue:""+g+(ne||""),units:ne,bypass:x};return S.unitless||ne!=="px"&&ne!=="em"?ze.pfValue=g:ze.pfValue=ne==="px"||!ne?g:this.getEmSizeInPixels()*g,(ne==="ms"||ne==="s")&&(ze.pfValue=ne==="ms"?g:1e3*g),(ne==="deg"||ne==="rad")&&(ze.pfValue=ne==="rad"?g:xY(g)),ne==="%"&&(ze.pfValue=g/100),ze}else if(S.propList){var Ve=[],En=""+g;if(En!=="none"){for(var Dn=En.split(/\s*,\s*|\s+/),Kn=0;Kn0&&$>0&&!isNaN(T.w)&&!isNaN(T.h)&&T.w>0&&T.h>0){q=Math.min((O-2*x)/T.w,($-2*x)/T.h),q=q>this._private.maxZoom?this._private.maxZoom:q,q=q=T.minZoom&&(T.maxZoom=x),this},minZoom:function(g){return g===void 0?this._private.minZoom:this.zoomRange({min:g})},maxZoom:function(g){return g===void 0?this._private.maxZoom:this.zoomRange({max:g})},getZoomedViewport:function(g){var x=this._private,T=x.pan,A=x.zoom,D,O,$=!1;if(x.zoomingEnabled||($=!0),X(g)?O=g:ht(g)&&(O=g.level,g.position!=null?D=OT(g.position,A,T):g.renderedPosition!=null&&(D=g.renderedPosition),D!=null&&!x.panningEnabled&&($=!0)),O=O>x.maxZoom?x.maxZoom:O,O=Ox.maxZoom||!x.zoomingEnabled?O=!0:(x.zoom=q,D.push("zoom"))}if(A&&(!O||!g.cancelOnFailedZoom)&&x.panningEnabled){var S=g.pan;X(S.x)&&(x.pan.x=S.x,$=!1),X(S.y)&&(x.pan.y=S.y,$=!1),$||D.push("pan")}return D.length>0&&(D.push("viewport"),this.emit(D.join(" ")),this.notify("viewport")),this},center:function(g){var x=this.getCenterPan(g);return x&&(this._private.pan=x,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(g,x){if(this._private.panningEnabled){if(mt(g)){var T=g;g=this.mutableElements().filter(T)}else xt(g)||(g=this.mutableElements());if(g.length!==0){var A=g.boundingBox(),D=this.width(),O=this.height();x=x===void 0?this._private.zoom:x;var $={x:(D-x*(A.x1+A.x2))/2,y:(O-x*(A.y1+A.y2))/2};return $}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var g=this._private,x=g.container;return g.sizeCache=g.sizeCache||(x?function(){var T=R.getComputedStyle(x),A=function(O){return parseFloat(T.getPropertyValue(O))};return{width:x.clientWidth-A("padding-left")-A("padding-right"),height:x.clientHeight-A("padding-top")-A("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var g=this._private.pan,x=this._private.zoom,T=this.renderedExtent(),A={x1:(T.x1-g.x)/x,x2:(T.x2-g.x)/x,y1:(T.y1-g.y)/x,y2:(T.y2-g.y)/x};return A.w=A.x2-A.x1,A.h=A.y2-A.y1,A},renderedExtent:function(){var g=this.width(),x=this.height();return{x1:0,y1:0,x2:g,y2:x,w:g,h:x}},multiClickDebounceTime:function(g){if(g)this._private.multiClickDebounceTime=g;else return this._private.multiClickDebounceTime;return this}};A3.centre=A3.center,A3.autolockNodes=A3.autolock,A3.autoungrabifyNodes=A3.autoungrabify;var Pk={data:Ac.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ac.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ac.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ac.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Pk.attr=Pk.data,Pk.removeAttr=Pk.removeData;var Fk=function(g){var x=this;g=me({},g);var T=g.container;T&&!U(T)&&U(T[0])&&(T=T[0]);var A=T?T._cyreg:null;A=A||{},A&&A.cy&&(A.cy.destroy(),A={});var D=A.readies=A.readies||[];T&&(T._cyreg=A),A.cy=x;var O=R!==void 0&&T!==void 0&&!g.headless,$=g;$.layout=me({name:O?"grid":"null"},$.layout),$.renderer=me({name:O?"canvas":"null"},$.renderer);var q=function(lt,ft,At){return ft!==void 0?ft:At!==void 0?At:lt},S=this._private={container:T,ready:!1,options:$,elements:new jf(this),listeners:[],aniEles:new jf(this),data:$.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:q(!0,$.zoomingEnabled),userZoomingEnabled:q(!0,$.userZoomingEnabled),panningEnabled:q(!0,$.panningEnabled),userPanningEnabled:q(!0,$.userPanningEnabled),boxSelectionEnabled:q(!0,$.boxSelectionEnabled),autolock:q(!1,$.autolock,$.autolockNodes),autoungrabify:q(!1,$.autoungrabify,$.autoungrabifyNodes),autounselectify:q(!1,$.autounselectify),styleEnabled:$.styleEnabled===void 0?O:$.styleEnabled,zoom:X($.zoom)?$.zoom:1,pan:{x:ht($.pan)&&X($.pan.x)?$.pan.x:0,y:ht($.pan)&&X($.pan.y)?$.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:q(250,$.multiClickDebounceTime)};this.createEmitter(),this.selectionType($.selectionType),this.zoomRange({min:$.minZoom,max:$.maxZoom});var G=function(lt,ft){var At=lt.some(It);if(At)return K5.all(lt).then(ft);ft(lt)};S.styleEnabled&&x.setStyle([]);var W=me({},$,$.renderer);x.initRenderer(W);var et=function(lt,ft,At){x.notifications(!1);var kt=x.mutableElements();kt.length>0&&kt.remove(),lt!=null&&(ht(lt)||dt(lt))&&x.add(lt),x.one("layoutready",function(Dt){x.notifications(!0),x.emit(Dt),x.one("load",ft),x.emitAndNotify("load")}).one("layoutstop",function(){x.one("done",At),x.emit("done")});var Mt=me({},x._private.options.layout);Mt.eles=x.elements(),x.layout(Mt).run()};G([$.style,$.elements],function(at){var lt=at[0],ft=at[1];S.styleEnabled&&x.style().append(lt),et(ft,function(){x.startAnimationLoop(),S.ready=!0,yt($.ready)&&x.on("ready",$.ready);for(var At=0;At0,q=Rd(g.boundingBox?g.boundingBox:{x1:0,y1:0,w:x.width(),h:x.height()}),S;if(xt(g.roots))S=g.roots;else if(dt(g.roots)){for(var G=[],W=0;W0;){var bn=pe(),ze=fe(bn,ne);if(ze)bn.outgoers().filter(function(Ci){return Ci.isNode()&&T.has(Ci)}).forEach(Pe);else if(ze===null){Sc("Detected double maximal shift for node `"+bn.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}Vt();var Ve=0;if(g.avoidOverlap)for(var En=0;En0&&kt[0].length<=3?zs/2:0),jn=2*Math.PI/kt[qi].length*Si;return qi===0&&kt[0].length===1&&(Qt=1),{x:wi.x+Qt*Math.cos(jn),y:wi.y+Qt*Math.sin(jn)}}else{var Er={x:wi.x+(Si+1-(Ui+1)/2)*Ga,y:(qi+1)*Ys};return Er}};return T.nodes().layoutPositions(this,g,ka),this};var MJ={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(g,x){return!0},ready:void 0,stop:void 0,transform:function(g,x){return x}};function f9(y){this.options=me({},MJ,y)}f9.prototype.run=function(){var y=this.options,g=y,x=y.cy,T=g.eles,A=g.counterclockwise!==void 0?!g.counterclockwise:g.clockwise,D=T.nodes().not(":parent");g.sort&&(D=D.sort(g.sort));for(var O=Rd(g.boundingBox?g.boundingBox:{x1:0,y1:0,w:x.width(),h:x.height()}),$={x:O.x1+O.w/2,y:O.y1+O.h/2},q=g.sweep===void 0?2*Math.PI-2*Math.PI/D.length:g.sweep,S=q/Math.max(1,D.length-1),G,W=0,et=0;et1&&g.avoidOverlap){W*=1.75;var kt=Math.cos(S)-Math.cos(0),Mt=Math.sin(S)-Math.sin(0),Dt=Math.sqrt(W*W/(kt*kt+Mt*Mt));G=Math.max(Dt,G)}var jt=function(Kt,zt){var ee=g.startAngle+zt*S*(A?1:-1),Vt=G*Math.cos(ee),fe=G*Math.sin(ee),ge={x:$.x+Vt,y:$.y+fe};return ge};return T.nodes().layoutPositions(this,g,jt),this};var IJ={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(g){return g.degree()},levelWidth:function(g){return g.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(g,x){return!0},ready:void 0,stop:void 0,transform:function(g,x){return x}};function LB(y){this.options=me({},IJ,y)}LB.prototype.run=function(){for(var y=this.options,g=y,x=g.counterclockwise!==void 0?!g.counterclockwise:g.clockwise,T=y.cy,A=g.eles,D=A.nodes().not(":parent"),O=Rd(g.boundingBox?g.boundingBox:{x1:0,y1:0,w:T.width(),h:T.height()}),$={x:O.x1+O.w/2,y:O.y1+O.h/2},q=[],S=0,G=0;G0){var Zt=Math.abs(Mt[0].value-jt.value);Zt>=At&&(Mt=[],kt.push(Mt))}Mt.push(jt)}var Kt=S+g.minNodeSpacing;if(!g.avoidOverlap){var zt=kt.length>0&&kt[0].length>1,ee=Math.min(O.w,O.h)/2-Kt,Vt=ee/(kt.length+zt?1:0);Kt=Math.min(Kt,Vt)}for(var fe=0,ge=0;ge1&&g.avoidOverlap){var bn=Math.cos(pe)-Math.cos(0),ze=Math.sin(pe)-Math.sin(0),Ve=Math.sqrt(Kt*Kt/(bn*bn+ze*ze));fe=Math.max(Ve,fe)}ne.r=fe,fe+=Kt}if(g.equidistant){for(var En=0,Dn=0,Kn=0;Kn=y.numIter||(jJ(T,y),T.temperature=T.temperature*y.coolingFactor,T.temperature=y.animationThreshold&&D(),Ff(W)}};G()}else{for(;S;)S=O(q),q++;DB(T,y),$()}return this},d9.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},d9.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var OJ=function(g,x,T){for(var A=T.eles.edges(),D=T.eles.nodes(),O={isCompound:g.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:D.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:A.size(),temperature:T.initialTemp,clientWidth:g.width(),clientHeight:g.width(),boundingBox:Rd(T.boundingBox?T.boundingBox:{x1:0,y1:0,w:g.width(),h:g.height()})},$=T.eles.components(),q={},S=0;S<$.length;S++)for(var G=$[S],W=0;W0){O.graphSet.push(zt);for(var S=0;SA.count?0:A.graph},PJ=function y(g,x,T,A){var D=A.graphSet[T];if(-10)var W=A.nodeOverlap*G,et=Math.sqrt($*$+q*q),at=W*$/et,lt=W*q/et;else var ft=g9(g,$,q),At=g9(x,-1*$,-1*q),kt=At.x-ft.x,Mt=At.y-ft.y,Dt=kt*kt+Mt*Mt,et=Math.sqrt(Dt),W=(g.nodeRepulsion+x.nodeRepulsion)/Dt,at=W*kt/et,lt=W*Mt/et;g.isLocked||(g.offsetX-=at,g.offsetY-=lt),x.isLocked||(x.offsetX+=at,x.offsetY+=lt)}},qJ=function(g,x,T,A){if(T>0)var D=g.maxX-x.minX;else var D=x.maxX-g.minX;if(A>0)var O=g.maxY-x.minY;else var O=x.maxY-g.minY;return D>=0&&O>=0?Math.sqrt(D*D+O*O):0},g9=function(g,x,T){var A=g.positionX,D=g.positionY,O=g.height||1,$=g.width||1,q=T/x,S=O/$,G={};return x===0&&0T?(G.x=A,G.y=D+O/2,G):0x&&-1*S<=q&&q<=S?(G.x=A-$/2,G.y=D-$*T/2/x,G):0=S)?(G.x=A+O*x/2/T,G.y=D+O/2,G):(0>T&&(q<=-1*S||q>=S)&&(G.x=A-O*x/2/T,G.y=D-O/2),G)},HJ=function(g,x){for(var T=0;TT){var At=x.gravity*at/ft,kt=x.gravity*lt/ft;et.offsetX+=At,et.offsetY+=kt}}}}},VJ=function(g,x){var T=[],A=0,D=-1;for(T.push.apply(T,g.graphSet[0]),D+=g.graphSet[0].length;A<=D;){var O=T[A++],$=g.idToIndex[O],q=g.layoutNodes[$],S=q.children;if(0T)var D={x:T*g/A,y:T*x/A};else var D={x:g,y:x};return D},KJ=function y(g,x){var T=g.parentId;if(T!=null){var A=x.layoutNodes[x.idToIndex[T]],D=!1;if((A.maxX==null||g.maxX+A.padRight>A.maxX)&&(A.maxX=g.maxX+A.padRight,D=!0),(A.minX==null||g.minX-A.padLeftA.maxY)&&(A.maxY=g.maxY+A.padBottom,D=!0),(A.minY==null||g.minY-A.padTopkt&&(lt+=At+x.componentSpacing,at=0,ft=0,At=0)}}},YJ={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(g){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(g,x){return!0},ready:void 0,stop:void 0,transform:function(g,x){return x}};function OB(y){this.options=me({},YJ,y)}OB.prototype.run=function(){var y=this.options,g=y,x=y.cy,T=g.eles,A=T.nodes().not(":parent");g.sort&&(A=A.sort(g.sort));var D=Rd(g.boundingBox?g.boundingBox:{x1:0,y1:0,w:x.width(),h:x.height()});if(D.h===0||D.w===0)T.nodes().layoutPositions(this,g,function(rr){return{x:D.x1,y:D.y1}});else{var O=A.size(),$=Math.sqrt(O*D.h/D.w),q=Math.round($),S=Math.round(D.w/D.h*$),G=function(vr){if(vr==null)return Math.min(q,S);var ur=Math.min(q,S);ur==q?q=vr:S=vr},W=function(vr){if(vr==null)return Math.max(q,S);var ur=Math.max(q,S);ur==q?q=vr:S=vr},et=g.rows,at=g.cols!=null?g.cols:g.columns;if(et!=null&&at!=null)q=et,S=at;else if(et!=null&&at==null)q=et,S=Math.ceil(O/q);else if(et==null&&at!=null)S=at,q=Math.ceil(O/S);else if(S*q>O){var lt=G(),ft=W();(lt-1)*ft>=O?G(lt-1):(ft-1)*lt>=O&&W(ft-1)}else for(;S*q=O?W(kt+1):G(At+1)}var Mt=D.w/S,Dt=D.h/q;if(g.condense&&(Mt=0,Dt=0),g.avoidOverlap)for(var jt=0;jt=S&&(bn=0,pe++)},Ve={},En=0;En(bn=NY(y,g,ze[Ve],ze[Ve+1],ze[Ve+2],ze[Ve+3])))return At(zt,bn),!0}else if(Vt.edgeType==="bezier"||Vt.edgeType==="multibezier"||Vt.edgeType==="self"||Vt.edgeType==="compound"){for(var ze=Vt.allpts,Ve=0;Ve+5(bn=OY(y,g,ze[Ve],ze[Ve+1],ze[Ve+2],ze[Ve+3],ze[Ve+4],ze[Ve+5])))return At(zt,bn),!0}for(var En=En||ee.source,Dn=Dn||ee.target,Kn=A.getArrowWidth(fe,ge),Sn=[{name:"source",x:Vt.arrowStartX,y:Vt.arrowStartY,angle:Vt.srcArrowAngle},{name:"target",x:Vt.arrowEndX,y:Vt.arrowEndY,angle:Vt.tgtArrowAngle},{name:"mid-source",x:Vt.midX,y:Vt.midY,angle:Vt.midsrcArrowAngle},{name:"mid-target",x:Vt.midX,y:Vt.midY,angle:Vt.midtgtArrowAngle}],Ve=0;Ve0&&(kt(En),kt(Dn))}function Dt(zt,ee,Vt){return bp(zt,ee,Vt)}function jt(zt,ee){var Vt=zt._private,fe=et,ge;ee?ge=ee+"-":ge="",zt.boundingBox();var ne=Vt.labelBounds[ee||"main"],Pe=zt.pstyle(ge+"label").value,pe=zt.pstyle("text-events").strValue==="yes";if(!(!pe||!Pe)){var bn=Dt(Vt.rscratch,"labelX",ee),ze=Dt(Vt.rscratch,"labelY",ee),Ve=Dt(Vt.rscratch,"labelAngle",ee),En=zt.pstyle(ge+"text-margin-x").pfValue,Dn=zt.pstyle(ge+"text-margin-y").pfValue,Kn=ne.x1-fe-En,Sn=ne.x2+fe-En,Wn=ne.y1-fe-Dn,rr=ne.y2+fe-Dn;if(Ve){var vr=Math.cos(Ve),ur=Math.sin(Ve),tr=function(ka,Ci){return ka=ka-bn,Ci=Ci-ze,{x:ka*vr-Ci*ur+bn,y:ka*ur+Ci*vr+ze}},wn=tr(Kn,Wn),gr=tr(Kn,rr),fr=tr(Sn,Wn),Jr=tr(Sn,rr),wi=[wn.x+En,wn.y+Dn,fr.x+En,fr.y+Dn,Jr.x+En,Jr.y+Dn,gr.x+En,gr.y+Dn];if(jd(y,g,wi))return At(zt),!0}else if(G5(ne,y,g))return At(zt),!0}}for(var Zt=O.length-1;Zt>=0;Zt--){var Kt=O[Zt];Kt.isNode()?kt(Kt)||jt(Kt):Mt(Kt)||jt(Kt)||jt(Kt,"source")||jt(Kt,"target")}return $},L3.getAllInBox=function(y,g,x,T){var A=this.getCachedZSortedEles().interactive,D=[],O=Math.min(y,x),$=Math.max(y,x),q=Math.min(g,T),S=Math.max(g,T);y=O,x=$,g=q,T=S;for(var G=Rd({x1:y,y1:g,x2:x,y2:T}),W=0;W0?Math.max(Ki-Po,0):Math.min(Ki+Po,0)},Pe=ne(fe,ee),pe=ne(ge,Vt),bn=!1;Mt===S?kt=Math.abs(Pe)>Math.abs(pe)?A:T:Mt===q||Mt===$?(kt=T,bn=!0):(Mt===D||Mt===O)&&(kt=A,bn=!0);var ze=kt===T,Ve=ze?pe:Pe,En=ze?ge:fe,Dn=ZP(En),Kn=!1;!(bn&&(jt||Kt))&&(Mt===$&&En<0||Mt===q&&En>0||Mt===D&&En>0||Mt===O&&En<0)&&(Dn*=-1,Ve=Dn*Math.abs(Ve),Kn=!0);var Sn;if(jt){var Wn=Zt<0?1+Zt:Zt;Sn=Wn*Ve}else{var rr=Zt<0?Ve:0;Sn=rr+Zt*Dn}var vr=function(Ki){return Math.abs(Ki)=Math.abs(Ve)},ur=vr(Sn),tr=vr(Math.abs(Ve)-Math.abs(Sn)),wn=ur||tr;if(wn&&!Kn)if(ze){var gr=Math.abs(En)<=et/2,fr=Math.abs(fe)<=at/2;if(gr){var Jr=(G.x1+G.x2)/2,wi=G.y1,Ks=G.y2;x.segpts=[Jr,wi,Jr,Ks]}else if(fr){var ka=(G.y1+G.y2)/2,Ci=G.x1,hi=G.x2;x.segpts=[Ci,ka,hi,ka]}else x.segpts=[G.x1,G.y2]}else{var gs=Math.abs(En)<=W/2,qi=Math.abs(ge)<=lt/2;if(gs){var Si=(G.y1+G.y2)/2,Ui=G.x1,Ga=G.x2;x.segpts=[Ui,Si,Ga,Si]}else if(qi){var Ys=(G.x1+G.x2)/2,zs=G.y1,Er=G.y2;x.segpts=[Ys,zs,Ys,Er]}else x.segpts=[G.x2,G.y1]}else if(ze){var Qt=G.y1+Sn+(At?et/2*Dn:0),jn=G.x1,_r=G.x2;x.segpts=[jn,Qt,_r,Qt]}else{var ir=G.x1+Sn+(At?W/2*Dn:0),sr=G.y1,Ia=G.y2;x.segpts=[ir,sr,ir,Ia]}},id.tryToCorrectInvalidPoints=function(y,g){var x=y._private.rscratch;if(x.edgeType==="bezier"){var T=g.srcPos,A=g.tgtPos,D=g.srcW,O=g.srcH,$=g.tgtW,q=g.tgtH,S=g.srcShape,G=g.tgtShape,W=!X(x.startX)||!X(x.startY),et=!X(x.arrowStartX)||!X(x.arrowStartY),at=!X(x.endX)||!X(x.endY),lt=!X(x.arrowEndX)||!X(x.arrowEndY),ft=3,At=this.getArrowWidth(y.pstyle("width").pfValue,y.pstyle("arrow-scale").value)*this.arrowShapeWidth,kt=ft*At,Mt=E3({x:x.ctrlpts[0],y:x.ctrlpts[1]},{x:x.startX,y:x.startY}),Dt=Mtpe.poolIndex()){var bn=Pe;Pe=pe,pe=bn}var ze=Vt.srcPos=Pe.position(),Ve=Vt.tgtPos=pe.position(),En=Vt.srcW=Pe.outerWidth(),Dn=Vt.srcH=Pe.outerHeight(),Kn=Vt.tgtW=pe.outerWidth(),Sn=Vt.tgtH=pe.outerHeight(),Wn=Vt.srcShape=x.nodeShapes[g.getNodeShape(Pe)],rr=Vt.tgtShape=x.nodeShapes[g.getNodeShape(pe)];Vt.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var vr=0;vr0){var gr=D,fr=T3(gr,q5(x)),Jr=T3(gr,q5(wn)),wi=fr;if(Jr2){var Ks=T3(gr,{x:wn[2],y:wn[3]});Ks0){var jn=O,_r=T3(jn,q5(x)),ir=T3(jn,q5(Qt)),sr=_r;if(ir<_r&&(x=[Qt[0],Qt[1]],sr=ir),Qt.length>2){var Ia=T3(jn,{x:Qt[2],y:Qt[3]});Ia=lt||zt){At={cp:jt,segment:Kt};break}}if(At)break}var ee=At.cp,Vt=At.segment,fe=(lt-kt)/Vt.length,ge=Vt.t1-Vt.t0,ne=at?Vt.t0+ge*fe:Vt.t1-ge*fe;ne=wk(0,ne,1),g=H5(ee.p0,ee.p1,ee.p2,ne),et=qB(ee.p0,ee.p1,ee.p2,ne);break}case"straight":case"segments":case"haystack":{for(var Pe=0,pe,bn,ze,Ve,En=T.allpts.length,Dn=0;Dn+3=lt));Dn+=2);var Kn=lt-bn,Sn=Kn/pe;Sn=wk(0,Sn,1),g=EY(ze,Ve,Sn),et=zB(ze,Ve);break}}O("labelX",W,g.x),O("labelY",W,g.y),O("labelAutoAngle",W,et)}};S("source"),S("target"),this.applyLabelDimensions(y)}},yp.applyLabelDimensions=function(y){this.applyPrefixedLabelDimensions(y),y.isEdge()&&(this.applyPrefixedLabelDimensions(y,"source"),this.applyPrefixedLabelDimensions(y,"target"))},yp.applyPrefixedLabelDimensions=function(y,g){var x=y._private,T=this.getLabelText(y,g),A=this.calculateLabelDimensions(y,T),D=y.pstyle("line-height").pfValue,O=y.pstyle("text-wrap").strValue,$=bp(x.rscratch,"labelWrapCachedLines",g)||[],q=O!=="wrap"?1:Math.max($.length,1),S=A.height/q,G=S*D,W=A.width,et=A.height+(q-1)*(D-1)*S;bm(x.rstyle,"labelWidth",g,W),bm(x.rscratch,"labelWidth",g,W),bm(x.rstyle,"labelHeight",g,et),bm(x.rscratch,"labelHeight",g,et),bm(x.rscratch,"labelLineHeight",g,G)},yp.getLabelText=function(y,g){var x=y._private,T=g?g+"-":"",A=y.pstyle(T+"label").strValue,D=y.pstyle("text-transform").value,O=function(Kn,Sn){return Sn?(bm(x.rscratch,Kn,g,Sn),Sn):bp(x.rscratch,Kn,g)};if(!A)return"";D=="none"||(D=="uppercase"?A=A.toUpperCase():D=="lowercase"&&(A=A.toLowerCase()));var $=y.pstyle("text-wrap").value;if($==="wrap"){var q=O("labelKey");if(q!=null&&O("labelWrapKey")===q)return O("labelWrapCachedText");for(var S="​",G=A.split(` +`),W=y.pstyle("text-max-width").pfValue,et=y.pstyle("text-overflow-wrap").value,at=et==="anywhere",lt=[],ft=/[\s\u200b]+/,At=at?"":" ",kt=0;ktW){for(var Kt=Mt.split(ft),zt="",ee=0;eePe)break;pe+=A[Ve],Ve===A.length-1&&(ze=!0)}return ze||(pe+=bn),pe}return A},yp.getLabelJustification=function(y){var g=y.pstyle("text-justification").strValue,x=y.pstyle("text-halign").strValue;if(g==="auto")if(y.isNode())switch(x){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return g},yp.calculateLabelDimensions=function(y,g){var x=this,T=td(g,y._private.labelDimsKey),A=x.labelDimCache||(x.labelDimCache=[]),D=A[T];if(D!=null)return D;var O=0,$=y.pstyle("font-style").strValue,q=y.pstyle("font-size").pfValue,S=y.pstyle("font-family").strValue,G=y.pstyle("font-weight").strValue,W=this.labelCalcCanvas,et=this.labelCalcCanvasContext;if(!W){W=this.labelCalcCanvas=document.createElement("canvas"),et=this.labelCalcCanvasContext=W.getContext("2d");var at=W.style;at.position="absolute",at.left="-9999px",at.top="-9999px",at.zIndex="-1",at.visibility="hidden",at.pointerEvents="none"}et.font="".concat($," ").concat(G," ").concat(q,"px ").concat(S);for(var lt=0,ft=0,At=g.split(` +`),kt=0;kt1&&arguments[1]!==void 0?arguments[1]:!0;if(g.merge(O),$)for(var q=0;q=y.desktopTapThreshold2}var bv=T(Qt);zf&&(y.hoverData.tapholdCancelled=!0);var _m=function(){var Gb=y.hoverData.dragDelta=y.hoverData.dragDelta||[];Gb.length===0?(Gb.push(Ja[0]),Gb.push(Ja[1])):(Gb[0]+=Ja[0],Gb[1]+=Ja[1])};_r=!0,x(Za,["mousemove","vmousemove","tapdrag"],Qt,{x:$r[0],y:$r[1]});var gx=function(){y.data.bgActivePosistion=void 0,y.hoverData.selecting||ir.emit({originalEvent:Qt,type:"boxstart",position:{x:$r[0],y:$r[1]}}),Nc[4]=1,y.hoverData.selecting=!0,y.redrawHint("select",!0),y.redraw()};if(y.hoverData.which===3){if(zf){var O3={originalEvent:Qt,type:"cxtdrag",position:{x:$r[0],y:$r[1]}};Ea?Ea.emit(O3):ir.emit(O3),y.hoverData.cxtDragged=!0,(!y.hoverData.cxtOver||Za!==y.hoverData.cxtOver)&&(y.hoverData.cxtOver&&y.hoverData.cxtOver.emit({originalEvent:Qt,type:"cxtdragout",position:{x:$r[0],y:$r[1]}}),y.hoverData.cxtOver=Za,Za&&Za.emit({originalEvent:Qt,type:"cxtdragover",position:{x:$r[0],y:$r[1]}}))}}else if(y.hoverData.dragging){if(_r=!0,ir.panningEnabled()&&ir.userPanningEnabled()){var px;if(y.hoverData.justStartedPan){var T9=y.hoverData.mdownPos;px={x:($r[0]-T9[0])*sr,y:($r[1]-T9[1])*sr},y.hoverData.justStartedPan=!1}else px={x:Ja[0]*sr,y:Ja[1]*sr};ir.panBy(px),ir.emit("dragpan"),y.hoverData.dragged=!0}$r=y.projectIntoViewport(Qt.clientX,Qt.clientY)}else if(Nc[4]==1&&(Ea==null||Ea.pannable())){if(zf){if(!y.hoverData.dragging&&ir.boxSelectionEnabled()&&(bv||!ir.panningEnabled()||!ir.userPanningEnabled()))gx();else if(!y.hoverData.selecting&&ir.panningEnabled()&&ir.userPanningEnabled()){var N3=A(Ea,y.hoverData.downs);N3&&(y.hoverData.dragging=!0,y.hoverData.justStartedPan=!0,Nc[4]=0,y.data.bgActivePosistion=q5(Ki),y.redrawHint("select",!0),y.redraw())}Ea&&Ea.pannable()&&Ea.active()&&Ea.unactivate()}}else{if(Ea&&Ea.pannable()&&Ea.active()&&Ea.unactivate(),(!Ea||!Ea.grabbed())&&Za!=mc&&(mc&&x(mc,["mouseout","tapdragout"],Qt,{x:$r[0],y:$r[1]}),Za&&x(Za,["mouseover","tapdragover"],Qt,{x:$r[0],y:$r[1]}),y.hoverData.last=Za),Ea)if(zf){if(ir.boxSelectionEnabled()&&bv)Ea&&Ea.grabbed()&&(ft(vl),Ea.emit("freeon"),vl.emit("free"),y.dragData.didDrag&&(Ea.emit("dragfreeon"),vl.emit("dragfree"))),gx();else if(Ea&&Ea.grabbed()&&y.nodeIsDraggable(Ea)){var $d=!y.dragData.didDrag;$d&&y.redrawHint("eles",!0),y.dragData.didDrag=!0,y.hoverData.draggingEles||at(vl,{inDragLayer:!0});var w1={x:0,y:0};if(X(Ja[0])&&X(Ja[1])&&(w1.x+=Ja[0],w1.y+=Ja[1],$d)){var zd=y.hoverData.dragDelta;zd&&X(zd[0])&&X(zd[1])&&(w1.x+=zd[0],w1.y+=zd[1])}y.hoverData.draggingEles=!0,vl.silentShift(w1).emit("position drag"),y.redrawHint("drag",!0),y.redraw()}}else _m();_r=!0}if(Nc[2]=$r[0],Nc[3]=$r[1],_r)return Qt.stopPropagation&&Qt.stopPropagation(),Qt.preventDefault&&Qt.preventDefault(),!1}},!1);var Vt,fe,ge;y.registerBinding(window,"mouseup",function(Qt){var jn=y.hoverData.capture;if(jn){y.hoverData.capture=!1;var _r=y.cy,ir=y.projectIntoViewport(Qt.clientX,Qt.clientY),sr=y.selection,Ia=y.findNearestElement(ir[0],ir[1],!0,!1),$r=y.dragData.possibleDragElements,Ki=y.hoverData.down,Po=T(Qt);if(y.data.bgActivePosistion&&(y.redrawHint("select",!0),y.redraw()),y.hoverData.tapholdCancelled=!0,y.data.bgActivePosistion=void 0,Ki&&Ki.unactivate(),y.hoverData.which===3){var Nc={originalEvent:Qt,type:"cxttapend",position:{x:ir[0],y:ir[1]}};if(Ki?Ki.emit(Nc):_r.emit(Nc),!y.hoverData.cxtDragged){var Za={originalEvent:Qt,type:"cxttap",position:{x:ir[0],y:ir[1]}};Ki?Ki.emit(Za):_r.emit(Za)}y.hoverData.cxtDragged=!1,y.hoverData.which=null}else if(y.hoverData.which===1){if(x(Ia,["mouseup","tapend","vmouseup"],Qt,{x:ir[0],y:ir[1]}),!y.dragData.didDrag&&!y.hoverData.dragged&&!y.hoverData.selecting&&!y.hoverData.isOverThresholdDrag&&(x(Ki,["click","tap","vclick"],Qt,{x:ir[0],y:ir[1]}),fe=!1,Qt.timeStamp-ge<=_r.multiClickDebounceTime()?(Vt&&clearTimeout(Vt),fe=!0,ge=null,x(Ki,["dblclick","dbltap","vdblclick"],Qt,{x:ir[0],y:ir[1]})):(Vt=setTimeout(function(){fe||x(Ki,["oneclick","onetap","voneclick"],Qt,{x:ir[0],y:ir[1]})},_r.multiClickDebounceTime()),ge=Qt.timeStamp)),Ki==null&&!y.dragData.didDrag&&!y.hoverData.selecting&&!y.hoverData.dragged&&!T(Qt)&&(_r.$(g).unselect(["tapunselect"]),$r.length>0&&y.redrawHint("eles",!0),y.dragData.possibleDragElements=$r=_r.collection()),Ia==Ki&&!y.dragData.didDrag&&!y.hoverData.selecting&&Ia!=null&&Ia._private.selectable&&(y.hoverData.dragging||(_r.selectionType()==="additive"||Po?Ia.selected()?Ia.unselect(["tapunselect"]):Ia.select(["tapselect"]):Po||(_r.$(g).unmerge(Ia).unselect(["tapunselect"]),Ia.select(["tapselect"]))),y.redrawHint("eles",!0)),y.hoverData.selecting){var mc=_r.collection(y.getAllInBox(sr[0],sr[1],sr[2],sr[3]));y.redrawHint("select",!0),mc.length>0&&y.redrawHint("eles",!0),_r.emit({type:"boxend",originalEvent:Qt,position:{x:ir[0],y:ir[1]}});var Ea=function(zf){return zf.selectable()&&!zf.selected()};_r.selectionType()==="additive"||Po||_r.$(g).unmerge(mc).unselect(),mc.emit("box").stdFilter(Ea).select().emit("boxselect"),y.redraw()}if(y.hoverData.dragging&&(y.hoverData.dragging=!1,y.redrawHint("select",!0),y.redrawHint("eles",!0),y.redraw()),!sr[4]){y.redrawHint("drag",!0),y.redrawHint("eles",!0);var Ja=Ki&&Ki.grabbed();ft($r),Ja&&(Ki.emit("freeon"),$r.emit("free"),y.dragData.didDrag&&(Ki.emit("dragfreeon"),$r.emit("dragfree")))}}sr[4]=0,y.hoverData.down=null,y.hoverData.cxtStarted=!1,y.hoverData.draggingEles=!1,y.hoverData.selecting=!1,y.hoverData.isOverThresholdDrag=!1,y.dragData.didDrag=!1,y.hoverData.dragged=!1,y.hoverData.dragDelta=[],y.hoverData.mdownPos=null,y.hoverData.mdownGPos=null}},!1);var ne=function(Qt){if(!y.scrollingPage){var jn=y.cy,_r=jn.zoom(),ir=jn.pan(),sr=y.projectIntoViewport(Qt.clientX,Qt.clientY),Ia=[sr[0]*_r+ir.x,sr[1]*_r+ir.y];if(y.hoverData.draggingEles||y.hoverData.dragging||y.hoverData.cxtStarted||zt()){Qt.preventDefault();return}if(jn.panningEnabled()&&jn.userPanningEnabled()&&jn.zoomingEnabled()&&jn.userZoomingEnabled()){Qt.preventDefault(),y.data.wheelZooming=!0,clearTimeout(y.data.wheelTimeout),y.data.wheelTimeout=setTimeout(function(){y.data.wheelZooming=!1,y.redrawHint("eles",!0),y.redraw()},150);var $r;Qt.deltaY!=null?$r=Qt.deltaY/-250:Qt.wheelDeltaY!=null?$r=Qt.wheelDeltaY/1e3:$r=Qt.wheelDelta/1e3,$r=$r*y.wheelSensitivity;var Ki=Qt.deltaMode===1;Ki&&($r*=33);var Po=jn.zoom()*Math.pow(10,$r);Qt.type==="gesturechange"&&(Po=y.gestureStartZoom*Qt.scale),jn.zoom({level:Po,renderedPosition:{x:Ia[0],y:Ia[1]}}),jn.emit(Qt.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};y.registerBinding(y.container,"wheel",ne,!0),y.registerBinding(window,"scroll",function(Qt){y.scrollingPage=!0,clearTimeout(y.scrollingPageTimeout),y.scrollingPageTimeout=setTimeout(function(){y.scrollingPage=!1},250)},!0),y.registerBinding(y.container,"gesturestart",function(Qt){y.gestureStartZoom=y.cy.zoom(),y.hasTouchStarted||Qt.preventDefault()},!0),y.registerBinding(y.container,"gesturechange",function(Er){y.hasTouchStarted||ne(Er)},!0),y.registerBinding(y.container,"mouseout",function(Qt){var jn=y.projectIntoViewport(Qt.clientX,Qt.clientY);y.cy.emit({originalEvent:Qt,type:"mouseout",position:{x:jn[0],y:jn[1]}})},!1),y.registerBinding(y.container,"mouseover",function(Qt){var jn=y.projectIntoViewport(Qt.clientX,Qt.clientY);y.cy.emit({originalEvent:Qt,type:"mouseover",position:{x:jn[0],y:jn[1]}})},!1);var Pe,pe,bn,ze,Ve,En,Dn,Kn,Sn,Wn,rr,vr,ur,tr=function(Qt,jn,_r,ir){return Math.sqrt((_r-Qt)*(_r-Qt)+(ir-jn)*(ir-jn))},wn=function(Qt,jn,_r,ir){return(_r-Qt)*(_r-Qt)+(ir-jn)*(ir-jn)},gr;y.registerBinding(y.container,"touchstart",gr=function(Qt){if(y.hasTouchStarted=!0,!!ee(Qt)){kt(),y.touchData.capture=!0,y.data.bgActivePosistion=void 0;var jn=y.cy,_r=y.touchData.now,ir=y.touchData.earlier;if(Qt.touches[0]){var sr=y.projectIntoViewport(Qt.touches[0].clientX,Qt.touches[0].clientY);_r[0]=sr[0],_r[1]=sr[1]}if(Qt.touches[1]){var sr=y.projectIntoViewport(Qt.touches[1].clientX,Qt.touches[1].clientY);_r[2]=sr[0],_r[3]=sr[1]}if(Qt.touches[2]){var sr=y.projectIntoViewport(Qt.touches[2].clientX,Qt.touches[2].clientY);_r[4]=sr[0],_r[5]=sr[1]}if(Qt.touches[1]){y.touchData.singleTouchMoved=!0,ft(y.dragData.touchDragEles);var Ia=y.findContainerClientCoords();Sn=Ia[0],Wn=Ia[1],rr=Ia[2],vr=Ia[3],Pe=Qt.touches[0].clientX-Sn,pe=Qt.touches[0].clientY-Wn,bn=Qt.touches[1].clientX-Sn,ze=Qt.touches[1].clientY-Wn,ur=0<=Pe&&Pe<=rr&&0<=bn&&bn<=rr&&0<=pe&&pe<=vr&&0<=ze&&ze<=vr;var $r=jn.pan(),Ki=jn.zoom();Ve=tr(Pe,pe,bn,ze),En=wn(Pe,pe,bn,ze),Dn=[(Pe+bn)/2,(pe+ze)/2],Kn=[(Dn[0]-$r.x)/Ki,(Dn[1]-$r.y)/Ki];var Po=200,Nc=Po*Po;if(En=1){for(var kp=y.touchData.startPosition=[],qf=0;qf<_r.length;qf++)kp[qf]=ir[qf]=_r[qf];var mg=Qt.touches[0];y.touchData.startGPosition=[mg.clientX,mg.clientY]}}},!1);var fr;y.registerBinding(window,"touchmove",fr=function(Qt){var jn=y.touchData.capture;if(!(!jn&&!ee(Qt))){var _r=y.selection,ir=y.cy,sr=y.touchData.now,Ia=y.touchData.earlier,$r=ir.zoom();if(Qt.touches[0]){var Ki=y.projectIntoViewport(Qt.touches[0].clientX,Qt.touches[0].clientY);sr[0]=Ki[0],sr[1]=Ki[1]}if(Qt.touches[1]){var Ki=y.projectIntoViewport(Qt.touches[1].clientX,Qt.touches[1].clientY);sr[2]=Ki[0],sr[3]=Ki[1]}if(Qt.touches[2]){var Ki=y.projectIntoViewport(Qt.touches[2].clientX,Qt.touches[2].clientY);sr[4]=Ki[0],sr[5]=Ki[1]}var Po=y.touchData.startGPosition,Nc;if(jn&&Qt.touches[0]&&Po){for(var Za=[],mc=0;mc=y.touchTapThreshold2}if(jn&&y.touchData.cxt){Qt.preventDefault();var kp=Qt.touches[0].clientX-Sn,qf=Qt.touches[0].clientY-Wn,mg=Qt.touches[1].clientX-Sn,sd=Qt.touches[1].clientY-Wn,bv=wn(kp,qf,mg,sd),_m=bv/En,gx=150,O3=gx*gx,px=1.5,T9=px*px;if(_m>=T9||bv>=O3){y.touchData.cxt=!1,y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);var N3={originalEvent:Qt,type:"cxttapend",position:{x:sr[0],y:sr[1]}};y.touchData.start?(y.touchData.start.unactivate().emit(N3),y.touchData.start=null):ir.emit(N3)}}if(jn&&y.touchData.cxt){var N3={originalEvent:Qt,type:"cxtdrag",position:{x:sr[0],y:sr[1]}};y.data.bgActivePosistion=void 0,y.redrawHint("select",!0),y.touchData.start?y.touchData.start.emit(N3):ir.emit(N3),y.touchData.start&&(y.touchData.start._private.grabbed=!1),y.touchData.cxtDragged=!0;var $d=y.findNearestElement(sr[0],sr[1],!0,!0);(!y.touchData.cxtOver||$d!==y.touchData.cxtOver)&&(y.touchData.cxtOver&&y.touchData.cxtOver.emit({originalEvent:Qt,type:"cxtdragout",position:{x:sr[0],y:sr[1]}}),y.touchData.cxtOver=$d,$d&&$d.emit({originalEvent:Qt,type:"cxtdragover",position:{x:sr[0],y:sr[1]}}))}else if(jn&&Qt.touches[2]&&ir.boxSelectionEnabled())Qt.preventDefault(),y.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,y.touchData.selecting||ir.emit({originalEvent:Qt,type:"boxstart",position:{x:sr[0],y:sr[1]}}),y.touchData.selecting=!0,y.touchData.didSelect=!0,_r[4]=1,!_r||_r.length===0||_r[0]===void 0?(_r[0]=(sr[0]+sr[2]+sr[4])/3,_r[1]=(sr[1]+sr[3]+sr[5])/3,_r[2]=(sr[0]+sr[2]+sr[4])/3+1,_r[3]=(sr[1]+sr[3]+sr[5])/3+1):(_r[2]=(sr[0]+sr[2]+sr[4])/3,_r[3]=(sr[1]+sr[3]+sr[5])/3),y.redrawHint("select",!0),y.redraw();else if(jn&&Qt.touches[1]&&!y.touchData.didSelect&&ir.zoomingEnabled()&&ir.panningEnabled()&&ir.userZoomingEnabled()&&ir.userPanningEnabled()){Qt.preventDefault(),y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);var w1=y.dragData.touchDragEles;if(w1){y.redrawHint("drag",!0);for(var zd=0;zd0&&!y.hoverData.draggingEles&&!y.swipePanning&&y.data.bgActivePosistion!=null&&(y.data.bgActivePosistion=void 0,y.redrawHint("select",!0),y.redraw())}},!1);var Jr;y.registerBinding(window,"touchcancel",Jr=function(Qt){var jn=y.touchData.start;y.touchData.capture=!1,jn&&jn.unactivate()});var wi,Ks,ka,Ci;if(y.registerBinding(window,"touchend",wi=function(Qt){var jn=y.touchData.start,_r=y.touchData.capture;if(_r)Qt.touches.length===0&&(y.touchData.capture=!1),Qt.preventDefault();else return;var ir=y.selection;y.swipePanning=!1,y.hoverData.draggingEles=!1;var sr=y.cy,Ia=sr.zoom(),$r=y.touchData.now,Ki=y.touchData.earlier;if(Qt.touches[0]){var Po=y.projectIntoViewport(Qt.touches[0].clientX,Qt.touches[0].clientY);$r[0]=Po[0],$r[1]=Po[1]}if(Qt.touches[1]){var Po=y.projectIntoViewport(Qt.touches[1].clientX,Qt.touches[1].clientY);$r[2]=Po[0],$r[3]=Po[1]}if(Qt.touches[2]){var Po=y.projectIntoViewport(Qt.touches[2].clientX,Qt.touches[2].clientY);$r[4]=Po[0],$r[5]=Po[1]}jn&&jn.unactivate();var Nc;if(y.touchData.cxt){if(Nc={originalEvent:Qt,type:"cxttapend",position:{x:$r[0],y:$r[1]}},jn?jn.emit(Nc):sr.emit(Nc),!y.touchData.cxtDragged){var Za={originalEvent:Qt,type:"cxttap",position:{x:$r[0],y:$r[1]}};jn?jn.emit(Za):sr.emit(Za)}y.touchData.start&&(y.touchData.start._private.grabbed=!1),y.touchData.cxt=!1,y.touchData.start=null,y.redraw();return}if(!Qt.touches[2]&&sr.boxSelectionEnabled()&&y.touchData.selecting){y.touchData.selecting=!1;var mc=sr.collection(y.getAllInBox(ir[0],ir[1],ir[2],ir[3]));ir[0]=void 0,ir[1]=void 0,ir[2]=void 0,ir[3]=void 0,ir[4]=0,y.redrawHint("select",!0),sr.emit({type:"boxend",originalEvent:Qt,position:{x:$r[0],y:$r[1]}});var Ea=function(O3){return O3.selectable()&&!O3.selected()};mc.emit("box").stdFilter(Ea).select().emit("boxselect"),mc.nonempty()&&y.redrawHint("eles",!0),y.redraw()}if(jn!=null&&jn.unactivate(),Qt.touches[2])y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);else if(!Qt.touches[1]){if(!Qt.touches[0]){if(!Qt.touches[0]){y.data.bgActivePosistion=void 0,y.redrawHint("select",!0);var Ja=y.dragData.touchDragEles;if(jn!=null){var vl=jn._private.grabbed;ft(Ja),y.redrawHint("drag",!0),y.redrawHint("eles",!0),vl&&(jn.emit("freeon"),Ja.emit("free"),y.dragData.didDrag&&(jn.emit("dragfreeon"),Ja.emit("dragfree"))),x(jn,["touchend","tapend","vmouseup","tapdragout"],Qt,{x:$r[0],y:$r[1]}),jn.unactivate(),y.touchData.start=null}else{var zf=y.findNearestElement($r[0],$r[1],!0,!0);x(zf,["touchend","tapend","vmouseup","tapdragout"],Qt,{x:$r[0],y:$r[1]})}var xp=y.touchData.startPosition[0]-$r[0],kp=xp*xp,qf=y.touchData.startPosition[1]-$r[1],mg=qf*qf,sd=kp+mg,bv=sd*Ia*Ia;y.touchData.singleTouchMoved||(jn||sr.$(":selected").unselect(["tapunselect"]),x(jn,["tap","vclick"],Qt,{x:$r[0],y:$r[1]}),Ks=!1,Qt.timeStamp-Ci<=sr.multiClickDebounceTime()?(ka&&clearTimeout(ka),Ks=!0,Ci=null,x(jn,["dbltap","vdblclick"],Qt,{x:$r[0],y:$r[1]})):(ka=setTimeout(function(){Ks||x(jn,["onetap","voneclick"],Qt,{x:$r[0],y:$r[1]})},sr.multiClickDebounceTime()),Ci=Qt.timeStamp)),jn!=null&&!y.dragData.didDrag&&jn._private.selectable&&bv"u"){var hi=[],gs=function(Qt){return{clientX:Qt.clientX,clientY:Qt.clientY,force:1,identifier:Qt.pointerId,pageX:Qt.pageX,pageY:Qt.pageY,radiusX:Qt.width/2,radiusY:Qt.height/2,screenX:Qt.screenX,screenY:Qt.screenY,target:Qt.target}},qi=function(Qt){return{event:Qt,touch:gs(Qt)}},Si=function(Qt){hi.push(qi(Qt))},Ui=function(Qt){for(var jn=0;jn0)return Sn[0]}return null},at=Object.keys(W),lt=0;lt0?et:eF(D,O,g,x,T,A,$)},checkPoint:function(g,x,T,A,D,O,$){var q=xk(A,D),S=2*q;if(lv(g,x,this.points,O,$,A,D-S,[0,-1],T)||lv(g,x,this.points,O,$,A-S,D,[0,-1],T))return!0;var G=A/2+2*T,W=D/2+2*T,et=[O-G,$-W,O-G,$,O+G,$,O+G,$-W];return!!(jd(g,x,et)||C3(g,x,S,S,O+A/2-q,$+D/2-q,T)||C3(g,x,S,S,O-A/2+q,$+D/2-q,T))}}},dv.registerNodeShapes=function(){var y=this.nodeShapes={},g=this;this.generateEllipse(),this.generatePolygon("triangle",nd(3,0)),this.generateRoundPolygon("round-triangle",nd(3,0)),this.generatePolygon("rectangle",nd(4,0)),y.square=y.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var x=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",x),this.generateRoundPolygon("round-diamond",x)}this.generatePolygon("pentagon",nd(5,0)),this.generateRoundPolygon("round-pentagon",nd(5,0)),this.generatePolygon("hexagon",nd(6,0)),this.generateRoundPolygon("round-hexagon",nd(6,0)),this.generatePolygon("heptagon",nd(7,0)),this.generateRoundPolygon("round-heptagon",nd(7,0)),this.generatePolygon("octagon",nd(8,0)),this.generateRoundPolygon("round-octagon",nd(8,0));var T=new Array(20);{var A=CL(5,0),D=CL(5,Math.PI/5),O=.5*(3-Math.sqrt(5));O*=1.57;for(var $=0;$=g.deqFastCost*jt)break}else if(S){if(Mt>=g.deqCost*at||Mt>=g.deqAvgCost*et)break}else if(Dt>=g.deqNoDrawCost*ZL)break;var Zt=g.deq(T,At,ft);if(Zt.length>0)for(var Kt=0;Kt0&&(g.onDeqd(T,lt),!S&&g.shouldRedraw(T,lt,At,ft)&&D())},$=g.priority||wL;A.beforeRender(O,$(T))}}}},ntt=function(){function y(g){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gm;p(this,y),this.idsByKey=new zb,this.keyForId=new zb,this.cachesByLvl=new zb,this.lvls=[],this.getKey=g,this.doesEleInvalidateKey=x}return m(y,[{key:"getIdsFor",value:function(x){x==null&&bl("Can not get id list for null key");var T=this.idsByKey,A=this.idsByKey.get(x);return A||(A=new z5,T.set(x,A)),A}},{key:"addIdForKey",value:function(x,T){x!=null&&this.getIdsFor(x).add(T)}},{key:"deleteIdForKey",value:function(x,T){x!=null&&this.getIdsFor(x).delete(T)}},{key:"getNumberOfIdsForKey",value:function(x){return x==null?0:this.getIdsFor(x).size}},{key:"updateKeyMappingFor",value:function(x){var T=x.id(),A=this.keyForId.get(T),D=this.getKey(x);this.deleteIdForKey(A,T),this.addIdForKey(D,T),this.keyForId.set(T,D)}},{key:"deleteKeyMappingFor",value:function(x){var T=x.id(),A=this.keyForId.get(T);this.deleteIdForKey(A,T),this.keyForId.delete(T)}},{key:"keyHasChangedFor",value:function(x){var T=x.id(),A=this.keyForId.get(T),D=this.getKey(x);return A!==D}},{key:"isInvalid",value:function(x){return this.keyHasChangedFor(x)||this.doesEleInvalidateKey(x)}},{key:"getCachesAt",value:function(x){var T=this.cachesByLvl,A=this.lvls,D=T.get(x);return D||(D=new zb,T.set(x,D),A.push(x)),D}},{key:"getCache",value:function(x,T){return this.getCachesAt(T).get(x)}},{key:"get",value:function(x,T){var A=this.getKey(x),D=this.getCache(A,T);return D!=null&&this.updateKeyMappingFor(x),D}},{key:"getForCachedKey",value:function(x,T){var A=this.keyForId.get(x.id()),D=this.getCache(A,T);return D}},{key:"hasCache",value:function(x,T){return this.getCachesAt(T).has(x)}},{key:"has",value:function(x,T){var A=this.getKey(x);return this.hasCache(A,T)}},{key:"setCache",value:function(x,T,A){A.key=x,this.getCachesAt(T).set(x,A)}},{key:"set",value:function(x,T,A){var D=this.getKey(x);this.setCache(D,T,A),this.updateKeyMappingFor(x)}},{key:"deleteCache",value:function(x,T){this.getCachesAt(T).delete(x)}},{key:"delete",value:function(x,T){var A=this.getKey(x);this.deleteCache(A,T)}},{key:"invalidateKey",value:function(x){var T=this;this.lvls.forEach(function(A){return T.deleteCache(x,A)})}},{key:"invalidate",value:function(x){var T=x.id(),A=this.keyForId.get(T);this.deleteKeyMappingFor(x);var D=this.doesEleInvalidateKey(x);return D&&this.invalidateKey(A),D||this.getNumberOfIdsForKey(A)===0}}]),y}(),w9=25,m9=50,cx=-4,JL=3,tM=7.99,rtt=8,itt=1024,stt=1024,UB=1024,att=.2,ott=.8,ctt=10,utt=.15,ltt=.1,htt=.9,ftt=.9,dtt=100,gtt=1,ux={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},ptt=Bf({getKey:null,doesEleInvalidateKey:gm,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:k3,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),zk=function(g,x){var T=this;T.renderer=g,T.onDequeues=[];var A=ptt(x);me(T,A),T.lookup=new ntt(A.getKey,A.doesEleInvalidateKey),T.setupDequeueing()},kh=zk.prototype;kh.reasons=ux,kh.getTextureQueue=function(y){var g=this;return g.eleImgCaches=g.eleImgCaches||{},g.eleImgCaches[y]=g.eleImgCaches[y]||[]},kh.getRetiredTextureQueue=function(y){var g=this,x=g.eleImgCaches.retired=g.eleImgCaches.retired||{},T=x[y]=x[y]||[];return T},kh.getElementQueue=function(){var y=this,g=y.eleCacheQueue=y.eleCacheQueue||new vk(function(x,T){return T.reqs-x.reqs});return g},kh.getElementKeyToQueue=function(){var y=this,g=y.eleKeyToCacheQueue=y.eleKeyToCacheQueue||{};return g},kh.getElement=function(y,g,x,T,A){var D=this,O=this.renderer,$=O.cy.zoom(),q=this.lookup;if(!g||g.w===0||g.h===0||isNaN(g.w)||isNaN(g.h)||!y.visible()||y.removed()||!D.allowEdgeTxrCaching&&y.isEdge()||!D.allowParentTxrCaching&&y.isParent())return null;if(T==null&&(T=Math.ceil(xL($*x))),T=tM||T>JL)return null;var S=Math.pow(2,T),G=g.h*S,W=g.w*S,et=O.eleTextBiggerThanMin(y,S);if(!this.isVisible(y,et))return null;var at=q.get(y,T);if(at&&at.invalidated&&(at.invalidated=!1,at.texture.invalidatedWidth-=at.width),at)return at;var lt;if(G<=w9?lt=w9:G<=m9?lt=m9:lt=Math.ceil(G/m9)*m9,G>UB||W>stt)return null;var ft=D.getTextureQueue(lt),At=ft[ft.length-2],kt=function(){return D.recycleTexture(lt,W)||D.addTexture(lt,W)};At||(At=ft[ft.length-1]),At||(At=kt()),At.width-At.usedWidthT;ge--)Vt=D.getElement(y,g,x,ge,ux.downscale);fe()}else return D.queueElement(y,Kt.level-1),Kt;else{var ne;if(!Dt&&!jt&&!Zt)for(var Pe=T-1;Pe>=cx;Pe--){var pe=q.get(y,Pe);if(pe){ne=pe;break}}if(Mt(ne))return D.queueElement(y,T),ne;At.context.translate(At.usedWidth,0),At.context.scale(S,S),this.drawElement(At.context,y,g,et,!1),At.context.scale(1/S,1/S),At.context.translate(-At.usedWidth,0)}return at={x:At.usedWidth,texture:At,level:T,scale:S,width:W,height:G,scaledLabelShown:et},At.usedWidth+=Math.ceil(W+rtt),At.eleCaches.push(at),q.set(y,T,at),D.checkTextureFullness(At),at},kh.invalidateElements=function(y){for(var g=0;g=att*y.width&&this.retireTexture(y)},kh.checkTextureFullness=function(y){var g=this,x=g.getTextureQueue(y.height);y.usedWidth/y.width>ott&&y.fullnessChecks>=ctt?pm(x,y):y.fullnessChecks++},kh.retireTexture=function(y){var g=this,x=y.height,T=g.getTextureQueue(x),A=this.lookup;pm(T,y),y.retired=!0;for(var D=y.eleCaches,O=0;O=g)return O.retired=!1,O.usedWidth=0,O.invalidatedWidth=0,O.fullnessChecks=0,mL(O.eleCaches),O.context.setTransform(1,0,0,1,0,0),O.context.clearRect(0,0,O.width,O.height),pm(A,O),T.push(O),O}},kh.queueElement=function(y,g){var x=this,T=x.getElementQueue(),A=x.getElementKeyToQueue(),D=this.getKey(y),O=A[D];if(O)O.level=Math.max(O.level,g),O.eles.merge(y),O.reqs++,T.updateItem(O);else{var $={eles:y.spawn().merge(y),level:g,reqs:1,key:D};T.push($),A[D]=$}},kh.dequeue=function(y){for(var g=this,x=g.getElementQueue(),T=g.getElementKeyToQueue(),A=[],D=g.lookup,O=0;O0;O++){var $=x.pop(),q=$.key,S=$.eles[0],G=D.hasCache(S,$.level);if(T[q]=null,G)continue;A.push($);var W=g.getBoundingBox(S);g.getElement(S,W,y,$.level,ux.dequeue)}return A},kh.removeFromQueue=function(y){var g=this,x=g.getElementQueue(),T=g.getElementKeyToQueue(),A=this.getKey(y),D=T[A];D!=null&&(D.eles.length===1?(D.reqs=$5,x.updateItem(D),x.pop(),T[A]=null):D.eles.unmerge(y))},kh.onDequeue=function(y){this.onDequeues.push(y)},kh.offDequeue=function(y){pm(this.onDequeues,y)},kh.setupDequeueing=v9.setupDequeueing({deqRedrawThreshold:dtt,deqCost:utt,deqAvgCost:ltt,deqNoDrawCost:htt,deqFastCost:ftt,deq:function(g,x,T){return g.dequeue(x,T)},onDeqd:function(g,x){for(var T=0;T=y9||x>qk)return null}T.validateLayersElesOrdering(x,y);var q=T.layersByLevel,S=Math.pow(2,x),G=q[x]=q[x]||[],W,et=T.levelIsComplete(x,y),at,lt=function(){var fe=function(bn){if(T.validateLayersElesOrdering(bn,y),T.levelIsComplete(bn,y))return at=q[bn],!0},ge=function(bn){if(!at)for(var ze=x+bn;lx<=ze&&ze<=qk&&!fe(ze);ze+=bn);};ge(1),ge(-1);for(var ne=G.length-1;ne>=0;ne--){var Pe=G[ne];Pe.invalid&&pm(G,Pe)}};if(!et)lt();else return G;var ft=function(){if(!W){W=Rd();for(var fe=0;fespt)return null;var Pe=T.makeLayer(W,x);if(ge!=null){var pe=G.indexOf(ge)+1;G.splice(pe,0,Pe)}else(fe.insert===void 0||fe.insert)&&G.unshift(Pe);return Pe};if(T.skipping&&!$)return null;for(var kt=null,Mt=y.length/btt,Dt=!$,jt=0;jt=Mt||!tF(kt.bb,Zt.boundingBox()))&&(kt=At({insert:!0,after:kt}),!kt))return null;at||Dt?T.queueLayer(kt,Zt):T.drawEleInLayer(kt,Zt,x,g),kt.eles.push(Zt),zt[x]=kt}return at||(Dt?null:G)},p1.getEleLevelForLayerLevel=function(y,g){return y},p1.drawEleInLayer=function(y,g,x,T){var A=this,D=this.renderer,O=y.context,$=g.boundingBox();$.w===0||$.h===0||!g.visible()||(x=A.getEleLevelForLayerLevel(x,T),D.setImgSmoothing(O,!1),D.drawCachedElement(O,g,null,null,x,apt),D.setImgSmoothing(O,!0))},p1.levelIsComplete=function(y,g){var x=this,T=x.layersByLevel[y];if(!T||T.length===0)return!1;for(var A=0,D=0;D0||O.invalid)return!1;A+=O.eles.length}return A===g.length},p1.validateLayersElesOrdering=function(y,g){var x=this.layersByLevel[y];if(x)for(var T=0;T0){g=!0;break}}return g},p1.invalidateElements=function(y){var g=this;y.length!==0&&(g.lastInvalidationTime=dg(),!(y.length===0||!g.haveLayers())&&g.updateElementsInLayers(y,function(T,A,D){g.invalidateLayer(T)}))},p1.invalidateLayer=function(y){if(this.lastInvalidationTime=dg(),!y.invalid){var g=y.level,x=y.eles,T=this.layersByLevel[g];pm(T,y),y.elesQueue=[],y.invalid=!0,y.replacement&&(y.replacement.invalid=!0);for(var A=0;A3&&arguments[3]!==void 0?arguments[3]:!0,A=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,D=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,O=this,$=g._private.rscratch;if(!(D&&!g.visible())&&!($.badLine||$.allpts==null||isNaN($.allpts[0]))){var q;x&&(q=x,y.translate(-q.x1,-q.y1));var S=D?g.pstyle("opacity").value:1,G=D?g.pstyle("line-opacity").value:1,W=g.pstyle("curve-style").value,et=g.pstyle("line-style").value,at=g.pstyle("width").pfValue,lt=g.pstyle("line-cap").value,ft=S*G,At=S*G,kt=function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ft;W==="straight-triangle"?(O.eleStrokeStyle(y,g,ne),O.drawEdgeTrianglePath(g,y,$.allpts)):(y.lineWidth=at,y.lineCap=lt,O.eleStrokeStyle(y,g,ne),O.drawEdgePath(g,y,$.allpts,et),y.lineCap="butt")},Mt=function(){A&&O.drawEdgeOverlay(y,g)},Dt=function(){A&&O.drawEdgeUnderlay(y,g)},jt=function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:At;O.drawArrowheads(y,g,ne)},Zt=function(){O.drawElementText(y,g,null,T)};y.lineJoin="round";var Kt=g.pstyle("ghost").value==="yes";if(Kt){var zt=g.pstyle("ghost-offset-x").pfValue,ee=g.pstyle("ghost-offset-y").pfValue,Vt=g.pstyle("ghost-opacity").value,fe=ft*Vt;y.translate(zt,ee),kt(fe),jt(fe),y.translate(-zt,-ee)}Dt(),kt(),jt(),Mt(),Zt(),x&&y.translate(q.x1,q.y1)}};var ktt=function(g){if(!["overlay","underlay"].includes(g))throw new Error("Invalid state");return function(x,T){if(T.visible()){var A=T.pstyle("".concat(g,"-opacity")).value;if(A!==0){var D=this,O=D.usePaths(),$=T._private.rscratch,q=T.pstyle("".concat(g,"-padding")).pfValue,S=2*q,G=T.pstyle("".concat(g,"-color")).value;x.lineWidth=S,$.edgeType==="self"&&!O?x.lineCap="butt":x.lineCap="round",D.colorStrokeStyle(x,G[0],G[1],G[2],A),D.drawEdgePath(T,x,$.allpts,"solid")}}}};pv.drawEdgeOverlay=ktt("overlay"),pv.drawEdgeUnderlay=ktt("underlay"),pv.drawEdgePath=function(y,g,x,T){var A=y._private.rscratch,D=g,O,$=!1,q=this.usePaths(),S=y.pstyle("line-dash-pattern").pfValue,G=y.pstyle("line-dash-offset").pfValue;if(q){var W=x.join("$"),et=A.pathCacheKey&&A.pathCacheKey===W;et?(O=g=A.pathCache,$=!0):(O=g=new Path2D,A.pathCacheKey=W,A.pathCache=O)}if(D.setLineDash)switch(T){case"dotted":D.setLineDash([1,1]);break;case"dashed":D.setLineDash(S),D.lineDashOffset=G;break;case"solid":D.setLineDash([]);break}if(!$&&!A.badLine)switch(g.beginPath&&g.beginPath(),g.moveTo(x[0],x[1]),A.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var at=2;at+35&&arguments[5]!==void 0?arguments[5]:!0,O=this;if(T==null){if(D&&!O.eleTextBiggerThanMin(g))return}else if(T===!1)return;if(g.isNode()){var $=g.pstyle("label");if(!$||!$.value)return;var q=O.getLabelJustification(g);y.textAlign=q,y.textBaseline="bottom"}else{var S=g.element()._private.rscratch.badLine,G=g.pstyle("label"),W=g.pstyle("source-label"),et=g.pstyle("target-label");if(S||(!G||!G.value)&&(!W||!W.value)&&(!et||!et.value))return;y.textAlign="center",y.textBaseline="bottom"}var at=!x,lt;x&&(lt=x,y.translate(-lt.x1,-lt.y1)),A==null?(O.drawText(y,g,null,at,D),g.isEdge()&&(O.drawText(y,g,"source",at,D),O.drawText(y,g,"target",at,D))):O.drawText(y,g,A,at,D),x&&y.translate(lt.x1,lt.y1)},hx.getFontCache=function(y){var g;this.fontCaches=this.fontCaches||[];for(var x=0;x2&&arguments[2]!==void 0?arguments[2]:!0,T=g.pstyle("font-style").strValue,A=g.pstyle("font-size").pfValue+"px",D=g.pstyle("font-family").strValue,O=g.pstyle("font-weight").strValue,$=x?g.effectiveOpacity()*g.pstyle("text-opacity").value:1,q=g.pstyle("text-outline-opacity").value*$,S=g.pstyle("color").value,G=g.pstyle("text-outline-color").value;y.font=T+" "+O+" "+A+" "+D,y.lineJoin="round",this.colorFillStyle(y,S[0],S[1],S[2],$),this.colorStrokeStyle(y,G[0],G[1],G[2],q)};function fpt(y,g,x,T,A){var D=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5;y.beginPath(),y.moveTo(g+D,x),y.lineTo(g+T-D,x),y.quadraticCurveTo(g+T,x,g+T,x+D),y.lineTo(g+T,x+A-D),y.quadraticCurveTo(g+T,x+A,g+T-D,x+A),y.lineTo(g+D,x+A),y.quadraticCurveTo(g,x+A,g,x+A-D),y.lineTo(g,x+D),y.quadraticCurveTo(g,x,g+D,x),y.closePath(),y.fill()}hx.getTextAngle=function(y,g){var x,T=y._private,A=T.rscratch,D=g?g+"-":"",O=y.pstyle(D+"text-rotation"),$=bp(A,"labelAngle",g);return O.strValue==="autorotate"?x=y.isEdge()?$:0:O.strValue==="none"?x=0:x=O.pfValue,x},hx.drawText=function(y,g,x){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,A=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,D=g._private,O=D.rscratch,$=A?g.effectiveOpacity():1;if(!(A&&($===0||g.pstyle("text-opacity").value===0))){x==="main"&&(x=null);var q=bp(O,"labelX",x),S=bp(O,"labelY",x),G,W,et=this.getLabelText(g,x);if(et!=null&&et!==""&&!isNaN(q)&&!isNaN(S)){this.setupTextStyle(y,g,A);var at=x?x+"-":"",lt=bp(O,"labelWidth",x),ft=bp(O,"labelHeight",x),At=g.pstyle(at+"text-margin-x").pfValue,kt=g.pstyle(at+"text-margin-y").pfValue,Mt=g.isEdge(),Dt=g.pstyle("text-halign").value,jt=g.pstyle("text-valign").value;Mt&&(Dt="center",jt="center"),q+=At,S+=kt;var Zt;switch(T?Zt=this.getTextAngle(g,x):Zt=0,Zt!==0&&(G=q,W=S,y.translate(G,W),y.rotate(Zt),q=0,S=0),jt){case"top":break;case"center":S+=ft/2;break;case"bottom":S+=ft;break}var Kt=g.pstyle("text-background-opacity").value,zt=g.pstyle("text-border-opacity").value,ee=g.pstyle("text-border-width").pfValue,Vt=g.pstyle("text-background-padding").pfValue;if(Kt>0||ee>0&&zt>0){var fe=q-Vt;switch(Dt){case"left":fe-=lt;break;case"center":fe-=lt/2;break}var ge=S-ft-Vt,ne=lt+2*Vt,Pe=ft+2*Vt;if(Kt>0){var pe=y.fillStyle,bn=g.pstyle("text-background-color").value;y.fillStyle="rgba("+bn[0]+","+bn[1]+","+bn[2]+","+Kt*$+")";var ze=g.pstyle("text-background-shape").strValue;ze.indexOf("round")===0?fpt(y,fe,ge,ne,Pe,2):y.fillRect(fe,ge,ne,Pe),y.fillStyle=pe}if(ee>0&&zt>0){var Ve=y.strokeStyle,En=y.lineWidth,Dn=g.pstyle("text-border-color").value,Kn=g.pstyle("text-border-style").value;if(y.strokeStyle="rgba("+Dn[0]+","+Dn[1]+","+Dn[2]+","+zt*$+")",y.lineWidth=ee,y.setLineDash)switch(Kn){case"dotted":y.setLineDash([1,1]);break;case"dashed":y.setLineDash([4,2]);break;case"double":y.lineWidth=ee/4,y.setLineDash([]);break;case"solid":y.setLineDash([]);break}if(y.strokeRect(fe,ge,ne,Pe),Kn==="double"){var Sn=ee/2;y.strokeRect(fe+Sn,ge+Sn,ne-Sn*2,Pe-Sn*2)}y.setLineDash&&y.setLineDash([]),y.lineWidth=En,y.strokeStyle=Ve}}var Wn=2*g.pstyle("text-outline-width").pfValue;if(Wn>0&&(y.lineWidth=Wn),g.pstyle("text-wrap").value==="wrap"){var rr=bp(O,"labelWrapCachedLines",x),vr=bp(O,"labelLineHeight",x),ur=lt/2,tr=this.getLabelJustification(g);switch(tr==="auto"||(Dt==="left"?tr==="left"?q+=-lt:tr==="center"&&(q+=-ur):Dt==="center"?tr==="left"?q+=-ur:tr==="right"&&(q+=ur):Dt==="right"&&(tr==="center"?q+=ur:tr==="right"&&(q+=lt))),jt){case"top":S-=(rr.length-1)*vr;break;case"center":case"bottom":S-=(rr.length-1)*vr;break}for(var wn=0;wn0&&y.strokeText(rr[wn],q,S),y.fillText(rr[wn],q,S),S+=vr}else Wn>0&&y.strokeText(et,q,S),y.fillText(et,q,S);Zt!==0&&(y.rotate(-Zt),y.translate(-G,-W))}}};var Gk={};Gk.drawNode=function(y,g,x){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,A=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,D=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,O=this,$,q,S=g._private,G=S.rscratch,W=g.position();if(!(!X(W.x)||!X(W.y))&&!(D&&!g.visible())){var et=D?g.effectiveOpacity():1,at=O.usePaths(),lt,ft=!1,At=g.padding();$=g.width()+2*At,q=g.height()+2*At;var kt;x&&(kt=x,y.translate(-kt.x1,-kt.y1));for(var Mt=g.pstyle("background-image"),Dt=Mt.value,jt=new Array(Dt.length),Zt=new Array(Dt.length),Kt=0,zt=0;zt0&&arguments[0]!==void 0?arguments[0]:Pe;O.eleFillStyle(y,g,Si)},En=function(){var Si=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ze;O.colorStrokeStyle(y,pe[0],pe[1],pe[2],Si)},Dn=g.pstyle("shape").strValue,Kn=g.pstyle("shape-polygon-points").pfValue;if(at){y.translate(W.x,W.y);var Sn=O.nodePathCache=O.nodePathCache||[],Wn=ed(Dn==="polygon"?Dn+","+Kn.join(","):Dn,""+q,""+$),rr=Sn[Wn];rr!=null?(lt=rr,ft=!0,G.pathCache=lt):(lt=new Path2D,Sn[Wn]=G.pathCache=lt)}var vr=function(){if(!ft){var Si=W;at&&(Si={x:0,y:0}),O.nodeShapes[O.getNodeShape(g)].draw(lt||y,Si.x,Si.y,$,q)}at?y.fill(lt):y.fill()},ur=function(){for(var Si=arguments.length>0&&arguments[0]!==void 0?arguments[0]:et,Ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ga=S.backgrounding,Ys=0,zs=0;zs0&&arguments[0]!==void 0?arguments[0]:!1,Ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:et;O.hasPie(g)&&(O.drawPie(y,g,Ui),Si&&(at||O.nodeShapes[O.getNodeShape(g)].draw(y,W.x,W.y,$,q)))},wn=function(){var Si=arguments.length>0&&arguments[0]!==void 0?arguments[0]:et,Ui=(ge>0?ge:-ge)*Si,Ga=ge>0?0:255;ge!==0&&(O.colorFillStyle(y,Ga,Ga,Ga,Ui),at?y.fill(lt):y.fill())},gr=function(){if(ne>0){if(y.lineWidth=ne,y.lineCap="butt",y.setLineDash)switch(bn){case"dotted":y.setLineDash([1,1]);break;case"dashed":y.setLineDash([4,2]);break;case"solid":case"double":y.setLineDash([]);break}if(at?y.stroke(lt):y.stroke(),bn==="double"){y.lineWidth=ne/3;var Si=y.globalCompositeOperation;y.globalCompositeOperation="destination-out",at?y.stroke(lt):y.stroke(),y.globalCompositeOperation=Si}y.setLineDash&&y.setLineDash([])}},fr=function(){A&&O.drawNodeOverlay(y,g,W,$,q)},Jr=function(){A&&O.drawNodeUnderlay(y,g,W,$,q)},wi=function(){O.drawElementText(y,g,null,T)},Ks=g.pstyle("ghost").value==="yes";if(Ks){var ka=g.pstyle("ghost-offset-x").pfValue,Ci=g.pstyle("ghost-offset-y").pfValue,hi=g.pstyle("ghost-opacity").value,gs=hi*et;y.translate(ka,Ci),Ve(hi*Pe),vr(),ur(gs,!0),En(hi*ze),gr(),tr(ge!==0||ne!==0),ur(gs,!1),wn(gs),y.translate(-ka,-Ci)}at&&y.translate(-W.x,-W.y),Jr(),at&&y.translate(W.x,W.y),Ve(),vr(),ur(et,!0),En(),gr(),tr(ge!==0||ne!==0),ur(et,!1),wn(),at&&y.translate(-W.x,-W.y),wi(),fr(),x&&y.translate(kt.x1,kt.y1)}};var Ett=function(g){if(!["overlay","underlay"].includes(g))throw new Error("Invalid state");return function(x,T,A,D,O){var $=this;if(T.visible()){var q=T.pstyle("".concat(g,"-padding")).pfValue,S=T.pstyle("".concat(g,"-opacity")).value,G=T.pstyle("".concat(g,"-color")).value,W=T.pstyle("".concat(g,"-shape")).value;if(S>0){if(A=A||T.position(),D==null||O==null){var et=T.padding();D=T.width()+2*et,O=T.height()+2*et}$.colorFillStyle(x,G[0],G[1],G[2],S),$.nodeShapes[W].draw(x,A.x,A.y,D+q*2,O+q*2),x.fill()}}}};Gk.drawNodeOverlay=Ett("overlay"),Gk.drawNodeUnderlay=Ett("underlay"),Gk.hasPie=function(y){return y=y[0],y._private.hasPie},Gk.drawPie=function(y,g,x,T){g=g[0],T=T||g.position();var A=g.cy().style(),D=g.pstyle("pie-size"),O=T.x,$=T.y,q=g.width(),S=g.height(),G=Math.min(q,S)/2,W=0,et=this.usePaths();et&&(O=0,$=0),D.units==="%"?G=G*D.pfValue:D.pfValue!==void 0&&(G=D.pfValue/2);for(var at=1;at<=A.pieBackgroundN;at++){var lt=g.pstyle("pie-"+at+"-background-size").value,ft=g.pstyle("pie-"+at+"-background-color").value,At=g.pstyle("pie-"+at+"-background-opacity").value*x,kt=lt/100;kt+W>1&&(kt=1-W);var Mt=1.5*Math.PI+2*Math.PI*W,Dt=2*Math.PI*kt,jt=Mt+Dt;lt===0||W>=1||W+kt>1||(y.beginPath(),y.moveTo(O,$),y.arc(O,$,G,Mt,jt),y.closePath(),this.colorFillStyle(y,ft[0],ft[1],ft[2],At),y.fill(),W+=kt)}};var vg={},dpt=100;vg.getPixelRatio=function(){var y=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var g=y.backingStorePixelRatio||y.webkitBackingStorePixelRatio||y.mozBackingStorePixelRatio||y.msBackingStorePixelRatio||y.oBackingStorePixelRatio||y.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/g},vg.paintCache=function(y){for(var g=this.paintCaches=this.paintCaches||[],x=!0,T,A=0;AO.minMbLowQualFrames&&(O.motionBlurPxRatio=O.mbPxRBlurry)),O.clearingMotionBlur&&(O.motionBlurPxRatio=1),O.textureDrawLastFrame&&!W&&(G[O.NODE]=!0,G[O.SELECT_BOX]=!0);var Mt=q.style(),Dt=q.zoom(),jt=A!==void 0?A:Dt,Zt=q.pan(),Kt={x:Zt.x,y:Zt.y},zt={zoom:Dt,pan:{x:Zt.x,y:Zt.y}},ee=O.prevViewport,Vt=ee===void 0||zt.zoom!==ee.zoom||zt.pan.x!==ee.pan.x||zt.pan.y!==ee.pan.y;!Vt&&!(ft&&!lt)&&(O.motionBlurPxRatio=1),D&&(Kt=D),jt*=$,Kt.x*=$,Kt.y*=$;var fe=O.getCachedZSortedEles();function ge(Ci,hi,gs,qi,Si){var Ui=Ci.globalCompositeOperation;Ci.globalCompositeOperation="destination-out",O.colorFillStyle(Ci,255,255,255,O.motionBlurTransparency),Ci.fillRect(hi,gs,qi,Si),Ci.globalCompositeOperation=Ui}function ne(Ci,hi){var gs,qi,Si,Ui;!O.clearingMotionBlur&&(Ci===S.bufferContexts[O.MOTIONBLUR_BUFFER_NODE]||Ci===S.bufferContexts[O.MOTIONBLUR_BUFFER_DRAG])?(gs={x:Zt.x*at,y:Zt.y*at},qi=Dt*at,Si=O.canvasWidth*at,Ui=O.canvasHeight*at):(gs=Kt,qi=jt,Si=O.canvasWidth,Ui=O.canvasHeight),Ci.setTransform(1,0,0,1,0,0),hi==="motionBlur"?ge(Ci,0,0,Si,Ui):!g&&(hi===void 0||hi)&&Ci.clearRect(0,0,Si,Ui),x||(Ci.translate(gs.x,gs.y),Ci.scale(qi,qi)),D&&Ci.translate(D.x,D.y),A&&Ci.scale(A,A)}if(W||(O.textureDrawLastFrame=!1),W){if(O.textureDrawLastFrame=!0,!O.textureCache){O.textureCache={},O.textureCache.bb=q.mutableElements().boundingBox(),O.textureCache.texture=O.data.bufferCanvases[O.TEXTURE_BUFFER];var Pe=O.data.bufferContexts[O.TEXTURE_BUFFER];Pe.setTransform(1,0,0,1,0,0),Pe.clearRect(0,0,O.canvasWidth*O.textureMult,O.canvasHeight*O.textureMult),O.render({forcedContext:Pe,drawOnlyNodeLayer:!0,forcedPxRatio:$*O.textureMult});var zt=O.textureCache.viewport={zoom:q.zoom(),pan:q.pan(),width:O.canvasWidth,height:O.canvasHeight};zt.mpan={x:(0-zt.pan.x)/zt.zoom,y:(0-zt.pan.y)/zt.zoom}}G[O.DRAG]=!1,G[O.NODE]=!1;var pe=S.contexts[O.NODE],bn=O.textureCache.texture,zt=O.textureCache.viewport;pe.setTransform(1,0,0,1,0,0),et?ge(pe,0,0,zt.width,zt.height):pe.clearRect(0,0,zt.width,zt.height);var ze=Mt.core("outside-texture-bg-color").value,Ve=Mt.core("outside-texture-bg-opacity").value;O.colorFillStyle(pe,ze[0],ze[1],ze[2],Ve),pe.fillRect(0,0,zt.width,zt.height);var Dt=q.zoom();ne(pe,!1),pe.clearRect(zt.mpan.x,zt.mpan.y,zt.width/zt.zoom/$,zt.height/zt.zoom/$),pe.drawImage(bn,zt.mpan.x,zt.mpan.y,zt.width/zt.zoom/$,zt.height/zt.zoom/$)}else O.textureOnViewport&&!g&&(O.textureCache=null);var En=q.extent(),Dn=O.pinching||O.hoverData.dragging||O.swipePanning||O.data.wheelZooming||O.hoverData.draggingEles||O.cy.animated(),Kn=O.hideEdgesOnViewport&&Dn,Sn=[];if(Sn[O.NODE]=!G[O.NODE]&&et&&!O.clearedForMotionBlur[O.NODE]||O.clearingMotionBlur,Sn[O.NODE]&&(O.clearedForMotionBlur[O.NODE]=!0),Sn[O.DRAG]=!G[O.DRAG]&&et&&!O.clearedForMotionBlur[O.DRAG]||O.clearingMotionBlur,Sn[O.DRAG]&&(O.clearedForMotionBlur[O.DRAG]=!0),G[O.NODE]||x||T||Sn[O.NODE]){var Wn=et&&!Sn[O.NODE]&&at!==1,pe=g||(Wn?O.data.bufferContexts[O.MOTIONBLUR_BUFFER_NODE]:S.contexts[O.NODE]),rr=et&&!Wn?"motionBlur":void 0;ne(pe,rr),Kn?O.drawCachedNodes(pe,fe.nondrag,$,En):O.drawLayeredElements(pe,fe.nondrag,$,En),O.debug&&O.drawDebugPoints(pe,fe.nondrag),!x&&!et&&(G[O.NODE]=!1)}if(!T&&(G[O.DRAG]||x||Sn[O.DRAG])){var Wn=et&&!Sn[O.DRAG]&&at!==1,pe=g||(Wn?O.data.bufferContexts[O.MOTIONBLUR_BUFFER_DRAG]:S.contexts[O.DRAG]);ne(pe,et&&!Wn?"motionBlur":void 0),Kn?O.drawCachedNodes(pe,fe.drag,$,En):O.drawCachedElements(pe,fe.drag,$,En),O.debug&&O.drawDebugPoints(pe,fe.drag),!x&&!et&&(G[O.DRAG]=!1)}if(O.showFps||!T&&G[O.SELECT_BOX]&&!x){var pe=g||S.contexts[O.SELECT_BOX];if(ne(pe),O.selection[4]==1&&(O.hoverData.selecting||O.touchData.selecting)){var Dt=O.cy.zoom(),vr=Mt.core("selection-box-border-width").value/Dt;pe.lineWidth=vr,pe.fillStyle="rgba("+Mt.core("selection-box-color").value[0]+","+Mt.core("selection-box-color").value[1]+","+Mt.core("selection-box-color").value[2]+","+Mt.core("selection-box-opacity").value+")",pe.fillRect(O.selection[0],O.selection[1],O.selection[2]-O.selection[0],O.selection[3]-O.selection[1]),vr>0&&(pe.strokeStyle="rgba("+Mt.core("selection-box-border-color").value[0]+","+Mt.core("selection-box-border-color").value[1]+","+Mt.core("selection-box-border-color").value[2]+","+Mt.core("selection-box-opacity").value+")",pe.strokeRect(O.selection[0],O.selection[1],O.selection[2]-O.selection[0],O.selection[3]-O.selection[1]))}if(S.bgActivePosistion&&!O.hoverData.selecting){var Dt=O.cy.zoom(),ur=S.bgActivePosistion;pe.fillStyle="rgba("+Mt.core("active-bg-color").value[0]+","+Mt.core("active-bg-color").value[1]+","+Mt.core("active-bg-color").value[2]+","+Mt.core("active-bg-opacity").value+")",pe.beginPath(),pe.arc(ur.x,ur.y,Mt.core("active-bg-size").pfValue/Dt,0,2*Math.PI),pe.fill()}var tr=O.lastRedrawTime;if(O.showFps&&tr){tr=Math.round(tr);var wn=Math.round(1e3/tr);pe.setTransform(1,0,0,1,0,0),pe.fillStyle="rgba(255, 0, 0, 0.75)",pe.strokeStyle="rgba(255, 0, 0, 0.75)",pe.lineWidth=1,pe.fillText("1 frame = "+tr+" ms = "+wn+" fps",0,20);var gr=60;pe.strokeRect(0,30,250,20),pe.fillRect(0,30,250*Math.min(wn/gr,1),20)}x||(G[O.SELECT_BOX]=!1)}if(et&&at!==1){var fr=S.contexts[O.NODE],Jr=O.data.bufferCanvases[O.MOTIONBLUR_BUFFER_NODE],wi=S.contexts[O.DRAG],Ks=O.data.bufferCanvases[O.MOTIONBLUR_BUFFER_DRAG],ka=function(hi,gs,qi){hi.setTransform(1,0,0,1,0,0),qi||!kt?hi.clearRect(0,0,O.canvasWidth,O.canvasHeight):ge(hi,0,0,O.canvasWidth,O.canvasHeight);var Si=at;hi.drawImage(gs,0,0,O.canvasWidth*Si,O.canvasHeight*Si,0,0,O.canvasWidth,O.canvasHeight)};(G[O.NODE]||Sn[O.NODE])&&(ka(fr,Jr,Sn[O.NODE]),G[O.NODE]=!1),(G[O.DRAG]||Sn[O.DRAG])&&(ka(wi,Ks,Sn[O.DRAG]),G[O.DRAG]=!1)}O.prevViewport=zt,O.clearingMotionBlur&&(O.clearingMotionBlur=!1,O.motionBlurCleared=!0,O.motionBlur=!0),et&&(O.motionBlurTimeout=setTimeout(function(){O.motionBlurTimeout=null,O.clearedForMotionBlur[O.NODE]=!1,O.clearedForMotionBlur[O.DRAG]=!1,O.motionBlur=!1,O.clearingMotionBlur=!W,O.mbFrames=0,G[O.NODE]=!0,G[O.DRAG]=!0,O.redraw()},dpt)),g||q.emit("render")};var I3={};I3.drawPolygonPath=function(y,g,x,T,A,D){var O=T/2,$=A/2;y.beginPath&&y.beginPath(),y.moveTo(g+O*D[0],x+$*D[1]);for(var q=1;q0&&O>0){at.clearRect(0,0,D,O),at.globalCompositeOperation="source-over";var lt=this.getCachedZSortedEles();if(y.full)at.translate(-T.x1*S,-T.y1*S),at.scale(S,S),this.drawElements(at,lt),at.scale(1/S,1/S),at.translate(T.x1*S,T.y1*S);else{var ft=g.pan(),At={x:ft.x*S,y:ft.y*S};S*=g.zoom(),at.translate(At.x,At.y),at.scale(S,S),this.drawElements(at,lt),at.scale(1/S,1/S),at.translate(-At.x,-At.y)}y.bg&&(at.globalCompositeOperation="destination-over",at.fillStyle=y.bg,at.rect(0,0,D,O),at.fill())}return et};function gpt(y,g){for(var x=atob(y),T=new ArrayBuffer(x.length),A=new Uint8Array(T),D=0;D"u"?"undefined":f(OffscreenCanvas))!=="undefined"?x=new OffscreenCanvas(y,g):(x=document.createElement("canvas"),x.width=y,x.height=g),x},[_0,gv,pv,k9,hx,Gk,vg,I3,E9,Ltt].forEach(function(y){me(wc,y)});var fx=[{name:"null",impl:FB},{name:"base",impl:QL},{name:"canvas",impl:ppt}],wg=[{type:"layout",extensions:JJ},{type:"renderer",extensions:fx}],Tm={},rM={};function b1(y,g,x){var T=x,A=function(ee){Sc("Can not register `"+g+"` for `"+y+"` since `"+ee+"` already exists in the prototype and can not be overridden")};if(y==="core"){if(Fk.prototype[g])return A(g);Fk.prototype[g]=x}else if(y==="collection"){if(jf.prototype[g])return A(g);jf.prototype[g]=x}else if(y==="layout"){for(var D=function(ee){this.options=ee,x.call(this,ee),ht(this._private)||(this._private={}),this._private.cy=ee.cy,this._private.listeners=[],this.createEmitter()},O=D.prototype=Object.create(x.prototype),$=[],q=0;q<$.length;q++){var S=$[q];O[S]=O[S]||function(){return this}}O.start&&!O.run?O.run=function(){return this.start(),this}:!O.start&&O.run&&(O.start=function(){return this.run(),this});var G=x.prototype.stop;O.stop=function(){var zt=this.options;if(zt&&zt.animate){var ee=this.animations;if(ee)for(var Vt=0;Vtz&&(this.rect.x-=(this.labelWidth-z)/2,this.setWidth(this.labelWidth)),this.labelHeight>K&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-K)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-K),this.setHeight(this.labelHeight))}}},B.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==b.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},B.prototype.transform=function(R){var z=this.rect.x;z>_.WORLD_BOUNDARY?z=_.WORLD_BOUNDARY:z<-_.WORLD_BOUNDARY&&(z=-_.WORLD_BOUNDARY);var K=this.rect.y;K>_.WORLD_BOUNDARY?K=_.WORLD_BOUNDARY:K<-_.WORLD_BOUNDARY&&(K=-_.WORLD_BOUNDARY);var it=new N(z,K),st=R.inverseTransformPoint(it);this.setLocation(st.x,st.y)},B.prototype.getLeft=function(){return this.rect.x},B.prototype.getRight=function(){return this.rect.x+this.rect.width},B.prototype.getTop=function(){return this.rect.y},B.prototype.getBottom=function(){return this.rect.y+this.rect.height},B.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=B},function(f,p,v){function m(b,E){b==null&&E==null?(this.x=0,this.y=0):(this.x=b,this.y=E)}m.prototype.getX=function(){return this.x},m.prototype.getY=function(){return this.y},m.prototype.setX=function(b){this.x=b},m.prototype.setY=function(b){this.y=b},m.prototype.getDifference=function(b){return new DimensionD(this.x-b.x,this.y-b.y)},m.prototype.getCopy=function(){return new m(this.x,this.y)},m.prototype.translate=function(b){return this.x+=b.width,this.y+=b.height,this},f.exports=m},function(f,p,v){var m=v(2),b=v(10),E=v(0),_=v(6),L=v(3),N=v(1),B=v(13),j=v(12),R=v(11);function z(it,st,ut){m.call(this,ut),this.estimatedSize=b.MIN_VALUE,this.margin=E.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=it,st!=null&&st instanceof _?this.graphManager=st:st!=null&&st instanceof Layout&&(this.graphManager=st.graphManager)}z.prototype=Object.create(m.prototype);for(var K in m)z[K]=m[K];z.prototype.getNodes=function(){return this.nodes},z.prototype.getEdges=function(){return this.edges},z.prototype.getGraphManager=function(){return this.graphManager},z.prototype.getParent=function(){return this.parent},z.prototype.getLeft=function(){return this.left},z.prototype.getRight=function(){return this.right},z.prototype.getTop=function(){return this.top},z.prototype.getBottom=function(){return this.bottom},z.prototype.isConnected=function(){return this.isConnected},z.prototype.add=function(it,st,ut){if(st==null&&ut==null){var bt=it;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(bt)>-1)throw"Node already in graph!";return bt.owner=this,this.getNodes().push(bt),bt}else{var mt=it;if(!(this.getNodes().indexOf(st)>-1&&this.getNodes().indexOf(ut)>-1))throw"Source or target not in graph!";if(!(st.owner==ut.owner&&st.owner==this))throw"Both owners must be this graph!";return st.owner!=ut.owner?null:(mt.source=st,mt.target=ut,mt.isInterGraph=!1,this.getEdges().push(mt),st.edges.push(mt),ut!=st&&ut.edges.push(mt),mt)}},z.prototype.remove=function(it){var st=it;if(it instanceof L){if(st==null)throw"Node is null!";if(!(st.owner!=null&&st.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var ut=st.edges.slice(),bt,mt=ut.length,yt=0;yt-1&&wt>-1))throw"Source and/or target doesn't know this edge!";bt.source.edges.splice(ht,1),bt.target!=bt.source&&bt.target.edges.splice(wt,1);var dt=bt.source.owner.getEdges().indexOf(bt);if(dt==-1)throw"Not in owner's edge list!";bt.source.owner.getEdges().splice(dt,1)}},z.prototype.updateLeftTop=function(){for(var it=b.MAX_VALUE,st=b.MAX_VALUE,ut,bt,mt,yt=this.getNodes(),dt=yt.length,ht=0;htut&&(it=ut),st>bt&&(st=bt)}return it==b.MAX_VALUE?null:(yt[0].getParent().paddingLeft!=null?mt=yt[0].getParent().paddingLeft:mt=this.margin,this.left=st-mt,this.top=it-mt,new j(this.left,this.top))},z.prototype.updateBounds=function(it){for(var st=b.MAX_VALUE,ut=-b.MAX_VALUE,bt=b.MAX_VALUE,mt=-b.MAX_VALUE,yt,dt,ht,wt,X,pt=this.nodes,U=pt.length,xt=0;xtyt&&(st=yt),utht&&(bt=ht),mtyt&&(st=yt),utht&&(bt=ht),mt=this.nodes.length){var U=0;ut.forEach(function(xt){xt.owner==it&&U++}),U==this.nodes.length&&(this.isConnected=!0)}},f.exports=z},function(f,p,v){var m,b=v(1);function E(_){m=v(5),this.layout=_,this.graphs=[],this.edges=[]}E.prototype.addRoot=function(){var _=this.layout.newGraph(),L=this.layout.newNode(null),N=this.add(_,L);return this.setRootGraph(N),this.rootGraph},E.prototype.add=function(_,L,N,B,j){if(N==null&&B==null&&j==null){if(_==null)throw"Graph is null!";if(L==null)throw"Parent node is null!";if(this.graphs.indexOf(_)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(_),_.parent!=null)throw"Already has a parent!";if(L.child!=null)throw"Already has a child!";return _.parent=L,L.child=_,_}else{j=N,B=L,N=_;var R=B.getOwner(),z=j.getOwner();if(!(R!=null&&R.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(z!=null&&z.getGraphManager()==this))throw"Target not in this graph mgr!";if(R==z)return N.isInterGraph=!1,R.add(N,B,j);if(N.isInterGraph=!0,N.source=B,N.target=j,this.edges.indexOf(N)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(N),!(N.source!=null&&N.target!=null))throw"Edge source and/or target is null!";if(!(N.source.edges.indexOf(N)==-1&&N.target.edges.indexOf(N)==-1))throw"Edge already in source and/or target incidency list!";return N.source.edges.push(N),N.target.edges.push(N),N}},E.prototype.remove=function(_){if(_ instanceof m){var L=_;if(L.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(L==this.rootGraph||L.parent!=null&&L.parent.graphManager==this))throw"Invalid parent node!";var N=[];N=N.concat(L.getEdges());for(var B,j=N.length,R=0;R=_.getRight()?L[0]+=Math.min(_.getX()-E.getX(),E.getRight()-_.getRight()):_.getX()<=E.getX()&&_.getRight()>=E.getRight()&&(L[0]+=Math.min(E.getX()-_.getX(),_.getRight()-E.getRight())),E.getY()<=_.getY()&&E.getBottom()>=_.getBottom()?L[1]+=Math.min(_.getY()-E.getY(),E.getBottom()-_.getBottom()):_.getY()<=E.getY()&&_.getBottom()>=E.getBottom()&&(L[1]+=Math.min(E.getY()-_.getY(),_.getBottom()-E.getBottom()));var j=Math.abs((_.getCenterY()-E.getCenterY())/(_.getCenterX()-E.getCenterX()));_.getCenterY()===E.getCenterY()&&_.getCenterX()===E.getCenterX()&&(j=1);var R=j*L[0],z=L[1]/j;L[0]R)return L[0]=N,L[1]=K,L[2]=j,L[3]=pt,!1;if(Bj)return L[0]=z,L[1]=B,L[2]=wt,L[3]=R,!1;if(Nj?(L[0]=st,L[1]=ut,Ot=!0):(L[0]=it,L[1]=K,Ot=!0):qt===Z&&(N>j?(L[0]=z,L[1]=K,Ot=!0):(L[0]=bt,L[1]=ut,Ot=!0)),-Ct===Z?j>N?(L[2]=X,L[3]=pt,Nt=!0):(L[2]=wt,L[3]=ht,Nt=!0):Ct===Z&&(j>N?(L[2]=dt,L[3]=ht,Nt=!0):(L[2]=U,L[3]=pt,Nt=!0)),Ot&&Nt)return!1;if(N>j?B>R?(Tt=this.getCardinalDirection(qt,Z,4),Ht=this.getCardinalDirection(Ct,Z,2)):(Tt=this.getCardinalDirection(-qt,Z,3),Ht=this.getCardinalDirection(-Ct,Z,1)):B>R?(Tt=this.getCardinalDirection(-qt,Z,1),Ht=this.getCardinalDirection(-Ct,Z,3)):(Tt=this.getCardinalDirection(qt,Z,2),Ht=this.getCardinalDirection(Ct,Z,4)),!Ot)switch(Tt){case 1:Ft=K,It=N+-yt/Z,L[0]=It,L[1]=Ft;break;case 2:It=bt,Ft=B+mt*Z,L[0]=It,L[1]=Ft;break;case 3:Ft=ut,It=N+yt/Z,L[0]=It,L[1]=Ft;break;case 4:It=st,Ft=B+-mt*Z,L[0]=It,L[1]=Ft;break}if(!Nt)switch(Ht){case 1:pn=ht,ke=j+-nt/Z,L[2]=ke,L[3]=pn;break;case 2:ke=U,pn=R+xt*Z,L[2]=ke,L[3]=pn;break;case 3:pn=pt,ke=j+nt/Z,L[2]=ke,L[3]=pn;break;case 4:ke=X,pn=R+-xt*Z,L[2]=ke,L[3]=pn;break}}return!1},b.getCardinalDirection=function(E,_,L){return E>_?L:1+L%4},b.getIntersection=function(E,_,L,N){if(N==null)return this.getIntersection2(E,_,L);var B=E.x,j=E.y,R=_.x,z=_.y,K=L.x,it=L.y,st=N.x,ut=N.y,bt=void 0,mt=void 0,yt=void 0,dt=void 0,ht=void 0,wt=void 0,X=void 0,pt=void 0,U=void 0;return yt=z-j,ht=B-R,X=R*j-B*z,dt=ut-it,wt=K-st,pt=st*it-K*ut,U=yt*wt-dt*ht,U===0?null:(bt=(ht*pt-wt*X)/U,mt=(dt*X-yt*pt)/U,new m(bt,mt))},b.angleOfVector=function(E,_,L,N){var B=void 0;return E!==L?(B=Math.atan((N-_)/(L-E)),L0?1:b<0?-1:0},m.floor=function(b){return b<0?Math.ceil(b):Math.floor(b)},m.ceil=function(b){return b<0?Math.floor(b):Math.ceil(b)},f.exports=m},function(f,p,v){function m(){}m.MAX_VALUE=2147483647,m.MIN_VALUE=-2147483648,f.exports=m},function(f,p,v){var m=function(){function B(j,R){for(var z=0;z"u"?"undefined":m(E);return E==null||_!="object"&&_!="function"},f.exports=b},function(f,p,v){function m(K){if(Array.isArray(K)){for(var it=0,st=Array(K.length);it0&⁢){for(yt.push(ht[0]);yt.length>0&⁢){var wt=yt[0];yt.splice(0,1),mt.add(wt);for(var X=wt.getEdges(),bt=0;bt-1&&ht.splice(nt,1)}mt=new Set,dt=new Map}}return K},z.prototype.createDummyNodesForBendpoints=function(K){for(var it=[],st=K.source,ut=this.graphManager.calcLowestCommonAncestor(K.source,K.target),bt=0;bt0){for(var ut=this.edgeToDummyNodes.get(st),bt=0;bt=0&&it.splice(pt,1);var U=dt.getNeighborsList();U.forEach(function(Ot){if(st.indexOf(Ot)<0){var Nt=ut.get(Ot),qt=Nt-1;qt==1&&wt.push(Ot),ut.set(Ot,qt)}})}st=st.concat(wt),(it.length==1||it.length==2)&&(bt=!0,mt=it[0])}return mt},z.prototype.setGraphManager=function(K){this.graphManager=K},f.exports=z},function(f,p,v){function m(){}m.seed=1,m.x=0,m.nextDouble=function(){return m.x=Math.sin(m.seed++)*1e4,m.x-Math.floor(m.x)},f.exports=m},function(f,p,v){var m=v(4);function b(E,_){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}b.prototype.getWorldOrgX=function(){return this.lworldOrgX},b.prototype.setWorldOrgX=function(E){this.lworldOrgX=E},b.prototype.getWorldOrgY=function(){return this.lworldOrgY},b.prototype.setWorldOrgY=function(E){this.lworldOrgY=E},b.prototype.getWorldExtX=function(){return this.lworldExtX},b.prototype.setWorldExtX=function(E){this.lworldExtX=E},b.prototype.getWorldExtY=function(){return this.lworldExtY},b.prototype.setWorldExtY=function(E){this.lworldExtY=E},b.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},b.prototype.setDeviceOrgX=function(E){this.ldeviceOrgX=E},b.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},b.prototype.setDeviceOrgY=function(E){this.ldeviceOrgY=E},b.prototype.getDeviceExtX=function(){return this.ldeviceExtX},b.prototype.setDeviceExtX=function(E){this.ldeviceExtX=E},b.prototype.getDeviceExtY=function(){return this.ldeviceExtY},b.prototype.setDeviceExtY=function(E){this.ldeviceExtY=E},b.prototype.transformX=function(E){var _=0,L=this.lworldExtX;return L!=0&&(_=this.ldeviceOrgX+(E-this.lworldOrgX)*this.ldeviceExtX/L),_},b.prototype.transformY=function(E){var _=0,L=this.lworldExtY;return L!=0&&(_=this.ldeviceOrgY+(E-this.lworldOrgY)*this.ldeviceExtY/L),_},b.prototype.inverseTransformX=function(E){var _=0,L=this.ldeviceExtX;return L!=0&&(_=this.lworldOrgX+(E-this.ldeviceOrgX)*this.lworldExtX/L),_},b.prototype.inverseTransformY=function(E){var _=0,L=this.ldeviceExtY;return L!=0&&(_=this.lworldOrgY+(E-this.ldeviceOrgY)*this.lworldExtY/L),_},b.prototype.inverseTransformPoint=function(E){var _=new m(this.inverseTransformX(E.x),this.inverseTransformY(E.y));return _},f.exports=b},function(f,p,v){function m(R){if(Array.isArray(R)){for(var z=0,K=Array(R.length);zE.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*E.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(R-E.ADAPTATION_LOWER_NODE_LIMIT)/(E.ADAPTATION_UPPER_NODE_LIMIT-E.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-E.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=E.MAX_NODE_DISPLACEMENT_INCREMENTAL):(R>E.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(E.COOLING_ADAPTATION_FACTOR,1-(R-E.ADAPTATION_LOWER_NODE_LIMIT)/(E.ADAPTATION_UPPER_NODE_LIMIT-E.ADAPTATION_LOWER_NODE_LIMIT)*(1-E.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=E.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},B.prototype.calcSpringForces=function(){for(var R=this.getAllEdges(),z,K=0;K0&&arguments[0]!==void 0?arguments[0]:!0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,K,it,st,ut,bt=this.getAllNodes(),mt;if(this.useFRGridVariant)for(this.totalIterations%E.GRID_CALCULATION_CHECK_PERIOD==1&&R&&this.updateGrid(),mt=new Set,K=0;Kyt||mt>yt)&&(R.gravitationForceX=-this.gravityConstant*st,R.gravitationForceY=-this.gravityConstant*ut)):(yt=z.getEstimatedSize()*this.compoundGravityRangeFactor,(bt>yt||mt>yt)&&(R.gravitationForceX=-this.gravityConstant*st*this.compoundGravityConstant,R.gravitationForceY=-this.gravityConstant*ut*this.compoundGravityConstant))},B.prototype.isConverged=function(){var R,z=!1;return this.totalIterations>this.maxIterations/3&&(z=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),R=this.totalDisplacement=bt.length||yt>=bt[0].length)){for(var dt=0;dtB}}]),L}();f.exports=_},function(f,p,v){var m=function(){function _(L,N){for(var B=0;B2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,R=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;b(this,_),this.sequence1=L,this.sequence2=N,this.match_score=B,this.mismatch_penalty=j,this.gap_penalty=R,this.iMax=L.length+1,this.jMax=N.length+1,this.grid=new Array(this.iMax);for(var z=0;z=0;L--){var N=this.listeners[L];N.event===E&&N.callback===_&&this.listeners.splice(L,1)}},b.emit=function(E,_){for(var L=0;LN.coolingFactor*N.maxNodeDisplacement&&(this.displacementX=N.coolingFactor*N.maxNodeDisplacement*E.sign(this.displacementX)),Math.abs(this.displacementY)>N.coolingFactor*N.maxNodeDisplacement&&(this.displacementY=N.coolingFactor*N.maxNodeDisplacement*E.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),N.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},_.prototype.propogateDisplacementToChildren=function(N,B){for(var j=this.getChild().getNodes(),R,z=0;z0)this.positionNodesRadially(ht);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var wt=new Set(this.getAllNodes()),X=this.nodesWithGravity.filter(function(pt){return wt.has(pt)});this.graphManager.setAllNodesToApplyGravitation(X),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},yt.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%j.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var ht=new Set(this.getAllNodes()),wt=this.nodesWithGravity.filter(function(U){return ht.has(U)});this.graphManager.setAllNodesToApplyGravitation(wt),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=j.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=j.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var X=!this.isTreeGrowing&&!this.isGrowthFinished,pt=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(X,pt),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},yt.prototype.getPositionsData=function(){for(var ht=this.graphManager.getAllNodes(),wt={},X=0;X1){var Ot;for(Ot=0;Otpt&&(pt=Math.floor(nt.y)),xt=Math.floor(nt.x+B.DEFAULT_COMPONENT_SEPERATION)}this.transform(new K(R.WORLD_CENTER_X-nt.x/2,R.WORLD_CENTER_Y-nt.y/2))},yt.radialLayout=function(ht,wt,X){var pt=Math.max(this.maxDiagonalInTree(ht),B.DEFAULT_RADIAL_SEPARATION);yt.branchRadialLayout(wt,null,0,359,0,pt);var U=bt.calculateBounds(ht),xt=new mt;xt.setDeviceOrgX(U.getMinX()),xt.setDeviceOrgY(U.getMinY()),xt.setWorldOrgX(X.x),xt.setWorldOrgY(X.y);for(var nt=0;nt1;){var pn=ke[0];ke.splice(0,1);var Me=Z.indexOf(pn);Me>=0&&Z.splice(Me,1),It--,Tt--}wt!=null?Ft=(Z.indexOf(ke[0])+1)%It:Ft=0;for(var ve=Math.abs(pt-X)/Tt,Ge=Ft;Ht!=Tt;Ge=++Ge%It){var Ke=Z[Ge].getOtherEnd(ht);if(Ke!=wt){var we=(X+Ht*ve)%360,_e=(we+ve)%360;yt.branchRadialLayout(Ke,ht,we,_e,U+xt,xt),Ht++}}},yt.maxDiagonalInTree=function(ht){for(var wt=st.MIN_VALUE,X=0;Xwt&&(wt=U)}return wt},yt.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},yt.prototype.groupZeroDegreeMembers=function(){var ht=this,wt={};this.memberGroups={},this.idToDummyNode={};for(var X=[],pt=this.graphManager.getAllNodes(),U=0;U"u"&&(wt[Ot]=[]),wt[Ot]=wt[Ot].concat(xt)}Object.keys(wt).forEach(function(Nt){if(wt[Nt].length>1){var qt="DummyCompound_"+Nt;ht.memberGroups[qt]=wt[Nt];var Ct=wt[Nt][0].getParent(),Z=new L(ht.graphManager);Z.id=qt,Z.paddingLeft=Ct.paddingLeft||0,Z.paddingRight=Ct.paddingRight||0,Z.paddingBottom=Ct.paddingBottom||0,Z.paddingTop=Ct.paddingTop||0,ht.idToDummyNode[qt]=Z;var Tt=ht.getGraphManager().add(ht.newGraph(),Z),Ht=Ct.getChild();Ht.add(Z);for(var It=0;It=0;ht--){var wt=this.compoundOrder[ht],X=wt.id,pt=wt.paddingLeft,U=wt.paddingTop;this.adjustLocations(this.tiledMemberPack[X],wt.rect.x,wt.rect.y,pt,U)}},yt.prototype.repopulateZeroDegreeMembers=function(){var ht=this,wt=this.tiledZeroDegreePack;Object.keys(wt).forEach(function(X){var pt=ht.idToDummyNode[X],U=pt.paddingLeft,xt=pt.paddingTop;ht.adjustLocations(wt[X],pt.rect.x,pt.rect.y,U,xt)})},yt.prototype.getToBeTiled=function(ht){var wt=ht.id;if(this.toBeTiled[wt]!=null)return this.toBeTiled[wt];var X=ht.getChild();if(X==null)return this.toBeTiled[wt]=!1,!1;for(var pt=X.getNodes(),U=0;U0)return this.toBeTiled[wt]=!1,!1;if(xt.getChild()==null){this.toBeTiled[xt.id]=!1;continue}if(!this.getToBeTiled(xt))return this.toBeTiled[wt]=!1,!1}return this.toBeTiled[wt]=!0,!0},yt.prototype.getNodeDegree=function(ht){ht.id;for(var wt=ht.getEdges(),X=0,pt=0;ptNt&&(Nt=Ct.rect.height)}X+=Nt+ht.verticalPadding}},yt.prototype.tileCompoundMembers=function(ht,wt){var X=this;this.tiledMemberPack=[],Object.keys(ht).forEach(function(pt){var U=wt[pt];X.tiledMemberPack[pt]=X.tileNodes(ht[pt],U.paddingLeft+U.paddingRight),U.rect.width=X.tiledMemberPack[pt].width,U.rect.height=X.tiledMemberPack[pt].height})},yt.prototype.tileNodes=function(ht,wt){var X=B.TILING_PADDING_VERTICAL,pt=B.TILING_PADDING_HORIZONTAL,U={rows:[],rowWidth:[],rowHeight:[],width:0,height:wt,verticalPadding:X,horizontalPadding:pt};ht.sort(function(Ot,Nt){return Ot.rect.width*Ot.rect.height>Nt.rect.width*Nt.rect.height?-1:Ot.rect.width*Ot.rect.height0&&(nt+=ht.horizontalPadding),ht.rowWidth[X]=nt,ht.width0&&(Ot+=ht.verticalPadding);var Nt=0;Ot>ht.rowHeight[X]&&(Nt=ht.rowHeight[X],ht.rowHeight[X]=Ot,Nt=ht.rowHeight[X]-Nt),ht.height+=Nt,ht.rows[X].push(wt)},yt.prototype.getShortestRowIndex=function(ht){for(var wt=-1,X=Number.MAX_VALUE,pt=0;ptX&&(wt=pt,X=ht.rowWidth[pt]);return wt},yt.prototype.canAddHorizontal=function(ht,wt,X){var pt=this.getShortestRowIndex(ht);if(pt<0)return!0;var U=ht.rowWidth[pt];if(U+ht.horizontalPadding+wt<=ht.width)return!0;var xt=0;ht.rowHeight[pt]0&&(xt=X+ht.verticalPadding-ht.rowHeight[pt]);var nt;ht.width-U>=wt+ht.horizontalPadding?nt=(ht.height+xt)/(U+wt+ht.horizontalPadding):nt=(ht.height+xt)/ht.width,xt=X+ht.verticalPadding;var Ot;return ht.widthxt&&wt!=X){pt.splice(-1,1),ht.rows[X].push(U),ht.rowWidth[wt]=ht.rowWidth[wt]-xt,ht.rowWidth[X]=ht.rowWidth[X]+xt,ht.width=ht.rowWidth[instance.getLongestRowIndex(ht)];for(var nt=Number.MIN_VALUE,Ot=0;Otnt&&(nt=pt[Ot].height);wt>0&&(nt+=ht.verticalPadding);var Nt=ht.rowHeight[wt]+ht.rowHeight[X];ht.rowHeight[wt]=nt,ht.rowHeight[X]0)for(var Ht=U;Ht<=xt;Ht++)Tt[0]+=this.grid[Ht][nt-1].length+this.grid[Ht][nt].length-1;if(xt0)for(var Ht=nt;Ht<=Ot;Ht++)Tt[3]+=this.grid[U-1][Ht].length+this.grid[U][Ht].length-1;for(var It=st.MAX_VALUE,Ft,ke,pn=0;pn0){var Ot;Ot=mt.getGraphManager().add(mt.newGraph(),X),this.processChildrenList(Ot,wt,mt)}}},K.prototype.stop=function(){return this.stopped=!0,this};var st=function(bt){bt("layout","cose-bilkent",K)};typeof cytoscape<"u"&&st(cytoscape),p.exports=st}])})})(Xjt);var lWe=Xjt.exports;const hWe=B7(lWe);Yjt.use(hWe);function Jjt(i,a,f,p){Wjt.drawNode(i,a,f,p),a.children&&a.children.forEach((v,m)=>{Jjt(i,v,f<0?m:f,p)})}function fWe(i,a){a.edges().map((f,p)=>{const v=f.data();if(f[0]._private.bodyBounds){const m=f[0]._private.rscratch;Ut.trace("Edge: ",p,v),i.insert("path").attr("d",`M ${m.startX},${m.startY} L ${m.midX},${m.midY} L${m.endX},${m.endY} `).attr("class","edge section-edge-"+v.section+" edge-depth-"+v.depth)}})}function t$t(i,a,f,p){a.add({group:"nodes",data:{id:i.id,labelText:i.descr,height:i.height,width:i.width,level:p,nodeId:i.id,padding:i.padding,type:i.type},position:{x:i.x,y:i.y}}),i.children&&i.children.forEach(v=>{t$t(v,a,f,p+1),a.add({group:"edges",data:{id:`${i.id}_${v.id}`,source:i.id,target:v.id,depth:p,section:v.section}})})}function dWe(i,a){return new Promise(f=>{const p=yr("body").append("div").attr("id","cy").attr("style","display:none"),v=Yjt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});p.remove(),t$t(i,v,a,0),v.nodes().forEach(function(m){m.layoutDimensions=()=>{const b=m.data();return{w:b.width,h:b.height}}}),v.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),v.ready(m=>{Ut.info("Ready",m),f(v)})})}function gWe(i){i.nodes().map((a,f)=>{const p=a.data();p.x=a.position().x,p.y=a.position().y,Wjt.positionNode(p);const v=Ggt(p.nodeId);Ut.info("Id:",f,"Position: (",a.position().x,", ",a.position().y,")",p),v.attr("transform",`translate(${a.position().x-p.width/2}, ${a.position().y-p.height/2})`),v.attr("attr",`apa-${f})`)})}const pWe={draw:async(i,a,f,p)=>{const v=Le();v.htmlLabels=!1,Ut.debug(`Rendering mindmap diagram +`+i,p.parser);const m=Le().securityLevel;let b;m==="sandbox"&&(b=yr("#i"+a));const _=yr(m==="sandbox"?b.nodes()[0].contentDocument.body:"body").select("#"+a);_.append("g");const L=p.db.getMindmap(),N=_.append("g");N.attr("class","mindmap-edges");const B=_.append("g");B.attr("class","mindmap-nodes"),Jjt(B,L,-1,v);const j=await dWe(L,v);fWe(N,j),gWe(j),cT(void 0,_,v.mindmap.padding,v.mindmap.useMaxWidth)}},bWe=i=>{let a="";for(let f=0;f` + .edge { + stroke-width: 3; + } + ${bWe(i)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${i.git0}; + } + .section-root text { + fill: ${i.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`}},Symbol.toStringTag,{value:"Module"}));var Wgt=function(){var i=function(E,_,L,N){for(L=L||{},N=E.length;N--;L[E[N]]=_);return L},a=[1,9],f=[1,10],p=[1,5,10,12],v={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(_,L,N,B,j,R,z){var K=R.length-1;switch(j){case 7:const it=B.findOrCreateNode(R[K-4].trim().replaceAll('""','"')),st=B.findOrCreateNode(R[K-2].trim().replaceAll('""','"')),ut=parseFloat(R[K].trim());B.addLink(it,st,ut);break;case 8:case 9:case 11:this.$=R[K];break;case 10:this.$=R[K-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:a,20:f},{1:[2,6],7:11,10:[1,12]},i(f,[2,4],{9:13,5:[1,14]}),{12:[1,15]},i(p,[2,8]),i(p,[2,9]),{19:[1,16]},i(p,[2,11]),{1:[2,1]},{1:[2,5]},i(f,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:a,20:f},{15:18,16:7,17:8,18:a,20:f},{18:[1,19]},i(f,[2,3]),{12:[1,20]},i(p,[2,10]),{15:21,16:7,17:8,18:a,20:f},i([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(_,L){if(L.recoverable)this.trace(_);else{var N=new Error(_);throw N.hash=L,N}},parse:function(_){var L=this,N=[0],B=[],j=[null],R=[],z=this.table,K="",it=0,st=0,ut=2,bt=1,mt=R.slice.call(arguments,1),yt=Object.create(this.lexer),dt={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(dt.yy[ht]=this.yy[ht]);yt.setInput(_,dt.yy),dt.yy.lexer=yt,dt.yy.parser=this,typeof yt.yylloc>"u"&&(yt.yylloc={});var wt=yt.yylloc;R.push(wt);var X=yt.options&&yt.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(){var It;return It=B.pop()||yt.lex()||bt,typeof It!="number"&&(It instanceof Array&&(B=It,It=B.pop()),It=L.symbols_[It]||It),It}for(var U,xt,nt,Ot,Nt={},qt,Ct,Z,Tt;;){if(xt=N[N.length-1],this.defaultActions[xt]?nt=this.defaultActions[xt]:((U===null||typeof U>"u")&&(U=pt()),nt=z[xt]&&z[xt][U]),typeof nt>"u"||!nt.length||!nt[0]){var Ht="";Tt=[];for(qt in z[xt])this.terminals_[qt]&&qt>ut&&Tt.push("'"+this.terminals_[qt]+"'");yt.showPosition?Ht="Parse error on line "+(it+1)+`: +`+yt.showPosition()+` +Expecting `+Tt.join(", ")+", got '"+(this.terminals_[U]||U)+"'":Ht="Parse error on line "+(it+1)+": Unexpected "+(U==bt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(Ht,{text:yt.match,token:this.terminals_[U]||U,line:yt.yylineno,loc:wt,expected:Tt})}if(nt[0]instanceof Array&&nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+U);switch(nt[0]){case 1:N.push(U),j.push(yt.yytext),R.push(yt.yylloc),N.push(nt[1]),U=null,st=yt.yyleng,K=yt.yytext,it=yt.yylineno,wt=yt.yylloc;break;case 2:if(Ct=this.productions_[nt[1]][1],Nt.$=j[j.length-Ct],Nt._$={first_line:R[R.length-(Ct||1)].first_line,last_line:R[R.length-1].last_line,first_column:R[R.length-(Ct||1)].first_column,last_column:R[R.length-1].last_column},X&&(Nt._$.range=[R[R.length-(Ct||1)].range[0],R[R.length-1].range[1]]),Ot=this.performAction.apply(Nt,[K,st,it,dt.yy,nt[1],j,R].concat(mt)),typeof Ot<"u")return Ot;Ct&&(N=N.slice(0,-1*Ct*2),j=j.slice(0,-1*Ct),R=R.slice(0,-1*Ct)),N.push(this.productions_[nt[1]][0]),j.push(Nt.$),R.push(Nt._$),Z=z[N[N.length-2]][N[N.length-1]],N.push(Z);break;case 3:return!0}}return!0}},m=function(){var E={EOF:1,parseError:function(L,N){if(this.yy.parser)this.yy.parser.parseError(L,N);else throw new Error(L)},setInput:function(_,L){return this.yy=L||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var L=_.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var L=_.length,N=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var B=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var j=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===B.length?this.yylloc.first_column:0)+B[B.length-N.length].length-N[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[j[0],j[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),L=new Array(_.length+1).join("-");return _+this.upcomingInput()+` +`+L+"^"},test_match:function(_,L){var N,B,j;if(this.options.backtrack_lexer&&(j={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(j.yylloc.range=this.yylloc.range.slice(0))),B=_[0].match(/(?:\r\n?|\n).*/g),B&&(this.yylineno+=B.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:B?B[B.length-1].length-B[B.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_[0].length),this.matched+=_[0],N=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var R in j)this[R]=j[R];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,L,N,B;this._more||(this.yytext="",this.match="");for(var j=this._currentRules(),R=0;RL[0].length)){if(L=N,B=R,this.options.backtrack_lexer){if(_=this.test_match(N,j[R]),_!==!1)return _;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(_=this.test_match(L,j[B]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{easy_keword_rules:!0},performAction:function(L,N,B,j){switch(B){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/,/^(?:$)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:(\u002C))/,/^(?:(\u0022))/,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/,/^(?:(\u0022)(?!(\u0022)))/,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return E}();v.lexer=m;function b(){this.yy={}}return b.prototype=v,v.Parser=b,new b}();Wgt.parser=Wgt;const UK=Wgt;let WK=[],KK=[],vL={};const wWe=()=>{WK=[],KK=[],vL={},ap()};class mWe{constructor(a,f,p=0){this.source=a,this.target=f,this.value=p}}const yWe=(i,a,f)=>{WK.push(new mWe(i,a,f))};class xWe{constructor(a){this.ID=a}}const kWe={nodesMap:vL,getConfig:()=>Le().sankey,getNodes:()=>KK,getLinks:()=>WK,getGraph:()=>({nodes:KK.map(i=>({id:i.ID})),links:WK.map(i=>({source:i.source.ID,target:i.target.ID,value:i.value}))}),addLink:yWe,findOrCreateNode:i=>(i=Yr.sanitizeText(i,Le()),vL[i]||(vL[i]=new xWe(i),KK.push(vL[i])),vL[i]),getAccTitle:op,setAccTitle:cg,getAccDescription:up,setAccDescription:cp,getDiagramTitle:Db,setDiagramTitle:Z2,clear:wWe};function e$t(i,a){let f;if(a===void 0)for(const p of i)p!=null&&(f=p)&&(f=p);else{let p=-1;for(let v of i)(v=a(v,++p,i))!=null&&(f=v)&&(f=v)}return f}function n$t(i,a){let f;if(a===void 0)for(const p of i)p!=null&&(f>p||f===void 0&&p>=p)&&(f=p);else{let p=-1;for(let v of i)(v=a(v,++p,i))!=null&&(f>v||f===void 0&&v>=v)&&(f=v)}return f}function Kgt(i,a){let f=0;if(a===void 0)for(let p of i)(p=+p)&&(f+=p);else{let p=-1;for(let v of i)(v=+a(v,++p,i))&&(f+=v)}return f}function EWe(i){return i.target.depth}function TWe(i){return i.depth}function CWe(i,a){return a-1-i.height}function r$t(i,a){return i.sourceLinks.length?i.depth:a-1}function _We(i){return i.targetLinks.length?i.depth:i.sourceLinks.length?n$t(i.sourceLinks,EWe)-1:0}function YK(i){return function(){return i}}function i$t(i,a){return XK(i.source,a.source)||i.index-a.index}function s$t(i,a){return XK(i.target,a.target)||i.index-a.index}function XK(i,a){return i.y0-a.y0}function Ygt(i){return i.value}function SWe(i){return i.index}function AWe(i){return i.nodes}function LWe(i){return i.links}function a$t(i,a){const f=i.get(a);if(!f)throw new Error("missing: "+a);return f}function o$t({nodes:i}){for(const a of i){let f=a.y0,p=f;for(const v of a.sourceLinks)v.y0=f+v.width/2,f+=v.width;for(const v of a.targetLinks)v.y1=p+v.width/2,p+=v.width}}function MWe(){let i=0,a=0,f=1,p=1,v=24,m=8,b,E=SWe,_=r$t,L,N,B=AWe,j=LWe,R=6;function z(){const Nt={nodes:B.apply(null,arguments),links:j.apply(null,arguments)};return K(Nt),it(Nt),st(Nt),ut(Nt),yt(Nt),o$t(Nt),Nt}z.update=function(Nt){return o$t(Nt),Nt},z.nodeId=function(Nt){return arguments.length?(E=typeof Nt=="function"?Nt:YK(Nt),z):E},z.nodeAlign=function(Nt){return arguments.length?(_=typeof Nt=="function"?Nt:YK(Nt),z):_},z.nodeSort=function(Nt){return arguments.length?(L=Nt,z):L},z.nodeWidth=function(Nt){return arguments.length?(v=+Nt,z):v},z.nodePadding=function(Nt){return arguments.length?(m=b=+Nt,z):m},z.nodes=function(Nt){return arguments.length?(B=typeof Nt=="function"?Nt:YK(Nt),z):B},z.links=function(Nt){return arguments.length?(j=typeof Nt=="function"?Nt:YK(Nt),z):j},z.linkSort=function(Nt){return arguments.length?(N=Nt,z):N},z.size=function(Nt){return arguments.length?(i=a=0,f=+Nt[0],p=+Nt[1],z):[f-i,p-a]},z.extent=function(Nt){return arguments.length?(i=+Nt[0][0],f=+Nt[1][0],a=+Nt[0][1],p=+Nt[1][1],z):[[i,a],[f,p]]},z.iterations=function(Nt){return arguments.length?(R=+Nt,z):R};function K({nodes:Nt,links:qt}){for(const[Z,Tt]of Nt.entries())Tt.index=Z,Tt.sourceLinks=[],Tt.targetLinks=[];const Ct=new Map(Nt.map((Z,Tt)=>[E(Z,Tt,Nt),Z]));for(const[Z,Tt]of qt.entries()){Tt.index=Z;let{source:Ht,target:It}=Tt;typeof Ht!="object"&&(Ht=Tt.source=a$t(Ct,Ht)),typeof It!="object"&&(It=Tt.target=a$t(Ct,It)),Ht.sourceLinks.push(Tt),It.targetLinks.push(Tt)}if(N!=null)for(const{sourceLinks:Z,targetLinks:Tt}of Nt)Z.sort(N),Tt.sort(N)}function it({nodes:Nt}){for(const qt of Nt)qt.value=qt.fixedValue===void 0?Math.max(Kgt(qt.sourceLinks,Ygt),Kgt(qt.targetLinks,Ygt)):qt.fixedValue}function st({nodes:Nt}){const qt=Nt.length;let Ct=new Set(Nt),Z=new Set,Tt=0;for(;Ct.size;){for(const Ht of Ct){Ht.depth=Tt;for(const{target:It}of Ht.sourceLinks)Z.add(It)}if(++Tt>qt)throw new Error("circular link");Ct=Z,Z=new Set}}function ut({nodes:Nt}){const qt=Nt.length;let Ct=new Set(Nt),Z=new Set,Tt=0;for(;Ct.size;){for(const Ht of Ct){Ht.height=Tt;for(const{source:It}of Ht.targetLinks)Z.add(It)}if(++Tt>qt)throw new Error("circular link");Ct=Z,Z=new Set}}function bt({nodes:Nt}){const qt=e$t(Nt,Tt=>Tt.depth)+1,Ct=(f-i-v)/(qt-1),Z=new Array(qt);for(const Tt of Nt){const Ht=Math.max(0,Math.min(qt-1,Math.floor(_.call(null,Tt,qt))));Tt.layer=Ht,Tt.x0=i+Ht*Ct,Tt.x1=Tt.x0+v,Z[Ht]?Z[Ht].push(Tt):Z[Ht]=[Tt]}if(L)for(const Tt of Z)Tt.sort(L);return Z}function mt(Nt){const qt=n$t(Nt,Ct=>(p-a-(Ct.length-1)*b)/Kgt(Ct,Ygt));for(const Ct of Nt){let Z=a;for(const Tt of Ct){Tt.y0=Z,Tt.y1=Z+Tt.value*qt,Z=Tt.y1+b;for(const Ht of Tt.sourceLinks)Ht.width=Ht.value*qt}Z=(p-Z+b)/(Ct.length+1);for(let Tt=0;TtCt.length)-1)),mt(qt);for(let Ct=0;Ct0))continue;let pn=(Ft/ke-It.y0)*qt;It.y0+=pn,It.y1+=pn,U(It)}L===void 0&&Ht.sort(XK),wt(Ht,Ct)}}function ht(Nt,qt,Ct){for(let Z=Nt.length,Tt=Z-2;Tt>=0;--Tt){const Ht=Nt[Tt];for(const It of Ht){let Ft=0,ke=0;for(const{target:Me,value:ve}of It.sourceLinks){let Ge=ve*(Me.layer-It.layer);Ft+=Ot(It,Me)*Ge,ke+=Ge}if(!(ke>0))continue;let pn=(Ft/ke-It.y0)*qt;It.y0+=pn,It.y1+=pn,U(It)}L===void 0&&Ht.sort(XK),wt(Ht,Ct)}}function wt(Nt,qt){const Ct=Nt.length>>1,Z=Nt[Ct];pt(Nt,Z.y0-b,Ct-1,qt),X(Nt,Z.y1+b,Ct+1,qt),pt(Nt,p,Nt.length-1,qt),X(Nt,a,0,qt)}function X(Nt,qt,Ct,Z){for(;Ct1e-6&&(Tt.y0+=Ht,Tt.y1+=Ht),qt=Tt.y1+b}}function pt(Nt,qt,Ct,Z){for(;Ct>=0;--Ct){const Tt=Nt[Ct],Ht=(Tt.y1-qt)*Z;Ht>1e-6&&(Tt.y0-=Ht,Tt.y1-=Ht),qt=Tt.y0-b}}function U({sourceLinks:Nt,targetLinks:qt}){if(N===void 0){for(const{source:{sourceLinks:Ct}}of qt)Ct.sort(s$t);for(const{target:{targetLinks:Ct}}of Nt)Ct.sort(i$t)}}function xt(Nt){if(N===void 0)for(const{sourceLinks:qt,targetLinks:Ct}of Nt)qt.sort(s$t),Ct.sort(i$t)}function nt(Nt,qt){let Ct=Nt.y0-(Nt.sourceLinks.length-1)*b/2;for(const{target:Z,width:Tt}of Nt.sourceLinks){if(Z===qt)break;Ct+=Tt+b}for(const{source:Z,width:Tt}of qt.targetLinks){if(Z===Nt)break;Ct-=Tt}return Ct}function Ot(Nt,qt){let Ct=qt.y0-(qt.targetLinks.length-1)*b/2;for(const{source:Z,width:Tt}of qt.targetLinks){if(Z===Nt)break;Ct+=Tt+b}for(const{target:Z,width:Tt}of Nt.sourceLinks){if(Z===qt)break;Ct-=Tt}return Ct}return z}var Xgt=Math.PI,Qgt=2*Xgt,MT=1e-6,IWe=Qgt-MT;function Zgt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function c$t(){return new Zgt}Zgt.prototype=c$t.prototype={constructor:Zgt,moveTo:function(i,a){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+a)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(i,a){this._+="L"+(this._x1=+i)+","+(this._y1=+a)},quadraticCurveTo:function(i,a,f,p){this._+="Q"+ +i+","+ +a+","+(this._x1=+f)+","+(this._y1=+p)},bezierCurveTo:function(i,a,f,p,v,m){this._+="C"+ +i+","+ +a+","+ +f+","+ +p+","+(this._x1=+v)+","+(this._y1=+m)},arcTo:function(i,a,f,p,v){i=+i,a=+a,f=+f,p=+p,v=+v;var m=this._x1,b=this._y1,E=f-i,_=p-a,L=m-i,N=b-a,B=L*L+N*N;if(v<0)throw new Error("negative radius: "+v);if(this._x1===null)this._+="M"+(this._x1=i)+","+(this._y1=a);else if(B>MT)if(!(Math.abs(N*E-_*L)>MT)||!v)this._+="L"+(this._x1=i)+","+(this._y1=a);else{var j=f-m,R=p-b,z=E*E+_*_,K=j*j+R*R,it=Math.sqrt(z),st=Math.sqrt(B),ut=v*Math.tan((Xgt-Math.acos((z+B-K)/(2*it*st)))/2),bt=ut/st,mt=ut/it;Math.abs(bt-1)>MT&&(this._+="L"+(i+bt*L)+","+(a+bt*N)),this._+="A"+v+","+v+",0,0,"+ +(N*j>L*R)+","+(this._x1=i+mt*E)+","+(this._y1=a+mt*_)}},arc:function(i,a,f,p,v,m){i=+i,a=+a,f=+f,m=!!m;var b=f*Math.cos(p),E=f*Math.sin(p),_=i+b,L=a+E,N=1^m,B=m?p-v:v-p;if(f<0)throw new Error("negative radius: "+f);this._x1===null?this._+="M"+_+","+L:(Math.abs(this._x1-_)>MT||Math.abs(this._y1-L)>MT)&&(this._+="L"+_+","+L),f&&(B<0&&(B=B%Qgt+Qgt),B>IWe?this._+="A"+f+","+f+",0,1,"+N+","+(i-b)+","+(a-E)+"A"+f+","+f+",0,1,"+N+","+(this._x1=_)+","+(this._y1=L):B>MT&&(this._+="A"+f+","+f+",0,"+ +(B>=Xgt)+","+N+","+(this._x1=i+f*Math.cos(v))+","+(this._y1=a+f*Math.sin(v))))},rect:function(i,a,f,p){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+a)+"h"+ +f+"v"+ +p+"h"+-f+"Z"},toString:function(){return this._}};function u$t(i){return function(){return i}}function DWe(i){return i[0]}function OWe(i){return i[1]}var NWe=Array.prototype.slice;function PWe(i){return i.source}function FWe(i){return i.target}function BWe(i){var a=PWe,f=FWe,p=DWe,v=OWe,m=null;function b(){var E,_=NWe.call(arguments),L=a.apply(this,_),N=f.apply(this,_);if(m||(m=E=c$t()),i(m,+p.apply(this,(_[0]=L,_)),+v.apply(this,_),+p.apply(this,(_[0]=N,_)),+v.apply(this,_)),E)return m=null,E+""||null}return b.source=function(E){return arguments.length?(a=E,b):a},b.target=function(E){return arguments.length?(f=E,b):f},b.x=function(E){return arguments.length?(p=typeof E=="function"?E:u$t(+E),b):p},b.y=function(E){return arguments.length?(v=typeof E=="function"?E:u$t(+E),b):v},b.context=function(E){return arguments.length?(m=E??null,b):m},b}function RWe(i,a,f,p,v){i.moveTo(a,f),i.bezierCurveTo(a=(a+p)/2,f,a,v,p,v)}function jWe(){return BWe(RWe)}function $We(i){return[i.source.x1,i.y0]}function zWe(i){return[i.target.x0,i.y1]}function qWe(){return jWe().source($We).target(zWe)}const Jgt=class{static next(i){return new Jgt(i+ ++Jgt.count)}constructor(i){this.id=i,this.href=`#${i}`}toString(){return"url("+this.href+")"}};let tpt=Jgt;tpt.count=0;const HWe={left:TWe,right:CWe,center:_We,justify:r$t},GWe={draw:function(i,a,f,p){const{securityLevel:v,sankey:m}=Le(),b=oT.sankey;let E;v==="sandbox"&&(E=yr("#i"+a));const _=yr(v==="sandbox"?E.nodes()[0].contentDocument.body:"body"),L=v==="sandbox"?_.select(`[id="${a}"]`):yr(`[id="${a}"]`),N=(m==null?void 0:m.width)??b.width,B=(m==null?void 0:m.height)??b.width,j=(m==null?void 0:m.useMaxWidth)??b.useMaxWidth,R=(m==null?void 0:m.nodeAlignment)??b.nodeAlignment,z=(m==null?void 0:m.prefix)??b.prefix,K=(m==null?void 0:m.suffix)??b.suffix,it=(m==null?void 0:m.showValues)??b.showValues;og(L,B,N,j);const st=p.db.getGraph(),ut=HWe[R],bt=10;MWe().nodeId(pt=>pt.id).nodeWidth(bt).nodePadding(10+(it?15:0)).nodeAlign(ut).extent([[0,0],[N,B]])(st);const yt=x1t(S7e);L.append("g").attr("class","nodes").selectAll(".node").data(st.nodes).join("g").attr("class","node").attr("id",pt=>(pt.uid=tpt.next("node-")).id).attr("transform",function(pt){return"translate("+pt.x0+","+pt.y0+")"}).attr("x",pt=>pt.x0).attr("y",pt=>pt.y0).append("rect").attr("height",pt=>pt.y1-pt.y0).attr("width",pt=>pt.x1-pt.x0).attr("fill",pt=>yt(pt.id));const dt=({id:pt,value:U})=>it?`${pt} +${z}${Math.round(U*100)/100}${K}`:pt;L.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(st.nodes).join("text").attr("x",pt=>pt.x0(pt.y1+pt.y0)/2).attr("dy",`${it?"0":"0.35"}em`).attr("text-anchor",pt=>pt.x0(U.uid=tpt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",U=>U.source.x1).attr("x2",U=>U.target.x0);pt.append("stop").attr("offset","0%").attr("stop-color",U=>yt(U.source.id)),pt.append("stop").attr("offset","100%").attr("stop-color",U=>yt(U.target.id))}let X;switch(wt){case"gradient":X=pt=>pt.uid;break;case"source":X=pt=>yt(pt.source.id);break;case"target":X=pt=>yt(pt.target.id);break;default:X=wt}ht.append("path").attr("d",qWe()).attr("stroke",X).attr("stroke-width",pt=>Math.max(1,pt.width))}},VWe=i=>i.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),UWe=UK.parse.bind(UK);UK.parse=i=>UWe(VWe(i));const WWe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:UK,db:kWe,renderer:GWe}},Symbol.toStringTag,{value:"Module"}));return Ob}); diff --git a/webroot/js/node_modules/mermaid/dist/mermaid.spec.d.ts b/webroot/js/node_modules/mermaid/dist/mermaid.spec.d.ts new file mode 100644 index 0000000..dfbd63d --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaid.spec.d.ts @@ -0,0 +1 @@ +import './diagram-api/diagram-orchestration.js'; diff --git a/webroot/js/node_modules/mermaid/dist/mermaidAPI.d.ts b/webroot/js/node_modules/mermaid/dist/mermaidAPI.d.ts new file mode 100644 index 0000000..b251aac --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaidAPI.d.ts @@ -0,0 +1,181 @@ +import { Diagram } from './Diagram.js'; +import type { MermaidConfig } from './config.type.js'; +import type { DiagramStyleClassDef } from './diagram-api/types.js'; +export interface ParseOptions { + suppressErrors?: boolean; +} +export type D3Element = any; +export interface RenderResult { + /** + * The svg code for the rendered graph. + */ + svg: string; + /** + * Bind function to be called after the svg has been inserted into the DOM. + * This is necessary for adding event listeners to the elements in the svg. + * ```js + * const { svg, bindFunctions } = mermaidAPI.render('id1', 'graph TD;A-->B'); + * div.innerHTML = svg; + * bindFunctions?.(div); // To call bindFunctions only if it's present. + * ``` + */ + bindFunctions?: (element: Element) => void; +} +/** + * Parse the text and validate the syntax. + * @param text - The mermaid diagram definition. + * @param parseOptions - Options for parsing. + * @returns true if the diagram is valid, false otherwise if parseOptions.suppressErrors is true. + * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false. + */ +declare function parse(text: string, parseOptions?: ParseOptions): Promise; +/** + * @param text - text to be encoded + * @returns + */ +export declare const encodeEntities: (text: string) => string; +/** + * + * @param text - text to be decoded + * @returns + */ +export declare const decodeEntities: (text: string) => string; +/** + * Create a CSS style that starts with the given class name, then the element, + * with an enclosing block that has each of the cssClasses followed by !important; + * @param cssClass - CSS class name + * @param element - CSS element + * @param cssClasses - list of CSS styles to append after the element + * @returns - the constructed string + */ +export declare const cssImportantStyles: (cssClass: string, element: string, cssClasses?: string[]) => string; +/** + * Create the user styles + * @internal + * @param config - configuration that has style and theme settings to use + * @param classDefs - the classDefs in the diagram text. Might be null if none were defined. Usually is the result of a call to getClasses(...) + * @returns the string with all the user styles + */ +export declare const createCssStyles: (config: MermaidConfig, classDefs?: Record | null | undefined) => string; +export declare const createUserStyles: (config: MermaidConfig, graphType: string, classDefs: Record | undefined, svgId: string) => string; +/** + * Clean up svgCode. Do replacements needed + * + * @param svgCode - the code to clean up + * @param inSandboxMode - security level + * @param useArrowMarkerUrls - should arrow marker's use full urls? (vs. just the anchors) + * @returns the cleaned up svgCode + */ +export declare const cleanUpSvgCode: (svgCode: string | undefined, inSandboxMode: boolean, useArrowMarkerUrls: boolean) => string; +/** + * Put the svgCode into an iFrame. Return the iFrame code + * + * @param svgCode - the svg code to put inside the iFrame + * @param svgElement - the d3 node that has the current svgElement so we can get the height from it + * @returns - the code with the iFrame that now contains the svgCode + * TODO replace btoa(). Replace with buf.toString('base64')? + */ +export declare const putIntoIFrame: (svgCode?: string, svgElement?: D3Element) => string; +/** + * Append an enclosing div, then svg, then g (group) to the d3 parentRoot. Set attributes. + * Only set the style attribute on the enclosing div if divStyle is given. + * Only set the xmlns:xlink attribute on svg if svgXlink is given. + * Return the last node appended + * + * @param parentRoot - the d3 node to append things to + * @param id - the value to set the id attr to + * @param enclosingDivId - the id to set the enclosing div to + * @param divStyle - if given, the style to set the enclosing div to + * @param svgXlink - if given, the link to set the new svg element to + * @returns - returns the parentRoot that had nodes appended + */ +export declare const appendDivSvgG: (parentRoot: D3Element, id: string, enclosingDivId: string, divStyle?: string, svgXlink?: string) => D3Element; +/** + * Remove any existing elements from the given document + * + * @param doc - the document to removed elements from + * @param id - id for any existing SVG element + * @param divSelector - selector for any existing enclosing div element + * @param iFrameSelector - selector for any existing iFrame element + */ +export declare const removeExistingElements: (doc: Document, id: string, divId: string, iFrameId: string) => void; +/** + * @param options - Initial Mermaid options + */ +declare function initialize(options?: MermaidConfig): void; +/** + * ## mermaidAPI configuration defaults + * + * ```ts + * const config = { + * theme: 'default', + * logLevel: 'fatal', + * securityLevel: 'strict', + * startOnLoad: true, + * arrowMarkerAbsolute: false, + * + * er: { + * diagramPadding: 20, + * layoutDirection: 'TB', + * minEntityWidth: 100, + * minEntityHeight: 75, + * entityPadding: 15, + * stroke: 'gray', + * fill: 'honeydew', + * fontSize: 12, + * useMaxWidth: true, + * }, + * flowchart: { + * diagramPadding: 8, + * htmlLabels: true, + * curve: 'basis', + * }, + * sequence: { + * diagramMarginX: 50, + * diagramMarginY: 10, + * actorMargin: 50, + * width: 150, + * height: 65, + * boxMargin: 10, + * boxTextMargin: 5, + * noteMargin: 10, + * messageMargin: 35, + * messageAlign: 'center', + * mirrorActors: true, + * bottomMarginAdj: 1, + * useMaxWidth: true, + * rightAngles: false, + * showSequenceNumbers: false, + * }, + * gantt: { + * titleTopMargin: 25, + * barHeight: 20, + * barGap: 4, + * topPadding: 50, + * leftPadding: 75, + * gridLineStartPadding: 35, + * fontSize: 11, + * fontFamily: '"Open Sans", sans-serif', + * numberSectionStyles: 4, + * axisFormat: '%Y-%m-%d', + * topAxis: false, + * displayMode: '', + * }, + * }; + * mermaid.initialize(config); + * ``` + */ +export declare const mermaidAPI: Readonly<{ + render: (id: string, text: string, svgContainingElement?: Element) => Promise; + parse: typeof parse; + getDiagramFromText: (text: string, metadata?: Pick) => Promise; + initialize: typeof initialize; + getConfig: () => MermaidConfig; + setConfig: (conf: MermaidConfig) => MermaidConfig; + getSiteConfig: () => MermaidConfig; + updateSiteConfig: (conf: MermaidConfig) => MermaidConfig; + reset: () => void; + globalReset: () => void; + defaultConfig: MermaidConfig; +}>; +export default mermaidAPI; diff --git a/webroot/js/node_modules/mermaid/dist/mermaidAPI.spec.d.ts b/webroot/js/node_modules/mermaid/dist/mermaidAPI.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mermaidAPI.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/mindmap-definition-5c6cc2b2.js b/webroot/js/node_modules/mermaid/dist/mindmap-definition-5c6cc2b2.js new file mode 100644 index 0000000..cc258f8 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mindmap-definition-5c6cc2b2.js @@ -0,0 +1,18593 @@ +import { d as mp, c as nn, l as qr, Q as Ca, T as Vu, j as ei, r as bp, aT as Ep, aU as wp, aV as xp } from "./mermaid-e4a58915.js"; +import { c as Tp } from "./createText-4be7776a.js"; +var Ki = function() { + var pe = function(j, Y, te, L) { + for (te = te || {}, L = j.length; L--; te[j[L]] = Y) + ; + return te; + }, fe = [1, 4], ee = [1, 13], ce = [1, 12], H = [1, 15], O = [1, 16], T = [1, 20], x = [1, 19], S = [6, 7, 8], G = [1, 26], U = [1, 24], P = [1, 25], K = [6, 7, 11], D = [1, 6, 13, 15, 16, 19, 22], V = [1, 33], _ = [1, 34], Q = [1, 6, 7, 11, 13, 15, 16, 19, 22], ne = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, + productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], + performAction: function(Y, te, L, $, k, q, he) { + var ge = q.length - 1; + switch (k) { + case 6: + case 7: + return $; + case 8: + $.getLogger().trace("Stop NL "); + break; + case 9: + $.getLogger().trace("Stop EOF "); + break; + case 11: + $.getLogger().trace("Stop NL2 "); + break; + case 12: + $.getLogger().trace("Stop EOF2 "); + break; + case 15: + $.getLogger().info("Node: ", q[ge].id), $.addNode(q[ge - 1].length, q[ge].id, q[ge].descr, q[ge].type); + break; + case 16: + $.getLogger().trace("Icon: ", q[ge]), $.decorateNode({ icon: q[ge] }); + break; + case 17: + case 21: + $.decorateNode({ class: q[ge] }); + break; + case 18: + $.getLogger().trace("SPACELIST"); + break; + case 19: + $.getLogger().trace("Node: ", q[ge].id), $.addNode(0, q[ge].id, q[ge].descr, q[ge].type); + break; + case 20: + $.decorateNode({ icon: q[ge] }); + break; + case 25: + $.getLogger().trace("node found ..", q[ge - 2]), this.$ = { id: q[ge - 1], descr: q[ge - 1], type: $.getType(q[ge - 2], q[ge]) }; + break; + case 26: + this.$ = { id: q[ge], descr: q[ge], type: $.nodeType.DEFAULT }; + break; + case 27: + $.getLogger().trace("node found ..", q[ge - 3]), this.$ = { id: q[ge - 3], descr: q[ge - 1], type: $.getType(q[ge - 2], q[ge]) }; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: fe }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: fe }, { 6: ee, 7: [1, 10], 9: 9, 12: 11, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, pe(S, [2, 3]), { 1: [2, 2] }, pe(S, [2, 4]), pe(S, [2, 5]), { 1: [2, 6], 6: ee, 12: 21, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, { 6: ee, 9: 22, 12: 11, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, { 6: G, 7: U, 10: 23, 11: P }, pe(K, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: T, 22: x }), pe(K, [2, 18]), pe(K, [2, 19]), pe(K, [2, 20]), pe(K, [2, 21]), pe(K, [2, 23]), pe(K, [2, 24]), pe(K, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: G, 7: U, 10: 32, 11: P }, { 1: [2, 7], 6: ee, 12: 21, 13: ce, 14: 14, 15: H, 16: O, 17: 17, 18: 18, 19: T, 22: x }, pe(D, [2, 14], { 7: V, 11: _ }), pe(Q, [2, 8]), pe(Q, [2, 9]), pe(Q, [2, 10]), pe(K, [2, 15]), pe(K, [2, 16]), pe(K, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, pe(D, [2, 13], { 7: V, 11: _ }), pe(Q, [2, 11]), pe(Q, [2, 12]), { 21: [1, 37] }, pe(K, [2, 25]), pe(K, [2, 27])], + defaultActions: { 2: [2, 1], 6: [2, 2] }, + parseError: function(Y, te) { + if (te.recoverable) + this.trace(Y); + else { + var L = new Error(Y); + throw L.hash = te, L; + } + }, + parse: function(Y) { + var te = this, L = [0], $ = [], k = [null], q = [], he = this.table, ge = "", Ae = 0, Ne = 0, _e = 2, tt = 1, ct = q.slice.call(arguments, 1), Pe = Object.create(this.lexer), $e = { yy: {} }; + for (var Xe in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, Xe) && ($e.yy[Xe] = this.yy[Xe]); + Pe.setInput(Y, $e.yy), $e.yy.lexer = Pe, $e.yy.parser = this, typeof Pe.yylloc > "u" && (Pe.yylloc = {}); + var rt = Pe.yylloc; + q.push(rt); + var lt = Pe.options && Pe.options.ranges; + typeof $e.yy.parseError == "function" ? this.parseError = $e.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function nt() { + var jt; + return jt = $.pop() || Pe.lex() || tt, typeof jt != "number" && (jt instanceof Array && ($ = jt, jt = $.pop()), jt = te.symbols_[jt] || jt), jt; + } + for (var je, pt, Et, kt, vt = {}, vr, qt, on, Kr; ; ) { + if (pt = L[L.length - 1], this.defaultActions[pt] ? Et = this.defaultActions[pt] : ((je === null || typeof je > "u") && (je = nt()), Et = he[pt] && he[pt][je]), typeof Et > "u" || !Et.length || !Et[0]) { + var Da = ""; + Kr = []; + for (vr in he[pt]) + this.terminals_[vr] && vr > _e && Kr.push("'" + this.terminals_[vr] + "'"); + Pe.showPosition ? Da = "Parse error on line " + (Ae + 1) + `: +` + Pe.showPosition() + ` +Expecting ` + Kr.join(", ") + ", got '" + (this.terminals_[je] || je) + "'" : Da = "Parse error on line " + (Ae + 1) + ": Unexpected " + (je == tt ? "end of input" : "'" + (this.terminals_[je] || je) + "'"), this.parseError(Da, { + text: Pe.match, + token: this.terminals_[je] || je, + line: Pe.yylineno, + loc: rt, + expected: Kr + }); + } + if (Et[0] instanceof Array && Et.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + pt + ", token: " + je); + switch (Et[0]) { + case 1: + L.push(je), k.push(Pe.yytext), q.push(Pe.yylloc), L.push(Et[1]), je = null, Ne = Pe.yyleng, ge = Pe.yytext, Ae = Pe.yylineno, rt = Pe.yylloc; + break; + case 2: + if (qt = this.productions_[Et[1]][1], vt.$ = k[k.length - qt], vt._$ = { + first_line: q[q.length - (qt || 1)].first_line, + last_line: q[q.length - 1].last_line, + first_column: q[q.length - (qt || 1)].first_column, + last_column: q[q.length - 1].last_column + }, lt && (vt._$.range = [ + q[q.length - (qt || 1)].range[0], + q[q.length - 1].range[1] + ]), kt = this.performAction.apply(vt, [ + ge, + Ne, + Ae, + $e.yy, + Et[1], + k, + q + ].concat(ct)), typeof kt < "u") + return kt; + qt && (L = L.slice(0, -1 * qt * 2), k = k.slice(0, -1 * qt), q = q.slice(0, -1 * qt)), L.push(this.productions_[Et[1]][0]), k.push(vt.$), q.push(vt._$), on = he[L[L.length - 2]][L[L.length - 1]], L.push(on); + break; + case 3: + return !0; + } + } + return !0; + } + }, ue = function() { + var j = { + EOF: 1, + parseError: function(te, L) { + if (this.yy.parser) + this.yy.parser.parseError(te, L); + else + throw new Error(te); + }, + // resets the lexer, sets new input + setInput: function(Y, te) { + return this.yy = te || this.yy || {}, this._input = Y, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var Y = this._input[0]; + this.yytext += Y, this.yyleng++, this.offset++, this.match += Y, this.matched += Y; + var te = Y.match(/(?:\r\n?|\n).*/g); + return te ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), Y; + }, + // unshifts one char (or a string) into the input + unput: function(Y) { + var te = Y.length, L = Y.split(/(?:\r\n?|\n)/g); + this._input = Y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - te), this.offset -= te; + var $ = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1); + var k = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: L ? (L.length === $.length ? this.yylloc.first_column : 0) + $[$.length - L.length].length - L[0].length : this.yylloc.first_column - te + }, this.options.ranges && (this.yylloc.range = [k[0], k[0] + this.yyleng - te]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(Y) { + this.unput(this.match.slice(Y)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var Y = this.matched.substr(0, this.matched.length - this.match.length); + return (Y.length > 20 ? "..." : "") + Y.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var Y = this.match; + return Y.length < 20 && (Y += this._input.substr(0, 20 - Y.length)), (Y.substr(0, 20) + (Y.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var Y = this.pastInput(), te = new Array(Y.length + 1).join("-"); + return Y + this.upcomingInput() + ` +` + te + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(Y, te) { + var L, $, k; + if (this.options.backtrack_lexer && (k = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (k.yylloc.range = this.yylloc.range.slice(0))), $ = Y[0].match(/(?:\r\n?|\n).*/g), $ && (this.yylineno += $.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: $ ? $[$.length - 1].length - $[$.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + Y[0].length + }, this.yytext += Y[0], this.match += Y[0], this.matches = Y, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(Y[0].length), this.matched += Y[0], L = this.performAction.call(this, this.yy, this, te, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L) + return L; + if (this._backtrack) { + for (var q in k) + this[q] = k[q]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var Y, te, L, $; + this._more || (this.yytext = "", this.match = ""); + for (var k = this._currentRules(), q = 0; q < k.length; q++) + if (L = this._input.match(this.rules[k[q]]), L && (!te || L[0].length > te[0].length)) { + if (te = L, $ = q, this.options.backtrack_lexer) { + if (Y = this.test_match(L, k[q]), Y !== !1) + return Y; + if (this._backtrack) { + te = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return te ? (Y = this.test_match(te, k[$]), Y !== !1 ? Y : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var te = this.next(); + return te || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(te) { + this.conditionStack.push(te); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var te = this.conditionStack.length - 1; + return te > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(te) { + return te = this.conditionStack.length - 1 - Math.abs(te || 0), te >= 0 ? this.conditionStack[te] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(te) { + this.begin(te); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(te, L, $, k) { + switch ($) { + case 0: + return te.getLogger().trace("Found comment", L.yytext), 6; + case 1: + return 8; + case 2: + this.begin("CLASS"); + break; + case 3: + return this.popState(), 16; + case 4: + this.popState(); + break; + case 5: + te.getLogger().trace("Begin icon"), this.begin("ICON"); + break; + case 6: + return te.getLogger().trace("SPACELINE"), 6; + case 7: + return 7; + case 8: + return 15; + case 9: + te.getLogger().trace("end icon"), this.popState(); + break; + case 10: + return te.getLogger().trace("Exploding node"), this.begin("NODE"), 19; + case 11: + return te.getLogger().trace("Cloud"), this.begin("NODE"), 19; + case 12: + return te.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19; + case 13: + return te.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19; + case 14: + return this.begin("NODE"), 19; + case 15: + return this.begin("NODE"), 19; + case 16: + return this.begin("NODE"), 19; + case 17: + return this.begin("NODE"), 19; + case 18: + return 13; + case 19: + return 22; + case 20: + return 11; + case 21: + this.begin("NSTR2"); + break; + case 22: + return "NODE_DESCR"; + case 23: + this.popState(); + break; + case 24: + te.getLogger().trace("Starting NSTR"), this.begin("NSTR"); + break; + case 25: + return te.getLogger().trace("description:", L.yytext), "NODE_DESCR"; + case 26: + this.popState(); + break; + case 27: + return this.popState(), te.getLogger().trace("node end ))"), "NODE_DEND"; + case 28: + return this.popState(), te.getLogger().trace("node end )"), "NODE_DEND"; + case 29: + return this.popState(), te.getLogger().trace("node end ...", L.yytext), "NODE_DEND"; + case 30: + return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; + case 31: + return this.popState(), te.getLogger().trace("node end (-"), "NODE_DEND"; + case 32: + return this.popState(), te.getLogger().trace("node end (-"), "NODE_DEND"; + case 33: + return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; + case 34: + return this.popState(), te.getLogger().trace("node end (("), "NODE_DEND"; + case 35: + return te.getLogger().trace("Long description:", L.yytext), 20; + case 36: + return te.getLogger().trace("Long description:", L.yytext), 20; + } + }, + rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], + conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } } + }; + return j; + }(); + ne.lexer = ue; + function J() { + this.yy = {}; + } + return J.prototype = ne, ne.Parser = J, new J(); +}(); +Ki.parser = Ki; +const Cp = Ki, sn = (pe) => mp(pe, nn()); +let Jt = [], _u = 0, Zi = {}; +const Dp = () => { + Jt = [], _u = 0, Zi = {}; +}, Sp = function(pe) { + for (let fe = Jt.length - 1; fe >= 0; fe--) + if (Jt[fe].level < pe) + return Jt[fe]; + return null; +}, Lp = () => Jt.length > 0 ? Jt[0] : null, Ap = (pe, fe, ee, ce) => { + qr.info("addNode", pe, fe, ee, ce); + const H = nn(), O = { + id: _u++, + nodeId: sn(fe), + level: pe, + descr: sn(ee), + type: ce, + children: [], + width: nn().mindmap.maxNodeWidth + }; + switch (O.type) { + case yt.ROUNDED_RECT: + O.padding = 2 * H.mindmap.padding; + break; + case yt.RECT: + O.padding = 2 * H.mindmap.padding; + break; + case yt.HEXAGON: + O.padding = 2 * H.mindmap.padding; + break; + default: + O.padding = H.mindmap.padding; + } + const T = Sp(pe); + if (T) + T.children.push(O), Jt.push(O); + else if (Jt.length === 0) + Jt.push(O); + else { + let x = new Error( + 'There can be only one root. No parent could be found for ("' + O.descr + '")' + ); + throw x.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }, x; + } +}, yt = { + DEFAULT: 0, + NO_BORDER: 0, + ROUNDED_RECT: 1, + RECT: 2, + CIRCLE: 3, + CLOUD: 4, + BANG: 5, + HEXAGON: 6 +}, Op = (pe, fe) => { + switch (qr.debug("In get type", pe, fe), pe) { + case "[": + return yt.RECT; + case "(": + return fe === ")" ? yt.ROUNDED_RECT : yt.CLOUD; + case "((": + return yt.CIRCLE; + case ")": + return yt.CLOUD; + case "))": + return yt.BANG; + case "{{": + return yt.HEXAGON; + default: + return yt.DEFAULT; + } +}, Uu = (pe, fe) => { + Zi[pe] = fe; +}, Np = (pe) => { + const fe = Jt[Jt.length - 1]; + pe && pe.icon && (fe.icon = sn(pe.icon)), pe && pe.class && (fe.class = sn(pe.class)); +}, Wr = (pe) => { + switch (pe) { + case yt.DEFAULT: + return "no-border"; + case yt.RECT: + return "rect"; + case yt.ROUNDED_RECT: + return "rounded-rect"; + case yt.CIRCLE: + return "circle"; + case yt.CLOUD: + return "cloud"; + case yt.BANG: + return "bang"; + case yt.HEXAGON: + return "hexgon"; + default: + return "no-border"; + } +}; +let Yu; +const Mp = (pe) => { + Yu = pe; +}, Ip = () => qr, Rp = (pe) => Jt[pe], Qi = (pe) => Zi[pe], kp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addNode: Ap, + clear: Dp, + decorateNode: Np, + getElementById: Qi, + getLogger: Ip, + getMindmap: Lp, + getNodeById: Rp, + getType: Op, + nodeType: yt, + get parseError() { + return Yu; + }, + sanitizeText: sn, + setElementForId: Uu, + setErrorHandler: Mp, + type2Str: Wr +}, Symbol.toStringTag, { value: "Module" })), Hu = 12, Pp = function(pe, fe, ee) { + pe.append("path").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr( + "d", + `M0 ${fe.height - 5} v${-fe.height + 2 * 5} q0,-5 5,-5 h${fe.width - 2 * 5} q5,0 5,5 v${fe.height - 5} H0 Z` + ), pe.append("line").attr("class", "node-line-" + ee).attr("x1", 0).attr("y1", fe.height).attr("x2", fe.width).attr("y2", fe.height); +}, Bp = function(pe, fe) { + pe.append("rect").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr("height", fe.height).attr("width", fe.width); +}, Fp = function(pe, fe) { + const ee = fe.width, ce = fe.height, H = 0.15 * ee, O = 0.25 * ee, T = 0.35 * ee, x = 0.2 * ee; + pe.append("path").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr( + "d", + `M0 0 a${H},${H} 0 0,1 ${ee * 0.25},${-1 * ee * 0.1} + a${T},${T} 1 0,1 ${ee * 0.4},${-1 * ee * 0.1} + a${O},${O} 1 0,1 ${ee * 0.35},${1 * ee * 0.2} + + a${H},${H} 1 0,1 ${ee * 0.15},${1 * ce * 0.35} + a${x},${x} 1 0,1 ${-1 * ee * 0.15},${1 * ce * 0.65} + + a${O},${H} 1 0,1 ${-1 * ee * 0.25},${ee * 0.15} + a${T},${T} 1 0,1 ${-1 * ee * 0.5},0 + a${H},${H} 1 0,1 ${-1 * ee * 0.25},${-1 * ee * 0.15} + + a${H},${H} 1 0,1 ${-1 * ee * 0.1},${-1 * ce * 0.35} + a${x},${x} 1 0,1 ${ee * 0.1},${-1 * ce * 0.65} + + H0 V0 Z` + ); +}, zp = function(pe, fe) { + const ee = fe.width, ce = fe.height, H = 0.15 * ee; + pe.append("path").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr( + "d", + `M0 0 a${H},${H} 1 0,0 ${ee * 0.25},${-1 * ce * 0.1} + a${H},${H} 1 0,0 ${ee * 0.25},0 + a${H},${H} 1 0,0 ${ee * 0.25},0 + a${H},${H} 1 0,0 ${ee * 0.25},${1 * ce * 0.1} + + a${H},${H} 1 0,0 ${ee * 0.15},${1 * ce * 0.33} + a${H * 0.8},${H * 0.8} 1 0,0 0,${1 * ce * 0.34} + a${H},${H} 1 0,0 ${-1 * ee * 0.15},${1 * ce * 0.33} + + a${H},${H} 1 0,0 ${-1 * ee * 0.25},${ce * 0.15} + a${H},${H} 1 0,0 ${-1 * ee * 0.25},0 + a${H},${H} 1 0,0 ${-1 * ee * 0.25},0 + a${H},${H} 1 0,0 ${-1 * ee * 0.25},${-1 * ce * 0.15} + + a${H},${H} 1 0,0 ${-1 * ee * 0.1},${-1 * ce * 0.33} + a${H * 0.8},${H * 0.8} 1 0,0 0,${-1 * ce * 0.34} + a${H},${H} 1 0,0 ${ee * 0.1},${-1 * ce * 0.33} + + H0 V0 Z` + ); +}, Gp = function(pe, fe) { + pe.append("circle").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr("r", fe.width / 2); +}; +function $p(pe, fe, ee, ce, H) { + return pe.insert("polygon", ":first-child").attr( + "points", + ce.map(function(O) { + return O.x + "," + O.y; + }).join(" ") + ).attr("transform", "translate(" + (H.width - fe) / 2 + ", " + ee + ")"); +} +const Vp = function(pe, fe) { + const ee = fe.height, H = ee / 4, O = fe.width - fe.padding + 2 * H, T = [ + { x: H, y: 0 }, + { x: O - H, y: 0 }, + { x: O, y: -ee / 2 }, + { x: O - H, y: -ee }, + { x: H, y: -ee }, + { x: 0, y: -ee / 2 } + ]; + $p(pe, O, ee, T, fe); +}, _p = function(pe, fe) { + pe.append("rect").attr("id", "node-" + fe.id).attr("class", "node-bkg node-" + Wr(fe.type)).attr("height", fe.height).attr("rx", fe.padding).attr("ry", fe.padding).attr("width", fe.width); +}, Up = function(pe, fe, ee, ce) { + const H = ce.htmlLabels, O = ee % (Hu - 1), T = pe.append("g"); + fe.section = O; + let x = "section-" + O; + O < 0 && (x += " section-root"), T.attr("class", (fe.class ? fe.class + " " : "") + "mindmap-node " + x); + const S = T.append("g"), G = T.append("g"), U = fe.descr.replace(/()/g, ` +`); + Tp(G, U, { + useHtmlLabels: H, + width: fe.width, + classes: "mindmap-node-label" + }), H || G.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"); + const P = G.node().getBBox(), K = ce.fontSize.replace ? ce.fontSize.replace("px", "") : ce.fontSize; + if (fe.height = P.height + K * 1.1 * 0.5 + fe.padding, fe.width = P.width + 2 * fe.padding, fe.icon) + if (fe.type === yt.CIRCLE) + fe.height += 50, fe.width += 50, T.append("foreignObject").attr("height", "50px").attr("width", fe.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + O + " " + fe.icon), G.attr( + "transform", + "translate(" + fe.width / 2 + ", " + (fe.height / 2 - 1.5 * fe.padding) + ")" + ); + else { + fe.width += 50; + const D = fe.height; + fe.height = Math.max(D, 60); + const V = Math.abs(fe.height - D); + T.append("foreignObject").attr("width", "60px").attr("height", fe.height).attr("style", "text-align: center;margin-top:" + V / 2 + "px;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + O + " " + fe.icon), G.attr( + "transform", + "translate(" + (25 + fe.width / 2) + ", " + (V / 2 + fe.padding / 2) + ")" + ); + } + else if (H) { + const D = (fe.width - P.width) / 2, V = (fe.height - P.height) / 2; + G.attr("transform", "translate(" + D + ", " + V + ")"); + } else { + const D = fe.width / 2, V = fe.padding / 2; + G.attr("transform", "translate(" + D + ", " + V + ")"); + } + switch (fe.type) { + case yt.DEFAULT: + Pp(S, fe, O); + break; + case yt.ROUNDED_RECT: + _p(S, fe); + break; + case yt.RECT: + Bp(S, fe); + break; + case yt.CIRCLE: + S.attr("transform", "translate(" + fe.width / 2 + ", " + +fe.height / 2 + ")"), Gp(S, fe); + break; + case yt.CLOUD: + Fp(S, fe); + break; + case yt.BANG: + zp(S, fe); + break; + case yt.HEXAGON: + Vp(S, fe); + break; + } + return Uu(fe.id, T), fe.height; +}, Yp = function(fe, ee, ce, H, O) { + const T = O % (Hu - 1), x = ce.x + ce.width / 2, S = ce.y + ce.height / 2, G = ee.x + ee.width / 2, U = ee.y + ee.height / 2, P = G > x ? x + Math.abs(x - G) / 2 : x - Math.abs(x - G) / 2, K = U > S ? S + Math.abs(S - U) / 2 : S - Math.abs(S - U) / 2, D = G > x ? Math.abs(x - P) / 2 + x : -Math.abs(x - P) / 2 + x, V = U > S ? Math.abs(S - K) / 2 + S : -Math.abs(S - K) / 2 + S; + fe.append("path").attr( + "d", + ce.direction === "TB" || ce.direction === "BT" ? `M${x},${S} Q${x},${V} ${P},${K} T${G},${U}` : `M${x},${S} Q${D},${S} ${P},${K} T${G},${U}` + ).attr("class", "edge section-edge-" + T + " edge-depth-" + H); +}, Hp = function(pe) { + const fe = Qi(pe.id), ee = pe.x || 0, ce = pe.y || 0; + fe.attr("transform", "translate(" + ee + "," + ce + ")"); +}, Xu = { drawNode: Up, positionNode: Hp, drawEdge: Yp }; +var qu = { exports: {} }; +(function(pe, fe) { + (function(ee, ce) { + pe.exports = ce(); + })(Ca, function() { + function ee(t) { + return ee = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { + return typeof e; + } : function(e) { + return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; + }, ee(t); + } + function ce(t, e) { + if (!(t instanceof e)) + throw new TypeError("Cannot call a class as a function"); + } + function H(t, e) { + for (var r = 0; r < e.length; r++) { + var a = e[r]; + a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, a.key, a); + } + } + function O(t, e, r) { + return e && H(t.prototype, e), r && H(t, r), Object.defineProperty(t, "prototype", { + writable: !1 + }), t; + } + function T(t, e, r) { + return e in t ? Object.defineProperty(t, e, { + value: r, + enumerable: !0, + configurable: !0, + writable: !0 + }) : t[e] = r, t; + } + function x(t, e) { + return S(t) || G(t, e) || U(t, e) || K(); + } + function S(t) { + if (Array.isArray(t)) + return t; + } + function G(t, e) { + var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; + if (r != null) { + var a = [], n = !0, i = !1, s, o; + try { + for (r = r.call(t); !(n = (s = r.next()).done) && (a.push(s.value), !(e && a.length === e)); n = !0) + ; + } catch (l) { + i = !0, o = l; + } finally { + try { + !n && r.return != null && r.return(); + } finally { + if (i) + throw o; + } + } + return a; + } + } + function U(t, e) { + if (t) { + if (typeof t == "string") + return P(t, e); + var r = Object.prototype.toString.call(t).slice(8, -1); + if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") + return Array.from(t); + if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) + return P(t, e); + } + } + function P(t, e) { + (e == null || e > t.length) && (e = t.length); + for (var r = 0, a = new Array(e); r < e; r++) + a[r] = t[r]; + return a; + } + function K() { + throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); + } + var D = typeof window > "u" ? null : window, V = D ? D.navigator : null; + D && D.document; + var _ = ee(""), Q = ee({}), ne = ee(function() { + }), ue = typeof HTMLElement > "u" ? "undefined" : ee(HTMLElement), J = function(e) { + return e && e.instanceString && Y(e.instanceString) ? e.instanceString() : null; + }, j = function(e) { + return e != null && ee(e) == _; + }, Y = function(e) { + return e != null && ee(e) === ne; + }, te = function(e) { + return !ge(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); + }, L = function(e) { + return e != null && ee(e) === Q && !te(e) && e.constructor === Object; + }, $ = function(e) { + return e != null && ee(e) === Q; + }, k = function(e) { + return e != null && ee(e) === ee(1) && !isNaN(e); + }, q = function(e) { + return k(e) && Math.floor(e) === e; + }, he = function(e) { + if (ue !== "undefined") + return e != null && e instanceof HTMLElement; + }, ge = function(e) { + return Ae(e) || Ne(e); + }, Ae = function(e) { + return J(e) === "collection" && e._private.single; + }, Ne = function(e) { + return J(e) === "collection" && !e._private.single; + }, _e = function(e) { + return J(e) === "core"; + }, tt = function(e) { + return J(e) === "stylesheet"; + }, ct = function(e) { + return J(e) === "event"; + }, Pe = function(e) { + return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); + }, $e = function(e) { + return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; + }, Xe = function(e) { + return L(e) && k(e.x1) && k(e.x2) && k(e.y1) && k(e.y2); + }, rt = function(e) { + return $(e) && Y(e.then); + }, lt = function() { + return V && V.userAgent.match(/msie|trident|edge/i); + }, nt = function(e, r) { + r || (r = function() { + if (arguments.length === 1) + return arguments[0]; + if (arguments.length === 0) + return "undefined"; + for (var i = [], s = 0; s < arguments.length; s++) + i.push(arguments[s]); + return i.join("$"); + }); + var a = function n() { + var i = this, s = arguments, o, l = r.apply(i, s), u = n.cache; + return (o = u[l]) || (o = u[l] = e.apply(i, s)), o; + }; + return a.cache = {}, a; + }, je = nt(function(t) { + return t.replace(/([A-Z])/g, function(e) { + return "-" + e.toLowerCase(); + }); + }), pt = nt(function(t) { + return t.replace(/(-\w)/g, function(e) { + return e[1].toUpperCase(); + }); + }), Et = nt(function(t, e) { + return t + e[0].toUpperCase() + e.substring(1); + }, function(t, e) { + return t + "$" + e; + }), kt = function(e) { + return Pe(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); + }, vt = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", vr = "rgb[a]?\\((" + vt + "[%]?)\\s*,\\s*(" + vt + "[%]?)\\s*,\\s*(" + vt + "[%]?)(?:\\s*,\\s*(" + vt + "))?\\)", qt = "rgb[a]?\\((?:" + vt + "[%]?)\\s*,\\s*(?:" + vt + "[%]?)\\s*,\\s*(?:" + vt + "[%]?)(?:\\s*,\\s*(?:" + vt + "))?\\)", on = "hsl[a]?\\((" + vt + ")\\s*,\\s*(" + vt + "[%])\\s*,\\s*(" + vt + "[%])(?:\\s*,\\s*(" + vt + "))?\\)", Kr = "hsl[a]?\\((?:" + vt + ")\\s*,\\s*(?:" + vt + "[%])\\s*,\\s*(?:" + vt + "[%])(?:\\s*,\\s*(?:" + vt + "))?\\)", Da = "\\#[0-9a-fA-F]{3}", jt = "\\#[0-9a-fA-F]{6}", Ji = function(e, r) { + return e < r ? -1 : e > r ? 1 : 0; + }, Ju = function(e, r) { + return -1 * Ji(e, r); + }, Ue = Object.assign != null ? Object.assign.bind(Object) : function(t) { + for (var e = arguments, r = 1; r < e.length; r++) { + var a = e[r]; + if (a != null) + for (var n = Object.keys(a), i = 0; i < n.length; i++) { + var s = n[i]; + t[s] = a[s]; + } + } + return t; + }, ju = function(e) { + if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { + var r = e.length === 4, a, n, i, s = 16; + return r ? (a = parseInt(e[1] + e[1], s), n = parseInt(e[2] + e[2], s), i = parseInt(e[3] + e[3], s)) : (a = parseInt(e[1] + e[2], s), n = parseInt(e[3] + e[4], s), i = parseInt(e[5] + e[6], s)), [a, n, i]; + } + }, el = function(e) { + var r, a, n, i, s, o, l, u; + function f(d, g, y) { + return y < 0 && (y += 1), y > 1 && (y -= 1), y < 1 / 6 ? d + (g - d) * 6 * y : y < 1 / 2 ? g : y < 2 / 3 ? d + (g - d) * (2 / 3 - y) * 6 : d; + } + var h = new RegExp("^" + on + "$").exec(e); + if (h) { + if (a = parseInt(h[1]), a < 0 ? a = (360 - -1 * a % 360) % 360 : a > 360 && (a = a % 360), a /= 360, n = parseFloat(h[2]), n < 0 || n > 100 || (n = n / 100, i = parseFloat(h[3]), i < 0 || i > 100) || (i = i / 100, s = h[4], s !== void 0 && (s = parseFloat(s), s < 0 || s > 1))) + return; + if (n === 0) + o = l = u = Math.round(i * 255); + else { + var c = i < 0.5 ? i * (1 + n) : i + n - i * n, v = 2 * i - c; + o = Math.round(255 * f(v, c, a + 1 / 3)), l = Math.round(255 * f(v, c, a)), u = Math.round(255 * f(v, c, a - 1 / 3)); + } + r = [o, l, u, s]; + } + return r; + }, tl = function(e) { + var r, a = new RegExp("^" + vr + "$").exec(e); + if (a) { + r = []; + for (var n = [], i = 1; i <= 3; i++) { + var s = a[i]; + if (s[s.length - 1] === "%" && (n[i] = !0), s = parseFloat(s), n[i] && (s = s / 100 * 255), s < 0 || s > 255) + return; + r.push(Math.floor(s)); + } + var o = n[1] || n[2] || n[3], l = n[1] && n[2] && n[3]; + if (o && !l) + return; + var u = a[4]; + if (u !== void 0) { + if (u = parseFloat(u), u < 0 || u > 1) + return; + r.push(u); + } + } + return r; + }, rl = function(e) { + return nl[e.toLowerCase()]; + }, al = function(e) { + return (te(e) ? e : null) || rl(e) || ju(e) || tl(e) || el(e); + }, nl = { + // special colour names + transparent: [0, 0, 0, 0], + // NB alpha === 0 + // regular colours + aliceblue: [240, 248, 255], + antiquewhite: [250, 235, 215], + aqua: [0, 255, 255], + aquamarine: [127, 255, 212], + azure: [240, 255, 255], + beige: [245, 245, 220], + bisque: [255, 228, 196], + black: [0, 0, 0], + blanchedalmond: [255, 235, 205], + blue: [0, 0, 255], + blueviolet: [138, 43, 226], + brown: [165, 42, 42], + burlywood: [222, 184, 135], + cadetblue: [95, 158, 160], + chartreuse: [127, 255, 0], + chocolate: [210, 105, 30], + coral: [255, 127, 80], + cornflowerblue: [100, 149, 237], + cornsilk: [255, 248, 220], + crimson: [220, 20, 60], + cyan: [0, 255, 255], + darkblue: [0, 0, 139], + darkcyan: [0, 139, 139], + darkgoldenrod: [184, 134, 11], + darkgray: [169, 169, 169], + darkgreen: [0, 100, 0], + darkgrey: [169, 169, 169], + darkkhaki: [189, 183, 107], + darkmagenta: [139, 0, 139], + darkolivegreen: [85, 107, 47], + darkorange: [255, 140, 0], + darkorchid: [153, 50, 204], + darkred: [139, 0, 0], + darksalmon: [233, 150, 122], + darkseagreen: [143, 188, 143], + darkslateblue: [72, 61, 139], + darkslategray: [47, 79, 79], + darkslategrey: [47, 79, 79], + darkturquoise: [0, 206, 209], + darkviolet: [148, 0, 211], + deeppink: [255, 20, 147], + deepskyblue: [0, 191, 255], + dimgray: [105, 105, 105], + dimgrey: [105, 105, 105], + dodgerblue: [30, 144, 255], + firebrick: [178, 34, 34], + floralwhite: [255, 250, 240], + forestgreen: [34, 139, 34], + fuchsia: [255, 0, 255], + gainsboro: [220, 220, 220], + ghostwhite: [248, 248, 255], + gold: [255, 215, 0], + goldenrod: [218, 165, 32], + gray: [128, 128, 128], + grey: [128, 128, 128], + green: [0, 128, 0], + greenyellow: [173, 255, 47], + honeydew: [240, 255, 240], + hotpink: [255, 105, 180], + indianred: [205, 92, 92], + indigo: [75, 0, 130], + ivory: [255, 255, 240], + khaki: [240, 230, 140], + lavender: [230, 230, 250], + lavenderblush: [255, 240, 245], + lawngreen: [124, 252, 0], + lemonchiffon: [255, 250, 205], + lightblue: [173, 216, 230], + lightcoral: [240, 128, 128], + lightcyan: [224, 255, 255], + lightgoldenrodyellow: [250, 250, 210], + lightgray: [211, 211, 211], + lightgreen: [144, 238, 144], + lightgrey: [211, 211, 211], + lightpink: [255, 182, 193], + lightsalmon: [255, 160, 122], + lightseagreen: [32, 178, 170], + lightskyblue: [135, 206, 250], + lightslategray: [119, 136, 153], + lightslategrey: [119, 136, 153], + lightsteelblue: [176, 196, 222], + lightyellow: [255, 255, 224], + lime: [0, 255, 0], + limegreen: [50, 205, 50], + linen: [250, 240, 230], + magenta: [255, 0, 255], + maroon: [128, 0, 0], + mediumaquamarine: [102, 205, 170], + mediumblue: [0, 0, 205], + mediumorchid: [186, 85, 211], + mediumpurple: [147, 112, 219], + mediumseagreen: [60, 179, 113], + mediumslateblue: [123, 104, 238], + mediumspringgreen: [0, 250, 154], + mediumturquoise: [72, 209, 204], + mediumvioletred: [199, 21, 133], + midnightblue: [25, 25, 112], + mintcream: [245, 255, 250], + mistyrose: [255, 228, 225], + moccasin: [255, 228, 181], + navajowhite: [255, 222, 173], + navy: [0, 0, 128], + oldlace: [253, 245, 230], + olive: [128, 128, 0], + olivedrab: [107, 142, 35], + orange: [255, 165, 0], + orangered: [255, 69, 0], + orchid: [218, 112, 214], + palegoldenrod: [238, 232, 170], + palegreen: [152, 251, 152], + paleturquoise: [175, 238, 238], + palevioletred: [219, 112, 147], + papayawhip: [255, 239, 213], + peachpuff: [255, 218, 185], + peru: [205, 133, 63], + pink: [255, 192, 203], + plum: [221, 160, 221], + powderblue: [176, 224, 230], + purple: [128, 0, 128], + red: [255, 0, 0], + rosybrown: [188, 143, 143], + royalblue: [65, 105, 225], + saddlebrown: [139, 69, 19], + salmon: [250, 128, 114], + sandybrown: [244, 164, 96], + seagreen: [46, 139, 87], + seashell: [255, 245, 238], + sienna: [160, 82, 45], + silver: [192, 192, 192], + skyblue: [135, 206, 235], + slateblue: [106, 90, 205], + slategray: [112, 128, 144], + slategrey: [112, 128, 144], + snow: [255, 250, 250], + springgreen: [0, 255, 127], + steelblue: [70, 130, 180], + tan: [210, 180, 140], + teal: [0, 128, 128], + thistle: [216, 191, 216], + tomato: [255, 99, 71], + turquoise: [64, 224, 208], + violet: [238, 130, 238], + wheat: [245, 222, 179], + white: [255, 255, 255], + whitesmoke: [245, 245, 245], + yellow: [255, 255, 0], + yellowgreen: [154, 205, 50] + }, ji = function(e) { + for (var r = e.map, a = e.keys, n = a.length, i = 0; i < n; i++) { + var s = a[i]; + if (L(s)) + throw Error("Tried to set map with object key"); + i < a.length - 1 ? (r[s] == null && (r[s] = {}), r = r[s]) : r[s] = e.value; + } + }, es = function(e) { + for (var r = e.map, a = e.keys, n = a.length, i = 0; i < n; i++) { + var s = a[i]; + if (L(s)) + throw Error("Tried to get map with object key"); + if (r = r[s], r == null) + return r; + } + return r; + }; + function il(t) { + var e = typeof t; + return t != null && (e == "object" || e == "function"); + } + var Rr = il, Sa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof Ca < "u" ? Ca : typeof self < "u" ? self : {}; + function sl(t, e) { + return e = { exports: {} }, t(e, e.exports), e.exports; + } + var ol = typeof Sa == "object" && Sa && Sa.Object === Object && Sa, ul = ol, ll = typeof self == "object" && self && self.Object === Object && self, fl = ul || ll || Function("return this")(), un = fl, hl = function() { + return un.Date.now(); + }, ti = hl, cl = /\s/; + function vl(t) { + for (var e = t.length; e-- && cl.test(t.charAt(e)); ) + ; + return e; + } + var dl = vl, gl = /^\s+/; + function pl(t) { + return t && t.slice(0, dl(t) + 1).replace(gl, ""); + } + var yl = pl, ml = un.Symbol, Zr = ml, ts = Object.prototype, bl = ts.hasOwnProperty, El = ts.toString, La = Zr ? Zr.toStringTag : void 0; + function wl(t) { + var e = bl.call(t, La), r = t[La]; + try { + t[La] = void 0; + var a = !0; + } catch { + } + var n = El.call(t); + return a && (e ? t[La] = r : delete t[La]), n; + } + var xl = wl, Tl = Object.prototype, Cl = Tl.toString; + function Dl(t) { + return Cl.call(t); + } + var Sl = Dl, Ll = "[object Null]", Al = "[object Undefined]", rs = Zr ? Zr.toStringTag : void 0; + function Ol(t) { + return t == null ? t === void 0 ? Al : Ll : rs && rs in Object(t) ? xl(t) : Sl(t); + } + var as = Ol; + function Nl(t) { + return t != null && typeof t == "object"; + } + var Ml = Nl, Il = "[object Symbol]"; + function Rl(t) { + return typeof t == "symbol" || Ml(t) && as(t) == Il; + } + var Aa = Rl, ns = 0 / 0, kl = /^[-+]0x[0-9a-f]+$/i, Pl = /^0b[01]+$/i, Bl = /^0o[0-7]+$/i, Fl = parseInt; + function zl(t) { + if (typeof t == "number") + return t; + if (Aa(t)) + return ns; + if (Rr(t)) { + var e = typeof t.valueOf == "function" ? t.valueOf() : t; + t = Rr(e) ? e + "" : e; + } + if (typeof t != "string") + return t === 0 ? t : +t; + t = yl(t); + var r = Pl.test(t); + return r || Bl.test(t) ? Fl(t.slice(2), r ? 2 : 8) : kl.test(t) ? ns : +t; + } + var is = zl, Gl = "Expected a function", $l = Math.max, Vl = Math.min; + function _l(t, e, r) { + var a, n, i, s, o, l, u = 0, f = !1, h = !1, c = !0; + if (typeof t != "function") + throw new TypeError(Gl); + e = is(e) || 0, Rr(r) && (f = !!r.leading, h = "maxWait" in r, i = h ? $l(is(r.maxWait) || 0, e) : i, c = "trailing" in r ? !!r.trailing : c); + function v(A) { + var w = a, I = n; + return a = n = void 0, u = A, s = t.apply(I, w), s; + } + function d(A) { + return u = A, o = setTimeout(p, e), f ? v(A) : s; + } + function g(A) { + var w = A - l, I = A - u, C = e - w; + return h ? Vl(C, i - I) : C; + } + function y(A) { + var w = A - l, I = A - u; + return l === void 0 || w >= e || w < 0 || h && I >= i; + } + function p() { + var A = ti(); + if (y(A)) + return m(A); + o = setTimeout(p, g(A)); + } + function m(A) { + return o = void 0, c && a ? v(A) : (a = n = void 0, s); + } + function b() { + o !== void 0 && clearTimeout(o), u = 0, a = l = n = o = void 0; + } + function E() { + return o === void 0 ? s : m(ti()); + } + function M() { + var A = ti(), w = y(A); + if (a = arguments, n = this, l = A, w) { + if (o === void 0) + return d(l); + if (h) + return clearTimeout(o), o = setTimeout(p, e), v(l); + } + return o === void 0 && (o = setTimeout(p, e)), s; + } + return M.cancel = b, M.flush = E, M; + } + var ln = _l, ri = D ? D.performance : null, ss = ri && ri.now ? function() { + return ri.now(); + } : function() { + return Date.now(); + }, Ul = function() { + if (D) { + if (D.requestAnimationFrame) + return function(t) { + D.requestAnimationFrame(t); + }; + if (D.mozRequestAnimationFrame) + return function(t) { + D.mozRequestAnimationFrame(t); + }; + if (D.webkitRequestAnimationFrame) + return function(t) { + D.webkitRequestAnimationFrame(t); + }; + if (D.msRequestAnimationFrame) + return function(t) { + D.msRequestAnimationFrame(t); + }; + } + return function(t) { + t && setTimeout(function() { + t(ss()); + }, 1e3 / 60); + }; + }(), fn = function(e) { + return Ul(e); + }, dr = ss, Qr = 9261, os = 65599, Oa = 5381, us = function(e) { + for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Qr, a = r, n; n = e.next(), !n.done; ) + a = a * os + n.value | 0; + return a; + }, Na = function(e) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Qr; + return r * os + e | 0; + }, Ma = function(e) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Oa; + return (r << 5) + r + e | 0; + }, Yl = function(e, r) { + return e * 2097152 + r; + }, Er = function(e) { + return e[0] * 2097152 + e[1]; + }, hn = function(e, r) { + return [Na(e[0], r[0]), Ma(e[1], r[1])]; + }, Hl = function(e, r) { + var a = { + value: 0, + done: !1 + }, n = 0, i = e.length, s = { + next: function() { + return n < i ? a.value = e[n++] : a.done = !0, a; + } + }; + return us(s, r); + }, kr = function(e, r) { + var a = { + value: 0, + done: !1 + }, n = 0, i = e.length, s = { + next: function() { + return n < i ? a.value = e.charCodeAt(n++) : a.done = !0, a; + } + }; + return us(s, r); + }, ls = function() { + return Xl(arguments); + }, Xl = function(e) { + for (var r, a = 0; a < e.length; a++) { + var n = e[a]; + a === 0 ? r = kr(n) : r = kr(n, r); + } + return r; + }, fs = !0, ql = console.warn != null, Wl = console.trace != null, ai = Number.MAX_SAFE_INTEGER || 9007199254740991, hs = function() { + return !0; + }, cn = function() { + return !1; + }, cs = function() { + return 0; + }, ni = function() { + }, xt = function(e) { + throw new Error(e); + }, vs = function(e) { + if (e !== void 0) + fs = !!e; + else + return fs; + }, ft = function(e) { + vs() && (ql ? console.warn(e) : (console.log(e), Wl && console.trace())); + }, Kl = function(e) { + return Ue({}, e); + }, or = function(e) { + return e == null ? e : te(e) ? e.slice() : L(e) ? Kl(e) : e; + }, Zl = function(e) { + return e.slice(); + }, ds = function(e, r) { + for ( + // loop :) + r = e = ""; + // b - result , a - numeric letiable + e++ < 36; + // + r += e * 51 & 52 ? ( + // return a random number or 4 + (e ^ 15 ? ( + // generate a random number from 0 to 15 + 8 ^ Math.random() * (e ^ 20 ? 16 : 4) + ) : 4).toString(16) + ) : "-" + ) + ; + return r; + }, Ql = {}, gs = function() { + return Ql; + }, Lt = function(e) { + var r = Object.keys(e); + return function(a) { + for (var n = {}, i = 0; i < r.length; i++) { + var s = r[i], o = a == null ? void 0 : a[s]; + n[s] = o === void 0 ? e[s] : o; + } + return n; + }; + }, wr = function(e, r, a) { + for (var n = e.length - 1; n >= 0 && !(e[n] === r && (e.splice(n, 1), a)); n--) + ; + }, ii = function(e) { + e.splice(0, e.length); + }, Jl = function(e, r) { + for (var a = 0; a < r.length; a++) { + var n = r[a]; + e.push(n); + } + }, er = function(e, r, a) { + return a && (r = Et(a, r)), e[r]; + }, xr = function(e, r, a, n) { + a && (r = Et(a, r)), e[r] = n; + }, jl = /* @__PURE__ */ function() { + function t() { + ce(this, t), this._obj = {}; + } + return O(t, [{ + key: "set", + value: function(r, a) { + return this._obj[r] = a, this; + } + }, { + key: "delete", + value: function(r) { + return this._obj[r] = void 0, this; + } + }, { + key: "clear", + value: function() { + this._obj = {}; + } + }, { + key: "has", + value: function(r) { + return this._obj[r] !== void 0; + } + }, { + key: "get", + value: function(r) { + return this._obj[r]; + } + }]), t; + }(), ur = typeof Map < "u" ? Map : jl, ef = "undefined", tf = /* @__PURE__ */ function() { + function t(e) { + if (ce(this, t), this._obj = /* @__PURE__ */ Object.create(null), this.size = 0, e != null) { + var r; + e.instanceString != null && e.instanceString() === this.instanceString() ? r = e.toArray() : r = e; + for (var a = 0; a < r.length; a++) + this.add(r[a]); + } + } + return O(t, [{ + key: "instanceString", + value: function() { + return "set"; + } + }, { + key: "add", + value: function(r) { + var a = this._obj; + a[r] !== 1 && (a[r] = 1, this.size++); + } + }, { + key: "delete", + value: function(r) { + var a = this._obj; + a[r] === 1 && (a[r] = 0, this.size--); + } + }, { + key: "clear", + value: function() { + this._obj = /* @__PURE__ */ Object.create(null); + } + }, { + key: "has", + value: function(r) { + return this._obj[r] === 1; + } + }, { + key: "toArray", + value: function() { + var r = this; + return Object.keys(this._obj).filter(function(a) { + return r.has(a); + }); + } + }, { + key: "forEach", + value: function(r, a) { + return this.toArray().forEach(r, a); + } + }]), t; + }(), Jr = (typeof Set > "u" ? "undefined" : ee(Set)) !== ef ? Set : tf, vn = function(e, r) { + var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; + if (e === void 0 || r === void 0 || !_e(e)) { + xt("An element must have a core reference and parameters set"); + return; + } + var n = r.group; + if (n == null && (r.data && r.data.source != null && r.data.target != null ? n = "edges" : n = "nodes"), n !== "nodes" && n !== "edges") { + xt("An element must be of type `nodes` or `edges`; you specified `" + n + "`"); + return; + } + this.length = 1, this[0] = this; + var i = this._private = { + cy: e, + single: !0, + // indicates this is an element + data: r.data || {}, + // data object + position: r.position || { + x: 0, + y: 0 + }, + // (x, y) position pair + autoWidth: void 0, + // width and height of nodes calculated by the renderer when set to special 'auto' value + autoHeight: void 0, + autoPadding: void 0, + compoundBoundsClean: !1, + // whether the compound dimensions need to be recalculated the next time dimensions are read + listeners: [], + // array of bound listeners + group: n, + // string; 'nodes' or 'edges' + style: {}, + // properties as set by the style + rstyle: {}, + // properties for style sent from the renderer to the core + styleCxts: [], + // applied style contexts from the styler + styleKeys: {}, + // per-group keys of style property values + removed: !0, + // whether it's inside the vis; true if removed (set true here since we call restore) + selected: !!r.selected, + // whether it's selected + selectable: r.selectable === void 0 ? !0 : !!r.selectable, + // whether it's selectable + locked: !!r.locked, + // whether the element is locked (cannot be moved) + grabbed: !1, + // whether the element is grabbed by the mouse; renderer sets this privately + grabbable: r.grabbable === void 0 ? !0 : !!r.grabbable, + // whether the element can be grabbed + pannable: r.pannable === void 0 ? n === "edges" : !!r.pannable, + // whether the element has passthrough panning enabled + active: !1, + // whether the element is active from user interaction + classes: new Jr(), + // map ( className => true ) + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + rscratch: {}, + // object in which the renderer can store information + scratch: r.scratch || {}, + // scratch objects + edges: [], + // array of connected edges + children: [], + // array of children + parent: r.parent && r.parent.isNode() ? r.parent : null, + // parent ref + traversalCache: {}, + // cache of output of traversal functions + backgrounding: !1, + // whether background images are loading + bbCache: null, + // cache of the current bounding box + bbCacheShift: { + x: 0, + y: 0 + }, + // shift applied to cached bb to be applied on next get + bodyBounds: null, + // bounds cache of element body, w/o overlay + overlayBounds: null, + // bounds cache of element body, including overlay + labelBounds: { + // bounds cache of labels + all: null, + source: null, + target: null, + main: null + }, + arrowBounds: { + // bounds cache of edge arrows + source: null, + target: null, + "mid-source": null, + "mid-target": null + } + }; + if (i.position.x == null && (i.position.x = 0), i.position.y == null && (i.position.y = 0), r.renderedPosition) { + var s = r.renderedPosition, o = e.pan(), l = e.zoom(); + i.position = { + x: (s.x - o.x) / l, + y: (s.y - o.y) / l + }; + } + var u = []; + te(r.classes) ? u = r.classes : j(r.classes) && (u = r.classes.split(/\s+/)); + for (var f = 0, h = u.length; f < h; f++) { + var c = u[f]; + !c || c === "" || i.classes.add(c); + } + this.createEmitter(); + var v = r.style || r.css; + v && (ft("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."), this.style(v)), (a === void 0 || a) && this.restore(); + }, ps = function(e) { + return e = { + bfs: e.bfs || !e.dfs, + dfs: e.dfs || !e.bfs + }, function(a, n, i) { + var s; + L(a) && !ge(a) && (s = a, a = s.roots || s.root, n = s.visit, i = s.directed), i = arguments.length === 2 && !Y(n) ? n : i, n = Y(n) ? n : function() { + }; + for (var o = this._private.cy, l = a = j(a) ? this.filter(a) : a, u = [], f = [], h = {}, c = {}, v = {}, d = 0, g, y = this.byGroup(), p = y.nodes, m = y.edges, b = 0; b < l.length; b++) { + var E = l[b], M = E.id(); + E.isNode() && (u.unshift(E), e.bfs && (v[M] = !0, f.push(E)), c[M] = 0); + } + for (var A = function() { + var X = e.bfs ? u.shift() : u.pop(), z = X.id(); + if (e.dfs) { + if (v[z]) + return "continue"; + v[z] = !0, f.push(X); + } + var re = c[z], W = h[z], Z = W != null ? W.source() : null, ie = W != null ? W.target() : null, oe = W == null ? void 0 : X.same(Z) ? ie[0] : Z[0], de = void 0; + if (de = n(X, W, oe, d++, re), de === !0) + return g = X, "break"; + if (de === !1) + return "break"; + for (var se = X.connectedEdges().filter(function(ye) { + return (!i || ye.source().same(X)) && m.has(ye); + }), ve = 0; ve < se.length; ve++) { + var we = se[ve], Te = we.connectedNodes().filter(function(ye) { + return !ye.same(X) && p.has(ye); + }), Ee = Te.id(); + Te.length !== 0 && !v[Ee] && (Te = Te[0], u.push(Te), e.bfs && (v[Ee] = !0, f.push(Te)), h[Ee] = we, c[Ee] = c[z] + 1); + } + }; u.length !== 0; ) { + var w = A(); + if (w !== "continue" && w === "break") + break; + } + for (var I = o.collection(), C = 0; C < f.length; C++) { + var B = f[C], F = h[B.id()]; + F != null && I.push(F), I.push(B); + } + return { + path: o.collection(I), + found: o.collection(g) + }; + }; + }, Ia = { + breadthFirstSearch: ps({ + bfs: !0 + }), + depthFirstSearch: ps({ + dfs: !0 + }) + }; + Ia.bfs = Ia.breadthFirstSearch, Ia.dfs = Ia.depthFirstSearch; + var rf = sl(function(t, e) { + (function() { + var r, a, n, i, s, o, l, u, f, h, c, v, d, g, y; + n = Math.floor, h = Math.min, a = function(p, m) { + return p < m ? -1 : p > m ? 1 : 0; + }, f = function(p, m, b, E, M) { + var A; + if (b == null && (b = 0), M == null && (M = a), b < 0) + throw new Error("lo must be non-negative"); + for (E == null && (E = p.length); b < E; ) + A = n((b + E) / 2), M(m, p[A]) < 0 ? E = A : b = A + 1; + return [].splice.apply(p, [b, b - b].concat(m)), m; + }, o = function(p, m, b) { + return b == null && (b = a), p.push(m), g(p, 0, p.length - 1, b); + }, s = function(p, m) { + var b, E; + return m == null && (m = a), b = p.pop(), p.length ? (E = p[0], p[0] = b, y(p, 0, m)) : E = b, E; + }, u = function(p, m, b) { + var E; + return b == null && (b = a), E = p[0], p[0] = m, y(p, 0, b), E; + }, l = function(p, m, b) { + var E; + return b == null && (b = a), p.length && b(p[0], m) < 0 && (E = [p[0], m], m = E[0], p[0] = E[1], y(p, 0, b)), m; + }, i = function(p, m) { + var b, E, M, A, w, I; + for (m == null && (m = a), A = function() { + I = []; + for (var C = 0, B = n(p.length / 2); 0 <= B ? C < B : C > B; 0 <= B ? C++ : C--) + I.push(C); + return I; + }.apply(this).reverse(), w = [], E = 0, M = A.length; E < M; E++) + b = A[E], w.push(y(p, b, m)); + return w; + }, d = function(p, m, b) { + var E; + if (b == null && (b = a), E = p.indexOf(m), E !== -1) + return g(p, 0, E, b), y(p, E, b); + }, c = function(p, m, b) { + var E, M, A, w, I; + if (b == null && (b = a), M = p.slice(0, m), !M.length) + return M; + for (i(M, b), I = p.slice(m), A = 0, w = I.length; A < w; A++) + E = I[A], l(M, E, b); + return M.sort(b).reverse(); + }, v = function(p, m, b) { + var E, M, A, w, I, C, B, F, R; + if (b == null && (b = a), m * 10 <= p.length) { + if (A = p.slice(0, m).sort(b), !A.length) + return A; + for (M = A[A.length - 1], B = p.slice(m), w = 0, C = B.length; w < C; w++) + E = B[w], b(E, M) < 0 && (f(A, E, 0, null, b), A.pop(), M = A[A.length - 1]); + return A; + } + for (i(p, b), R = [], I = 0, F = h(m, p.length); 0 <= F ? I < F : I > F; 0 <= F ? ++I : --I) + R.push(s(p, b)); + return R; + }, g = function(p, m, b, E) { + var M, A, w; + for (E == null && (E = a), M = p[b]; b > m; ) { + if (w = b - 1 >> 1, A = p[w], E(M, A) < 0) { + p[b] = A, b = w; + continue; + } + break; + } + return p[b] = M; + }, y = function(p, m, b) { + var E, M, A, w, I; + for (b == null && (b = a), M = p.length, I = m, A = p[m], E = 2 * m + 1; E < M; ) + w = E + 1, w < M && !(b(p[E], p[w]) < 0) && (E = w), p[m] = p[E], m = E, E = 2 * m + 1; + return p[m] = A, g(p, I, m, b); + }, r = function() { + p.push = o, p.pop = s, p.replace = u, p.pushpop = l, p.heapify = i, p.updateItem = d, p.nlargest = c, p.nsmallest = v; + function p(m) { + this.cmp = m ?? a, this.nodes = []; + } + return p.prototype.push = function(m) { + return o(this.nodes, m, this.cmp); + }, p.prototype.pop = function() { + return s(this.nodes, this.cmp); + }, p.prototype.peek = function() { + return this.nodes[0]; + }, p.prototype.contains = function(m) { + return this.nodes.indexOf(m) !== -1; + }, p.prototype.replace = function(m) { + return u(this.nodes, m, this.cmp); + }, p.prototype.pushpop = function(m) { + return l(this.nodes, m, this.cmp); + }, p.prototype.heapify = function() { + return i(this.nodes, this.cmp); + }, p.prototype.updateItem = function(m) { + return d(this.nodes, m, this.cmp); + }, p.prototype.clear = function() { + return this.nodes = []; + }, p.prototype.empty = function() { + return this.nodes.length === 0; + }, p.prototype.size = function() { + return this.nodes.length; + }, p.prototype.clone = function() { + var m; + return m = new p(), m.nodes = this.nodes.slice(0), m; + }, p.prototype.toArray = function() { + return this.nodes.slice(0); + }, p.prototype.insert = p.prototype.push, p.prototype.top = p.prototype.peek, p.prototype.front = p.prototype.peek, p.prototype.has = p.prototype.contains, p.prototype.copy = p.prototype.clone, p; + }(), function(p, m) { + return t.exports = m(); + }(this, function() { + return r; + }); + }).call(Sa); + }), Ra = rf, af = Lt({ + root: null, + weight: function(e) { + return 1; + }, + directed: !1 + }), nf = { + dijkstra: function(e) { + if (!L(e)) { + var r = arguments; + e = { + root: r[0], + weight: r[1], + directed: r[2] + }; + } + var a = af(e), n = a.root, i = a.weight, s = a.directed, o = this, l = i, u = j(n) ? this.filter(n)[0] : n[0], f = {}, h = {}, c = {}, v = this.byGroup(), d = v.nodes, g = v.edges; + g.unmergeBy(function(re) { + return re.isLoop(); + }); + for (var y = function(W) { + return f[W.id()]; + }, p = function(W, Z) { + f[W.id()] = Z, m.updateItem(W); + }, m = new Ra(function(re, W) { + return y(re) - y(W); + }), b = 0; b < d.length; b++) { + var E = d[b]; + f[E.id()] = E.same(u) ? 0 : 1 / 0, m.push(E); + } + for (var M = function(W, Z) { + for (var ie = (s ? W.edgesTo(Z) : W.edgesWith(Z)).intersect(g), oe = 1 / 0, de, se = 0; se < ie.length; se++) { + var ve = ie[se], we = l(ve); + (we < oe || !de) && (oe = we, de = ve); + } + return { + edge: de, + dist: oe + }; + }; m.size() > 0; ) { + var A = m.pop(), w = y(A), I = A.id(); + if (c[I] = w, w !== 1 / 0) + for (var C = A.neighborhood().intersect(d), B = 0; B < C.length; B++) { + var F = C[B], R = F.id(), X = M(A, F), z = w + X.dist; + z < y(F) && (p(F, z), h[R] = { + node: A, + edge: X.edge + }); + } + } + return { + distanceTo: function(W) { + var Z = j(W) ? d.filter(W)[0] : W[0]; + return c[Z.id()]; + }, + pathTo: function(W) { + var Z = j(W) ? d.filter(W)[0] : W[0], ie = [], oe = Z, de = oe.id(); + if (Z.length > 0) + for (ie.unshift(Z); h[de]; ) { + var se = h[de]; + ie.unshift(se.edge), ie.unshift(se.node), oe = se.node, de = oe.id(); + } + return o.spawn(ie); + } + }; + } + }, sf = { + // kruskal's algorithm (finds min spanning tree, assuming undirected graph) + // implemented from pseudocode from wikipedia + kruskal: function(e) { + e = e || function(b) { + return 1; + }; + for (var r = this.byGroup(), a = r.nodes, n = r.edges, i = a.length, s = new Array(i), o = a, l = function(E) { + for (var M = 0; M < s.length; M++) { + var A = s[M]; + if (A.has(E)) + return M; + } + }, u = 0; u < i; u++) + s[u] = this.spawn(a[u]); + for (var f = n.sort(function(b, E) { + return e(b) - e(E); + }), h = 0; h < f.length; h++) { + var c = f[h], v = c.source()[0], d = c.target()[0], g = l(v), y = l(d), p = s[g], m = s[y]; + g !== y && (o.merge(c), p.merge(m), s.splice(y, 1)); + } + return o; + } + }, of = Lt({ + root: null, + goal: null, + weight: function(e) { + return 1; + }, + heuristic: function(e) { + return 0; + }, + directed: !1 + }), uf = { + // Implemented from pseudocode from wikipedia + aStar: function(e) { + var r = this.cy(), a = of(e), n = a.root, i = a.goal, s = a.heuristic, o = a.directed, l = a.weight; + n = r.collection(n)[0], i = r.collection(i)[0]; + var u = n.id(), f = i.id(), h = {}, c = {}, v = {}, d = new Ra(function(de, se) { + return c[de.id()] - c[se.id()]; + }), g = new Jr(), y = {}, p = {}, m = function(se, ve) { + d.push(se), g.add(ve); + }, b, E, M = function() { + b = d.pop(), E = b.id(), g.delete(E); + }, A = function(se) { + return g.has(se); + }; + m(n, u), h[u] = 0, c[u] = s(n); + for (var w = 0; d.size() > 0; ) { + if (M(), w++, E === f) { + for (var I = [], C = i, B = f, F = p[B]; I.unshift(C), F != null && I.unshift(F), C = y[B], C != null; ) + B = C.id(), F = p[B]; + return { + found: !0, + distance: h[E], + path: this.spawn(I), + steps: w + }; + } + v[E] = !0; + for (var R = b._private.edges, X = 0; X < R.length; X++) { + var z = R[X]; + if (this.hasElementWithId(z.id()) && !(o && z.data("source") !== E)) { + var re = z.source(), W = z.target(), Z = re.id() !== E ? re : W, ie = Z.id(); + if (this.hasElementWithId(ie) && !v[ie]) { + var oe = h[E] + l(z); + if (!A(ie)) { + h[ie] = oe, c[ie] = oe + s(Z), m(Z, ie), y[ie] = b, p[ie] = z; + continue; + } + oe < h[ie] && (h[ie] = oe, c[ie] = oe + s(Z), y[ie] = b, p[ie] = z); + } + } + } + } + return { + found: !1, + distance: void 0, + path: void 0, + steps: w + }; + } + }, lf = Lt({ + weight: function(e) { + return 1; + }, + directed: !1 + }), ff = { + // Implemented from pseudocode from wikipedia + floydWarshall: function(e) { + for (var r = this.cy(), a = lf(e), n = a.weight, i = a.directed, s = n, o = this.byGroup(), l = o.nodes, u = o.edges, f = l.length, h = f * f, c = function(we) { + return l.indexOf(we); + }, v = function(we) { + return l[we]; + }, d = new Array(h), g = 0; g < h; g++) { + var y = g % f, p = (g - y) / f; + p === y ? d[g] = 0 : d[g] = 1 / 0; + } + for (var m = new Array(h), b = new Array(h), E = 0; E < u.length; E++) { + var M = u[E], A = M.source()[0], w = M.target()[0]; + if (A !== w) { + var I = c(A), C = c(w), B = I * f + C, F = s(M); + if (d[B] > F && (d[B] = F, m[B] = C, b[B] = M), !i) { + var R = C * f + I; + !i && d[R] > F && (d[R] = F, m[R] = I, b[R] = M); + } + } + } + for (var X = 0; X < f; X++) + for (var z = 0; z < f; z++) + for (var re = z * f + X, W = 0; W < f; W++) { + var Z = z * f + W, ie = X * f + W; + d[re] + d[ie] < d[Z] && (d[Z] = d[re] + d[ie], m[Z] = m[re]); + } + var oe = function(we) { + return (j(we) ? r.filter(we) : we)[0]; + }, de = function(we) { + return c(oe(we)); + }, se = { + distance: function(we, Te) { + var Ee = de(we), ye = de(Te); + return d[Ee * f + ye]; + }, + path: function(we, Te) { + var Ee = de(we), ye = de(Te), ae = v(Ee); + if (Ee === ye) + return ae.collection(); + if (m[Ee * f + ye] == null) + return r.collection(); + var xe = r.collection(), Ce = Ee, Oe; + for (xe.merge(ae); Ee !== ye; ) + Ce = Ee, Ee = m[Ee * f + ye], Oe = b[Ce * f + Ee], xe.merge(Oe), xe.merge(v(Ee)); + return xe; + } + }; + return se; + } + // floydWarshall + }, hf = Lt({ + weight: function(e) { + return 1; + }, + directed: !1, + root: null + }), cf = { + // Implemented from pseudocode from wikipedia + bellmanFord: function(e) { + var r = this, a = hf(e), n = a.weight, i = a.directed, s = a.root, o = n, l = this, u = this.cy(), f = this.byGroup(), h = f.edges, c = f.nodes, v = c.length, d = new ur(), g = !1, y = []; + s = u.collection(s)[0], h.unmergeBy(function(Fe) { + return Fe.isLoop(); + }); + for (var p = h.length, m = function(ke) { + var Ge = d.get(ke.id()); + return Ge || (Ge = {}, d.set(ke.id(), Ge)), Ge; + }, b = function(ke) { + return (j(ke) ? u.$(ke) : ke)[0]; + }, E = function(ke) { + return m(b(ke)).dist; + }, M = function(ke) { + for (var Ge = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : s, et = b(ke), We = [], Ye = et; ; ) { + if (Ye == null) + return r.spawn(); + var Se = m(Ye), N = Se.edge, le = Se.pred; + if (We.unshift(Ye[0]), Ye.same(Ge) && We.length > 0) + break; + N != null && We.unshift(N), Ye = le; + } + return l.spawn(We); + }, A = 0; A < v; A++) { + var w = c[A], I = m(w); + w.same(s) ? I.dist = 0 : I.dist = 1 / 0, I.pred = null, I.edge = null; + } + for (var C = !1, B = function(ke, Ge, et, We, Ye, Se) { + var N = We.dist + Se; + N < Ye.dist && !et.same(We.edge) && (Ye.dist = N, Ye.pred = ke, Ye.edge = et, C = !0); + }, F = 1; F < v; F++) { + C = !1; + for (var R = 0; R < p; R++) { + var X = h[R], z = X.source(), re = X.target(), W = o(X), Z = m(z), ie = m(re); + B(z, re, X, Z, ie, W), i || B(re, z, X, ie, Z, W); + } + if (!C) + break; + } + if (C) + for (var oe = [], de = 0; de < p; de++) { + var se = h[de], ve = se.source(), we = se.target(), Te = o(se), Ee = m(ve).dist, ye = m(we).dist; + if (Ee + Te < ye || !i && ye + Te < Ee) + if (g || (ft("Graph contains a negative weight cycle for Bellman-Ford"), g = !0), e.findNegativeWeightCycles !== !1) { + var ae = []; + Ee + Te < ye && ae.push(ve), !i && ye + Te < Ee && ae.push(we); + for (var xe = ae.length, Ce = 0; Ce < xe; Ce++) { + var Oe = ae[Ce], Ie = [Oe]; + Ie.push(m(Oe).edge); + for (var He = m(Oe).pred; Ie.indexOf(He) === -1; ) + Ie.push(He), Ie.push(m(He).edge), He = m(He).pred; + Ie = Ie.slice(Ie.indexOf(He)); + for (var qe = Ie[0].id(), Re = 0, Me = 2; Me < Ie.length; Me += 2) + Ie[Me].id() < qe && (qe = Ie[Me].id(), Re = Me); + Ie = Ie.slice(Re).concat(Ie.slice(0, Re)), Ie.push(Ie[0]); + var Ve = Ie.map(function(Fe) { + return Fe.id(); + }).join(","); + oe.indexOf(Ve) === -1 && (y.push(l.spawn(Ie)), oe.push(Ve)); + } + } else + break; + } + return { + distanceTo: E, + pathTo: M, + hasNegativeWeightCycle: g, + negativeWeightCycles: y + }; + } + // bellmanFord + }, vf = Math.sqrt(2), df = function(e, r, a) { + a.length === 0 && xt("Karger-Stein must be run on a connected (sub)graph"); + for (var n = a[e], i = n[1], s = n[2], o = r[i], l = r[s], u = a, f = u.length - 1; f >= 0; f--) { + var h = u[f], c = h[1], v = h[2]; + (r[c] === o && r[v] === l || r[c] === l && r[v] === o) && u.splice(f, 1); + } + for (var d = 0; d < u.length; d++) { + var g = u[d]; + g[1] === l ? (u[d] = g.slice(), u[d][1] = o) : g[2] === l && (u[d] = g.slice(), u[d][2] = o); + } + for (var y = 0; y < r.length; y++) + r[y] === l && (r[y] = o); + return u; + }, si = function(e, r, a, n) { + for (; a > n; ) { + var i = Math.floor(Math.random() * r.length); + r = df(i, e, r), a--; + } + return r; + }, gf = { + // Computes the minimum cut of an undirected graph + // Returns the correct answer with high probability + kargerStein: function() { + var e = this, r = this.byGroup(), a = r.nodes, n = r.edges; + n.unmergeBy(function(ie) { + return ie.isLoop(); + }); + var i = a.length, s = n.length, o = Math.ceil(Math.pow(Math.log(i) / Math.LN2, 2)), l = Math.floor(i / vf); + if (i < 2) { + xt("At least 2 nodes are required for Karger-Stein algorithm"); + return; + } + for (var u = [], f = 0; f < s; f++) { + var h = n[f]; + u.push([f, a.indexOf(h.source()), a.indexOf(h.target())]); + } + for (var c = 1 / 0, v = [], d = new Array(i), g = new Array(i), y = new Array(i), p = function(oe, de) { + for (var se = 0; se < i; se++) + de[se] = oe[se]; + }, m = 0; m <= o; m++) { + for (var b = 0; b < i; b++) + g[b] = b; + var E = si(g, u.slice(), i, l), M = E.slice(); + p(g, y); + var A = si(g, E, l, 2), w = si(y, M, l, 2); + A.length <= w.length && A.length < c ? (c = A.length, v = A, p(g, d)) : w.length <= A.length && w.length < c && (c = w.length, v = w, p(y, d)); + } + for (var I = this.spawn(v.map(function(ie) { + return n[ie[0]]; + })), C = this.spawn(), B = this.spawn(), F = d[0], R = 0; R < d.length; R++) { + var X = d[R], z = a[R]; + X === F ? C.merge(z) : B.merge(z); + } + var re = function(oe) { + var de = e.spawn(); + return oe.forEach(function(se) { + de.merge(se), se.connectedEdges().forEach(function(ve) { + e.contains(ve) && !I.contains(ve) && de.merge(ve); + }); + }), de; + }, W = [re(C), re(B)], Z = { + cut: I, + components: W, + // n.b. partitions are included to be compatible with the old api spec + // (could be removed in a future major version) + partition1: C, + partition2: B + }; + return Z; + } + }, pf = function(e) { + return { + x: e.x, + y: e.y + }; + }, dn = function(e, r, a) { + return { + x: e.x * r + a.x, + y: e.y * r + a.y + }; + }, ys = function(e, r, a) { + return { + x: (e.x - a.x) / r, + y: (e.y - a.y) / r + }; + }, jr = function(e) { + return { + x: e[0], + y: e[1] + }; + }, yf = function(e) { + for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = 1 / 0, i = r; i < a; i++) { + var s = e[i]; + isFinite(s) && (n = Math.min(s, n)); + } + return n; + }, mf = function(e) { + for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = -1 / 0, i = r; i < a; i++) { + var s = e[i]; + isFinite(s) && (n = Math.max(s, n)); + } + return n; + }, bf = function(e) { + for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = 0, i = 0, s = r; s < a; s++) { + var o = e[s]; + isFinite(o) && (n += o, i++); + } + return n / i; + }, Ef = function(e) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0; + n ? e = e.slice(r, a) : (a < e.length && e.splice(a, e.length - a), r > 0 && e.splice(0, r)); + for (var o = 0, l = e.length - 1; l >= 0; l--) { + var u = e[l]; + s ? isFinite(u) || (e[l] = -1 / 0, o++) : e.splice(l, 1); + } + i && e.sort(function(c, v) { + return c - v; + }); + var f = e.length, h = Math.floor(f / 2); + return f % 2 !== 0 ? e[h + 1 + o] : (e[h - 1 + o] + e[h + o]) / 2; + }, wf = function(e) { + return Math.PI * e / 180; + }, gn = function(e, r) { + return Math.atan2(r, e) - Math.PI / 2; + }, oi = Math.log2 || function(t) { + return Math.log(t) / Math.log(2); + }, ms = function(e) { + return e > 0 ? 1 : e < 0 ? -1 : 0; + }, Pr = function(e, r) { + return Math.sqrt(Br(e, r)); + }, Br = function(e, r) { + var a = r.x - e.x, n = r.y - e.y; + return a * a + n * n; + }, xf = function(e) { + for (var r = e.length, a = 0, n = 0; n < r; n++) + a += e[n]; + for (var i = 0; i < r; i++) + e[i] = e[i] / a; + return e; + }, St = function(e, r, a, n) { + return (1 - n) * (1 - n) * e + 2 * (1 - n) * n * r + n * n * a; + }, ea = function(e, r, a, n) { + return { + x: St(e.x, r.x, a.x, n), + y: St(e.y, r.y, a.y, n) + }; + }, Tf = function(e, r, a, n) { + var i = { + x: r.x - e.x, + y: r.y - e.y + }, s = Pr(e, r), o = { + x: i.x / s, + y: i.y / s + }; + return a = a ?? 0, n = n ?? a * s, { + x: e.x + o.x * n, + y: e.y + o.y * n + }; + }, ka = function(e, r, a) { + return Math.max(e, Math.min(a, r)); + }, Ut = function(e) { + if (e == null) + return { + x1: 1 / 0, + y1: 1 / 0, + x2: -1 / 0, + y2: -1 / 0, + w: 0, + h: 0 + }; + if (e.x1 != null && e.y1 != null) { + if (e.x2 != null && e.y2 != null && e.x2 >= e.x1 && e.y2 >= e.y1) + return { + x1: e.x1, + y1: e.y1, + x2: e.x2, + y2: e.y2, + w: e.x2 - e.x1, + h: e.y2 - e.y1 + }; + if (e.w != null && e.h != null && e.w >= 0 && e.h >= 0) + return { + x1: e.x1, + y1: e.y1, + x2: e.x1 + e.w, + y2: e.y1 + e.h, + w: e.w, + h: e.h + }; + } + }, Cf = function(e) { + return { + x1: e.x1, + x2: e.x2, + w: e.w, + y1: e.y1, + y2: e.y2, + h: e.h + }; + }, Df = function(e) { + e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; + }, Sf = function(e, r) { + e.x1 = Math.min(e.x1, r.x1), e.x2 = Math.max(e.x2, r.x2), e.w = e.x2 - e.x1, e.y1 = Math.min(e.y1, r.y1), e.y2 = Math.max(e.y2, r.y2), e.h = e.y2 - e.y1; + }, Lf = function(e, r, a) { + e.x1 = Math.min(e.x1, r), e.x2 = Math.max(e.x2, r), e.w = e.x2 - e.x1, e.y1 = Math.min(e.y1, a), e.y2 = Math.max(e.y2, a), e.h = e.y2 - e.y1; + }, pn = function(e) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + return e.x1 -= r, e.x2 += r, e.y1 -= r, e.y2 += r, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; + }, ui = function(e) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0], a, n, i, s; + if (r.length === 1) + a = n = i = s = r[0]; + else if (r.length === 2) + a = i = r[0], s = n = r[1]; + else if (r.length === 4) { + var o = x(r, 4); + a = o[0], n = o[1], i = o[2], s = o[3]; + } + return e.x1 -= s, e.x2 += n, e.y1 -= a, e.y2 += i, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1, e; + }, bs = function(e, r) { + e.x1 = r.x1, e.y1 = r.y1, e.x2 = r.x2, e.y2 = r.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1; + }, li = function(e, r) { + return !(e.x1 > r.x2 || r.x1 > e.x2 || e.x2 < r.x1 || r.x2 < e.x1 || e.y2 < r.y1 || r.y2 < e.y1 || e.y1 > r.y2 || r.y1 > e.y2); + }, ta = function(e, r, a) { + return e.x1 <= r && r <= e.x2 && e.y1 <= a && a <= e.y2; + }, Af = function(e, r) { + return ta(e, r.x, r.y); + }, Es = function(e, r) { + return ta(e, r.x1, r.y1) && ta(e, r.x2, r.y2); + }, ws = function(e, r, a, n, i, s, o) { + var l = Fa(i, s), u = i / 2, f = s / 2, h; + { + var c = a - u + l - o, v = n - f - o, d = a + u - l + o, g = v; + if (h = Tr(e, r, a, n, c, v, d, g, !1), h.length > 0) + return h; + } + { + var y = a + u + o, p = n - f + l - o, m = y, b = n + f - l + o; + if (h = Tr(e, r, a, n, y, p, m, b, !1), h.length > 0) + return h; + } + { + var E = a - u + l - o, M = n + f + o, A = a + u - l + o, w = M; + if (h = Tr(e, r, a, n, E, M, A, w, !1), h.length > 0) + return h; + } + { + var I = a - u - o, C = n - f + l - o, B = I, F = n + f - l + o; + if (h = Tr(e, r, a, n, I, C, B, F, !1), h.length > 0) + return h; + } + var R; + { + var X = a - u + l, z = n - f + l; + if (R = Pa(e, r, a, n, X, z, l + o), R.length > 0 && R[0] <= X && R[1] <= z) + return [R[0], R[1]]; + } + { + var re = a + u - l, W = n - f + l; + if (R = Pa(e, r, a, n, re, W, l + o), R.length > 0 && R[0] >= re && R[1] <= W) + return [R[0], R[1]]; + } + { + var Z = a + u - l, ie = n + f - l; + if (R = Pa(e, r, a, n, Z, ie, l + o), R.length > 0 && R[0] >= Z && R[1] >= ie) + return [R[0], R[1]]; + } + { + var oe = a - u + l, de = n + f - l; + if (R = Pa(e, r, a, n, oe, de, l + o), R.length > 0 && R[0] <= oe && R[1] >= de) + return [R[0], R[1]]; + } + return []; + }, Of = function(e, r, a, n, i, s, o) { + var l = o, u = Math.min(a, i), f = Math.max(a, i), h = Math.min(n, s), c = Math.max(n, s); + return u - l <= e && e <= f + l && h - l <= r && r <= c + l; + }, Nf = function(e, r, a, n, i, s, o, l, u) { + var f = { + x1: Math.min(a, o, i) - u, + x2: Math.max(a, o, i) + u, + y1: Math.min(n, l, s) - u, + y2: Math.max(n, l, s) + u + }; + return !(e < f.x1 || e > f.x2 || r < f.y1 || r > f.y2); + }, Mf = function(e, r, a, n) { + a -= n; + var i = r * r - 4 * e * a; + if (i < 0) + return []; + var s = Math.sqrt(i), o = 2 * e, l = (-r + s) / o, u = (-r - s) / o; + return [l, u]; + }, If = function(e, r, a, n, i) { + var s = 1e-5; + e === 0 && (e = s), r /= e, a /= e, n /= e; + var o, l, u, f, h, c, v, d; + if (l = (3 * a - r * r) / 9, u = -(27 * n) + r * (9 * a - 2 * (r * r)), u /= 54, o = l * l * l + u * u, i[1] = 0, v = r / 3, o > 0) { + h = u + Math.sqrt(o), h = h < 0 ? -Math.pow(-h, 1 / 3) : Math.pow(h, 1 / 3), c = u - Math.sqrt(o), c = c < 0 ? -Math.pow(-c, 1 / 3) : Math.pow(c, 1 / 3), i[0] = -v + h + c, v += (h + c) / 2, i[4] = i[2] = -v, v = Math.sqrt(3) * (-c + h) / 2, i[3] = v, i[5] = -v; + return; + } + if (i[5] = i[3] = 0, o === 0) { + d = u < 0 ? -Math.pow(-u, 1 / 3) : Math.pow(u, 1 / 3), i[0] = -v + 2 * d, i[4] = i[2] = -(d + v); + return; + } + l = -l, f = l * l * l, f = Math.acos(u / Math.sqrt(f)), d = 2 * Math.sqrt(l), i[0] = -v + d * Math.cos(f / 3), i[2] = -v + d * Math.cos((f + 2 * Math.PI) / 3), i[4] = -v + d * Math.cos((f + 4 * Math.PI) / 3); + }, Rf = function(e, r, a, n, i, s, o, l) { + var u = 1 * a * a - 4 * a * i + 2 * a * o + 4 * i * i - 4 * i * o + o * o + n * n - 4 * n * s + 2 * n * l + 4 * s * s - 4 * s * l + l * l, f = 1 * 9 * a * i - 3 * a * a - 3 * a * o - 6 * i * i + 3 * i * o + 9 * n * s - 3 * n * n - 3 * n * l - 6 * s * s + 3 * s * l, h = 1 * 3 * a * a - 6 * a * i + a * o - a * e + 2 * i * i + 2 * i * e - o * e + 3 * n * n - 6 * n * s + n * l - n * r + 2 * s * s + 2 * s * r - l * r, c = 1 * a * i - a * a + a * e - i * e + n * s - n * n + n * r - s * r, v = []; + If(u, f, h, c, v); + for (var d = 1e-7, g = [], y = 0; y < 6; y += 2) + Math.abs(v[y + 1]) < d && v[y] >= 0 && v[y] <= 1 && g.push(v[y]); + g.push(1), g.push(0); + for (var p = -1, m, b, E, M = 0; M < g.length; M++) + m = Math.pow(1 - g[M], 2) * a + 2 * (1 - g[M]) * g[M] * i + g[M] * g[M] * o, b = Math.pow(1 - g[M], 2) * n + 2 * (1 - g[M]) * g[M] * s + g[M] * g[M] * l, E = Math.pow(m - e, 2) + Math.pow(b - r, 2), p >= 0 ? E < p && (p = E) : p = E; + return p; + }, kf = function(e, r, a, n, i, s) { + var o = [e - a, r - n], l = [i - a, s - n], u = l[0] * l[0] + l[1] * l[1], f = o[0] * o[0] + o[1] * o[1], h = o[0] * l[0] + o[1] * l[1], c = h * h / u; + return h < 0 ? f : c > u ? (e - i) * (e - i) + (r - s) * (r - s) : f - c; + }, Yt = function(e, r, a) { + for (var n, i, s, o, l, u = 0, f = 0; f < a.length / 2; f++) + if (n = a[f * 2], i = a[f * 2 + 1], f + 1 < a.length / 2 ? (s = a[(f + 1) * 2], o = a[(f + 1) * 2 + 1]) : (s = a[(f + 1 - a.length / 2) * 2], o = a[(f + 1 - a.length / 2) * 2 + 1]), !(n == e && s == e)) + if (n >= e && e >= s || n <= e && e <= s) + l = (e - n) / (s - n) * (o - i) + i, l > r && u++; + else + continue; + return u % 2 !== 0; + }, gr = function(e, r, a, n, i, s, o, l, u) { + var f = new Array(a.length), h; + l[0] != null ? (h = Math.atan(l[1] / l[0]), l[0] < 0 ? h = h + Math.PI / 2 : h = -h - Math.PI / 2) : h = l; + for (var c = Math.cos(-h), v = Math.sin(-h), d = 0; d < f.length / 2; d++) + f[d * 2] = s / 2 * (a[d * 2] * c - a[d * 2 + 1] * v), f[d * 2 + 1] = o / 2 * (a[d * 2 + 1] * c + a[d * 2] * v), f[d * 2] += n, f[d * 2 + 1] += i; + var g; + if (u > 0) { + var y = Ts(f, -u); + g = xs(y); + } else + g = f; + return Yt(e, r, g); + }, Pf = function(e, r, a, n, i, s, o) { + for (var l = new Array(a.length), u = s / 2, f = o / 2, h = ci(s, o), c = h * h, v = 0; v < a.length / 4; v++) { + var d = void 0, g = void 0; + v === 0 ? d = a.length - 2 : d = v * 4 - 2, g = v * 4 + 2; + var y = n + u * a[v * 4], p = i + f * a[v * 4 + 1], m = -a[d] * a[g] - a[d + 1] * a[g + 1], b = h / Math.tan(Math.acos(m) / 2), E = y - b * a[d], M = p - b * a[d + 1], A = y + b * a[g], w = p + b * a[g + 1]; + l[v * 4] = E, l[v * 4 + 1] = M, l[v * 4 + 2] = A, l[v * 4 + 3] = w; + var I = a[d + 1], C = -a[d], B = I * a[g] + C * a[g + 1]; + B < 0 && (I *= -1, C *= -1); + var F = E + I * h, R = M + C * h, X = Math.pow(F - e, 2) + Math.pow(R - r, 2); + if (X <= c) + return !0; + } + return Yt(e, r, l); + }, xs = function(e) { + for (var r = new Array(e.length / 2), a, n, i, s, o, l, u, f, h = 0; h < e.length / 4; h++) { + a = e[h * 4], n = e[h * 4 + 1], i = e[h * 4 + 2], s = e[h * 4 + 3], h < e.length / 4 - 1 ? (o = e[(h + 1) * 4], l = e[(h + 1) * 4 + 1], u = e[(h + 1) * 4 + 2], f = e[(h + 1) * 4 + 3]) : (o = e[0], l = e[1], u = e[2], f = e[3]); + var c = Tr(a, n, i, s, o, l, u, f, !0); + r[h * 2] = c[0], r[h * 2 + 1] = c[1]; + } + return r; + }, Ts = function(e, r) { + for (var a = new Array(e.length * 2), n, i, s, o, l = 0; l < e.length / 2; l++) { + n = e[l * 2], i = e[l * 2 + 1], l < e.length / 2 - 1 ? (s = e[(l + 1) * 2], o = e[(l + 1) * 2 + 1]) : (s = e[0], o = e[1]); + var u = o - i, f = -(s - n), h = Math.sqrt(u * u + f * f), c = u / h, v = f / h; + a[l * 4] = n + c * r, a[l * 4 + 1] = i + v * r, a[l * 4 + 2] = s + c * r, a[l * 4 + 3] = o + v * r; + } + return a; + }, Bf = function(e, r, a, n, i, s) { + var o = a - e, l = n - r; + o /= i, l /= s; + var u = Math.sqrt(o * o + l * l), f = u - 1; + if (f < 0) + return []; + var h = f / u; + return [(a - e) * h + e, (n - r) * h + r]; + }, Fr = function(e, r, a, n, i, s, o) { + return e -= i, r -= s, e /= a / 2 + o, r /= n / 2 + o, e * e + r * r <= 1; + }, Pa = function(e, r, a, n, i, s, o) { + var l = [a - e, n - r], u = [e - i, r - s], f = l[0] * l[0] + l[1] * l[1], h = 2 * (u[0] * l[0] + u[1] * l[1]), c = u[0] * u[0] + u[1] * u[1] - o * o, v = h * h - 4 * f * c; + if (v < 0) + return []; + var d = (-h + Math.sqrt(v)) / (2 * f), g = (-h - Math.sqrt(v)) / (2 * f), y = Math.min(d, g), p = Math.max(d, g), m = []; + if (y >= 0 && y <= 1 && m.push(y), p >= 0 && p <= 1 && m.push(p), m.length === 0) + return []; + var b = m[0] * l[0] + e, E = m[0] * l[1] + r; + if (m.length > 1) { + if (m[0] == m[1]) + return [b, E]; + var M = m[1] * l[0] + e, A = m[1] * l[1] + r; + return [b, E, M, A]; + } else + return [b, E]; + }, fi = function(e, r, a) { + return r <= e && e <= a || a <= e && e <= r ? e : e <= r && r <= a || a <= r && r <= e ? r : a; + }, Tr = function(e, r, a, n, i, s, o, l, u) { + var f = e - i, h = a - e, c = o - i, v = r - s, d = n - r, g = l - s, y = c * v - g * f, p = h * v - d * f, m = g * h - c * d; + if (m !== 0) { + var b = y / m, E = p / m, M = 1e-3, A = 0 - M, w = 1 + M; + return A <= b && b <= w && A <= E && E <= w ? [e + b * h, r + b * d] : u ? [e + b * h, r + b * d] : []; + } else + return y === 0 || p === 0 ? fi(e, a, o) === o ? [o, l] : fi(e, a, i) === i ? [i, s] : fi(i, o, a) === a ? [a, n] : [] : []; + }, Ba = function(e, r, a, n, i, s, o, l) { + var u = [], f, h = new Array(a.length), c = !0; + s == null && (c = !1); + var v; + if (c) { + for (var d = 0; d < h.length / 2; d++) + h[d * 2] = a[d * 2] * s + n, h[d * 2 + 1] = a[d * 2 + 1] * o + i; + if (l > 0) { + var g = Ts(h, -l); + v = xs(g); + } else + v = h; + } else + v = a; + for (var y, p, m, b, E = 0; E < v.length / 2; E++) + y = v[E * 2], p = v[E * 2 + 1], E < v.length / 2 - 1 ? (m = v[(E + 1) * 2], b = v[(E + 1) * 2 + 1]) : (m = v[0], b = v[1]), f = Tr(e, r, n, i, y, p, m, b), f.length !== 0 && u.push(f[0], f[1]); + return u; + }, Ff = function(e, r, a, n, i, s, o, l) { + for (var u = [], f, h = new Array(a.length), c = s / 2, v = o / 2, d = ci(s, o), g = 0; g < a.length / 4; g++) { + var y = void 0, p = void 0; + g === 0 ? y = a.length - 2 : y = g * 4 - 2, p = g * 4 + 2; + var m = n + c * a[g * 4], b = i + v * a[g * 4 + 1], E = -a[y] * a[p] - a[y + 1] * a[p + 1], M = d / Math.tan(Math.acos(E) / 2), A = m - M * a[y], w = b - M * a[y + 1], I = m + M * a[p], C = b + M * a[p + 1]; + g === 0 ? (h[a.length - 2] = A, h[a.length - 1] = w) : (h[g * 4 - 2] = A, h[g * 4 - 1] = w), h[g * 4] = I, h[g * 4 + 1] = C; + var B = a[y + 1], F = -a[y], R = B * a[p] + F * a[p + 1]; + R < 0 && (B *= -1, F *= -1); + var X = A + B * d, z = w + F * d; + f = Pa(e, r, n, i, X, z, d), f.length !== 0 && u.push(f[0], f[1]); + } + for (var re = 0; re < h.length / 4; re++) + f = Tr(e, r, n, i, h[re * 4], h[re * 4 + 1], h[re * 4 + 2], h[re * 4 + 3], !1), f.length !== 0 && u.push(f[0], f[1]); + if (u.length > 2) { + for (var W = [u[0], u[1]], Z = Math.pow(W[0] - e, 2) + Math.pow(W[1] - r, 2), ie = 1; ie < u.length / 2; ie++) { + var oe = Math.pow(u[ie * 2] - e, 2) + Math.pow(u[ie * 2 + 1] - r, 2); + oe <= Z && (W[0] = u[ie * 2], W[1] = u[ie * 2 + 1], Z = oe); + } + return W; + } + return u; + }, yn = function(e, r, a) { + var n = [e[0] - r[0], e[1] - r[1]], i = Math.sqrt(n[0] * n[0] + n[1] * n[1]), s = (i - a) / i; + return s < 0 && (s = 1e-5), [r[0] + s * n[0], r[1] + s * n[1]]; + }, $t = function(e, r) { + var a = hi(e, r); + return a = Cs(a), a; + }, Cs = function(e) { + for (var r, a, n = e.length / 2, i = 1 / 0, s = 1 / 0, o = -1 / 0, l = -1 / 0, u = 0; u < n; u++) + r = e[2 * u], a = e[2 * u + 1], i = Math.min(i, r), o = Math.max(o, r), s = Math.min(s, a), l = Math.max(l, a); + for (var f = 2 / (o - i), h = 2 / (l - s), c = 0; c < n; c++) + r = e[2 * c] = e[2 * c] * f, a = e[2 * c + 1] = e[2 * c + 1] * h, i = Math.min(i, r), o = Math.max(o, r), s = Math.min(s, a), l = Math.max(l, a); + if (s < -1) + for (var v = 0; v < n; v++) + a = e[2 * v + 1] = e[2 * v + 1] + (-1 - s); + return e; + }, hi = function(e, r) { + var a = 1 / e * 2 * Math.PI, n = e % 2 === 0 ? Math.PI / 2 + a / 2 : Math.PI / 2; + n += r; + for (var i = new Array(e * 2), s, o = 0; o < e; o++) + s = o * a + n, i[2 * o] = Math.cos(s), i[2 * o + 1] = Math.sin(-s); + return i; + }, Fa = function(e, r) { + return Math.min(e / 4, r / 4, 8); + }, ci = function(e, r) { + return Math.min(e / 10, r / 10, 8); + }, Ds = function() { + return 8; + }, zf = function(e, r, a) { + return [e - 2 * r + a, 2 * (r - e), e]; + }, vi = function(e, r) { + return { + heightOffset: Math.min(15, 0.05 * r), + widthOffset: Math.min(100, 0.25 * e), + ctrlPtOffsetPct: 0.05 + }; + }, Gf = Lt({ + dampingFactor: 0.8, + precision: 1e-6, + iterations: 200, + weight: function(e) { + return 1; + } + }), $f = { + pageRank: function(e) { + for (var r = Gf(e), a = r.dampingFactor, n = r.precision, i = r.iterations, s = r.weight, o = this._private.cy, l = this.byGroup(), u = l.nodes, f = l.edges, h = u.length, c = h * h, v = f.length, d = new Array(c), g = new Array(h), y = (1 - a) / h, p = 0; p < h; p++) { + for (var m = 0; m < h; m++) { + var b = p * h + m; + d[b] = 0; + } + g[p] = 0; + } + for (var E = 0; E < v; E++) { + var M = f[E], A = M.data("source"), w = M.data("target"); + if (A !== w) { + var I = u.indexOfId(A), C = u.indexOfId(w), B = s(M), F = C * h + I; + d[F] += B, g[I] += B; + } + } + for (var R = 1 / h + y, X = 0; X < h; X++) + if (g[X] === 0) + for (var z = 0; z < h; z++) { + var re = z * h + X; + d[re] = R; + } + else + for (var W = 0; W < h; W++) { + var Z = W * h + X; + d[Z] = d[Z] / g[X] + y; + } + for (var ie = new Array(h), oe = new Array(h), de, se = 0; se < h; se++) + ie[se] = 1; + for (var ve = 0; ve < i; ve++) { + for (var we = 0; we < h; we++) + oe[we] = 0; + for (var Te = 0; Te < h; Te++) + for (var Ee = 0; Ee < h; Ee++) { + var ye = Te * h + Ee; + oe[Te] += d[ye] * ie[Ee]; + } + xf(oe), de = ie, ie = oe, oe = de; + for (var ae = 0, xe = 0; xe < h; xe++) { + var Ce = de[xe] - ie[xe]; + ae += Ce * Ce; + } + if (ae < n) + break; + } + var Oe = { + rank: function(He) { + return He = o.collection(He)[0], ie[u.indexOf(He)]; + } + }; + return Oe; + } + // pageRank + }, Ss = Lt({ + root: null, + weight: function(e) { + return 1; + }, + directed: !1, + alpha: 0 + }), ra = { + degreeCentralityNormalized: function(e) { + e = Ss(e); + var r = this.cy(), a = this.nodes(), n = a.length; + if (e.directed) { + for (var f = {}, h = {}, c = 0, v = 0, d = 0; d < n; d++) { + var g = a[d], y = g.id(); + e.root = g; + var p = this.degreeCentrality(e); + c < p.indegree && (c = p.indegree), v < p.outdegree && (v = p.outdegree), f[y] = p.indegree, h[y] = p.outdegree; + } + return { + indegree: function(b) { + return c == 0 ? 0 : (j(b) && (b = r.filter(b)), f[b.id()] / c); + }, + outdegree: function(b) { + return v === 0 ? 0 : (j(b) && (b = r.filter(b)), h[b.id()] / v); + } + }; + } else { + for (var i = {}, s = 0, o = 0; o < n; o++) { + var l = a[o]; + e.root = l; + var u = this.degreeCentrality(e); + s < u.degree && (s = u.degree), i[l.id()] = u.degree; + } + return { + degree: function(b) { + return s === 0 ? 0 : (j(b) && (b = r.filter(b)), i[b.id()] / s); + } + }; + } + }, + // degreeCentralityNormalized + // Implemented from the algorithm in Opsahl's paper + // "Node centrality in weighted networks: Generalizing degree and shortest paths" + // check the heading 2 "Degree" + degreeCentrality: function(e) { + e = Ss(e); + var r = this.cy(), a = this, n = e, i = n.root, s = n.weight, o = n.directed, l = n.alpha; + if (i = r.collection(i)[0], o) { + for (var v = i.connectedEdges(), d = v.filter(function(A) { + return A.target().same(i) && a.has(A); + }), g = v.filter(function(A) { + return A.source().same(i) && a.has(A); + }), y = d.length, p = g.length, m = 0, b = 0, E = 0; E < d.length; E++) + m += s(d[E]); + for (var M = 0; M < g.length; M++) + b += s(g[M]); + return { + indegree: Math.pow(y, 1 - l) * Math.pow(m, l), + outdegree: Math.pow(p, 1 - l) * Math.pow(b, l) + }; + } else { + for (var u = i.connectedEdges().intersection(a), f = u.length, h = 0, c = 0; c < u.length; c++) + h += s(u[c]); + return { + degree: Math.pow(f, 1 - l) * Math.pow(h, l) + }; + } + } + // degreeCentrality + }; + ra.dc = ra.degreeCentrality, ra.dcn = ra.degreeCentralityNormalised = ra.degreeCentralityNormalized; + var Ls = Lt({ + harmonic: !0, + weight: function() { + return 1; + }, + directed: !1, + root: null + }), aa = { + closenessCentralityNormalized: function(e) { + for (var r = Ls(e), a = r.harmonic, n = r.weight, i = r.directed, s = this.cy(), o = {}, l = 0, u = this.nodes(), f = this.floydWarshall({ + weight: n, + directed: i + }), h = 0; h < u.length; h++) { + for (var c = 0, v = u[h], d = 0; d < u.length; d++) + if (h !== d) { + var g = f.distance(v, u[d]); + a ? c += 1 / g : c += g; + } + a || (c = 1 / c), l < c && (l = c), o[v.id()] = c; + } + return { + closeness: function(p) { + return l == 0 ? 0 : (j(p) ? p = s.filter(p)[0].id() : p = p.id(), o[p] / l); + } + }; + }, + // Implemented from pseudocode from wikipedia + closenessCentrality: function(e) { + var r = Ls(e), a = r.root, n = r.weight, i = r.directed, s = r.harmonic; + a = this.filter(a)[0]; + for (var o = this.dijkstra({ + root: a, + weight: n, + directed: i + }), l = 0, u = this.nodes(), f = 0; f < u.length; f++) { + var h = u[f]; + if (!h.same(a)) { + var c = o.distanceTo(h); + s ? l += 1 / c : l += c; + } + } + return s ? l : 1 / l; + } + // closenessCentrality + }; + aa.cc = aa.closenessCentrality, aa.ccn = aa.closenessCentralityNormalised = aa.closenessCentralityNormalized; + var Vf = Lt({ + weight: null, + directed: !1 + }), di = { + // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes + betweennessCentrality: function(e) { + for (var r = Vf(e), a = r.directed, n = r.weight, i = n != null, s = this.cy(), o = this.nodes(), l = {}, u = {}, f = 0, h = { + set: function(b, E) { + u[b] = E, E > f && (f = E); + }, + get: function(b) { + return u[b]; + } + }, c = 0; c < o.length; c++) { + var v = o[c], d = v.id(); + a ? l[d] = v.outgoers().nodes() : l[d] = v.openNeighborhood().nodes(), h.set(d, 0); + } + for (var g = function(b) { + for (var E = o[b].id(), M = [], A = {}, w = {}, I = {}, C = new Ra(function(Ee, ye) { + return I[Ee] - I[ye]; + }), B = 0; B < o.length; B++) { + var F = o[B].id(); + A[F] = [], w[F] = 0, I[F] = 1 / 0; + } + for (w[E] = 1, I[E] = 0, C.push(E); !C.empty(); ) { + var R = C.pop(); + if (M.push(R), i) + for (var X = 0; X < l[R].length; X++) { + var z = l[R][X], re = s.getElementById(R), W = void 0; + re.edgesTo(z).length > 0 ? W = re.edgesTo(z)[0] : W = z.edgesTo(re)[0]; + var Z = n(W); + z = z.id(), I[z] > I[R] + Z && (I[z] = I[R] + Z, C.nodes.indexOf(z) < 0 ? C.push(z) : C.updateItem(z), w[z] = 0, A[z] = []), I[z] == I[R] + Z && (w[z] = w[z] + w[R], A[z].push(R)); + } + else + for (var ie = 0; ie < l[R].length; ie++) { + var oe = l[R][ie].id(); + I[oe] == 1 / 0 && (C.push(oe), I[oe] = I[R] + 1), I[oe] == I[R] + 1 && (w[oe] = w[oe] + w[R], A[oe].push(R)); + } + } + for (var de = {}, se = 0; se < o.length; se++) + de[o[se].id()] = 0; + for (; M.length > 0; ) { + for (var ve = M.pop(), we = 0; we < A[ve].length; we++) { + var Te = A[ve][we]; + de[Te] = de[Te] + w[Te] / w[ve] * (1 + de[ve]); + } + ve != o[b].id() && h.set(ve, h.get(ve) + de[ve]); + } + }, y = 0; y < o.length; y++) + g(y); + var p = { + betweenness: function(b) { + var E = s.collection(b).id(); + return h.get(E); + }, + betweennessNormalized: function(b) { + if (f == 0) + return 0; + var E = s.collection(b).id(); + return h.get(E) / f; + } + }; + return p.betweennessNormalised = p.betweennessNormalized, p; + } + // betweennessCentrality + }; + di.bc = di.betweennessCentrality; + var _f = Lt({ + expandFactor: 2, + // affects time of computation and cluster granularity to some extent: M * M + inflateFactor: 2, + // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) + multFactor: 1, + // optional self loops for each node. Use a neutral value to improve cluster computations. + maxIterations: 20, + // maximum number of iterations of the MCL algorithm in a single run + attributes: [ + // attributes/features used to group nodes, ie. similarity values between nodes + function(t) { + return 1; + } + ] + }), Uf = function(e) { + return _f(e); + }, Yf = function(e, r) { + for (var a = 0, n = 0; n < r.length; n++) + a += r[n](e); + return a; + }, Hf = function(e, r, a) { + for (var n = 0; n < r; n++) + e[n * r + n] = a; + }, As = function(e, r) { + for (var a, n = 0; n < r; n++) { + a = 0; + for (var i = 0; i < r; i++) + a += e[i * r + n]; + for (var s = 0; s < r; s++) + e[s * r + n] = e[s * r + n] / a; + } + }, Xf = function(e, r, a) { + for (var n = new Array(a * a), i = 0; i < a; i++) { + for (var s = 0; s < a; s++) + n[i * a + s] = 0; + for (var o = 0; o < a; o++) + for (var l = 0; l < a; l++) + n[i * a + l] += e[i * a + o] * r[o * a + l]; + } + return n; + }, qf = function(e, r, a) { + for (var n = e.slice(0), i = 1; i < a; i++) + e = Xf(e, n, r); + return e; + }, Wf = function(e, r, a) { + for (var n = new Array(r * r), i = 0; i < r * r; i++) + n[i] = Math.pow(e[i], a); + return As(n, r), n; + }, Kf = function(e, r, a, n) { + for (var i = 0; i < a; i++) { + var s = Math.round(e[i] * Math.pow(10, n)) / Math.pow(10, n), o = Math.round(r[i] * Math.pow(10, n)) / Math.pow(10, n); + if (s !== o) + return !1; + } + return !0; + }, Zf = function(e, r, a, n) { + for (var i = [], s = 0; s < r; s++) { + for (var o = [], l = 0; l < r; l++) + Math.round(e[s * r + l] * 1e3) / 1e3 > 0 && o.push(a[l]); + o.length !== 0 && i.push(n.collection(o)); + } + return i; + }, Qf = function(e, r) { + for (var a = 0; a < e.length; a++) + if (!r[a] || e[a].id() !== r[a].id()) + return !1; + return !0; + }, Jf = function(e) { + for (var r = 0; r < e.length; r++) + for (var a = 0; a < e.length; a++) + r != a && Qf(e[r], e[a]) && e.splice(a, 1); + return e; + }, Os = function(e) { + for (var r = this.nodes(), a = this.edges(), n = this.cy(), i = Uf(e), s = {}, o = 0; o < r.length; o++) + s[r[o].id()] = o; + for (var l = r.length, u = l * l, f = new Array(u), h, c = 0; c < u; c++) + f[c] = 0; + for (var v = 0; v < a.length; v++) { + var d = a[v], g = s[d.source().id()], y = s[d.target().id()], p = Yf(d, i.attributes); + f[g * l + y] += p, f[y * l + g] += p; + } + Hf(f, l, i.multFactor), As(f, l); + for (var m = !0, b = 0; m && b < i.maxIterations; ) + m = !1, h = qf(f, l, i.expandFactor), f = Wf(h, l, i.inflateFactor), Kf(f, h, u, 4) || (m = !0), b++; + var E = Zf(f, l, r, n); + return E = Jf(E), E; + }, jf = { + markovClustering: Os, + mcl: Os + }, eh = function(e) { + return e; + }, Ns = function(e, r) { + return Math.abs(r - e); + }, Ms = function(e, r, a) { + return e + Ns(r, a); + }, Is = function(e, r, a) { + return e + Math.pow(a - r, 2); + }, th = function(e) { + return Math.sqrt(e); + }, rh = function(e, r, a) { + return Math.max(e, Ns(r, a)); + }, za = function(e, r, a, n, i) { + for (var s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : eh, o = n, l, u, f = 0; f < e; f++) + l = r(f), u = a(f), o = i(o, l, u); + return s(o); + }, na = { + euclidean: function(e, r, a) { + return e >= 2 ? za(e, r, a, 0, Is, th) : za(e, r, a, 0, Ms); + }, + squaredEuclidean: function(e, r, a) { + return za(e, r, a, 0, Is); + }, + manhattan: function(e, r, a) { + return za(e, r, a, 0, Ms); + }, + max: function(e, r, a) { + return za(e, r, a, -1 / 0, rh); + } + }; + na["squared-euclidean"] = na.squaredEuclidean, na.squaredeuclidean = na.squaredEuclidean; + function mn(t, e, r, a, n, i) { + var s; + return Y(t) ? s = t : s = na[t] || na.euclidean, e === 0 && Y(t) ? s(n, i) : s(e, r, a, n, i); + } + var ah = Lt({ + k: 2, + m: 2, + sensitivityThreshold: 1e-4, + distance: "euclidean", + maxIterations: 10, + attributes: [], + testMode: !1, + testCentroids: null + }), gi = function(e) { + return ah(e); + }, bn = function(e, r, a, n, i) { + var s = i !== "kMedoids", o = s ? function(h) { + return a[h]; + } : function(h) { + return n[h](a); + }, l = function(c) { + return n[c](r); + }, u = a, f = r; + return mn(e, n.length, o, l, u, f); + }, pi = function(e, r, a) { + for (var n = a.length, i = new Array(n), s = new Array(n), o = new Array(r), l = null, u = 0; u < n; u++) + i[u] = e.min(a[u]).value, s[u] = e.max(a[u]).value; + for (var f = 0; f < r; f++) { + l = []; + for (var h = 0; h < n; h++) + l[h] = Math.random() * (s[h] - i[h]) + i[h]; + o[f] = l; + } + return o; + }, Rs = function(e, r, a, n, i) { + for (var s = 1 / 0, o = 0, l = 0; l < r.length; l++) { + var u = bn(a, e, r[l], n, i); + u < s && (s = u, o = l); + } + return o; + }, ks = function(e, r, a) { + for (var n = [], i = null, s = 0; s < r.length; s++) + i = r[s], a[i.id()] === e && n.push(i); + return n; + }, nh = function(e, r, a) { + return Math.abs(r - e) <= a; + }, ih = function(e, r, a) { + for (var n = 0; n < e.length; n++) + for (var i = 0; i < e[n].length; i++) { + var s = Math.abs(e[n][i] - r[n][i]); + if (s > a) + return !1; + } + return !0; + }, sh = function(e, r, a) { + for (var n = 0; n < a; n++) + if (e === r[n]) + return !0; + return !1; + }, Ps = function(e, r) { + var a = new Array(r); + if (e.length < 50) + for (var n = 0; n < r; n++) { + for (var i = e[Math.floor(Math.random() * e.length)]; sh(i, a, n); ) + i = e[Math.floor(Math.random() * e.length)]; + a[n] = i; + } + else + for (var s = 0; s < r; s++) + a[s] = e[Math.floor(Math.random() * e.length)]; + return a; + }, Bs = function(e, r, a) { + for (var n = 0, i = 0; i < r.length; i++) + n += bn("manhattan", r[i], e, a, "kMedoids"); + return n; + }, oh = function(e) { + var r = this.cy(), a = this.nodes(), n = null, i = gi(e), s = new Array(i.k), o = {}, l; + i.testMode ? typeof i.testCentroids == "number" ? (i.testCentroids, l = pi(a, i.k, i.attributes)) : ee(i.testCentroids) === "object" ? l = i.testCentroids : l = pi(a, i.k, i.attributes) : l = pi(a, i.k, i.attributes); + for (var u = !0, f = 0; u && f < i.maxIterations; ) { + for (var h = 0; h < a.length; h++) + n = a[h], o[n.id()] = Rs(n, l, i.distance, i.attributes, "kMeans"); + u = !1; + for (var c = 0; c < i.k; c++) { + var v = ks(c, a, o); + if (v.length !== 0) { + for (var d = i.attributes.length, g = l[c], y = new Array(d), p = new Array(d), m = 0; m < d; m++) { + p[m] = 0; + for (var b = 0; b < v.length; b++) + n = v[b], p[m] += i.attributes[m](n); + y[m] = p[m] / v.length, nh(y[m], g[m], i.sensitivityThreshold) || (u = !0); + } + l[c] = y, s[c] = r.collection(v); + } + } + f++; + } + return s; + }, uh = function(e) { + var r = this.cy(), a = this.nodes(), n = null, i = gi(e), s = new Array(i.k), o, l = {}, u, f = new Array(i.k); + i.testMode ? typeof i.testCentroids == "number" || (ee(i.testCentroids) === "object" ? o = i.testCentroids : o = Ps(a, i.k)) : o = Ps(a, i.k); + for (var h = !0, c = 0; h && c < i.maxIterations; ) { + for (var v = 0; v < a.length; v++) + n = a[v], l[n.id()] = Rs(n, o, i.distance, i.attributes, "kMedoids"); + h = !1; + for (var d = 0; d < o.length; d++) { + var g = ks(d, a, l); + if (g.length !== 0) { + f[d] = Bs(o[d], g, i.attributes); + for (var y = 0; y < g.length; y++) + u = Bs(g[y], g, i.attributes), u < f[d] && (f[d] = u, o[d] = g[y], h = !0); + s[d] = r.collection(g); + } + } + c++; + } + return s; + }, lh = function(e, r, a, n, i) { + for (var s, o, l = 0; l < r.length; l++) + for (var u = 0; u < e.length; u++) + n[l][u] = Math.pow(a[l][u], i.m); + for (var f = 0; f < e.length; f++) + for (var h = 0; h < i.attributes.length; h++) { + s = 0, o = 0; + for (var c = 0; c < r.length; c++) + s += n[c][f] * i.attributes[h](r[c]), o += n[c][f]; + e[f][h] = s / o; + } + }, fh = function(e, r, a, n, i) { + for (var s = 0; s < e.length; s++) + r[s] = e[s].slice(); + for (var o, l, u, f = 2 / (i.m - 1), h = 0; h < a.length; h++) + for (var c = 0; c < n.length; c++) { + o = 0; + for (var v = 0; v < a.length; v++) + l = bn(i.distance, n[c], a[h], i.attributes, "cmeans"), u = bn(i.distance, n[c], a[v], i.attributes, "cmeans"), o += Math.pow(l / u, f); + e[c][h] = 1 / o; + } + }, hh = function(e, r, a, n) { + for (var i = new Array(a.k), s = 0; s < i.length; s++) + i[s] = []; + for (var o, l, u = 0; u < r.length; u++) { + o = -1 / 0, l = -1; + for (var f = 0; f < r[0].length; f++) + r[u][f] > o && (o = r[u][f], l = f); + i[l].push(e[u]); + } + for (var h = 0; h < i.length; h++) + i[h] = n.collection(i[h]); + return i; + }, Fs = function(e) { + var r = this.cy(), a = this.nodes(), n = gi(e), i, s, o, l, u; + l = new Array(a.length); + for (var f = 0; f < a.length; f++) + l[f] = new Array(n.k); + o = new Array(a.length); + for (var h = 0; h < a.length; h++) + o[h] = new Array(n.k); + for (var c = 0; c < a.length; c++) { + for (var v = 0, d = 0; d < n.k; d++) + o[c][d] = Math.random(), v += o[c][d]; + for (var g = 0; g < n.k; g++) + o[c][g] = o[c][g] / v; + } + s = new Array(n.k); + for (var y = 0; y < n.k; y++) + s[y] = new Array(n.attributes.length); + u = new Array(a.length); + for (var p = 0; p < a.length; p++) + u[p] = new Array(n.k); + for (var m = !0, b = 0; m && b < n.maxIterations; ) + m = !1, lh(s, a, o, u, n), fh(o, l, s, a, n), ih(o, l, n.sensitivityThreshold) || (m = !0), b++; + return i = hh(a, o, n, r), { + clusters: i, + degreeOfMembership: o + }; + }, ch = { + kMeans: oh, + kMedoids: uh, + fuzzyCMeans: Fs, + fcm: Fs + }, vh = Lt({ + distance: "euclidean", + // distance metric to compare nodes + linkage: "min", + // linkage criterion : how to determine the distance between clusters of nodes + mode: "threshold", + // mode:'threshold' => clusters must be threshold distance apart + threshold: 1 / 0, + // the distance threshold + // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters + addDendrogram: !1, + // whether to add the dendrogram to the graph for viz + dendrogramDepth: 0, + // depth at which dendrogram branches are merged into the returned clusters + attributes: [] + // array of attr functions + }), dh = { + single: "min", + complete: "max" + }, gh = function(e) { + var r = vh(e), a = dh[r.linkage]; + return a != null && (r.linkage = a), r; + }, zs = function(e, r, a, n, i) { + for (var s = 0, o = 1 / 0, l, u = i.attributes, f = function(C, B) { + return mn(i.distance, u.length, function(F) { + return u[F](C); + }, function(F) { + return u[F](B); + }, C, B); + }, h = 0; h < e.length; h++) { + var c = e[h].key, v = a[c][n[c]]; + v < o && (s = c, o = v); + } + if (i.mode === "threshold" && o >= i.threshold || i.mode === "dendrogram" && e.length === 1) + return !1; + var d = r[s], g = r[n[s]], y; + i.mode === "dendrogram" ? y = { + left: d, + right: g, + key: d.key + } : y = { + value: d.value.concat(g.value), + key: d.key + }, e[d.index] = y, e.splice(g.index, 1), r[d.key] = y; + for (var p = 0; p < e.length; p++) { + var m = e[p]; + d.key === m.key ? l = 1 / 0 : i.linkage === "min" ? (l = a[d.key][m.key], a[d.key][m.key] > a[g.key][m.key] && (l = a[g.key][m.key])) : i.linkage === "max" ? (l = a[d.key][m.key], a[d.key][m.key] < a[g.key][m.key] && (l = a[g.key][m.key])) : i.linkage === "mean" ? l = (a[d.key][m.key] * d.size + a[g.key][m.key] * g.size) / (d.size + g.size) : i.mode === "dendrogram" ? l = f(m.value, d.value) : l = f(m.value[0], d.value[0]), a[d.key][m.key] = a[m.key][d.key] = l; + } + for (var b = 0; b < e.length; b++) { + var E = e[b].key; + if (n[E] === d.key || n[E] === g.key) { + for (var M = E, A = 0; A < e.length; A++) { + var w = e[A].key; + a[E][w] < a[E][M] && (M = w); + } + n[E] = M; + } + e[b].index = b; + } + return d.key = g.key = d.index = g.index = null, !0; + }, En = function t(e, r, a) { + e && (e.value ? r.push(e.value) : (e.left && t(e.left, r), e.right && t(e.right, r))); + }, ph = function t(e, r) { + if (!e) + return ""; + if (e.left && e.right) { + var a = t(e.left, r), n = t(e.right, r), i = r.add({ + group: "nodes", + data: { + id: a + "," + n + } + }); + return r.add({ + group: "edges", + data: { + source: a, + target: i.id() + } + }), r.add({ + group: "edges", + data: { + source: n, + target: i.id() + } + }), i.id(); + } else if (e.value) + return e.value.id(); + }, yh = function t(e, r, a) { + if (!e) + return []; + var n = [], i = [], s = []; + return r === 0 ? (e.left && En(e.left, n), e.right && En(e.right, i), s = n.concat(i), [a.collection(s)]) : r === 1 ? e.value ? [a.collection(e.value)] : (e.left && En(e.left, n), e.right && En(e.right, i), [a.collection(n), a.collection(i)]) : e.value ? [a.collection(e.value)] : (e.left && (n = t(e.left, r - 1, a)), e.right && (i = t(e.right, r - 1, a)), n.concat(i)); + }, Gs = function(e) { + for (var r = this.cy(), a = this.nodes(), n = gh(e), i = n.attributes, s = function(b, E) { + return mn(n.distance, i.length, function(M) { + return i[M](b); + }, function(M) { + return i[M](E); + }, b, E); + }, o = [], l = [], u = [], f = [], h = 0; h < a.length; h++) { + var c = { + value: n.mode === "dendrogram" ? a[h] : [a[h]], + key: h, + index: h + }; + o[h] = c, f[h] = c, l[h] = [], u[h] = 0; + } + for (var v = 0; v < o.length; v++) + for (var d = 0; d <= v; d++) { + var g = void 0; + n.mode === "dendrogram" ? g = v === d ? 1 / 0 : s(o[v].value, o[d].value) : g = v === d ? 1 / 0 : s(o[v].value[0], o[d].value[0]), l[v][d] = g, l[d][v] = g, g < l[v][u[v]] && (u[v] = d); + } + for (var y = zs(o, f, l, u, n); y; ) + y = zs(o, f, l, u, n); + var p; + return n.mode === "dendrogram" ? (p = yh(o[0], n.dendrogramDepth, r), n.addDendrogram && ph(o[0], r)) : (p = new Array(o.length), o.forEach(function(m, b) { + m.key = m.index = null, p[b] = r.collection(m.value); + })), p; + }, mh = { + hierarchicalClustering: Gs, + hca: Gs + }, bh = Lt({ + distance: "euclidean", + // distance metric to compare attributes between two nodes + preference: "median", + // suitability of a data point to serve as an exemplar + damping: 0.8, + // damping factor between [0.5, 1) + maxIterations: 1e3, + // max number of iterations to run + minIterations: 100, + // min number of iterations to run in order for clustering to stop + attributes: [ + // functions to quantify the similarity between any two points + // e.g. node => node.data('weight') + ] + }), Eh = function(e) { + var r = e.damping, a = e.preference; + 0.5 <= r && r < 1 || xt("Damping must range on [0.5, 1). Got: ".concat(r)); + var n = ["median", "mean", "min", "max"]; + return n.some(function(i) { + return i === a; + }) || k(a) || xt("Preference must be one of [".concat(n.map(function(i) { + return "'".concat(i, "'"); + }).join(", "), "] or a number. Got: ").concat(a)), bh(e); + }, wh = function(e, r, a, n) { + var i = function(o, l) { + return n[l](o); + }; + return -mn(e, n.length, function(s) { + return i(r, s); + }, function(s) { + return i(a, s); + }, r, a); + }, xh = function(e, r) { + var a = null; + return r === "median" ? a = Ef(e) : r === "mean" ? a = bf(e) : r === "min" ? a = yf(e) : r === "max" ? a = mf(e) : a = r, a; + }, Th = function(e, r, a) { + for (var n = [], i = 0; i < e; i++) + r[i * e + i] + a[i * e + i] > 0 && n.push(i); + return n; + }, $s = function(e, r, a) { + for (var n = [], i = 0; i < e; i++) { + for (var s = -1, o = -1 / 0, l = 0; l < a.length; l++) { + var u = a[l]; + r[i * e + u] > o && (s = u, o = r[i * e + u]); + } + s > 0 && n.push(s); + } + for (var f = 0; f < a.length; f++) + n[a[f]] = a[f]; + return n; + }, Ch = function(e, r, a) { + for (var n = $s(e, r, a), i = 0; i < a.length; i++) { + for (var s = [], o = 0; o < n.length; o++) + n[o] === a[i] && s.push(o); + for (var l = -1, u = -1 / 0, f = 0; f < s.length; f++) { + for (var h = 0, c = 0; c < s.length; c++) + h += r[s[c] * e + s[f]]; + h > u && (l = f, u = h); + } + a[i] = s[l]; + } + return n = $s(e, r, a), n; + }, Vs = function(e) { + for (var r = this.cy(), a = this.nodes(), n = Eh(e), i = {}, s = 0; s < a.length; s++) + i[a[s].id()] = s; + var o, l, u, f, h, c; + o = a.length, l = o * o, u = new Array(l); + for (var v = 0; v < l; v++) + u[v] = -1 / 0; + for (var d = 0; d < o; d++) + for (var g = 0; g < o; g++) + d !== g && (u[d * o + g] = wh(n.distance, a[d], a[g], n.attributes)); + f = xh(u, n.preference); + for (var y = 0; y < o; y++) + u[y * o + y] = f; + h = new Array(l); + for (var p = 0; p < l; p++) + h[p] = 0; + c = new Array(l); + for (var m = 0; m < l; m++) + c[m] = 0; + for (var b = new Array(o), E = new Array(o), M = new Array(o), A = 0; A < o; A++) + b[A] = 0, E[A] = 0, M[A] = 0; + for (var w = new Array(o * n.minIterations), I = 0; I < w.length; I++) + w[I] = 0; + var C; + for (C = 0; C < n.maxIterations; C++) { + for (var B = 0; B < o; B++) { + for (var F = -1 / 0, R = -1 / 0, X = -1, z = 0, re = 0; re < o; re++) + b[re] = h[B * o + re], z = c[B * o + re] + u[B * o + re], z >= F ? (R = F, F = z, X = re) : z > R && (R = z); + for (var W = 0; W < o; W++) + h[B * o + W] = (1 - n.damping) * (u[B * o + W] - F) + n.damping * b[W]; + h[B * o + X] = (1 - n.damping) * (u[B * o + X] - R) + n.damping * b[X]; + } + for (var Z = 0; Z < o; Z++) { + for (var ie = 0, oe = 0; oe < o; oe++) + b[oe] = c[oe * o + Z], E[oe] = Math.max(0, h[oe * o + Z]), ie += E[oe]; + ie -= E[Z], E[Z] = h[Z * o + Z], ie += E[Z]; + for (var de = 0; de < o; de++) + c[de * o + Z] = (1 - n.damping) * Math.min(0, ie - E[de]) + n.damping * b[de]; + c[Z * o + Z] = (1 - n.damping) * (ie - E[Z]) + n.damping * b[Z]; + } + for (var se = 0, ve = 0; ve < o; ve++) { + var we = c[ve * o + ve] + h[ve * o + ve] > 0 ? 1 : 0; + w[C % n.minIterations * o + ve] = we, se += we; + } + if (se > 0 && (C >= n.minIterations - 1 || C == n.maxIterations - 1)) { + for (var Te = 0, Ee = 0; Ee < o; Ee++) { + M[Ee] = 0; + for (var ye = 0; ye < n.minIterations; ye++) + M[Ee] += w[ye * o + Ee]; + (M[Ee] === 0 || M[Ee] === n.minIterations) && Te++; + } + if (Te === o) + break; + } + } + for (var ae = Th(o, h, c), xe = Ch(o, u, ae), Ce = {}, Oe = 0; Oe < ae.length; Oe++) + Ce[ae[Oe]] = []; + for (var Ie = 0; Ie < a.length; Ie++) { + var He = i[a[Ie].id()], qe = xe[He]; + qe != null && Ce[qe].push(a[Ie]); + } + for (var Re = new Array(ae.length), Me = 0; Me < ae.length; Me++) + Re[Me] = r.collection(Ce[ae[Me]]); + return Re; + }, Dh = { + affinityPropagation: Vs, + ap: Vs + }, Sh = Lt({ + root: void 0, + directed: !1 + }), Lh = { + hierholzer: function(e) { + if (!L(e)) { + var r = arguments; + e = { + root: r[0], + directed: r[1] + }; + } + var a = Sh(e), n = a.root, i = a.directed, s = this, o = !1, l, u, f; + n && (f = j(n) ? this.filter(n)[0].id() : n[0].id()); + var h = {}, c = {}; + i ? s.forEach(function(m) { + var b = m.id(); + if (m.isNode()) { + var E = m.indegree(!0), M = m.outdegree(!0), A = E - M, w = M - E; + A == 1 ? l ? o = !0 : l = b : w == 1 ? u ? o = !0 : u = b : (w > 1 || A > 1) && (o = !0), h[b] = [], m.outgoers().forEach(function(I) { + I.isEdge() && h[b].push(I.id()); + }); + } else + c[b] = [void 0, m.target().id()]; + }) : s.forEach(function(m) { + var b = m.id(); + if (m.isNode()) { + var E = m.degree(!0); + E % 2 && (l ? u ? o = !0 : u = b : l = b), h[b] = [], m.connectedEdges().forEach(function(M) { + return h[b].push(M.id()); + }); + } else + c[b] = [m.source().id(), m.target().id()]; + }); + var v = { + found: !1, + trail: void 0 + }; + if (o) + return v; + if (u && l) + if (i) { + if (f && u != f) + return v; + f = u; + } else { + if (f && u != f && l != f) + return v; + f || (f = u); + } + else + f || (f = s[0].id()); + var d = function(b) { + for (var E = b, M = [b], A, w, I; h[E].length; ) + A = h[E].shift(), w = c[A][0], I = c[A][1], E != I ? (h[I] = h[I].filter(function(C) { + return C != A; + }), E = I) : !i && E != w && (h[w] = h[w].filter(function(C) { + return C != A; + }), E = w), M.unshift(A), M.unshift(E); + return M; + }, g = [], y = []; + for (y = d(f); y.length != 1; ) + h[y[0]].length == 0 ? (g.unshift(s.getElementById(y.shift())), g.unshift(s.getElementById(y.shift()))) : y = d(y.shift()).concat(y); + g.unshift(s.getElementById(y.shift())); + for (var p in h) + if (h[p].length) + return v; + return v.found = !0, v.trail = this.spawn(g, !0), v; + } + }, wn = function() { + var e = this, r = {}, a = 0, n = 0, i = [], s = [], o = {}, l = function(c, v) { + for (var d = s.length - 1, g = [], y = e.spawn(); s[d].x != c || s[d].y != v; ) + g.push(s.pop().edge), d--; + g.push(s.pop().edge), g.forEach(function(p) { + var m = p.connectedNodes().intersection(e); + y.merge(p), m.forEach(function(b) { + var E = b.id(), M = b.connectedEdges().intersection(e); + y.merge(b), r[E].cutVertex ? y.merge(M.filter(function(A) { + return A.isLoop(); + })) : y.merge(M); + }); + }), i.push(y); + }, u = function h(c, v, d) { + c === d && (n += 1), r[v] = { + id: a, + low: a++, + cutVertex: !1 + }; + var g = e.getElementById(v).connectedEdges().intersection(e); + if (g.size() === 0) + i.push(e.spawn(e.getElementById(v))); + else { + var y, p, m, b; + g.forEach(function(E) { + y = E.source().id(), p = E.target().id(), m = y === v ? p : y, m !== d && (b = E.id(), o[b] || (o[b] = !0, s.push({ + x: v, + y: m, + edge: E + })), m in r ? r[v].low = Math.min(r[v].low, r[m].id) : (h(c, m, v), r[v].low = Math.min(r[v].low, r[m].low), r[v].id <= r[m].low && (r[v].cutVertex = !0, l(v, m)))); + }); + } + }; + e.forEach(function(h) { + if (h.isNode()) { + var c = h.id(); + c in r || (n = 0, u(c, c), r[c].cutVertex = n > 1); + } + }); + var f = Object.keys(r).filter(function(h) { + return r[h].cutVertex; + }).map(function(h) { + return e.getElementById(h); + }); + return { + cut: e.spawn(f), + components: i + }; + }, Ah = { + hopcroftTarjanBiconnected: wn, + htbc: wn, + htb: wn, + hopcroftTarjanBiconnectedComponents: wn + }, xn = function() { + var e = this, r = {}, a = 0, n = [], i = [], s = e.spawn(e), o = function l(u) { + i.push(u), r[u] = { + index: a, + low: a++, + explored: !1 + }; + var f = e.getElementById(u).connectedEdges().intersection(e); + if (f.forEach(function(g) { + var y = g.target().id(); + y !== u && (y in r || l(y), r[y].explored || (r[u].low = Math.min(r[u].low, r[y].low))); + }), r[u].index === r[u].low) { + for (var h = e.spawn(); ; ) { + var c = i.pop(); + if (h.merge(e.getElementById(c)), r[c].low = r[u].index, r[c].explored = !0, c === u) + break; + } + var v = h.edgesWith(h), d = h.merge(v); + n.push(d), s = s.difference(d); + } + }; + return e.forEach(function(l) { + if (l.isNode()) { + var u = l.id(); + u in r || o(u); + } + }), { + cut: s, + components: n + }; + }, Oh = { + tarjanStronglyConnected: xn, + tsc: xn, + tscc: xn, + tarjanStronglyConnectedComponents: xn + }, _s = {}; + [Ia, nf, sf, uf, ff, cf, gf, $f, ra, aa, di, jf, ch, mh, Dh, Lh, Ah, Oh].forEach(function(t) { + Ue(_s, t); + }); + /*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + */ + var Us = 0, Ys = 1, Hs = 2, pr = function t(e) { + if (!(this instanceof t)) + return new t(e); + this.id = "Thenable/1.0.7", this.state = Us, this.fulfillValue = void 0, this.rejectReason = void 0, this.onFulfilled = [], this.onRejected = [], this.proxy = { + then: this.then.bind(this) + }, typeof e == "function" && e.call(this, this.fulfill.bind(this), this.reject.bind(this)); + }; + pr.prototype = { + /* promise resolving methods */ + fulfill: function(e) { + return Xs(this, Ys, "fulfillValue", e); + }, + reject: function(e) { + return Xs(this, Hs, "rejectReason", e); + }, + /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ + then: function(e, r) { + var a = this, n = new pr(); + return a.onFulfilled.push(Ks(e, n, "fulfill")), a.onRejected.push(Ks(r, n, "reject")), qs(a), n.proxy; + } + }; + var Xs = function(e, r, a, n) { + return e.state === Us && (e.state = r, e[a] = n, qs(e)), e; + }, qs = function(e) { + e.state === Ys ? Ws(e, "onFulfilled", e.fulfillValue) : e.state === Hs && Ws(e, "onRejected", e.rejectReason); + }, Ws = function(e, r, a) { + if (e[r].length !== 0) { + var n = e[r]; + e[r] = []; + var i = function() { + for (var o = 0; o < n.length; o++) + n[o](a); + }; + typeof setImmediate == "function" ? setImmediate(i) : setTimeout(i, 0); + } + }, Ks = function(e, r, a) { + return function(n) { + if (typeof e != "function") + r[a].call(r, n); + else { + var i; + try { + i = e(n); + } catch (s) { + r.reject(s); + return; + } + Nh(r, i); + } + }; + }, Nh = function t(e, r) { + if (e === r || e.proxy === r) { + e.reject(new TypeError("cannot resolve promise with itself")); + return; + } + var a; + if (ee(r) === "object" && r !== null || typeof r == "function") + try { + a = r.then; + } catch (i) { + e.reject(i); + return; + } + if (typeof a == "function") { + var n = !1; + try { + a.call( + r, + /* resolvePromise */ + /* [Promises/A+ 2.3.3.3.1] */ + function(i) { + n || (n = !0, i === r ? e.reject(new TypeError("circular thenable chain")) : t(e, i)); + }, + /* rejectPromise */ + /* [Promises/A+ 2.3.3.3.2] */ + function(i) { + n || (n = !0, e.reject(i)); + } + ); + } catch (i) { + n || e.reject(i); + } + return; + } + e.fulfill(r); + }; + pr.all = function(t) { + return new pr(function(e, r) { + for (var a = new Array(t.length), n = 0, i = function(l, u) { + a[l] = u, n++, n === t.length && e(a); + }, s = 0; s < t.length; s++) + (function(o) { + var l = t[o], u = l != null && l.then != null; + if (u) + l.then(function(h) { + i(o, h); + }, function(h) { + r(h); + }); + else { + var f = l; + i(o, f); + } + })(s); + }); + }, pr.resolve = function(t) { + return new pr(function(e, r) { + e(t); + }); + }, pr.reject = function(t) { + return new pr(function(e, r) { + r(t); + }); + }; + var ia = typeof Promise < "u" ? Promise : pr, yi = function(e, r, a) { + var n = _e(e), i = !n, s = this._private = Ue({ + duration: 1e3 + }, r, a); + if (s.target = e, s.style = s.style || s.css, s.started = !1, s.playing = !1, s.hooked = !1, s.applying = !1, s.progress = 0, s.completes = [], s.frames = [], s.complete && Y(s.complete) && s.completes.push(s.complete), i) { + var o = e.position(); + s.startPosition = s.startPosition || { + x: o.x, + y: o.y + }, s.startStyle = s.startStyle || e.cy().style().getAnimationStartStyle(e, s.style); + } + if (n) { + var l = e.pan(); + s.startPan = { + x: l.x, + y: l.y + }, s.startZoom = e.zoom(); + } + this.length = 1, this[0] = this; + }, zr = yi.prototype; + Ue(zr, { + instanceString: function() { + return "animation"; + }, + hook: function() { + var e = this._private; + if (!e.hooked) { + var r, a = e.target._private.animation; + e.queue ? r = a.queue : r = a.current, r.push(this), ge(e.target) && e.target.cy().addToAnimationPool(e.target), e.hooked = !0; + } + return this; + }, + play: function() { + var e = this._private; + return e.progress === 1 && (e.progress = 0), e.playing = !0, e.started = !1, e.stopped = !1, this.hook(), this; + }, + playing: function() { + return this._private.playing; + }, + apply: function() { + var e = this._private; + return e.applying = !0, e.started = !1, e.stopped = !1, this.hook(), this; + }, + applying: function() { + return this._private.applying; + }, + pause: function() { + var e = this._private; + return e.playing = !1, e.started = !1, this; + }, + stop: function() { + var e = this._private; + return e.playing = !1, e.started = !1, e.stopped = !0, this; + }, + rewind: function() { + return this.progress(0); + }, + fastforward: function() { + return this.progress(1); + }, + time: function(e) { + var r = this._private; + return e === void 0 ? r.progress * r.duration : this.progress(e / r.duration); + }, + progress: function(e) { + var r = this._private, a = r.playing; + return e === void 0 ? r.progress : (a && this.pause(), r.progress = e, r.started = !1, a && this.play(), this); + }, + completed: function() { + return this._private.progress === 1; + }, + reverse: function() { + var e = this._private, r = e.playing; + r && this.pause(), e.progress = 1 - e.progress, e.started = !1; + var a = function(u, f) { + var h = e[u]; + h != null && (e[u] = e[f], e[f] = h); + }; + if (a("zoom", "startZoom"), a("pan", "startPan"), a("position", "startPosition"), e.style) + for (var n = 0; n < e.style.length; n++) { + var i = e.style[n], s = i.name, o = e.startStyle[s]; + e.startStyle[s] = i, e.style[n] = o; + } + return r && this.play(), this; + }, + promise: function(e) { + var r = this._private, a; + switch (e) { + case "frame": + a = r.frames; + break; + default: + case "complete": + case "completed": + a = r.completes; + } + return new ia(function(n, i) { + a.push(function() { + n(); + }); + }); + } + }), zr.complete = zr.completed, zr.run = zr.play, zr.running = zr.playing; + var Mh = { + animated: function() { + return function() { + var r = this, a = r.length !== void 0, n = a ? r : [r], i = this._private.cy || this; + if (!i.styleEnabled()) + return !1; + var s = n[0]; + if (s) + return s._private.animation.current.length > 0; + }; + }, + // animated + clearQueue: function() { + return function() { + var r = this, a = r.length !== void 0, n = a ? r : [r], i = this._private.cy || this; + if (!i.styleEnabled()) + return this; + for (var s = 0; s < n.length; s++) { + var o = n[s]; + o._private.animation.queue = []; + } + return this; + }; + }, + // clearQueue + delay: function() { + return function(r, a) { + var n = this._private.cy || this; + return n.styleEnabled() ? this.animate({ + delay: r, + duration: r, + complete: a + }) : this; + }; + }, + // delay + delayAnimation: function() { + return function(r, a) { + var n = this._private.cy || this; + return n.styleEnabled() ? this.animation({ + delay: r, + duration: r, + complete: a + }) : this; + }; + }, + // delay + animation: function() { + return function(r, a) { + var n = this, i = n.length !== void 0, s = i ? n : [n], o = this._private.cy || this, l = !i, u = !l; + if (!o.styleEnabled()) + return this; + var f = o.style(); + r = Ue({}, r, a); + var h = Object.keys(r).length === 0; + if (h) + return new yi(s[0], r); + switch (r.duration === void 0 && (r.duration = 400), r.duration) { + case "slow": + r.duration = 600; + break; + case "fast": + r.duration = 200; + break; + } + if (u && (r.style = f.getPropsList(r.style || r.css), r.css = void 0), u && r.renderedPosition != null) { + var c = r.renderedPosition, v = o.pan(), d = o.zoom(); + r.position = ys(c, d, v); + } + if (l && r.panBy != null) { + var g = r.panBy, y = o.pan(); + r.pan = { + x: y.x + g.x, + y: y.y + g.y + }; + } + var p = r.center || r.centre; + if (l && p != null) { + var m = o.getCenterPan(p.eles, r.zoom); + m != null && (r.pan = m); + } + if (l && r.fit != null) { + var b = r.fit, E = o.getFitViewport(b.eles || b.boundingBox, b.padding); + E != null && (r.pan = E.pan, r.zoom = E.zoom); + } + if (l && L(r.zoom)) { + var M = o.getZoomedViewport(r.zoom); + M != null ? (M.zoomed && (r.zoom = M.zoom), M.panned && (r.pan = M.pan)) : r.zoom = null; + } + return new yi(s[0], r); + }; + }, + // animate + animate: function() { + return function(r, a) { + var n = this, i = n.length !== void 0, s = i ? n : [n], o = this._private.cy || this; + if (!o.styleEnabled()) + return this; + a && (r = Ue({}, r, a)); + for (var l = 0; l < s.length; l++) { + var u = s[l], f = u.animated() && (r.queue === void 0 || r.queue), h = u.animation(r, f ? { + queue: !0 + } : void 0); + h.play(); + } + return this; + }; + }, + // animate + stop: function() { + return function(r, a) { + var n = this, i = n.length !== void 0, s = i ? n : [n], o = this._private.cy || this; + if (!o.styleEnabled()) + return this; + for (var l = 0; l < s.length; l++) { + for (var u = s[l], f = u._private, h = f.animation.current, c = 0; c < h.length; c++) { + var v = h[c], d = v._private; + a && (d.duration = 0); + } + r && (f.animation.queue = []), a || (f.animation.current = []); + } + return o.notify("draw"), this; + }; + } + // stop + }, Ih = Array.isArray, Tn = Ih, Rh = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, kh = /^\w*$/; + function Ph(t, e) { + if (Tn(t)) + return !1; + var r = typeof t; + return r == "number" || r == "symbol" || r == "boolean" || t == null || Aa(t) ? !0 : kh.test(t) || !Rh.test(t) || e != null && t in Object(e); + } + var Bh = Ph, Fh = "[object AsyncFunction]", zh = "[object Function]", Gh = "[object GeneratorFunction]", $h = "[object Proxy]"; + function Vh(t) { + if (!Rr(t)) + return !1; + var e = as(t); + return e == zh || e == Gh || e == Fh || e == $h; + } + var _h = Vh, Uh = un["__core-js_shared__"], mi = Uh, Zs = function() { + var t = /[^.]+$/.exec(mi && mi.keys && mi.keys.IE_PROTO || ""); + return t ? "Symbol(src)_1." + t : ""; + }(); + function Yh(t) { + return !!Zs && Zs in t; + } + var Hh = Yh, Xh = Function.prototype, qh = Xh.toString; + function Wh(t) { + if (t != null) { + try { + return qh.call(t); + } catch { + } + try { + return t + ""; + } catch { + } + } + return ""; + } + var Kh = Wh, Zh = /[\\^$.*+?()[\]{}|]/g, Qh = /^\[object .+?Constructor\]$/, Jh = Function.prototype, jh = Object.prototype, ec = Jh.toString, tc = jh.hasOwnProperty, rc = RegExp( + "^" + ec.call(tc).replace(Zh, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + function ac(t) { + if (!Rr(t) || Hh(t)) + return !1; + var e = _h(t) ? rc : Qh; + return e.test(Kh(t)); + } + var nc = ac; + function ic(t, e) { + return t == null ? void 0 : t[e]; + } + var sc = ic; + function oc(t, e) { + var r = sc(t, e); + return nc(r) ? r : void 0; + } + var bi = oc, uc = bi(Object, "create"), Ga = uc; + function lc() { + this.__data__ = Ga ? Ga(null) : {}, this.size = 0; + } + var fc = lc; + function hc(t) { + var e = this.has(t) && delete this.__data__[t]; + return this.size -= e ? 1 : 0, e; + } + var cc = hc, vc = "__lodash_hash_undefined__", dc = Object.prototype, gc = dc.hasOwnProperty; + function pc(t) { + var e = this.__data__; + if (Ga) { + var r = e[t]; + return r === vc ? void 0 : r; + } + return gc.call(e, t) ? e[t] : void 0; + } + var yc = pc, mc = Object.prototype, bc = mc.hasOwnProperty; + function Ec(t) { + var e = this.__data__; + return Ga ? e[t] !== void 0 : bc.call(e, t); + } + var wc = Ec, xc = "__lodash_hash_undefined__"; + function Tc(t, e) { + var r = this.__data__; + return this.size += this.has(t) ? 0 : 1, r[t] = Ga && e === void 0 ? xc : e, this; + } + var Cc = Tc; + function sa(t) { + var e = -1, r = t == null ? 0 : t.length; + for (this.clear(); ++e < r; ) { + var a = t[e]; + this.set(a[0], a[1]); + } + } + sa.prototype.clear = fc, sa.prototype.delete = cc, sa.prototype.get = yc, sa.prototype.has = wc, sa.prototype.set = Cc; + var Qs = sa; + function Dc() { + this.__data__ = [], this.size = 0; + } + var Sc = Dc; + function Lc(t, e) { + return t === e || t !== t && e !== e; + } + var Js = Lc; + function Ac(t, e) { + for (var r = t.length; r--; ) + if (Js(t[r][0], e)) + return r; + return -1; + } + var Cn = Ac, Oc = Array.prototype, Nc = Oc.splice; + function Mc(t) { + var e = this.__data__, r = Cn(e, t); + if (r < 0) + return !1; + var a = e.length - 1; + return r == a ? e.pop() : Nc.call(e, r, 1), --this.size, !0; + } + var Ic = Mc; + function Rc(t) { + var e = this.__data__, r = Cn(e, t); + return r < 0 ? void 0 : e[r][1]; + } + var kc = Rc; + function Pc(t) { + return Cn(this.__data__, t) > -1; + } + var Bc = Pc; + function Fc(t, e) { + var r = this.__data__, a = Cn(r, t); + return a < 0 ? (++this.size, r.push([t, e])) : r[a][1] = e, this; + } + var zc = Fc; + function oa(t) { + var e = -1, r = t == null ? 0 : t.length; + for (this.clear(); ++e < r; ) { + var a = t[e]; + this.set(a[0], a[1]); + } + } + oa.prototype.clear = Sc, oa.prototype.delete = Ic, oa.prototype.get = kc, oa.prototype.has = Bc, oa.prototype.set = zc; + var Gc = oa, $c = bi(un, "Map"), Vc = $c; + function _c() { + this.size = 0, this.__data__ = { + hash: new Qs(), + map: new (Vc || Gc)(), + string: new Qs() + }; + } + var Uc = _c; + function Yc(t) { + var e = typeof t; + return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null; + } + var Hc = Yc; + function Xc(t, e) { + var r = t.__data__; + return Hc(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map; + } + var Dn = Xc; + function qc(t) { + var e = Dn(this, t).delete(t); + return this.size -= e ? 1 : 0, e; + } + var Wc = qc; + function Kc(t) { + return Dn(this, t).get(t); + } + var Zc = Kc; + function Qc(t) { + return Dn(this, t).has(t); + } + var Jc = Qc; + function jc(t, e) { + var r = Dn(this, t), a = r.size; + return r.set(t, e), this.size += r.size == a ? 0 : 1, this; + } + var ev = jc; + function ua(t) { + var e = -1, r = t == null ? 0 : t.length; + for (this.clear(); ++e < r; ) { + var a = t[e]; + this.set(a[0], a[1]); + } + } + ua.prototype.clear = Uc, ua.prototype.delete = Wc, ua.prototype.get = Zc, ua.prototype.has = Jc, ua.prototype.set = ev; + var js = ua, tv = "Expected a function"; + function Ei(t, e) { + if (typeof t != "function" || e != null && typeof e != "function") + throw new TypeError(tv); + var r = function() { + var a = arguments, n = e ? e.apply(this, a) : a[0], i = r.cache; + if (i.has(n)) + return i.get(n); + var s = t.apply(this, a); + return r.cache = i.set(n, s) || i, s; + }; + return r.cache = new (Ei.Cache || js)(), r; + } + Ei.Cache = js; + var rv = Ei, av = 500; + function nv(t) { + var e = rv(t, function(a) { + return r.size === av && r.clear(), a; + }), r = e.cache; + return e; + } + var iv = nv, sv = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ov = /\\(\\)?/g, uv = iv(function(t) { + var e = []; + return t.charCodeAt(0) === 46 && e.push(""), t.replace(sv, function(r, a, n, i) { + e.push(n ? i.replace(ov, "$1") : a || r); + }), e; + }), eo = uv; + function lv(t, e) { + for (var r = -1, a = t == null ? 0 : t.length, n = Array(a); ++r < a; ) + n[r] = e(t[r], r, t); + return n; + } + var to = lv, fv = 1 / 0, ro = Zr ? Zr.prototype : void 0, ao = ro ? ro.toString : void 0; + function no(t) { + if (typeof t == "string") + return t; + if (Tn(t)) + return to(t, no) + ""; + if (Aa(t)) + return ao ? ao.call(t) : ""; + var e = t + ""; + return e == "0" && 1 / t == -fv ? "-0" : e; + } + var hv = no; + function cv(t) { + return t == null ? "" : hv(t); + } + var io = cv; + function vv(t, e) { + return Tn(t) ? t : Bh(t, e) ? [t] : eo(io(t)); + } + var so = vv, dv = 1 / 0; + function gv(t) { + if (typeof t == "string" || Aa(t)) + return t; + var e = t + ""; + return e == "0" && 1 / t == -dv ? "-0" : e; + } + var wi = gv; + function pv(t, e) { + e = so(e, t); + for (var r = 0, a = e.length; t != null && r < a; ) + t = t[wi(e[r++])]; + return r && r == a ? t : void 0; + } + var yv = pv; + function mv(t, e, r) { + var a = t == null ? void 0 : yv(t, e); + return a === void 0 ? r : a; + } + var bv = mv, Ev = function() { + try { + var t = bi(Object, "defineProperty"); + return t({}, "", {}), t; + } catch { + } + }(), oo = Ev; + function wv(t, e, r) { + e == "__proto__" && oo ? oo(t, e, { + configurable: !0, + enumerable: !0, + value: r, + writable: !0 + }) : t[e] = r; + } + var xv = wv, Tv = Object.prototype, Cv = Tv.hasOwnProperty; + function Dv(t, e, r) { + var a = t[e]; + (!(Cv.call(t, e) && Js(a, r)) || r === void 0 && !(e in t)) && xv(t, e, r); + } + var Sv = Dv, Lv = 9007199254740991, Av = /^(?:0|[1-9]\d*)$/; + function Ov(t, e) { + var r = typeof t; + return e = e ?? Lv, !!e && (r == "number" || r != "symbol" && Av.test(t)) && t > -1 && t % 1 == 0 && t < e; + } + var Nv = Ov; + function Mv(t, e, r, a) { + if (!Rr(t)) + return t; + e = so(e, t); + for (var n = -1, i = e.length, s = i - 1, o = t; o != null && ++n < i; ) { + var l = wi(e[n]), u = r; + if (l === "__proto__" || l === "constructor" || l === "prototype") + return t; + if (n != s) { + var f = o[l]; + u = a ? a(f, l, o) : void 0, u === void 0 && (u = Rr(f) ? f : Nv(e[n + 1]) ? [] : {}); + } + Sv(o, l, u), o = o[l]; + } + return t; + } + var Iv = Mv; + function Rv(t, e, r) { + return t == null ? t : Iv(t, e, r); + } + var kv = Rv; + function Pv(t, e) { + var r = -1, a = t.length; + for (e || (e = Array(a)); ++r < a; ) + e[r] = t[r]; + return e; + } + var Bv = Pv; + function Fv(t) { + return Tn(t) ? to(t, wi) : Aa(t) ? [t] : Bv(eo(io(t))); + } + var zv = Fv, Gv = { + // access data field + data: function(e) { + var r = { + field: "data", + bindingEvent: "data", + allowBinding: !1, + allowSetting: !1, + allowGetting: !1, + settingEvent: "data", + settingTriggersEvent: !1, + triggerFnName: "trigger", + immutableKeys: {}, + // key => true if immutable + updateStyle: !1, + beforeGet: function(n) { + }, + beforeSet: function(n, i) { + }, + onSet: function(n) { + }, + canSet: function(n) { + return !0; + } + }; + return e = Ue({}, r, e), function(n, i) { + var s = e, o = this, l = o.length !== void 0, u = l ? o : [o], f = l ? o[0] : o; + if (j(n)) { + var h = n.indexOf(".") !== -1, c = h && zv(n); + if (s.allowGetting && i === void 0) { + var v; + return f && (s.beforeGet(f), c && f._private[s.field][n] === void 0 ? v = bv(f._private[s.field], c) : v = f._private[s.field][n]), v; + } else if (s.allowSetting && i !== void 0) { + var d = !s.immutableKeys[n]; + if (d) { + var g = T({}, n, i); + s.beforeSet(o, g); + for (var y = 0, p = u.length; y < p; y++) { + var m = u[y]; + s.canSet(m) && (c && f._private[s.field][n] === void 0 ? kv(m._private[s.field], c, i) : m._private[s.field][n] = i); + } + s.updateStyle && o.updateStyle(), s.onSet(o), s.settingTriggersEvent && o[s.triggerFnName](s.settingEvent); + } + } + } else if (s.allowSetting && L(n)) { + var b = n, E, M, A = Object.keys(b); + s.beforeSet(o, b); + for (var w = 0; w < A.length; w++) { + E = A[w], M = b[E]; + var I = !s.immutableKeys[E]; + if (I) + for (var C = 0; C < u.length; C++) { + var B = u[C]; + s.canSet(B) && (B._private[s.field][E] = M); + } + } + s.updateStyle && o.updateStyle(), s.onSet(o), s.settingTriggersEvent && o[s.triggerFnName](s.settingEvent); + } else if (s.allowBinding && Y(n)) { + var F = n; + o.on(s.bindingEvent, F); + } else if (s.allowGetting && n === void 0) { + var R; + return f && (s.beforeGet(f), R = f._private[s.field]), R; + } + return o; + }; + }, + // data + // remove data field + removeData: function(e) { + var r = { + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: !1, + immutableKeys: {} + // key => true if immutable + }; + return e = Ue({}, r, e), function(n) { + var i = e, s = this, o = s.length !== void 0, l = o ? s : [s]; + if (j(n)) { + for (var u = n.split(/\s+/), f = u.length, h = 0; h < f; h++) { + var c = u[h]; + if (!Pe(c)) { + var v = !i.immutableKeys[c]; + if (v) + for (var d = 0, g = l.length; d < g; d++) + l[d]._private[i.field][c] = void 0; + } + } + i.triggerEvent && s[i.triggerFnName](i.event); + } else if (n === void 0) { + for (var y = 0, p = l.length; y < p; y++) + for (var m = l[y]._private[i.field], b = Object.keys(m), E = 0; E < b.length; E++) { + var M = b[E], A = !i.immutableKeys[M]; + A && (m[M] = void 0); + } + i.triggerEvent && s[i.triggerFnName](i.event); + } + return s; + }; + } + // removeData + }, $v = { + eventAliasesOn: function(e) { + var r = e; + r.addListener = r.listen = r.bind = r.on, r.unlisten = r.unbind = r.off = r.removeListener, r.trigger = r.emit, r.pon = r.promiseOn = function(a, n) { + var i = this, s = Array.prototype.slice.call(arguments, 0); + return new ia(function(o, l) { + var u = function(v) { + i.off.apply(i, h), o(v); + }, f = s.concat([u]), h = f.concat([]); + i.on.apply(i, f); + }); + }; + } + }, ht = {}; + [Mh, Gv, $v].forEach(function(t) { + Ue(ht, t); + }); + var Vv = { + animate: ht.animate(), + animation: ht.animation(), + animated: ht.animated(), + clearQueue: ht.clearQueue(), + delay: ht.delay(), + delayAnimation: ht.delayAnimation(), + stop: ht.stop() + }, Sn = { + classes: function(e) { + var r = this; + if (e === void 0) { + var a = []; + return r[0]._private.classes.forEach(function(d) { + return a.push(d); + }), a; + } else + te(e) || (e = (e || "").match(/\S+/g) || []); + for (var n = [], i = new Jr(e), s = 0; s < r.length; s++) { + for (var o = r[s], l = o._private, u = l.classes, f = !1, h = 0; h < e.length; h++) { + var c = e[h], v = u.has(c); + if (!v) { + f = !0; + break; + } + } + f || (f = u.size !== e.length), f && (l.classes = i, n.push(o)); + } + return n.length > 0 && this.spawn(n).updateStyle().emit("class"), r; + }, + addClass: function(e) { + return this.toggleClass(e, !0); + }, + hasClass: function(e) { + var r = this[0]; + return r != null && r._private.classes.has(e); + }, + toggleClass: function(e, r) { + te(e) || (e = e.match(/\S+/g) || []); + for (var a = this, n = r === void 0, i = [], s = 0, o = a.length; s < o; s++) + for (var l = a[s], u = l._private.classes, f = !1, h = 0; h < e.length; h++) { + var c = e[h], v = u.has(c), d = !1; + r || n && !v ? (u.add(c), d = !0) : (!r || n && v) && (u.delete(c), d = !0), !f && d && (i.push(l), f = !0); + } + return i.length > 0 && this.spawn(i).updateStyle().emit("class"), a; + }, + removeClass: function(e) { + return this.toggleClass(e, !1); + }, + flashClass: function(e, r) { + var a = this; + if (r == null) + r = 250; + else if (r === 0) + return a; + return a.addClass(e), setTimeout(function() { + a.removeClass(e); + }, r), a; + } + }; + Sn.className = Sn.classNames = Sn.classes; + var it = { + metaChar: "[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]", + // chars we need to escape in let names, etc + comparatorOp: "=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=", + // binary comparison op (used in data selectors) + boolOp: "\\?|\\!|\\^", + // boolean (unary) operators (used in data selectors) + string: `"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`, + // string literals (used in data selectors) -- doublequotes | singlequotes + number: vt, + // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 + meta: "degree|indegree|outdegree", + // allowed metadata fields (i.e. allowed functions to use from Collection) + separator: "\\s*,\\s*", + // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass + descendant: "\\s+", + child: "\\s+>\\s+", + subject: "\\$", + group: "node|edge|\\*", + directedEdge: "\\s+->\\s+", + undirectedEdge: "\\s+<->\\s+" + }; + it.variable = "(?:[\\w-.]|(?:\\\\" + it.metaChar + "))+", it.className = "(?:[\\w-]|(?:\\\\" + it.metaChar + "))+", it.value = it.string + "|" + it.number, it.id = it.variable, function() { + var t, e, r; + for (t = it.comparatorOp.split("|"), r = 0; r < t.length; r++) + e = t[r], it.comparatorOp += "|@" + e; + for (t = it.comparatorOp.split("|"), r = 0; r < t.length; r++) + e = t[r], !(e.indexOf("!") >= 0) && e !== "=" && (it.comparatorOp += "|\\!" + e); + }(); + var gt = function() { + return { + checks: [] + }; + }, Be = { + /** E.g. node */ + GROUP: 0, + /** A collection of elements */ + COLLECTION: 1, + /** A filter(ele) function */ + FILTER: 2, + /** E.g. [foo > 1] */ + DATA_COMPARE: 3, + /** E.g. [foo] */ + DATA_EXIST: 4, + /** E.g. [?foo] */ + DATA_BOOL: 5, + /** E.g. [[degree > 2]] */ + META_COMPARE: 6, + /** E.g. :selected */ + STATE: 7, + /** E.g. #foo */ + ID: 8, + /** E.g. .foo */ + CLASS: 9, + /** E.g. #foo <-> #bar */ + UNDIRECTED_EDGE: 10, + /** E.g. #foo -> #bar */ + DIRECTED_EDGE: 11, + /** E.g. $#foo -> #bar */ + NODE_SOURCE: 12, + /** E.g. #foo -> $#bar */ + NODE_TARGET: 13, + /** E.g. $#foo <-> #bar */ + NODE_NEIGHBOR: 14, + /** E.g. #foo > #bar */ + CHILD: 15, + /** E.g. #foo #bar */ + DESCENDANT: 16, + /** E.g. $#foo > #bar */ + PARENT: 17, + /** E.g. $#foo #bar */ + ANCESTOR: 18, + /** E.g. #foo > $bar > #baz */ + COMPOUND_SPLIT: 19, + /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ + TRUE: 20 + }, xi = [{ + selector: ":selected", + matches: function(e) { + return e.selected(); + } + }, { + selector: ":unselected", + matches: function(e) { + return !e.selected(); + } + }, { + selector: ":selectable", + matches: function(e) { + return e.selectable(); + } + }, { + selector: ":unselectable", + matches: function(e) { + return !e.selectable(); + } + }, { + selector: ":locked", + matches: function(e) { + return e.locked(); + } + }, { + selector: ":unlocked", + matches: function(e) { + return !e.locked(); + } + }, { + selector: ":visible", + matches: function(e) { + return e.visible(); + } + }, { + selector: ":hidden", + matches: function(e) { + return !e.visible(); + } + }, { + selector: ":transparent", + matches: function(e) { + return e.transparent(); + } + }, { + selector: ":grabbed", + matches: function(e) { + return e.grabbed(); + } + }, { + selector: ":free", + matches: function(e) { + return !e.grabbed(); + } + }, { + selector: ":removed", + matches: function(e) { + return e.removed(); + } + }, { + selector: ":inside", + matches: function(e) { + return !e.removed(); + } + }, { + selector: ":grabbable", + matches: function(e) { + return e.grabbable(); + } + }, { + selector: ":ungrabbable", + matches: function(e) { + return !e.grabbable(); + } + }, { + selector: ":animated", + matches: function(e) { + return e.animated(); + } + }, { + selector: ":unanimated", + matches: function(e) { + return !e.animated(); + } + }, { + selector: ":parent", + matches: function(e) { + return e.isParent(); + } + }, { + selector: ":childless", + matches: function(e) { + return e.isChildless(); + } + }, { + selector: ":child", + matches: function(e) { + return e.isChild(); + } + }, { + selector: ":orphan", + matches: function(e) { + return e.isOrphan(); + } + }, { + selector: ":nonorphan", + matches: function(e) { + return e.isChild(); + } + }, { + selector: ":compound", + matches: function(e) { + return e.isNode() ? e.isParent() : e.source().isParent() || e.target().isParent(); + } + }, { + selector: ":loop", + matches: function(e) { + return e.isLoop(); + } + }, { + selector: ":simple", + matches: function(e) { + return e.isSimple(); + } + }, { + selector: ":active", + matches: function(e) { + return e.active(); + } + }, { + selector: ":inactive", + matches: function(e) { + return !e.active(); + } + }, { + selector: ":backgrounding", + matches: function(e) { + return e.backgrounding(); + } + }, { + selector: ":nonbackgrounding", + matches: function(e) { + return !e.backgrounding(); + } + }].sort(function(t, e) { + return Ju(t.selector, e.selector); + }), _v = function() { + for (var t = {}, e, r = 0; r < xi.length; r++) + e = xi[r], t[e.selector] = e.matches; + return t; + }(), Uv = function(e, r) { + return _v[e](r); + }, Yv = "(" + xi.map(function(t) { + return t.selector; + }).join("|") + ")", la = function(e) { + return e.replace(new RegExp("\\\\(" + it.metaChar + ")", "g"), function(r, a) { + return a; + }); + }, Cr = function(e, r, a) { + e[e.length - 1] = a; + }, Ti = [{ + name: "group", + // just used for identifying when debugging + query: !0, + regex: "(" + it.group + ")", + populate: function(e, r, a) { + var n = x(a, 1), i = n[0]; + r.checks.push({ + type: Be.GROUP, + value: i === "*" ? i : i + "s" + }); + } + }, { + name: "state", + query: !0, + regex: Yv, + populate: function(e, r, a) { + var n = x(a, 1), i = n[0]; + r.checks.push({ + type: Be.STATE, + value: i + }); + } + }, { + name: "id", + query: !0, + regex: "\\#(" + it.id + ")", + populate: function(e, r, a) { + var n = x(a, 1), i = n[0]; + r.checks.push({ + type: Be.ID, + value: la(i) + }); + } + }, { + name: "className", + query: !0, + regex: "\\.(" + it.className + ")", + populate: function(e, r, a) { + var n = x(a, 1), i = n[0]; + r.checks.push({ + type: Be.CLASS, + value: la(i) + }); + } + }, { + name: "dataExists", + query: !0, + regex: "\\[\\s*(" + it.variable + ")\\s*\\]", + populate: function(e, r, a) { + var n = x(a, 1), i = n[0]; + r.checks.push({ + type: Be.DATA_EXIST, + field: la(i) + }); + } + }, { + name: "dataCompare", + query: !0, + regex: "\\[\\s*(" + it.variable + ")\\s*(" + it.comparatorOp + ")\\s*(" + it.value + ")\\s*\\]", + populate: function(e, r, a) { + var n = x(a, 3), i = n[0], s = n[1], o = n[2], l = new RegExp("^" + it.string + "$").exec(o) != null; + l ? o = o.substring(1, o.length - 1) : o = parseFloat(o), r.checks.push({ + type: Be.DATA_COMPARE, + field: la(i), + operator: s, + value: o + }); + } + }, { + name: "dataBool", + query: !0, + regex: "\\[\\s*(" + it.boolOp + ")\\s*(" + it.variable + ")\\s*\\]", + populate: function(e, r, a) { + var n = x(a, 2), i = n[0], s = n[1]; + r.checks.push({ + type: Be.DATA_BOOL, + field: la(s), + operator: i + }); + } + }, { + name: "metaCompare", + query: !0, + regex: "\\[\\[\\s*(" + it.meta + ")\\s*(" + it.comparatorOp + ")\\s*(" + it.number + ")\\s*\\]\\]", + populate: function(e, r, a) { + var n = x(a, 3), i = n[0], s = n[1], o = n[2]; + r.checks.push({ + type: Be.META_COMPARE, + field: la(i), + operator: s, + value: parseFloat(o) + }); + } + }, { + name: "nextQuery", + separator: !0, + regex: it.separator, + populate: function(e, r) { + var a = e.currentSubject, n = e.edgeCount, i = e.compoundCount, s = e[e.length - 1]; + a != null && (s.subject = a, e.currentSubject = null), s.edgeCount = n, s.compoundCount = i, e.edgeCount = 0, e.compoundCount = 0; + var o = e[e.length++] = gt(); + return o; + } + }, { + name: "directedEdge", + separator: !0, + regex: it.directedEdge, + populate: function(e, r) { + if (e.currentSubject == null) { + var a = gt(), n = r, i = gt(); + return a.checks.push({ + type: Be.DIRECTED_EDGE, + source: n, + target: i + }), Cr(e, r, a), e.edgeCount++, i; + } else { + var s = gt(), o = r, l = gt(); + return s.checks.push({ + type: Be.NODE_SOURCE, + source: o, + target: l + }), Cr(e, r, s), e.edgeCount++, l; + } + } + }, { + name: "undirectedEdge", + separator: !0, + regex: it.undirectedEdge, + populate: function(e, r) { + if (e.currentSubject == null) { + var a = gt(), n = r, i = gt(); + return a.checks.push({ + type: Be.UNDIRECTED_EDGE, + nodes: [n, i] + }), Cr(e, r, a), e.edgeCount++, i; + } else { + var s = gt(), o = r, l = gt(); + return s.checks.push({ + type: Be.NODE_NEIGHBOR, + node: o, + neighbor: l + }), Cr(e, r, s), l; + } + } + }, { + name: "child", + separator: !0, + regex: it.child, + populate: function(e, r) { + if (e.currentSubject == null) { + var a = gt(), n = gt(), i = e[e.length - 1]; + return a.checks.push({ + type: Be.CHILD, + parent: i, + child: n + }), Cr(e, r, a), e.compoundCount++, n; + } else if (e.currentSubject === r) { + var s = gt(), o = e[e.length - 1], l = gt(), u = gt(), f = gt(), h = gt(); + return s.checks.push({ + type: Be.COMPOUND_SPLIT, + left: o, + right: l, + subject: u + }), u.checks = r.checks, r.checks = [{ + type: Be.TRUE + }], h.checks.push({ + type: Be.TRUE + }), l.checks.push({ + type: Be.PARENT, + // type is swapped on right side queries + parent: h, + child: f + // empty for now + }), Cr(e, o, s), e.currentSubject = u, e.compoundCount++, f; + } else { + var c = gt(), v = gt(), d = [{ + type: Be.PARENT, + parent: c, + child: v + }]; + return c.checks = r.checks, r.checks = d, e.compoundCount++, v; + } + } + }, { + name: "descendant", + separator: !0, + regex: it.descendant, + populate: function(e, r) { + if (e.currentSubject == null) { + var a = gt(), n = gt(), i = e[e.length - 1]; + return a.checks.push({ + type: Be.DESCENDANT, + ancestor: i, + descendant: n + }), Cr(e, r, a), e.compoundCount++, n; + } else if (e.currentSubject === r) { + var s = gt(), o = e[e.length - 1], l = gt(), u = gt(), f = gt(), h = gt(); + return s.checks.push({ + type: Be.COMPOUND_SPLIT, + left: o, + right: l, + subject: u + }), u.checks = r.checks, r.checks = [{ + type: Be.TRUE + }], h.checks.push({ + type: Be.TRUE + }), l.checks.push({ + type: Be.ANCESTOR, + // type is swapped on right side queries + ancestor: h, + descendant: f + // empty for now + }), Cr(e, o, s), e.currentSubject = u, e.compoundCount++, f; + } else { + var c = gt(), v = gt(), d = [{ + type: Be.ANCESTOR, + ancestor: c, + descendant: v + }]; + return c.checks = r.checks, r.checks = d, e.compoundCount++, v; + } + } + }, { + name: "subject", + modifier: !0, + regex: it.subject, + populate: function(e, r) { + if (e.currentSubject != null && e.currentSubject !== r) + return ft("Redefinition of subject in selector `" + e.toString() + "`"), !1; + e.currentSubject = r; + var a = e[e.length - 1], n = a.checks[0], i = n == null ? null : n.type; + i === Be.DIRECTED_EDGE ? n.type = Be.NODE_TARGET : i === Be.UNDIRECTED_EDGE && (n.type = Be.NODE_NEIGHBOR, n.node = n.nodes[1], n.neighbor = n.nodes[0], n.nodes = null); + } + }]; + Ti.forEach(function(t) { + return t.regexObj = new RegExp("^" + t.regex); + }); + var Hv = function(e) { + for (var r, a, n, i = 0; i < Ti.length; i++) { + var s = Ti[i], o = s.name, l = e.match(s.regexObj); + if (l != null) { + a = l, r = s, n = o; + var u = l[0]; + e = e.substring(u.length); + break; + } + } + return { + expr: r, + match: a, + name: n, + remaining: e + }; + }, Xv = function(e) { + var r = e.match(/^\s+/); + if (r) { + var a = r[0]; + e = e.substring(a.length); + } + return e; + }, qv = function(e) { + var r = this, a = r.inputText = e, n = r[0] = gt(); + for (r.length = 1, a = Xv(a); ; ) { + var i = Hv(a); + if (i.expr == null) + return ft("The selector `" + e + "`is invalid"), !1; + var s = i.match.slice(1), o = i.expr.populate(r, n, s); + if (o === !1) + return !1; + if (o != null && (n = o), a = i.remaining, a.match(/^\s*$/)) + break; + } + var l = r[r.length - 1]; + r.currentSubject != null && (l.subject = r.currentSubject), l.edgeCount = r.edgeCount, l.compoundCount = r.compoundCount; + for (var u = 0; u < r.length; u++) { + var f = r[u]; + if (f.compoundCount > 0 && f.edgeCount > 0) + return ft("The selector `" + e + "` is invalid because it uses both a compound selector and an edge selector"), !1; + if (f.edgeCount > 1) + return ft("The selector `" + e + "` is invalid because it uses multiple edge selectors"), !1; + f.edgeCount === 1 && ft("The selector `" + e + "` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes."); + } + return !0; + }, Wv = function() { + if (this.toStringCache != null) + return this.toStringCache; + for (var e = function(f) { + return f ?? ""; + }, r = function(f) { + return j(f) ? '"' + f + '"' : e(f); + }, a = function(f) { + return " " + f + " "; + }, n = function(f, h) { + var c = f.type, v = f.value; + switch (c) { + case Be.GROUP: { + var d = e(v); + return d.substring(0, d.length - 1); + } + case Be.DATA_COMPARE: { + var g = f.field, y = f.operator; + return "[" + g + a(e(y)) + r(v) + "]"; + } + case Be.DATA_BOOL: { + var p = f.operator, m = f.field; + return "[" + e(p) + m + "]"; + } + case Be.DATA_EXIST: { + var b = f.field; + return "[" + b + "]"; + } + case Be.META_COMPARE: { + var E = f.operator, M = f.field; + return "[[" + M + a(e(E)) + r(v) + "]]"; + } + case Be.STATE: + return v; + case Be.ID: + return "#" + v; + case Be.CLASS: + return "." + v; + case Be.PARENT: + case Be.CHILD: + return i(f.parent, h) + a(">") + i(f.child, h); + case Be.ANCESTOR: + case Be.DESCENDANT: + return i(f.ancestor, h) + " " + i(f.descendant, h); + case Be.COMPOUND_SPLIT: { + var A = i(f.left, h), w = i(f.subject, h), I = i(f.right, h); + return A + (A.length > 0 ? " " : "") + w + I; + } + case Be.TRUE: + return ""; + } + }, i = function(f, h) { + return f.checks.reduce(function(c, v, d) { + return c + (h === f && d === 0 ? "$" : "") + n(v, h); + }, ""); + }, s = "", o = 0; o < this.length; o++) { + var l = this[o]; + s += i(l, l.subject), this.length > 1 && o < this.length - 1 && (s += ", "); + } + return this.toStringCache = s, s; + }, Kv = { + parse: qv, + toString: Wv + }, uo = function(e, r, a) { + var n, i = j(e), s = k(e), o = j(a), l, u, f = !1, h = !1, c = !1; + switch (r.indexOf("!") >= 0 && (r = r.replace("!", ""), h = !0), r.indexOf("@") >= 0 && (r = r.replace("@", ""), f = !0), (i || o || f) && (l = !i && !s ? "" : "" + e, u = "" + a), f && (e = l = l.toLowerCase(), a = u = u.toLowerCase()), r) { + case "*=": + n = l.indexOf(u) >= 0; + break; + case "$=": + n = l.indexOf(u, l.length - u.length) >= 0; + break; + case "^=": + n = l.indexOf(u) === 0; + break; + case "=": + n = e === a; + break; + case ">": + c = !0, n = e > a; + break; + case ">=": + c = !0, n = e >= a; + break; + case "<": + c = !0, n = e < a; + break; + case "<=": + c = !0, n = e <= a; + break; + default: + n = !1; + break; + } + return h && (e != null || !c) && (n = !n), n; + }, Zv = function(e, r) { + switch (r) { + case "?": + return !!e; + case "!": + return !e; + case "^": + return e === void 0; + } + }, Qv = function(e) { + return e !== void 0; + }, Ci = function(e, r) { + return e.data(r); + }, Jv = function(e, r) { + return e[r](); + }, Tt = [], wt = function(e, r) { + return e.checks.every(function(a) { + return Tt[a.type](a, r); + }); + }; + Tt[Be.GROUP] = function(t, e) { + var r = t.value; + return r === "*" || r === e.group(); + }, Tt[Be.STATE] = function(t, e) { + var r = t.value; + return Uv(r, e); + }, Tt[Be.ID] = function(t, e) { + var r = t.value; + return e.id() === r; + }, Tt[Be.CLASS] = function(t, e) { + var r = t.value; + return e.hasClass(r); + }, Tt[Be.META_COMPARE] = function(t, e) { + var r = t.field, a = t.operator, n = t.value; + return uo(Jv(e, r), a, n); + }, Tt[Be.DATA_COMPARE] = function(t, e) { + var r = t.field, a = t.operator, n = t.value; + return uo(Ci(e, r), a, n); + }, Tt[Be.DATA_BOOL] = function(t, e) { + var r = t.field, a = t.operator; + return Zv(Ci(e, r), a); + }, Tt[Be.DATA_EXIST] = function(t, e) { + var r = t.field; + return t.operator, Qv(Ci(e, r)); + }, Tt[Be.UNDIRECTED_EDGE] = function(t, e) { + var r = t.nodes[0], a = t.nodes[1], n = e.source(), i = e.target(); + return wt(r, n) && wt(a, i) || wt(a, n) && wt(r, i); + }, Tt[Be.NODE_NEIGHBOR] = function(t, e) { + return wt(t.node, e) && e.neighborhood().some(function(r) { + return r.isNode() && wt(t.neighbor, r); + }); + }, Tt[Be.DIRECTED_EDGE] = function(t, e) { + return wt(t.source, e.source()) && wt(t.target, e.target()); + }, Tt[Be.NODE_SOURCE] = function(t, e) { + return wt(t.source, e) && e.outgoers().some(function(r) { + return r.isNode() && wt(t.target, r); + }); + }, Tt[Be.NODE_TARGET] = function(t, e) { + return wt(t.target, e) && e.incomers().some(function(r) { + return r.isNode() && wt(t.source, r); + }); + }, Tt[Be.CHILD] = function(t, e) { + return wt(t.child, e) && wt(t.parent, e.parent()); + }, Tt[Be.PARENT] = function(t, e) { + return wt(t.parent, e) && e.children().some(function(r) { + return wt(t.child, r); + }); + }, Tt[Be.DESCENDANT] = function(t, e) { + return wt(t.descendant, e) && e.ancestors().some(function(r) { + return wt(t.ancestor, r); + }); + }, Tt[Be.ANCESTOR] = function(t, e) { + return wt(t.ancestor, e) && e.descendants().some(function(r) { + return wt(t.descendant, r); + }); + }, Tt[Be.COMPOUND_SPLIT] = function(t, e) { + return wt(t.subject, e) && wt(t.left, e) && wt(t.right, e); + }, Tt[Be.TRUE] = function() { + return !0; + }, Tt[Be.COLLECTION] = function(t, e) { + var r = t.value; + return r.has(e); + }, Tt[Be.FILTER] = function(t, e) { + var r = t.value; + return r(e); + }; + var jv = function(e) { + var r = this; + if (r.length === 1 && r[0].checks.length === 1 && r[0].checks[0].type === Be.ID) + return e.getElementById(r[0].checks[0].value).collection(); + var a = function(i) { + for (var s = 0; s < r.length; s++) { + var o = r[s]; + if (wt(o, i)) + return !0; + } + return !1; + }; + return r.text() == null && (a = function() { + return !0; + }), e.filter(a); + }, ed = function(e) { + for (var r = this, a = 0; a < r.length; a++) { + var n = r[a]; + if (wt(n, e)) + return !0; + } + return !1; + }, td = { + matches: ed, + filter: jv + }, Dr = function(e) { + this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || j(e) && e.match(/^\s*$/) || (ge(e) ? this.addQuery({ + checks: [{ + type: Be.COLLECTION, + value: e.collection() + }] + }) : Y(e) ? this.addQuery({ + checks: [{ + type: Be.FILTER, + value: e + }] + }) : j(e) ? this.parse(e) || (this.invalid = !0) : xt("A selector must be created from a string; found ")); + }, Sr = Dr.prototype; + [Kv, td].forEach(function(t) { + return Ue(Sr, t); + }), Sr.text = function() { + return this.inputText; + }, Sr.size = function() { + return this.length; + }, Sr.eq = function(t) { + return this[t]; + }, Sr.sameText = function(t) { + return !this.invalid && !t.invalid && this.text() === t.text(); + }, Sr.addQuery = function(t) { + this[this.length++] = t; + }, Sr.selector = Sr.toString; + var Lr = { + allAre: function(e) { + var r = new Dr(e); + return this.every(function(a) { + return r.matches(a); + }); + }, + is: function(e) { + var r = new Dr(e); + return this.some(function(a) { + return r.matches(a); + }); + }, + some: function(e, r) { + for (var a = 0; a < this.length; a++) { + var n = r ? e.apply(r, [this[a], a, this]) : e(this[a], a, this); + if (n) + return !0; + } + return !1; + }, + every: function(e, r) { + for (var a = 0; a < this.length; a++) { + var n = r ? e.apply(r, [this[a], a, this]) : e(this[a], a, this); + if (!n) + return !1; + } + return !0; + }, + same: function(e) { + if (this === e) + return !0; + e = this.cy().collection(e); + var r = this.length, a = e.length; + return r !== a ? !1 : r === 1 ? this[0] === e[0] : this.every(function(n) { + return e.hasElementWithId(n.id()); + }); + }, + anySame: function(e) { + return e = this.cy().collection(e), this.some(function(r) { + return e.hasElementWithId(r.id()); + }); + }, + allAreNeighbors: function(e) { + e = this.cy().collection(e); + var r = this.neighborhood(); + return e.every(function(a) { + return r.hasElementWithId(a.id()); + }); + }, + contains: function(e) { + e = this.cy().collection(e); + var r = this; + return e.every(function(a) { + return r.hasElementWithId(a.id()); + }); + } + }; + Lr.allAreNeighbours = Lr.allAreNeighbors, Lr.has = Lr.contains, Lr.equal = Lr.equals = Lr.same; + var Kt = function(e, r) { + return function(n, i, s, o) { + var l = n, u = this, f; + if (l == null ? f = "" : ge(l) && l.length === 1 && (f = l.id()), u.length === 1 && f) { + var h = u[0]._private, c = h.traversalCache = h.traversalCache || {}, v = c[r] = c[r] || [], d = kr(f), g = v[d]; + return g || (v[d] = e.call(u, n, i, s, o)); + } else + return e.call(u, n, i, s, o); + }; + }, fa = { + parent: function(e) { + var r = []; + if (this.length === 1) { + var a = this[0]._private.parent; + if (a) + return a; + } + for (var n = 0; n < this.length; n++) { + var i = this[n], s = i._private.parent; + s && r.push(s); + } + return this.spawn(r, !0).filter(e); + }, + parents: function(e) { + for (var r = [], a = this.parent(); a.nonempty(); ) { + for (var n = 0; n < a.length; n++) { + var i = a[n]; + r.push(i); + } + a = a.parent(); + } + return this.spawn(r, !0).filter(e); + }, + commonAncestors: function(e) { + for (var r, a = 0; a < this.length; a++) { + var n = this[a], i = n.parents(); + r = r || i, r = r.intersect(i); + } + return r.filter(e); + }, + orphans: function(e) { + return this.stdFilter(function(r) { + return r.isOrphan(); + }).filter(e); + }, + nonorphans: function(e) { + return this.stdFilter(function(r) { + return r.isChild(); + }).filter(e); + }, + children: Kt(function(t) { + for (var e = [], r = 0; r < this.length; r++) + for (var a = this[r], n = a._private.children, i = 0; i < n.length; i++) + e.push(n[i]); + return this.spawn(e, !0).filter(t); + }, "children"), + siblings: function(e) { + return this.parent().children().not(this).filter(e); + }, + isParent: function() { + var e = this[0]; + if (e) + return e.isNode() && e._private.children.length !== 0; + }, + isChildless: function() { + var e = this[0]; + if (e) + return e.isNode() && e._private.children.length === 0; + }, + isChild: function() { + var e = this[0]; + if (e) + return e.isNode() && e._private.parent != null; + }, + isOrphan: function() { + var e = this[0]; + if (e) + return e.isNode() && e._private.parent == null; + }, + descendants: function(e) { + var r = []; + function a(n) { + for (var i = 0; i < n.length; i++) { + var s = n[i]; + r.push(s), s.children().nonempty() && a(s.children()); + } + } + return a(this.children()), this.spawn(r, !0).filter(e); + } + }; + function Di(t, e, r, a) { + for (var n = [], i = new Jr(), s = t.cy(), o = s.hasCompoundNodes(), l = 0; l < t.length; l++) { + var u = t[l]; + r ? n.push(u) : o && a(n, i, u); + } + for (; n.length > 0; ) { + var f = n.shift(); + e(f), i.add(f.id()), o && a(n, i, f); + } + return t; + } + function lo(t, e, r) { + if (r.isParent()) + for (var a = r._private.children, n = 0; n < a.length; n++) { + var i = a[n]; + e.has(i.id()) || t.push(i); + } + } + fa.forEachDown = function(t) { + var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; + return Di(this, t, e, lo); + }; + function fo(t, e, r) { + if (r.isChild()) { + var a = r._private.parent; + e.has(a.id()) || t.push(a); + } + } + fa.forEachUp = function(t) { + var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; + return Di(this, t, e, fo); + }; + function rd(t, e, r) { + fo(t, e, r), lo(t, e, r); + } + fa.forEachUpAndDown = function(t) { + var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; + return Di(this, t, e, rd); + }, fa.ancestors = fa.parents; + var $a, ho; + $a = ho = { + data: ht.data({ + field: "data", + bindingEvent: "data", + allowBinding: !0, + allowSetting: !0, + settingEvent: "data", + settingTriggersEvent: !0, + triggerFnName: "trigger", + allowGetting: !0, + immutableKeys: { + id: !0, + source: !0, + target: !0, + parent: !0 + }, + updateStyle: !0 + }), + removeData: ht.removeData({ + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: !0, + immutableKeys: { + id: !0, + source: !0, + target: !0, + parent: !0 + }, + updateStyle: !0 + }), + scratch: ht.data({ + field: "scratch", + bindingEvent: "scratch", + allowBinding: !0, + allowSetting: !0, + settingEvent: "scratch", + settingTriggersEvent: !0, + triggerFnName: "trigger", + allowGetting: !0, + updateStyle: !0 + }), + removeScratch: ht.removeData({ + field: "scratch", + event: "scratch", + triggerFnName: "trigger", + triggerEvent: !0, + updateStyle: !0 + }), + rscratch: ht.data({ + field: "rscratch", + allowBinding: !1, + allowSetting: !0, + settingTriggersEvent: !1, + allowGetting: !0 + }), + removeRscratch: ht.removeData({ + field: "rscratch", + triggerEvent: !1 + }), + id: function() { + var e = this[0]; + if (e) + return e._private.data.id; + } + }, $a.attr = $a.data, $a.removeAttr = $a.removeData; + var ad = ho, Ln = {}; + function Si(t) { + return function(e) { + var r = this; + if (e === void 0 && (e = !0), r.length !== 0) + if (r.isNode() && !r.removed()) { + for (var a = 0, n = r[0], i = n._private.edges, s = 0; s < i.length; s++) { + var o = i[s]; + !e && o.isLoop() || (a += t(n, o)); + } + return a; + } else + return; + }; + } + Ue(Ln, { + degree: Si(function(t, e) { + return e.source().same(e.target()) ? 2 : 1; + }), + indegree: Si(function(t, e) { + return e.target().same(t) ? 1 : 0; + }), + outdegree: Si(function(t, e) { + return e.source().same(t) ? 1 : 0; + }) + }); + function ha(t, e) { + return function(r) { + for (var a, n = this.nodes(), i = 0; i < n.length; i++) { + var s = n[i], o = s[t](r); + o !== void 0 && (a === void 0 || e(o, a)) && (a = o); + } + return a; + }; + } + Ue(Ln, { + minDegree: ha("degree", function(t, e) { + return t < e; + }), + maxDegree: ha("degree", function(t, e) { + return t > e; + }), + minIndegree: ha("indegree", function(t, e) { + return t < e; + }), + maxIndegree: ha("indegree", function(t, e) { + return t > e; + }), + minOutdegree: ha("outdegree", function(t, e) { + return t < e; + }), + maxOutdegree: ha("outdegree", function(t, e) { + return t > e; + }) + }), Ue(Ln, { + totalDegree: function(e) { + for (var r = 0, a = this.nodes(), n = 0; n < a.length; n++) + r += a[n].degree(e); + return r; + } + }); + var tr, co, vo = function(e, r, a) { + for (var n = 0; n < e.length; n++) { + var i = e[n]; + if (!i.locked()) { + var s = i._private.position, o = { + x: r.x != null ? r.x - s.x : 0, + y: r.y != null ? r.y - s.y : 0 + }; + i.isParent() && !(o.x === 0 && o.y === 0) && i.children().shift(o, a), i.dirtyBoundingBoxCache(); + } + } + }, go = { + field: "position", + bindingEvent: "position", + allowBinding: !0, + allowSetting: !0, + settingEvent: "position", + settingTriggersEvent: !0, + triggerFnName: "emitAndNotify", + allowGetting: !0, + validKeys: ["x", "y"], + beforeGet: function(e) { + e.updateCompoundBounds(); + }, + beforeSet: function(e, r) { + vo(e, r, !1); + }, + onSet: function(e) { + e.dirtyCompoundBoundsCache(); + }, + canSet: function(e) { + return !e.locked(); + } + }; + tr = co = { + position: ht.data(go), + // position but no notification to renderer + silentPosition: ht.data(Ue({}, go, { + allowBinding: !1, + allowSetting: !0, + settingTriggersEvent: !1, + allowGetting: !1, + beforeSet: function(e, r) { + vo(e, r, !0); + }, + onSet: function(e) { + e.dirtyCompoundBoundsCache(); + } + })), + positions: function(e, r) { + if (L(e)) + r ? this.silentPosition(e) : this.position(e); + else if (Y(e)) { + var a = e, n = this.cy(); + n.startBatch(); + for (var i = 0; i < this.length; i++) { + var s = this[i], o = void 0; + (o = a(s, i)) && (r ? s.silentPosition(o) : s.position(o)); + } + n.endBatch(); + } + return this; + }, + silentPositions: function(e) { + return this.positions(e, !0); + }, + shift: function(e, r, a) { + var n; + if (L(e) ? (n = { + x: k(e.x) ? e.x : 0, + y: k(e.y) ? e.y : 0 + }, a = r) : j(e) && k(r) && (n = { + x: 0, + y: 0 + }, n[e] = r), n != null) { + var i = this.cy(); + i.startBatch(); + for (var s = 0; s < this.length; s++) { + var o = this[s]; + if (!(i.hasCompoundNodes() && o.isChild() && o.ancestors().anySame(this))) { + var l = o.position(), u = { + x: l.x + n.x, + y: l.y + n.y + }; + a ? o.silentPosition(u) : o.position(u); + } + } + i.endBatch(); + } + return this; + }, + silentShift: function(e, r) { + return L(e) ? this.shift(e, !0) : j(e) && k(r) && this.shift(e, r, !0), this; + }, + // get/set the rendered (i.e. on screen) positon of the element + renderedPosition: function(e, r) { + var a = this[0], n = this.cy(), i = n.zoom(), s = n.pan(), o = L(e) ? e : void 0, l = o !== void 0 || r !== void 0 && j(e); + if (a && a.isNode()) + if (l) + for (var u = 0; u < this.length; u++) { + var f = this[u]; + r !== void 0 ? f.position(e, (r - s[e]) / i) : o !== void 0 && f.position(ys(o, i, s)); + } + else { + var h = a.position(); + return o = dn(h, i, s), e === void 0 ? o : o[e]; + } + else if (!l) + return; + return this; + }, + // get/set the position relative to the parent + relativePosition: function(e, r) { + var a = this[0], n = this.cy(), i = L(e) ? e : void 0, s = i !== void 0 || r !== void 0 && j(e), o = n.hasCompoundNodes(); + if (a && a.isNode()) + if (s) + for (var l = 0; l < this.length; l++) { + var u = this[l], f = o ? u.parent() : null, h = f && f.length > 0, c = h; + h && (f = f[0]); + var v = c ? f.position() : { + x: 0, + y: 0 + }; + r !== void 0 ? u.position(e, r + v[e]) : i !== void 0 && u.position({ + x: i.x + v.x, + y: i.y + v.y + }); + } + else { + var d = a.position(), g = o ? a.parent() : null, y = g && g.length > 0, p = y; + y && (g = g[0]); + var m = p ? g.position() : { + x: 0, + y: 0 + }; + return i = { + x: d.x - m.x, + y: d.y - m.y + }, e === void 0 ? i : i[e]; + } + else if (!s) + return; + return this; + } + }, tr.modelPosition = tr.point = tr.position, tr.modelPositions = tr.points = tr.positions, tr.renderedPoint = tr.renderedPosition, tr.relativePoint = tr.relativePosition; + var nd = co, ca, Ar; + ca = Ar = {}, Ar.renderedBoundingBox = function(t) { + var e = this.boundingBox(t), r = this.cy(), a = r.zoom(), n = r.pan(), i = e.x1 * a + n.x, s = e.x2 * a + n.x, o = e.y1 * a + n.y, l = e.y2 * a + n.y; + return { + x1: i, + x2: s, + y1: o, + y2: l, + w: s - i, + h: l - o + }; + }, Ar.dirtyCompoundBoundsCache = function() { + var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, e = this.cy(); + return !e.styleEnabled() || !e.hasCompoundNodes() ? this : (this.forEachUp(function(r) { + if (r.isParent()) { + var a = r._private; + a.compoundBoundsClean = !1, a.bbCache = null, t || r.emitAndNotify("bounds"); + } + }), this); + }, Ar.updateCompoundBounds = function() { + var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, e = this.cy(); + if (!e.styleEnabled() || !e.hasCompoundNodes()) + return this; + if (!t && e.batching()) + return this; + function r(s) { + if (!s.isParent()) + return; + var o = s._private, l = s.children(), u = s.pstyle("compound-sizing-wrt-labels").value === "include", f = { + width: { + val: s.pstyle("min-width").pfValue, + left: s.pstyle("min-width-bias-left"), + right: s.pstyle("min-width-bias-right") + }, + height: { + val: s.pstyle("min-height").pfValue, + top: s.pstyle("min-height-bias-top"), + bottom: s.pstyle("min-height-bias-bottom") + } + }, h = l.boundingBox({ + includeLabels: u, + includeOverlays: !1, + // updating the compound bounds happens outside of the regular + // cache cycle (i.e. before fired events) + useCache: !1 + }), c = o.position; + (h.w === 0 || h.h === 0) && (h = { + w: s.pstyle("width").pfValue, + h: s.pstyle("height").pfValue + }, h.x1 = c.x - h.w / 2, h.x2 = c.x + h.w / 2, h.y1 = c.y - h.h / 2, h.y2 = c.y + h.h / 2); + function v(C, B, F) { + var R = 0, X = 0, z = B + F; + return C > 0 && z > 0 && (R = B / z * C, X = F / z * C), { + biasDiff: R, + biasComplementDiff: X + }; + } + function d(C, B, F, R) { + if (F.units === "%") + switch (R) { + case "width": + return C > 0 ? F.pfValue * C : 0; + case "height": + return B > 0 ? F.pfValue * B : 0; + case "average": + return C > 0 && B > 0 ? F.pfValue * (C + B) / 2 : 0; + case "min": + return C > 0 && B > 0 ? C > B ? F.pfValue * B : F.pfValue * C : 0; + case "max": + return C > 0 && B > 0 ? C > B ? F.pfValue * C : F.pfValue * B : 0; + default: + return 0; + } + else + return F.units === "px" ? F.pfValue : 0; + } + var g = f.width.left.value; + f.width.left.units === "px" && f.width.val > 0 && (g = g * 100 / f.width.val); + var y = f.width.right.value; + f.width.right.units === "px" && f.width.val > 0 && (y = y * 100 / f.width.val); + var p = f.height.top.value; + f.height.top.units === "px" && f.height.val > 0 && (p = p * 100 / f.height.val); + var m = f.height.bottom.value; + f.height.bottom.units === "px" && f.height.val > 0 && (m = m * 100 / f.height.val); + var b = v(f.width.val - h.w, g, y), E = b.biasDiff, M = b.biasComplementDiff, A = v(f.height.val - h.h, p, m), w = A.biasDiff, I = A.biasComplementDiff; + o.autoPadding = d(h.w, h.h, s.pstyle("padding"), s.pstyle("padding-relative-to").value), o.autoWidth = Math.max(h.w, f.width.val), c.x = (-E + h.x1 + h.x2 + M) / 2, o.autoHeight = Math.max(h.h, f.height.val), c.y = (-w + h.y1 + h.y2 + I) / 2; + } + for (var a = 0; a < this.length; a++) { + var n = this[a], i = n._private; + (!i.compoundBoundsClean || t) && (r(n), e.batching() || (i.compoundBoundsClean = !0)); + } + return this; + }; + var Zt = function(e) { + return e === 1 / 0 || e === -1 / 0 ? 0 : e; + }, rr = function(e, r, a, n, i) { + n - r === 0 || i - a === 0 || r == null || a == null || n == null || i == null || (e.x1 = r < e.x1 ? r : e.x1, e.x2 = n > e.x2 ? n : e.x2, e.y1 = a < e.y1 ? a : e.y1, e.y2 = i > e.y2 ? i : e.y2, e.w = e.x2 - e.x1, e.h = e.y2 - e.y1); + }, Gr = function(e, r) { + return r == null ? e : rr(e, r.x1, r.y1, r.x2, r.y2); + }, Va = function(e, r, a) { + return er(e, r, a); + }, An = function(e, r, a) { + if (!r.cy().headless()) { + var n = r._private, i = n.rstyle, s = i.arrowWidth / 2, o = r.pstyle(a + "-arrow-shape").value, l, u; + if (o !== "none") { + a === "source" ? (l = i.srcX, u = i.srcY) : a === "target" ? (l = i.tgtX, u = i.tgtY) : (l = i.midX, u = i.midY); + var f = n.arrowBounds = n.arrowBounds || {}, h = f[a] = f[a] || {}; + h.x1 = l - s, h.y1 = u - s, h.x2 = l + s, h.y2 = u + s, h.w = h.x2 - h.x1, h.h = h.y2 - h.y1, pn(h, 1), rr(e, h.x1, h.y1, h.x2, h.y2); + } + } + }, Li = function(e, r, a) { + if (!r.cy().headless()) { + var n; + a ? n = a + "-" : n = ""; + var i = r._private, s = i.rstyle, o = r.pstyle(n + "label").strValue; + if (o) { + var l = r.pstyle("text-halign"), u = r.pstyle("text-valign"), f = Va(s, "labelWidth", a), h = Va(s, "labelHeight", a), c = Va(s, "labelX", a), v = Va(s, "labelY", a), d = r.pstyle(n + "text-margin-x").pfValue, g = r.pstyle(n + "text-margin-y").pfValue, y = r.isEdge(), p = r.pstyle(n + "text-rotation"), m = r.pstyle("text-outline-width").pfValue, b = r.pstyle("text-border-width").pfValue, E = b / 2, M = r.pstyle("text-background-padding").pfValue, A = 2, w = h, I = f, C = I / 2, B = w / 2, F, R, X, z; + if (y) + F = c - C, R = c + C, X = v - B, z = v + B; + else { + switch (l.value) { + case "left": + F = c - I, R = c; + break; + case "center": + F = c - C, R = c + C; + break; + case "right": + F = c, R = c + I; + break; + } + switch (u.value) { + case "top": + X = v - w, z = v; + break; + case "center": + X = v - B, z = v + B; + break; + case "bottom": + X = v, z = v + w; + break; + } + } + F += d - Math.max(m, E) - M - A, R += d + Math.max(m, E) + M + A, X += g - Math.max(m, E) - M - A, z += g + Math.max(m, E) + M + A; + var re = a || "main", W = i.labelBounds, Z = W[re] = W[re] || {}; + Z.x1 = F, Z.y1 = X, Z.x2 = R, Z.y2 = z, Z.w = R - F, Z.h = z - X; + var ie = y && p.strValue === "autorotate", oe = p.pfValue != null && p.pfValue !== 0; + if (ie || oe) { + var de = ie ? Va(i.rstyle, "labelAngle", a) : p.pfValue, se = Math.cos(de), ve = Math.sin(de), we = (F + R) / 2, Te = (X + z) / 2; + if (!y) { + switch (l.value) { + case "left": + we = R; + break; + case "right": + we = F; + break; + } + switch (u.value) { + case "top": + Te = z; + break; + case "bottom": + Te = X; + break; + } + } + var Ee = function(qe, Re) { + return qe = qe - we, Re = Re - Te, { + x: qe * se - Re * ve + we, + y: qe * ve + Re * se + Te + }; + }, ye = Ee(F, X), ae = Ee(F, z), xe = Ee(R, X), Ce = Ee(R, z); + F = Math.min(ye.x, ae.x, xe.x, Ce.x), R = Math.max(ye.x, ae.x, xe.x, Ce.x), X = Math.min(ye.y, ae.y, xe.y, Ce.y), z = Math.max(ye.y, ae.y, xe.y, Ce.y); + } + var Oe = re + "Rot", Ie = W[Oe] = W[Oe] || {}; + Ie.x1 = F, Ie.y1 = X, Ie.x2 = R, Ie.y2 = z, Ie.w = R - F, Ie.h = z - X, rr(e, F, X, R, z), rr(i.labelBounds.all, F, X, R, z); + } + return e; + } + }, id = function(e, r) { + var a = e._private.cy, n = a.styleEnabled(), i = a.headless(), s = Ut(), o = e._private, l = e.isNode(), u = e.isEdge(), f, h, c, v, d, g, y = o.rstyle, p = l && n ? e.pstyle("bounds-expansion").pfValue : [0], m = function(Ve) { + return Ve.pstyle("display").value !== "none"; + }, b = !n || m(e) && (!u || m(e.source()) && m(e.target())); + if (b) { + var E = 0, M = 0; + n && r.includeOverlays && (E = e.pstyle("overlay-opacity").value, E !== 0 && (M = e.pstyle("overlay-padding").value)); + var A = 0, w = 0; + n && r.includeUnderlays && (A = e.pstyle("underlay-opacity").value, A !== 0 && (w = e.pstyle("underlay-padding").value)); + var I = Math.max(M, w), C = 0, B = 0; + if (n && (C = e.pstyle("width").pfValue, B = C / 2), l && r.includeNodes) { + var F = e.position(); + d = F.x, g = F.y; + var R = e.outerWidth(), X = R / 2, z = e.outerHeight(), re = z / 2; + f = d - X, h = d + X, c = g - re, v = g + re, rr(s, f, c, h, v); + } else if (u && r.includeEdges) + if (n && !i) { + var W = e.pstyle("curve-style").strValue; + if (f = Math.min(y.srcX, y.midX, y.tgtX), h = Math.max(y.srcX, y.midX, y.tgtX), c = Math.min(y.srcY, y.midY, y.tgtY), v = Math.max(y.srcY, y.midY, y.tgtY), f -= B, h += B, c -= B, v += B, rr(s, f, c, h, v), W === "haystack") { + var Z = y.haystackPts; + if (Z && Z.length === 2) { + if (f = Z[0].x, c = Z[0].y, h = Z[1].x, v = Z[1].y, f > h) { + var ie = f; + f = h, h = ie; + } + if (c > v) { + var oe = c; + c = v, v = oe; + } + rr(s, f - B, c - B, h + B, v + B); + } + } else if (W === "bezier" || W === "unbundled-bezier" || W === "segments" || W === "taxi") { + var de; + switch (W) { + case "bezier": + case "unbundled-bezier": + de = y.bezierPts; + break; + case "segments": + case "taxi": + de = y.linePts; + break; + } + if (de != null) + for (var se = 0; se < de.length; se++) { + var ve = de[se]; + f = ve.x - B, h = ve.x + B, c = ve.y - B, v = ve.y + B, rr(s, f, c, h, v); + } + } + } else { + var we = e.source(), Te = we.position(), Ee = e.target(), ye = Ee.position(); + if (f = Te.x, h = ye.x, c = Te.y, v = ye.y, f > h) { + var ae = f; + f = h, h = ae; + } + if (c > v) { + var xe = c; + c = v, v = xe; + } + f -= B, h += B, c -= B, v += B, rr(s, f, c, h, v); + } + if (n && r.includeEdges && u && (An(s, e, "mid-source"), An(s, e, "mid-target"), An(s, e, "source"), An(s, e, "target")), n) { + var Ce = e.pstyle("ghost").value === "yes"; + if (Ce) { + var Oe = e.pstyle("ghost-offset-x").pfValue, Ie = e.pstyle("ghost-offset-y").pfValue; + rr(s, s.x1 + Oe, s.y1 + Ie, s.x2 + Oe, s.y2 + Ie); + } + } + var He = o.bodyBounds = o.bodyBounds || {}; + bs(He, s), ui(He, p), pn(He, 1), n && (f = s.x1, h = s.x2, c = s.y1, v = s.y2, rr(s, f - I, c - I, h + I, v + I)); + var qe = o.overlayBounds = o.overlayBounds || {}; + bs(qe, s), ui(qe, p), pn(qe, 1); + var Re = o.labelBounds = o.labelBounds || {}; + Re.all != null ? Df(Re.all) : Re.all = Ut(), n && r.includeLabels && (r.includeMainLabels && Li(s, e, null), u && (r.includeSourceLabels && Li(s, e, "source"), r.includeTargetLabels && Li(s, e, "target"))); + } + return s.x1 = Zt(s.x1), s.y1 = Zt(s.y1), s.x2 = Zt(s.x2), s.y2 = Zt(s.y2), s.w = Zt(s.x2 - s.x1), s.h = Zt(s.y2 - s.y1), s.w > 0 && s.h > 0 && b && (ui(s, p), pn(s, 1)), s; + }, po = function(e) { + var r = 0, a = function(s) { + return (s ? 1 : 0) << r++; + }, n = 0; + return n += a(e.incudeNodes), n += a(e.includeEdges), n += a(e.includeLabels), n += a(e.includeMainLabels), n += a(e.includeSourceLabels), n += a(e.includeTargetLabels), n += a(e.includeOverlays), n; + }, yo = function(e) { + if (e.isEdge()) { + var r = e.source().position(), a = e.target().position(), n = function(s) { + return Math.round(s); + }; + return Hl([n(r.x), n(r.y), n(a.x), n(a.y)]); + } else + return 0; + }, mo = function(e, r) { + var a = e._private, n, i = e.isEdge(), s = r == null ? bo : po(r), o = s === bo, l = yo(e), u = a.bbCachePosKey === l, f = r.useCache && u, h = function(g) { + return g._private.bbCache == null || g._private.styleDirty; + }, c = !f || h(e) || i && h(e.source()) || h(e.target()); + if (c ? (u || e.recalculateRenderedStyle(f), n = id(e, _a), a.bbCache = n, a.bbCachePosKey = l) : n = a.bbCache, !o) { + var v = e.isNode(); + n = Ut(), (r.includeNodes && v || r.includeEdges && !v) && (r.includeOverlays ? Gr(n, a.overlayBounds) : Gr(n, a.bodyBounds)), r.includeLabels && (r.includeMainLabels && (!i || r.includeSourceLabels && r.includeTargetLabels) ? Gr(n, a.labelBounds.all) : (r.includeMainLabels && Gr(n, a.labelBounds.mainRot), r.includeSourceLabels && Gr(n, a.labelBounds.sourceRot), r.includeTargetLabels && Gr(n, a.labelBounds.targetRot))), n.w = n.x2 - n.x1, n.h = n.y2 - n.y1; + } + return n; + }, _a = { + includeNodes: !0, + includeEdges: !0, + includeLabels: !0, + includeMainLabels: !0, + includeSourceLabels: !0, + includeTargetLabels: !0, + includeOverlays: !0, + includeUnderlays: !0, + useCache: !0 + }, bo = po(_a), Eo = Lt(_a); + Ar.boundingBox = function(t) { + var e; + if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (t === void 0 || t.useCache === void 0 || t.useCache === !0)) + t === void 0 ? t = _a : t = Eo(t), e = mo(this[0], t); + else { + e = Ut(), t = t || _a; + var r = Eo(t), a = this, n = a.cy(), i = n.styleEnabled(); + if (i) + for (var s = 0; s < a.length; s++) { + var o = a[s], l = o._private, u = yo(o), f = l.bbCachePosKey === u, h = r.useCache && f && !l.styleDirty; + o.recalculateRenderedStyle(h); + } + this.updateCompoundBounds(!t.useCache); + for (var c = 0; c < a.length; c++) { + var v = a[c]; + Gr(e, mo(v, r)); + } + } + return e.x1 = Zt(e.x1), e.y1 = Zt(e.y1), e.x2 = Zt(e.x2), e.y2 = Zt(e.y2), e.w = Zt(e.x2 - e.x1), e.h = Zt(e.y2 - e.y1), e; + }, Ar.dirtyBoundingBoxCache = function() { + for (var t = 0; t < this.length; t++) { + var e = this[t]._private; + e.bbCache = null, e.bbCachePosKey = null, e.bodyBounds = null, e.overlayBounds = null, e.labelBounds.all = null, e.labelBounds.source = null, e.labelBounds.target = null, e.labelBounds.main = null, e.labelBounds.sourceRot = null, e.labelBounds.targetRot = null, e.labelBounds.mainRot = null, e.arrowBounds.source = null, e.arrowBounds.target = null, e.arrowBounds["mid-source"] = null, e.arrowBounds["mid-target"] = null; + } + return this.emitAndNotify("bounds"), this; + }, Ar.boundingBoxAt = function(t) { + var e = this.nodes(), r = this.cy(), a = r.hasCompoundNodes(), n = r.collection(); + if (a && (n = e.filter(function(u) { + return u.isParent(); + }), e = e.not(n)), L(t)) { + var i = t; + t = function() { + return i; + }; + } + var s = function(f, h) { + return f._private.bbAtOldPos = t(f, h); + }, o = function(f) { + return f._private.bbAtOldPos; + }; + r.startBatch(), e.forEach(s).silentPositions(t), a && (n.dirtyCompoundBoundsCache(), n.dirtyBoundingBoxCache(), n.updateCompoundBounds(!0)); + var l = Cf(this.boundingBox({ + useCache: !1 + })); + return e.silentPositions(o), a && (n.dirtyCompoundBoundsCache(), n.dirtyBoundingBoxCache(), n.updateCompoundBounds(!0)), r.endBatch(), l; + }, ca.boundingbox = ca.bb = ca.boundingBox, ca.renderedBoundingbox = ca.renderedBoundingBox; + var sd = Ar, Ua, Ya; + Ua = Ya = {}; + var wo = function(e) { + e.uppercaseName = kt(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = kt(e.outerName), Ua[e.name] = function() { + var a = this[0], n = a._private, i = n.cy, s = i._private.styleEnabled; + if (a) + if (s) { + if (a.isParent()) + return a.updateCompoundBounds(), n[e.autoName] || 0; + var o = a.pstyle(e.name); + switch (o.strValue) { + case "label": + return a.recalculateRenderedStyle(), n.rstyle[e.labelName] || 0; + default: + return o.pfValue; + } + } else + return 1; + }, Ua["outer" + e.uppercaseName] = function() { + var a = this[0], n = a._private, i = n.cy, s = i._private.styleEnabled; + if (a) + if (s) { + var o = a[e.name](), l = a.pstyle("border-width").pfValue, u = 2 * a.padding(); + return o + l + u; + } else + return 1; + }, Ua["rendered" + e.uppercaseName] = function() { + var a = this[0]; + if (a) { + var n = a[e.name](); + return n * this.cy().zoom(); + } + }, Ua["rendered" + e.uppercaseOuterName] = function() { + var a = this[0]; + if (a) { + var n = a[e.outerName](); + return n * this.cy().zoom(); + } + }; + }; + wo({ + name: "width" + }), wo({ + name: "height" + }), Ya.padding = function() { + var t = this[0], e = t._private; + return t.isParent() ? (t.updateCompoundBounds(), e.autoPadding !== void 0 ? e.autoPadding : t.pstyle("padding").pfValue) : t.pstyle("padding").pfValue; + }, Ya.paddedHeight = function() { + var t = this[0]; + return t.height() + 2 * t.padding(); + }, Ya.paddedWidth = function() { + var t = this[0]; + return t.width() + 2 * t.padding(); + }; + var od = Ya, ud = function(e, r) { + if (e.isEdge()) + return r(e); + }, ld = function(e, r) { + if (e.isEdge()) { + var a = e.cy(); + return dn(r(e), a.zoom(), a.pan()); + } + }, fd = function(e, r) { + if (e.isEdge()) { + var a = e.cy(), n = a.pan(), i = a.zoom(); + return r(e).map(function(s) { + return dn(s, i, n); + }); + } + }, hd = function(e) { + return e.renderer().getControlPoints(e); + }, cd = function(e) { + return e.renderer().getSegmentPoints(e); + }, vd = function(e) { + return e.renderer().getSourceEndpoint(e); + }, dd = function(e) { + return e.renderer().getTargetEndpoint(e); + }, gd = function(e) { + return e.renderer().getEdgeMidpoint(e); + }, xo = { + controlPoints: { + get: hd, + mult: !0 + }, + segmentPoints: { + get: cd, + mult: !0 + }, + sourceEndpoint: { + get: vd + }, + targetEndpoint: { + get: dd + }, + midpoint: { + get: gd + } + }, pd = function(e) { + return "rendered" + e[0].toUpperCase() + e.substr(1); + }, yd = Object.keys(xo).reduce(function(t, e) { + var r = xo[e], a = pd(e); + return t[e] = function() { + return ud(this, r.get); + }, r.mult ? t[a] = function() { + return fd(this, r.get); + } : t[a] = function() { + return ld(this, r.get); + }, t; + }, {}), md = Ue({}, nd, sd, od, yd); + /*! + Event object based on jQuery events, MIT license + + https://jquery.org/license/ + https://tldrlegal.com/license/mit-license + https://github.com/jquery/jquery/blob/master/src/event.js + */ + var To = function(e, r) { + this.recycle(e, r); + }; + function Ha() { + return !1; + } + function On() { + return !0; + } + To.prototype = { + instanceString: function() { + return "event"; + }, + recycle: function(e, r) { + if (this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = Ha, e != null && e.preventDefault ? (this.type = e.type, this.isDefaultPrevented = e.defaultPrevented ? On : Ha) : e != null && e.type ? r = e : this.type = e, r != null && (this.originalEvent = r.originalEvent, this.type = r.type != null ? r.type : this.type, this.cy = r.cy, this.target = r.target, this.position = r.position, this.renderedPosition = r.renderedPosition, this.namespace = r.namespace, this.layout = r.layout), this.cy != null && this.position != null && this.renderedPosition == null) { + var a = this.position, n = this.cy.zoom(), i = this.cy.pan(); + this.renderedPosition = { + x: a.x * n + i.x, + y: a.y * n + i.y + }; + } + this.timeStamp = e && e.timeStamp || Date.now(); + }, + preventDefault: function() { + this.isDefaultPrevented = On; + var e = this.originalEvent; + e && e.preventDefault && e.preventDefault(); + }, + stopPropagation: function() { + this.isPropagationStopped = On; + var e = this.originalEvent; + e && e.stopPropagation && e.stopPropagation(); + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = On, this.stopPropagation(); + }, + isDefaultPrevented: Ha, + isPropagationStopped: Ha, + isImmediatePropagationStopped: Ha + }; + var Co = /^([^.]+)(\.(?:[^.]+))?$/, bd = ".*", Do = { + qualifierCompare: function(e, r) { + return e === r; + }, + eventMatches: function() { + return !0; + }, + addEventFields: function() { + }, + callbackContext: function(e) { + return e; + }, + beforeEmit: function() { + }, + afterEmit: function() { + }, + bubble: function() { + return !1; + }, + parent: function() { + return null; + }, + context: null + }, So = Object.keys(Do), Ed = {}; + function Nn() { + for (var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ed, e = arguments.length > 1 ? arguments[1] : void 0, r = 0; r < So.length; r++) { + var a = So[r]; + this[a] = t[a] || Do[a]; + } + this.context = e || this.context, this.listeners = [], this.emitting = 0; + } + var Or = Nn.prototype, Lo = function(e, r, a, n, i, s, o) { + Y(n) && (i = n, n = null), o && (s == null ? s = o : s = Ue({}, s, o)); + for (var l = te(a) ? a : a.split(/\s+/), u = 0; u < l.length; u++) { + var f = l[u]; + if (!Pe(f)) { + var h = f.match(Co); + if (h) { + var c = h[1], v = h[2] ? h[2] : null, d = r(e, f, c, v, n, i, s); + if (d === !1) + break; + } + } + } + }, Ao = function(e, r) { + return e.addEventFields(e.context, r), new To(r.type, r); + }, wd = function(e, r, a) { + if (ct(a)) { + r(e, a); + return; + } else if (L(a)) { + r(e, Ao(e, a)); + return; + } + for (var n = te(a) ? a : a.split(/\s+/), i = 0; i < n.length; i++) { + var s = n[i]; + if (!Pe(s)) { + var o = s.match(Co); + if (o) { + var l = o[1], u = o[2] ? o[2] : null, f = Ao(e, { + type: l, + namespace: u, + target: e.context + }); + r(e, f); + } + } + } + }; + Or.on = Or.addListener = function(t, e, r, a, n) { + return Lo(this, function(i, s, o, l, u, f, h) { + Y(f) && i.listeners.push({ + event: s, + // full event string + callback: f, + // callback to run + type: o, + // the event type (e.g. 'click') + namespace: l, + // the event namespace (e.g. ".foo") + qualifier: u, + // a restriction on whether to match this emitter + conf: h + // additional configuration + }); + }, t, e, r, a, n), this; + }, Or.one = function(t, e, r, a) { + return this.on(t, e, r, a, { + one: !0 + }); + }, Or.removeListener = Or.off = function(t, e, r, a) { + var n = this; + this.emitting !== 0 && (this.listeners = Zl(this.listeners)); + for (var i = this.listeners, s = function(u) { + var f = i[u]; + Lo(n, function(h, c, v, d, g, y) { + if ((f.type === v || t === "*") && (!d && f.namespace !== ".*" || f.namespace === d) && (!g || h.qualifierCompare(f.qualifier, g)) && (!y || f.callback === y)) + return i.splice(u, 1), !1; + }, t, e, r, a); + }, o = i.length - 1; o >= 0; o--) + s(o); + return this; + }, Or.removeAllListeners = function() { + return this.removeListener("*"); + }, Or.emit = Or.trigger = function(t, e, r) { + var a = this.listeners, n = a.length; + return this.emitting++, te(e) || (e = [e]), wd(this, function(i, s) { + r != null && (a = [{ + event: s.event, + type: s.type, + namespace: s.namespace, + callback: r + }], n = a.length); + for (var o = function(f) { + var h = a[f]; + if (h.type === s.type && (!h.namespace || h.namespace === s.namespace || h.namespace === bd) && i.eventMatches(i.context, h, s)) { + var c = [s]; + e != null && Jl(c, e), i.beforeEmit(i.context, h, s), h.conf && h.conf.one && (i.listeners = i.listeners.filter(function(g) { + return g !== h; + })); + var v = i.callbackContext(i.context, h, s), d = h.callback.apply(v, c); + i.afterEmit(i.context, h, s), d === !1 && (s.stopPropagation(), s.preventDefault()); + } + }, l = 0; l < n; l++) + o(l); + i.bubble(i.context) && !s.isPropagationStopped() && i.parent(i.context).emit(s, e); + }, t), this.emitting--, this; + }; + var xd = { + qualifierCompare: function(e, r) { + return e == null || r == null ? e == null && r == null : e.sameText(r); + }, + eventMatches: function(e, r, a) { + var n = r.qualifier; + return n != null ? e !== a.target && Ae(a.target) && n.matches(a.target) : !0; + }, + addEventFields: function(e, r) { + r.cy = e.cy(), r.target = e; + }, + callbackContext: function(e, r, a) { + return r.qualifier != null ? a.target : e; + }, + beforeEmit: function(e, r) { + r.conf && r.conf.once && r.conf.onceCollection.removeListener(r.event, r.qualifier, r.callback); + }, + bubble: function() { + return !0; + }, + parent: function(e) { + return e.isChild() ? e.parent() : e.cy(); + } + }, Mn = function(e) { + return j(e) ? new Dr(e) : e; + }, Oo = { + createEmitter: function() { + for (var e = 0; e < this.length; e++) { + var r = this[e], a = r._private; + a.emitter || (a.emitter = new Nn(xd, r)); + } + return this; + }, + emitter: function() { + return this._private.emitter; + }, + on: function(e, r, a) { + for (var n = Mn(r), i = 0; i < this.length; i++) { + var s = this[i]; + s.emitter().on(e, n, a); + } + return this; + }, + removeListener: function(e, r, a) { + for (var n = Mn(r), i = 0; i < this.length; i++) { + var s = this[i]; + s.emitter().removeListener(e, n, a); + } + return this; + }, + removeAllListeners: function() { + for (var e = 0; e < this.length; e++) { + var r = this[e]; + r.emitter().removeAllListeners(); + } + return this; + }, + one: function(e, r, a) { + for (var n = Mn(r), i = 0; i < this.length; i++) { + var s = this[i]; + s.emitter().one(e, n, a); + } + return this; + }, + once: function(e, r, a) { + for (var n = Mn(r), i = 0; i < this.length; i++) { + var s = this[i]; + s.emitter().on(e, n, a, { + once: !0, + onceCollection: this + }); + } + }, + emit: function(e, r) { + for (var a = 0; a < this.length; a++) { + var n = this[a]; + n.emitter().emit(e, r); + } + return this; + }, + emitAndNotify: function(e, r) { + if (this.length !== 0) + return this.cy().notify(e, this), this.emit(e, r), this; + } + }; + ht.eventAliasesOn(Oo); + var No = { + nodes: function(e) { + return this.filter(function(r) { + return r.isNode(); + }).filter(e); + }, + edges: function(e) { + return this.filter(function(r) { + return r.isEdge(); + }).filter(e); + }, + // internal helper to get nodes and edges as separate collections with single iteration over elements + byGroup: function() { + for (var e = this.spawn(), r = this.spawn(), a = 0; a < this.length; a++) { + var n = this[a]; + n.isNode() ? e.push(n) : r.push(n); + } + return { + nodes: e, + edges: r + }; + }, + filter: function(e, r) { + if (e === void 0) + return this; + if (j(e) || ge(e)) + return new Dr(e).filter(this); + if (Y(e)) { + for (var a = this.spawn(), n = this, i = 0; i < n.length; i++) { + var s = n[i], o = r ? e.apply(r, [s, i, n]) : e(s, i, n); + o && a.push(s); + } + return a; + } + return this.spawn(); + }, + not: function(e) { + if (e) { + j(e) && (e = this.filter(e)); + for (var r = this.spawn(), a = 0; a < this.length; a++) { + var n = this[a], i = e.has(n); + i || r.push(n); + } + return r; + } else + return this; + }, + absoluteComplement: function() { + var e = this.cy(); + return e.mutableElements().not(this); + }, + intersect: function(e) { + if (j(e)) { + var r = e; + return this.filter(r); + } + for (var a = this.spawn(), n = this, i = e, s = this.length < e.length, o = s ? n : i, l = s ? i : n, u = 0; u < o.length; u++) { + var f = o[u]; + l.has(f) && a.push(f); + } + return a; + }, + xor: function(e) { + var r = this._private.cy; + j(e) && (e = r.$(e)); + var a = this.spawn(), n = this, i = e, s = function(l, u) { + for (var f = 0; f < l.length; f++) { + var h = l[f], c = h._private.data.id, v = u.hasElementWithId(c); + v || a.push(h); + } + }; + return s(n, i), s(i, n), a; + }, + diff: function(e) { + var r = this._private.cy; + j(e) && (e = r.$(e)); + var a = this.spawn(), n = this.spawn(), i = this.spawn(), s = this, o = e, l = function(f, h, c) { + for (var v = 0; v < f.length; v++) { + var d = f[v], g = d._private.data.id, y = h.hasElementWithId(g); + y ? i.merge(d) : c.push(d); + } + }; + return l(s, o, a), l(o, s, n), { + left: a, + right: n, + both: i + }; + }, + add: function(e) { + var r = this._private.cy; + if (!e) + return this; + if (j(e)) { + var a = e; + e = r.mutableElements().filter(a); + } + for (var n = this.spawnSelf(), i = 0; i < e.length; i++) { + var s = e[i], o = !this.has(s); + o && n.push(s); + } + return n; + }, + // in place merge on calling collection + merge: function(e) { + var r = this._private, a = r.cy; + if (!e) + return this; + if (e && j(e)) { + var n = e; + e = a.mutableElements().filter(n); + } + for (var i = r.map, s = 0; s < e.length; s++) { + var o = e[s], l = o._private.data.id, u = !i.has(l); + if (u) { + var f = this.length++; + this[f] = o, i.set(l, { + ele: o, + index: f + }); + } + } + return this; + }, + unmergeAt: function(e) { + var r = this[e], a = r.id(), n = this._private, i = n.map; + this[e] = void 0, i.delete(a); + var s = e === this.length - 1; + if (this.length > 1 && !s) { + var o = this.length - 1, l = this[o], u = l._private.data.id; + this[o] = void 0, this[e] = l, i.set(u, { + ele: l, + index: e + }); + } + return this.length--, this; + }, + // remove single ele in place in calling collection + unmergeOne: function(e) { + e = e[0]; + var r = this._private, a = e._private.data.id, n = r.map, i = n.get(a); + if (!i) + return this; + var s = i.index; + return this.unmergeAt(s), this; + }, + // remove eles in place on calling collection + unmerge: function(e) { + var r = this._private.cy; + if (!e) + return this; + if (e && j(e)) { + var a = e; + e = r.mutableElements().filter(a); + } + for (var n = 0; n < e.length; n++) + this.unmergeOne(e[n]); + return this; + }, + unmergeBy: function(e) { + for (var r = this.length - 1; r >= 0; r--) { + var a = this[r]; + e(a) && this.unmergeAt(r); + } + return this; + }, + map: function(e, r) { + for (var a = [], n = this, i = 0; i < n.length; i++) { + var s = n[i], o = r ? e.apply(r, [s, i, n]) : e(s, i, n); + a.push(o); + } + return a; + }, + reduce: function(e, r) { + for (var a = r, n = this, i = 0; i < n.length; i++) + a = e(a, n[i], i, n); + return a; + }, + max: function(e, r) { + for (var a = -1 / 0, n, i = this, s = 0; s < i.length; s++) { + var o = i[s], l = r ? e.apply(r, [o, s, i]) : e(o, s, i); + l > a && (a = l, n = o); + } + return { + value: a, + ele: n + }; + }, + min: function(e, r) { + for (var a = 1 / 0, n, i = this, s = 0; s < i.length; s++) { + var o = i[s], l = r ? e.apply(r, [o, s, i]) : e(o, s, i); + l < a && (a = l, n = o); + } + return { + value: a, + ele: n + }; + } + }, st = No; + st.u = st["|"] = st["+"] = st.union = st.or = st.add, st["\\"] = st["!"] = st["-"] = st.difference = st.relativeComplement = st.subtract = st.not, st.n = st["&"] = st["."] = st.and = st.intersection = st.intersect, st["^"] = st["(+)"] = st["(-)"] = st.symmetricDifference = st.symdiff = st.xor, st.fnFilter = st.filterFn = st.stdFilter = st.filter, st.complement = st.abscomp = st.absoluteComplement; + var Td = { + isNode: function() { + return this.group() === "nodes"; + }, + isEdge: function() { + return this.group() === "edges"; + }, + isLoop: function() { + return this.isEdge() && this.source()[0] === this.target()[0]; + }, + isSimple: function() { + return this.isEdge() && this.source()[0] !== this.target()[0]; + }, + group: function() { + var e = this[0]; + if (e) + return e._private.group; + } + }, Mo = function(e, r) { + var a = e.cy(), n = a.hasCompoundNodes(); + function i(f) { + var h = f.pstyle("z-compound-depth"); + return h.value === "auto" ? n ? f.zDepth() : 0 : h.value === "bottom" ? -1 : h.value === "top" ? ai : 0; + } + var s = i(e) - i(r); + if (s !== 0) + return s; + function o(f) { + var h = f.pstyle("z-index-compare"); + return h.value === "auto" && f.isNode() ? 1 : 0; + } + var l = o(e) - o(r); + if (l !== 0) + return l; + var u = e.pstyle("z-index").value - r.pstyle("z-index").value; + return u !== 0 ? u : e.poolIndex() - r.poolIndex(); + }, In = { + forEach: function(e, r) { + if (Y(e)) + for (var a = this.length, n = 0; n < a; n++) { + var i = this[n], s = r ? e.apply(r, [i, n, this]) : e(i, n, this); + if (s === !1) + break; + } + return this; + }, + toArray: function() { + for (var e = [], r = 0; r < this.length; r++) + e.push(this[r]); + return e; + }, + slice: function(e, r) { + var a = [], n = this.length; + r == null && (r = n), e == null && (e = 0), e < 0 && (e = n + e), r < 0 && (r = n + r); + for (var i = e; i >= 0 && i < r && i < n; i++) + a.push(this[i]); + return this.spawn(a); + }, + size: function() { + return this.length; + }, + eq: function(e) { + return this[e] || this.spawn(); + }, + first: function() { + return this[0] || this.spawn(); + }, + last: function() { + return this[this.length - 1] || this.spawn(); + }, + empty: function() { + return this.length === 0; + }, + nonempty: function() { + return !this.empty(); + }, + sort: function(e) { + if (!Y(e)) + return this; + var r = this.toArray().sort(e); + return this.spawn(r); + }, + sortByZIndex: function() { + return this.sort(Mo); + }, + zDepth: function() { + var e = this[0]; + if (e) { + var r = e._private, a = r.group; + if (a === "nodes") { + var n = r.data.parent ? e.parents().size() : 0; + return e.isParent() ? n : ai - 1; + } else { + var i = r.source, s = r.target, o = i.zDepth(), l = s.zDepth(); + return Math.max(o, l, 0); + } + } + } + }; + In.each = In.forEach; + var Cd = function() { + var e = "undefined", r = (typeof Symbol > "u" ? "undefined" : ee(Symbol)) != e && ee(Symbol.iterator) != e; + r && (In[Symbol.iterator] = function() { + var a = this, n = { + value: void 0, + done: !1 + }, i = 0, s = this.length; + return T({ + next: function() { + return i < s ? n.value = a[i++] : (n.value = void 0, n.done = !0), n; + } + }, Symbol.iterator, function() { + return this; + }); + }); + }; + Cd(); + var Dd = Lt({ + nodeDimensionsIncludeLabels: !1 + }), Rn = { + // Calculates and returns node dimensions { x, y } based on options given + layoutDimensions: function(e) { + e = Dd(e); + var r; + if (!this.takesUpSpace()) + r = { + w: 0, + h: 0 + }; + else if (e.nodeDimensionsIncludeLabels) { + var a = this.boundingBox(); + r = { + w: a.w, + h: a.h + }; + } else + r = { + w: this.outerWidth(), + h: this.outerHeight() + }; + return (r.w === 0 || r.h === 0) && (r.w = r.h = 1), r; + }, + // using standard layout options, apply position function (w/ or w/o animation) + layoutPositions: function(e, r, a) { + var n = this.nodes().filter(function(M) { + return !M.isParent(); + }), i = this.cy(), s = r.eles, o = function(A) { + return A.id(); + }, l = nt(a, o); + e.emit({ + type: "layoutstart", + layout: e + }), e.animations = []; + var u = function(A, w, I) { + var C = { + x: w.x1 + w.w / 2, + y: w.y1 + w.h / 2 + }, B = { + // scale from center of bounding box (not necessarily 0,0) + x: (I.x - C.x) * A, + y: (I.y - C.y) * A + }; + return { + x: C.x + B.x, + y: C.y + B.y + }; + }, f = r.spacingFactor && r.spacingFactor !== 1, h = function() { + if (!f) + return null; + for (var A = Ut(), w = 0; w < n.length; w++) { + var I = n[w], C = l(I, w); + Lf(A, C.x, C.y); + } + return A; + }, c = h(), v = nt(function(M, A) { + var w = l(M, A); + if (f) { + var I = Math.abs(r.spacingFactor); + w = u(I, c, w); + } + return r.transform != null && (w = r.transform(M, w)), w; + }, o); + if (r.animate) { + for (var d = 0; d < n.length; d++) { + var g = n[d], y = v(g, d), p = r.animateFilter == null || r.animateFilter(g, d); + if (p) { + var m = g.animation({ + position: y, + duration: r.animationDuration, + easing: r.animationEasing + }); + e.animations.push(m); + } else + g.position(y); + } + if (r.fit) { + var b = i.animation({ + fit: { + boundingBox: s.boundingBoxAt(v), + padding: r.padding + }, + duration: r.animationDuration, + easing: r.animationEasing + }); + e.animations.push(b); + } else if (r.zoom !== void 0 && r.pan !== void 0) { + var E = i.animation({ + zoom: r.zoom, + pan: r.pan, + duration: r.animationDuration, + easing: r.animationEasing + }); + e.animations.push(E); + } + e.animations.forEach(function(M) { + return M.play(); + }), e.one("layoutready", r.ready), e.emit({ + type: "layoutready", + layout: e + }), ia.all(e.animations.map(function(M) { + return M.promise(); + })).then(function() { + e.one("layoutstop", r.stop), e.emit({ + type: "layoutstop", + layout: e + }); + }); + } else + n.positions(v), r.fit && i.fit(r.eles, r.padding), r.zoom != null && i.zoom(r.zoom), r.pan && i.pan(r.pan), e.one("layoutready", r.ready), e.emit({ + type: "layoutready", + layout: e + }), e.one("layoutstop", r.stop), e.emit({ + type: "layoutstop", + layout: e + }); + return this; + }, + layout: function(e) { + var r = this.cy(); + return r.makeLayout(Ue({}, e, { + eles: this + })); + } + }; + Rn.createLayout = Rn.makeLayout = Rn.layout; + function Io(t, e, r) { + var a = r._private, n = a.styleCache = a.styleCache || [], i; + return (i = n[t]) != null || (i = n[t] = e(r)), i; + } + function kn(t, e) { + return t = kr(t), function(a) { + return Io(t, e, a); + }; + } + function Pn(t, e) { + t = kr(t); + var r = function(n) { + return e.call(n); + }; + return function() { + var n = this[0]; + if (n) + return Io(t, r, n); + }; + } + var At = { + recalculateRenderedStyle: function(e) { + var r = this.cy(), a = r.renderer(), n = r.styleEnabled(); + return a && n && a.recalculateRenderedStyle(this, e), this; + }, + dirtyStyleCache: function() { + var e = this.cy(), r = function(i) { + return i._private.styleCache = null; + }; + if (e.hasCompoundNodes()) { + var a; + a = this.spawnSelf().merge(this.descendants()).merge(this.parents()), a.merge(a.connectedEdges()), a.forEach(r); + } else + this.forEach(function(n) { + r(n), n.connectedEdges().forEach(r); + }); + return this; + }, + // fully updates (recalculates) the style for the elements + updateStyle: function(e) { + var r = this._private.cy; + if (!r.styleEnabled()) + return this; + if (r.batching()) { + var a = r._private.batchStyleEles; + return a.merge(this), this; + } + var n = r.hasCompoundNodes(), i = this; + e = !!(e || e === void 0), n && (i = this.spawnSelf().merge(this.descendants()).merge(this.parents())); + var s = i; + return e ? s.emitAndNotify("style") : s.emit("style"), i.forEach(function(o) { + return o._private.styleDirty = !0; + }), this; + }, + // private: clears dirty flag and recalculates style + cleanStyle: function() { + var e = this.cy(); + if (e.styleEnabled()) + for (var r = 0; r < this.length; r++) { + var a = this[r]; + a._private.styleDirty && (a._private.styleDirty = !1, e.style().apply(a)); + } + }, + // get the internal parsed style object for the specified property + parsedStyle: function(e) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, a = this[0], n = a.cy(); + if (n.styleEnabled() && a) { + this.cleanStyle(); + var i = a._private.style[e]; + return i ?? (r ? n.style().getDefaultProperty(e) : null); + } + }, + numericStyle: function(e) { + var r = this[0]; + if (r.cy().styleEnabled() && r) { + var a = r.pstyle(e); + return a.pfValue !== void 0 ? a.pfValue : a.value; + } + }, + numericStyleUnits: function(e) { + var r = this[0]; + if (r.cy().styleEnabled() && r) + return r.pstyle(e).units; + }, + // get the specified css property as a rendered value (i.e. on-screen value) + // or get the whole rendered style if no property specified (NB doesn't allow setting) + renderedStyle: function(e) { + var r = this.cy(); + if (!r.styleEnabled()) + return this; + var a = this[0]; + if (a) + return r.style().getRenderedStyle(a, e); + }, + // read the calculated css style of the element or override the style (via a bypass) + style: function(e, r) { + var a = this.cy(); + if (!a.styleEnabled()) + return this; + var n = !1, i = a.style(); + if (L(e)) { + var s = e; + i.applyBypass(this, s, n), this.emitAndNotify("style"); + } else if (j(e)) + if (r === void 0) { + var o = this[0]; + return o ? i.getStylePropertyValue(o, e) : void 0; + } else + i.applyBypass(this, e, r, n), this.emitAndNotify("style"); + else if (e === void 0) { + var l = this[0]; + return l ? i.getRawStyle(l) : void 0; + } + return this; + }, + removeStyle: function(e) { + var r = this.cy(); + if (!r.styleEnabled()) + return this; + var a = !1, n = r.style(), i = this; + if (e === void 0) + for (var s = 0; s < i.length; s++) { + var o = i[s]; + n.removeAllBypasses(o, a); + } + else { + e = e.split(/\s+/); + for (var l = 0; l < i.length; l++) { + var u = i[l]; + n.removeBypasses(u, e, a); + } + } + return this.emitAndNotify("style"), this; + }, + show: function() { + return this.css("display", "element"), this; + }, + hide: function() { + return this.css("display", "none"), this; + }, + effectiveOpacity: function() { + var e = this.cy(); + if (!e.styleEnabled()) + return 1; + var r = e.hasCompoundNodes(), a = this[0]; + if (a) { + var n = a._private, i = a.pstyle("opacity").value; + if (!r) + return i; + var s = n.data.parent ? a.parents() : null; + if (s) + for (var o = 0; o < s.length; o++) { + var l = s[o], u = l.pstyle("opacity").value; + i = u * i; + } + return i; + } + }, + transparent: function() { + var e = this.cy(); + if (!e.styleEnabled()) + return !1; + var r = this[0], a = r.cy().hasCompoundNodes(); + if (r) + return a ? r.effectiveOpacity() === 0 : r.pstyle("opacity").value === 0; + }, + backgrounding: function() { + var e = this.cy(); + if (!e.styleEnabled()) + return !1; + var r = this[0]; + return !!r._private.backgrounding; + } + }; + function Ai(t, e) { + var r = t._private, a = r.data.parent ? t.parents() : null; + if (a) + for (var n = 0; n < a.length; n++) { + var i = a[n]; + if (!e(i)) + return !1; + } + return !0; + } + function Oi(t) { + var e = t.ok, r = t.edgeOkViaNode || t.ok, a = t.parentOk || t.ok; + return function() { + var n = this.cy(); + if (!n.styleEnabled()) + return !0; + var i = this[0], s = n.hasCompoundNodes(); + if (i) { + var o = i._private; + if (!e(i)) + return !1; + if (i.isNode()) + return !s || Ai(i, a); + var l = o.source, u = o.target; + return r(l) && (!s || Ai(l, r)) && (l === u || r(u) && (!s || Ai(u, r))); + } + }; + } + var va = kn("eleTakesUpSpace", function(t) { + return t.pstyle("display").value === "element" && t.width() !== 0 && (t.isNode() ? t.height() !== 0 : !0); + }); + At.takesUpSpace = Pn("takesUpSpace", Oi({ + ok: va + })); + var Sd = kn("eleInteractive", function(t) { + return t.pstyle("events").value === "yes" && t.pstyle("visibility").value === "visible" && va(t); + }), Ld = kn("parentInteractive", function(t) { + return t.pstyle("visibility").value === "visible" && va(t); + }); + At.interactive = Pn("interactive", Oi({ + ok: Sd, + parentOk: Ld, + edgeOkViaNode: va + })), At.noninteractive = function() { + var t = this[0]; + if (t) + return !t.interactive(); + }; + var Ad = kn("eleVisible", function(t) { + return t.pstyle("visibility").value === "visible" && t.pstyle("opacity").pfValue !== 0 && va(t); + }), Od = va; + At.visible = Pn("visible", Oi({ + ok: Ad, + edgeOkViaNode: Od + })), At.hidden = function() { + var t = this[0]; + if (t) + return !t.visible(); + }, At.isBundledBezier = Pn("isBundledBezier", function() { + return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; + }), At.bypass = At.css = At.style, At.renderedCss = At.renderedStyle, At.removeBypass = At.removeCss = At.removeStyle, At.pstyle = At.parsedStyle; + var Nr = {}; + function Ro(t) { + return function() { + var e = arguments, r = []; + if (e.length === 2) { + var a = e[0], n = e[1]; + this.on(t.event, a, n); + } else if (e.length === 1 && Y(e[0])) { + var i = e[0]; + this.on(t.event, i); + } else if (e.length === 0 || e.length === 1 && te(e[0])) { + for (var s = e.length === 1 ? e[0] : null, o = 0; o < this.length; o++) { + var l = this[o], u = !t.ableField || l._private[t.ableField], f = l._private[t.field] != t.value; + if (t.overrideAble) { + var h = t.overrideAble(l); + if (h !== void 0 && (u = h, !h)) + return this; + } + u && (l._private[t.field] = t.value, f && r.push(l)); + } + var c = this.spawn(r); + c.updateStyle(), c.emit(t.event), s && c.emit(s); + } + return this; + }; + } + function da(t) { + Nr[t.field] = function() { + var e = this[0]; + if (e) { + if (t.overrideField) { + var r = t.overrideField(e); + if (r !== void 0) + return r; + } + return e._private[t.field]; + } + }, Nr[t.on] = Ro({ + event: t.on, + field: t.field, + ableField: t.ableField, + overrideAble: t.overrideAble, + value: !0 + }), Nr[t.off] = Ro({ + event: t.off, + field: t.field, + ableField: t.ableField, + overrideAble: t.overrideAble, + value: !1 + }); + } + da({ + field: "locked", + overrideField: function(e) { + return e.cy().autolock() ? !0 : void 0; + }, + on: "lock", + off: "unlock" + }), da({ + field: "grabbable", + overrideField: function(e) { + return e.cy().autoungrabify() || e.pannable() ? !1 : void 0; + }, + on: "grabify", + off: "ungrabify" + }), da({ + field: "selected", + ableField: "selectable", + overrideAble: function(e) { + return e.cy().autounselectify() ? !1 : void 0; + }, + on: "select", + off: "unselect" + }), da({ + field: "selectable", + overrideField: function(e) { + return e.cy().autounselectify() ? !1 : void 0; + }, + on: "selectify", + off: "unselectify" + }), Nr.deselect = Nr.unselect, Nr.grabbed = function() { + var t = this[0]; + if (t) + return t._private.grabbed; + }, da({ + field: "active", + on: "activate", + off: "unactivate" + }), da({ + field: "pannable", + on: "panify", + off: "unpanify" + }), Nr.inactive = function() { + var t = this[0]; + if (t) + return !t._private.active; + }; + var Pt = {}, ko = function(e) { + return function(a) { + for (var n = this, i = [], s = 0; s < n.length; s++) { + var o = n[s]; + if (o.isNode()) { + for (var l = !1, u = o.connectedEdges(), f = 0; f < u.length; f++) { + var h = u[f], c = h.source(), v = h.target(); + if (e.noIncomingEdges && v === o && c !== o || e.noOutgoingEdges && c === o && v !== o) { + l = !0; + break; + } + } + l || i.push(o); + } + } + return this.spawn(i, !0).filter(a); + }; + }, Po = function(e) { + return function(r) { + for (var a = this, n = [], i = 0; i < a.length; i++) { + var s = a[i]; + if (s.isNode()) + for (var o = s.connectedEdges(), l = 0; l < o.length; l++) { + var u = o[l], f = u.source(), h = u.target(); + e.outgoing && f === s ? (n.push(u), n.push(h)) : e.incoming && h === s && (n.push(u), n.push(f)); + } + } + return this.spawn(n, !0).filter(r); + }; + }, Bo = function(e) { + return function(r) { + for (var a = this, n = [], i = {}; ; ) { + var s = e.outgoing ? a.outgoers() : a.incomers(); + if (s.length === 0) + break; + for (var o = !1, l = 0; l < s.length; l++) { + var u = s[l], f = u.id(); + i[f] || (i[f] = !0, n.push(u), o = !0); + } + if (!o) + break; + a = s; + } + return this.spawn(n, !0).filter(r); + }; + }; + Pt.clearTraversalCache = function() { + for (var t = 0; t < this.length; t++) + this[t]._private.traversalCache = null; + }, Ue(Pt, { + // get the root nodes in the DAG + roots: ko({ + noIncomingEdges: !0 + }), + // get the leaf nodes in the DAG + leaves: ko({ + noOutgoingEdges: !0 + }), + // normally called children in graph theory + // these nodes =edges=> outgoing nodes + outgoers: Kt(Po({ + outgoing: !0 + }), "outgoers"), + // aka DAG descendants + successors: Bo({ + outgoing: !0 + }), + // normally called parents in graph theory + // these nodes <=edges= incoming nodes + incomers: Kt(Po({ + incoming: !0 + }), "incomers"), + // aka DAG ancestors + predecessors: Bo({ + incoming: !0 + }) + }), Ue(Pt, { + neighborhood: Kt(function(t) { + for (var e = [], r = this.nodes(), a = 0; a < r.length; a++) + for (var n = r[a], i = n.connectedEdges(), s = 0; s < i.length; s++) { + var o = i[s], l = o.source(), u = o.target(), f = n === l ? u : l; + f.length > 0 && e.push(f[0]), e.push(o[0]); + } + return this.spawn(e, !0).filter(t); + }, "neighborhood"), + closedNeighborhood: function(e) { + return this.neighborhood().add(this).filter(e); + }, + openNeighborhood: function(e) { + return this.neighborhood(e); + } + }), Pt.neighbourhood = Pt.neighborhood, Pt.closedNeighbourhood = Pt.closedNeighborhood, Pt.openNeighbourhood = Pt.openNeighborhood, Ue(Pt, { + source: Kt(function(e) { + var r = this[0], a; + return r && (a = r._private.source || r.cy().collection()), a && e ? a.filter(e) : a; + }, "source"), + target: Kt(function(e) { + var r = this[0], a; + return r && (a = r._private.target || r.cy().collection()), a && e ? a.filter(e) : a; + }, "target"), + sources: Fo({ + attr: "source" + }), + targets: Fo({ + attr: "target" + }) + }); + function Fo(t) { + return function(r) { + for (var a = [], n = 0; n < this.length; n++) { + var i = this[n], s = i._private[t.attr]; + s && a.push(s); + } + return this.spawn(a, !0).filter(r); + }; + } + Ue(Pt, { + edgesWith: Kt(zo(), "edgesWith"), + edgesTo: Kt(zo({ + thisIsSrc: !0 + }), "edgesTo") + }); + function zo(t) { + return function(r) { + var a = [], n = this._private.cy, i = t || {}; + j(r) && (r = n.$(r)); + for (var s = 0; s < r.length; s++) + for (var o = r[s]._private.edges, l = 0; l < o.length; l++) { + var u = o[l], f = u._private.data, h = this.hasElementWithId(f.source) && r.hasElementWithId(f.target), c = r.hasElementWithId(f.source) && this.hasElementWithId(f.target), v = h || c; + v && ((i.thisIsSrc || i.thisIsTgt) && (i.thisIsSrc && !h || i.thisIsTgt && !c) || a.push(u)); + } + return this.spawn(a, !0); + }; + } + Ue(Pt, { + connectedEdges: Kt(function(t) { + for (var e = [], r = this, a = 0; a < r.length; a++) { + var n = r[a]; + if (n.isNode()) + for (var i = n._private.edges, s = 0; s < i.length; s++) { + var o = i[s]; + e.push(o); + } + } + return this.spawn(e, !0).filter(t); + }, "connectedEdges"), + connectedNodes: Kt(function(t) { + for (var e = [], r = this, a = 0; a < r.length; a++) { + var n = r[a]; + n.isEdge() && (e.push(n.source()[0]), e.push(n.target()[0])); + } + return this.spawn(e, !0).filter(t); + }, "connectedNodes"), + parallelEdges: Kt(Go(), "parallelEdges"), + codirectedEdges: Kt(Go({ + codirected: !0 + }), "codirectedEdges") + }); + function Go(t) { + var e = { + codirected: !1 + }; + return t = Ue({}, e, t), function(a) { + for (var n = [], i = this.edges(), s = t, o = 0; o < i.length; o++) + for (var l = i[o], u = l._private, f = u.source, h = f._private.data.id, c = u.data.target, v = f._private.edges, d = 0; d < v.length; d++) { + var g = v[d], y = g._private.data, p = y.target, m = y.source, b = p === c && m === h, E = h === p && c === m; + (s.codirected && b || !s.codirected && (b || E)) && n.push(g); + } + return this.spawn(n, !0).filter(a); + }; + } + Ue(Pt, { + components: function(e) { + var r = this, a = r.cy(), n = a.collection(), i = e == null ? r.nodes() : e.nodes(), s = []; + e != null && i.empty() && (i = e.sources()); + var o = function(f, h) { + n.merge(f), i.unmerge(f), h.merge(f); + }; + if (i.empty()) + return r.spawn(); + var l = function() { + var f = a.collection(); + s.push(f); + var h = i[0]; + o(h, f), r.bfs({ + directed: !1, + roots: h, + visit: function(v) { + return o(v, f); + } + }), f.forEach(function(c) { + c.connectedEdges().forEach(function(v) { + r.has(v) && f.has(v.source()) && f.has(v.target()) && f.merge(v); + }); + }); + }; + do + l(); + while (i.length > 0); + return s; + }, + component: function() { + var e = this[0]; + return e.cy().mutableElements().components(e)[0]; + } + }), Pt.componentsOf = Pt.components; + var Ot = function(e, r) { + var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1; + if (e === void 0) { + xt("A collection must have a reference to the core"); + return; + } + var i = new ur(), s = !1; + if (!r) + r = []; + else if (r.length > 0 && L(r[0]) && !Ae(r[0])) { + s = !0; + for (var o = [], l = new Jr(), u = 0, f = r.length; u < f; u++) { + var h = r[u]; + h.data == null && (h.data = {}); + var c = h.data; + if (c.id == null) + c.id = ds(); + else if (e.hasElementWithId(c.id) || l.has(c.id)) + continue; + var v = new vn(e, h, !1); + o.push(v), l.add(c.id); + } + r = o; + } + this.length = 0; + for (var d = 0, g = r.length; d < g; d++) { + var y = r[d][0]; + if (y != null) { + var p = y._private.data.id; + (!a || !i.has(p)) && (a && i.set(p, { + index: this.length, + ele: y + }), this[this.length] = y, this.length++); + } + } + this._private = { + eles: this, + cy: e, + get map() { + return this.lazyMap == null && this.rebuildMap(), this.lazyMap; + }, + set map(m) { + this.lazyMap = m; + }, + rebuildMap: function() { + for (var b = this.lazyMap = new ur(), E = this.eles, M = 0; M < E.length; M++) { + var A = E[M]; + b.set(A.id(), { + index: M, + ele: A + }); + } + } + }, a && (this._private.map = i), s && !n && this.restore(); + }, mt = vn.prototype = Ot.prototype = Object.create(Array.prototype); + mt.instanceString = function() { + return "collection"; + }, mt.spawn = function(t, e) { + return new Ot(this.cy(), t, e); + }, mt.spawnSelf = function() { + return this.spawn(this); + }, mt.cy = function() { + return this._private.cy; + }, mt.renderer = function() { + return this._private.cy.renderer(); + }, mt.element = function() { + return this[0]; + }, mt.collection = function() { + return Ne(this) ? this : new Ot(this._private.cy, [this]); + }, mt.unique = function() { + return new Ot(this._private.cy, this, !0); + }, mt.hasElementWithId = function(t) { + return t = "" + t, this._private.map.has(t); + }, mt.getElementById = function(t) { + t = "" + t; + var e = this._private.cy, r = this._private.map.get(t); + return r ? r.ele : new Ot(e); + }, mt.$id = mt.getElementById, mt.poolIndex = function() { + var t = this._private.cy, e = t._private.elements, r = this[0]._private.data.id; + return e._private.map.get(r).index; + }, mt.indexOf = function(t) { + var e = t[0]._private.data.id; + return this._private.map.get(e).index; + }, mt.indexOfId = function(t) { + return t = "" + t, this._private.map.get(t).index; + }, mt.json = function(t) { + var e = this.element(), r = this.cy(); + if (e == null && t) + return this; + if (e != null) { + var a = e._private; + if (L(t)) { + if (r.startBatch(), t.data) { + e.data(t.data); + var n = a.data; + if (e.isEdge()) { + var i = !1, s = {}, o = t.data.source, l = t.data.target; + o != null && o != n.source && (s.source = "" + o, i = !0), l != null && l != n.target && (s.target = "" + l, i = !0), i && (e = e.move(s)); + } else { + var u = "parent" in t.data, f = t.data.parent; + u && (f != null || n.parent != null) && f != n.parent && (f === void 0 && (f = null), f != null && (f = "" + f), e = e.move({ + parent: f + })); + } + } + t.position && e.position(t.position); + var h = function(g, y, p) { + var m = t[g]; + m != null && m !== a[g] && (m ? e[y]() : e[p]()); + }; + return h("removed", "remove", "restore"), h("selected", "select", "unselect"), h("selectable", "selectify", "unselectify"), h("locked", "lock", "unlock"), h("grabbable", "grabify", "ungrabify"), h("pannable", "panify", "unpanify"), t.classes != null && e.classes(t.classes), r.endBatch(), this; + } else if (t === void 0) { + var c = { + data: or(a.data), + position: or(a.position), + group: a.group, + removed: a.removed, + selected: a.selected, + selectable: a.selectable, + locked: a.locked, + grabbable: a.grabbable, + pannable: a.pannable, + classes: null + }; + c.classes = ""; + var v = 0; + return a.classes.forEach(function(d) { + return c.classes += v++ === 0 ? d : " " + d; + }), c; + } + } + }, mt.jsons = function() { + for (var t = [], e = 0; e < this.length; e++) { + var r = this[e], a = r.json(); + t.push(a); + } + return t; + }, mt.clone = function() { + for (var t = this.cy(), e = [], r = 0; r < this.length; r++) { + var a = this[r], n = a.json(), i = new vn(t, n, !1); + e.push(i); + } + return new Ot(t, e); + }, mt.copy = mt.clone, mt.restore = function() { + for (var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, r = this, a = r.cy(), n = a._private, i = [], s = [], o, l = 0, u = r.length; l < u; l++) { + var f = r[l]; + e && !f.removed() || (f.isNode() ? i.push(f) : s.push(f)); + } + o = i.concat(s); + var h, c = function() { + o.splice(h, 1), h--; + }; + for (h = 0; h < o.length; h++) { + var v = o[h], d = v._private, g = d.data; + if (v.clearTraversalCache(), !(!e && !d.removed)) { + if (g.id === void 0) + g.id = ds(); + else if (k(g.id)) + g.id = "" + g.id; + else if (Pe(g.id) || !j(g.id)) { + xt("Can not create element with invalid string ID `" + g.id + "`"), c(); + continue; + } else if (a.hasElementWithId(g.id)) { + xt("Can not create second element with ID `" + g.id + "`"), c(); + continue; + } + } + var y = g.id; + if (v.isNode()) { + var p = d.position; + p.x == null && (p.x = 0), p.y == null && (p.y = 0); + } + if (v.isEdge()) { + for (var m = v, b = ["source", "target"], E = b.length, M = !1, A = 0; A < E; A++) { + var w = b[A], I = g[w]; + k(I) && (I = g[w] = "" + g[w]), I == null || I === "" ? (xt("Can not create edge `" + y + "` with unspecified " + w), M = !0) : a.hasElementWithId(I) || (xt("Can not create edge `" + y + "` with nonexistant " + w + " `" + I + "`"), M = !0); + } + if (M) { + c(); + continue; + } + var C = a.getElementById(g.source), B = a.getElementById(g.target); + C.same(B) ? C._private.edges.push(m) : (C._private.edges.push(m), B._private.edges.push(m)), m._private.source = C, m._private.target = B; + } + d.map = new ur(), d.map.set(y, { + ele: v, + index: 0 + }), d.removed = !1, e && a.addToPool(v); + } + for (var F = 0; F < i.length; F++) { + var R = i[F], X = R._private.data; + k(X.parent) && (X.parent = "" + X.parent); + var z = X.parent, re = z != null; + if (re || R._private.parent) { + var W = R._private.parent ? a.collection().merge(R._private.parent) : a.getElementById(z); + if (W.empty()) + X.parent = void 0; + else if (W[0].removed()) + ft("Node added with missing parent, reference to parent removed"), X.parent = void 0, R._private.parent = null; + else { + for (var Z = !1, ie = W; !ie.empty(); ) { + if (R.same(ie)) { + Z = !0, X.parent = void 0; + break; + } + ie = ie.parent(); + } + Z || (W[0]._private.children.push(R), R._private.parent = W[0], n.hasCompoundNodes = !0); + } + } + } + if (o.length > 0) { + for (var oe = o.length === r.length ? r : new Ot(a, o), de = 0; de < oe.length; de++) { + var se = oe[de]; + se.isNode() || (se.parallelEdges().clearTraversalCache(), se.source().clearTraversalCache(), se.target().clearTraversalCache()); + } + var ve; + n.hasCompoundNodes ? ve = a.collection().merge(oe).merge(oe.connectedNodes()).merge(oe.parent()) : ve = oe, ve.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t), t ? oe.emitAndNotify("add") : e && oe.emit("add"); + } + return r; + }, mt.removed = function() { + var t = this[0]; + return t && t._private.removed; + }, mt.inside = function() { + var t = this[0]; + return t && !t._private.removed; + }, mt.remove = function() { + var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, r = this, a = [], n = {}, i = r._private.cy; + function s(z) { + for (var re = z._private.edges, W = 0; W < re.length; W++) + l(re[W]); + } + function o(z) { + for (var re = z._private.children, W = 0; W < re.length; W++) + l(re[W]); + } + function l(z) { + var re = n[z.id()]; + e && z.removed() || re || (n[z.id()] = !0, z.isNode() ? (a.push(z), s(z), o(z)) : a.unshift(z)); + } + for (var u = 0, f = r.length; u < f; u++) { + var h = r[u]; + l(h); + } + function c(z, re) { + var W = z._private.edges; + wr(W, re), z.clearTraversalCache(); + } + function v(z) { + z.clearTraversalCache(); + } + var d = []; + d.ids = {}; + function g(z, re) { + re = re[0], z = z[0]; + var W = z._private.children, Z = z.id(); + wr(W, re), re._private.parent = null, d.ids[Z] || (d.ids[Z] = !0, d.push(z)); + } + r.dirtyCompoundBoundsCache(), e && i.removeFromPool(a); + for (var y = 0; y < a.length; y++) { + var p = a[y]; + if (p.isEdge()) { + var m = p.source()[0], b = p.target()[0]; + c(m, p), c(b, p); + for (var E = p.parallelEdges(), M = 0; M < E.length; M++) { + var A = E[M]; + v(A), A.isBundledBezier() && A.dirtyBoundingBoxCache(); + } + } else { + var w = p.parent(); + w.length !== 0 && g(w, p); + } + e && (p._private.removed = !0); + } + var I = i._private.elements; + i._private.hasCompoundNodes = !1; + for (var C = 0; C < I.length; C++) { + var B = I[C]; + if (B.isParent()) { + i._private.hasCompoundNodes = !0; + break; + } + } + var F = new Ot(this.cy(), a); + F.size() > 0 && (t ? F.emitAndNotify("remove") : e && F.emit("remove")); + for (var R = 0; R < d.length; R++) { + var X = d[R]; + (!e || !X.removed()) && X.updateStyle(); + } + return F; + }, mt.move = function(t) { + var e = this._private.cy, r = this, a = !1, n = !1, i = function(d) { + return d == null ? d : "" + d; + }; + if (t.source !== void 0 || t.target !== void 0) { + var s = i(t.source), o = i(t.target), l = s != null && e.hasElementWithId(s), u = o != null && e.hasElementWithId(o); + (l || u) && (e.batch(function() { + r.remove(a, n), r.emitAndNotify("moveout"); + for (var v = 0; v < r.length; v++) { + var d = r[v], g = d._private.data; + d.isEdge() && (l && (g.source = s), u && (g.target = o)); + } + r.restore(a, n); + }), r.emitAndNotify("move")); + } else if (t.parent !== void 0) { + var f = i(t.parent), h = f === null || e.hasElementWithId(f); + if (h) { + var c = f === null ? void 0 : f; + e.batch(function() { + var v = r.remove(a, n); + v.emitAndNotify("moveout"); + for (var d = 0; d < r.length; d++) { + var g = r[d], y = g._private.data; + g.isNode() && (y.parent = c); + } + v.restore(a, n); + }), r.emitAndNotify("move"); + } + } + return this; + }, [_s, Vv, Sn, Lr, fa, ad, Ln, md, Oo, No, Td, In, Rn, At, Nr, Pt].forEach(function(t) { + Ue(mt, t); + }); + var Nd = { + add: function(e) { + var r, a = this; + if (ge(e)) { + var n = e; + if (n._private.cy === a) + r = n.restore(); + else { + for (var i = [], s = 0; s < n.length; s++) { + var o = n[s]; + i.push(o.json()); + } + r = new Ot(a, i); + } + } else if (te(e)) { + var l = e; + r = new Ot(a, l); + } else if (L(e) && (te(e.nodes) || te(e.edges))) { + for (var u = e, f = [], h = ["nodes", "edges"], c = 0, v = h.length; c < v; c++) { + var d = h[c], g = u[d]; + if (te(g)) + for (var y = 0, p = g.length; y < p; y++) { + var m = Ue({ + group: d + }, g[y]); + f.push(m); + } + } + r = new Ot(a, f); + } else { + var b = e; + r = new vn(a, b).collection(); + } + return r; + }, + remove: function(e) { + if (!ge(e)) { + if (j(e)) { + var r = e; + e = this.$(r); + } + } + return e.remove(); + } + }; + /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + function Md(t, e, r, a) { + var n = 4, i = 1e-3, s = 1e-7, o = 10, l = 11, u = 1 / (l - 1), f = typeof Float32Array < "u"; + if (arguments.length !== 4) + return !1; + for (var h = 0; h < 4; ++h) + if (typeof arguments[h] != "number" || isNaN(arguments[h]) || !isFinite(arguments[h])) + return !1; + t = Math.min(t, 1), r = Math.min(r, 1), t = Math.max(t, 0), r = Math.max(r, 0); + var c = f ? new Float32Array(l) : new Array(l); + function v(B, F) { + return 1 - 3 * F + 3 * B; + } + function d(B, F) { + return 3 * F - 6 * B; + } + function g(B) { + return 3 * B; + } + function y(B, F, R) { + return ((v(F, R) * B + d(F, R)) * B + g(F)) * B; + } + function p(B, F, R) { + return 3 * v(F, R) * B * B + 2 * d(F, R) * B + g(F); + } + function m(B, F) { + for (var R = 0; R < n; ++R) { + var X = p(F, t, r); + if (X === 0) + return F; + var z = y(F, t, r) - B; + F -= z / X; + } + return F; + } + function b() { + for (var B = 0; B < l; ++B) + c[B] = y(B * u, t, r); + } + function E(B, F, R) { + var X, z, re = 0; + do + z = F + (R - F) / 2, X = y(z, t, r) - B, X > 0 ? R = z : F = z; + while (Math.abs(X) > s && ++re < o); + return z; + } + function M(B) { + for (var F = 0, R = 1, X = l - 1; R !== X && c[R] <= B; ++R) + F += u; + --R; + var z = (B - c[R]) / (c[R + 1] - c[R]), re = F + z * u, W = p(re, t, r); + return W >= i ? m(B, re) : W === 0 ? re : E(B, F, F + u); + } + var A = !1; + function w() { + A = !0, (t !== e || r !== a) && b(); + } + var I = function(F) { + return A || w(), t === e && r === a ? F : F === 0 ? 0 : F === 1 ? 1 : y(M(F), e, a); + }; + I.getControlPoints = function() { + return [{ + x: t, + y: e + }, { + x: r, + y: a + }]; + }; + var C = "generateBezier(" + [t, e, r, a] + ")"; + return I.toString = function() { + return C; + }, I; + } + /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + var Id = function() { + function t(a) { + return -a.tension * a.x - a.friction * a.v; + } + function e(a, n, i) { + var s = { + x: a.x + i.dx * n, + v: a.v + i.dv * n, + tension: a.tension, + friction: a.friction + }; + return { + dx: s.v, + dv: t(s) + }; + } + function r(a, n) { + var i = { + dx: a.v, + dv: t(a) + }, s = e(a, n * 0.5, i), o = e(a, n * 0.5, s), l = e(a, n, o), u = 1 / 6 * (i.dx + 2 * (s.dx + o.dx) + l.dx), f = 1 / 6 * (i.dv + 2 * (s.dv + o.dv) + l.dv); + return a.x = a.x + u * n, a.v = a.v + f * n, a; + } + return function a(n, i, s) { + var o = { + x: -1, + v: 0, + tension: null, + friction: null + }, l = [0], u = 0, f = 1 / 1e4, h = 16 / 1e3, c, v, d; + for (n = parseFloat(n) || 500, i = parseFloat(i) || 20, s = s || null, o.tension = n, o.friction = i, c = s !== null, c ? (u = a(n, i), v = u / s * h) : v = h; d = r(d || o, v), l.push(1 + d.x), u += 16, Math.abs(d.x) > f && Math.abs(d.v) > f; ) + ; + return c ? function(g) { + return l[g * (l.length - 1) | 0]; + } : u; + }; + }(), bt = function(e, r, a, n) { + var i = Md(e, r, a, n); + return function(s, o, l) { + return s + (o - s) * i(l); + }; + }, Bn = { + linear: function(e, r, a) { + return e + (r - e) * a; + }, + // default easings + ease: bt(0.25, 0.1, 0.25, 1), + "ease-in": bt(0.42, 0, 1, 1), + "ease-out": bt(0, 0, 0.58, 1), + "ease-in-out": bt(0.42, 0, 0.58, 1), + // sine + "ease-in-sine": bt(0.47, 0, 0.745, 0.715), + "ease-out-sine": bt(0.39, 0.575, 0.565, 1), + "ease-in-out-sine": bt(0.445, 0.05, 0.55, 0.95), + // quad + "ease-in-quad": bt(0.55, 0.085, 0.68, 0.53), + "ease-out-quad": bt(0.25, 0.46, 0.45, 0.94), + "ease-in-out-quad": bt(0.455, 0.03, 0.515, 0.955), + // cubic + "ease-in-cubic": bt(0.55, 0.055, 0.675, 0.19), + "ease-out-cubic": bt(0.215, 0.61, 0.355, 1), + "ease-in-out-cubic": bt(0.645, 0.045, 0.355, 1), + // quart + "ease-in-quart": bt(0.895, 0.03, 0.685, 0.22), + "ease-out-quart": bt(0.165, 0.84, 0.44, 1), + "ease-in-out-quart": bt(0.77, 0, 0.175, 1), + // quint + "ease-in-quint": bt(0.755, 0.05, 0.855, 0.06), + "ease-out-quint": bt(0.23, 1, 0.32, 1), + "ease-in-out-quint": bt(0.86, 0, 0.07, 1), + // expo + "ease-in-expo": bt(0.95, 0.05, 0.795, 0.035), + "ease-out-expo": bt(0.19, 1, 0.22, 1), + "ease-in-out-expo": bt(1, 0, 0, 1), + // circ + "ease-in-circ": bt(0.6, 0.04, 0.98, 0.335), + "ease-out-circ": bt(0.075, 0.82, 0.165, 1), + "ease-in-out-circ": bt(0.785, 0.135, 0.15, 0.86), + // user param easings... + spring: function(e, r, a) { + if (a === 0) + return Bn.linear; + var n = Id(e, r, a); + return function(i, s, o) { + return i + (s - i) * n(o); + }; + }, + "cubic-bezier": bt + }; + function $o(t, e, r, a, n) { + if (a === 1 || e === r) + return r; + var i = n(e, r, a); + return t == null || ((t.roundValue || t.color) && (i = Math.round(i)), t.min !== void 0 && (i = Math.max(i, t.min)), t.max !== void 0 && (i = Math.min(i, t.max))), i; + } + function Vo(t, e) { + return t.pfValue != null || t.value != null ? t.pfValue != null && (e == null || e.type.units !== "%") ? t.pfValue : t.value : t; + } + function ga(t, e, r, a, n) { + var i = n != null ? n.type : null; + r < 0 ? r = 0 : r > 1 && (r = 1); + var s = Vo(t, n), o = Vo(e, n); + if (k(s) && k(o)) + return $o(i, s, o, r, a); + if (te(s) && te(o)) { + for (var l = [], u = 0; u < o.length; u++) { + var f = s[u], h = o[u]; + if (f != null && h != null) { + var c = $o(i, f, h, r, a); + l.push(c); + } else + l.push(h); + } + return l; + } + } + function Rd(t, e, r, a) { + var n = !a, i = t._private, s = e._private, o = s.easing, l = s.startTime, u = a ? t : t.cy(), f = u.style(); + if (!s.easingImpl) + if (o == null) + s.easingImpl = Bn.linear; + else { + var h; + if (j(o)) { + var c = f.parse("transition-timing-function", o); + h = c.value; + } else + h = o; + var v, d; + j(h) ? (v = h, d = []) : (v = h[1], d = h.slice(2).map(function(oe) { + return +oe; + })), d.length > 0 ? (v === "spring" && d.push(s.duration), s.easingImpl = Bn[v].apply(null, d)) : s.easingImpl = Bn[v]; + } + var g = s.easingImpl, y; + if (s.duration === 0 ? y = 1 : y = (r - l) / s.duration, s.applying && (y = s.progress), y < 0 ? y = 0 : y > 1 && (y = 1), s.delay == null) { + var p = s.startPosition, m = s.position; + if (m && n && !t.locked()) { + var b = {}; + Xa(p.x, m.x) && (b.x = ga(p.x, m.x, y, g)), Xa(p.y, m.y) && (b.y = ga(p.y, m.y, y, g)), t.position(b); + } + var E = s.startPan, M = s.pan, A = i.pan, w = M != null && a; + w && (Xa(E.x, M.x) && (A.x = ga(E.x, M.x, y, g)), Xa(E.y, M.y) && (A.y = ga(E.y, M.y, y, g)), t.emit("pan")); + var I = s.startZoom, C = s.zoom, B = C != null && a; + B && (Xa(I, C) && (i.zoom = ka(i.minZoom, ga(I, C, y, g), i.maxZoom)), t.emit("zoom")), (w || B) && t.emit("viewport"); + var F = s.style; + if (F && F.length > 0 && n) { + for (var R = 0; R < F.length; R++) { + var X = F[R], z = X.name, re = X, W = s.startStyle[z], Z = f.properties[W.name], ie = ga(W, re, y, g, Z); + f.overrideBypass(t, z, ie); + } + t.emit("style"); + } + } + return s.progress = y, y; + } + function Xa(t, e) { + return t == null || e == null ? !1 : k(t) && k(e) ? !0 : !!(t && e); + } + function kd(t, e, r, a) { + var n = e._private; + n.started = !0, n.startTime = r - n.progress * n.duration; + } + function _o(t, e) { + var r = e._private.aniEles, a = []; + function n(f, h) { + var c = f._private, v = c.animation.current, d = c.animation.queue, g = !1; + if (v.length === 0) { + var y = d.shift(); + y && v.push(y); + } + for (var p = function(A) { + for (var w = A.length - 1; w >= 0; w--) { + var I = A[w]; + I(); + } + A.splice(0, A.length); + }, m = v.length - 1; m >= 0; m--) { + var b = v[m], E = b._private; + if (E.stopped) { + v.splice(m, 1), E.hooked = !1, E.playing = !1, E.started = !1, p(E.frames); + continue; + } + !E.playing && !E.applying || (E.playing && E.applying && (E.applying = !1), E.started || kd(f, b, t), Rd(f, b, t, h), E.applying && (E.applying = !1), p(E.frames), E.step != null && E.step(t), b.completed() && (v.splice(m, 1), E.hooked = !1, E.playing = !1, E.started = !1, p(E.completes)), g = !0); + } + return !h && v.length === 0 && d.length === 0 && a.push(f), g; + } + for (var i = !1, s = 0; s < r.length; s++) { + var o = r[s], l = n(o); + i = i || l; + } + var u = n(e, !0); + (i || u) && (r.length > 0 ? e.notify("draw", r) : e.notify("draw")), r.unmerge(a), e.emit("step"); + } + var Pd = { + // pull in animation functions + animate: ht.animate(), + animation: ht.animation(), + animated: ht.animated(), + clearQueue: ht.clearQueue(), + delay: ht.delay(), + delayAnimation: ht.delayAnimation(), + stop: ht.stop(), + addToAnimationPool: function(e) { + var r = this; + r.styleEnabled() && r._private.aniEles.merge(e); + }, + stopAnimationLoop: function() { + this._private.animationsRunning = !1; + }, + startAnimationLoop: function() { + var e = this; + if (e._private.animationsRunning = !0, !e.styleEnabled()) + return; + function r() { + e._private.animationsRunning && fn(function(i) { + _o(i, e), r(); + }); + } + var a = e.renderer(); + a && a.beforeRender ? a.beforeRender(function(i, s) { + _o(s, e); + }, a.beforeRenderPriorities.animations) : r(); + } + }, Bd = { + qualifierCompare: function(e, r) { + return e == null || r == null ? e == null && r == null : e.sameText(r); + }, + eventMatches: function(e, r, a) { + var n = r.qualifier; + return n != null ? e !== a.target && Ae(a.target) && n.matches(a.target) : !0; + }, + addEventFields: function(e, r) { + r.cy = e, r.target = e; + }, + callbackContext: function(e, r, a) { + return r.qualifier != null ? a.target : e; + } + }, Fn = function(e) { + return j(e) ? new Dr(e) : e; + }, Uo = { + createEmitter: function() { + var e = this._private; + return e.emitter || (e.emitter = new Nn(Bd, this)), this; + }, + emitter: function() { + return this._private.emitter; + }, + on: function(e, r, a) { + return this.emitter().on(e, Fn(r), a), this; + }, + removeListener: function(e, r, a) { + return this.emitter().removeListener(e, Fn(r), a), this; + }, + removeAllListeners: function() { + return this.emitter().removeAllListeners(), this; + }, + one: function(e, r, a) { + return this.emitter().one(e, Fn(r), a), this; + }, + once: function(e, r, a) { + return this.emitter().one(e, Fn(r), a), this; + }, + emit: function(e, r) { + return this.emitter().emit(e, r), this; + }, + emitAndNotify: function(e, r) { + return this.emit(e), this.notify(e, r), this; + } + }; + ht.eventAliasesOn(Uo); + var Ni = { + png: function(e) { + var r = this._private.renderer; + return e = e || {}, r.png(e); + }, + jpg: function(e) { + var r = this._private.renderer; + return e = e || {}, e.bg = e.bg || "#fff", r.jpg(e); + } + }; + Ni.jpeg = Ni.jpg; + var zn = { + layout: function(e) { + var r = this; + if (e == null) { + xt("Layout options must be specified to make a layout"); + return; + } + if (e.name == null) { + xt("A `name` must be specified to make a layout"); + return; + } + var a = e.name, n = r.extension("layout", a); + if (n == null) { + xt("No such layout `" + a + "` found. Did you forget to import it and `cytoscape.use()` it?"); + return; + } + var i; + j(e.eles) ? i = r.$(e.eles) : i = e.eles != null ? e.eles : r.$(); + var s = new n(Ue({}, e, { + cy: r, + eles: i + })); + return s; + } + }; + zn.createLayout = zn.makeLayout = zn.layout; + var Fd = { + notify: function(e, r) { + var a = this._private; + if (this.batching()) { + a.batchNotifications = a.batchNotifications || {}; + var n = a.batchNotifications[e] = a.batchNotifications[e] || this.collection(); + r != null && n.merge(r); + return; + } + if (a.notificationsEnabled) { + var i = this.renderer(); + this.destroyed() || !i || i.notify(e, r); + } + }, + notifications: function(e) { + var r = this._private; + return e === void 0 ? r.notificationsEnabled : (r.notificationsEnabled = !!e, this); + }, + noNotifications: function(e) { + this.notifications(!1), e(), this.notifications(!0); + }, + batching: function() { + return this._private.batchCount > 0; + }, + startBatch: function() { + var e = this._private; + return e.batchCount == null && (e.batchCount = 0), e.batchCount === 0 && (e.batchStyleEles = this.collection(), e.batchNotifications = {}), e.batchCount++, this; + }, + endBatch: function() { + var e = this._private; + if (e.batchCount === 0) + return this; + if (e.batchCount--, e.batchCount === 0) { + e.batchStyleEles.updateStyle(); + var r = this.renderer(); + Object.keys(e.batchNotifications).forEach(function(a) { + var n = e.batchNotifications[a]; + n.empty() ? r.notify(a) : r.notify(a, n); + }); + } + return this; + }, + batch: function(e) { + return this.startBatch(), e(), this.endBatch(), this; + }, + // for backwards compatibility + batchData: function(e) { + var r = this; + return this.batch(function() { + for (var a = Object.keys(e), n = 0; n < a.length; n++) { + var i = a[n], s = e[i], o = r.getElementById(i); + o.data(s); + } + }); + } + }, zd = Lt({ + hideEdgesOnViewport: !1, + textureOnViewport: !1, + motionBlur: !1, + motionBlurOpacity: 0.05, + pixelRatio: void 0, + desktopTapThreshold: 4, + touchTapThreshold: 8, + wheelSensitivity: 1, + debug: !1, + showFps: !1 + }), Mi = { + renderTo: function(e, r, a, n) { + var i = this._private.renderer; + return i.renderTo(e, r, a, n), this; + }, + renderer: function() { + return this._private.renderer; + }, + forceRender: function() { + return this.notify("draw"), this; + }, + resize: function() { + return this.invalidateSize(), this.emitAndNotify("resize"), this; + }, + initRenderer: function(e) { + var r = this, a = r.extension("renderer", e.name); + if (a == null) { + xt("Can not initialise: No such renderer `".concat(e.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); + return; + } + e.wheelSensitivity !== void 0 && ft("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); + var n = zd(e); + n.cy = r, r._private.renderer = new a(n), this.notify("init"); + }, + destroyRenderer: function() { + var e = this; + e.notify("destroy"); + var r = e.container(); + if (r) + for (r._cyreg = null; r.childNodes.length > 0; ) + r.removeChild(r.childNodes[0]); + e._private.renderer = null, e.mutableElements().forEach(function(a) { + var n = a._private; + n.rscratch = {}, n.rstyle = {}, n.animation.current = [], n.animation.queue = []; + }); + }, + onRender: function(e) { + return this.on("render", e); + }, + offRender: function(e) { + return this.off("render", e); + } + }; + Mi.invalidateDimensions = Mi.resize; + var Gn = { + // get a collection + // - empty collection on no args + // - collection of elements in the graph on selector arg + // - guarantee a returned collection when elements or collection specified + collection: function(e, r) { + return j(e) ? this.$(e) : ge(e) ? e.collection() : te(e) ? (r || (r = {}), new Ot(this, e, r.unique, r.removed)) : new Ot(this); + }, + nodes: function(e) { + var r = this.$(function(a) { + return a.isNode(); + }); + return e ? r.filter(e) : r; + }, + edges: function(e) { + var r = this.$(function(a) { + return a.isEdge(); + }); + return e ? r.filter(e) : r; + }, + // search the graph like jQuery + $: function(e) { + var r = this._private.elements; + return e ? r.filter(e) : r.spawnSelf(); + }, + mutableElements: function() { + return this._private.elements; + } + }; + Gn.elements = Gn.filter = Gn.$; + var Bt = {}, qa = "t", Gd = "f"; + Bt.apply = function(t) { + for (var e = this, r = e._private, a = r.cy, n = a.collection(), i = 0; i < t.length; i++) { + var s = t[i], o = e.getContextMeta(s); + if (!o.empty) { + var l = e.getContextStyle(o), u = e.applyContextStyle(o, l, s); + s._private.appliedInitStyle ? e.updateTransitions(s, u.diffProps) : s._private.appliedInitStyle = !0; + var f = e.updateStyleHints(s); + f && n.push(s); + } + } + return n; + }, Bt.getPropertiesDiff = function(t, e) { + var r = this, a = r._private.propDiffs = r._private.propDiffs || {}, n = t + "-" + e, i = a[n]; + if (i) + return i; + for (var s = [], o = {}, l = 0; l < r.length; l++) { + var u = r[l], f = t[l] === qa, h = e[l] === qa, c = f !== h, v = u.mappedProperties.length > 0; + if (c || h && v) { + var d = void 0; + c && v || c ? d = u.properties : v && (d = u.mappedProperties); + for (var g = 0; g < d.length; g++) { + for (var y = d[g], p = y.name, m = !1, b = l + 1; b < r.length; b++) { + var E = r[b], M = e[b] === qa; + if (M && (m = E.properties[y.name] != null, m)) + break; + } + !o[p] && !m && (o[p] = !0, s.push(p)); + } + } + } + return a[n] = s, s; + }, Bt.getContextMeta = function(t) { + for (var e = this, r = "", a, n = t._private.styleCxtKey || "", i = 0; i < e.length; i++) { + var s = e[i], o = s.selector && s.selector.matches(t); + o ? r += qa : r += Gd; + } + return a = e.getPropertiesDiff(n, r), t._private.styleCxtKey = r, { + key: r, + diffPropNames: a, + empty: a.length === 0 + }; + }, Bt.getContextStyle = function(t) { + var e = t.key, r = this, a = this._private.contextStyles = this._private.contextStyles || {}; + if (a[e]) + return a[e]; + for (var n = { + _private: { + key: e + } + }, i = 0; i < r.length; i++) { + var s = r[i], o = e[i] === qa; + if (o) + for (var l = 0; l < s.properties.length; l++) { + var u = s.properties[l]; + n[u.name] = u; + } + } + return a[e] = n, n; + }, Bt.applyContextStyle = function(t, e, r) { + for (var a = this, n = t.diffPropNames, i = {}, s = a.types, o = 0; o < n.length; o++) { + var l = n[o], u = e[l], f = r.pstyle(l); + if (!u) + if (f) + f.bypass ? u = { + name: l, + deleteBypassed: !0 + } : u = { + name: l, + delete: !0 + }; + else + continue; + if (f !== u) { + if (u.mapped === s.fn && f != null && f.mapping != null && f.mapping.value === u.value) { + var h = f.mapping, c = h.fnValue = u.value(r); + if (c === h.prevFnValue) + continue; + } + var v = i[l] = { + prev: f + }; + a.applyParsedProperty(r, u), v.next = r.pstyle(l), v.next && v.next.bypass && (v.next = v.next.bypassed); + } + } + return { + diffProps: i + }; + }, Bt.updateStyleHints = function(t) { + var e = t._private, r = this, a = r.propertyGroupNames, n = r.propertyGroupKeys, i = function(Oe, Ie, He) { + return r.getPropertiesHash(Oe, Ie, He); + }, s = e.styleKey; + if (t.removed()) + return !1; + var o = e.group === "nodes", l = t._private.style; + a = Object.keys(l); + for (var u = 0; u < n.length; u++) { + var f = n[u]; + e.styleKeys[f] = [Qr, Oa]; + } + for (var h = function(Oe, Ie) { + return e.styleKeys[Ie][0] = Na(Oe, e.styleKeys[Ie][0]); + }, c = function(Oe, Ie) { + return e.styleKeys[Ie][1] = Ma(Oe, e.styleKeys[Ie][1]); + }, v = function(Oe, Ie) { + h(Oe, Ie), c(Oe, Ie); + }, d = function(Oe, Ie) { + for (var He = 0; He < Oe.length; He++) { + var qe = Oe.charCodeAt(He); + h(qe, Ie), c(qe, Ie); + } + }, g = 2e9, y = function(Oe) { + return -128 < Oe && Oe < 128 && Math.floor(Oe) !== Oe ? g - (Oe * 1024 | 0) : Oe; + }, p = 0; p < a.length; p++) { + var m = a[p], b = l[m]; + if (b != null) { + var E = this.properties[m], M = E.type, A = E.groupKey, w = void 0; + E.hashOverride != null ? w = E.hashOverride(t, b) : b.pfValue != null && (w = b.pfValue); + var I = E.enums == null ? b.value : null, C = w != null, B = I != null, F = C || B, R = b.units; + if (M.number && F && !M.multiple) { + var X = C ? w : I; + v(y(X), A), !C && R != null && d(R, A); + } else + d(b.strValue, A); + } + } + for (var z = [Qr, Oa], re = 0; re < n.length; re++) { + var W = n[re], Z = e.styleKeys[W]; + z[0] = Na(Z[0], z[0]), z[1] = Ma(Z[1], z[1]); + } + e.styleKey = Yl(z[0], z[1]); + var ie = e.styleKeys; + e.labelDimsKey = Er(ie.labelDimensions); + var oe = i(t, ["label"], ie.labelDimensions); + if (e.labelKey = Er(oe), e.labelStyleKey = Er(hn(ie.commonLabel, oe)), !o) { + var de = i(t, ["source-label"], ie.labelDimensions); + e.sourceLabelKey = Er(de), e.sourceLabelStyleKey = Er(hn(ie.commonLabel, de)); + var se = i(t, ["target-label"], ie.labelDimensions); + e.targetLabelKey = Er(se), e.targetLabelStyleKey = Er(hn(ie.commonLabel, se)); + } + if (o) { + var ve = e.styleKeys, we = ve.nodeBody, Te = ve.nodeBorder, Ee = ve.backgroundImage, ye = ve.compound, ae = ve.pie, xe = [we, Te, Ee, ye, ae].filter(function(Ce) { + return Ce != null; + }).reduce(hn, [Qr, Oa]); + e.nodeKey = Er(xe), e.hasPie = ae != null && ae[0] !== Qr && ae[1] !== Oa; + } + return s !== e.styleKey; + }, Bt.clearStyleHints = function(t) { + var e = t._private; + e.styleCxtKey = "", e.styleKeys = {}, e.styleKey = null, e.labelKey = null, e.labelStyleKey = null, e.sourceLabelKey = null, e.sourceLabelStyleKey = null, e.targetLabelKey = null, e.targetLabelStyleKey = null, e.nodeKey = null, e.hasPie = null; + }, Bt.applyParsedProperty = function(t, e) { + var r = this, a = e, n = t._private.style, i, s = r.types, o = r.properties[a.name].type, l = a.bypass, u = n[a.name], f = u && u.bypass, h = t._private, c = "mapping", v = function(we) { + return we == null ? null : we.pfValue != null ? we.pfValue : we.value; + }, d = function() { + var we = v(u), Te = v(a); + r.checkTriggers(t, a.name, we, Te); + }; + if (a && a.name.substr(0, 3) === "pie" && ft("The pie style properties are deprecated. Create charts using background images instead."), e.name === "curve-style" && t.isEdge() && // loops must be bundled beziers + (e.value !== "bezier" && t.isLoop() || // edges connected to compound nodes can not be haystacks + e.value === "haystack" && (t.source().isParent() || t.target().isParent())) && (a = e = this.parse(e.name, "bezier", l)), a.delete) + return n[a.name] = void 0, d(), !0; + if (a.deleteBypassed) + return u ? u.bypass ? (u.bypassed = void 0, d(), !0) : !1 : (d(), !0); + if (a.deleteBypass) + return u ? u.bypass ? (n[a.name] = u.bypassed, d(), !0) : !1 : (d(), !0); + var g = function() { + ft("Do not assign mappings to elements without corresponding data (i.e. ele `" + t.id() + "` has no mapping for property `" + a.name + "` with data field `" + a.field + "`); try a `[" + a.field + "]` selector to limit scope to elements with `" + a.field + "` defined"); + }; + switch (a.mapped) { + case s.mapData: { + for (var y = a.field.split("."), p = h.data, m = 0; m < y.length && p; m++) { + var b = y[m]; + p = p[b]; + } + if (p == null) + return g(), !1; + var E; + if (k(p)) { + var M = a.fieldMax - a.fieldMin; + M === 0 ? E = 0 : E = (p - a.fieldMin) / M; + } else + return ft("Do not use continuous mappers without specifying numeric data (i.e. `" + a.field + ": " + p + "` for `" + t.id() + "` is non-numeric)"), !1; + if (E < 0 ? E = 0 : E > 1 && (E = 1), o.color) { + var A = a.valueMin[0], w = a.valueMax[0], I = a.valueMin[1], C = a.valueMax[1], B = a.valueMin[2], F = a.valueMax[2], R = a.valueMin[3] == null ? 1 : a.valueMin[3], X = a.valueMax[3] == null ? 1 : a.valueMax[3], z = [Math.round(A + (w - A) * E), Math.round(I + (C - I) * E), Math.round(B + (F - B) * E), Math.round(R + (X - R) * E)]; + i = { + // colours are simple, so just create the flat property instead of expensive string parsing + bypass: a.bypass, + // we're a bypass if the mapping property is a bypass + name: a.name, + value: z, + strValue: "rgb(" + z[0] + ", " + z[1] + ", " + z[2] + ")" + }; + } else if (o.number) { + var re = a.valueMin + (a.valueMax - a.valueMin) * E; + i = this.parse(a.name, re, a.bypass, c); + } else + return !1; + if (!i) + return g(), !1; + i.mapping = a, a = i; + break; + } + case s.data: { + for (var W = a.field.split("."), Z = h.data, ie = 0; ie < W.length && Z; ie++) { + var oe = W[ie]; + Z = Z[oe]; + } + if (Z != null && (i = this.parse(a.name, Z, a.bypass, c)), !i) + return g(), !1; + i.mapping = a, a = i; + break; + } + case s.fn: { + var de = a.value, se = a.fnValue != null ? a.fnValue : de(t); + if (a.prevFnValue = se, se == null) + return ft("Custom function mappers may not return null (i.e. `" + a.name + "` for ele `" + t.id() + "` is null)"), !1; + if (i = this.parse(a.name, se, a.bypass, c), !i) + return ft("Custom function mappers may not return invalid values for the property type (i.e. `" + a.name + "` for ele `" + t.id() + "` is invalid)"), !1; + i.mapping = or(a), a = i; + break; + } + case void 0: + break; + default: + return !1; + } + return l ? (f ? a.bypassed = u.bypassed : a.bypassed = u, n[a.name] = a) : f ? u.bypassed = a : n[a.name] = a, d(), !0; + }, Bt.cleanElements = function(t, e) { + for (var r = 0; r < t.length; r++) { + var a = t[r]; + if (this.clearStyleHints(a), a.dirtyCompoundBoundsCache(), a.dirtyBoundingBoxCache(), !e) + a._private.style = {}; + else + for (var n = a._private.style, i = Object.keys(n), s = 0; s < i.length; s++) { + var o = i[s], l = n[o]; + l != null && (l.bypass ? l.bypassed = null : n[o] = null); + } + } + }, Bt.update = function() { + var t = this._private.cy, e = t.mutableElements(); + e.updateStyle(); + }, Bt.updateTransitions = function(t, e) { + var r = this, a = t._private, n = t.pstyle("transition-property").value, i = t.pstyle("transition-duration").pfValue, s = t.pstyle("transition-delay").pfValue; + if (n.length > 0 && i > 0) { + for (var o = {}, l = !1, u = 0; u < n.length; u++) { + var f = n[u], h = t.pstyle(f), c = e[f]; + if (c) { + var v = c.prev, d = v, g = c.next != null ? c.next : h, y = !1, p = void 0, m = 1e-6; + d && (k(d.pfValue) && k(g.pfValue) ? (y = g.pfValue - d.pfValue, p = d.pfValue + m * y) : k(d.value) && k(g.value) ? (y = g.value - d.value, p = d.value + m * y) : te(d.value) && te(g.value) && (y = d.value[0] !== g.value[0] || d.value[1] !== g.value[1] || d.value[2] !== g.value[2], p = d.strValue), y && (o[f] = g.strValue, this.applyBypass(t, f, p), l = !0)); + } + } + if (!l) + return; + a.transitioning = !0, new ia(function(b) { + s > 0 ? t.delayAnimation(s).play().promise().then(b) : b(); + }).then(function() { + return t.animation({ + style: o, + duration: i, + easing: t.pstyle("transition-timing-function").value, + queue: !1 + }).play().promise(); + }).then(function() { + r.removeBypasses(t, n), t.emitAndNotify("style"), a.transitioning = !1; + }); + } else + a.transitioning && (this.removeBypasses(t, n), t.emitAndNotify("style"), a.transitioning = !1); + }, Bt.checkTrigger = function(t, e, r, a, n, i) { + var s = this.properties[e], o = n(s); + o != null && o(r, a) && i(s); + }, Bt.checkZOrderTrigger = function(t, e, r, a) { + var n = this; + this.checkTrigger(t, e, r, a, function(i) { + return i.triggersZOrder; + }, function() { + n._private.cy.notify("zorder", t); + }); + }, Bt.checkBoundsTrigger = function(t, e, r, a) { + this.checkTrigger(t, e, r, a, function(n) { + return n.triggersBounds; + }, function(n) { + t.dirtyCompoundBoundsCache(), t.dirtyBoundingBoxCache(), // only for beziers -- so performance of other edges isn't affected + n.triggersBoundsOfParallelBeziers && (e === "curve-style" && (r === "bezier" || a === "bezier") || e === "display" && (r === "none" || a === "none")) && t.parallelEdges().forEach(function(i) { + i.isBundledBezier() && i.dirtyBoundingBoxCache(); + }); + }); + }, Bt.checkTriggers = function(t, e, r, a) { + t.dirtyStyleCache(), this.checkZOrderTrigger(t, e, r, a), this.checkBoundsTrigger(t, e, r, a); + }; + var Wa = {}; + Wa.applyBypass = function(t, e, r, a) { + var n = this, i = [], s = !0; + if (e === "*" || e === "**") { + if (r !== void 0) + for (var o = 0; o < n.properties.length; o++) { + var l = n.properties[o], u = l.name, f = this.parse(u, r, !0); + f && i.push(f); + } + } else if (j(e)) { + var h = this.parse(e, r, !0); + h && i.push(h); + } else if (L(e)) { + var c = e; + a = r; + for (var v = Object.keys(c), d = 0; d < v.length; d++) { + var g = v[d], y = c[g]; + if (y === void 0 && (y = c[pt(g)]), y !== void 0) { + var p = this.parse(g, y, !0); + p && i.push(p); + } + } + } else + return !1; + if (i.length === 0) + return !1; + for (var m = !1, b = 0; b < t.length; b++) { + for (var E = t[b], M = {}, A = void 0, w = 0; w < i.length; w++) { + var I = i[w]; + if (a) { + var C = E.pstyle(I.name); + A = M[I.name] = { + prev: C + }; + } + m = this.applyParsedProperty(E, or(I)) || m, a && (A.next = E.pstyle(I.name)); + } + m && this.updateStyleHints(E), a && this.updateTransitions(E, M, s); + } + return m; + }, Wa.overrideBypass = function(t, e, r) { + e = je(e); + for (var a = 0; a < t.length; a++) { + var n = t[a], i = n._private.style[e], s = this.properties[e].type, o = s.color, l = s.mutiple, u = i ? i.pfValue != null ? i.pfValue : i.value : null; + !i || !i.bypass ? this.applyBypass(n, e, r) : (i.value = r, i.pfValue != null && (i.pfValue = r), o ? i.strValue = "rgb(" + r.join(",") + ")" : l ? i.strValue = r.join(" ") : i.strValue = "" + r, this.updateStyleHints(n)), this.checkTriggers(n, e, u, r); + } + }, Wa.removeAllBypasses = function(t, e) { + return this.removeBypasses(t, this.propertyNames, e); + }, Wa.removeBypasses = function(t, e, r) { + for (var a = !0, n = 0; n < t.length; n++) { + for (var i = t[n], s = {}, o = 0; o < e.length; o++) { + var l = e[o], u = this.properties[l], f = i.pstyle(u.name); + if (!(!f || !f.bypass)) { + var h = "", c = this.parse(l, h, !0), v = s[u.name] = { + prev: f + }; + this.applyParsedProperty(i, c), v.next = i.pstyle(u.name); + } + } + this.updateStyleHints(i), r && this.updateTransitions(i, s, a); + } + }; + var Ii = {}; + Ii.getEmSizeInPixels = function() { + var t = this.containerCss("font-size"); + return t != null ? parseFloat(t) : 1; + }, Ii.containerCss = function(t) { + var e = this._private.cy, r = e.container(); + if (D && r && D.getComputedStyle) + return D.getComputedStyle(r).getPropertyValue(t); + }; + var lr = {}; + lr.getRenderedStyle = function(t, e) { + return e ? this.getStylePropertyValue(t, e, !0) : this.getRawStyle(t, !0); + }, lr.getRawStyle = function(t, e) { + var r = this; + if (t = t[0], t) { + for (var a = {}, n = 0; n < r.properties.length; n++) { + var i = r.properties[n], s = r.getStylePropertyValue(t, i.name, e); + s != null && (a[i.name] = s, a[pt(i.name)] = s); + } + return a; + } + }, lr.getIndexedStyle = function(t, e, r, a) { + var n = t.pstyle(e)[r][a]; + return n ?? t.cy().style().getDefaultProperty(e)[r][0]; + }, lr.getStylePropertyValue = function(t, e, r) { + var a = this; + if (t = t[0], t) { + var n = a.properties[e]; + n.alias && (n = n.pointsTo); + var i = n.type, s = t.pstyle(n.name); + if (s) { + var o = s.value, l = s.units, u = s.strValue; + if (r && i.number && o != null && k(o)) { + var f = t.cy().zoom(), h = function(y) { + return y * f; + }, c = function(y, p) { + return h(y) + p; + }, v = te(o), d = v ? l.every(function(g) { + return g != null; + }) : l != null; + return d ? v ? o.map(function(g, y) { + return c(g, l[y]); + }).join(" ") : c(o, l) : v ? o.map(function(g) { + return j(g) ? g : "" + h(g); + }).join(" ") : "" + h(o); + } else if (u != null) + return u; + } + return null; + } + }, lr.getAnimationStartStyle = function(t, e) { + for (var r = {}, a = 0; a < e.length; a++) { + var n = e[a], i = n.name, s = t.pstyle(i); + s !== void 0 && (L(s) ? s = this.parse(i, s.strValue) : s = this.parse(i, s)), s && (r[i] = s); + } + return r; + }, lr.getPropsList = function(t) { + var e = this, r = [], a = t, n = e.properties; + if (a) + for (var i = Object.keys(a), s = 0; s < i.length; s++) { + var o = i[s], l = a[o], u = n[o] || n[je(o)], f = this.parse(u.name, l); + f && r.push(f); + } + return r; + }, lr.getNonDefaultPropertiesHash = function(t, e, r) { + var a = r.slice(), n, i, s, o, l, u; + for (l = 0; l < e.length; l++) + if (n = e[l], i = t.pstyle(n, !1), i != null) + if (i.pfValue != null) + a[0] = Na(o, a[0]), a[1] = Ma(o, a[1]); + else + for (s = i.strValue, u = 0; u < s.length; u++) + o = s.charCodeAt(u), a[0] = Na(o, a[0]), a[1] = Ma(o, a[1]); + return a; + }, lr.getPropertiesHash = lr.getNonDefaultPropertiesHash; + var $n = {}; + $n.appendFromJson = function(t) { + for (var e = this, r = 0; r < t.length; r++) { + var a = t[r], n = a.selector, i = a.style || a.css, s = Object.keys(i); + e.selector(n); + for (var o = 0; o < s.length; o++) { + var l = s[o], u = i[l]; + e.css(l, u); + } + } + return e; + }, $n.fromJson = function(t) { + var e = this; + return e.resetToDefault(), e.appendFromJson(t), e; + }, $n.json = function() { + for (var t = [], e = this.defaultLength; e < this.length; e++) { + for (var r = this[e], a = r.selector, n = r.properties, i = {}, s = 0; s < n.length; s++) { + var o = n[s]; + i[o.name] = o.strValue; + } + t.push({ + selector: a ? a.toString() : "core", + style: i + }); + } + return t; + }; + var Ri = {}; + Ri.appendFromString = function(t) { + var e = this, r = this, a = "" + t, n, i, s; + a = a.replace(/[/][*](\s|.)+?[*][/]/g, ""); + function o() { + a.length > n.length ? a = a.substr(n.length) : a = ""; + } + function l() { + i.length > s.length ? i = i.substr(s.length) : i = ""; + } + for (; ; ) { + var u = a.match(/^\s*$/); + if (u) + break; + var f = a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); + if (!f) { + ft("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + a); + break; + } + n = f[0]; + var h = f[1]; + if (h !== "core") { + var c = new Dr(h); + if (c.invalid) { + ft("Skipping parsing of block: Invalid selector found in string stylesheet: " + h), o(); + continue; + } + } + var v = f[2], d = !1; + i = v; + for (var g = []; ; ) { + var y = i.match(/^\s*$/); + if (y) + break; + var p = i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); + if (!p) { + ft("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + v), d = !0; + break; + } + s = p[0]; + var m = p[1], b = p[2], E = e.properties[m]; + if (!E) { + ft("Skipping property: Invalid property name in: " + s), l(); + continue; + } + var M = r.parse(m, b); + if (!M) { + ft("Skipping property: Invalid property definition in: " + s), l(); + continue; + } + g.push({ + name: m, + val: b + }), l(); + } + if (d) { + o(); + break; + } + r.selector(h); + for (var A = 0; A < g.length; A++) { + var w = g[A]; + r.css(w.name, w.val); + } + o(); + } + return r; + }, Ri.fromString = function(t) { + var e = this; + return e.resetToDefault(), e.appendFromString(t), e; + }; + var Nt = {}; + (function() { + var t = vt, e = qt, r = Kr, a = Da, n = jt, i = function(xe) { + return "^" + xe + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; + }, s = function(xe) { + var Ce = t + "|\\w+|" + e + "|" + r + "|" + a + "|" + n; + return "^" + xe + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + t + ")\\s*\\,\\s*(" + t + ")\\s*,\\s*(" + Ce + ")\\s*\\,\\s*(" + Ce + ")\\)$"; + }, o = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; + Nt.types = { + time: { + number: !0, + min: 0, + units: "s|ms", + implicitUnits: "ms" + }, + percent: { + number: !0, + min: 0, + max: 100, + units: "%", + implicitUnits: "%" + }, + percentages: { + number: !0, + min: 0, + max: 100, + units: "%", + implicitUnits: "%", + multiple: !0 + }, + zeroOneNumber: { + number: !0, + min: 0, + max: 1, + unitless: !0 + }, + zeroOneNumbers: { + number: !0, + min: 0, + max: 1, + unitless: !0, + multiple: !0 + }, + nOneOneNumber: { + number: !0, + min: -1, + max: 1, + unitless: !0 + }, + nonNegativeInt: { + number: !0, + min: 0, + integer: !0, + unitless: !0 + }, + position: { + enums: ["parent", "origin"] + }, + nodeSize: { + number: !0, + min: 0, + enums: ["label"] + }, + number: { + number: !0, + unitless: !0 + }, + numbers: { + number: !0, + unitless: !0, + multiple: !0 + }, + positiveNumber: { + number: !0, + unitless: !0, + min: 0, + strictMin: !0 + }, + size: { + number: !0, + min: 0 + }, + bidirectionalSize: { + number: !0 + }, + // allows negative + bidirectionalSizeMaybePercent: { + number: !0, + allowPercent: !0 + }, + // allows negative + bidirectionalSizes: { + number: !0, + multiple: !0 + }, + // allows negative + sizeMaybePercent: { + number: !0, + min: 0, + allowPercent: !0 + }, + axisDirection: { + enums: ["horizontal", "leftward", "rightward", "vertical", "upward", "downward", "auto"] + }, + paddingRelativeTo: { + enums: ["width", "height", "average", "min", "max"] + }, + bgWH: { + number: !0, + min: 0, + allowPercent: !0, + enums: ["auto"], + multiple: !0 + }, + bgPos: { + number: !0, + allowPercent: !0, + multiple: !0 + }, + bgRelativeTo: { + enums: ["inner", "include-padding"], + multiple: !0 + }, + bgRepeat: { + enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"], + multiple: !0 + }, + bgFit: { + enums: ["none", "contain", "cover"], + multiple: !0 + }, + bgCrossOrigin: { + enums: ["anonymous", "use-credentials"], + multiple: !0 + }, + bgClip: { + enums: ["none", "node"], + multiple: !0 + }, + bgContainment: { + enums: ["inside", "over"], + multiple: !0 + }, + color: { + color: !0 + }, + colors: { + color: !0, + multiple: !0 + }, + fill: { + enums: ["solid", "linear-gradient", "radial-gradient"] + }, + bool: { + enums: ["yes", "no"] + }, + bools: { + enums: ["yes", "no"], + multiple: !0 + }, + lineStyle: { + enums: ["solid", "dotted", "dashed"] + }, + lineCap: { + enums: ["butt", "round", "square"] + }, + borderStyle: { + enums: ["solid", "dotted", "dashed", "double"] + }, + curveStyle: { + enums: ["bezier", "unbundled-bezier", "haystack", "segments", "straight", "straight-triangle", "taxi"] + }, + fontFamily: { + regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' + }, + fontStyle: { + enums: ["italic", "normal", "oblique"] + }, + fontWeight: { + enums: ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "800", "900", 100, 200, 300, 400, 500, 600, 700, 800, 900] + }, + textDecoration: { + enums: ["none", "underline", "overline", "line-through"] + }, + textTransform: { + enums: ["none", "uppercase", "lowercase"] + }, + textWrap: { + enums: ["none", "wrap", "ellipsis"] + }, + textOverflowWrap: { + enums: ["whitespace", "anywhere"] + }, + textBackgroundShape: { + enums: ["rectangle", "roundrectangle", "round-rectangle"] + }, + nodeShape: { + enums: ["rectangle", "roundrectangle", "round-rectangle", "cutrectangle", "cut-rectangle", "bottomroundrectangle", "bottom-round-rectangle", "barrel", "ellipse", "triangle", "round-triangle", "square", "pentagon", "round-pentagon", "hexagon", "round-hexagon", "concavehexagon", "concave-hexagon", "heptagon", "round-heptagon", "octagon", "round-octagon", "tag", "round-tag", "star", "diamond", "round-diamond", "vee", "rhomboid", "polygon"] + }, + overlayShape: { + enums: ["roundrectangle", "round-rectangle", "ellipse"] + }, + compoundIncludeLabels: { + enums: ["include", "exclude"] + }, + arrowShape: { + enums: ["tee", "triangle", "triangle-tee", "circle-triangle", "triangle-cross", "triangle-backcurve", "vee", "square", "circle", "diamond", "chevron", "none"] + }, + arrowFill: { + enums: ["filled", "hollow"] + }, + display: { + enums: ["element", "none"] + }, + visibility: { + enums: ["hidden", "visible"] + }, + zCompoundDepth: { + enums: ["bottom", "orphan", "auto", "top"] + }, + zIndexCompare: { + enums: ["auto", "manual"] + }, + valign: { + enums: ["top", "center", "bottom"] + }, + halign: { + enums: ["left", "center", "right"] + }, + justification: { + enums: ["left", "center", "right", "auto"] + }, + text: { + string: !0 + }, + data: { + mapping: !0, + regex: i("data") + }, + layoutData: { + mapping: !0, + regex: i("layoutData") + }, + scratch: { + mapping: !0, + regex: i("scratch") + }, + mapData: { + mapping: !0, + regex: s("mapData") + }, + mapLayoutData: { + mapping: !0, + regex: s("mapLayoutData") + }, + mapScratch: { + mapping: !0, + regex: s("mapScratch") + }, + fn: { + mapping: !0, + fn: !0 + }, + url: { + regexes: o, + singleRegexMatchValue: !0 + }, + urls: { + regexes: o, + singleRegexMatchValue: !0, + multiple: !0 + }, + propList: { + propList: !0 + }, + angle: { + number: !0, + units: "deg|rad", + implicitUnits: "rad" + }, + textRotation: { + number: !0, + units: "deg|rad", + implicitUnits: "rad", + enums: ["none", "autorotate"] + }, + polygonPointList: { + number: !0, + multiple: !0, + evenMultiple: !0, + min: -1, + max: 1, + unitless: !0 + }, + edgeDistances: { + enums: ["intersection", "node-position"] + }, + edgeEndpoint: { + number: !0, + multiple: !0, + units: "%|px|em|deg|rad", + implicitUnits: "px", + enums: ["inside-to-node", "outside-to-node", "outside-to-node-or-label", "outside-to-line", "outside-to-line-or-label"], + singleEnum: !0, + validate: function(xe, Ce) { + switch (xe.length) { + case 2: + return Ce[0] !== "deg" && Ce[0] !== "rad" && Ce[1] !== "deg" && Ce[1] !== "rad"; + case 1: + return j(xe[0]) || Ce[0] === "deg" || Ce[0] === "rad"; + default: + return !1; + } + } + }, + easing: { + regexes: ["^(spring)\\s*\\(\\s*(" + t + ")\\s*,\\s*(" + t + ")\\s*\\)$", "^(cubic-bezier)\\s*\\(\\s*(" + t + ")\\s*,\\s*(" + t + ")\\s*,\\s*(" + t + ")\\s*,\\s*(" + t + ")\\s*\\)$"], + enums: ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "ease-in-sine", "ease-out-sine", "ease-in-out-sine", "ease-in-quad", "ease-out-quad", "ease-in-out-quad", "ease-in-cubic", "ease-out-cubic", "ease-in-out-cubic", "ease-in-quart", "ease-out-quart", "ease-in-out-quart", "ease-in-quint", "ease-out-quint", "ease-in-out-quint", "ease-in-expo", "ease-out-expo", "ease-in-out-expo", "ease-in-circ", "ease-out-circ", "ease-in-out-circ"] + }, + gradientDirection: { + enums: [ + "to-bottom", + "to-top", + "to-left", + "to-right", + "to-bottom-right", + "to-bottom-left", + "to-top-right", + "to-top-left", + "to-right-bottom", + "to-left-bottom", + "to-right-top", + "to-left-top" + // different order + ] + }, + boundsExpansion: { + number: !0, + multiple: !0, + min: 0, + validate: function(xe) { + var Ce = xe.length; + return Ce === 1 || Ce === 2 || Ce === 4; + } + } + }; + var l = { + zeroNonZero: function(xe, Ce) { + return (xe == null || Ce == null) && xe !== Ce || xe == 0 && Ce != 0 ? !0 : xe != 0 && Ce == 0; + }, + any: function(xe, Ce) { + return xe != Ce; + }, + emptyNonEmpty: function(xe, Ce) { + var Oe = Pe(xe), Ie = Pe(Ce); + return Oe && !Ie || !Oe && Ie; + } + }, u = Nt.types, f = [{ + name: "label", + type: u.text, + triggersBounds: l.any, + triggersZOrder: l.emptyNonEmpty + }, { + name: "text-rotation", + type: u.textRotation, + triggersBounds: l.any + }, { + name: "text-margin-x", + type: u.bidirectionalSize, + triggersBounds: l.any + }, { + name: "text-margin-y", + type: u.bidirectionalSize, + triggersBounds: l.any + }], h = [{ + name: "source-label", + type: u.text, + triggersBounds: l.any + }, { + name: "source-text-rotation", + type: u.textRotation, + triggersBounds: l.any + }, { + name: "source-text-margin-x", + type: u.bidirectionalSize, + triggersBounds: l.any + }, { + name: "source-text-margin-y", + type: u.bidirectionalSize, + triggersBounds: l.any + }, { + name: "source-text-offset", + type: u.size, + triggersBounds: l.any + }], c = [{ + name: "target-label", + type: u.text, + triggersBounds: l.any + }, { + name: "target-text-rotation", + type: u.textRotation, + triggersBounds: l.any + }, { + name: "target-text-margin-x", + type: u.bidirectionalSize, + triggersBounds: l.any + }, { + name: "target-text-margin-y", + type: u.bidirectionalSize, + triggersBounds: l.any + }, { + name: "target-text-offset", + type: u.size, + triggersBounds: l.any + }], v = [{ + name: "font-family", + type: u.fontFamily, + triggersBounds: l.any + }, { + name: "font-style", + type: u.fontStyle, + triggersBounds: l.any + }, { + name: "font-weight", + type: u.fontWeight, + triggersBounds: l.any + }, { + name: "font-size", + type: u.size, + triggersBounds: l.any + }, { + name: "text-transform", + type: u.textTransform, + triggersBounds: l.any + }, { + name: "text-wrap", + type: u.textWrap, + triggersBounds: l.any + }, { + name: "text-overflow-wrap", + type: u.textOverflowWrap, + triggersBounds: l.any + }, { + name: "text-max-width", + type: u.size, + triggersBounds: l.any + }, { + name: "text-outline-width", + type: u.size, + triggersBounds: l.any + }, { + name: "line-height", + type: u.positiveNumber, + triggersBounds: l.any + }], d = [{ + name: "text-valign", + type: u.valign, + triggersBounds: l.any + }, { + name: "text-halign", + type: u.halign, + triggersBounds: l.any + }, { + name: "color", + type: u.color + }, { + name: "text-outline-color", + type: u.color + }, { + name: "text-outline-opacity", + type: u.zeroOneNumber + }, { + name: "text-background-color", + type: u.color + }, { + name: "text-background-opacity", + type: u.zeroOneNumber + }, { + name: "text-background-padding", + type: u.size, + triggersBounds: l.any + }, { + name: "text-border-opacity", + type: u.zeroOneNumber + }, { + name: "text-border-color", + type: u.color + }, { + name: "text-border-width", + type: u.size, + triggersBounds: l.any + }, { + name: "text-border-style", + type: u.borderStyle, + triggersBounds: l.any + }, { + name: "text-background-shape", + type: u.textBackgroundShape, + triggersBounds: l.any + }, { + name: "text-justification", + type: u.justification + }], g = [{ + name: "events", + type: u.bool + }, { + name: "text-events", + type: u.bool + }], y = [{ + name: "display", + type: u.display, + triggersZOrder: l.any, + triggersBounds: l.any, + triggersBoundsOfParallelBeziers: !0 + }, { + name: "visibility", + type: u.visibility, + triggersZOrder: l.any + }, { + name: "opacity", + type: u.zeroOneNumber, + triggersZOrder: l.zeroNonZero + }, { + name: "text-opacity", + type: u.zeroOneNumber + }, { + name: "min-zoomed-font-size", + type: u.size + }, { + name: "z-compound-depth", + type: u.zCompoundDepth, + triggersZOrder: l.any + }, { + name: "z-index-compare", + type: u.zIndexCompare, + triggersZOrder: l.any + }, { + name: "z-index", + type: u.nonNegativeInt, + triggersZOrder: l.any + }], p = [{ + name: "overlay-padding", + type: u.size, + triggersBounds: l.any + }, { + name: "overlay-color", + type: u.color + }, { + name: "overlay-opacity", + type: u.zeroOneNumber, + triggersBounds: l.zeroNonZero + }, { + name: "overlay-shape", + type: u.overlayShape, + triggersBounds: l.any + }], m = [{ + name: "underlay-padding", + type: u.size, + triggersBounds: l.any + }, { + name: "underlay-color", + type: u.color + }, { + name: "underlay-opacity", + type: u.zeroOneNumber, + triggersBounds: l.zeroNonZero + }, { + name: "underlay-shape", + type: u.overlayShape, + triggersBounds: l.any + }], b = [{ + name: "transition-property", + type: u.propList + }, { + name: "transition-duration", + type: u.time + }, { + name: "transition-delay", + type: u.time + }, { + name: "transition-timing-function", + type: u.easing + }], E = function(xe, Ce) { + return Ce.value === "label" ? -xe.poolIndex() : Ce.pfValue; + }, M = [{ + name: "height", + type: u.nodeSize, + triggersBounds: l.any, + hashOverride: E + }, { + name: "width", + type: u.nodeSize, + triggersBounds: l.any, + hashOverride: E + }, { + name: "shape", + type: u.nodeShape, + triggersBounds: l.any + }, { + name: "shape-polygon-points", + type: u.polygonPointList, + triggersBounds: l.any + }, { + name: "background-color", + type: u.color + }, { + name: "background-fill", + type: u.fill + }, { + name: "background-opacity", + type: u.zeroOneNumber + }, { + name: "background-blacken", + type: u.nOneOneNumber + }, { + name: "background-gradient-stop-colors", + type: u.colors + }, { + name: "background-gradient-stop-positions", + type: u.percentages + }, { + name: "background-gradient-direction", + type: u.gradientDirection + }, { + name: "padding", + type: u.sizeMaybePercent, + triggersBounds: l.any + }, { + name: "padding-relative-to", + type: u.paddingRelativeTo, + triggersBounds: l.any + }, { + name: "bounds-expansion", + type: u.boundsExpansion, + triggersBounds: l.any + }], A = [{ + name: "border-color", + type: u.color + }, { + name: "border-opacity", + type: u.zeroOneNumber + }, { + name: "border-width", + type: u.size, + triggersBounds: l.any + }, { + name: "border-style", + type: u.borderStyle + }], w = [{ + name: "background-image", + type: u.urls + }, { + name: "background-image-crossorigin", + type: u.bgCrossOrigin + }, { + name: "background-image-opacity", + type: u.zeroOneNumbers + }, { + name: "background-image-containment", + type: u.bgContainment + }, { + name: "background-image-smoothing", + type: u.bools + }, { + name: "background-position-x", + type: u.bgPos + }, { + name: "background-position-y", + type: u.bgPos + }, { + name: "background-width-relative-to", + type: u.bgRelativeTo + }, { + name: "background-height-relative-to", + type: u.bgRelativeTo + }, { + name: "background-repeat", + type: u.bgRepeat + }, { + name: "background-fit", + type: u.bgFit + }, { + name: "background-clip", + type: u.bgClip + }, { + name: "background-width", + type: u.bgWH + }, { + name: "background-height", + type: u.bgWH + }, { + name: "background-offset-x", + type: u.bgPos + }, { + name: "background-offset-y", + type: u.bgPos + }], I = [{ + name: "position", + type: u.position, + triggersBounds: l.any + }, { + name: "compound-sizing-wrt-labels", + type: u.compoundIncludeLabels, + triggersBounds: l.any + }, { + name: "min-width", + type: u.size, + triggersBounds: l.any + }, { + name: "min-width-bias-left", + type: u.sizeMaybePercent, + triggersBounds: l.any + }, { + name: "min-width-bias-right", + type: u.sizeMaybePercent, + triggersBounds: l.any + }, { + name: "min-height", + type: u.size, + triggersBounds: l.any + }, { + name: "min-height-bias-top", + type: u.sizeMaybePercent, + triggersBounds: l.any + }, { + name: "min-height-bias-bottom", + type: u.sizeMaybePercent, + triggersBounds: l.any + }], C = [{ + name: "line-style", + type: u.lineStyle + }, { + name: "line-color", + type: u.color + }, { + name: "line-fill", + type: u.fill + }, { + name: "line-cap", + type: u.lineCap + }, { + name: "line-opacity", + type: u.zeroOneNumber + }, { + name: "line-dash-pattern", + type: u.numbers + }, { + name: "line-dash-offset", + type: u.number + }, { + name: "line-gradient-stop-colors", + type: u.colors + }, { + name: "line-gradient-stop-positions", + type: u.percentages + }, { + name: "curve-style", + type: u.curveStyle, + triggersBounds: l.any, + triggersBoundsOfParallelBeziers: !0 + }, { + name: "haystack-radius", + type: u.zeroOneNumber, + triggersBounds: l.any + }, { + name: "source-endpoint", + type: u.edgeEndpoint, + triggersBounds: l.any + }, { + name: "target-endpoint", + type: u.edgeEndpoint, + triggersBounds: l.any + }, { + name: "control-point-step-size", + type: u.size, + triggersBounds: l.any + }, { + name: "control-point-distances", + type: u.bidirectionalSizes, + triggersBounds: l.any + }, { + name: "control-point-weights", + type: u.numbers, + triggersBounds: l.any + }, { + name: "segment-distances", + type: u.bidirectionalSizes, + triggersBounds: l.any + }, { + name: "segment-weights", + type: u.numbers, + triggersBounds: l.any + }, { + name: "taxi-turn", + type: u.bidirectionalSizeMaybePercent, + triggersBounds: l.any + }, { + name: "taxi-turn-min-distance", + type: u.size, + triggersBounds: l.any + }, { + name: "taxi-direction", + type: u.axisDirection, + triggersBounds: l.any + }, { + name: "edge-distances", + type: u.edgeDistances, + triggersBounds: l.any + }, { + name: "arrow-scale", + type: u.positiveNumber, + triggersBounds: l.any + }, { + name: "loop-direction", + type: u.angle, + triggersBounds: l.any + }, { + name: "loop-sweep", + type: u.angle, + triggersBounds: l.any + }, { + name: "source-distance-from-node", + type: u.size, + triggersBounds: l.any + }, { + name: "target-distance-from-node", + type: u.size, + triggersBounds: l.any + }], B = [{ + name: "ghost", + type: u.bool, + triggersBounds: l.any + }, { + name: "ghost-offset-x", + type: u.bidirectionalSize, + triggersBounds: l.any + }, { + name: "ghost-offset-y", + type: u.bidirectionalSize, + triggersBounds: l.any + }, { + name: "ghost-opacity", + type: u.zeroOneNumber + }], F = [{ + name: "selection-box-color", + type: u.color + }, { + name: "selection-box-opacity", + type: u.zeroOneNumber + }, { + name: "selection-box-border-color", + type: u.color + }, { + name: "selection-box-border-width", + type: u.size + }, { + name: "active-bg-color", + type: u.color + }, { + name: "active-bg-opacity", + type: u.zeroOneNumber + }, { + name: "active-bg-size", + type: u.size + }, { + name: "outside-texture-bg-color", + type: u.color + }, { + name: "outside-texture-bg-opacity", + type: u.zeroOneNumber + }], R = []; + Nt.pieBackgroundN = 16, R.push({ + name: "pie-size", + type: u.sizeMaybePercent + }); + for (var X = 1; X <= Nt.pieBackgroundN; X++) + R.push({ + name: "pie-" + X + "-background-color", + type: u.color + }), R.push({ + name: "pie-" + X + "-background-size", + type: u.percent + }), R.push({ + name: "pie-" + X + "-background-opacity", + type: u.zeroOneNumber + }); + var z = [], re = Nt.arrowPrefixes = ["source", "mid-source", "target", "mid-target"]; + [{ + name: "arrow-shape", + type: u.arrowShape, + triggersBounds: l.any + }, { + name: "arrow-color", + type: u.color + }, { + name: "arrow-fill", + type: u.arrowFill + }].forEach(function(ae) { + re.forEach(function(xe) { + var Ce = xe + "-" + ae.name, Oe = ae.type, Ie = ae.triggersBounds; + z.push({ + name: Ce, + type: Oe, + triggersBounds: Ie + }); + }); + }, {}); + var W = Nt.properties = [].concat(g, b, y, p, m, B, d, v, f, h, c, M, A, w, R, I, C, z, F), Z = Nt.propertyGroups = { + // common to all eles + behavior: g, + transition: b, + visibility: y, + overlay: p, + underlay: m, + ghost: B, + // labels + commonLabel: d, + labelDimensions: v, + mainLabel: f, + sourceLabel: h, + targetLabel: c, + // node props + nodeBody: M, + nodeBorder: A, + backgroundImage: w, + pie: R, + compound: I, + // edge props + edgeLine: C, + edgeArrow: z, + core: F + }, ie = Nt.propertyGroupNames = {}, oe = Nt.propertyGroupKeys = Object.keys(Z); + oe.forEach(function(ae) { + ie[ae] = Z[ae].map(function(xe) { + return xe.name; + }), Z[ae].forEach(function(xe) { + return xe.groupKey = ae; + }); + }); + var de = Nt.aliases = [{ + name: "content", + pointsTo: "label" + }, { + name: "control-point-distance", + pointsTo: "control-point-distances" + }, { + name: "control-point-weight", + pointsTo: "control-point-weights" + }, { + name: "edge-text-rotation", + pointsTo: "text-rotation" + }, { + name: "padding-left", + pointsTo: "padding" + }, { + name: "padding-right", + pointsTo: "padding" + }, { + name: "padding-top", + pointsTo: "padding" + }, { + name: "padding-bottom", + pointsTo: "padding" + }]; + Nt.propertyNames = W.map(function(ae) { + return ae.name; + }); + for (var se = 0; se < W.length; se++) { + var ve = W[se]; + W[ve.name] = ve; + } + for (var we = 0; we < de.length; we++) { + var Te = de[we], Ee = W[Te.pointsTo], ye = { + name: Te.name, + alias: !0, + pointsTo: Ee + }; + W.push(ye), W[Te.name] = ye; + } + })(), Nt.getDefaultProperty = function(t) { + return this.getDefaultProperties()[t]; + }, Nt.getDefaultProperties = function() { + var t = this._private; + if (t.defaultProperties != null) + return t.defaultProperties; + for (var e = Ue({ + // core props + "selection-box-color": "#ddd", + "selection-box-opacity": 0.65, + "selection-box-border-color": "#aaa", + "selection-box-border-width": 1, + "active-bg-color": "black", + "active-bg-opacity": 0.15, + "active-bg-size": 30, + "outside-texture-bg-color": "#000", + "outside-texture-bg-opacity": 0.125, + // common node/edge props + events: "yes", + "text-events": "no", + "text-valign": "top", + "text-halign": "center", + "text-justification": "auto", + "line-height": 1, + color: "#000", + "text-outline-color": "#000", + "text-outline-width": 0, + "text-outline-opacity": 1, + "text-opacity": 1, + "text-decoration": "none", + "text-transform": "none", + "text-wrap": "none", + "text-overflow-wrap": "whitespace", + "text-max-width": 9999, + "text-background-color": "#000", + "text-background-opacity": 0, + "text-background-shape": "rectangle", + "text-background-padding": 0, + "text-border-opacity": 0, + "text-border-width": 0, + "text-border-style": "solid", + "text-border-color": "#000", + "font-family": "Helvetica Neue, Helvetica, sans-serif", + "font-style": "normal", + "font-weight": "normal", + "font-size": 16, + "min-zoomed-font-size": 0, + "text-rotation": "none", + "source-text-rotation": "none", + "target-text-rotation": "none", + visibility: "visible", + display: "element", + opacity: 1, + "z-compound-depth": "auto", + "z-index-compare": "auto", + "z-index": 0, + label: "", + "text-margin-x": 0, + "text-margin-y": 0, + "source-label": "", + "source-text-offset": 0, + "source-text-margin-x": 0, + "source-text-margin-y": 0, + "target-label": "", + "target-text-offset": 0, + "target-text-margin-x": 0, + "target-text-margin-y": 0, + "overlay-opacity": 0, + "overlay-color": "#000", + "overlay-padding": 10, + "overlay-shape": "round-rectangle", + "underlay-opacity": 0, + "underlay-color": "#000", + "underlay-padding": 10, + "underlay-shape": "round-rectangle", + "transition-property": "none", + "transition-duration": 0, + "transition-delay": 0, + "transition-timing-function": "linear", + // node props + "background-blacken": 0, + "background-color": "#999", + "background-fill": "solid", + "background-opacity": 1, + "background-image": "none", + "background-image-crossorigin": "anonymous", + "background-image-opacity": 1, + "background-image-containment": "inside", + "background-image-smoothing": "yes", + "background-position-x": "50%", + "background-position-y": "50%", + "background-offset-x": 0, + "background-offset-y": 0, + "background-width-relative-to": "include-padding", + "background-height-relative-to": "include-padding", + "background-repeat": "no-repeat", + "background-fit": "none", + "background-clip": "node", + "background-width": "auto", + "background-height": "auto", + "border-color": "#000", + "border-opacity": 1, + "border-width": 0, + "border-style": "solid", + height: 30, + width: 30, + shape: "ellipse", + "shape-polygon-points": "-1, -1, 1, -1, 1, 1, -1, 1", + "bounds-expansion": 0, + // node gradient + "background-gradient-direction": "to-bottom", + "background-gradient-stop-colors": "#999", + "background-gradient-stop-positions": "0%", + // ghost props + ghost: "no", + "ghost-offset-y": 0, + "ghost-offset-x": 0, + "ghost-opacity": 0, + // compound props + padding: 0, + "padding-relative-to": "width", + position: "origin", + "compound-sizing-wrt-labels": "include", + "min-width": 0, + "min-width-bias-left": 0, + "min-width-bias-right": 0, + "min-height": 0, + "min-height-bias-top": 0, + "min-height-bias-bottom": 0 + }, { + // node pie bg + "pie-size": "100%" + }, [{ + name: "pie-{{i}}-background-color", + value: "black" + }, { + name: "pie-{{i}}-background-size", + value: "0%" + }, { + name: "pie-{{i}}-background-opacity", + value: 1 + }].reduce(function(l, u) { + for (var f = 1; f <= Nt.pieBackgroundN; f++) { + var h = u.name.replace("{{i}}", f), c = u.value; + l[h] = c; + } + return l; + }, {}), { + // edge props + "line-style": "solid", + "line-color": "#999", + "line-fill": "solid", + "line-cap": "butt", + "line-opacity": 1, + "line-gradient-stop-colors": "#999", + "line-gradient-stop-positions": "0%", + "control-point-step-size": 40, + "control-point-weights": 0.5, + "segment-weights": 0.5, + "segment-distances": 20, + "taxi-turn": "50%", + "taxi-turn-min-distance": 10, + "taxi-direction": "auto", + "edge-distances": "intersection", + "curve-style": "haystack", + "haystack-radius": 0, + "arrow-scale": 1, + "loop-direction": "-45deg", + "loop-sweep": "-90deg", + "source-distance-from-node": 0, + "target-distance-from-node": 0, + "source-endpoint": "outside-to-node", + "target-endpoint": "outside-to-node", + "line-dash-pattern": [6, 3], + "line-dash-offset": 0 + }, [{ + name: "arrow-shape", + value: "none" + }, { + name: "arrow-color", + value: "#999" + }, { + name: "arrow-fill", + value: "filled" + }].reduce(function(l, u) { + return Nt.arrowPrefixes.forEach(function(f) { + var h = f + "-" + u.name, c = u.value; + l[h] = c; + }), l; + }, {})), r = {}, a = 0; a < this.properties.length; a++) { + var n = this.properties[a]; + if (!n.pointsTo) { + var i = n.name, s = e[i], o = this.parse(i, s); + r[i] = o; + } + } + return t.defaultProperties = r, t.defaultProperties; + }, Nt.addDefaultStylesheet = function() { + this.selector(":parent").css({ + shape: "rectangle", + padding: 10, + "background-color": "#eee", + "border-color": "#ccc", + "border-width": 1 + }).selector("edge").css({ + width: 3 + }).selector(":loop").css({ + "curve-style": "bezier" + }).selector("edge:compound").css({ + "curve-style": "bezier", + "source-endpoint": "outside-to-line", + "target-endpoint": "outside-to-line" + }).selector(":selected").css({ + "background-color": "#0169D9", + "line-color": "#0169D9", + "source-arrow-color": "#0169D9", + "target-arrow-color": "#0169D9", + "mid-source-arrow-color": "#0169D9", + "mid-target-arrow-color": "#0169D9" + }).selector(":parent:selected").css({ + "background-color": "#CCE1F9", + "border-color": "#aec8e5" + }).selector(":active").css({ + "overlay-color": "black", + "overlay-padding": 10, + "overlay-opacity": 0.25 + }), this.defaultLength = this.length; + }; + var Vn = {}; + Vn.parse = function(t, e, r, a) { + var n = this; + if (Y(e)) + return n.parseImplWarn(t, e, r, a); + var i = a === "mapping" || a === !0 || a === !1 || a == null ? "dontcare" : a, s = r ? "t" : "f", o = "" + e, l = ls(t, o, s, i), u = n.propCache = n.propCache || [], f; + return (f = u[l]) || (f = u[l] = n.parseImplWarn(t, e, r, a)), (r || a === "mapping") && (f = or(f), f && (f.value = or(f.value))), f; + }, Vn.parseImplWarn = function(t, e, r, a) { + var n = this.parseImpl(t, e, r, a); + return !n && e != null && ft("The style property `".concat(t, ": ").concat(e, "` is invalid")), n && (n.name === "width" || n.name === "height") && e === "label" && ft("The style value of `label` is deprecated for `" + n.name + "`"), n; + }, Vn.parseImpl = function(t, e, r, a) { + var n = this; + t = je(t); + var i = n.properties[t], s = e, o = n.types; + if (!i || e === void 0) + return null; + i.alias && (i = i.pointsTo, t = i.name); + var l = j(e); + l && (e = e.trim()); + var u = i.type; + if (!u) + return null; + if (r && (e === "" || e === null)) + return { + name: t, + value: e, + bypass: !0, + deleteBypass: !0 + }; + if (Y(e)) + return { + name: t, + value: e, + strValue: "fn", + mapped: o.fn, + bypass: r + }; + var f, h; + if (!(!l || a || e.length < 7 || e[1] !== "a")) { + if (e.length >= 7 && e[0] === "d" && (f = new RegExp(o.data.regex).exec(e))) { + if (r) + return !1; + var c = o.data; + return { + name: t, + value: f, + strValue: "" + e, + mapped: c, + field: f[1], + bypass: r + }; + } else if (e.length >= 10 && e[0] === "m" && (h = new RegExp(o.mapData.regex).exec(e))) { + if (r || u.multiple) + return !1; + var v = o.mapData; + if (!(u.color || u.number)) + return !1; + var d = this.parse(t, h[4]); + if (!d || d.mapped) + return !1; + var g = this.parse(t, h[5]); + if (!g || g.mapped) + return !1; + if (d.pfValue === g.pfValue || d.strValue === g.strValue) + return ft("`" + t + ": " + e + "` is not a valid mapper because the output range is zero; converting to `" + t + ": " + d.strValue + "`"), this.parse(t, d.strValue); + if (u.color) { + var y = d.value, p = g.value, m = y[0] === p[0] && y[1] === p[1] && y[2] === p[2] && // optional alpha + (y[3] === p[3] || (y[3] == null || y[3] === 1) && (p[3] == null || p[3] === 1)); + if (m) + return !1; + } + return { + name: t, + value: h, + strValue: "" + e, + mapped: v, + field: h[1], + fieldMin: parseFloat(h[2]), + // min & max are numeric + fieldMax: parseFloat(h[3]), + valueMin: d.value, + valueMax: g.value, + bypass: r + }; + } + } + if (u.multiple && a !== "multiple") { + var b; + if (l ? b = e.split(/\s+/) : te(e) ? b = e : b = [e], u.evenMultiple && b.length % 2 !== 0) + return null; + for (var E = [], M = [], A = [], w = "", I = !1, C = 0; C < b.length; C++) { + var B = n.parse(t, b[C], r, "multiple"); + I = I || j(B.value), E.push(B.value), A.push(B.pfValue != null ? B.pfValue : B.value), M.push(B.units), w += (C > 0 ? " " : "") + B.strValue; + } + return u.validate && !u.validate(E, M) ? null : u.singleEnum && I ? E.length === 1 && j(E[0]) ? { + name: t, + value: E[0], + strValue: E[0], + bypass: r + } : null : { + name: t, + value: E, + pfValue: A, + strValue: w, + bypass: r, + units: M + }; + } + var F = function() { + for (var Ce = 0; Ce < u.enums.length; Ce++) { + var Oe = u.enums[Ce]; + if (Oe === e) + return { + name: t, + value: e, + strValue: "" + e, + bypass: r + }; + } + return null; + }; + if (u.number) { + var R, X = "px"; + if (u.units && (R = u.units), u.implicitUnits && (X = u.implicitUnits), !u.unitless) + if (l) { + var z = "px|em" + (u.allowPercent ? "|\\%" : ""); + R && (z = R); + var re = e.match("^(" + vt + ")(" + z + ")?$"); + re && (e = re[1], R = re[2] || X); + } else + (!R || u.implicitUnits) && (R = X); + if (e = parseFloat(e), isNaN(e) && u.enums === void 0) + return null; + if (isNaN(e) && u.enums !== void 0) + return e = s, F(); + if (u.integer && !q(e) || u.min !== void 0 && (e < u.min || u.strictMin && e === u.min) || u.max !== void 0 && (e > u.max || u.strictMax && e === u.max)) + return null; + var W = { + name: t, + value: e, + strValue: "" + e + (R || ""), + units: R, + bypass: r + }; + return u.unitless || R !== "px" && R !== "em" ? W.pfValue = e : W.pfValue = R === "px" || !R ? e : this.getEmSizeInPixels() * e, (R === "ms" || R === "s") && (W.pfValue = R === "ms" ? e : 1e3 * e), (R === "deg" || R === "rad") && (W.pfValue = R === "rad" ? e : wf(e)), R === "%" && (W.pfValue = e / 100), W; + } else if (u.propList) { + var Z = [], ie = "" + e; + if (ie !== "none") { + for (var oe = ie.split(/\s*,\s*|\s+/), de = 0; de < oe.length; de++) { + var se = oe[de].trim(); + n.properties[se] ? Z.push(se) : ft("`" + se + "` is not a valid property name"); + } + if (Z.length === 0) + return null; + } + return { + name: t, + value: Z, + strValue: Z.length === 0 ? "none" : Z.join(" "), + bypass: r + }; + } else if (u.color) { + var ve = al(e); + return ve ? { + name: t, + value: ve, + pfValue: ve, + strValue: "rgb(" + ve[0] + "," + ve[1] + "," + ve[2] + ")", + // n.b. no spaces b/c of multiple support + bypass: r + } : null; + } else if (u.regex || u.regexes) { + if (u.enums) { + var we = F(); + if (we) + return we; + } + for (var Te = u.regexes ? u.regexes : [u.regex], Ee = 0; Ee < Te.length; Ee++) { + var ye = new RegExp(Te[Ee]), ae = ye.exec(e); + if (ae) + return { + name: t, + value: u.singleRegexMatchValue ? ae[1] : ae, + strValue: "" + e, + bypass: r + }; + } + return null; + } else + return u.string ? { + name: t, + value: "" + e, + strValue: "" + e, + bypass: r + } : u.enums ? F() : null; + }; + var Ft = function t(e) { + if (!(this instanceof t)) + return new t(e); + if (!_e(e)) { + xt("A style must have a core reference"); + return; + } + this._private = { + cy: e, + coreStyle: {} + }, this.length = 0, this.resetToDefault(); + }, zt = Ft.prototype; + zt.instanceString = function() { + return "style"; + }, zt.clear = function() { + for (var t = this._private, e = t.cy, r = e.elements(), a = 0; a < this.length; a++) + this[a] = void 0; + return this.length = 0, t.contextStyles = {}, t.propDiffs = {}, this.cleanElements(r, !0), r.forEach(function(n) { + var i = n[0]._private; + i.styleDirty = !0, i.appliedInitStyle = !1; + }), this; + }, zt.resetToDefault = function() { + return this.clear(), this.addDefaultStylesheet(), this; + }, zt.core = function(t) { + return this._private.coreStyle[t] || this.getDefaultProperty(t); + }, zt.selector = function(t) { + var e = t === "core" ? null : new Dr(t), r = this.length++; + return this[r] = { + selector: e, + properties: [], + mappedProperties: [], + index: r + }, this; + }, zt.css = function() { + var t = this, e = arguments; + if (e.length === 1) + for (var r = e[0], a = 0; a < t.properties.length; a++) { + var n = t.properties[a], i = r[n.name]; + i === void 0 && (i = r[pt(n.name)]), i !== void 0 && this.cssRule(n.name, i); + } + else + e.length === 2 && this.cssRule(e[0], e[1]); + return this; + }, zt.style = zt.css, zt.cssRule = function(t, e) { + var r = this.parse(t, e); + if (r) { + var a = this.length - 1; + this[a].properties.push(r), this[a].properties[r.name] = r, r.name.match(/pie-(\d+)-background-size/) && r.value && (this._private.hasPie = !0), r.mapped && this[a].mappedProperties.push(r); + var n = !this[a].selector; + n && (this._private.coreStyle[r.name] = r); + } + return this; + }, zt.append = function(t) { + return tt(t) ? t.appendToStyle(this) : te(t) ? this.appendFromJson(t) : j(t) && this.appendFromString(t), this; + }, Ft.fromJson = function(t, e) { + var r = new Ft(t); + return r.fromJson(e), r; + }, Ft.fromString = function(t, e) { + return new Ft(t).fromString(e); + }, [Bt, Wa, Ii, lr, $n, Ri, Nt, Vn].forEach(function(t) { + Ue(zt, t); + }), Ft.types = zt.types, Ft.properties = zt.properties, Ft.propertyGroups = zt.propertyGroups, Ft.propertyGroupNames = zt.propertyGroupNames, Ft.propertyGroupKeys = zt.propertyGroupKeys; + var $d = { + style: function(e) { + if (e) { + var r = this.setStyle(e); + r.update(); + } + return this._private.style; + }, + setStyle: function(e) { + var r = this._private; + return tt(e) ? r.style = e.generateStyle(this) : te(e) ? r.style = Ft.fromJson(this, e) : j(e) ? r.style = Ft.fromString(this, e) : r.style = Ft(this), r.style; + }, + // e.g. cy.data() changed => recalc ele mappers + updateStyle: function() { + this.mutableElements().updateStyle(); + } + }, Vd = "single", $r = { + autolock: function(e) { + if (e !== void 0) + this._private.autolock = !!e; + else + return this._private.autolock; + return this; + }, + autoungrabify: function(e) { + if (e !== void 0) + this._private.autoungrabify = !!e; + else + return this._private.autoungrabify; + return this; + }, + autounselectify: function(e) { + if (e !== void 0) + this._private.autounselectify = !!e; + else + return this._private.autounselectify; + return this; + }, + selectionType: function(e) { + var r = this._private; + if (r.selectionType == null && (r.selectionType = Vd), e !== void 0) + (e === "additive" || e === "single") && (r.selectionType = e); + else + return r.selectionType; + return this; + }, + panningEnabled: function(e) { + if (e !== void 0) + this._private.panningEnabled = !!e; + else + return this._private.panningEnabled; + return this; + }, + userPanningEnabled: function(e) { + if (e !== void 0) + this._private.userPanningEnabled = !!e; + else + return this._private.userPanningEnabled; + return this; + }, + zoomingEnabled: function(e) { + if (e !== void 0) + this._private.zoomingEnabled = !!e; + else + return this._private.zoomingEnabled; + return this; + }, + userZoomingEnabled: function(e) { + if (e !== void 0) + this._private.userZoomingEnabled = !!e; + else + return this._private.userZoomingEnabled; + return this; + }, + boxSelectionEnabled: function(e) { + if (e !== void 0) + this._private.boxSelectionEnabled = !!e; + else + return this._private.boxSelectionEnabled; + return this; + }, + pan: function() { + var e = arguments, r = this._private.pan, a, n, i, s, o; + switch (e.length) { + case 0: + return r; + case 1: + if (j(e[0])) + return a = e[0], r[a]; + if (L(e[0])) { + if (!this._private.panningEnabled) + return this; + i = e[0], s = i.x, o = i.y, k(s) && (r.x = s), k(o) && (r.y = o), this.emit("pan viewport"); + } + break; + case 2: + if (!this._private.panningEnabled) + return this; + a = e[0], n = e[1], (a === "x" || a === "y") && k(n) && (r[a] = n), this.emit("pan viewport"); + break; + } + return this.notify("viewport"), this; + }, + panBy: function(e, r) { + var a = arguments, n = this._private.pan, i, s, o, l, u; + if (!this._private.panningEnabled) + return this; + switch (a.length) { + case 1: + L(e) && (o = a[0], l = o.x, u = o.y, k(l) && (n.x += l), k(u) && (n.y += u), this.emit("pan viewport")); + break; + case 2: + i = e, s = r, (i === "x" || i === "y") && k(s) && (n[i] += s), this.emit("pan viewport"); + break; + } + return this.notify("viewport"), this; + }, + fit: function(e, r) { + var a = this.getFitViewport(e, r); + if (a) { + var n = this._private; + n.zoom = a.zoom, n.pan = a.pan, this.emit("pan zoom viewport"), this.notify("viewport"); + } + return this; + }, + getFitViewport: function(e, r) { + if (k(e) && r === void 0 && (r = e, e = void 0), !(!this._private.panningEnabled || !this._private.zoomingEnabled)) { + var a; + if (j(e)) { + var n = e; + e = this.$(n); + } else if (Xe(e)) { + var i = e; + a = { + x1: i.x1, + y1: i.y1, + x2: i.x2, + y2: i.y2 + }, a.w = a.x2 - a.x1, a.h = a.y2 - a.y1; + } else + ge(e) || (e = this.mutableElements()); + if (!(ge(e) && e.empty())) { + a = a || e.boundingBox(); + var s = this.width(), o = this.height(), l; + if (r = k(r) ? r : 0, !isNaN(s) && !isNaN(o) && s > 0 && o > 0 && !isNaN(a.w) && !isNaN(a.h) && a.w > 0 && a.h > 0) { + l = Math.min((s - 2 * r) / a.w, (o - 2 * r) / a.h), l = l > this._private.maxZoom ? this._private.maxZoom : l, l = l < this._private.minZoom ? this._private.minZoom : l; + var u = { + // now pan to middle + x: (s - l * (a.x1 + a.x2)) / 2, + y: (o - l * (a.y1 + a.y2)) / 2 + }; + return { + zoom: l, + pan: u + }; + } + } + } + }, + zoomRange: function(e, r) { + var a = this._private; + if (r == null) { + var n = e; + e = n.min, r = n.max; + } + return k(e) && k(r) && e <= r ? (a.minZoom = e, a.maxZoom = r) : k(e) && r === void 0 && e <= a.maxZoom ? a.minZoom = e : k(r) && e === void 0 && r >= a.minZoom && (a.maxZoom = r), this; + }, + minZoom: function(e) { + return e === void 0 ? this._private.minZoom : this.zoomRange({ + min: e + }); + }, + maxZoom: function(e) { + return e === void 0 ? this._private.maxZoom : this.zoomRange({ + max: e + }); + }, + getZoomedViewport: function(e) { + var r = this._private, a = r.pan, n = r.zoom, i, s, o = !1; + if (r.zoomingEnabled || (o = !0), k(e) ? s = e : L(e) && (s = e.level, e.position != null ? i = dn(e.position, n, a) : e.renderedPosition != null && (i = e.renderedPosition), i != null && !r.panningEnabled && (o = !0)), s = s > r.maxZoom ? r.maxZoom : s, s = s < r.minZoom ? r.minZoom : s, o || !k(s) || s === n || i != null && (!k(i.x) || !k(i.y))) + return null; + if (i != null) { + var l = a, u = n, f = s, h = { + x: -f / u * (i.x - l.x) + i.x, + y: -f / u * (i.y - l.y) + i.y + }; + return { + zoomed: !0, + panned: !0, + zoom: f, + pan: h + }; + } else + return { + zoomed: !0, + panned: !1, + zoom: s, + pan: a + }; + }, + zoom: function(e) { + if (e === void 0) + return this._private.zoom; + var r = this.getZoomedViewport(e), a = this._private; + return r == null || !r.zoomed ? this : (a.zoom = r.zoom, r.panned && (a.pan.x = r.pan.x, a.pan.y = r.pan.y), this.emit("zoom" + (r.panned ? " pan" : "") + " viewport"), this.notify("viewport"), this); + }, + viewport: function(e) { + var r = this._private, a = !0, n = !0, i = [], s = !1, o = !1; + if (!e) + return this; + if (k(e.zoom) || (a = !1), L(e.pan) || (n = !1), !a && !n) + return this; + if (a) { + var l = e.zoom; + l < r.minZoom || l > r.maxZoom || !r.zoomingEnabled ? s = !0 : (r.zoom = l, i.push("zoom")); + } + if (n && (!s || !e.cancelOnFailedZoom) && r.panningEnabled) { + var u = e.pan; + k(u.x) && (r.pan.x = u.x, o = !1), k(u.y) && (r.pan.y = u.y, o = !1), o || i.push("pan"); + } + return i.length > 0 && (i.push("viewport"), this.emit(i.join(" ")), this.notify("viewport")), this; + }, + center: function(e) { + var r = this.getCenterPan(e); + return r && (this._private.pan = r, this.emit("pan viewport"), this.notify("viewport")), this; + }, + getCenterPan: function(e, r) { + if (this._private.panningEnabled) { + if (j(e)) { + var a = e; + e = this.mutableElements().filter(a); + } else + ge(e) || (e = this.mutableElements()); + if (e.length !== 0) { + var n = e.boundingBox(), i = this.width(), s = this.height(); + r = r === void 0 ? this._private.zoom : r; + var o = { + // middle + x: (i - r * (n.x1 + n.x2)) / 2, + y: (s - r * (n.y1 + n.y2)) / 2 + }; + return o; + } + } + }, + reset: function() { + return !this._private.panningEnabled || !this._private.zoomingEnabled ? this : (this.viewport({ + pan: { + x: 0, + y: 0 + }, + zoom: 1 + }), this); + }, + invalidateSize: function() { + this._private.sizeCache = null; + }, + size: function() { + var e = this._private, r = e.container; + return e.sizeCache = e.sizeCache || (r ? function() { + var a = D.getComputedStyle(r), n = function(s) { + return parseFloat(a.getPropertyValue(s)); + }; + return { + width: r.clientWidth - n("padding-left") - n("padding-right"), + height: r.clientHeight - n("padding-top") - n("padding-bottom") + }; + }() : { + // fallback if no container (not 0 b/c can be used for dividing etc) + width: 1, + height: 1 + }); + }, + width: function() { + return this.size().width; + }, + height: function() { + return this.size().height; + }, + extent: function() { + var e = this._private.pan, r = this._private.zoom, a = this.renderedExtent(), n = { + x1: (a.x1 - e.x) / r, + x2: (a.x2 - e.x) / r, + y1: (a.y1 - e.y) / r, + y2: (a.y2 - e.y) / r + }; + return n.w = n.x2 - n.x1, n.h = n.y2 - n.y1, n; + }, + renderedExtent: function() { + var e = this.width(), r = this.height(); + return { + x1: 0, + y1: 0, + x2: e, + y2: r, + w: e, + h: r + }; + }, + multiClickDebounceTime: function(e) { + if (e) + this._private.multiClickDebounceTime = e; + else + return this._private.multiClickDebounceTime; + return this; + } + }; + $r.centre = $r.center, $r.autolockNodes = $r.autolock, $r.autoungrabifyNodes = $r.autoungrabify; + var Ka = { + data: ht.data({ + field: "data", + bindingEvent: "data", + allowBinding: !0, + allowSetting: !0, + settingEvent: "data", + settingTriggersEvent: !0, + triggerFnName: "trigger", + allowGetting: !0, + updateStyle: !0 + }), + removeData: ht.removeData({ + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: !0, + updateStyle: !0 + }), + scratch: ht.data({ + field: "scratch", + bindingEvent: "scratch", + allowBinding: !0, + allowSetting: !0, + settingEvent: "scratch", + settingTriggersEvent: !0, + triggerFnName: "trigger", + allowGetting: !0, + updateStyle: !0 + }), + removeScratch: ht.removeData({ + field: "scratch", + event: "scratch", + triggerFnName: "trigger", + triggerEvent: !0, + updateStyle: !0 + }) + }; + Ka.attr = Ka.data, Ka.removeAttr = Ka.removeData; + var Za = function(e) { + var r = this; + e = Ue({}, e); + var a = e.container; + a && !he(a) && he(a[0]) && (a = a[0]); + var n = a ? a._cyreg : null; + n = n || {}, n && n.cy && (n.cy.destroy(), n = {}); + var i = n.readies = n.readies || []; + a && (a._cyreg = n), n.cy = r; + var s = D !== void 0 && a !== void 0 && !e.headless, o = e; + o.layout = Ue({ + name: s ? "grid" : "null" + }, o.layout), o.renderer = Ue({ + name: s ? "canvas" : "null" + }, o.renderer); + var l = function(d, g, y) { + return g !== void 0 ? g : y !== void 0 ? y : d; + }, u = this._private = { + container: a, + // html dom ele container + ready: !1, + // whether ready has been triggered + options: o, + // cached options + elements: new Ot(this), + // elements in the graph + listeners: [], + // list of listeners + aniEles: new Ot(this), + // elements being animated + data: o.data || {}, + // data for the core + scratch: {}, + // scratch object for core + layout: null, + renderer: null, + destroyed: !1, + // whether destroy was called + notificationsEnabled: !0, + // whether notifications are sent to the renderer + minZoom: 1e-50, + maxZoom: 1e50, + zoomingEnabled: l(!0, o.zoomingEnabled), + userZoomingEnabled: l(!0, o.userZoomingEnabled), + panningEnabled: l(!0, o.panningEnabled), + userPanningEnabled: l(!0, o.userPanningEnabled), + boxSelectionEnabled: l(!0, o.boxSelectionEnabled), + autolock: l(!1, o.autolock, o.autolockNodes), + autoungrabify: l(!1, o.autoungrabify, o.autoungrabifyNodes), + autounselectify: l(!1, o.autounselectify), + styleEnabled: o.styleEnabled === void 0 ? s : o.styleEnabled, + zoom: k(o.zoom) ? o.zoom : 1, + pan: { + x: L(o.pan) && k(o.pan.x) ? o.pan.x : 0, + y: L(o.pan) && k(o.pan.y) ? o.pan.y : 0 + }, + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + hasCompoundNodes: !1, + multiClickDebounceTime: l(250, o.multiClickDebounceTime) + }; + this.createEmitter(), this.selectionType(o.selectionType), this.zoomRange({ + min: o.minZoom, + max: o.maxZoom + }); + var f = function(d, g) { + var y = d.some(rt); + if (y) + return ia.all(d).then(g); + g(d); + }; + u.styleEnabled && r.setStyle([]); + var h = Ue({}, o, o.renderer); + r.initRenderer(h); + var c = function(d, g, y) { + r.notifications(!1); + var p = r.mutableElements(); + p.length > 0 && p.remove(), d != null && (L(d) || te(d)) && r.add(d), r.one("layoutready", function(b) { + r.notifications(!0), r.emit(b), r.one("load", g), r.emitAndNotify("load"); + }).one("layoutstop", function() { + r.one("done", y), r.emit("done"); + }); + var m = Ue({}, r._private.options.layout); + m.eles = r.elements(), r.layout(m).run(); + }; + f([o.style, o.elements], function(v) { + var d = v[0], g = v[1]; + u.styleEnabled && r.style().append(d), c(g, function() { + r.startAnimationLoop(), u.ready = !0, Y(o.ready) && r.on("ready", o.ready); + for (var y = 0; y < i.length; y++) { + var p = i[y]; + r.on("ready", p); + } + n && (n.readies = []), r.emit("ready"); + }, o.done); + }); + }, _n = Za.prototype; + Ue(_n, { + instanceString: function() { + return "core"; + }, + isReady: function() { + return this._private.ready; + }, + destroyed: function() { + return this._private.destroyed; + }, + ready: function(e) { + return this.isReady() ? this.emitter().emit("ready", [], e) : this.on("ready", e), this; + }, + destroy: function() { + var e = this; + if (!e.destroyed()) + return e.stopAnimationLoop(), e.destroyRenderer(), this.emit("destroy"), e._private.destroyed = !0, e; + }, + hasElementWithId: function(e) { + return this._private.elements.hasElementWithId(e); + }, + getElementById: function(e) { + return this._private.elements.getElementById(e); + }, + hasCompoundNodes: function() { + return this._private.hasCompoundNodes; + }, + headless: function() { + return this._private.renderer.isHeadless(); + }, + styleEnabled: function() { + return this._private.styleEnabled; + }, + addToPool: function(e) { + return this._private.elements.merge(e), this; + }, + removeFromPool: function(e) { + return this._private.elements.unmerge(e), this; + }, + container: function() { + return this._private.container || null; + }, + mount: function(e) { + if (e != null) { + var r = this, a = r._private, n = a.options; + return !he(e) && he(e[0]) && (e = e[0]), r.stopAnimationLoop(), r.destroyRenderer(), a.container = e, a.styleEnabled = !0, r.invalidateSize(), r.initRenderer(Ue({}, n, n.renderer, { + // allow custom renderer name to be re-used, otherwise use canvas + name: n.renderer.name === "null" ? "canvas" : n.renderer.name + })), r.startAnimationLoop(), r.style(n.style), r.emit("mount"), r; + } + }, + unmount: function() { + var e = this; + return e.stopAnimationLoop(), e.destroyRenderer(), e.initRenderer({ + name: "null" + }), e.emit("unmount"), e; + }, + options: function() { + return or(this._private.options); + }, + json: function(e) { + var r = this, a = r._private, n = r.mutableElements(), i = function(E) { + return r.getElementById(E.id()); + }; + if (L(e)) { + if (r.startBatch(), e.elements) { + var s = {}, o = function(E, M) { + for (var A = [], w = [], I = 0; I < E.length; I++) { + var C = E[I]; + if (!C.data.id) { + ft("cy.json() cannot handle elements without an ID attribute"); + continue; + } + var B = "" + C.data.id, F = r.getElementById(B); + s[B] = !0, F.length !== 0 ? w.push({ + ele: F, + json: C + }) : (M && (C.group = M), A.push(C)); + } + r.add(A); + for (var R = 0; R < w.length; R++) { + var X = w[R], z = X.ele, re = X.json; + z.json(re); + } + }; + if (te(e.elements)) + o(e.elements); + else + for (var l = ["nodes", "edges"], u = 0; u < l.length; u++) { + var f = l[u], h = e.elements[f]; + te(h) && o(h, f); + } + var c = r.collection(); + n.filter(function(b) { + return !s[b.id()]; + }).forEach(function(b) { + b.isParent() ? c.merge(b) : b.remove(); + }), c.forEach(function(b) { + return b.children().move({ + parent: null + }); + }), c.forEach(function(b) { + return i(b).remove(); + }); + } + e.style && r.style(e.style), e.zoom != null && e.zoom !== a.zoom && r.zoom(e.zoom), e.pan && (e.pan.x !== a.pan.x || e.pan.y !== a.pan.y) && r.pan(e.pan), e.data && r.data(e.data); + for (var v = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"], d = 0; d < v.length; d++) { + var g = v[d]; + e[g] != null && r[g](e[g]); + } + return r.endBatch(), this; + } else { + var y = !!e, p = {}; + y ? p.elements = this.elements().map(function(b) { + return b.json(); + }) : (p.elements = {}, n.forEach(function(b) { + var E = b.group(); + p.elements[E] || (p.elements[E] = []), p.elements[E].push(b.json()); + })), this._private.styleEnabled && (p.style = r.style().json()), p.data = or(r.data()); + var m = a.options; + return p.zoomingEnabled = a.zoomingEnabled, p.userZoomingEnabled = a.userZoomingEnabled, p.zoom = a.zoom, p.minZoom = a.minZoom, p.maxZoom = a.maxZoom, p.panningEnabled = a.panningEnabled, p.userPanningEnabled = a.userPanningEnabled, p.pan = or(a.pan), p.boxSelectionEnabled = a.boxSelectionEnabled, p.renderer = or(m.renderer), p.hideEdgesOnViewport = m.hideEdgesOnViewport, p.textureOnViewport = m.textureOnViewport, p.wheelSensitivity = m.wheelSensitivity, p.motionBlur = m.motionBlur, p.multiClickDebounceTime = m.multiClickDebounceTime, p; + } + } + }), _n.$id = _n.getElementById, [Nd, Pd, Uo, Ni, zn, Fd, Mi, Gn, $d, $r, Ka].forEach(function(t) { + Ue(_n, t); + }); + var _d = { + fit: !0, + // whether to fit the viewport to the graph + directed: !1, + // whether the tree is directed downwards (or edges can point in any direction if false) + padding: 30, + // padding on fit + circle: !1, + // put depths in concentric circles if true, put depths top down if false + grid: !1, + // whether to create an even grid into which the DAG is placed (circle:false only) + spacingFactor: 1.75, + // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: !0, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: !1, + // Excludes the label when calculating node bounding boxes for the layout algorithm + roots: void 0, + // the roots of the trees + maximal: !1, + // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only) + depthSort: void 0, + // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: !1, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled, + animateFilter: function(e, r) { + return !0; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function(e, r) { + return r; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }, pa = function(e) { + return e.scratch("breadthfirst"); + }, Yo = function(e, r) { + return e.scratch("breadthfirst", r); + }; + function Ho(t) { + this.options = Ue({}, _d, t); + } + Ho.prototype.run = function() { + var t = this.options, e = t, r = t.cy, a = e.eles, n = a.nodes().filter(function(Re) { + return !Re.isParent(); + }), i = a, s = e.directed, o = e.maximal || e.maximalAdjustments > 0, l = Ut(e.boundingBox ? e.boundingBox : { + x1: 0, + y1: 0, + w: r.width(), + h: r.height() + }), u; + if (ge(e.roots)) + u = e.roots; + else if (te(e.roots)) { + for (var f = [], h = 0; h < e.roots.length; h++) { + var c = e.roots[h], v = r.getElementById(c); + f.push(v); + } + u = r.collection(f); + } else if (j(e.roots)) + u = r.$(e.roots); + else if (s) + u = n.roots(); + else { + var d = a.components(); + u = r.collection(); + for (var g = function(Me) { + var Ve = d[Me], Fe = Ve.maxDegree(!1), ke = Ve.filter(function(Ge) { + return Ge.degree(!1) === Fe; + }); + u = u.add(ke); + }, y = 0; y < d.length; y++) + g(y); + } + var p = [], m = {}, b = function(Me, Ve) { + p[Ve] == null && (p[Ve] = []); + var Fe = p[Ve].length; + p[Ve].push(Me), Yo(Me, { + index: Fe, + depth: Ve + }); + }, E = function(Me, Ve) { + var Fe = pa(Me), ke = Fe.depth, Ge = Fe.index; + p[ke][Ge] = null, b(Me, Ve); + }; + i.bfs({ + roots: u, + directed: e.directed, + visit: function(Me, Ve, Fe, ke, Ge) { + var et = Me[0], We = et.id(); + b(et, Ge), m[We] = !0; + } + }); + for (var M = [], A = 0; A < n.length; A++) { + var w = n[A]; + m[w.id()] || M.push(w); + } + var I = function(Me) { + for (var Ve = p[Me], Fe = 0; Fe < Ve.length; Fe++) { + var ke = Ve[Fe]; + if (ke == null) { + Ve.splice(Fe, 1), Fe--; + continue; + } + Yo(ke, { + depth: Me, + index: Fe + }); + } + }, C = function() { + for (var Me = 0; Me < p.length; Me++) + I(Me); + }, B = function(Me, Ve) { + for (var Fe = pa(Me), ke = Me.incomers().filter(function(N) { + return N.isNode() && a.has(N); + }), Ge = -1, et = Me.id(), We = 0; We < ke.length; We++) { + var Ye = ke[We], Se = pa(Ye); + Ge = Math.max(Ge, Se.depth); + } + return Fe.depth <= Ge ? Ve[et] ? null : (E(Me, Ge + 1), Ve[et] = !0, !0) : !1; + }; + if (s && o) { + var F = [], R = {}, X = function(Me) { + return F.push(Me); + }, z = function() { + return F.shift(); + }; + for (n.forEach(function(Re) { + return F.push(Re); + }); F.length > 0; ) { + var re = z(), W = B(re, R); + if (W) + re.outgoers().filter(function(Re) { + return Re.isNode() && a.has(Re); + }).forEach(X); + else if (W === null) { + ft("Detected double maximal shift for node `" + re.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); + break; + } + } + } + C(); + var Z = 0; + if (e.avoidOverlap) + for (var ie = 0; ie < n.length; ie++) { + var oe = n[ie], de = oe.layoutDimensions(e), se = de.w, ve = de.h; + Z = Math.max(Z, se, ve); + } + var we = {}, Te = function(Me) { + if (we[Me.id()]) + return we[Me.id()]; + for (var Ve = pa(Me).depth, Fe = Me.neighborhood(), ke = 0, Ge = 0, et = 0; et < Fe.length; et++) { + var We = Fe[et]; + if (!(We.isEdge() || We.isParent() || !n.has(We))) { + var Ye = pa(We); + if (Ye != null) { + var Se = Ye.index, N = Ye.depth; + if (!(Se == null || N == null)) { + var le = p[N].length; + N < Ve && (ke += Se / le, Ge++); + } + } + } + } + return Ge = Math.max(1, Ge), ke = ke / Ge, Ge === 0 && (ke = 0), we[Me.id()] = ke, ke; + }, Ee = function(Me, Ve) { + var Fe = Te(Me), ke = Te(Ve), Ge = Fe - ke; + return Ge === 0 ? Ji(Me.id(), Ve.id()) : Ge; + }; + e.depthSort !== void 0 && (Ee = e.depthSort); + for (var ye = 0; ye < p.length; ye++) + p[ye].sort(Ee), I(ye); + for (var ae = [], xe = 0; xe < M.length; xe++) + ae.push(M[xe]); + p.unshift(ae), C(); + for (var Ce = 0, Oe = 0; Oe < p.length; Oe++) + Ce = Math.max(p[Oe].length, Ce); + var Ie = { + x: l.x1 + l.w / 2, + y: l.x1 + l.h / 2 + }, He = p.reduce(function(Re, Me) { + return Math.max(Re, Me.length); + }, 0), qe = function(Me) { + var Ve = pa(Me), Fe = Ve.depth, ke = Ve.index, Ge = p[Fe].length, et = Math.max(l.w / ((e.grid ? He : Ge) + 1), Z), We = Math.max(l.h / (p.length + 1), Z), Ye = Math.min(l.w / 2 / p.length, l.h / 2 / p.length); + if (Ye = Math.max(Ye, Z), e.circle) { + var N = Ye * Fe + Ye - (p.length > 0 && p[0].length <= 3 ? Ye / 2 : 0), le = 2 * Math.PI / p[Fe].length * ke; + return Fe === 0 && p[0].length === 1 && (N = 1), { + x: Ie.x + N * Math.cos(le), + y: Ie.y + N * Math.sin(le) + }; + } else { + var Se = { + x: Ie.x + (ke + 1 - (Ge + 1) / 2) * et, + y: (Fe + 1) * We + }; + return Se; + } + }; + return a.nodes().layoutPositions(this, e, qe), this; + }; + var Ud = { + fit: !0, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: !0, + // prevents node overlap, may overflow boundingBox and radius if not enough space + nodeDimensionsIncludeLabels: !1, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + radius: void 0, + // the radius of the circle + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: void 0, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: !0, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + sort: void 0, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: !1, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function(e, r) { + return !0; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function(e, r) { + return r; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function Xo(t) { + this.options = Ue({}, Ud, t); + } + Xo.prototype.run = function() { + var t = this.options, e = t, r = t.cy, a = e.eles, n = e.counterclockwise !== void 0 ? !e.counterclockwise : e.clockwise, i = a.nodes().not(":parent"); + e.sort && (i = i.sort(e.sort)); + for (var s = Ut(e.boundingBox ? e.boundingBox : { + x1: 0, + y1: 0, + w: r.width(), + h: r.height() + }), o = { + x: s.x1 + s.w / 2, + y: s.y1 + s.h / 2 + }, l = e.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / i.length : e.sweep, u = l / Math.max(1, i.length - 1), f, h = 0, c = 0; c < i.length; c++) { + var v = i[c], d = v.layoutDimensions(e), g = d.w, y = d.h; + h = Math.max(h, g, y); + } + if (k(e.radius) ? f = e.radius : i.length <= 1 ? f = 0 : f = Math.min(s.h, s.w) / 2 - h, i.length > 1 && e.avoidOverlap) { + h *= 1.75; + var p = Math.cos(u) - Math.cos(0), m = Math.sin(u) - Math.sin(0), b = Math.sqrt(h * h / (p * p + m * m)); + f = Math.max(b, f); + } + var E = function(A, w) { + var I = e.startAngle + w * u * (n ? 1 : -1), C = f * Math.cos(I), B = f * Math.sin(I), F = { + x: o.x + C, + y: o.y + B + }; + return F; + }; + return a.nodes().layoutPositions(this, e, E), this; + }; + var Yd = { + fit: !0, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: void 0, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: !0, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + equidistant: !1, + // whether levels have an equal radial distance betwen them, may cause bounding box overflow + minNodeSpacing: 10, + // min spacing between outside of nodes (used for radius adjustment) + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: !0, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: !1, + // Excludes the label when calculating node bounding boxes for the layout algorithm + height: void 0, + // height of layout area (overrides container height) + width: void 0, + // width of layout area (overrides container width) + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + concentric: function(e) { + return e.degree(); + }, + levelWidth: function(e) { + return e.maxDegree() / 4; + }, + animate: !1, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function(e, r) { + return !0; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function(e, r) { + return r; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function qo(t) { + this.options = Ue({}, Yd, t); + } + qo.prototype.run = function() { + for (var t = this.options, e = t, r = e.counterclockwise !== void 0 ? !e.counterclockwise : e.clockwise, a = t.cy, n = e.eles, i = n.nodes().not(":parent"), s = Ut(e.boundingBox ? e.boundingBox : { + x1: 0, + y1: 0, + w: a.width(), + h: a.height() + }), o = { + x: s.x1 + s.w / 2, + y: s.y1 + s.h / 2 + }, l = [], u = 0, f = 0; f < i.length; f++) { + var h = i[f], c = void 0; + c = e.concentric(h), l.push({ + value: c, + node: h + }), h._private.scratch.concentric = c; + } + i.updateStyle(); + for (var v = 0; v < i.length; v++) { + var d = i[v], g = d.layoutDimensions(e); + u = Math.max(u, g.w, g.h); + } + l.sort(function(Re, Me) { + return Me.value - Re.value; + }); + for (var y = e.levelWidth(i), p = [[]], m = p[0], b = 0; b < l.length; b++) { + var E = l[b]; + if (m.length > 0) { + var M = Math.abs(m[0].value - E.value); + M >= y && (m = [], p.push(m)); + } + m.push(E); + } + var A = u + e.minNodeSpacing; + if (!e.avoidOverlap) { + var w = p.length > 0 && p[0].length > 1, I = Math.min(s.w, s.h) / 2 - A, C = I / (p.length + w ? 1 : 0); + A = Math.min(A, C); + } + for (var B = 0, F = 0; F < p.length; F++) { + var R = p[F], X = e.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / R.length : e.sweep, z = R.dTheta = X / Math.max(1, R.length - 1); + if (R.length > 1 && e.avoidOverlap) { + var re = Math.cos(z) - Math.cos(0), W = Math.sin(z) - Math.sin(0), Z = Math.sqrt(A * A / (re * re + W * W)); + B = Math.max(Z, B); + } + R.r = B, B += A; + } + if (e.equidistant) { + for (var ie = 0, oe = 0, de = 0; de < p.length; de++) { + var se = p[de], ve = se.r - oe; + ie = Math.max(ie, ve); + } + oe = 0; + for (var we = 0; we < p.length; we++) { + var Te = p[we]; + we === 0 && (oe = Te.r), Te.r = oe, oe += ie; + } + } + for (var Ee = {}, ye = 0; ye < p.length; ye++) + for (var ae = p[ye], xe = ae.dTheta, Ce = ae.r, Oe = 0; Oe < ae.length; Oe++) { + var Ie = ae[Oe], He = e.startAngle + (r ? 1 : -1) * xe * Oe, qe = { + x: o.x + Ce * Math.cos(He), + y: o.y + Ce * Math.sin(He) + }; + Ee[Ie.node.id()] = qe; + } + return n.nodes().layoutPositions(this, e, function(Re) { + var Me = Re.id(); + return Ee[Me]; + }), this; + }; + var ki, Hd = { + // Called on `layoutready` + ready: function() { + }, + // Called on `layoutstop` + stop: function() { + }, + // Whether to animate while running the layout + // true : Animate continuously as the layout is running + // false : Just show the end result + // 'end' : Animate with the end result, from the initial positions to the end positions + animate: !0, + // Easing of the animation for animate:'end' + animationEasing: void 0, + // The duration of the animation for animate:'end' + animationDuration: void 0, + // A function that determines whether the node should be animated + // All nodes animated by default on animate enabled + // Non-animated nodes are positioned immediately when the layout starts + animateFilter: function(e, r) { + return !0; + }, + // The layout animates only after this many milliseconds for animate:true + // (prevents flashing on fast runs) + animationThreshold: 250, + // Number of iterations between consecutive screen positions update + refresh: 20, + // Whether to fit the network view after when done + fit: !0, + // Padding on fit + padding: 30, + // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + boundingBox: void 0, + // Excludes the label when calculating node bounding boxes for the layout algorithm + nodeDimensionsIncludeLabels: !1, + // Randomize the initial positions of the nodes (true) or use existing positions (false) + randomize: !1, + // Extra spacing between components in non-compound graphs + componentSpacing: 40, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: function(e) { + return 2048; + }, + // Node repulsion (overlapping) multiplier + nodeOverlap: 4, + // Ideal edge (non nested) length + idealEdgeLength: function(e) { + return 32; + }, + // Divisor to compute edge forces + edgeElasticity: function(e) { + return 32; + }, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 1.2, + // Gravity force (constant) + gravity: 1, + // Maximum number of iterations to perform + numIter: 1e3, + // Initial temperature (maximum node displacement) + initialTemp: 1e3, + // Cooling factor (how the temperature is reduced between consecutive iterations + coolingFactor: 0.99, + // Lower temperature threshold (below this point the layout will end) + minTemp: 1 + }; + function Un(t) { + this.options = Ue({}, Hd, t), this.options.layout = this; + } + Un.prototype.run = function() { + var t = this.options, e = t.cy, r = this; + r.stopped = !1, (t.animate === !0 || t.animate === !1) && r.emit({ + type: "layoutstart", + layout: r + }), t.debug === !0 ? ki = !0 : ki = !1; + var a = Xd(e, r, t); + ki && Kd(a), t.randomize && Zd(a); + var n = dr(), i = function() { + Qd(a, e, t), t.fit === !0 && e.fit(t.padding); + }, s = function(c) { + return !(r.stopped || c >= t.numIter || (Jd(a, t), a.temperature = a.temperature * t.coolingFactor, a.temperature < t.minTemp)); + }, o = function() { + if (t.animate === !0 || t.animate === !1) + i(), r.one("layoutstop", t.stop), r.emit({ + type: "layoutstop", + layout: r + }); + else { + var c = t.eles.nodes(), v = Wo(a, t, c); + c.layoutPositions(r, t, v); + } + }, l = 0, u = !0; + if (t.animate === !0) { + var f = function h() { + for (var c = 0; u && c < t.refresh; ) + u = s(l), l++, c++; + if (!u) + Zo(a, t), o(); + else { + var v = dr(); + v - n >= t.animationThreshold && i(), fn(h); + } + }; + f(); + } else { + for (; u; ) + u = s(l), l++; + Zo(a, t), o(); + } + return this; + }, Un.prototype.stop = function() { + return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; + }, Un.prototype.destroy = function() { + return this.thread && this.thread.stop(), this; + }; + var Xd = function(e, r, a) { + for (var n = a.eles.edges(), i = a.eles.nodes(), s = { + isCompound: e.hasCompoundNodes(), + layoutNodes: [], + idToIndex: {}, + nodeSize: i.size(), + graphSet: [], + indexToGraph: [], + layoutEdges: [], + edgeSize: n.size(), + temperature: a.initialTemp, + clientWidth: e.width(), + clientHeight: e.width(), + boundingBox: Ut(a.boundingBox ? a.boundingBox : { + x1: 0, + y1: 0, + w: e.width(), + h: e.height() + }) + }, o = a.eles.components(), l = {}, u = 0; u < o.length; u++) + for (var f = o[u], h = 0; h < f.length; h++) { + var c = f[h]; + l[c.id()] = u; + } + for (var u = 0; u < s.nodeSize; u++) { + var v = i[u], d = v.layoutDimensions(a), g = {}; + g.isLocked = v.locked(), g.id = v.data("id"), g.parentId = v.data("parent"), g.cmptId = l[v.id()], g.children = [], g.positionX = v.position("x"), g.positionY = v.position("y"), g.offsetX = 0, g.offsetY = 0, g.height = d.w, g.width = d.h, g.maxX = g.positionX + g.width / 2, g.minX = g.positionX - g.width / 2, g.maxY = g.positionY + g.height / 2, g.minY = g.positionY - g.height / 2, g.padLeft = parseFloat(v.style("padding")), g.padRight = parseFloat(v.style("padding")), g.padTop = parseFloat(v.style("padding")), g.padBottom = parseFloat(v.style("padding")), g.nodeRepulsion = Y(a.nodeRepulsion) ? a.nodeRepulsion(v) : a.nodeRepulsion, s.layoutNodes.push(g), s.idToIndex[g.id] = u; + } + for (var y = [], p = 0, m = -1, b = [], u = 0; u < s.nodeSize; u++) { + var v = s.layoutNodes[u], E = v.parentId; + E != null ? s.layoutNodes[s.idToIndex[E]].children.push(v.id) : (y[++m] = v.id, b.push(v.id)); + } + for (s.graphSet.push(b); p <= m; ) { + var M = y[p++], A = s.idToIndex[M], c = s.layoutNodes[A], w = c.children; + if (w.length > 0) { + s.graphSet.push(w); + for (var u = 0; u < w.length; u++) + y[++m] = w[u]; + } + } + for (var u = 0; u < s.graphSet.length; u++) + for (var I = s.graphSet[u], h = 0; h < I.length; h++) { + var C = s.idToIndex[I[h]]; + s.indexToGraph[C] = u; + } + for (var u = 0; u < s.edgeSize; u++) { + var B = n[u], F = {}; + F.id = B.data("id"), F.sourceId = B.data("source"), F.targetId = B.data("target"); + var R = Y(a.idealEdgeLength) ? a.idealEdgeLength(B) : a.idealEdgeLength, X = Y(a.edgeElasticity) ? a.edgeElasticity(B) : a.edgeElasticity, z = s.idToIndex[F.sourceId], re = s.idToIndex[F.targetId], W = s.indexToGraph[z], Z = s.indexToGraph[re]; + if (W != Z) { + for (var ie = qd(F.sourceId, F.targetId, s), oe = s.graphSet[ie], de = 0, g = s.layoutNodes[z]; oe.indexOf(g.id) === -1; ) + g = s.layoutNodes[s.idToIndex[g.parentId]], de++; + for (g = s.layoutNodes[re]; oe.indexOf(g.id) === -1; ) + g = s.layoutNodes[s.idToIndex[g.parentId]], de++; + R *= de * a.nestingFactor; + } + F.idealLength = R, F.elasticity = X, s.layoutEdges.push(F); + } + return s; + }, qd = function(e, r, a) { + var n = Wd(e, r, 0, a); + return 2 > n.count ? 0 : n.graph; + }, Wd = function t(e, r, a, n) { + var i = n.graphSet[a]; + if (-1 < i.indexOf(e) && -1 < i.indexOf(r)) + return { + count: 2, + graph: a + }; + for (var s = 0, o = 0; o < i.length; o++) { + var l = i[o], u = n.idToIndex[l], f = n.layoutNodes[u].children; + if (f.length !== 0) { + var h = n.indexToGraph[n.idToIndex[f[0]]], c = t(e, r, h, n); + if (c.count !== 0) + if (c.count === 1) { + if (s++, s === 2) + break; + } else + return c; + } + } + return { + count: s, + graph: a + }; + }, Kd, Zd = function(e, r) { + for (var a = e.clientWidth, n = e.clientHeight, i = 0; i < e.nodeSize; i++) { + var s = e.layoutNodes[i]; + s.children.length === 0 && !s.isLocked && (s.positionX = Math.random() * a, s.positionY = Math.random() * n); + } + }, Wo = function(e, r, a) { + var n = e.boundingBox, i = { + x1: 1 / 0, + x2: -1 / 0, + y1: 1 / 0, + y2: -1 / 0 + }; + return r.boundingBox && (a.forEach(function(s) { + var o = e.layoutNodes[e.idToIndex[s.data("id")]]; + i.x1 = Math.min(i.x1, o.positionX), i.x2 = Math.max(i.x2, o.positionX), i.y1 = Math.min(i.y1, o.positionY), i.y2 = Math.max(i.y2, o.positionY); + }), i.w = i.x2 - i.x1, i.h = i.y2 - i.y1), function(s, o) { + var l = e.layoutNodes[e.idToIndex[s.data("id")]]; + if (r.boundingBox) { + var u = (l.positionX - i.x1) / i.w, f = (l.positionY - i.y1) / i.h; + return { + x: n.x1 + u * n.w, + y: n.y1 + f * n.h + }; + } else + return { + x: l.positionX, + y: l.positionY + }; + }; + }, Qd = function(e, r, a) { + var n = a.layout, i = a.eles.nodes(), s = Wo(e, a, i); + i.positions(s), e.ready !== !0 && (e.ready = !0, n.one("layoutready", a.ready), n.emit({ + type: "layoutready", + layout: this + })); + }, Jd = function(e, r, a) { + jd(e, r), rg(e), ag(e, r), ng(e), ig(e); + }, jd = function(e, r) { + for (var a = 0; a < e.graphSet.length; a++) + for (var n = e.graphSet[a], i = n.length, s = 0; s < i; s++) + for (var o = e.layoutNodes[e.idToIndex[n[s]]], l = s + 1; l < i; l++) { + var u = e.layoutNodes[e.idToIndex[n[l]]]; + eg(o, u, e, r); + } + }, Ko = function(e) { + return -e + 2 * e * Math.random(); + }, eg = function(e, r, a, n) { + var i = e.cmptId, s = r.cmptId; + if (!(i !== s && !a.isCompound)) { + var o = r.positionX - e.positionX, l = r.positionY - e.positionY, u = 1; + o === 0 && l === 0 && (o = Ko(u), l = Ko(u)); + var f = tg(e, r, o, l); + if (f > 0) + var h = n.nodeOverlap * f, c = Math.sqrt(o * o + l * l), v = h * o / c, d = h * l / c; + else + var g = Yn(e, o, l), y = Yn(r, -1 * o, -1 * l), p = y.x - g.x, m = y.y - g.y, b = p * p + m * m, c = Math.sqrt(b), h = (e.nodeRepulsion + r.nodeRepulsion) / b, v = h * p / c, d = h * m / c; + e.isLocked || (e.offsetX -= v, e.offsetY -= d), r.isLocked || (r.offsetX += v, r.offsetY += d); + } + }, tg = function(e, r, a, n) { + if (a > 0) + var i = e.maxX - r.minX; + else + var i = r.maxX - e.minX; + if (n > 0) + var s = e.maxY - r.minY; + else + var s = r.maxY - e.minY; + return i >= 0 && s >= 0 ? Math.sqrt(i * i + s * s) : 0; + }, Yn = function(e, r, a) { + var n = e.positionX, i = e.positionY, s = e.height || 1, o = e.width || 1, l = a / r, u = s / o, f = {}; + return r === 0 && 0 < a || r === 0 && 0 > a ? (f.x = n, f.y = i + s / 2, f) : 0 < r && -1 * u <= l && l <= u ? (f.x = n + o / 2, f.y = i + o * a / 2 / r, f) : 0 > r && -1 * u <= l && l <= u ? (f.x = n - o / 2, f.y = i - o * a / 2 / r, f) : 0 < a && (l <= -1 * u || l >= u) ? (f.x = n + s * r / 2 / a, f.y = i + s / 2, f) : (0 > a && (l <= -1 * u || l >= u) && (f.x = n - s * r / 2 / a, f.y = i - s / 2), f); + }, rg = function(e, r) { + for (var a = 0; a < e.edgeSize; a++) { + var n = e.layoutEdges[a], i = e.idToIndex[n.sourceId], s = e.layoutNodes[i], o = e.idToIndex[n.targetId], l = e.layoutNodes[o], u = l.positionX - s.positionX, f = l.positionY - s.positionY; + if (!(u === 0 && f === 0)) { + var h = Yn(s, u, f), c = Yn(l, -1 * u, -1 * f), v = c.x - h.x, d = c.y - h.y, g = Math.sqrt(v * v + d * d), y = Math.pow(n.idealLength - g, 2) / n.elasticity; + if (g !== 0) + var p = y * v / g, m = y * d / g; + else + var p = 0, m = 0; + s.isLocked || (s.offsetX += p, s.offsetY += m), l.isLocked || (l.offsetX -= p, l.offsetY -= m); + } + } + }, ag = function(e, r) { + if (r.gravity !== 0) + for (var a = 1, n = 0; n < e.graphSet.length; n++) { + var i = e.graphSet[n], s = i.length; + if (n === 0) + var o = e.clientHeight / 2, l = e.clientWidth / 2; + else + var u = e.layoutNodes[e.idToIndex[i[0]]], f = e.layoutNodes[e.idToIndex[u.parentId]], o = f.positionX, l = f.positionY; + for (var h = 0; h < s; h++) { + var c = e.layoutNodes[e.idToIndex[i[h]]]; + if (!c.isLocked) { + var v = o - c.positionX, d = l - c.positionY, g = Math.sqrt(v * v + d * d); + if (g > a) { + var y = r.gravity * v / g, p = r.gravity * d / g; + c.offsetX += y, c.offsetY += p; + } + } + } + } + }, ng = function(e, r) { + var a = [], n = 0, i = -1; + for (a.push.apply(a, e.graphSet[0]), i += e.graphSet[0].length; n <= i; ) { + var s = a[n++], o = e.idToIndex[s], l = e.layoutNodes[o], u = l.children; + if (0 < u.length && !l.isLocked) { + for (var f = l.offsetX, h = l.offsetY, c = 0; c < u.length; c++) { + var v = e.layoutNodes[e.idToIndex[u[c]]]; + v.offsetX += f, v.offsetY += h, a[++i] = u[c]; + } + l.offsetX = 0, l.offsetY = 0; + } + } + }, ig = function(e, r) { + for (var a = 0; a < e.nodeSize; a++) { + var n = e.layoutNodes[a]; + 0 < n.children.length && (n.maxX = void 0, n.minX = void 0, n.maxY = void 0, n.minY = void 0); + } + for (var a = 0; a < e.nodeSize; a++) { + var n = e.layoutNodes[a]; + if (!(0 < n.children.length || n.isLocked)) { + var i = sg(n.offsetX, n.offsetY, e.temperature); + n.positionX += i.x, n.positionY += i.y, n.offsetX = 0, n.offsetY = 0, n.minX = n.positionX - n.width, n.maxX = n.positionX + n.width, n.minY = n.positionY - n.height, n.maxY = n.positionY + n.height, og(n, e); + } + } + for (var a = 0; a < e.nodeSize; a++) { + var n = e.layoutNodes[a]; + 0 < n.children.length && !n.isLocked && (n.positionX = (n.maxX + n.minX) / 2, n.positionY = (n.maxY + n.minY) / 2, n.width = n.maxX - n.minX, n.height = n.maxY - n.minY); + } + }, sg = function(e, r, a) { + var n = Math.sqrt(e * e + r * r); + if (n > a) + var i = { + x: a * e / n, + y: a * r / n + }; + else + var i = { + x: e, + y: r + }; + return i; + }, og = function t(e, r) { + var a = e.parentId; + if (a != null) { + var n = r.layoutNodes[r.idToIndex[a]], i = !1; + if ((n.maxX == null || e.maxX + n.padRight > n.maxX) && (n.maxX = e.maxX + n.padRight, i = !0), (n.minX == null || e.minX - n.padLeft < n.minX) && (n.minX = e.minX - n.padLeft, i = !0), (n.maxY == null || e.maxY + n.padBottom > n.maxY) && (n.maxY = e.maxY + n.padBottom, i = !0), (n.minY == null || e.minY - n.padTop < n.minY) && (n.minY = e.minY - n.padTop, i = !0), i) + return t(n, r); + } + }, Zo = function(e, r) { + for (var a = e.layoutNodes, n = [], i = 0; i < a.length; i++) { + var s = a[i], o = s.cmptId, l = n[o] = n[o] || []; + l.push(s); + } + for (var u = 0, i = 0; i < n.length; i++) { + var f = n[i]; + if (f) { + f.x1 = 1 / 0, f.x2 = -1 / 0, f.y1 = 1 / 0, f.y2 = -1 / 0; + for (var h = 0; h < f.length; h++) { + var c = f[h]; + f.x1 = Math.min(f.x1, c.positionX - c.width / 2), f.x2 = Math.max(f.x2, c.positionX + c.width / 2), f.y1 = Math.min(f.y1, c.positionY - c.height / 2), f.y2 = Math.max(f.y2, c.positionY + c.height / 2); + } + f.w = f.x2 - f.x1, f.h = f.y2 - f.y1, u += f.w * f.h; + } + } + n.sort(function(m, b) { + return b.w * b.h - m.w * m.h; + }); + for (var v = 0, d = 0, g = 0, y = 0, p = Math.sqrt(u) * e.clientWidth / e.clientHeight, i = 0; i < n.length; i++) { + var f = n[i]; + if (f) { + for (var h = 0; h < f.length; h++) { + var c = f[h]; + c.isLocked || (c.positionX += v - f.x1, c.positionY += d - f.y1); + } + v += f.w + r.componentSpacing, g += f.w + r.componentSpacing, y = Math.max(y, f.h), g > p && (d += y + r.componentSpacing, v = 0, g = 0, y = 0); + } + } + }, ug = { + fit: !0, + // whether to fit the viewport to the graph + padding: 30, + // padding used on fit + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: !0, + // prevents node overlap, may overflow boundingBox if not enough space + avoidOverlapPadding: 10, + // extra spacing around nodes when avoidOverlap: true + nodeDimensionsIncludeLabels: !1, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + condense: !1, + // uses all available space on false, uses minimal space on true + rows: void 0, + // force num of rows in the grid + cols: void 0, + // force num of columns in the grid + position: function(e) { + }, + // returns { row, col } for element + sort: void 0, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: !1, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function(e, r) { + return !0; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function(e, r) { + return r; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function Qo(t) { + this.options = Ue({}, ug, t); + } + Qo.prototype.run = function() { + var t = this.options, e = t, r = t.cy, a = e.eles, n = a.nodes().not(":parent"); + e.sort && (n = n.sort(e.sort)); + var i = Ut(e.boundingBox ? e.boundingBox : { + x1: 0, + y1: 0, + w: r.width(), + h: r.height() + }); + if (i.h === 0 || i.w === 0) + a.nodes().layoutPositions(this, e, function(we) { + return { + x: i.x1, + y: i.y1 + }; + }); + else { + var s = n.size(), o = Math.sqrt(s * i.h / i.w), l = Math.round(o), u = Math.round(i.w / i.h * o), f = function(Te) { + if (Te == null) + return Math.min(l, u); + var Ee = Math.min(l, u); + Ee == l ? l = Te : u = Te; + }, h = function(Te) { + if (Te == null) + return Math.max(l, u); + var Ee = Math.max(l, u); + Ee == l ? l = Te : u = Te; + }, c = e.rows, v = e.cols != null ? e.cols : e.columns; + if (c != null && v != null) + l = c, u = v; + else if (c != null && v == null) + l = c, u = Math.ceil(s / l); + else if (c == null && v != null) + u = v, l = Math.ceil(s / u); + else if (u * l > s) { + var d = f(), g = h(); + (d - 1) * g >= s ? f(d - 1) : (g - 1) * d >= s && h(g - 1); + } else + for (; u * l < s; ) { + var y = f(), p = h(); + (p + 1) * y >= s ? h(p + 1) : f(y + 1); + } + var m = i.w / u, b = i.h / l; + if (e.condense && (m = 0, b = 0), e.avoidOverlap) + for (var E = 0; E < n.length; E++) { + var M = n[E], A = M._private.position; + (A.x == null || A.y == null) && (A.x = 0, A.y = 0); + var w = M.layoutDimensions(e), I = e.avoidOverlapPadding, C = w.w + I, B = w.h + I; + m = Math.max(m, C), b = Math.max(b, B); + } + for (var F = {}, R = function(Te, Ee) { + return !!F["c-" + Te + "-" + Ee]; + }, X = function(Te, Ee) { + F["c-" + Te + "-" + Ee] = !0; + }, z = 0, re = 0, W = function() { + re++, re >= u && (re = 0, z++); + }, Z = {}, ie = 0; ie < n.length; ie++) { + var oe = n[ie], de = e.position(oe); + if (de && (de.row !== void 0 || de.col !== void 0)) { + var se = { + row: de.row, + col: de.col + }; + if (se.col === void 0) + for (se.col = 0; R(se.row, se.col); ) + se.col++; + else if (se.row === void 0) + for (se.row = 0; R(se.row, se.col); ) + se.row++; + Z[oe.id()] = se, X(se.row, se.col); + } + } + var ve = function(Te, Ee) { + var ye, ae; + if (Te.locked() || Te.isParent()) + return !1; + var xe = Z[Te.id()]; + if (xe) + ye = xe.col * m + m / 2 + i.x1, ae = xe.row * b + b / 2 + i.y1; + else { + for (; R(z, re); ) + W(); + ye = re * m + m / 2 + i.x1, ae = z * b + b / 2 + i.y1, X(z, re), W(); + } + return { + x: ye, + y: ae + }; + }; + n.layoutPositions(this, e, ve); + } + return this; + }; + var lg = { + ready: function() { + }, + // on layoutready + stop: function() { + } + // on layoutstop + }; + function Pi(t) { + this.options = Ue({}, lg, t); + } + Pi.prototype.run = function() { + var t = this.options, e = t.eles, r = this; + return t.cy, r.emit("layoutstart"), e.nodes().positions(function() { + return { + x: 0, + y: 0 + }; + }), r.one("layoutready", t.ready), r.emit("layoutready"), r.one("layoutstop", t.stop), r.emit("layoutstop"), this; + }, Pi.prototype.stop = function() { + return this; + }; + var fg = { + positions: void 0, + // map of (node id) => (position obj); or function(node){ return somPos; } + zoom: void 0, + // the zoom level to set (prob want fit = false if set) + pan: void 0, + // the pan level to set (prob want fit = false if set) + fit: !0, + // whether to fit to viewport + padding: 30, + // padding on fit + animate: !1, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function(e, r) { + return !0; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function(e, r) { + return r; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function Jo(t) { + this.options = Ue({}, fg, t); + } + Jo.prototype.run = function() { + var t = this.options, e = t.eles, r = e.nodes(), a = Y(t.positions); + function n(i) { + if (t.positions == null) + return pf(i.position()); + if (a) + return t.positions(i); + var s = t.positions[i._private.data.id]; + return s ?? null; + } + return r.layoutPositions(this, t, function(i, s) { + var o = n(i); + return i.locked() || o == null ? !1 : o; + }), this; + }; + var hg = { + fit: !0, + // whether to fit to viewport + padding: 30, + // fit padding + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + animate: !1, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function(e, r) { + return !0; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function(e, r) { + return r; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function jo(t) { + this.options = Ue({}, hg, t); + } + jo.prototype.run = function() { + var t = this.options, e = t.cy, r = t.eles, a = Ut(t.boundingBox ? t.boundingBox : { + x1: 0, + y1: 0, + w: e.width(), + h: e.height() + }), n = function(s, o) { + return { + x: a.x1 + Math.round(Math.random() * a.w), + y: a.y1 + Math.round(Math.random() * a.h) + }; + }; + return r.nodes().layoutPositions(this, t, n), this; + }; + var cg = [{ + name: "breadthfirst", + impl: Ho + }, { + name: "circle", + impl: Xo + }, { + name: "concentric", + impl: qo + }, { + name: "cose", + impl: Un + }, { + name: "grid", + impl: Qo + }, { + name: "null", + impl: Pi + }, { + name: "preset", + impl: Jo + }, { + name: "random", + impl: jo + }]; + function eu(t) { + this.options = t, this.notifications = 0; + } + var tu = function() { + }, ru = function() { + throw new Error("A headless instance can not render images"); + }; + eu.prototype = { + recalculateRenderedStyle: tu, + notify: function() { + this.notifications++; + }, + init: tu, + isHeadless: function() { + return !0; + }, + png: ru, + jpg: ru + }; + var Bi = {}; + Bi.arrowShapeWidth = 0.3, Bi.registerArrowShapes = function() { + var t = this.arrowShapes = {}, e = this, r = function(u, f, h, c, v, d, g) { + var y = v.x - h / 2 - g, p = v.x + h / 2 + g, m = v.y - h / 2 - g, b = v.y + h / 2 + g, E = y <= u && u <= p && m <= f && f <= b; + return E; + }, a = function(u, f, h, c, v) { + var d = u * Math.cos(c) - f * Math.sin(c), g = u * Math.sin(c) + f * Math.cos(c), y = d * h, p = g * h, m = y + v.x, b = p + v.y; + return { + x: m, + y: b + }; + }, n = function(u, f, h, c) { + for (var v = [], d = 0; d < u.length; d += 2) { + var g = u[d], y = u[d + 1]; + v.push(a(g, y, f, h, c)); + } + return v; + }, i = function(u) { + for (var f = [], h = 0; h < u.length; h++) { + var c = u[h]; + f.push(c.x, c.y); + } + return f; + }, s = function(u) { + return u.pstyle("width").pfValue * u.pstyle("arrow-scale").pfValue * 2; + }, o = function(u, f) { + j(f) && (f = t[f]), t[u] = Ue({ + name: u, + points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], + collide: function(c, v, d, g, y, p) { + var m = i(n(this.points, d + 2 * p, g, y)), b = Yt(c, v, m); + return b; + }, + roughCollide: r, + draw: function(c, v, d, g) { + var y = n(this.points, v, d, g); + e.arrowShapeImpl("polygon")(c, y); + }, + spacing: function(c) { + return 0; + }, + gap: s + }, f); + }; + o("none", { + collide: cn, + roughCollide: cn, + draw: ni, + spacing: cs, + gap: cs + }), o("triangle", { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3] + }), o("arrow", "triangle"), o("triangle-backcurve", { + points: t.triangle.points, + controlPoint: [0, -0.15], + roughCollide: r, + draw: function(u, f, h, c, v) { + var d = n(this.points, f, h, c), g = this.controlPoint, y = a(g[0], g[1], f, h, c); + e.arrowShapeImpl(this.name)(u, d, y); + }, + gap: function(u) { + return s(u) * 0.8; + } + }), o("triangle-tee", { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], + collide: function(u, f, h, c, v, d, g) { + var y = i(n(this.points, h + 2 * g, c, v)), p = i(n(this.pointsTee, h + 2 * g, c, v)), m = Yt(u, f, y) || Yt(u, f, p); + return m; + }, + draw: function(u, f, h, c, v) { + var d = n(this.points, f, h, c), g = n(this.pointsTee, f, h, c); + e.arrowShapeImpl(this.name)(u, d, g); + } + }), o("circle-triangle", { + radius: 0.15, + pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], + collide: function(u, f, h, c, v, d, g) { + var y = v, p = Math.pow(y.x - u, 2) + Math.pow(y.y - f, 2) <= Math.pow((h + 2 * g) * this.radius, 2), m = i(n(this.points, h + 2 * g, c, v)); + return Yt(u, f, m) || p; + }, + draw: function(u, f, h, c, v) { + var d = n(this.pointsTr, f, h, c); + e.arrowShapeImpl(this.name)(u, d, c.x, c.y, this.radius * f); + }, + spacing: function(u) { + return e.getArrowWidth(u.pstyle("width").pfValue, u.pstyle("arrow-scale").value) * this.radius; + } + }), o("triangle-cross", { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + baseCrossLinePts: [ + -0.15, + -0.4, + // first half of the rectangle + -0.15, + -0.4, + 0.15, + -0.4, + // second half of the rectangle + 0.15, + -0.4 + ], + crossLinePts: function(u, f) { + var h = this.baseCrossLinePts.slice(), c = f / u, v = 3, d = 5; + return h[v] = h[v] - c, h[d] = h[d] - c, h; + }, + collide: function(u, f, h, c, v, d, g) { + var y = i(n(this.points, h + 2 * g, c, v)), p = i(n(this.crossLinePts(h, d), h + 2 * g, c, v)), m = Yt(u, f, y) || Yt(u, f, p); + return m; + }, + draw: function(u, f, h, c, v) { + var d = n(this.points, f, h, c), g = n(this.crossLinePts(f, v), f, h, c); + e.arrowShapeImpl(this.name)(u, d, g); + } + }), o("vee", { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], + gap: function(u) { + return s(u) * 0.525; + } + }), o("circle", { + radius: 0.15, + collide: function(u, f, h, c, v, d, g) { + var y = v, p = Math.pow(y.x - u, 2) + Math.pow(y.y - f, 2) <= Math.pow((h + 2 * g) * this.radius, 2); + return p; + }, + draw: function(u, f, h, c, v) { + e.arrowShapeImpl(this.name)(u, c.x, c.y, this.radius * f); + }, + spacing: function(u) { + return e.getArrowWidth(u.pstyle("width").pfValue, u.pstyle("arrow-scale").value) * this.radius; + } + }), o("tee", { + points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], + spacing: function(u) { + return 1; + }, + gap: function(u) { + return 1; + } + }), o("square", { + points: [-0.15, 0, 0.15, 0, 0.15, -0.3, -0.15, -0.3] + }), o("diamond", { + points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], + gap: function(u) { + return u.pstyle("width").pfValue * u.pstyle("arrow-scale").value; + } + }), o("chevron", { + points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], + gap: function(u) { + return 0.95 * u.pstyle("width").pfValue * u.pstyle("arrow-scale").value; + } + }); + }; + var Vr = {}; + Vr.projectIntoViewport = function(t, e) { + var r = this.cy, a = this.findContainerClientCoords(), n = a[0], i = a[1], s = a[4], o = r.pan(), l = r.zoom(), u = ((t - n) / s - o.x) / l, f = ((e - i) / s - o.y) / l; + return [u, f]; + }, Vr.findContainerClientCoords = function() { + if (this.containerBB) + return this.containerBB; + var t = this.container, e = t.getBoundingClientRect(), r = D.getComputedStyle(t), a = function(p) { + return parseFloat(r.getPropertyValue(p)); + }, n = { + left: a("padding-left"), + right: a("padding-right"), + top: a("padding-top"), + bottom: a("padding-bottom") + }, i = { + left: a("border-left-width"), + right: a("border-right-width"), + top: a("border-top-width"), + bottom: a("border-bottom-width") + }, s = t.clientWidth, o = t.clientHeight, l = n.left + n.right, u = n.top + n.bottom, f = i.left + i.right, h = e.width / (s + f), c = s - l, v = o - u, d = e.left + n.left + i.left, g = e.top + n.top + i.top; + return this.containerBB = [d, g, c, v, h]; + }, Vr.invalidateContainerClientCoordsCache = function() { + this.containerBB = null; + }, Vr.findNearestElement = function(t, e, r, a) { + return this.findNearestElements(t, e, r, a)[0]; + }, Vr.findNearestElements = function(t, e, r, a) { + var n = this, i = this, s = i.getCachedZSortedEles(), o = [], l = i.cy.zoom(), u = i.cy.hasCompoundNodes(), f = (a ? 24 : 8) / l, h = (a ? 8 : 2) / l, c = (a ? 8 : 2) / l, v = 1 / 0, d, g; + r && (s = s.interactive); + function y(w, I) { + if (w.isNode()) { + if (g) + return; + g = w, o.push(w); + } + if (w.isEdge() && (I == null || I < v)) + if (d) { + if (d.pstyle("z-compound-depth").value === w.pstyle("z-compound-depth").value && d.pstyle("z-compound-depth").value === w.pstyle("z-compound-depth").value) { + for (var C = 0; C < o.length; C++) + if (o[C].isEdge()) { + o[C] = w, d = w, v = I ?? v; + break; + } + } + } else + o.push(w), d = w, v = I ?? v; + } + function p(w) { + var I = w.outerWidth() + 2 * h, C = w.outerHeight() + 2 * h, B = I / 2, F = C / 2, R = w.position(); + if (R.x - B <= t && t <= R.x + B && R.y - F <= e && e <= R.y + F) { + var X = i.nodeShapes[n.getNodeShape(w)]; + if (X.checkPoint(t, e, 0, I, C, R.x, R.y)) + return y(w, 0), !0; + } + } + function m(w) { + var I = w._private, C = I.rscratch, B = w.pstyle("width").pfValue, F = w.pstyle("arrow-scale").value, R = B / 2 + f, X = R * R, z = R * 2, ie = I.source, oe = I.target, re; + if (C.edgeType === "segments" || C.edgeType === "straight" || C.edgeType === "haystack") { + for (var W = C.allpts, Z = 0; Z + 3 < W.length; Z += 2) + if (Of(t, e, W[Z], W[Z + 1], W[Z + 2], W[Z + 3], z) && X > (re = kf(t, e, W[Z], W[Z + 1], W[Z + 2], W[Z + 3]))) + return y(w, re), !0; + } else if (C.edgeType === "bezier" || C.edgeType === "multibezier" || C.edgeType === "self" || C.edgeType === "compound") { + for (var W = C.allpts, Z = 0; Z + 5 < C.allpts.length; Z += 4) + if (Nf(t, e, W[Z], W[Z + 1], W[Z + 2], W[Z + 3], W[Z + 4], W[Z + 5], z) && X > (re = Rf(t, e, W[Z], W[Z + 1], W[Z + 2], W[Z + 3], W[Z + 4], W[Z + 5]))) + return y(w, re), !0; + } + for (var ie = ie || I.source, oe = oe || I.target, de = n.getArrowWidth(B, F), se = [{ + name: "source", + x: C.arrowStartX, + y: C.arrowStartY, + angle: C.srcArrowAngle + }, { + name: "target", + x: C.arrowEndX, + y: C.arrowEndY, + angle: C.tgtArrowAngle + }, { + name: "mid-source", + x: C.midX, + y: C.midY, + angle: C.midsrcArrowAngle + }, { + name: "mid-target", + x: C.midX, + y: C.midY, + angle: C.midtgtArrowAngle + }], Z = 0; Z < se.length; Z++) { + var ve = se[Z], we = i.arrowShapes[w.pstyle(ve.name + "-arrow-shape").value], Te = w.pstyle("width").pfValue; + if (we.roughCollide(t, e, de, ve.angle, { + x: ve.x, + y: ve.y + }, Te, f) && we.collide(t, e, de, ve.angle, { + x: ve.x, + y: ve.y + }, Te, f)) + return y(w), !0; + } + u && o.length > 0 && (p(ie), p(oe)); + } + function b(w, I, C) { + return er(w, I, C); + } + function E(w, I) { + var C = w._private, B = c, F; + I ? F = I + "-" : F = "", w.boundingBox(); + var R = C.labelBounds[I || "main"], X = w.pstyle(F + "label").value, z = w.pstyle("text-events").strValue === "yes"; + if (!(!z || !X)) { + var re = b(C.rscratch, "labelX", I), W = b(C.rscratch, "labelY", I), Z = b(C.rscratch, "labelAngle", I), ie = w.pstyle(F + "text-margin-x").pfValue, oe = w.pstyle(F + "text-margin-y").pfValue, de = R.x1 - B - ie, se = R.x2 + B - ie, ve = R.y1 - B - oe, we = R.y2 + B - oe; + if (Z) { + var Te = Math.cos(Z), Ee = Math.sin(Z), ye = function(qe, Re) { + return qe = qe - re, Re = Re - W, { + x: qe * Te - Re * Ee + re, + y: qe * Ee + Re * Te + W + }; + }, ae = ye(de, ve), xe = ye(de, we), Ce = ye(se, ve), Oe = ye(se, we), Ie = [ + // with the margin added after the rotation is applied + ae.x + ie, + ae.y + oe, + Ce.x + ie, + Ce.y + oe, + Oe.x + ie, + Oe.y + oe, + xe.x + ie, + xe.y + oe + ]; + if (Yt(t, e, Ie)) + return y(w), !0; + } else if (ta(R, t, e)) + return y(w), !0; + } + } + for (var M = s.length - 1; M >= 0; M--) { + var A = s[M]; + A.isNode() ? p(A) || E(A) : m(A) || E(A) || E(A, "source") || E(A, "target"); + } + return o; + }, Vr.getAllInBox = function(t, e, r, a) { + var n = this.getCachedZSortedEles().interactive, i = [], s = Math.min(t, r), o = Math.max(t, r), l = Math.min(e, a), u = Math.max(e, a); + t = s, r = o, e = l, a = u; + for (var f = Ut({ + x1: t, + y1: e, + x2: r, + y2: a + }), h = 0; h < n.length; h++) { + var c = n[h]; + if (c.isNode()) { + var v = c, d = v.boundingBox({ + includeNodes: !0, + includeEdges: !1, + includeLabels: !1 + }); + li(f, d) && !Es(d, f) && i.push(v); + } else { + var g = c, y = g._private, p = y.rscratch; + if (p.startX != null && p.startY != null && !ta(f, p.startX, p.startY) || p.endX != null && p.endY != null && !ta(f, p.endX, p.endY)) + continue; + if (p.edgeType === "bezier" || p.edgeType === "multibezier" || p.edgeType === "self" || p.edgeType === "compound" || p.edgeType === "segments" || p.edgeType === "haystack") { + for (var m = y.rstyle.bezierPts || y.rstyle.linePts || y.rstyle.haystackPts, b = !0, E = 0; E < m.length; E++) + if (!Af(f, m[E])) { + b = !1; + break; + } + b && i.push(g); + } else + (p.edgeType === "haystack" || p.edgeType === "straight") && i.push(g); + } + } + return i; + }; + var Hn = {}; + Hn.calculateArrowAngles = function(t) { + var e = t._private.rscratch, r = e.edgeType === "haystack", a = e.edgeType === "bezier", n = e.edgeType === "multibezier", i = e.edgeType === "segments", s = e.edgeType === "compound", o = e.edgeType === "self", l, u, f, h, c, v, p, m; + if (r ? (f = e.haystackPts[0], h = e.haystackPts[1], c = e.haystackPts[2], v = e.haystackPts[3]) : (f = e.arrowStartX, h = e.arrowStartY, c = e.arrowEndX, v = e.arrowEndY), p = e.midX, m = e.midY, i) + l = f - e.segpts[0], u = h - e.segpts[1]; + else if (n || s || o || a) { + var d = e.allpts, g = St(d[0], d[2], d[4], 0.1), y = St(d[1], d[3], d[5], 0.1); + l = f - g, u = h - y; + } else + l = f - p, u = h - m; + e.srcArrowAngle = gn(l, u); + var p = e.midX, m = e.midY; + if (r && (p = (f + c) / 2, m = (h + v) / 2), l = c - f, u = v - h, i) { + var d = e.allpts; + if (d.length / 2 % 2 === 0) { + var b = d.length / 2, E = b - 2; + l = d[b] - d[E], u = d[b + 1] - d[E + 1]; + } else { + var b = d.length / 2 - 1, E = b - 2, M = b + 2; + l = d[b] - d[E], u = d[b + 1] - d[E + 1]; + } + } else if (n || s || o) { + var d = e.allpts, A = e.ctrlpts, w, I, C, B; + if (A.length / 2 % 2 === 0) { + var F = d.length / 2 - 1, R = F + 2, X = R + 2; + w = St(d[F], d[R], d[X], 0), I = St(d[F + 1], d[R + 1], d[X + 1], 0), C = St(d[F], d[R], d[X], 1e-4), B = St(d[F + 1], d[R + 1], d[X + 1], 1e-4); + } else { + var R = d.length / 2 - 1, F = R - 2, X = R + 2; + w = St(d[F], d[R], d[X], 0.4999), I = St(d[F + 1], d[R + 1], d[X + 1], 0.4999), C = St(d[F], d[R], d[X], 0.5), B = St(d[F + 1], d[R + 1], d[X + 1], 0.5); + } + l = C - w, u = B - I; + } + if (e.midtgtArrowAngle = gn(l, u), e.midDispX = l, e.midDispY = u, l *= -1, u *= -1, i) { + var d = e.allpts; + if (d.length / 2 % 2 !== 0) { + var b = d.length / 2 - 1, M = b + 2; + l = -(d[M] - d[b]), u = -(d[M + 1] - d[b + 1]); + } + } + if (e.midsrcArrowAngle = gn(l, u), i) + l = c - e.segpts[e.segpts.length - 2], u = v - e.segpts[e.segpts.length - 1]; + else if (n || s || o || a) { + var d = e.allpts, z = d.length, g = St(d[z - 6], d[z - 4], d[z - 2], 0.9), y = St(d[z - 5], d[z - 3], d[z - 1], 0.9); + l = c - g, u = v - y; + } else + l = c - p, u = v - m; + e.tgtArrowAngle = gn(l, u); + }, Hn.getArrowWidth = Hn.getArrowHeight = function(t, e) { + var r = this.arrowWidthCache = this.arrowWidthCache || {}, a = r[t + ", " + e]; + return a || (a = Math.max(Math.pow(t * 13.37, 0.9), 29) * e, r[t + ", " + e] = a, a); + }; + var Vt = {}; + Vt.findHaystackPoints = function(t) { + for (var e = 0; e < t.length; e++) { + var r = t[e], a = r._private, n = a.rscratch; + if (!n.haystack) { + var i = Math.random() * 2 * Math.PI; + n.source = { + x: Math.cos(i), + y: Math.sin(i) + }, i = Math.random() * 2 * Math.PI, n.target = { + x: Math.cos(i), + y: Math.sin(i) + }; + } + var s = a.source, o = a.target, l = s.position(), u = o.position(), f = s.width(), h = o.width(), c = s.height(), v = o.height(), d = r.pstyle("haystack-radius").value, g = d / 2; + n.haystackPts = n.allpts = [n.source.x * f * g + l.x, n.source.y * c * g + l.y, n.target.x * h * g + u.x, n.target.y * v * g + u.y], n.midX = (n.allpts[0] + n.allpts[2]) / 2, n.midY = (n.allpts[1] + n.allpts[3]) / 2, n.edgeType = "haystack", n.haystack = !0, this.storeEdgeProjections(r), this.calculateArrowAngles(r), this.recalculateEdgeLabelProjections(r), this.calculateLabelAngles(r); + } + }, Vt.findSegmentsPoints = function(t, e) { + var r = t._private.rscratch, a = e.posPts, n = e.intersectionPts, i = e.vectorNormInverse, s = t.pstyle("edge-distances").value, o = t.pstyle("segment-weights"), l = t.pstyle("segment-distances"), u = Math.min(o.pfValue.length, l.pfValue.length); + r.edgeType = "segments", r.segpts = []; + for (var f = 0; f < u; f++) { + var h = o.pfValue[f], c = l.pfValue[f], v = 1 - h, d = h, g = s === "node-position" ? a : n, y = { + x: g.x1 * v + g.x2 * d, + y: g.y1 * v + g.y2 * d + }; + r.segpts.push(y.x + i.x * c, y.y + i.y * c); + } + }, Vt.findLoopPoints = function(t, e, r, a) { + var n = t._private.rscratch, i = e.dirCounts, s = e.srcPos, o = t.pstyle("control-point-distances"), l = o ? o.pfValue[0] : void 0, u = t.pstyle("loop-direction").pfValue, f = t.pstyle("loop-sweep").pfValue, h = t.pstyle("control-point-step-size").pfValue; + n.edgeType = "self"; + var c = r, v = h; + a && (c = 0, v = l); + var d = u - Math.PI / 2, g = d - f / 2, y = d + f / 2, p = u + "_" + f; + c = i[p] === void 0 ? i[p] = 0 : ++i[p], n.ctrlpts = [s.x + Math.cos(g) * 1.4 * v * (c / 3 + 1), s.y + Math.sin(g) * 1.4 * v * (c / 3 + 1), s.x + Math.cos(y) * 1.4 * v * (c / 3 + 1), s.y + Math.sin(y) * 1.4 * v * (c / 3 + 1)]; + }, Vt.findCompoundLoopPoints = function(t, e, r, a) { + var n = t._private.rscratch; + n.edgeType = "compound"; + var i = e.srcPos, s = e.tgtPos, o = e.srcW, l = e.srcH, u = e.tgtW, f = e.tgtH, h = t.pstyle("control-point-step-size").pfValue, c = t.pstyle("control-point-distances"), v = c ? c.pfValue[0] : void 0, d = r, g = h; + a && (d = 0, g = v); + var y = 50, p = { + x: i.x - o / 2, + y: i.y - l / 2 + }, m = { + x: s.x - u / 2, + y: s.y - f / 2 + }, b = { + x: Math.min(p.x, m.x), + y: Math.min(p.y, m.y) + }, E = 0.5, M = Math.max(E, Math.log(o * 0.01)), A = Math.max(E, Math.log(u * 0.01)); + n.ctrlpts = [b.x, b.y - (1 + Math.pow(y, 1.12) / 100) * g * (d / 3 + 1) * M, b.x - (1 + Math.pow(y, 1.12) / 100) * g * (d / 3 + 1) * A, b.y]; + }, Vt.findStraightEdgePoints = function(t) { + t._private.rscratch.edgeType = "straight"; + }, Vt.findBezierPoints = function(t, e, r, a, n) { + var i = t._private.rscratch, s = e.vectorNormInverse, o = e.posPts, l = e.intersectionPts, u = t.pstyle("edge-distances").value, f = t.pstyle("control-point-step-size").pfValue, h = t.pstyle("control-point-distances"), c = t.pstyle("control-point-weights"), v = h && c ? Math.min(h.value.length, c.value.length) : 1, d = h ? h.pfValue[0] : void 0, g = c.value[0], y = a; + i.edgeType = y ? "multibezier" : "bezier", i.ctrlpts = []; + for (var p = 0; p < v; p++) { + var m = (0.5 - e.eles.length / 2 + r) * f * (n ? -1 : 1), b = void 0, E = ms(m); + y && (d = h ? h.pfValue[p] : f, g = c.value[p]), a ? b = d : b = d !== void 0 ? E * d : void 0; + var M = b !== void 0 ? b : m, A = 1 - g, w = g, I = u === "node-position" ? o : l, C = { + x: I.x1 * A + I.x2 * w, + y: I.y1 * A + I.y2 * w + }; + i.ctrlpts.push(C.x + s.x * M, C.y + s.y * M); + } + }, Vt.findTaxiPoints = function(t, e) { + var r = t._private.rscratch; + r.edgeType = "segments"; + var a = "vertical", n = "horizontal", i = "leftward", s = "rightward", o = "downward", l = "upward", u = "auto", f = e.posPts, h = e.srcW, c = e.srcH, v = e.tgtW, d = e.tgtH, g = t.pstyle("edge-distances").value, y = g !== "node-position", p = t.pstyle("taxi-direction").value, m = p, b = t.pstyle("taxi-turn"), E = b.units === "%", M = b.pfValue, A = M < 0, w = t.pstyle("taxi-turn-min-distance").pfValue, I = y ? (h + v) / 2 : 0, C = y ? (c + d) / 2 : 0, B = f.x2 - f.x1, F = f.y2 - f.y1, R = function(ze, at) { + return ze > 0 ? Math.max(ze - at, 0) : Math.min(ze + at, 0); + }, X = R(B, I), z = R(F, C), re = !1; + m === u ? p = Math.abs(X) > Math.abs(z) ? n : a : m === l || m === o ? (p = a, re = !0) : (m === i || m === s) && (p = n, re = !0); + var W = p === a, Z = W ? z : X, ie = W ? F : B, oe = ms(ie), de = !1; + !(re && (E || A)) && (m === o && ie < 0 || m === l && ie > 0 || m === i && ie > 0 || m === s && ie < 0) && (oe *= -1, Z = oe * Math.abs(Z), de = !0); + var se; + if (E) { + var ve = M < 0 ? 1 + M : M; + se = ve * Z; + } else { + var we = M < 0 ? Z : 0; + se = we + M * oe; + } + var Te = function(ze) { + return Math.abs(ze) < w || Math.abs(ze) >= Math.abs(Z); + }, Ee = Te(se), ye = Te(Math.abs(Z) - Math.abs(se)), ae = Ee || ye; + if (ae && !de) + if (W) { + var xe = Math.abs(ie) <= c / 2, Ce = Math.abs(B) <= v / 2; + if (xe) { + var Oe = (f.x1 + f.x2) / 2, Ie = f.y1, He = f.y2; + r.segpts = [Oe, Ie, Oe, He]; + } else if (Ce) { + var qe = (f.y1 + f.y2) / 2, Re = f.x1, Me = f.x2; + r.segpts = [Re, qe, Me, qe]; + } else + r.segpts = [f.x1, f.y2]; + } else { + var Ve = Math.abs(ie) <= h / 2, Fe = Math.abs(F) <= d / 2; + if (Ve) { + var ke = (f.y1 + f.y2) / 2, Ge = f.x1, et = f.x2; + r.segpts = [Ge, ke, et, ke]; + } else if (Fe) { + var We = (f.x1 + f.x2) / 2, Ye = f.y1, Se = f.y2; + r.segpts = [We, Ye, We, Se]; + } else + r.segpts = [f.x2, f.y1]; + } + else if (W) { + var N = f.y1 + se + (y ? c / 2 * oe : 0), le = f.x1, De = f.x2; + r.segpts = [le, N, De, N]; + } else { + var me = f.x1 + se + (y ? h / 2 * oe : 0), be = f.y1, Ke = f.y2; + r.segpts = [me, be, me, Ke]; + } + }, Vt.tryToCorrectInvalidPoints = function(t, e) { + var r = t._private.rscratch; + if (r.edgeType === "bezier") { + var a = e.srcPos, n = e.tgtPos, i = e.srcW, s = e.srcH, o = e.tgtW, l = e.tgtH, u = e.srcShape, f = e.tgtShape, h = !k(r.startX) || !k(r.startY), c = !k(r.arrowStartX) || !k(r.arrowStartY), v = !k(r.endX) || !k(r.endY), d = !k(r.arrowEndX) || !k(r.arrowEndY), g = 3, y = this.getArrowWidth(t.pstyle("width").pfValue, t.pstyle("arrow-scale").value) * this.arrowShapeWidth, p = g * y, m = Pr({ + x: r.ctrlpts[0], + y: r.ctrlpts[1] + }, { + x: r.startX, + y: r.startY + }), b = m < p, E = Pr({ + x: r.ctrlpts[0], + y: r.ctrlpts[1] + }, { + x: r.endX, + y: r.endY + }), M = E < p, A = !1; + if (h || c || b) { + A = !0; + var w = { + // delta + x: r.ctrlpts[0] - a.x, + y: r.ctrlpts[1] - a.y + }, I = Math.sqrt(w.x * w.x + w.y * w.y), C = { + // normalised delta + x: w.x / I, + y: w.y / I + }, B = Math.max(i, s), F = { + // *2 radius guarantees outside shape + x: r.ctrlpts[0] + C.x * 2 * B, + y: r.ctrlpts[1] + C.y * 2 * B + }, R = u.intersectLine(a.x, a.y, i, s, F.x, F.y, 0); + b ? (r.ctrlpts[0] = r.ctrlpts[0] + C.x * (p - m), r.ctrlpts[1] = r.ctrlpts[1] + C.y * (p - m)) : (r.ctrlpts[0] = R[0] + C.x * p, r.ctrlpts[1] = R[1] + C.y * p); + } + if (v || d || M) { + A = !0; + var X = { + // delta + x: r.ctrlpts[0] - n.x, + y: r.ctrlpts[1] - n.y + }, z = Math.sqrt(X.x * X.x + X.y * X.y), re = { + // normalised delta + x: X.x / z, + y: X.y / z + }, W = Math.max(i, s), Z = { + // *2 radius guarantees outside shape + x: r.ctrlpts[0] + re.x * 2 * W, + y: r.ctrlpts[1] + re.y * 2 * W + }, ie = f.intersectLine(n.x, n.y, o, l, Z.x, Z.y, 0); + M ? (r.ctrlpts[0] = r.ctrlpts[0] + re.x * (p - E), r.ctrlpts[1] = r.ctrlpts[1] + re.y * (p - E)) : (r.ctrlpts[0] = ie[0] + re.x * p, r.ctrlpts[1] = ie[1] + re.y * p); + } + A && this.findEndpoints(t); + } + }, Vt.storeAllpts = function(t) { + var e = t._private.rscratch; + if (e.edgeType === "multibezier" || e.edgeType === "bezier" || e.edgeType === "self" || e.edgeType === "compound") { + e.allpts = [], e.allpts.push(e.startX, e.startY); + for (var r = 0; r + 1 < e.ctrlpts.length; r += 2) + e.allpts.push(e.ctrlpts[r], e.ctrlpts[r + 1]), r + 3 < e.ctrlpts.length && e.allpts.push((e.ctrlpts[r] + e.ctrlpts[r + 2]) / 2, (e.ctrlpts[r + 1] + e.ctrlpts[r + 3]) / 2); + e.allpts.push(e.endX, e.endY); + var a, n; + e.ctrlpts.length / 2 % 2 === 0 ? (a = e.allpts.length / 2 - 1, e.midX = e.allpts[a], e.midY = e.allpts[a + 1]) : (a = e.allpts.length / 2 - 3, n = 0.5, e.midX = St(e.allpts[a], e.allpts[a + 2], e.allpts[a + 4], n), e.midY = St(e.allpts[a + 1], e.allpts[a + 3], e.allpts[a + 5], n)); + } else if (e.edgeType === "straight") + e.allpts = [e.startX, e.startY, e.endX, e.endY], e.midX = (e.startX + e.endX + e.arrowStartX + e.arrowEndX) / 4, e.midY = (e.startY + e.endY + e.arrowStartY + e.arrowEndY) / 4; + else if (e.edgeType === "segments") + if (e.allpts = [], e.allpts.push(e.startX, e.startY), e.allpts.push.apply(e.allpts, e.segpts), e.allpts.push(e.endX, e.endY), e.segpts.length % 4 === 0) { + var i = e.segpts.length / 2, s = i - 2; + e.midX = (e.segpts[s] + e.segpts[i]) / 2, e.midY = (e.segpts[s + 1] + e.segpts[i + 1]) / 2; + } else { + var o = e.segpts.length / 2 - 1; + e.midX = e.segpts[o], e.midY = e.segpts[o + 1]; + } + }, Vt.checkForInvalidEdgeWarning = function(t) { + var e = t[0]._private.rscratch; + e.nodesOverlap || k(e.startX) && k(e.startY) && k(e.endX) && k(e.endY) ? e.loggedErr = !1 : e.loggedErr || (e.loggedErr = !0, ft("Edge `" + t.id() + "` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.")); + }, Vt.findEdgeControlPoints = function(t) { + var e = this; + if (!(!t || t.length === 0)) { + for (var r = this, a = r.cy, n = a.hasCompoundNodes(), i = { + map: new ur(), + get: function(w) { + var I = this.map.get(w[0]); + return I != null ? I.get(w[1]) : null; + }, + set: function(w, I) { + var C = this.map.get(w[0]); + C == null && (C = new ur(), this.map.set(w[0], C)), C.set(w[1], I); + } + }, s = [], o = [], l = 0; l < t.length; l++) { + var u = t[l], f = u._private, h = u.pstyle("curve-style").value; + if (!(u.removed() || !u.takesUpSpace())) { + if (h === "haystack") { + o.push(u); + continue; + } + var c = h === "unbundled-bezier" || h === "segments" || h === "straight" || h === "straight-triangle" || h === "taxi", v = h === "unbundled-bezier" || h === "bezier", d = f.source, g = f.target, y = d.poolIndex(), p = g.poolIndex(), m = [y, p].sort(), b = i.get(m); + b == null && (b = { + eles: [] + }, i.set(m, b), s.push(m)), b.eles.push(u), c && (b.hasUnbundled = !0), v && (b.hasBezier = !0); + } + } + for (var E = function(w) { + var I = s[w], C = i.get(I), B = void 0; + if (!C.hasUnbundled) { + var F = C.eles[0].parallelEdges().filter(function(Se) { + return Se.isBundledBezier(); + }); + ii(C.eles), F.forEach(function(Se) { + return C.eles.push(Se); + }), C.eles.sort(function(Se, N) { + return Se.poolIndex() - N.poolIndex(); + }); + } + var R = C.eles[0], X = R.source(), z = R.target(); + if (X.poolIndex() > z.poolIndex()) { + var re = X; + X = z, z = re; + } + var W = C.srcPos = X.position(), Z = C.tgtPos = z.position(), ie = C.srcW = X.outerWidth(), oe = C.srcH = X.outerHeight(), de = C.tgtW = z.outerWidth(), se = C.tgtH = z.outerHeight(), ve = C.srcShape = r.nodeShapes[e.getNodeShape(X)], we = C.tgtShape = r.nodeShapes[e.getNodeShape(z)]; + C.dirCounts = { + north: 0, + west: 0, + south: 0, + east: 0, + northwest: 0, + southwest: 0, + northeast: 0, + southeast: 0 + }; + for (var Te = 0; Te < C.eles.length; Te++) { + var Ee = C.eles[Te], ye = Ee[0]._private.rscratch, ae = Ee.pstyle("curve-style").value, xe = ae === "unbundled-bezier" || ae === "segments" || ae === "taxi", Ce = !X.same(Ee.source()); + if (!C.calculatedIntersection && X !== z && (C.hasBezier || C.hasUnbundled)) { + C.calculatedIntersection = !0; + var Oe = ve.intersectLine(W.x, W.y, ie, oe, Z.x, Z.y, 0), Ie = C.srcIntn = Oe, He = we.intersectLine(Z.x, Z.y, de, se, W.x, W.y, 0), qe = C.tgtIntn = He, Re = C.intersectionPts = { + x1: Oe[0], + x2: He[0], + y1: Oe[1], + y2: He[1] + }, Me = C.posPts = { + x1: W.x, + x2: Z.x, + y1: W.y, + y2: Z.y + }, Ve = He[1] - Oe[1], Fe = He[0] - Oe[0], ke = Math.sqrt(Fe * Fe + Ve * Ve), Ge = C.vector = { + x: Fe, + y: Ve + }, et = C.vectorNorm = { + x: Ge.x / ke, + y: Ge.y / ke + }, We = { + x: -et.y, + y: et.x + }; + C.nodesOverlap = !k(ke) || we.checkPoint(Oe[0], Oe[1], 0, de, se, Z.x, Z.y) || ve.checkPoint(He[0], He[1], 0, ie, oe, W.x, W.y), C.vectorNormInverse = We, B = { + nodesOverlap: C.nodesOverlap, + dirCounts: C.dirCounts, + calculatedIntersection: !0, + hasBezier: C.hasBezier, + hasUnbundled: C.hasUnbundled, + eles: C.eles, + srcPos: Z, + tgtPos: W, + srcW: de, + srcH: se, + tgtW: ie, + tgtH: oe, + srcIntn: qe, + tgtIntn: Ie, + srcShape: we, + tgtShape: ve, + posPts: { + x1: Me.x2, + y1: Me.y2, + x2: Me.x1, + y2: Me.y1 + }, + intersectionPts: { + x1: Re.x2, + y1: Re.y2, + x2: Re.x1, + y2: Re.y1 + }, + vector: { + x: -Ge.x, + y: -Ge.y + }, + vectorNorm: { + x: -et.x, + y: -et.y + }, + vectorNormInverse: { + x: -We.x, + y: -We.y + } + }; + } + var Ye = Ce ? B : C; + ye.nodesOverlap = Ye.nodesOverlap, ye.srcIntn = Ye.srcIntn, ye.tgtIntn = Ye.tgtIntn, n && (X.isParent() || X.isChild() || z.isParent() || z.isChild()) && (X.parents().anySame(z) || z.parents().anySame(X) || X.same(z) && X.isParent()) ? e.findCompoundLoopPoints(Ee, Ye, Te, xe) : X === z ? e.findLoopPoints(Ee, Ye, Te, xe) : ae === "segments" ? e.findSegmentsPoints(Ee, Ye) : ae === "taxi" ? e.findTaxiPoints(Ee, Ye) : ae === "straight" || !xe && C.eles.length % 2 === 1 && Te === Math.floor(C.eles.length / 2) ? e.findStraightEdgePoints(Ee) : e.findBezierPoints(Ee, Ye, Te, xe, Ce), e.findEndpoints(Ee), e.tryToCorrectInvalidPoints(Ee, Ye), e.checkForInvalidEdgeWarning(Ee), e.storeAllpts(Ee), e.storeEdgeProjections(Ee), e.calculateArrowAngles(Ee), e.recalculateEdgeLabelProjections(Ee), e.calculateLabelAngles(Ee); + } + }, M = 0; M < s.length; M++) + E(M); + this.findHaystackPoints(o); + } + }; + function au(t) { + var e = []; + if (t != null) { + for (var r = 0; r < t.length; r += 2) { + var a = t[r], n = t[r + 1]; + e.push({ + x: a, + y: n + }); + } + return e; + } + } + Vt.getSegmentPoints = function(t) { + var e = t[0]._private.rscratch, r = e.edgeType; + if (r === "segments") + return this.recalculateRenderedStyle(t), au(e.segpts); + }, Vt.getControlPoints = function(t) { + var e = t[0]._private.rscratch, r = e.edgeType; + if (r === "bezier" || r === "multibezier" || r === "self" || r === "compound") + return this.recalculateRenderedStyle(t), au(e.ctrlpts); + }, Vt.getEdgeMidpoint = function(t) { + var e = t[0]._private.rscratch; + return this.recalculateRenderedStyle(t), { + x: e.midX, + y: e.midY + }; + }; + var Qa = {}; + Qa.manualEndptToPx = function(t, e) { + var r = this, a = t.position(), n = t.outerWidth(), i = t.outerHeight(); + if (e.value.length === 2) { + var s = [e.pfValue[0], e.pfValue[1]]; + return e.units[0] === "%" && (s[0] = s[0] * n), e.units[1] === "%" && (s[1] = s[1] * i), s[0] += a.x, s[1] += a.y, s; + } else { + var o = e.pfValue[0]; + o = -Math.PI / 2 + o; + var l = 2 * Math.max(n, i), u = [a.x + Math.cos(o) * l, a.y + Math.sin(o) * l]; + return r.nodeShapes[this.getNodeShape(t)].intersectLine(a.x, a.y, n, i, u[0], u[1], 0); + } + }, Qa.findEndpoints = function(t) { + var e = this, r, a = t.source()[0], n = t.target()[0], i = a.position(), s = n.position(), o = t.pstyle("target-arrow-shape").value, l = t.pstyle("source-arrow-shape").value, u = t.pstyle("target-distance-from-node").pfValue, f = t.pstyle("source-distance-from-node").pfValue, h = t.pstyle("curve-style").value, c = t._private.rscratch, v = c.edgeType, d = h === "taxi", g = v === "self" || v === "compound", y = v === "bezier" || v === "multibezier" || g, p = v !== "bezier", m = v === "straight" || v === "segments", b = v === "segments", E = y || p || m, M = g || d, A = t.pstyle("source-endpoint"), w = M ? "outside-to-node" : A.value, I = t.pstyle("target-endpoint"), C = M ? "outside-to-node" : I.value; + c.srcManEndpt = A, c.tgtManEndpt = I; + var B, F, R, X; + if (y) { + var z = [c.ctrlpts[0], c.ctrlpts[1]], re = p ? [c.ctrlpts[c.ctrlpts.length - 2], c.ctrlpts[c.ctrlpts.length - 1]] : z; + B = re, F = z; + } else if (m) { + var W = b ? c.segpts.slice(0, 2) : [s.x, s.y], Z = b ? c.segpts.slice(c.segpts.length - 2) : [i.x, i.y]; + B = Z, F = W; + } + if (C === "inside-to-node") + r = [s.x, s.y]; + else if (I.units) + r = this.manualEndptToPx(n, I); + else if (C === "outside-to-line") + r = c.tgtIntn; + else if (C === "outside-to-node" || C === "outside-to-node-or-label" ? R = B : (C === "outside-to-line" || C === "outside-to-line-or-label") && (R = [i.x, i.y]), r = e.nodeShapes[this.getNodeShape(n)].intersectLine(s.x, s.y, n.outerWidth(), n.outerHeight(), R[0], R[1], 0), C === "outside-to-node-or-label" || C === "outside-to-line-or-label") { + var ie = n._private.rscratch, oe = ie.labelWidth, de = ie.labelHeight, se = ie.labelX, ve = ie.labelY, we = oe / 2, Te = de / 2, Ee = n.pstyle("text-valign").value; + Ee === "top" ? ve -= Te : Ee === "bottom" && (ve += Te); + var ye = n.pstyle("text-halign").value; + ye === "left" ? se -= we : ye === "right" && (se += we); + var ae = Ba(R[0], R[1], [se - we, ve - Te, se + we, ve - Te, se + we, ve + Te, se - we, ve + Te], s.x, s.y); + if (ae.length > 0) { + var xe = i, Ce = Br(xe, jr(r)), Oe = Br(xe, jr(ae)), Ie = Ce; + if (Oe < Ce && (r = ae, Ie = Oe), ae.length > 2) { + var He = Br(xe, { + x: ae[2], + y: ae[3] + }); + He < Ie && (r = [ae[2], ae[3]]); + } + } + } + var qe = yn(r, B, e.arrowShapes[o].spacing(t) + u), Re = yn(r, B, e.arrowShapes[o].gap(t) + u); + if (c.endX = Re[0], c.endY = Re[1], c.arrowEndX = qe[0], c.arrowEndY = qe[1], w === "inside-to-node") + r = [i.x, i.y]; + else if (A.units) + r = this.manualEndptToPx(a, A); + else if (w === "outside-to-line") + r = c.srcIntn; + else if (w === "outside-to-node" || w === "outside-to-node-or-label" ? X = F : (w === "outside-to-line" || w === "outside-to-line-or-label") && (X = [s.x, s.y]), r = e.nodeShapes[this.getNodeShape(a)].intersectLine(i.x, i.y, a.outerWidth(), a.outerHeight(), X[0], X[1], 0), w === "outside-to-node-or-label" || w === "outside-to-line-or-label") { + var Me = a._private.rscratch, Ve = Me.labelWidth, Fe = Me.labelHeight, ke = Me.labelX, Ge = Me.labelY, et = Ve / 2, We = Fe / 2, Ye = a.pstyle("text-valign").value; + Ye === "top" ? Ge -= We : Ye === "bottom" && (Ge += We); + var Se = a.pstyle("text-halign").value; + Se === "left" ? ke -= et : Se === "right" && (ke += et); + var N = Ba(X[0], X[1], [ke - et, Ge - We, ke + et, Ge - We, ke + et, Ge + We, ke - et, Ge + We], i.x, i.y); + if (N.length > 0) { + var le = s, De = Br(le, jr(r)), me = Br(le, jr(N)), be = De; + if (me < De && (r = [N[0], N[1]], be = me), N.length > 2) { + var Ke = Br(le, { + x: N[2], + y: N[3] + }); + Ke < be && (r = [N[2], N[3]]); + } + } + } + var Le = yn(r, F, e.arrowShapes[l].spacing(t) + f), ze = yn(r, F, e.arrowShapes[l].gap(t) + f); + c.startX = ze[0], c.startY = ze[1], c.arrowStartX = Le[0], c.arrowStartY = Le[1], E && (!k(c.startX) || !k(c.startY) || !k(c.endX) || !k(c.endY) ? c.badLine = !0 : c.badLine = !1); + }, Qa.getSourceEndpoint = function(t) { + var e = t[0]._private.rscratch; + switch (this.recalculateRenderedStyle(t), e.edgeType) { + case "haystack": + return { + x: e.haystackPts[0], + y: e.haystackPts[1] + }; + default: + return { + x: e.arrowStartX, + y: e.arrowStartY + }; + } + }, Qa.getTargetEndpoint = function(t) { + var e = t[0]._private.rscratch; + switch (this.recalculateRenderedStyle(t), e.edgeType) { + case "haystack": + return { + x: e.haystackPts[2], + y: e.haystackPts[3] + }; + default: + return { + x: e.arrowEndX, + y: e.arrowEndY + }; + } + }; + var Fi = {}; + function vg(t, e, r) { + for (var a = function(u, f, h, c) { + return St(u, f, h, c); + }, n = e._private, i = n.rstyle.bezierPts, s = 0; s < t.bezierProjPcts.length; s++) { + var o = t.bezierProjPcts[s]; + i.push({ + x: a(r[0], r[2], r[4], o), + y: a(r[1], r[3], r[5], o) + }); + } + } + Fi.storeEdgeProjections = function(t) { + var e = t._private, r = e.rscratch, a = r.edgeType; + if (e.rstyle.bezierPts = null, e.rstyle.linePts = null, e.rstyle.haystackPts = null, a === "multibezier" || a === "bezier" || a === "self" || a === "compound") { + e.rstyle.bezierPts = []; + for (var n = 0; n + 5 < r.allpts.length; n += 4) + vg(this, t, r.allpts.slice(n, n + 6)); + } else if (a === "segments") + for (var i = e.rstyle.linePts = [], n = 0; n + 1 < r.allpts.length; n += 2) + i.push({ + x: r.allpts[n], + y: r.allpts[n + 1] + }); + else if (a === "haystack") { + var s = r.haystackPts; + e.rstyle.haystackPts = [{ + x: s[0], + y: s[1] + }, { + x: s[2], + y: s[3] + }]; + } + e.rstyle.arrowWidth = this.getArrowWidth(t.pstyle("width").pfValue, t.pstyle("arrow-scale").value) * this.arrowShapeWidth; + }, Fi.recalculateEdgeProjections = function(t) { + this.findEdgeControlPoints(t); + }; + var fr = {}; + fr.recalculateNodeLabelProjection = function(t) { + var e = t.pstyle("label").strValue; + if (!Pe(e)) { + var r, a, n = t._private, i = t.width(), s = t.height(), o = t.padding(), l = t.position(), u = t.pstyle("text-halign").strValue, f = t.pstyle("text-valign").strValue, h = n.rscratch, c = n.rstyle; + switch (u) { + case "left": + r = l.x - i / 2 - o; + break; + case "right": + r = l.x + i / 2 + o; + break; + default: + r = l.x; + } + switch (f) { + case "top": + a = l.y - s / 2 - o; + break; + case "bottom": + a = l.y + s / 2 + o; + break; + default: + a = l.y; + } + h.labelX = r, h.labelY = a, c.labelX = r, c.labelY = a, this.calculateLabelAngles(t), this.applyLabelDimensions(t); + } + }; + var nu = function(e, r) { + var a = Math.atan(r / e); + return e === 0 && a < 0 && (a = a * -1), a; + }, iu = function(e, r) { + var a = r.x - e.x, n = r.y - e.y; + return nu(a, n); + }, dg = function(e, r, a, n) { + var i = ka(0, n - 1e-3, 1), s = ka(0, n + 1e-3, 1), o = ea(e, r, a, i), l = ea(e, r, a, s); + return iu(o, l); + }; + fr.recalculateEdgeLabelProjections = function(t) { + var e, r = t._private, a = r.rscratch, n = this, i = { + mid: t.pstyle("label").strValue, + source: t.pstyle("source-label").strValue, + target: t.pstyle("target-label").strValue + }; + if (i.mid || i.source || i.target) { + e = { + x: a.midX, + y: a.midY + }; + var s = function(h, c, v) { + xr(r.rscratch, h, c, v), xr(r.rstyle, h, c, v); + }; + s("labelX", null, e.x), s("labelY", null, e.y); + var o = nu(a.midDispX, a.midDispY); + s("labelAutoAngle", null, o); + var l = function f() { + if (f.cache) + return f.cache; + for (var h = [], c = 0; c + 5 < a.allpts.length; c += 4) { + var v = { + x: a.allpts[c], + y: a.allpts[c + 1] + }, d = { + x: a.allpts[c + 2], + y: a.allpts[c + 3] + }, g = { + x: a.allpts[c + 4], + y: a.allpts[c + 5] + }; + h.push({ + p0: v, + p1: d, + p2: g, + startDist: 0, + length: 0, + segments: [] + }); + } + var y = r.rstyle.bezierPts, p = n.bezierProjPcts.length; + function m(w, I, C, B, F) { + var R = Pr(I, C), X = w.segments[w.segments.length - 1], z = { + p0: I, + p1: C, + t0: B, + t1: F, + startDist: X ? X.startDist + X.length : 0, + length: R + }; + w.segments.push(z), w.length += R; + } + for (var b = 0; b < h.length; b++) { + var E = h[b], M = h[b - 1]; + M && (E.startDist = M.startDist + M.length), m(E, E.p0, y[b * p], 0, n.bezierProjPcts[0]); + for (var A = 0; A < p - 1; A++) + m(E, y[b * p + A], y[b * p + A + 1], n.bezierProjPcts[A], n.bezierProjPcts[A + 1]); + m(E, y[b * p + p - 1], E.p2, n.bezierProjPcts[p - 1], 1); + } + return f.cache = h; + }, u = function(h) { + var c, v = h === "source"; + if (i[h]) { + var d = t.pstyle(h + "-text-offset").pfValue; + switch (a.edgeType) { + case "self": + case "compound": + case "bezier": + case "multibezier": { + for (var g = l(), y, p = 0, m = 0, b = 0; b < g.length; b++) { + for (var E = g[v ? b : g.length - 1 - b], M = 0; M < E.segments.length; M++) { + var A = E.segments[v ? M : E.segments.length - 1 - M], w = b === g.length - 1 && M === E.segments.length - 1; + if (p = m, m += A.length, m >= d || w) { + y = { + cp: E, + segment: A + }; + break; + } + } + if (y) + break; + } + var I = y.cp, C = y.segment, B = (d - p) / C.length, F = C.t1 - C.t0, R = v ? C.t0 + F * B : C.t1 - F * B; + R = ka(0, R, 1), e = ea(I.p0, I.p1, I.p2, R), c = dg(I.p0, I.p1, I.p2, R); + break; + } + case "straight": + case "segments": + case "haystack": { + for (var X = 0, z, re, W, Z, ie = a.allpts.length, oe = 0; oe + 3 < ie && (v ? (W = { + x: a.allpts[oe], + y: a.allpts[oe + 1] + }, Z = { + x: a.allpts[oe + 2], + y: a.allpts[oe + 3] + }) : (W = { + x: a.allpts[ie - 2 - oe], + y: a.allpts[ie - 1 - oe] + }, Z = { + x: a.allpts[ie - 4 - oe], + y: a.allpts[ie - 3 - oe] + }), z = Pr(W, Z), re = X, X += z, !(X >= d)); oe += 2) + ; + var de = d - re, se = de / z; + se = ka(0, se, 1), e = Tf(W, Z, se), c = iu(W, Z); + break; + } + } + s("labelX", h, e.x), s("labelY", h, e.y), s("labelAutoAngle", h, c); + } + }; + u("source"), u("target"), this.applyLabelDimensions(t); + } + }, fr.applyLabelDimensions = function(t) { + this.applyPrefixedLabelDimensions(t), t.isEdge() && (this.applyPrefixedLabelDimensions(t, "source"), this.applyPrefixedLabelDimensions(t, "target")); + }, fr.applyPrefixedLabelDimensions = function(t, e) { + var r = t._private, a = this.getLabelText(t, e), n = this.calculateLabelDimensions(t, a), i = t.pstyle("line-height").pfValue, s = t.pstyle("text-wrap").strValue, o = er(r.rscratch, "labelWrapCachedLines", e) || [], l = s !== "wrap" ? 1 : Math.max(o.length, 1), u = n.height / l, f = u * i, h = n.width, c = n.height + (l - 1) * (i - 1) * u; + xr(r.rstyle, "labelWidth", e, h), xr(r.rscratch, "labelWidth", e, h), xr(r.rstyle, "labelHeight", e, c), xr(r.rscratch, "labelHeight", e, c), xr(r.rscratch, "labelLineHeight", e, f); + }, fr.getLabelText = function(t, e) { + var r = t._private, a = e ? e + "-" : "", n = t.pstyle(a + "label").strValue, i = t.pstyle("text-transform").value, s = function(de, se) { + return se ? (xr(r.rscratch, de, e, se), se) : er(r.rscratch, de, e); + }; + if (!n) + return ""; + i == "none" || (i == "uppercase" ? n = n.toUpperCase() : i == "lowercase" && (n = n.toLowerCase())); + var o = t.pstyle("text-wrap").value; + if (o === "wrap") { + var l = s("labelKey"); + if (l != null && s("labelWrapKey") === l) + return s("labelWrapCachedText"); + for (var u = "​", f = n.split(` +`), h = t.pstyle("text-max-width").pfValue, c = t.pstyle("text-overflow-wrap").value, v = c === "anywhere", d = [], g = /[\s\u200b]+/, y = v ? "" : " ", p = 0; p < f.length; p++) { + var m = f[p], b = this.calculateLabelDimensions(t, m), E = b.width; + if (v) { + var M = m.split("").join(u); + m = M; + } + if (E > h) { + for (var A = m.split(g), w = "", I = 0; I < A.length; I++) { + var C = A[I], B = w.length === 0 ? C : w + y + C, F = this.calculateLabelDimensions(t, B), R = F.width; + R <= h ? w += C + y : (w && d.push(w), w = C + y); + } + w.match(/^[\s\u200b]+$/) || d.push(w); + } else + d.push(m); + } + s("labelWrapCachedLines", d), n = s("labelWrapCachedText", d.join(` +`)), s("labelWrapKey", l); + } else if (o === "ellipsis") { + var X = t.pstyle("text-max-width").pfValue, z = "", re = "…", W = !1; + if (this.calculateLabelDimensions(t, n).width < X) + return n; + for (var Z = 0; Z < n.length; Z++) { + var ie = this.calculateLabelDimensions(t, z + n[Z] + re).width; + if (ie > X) + break; + z += n[Z], Z === n.length - 1 && (W = !0); + } + return W || (z += re), z; + } + return n; + }, fr.getLabelJustification = function(t) { + var e = t.pstyle("text-justification").strValue, r = t.pstyle("text-halign").strValue; + if (e === "auto") + if (t.isNode()) + switch (r) { + case "left": + return "right"; + case "right": + return "left"; + default: + return "center"; + } + else + return "center"; + else + return e; + }, fr.calculateLabelDimensions = function(t, e) { + var r = this, a = kr(e, t._private.labelDimsKey), n = r.labelDimCache || (r.labelDimCache = []), i = n[a]; + if (i != null) + return i; + var s = 0, o = t.pstyle("font-style").strValue, l = t.pstyle("font-size").pfValue, u = t.pstyle("font-family").strValue, f = t.pstyle("font-weight").strValue, h = this.labelCalcCanvas, c = this.labelCalcCanvasContext; + if (!h) { + h = this.labelCalcCanvas = document.createElement("canvas"), c = this.labelCalcCanvasContext = h.getContext("2d"); + var v = h.style; + v.position = "absolute", v.left = "-9999px", v.top = "-9999px", v.zIndex = "-1", v.visibility = "hidden", v.pointerEvents = "none"; + } + c.font = "".concat(o, " ").concat(f, " ").concat(l, "px ").concat(u); + for (var d = 0, g = 0, y = e.split(` +`), p = 0; p < y.length; p++) { + var m = y[p], b = c.measureText(m), E = Math.ceil(b.width), M = l; + d = Math.max(E, d), g += M; + } + return d += s, g += s, n[a] = { + width: d, + height: g + }; + }, fr.calculateLabelAngle = function(t, e) { + var r = t._private, a = r.rscratch, n = t.isEdge(), i = e ? e + "-" : "", s = t.pstyle(i + "text-rotation"), o = s.strValue; + return o === "none" ? 0 : n && o === "autorotate" ? a.labelAutoAngle : o === "autorotate" ? 0 : s.pfValue; + }, fr.calculateLabelAngles = function(t) { + var e = this, r = t.isEdge(), a = t._private, n = a.rscratch; + n.labelAngle = e.calculateLabelAngle(t), r && (n.sourceLabelAngle = e.calculateLabelAngle(t, "source"), n.targetLabelAngle = e.calculateLabelAngle(t, "target")); + }; + var su = {}, ou = 28, uu = !1; + su.getNodeShape = function(t) { + var e = this, r = t.pstyle("shape").value; + if (r === "cutrectangle" && (t.width() < ou || t.height() < ou)) + return uu || (ft("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), uu = !0), "rectangle"; + if (t.isParent()) + return r === "rectangle" || r === "roundrectangle" || r === "round-rectangle" || r === "cutrectangle" || r === "cut-rectangle" || r === "barrel" ? r : "rectangle"; + if (r === "polygon") { + var a = t.pstyle("shape-polygon-points").value; + return e.nodeShapes.makePolygon(a).name; + } + return r; + }; + var Xn = {}; + Xn.registerCalculationListeners = function() { + var t = this.cy, e = t.collection(), r = this, a = function(s) { + var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; + if (e.merge(s), o) + for (var l = 0; l < s.length; l++) { + var u = s[l], f = u._private, h = f.rstyle; + h.clean = !1, h.cleanConnected = !1; + } + }; + r.binder(t).on("bounds.* dirty.*", function(s) { + var o = s.target; + a(o); + }).on("style.* background.*", function(s) { + var o = s.target; + a(o, !1); + }); + var n = function(s) { + if (s) { + var o = r.onUpdateEleCalcsFns; + e.cleanStyle(); + for (var l = 0; l < e.length; l++) { + var u = e[l], f = u._private.rstyle; + u.isNode() && !f.cleanConnected && (a(u.connectedEdges()), f.cleanConnected = !0); + } + if (o) + for (var h = 0; h < o.length; h++) { + var c = o[h]; + c(s, e); + } + r.recalculateRenderedStyle(e), e = t.collection(); + } + }; + r.flushRenderedStyleQueue = function() { + n(!0); + }, r.beforeRender(n, r.beforeRenderPriorities.eleCalcs); + }, Xn.onUpdateEleCalcs = function(t) { + var e = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; + e.push(t); + }, Xn.recalculateRenderedStyle = function(t, e) { + var r = function(E) { + return E._private.rstyle.cleanConnected; + }, a = [], n = []; + if (!this.destroyed) { + e === void 0 && (e = !0); + for (var i = 0; i < t.length; i++) { + var s = t[i], o = s._private, l = o.rstyle; + s.isEdge() && (!r(s.source()) || !r(s.target())) && (l.clean = !1), !(e && l.clean || s.removed()) && s.pstyle("display").value !== "none" && (o.group === "nodes" ? n.push(s) : a.push(s), l.clean = !0); + } + for (var u = 0; u < n.length; u++) { + var f = n[u], h = f._private, c = h.rstyle, v = f.position(); + this.recalculateNodeLabelProjection(f), c.nodeX = v.x, c.nodeY = v.y, c.nodeW = f.pstyle("width").pfValue, c.nodeH = f.pstyle("height").pfValue; + } + this.recalculateEdgeProjections(a); + for (var d = 0; d < a.length; d++) { + var g = a[d], y = g._private, p = y.rstyle, m = y.rscratch; + p.srcX = m.arrowStartX, p.srcY = m.arrowStartY, p.tgtX = m.arrowEndX, p.tgtY = m.arrowEndY, p.midX = m.midX, p.midY = m.midY, p.labelAngle = m.labelAngle, p.sourceLabelAngle = m.sourceLabelAngle, p.targetLabelAngle = m.targetLabelAngle; + } + } + }; + var qn = {}; + qn.updateCachedGrabbedEles = function() { + var t = this.cachedZSortedEles; + if (t) { + t.drag = [], t.nondrag = []; + for (var e = [], r = 0; r < t.length; r++) { + var a = t[r], n = a._private.rscratch; + a.grabbed() && !a.isParent() ? e.push(a) : n.inDragLayer ? t.drag.push(a) : t.nondrag.push(a); + } + for (var r = 0; r < e.length; r++) { + var a = e[r]; + t.drag.push(a); + } + } + }, qn.invalidateCachedZSortedEles = function() { + this.cachedZSortedEles = null; + }, qn.getCachedZSortedEles = function(t) { + if (t || !this.cachedZSortedEles) { + var e = this.cy.mutableElements().toArray(); + e.sort(Mo), e.interactive = e.filter(function(r) { + return r.interactive(); + }), this.cachedZSortedEles = e, this.updateCachedGrabbedEles(); + } else + e = this.cachedZSortedEles; + return e; + }; + var lu = {}; + [Vr, Hn, Vt, Qa, Fi, fr, su, Xn, qn].forEach(function(t) { + Ue(lu, t); + }); + var fu = {}; + fu.getCachedImage = function(t, e, r) { + var a = this, n = a.imageCache = a.imageCache || {}, i = n[t]; + if (i) + return i.image.complete || i.image.addEventListener("load", r), i.image; + i = n[t] = n[t] || {}; + var s = i.image = new Image(); + s.addEventListener("load", r), s.addEventListener("error", function() { + s.error = !0; + }); + var o = "data:", l = t.substring(0, o.length).toLowerCase() === o; + return l || (s.crossOrigin = e), s.src = t, s; + }; + var ya = {}; + ya.registerBinding = function(t, e, r, a) { + var n = Array.prototype.slice.apply(arguments, [1]), i = this.binder(t); + return i.on.apply(i, n); + }, ya.binder = function(t) { + var e = this, r = t === window || t === document || t === document.body || $e(t); + if (e.supportsPassiveEvents == null) { + var a = !1; + try { + var n = Object.defineProperty({}, "passive", { + get: function() { + return a = !0, !0; + } + }); + window.addEventListener("test", null, n); + } catch { + } + e.supportsPassiveEvents = a; + } + var i = function(o, l, u) { + var f = Array.prototype.slice.call(arguments); + return r && e.supportsPassiveEvents && (f[2] = { + capture: u ?? !1, + passive: !1, + once: !1 + }), e.bindings.push({ + target: t, + args: f + }), (t.addEventListener || t.on).apply(t, f), this; + }; + return { + on: i, + addEventListener: i, + addListener: i, + bind: i + }; + }, ya.nodeIsDraggable = function(t) { + return t && t.isNode() && !t.locked() && t.grabbable(); + }, ya.nodeIsGrabbable = function(t) { + return this.nodeIsDraggable(t) && t.interactive(); + }, ya.load = function() { + var t = this, e = function(N) { + return N.selected(); + }, r = function(N, le, De, me) { + N == null && (N = t.cy); + for (var be = 0; be < le.length; be++) { + var Ke = le[be]; + N.emit({ + originalEvent: De, + type: Ke, + position: me + }); + } + }, a = function(N) { + return N.shiftKey || N.metaKey || N.ctrlKey; + }, n = function(N, le) { + var De = !0; + if (t.cy.hasCompoundNodes() && N && N.pannable()) + for (var me = 0; le && me < le.length; me++) { + var N = le[me]; + if (N.isNode() && N.isParent() && !N.pannable()) { + De = !1; + break; + } + } + else + De = !0; + return De; + }, i = function(N) { + N[0]._private.grabbed = !0; + }, s = function(N) { + N[0]._private.grabbed = !1; + }, o = function(N) { + N[0]._private.rscratch.inDragLayer = !0; + }, l = function(N) { + N[0]._private.rscratch.inDragLayer = !1; + }, u = function(N) { + N[0]._private.rscratch.isGrabTarget = !0; + }, f = function(N) { + N[0]._private.rscratch.isGrabTarget = !1; + }, h = function(N, le) { + var De = le.addToList, me = De.has(N); + !me && N.grabbable() && !N.locked() && (De.merge(N), i(N)); + }, c = function(N, le) { + if (N.cy().hasCompoundNodes() && !(le.inDragLayer == null && le.addToList == null)) { + var De = N.descendants(); + le.inDragLayer && (De.forEach(o), De.connectedEdges().forEach(o)), le.addToList && h(De, le); + } + }, v = function(N, le) { + le = le || {}; + var De = N.cy().hasCompoundNodes(); + le.inDragLayer && (N.forEach(o), N.neighborhood().stdFilter(function(me) { + return !De || me.isEdge(); + }).forEach(o)), le.addToList && N.forEach(function(me) { + h(me, le); + }), c(N, le), y(N, { + inDragLayer: le.inDragLayer + }), t.updateCachedGrabbedEles(); + }, d = v, g = function(N) { + N && (t.getCachedZSortedEles().forEach(function(le) { + s(le), l(le), f(le); + }), t.updateCachedGrabbedEles()); + }, y = function(N, le) { + if (!(le.inDragLayer == null && le.addToList == null) && N.cy().hasCompoundNodes()) { + var De = N.ancestors().orphans(); + if (!De.same(N)) { + var me = De.descendants().spawnSelf().merge(De).unmerge(N).unmerge(N.descendants()), be = me.connectedEdges(); + le.inDragLayer && (be.forEach(o), me.forEach(o)), le.addToList && me.forEach(function(Ke) { + h(Ke, le); + }); + } + } + }, p = function() { + document.activeElement != null && document.activeElement.blur != null && document.activeElement.blur(); + }, m = typeof MutationObserver < "u", b = typeof ResizeObserver < "u"; + m ? (t.removeObserver = new MutationObserver(function(Se) { + for (var N = 0; N < Se.length; N++) { + var le = Se[N], De = le.removedNodes; + if (De) + for (var me = 0; me < De.length; me++) { + var be = De[me]; + if (be === t.container) { + t.destroy(); + break; + } + } + } + }), t.container.parentNode && t.removeObserver.observe(t.container.parentNode, { + childList: !0 + })) : t.registerBinding(t.container, "DOMNodeRemoved", function(Se) { + t.destroy(); + }); + var E = ln(function() { + t.cy.resize(); + }, 100); + m && (t.styleObserver = new MutationObserver(E), t.styleObserver.observe(t.container, { + attributes: !0 + })), t.registerBinding(window, "resize", E), b && (t.resizeObserver = new ResizeObserver(E), t.resizeObserver.observe(t.container)); + var M = function(N, le) { + for (; N != null; ) + le(N), N = N.parentNode; + }, A = function() { + t.invalidateContainerClientCoordsCache(); + }; + M(t.container, function(Se) { + t.registerBinding(Se, "transitionend", A), t.registerBinding(Se, "animationend", A), t.registerBinding(Se, "scroll", A); + }), t.registerBinding(t.container, "contextmenu", function(Se) { + Se.preventDefault(); + }); + var w = function() { + return t.selection[4] !== 0; + }, I = function(N) { + for (var le = t.findContainerClientCoords(), De = le[0], me = le[1], be = le[2], Ke = le[3], Le = N.touches ? N.touches : [N], ze = !1, at = 0; at < Le.length; at++) { + var dt = Le[at]; + if (De <= dt.clientX && dt.clientX <= De + be && me <= dt.clientY && dt.clientY <= me + Ke) { + ze = !0; + break; + } + } + if (!ze) + return !1; + for (var Qe = t.container, ut = N.target, Ze = ut.parentNode, Je = !1; Ze; ) { + if (Ze === Qe) { + Je = !0; + break; + } + Ze = Ze.parentNode; + } + return !!Je; + }; + t.registerBinding(t.container, "mousedown", function(N) { + if (I(N)) { + N.preventDefault(), p(), t.hoverData.capture = !0, t.hoverData.which = N.which; + var le = t.cy, De = [N.clientX, N.clientY], me = t.projectIntoViewport(De[0], De[1]), be = t.selection, Ke = t.findNearestElements(me[0], me[1], !0, !1), Le = Ke[0], ze = t.dragData.possibleDragElements; + t.hoverData.mdownPos = me, t.hoverData.mdownGPos = De; + var at = function() { + t.hoverData.tapholdCancelled = !1, clearTimeout(t.hoverData.tapholdTimeout), t.hoverData.tapholdTimeout = setTimeout(function() { + if (!t.hoverData.tapholdCancelled) { + var Ct = t.hoverData.down; + Ct ? Ct.emit({ + originalEvent: N, + type: "taphold", + position: { + x: me[0], + y: me[1] + } + }) : le.emit({ + originalEvent: N, + type: "taphold", + position: { + x: me[0], + y: me[1] + } + }); + } + }, t.tapholdDuration); + }; + if (N.which == 3) { + t.hoverData.cxtStarted = !0; + var dt = { + originalEvent: N, + type: "cxttapstart", + position: { + x: me[0], + y: me[1] + } + }; + Le ? (Le.activate(), Le.emit(dt), t.hoverData.down = Le) : le.emit(dt), t.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(), t.hoverData.cxtDragged = !1; + } else if (N.which == 1) { + Le && Le.activate(); + { + if (Le != null && t.nodeIsGrabbable(Le)) { + var Qe = function(Ct) { + return { + originalEvent: N, + type: Ct, + position: { + x: me[0], + y: me[1] + } + }; + }, ut = function(Ct) { + Ct.emit(Qe("grab")); + }; + if (u(Le), !Le.selected()) + ze = t.dragData.possibleDragElements = le.collection(), d(Le, { + addToList: ze + }), Le.emit(Qe("grabon")).emit(Qe("grab")); + else { + ze = t.dragData.possibleDragElements = le.collection(); + var Ze = le.$(function(Je) { + return Je.isNode() && Je.selected() && t.nodeIsGrabbable(Je); + }); + v(Ze, { + addToList: ze + }), Le.emit(Qe("grabon")), Ze.forEach(ut); + } + t.redrawHint("eles", !0), t.redrawHint("drag", !0); + } + t.hoverData.down = Le, t.hoverData.downs = Ke, t.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); + } + r(Le, ["mousedown", "tapstart", "vmousedown"], N, { + x: me[0], + y: me[1] + }), Le == null ? (be[4] = 1, t.data.bgActivePosistion = { + x: me[0], + y: me[1] + }, t.redrawHint("select", !0), t.redraw()) : Le.pannable() && (be[4] = 1), at(); + } + be[0] = be[2] = me[0], be[1] = be[3] = me[1]; + } + }, !1), t.registerBinding(window, "mousemove", function(N) { + var le = t.hoverData.capture; + if (!(!le && !I(N))) { + var De = !1, me = t.cy, be = me.zoom(), Ke = [N.clientX, N.clientY], Le = t.projectIntoViewport(Ke[0], Ke[1]), ze = t.hoverData.mdownPos, at = t.hoverData.mdownGPos, dt = t.selection, Qe = null; + !t.hoverData.draggingEles && !t.hoverData.dragging && !t.hoverData.selecting && (Qe = t.findNearestElement(Le[0], Le[1], !0, !1)); + var ut = t.hoverData.last, Ze = t.hoverData.down, Je = [Le[0] - dt[2], Le[1] - dt[3]], Ct = t.dragData.possibleDragElements, It; + if (at) { + var ar = Ke[0] - at[0], nr = ar * ar, Rt = Ke[1] - at[1], Qt = Rt * Rt, _t = nr + Qt; + t.hoverData.isOverThresholdDrag = It = _t >= t.desktopTapThreshold2; + } + var br = a(N); + It && (t.hoverData.tapholdCancelled = !0); + var Ir = function() { + var cr = t.hoverData.dragDelta = t.hoverData.dragDelta || []; + cr.length === 0 ? (cr.push(Je[0]), cr.push(Je[1])) : (cr[0] += Je[0], cr[1] += Je[1]); + }; + De = !0, r(Qe, ["mousemove", "vmousemove", "tapdrag"], N, { + x: Le[0], + y: Le[1] + }); + var xa = function() { + t.data.bgActivePosistion = void 0, t.hoverData.selecting || me.emit({ + originalEvent: N, + type: "boxstart", + position: { + x: Le[0], + y: Le[1] + } + }), dt[4] = 1, t.hoverData.selecting = !0, t.redrawHint("select", !0), t.redraw(); + }; + if (t.hoverData.which === 3) { + if (It) { + var Hr = { + originalEvent: N, + type: "cxtdrag", + position: { + x: Le[0], + y: Le[1] + } + }; + Ze ? Ze.emit(Hr) : me.emit(Hr), t.hoverData.cxtDragged = !0, (!t.hoverData.cxtOver || Qe !== t.hoverData.cxtOver) && (t.hoverData.cxtOver && t.hoverData.cxtOver.emit({ + originalEvent: N, + type: "cxtdragout", + position: { + x: Le[0], + y: Le[1] + } + }), t.hoverData.cxtOver = Qe, Qe && Qe.emit({ + originalEvent: N, + type: "cxtdragover", + position: { + x: Le[0], + y: Le[1] + } + })); + } + } else if (t.hoverData.dragging) { + if (De = !0, me.panningEnabled() && me.userPanningEnabled()) { + var Ta; + if (t.hoverData.justStartedPan) { + var Qn = t.hoverData.mdownPos; + Ta = { + x: (Le[0] - Qn[0]) * be, + y: (Le[1] - Qn[1]) * be + }, t.hoverData.justStartedPan = !1; + } else + Ta = { + x: Je[0] * be, + y: Je[1] * be + }; + me.panBy(Ta), me.emit("dragpan"), t.hoverData.dragged = !0; + } + Le = t.projectIntoViewport(N.clientX, N.clientY); + } else if (dt[4] == 1 && (Ze == null || Ze.pannable())) { + if (It) { + if (!t.hoverData.dragging && me.boxSelectionEnabled() && (br || !me.panningEnabled() || !me.userPanningEnabled())) + xa(); + else if (!t.hoverData.selecting && me.panningEnabled() && me.userPanningEnabled()) { + var Xr = n(Ze, t.hoverData.downs); + Xr && (t.hoverData.dragging = !0, t.hoverData.justStartedPan = !0, dt[4] = 0, t.data.bgActivePosistion = jr(ze), t.redrawHint("select", !0), t.redraw()); + } + Ze && Ze.pannable() && Ze.active() && Ze.unactivate(); + } + } else { + if (Ze && Ze.pannable() && Ze.active() && Ze.unactivate(), (!Ze || !Ze.grabbed()) && Qe != ut && (ut && r(ut, ["mouseout", "tapdragout"], N, { + x: Le[0], + y: Le[1] + }), Qe && r(Qe, ["mouseover", "tapdragover"], N, { + x: Le[0], + y: Le[1] + }), t.hoverData.last = Qe), Ze) + if (It) { + if (me.boxSelectionEnabled() && br) + Ze && Ze.grabbed() && (g(Ct), Ze.emit("freeon"), Ct.emit("free"), t.dragData.didDrag && (Ze.emit("dragfreeon"), Ct.emit("dragfree"))), xa(); + else if (Ze && Ze.grabbed() && t.nodeIsDraggable(Ze)) { + var Ht = !t.dragData.didDrag; + Ht && t.redrawHint("eles", !0), t.dragData.didDrag = !0, t.hoverData.draggingEles || v(Ct, { + inDragLayer: !0 + }); + var Gt = { + x: 0, + y: 0 + }; + if (k(Je[0]) && k(Je[1]) && (Gt.x += Je[0], Gt.y += Je[1], Ht)) { + var Xt = t.hoverData.dragDelta; + Xt && k(Xt[0]) && k(Xt[1]) && (Gt.x += Xt[0], Gt.y += Xt[1]); + } + t.hoverData.draggingEles = !0, Ct.silentShift(Gt).emit("position drag"), t.redrawHint("drag", !0), t.redraw(); + } + } else + Ir(); + De = !0; + } + if (dt[2] = Le[0], dt[3] = Le[1], De) + return N.stopPropagation && N.stopPropagation(), N.preventDefault && N.preventDefault(), !1; + } + }, !1); + var C, B, F; + t.registerBinding(window, "mouseup", function(N) { + var le = t.hoverData.capture; + if (le) { + t.hoverData.capture = !1; + var De = t.cy, me = t.projectIntoViewport(N.clientX, N.clientY), be = t.selection, Ke = t.findNearestElement(me[0], me[1], !0, !1), Le = t.dragData.possibleDragElements, ze = t.hoverData.down, at = a(N); + if (t.data.bgActivePosistion && (t.redrawHint("select", !0), t.redraw()), t.hoverData.tapholdCancelled = !0, t.data.bgActivePosistion = void 0, ze && ze.unactivate(), t.hoverData.which === 3) { + var dt = { + originalEvent: N, + type: "cxttapend", + position: { + x: me[0], + y: me[1] + } + }; + if (ze ? ze.emit(dt) : De.emit(dt), !t.hoverData.cxtDragged) { + var Qe = { + originalEvent: N, + type: "cxttap", + position: { + x: me[0], + y: me[1] + } + }; + ze ? ze.emit(Qe) : De.emit(Qe); + } + t.hoverData.cxtDragged = !1, t.hoverData.which = null; + } else if (t.hoverData.which === 1) { + if (r(Ke, ["mouseup", "tapend", "vmouseup"], N, { + x: me[0], + y: me[1] + }), !t.dragData.didDrag && // didn't move a node around + !t.hoverData.dragged && // didn't pan + !t.hoverData.selecting && // not box selection + !t.hoverData.isOverThresholdDrag && (r(ze, ["click", "tap", "vclick"], N, { + x: me[0], + y: me[1] + }), B = !1, N.timeStamp - F <= De.multiClickDebounceTime() ? (C && clearTimeout(C), B = !0, F = null, r(ze, ["dblclick", "dbltap", "vdblclick"], N, { + x: me[0], + y: me[1] + })) : (C = setTimeout(function() { + B || r(ze, ["oneclick", "onetap", "voneclick"], N, { + x: me[0], + y: me[1] + }); + }, De.multiClickDebounceTime()), F = N.timeStamp)), ze == null && !t.dragData.didDrag && !t.hoverData.selecting && !t.hoverData.dragged && !a(N) && (De.$(e).unselect(["tapunselect"]), Le.length > 0 && t.redrawHint("eles", !0), t.dragData.possibleDragElements = Le = De.collection()), Ke == ze && !t.dragData.didDrag && !t.hoverData.selecting && Ke != null && Ke._private.selectable && (t.hoverData.dragging || (De.selectionType() === "additive" || at ? Ke.selected() ? Ke.unselect(["tapunselect"]) : Ke.select(["tapselect"]) : at || (De.$(e).unmerge(Ke).unselect(["tapunselect"]), Ke.select(["tapselect"]))), t.redrawHint("eles", !0)), t.hoverData.selecting) { + var ut = De.collection(t.getAllInBox(be[0], be[1], be[2], be[3])); + t.redrawHint("select", !0), ut.length > 0 && t.redrawHint("eles", !0), De.emit({ + type: "boxend", + originalEvent: N, + position: { + x: me[0], + y: me[1] + } + }); + var Ze = function(It) { + return It.selectable() && !It.selected(); + }; + De.selectionType() === "additive" || at || De.$(e).unmerge(ut).unselect(), ut.emit("box").stdFilter(Ze).select().emit("boxselect"), t.redraw(); + } + if (t.hoverData.dragging && (t.hoverData.dragging = !1, t.redrawHint("select", !0), t.redrawHint("eles", !0), t.redraw()), !be[4]) { + t.redrawHint("drag", !0), t.redrawHint("eles", !0); + var Je = ze && ze.grabbed(); + g(Le), Je && (ze.emit("freeon"), Le.emit("free"), t.dragData.didDrag && (ze.emit("dragfreeon"), Le.emit("dragfree"))); + } + } + be[4] = 0, t.hoverData.down = null, t.hoverData.cxtStarted = !1, t.hoverData.draggingEles = !1, t.hoverData.selecting = !1, t.hoverData.isOverThresholdDrag = !1, t.dragData.didDrag = !1, t.hoverData.dragged = !1, t.hoverData.dragDelta = [], t.hoverData.mdownPos = null, t.hoverData.mdownGPos = null; + } + }, !1); + var R = function(N) { + if (!t.scrollingPage) { + var le = t.cy, De = le.zoom(), me = le.pan(), be = t.projectIntoViewport(N.clientX, N.clientY), Ke = [be[0] * De + me.x, be[1] * De + me.y]; + if (t.hoverData.draggingEles || t.hoverData.dragging || t.hoverData.cxtStarted || w()) { + N.preventDefault(); + return; + } + if (le.panningEnabled() && le.userPanningEnabled() && le.zoomingEnabled() && le.userZoomingEnabled()) { + N.preventDefault(), t.data.wheelZooming = !0, clearTimeout(t.data.wheelTimeout), t.data.wheelTimeout = setTimeout(function() { + t.data.wheelZooming = !1, t.redrawHint("eles", !0), t.redraw(); + }, 150); + var Le; + N.deltaY != null ? Le = N.deltaY / -250 : N.wheelDeltaY != null ? Le = N.wheelDeltaY / 1e3 : Le = N.wheelDelta / 1e3, Le = Le * t.wheelSensitivity; + var ze = N.deltaMode === 1; + ze && (Le *= 33); + var at = le.zoom() * Math.pow(10, Le); + N.type === "gesturechange" && (at = t.gestureStartZoom * N.scale), le.zoom({ + level: at, + renderedPosition: { + x: Ke[0], + y: Ke[1] + } + }), le.emit(N.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); + } + } + }; + t.registerBinding(t.container, "wheel", R, !0), t.registerBinding(window, "scroll", function(N) { + t.scrollingPage = !0, clearTimeout(t.scrollingPageTimeout), t.scrollingPageTimeout = setTimeout(function() { + t.scrollingPage = !1; + }, 250); + }, !0), t.registerBinding(t.container, "gesturestart", function(N) { + t.gestureStartZoom = t.cy.zoom(), t.hasTouchStarted || N.preventDefault(); + }, !0), t.registerBinding(t.container, "gesturechange", function(Se) { + t.hasTouchStarted || R(Se); + }, !0), t.registerBinding(t.container, "mouseout", function(N) { + var le = t.projectIntoViewport(N.clientX, N.clientY); + t.cy.emit({ + originalEvent: N, + type: "mouseout", + position: { + x: le[0], + y: le[1] + } + }); + }, !1), t.registerBinding(t.container, "mouseover", function(N) { + var le = t.projectIntoViewport(N.clientX, N.clientY); + t.cy.emit({ + originalEvent: N, + type: "mouseover", + position: { + x: le[0], + y: le[1] + } + }); + }, !1); + var X, z, re, W, Z, ie, oe, de, se, ve, we, Te, Ee, ye = function(N, le, De, me) { + return Math.sqrt((De - N) * (De - N) + (me - le) * (me - le)); + }, ae = function(N, le, De, me) { + return (De - N) * (De - N) + (me - le) * (me - le); + }, xe; + t.registerBinding(t.container, "touchstart", xe = function(N) { + if (t.hasTouchStarted = !0, !!I(N)) { + p(), t.touchData.capture = !0, t.data.bgActivePosistion = void 0; + var le = t.cy, De = t.touchData.now, me = t.touchData.earlier; + if (N.touches[0]) { + var be = t.projectIntoViewport(N.touches[0].clientX, N.touches[0].clientY); + De[0] = be[0], De[1] = be[1]; + } + if (N.touches[1]) { + var be = t.projectIntoViewport(N.touches[1].clientX, N.touches[1].clientY); + De[2] = be[0], De[3] = be[1]; + } + if (N.touches[2]) { + var be = t.projectIntoViewport(N.touches[2].clientX, N.touches[2].clientY); + De[4] = be[0], De[5] = be[1]; + } + if (N.touches[1]) { + t.touchData.singleTouchMoved = !0, g(t.dragData.touchDragEles); + var Ke = t.findContainerClientCoords(); + se = Ke[0], ve = Ke[1], we = Ke[2], Te = Ke[3], X = N.touches[0].clientX - se, z = N.touches[0].clientY - ve, re = N.touches[1].clientX - se, W = N.touches[1].clientY - ve, Ee = 0 <= X && X <= we && 0 <= re && re <= we && 0 <= z && z <= Te && 0 <= W && W <= Te; + var Le = le.pan(), ze = le.zoom(); + Z = ye(X, z, re, W), ie = ae(X, z, re, W), oe = [(X + re) / 2, (z + W) / 2], de = [(oe[0] - Le.x) / ze, (oe[1] - Le.y) / ze]; + var at = 200, dt = at * at; + if (ie < dt && !N.touches[2]) { + var Qe = t.findNearestElement(De[0], De[1], !0, !0), ut = t.findNearestElement(De[2], De[3], !0, !0); + Qe && Qe.isNode() ? (Qe.activate().emit({ + originalEvent: N, + type: "cxttapstart", + position: { + x: De[0], + y: De[1] + } + }), t.touchData.start = Qe) : ut && ut.isNode() ? (ut.activate().emit({ + originalEvent: N, + type: "cxttapstart", + position: { + x: De[0], + y: De[1] + } + }), t.touchData.start = ut) : le.emit({ + originalEvent: N, + type: "cxttapstart", + position: { + x: De[0], + y: De[1] + } + }), t.touchData.start && (t.touchData.start._private.grabbed = !1), t.touchData.cxt = !0, t.touchData.cxtDragged = !1, t.data.bgActivePosistion = void 0, t.redraw(); + return; + } + } + if (N.touches[2]) + le.boxSelectionEnabled() && N.preventDefault(); + else if (!N.touches[1]) { + if (N.touches[0]) { + var Ze = t.findNearestElements(De[0], De[1], !0, !0), Je = Ze[0]; + if (Je != null && (Je.activate(), t.touchData.start = Je, t.touchData.starts = Ze, t.nodeIsGrabbable(Je))) { + var Ct = t.dragData.touchDragEles = le.collection(), It = null; + t.redrawHint("eles", !0), t.redrawHint("drag", !0), Je.selected() ? (It = le.$(function(_t) { + return _t.selected() && t.nodeIsGrabbable(_t); + }), v(It, { + addToList: Ct + })) : d(Je, { + addToList: Ct + }), u(Je); + var ar = function(br) { + return { + originalEvent: N, + type: br, + position: { + x: De[0], + y: De[1] + } + }; + }; + Je.emit(ar("grabon")), It ? It.forEach(function(_t) { + _t.emit(ar("grab")); + }) : Je.emit(ar("grab")); + } + r(Je, ["touchstart", "tapstart", "vmousedown"], N, { + x: De[0], + y: De[1] + }), Je == null && (t.data.bgActivePosistion = { + x: be[0], + y: be[1] + }, t.redrawHint("select", !0), t.redraw()), t.touchData.singleTouchMoved = !1, t.touchData.singleTouchStartTime = +/* @__PURE__ */ new Date(), clearTimeout(t.touchData.tapholdTimeout), t.touchData.tapholdTimeout = setTimeout(function() { + t.touchData.singleTouchMoved === !1 && !t.pinching && !t.touchData.selecting && r(t.touchData.start, ["taphold"], N, { + x: De[0], + y: De[1] + }); + }, t.tapholdDuration); + } + } + if (N.touches.length >= 1) { + for (var nr = t.touchData.startPosition = [], Rt = 0; Rt < De.length; Rt++) + nr[Rt] = me[Rt] = De[Rt]; + var Qt = N.touches[0]; + t.touchData.startGPosition = [Qt.clientX, Qt.clientY]; + } + } + }, !1); + var Ce; + t.registerBinding(window, "touchmove", Ce = function(N) { + var le = t.touchData.capture; + if (!(!le && !I(N))) { + var De = t.selection, me = t.cy, be = t.touchData.now, Ke = t.touchData.earlier, Le = me.zoom(); + if (N.touches[0]) { + var ze = t.projectIntoViewport(N.touches[0].clientX, N.touches[0].clientY); + be[0] = ze[0], be[1] = ze[1]; + } + if (N.touches[1]) { + var ze = t.projectIntoViewport(N.touches[1].clientX, N.touches[1].clientY); + be[2] = ze[0], be[3] = ze[1]; + } + if (N.touches[2]) { + var ze = t.projectIntoViewport(N.touches[2].clientX, N.touches[2].clientY); + be[4] = ze[0], be[5] = ze[1]; + } + var at = t.touchData.startGPosition, dt; + if (le && N.touches[0] && at) { + for (var Qe = [], ut = 0; ut < be.length; ut++) + Qe[ut] = be[ut] - Ke[ut]; + var Ze = N.touches[0].clientX - at[0], Je = Ze * Ze, Ct = N.touches[0].clientY - at[1], It = Ct * Ct, ar = Je + It; + dt = ar >= t.touchTapThreshold2; + } + if (le && t.touchData.cxt) { + N.preventDefault(); + var nr = N.touches[0].clientX - se, Rt = N.touches[0].clientY - ve, Qt = N.touches[1].clientX - se, _t = N.touches[1].clientY - ve, br = ae(nr, Rt, Qt, _t), Ir = br / ie, xa = 150, Hr = xa * xa, Ta = 1.5, Qn = Ta * Ta; + if (Ir >= Qn || br >= Hr) { + t.touchData.cxt = !1, t.data.bgActivePosistion = void 0, t.redrawHint("select", !0); + var Xr = { + originalEvent: N, + type: "cxttapend", + position: { + x: be[0], + y: be[1] + } + }; + t.touchData.start ? (t.touchData.start.unactivate().emit(Xr), t.touchData.start = null) : me.emit(Xr); + } + } + if (le && t.touchData.cxt) { + var Xr = { + originalEvent: N, + type: "cxtdrag", + position: { + x: be[0], + y: be[1] + } + }; + t.data.bgActivePosistion = void 0, t.redrawHint("select", !0), t.touchData.start ? t.touchData.start.emit(Xr) : me.emit(Xr), t.touchData.start && (t.touchData.start._private.grabbed = !1), t.touchData.cxtDragged = !0; + var Ht = t.findNearestElement(be[0], be[1], !0, !0); + (!t.touchData.cxtOver || Ht !== t.touchData.cxtOver) && (t.touchData.cxtOver && t.touchData.cxtOver.emit({ + originalEvent: N, + type: "cxtdragout", + position: { + x: be[0], + y: be[1] + } + }), t.touchData.cxtOver = Ht, Ht && Ht.emit({ + originalEvent: N, + type: "cxtdragover", + position: { + x: be[0], + y: be[1] + } + })); + } else if (le && N.touches[2] && me.boxSelectionEnabled()) + N.preventDefault(), t.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), t.touchData.selecting || me.emit({ + originalEvent: N, + type: "boxstart", + position: { + x: be[0], + y: be[1] + } + }), t.touchData.selecting = !0, t.touchData.didSelect = !0, De[4] = 1, !De || De.length === 0 || De[0] === void 0 ? (De[0] = (be[0] + be[2] + be[4]) / 3, De[1] = (be[1] + be[3] + be[5]) / 3, De[2] = (be[0] + be[2] + be[4]) / 3 + 1, De[3] = (be[1] + be[3] + be[5]) / 3 + 1) : (De[2] = (be[0] + be[2] + be[4]) / 3, De[3] = (be[1] + be[3] + be[5]) / 3), t.redrawHint("select", !0), t.redraw(); + else if (le && N.touches[1] && !t.touchData.didSelect && me.zoomingEnabled() && me.panningEnabled() && me.userZoomingEnabled() && me.userPanningEnabled()) { + N.preventDefault(), t.data.bgActivePosistion = void 0, t.redrawHint("select", !0); + var Gt = t.dragData.touchDragEles; + if (Gt) { + t.redrawHint("drag", !0); + for (var Xt = 0; Xt < Gt.length; Xt++) { + var Jn = Gt[Xt]._private; + Jn.grabbed = !1, Jn.rscratch.inDragLayer = !1; + } + } + var cr = t.touchData.start, nr = N.touches[0].clientX - se, Rt = N.touches[0].clientY - ve, Qt = N.touches[1].clientX - se, _t = N.touches[1].clientY - ve, Pu = ye(nr, Rt, Qt, _t), lp = Pu / Z; + if (Ee) { + var fp = nr - X, hp = Rt - z, cp = Qt - re, vp = _t - W, dp = (fp + cp) / 2, gp = (hp + vp) / 2, rn = me.zoom(), Hi = rn * lp, jn = me.pan(), Bu = de[0] * rn + jn.x, Fu = de[1] * rn + jn.y, pp = { + x: -Hi / rn * (Bu - jn.x - dp) + Bu, + y: -Hi / rn * (Fu - jn.y - gp) + Fu + }; + if (cr && cr.active()) { + var Gt = t.dragData.touchDragEles; + g(Gt), t.redrawHint("drag", !0), t.redrawHint("eles", !0), cr.unactivate().emit("freeon"), Gt.emit("free"), t.dragData.didDrag && (cr.emit("dragfreeon"), Gt.emit("dragfree")); + } + me.viewport({ + zoom: Hi, + pan: pp, + cancelOnFailedZoom: !0 + }), me.emit("pinchzoom"), Z = Pu, X = nr, z = Rt, re = Qt, W = _t, t.pinching = !0; + } + if (N.touches[0]) { + var ze = t.projectIntoViewport(N.touches[0].clientX, N.touches[0].clientY); + be[0] = ze[0], be[1] = ze[1]; + } + if (N.touches[1]) { + var ze = t.projectIntoViewport(N.touches[1].clientX, N.touches[1].clientY); + be[2] = ze[0], be[3] = ze[1]; + } + if (N.touches[2]) { + var ze = t.projectIntoViewport(N.touches[2].clientX, N.touches[2].clientY); + be[4] = ze[0], be[5] = ze[1]; + } + } else if (N.touches[0] && !t.touchData.didSelect) { + var ir = t.touchData.start, Xi = t.touchData.last, Ht; + if (!t.hoverData.draggingEles && !t.swipePanning && (Ht = t.findNearestElement(be[0], be[1], !0, !0)), le && ir != null && N.preventDefault(), le && ir != null && t.nodeIsDraggable(ir)) + if (dt) { + var Gt = t.dragData.touchDragEles, zu = !t.dragData.didDrag; + zu && v(Gt, { + inDragLayer: !0 + }), t.dragData.didDrag = !0; + var an = { + x: 0, + y: 0 + }; + if (k(Qe[0]) && k(Qe[1]) && (an.x += Qe[0], an.y += Qe[1], zu)) { + t.redrawHint("eles", !0); + var sr = t.touchData.dragDelta; + sr && k(sr[0]) && k(sr[1]) && (an.x += sr[0], an.y += sr[1]); + } + t.hoverData.draggingEles = !0, Gt.silentShift(an).emit("position drag"), t.redrawHint("drag", !0), t.touchData.startPosition[0] == Ke[0] && t.touchData.startPosition[1] == Ke[1] && t.redrawHint("eles", !0), t.redraw(); + } else { + var sr = t.touchData.dragDelta = t.touchData.dragDelta || []; + sr.length === 0 ? (sr.push(Qe[0]), sr.push(Qe[1])) : (sr[0] += Qe[0], sr[1] += Qe[1]); + } + if (r(ir || Ht, ["touchmove", "tapdrag", "vmousemove"], N, { + x: be[0], + y: be[1] + }), (!ir || !ir.grabbed()) && Ht != Xi && (Xi && Xi.emit({ + originalEvent: N, + type: "tapdragout", + position: { + x: be[0], + y: be[1] + } + }), Ht && Ht.emit({ + originalEvent: N, + type: "tapdragover", + position: { + x: be[0], + y: be[1] + } + })), t.touchData.last = Ht, le) + for (var Xt = 0; Xt < be.length; Xt++) + be[Xt] && t.touchData.startPosition[Xt] && dt && (t.touchData.singleTouchMoved = !0); + if (le && (ir == null || ir.pannable()) && me.panningEnabled() && me.userPanningEnabled()) { + var yp = n(ir, t.touchData.starts); + yp && (N.preventDefault(), t.data.bgActivePosistion || (t.data.bgActivePosistion = jr(t.touchData.startPosition)), t.swipePanning ? (me.panBy({ + x: Qe[0] * Le, + y: Qe[1] * Le + }), me.emit("dragpan")) : dt && (t.swipePanning = !0, me.panBy({ + x: Ze * Le, + y: Ct * Le + }), me.emit("dragpan"), ir && (ir.unactivate(), t.redrawHint("select", !0), t.touchData.start = null))); + var ze = t.projectIntoViewport(N.touches[0].clientX, N.touches[0].clientY); + be[0] = ze[0], be[1] = ze[1]; + } + } + for (var ut = 0; ut < be.length; ut++) + Ke[ut] = be[ut]; + le && N.touches.length > 0 && !t.hoverData.draggingEles && !t.swipePanning && t.data.bgActivePosistion != null && (t.data.bgActivePosistion = void 0, t.redrawHint("select", !0), t.redraw()); + } + }, !1); + var Oe; + t.registerBinding(window, "touchcancel", Oe = function(N) { + var le = t.touchData.start; + t.touchData.capture = !1, le && le.unactivate(); + }); + var Ie, He, qe, Re; + if (t.registerBinding(window, "touchend", Ie = function(N) { + var le = t.touchData.start, De = t.touchData.capture; + if (De) + N.touches.length === 0 && (t.touchData.capture = !1), N.preventDefault(); + else + return; + var me = t.selection; + t.swipePanning = !1, t.hoverData.draggingEles = !1; + var be = t.cy, Ke = be.zoom(), Le = t.touchData.now, ze = t.touchData.earlier; + if (N.touches[0]) { + var at = t.projectIntoViewport(N.touches[0].clientX, N.touches[0].clientY); + Le[0] = at[0], Le[1] = at[1]; + } + if (N.touches[1]) { + var at = t.projectIntoViewport(N.touches[1].clientX, N.touches[1].clientY); + Le[2] = at[0], Le[3] = at[1]; + } + if (N.touches[2]) { + var at = t.projectIntoViewport(N.touches[2].clientX, N.touches[2].clientY); + Le[4] = at[0], Le[5] = at[1]; + } + le && le.unactivate(); + var dt; + if (t.touchData.cxt) { + if (dt = { + originalEvent: N, + type: "cxttapend", + position: { + x: Le[0], + y: Le[1] + } + }, le ? le.emit(dt) : be.emit(dt), !t.touchData.cxtDragged) { + var Qe = { + originalEvent: N, + type: "cxttap", + position: { + x: Le[0], + y: Le[1] + } + }; + le ? le.emit(Qe) : be.emit(Qe); + } + t.touchData.start && (t.touchData.start._private.grabbed = !1), t.touchData.cxt = !1, t.touchData.start = null, t.redraw(); + return; + } + if (!N.touches[2] && be.boxSelectionEnabled() && t.touchData.selecting) { + t.touchData.selecting = !1; + var ut = be.collection(t.getAllInBox(me[0], me[1], me[2], me[3])); + me[0] = void 0, me[1] = void 0, me[2] = void 0, me[3] = void 0, me[4] = 0, t.redrawHint("select", !0), be.emit({ + type: "boxend", + originalEvent: N, + position: { + x: Le[0], + y: Le[1] + } + }); + var Ze = function(Hr) { + return Hr.selectable() && !Hr.selected(); + }; + ut.emit("box").stdFilter(Ze).select().emit("boxselect"), ut.nonempty() && t.redrawHint("eles", !0), t.redraw(); + } + if (le != null && le.unactivate(), N.touches[2]) + t.data.bgActivePosistion = void 0, t.redrawHint("select", !0); + else if (!N.touches[1]) { + if (!N.touches[0]) { + if (!N.touches[0]) { + t.data.bgActivePosistion = void 0, t.redrawHint("select", !0); + var Je = t.dragData.touchDragEles; + if (le != null) { + var Ct = le._private.grabbed; + g(Je), t.redrawHint("drag", !0), t.redrawHint("eles", !0), Ct && (le.emit("freeon"), Je.emit("free"), t.dragData.didDrag && (le.emit("dragfreeon"), Je.emit("dragfree"))), r(le, ["touchend", "tapend", "vmouseup", "tapdragout"], N, { + x: Le[0], + y: Le[1] + }), le.unactivate(), t.touchData.start = null; + } else { + var It = t.findNearestElement(Le[0], Le[1], !0, !0); + r(It, ["touchend", "tapend", "vmouseup", "tapdragout"], N, { + x: Le[0], + y: Le[1] + }); + } + var ar = t.touchData.startPosition[0] - Le[0], nr = ar * ar, Rt = t.touchData.startPosition[1] - Le[1], Qt = Rt * Rt, _t = nr + Qt, br = _t * Ke * Ke; + t.touchData.singleTouchMoved || (le || be.$(":selected").unselect(["tapunselect"]), r(le, ["tap", "vclick"], N, { + x: Le[0], + y: Le[1] + }), He = !1, N.timeStamp - Re <= be.multiClickDebounceTime() ? (qe && clearTimeout(qe), He = !0, Re = null, r(le, ["dbltap", "vdblclick"], N, { + x: Le[0], + y: Le[1] + })) : (qe = setTimeout(function() { + He || r(le, ["onetap", "voneclick"], N, { + x: Le[0], + y: Le[1] + }); + }, be.multiClickDebounceTime()), Re = N.timeStamp)), le != null && !t.dragData.didDrag && le._private.selectable && br < t.touchTapThreshold2 && !t.pinching && (be.selectionType() === "single" ? (be.$(e).unmerge(le).unselect(["tapunselect"]), le.select(["tapselect"])) : le.selected() ? le.unselect(["tapunselect"]) : le.select(["tapselect"]), t.redrawHint("eles", !0)), t.touchData.singleTouchMoved = !0; + } + } + } + for (var Ir = 0; Ir < Le.length; Ir++) + ze[Ir] = Le[Ir]; + t.dragData.didDrag = !1, N.touches.length === 0 && (t.touchData.dragDelta = [], t.touchData.startPosition = null, t.touchData.startGPosition = null, t.touchData.didSelect = !1), N.touches.length < 2 && (N.touches.length === 1 && (t.touchData.startGPosition = [N.touches[0].clientX, N.touches[0].clientY]), t.pinching = !1, t.redrawHint("eles", !0), t.redraw()); + }, !1), typeof TouchEvent > "u") { + var Me = [], Ve = function(N) { + return { + clientX: N.clientX, + clientY: N.clientY, + force: 1, + identifier: N.pointerId, + pageX: N.pageX, + pageY: N.pageY, + radiusX: N.width / 2, + radiusY: N.height / 2, + screenX: N.screenX, + screenY: N.screenY, + target: N.target + }; + }, Fe = function(N) { + return { + event: N, + touch: Ve(N) + }; + }, ke = function(N) { + Me.push(Fe(N)); + }, Ge = function(N) { + for (var le = 0; le < Me.length; le++) { + var De = Me[le]; + if (De.event.pointerId === N.pointerId) { + Me.splice(le, 1); + return; + } + } + }, et = function(N) { + var le = Me.filter(function(De) { + return De.event.pointerId === N.pointerId; + })[0]; + le.event = N, le.touch = Ve(N); + }, We = function(N) { + N.touches = Me.map(function(le) { + return le.touch; + }); + }, Ye = function(N) { + return N.pointerType === "mouse" || N.pointerType === 4; + }; + t.registerBinding(t.container, "pointerdown", function(Se) { + Ye(Se) || (Se.preventDefault(), ke(Se), We(Se), xe(Se)); + }), t.registerBinding(t.container, "pointerup", function(Se) { + Ye(Se) || (Ge(Se), We(Se), Ie(Se)); + }), t.registerBinding(t.container, "pointercancel", function(Se) { + Ye(Se) || (Ge(Se), We(Se), Oe(Se)); + }), t.registerBinding(t.container, "pointermove", function(Se) { + Ye(Se) || (Se.preventDefault(), et(Se), We(Se), Ce(Se)); + }); + } + }; + var yr = {}; + yr.generatePolygon = function(t, e) { + return this.nodeShapes[t] = { + renderer: this, + name: t, + points: e, + draw: function(a, n, i, s, o) { + this.renderer.nodeShapeImpl("polygon", a, n, i, s, o, this.points); + }, + intersectLine: function(a, n, i, s, o, l, u) { + return Ba(o, l, this.points, a, n, i / 2, s / 2, u); + }, + checkPoint: function(a, n, i, s, o, l, u) { + return gr(a, n, this.points, l, u, s, o, [0, -1], i); + } + }; + }, yr.generateEllipse = function() { + return this.nodeShapes.ellipse = { + renderer: this, + name: "ellipse", + draw: function(e, r, a, n, i) { + this.renderer.nodeShapeImpl(this.name, e, r, a, n, i); + }, + intersectLine: function(e, r, a, n, i, s, o) { + return Bf(i, s, e, r, a / 2 + o, n / 2 + o); + }, + checkPoint: function(e, r, a, n, i, s, o) { + return Fr(e, r, n, i, s, o, a); + } + }; + }, yr.generateRoundPolygon = function(t, e) { + for (var r = new Array(e.length * 2), a = 0; a < e.length / 2; a++) { + var n = a * 2, i = void 0; + a < e.length / 2 - 1 ? i = (a + 1) * 2 : i = 0, r[a * 4] = e[n], r[a * 4 + 1] = e[n + 1]; + var s = e[i] - e[n], o = e[i + 1] - e[n + 1], l = Math.sqrt(s * s + o * o); + r[a * 4 + 2] = s / l, r[a * 4 + 3] = o / l; + } + return this.nodeShapes[t] = { + renderer: this, + name: t, + points: r, + draw: function(f, h, c, v, d) { + this.renderer.nodeShapeImpl("round-polygon", f, h, c, v, d, this.points); + }, + intersectLine: function(f, h, c, v, d, g, y) { + return Ff(d, g, this.points, f, h, c, v); + }, + checkPoint: function(f, h, c, v, d, g, y) { + return Pf(f, h, this.points, g, y, v, d); + } + }; + }, yr.generateRoundRectangle = function() { + return this.nodeShapes["round-rectangle"] = this.nodeShapes.roundrectangle = { + renderer: this, + name: "round-rectangle", + points: $t(4, 0), + draw: function(e, r, a, n, i) { + this.renderer.nodeShapeImpl(this.name, e, r, a, n, i); + }, + intersectLine: function(e, r, a, n, i, s, o) { + return ws(i, s, e, r, a, n, o); + }, + checkPoint: function(e, r, a, n, i, s, o) { + var l = Fa(n, i), u = l * 2; + return !!(gr(e, r, this.points, s, o, n, i - u, [0, -1], a) || gr(e, r, this.points, s, o, n - u, i, [0, -1], a) || Fr(e, r, u, u, s - n / 2 + l, o - i / 2 + l, a) || Fr(e, r, u, u, s + n / 2 - l, o - i / 2 + l, a) || Fr(e, r, u, u, s + n / 2 - l, o + i / 2 - l, a) || Fr(e, r, u, u, s - n / 2 + l, o + i / 2 - l, a)); + } + }; + }, yr.generateCutRectangle = function() { + return this.nodeShapes["cut-rectangle"] = this.nodeShapes.cutrectangle = { + renderer: this, + name: "cut-rectangle", + cornerLength: Ds(), + points: $t(4, 0), + draw: function(e, r, a, n, i) { + this.renderer.nodeShapeImpl(this.name, e, r, a, n, i); + }, + generateCutTrianglePts: function(e, r, a, n) { + var i = this.cornerLength, s = r / 2, o = e / 2, l = a - o, u = a + o, f = n - s, h = n + s; + return { + topLeft: [l, f + i, l + i, f, l + i, f + i], + topRight: [u - i, f, u, f + i, u - i, f + i], + bottomRight: [u, h - i, u - i, h, u - i, h - i], + bottomLeft: [l + i, h, l, h - i, l + i, h - i] + }; + }, + intersectLine: function(e, r, a, n, i, s, o) { + var l = this.generateCutTrianglePts(a + 2 * o, n + 2 * o, e, r), u = [].concat.apply([], [l.topLeft.splice(0, 4), l.topRight.splice(0, 4), l.bottomRight.splice(0, 4), l.bottomLeft.splice(0, 4)]); + return Ba(i, s, u, e, r); + }, + checkPoint: function(e, r, a, n, i, s, o) { + if (gr(e, r, this.points, s, o, n, i - 2 * this.cornerLength, [0, -1], a) || gr(e, r, this.points, s, o, n - 2 * this.cornerLength, i, [0, -1], a)) + return !0; + var l = this.generateCutTrianglePts(n, i, s, o); + return Yt(e, r, l.topLeft) || Yt(e, r, l.topRight) || Yt(e, r, l.bottomRight) || Yt(e, r, l.bottomLeft); + } + }; + }, yr.generateBarrel = function() { + return this.nodeShapes.barrel = { + renderer: this, + name: "barrel", + points: $t(4, 0), + draw: function(e, r, a, n, i) { + this.renderer.nodeShapeImpl(this.name, e, r, a, n, i); + }, + intersectLine: function(e, r, a, n, i, s, o) { + var l = 0.15, u = 0.5, f = 0.85, h = this.generateBarrelBezierPts(a + 2 * o, n + 2 * o, e, r), c = function(g) { + var y = ea({ + x: g[0], + y: g[1] + }, { + x: g[2], + y: g[3] + }, { + x: g[4], + y: g[5] + }, l), p = ea({ + x: g[0], + y: g[1] + }, { + x: g[2], + y: g[3] + }, { + x: g[4], + y: g[5] + }, u), m = ea({ + x: g[0], + y: g[1] + }, { + x: g[2], + y: g[3] + }, { + x: g[4], + y: g[5] + }, f); + return [g[0], g[1], y.x, y.y, p.x, p.y, m.x, m.y, g[4], g[5]]; + }, v = [].concat(c(h.topLeft), c(h.topRight), c(h.bottomRight), c(h.bottomLeft)); + return Ba(i, s, v, e, r); + }, + generateBarrelBezierPts: function(e, r, a, n) { + var i = r / 2, s = e / 2, o = a - s, l = a + s, u = n - i, f = n + i, h = vi(e, r), c = h.heightOffset, v = h.widthOffset, d = h.ctrlPtOffsetPct * e, g = { + topLeft: [o, u + c, o + d, u, o + v, u], + topRight: [l - v, u, l - d, u, l, u + c], + bottomRight: [l, f - c, l - d, f, l - v, f], + bottomLeft: [o + v, f, o + d, f, o, f - c] + }; + return g.topLeft.isTop = !0, g.topRight.isTop = !0, g.bottomLeft.isBottom = !0, g.bottomRight.isBottom = !0, g; + }, + checkPoint: function(e, r, a, n, i, s, o) { + var l = vi(n, i), u = l.heightOffset, f = l.widthOffset; + if (gr(e, r, this.points, s, o, n, i - 2 * u, [0, -1], a) || gr(e, r, this.points, s, o, n - 2 * f, i, [0, -1], a)) + return !0; + for (var h = this.generateBarrelBezierPts(n, i, s, o), c = function(w, I, C) { + var B = C[4], F = C[2], R = C[0], X = C[5], z = C[1], re = Math.min(B, R), W = Math.max(B, R), Z = Math.min(X, z), ie = Math.max(X, z); + if (re <= w && w <= W && Z <= I && I <= ie) { + var oe = zf(B, F, R), de = Mf(oe[0], oe[1], oe[2], w), se = de.filter(function(ve) { + return 0 <= ve && ve <= 1; + }); + if (se.length > 0) + return se[0]; + } + return null; + }, v = Object.keys(h), d = 0; d < v.length; d++) { + var g = v[d], y = h[g], p = c(e, r, y); + if (p != null) { + var m = y[5], b = y[3], E = y[1], M = St(m, b, E, p); + if (y.isTop && M <= r || y.isBottom && r <= M) + return !0; + } + } + return !1; + } + }; + }, yr.generateBottomRoundrectangle = function() { + return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes.bottomroundrectangle = { + renderer: this, + name: "bottom-round-rectangle", + points: $t(4, 0), + draw: function(e, r, a, n, i) { + this.renderer.nodeShapeImpl(this.name, e, r, a, n, i); + }, + intersectLine: function(e, r, a, n, i, s, o) { + var l = e - (a / 2 + o), u = r - (n / 2 + o), f = u, h = e + (a / 2 + o), c = Tr(i, s, e, r, l, u, h, f, !1); + return c.length > 0 ? c : ws(i, s, e, r, a, n, o); + }, + checkPoint: function(e, r, a, n, i, s, o) { + var l = Fa(n, i), u = 2 * l; + if (gr(e, r, this.points, s, o, n, i - u, [0, -1], a) || gr(e, r, this.points, s, o, n - u, i, [0, -1], a)) + return !0; + var f = n / 2 + 2 * a, h = i / 2 + 2 * a, c = [s - f, o - h, s - f, o, s + f, o, s + f, o - h]; + return !!(Yt(e, r, c) || Fr(e, r, u, u, s + n / 2 - l, o + i / 2 - l, a) || Fr(e, r, u, u, s - n / 2 + l, o + i / 2 - l, a)); + } + }; + }, yr.registerNodeShapes = function() { + var t = this.nodeShapes = {}, e = this; + this.generateEllipse(), this.generatePolygon("triangle", $t(3, 0)), this.generateRoundPolygon("round-triangle", $t(3, 0)), this.generatePolygon("rectangle", $t(4, 0)), t.square = t.rectangle, this.generateRoundRectangle(), this.generateCutRectangle(), this.generateBarrel(), this.generateBottomRoundrectangle(); + { + var r = [0, 1, 1, 0, 0, -1, -1, 0]; + this.generatePolygon("diamond", r), this.generateRoundPolygon("round-diamond", r); + } + this.generatePolygon("pentagon", $t(5, 0)), this.generateRoundPolygon("round-pentagon", $t(5, 0)), this.generatePolygon("hexagon", $t(6, 0)), this.generateRoundPolygon("round-hexagon", $t(6, 0)), this.generatePolygon("heptagon", $t(7, 0)), this.generateRoundPolygon("round-heptagon", $t(7, 0)), this.generatePolygon("octagon", $t(8, 0)), this.generateRoundPolygon("round-octagon", $t(8, 0)); + var a = new Array(20); + { + var n = hi(5, 0), i = hi(5, Math.PI / 5), s = 0.5 * (3 - Math.sqrt(5)); + s *= 1.57; + for (var o = 0; o < i.length / 2; o++) + i[o * 2] *= s, i[o * 2 + 1] *= s; + for (var o = 0; o < 20 / 4; o++) + a[o * 4] = n[o * 2], a[o * 4 + 1] = n[o * 2 + 1], a[o * 4 + 2] = i[o * 2], a[o * 4 + 3] = i[o * 2 + 1]; + } + a = Cs(a), this.generatePolygon("star", a), this.generatePolygon("vee", [-1, -1, 0, -0.333, 1, -1, 0, 1]), this.generatePolygon("rhomboid", [-1, -1, 0.333, -1, 1, 1, -0.333, 1]), this.nodeShapes.concavehexagon = this.generatePolygon("concave-hexagon", [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); + { + var l = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; + this.generatePolygon("tag", l), this.generateRoundPolygon("round-tag", l); + } + t.makePolygon = function(u) { + var f = u.join("$"), h = "polygon-" + f, c; + return (c = this[h]) ? c : e.generatePolygon(h, u); + }; + }; + var Ja = {}; + Ja.timeToRender = function() { + return this.redrawTotalTime / this.redrawCount; + }, Ja.redraw = function(t) { + t = t || gs(); + var e = this; + e.averageRedrawTime === void 0 && (e.averageRedrawTime = 0), e.lastRedrawTime === void 0 && (e.lastRedrawTime = 0), e.lastDrawTime === void 0 && (e.lastDrawTime = 0), e.requestedFrame = !0, e.renderOptions = t; + }, Ja.beforeRender = function(t, e) { + if (!this.destroyed) { + e == null && xt("Priority is not optional for beforeRender"); + var r = this.beforeRenderCallbacks; + r.push({ + fn: t, + priority: e + }), r.sort(function(a, n) { + return n.priority - a.priority; + }); + } + }; + var hu = function(e, r, a) { + for (var n = e.beforeRenderCallbacks, i = 0; i < n.length; i++) + n[i].fn(r, a); + }; + Ja.startRenderLoop = function() { + var t = this, e = t.cy; + if (!t.renderLoopStarted) { + t.renderLoopStarted = !0; + var r = function a(n) { + if (!t.destroyed) { + if (!e.batching()) + if (t.requestedFrame && !t.skipFrame) { + hu(t, !0, n); + var i = dr(); + t.render(t.renderOptions); + var s = t.lastDrawTime = dr(); + t.averageRedrawTime === void 0 && (t.averageRedrawTime = s - i), t.redrawCount === void 0 && (t.redrawCount = 0), t.redrawCount++, t.redrawTotalTime === void 0 && (t.redrawTotalTime = 0); + var o = s - i; + t.redrawTotalTime += o, t.lastRedrawTime = o, t.averageRedrawTime = t.averageRedrawTime / 2 + o / 2, t.requestedFrame = !1; + } else + hu(t, !1, n); + t.skipFrame = !1, fn(a); + } + }; + fn(r); + } + }; + var gg = function(e) { + this.init(e); + }, cu = gg, ma = cu.prototype; + ma.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"], ma.init = function(t) { + var e = this; + e.options = t, e.cy = t.cy; + var r = e.container = t.cy.container(); + if (D) { + var a = D.document, n = a.head, i = "__________cytoscape_stylesheet", s = "__________cytoscape_container", o = a.getElementById(i) != null; + if (r.className.indexOf(s) < 0 && (r.className = (r.className || "") + " " + s), !o) { + var l = a.createElement("style"); + l.id = i, l.innerHTML = "." + s + " { position: relative; }", n.insertBefore(l, n.children[0]); + } + var u = D.getComputedStyle(r), f = u.getPropertyValue("position"); + f === "static" && ft("A Cytoscape container has style position:static and so can not use UI extensions properly"); + } + e.selection = [void 0, void 0, void 0, void 0, 0], e.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95], e.hoverData = { + down: null, + last: null, + downTime: null, + triggerMode: null, + dragging: !1, + initialPan: [null, null], + capture: !1 + }, e.dragData = { + possibleDragElements: [] + }, e.touchData = { + start: null, + capture: !1, + // These 3 fields related to tap, taphold events + startPosition: [null, null, null, null, null, null], + singleTouchStartTime: null, + singleTouchMoved: !0, + now: [null, null, null, null, null, null], + earlier: [null, null, null, null, null, null] + }, e.redraws = 0, e.showFps = t.showFps, e.debug = t.debug, e.hideEdgesOnViewport = t.hideEdgesOnViewport, e.textureOnViewport = t.textureOnViewport, e.wheelSensitivity = t.wheelSensitivity, e.motionBlurEnabled = t.motionBlur, e.forcedPixelRatio = k(t.pixelRatio) ? t.pixelRatio : null, e.motionBlur = t.motionBlur, e.motionBlurOpacity = t.motionBlurOpacity, e.motionBlurTransparency = 1 - e.motionBlurOpacity, e.motionBlurPxRatio = 1, e.mbPxRBlurry = 1, e.minMbLowQualFrames = 4, e.fullQualityMb = !1, e.clearedForMotionBlur = [], e.desktopTapThreshold = t.desktopTapThreshold, e.desktopTapThreshold2 = t.desktopTapThreshold * t.desktopTapThreshold, e.touchTapThreshold = t.touchTapThreshold, e.touchTapThreshold2 = t.touchTapThreshold * t.touchTapThreshold, e.tapholdDuration = 500, e.bindings = [], e.beforeRenderCallbacks = [], e.beforeRenderPriorities = { + // higher priority execs before lower one + animations: 400, + eleCalcs: 300, + eleTxrDeq: 200, + lyrTxrDeq: 150, + lyrTxrSkip: 100 + }, e.registerNodeShapes(), e.registerArrowShapes(), e.registerCalculationListeners(); + }, ma.notify = function(t, e) { + var r = this, a = r.cy; + if (!this.destroyed) { + if (t === "init") { + r.load(); + return; + } + if (t === "destroy") { + r.destroy(); + return; + } + (t === "add" || t === "remove" || t === "move" && a.hasCompoundNodes() || t === "load" || t === "zorder" || t === "mount") && r.invalidateCachedZSortedEles(), t === "viewport" && r.redrawHint("select", !0), (t === "load" || t === "resize" || t === "mount") && (r.invalidateContainerClientCoordsCache(), r.matchCanvasSize(r.container)), r.redrawHint("eles", !0), r.redrawHint("drag", !0), this.startRenderLoop(), this.redraw(); + } + }, ma.destroy = function() { + var t = this; + t.destroyed = !0, t.cy.stopAnimationLoop(); + for (var e = 0; e < t.bindings.length; e++) { + var r = t.bindings[e], a = r, n = a.target; + (n.off || n.removeEventListener).apply(n, a.args); + } + if (t.bindings = [], t.beforeRenderCallbacks = [], t.onUpdateEleCalcsFns = [], t.removeObserver && t.removeObserver.disconnect(), t.styleObserver && t.styleObserver.disconnect(), t.resizeObserver && t.resizeObserver.disconnect(), t.labelCalcDiv) + try { + document.body.removeChild(t.labelCalcDiv); + } catch { + } + }, ma.isHeadless = function() { + return !1; + }, [Bi, lu, fu, ya, yr, Ja].forEach(function(t) { + Ue(ma, t); + }); + var zi = 1e3 / 60, vu = { + setupDequeueing: function(e) { + return function() { + var a = this, n = this.renderer; + if (!a.dequeueingSetup) { + a.dequeueingSetup = !0; + var i = ln(function() { + n.redrawHint("eles", !0), n.redrawHint("drag", !0), n.redraw(); + }, e.deqRedrawThreshold), s = function(u, f) { + var h = dr(), c = n.averageRedrawTime, v = n.lastRedrawTime, d = [], g = n.cy.extent(), y = n.getPixelRatio(); + for (u || n.flushRenderedStyleQueue(); ; ) { + var p = dr(), m = p - h, b = p - f; + if (v < zi) { + var E = zi - (u ? c : 0); + if (b >= e.deqFastCost * E) + break; + } else if (u) { + if (m >= e.deqCost * v || m >= e.deqAvgCost * c) + break; + } else if (b >= e.deqNoDrawCost * zi) + break; + var M = e.deq(a, y, g); + if (M.length > 0) + for (var A = 0; A < M.length; A++) + d.push(M[A]); + else + break; + } + d.length > 0 && (e.onDeqd(a, d), !u && e.shouldRedraw(a, d, y, g) && i()); + }, o = e.priority || ni; + n.beforeRender(s, o(a)); + } + }; + } + }, pg = /* @__PURE__ */ function() { + function t(e) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : cn; + ce(this, t), this.idsByKey = new ur(), this.keyForId = new ur(), this.cachesByLvl = new ur(), this.lvls = [], this.getKey = e, this.doesEleInvalidateKey = r; + } + return O(t, [{ + key: "getIdsFor", + value: function(r) { + r == null && xt("Can not get id list for null key"); + var a = this.idsByKey, n = this.idsByKey.get(r); + return n || (n = new Jr(), a.set(r, n)), n; + } + }, { + key: "addIdForKey", + value: function(r, a) { + r != null && this.getIdsFor(r).add(a); + } + }, { + key: "deleteIdForKey", + value: function(r, a) { + r != null && this.getIdsFor(r).delete(a); + } + }, { + key: "getNumberOfIdsForKey", + value: function(r) { + return r == null ? 0 : this.getIdsFor(r).size; + } + }, { + key: "updateKeyMappingFor", + value: function(r) { + var a = r.id(), n = this.keyForId.get(a), i = this.getKey(r); + this.deleteIdForKey(n, a), this.addIdForKey(i, a), this.keyForId.set(a, i); + } + }, { + key: "deleteKeyMappingFor", + value: function(r) { + var a = r.id(), n = this.keyForId.get(a); + this.deleteIdForKey(n, a), this.keyForId.delete(a); + } + }, { + key: "keyHasChangedFor", + value: function(r) { + var a = r.id(), n = this.keyForId.get(a), i = this.getKey(r); + return n !== i; + } + }, { + key: "isInvalid", + value: function(r) { + return this.keyHasChangedFor(r) || this.doesEleInvalidateKey(r); + } + }, { + key: "getCachesAt", + value: function(r) { + var a = this.cachesByLvl, n = this.lvls, i = a.get(r); + return i || (i = new ur(), a.set(r, i), n.push(r)), i; + } + }, { + key: "getCache", + value: function(r, a) { + return this.getCachesAt(a).get(r); + } + }, { + key: "get", + value: function(r, a) { + var n = this.getKey(r), i = this.getCache(n, a); + return i != null && this.updateKeyMappingFor(r), i; + } + }, { + key: "getForCachedKey", + value: function(r, a) { + var n = this.keyForId.get(r.id()), i = this.getCache(n, a); + return i; + } + }, { + key: "hasCache", + value: function(r, a) { + return this.getCachesAt(a).has(r); + } + }, { + key: "has", + value: function(r, a) { + var n = this.getKey(r); + return this.hasCache(n, a); + } + }, { + key: "setCache", + value: function(r, a, n) { + n.key = r, this.getCachesAt(a).set(r, n); + } + }, { + key: "set", + value: function(r, a, n) { + var i = this.getKey(r); + this.setCache(i, a, n), this.updateKeyMappingFor(r); + } + }, { + key: "deleteCache", + value: function(r, a) { + this.getCachesAt(a).delete(r); + } + }, { + key: "delete", + value: function(r, a) { + var n = this.getKey(r); + this.deleteCache(n, a); + } + }, { + key: "invalidateKey", + value: function(r) { + var a = this; + this.lvls.forEach(function(n) { + return a.deleteCache(r, n); + }); + } + // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) + }, { + key: "invalidate", + value: function(r) { + var a = r.id(), n = this.keyForId.get(a); + this.deleteKeyMappingFor(r); + var i = this.doesEleInvalidateKey(r); + return i && this.invalidateKey(n), i || this.getNumberOfIdsForKey(n) === 0; + } + }]), t; + }(), du = 25, Wn = 50, Kn = -4, Gi = 3, yg = 7.99, mg = 8, bg = 1024, Eg = 1024, wg = 1024, xg = 0.2, Tg = 0.8, Cg = 10, Dg = 0.15, Sg = 0.1, Lg = 0.9, Ag = 0.9, Og = 100, Ng = 1, ba = { + dequeue: "dequeue", + downscale: "downscale", + highQuality: "highQuality" + }, Mg = Lt({ + getKey: null, + doesEleInvalidateKey: cn, + drawElement: null, + getBoundingBox: null, + getRotationPoint: null, + getRotationOffset: null, + isVisible: hs, + allowEdgeTxrCaching: !0, + allowParentTxrCaching: !0 + }), ja = function(e, r) { + var a = this; + a.renderer = e, a.onDequeues = []; + var n = Mg(r); + Ue(a, n), a.lookup = new pg(n.getKey, n.doesEleInvalidateKey), a.setupDequeueing(); + }, Dt = ja.prototype; + Dt.reasons = ba, Dt.getTextureQueue = function(t) { + var e = this; + return e.eleImgCaches = e.eleImgCaches || {}, e.eleImgCaches[t] = e.eleImgCaches[t] || []; + }, Dt.getRetiredTextureQueue = function(t) { + var e = this, r = e.eleImgCaches.retired = e.eleImgCaches.retired || {}, a = r[t] = r[t] || []; + return a; + }, Dt.getElementQueue = function() { + var t = this, e = t.eleCacheQueue = t.eleCacheQueue || new Ra(function(r, a) { + return a.reqs - r.reqs; + }); + return e; + }, Dt.getElementKeyToQueue = function() { + var t = this, e = t.eleKeyToCacheQueue = t.eleKeyToCacheQueue || {}; + return e; + }, Dt.getElement = function(t, e, r, a, n) { + var i = this, s = this.renderer, o = s.cy.zoom(), l = this.lookup; + if (!e || e.w === 0 || e.h === 0 || isNaN(e.w) || isNaN(e.h) || !t.visible() || t.removed() || !i.allowEdgeTxrCaching && t.isEdge() || !i.allowParentTxrCaching && t.isParent()) + return null; + if (a == null && (a = Math.ceil(oi(o * r))), a < Kn) + a = Kn; + else if (o >= yg || a > Gi) + return null; + var u = Math.pow(2, a), f = e.h * u, h = e.w * u, c = s.eleTextBiggerThanMin(t, u); + if (!this.isVisible(t, c)) + return null; + var v = l.get(t, a); + if (v && v.invalidated && (v.invalidated = !1, v.texture.invalidatedWidth -= v.width), v) + return v; + var d; + if (f <= du ? d = du : f <= Wn ? d = Wn : d = Math.ceil(f / Wn) * Wn, f > wg || h > Eg) + return null; + var g = i.getTextureQueue(d), y = g[g.length - 2], p = function() { + return i.recycleTexture(d, h) || i.addTexture(d, h); + }; + y || (y = g[g.length - 1]), y || (y = p()), y.width - y.usedWidth < h && (y = p()); + for (var m = function(W) { + return W && W.scaledLabelShown === c; + }, b = n && n === ba.dequeue, E = n && n === ba.highQuality, M = n && n === ba.downscale, A, w = a + 1; w <= Gi; w++) { + var I = l.get(t, w); + if (I) { + A = I; + break; + } + } + var C = A && A.level === a + 1 ? A : null, B = function() { + y.context.drawImage(C.texture.canvas, C.x, 0, C.width, C.height, y.usedWidth, 0, h, f); + }; + if (y.context.setTransform(1, 0, 0, 1, 0, 0), y.context.clearRect(y.usedWidth, 0, h, d), m(C)) + B(); + else if (m(A)) + if (E) { + for (var F = A.level; F > a; F--) + C = i.getElement(t, e, r, F, ba.downscale); + B(); + } else + return i.queueElement(t, A.level - 1), A; + else { + var R; + if (!b && !E && !M) + for (var X = a - 1; X >= Kn; X--) { + var z = l.get(t, X); + if (z) { + R = z; + break; + } + } + if (m(R)) + return i.queueElement(t, a), R; + y.context.translate(y.usedWidth, 0), y.context.scale(u, u), this.drawElement(y.context, t, e, c, !1), y.context.scale(1 / u, 1 / u), y.context.translate(-y.usedWidth, 0); + } + return v = { + x: y.usedWidth, + texture: y, + level: a, + scale: u, + width: h, + height: f, + scaledLabelShown: c + }, y.usedWidth += Math.ceil(h + mg), y.eleCaches.push(v), l.set(t, a, v), i.checkTextureFullness(y), v; + }, Dt.invalidateElements = function(t) { + for (var e = 0; e < t.length; e++) + this.invalidateElement(t[e]); + }, Dt.invalidateElement = function(t) { + var e = this, r = e.lookup, a = [], n = r.isInvalid(t); + if (n) { + for (var i = Kn; i <= Gi; i++) { + var s = r.getForCachedKey(t, i); + s && a.push(s); + } + var o = r.invalidate(t); + if (o) + for (var l = 0; l < a.length; l++) { + var u = a[l], f = u.texture; + f.invalidatedWidth += u.width, u.invalidated = !0, e.checkTextureUtility(f); + } + e.removeFromQueue(t); + } + }, Dt.checkTextureUtility = function(t) { + t.invalidatedWidth >= xg * t.width && this.retireTexture(t); + }, Dt.checkTextureFullness = function(t) { + var e = this, r = e.getTextureQueue(t.height); + t.usedWidth / t.width > Tg && t.fullnessChecks >= Cg ? wr(r, t) : t.fullnessChecks++; + }, Dt.retireTexture = function(t) { + var e = this, r = t.height, a = e.getTextureQueue(r), n = this.lookup; + wr(a, t), t.retired = !0; + for (var i = t.eleCaches, s = 0; s < i.length; s++) { + var o = i[s]; + n.deleteCache(o.key, o.level); + } + ii(i); + var l = e.getRetiredTextureQueue(r); + l.push(t); + }, Dt.addTexture = function(t, e) { + var r = this, a = r.getTextureQueue(t), n = {}; + return a.push(n), n.eleCaches = [], n.height = t, n.width = Math.max(bg, e), n.usedWidth = 0, n.invalidatedWidth = 0, n.fullnessChecks = 0, n.canvas = r.renderer.makeOffscreenCanvas(n.width, n.height), n.context = n.canvas.getContext("2d"), n; + }, Dt.recycleTexture = function(t, e) { + for (var r = this, a = r.getTextureQueue(t), n = r.getRetiredTextureQueue(t), i = 0; i < n.length; i++) { + var s = n[i]; + if (s.width >= e) + return s.retired = !1, s.usedWidth = 0, s.invalidatedWidth = 0, s.fullnessChecks = 0, ii(s.eleCaches), s.context.setTransform(1, 0, 0, 1, 0, 0), s.context.clearRect(0, 0, s.width, s.height), wr(n, s), a.push(s), s; + } + }, Dt.queueElement = function(t, e) { + var r = this, a = r.getElementQueue(), n = r.getElementKeyToQueue(), i = this.getKey(t), s = n[i]; + if (s) + s.level = Math.max(s.level, e), s.eles.merge(t), s.reqs++, a.updateItem(s); + else { + var o = { + eles: t.spawn().merge(t), + level: e, + reqs: 1, + key: i + }; + a.push(o), n[i] = o; + } + }, Dt.dequeue = function(t) { + for (var e = this, r = e.getElementQueue(), a = e.getElementKeyToQueue(), n = [], i = e.lookup, s = 0; s < Ng && r.size() > 0; s++) { + var o = r.pop(), l = o.key, u = o.eles[0], f = i.hasCache(u, o.level); + if (a[l] = null, f) + continue; + n.push(o); + var h = e.getBoundingBox(u); + e.getElement(u, h, t, o.level, ba.dequeue); + } + return n; + }, Dt.removeFromQueue = function(t) { + var e = this, r = e.getElementQueue(), a = e.getElementKeyToQueue(), n = this.getKey(t), i = a[n]; + i != null && (i.eles.length === 1 ? (i.reqs = ai, r.updateItem(i), r.pop(), a[n] = null) : i.eles.unmerge(t)); + }, Dt.onDequeue = function(t) { + this.onDequeues.push(t); + }, Dt.offDequeue = function(t) { + wr(this.onDequeues, t); + }, Dt.setupDequeueing = vu.setupDequeueing({ + deqRedrawThreshold: Og, + deqCost: Dg, + deqAvgCost: Sg, + deqNoDrawCost: Lg, + deqFastCost: Ag, + deq: function(e, r, a) { + return e.dequeue(r, a); + }, + onDeqd: function(e, r) { + for (var a = 0; a < e.onDequeues.length; a++) { + var n = e.onDequeues[a]; + n(r); + } + }, + shouldRedraw: function(e, r, a, n) { + for (var i = 0; i < r.length; i++) + for (var s = r[i].eles, o = 0; o < s.length; o++) { + var l = s[o].boundingBox(); + if (li(l, n)) + return !0; + } + return !1; + }, + priority: function(e) { + return e.renderer.beforeRenderPriorities.eleTxrDeq; + } + }); + var Ig = 1, en = -4, Zn = 2, Rg = 3.99, kg = 50, Pg = 50, Bg = 0.15, Fg = 0.1, zg = 0.9, Gg = 0.9, $g = 1, gu = 250, Vg = 4e3 * 4e3, _g = !0, pu = function(e) { + var r = this, a = r.renderer = e, n = a.cy; + r.layersByLevel = {}, r.firstGet = !0, r.lastInvalidationTime = dr() - 2 * gu, r.skipping = !1, r.eleTxrDeqs = n.collection(), r.scheduleElementRefinement = ln(function() { + r.refineElementTextures(r.eleTxrDeqs), r.eleTxrDeqs.unmerge(r.eleTxrDeqs); + }, Pg), a.beforeRender(function(s, o) { + o - r.lastInvalidationTime <= gu ? r.skipping = !0 : r.skipping = !1; + }, a.beforeRenderPriorities.lyrTxrSkip); + var i = function(o, l) { + return l.reqs - o.reqs; + }; + r.layersQueue = new Ra(i), r.setupDequeueing(); + }, Mt = pu.prototype, yu = 0, Ug = Math.pow(2, 53) - 1; + Mt.makeLayer = function(t, e) { + var r = Math.pow(2, e), a = Math.ceil(t.w * r), n = Math.ceil(t.h * r), i = this.renderer.makeOffscreenCanvas(a, n), s = { + id: yu = ++yu % Ug, + bb: t, + level: e, + width: a, + height: n, + canvas: i, + context: i.getContext("2d"), + eles: [], + elesQueue: [], + reqs: 0 + }, o = s.context, l = -s.bb.x1, u = -s.bb.y1; + return o.scale(r, r), o.translate(l, u), s; + }, Mt.getLayers = function(t, e, r) { + var a = this, n = a.renderer, i = n.cy, s = i.zoom(), o = a.firstGet; + if (a.firstGet = !1, r == null) { + if (r = Math.ceil(oi(s * e)), r < en) + r = en; + else if (s >= Rg || r > Zn) + return null; + } + a.validateLayersElesOrdering(r, t); + var l = a.layersByLevel, u = Math.pow(2, r), f = l[r] = l[r] || [], h, c = a.levelIsComplete(r, t), v, d = function() { + var B = function(re) { + if (a.validateLayersElesOrdering(re, t), a.levelIsComplete(re, t)) + return v = l[re], !0; + }, F = function(re) { + if (!v) + for (var W = r + re; en <= W && W <= Zn && !B(W); W += re) + ; + }; + F(1), F(-1); + for (var R = f.length - 1; R >= 0; R--) { + var X = f[R]; + X.invalid && wr(f, X); + } + }; + if (!c) + d(); + else + return f; + var g = function() { + if (!h) { + h = Ut(); + for (var B = 0; B < t.length; B++) + Sf(h, t[B].boundingBox()); + } + return h; + }, y = function(B) { + B = B || {}; + var F = B.after; + g(); + var R = h.w * u * (h.h * u); + if (R > Vg) + return null; + var X = a.makeLayer(h, r); + if (F != null) { + var z = f.indexOf(F) + 1; + f.splice(z, 0, X); + } else + (B.insert === void 0 || B.insert) && f.unshift(X); + return X; + }; + if (a.skipping && !o) + return null; + for (var p = null, m = t.length / Ig, b = !o, E = 0; E < t.length; E++) { + var M = t[E], A = M._private.rscratch, w = A.imgLayerCaches = A.imgLayerCaches || {}, I = w[r]; + if (I) { + p = I; + continue; + } + if ((!p || p.eles.length >= m || !Es(p.bb, M.boundingBox())) && (p = y({ + insert: !0, + after: p + }), !p)) + return null; + v || b ? a.queueLayer(p, M) : a.drawEleInLayer(p, M, r, e), p.eles.push(M), w[r] = p; + } + return v || (b ? null : f); + }, Mt.getEleLevelForLayerLevel = function(t, e) { + return t; + }, Mt.drawEleInLayer = function(t, e, r, a) { + var n = this, i = this.renderer, s = t.context, o = e.boundingBox(); + o.w === 0 || o.h === 0 || !e.visible() || (r = n.getEleLevelForLayerLevel(r, a), i.setImgSmoothing(s, !1), i.drawCachedElement(s, e, null, null, r, _g), i.setImgSmoothing(s, !0)); + }, Mt.levelIsComplete = function(t, e) { + var r = this, a = r.layersByLevel[t]; + if (!a || a.length === 0) + return !1; + for (var n = 0, i = 0; i < a.length; i++) { + var s = a[i]; + if (s.reqs > 0 || s.invalid) + return !1; + n += s.eles.length; + } + return n === e.length; + }, Mt.validateLayersElesOrdering = function(t, e) { + var r = this.layersByLevel[t]; + if (r) + for (var a = 0; a < r.length; a++) { + for (var n = r[a], i = -1, s = 0; s < e.length; s++) + if (n.eles[0] === e[s]) { + i = s; + break; + } + if (i < 0) { + this.invalidateLayer(n); + continue; + } + for (var o = i, s = 0; s < n.eles.length; s++) + if (n.eles[s] !== e[o + s]) { + this.invalidateLayer(n); + break; + } + } + }, Mt.updateElementsInLayers = function(t, e) { + for (var r = this, a = Ae(t[0]), n = 0; n < t.length; n++) + for (var i = a ? null : t[n], s = a ? t[n] : t[n].ele, o = s._private.rscratch, l = o.imgLayerCaches = o.imgLayerCaches || {}, u = en; u <= Zn; u++) { + var f = l[u]; + f && (i && r.getEleLevelForLayerLevel(f.level) !== i.level || e(f, s, i)); + } + }, Mt.haveLayers = function() { + for (var t = this, e = !1, r = en; r <= Zn; r++) { + var a = t.layersByLevel[r]; + if (a && a.length > 0) { + e = !0; + break; + } + } + return e; + }, Mt.invalidateElements = function(t) { + var e = this; + t.length !== 0 && (e.lastInvalidationTime = dr(), !(t.length === 0 || !e.haveLayers()) && e.updateElementsInLayers(t, function(a, n, i) { + e.invalidateLayer(a); + })); + }, Mt.invalidateLayer = function(t) { + if (this.lastInvalidationTime = dr(), !t.invalid) { + var e = t.level, r = t.eles, a = this.layersByLevel[e]; + wr(a, t), t.elesQueue = [], t.invalid = !0, t.replacement && (t.replacement.invalid = !0); + for (var n = 0; n < r.length; n++) { + var i = r[n]._private.rscratch.imgLayerCaches; + i && (i[e] = null); + } + } + }, Mt.refineElementTextures = function(t) { + var e = this; + e.updateElementsInLayers(t, function(a, n, i) { + var s = a.replacement; + if (s || (s = a.replacement = e.makeLayer(a.bb, a.level), s.replaces = a, s.eles = a.eles), !s.reqs) + for (var o = 0; o < s.eles.length; o++) + e.queueLayer(s, s.eles[o]); + }); + }, Mt.enqueueElementRefinement = function(t) { + this.eleTxrDeqs.merge(t), this.scheduleElementRefinement(); + }, Mt.queueLayer = function(t, e) { + var r = this, a = r.layersQueue, n = t.elesQueue, i = n.hasId = n.hasId || {}; + if (!t.replacement) { + if (e) { + if (i[e.id()]) + return; + n.push(e), i[e.id()] = !0; + } + t.reqs ? (t.reqs++, a.updateItem(t)) : (t.reqs = 1, a.push(t)); + } + }, Mt.dequeue = function(t) { + for (var e = this, r = e.layersQueue, a = [], n = 0; n < $g && r.size() !== 0; ) { + var i = r.peek(); + if (i.replacement) { + r.pop(); + continue; + } + if (i.replaces && i !== i.replaces.replacement) { + r.pop(); + continue; + } + if (i.invalid) { + r.pop(); + continue; + } + var s = i.elesQueue.shift(); + s && (e.drawEleInLayer(i, s, i.level, t), n++), a.length === 0 && a.push(!0), i.elesQueue.length === 0 && (r.pop(), i.reqs = 0, i.replaces && e.applyLayerReplacement(i), e.requestRedraw()); + } + return a; + }, Mt.applyLayerReplacement = function(t) { + var e = this, r = e.layersByLevel[t.level], a = t.replaces, n = r.indexOf(a); + if (!(n < 0 || a.invalid)) { + r[n] = t; + for (var i = 0; i < t.eles.length; i++) { + var s = t.eles[i]._private, o = s.imgLayerCaches = s.imgLayerCaches || {}; + o && (o[t.level] = t); + } + e.requestRedraw(); + } + }, Mt.requestRedraw = ln(function() { + var t = this.renderer; + t.redrawHint("eles", !0), t.redrawHint("drag", !0), t.redraw(); + }, 100), Mt.setupDequeueing = vu.setupDequeueing({ + deqRedrawThreshold: kg, + deqCost: Bg, + deqAvgCost: Fg, + deqNoDrawCost: zg, + deqFastCost: Gg, + deq: function(e, r) { + return e.dequeue(r); + }, + onDeqd: ni, + shouldRedraw: hs, + priority: function(e) { + return e.renderer.beforeRenderPriorities.lyrTxrDeq; + } + }); + var mu = {}, bu; + function Yg(t, e) { + for (var r = 0; r < e.length; r++) { + var a = e[r]; + t.lineTo(a.x, a.y); + } + } + function Hg(t, e, r) { + for (var a, n = 0; n < e.length; n++) { + var i = e[n]; + n === 0 && (a = i), t.lineTo(i.x, i.y); + } + t.quadraticCurveTo(r.x, r.y, a.x, a.y); + } + function Eu(t, e, r) { + t.beginPath && t.beginPath(); + for (var a = e, n = 0; n < a.length; n++) { + var i = a[n]; + t.lineTo(i.x, i.y); + } + var s = r, o = r[0]; + t.moveTo(o.x, o.y); + for (var n = 1; n < s.length; n++) { + var i = s[n]; + t.lineTo(i.x, i.y); + } + t.closePath && t.closePath(); + } + function Xg(t, e, r, a, n) { + t.beginPath && t.beginPath(), t.arc(r, a, n, 0, Math.PI * 2, !1); + var i = e, s = i[0]; + t.moveTo(s.x, s.y); + for (var o = 0; o < i.length; o++) { + var l = i[o]; + t.lineTo(l.x, l.y); + } + t.closePath && t.closePath(); + } + function qg(t, e, r, a) { + t.arc(e, r, a, 0, Math.PI * 2, !1); + } + mu.arrowShapeImpl = function(t) { + return (bu || (bu = { + polygon: Yg, + "triangle-backcurve": Hg, + "triangle-tee": Eu, + "circle-triangle": Xg, + "triangle-cross": Eu, + circle: qg + }))[t]; + }; + var hr = {}; + hr.drawElement = function(t, e, r, a, n, i) { + var s = this; + e.isNode() ? s.drawNode(t, e, r, a, n, i) : s.drawEdge(t, e, r, a, n, i); + }, hr.drawElementOverlay = function(t, e) { + var r = this; + e.isNode() ? r.drawNodeOverlay(t, e) : r.drawEdgeOverlay(t, e); + }, hr.drawElementUnderlay = function(t, e) { + var r = this; + e.isNode() ? r.drawNodeUnderlay(t, e) : r.drawEdgeUnderlay(t, e); + }, hr.drawCachedElementPortion = function(t, e, r, a, n, i, s, o) { + var l = this, u = r.getBoundingBox(e); + if (!(u.w === 0 || u.h === 0)) { + var f = r.getElement(e, u, a, n, i); + if (f != null) { + var h = o(l, e); + if (h === 0) + return; + var c = s(l, e), v = u.x1, d = u.y1, g = u.w, y = u.h, p, m, b, E, M; + if (c !== 0) { + var A = r.getRotationPoint(e); + b = A.x, E = A.y, t.translate(b, E), t.rotate(c), M = l.getImgSmoothing(t), M || l.setImgSmoothing(t, !0); + var w = r.getRotationOffset(e); + p = w.x, m = w.y; + } else + p = v, m = d; + var I; + h !== 1 && (I = t.globalAlpha, t.globalAlpha = I * h), t.drawImage(f.texture.canvas, f.x, 0, f.width, f.height, p, m, g, y), h !== 1 && (t.globalAlpha = I), c !== 0 && (t.rotate(-c), t.translate(-b, -E), M || l.setImgSmoothing(t, !1)); + } else + r.drawElement(t, e); + } + }; + var Wg = function() { + return 0; + }, Kg = function(e, r) { + return e.getTextAngle(r, null); + }, Zg = function(e, r) { + return e.getTextAngle(r, "source"); + }, Qg = function(e, r) { + return e.getTextAngle(r, "target"); + }, Jg = function(e, r) { + return r.effectiveOpacity(); + }, $i = function(e, r) { + return r.pstyle("text-opacity").pfValue * r.effectiveOpacity(); + }; + hr.drawCachedElement = function(t, e, r, a, n, i) { + var s = this, o = s.data, l = o.eleTxrCache, u = o.lblTxrCache, f = o.slbTxrCache, h = o.tlbTxrCache, c = e.boundingBox(), v = i === !0 ? l.reasons.highQuality : null; + if (!(c.w === 0 || c.h === 0 || !e.visible()) && (!a || li(c, a))) { + var d = e.isEdge(), g = e.element()._private.rscratch.badLine; + s.drawElementUnderlay(t, e), s.drawCachedElementPortion(t, e, l, r, n, v, Wg, Jg), (!d || !g) && s.drawCachedElementPortion(t, e, u, r, n, v, Kg, $i), d && !g && (s.drawCachedElementPortion(t, e, f, r, n, v, Zg, $i), s.drawCachedElementPortion(t, e, h, r, n, v, Qg, $i)), s.drawElementOverlay(t, e); + } + }, hr.drawElements = function(t, e) { + for (var r = this, a = 0; a < e.length; a++) { + var n = e[a]; + r.drawElement(t, n); + } + }, hr.drawCachedElements = function(t, e, r, a) { + for (var n = this, i = 0; i < e.length; i++) { + var s = e[i]; + n.drawCachedElement(t, s, r, a); + } + }, hr.drawCachedNodes = function(t, e, r, a) { + for (var n = this, i = 0; i < e.length; i++) { + var s = e[i]; + s.isNode() && n.drawCachedElement(t, s, r, a); + } + }, hr.drawLayeredElements = function(t, e, r, a) { + var n = this, i = n.data.lyrTxrCache.getLayers(e, r); + if (i) + for (var s = 0; s < i.length; s++) { + var o = i[s], l = o.bb; + l.w === 0 || l.h === 0 || t.drawImage(o.canvas, l.x1, l.y1, l.w, l.h); + } + else + n.drawCachedElements(t, e, r, a); + }; + var mr = {}; + mr.drawEdge = function(t, e, r) { + var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, s = this, o = e._private.rscratch; + if (!(i && !e.visible()) && !(o.badLine || o.allpts == null || isNaN(o.allpts[0]))) { + var l; + r && (l = r, t.translate(-l.x1, -l.y1)); + var u = i ? e.pstyle("opacity").value : 1, f = i ? e.pstyle("line-opacity").value : 1, h = e.pstyle("curve-style").value, c = e.pstyle("line-style").value, v = e.pstyle("width").pfValue, d = e.pstyle("line-cap").value, g = u * f, y = u * f, p = function() { + var R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : g; + h === "straight-triangle" ? (s.eleStrokeStyle(t, e, R), s.drawEdgeTrianglePath(e, t, o.allpts)) : (t.lineWidth = v, t.lineCap = d, s.eleStrokeStyle(t, e, R), s.drawEdgePath(e, t, o.allpts, c), t.lineCap = "butt"); + }, m = function() { + n && s.drawEdgeOverlay(t, e); + }, b = function() { + n && s.drawEdgeUnderlay(t, e); + }, E = function() { + var R = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : y; + s.drawArrowheads(t, e, R); + }, M = function() { + s.drawElementText(t, e, null, a); + }; + t.lineJoin = "round"; + var A = e.pstyle("ghost").value === "yes"; + if (A) { + var w = e.pstyle("ghost-offset-x").pfValue, I = e.pstyle("ghost-offset-y").pfValue, C = e.pstyle("ghost-opacity").value, B = g * C; + t.translate(w, I), p(B), E(B), t.translate(-w, -I); + } + b(), p(), E(), m(), M(), r && t.translate(l.x1, l.y1); + } + }; + var wu = function(e) { + if (!["overlay", "underlay"].includes(e)) + throw new Error("Invalid state"); + return function(r, a) { + if (a.visible()) { + var n = a.pstyle("".concat(e, "-opacity")).value; + if (n !== 0) { + var i = this, s = i.usePaths(), o = a._private.rscratch, l = a.pstyle("".concat(e, "-padding")).pfValue, u = 2 * l, f = a.pstyle("".concat(e, "-color")).value; + r.lineWidth = u, o.edgeType === "self" && !s ? r.lineCap = "butt" : r.lineCap = "round", i.colorStrokeStyle(r, f[0], f[1], f[2], n), i.drawEdgePath(a, r, o.allpts, "solid"); + } + } + }; + }; + mr.drawEdgeOverlay = wu("overlay"), mr.drawEdgeUnderlay = wu("underlay"), mr.drawEdgePath = function(t, e, r, a) { + var n = t._private.rscratch, i = e, s, o = !1, l = this.usePaths(), u = t.pstyle("line-dash-pattern").pfValue, f = t.pstyle("line-dash-offset").pfValue; + if (l) { + var h = r.join("$"), c = n.pathCacheKey && n.pathCacheKey === h; + c ? (s = e = n.pathCache, o = !0) : (s = e = new Path2D(), n.pathCacheKey = h, n.pathCache = s); + } + if (i.setLineDash) + switch (a) { + case "dotted": + i.setLineDash([1, 1]); + break; + case "dashed": + i.setLineDash(u), i.lineDashOffset = f; + break; + case "solid": + i.setLineDash([]); + break; + } + if (!o && !n.badLine) + switch (e.beginPath && e.beginPath(), e.moveTo(r[0], r[1]), n.edgeType) { + case "bezier": + case "self": + case "compound": + case "multibezier": + for (var v = 2; v + 3 < r.length; v += 4) + e.quadraticCurveTo(r[v], r[v + 1], r[v + 2], r[v + 3]); + break; + case "straight": + case "segments": + case "haystack": + for (var d = 2; d + 1 < r.length; d += 2) + e.lineTo(r[d], r[d + 1]); + break; + } + e = i, l ? e.stroke(s) : e.stroke(), e.setLineDash && e.setLineDash([]); + }, mr.drawEdgeTrianglePath = function(t, e, r) { + e.fillStyle = e.strokeStyle; + for (var a = t.pstyle("width").pfValue, n = 0; n + 1 < r.length; n += 2) { + var i = [r[n + 2] - r[n], r[n + 3] - r[n + 1]], s = Math.sqrt(i[0] * i[0] + i[1] * i[1]), o = [i[1] / s, -i[0] / s], l = [o[0] * a / 2, o[1] * a / 2]; + e.beginPath(), e.moveTo(r[n] - l[0], r[n + 1] - l[1]), e.lineTo(r[n] + l[0], r[n + 1] + l[1]), e.lineTo(r[n + 2], r[n + 3]), e.closePath(), e.fill(); + } + }, mr.drawArrowheads = function(t, e, r) { + var a = e._private.rscratch, n = a.edgeType === "haystack"; + n || this.drawArrowhead(t, e, "source", a.arrowStartX, a.arrowStartY, a.srcArrowAngle, r), this.drawArrowhead(t, e, "mid-target", a.midX, a.midY, a.midtgtArrowAngle, r), this.drawArrowhead(t, e, "mid-source", a.midX, a.midY, a.midsrcArrowAngle, r), n || this.drawArrowhead(t, e, "target", a.arrowEndX, a.arrowEndY, a.tgtArrowAngle, r); + }, mr.drawArrowhead = function(t, e, r, a, n, i, s) { + if (!(isNaN(a) || a == null || isNaN(n) || n == null || isNaN(i) || i == null)) { + var o = this, l = e.pstyle(r + "-arrow-shape").value; + if (l !== "none") { + var u = e.pstyle(r + "-arrow-fill").value === "hollow" ? "both" : "filled", f = e.pstyle(r + "-arrow-fill").value, h = e.pstyle("width").pfValue, c = e.pstyle("opacity").value; + s === void 0 && (s = c); + var v = t.globalCompositeOperation; + (s !== 1 || f === "hollow") && (t.globalCompositeOperation = "destination-out", o.colorFillStyle(t, 255, 255, 255, 1), o.colorStrokeStyle(t, 255, 255, 255, 1), o.drawArrowShape(e, t, u, h, l, a, n, i), t.globalCompositeOperation = v); + var d = e.pstyle(r + "-arrow-color").value; + o.colorFillStyle(t, d[0], d[1], d[2], s), o.colorStrokeStyle(t, d[0], d[1], d[2], s), o.drawArrowShape(e, t, f, h, l, a, n, i); + } + } + }, mr.drawArrowShape = function(t, e, r, a, n, i, s, o) { + var l = this, u = this.usePaths() && n !== "triangle-cross", f = !1, h, c = e, v = { + x: i, + y: s + }, d = t.pstyle("arrow-scale").value, g = this.getArrowWidth(a, d), y = l.arrowShapes[n]; + if (u) { + var p = l.arrowPathCache = l.arrowPathCache || [], m = kr(n), b = p[m]; + b != null ? (h = e = b, f = !0) : (h = e = new Path2D(), p[m] = h); + } + f || (e.beginPath && e.beginPath(), u ? y.draw(e, 1, 0, { + x: 0, + y: 0 + }, 1) : y.draw(e, g, o, v, a), e.closePath && e.closePath()), e = c, u && (e.translate(i, s), e.rotate(o), e.scale(g, g)), (r === "filled" || r === "both") && (u ? e.fill(h) : e.fill()), (r === "hollow" || r === "both") && (e.lineWidth = (y.matchEdgeWidth ? a : 1) / (u ? g : 1), e.lineJoin = "miter", u ? e.stroke(h) : e.stroke()), u && (e.scale(1 / g, 1 / g), e.rotate(-o), e.translate(-i, -s)); + }; + var Vi = {}; + Vi.safeDrawImage = function(t, e, r, a, n, i, s, o, l, u) { + if (!(n <= 0 || i <= 0 || l <= 0 || u <= 0)) + try { + t.drawImage(e, r, a, n, i, s, o, l, u); + } catch (f) { + ft(f); + } + }, Vi.drawInscribedImage = function(t, e, r, a, n) { + var i = this, s = r.position(), o = s.x, l = s.y, u = r.cy().style(), f = u.getIndexedStyle.bind(u), h = f(r, "background-fit", "value", a), c = f(r, "background-repeat", "value", a), v = r.width(), d = r.height(), g = r.padding() * 2, y = v + (f(r, "background-width-relative-to", "value", a) === "inner" ? 0 : g), p = d + (f(r, "background-height-relative-to", "value", a) === "inner" ? 0 : g), m = r._private.rscratch, b = f(r, "background-clip", "value", a), E = b === "node", M = f(r, "background-image-opacity", "value", a) * n, A = f(r, "background-image-smoothing", "value", a), w = e.width || e.cachedW, I = e.height || e.cachedH; + (w == null || I == null) && (document.body.appendChild(e), w = e.cachedW = e.width || e.offsetWidth, I = e.cachedH = e.height || e.offsetHeight, document.body.removeChild(e)); + var C = w, B = I; + if (f(r, "background-width", "value", a) !== "auto" && (f(r, "background-width", "units", a) === "%" ? C = f(r, "background-width", "pfValue", a) * y : C = f(r, "background-width", "pfValue", a)), f(r, "background-height", "value", a) !== "auto" && (f(r, "background-height", "units", a) === "%" ? B = f(r, "background-height", "pfValue", a) * p : B = f(r, "background-height", "pfValue", a)), !(C === 0 || B === 0)) { + if (h === "contain") { + var F = Math.min(y / C, p / B); + C *= F, B *= F; + } else if (h === "cover") { + var F = Math.max(y / C, p / B); + C *= F, B *= F; + } + var R = o - y / 2, X = f(r, "background-position-x", "units", a), z = f(r, "background-position-x", "pfValue", a); + X === "%" ? R += (y - C) * z : R += z; + var re = f(r, "background-offset-x", "units", a), W = f(r, "background-offset-x", "pfValue", a); + re === "%" ? R += (y - C) * W : R += W; + var Z = l - p / 2, ie = f(r, "background-position-y", "units", a), oe = f(r, "background-position-y", "pfValue", a); + ie === "%" ? Z += (p - B) * oe : Z += oe; + var de = f(r, "background-offset-y", "units", a), se = f(r, "background-offset-y", "pfValue", a); + de === "%" ? Z += (p - B) * se : Z += se, m.pathCache && (R -= o, Z -= l, o = 0, l = 0); + var ve = t.globalAlpha; + t.globalAlpha = M; + var we = i.getImgSmoothing(t), Te = !1; + if (A === "no" && we ? (i.setImgSmoothing(t, !1), Te = !0) : A === "yes" && !we && (i.setImgSmoothing(t, !0), Te = !0), c === "no-repeat") + E && (t.save(), m.pathCache ? t.clip(m.pathCache) : (i.nodeShapes[i.getNodeShape(r)].draw(t, o, l, y, p), t.clip())), i.safeDrawImage(t, e, 0, 0, w, I, R, Z, C, B), E && t.restore(); + else { + var Ee = t.createPattern(e, c); + t.fillStyle = Ee, i.nodeShapes[i.getNodeShape(r)].draw(t, o, l, y, p), t.translate(R, Z), t.fill(), t.translate(-R, -Z); + } + t.globalAlpha = ve, Te && i.setImgSmoothing(t, we); + } + }; + var _r = {}; + _r.eleTextBiggerThanMin = function(t, e) { + if (!e) { + var r = t.cy().zoom(), a = this.getPixelRatio(), n = Math.ceil(oi(r * a)); + e = Math.pow(2, n); + } + var i = t.pstyle("font-size").pfValue * e, s = t.pstyle("min-zoomed-font-size").pfValue; + return !(i < s); + }, _r.drawElementText = function(t, e, r, a, n) { + var i = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, s = this; + if (a == null) { + if (i && !s.eleTextBiggerThanMin(e)) + return; + } else if (a === !1) + return; + if (e.isNode()) { + var o = e.pstyle("label"); + if (!o || !o.value) + return; + var l = s.getLabelJustification(e); + t.textAlign = l, t.textBaseline = "bottom"; + } else { + var u = e.element()._private.rscratch.badLine, f = e.pstyle("label"), h = e.pstyle("source-label"), c = e.pstyle("target-label"); + if (u || (!f || !f.value) && (!h || !h.value) && (!c || !c.value)) + return; + t.textAlign = "center", t.textBaseline = "bottom"; + } + var v = !r, d; + r && (d = r, t.translate(-d.x1, -d.y1)), n == null ? (s.drawText(t, e, null, v, i), e.isEdge() && (s.drawText(t, e, "source", v, i), s.drawText(t, e, "target", v, i))) : s.drawText(t, e, n, v, i), r && t.translate(d.x1, d.y1); + }, _r.getFontCache = function(t) { + var e; + this.fontCaches = this.fontCaches || []; + for (var r = 0; r < this.fontCaches.length; r++) + if (e = this.fontCaches[r], e.context === t) + return e; + return e = { + context: t + }, this.fontCaches.push(e), e; + }, _r.setupTextStyle = function(t, e) { + var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, a = e.pstyle("font-style").strValue, n = e.pstyle("font-size").pfValue + "px", i = e.pstyle("font-family").strValue, s = e.pstyle("font-weight").strValue, o = r ? e.effectiveOpacity() * e.pstyle("text-opacity").value : 1, l = e.pstyle("text-outline-opacity").value * o, u = e.pstyle("color").value, f = e.pstyle("text-outline-color").value; + t.font = a + " " + s + " " + n + " " + i, t.lineJoin = "round", this.colorFillStyle(t, u[0], u[1], u[2], o), this.colorStrokeStyle(t, f[0], f[1], f[2], l); + }; + function jg(t, e, r, a, n) { + var i = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5; + t.beginPath(), t.moveTo(e + i, r), t.lineTo(e + a - i, r), t.quadraticCurveTo(e + a, r, e + a, r + i), t.lineTo(e + a, r + n - i), t.quadraticCurveTo(e + a, r + n, e + a - i, r + n), t.lineTo(e + i, r + n), t.quadraticCurveTo(e, r + n, e, r + n - i), t.lineTo(e, r + i), t.quadraticCurveTo(e, r, e + i, r), t.closePath(), t.fill(); + } + _r.getTextAngle = function(t, e) { + var r, a = t._private, n = a.rscratch, i = e ? e + "-" : "", s = t.pstyle(i + "text-rotation"), o = er(n, "labelAngle", e); + return s.strValue === "autorotate" ? r = t.isEdge() ? o : 0 : s.strValue === "none" ? r = 0 : r = s.pfValue, r; + }, _r.drawText = function(t, e, r) { + var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = e._private, s = i.rscratch, o = n ? e.effectiveOpacity() : 1; + if (!(n && (o === 0 || e.pstyle("text-opacity").value === 0))) { + r === "main" && (r = null); + var l = er(s, "labelX", r), u = er(s, "labelY", r), f, h, c = this.getLabelText(e, r); + if (c != null && c !== "" && !isNaN(l) && !isNaN(u)) { + this.setupTextStyle(t, e, n); + var v = r ? r + "-" : "", d = er(s, "labelWidth", r), g = er(s, "labelHeight", r), y = e.pstyle(v + "text-margin-x").pfValue, p = e.pstyle(v + "text-margin-y").pfValue, m = e.isEdge(), b = e.pstyle("text-halign").value, E = e.pstyle("text-valign").value; + m && (b = "center", E = "center"), l += y, u += p; + var M; + switch (a ? M = this.getTextAngle(e, r) : M = 0, M !== 0 && (f = l, h = u, t.translate(f, h), t.rotate(M), l = 0, u = 0), E) { + case "top": + break; + case "center": + u += g / 2; + break; + case "bottom": + u += g; + break; + } + var A = e.pstyle("text-background-opacity").value, w = e.pstyle("text-border-opacity").value, I = e.pstyle("text-border-width").pfValue, C = e.pstyle("text-background-padding").pfValue; + if (A > 0 || I > 0 && w > 0) { + var B = l - C; + switch (b) { + case "left": + B -= d; + break; + case "center": + B -= d / 2; + break; + } + var F = u - g - C, R = d + 2 * C, X = g + 2 * C; + if (A > 0) { + var z = t.fillStyle, re = e.pstyle("text-background-color").value; + t.fillStyle = "rgba(" + re[0] + "," + re[1] + "," + re[2] + "," + A * o + ")"; + var W = e.pstyle("text-background-shape").strValue; + W.indexOf("round") === 0 ? jg(t, B, F, R, X, 2) : t.fillRect(B, F, R, X), t.fillStyle = z; + } + if (I > 0 && w > 0) { + var Z = t.strokeStyle, ie = t.lineWidth, oe = e.pstyle("text-border-color").value, de = e.pstyle("text-border-style").value; + if (t.strokeStyle = "rgba(" + oe[0] + "," + oe[1] + "," + oe[2] + "," + w * o + ")", t.lineWidth = I, t.setLineDash) + switch (de) { + case "dotted": + t.setLineDash([1, 1]); + break; + case "dashed": + t.setLineDash([4, 2]); + break; + case "double": + t.lineWidth = I / 4, t.setLineDash([]); + break; + case "solid": + t.setLineDash([]); + break; + } + if (t.strokeRect(B, F, R, X), de === "double") { + var se = I / 2; + t.strokeRect(B + se, F + se, R - se * 2, X - se * 2); + } + t.setLineDash && t.setLineDash([]), t.lineWidth = ie, t.strokeStyle = Z; + } + } + var ve = 2 * e.pstyle("text-outline-width").pfValue; + if (ve > 0 && (t.lineWidth = ve), e.pstyle("text-wrap").value === "wrap") { + var we = er(s, "labelWrapCachedLines", r), Te = er(s, "labelLineHeight", r), Ee = d / 2, ye = this.getLabelJustification(e); + switch (ye === "auto" || (b === "left" ? ye === "left" ? l += -d : ye === "center" && (l += -Ee) : b === "center" ? ye === "left" ? l += -Ee : ye === "right" && (l += Ee) : b === "right" && (ye === "center" ? l += Ee : ye === "right" && (l += d))), E) { + case "top": + u -= (we.length - 1) * Te; + break; + case "center": + case "bottom": + u -= (we.length - 1) * Te; + break; + } + for (var ae = 0; ae < we.length; ae++) + ve > 0 && t.strokeText(we[ae], l, u), t.fillText(we[ae], l, u), u += Te; + } else + ve > 0 && t.strokeText(c, l, u), t.fillText(c, l, u); + M !== 0 && (t.rotate(-M), t.translate(-f, -h)); + } + } + }; + var Ea = {}; + Ea.drawNode = function(t, e, r) { + var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0, s = this, o, l, u = e._private, f = u.rscratch, h = e.position(); + if (!(!k(h.x) || !k(h.y)) && !(i && !e.visible())) { + var c = i ? e.effectiveOpacity() : 1, v = s.usePaths(), d, g = !1, y = e.padding(); + o = e.width() + 2 * y, l = e.height() + 2 * y; + var p; + r && (p = r, t.translate(-p.x1, -p.y1)); + for (var m = e.pstyle("background-image"), b = m.value, E = new Array(b.length), M = new Array(b.length), A = 0, w = 0; w < b.length; w++) { + var I = b[w], C = E[w] = I != null && I !== "none"; + if (C) { + var B = e.cy().style().getIndexedStyle(e, "background-image-crossorigin", "value", w); + A++, M[w] = s.getCachedImage(I, B, function() { + u.backgroundTimestamp = Date.now(), e.emitAndNotify("background"); + }); + } + } + var F = e.pstyle("background-blacken").value, R = e.pstyle("border-width").pfValue, X = e.pstyle("background-opacity").value * c, z = e.pstyle("border-color").value, re = e.pstyle("border-style").value, W = e.pstyle("border-opacity").value * c; + t.lineJoin = "miter"; + var Z = function() { + var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : X; + s.eleFillStyle(t, e, ke); + }, ie = function() { + var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : W; + s.colorStrokeStyle(t, z[0], z[1], z[2], ke); + }, oe = e.pstyle("shape").strValue, de = e.pstyle("shape-polygon-points").pfValue; + if (v) { + t.translate(h.x, h.y); + var se = s.nodePathCache = s.nodePathCache || [], ve = ls(oe === "polygon" ? oe + "," + de.join(",") : oe, "" + l, "" + o), we = se[ve]; + we != null ? (d = we, g = !0, f.pathCache = d) : (d = new Path2D(), se[ve] = f.pathCache = d); + } + var Te = function() { + if (!g) { + var ke = h; + v && (ke = { + x: 0, + y: 0 + }), s.nodeShapes[s.getNodeShape(e)].draw(d || t, ke.x, ke.y, o, l); + } + v ? t.fill(d) : t.fill(); + }, Ee = function() { + for (var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : c, Ge = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, et = u.backgrounding, We = 0, Ye = 0; Ye < M.length; Ye++) { + var Se = e.cy().style().getIndexedStyle(e, "background-image-containment", "value", Ye); + if (Ge && Se === "over" || !Ge && Se === "inside") { + We++; + continue; + } + E[Ye] && M[Ye].complete && !M[Ye].error && (We++, s.drawInscribedImage(t, M[Ye], e, Ye, ke)); + } + u.backgrounding = We !== A, et !== u.backgrounding && e.updateStyle(!1); + }, ye = function() { + var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, Ge = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : c; + s.hasPie(e) && (s.drawPie(t, e, Ge), ke && (v || s.nodeShapes[s.getNodeShape(e)].draw(t, h.x, h.y, o, l))); + }, ae = function() { + var ke = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : c, Ge = (F > 0 ? F : -F) * ke, et = F > 0 ? 0 : 255; + F !== 0 && (s.colorFillStyle(t, et, et, et, Ge), v ? t.fill(d) : t.fill()); + }, xe = function() { + if (R > 0) { + if (t.lineWidth = R, t.lineCap = "butt", t.setLineDash) + switch (re) { + case "dotted": + t.setLineDash([1, 1]); + break; + case "dashed": + t.setLineDash([4, 2]); + break; + case "solid": + case "double": + t.setLineDash([]); + break; + } + if (v ? t.stroke(d) : t.stroke(), re === "double") { + t.lineWidth = R / 3; + var ke = t.globalCompositeOperation; + t.globalCompositeOperation = "destination-out", v ? t.stroke(d) : t.stroke(), t.globalCompositeOperation = ke; + } + t.setLineDash && t.setLineDash([]); + } + }, Ce = function() { + n && s.drawNodeOverlay(t, e, h, o, l); + }, Oe = function() { + n && s.drawNodeUnderlay(t, e, h, o, l); + }, Ie = function() { + s.drawElementText(t, e, null, a); + }, He = e.pstyle("ghost").value === "yes"; + if (He) { + var qe = e.pstyle("ghost-offset-x").pfValue, Re = e.pstyle("ghost-offset-y").pfValue, Me = e.pstyle("ghost-opacity").value, Ve = Me * c; + t.translate(qe, Re), Z(Me * X), Te(), Ee(Ve, !0), ie(Me * W), xe(), ye(F !== 0 || R !== 0), Ee(Ve, !1), ae(Ve), t.translate(-qe, -Re); + } + v && t.translate(-h.x, -h.y), Oe(), v && t.translate(h.x, h.y), Z(), Te(), Ee(c, !0), ie(), xe(), ye(F !== 0 || R !== 0), Ee(c, !1), ae(), v && t.translate(-h.x, -h.y), Ie(), Ce(), r && t.translate(p.x1, p.y1); + } + }; + var xu = function(e) { + if (!["overlay", "underlay"].includes(e)) + throw new Error("Invalid state"); + return function(r, a, n, i, s) { + var o = this; + if (a.visible()) { + var l = a.pstyle("".concat(e, "-padding")).pfValue, u = a.pstyle("".concat(e, "-opacity")).value, f = a.pstyle("".concat(e, "-color")).value, h = a.pstyle("".concat(e, "-shape")).value; + if (u > 0) { + if (n = n || a.position(), i == null || s == null) { + var c = a.padding(); + i = a.width() + 2 * c, s = a.height() + 2 * c; + } + o.colorFillStyle(r, f[0], f[1], f[2], u), o.nodeShapes[h].draw(r, n.x, n.y, i + l * 2, s + l * 2), r.fill(); + } + } + }; + }; + Ea.drawNodeOverlay = xu("overlay"), Ea.drawNodeUnderlay = xu("underlay"), Ea.hasPie = function(t) { + return t = t[0], t._private.hasPie; + }, Ea.drawPie = function(t, e, r, a) { + e = e[0], a = a || e.position(); + var n = e.cy().style(), i = e.pstyle("pie-size"), s = a.x, o = a.y, l = e.width(), u = e.height(), f = Math.min(l, u) / 2, h = 0, c = this.usePaths(); + c && (s = 0, o = 0), i.units === "%" ? f = f * i.pfValue : i.pfValue !== void 0 && (f = i.pfValue / 2); + for (var v = 1; v <= n.pieBackgroundN; v++) { + var d = e.pstyle("pie-" + v + "-background-size").value, g = e.pstyle("pie-" + v + "-background-color").value, y = e.pstyle("pie-" + v + "-background-opacity").value * r, p = d / 100; + p + h > 1 && (p = 1 - h); + var m = 1.5 * Math.PI + 2 * Math.PI * h, b = 2 * Math.PI * p, E = m + b; + d === 0 || h >= 1 || h + p > 1 || (t.beginPath(), t.moveTo(s, o), t.arc(s, o, f, m, E), t.closePath(), this.colorFillStyle(t, g[0], g[1], g[2], y), t.fill(), h += p); + } + }; + var Wt = {}, ep = 100; + Wt.getPixelRatio = function() { + var t = this.data.contexts[0]; + if (this.forcedPixelRatio != null) + return this.forcedPixelRatio; + var e = t.backingStorePixelRatio || t.webkitBackingStorePixelRatio || t.mozBackingStorePixelRatio || t.msBackingStorePixelRatio || t.oBackingStorePixelRatio || t.backingStorePixelRatio || 1; + return (window.devicePixelRatio || 1) / e; + }, Wt.paintCache = function(t) { + for (var e = this.paintCaches = this.paintCaches || [], r = !0, a, n = 0; n < e.length; n++) + if (a = e[n], a.context === t) { + r = !1; + break; + } + return r && (a = { + context: t + }, e.push(a)), a; + }, Wt.createGradientStyleFor = function(t, e, r, a, n) { + var i, s = this.usePaths(), o = r.pstyle(e + "-gradient-stop-colors").value, l = r.pstyle(e + "-gradient-stop-positions").pfValue; + if (a === "radial-gradient") + if (r.isEdge()) { + var u = r.sourceEndpoint(), f = r.targetEndpoint(), h = r.midpoint(), c = Pr(u, h), v = Pr(f, h); + i = t.createRadialGradient(h.x, h.y, 0, h.x, h.y, Math.max(c, v)); + } else { + var d = s ? { + x: 0, + y: 0 + } : r.position(), g = r.paddedWidth(), y = r.paddedHeight(); + i = t.createRadialGradient(d.x, d.y, 0, d.x, d.y, Math.max(g, y)); + } + else if (r.isEdge()) { + var p = r.sourceEndpoint(), m = r.targetEndpoint(); + i = t.createLinearGradient(p.x, p.y, m.x, m.y); + } else { + var b = s ? { + x: 0, + y: 0 + } : r.position(), E = r.paddedWidth(), M = r.paddedHeight(), A = E / 2, w = M / 2, I = r.pstyle("background-gradient-direction").value; + switch (I) { + case "to-bottom": + i = t.createLinearGradient(b.x, b.y - w, b.x, b.y + w); + break; + case "to-top": + i = t.createLinearGradient(b.x, b.y + w, b.x, b.y - w); + break; + case "to-left": + i = t.createLinearGradient(b.x + A, b.y, b.x - A, b.y); + break; + case "to-right": + i = t.createLinearGradient(b.x - A, b.y, b.x + A, b.y); + break; + case "to-bottom-right": + case "to-right-bottom": + i = t.createLinearGradient(b.x - A, b.y - w, b.x + A, b.y + w); + break; + case "to-top-right": + case "to-right-top": + i = t.createLinearGradient(b.x - A, b.y + w, b.x + A, b.y - w); + break; + case "to-bottom-left": + case "to-left-bottom": + i = t.createLinearGradient(b.x + A, b.y - w, b.x - A, b.y + w); + break; + case "to-top-left": + case "to-left-top": + i = t.createLinearGradient(b.x + A, b.y + w, b.x - A, b.y - w); + break; + } + } + if (!i) + return null; + for (var C = l.length === o.length, B = o.length, F = 0; F < B; F++) + i.addColorStop(C ? l[F] : F / (B - 1), "rgba(" + o[F][0] + "," + o[F][1] + "," + o[F][2] + "," + n + ")"); + return i; + }, Wt.gradientFillStyle = function(t, e, r, a) { + var n = this.createGradientStyleFor(t, "background", e, r, a); + if (!n) + return null; + t.fillStyle = n; + }, Wt.colorFillStyle = function(t, e, r, a, n) { + t.fillStyle = "rgba(" + e + "," + r + "," + a + "," + n + ")"; + }, Wt.eleFillStyle = function(t, e, r) { + var a = e.pstyle("background-fill").value; + if (a === "linear-gradient" || a === "radial-gradient") + this.gradientFillStyle(t, e, a, r); + else { + var n = e.pstyle("background-color").value; + this.colorFillStyle(t, n[0], n[1], n[2], r); + } + }, Wt.gradientStrokeStyle = function(t, e, r, a) { + var n = this.createGradientStyleFor(t, "line", e, r, a); + if (!n) + return null; + t.strokeStyle = n; + }, Wt.colorStrokeStyle = function(t, e, r, a, n) { + t.strokeStyle = "rgba(" + e + "," + r + "," + a + "," + n + ")"; + }, Wt.eleStrokeStyle = function(t, e, r) { + var a = e.pstyle("line-fill").value; + if (a === "linear-gradient" || a === "radial-gradient") + this.gradientStrokeStyle(t, e, a, r); + else { + var n = e.pstyle("line-color").value; + this.colorStrokeStyle(t, n[0], n[1], n[2], r); + } + }, Wt.matchCanvasSize = function(t) { + var e = this, r = e.data, a = e.findContainerClientCoords(), n = a[2], i = a[3], s = e.getPixelRatio(), o = e.motionBlurPxRatio; + (t === e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE] || t === e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG]) && (s = o); + var l = n * s, u = i * s, f; + if (!(l === e.canvasWidth && u === e.canvasHeight)) { + e.fontCaches = null; + var h = r.canvasContainer; + h.style.width = n + "px", h.style.height = i + "px"; + for (var c = 0; c < e.CANVAS_LAYERS; c++) + f = r.canvases[c], f.width = l, f.height = u, f.style.width = n + "px", f.style.height = i + "px"; + for (var c = 0; c < e.BUFFER_COUNT; c++) + f = r.bufferCanvases[c], f.width = l, f.height = u, f.style.width = n + "px", f.style.height = i + "px"; + e.textureMult = 1, s <= 1 && (f = r.bufferCanvases[e.TEXTURE_BUFFER], e.textureMult = 2, f.width = l * e.textureMult, f.height = u * e.textureMult), e.canvasWidth = l, e.canvasHeight = u; + } + }, Wt.renderTo = function(t, e, r, a) { + this.render({ + forcedContext: t, + forcedZoom: e, + forcedPan: r, + drawAllLayers: !0, + forcedPxRatio: a + }); + }, Wt.render = function(t) { + t = t || gs(); + var e = t.forcedContext, r = t.drawAllLayers, a = t.drawOnlyNodeLayer, n = t.forcedZoom, i = t.forcedPan, s = this, o = t.forcedPxRatio === void 0 ? this.getPixelRatio() : t.forcedPxRatio, l = s.cy, u = s.data, f = u.canvasNeedsRedraw, h = s.textureOnViewport && !e && (s.pinching || s.hoverData.dragging || s.swipePanning || s.data.wheelZooming), c = t.motionBlur !== void 0 ? t.motionBlur : s.motionBlur, v = s.motionBlurPxRatio, d = l.hasCompoundNodes(), g = s.hoverData.draggingEles, y = !!(s.hoverData.selecting || s.touchData.selecting); + c = c && !e && s.motionBlurEnabled && !y; + var p = c; + e || (s.prevPxRatio !== o && (s.invalidateContainerClientCoordsCache(), s.matchCanvasSize(s.container), s.redrawHint("eles", !0), s.redrawHint("drag", !0)), s.prevPxRatio = o), !e && s.motionBlurTimeout && clearTimeout(s.motionBlurTimeout), c && (s.mbFrames == null && (s.mbFrames = 0), s.mbFrames++, s.mbFrames < 3 && (p = !1), s.mbFrames > s.minMbLowQualFrames && (s.motionBlurPxRatio = s.mbPxRBlurry)), s.clearingMotionBlur && (s.motionBlurPxRatio = 1), s.textureDrawLastFrame && !h && (f[s.NODE] = !0, f[s.SELECT_BOX] = !0); + var m = l.style(), b = l.zoom(), E = n !== void 0 ? n : b, M = l.pan(), A = { + x: M.x, + y: M.y + }, w = { + zoom: b, + pan: { + x: M.x, + y: M.y + } + }, I = s.prevViewport, C = I === void 0 || w.zoom !== I.zoom || w.pan.x !== I.pan.x || w.pan.y !== I.pan.y; + !C && !(g && !d) && (s.motionBlurPxRatio = 1), i && (A = i), E *= o, A.x *= o, A.y *= o; + var B = s.getCachedZSortedEles(); + function F(Re, Me, Ve, Fe, ke) { + var Ge = Re.globalCompositeOperation; + Re.globalCompositeOperation = "destination-out", s.colorFillStyle(Re, 255, 255, 255, s.motionBlurTransparency), Re.fillRect(Me, Ve, Fe, ke), Re.globalCompositeOperation = Ge; + } + function R(Re, Me) { + var Ve, Fe, ke, Ge; + !s.clearingMotionBlur && (Re === u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE] || Re === u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]) ? (Ve = { + x: M.x * v, + y: M.y * v + }, Fe = b * v, ke = s.canvasWidth * v, Ge = s.canvasHeight * v) : (Ve = A, Fe = E, ke = s.canvasWidth, Ge = s.canvasHeight), Re.setTransform(1, 0, 0, 1, 0, 0), Me === "motionBlur" ? F(Re, 0, 0, ke, Ge) : !e && (Me === void 0 || Me) && Re.clearRect(0, 0, ke, Ge), r || (Re.translate(Ve.x, Ve.y), Re.scale(Fe, Fe)), i && Re.translate(i.x, i.y), n && Re.scale(n, n); + } + if (h || (s.textureDrawLastFrame = !1), h) { + if (s.textureDrawLastFrame = !0, !s.textureCache) { + s.textureCache = {}, s.textureCache.bb = l.mutableElements().boundingBox(), s.textureCache.texture = s.data.bufferCanvases[s.TEXTURE_BUFFER]; + var X = s.data.bufferContexts[s.TEXTURE_BUFFER]; + X.setTransform(1, 0, 0, 1, 0, 0), X.clearRect(0, 0, s.canvasWidth * s.textureMult, s.canvasHeight * s.textureMult), s.render({ + forcedContext: X, + drawOnlyNodeLayer: !0, + forcedPxRatio: o * s.textureMult + }); + var w = s.textureCache.viewport = { + zoom: l.zoom(), + pan: l.pan(), + width: s.canvasWidth, + height: s.canvasHeight + }; + w.mpan = { + x: (0 - w.pan.x) / w.zoom, + y: (0 - w.pan.y) / w.zoom + }; + } + f[s.DRAG] = !1, f[s.NODE] = !1; + var z = u.contexts[s.NODE], re = s.textureCache.texture, w = s.textureCache.viewport; + z.setTransform(1, 0, 0, 1, 0, 0), c ? F(z, 0, 0, w.width, w.height) : z.clearRect(0, 0, w.width, w.height); + var W = m.core("outside-texture-bg-color").value, Z = m.core("outside-texture-bg-opacity").value; + s.colorFillStyle(z, W[0], W[1], W[2], Z), z.fillRect(0, 0, w.width, w.height); + var b = l.zoom(); + R(z, !1), z.clearRect(w.mpan.x, w.mpan.y, w.width / w.zoom / o, w.height / w.zoom / o), z.drawImage(re, w.mpan.x, w.mpan.y, w.width / w.zoom / o, w.height / w.zoom / o); + } else + s.textureOnViewport && !e && (s.textureCache = null); + var ie = l.extent(), oe = s.pinching || s.hoverData.dragging || s.swipePanning || s.data.wheelZooming || s.hoverData.draggingEles || s.cy.animated(), de = s.hideEdgesOnViewport && oe, se = []; + if (se[s.NODE] = !f[s.NODE] && c && !s.clearedForMotionBlur[s.NODE] || s.clearingMotionBlur, se[s.NODE] && (s.clearedForMotionBlur[s.NODE] = !0), se[s.DRAG] = !f[s.DRAG] && c && !s.clearedForMotionBlur[s.DRAG] || s.clearingMotionBlur, se[s.DRAG] && (s.clearedForMotionBlur[s.DRAG] = !0), f[s.NODE] || r || a || se[s.NODE]) { + var ve = c && !se[s.NODE] && v !== 1, z = e || (ve ? s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE] : u.contexts[s.NODE]), we = c && !ve ? "motionBlur" : void 0; + R(z, we), de ? s.drawCachedNodes(z, B.nondrag, o, ie) : s.drawLayeredElements(z, B.nondrag, o, ie), s.debug && s.drawDebugPoints(z, B.nondrag), !r && !c && (f[s.NODE] = !1); + } + if (!a && (f[s.DRAG] || r || se[s.DRAG])) { + var ve = c && !se[s.DRAG] && v !== 1, z = e || (ve ? s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG] : u.contexts[s.DRAG]); + R(z, c && !ve ? "motionBlur" : void 0), de ? s.drawCachedNodes(z, B.drag, o, ie) : s.drawCachedElements(z, B.drag, o, ie), s.debug && s.drawDebugPoints(z, B.drag), !r && !c && (f[s.DRAG] = !1); + } + if (s.showFps || !a && f[s.SELECT_BOX] && !r) { + var z = e || u.contexts[s.SELECT_BOX]; + if (R(z), s.selection[4] == 1 && (s.hoverData.selecting || s.touchData.selecting)) { + var b = s.cy.zoom(), Te = m.core("selection-box-border-width").value / b; + z.lineWidth = Te, z.fillStyle = "rgba(" + m.core("selection-box-color").value[0] + "," + m.core("selection-box-color").value[1] + "," + m.core("selection-box-color").value[2] + "," + m.core("selection-box-opacity").value + ")", z.fillRect(s.selection[0], s.selection[1], s.selection[2] - s.selection[0], s.selection[3] - s.selection[1]), Te > 0 && (z.strokeStyle = "rgba(" + m.core("selection-box-border-color").value[0] + "," + m.core("selection-box-border-color").value[1] + "," + m.core("selection-box-border-color").value[2] + "," + m.core("selection-box-opacity").value + ")", z.strokeRect(s.selection[0], s.selection[1], s.selection[2] - s.selection[0], s.selection[3] - s.selection[1])); + } + if (u.bgActivePosistion && !s.hoverData.selecting) { + var b = s.cy.zoom(), Ee = u.bgActivePosistion; + z.fillStyle = "rgba(" + m.core("active-bg-color").value[0] + "," + m.core("active-bg-color").value[1] + "," + m.core("active-bg-color").value[2] + "," + m.core("active-bg-opacity").value + ")", z.beginPath(), z.arc(Ee.x, Ee.y, m.core("active-bg-size").pfValue / b, 0, 2 * Math.PI), z.fill(); + } + var ye = s.lastRedrawTime; + if (s.showFps && ye) { + ye = Math.round(ye); + var ae = Math.round(1e3 / ye); + z.setTransform(1, 0, 0, 1, 0, 0), z.fillStyle = "rgba(255, 0, 0, 0.75)", z.strokeStyle = "rgba(255, 0, 0, 0.75)", z.lineWidth = 1, z.fillText("1 frame = " + ye + " ms = " + ae + " fps", 0, 20); + var xe = 60; + z.strokeRect(0, 30, 250, 20), z.fillRect(0, 30, 250 * Math.min(ae / xe, 1), 20); + } + r || (f[s.SELECT_BOX] = !1); + } + if (c && v !== 1) { + var Ce = u.contexts[s.NODE], Oe = s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE], Ie = u.contexts[s.DRAG], He = s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG], qe = function(Me, Ve, Fe) { + Me.setTransform(1, 0, 0, 1, 0, 0), Fe || !p ? Me.clearRect(0, 0, s.canvasWidth, s.canvasHeight) : F(Me, 0, 0, s.canvasWidth, s.canvasHeight); + var ke = v; + Me.drawImage( + Ve, + // img + 0, + 0, + // sx, sy + s.canvasWidth * ke, + s.canvasHeight * ke, + // sw, sh + 0, + 0, + // x, y + s.canvasWidth, + s.canvasHeight + // w, h + ); + }; + (f[s.NODE] || se[s.NODE]) && (qe(Ce, Oe, se[s.NODE]), f[s.NODE] = !1), (f[s.DRAG] || se[s.DRAG]) && (qe(Ie, He, se[s.DRAG]), f[s.DRAG] = !1); + } + s.prevViewport = w, s.clearingMotionBlur && (s.clearingMotionBlur = !1, s.motionBlurCleared = !0, s.motionBlur = !0), c && (s.motionBlurTimeout = setTimeout(function() { + s.motionBlurTimeout = null, s.clearedForMotionBlur[s.NODE] = !1, s.clearedForMotionBlur[s.DRAG] = !1, s.motionBlur = !1, s.clearingMotionBlur = !h, s.mbFrames = 0, f[s.NODE] = !0, f[s.DRAG] = !0, s.redraw(); + }, ep)), e || l.emit("render"); + }; + var Mr = {}; + Mr.drawPolygonPath = function(t, e, r, a, n, i) { + var s = a / 2, o = n / 2; + t.beginPath && t.beginPath(), t.moveTo(e + s * i[0], r + o * i[1]); + for (var l = 1; l < i.length / 2; l++) + t.lineTo(e + s * i[l * 2], r + o * i[l * 2 + 1]); + t.closePath(); + }, Mr.drawRoundPolygonPath = function(t, e, r, a, n, i) { + var s = a / 2, o = n / 2, l = ci(a, n); + t.beginPath && t.beginPath(); + for (var u = 0; u < i.length / 4; u++) { + var f = void 0, h = void 0; + u === 0 ? f = i.length - 2 : f = u * 4 - 2, h = u * 4 + 2; + var c = e + s * i[u * 4], v = r + o * i[u * 4 + 1], d = -i[f] * i[h] - i[f + 1] * i[h + 1], g = l / Math.tan(Math.acos(d) / 2), y = c - g * i[f], p = v - g * i[f + 1], m = c + g * i[h], b = v + g * i[h + 1]; + u === 0 ? t.moveTo(y, p) : t.lineTo(y, p), t.arcTo(c, v, m, b, l); + } + t.closePath(); + }, Mr.drawRoundRectanglePath = function(t, e, r, a, n) { + var i = a / 2, s = n / 2, o = Fa(a, n); + t.beginPath && t.beginPath(), t.moveTo(e, r - s), t.arcTo(e + i, r - s, e + i, r, o), t.arcTo(e + i, r + s, e, r + s, o), t.arcTo(e - i, r + s, e - i, r, o), t.arcTo(e - i, r - s, e, r - s, o), t.lineTo(e, r - s), t.closePath(); + }, Mr.drawBottomRoundRectanglePath = function(t, e, r, a, n) { + var i = a / 2, s = n / 2, o = Fa(a, n); + t.beginPath && t.beginPath(), t.moveTo(e, r - s), t.lineTo(e + i, r - s), t.lineTo(e + i, r), t.arcTo(e + i, r + s, e, r + s, o), t.arcTo(e - i, r + s, e - i, r, o), t.lineTo(e - i, r - s), t.lineTo(e, r - s), t.closePath(); + }, Mr.drawCutRectanglePath = function(t, e, r, a, n) { + var i = a / 2, s = n / 2, o = Ds(); + t.beginPath && t.beginPath(), t.moveTo(e - i + o, r - s), t.lineTo(e + i - o, r - s), t.lineTo(e + i, r - s + o), t.lineTo(e + i, r + s - o), t.lineTo(e + i - o, r + s), t.lineTo(e - i + o, r + s), t.lineTo(e - i, r + s - o), t.lineTo(e - i, r - s + o), t.closePath(); + }, Mr.drawBarrelPath = function(t, e, r, a, n) { + var i = a / 2, s = n / 2, o = e - i, l = e + i, u = r - s, f = r + s, h = vi(a, n), c = h.widthOffset, v = h.heightOffset, d = h.ctrlPtOffsetPct * c; + t.beginPath && t.beginPath(), t.moveTo(o, u + v), t.lineTo(o, f - v), t.quadraticCurveTo(o + d, f, o + c, f), t.lineTo(l - c, f), t.quadraticCurveTo(l - d, f, l, f - v), t.lineTo(l, u + v), t.quadraticCurveTo(l - d, u, l - c, u), t.lineTo(o + c, u), t.quadraticCurveTo(o + d, u, o, u + v), t.closePath(); + }; + for (var Tu = Math.sin(0), Cu = Math.cos(0), _i = {}, Ui = {}, Du = Math.PI / 40, wa = 0 * Math.PI; wa < 2 * Math.PI; wa += Du) + _i[wa] = Math.sin(wa), Ui[wa] = Math.cos(wa); + Mr.drawEllipsePath = function(t, e, r, a, n) { + if (t.beginPath && t.beginPath(), t.ellipse) + t.ellipse(e, r, a / 2, n / 2, 0, 0, 2 * Math.PI); + else + for (var i, s, o = a / 2, l = n / 2, u = 0 * Math.PI; u < 2 * Math.PI; u += Du) + i = e - o * _i[u] * Tu + o * Ui[u] * Cu, s = r + l * Ui[u] * Tu + l * _i[u] * Cu, u === 0 ? t.moveTo(i, s) : t.lineTo(i, s); + t.closePath(); + }; + var tn = {}; + tn.createBuffer = function(t, e) { + var r = document.createElement("canvas"); + return r.width = t, r.height = e, [r, r.getContext("2d")]; + }, tn.bufferCanvasImage = function(t) { + var e = this.cy, r = e.mutableElements(), a = r.boundingBox(), n = this.findContainerClientCoords(), i = t.full ? Math.ceil(a.w) : n[2], s = t.full ? Math.ceil(a.h) : n[3], o = k(t.maxWidth) || k(t.maxHeight), l = this.getPixelRatio(), u = 1; + if (t.scale !== void 0) + i *= t.scale, s *= t.scale, u = t.scale; + else if (o) { + var f = 1 / 0, h = 1 / 0; + k(t.maxWidth) && (f = u * t.maxWidth / i), k(t.maxHeight) && (h = u * t.maxHeight / s), u = Math.min(f, h), i *= u, s *= u; + } + o || (i *= l, s *= l, u *= l); + var c = document.createElement("canvas"); + c.width = i, c.height = s, c.style.width = i + "px", c.style.height = s + "px"; + var v = c.getContext("2d"); + if (i > 0 && s > 0) { + v.clearRect(0, 0, i, s), v.globalCompositeOperation = "source-over"; + var d = this.getCachedZSortedEles(); + if (t.full) + v.translate(-a.x1 * u, -a.y1 * u), v.scale(u, u), this.drawElements(v, d), v.scale(1 / u, 1 / u), v.translate(a.x1 * u, a.y1 * u); + else { + var g = e.pan(), y = { + x: g.x * u, + y: g.y * u + }; + u *= e.zoom(), v.translate(y.x, y.y), v.scale(u, u), this.drawElements(v, d), v.scale(1 / u, 1 / u), v.translate(-y.x, -y.y); + } + t.bg && (v.globalCompositeOperation = "destination-over", v.fillStyle = t.bg, v.rect(0, 0, i, s), v.fill()); + } + return c; + }; + function tp(t, e) { + for (var r = atob(t), a = new ArrayBuffer(r.length), n = new Uint8Array(a), i = 0; i < r.length; i++) + n[i] = r.charCodeAt(i); + return new Blob([a], { + type: e + }); + } + function Su(t) { + var e = t.indexOf(","); + return t.substr(e + 1); + } + function Lu(t, e, r) { + var a = function() { + return e.toDataURL(r, t.quality); + }; + switch (t.output) { + case "blob-promise": + return new ia(function(n, i) { + try { + e.toBlob(function(s) { + s != null ? n(s) : i(new Error("`canvas.toBlob()` sent a null value in its callback")); + }, r, t.quality); + } catch (s) { + i(s); + } + }); + case "blob": + return tp(Su(a()), r); + case "base64": + return Su(a()); + case "base64uri": + default: + return a(); + } + } + tn.png = function(t) { + return Lu(t, this.bufferCanvasImage(t), "image/png"); + }, tn.jpg = function(t) { + return Lu(t, this.bufferCanvasImage(t), "image/jpeg"); + }; + var Au = {}; + Au.nodeShapeImpl = function(t, e, r, a, n, i, s) { + switch (t) { + case "ellipse": + return this.drawEllipsePath(e, r, a, n, i); + case "polygon": + return this.drawPolygonPath(e, r, a, n, i, s); + case "round-polygon": + return this.drawRoundPolygonPath(e, r, a, n, i, s); + case "roundrectangle": + case "round-rectangle": + return this.drawRoundRectanglePath(e, r, a, n, i); + case "cutrectangle": + case "cut-rectangle": + return this.drawCutRectanglePath(e, r, a, n, i); + case "bottomroundrectangle": + case "bottom-round-rectangle": + return this.drawBottomRoundRectanglePath(e, r, a, n, i); + case "barrel": + return this.drawBarrelPath(e, r, a, n, i); + } + }; + var rp = Ou, ot = Ou.prototype; + ot.CANVAS_LAYERS = 3, ot.SELECT_BOX = 0, ot.DRAG = 1, ot.NODE = 2, ot.BUFFER_COUNT = 3, ot.TEXTURE_BUFFER = 0, ot.MOTIONBLUR_BUFFER_NODE = 1, ot.MOTIONBLUR_BUFFER_DRAG = 2; + function Ou(t) { + var e = this; + e.data = { + canvases: new Array(ot.CANVAS_LAYERS), + contexts: new Array(ot.CANVAS_LAYERS), + canvasNeedsRedraw: new Array(ot.CANVAS_LAYERS), + bufferCanvases: new Array(ot.BUFFER_COUNT), + bufferContexts: new Array(ot.CANVAS_LAYERS) + }; + var r = "-webkit-tap-highlight-color", a = "rgba(0,0,0,0)"; + e.data.canvasContainer = document.createElement("div"); + var n = e.data.canvasContainer.style; + e.data.canvasContainer.style[r] = a, n.position = "relative", n.zIndex = "0", n.overflow = "hidden"; + var i = t.cy.container(); + i.appendChild(e.data.canvasContainer), i.style[r] = a; + var s = { + "-webkit-user-select": "none", + "-moz-user-select": "-moz-none", + "user-select": "none", + "-webkit-tap-highlight-color": "rgba(0,0,0,0)", + "outline-style": "none" + }; + lt() && (s["-ms-touch-action"] = "none", s["touch-action"] = "none"); + for (var o = 0; o < ot.CANVAS_LAYERS; o++) { + var l = e.data.canvases[o] = document.createElement("canvas"); + e.data.contexts[o] = l.getContext("2d"), Object.keys(s).forEach(function(ye) { + l.style[ye] = s[ye]; + }), l.style.position = "absolute", l.setAttribute("data-id", "layer" + o), l.style.zIndex = String(ot.CANVAS_LAYERS - o), e.data.canvasContainer.appendChild(l), e.data.canvasNeedsRedraw[o] = !1; + } + e.data.topCanvas = e.data.canvases[0], e.data.canvases[ot.NODE].setAttribute("data-id", "layer" + ot.NODE + "-node"), e.data.canvases[ot.SELECT_BOX].setAttribute("data-id", "layer" + ot.SELECT_BOX + "-selectbox"), e.data.canvases[ot.DRAG].setAttribute("data-id", "layer" + ot.DRAG + "-drag"); + for (var o = 0; o < ot.BUFFER_COUNT; o++) + e.data.bufferCanvases[o] = document.createElement("canvas"), e.data.bufferContexts[o] = e.data.bufferCanvases[o].getContext("2d"), e.data.bufferCanvases[o].style.position = "absolute", e.data.bufferCanvases[o].setAttribute("data-id", "buffer" + o), e.data.bufferCanvases[o].style.zIndex = String(-o - 1), e.data.bufferCanvases[o].style.visibility = "hidden"; + e.pathsEnabled = !0; + var u = Ut(), f = function(ae) { + return { + x: (ae.x1 + ae.x2) / 2, + y: (ae.y1 + ae.y2) / 2 + }; + }, h = function(ae) { + return { + x: -ae.w / 2, + y: -ae.h / 2 + }; + }, c = function(ae) { + var xe = ae[0]._private, Ce = xe.oldBackgroundTimestamp === xe.backgroundTimestamp; + return !Ce; + }, v = function(ae) { + return ae[0]._private.nodeKey; + }, d = function(ae) { + return ae[0]._private.labelStyleKey; + }, g = function(ae) { + return ae[0]._private.sourceLabelStyleKey; + }, y = function(ae) { + return ae[0]._private.targetLabelStyleKey; + }, p = function(ae, xe, Ce, Oe, Ie) { + return e.drawElement(ae, xe, Ce, !1, !1, Ie); + }, m = function(ae, xe, Ce, Oe, Ie) { + return e.drawElementText(ae, xe, Ce, Oe, "main", Ie); + }, b = function(ae, xe, Ce, Oe, Ie) { + return e.drawElementText(ae, xe, Ce, Oe, "source", Ie); + }, E = function(ae, xe, Ce, Oe, Ie) { + return e.drawElementText(ae, xe, Ce, Oe, "target", Ie); + }, M = function(ae) { + return ae.boundingBox(), ae[0]._private.bodyBounds; + }, A = function(ae) { + return ae.boundingBox(), ae[0]._private.labelBounds.main || u; + }, w = function(ae) { + return ae.boundingBox(), ae[0]._private.labelBounds.source || u; + }, I = function(ae) { + return ae.boundingBox(), ae[0]._private.labelBounds.target || u; + }, C = function(ae, xe) { + return xe; + }, B = function(ae) { + return f(M(ae)); + }, F = function(ae, xe, Ce) { + var Oe = ae ? ae + "-" : ""; + return { + x: xe.x + Ce.pstyle(Oe + "text-margin-x").pfValue, + y: xe.y + Ce.pstyle(Oe + "text-margin-y").pfValue + }; + }, R = function(ae, xe, Ce) { + var Oe = ae[0]._private.rscratch; + return { + x: Oe[xe], + y: Oe[Ce] + }; + }, X = function(ae) { + return F("", R(ae, "labelX", "labelY"), ae); + }, z = function(ae) { + return F("source", R(ae, "sourceLabelX", "sourceLabelY"), ae); + }, re = function(ae) { + return F("target", R(ae, "targetLabelX", "targetLabelY"), ae); + }, W = function(ae) { + return h(M(ae)); + }, Z = function(ae) { + return h(w(ae)); + }, ie = function(ae) { + return h(I(ae)); + }, oe = function(ae) { + var xe = A(ae), Ce = h(A(ae)); + if (ae.isNode()) { + switch (ae.pstyle("text-halign").value) { + case "left": + Ce.x = -xe.w; + break; + case "right": + Ce.x = 0; + break; + } + switch (ae.pstyle("text-valign").value) { + case "top": + Ce.y = -xe.h; + break; + case "bottom": + Ce.y = 0; + break; + } + } + return Ce; + }, de = e.data.eleTxrCache = new ja(e, { + getKey: v, + doesEleInvalidateKey: c, + drawElement: p, + getBoundingBox: M, + getRotationPoint: B, + getRotationOffset: W, + allowEdgeTxrCaching: !1, + allowParentTxrCaching: !1 + }), se = e.data.lblTxrCache = new ja(e, { + getKey: d, + drawElement: m, + getBoundingBox: A, + getRotationPoint: X, + getRotationOffset: oe, + isVisible: C + }), ve = e.data.slbTxrCache = new ja(e, { + getKey: g, + drawElement: b, + getBoundingBox: w, + getRotationPoint: z, + getRotationOffset: Z, + isVisible: C + }), we = e.data.tlbTxrCache = new ja(e, { + getKey: y, + drawElement: E, + getBoundingBox: I, + getRotationPoint: re, + getRotationOffset: ie, + isVisible: C + }), Te = e.data.lyrTxrCache = new pu(e); + e.onUpdateEleCalcs(function(ae, xe) { + de.invalidateElements(xe), se.invalidateElements(xe), ve.invalidateElements(xe), we.invalidateElements(xe), Te.invalidateElements(xe); + for (var Ce = 0; Ce < xe.length; Ce++) { + var Oe = xe[Ce]._private; + Oe.oldBackgroundTimestamp = Oe.backgroundTimestamp; + } + }); + var Ee = function(ae) { + for (var xe = 0; xe < ae.length; xe++) + Te.enqueueElementRefinement(ae[xe].ele); + }; + de.onDequeue(Ee), se.onDequeue(Ee), ve.onDequeue(Ee), we.onDequeue(Ee); + } + ot.redrawHint = function(t, e) { + var r = this; + switch (t) { + case "eles": + r.data.canvasNeedsRedraw[ot.NODE] = e; + break; + case "drag": + r.data.canvasNeedsRedraw[ot.DRAG] = e; + break; + case "select": + r.data.canvasNeedsRedraw[ot.SELECT_BOX] = e; + break; + } + }; + var ap = typeof Path2D < "u"; + ot.path2dEnabled = function(t) { + if (t === void 0) + return this.pathsEnabled; + this.pathsEnabled = !!t; + }, ot.usePaths = function() { + return ap && this.pathsEnabled; + }, ot.setImgSmoothing = function(t, e) { + t.imageSmoothingEnabled != null ? t.imageSmoothingEnabled = e : (t.webkitImageSmoothingEnabled = e, t.mozImageSmoothingEnabled = e, t.msImageSmoothingEnabled = e); + }, ot.getImgSmoothing = function(t) { + return t.imageSmoothingEnabled != null ? t.imageSmoothingEnabled : t.webkitImageSmoothingEnabled || t.mozImageSmoothingEnabled || t.msImageSmoothingEnabled; + }, ot.makeOffscreenCanvas = function(t, e) { + var r; + return (typeof OffscreenCanvas > "u" ? "undefined" : ee(OffscreenCanvas)) !== "undefined" ? r = new OffscreenCanvas(t, e) : (r = document.createElement("canvas"), r.width = t, r.height = e), r; + }, [mu, hr, mr, Vi, _r, Ea, Wt, Mr, tn, Au].forEach(function(t) { + Ue(ot, t); + }); + var np = [{ + name: "null", + impl: eu + }, { + name: "base", + impl: cu + }, { + name: "canvas", + impl: rp + }], ip = [{ + type: "layout", + extensions: cg + }, { + type: "renderer", + extensions: np + }], Nu = {}, Mu = {}; + function Iu(t, e, r) { + var a = r, n = function(I) { + ft("Can not register `" + e + "` for `" + t + "` since `" + I + "` already exists in the prototype and can not be overridden"); + }; + if (t === "core") { + if (Za.prototype[e]) + return n(e); + Za.prototype[e] = r; + } else if (t === "collection") { + if (Ot.prototype[e]) + return n(e); + Ot.prototype[e] = r; + } else if (t === "layout") { + for (var i = function(I) { + this.options = I, r.call(this, I), L(this._private) || (this._private = {}), this._private.cy = I.cy, this._private.listeners = [], this.createEmitter(); + }, s = i.prototype = Object.create(r.prototype), o = [], l = 0; l < o.length; l++) { + var u = o[l]; + s[u] = s[u] || function() { + return this; + }; + } + s.start && !s.run ? s.run = function() { + return this.start(), this; + } : !s.start && s.run && (s.start = function() { + return this.run(), this; + }); + var f = r.prototype.stop; + s.stop = function() { + var w = this.options; + if (w && w.animate) { + var I = this.animations; + if (I) + for (var C = 0; C < I.length; C++) + I[C].stop(); + } + return f ? f.call(this) : this.emit("layoutstop"), this; + }, s.destroy || (s.destroy = function() { + return this; + }), s.cy = function() { + return this._private.cy; + }; + var h = function(I) { + return I._private.cy; + }, c = { + addEventFields: function(I, C) { + C.layout = I, C.cy = h(I), C.target = I; + }, + bubble: function() { + return !0; + }, + parent: function(I) { + return h(I); + } + }; + Ue(s, { + createEmitter: function() { + return this._private.emitter = new Nn(c, this), this; + }, + emitter: function() { + return this._private.emitter; + }, + on: function(I, C) { + return this.emitter().on(I, C), this; + }, + one: function(I, C) { + return this.emitter().one(I, C), this; + }, + once: function(I, C) { + return this.emitter().one(I, C), this; + }, + removeListener: function(I, C) { + return this.emitter().removeListener(I, C), this; + }, + removeAllListeners: function() { + return this.emitter().removeAllListeners(), this; + }, + emit: function(I, C) { + return this.emitter().emit(I, C), this; + } + }), ht.eventAliasesOn(s), a = i; + } else if (t === "renderer" && e !== "null" && e !== "base") { + var v = Ru("renderer", "base"), d = v.prototype, g = r, y = r.prototype, p = function() { + v.apply(this, arguments), g.apply(this, arguments); + }, m = p.prototype; + for (var b in d) { + var E = d[b], M = y[b] != null; + if (M) + return n(b); + m[b] = E; + } + for (var A in y) + m[A] = y[A]; + d.clientFunctions.forEach(function(w) { + m[w] = m[w] || function() { + xt("Renderer does not implement `renderer." + w + "()` on its prototype"); + }; + }), a = p; + } else if (t === "__proto__" || t === "constructor" || t === "prototype") + return xt(t + " is an illegal type to be registered, possibly lead to prototype pollutions"); + return ji({ + map: Nu, + keys: [t, e], + value: a + }); + } + function Ru(t, e) { + return es({ + map: Nu, + keys: [t, e] + }); + } + function sp(t, e, r, a, n) { + return ji({ + map: Mu, + keys: [t, e, r, a], + value: n + }); + } + function op(t, e, r, a) { + return es({ + map: Mu, + keys: [t, e, r, a] + }); + } + var Yi = function() { + if (arguments.length === 2) + return Ru.apply(null, arguments); + if (arguments.length === 3) + return Iu.apply(null, arguments); + if (arguments.length === 4) + return op.apply(null, arguments); + if (arguments.length === 5) + return sp.apply(null, arguments); + xt("Invalid extension access syntax"); + }; + Za.prototype.extension = Yi, ip.forEach(function(t) { + t.extensions.forEach(function(e) { + Iu(t.type, e.name, e.impl); + }); + }); + var ku = function t() { + if (!(this instanceof t)) + return new t(); + this.length = 0; + }, Ur = ku.prototype; + Ur.instanceString = function() { + return "stylesheet"; + }, Ur.selector = function(t) { + var e = this.length++; + return this[e] = { + selector: t, + properties: [] + }, this; + }, Ur.css = function(t, e) { + var r = this.length - 1; + if (j(t)) + this[r].properties.push({ + name: t, + value: e + }); + else if (L(t)) + for (var a = t, n = Object.keys(a), i = 0; i < n.length; i++) { + var s = n[i], o = a[s]; + if (o != null) { + var l = Ft.properties[s] || Ft.properties[pt(s)]; + if (l != null) { + var u = l.name, f = o; + this[r].properties.push({ + name: u, + value: f + }); + } + } + } + return this; + }, Ur.style = Ur.css, Ur.generateStyle = function(t) { + var e = new Ft(t); + return this.appendToStyle(e); + }, Ur.appendToStyle = function(t) { + for (var e = 0; e < this.length; e++) { + var r = this[e], a = r.selector, n = r.properties; + t.selector(a); + for (var i = 0; i < n.length; i++) { + var s = n[i]; + t.css(s.name, s.value); + } + } + return t; + }; + var up = "3.23.0", Yr = function(e) { + if (e === void 0 && (e = {}), L(e)) + return new Za(e); + if (j(e)) + return Yi.apply(Yi, arguments); + }; + return Yr.use = function(t) { + var e = Array.prototype.slice.call(arguments, 1); + return e.unshift(Yr), t.apply(null, e), this; + }, Yr.warnings = function(t) { + return vs(t); + }, Yr.version = up, Yr.stylesheet = Yr.Stylesheet = ku, Yr; + }); +})(qu); +var Xp = qu.exports; +const Wu = /* @__PURE__ */ Vu(Xp); +var Ku = { exports: {} }, qi = { exports: {} }, Wi = { exports: {} }, Gu; +function qp() { + return Gu || (Gu = 1, function(pe, fe) { + (function(ce, H) { + pe.exports = H(); + })(Ca, function() { + return ( + /******/ + function(ee) { + var ce = {}; + function H(O) { + if (ce[O]) + return ce[O].exports; + var T = ce[O] = { + /******/ + i: O, + /******/ + l: !1, + /******/ + exports: {} + /******/ + }; + return ee[O].call(T.exports, T, T.exports, H), T.l = !0, T.exports; + } + return H.m = ee, H.c = ce, H.i = function(O) { + return O; + }, H.d = function(O, T, x) { + H.o(O, T) || Object.defineProperty(O, T, { + /******/ + configurable: !1, + /******/ + enumerable: !0, + /******/ + get: x + /******/ + }); + }, H.n = function(O) { + var T = O && O.__esModule ? ( + /******/ + function() { + return O.default; + } + ) : ( + /******/ + function() { + return O; + } + ); + return H.d(T, "a", T), T; + }, H.o = function(O, T) { + return Object.prototype.hasOwnProperty.call(O, T); + }, H.p = "", H(H.s = 26); + }([ + /* 0 */ + /***/ + function(ee, ce, H) { + function O() { + } + O.QUALITY = 1, O.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, O.DEFAULT_INCREMENTAL = !1, O.DEFAULT_ANIMATION_ON_LAYOUT = !0, O.DEFAULT_ANIMATION_DURING_LAYOUT = !1, O.DEFAULT_ANIMATION_PERIOD = 50, O.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, O.DEFAULT_GRAPH_MARGIN = 15, O.NODE_DIMENSIONS_INCLUDE_LABELS = !1, O.SIMPLE_NODE_SIZE = 40, O.SIMPLE_NODE_HALF_SIZE = O.SIMPLE_NODE_SIZE / 2, O.EMPTY_COMPOUND_NODE_SIZE = 40, O.MIN_EDGE_LENGTH = 1, O.WORLD_BOUNDARY = 1e6, O.INITIAL_WORLD_BOUNDARY = O.WORLD_BOUNDARY / 1e3, O.WORLD_CENTER_X = 1200, O.WORLD_CENTER_Y = 900, ee.exports = O; + }, + /* 1 */ + /***/ + function(ee, ce, H) { + var O = H(2), T = H(8), x = H(9); + function S(U, P, K) { + O.call(this, K), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = K, this.bendpoints = [], this.source = U, this.target = P; + } + S.prototype = Object.create(O.prototype); + for (var G in O) + S[G] = O[G]; + S.prototype.getSource = function() { + return this.source; + }, S.prototype.getTarget = function() { + return this.target; + }, S.prototype.isInterGraph = function() { + return this.isInterGraph; + }, S.prototype.getLength = function() { + return this.length; + }, S.prototype.isOverlapingSourceAndTarget = function() { + return this.isOverlapingSourceAndTarget; + }, S.prototype.getBendpoints = function() { + return this.bendpoints; + }, S.prototype.getLca = function() { + return this.lca; + }, S.prototype.getSourceInLca = function() { + return this.sourceInLca; + }, S.prototype.getTargetInLca = function() { + return this.targetInLca; + }, S.prototype.getOtherEnd = function(U) { + if (this.source === U) + return this.target; + if (this.target === U) + return this.source; + throw "Node is not incident with this edge"; + }, S.prototype.getOtherEndInGraph = function(U, P) { + for (var K = this.getOtherEnd(U), D = P.getGraphManager().getRoot(); ; ) { + if (K.getOwner() == P) + return K; + if (K.getOwner() == D) + break; + K = K.getOwner().getParent(); + } + return null; + }, S.prototype.updateLength = function() { + var U = new Array(4); + this.isOverlapingSourceAndTarget = T.getIntersection(this.target.getRect(), this.source.getRect(), U), this.isOverlapingSourceAndTarget || (this.lengthX = U[0] - U[2], this.lengthY = U[1] - U[3], Math.abs(this.lengthX) < 1 && (this.lengthX = x.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = x.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY)); + }, S.prototype.updateLengthSimple = function() { + this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = x.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = x.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + }, ee.exports = S; + }, + /* 2 */ + /***/ + function(ee, ce, H) { + function O(T) { + this.vGraphObject = T; + } + ee.exports = O; + }, + /* 3 */ + /***/ + function(ee, ce, H) { + var O = H(2), T = H(10), x = H(13), S = H(0), G = H(16), U = H(4); + function P(D, V, _, Q) { + _ == null && Q == null && (Q = V), O.call(this, Q), D.graphManager != null && (D = D.graphManager), this.estimatedSize = T.MIN_VALUE, this.inclusionTreeDepth = T.MAX_VALUE, this.vGraphObject = Q, this.edges = [], this.graphManager = D, _ != null && V != null ? this.rect = new x(V.x, V.y, _.width, _.height) : this.rect = new x(); + } + P.prototype = Object.create(O.prototype); + for (var K in O) + P[K] = O[K]; + P.prototype.getEdges = function() { + return this.edges; + }, P.prototype.getChild = function() { + return this.child; + }, P.prototype.getOwner = function() { + return this.owner; + }, P.prototype.getWidth = function() { + return this.rect.width; + }, P.prototype.setWidth = function(D) { + this.rect.width = D; + }, P.prototype.getHeight = function() { + return this.rect.height; + }, P.prototype.setHeight = function(D) { + this.rect.height = D; + }, P.prototype.getCenterX = function() { + return this.rect.x + this.rect.width / 2; + }, P.prototype.getCenterY = function() { + return this.rect.y + this.rect.height / 2; + }, P.prototype.getCenter = function() { + return new U(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); + }, P.prototype.getLocation = function() { + return new U(this.rect.x, this.rect.y); + }, P.prototype.getRect = function() { + return this.rect; + }, P.prototype.getDiagonal = function() { + return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); + }, P.prototype.getHalfTheDiagonal = function() { + return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; + }, P.prototype.setRect = function(D, V) { + this.rect.x = D.x, this.rect.y = D.y, this.rect.width = V.width, this.rect.height = V.height; + }, P.prototype.setCenter = function(D, V) { + this.rect.x = D - this.rect.width / 2, this.rect.y = V - this.rect.height / 2; + }, P.prototype.setLocation = function(D, V) { + this.rect.x = D, this.rect.y = V; + }, P.prototype.moveBy = function(D, V) { + this.rect.x += D, this.rect.y += V; + }, P.prototype.getEdgeListToNode = function(D) { + var V = [], _ = this; + return _.edges.forEach(function(Q) { + if (Q.target == D) { + if (Q.source != _) + throw "Incorrect edge source!"; + V.push(Q); + } + }), V; + }, P.prototype.getEdgesBetween = function(D) { + var V = [], _ = this; + return _.edges.forEach(function(Q) { + if (!(Q.source == _ || Q.target == _)) + throw "Incorrect edge source and/or target"; + (Q.target == D || Q.source == D) && V.push(Q); + }), V; + }, P.prototype.getNeighborsList = function() { + var D = /* @__PURE__ */ new Set(), V = this; + return V.edges.forEach(function(_) { + if (_.source == V) + D.add(_.target); + else { + if (_.target != V) + throw "Incorrect incidency!"; + D.add(_.source); + } + }), D; + }, P.prototype.withChildren = function() { + var D = /* @__PURE__ */ new Set(), V, _; + if (D.add(this), this.child != null) + for (var Q = this.child.getNodes(), ne = 0; ne < Q.length; ne++) + V = Q[ne], _ = V.withChildren(), _.forEach(function(ue) { + D.add(ue); + }); + return D; + }, P.prototype.getNoOfChildren = function() { + var D = 0, V; + if (this.child == null) + D = 1; + else + for (var _ = this.child.getNodes(), Q = 0; Q < _.length; Q++) + V = _[Q], D += V.getNoOfChildren(); + return D == 0 && (D = 1), D; + }, P.prototype.getEstimatedSize = function() { + if (this.estimatedSize == T.MIN_VALUE) + throw "assert failed"; + return this.estimatedSize; + }, P.prototype.calcEstimatedSize = function() { + return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize); + }, P.prototype.scatter = function() { + var D, V, _ = -S.INITIAL_WORLD_BOUNDARY, Q = S.INITIAL_WORLD_BOUNDARY; + D = S.WORLD_CENTER_X + G.nextDouble() * (Q - _) + _; + var ne = -S.INITIAL_WORLD_BOUNDARY, ue = S.INITIAL_WORLD_BOUNDARY; + V = S.WORLD_CENTER_Y + G.nextDouble() * (ue - ne) + ne, this.rect.x = D, this.rect.y = V; + }, P.prototype.updateBounds = function() { + if (this.getChild() == null) + throw "assert failed"; + if (this.getChild().getNodes().length != 0) { + var D = this.getChild(); + if (D.updateBounds(!0), this.rect.x = D.getLeft(), this.rect.y = D.getTop(), this.setWidth(D.getRight() - D.getLeft()), this.setHeight(D.getBottom() - D.getTop()), S.NODE_DIMENSIONS_INCLUDE_LABELS) { + var V = D.getRight() - D.getLeft(), _ = D.getBottom() - D.getTop(); + this.labelWidth > V && (this.rect.x -= (this.labelWidth - V) / 2, this.setWidth(this.labelWidth)), this.labelHeight > _ && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - _) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - _), this.setHeight(this.labelHeight)); + } + } + }, P.prototype.getInclusionTreeDepth = function() { + if (this.inclusionTreeDepth == T.MAX_VALUE) + throw "assert failed"; + return this.inclusionTreeDepth; + }, P.prototype.transform = function(D) { + var V = this.rect.x; + V > S.WORLD_BOUNDARY ? V = S.WORLD_BOUNDARY : V < -S.WORLD_BOUNDARY && (V = -S.WORLD_BOUNDARY); + var _ = this.rect.y; + _ > S.WORLD_BOUNDARY ? _ = S.WORLD_BOUNDARY : _ < -S.WORLD_BOUNDARY && (_ = -S.WORLD_BOUNDARY); + var Q = new U(V, _), ne = D.inverseTransformPoint(Q); + this.setLocation(ne.x, ne.y); + }, P.prototype.getLeft = function() { + return this.rect.x; + }, P.prototype.getRight = function() { + return this.rect.x + this.rect.width; + }, P.prototype.getTop = function() { + return this.rect.y; + }, P.prototype.getBottom = function() { + return this.rect.y + this.rect.height; + }, P.prototype.getParent = function() { + return this.owner == null ? null : this.owner.getParent(); + }, ee.exports = P; + }, + /* 4 */ + /***/ + function(ee, ce, H) { + function O(T, x) { + T == null && x == null ? (this.x = 0, this.y = 0) : (this.x = T, this.y = x); + } + O.prototype.getX = function() { + return this.x; + }, O.prototype.getY = function() { + return this.y; + }, O.prototype.setX = function(T) { + this.x = T; + }, O.prototype.setY = function(T) { + this.y = T; + }, O.prototype.getDifference = function(T) { + return new DimensionD(this.x - T.x, this.y - T.y); + }, O.prototype.getCopy = function() { + return new O(this.x, this.y); + }, O.prototype.translate = function(T) { + return this.x += T.width, this.y += T.height, this; + }, ee.exports = O; + }, + /* 5 */ + /***/ + function(ee, ce, H) { + var O = H(2), T = H(10), x = H(0), S = H(6), G = H(3), U = H(1), P = H(13), K = H(12), D = H(11); + function V(Q, ne, ue) { + O.call(this, ue), this.estimatedSize = T.MIN_VALUE, this.margin = x.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = Q, ne != null && ne instanceof S ? this.graphManager = ne : ne != null && ne instanceof Layout && (this.graphManager = ne.graphManager); + } + V.prototype = Object.create(O.prototype); + for (var _ in O) + V[_] = O[_]; + V.prototype.getNodes = function() { + return this.nodes; + }, V.prototype.getEdges = function() { + return this.edges; + }, V.prototype.getGraphManager = function() { + return this.graphManager; + }, V.prototype.getParent = function() { + return this.parent; + }, V.prototype.getLeft = function() { + return this.left; + }, V.prototype.getRight = function() { + return this.right; + }, V.prototype.getTop = function() { + return this.top; + }, V.prototype.getBottom = function() { + return this.bottom; + }, V.prototype.isConnected = function() { + return this.isConnected; + }, V.prototype.add = function(Q, ne, ue) { + if (ne == null && ue == null) { + var J = Q; + if (this.graphManager == null) + throw "Graph has no graph mgr!"; + if (this.getNodes().indexOf(J) > -1) + throw "Node already in graph!"; + return J.owner = this, this.getNodes().push(J), J; + } else { + var j = Q; + if (!(this.getNodes().indexOf(ne) > -1 && this.getNodes().indexOf(ue) > -1)) + throw "Source or target not in graph!"; + if (!(ne.owner == ue.owner && ne.owner == this)) + throw "Both owners must be this graph!"; + return ne.owner != ue.owner ? null : (j.source = ne, j.target = ue, j.isInterGraph = !1, this.getEdges().push(j), ne.edges.push(j), ue != ne && ue.edges.push(j), j); + } + }, V.prototype.remove = function(Q) { + var ne = Q; + if (Q instanceof G) { + if (ne == null) + throw "Node is null!"; + if (!(ne.owner != null && ne.owner == this)) + throw "Owner graph is invalid!"; + if (this.graphManager == null) + throw "Owner graph manager is invalid!"; + for (var ue = ne.edges.slice(), J, j = ue.length, Y = 0; Y < j; Y++) + J = ue[Y], J.isInterGraph ? this.graphManager.remove(J) : J.source.owner.remove(J); + var te = this.nodes.indexOf(ne); + if (te == -1) + throw "Node not in owner node list!"; + this.nodes.splice(te, 1); + } else if (Q instanceof U) { + var J = Q; + if (J == null) + throw "Edge is null!"; + if (!(J.source != null && J.target != null)) + throw "Source and/or target is null!"; + if (!(J.source.owner != null && J.target.owner != null && J.source.owner == this && J.target.owner == this)) + throw "Source and/or target owner is invalid!"; + var L = J.source.edges.indexOf(J), $ = J.target.edges.indexOf(J); + if (!(L > -1 && $ > -1)) + throw "Source and/or target doesn't know this edge!"; + J.source.edges.splice(L, 1), J.target != J.source && J.target.edges.splice($, 1); + var te = J.source.owner.getEdges().indexOf(J); + if (te == -1) + throw "Not in owner's edge list!"; + J.source.owner.getEdges().splice(te, 1); + } + }, V.prototype.updateLeftTop = function() { + for (var Q = T.MAX_VALUE, ne = T.MAX_VALUE, ue, J, j, Y = this.getNodes(), te = Y.length, L = 0; L < te; L++) { + var $ = Y[L]; + ue = $.getTop(), J = $.getLeft(), Q > ue && (Q = ue), ne > J && (ne = J); + } + return Q == T.MAX_VALUE ? null : (Y[0].getParent().paddingLeft != null ? j = Y[0].getParent().paddingLeft : j = this.margin, this.left = ne - j, this.top = Q - j, new K(this.left, this.top)); + }, V.prototype.updateBounds = function(Q) { + for (var ne = T.MAX_VALUE, ue = -T.MAX_VALUE, J = T.MAX_VALUE, j = -T.MAX_VALUE, Y, te, L, $, k, q = this.nodes, he = q.length, ge = 0; ge < he; ge++) { + var Ae = q[ge]; + Q && Ae.child != null && Ae.updateBounds(), Y = Ae.getLeft(), te = Ae.getRight(), L = Ae.getTop(), $ = Ae.getBottom(), ne > Y && (ne = Y), ue < te && (ue = te), J > L && (J = L), j < $ && (j = $); + } + var Ne = new P(ne, J, ue - ne, j - J); + ne == T.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), q[0].getParent().paddingLeft != null ? k = q[0].getParent().paddingLeft : k = this.margin, this.left = Ne.x - k, this.right = Ne.x + Ne.width + k, this.top = Ne.y - k, this.bottom = Ne.y + Ne.height + k; + }, V.calculateBounds = function(Q) { + for (var ne = T.MAX_VALUE, ue = -T.MAX_VALUE, J = T.MAX_VALUE, j = -T.MAX_VALUE, Y, te, L, $, k = Q.length, q = 0; q < k; q++) { + var he = Q[q]; + Y = he.getLeft(), te = he.getRight(), L = he.getTop(), $ = he.getBottom(), ne > Y && (ne = Y), ue < te && (ue = te), J > L && (J = L), j < $ && (j = $); + } + var ge = new P(ne, J, ue - ne, j - J); + return ge; + }, V.prototype.getInclusionTreeDepth = function() { + return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth(); + }, V.prototype.getEstimatedSize = function() { + if (this.estimatedSize == T.MIN_VALUE) + throw "assert failed"; + return this.estimatedSize; + }, V.prototype.calcEstimatedSize = function() { + for (var Q = 0, ne = this.nodes, ue = ne.length, J = 0; J < ue; J++) { + var j = ne[J]; + Q += j.calcEstimatedSize(); + } + return Q == 0 ? this.estimatedSize = x.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = Q / Math.sqrt(this.nodes.length), this.estimatedSize; + }, V.prototype.updateConnected = function() { + var Q = this; + if (this.nodes.length == 0) { + this.isConnected = !0; + return; + } + var ne = new D(), ue = /* @__PURE__ */ new Set(), J = this.nodes[0], j, Y, te = J.withChildren(); + for (te.forEach(function(ge) { + ne.push(ge), ue.add(ge); + }); ne.length !== 0; ) { + J = ne.shift(), j = J.getEdges(); + for (var L = j.length, $ = 0; $ < L; $++) { + var k = j[$]; + if (Y = k.getOtherEndInGraph(J, this), Y != null && !ue.has(Y)) { + var q = Y.withChildren(); + q.forEach(function(ge) { + ne.push(ge), ue.add(ge); + }); + } + } + } + if (this.isConnected = !1, ue.size >= this.nodes.length) { + var he = 0; + ue.forEach(function(ge) { + ge.owner == Q && he++; + }), he == this.nodes.length && (this.isConnected = !0); + } + }, ee.exports = V; + }, + /* 6 */ + /***/ + function(ee, ce, H) { + var O, T = H(1); + function x(S) { + O = H(5), this.layout = S, this.graphs = [], this.edges = []; + } + x.prototype.addRoot = function() { + var S = this.layout.newGraph(), G = this.layout.newNode(null), U = this.add(S, G); + return this.setRootGraph(U), this.rootGraph; + }, x.prototype.add = function(S, G, U, P, K) { + if (U == null && P == null && K == null) { + if (S == null) + throw "Graph is null!"; + if (G == null) + throw "Parent node is null!"; + if (this.graphs.indexOf(S) > -1) + throw "Graph already in this graph mgr!"; + if (this.graphs.push(S), S.parent != null) + throw "Already has a parent!"; + if (G.child != null) + throw "Already has a child!"; + return S.parent = G, G.child = S, S; + } else { + K = U, P = G, U = S; + var D = P.getOwner(), V = K.getOwner(); + if (!(D != null && D.getGraphManager() == this)) + throw "Source not in this graph mgr!"; + if (!(V != null && V.getGraphManager() == this)) + throw "Target not in this graph mgr!"; + if (D == V) + return U.isInterGraph = !1, D.add(U, P, K); + if (U.isInterGraph = !0, U.source = P, U.target = K, this.edges.indexOf(U) > -1) + throw "Edge already in inter-graph edge list!"; + if (this.edges.push(U), !(U.source != null && U.target != null)) + throw "Edge source and/or target is null!"; + if (!(U.source.edges.indexOf(U) == -1 && U.target.edges.indexOf(U) == -1)) + throw "Edge already in source and/or target incidency list!"; + return U.source.edges.push(U), U.target.edges.push(U), U; + } + }, x.prototype.remove = function(S) { + if (S instanceof O) { + var G = S; + if (G.getGraphManager() != this) + throw "Graph not in this graph mgr"; + if (!(G == this.rootGraph || G.parent != null && G.parent.graphManager == this)) + throw "Invalid parent node!"; + var U = []; + U = U.concat(G.getEdges()); + for (var P, K = U.length, D = 0; D < K; D++) + P = U[D], G.remove(P); + var V = []; + V = V.concat(G.getNodes()); + var _; + K = V.length; + for (var D = 0; D < K; D++) + _ = V[D], G.remove(_); + G == this.rootGraph && this.setRootGraph(null); + var Q = this.graphs.indexOf(G); + this.graphs.splice(Q, 1), G.parent = null; + } else if (S instanceof T) { + if (P = S, P == null) + throw "Edge is null!"; + if (!P.isInterGraph) + throw "Not an inter-graph edge!"; + if (!(P.source != null && P.target != null)) + throw "Source and/or target is null!"; + if (!(P.source.edges.indexOf(P) != -1 && P.target.edges.indexOf(P) != -1)) + throw "Source and/or target doesn't know this edge!"; + var Q = P.source.edges.indexOf(P); + if (P.source.edges.splice(Q, 1), Q = P.target.edges.indexOf(P), P.target.edges.splice(Q, 1), !(P.source.owner != null && P.source.owner.getGraphManager() != null)) + throw "Edge owner graph or owner graph manager is null!"; + if (P.source.owner.getGraphManager().edges.indexOf(P) == -1) + throw "Not in owner graph manager's edge list!"; + var Q = P.source.owner.getGraphManager().edges.indexOf(P); + P.source.owner.getGraphManager().edges.splice(Q, 1); + } + }, x.prototype.updateBounds = function() { + this.rootGraph.updateBounds(!0); + }, x.prototype.getGraphs = function() { + return this.graphs; + }, x.prototype.getAllNodes = function() { + if (this.allNodes == null) { + for (var S = [], G = this.getGraphs(), U = G.length, P = 0; P < U; P++) + S = S.concat(G[P].getNodes()); + this.allNodes = S; + } + return this.allNodes; + }, x.prototype.resetAllNodes = function() { + this.allNodes = null; + }, x.prototype.resetAllEdges = function() { + this.allEdges = null; + }, x.prototype.resetAllNodesToApplyGravitation = function() { + this.allNodesToApplyGravitation = null; + }, x.prototype.getAllEdges = function() { + if (this.allEdges == null) { + var S = [], G = this.getGraphs(); + G.length; + for (var U = 0; U < G.length; U++) + S = S.concat(G[U].getEdges()); + S = S.concat(this.edges), this.allEdges = S; + } + return this.allEdges; + }, x.prototype.getAllNodesToApplyGravitation = function() { + return this.allNodesToApplyGravitation; + }, x.prototype.setAllNodesToApplyGravitation = function(S) { + if (this.allNodesToApplyGravitation != null) + throw "assert failed"; + this.allNodesToApplyGravitation = S; + }, x.prototype.getRoot = function() { + return this.rootGraph; + }, x.prototype.setRootGraph = function(S) { + if (S.getGraphManager() != this) + throw "Root not in this graph mgr!"; + this.rootGraph = S, S.parent == null && (S.parent = this.layout.newNode("Root node")); + }, x.prototype.getLayout = function() { + return this.layout; + }, x.prototype.isOneAncestorOfOther = function(S, G) { + if (!(S != null && G != null)) + throw "assert failed"; + if (S == G) + return !0; + var U = S.getOwner(), P; + do { + if (P = U.getParent(), P == null) + break; + if (P == G) + return !0; + if (U = P.getOwner(), U == null) + break; + } while (!0); + U = G.getOwner(); + do { + if (P = U.getParent(), P == null) + break; + if (P == S) + return !0; + if (U = P.getOwner(), U == null) + break; + } while (!0); + return !1; + }, x.prototype.calcLowestCommonAncestors = function() { + for (var S, G, U, P, K, D = this.getAllEdges(), V = D.length, _ = 0; _ < V; _++) { + if (S = D[_], G = S.source, U = S.target, S.lca = null, S.sourceInLca = G, S.targetInLca = U, G == U) { + S.lca = G.getOwner(); + continue; + } + for (P = G.getOwner(); S.lca == null; ) { + for (S.targetInLca = U, K = U.getOwner(); S.lca == null; ) { + if (K == P) { + S.lca = K; + break; + } + if (K == this.rootGraph) + break; + if (S.lca != null) + throw "assert failed"; + S.targetInLca = K.getParent(), K = S.targetInLca.getOwner(); + } + if (P == this.rootGraph) + break; + S.lca == null && (S.sourceInLca = P.getParent(), P = S.sourceInLca.getOwner()); + } + if (S.lca == null) + throw "assert failed"; + } + }, x.prototype.calcLowestCommonAncestor = function(S, G) { + if (S == G) + return S.getOwner(); + var U = S.getOwner(); + do { + if (U == null) + break; + var P = G.getOwner(); + do { + if (P == null) + break; + if (P == U) + return P; + P = P.getParent().getOwner(); + } while (!0); + U = U.getParent().getOwner(); + } while (!0); + return U; + }, x.prototype.calcInclusionTreeDepths = function(S, G) { + S == null && G == null && (S = this.rootGraph, G = 1); + for (var U, P = S.getNodes(), K = P.length, D = 0; D < K; D++) + U = P[D], U.inclusionTreeDepth = G, U.child != null && this.calcInclusionTreeDepths(U.child, G + 1); + }, x.prototype.includesInvalidEdge = function() { + for (var S, G = this.edges.length, U = 0; U < G; U++) + if (S = this.edges[U], this.isOneAncestorOfOther(S.source, S.target)) + return !0; + return !1; + }, ee.exports = x; + }, + /* 7 */ + /***/ + function(ee, ce, H) { + var O = H(0); + function T() { + } + for (var x in O) + T[x] = O[x]; + T.MAX_ITERATIONS = 2500, T.DEFAULT_EDGE_LENGTH = 50, T.DEFAULT_SPRING_STRENGTH = 0.45, T.DEFAULT_REPULSION_STRENGTH = 4500, T.DEFAULT_GRAVITY_STRENGTH = 0.4, T.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, T.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, T.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, T.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, T.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, T.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, T.COOLING_ADAPTATION_FACTOR = 0.33, T.ADAPTATION_LOWER_NODE_LIMIT = 1e3, T.ADAPTATION_UPPER_NODE_LIMIT = 5e3, T.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, T.MAX_NODE_DISPLACEMENT = T.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, T.MIN_REPULSION_DIST = T.DEFAULT_EDGE_LENGTH / 10, T.CONVERGENCE_CHECK_PERIOD = 100, T.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, T.MIN_EDGE_LENGTH = 1, T.GRID_CALCULATION_CHECK_PERIOD = 10, ee.exports = T; + }, + /* 8 */ + /***/ + function(ee, ce, H) { + var O = H(12); + function T() { + } + T.calcSeparationAmount = function(x, S, G, U) { + if (!x.intersects(S)) + throw "assert failed"; + var P = new Array(2); + this.decideDirectionsForOverlappingNodes(x, S, P), G[0] = Math.min(x.getRight(), S.getRight()) - Math.max(x.x, S.x), G[1] = Math.min(x.getBottom(), S.getBottom()) - Math.max(x.y, S.y), x.getX() <= S.getX() && x.getRight() >= S.getRight() ? G[0] += Math.min(S.getX() - x.getX(), x.getRight() - S.getRight()) : S.getX() <= x.getX() && S.getRight() >= x.getRight() && (G[0] += Math.min(x.getX() - S.getX(), S.getRight() - x.getRight())), x.getY() <= S.getY() && x.getBottom() >= S.getBottom() ? G[1] += Math.min(S.getY() - x.getY(), x.getBottom() - S.getBottom()) : S.getY() <= x.getY() && S.getBottom() >= x.getBottom() && (G[1] += Math.min(x.getY() - S.getY(), S.getBottom() - x.getBottom())); + var K = Math.abs((S.getCenterY() - x.getCenterY()) / (S.getCenterX() - x.getCenterX())); + S.getCenterY() === x.getCenterY() && S.getCenterX() === x.getCenterX() && (K = 1); + var D = K * G[0], V = G[1] / K; + G[0] < V ? V = G[0] : D = G[1], G[0] = -1 * P[0] * (V / 2 + U), G[1] = -1 * P[1] * (D / 2 + U); + }, T.decideDirectionsForOverlappingNodes = function(x, S, G) { + x.getCenterX() < S.getCenterX() ? G[0] = -1 : G[0] = 1, x.getCenterY() < S.getCenterY() ? G[1] = -1 : G[1] = 1; + }, T.getIntersection2 = function(x, S, G) { + var U = x.getCenterX(), P = x.getCenterY(), K = S.getCenterX(), D = S.getCenterY(); + if (x.intersects(S)) + return G[0] = U, G[1] = P, G[2] = K, G[3] = D, !0; + var V = x.getX(), _ = x.getY(), Q = x.getRight(), ne = x.getX(), ue = x.getBottom(), J = x.getRight(), j = x.getWidthHalf(), Y = x.getHeightHalf(), te = S.getX(), L = S.getY(), $ = S.getRight(), k = S.getX(), q = S.getBottom(), he = S.getRight(), ge = S.getWidthHalf(), Ae = S.getHeightHalf(), Ne = !1, _e = !1; + if (U === K) { + if (P > D) + return G[0] = U, G[1] = _, G[2] = K, G[3] = q, !1; + if (P < D) + return G[0] = U, G[1] = ue, G[2] = K, G[3] = L, !1; + } else if (P === D) { + if (U > K) + return G[0] = V, G[1] = P, G[2] = $, G[3] = D, !1; + if (U < K) + return G[0] = Q, G[1] = P, G[2] = te, G[3] = D, !1; + } else { + var tt = x.height / x.width, ct = S.height / S.width, Pe = (D - P) / (K - U), $e = void 0, Xe = void 0, rt = void 0, lt = void 0, nt = void 0, je = void 0; + if (-tt === Pe ? U > K ? (G[0] = ne, G[1] = ue, Ne = !0) : (G[0] = Q, G[1] = _, Ne = !0) : tt === Pe && (U > K ? (G[0] = V, G[1] = _, Ne = !0) : (G[0] = J, G[1] = ue, Ne = !0)), -ct === Pe ? K > U ? (G[2] = k, G[3] = q, _e = !0) : (G[2] = $, G[3] = L, _e = !0) : ct === Pe && (K > U ? (G[2] = te, G[3] = L, _e = !0) : (G[2] = he, G[3] = q, _e = !0)), Ne && _e) + return !1; + if (U > K ? P > D ? ($e = this.getCardinalDirection(tt, Pe, 4), Xe = this.getCardinalDirection(ct, Pe, 2)) : ($e = this.getCardinalDirection(-tt, Pe, 3), Xe = this.getCardinalDirection(-ct, Pe, 1)) : P > D ? ($e = this.getCardinalDirection(-tt, Pe, 1), Xe = this.getCardinalDirection(-ct, Pe, 3)) : ($e = this.getCardinalDirection(tt, Pe, 2), Xe = this.getCardinalDirection(ct, Pe, 4)), !Ne) + switch ($e) { + case 1: + lt = _, rt = U + -Y / Pe, G[0] = rt, G[1] = lt; + break; + case 2: + rt = J, lt = P + j * Pe, G[0] = rt, G[1] = lt; + break; + case 3: + lt = ue, rt = U + Y / Pe, G[0] = rt, G[1] = lt; + break; + case 4: + rt = ne, lt = P + -j * Pe, G[0] = rt, G[1] = lt; + break; + } + if (!_e) + switch (Xe) { + case 1: + je = L, nt = K + -Ae / Pe, G[2] = nt, G[3] = je; + break; + case 2: + nt = he, je = D + ge * Pe, G[2] = nt, G[3] = je; + break; + case 3: + je = q, nt = K + Ae / Pe, G[2] = nt, G[3] = je; + break; + case 4: + nt = k, je = D + -ge * Pe, G[2] = nt, G[3] = je; + break; + } + } + return !1; + }, T.getCardinalDirection = function(x, S, G) { + return x > S ? G : 1 + G % 4; + }, T.getIntersection = function(x, S, G, U) { + if (U == null) + return this.getIntersection2(x, S, G); + var P = x.x, K = x.y, D = S.x, V = S.y, _ = G.x, Q = G.y, ne = U.x, ue = U.y, J = void 0, j = void 0, Y = void 0, te = void 0, L = void 0, $ = void 0, k = void 0, q = void 0, he = void 0; + return Y = V - K, L = P - D, k = D * K - P * V, te = ue - Q, $ = _ - ne, q = ne * Q - _ * ue, he = Y * $ - te * L, he === 0 ? null : (J = (L * q - $ * k) / he, j = (te * k - Y * q) / he, new O(J, j)); + }, T.angleOfVector = function(x, S, G, U) { + var P = void 0; + return x !== G ? (P = Math.atan((U - S) / (G - x)), G < x ? P += Math.PI : U < S && (P += this.TWO_PI)) : U < S ? P = this.ONE_AND_HALF_PI : P = this.HALF_PI, P; + }, T.doIntersect = function(x, S, G, U) { + var P = x.x, K = x.y, D = S.x, V = S.y, _ = G.x, Q = G.y, ne = U.x, ue = U.y, J = (D - P) * (ue - Q) - (ne - _) * (V - K); + if (J === 0) + return !1; + var j = ((ue - Q) * (ne - P) + (_ - ne) * (ue - K)) / J, Y = ((K - V) * (ne - P) + (D - P) * (ue - K)) / J; + return 0 < j && j < 1 && 0 < Y && Y < 1; + }, T.HALF_PI = 0.5 * Math.PI, T.ONE_AND_HALF_PI = 1.5 * Math.PI, T.TWO_PI = 2 * Math.PI, T.THREE_PI = 3 * Math.PI, ee.exports = T; + }, + /* 9 */ + /***/ + function(ee, ce, H) { + function O() { + } + O.sign = function(T) { + return T > 0 ? 1 : T < 0 ? -1 : 0; + }, O.floor = function(T) { + return T < 0 ? Math.ceil(T) : Math.floor(T); + }, O.ceil = function(T) { + return T < 0 ? Math.floor(T) : Math.ceil(T); + }, ee.exports = O; + }, + /* 10 */ + /***/ + function(ee, ce, H) { + function O() { + } + O.MAX_VALUE = 2147483647, O.MIN_VALUE = -2147483648, ee.exports = O; + }, + /* 11 */ + /***/ + function(ee, ce, H) { + var O = function() { + function P(K, D) { + for (var V = 0; V < D.length; V++) { + var _ = D[V]; + _.enumerable = _.enumerable || !1, _.configurable = !0, "value" in _ && (_.writable = !0), Object.defineProperty(K, _.key, _); + } + } + return function(K, D, V) { + return D && P(K.prototype, D), V && P(K, V), K; + }; + }(); + function T(P, K) { + if (!(P instanceof K)) + throw new TypeError("Cannot call a class as a function"); + } + var x = function(K) { + return { value: K, next: null, prev: null }; + }, S = function(K, D, V, _) { + return K !== null ? K.next = D : _.head = D, V !== null ? V.prev = D : _.tail = D, D.prev = K, D.next = V, _.length++, D; + }, G = function(K, D) { + var V = K.prev, _ = K.next; + return V !== null ? V.next = _ : D.head = _, _ !== null ? _.prev = V : D.tail = V, K.prev = K.next = null, D.length--, K; + }, U = function() { + function P(K) { + var D = this; + T(this, P), this.length = 0, this.head = null, this.tail = null, K != null && K.forEach(function(V) { + return D.push(V); + }); + } + return O(P, [{ + key: "size", + value: function() { + return this.length; + } + }, { + key: "insertBefore", + value: function(D, V) { + return S(V.prev, x(D), V, this); + } + }, { + key: "insertAfter", + value: function(D, V) { + return S(V, x(D), V.next, this); + } + }, { + key: "insertNodeBefore", + value: function(D, V) { + return S(V.prev, D, V, this); + } + }, { + key: "insertNodeAfter", + value: function(D, V) { + return S(V, D, V.next, this); + } + }, { + key: "push", + value: function(D) { + return S(this.tail, x(D), null, this); + } + }, { + key: "unshift", + value: function(D) { + return S(null, x(D), this.head, this); + } + }, { + key: "remove", + value: function(D) { + return G(D, this); + } + }, { + key: "pop", + value: function() { + return G(this.tail, this).value; + } + }, { + key: "popNode", + value: function() { + return G(this.tail, this); + } + }, { + key: "shift", + value: function() { + return G(this.head, this).value; + } + }, { + key: "shiftNode", + value: function() { + return G(this.head, this); + } + }, { + key: "get_object_at", + value: function(D) { + if (D <= this.length()) { + for (var V = 1, _ = this.head; V < D; ) + _ = _.next, V++; + return _.value; + } + } + }, { + key: "set_object_at", + value: function(D, V) { + if (D <= this.length()) { + for (var _ = 1, Q = this.head; _ < D; ) + Q = Q.next, _++; + Q.value = V; + } + } + }]), P; + }(); + ee.exports = U; + }, + /* 12 */ + /***/ + function(ee, ce, H) { + function O(T, x, S) { + this.x = null, this.y = null, T == null && x == null && S == null ? (this.x = 0, this.y = 0) : typeof T == "number" && typeof x == "number" && S == null ? (this.x = T, this.y = x) : T.constructor.name == "Point" && x == null && S == null && (S = T, this.x = S.x, this.y = S.y); + } + O.prototype.getX = function() { + return this.x; + }, O.prototype.getY = function() { + return this.y; + }, O.prototype.getLocation = function() { + return new O(this.x, this.y); + }, O.prototype.setLocation = function(T, x, S) { + T.constructor.name == "Point" && x == null && S == null ? (S = T, this.setLocation(S.x, S.y)) : typeof T == "number" && typeof x == "number" && S == null && (parseInt(T) == T && parseInt(x) == x ? this.move(T, x) : (this.x = Math.floor(T + 0.5), this.y = Math.floor(x + 0.5))); + }, O.prototype.move = function(T, x) { + this.x = T, this.y = x; + }, O.prototype.translate = function(T, x) { + this.x += T, this.y += x; + }, O.prototype.equals = function(T) { + if (T.constructor.name == "Point") { + var x = T; + return this.x == x.x && this.y == x.y; + } + return this == T; + }, O.prototype.toString = function() { + return new O().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; + }, ee.exports = O; + }, + /* 13 */ + /***/ + function(ee, ce, H) { + function O(T, x, S, G) { + this.x = 0, this.y = 0, this.width = 0, this.height = 0, T != null && x != null && S != null && G != null && (this.x = T, this.y = x, this.width = S, this.height = G); + } + O.prototype.getX = function() { + return this.x; + }, O.prototype.setX = function(T) { + this.x = T; + }, O.prototype.getY = function() { + return this.y; + }, O.prototype.setY = function(T) { + this.y = T; + }, O.prototype.getWidth = function() { + return this.width; + }, O.prototype.setWidth = function(T) { + this.width = T; + }, O.prototype.getHeight = function() { + return this.height; + }, O.prototype.setHeight = function(T) { + this.height = T; + }, O.prototype.getRight = function() { + return this.x + this.width; + }, O.prototype.getBottom = function() { + return this.y + this.height; + }, O.prototype.intersects = function(T) { + return !(this.getRight() < T.x || this.getBottom() < T.y || T.getRight() < this.x || T.getBottom() < this.y); + }, O.prototype.getCenterX = function() { + return this.x + this.width / 2; + }, O.prototype.getMinX = function() { + return this.getX(); + }, O.prototype.getMaxX = function() { + return this.getX() + this.width; + }, O.prototype.getCenterY = function() { + return this.y + this.height / 2; + }, O.prototype.getMinY = function() { + return this.getY(); + }, O.prototype.getMaxY = function() { + return this.getY() + this.height; + }, O.prototype.getWidthHalf = function() { + return this.width / 2; + }, O.prototype.getHeightHalf = function() { + return this.height / 2; + }, ee.exports = O; + }, + /* 14 */ + /***/ + function(ee, ce, H) { + var O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(x) { + return typeof x; + } : function(x) { + return x && typeof Symbol == "function" && x.constructor === Symbol && x !== Symbol.prototype ? "symbol" : typeof x; + }; + function T() { + } + T.lastID = 0, T.createID = function(x) { + return T.isPrimitive(x) ? x : (x.uniqueID != null || (x.uniqueID = T.getString(), T.lastID++), x.uniqueID); + }, T.getString = function(x) { + return x == null && (x = T.lastID), "Object#" + x; + }, T.isPrimitive = function(x) { + var S = typeof x > "u" ? "undefined" : O(x); + return x == null || S != "object" && S != "function"; + }, ee.exports = T; + }, + /* 15 */ + /***/ + function(ee, ce, H) { + function O(_) { + if (Array.isArray(_)) { + for (var Q = 0, ne = Array(_.length); Q < _.length; Q++) + ne[Q] = _[Q]; + return ne; + } else + return Array.from(_); + } + var T = H(0), x = H(6), S = H(3), G = H(1), U = H(5), P = H(4), K = H(17), D = H(27); + function V(_) { + D.call(this), this.layoutQuality = T.QUALITY, this.createBendsAsNeeded = T.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = T.DEFAULT_INCREMENTAL, this.animationOnLayout = T.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = T.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = T.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = T.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new x(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, _ != null && (this.isRemoteUse = _); + } + V.RANDOM_SEED = 1, V.prototype = Object.create(D.prototype), V.prototype.getGraphManager = function() { + return this.graphManager; + }, V.prototype.getAllNodes = function() { + return this.graphManager.getAllNodes(); + }, V.prototype.getAllEdges = function() { + return this.graphManager.getAllEdges(); + }, V.prototype.getAllNodesToApplyGravitation = function() { + return this.graphManager.getAllNodesToApplyGravitation(); + }, V.prototype.newGraphManager = function() { + var _ = new x(this); + return this.graphManager = _, _; + }, V.prototype.newGraph = function(_) { + return new U(null, this.graphManager, _); + }, V.prototype.newNode = function(_) { + return new S(this.graphManager, _); + }, V.prototype.newEdge = function(_) { + return new G(null, null, _); + }, V.prototype.checkLayoutSuccess = function() { + return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); + }, V.prototype.runLayout = function() { + this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters(); + var _; + return this.checkLayoutSuccess() ? _ = !1 : _ = this.layout(), T.ANIMATE === "during" ? !1 : (_ && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, _); + }, V.prototype.doPostLayout = function() { + this.incremental || this.transform(), this.update(); + }, V.prototype.update2 = function() { + if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) { + for (var _ = this.graphManager.getAllEdges(), Q = 0; Q < _.length; Q++) + _[Q]; + for (var ne = this.graphManager.getRoot().getNodes(), Q = 0; Q < ne.length; Q++) + ne[Q]; + this.update(this.graphManager.getRoot()); + } + }, V.prototype.update = function(_) { + if (_ == null) + this.update2(); + else if (_ instanceof S) { + var Q = _; + if (Q.getChild() != null) + for (var ne = Q.getChild().getNodes(), ue = 0; ue < ne.length; ue++) + update(ne[ue]); + if (Q.vGraphObject != null) { + var J = Q.vGraphObject; + J.update(Q); + } + } else if (_ instanceof G) { + var j = _; + if (j.vGraphObject != null) { + var Y = j.vGraphObject; + Y.update(j); + } + } else if (_ instanceof U) { + var te = _; + if (te.vGraphObject != null) { + var L = te.vGraphObject; + L.update(te); + } + } + }, V.prototype.initParameters = function() { + this.isSubLayout || (this.layoutQuality = T.QUALITY, this.animationDuringLayout = T.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = T.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = T.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = T.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = T.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = T.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1); + }, V.prototype.transform = function(_) { + if (_ == null) + this.transform(new P(0, 0)); + else { + var Q = new K(), ne = this.graphManager.getRoot().updateLeftTop(); + if (ne != null) { + Q.setWorldOrgX(_.x), Q.setWorldOrgY(_.y), Q.setDeviceOrgX(ne.x), Q.setDeviceOrgY(ne.y); + for (var ue = this.getAllNodes(), J, j = 0; j < ue.length; j++) + J = ue[j], J.transform(Q); + } + } + }, V.prototype.positionNodesRandomly = function(_) { + if (_ == null) + this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0); + else + for (var Q, ne, ue = _.getNodes(), J = 0; J < ue.length; J++) + Q = ue[J], ne = Q.getChild(), ne == null || ne.getNodes().length == 0 ? Q.scatter() : (this.positionNodesRandomly(ne), Q.updateBounds()); + }, V.prototype.getFlatForest = function() { + for (var _ = [], Q = !0, ne = this.graphManager.getRoot().getNodes(), ue = !0, J = 0; J < ne.length; J++) + ne[J].getChild() != null && (ue = !1); + if (!ue) + return _; + var j = /* @__PURE__ */ new Set(), Y = [], te = /* @__PURE__ */ new Map(), L = []; + for (L = L.concat(ne); L.length > 0 && Q; ) { + for (Y.push(L[0]); Y.length > 0 && Q; ) { + var $ = Y[0]; + Y.splice(0, 1), j.add($); + for (var k = $.getEdges(), J = 0; J < k.length; J++) { + var q = k[J].getOtherEnd($); + if (te.get($) != q) + if (!j.has(q)) + Y.push(q), te.set(q, $); + else { + Q = !1; + break; + } + } + } + if (!Q) + _ = []; + else { + var he = [].concat(O(j)); + _.push(he); + for (var J = 0; J < he.length; J++) { + var ge = he[J], Ae = L.indexOf(ge); + Ae > -1 && L.splice(Ae, 1); + } + j = /* @__PURE__ */ new Set(), te = /* @__PURE__ */ new Map(); + } + } + return _; + }, V.prototype.createDummyNodesForBendpoints = function(_) { + for (var Q = [], ne = _.source, ue = this.graphManager.calcLowestCommonAncestor(_.source, _.target), J = 0; J < _.bendpoints.length; J++) { + var j = this.newNode(null); + j.setRect(new Point(0, 0), new Dimension(1, 1)), ue.add(j); + var Y = this.newEdge(null); + this.graphManager.add(Y, ne, j), Q.add(j), ne = j; + } + var Y = this.newEdge(null); + return this.graphManager.add(Y, ne, _.target), this.edgeToDummyNodes.set(_, Q), _.isInterGraph() ? this.graphManager.remove(_) : ue.remove(_), Q; + }, V.prototype.createBendpointsFromDummyNodes = function() { + var _ = []; + _ = _.concat(this.graphManager.getAllEdges()), _ = [].concat(O(this.edgeToDummyNodes.keys())).concat(_); + for (var Q = 0; Q < _.length; Q++) { + var ne = _[Q]; + if (ne.bendpoints.length > 0) { + for (var ue = this.edgeToDummyNodes.get(ne), J = 0; J < ue.length; J++) { + var j = ue[J], Y = new P(j.getCenterX(), j.getCenterY()), te = ne.bendpoints.get(J); + te.x = Y.x, te.y = Y.y, j.getOwner().remove(j); + } + this.graphManager.add(ne, ne.source, ne.target); + } + } + }, V.transform = function(_, Q, ne, ue) { + if (ne != null && ue != null) { + var J = Q; + if (_ <= 50) { + var j = Q / ne; + J -= (Q - j) / 50 * (50 - _); + } else { + var Y = Q * ue; + J += (Y - Q) / 50 * (_ - 50); + } + return J; + } else { + var te, L; + return _ <= 50 ? (te = 9 * Q / 500, L = Q / 10) : (te = 9 * Q / 50, L = -8 * Q), te * _ + L; + } + }, V.findCenterOfTree = function(_) { + var Q = []; + Q = Q.concat(_); + var ne = [], ue = /* @__PURE__ */ new Map(), J = !1, j = null; + (Q.length == 1 || Q.length == 2) && (J = !0, j = Q[0]); + for (var Y = 0; Y < Q.length; Y++) { + var te = Q[Y], L = te.getNeighborsList().size; + ue.set(te, te.getNeighborsList().size), L == 1 && ne.push(te); + } + var $ = []; + for ($ = $.concat(ne); !J; ) { + var k = []; + k = k.concat($), $ = []; + for (var Y = 0; Y < Q.length; Y++) { + var te = Q[Y], q = Q.indexOf(te); + q >= 0 && Q.splice(q, 1); + var he = te.getNeighborsList(); + he.forEach(function(Ne) { + if (ne.indexOf(Ne) < 0) { + var _e = ue.get(Ne), tt = _e - 1; + tt == 1 && $.push(Ne), ue.set(Ne, tt); + } + }); + } + ne = ne.concat($), (Q.length == 1 || Q.length == 2) && (J = !0, j = Q[0]); + } + return j; + }, V.prototype.setGraphManager = function(_) { + this.graphManager = _; + }, ee.exports = V; + }, + /* 16 */ + /***/ + function(ee, ce, H) { + function O() { + } + O.seed = 1, O.x = 0, O.nextDouble = function() { + return O.x = Math.sin(O.seed++) * 1e4, O.x - Math.floor(O.x); + }, ee.exports = O; + }, + /* 17 */ + /***/ + function(ee, ce, H) { + var O = H(4); + function T(x, S) { + this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1; + } + T.prototype.getWorldOrgX = function() { + return this.lworldOrgX; + }, T.prototype.setWorldOrgX = function(x) { + this.lworldOrgX = x; + }, T.prototype.getWorldOrgY = function() { + return this.lworldOrgY; + }, T.prototype.setWorldOrgY = function(x) { + this.lworldOrgY = x; + }, T.prototype.getWorldExtX = function() { + return this.lworldExtX; + }, T.prototype.setWorldExtX = function(x) { + this.lworldExtX = x; + }, T.prototype.getWorldExtY = function() { + return this.lworldExtY; + }, T.prototype.setWorldExtY = function(x) { + this.lworldExtY = x; + }, T.prototype.getDeviceOrgX = function() { + return this.ldeviceOrgX; + }, T.prototype.setDeviceOrgX = function(x) { + this.ldeviceOrgX = x; + }, T.prototype.getDeviceOrgY = function() { + return this.ldeviceOrgY; + }, T.prototype.setDeviceOrgY = function(x) { + this.ldeviceOrgY = x; + }, T.prototype.getDeviceExtX = function() { + return this.ldeviceExtX; + }, T.prototype.setDeviceExtX = function(x) { + this.ldeviceExtX = x; + }, T.prototype.getDeviceExtY = function() { + return this.ldeviceExtY; + }, T.prototype.setDeviceExtY = function(x) { + this.ldeviceExtY = x; + }, T.prototype.transformX = function(x) { + var S = 0, G = this.lworldExtX; + return G != 0 && (S = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / G), S; + }, T.prototype.transformY = function(x) { + var S = 0, G = this.lworldExtY; + return G != 0 && (S = this.ldeviceOrgY + (x - this.lworldOrgY) * this.ldeviceExtY / G), S; + }, T.prototype.inverseTransformX = function(x) { + var S = 0, G = this.ldeviceExtX; + return G != 0 && (S = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / G), S; + }, T.prototype.inverseTransformY = function(x) { + var S = 0, G = this.ldeviceExtY; + return G != 0 && (S = this.lworldOrgY + (x - this.ldeviceOrgY) * this.lworldExtY / G), S; + }, T.prototype.inverseTransformPoint = function(x) { + var S = new O(this.inverseTransformX(x.x), this.inverseTransformY(x.y)); + return S; + }, ee.exports = T; + }, + /* 18 */ + /***/ + function(ee, ce, H) { + function O(D) { + if (Array.isArray(D)) { + for (var V = 0, _ = Array(D.length); V < D.length; V++) + _[V] = D[V]; + return _; + } else + return Array.from(D); + } + var T = H(15), x = H(7), S = H(0), G = H(8), U = H(9); + function P() { + T.call(this), this.useSmartIdealEdgeLengthCalculation = x.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = x.DEFAULT_EDGE_LENGTH, this.springConstant = x.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = x.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = x.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = x.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = x.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = x.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * x.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = x.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = x.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = x.MAX_ITERATIONS; + } + P.prototype = Object.create(T.prototype); + for (var K in T) + P[K] = T[K]; + P.prototype.initParameters = function() { + T.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = x.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = []; + }, P.prototype.calcIdealEdgeLengths = function() { + for (var D, V, _, Q, ne, ue, J = this.getGraphManager().getAllEdges(), j = 0; j < J.length; j++) + D = J[j], D.idealLength = this.idealEdgeLength, D.isInterGraph && (_ = D.getSource(), Q = D.getTarget(), ne = D.getSourceInLca().getEstimatedSize(), ue = D.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (D.idealLength += ne + ue - 2 * S.SIMPLE_NODE_SIZE), V = D.getLca().getInclusionTreeDepth(), D.idealLength += x.DEFAULT_EDGE_LENGTH * x.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (_.getInclusionTreeDepth() + Q.getInclusionTreeDepth() - 2 * V)); + }, P.prototype.initSpringEmbedder = function() { + var D = this.getAllNodes().length; + this.incremental ? (D > x.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * x.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (D - x.ADAPTATION_LOWER_NODE_LIMIT) / (x.ADAPTATION_UPPER_NODE_LIMIT - x.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - x.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = x.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (D > x.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(x.COOLING_ADAPTATION_FACTOR, 1 - (D - x.ADAPTATION_LOWER_NODE_LIMIT) / (x.ADAPTATION_UPPER_NODE_LIMIT - x.ADAPTATION_LOWER_NODE_LIMIT) * (1 - x.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = x.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange(); + }, P.prototype.calcSpringForces = function() { + for (var D = this.getAllEdges(), V, _ = 0; _ < D.length; _++) + V = D[_], this.calcSpringForce(V, V.idealLength); + }, P.prototype.calcRepulsionForces = function() { + var D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, _, Q, ne, ue, J = this.getAllNodes(), j; + if (this.useFRGridVariant) + for (this.totalIterations % x.GRID_CALCULATION_CHECK_PERIOD == 1 && D && this.updateGrid(), j = /* @__PURE__ */ new Set(), _ = 0; _ < J.length; _++) + ne = J[_], this.calculateRepulsionForceOfANode(ne, j, D, V), j.add(ne); + else + for (_ = 0; _ < J.length; _++) + for (ne = J[_], Q = _ + 1; Q < J.length; Q++) + ue = J[Q], ne.getOwner() == ue.getOwner() && this.calcRepulsionForce(ne, ue); + }, P.prototype.calcGravitationalForces = function() { + for (var D, V = this.getAllNodesToApplyGravitation(), _ = 0; _ < V.length; _++) + D = V[_], this.calcGravitationalForce(D); + }, P.prototype.moveNodes = function() { + for (var D = this.getAllNodes(), V, _ = 0; _ < D.length; _++) + V = D[_], V.move(); + }, P.prototype.calcSpringForce = function(D, V) { + var _ = D.getSource(), Q = D.getTarget(), ne, ue, J, j; + if (this.uniformLeafNodeSizes && _.getChild() == null && Q.getChild() == null) + D.updateLengthSimple(); + else if (D.updateLength(), D.isOverlapingSourceAndTarget) + return; + ne = D.getLength(), ne != 0 && (ue = this.springConstant * (ne - V), J = ue * (D.lengthX / ne), j = ue * (D.lengthY / ne), _.springForceX += J, _.springForceY += j, Q.springForceX -= J, Q.springForceY -= j); + }, P.prototype.calcRepulsionForce = function(D, V) { + var _ = D.getRect(), Q = V.getRect(), ne = new Array(2), ue = new Array(4), J, j, Y, te, L, $, k; + if (_.intersects(Q)) { + G.calcSeparationAmount(_, Q, ne, x.DEFAULT_EDGE_LENGTH / 2), $ = 2 * ne[0], k = 2 * ne[1]; + var q = D.noOfChildren * V.noOfChildren / (D.noOfChildren + V.noOfChildren); + D.repulsionForceX -= q * $, D.repulsionForceY -= q * k, V.repulsionForceX += q * $, V.repulsionForceY += q * k; + } else + this.uniformLeafNodeSizes && D.getChild() == null && V.getChild() == null ? (J = Q.getCenterX() - _.getCenterX(), j = Q.getCenterY() - _.getCenterY()) : (G.getIntersection(_, Q, ue), J = ue[2] - ue[0], j = ue[3] - ue[1]), Math.abs(J) < x.MIN_REPULSION_DIST && (J = U.sign(J) * x.MIN_REPULSION_DIST), Math.abs(j) < x.MIN_REPULSION_DIST && (j = U.sign(j) * x.MIN_REPULSION_DIST), Y = J * J + j * j, te = Math.sqrt(Y), L = this.repulsionConstant * D.noOfChildren * V.noOfChildren / Y, $ = L * J / te, k = L * j / te, D.repulsionForceX -= $, D.repulsionForceY -= k, V.repulsionForceX += $, V.repulsionForceY += k; + }, P.prototype.calcGravitationalForce = function(D) { + var V, _, Q, ne, ue, J, j, Y; + V = D.getOwner(), _ = (V.getRight() + V.getLeft()) / 2, Q = (V.getTop() + V.getBottom()) / 2, ne = D.getCenterX() - _, ue = D.getCenterY() - Q, J = Math.abs(ne) + D.getWidth() / 2, j = Math.abs(ue) + D.getHeight() / 2, D.getOwner() == this.graphManager.getRoot() ? (Y = V.getEstimatedSize() * this.gravityRangeFactor, (J > Y || j > Y) && (D.gravitationForceX = -this.gravityConstant * ne, D.gravitationForceY = -this.gravityConstant * ue)) : (Y = V.getEstimatedSize() * this.compoundGravityRangeFactor, (J > Y || j > Y) && (D.gravitationForceX = -this.gravityConstant * ne * this.compoundGravityConstant, D.gravitationForceY = -this.gravityConstant * ue * this.compoundGravityConstant)); + }, P.prototype.isConverged = function() { + var D, V = !1; + return this.totalIterations > this.maxIterations / 3 && (V = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), D = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, D || V; + }, P.prototype.animate = function() { + this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++); + }, P.prototype.calcNoOfChildrenForAllNodes = function() { + for (var D, V = this.graphManager.getAllNodes(), _ = 0; _ < V.length; _++) + D = V[_], D.noOfChildren = D.getNoOfChildren(); + }, P.prototype.calcGrid = function(D) { + var V = 0, _ = 0; + V = parseInt(Math.ceil((D.getRight() - D.getLeft()) / this.repulsionRange)), _ = parseInt(Math.ceil((D.getBottom() - D.getTop()) / this.repulsionRange)); + for (var Q = new Array(V), ne = 0; ne < V; ne++) + Q[ne] = new Array(_); + for (var ne = 0; ne < V; ne++) + for (var ue = 0; ue < _; ue++) + Q[ne][ue] = new Array(); + return Q; + }, P.prototype.addNodeToGrid = function(D, V, _) { + var Q = 0, ne = 0, ue = 0, J = 0; + Q = parseInt(Math.floor((D.getRect().x - V) / this.repulsionRange)), ne = parseInt(Math.floor((D.getRect().width + D.getRect().x - V) / this.repulsionRange)), ue = parseInt(Math.floor((D.getRect().y - _) / this.repulsionRange)), J = parseInt(Math.floor((D.getRect().height + D.getRect().y - _) / this.repulsionRange)); + for (var j = Q; j <= ne; j++) + for (var Y = ue; Y <= J; Y++) + this.grid[j][Y].push(D), D.setGridCoordinates(Q, ne, ue, J); + }, P.prototype.updateGrid = function() { + var D, V, _ = this.getAllNodes(); + for (this.grid = this.calcGrid(this.graphManager.getRoot()), D = 0; D < _.length; D++) + V = _[D], this.addNodeToGrid(V, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + }, P.prototype.calculateRepulsionForceOfANode = function(D, V, _, Q) { + if (this.totalIterations % x.GRID_CALCULATION_CHECK_PERIOD == 1 && _ || Q) { + var ne = /* @__PURE__ */ new Set(); + D.surrounding = new Array(); + for (var ue, J = this.grid, j = D.startX - 1; j < D.finishX + 2; j++) + for (var Y = D.startY - 1; Y < D.finishY + 2; Y++) + if (!(j < 0 || Y < 0 || j >= J.length || Y >= J[0].length)) { + for (var te = 0; te < J[j][Y].length; te++) + if (ue = J[j][Y][te], !(D.getOwner() != ue.getOwner() || D == ue) && !V.has(ue) && !ne.has(ue)) { + var L = Math.abs(D.getCenterX() - ue.getCenterX()) - (D.getWidth() / 2 + ue.getWidth() / 2), $ = Math.abs(D.getCenterY() - ue.getCenterY()) - (D.getHeight() / 2 + ue.getHeight() / 2); + L <= this.repulsionRange && $ <= this.repulsionRange && ne.add(ue); + } + } + D.surrounding = [].concat(O(ne)); + } + for (j = 0; j < D.surrounding.length; j++) + this.calcRepulsionForce(D, D.surrounding[j]); + }, P.prototype.calcRepulsionRange = function() { + return 0; + }, ee.exports = P; + }, + /* 19 */ + /***/ + function(ee, ce, H) { + var O = H(1), T = H(7); + function x(G, U, P) { + O.call(this, G, U, P), this.idealLength = T.DEFAULT_EDGE_LENGTH; + } + x.prototype = Object.create(O.prototype); + for (var S in O) + x[S] = O[S]; + ee.exports = x; + }, + /* 20 */ + /***/ + function(ee, ce, H) { + var O = H(3); + function T(S, G, U, P) { + O.call(this, S, G, U, P), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = []; + } + T.prototype = Object.create(O.prototype); + for (var x in O) + T[x] = O[x]; + T.prototype.setGridCoordinates = function(S, G, U, P) { + this.startX = S, this.finishX = G, this.startY = U, this.finishY = P; + }, ee.exports = T; + }, + /* 21 */ + /***/ + function(ee, ce, H) { + function O(T, x) { + this.width = 0, this.height = 0, T !== null && x !== null && (this.height = x, this.width = T); + } + O.prototype.getWidth = function() { + return this.width; + }, O.prototype.setWidth = function(T) { + this.width = T; + }, O.prototype.getHeight = function() { + return this.height; + }, O.prototype.setHeight = function(T) { + this.height = T; + }, ee.exports = O; + }, + /* 22 */ + /***/ + function(ee, ce, H) { + var O = H(14); + function T() { + this.map = {}, this.keys = []; + } + T.prototype.put = function(x, S) { + var G = O.createID(x); + this.contains(G) || (this.map[G] = S, this.keys.push(x)); + }, T.prototype.contains = function(x) { + return O.createID(x), this.map[x] != null; + }, T.prototype.get = function(x) { + var S = O.createID(x); + return this.map[S]; + }, T.prototype.keySet = function() { + return this.keys; + }, ee.exports = T; + }, + /* 23 */ + /***/ + function(ee, ce, H) { + var O = H(14); + function T() { + this.set = {}; + } + T.prototype.add = function(x) { + var S = O.createID(x); + this.contains(S) || (this.set[S] = x); + }, T.prototype.remove = function(x) { + delete this.set[O.createID(x)]; + }, T.prototype.clear = function() { + this.set = {}; + }, T.prototype.contains = function(x) { + return this.set[O.createID(x)] == x; + }, T.prototype.isEmpty = function() { + return this.size() === 0; + }, T.prototype.size = function() { + return Object.keys(this.set).length; + }, T.prototype.addAllTo = function(x) { + for (var S = Object.keys(this.set), G = S.length, U = 0; U < G; U++) + x.push(this.set[S[U]]); + }, T.prototype.size = function() { + return Object.keys(this.set).length; + }, T.prototype.addAll = function(x) { + for (var S = x.length, G = 0; G < S; G++) { + var U = x[G]; + this.add(U); + } + }, ee.exports = T; + }, + /* 24 */ + /***/ + function(ee, ce, H) { + var O = function() { + function G(U, P) { + for (var K = 0; K < P.length; K++) { + var D = P[K]; + D.enumerable = D.enumerable || !1, D.configurable = !0, "value" in D && (D.writable = !0), Object.defineProperty(U, D.key, D); + } + } + return function(U, P, K) { + return P && G(U.prototype, P), K && G(U, K), U; + }; + }(); + function T(G, U) { + if (!(G instanceof U)) + throw new TypeError("Cannot call a class as a function"); + } + var x = H(11), S = function() { + function G(U, P) { + T(this, G), (P !== null || P !== void 0) && (this.compareFunction = this._defaultCompareFunction); + var K = void 0; + U instanceof x ? K = U.size() : K = U.length, this._quicksort(U, 0, K - 1); + } + return O(G, [{ + key: "_quicksort", + value: function(P, K, D) { + if (K < D) { + var V = this._partition(P, K, D); + this._quicksort(P, K, V), this._quicksort(P, V + 1, D); + } + } + }, { + key: "_partition", + value: function(P, K, D) { + for (var V = this._get(P, K), _ = K, Q = D; ; ) { + for (; this.compareFunction(V, this._get(P, Q)); ) + Q--; + for (; this.compareFunction(this._get(P, _), V); ) + _++; + if (_ < Q) + this._swap(P, _, Q), _++, Q--; + else + return Q; + } + } + }, { + key: "_get", + value: function(P, K) { + return P instanceof x ? P.get_object_at(K) : P[K]; + } + }, { + key: "_set", + value: function(P, K, D) { + P instanceof x ? P.set_object_at(K, D) : P[K] = D; + } + }, { + key: "_swap", + value: function(P, K, D) { + var V = this._get(P, K); + this._set(P, K, this._get(P, D)), this._set(P, D, V); + } + }, { + key: "_defaultCompareFunction", + value: function(P, K) { + return K > P; + } + }]), G; + }(); + ee.exports = S; + }, + /* 25 */ + /***/ + function(ee, ce, H) { + var O = function() { + function S(G, U) { + for (var P = 0; P < U.length; P++) { + var K = U[P]; + K.enumerable = K.enumerable || !1, K.configurable = !0, "value" in K && (K.writable = !0), Object.defineProperty(G, K.key, K); + } + } + return function(G, U, P) { + return U && S(G.prototype, U), P && S(G, P), G; + }; + }(); + function T(S, G) { + if (!(S instanceof G)) + throw new TypeError("Cannot call a class as a function"); + } + var x = function() { + function S(G, U) { + var P = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, K = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, D = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1; + T(this, S), this.sequence1 = G, this.sequence2 = U, this.match_score = P, this.mismatch_penalty = K, this.gap_penalty = D, this.iMax = G.length + 1, this.jMax = U.length + 1, this.grid = new Array(this.iMax); + for (var V = 0; V < this.iMax; V++) { + this.grid[V] = new Array(this.jMax); + for (var _ = 0; _ < this.jMax; _++) + this.grid[V][_] = 0; + } + this.tracebackGrid = new Array(this.iMax); + for (var Q = 0; Q < this.iMax; Q++) { + this.tracebackGrid[Q] = new Array(this.jMax); + for (var ne = 0; ne < this.jMax; ne++) + this.tracebackGrid[Q][ne] = [null, null, null]; + } + this.alignments = [], this.score = -1, this.computeGrids(); + } + return O(S, [{ + key: "getScore", + value: function() { + return this.score; + } + }, { + key: "getAlignments", + value: function() { + return this.alignments; + } + // Main dynamic programming procedure + }, { + key: "computeGrids", + value: function() { + for (var U = 1; U < this.jMax; U++) + this.grid[0][U] = this.grid[0][U - 1] + this.gap_penalty, this.tracebackGrid[0][U] = [!1, !1, !0]; + for (var P = 1; P < this.iMax; P++) + this.grid[P][0] = this.grid[P - 1][0] + this.gap_penalty, this.tracebackGrid[P][0] = [!1, !0, !1]; + for (var K = 1; K < this.iMax; K++) + for (var D = 1; D < this.jMax; D++) { + var V = void 0; + this.sequence1[K - 1] === this.sequence2[D - 1] ? V = this.grid[K - 1][D - 1] + this.match_score : V = this.grid[K - 1][D - 1] + this.mismatch_penalty; + var _ = this.grid[K - 1][D] + this.gap_penalty, Q = this.grid[K][D - 1] + this.gap_penalty, ne = [V, _, Q], ue = this.arrayAllMaxIndexes(ne); + this.grid[K][D] = ne[ue[0]], this.tracebackGrid[K][D] = [ue.includes(0), ue.includes(1), ue.includes(2)]; + } + this.score = this.grid[this.iMax - 1][this.jMax - 1]; + } + // Gets all possible valid sequence combinations + }, { + key: "alignmentTraceback", + value: function() { + var U = []; + for (U.push({ + pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); U[0]; ) { + var P = U[0], K = this.tracebackGrid[P.pos[0]][P.pos[1]]; + K[0] && U.push({ + pos: [P.pos[0] - 1, P.pos[1] - 1], + seq1: this.sequence1[P.pos[0] - 1] + P.seq1, + seq2: this.sequence2[P.pos[1] - 1] + P.seq2 + }), K[1] && U.push({ + pos: [P.pos[0] - 1, P.pos[1]], + seq1: this.sequence1[P.pos[0] - 1] + P.seq1, + seq2: "-" + P.seq2 + }), K[2] && U.push({ + pos: [P.pos[0], P.pos[1] - 1], + seq1: "-" + P.seq1, + seq2: this.sequence2[P.pos[1] - 1] + P.seq2 + }), P.pos[0] === 0 && P.pos[1] === 0 && this.alignments.push({ + sequence1: P.seq1, + sequence2: P.seq2 + }), U.shift(); + } + return this.alignments; + } + // Helper Functions + }, { + key: "getAllIndexes", + value: function(U, P) { + for (var K = [], D = -1; (D = U.indexOf(P, D + 1)) !== -1; ) + K.push(D); + return K; + } + }, { + key: "arrayAllMaxIndexes", + value: function(U) { + return this.getAllIndexes(U, Math.max.apply(null, U)); + } + }]), S; + }(); + ee.exports = x; + }, + /* 26 */ + /***/ + function(ee, ce, H) { + var O = function() { + }; + O.FDLayout = H(18), O.FDLayoutConstants = H(7), O.FDLayoutEdge = H(19), O.FDLayoutNode = H(20), O.DimensionD = H(21), O.HashMap = H(22), O.HashSet = H(23), O.IGeometry = H(8), O.IMath = H(9), O.Integer = H(10), O.Point = H(12), O.PointD = H(4), O.RandomSeed = H(16), O.RectangleD = H(13), O.Transform = H(17), O.UniqueIDGeneretor = H(14), O.Quicksort = H(24), O.LinkedList = H(11), O.LGraphObject = H(2), O.LGraph = H(5), O.LEdge = H(1), O.LGraphManager = H(6), O.LNode = H(3), O.Layout = H(15), O.LayoutConstants = H(0), O.NeedlemanWunsch = H(25), ee.exports = O; + }, + /* 27 */ + /***/ + function(ee, ce, H) { + function O() { + this.listeners = []; + } + var T = O.prototype; + T.addListener = function(x, S) { + this.listeners.push({ + event: x, + callback: S + }); + }, T.removeListener = function(x, S) { + for (var G = this.listeners.length; G >= 0; G--) { + var U = this.listeners[G]; + U.event === x && U.callback === S && this.listeners.splice(G, 1); + } + }, T.emit = function(x, S) { + for (var G = 0; G < this.listeners.length; G++) { + var U = this.listeners[G]; + x === U.event && U.callback(S); + } + }, ee.exports = O; + } + /******/ + ]) + ); + }); + }(Wi)), Wi.exports; +} +var $u; +function Wp() { + return $u || ($u = 1, function(pe, fe) { + (function(ce, H) { + pe.exports = H(qp()); + })(Ca, function(ee) { + return ( + /******/ + function(ce) { + var H = {}; + function O(T) { + if (H[T]) + return H[T].exports; + var x = H[T] = { + /******/ + i: T, + /******/ + l: !1, + /******/ + exports: {} + /******/ + }; + return ce[T].call(x.exports, x, x.exports, O), x.l = !0, x.exports; + } + return O.m = ce, O.c = H, O.i = function(T) { + return T; + }, O.d = function(T, x, S) { + O.o(T, x) || Object.defineProperty(T, x, { + /******/ + configurable: !1, + /******/ + enumerable: !0, + /******/ + get: S + /******/ + }); + }, O.n = function(T) { + var x = T && T.__esModule ? ( + /******/ + function() { + return T.default; + } + ) : ( + /******/ + function() { + return T; + } + ); + return O.d(x, "a", x), x; + }, O.o = function(T, x) { + return Object.prototype.hasOwnProperty.call(T, x); + }, O.p = "", O(O.s = 7); + }([ + /* 0 */ + /***/ + function(ce, H) { + ce.exports = ee; + }, + /* 1 */ + /***/ + function(ce, H, O) { + var T = O(0).FDLayoutConstants; + function x() { + } + for (var S in T) + x[S] = T[S]; + x.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, x.DEFAULT_RADIAL_SEPARATION = T.DEFAULT_EDGE_LENGTH, x.DEFAULT_COMPONENT_SEPERATION = 60, x.TILE = !0, x.TILING_PADDING_VERTICAL = 10, x.TILING_PADDING_HORIZONTAL = 10, x.TREE_REDUCTION_ON_INCREMENTAL = !1, ce.exports = x; + }, + /* 2 */ + /***/ + function(ce, H, O) { + var T = O(0).FDLayoutEdge; + function x(G, U, P) { + T.call(this, G, U, P); + } + x.prototype = Object.create(T.prototype); + for (var S in T) + x[S] = T[S]; + ce.exports = x; + }, + /* 3 */ + /***/ + function(ce, H, O) { + var T = O(0).LGraph; + function x(G, U, P) { + T.call(this, G, U, P); + } + x.prototype = Object.create(T.prototype); + for (var S in T) + x[S] = T[S]; + ce.exports = x; + }, + /* 4 */ + /***/ + function(ce, H, O) { + var T = O(0).LGraphManager; + function x(G) { + T.call(this, G); + } + x.prototype = Object.create(T.prototype); + for (var S in T) + x[S] = T[S]; + ce.exports = x; + }, + /* 5 */ + /***/ + function(ce, H, O) { + var T = O(0).FDLayoutNode, x = O(0).IMath; + function S(U, P, K, D) { + T.call(this, U, P, K, D); + } + S.prototype = Object.create(T.prototype); + for (var G in T) + S[G] = T[G]; + S.prototype.move = function() { + var U = this.graphManager.getLayout(); + this.displacementX = U.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = U.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > U.coolingFactor * U.maxNodeDisplacement && (this.displacementX = U.coolingFactor * U.maxNodeDisplacement * x.sign(this.displacementX)), Math.abs(this.displacementY) > U.coolingFactor * U.maxNodeDisplacement && (this.displacementY = U.coolingFactor * U.maxNodeDisplacement * x.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), U.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0; + }, S.prototype.propogateDisplacementToChildren = function(U, P) { + for (var K = this.getChild().getNodes(), D, V = 0; V < K.length; V++) + D = K[V], D.getChild() == null ? (D.moveBy(U, P), D.displacementX += U, D.displacementY += P) : D.propogateDisplacementToChildren(U, P); + }, S.prototype.setPred1 = function(U) { + this.pred1 = U; + }, S.prototype.getPred1 = function() { + return pred1; + }, S.prototype.getPred2 = function() { + return pred2; + }, S.prototype.setNext = function(U) { + this.next = U; + }, S.prototype.getNext = function() { + return next; + }, S.prototype.setProcessed = function(U) { + this.processed = U; + }, S.prototype.isProcessed = function() { + return processed; + }, ce.exports = S; + }, + /* 6 */ + /***/ + function(ce, H, O) { + var T = O(0).FDLayout, x = O(4), S = O(3), G = O(5), U = O(2), P = O(1), K = O(0).FDLayoutConstants, D = O(0).LayoutConstants, V = O(0).Point, _ = O(0).PointD, Q = O(0).Layout, ne = O(0).Integer, ue = O(0).IGeometry, J = O(0).LGraph, j = O(0).Transform; + function Y() { + T.call(this), this.toBeTiled = {}; + } + Y.prototype = Object.create(T.prototype); + for (var te in T) + Y[te] = T[te]; + Y.prototype.newGraphManager = function() { + var L = new x(this); + return this.graphManager = L, L; + }, Y.prototype.newGraph = function(L) { + return new S(null, this.graphManager, L); + }, Y.prototype.newNode = function(L) { + return new G(this.graphManager, L); + }, Y.prototype.newEdge = function(L) { + return new U(null, null, L); + }, Y.prototype.initParameters = function() { + T.prototype.initParameters.call(this, arguments), this.isSubLayout || (P.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = P.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = P.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = K.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = K.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = K.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = K.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = K.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = K.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / K.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = K.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1); + }, Y.prototype.layout = function() { + var L = D.DEFAULT_CREATE_BENDS_AS_NEEDED; + return L && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout(); + }, Y.prototype.classicLayout = function() { + if (this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(), this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity), this.calcNoOfChildrenForAllNodes(), this.graphManager.calcLowestCommonAncestors(), this.graphManager.calcInclusionTreeDepths(), this.graphManager.getRoot().calcEstimatedSize(), this.calcIdealEdgeLengths(), this.incremental) { + if (P.TREE_REDUCTION_ON_INCREMENTAL) { + this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation(); + var $ = new Set(this.getAllNodes()), k = this.nodesWithGravity.filter(function(ge) { + return $.has(ge); + }); + this.graphManager.setAllNodesToApplyGravitation(k); + } + } else { + var L = this.getFlatForest(); + if (L.length > 0) + this.positionNodesRadially(L); + else { + this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation(); + var $ = new Set(this.getAllNodes()), k = this.nodesWithGravity.filter(function(q) { + return $.has(q); + }); + this.graphManager.setAllNodesToApplyGravitation(k), this.positionNodesRandomly(); + } + } + return this.initSpringEmbedder(), this.runSpringEmbedder(), !0; + }, Y.prototype.tick = function() { + if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) + if (this.prunedNodesAll.length > 0) + this.isTreeGrowing = !0; + else + return !0; + if (this.totalIterations % K.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.isConverged()) + if (this.prunedNodesAll.length > 0) + this.isTreeGrowing = !0; + else + return !0; + this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); + } + if (this.isTreeGrowing) { + if (this.growTreeIterations % 10 == 0) + if (this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation(); + var L = new Set(this.getAllNodes()), $ = this.nodesWithGravity.filter(function(he) { + return L.has(he); + }); + this.graphManager.setAllNodesToApplyGravitation($), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = K.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } else + this.isTreeGrowing = !1, this.isGrowthFinished = !0; + this.growTreeIterations++; + } + if (this.isGrowthFinished) { + if (this.isConverged()) + return !0; + this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = K.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++; + } + var k = !this.isTreeGrowing && !this.isGrowthFinished, q = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; + return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(k, q), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1; + }, Y.prototype.getPositionsData = function() { + for (var L = this.graphManager.getAllNodes(), $ = {}, k = 0; k < L.length; k++) { + var q = L[k].rect, he = L[k].id; + $[he] = { + id: he, + x: q.getCenterX(), + y: q.getCenterY(), + w: q.width, + h: q.height + }; + } + return $; + }, Y.prototype.runSpringEmbedder = function() { + this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod; + var L = !1; + if (K.ANIMATE === "during") + this.emit("layoutstarted"); + else { + for (; !L; ) + L = this.tick(); + this.graphManager.updateBounds(); + } + }, Y.prototype.calculateNodesToApplyGravitationTo = function() { + var L = [], $, k = this.graphManager.getGraphs(), q = k.length, he; + for (he = 0; he < q; he++) + $ = k[he], $.updateConnected(), $.isConnected || (L = L.concat($.getNodes())); + return L; + }, Y.prototype.createBendpoints = function() { + var L = []; + L = L.concat(this.graphManager.getAllEdges()); + var $ = /* @__PURE__ */ new Set(), k; + for (k = 0; k < L.length; k++) { + var q = L[k]; + if (!$.has(q)) { + var he = q.getSource(), ge = q.getTarget(); + if (he == ge) + q.getBendpoints().push(new _()), q.getBendpoints().push(new _()), this.createDummyNodesForBendpoints(q), $.add(q); + else { + var Ae = []; + if (Ae = Ae.concat(he.getEdgeListToNode(ge)), Ae = Ae.concat(ge.getEdgeListToNode(he)), !$.has(Ae[0])) { + if (Ae.length > 1) { + var Ne; + for (Ne = 0; Ne < Ae.length; Ne++) { + var _e = Ae[Ne]; + _e.getBendpoints().push(new _()), this.createDummyNodesForBendpoints(_e); + } + } + Ae.forEach(function(tt) { + $.add(tt); + }); + } + } + } + if ($.size == L.length) + break; + } + }, Y.prototype.positionNodesRadially = function(L) { + for (var $ = new V(0, 0), k = Math.ceil(Math.sqrt(L.length)), q = 0, he = 0, ge = 0, Ae = new _(0, 0), Ne = 0; Ne < L.length; Ne++) { + Ne % k == 0 && (ge = 0, he = q, Ne != 0 && (he += P.DEFAULT_COMPONENT_SEPERATION), q = 0); + var _e = L[Ne], tt = Q.findCenterOfTree(_e); + $.x = ge, $.y = he, Ae = Y.radialLayout(_e, tt, $), Ae.y > q && (q = Math.floor(Ae.y)), ge = Math.floor(Ae.x + P.DEFAULT_COMPONENT_SEPERATION); + } + this.transform(new _(D.WORLD_CENTER_X - Ae.x / 2, D.WORLD_CENTER_Y - Ae.y / 2)); + }, Y.radialLayout = function(L, $, k) { + var q = Math.max(this.maxDiagonalInTree(L), P.DEFAULT_RADIAL_SEPARATION); + Y.branchRadialLayout($, null, 0, 359, 0, q); + var he = J.calculateBounds(L), ge = new j(); + ge.setDeviceOrgX(he.getMinX()), ge.setDeviceOrgY(he.getMinY()), ge.setWorldOrgX(k.x), ge.setWorldOrgY(k.y); + for (var Ae = 0; Ae < L.length; Ae++) { + var Ne = L[Ae]; + Ne.transform(ge); + } + var _e = new _(he.getMaxX(), he.getMaxY()); + return ge.inverseTransformPoint(_e); + }, Y.branchRadialLayout = function(L, $, k, q, he, ge) { + var Ae = (q - k + 1) / 2; + Ae < 0 && (Ae += 180); + var Ne = (Ae + k) % 360, _e = Ne * ue.TWO_PI / 360, tt = he * Math.cos(_e), ct = he * Math.sin(_e); + L.setCenter(tt, ct); + var Pe = []; + Pe = Pe.concat(L.getEdges()); + var $e = Pe.length; + $ != null && $e--; + for (var Xe = 0, rt = Pe.length, lt, nt = L.getEdgesBetween($); nt.length > 1; ) { + var je = nt[0]; + nt.splice(0, 1); + var pt = Pe.indexOf(je); + pt >= 0 && Pe.splice(pt, 1), rt--, $e--; + } + $ != null ? lt = (Pe.indexOf(nt[0]) + 1) % rt : lt = 0; + for (var Et = Math.abs(q - k) / $e, kt = lt; Xe != $e; kt = ++kt % rt) { + var vt = Pe[kt].getOtherEnd(L); + if (vt != $) { + var vr = (k + Xe * Et) % 360, qt = (vr + Et) % 360; + Y.branchRadialLayout(vt, L, vr, qt, he + ge, ge), Xe++; + } + } + }, Y.maxDiagonalInTree = function(L) { + for (var $ = ne.MIN_VALUE, k = 0; k < L.length; k++) { + var q = L[k], he = q.getDiagonal(); + he > $ && ($ = he); + } + return $; + }, Y.prototype.calcRepulsionRange = function() { + return 2 * (this.level + 1) * this.idealEdgeLength; + }, Y.prototype.groupZeroDegreeMembers = function() { + var L = this, $ = {}; + this.memberGroups = {}, this.idToDummyNode = {}; + for (var k = [], q = this.graphManager.getAllNodes(), he = 0; he < q.length; he++) { + var ge = q[he], Ae = ge.getParent(); + this.getNodeDegreeWithChildren(ge) === 0 && (Ae.id == null || !this.getToBeTiled(Ae)) && k.push(ge); + } + for (var he = 0; he < k.length; he++) { + var ge = k[he], Ne = ge.getParent().id; + typeof $[Ne] > "u" && ($[Ne] = []), $[Ne] = $[Ne].concat(ge); + } + Object.keys($).forEach(function(_e) { + if ($[_e].length > 1) { + var tt = "DummyCompound_" + _e; + L.memberGroups[tt] = $[_e]; + var ct = $[_e][0].getParent(), Pe = new G(L.graphManager); + Pe.id = tt, Pe.paddingLeft = ct.paddingLeft || 0, Pe.paddingRight = ct.paddingRight || 0, Pe.paddingBottom = ct.paddingBottom || 0, Pe.paddingTop = ct.paddingTop || 0, L.idToDummyNode[tt] = Pe; + var $e = L.getGraphManager().add(L.newGraph(), Pe), Xe = ct.getChild(); + Xe.add(Pe); + for (var rt = 0; rt < $[_e].length; rt++) { + var lt = $[_e][rt]; + Xe.remove(lt), $e.add(lt); + } + } + }); + }, Y.prototype.clearCompounds = function() { + var L = {}, $ = {}; + this.performDFSOnCompounds(); + for (var k = 0; k < this.compoundOrder.length; k++) + $[this.compoundOrder[k].id] = this.compoundOrder[k], L[this.compoundOrder[k].id] = [].concat(this.compoundOrder[k].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[k].getChild()), this.compoundOrder[k].child = null; + this.graphManager.resetAllNodes(), this.tileCompoundMembers(L, $); + }, Y.prototype.clearZeroDegreeMembers = function() { + var L = this, $ = this.tiledZeroDegreePack = []; + Object.keys(this.memberGroups).forEach(function(k) { + var q = L.idToDummyNode[k]; + $[k] = L.tileNodes(L.memberGroups[k], q.paddingLeft + q.paddingRight), q.rect.width = $[k].width, q.rect.height = $[k].height; + }); + }, Y.prototype.repopulateCompounds = function() { + for (var L = this.compoundOrder.length - 1; L >= 0; L--) { + var $ = this.compoundOrder[L], k = $.id, q = $.paddingLeft, he = $.paddingTop; + this.adjustLocations(this.tiledMemberPack[k], $.rect.x, $.rect.y, q, he); + } + }, Y.prototype.repopulateZeroDegreeMembers = function() { + var L = this, $ = this.tiledZeroDegreePack; + Object.keys($).forEach(function(k) { + var q = L.idToDummyNode[k], he = q.paddingLeft, ge = q.paddingTop; + L.adjustLocations($[k], q.rect.x, q.rect.y, he, ge); + }); + }, Y.prototype.getToBeTiled = function(L) { + var $ = L.id; + if (this.toBeTiled[$] != null) + return this.toBeTiled[$]; + var k = L.getChild(); + if (k == null) + return this.toBeTiled[$] = !1, !1; + for (var q = k.getNodes(), he = 0; he < q.length; he++) { + var ge = q[he]; + if (this.getNodeDegree(ge) > 0) + return this.toBeTiled[$] = !1, !1; + if (ge.getChild() == null) { + this.toBeTiled[ge.id] = !1; + continue; + } + if (!this.getToBeTiled(ge)) + return this.toBeTiled[$] = !1, !1; + } + return this.toBeTiled[$] = !0, !0; + }, Y.prototype.getNodeDegree = function(L) { + L.id; + for (var $ = L.getEdges(), k = 0, q = 0; q < $.length; q++) { + var he = $[q]; + he.getSource().id !== he.getTarget().id && (k = k + 1); + } + return k; + }, Y.prototype.getNodeDegreeWithChildren = function(L) { + var $ = this.getNodeDegree(L); + if (L.getChild() == null) + return $; + for (var k = L.getChild().getNodes(), q = 0; q < k.length; q++) { + var he = k[q]; + $ += this.getNodeDegreeWithChildren(he); + } + return $; + }, Y.prototype.performDFSOnCompounds = function() { + this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); + }, Y.prototype.fillCompexOrderByDFS = function(L) { + for (var $ = 0; $ < L.length; $++) { + var k = L[$]; + k.getChild() != null && this.fillCompexOrderByDFS(k.getChild().getNodes()), this.getToBeTiled(k) && this.compoundOrder.push(k); + } + }, Y.prototype.adjustLocations = function(L, $, k, q, he) { + $ += q, k += he; + for (var ge = $, Ae = 0; Ae < L.rows.length; Ae++) { + var Ne = L.rows[Ae]; + $ = ge; + for (var _e = 0, tt = 0; tt < Ne.length; tt++) { + var ct = Ne[tt]; + ct.rect.x = $, ct.rect.y = k, $ += ct.rect.width + L.horizontalPadding, ct.rect.height > _e && (_e = ct.rect.height); + } + k += _e + L.verticalPadding; + } + }, Y.prototype.tileCompoundMembers = function(L, $) { + var k = this; + this.tiledMemberPack = [], Object.keys(L).forEach(function(q) { + var he = $[q]; + k.tiledMemberPack[q] = k.tileNodes(L[q], he.paddingLeft + he.paddingRight), he.rect.width = k.tiledMemberPack[q].width, he.rect.height = k.tiledMemberPack[q].height; + }); + }, Y.prototype.tileNodes = function(L, $) { + var k = P.TILING_PADDING_VERTICAL, q = P.TILING_PADDING_HORIZONTAL, he = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: $, + // assume minHeight equals to minWidth + verticalPadding: k, + horizontalPadding: q + }; + L.sort(function(Ne, _e) { + return Ne.rect.width * Ne.rect.height > _e.rect.width * _e.rect.height ? -1 : Ne.rect.width * Ne.rect.height < _e.rect.width * _e.rect.height ? 1 : 0; + }); + for (var ge = 0; ge < L.length; ge++) { + var Ae = L[ge]; + he.rows.length == 0 ? this.insertNodeToRow(he, Ae, 0, $) : this.canAddHorizontal(he, Ae.rect.width, Ae.rect.height) ? this.insertNodeToRow(he, Ae, this.getShortestRowIndex(he), $) : this.insertNodeToRow(he, Ae, he.rows.length, $), this.shiftToLastRow(he); + } + return he; + }, Y.prototype.insertNodeToRow = function(L, $, k, q) { + var he = q; + if (k == L.rows.length) { + var ge = []; + L.rows.push(ge), L.rowWidth.push(he), L.rowHeight.push(0); + } + var Ae = L.rowWidth[k] + $.rect.width; + L.rows[k].length > 0 && (Ae += L.horizontalPadding), L.rowWidth[k] = Ae, L.width < Ae && (L.width = Ae); + var Ne = $.rect.height; + k > 0 && (Ne += L.verticalPadding); + var _e = 0; + Ne > L.rowHeight[k] && (_e = L.rowHeight[k], L.rowHeight[k] = Ne, _e = L.rowHeight[k] - _e), L.height += _e, L.rows[k].push($); + }, Y.prototype.getShortestRowIndex = function(L) { + for (var $ = -1, k = Number.MAX_VALUE, q = 0; q < L.rows.length; q++) + L.rowWidth[q] < k && ($ = q, k = L.rowWidth[q]); + return $; + }, Y.prototype.getLongestRowIndex = function(L) { + for (var $ = -1, k = Number.MIN_VALUE, q = 0; q < L.rows.length; q++) + L.rowWidth[q] > k && ($ = q, k = L.rowWidth[q]); + return $; + }, Y.prototype.canAddHorizontal = function(L, $, k) { + var q = this.getShortestRowIndex(L); + if (q < 0) + return !0; + var he = L.rowWidth[q]; + if (he + L.horizontalPadding + $ <= L.width) + return !0; + var ge = 0; + L.rowHeight[q] < k && q > 0 && (ge = k + L.verticalPadding - L.rowHeight[q]); + var Ae; + L.width - he >= $ + L.horizontalPadding ? Ae = (L.height + ge) / (he + $ + L.horizontalPadding) : Ae = (L.height + ge) / L.width, ge = k + L.verticalPadding; + var Ne; + return L.width < $ ? Ne = (L.height + ge) / $ : Ne = (L.height + ge) / L.width, Ne < 1 && (Ne = 1 / Ne), Ae < 1 && (Ae = 1 / Ae), Ae < Ne; + }, Y.prototype.shiftToLastRow = function(L) { + var $ = this.getLongestRowIndex(L), k = L.rowWidth.length - 1, q = L.rows[$], he = q[q.length - 1], ge = he.width + L.horizontalPadding; + if (L.width - L.rowWidth[k] > ge && $ != k) { + q.splice(-1, 1), L.rows[k].push(he), L.rowWidth[$] = L.rowWidth[$] - ge, L.rowWidth[k] = L.rowWidth[k] + ge, L.width = L.rowWidth[instance.getLongestRowIndex(L)]; + for (var Ae = Number.MIN_VALUE, Ne = 0; Ne < q.length; Ne++) + q[Ne].height > Ae && (Ae = q[Ne].height); + $ > 0 && (Ae += L.verticalPadding); + var _e = L.rowHeight[$] + L.rowHeight[k]; + L.rowHeight[$] = Ae, L.rowHeight[k] < he.height + L.verticalPadding && (L.rowHeight[k] = he.height + L.verticalPadding); + var tt = L.rowHeight[$] + L.rowHeight[k]; + L.height += tt - _e, this.shiftToLastRow(L); + } + }, Y.prototype.tilingPreLayout = function() { + P.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers()); + }, Y.prototype.tilingPostLayout = function() { + P.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds()); + }, Y.prototype.reduceTrees = function() { + for (var L = [], $ = !0, k; $; ) { + var q = this.graphManager.getAllNodes(), he = []; + $ = !1; + for (var ge = 0; ge < q.length; ge++) + k = q[ge], k.getEdges().length == 1 && !k.getEdges()[0].isInterGraph && k.getChild() == null && (he.push([k, k.getEdges()[0], k.getOwner()]), $ = !0); + if ($ == !0) { + for (var Ae = [], Ne = 0; Ne < he.length; Ne++) + he[Ne][0].getEdges().length == 1 && (Ae.push(he[Ne]), he[Ne][0].getOwner().remove(he[Ne][0])); + L.push(Ae), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = L; + }, Y.prototype.growTree = function(L) { + for (var $ = L.length, k = L[$ - 1], q, he = 0; he < k.length; he++) + q = k[he], this.findPlaceforPrunedNode(q), q[2].add(q[0]), q[2].add(q[1], q[1].source, q[1].target); + L.splice(L.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges(); + }, Y.prototype.findPlaceforPrunedNode = function(L) { + var $, k, q = L[0]; + q == L[1].source ? k = L[1].target : k = L[1].source; + var he = k.startX, ge = k.finishX, Ae = k.startY, Ne = k.finishY, _e = 0, tt = 0, ct = 0, Pe = 0, $e = [_e, ct, tt, Pe]; + if (Ae > 0) + for (var Xe = he; Xe <= ge; Xe++) + $e[0] += this.grid[Xe][Ae - 1].length + this.grid[Xe][Ae].length - 1; + if (ge < this.grid.length - 1) + for (var Xe = Ae; Xe <= Ne; Xe++) + $e[1] += this.grid[ge + 1][Xe].length + this.grid[ge][Xe].length - 1; + if (Ne < this.grid[0].length - 1) + for (var Xe = he; Xe <= ge; Xe++) + $e[2] += this.grid[Xe][Ne + 1].length + this.grid[Xe][Ne].length - 1; + if (he > 0) + for (var Xe = Ae; Xe <= Ne; Xe++) + $e[3] += this.grid[he - 1][Xe].length + this.grid[he][Xe].length - 1; + for (var rt = ne.MAX_VALUE, lt, nt, je = 0; je < $e.length; je++) + $e[je] < rt ? (rt = $e[je], lt = 1, nt = je) : $e[je] == rt && lt++; + if (lt == 3 && rt == 0) + $e[0] == 0 && $e[1] == 0 && $e[2] == 0 ? $ = 1 : $e[0] == 0 && $e[1] == 0 && $e[3] == 0 ? $ = 0 : $e[0] == 0 && $e[2] == 0 && $e[3] == 0 ? $ = 3 : $e[1] == 0 && $e[2] == 0 && $e[3] == 0 && ($ = 2); + else if (lt == 2 && rt == 0) { + var pt = Math.floor(Math.random() * 2); + $e[0] == 0 && $e[1] == 0 ? pt == 0 ? $ = 0 : $ = 1 : $e[0] == 0 && $e[2] == 0 ? pt == 0 ? $ = 0 : $ = 2 : $e[0] == 0 && $e[3] == 0 ? pt == 0 ? $ = 0 : $ = 3 : $e[1] == 0 && $e[2] == 0 ? pt == 0 ? $ = 1 : $ = 2 : $e[1] == 0 && $e[3] == 0 ? pt == 0 ? $ = 1 : $ = 3 : pt == 0 ? $ = 2 : $ = 3; + } else if (lt == 4 && rt == 0) { + var pt = Math.floor(Math.random() * 4); + $ = pt; + } else + $ = nt; + $ == 0 ? q.setCenter(k.getCenterX(), k.getCenterY() - k.getHeight() / 2 - K.DEFAULT_EDGE_LENGTH - q.getHeight() / 2) : $ == 1 ? q.setCenter(k.getCenterX() + k.getWidth() / 2 + K.DEFAULT_EDGE_LENGTH + q.getWidth() / 2, k.getCenterY()) : $ == 2 ? q.setCenter(k.getCenterX(), k.getCenterY() + k.getHeight() / 2 + K.DEFAULT_EDGE_LENGTH + q.getHeight() / 2) : q.setCenter(k.getCenterX() - k.getWidth() / 2 - K.DEFAULT_EDGE_LENGTH - q.getWidth() / 2, k.getCenterY()); + }, ce.exports = Y; + }, + /* 7 */ + /***/ + function(ce, H, O) { + var T = {}; + T.layoutBase = O(0), T.CoSEConstants = O(1), T.CoSEEdge = O(2), T.CoSEGraph = O(3), T.CoSEGraphManager = O(4), T.CoSELayout = O(6), T.CoSENode = O(5), ce.exports = T; + } + /******/ + ]) + ); + }); + }(qi)), qi.exports; +} +(function(pe, fe) { + (function(ce, H) { + pe.exports = H(Wp()); + })(Ca, function(ee) { + return ( + /******/ + function(ce) { + var H = {}; + function O(T) { + if (H[T]) + return H[T].exports; + var x = H[T] = { + /******/ + i: T, + /******/ + l: !1, + /******/ + exports: {} + /******/ + }; + return ce[T].call(x.exports, x, x.exports, O), x.l = !0, x.exports; + } + return O.m = ce, O.c = H, O.i = function(T) { + return T; + }, O.d = function(T, x, S) { + O.o(T, x) || Object.defineProperty(T, x, { + /******/ + configurable: !1, + /******/ + enumerable: !0, + /******/ + get: S + /******/ + }); + }, O.n = function(T) { + var x = T && T.__esModule ? ( + /******/ + function() { + return T.default; + } + ) : ( + /******/ + function() { + return T; + } + ); + return O.d(x, "a", x), x; + }, O.o = function(T, x) { + return Object.prototype.hasOwnProperty.call(T, x); + }, O.p = "", O(O.s = 1); + }([ + /* 0 */ + /***/ + function(ce, H) { + ce.exports = ee; + }, + /* 1 */ + /***/ + function(ce, H, O) { + var T = O(0).layoutBase.LayoutConstants, x = O(0).layoutBase.FDLayoutConstants, S = O(0).CoSEConstants, G = O(0).CoSELayout, U = O(0).CoSENode, P = O(0).layoutBase.PointD, K = O(0).layoutBase.DimensionD, D = { + // Called on `layoutready` + ready: function() { + }, + // Called on `layoutstop` + stop: function() { + }, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: "default", + // include labels in node dimensions + nodeDimensionsIncludeLabels: !1, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: !0, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: !0, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: !0, + // Type of layout animation. The option set is {'during', 'end', false} + animate: "end", + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 + }; + function V(ue, J) { + var j = {}; + for (var Y in ue) + j[Y] = ue[Y]; + for (var Y in J) + j[Y] = J[Y]; + return j; + } + function _(ue) { + this.options = V(D, ue), Q(this.options); + } + var Q = function(J) { + J.nodeRepulsion != null && (S.DEFAULT_REPULSION_STRENGTH = x.DEFAULT_REPULSION_STRENGTH = J.nodeRepulsion), J.idealEdgeLength != null && (S.DEFAULT_EDGE_LENGTH = x.DEFAULT_EDGE_LENGTH = J.idealEdgeLength), J.edgeElasticity != null && (S.DEFAULT_SPRING_STRENGTH = x.DEFAULT_SPRING_STRENGTH = J.edgeElasticity), J.nestingFactor != null && (S.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = x.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = J.nestingFactor), J.gravity != null && (S.DEFAULT_GRAVITY_STRENGTH = x.DEFAULT_GRAVITY_STRENGTH = J.gravity), J.numIter != null && (S.MAX_ITERATIONS = x.MAX_ITERATIONS = J.numIter), J.gravityRange != null && (S.DEFAULT_GRAVITY_RANGE_FACTOR = x.DEFAULT_GRAVITY_RANGE_FACTOR = J.gravityRange), J.gravityCompound != null && (S.DEFAULT_COMPOUND_GRAVITY_STRENGTH = x.DEFAULT_COMPOUND_GRAVITY_STRENGTH = J.gravityCompound), J.gravityRangeCompound != null && (S.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = x.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = J.gravityRangeCompound), J.initialEnergyOnIncremental != null && (S.DEFAULT_COOLING_FACTOR_INCREMENTAL = x.DEFAULT_COOLING_FACTOR_INCREMENTAL = J.initialEnergyOnIncremental), J.quality == "draft" ? T.QUALITY = 0 : J.quality == "proof" ? T.QUALITY = 2 : T.QUALITY = 1, S.NODE_DIMENSIONS_INCLUDE_LABELS = x.NODE_DIMENSIONS_INCLUDE_LABELS = T.NODE_DIMENSIONS_INCLUDE_LABELS = J.nodeDimensionsIncludeLabels, S.DEFAULT_INCREMENTAL = x.DEFAULT_INCREMENTAL = T.DEFAULT_INCREMENTAL = !J.randomize, S.ANIMATE = x.ANIMATE = T.ANIMATE = J.animate, S.TILE = J.tile, S.TILING_PADDING_VERTICAL = typeof J.tilingPaddingVertical == "function" ? J.tilingPaddingVertical.call() : J.tilingPaddingVertical, S.TILING_PADDING_HORIZONTAL = typeof J.tilingPaddingHorizontal == "function" ? J.tilingPaddingHorizontal.call() : J.tilingPaddingHorizontal; + }; + _.prototype.run = function() { + var ue, J, j = this.options; + this.idToLNode = {}; + var Y = this.layout = new G(), te = this; + te.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this }); + var L = Y.newGraphManager(); + this.gm = L; + var $ = this.options.eles.nodes(), k = this.options.eles.edges(); + this.root = L.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes($), Y); + for (var q = 0; q < k.length; q++) { + var he = k[q], ge = this.idToLNode[he.data("source")], Ae = this.idToLNode[he.data("target")]; + if (ge !== Ae && ge.getEdgesBetween(Ae).length == 0) { + var Ne = L.add(Y.newEdge(), ge, Ae); + Ne.id = he.id(); + } + } + var _e = function(Pe, $e) { + typeof Pe == "number" && (Pe = $e); + var Xe = Pe.data("id"), rt = te.idToLNode[Xe]; + return { + x: rt.getRect().getCenterX(), + y: rt.getRect().getCenterY() + }; + }, tt = function ct() { + for (var Pe = function() { + j.fit && j.cy.fit(j.eles, j.padding), ue || (ue = !0, te.cy.one("layoutready", j.ready), te.cy.trigger({ type: "layoutready", layout: te })); + }, $e = te.options.refresh, Xe, rt = 0; rt < $e && !Xe; rt++) + Xe = te.stopped || te.layout.tick(); + if (Xe) { + Y.checkLayoutSuccess() && !Y.isSubLayout && Y.doPostLayout(), Y.tilingPostLayout && Y.tilingPostLayout(), Y.isLayoutFinished = !0, te.options.eles.nodes().positions(_e), Pe(), te.cy.one("layoutstop", te.options.stop), te.cy.trigger({ type: "layoutstop", layout: te }), J && cancelAnimationFrame(J), ue = !1; + return; + } + var lt = te.layout.getPositionsData(); + j.eles.nodes().positions(function(nt, je) { + if (typeof nt == "number" && (nt = je), !nt.isParent()) { + for (var pt = nt.id(), Et = lt[pt], kt = nt; Et == null && (Et = lt[kt.data("parent")] || lt["DummyCompound_" + kt.data("parent")], lt[pt] = Et, kt = kt.parent()[0], kt != null); ) + ; + return Et != null ? { + x: Et.x, + y: Et.y + } : { + x: nt.position("x"), + y: nt.position("y") + }; + } + }), Pe(), J = requestAnimationFrame(ct); + }; + return Y.addListener("layoutstarted", function() { + te.options.animate === "during" && (J = requestAnimationFrame(tt)); + }), Y.runLayout(), this.options.animate !== "during" && (te.options.eles.nodes().not(":parent").layoutPositions(te, te.options, _e), ue = !1), this; + }, _.prototype.getTopMostNodes = function(ue) { + for (var J = {}, j = 0; j < ue.length; j++) + J[ue[j].id()] = !0; + var Y = ue.filter(function(te, L) { + typeof te == "number" && (te = L); + for (var $ = te.parent()[0]; $ != null; ) { + if (J[$.id()]) + return !1; + $ = $.parent()[0]; + } + return !0; + }); + return Y; + }, _.prototype.processChildrenList = function(ue, J, j) { + for (var Y = J.length, te = 0; te < Y; te++) { + var L = J[te], $ = L.children(), k, q = L.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + if (L.outerWidth() != null && L.outerHeight() != null ? k = ue.add(new U(j.graphManager, new P(L.position("x") - q.w / 2, L.position("y") - q.h / 2), new K(parseFloat(q.w), parseFloat(q.h)))) : k = ue.add(new U(this.graphManager)), k.id = L.data("id"), k.paddingLeft = parseInt(L.css("padding")), k.paddingTop = parseInt(L.css("padding")), k.paddingRight = parseInt(L.css("padding")), k.paddingBottom = parseInt(L.css("padding")), this.options.nodeDimensionsIncludeLabels && L.isParent()) { + var he = L.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, ge = L.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, Ae = L.css("text-halign"); + k.labelWidth = he, k.labelHeight = ge, k.labelPos = Ae; + } + if (this.idToLNode[L.data("id")] = k, isNaN(k.rect.x) && (k.rect.x = 0), isNaN(k.rect.y) && (k.rect.y = 0), $ != null && $.length > 0) { + var Ne; + Ne = j.getGraphManager().add(j.newGraph(), k), this.processChildrenList(Ne, $, j); + } + } + }, _.prototype.stop = function() { + return this.stopped = !0, this; + }; + var ne = function(J) { + J("layout", "cose-bilkent", _); + }; + typeof cytoscape < "u" && ne(cytoscape), ce.exports = ne; + } + /******/ + ]) + ); + }); +})(Ku); +var Kp = Ku.exports; +const Zp = /* @__PURE__ */ Vu(Kp); +Wu.use(Zp); +function Zu(pe, fe, ee, ce) { + Xu.drawNode(pe, fe, ee, ce), fe.children && fe.children.forEach((H, O) => { + Zu(pe, H, ee < 0 ? O : ee, ce); + }); +} +function Qp(pe, fe) { + fe.edges().map((ee, ce) => { + const H = ee.data(); + if (ee[0]._private.bodyBounds) { + const O = ee[0]._private.rscratch; + qr.trace("Edge: ", ce, H), pe.insert("path").attr( + "d", + `M ${O.startX},${O.startY} L ${O.midX},${O.midY} L${O.endX},${O.endY} ` + ).attr("class", "edge section-edge-" + H.section + " edge-depth-" + H.depth); + } + }); +} +function Qu(pe, fe, ee, ce) { + fe.add({ + group: "nodes", + data: { + id: pe.id, + labelText: pe.descr, + height: pe.height, + width: pe.width, + level: ce, + nodeId: pe.id, + padding: pe.padding, + type: pe.type + }, + position: { + x: pe.x, + y: pe.y + } + }), pe.children && pe.children.forEach((H) => { + Qu(H, fe, ee, ce + 1), fe.add({ + group: "edges", + data: { + id: `${pe.id}_${H.id}`, + source: pe.id, + target: H.id, + depth: ce, + section: H.section + } + }); + }); +} +function Jp(pe, fe) { + return new Promise((ee) => { + const ce = ei("body").append("div").attr("id", "cy").attr("style", "display:none"), H = Wu({ + container: document.getElementById("cy"), + // container to render in + style: [ + { + selector: "edge", + style: { + "curve-style": "bezier" + } + } + ] + }); + ce.remove(), Qu(pe, H, fe, 0), H.nodes().forEach(function(O) { + O.layoutDimensions = () => { + const T = O.data(); + return { w: T.width, h: T.height }; + }; + }), H.layout({ + name: "cose-bilkent", + quality: "proof", + // headless: true, + styleEnabled: !1, + animate: !1 + }).run(), H.ready((O) => { + qr.info("Ready", O), ee(H); + }); + }); +} +function jp(pe) { + pe.nodes().map((fe, ee) => { + const ce = fe.data(); + ce.x = fe.position().x, ce.y = fe.position().y, Xu.positionNode(ce); + const H = Qi(ce.nodeId); + qr.info("Id:", ee, "Position: (", fe.position().x, ", ", fe.position().y, ")", ce), H.attr( + "transform", + `translate(${fe.position().x - ce.width / 2}, ${fe.position().y - ce.height / 2})` + ), H.attr("attr", `apa-${ee})`); + }); +} +const ey = async (pe, fe, ee, ce) => { + const H = nn(); + H.htmlLabels = !1, qr.debug(`Rendering mindmap diagram +` + pe, ce.parser); + const O = nn().securityLevel; + let T; + O === "sandbox" && (T = ei("#i" + fe)); + const S = (O === "sandbox" ? ei(T.nodes()[0].contentDocument.body) : ei("body")).select("#" + fe); + S.append("g"); + const G = ce.db.getMindmap(), U = S.append("g"); + U.attr("class", "mindmap-edges"); + const P = S.append("g"); + P.attr("class", "mindmap-nodes"), Zu(P, G, -1, H); + const K = await Jp(G, H); + Qp(U, K), jp(K), bp(void 0, S, H.mindmap.padding, H.mindmap.useMaxWidth); +}, ty = { + draw: ey +}, ry = (pe) => { + let fe = ""; + for (let ee = 0; ee < pe.THEME_COLOR_LIMIT; ee++) + pe["lineColor" + ee] = pe["lineColor" + ee] || pe["cScaleInv" + ee], Ep(pe["lineColor" + ee]) ? pe["lineColor" + ee] = wp(pe["lineColor" + ee], 20) : pe["lineColor" + ee] = xp(pe["lineColor" + ee], 20); + for (let ee = 0; ee < pe.THEME_COLOR_LIMIT; ee++) { + const ce = "" + (17 - 3 * ee); + fe += ` + .section-${ee - 1} rect, .section-${ee - 1} path, .section-${ee - 1} circle, .section-${ee - 1} polygon, .section-${ee - 1} path { + fill: ${pe["cScale" + ee]}; + } + .section-${ee - 1} text { + fill: ${pe["cScaleLabel" + ee]}; + } + .node-icon-${ee - 1} { + font-size: 40px; + color: ${pe["cScaleLabel" + ee]}; + } + .section-edge-${ee - 1}{ + stroke: ${pe["cScale" + ee]}; + } + .edge-depth-${ee - 1}{ + stroke-width: ${ce}; + } + .section-${ee - 1} line { + stroke: ${pe["cScaleInv" + ee]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return fe; +}, ay = (pe) => ` + .edge { + stroke-width: 3; + } + ${ry(pe)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${pe.git0}; + } + .section-root text { + fill: ${pe.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`, ny = ay, oy = { + db: kp, + renderer: ty, + parser: Cp, + styles: ny +}; +export { + oy as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/mindmap-definition-7f612c4b.js b/webroot/js/node_modules/mermaid/dist/mindmap-definition-7f612c4b.js new file mode 100644 index 0000000..4574bea --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mindmap-definition-7f612c4b.js @@ -0,0 +1,1210 @@ +import { d as sanitizeText$1, c as getConfig, l as log, o as setupGraphViewbox } from "./mermaid-0d192ec3.js"; +import { select } from "d3"; +import { c as createText } from "./createText-80c3befb.js"; +import cytoscape from "cytoscape/dist/cytoscape.umd.js"; +import coseBilkent from "cytoscape-cose-bilkent"; +import { isDark, lighten, darken } from "khroma"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +import "mdast-util-from-markdown"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, + productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 6: + case 7: + return yy; + case 8: + yy.getLogger().trace("Stop NL "); + break; + case 9: + yy.getLogger().trace("Stop EOF "); + break; + case 11: + yy.getLogger().trace("Stop NL2 "); + break; + case 12: + yy.getLogger().trace("Stop EOF2 "); + break; + case 15: + yy.getLogger().info("Node: ", $$[$0].id); + yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 16: + yy.getLogger().trace("Icon: ", $$[$0]); + yy.decorateNode({ icon: $$[$0] }); + break; + case 17: + case 21: + yy.decorateNode({ class: $$[$0] }); + break; + case 18: + yy.getLogger().trace("SPACELIST"); + break; + case 19: + yy.getLogger().trace("Node: ", $$[$0].id); + yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 20: + yy.decorateNode({ icon: $$[$0] }); + break; + case 25: + yy.getLogger().trace("node found ..", $$[$0 - 2]); + this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + case 26: + this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; + break; + case 27: + yy.getLogger().trace("node found ..", $$[$0 - 3]); + this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])], + defaultActions: { 2: [2, 1], 6: [2, 2] }, + parseError: function parseError2(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + yy.getLogger().trace("Found comment", yy_.yytext); + return 6; + case 1: + return 8; + case 2: + this.begin("CLASS"); + break; + case 3: + this.popState(); + return 16; + case 4: + this.popState(); + break; + case 5: + yy.getLogger().trace("Begin icon"); + this.begin("ICON"); + break; + case 6: + yy.getLogger().trace("SPACELINE"); + return 6; + case 7: + return 7; + case 8: + return 15; + case 9: + yy.getLogger().trace("end icon"); + this.popState(); + break; + case 10: + yy.getLogger().trace("Exploding node"); + this.begin("NODE"); + return 19; + case 11: + yy.getLogger().trace("Cloud"); + this.begin("NODE"); + return 19; + case 12: + yy.getLogger().trace("Explosion Bang"); + this.begin("NODE"); + return 19; + case 13: + yy.getLogger().trace("Cloud Bang"); + this.begin("NODE"); + return 19; + case 14: + this.begin("NODE"); + return 19; + case 15: + this.begin("NODE"); + return 19; + case 16: + this.begin("NODE"); + return 19; + case 17: + this.begin("NODE"); + return 19; + case 18: + return 13; + case 19: + return 22; + case 20: + return 11; + case 21: + this.begin("NSTR2"); + break; + case 22: + return "NODE_DESCR"; + case 23: + this.popState(); + break; + case 24: + yy.getLogger().trace("Starting NSTR"); + this.begin("NSTR"); + break; + case 25: + yy.getLogger().trace("description:", yy_.yytext); + return "NODE_DESCR"; + case 26: + this.popState(); + break; + case 27: + this.popState(); + yy.getLogger().trace("node end ))"); + return "NODE_DEND"; + case 28: + this.popState(); + yy.getLogger().trace("node end )"); + return "NODE_DEND"; + case 29: + this.popState(); + yy.getLogger().trace("node end ...", yy_.yytext); + return "NODE_DEND"; + case 30: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 31: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 32: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 33: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 34: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 35: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + case 36: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + } + }, + rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], + conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const mindmapParser = parser; +const sanitizeText = (text) => sanitizeText$1(text, getConfig()); +let nodes = []; +let cnt = 0; +let elements = {}; +const clear = () => { + nodes = []; + cnt = 0; + elements = {}; +}; +const getParent = function(level) { + for (let i = nodes.length - 1; i >= 0; i--) { + if (nodes[i].level < level) { + return nodes[i]; + } + } + return null; +}; +const getMindmap = () => { + return nodes.length > 0 ? nodes[0] : null; +}; +const addNode = (level, id, descr, type) => { + log.info("addNode", level, id, descr, type); + const conf = getConfig(); + const node = { + id: cnt++, + nodeId: sanitizeText(id), + level, + descr: sanitizeText(descr), + type, + children: [], + width: getConfig().mindmap.maxNodeWidth + }; + switch (node.type) { + case nodeType.ROUNDED_RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.HEXAGON: + node.padding = 2 * conf.mindmap.padding; + break; + default: + node.padding = conf.mindmap.padding; + } + const parent = getParent(level); + if (parent) { + parent.children.push(node); + nodes.push(node); + } else { + if (nodes.length === 0) { + nodes.push(node); + } else { + let error = new Error( + 'There can be only one root. No parent could be found for ("' + node.descr + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } + } +}; +const nodeType = { + DEFAULT: 0, + NO_BORDER: 0, + ROUNDED_RECT: 1, + RECT: 2, + CIRCLE: 3, + CLOUD: 4, + BANG: 5, + HEXAGON: 6 +}; +const getType = (startStr, endStr) => { + log.debug("In get type", startStr, endStr); + switch (startStr) { + case "[": + return nodeType.RECT; + case "(": + return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD; + case "((": + return nodeType.CIRCLE; + case ")": + return nodeType.CLOUD; + case "))": + return nodeType.BANG; + case "{{": + return nodeType.HEXAGON; + default: + return nodeType.DEFAULT; + } +}; +const setElementForId = (id, element) => { + elements[id] = element; +}; +const decorateNode = (decoration) => { + const node = nodes[nodes.length - 1]; + if (decoration && decoration.icon) { + node.icon = sanitizeText(decoration.icon); + } + if (decoration && decoration.class) { + node.class = sanitizeText(decoration.class); + } +}; +const type2Str = (type) => { + switch (type) { + case nodeType.DEFAULT: + return "no-border"; + case nodeType.RECT: + return "rect"; + case nodeType.ROUNDED_RECT: + return "rounded-rect"; + case nodeType.CIRCLE: + return "circle"; + case nodeType.CLOUD: + return "cloud"; + case nodeType.BANG: + return "bang"; + case nodeType.HEXAGON: + return "hexgon"; + default: + return "no-border"; + } +}; +let parseError; +const setErrorHandler = (handler) => { + parseError = handler; +}; +const getLogger = () => log; +const getNodeById = (id) => nodes[id]; +const getElementById = (id) => elements[id]; +const mindmapDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addNode, + clear, + decorateNode, + getElementById, + getLogger, + getMindmap, + getNodeById, + getType, + nodeType, + get parseError() { + return parseError; + }, + sanitizeText, + setElementForId, + setErrorHandler, + type2Str +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const rectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("width", node.width); +}; +const cloudBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r1 = 0.15 * w; + const r2 = 0.25 * w; + const r3 = 0.35 * w; + const r4 = 0.2 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} + a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1} + a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2} + + a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35} + a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65} + + a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15} + a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0} + a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15} + + a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35} + a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65} + + H0 V0 Z` + ); +}; +const bangBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r = 0.15 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1} + + a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34} + a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33} + + a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15} + + a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} + a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33} + + H0 V0 Z` + ); +}; +const circleBkg = function(elem, node) { + elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("r", node.width / 2); +}; +function insertPolygonShape(parent, w, h, points, node) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); +} +const hexagonBkg = function(elem, node) { + const h = node.height; + const f = 4; + const m = h / f; + const w = node.width - node.padding + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + insertPolygonShape(elem, w, h, points, node); +}; +const roundedRectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width); +}; +const drawNode = function(elem, node, fullSection, conf) { + const htmlLabels = conf.htmlLabels; + const section = fullSection % (MAX_SECTIONS - 1); + const nodeElem = elem.append("g"); + node.section = section; + let sectionClass = "section-" + section; + if (section < 0) { + sectionClass += " section-root"; + } + nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const description = node.descr.replace(/()/g, "\n"); + createText(textElem, description, { + useHtmlLabels: htmlLabels, + width: node.width, + classes: "mindmap-node-label" + }); + if (!htmlLabels) { + textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"); + } + const bbox = textElem.node().getBBox(); + const fontSize = conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.width = bbox.width + 2 * node.padding; + if (node.icon) { + if (node.type === nodeType.CIRCLE) { + node.height += 50; + node.width += 50; + const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")" + ); + } else { + node.width += 50; + const orgHeight = node.height; + node.height = Math.max(orgHeight, 60); + const heightDiff = Math.abs(node.height - orgHeight); + const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")" + ); + } + } else { + if (!htmlLabels) { + const dx = node.width / 2; + const dy = node.padding / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } else { + const dx = (node.width - bbox.width) / 2; + const dy = (node.height - bbox.height) / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } + } + switch (node.type) { + case nodeType.DEFAULT: + defaultBkg(bkgElem, node, section); + break; + case nodeType.ROUNDED_RECT: + roundedRectBkg(bkgElem, node); + break; + case nodeType.RECT: + rectBkg(bkgElem, node); + break; + case nodeType.CIRCLE: + bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")"); + circleBkg(bkgElem, node); + break; + case nodeType.CLOUD: + cloudBkg(bkgElem, node); + break; + case nodeType.BANG: + bangBkg(bkgElem, node); + break; + case nodeType.HEXAGON: + hexagonBkg(bkgElem, node); + break; + } + setElementForId(node.id, nodeElem); + return node.height; +}; +const drawEdge = function drawEdge2(edgesElem, mindmap, parent, depth, fullSection) { + const section = fullSection % (MAX_SECTIONS - 1); + const sx = parent.x + parent.width / 2; + const sy = parent.y + parent.height / 2; + const ex = mindmap.x + mindmap.width / 2; + const ey = mindmap.y + mindmap.height / 2; + const mx = ex > sx ? sx + Math.abs(sx - ex) / 2 : sx - Math.abs(sx - ex) / 2; + const my = ey > sy ? sy + Math.abs(sy - ey) / 2 : sy - Math.abs(sy - ey) / 2; + const qx = ex > sx ? Math.abs(sx - mx) / 2 + sx : -Math.abs(sx - mx) / 2 + sx; + const qy = ey > sy ? Math.abs(sy - my) / 2 + sy : -Math.abs(sy - my) / 2 + sy; + edgesElem.append("path").attr( + "d", + parent.direction === "TB" || parent.direction === "BT" ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}` : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}` + ).attr("class", "edge section-edge-" + section + " edge-depth-" + depth); +}; +const positionNode = function(node) { + const nodeElem = getElementById(node.id); + const x = node.x || 0; + const y = node.y || 0; + nodeElem.attr("transform", "translate(" + x + "," + y + ")"); +}; +const svgDraw = { drawNode, positionNode, drawEdge }; +cytoscape.use(coseBilkent); +function drawNodes(svg, mindmap, section, conf) { + svgDraw.drawNode(svg, mindmap, section, conf); + if (mindmap.children) { + mindmap.children.forEach((child, index) => { + drawNodes(svg, child, section < 0 ? index : section, conf); + }); + } +} +function drawEdges(edgesEl, cy) { + cy.edges().map((edge, id) => { + const data = edge.data(); + if (edge[0]._private.bodyBounds) { + const bounds = edge[0]._private.rscratch; + log.trace("Edge: ", id, data); + edgesEl.insert("path").attr( + "d", + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); + } + }); +} +function addNodes(mindmap, cy, conf, level) { + cy.add({ + group: "nodes", + data: { + id: mindmap.id, + labelText: mindmap.descr, + height: mindmap.height, + width: mindmap.width, + level, + nodeId: mindmap.id, + padding: mindmap.padding, + type: mindmap.type + }, + position: { + x: mindmap.x, + y: mindmap.y + } + }); + if (mindmap.children) { + mindmap.children.forEach((child) => { + addNodes(child, cy, conf, level + 1); + cy.add({ + group: "edges", + data: { + id: `${mindmap.id}_${child.id}`, + source: mindmap.id, + target: child.id, + depth: level, + section: child.section + } + }); + }); + } +} +function layoutMindmap(node, conf) { + return new Promise((resolve) => { + const renderEl = select("body").append("div").attr("id", "cy").attr("style", "display:none"); + const cy = cytoscape({ + container: document.getElementById("cy"), + // container to render in + style: [ + { + selector: "edge", + style: { + "curve-style": "bezier" + } + } + ] + }); + renderEl.remove(); + addNodes(node, cy, conf, 0); + cy.nodes().forEach(function(n) { + n.layoutDimensions = () => { + const data = n.data(); + return { w: data.width, h: data.height }; + }; + }); + cy.layout({ + name: "cose-bilkent", + quality: "proof", + // headless: true, + styleEnabled: false, + animate: false + }).run(); + cy.ready((e) => { + log.info("Ready", e); + resolve(cy); + }); + }); +} +function positionNodes(cy) { + cy.nodes().map((node, id) => { + const data = node.data(); + data.x = node.position().x; + data.y = node.position().y; + svgDraw.positionNode(data); + const el = getElementById(data.nodeId); + log.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data); + el.attr( + "transform", + `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` + ); + el.attr("attr", `apa-${id})`); + }); +} +const draw = async (text, id, version, diagObj) => { + const conf = getConfig(); + conf.htmlLabels = false; + log.debug("Rendering mindmap diagram\n" + text, diagObj.parser); + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = root.select("#" + id); + svg.append("g"); + const mm = diagObj.db.getMindmap(); + const edgesElem = svg.append("g"); + edgesElem.attr("class", "mindmap-edges"); + const nodesElem = svg.append("g"); + nodesElem.attr("class", "mindmap-nodes"); + drawNodes(nodesElem, mm, -1, conf); + const cy = await layoutMindmap(mm, conf); + drawEdges(edgesElem, cy); + positionNodes(cy); + setupGraphViewbox(void 0, svg, conf.mindmap.padding, conf.mindmap.useMaxWidth); +}; +const mindmapRenderer = { + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if (isDark(options["lineColor" + i])) { + options["lineColor" + i] = lighten(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = darken(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`; +const mindmapStyles = getStyles; +const diagram = { + db: mindmapDb, + renderer: mindmapRenderer, + parser: mindmapParser, + styles: mindmapStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/mindmap-definition-ad8e8e4e.js b/webroot/js/node_modules/mermaid/dist/mindmap-definition-ad8e8e4e.js new file mode 100644 index 0000000..20f109a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/mindmap-definition-ad8e8e4e.js @@ -0,0 +1,32048 @@ +import { d as sanitizeText$1, c as getConfig, l as log, Q as commonjsGlobal, T as getDefaultExportFromCjs, j as d3select, r as setupGraphViewbox, aT as isDark, aU as lighten, aV as darken } from "./mermaid-491db2d9.js"; +import { c as createText } from "./createText-2660bae1.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, + productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 6: + case 7: + return yy; + case 8: + yy.getLogger().trace("Stop NL "); + break; + case 9: + yy.getLogger().trace("Stop EOF "); + break; + case 11: + yy.getLogger().trace("Stop NL2 "); + break; + case 12: + yy.getLogger().trace("Stop EOF2 "); + break; + case 15: + yy.getLogger().info("Node: ", $$[$0].id); + yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 16: + yy.getLogger().trace("Icon: ", $$[$0]); + yy.decorateNode({ icon: $$[$0] }); + break; + case 17: + case 21: + yy.decorateNode({ class: $$[$0] }); + break; + case 18: + yy.getLogger().trace("SPACELIST"); + break; + case 19: + yy.getLogger().trace("Node: ", $$[$0].id); + yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 20: + yy.decorateNode({ icon: $$[$0] }); + break; + case 25: + yy.getLogger().trace("node found ..", $$[$0 - 2]); + this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + case 26: + this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; + break; + case 27: + yy.getLogger().trace("node found ..", $$[$0 - 3]); + this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])], + defaultActions: { 2: [2, 1], 6: [2, 2] }, + parseError: function parseError2(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self2.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next2 = this.match; + if (next2.length < 20) { + next2 += this._input.substr(0, 20 - next2.length); + } + return (next2.substr(0, 20) + (next2.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + yy.getLogger().trace("Found comment", yy_.yytext); + return 6; + case 1: + return 8; + case 2: + this.begin("CLASS"); + break; + case 3: + this.popState(); + return 16; + case 4: + this.popState(); + break; + case 5: + yy.getLogger().trace("Begin icon"); + this.begin("ICON"); + break; + case 6: + yy.getLogger().trace("SPACELINE"); + return 6; + case 7: + return 7; + case 8: + return 15; + case 9: + yy.getLogger().trace("end icon"); + this.popState(); + break; + case 10: + yy.getLogger().trace("Exploding node"); + this.begin("NODE"); + return 19; + case 11: + yy.getLogger().trace("Cloud"); + this.begin("NODE"); + return 19; + case 12: + yy.getLogger().trace("Explosion Bang"); + this.begin("NODE"); + return 19; + case 13: + yy.getLogger().trace("Cloud Bang"); + this.begin("NODE"); + return 19; + case 14: + this.begin("NODE"); + return 19; + case 15: + this.begin("NODE"); + return 19; + case 16: + this.begin("NODE"); + return 19; + case 17: + this.begin("NODE"); + return 19; + case 18: + return 13; + case 19: + return 22; + case 20: + return 11; + case 21: + this.begin("NSTR2"); + break; + case 22: + return "NODE_DESCR"; + case 23: + this.popState(); + break; + case 24: + yy.getLogger().trace("Starting NSTR"); + this.begin("NSTR"); + break; + case 25: + yy.getLogger().trace("description:", yy_.yytext); + return "NODE_DESCR"; + case 26: + this.popState(); + break; + case 27: + this.popState(); + yy.getLogger().trace("node end ))"); + return "NODE_DEND"; + case 28: + this.popState(); + yy.getLogger().trace("node end )"); + return "NODE_DEND"; + case 29: + this.popState(); + yy.getLogger().trace("node end ...", yy_.yytext); + return "NODE_DEND"; + case 30: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 31: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 32: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 33: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 34: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 35: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + case 36: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + } + }, + rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], + conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const mindmapParser = parser; +const sanitizeText = (text) => sanitizeText$1(text, getConfig()); +let nodes = []; +let cnt = 0; +let elements = {}; +const clear = () => { + nodes = []; + cnt = 0; + elements = {}; +}; +const getParent = function(level) { + for (let i = nodes.length - 1; i >= 0; i--) { + if (nodes[i].level < level) { + return nodes[i]; + } + } + return null; +}; +const getMindmap = () => { + return nodes.length > 0 ? nodes[0] : null; +}; +const addNode = (level, id, descr, type) => { + log.info("addNode", level, id, descr, type); + const conf = getConfig(); + const node = { + id: cnt++, + nodeId: sanitizeText(id), + level, + descr: sanitizeText(descr), + type, + children: [], + width: getConfig().mindmap.maxNodeWidth + }; + switch (node.type) { + case nodeType.ROUNDED_RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.HEXAGON: + node.padding = 2 * conf.mindmap.padding; + break; + default: + node.padding = conf.mindmap.padding; + } + const parent = getParent(level); + if (parent) { + parent.children.push(node); + nodes.push(node); + } else { + if (nodes.length === 0) { + nodes.push(node); + } else { + let error = new Error( + 'There can be only one root. No parent could be found for ("' + node.descr + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } + } +}; +const nodeType = { + DEFAULT: 0, + NO_BORDER: 0, + ROUNDED_RECT: 1, + RECT: 2, + CIRCLE: 3, + CLOUD: 4, + BANG: 5, + HEXAGON: 6 +}; +const getType = (startStr, endStr) => { + log.debug("In get type", startStr, endStr); + switch (startStr) { + case "[": + return nodeType.RECT; + case "(": + return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD; + case "((": + return nodeType.CIRCLE; + case ")": + return nodeType.CLOUD; + case "))": + return nodeType.BANG; + case "{{": + return nodeType.HEXAGON; + default: + return nodeType.DEFAULT; + } +}; +const setElementForId = (id, element) => { + elements[id] = element; +}; +const decorateNode = (decoration) => { + const node = nodes[nodes.length - 1]; + if (decoration && decoration.icon) { + node.icon = sanitizeText(decoration.icon); + } + if (decoration && decoration.class) { + node.class = sanitizeText(decoration.class); + } +}; +const type2Str = (type) => { + switch (type) { + case nodeType.DEFAULT: + return "no-border"; + case nodeType.RECT: + return "rect"; + case nodeType.ROUNDED_RECT: + return "rounded-rect"; + case nodeType.CIRCLE: + return "circle"; + case nodeType.CLOUD: + return "cloud"; + case nodeType.BANG: + return "bang"; + case nodeType.HEXAGON: + return "hexgon"; + default: + return "no-border"; + } +}; +let parseError; +const setErrorHandler = (handler) => { + parseError = handler; +}; +const getLogger = () => log; +const getNodeById = (id) => nodes[id]; +const getElementById = (id) => elements[id]; +const mindmapDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addNode, + clear, + decorateNode, + getElementById, + getLogger, + getMindmap, + getNodeById, + getType, + nodeType, + get parseError() { + return parseError; + }, + sanitizeText, + setElementForId, + setErrorHandler, + type2Str +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const rectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("width", node.width); +}; +const cloudBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r1 = 0.15 * w; + const r2 = 0.25 * w; + const r3 = 0.35 * w; + const r4 = 0.2 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} + a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1} + a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2} + + a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35} + a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65} + + a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15} + a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0} + a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15} + + a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35} + a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65} + + H0 V0 Z` + ); +}; +const bangBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r = 0.15 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1} + + a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34} + a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33} + + a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15} + + a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} + a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33} + + H0 V0 Z` + ); +}; +const circleBkg = function(elem, node) { + elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("r", node.width / 2); +}; +function insertPolygonShape(parent, w, h, points, node) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); +} +const hexagonBkg = function(elem, node) { + const h = node.height; + const f = 4; + const m = h / f; + const w = node.width - node.padding + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + insertPolygonShape(elem, w, h, points, node); +}; +const roundedRectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width); +}; +const drawNode = function(elem, node, fullSection, conf) { + const htmlLabels = conf.htmlLabels; + const section = fullSection % (MAX_SECTIONS - 1); + const nodeElem = elem.append("g"); + node.section = section; + let sectionClass = "section-" + section; + if (section < 0) { + sectionClass += " section-root"; + } + nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const description = node.descr.replace(/()/g, "\n"); + createText(textElem, description, { + useHtmlLabels: htmlLabels, + width: node.width, + classes: "mindmap-node-label" + }); + if (!htmlLabels) { + textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"); + } + const bbox = textElem.node().getBBox(); + const fontSize = conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.width = bbox.width + 2 * node.padding; + if (node.icon) { + if (node.type === nodeType.CIRCLE) { + node.height += 50; + node.width += 50; + const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")" + ); + } else { + node.width += 50; + const orgHeight = node.height; + node.height = Math.max(orgHeight, 60); + const heightDiff = Math.abs(node.height - orgHeight); + const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")" + ); + } + } else { + if (!htmlLabels) { + const dx = node.width / 2; + const dy = node.padding / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } else { + const dx = (node.width - bbox.width) / 2; + const dy = (node.height - bbox.height) / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } + } + switch (node.type) { + case nodeType.DEFAULT: + defaultBkg(bkgElem, node, section); + break; + case nodeType.ROUNDED_RECT: + roundedRectBkg(bkgElem, node); + break; + case nodeType.RECT: + rectBkg(bkgElem, node); + break; + case nodeType.CIRCLE: + bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")"); + circleBkg(bkgElem, node); + break; + case nodeType.CLOUD: + cloudBkg(bkgElem, node); + break; + case nodeType.BANG: + bangBkg(bkgElem, node); + break; + case nodeType.HEXAGON: + hexagonBkg(bkgElem, node); + break; + } + setElementForId(node.id, nodeElem); + return node.height; +}; +const drawEdge = function drawEdge2(edgesElem, mindmap, parent, depth, fullSection) { + const section = fullSection % (MAX_SECTIONS - 1); + const sx = parent.x + parent.width / 2; + const sy = parent.y + parent.height / 2; + const ex = mindmap.x + mindmap.width / 2; + const ey = mindmap.y + mindmap.height / 2; + const mx = ex > sx ? sx + Math.abs(sx - ex) / 2 : sx - Math.abs(sx - ex) / 2; + const my = ey > sy ? sy + Math.abs(sy - ey) / 2 : sy - Math.abs(sy - ey) / 2; + const qx = ex > sx ? Math.abs(sx - mx) / 2 + sx : -Math.abs(sx - mx) / 2 + sx; + const qy = ey > sy ? Math.abs(sy - my) / 2 + sy : -Math.abs(sy - my) / 2 + sy; + edgesElem.append("path").attr( + "d", + parent.direction === "TB" || parent.direction === "BT" ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}` : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}` + ).attr("class", "edge section-edge-" + section + " edge-depth-" + depth); +}; +const positionNode = function(node) { + const nodeElem = getElementById(node.id); + const x = node.x || 0; + const y = node.y || 0; + nodeElem.attr("transform", "translate(" + x + "," + y + ")"); +}; +const svgDraw = { drawNode, positionNode, drawEdge }; +var cytoscape_umd = { exports: {} }; +(function(module, exports) { + (function(global, factory) { + module.exports = factory(); + })(commonjsGlobal, function() { + function _typeof(obj) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { + return typeof obj2; + } : function(obj2) { + return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }, _typeof(obj); + } + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i2 = 0; i2 < props.length; i2++) { + var descriptor = props[i2]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) + _defineProperties(Constructor.prototype, protoProps); + if (staticProps) + _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; + } + function _defineProperty$1(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function _slicedToArray(arr, i2) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i2) || _unsupportedIterableToArray(arr, i2) || _nonIterableRest(); + } + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) + return arr; + } + function _iterableToArrayLimit(arr, i2) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + if (_i == null) + return; + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i2 && _arr.length === i2) + break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) + _i["return"](); + } finally { + if (_d) + throw _e; + } + } + return _arr; + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) + return; + if (typeof o === "string") + return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) + n = o.constructor.name; + if (n === "Map" || n === "Set") + return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) + arr2[i2] = arr[i2]; + return arr2; + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var window$1 = typeof window === "undefined" ? null : window; + var navigator = window$1 ? window$1.navigator : null; + window$1 ? window$1.document : null; + var typeofstr = _typeof(""); + var typeofobj = _typeof({}); + var typeoffn = _typeof(function() { + }); + var typeofhtmlele = typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement); + var instanceStr = function instanceStr2(obj) { + return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null; + }; + var string = function string2(obj) { + return obj != null && _typeof(obj) == typeofstr; + }; + var fn$6 = function fn2(obj) { + return obj != null && _typeof(obj) === typeoffn; + }; + var array = function array2(obj) { + return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array); + }; + var plainObject = function plainObject2(obj) { + return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object; + }; + var object = function object2(obj) { + return obj != null && _typeof(obj) === typeofobj; + }; + var number$1 = function number2(obj) { + return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj); + }; + var integer = function integer2(obj) { + return number$1(obj) && Math.floor(obj) === obj; + }; + var htmlElement = function htmlElement2(obj) { + if ("undefined" === typeofhtmlele) { + return void 0; + } else { + return null != obj && obj instanceof HTMLElement; + } + }; + var elementOrCollection = function elementOrCollection2(obj) { + return element(obj) || collection(obj); + }; + var element = function element2(obj) { + return instanceStr(obj) === "collection" && obj._private.single; + }; + var collection = function collection2(obj) { + return instanceStr(obj) === "collection" && !obj._private.single; + }; + var core = function core2(obj) { + return instanceStr(obj) === "core"; + }; + var stylesheet = function stylesheet2(obj) { + return instanceStr(obj) === "stylesheet"; + }; + var event = function event2(obj) { + return instanceStr(obj) === "event"; + }; + var emptyString = function emptyString2(obj) { + if (obj === void 0 || obj === null) { + return true; + } else if (obj === "" || obj.match(/^\s+$/)) { + return true; + } + return false; + }; + var domElement = function domElement2(obj) { + if (typeof HTMLElement === "undefined") { + return false; + } else { + return obj instanceof HTMLElement; + } + }; + var boundingBox = function boundingBox2(obj) { + return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2); + }; + var promise = function promise2(obj) { + return object(obj) && fn$6(obj.then); + }; + var ms = function ms2() { + return navigator && navigator.userAgent.match(/msie|trident|edge/i); + }; + var memoize$1 = function memoize2(fn2, keyFn) { + if (!keyFn) { + keyFn = function keyFn2() { + if (arguments.length === 1) { + return arguments[0]; + } else if (arguments.length === 0) { + return "undefined"; + } + var args = []; + for (var i2 = 0; i2 < arguments.length; i2++) { + args.push(arguments[i2]); + } + return args.join("$"); + }; + } + var memoizedFn = function memoizedFn2() { + var self2 = this; + var args = arguments; + var ret; + var k = keyFn.apply(self2, args); + var cache2 = memoizedFn2.cache; + if (!(ret = cache2[k])) { + ret = cache2[k] = fn2.apply(self2, args); + } + return ret; + }; + memoizedFn.cache = {}; + return memoizedFn; + }; + var camel2dash = memoize$1(function(str) { + return str.replace(/([A-Z])/g, function(v) { + return "-" + v.toLowerCase(); + }); + }); + var dash2camel = memoize$1(function(str) { + return str.replace(/(-\w)/g, function(v) { + return v[1].toUpperCase(); + }); + }); + var prependCamel = memoize$1(function(prefix, str) { + return prefix + str[0].toUpperCase() + str.substring(1); + }, function(prefix, str) { + return prefix + "$" + str; + }); + var capitalize = function capitalize2(str) { + if (emptyString(str)) { + return str; + } + return str.charAt(0).toUpperCase() + str.substring(1); + }; + var number = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))"; + var rgba = "rgb[a]?\\((" + number + "[%]?)\\s*,\\s*(" + number + "[%]?)\\s*,\\s*(" + number + "[%]?)(?:\\s*,\\s*(" + number + "))?\\)"; + var rgbaNoBackRefs = "rgb[a]?\\((?:" + number + "[%]?)\\s*,\\s*(?:" + number + "[%]?)\\s*,\\s*(?:" + number + "[%]?)(?:\\s*,\\s*(?:" + number + "))?\\)"; + var hsla = "hsl[a]?\\((" + number + ")\\s*,\\s*(" + number + "[%])\\s*,\\s*(" + number + "[%])(?:\\s*,\\s*(" + number + "))?\\)"; + var hslaNoBackRefs = "hsl[a]?\\((?:" + number + ")\\s*,\\s*(?:" + number + "[%])\\s*,\\s*(?:" + number + "[%])(?:\\s*,\\s*(?:" + number + "))?\\)"; + var hex3 = "\\#[0-9a-fA-F]{3}"; + var hex6 = "\\#[0-9a-fA-F]{6}"; + var ascending = function ascending2(a, b) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + }; + var descending = function descending2(a, b) { + return -1 * ascending(a, b); + }; + var extend = Object.assign != null ? Object.assign.bind(Object) : function(tgt) { + var args = arguments; + for (var i2 = 1; i2 < args.length; i2++) { + var obj = args[i2]; + if (obj == null) { + continue; + } + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; j++) { + var k = keys[j]; + tgt[k] = obj[k]; + } + } + return tgt; + }; + var hex2tuple = function hex2tuple2(hex) { + if (!(hex.length === 4 || hex.length === 7) || hex[0] !== "#") { + return; + } + var shortHex = hex.length === 4; + var r, g, b; + var base = 16; + if (shortHex) { + r = parseInt(hex[1] + hex[1], base); + g = parseInt(hex[2] + hex[2], base); + b = parseInt(hex[3] + hex[3], base); + } else { + r = parseInt(hex[1] + hex[2], base); + g = parseInt(hex[3] + hex[4], base); + b = parseInt(hex[5] + hex[6], base); + } + return [r, g, b]; + }; + var hsl2tuple = function hsl2tuple2(hsl) { + var ret; + var h, s, l, a, r, g, b; + function hue2rgb(p3, q2, t) { + if (t < 0) + t += 1; + if (t > 1) + t -= 1; + if (t < 1 / 6) + return p3 + (q2 - p3) * 6 * t; + if (t < 1 / 2) + return q2; + if (t < 2 / 3) + return p3 + (q2 - p3) * (2 / 3 - t) * 6; + return p3; + } + var m = new RegExp("^" + hsla + "$").exec(hsl); + if (m) { + h = parseInt(m[1]); + if (h < 0) { + h = (360 - -1 * h % 360) % 360; + } else if (h > 360) { + h = h % 360; + } + h /= 360; + s = parseFloat(m[2]); + if (s < 0 || s > 100) { + return; + } + s = s / 100; + l = parseFloat(m[3]); + if (l < 0 || l > 100) { + return; + } + l = l / 100; + a = m[4]; + if (a !== void 0) { + a = parseFloat(a); + if (a < 0 || a > 1) { + return; + } + } + if (s === 0) { + r = g = b = Math.round(l * 255); + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p2 = 2 * l - q; + r = Math.round(255 * hue2rgb(p2, q, h + 1 / 3)); + g = Math.round(255 * hue2rgb(p2, q, h)); + b = Math.round(255 * hue2rgb(p2, q, h - 1 / 3)); + } + ret = [r, g, b, a]; + } + return ret; + }; + var rgb2tuple = function rgb2tuple2(rgb) { + var ret; + var m = new RegExp("^" + rgba + "$").exec(rgb); + if (m) { + ret = []; + var isPct = []; + for (var i2 = 1; i2 <= 3; i2++) { + var channel = m[i2]; + if (channel[channel.length - 1] === "%") { + isPct[i2] = true; + } + channel = parseFloat(channel); + if (isPct[i2]) { + channel = channel / 100 * 255; + } + if (channel < 0 || channel > 255) { + return; + } + ret.push(Math.floor(channel)); + } + var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3]; + var allArePct = isPct[1] && isPct[2] && isPct[3]; + if (atLeastOneIsPct && !allArePct) { + return; + } + var alpha = m[4]; + if (alpha !== void 0) { + alpha = parseFloat(alpha); + if (alpha < 0 || alpha > 1) { + return; + } + ret.push(alpha); + } + } + return ret; + }; + var colorname2tuple = function colorname2tuple2(color) { + return colors[color.toLowerCase()]; + }; + var color2tuple = function color2tuple2(color) { + return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color); + }; + var colors = { + // special colour names + transparent: [0, 0, 0, 0], + // NB alpha === 0 + // regular colours + aliceblue: [240, 248, 255], + antiquewhite: [250, 235, 215], + aqua: [0, 255, 255], + aquamarine: [127, 255, 212], + azure: [240, 255, 255], + beige: [245, 245, 220], + bisque: [255, 228, 196], + black: [0, 0, 0], + blanchedalmond: [255, 235, 205], + blue: [0, 0, 255], + blueviolet: [138, 43, 226], + brown: [165, 42, 42], + burlywood: [222, 184, 135], + cadetblue: [95, 158, 160], + chartreuse: [127, 255, 0], + chocolate: [210, 105, 30], + coral: [255, 127, 80], + cornflowerblue: [100, 149, 237], + cornsilk: [255, 248, 220], + crimson: [220, 20, 60], + cyan: [0, 255, 255], + darkblue: [0, 0, 139], + darkcyan: [0, 139, 139], + darkgoldenrod: [184, 134, 11], + darkgray: [169, 169, 169], + darkgreen: [0, 100, 0], + darkgrey: [169, 169, 169], + darkkhaki: [189, 183, 107], + darkmagenta: [139, 0, 139], + darkolivegreen: [85, 107, 47], + darkorange: [255, 140, 0], + darkorchid: [153, 50, 204], + darkred: [139, 0, 0], + darksalmon: [233, 150, 122], + darkseagreen: [143, 188, 143], + darkslateblue: [72, 61, 139], + darkslategray: [47, 79, 79], + darkslategrey: [47, 79, 79], + darkturquoise: [0, 206, 209], + darkviolet: [148, 0, 211], + deeppink: [255, 20, 147], + deepskyblue: [0, 191, 255], + dimgray: [105, 105, 105], + dimgrey: [105, 105, 105], + dodgerblue: [30, 144, 255], + firebrick: [178, 34, 34], + floralwhite: [255, 250, 240], + forestgreen: [34, 139, 34], + fuchsia: [255, 0, 255], + gainsboro: [220, 220, 220], + ghostwhite: [248, 248, 255], + gold: [255, 215, 0], + goldenrod: [218, 165, 32], + gray: [128, 128, 128], + grey: [128, 128, 128], + green: [0, 128, 0], + greenyellow: [173, 255, 47], + honeydew: [240, 255, 240], + hotpink: [255, 105, 180], + indianred: [205, 92, 92], + indigo: [75, 0, 130], + ivory: [255, 255, 240], + khaki: [240, 230, 140], + lavender: [230, 230, 250], + lavenderblush: [255, 240, 245], + lawngreen: [124, 252, 0], + lemonchiffon: [255, 250, 205], + lightblue: [173, 216, 230], + lightcoral: [240, 128, 128], + lightcyan: [224, 255, 255], + lightgoldenrodyellow: [250, 250, 210], + lightgray: [211, 211, 211], + lightgreen: [144, 238, 144], + lightgrey: [211, 211, 211], + lightpink: [255, 182, 193], + lightsalmon: [255, 160, 122], + lightseagreen: [32, 178, 170], + lightskyblue: [135, 206, 250], + lightslategray: [119, 136, 153], + lightslategrey: [119, 136, 153], + lightsteelblue: [176, 196, 222], + lightyellow: [255, 255, 224], + lime: [0, 255, 0], + limegreen: [50, 205, 50], + linen: [250, 240, 230], + magenta: [255, 0, 255], + maroon: [128, 0, 0], + mediumaquamarine: [102, 205, 170], + mediumblue: [0, 0, 205], + mediumorchid: [186, 85, 211], + mediumpurple: [147, 112, 219], + mediumseagreen: [60, 179, 113], + mediumslateblue: [123, 104, 238], + mediumspringgreen: [0, 250, 154], + mediumturquoise: [72, 209, 204], + mediumvioletred: [199, 21, 133], + midnightblue: [25, 25, 112], + mintcream: [245, 255, 250], + mistyrose: [255, 228, 225], + moccasin: [255, 228, 181], + navajowhite: [255, 222, 173], + navy: [0, 0, 128], + oldlace: [253, 245, 230], + olive: [128, 128, 0], + olivedrab: [107, 142, 35], + orange: [255, 165, 0], + orangered: [255, 69, 0], + orchid: [218, 112, 214], + palegoldenrod: [238, 232, 170], + palegreen: [152, 251, 152], + paleturquoise: [175, 238, 238], + palevioletred: [219, 112, 147], + papayawhip: [255, 239, 213], + peachpuff: [255, 218, 185], + peru: [205, 133, 63], + pink: [255, 192, 203], + plum: [221, 160, 221], + powderblue: [176, 224, 230], + purple: [128, 0, 128], + red: [255, 0, 0], + rosybrown: [188, 143, 143], + royalblue: [65, 105, 225], + saddlebrown: [139, 69, 19], + salmon: [250, 128, 114], + sandybrown: [244, 164, 96], + seagreen: [46, 139, 87], + seashell: [255, 245, 238], + sienna: [160, 82, 45], + silver: [192, 192, 192], + skyblue: [135, 206, 235], + slateblue: [106, 90, 205], + slategray: [112, 128, 144], + slategrey: [112, 128, 144], + snow: [255, 250, 250], + springgreen: [0, 255, 127], + steelblue: [70, 130, 180], + tan: [210, 180, 140], + teal: [0, 128, 128], + thistle: [216, 191, 216], + tomato: [255, 99, 71], + turquoise: [64, 224, 208], + violet: [238, 130, 238], + wheat: [245, 222, 179], + white: [255, 255, 255], + whitesmoke: [245, 245, 245], + yellow: [255, 255, 0], + yellowgreen: [154, 205, 50] + }; + var setMap = function setMap2(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + for (var i2 = 0; i2 < l; i2++) { + var key = keys[i2]; + if (plainObject(key)) { + throw Error("Tried to set map with object key"); + } + if (i2 < keys.length - 1) { + if (obj[key] == null) { + obj[key] = {}; + } + obj = obj[key]; + } else { + obj[key] = options.value; + } + } + }; + var getMap = function getMap2(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + for (var i2 = 0; i2 < l; i2++) { + var key = keys[i2]; + if (plainObject(key)) { + throw Error("Tried to get map with object key"); + } + obj = obj[key]; + if (obj == null) { + return obj; + } + } + return obj; + }; + function isObject(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + var isObject_1 = isObject; + var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : {}; + function createCommonjsModule(fn2, module2) { + return module2 = { exports: {} }, fn2(module2, module2.exports), module2.exports; + } + var freeGlobal = typeof commonjsGlobal$1 == "object" && commonjsGlobal$1 && commonjsGlobal$1.Object === Object && commonjsGlobal$1; + var _freeGlobal = freeGlobal; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = _freeGlobal || freeSelf || Function("return this")(); + var _root = root; + var now = function() { + return _root.Date.now(); + }; + var now_1 = now; + var reWhitespace = /\s/; + function trimmedEndIndex(string2) { + var index = string2.length; + while (index-- && reWhitespace.test(string2.charAt(index))) { + } + return index; + } + var _trimmedEndIndex = trimmedEndIndex; + var reTrimStart = /^\s+/; + function baseTrim(string2) { + return string2 ? string2.slice(0, _trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2; + } + var _baseTrim = baseTrim; + var Symbol$1 = _root.Symbol; + var _Symbol = Symbol$1; + var objectProto$5 = Object.prototype; + var hasOwnProperty$4 = objectProto$5.hasOwnProperty; + var nativeObjectToString$1 = objectProto$5.toString; + var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : void 0; + function getRawTag(value) { + var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), tag = value[symToStringTag$1]; + try { + value[symToStringTag$1] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString$1.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; + } + var _getRawTag = getRawTag; + var objectProto$4 = Object.prototype; + var nativeObjectToString = objectProto$4.toString; + function objectToString(value) { + return nativeObjectToString.call(value); + } + var _objectToString = objectToString; + var nullTag = "[object Null]", undefinedTag = "[object Undefined]"; + var symToStringTag = _Symbol ? _Symbol.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? _getRawTag(value) : _objectToString(value); + } + var _baseGetTag = baseGetTag; + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + var isObjectLike_1 = isObjectLike; + var symbolTag = "[object Symbol]"; + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike_1(value) && _baseGetTag(value) == symbolTag; + } + var isSymbol_1 = isSymbol; + var NAN = 0 / 0; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol_1(value)) { + return NAN; + } + if (isObject_1(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject_1(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + var toNumber_1 = toNumber; + var FUNC_ERROR_TEXT$1 = "Expected a function"; + var nativeMax = Math.max, nativeMin = Math.min; + function debounce(func, wait, options) { + var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; + if (typeof func != "function") { + throw new TypeError(FUNC_ERROR_TEXT$1); + } + wait = toNumber_1(wait) || 0; + if (isObject_1(options)) { + leading = !!options.leading; + maxing = "maxWait" in options; + maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait; + trailing = "trailing" in options ? !!options.trailing : trailing; + } + function invokeFunc(time) { + var args = lastArgs, thisArg = lastThis; + lastArgs = lastThis = void 0; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + function leadingEdge(time) { + lastInvokeTime = time; + timerId = setTimeout(timerExpired, wait); + return leading ? invokeFunc(time) : result; + } + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; + return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + } + function timerExpired() { + var time = now_1(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + timerId = setTimeout(timerExpired, remainingWait(time)); + } + function trailingEdge(time) { + timerId = void 0; + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = void 0; + return result; + } + function cancel() { + if (timerId !== void 0) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = void 0; + } + function flush() { + return timerId === void 0 ? result : trailingEdge(now_1()); + } + function debounced() { + var time = now_1(), isInvoking = shouldInvoke(time); + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + if (isInvoking) { + if (timerId === void 0) { + return leadingEdge(lastCallTime); + } + if (maxing) { + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === void 0) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + var debounce_1 = debounce; + var performance = window$1 ? window$1.performance : null; + var pnow = performance && performance.now ? function() { + return performance.now(); + } : function() { + return Date.now(); + }; + var raf = function() { + if (window$1) { + if (window$1.requestAnimationFrame) { + return function(fn2) { + window$1.requestAnimationFrame(fn2); + }; + } else if (window$1.mozRequestAnimationFrame) { + return function(fn2) { + window$1.mozRequestAnimationFrame(fn2); + }; + } else if (window$1.webkitRequestAnimationFrame) { + return function(fn2) { + window$1.webkitRequestAnimationFrame(fn2); + }; + } else if (window$1.msRequestAnimationFrame) { + return function(fn2) { + window$1.msRequestAnimationFrame(fn2); + }; + } + } + return function(fn2) { + if (fn2) { + setTimeout(function() { + fn2(pnow()); + }, 1e3 / 60); + } + }; + }(); + var requestAnimationFrame2 = function requestAnimationFrame3(fn2) { + return raf(fn2); + }; + var performanceNow = pnow; + var DEFAULT_HASH_SEED = 9261; + var K = 65599; + var DEFAULT_HASH_SEED_ALT = 5381; + var hashIterableInts = function hashIterableInts2(iterator) { + var seed = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_HASH_SEED; + var hash = seed; + var entry; + for (; ; ) { + entry = iterator.next(); + if (entry.done) { + break; + } + hash = hash * K + entry.value | 0; + } + return hash; + }; + var hashInt = function hashInt2(num) { + var seed = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_HASH_SEED; + return seed * K + num | 0; + }; + var hashIntAlt = function hashIntAlt2(num) { + var seed = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_HASH_SEED_ALT; + return (seed << 5) + seed + num | 0; + }; + var combineHashes = function combineHashes2(hash1, hash2) { + return hash1 * 2097152 + hash2; + }; + var combineHashesArray = function combineHashesArray2(hashes) { + return hashes[0] * 2097152 + hashes[1]; + }; + var hashArrays = function hashArrays2(hashes1, hashes2) { + return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])]; + }; + var hashIntsArray = function hashIntsArray2(ints, seed) { + var entry = { + value: 0, + done: false + }; + var i2 = 0; + var length = ints.length; + var iterator = { + next: function next2() { + if (i2 < length) { + entry.value = ints[i2++]; + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashString = function hashString2(str, seed) { + var entry = { + value: 0, + done: false + }; + var i2 = 0; + var length = str.length; + var iterator = { + next: function next2() { + if (i2 < length) { + entry.value = str.charCodeAt(i2++); + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashStrings = function hashStrings2() { + return hashStringsArray(arguments); + }; + var hashStringsArray = function hashStringsArray2(strs) { + var hash; + for (var i2 = 0; i2 < strs.length; i2++) { + var str = strs[i2]; + if (i2 === 0) { + hash = hashString(str); + } else { + hash = hashString(str, hash); + } + } + return hash; + }; + var warningsEnabled = true; + var warnSupported = console.warn != null; + var traceSupported = console.trace != null; + var MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; + var trueify = function trueify2() { + return true; + }; + var falsify = function falsify2() { + return false; + }; + var zeroify = function zeroify2() { + return 0; + }; + var noop$1 = function noop2() { + }; + var error = function error2(msg) { + throw new Error(msg); + }; + var warnings = function warnings2(enabled) { + if (enabled !== void 0) { + warningsEnabled = !!enabled; + } else { + return warningsEnabled; + } + }; + var warn = function warn2(msg) { + if (!warnings()) { + return; + } + if (warnSupported) { + console.warn(msg); + } else { + console.log(msg); + if (traceSupported) { + console.trace(); + } + } + }; + var clone = function clone2(obj) { + return extend({}, obj); + }; + var copy = function copy2(obj) { + if (obj == null) { + return obj; + } + if (array(obj)) { + return obj.slice(); + } else if (plainObject(obj)) { + return clone(obj); + } else { + return obj; + } + }; + var copyArray$1 = function copyArray2(arr) { + return arr.slice(); + }; + var uuid = function uuid2(a, b) { + for ( + // loop :) + b = a = ""; + // b - result , a - numeric letiable + a++ < 36; + // + b += a * 51 & 52 ? ( + // return a random number or 4 + (a ^ 15 ? ( + // generate a random number from 0 to 15 + 8 ^ Math.random() * (a ^ 20 ? 16 : 4) + ) : 4).toString(16) + ) : "-" + ) { + } + return b; + }; + var _staticEmptyObject = {}; + var staticEmptyObject = function staticEmptyObject2() { + return _staticEmptyObject; + }; + var defaults$g = function defaults2(_defaults) { + var keys = Object.keys(_defaults); + return function(opts) { + var filledOpts = {}; + for (var i2 = 0; i2 < keys.length; i2++) { + var key = keys[i2]; + var optVal = opts == null ? void 0 : opts[key]; + filledOpts[key] = optVal === void 0 ? _defaults[key] : optVal; + } + return filledOpts; + }; + }; + var removeFromArray = function removeFromArray2(arr, ele, oneCopy) { + for (var i2 = arr.length - 1; i2 >= 0; i2--) { + if (arr[i2] === ele) { + arr.splice(i2, 1); + if (oneCopy) { + break; + } + } + } + }; + var clearArray = function clearArray2(arr) { + arr.splice(0, arr.length); + }; + var push = function push2(arr, otherArr) { + for (var i2 = 0; i2 < otherArr.length; i2++) { + var el = otherArr[i2]; + arr.push(el); + } + }; + var getPrefixedProperty = function getPrefixedProperty2(obj, propName, prefix) { + if (prefix) { + propName = prependCamel(prefix, propName); + } + return obj[propName]; + }; + var setPrefixedProperty = function setPrefixedProperty2(obj, propName, prefix, value) { + if (prefix) { + propName = prependCamel(prefix, propName); + } + obj[propName] = value; + }; + var ObjectMap = /* @__PURE__ */ function() { + function ObjectMap2() { + _classCallCheck(this, ObjectMap2); + this._obj = {}; + } + _createClass(ObjectMap2, [{ + key: "set", + value: function set2(key, val) { + this._obj[key] = val; + return this; + } + }, { + key: "delete", + value: function _delete(key) { + this._obj[key] = void 0; + return this; + } + }, { + key: "clear", + value: function clear2() { + this._obj = {}; + } + }, { + key: "has", + value: function has(key) { + return this._obj[key] !== void 0; + } + }, { + key: "get", + value: function get2(key) { + return this._obj[key]; + } + }]); + return ObjectMap2; + }(); + var Map$2 = typeof Map !== "undefined" ? Map : ObjectMap; + var undef = "undefined"; + var ObjectSet = /* @__PURE__ */ function() { + function ObjectSet2(arrayOrObjectSet) { + _classCallCheck(this, ObjectSet2); + this._obj = /* @__PURE__ */ Object.create(null); + this.size = 0; + if (arrayOrObjectSet != null) { + var arr; + if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) { + arr = arrayOrObjectSet.toArray(); + } else { + arr = arrayOrObjectSet; + } + for (var i2 = 0; i2 < arr.length; i2++) { + this.add(arr[i2]); + } + } + } + _createClass(ObjectSet2, [{ + key: "instanceString", + value: function instanceString() { + return "set"; + } + }, { + key: "add", + value: function add(val) { + var o = this._obj; + if (o[val] !== 1) { + o[val] = 1; + this.size++; + } + } + }, { + key: "delete", + value: function _delete(val) { + var o = this._obj; + if (o[val] === 1) { + o[val] = 0; + this.size--; + } + } + }, { + key: "clear", + value: function clear2() { + this._obj = /* @__PURE__ */ Object.create(null); + } + }, { + key: "has", + value: function has(val) { + return this._obj[val] === 1; + } + }, { + key: "toArray", + value: function toArray() { + var _this = this; + return Object.keys(this._obj).filter(function(key) { + return _this.has(key); + }); + } + }, { + key: "forEach", + value: function forEach(callback, thisArg) { + return this.toArray().forEach(callback, thisArg); + } + }]); + return ObjectSet2; + }(); + var Set$1 = (typeof Set === "undefined" ? "undefined" : _typeof(Set)) !== undef ? Set : ObjectSet; + var Element = function Element2(cy, params) { + var restore = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; + if (cy === void 0 || params === void 0 || !core(cy)) { + error("An element must have a core reference and parameters set"); + return; + } + var group = params.group; + if (group == null) { + if (params.data && params.data.source != null && params.data.target != null) { + group = "edges"; + } else { + group = "nodes"; + } + } + if (group !== "nodes" && group !== "edges") { + error("An element must be of type `nodes` or `edges`; you specified `" + group + "`"); + return; + } + this.length = 1; + this[0] = this; + var _p = this._private = { + cy, + single: true, + // indicates this is an element + data: params.data || {}, + // data object + position: params.position || { + x: 0, + y: 0 + }, + // (x, y) position pair + autoWidth: void 0, + // width and height of nodes calculated by the renderer when set to special 'auto' value + autoHeight: void 0, + autoPadding: void 0, + compoundBoundsClean: false, + // whether the compound dimensions need to be recalculated the next time dimensions are read + listeners: [], + // array of bound listeners + group, + // string; 'nodes' or 'edges' + style: {}, + // properties as set by the style + rstyle: {}, + // properties for style sent from the renderer to the core + styleCxts: [], + // applied style contexts from the styler + styleKeys: {}, + // per-group keys of style property values + removed: true, + // whether it's inside the vis; true if removed (set true here since we call restore) + selected: params.selected ? true : false, + // whether it's selected + selectable: params.selectable === void 0 ? true : params.selectable ? true : false, + // whether it's selectable + locked: params.locked ? true : false, + // whether the element is locked (cannot be moved) + grabbed: false, + // whether the element is grabbed by the mouse; renderer sets this privately + grabbable: params.grabbable === void 0 ? true : params.grabbable ? true : false, + // whether the element can be grabbed + pannable: params.pannable === void 0 ? group === "edges" ? true : false : params.pannable ? true : false, + // whether the element has passthrough panning enabled + active: false, + // whether the element is active from user interaction + classes: new Set$1(), + // map ( className => true ) + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + rscratch: {}, + // object in which the renderer can store information + scratch: params.scratch || {}, + // scratch objects + edges: [], + // array of connected edges + children: [], + // array of children + parent: params.parent && params.parent.isNode() ? params.parent : null, + // parent ref + traversalCache: {}, + // cache of output of traversal functions + backgrounding: false, + // whether background images are loading + bbCache: null, + // cache of the current bounding box + bbCacheShift: { + x: 0, + y: 0 + }, + // shift applied to cached bb to be applied on next get + bodyBounds: null, + // bounds cache of element body, w/o overlay + overlayBounds: null, + // bounds cache of element body, including overlay + labelBounds: { + // bounds cache of labels + all: null, + source: null, + target: null, + main: null + }, + arrowBounds: { + // bounds cache of edge arrows + source: null, + target: null, + "mid-source": null, + "mid-target": null + } + }; + if (_p.position.x == null) { + _p.position.x = 0; + } + if (_p.position.y == null) { + _p.position.y = 0; + } + if (params.renderedPosition) { + var rpos = params.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + _p.position = { + x: (rpos.x - pan.x) / zoom, + y: (rpos.y - pan.y) / zoom + }; + } + var classes = []; + if (array(params.classes)) { + classes = params.classes; + } else if (string(params.classes)) { + classes = params.classes.split(/\s+/); + } + for (var i2 = 0, l = classes.length; i2 < l; i2++) { + var cls = classes[i2]; + if (!cls || cls === "") { + continue; + } + _p.classes.add(cls); + } + this.createEmitter(); + var bypass = params.style || params.css; + if (bypass) { + warn("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."); + this.style(bypass); + } + if (restore === void 0 || restore) { + this.restore(); + } + }; + var defineSearch = function defineSearch2(params) { + params = { + bfs: params.bfs || !params.dfs, + dfs: params.dfs || !params.bfs + }; + return function searchFn(roots, fn2, directed) { + var options; + if (plainObject(roots) && !elementOrCollection(roots)) { + options = roots; + roots = options.roots || options.root; + fn2 = options.visit; + directed = options.directed; + } + directed = arguments.length === 2 && !fn$6(fn2) ? fn2 : directed; + fn2 = fn$6(fn2) ? fn2 : function() { + }; + var cy = this._private.cy; + var v = roots = string(roots) ? this.filter(roots) : roots; + var Q = []; + var connectedNodes = []; + var connectedBy = {}; + var id2depth = {}; + var V = {}; + var j = 0; + var found; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges = _this$byGroup.edges; + for (var i2 = 0; i2 < v.length; i2++) { + var vi = v[i2]; + var viId = vi.id(); + if (vi.isNode()) { + Q.unshift(vi); + if (params.bfs) { + V[viId] = true; + connectedNodes.push(vi); + } + id2depth[viId] = 0; + } + } + var _loop = function _loop2() { + var v2 = params.bfs ? Q.shift() : Q.pop(); + var vId = v2.id(); + if (params.dfs) { + if (V[vId]) { + return "continue"; + } + V[vId] = true; + connectedNodes.push(v2); + } + var depth = id2depth[vId]; + var prevEdge = connectedBy[vId]; + var src = prevEdge != null ? prevEdge.source() : null; + var tgt = prevEdge != null ? prevEdge.target() : null; + var prevNode = prevEdge == null ? void 0 : v2.same(src) ? tgt[0] : src[0]; + var ret = void 0; + ret = fn2(v2, prevEdge, prevNode, j++, depth); + if (ret === true) { + found = v2; + return "break"; + } + if (ret === false) { + return "break"; + } + var vwEdges = v2.connectedEdges().filter(function(e2) { + return (!directed || e2.source().same(v2)) && edges.has(e2); + }); + for (var _i2 = 0; _i2 < vwEdges.length; _i2++) { + var e = vwEdges[_i2]; + var w = e.connectedNodes().filter(function(n) { + return !n.same(v2) && nodes2.has(n); + }); + var wId = w.id(); + if (w.length !== 0 && !V[wId]) { + w = w[0]; + Q.push(w); + if (params.bfs) { + V[wId] = true; + connectedNodes.push(w); + } + connectedBy[wId] = e; + id2depth[wId] = id2depth[vId] + 1; + } + } + }; + while (Q.length !== 0) { + var _ret = _loop(); + if (_ret === "continue") + continue; + if (_ret === "break") + break; + } + var connectedEles = cy.collection(); + for (var _i = 0; _i < connectedNodes.length; _i++) { + var node = connectedNodes[_i]; + var edge = connectedBy[node.id()]; + if (edge != null) { + connectedEles.push(edge); + } + connectedEles.push(node); + } + return { + path: cy.collection(connectedEles), + found: cy.collection(found) + }; + }; + }; + var elesfn$v = { + breadthFirstSearch: defineSearch({ + bfs: true + }), + depthFirstSearch: defineSearch({ + dfs: true + }) + }; + elesfn$v.bfs = elesfn$v.breadthFirstSearch; + elesfn$v.dfs = elesfn$v.depthFirstSearch; + var heap$1 = createCommonjsModule(function(module2, exports2) { + (function() { + var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min2, nlargest, nsmallest, updateItem, _siftdown, _siftup; + floor = Math.floor, min2 = Math.min; + defaultCmp = function(x, y) { + if (x < y) { + return -1; + } + if (x > y) { + return 1; + } + return 0; + }; + insort = function(a, x, lo, hi, cmp) { + var mid; + if (lo == null) { + lo = 0; + } + if (cmp == null) { + cmp = defaultCmp; + } + if (lo < 0) { + throw new Error("lo must be non-negative"); + } + if (hi == null) { + hi = a.length; + } + while (lo < hi) { + mid = floor((lo + hi) / 2); + if (cmp(x, a[mid]) < 0) { + hi = mid; + } else { + lo = mid + 1; + } + } + return [].splice.apply(a, [lo, lo - lo].concat(x)), x; + }; + heappush = function(array2, item, cmp) { + if (cmp == null) { + cmp = defaultCmp; + } + array2.push(item); + return _siftdown(array2, 0, array2.length - 1, cmp); + }; + heappop = function(array2, cmp) { + var lastelt, returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + lastelt = array2.pop(); + if (array2.length) { + returnitem = array2[0]; + array2[0] = lastelt; + _siftup(array2, 0, cmp); + } else { + returnitem = lastelt; + } + return returnitem; + }; + heapreplace = function(array2, item, cmp) { + var returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + returnitem = array2[0]; + array2[0] = item; + _siftup(array2, 0, cmp); + return returnitem; + }; + heappushpop = function(array2, item, cmp) { + var _ref; + if (cmp == null) { + cmp = defaultCmp; + } + if (array2.length && cmp(array2[0], item) < 0) { + _ref = [array2[0], item], item = _ref[0], array2[0] = _ref[1]; + _siftup(array2, 0, cmp); + } + return item; + }; + heapify = function(array2, cmp) { + var i2, _i, _len, _ref1, _results, _results1; + if (cmp == null) { + cmp = defaultCmp; + } + _ref1 = function() { + _results1 = []; + for (var _j = 0, _ref = floor(array2.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--) { + _results1.push(_j); + } + return _results1; + }.apply(this).reverse(); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + i2 = _ref1[_i]; + _results.push(_siftup(array2, i2, cmp)); + } + return _results; + }; + updateItem = function(array2, item, cmp) { + var pos; + if (cmp == null) { + cmp = defaultCmp; + } + pos = array2.indexOf(item); + if (pos === -1) { + return; + } + _siftdown(array2, 0, pos, cmp); + return _siftup(array2, pos, cmp); + }; + nlargest = function(array2, n, cmp) { + var elem, result, _i, _len, _ref; + if (cmp == null) { + cmp = defaultCmp; + } + result = array2.slice(0, n); + if (!result.length) { + return result; + } + heapify(result, cmp); + _ref = array2.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + heappushpop(result, elem, cmp); + } + return result.sort(cmp).reverse(); + }; + nsmallest = function(array2, n, cmp) { + var elem, los, result, _i, _j, _len, _ref, _ref1, _results; + if (cmp == null) { + cmp = defaultCmp; + } + if (n * 10 <= array2.length) { + result = array2.slice(0, n).sort(cmp); + if (!result.length) { + return result; + } + los = result[result.length - 1]; + _ref = array2.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + if (cmp(elem, los) < 0) { + insort(result, elem, 0, null, cmp); + result.pop(); + los = result[result.length - 1]; + } + } + return result; + } + heapify(array2, cmp); + _results = []; + for (_j = 0, _ref1 = min2(n, array2.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; 0 <= _ref1 ? ++_j : --_j) { + _results.push(heappop(array2, cmp)); + } + return _results; + }; + _siftdown = function(array2, startpos, pos, cmp) { + var newitem, parent, parentpos; + if (cmp == null) { + cmp = defaultCmp; + } + newitem = array2[pos]; + while (pos > startpos) { + parentpos = pos - 1 >> 1; + parent = array2[parentpos]; + if (cmp(newitem, parent) < 0) { + array2[pos] = parent; + pos = parentpos; + continue; + } + break; + } + return array2[pos] = newitem; + }; + _siftup = function(array2, pos, cmp) { + var childpos, endpos, newitem, rightpos, startpos; + if (cmp == null) { + cmp = defaultCmp; + } + endpos = array2.length; + startpos = pos; + newitem = array2[pos]; + childpos = 2 * pos + 1; + while (childpos < endpos) { + rightpos = childpos + 1; + if (rightpos < endpos && !(cmp(array2[childpos], array2[rightpos]) < 0)) { + childpos = rightpos; + } + array2[pos] = array2[childpos]; + pos = childpos; + childpos = 2 * pos + 1; + } + array2[pos] = newitem; + return _siftdown(array2, startpos, pos, cmp); + }; + Heap = function() { + Heap2.push = heappush; + Heap2.pop = heappop; + Heap2.replace = heapreplace; + Heap2.pushpop = heappushpop; + Heap2.heapify = heapify; + Heap2.updateItem = updateItem; + Heap2.nlargest = nlargest; + Heap2.nsmallest = nsmallest; + function Heap2(cmp) { + this.cmp = cmp != null ? cmp : defaultCmp; + this.nodes = []; + } + Heap2.prototype.push = function(x) { + return heappush(this.nodes, x, this.cmp); + }; + Heap2.prototype.pop = function() { + return heappop(this.nodes, this.cmp); + }; + Heap2.prototype.peek = function() { + return this.nodes[0]; + }; + Heap2.prototype.contains = function(x) { + return this.nodes.indexOf(x) !== -1; + }; + Heap2.prototype.replace = function(x) { + return heapreplace(this.nodes, x, this.cmp); + }; + Heap2.prototype.pushpop = function(x) { + return heappushpop(this.nodes, x, this.cmp); + }; + Heap2.prototype.heapify = function() { + return heapify(this.nodes, this.cmp); + }; + Heap2.prototype.updateItem = function(x) { + return updateItem(this.nodes, x, this.cmp); + }; + Heap2.prototype.clear = function() { + return this.nodes = []; + }; + Heap2.prototype.empty = function() { + return this.nodes.length === 0; + }; + Heap2.prototype.size = function() { + return this.nodes.length; + }; + Heap2.prototype.clone = function() { + var heap2; + heap2 = new Heap2(); + heap2.nodes = this.nodes.slice(0); + return heap2; + }; + Heap2.prototype.toArray = function() { + return this.nodes.slice(0); + }; + Heap2.prototype.insert = Heap2.prototype.push; + Heap2.prototype.top = Heap2.prototype.peek; + Heap2.prototype.front = Heap2.prototype.peek; + Heap2.prototype.has = Heap2.prototype.contains; + Heap2.prototype.copy = Heap2.prototype.clone; + return Heap2; + }(); + (function(root2, factory) { + { + return module2.exports = factory(); + } + })(this, function() { + return Heap; + }); + }).call(commonjsGlobal$1); + }); + var heap = heap$1; + var dijkstraDefaults = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$u = { + dijkstra: function dijkstra(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + weight: args[1], + directed: args[2] + }; + } + var _dijkstraDefaults = dijkstraDefaults(options), root2 = _dijkstraDefaults.root, weight = _dijkstraDefaults.weight, directed = _dijkstraDefaults.directed; + var eles = this; + var weightFn = weight; + var source = string(root2) ? this.filter(root2)[0] : root2[0]; + var dist2 = {}; + var prev = {}; + var knownDist = {}; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges = _this$byGroup.edges; + edges.unmergeBy(function(ele) { + return ele.isLoop(); + }); + var getDist2 = function getDist3(node2) { + return dist2[node2.id()]; + }; + var setDist = function setDist2(node2, d) { + dist2[node2.id()] = d; + Q.updateItem(node2); + }; + var Q = new heap(function(a, b) { + return getDist2(a) - getDist2(b); + }); + for (var i2 = 0; i2 < nodes2.length; i2++) { + var node = nodes2[i2]; + dist2[node.id()] = node.same(source) ? 0 : Infinity; + Q.push(node); + } + var distBetween = function distBetween2(u2, v2) { + var uvs = (directed ? u2.edgesTo(v2) : u2.edgesWith(v2)).intersect(edges); + var smallestDistance = Infinity; + var smallestEdge; + for (var _i = 0; _i < uvs.length; _i++) { + var edge = uvs[_i]; + var _weight = weightFn(edge); + if (_weight < smallestDistance || !smallestEdge) { + smallestDistance = _weight; + smallestEdge = edge; + } + } + return { + edge: smallestEdge, + dist: smallestDistance + }; + }; + while (Q.size() > 0) { + var u = Q.pop(); + var smalletsDist = getDist2(u); + var uid = u.id(); + knownDist[uid] = smalletsDist; + if (smalletsDist === Infinity) { + continue; + } + var neighbors = u.neighborhood().intersect(nodes2); + for (var _i2 = 0; _i2 < neighbors.length; _i2++) { + var v = neighbors[_i2]; + var vid = v.id(); + var vDist = distBetween(u, v); + var alt = smalletsDist + vDist.dist; + if (alt < getDist2(v)) { + setDist(v, alt); + prev[vid] = { + node: u, + edge: vDist.edge + }; + } + } + } + return { + distanceTo: function distanceTo(node2) { + var target = string(node2) ? nodes2.filter(node2)[0] : node2[0]; + return knownDist[target.id()]; + }, + pathTo: function pathTo(node2) { + var target = string(node2) ? nodes2.filter(node2)[0] : node2[0]; + var S = []; + var u2 = target; + var uid2 = u2.id(); + if (target.length > 0) { + S.unshift(target); + while (prev[uid2]) { + var p2 = prev[uid2]; + S.unshift(p2.edge); + S.unshift(p2.node); + u2 = p2.node; + uid2 = u2.id(); + } + } + return eles.spawn(S); + } + }; + } + }; + var elesfn$t = { + // kruskal's algorithm (finds min spanning tree, assuming undirected graph) + // implemented from pseudocode from wikipedia + kruskal: function kruskal(weightFn) { + weightFn = weightFn || function(edge2) { + return 1; + }; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges = _this$byGroup.edges; + var numNodes = nodes2.length; + var forest = new Array(numNodes); + var A = nodes2; + var findSetIndex = function findSetIndex2(ele) { + for (var i3 = 0; i3 < forest.length; i3++) { + var eles = forest[i3]; + if (eles.has(ele)) { + return i3; + } + } + }; + for (var i2 = 0; i2 < numNodes; i2++) { + forest[i2] = this.spawn(nodes2[i2]); + } + var S = edges.sort(function(a, b) { + return weightFn(a) - weightFn(b); + }); + for (var _i = 0; _i < S.length; _i++) { + var edge = S[_i]; + var u = edge.source()[0]; + var v = edge.target()[0]; + var setUIndex = findSetIndex(u); + var setVIndex = findSetIndex(v); + var setU = forest[setUIndex]; + var setV = forest[setVIndex]; + if (setUIndex !== setVIndex) { + A.merge(edge); + setU.merge(setV); + forest.splice(setVIndex, 1); + } + } + return A; + } + }; + var aStarDefaults = defaults$g({ + root: null, + goal: null, + weight: function weight(edge) { + return 1; + }, + heuristic: function heuristic(edge) { + return 0; + }, + directed: false + }); + var elesfn$s = { + // Implemented from pseudocode from wikipedia + aStar: function aStar(options) { + var cy = this.cy(); + var _aStarDefaults = aStarDefaults(options), root2 = _aStarDefaults.root, goal = _aStarDefaults.goal, heuristic = _aStarDefaults.heuristic, directed = _aStarDefaults.directed, weight = _aStarDefaults.weight; + root2 = cy.collection(root2)[0]; + goal = cy.collection(goal)[0]; + var sid = root2.id(); + var tid = goal.id(); + var gScore = {}; + var fScore = {}; + var closedSetIds = {}; + var openSet = new heap(function(a, b) { + return fScore[a.id()] - fScore[b.id()]; + }); + var openSetIds = new Set$1(); + var cameFrom = {}; + var cameFromEdge = {}; + var addToOpenSet = function addToOpenSet2(ele, id) { + openSet.push(ele); + openSetIds.add(id); + }; + var cMin, cMinId; + var popFromOpenSet = function popFromOpenSet2() { + cMin = openSet.pop(); + cMinId = cMin.id(); + openSetIds["delete"](cMinId); + }; + var isInOpenSet = function isInOpenSet2(id) { + return openSetIds.has(id); + }; + addToOpenSet(root2, sid); + gScore[sid] = 0; + fScore[sid] = heuristic(root2); + var steps = 0; + while (openSet.size() > 0) { + popFromOpenSet(); + steps++; + if (cMinId === tid) { + var path = []; + var pathNode = goal; + var pathNodeId = tid; + var pathEdge = cameFromEdge[pathNodeId]; + for (; ; ) { + path.unshift(pathNode); + if (pathEdge != null) { + path.unshift(pathEdge); + } + pathNode = cameFrom[pathNodeId]; + if (pathNode == null) { + break; + } + pathNodeId = pathNode.id(); + pathEdge = cameFromEdge[pathNodeId]; + } + return { + found: true, + distance: gScore[cMinId], + path: this.spawn(path), + steps + }; + } + closedSetIds[cMinId] = true; + var vwEdges = cMin._private.edges; + for (var i2 = 0; i2 < vwEdges.length; i2++) { + var e = vwEdges[i2]; + if (!this.hasElementWithId(e.id())) { + continue; + } + if (directed && e.data("source") !== cMinId) { + continue; + } + var wSrc = e.source(); + var wTgt = e.target(); + var w = wSrc.id() !== cMinId ? wSrc : wTgt; + var wid = w.id(); + if (!this.hasElementWithId(wid)) { + continue; + } + if (closedSetIds[wid]) { + continue; + } + var tempScore = gScore[cMinId] + weight(e); + if (!isInOpenSet(wid)) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + addToOpenSet(w, wid); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + continue; + } + if (tempScore < gScore[wid]) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + } + } + } + return { + found: false, + distance: void 0, + path: void 0, + steps + }; + } + }; + var floydWarshallDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$r = { + // Implemented from pseudocode from wikipedia + floydWarshall: function floydWarshall(options) { + var cy = this.cy(); + var _floydWarshallDefault = floydWarshallDefaults(options), weight = _floydWarshallDefault.weight, directed = _floydWarshallDefault.directed; + var weightFn = weight; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges = _this$byGroup.edges; + var N = nodes2.length; + var Nsq = N * N; + var indexOf = function indexOf2(node) { + return nodes2.indexOf(node); + }; + var atIndex = function atIndex2(i3) { + return nodes2[i3]; + }; + var dist2 = new Array(Nsq); + for (var n = 0; n < Nsq; n++) { + var j = n % N; + var i2 = (n - j) / N; + if (i2 === j) { + dist2[n] = 0; + } else { + dist2[n] = Infinity; + } + } + var next2 = new Array(Nsq); + var edgeNext = new Array(Nsq); + for (var _i = 0; _i < edges.length; _i++) { + var edge = edges[_i]; + var src = edge.source()[0]; + var tgt = edge.target()[0]; + if (src === tgt) { + continue; + } + var s = indexOf(src); + var t = indexOf(tgt); + var st = s * N + t; + var _weight = weightFn(edge); + if (dist2[st] > _weight) { + dist2[st] = _weight; + next2[st] = t; + edgeNext[st] = edge; + } + if (!directed) { + var ts = t * N + s; + if (!directed && dist2[ts] > _weight) { + dist2[ts] = _weight; + next2[ts] = s; + edgeNext[ts] = edge; + } + } + } + for (var k = 0; k < N; k++) { + for (var _i2 = 0; _i2 < N; _i2++) { + var ik = _i2 * N + k; + for (var _j = 0; _j < N; _j++) { + var ij = _i2 * N + _j; + var kj = k * N + _j; + if (dist2[ik] + dist2[kj] < dist2[ij]) { + dist2[ij] = dist2[ik] + dist2[kj]; + next2[ij] = next2[ik]; + } + } + } + } + var getArgEle = function getArgEle2(ele) { + return (string(ele) ? cy.filter(ele) : ele)[0]; + }; + var indexOfArgEle = function indexOfArgEle2(ele) { + return indexOf(getArgEle(ele)); + }; + var res = { + distance: function distance(from, to) { + var i3 = indexOfArgEle(from); + var j2 = indexOfArgEle(to); + return dist2[i3 * N + j2]; + }, + path: function path(from, to) { + var i3 = indexOfArgEle(from); + var j2 = indexOfArgEle(to); + var fromNode = atIndex(i3); + if (i3 === j2) { + return fromNode.collection(); + } + if (next2[i3 * N + j2] == null) { + return cy.collection(); + } + var path2 = cy.collection(); + var prev = i3; + var edge2; + path2.merge(fromNode); + while (i3 !== j2) { + prev = i3; + i3 = next2[i3 * N + j2]; + edge2 = edgeNext[prev * N + i3]; + path2.merge(edge2); + path2.merge(atIndex(i3)); + } + return path2; + } + }; + return res; + } + // floydWarshall + }; + var bellmanFordDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false, + root: null + }); + var elesfn$q = { + // Implemented from pseudocode from wikipedia + bellmanFord: function bellmanFord(options) { + var _this = this; + var _bellmanFordDefaults = bellmanFordDefaults(options), weight = _bellmanFordDefaults.weight, directed = _bellmanFordDefaults.directed, root2 = _bellmanFordDefaults.root; + var weightFn = weight; + var eles = this; + var cy = this.cy(); + var _this$byGroup = this.byGroup(), edges = _this$byGroup.edges, nodes2 = _this$byGroup.nodes; + var numNodes = nodes2.length; + var infoMap = new Map$2(); + var hasNegativeWeightCycle = false; + var negativeWeightCycles = []; + root2 = cy.collection(root2)[0]; + edges.unmergeBy(function(edge2) { + return edge2.isLoop(); + }); + var numEdges = edges.length; + var getInfo2 = function getInfo3(node2) { + var obj = infoMap.get(node2.id()); + if (!obj) { + obj = {}; + infoMap.set(node2.id(), obj); + } + return obj; + }; + var getNodeFromTo = function getNodeFromTo2(to) { + return (string(to) ? cy.$(to) : to)[0]; + }; + var distanceTo = function distanceTo2(to) { + return getInfo2(getNodeFromTo(to)).dist; + }; + var pathTo = function pathTo2(to) { + var thisStart = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : root2; + var end = getNodeFromTo(to); + var path = []; + var node2 = end; + for (; ; ) { + if (node2 == null) { + return _this.spawn(); + } + var _getInfo = getInfo2(node2), edge2 = _getInfo.edge, pred = _getInfo.pred; + path.unshift(node2[0]); + if (node2.same(thisStart) && path.length > 0) { + break; + } + if (edge2 != null) { + path.unshift(edge2); + } + node2 = pred; + } + return eles.spawn(path); + }; + for (var i2 = 0; i2 < numNodes; i2++) { + var node = nodes2[i2]; + var info = getInfo2(node); + if (node.same(root2)) { + info.dist = 0; + } else { + info.dist = Infinity; + } + info.pred = null; + info.edge = null; + } + var replacedEdge = false; + var checkForEdgeReplacement = function checkForEdgeReplacement2(node1, node2, edge2, info1, info2, weight2) { + var dist2 = info1.dist + weight2; + if (dist2 < info2.dist && !edge2.same(info1.edge)) { + info2.dist = dist2; + info2.pred = node1; + info2.edge = edge2; + replacedEdge = true; + } + }; + for (var _i = 1; _i < numNodes; _i++) { + replacedEdge = false; + for (var e = 0; e < numEdges; e++) { + var edge = edges[e]; + var src = edge.source(); + var tgt = edge.target(); + var _weight = weightFn(edge); + var srcInfo = getInfo2(src); + var tgtInfo = getInfo2(tgt); + checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight); + if (!directed) { + checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight); + } + } + if (!replacedEdge) { + break; + } + } + if (replacedEdge) { + var negativeWeightCycleIds = []; + for (var _e = 0; _e < numEdges; _e++) { + var _edge = edges[_e]; + var _src = _edge.source(); + var _tgt = _edge.target(); + var _weight2 = weightFn(_edge); + var srcDist = getInfo2(_src).dist; + var tgtDist = getInfo2(_tgt).dist; + if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) { + if (!hasNegativeWeightCycle) { + warn("Graph contains a negative weight cycle for Bellman-Ford"); + hasNegativeWeightCycle = true; + } + if (options.findNegativeWeightCycles !== false) { + var negativeNodes = []; + if (srcDist + _weight2 < tgtDist) { + negativeNodes.push(_src); + } + if (!directed && tgtDist + _weight2 < srcDist) { + negativeNodes.push(_tgt); + } + var numNegativeNodes = negativeNodes.length; + for (var n = 0; n < numNegativeNodes; n++) { + var start = negativeNodes[n]; + var cycle = [start]; + cycle.push(getInfo2(start).edge); + var _node = getInfo2(start).pred; + while (cycle.indexOf(_node) === -1) { + cycle.push(_node); + cycle.push(getInfo2(_node).edge); + _node = getInfo2(_node).pred; + } + cycle = cycle.slice(cycle.indexOf(_node)); + var smallestId = cycle[0].id(); + var smallestIndex = 0; + for (var c = 2; c < cycle.length; c += 2) { + if (cycle[c].id() < smallestId) { + smallestId = cycle[c].id(); + smallestIndex = c; + } + } + cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex)); + cycle.push(cycle[0]); + var cycleId = cycle.map(function(el) { + return el.id(); + }).join(","); + if (negativeWeightCycleIds.indexOf(cycleId) === -1) { + negativeWeightCycles.push(eles.spawn(cycle)); + negativeWeightCycleIds.push(cycleId); + } + } + } else { + break; + } + } + } + } + return { + distanceTo, + pathTo, + hasNegativeWeightCycle, + negativeWeightCycles + }; + } + // bellmanFord + }; + var sqrt2 = Math.sqrt(2); + var collapse = function collapse2(edgeIndex, nodeMap, remainingEdges) { + if (remainingEdges.length === 0) { + error("Karger-Stein must be run on a connected (sub)graph"); + } + var edgeInfo = remainingEdges[edgeIndex]; + var sourceIn = edgeInfo[1]; + var targetIn = edgeInfo[2]; + var partition1 = nodeMap[sourceIn]; + var partition2 = nodeMap[targetIn]; + var newEdges = remainingEdges; + for (var i2 = newEdges.length - 1; i2 >= 0; i2--) { + var edge = newEdges[i2]; + var src = edge[1]; + var tgt = edge[2]; + if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) { + newEdges.splice(i2, 1); + } + } + for (var _i = 0; _i < newEdges.length; _i++) { + var _edge = newEdges[_i]; + if (_edge[1] === partition2) { + newEdges[_i] = _edge.slice(); + newEdges[_i][1] = partition1; + } else if (_edge[2] === partition2) { + newEdges[_i] = _edge.slice(); + newEdges[_i][2] = partition1; + } + } + for (var _i2 = 0; _i2 < nodeMap.length; _i2++) { + if (nodeMap[_i2] === partition2) { + nodeMap[_i2] = partition1; + } + } + return newEdges; + }; + var contractUntil = function contractUntil2(metaNodeMap, remainingEdges, size, sizeLimit) { + while (size > sizeLimit) { + var edgeIndex = Math.floor(Math.random() * remainingEdges.length); + remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges); + size--; + } + return remainingEdges; + }; + var elesfn$p = { + // Computes the minimum cut of an undirected graph + // Returns the correct answer with high probability + kargerStein: function kargerStein() { + var _this = this; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges = _this$byGroup.edges; + edges.unmergeBy(function(edge) { + return edge.isLoop(); + }); + var numNodes = nodes2.length; + var numEdges = edges.length; + var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2)); + var stopSize = Math.floor(numNodes / sqrt2); + if (numNodes < 2) { + error("At least 2 nodes are required for Karger-Stein algorithm"); + return void 0; + } + var edgeIndexes = []; + for (var i2 = 0; i2 < numEdges; i2++) { + var e = edges[i2]; + edgeIndexes.push([i2, nodes2.indexOf(e.source()), nodes2.indexOf(e.target())]); + } + var minCutSize = Infinity; + var minCutEdgeIndexes = []; + var minCutNodeMap = new Array(numNodes); + var metaNodeMap = new Array(numNodes); + var metaNodeMap2 = new Array(numNodes); + var copyNodesMap = function copyNodesMap2(from, to) { + for (var _i3 = 0; _i3 < numNodes; _i3++) { + to[_i3] = from[_i3]; + } + }; + for (var iter = 0; iter <= numIter; iter++) { + for (var _i4 = 0; _i4 < numNodes; _i4++) { + metaNodeMap[_i4] = _i4; + } + var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize); + var edgesState2 = edgesState.slice(); + copyNodesMap(metaNodeMap, metaNodeMap2); + var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2); + var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2); + if (res1.length <= res2.length && res1.length < minCutSize) { + minCutSize = res1.length; + minCutEdgeIndexes = res1; + copyNodesMap(metaNodeMap, minCutNodeMap); + } else if (res2.length <= res1.length && res2.length < minCutSize) { + minCutSize = res2.length; + minCutEdgeIndexes = res2; + copyNodesMap(metaNodeMap2, minCutNodeMap); + } + } + var cut = this.spawn(minCutEdgeIndexes.map(function(e2) { + return edges[e2[0]]; + })); + var partition1 = this.spawn(); + var partition2 = this.spawn(); + var witnessNodePartition = minCutNodeMap[0]; + for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) { + var partitionId = minCutNodeMap[_i5]; + var node = nodes2[_i5]; + if (partitionId === witnessNodePartition) { + partition1.merge(node); + } else { + partition2.merge(node); + } + } + var constructComponent = function constructComponent2(subset) { + var component = _this.spawn(); + subset.forEach(function(node2) { + component.merge(node2); + node2.connectedEdges().forEach(function(edge) { + if (_this.contains(edge) && !cut.contains(edge)) { + component.merge(edge); + } + }); + }); + return component; + }; + var components = [constructComponent(partition1), constructComponent(partition2)]; + var ret = { + cut, + components, + // n.b. partitions are included to be compatible with the old api spec + // (could be removed in a future major version) + partition1, + partition2 + }; + return ret; + } + }; + var copyPosition = function copyPosition2(p2) { + return { + x: p2.x, + y: p2.y + }; + }; + var modelToRenderedPosition = function modelToRenderedPosition2(p2, zoom, pan) { + return { + x: p2.x * zoom + pan.x, + y: p2.y * zoom + pan.y + }; + }; + var renderedToModelPosition = function renderedToModelPosition2(p2, zoom, pan) { + return { + x: (p2.x - pan.x) / zoom, + y: (p2.y - pan.y) / zoom + }; + }; + var array2point = function array2point2(arr) { + return { + x: arr[0], + y: arr[1] + }; + }; + var min = function min2(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var min3 = Infinity; + for (var i2 = begin; i2 < end; i2++) { + var val = arr[i2]; + if (isFinite(val)) { + min3 = Math.min(val, min3); + } + } + return min3; + }; + var max = function max2(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var max3 = -Infinity; + for (var i2 = begin; i2 < end; i2++) { + var val = arr[i2]; + if (isFinite(val)) { + max3 = Math.max(val, max3); + } + } + return max3; + }; + var mean = function mean2(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var total = 0; + var n = 0; + for (var i2 = begin; i2 < end; i2++) { + var val = arr[i2]; + if (isFinite(val)) { + total += val; + n++; + } + } + return total / n; + }; + var median = function median2(arr) { + var begin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : arr.length; + var copy2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var sort = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var includeHoles = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + if (copy2) { + arr = arr.slice(begin, end); + } else { + if (end < arr.length) { + arr.splice(end, arr.length - end); + } + if (begin > 0) { + arr.splice(0, begin); + } + } + var off = 0; + for (var i2 = arr.length - 1; i2 >= 0; i2--) { + var v = arr[i2]; + if (includeHoles) { + if (!isFinite(v)) { + arr[i2] = -Infinity; + off++; + } + } else { + arr.splice(i2, 1); + } + } + if (sort) { + arr.sort(function(a, b) { + return a - b; + }); + } + var len = arr.length; + var mid = Math.floor(len / 2); + if (len % 2 !== 0) { + return arr[mid + 1 + off]; + } else { + return (arr[mid - 1 + off] + arr[mid + off]) / 2; + } + }; + var deg2rad = function deg2rad2(deg) { + return Math.PI * deg / 180; + }; + var getAngleFromDisp = function getAngleFromDisp2(dispX, dispY) { + return Math.atan2(dispY, dispX) - Math.PI / 2; + }; + var log2 = Math.log2 || function(n) { + return Math.log(n) / Math.log(2); + }; + var signum = function signum2(x) { + if (x > 0) { + return 1; + } else if (x < 0) { + return -1; + } else { + return 0; + } + }; + var dist = function dist2(p1, p2) { + return Math.sqrt(sqdist(p1, p2)); + }; + var sqdist = function sqdist2(p1, p2) { + var dx = p2.x - p1.x; + var dy = p2.y - p1.y; + return dx * dx + dy * dy; + }; + var inPlaceSumNormalize = function inPlaceSumNormalize2(v) { + var length = v.length; + var total = 0; + for (var i2 = 0; i2 < length; i2++) { + total += v[i2]; + } + for (var _i = 0; _i < length; _i++) { + v[_i] = v[_i] / total; + } + return v; + }; + var qbezierAt = function qbezierAt2(p0, p1, p2, t) { + return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2; + }; + var qbezierPtAt = function qbezierPtAt2(p0, p1, p2, t) { + return { + x: qbezierAt(p0.x, p1.x, p2.x, t), + y: qbezierAt(p0.y, p1.y, p2.y, t) + }; + }; + var lineAt = function lineAt2(p0, p1, t, d) { + var vec = { + x: p1.x - p0.x, + y: p1.y - p0.y + }; + var vecDist = dist(p0, p1); + var normVec = { + x: vec.x / vecDist, + y: vec.y / vecDist + }; + t = t == null ? 0 : t; + d = d != null ? d : t * vecDist; + return { + x: p0.x + normVec.x * d, + y: p0.y + normVec.y * d + }; + }; + var bound = function bound2(min2, val, max2) { + return Math.max(min2, Math.min(max2, val)); + }; + var makeBoundingBox = function makeBoundingBox2(bb) { + if (bb == null) { + return { + x1: Infinity, + y1: Infinity, + x2: -Infinity, + y2: -Infinity, + w: 0, + h: 0 + }; + } else if (bb.x1 != null && bb.y1 != null) { + if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x2, + y2: bb.y2, + w: bb.x2 - bb.x1, + h: bb.y2 - bb.y1 + }; + } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x1 + bb.w, + y2: bb.y1 + bb.h, + w: bb.w, + h: bb.h + }; + } + } + }; + var copyBoundingBox = function copyBoundingBox2(bb) { + return { + x1: bb.x1, + x2: bb.x2, + w: bb.w, + y1: bb.y1, + y2: bb.y2, + h: bb.h + }; + }; + var clearBoundingBox = function clearBoundingBox2(bb) { + bb.x1 = Infinity; + bb.y1 = Infinity; + bb.x2 = -Infinity; + bb.y2 = -Infinity; + bb.w = 0; + bb.h = 0; + }; + var updateBoundingBox = function updateBoundingBox2(bb1, bb2) { + bb1.x1 = Math.min(bb1.x1, bb2.x1); + bb1.x2 = Math.max(bb1.x2, bb2.x2); + bb1.w = bb1.x2 - bb1.x1; + bb1.y1 = Math.min(bb1.y1, bb2.y1); + bb1.y2 = Math.max(bb1.y2, bb2.y2); + bb1.h = bb1.y2 - bb1.y1; + }; + var expandBoundingBoxByPoint = function expandBoundingBoxByPoint2(bb, x, y) { + bb.x1 = Math.min(bb.x1, x); + bb.x2 = Math.max(bb.x2, x); + bb.w = bb.x2 - bb.x1; + bb.y1 = Math.min(bb.y1, y); + bb.y2 = Math.max(bb.y2, y); + bb.h = bb.y2 - bb.y1; + }; + var expandBoundingBox = function expandBoundingBox2(bb) { + var padding = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; + bb.x1 -= padding; + bb.x2 += padding; + bb.y1 -= padding; + bb.y2 += padding; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + var expandBoundingBoxSides = function expandBoundingBoxSides2(bb) { + var padding = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [0]; + var top, right, bottom, left; + if (padding.length === 1) { + top = right = bottom = left = padding[0]; + } else if (padding.length === 2) { + top = bottom = padding[0]; + left = right = padding[1]; + } else if (padding.length === 4) { + var _padding = _slicedToArray(padding, 4); + top = _padding[0]; + right = _padding[1]; + bottom = _padding[2]; + left = _padding[3]; + } + bb.x1 -= left; + bb.x2 += right; + bb.y1 -= top; + bb.y2 += bottom; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + var assignBoundingBox = function assignBoundingBox2(bb1, bb2) { + bb1.x1 = bb2.x1; + bb1.y1 = bb2.y1; + bb1.x2 = bb2.x2; + bb1.y2 = bb2.y2; + bb1.w = bb1.x2 - bb1.x1; + bb1.h = bb1.y2 - bb1.y1; + }; + var boundingBoxesIntersect = function boundingBoxesIntersect2(bb1, bb2) { + if (bb1.x1 > bb2.x2) { + return false; + } + if (bb2.x1 > bb1.x2) { + return false; + } + if (bb1.x2 < bb2.x1) { + return false; + } + if (bb2.x2 < bb1.x1) { + return false; + } + if (bb1.y2 < bb2.y1) { + return false; + } + if (bb2.y2 < bb1.y1) { + return false; + } + if (bb1.y1 > bb2.y2) { + return false; + } + if (bb2.y1 > bb1.y2) { + return false; + } + return true; + }; + var inBoundingBox = function inBoundingBox2(bb, x, y) { + return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2; + }; + var pointInBoundingBox = function pointInBoundingBox2(bb, pt) { + return inBoundingBox(bb, pt.x, pt.y); + }; + var boundingBoxInBoundingBox = function boundingBoxInBoundingBox2(bb1, bb2) { + return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2); + }; + var roundRectangleIntersectLine = function roundRectangleIntersectLine2(x, y, nodeX, nodeY, width, height, padding) { + var cornerRadius = getRoundRectangleRadius(width, height); + var halfWidth = width / 2; + var halfHeight = height / 2; + var straightLineIntersections; + { + var topStartX = nodeX - halfWidth + cornerRadius - padding; + var topStartY = nodeY - halfHeight - padding; + var topEndX = nodeX + halfWidth - cornerRadius + padding; + var topEndY = topStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + { + var rightStartX = nodeX + halfWidth + padding; + var rightStartY = nodeY - halfHeight + cornerRadius - padding; + var rightEndX = rightStartX; + var rightEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + { + var bottomStartX = nodeX - halfWidth + cornerRadius - padding; + var bottomStartY = nodeY + halfHeight + padding; + var bottomEndX = nodeX + halfWidth - cornerRadius + padding; + var bottomEndY = bottomStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + { + var leftStartX = nodeX - halfWidth - padding; + var leftStartY = nodeY - halfHeight + cornerRadius - padding; + var leftEndX = leftStartX; + var leftEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + var arcIntersections; + { + var topLeftCenterX = nodeX - halfWidth + cornerRadius; + var topLeftCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding); + if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + { + var topRightCenterX = nodeX + halfWidth - cornerRadius; + var topRightCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding); + if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + { + var bottomRightCenterX = nodeX + halfWidth - cornerRadius; + var bottomRightCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding); + if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + { + var bottomLeftCenterX = nodeX - halfWidth + cornerRadius; + var bottomLeftCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding); + if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + return []; + }; + var inLineVicinity = function inLineVicinity2(x, y, lx1, ly1, lx2, ly2, tolerance) { + var t = tolerance; + var x1 = Math.min(lx1, lx2); + var x2 = Math.max(lx1, lx2); + var y1 = Math.min(ly1, ly2); + var y2 = Math.max(ly1, ly2); + return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t; + }; + var inBezierVicinity = function inBezierVicinity2(x, y, x1, y1, x2, y2, x3, y3, tolerance) { + var bb = { + x1: Math.min(x1, x3, x2) - tolerance, + x2: Math.max(x1, x3, x2) + tolerance, + y1: Math.min(y1, y3, y2) - tolerance, + y2: Math.max(y1, y3, y2) + tolerance + }; + if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) { + return false; + } else { + return true; + } + }; + var solveQuadratic = function solveQuadratic2(a, b, c, val) { + c -= val; + var r = b * b - 4 * a * c; + if (r < 0) { + return []; + } + var sqrtR = Math.sqrt(r); + var denom = 2 * a; + var root1 = (-b + sqrtR) / denom; + var root2 = (-b - sqrtR) / denom; + return [root1, root2]; + }; + var solveCubic = function solveCubic2(a, b, c, d, result) { + var epsilon = 1e-5; + if (a === 0) { + a = epsilon; + } + b /= a; + c /= a; + d /= a; + var discriminant, q, r, dum1, s, t, term1, r13; + q = (3 * c - b * b) / 9; + r = -(27 * d) + b * (9 * c - 2 * (b * b)); + r /= 54; + discriminant = q * q * q + r * r; + result[1] = 0; + term1 = b / 3; + if (discriminant > 0) { + s = r + Math.sqrt(discriminant); + s = s < 0 ? -Math.pow(-s, 1 / 3) : Math.pow(s, 1 / 3); + t = r - Math.sqrt(discriminant); + t = t < 0 ? -Math.pow(-t, 1 / 3) : Math.pow(t, 1 / 3); + result[0] = -term1 + s + t; + term1 += (s + t) / 2; + result[4] = result[2] = -term1; + term1 = Math.sqrt(3) * (-t + s) / 2; + result[3] = term1; + result[5] = -term1; + return; + } + result[5] = result[3] = 0; + if (discriminant === 0) { + r13 = r < 0 ? -Math.pow(-r, 1 / 3) : Math.pow(r, 1 / 3); + result[0] = -term1 + 2 * r13; + result[4] = result[2] = -(r13 + term1); + return; + } + q = -q; + dum1 = q * q * q; + dum1 = Math.acos(r / Math.sqrt(dum1)); + r13 = 2 * Math.sqrt(q); + result[0] = -term1 + r13 * Math.cos(dum1 / 3); + result[2] = -term1 + r13 * Math.cos((dum1 + 2 * Math.PI) / 3); + result[4] = -term1 + r13 * Math.cos((dum1 + 4 * Math.PI) / 3); + return; + }; + var sqdistToQuadraticBezier = function sqdistToQuadraticBezier2(x, y, x1, y1, x2, y2, x3, y3) { + var a = 1 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3; + var b = 1 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3; + var c = 1 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y; + var d = 1 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y; + var roots = []; + solveCubic(a, b, c, d, roots); + var zeroThreshold = 1e-7; + var params = []; + for (var index = 0; index < 6; index += 2) { + if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1) { + params.push(roots[index]); + } + } + params.push(1); + params.push(0); + var minDistanceSquared = -1; + var curX, curY, distSquared; + for (var i2 = 0; i2 < params.length; i2++) { + curX = Math.pow(1 - params[i2], 2) * x1 + 2 * (1 - params[i2]) * params[i2] * x2 + params[i2] * params[i2] * x3; + curY = Math.pow(1 - params[i2], 2) * y1 + 2 * (1 - params[i2]) * params[i2] * y2 + params[i2] * params[i2] * y3; + distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2); + if (minDistanceSquared >= 0) { + if (distSquared < minDistanceSquared) { + minDistanceSquared = distSquared; + } + } else { + minDistanceSquared = distSquared; + } + } + return minDistanceSquared; + }; + var sqdistToFiniteLine = function sqdistToFiniteLine2(x, y, x1, y1, x2, y2) { + var offset = [x - x1, y - y1]; + var line = [x2 - x1, y2 - y1]; + var lineSq = line[0] * line[0] + line[1] * line[1]; + var hypSq = offset[0] * offset[0] + offset[1] * offset[1]; + var dotProduct = offset[0] * line[0] + offset[1] * line[1]; + var adjSq = dotProduct * dotProduct / lineSq; + if (dotProduct < 0) { + return hypSq; + } + if (adjSq > lineSq) { + return (x - x2) * (x - x2) + (y - y2) * (y - y2); + } + return hypSq - adjSq; + }; + var pointInsidePolygonPoints = function pointInsidePolygonPoints2(x, y, points) { + var x1, y1, x2, y2; + var y3; + var up = 0; + for (var i2 = 0; i2 < points.length / 2; i2++) { + x1 = points[i2 * 2]; + y1 = points[i2 * 2 + 1]; + if (i2 + 1 < points.length / 2) { + x2 = points[(i2 + 1) * 2]; + y2 = points[(i2 + 1) * 2 + 1]; + } else { + x2 = points[(i2 + 1 - points.length / 2) * 2]; + y2 = points[(i2 + 1 - points.length / 2) * 2 + 1]; + } + if (x1 == x && x2 == x) + ; + else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) { + y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1; + if (y3 > y) { + up++; + } + } else { + continue; + } + } + if (up % 2 === 0) { + return false; + } else { + return true; + } + }; + var pointInsidePolygon = function pointInsidePolygon2(x, y, basePoints, centerX, centerY, width, height, direction, padding) { + var transformedPoints = new Array(basePoints.length); + var angle; + if (direction[0] != null) { + angle = Math.atan(direction[1] / direction[0]); + if (direction[0] < 0) { + angle = angle + Math.PI / 2; + } else { + angle = -angle - Math.PI / 2; + } + } else { + angle = direction; + } + var cos2 = Math.cos(-angle); + var sin2 = Math.sin(-angle); + for (var i2 = 0; i2 < transformedPoints.length / 2; i2++) { + transformedPoints[i2 * 2] = width / 2 * (basePoints[i2 * 2] * cos2 - basePoints[i2 * 2 + 1] * sin2); + transformedPoints[i2 * 2 + 1] = height / 2 * (basePoints[i2 * 2 + 1] * cos2 + basePoints[i2 * 2] * sin2); + transformedPoints[i2 * 2] += centerX; + transformedPoints[i2 * 2 + 1] += centerY; + } + var points; + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + return pointInsidePolygonPoints(x, y, points); + }; + var pointInsideRoundPolygon = function pointInsideRoundPolygon2(x, y, basePoints, centerX, centerY, width, height) { + var cutPolygonPoints = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + var squaredCornerRadius = cornerRadius * cornerRadius; + for (var i2 = 0; i2 < basePoints.length / 4; i2++) { + var sourceUv = void 0, destUv = void 0; + if (i2 === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i2 * 4 - 2; + } + destUv = i2 * 4 + 2; + var px = centerX + halfW * basePoints[i2 * 4]; + var py = centerY + halfH * basePoints[i2 * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + cutPolygonPoints[i2 * 4] = cp0x; + cutPolygonPoints[i2 * 4 + 1] = cp0y; + cutPolygonPoints[i2 * 4 + 2] = cp1x; + cutPolygonPoints[i2 * 4 + 3] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + var squaredDistance = Math.pow(cx - x, 2) + Math.pow(cy - y, 2); + if (squaredDistance <= squaredCornerRadius) { + return true; + } + } + return pointInsidePolygonPoints(x, y, cutPolygonPoints); + }; + var joinLines = function joinLines2(lineSet) { + var vertices = new Array(lineSet.length / 2); + var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY; + var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY; + for (var i2 = 0; i2 < lineSet.length / 4; i2++) { + currentLineStartX = lineSet[i2 * 4]; + currentLineStartY = lineSet[i2 * 4 + 1]; + currentLineEndX = lineSet[i2 * 4 + 2]; + currentLineEndY = lineSet[i2 * 4 + 3]; + if (i2 < lineSet.length / 4 - 1) { + nextLineStartX = lineSet[(i2 + 1) * 4]; + nextLineStartY = lineSet[(i2 + 1) * 4 + 1]; + nextLineEndX = lineSet[(i2 + 1) * 4 + 2]; + nextLineEndY = lineSet[(i2 + 1) * 4 + 3]; + } else { + nextLineStartX = lineSet[0]; + nextLineStartY = lineSet[1]; + nextLineEndX = lineSet[2]; + nextLineEndY = lineSet[3]; + } + var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true); + vertices[i2 * 2] = intersection[0]; + vertices[i2 * 2 + 1] = intersection[1]; + } + return vertices; + }; + var expandPolygon = function expandPolygon2(points, pad) { + var expandedLineSet = new Array(points.length * 2); + var currentPointX, currentPointY, nextPointX, nextPointY; + for (var i2 = 0; i2 < points.length / 2; i2++) { + currentPointX = points[i2 * 2]; + currentPointY = points[i2 * 2 + 1]; + if (i2 < points.length / 2 - 1) { + nextPointX = points[(i2 + 1) * 2]; + nextPointY = points[(i2 + 1) * 2 + 1]; + } else { + nextPointX = points[0]; + nextPointY = points[1]; + } + var offsetX = nextPointY - currentPointY; + var offsetY = -(nextPointX - currentPointX); + var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY); + var normalizedOffsetX = offsetX / offsetLength; + var normalizedOffsetY = offsetY / offsetLength; + expandedLineSet[i2 * 4] = currentPointX + normalizedOffsetX * pad; + expandedLineSet[i2 * 4 + 1] = currentPointY + normalizedOffsetY * pad; + expandedLineSet[i2 * 4 + 2] = nextPointX + normalizedOffsetX * pad; + expandedLineSet[i2 * 4 + 3] = nextPointY + normalizedOffsetY * pad; + } + return expandedLineSet; + }; + var intersectLineEllipse = function intersectLineEllipse2(x, y, centerX, centerY, ellipseWradius, ellipseHradius) { + var dispX = centerX - x; + var dispY = centerY - y; + dispX /= ellipseWradius; + dispY /= ellipseHradius; + var len = Math.sqrt(dispX * dispX + dispY * dispY); + var newLength = len - 1; + if (newLength < 0) { + return []; + } + var lenProportion = newLength / len; + return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y]; + }; + var checkInEllipse = function checkInEllipse2(x, y, width, height, centerX, centerY, padding) { + x -= centerX; + y -= centerY; + x /= width / 2 + padding; + y /= height / 2 + padding; + return x * x + y * y <= 1; + }; + var intersectLineCircle = function intersectLineCircle2(x1, y1, x2, y2, centerX, centerY, radius) { + var d = [x2 - x1, y2 - y1]; + var f = [x1 - centerX, y1 - centerY]; + var a = d[0] * d[0] + d[1] * d[1]; + var b = 2 * (f[0] * d[0] + f[1] * d[1]); + var c = f[0] * f[0] + f[1] * f[1] - radius * radius; + var discriminant = b * b - 4 * a * c; + if (discriminant < 0) { + return []; + } + var t1 = (-b + Math.sqrt(discriminant)) / (2 * a); + var t2 = (-b - Math.sqrt(discriminant)) / (2 * a); + var tMin = Math.min(t1, t2); + var tMax = Math.max(t1, t2); + var inRangeParams = []; + if (tMin >= 0 && tMin <= 1) { + inRangeParams.push(tMin); + } + if (tMax >= 0 && tMax <= 1) { + inRangeParams.push(tMax); + } + if (inRangeParams.length === 0) { + return []; + } + var nearIntersectionX = inRangeParams[0] * d[0] + x1; + var nearIntersectionY = inRangeParams[0] * d[1] + y1; + if (inRangeParams.length > 1) { + if (inRangeParams[0] == inRangeParams[1]) { + return [nearIntersectionX, nearIntersectionY]; + } else { + var farIntersectionX = inRangeParams[1] * d[0] + x1; + var farIntersectionY = inRangeParams[1] * d[1] + y1; + return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY]; + } + } else { + return [nearIntersectionX, nearIntersectionY]; + } + }; + var midOfThree = function midOfThree2(a, b, c) { + if (b <= a && a <= c || c <= a && a <= b) { + return a; + } else if (a <= b && b <= c || c <= b && b <= a) { + return b; + } else { + return c; + } + }; + var finiteLinesIntersect = function finiteLinesIntersect2(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) { + var dx13 = x1 - x3; + var dx21 = x2 - x1; + var dx43 = x4 - x3; + var dy13 = y1 - y3; + var dy21 = y2 - y1; + var dy43 = y4 - y3; + var ua_t = dx43 * dy13 - dy43 * dx13; + var ub_t = dx21 * dy13 - dy21 * dx13; + var u_b = dy43 * dx21 - dx43 * dy21; + if (u_b !== 0) { + var ua = ua_t / u_b; + var ub = ub_t / u_b; + var flptThreshold = 1e-3; + var _min = 0 - flptThreshold; + var _max = 1 + flptThreshold; + if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) { + return [x1 + ua * dx21, y1 + ua * dy21]; + } else { + if (!infiniteLines) { + return []; + } else { + return [x1 + ua * dx21, y1 + ua * dy21]; + } + } + } else { + if (ua_t === 0 || ub_t === 0) { + if (midOfThree(x1, x2, x4) === x4) { + return [x4, y4]; + } + if (midOfThree(x1, x2, x3) === x3) { + return [x3, y3]; + } + if (midOfThree(x3, x4, x2) === x2) { + return [x2, y2]; + } + return []; + } else { + return []; + } + } + }; + var polygonIntersectLine = function polygonIntersectLine2(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var transformedPoints = new Array(basePoints.length); + var doTransform = true; + if (width == null) { + doTransform = false; + } + var points; + if (doTransform) { + for (var i2 = 0; i2 < transformedPoints.length / 2; i2++) { + transformedPoints[i2 * 2] = basePoints[i2 * 2] * width + centerX; + transformedPoints[i2 * 2 + 1] = basePoints[i2 * 2 + 1] * height + centerY; + } + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + } else { + points = basePoints; + } + var currentX, currentY, nextX, nextY; + for (var _i2 = 0; _i2 < points.length / 2; _i2++) { + currentX = points[_i2 * 2]; + currentY = points[_i2 * 2 + 1]; + if (_i2 < points.length / 2 - 1) { + nextX = points[(_i2 + 1) * 2]; + nextY = points[(_i2 + 1) * 2 + 1]; + } else { + nextX = points[0]; + nextY = points[1]; + } + intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + return intersections; + }; + var roundPolygonIntersectLine = function roundPolygonIntersectLine2(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var lines = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + for (var i2 = 0; i2 < basePoints.length / 4; i2++) { + var sourceUv = void 0, destUv = void 0; + if (i2 === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i2 * 4 - 2; + } + destUv = i2 * 4 + 2; + var px = centerX + halfW * basePoints[i2 * 4]; + var py = centerY + halfH * basePoints[i2 * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + if (i2 === 0) { + lines[basePoints.length - 2] = cp0x; + lines[basePoints.length - 1] = cp0y; + } else { + lines[i2 * 4 - 2] = cp0x; + lines[i2 * 4 - 1] = cp0y; + } + lines[i2 * 4] = cp1x; + lines[i2 * 4 + 1] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + intersection = intersectLineCircle(x, y, centerX, centerY, cx, cy, cornerRadius); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + for (var _i3 = 0; _i3 < lines.length / 4; _i3++) { + intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[_i3 * 4], lines[_i3 * 4 + 1], lines[_i3 * 4 + 2], lines[_i3 * 4 + 3], false); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + if (intersections.length > 2) { + var lowestIntersection = [intersections[0], intersections[1]]; + var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2); + for (var _i4 = 1; _i4 < intersections.length / 2; _i4++) { + var squaredDistance = Math.pow(intersections[_i4 * 2] - x, 2) + Math.pow(intersections[_i4 * 2 + 1] - y, 2); + if (squaredDistance <= lowestSquaredDistance) { + lowestIntersection[0] = intersections[_i4 * 2]; + lowestIntersection[1] = intersections[_i4 * 2 + 1]; + lowestSquaredDistance = squaredDistance; + } + } + return lowestIntersection; + } + return intersections; + }; + var shortenIntersection = function shortenIntersection2(intersection, offset, amount) { + var disp = [intersection[0] - offset[0], intersection[1] - offset[1]]; + var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]); + var lenRatio = (length - amount) / length; + if (lenRatio < 0) { + lenRatio = 1e-5; + } + return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]]; + }; + var generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare2(sides, rotationRadians) { + var points = generateUnitNgonPoints(sides, rotationRadians); + points = fitPolygonToSquare(points); + return points; + }; + var fitPolygonToSquare = function fitPolygonToSquare2(points) { + var x, y; + var sides = points.length / 2; + var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity; + for (var i2 = 0; i2 < sides; i2++) { + x = points[2 * i2]; + y = points[2 * i2 + 1]; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } + var sx = 2 / (maxX - minX); + var sy = 2 / (maxY - minY); + for (var _i5 = 0; _i5 < sides; _i5++) { + x = points[2 * _i5] = points[2 * _i5] * sx; + y = points[2 * _i5 + 1] = points[2 * _i5 + 1] * sy; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } + if (minY < -1) { + for (var _i6 = 0; _i6 < sides; _i6++) { + y = points[2 * _i6 + 1] = points[2 * _i6 + 1] + (-1 - minY); + } + } + return points; + }; + var generateUnitNgonPoints = function generateUnitNgonPoints2(sides, rotationRadians) { + var increment = 1 / sides * 2 * Math.PI; + var startAngle = sides % 2 === 0 ? Math.PI / 2 + increment / 2 : Math.PI / 2; + startAngle += rotationRadians; + var points = new Array(sides * 2); + var currentAngle; + for (var i2 = 0; i2 < sides; i2++) { + currentAngle = i2 * increment + startAngle; + points[2 * i2] = Math.cos(currentAngle); + points[2 * i2 + 1] = Math.sin(-currentAngle); + } + return points; + }; + var getRoundRectangleRadius = function getRoundRectangleRadius2(width, height) { + return Math.min(width / 4, height / 4, 8); + }; + var getRoundPolygonRadius = function getRoundPolygonRadius2(width, height) { + return Math.min(width / 10, height / 10, 8); + }; + var getCutRectangleCornerLength = function getCutRectangleCornerLength2() { + return 8; + }; + var bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff2(p0, p1, p2) { + return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0]; + }; + var getBarrelCurveConstants = function getBarrelCurveConstants2(width, height) { + return { + heightOffset: Math.min(15, 0.05 * height), + widthOffset: Math.min(100, 0.25 * width), + ctrlPtOffsetPct: 0.05 + }; + }; + var pageRankDefaults = defaults$g({ + dampingFactor: 0.8, + precision: 1e-6, + iterations: 200, + weight: function weight(edge) { + return 1; + } + }); + var elesfn$o = { + pageRank: function pageRank(options) { + var _pageRankDefaults = pageRankDefaults(options), dampingFactor = _pageRankDefaults.dampingFactor, precision = _pageRankDefaults.precision, iterations = _pageRankDefaults.iterations, weight = _pageRankDefaults.weight; + var cy = this._private.cy; + var _this$byGroup = this.byGroup(), nodes2 = _this$byGroup.nodes, edges = _this$byGroup.edges; + var numNodes = nodes2.length; + var numNodesSqd = numNodes * numNodes; + var numEdges = edges.length; + var matrix = new Array(numNodesSqd); + var columnSum = new Array(numNodes); + var additionalProb = (1 - dampingFactor) / numNodes; + for (var i2 = 0; i2 < numNodes; i2++) { + for (var j = 0; j < numNodes; j++) { + var n = i2 * numNodes + j; + matrix[n] = 0; + } + columnSum[i2] = 0; + } + for (var _i = 0; _i < numEdges; _i++) { + var edge = edges[_i]; + var srcId = edge.data("source"); + var tgtId = edge.data("target"); + if (srcId === tgtId) { + continue; + } + var s = nodes2.indexOfId(srcId); + var t = nodes2.indexOfId(tgtId); + var w = weight(edge); + var _n = t * numNodes + s; + matrix[_n] += w; + columnSum[s] += w; + } + var p2 = 1 / numNodes + additionalProb; + for (var _j = 0; _j < numNodes; _j++) { + if (columnSum[_j] === 0) { + for (var _i2 = 0; _i2 < numNodes; _i2++) { + var _n2 = _i2 * numNodes + _j; + matrix[_n2] = p2; + } + } else { + for (var _i3 = 0; _i3 < numNodes; _i3++) { + var _n3 = _i3 * numNodes + _j; + matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb; + } + } + } + var eigenvector = new Array(numNodes); + var temp = new Array(numNodes); + var previous; + for (var _i4 = 0; _i4 < numNodes; _i4++) { + eigenvector[_i4] = 1; + } + for (var iter = 0; iter < iterations; iter++) { + for (var _i5 = 0; _i5 < numNodes; _i5++) { + temp[_i5] = 0; + } + for (var _i6 = 0; _i6 < numNodes; _i6++) { + for (var _j2 = 0; _j2 < numNodes; _j2++) { + var _n4 = _i6 * numNodes + _j2; + temp[_i6] += matrix[_n4] * eigenvector[_j2]; + } + } + inPlaceSumNormalize(temp); + previous = eigenvector; + eigenvector = temp; + temp = previous; + var diff = 0; + for (var _i7 = 0; _i7 < numNodes; _i7++) { + var delta = previous[_i7] - eigenvector[_i7]; + diff += delta * delta; + } + if (diff < precision) { + break; + } + } + var res = { + rank: function rank(node) { + node = cy.collection(node)[0]; + return eigenvector[nodes2.indexOf(node)]; + } + }; + return res; + } + // pageRank + }; + var defaults$f = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false, + alpha: 0 + }); + var elesfn$n = { + degreeCentralityNormalized: function degreeCentralityNormalized(options) { + options = defaults$f(options); + var cy = this.cy(); + var nodes2 = this.nodes(); + var numNodes = nodes2.length; + if (!options.directed) { + var degrees = {}; + var maxDegree = 0; + for (var i2 = 0; i2 < numNodes; i2++) { + var node = nodes2[i2]; + options.root = node; + var currDegree = this.degreeCentrality(options); + if (maxDegree < currDegree.degree) { + maxDegree = currDegree.degree; + } + degrees[node.id()] = currDegree.degree; + } + return { + degree: function degree(node2) { + if (maxDegree === 0) { + return 0; + } + if (string(node2)) { + node2 = cy.filter(node2); + } + return degrees[node2.id()] / maxDegree; + } + }; + } else { + var indegrees = {}; + var outdegrees = {}; + var maxIndegree = 0; + var maxOutdegree = 0; + for (var _i = 0; _i < numNodes; _i++) { + var _node = nodes2[_i]; + var id = _node.id(); + options.root = _node; + var _currDegree = this.degreeCentrality(options); + if (maxIndegree < _currDegree.indegree) + maxIndegree = _currDegree.indegree; + if (maxOutdegree < _currDegree.outdegree) + maxOutdegree = _currDegree.outdegree; + indegrees[id] = _currDegree.indegree; + outdegrees[id] = _currDegree.outdegree; + } + return { + indegree: function indegree(node2) { + if (maxIndegree == 0) { + return 0; + } + if (string(node2)) { + node2 = cy.filter(node2); + } + return indegrees[node2.id()] / maxIndegree; + }, + outdegree: function outdegree(node2) { + if (maxOutdegree === 0) { + return 0; + } + if (string(node2)) { + node2 = cy.filter(node2); + } + return outdegrees[node2.id()] / maxOutdegree; + } + }; + } + }, + // degreeCentralityNormalized + // Implemented from the algorithm in Opsahl's paper + // "Node centrality in weighted networks: Generalizing degree and shortest paths" + // check the heading 2 "Degree" + degreeCentrality: function degreeCentrality(options) { + options = defaults$f(options); + var cy = this.cy(); + var callingEles = this; + var _options = options, root2 = _options.root, weight = _options.weight, directed = _options.directed, alpha = _options.alpha; + root2 = cy.collection(root2)[0]; + if (!directed) { + var connEdges = root2.connectedEdges().intersection(callingEles); + var k = connEdges.length; + var s = 0; + for (var i2 = 0; i2 < connEdges.length; i2++) { + s += weight(connEdges[i2]); + } + return { + degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha) + }; + } else { + var edges = root2.connectedEdges(); + var incoming = edges.filter(function(edge) { + return edge.target().same(root2) && callingEles.has(edge); + }); + var outgoing = edges.filter(function(edge) { + return edge.source().same(root2) && callingEles.has(edge); + }); + var k_in = incoming.length; + var k_out = outgoing.length; + var s_in = 0; + var s_out = 0; + for (var _i2 = 0; _i2 < incoming.length; _i2++) { + s_in += weight(incoming[_i2]); + } + for (var _i3 = 0; _i3 < outgoing.length; _i3++) { + s_out += weight(outgoing[_i3]); + } + return { + indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha), + outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha) + }; + } + } + // degreeCentrality + }; + elesfn$n.dc = elesfn$n.degreeCentrality; + elesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized; + var defaults$e = defaults$g({ + harmonic: true, + weight: function weight() { + return 1; + }, + directed: false, + root: null + }); + var elesfn$m = { + closenessCentralityNormalized: function closenessCentralityNormalized(options) { + var _defaults = defaults$e(options), harmonic = _defaults.harmonic, weight = _defaults.weight, directed = _defaults.directed; + var cy = this.cy(); + var closenesses = {}; + var maxCloseness = 0; + var nodes2 = this.nodes(); + var fw = this.floydWarshall({ + weight, + directed + }); + for (var i2 = 0; i2 < nodes2.length; i2++) { + var currCloseness = 0; + var node_i = nodes2[i2]; + for (var j = 0; j < nodes2.length; j++) { + if (i2 !== j) { + var d = fw.distance(node_i, nodes2[j]); + if (harmonic) { + currCloseness += 1 / d; + } else { + currCloseness += d; + } + } + } + if (!harmonic) { + currCloseness = 1 / currCloseness; + } + if (maxCloseness < currCloseness) { + maxCloseness = currCloseness; + } + closenesses[node_i.id()] = currCloseness; + } + return { + closeness: function closeness(node) { + if (maxCloseness == 0) { + return 0; + } + if (string(node)) { + node = cy.filter(node)[0].id(); + } else { + node = node.id(); + } + return closenesses[node] / maxCloseness; + } + }; + }, + // Implemented from pseudocode from wikipedia + closenessCentrality: function closenessCentrality(options) { + var _defaults2 = defaults$e(options), root2 = _defaults2.root, weight = _defaults2.weight, directed = _defaults2.directed, harmonic = _defaults2.harmonic; + root2 = this.filter(root2)[0]; + var dijkstra = this.dijkstra({ + root: root2, + weight, + directed + }); + var totalDistance = 0; + var nodes2 = this.nodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + var n = nodes2[i2]; + if (!n.same(root2)) { + var d = dijkstra.distanceTo(n); + if (harmonic) { + totalDistance += 1 / d; + } else { + totalDistance += d; + } + } + } + return harmonic ? totalDistance : 1 / totalDistance; + } + // closenessCentrality + }; + elesfn$m.cc = elesfn$m.closenessCentrality; + elesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized; + var defaults$d = defaults$g({ + weight: null, + directed: false + }); + var elesfn$l = { + // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes + betweennessCentrality: function betweennessCentrality(options) { + var _defaults = defaults$d(options), directed = _defaults.directed, weight = _defaults.weight; + var weighted = weight != null; + var cy = this.cy(); + var V = this.nodes(); + var A = {}; + var _C = {}; + var max2 = 0; + var C = { + set: function set2(key, val) { + _C[key] = val; + if (val > max2) { + max2 = val; + } + }, + get: function get2(key) { + return _C[key]; + } + }; + for (var i2 = 0; i2 < V.length; i2++) { + var v = V[i2]; + var vid = v.id(); + if (directed) { + A[vid] = v.outgoers().nodes(); + } else { + A[vid] = v.openNeighborhood().nodes(); + } + C.set(vid, 0); + } + var _loop = function _loop2(s2) { + var sid = V[s2].id(); + var S = []; + var P = {}; + var g = {}; + var d = {}; + var Q = new heap(function(a, b) { + return d[a] - d[b]; + }); + for (var _i = 0; _i < V.length; _i++) { + var _vid = V[_i].id(); + P[_vid] = []; + g[_vid] = 0; + d[_vid] = Infinity; + } + g[sid] = 1; + d[sid] = 0; + Q.push(sid); + while (!Q.empty()) { + var _v = Q.pop(); + S.push(_v); + if (weighted) { + for (var j = 0; j < A[_v].length; j++) { + var w = A[_v][j]; + var vEle = cy.getElementById(_v); + var edge = void 0; + if (vEle.edgesTo(w).length > 0) { + edge = vEle.edgesTo(w)[0]; + } else { + edge = w.edgesTo(vEle)[0]; + } + var edgeWeight = weight(edge); + w = w.id(); + if (d[w] > d[_v] + edgeWeight) { + d[w] = d[_v] + edgeWeight; + if (Q.nodes.indexOf(w) < 0) { + Q.push(w); + } else { + Q.updateItem(w); + } + g[w] = 0; + P[w] = []; + } + if (d[w] == d[_v] + edgeWeight) { + g[w] = g[w] + g[_v]; + P[w].push(_v); + } + } + } else { + for (var _j = 0; _j < A[_v].length; _j++) { + var _w = A[_v][_j].id(); + if (d[_w] == Infinity) { + Q.push(_w); + d[_w] = d[_v] + 1; + } + if (d[_w] == d[_v] + 1) { + g[_w] = g[_w] + g[_v]; + P[_w].push(_v); + } + } + } + } + var e = {}; + for (var _i2 = 0; _i2 < V.length; _i2++) { + e[V[_i2].id()] = 0; + } + while (S.length > 0) { + var _w2 = S.pop(); + for (var _j2 = 0; _j2 < P[_w2].length; _j2++) { + var _v2 = P[_w2][_j2]; + e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]); + } + if (_w2 != V[s2].id()) { + C.set(_w2, C.get(_w2) + e[_w2]); + } + } + }; + for (var s = 0; s < V.length; s++) { + _loop(s); + } + var ret = { + betweenness: function betweenness(node) { + var id = cy.collection(node).id(); + return C.get(id); + }, + betweennessNormalized: function betweennessNormalized(node) { + if (max2 == 0) { + return 0; + } + var id = cy.collection(node).id(); + return C.get(id) / max2; + } + }; + ret.betweennessNormalised = ret.betweennessNormalized; + return ret; + } + // betweennessCentrality + }; + elesfn$l.bc = elesfn$l.betweennessCentrality; + var defaults$c = defaults$g({ + expandFactor: 2, + // affects time of computation and cluster granularity to some extent: M * M + inflateFactor: 2, + // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) + multFactor: 1, + // optional self loops for each node. Use a neutral value to improve cluster computations. + maxIterations: 20, + // maximum number of iterations of the MCL algorithm in a single run + attributes: [ + // attributes/features used to group nodes, ie. similarity values between nodes + function(edge) { + return 1; + } + ] + }); + var setOptions$3 = function setOptions2(options) { + return defaults$c(options); + }; + var getSimilarity$1 = function getSimilarity2(edge, attributes) { + var total = 0; + for (var i2 = 0; i2 < attributes.length; i2++) { + total += attributes[i2](edge); + } + return total; + }; + var addLoops = function addLoops2(M, n, val) { + for (var i2 = 0; i2 < n; i2++) { + M[i2 * n + i2] = val; + } + }; + var normalize = function normalize2(M, n) { + var sum; + for (var col = 0; col < n; col++) { + sum = 0; + for (var row = 0; row < n; row++) { + sum += M[row * n + col]; + } + for (var _row = 0; _row < n; _row++) { + M[_row * n + col] = M[_row * n + col] / sum; + } + } + }; + var mmult = function mmult2(A, B, n) { + var C = new Array(n * n); + for (var i2 = 0; i2 < n; i2++) { + for (var j = 0; j < n; j++) { + C[i2 * n + j] = 0; + } + for (var k = 0; k < n; k++) { + for (var _j = 0; _j < n; _j++) { + C[i2 * n + _j] += A[i2 * n + k] * B[k * n + _j]; + } + } + } + return C; + }; + var expand = function expand2(M, n, expandFactor) { + var _M = M.slice(0); + for (var p2 = 1; p2 < expandFactor; p2++) { + M = mmult(M, _M, n); + } + return M; + }; + var inflate = function inflate2(M, n, inflateFactor) { + var _M = new Array(n * n); + for (var i2 = 0; i2 < n * n; i2++) { + _M[i2] = Math.pow(M[i2], inflateFactor); + } + normalize(_M, n); + return _M; + }; + var hasConverged = function hasConverged2(M, _M, n2, roundFactor) { + for (var i2 = 0; i2 < n2; i2++) { + var v1 = Math.round(M[i2] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); + var v2 = Math.round(_M[i2] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); + if (v1 !== v2) { + return false; + } + } + return true; + }; + var assign$2 = function assign2(M, n, nodes2, cy) { + var clusters = []; + for (var i2 = 0; i2 < n; i2++) { + var cluster = []; + for (var j = 0; j < n; j++) { + if (Math.round(M[i2 * n + j] * 1e3) / 1e3 > 0) { + cluster.push(nodes2[j]); + } + } + if (cluster.length !== 0) { + clusters.push(cy.collection(cluster)); + } + } + return clusters; + }; + var isDuplicate = function isDuplicate2(c1, c2) { + for (var i2 = 0; i2 < c1.length; i2++) { + if (!c2[i2] || c1[i2].id() !== c2[i2].id()) { + return false; + } + } + return true; + }; + var removeDuplicates = function removeDuplicates2(clusters) { + for (var i2 = 0; i2 < clusters.length; i2++) { + for (var j = 0; j < clusters.length; j++) { + if (i2 != j && isDuplicate(clusters[i2], clusters[j])) { + clusters.splice(j, 1); + } + } + } + return clusters; + }; + var markovClustering = function markovClustering2(options) { + var nodes2 = this.nodes(); + var edges = this.edges(); + var cy = this.cy(); + var opts = setOptions$3(options); + var id2position = {}; + for (var i2 = 0; i2 < nodes2.length; i2++) { + id2position[nodes2[i2].id()] = i2; + } + var n = nodes2.length, n2 = n * n; + var M = new Array(n2), _M; + for (var _i = 0; _i < n2; _i++) { + M[_i] = 0; + } + for (var e = 0; e < edges.length; e++) { + var edge = edges[e]; + var _i2 = id2position[edge.source().id()]; + var j = id2position[edge.target().id()]; + var sim = getSimilarity$1(edge, opts.attributes); + M[_i2 * n + j] += sim; + M[j * n + _i2] += sim; + } + addLoops(M, n, opts.multFactor); + normalize(M, n); + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + _M = expand(M, n, opts.expandFactor); + M = inflate(_M, n, opts.inflateFactor); + if (!hasConverged(M, _M, n2, 4)) { + isStillMoving = true; + } + iterations++; + } + var clusters = assign$2(M, n, nodes2, cy); + clusters = removeDuplicates(clusters); + return clusters; + }; + var markovClustering$1 = { + markovClustering, + mcl: markovClustering + }; + var identity = function identity2(x) { + return x; + }; + var absDiff = function absDiff2(p2, q) { + return Math.abs(q - p2); + }; + var addAbsDiff = function addAbsDiff2(total, p2, q) { + return total + absDiff(p2, q); + }; + var addSquaredDiff = function addSquaredDiff2(total, p2, q) { + return total + Math.pow(q - p2, 2); + }; + var sqrt = function sqrt3(x) { + return Math.sqrt(x); + }; + var maxAbsDiff = function maxAbsDiff2(currentMax, p2, q) { + return Math.max(currentMax, absDiff(p2, q)); + }; + var getDistance = function getDistance2(length, getP, getQ, init, visit) { + var post = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : identity; + var ret = init; + var p2, q; + for (var dim = 0; dim < length; dim++) { + p2 = getP(dim); + q = getQ(dim); + ret = visit(ret, p2, q); + } + return post(ret); + }; + var distances = { + euclidean: function euclidean(length, getP, getQ) { + if (length >= 2) { + return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt); + } else { + return getDistance(length, getP, getQ, 0, addAbsDiff); + } + }, + squaredEuclidean: function squaredEuclidean(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addSquaredDiff); + }, + manhattan: function manhattan(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addAbsDiff); + }, + max: function max2(length, getP, getQ) { + return getDistance(length, getP, getQ, -Infinity, maxAbsDiff); + } + }; + distances["squared-euclidean"] = distances["squaredEuclidean"]; + distances["squaredeuclidean"] = distances["squaredEuclidean"]; + function clusteringDistance(method, length, getP, getQ, nodeP, nodeQ) { + var impl2; + if (fn$6(method)) { + impl2 = method; + } else { + impl2 = distances[method] || distances.euclidean; + } + if (length === 0 && fn$6(method)) { + return impl2(nodeP, nodeQ); + } else { + return impl2(length, getP, getQ, nodeP, nodeQ); + } + } + var defaults$b = defaults$g({ + k: 2, + m: 2, + sensitivityThreshold: 1e-4, + distance: "euclidean", + maxIterations: 10, + attributes: [], + testMode: false, + testCentroids: null + }); + var setOptions$2 = function setOptions2(options) { + return defaults$b(options); + }; + var getDist = function getDist2(type, node, centroid, attributes, mode) { + var noNodeP = mode !== "kMedoids"; + var getP = noNodeP ? function(i2) { + return centroid[i2]; + } : function(i2) { + return attributes[i2](centroid); + }; + var getQ = function getQ2(i2) { + return attributes[i2](node); + }; + var nodeP = centroid; + var nodeQ = node; + return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ); + }; + var randomCentroids = function randomCentroids2(nodes2, k, attributes) { + var ndim = attributes.length; + var min2 = new Array(ndim); + var max2 = new Array(ndim); + var centroids = new Array(k); + var centroid = null; + for (var i2 = 0; i2 < ndim; i2++) { + min2[i2] = nodes2.min(attributes[i2]).value; + max2[i2] = nodes2.max(attributes[i2]).value; + } + for (var c = 0; c < k; c++) { + centroid = []; + for (var _i = 0; _i < ndim; _i++) { + centroid[_i] = Math.random() * (max2[_i] - min2[_i]) + min2[_i]; + } + centroids[c] = centroid; + } + return centroids; + }; + var classify = function classify2(node, centroids, distance, attributes, type) { + var min2 = Infinity; + var index = 0; + for (var i2 = 0; i2 < centroids.length; i2++) { + var dist2 = getDist(distance, node, centroids[i2], attributes, type); + if (dist2 < min2) { + min2 = dist2; + index = i2; + } + } + return index; + }; + var buildCluster = function buildCluster2(centroid, nodes2, assignment) { + var cluster = []; + var node = null; + for (var n = 0; n < nodes2.length; n++) { + node = nodes2[n]; + if (assignment[node.id()] === centroid) { + cluster.push(node); + } + } + return cluster; + }; + var haveValuesConverged = function haveValuesConverged2(v1, v2, sensitivityThreshold) { + return Math.abs(v2 - v1) <= sensitivityThreshold; + }; + var haveMatricesConverged = function haveMatricesConverged2(v1, v2, sensitivityThreshold) { + for (var i2 = 0; i2 < v1.length; i2++) { + for (var j = 0; j < v1[i2].length; j++) { + var diff = Math.abs(v1[i2][j] - v2[i2][j]); + if (diff > sensitivityThreshold) { + return false; + } + } + } + return true; + }; + var seenBefore = function seenBefore2(node, medoids, n) { + for (var i2 = 0; i2 < n; i2++) { + if (node === medoids[i2]) + return true; + } + return false; + }; + var randomMedoids = function randomMedoids2(nodes2, k) { + var medoids = new Array(k); + if (nodes2.length < 50) { + for (var i2 = 0; i2 < k; i2++) { + var node = nodes2[Math.floor(Math.random() * nodes2.length)]; + while (seenBefore(node, medoids, i2)) { + node = nodes2[Math.floor(Math.random() * nodes2.length)]; + } + medoids[i2] = node; + } + } else { + for (var _i2 = 0; _i2 < k; _i2++) { + medoids[_i2] = nodes2[Math.floor(Math.random() * nodes2.length)]; + } + } + return medoids; + }; + var findCost = function findCost2(potentialNewMedoid, cluster, attributes) { + var cost = 0; + for (var n = 0; n < cluster.length; n++) { + cost += getDist("manhattan", cluster[n], potentialNewMedoid, attributes, "kMedoids"); + } + return cost; + }; + var kMeans = function kMeans2(options) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var node = null; + var opts = setOptions$2(options); + var clusters = new Array(opts.k); + var assignment = {}; + var centroids; + if (opts.testMode) { + if (typeof opts.testCentroids === "number") { + opts.testCentroids; + centroids = randomCentroids(nodes2, opts.k, opts.attributes); + } else if (_typeof(opts.testCentroids) === "object") { + centroids = opts.testCentroids; + } else { + centroids = randomCentroids(nodes2, opts.k, opts.attributes); + } + } else { + centroids = randomCentroids(nodes2, opts.k, opts.attributes); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + for (var n = 0; n < nodes2.length; n++) { + node = nodes2[n]; + assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, "kMeans"); + } + isStillMoving = false; + for (var c = 0; c < opts.k; c++) { + var cluster = buildCluster(c, nodes2, assignment); + if (cluster.length === 0) { + continue; + } + var ndim = opts.attributes.length; + var centroid = centroids[c]; + var newCentroid = new Array(ndim); + var sum = new Array(ndim); + for (var d = 0; d < ndim; d++) { + sum[d] = 0; + for (var i2 = 0; i2 < cluster.length; i2++) { + node = cluster[i2]; + sum[d] += opts.attributes[d](node); + } + newCentroid[d] = sum[d] / cluster.length; + if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) { + isStillMoving = true; + } + } + centroids[c] = newCentroid; + clusters[c] = cy.collection(cluster); + } + iterations++; + } + return clusters; + }; + var kMedoids = function kMedoids2(options) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var node = null; + var opts = setOptions$2(options); + var clusters = new Array(opts.k); + var medoids; + var assignment = {}; + var curCost; + var minCosts = new Array(opts.k); + if (opts.testMode) { + if (typeof opts.testCentroids === "number") + ; + else if (_typeof(opts.testCentroids) === "object") { + medoids = opts.testCentroids; + } else { + medoids = randomMedoids(nodes2, opts.k); + } + } else { + medoids = randomMedoids(nodes2, opts.k); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + for (var n = 0; n < nodes2.length; n++) { + node = nodes2[n]; + assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, "kMedoids"); + } + isStillMoving = false; + for (var m = 0; m < medoids.length; m++) { + var cluster = buildCluster(m, nodes2, assignment); + if (cluster.length === 0) { + continue; + } + minCosts[m] = findCost(medoids[m], cluster, opts.attributes); + for (var _n = 0; _n < cluster.length; _n++) { + curCost = findCost(cluster[_n], cluster, opts.attributes); + if (curCost < minCosts[m]) { + minCosts[m] = curCost; + medoids[m] = cluster[_n]; + isStillMoving = true; + } + } + clusters[m] = cy.collection(cluster); + } + iterations++; + } + return clusters; + }; + var updateCentroids = function updateCentroids2(centroids, nodes2, U, weight, opts) { + var numerator, denominator; + for (var n = 0; n < nodes2.length; n++) { + for (var c = 0; c < centroids.length; c++) { + weight[n][c] = Math.pow(U[n][c], opts.m); + } + } + for (var _c = 0; _c < centroids.length; _c++) { + for (var dim = 0; dim < opts.attributes.length; dim++) { + numerator = 0; + denominator = 0; + for (var _n2 = 0; _n2 < nodes2.length; _n2++) { + numerator += weight[_n2][_c] * opts.attributes[dim](nodes2[_n2]); + denominator += weight[_n2][_c]; + } + centroids[_c][dim] = numerator / denominator; + } + } + }; + var updateMembership = function updateMembership2(U, _U, centroids, nodes2, opts) { + for (var i2 = 0; i2 < U.length; i2++) { + _U[i2] = U[i2].slice(); + } + var sum, numerator, denominator; + var pow = 2 / (opts.m - 1); + for (var c = 0; c < centroids.length; c++) { + for (var n = 0; n < nodes2.length; n++) { + sum = 0; + for (var k = 0; k < centroids.length; k++) { + numerator = getDist(opts.distance, nodes2[n], centroids[c], opts.attributes, "cmeans"); + denominator = getDist(opts.distance, nodes2[n], centroids[k], opts.attributes, "cmeans"); + sum += Math.pow(numerator / denominator, pow); + } + U[n][c] = 1 / sum; + } + } + }; + var assign$1 = function assign2(nodes2, U, opts, cy) { + var clusters = new Array(opts.k); + for (var c = 0; c < clusters.length; c++) { + clusters[c] = []; + } + var max2; + var index; + for (var n = 0; n < U.length; n++) { + max2 = -Infinity; + index = -1; + for (var _c2 = 0; _c2 < U[0].length; _c2++) { + if (U[n][_c2] > max2) { + max2 = U[n][_c2]; + index = _c2; + } + } + clusters[index].push(nodes2[n]); + } + for (var _c3 = 0; _c3 < clusters.length; _c3++) { + clusters[_c3] = cy.collection(clusters[_c3]); + } + return clusters; + }; + var fuzzyCMeans = function fuzzyCMeans2(options) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var opts = setOptions$2(options); + var clusters; + var centroids; + var U; + var _U; + var weight; + _U = new Array(nodes2.length); + for (var i2 = 0; i2 < nodes2.length; i2++) { + _U[i2] = new Array(opts.k); + } + U = new Array(nodes2.length); + for (var _i3 = 0; _i3 < nodes2.length; _i3++) { + U[_i3] = new Array(opts.k); + } + for (var _i4 = 0; _i4 < nodes2.length; _i4++) { + var total = 0; + for (var j = 0; j < opts.k; j++) { + U[_i4][j] = Math.random(); + total += U[_i4][j]; + } + for (var _j = 0; _j < opts.k; _j++) { + U[_i4][_j] = U[_i4][_j] / total; + } + } + centroids = new Array(opts.k); + for (var _i5 = 0; _i5 < opts.k; _i5++) { + centroids[_i5] = new Array(opts.attributes.length); + } + weight = new Array(nodes2.length); + for (var _i6 = 0; _i6 < nodes2.length; _i6++) { + weight[_i6] = new Array(opts.k); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + updateCentroids(centroids, nodes2, U, weight, opts); + updateMembership(U, _U, centroids, nodes2, opts); + if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) { + isStillMoving = true; + } + iterations++; + } + clusters = assign$1(nodes2, U, opts, cy); + return { + clusters, + degreeOfMembership: U + }; + }; + var kClustering = { + kMeans, + kMedoids, + fuzzyCMeans, + fcm: fuzzyCMeans + }; + var defaults$a = defaults$g({ + distance: "euclidean", + // distance metric to compare nodes + linkage: "min", + // linkage criterion : how to determine the distance between clusters of nodes + mode: "threshold", + // mode:'threshold' => clusters must be threshold distance apart + threshold: Infinity, + // the distance threshold + // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters + addDendrogram: false, + // whether to add the dendrogram to the graph for viz + dendrogramDepth: 0, + // depth at which dendrogram branches are merged into the returned clusters + attributes: [] + // array of attr functions + }); + var linkageAliases = { + "single": "min", + "complete": "max" + }; + var setOptions$1 = function setOptions2(options) { + var opts = defaults$a(options); + var preferredAlias = linkageAliases[opts.linkage]; + if (preferredAlias != null) { + opts.linkage = preferredAlias; + } + return opts; + }; + var mergeClosest = function mergeClosest2(clusters, index, dists, mins, opts) { + var minKey = 0; + var min2 = Infinity; + var dist2; + var attrs = opts.attributes; + var getDist2 = function getDist3(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function(i3) { + return attrs[i3](n1); + }, function(i3) { + return attrs[i3](n2); + }, n1, n2); + }; + for (var i2 = 0; i2 < clusters.length; i2++) { + var key = clusters[i2].key; + var _dist = dists[key][mins[key]]; + if (_dist < min2) { + minKey = key; + min2 = _dist; + } + } + if (opts.mode === "threshold" && min2 >= opts.threshold || opts.mode === "dendrogram" && clusters.length === 1) { + return false; + } + var c1 = index[minKey]; + var c2 = index[mins[minKey]]; + var merged; + if (opts.mode === "dendrogram") { + merged = { + left: c1, + right: c2, + key: c1.key + }; + } else { + merged = { + value: c1.value.concat(c2.value), + key: c1.key + }; + } + clusters[c1.index] = merged; + clusters.splice(c2.index, 1); + index[c1.key] = merged; + for (var _i = 0; _i < clusters.length; _i++) { + var cur = clusters[_i]; + if (c1.key === cur.key) { + dist2 = Infinity; + } else if (opts.linkage === "min") { + dist2 = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) { + dist2 = dists[c2.key][cur.key]; + } + } else if (opts.linkage === "max") { + dist2 = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) { + dist2 = dists[c2.key][cur.key]; + } + } else if (opts.linkage === "mean") { + dist2 = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size); + } else { + if (opts.mode === "dendrogram") + dist2 = getDist2(cur.value, c1.value); + else + dist2 = getDist2(cur.value[0], c1.value[0]); + } + dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist2; + } + for (var _i2 = 0; _i2 < clusters.length; _i2++) { + var key1 = clusters[_i2].key; + if (mins[key1] === c1.key || mins[key1] === c2.key) { + var _min = key1; + for (var j = 0; j < clusters.length; j++) { + var key2 = clusters[j].key; + if (dists[key1][key2] < dists[key1][_min]) { + _min = key2; + } + } + mins[key1] = _min; + } + clusters[_i2].index = _i2; + } + c1.key = c2.key = c1.index = c2.index = null; + return true; + }; + var getAllChildren = function getAllChildren2(root2, arr, cy) { + if (!root2) + return; + if (root2.value) { + arr.push(root2.value); + } else { + if (root2.left) + getAllChildren2(root2.left, arr); + if (root2.right) + getAllChildren2(root2.right, arr); + } + }; + var buildDendrogram = function buildDendrogram2(root2, cy) { + if (!root2) + return ""; + if (root2.left && root2.right) { + var leftStr = buildDendrogram2(root2.left, cy); + var rightStr = buildDendrogram2(root2.right, cy); + var node = cy.add({ + group: "nodes", + data: { + id: leftStr + "," + rightStr + } + }); + cy.add({ + group: "edges", + data: { + source: leftStr, + target: node.id() + } + }); + cy.add({ + group: "edges", + data: { + source: rightStr, + target: node.id() + } + }); + return node.id(); + } else if (root2.value) { + return root2.value.id(); + } + }; + var buildClustersFromTree = function buildClustersFromTree2(root2, k, cy) { + if (!root2) + return []; + var left = [], right = [], leaves = []; + if (k === 0) { + if (root2.left) + getAllChildren(root2.left, left); + if (root2.right) + getAllChildren(root2.right, right); + leaves = left.concat(right); + return [cy.collection(leaves)]; + } else if (k === 1) { + if (root2.value) { + return [cy.collection(root2.value)]; + } else { + if (root2.left) + getAllChildren(root2.left, left); + if (root2.right) + getAllChildren(root2.right, right); + return [cy.collection(left), cy.collection(right)]; + } + } else { + if (root2.value) { + return [cy.collection(root2.value)]; + } else { + if (root2.left) + left = buildClustersFromTree2(root2.left, k - 1, cy); + if (root2.right) + right = buildClustersFromTree2(root2.right, k - 1, cy); + return left.concat(right); + } + } + }; + var hierarchicalClustering = function hierarchicalClustering2(options) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var opts = setOptions$1(options); + var attrs = opts.attributes; + var getDist2 = function getDist3(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function(i3) { + return attrs[i3](n1); + }, function(i3) { + return attrs[i3](n2); + }, n1, n2); + }; + var clusters = []; + var dists = []; + var mins = []; + var index = []; + for (var n = 0; n < nodes2.length; n++) { + var cluster = { + value: opts.mode === "dendrogram" ? nodes2[n] : [nodes2[n]], + key: n, + index: n + }; + clusters[n] = cluster; + index[n] = cluster; + dists[n] = []; + mins[n] = 0; + } + for (var i2 = 0; i2 < clusters.length; i2++) { + for (var j = 0; j <= i2; j++) { + var dist2 = void 0; + if (opts.mode === "dendrogram") { + dist2 = i2 === j ? Infinity : getDist2(clusters[i2].value, clusters[j].value); + } else { + dist2 = i2 === j ? Infinity : getDist2(clusters[i2].value[0], clusters[j].value[0]); + } + dists[i2][j] = dist2; + dists[j][i2] = dist2; + if (dist2 < dists[i2][mins[i2]]) { + mins[i2] = j; + } + } + } + var merged = mergeClosest(clusters, index, dists, mins, opts); + while (merged) { + merged = mergeClosest(clusters, index, dists, mins, opts); + } + var retClusters; + if (opts.mode === "dendrogram") { + retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy); + if (opts.addDendrogram) + buildDendrogram(clusters[0], cy); + } else { + retClusters = new Array(clusters.length); + clusters.forEach(function(cluster2, i3) { + cluster2.key = cluster2.index = null; + retClusters[i3] = cy.collection(cluster2.value); + }); + } + return retClusters; + }; + var hierarchicalClustering$1 = { + hierarchicalClustering, + hca: hierarchicalClustering + }; + var defaults$9 = defaults$g({ + distance: "euclidean", + // distance metric to compare attributes between two nodes + preference: "median", + // suitability of a data point to serve as an exemplar + damping: 0.8, + // damping factor between [0.5, 1) + maxIterations: 1e3, + // max number of iterations to run + minIterations: 100, + // min number of iterations to run in order for clustering to stop + attributes: [ + // functions to quantify the similarity between any two points + // e.g. node => node.data('weight') + ] + }); + var setOptions = function setOptions2(options) { + var dmp = options.damping; + var pref = options.preference; + if (!(0.5 <= dmp && dmp < 1)) { + error("Damping must range on [0.5, 1). Got: ".concat(dmp)); + } + var validPrefs = ["median", "mean", "min", "max"]; + if (!(validPrefs.some(function(v) { + return v === pref; + }) || number$1(pref))) { + error("Preference must be one of [".concat(validPrefs.map(function(p2) { + return "'".concat(p2, "'"); + }).join(", "), "] or a number. Got: ").concat(pref)); + } + return defaults$9(options); + }; + var getSimilarity = function getSimilarity2(type, n1, n2, attributes) { + var attr = function attr2(n, i2) { + return attributes[i2](n); + }; + return -clusteringDistance(type, attributes.length, function(i2) { + return attr(n1, i2); + }, function(i2) { + return attr(n2, i2); + }, n1, n2); + }; + var getPreference = function getPreference2(S, preference) { + var p2 = null; + if (preference === "median") { + p2 = median(S); + } else if (preference === "mean") { + p2 = mean(S); + } else if (preference === "min") { + p2 = min(S); + } else if (preference === "max") { + p2 = max(S); + } else { + p2 = preference; + } + return p2; + }; + var findExemplars = function findExemplars2(n, R, A) { + var indices = []; + for (var i2 = 0; i2 < n; i2++) { + if (R[i2 * n + i2] + A[i2 * n + i2] > 0) { + indices.push(i2); + } + } + return indices; + }; + var assignClusters = function assignClusters2(n, S, exemplars) { + var clusters = []; + for (var i2 = 0; i2 < n; i2++) { + var index = -1; + var max2 = -Infinity; + for (var ei = 0; ei < exemplars.length; ei++) { + var e = exemplars[ei]; + if (S[i2 * n + e] > max2) { + index = e; + max2 = S[i2 * n + e]; + } + } + if (index > 0) { + clusters.push(index); + } + } + for (var _ei = 0; _ei < exemplars.length; _ei++) { + clusters[exemplars[_ei]] = exemplars[_ei]; + } + return clusters; + }; + var assign = function assign2(n, S, exemplars) { + var clusters = assignClusters(n, S, exemplars); + for (var ei = 0; ei < exemplars.length; ei++) { + var ii = []; + for (var c = 0; c < clusters.length; c++) { + if (clusters[c] === exemplars[ei]) { + ii.push(c); + } + } + var maxI = -1; + var maxSum = -Infinity; + for (var i2 = 0; i2 < ii.length; i2++) { + var sum = 0; + for (var j = 0; j < ii.length; j++) { + sum += S[ii[j] * n + ii[i2]]; + } + if (sum > maxSum) { + maxI = i2; + maxSum = sum; + } + } + exemplars[ei] = ii[maxI]; + } + clusters = assignClusters(n, S, exemplars); + return clusters; + }; + var affinityPropagation = function affinityPropagation2(options) { + var cy = this.cy(); + var nodes2 = this.nodes(); + var opts = setOptions(options); + var id2position = {}; + for (var i2 = 0; i2 < nodes2.length; i2++) { + id2position[nodes2[i2].id()] = i2; + } + var n; + var n2; + var S; + var p2; + var R; + var A; + n = nodes2.length; + n2 = n * n; + S = new Array(n2); + for (var _i = 0; _i < n2; _i++) { + S[_i] = -Infinity; + } + for (var _i2 = 0; _i2 < n; _i2++) { + for (var j = 0; j < n; j++) { + if (_i2 !== j) { + S[_i2 * n + j] = getSimilarity(opts.distance, nodes2[_i2], nodes2[j], opts.attributes); + } + } + } + p2 = getPreference(S, opts.preference); + for (var _i3 = 0; _i3 < n; _i3++) { + S[_i3 * n + _i3] = p2; + } + R = new Array(n2); + for (var _i4 = 0; _i4 < n2; _i4++) { + R[_i4] = 0; + } + A = new Array(n2); + for (var _i5 = 0; _i5 < n2; _i5++) { + A[_i5] = 0; + } + var old = new Array(n); + var Rp = new Array(n); + var se = new Array(n); + for (var _i6 = 0; _i6 < n; _i6++) { + old[_i6] = 0; + Rp[_i6] = 0; + se[_i6] = 0; + } + var e = new Array(n * opts.minIterations); + for (var _i7 = 0; _i7 < e.length; _i7++) { + e[_i7] = 0; + } + var iter; + for (iter = 0; iter < opts.maxIterations; iter++) { + for (var _i8 = 0; _i8 < n; _i8++) { + var max2 = -Infinity, max22 = -Infinity, maxI = -1, AS = 0; + for (var _j = 0; _j < n; _j++) { + old[_j] = R[_i8 * n + _j]; + AS = A[_i8 * n + _j] + S[_i8 * n + _j]; + if (AS >= max2) { + max22 = max2; + max2 = AS; + maxI = _j; + } else if (AS > max22) { + max22 = AS; + } + } + for (var _j2 = 0; _j2 < n; _j2++) { + R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max2) + opts.damping * old[_j2]; + } + R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max22) + opts.damping * old[maxI]; + } + for (var _i9 = 0; _i9 < n; _i9++) { + var sum = 0; + for (var _j3 = 0; _j3 < n; _j3++) { + old[_j3] = A[_j3 * n + _i9]; + Rp[_j3] = Math.max(0, R[_j3 * n + _i9]); + sum += Rp[_j3]; + } + sum -= Rp[_i9]; + Rp[_i9] = R[_i9 * n + _i9]; + sum += Rp[_i9]; + for (var _j4 = 0; _j4 < n; _j4++) { + A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4]; + } + A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9]; + } + var K2 = 0; + for (var _i10 = 0; _i10 < n; _i10++) { + var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0; + e[iter % opts.minIterations * n + _i10] = E; + K2 += E; + } + if (K2 > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) { + var _sum = 0; + for (var _i11 = 0; _i11 < n; _i11++) { + se[_i11] = 0; + for (var _j5 = 0; _j5 < opts.minIterations; _j5++) { + se[_i11] += e[_j5 * n + _i11]; + } + if (se[_i11] === 0 || se[_i11] === opts.minIterations) { + _sum++; + } + } + if (_sum === n) { + break; + } + } + } + var exemplarsIndices = findExemplars(n, R, A); + var clusterIndices = assign(n, S, exemplarsIndices); + var clusters = {}; + for (var c = 0; c < exemplarsIndices.length; c++) { + clusters[exemplarsIndices[c]] = []; + } + for (var _i12 = 0; _i12 < nodes2.length; _i12++) { + var pos = id2position[nodes2[_i12].id()]; + var clusterIndex = clusterIndices[pos]; + if (clusterIndex != null) { + clusters[clusterIndex].push(nodes2[_i12]); + } + } + var retClusters = new Array(exemplarsIndices.length); + for (var _c = 0; _c < exemplarsIndices.length; _c++) { + retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]); + } + return retClusters; + }; + var affinityPropagation$1 = { + affinityPropagation, + ap: affinityPropagation + }; + var hierholzerDefaults = defaults$g({ + root: void 0, + directed: false + }); + var elesfn$k = { + hierholzer: function hierholzer(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + directed: args[1] + }; + } + var _hierholzerDefaults = hierholzerDefaults(options), root2 = _hierholzerDefaults.root, directed = _hierholzerDefaults.directed; + var eles = this; + var dflag = false; + var oddIn; + var oddOut; + var startVertex; + if (root2) + startVertex = string(root2) ? this.filter(root2)[0].id() : root2[0].id(); + var nodes2 = {}; + var edges = {}; + if (directed) { + eles.forEach(function(ele) { + var id = ele.id(); + if (ele.isNode()) { + var ind = ele.indegree(true); + var outd = ele.outdegree(true); + var d1 = ind - outd; + var d2 = outd - ind; + if (d1 == 1) { + if (oddIn) + dflag = true; + else + oddIn = id; + } else if (d2 == 1) { + if (oddOut) + dflag = true; + else + oddOut = id; + } else if (d2 > 1 || d1 > 1) { + dflag = true; + } + nodes2[id] = []; + ele.outgoers().forEach(function(e) { + if (e.isEdge()) + nodes2[id].push(e.id()); + }); + } else { + edges[id] = [void 0, ele.target().id()]; + } + }); + } else { + eles.forEach(function(ele) { + var id = ele.id(); + if (ele.isNode()) { + var d2 = ele.degree(true); + if (d2 % 2) { + if (!oddIn) + oddIn = id; + else if (!oddOut) + oddOut = id; + else + dflag = true; + } + nodes2[id] = []; + ele.connectedEdges().forEach(function(e) { + return nodes2[id].push(e.id()); + }); + } else { + edges[id] = [ele.source().id(), ele.target().id()]; + } + }); + } + var result = { + found: false, + trail: void 0 + }; + if (dflag) + return result; + else if (oddOut && oddIn) { + if (directed) { + if (startVertex && oddOut != startVertex) { + return result; + } + startVertex = oddOut; + } else { + if (startVertex && oddOut != startVertex && oddIn != startVertex) { + return result; + } else if (!startVertex) { + startVertex = oddOut; + } + } + } else { + if (!startVertex) + startVertex = eles[0].id(); + } + var walk = function walk2(v) { + var currentNode = v; + var subtour2 = [v]; + var adj, adjTail, adjHead; + while (nodes2[currentNode].length) { + adj = nodes2[currentNode].shift(); + adjTail = edges[adj][0]; + adjHead = edges[adj][1]; + if (currentNode != adjHead) { + nodes2[adjHead] = nodes2[adjHead].filter(function(e) { + return e != adj; + }); + currentNode = adjHead; + } else if (!directed && currentNode != adjTail) { + nodes2[adjTail] = nodes2[adjTail].filter(function(e) { + return e != adj; + }); + currentNode = adjTail; + } + subtour2.unshift(adj); + subtour2.unshift(currentNode); + } + return subtour2; + }; + var trail = []; + var subtour = []; + subtour = walk(startVertex); + while (subtour.length != 1) { + if (nodes2[subtour[0]].length == 0) { + trail.unshift(eles.getElementById(subtour.shift())); + trail.unshift(eles.getElementById(subtour.shift())); + } else { + subtour = walk(subtour.shift()).concat(subtour); + } + } + trail.unshift(eles.getElementById(subtour.shift())); + for (var d in nodes2) { + if (nodes2[d].length) { + return result; + } + } + result.found = true; + result.trail = this.spawn(trail, true); + return result; + } + }; + var hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected2() { + var eles = this; + var nodes2 = {}; + var id = 0; + var edgeCount = 0; + var components = []; + var stack = []; + var visitedEdges = {}; + var buildComponent = function buildComponent2(x, y) { + var i2 = stack.length - 1; + var cutset = []; + var component = eles.spawn(); + while (stack[i2].x != x || stack[i2].y != y) { + cutset.push(stack.pop().edge); + i2--; + } + cutset.push(stack.pop().edge); + cutset.forEach(function(edge) { + var connectedNodes = edge.connectedNodes().intersection(eles); + component.merge(edge); + connectedNodes.forEach(function(node) { + var nodeId = node.id(); + var connectedEdges = node.connectedEdges().intersection(eles); + component.merge(node); + if (!nodes2[nodeId].cutVertex) { + component.merge(connectedEdges); + } else { + component.merge(connectedEdges.filter(function(edge2) { + return edge2.isLoop(); + })); + } + }); + }); + components.push(component); + }; + var biconnectedSearch = function biconnectedSearch2(root2, currentNode, parent) { + if (root2 === parent) + edgeCount += 1; + nodes2[currentNode] = { + id, + low: id++, + cutVertex: false + }; + var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles); + if (edges.size() === 0) { + components.push(eles.spawn(eles.getElementById(currentNode))); + } else { + var sourceId, targetId, otherNodeId, edgeId; + edges.forEach(function(edge) { + sourceId = edge.source().id(); + targetId = edge.target().id(); + otherNodeId = sourceId === currentNode ? targetId : sourceId; + if (otherNodeId !== parent) { + edgeId = edge.id(); + if (!visitedEdges[edgeId]) { + visitedEdges[edgeId] = true; + stack.push({ + x: currentNode, + y: otherNodeId, + edge + }); + } + if (!(otherNodeId in nodes2)) { + biconnectedSearch2(root2, otherNodeId, currentNode); + nodes2[currentNode].low = Math.min(nodes2[currentNode].low, nodes2[otherNodeId].low); + if (nodes2[currentNode].id <= nodes2[otherNodeId].low) { + nodes2[currentNode].cutVertex = true; + buildComponent(currentNode, otherNodeId); + } + } else { + nodes2[currentNode].low = Math.min(nodes2[currentNode].low, nodes2[otherNodeId].id); + } + } + }); + } + }; + eles.forEach(function(ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes2)) { + edgeCount = 0; + biconnectedSearch(nodeId, nodeId); + nodes2[nodeId].cutVertex = edgeCount > 1; + } + } + }); + var cutVertices = Object.keys(nodes2).filter(function(id2) { + return nodes2[id2].cutVertex; + }).map(function(id2) { + return eles.getElementById(id2); + }); + return { + cut: eles.spawn(cutVertices), + components + }; + }; + var hopcroftTarjanBiconnected$1 = { + hopcroftTarjanBiconnected, + htbc: hopcroftTarjanBiconnected, + htb: hopcroftTarjanBiconnected, + hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected + }; + var tarjanStronglyConnected = function tarjanStronglyConnected2() { + var eles = this; + var nodes2 = {}; + var index = 0; + var components = []; + var stack = []; + var cut = eles.spawn(eles); + var stronglyConnectedSearch = function stronglyConnectedSearch2(sourceNodeId) { + stack.push(sourceNodeId); + nodes2[sourceNodeId] = { + index, + low: index++, + explored: false + }; + var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles); + connectedEdges.forEach(function(edge) { + var targetNodeId = edge.target().id(); + if (targetNodeId !== sourceNodeId) { + if (!(targetNodeId in nodes2)) { + stronglyConnectedSearch2(targetNodeId); + } + if (!nodes2[targetNodeId].explored) { + nodes2[sourceNodeId].low = Math.min(nodes2[sourceNodeId].low, nodes2[targetNodeId].low); + } + } + }); + if (nodes2[sourceNodeId].index === nodes2[sourceNodeId].low) { + var componentNodes = eles.spawn(); + for (; ; ) { + var nodeId = stack.pop(); + componentNodes.merge(eles.getElementById(nodeId)); + nodes2[nodeId].low = nodes2[sourceNodeId].index; + nodes2[nodeId].explored = true; + if (nodeId === sourceNodeId) { + break; + } + } + var componentEdges = componentNodes.edgesWith(componentNodes); + var component = componentNodes.merge(componentEdges); + components.push(component); + cut = cut.difference(component); + } + }; + eles.forEach(function(ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes2)) { + stronglyConnectedSearch(nodeId); + } + } + }); + return { + cut, + components + }; + }; + var tarjanStronglyConnected$1 = { + tarjanStronglyConnected, + tsc: tarjanStronglyConnected, + tscc: tarjanStronglyConnected, + tarjanStronglyConnectedComponents: tarjanStronglyConnected + }; + var elesfn$j = {}; + [elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function(props) { + extend(elesfn$j, props); + }); + /*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + */ + var STATE_PENDING = 0; + var STATE_FULFILLED = 1; + var STATE_REJECTED = 2; + var api = function api2(executor) { + if (!(this instanceof api2)) + return new api2(executor); + this.id = "Thenable/1.0.7"; + this.state = STATE_PENDING; + this.fulfillValue = void 0; + this.rejectReason = void 0; + this.onFulfilled = []; + this.onRejected = []; + this.proxy = { + then: this.then.bind(this) + }; + if (typeof executor === "function") + executor.call(this, this.fulfill.bind(this), this.reject.bind(this)); + }; + api.prototype = { + /* promise resolving methods */ + fulfill: function fulfill(value) { + return deliver(this, STATE_FULFILLED, "fulfillValue", value); + }, + reject: function reject(value) { + return deliver(this, STATE_REJECTED, "rejectReason", value); + }, + /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ + then: function then(onFulfilled, onRejected) { + var curr = this; + var next2 = new api(); + curr.onFulfilled.push(resolver(onFulfilled, next2, "fulfill")); + curr.onRejected.push(resolver(onRejected, next2, "reject")); + execute(curr); + return next2.proxy; + } + }; + var deliver = function deliver2(curr, state, name2, value) { + if (curr.state === STATE_PENDING) { + curr.state = state; + curr[name2] = value; + execute(curr); + } + return curr; + }; + var execute = function execute2(curr) { + if (curr.state === STATE_FULFILLED) + execute_handlers(curr, "onFulfilled", curr.fulfillValue); + else if (curr.state === STATE_REJECTED) + execute_handlers(curr, "onRejected", curr.rejectReason); + }; + var execute_handlers = function execute_handlers2(curr, name2, value) { + if (curr[name2].length === 0) + return; + var handlers = curr[name2]; + curr[name2] = []; + var func = function func2() { + for (var i2 = 0; i2 < handlers.length; i2++) { + handlers[i2](value); + } + }; + if (typeof setImmediate === "function") + setImmediate(func); + else + setTimeout(func, 0); + }; + var resolver = function resolver2(cb, next2, method) { + return function(value) { + if (typeof cb !== "function") + next2[method].call(next2, value); + else { + var result; + try { + result = cb(value); + } catch (e) { + next2.reject(e); + return; + } + resolve(next2, result); + } + }; + }; + var resolve = function resolve2(promise2, x) { + if (promise2 === x || promise2.proxy === x) { + promise2.reject(new TypeError("cannot resolve promise with itself")); + return; + } + var then; + if (_typeof(x) === "object" && x !== null || typeof x === "function") { + try { + then = x.then; + } catch (e) { + promise2.reject(e); + return; + } + } + if (typeof then === "function") { + var resolved = false; + try { + then.call( + x, + /* resolvePromise */ + /* [Promises/A+ 2.3.3.3.1] */ + function(y) { + if (resolved) + return; + resolved = true; + if (y === x) + promise2.reject(new TypeError("circular thenable chain")); + else + resolve2(promise2, y); + }, + /* rejectPromise */ + /* [Promises/A+ 2.3.3.3.2] */ + function(r) { + if (resolved) + return; + resolved = true; + promise2.reject(r); + } + ); + } catch (e) { + if (!resolved) + promise2.reject(e); + } + return; + } + promise2.fulfill(x); + }; + api.all = function(ps) { + return new api(function(resolveAll, rejectAll) { + var vals = new Array(ps.length); + var doneCount = 0; + var fulfill = function fulfill2(i3, val) { + vals[i3] = val; + doneCount++; + if (doneCount === ps.length) { + resolveAll(vals); + } + }; + for (var i2 = 0; i2 < ps.length; i2++) { + (function(i3) { + var p2 = ps[i3]; + var isPromise = p2 != null && p2.then != null; + if (isPromise) { + p2.then(function(val2) { + fulfill(i3, val2); + }, function(err) { + rejectAll(err); + }); + } else { + var val = p2; + fulfill(i3, val); + } + })(i2); + } + }); + }; + api.resolve = function(val) { + return new api(function(resolve2, reject) { + resolve2(val); + }); + }; + api.reject = function(val) { + return new api(function(resolve2, reject) { + reject(val); + }); + }; + var Promise$1 = typeof Promise !== "undefined" ? Promise : api; + var Animation = function Animation2(target, opts, opts2) { + var isCore = core(target); + var isEle = !isCore; + var _p = this._private = extend({ + duration: 1e3 + }, opts, opts2); + _p.target = target; + _p.style = _p.style || _p.css; + _p.started = false; + _p.playing = false; + _p.hooked = false; + _p.applying = false; + _p.progress = 0; + _p.completes = []; + _p.frames = []; + if (_p.complete && fn$6(_p.complete)) { + _p.completes.push(_p.complete); + } + if (isEle) { + var pos = target.position(); + _p.startPosition = _p.startPosition || { + x: pos.x, + y: pos.y + }; + _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style); + } + if (isCore) { + var pan = target.pan(); + _p.startPan = { + x: pan.x, + y: pan.y + }; + _p.startZoom = target.zoom(); + } + this.length = 1; + this[0] = this; + }; + var anifn = Animation.prototype; + extend(anifn, { + instanceString: function instanceString() { + return "animation"; + }, + hook: function hook() { + var _p = this._private; + if (!_p.hooked) { + var q; + var tAni = _p.target._private.animation; + if (_p.queue) { + q = tAni.queue; + } else { + q = tAni.current; + } + q.push(this); + if (elementOrCollection(_p.target)) { + _p.target.cy().addToAnimationPool(_p.target); + } + _p.hooked = true; + } + return this; + }, + play: function play() { + var _p = this._private; + if (_p.progress === 1) { + _p.progress = 0; + } + _p.playing = true; + _p.started = false; + _p.stopped = false; + this.hook(); + return this; + }, + playing: function playing() { + return this._private.playing; + }, + apply: function apply() { + var _p = this._private; + _p.applying = true; + _p.started = false; + _p.stopped = false; + this.hook(); + return this; + }, + applying: function applying() { + return this._private.applying; + }, + pause: function pause() { + var _p = this._private; + _p.playing = false; + _p.started = false; + return this; + }, + stop: function stop() { + var _p = this._private; + _p.playing = false; + _p.started = false; + _p.stopped = true; + return this; + }, + rewind: function rewind() { + return this.progress(0); + }, + fastforward: function fastforward() { + return this.progress(1); + }, + time: function time(t) { + var _p = this._private; + if (t === void 0) { + return _p.progress * _p.duration; + } else { + return this.progress(t / _p.duration); + } + }, + progress: function progress(p2) { + var _p = this._private; + var wasPlaying = _p.playing; + if (p2 === void 0) { + return _p.progress; + } else { + if (wasPlaying) { + this.pause(); + } + _p.progress = p2; + _p.started = false; + if (wasPlaying) { + this.play(); + } + } + return this; + }, + completed: function completed() { + return this._private.progress === 1; + }, + reverse: function reverse() { + var _p = this._private; + var wasPlaying = _p.playing; + if (wasPlaying) { + this.pause(); + } + _p.progress = 1 - _p.progress; + _p.started = false; + var swap = function swap2(a, b) { + var _pa = _p[a]; + if (_pa == null) { + return; + } + _p[a] = _p[b]; + _p[b] = _pa; + }; + swap("zoom", "startZoom"); + swap("pan", "startPan"); + swap("position", "startPosition"); + if (_p.style) { + for (var i2 = 0; i2 < _p.style.length; i2++) { + var prop = _p.style[i2]; + var name2 = prop.name; + var startStyleProp = _p.startStyle[name2]; + _p.startStyle[name2] = prop; + _p.style[i2] = startStyleProp; + } + } + if (wasPlaying) { + this.play(); + } + return this; + }, + promise: function promise2(type) { + var _p = this._private; + var arr; + switch (type) { + case "frame": + arr = _p.frames; + break; + default: + case "complete": + case "completed": + arr = _p.completes; + } + return new Promise$1(function(resolve2, reject) { + arr.push(function() { + resolve2(); + }); + }); + } + }); + anifn.complete = anifn.completed; + anifn.run = anifn.play; + anifn.running = anifn.playing; + var define$3 = { + animated: function animated() { + return function animatedImpl() { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return false; + } + var ele = all[0]; + if (ele) { + return ele._private.animation.current.length > 0; + } + }; + }, + // animated + clearQueue: function clearQueue() { + return function clearQueueImpl() { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i2 = 0; i2 < all.length; i2++) { + var ele = all[i2]; + ele._private.animation.queue = []; + } + return this; + }; + }, + // clearQueue + delay: function delay() { + return function delayImpl(time, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animate({ + delay: time, + duration: time, + complete + }); + }; + }, + // delay + delayAnimation: function delayAnimation() { + return function delayAnimationImpl(time, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animation({ + delay: time, + duration: time, + complete + }); + }; + }, + // delay + animation: function animation() { + return function animationImpl(properties, params) { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + var isCore = !selfIsArrayLike; + var isEles = !isCore; + if (!cy.styleEnabled()) { + return this; + } + var style = cy.style(); + properties = extend({}, properties, params); + var propertiesEmpty = Object.keys(properties).length === 0; + if (propertiesEmpty) { + return new Animation(all[0], properties); + } + if (properties.duration === void 0) { + properties.duration = 400; + } + switch (properties.duration) { + case "slow": + properties.duration = 600; + break; + case "fast": + properties.duration = 200; + break; + } + if (isEles) { + properties.style = style.getPropsList(properties.style || properties.css); + properties.css = void 0; + } + if (isEles && properties.renderedPosition != null) { + var rpos = properties.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + properties.position = renderedToModelPosition(rpos, zoom, pan); + } + if (isCore && properties.panBy != null) { + var panBy = properties.panBy; + var cyPan = cy.pan(); + properties.pan = { + x: cyPan.x + panBy.x, + y: cyPan.y + panBy.y + }; + } + var center = properties.center || properties.centre; + if (isCore && center != null) { + var centerPan = cy.getCenterPan(center.eles, properties.zoom); + if (centerPan != null) { + properties.pan = centerPan; + } + } + if (isCore && properties.fit != null) { + var fit = properties.fit; + var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding); + if (fitVp != null) { + properties.pan = fitVp.pan; + properties.zoom = fitVp.zoom; + } + } + if (isCore && plainObject(properties.zoom)) { + var vp = cy.getZoomedViewport(properties.zoom); + if (vp != null) { + if (vp.zoomed) { + properties.zoom = vp.zoom; + } + if (vp.panned) { + properties.pan = vp.pan; + } + } else { + properties.zoom = null; + } + } + return new Animation(all[0], properties); + }; + }, + // animate + animate: function animate() { + return function animateImpl(properties, params) { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + if (params) { + properties = extend({}, properties, params); + } + for (var i2 = 0; i2 < all.length; i2++) { + var ele = all[i2]; + var queue = ele.animated() && (properties.queue === void 0 || properties.queue); + var ani = ele.animation(properties, queue ? { + queue: true + } : void 0); + ani.play(); + } + return this; + }; + }, + // animate + stop: function stop() { + return function stopImpl(clearQueue, jumpToEnd) { + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all = selfIsArrayLike ? self2 : [self2]; + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i2 = 0; i2 < all.length; i2++) { + var ele = all[i2]; + var _p = ele._private; + var anis = _p.animation.current; + for (var j = 0; j < anis.length; j++) { + var ani = anis[j]; + var ani_p = ani._private; + if (jumpToEnd) { + ani_p.duration = 0; + } + } + if (clearQueue) { + _p.animation.queue = []; + } + if (!jumpToEnd) { + _p.animation.current = []; + } + } + cy.notify("draw"); + return this; + }; + } + // stop + }; + var isArray = Array.isArray; + var isArray_1 = isArray; + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; + function isKey(value, object2) { + if (isArray_1(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_1(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object2 != null && value in Object(object2); + } + var _isKey = isKey; + var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; + function isFunction(value) { + if (!isObject_1(value)) { + return false; + } + var tag = _baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + var isFunction_1 = isFunction; + var coreJsData = _root["__core-js_shared__"]; + var _coreJsData = coreJsData; + var maskSrcKey = function() { + var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + var _isMasked = isMasked; + var funcProto$1 = Function.prototype; + var funcToString$1 = funcProto$1.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString$1.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var _toSource = toSource; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var funcProto = Function.prototype, objectProto$3 = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty$3 = objectProto$3.hasOwnProperty; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + function baseIsNative(value) { + if (!isObject_1(value) || _isMasked(value)) { + return false; + } + var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor; + return pattern.test(_toSource(value)); + } + var _baseIsNative = baseIsNative; + function getValue$1(object2, key) { + return object2 == null ? void 0 : object2[key]; + } + var _getValue = getValue$1; + function getNative(object2, key) { + var value = _getValue(object2, key); + return _baseIsNative(value) ? value : void 0; + } + var _getNative = getNative; + var nativeCreate = _getNative(Object, "create"); + var _nativeCreate = nativeCreate; + function hashClear() { + this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; + this.size = 0; + } + var _hashClear = hashClear; + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + var _hashDelete = hashDelete; + var HASH_UNDEFINED$1 = "__lodash_hash_undefined__"; + var objectProto$2 = Object.prototype; + var hasOwnProperty$2 = objectProto$2.hasOwnProperty; + function hashGet(key) { + var data2 = this.__data__; + if (_nativeCreate) { + var result = data2[key]; + return result === HASH_UNDEFINED$1 ? void 0 : result; + } + return hasOwnProperty$2.call(data2, key) ? data2[key] : void 0; + } + var _hashGet = hashGet; + var objectProto$1 = Object.prototype; + var hasOwnProperty$1 = objectProto$1.hasOwnProperty; + function hashHas(key) { + var data2 = this.__data__; + return _nativeCreate ? data2[key] !== void 0 : hasOwnProperty$1.call(data2, key); + } + var _hashHas = hashHas; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function hashSet(key, value) { + var data2 = this.__data__; + this.size += this.has(key) ? 0 : 1; + data2[key] = _nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + var _hashSet = hashSet; + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + Hash.prototype.clear = _hashClear; + Hash.prototype["delete"] = _hashDelete; + Hash.prototype.get = _hashGet; + Hash.prototype.has = _hashHas; + Hash.prototype.set = _hashSet; + var _Hash = Hash; + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + var _listCacheClear = listCacheClear; + function eq(value, other) { + return value === other || value !== value && other !== other; + } + var eq_1 = eq; + function assocIndexOf(array2, key) { + var length = array2.length; + while (length--) { + if (eq_1(array2[length][0], key)) { + return length; + } + } + return -1; + } + var _assocIndexOf = assocIndexOf; + var arrayProto = Array.prototype; + var splice = arrayProto.splice; + function listCacheDelete(key) { + var data2 = this.__data__, index = _assocIndexOf(data2, key); + if (index < 0) { + return false; + } + var lastIndex = data2.length - 1; + if (index == lastIndex) { + data2.pop(); + } else { + splice.call(data2, index, 1); + } + --this.size; + return true; + } + var _listCacheDelete = listCacheDelete; + function listCacheGet(key) { + var data2 = this.__data__, index = _assocIndexOf(data2, key); + return index < 0 ? void 0 : data2[index][1]; + } + var _listCacheGet = listCacheGet; + function listCacheHas(key) { + return _assocIndexOf(this.__data__, key) > -1; + } + var _listCacheHas = listCacheHas; + function listCacheSet(key, value) { + var data2 = this.__data__, index = _assocIndexOf(data2, key); + if (index < 0) { + ++this.size; + data2.push([key, value]); + } else { + data2[index][1] = value; + } + return this; + } + var _listCacheSet = listCacheSet; + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + ListCache.prototype.clear = _listCacheClear; + ListCache.prototype["delete"] = _listCacheDelete; + ListCache.prototype.get = _listCacheGet; + ListCache.prototype.has = _listCacheHas; + ListCache.prototype.set = _listCacheSet; + var _ListCache = ListCache; + var Map$1 = _getNative(_root, "Map"); + var _Map = Map$1; + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new _Hash(), + "map": new (_Map || _ListCache)(), + "string": new _Hash() + }; + } + var _mapCacheClear = mapCacheClear; + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + var _isKeyable = isKeyable; + function getMapData(map, key) { + var data2 = map.__data__; + return _isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map; + } + var _getMapData = getMapData; + function mapCacheDelete(key) { + var result = _getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + var _mapCacheDelete = mapCacheDelete; + function mapCacheGet(key) { + return _getMapData(this, key).get(key); + } + var _mapCacheGet = mapCacheGet; + function mapCacheHas(key) { + return _getMapData(this, key).has(key); + } + var _mapCacheHas = mapCacheHas; + function mapCacheSet(key, value) { + var data2 = _getMapData(this, key), size = data2.size; + data2.set(key, value); + this.size += data2.size == size ? 0 : 1; + return this; + } + var _mapCacheSet = mapCacheSet; + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + MapCache.prototype.clear = _mapCacheClear; + MapCache.prototype["delete"] = _mapCacheDelete; + MapCache.prototype.get = _mapCacheGet; + MapCache.prototype.has = _mapCacheHas; + MapCache.prototype.set = _mapCacheSet; + var _MapCache = MapCache; + var FUNC_ERROR_TEXT = "Expected a function"; + function memoize(func, resolver2) { + if (typeof func != "function" || resolver2 != null && typeof resolver2 != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver2 ? resolver2.apply(this, args) : args[0], cache2 = memoized.cache; + if (cache2.has(key)) { + return cache2.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache2.set(key, result) || cache2; + return result; + }; + memoized.cache = new (memoize.Cache || _MapCache)(); + return memoized; + } + memoize.Cache = _MapCache; + var memoize_1 = memoize; + var MAX_MEMOIZE_SIZE = 500; + function memoizeCapped(func) { + var result = memoize_1(func, function(key) { + if (cache2.size === MAX_MEMOIZE_SIZE) { + cache2.clear(); + } + return key; + }); + var cache2 = result.cache; + return result; + } + var _memoizeCapped = memoizeCapped; + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = _memoizeCapped(function(string2) { + var result = []; + if (string2.charCodeAt(0) === 46) { + result.push(""); + } + string2.replace(rePropName, function(match2, number2, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number2 || match2); + }); + return result; + }); + var _stringToPath = stringToPath; + function arrayMap(array2, iteratee) { + var index = -1, length = array2 == null ? 0 : array2.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array2[index], index, array2); + } + return result; + } + var _arrayMap = arrayMap; + var INFINITY$1 = 1 / 0; + var symbolProto = _Symbol ? _Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray_1(value)) { + return _arrayMap(value, baseToString) + ""; + } + if (isSymbol_1(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result; + } + var _baseToString = baseToString; + function toString$1(value) { + return value == null ? "" : _baseToString(value); + } + var toString_1 = toString$1; + function castPath(value, object2) { + if (isArray_1(value)) { + return value; + } + return _isKey(value, object2) ? [value] : _stringToPath(toString_1(value)); + } + var _castPath = castPath; + var INFINITY = 1 / 0; + function toKey(value) { + if (typeof value == "string" || isSymbol_1(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + var _toKey = toKey; + function baseGet(object2, path) { + path = _castPath(path, object2); + var index = 0, length = path.length; + while (object2 != null && index < length) { + object2 = object2[_toKey(path[index++])]; + } + return index && index == length ? object2 : void 0; + } + var _baseGet = baseGet; + function get(object2, path, defaultValue) { + var result = object2 == null ? void 0 : _baseGet(object2, path); + return result === void 0 ? defaultValue : result; + } + var get_1 = get; + var defineProperty = function() { + try { + var func = _getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + var _defineProperty = defineProperty; + function baseAssignValue(object2, key, value) { + if (key == "__proto__" && _defineProperty) { + _defineProperty(object2, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object2[key] = value; + } + } + var _baseAssignValue = baseAssignValue; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function assignValue(object2, key, value) { + var objValue = object2[key]; + if (!(hasOwnProperty.call(object2, key) && eq_1(objValue, value)) || value === void 0 && !(key in object2)) { + _baseAssignValue(object2, key, value); + } + } + var _assignValue = assignValue; + var MAX_SAFE_INTEGER = 9007199254740991; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + var _isIndex = isIndex; + function baseSet(object2, path, value, customizer) { + if (!isObject_1(object2)) { + return object2; + } + path = _castPath(path, object2); + var index = -1, length = path.length, lastIndex = length - 1, nested = object2; + while (nested != null && ++index < length) { + var key = _toKey(path[index]), newValue = value; + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return object2; + } + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : void 0; + if (newValue === void 0) { + newValue = isObject_1(objValue) ? objValue : _isIndex(path[index + 1]) ? [] : {}; + } + } + _assignValue(nested, key, newValue); + nested = nested[key]; + } + return object2; + } + var _baseSet = baseSet; + function set(object2, path, value) { + return object2 == null ? object2 : _baseSet(object2, path, value); + } + var set_1 = set; + function copyArray(source, array2) { + var index = -1, length = source.length; + array2 || (array2 = Array(length)); + while (++index < length) { + array2[index] = source[index]; + } + return array2; + } + var _copyArray = copyArray; + function toPath(value) { + if (isArray_1(value)) { + return _arrayMap(value, _toKey); + } + return isSymbol_1(value) ? [value] : _copyArray(_stringToPath(toString_1(value))); + } + var toPath_1 = toPath; + var define$2 = { + // access data field + data: function data2(params) { + var defaults2 = { + field: "data", + bindingEvent: "data", + allowBinding: false, + allowSetting: false, + allowGetting: false, + settingEvent: "data", + settingTriggersEvent: false, + triggerFnName: "trigger", + immutableKeys: {}, + // key => true if immutable + updateStyle: false, + beforeGet: function beforeGet(self2) { + }, + beforeSet: function beforeSet(self2, obj) { + }, + onSet: function onSet(self2) { + }, + canSet: function canSet(self2) { + return true; + } + }; + params = extend({}, defaults2, params); + return function dataImpl(name2, value) { + var p2 = params; + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all = selfIsArrayLike ? self2 : [self2]; + var single = selfIsArrayLike ? self2[0] : self2; + if (string(name2)) { + var isPathLike = name2.indexOf(".") !== -1; + var path = isPathLike && toPath_1(name2); + if (p2.allowGetting && value === void 0) { + var ret; + if (single) { + p2.beforeGet(single); + if (path && single._private[p2.field][name2] === void 0) { + ret = get_1(single._private[p2.field], path); + } else { + ret = single._private[p2.field][name2]; + } + } + return ret; + } else if (p2.allowSetting && value !== void 0) { + var valid2 = !p2.immutableKeys[name2]; + if (valid2) { + var change = _defineProperty$1({}, name2, value); + p2.beforeSet(self2, change); + for (var i2 = 0, l = all.length; i2 < l; i2++) { + var ele = all[i2]; + if (p2.canSet(ele)) { + if (path && single._private[p2.field][name2] === void 0) { + set_1(ele._private[p2.field], path, value); + } else { + ele._private[p2.field][name2] = value; + } + } + } + if (p2.updateStyle) { + self2.updateStyle(); + } + p2.onSet(self2); + if (p2.settingTriggersEvent) { + self2[p2.triggerFnName](p2.settingEvent); + } + } + } + } else if (p2.allowSetting && plainObject(name2)) { + var obj = name2; + var k, v; + var keys = Object.keys(obj); + p2.beforeSet(self2, obj); + for (var _i = 0; _i < keys.length; _i++) { + k = keys[_i]; + v = obj[k]; + var _valid = !p2.immutableKeys[k]; + if (_valid) { + for (var j = 0; j < all.length; j++) { + var _ele = all[j]; + if (p2.canSet(_ele)) { + _ele._private[p2.field][k] = v; + } + } + } + } + if (p2.updateStyle) { + self2.updateStyle(); + } + p2.onSet(self2); + if (p2.settingTriggersEvent) { + self2[p2.triggerFnName](p2.settingEvent); + } + } else if (p2.allowBinding && fn$6(name2)) { + var fn2 = name2; + self2.on(p2.bindingEvent, fn2); + } else if (p2.allowGetting && name2 === void 0) { + var _ret; + if (single) { + p2.beforeGet(single); + _ret = single._private[p2.field]; + } + return _ret; + } + return self2; + }; + }, + // data + // remove data field + removeData: function removeData(params) { + var defaults2 = { + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: false, + immutableKeys: {} + // key => true if immutable + }; + params = extend({}, defaults2, params); + return function removeDataImpl(names) { + var p2 = params; + var self2 = this; + var selfIsArrayLike = self2.length !== void 0; + var all = selfIsArrayLike ? self2 : [self2]; + if (string(names)) { + var keys = names.split(/\s+/); + var l = keys.length; + for (var i2 = 0; i2 < l; i2++) { + var key = keys[i2]; + if (emptyString(key)) { + continue; + } + var valid2 = !p2.immutableKeys[key]; + if (valid2) { + for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) { + all[i_a]._private[p2.field][key] = void 0; + } + } + } + if (p2.triggerEvent) { + self2[p2.triggerFnName](p2.event); + } + } else if (names === void 0) { + for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) { + var _privateFields = all[_i_a]._private[p2.field]; + var _keys = Object.keys(_privateFields); + for (var _i2 = 0; _i2 < _keys.length; _i2++) { + var _key = _keys[_i2]; + var validKeyToDelete = !p2.immutableKeys[_key]; + if (validKeyToDelete) { + _privateFields[_key] = void 0; + } + } + } + if (p2.triggerEvent) { + self2[p2.triggerFnName](p2.event); + } + } + return self2; + }; + } + // removeData + }; + var define$1 = { + eventAliasesOn: function eventAliasesOn(proto) { + var p2 = proto; + p2.addListener = p2.listen = p2.bind = p2.on; + p2.unlisten = p2.unbind = p2.off = p2.removeListener; + p2.trigger = p2.emit; + p2.pon = p2.promiseOn = function(events, selector) { + var self2 = this; + var args = Array.prototype.slice.call(arguments, 0); + return new Promise$1(function(resolve2, reject) { + var callback = function callback2(e) { + self2.off.apply(self2, offArgs); + resolve2(e); + }; + var onArgs = args.concat([callback]); + var offArgs = onArgs.concat([]); + self2.on.apply(self2, onArgs); + }); + }; + } + }; + var define = {}; + [define$3, define$2, define$1].forEach(function(m) { + extend(define, m); + }); + var elesfn$i = { + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop() + }; + var elesfn$h = { + classes: function classes(_classes) { + var self2 = this; + if (_classes === void 0) { + var ret = []; + self2[0]._private.classes.forEach(function(cls2) { + return ret.push(cls2); + }); + return ret; + } else if (!array(_classes)) { + _classes = (_classes || "").match(/\S+/g) || []; + } + var changed = []; + var classesSet = new Set$1(_classes); + for (var j = 0; j < self2.length; j++) { + var ele = self2[j]; + var _p = ele._private; + var eleClasses = _p.classes; + var changedEle = false; + for (var i2 = 0; i2 < _classes.length; i2++) { + var cls = _classes[i2]; + var eleHasClass = eleClasses.has(cls); + if (!eleHasClass) { + changedEle = true; + break; + } + } + if (!changedEle) { + changedEle = eleClasses.size !== _classes.length; + } + if (changedEle) { + _p.classes = classesSet; + changed.push(ele); + } + } + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit("class"); + } + return self2; + }, + addClass: function addClass(classes) { + return this.toggleClass(classes, true); + }, + hasClass: function hasClass(className) { + var ele = this[0]; + return ele != null && ele._private.classes.has(className); + }, + toggleClass: function toggleClass(classes, toggle) { + if (!array(classes)) { + classes = classes.match(/\S+/g) || []; + } + var self2 = this; + var toggleUndefd = toggle === void 0; + var changed = []; + for (var i2 = 0, il = self2.length; i2 < il; i2++) { + var ele = self2[i2]; + var eleClasses = ele._private.classes; + var changedEle = false; + for (var j = 0; j < classes.length; j++) { + var cls = classes[j]; + var hasClass = eleClasses.has(cls); + var changedNow = false; + if (toggle || toggleUndefd && !hasClass) { + eleClasses.add(cls); + changedNow = true; + } else if (!toggle || toggleUndefd && hasClass) { + eleClasses["delete"](cls); + changedNow = true; + } + if (!changedEle && changedNow) { + changed.push(ele); + changedEle = true; + } + } + } + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit("class"); + } + return self2; + }, + removeClass: function removeClass(classes) { + return this.toggleClass(classes, false); + }, + flashClass: function flashClass(classes, duration) { + var self2 = this; + if (duration == null) { + duration = 250; + } else if (duration === 0) { + return self2; + } + self2.addClass(classes); + setTimeout(function() { + self2.removeClass(classes); + }, duration); + return self2; + } + }; + elesfn$h.className = elesfn$h.classNames = elesfn$h.classes; + var tokens = { + metaChar: "[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]", + // chars we need to escape in let names, etc + comparatorOp: "=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=", + // binary comparison op (used in data selectors) + boolOp: "\\?|\\!|\\^", + // boolean (unary) operators (used in data selectors) + string: `"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`, + // string literals (used in data selectors) -- doublequotes | singlequotes + number, + // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 + meta: "degree|indegree|outdegree", + // allowed metadata fields (i.e. allowed functions to use from Collection) + separator: "\\s*,\\s*", + // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass + descendant: "\\s+", + child: "\\s+>\\s+", + subject: "\\$", + group: "node|edge|\\*", + directedEdge: "\\s+->\\s+", + undirectedEdge: "\\s+<->\\s+" + }; + tokens.variable = "(?:[\\w-.]|(?:\\\\" + tokens.metaChar + "))+"; + tokens.className = "(?:[\\w-]|(?:\\\\" + tokens.metaChar + "))+"; + tokens.value = tokens.string + "|" + tokens.number; + tokens.id = tokens.variable; + (function() { + var ops, op, i2; + ops = tokens.comparatorOp.split("|"); + for (i2 = 0; i2 < ops.length; i2++) { + op = ops[i2]; + tokens.comparatorOp += "|@" + op; + } + ops = tokens.comparatorOp.split("|"); + for (i2 = 0; i2 < ops.length; i2++) { + op = ops[i2]; + if (op.indexOf("!") >= 0) { + continue; + } + if (op === "=") { + continue; + } + tokens.comparatorOp += "|\\!" + op; + } + })(); + var newQuery = function newQuery2() { + return { + checks: [] + }; + }; + var Type = { + /** E.g. node */ + GROUP: 0, + /** A collection of elements */ + COLLECTION: 1, + /** A filter(ele) function */ + FILTER: 2, + /** E.g. [foo > 1] */ + DATA_COMPARE: 3, + /** E.g. [foo] */ + DATA_EXIST: 4, + /** E.g. [?foo] */ + DATA_BOOL: 5, + /** E.g. [[degree > 2]] */ + META_COMPARE: 6, + /** E.g. :selected */ + STATE: 7, + /** E.g. #foo */ + ID: 8, + /** E.g. .foo */ + CLASS: 9, + /** E.g. #foo <-> #bar */ + UNDIRECTED_EDGE: 10, + /** E.g. #foo -> #bar */ + DIRECTED_EDGE: 11, + /** E.g. $#foo -> #bar */ + NODE_SOURCE: 12, + /** E.g. #foo -> $#bar */ + NODE_TARGET: 13, + /** E.g. $#foo <-> #bar */ + NODE_NEIGHBOR: 14, + /** E.g. #foo > #bar */ + CHILD: 15, + /** E.g. #foo #bar */ + DESCENDANT: 16, + /** E.g. $#foo > #bar */ + PARENT: 17, + /** E.g. $#foo #bar */ + ANCESTOR: 18, + /** E.g. #foo > $bar > #baz */ + COMPOUND_SPLIT: 19, + /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ + TRUE: 20 + }; + var stateSelectors = [{ + selector: ":selected", + matches: function matches2(ele) { + return ele.selected(); + } + }, { + selector: ":unselected", + matches: function matches2(ele) { + return !ele.selected(); + } + }, { + selector: ":selectable", + matches: function matches2(ele) { + return ele.selectable(); + } + }, { + selector: ":unselectable", + matches: function matches2(ele) { + return !ele.selectable(); + } + }, { + selector: ":locked", + matches: function matches2(ele) { + return ele.locked(); + } + }, { + selector: ":unlocked", + matches: function matches2(ele) { + return !ele.locked(); + } + }, { + selector: ":visible", + matches: function matches2(ele) { + return ele.visible(); + } + }, { + selector: ":hidden", + matches: function matches2(ele) { + return !ele.visible(); + } + }, { + selector: ":transparent", + matches: function matches2(ele) { + return ele.transparent(); + } + }, { + selector: ":grabbed", + matches: function matches2(ele) { + return ele.grabbed(); + } + }, { + selector: ":free", + matches: function matches2(ele) { + return !ele.grabbed(); + } + }, { + selector: ":removed", + matches: function matches2(ele) { + return ele.removed(); + } + }, { + selector: ":inside", + matches: function matches2(ele) { + return !ele.removed(); + } + }, { + selector: ":grabbable", + matches: function matches2(ele) { + return ele.grabbable(); + } + }, { + selector: ":ungrabbable", + matches: function matches2(ele) { + return !ele.grabbable(); + } + }, { + selector: ":animated", + matches: function matches2(ele) { + return ele.animated(); + } + }, { + selector: ":unanimated", + matches: function matches2(ele) { + return !ele.animated(); + } + }, { + selector: ":parent", + matches: function matches2(ele) { + return ele.isParent(); + } + }, { + selector: ":childless", + matches: function matches2(ele) { + return ele.isChildless(); + } + }, { + selector: ":child", + matches: function matches2(ele) { + return ele.isChild(); + } + }, { + selector: ":orphan", + matches: function matches2(ele) { + return ele.isOrphan(); + } + }, { + selector: ":nonorphan", + matches: function matches2(ele) { + return ele.isChild(); + } + }, { + selector: ":compound", + matches: function matches2(ele) { + if (ele.isNode()) { + return ele.isParent(); + } else { + return ele.source().isParent() || ele.target().isParent(); + } + } + }, { + selector: ":loop", + matches: function matches2(ele) { + return ele.isLoop(); + } + }, { + selector: ":simple", + matches: function matches2(ele) { + return ele.isSimple(); + } + }, { + selector: ":active", + matches: function matches2(ele) { + return ele.active(); + } + }, { + selector: ":inactive", + matches: function matches2(ele) { + return !ele.active(); + } + }, { + selector: ":backgrounding", + matches: function matches2(ele) { + return ele.backgrounding(); + } + }, { + selector: ":nonbackgrounding", + matches: function matches2(ele) { + return !ele.backgrounding(); + } + }].sort(function(a, b) { + return descending(a.selector, b.selector); + }); + var lookup = function() { + var selToFn = {}; + var s; + for (var i2 = 0; i2 < stateSelectors.length; i2++) { + s = stateSelectors[i2]; + selToFn[s.selector] = s.matches; + } + return selToFn; + }(); + var stateSelectorMatches = function stateSelectorMatches2(sel, ele) { + return lookup[sel](ele); + }; + var stateSelectorRegex = "(" + stateSelectors.map(function(s) { + return s.selector; + }).join("|") + ")"; + var cleanMetaChars = function cleanMetaChars2(str) { + return str.replace(new RegExp("\\\\(" + tokens.metaChar + ")", "g"), function(match2, $1) { + return $1; + }); + }; + var replaceLastQuery = function replaceLastQuery2(selector, examiningQuery, replacementQuery) { + selector[selector.length - 1] = replacementQuery; + }; + var exprs = [{ + name: "group", + // just used for identifying when debugging + query: true, + regex: "(" + tokens.group + ")", + populate: function populate(selector, query, _ref) { + var _ref2 = _slicedToArray(_ref, 1), group = _ref2[0]; + query.checks.push({ + type: Type.GROUP, + value: group === "*" ? group : group + "s" + }); + } + }, { + name: "state", + query: true, + regex: stateSelectorRegex, + populate: function populate(selector, query, _ref3) { + var _ref4 = _slicedToArray(_ref3, 1), state = _ref4[0]; + query.checks.push({ + type: Type.STATE, + value: state + }); + } + }, { + name: "id", + query: true, + regex: "\\#(" + tokens.id + ")", + populate: function populate(selector, query, _ref5) { + var _ref6 = _slicedToArray(_ref5, 1), id = _ref6[0]; + query.checks.push({ + type: Type.ID, + value: cleanMetaChars(id) + }); + } + }, { + name: "className", + query: true, + regex: "\\.(" + tokens.className + ")", + populate: function populate(selector, query, _ref7) { + var _ref8 = _slicedToArray(_ref7, 1), className = _ref8[0]; + query.checks.push({ + type: Type.CLASS, + value: cleanMetaChars(className) + }); + } + }, { + name: "dataExists", + query: true, + regex: "\\[\\s*(" + tokens.variable + ")\\s*\\]", + populate: function populate(selector, query, _ref9) { + var _ref10 = _slicedToArray(_ref9, 1), variable = _ref10[0]; + query.checks.push({ + type: Type.DATA_EXIST, + field: cleanMetaChars(variable) + }); + } + }, { + name: "dataCompare", + query: true, + regex: "\\[\\s*(" + tokens.variable + ")\\s*(" + tokens.comparatorOp + ")\\s*(" + tokens.value + ")\\s*\\]", + populate: function populate(selector, query, _ref11) { + var _ref12 = _slicedToArray(_ref11, 3), variable = _ref12[0], comparatorOp = _ref12[1], value = _ref12[2]; + var valueIsString = new RegExp("^" + tokens.string + "$").exec(value) != null; + if (valueIsString) { + value = value.substring(1, value.length - 1); + } else { + value = parseFloat(value); + } + query.checks.push({ + type: Type.DATA_COMPARE, + field: cleanMetaChars(variable), + operator: comparatorOp, + value + }); + } + }, { + name: "dataBool", + query: true, + regex: "\\[\\s*(" + tokens.boolOp + ")\\s*(" + tokens.variable + ")\\s*\\]", + populate: function populate(selector, query, _ref13) { + var _ref14 = _slicedToArray(_ref13, 2), boolOp = _ref14[0], variable = _ref14[1]; + query.checks.push({ + type: Type.DATA_BOOL, + field: cleanMetaChars(variable), + operator: boolOp + }); + } + }, { + name: "metaCompare", + query: true, + regex: "\\[\\[\\s*(" + tokens.meta + ")\\s*(" + tokens.comparatorOp + ")\\s*(" + tokens.number + ")\\s*\\]\\]", + populate: function populate(selector, query, _ref15) { + var _ref16 = _slicedToArray(_ref15, 3), meta2 = _ref16[0], comparatorOp = _ref16[1], number2 = _ref16[2]; + query.checks.push({ + type: Type.META_COMPARE, + field: cleanMetaChars(meta2), + operator: comparatorOp, + value: parseFloat(number2) + }); + } + }, { + name: "nextQuery", + separator: true, + regex: tokens.separator, + populate: function populate(selector, query) { + var currentSubject = selector.currentSubject; + var edgeCount = selector.edgeCount; + var compoundCount = selector.compoundCount; + var lastQ = selector[selector.length - 1]; + if (currentSubject != null) { + lastQ.subject = currentSubject; + selector.currentSubject = null; + } + lastQ.edgeCount = edgeCount; + lastQ.compoundCount = compoundCount; + selector.edgeCount = 0; + selector.compoundCount = 0; + var nextQuery = selector[selector.length++] = newQuery(); + return nextQuery; + } + }, { + name: "directedEdge", + separator: true, + regex: tokens.directedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.DIRECTED_EDGE, + source, + target + }); + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; + return target; + } else { + var srcTgtQ = newQuery(); + var _source = query; + var _target = newQuery(); + srcTgtQ.checks.push({ + type: Type.NODE_SOURCE, + source: _source, + target: _target + }); + replaceLastQuery(selector, query, srcTgtQ); + selector.edgeCount++; + return _target; + } + } + }, { + name: "undirectedEdge", + separator: true, + regex: tokens.undirectedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.UNDIRECTED_EDGE, + nodes: [source, target] + }); + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; + return target; + } else { + var nhoodQ = newQuery(); + var node = query; + var neighbor = newQuery(); + nhoodQ.checks.push({ + type: Type.NODE_NEIGHBOR, + node, + neighbor + }); + replaceLastQuery(selector, query, nhoodQ); + return neighbor; + } + } + }, { + name: "child", + separator: true, + regex: tokens.child, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + var parentChildQuery = newQuery(); + var child = newQuery(); + var parent = selector[selector.length - 1]; + parentChildQuery.checks.push({ + type: Type.CHILD, + parent, + child + }); + replaceLastQuery(selector, query, parentChildQuery); + selector.compoundCount++; + return child; + } else if (selector.currentSubject === query) { + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + var _child = newQuery(); + var _parent = newQuery(); + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left, + right, + subject + }); + subject.checks = query.checks; + query.checks = [{ + type: Type.TRUE + }]; + _parent.checks.push({ + type: Type.TRUE + }); + right.checks.push({ + type: Type.PARENT, + // type is swapped on right side queries + parent: _parent, + child: _child + // empty for now + }); + replaceLastQuery(selector, left, compound); + selector.currentSubject = subject; + selector.compoundCount++; + return _child; + } else { + var _parent2 = newQuery(); + var _child2 = newQuery(); + var pcQChecks = [{ + type: Type.PARENT, + parent: _parent2, + child: _child2 + }]; + _parent2.checks = query.checks; + query.checks = pcQChecks; + selector.compoundCount++; + return _child2; + } + } + }, { + name: "descendant", + separator: true, + regex: tokens.descendant, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + var ancChQuery = newQuery(); + var descendant = newQuery(); + var ancestor = selector[selector.length - 1]; + ancChQuery.checks.push({ + type: Type.DESCENDANT, + ancestor, + descendant + }); + replaceLastQuery(selector, query, ancChQuery); + selector.compoundCount++; + return descendant; + } else if (selector.currentSubject === query) { + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + var _descendant = newQuery(); + var _ancestor = newQuery(); + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left, + right, + subject + }); + subject.checks = query.checks; + query.checks = [{ + type: Type.TRUE + }]; + _ancestor.checks.push({ + type: Type.TRUE + }); + right.checks.push({ + type: Type.ANCESTOR, + // type is swapped on right side queries + ancestor: _ancestor, + descendant: _descendant + // empty for now + }); + replaceLastQuery(selector, left, compound); + selector.currentSubject = subject; + selector.compoundCount++; + return _descendant; + } else { + var _ancestor2 = newQuery(); + var _descendant2 = newQuery(); + var adQChecks = [{ + type: Type.ANCESTOR, + ancestor: _ancestor2, + descendant: _descendant2 + }]; + _ancestor2.checks = query.checks; + query.checks = adQChecks; + selector.compoundCount++; + return _descendant2; + } + } + }, { + name: "subject", + modifier: true, + regex: tokens.subject, + populate: function populate(selector, query) { + if (selector.currentSubject != null && selector.currentSubject !== query) { + warn("Redefinition of subject in selector `" + selector.toString() + "`"); + return false; + } + selector.currentSubject = query; + var topQ = selector[selector.length - 1]; + var topChk = topQ.checks[0]; + var topType = topChk == null ? null : topChk.type; + if (topType === Type.DIRECTED_EDGE) { + topChk.type = Type.NODE_TARGET; + } else if (topType === Type.UNDIRECTED_EDGE) { + topChk.type = Type.NODE_NEIGHBOR; + topChk.node = topChk.nodes[1]; + topChk.neighbor = topChk.nodes[0]; + topChk.nodes = null; + } + } + }]; + exprs.forEach(function(e) { + return e.regexObj = new RegExp("^" + e.regex); + }); + var consumeExpr = function consumeExpr2(remaining) { + var expr; + var match2; + var name2; + for (var j = 0; j < exprs.length; j++) { + var e = exprs[j]; + var n = e.name; + var m = remaining.match(e.regexObj); + if (m != null) { + match2 = m; + expr = e; + name2 = n; + var consumed = m[0]; + remaining = remaining.substring(consumed.length); + break; + } + } + return { + expr, + match: match2, + name: name2, + remaining + }; + }; + var consumeWhitespace = function consumeWhitespace2(remaining) { + var match2 = remaining.match(/^\s+/); + if (match2) { + var consumed = match2[0]; + remaining = remaining.substring(consumed.length); + } + return remaining; + }; + var parse = function parse2(selector) { + var self2 = this; + var remaining = self2.inputText = selector; + var currentQuery = self2[0] = newQuery(); + self2.length = 1; + remaining = consumeWhitespace(remaining); + for (; ; ) { + var exprInfo = consumeExpr(remaining); + if (exprInfo.expr == null) { + warn("The selector `" + selector + "`is invalid"); + return false; + } else { + var args = exprInfo.match.slice(1); + var ret = exprInfo.expr.populate(self2, currentQuery, args); + if (ret === false) { + return false; + } else if (ret != null) { + currentQuery = ret; + } + } + remaining = exprInfo.remaining; + if (remaining.match(/^\s*$/)) { + break; + } + } + var lastQ = self2[self2.length - 1]; + if (self2.currentSubject != null) { + lastQ.subject = self2.currentSubject; + } + lastQ.edgeCount = self2.edgeCount; + lastQ.compoundCount = self2.compoundCount; + for (var i2 = 0; i2 < self2.length; i2++) { + var q = self2[i2]; + if (q.compoundCount > 0 && q.edgeCount > 0) { + warn("The selector `" + selector + "` is invalid because it uses both a compound selector and an edge selector"); + return false; + } + if (q.edgeCount > 1) { + warn("The selector `" + selector + "` is invalid because it uses multiple edge selectors"); + return false; + } else if (q.edgeCount === 1) { + warn("The selector `" + selector + "` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes."); + } + } + return true; + }; + var toString = function toString2() { + if (this.toStringCache != null) { + return this.toStringCache; + } + var clean = function clean2(obj) { + if (obj == null) { + return ""; + } else { + return obj; + } + }; + var cleanVal = function cleanVal2(val) { + if (string(val)) { + return '"' + val + '"'; + } else { + return clean(val); + } + }; + var space = function space2(val) { + return " " + val + " "; + }; + var checkToString = function checkToString2(check, subject) { + var type = check.type, value = check.value; + switch (type) { + case Type.GROUP: { + var group = clean(value); + return group.substring(0, group.length - 1); + } + case Type.DATA_COMPARE: { + var field = check.field, operator = check.operator; + return "[" + field + space(clean(operator)) + cleanVal(value) + "]"; + } + case Type.DATA_BOOL: { + var _operator = check.operator, _field = check.field; + return "[" + clean(_operator) + _field + "]"; + } + case Type.DATA_EXIST: { + var _field2 = check.field; + return "[" + _field2 + "]"; + } + case Type.META_COMPARE: { + var _operator2 = check.operator, _field3 = check.field; + return "[[" + _field3 + space(clean(_operator2)) + cleanVal(value) + "]]"; + } + case Type.STATE: { + return value; + } + case Type.ID: { + return "#" + value; + } + case Type.CLASS: { + return "." + value; + } + case Type.PARENT: + case Type.CHILD: { + return queryToString(check.parent, subject) + space(">") + queryToString(check.child, subject); + } + case Type.ANCESTOR: + case Type.DESCENDANT: { + return queryToString(check.ancestor, subject) + " " + queryToString(check.descendant, subject); + } + case Type.COMPOUND_SPLIT: { + var lhs = queryToString(check.left, subject); + var sub = queryToString(check.subject, subject); + var rhs = queryToString(check.right, subject); + return lhs + (lhs.length > 0 ? " " : "") + sub + rhs; + } + case Type.TRUE: { + return ""; + } + } + }; + var queryToString = function queryToString2(query2, subject) { + return query2.checks.reduce(function(str2, chk, i3) { + return str2 + (subject === query2 && i3 === 0 ? "$" : "") + checkToString(chk, subject); + }, ""); + }; + var str = ""; + for (var i2 = 0; i2 < this.length; i2++) { + var query = this[i2]; + str += queryToString(query, query.subject); + if (this.length > 1 && i2 < this.length - 1) { + str += ", "; + } + } + this.toStringCache = str; + return str; + }; + var parse$1 = { + parse, + toString + }; + var valCmp = function valCmp2(fieldVal, operator, value) { + var matches2; + var isFieldStr = string(fieldVal); + var isFieldNum = number$1(fieldVal); + var isValStr = string(value); + var fieldStr, valStr; + var caseInsensitive = false; + var notExpr = false; + var isIneqCmp = false; + if (operator.indexOf("!") >= 0) { + operator = operator.replace("!", ""); + notExpr = true; + } + if (operator.indexOf("@") >= 0) { + operator = operator.replace("@", ""); + caseInsensitive = true; + } + if (isFieldStr || isValStr || caseInsensitive) { + fieldStr = !isFieldStr && !isFieldNum ? "" : "" + fieldVal; + valStr = "" + value; + } + if (caseInsensitive) { + fieldVal = fieldStr = fieldStr.toLowerCase(); + value = valStr = valStr.toLowerCase(); + } + switch (operator) { + case "*=": + matches2 = fieldStr.indexOf(valStr) >= 0; + break; + case "$=": + matches2 = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0; + break; + case "^=": + matches2 = fieldStr.indexOf(valStr) === 0; + break; + case "=": + matches2 = fieldVal === value; + break; + case ">": + isIneqCmp = true; + matches2 = fieldVal > value; + break; + case ">=": + isIneqCmp = true; + matches2 = fieldVal >= value; + break; + case "<": + isIneqCmp = true; + matches2 = fieldVal < value; + break; + case "<=": + isIneqCmp = true; + matches2 = fieldVal <= value; + break; + default: + matches2 = false; + break; + } + if (notExpr && (fieldVal != null || !isIneqCmp)) { + matches2 = !matches2; + } + return matches2; + }; + var boolCmp = function boolCmp2(fieldVal, operator) { + switch (operator) { + case "?": + return fieldVal ? true : false; + case "!": + return fieldVal ? false : true; + case "^": + return fieldVal === void 0; + } + }; + var existCmp = function existCmp2(fieldVal) { + return fieldVal !== void 0; + }; + var data$1 = function data2(ele, field) { + return ele.data(field); + }; + var meta = function meta2(ele, field) { + return ele[field](); + }; + var match = []; + var matches$1 = function matches2(query, ele) { + return query.checks.every(function(chk) { + return match[chk.type](chk, ele); + }); + }; + match[Type.GROUP] = function(check, ele) { + var group = check.value; + return group === "*" || group === ele.group(); + }; + match[Type.STATE] = function(check, ele) { + var stateSelector = check.value; + return stateSelectorMatches(stateSelector, ele); + }; + match[Type.ID] = function(check, ele) { + var id = check.value; + return ele.id() === id; + }; + match[Type.CLASS] = function(check, ele) { + var cls = check.value; + return ele.hasClass(cls); + }; + match[Type.META_COMPARE] = function(check, ele) { + var field = check.field, operator = check.operator, value = check.value; + return valCmp(meta(ele, field), operator, value); + }; + match[Type.DATA_COMPARE] = function(check, ele) { + var field = check.field, operator = check.operator, value = check.value; + return valCmp(data$1(ele, field), operator, value); + }; + match[Type.DATA_BOOL] = function(check, ele) { + var field = check.field, operator = check.operator; + return boolCmp(data$1(ele, field), operator); + }; + match[Type.DATA_EXIST] = function(check, ele) { + var field = check.field; + check.operator; + return existCmp(data$1(ele, field)); + }; + match[Type.UNDIRECTED_EDGE] = function(check, ele) { + var qA = check.nodes[0]; + var qB = check.nodes[1]; + var src = ele.source(); + var tgt = ele.target(); + return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt); + }; + match[Type.NODE_NEIGHBOR] = function(check, ele) { + return matches$1(check.node, ele) && ele.neighborhood().some(function(n) { + return n.isNode() && matches$1(check.neighbor, n); + }); + }; + match[Type.DIRECTED_EDGE] = function(check, ele) { + return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target()); + }; + match[Type.NODE_SOURCE] = function(check, ele) { + return matches$1(check.source, ele) && ele.outgoers().some(function(n) { + return n.isNode() && matches$1(check.target, n); + }); + }; + match[Type.NODE_TARGET] = function(check, ele) { + return matches$1(check.target, ele) && ele.incomers().some(function(n) { + return n.isNode() && matches$1(check.source, n); + }); + }; + match[Type.CHILD] = function(check, ele) { + return matches$1(check.child, ele) && matches$1(check.parent, ele.parent()); + }; + match[Type.PARENT] = function(check, ele) { + return matches$1(check.parent, ele) && ele.children().some(function(c) { + return matches$1(check.child, c); + }); + }; + match[Type.DESCENDANT] = function(check, ele) { + return matches$1(check.descendant, ele) && ele.ancestors().some(function(a) { + return matches$1(check.ancestor, a); + }); + }; + match[Type.ANCESTOR] = function(check, ele) { + return matches$1(check.ancestor, ele) && ele.descendants().some(function(d) { + return matches$1(check.descendant, d); + }); + }; + match[Type.COMPOUND_SPLIT] = function(check, ele) { + return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele); + }; + match[Type.TRUE] = function() { + return true; + }; + match[Type.COLLECTION] = function(check, ele) { + var collection2 = check.value; + return collection2.has(ele); + }; + match[Type.FILTER] = function(check, ele) { + var filter2 = check.value; + return filter2(ele); + }; + var filter = function filter2(collection2) { + var self2 = this; + if (self2.length === 1 && self2[0].checks.length === 1 && self2[0].checks[0].type === Type.ID) { + return collection2.getElementById(self2[0].checks[0].value).collection(); + } + var selectorFunction = function selectorFunction2(element2) { + for (var j = 0; j < self2.length; j++) { + var query = self2[j]; + if (matches$1(query, element2)) { + return true; + } + } + return false; + }; + if (self2.text() == null) { + selectorFunction = function selectorFunction2() { + return true; + }; + } + return collection2.filter(selectorFunction); + }; + var matches = function matches2(ele) { + var self2 = this; + for (var j = 0; j < self2.length; j++) { + var query = self2[j]; + if (matches$1(query, ele)) { + return true; + } + } + return false; + }; + var matching = { + matches, + filter + }; + var Selector = function Selector2(selector) { + this.inputText = selector; + this.currentSubject = null; + this.compoundCount = 0; + this.edgeCount = 0; + this.length = 0; + if (selector == null || string(selector) && selector.match(/^\s*$/)) + ; + else if (elementOrCollection(selector)) { + this.addQuery({ + checks: [{ + type: Type.COLLECTION, + value: selector.collection() + }] + }); + } else if (fn$6(selector)) { + this.addQuery({ + checks: [{ + type: Type.FILTER, + value: selector + }] + }); + } else if (string(selector)) { + if (!this.parse(selector)) { + this.invalid = true; + } + } else { + error("A selector must be created from a string; found "); + } + }; + var selfn = Selector.prototype; + [parse$1, matching].forEach(function(p2) { + return extend(selfn, p2); + }); + selfn.text = function() { + return this.inputText; + }; + selfn.size = function() { + return this.length; + }; + selfn.eq = function(i2) { + return this[i2]; + }; + selfn.sameText = function(otherSel) { + return !this.invalid && !otherSel.invalid && this.text() === otherSel.text(); + }; + selfn.addQuery = function(q) { + this[this.length++] = q; + }; + selfn.selector = selfn.toString; + var elesfn$g = { + allAre: function allAre(selector) { + var selObj = new Selector(selector); + return this.every(function(ele) { + return selObj.matches(ele); + }); + }, + is: function is(selector) { + var selObj = new Selector(selector); + return this.some(function(ele) { + return selObj.matches(ele); + }); + }, + some: function some(fn2, thisArg) { + for (var i2 = 0; i2 < this.length; i2++) { + var ret = !thisArg ? fn2(this[i2], i2, this) : fn2.apply(thisArg, [this[i2], i2, this]); + if (ret) { + return true; + } + } + return false; + }, + every: function every(fn2, thisArg) { + for (var i2 = 0; i2 < this.length; i2++) { + var ret = !thisArg ? fn2(this[i2], i2, this) : fn2.apply(thisArg, [this[i2], i2, this]); + if (!ret) { + return false; + } + } + return true; + }, + same: function same(collection2) { + if (this === collection2) { + return true; + } + collection2 = this.cy().collection(collection2); + var thisLength = this.length; + var collectionLength = collection2.length; + if (thisLength !== collectionLength) { + return false; + } + if (thisLength === 1) { + return this[0] === collection2[0]; + } + return this.every(function(ele) { + return collection2.hasElementWithId(ele.id()); + }); + }, + anySame: function anySame(collection2) { + collection2 = this.cy().collection(collection2); + return this.some(function(ele) { + return collection2.hasElementWithId(ele.id()); + }); + }, + allAreNeighbors: function allAreNeighbors(collection2) { + collection2 = this.cy().collection(collection2); + var nhood = this.neighborhood(); + return collection2.every(function(ele) { + return nhood.hasElementWithId(ele.id()); + }); + }, + contains: function contains(collection2) { + collection2 = this.cy().collection(collection2); + var self2 = this; + return collection2.every(function(ele) { + return self2.hasElementWithId(ele.id()); + }); + } + }; + elesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors; + elesfn$g.has = elesfn$g.contains; + elesfn$g.equal = elesfn$g.equals = elesfn$g.same; + var cache = function cache2(fn2, name2) { + return function traversalCache(arg1, arg2, arg3, arg4) { + var selectorOrEles = arg1; + var eles = this; + var key; + if (selectorOrEles == null) { + key = ""; + } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) { + key = selectorOrEles.id(); + } + if (eles.length === 1 && key) { + var _p = eles[0]._private; + var tch = _p.traversalCache = _p.traversalCache || {}; + var ch = tch[name2] = tch[name2] || []; + var hash = hashString(key); + var cacheHit = ch[hash]; + if (cacheHit) { + return cacheHit; + } else { + return ch[hash] = fn2.call(eles, arg1, arg2, arg3, arg4); + } + } else { + return fn2.call(eles, arg1, arg2, arg3, arg4); + } + }; + }; + var elesfn$f = { + parent: function parent(selector) { + var parents = []; + if (this.length === 1) { + var parent2 = this[0]._private.parent; + if (parent2) { + return parent2; + } + } + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var _parent = ele._private.parent; + if (_parent) { + parents.push(_parent); + } + } + return this.spawn(parents, true).filter(selector); + }, + parents: function parents(selector) { + var parents2 = []; + var eles = this.parent(); + while (eles.nonempty()) { + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + parents2.push(ele); + } + eles = eles.parent(); + } + return this.spawn(parents2, true).filter(selector); + }, + commonAncestors: function commonAncestors(selector) { + var ancestors; + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var parents = ele.parents(); + ancestors = ancestors || parents; + ancestors = ancestors.intersect(parents); + } + return ancestors.filter(selector); + }, + orphans: function orphans(selector) { + return this.stdFilter(function(ele) { + return ele.isOrphan(); + }).filter(selector); + }, + nonorphans: function nonorphans(selector) { + return this.stdFilter(function(ele) { + return ele.isChild(); + }).filter(selector); + }, + children: cache(function(selector) { + var children = []; + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var eleChildren = ele._private.children; + for (var j = 0; j < eleChildren.length; j++) { + children.push(eleChildren[j]); + } + } + return this.spawn(children, true).filter(selector); + }, "children"), + siblings: function siblings(selector) { + return this.parent().children().not(this).filter(selector); + }, + isParent: function isParent() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length !== 0; + } + }, + isChildless: function isChildless() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length === 0; + } + }, + isChild: function isChild() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent != null; + } + }, + isOrphan: function isOrphan() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent == null; + } + }, + descendants: function descendants(selector) { + var elements2 = []; + function add(eles) { + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + elements2.push(ele); + if (ele.children().nonempty()) { + add(ele.children()); + } + } + } + add(this.children()); + return this.spawn(elements2, true).filter(selector); + } + }; + function forEachCompound(eles, fn2, includeSelf, recursiveStep) { + var q = []; + var did = new Set$1(); + var cy = eles.cy(); + var hasCompounds = cy.hasCompoundNodes(); + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + if (includeSelf) { + q.push(ele); + } else if (hasCompounds) { + recursiveStep(q, did, ele); + } + } + while (q.length > 0) { + var _ele = q.shift(); + fn2(_ele); + did.add(_ele.id()); + if (hasCompounds) { + recursiveStep(q, did, _ele); + } + } + return eles; + } + function addChildren(q, did, ele) { + if (ele.isParent()) { + var children = ele._private.children; + for (var i2 = 0; i2 < children.length; i2++) { + var child = children[i2]; + if (!did.has(child.id())) { + q.push(child); + } + } + } + } + elesfn$f.forEachDown = function(fn2) { + var includeSelf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return forEachCompound(this, fn2, includeSelf, addChildren); + }; + function addParent(q, did, ele) { + if (ele.isChild()) { + var parent = ele._private.parent; + if (!did.has(parent.id())) { + q.push(parent); + } + } + } + elesfn$f.forEachUp = function(fn2) { + var includeSelf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return forEachCompound(this, fn2, includeSelf, addParent); + }; + function addParentAndChildren(q, did, ele) { + addParent(q, did, ele); + addChildren(q, did, ele); + } + elesfn$f.forEachUpAndDown = function(fn2) { + var includeSelf = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + return forEachCompound(this, fn2, includeSelf, addParentAndChildren); + }; + elesfn$f.ancestors = elesfn$f.parents; + var fn$5, elesfn$e; + fn$5 = elesfn$e = { + data: define.data({ + field: "data", + bindingEvent: "data", + allowBinding: true, + allowSetting: true, + settingEvent: "data", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + immutableKeys: { + "id": true, + "source": true, + "target": true, + "parent": true + }, + updateStyle: true + }), + removeData: define.removeData({ + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: true, + immutableKeys: { + "id": true, + "source": true, + "target": true, + "parent": true + }, + updateStyle: true + }), + scratch: define.data({ + field: "scratch", + bindingEvent: "scratch", + allowBinding: true, + allowSetting: true, + settingEvent: "scratch", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: "scratch", + event: "scratch", + triggerFnName: "trigger", + triggerEvent: true, + updateStyle: true + }), + rscratch: define.data({ + field: "rscratch", + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: true + }), + removeRscratch: define.removeData({ + field: "rscratch", + triggerEvent: false + }), + id: function id() { + var ele = this[0]; + if (ele) { + return ele._private.data.id; + } + } + }; + fn$5.attr = fn$5.data; + fn$5.removeAttr = fn$5.removeData; + var data = elesfn$e; + var elesfn$d = {}; + function defineDegreeFunction(callback) { + return function(includeLoops) { + var self2 = this; + if (includeLoops === void 0) { + includeLoops = true; + } + if (self2.length === 0) { + return; + } + if (self2.isNode() && !self2.removed()) { + var degree = 0; + var node = self2[0]; + var connectedEdges = node._private.edges; + for (var i2 = 0; i2 < connectedEdges.length; i2++) { + var edge = connectedEdges[i2]; + if (!includeLoops && edge.isLoop()) { + continue; + } + degree += callback(node, edge); + } + return degree; + } else { + return; + } + }; + } + extend(elesfn$d, { + degree: defineDegreeFunction(function(node, edge) { + if (edge.source().same(edge.target())) { + return 2; + } else { + return 1; + } + }), + indegree: defineDegreeFunction(function(node, edge) { + if (edge.target().same(node)) { + return 1; + } else { + return 0; + } + }), + outdegree: defineDegreeFunction(function(node, edge) { + if (edge.source().same(node)) { + return 1; + } else { + return 0; + } + }) + }); + function defineDegreeBoundsFunction(degreeFn, callback) { + return function(includeLoops) { + var ret; + var nodes2 = this.nodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + var ele = nodes2[i2]; + var degree = ele[degreeFn](includeLoops); + if (degree !== void 0 && (ret === void 0 || callback(degree, ret))) { + ret = degree; + } + } + return ret; + }; + } + extend(elesfn$d, { + minDegree: defineDegreeBoundsFunction("degree", function(degree, min2) { + return degree < min2; + }), + maxDegree: defineDegreeBoundsFunction("degree", function(degree, max2) { + return degree > max2; + }), + minIndegree: defineDegreeBoundsFunction("indegree", function(degree, min2) { + return degree < min2; + }), + maxIndegree: defineDegreeBoundsFunction("indegree", function(degree, max2) { + return degree > max2; + }), + minOutdegree: defineDegreeBoundsFunction("outdegree", function(degree, min2) { + return degree < min2; + }), + maxOutdegree: defineDegreeBoundsFunction("outdegree", function(degree, max2) { + return degree > max2; + }) + }); + extend(elesfn$d, { + totalDegree: function totalDegree(includeLoops) { + var total = 0; + var nodes2 = this.nodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + total += nodes2[i2].degree(includeLoops); + } + return total; + } + }); + var fn$4, elesfn$c; + var beforePositionSet = function beforePositionSet2(eles, newPos, silent) { + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + if (!ele.locked()) { + var oldPos = ele._private.position; + var delta = { + x: newPos.x != null ? newPos.x - oldPos.x : 0, + y: newPos.y != null ? newPos.y - oldPos.y : 0 + }; + if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) { + ele.children().shift(delta, silent); + } + ele.dirtyBoundingBoxCache(); + } + } + }; + var positionDef = { + field: "position", + bindingEvent: "position", + allowBinding: true, + allowSetting: true, + settingEvent: "position", + settingTriggersEvent: true, + triggerFnName: "emitAndNotify", + allowGetting: true, + validKeys: ["x", "y"], + beforeGet: function beforeGet(ele) { + ele.updateCompoundBounds(); + }, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, false); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + }, + canSet: function canSet(ele) { + return !ele.locked(); + } + }; + fn$4 = elesfn$c = { + position: define.data(positionDef), + // position but no notification to renderer + silentPosition: define.data(extend({}, positionDef, { + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: false, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, true); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + } + })), + positions: function positions(pos, silent) { + if (plainObject(pos)) { + if (silent) { + this.silentPosition(pos); + } else { + this.position(pos); + } + } else if (fn$6(pos)) { + var _fn = pos; + var cy = this.cy(); + cy.startBatch(); + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var _pos = void 0; + if (_pos = _fn(ele, i2)) { + if (silent) { + ele.silentPosition(_pos); + } else { + ele.position(_pos); + } + } + } + cy.endBatch(); + } + return this; + }, + silentPositions: function silentPositions(pos) { + return this.positions(pos, true); + }, + shift: function shift(dim, val, silent) { + var delta; + if (plainObject(dim)) { + delta = { + x: number$1(dim.x) ? dim.x : 0, + y: number$1(dim.y) ? dim.y : 0 + }; + silent = val; + } else if (string(dim) && number$1(val)) { + delta = { + x: 0, + y: 0 + }; + delta[dim] = val; + } + if (delta != null) { + var cy = this.cy(); + cy.startBatch(); + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) { + continue; + } + var pos = ele.position(); + var newPos = { + x: pos.x + delta.x, + y: pos.y + delta.y + }; + if (silent) { + ele.silentPosition(newPos); + } else { + ele.position(newPos); + } + } + cy.endBatch(); + } + return this; + }, + silentShift: function silentShift(dim, val) { + if (plainObject(dim)) { + this.shift(dim, true); + } else if (string(dim) && number$1(val)) { + this.shift(dim, val, true); + } + return this; + }, + // get/set the rendered (i.e. on screen) positon of the element + renderedPosition: function renderedPosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var rpos = plainObject(dim) ? dim : void 0; + var setting = rpos !== void 0 || val !== void 0 && string(dim); + if (ele && ele.isNode()) { + if (setting) { + for (var i2 = 0; i2 < this.length; i2++) { + var _ele = this[i2]; + if (val !== void 0) { + _ele.position(dim, (val - pan[dim]) / zoom); + } else if (rpos !== void 0) { + _ele.position(renderedToModelPosition(rpos, zoom, pan)); + } + } + } else { + var pos = ele.position(); + rpos = modelToRenderedPosition(pos, zoom, pan); + if (dim === void 0) { + return rpos; + } else { + return rpos[dim]; + } + } + } else if (!setting) { + return void 0; + } + return this; + }, + // get/set the position relative to the parent + relativePosition: function relativePosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var ppos = plainObject(dim) ? dim : void 0; + var setting = ppos !== void 0 || val !== void 0 && string(dim); + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele && ele.isNode()) { + if (setting) { + for (var i2 = 0; i2 < this.length; i2++) { + var _ele2 = this[i2]; + var parent = hasCompoundNodes ? _ele2.parent() : null; + var hasParent = parent && parent.length > 0; + var relativeToParent = hasParent; + if (hasParent) { + parent = parent[0]; + } + var origin = relativeToParent ? parent.position() : { + x: 0, + y: 0 + }; + if (val !== void 0) { + _ele2.position(dim, val + origin[dim]); + } else if (ppos !== void 0) { + _ele2.position({ + x: ppos.x + origin.x, + y: ppos.y + origin.y + }); + } + } + } else { + var pos = ele.position(); + var _parent = hasCompoundNodes ? ele.parent() : null; + var _hasParent = _parent && _parent.length > 0; + var _relativeToParent = _hasParent; + if (_hasParent) { + _parent = _parent[0]; + } + var _origin = _relativeToParent ? _parent.position() : { + x: 0, + y: 0 + }; + ppos = { + x: pos.x - _origin.x, + y: pos.y - _origin.y + }; + if (dim === void 0) { + return ppos; + } else { + return ppos[dim]; + } + } + } else if (!setting) { + return void 0; + } + return this; + } + }; + fn$4.modelPosition = fn$4.point = fn$4.position; + fn$4.modelPositions = fn$4.points = fn$4.positions; + fn$4.renderedPoint = fn$4.renderedPosition; + fn$4.relativePoint = fn$4.relativePosition; + var position = elesfn$c; + var fn$3, elesfn$b; + fn$3 = elesfn$b = {}; + elesfn$b.renderedBoundingBox = function(options) { + var bb = this.boundingBox(options); + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var x1 = bb.x1 * zoom + pan.x; + var x2 = bb.x2 * zoom + pan.x; + var y1 = bb.y1 * zoom + pan.y; + var y2 = bb.y2 * zoom + pan.y; + return { + x1, + x2, + y1, + y2, + w: x2 - x1, + h: y2 - y1 + }; + }; + elesfn$b.dirtyCompoundBoundsCache = function() { + var silent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false; + var cy = this.cy(); + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + this.forEachUp(function(ele) { + if (ele.isParent()) { + var _p = ele._private; + _p.compoundBoundsClean = false; + _p.bbCache = null; + if (!silent) { + ele.emitAndNotify("bounds"); + } + } + }); + return this; + }; + elesfn$b.updateCompoundBounds = function() { + var force = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false; + var cy = this.cy(); + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + if (!force && cy.batching()) { + return this; + } + function update2(parent) { + if (!parent.isParent()) { + return; + } + var _p2 = parent._private; + var children = parent.children(); + var includeLabels = parent.pstyle("compound-sizing-wrt-labels").value === "include"; + var min2 = { + width: { + val: parent.pstyle("min-width").pfValue, + left: parent.pstyle("min-width-bias-left"), + right: parent.pstyle("min-width-bias-right") + }, + height: { + val: parent.pstyle("min-height").pfValue, + top: parent.pstyle("min-height-bias-top"), + bottom: parent.pstyle("min-height-bias-bottom") + } + }; + var bb = children.boundingBox({ + includeLabels, + includeOverlays: false, + // updating the compound bounds happens outside of the regular + // cache cycle (i.e. before fired events) + useCache: false + }); + var pos = _p2.position; + if (bb.w === 0 || bb.h === 0) { + bb = { + w: parent.pstyle("width").pfValue, + h: parent.pstyle("height").pfValue + }; + bb.x1 = pos.x - bb.w / 2; + bb.x2 = pos.x + bb.w / 2; + bb.y1 = pos.y - bb.h / 2; + bb.y2 = pos.y + bb.h / 2; + } + function computeBiasValues(propDiff, propBias, propBiasComplement) { + var biasDiff = 0; + var biasComplementDiff = 0; + var biasTotal = propBias + propBiasComplement; + if (propDiff > 0 && biasTotal > 0) { + biasDiff = propBias / biasTotal * propDiff; + biasComplementDiff = propBiasComplement / biasTotal * propDiff; + } + return { + biasDiff, + biasComplementDiff + }; + } + function computePaddingValues(width, height, paddingObject, relativeTo) { + if (paddingObject.units === "%") { + switch (relativeTo) { + case "width": + return width > 0 ? paddingObject.pfValue * width : 0; + case "height": + return height > 0 ? paddingObject.pfValue * height : 0; + case "average": + return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0; + case "min": + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0; + case "max": + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0; + default: + return 0; + } + } else if (paddingObject.units === "px") { + return paddingObject.pfValue; + } else { + return 0; + } + } + var leftVal = min2.width.left.value; + if (min2.width.left.units === "px" && min2.width.val > 0) { + leftVal = leftVal * 100 / min2.width.val; + } + var rightVal = min2.width.right.value; + if (min2.width.right.units === "px" && min2.width.val > 0) { + rightVal = rightVal * 100 / min2.width.val; + } + var topVal = min2.height.top.value; + if (min2.height.top.units === "px" && min2.height.val > 0) { + topVal = topVal * 100 / min2.height.val; + } + var bottomVal = min2.height.bottom.value; + if (min2.height.bottom.units === "px" && min2.height.val > 0) { + bottomVal = bottomVal * 100 / min2.height.val; + } + var widthBiasDiffs = computeBiasValues(min2.width.val - bb.w, leftVal, rightVal); + var diffLeft = widthBiasDiffs.biasDiff; + var diffRight = widthBiasDiffs.biasComplementDiff; + var heightBiasDiffs = computeBiasValues(min2.height.val - bb.h, topVal, bottomVal); + var diffTop = heightBiasDiffs.biasDiff; + var diffBottom = heightBiasDiffs.biasComplementDiff; + _p2.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle("padding"), parent.pstyle("padding-relative-to").value); + _p2.autoWidth = Math.max(bb.w, min2.width.val); + pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2; + _p2.autoHeight = Math.max(bb.h, min2.height.val); + pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2; + } + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var _p = ele._private; + if (!_p.compoundBoundsClean || force) { + update2(ele); + if (!cy.batching()) { + _p.compoundBoundsClean = true; + } + } + } + return this; + }; + var noninf = function noninf2(x) { + if (x === Infinity || x === -Infinity) { + return 0; + } + return x; + }; + var updateBounds = function updateBounds2(b, x1, y1, x2, y2) { + if (x2 - x1 === 0 || y2 - y1 === 0) { + return; + } + if (x1 == null || y1 == null || x2 == null || y2 == null) { + return; + } + b.x1 = x1 < b.x1 ? x1 : b.x1; + b.x2 = x2 > b.x2 ? x2 : b.x2; + b.y1 = y1 < b.y1 ? y1 : b.y1; + b.y2 = y2 > b.y2 ? y2 : b.y2; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + }; + var updateBoundsFromBox = function updateBoundsFromBox2(b, b2) { + if (b2 == null) { + return b; + } + return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2); + }; + var prefixedProperty = function prefixedProperty2(obj, field, prefix) { + return getPrefixedProperty(obj, field, prefix); + }; + var updateBoundsFromArrow = function updateBoundsFromArrow2(bounds2, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var halfArW = rstyle.arrowWidth / 2; + var arrowType = ele.pstyle(prefix + "-arrow-shape").value; + var x; + var y; + if (arrowType !== "none") { + if (prefix === "source") { + x = rstyle.srcX; + y = rstyle.srcY; + } else if (prefix === "target") { + x = rstyle.tgtX; + y = rstyle.tgtY; + } else { + x = rstyle.midX; + y = rstyle.midY; + } + var bbs = _p.arrowBounds = _p.arrowBounds || {}; + var bb = bbs[prefix] = bbs[prefix] || {}; + bb.x1 = x - halfArW; + bb.y1 = y - halfArW; + bb.x2 = x + halfArW; + bb.y2 = y + halfArW; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + expandBoundingBox(bb, 1); + updateBounds(bounds2, bb.x1, bb.y1, bb.x2, bb.y2); + } + }; + var updateBoundsFromLabel = function updateBoundsFromLabel2(bounds2, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var prefixDash; + if (prefix) { + prefixDash = prefix + "-"; + } else { + prefixDash = ""; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var label = ele.pstyle(prefixDash + "label").strValue; + if (label) { + var halign = ele.pstyle("text-halign"); + var valign = ele.pstyle("text-valign"); + var labelWidth = prefixedProperty(rstyle, "labelWidth", prefix); + var labelHeight = prefixedProperty(rstyle, "labelHeight", prefix); + var labelX = prefixedProperty(rstyle, "labelX", prefix); + var labelY = prefixedProperty(rstyle, "labelY", prefix); + var marginX = ele.pstyle(prefixDash + "text-margin-x").pfValue; + var marginY = ele.pstyle(prefixDash + "text-margin-y").pfValue; + var isEdge = ele.isEdge(); + var rotation = ele.pstyle(prefixDash + "text-rotation"); + var outlineWidth = ele.pstyle("text-outline-width").pfValue; + var borderWidth = ele.pstyle("text-border-width").pfValue; + var halfBorderWidth = borderWidth / 2; + var padding = ele.pstyle("text-background-padding").pfValue; + var marginOfError = 2; + var lh = labelHeight; + var lw = labelWidth; + var lw_2 = lw / 2; + var lh_2 = lh / 2; + var lx1, lx2, ly1, ly2; + if (isEdge) { + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + } else { + switch (halign.value) { + case "left": + lx1 = labelX - lw; + lx2 = labelX; + break; + case "center": + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + break; + case "right": + lx1 = labelX; + lx2 = labelX + lw; + break; + } + switch (valign.value) { + case "top": + ly1 = labelY - lh; + ly2 = labelY; + break; + case "center": + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + break; + case "bottom": + ly1 = labelY; + ly2 = labelY + lh; + break; + } + } + lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; + ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; + var bbPrefix = prefix || "main"; + var bbs = _p.labelBounds; + var bb = bbs[bbPrefix] = bbs[bbPrefix] || {}; + bb.x1 = lx1; + bb.y1 = ly1; + bb.x2 = lx2; + bb.y2 = ly2; + bb.w = lx2 - lx1; + bb.h = ly2 - ly1; + var isAutorotate = isEdge && rotation.strValue === "autorotate"; + var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0; + if (isAutorotate || isPfValue) { + var theta = isAutorotate ? prefixedProperty(_p.rstyle, "labelAngle", prefix) : rotation.pfValue; + var cos2 = Math.cos(theta); + var sin2 = Math.sin(theta); + var xo = (lx1 + lx2) / 2; + var yo = (ly1 + ly2) / 2; + if (!isEdge) { + switch (halign.value) { + case "left": + xo = lx2; + break; + case "right": + xo = lx1; + break; + } + switch (valign.value) { + case "top": + yo = ly2; + break; + case "bottom": + yo = ly1; + break; + } + } + var rotate = function rotate2(x, y) { + x = x - xo; + y = y - yo; + return { + x: x * cos2 - y * sin2 + xo, + y: x * sin2 + y * cos2 + yo + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + } + var bbPrefixRot = bbPrefix + "Rot"; + var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {}; + bbRot.x1 = lx1; + bbRot.y1 = ly1; + bbRot.x2 = lx2; + bbRot.y2 = ly2; + bbRot.w = lx2 - lx1; + bbRot.h = ly2 - ly1; + updateBounds(bounds2, lx1, ly1, lx2, ly2); + updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2); + } + return bounds2; + }; + var boundingBoxImpl = function boundingBoxImpl2(ele, options) { + var cy = ele._private.cy; + var styleEnabled = cy.styleEnabled(); + var headless = cy.headless(); + var bounds2 = makeBoundingBox(); + var _p = ele._private; + var isNode = ele.isNode(); + var isEdge = ele.isEdge(); + var ex1, ex2, ey1, ey2; + var x, y; + var rstyle = _p.rstyle; + var manualExpansion = isNode && styleEnabled ? ele.pstyle("bounds-expansion").pfValue : [0]; + var isDisplayed = function isDisplayed2(ele2) { + return ele2.pstyle("display").value !== "none"; + }; + var displayed = !styleEnabled || isDisplayed(ele) && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target())); + if (displayed) { + var overlayOpacity = 0; + var overlayPadding = 0; + if (styleEnabled && options.includeOverlays) { + overlayOpacity = ele.pstyle("overlay-opacity").value; + if (overlayOpacity !== 0) { + overlayPadding = ele.pstyle("overlay-padding").value; + } + } + var underlayOpacity = 0; + var underlayPadding = 0; + if (styleEnabled && options.includeUnderlays) { + underlayOpacity = ele.pstyle("underlay-opacity").value; + if (underlayOpacity !== 0) { + underlayPadding = ele.pstyle("underlay-padding").value; + } + } + var padding = Math.max(overlayPadding, underlayPadding); + var w = 0; + var wHalf = 0; + if (styleEnabled) { + w = ele.pstyle("width").pfValue; + wHalf = w / 2; + } + if (isNode && options.includeNodes) { + var pos = ele.position(); + x = pos.x; + y = pos.y; + var _w = ele.outerWidth(); + var halfW = _w / 2; + var h = ele.outerHeight(); + var halfH = h / 2; + ex1 = x - halfW; + ex2 = x + halfW; + ey1 = y - halfH; + ey2 = y + halfH; + updateBounds(bounds2, ex1, ey1, ex2, ey2); + } else if (isEdge && options.includeEdges) { + if (styleEnabled && !headless) { + var curveStyle = ele.pstyle("curve-style").strValue; + ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY); + ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY); + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds2, ex1, ey1, ex2, ey2); + if (curveStyle === "haystack") { + var hpts = rstyle.haystackPts; + if (hpts && hpts.length === 2) { + ex1 = hpts[0].x; + ey1 = hpts[0].y; + ex2 = hpts[1].x; + ey2 = hpts[1].y; + if (ex1 > ex2) { + var temp = ex1; + ex1 = ex2; + ex2 = temp; + } + if (ey1 > ey2) { + var _temp = ey1; + ey1 = ey2; + ey2 = _temp; + } + updateBounds(bounds2, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf); + } + } else if (curveStyle === "bezier" || curveStyle === "unbundled-bezier" || curveStyle === "segments" || curveStyle === "taxi") { + var pts2; + switch (curveStyle) { + case "bezier": + case "unbundled-bezier": + pts2 = rstyle.bezierPts; + break; + case "segments": + case "taxi": + pts2 = rstyle.linePts; + break; + } + if (pts2 != null) { + for (var j = 0; j < pts2.length; j++) { + var pt = pts2[j]; + ex1 = pt.x - wHalf; + ex2 = pt.x + wHalf; + ey1 = pt.y - wHalf; + ey2 = pt.y + wHalf; + updateBounds(bounds2, ex1, ey1, ex2, ey2); + } + } + } + } else { + var n1 = ele.source(); + var n1pos = n1.position(); + var n2 = ele.target(); + var n2pos = n2.position(); + ex1 = n1pos.x; + ex2 = n2pos.x; + ey1 = n1pos.y; + ey2 = n2pos.y; + if (ex1 > ex2) { + var _temp2 = ex1; + ex1 = ex2; + ex2 = _temp2; + } + if (ey1 > ey2) { + var _temp3 = ey1; + ey1 = ey2; + ey2 = _temp3; + } + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds2, ex1, ey1, ex2, ey2); + } + } + if (styleEnabled && options.includeEdges && isEdge) { + updateBoundsFromArrow(bounds2, ele, "mid-source"); + updateBoundsFromArrow(bounds2, ele, "mid-target"); + updateBoundsFromArrow(bounds2, ele, "source"); + updateBoundsFromArrow(bounds2, ele, "target"); + } + if (styleEnabled) { + var ghost = ele.pstyle("ghost").value === "yes"; + if (ghost) { + var gx = ele.pstyle("ghost-offset-x").pfValue; + var gy = ele.pstyle("ghost-offset-y").pfValue; + updateBounds(bounds2, bounds2.x1 + gx, bounds2.y1 + gy, bounds2.x2 + gx, bounds2.y2 + gy); + } + } + var bbBody = _p.bodyBounds = _p.bodyBounds || {}; + assignBoundingBox(bbBody, bounds2); + expandBoundingBoxSides(bbBody, manualExpansion); + expandBoundingBox(bbBody, 1); + if (styleEnabled) { + ex1 = bounds2.x1; + ex2 = bounds2.x2; + ey1 = bounds2.y1; + ey2 = bounds2.y2; + updateBounds(bounds2, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding); + } + var bbOverlay = _p.overlayBounds = _p.overlayBounds || {}; + assignBoundingBox(bbOverlay, bounds2); + expandBoundingBoxSides(bbOverlay, manualExpansion); + expandBoundingBox(bbOverlay, 1); + var bbLabels = _p.labelBounds = _p.labelBounds || {}; + if (bbLabels.all != null) { + clearBoundingBox(bbLabels.all); + } else { + bbLabels.all = makeBoundingBox(); + } + if (styleEnabled && options.includeLabels) { + if (options.includeMainLabels) { + updateBoundsFromLabel(bounds2, ele, null); + } + if (isEdge) { + if (options.includeSourceLabels) { + updateBoundsFromLabel(bounds2, ele, "source"); + } + if (options.includeTargetLabels) { + updateBoundsFromLabel(bounds2, ele, "target"); + } + } + } + } + bounds2.x1 = noninf(bounds2.x1); + bounds2.y1 = noninf(bounds2.y1); + bounds2.x2 = noninf(bounds2.x2); + bounds2.y2 = noninf(bounds2.y2); + bounds2.w = noninf(bounds2.x2 - bounds2.x1); + bounds2.h = noninf(bounds2.y2 - bounds2.y1); + if (bounds2.w > 0 && bounds2.h > 0 && displayed) { + expandBoundingBoxSides(bounds2, manualExpansion); + expandBoundingBox(bounds2, 1); + } + return bounds2; + }; + var getKey = function getKey2(opts) { + var i2 = 0; + var tf = function tf2(val) { + return (val ? 1 : 0) << i2++; + }; + var key = 0; + key += tf(opts.incudeNodes); + key += tf(opts.includeEdges); + key += tf(opts.includeLabels); + key += tf(opts.includeMainLabels); + key += tf(opts.includeSourceLabels); + key += tf(opts.includeTargetLabels); + key += tf(opts.includeOverlays); + return key; + }; + var getBoundingBoxPosKey = function getBoundingBoxPosKey2(ele) { + if (ele.isEdge()) { + var p1 = ele.source().position(); + var p2 = ele.target().position(); + var r = function r2(x) { + return Math.round(x); + }; + return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]); + } else { + return 0; + } + }; + var cachedBoundingBoxImpl = function cachedBoundingBoxImpl2(ele, opts) { + var _p = ele._private; + var bb; + var isEdge = ele.isEdge(); + var key = opts == null ? defBbOptsKey : getKey(opts); + var usingDefOpts = key === defBbOptsKey; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame; + var isDirty = function isDirty2(ele2) { + return ele2._private.bbCache == null || ele2._private.styleDirty; + }; + var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target()); + if (needRecalc) { + if (!isPosKeySame) { + ele.recalculateRenderedStyle(useCache); + } + bb = boundingBoxImpl(ele, defBbOpts); + _p.bbCache = bb; + _p.bbCachePosKey = currPosKey; + } else { + bb = _p.bbCache; + } + if (!usingDefOpts) { + var isNode = ele.isNode(); + bb = makeBoundingBox(); + if (opts.includeNodes && isNode || opts.includeEdges && !isNode) { + if (opts.includeOverlays) { + updateBoundsFromBox(bb, _p.overlayBounds); + } else { + updateBoundsFromBox(bb, _p.bodyBounds); + } + } + if (opts.includeLabels) { + if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) { + updateBoundsFromBox(bb, _p.labelBounds.all); + } else { + if (opts.includeMainLabels) { + updateBoundsFromBox(bb, _p.labelBounds.mainRot); + } + if (opts.includeSourceLabels) { + updateBoundsFromBox(bb, _p.labelBounds.sourceRot); + } + if (opts.includeTargetLabels) { + updateBoundsFromBox(bb, _p.labelBounds.targetRot); + } + } + } + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } + return bb; + }; + var defBbOpts = { + includeNodes: true, + includeEdges: true, + includeLabels: true, + includeMainLabels: true, + includeSourceLabels: true, + includeTargetLabels: true, + includeOverlays: true, + includeUnderlays: true, + useCache: true + }; + var defBbOptsKey = getKey(defBbOpts); + var filledBbOpts = defaults$g(defBbOpts); + elesfn$b.boundingBox = function(options) { + var bounds2; + if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === void 0 || options.useCache === void 0 || options.useCache === true)) { + if (options === void 0) { + options = defBbOpts; + } else { + options = filledBbOpts(options); + } + bounds2 = cachedBoundingBoxImpl(this[0], options); + } else { + bounds2 = makeBoundingBox(); + options = options || defBbOpts; + var opts = filledBbOpts(options); + var eles = this; + var cy = eles.cy(); + var styleEnabled = cy.styleEnabled(); + if (styleEnabled) { + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var _p = ele._private; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame && !_p.styleDirty; + ele.recalculateRenderedStyle(useCache); + } + } + this.updateCompoundBounds(!options.useCache); + for (var _i = 0; _i < eles.length; _i++) { + var _ele = eles[_i]; + updateBoundsFromBox(bounds2, cachedBoundingBoxImpl(_ele, opts)); + } + } + bounds2.x1 = noninf(bounds2.x1); + bounds2.y1 = noninf(bounds2.y1); + bounds2.x2 = noninf(bounds2.x2); + bounds2.y2 = noninf(bounds2.y2); + bounds2.w = noninf(bounds2.x2 - bounds2.x1); + bounds2.h = noninf(bounds2.y2 - bounds2.y1); + return bounds2; + }; + elesfn$b.dirtyBoundingBoxCache = function() { + for (var i2 = 0; i2 < this.length; i2++) { + var _p = this[i2]._private; + _p.bbCache = null; + _p.bbCachePosKey = null; + _p.bodyBounds = null; + _p.overlayBounds = null; + _p.labelBounds.all = null; + _p.labelBounds.source = null; + _p.labelBounds.target = null; + _p.labelBounds.main = null; + _p.labelBounds.sourceRot = null; + _p.labelBounds.targetRot = null; + _p.labelBounds.mainRot = null; + _p.arrowBounds.source = null; + _p.arrowBounds.target = null; + _p.arrowBounds["mid-source"] = null; + _p.arrowBounds["mid-target"] = null; + } + this.emitAndNotify("bounds"); + return this; + }; + elesfn$b.boundingBoxAt = function(fn2) { + var nodes2 = this.nodes(); + var cy = this.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + var parents = cy.collection(); + if (hasCompoundNodes) { + parents = nodes2.filter(function(node) { + return node.isParent(); + }); + nodes2 = nodes2.not(parents); + } + if (plainObject(fn2)) { + var obj = fn2; + fn2 = function fn3() { + return obj; + }; + } + var storeOldPos = function storeOldPos2(node, i2) { + return node._private.bbAtOldPos = fn2(node, i2); + }; + var getOldPos = function getOldPos2(node) { + return node._private.bbAtOldPos; + }; + cy.startBatch(); + nodes2.forEach(storeOldPos).silentPositions(fn2); + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); + } + var bb = copyBoundingBox(this.boundingBox({ + useCache: false + })); + nodes2.silentPositions(getOldPos); + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); + } + cy.endBatch(); + return bb; + }; + fn$3.boundingbox = fn$3.bb = fn$3.boundingBox; + fn$3.renderedBoundingbox = fn$3.renderedBoundingBox; + var bounds = elesfn$b; + var fn$2, elesfn$a; + fn$2 = elesfn$a = {}; + var defineDimFns = function defineDimFns2(opts) { + opts.uppercaseName = capitalize(opts.name); + opts.autoName = "auto" + opts.uppercaseName; + opts.labelName = "label" + opts.uppercaseName; + opts.outerName = "outer" + opts.uppercaseName; + opts.uppercaseOuterName = capitalize(opts.outerName); + fn$2[opts.name] = function dimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + if (ele.isParent()) { + ele.updateCompoundBounds(); + return _p[opts.autoName] || 0; + } + var d = ele.pstyle(opts.name); + switch (d.strValue) { + case "label": + ele.recalculateRenderedStyle(); + return _p.rstyle[opts.labelName] || 0; + default: + return d.pfValue; + } + } else { + return 1; + } + } + }; + fn$2["outer" + opts.uppercaseName] = function outerDimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + var dim = ele[opts.name](); + var border = ele.pstyle("border-width").pfValue; + var padding = 2 * ele.padding(); + return dim + border + padding; + } else { + return 1; + } + } + }; + fn$2["rendered" + opts.uppercaseName] = function renderedDimImpl() { + var ele = this[0]; + if (ele) { + var d = ele[opts.name](); + return d * this.cy().zoom(); + } + }; + fn$2["rendered" + opts.uppercaseOuterName] = function renderedOuterDimImpl() { + var ele = this[0]; + if (ele) { + var od = ele[opts.outerName](); + return od * this.cy().zoom(); + } + }; + }; + defineDimFns({ + name: "width" + }); + defineDimFns({ + name: "height" + }); + elesfn$a.padding = function() { + var ele = this[0]; + var _p = ele._private; + if (ele.isParent()) { + ele.updateCompoundBounds(); + if (_p.autoPadding !== void 0) { + return _p.autoPadding; + } else { + return ele.pstyle("padding").pfValue; + } + } else { + return ele.pstyle("padding").pfValue; + } + }; + elesfn$a.paddedHeight = function() { + var ele = this[0]; + return ele.height() + 2 * ele.padding(); + }; + elesfn$a.paddedWidth = function() { + var ele = this[0]; + return ele.width() + 2 * ele.padding(); + }; + var widthHeight = elesfn$a; + var ifEdge = function ifEdge2(ele, getValue2) { + if (ele.isEdge()) { + return getValue2(ele); + } + }; + var ifEdgeRenderedPosition = function ifEdgeRenderedPosition2(ele, getPoint) { + if (ele.isEdge()) { + var cy = ele.cy(); + return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan()); + } + }; + var ifEdgeRenderedPositions = function ifEdgeRenderedPositions2(ele, getPoints) { + if (ele.isEdge()) { + var cy = ele.cy(); + var pan = cy.pan(); + var zoom = cy.zoom(); + return getPoints(ele).map(function(p2) { + return modelToRenderedPosition(p2, zoom, pan); + }); + } + }; + var controlPoints = function controlPoints2(ele) { + return ele.renderer().getControlPoints(ele); + }; + var segmentPoints = function segmentPoints2(ele) { + return ele.renderer().getSegmentPoints(ele); + }; + var sourceEndpoint = function sourceEndpoint2(ele) { + return ele.renderer().getSourceEndpoint(ele); + }; + var targetEndpoint = function targetEndpoint2(ele) { + return ele.renderer().getTargetEndpoint(ele); + }; + var midpoint = function midpoint2(ele) { + return ele.renderer().getEdgeMidpoint(ele); + }; + var pts = { + controlPoints: { + get: controlPoints, + mult: true + }, + segmentPoints: { + get: segmentPoints, + mult: true + }, + sourceEndpoint: { + get: sourceEndpoint + }, + targetEndpoint: { + get: targetEndpoint + }, + midpoint: { + get: midpoint + } + }; + var renderedName = function renderedName2(name2) { + return "rendered" + name2[0].toUpperCase() + name2.substr(1); + }; + var edgePoints = Object.keys(pts).reduce(function(obj, name2) { + var spec = pts[name2]; + var rName = renderedName(name2); + obj[name2] = function() { + return ifEdge(this, spec.get); + }; + if (spec.mult) { + obj[rName] = function() { + return ifEdgeRenderedPositions(this, spec.get); + }; + } else { + obj[rName] = function() { + return ifEdgeRenderedPosition(this, spec.get); + }; + } + return obj; + }, {}); + var dimensions = extend({}, position, bounds, widthHeight, edgePoints); + /*! + Event object based on jQuery events, MIT license + + https://jquery.org/license/ + https://tldrlegal.com/license/mit-license + https://github.com/jquery/jquery/blob/master/src/event.js + */ + var Event = function Event2(src, props) { + this.recycle(src, props); + }; + function returnFalse() { + return false; + } + function returnTrue() { + return true; + } + Event.prototype = { + instanceString: function instanceString() { + return "event"; + }, + recycle: function recycle(src, props) { + this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse; + if (src != null && src.preventDefault) { + this.type = src.type; + this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse; + } else if (src != null && src.type) { + props = src; + } else { + this.type = src; + } + if (props != null) { + this.originalEvent = props.originalEvent; + this.type = props.type != null ? props.type : this.type; + this.cy = props.cy; + this.target = props.target; + this.position = props.position; + this.renderedPosition = props.renderedPosition; + this.namespace = props.namespace; + this.layout = props.layout; + } + if (this.cy != null && this.position != null && this.renderedPosition == null) { + var pos = this.position; + var zoom = this.cy.zoom(); + var pan = this.cy.pan(); + this.renderedPosition = { + x: pos.x * zoom + pan.x, + y: pos.y * zoom + pan.y + }; + } + this.timeStamp = src && src.timeStamp || Date.now(); + }, + preventDefault: function preventDefault() { + this.isDefaultPrevented = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + if (e.preventDefault) { + e.preventDefault(); + } + }, + stopPropagation: function stopPropagation() { + this.isPropagationStopped = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + if (e.stopPropagation) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function stopImmediatePropagation() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse + }; + var eventRegex = /^([^.]+)(\.(?:[^.]+))?$/; + var universalNamespace = ".*"; + var defaults$8 = { + qualifierCompare: function qualifierCompare(q1, q2) { + return q1 === q2; + }, + eventMatches: function eventMatches() { + return true; + }, + addEventFields: function addEventFields() { + }, + callbackContext: function callbackContext(context) { + return context; + }, + beforeEmit: function beforeEmit() { + }, + afterEmit: function afterEmit() { + }, + bubble: function bubble() { + return false; + }, + parent: function parent() { + return null; + }, + context: null + }; + var defaultsKeys = Object.keys(defaults$8); + var emptyOpts = {}; + function Emitter() { + var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : emptyOpts; + var context = arguments.length > 1 ? arguments[1] : void 0; + for (var i2 = 0; i2 < defaultsKeys.length; i2++) { + var key = defaultsKeys[i2]; + this[key] = opts[key] || defaults$8[key]; + } + this.context = context || this.context; + this.listeners = []; + this.emitting = 0; + } + var p = Emitter.prototype; + var forEachEvent = function forEachEvent2(self2, handler, events, qualifier, callback, conf, confOverrides) { + if (fn$6(qualifier)) { + callback = qualifier; + qualifier = null; + } + if (confOverrides) { + if (conf == null) { + conf = confOverrides; + } else { + conf = extend({}, conf, confOverrides); + } + } + var eventList = array(events) ? events : events.split(/\s+/); + for (var i2 = 0; i2 < eventList.length; i2++) { + var evt = eventList[i2]; + if (emptyString(evt)) { + continue; + } + var match2 = evt.match(eventRegex); + if (match2) { + var type = match2[1]; + var namespace = match2[2] ? match2[2] : null; + var ret = handler(self2, evt, type, namespace, qualifier, callback, conf); + if (ret === false) { + break; + } + } + } + }; + var makeEventObj = function makeEventObj2(self2, obj) { + self2.addEventFields(self2.context, obj); + return new Event(obj.type, obj); + }; + var forEachEventObj = function forEachEventObj2(self2, handler, events) { + if (event(events)) { + handler(self2, events); + return; + } else if (plainObject(events)) { + handler(self2, makeEventObj(self2, events)); + return; + } + var eventList = array(events) ? events : events.split(/\s+/); + for (var i2 = 0; i2 < eventList.length; i2++) { + var evt = eventList[i2]; + if (emptyString(evt)) { + continue; + } + var match2 = evt.match(eventRegex); + if (match2) { + var type = match2[1]; + var namespace = match2[2] ? match2[2] : null; + var eventObj = makeEventObj(self2, { + type, + namespace, + target: self2.context + }); + handler(self2, eventObj); + } + } + }; + p.on = p.addListener = function(events, qualifier, callback, conf, confOverrides) { + forEachEvent(this, function(self2, event2, type, namespace, qualifier2, callback2, conf2) { + if (fn$6(callback2)) { + self2.listeners.push({ + event: event2, + // full event string + callback: callback2, + // callback to run + type, + // the event type (e.g. 'click') + namespace, + // the event namespace (e.g. ".foo") + qualifier: qualifier2, + // a restriction on whether to match this emitter + conf: conf2 + // additional configuration + }); + } + }, events, qualifier, callback, conf, confOverrides); + return this; + }; + p.one = function(events, qualifier, callback, conf) { + return this.on(events, qualifier, callback, conf, { + one: true + }); + }; + p.removeListener = p.off = function(events, qualifier, callback, conf) { + var _this = this; + if (this.emitting !== 0) { + this.listeners = copyArray$1(this.listeners); + } + var listeners = this.listeners; + var _loop = function _loop2(i3) { + var listener = listeners[i3]; + forEachEvent(_this, function(self2, event2, type, namespace, qualifier2, callback2) { + if ((listener.type === type || events === "*") && (!namespace && listener.namespace !== ".*" || listener.namespace === namespace) && (!qualifier2 || self2.qualifierCompare(listener.qualifier, qualifier2)) && (!callback2 || listener.callback === callback2)) { + listeners.splice(i3, 1); + return false; + } + }, events, qualifier, callback, conf); + }; + for (var i2 = listeners.length - 1; i2 >= 0; i2--) { + _loop(i2); + } + return this; + }; + p.removeAllListeners = function() { + return this.removeListener("*"); + }; + p.emit = p.trigger = function(events, extraParams, manualCallback) { + var listeners = this.listeners; + var numListenersBeforeEmit = listeners.length; + this.emitting++; + if (!array(extraParams)) { + extraParams = [extraParams]; + } + forEachEventObj(this, function(self2, eventObj) { + if (manualCallback != null) { + listeners = [{ + event: eventObj.event, + type: eventObj.type, + namespace: eventObj.namespace, + callback: manualCallback + }]; + numListenersBeforeEmit = listeners.length; + } + var _loop2 = function _loop22(i3) { + var listener = listeners[i3]; + if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self2.eventMatches(self2.context, listener, eventObj)) { + var args = [eventObj]; + if (extraParams != null) { + push(args, extraParams); + } + self2.beforeEmit(self2.context, listener, eventObj); + if (listener.conf && listener.conf.one) { + self2.listeners = self2.listeners.filter(function(l) { + return l !== listener; + }); + } + var context = self2.callbackContext(self2.context, listener, eventObj); + var ret = listener.callback.apply(context, args); + self2.afterEmit(self2.context, listener, eventObj); + if (ret === false) { + eventObj.stopPropagation(); + eventObj.preventDefault(); + } + } + }; + for (var i2 = 0; i2 < numListenersBeforeEmit; i2++) { + _loop2(i2); + } + if (self2.bubble(self2.context) && !eventObj.isPropagationStopped()) { + self2.parent(self2.context).emit(eventObj, extraParams); + } + }, events); + this.emitting--; + return this; + }; + var emitterOptions$1 = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(ele, listener, eventObj) { + var selector = listener.qualifier; + if (selector != null) { + return ele !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(ele, evt) { + evt.cy = ele.cy(); + evt.target = ele; + }, + callbackContext: function callbackContext(ele, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : ele; + }, + beforeEmit: function beforeEmit(context, listener) { + if (listener.conf && listener.conf.once) { + listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback); + } + }, + bubble: function bubble() { + return true; + }, + parent: function parent(ele) { + return ele.isChild() ? ele.parent() : ele.cy(); + } + }; + var argSelector$1 = function argSelector2(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + var elesfn$9 = { + createEmitter: function createEmitter() { + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var _p = ele._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions$1, ele); + } + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + ele.emitter().on(events, argSel, callback); + } + return this; + }, + removeListener: function removeListener(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + ele.emitter().removeListener(events, argSel, callback); + } + return this; + }, + removeAllListeners: function removeAllListeners() { + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + ele.emitter().removeAllListeners(); + } + return this; + }, + one: function one(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + ele.emitter().one(events, argSel, callback); + } + return this; + }, + once: function once(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + ele.emitter().on(events, argSel, callback, { + once: true, + onceCollection: this + }); + } + }, + emit: function emit(events, extraParams) { + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + ele.emitter().emit(events, extraParams); + } + return this; + }, + emitAndNotify: function emitAndNotify(event2, extraParams) { + if (this.length === 0) { + return; + } + this.cy().notify(event2, this); + this.emit(event2, extraParams); + return this; + } + }; + define.eventAliasesOn(elesfn$9); + var elesfn$8 = { + nodes: function nodes2(selector) { + return this.filter(function(ele) { + return ele.isNode(); + }).filter(selector); + }, + edges: function edges(selector) { + return this.filter(function(ele) { + return ele.isEdge(); + }).filter(selector); + }, + // internal helper to get nodes and edges as separate collections with single iteration over elements + byGroup: function byGroup() { + var nodes2 = this.spawn(); + var edges = this.spawn(); + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + if (ele.isNode()) { + nodes2.push(ele); + } else { + edges.push(ele); + } + } + return { + nodes: nodes2, + edges + }; + }, + filter: function filter2(_filter, thisArg) { + if (_filter === void 0) { + return this; + } else if (string(_filter) || elementOrCollection(_filter)) { + return new Selector(_filter).filter(this); + } else if (fn$6(_filter)) { + var filterEles = this.spawn(); + var eles = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var include = thisArg ? _filter.apply(thisArg, [ele, i2, eles]) : _filter(ele, i2, eles); + if (include) { + filterEles.push(ele); + } + } + return filterEles; + } + return this.spawn(); + }, + not: function not(toRemove) { + if (!toRemove) { + return this; + } else { + if (string(toRemove)) { + toRemove = this.filter(toRemove); + } + var elements2 = this.spawn(); + for (var i2 = 0; i2 < this.length; i2++) { + var element2 = this[i2]; + var remove = toRemove.has(element2); + if (!remove) { + elements2.push(element2); + } + } + return elements2; + } + }, + absoluteComplement: function absoluteComplement() { + var cy = this.cy(); + return cy.mutableElements().not(this); + }, + intersect: function intersect(other) { + if (string(other)) { + var selector = other; + return this.filter(selector); + } + var elements2 = this.spawn(); + var col1 = this; + var col2 = other; + var col1Smaller = this.length < other.length; + var colS = col1Smaller ? col1 : col2; + var colL = col1Smaller ? col2 : col1; + for (var i2 = 0; i2 < colS.length; i2++) { + var ele = colS[i2]; + if (colL.has(ele)) { + elements2.push(ele); + } + } + return elements2; + }, + xor: function xor(other) { + var cy = this._private.cy; + if (string(other)) { + other = cy.$(other); + } + var elements2 = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add2(col, other2) { + for (var i2 = 0; i2 < col.length; i2++) { + var ele = col[i2]; + var id = ele._private.data.id; + var inOther = other2.hasElementWithId(id); + if (!inOther) { + elements2.push(ele); + } + } + }; + add(col1, col2); + add(col2, col1); + return elements2; + }, + diff: function diff(other) { + var cy = this._private.cy; + if (string(other)) { + other = cy.$(other); + } + var left = this.spawn(); + var right = this.spawn(); + var both = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add2(col, other2, retEles) { + for (var i2 = 0; i2 < col.length; i2++) { + var ele = col[i2]; + var id = ele._private.data.id; + var inOther = other2.hasElementWithId(id); + if (inOther) { + both.merge(ele); + } else { + retEles.push(ele); + } + } + }; + add(col1, col2, left); + add(col2, col1, right); + return { + left, + right, + both + }; + }, + add: function add(toAdd) { + var cy = this._private.cy; + if (!toAdd) { + return this; + } + if (string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + var elements2 = this.spawnSelf(); + for (var i2 = 0; i2 < toAdd.length; i2++) { + var ele = toAdd[i2]; + var add2 = !this.has(ele); + if (add2) { + elements2.push(ele); + } + } + return elements2; + }, + // in place merge on calling collection + merge: function merge(toAdd) { + var _p = this._private; + var cy = _p.cy; + if (!toAdd) { + return this; + } + if (toAdd && string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + var map = _p.map; + for (var i2 = 0; i2 < toAdd.length; i2++) { + var toAddEle = toAdd[i2]; + var id = toAddEle._private.data.id; + var add = !map.has(id); + if (add) { + var index = this.length++; + this[index] = toAddEle; + map.set(id, { + ele: toAddEle, + index + }); + } + } + return this; + }, + unmergeAt: function unmergeAt(i2) { + var ele = this[i2]; + var id = ele.id(); + var _p = this._private; + var map = _p.map; + this[i2] = void 0; + map["delete"](id); + var unmergedLastEle = i2 === this.length - 1; + if (this.length > 1 && !unmergedLastEle) { + var lastEleI = this.length - 1; + var lastEle = this[lastEleI]; + var lastEleId = lastEle._private.data.id; + this[lastEleI] = void 0; + this[i2] = lastEle; + map.set(lastEleId, { + ele: lastEle, + index: i2 + }); + } + this.length--; + return this; + }, + // remove single ele in place in calling collection + unmergeOne: function unmergeOne(ele) { + ele = ele[0]; + var _p = this._private; + var id = ele._private.data.id; + var map = _p.map; + var entry = map.get(id); + if (!entry) { + return this; + } + var i2 = entry.index; + this.unmergeAt(i2); + return this; + }, + // remove eles in place on calling collection + unmerge: function unmerge(toRemove) { + var cy = this._private.cy; + if (!toRemove) { + return this; + } + if (toRemove && string(toRemove)) { + var selector = toRemove; + toRemove = cy.mutableElements().filter(selector); + } + for (var i2 = 0; i2 < toRemove.length; i2++) { + this.unmergeOne(toRemove[i2]); + } + return this; + }, + unmergeBy: function unmergeBy(toRmFn) { + for (var i2 = this.length - 1; i2 >= 0; i2--) { + var ele = this[i2]; + if (toRmFn(ele)) { + this.unmergeAt(i2); + } + } + return this; + }, + map: function map(mapFn, thisArg) { + var arr = []; + var eles = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var ret = thisArg ? mapFn.apply(thisArg, [ele, i2, eles]) : mapFn(ele, i2, eles); + arr.push(ret); + } + return arr; + }, + reduce: function reduce(fn2, initialValue) { + var val = initialValue; + var eles = this; + for (var i2 = 0; i2 < eles.length; i2++) { + val = fn2(val, eles[i2], i2, eles); + } + return val; + }, + max: function max2(valFn, thisArg) { + var max3 = -Infinity; + var maxEle; + var eles = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var val = thisArg ? valFn.apply(thisArg, [ele, i2, eles]) : valFn(ele, i2, eles); + if (val > max3) { + max3 = val; + maxEle = ele; + } + } + return { + value: max3, + ele: maxEle + }; + }, + min: function min2(valFn, thisArg) { + var min3 = Infinity; + var minEle; + var eles = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var val = thisArg ? valFn.apply(thisArg, [ele, i2, eles]) : valFn(ele, i2, eles); + if (val < min3) { + min3 = val; + minEle = ele; + } + } + return { + value: min3, + ele: minEle + }; + } + }; + var fn$1 = elesfn$8; + fn$1["u"] = fn$1["|"] = fn$1["+"] = fn$1.union = fn$1.or = fn$1.add; + fn$1["\\"] = fn$1["!"] = fn$1["-"] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not; + fn$1["n"] = fn$1["&"] = fn$1["."] = fn$1.and = fn$1.intersection = fn$1.intersect; + fn$1["^"] = fn$1["(+)"] = fn$1["(-)"] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor; + fn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter; + fn$1.complement = fn$1.abscomp = fn$1.absoluteComplement; + var elesfn$7 = { + isNode: function isNode() { + return this.group() === "nodes"; + }, + isEdge: function isEdge() { + return this.group() === "edges"; + }, + isLoop: function isLoop() { + return this.isEdge() && this.source()[0] === this.target()[0]; + }, + isSimple: function isSimple() { + return this.isEdge() && this.source()[0] !== this.target()[0]; + }, + group: function group() { + var ele = this[0]; + if (ele) { + return ele._private.group; + } + } + }; + var zIndexSort = function zIndexSort2(a, b) { + var cy = a.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + function getDepth(ele) { + var style = ele.pstyle("z-compound-depth"); + if (style.value === "auto") { + return hasCompoundNodes ? ele.zDepth() : 0; + } else if (style.value === "bottom") { + return -1; + } else if (style.value === "top") { + return MAX_INT$1; + } + return 0; + } + var depthDiff = getDepth(a) - getDepth(b); + if (depthDiff !== 0) { + return depthDiff; + } + function getEleDepth(ele) { + var style = ele.pstyle("z-index-compare"); + if (style.value === "auto") { + return ele.isNode() ? 1 : 0; + } + return 0; + } + var eleDiff = getEleDepth(a) - getEleDepth(b); + if (eleDiff !== 0) { + return eleDiff; + } + var zDiff = a.pstyle("z-index").value - b.pstyle("z-index").value; + if (zDiff !== 0) { + return zDiff; + } + return a.poolIndex() - b.poolIndex(); + }; + var elesfn$6 = { + forEach: function forEach(fn2, thisArg) { + if (fn$6(fn2)) { + var N = this.length; + for (var i2 = 0; i2 < N; i2++) { + var ele = this[i2]; + var ret = thisArg ? fn2.apply(thisArg, [ele, i2, this]) : fn2(ele, i2, this); + if (ret === false) { + break; + } + } + } + return this; + }, + toArray: function toArray() { + var array2 = []; + for (var i2 = 0; i2 < this.length; i2++) { + array2.push(this[i2]); + } + return array2; + }, + slice: function slice(start, end) { + var array2 = []; + var thisSize = this.length; + if (end == null) { + end = thisSize; + } + if (start == null) { + start = 0; + } + if (start < 0) { + start = thisSize + start; + } + if (end < 0) { + end = thisSize + end; + } + for (var i2 = start; i2 >= 0 && i2 < end && i2 < thisSize; i2++) { + array2.push(this[i2]); + } + return this.spawn(array2); + }, + size: function size() { + return this.length; + }, + eq: function eq2(i2) { + return this[i2] || this.spawn(); + }, + first: function first() { + return this[0] || this.spawn(); + }, + last: function last() { + return this[this.length - 1] || this.spawn(); + }, + empty: function empty() { + return this.length === 0; + }, + nonempty: function nonempty() { + return !this.empty(); + }, + sort: function sort(sortFn) { + if (!fn$6(sortFn)) { + return this; + } + var sorted = this.toArray().sort(sortFn); + return this.spawn(sorted); + }, + sortByZIndex: function sortByZIndex() { + return this.sort(zIndexSort); + }, + zDepth: function zDepth() { + var ele = this[0]; + if (!ele) { + return void 0; + } + var _p = ele._private; + var group = _p.group; + if (group === "nodes") { + var depth = _p.data.parent ? ele.parents().size() : 0; + if (!ele.isParent()) { + return MAX_INT$1 - 1; + } + return depth; + } else { + var src = _p.source; + var tgt = _p.target; + var srcDepth = src.zDepth(); + var tgtDepth = tgt.zDepth(); + return Math.max(srcDepth, tgtDepth, 0); + } + } + }; + elesfn$6.each = elesfn$6.forEach; + var defineSymbolIterator = function defineSymbolIterator2() { + var typeofUndef = "undefined"; + var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; + if (isIteratorSupported) { + elesfn$6[Symbol.iterator] = function() { + var _this = this; + var entry = { + value: void 0, + done: false + }; + var i2 = 0; + var length = this.length; + return _defineProperty$1({ + next: function next2() { + if (i2 < length) { + entry.value = _this[i2++]; + } else { + entry.value = void 0; + entry.done = true; + } + return entry; + } + }, Symbol.iterator, function() { + return this; + }); + }; + } + }; + defineSymbolIterator(); + var getLayoutDimensionOptions = defaults$g({ + nodeDimensionsIncludeLabels: false + }); + var elesfn$5 = { + // Calculates and returns node dimensions { x, y } based on options given + layoutDimensions: function layoutDimensions(options) { + options = getLayoutDimensionOptions(options); + var dims; + if (!this.takesUpSpace()) { + dims = { + w: 0, + h: 0 + }; + } else if (options.nodeDimensionsIncludeLabels) { + var bbDim = this.boundingBox(); + dims = { + w: bbDim.w, + h: bbDim.h + }; + } else { + dims = { + w: this.outerWidth(), + h: this.outerHeight() + }; + } + if (dims.w === 0 || dims.h === 0) { + dims.w = dims.h = 1; + } + return dims; + }, + // using standard layout options, apply position function (w/ or w/o animation) + layoutPositions: function layoutPositions(layout2, options, fn2) { + var nodes2 = this.nodes().filter(function(n) { + return !n.isParent(); + }); + var cy = this.cy(); + var layoutEles = options.eles; + var getMemoizeKey = function getMemoizeKey2(node2) { + return node2.id(); + }; + var fnMem = memoize$1(fn2, getMemoizeKey); + layout2.emit({ + type: "layoutstart", + layout: layout2 + }); + layout2.animations = []; + var calculateSpacing = function calculateSpacing2(spacing, nodesBb, pos) { + var center = { + x: nodesBb.x1 + nodesBb.w / 2, + y: nodesBb.y1 + nodesBb.h / 2 + }; + var spacingVector = { + // scale from center of bounding box (not necessarily 0,0) + x: (pos.x - center.x) * spacing, + y: (pos.y - center.y) * spacing + }; + return { + x: center.x + spacingVector.x, + y: center.y + spacingVector.y + }; + }; + var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1; + var spacingBb = function spacingBb2() { + if (!useSpacingFactor) { + return null; + } + var bb2 = makeBoundingBox(); + for (var i3 = 0; i3 < nodes2.length; i3++) { + var node2 = nodes2[i3]; + var pos = fnMem(node2, i3); + expandBoundingBoxByPoint(bb2, pos.x, pos.y); + } + return bb2; + }; + var bb = spacingBb(); + var getFinalPos = memoize$1(function(node2, i3) { + var newPos2 = fnMem(node2, i3); + if (useSpacingFactor) { + var spacing = Math.abs(options.spacingFactor); + newPos2 = calculateSpacing(spacing, bb, newPos2); + } + if (options.transform != null) { + newPos2 = options.transform(node2, newPos2); + } + return newPos2; + }, getMemoizeKey); + if (options.animate) { + for (var i2 = 0; i2 < nodes2.length; i2++) { + var node = nodes2[i2]; + var newPos = getFinalPos(node, i2); + var animateNode = options.animateFilter == null || options.animateFilter(node, i2); + if (animateNode) { + var ani = node.animation({ + position: newPos, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout2.animations.push(ani); + } else { + node.position(newPos); + } + } + if (options.fit) { + var fitAni = cy.animation({ + fit: { + boundingBox: layoutEles.boundingBoxAt(getFinalPos), + padding: options.padding + }, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout2.animations.push(fitAni); + } else if (options.zoom !== void 0 && options.pan !== void 0) { + var zoomPanAni = cy.animation({ + zoom: options.zoom, + pan: options.pan, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout2.animations.push(zoomPanAni); + } + layout2.animations.forEach(function(ani2) { + return ani2.play(); + }); + layout2.one("layoutready", options.ready); + layout2.emit({ + type: "layoutready", + layout: layout2 + }); + Promise$1.all(layout2.animations.map(function(ani2) { + return ani2.promise(); + })).then(function() { + layout2.one("layoutstop", options.stop); + layout2.emit({ + type: "layoutstop", + layout: layout2 + }); + }); + } else { + nodes2.positions(getFinalPos); + if (options.fit) { + cy.fit(options.eles, options.padding); + } + if (options.zoom != null) { + cy.zoom(options.zoom); + } + if (options.pan) { + cy.pan(options.pan); + } + layout2.one("layoutready", options.ready); + layout2.emit({ + type: "layoutready", + layout: layout2 + }); + layout2.one("layoutstop", options.stop); + layout2.emit({ + type: "layoutstop", + layout: layout2 + }); + } + return this; + }, + layout: function layout2(options) { + var cy = this.cy(); + return cy.makeLayout(extend({}, options, { + eles: this + })); + } + }; + elesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout; + function styleCache(key, fn2, ele) { + var _p = ele._private; + var cache2 = _p.styleCache = _p.styleCache || []; + var val; + if ((val = cache2[key]) != null) { + return val; + } else { + val = cache2[key] = fn2(ele); + return val; + } + } + function cacheStyleFunction(key, fn2) { + key = hashString(key); + return function cachedStyleFunction(ele) { + return styleCache(key, fn2, ele); + }; + } + function cachePrototypeStyleFunction(key, fn2) { + key = hashString(key); + var selfFn = function selfFn2(ele) { + return fn2.call(ele); + }; + return function cachedPrototypeStyleFunction() { + var ele = this[0]; + if (ele) { + return styleCache(key, selfFn, ele); + } + }; + } + var elesfn$4 = { + recalculateRenderedStyle: function recalculateRenderedStyle(useCache) { + var cy = this.cy(); + var renderer2 = cy.renderer(); + var styleEnabled = cy.styleEnabled(); + if (renderer2 && styleEnabled) { + renderer2.recalculateRenderedStyle(this, useCache); + } + return this; + }, + dirtyStyleCache: function dirtyStyleCache() { + var cy = this.cy(); + var dirty = function dirty2(ele) { + return ele._private.styleCache = null; + }; + if (cy.hasCompoundNodes()) { + var eles; + eles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + eles.merge(eles.connectedEdges()); + eles.forEach(dirty); + } else { + this.forEach(function(ele) { + dirty(ele); + ele.connectedEdges().forEach(dirty); + }); + } + return this; + }, + // fully updates (recalculates) the style for the elements + updateStyle: function updateStyle(notifyRenderer) { + var cy = this._private.cy; + if (!cy.styleEnabled()) { + return this; + } + if (cy.batching()) { + var bEles = cy._private.batchStyleEles; + bEles.merge(this); + return this; + } + var hasCompounds = cy.hasCompoundNodes(); + var updatedEles = this; + notifyRenderer = notifyRenderer || notifyRenderer === void 0 ? true : false; + if (hasCompounds) { + updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + } + var changedEles = updatedEles; + if (notifyRenderer) { + changedEles.emitAndNotify("style"); + } else { + changedEles.emit("style"); + } + updatedEles.forEach(function(ele) { + return ele._private.styleDirty = true; + }); + return this; + }, + // private: clears dirty flag and recalculates style + cleanStyle: function cleanStyle() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return; + } + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + if (ele._private.styleDirty) { + ele._private.styleDirty = false; + cy.style().apply(ele); + } + } + }, + // get the internal parsed style object for the specified property + parsedStyle: function parsedStyle(property) { + var includeNonDefault = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var ele = this[0]; + var cy = ele.cy(); + if (!cy.styleEnabled()) { + return; + } + if (ele) { + this.cleanStyle(); + var overriddenStyle = ele._private.style[property]; + if (overriddenStyle != null) { + return overriddenStyle; + } else if (includeNonDefault) { + return cy.style().getDefaultProperty(property); + } else { + return null; + } + } + }, + numericStyle: function numericStyle(property) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + var pstyle = ele.pstyle(property); + return pstyle.pfValue !== void 0 ? pstyle.pfValue : pstyle.value; + } + }, + numericStyleUnits: function numericStyleUnits(property) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + return ele.pstyle(property).units; + } + }, + // get the specified css property as a rendered value (i.e. on-screen value) + // or get the whole rendered style if no property specified (NB doesn't allow setting) + renderedStyle: function renderedStyle(property) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var ele = this[0]; + if (ele) { + return cy.style().getRenderedStyle(ele, property); + } + }, + // read the calculated css style of the element or override the style (via a bypass) + style: function style(name2, value) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style2 = cy.style(); + if (plainObject(name2)) { + var props = name2; + style2.applyBypass(this, props, updateTransitions); + this.emitAndNotify("style"); + } else if (string(name2)) { + if (value === void 0) { + var ele = this[0]; + if (ele) { + return style2.getStylePropertyValue(ele, name2); + } else { + return; + } + } else { + style2.applyBypass(this, name2, value, updateTransitions); + this.emitAndNotify("style"); + } + } else if (name2 === void 0) { + var _ele = this[0]; + if (_ele) { + return style2.getRawStyle(_ele); + } else { + return; + } + } + return this; + }, + removeStyle: function removeStyle(names) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style = cy.style(); + var eles = this; + if (names === void 0) { + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + style.removeAllBypasses(ele, updateTransitions); + } + } else { + names = names.split(/\s+/); + for (var _i = 0; _i < eles.length; _i++) { + var _ele2 = eles[_i]; + style.removeBypasses(_ele2, names, updateTransitions); + } + } + this.emitAndNotify("style"); + return this; + }, + show: function show() { + this.css("display", "element"); + return this; + }, + hide: function hide() { + this.css("display", "none"); + return this; + }, + effectiveOpacity: function effectiveOpacity() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return 1; + } + var hasCompoundNodes = cy.hasCompoundNodes(); + var ele = this[0]; + if (ele) { + var _p = ele._private; + var parentOpacity = ele.pstyle("opacity").value; + if (!hasCompoundNodes) { + return parentOpacity; + } + var parents = !_p.data.parent ? null : ele.parents(); + if (parents) { + for (var i2 = 0; i2 < parents.length; i2++) { + var parent = parents[i2]; + var opacity = parent.pstyle("opacity").value; + parentOpacity = opacity * parentOpacity; + } + } + return parentOpacity; + } + }, + transparent: function transparent() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + var hasCompoundNodes = ele.cy().hasCompoundNodes(); + if (ele) { + if (!hasCompoundNodes) { + return ele.pstyle("opacity").value === 0; + } else { + return ele.effectiveOpacity() === 0; + } + } + }, + backgrounding: function backgrounding() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + return ele._private.backgrounding ? true : false; + } + }; + function checkCompound(ele, parentOk) { + var _p = ele._private; + var parents = _p.data.parent ? ele.parents() : null; + if (parents) { + for (var i2 = 0; i2 < parents.length; i2++) { + var parent = parents[i2]; + if (!parentOk(parent)) { + return false; + } + } + } + return true; + } + function defineDerivedStateFunction(specs) { + var ok = specs.ok; + var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; + var parentOk = specs.parentOk || specs.ok; + return function() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return true; + } + var ele = this[0]; + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele) { + var _p = ele._private; + if (!ok(ele)) { + return false; + } + if (ele.isNode()) { + return !hasCompoundNodes || checkCompound(ele, parentOk); + } else { + var src = _p.source; + var tgt = _p.target; + return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); + } + } + }; + } + var eleTakesUpSpace = cacheStyleFunction("eleTakesUpSpace", function(ele) { + return ele.pstyle("display").value === "element" && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true); + }); + elesfn$4.takesUpSpace = cachePrototypeStyleFunction("takesUpSpace", defineDerivedStateFunction({ + ok: eleTakesUpSpace + })); + var eleInteractive = cacheStyleFunction("eleInteractive", function(ele) { + return ele.pstyle("events").value === "yes" && ele.pstyle("visibility").value === "visible" && eleTakesUpSpace(ele); + }); + var parentInteractive = cacheStyleFunction("parentInteractive", function(parent) { + return parent.pstyle("visibility").value === "visible" && eleTakesUpSpace(parent); + }); + elesfn$4.interactive = cachePrototypeStyleFunction("interactive", defineDerivedStateFunction({ + ok: eleInteractive, + parentOk: parentInteractive, + edgeOkViaNode: eleTakesUpSpace + })); + elesfn$4.noninteractive = function() { + var ele = this[0]; + if (ele) { + return !ele.interactive(); + } + }; + var eleVisible = cacheStyleFunction("eleVisible", function(ele) { + return ele.pstyle("visibility").value === "visible" && ele.pstyle("opacity").pfValue !== 0 && eleTakesUpSpace(ele); + }); + var edgeVisibleViaNode = eleTakesUpSpace; + elesfn$4.visible = cachePrototypeStyleFunction("visible", defineDerivedStateFunction({ + ok: eleVisible, + edgeOkViaNode: edgeVisibleViaNode + })); + elesfn$4.hidden = function() { + var ele = this[0]; + if (ele) { + return !ele.visible(); + } + }; + elesfn$4.isBundledBezier = cachePrototypeStyleFunction("isBundledBezier", function() { + if (!this.cy().styleEnabled()) { + return false; + } + return !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace(); + }); + elesfn$4.bypass = elesfn$4.css = elesfn$4.style; + elesfn$4.renderedCss = elesfn$4.renderedStyle; + elesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle; + elesfn$4.pstyle = elesfn$4.parsedStyle; + var elesfn$3 = {}; + function defineSwitchFunction(params) { + return function() { + var args = arguments; + var changedEles = []; + if (args.length === 2) { + var data2 = args[0]; + var handler = args[1]; + this.on(params.event, data2, handler); + } else if (args.length === 1 && fn$6(args[0])) { + var _handler = args[0]; + this.on(params.event, _handler); + } else if (args.length === 0 || args.length === 1 && array(args[0])) { + var addlEvents = args.length === 1 ? args[0] : null; + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var able = !params.ableField || ele._private[params.ableField]; + var changed = ele._private[params.field] != params.value; + if (params.overrideAble) { + var overrideAble = params.overrideAble(ele); + if (overrideAble !== void 0) { + able = overrideAble; + if (!overrideAble) { + return this; + } + } + } + if (able) { + ele._private[params.field] = params.value; + if (changed) { + changedEles.push(ele); + } + } + } + var changedColl = this.spawn(changedEles); + changedColl.updateStyle(); + changedColl.emit(params.event); + if (addlEvents) { + changedColl.emit(addlEvents); + } + } + return this; + }; + } + function defineSwitchSet(params) { + elesfn$3[params.field] = function() { + var ele = this[0]; + if (ele) { + if (params.overrideField) { + var val = params.overrideField(ele); + if (val !== void 0) { + return val; + } + } + return ele._private[params.field]; + } + }; + elesfn$3[params.on] = defineSwitchFunction({ + event: params.on, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: true + }); + elesfn$3[params.off] = defineSwitchFunction({ + event: params.off, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: false + }); + } + defineSwitchSet({ + field: "locked", + overrideField: function overrideField(ele) { + return ele.cy().autolock() ? true : void 0; + }, + on: "lock", + off: "unlock" + }); + defineSwitchSet({ + field: "grabbable", + overrideField: function overrideField(ele) { + return ele.cy().autoungrabify() || ele.pannable() ? false : void 0; + }, + on: "grabify", + off: "ungrabify" + }); + defineSwitchSet({ + field: "selected", + ableField: "selectable", + overrideAble: function overrideAble(ele) { + return ele.cy().autounselectify() ? false : void 0; + }, + on: "select", + off: "unselect" + }); + defineSwitchSet({ + field: "selectable", + overrideField: function overrideField(ele) { + return ele.cy().autounselectify() ? false : void 0; + }, + on: "selectify", + off: "unselectify" + }); + elesfn$3.deselect = elesfn$3.unselect; + elesfn$3.grabbed = function() { + var ele = this[0]; + if (ele) { + return ele._private.grabbed; + } + }; + defineSwitchSet({ + field: "active", + on: "activate", + off: "unactivate" + }); + defineSwitchSet({ + field: "pannable", + on: "panify", + off: "unpanify" + }); + elesfn$3.inactive = function() { + var ele = this[0]; + if (ele) { + return !ele._private.active; + } + }; + var elesfn$2 = {}; + var defineDagExtremity = function defineDagExtremity2(params) { + return function dagExtremityImpl(selector) { + var eles = this; + var ret = []; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + if (!ele.isNode()) { + continue; + } + var disqualified = false; + var edges = ele.connectedEdges(); + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { + disqualified = true; + break; + } + } + if (!disqualified) { + ret.push(ele); + } + } + return this.spawn(ret, true).filter(selector); + }; + }; + var defineDagOneHop = function defineDagOneHop2(params) { + return function(selector) { + var eles = this; + var oEles = []; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + if (!ele.isNode()) { + continue; + } + var edges = ele.connectedEdges(); + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.outgoing && src === ele) { + oEles.push(edge); + oEles.push(tgt); + } else if (params.incoming && tgt === ele) { + oEles.push(edge); + oEles.push(src); + } + } + } + return this.spawn(oEles, true).filter(selector); + }; + }; + var defineDagAllHops = function defineDagAllHops2(params) { + return function(selector) { + var eles = this; + var sEles = []; + var sElesIds = {}; + for (; ; ) { + var next2 = params.outgoing ? eles.outgoers() : eles.incomers(); + if (next2.length === 0) { + break; + } + var newNext = false; + for (var i2 = 0; i2 < next2.length; i2++) { + var n = next2[i2]; + var nid = n.id(); + if (!sElesIds[nid]) { + sElesIds[nid] = true; + sEles.push(n); + newNext = true; + } + } + if (!newNext) { + break; + } + eles = next2; + } + return this.spawn(sEles, true).filter(selector); + }; + }; + elesfn$2.clearTraversalCache = function() { + for (var i2 = 0; i2 < this.length; i2++) { + this[i2]._private.traversalCache = null; + } + }; + extend(elesfn$2, { + // get the root nodes in the DAG + roots: defineDagExtremity({ + noIncomingEdges: true + }), + // get the leaf nodes in the DAG + leaves: defineDagExtremity({ + noOutgoingEdges: true + }), + // normally called children in graph theory + // these nodes =edges=> outgoing nodes + outgoers: cache(defineDagOneHop({ + outgoing: true + }), "outgoers"), + // aka DAG descendants + successors: defineDagAllHops({ + outgoing: true + }), + // normally called parents in graph theory + // these nodes <=edges= incoming nodes + incomers: cache(defineDagOneHop({ + incoming: true + }), "incomers"), + // aka DAG ancestors + predecessors: defineDagAllHops({ + incoming: true + }) + }); + extend(elesfn$2, { + neighborhood: cache(function(selector) { + var elements2 = []; + var nodes2 = this.nodes(); + for (var i2 = 0; i2 < nodes2.length; i2++) { + var node = nodes2[i2]; + var connectedEdges = node.connectedEdges(); + for (var j = 0; j < connectedEdges.length; j++) { + var edge = connectedEdges[j]; + var src = edge.source(); + var tgt = edge.target(); + var otherNode = node === src ? tgt : src; + if (otherNode.length > 0) { + elements2.push(otherNode[0]); + } + elements2.push(edge[0]); + } + } + return this.spawn(elements2, true).filter(selector); + }, "neighborhood"), + closedNeighborhood: function closedNeighborhood(selector) { + return this.neighborhood().add(this).filter(selector); + }, + openNeighborhood: function openNeighborhood(selector) { + return this.neighborhood(selector); + } + }); + elesfn$2.neighbourhood = elesfn$2.neighborhood; + elesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood; + elesfn$2.openNeighbourhood = elesfn$2.openNeighborhood; + extend(elesfn$2, { + source: cache(function sourceImpl(selector) { + var ele = this[0]; + var src; + if (ele) { + src = ele._private.source || ele.cy().collection(); + } + return src && selector ? src.filter(selector) : src; + }, "source"), + target: cache(function targetImpl(selector) { + var ele = this[0]; + var tgt; + if (ele) { + tgt = ele._private.target || ele.cy().collection(); + } + return tgt && selector ? tgt.filter(selector) : tgt; + }, "target"), + sources: defineSourceFunction({ + attr: "source" + }), + targets: defineSourceFunction({ + attr: "target" + }) + }); + function defineSourceFunction(params) { + return function sourceImpl(selector) { + var sources = []; + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var src = ele._private[params.attr]; + if (src) { + sources.push(src); + } + } + return this.spawn(sources, true).filter(selector); + }; + } + extend(elesfn$2, { + edgesWith: cache(defineEdgesWithFunction(), "edgesWith"), + edgesTo: cache(defineEdgesWithFunction({ + thisIsSrc: true + }), "edgesTo") + }); + function defineEdgesWithFunction(params) { + return function edgesWithImpl(otherNodes) { + var elements2 = []; + var cy = this._private.cy; + var p2 = params || {}; + if (string(otherNodes)) { + otherNodes = cy.$(otherNodes); + } + for (var h = 0; h < otherNodes.length; h++) { + var edges = otherNodes[h]._private.edges; + for (var i2 = 0; i2 < edges.length; i2++) { + var edge = edges[i2]; + var edgeData = edge._private.data; + var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); + var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); + var edgeConnectsThisAndOther = thisToOther || otherToThis; + if (!edgeConnectsThisAndOther) { + continue; + } + if (p2.thisIsSrc || p2.thisIsTgt) { + if (p2.thisIsSrc && !thisToOther) { + continue; + } + if (p2.thisIsTgt && !otherToThis) { + continue; + } + } + elements2.push(edge); + } + } + return this.spawn(elements2, true); + }; + } + extend(elesfn$2, { + connectedEdges: cache(function(selector) { + var retEles = []; + var eles = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var node = eles[i2]; + if (!node.isNode()) { + continue; + } + var edges = node._private.edges; + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + retEles.push(edge); + } + } + return this.spawn(retEles, true).filter(selector); + }, "connectedEdges"), + connectedNodes: cache(function(selector) { + var retEles = []; + var eles = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var edge = eles[i2]; + if (!edge.isEdge()) { + continue; + } + retEles.push(edge.source()[0]); + retEles.push(edge.target()[0]); + } + return this.spawn(retEles, true).filter(selector); + }, "connectedNodes"), + parallelEdges: cache(defineParallelEdgesFunction(), "parallelEdges"), + codirectedEdges: cache(defineParallelEdgesFunction({ + codirected: true + }), "codirectedEdges") + }); + function defineParallelEdgesFunction(params) { + var defaults2 = { + codirected: false + }; + params = extend({}, defaults2, params); + return function parallelEdgesImpl(selector) { + var elements2 = []; + var edges = this.edges(); + var p2 = params; + for (var i2 = 0; i2 < edges.length; i2++) { + var edge1 = edges[i2]; + var edge1_p = edge1._private; + var src1 = edge1_p.source; + var srcid1 = src1._private.data.id; + var tgtid1 = edge1_p.data.target; + var srcEdges1 = src1._private.edges; + for (var j = 0; j < srcEdges1.length; j++) { + var edge2 = srcEdges1[j]; + var edge2data = edge2._private.data; + var tgtid2 = edge2data.target; + var srcid2 = edge2data.source; + var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; + var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; + if (p2.codirected && codirected || !p2.codirected && (codirected || oppdirected)) { + elements2.push(edge2); + } + } + } + return this.spawn(elements2, true).filter(selector); + }; + } + extend(elesfn$2, { + components: function components(root2) { + var self2 = this; + var cy = self2.cy(); + var visited = cy.collection(); + var unvisited = root2 == null ? self2.nodes() : root2.nodes(); + var components2 = []; + if (root2 != null && unvisited.empty()) { + unvisited = root2.sources(); + } + var visitInComponent = function visitInComponent2(node, component) { + visited.merge(node); + unvisited.unmerge(node); + component.merge(node); + }; + if (unvisited.empty()) { + return self2.spawn(); + } + var _loop = function _loop2() { + var cmpt = cy.collection(); + components2.push(cmpt); + var root3 = unvisited[0]; + visitInComponent(root3, cmpt); + self2.bfs({ + directed: false, + roots: root3, + visit: function visit(v) { + return visitInComponent(v, cmpt); + } + }); + cmpt.forEach(function(node) { + node.connectedEdges().forEach(function(e) { + if (self2.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { + cmpt.merge(e); + } + }); + }); + }; + do { + _loop(); + } while (unvisited.length > 0); + return components2; + }, + component: function component() { + var ele = this[0]; + return ele.cy().mutableElements().components(ele)[0]; + } + }); + elesfn$2.componentsOf = elesfn$2.components; + var Collection = function Collection2(cy, elements2) { + var unique = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; + var removed = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false; + if (cy === void 0) { + error("A collection must have a reference to the core"); + return; + } + var map = new Map$2(); + var createdElements = false; + if (!elements2) { + elements2 = []; + } else if (elements2.length > 0 && plainObject(elements2[0]) && !element(elements2[0])) { + createdElements = true; + var eles = []; + var elesIds = new Set$1(); + for (var i2 = 0, l = elements2.length; i2 < l; i2++) { + var json = elements2[i2]; + if (json.data == null) { + json.data = {}; + } + var _data = json.data; + if (_data.id == null) { + _data.id = uuid(); + } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { + continue; + } + var ele = new Element(cy, json, false); + eles.push(ele); + elesIds.add(_data.id); + } + elements2 = eles; + } + this.length = 0; + for (var _i = 0, _l = elements2.length; _i < _l; _i++) { + var element$1 = elements2[_i][0]; + if (element$1 == null) { + continue; + } + var id = element$1._private.data.id; + if (!unique || !map.has(id)) { + if (unique) { + map.set(id, { + index: this.length, + ele: element$1 + }); + } + this[this.length] = element$1; + this.length++; + } + } + this._private = { + eles: this, + cy, + get map() { + if (this.lazyMap == null) { + this.rebuildMap(); + } + return this.lazyMap; + }, + set map(m) { + this.lazyMap = m; + }, + rebuildMap: function rebuildMap() { + var m = this.lazyMap = new Map$2(); + var eles2 = this.eles; + for (var _i2 = 0; _i2 < eles2.length; _i2++) { + var _ele = eles2[_i2]; + m.set(_ele.id(), { + index: _i2, + ele: _ele + }); + } + } + }; + if (unique) { + this._private.map = map; + } + if (createdElements && !removed) { + this.restore(); + } + }; + var elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype); + elesfn$1.instanceString = function() { + return "collection"; + }; + elesfn$1.spawn = function(eles, unique) { + return new Collection(this.cy(), eles, unique); + }; + elesfn$1.spawnSelf = function() { + return this.spawn(this); + }; + elesfn$1.cy = function() { + return this._private.cy; + }; + elesfn$1.renderer = function() { + return this._private.cy.renderer(); + }; + elesfn$1.element = function() { + return this[0]; + }; + elesfn$1.collection = function() { + if (collection(this)) { + return this; + } else { + return new Collection(this._private.cy, [this]); + } + }; + elesfn$1.unique = function() { + return new Collection(this._private.cy, this, true); + }; + elesfn$1.hasElementWithId = function(id) { + id = "" + id; + return this._private.map.has(id); + }; + elesfn$1.getElementById = function(id) { + id = "" + id; + var cy = this._private.cy; + var entry = this._private.map.get(id); + return entry ? entry.ele : new Collection(cy); + }; + elesfn$1.$id = elesfn$1.getElementById; + elesfn$1.poolIndex = function() { + var cy = this._private.cy; + var eles = cy._private.elements; + var id = this[0]._private.data.id; + return eles._private.map.get(id).index; + }; + elesfn$1.indexOf = function(ele) { + var id = ele[0]._private.data.id; + return this._private.map.get(id).index; + }; + elesfn$1.indexOfId = function(id) { + id = "" + id; + return this._private.map.get(id).index; + }; + elesfn$1.json = function(obj) { + var ele = this.element(); + var cy = this.cy(); + if (ele == null && obj) { + return this; + } + if (ele == null) { + return void 0; + } + var p2 = ele._private; + if (plainObject(obj)) { + cy.startBatch(); + if (obj.data) { + ele.data(obj.data); + var _data2 = p2.data; + if (ele.isEdge()) { + var move = false; + var spec = {}; + var src = obj.data.source; + var tgt = obj.data.target; + if (src != null && src != _data2.source) { + spec.source = "" + src; + move = true; + } + if (tgt != null && tgt != _data2.target) { + spec.target = "" + tgt; + move = true; + } + if (move) { + ele = ele.move(spec); + } + } else { + var newParentValSpecd = "parent" in obj.data; + var parent = obj.data.parent; + if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) { + if (parent === void 0) { + parent = null; + } + if (parent != null) { + parent = "" + parent; + } + ele = ele.move({ + parent + }); + } + } + } + if (obj.position) { + ele.position(obj.position); + } + var checkSwitch = function checkSwitch2(k, trueFnName, falseFnName) { + var obj_k = obj[k]; + if (obj_k != null && obj_k !== p2[k]) { + if (obj_k) { + ele[trueFnName](); + } else { + ele[falseFnName](); + } + } + }; + checkSwitch("removed", "remove", "restore"); + checkSwitch("selected", "select", "unselect"); + checkSwitch("selectable", "selectify", "unselectify"); + checkSwitch("locked", "lock", "unlock"); + checkSwitch("grabbable", "grabify", "ungrabify"); + checkSwitch("pannable", "panify", "unpanify"); + if (obj.classes != null) { + ele.classes(obj.classes); + } + cy.endBatch(); + return this; + } else if (obj === void 0) { + var json = { + data: copy(p2.data), + position: copy(p2.position), + group: p2.group, + removed: p2.removed, + selected: p2.selected, + selectable: p2.selectable, + locked: p2.locked, + grabbable: p2.grabbable, + pannable: p2.pannable, + classes: null + }; + json.classes = ""; + var i2 = 0; + p2.classes.forEach(function(cls) { + return json.classes += i2++ === 0 ? cls : " " + cls; + }); + return json; + } + }; + elesfn$1.jsons = function() { + var jsons = []; + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var json = ele.json(); + jsons.push(json); + } + return jsons; + }; + elesfn$1.clone = function() { + var cy = this.cy(); + var elesArr = []; + for (var i2 = 0; i2 < this.length; i2++) { + var ele = this[i2]; + var json = ele.json(); + var clone2 = new Element(cy, json, false); + elesArr.push(clone2); + } + return new Collection(cy, elesArr); + }; + elesfn$1.copy = elesfn$1.clone; + elesfn$1.restore = function() { + var notifyRenderer = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; + var addToPool = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var self2 = this; + var cy = self2.cy(); + var cy_p = cy._private; + var nodes2 = []; + var edges = []; + var elements2; + for (var _i3 = 0, l = self2.length; _i3 < l; _i3++) { + var ele = self2[_i3]; + if (addToPool && !ele.removed()) { + continue; + } + if (ele.isNode()) { + nodes2.push(ele); + } else { + edges.push(ele); + } + } + elements2 = nodes2.concat(edges); + var i2; + var removeFromElements = function removeFromElements2() { + elements2.splice(i2, 1); + i2--; + }; + for (i2 = 0; i2 < elements2.length; i2++) { + var _ele2 = elements2[i2]; + var _private = _ele2._private; + var _data3 = _private.data; + _ele2.clearTraversalCache(); + if (!addToPool && !_private.removed) + ; + else if (_data3.id === void 0) { + _data3.id = uuid(); + } else if (number$1(_data3.id)) { + _data3.id = "" + _data3.id; + } else if (emptyString(_data3.id) || !string(_data3.id)) { + error("Can not create element with invalid string ID `" + _data3.id + "`"); + removeFromElements(); + continue; + } else if (cy.hasElementWithId(_data3.id)) { + error("Can not create second element with ID `" + _data3.id + "`"); + removeFromElements(); + continue; + } + var id = _data3.id; + if (_ele2.isNode()) { + var pos = _private.position; + if (pos.x == null) { + pos.x = 0; + } + if (pos.y == null) { + pos.y = 0; + } + } + if (_ele2.isEdge()) { + var edge = _ele2; + var fields = ["source", "target"]; + var fieldsLength = fields.length; + var badSourceOrTarget = false; + for (var j = 0; j < fieldsLength; j++) { + var field = fields[j]; + var val = _data3[field]; + if (number$1(val)) { + val = _data3[field] = "" + _data3[field]; + } + if (val == null || val === "") { + error("Can not create edge `" + id + "` with unspecified " + field); + badSourceOrTarget = true; + } else if (!cy.hasElementWithId(val)) { + error("Can not create edge `" + id + "` with nonexistant " + field + " `" + val + "`"); + badSourceOrTarget = true; + } + } + if (badSourceOrTarget) { + removeFromElements(); + continue; + } + var src = cy.getElementById(_data3.source); + var tgt = cy.getElementById(_data3.target); + if (src.same(tgt)) { + src._private.edges.push(edge); + } else { + src._private.edges.push(edge); + tgt._private.edges.push(edge); + } + edge._private.source = src; + edge._private.target = tgt; + } + _private.map = new Map$2(); + _private.map.set(id, { + ele: _ele2, + index: 0 + }); + _private.removed = false; + if (addToPool) { + cy.addToPool(_ele2); + } + } + for (var _i4 = 0; _i4 < nodes2.length; _i4++) { + var node = nodes2[_i4]; + var _data4 = node._private.data; + if (number$1(_data4.parent)) { + _data4.parent = "" + _data4.parent; + } + var parentId = _data4.parent; + var specifiedParent = parentId != null; + if (specifiedParent || node._private.parent) { + var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId); + if (parent.empty()) { + _data4.parent = void 0; + } else if (parent[0].removed()) { + warn("Node added with missing parent, reference to parent removed"); + _data4.parent = void 0; + node._private.parent = null; + } else { + var selfAsParent = false; + var ancestor = parent; + while (!ancestor.empty()) { + if (node.same(ancestor)) { + selfAsParent = true; + _data4.parent = void 0; + break; + } + ancestor = ancestor.parent(); + } + if (!selfAsParent) { + parent[0]._private.children.push(node); + node._private.parent = parent[0]; + cy_p.hasCompoundNodes = true; + } + } + } + } + if (elements2.length > 0) { + var restored = elements2.length === self2.length ? self2 : new Collection(cy, elements2); + for (var _i5 = 0; _i5 < restored.length; _i5++) { + var _ele3 = restored[_i5]; + if (_ele3.isNode()) { + continue; + } + _ele3.parallelEdges().clearTraversalCache(); + _ele3.source().clearTraversalCache(); + _ele3.target().clearTraversalCache(); + } + var toUpdateStyle; + if (cy_p.hasCompoundNodes) { + toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent()); + } else { + toUpdateStyle = restored; + } + toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer); + if (notifyRenderer) { + restored.emitAndNotify("add"); + } else if (addToPool) { + restored.emit("add"); + } + } + return self2; + }; + elesfn$1.removed = function() { + var ele = this[0]; + return ele && ele._private.removed; + }; + elesfn$1.inside = function() { + var ele = this[0]; + return ele && !ele._private.removed; + }; + elesfn$1.remove = function() { + var notifyRenderer = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; + var removeFromPool = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var self2 = this; + var elesToRemove = []; + var elesToRemoveIds = {}; + var cy = self2._private.cy; + function addConnectedEdges(node) { + var edges = node._private.edges; + for (var i3 = 0; i3 < edges.length; i3++) { + add(edges[i3]); + } + } + function addChildren2(node) { + var children = node._private.children; + for (var i3 = 0; i3 < children.length; i3++) { + add(children[i3]); + } + } + function add(ele2) { + var alreadyAdded = elesToRemoveIds[ele2.id()]; + if (removeFromPool && ele2.removed() || alreadyAdded) { + return; + } else { + elesToRemoveIds[ele2.id()] = true; + } + if (ele2.isNode()) { + elesToRemove.push(ele2); + addConnectedEdges(ele2); + addChildren2(ele2); + } else { + elesToRemove.unshift(ele2); + } + } + for (var i2 = 0, l = self2.length; i2 < l; i2++) { + var ele = self2[i2]; + add(ele); + } + function removeEdgeRef(node, edge) { + var connectedEdges = node._private.edges; + removeFromArray(connectedEdges, edge); + node.clearTraversalCache(); + } + function removeParallelRef(pllEdge2) { + pllEdge2.clearTraversalCache(); + } + var alteredParents = []; + alteredParents.ids = {}; + function removeChildRef(parent2, ele2) { + ele2 = ele2[0]; + parent2 = parent2[0]; + var children = parent2._private.children; + var pid = parent2.id(); + removeFromArray(children, ele2); + ele2._private.parent = null; + if (!alteredParents.ids[pid]) { + alteredParents.ids[pid] = true; + alteredParents.push(parent2); + } + } + self2.dirtyCompoundBoundsCache(); + if (removeFromPool) { + cy.removeFromPool(elesToRemove); + } + for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) { + var _ele4 = elesToRemove[_i6]; + if (_ele4.isEdge()) { + var src = _ele4.source()[0]; + var tgt = _ele4.target()[0]; + removeEdgeRef(src, _ele4); + removeEdgeRef(tgt, _ele4); + var pllEdges = _ele4.parallelEdges(); + for (var j = 0; j < pllEdges.length; j++) { + var pllEdge = pllEdges[j]; + removeParallelRef(pllEdge); + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + } + } else { + var parent = _ele4.parent(); + if (parent.length !== 0) { + removeChildRef(parent, _ele4); + } + } + if (removeFromPool) { + _ele4._private.removed = true; + } + } + var elesStillInside = cy._private.elements; + cy._private.hasCompoundNodes = false; + for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) { + var _ele5 = elesStillInside[_i7]; + if (_ele5.isParent()) { + cy._private.hasCompoundNodes = true; + break; + } + } + var removedElements = new Collection(this.cy(), elesToRemove); + if (removedElements.size() > 0) { + if (notifyRenderer) { + removedElements.emitAndNotify("remove"); + } else if (removeFromPool) { + removedElements.emit("remove"); + } + } + for (var _i8 = 0; _i8 < alteredParents.length; _i8++) { + var _ele6 = alteredParents[_i8]; + if (!removeFromPool || !_ele6.removed()) { + _ele6.updateStyle(); + } + } + return removedElements; + }; + elesfn$1.move = function(struct) { + var cy = this._private.cy; + var eles = this; + var notifyRenderer = false; + var modifyPool = false; + var toString2 = function toString3(id) { + return id == null ? id : "" + id; + }; + if (struct.source !== void 0 || struct.target !== void 0) { + var srcId = toString2(struct.source); + var tgtId = toString2(struct.target); + var srcExists = srcId != null && cy.hasElementWithId(srcId); + var tgtExists = tgtId != null && cy.hasElementWithId(tgtId); + if (srcExists || tgtExists) { + cy.batch(function() { + eles.remove(notifyRenderer, modifyPool); + eles.emitAndNotify("moveout"); + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var _data5 = ele._private.data; + if (ele.isEdge()) { + if (srcExists) { + _data5.source = srcId; + } + if (tgtExists) { + _data5.target = tgtId; + } + } + } + eles.restore(notifyRenderer, modifyPool); + }); + eles.emitAndNotify("move"); + } + } else if (struct.parent !== void 0) { + var parentId = toString2(struct.parent); + var parentExists = parentId === null || cy.hasElementWithId(parentId); + if (parentExists) { + var pidToAssign = parentId === null ? void 0 : parentId; + cy.batch(function() { + var updated = eles.remove(notifyRenderer, modifyPool); + updated.emitAndNotify("moveout"); + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var _data6 = ele._private.data; + if (ele.isNode()) { + _data6.parent = pidToAssign; + } + } + updated.restore(notifyRenderer, modifyPool); + }); + eles.emitAndNotify("move"); + } + } + return this; + }; + [elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function(props) { + extend(elesfn$1, props); + }); + var corefn$9 = { + add: function add(opts) { + var elements2; + var cy = this; + if (elementOrCollection(opts)) { + var eles = opts; + if (eles._private.cy === cy) { + elements2 = eles.restore(); + } else { + var jsons = []; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + jsons.push(ele.json()); + } + elements2 = new Collection(cy, jsons); + } + } else if (array(opts)) { + var _jsons = opts; + elements2 = new Collection(cy, _jsons); + } else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) { + var elesByGroup = opts; + var _jsons2 = []; + var grs = ["nodes", "edges"]; + for (var _i = 0, il = grs.length; _i < il; _i++) { + var group = grs[_i]; + var elesArray = elesByGroup[group]; + if (array(elesArray)) { + for (var j = 0, jl = elesArray.length; j < jl; j++) { + var json = extend({ + group + }, elesArray[j]); + _jsons2.push(json); + } + } + } + elements2 = new Collection(cy, _jsons2); + } else { + var _json = opts; + elements2 = new Element(cy, _json).collection(); + } + return elements2; + }, + remove: function remove(collection2) { + if (elementOrCollection(collection2)) + ; + else if (string(collection2)) { + var selector = collection2; + collection2 = this.$(selector); + } + return collection2.remove(); + } + }; + /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + function generateCubicBezier(mX1, mY1, mX2, mY2) { + var NEWTON_ITERATIONS = 4, NEWTON_MIN_SLOPE = 1e-3, SUBDIVISION_PRECISION = 1e-7, SUBDIVISION_MAX_ITERATIONS = 10, kSplineTableSize = 11, kSampleStepSize = 1 / (kSplineTableSize - 1), float32ArraySupported = typeof Float32Array !== "undefined"; + if (arguments.length !== 4) { + return false; + } + for (var i2 = 0; i2 < 4; ++i2) { + if (typeof arguments[i2] !== "number" || isNaN(arguments[i2]) || !isFinite(arguments[i2])) { + return false; + } + } + mX1 = Math.min(mX1, 1); + mX2 = Math.min(mX2, 1); + mX1 = Math.max(mX1, 0); + mX2 = Math.max(mX2, 0); + var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); + function A(aA1, aA2) { + return 1 - 3 * aA2 + 3 * aA1; + } + function B(aA1, aA2) { + return 3 * aA2 - 6 * aA1; + } + function C(aA1) { + return 3 * aA1; + } + function calcBezier(aT, aA1, aA2) { + return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; + } + function getSlope(aT, aA1, aA2) { + return 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT + C(aA1); + } + function newtonRaphsonIterate(aX, aGuessT) { + for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0) { + return aGuessT; + } + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; + } + function calcSampleValues() { + for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { + mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); + } + } + function binarySubdivide(aX, aA, aB) { + var currentX, currentT, i3 = 0; + do { + currentT = aA + (aB - aA) / 2; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i3 < SUBDIVISION_MAX_ITERATIONS); + return currentT; + } + function getTForX(aX) { + var intervalStart = 0, currentSample = 1, lastSample = kSplineTableSize - 1; + for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + var dist2 = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), guessForT = intervalStart + dist2 * kSampleStepSize, initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= NEWTON_MIN_SLOPE) { + return newtonRaphsonIterate(aX, guessForT); + } else if (initialSlope === 0) { + return guessForT; + } else { + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); + } + } + var _precomputed = false; + function precompute() { + _precomputed = true; + if (mX1 !== mY1 || mX2 !== mY2) { + calcSampleValues(); + } + } + var f = function f2(aX) { + if (!_precomputed) { + precompute(); + } + if (mX1 === mY1 && mX2 === mY2) { + return aX; + } + if (aX === 0) { + return 0; + } + if (aX === 1) { + return 1; + } + return calcBezier(getTForX(aX), mY1, mY2); + }; + f.getControlPoints = function() { + return [{ + x: mX1, + y: mY1 + }, { + x: mX2, + y: mY2 + }]; + }; + var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; + f.toString = function() { + return str; + }; + return f; + } + /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + var generateSpringRK4 = function() { + function springAccelerationForState(state) { + return -state.tension * state.x - state.friction * state.v; + } + function springEvaluateStateWithDerivative(initialState, dt, derivative) { + var state = { + x: initialState.x + derivative.dx * dt, + v: initialState.v + derivative.dv * dt, + tension: initialState.tension, + friction: initialState.friction + }; + return { + dx: state.v, + dv: springAccelerationForState(state) + }; + } + function springIntegrateState(state, dt) { + var a = { + dx: state.v, + dv: springAccelerationForState(state) + }, b = springEvaluateStateWithDerivative(state, dt * 0.5, a), c = springEvaluateStateWithDerivative(state, dt * 0.5, b), d = springEvaluateStateWithDerivative(state, dt, c), dxdt = 1 / 6 * (a.dx + 2 * (b.dx + c.dx) + d.dx), dvdt = 1 / 6 * (a.dv + 2 * (b.dv + c.dv) + d.dv); + state.x = state.x + dxdt * dt; + state.v = state.v + dvdt * dt; + return state; + } + return function springRK4Factory(tension, friction, duration) { + var initState = { + x: -1, + v: 0, + tension: null, + friction: null + }, path = [0], time_lapsed = 0, tolerance = 1 / 1e4, DT = 16 / 1e3, have_duration, dt, last_state; + tension = parseFloat(tension) || 500; + friction = parseFloat(friction) || 20; + duration = duration || null; + initState.tension = tension; + initState.friction = friction; + have_duration = duration !== null; + if (have_duration) { + time_lapsed = springRK4Factory(tension, friction); + dt = time_lapsed / duration * DT; + } else { + dt = DT; + } + for (; ; ) { + last_state = springIntegrateState(last_state || initState, dt); + path.push(1 + last_state.x); + time_lapsed += 16; + if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { + break; + } + } + return !have_duration ? time_lapsed : function(percentComplete) { + return path[percentComplete * (path.length - 1) | 0]; + }; + }; + }(); + var cubicBezier = function cubicBezier2(t1, p1, t2, p2) { + var bezier = generateCubicBezier(t1, p1, t2, p2); + return function(start, end, percent) { + return start + (end - start) * bezier(percent); + }; + }; + var easings = { + "linear": function linear(start, end, percent) { + return start + (end - start) * percent; + }, + // default easings + "ease": cubicBezier(0.25, 0.1, 0.25, 1), + "ease-in": cubicBezier(0.42, 0, 1, 1), + "ease-out": cubicBezier(0, 0, 0.58, 1), + "ease-in-out": cubicBezier(0.42, 0, 0.58, 1), + // sine + "ease-in-sine": cubicBezier(0.47, 0, 0.745, 0.715), + "ease-out-sine": cubicBezier(0.39, 0.575, 0.565, 1), + "ease-in-out-sine": cubicBezier(0.445, 0.05, 0.55, 0.95), + // quad + "ease-in-quad": cubicBezier(0.55, 0.085, 0.68, 0.53), + "ease-out-quad": cubicBezier(0.25, 0.46, 0.45, 0.94), + "ease-in-out-quad": cubicBezier(0.455, 0.03, 0.515, 0.955), + // cubic + "ease-in-cubic": cubicBezier(0.55, 0.055, 0.675, 0.19), + "ease-out-cubic": cubicBezier(0.215, 0.61, 0.355, 1), + "ease-in-out-cubic": cubicBezier(0.645, 0.045, 0.355, 1), + // quart + "ease-in-quart": cubicBezier(0.895, 0.03, 0.685, 0.22), + "ease-out-quart": cubicBezier(0.165, 0.84, 0.44, 1), + "ease-in-out-quart": cubicBezier(0.77, 0, 0.175, 1), + // quint + "ease-in-quint": cubicBezier(0.755, 0.05, 0.855, 0.06), + "ease-out-quint": cubicBezier(0.23, 1, 0.32, 1), + "ease-in-out-quint": cubicBezier(0.86, 0, 0.07, 1), + // expo + "ease-in-expo": cubicBezier(0.95, 0.05, 0.795, 0.035), + "ease-out-expo": cubicBezier(0.19, 1, 0.22, 1), + "ease-in-out-expo": cubicBezier(1, 0, 0, 1), + // circ + "ease-in-circ": cubicBezier(0.6, 0.04, 0.98, 0.335), + "ease-out-circ": cubicBezier(0.075, 0.82, 0.165, 1), + "ease-in-out-circ": cubicBezier(0.785, 0.135, 0.15, 0.86), + // user param easings... + "spring": function spring(tension, friction, duration) { + if (duration === 0) { + return easings.linear; + } + var spring2 = generateSpringRK4(tension, friction, duration); + return function(start, end, percent) { + return start + (end - start) * spring2(percent); + }; + }, + "cubic-bezier": cubicBezier + }; + function getEasedValue(type, start, end, percent, easingFn) { + if (percent === 1) { + return end; + } + if (start === end) { + return end; + } + var val = easingFn(start, end, percent); + if (type == null) { + return val; + } + if (type.roundValue || type.color) { + val = Math.round(val); + } + if (type.min !== void 0) { + val = Math.max(val, type.min); + } + if (type.max !== void 0) { + val = Math.min(val, type.max); + } + return val; + } + function getValue(prop, spec) { + if (prop.pfValue != null || prop.value != null) { + if (prop.pfValue != null && (spec == null || spec.type.units !== "%")) { + return prop.pfValue; + } else { + return prop.value; + } + } else { + return prop; + } + } + function ease(startProp, endProp, percent, easingFn, propSpec) { + var type = propSpec != null ? propSpec.type : null; + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + var start = getValue(startProp, propSpec); + var end = getValue(endProp, propSpec); + if (number$1(start) && number$1(end)) { + return getEasedValue(type, start, end, percent, easingFn); + } else if (array(start) && array(end)) { + var easedArr = []; + for (var i2 = 0; i2 < end.length; i2++) { + var si = start[i2]; + var ei = end[i2]; + if (si != null && ei != null) { + var val = getEasedValue(type, si, ei, percent, easingFn); + easedArr.push(val); + } else { + easedArr.push(ei); + } + } + return easedArr; + } + return void 0; + } + function step$1(self2, ani, now2, isCore) { + var isEles = !isCore; + var _p = self2._private; + var ani_p = ani._private; + var pEasing = ani_p.easing; + var startTime = ani_p.startTime; + var cy = isCore ? self2 : self2.cy(); + var style = cy.style(); + if (!ani_p.easingImpl) { + if (pEasing == null) { + ani_p.easingImpl = easings["linear"]; + } else { + var easingVals; + if (string(pEasing)) { + var easingProp = style.parse("transition-timing-function", pEasing); + easingVals = easingProp.value; + } else { + easingVals = pEasing; + } + var name2, args; + if (string(easingVals)) { + name2 = easingVals; + args = []; + } else { + name2 = easingVals[1]; + args = easingVals.slice(2).map(function(n) { + return +n; + }); + } + if (args.length > 0) { + if (name2 === "spring") { + args.push(ani_p.duration); + } + ani_p.easingImpl = easings[name2].apply(null, args); + } else { + ani_p.easingImpl = easings[name2]; + } + } + } + var easing = ani_p.easingImpl; + var percent; + if (ani_p.duration === 0) { + percent = 1; + } else { + percent = (now2 - startTime) / ani_p.duration; + } + if (ani_p.applying) { + percent = ani_p.progress; + } + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (ani_p.delay == null) { + var startPos = ani_p.startPosition; + var endPos = ani_p.position; + if (endPos && isEles && !self2.locked()) { + var newPos = {}; + if (valid(startPos.x, endPos.x)) { + newPos.x = ease(startPos.x, endPos.x, percent, easing); + } + if (valid(startPos.y, endPos.y)) { + newPos.y = ease(startPos.y, endPos.y, percent, easing); + } + self2.position(newPos); + } + var startPan = ani_p.startPan; + var endPan = ani_p.pan; + var pan = _p.pan; + var animatingPan = endPan != null && isCore; + if (animatingPan) { + if (valid(startPan.x, endPan.x)) { + pan.x = ease(startPan.x, endPan.x, percent, easing); + } + if (valid(startPan.y, endPan.y)) { + pan.y = ease(startPan.y, endPan.y, percent, easing); + } + self2.emit("pan"); + } + var startZoom = ani_p.startZoom; + var endZoom = ani_p.zoom; + var animatingZoom = endZoom != null && isCore; + if (animatingZoom) { + if (valid(startZoom, endZoom)) { + _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); + } + self2.emit("zoom"); + } + if (animatingPan || animatingZoom) { + self2.emit("viewport"); + } + var props = ani_p.style; + if (props && props.length > 0 && isEles) { + for (var i2 = 0; i2 < props.length; i2++) { + var prop = props[i2]; + var _name = prop.name; + var end = prop; + var start = ani_p.startStyle[_name]; + var propSpec = style.properties[start.name]; + var easedVal = ease(start, end, percent, easing, propSpec); + style.overrideBypass(self2, _name, easedVal); + } + self2.emit("style"); + } + } + ani_p.progress = percent; + return percent; + } + function valid(start, end) { + if (start == null || end == null) { + return false; + } + if (number$1(start) && number$1(end)) { + return true; + } else if (start && end) { + return true; + } + return false; + } + function startAnimation(self2, ani, now2, isCore) { + var ani_p = ani._private; + ani_p.started = true; + ani_p.startTime = now2 - ani_p.progress * ani_p.duration; + } + function stepAll(now2, cy) { + var eles = cy._private.aniEles; + var doneEles = []; + function stepOne(ele2, isCore) { + var _p = ele2._private; + var current = _p.animation.current; + var queue = _p.animation.queue; + var ranAnis = false; + if (current.length === 0) { + var next2 = queue.shift(); + if (next2) { + current.push(next2); + } + } + var callbacks = function callbacks2(_callbacks) { + for (var j = _callbacks.length - 1; j >= 0; j--) { + var cb = _callbacks[j]; + cb(); + } + _callbacks.splice(0, _callbacks.length); + }; + for (var i2 = current.length - 1; i2 >= 0; i2--) { + var ani = current[i2]; + var ani_p = ani._private; + if (ani_p.stopped) { + current.splice(i2, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.frames); + continue; + } + if (!ani_p.playing && !ani_p.applying) { + continue; + } + if (ani_p.playing && ani_p.applying) { + ani_p.applying = false; + } + if (!ani_p.started) { + startAnimation(ele2, ani, now2); + } + step$1(ele2, ani, now2, isCore); + if (ani_p.applying) { + ani_p.applying = false; + } + callbacks(ani_p.frames); + if (ani_p.step != null) { + ani_p.step(now2); + } + if (ani.completed()) { + current.splice(i2, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.completes); + } + ranAnis = true; + } + if (!isCore && current.length === 0 && queue.length === 0) { + doneEles.push(ele2); + } + return ranAnis; + } + var ranEleAni = false; + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + var handledThisEle = stepOne(ele); + ranEleAni = ranEleAni || handledThisEle; + } + var ranCoreAni = stepOne(cy, true); + if (ranEleAni || ranCoreAni) { + if (eles.length > 0) { + cy.notify("draw", eles); + } else { + cy.notify("draw"); + } + } + eles.unmerge(doneEles); + cy.emit("step"); + } + var corefn$8 = { + // pull in animation functions + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop(), + addToAnimationPool: function addToAnimationPool(eles) { + var cy = this; + if (!cy.styleEnabled()) { + return; + } + cy._private.aniEles.merge(eles); + }, + stopAnimationLoop: function stopAnimationLoop() { + this._private.animationsRunning = false; + }, + startAnimationLoop: function startAnimationLoop() { + var cy = this; + cy._private.animationsRunning = true; + if (!cy.styleEnabled()) { + return; + } + function headlessStep() { + if (!cy._private.animationsRunning) { + return; + } + requestAnimationFrame2(function animationStep(now2) { + stepAll(now2, cy); + headlessStep(); + }); + } + var renderer2 = cy.renderer(); + if (renderer2 && renderer2.beforeRender) { + renderer2.beforeRender(function rendererAnimationStep(willDraw, now2) { + stepAll(now2, cy); + }, renderer2.beforeRenderPriorities.animations); + } else { + headlessStep(); + } + } + }; + var emitterOptions = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(cy, listener, eventObj) { + var selector = listener.qualifier; + if (selector != null) { + return cy !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(cy, evt) { + evt.cy = cy; + evt.target = cy; + }, + callbackContext: function callbackContext(cy, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : cy; + } + }; + var argSelector = function argSelector2(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + var elesfn = { + createEmitter: function createEmitter() { + var _p = this._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions, this); + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + this.emitter().on(events, argSelector(selector), callback); + return this; + }, + removeListener: function removeListener(events, selector, callback) { + this.emitter().removeListener(events, argSelector(selector), callback); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + one: function one(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + once: function once(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + emit: function emit(events, extraParams) { + this.emitter().emit(events, extraParams); + return this; + }, + emitAndNotify: function emitAndNotify(event2, eles) { + this.emit(event2); + this.notify(event2, eles); + return this; + } + }; + define.eventAliasesOn(elesfn); + var corefn$7 = { + png: function png(options) { + var renderer2 = this._private.renderer; + options = options || {}; + return renderer2.png(options); + }, + jpg: function jpg(options) { + var renderer2 = this._private.renderer; + options = options || {}; + options.bg = options.bg || "#fff"; + return renderer2.jpg(options); + } + }; + corefn$7.jpeg = corefn$7.jpg; + var corefn$6 = { + layout: function layout2(options) { + var cy = this; + if (options == null) { + error("Layout options must be specified to make a layout"); + return; + } + if (options.name == null) { + error("A `name` must be specified to make a layout"); + return; + } + var name2 = options.name; + var Layout2 = cy.extension("layout", name2); + if (Layout2 == null) { + error("No such layout `" + name2 + "` found. Did you forget to import it and `cytoscape.use()` it?"); + return; + } + var eles; + if (string(options.eles)) { + eles = cy.$(options.eles); + } else { + eles = options.eles != null ? options.eles : cy.$(); + } + var layout3 = new Layout2(extend({}, options, { + cy, + eles + })); + return layout3; + } + }; + corefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout; + var corefn$5 = { + notify: function notify(eventName, eventEles) { + var _p = this._private; + if (this.batching()) { + _p.batchNotifications = _p.batchNotifications || {}; + var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection(); + if (eventEles != null) { + eles.merge(eventEles); + } + return; + } + if (!_p.notificationsEnabled) { + return; + } + var renderer2 = this.renderer(); + if (this.destroyed() || !renderer2) { + return; + } + renderer2.notify(eventName, eventEles); + }, + notifications: function notifications(bool) { + var p2 = this._private; + if (bool === void 0) { + return p2.notificationsEnabled; + } else { + p2.notificationsEnabled = bool ? true : false; + } + return this; + }, + noNotifications: function noNotifications(callback) { + this.notifications(false); + callback(); + this.notifications(true); + }, + batching: function batching() { + return this._private.batchCount > 0; + }, + startBatch: function startBatch() { + var _p = this._private; + if (_p.batchCount == null) { + _p.batchCount = 0; + } + if (_p.batchCount === 0) { + _p.batchStyleEles = this.collection(); + _p.batchNotifications = {}; + } + _p.batchCount++; + return this; + }, + endBatch: function endBatch() { + var _p = this._private; + if (_p.batchCount === 0) { + return this; + } + _p.batchCount--; + if (_p.batchCount === 0) { + _p.batchStyleEles.updateStyle(); + var renderer2 = this.renderer(); + Object.keys(_p.batchNotifications).forEach(function(eventName) { + var eles = _p.batchNotifications[eventName]; + if (eles.empty()) { + renderer2.notify(eventName); + } else { + renderer2.notify(eventName, eles); + } + }); + } + return this; + }, + batch: function batch(callback) { + this.startBatch(); + callback(); + this.endBatch(); + return this; + }, + // for backwards compatibility + batchData: function batchData(map) { + var cy = this; + return this.batch(function() { + var ids = Object.keys(map); + for (var i2 = 0; i2 < ids.length; i2++) { + var id = ids[i2]; + var data2 = map[id]; + var ele = cy.getElementById(id); + ele.data(data2); + } + }); + } + }; + var rendererDefaults = defaults$g({ + hideEdgesOnViewport: false, + textureOnViewport: false, + motionBlur: false, + motionBlurOpacity: 0.05, + pixelRatio: void 0, + desktopTapThreshold: 4, + touchTapThreshold: 8, + wheelSensitivity: 1, + debug: false, + showFps: false + }); + var corefn$4 = { + renderTo: function renderTo(context, zoom, pan, pxRatio) { + var r = this._private.renderer; + r.renderTo(context, zoom, pan, pxRatio); + return this; + }, + renderer: function renderer2() { + return this._private.renderer; + }, + forceRender: function forceRender() { + this.notify("draw"); + return this; + }, + resize: function resize() { + this.invalidateSize(); + this.emitAndNotify("resize"); + return this; + }, + initRenderer: function initRenderer(options) { + var cy = this; + var RendererProto = cy.extension("renderer", options.name); + if (RendererProto == null) { + error("Can not initialise: No such renderer `".concat(options.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); + return; + } + if (options.wheelSensitivity !== void 0) { + warn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); + } + var rOpts = rendererDefaults(options); + rOpts.cy = cy; + cy._private.renderer = new RendererProto(rOpts); + this.notify("init"); + }, + destroyRenderer: function destroyRenderer() { + var cy = this; + cy.notify("destroy"); + var domEle = cy.container(); + if (domEle) { + domEle._cyreg = null; + while (domEle.childNodes.length > 0) { + domEle.removeChild(domEle.childNodes[0]); + } + } + cy._private.renderer = null; + cy.mutableElements().forEach(function(ele) { + var _p = ele._private; + _p.rscratch = {}; + _p.rstyle = {}; + _p.animation.current = []; + _p.animation.queue = []; + }); + }, + onRender: function onRender(fn2) { + return this.on("render", fn2); + }, + offRender: function offRender(fn2) { + return this.off("render", fn2); + } + }; + corefn$4.invalidateDimensions = corefn$4.resize; + var corefn$3 = { + // get a collection + // - empty collection on no args + // - collection of elements in the graph on selector arg + // - guarantee a returned collection when elements or collection specified + collection: function collection2(eles, opts) { + if (string(eles)) { + return this.$(eles); + } else if (elementOrCollection(eles)) { + return eles.collection(); + } else if (array(eles)) { + if (!opts) { + opts = {}; + } + return new Collection(this, eles, opts.unique, opts.removed); + } + return new Collection(this); + }, + nodes: function nodes2(selector) { + var nodes3 = this.$(function(ele) { + return ele.isNode(); + }); + if (selector) { + return nodes3.filter(selector); + } + return nodes3; + }, + edges: function edges(selector) { + var edges2 = this.$(function(ele) { + return ele.isEdge(); + }); + if (selector) { + return edges2.filter(selector); + } + return edges2; + }, + // search the graph like jQuery + $: function $(selector) { + var eles = this._private.elements; + if (selector) { + return eles.filter(selector); + } else { + return eles.spawnSelf(); + } + }, + mutableElements: function mutableElements() { + return this._private.elements; + } + }; + corefn$3.elements = corefn$3.filter = corefn$3.$; + var styfn$8 = {}; + var TRUE = "t"; + var FALSE = "f"; + styfn$8.apply = function(eles) { + var self2 = this; + var _p = self2._private; + var cy = _p.cy; + var updatedEles = cy.collection(); + for (var ie = 0; ie < eles.length; ie++) { + var ele = eles[ie]; + var cxtMeta = self2.getContextMeta(ele); + if (cxtMeta.empty) { + continue; + } + var cxtStyle = self2.getContextStyle(cxtMeta); + var app = self2.applyContextStyle(cxtMeta, cxtStyle, ele); + if (ele._private.appliedInitStyle) { + self2.updateTransitions(ele, app.diffProps); + } else { + ele._private.appliedInitStyle = true; + } + var hintsDiff = self2.updateStyleHints(ele); + if (hintsDiff) { + updatedEles.push(ele); + } + } + return updatedEles; + }; + styfn$8.getPropertiesDiff = function(oldCxtKey, newCxtKey) { + var self2 = this; + var cache2 = self2._private.propDiffs = self2._private.propDiffs || {}; + var dualCxtKey = oldCxtKey + "-" + newCxtKey; + var cachedVal = cache2[dualCxtKey]; + if (cachedVal) { + return cachedVal; + } + var diffProps = []; + var addedProp = {}; + for (var i2 = 0; i2 < self2.length; i2++) { + var cxt = self2[i2]; + var oldHasCxt = oldCxtKey[i2] === TRUE; + var newHasCxt = newCxtKey[i2] === TRUE; + var cxtHasDiffed = oldHasCxt !== newHasCxt; + var cxtHasMappedProps = cxt.mappedProperties.length > 0; + if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) { + var props = void 0; + if (cxtHasDiffed && cxtHasMappedProps) { + props = cxt.properties; + } else if (cxtHasDiffed) { + props = cxt.properties; + } else if (cxtHasMappedProps) { + props = cxt.mappedProperties; + } + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + var name2 = prop.name; + var laterCxtOverrides = false; + for (var k = i2 + 1; k < self2.length; k++) { + var laterCxt = self2[k]; + var hasLaterCxt = newCxtKey[k] === TRUE; + if (!hasLaterCxt) { + continue; + } + laterCxtOverrides = laterCxt.properties[prop.name] != null; + if (laterCxtOverrides) { + break; + } + } + if (!addedProp[name2] && !laterCxtOverrides) { + addedProp[name2] = true; + diffProps.push(name2); + } + } + } + } + cache2[dualCxtKey] = diffProps; + return diffProps; + }; + styfn$8.getContextMeta = function(ele) { + var self2 = this; + var cxtKey = ""; + var diffProps; + var prevKey = ele._private.styleCxtKey || ""; + for (var i2 = 0; i2 < self2.length; i2++) { + var context = self2[i2]; + var contextSelectorMatches = context.selector && context.selector.matches(ele); + if (contextSelectorMatches) { + cxtKey += TRUE; + } else { + cxtKey += FALSE; + } + } + diffProps = self2.getPropertiesDiff(prevKey, cxtKey); + ele._private.styleCxtKey = cxtKey; + return { + key: cxtKey, + diffPropNames: diffProps, + empty: diffProps.length === 0 + }; + }; + styfn$8.getContextStyle = function(cxtMeta) { + var cxtKey = cxtMeta.key; + var self2 = this; + var cxtStyles = this._private.contextStyles = this._private.contextStyles || {}; + if (cxtStyles[cxtKey]) { + return cxtStyles[cxtKey]; + } + var style = { + _private: { + key: cxtKey + } + }; + for (var i2 = 0; i2 < self2.length; i2++) { + var cxt = self2[i2]; + var hasCxt = cxtKey[i2] === TRUE; + if (!hasCxt) { + continue; + } + for (var j = 0; j < cxt.properties.length; j++) { + var prop = cxt.properties[j]; + style[prop.name] = prop; + } + } + cxtStyles[cxtKey] = style; + return style; + }; + styfn$8.applyContextStyle = function(cxtMeta, cxtStyle, ele) { + var self2 = this; + var diffProps = cxtMeta.diffPropNames; + var retDiffProps = {}; + var types = self2.types; + for (var i2 = 0; i2 < diffProps.length; i2++) { + var diffPropName = diffProps[i2]; + var cxtProp = cxtStyle[diffPropName]; + var eleProp = ele.pstyle(diffPropName); + if (!cxtProp) { + if (!eleProp) { + continue; + } else if (eleProp.bypass) { + cxtProp = { + name: diffPropName, + deleteBypassed: true + }; + } else { + cxtProp = { + name: diffPropName, + "delete": true + }; + } + } + if (eleProp === cxtProp) { + continue; + } + if (cxtProp.mapped === types.fn && eleProp != null && eleProp.mapping != null && eleProp.mapping.value === cxtProp.value) { + var mapping = eleProp.mapping; + var fnValue = mapping.fnValue = cxtProp.value(ele); + if (fnValue === mapping.prevFnValue) { + continue; + } + } + var retDiffProp = retDiffProps[diffPropName] = { + prev: eleProp + }; + self2.applyParsedProperty(ele, cxtProp); + retDiffProp.next = ele.pstyle(diffPropName); + if (retDiffProp.next && retDiffProp.next.bypass) { + retDiffProp.next = retDiffProp.next.bypassed; + } + } + return { + diffProps: retDiffProps + }; + }; + styfn$8.updateStyleHints = function(ele) { + var _p = ele._private; + var self2 = this; + var propNames = self2.propertyGroupNames; + var propGrKeys = self2.propertyGroupKeys; + var propHash = function propHash2(ele2, propNames2, seedKey) { + return self2.getPropertiesHash(ele2, propNames2, seedKey); + }; + var oldStyleKey = _p.styleKey; + if (ele.removed()) { + return false; + } + var isNode = _p.group === "nodes"; + var overriddenStyles = ele._private.style; + propNames = Object.keys(overriddenStyles); + for (var i2 = 0; i2 < propGrKeys.length; i2++) { + var grKey = propGrKeys[i2]; + _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + } + var updateGrKey1 = function updateGrKey12(val, grKey2) { + return _p.styleKeys[grKey2][0] = hashInt(val, _p.styleKeys[grKey2][0]); + }; + var updateGrKey2 = function updateGrKey22(val, grKey2) { + return _p.styleKeys[grKey2][1] = hashIntAlt(val, _p.styleKeys[grKey2][1]); + }; + var updateGrKey = function updateGrKey3(val, grKey2) { + updateGrKey1(val, grKey2); + updateGrKey2(val, grKey2); + }; + var updateGrKeyWStr = function updateGrKeyWStr2(strVal, grKey2) { + for (var j = 0; j < strVal.length; j++) { + var ch = strVal.charCodeAt(j); + updateGrKey1(ch, grKey2); + updateGrKey2(ch, grKey2); + } + }; + var N = 2e9; + var cleanNum = function cleanNum2(val) { + return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; + }; + for (var _i = 0; _i < propNames.length; _i++) { + var name2 = propNames[_i]; + var parsedProp = overriddenStyles[name2]; + if (parsedProp == null) { + continue; + } + var propInfo = this.properties[name2]; + var type = propInfo.type; + var _grKey = propInfo.groupKey; + var normalizedNumberVal = void 0; + if (propInfo.hashOverride != null) { + normalizedNumberVal = propInfo.hashOverride(ele, parsedProp); + } else if (parsedProp.pfValue != null) { + normalizedNumberVal = parsedProp.pfValue; + } + var numberVal = propInfo.enums == null ? parsedProp.value : null; + var haveNormNum = normalizedNumberVal != null; + var haveUnitedNum = numberVal != null; + var haveNum = haveNormNum || haveUnitedNum; + var units = parsedProp.units; + if (type.number && haveNum && !type.multiple) { + var v = haveNormNum ? normalizedNumberVal : numberVal; + updateGrKey(cleanNum(v), _grKey); + if (!haveNormNum && units != null) { + updateGrKeyWStr(units, _grKey); + } + } else { + updateGrKeyWStr(parsedProp.strValue, _grKey); + } + } + var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) { + var _grKey2 = propGrKeys[_i2]; + var grHash = _p.styleKeys[_grKey2]; + hash[0] = hashInt(grHash[0], hash[0]); + hash[1] = hashIntAlt(grHash[1], hash[1]); + } + _p.styleKey = combineHashes(hash[0], hash[1]); + var sk = _p.styleKeys; + _p.labelDimsKey = combineHashesArray(sk.labelDimensions); + var labelKeys = propHash(ele, ["label"], sk.labelDimensions); + _p.labelKey = combineHashesArray(labelKeys); + _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys)); + if (!isNode) { + var sourceLabelKeys = propHash(ele, ["source-label"], sk.labelDimensions); + _p.sourceLabelKey = combineHashesArray(sourceLabelKeys); + _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys)); + var targetLabelKeys = propHash(ele, ["target-label"], sk.labelDimensions); + _p.targetLabelKey = combineHashesArray(targetLabelKeys); + _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys)); + } + if (isNode) { + var _p$styleKeys = _p.styleKeys, nodeBody = _p$styleKeys.nodeBody, nodeBorder = _p$styleKeys.nodeBorder, backgroundImage = _p$styleKeys.backgroundImage, compound = _p$styleKeys.compound, pie = _p$styleKeys.pie; + var nodeKeys = [nodeBody, nodeBorder, backgroundImage, compound, pie].filter(function(k) { + return k != null; + }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]); + _p.nodeKey = combineHashesArray(nodeKeys); + _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT; + } + return oldStyleKey !== _p.styleKey; + }; + styfn$8.clearStyleHints = function(ele) { + var _p = ele._private; + _p.styleCxtKey = ""; + _p.styleKeys = {}; + _p.styleKey = null; + _p.labelKey = null; + _p.labelStyleKey = null; + _p.sourceLabelKey = null; + _p.sourceLabelStyleKey = null; + _p.targetLabelKey = null; + _p.targetLabelStyleKey = null; + _p.nodeKey = null; + _p.hasPie = null; + }; + styfn$8.applyParsedProperty = function(ele, parsedProp) { + var self2 = this; + var prop = parsedProp; + var style = ele._private.style; + var flatProp; + var types = self2.types; + var type = self2.properties[prop.name].type; + var propIsBypass = prop.bypass; + var origProp = style[prop.name]; + var origPropIsBypass = origProp && origProp.bypass; + var _p = ele._private; + var flatPropMapping = "mapping"; + var getVal = function getVal2(p2) { + if (p2 == null) { + return null; + } else if (p2.pfValue != null) { + return p2.pfValue; + } else { + return p2.value; + } + }; + var checkTriggers = function checkTriggers2() { + var fromVal = getVal(origProp); + var toVal = getVal(prop); + self2.checkTriggers(ele, prop.name, fromVal, toVal); + }; + if (prop && prop.name.substr(0, 3) === "pie") { + warn("The pie style properties are deprecated. Create charts using background images instead."); + } + if (parsedProp.name === "curve-style" && ele.isEdge() && // loops must be bundled beziers + (parsedProp.value !== "bezier" && ele.isLoop() || // edges connected to compound nodes can not be haystacks + parsedProp.value === "haystack" && (ele.source().isParent() || ele.target().isParent()))) { + prop = parsedProp = this.parse(parsedProp.name, "bezier", propIsBypass); + } + if (prop["delete"]) { + style[prop.name] = void 0; + checkTriggers(); + return true; + } + if (prop.deleteBypassed) { + if (!origProp) { + checkTriggers(); + return true; + } else if (origProp.bypass) { + origProp.bypassed = void 0; + checkTriggers(); + return true; + } else { + return false; + } + } + if (prop.deleteBypass) { + if (!origProp) { + checkTriggers(); + return true; + } else if (origProp.bypass) { + style[prop.name] = origProp.bypassed; + checkTriggers(); + return true; + } else { + return false; + } + } + var printMappingErr = function printMappingErr2() { + warn("Do not assign mappings to elements without corresponding data (i.e. ele `" + ele.id() + "` has no mapping for property `" + prop.name + "` with data field `" + prop.field + "`); try a `[" + prop.field + "]` selector to limit scope to elements with `" + prop.field + "` defined"); + }; + switch (prop.mapped) { + case types.mapData: { + var fields = prop.field.split("."); + var fieldVal = _p.data; + for (var i2 = 0; i2 < fields.length && fieldVal; i2++) { + var field = fields[i2]; + fieldVal = fieldVal[field]; + } + if (fieldVal == null) { + printMappingErr(); + return false; + } + var percent; + if (!number$1(fieldVal)) { + warn("Do not use continuous mappers without specifying numeric data (i.e. `" + prop.field + ": " + fieldVal + "` for `" + ele.id() + "` is non-numeric)"); + return false; + } else { + var fieldWidth = prop.fieldMax - prop.fieldMin; + if (fieldWidth === 0) { + percent = 0; + } else { + percent = (fieldVal - prop.fieldMin) / fieldWidth; + } + } + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (type.color) { + var r1 = prop.valueMin[0]; + var r2 = prop.valueMax[0]; + var g1 = prop.valueMin[1]; + var g2 = prop.valueMax[1]; + var b1 = prop.valueMin[2]; + var b2 = prop.valueMax[2]; + var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3]; + var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3]; + var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)]; + flatProp = { + // colours are simple, so just create the flat property instead of expensive string parsing + bypass: prop.bypass, + // we're a bypass if the mapping property is a bypass + name: prop.name, + value: clr, + strValue: "rgb(" + clr[0] + ", " + clr[1] + ", " + clr[2] + ")" + }; + } else if (type.number) { + var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent; + flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping); + } else { + return false; + } + if (!flatProp) { + printMappingErr(); + return false; + } + flatProp.mapping = prop; + prop = flatProp; + break; + } + case types.data: { + var _fields = prop.field.split("."); + var _fieldVal = _p.data; + for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) { + var _field = _fields[_i3]; + _fieldVal = _fieldVal[_field]; + } + if (_fieldVal != null) { + flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping); + } + if (!flatProp) { + printMappingErr(); + return false; + } + flatProp.mapping = prop; + prop = flatProp; + break; + } + case types.fn: { + var fn2 = prop.value; + var fnRetVal = prop.fnValue != null ? prop.fnValue : fn2(ele); + prop.prevFnValue = fnRetVal; + if (fnRetVal == null) { + warn("Custom function mappers may not return null (i.e. `" + prop.name + "` for ele `" + ele.id() + "` is null)"); + return false; + } + flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping); + if (!flatProp) { + warn("Custom function mappers may not return invalid values for the property type (i.e. `" + prop.name + "` for ele `" + ele.id() + "` is invalid)"); + return false; + } + flatProp.mapping = copy(prop); + prop = flatProp; + break; + } + case void 0: + break; + default: + return false; + } + if (propIsBypass) { + if (origPropIsBypass) { + prop.bypassed = origProp.bypassed; + } else { + prop.bypassed = origProp; + } + style[prop.name] = prop; + } else { + if (origPropIsBypass) { + origProp.bypassed = prop; + } else { + style[prop.name] = prop; + } + } + checkTriggers(); + return true; + }; + styfn$8.cleanElements = function(eles, keepBypasses) { + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + this.clearStyleHints(ele); + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + if (!keepBypasses) { + ele._private.style = {}; + } else { + var style = ele._private.style; + var propNames = Object.keys(style); + for (var j = 0; j < propNames.length; j++) { + var propName = propNames[j]; + var eleProp = style[propName]; + if (eleProp != null) { + if (eleProp.bypass) { + eleProp.bypassed = null; + } else { + style[propName] = null; + } + } + } + } + } + }; + styfn$8.update = function() { + var cy = this._private.cy; + var eles = cy.mutableElements(); + eles.updateStyle(); + }; + styfn$8.updateTransitions = function(ele, diffProps) { + var self2 = this; + var _p = ele._private; + var props = ele.pstyle("transition-property").value; + var duration = ele.pstyle("transition-duration").pfValue; + var delay = ele.pstyle("transition-delay").pfValue; + if (props.length > 0 && duration > 0) { + var style = {}; + var anyPrev = false; + for (var i2 = 0; i2 < props.length; i2++) { + var prop = props[i2]; + var styProp = ele.pstyle(prop); + var diffProp = diffProps[prop]; + if (!diffProp) { + continue; + } + var prevProp = diffProp.prev; + var fromProp = prevProp; + var toProp = diffProp.next != null ? diffProp.next : styProp; + var diff = false; + var initVal = void 0; + var initDt = 1e-6; + if (!fromProp) { + continue; + } + if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) { + diff = toProp.pfValue - fromProp.pfValue; + initVal = fromProp.pfValue + initDt * diff; + } else if (number$1(fromProp.value) && number$1(toProp.value)) { + diff = toProp.value - fromProp.value; + initVal = fromProp.value + initDt * diff; + } else if (array(fromProp.value) && array(toProp.value)) { + diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2]; + initVal = fromProp.strValue; + } + if (diff) { + style[prop] = toProp.strValue; + this.applyBypass(ele, prop, initVal); + anyPrev = true; + } + } + if (!anyPrev) { + return; + } + _p.transitioning = true; + new Promise$1(function(resolve2) { + if (delay > 0) { + ele.delayAnimation(delay).play().promise().then(resolve2); + } else { + resolve2(); + } + }).then(function() { + return ele.animation({ + style, + duration, + easing: ele.pstyle("transition-timing-function").value, + queue: false + }).play().promise(); + }).then(function() { + self2.removeBypasses(ele, props); + ele.emitAndNotify("style"); + _p.transitioning = false; + }); + } else if (_p.transitioning) { + this.removeBypasses(ele, props); + ele.emitAndNotify("style"); + _p.transitioning = false; + } + }; + styfn$8.checkTrigger = function(ele, name2, fromValue, toValue, getTrigger, onTrigger) { + var prop = this.properties[name2]; + var triggerCheck = getTrigger(prop); + if (triggerCheck != null && triggerCheck(fromValue, toValue)) { + onTrigger(prop); + } + }; + styfn$8.checkZOrderTrigger = function(ele, name2, fromValue, toValue) { + var _this = this; + this.checkTrigger(ele, name2, fromValue, toValue, function(prop) { + return prop.triggersZOrder; + }, function() { + _this._private.cy.notify("zorder", ele); + }); + }; + styfn$8.checkBoundsTrigger = function(ele, name2, fromValue, toValue) { + this.checkTrigger(ele, name2, fromValue, toValue, function(prop) { + return prop.triggersBounds; + }, function(prop) { + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + if ( + // only for beziers -- so performance of other edges isn't affected + prop.triggersBoundsOfParallelBeziers && (name2 === "curve-style" && (fromValue === "bezier" || toValue === "bezier") || name2 === "display" && (fromValue === "none" || toValue === "none")) + ) { + ele.parallelEdges().forEach(function(pllEdge) { + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + }); + } + }); + }; + styfn$8.checkTriggers = function(ele, name2, fromValue, toValue) { + ele.dirtyStyleCache(); + this.checkZOrderTrigger(ele, name2, fromValue, toValue); + this.checkBoundsTrigger(ele, name2, fromValue, toValue); + }; + var styfn$7 = {}; + styfn$7.applyBypass = function(eles, name2, value, updateTransitions) { + var self2 = this; + var props = []; + var isBypass = true; + if (name2 === "*" || name2 === "**") { + if (value !== void 0) { + for (var i2 = 0; i2 < self2.properties.length; i2++) { + var prop = self2.properties[i2]; + var _name = prop.name; + var parsedProp = this.parse(_name, value, true); + if (parsedProp) { + props.push(parsedProp); + } + } + } + } else if (string(name2)) { + var _parsedProp = this.parse(name2, value, true); + if (_parsedProp) { + props.push(_parsedProp); + } + } else if (plainObject(name2)) { + var specifiedProps = name2; + updateTransitions = value; + var names = Object.keys(specifiedProps); + for (var _i = 0; _i < names.length; _i++) { + var _name2 = names[_i]; + var _value = specifiedProps[_name2]; + if (_value === void 0) { + _value = specifiedProps[dash2camel(_name2)]; + } + if (_value !== void 0) { + var _parsedProp2 = this.parse(_name2, _value, true); + if (_parsedProp2) { + props.push(_parsedProp2); + } + } + } + } else { + return false; + } + if (props.length === 0) { + return false; + } + var ret = false; + for (var _i2 = 0; _i2 < eles.length; _i2++) { + var ele = eles[_i2]; + var diffProps = {}; + var diffProp = void 0; + for (var j = 0; j < props.length; j++) { + var _prop = props[j]; + if (updateTransitions) { + var prevProp = ele.pstyle(_prop.name); + diffProp = diffProps[_prop.name] = { + prev: prevProp + }; + } + ret = this.applyParsedProperty(ele, copy(_prop)) || ret; + if (updateTransitions) { + diffProp.next = ele.pstyle(_prop.name); + } + } + if (ret) { + this.updateStyleHints(ele); + } + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } + return ret; + }; + styfn$7.overrideBypass = function(eles, name2, value) { + name2 = camel2dash(name2); + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var prop = ele._private.style[name2]; + var type = this.properties[name2].type; + var isColor = type.color; + var isMulti = type.mutiple; + var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value; + if (!prop || !prop.bypass) { + this.applyBypass(ele, name2, value); + } else { + prop.value = value; + if (prop.pfValue != null) { + prop.pfValue = value; + } + if (isColor) { + prop.strValue = "rgb(" + value.join(",") + ")"; + } else if (isMulti) { + prop.strValue = value.join(" "); + } else { + prop.strValue = "" + value; + } + this.updateStyleHints(ele); + } + this.checkTriggers(ele, name2, oldValue, value); + } + }; + styfn$7.removeAllBypasses = function(eles, updateTransitions) { + return this.removeBypasses(eles, this.propertyNames, updateTransitions); + }; + styfn$7.removeBypasses = function(eles, props, updateTransitions) { + var isBypass = true; + for (var j = 0; j < eles.length; j++) { + var ele = eles[j]; + var diffProps = {}; + for (var i2 = 0; i2 < props.length; i2++) { + var name2 = props[i2]; + var prop = this.properties[name2]; + var prevProp = ele.pstyle(prop.name); + if (!prevProp || !prevProp.bypass) { + continue; + } + var value = ""; + var parsedProp = this.parse(name2, value, true); + var diffProp = diffProps[prop.name] = { + prev: prevProp + }; + this.applyParsedProperty(ele, parsedProp); + diffProp.next = ele.pstyle(prop.name); + } + this.updateStyleHints(ele); + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } + }; + var styfn$6 = {}; + styfn$6.getEmSizeInPixels = function() { + var px = this.containerCss("font-size"); + if (px != null) { + return parseFloat(px); + } else { + return 1; + } + }; + styfn$6.containerCss = function(propName) { + var cy = this._private.cy; + var domElement2 = cy.container(); + if (window$1 && domElement2 && window$1.getComputedStyle) { + return window$1.getComputedStyle(domElement2).getPropertyValue(propName); + } + }; + var styfn$5 = {}; + styfn$5.getRenderedStyle = function(ele, prop) { + if (prop) { + return this.getStylePropertyValue(ele, prop, true); + } else { + return this.getRawStyle(ele, true); + } + }; + styfn$5.getRawStyle = function(ele, isRenderedVal) { + var self2 = this; + ele = ele[0]; + if (ele) { + var rstyle = {}; + for (var i2 = 0; i2 < self2.properties.length; i2++) { + var prop = self2.properties[i2]; + var val = self2.getStylePropertyValue(ele, prop.name, isRenderedVal); + if (val != null) { + rstyle[prop.name] = val; + rstyle[dash2camel(prop.name)] = val; + } + } + return rstyle; + } + }; + styfn$5.getIndexedStyle = function(ele, property, subproperty, index) { + var pstyle = ele.pstyle(property)[subproperty][index]; + return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0]; + }; + styfn$5.getStylePropertyValue = function(ele, propName, isRenderedVal) { + var self2 = this; + ele = ele[0]; + if (ele) { + var prop = self2.properties[propName]; + if (prop.alias) { + prop = prop.pointsTo; + } + var type = prop.type; + var styleProp = ele.pstyle(prop.name); + if (styleProp) { + var value = styleProp.value, units = styleProp.units, strValue = styleProp.strValue; + if (isRenderedVal && type.number && value != null && number$1(value)) { + var zoom = ele.cy().zoom(); + var getRenderedValue = function getRenderedValue2(val) { + return val * zoom; + }; + var getValueStringWithUnits = function getValueStringWithUnits2(val, units2) { + return getRenderedValue(val) + units2; + }; + var isArrayValue = array(value); + var haveUnits = isArrayValue ? units.every(function(u) { + return u != null; + }) : units != null; + if (haveUnits) { + if (isArrayValue) { + return value.map(function(v, i2) { + return getValueStringWithUnits(v, units[i2]); + }).join(" "); + } else { + return getValueStringWithUnits(value, units); + } + } else { + if (isArrayValue) { + return value.map(function(v) { + return string(v) ? v : "" + getRenderedValue(v); + }).join(" "); + } else { + return "" + getRenderedValue(value); + } + } + } else if (strValue != null) { + return strValue; + } + } + return null; + } + }; + styfn$5.getAnimationStartStyle = function(ele, aniProps) { + var rstyle = {}; + for (var i2 = 0; i2 < aniProps.length; i2++) { + var aniProp = aniProps[i2]; + var name2 = aniProp.name; + var styleProp = ele.pstyle(name2); + if (styleProp !== void 0) { + if (plainObject(styleProp)) { + styleProp = this.parse(name2, styleProp.strValue); + } else { + styleProp = this.parse(name2, styleProp); + } + } + if (styleProp) { + rstyle[name2] = styleProp; + } + } + return rstyle; + }; + styfn$5.getPropsList = function(propsObj) { + var self2 = this; + var rstyle = []; + var style = propsObj; + var props = self2.properties; + if (style) { + var names = Object.keys(style); + for (var i2 = 0; i2 < names.length; i2++) { + var name2 = names[i2]; + var val = style[name2]; + var prop = props[name2] || props[camel2dash(name2)]; + var styleProp = this.parse(prop.name, val); + if (styleProp) { + rstyle.push(styleProp); + } + } + } + return rstyle; + }; + styfn$5.getNonDefaultPropertiesHash = function(ele, propNames, seed) { + var hash = seed.slice(); + var name2, val, strVal, chVal; + var i2, j; + for (i2 = 0; i2 < propNames.length; i2++) { + name2 = propNames[i2]; + val = ele.pstyle(name2, false); + if (val == null) { + continue; + } else if (val.pfValue != null) { + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } else { + strVal = val.strValue; + for (j = 0; j < strVal.length; j++) { + chVal = strVal.charCodeAt(j); + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } + } + } + return hash; + }; + styfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash; + var styfn$4 = {}; + styfn$4.appendFromJson = function(json) { + var style = this; + for (var i2 = 0; i2 < json.length; i2++) { + var context = json[i2]; + var selector = context.selector; + var props = context.style || context.css; + var names = Object.keys(props); + style.selector(selector); + for (var j = 0; j < names.length; j++) { + var name2 = names[j]; + var value = props[name2]; + style.css(name2, value); + } + } + return style; + }; + styfn$4.fromJson = function(json) { + var style = this; + style.resetToDefault(); + style.appendFromJson(json); + return style; + }; + styfn$4.json = function() { + var json = []; + for (var i2 = this.defaultLength; i2 < this.length; i2++) { + var cxt = this[i2]; + var selector = cxt.selector; + var props = cxt.properties; + var css = {}; + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + css[prop.name] = prop.strValue; + } + json.push({ + selector: !selector ? "core" : selector.toString(), + style: css + }); + } + return json; + }; + var styfn$3 = {}; + styfn$3.appendFromString = function(string2) { + var self2 = this; + var style = this; + var remaining = "" + string2; + var selAndBlockStr; + var blockRem; + var propAndValStr; + remaining = remaining.replace(/[/][*](\s|.)+?[*][/]/g, ""); + function removeSelAndBlockFromRemaining() { + if (remaining.length > selAndBlockStr.length) { + remaining = remaining.substr(selAndBlockStr.length); + } else { + remaining = ""; + } + } + function removePropAndValFromRem() { + if (blockRem.length > propAndValStr.length) { + blockRem = blockRem.substr(propAndValStr.length); + } else { + blockRem = ""; + } + } + for (; ; ) { + var nothingLeftToParse = remaining.match(/^\s*$/); + if (nothingLeftToParse) { + break; + } + var selAndBlock = remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); + if (!selAndBlock) { + warn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: " + remaining); + break; + } + selAndBlockStr = selAndBlock[0]; + var selectorStr = selAndBlock[1]; + if (selectorStr !== "core") { + var selector = new Selector(selectorStr); + if (selector.invalid) { + warn("Skipping parsing of block: Invalid selector found in string stylesheet: " + selectorStr); + removeSelAndBlockFromRemaining(); + continue; + } + } + var blockStr = selAndBlock[2]; + var invalidBlock = false; + blockRem = blockStr; + var props = []; + for (; ; ) { + var _nothingLeftToParse = blockRem.match(/^\s*$/); + if (_nothingLeftToParse) { + break; + } + var propAndVal = blockRem.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); + if (!propAndVal) { + warn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:" + blockStr); + invalidBlock = true; + break; + } + propAndValStr = propAndVal[0]; + var propStr = propAndVal[1]; + var valStr = propAndVal[2]; + var prop = self2.properties[propStr]; + if (!prop) { + warn("Skipping property: Invalid property name in: " + propAndValStr); + removePropAndValFromRem(); + continue; + } + var parsedProp = style.parse(propStr, valStr); + if (!parsedProp) { + warn("Skipping property: Invalid property definition in: " + propAndValStr); + removePropAndValFromRem(); + continue; + } + props.push({ + name: propStr, + val: valStr + }); + removePropAndValFromRem(); + } + if (invalidBlock) { + removeSelAndBlockFromRemaining(); + break; + } + style.selector(selectorStr); + for (var i2 = 0; i2 < props.length; i2++) { + var _prop = props[i2]; + style.css(_prop.name, _prop.val); + } + removeSelAndBlockFromRemaining(); + } + return style; + }; + styfn$3.fromString = function(string2) { + var style = this; + style.resetToDefault(); + style.appendFromString(string2); + return style; + }; + var styfn$2 = {}; + (function() { + var number$12 = number; + var rgba2 = rgbaNoBackRefs; + var hsla2 = hslaNoBackRefs; + var hex3$1 = hex3; + var hex6$1 = hex6; + var data2 = function data3(prefix) { + return "^" + prefix + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; + }; + var mapData = function mapData2(prefix) { + var mapArg = number$12 + "|\\w+|" + rgba2 + "|" + hsla2 + "|" + hex3$1 + "|" + hex6$1; + return "^" + prefix + "\\s*\\(([\\w\\.]+)\\s*\\,\\s*(" + number$12 + ")\\s*\\,\\s*(" + number$12 + ")\\s*,\\s*(" + mapArg + ")\\s*\\,\\s*(" + mapArg + ")\\)$"; + }; + var urlRegexes = [`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`, "^(none)$", "^(.+)$"]; + styfn$2.types = { + time: { + number: true, + min: 0, + units: "s|ms", + implicitUnits: "ms" + }, + percent: { + number: true, + min: 0, + max: 100, + units: "%", + implicitUnits: "%" + }, + percentages: { + number: true, + min: 0, + max: 100, + units: "%", + implicitUnits: "%", + multiple: true + }, + zeroOneNumber: { + number: true, + min: 0, + max: 1, + unitless: true + }, + zeroOneNumbers: { + number: true, + min: 0, + max: 1, + unitless: true, + multiple: true + }, + nOneOneNumber: { + number: true, + min: -1, + max: 1, + unitless: true + }, + nonNegativeInt: { + number: true, + min: 0, + integer: true, + unitless: true + }, + position: { + enums: ["parent", "origin"] + }, + nodeSize: { + number: true, + min: 0, + enums: ["label"] + }, + number: { + number: true, + unitless: true + }, + numbers: { + number: true, + unitless: true, + multiple: true + }, + positiveNumber: { + number: true, + unitless: true, + min: 0, + strictMin: true + }, + size: { + number: true, + min: 0 + }, + bidirectionalSize: { + number: true + }, + // allows negative + bidirectionalSizeMaybePercent: { + number: true, + allowPercent: true + }, + // allows negative + bidirectionalSizes: { + number: true, + multiple: true + }, + // allows negative + sizeMaybePercent: { + number: true, + min: 0, + allowPercent: true + }, + axisDirection: { + enums: ["horizontal", "leftward", "rightward", "vertical", "upward", "downward", "auto"] + }, + paddingRelativeTo: { + enums: ["width", "height", "average", "min", "max"] + }, + bgWH: { + number: true, + min: 0, + allowPercent: true, + enums: ["auto"], + multiple: true + }, + bgPos: { + number: true, + allowPercent: true, + multiple: true + }, + bgRelativeTo: { + enums: ["inner", "include-padding"], + multiple: true + }, + bgRepeat: { + enums: ["repeat", "repeat-x", "repeat-y", "no-repeat"], + multiple: true + }, + bgFit: { + enums: ["none", "contain", "cover"], + multiple: true + }, + bgCrossOrigin: { + enums: ["anonymous", "use-credentials"], + multiple: true + }, + bgClip: { + enums: ["none", "node"], + multiple: true + }, + bgContainment: { + enums: ["inside", "over"], + multiple: true + }, + color: { + color: true + }, + colors: { + color: true, + multiple: true + }, + fill: { + enums: ["solid", "linear-gradient", "radial-gradient"] + }, + bool: { + enums: ["yes", "no"] + }, + bools: { + enums: ["yes", "no"], + multiple: true + }, + lineStyle: { + enums: ["solid", "dotted", "dashed"] + }, + lineCap: { + enums: ["butt", "round", "square"] + }, + borderStyle: { + enums: ["solid", "dotted", "dashed", "double"] + }, + curveStyle: { + enums: ["bezier", "unbundled-bezier", "haystack", "segments", "straight", "straight-triangle", "taxi"] + }, + fontFamily: { + regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' + }, + fontStyle: { + enums: ["italic", "normal", "oblique"] + }, + fontWeight: { + enums: ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "800", "900", 100, 200, 300, 400, 500, 600, 700, 800, 900] + }, + textDecoration: { + enums: ["none", "underline", "overline", "line-through"] + }, + textTransform: { + enums: ["none", "uppercase", "lowercase"] + }, + textWrap: { + enums: ["none", "wrap", "ellipsis"] + }, + textOverflowWrap: { + enums: ["whitespace", "anywhere"] + }, + textBackgroundShape: { + enums: ["rectangle", "roundrectangle", "round-rectangle"] + }, + nodeShape: { + enums: ["rectangle", "roundrectangle", "round-rectangle", "cutrectangle", "cut-rectangle", "bottomroundrectangle", "bottom-round-rectangle", "barrel", "ellipse", "triangle", "round-triangle", "square", "pentagon", "round-pentagon", "hexagon", "round-hexagon", "concavehexagon", "concave-hexagon", "heptagon", "round-heptagon", "octagon", "round-octagon", "tag", "round-tag", "star", "diamond", "round-diamond", "vee", "rhomboid", "polygon"] + }, + overlayShape: { + enums: ["roundrectangle", "round-rectangle", "ellipse"] + }, + compoundIncludeLabels: { + enums: ["include", "exclude"] + }, + arrowShape: { + enums: ["tee", "triangle", "triangle-tee", "circle-triangle", "triangle-cross", "triangle-backcurve", "vee", "square", "circle", "diamond", "chevron", "none"] + }, + arrowFill: { + enums: ["filled", "hollow"] + }, + display: { + enums: ["element", "none"] + }, + visibility: { + enums: ["hidden", "visible"] + }, + zCompoundDepth: { + enums: ["bottom", "orphan", "auto", "top"] + }, + zIndexCompare: { + enums: ["auto", "manual"] + }, + valign: { + enums: ["top", "center", "bottom"] + }, + halign: { + enums: ["left", "center", "right"] + }, + justification: { + enums: ["left", "center", "right", "auto"] + }, + text: { + string: true + }, + data: { + mapping: true, + regex: data2("data") + }, + layoutData: { + mapping: true, + regex: data2("layoutData") + }, + scratch: { + mapping: true, + regex: data2("scratch") + }, + mapData: { + mapping: true, + regex: mapData("mapData") + }, + mapLayoutData: { + mapping: true, + regex: mapData("mapLayoutData") + }, + mapScratch: { + mapping: true, + regex: mapData("mapScratch") + }, + fn: { + mapping: true, + fn: true + }, + url: { + regexes: urlRegexes, + singleRegexMatchValue: true + }, + urls: { + regexes: urlRegexes, + singleRegexMatchValue: true, + multiple: true + }, + propList: { + propList: true + }, + angle: { + number: true, + units: "deg|rad", + implicitUnits: "rad" + }, + textRotation: { + number: true, + units: "deg|rad", + implicitUnits: "rad", + enums: ["none", "autorotate"] + }, + polygonPointList: { + number: true, + multiple: true, + evenMultiple: true, + min: -1, + max: 1, + unitless: true + }, + edgeDistances: { + enums: ["intersection", "node-position"] + }, + edgeEndpoint: { + number: true, + multiple: true, + units: "%|px|em|deg|rad", + implicitUnits: "px", + enums: ["inside-to-node", "outside-to-node", "outside-to-node-or-label", "outside-to-line", "outside-to-line-or-label"], + singleEnum: true, + validate: function validate(valArr, unitsArr) { + switch (valArr.length) { + case 2: + return unitsArr[0] !== "deg" && unitsArr[0] !== "rad" && unitsArr[1] !== "deg" && unitsArr[1] !== "rad"; + case 1: + return string(valArr[0]) || unitsArr[0] === "deg" || unitsArr[0] === "rad"; + default: + return false; + } + } + }, + easing: { + regexes: ["^(spring)\\s*\\(\\s*(" + number$12 + ")\\s*,\\s*(" + number$12 + ")\\s*\\)$", "^(cubic-bezier)\\s*\\(\\s*(" + number$12 + ")\\s*,\\s*(" + number$12 + ")\\s*,\\s*(" + number$12 + ")\\s*,\\s*(" + number$12 + ")\\s*\\)$"], + enums: ["linear", "ease", "ease-in", "ease-out", "ease-in-out", "ease-in-sine", "ease-out-sine", "ease-in-out-sine", "ease-in-quad", "ease-out-quad", "ease-in-out-quad", "ease-in-cubic", "ease-out-cubic", "ease-in-out-cubic", "ease-in-quart", "ease-out-quart", "ease-in-out-quart", "ease-in-quint", "ease-out-quint", "ease-in-out-quint", "ease-in-expo", "ease-out-expo", "ease-in-out-expo", "ease-in-circ", "ease-out-circ", "ease-in-out-circ"] + }, + gradientDirection: { + enums: [ + "to-bottom", + "to-top", + "to-left", + "to-right", + "to-bottom-right", + "to-bottom-left", + "to-top-right", + "to-top-left", + "to-right-bottom", + "to-left-bottom", + "to-right-top", + "to-left-top" + // different order + ] + }, + boundsExpansion: { + number: true, + multiple: true, + min: 0, + validate: function validate(valArr) { + var length = valArr.length; + return length === 1 || length === 2 || length === 4; + } + } + }; + var diff = { + zeroNonZero: function zeroNonZero(val1, val2) { + if ((val1 == null || val2 == null) && val1 !== val2) { + return true; + } + if (val1 == 0 && val2 != 0) { + return true; + } else if (val1 != 0 && val2 == 0) { + return true; + } else { + return false; + } + }, + any: function any(val1, val2) { + return val1 != val2; + }, + emptyNonEmpty: function emptyNonEmpty(str1, str2) { + var empty1 = emptyString(str1); + var empty2 = emptyString(str2); + return empty1 && !empty2 || !empty1 && empty2; + } + }; + var t = styfn$2.types; + var mainLabel = [{ + name: "label", + type: t.text, + triggersBounds: diff.any, + triggersZOrder: diff.emptyNonEmpty + }, { + name: "text-rotation", + type: t.textRotation, + triggersBounds: diff.any + }, { + name: "text-margin-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "text-margin-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }]; + var sourceLabel = [{ + name: "source-label", + type: t.text, + triggersBounds: diff.any + }, { + name: "source-text-rotation", + type: t.textRotation, + triggersBounds: diff.any + }, { + name: "source-text-margin-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "source-text-margin-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "source-text-offset", + type: t.size, + triggersBounds: diff.any + }]; + var targetLabel = [{ + name: "target-label", + type: t.text, + triggersBounds: diff.any + }, { + name: "target-text-rotation", + type: t.textRotation, + triggersBounds: diff.any + }, { + name: "target-text-margin-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "target-text-margin-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "target-text-offset", + type: t.size, + triggersBounds: diff.any + }]; + var labelDimensions = [{ + name: "font-family", + type: t.fontFamily, + triggersBounds: diff.any + }, { + name: "font-style", + type: t.fontStyle, + triggersBounds: diff.any + }, { + name: "font-weight", + type: t.fontWeight, + triggersBounds: diff.any + }, { + name: "font-size", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-transform", + type: t.textTransform, + triggersBounds: diff.any + }, { + name: "text-wrap", + type: t.textWrap, + triggersBounds: diff.any + }, { + name: "text-overflow-wrap", + type: t.textOverflowWrap, + triggersBounds: diff.any + }, { + name: "text-max-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-outline-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "line-height", + type: t.positiveNumber, + triggersBounds: diff.any + }]; + var commonLabel = [{ + name: "text-valign", + type: t.valign, + triggersBounds: diff.any + }, { + name: "text-halign", + type: t.halign, + triggersBounds: diff.any + }, { + name: "color", + type: t.color + }, { + name: "text-outline-color", + type: t.color + }, { + name: "text-outline-opacity", + type: t.zeroOneNumber + }, { + name: "text-background-color", + type: t.color + }, { + name: "text-background-opacity", + type: t.zeroOneNumber + }, { + name: "text-background-padding", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-border-opacity", + type: t.zeroOneNumber + }, { + name: "text-border-color", + type: t.color + }, { + name: "text-border-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "text-border-style", + type: t.borderStyle, + triggersBounds: diff.any + }, { + name: "text-background-shape", + type: t.textBackgroundShape, + triggersBounds: diff.any + }, { + name: "text-justification", + type: t.justification + }]; + var behavior = [{ + name: "events", + type: t.bool + }, { + name: "text-events", + type: t.bool + }]; + var visibility = [{ + name: "display", + type: t.display, + triggersZOrder: diff.any, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: "visibility", + type: t.visibility, + triggersZOrder: diff.any + }, { + name: "opacity", + type: t.zeroOneNumber, + triggersZOrder: diff.zeroNonZero + }, { + name: "text-opacity", + type: t.zeroOneNumber + }, { + name: "min-zoomed-font-size", + type: t.size + }, { + name: "z-compound-depth", + type: t.zCompoundDepth, + triggersZOrder: diff.any + }, { + name: "z-index-compare", + type: t.zIndexCompare, + triggersZOrder: diff.any + }, { + name: "z-index", + type: t.nonNegativeInt, + triggersZOrder: diff.any + }]; + var overlay = [{ + name: "overlay-padding", + type: t.size, + triggersBounds: diff.any + }, { + name: "overlay-color", + type: t.color + }, { + name: "overlay-opacity", + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: "overlay-shape", + type: t.overlayShape, + triggersBounds: diff.any + }]; + var underlay = [{ + name: "underlay-padding", + type: t.size, + triggersBounds: diff.any + }, { + name: "underlay-color", + type: t.color + }, { + name: "underlay-opacity", + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: "underlay-shape", + type: t.overlayShape, + triggersBounds: diff.any + }]; + var transition = [{ + name: "transition-property", + type: t.propList + }, { + name: "transition-duration", + type: t.time + }, { + name: "transition-delay", + type: t.time + }, { + name: "transition-timing-function", + type: t.easing + }]; + var nodeSizeHashOverride = function nodeSizeHashOverride2(ele, parsedProp) { + if (parsedProp.value === "label") { + return -ele.poolIndex(); + } else { + return parsedProp.pfValue; + } + }; + var nodeBody = [{ + name: "height", + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: "width", + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: "shape", + type: t.nodeShape, + triggersBounds: diff.any + }, { + name: "shape-polygon-points", + type: t.polygonPointList, + triggersBounds: diff.any + }, { + name: "background-color", + type: t.color + }, { + name: "background-fill", + type: t.fill + }, { + name: "background-opacity", + type: t.zeroOneNumber + }, { + name: "background-blacken", + type: t.nOneOneNumber + }, { + name: "background-gradient-stop-colors", + type: t.colors + }, { + name: "background-gradient-stop-positions", + type: t.percentages + }, { + name: "background-gradient-direction", + type: t.gradientDirection + }, { + name: "padding", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "padding-relative-to", + type: t.paddingRelativeTo, + triggersBounds: diff.any + }, { + name: "bounds-expansion", + type: t.boundsExpansion, + triggersBounds: diff.any + }]; + var nodeBorder = [{ + name: "border-color", + type: t.color + }, { + name: "border-opacity", + type: t.zeroOneNumber + }, { + name: "border-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "border-style", + type: t.borderStyle + }]; + var backgroundImage = [{ + name: "background-image", + type: t.urls + }, { + name: "background-image-crossorigin", + type: t.bgCrossOrigin + }, { + name: "background-image-opacity", + type: t.zeroOneNumbers + }, { + name: "background-image-containment", + type: t.bgContainment + }, { + name: "background-image-smoothing", + type: t.bools + }, { + name: "background-position-x", + type: t.bgPos + }, { + name: "background-position-y", + type: t.bgPos + }, { + name: "background-width-relative-to", + type: t.bgRelativeTo + }, { + name: "background-height-relative-to", + type: t.bgRelativeTo + }, { + name: "background-repeat", + type: t.bgRepeat + }, { + name: "background-fit", + type: t.bgFit + }, { + name: "background-clip", + type: t.bgClip + }, { + name: "background-width", + type: t.bgWH + }, { + name: "background-height", + type: t.bgWH + }, { + name: "background-offset-x", + type: t.bgPos + }, { + name: "background-offset-y", + type: t.bgPos + }]; + var compound = [{ + name: "position", + type: t.position, + triggersBounds: diff.any + }, { + name: "compound-sizing-wrt-labels", + type: t.compoundIncludeLabels, + triggersBounds: diff.any + }, { + name: "min-width", + type: t.size, + triggersBounds: diff.any + }, { + name: "min-width-bias-left", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "min-width-bias-right", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "min-height", + type: t.size, + triggersBounds: diff.any + }, { + name: "min-height-bias-top", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: "min-height-bias-bottom", + type: t.sizeMaybePercent, + triggersBounds: diff.any + }]; + var edgeLine = [{ + name: "line-style", + type: t.lineStyle + }, { + name: "line-color", + type: t.color + }, { + name: "line-fill", + type: t.fill + }, { + name: "line-cap", + type: t.lineCap + }, { + name: "line-opacity", + type: t.zeroOneNumber + }, { + name: "line-dash-pattern", + type: t.numbers + }, { + name: "line-dash-offset", + type: t.number + }, { + name: "line-gradient-stop-colors", + type: t.colors + }, { + name: "line-gradient-stop-positions", + type: t.percentages + }, { + name: "curve-style", + type: t.curveStyle, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: "haystack-radius", + type: t.zeroOneNumber, + triggersBounds: diff.any + }, { + name: "source-endpoint", + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: "target-endpoint", + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: "control-point-step-size", + type: t.size, + triggersBounds: diff.any + }, { + name: "control-point-distances", + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: "control-point-weights", + type: t.numbers, + triggersBounds: diff.any + }, { + name: "segment-distances", + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: "segment-weights", + type: t.numbers, + triggersBounds: diff.any + }, { + name: "taxi-turn", + type: t.bidirectionalSizeMaybePercent, + triggersBounds: diff.any + }, { + name: "taxi-turn-min-distance", + type: t.size, + triggersBounds: diff.any + }, { + name: "taxi-direction", + type: t.axisDirection, + triggersBounds: diff.any + }, { + name: "edge-distances", + type: t.edgeDistances, + triggersBounds: diff.any + }, { + name: "arrow-scale", + type: t.positiveNumber, + triggersBounds: diff.any + }, { + name: "loop-direction", + type: t.angle, + triggersBounds: diff.any + }, { + name: "loop-sweep", + type: t.angle, + triggersBounds: diff.any + }, { + name: "source-distance-from-node", + type: t.size, + triggersBounds: diff.any + }, { + name: "target-distance-from-node", + type: t.size, + triggersBounds: diff.any + }]; + var ghost = [{ + name: "ghost", + type: t.bool, + triggersBounds: diff.any + }, { + name: "ghost-offset-x", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "ghost-offset-y", + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: "ghost-opacity", + type: t.zeroOneNumber + }]; + var core2 = [{ + name: "selection-box-color", + type: t.color + }, { + name: "selection-box-opacity", + type: t.zeroOneNumber + }, { + name: "selection-box-border-color", + type: t.color + }, { + name: "selection-box-border-width", + type: t.size + }, { + name: "active-bg-color", + type: t.color + }, { + name: "active-bg-opacity", + type: t.zeroOneNumber + }, { + name: "active-bg-size", + type: t.size + }, { + name: "outside-texture-bg-color", + type: t.color + }, { + name: "outside-texture-bg-opacity", + type: t.zeroOneNumber + }]; + var pie = []; + styfn$2.pieBackgroundN = 16; + pie.push({ + name: "pie-size", + type: t.sizeMaybePercent + }); + for (var i2 = 1; i2 <= styfn$2.pieBackgroundN; i2++) { + pie.push({ + name: "pie-" + i2 + "-background-color", + type: t.color + }); + pie.push({ + name: "pie-" + i2 + "-background-size", + type: t.percent + }); + pie.push({ + name: "pie-" + i2 + "-background-opacity", + type: t.zeroOneNumber + }); + } + var edgeArrow = []; + var arrowPrefixes = styfn$2.arrowPrefixes = ["source", "mid-source", "target", "mid-target"]; + [{ + name: "arrow-shape", + type: t.arrowShape, + triggersBounds: diff.any + }, { + name: "arrow-color", + type: t.color + }, { + name: "arrow-fill", + type: t.arrowFill + }].forEach(function(prop2) { + arrowPrefixes.forEach(function(prefix) { + var name2 = prefix + "-" + prop2.name; + var type = prop2.type, triggersBounds = prop2.triggersBounds; + edgeArrow.push({ + name: name2, + type, + triggersBounds + }); + }); + }, {}); + var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, backgroundImage, pie, compound, edgeLine, edgeArrow, core2); + var propGroups = styfn$2.propertyGroups = { + // common to all eles + behavior, + transition, + visibility, + overlay, + underlay, + ghost, + // labels + commonLabel, + labelDimensions, + mainLabel, + sourceLabel, + targetLabel, + // node props + nodeBody, + nodeBorder, + backgroundImage, + pie, + compound, + // edge props + edgeLine, + edgeArrow, + core: core2 + }; + var propGroupNames = styfn$2.propertyGroupNames = {}; + var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups); + propGroupKeys.forEach(function(key) { + propGroupNames[key] = propGroups[key].map(function(prop2) { + return prop2.name; + }); + propGroups[key].forEach(function(prop2) { + return prop2.groupKey = key; + }); + }); + var aliases = styfn$2.aliases = [{ + name: "content", + pointsTo: "label" + }, { + name: "control-point-distance", + pointsTo: "control-point-distances" + }, { + name: "control-point-weight", + pointsTo: "control-point-weights" + }, { + name: "edge-text-rotation", + pointsTo: "text-rotation" + }, { + name: "padding-left", + pointsTo: "padding" + }, { + name: "padding-right", + pointsTo: "padding" + }, { + name: "padding-top", + pointsTo: "padding" + }, { + name: "padding-bottom", + pointsTo: "padding" + }]; + styfn$2.propertyNames = props.map(function(p2) { + return p2.name; + }); + for (var _i = 0; _i < props.length; _i++) { + var prop = props[_i]; + props[prop.name] = prop; + } + for (var _i2 = 0; _i2 < aliases.length; _i2++) { + var alias = aliases[_i2]; + var pointsToProp = props[alias.pointsTo]; + var aliasProp = { + name: alias.name, + alias: true, + pointsTo: pointsToProp + }; + props.push(aliasProp); + props[alias.name] = aliasProp; + } + })(); + styfn$2.getDefaultProperty = function(name2) { + return this.getDefaultProperties()[name2]; + }; + styfn$2.getDefaultProperties = function() { + var _p = this._private; + if (_p.defaultProperties != null) { + return _p.defaultProperties; + } + var rawProps = extend({ + // core props + "selection-box-color": "#ddd", + "selection-box-opacity": 0.65, + "selection-box-border-color": "#aaa", + "selection-box-border-width": 1, + "active-bg-color": "black", + "active-bg-opacity": 0.15, + "active-bg-size": 30, + "outside-texture-bg-color": "#000", + "outside-texture-bg-opacity": 0.125, + // common node/edge props + "events": "yes", + "text-events": "no", + "text-valign": "top", + "text-halign": "center", + "text-justification": "auto", + "line-height": 1, + "color": "#000", + "text-outline-color": "#000", + "text-outline-width": 0, + "text-outline-opacity": 1, + "text-opacity": 1, + "text-decoration": "none", + "text-transform": "none", + "text-wrap": "none", + "text-overflow-wrap": "whitespace", + "text-max-width": 9999, + "text-background-color": "#000", + "text-background-opacity": 0, + "text-background-shape": "rectangle", + "text-background-padding": 0, + "text-border-opacity": 0, + "text-border-width": 0, + "text-border-style": "solid", + "text-border-color": "#000", + "font-family": "Helvetica Neue, Helvetica, sans-serif", + "font-style": "normal", + "font-weight": "normal", + "font-size": 16, + "min-zoomed-font-size": 0, + "text-rotation": "none", + "source-text-rotation": "none", + "target-text-rotation": "none", + "visibility": "visible", + "display": "element", + "opacity": 1, + "z-compound-depth": "auto", + "z-index-compare": "auto", + "z-index": 0, + "label": "", + "text-margin-x": 0, + "text-margin-y": 0, + "source-label": "", + "source-text-offset": 0, + "source-text-margin-x": 0, + "source-text-margin-y": 0, + "target-label": "", + "target-text-offset": 0, + "target-text-margin-x": 0, + "target-text-margin-y": 0, + "overlay-opacity": 0, + "overlay-color": "#000", + "overlay-padding": 10, + "overlay-shape": "round-rectangle", + "underlay-opacity": 0, + "underlay-color": "#000", + "underlay-padding": 10, + "underlay-shape": "round-rectangle", + "transition-property": "none", + "transition-duration": 0, + "transition-delay": 0, + "transition-timing-function": "linear", + // node props + "background-blacken": 0, + "background-color": "#999", + "background-fill": "solid", + "background-opacity": 1, + "background-image": "none", + "background-image-crossorigin": "anonymous", + "background-image-opacity": 1, + "background-image-containment": "inside", + "background-image-smoothing": "yes", + "background-position-x": "50%", + "background-position-y": "50%", + "background-offset-x": 0, + "background-offset-y": 0, + "background-width-relative-to": "include-padding", + "background-height-relative-to": "include-padding", + "background-repeat": "no-repeat", + "background-fit": "none", + "background-clip": "node", + "background-width": "auto", + "background-height": "auto", + "border-color": "#000", + "border-opacity": 1, + "border-width": 0, + "border-style": "solid", + "height": 30, + "width": 30, + "shape": "ellipse", + "shape-polygon-points": "-1, -1, 1, -1, 1, 1, -1, 1", + "bounds-expansion": 0, + // node gradient + "background-gradient-direction": "to-bottom", + "background-gradient-stop-colors": "#999", + "background-gradient-stop-positions": "0%", + // ghost props + "ghost": "no", + "ghost-offset-y": 0, + "ghost-offset-x": 0, + "ghost-opacity": 0, + // compound props + "padding": 0, + "padding-relative-to": "width", + "position": "origin", + "compound-sizing-wrt-labels": "include", + "min-width": 0, + "min-width-bias-left": 0, + "min-width-bias-right": 0, + "min-height": 0, + "min-height-bias-top": 0, + "min-height-bias-bottom": 0 + }, { + // node pie bg + "pie-size": "100%" + }, [{ + name: "pie-{{i}}-background-color", + value: "black" + }, { + name: "pie-{{i}}-background-size", + value: "0%" + }, { + name: "pie-{{i}}-background-opacity", + value: 1 + }].reduce(function(css, prop2) { + for (var i3 = 1; i3 <= styfn$2.pieBackgroundN; i3++) { + var name3 = prop2.name.replace("{{i}}", i3); + var val2 = prop2.value; + css[name3] = val2; + } + return css; + }, {}), { + // edge props + "line-style": "solid", + "line-color": "#999", + "line-fill": "solid", + "line-cap": "butt", + "line-opacity": 1, + "line-gradient-stop-colors": "#999", + "line-gradient-stop-positions": "0%", + "control-point-step-size": 40, + "control-point-weights": 0.5, + "segment-weights": 0.5, + "segment-distances": 20, + "taxi-turn": "50%", + "taxi-turn-min-distance": 10, + "taxi-direction": "auto", + "edge-distances": "intersection", + "curve-style": "haystack", + "haystack-radius": 0, + "arrow-scale": 1, + "loop-direction": "-45deg", + "loop-sweep": "-90deg", + "source-distance-from-node": 0, + "target-distance-from-node": 0, + "source-endpoint": "outside-to-node", + "target-endpoint": "outside-to-node", + "line-dash-pattern": [6, 3], + "line-dash-offset": 0 + }, [{ + name: "arrow-shape", + value: "none" + }, { + name: "arrow-color", + value: "#999" + }, { + name: "arrow-fill", + value: "filled" + }].reduce(function(css, prop2) { + styfn$2.arrowPrefixes.forEach(function(prefix) { + var name3 = prefix + "-" + prop2.name; + var val2 = prop2.value; + css[name3] = val2; + }); + return css; + }, {})); + var parsedProps = {}; + for (var i2 = 0; i2 < this.properties.length; i2++) { + var prop = this.properties[i2]; + if (prop.pointsTo) { + continue; + } + var name2 = prop.name; + var val = rawProps[name2]; + var parsedProp = this.parse(name2, val); + parsedProps[name2] = parsedProp; + } + _p.defaultProperties = parsedProps; + return _p.defaultProperties; + }; + styfn$2.addDefaultStylesheet = function() { + this.selector(":parent").css({ + "shape": "rectangle", + "padding": 10, + "background-color": "#eee", + "border-color": "#ccc", + "border-width": 1 + }).selector("edge").css({ + "width": 3 + }).selector(":loop").css({ + "curve-style": "bezier" + }).selector("edge:compound").css({ + "curve-style": "bezier", + "source-endpoint": "outside-to-line", + "target-endpoint": "outside-to-line" + }).selector(":selected").css({ + "background-color": "#0169D9", + "line-color": "#0169D9", + "source-arrow-color": "#0169D9", + "target-arrow-color": "#0169D9", + "mid-source-arrow-color": "#0169D9", + "mid-target-arrow-color": "#0169D9" + }).selector(":parent:selected").css({ + "background-color": "#CCE1F9", + "border-color": "#aec8e5" + }).selector(":active").css({ + "overlay-color": "black", + "overlay-padding": 10, + "overlay-opacity": 0.25 + }); + this.defaultLength = this.length; + }; + var styfn$1 = {}; + styfn$1.parse = function(name2, value, propIsBypass, propIsFlat) { + var self2 = this; + if (fn$6(value)) { + return self2.parseImplWarn(name2, value, propIsBypass, propIsFlat); + } + var flatKey = propIsFlat === "mapping" || propIsFlat === true || propIsFlat === false || propIsFlat == null ? "dontcare" : propIsFlat; + var bypassKey = propIsBypass ? "t" : "f"; + var valueKey = "" + value; + var argHash = hashStrings(name2, valueKey, bypassKey, flatKey); + var propCache = self2.propCache = self2.propCache || []; + var ret; + if (!(ret = propCache[argHash])) { + ret = propCache[argHash] = self2.parseImplWarn(name2, value, propIsBypass, propIsFlat); + } + if (propIsBypass || propIsFlat === "mapping") { + ret = copy(ret); + if (ret) { + ret.value = copy(ret.value); + } + } + return ret; + }; + styfn$1.parseImplWarn = function(name2, value, propIsBypass, propIsFlat) { + var prop = this.parseImpl(name2, value, propIsBypass, propIsFlat); + if (!prop && value != null) { + warn("The style property `".concat(name2, ": ").concat(value, "` is invalid")); + } + if (prop && (prop.name === "width" || prop.name === "height") && value === "label") { + warn("The style value of `label` is deprecated for `" + prop.name + "`"); + } + return prop; + }; + styfn$1.parseImpl = function(name2, value, propIsBypass, propIsFlat) { + var self2 = this; + name2 = camel2dash(name2); + var property = self2.properties[name2]; + var passedValue = value; + var types = self2.types; + if (!property) { + return null; + } + if (value === void 0) { + return null; + } + if (property.alias) { + property = property.pointsTo; + name2 = property.name; + } + var valueIsString = string(value); + if (valueIsString) { + value = value.trim(); + } + var type = property.type; + if (!type) { + return null; + } + if (propIsBypass && (value === "" || value === null)) { + return { + name: name2, + value, + bypass: true, + deleteBypass: true + }; + } + if (fn$6(value)) { + return { + name: name2, + value, + strValue: "fn", + mapped: types.fn, + bypass: propIsBypass + }; + } + var data2, mapData; + if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== "a") + ; + else if (value.length >= 7 && value[0] === "d" && (data2 = new RegExp(types.data.regex).exec(value))) { + if (propIsBypass) { + return false; + } + var mapped = types.data; + return { + name: name2, + value: data2, + strValue: "" + value, + mapped, + field: data2[1], + bypass: propIsBypass + }; + } else if (value.length >= 10 && value[0] === "m" && (mapData = new RegExp(types.mapData.regex).exec(value))) { + if (propIsBypass) { + return false; + } + if (type.multiple) { + return false; + } + var _mapped = types.mapData; + if (!(type.color || type.number)) { + return false; + } + var valueMin = this.parse(name2, mapData[4]); + if (!valueMin || valueMin.mapped) { + return false; + } + var valueMax = this.parse(name2, mapData[5]); + if (!valueMax || valueMax.mapped) { + return false; + } + if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) { + warn("`" + name2 + ": " + value + "` is not a valid mapper because the output range is zero; converting to `" + name2 + ": " + valueMin.strValue + "`"); + return this.parse(name2, valueMin.strValue); + } else if (type.color) { + var c1 = valueMin.value; + var c2 = valueMax.value; + var same = c1[0] === c2[0] && c1[1] === c2[1] && c1[2] === c2[2] && // optional alpha + (c1[3] === c2[3] || (c1[3] == null || c1[3] === 1) && (c2[3] == null || c2[3] === 1)); + if (same) { + return false; + } + } + return { + name: name2, + value: mapData, + strValue: "" + value, + mapped: _mapped, + field: mapData[1], + fieldMin: parseFloat(mapData[2]), + // min & max are numeric + fieldMax: parseFloat(mapData[3]), + valueMin: valueMin.value, + valueMax: valueMax.value, + bypass: propIsBypass + }; + } + if (type.multiple && propIsFlat !== "multiple") { + var vals; + if (valueIsString) { + vals = value.split(/\s+/); + } else if (array(value)) { + vals = value; + } else { + vals = [value]; + } + if (type.evenMultiple && vals.length % 2 !== 0) { + return null; + } + var valArr = []; + var unitsArr = []; + var pfValArr = []; + var strVal = ""; + var hasEnum = false; + for (var i2 = 0; i2 < vals.length; i2++) { + var p2 = self2.parse(name2, vals[i2], propIsBypass, "multiple"); + hasEnum = hasEnum || string(p2.value); + valArr.push(p2.value); + pfValArr.push(p2.pfValue != null ? p2.pfValue : p2.value); + unitsArr.push(p2.units); + strVal += (i2 > 0 ? " " : "") + p2.strValue; + } + if (type.validate && !type.validate(valArr, unitsArr)) { + return null; + } + if (type.singleEnum && hasEnum) { + if (valArr.length === 1 && string(valArr[0])) { + return { + name: name2, + value: valArr[0], + strValue: valArr[0], + bypass: propIsBypass + }; + } else { + return null; + } + } + return { + name: name2, + value: valArr, + pfValue: pfValArr, + strValue: strVal, + bypass: propIsBypass, + units: unitsArr + }; + } + var checkEnums = function checkEnums2() { + for (var _i = 0; _i < type.enums.length; _i++) { + var en = type.enums[_i]; + if (en === value) { + return { + name: name2, + value, + strValue: "" + value, + bypass: propIsBypass + }; + } + } + return null; + }; + if (type.number) { + var units; + var implicitUnits = "px"; + if (type.units) { + units = type.units; + } + if (type.implicitUnits) { + implicitUnits = type.implicitUnits; + } + if (!type.unitless) { + if (valueIsString) { + var unitsRegex = "px|em" + (type.allowPercent ? "|\\%" : ""); + if (units) { + unitsRegex = units; + } + var match2 = value.match("^(" + number + ")(" + unitsRegex + ")?$"); + if (match2) { + value = match2[1]; + units = match2[2] || implicitUnits; + } + } else if (!units || type.implicitUnits) { + units = implicitUnits; + } + } + value = parseFloat(value); + if (isNaN(value) && type.enums === void 0) { + return null; + } + if (isNaN(value) && type.enums !== void 0) { + value = passedValue; + return checkEnums(); + } + if (type.integer && !integer(value)) { + return null; + } + if (type.min !== void 0 && (value < type.min || type.strictMin && value === type.min) || type.max !== void 0 && (value > type.max || type.strictMax && value === type.max)) { + return null; + } + var ret = { + name: name2, + value, + strValue: "" + value + (units ? units : ""), + units, + bypass: propIsBypass + }; + if (type.unitless || units !== "px" && units !== "em") { + ret.pfValue = value; + } else { + ret.pfValue = units === "px" || !units ? value : this.getEmSizeInPixels() * value; + } + if (units === "ms" || units === "s") { + ret.pfValue = units === "ms" ? value : 1e3 * value; + } + if (units === "deg" || units === "rad") { + ret.pfValue = units === "rad" ? value : deg2rad(value); + } + if (units === "%") { + ret.pfValue = value / 100; + } + return ret; + } else if (type.propList) { + var props = []; + var propsStr = "" + value; + if (propsStr === "none") + ; + else { + var propsSplit = propsStr.split(/\s*,\s*|\s+/); + for (var _i2 = 0; _i2 < propsSplit.length; _i2++) { + var propName = propsSplit[_i2].trim(); + if (self2.properties[propName]) { + props.push(propName); + } else { + warn("`" + propName + "` is not a valid property name"); + } + } + if (props.length === 0) { + return null; + } + } + return { + name: name2, + value: props, + strValue: props.length === 0 ? "none" : props.join(" "), + bypass: propIsBypass + }; + } else if (type.color) { + var tuple = color2tuple(value); + if (!tuple) { + return null; + } + return { + name: name2, + value: tuple, + pfValue: tuple, + strValue: "rgb(" + tuple[0] + "," + tuple[1] + "," + tuple[2] + ")", + // n.b. no spaces b/c of multiple support + bypass: propIsBypass + }; + } else if (type.regex || type.regexes) { + if (type.enums) { + var enumProp = checkEnums(); + if (enumProp) { + return enumProp; + } + } + var regexes = type.regexes ? type.regexes : [type.regex]; + for (var _i3 = 0; _i3 < regexes.length; _i3++) { + var regex = new RegExp(regexes[_i3]); + var m = regex.exec(value); + if (m) { + return { + name: name2, + value: type.singleRegexMatchValue ? m[1] : m, + strValue: "" + value, + bypass: propIsBypass + }; + } + } + return null; + } else if (type.string) { + return { + name: name2, + value: "" + value, + strValue: "" + value, + bypass: propIsBypass + }; + } else if (type.enums) { + return checkEnums(); + } else { + return null; + } + }; + var Style = function Style2(cy) { + if (!(this instanceof Style2)) { + return new Style2(cy); + } + if (!core(cy)) { + error("A style must have a core reference"); + return; + } + this._private = { + cy, + coreStyle: {} + }; + this.length = 0; + this.resetToDefault(); + }; + var styfn = Style.prototype; + styfn.instanceString = function() { + return "style"; + }; + styfn.clear = function() { + var _p = this._private; + var cy = _p.cy; + var eles = cy.elements(); + for (var i2 = 0; i2 < this.length; i2++) { + this[i2] = void 0; + } + this.length = 0; + _p.contextStyles = {}; + _p.propDiffs = {}; + this.cleanElements(eles, true); + eles.forEach(function(ele) { + var ele_p = ele[0]._private; + ele_p.styleDirty = true; + ele_p.appliedInitStyle = false; + }); + return this; + }; + styfn.resetToDefault = function() { + this.clear(); + this.addDefaultStylesheet(); + return this; + }; + styfn.core = function(propName) { + return this._private.coreStyle[propName] || this.getDefaultProperty(propName); + }; + styfn.selector = function(selectorStr) { + var selector = selectorStr === "core" ? null : new Selector(selectorStr); + var i2 = this.length++; + this[i2] = { + selector, + properties: [], + mappedProperties: [], + index: i2 + }; + return this; + }; + styfn.css = function() { + var self2 = this; + var args = arguments; + if (args.length === 1) { + var map = args[0]; + for (var i2 = 0; i2 < self2.properties.length; i2++) { + var prop = self2.properties[i2]; + var mapVal = map[prop.name]; + if (mapVal === void 0) { + mapVal = map[dash2camel(prop.name)]; + } + if (mapVal !== void 0) { + this.cssRule(prop.name, mapVal); + } + } + } else if (args.length === 2) { + this.cssRule(args[0], args[1]); + } + return this; + }; + styfn.style = styfn.css; + styfn.cssRule = function(name2, value) { + var property = this.parse(name2, value); + if (property) { + var i2 = this.length - 1; + this[i2].properties.push(property); + this[i2].properties[property.name] = property; + if (property.name.match(/pie-(\d+)-background-size/) && property.value) { + this._private.hasPie = true; + } + if (property.mapped) { + this[i2].mappedProperties.push(property); + } + var currentSelectorIsCore = !this[i2].selector; + if (currentSelectorIsCore) { + this._private.coreStyle[property.name] = property; + } + } + return this; + }; + styfn.append = function(style) { + if (stylesheet(style)) { + style.appendToStyle(this); + } else if (array(style)) { + this.appendFromJson(style); + } else if (string(style)) { + this.appendFromString(style); + } + return this; + }; + Style.fromJson = function(cy, json) { + var style = new Style(cy); + style.fromJson(json); + return style; + }; + Style.fromString = function(cy, string2) { + return new Style(cy).fromString(string2); + }; + [styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function(props) { + extend(styfn, props); + }); + Style.types = styfn.types; + Style.properties = styfn.properties; + Style.propertyGroups = styfn.propertyGroups; + Style.propertyGroupNames = styfn.propertyGroupNames; + Style.propertyGroupKeys = styfn.propertyGroupKeys; + var corefn$2 = { + style: function style(newStyle) { + if (newStyle) { + var s = this.setStyle(newStyle); + s.update(); + } + return this._private.style; + }, + setStyle: function setStyle(style) { + var _p = this._private; + if (stylesheet(style)) { + _p.style = style.generateStyle(this); + } else if (array(style)) { + _p.style = Style.fromJson(this, style); + } else if (string(style)) { + _p.style = Style.fromString(this, style); + } else { + _p.style = Style(this); + } + return _p.style; + }, + // e.g. cy.data() changed => recalc ele mappers + updateStyle: function updateStyle() { + this.mutableElements().updateStyle(); + } + }; + var defaultSelectionType = "single"; + var corefn$1 = { + autolock: function autolock(bool) { + if (bool !== void 0) { + this._private.autolock = bool ? true : false; + } else { + return this._private.autolock; + } + return this; + }, + autoungrabify: function autoungrabify(bool) { + if (bool !== void 0) { + this._private.autoungrabify = bool ? true : false; + } else { + return this._private.autoungrabify; + } + return this; + }, + autounselectify: function autounselectify(bool) { + if (bool !== void 0) { + this._private.autounselectify = bool ? true : false; + } else { + return this._private.autounselectify; + } + return this; + }, + selectionType: function selectionType(selType) { + var _p = this._private; + if (_p.selectionType == null) { + _p.selectionType = defaultSelectionType; + } + if (selType !== void 0) { + if (selType === "additive" || selType === "single") { + _p.selectionType = selType; + } + } else { + return _p.selectionType; + } + return this; + }, + panningEnabled: function panningEnabled(bool) { + if (bool !== void 0) { + this._private.panningEnabled = bool ? true : false; + } else { + return this._private.panningEnabled; + } + return this; + }, + userPanningEnabled: function userPanningEnabled(bool) { + if (bool !== void 0) { + this._private.userPanningEnabled = bool ? true : false; + } else { + return this._private.userPanningEnabled; + } + return this; + }, + zoomingEnabled: function zoomingEnabled(bool) { + if (bool !== void 0) { + this._private.zoomingEnabled = bool ? true : false; + } else { + return this._private.zoomingEnabled; + } + return this; + }, + userZoomingEnabled: function userZoomingEnabled(bool) { + if (bool !== void 0) { + this._private.userZoomingEnabled = bool ? true : false; + } else { + return this._private.userZoomingEnabled; + } + return this; + }, + boxSelectionEnabled: function boxSelectionEnabled(bool) { + if (bool !== void 0) { + this._private.boxSelectionEnabled = bool ? true : false; + } else { + return this._private.boxSelectionEnabled; + } + return this; + }, + pan: function pan() { + var args = arguments; + var pan2 = this._private.pan; + var dim, val, dims, x, y; + switch (args.length) { + case 0: + return pan2; + case 1: + if (string(args[0])) { + dim = args[0]; + return pan2[dim]; + } else if (plainObject(args[0])) { + if (!this._private.panningEnabled) { + return this; + } + dims = args[0]; + x = dims.x; + y = dims.y; + if (number$1(x)) { + pan2.x = x; + } + if (number$1(y)) { + pan2.y = y; + } + this.emit("pan viewport"); + } + break; + case 2: + if (!this._private.panningEnabled) { + return this; + } + dim = args[0]; + val = args[1]; + if ((dim === "x" || dim === "y") && number$1(val)) { + pan2[dim] = val; + } + this.emit("pan viewport"); + break; + } + this.notify("viewport"); + return this; + }, + panBy: function panBy(arg0, arg1) { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x, y; + if (!this._private.panningEnabled) { + return this; + } + switch (args.length) { + case 1: + if (plainObject(arg0)) { + dims = args[0]; + x = dims.x; + y = dims.y; + if (number$1(x)) { + pan.x += x; + } + if (number$1(y)) { + pan.y += y; + } + this.emit("pan viewport"); + } + break; + case 2: + dim = arg0; + val = arg1; + if ((dim === "x" || dim === "y") && number$1(val)) { + pan[dim] += val; + } + this.emit("pan viewport"); + break; + } + this.notify("viewport"); + return this; + }, + fit: function fit(elements2, padding) { + var viewportState = this.getFitViewport(elements2, padding); + if (viewportState) { + var _p = this._private; + _p.zoom = viewportState.zoom; + _p.pan = viewportState.pan; + this.emit("pan zoom viewport"); + this.notify("viewport"); + } + return this; + }, + getFitViewport: function getFitViewport(elements2, padding) { + if (number$1(elements2) && padding === void 0) { + padding = elements2; + elements2 = void 0; + } + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return; + } + var bb; + if (string(elements2)) { + var sel = elements2; + elements2 = this.$(sel); + } else if (boundingBox(elements2)) { + var bbe = elements2; + bb = { + x1: bbe.x1, + y1: bbe.y1, + x2: bbe.x2, + y2: bbe.y2 + }; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } else if (!elementOrCollection(elements2)) { + elements2 = this.mutableElements(); + } + if (elementOrCollection(elements2) && elements2.empty()) { + return; + } + bb = bb || elements2.boundingBox(); + var w = this.width(); + var h = this.height(); + var zoom; + padding = number$1(padding) ? padding : 0; + if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) { + zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h); + zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom; + zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom; + var pan = { + // now pan to middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return { + zoom, + pan + }; + } + return; + }, + zoomRange: function zoomRange(min2, max2) { + var _p = this._private; + if (max2 == null) { + var opts = min2; + min2 = opts.min; + max2 = opts.max; + } + if (number$1(min2) && number$1(max2) && min2 <= max2) { + _p.minZoom = min2; + _p.maxZoom = max2; + } else if (number$1(min2) && max2 === void 0 && min2 <= _p.maxZoom) { + _p.minZoom = min2; + } else if (number$1(max2) && min2 === void 0 && max2 >= _p.minZoom) { + _p.maxZoom = max2; + } + return this; + }, + minZoom: function minZoom(zoom) { + if (zoom === void 0) { + return this._private.minZoom; + } else { + return this.zoomRange({ + min: zoom + }); + } + }, + maxZoom: function maxZoom2(zoom) { + if (zoom === void 0) { + return this._private.maxZoom; + } else { + return this.zoomRange({ + max: zoom + }); + } + }, + getZoomedViewport: function getZoomedViewport(params) { + var _p = this._private; + var currentPan = _p.pan; + var currentZoom = _p.zoom; + var pos; + var zoom; + var bail = false; + if (!_p.zoomingEnabled) { + bail = true; + } + if (number$1(params)) { + zoom = params; + } else if (plainObject(params)) { + zoom = params.level; + if (params.position != null) { + pos = modelToRenderedPosition(params.position, currentZoom, currentPan); + } else if (params.renderedPosition != null) { + pos = params.renderedPosition; + } + if (pos != null && !_p.panningEnabled) { + bail = true; + } + } + zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom; + zoom = zoom < _p.minZoom ? _p.minZoom : zoom; + if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) { + return null; + } + if (pos != null) { + var pan1 = currentPan; + var zoom1 = currentZoom; + var zoom2 = zoom; + var pan2 = { + x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x, + y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y + }; + return { + zoomed: true, + panned: true, + zoom: zoom2, + pan: pan2 + }; + } else { + return { + zoomed: true, + panned: false, + zoom, + pan: currentPan + }; + } + }, + zoom: function zoom(params) { + if (params === void 0) { + return this._private.zoom; + } else { + var vp = this.getZoomedViewport(params); + var _p = this._private; + if (vp == null || !vp.zoomed) { + return this; + } + _p.zoom = vp.zoom; + if (vp.panned) { + _p.pan.x = vp.pan.x; + _p.pan.y = vp.pan.y; + } + this.emit("zoom" + (vp.panned ? " pan" : "") + " viewport"); + this.notify("viewport"); + return this; + } + }, + viewport: function viewport(opts) { + var _p = this._private; + var zoomDefd = true; + var panDefd = true; + var events = []; + var zoomFailed = false; + var panFailed = false; + if (!opts) { + return this; + } + if (!number$1(opts.zoom)) { + zoomDefd = false; + } + if (!plainObject(opts.pan)) { + panDefd = false; + } + if (!zoomDefd && !panDefd) { + return this; + } + if (zoomDefd) { + var z = opts.zoom; + if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) { + zoomFailed = true; + } else { + _p.zoom = z; + events.push("zoom"); + } + } + if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) { + var p2 = opts.pan; + if (number$1(p2.x)) { + _p.pan.x = p2.x; + panFailed = false; + } + if (number$1(p2.y)) { + _p.pan.y = p2.y; + panFailed = false; + } + if (!panFailed) { + events.push("pan"); + } + } + if (events.length > 0) { + events.push("viewport"); + this.emit(events.join(" ")); + this.notify("viewport"); + } + return this; + }, + center: function center(elements2) { + var pan = this.getCenterPan(elements2); + if (pan) { + this._private.pan = pan; + this.emit("pan viewport"); + this.notify("viewport"); + } + return this; + }, + getCenterPan: function getCenterPan(elements2, zoom) { + if (!this._private.panningEnabled) { + return; + } + if (string(elements2)) { + var selector = elements2; + elements2 = this.mutableElements().filter(selector); + } else if (!elementOrCollection(elements2)) { + elements2 = this.mutableElements(); + } + if (elements2.length === 0) { + return; + } + var bb = elements2.boundingBox(); + var w = this.width(); + var h = this.height(); + zoom = zoom === void 0 ? this._private.zoom : zoom; + var pan = { + // middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return pan; + }, + reset: function reset() { + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return this; + } + this.viewport({ + pan: { + x: 0, + y: 0 + }, + zoom: 1 + }); + return this; + }, + invalidateSize: function invalidateSize() { + this._private.sizeCache = null; + }, + size: function size() { + var _p = this._private; + var container = _p.container; + return _p.sizeCache = _p.sizeCache || (container ? function() { + var style = window$1.getComputedStyle(container); + var val = function val2(name2) { + return parseFloat(style.getPropertyValue(name2)); + }; + return { + width: container.clientWidth - val("padding-left") - val("padding-right"), + height: container.clientHeight - val("padding-top") - val("padding-bottom") + }; + }() : { + // fallback if no container (not 0 b/c can be used for dividing etc) + width: 1, + height: 1 + }); + }, + width: function width() { + return this.size().width; + }, + height: function height() { + return this.size().height; + }, + extent: function extent() { + var pan = this._private.pan; + var zoom = this._private.zoom; + var rb = this.renderedExtent(); + var b = { + x1: (rb.x1 - pan.x) / zoom, + x2: (rb.x2 - pan.x) / zoom, + y1: (rb.y1 - pan.y) / zoom, + y2: (rb.y2 - pan.y) / zoom + }; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + return b; + }, + renderedExtent: function renderedExtent() { + var width = this.width(); + var height = this.height(); + return { + x1: 0, + y1: 0, + x2: width, + y2: height, + w: width, + h: height + }; + }, + multiClickDebounceTime: function multiClickDebounceTime(_int) { + if (_int) + this._private.multiClickDebounceTime = _int; + else + return this._private.multiClickDebounceTime; + return this; + } + }; + corefn$1.centre = corefn$1.center; + corefn$1.autolockNodes = corefn$1.autolock; + corefn$1.autoungrabifyNodes = corefn$1.autoungrabify; + var fn = { + data: define.data({ + field: "data", + bindingEvent: "data", + allowBinding: true, + allowSetting: true, + settingEvent: "data", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + updateStyle: true + }), + removeData: define.removeData({ + field: "data", + event: "data", + triggerFnName: "trigger", + triggerEvent: true, + updateStyle: true + }), + scratch: define.data({ + field: "scratch", + bindingEvent: "scratch", + allowBinding: true, + allowSetting: true, + settingEvent: "scratch", + settingTriggersEvent: true, + triggerFnName: "trigger", + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: "scratch", + event: "scratch", + triggerFnName: "trigger", + triggerEvent: true, + updateStyle: true + }) + }; + fn.attr = fn.data; + fn.removeAttr = fn.removeData; + var Core = function Core2(opts) { + var cy = this; + opts = extend({}, opts); + var container = opts.container; + if (container && !htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + var reg = container ? container._cyreg : null; + reg = reg || {}; + if (reg && reg.cy) { + reg.cy.destroy(); + reg = {}; + } + var readies = reg.readies = reg.readies || []; + if (container) { + container._cyreg = reg; + } + reg.cy = cy; + var head = window$1 !== void 0 && container !== void 0 && !opts.headless; + var options = opts; + options.layout = extend({ + name: head ? "grid" : "null" + }, options.layout); + options.renderer = extend({ + name: head ? "canvas" : "null" + }, options.renderer); + var defVal = function defVal2(def, val, altVal) { + if (val !== void 0) { + return val; + } else if (altVal !== void 0) { + return altVal; + } else { + return def; + } + }; + var _p = this._private = { + container, + // html dom ele container + ready: false, + // whether ready has been triggered + options, + // cached options + elements: new Collection(this), + // elements in the graph + listeners: [], + // list of listeners + aniEles: new Collection(this), + // elements being animated + data: options.data || {}, + // data for the core + scratch: {}, + // scratch object for core + layout: null, + renderer: null, + destroyed: false, + // whether destroy was called + notificationsEnabled: true, + // whether notifications are sent to the renderer + minZoom: 1e-50, + maxZoom: 1e50, + zoomingEnabled: defVal(true, options.zoomingEnabled), + userZoomingEnabled: defVal(true, options.userZoomingEnabled), + panningEnabled: defVal(true, options.panningEnabled), + userPanningEnabled: defVal(true, options.userPanningEnabled), + boxSelectionEnabled: defVal(true, options.boxSelectionEnabled), + autolock: defVal(false, options.autolock, options.autolockNodes), + autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes), + autounselectify: defVal(false, options.autounselectify), + styleEnabled: options.styleEnabled === void 0 ? head : options.styleEnabled, + zoom: number$1(options.zoom) ? options.zoom : 1, + pan: { + x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0, + y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0 + }, + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + hasCompoundNodes: false, + multiClickDebounceTime: defVal(250, options.multiClickDebounceTime) + }; + this.createEmitter(); + this.selectionType(options.selectionType); + this.zoomRange({ + min: options.minZoom, + max: options.maxZoom + }); + var loadExtData = function loadExtData2(extData, next2) { + var anyIsPromise = extData.some(promise); + if (anyIsPromise) { + return Promise$1.all(extData).then(next2); + } else { + next2(extData); + } + }; + if (_p.styleEnabled) { + cy.setStyle([]); + } + var rendererOptions = extend({}, options, options.renderer); + cy.initRenderer(rendererOptions); + var setElesAndLayout = function setElesAndLayout2(elements2, onload, ondone) { + cy.notifications(false); + var oldEles = cy.mutableElements(); + if (oldEles.length > 0) { + oldEles.remove(); + } + if (elements2 != null) { + if (plainObject(elements2) || array(elements2)) { + cy.add(elements2); + } + } + cy.one("layoutready", function(e) { + cy.notifications(true); + cy.emit(e); + cy.one("load", onload); + cy.emitAndNotify("load"); + }).one("layoutstop", function() { + cy.one("done", ondone); + cy.emit("done"); + }); + var layoutOpts = extend({}, cy._private.options.layout); + layoutOpts.eles = cy.elements(); + cy.layout(layoutOpts).run(); + }; + loadExtData([options.style, options.elements], function(thens) { + var initStyle = thens[0]; + var initEles = thens[1]; + if (_p.styleEnabled) { + cy.style().append(initStyle); + } + setElesAndLayout(initEles, function() { + cy.startAnimationLoop(); + _p.ready = true; + if (fn$6(options.ready)) { + cy.on("ready", options.ready); + } + for (var i2 = 0; i2 < readies.length; i2++) { + var fn2 = readies[i2]; + cy.on("ready", fn2); + } + if (reg) { + reg.readies = []; + } + cy.emit("ready"); + }, options.done); + }); + }; + var corefn = Core.prototype; + extend(corefn, { + instanceString: function instanceString() { + return "core"; + }, + isReady: function isReady() { + return this._private.ready; + }, + destroyed: function destroyed() { + return this._private.destroyed; + }, + ready: function ready(fn2) { + if (this.isReady()) { + this.emitter().emit("ready", [], fn2); + } else { + this.on("ready", fn2); + } + return this; + }, + destroy: function destroy() { + var cy = this; + if (cy.destroyed()) + return; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + this.emit("destroy"); + cy._private.destroyed = true; + return cy; + }, + hasElementWithId: function hasElementWithId(id) { + return this._private.elements.hasElementWithId(id); + }, + getElementById: function getElementById2(id) { + return this._private.elements.getElementById(id); + }, + hasCompoundNodes: function hasCompoundNodes() { + return this._private.hasCompoundNodes; + }, + headless: function headless() { + return this._private.renderer.isHeadless(); + }, + styleEnabled: function styleEnabled() { + return this._private.styleEnabled; + }, + addToPool: function addToPool(eles) { + this._private.elements.merge(eles); + return this; + }, + removeFromPool: function removeFromPool(eles) { + this._private.elements.unmerge(eles); + return this; + }, + container: function container() { + return this._private.container || null; + }, + mount: function mount(container) { + if (container == null) { + return; + } + var cy = this; + var _p = cy._private; + var options = _p.options; + if (!htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + cy.stopAnimationLoop(); + cy.destroyRenderer(); + _p.container = container; + _p.styleEnabled = true; + cy.invalidateSize(); + cy.initRenderer(extend({}, options, options.renderer, { + // allow custom renderer name to be re-used, otherwise use canvas + name: options.renderer.name === "null" ? "canvas" : options.renderer.name + })); + cy.startAnimationLoop(); + cy.style(options.style); + cy.emit("mount"); + return cy; + }, + unmount: function unmount() { + var cy = this; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + cy.initRenderer({ + name: "null" + }); + cy.emit("unmount"); + return cy; + }, + options: function options() { + return copy(this._private.options); + }, + json: function json(obj) { + var cy = this; + var _p = cy._private; + var eles = cy.mutableElements(); + var getFreshRef = function getFreshRef2(ele) { + return cy.getElementById(ele.id()); + }; + if (plainObject(obj)) { + cy.startBatch(); + if (obj.elements) { + var idInJson = {}; + var updateEles = function updateEles2(jsons, gr2) { + var toAdd = []; + var toMod = []; + for (var i3 = 0; i3 < jsons.length; i3++) { + var json3 = jsons[i3]; + if (!json3.data.id) { + warn("cy.json() cannot handle elements without an ID attribute"); + continue; + } + var id = "" + json3.data.id; + var ele = cy.getElementById(id); + idInJson[id] = true; + if (ele.length !== 0) { + toMod.push({ + ele, + json: json3 + }); + } else { + if (gr2) { + json3.group = gr2; + toAdd.push(json3); + } else { + toAdd.push(json3); + } + } + } + cy.add(toAdd); + for (var _i = 0; _i < toMod.length; _i++) { + var _toMod$_i = toMod[_i], _ele = _toMod$_i.ele, _json = _toMod$_i.json; + _ele.json(_json); + } + }; + if (array(obj.elements)) { + updateEles(obj.elements); + } else { + var grs = ["nodes", "edges"]; + for (var i2 = 0; i2 < grs.length; i2++) { + var gr = grs[i2]; + var elements2 = obj.elements[gr]; + if (array(elements2)) { + updateEles(elements2, gr); + } + } + } + var parentsToRemove = cy.collection(); + eles.filter(function(ele) { + return !idInJson[ele.id()]; + }).forEach(function(ele) { + if (ele.isParent()) { + parentsToRemove.merge(ele); + } else { + ele.remove(); + } + }); + parentsToRemove.forEach(function(ele) { + return ele.children().move({ + parent: null + }); + }); + parentsToRemove.forEach(function(ele) { + return getFreshRef(ele).remove(); + }); + } + if (obj.style) { + cy.style(obj.style); + } + if (obj.zoom != null && obj.zoom !== _p.zoom) { + cy.zoom(obj.zoom); + } + if (obj.pan) { + if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) { + cy.pan(obj.pan); + } + } + if (obj.data) { + cy.data(obj.data); + } + var fields = ["minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autolock", "autoungrabify", "autounselectify", "multiClickDebounceTime"]; + for (var _i2 = 0; _i2 < fields.length; _i2++) { + var f = fields[_i2]; + if (obj[f] != null) { + cy[f](obj[f]); + } + } + cy.endBatch(); + return this; + } else { + var flat = !!obj; + var json2 = {}; + if (flat) { + json2.elements = this.elements().map(function(ele) { + return ele.json(); + }); + } else { + json2.elements = {}; + eles.forEach(function(ele) { + var group = ele.group(); + if (!json2.elements[group]) { + json2.elements[group] = []; + } + json2.elements[group].push(ele.json()); + }); + } + if (this._private.styleEnabled) { + json2.style = cy.style().json(); + } + json2.data = copy(cy.data()); + var options = _p.options; + json2.zoomingEnabled = _p.zoomingEnabled; + json2.userZoomingEnabled = _p.userZoomingEnabled; + json2.zoom = _p.zoom; + json2.minZoom = _p.minZoom; + json2.maxZoom = _p.maxZoom; + json2.panningEnabled = _p.panningEnabled; + json2.userPanningEnabled = _p.userPanningEnabled; + json2.pan = copy(_p.pan); + json2.boxSelectionEnabled = _p.boxSelectionEnabled; + json2.renderer = copy(options.renderer); + json2.hideEdgesOnViewport = options.hideEdgesOnViewport; + json2.textureOnViewport = options.textureOnViewport; + json2.wheelSensitivity = options.wheelSensitivity; + json2.motionBlur = options.motionBlur; + json2.multiClickDebounceTime = options.multiClickDebounceTime; + return json2; + } + } + }); + corefn.$id = corefn.getElementById; + [corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function(props) { + extend(corefn, props); + }); + var defaults$7 = { + fit: true, + // whether to fit the viewport to the graph + directed: false, + // whether the tree is directed downwards (or edges can point in any direction if false) + padding: 30, + // padding on fit + circle: false, + // put depths in concentric circles if true, put depths top down if false + grid: false, + // whether to create an even grid into which the DAG is placed (circle:false only) + spacingFactor: 1.75, + // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + roots: void 0, + // the roots of the trees + maximal: false, + // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only) + depthSort: void 0, + // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled, + animateFilter: function animateFilter(node, i2) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node, position2) { + return position2; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + var getInfo = function getInfo2(ele) { + return ele.scratch("breadthfirst"); + }; + var setInfo = function setInfo2(ele, obj) { + return ele.scratch("breadthfirst", obj); + }; + function BreadthFirstLayout(options) { + this.options = extend({}, defaults$7, options); + } + BreadthFirstLayout.prototype.run = function() { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes2 = eles.nodes().filter(function(n2) { + return !n2.isParent(); + }); + var graph = eles; + var directed = options.directed; + var maximal = options.maximal || options.maximalAdjustments > 0; + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var roots; + if (elementOrCollection(options.roots)) { + roots = options.roots; + } else if (array(options.roots)) { + var rootsArray = []; + for (var i2 = 0; i2 < options.roots.length; i2++) { + var id = options.roots[i2]; + var ele = cy.getElementById(id); + rootsArray.push(ele); + } + roots = cy.collection(rootsArray); + } else if (string(options.roots)) { + roots = cy.$(options.roots); + } else { + if (directed) { + roots = nodes2.roots(); + } else { + var components = eles.components(); + roots = cy.collection(); + var _loop = function _loop2(_i3) { + var comp = components[_i3]; + var maxDegree = comp.maxDegree(false); + var compRoots = comp.filter(function(ele2) { + return ele2.degree(false) === maxDegree; + }); + roots = roots.add(compRoots); + }; + for (var _i = 0; _i < components.length; _i++) { + _loop(_i); + } + } + } + var depths = []; + var foundByBfs = {}; + var addToDepth = function addToDepth2(ele2, d) { + if (depths[d] == null) { + depths[d] = []; + } + var i3 = depths[d].length; + depths[d].push(ele2); + setInfo(ele2, { + index: i3, + depth: d + }); + }; + var changeDepth = function changeDepth2(ele2, newDepth) { + var _getInfo = getInfo(ele2), depth = _getInfo.depth, index = _getInfo.index; + depths[depth][index] = null; + addToDepth(ele2, newDepth); + }; + graph.bfs({ + roots, + directed: options.directed, + visit: function visit(node, edge, pNode, i3, depth) { + var ele2 = node[0]; + var id2 = ele2.id(); + addToDepth(ele2, depth); + foundByBfs[id2] = true; + } + }); + var orphanNodes = []; + for (var _i2 = 0; _i2 < nodes2.length; _i2++) { + var _ele = nodes2[_i2]; + if (foundByBfs[_ele.id()]) { + continue; + } else { + orphanNodes.push(_ele); + } + } + var assignDepthsAt = function assignDepthsAt2(i3) { + var eles2 = depths[i3]; + for (var j = 0; j < eles2.length; j++) { + var _ele2 = eles2[j]; + if (_ele2 == null) { + eles2.splice(j, 1); + j--; + continue; + } + setInfo(_ele2, { + depth: i3, + index: j + }); + } + }; + var assignDepths = function assignDepths2() { + for (var _i3 = 0; _i3 < depths.length; _i3++) { + assignDepthsAt(_i3); + } + }; + var adjustMaximally = function adjustMaximally2(ele2, shifted2) { + var eInfo = getInfo(ele2); + var incomers = ele2.incomers().filter(function(el) { + return el.isNode() && eles.has(el); + }); + var maxDepth = -1; + var id2 = ele2.id(); + for (var k = 0; k < incomers.length; k++) { + var incmr = incomers[k]; + var iInfo = getInfo(incmr); + maxDepth = Math.max(maxDepth, iInfo.depth); + } + if (eInfo.depth <= maxDepth) { + if (shifted2[id2]) { + return null; + } + changeDepth(ele2, maxDepth + 1); + shifted2[id2] = true; + return true; + } + return false; + }; + if (directed && maximal) { + var Q = []; + var shifted = {}; + var enqueue = function enqueue2(n2) { + return Q.push(n2); + }; + var dequeue = function dequeue2() { + return Q.shift(); + }; + nodes2.forEach(function(n2) { + return Q.push(n2); + }); + while (Q.length > 0) { + var _ele3 = dequeue(); + var didShift = adjustMaximally(_ele3, shifted); + if (didShift) { + _ele3.outgoers().filter(function(el) { + return el.isNode() && eles.has(el); + }).forEach(enqueue); + } else if (didShift === null) { + warn("Detected double maximal shift for node `" + _ele3.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); + break; + } + } + } + assignDepths(); + var minDistance = 0; + if (options.avoidOverlap) { + for (var _i4 = 0; _i4 < nodes2.length; _i4++) { + var n = nodes2[_i4]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + } + var cachedWeightedPercent = {}; + var getWeightedPercent = function getWeightedPercent2(ele2) { + if (cachedWeightedPercent[ele2.id()]) { + return cachedWeightedPercent[ele2.id()]; + } + var eleDepth = getInfo(ele2).depth; + var neighbors = ele2.neighborhood(); + var percent = 0; + var samples = 0; + for (var _i5 = 0; _i5 < neighbors.length; _i5++) { + var neighbor = neighbors[_i5]; + if (neighbor.isEdge() || neighbor.isParent() || !nodes2.has(neighbor)) { + continue; + } + var bf = getInfo(neighbor); + if (bf == null) { + continue; + } + var index = bf.index; + var depth = bf.depth; + if (index == null || depth == null) { + continue; + } + var nDepth = depths[depth].length; + if (depth < eleDepth) { + percent += index / nDepth; + samples++; + } + } + samples = Math.max(1, samples); + percent = percent / samples; + if (samples === 0) { + percent = 0; + } + cachedWeightedPercent[ele2.id()] = percent; + return percent; + }; + var sortFn = function sortFn2(a, b) { + var apct = getWeightedPercent(a); + var bpct = getWeightedPercent(b); + var diff = apct - bpct; + if (diff === 0) { + return ascending(a.id(), b.id()); + } else { + return diff; + } + }; + if (options.depthSort !== void 0) { + sortFn = options.depthSort; + } + for (var _i6 = 0; _i6 < depths.length; _i6++) { + depths[_i6].sort(sortFn); + assignDepthsAt(_i6); + } + var orphanDepth = []; + for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) { + orphanDepth.push(orphanNodes[_i7]); + } + depths.unshift(orphanDepth); + assignDepths(); + var biggestDepthSize = 0; + for (var _i8 = 0; _i8 < depths.length; _i8++) { + biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize); + } + var center = { + x: bb.x1 + bb.w / 2, + y: bb.x1 + bb.h / 2 + }; + var maxDepthSize = depths.reduce(function(max2, eles2) { + return Math.max(max2, eles2.length); + }, 0); + var getPosition = function getPosition2(ele2) { + var _getInfo2 = getInfo(ele2), depth = _getInfo2.depth, index = _getInfo2.index; + var depthSize = depths[depth].length; + var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance); + var distanceY = Math.max(bb.h / (depths.length + 1), minDistance); + var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length); + radiusStepSize = Math.max(radiusStepSize, minDistance); + if (!options.circle) { + var epos = { + x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX, + y: (depth + 1) * distanceY + }; + return epos; + } else { + var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0); + var theta = 2 * Math.PI / depths[depth].length * index; + if (depth === 0 && depths[0].length === 1) { + radius = 1; + } + return { + x: center.x + radius * Math.cos(theta), + y: center.y + radius * Math.sin(theta) + }; + } + }; + eles.nodes().layoutPositions(this, options, getPosition); + return this; + }; + var defaults$6 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox and radius if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + radius: void 0, + // the radius of the circle + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: void 0, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + sort: void 0, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node, i2) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node, position2) { + return position2; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function CircleLayout(options) { + this.options = extend({}, defaults$6, options); + } + CircleLayout.prototype.run = function() { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var clockwise = options.counterclockwise !== void 0 ? !options.counterclockwise : options.clockwise; + var nodes2 = eles.nodes().not(":parent"); + if (options.sort) { + nodes2 = nodes2.sort(options.sort); + } + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var sweep = options.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / nodes2.length : options.sweep; + var dTheta = sweep / Math.max(1, nodes2.length - 1); + var r; + var minDistance = 0; + for (var i2 = 0; i2 < nodes2.length; i2++) { + var n = nodes2[i2]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + if (number$1(options.radius)) { + r = options.radius; + } else if (nodes2.length <= 1) { + r = 0; + } else { + r = Math.min(bb.h, bb.w) / 2 - minDistance; + } + if (nodes2.length > 1 && options.avoidOverlap) { + minDistance *= 1.75; + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); + r = Math.max(rMin, r); + } + var getPos = function getPos2(ele, i3) { + var theta = options.startAngle + i3 * dTheta * (clockwise ? 1 : -1); + var rx = r * Math.cos(theta); + var ry = r * Math.sin(theta); + var pos = { + x: center.x + rx, + y: center.y + ry + }; + return pos; + }; + eles.nodes().layoutPositions(this, options, getPos); + return this; + }; + var defaults$5 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: void 0, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + equidistant: false, + // whether levels have an equal radial distance betwen them, may cause bounding box overflow + minNodeSpacing: 10, + // min spacing between outside of nodes (used for radius adjustment) + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + height: void 0, + // height of layout area (overrides container height) + width: void 0, + // width of layout area (overrides container width) + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + concentric: function concentric(node) { + return node.degree(); + }, + levelWidth: function levelWidth(nodes2) { + return nodes2.maxDegree() / 4; + }, + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node, i2) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node, position2) { + return position2; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function ConcentricLayout(options) { + this.options = extend({}, defaults$5, options); + } + ConcentricLayout.prototype.run = function() { + var params = this.options; + var options = params; + var clockwise = options.counterclockwise !== void 0 ? !options.counterclockwise : options.clockwise; + var cy = params.cy; + var eles = options.eles; + var nodes2 = eles.nodes().not(":parent"); + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var nodeValues = []; + var maxNodeSize = 0; + for (var i2 = 0; i2 < nodes2.length; i2++) { + var node = nodes2[i2]; + var value = void 0; + value = options.concentric(node); + nodeValues.push({ + value, + node + }); + node._private.scratch.concentric = value; + } + nodes2.updateStyle(); + for (var _i = 0; _i < nodes2.length; _i++) { + var _node = nodes2[_i]; + var nbb = _node.layoutDimensions(options); + maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h); + } + nodeValues.sort(function(a, b) { + return b.value - a.value; + }); + var levelWidth = options.levelWidth(nodes2); + var levels = [[]]; + var currentLevel = levels[0]; + for (var _i2 = 0; _i2 < nodeValues.length; _i2++) { + var val = nodeValues[_i2]; + if (currentLevel.length > 0) { + var diff = Math.abs(currentLevel[0].value - val.value); + if (diff >= levelWidth) { + currentLevel = []; + levels.push(currentLevel); + } + } + currentLevel.push(val); + } + var minDist = maxNodeSize + options.minNodeSpacing; + if (!options.avoidOverlap) { + var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1; + var maxR = Math.min(bb.w, bb.h) / 2 - minDist; + var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0); + minDist = Math.min(minDist, rStep); + } + var r = 0; + for (var _i3 = 0; _i3 < levels.length; _i3++) { + var level = levels[_i3]; + var sweep = options.sweep === void 0 ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep; + var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1); + if (level.length > 1 && options.avoidOverlap) { + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); + r = Math.max(rMin, r); + } + level.r = r; + r += minDist; + } + if (options.equidistant) { + var rDeltaMax = 0; + var _r = 0; + for (var _i4 = 0; _i4 < levels.length; _i4++) { + var _level = levels[_i4]; + var rDelta = _level.r - _r; + rDeltaMax = Math.max(rDeltaMax, rDelta); + } + _r = 0; + for (var _i5 = 0; _i5 < levels.length; _i5++) { + var _level2 = levels[_i5]; + if (_i5 === 0) { + _r = _level2.r; + } + _level2.r = _r; + _r += rDeltaMax; + } + } + var pos = {}; + for (var _i6 = 0; _i6 < levels.length; _i6++) { + var _level3 = levels[_i6]; + var _dTheta = _level3.dTheta; + var _r2 = _level3.r; + for (var j = 0; j < _level3.length; j++) { + var _val = _level3[j]; + var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j; + var p2 = { + x: center.x + _r2 * Math.cos(theta), + y: center.y + _r2 * Math.sin(theta) + }; + pos[_val.node.id()] = p2; + } + } + eles.nodes().layoutPositions(this, options, function(ele) { + var id = ele.id(); + return pos[id]; + }); + return this; + }; + var DEBUG; + var defaults$4 = { + // Called on `layoutready` + ready: function ready() { + }, + // Called on `layoutstop` + stop: function stop() { + }, + // Whether to animate while running the layout + // true : Animate continuously as the layout is running + // false : Just show the end result + // 'end' : Animate with the end result, from the initial positions to the end positions + animate: true, + // Easing of the animation for animate:'end' + animationEasing: void 0, + // The duration of the animation for animate:'end' + animationDuration: void 0, + // A function that determines whether the node should be animated + // All nodes animated by default on animate enabled + // Non-animated nodes are positioned immediately when the layout starts + animateFilter: function animateFilter(node, i2) { + return true; + }, + // The layout animates only after this many milliseconds for animate:true + // (prevents flashing on fast runs) + animationThreshold: 250, + // Number of iterations between consecutive screen positions update + refresh: 20, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 30, + // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + boundingBox: void 0, + // Excludes the label when calculating node bounding boxes for the layout algorithm + nodeDimensionsIncludeLabels: false, + // Randomize the initial positions of the nodes (true) or use existing positions (false) + randomize: false, + // Extra spacing between components in non-compound graphs + componentSpacing: 40, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: function nodeRepulsion2(node) { + return 2048; + }, + // Node repulsion (overlapping) multiplier + nodeOverlap: 4, + // Ideal edge (non nested) length + idealEdgeLength: function idealEdgeLength(edge) { + return 32; + }, + // Divisor to compute edge forces + edgeElasticity: function edgeElasticity(edge) { + return 32; + }, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 1.2, + // Gravity force (constant) + gravity: 1, + // Maximum number of iterations to perform + numIter: 1e3, + // Initial temperature (maximum node displacement) + initialTemp: 1e3, + // Cooling factor (how the temperature is reduced between consecutive iterations + coolingFactor: 0.99, + // Lower temperature threshold (below this point the layout will end) + minTemp: 1 + }; + function CoseLayout(options) { + this.options = extend({}, defaults$4, options); + this.options.layout = this; + } + CoseLayout.prototype.run = function() { + var options = this.options; + var cy = options.cy; + var layout2 = this; + layout2.stopped = false; + if (options.animate === true || options.animate === false) { + layout2.emit({ + type: "layoutstart", + layout: layout2 + }); + } + if (true === options.debug) { + DEBUG = true; + } else { + DEBUG = false; + } + var layoutInfo = createLayoutInfo(cy, layout2, options); + if (DEBUG) { + printLayoutInfo(layoutInfo); + } + if (options.randomize) { + randomizePositions(layoutInfo); + } + var startTime = performanceNow(); + var refresh = function refresh2() { + refreshPositions(layoutInfo, cy, options); + if (true === options.fit) { + cy.fit(options.padding); + } + }; + var mainLoop = function mainLoop2(i3) { + if (layout2.stopped || i3 >= options.numIter) { + return false; + } + step(layoutInfo, options); + layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor; + if (layoutInfo.temperature < options.minTemp) { + return false; + } + return true; + }; + var done = function done2() { + if (options.animate === true || options.animate === false) { + refresh(); + layout2.one("layoutstop", options.stop); + layout2.emit({ + type: "layoutstop", + layout: layout2 + }); + } else { + var nodes2 = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes2); + nodes2.layoutPositions(layout2, options, getScaledPos); + } + }; + var i2 = 0; + var loopRet = true; + if (options.animate === true) { + var frame = function frame2() { + var f = 0; + while (loopRet && f < options.refresh) { + loopRet = mainLoop(i2); + i2++; + f++; + } + if (!loopRet) { + separateComponents(layoutInfo, options); + done(); + } else { + var now2 = performanceNow(); + if (now2 - startTime >= options.animationThreshold) { + refresh(); + } + requestAnimationFrame2(frame2); + } + }; + frame(); + } else { + while (loopRet) { + loopRet = mainLoop(i2); + i2++; + } + separateComponents(layoutInfo, options); + done(); + } + return this; + }; + CoseLayout.prototype.stop = function() { + this.stopped = true; + if (this.thread) { + this.thread.stop(); + } + this.emit("layoutstop"); + return this; + }; + CoseLayout.prototype.destroy = function() { + if (this.thread) { + this.thread.stop(); + } + return this; + }; + var createLayoutInfo = function createLayoutInfo2(cy, layout2, options) { + var edges = options.eles.edges(); + var nodes2 = options.eles.nodes(); + var layoutInfo = { + isCompound: cy.hasCompoundNodes(), + layoutNodes: [], + idToIndex: {}, + nodeSize: nodes2.size(), + graphSet: [], + indexToGraph: [], + layoutEdges: [], + edgeSize: edges.size(), + temperature: options.initialTemp, + clientWidth: cy.width(), + clientHeight: cy.width(), + boundingBox: makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }) + }; + var components = options.eles.components(); + var id2cmptId = {}; + for (var i2 = 0; i2 < components.length; i2++) { + var component = components[i2]; + for (var j = 0; j < component.length; j++) { + var node = component[j]; + id2cmptId[node.id()] = i2; + } + } + for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { + var n = nodes2[i2]; + var nbb = n.layoutDimensions(options); + var tempNode = {}; + tempNode.isLocked = n.locked(); + tempNode.id = n.data("id"); + tempNode.parentId = n.data("parent"); + tempNode.cmptId = id2cmptId[n.id()]; + tempNode.children = []; + tempNode.positionX = n.position("x"); + tempNode.positionY = n.position("y"); + tempNode.offsetX = 0; + tempNode.offsetY = 0; + tempNode.height = nbb.w; + tempNode.width = nbb.h; + tempNode.maxX = tempNode.positionX + tempNode.width / 2; + tempNode.minX = tempNode.positionX - tempNode.width / 2; + tempNode.maxY = tempNode.positionY + tempNode.height / 2; + tempNode.minY = tempNode.positionY - tempNode.height / 2; + tempNode.padLeft = parseFloat(n.style("padding")); + tempNode.padRight = parseFloat(n.style("padding")); + tempNode.padTop = parseFloat(n.style("padding")); + tempNode.padBottom = parseFloat(n.style("padding")); + tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion; + layoutInfo.layoutNodes.push(tempNode); + layoutInfo.idToIndex[tempNode.id] = i2; + } + var queue = []; + var start = 0; + var end = -1; + var tempGraph = []; + for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { + var n = layoutInfo.layoutNodes[i2]; + var p_id = n.parentId; + if (null != p_id) { + layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); + } else { + queue[++end] = n.id; + tempGraph.push(n.id); + } + } + layoutInfo.graphSet.push(tempGraph); + while (start <= end) { + var node_id = queue[start++]; + var node_ix = layoutInfo.idToIndex[node_id]; + var node = layoutInfo.layoutNodes[node_ix]; + var children = node.children; + if (children.length > 0) { + layoutInfo.graphSet.push(children); + for (var i2 = 0; i2 < children.length; i2++) { + queue[++end] = children[i2]; + } + } + } + for (var i2 = 0; i2 < layoutInfo.graphSet.length; i2++) { + var graph = layoutInfo.graphSet[i2]; + for (var j = 0; j < graph.length; j++) { + var index = layoutInfo.idToIndex[graph[j]]; + layoutInfo.indexToGraph[index] = i2; + } + } + for (var i2 = 0; i2 < layoutInfo.edgeSize; i2++) { + var e = edges[i2]; + var tempEdge = {}; + tempEdge.id = e.data("id"); + tempEdge.sourceId = e.data("source"); + tempEdge.targetId = e.data("target"); + var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength; + var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity; + var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId]; + var targetIx = layoutInfo.idToIndex[tempEdge.targetId]; + var sourceGraph = layoutInfo.indexToGraph[sourceIx]; + var targetGraph = layoutInfo.indexToGraph[targetIx]; + if (sourceGraph != targetGraph) { + var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo); + var lcaGraph = layoutInfo.graphSet[lca]; + var depth = 0; + var tempNode = layoutInfo.layoutNodes[sourceIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + tempNode = layoutInfo.layoutNodes[targetIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + idealLength *= depth * options.nestingFactor; + } + tempEdge.idealLength = idealLength; + tempEdge.elasticity = elasticity; + layoutInfo.layoutEdges.push(tempEdge); + } + return layoutInfo; + }; + var findLCA = function findLCA2(node1, node2, layoutInfo) { + var res = findLCA_aux(node1, node2, 0, layoutInfo); + if (2 > res.count) { + return 0; + } else { + return res.graph; + } + }; + var findLCA_aux = function findLCA_aux2(node1, node2, graphIx, layoutInfo) { + var graph = layoutInfo.graphSet[graphIx]; + if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) { + return { + count: 2, + graph: graphIx + }; + } + var c = 0; + for (var i2 = 0; i2 < graph.length; i2++) { + var nodeId = graph[i2]; + var nodeIx = layoutInfo.idToIndex[nodeId]; + var children = layoutInfo.layoutNodes[nodeIx].children; + if (0 === children.length) { + continue; + } + var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]]; + var result = findLCA_aux2(node1, node2, childGraphIx, layoutInfo); + if (0 === result.count) { + continue; + } else if (1 === result.count) { + c++; + if (2 === c) { + break; + } + } else { + return result; + } + } + return { + count: c, + graph: graphIx + }; + }; + var printLayoutInfo; + var randomizePositions = function randomizePositions2(layoutInfo, cy) { + var width = layoutInfo.clientWidth; + var height = layoutInfo.clientHeight; + for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { + var n = layoutInfo.layoutNodes[i2]; + if (0 === n.children.length && !n.isLocked) { + n.positionX = Math.random() * width; + n.positionY = Math.random() * height; + } + } + }; + var getScaleInBoundsFn = function getScaleInBoundsFn2(layoutInfo, options, nodes2) { + var bb = layoutInfo.boundingBox; + var coseBB = { + x1: Infinity, + x2: -Infinity, + y1: Infinity, + y2: -Infinity + }; + if (options.boundingBox) { + nodes2.forEach(function(node) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data("id")]]; + coseBB.x1 = Math.min(coseBB.x1, lnode.positionX); + coseBB.x2 = Math.max(coseBB.x2, lnode.positionX); + coseBB.y1 = Math.min(coseBB.y1, lnode.positionY); + coseBB.y2 = Math.max(coseBB.y2, lnode.positionY); + }); + coseBB.w = coseBB.x2 - coseBB.x1; + coseBB.h = coseBB.y2 - coseBB.y1; + } + return function(ele, i2) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data("id")]]; + if (options.boundingBox) { + var pctX = (lnode.positionX - coseBB.x1) / coseBB.w; + var pctY = (lnode.positionY - coseBB.y1) / coseBB.h; + return { + x: bb.x1 + pctX * bb.w, + y: bb.y1 + pctY * bb.h + }; + } else { + return { + x: lnode.positionX, + y: lnode.positionY + }; + } + }; + }; + var refreshPositions = function refreshPositions2(layoutInfo, cy, options) { + var layout2 = options.layout; + var nodes2 = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes2); + nodes2.positions(getScaledPos); + if (true !== layoutInfo.ready) { + layoutInfo.ready = true; + layout2.one("layoutready", options.ready); + layout2.emit({ + type: "layoutready", + layout: this + }); + } + }; + var step = function step2(layoutInfo, options, _step) { + calculateNodeForces(layoutInfo, options); + calculateEdgeForces(layoutInfo); + calculateGravityForces(layoutInfo, options); + propagateForces(layoutInfo); + updatePositions(layoutInfo); + }; + var calculateNodeForces = function calculateNodeForces2(layoutInfo, options) { + for (var i2 = 0; i2 < layoutInfo.graphSet.length; i2++) { + var graph = layoutInfo.graphSet[i2]; + var numNodes = graph.length; + for (var j = 0; j < numNodes; j++) { + var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + for (var k = j + 1; k < numNodes; k++) { + var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]]; + nodeRepulsion(node1, node2, layoutInfo, options); + } + } + } + }; + var randomDistance = function randomDistance2(max2) { + return -max2 + 2 * max2 * Math.random(); + }; + var nodeRepulsion = function nodeRepulsion2(node1, node2, layoutInfo, options) { + var cmptId1 = node1.cmptId; + var cmptId2 = node2.cmptId; + if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) { + return; + } + var directionX = node2.positionX - node1.positionX; + var directionY = node2.positionY - node1.positionY; + var maxRandDist = 1; + if (0 === directionX && 0 === directionY) { + directionX = randomDistance(maxRandDist); + directionY = randomDistance(maxRandDist); + } + var overlap = nodesOverlap(node1, node2, directionX, directionY); + if (overlap > 0) { + var force = options.nodeOverlap * overlap; + var distance = Math.sqrt(directionX * directionX + directionY * directionY); + var forceX = force * directionX / distance; + var forceY = force * directionY / distance; + } else { + var point1 = findClippingPoint(node1, directionX, directionY); + var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY); + var distanceX = point2.x - point1.x; + var distanceY = point2.y - point1.y; + var distanceSqr = distanceX * distanceX + distanceY * distanceY; + var distance = Math.sqrt(distanceSqr); + var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr; + var forceX = force * distanceX / distance; + var forceY = force * distanceY / distance; + } + if (!node1.isLocked) { + node1.offsetX -= forceX; + node1.offsetY -= forceY; + } + if (!node2.isLocked) { + node2.offsetX += forceX; + node2.offsetY += forceY; + } + return; + }; + var nodesOverlap = function nodesOverlap2(node1, node2, dX, dY) { + if (dX > 0) { + var overlapX = node1.maxX - node2.minX; + } else { + var overlapX = node2.maxX - node1.minX; + } + if (dY > 0) { + var overlapY = node1.maxY - node2.minY; + } else { + var overlapY = node2.maxY - node1.minY; + } + if (overlapX >= 0 && overlapY >= 0) { + return Math.sqrt(overlapX * overlapX + overlapY * overlapY); + } else { + return 0; + } + }; + var findClippingPoint = function findClippingPoint2(node, dX, dY) { + var X = node.positionX; + var Y = node.positionY; + var H = node.height || 1; + var W = node.width || 1; + var dirSlope = dY / dX; + var nodeSlope = H / W; + var res = {}; + if (0 === dX && 0 < dY) { + res.x = X; + res.y = Y + H / 2; + return res; + } + if (0 === dX && 0 > dY) { + res.x = X; + res.y = Y + H / 2; + return res; + } + if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X + W / 2; + res.y = Y + W * dY / 2 / dX; + return res; + } + if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X - W / 2; + res.y = Y - W * dY / 2 / dX; + return res; + } + if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X + H * dX / 2 / dY; + res.y = Y + H / 2; + return res; + } + if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X - H * dX / 2 / dY; + res.y = Y - H / 2; + return res; + } + return res; + }; + var calculateEdgeForces = function calculateEdgeForces2(layoutInfo, options) { + for (var i2 = 0; i2 < layoutInfo.edgeSize; i2++) { + var edge = layoutInfo.layoutEdges[i2]; + var sourceIx = layoutInfo.idToIndex[edge.sourceId]; + var source = layoutInfo.layoutNodes[sourceIx]; + var targetIx = layoutInfo.idToIndex[edge.targetId]; + var target = layoutInfo.layoutNodes[targetIx]; + var directionX = target.positionX - source.positionX; + var directionY = target.positionY - source.positionY; + if (0 === directionX && 0 === directionY) { + continue; + } + var point1 = findClippingPoint(source, directionX, directionY); + var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY); + var lx = point2.x - point1.x; + var ly = point2.y - point1.y; + var l = Math.sqrt(lx * lx + ly * ly); + var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity; + if (0 !== l) { + var forceX = force * lx / l; + var forceY = force * ly / l; + } else { + var forceX = 0; + var forceY = 0; + } + if (!source.isLocked) { + source.offsetX += forceX; + source.offsetY += forceY; + } + if (!target.isLocked) { + target.offsetX -= forceX; + target.offsetY -= forceY; + } + } + }; + var calculateGravityForces = function calculateGravityForces2(layoutInfo, options) { + if (options.gravity === 0) { + return; + } + var distThreshold = 1; + for (var i2 = 0; i2 < layoutInfo.graphSet.length; i2++) { + var graph = layoutInfo.graphSet[i2]; + var numNodes = graph.length; + if (0 === i2) { + var centerX = layoutInfo.clientHeight / 2; + var centerY = layoutInfo.clientWidth / 2; + } else { + var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]]; + var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]]; + var centerX = parent.positionX; + var centerY = parent.positionY; + } + for (var j = 0; j < numNodes; j++) { + var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + if (node.isLocked) { + continue; + } + var dx = centerX - node.positionX; + var dy = centerY - node.positionY; + var d = Math.sqrt(dx * dx + dy * dy); + if (d > distThreshold) { + var fx = options.gravity * dx / d; + var fy = options.gravity * dy / d; + node.offsetX += fx; + node.offsetY += fy; + } + } + } + }; + var propagateForces = function propagateForces2(layoutInfo, options) { + var queue = []; + var start = 0; + var end = -1; + queue.push.apply(queue, layoutInfo.graphSet[0]); + end += layoutInfo.graphSet[0].length; + while (start <= end) { + var nodeId = queue[start++]; + var nodeIndex = layoutInfo.idToIndex[nodeId]; + var node = layoutInfo.layoutNodes[nodeIndex]; + var children = node.children; + if (0 < children.length && !node.isLocked) { + var offX = node.offsetX; + var offY = node.offsetY; + for (var i2 = 0; i2 < children.length; i2++) { + var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i2]]]; + childNode.offsetX += offX; + childNode.offsetY += offY; + queue[++end] = children[i2]; + } + node.offsetX = 0; + node.offsetY = 0; + } + } + }; + var updatePositions = function updatePositions2(layoutInfo, options) { + for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { + var n = layoutInfo.layoutNodes[i2]; + if (0 < n.children.length) { + n.maxX = void 0; + n.minX = void 0; + n.maxY = void 0; + n.minY = void 0; + } + } + for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { + var n = layoutInfo.layoutNodes[i2]; + if (0 < n.children.length || n.isLocked) { + continue; + } + var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature); + n.positionX += tempForce.x; + n.positionY += tempForce.y; + n.offsetX = 0; + n.offsetY = 0; + n.minX = n.positionX - n.width; + n.maxX = n.positionX + n.width; + n.minY = n.positionY - n.height; + n.maxY = n.positionY + n.height; + updateAncestryBoundaries(n, layoutInfo); + } + for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { + var n = layoutInfo.layoutNodes[i2]; + if (0 < n.children.length && !n.isLocked) { + n.positionX = (n.maxX + n.minX) / 2; + n.positionY = (n.maxY + n.minY) / 2; + n.width = n.maxX - n.minX; + n.height = n.maxY - n.minY; + } + } + }; + var limitForce = function limitForce2(forceX, forceY, max2) { + var force = Math.sqrt(forceX * forceX + forceY * forceY); + if (force > max2) { + var res = { + x: max2 * forceX / force, + y: max2 * forceY / force + }; + } else { + var res = { + x: forceX, + y: forceY + }; + } + return res; + }; + var updateAncestryBoundaries = function updateAncestryBoundaries2(node, layoutInfo) { + var parentId = node.parentId; + if (null == parentId) { + return; + } + var p2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; + var flag = false; + if (null == p2.maxX || node.maxX + p2.padRight > p2.maxX) { + p2.maxX = node.maxX + p2.padRight; + flag = true; + } + if (null == p2.minX || node.minX - p2.padLeft < p2.minX) { + p2.minX = node.minX - p2.padLeft; + flag = true; + } + if (null == p2.maxY || node.maxY + p2.padBottom > p2.maxY) { + p2.maxY = node.maxY + p2.padBottom; + flag = true; + } + if (null == p2.minY || node.minY - p2.padTop < p2.minY) { + p2.minY = node.minY - p2.padTop; + flag = true; + } + if (flag) { + return updateAncestryBoundaries2(p2, layoutInfo); + } + return; + }; + var separateComponents = function separateComponents2(layoutInfo, options) { + var nodes2 = layoutInfo.layoutNodes; + var components = []; + for (var i2 = 0; i2 < nodes2.length; i2++) { + var node = nodes2[i2]; + var cid = node.cmptId; + var component = components[cid] = components[cid] || []; + component.push(node); + } + var totalA = 0; + for (var i2 = 0; i2 < components.length; i2++) { + var c = components[i2]; + if (!c) { + continue; + } + c.x1 = Infinity; + c.x2 = -Infinity; + c.y1 = Infinity; + c.y2 = -Infinity; + for (var j = 0; j < c.length; j++) { + var n = c[j]; + c.x1 = Math.min(c.x1, n.positionX - n.width / 2); + c.x2 = Math.max(c.x2, n.positionX + n.width / 2); + c.y1 = Math.min(c.y1, n.positionY - n.height / 2); + c.y2 = Math.max(c.y2, n.positionY + n.height / 2); + } + c.w = c.x2 - c.x1; + c.h = c.y2 - c.y1; + totalA += c.w * c.h; + } + components.sort(function(c1, c2) { + return c2.w * c2.h - c1.w * c1.h; + }); + var x = 0; + var y = 0; + var usedW = 0; + var rowH = 0; + var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight; + for (var i2 = 0; i2 < components.length; i2++) { + var c = components[i2]; + if (!c) { + continue; + } + for (var j = 0; j < c.length; j++) { + var n = c[j]; + if (!n.isLocked) { + n.positionX += x - c.x1; + n.positionY += y - c.y1; + } + } + x += c.w + options.componentSpacing; + usedW += c.w + options.componentSpacing; + rowH = Math.max(rowH, c.h); + if (usedW > maxRowW) { + y += rowH + options.componentSpacing; + x = 0; + usedW = 0; + rowH = 0; + } + } + }; + var defaults$3 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // padding used on fit + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + avoidOverlapPadding: 10, + // extra spacing around nodes when avoidOverlap: true + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: void 0, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + condense: false, + // uses all available space on false, uses minimal space on true + rows: void 0, + // force num of rows in the grid + cols: void 0, + // force num of columns in the grid + position: function position2(node) { + }, + // returns { row, col } for element + sort: void 0, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node, i2) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node, position2) { + return position2; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function GridLayout(options) { + this.options = extend({}, defaults$3, options); + } + GridLayout.prototype.run = function() { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes2 = eles.nodes().not(":parent"); + if (options.sort) { + nodes2 = nodes2.sort(options.sort); + } + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + if (bb.h === 0 || bb.w === 0) { + eles.nodes().layoutPositions(this, options, function(ele) { + return { + x: bb.x1, + y: bb.y1 + }; + }); + } else { + var cells = nodes2.size(); + var splits = Math.sqrt(cells * bb.h / bb.w); + var rows = Math.round(splits); + var cols = Math.round(bb.w / bb.h * splits); + var small = function small2(val) { + if (val == null) { + return Math.min(rows, cols); + } else { + var min2 = Math.min(rows, cols); + if (min2 == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var large = function large2(val) { + if (val == null) { + return Math.max(rows, cols); + } else { + var max2 = Math.max(rows, cols); + if (max2 == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var oRows = options.rows; + var oCols = options.cols != null ? options.cols : options.columns; + if (oRows != null && oCols != null) { + rows = oRows; + cols = oCols; + } else if (oRows != null && oCols == null) { + rows = oRows; + cols = Math.ceil(cells / rows); + } else if (oRows == null && oCols != null) { + cols = oCols; + rows = Math.ceil(cells / cols); + } else if (cols * rows > cells) { + var sm = small(); + var lg = large(); + if ((sm - 1) * lg >= cells) { + small(sm - 1); + } else if ((lg - 1) * sm >= cells) { + large(lg - 1); + } + } else { + while (cols * rows < cells) { + var _sm = small(); + var _lg = large(); + if ((_lg + 1) * _sm >= cells) { + large(_lg + 1); + } else { + small(_sm + 1); + } + } + } + var cellWidth = bb.w / cols; + var cellHeight = bb.h / rows; + if (options.condense) { + cellWidth = 0; + cellHeight = 0; + } + if (options.avoidOverlap) { + for (var i2 = 0; i2 < nodes2.length; i2++) { + var node = nodes2[i2]; + var pos = node._private.position; + if (pos.x == null || pos.y == null) { + pos.x = 0; + pos.y = 0; + } + var nbb = node.layoutDimensions(options); + var p2 = options.avoidOverlapPadding; + var w = nbb.w + p2; + var h = nbb.h + p2; + cellWidth = Math.max(cellWidth, w); + cellHeight = Math.max(cellHeight, h); + } + } + var cellUsed = {}; + var used = function used2(row2, col2) { + return cellUsed["c-" + row2 + "-" + col2] ? true : false; + }; + var use = function use2(row2, col2) { + cellUsed["c-" + row2 + "-" + col2] = true; + }; + var row = 0; + var col = 0; + var moveToNextCell = function moveToNextCell2() { + col++; + if (col >= cols) { + col = 0; + row++; + } + }; + var id2manPos = {}; + for (var _i = 0; _i < nodes2.length; _i++) { + var _node = nodes2[_i]; + var rcPos = options.position(_node); + if (rcPos && (rcPos.row !== void 0 || rcPos.col !== void 0)) { + var _pos = { + row: rcPos.row, + col: rcPos.col + }; + if (_pos.col === void 0) { + _pos.col = 0; + while (used(_pos.row, _pos.col)) { + _pos.col++; + } + } else if (_pos.row === void 0) { + _pos.row = 0; + while (used(_pos.row, _pos.col)) { + _pos.row++; + } + } + id2manPos[_node.id()] = _pos; + use(_pos.row, _pos.col); + } + } + var getPos = function getPos2(element2, i3) { + var x, y; + if (element2.locked() || element2.isParent()) { + return false; + } + var rcPos2 = id2manPos[element2.id()]; + if (rcPos2) { + x = rcPos2.col * cellWidth + cellWidth / 2 + bb.x1; + y = rcPos2.row * cellHeight + cellHeight / 2 + bb.y1; + } else { + while (used(row, col)) { + moveToNextCell(); + } + x = col * cellWidth + cellWidth / 2 + bb.x1; + y = row * cellHeight + cellHeight / 2 + bb.y1; + use(row, col); + moveToNextCell(); + } + return { + x, + y + }; + }; + nodes2.layoutPositions(this, options, getPos); + } + return this; + }; + var defaults$2 = { + ready: function ready() { + }, + // on layoutready + stop: function stop() { + } + // on layoutstop + }; + function NullLayout(options) { + this.options = extend({}, defaults$2, options); + } + NullLayout.prototype.run = function() { + var options = this.options; + var eles = options.eles; + var layout2 = this; + options.cy; + layout2.emit("layoutstart"); + eles.nodes().positions(function() { + return { + x: 0, + y: 0 + }; + }); + layout2.one("layoutready", options.ready); + layout2.emit("layoutready"); + layout2.one("layoutstop", options.stop); + layout2.emit("layoutstop"); + return this; + }; + NullLayout.prototype.stop = function() { + return this; + }; + var defaults$1 = { + positions: void 0, + // map of (node id) => (position obj); or function(node){ return somPos; } + zoom: void 0, + // the zoom level to set (prob want fit = false if set) + pan: void 0, + // the pan level to set (prob want fit = false if set) + fit: true, + // whether to fit to viewport + padding: 30, + // padding on fit + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node, i2) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node, position2) { + return position2; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function PresetLayout(options) { + this.options = extend({}, defaults$1, options); + } + PresetLayout.prototype.run = function() { + var options = this.options; + var eles = options.eles; + var nodes2 = eles.nodes(); + var posIsFn = fn$6(options.positions); + function getPosition(node) { + if (options.positions == null) { + return copyPosition(node.position()); + } + if (posIsFn) { + return options.positions(node); + } + var pos = options.positions[node._private.data.id]; + if (pos == null) { + return null; + } + return pos; + } + nodes2.layoutPositions(this, options, function(node, i2) { + var position2 = getPosition(node); + if (node.locked() || position2 == null) { + return false; + } + return position2; + }); + return this; + }; + var defaults = { + fit: true, + // whether to fit to viewport + padding: 30, + // fit padding + boundingBox: void 0, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: void 0, + // easing of animation if enabled + animateFilter: function animateFilter(node, i2) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: void 0, + // callback on layoutready + stop: void 0, + // callback on layoutstop + transform: function transform(node, position2) { + return position2; + } + // transform a given node position. Useful for changing flow direction in discrete layouts + }; + function RandomLayout(options) { + this.options = extend({}, defaults, options); + } + RandomLayout.prototype.run = function() { + var options = this.options; + var cy = options.cy; + var eles = options.eles; + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var getPos = function getPos2(node, i2) { + return { + x: bb.x1 + Math.round(Math.random() * bb.w), + y: bb.y1 + Math.round(Math.random() * bb.h) + }; + }; + eles.nodes().layoutPositions(this, options, getPos); + return this; + }; + var layout = [{ + name: "breadthfirst", + impl: BreadthFirstLayout + }, { + name: "circle", + impl: CircleLayout + }, { + name: "concentric", + impl: ConcentricLayout + }, { + name: "cose", + impl: CoseLayout + }, { + name: "grid", + impl: GridLayout + }, { + name: "null", + impl: NullLayout + }, { + name: "preset", + impl: PresetLayout + }, { + name: "random", + impl: RandomLayout + }]; + function NullRenderer(options) { + this.options = options; + this.notifications = 0; + } + var noop = function noop2() { + }; + var throwImgErr = function throwImgErr2() { + throw new Error("A headless instance can not render images"); + }; + NullRenderer.prototype = { + recalculateRenderedStyle: noop, + notify: function notify() { + this.notifications++; + }, + init: noop, + isHeadless: function isHeadless() { + return true; + }, + png: throwImgErr, + jpg: throwImgErr + }; + var BRp$f = {}; + BRp$f.arrowShapeWidth = 0.3; + BRp$f.registerArrowShapes = function() { + var arrowShapes = this.arrowShapes = {}; + var renderer2 = this; + var bbCollide = function bbCollide2(x, y, size, angle, translation, edgeWidth, padding) { + var x1 = translation.x - size / 2 - padding; + var x2 = translation.x + size / 2 + padding; + var y1 = translation.y - size / 2 - padding; + var y2 = translation.y + size / 2 + padding; + var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2; + return inside; + }; + var transform = function transform2(x, y, size, angle, translation) { + var xRotated = x * Math.cos(angle) - y * Math.sin(angle); + var yRotated = x * Math.sin(angle) + y * Math.cos(angle); + var xScaled = xRotated * size; + var yScaled = yRotated * size; + var xTranslated = xScaled + translation.x; + var yTranslated = yScaled + translation.y; + return { + x: xTranslated, + y: yTranslated + }; + }; + var transformPoints = function transformPoints2(pts2, size, angle, translation) { + var retPts = []; + for (var i2 = 0; i2 < pts2.length; i2 += 2) { + var x = pts2[i2]; + var y = pts2[i2 + 1]; + retPts.push(transform(x, y, size, angle, translation)); + } + return retPts; + }; + var pointsToArr = function pointsToArr2(pts2) { + var ret = []; + for (var i2 = 0; i2 < pts2.length; i2++) { + var p2 = pts2[i2]; + ret.push(p2.x, p2.y); + } + return ret; + }; + var standardGap = function standardGap2(edge) { + return edge.pstyle("width").pfValue * edge.pstyle("arrow-scale").pfValue * 2; + }; + var defineArrowShape = function defineArrowShape2(name2, defn) { + if (string(defn)) { + defn = arrowShapes[defn]; + } + arrowShapes[name2] = extend({ + name: name2, + points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], + collide: function collide(x, y, size, angle, translation, padding) { + var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, points); + return inside; + }, + roughCollide: bbCollide, + draw: function draw2(context, size, angle, translation) { + var points = transformPoints(this.points, size, angle, translation); + renderer2.arrowShapeImpl("polygon")(context, points); + }, + spacing: function spacing(edge) { + return 0; + }, + gap: standardGap + }, defn); + }; + defineArrowShape("none", { + collide: falsify, + roughCollide: falsify, + draw: noop$1, + spacing: zeroify, + gap: zeroify + }); + defineArrowShape("triangle", { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3] + }); + defineArrowShape("arrow", "triangle"); + defineArrowShape("triangle-backcurve", { + points: arrowShapes["triangle"].points, + controlPoint: [0, -0.15], + roughCollide: bbCollide, + draw: function draw2(context, size, angle, translation, edgeWidth) { + var ptsTrans = transformPoints(this.points, size, angle, translation); + var ctrlPt = this.controlPoint; + var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation); + renderer2.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans); + }, + gap: function gap(edge) { + return standardGap(edge) * 0.8; + } + }); + defineArrowShape("triangle-tee", { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw2(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var teePts = transformPoints(this.pointsTee, size, angle, translation); + renderer2.arrowShapeImpl(this.name)(context, triPts, teePts); + } + }); + defineArrowShape("circle-triangle", { + radius: 0.15, + pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + return pointInsidePolygonPoints(x, y, triPts) || circleInside; + }, + draw: function draw2(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.pointsTr, size, angle, translation); + renderer2.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer2.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.radius; + } + }); + defineArrowShape("triangle-cross", { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + baseCrossLinePts: [ + -0.15, + -0.4, + // first half of the rectangle + -0.15, + -0.4, + 0.15, + -0.4, + // second half of the rectangle + 0.15, + -0.4 + ], + crossLinePts: function crossLinePts(size, edgeWidth) { + var p2 = this.baseCrossLinePts.slice(); + var shiftFactor = edgeWidth / size; + var y0 = 3; + var y1 = 5; + p2[y0] = p2[y0] - shiftFactor; + p2[y1] = p2[y1] - shiftFactor; + return p2; + }, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw2(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation); + renderer2.arrowShapeImpl(this.name)(context, triPts, crossLinePts); + } + }); + defineArrowShape("vee", { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], + gap: function gap(edge) { + return standardGap(edge) * 0.525; + } + }); + defineArrowShape("circle", { + radius: 0.15, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + return inside; + }, + draw: function draw2(context, size, angle, translation, edgeWidth) { + renderer2.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer2.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.radius; + } + }); + defineArrowShape("tee", { + points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], + spacing: function spacing(edge) { + return 1; + }, + gap: function gap(edge) { + return 1; + } + }); + defineArrowShape("square", { + points: [-0.15, 0, 0.15, 0, 0.15, -0.3, -0.15, -0.3] + }); + defineArrowShape("diamond", { + points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], + gap: function gap(edge) { + return edge.pstyle("width").pfValue * edge.pstyle("arrow-scale").value; + } + }); + defineArrowShape("chevron", { + points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], + gap: function gap(edge) { + return 0.95 * edge.pstyle("width").pfValue * edge.pstyle("arrow-scale").value; + } + }); + }; + var BRp$e = {}; + BRp$e.projectIntoViewport = function(clientX, clientY) { + var cy = this.cy; + var offsets = this.findContainerClientCoords(); + var offsetLeft = offsets[0]; + var offsetTop = offsets[1]; + var scale = offsets[4]; + var pan = cy.pan(); + var zoom = cy.zoom(); + var x = ((clientX - offsetLeft) / scale - pan.x) / zoom; + var y = ((clientY - offsetTop) / scale - pan.y) / zoom; + return [x, y]; + }; + BRp$e.findContainerClientCoords = function() { + if (this.containerBB) { + return this.containerBB; + } + var container = this.container; + var rect = container.getBoundingClientRect(); + var style = window$1.getComputedStyle(container); + var styleValue = function styleValue2(name2) { + return parseFloat(style.getPropertyValue(name2)); + }; + var padding = { + left: styleValue("padding-left"), + right: styleValue("padding-right"), + top: styleValue("padding-top"), + bottom: styleValue("padding-bottom") + }; + var border = { + left: styleValue("border-left-width"), + right: styleValue("border-right-width"), + top: styleValue("border-top-width"), + bottom: styleValue("border-bottom-width") + }; + var clientWidth = container.clientWidth; + var clientHeight = container.clientHeight; + var paddingHor = padding.left + padding.right; + var paddingVer = padding.top + padding.bottom; + var borderHor = border.left + border.right; + var scale = rect.width / (clientWidth + borderHor); + var unscaledW = clientWidth - paddingHor; + var unscaledH = clientHeight - paddingVer; + var left = rect.left + padding.left + border.left; + var top = rect.top + padding.top + border.top; + return this.containerBB = [left, top, unscaledW, unscaledH, scale]; + }; + BRp$e.invalidateContainerClientCoordsCache = function() { + this.containerBB = null; + }; + BRp$e.findNearestElement = function(x, y, interactiveElementsOnly, isTouch) { + return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0]; + }; + BRp$e.findNearestElements = function(x, y, interactiveElementsOnly, isTouch) { + var self2 = this; + var r = this; + var eles = r.getCachedZSortedEles(); + var near = []; + var zoom = r.cy.zoom(); + var hasCompounds = r.cy.hasCompoundNodes(); + var edgeThreshold = (isTouch ? 24 : 8) / zoom; + var nodeThreshold = (isTouch ? 8 : 2) / zoom; + var labelThreshold = (isTouch ? 8 : 2) / zoom; + var minSqDist = Infinity; + var nearEdge; + var nearNode; + if (interactiveElementsOnly) { + eles = eles.interactive; + } + function addEle(ele2, sqDist) { + if (ele2.isNode()) { + if (nearNode) { + return; + } else { + nearNode = ele2; + near.push(ele2); + } + } + if (ele2.isEdge() && (sqDist == null || sqDist < minSqDist)) { + if (nearEdge) { + if (nearEdge.pstyle("z-compound-depth").value === ele2.pstyle("z-compound-depth").value && nearEdge.pstyle("z-compound-depth").value === ele2.pstyle("z-compound-depth").value) { + for (var i3 = 0; i3 < near.length; i3++) { + if (near[i3].isEdge()) { + near[i3] = ele2; + nearEdge = ele2; + minSqDist = sqDist != null ? sqDist : minSqDist; + break; + } + } + } + } else { + near.push(ele2); + nearEdge = ele2; + minSqDist = sqDist != null ? sqDist : minSqDist; + } + } + } + function checkNode(node) { + var width = node.outerWidth() + 2 * nodeThreshold; + var height = node.outerHeight() + 2 * nodeThreshold; + var hw = width / 2; + var hh = height / 2; + var pos = node.position(); + if (pos.x - hw <= x && x <= pos.x + hw && pos.y - hh <= y && y <= pos.y + hh) { + var shape = r.nodeShapes[self2.getNodeShape(node)]; + if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y)) { + addEle(node, 0); + return true; + } + } + } + function checkEdge(edge) { + var _p = edge._private; + var rs = _p.rscratch; + var styleWidth = edge.pstyle("width").pfValue; + var scale = edge.pstyle("arrow-scale").value; + var width = styleWidth / 2 + edgeThreshold; + var widthSq = width * width; + var width2 = width * 2; + var src = _p.source; + var tgt = _p.target; + var sqDist; + if (rs.edgeType === "segments" || rs.edgeType === "straight" || rs.edgeType === "haystack") { + var pts2 = rs.allpts; + for (var i3 = 0; i3 + 3 < pts2.length; i3 += 2) { + if (inLineVicinity(x, y, pts2[i3], pts2[i3 + 1], pts2[i3 + 2], pts2[i3 + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts2[i3], pts2[i3 + 1], pts2[i3 + 2], pts2[i3 + 3]))) { + addEle(edge, sqDist); + return true; + } + } + } else if (rs.edgeType === "bezier" || rs.edgeType === "multibezier" || rs.edgeType === "self" || rs.edgeType === "compound") { + var pts2 = rs.allpts; + for (var i3 = 0; i3 + 5 < rs.allpts.length; i3 += 4) { + if (inBezierVicinity(x, y, pts2[i3], pts2[i3 + 1], pts2[i3 + 2], pts2[i3 + 3], pts2[i3 + 4], pts2[i3 + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts2[i3], pts2[i3 + 1], pts2[i3 + 2], pts2[i3 + 3], pts2[i3 + 4], pts2[i3 + 5]))) { + addEle(edge, sqDist); + return true; + } + } + } + var src = src || _p.source; + var tgt = tgt || _p.target; + var arSize = self2.getArrowWidth(styleWidth, scale); + var arrows = [{ + name: "source", + x: rs.arrowStartX, + y: rs.arrowStartY, + angle: rs.srcArrowAngle + }, { + name: "target", + x: rs.arrowEndX, + y: rs.arrowEndY, + angle: rs.tgtArrowAngle + }, { + name: "mid-source", + x: rs.midX, + y: rs.midY, + angle: rs.midsrcArrowAngle + }, { + name: "mid-target", + x: rs.midX, + y: rs.midY, + angle: rs.midtgtArrowAngle + }]; + for (var i3 = 0; i3 < arrows.length; i3++) { + var ar = arrows[i3]; + var shape = r.arrowShapes[edge.pstyle(ar.name + "-arrow-shape").value]; + var edgeWidth = edge.pstyle("width").pfValue; + if (shape.roughCollide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold)) { + addEle(edge); + return true; + } + } + if (hasCompounds && near.length > 0) { + checkNode(src); + checkNode(tgt); + } + } + function preprop(obj, name2, pre) { + return getPrefixedProperty(obj, name2, pre); + } + function checkLabel(ele2, prefix) { + var _p = ele2._private; + var th = labelThreshold; + var prefixDash; + if (prefix) { + prefixDash = prefix + "-"; + } else { + prefixDash = ""; + } + ele2.boundingBox(); + var bb = _p.labelBounds[prefix || "main"]; + var text = ele2.pstyle(prefixDash + "label").value; + var eventsEnabled = ele2.pstyle("text-events").strValue === "yes"; + if (!eventsEnabled || !text) { + return; + } + var lx = preprop(_p.rscratch, "labelX", prefix); + var ly = preprop(_p.rscratch, "labelY", prefix); + var theta = preprop(_p.rscratch, "labelAngle", prefix); + var ox = ele2.pstyle(prefixDash + "text-margin-x").pfValue; + var oy = ele2.pstyle(prefixDash + "text-margin-y").pfValue; + var lx1 = bb.x1 - th - ox; + var lx2 = bb.x2 + th - ox; + var ly1 = bb.y1 - th - oy; + var ly2 = bb.y2 + th - oy; + if (theta) { + var cos2 = Math.cos(theta); + var sin2 = Math.sin(theta); + var rotate = function rotate2(x2, y2) { + x2 = x2 - lx; + y2 = y2 - ly; + return { + x: x2 * cos2 - y2 * sin2 + lx, + y: x2 * sin2 + y2 * cos2 + ly + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + var points = [ + // with the margin added after the rotation is applied + px1y1.x + ox, + px1y1.y + oy, + px2y1.x + ox, + px2y1.y + oy, + px2y2.x + ox, + px2y2.y + oy, + px1y2.x + ox, + px1y2.y + oy + ]; + if (pointInsidePolygonPoints(x, y, points)) { + addEle(ele2); + return true; + } + } else { + if (inBoundingBox(bb, x, y)) { + addEle(ele2); + return true; + } + } + } + for (var i2 = eles.length - 1; i2 >= 0; i2--) { + var ele = eles[i2]; + if (ele.isNode()) { + checkNode(ele) || checkLabel(ele); + } else { + checkEdge(ele) || checkLabel(ele) || checkLabel(ele, "source") || checkLabel(ele, "target"); + } + } + return near; + }; + BRp$e.getAllInBox = function(x1, y1, x2, y2) { + var eles = this.getCachedZSortedEles().interactive; + var box = []; + var x1c = Math.min(x1, x2); + var x2c = Math.max(x1, x2); + var y1c = Math.min(y1, y2); + var y2c = Math.max(y1, y2); + x1 = x1c; + x2 = x2c; + y1 = y1c; + y2 = y2c; + var boxBb = makeBoundingBox({ + x1, + y1, + x2, + y2 + }); + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + if (ele.isNode()) { + var node = ele; + var nodeBb = node.boundingBox({ + includeNodes: true, + includeEdges: false, + includeLabels: false + }); + if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) { + box.push(node); + } + } else { + var edge = ele; + var _p = edge._private; + var rs = _p.rscratch; + if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) { + continue; + } + if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) { + continue; + } + if (rs.edgeType === "bezier" || rs.edgeType === "multibezier" || rs.edgeType === "self" || rs.edgeType === "compound" || rs.edgeType === "segments" || rs.edgeType === "haystack") { + var pts2 = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts; + var allInside = true; + for (var i2 = 0; i2 < pts2.length; i2++) { + if (!pointInBoundingBox(boxBb, pts2[i2])) { + allInside = false; + break; + } + } + if (allInside) { + box.push(edge); + } + } else if (rs.edgeType === "haystack" || rs.edgeType === "straight") { + box.push(edge); + } + } + } + return box; + }; + var BRp$d = {}; + BRp$d.calculateArrowAngles = function(edge) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === "haystack"; + var isBezier = rs.edgeType === "bezier"; + var isMultibezier = rs.edgeType === "multibezier"; + var isSegments = rs.edgeType === "segments"; + var isCompound = rs.edgeType === "compound"; + var isSelf = rs.edgeType === "self"; + var dispX, dispY; + var startX, startY, endX, endY, midX, midY; + if (isHaystack) { + startX = rs.haystackPts[0]; + startY = rs.haystackPts[1]; + endX = rs.haystackPts[2]; + endY = rs.haystackPts[3]; + } else { + startX = rs.arrowStartX; + startY = rs.arrowStartY; + endX = rs.arrowEndX; + endY = rs.arrowEndY; + } + midX = rs.midX; + midY = rs.midY; + if (isSegments) { + dispX = startX - rs.segpts[0]; + dispY = startY - rs.segpts[1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts2 = rs.allpts; + var bX = qbezierAt(pts2[0], pts2[2], pts2[4], 0.1); + var bY = qbezierAt(pts2[1], pts2[3], pts2[5], 0.1); + dispX = startX - bX; + dispY = startY - bY; + } else { + dispX = startX - midX; + dispY = startY - midY; + } + rs.srcArrowAngle = getAngleFromDisp(dispX, dispY); + var midX = rs.midX; + var midY = rs.midY; + if (isHaystack) { + midX = (startX + endX) / 2; + midY = (startY + endY) / 2; + } + dispX = endX - startX; + dispY = endY - startY; + if (isSegments) { + var pts2 = rs.allpts; + if (pts2.length / 2 % 2 === 0) { + var i2 = pts2.length / 2; + var i1 = i2 - 2; + dispX = pts2[i2] - pts2[i1]; + dispY = pts2[i2 + 1] - pts2[i1 + 1]; + } else { + var i2 = pts2.length / 2 - 1; + var i1 = i2 - 2; + var i3 = i2 + 2; + dispX = pts2[i2] - pts2[i1]; + dispY = pts2[i2 + 1] - pts2[i1 + 1]; + } + } else if (isMultibezier || isCompound || isSelf) { + var pts2 = rs.allpts; + var cpts = rs.ctrlpts; + var bp0x, bp0y; + var bp1x, bp1y; + if (cpts.length / 2 % 2 === 0) { + var p0 = pts2.length / 2 - 1; + var ic = p0 + 2; + var p1 = ic + 2; + bp0x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 0); + bp0y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 0); + bp1x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 1e-4); + bp1y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 1e-4); + } else { + var ic = pts2.length / 2 - 1; + var p0 = ic - 2; + var p1 = ic + 2; + bp0x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 0.4999); + bp0y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 0.4999); + bp1x = qbezierAt(pts2[p0], pts2[ic], pts2[p1], 0.5); + bp1y = qbezierAt(pts2[p0 + 1], pts2[ic + 1], pts2[p1 + 1], 0.5); + } + dispX = bp1x - bp0x; + dispY = bp1y - bp0y; + } + rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY); + rs.midDispX = dispX; + rs.midDispY = dispY; + dispX *= -1; + dispY *= -1; + if (isSegments) { + var pts2 = rs.allpts; + if (pts2.length / 2 % 2 === 0) + ; + else { + var i2 = pts2.length / 2 - 1; + var i3 = i2 + 2; + dispX = -(pts2[i3] - pts2[i2]); + dispY = -(pts2[i3 + 1] - pts2[i2 + 1]); + } + } + rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY); + if (isSegments) { + dispX = endX - rs.segpts[rs.segpts.length - 2]; + dispY = endY - rs.segpts[rs.segpts.length - 1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts2 = rs.allpts; + var l = pts2.length; + var bX = qbezierAt(pts2[l - 6], pts2[l - 4], pts2[l - 2], 0.9); + var bY = qbezierAt(pts2[l - 5], pts2[l - 3], pts2[l - 1], 0.9); + dispX = endX - bX; + dispY = endY - bY; + } else { + dispX = endX - midX; + dispY = endY - midY; + } + rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY); + }; + BRp$d.getArrowWidth = BRp$d.getArrowHeight = function(edgeWidth, scale) { + var cache2 = this.arrowWidthCache = this.arrowWidthCache || {}; + var cachedVal = cache2[edgeWidth + ", " + scale]; + if (cachedVal) { + return cachedVal; + } + cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale; + cache2[edgeWidth + ", " + scale] = cachedVal; + return cachedVal; + }; + var BRp$c = {}; + BRp$c.findHaystackPoints = function(edges) { + for (var i2 = 0; i2 < edges.length; i2++) { + var edge = edges[i2]; + var _p = edge._private; + var rs = _p.rscratch; + if (!rs.haystack) { + var angle = Math.random() * 2 * Math.PI; + rs.source = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + angle = Math.random() * 2 * Math.PI; + rs.target = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + } + var src = _p.source; + var tgt = _p.target; + var srcPos = src.position(); + var tgtPos = tgt.position(); + var srcW = src.width(); + var tgtW = tgt.width(); + var srcH = src.height(); + var tgtH = tgt.height(); + var radius = edge.pstyle("haystack-radius").value; + var halfRadius = radius / 2; + rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y]; + rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2; + rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2; + rs.edgeType = "haystack"; + rs.haystack = true; + this.storeEdgeProjections(edge); + this.calculateArrowAngles(edge); + this.recalculateEdgeLabelProjections(edge); + this.calculateLabelAngles(edge); + } + }; + BRp$c.findSegmentsPoints = function(edge, pairInfo) { + var rs = edge._private.rscratch; + var posPts = pairInfo.posPts, intersectionPts = pairInfo.intersectionPts, vectorNormInverse = pairInfo.vectorNormInverse; + var edgeDistances = edge.pstyle("edge-distances").value; + var segmentWs = edge.pstyle("segment-weights"); + var segmentDs = edge.pstyle("segment-distances"); + var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length); + rs.edgeType = "segments"; + rs.segpts = []; + for (var s = 0; s < segmentsN; s++) { + var w = segmentWs.pfValue[s]; + var d = segmentDs.pfValue[s]; + var w1 = 1 - w; + var w2 = w; + var midptPts = edgeDistances === "node-position" ? posPts : intersectionPts; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d); + } + }; + BRp$c.findLoopPoints = function(edge, pairInfo, i2, edgeIsUnbundled) { + var rs = edge._private.rscratch; + var dirCounts = pairInfo.dirCounts, srcPos = pairInfo.srcPos; + var ctrlptDists = edge.pstyle("control-point-distances"); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : void 0; + var loopDir = edge.pstyle("loop-direction").pfValue; + var loopSwp = edge.pstyle("loop-sweep").pfValue; + var stepSize = edge.pstyle("control-point-step-size").pfValue; + rs.edgeType = "self"; + var j = i2; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopAngle = loopDir - Math.PI / 2; + var outAngle = loopAngle - loopSwp / 2; + var inAngle = loopAngle + loopSwp / 2; + var dc = String(loopDir + "_" + loopSwp); + j = dirCounts[dc] === void 0 ? dirCounts[dc] = 0 : ++dirCounts[dc]; + rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)]; + }; + BRp$c.findCompoundLoopPoints = function(edge, pairInfo, i2, edgeIsUnbundled) { + var rs = edge._private.rscratch; + rs.edgeType = "compound"; + var srcPos = pairInfo.srcPos, tgtPos = pairInfo.tgtPos, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH; + var stepSize = edge.pstyle("control-point-step-size").pfValue; + var ctrlptDists = edge.pstyle("control-point-distances"); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : void 0; + var j = i2; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopW = 50; + var loopaPos = { + x: srcPos.x - srcW / 2, + y: srcPos.y - srcH / 2 + }; + var loopbPos = { + x: tgtPos.x - tgtW / 2, + y: tgtPos.y - tgtH / 2 + }; + var loopPos = { + x: Math.min(loopaPos.x, loopbPos.x), + y: Math.min(loopaPos.y, loopbPos.y) + }; + var minCompoundStretch = 0.5; + var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01)); + var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01)); + rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y]; + }; + BRp$c.findStraightEdgePoints = function(edge) { + edge._private.rscratch.edgeType = "straight"; + }; + BRp$c.findBezierPoints = function(edge, pairInfo, i2, edgeIsUnbundled, edgeIsSwapped) { + var rs = edge._private.rscratch; + var vectorNormInverse = pairInfo.vectorNormInverse, posPts = pairInfo.posPts, intersectionPts = pairInfo.intersectionPts; + var edgeDistances = edge.pstyle("edge-distances").value; + var stepSize = edge.pstyle("control-point-step-size").pfValue; + var ctrlptDists = edge.pstyle("control-point-distances"); + var ctrlptWs = edge.pstyle("control-point-weights"); + var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1; + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : void 0; + var ctrlptWeight = ctrlptWs.value[0]; + var multi = edgeIsUnbundled; + rs.edgeType = multi ? "multibezier" : "bezier"; + rs.ctrlpts = []; + for (var b = 0; b < bezierN; b++) { + var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i2) * stepSize * (edgeIsSwapped ? -1 : 1); + var manctrlptDist = void 0; + var sign = signum(normctrlptDist); + if (multi) { + ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; + ctrlptWeight = ctrlptWs.value[b]; + } + if (edgeIsUnbundled) { + manctrlptDist = ctrlptDist; + } else { + manctrlptDist = ctrlptDist !== void 0 ? sign * ctrlptDist : void 0; + } + var distanceFromMidpoint = manctrlptDist !== void 0 ? manctrlptDist : normctrlptDist; + var w1 = 1 - ctrlptWeight; + var w2 = ctrlptWeight; + var midptPts = edgeDistances === "node-position" ? posPts : intersectionPts; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint); + } + }; + BRp$c.findTaxiPoints = function(edge, pairInfo) { + var rs = edge._private.rscratch; + rs.edgeType = "segments"; + var VERTICAL = "vertical"; + var HORIZONTAL = "horizontal"; + var LEFTWARD = "leftward"; + var RIGHTWARD = "rightward"; + var DOWNWARD = "downward"; + var UPWARD = "upward"; + var AUTO = "auto"; + var posPts = pairInfo.posPts, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH; + var edgeDistances = edge.pstyle("edge-distances").value; + var dIncludesNodeBody = edgeDistances !== "node-position"; + var taxiDir = edge.pstyle("taxi-direction").value; + var rawTaxiDir = taxiDir; + var taxiTurn = edge.pstyle("taxi-turn"); + var turnIsPercent = taxiTurn.units === "%"; + var taxiTurnPfVal = taxiTurn.pfValue; + var turnIsNegative = taxiTurnPfVal < 0; + var minD = edge.pstyle("taxi-turn-min-distance").pfValue; + var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0; + var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0; + var pdx = posPts.x2 - posPts.x1; + var pdy = posPts.y2 - posPts.y1; + var subDWH = function subDWH2(dxy, dwh) { + if (dxy > 0) { + return Math.max(dxy - dwh, 0); + } else { + return Math.min(dxy + dwh, 0); + } + }; + var dx = subDWH(pdx, dw); + var dy = subDWH(pdy, dh); + var isExplicitDir = false; + if (rawTaxiDir === AUTO) { + taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL; + } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) { + taxiDir = VERTICAL; + isExplicitDir = true; + } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) { + taxiDir = HORIZONTAL; + isExplicitDir = true; + } + var isVert = taxiDir === VERTICAL; + var l = isVert ? dy : dx; + var pl = isVert ? pdy : pdx; + var sgnL = signum(pl); + var forcedDir = false; + if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) { + sgnL *= -1; + l = sgnL * Math.abs(l); + forcedDir = true; + } + var d; + if (turnIsPercent) { + var p2 = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal; + d = p2 * l; + } else { + var k = taxiTurnPfVal < 0 ? l : 0; + d = k + taxiTurnPfVal * sgnL; + } + var getIsTooClose = function getIsTooClose2(d2) { + return Math.abs(d2) < minD || Math.abs(d2) >= Math.abs(l); + }; + var isTooCloseSrc = getIsTooClose(d); + var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d)); + var isTooClose = isTooCloseSrc || isTooCloseTgt; + if (isTooClose && !forcedDir) { + if (isVert) { + var lShapeInsideSrc = Math.abs(pl) <= srcH / 2; + var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2; + if (lShapeInsideSrc) { + var x = (posPts.x1 + posPts.x2) / 2; + var y1 = posPts.y1, y2 = posPts.y2; + rs.segpts = [x, y1, x, y2]; + } else if (lShapeInsideTgt) { + var y = (posPts.y1 + posPts.y2) / 2; + var x1 = posPts.x1, x2 = posPts.x2; + rs.segpts = [x1, y, x2, y]; + } else { + rs.segpts = [posPts.x1, posPts.y2]; + } + } else { + var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2; + var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2; + if (_lShapeInsideSrc) { + var _y = (posPts.y1 + posPts.y2) / 2; + var _x = posPts.x1, _x2 = posPts.x2; + rs.segpts = [_x, _y, _x2, _y]; + } else if (_lShapeInsideTgt) { + var _x3 = (posPts.x1 + posPts.x2) / 2; + var _y2 = posPts.y1, _y3 = posPts.y2; + rs.segpts = [_x3, _y2, _x3, _y3]; + } else { + rs.segpts = [posPts.x2, posPts.y1]; + } + } + } else { + if (isVert) { + var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0); + var _x4 = posPts.x1, _x5 = posPts.x2; + rs.segpts = [_x4, _y4, _x5, _y4]; + } else { + var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0); + var _y5 = posPts.y1, _y6 = posPts.y2; + rs.segpts = [_x6, _y5, _x6, _y6]; + } + } + }; + BRp$c.tryToCorrectInvalidPoints = function(edge, pairInfo) { + var rs = edge._private.rscratch; + if (rs.edgeType === "bezier") { + var srcPos = pairInfo.srcPos, tgtPos = pairInfo.tgtPos, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH, srcShape = pairInfo.srcShape, tgtShape = pairInfo.tgtShape; + var badStart = !number$1(rs.startX) || !number$1(rs.startY); + var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY); + var badEnd = !number$1(rs.endX) || !number$1(rs.endY); + var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY); + var minCpADistFactor = 3; + var arrowW = this.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.arrowShapeWidth; + var minCpADist = minCpADistFactor * arrowW; + var startACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.startX, + y: rs.startY + }); + var closeStartACp = startACpDist < minCpADist; + var endACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.endX, + y: rs.endY + }); + var closeEndACp = endACpDist < minCpADist; + var overlapping = false; + if (badStart || badAStart || closeStartACp) { + overlapping = true; + var cpD = { + // delta + x: rs.ctrlpts[0] - srcPos.x, + y: rs.ctrlpts[1] - srcPos.y + }; + var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); + var cpM = { + // normalised delta + x: cpD.x / cpL, + y: cpD.y / cpL + }; + var radius = Math.max(srcW, srcH); + var cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + cpM.x * 2 * radius, + y: rs.ctrlpts[1] + cpM.y * 2 * radius + }; + var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0); + if (closeStartACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist); + } else { + rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist; + rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist; + } + } + if (badEnd || badAEnd || closeEndACp) { + overlapping = true; + var _cpD = { + // delta + x: rs.ctrlpts[0] - tgtPos.x, + y: rs.ctrlpts[1] - tgtPos.y + }; + var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); + var _cpM = { + // normalised delta + x: _cpD.x / _cpL, + y: _cpD.y / _cpL + }; + var _radius = Math.max(srcW, srcH); + var _cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + _cpM.x * 2 * _radius, + y: rs.ctrlpts[1] + _cpM.y * 2 * _radius + }; + var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0); + if (closeEndACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist); + } else { + rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist; + rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist; + } + } + if (overlapping) { + this.findEndpoints(edge); + } + } + }; + BRp$c.storeAllpts = function(edge) { + var rs = edge._private.rscratch; + if (rs.edgeType === "multibezier" || rs.edgeType === "bezier" || rs.edgeType === "self" || rs.edgeType === "compound") { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) { + rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]); + if (b + 3 < rs.ctrlpts.length) { + rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2); + } + } + rs.allpts.push(rs.endX, rs.endY); + var m, mt; + if (rs.ctrlpts.length / 2 % 2 === 0) { + m = rs.allpts.length / 2 - 1; + rs.midX = rs.allpts[m]; + rs.midY = rs.allpts[m + 1]; + } else { + m = rs.allpts.length / 2 - 3; + mt = 0.5; + rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt); + rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt); + } + } else if (rs.edgeType === "straight") { + rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY]; + rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4; + rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4; + } else if (rs.edgeType === "segments") { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + rs.allpts.push.apply(rs.allpts, rs.segpts); + rs.allpts.push(rs.endX, rs.endY); + if (rs.segpts.length % 4 === 0) { + var i2 = rs.segpts.length / 2; + var i1 = i2 - 2; + rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2; + rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2; + } else { + var _i = rs.segpts.length / 2 - 1; + rs.midX = rs.segpts[_i]; + rs.midY = rs.segpts[_i + 1]; + } + } + }; + BRp$c.checkForInvalidEdgeWarning = function(edge) { + var rs = edge[0]._private.rscratch; + if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) { + rs.loggedErr = false; + } else { + if (!rs.loggedErr) { + rs.loggedErr = true; + warn("Edge `" + edge.id() + "` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."); + } + } + }; + BRp$c.findEdgeControlPoints = function(edges) { + var _this = this; + if (!edges || edges.length === 0) { + return; + } + var r = this; + var cy = r.cy; + var hasCompounds = cy.hasCompoundNodes(); + var hashTable = { + map: new Map$2(), + get: function get2(pairId2) { + var map2 = this.map.get(pairId2[0]); + if (map2 != null) { + return map2.get(pairId2[1]); + } else { + return null; + } + }, + set: function set2(pairId2, val) { + var map2 = this.map.get(pairId2[0]); + if (map2 == null) { + map2 = new Map$2(); + this.map.set(pairId2[0], map2); + } + map2.set(pairId2[1], val); + } + }; + var pairIds = []; + var haystackEdges = []; + for (var i2 = 0; i2 < edges.length; i2++) { + var edge = edges[i2]; + var _p = edge._private; + var curveStyle = edge.pstyle("curve-style").value; + if (edge.removed() || !edge.takesUpSpace()) { + continue; + } + if (curveStyle === "haystack") { + haystackEdges.push(edge); + continue; + } + var edgeIsUnbundled = curveStyle === "unbundled-bezier" || curveStyle === "segments" || curveStyle === "straight" || curveStyle === "straight-triangle" || curveStyle === "taxi"; + var edgeIsBezier = curveStyle === "unbundled-bezier" || curveStyle === "bezier"; + var src = _p.source; + var tgt = _p.target; + var srcIndex = src.poolIndex(); + var tgtIndex = tgt.poolIndex(); + var pairId = [srcIndex, tgtIndex].sort(); + var tableEntry = hashTable.get(pairId); + if (tableEntry == null) { + tableEntry = { + eles: [] + }; + hashTable.set(pairId, tableEntry); + pairIds.push(pairId); + } + tableEntry.eles.push(edge); + if (edgeIsUnbundled) { + tableEntry.hasUnbundled = true; + } + if (edgeIsBezier) { + tableEntry.hasBezier = true; + } + } + var _loop = function _loop2(p3) { + var pairId2 = pairIds[p3]; + var pairInfo = hashTable.get(pairId2); + var swappedpairInfo = void 0; + if (!pairInfo.hasUnbundled) { + var pllEdges = pairInfo.eles[0].parallelEdges().filter(function(e) { + return e.isBundledBezier(); + }); + clearArray(pairInfo.eles); + pllEdges.forEach(function(edge2) { + return pairInfo.eles.push(edge2); + }); + pairInfo.eles.sort(function(edge1, edge2) { + return edge1.poolIndex() - edge2.poolIndex(); + }); + } + var firstEdge = pairInfo.eles[0]; + var src2 = firstEdge.source(); + var tgt2 = firstEdge.target(); + if (src2.poolIndex() > tgt2.poolIndex()) { + var temp = src2; + src2 = tgt2; + tgt2 = temp; + } + var srcPos = pairInfo.srcPos = src2.position(); + var tgtPos = pairInfo.tgtPos = tgt2.position(); + var srcW = pairInfo.srcW = src2.outerWidth(); + var srcH = pairInfo.srcH = src2.outerHeight(); + var tgtW = pairInfo.tgtW = tgt2.outerWidth(); + var tgtH = pairInfo.tgtH = tgt2.outerHeight(); + var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src2)]; + var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt2)]; + pairInfo.dirCounts = { + "north": 0, + "west": 0, + "south": 0, + "east": 0, + "northwest": 0, + "southwest": 0, + "northeast": 0, + "southeast": 0 + }; + for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) { + var _edge = pairInfo.eles[_i2]; + var rs = _edge[0]._private.rscratch; + var _curveStyle = _edge.pstyle("curve-style").value; + var _edgeIsUnbundled = _curveStyle === "unbundled-bezier" || _curveStyle === "segments" || _curveStyle === "taxi"; + var edgeIsSwapped = !src2.same(_edge.source()); + if (!pairInfo.calculatedIntersection && src2 !== tgt2 && (pairInfo.hasBezier || pairInfo.hasUnbundled)) { + pairInfo.calculatedIntersection = true; + var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0); + var srcIntn = pairInfo.srcIntn = srcOutside; + var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0); + var tgtIntn = pairInfo.tgtIntn = tgtOutside; + var intersectionPts = pairInfo.intersectionPts = { + x1: srcOutside[0], + x2: tgtOutside[0], + y1: srcOutside[1], + y2: tgtOutside[1] + }; + var posPts = pairInfo.posPts = { + x1: srcPos.x, + x2: tgtPos.x, + y1: srcPos.y, + y2: tgtPos.y + }; + var dy = tgtOutside[1] - srcOutside[1]; + var dx = tgtOutside[0] - srcOutside[0]; + var l = Math.sqrt(dx * dx + dy * dy); + var vector = pairInfo.vector = { + x: dx, + y: dy + }; + var vectorNorm = pairInfo.vectorNorm = { + x: vector.x / l, + y: vector.y / l + }; + var vectorNormInverse = { + x: -vectorNorm.y, + y: vectorNorm.x + }; + pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y); + pairInfo.vectorNormInverse = vectorNormInverse; + swappedpairInfo = { + nodesOverlap: pairInfo.nodesOverlap, + dirCounts: pairInfo.dirCounts, + calculatedIntersection: true, + hasBezier: pairInfo.hasBezier, + hasUnbundled: pairInfo.hasUnbundled, + eles: pairInfo.eles, + srcPos: tgtPos, + tgtPos: srcPos, + srcW: tgtW, + srcH: tgtH, + tgtW: srcW, + tgtH: srcH, + srcIntn: tgtIntn, + tgtIntn: srcIntn, + srcShape: tgtShape, + tgtShape: srcShape, + posPts: { + x1: posPts.x2, + y1: posPts.y2, + x2: posPts.x1, + y2: posPts.y1 + }, + intersectionPts: { + x1: intersectionPts.x2, + y1: intersectionPts.y2, + x2: intersectionPts.x1, + y2: intersectionPts.y1 + }, + vector: { + x: -vector.x, + y: -vector.y + }, + vectorNorm: { + x: -vectorNorm.x, + y: -vectorNorm.y + }, + vectorNormInverse: { + x: -vectorNormInverse.x, + y: -vectorNormInverse.y + } + }; + } + var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo; + rs.nodesOverlap = passedPairInfo.nodesOverlap; + rs.srcIntn = passedPairInfo.srcIntn; + rs.tgtIntn = passedPairInfo.tgtIntn; + if (hasCompounds && (src2.isParent() || src2.isChild() || tgt2.isParent() || tgt2.isChild()) && (src2.parents().anySame(tgt2) || tgt2.parents().anySame(src2) || src2.same(tgt2) && src2.isParent())) { + _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (src2 === tgt2) { + _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (_curveStyle === "segments") { + _this.findSegmentsPoints(_edge, passedPairInfo); + } else if (_curveStyle === "taxi") { + _this.findTaxiPoints(_edge, passedPairInfo); + } else if (_curveStyle === "straight" || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) { + _this.findStraightEdgePoints(_edge); + } else { + _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped); + } + _this.findEndpoints(_edge); + _this.tryToCorrectInvalidPoints(_edge, passedPairInfo); + _this.checkForInvalidEdgeWarning(_edge); + _this.storeAllpts(_edge); + _this.storeEdgeProjections(_edge); + _this.calculateArrowAngles(_edge); + _this.recalculateEdgeLabelProjections(_edge); + _this.calculateLabelAngles(_edge); + } + }; + for (var p2 = 0; p2 < pairIds.length; p2++) { + _loop(p2); + } + this.findHaystackPoints(haystackEdges); + }; + function getPts(pts2) { + var retPts = []; + if (pts2 == null) { + return; + } + for (var i2 = 0; i2 < pts2.length; i2 += 2) { + var x = pts2[i2]; + var y = pts2[i2 + 1]; + retPts.push({ + x, + y + }); + } + return retPts; + } + BRp$c.getSegmentPoints = function(edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + if (type === "segments") { + this.recalculateRenderedStyle(edge); + return getPts(rs.segpts); + } + }; + BRp$c.getControlPoints = function(edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + if (type === "bezier" || type === "multibezier" || type === "self" || type === "compound") { + this.recalculateRenderedStyle(edge); + return getPts(rs.ctrlpts); + } + }; + BRp$c.getEdgeMidpoint = function(edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + return { + x: rs.midX, + y: rs.midY + }; + }; + var BRp$b = {}; + BRp$b.manualEndptToPx = function(node, prop) { + var r = this; + var npos = node.position(); + var w = node.outerWidth(); + var h = node.outerHeight(); + if (prop.value.length === 2) { + var p2 = [prop.pfValue[0], prop.pfValue[1]]; + if (prop.units[0] === "%") { + p2[0] = p2[0] * w; + } + if (prop.units[1] === "%") { + p2[1] = p2[1] * h; + } + p2[0] += npos.x; + p2[1] += npos.y; + return p2; + } else { + var angle = prop.pfValue[0]; + angle = -Math.PI / 2 + angle; + var l = 2 * Math.max(w, h); + var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l]; + return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0); + } + }; + BRp$b.findEndpoints = function(edge) { + var r = this; + var intersect; + var source = edge.source()[0]; + var target = edge.target()[0]; + var srcPos = source.position(); + var tgtPos = target.position(); + var tgtArShape = edge.pstyle("target-arrow-shape").value; + var srcArShape = edge.pstyle("source-arrow-shape").value; + var tgtDist = edge.pstyle("target-distance-from-node").pfValue; + var srcDist = edge.pstyle("source-distance-from-node").pfValue; + var curveStyle = edge.pstyle("curve-style").value; + var rs = edge._private.rscratch; + var et = rs.edgeType; + var taxi = curveStyle === "taxi"; + var self2 = et === "self" || et === "compound"; + var bezier = et === "bezier" || et === "multibezier" || self2; + var multi = et !== "bezier"; + var lines = et === "straight" || et === "segments"; + var segments = et === "segments"; + var hasEndpts = bezier || multi || lines; + var overrideEndpts = self2 || taxi; + var srcManEndpt = edge.pstyle("source-endpoint"); + var srcManEndptVal = overrideEndpts ? "outside-to-node" : srcManEndpt.value; + var tgtManEndpt = edge.pstyle("target-endpoint"); + var tgtManEndptVal = overrideEndpts ? "outside-to-node" : tgtManEndpt.value; + rs.srcManEndpt = srcManEndpt; + rs.tgtManEndpt = tgtManEndpt; + var p1; + var p2; + var p1_i; + var p2_i; + if (bezier) { + var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]]; + var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart; + p1 = cpEnd; + p2 = cpStart; + } else if (lines) { + var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2); + var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2); + p1 = tgtArrowFromPt; + p2 = srcArrowFromPt; + } + if (tgtManEndptVal === "inside-to-node") { + intersect = [tgtPos.x, tgtPos.y]; + } else if (tgtManEndpt.units) { + intersect = this.manualEndptToPx(target, tgtManEndpt); + } else if (tgtManEndptVal === "outside-to-line") { + intersect = rs.tgtIntn; + } else { + if (tgtManEndptVal === "outside-to-node" || tgtManEndptVal === "outside-to-node-or-label") { + p1_i = p1; + } else if (tgtManEndptVal === "outside-to-line" || tgtManEndptVal === "outside-to-line-or-label") { + p1_i = [srcPos.x, srcPos.y]; + } + intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0); + if (tgtManEndptVal === "outside-to-node-or-label" || tgtManEndptVal === "outside-to-line-or-label") { + var trs = target._private.rscratch; + var lw = trs.labelWidth; + var lh = trs.labelHeight; + var lx = trs.labelX; + var ly = trs.labelY; + var lw2 = lw / 2; + var lh2 = lh / 2; + var va = target.pstyle("text-valign").value; + if (va === "top") { + ly -= lh2; + } else if (va === "bottom") { + ly += lh2; + } + var ha = target.pstyle("text-halign").value; + if (ha === "left") { + lx -= lw2; + } else if (ha === "right") { + lx += lw2; + } + var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y); + if (labelIntersect.length > 0) { + var refPt = srcPos; + var intSqdist = sqdist(refPt, array2point(intersect)); + var labIntSqdist = sqdist(refPt, array2point(labelIntersect)); + var minSqDist = intSqdist; + if (labIntSqdist < intSqdist) { + intersect = labelIntersect; + minSqDist = labIntSqdist; + } + if (labelIntersect.length > 2) { + var labInt2SqDist = sqdist(refPt, { + x: labelIntersect[2], + y: labelIntersect[3] + }); + if (labInt2SqDist < minSqDist) { + intersect = [labelIntersect[2], labelIntersect[3]]; + } + } + } + } + } + var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist); + var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist); + rs.endX = edgeEnd[0]; + rs.endY = edgeEnd[1]; + rs.arrowEndX = arrowEnd[0]; + rs.arrowEndY = arrowEnd[1]; + if (srcManEndptVal === "inside-to-node") { + intersect = [srcPos.x, srcPos.y]; + } else if (srcManEndpt.units) { + intersect = this.manualEndptToPx(source, srcManEndpt); + } else if (srcManEndptVal === "outside-to-line") { + intersect = rs.srcIntn; + } else { + if (srcManEndptVal === "outside-to-node" || srcManEndptVal === "outside-to-node-or-label") { + p2_i = p2; + } else if (srcManEndptVal === "outside-to-line" || srcManEndptVal === "outside-to-line-or-label") { + p2_i = [tgtPos.x, tgtPos.y]; + } + intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0); + if (srcManEndptVal === "outside-to-node-or-label" || srcManEndptVal === "outside-to-line-or-label") { + var srs = source._private.rscratch; + var _lw = srs.labelWidth; + var _lh = srs.labelHeight; + var _lx = srs.labelX; + var _ly = srs.labelY; + var _lw2 = _lw / 2; + var _lh2 = _lh / 2; + var _va = source.pstyle("text-valign").value; + if (_va === "top") { + _ly -= _lh2; + } else if (_va === "bottom") { + _ly += _lh2; + } + var _ha = source.pstyle("text-halign").value; + if (_ha === "left") { + _lx -= _lw2; + } else if (_ha === "right") { + _lx += _lw2; + } + var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y); + if (_labelIntersect.length > 0) { + var _refPt = tgtPos; + var _intSqdist = sqdist(_refPt, array2point(intersect)); + var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect)); + var _minSqDist = _intSqdist; + if (_labIntSqdist < _intSqdist) { + intersect = [_labelIntersect[0], _labelIntersect[1]]; + _minSqDist = _labIntSqdist; + } + if (_labelIntersect.length > 2) { + var _labInt2SqDist = sqdist(_refPt, { + x: _labelIntersect[2], + y: _labelIntersect[3] + }); + if (_labInt2SqDist < _minSqDist) { + intersect = [_labelIntersect[2], _labelIntersect[3]]; + } + } + } + } + } + var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist); + var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist); + rs.startX = edgeStart[0]; + rs.startY = edgeStart[1]; + rs.arrowStartX = arrowStart[0]; + rs.arrowStartY = arrowStart[1]; + if (hasEndpts) { + if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) { + rs.badLine = true; + } else { + rs.badLine = false; + } + } + }; + BRp$b.getSourceEndpoint = function(edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case "haystack": + return { + x: rs.haystackPts[0], + y: rs.haystackPts[1] + }; + default: + return { + x: rs.arrowStartX, + y: rs.arrowStartY + }; + } + }; + BRp$b.getTargetEndpoint = function(edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case "haystack": + return { + x: rs.haystackPts[2], + y: rs.haystackPts[3] + }; + default: + return { + x: rs.arrowEndX, + y: rs.arrowEndY + }; + } + }; + var BRp$a = {}; + function pushBezierPts(r, edge, pts2) { + var qbezierAt$1 = function qbezierAt$12(p1, p22, p3, t) { + return qbezierAt(p1, p22, p3, t); + }; + var _p = edge._private; + var bpts = _p.rstyle.bezierPts; + for (var i2 = 0; i2 < r.bezierProjPcts.length; i2++) { + var p2 = r.bezierProjPcts[i2]; + bpts.push({ + x: qbezierAt$1(pts2[0], pts2[2], pts2[4], p2), + y: qbezierAt$1(pts2[1], pts2[3], pts2[5], p2) + }); + } + } + BRp$a.storeEdgeProjections = function(edge) { + var _p = edge._private; + var rs = _p.rscratch; + var et = rs.edgeType; + _p.rstyle.bezierPts = null; + _p.rstyle.linePts = null; + _p.rstyle.haystackPts = null; + if (et === "multibezier" || et === "bezier" || et === "self" || et === "compound") { + _p.rstyle.bezierPts = []; + for (var i2 = 0; i2 + 5 < rs.allpts.length; i2 += 4) { + pushBezierPts(this, edge, rs.allpts.slice(i2, i2 + 6)); + } + } else if (et === "segments") { + var lpts = _p.rstyle.linePts = []; + for (var i2 = 0; i2 + 1 < rs.allpts.length; i2 += 2) { + lpts.push({ + x: rs.allpts[i2], + y: rs.allpts[i2 + 1] + }); + } + } else if (et === "haystack") { + var hpts = rs.haystackPts; + _p.rstyle.haystackPts = [{ + x: hpts[0], + y: hpts[1] + }, { + x: hpts[2], + y: hpts[3] + }]; + } + _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle("width").pfValue, edge.pstyle("arrow-scale").value) * this.arrowShapeWidth; + }; + BRp$a.recalculateEdgeProjections = function(edges) { + this.findEdgeControlPoints(edges); + }; + var BRp$9 = {}; + BRp$9.recalculateNodeLabelProjection = function(node) { + var content = node.pstyle("label").strValue; + if (emptyString(content)) { + return; + } + var textX, textY; + var _p = node._private; + var nodeWidth = node.width(); + var nodeHeight = node.height(); + var padding = node.padding(); + var nodePos = node.position(); + var textHalign = node.pstyle("text-halign").strValue; + var textValign = node.pstyle("text-valign").strValue; + var rs = _p.rscratch; + var rstyle = _p.rstyle; + switch (textHalign) { + case "left": + textX = nodePos.x - nodeWidth / 2 - padding; + break; + case "right": + textX = nodePos.x + nodeWidth / 2 + padding; + break; + default: + textX = nodePos.x; + } + switch (textValign) { + case "top": + textY = nodePos.y - nodeHeight / 2 - padding; + break; + case "bottom": + textY = nodePos.y + nodeHeight / 2 + padding; + break; + default: + textY = nodePos.y; + } + rs.labelX = textX; + rs.labelY = textY; + rstyle.labelX = textX; + rstyle.labelY = textY; + this.calculateLabelAngles(node); + this.applyLabelDimensions(node); + }; + var lineAngleFromDelta = function lineAngleFromDelta2(dx, dy) { + var angle = Math.atan(dy / dx); + if (dx === 0 && angle < 0) { + angle = angle * -1; + } + return angle; + }; + var lineAngle = function lineAngle2(p0, p1) { + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + return lineAngleFromDelta(dx, dy); + }; + var bezierAngle = function bezierAngle2(p0, p1, p2, t) { + var t0 = bound(0, t - 1e-3, 1); + var t1 = bound(0, t + 1e-3, 1); + var lp0 = qbezierPtAt(p0, p1, p2, t0); + var lp1 = qbezierPtAt(p0, p1, p2, t1); + return lineAngle(lp0, lp1); + }; + BRp$9.recalculateEdgeLabelProjections = function(edge) { + var p2; + var _p = edge._private; + var rs = _p.rscratch; + var r = this; + var content = { + mid: edge.pstyle("label").strValue, + source: edge.pstyle("source-label").strValue, + target: edge.pstyle("target-label").strValue + }; + if (content.mid || content.source || content.target) + ; + else { + return; + } + p2 = { + x: rs.midX, + y: rs.midY + }; + var setRs = function setRs2(propName, prefix, value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + setPrefixedProperty(_p.rstyle, propName, prefix, value); + }; + setRs("labelX", null, p2.x); + setRs("labelY", null, p2.y); + var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY); + setRs("labelAutoAngle", null, midAngle); + var createControlPointInfo = function createControlPointInfo2() { + if (createControlPointInfo2.cache) { + return createControlPointInfo2.cache; + } + var ctrlpts = []; + for (var i2 = 0; i2 + 5 < rs.allpts.length; i2 += 4) { + var p0 = { + x: rs.allpts[i2], + y: rs.allpts[i2 + 1] + }; + var p1 = { + x: rs.allpts[i2 + 2], + y: rs.allpts[i2 + 3] + }; + var p22 = { + x: rs.allpts[i2 + 4], + y: rs.allpts[i2 + 5] + }; + ctrlpts.push({ + p0, + p1, + p2: p22, + startDist: 0, + length: 0, + segments: [] + }); + } + var bpts = _p.rstyle.bezierPts; + var nProjs = r.bezierProjPcts.length; + function addSegment(cp2, p02, p12, t0, t1) { + var length = dist(p02, p12); + var prevSegment = cp2.segments[cp2.segments.length - 1]; + var segment = { + p0: p02, + p1: p12, + t0, + t1, + startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0, + length + }; + cp2.segments.push(segment); + cp2.length += length; + } + for (var _i = 0; _i < ctrlpts.length; _i++) { + var cp = ctrlpts[_i]; + var prevCp = ctrlpts[_i - 1]; + if (prevCp) { + cp.startDist = prevCp.startDist + prevCp.length; + } + addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); + for (var j = 0; j < nProjs - 1; j++) { + addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]); + } + addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); + } + return createControlPointInfo2.cache = ctrlpts; + }; + var calculateEndProjection = function calculateEndProjection2(prefix) { + var angle; + var isSrc = prefix === "source"; + if (!content[prefix]) { + return; + } + var offset = edge.pstyle(prefix + "-text-offset").pfValue; + switch (rs.edgeType) { + case "self": + case "compound": + case "bezier": + case "multibezier": { + var cps = createControlPointInfo(); + var selected; + var startDist = 0; + var totalDist = 0; + for (var i2 = 0; i2 < cps.length; i2++) { + var _cp = cps[isSrc ? i2 : cps.length - 1 - i2]; + for (var j = 0; j < _cp.segments.length; j++) { + var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j]; + var lastSeg = i2 === cps.length - 1 && j === _cp.segments.length - 1; + startDist = totalDist; + totalDist += _seg.length; + if (totalDist >= offset || lastSeg) { + selected = { + cp: _cp, + segment: _seg + }; + break; + } + } + if (selected) { + break; + } + } + var cp = selected.cp; + var seg = selected.segment; + var tSegment = (offset - startDist) / seg.length; + var segDt = seg.t1 - seg.t0; + var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment; + t = bound(0, t, 1); + p2 = qbezierPtAt(cp.p0, cp.p1, cp.p2, t); + angle = bezierAngle(cp.p0, cp.p1, cp.p2, t); + break; + } + case "straight": + case "segments": + case "haystack": { + var d = 0, di, d0; + var p0, p1; + var l = rs.allpts.length; + for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) { + if (isSrc) { + p0 = { + x: rs.allpts[_i2], + y: rs.allpts[_i2 + 1] + }; + p1 = { + x: rs.allpts[_i2 + 2], + y: rs.allpts[_i2 + 3] + }; + } else { + p0 = { + x: rs.allpts[l - 2 - _i2], + y: rs.allpts[l - 1 - _i2] + }; + p1 = { + x: rs.allpts[l - 4 - _i2], + y: rs.allpts[l - 3 - _i2] + }; + } + di = dist(p0, p1); + d0 = d; + d += di; + if (d >= offset) { + break; + } + } + var pD = offset - d0; + var _t = pD / di; + _t = bound(0, _t, 1); + p2 = lineAt(p0, p1, _t); + angle = lineAngle(p0, p1); + break; + } + } + setRs("labelX", prefix, p2.x); + setRs("labelY", prefix, p2.y); + setRs("labelAutoAngle", prefix, angle); + }; + calculateEndProjection("source"); + calculateEndProjection("target"); + this.applyLabelDimensions(edge); + }; + BRp$9.applyLabelDimensions = function(ele) { + this.applyPrefixedLabelDimensions(ele); + if (ele.isEdge()) { + this.applyPrefixedLabelDimensions(ele, "source"); + this.applyPrefixedLabelDimensions(ele, "target"); + } + }; + BRp$9.applyPrefixedLabelDimensions = function(ele, prefix) { + var _p = ele._private; + var text = this.getLabelText(ele, prefix); + var labelDims = this.calculateLabelDimensions(ele, text); + var lineHeight = ele.pstyle("line-height").pfValue; + var textWrap = ele.pstyle("text-wrap").strValue; + var lines = getPrefixedProperty(_p.rscratch, "labelWrapCachedLines", prefix) || []; + var numLines = textWrap !== "wrap" ? 1 : Math.max(lines.length, 1); + var normPerLineHeight = labelDims.height / numLines; + var labelLineHeight = normPerLineHeight * lineHeight; + var width = labelDims.width; + var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight; + setPrefixedProperty(_p.rstyle, "labelWidth", prefix, width); + setPrefixedProperty(_p.rscratch, "labelWidth", prefix, width); + setPrefixedProperty(_p.rstyle, "labelHeight", prefix, height); + setPrefixedProperty(_p.rscratch, "labelHeight", prefix, height); + setPrefixedProperty(_p.rscratch, "labelLineHeight", prefix, labelLineHeight); + }; + BRp$9.getLabelText = function(ele, prefix) { + var _p = ele._private; + var pfd = prefix ? prefix + "-" : ""; + var text = ele.pstyle(pfd + "label").strValue; + var textTransform = ele.pstyle("text-transform").value; + var rscratch = function rscratch2(propName, value) { + if (value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + return value; + } else { + return getPrefixedProperty(_p.rscratch, propName, prefix); + } + }; + if (!text) { + return ""; + } + if (textTransform == "none") + ; + else if (textTransform == "uppercase") { + text = text.toUpperCase(); + } else if (textTransform == "lowercase") { + text = text.toLowerCase(); + } + var wrapStyle = ele.pstyle("text-wrap").value; + if (wrapStyle === "wrap") { + var labelKey = rscratch("labelKey"); + if (labelKey != null && rscratch("labelWrapKey") === labelKey) { + return rscratch("labelWrapCachedText"); + } + var zwsp = "​"; + var lines = text.split("\n"); + var maxW = ele.pstyle("text-max-width").pfValue; + var overflow = ele.pstyle("text-overflow-wrap").value; + var overflowAny = overflow === "anywhere"; + var wrappedLines = []; + var wordsRegex = /[\s\u200b]+/; + var wordSeparator = overflowAny ? "" : " "; + for (var l = 0; l < lines.length; l++) { + var line = lines[l]; + var lineDims = this.calculateLabelDimensions(ele, line); + var lineW = lineDims.width; + if (overflowAny) { + var processedLine = line.split("").join(zwsp); + line = processedLine; + } + if (lineW > maxW) { + var words = line.split(wordsRegex); + var subline = ""; + for (var w = 0; w < words.length; w++) { + var word = words[w]; + var testLine = subline.length === 0 ? word : subline + wordSeparator + word; + var testDims = this.calculateLabelDimensions(ele, testLine); + var testW = testDims.width; + if (testW <= maxW) { + subline += word + wordSeparator; + } else { + if (subline) { + wrappedLines.push(subline); + } + subline = word + wordSeparator; + } + } + if (!subline.match(/^[\s\u200b]+$/)) { + wrappedLines.push(subline); + } + } else { + wrappedLines.push(line); + } + } + rscratch("labelWrapCachedLines", wrappedLines); + text = rscratch("labelWrapCachedText", wrappedLines.join("\n")); + rscratch("labelWrapKey", labelKey); + } else if (wrapStyle === "ellipsis") { + var _maxW = ele.pstyle("text-max-width").pfValue; + var ellipsized = ""; + var ellipsis = "…"; + var incLastCh = false; + if (this.calculateLabelDimensions(ele, text).width < _maxW) { + return text; + } + for (var i2 = 0; i2 < text.length; i2++) { + var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i2] + ellipsis).width; + if (widthWithNextCh > _maxW) { + break; + } + ellipsized += text[i2]; + if (i2 === text.length - 1) { + incLastCh = true; + } + } + if (!incLastCh) { + ellipsized += ellipsis; + } + return ellipsized; + } + return text; + }; + BRp$9.getLabelJustification = function(ele) { + var justification = ele.pstyle("text-justification").strValue; + var textHalign = ele.pstyle("text-halign").strValue; + if (justification === "auto") { + if (ele.isNode()) { + switch (textHalign) { + case "left": + return "right"; + case "right": + return "left"; + default: + return "center"; + } + } else { + return "center"; + } + } else { + return justification; + } + }; + BRp$9.calculateLabelDimensions = function(ele, text) { + var r = this; + var cacheKey = hashString(text, ele._private.labelDimsKey); + var cache2 = r.labelDimCache || (r.labelDimCache = []); + var existingVal = cache2[cacheKey]; + if (existingVal != null) { + return existingVal; + } + var padding = 0; + var fStyle = ele.pstyle("font-style").strValue; + var size = ele.pstyle("font-size").pfValue; + var family = ele.pstyle("font-family").strValue; + var weight = ele.pstyle("font-weight").strValue; + var canvas = this.labelCalcCanvas; + var c2d = this.labelCalcCanvasContext; + if (!canvas) { + canvas = this.labelCalcCanvas = document.createElement("canvas"); + c2d = this.labelCalcCanvasContext = canvas.getContext("2d"); + var ds = canvas.style; + ds.position = "absolute"; + ds.left = "-9999px"; + ds.top = "-9999px"; + ds.zIndex = "-1"; + ds.visibility = "hidden"; + ds.pointerEvents = "none"; + } + c2d.font = "".concat(fStyle, " ").concat(weight, " ").concat(size, "px ").concat(family); + var width = 0; + var height = 0; + var lines = text.split("\n"); + for (var i2 = 0; i2 < lines.length; i2++) { + var line = lines[i2]; + var metrics = c2d.measureText(line); + var w = Math.ceil(metrics.width); + var h = size; + width = Math.max(w, width); + height += h; + } + width += padding; + height += padding; + return cache2[cacheKey] = { + width, + height + }; + }; + BRp$9.calculateLabelAngle = function(ele, prefix) { + var _p = ele._private; + var rs = _p.rscratch; + var isEdge = ele.isEdge(); + var prefixDash = prefix ? prefix + "-" : ""; + var rot = ele.pstyle(prefixDash + "text-rotation"); + var rotStr = rot.strValue; + if (rotStr === "none") { + return 0; + } else if (isEdge && rotStr === "autorotate") { + return rs.labelAutoAngle; + } else if (rotStr === "autorotate") { + return 0; + } else { + return rot.pfValue; + } + }; + BRp$9.calculateLabelAngles = function(ele) { + var r = this; + var isEdge = ele.isEdge(); + var _p = ele._private; + var rs = _p.rscratch; + rs.labelAngle = r.calculateLabelAngle(ele); + if (isEdge) { + rs.sourceLabelAngle = r.calculateLabelAngle(ele, "source"); + rs.targetLabelAngle = r.calculateLabelAngle(ele, "target"); + } + }; + var BRp$8 = {}; + var TOO_SMALL_CUT_RECT = 28; + var warnedCutRect = false; + BRp$8.getNodeShape = function(node) { + var r = this; + var shape = node.pstyle("shape").value; + if (shape === "cutrectangle" && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) { + if (!warnedCutRect) { + warn("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"); + warnedCutRect = true; + } + return "rectangle"; + } + if (node.isParent()) { + if (shape === "rectangle" || shape === "roundrectangle" || shape === "round-rectangle" || shape === "cutrectangle" || shape === "cut-rectangle" || shape === "barrel") { + return shape; + } else { + return "rectangle"; + } + } + if (shape === "polygon") { + var points = node.pstyle("shape-polygon-points").value; + return r.nodeShapes.makePolygon(points).name; + } + return shape; + }; + var BRp$7 = {}; + BRp$7.registerCalculationListeners = function() { + var cy = this.cy; + var elesToUpdate = cy.collection(); + var r = this; + var enqueue = function enqueue2(eles) { + var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + elesToUpdate.merge(eles); + if (dirtyStyleCaches) { + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var _p = ele._private; + var rstyle = _p.rstyle; + rstyle.clean = false; + rstyle.cleanConnected = false; + } + } + }; + r.binder(cy).on("bounds.* dirty.*", function onDirtyBounds(e) { + var ele = e.target; + enqueue(ele); + }).on("style.* background.*", function onDirtyStyle(e) { + var ele = e.target; + enqueue(ele, false); + }); + var updateEleCalcs = function updateEleCalcs2(willDraw) { + if (willDraw) { + var fns = r.onUpdateEleCalcsFns; + elesToUpdate.cleanStyle(); + for (var i2 = 0; i2 < elesToUpdate.length; i2++) { + var ele = elesToUpdate[i2]; + var rstyle = ele._private.rstyle; + if (ele.isNode() && !rstyle.cleanConnected) { + enqueue(ele.connectedEdges()); + rstyle.cleanConnected = true; + } + } + if (fns) { + for (var _i = 0; _i < fns.length; _i++) { + var fn2 = fns[_i]; + fn2(willDraw, elesToUpdate); + } + } + r.recalculateRenderedStyle(elesToUpdate); + elesToUpdate = cy.collection(); + } + }; + r.flushRenderedStyleQueue = function() { + updateEleCalcs(true); + }; + r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs); + }; + BRp$7.onUpdateEleCalcs = function(fn2) { + var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; + fns.push(fn2); + }; + BRp$7.recalculateRenderedStyle = function(eles, useCache) { + var isCleanConnected = function isCleanConnected2(ele2) { + return ele2._private.rstyle.cleanConnected; + }; + var edges = []; + var nodes2 = []; + if (this.destroyed) { + return; + } + if (useCache === void 0) { + useCache = true; + } + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var _p = ele._private; + var rstyle = _p.rstyle; + if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) { + rstyle.clean = false; + } + if (useCache && rstyle.clean || ele.removed()) { + continue; + } + if (ele.pstyle("display").value === "none") { + continue; + } + if (_p.group === "nodes") { + nodes2.push(ele); + } else { + edges.push(ele); + } + rstyle.clean = true; + } + for (var _i2 = 0; _i2 < nodes2.length; _i2++) { + var _ele = nodes2[_i2]; + var _p2 = _ele._private; + var _rstyle = _p2.rstyle; + var pos = _ele.position(); + this.recalculateNodeLabelProjection(_ele); + _rstyle.nodeX = pos.x; + _rstyle.nodeY = pos.y; + _rstyle.nodeW = _ele.pstyle("width").pfValue; + _rstyle.nodeH = _ele.pstyle("height").pfValue; + } + this.recalculateEdgeProjections(edges); + for (var _i3 = 0; _i3 < edges.length; _i3++) { + var _ele2 = edges[_i3]; + var _p3 = _ele2._private; + var _rstyle2 = _p3.rstyle; + var rs = _p3.rscratch; + _rstyle2.srcX = rs.arrowStartX; + _rstyle2.srcY = rs.arrowStartY; + _rstyle2.tgtX = rs.arrowEndX; + _rstyle2.tgtY = rs.arrowEndY; + _rstyle2.midX = rs.midX; + _rstyle2.midY = rs.midY; + _rstyle2.labelAngle = rs.labelAngle; + _rstyle2.sourceLabelAngle = rs.sourceLabelAngle; + _rstyle2.targetLabelAngle = rs.targetLabelAngle; + } + }; + var BRp$6 = {}; + BRp$6.updateCachedGrabbedEles = function() { + var eles = this.cachedZSortedEles; + if (!eles) { + return; + } + eles.drag = []; + eles.nondrag = []; + var grabTargets = []; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var rs = ele._private.rscratch; + if (ele.grabbed() && !ele.isParent()) { + grabTargets.push(ele); + } else if (rs.inDragLayer) { + eles.drag.push(ele); + } else { + eles.nondrag.push(ele); + } + } + for (var i2 = 0; i2 < grabTargets.length; i2++) { + var ele = grabTargets[i2]; + eles.drag.push(ele); + } + }; + BRp$6.invalidateCachedZSortedEles = function() { + this.cachedZSortedEles = null; + }; + BRp$6.getCachedZSortedEles = function(forceRecalc) { + if (forceRecalc || !this.cachedZSortedEles) { + var eles = this.cy.mutableElements().toArray(); + eles.sort(zIndexSort); + eles.interactive = eles.filter(function(ele) { + return ele.interactive(); + }); + this.cachedZSortedEles = eles; + this.updateCachedGrabbedEles(); + } else { + eles = this.cachedZSortedEles; + } + return eles; + }; + var BRp$5 = {}; + [BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function(props) { + extend(BRp$5, props); + }); + var BRp$4 = {}; + BRp$4.getCachedImage = function(url, crossOrigin, onLoad) { + var r = this; + var imageCache = r.imageCache = r.imageCache || {}; + var cache2 = imageCache[url]; + if (cache2) { + if (!cache2.image.complete) { + cache2.image.addEventListener("load", onLoad); + } + return cache2.image; + } else { + cache2 = imageCache[url] = imageCache[url] || {}; + var image = cache2.image = new Image(); + image.addEventListener("load", onLoad); + image.addEventListener("error", function() { + image.error = true; + }); + var dataUriPrefix = "data:"; + var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix; + if (!isDataUri) { + image.crossOrigin = crossOrigin; + } + image.src = url; + return image; + } + }; + var BRp$3 = {}; + BRp$3.registerBinding = function(target, event2, handler, useCapture) { + var args = Array.prototype.slice.apply(arguments, [1]); + var b = this.binder(target); + return b.on.apply(b, args); + }; + BRp$3.binder = function(tgt) { + var r = this; + var tgtIsDom = tgt === window || tgt === document || tgt === document.body || domElement(tgt); + if (r.supportsPassiveEvents == null) { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, "passive", { + get: function get2() { + supportsPassive = true; + return true; + } + }); + window.addEventListener("test", null, opts); + } catch (err) { + } + r.supportsPassiveEvents = supportsPassive; + } + var on = function on2(event2, handler, useCapture) { + var args = Array.prototype.slice.call(arguments); + if (tgtIsDom && r.supportsPassiveEvents) { + args[2] = { + capture: useCapture != null ? useCapture : false, + passive: false, + once: false + }; + } + r.bindings.push({ + target: tgt, + args + }); + (tgt.addEventListener || tgt.on).apply(tgt, args); + return this; + }; + return { + on, + addEventListener: on, + addListener: on, + bind: on + }; + }; + BRp$3.nodeIsDraggable = function(node) { + return node && node.isNode() && !node.locked() && node.grabbable(); + }; + BRp$3.nodeIsGrabbable = function(node) { + return this.nodeIsDraggable(node) && node.interactive(); + }; + BRp$3.load = function() { + var r = this; + var isSelected = function isSelected2(ele) { + return ele.selected(); + }; + var triggerEvents = function triggerEvents2(target, names, e, position2) { + if (target == null) { + target = r.cy; + } + for (var i2 = 0; i2 < names.length; i2++) { + var name2 = names[i2]; + target.emit({ + originalEvent: e, + type: name2, + position: position2 + }); + } + }; + var isMultSelKeyDown = function isMultSelKeyDown2(e) { + return e.shiftKey || e.metaKey || e.ctrlKey; + }; + var allowPanningPassthrough = function allowPanningPassthrough2(down, downs) { + var allowPassthrough = true; + if (r.cy.hasCompoundNodes() && down && down.pannable()) { + for (var i2 = 0; downs && i2 < downs.length; i2++) { + var down = downs[i2]; + if (down.isNode() && down.isParent() && !down.pannable()) { + allowPassthrough = false; + break; + } + } + } else { + allowPassthrough = true; + } + return allowPassthrough; + }; + var setGrabbed = function setGrabbed2(ele) { + ele[0]._private.grabbed = true; + }; + var setFreed = function setFreed2(ele) { + ele[0]._private.grabbed = false; + }; + var setInDragLayer = function setInDragLayer2(ele) { + ele[0]._private.rscratch.inDragLayer = true; + }; + var setOutDragLayer = function setOutDragLayer2(ele) { + ele[0]._private.rscratch.inDragLayer = false; + }; + var setGrabTarget = function setGrabTarget2(ele) { + ele[0]._private.rscratch.isGrabTarget = true; + }; + var removeGrabTarget = function removeGrabTarget2(ele) { + ele[0]._private.rscratch.isGrabTarget = false; + }; + var addToDragList = function addToDragList2(ele, opts) { + var list = opts.addToList; + var listHasEle = list.has(ele); + if (!listHasEle && ele.grabbable() && !ele.locked()) { + list.merge(ele); + setGrabbed(ele); + } + }; + var addDescendantsToDrag = function addDescendantsToDrag2(node, opts) { + if (!node.cy().hasCompoundNodes()) { + return; + } + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } + var innerNodes = node.descendants(); + if (opts.inDragLayer) { + innerNodes.forEach(setInDragLayer); + innerNodes.connectedEdges().forEach(setInDragLayer); + } + if (opts.addToList) { + addToDragList(innerNodes, opts); + } + }; + var addNodesToDrag = function addNodesToDrag2(nodes2, opts) { + opts = opts || {}; + var hasCompoundNodes = nodes2.cy().hasCompoundNodes(); + if (opts.inDragLayer) { + nodes2.forEach(setInDragLayer); + nodes2.neighborhood().stdFilter(function(ele) { + return !hasCompoundNodes || ele.isEdge(); + }).forEach(setInDragLayer); + } + if (opts.addToList) { + nodes2.forEach(function(ele) { + addToDragList(ele, opts); + }); + } + addDescendantsToDrag(nodes2, opts); + updateAncestorsInDragLayer(nodes2, { + inDragLayer: opts.inDragLayer + }); + r.updateCachedGrabbedEles(); + }; + var addNodeToDrag = addNodesToDrag; + var freeDraggedElements = function freeDraggedElements2(grabbedEles) { + if (!grabbedEles) { + return; + } + r.getCachedZSortedEles().forEach(function(ele) { + setFreed(ele); + setOutDragLayer(ele); + removeGrabTarget(ele); + }); + r.updateCachedGrabbedEles(); + }; + var updateAncestorsInDragLayer = function updateAncestorsInDragLayer2(node, opts) { + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } + if (!node.cy().hasCompoundNodes()) { + return; + } + var parent = node.ancestors().orphans(); + if (parent.same(node)) { + return; + } + var nodes2 = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants()); + var edges = nodes2.connectedEdges(); + if (opts.inDragLayer) { + edges.forEach(setInDragLayer); + nodes2.forEach(setInDragLayer); + } + if (opts.addToList) { + nodes2.forEach(function(ele) { + addToDragList(ele, opts); + }); + } + }; + var blurActiveDomElement = function blurActiveDomElement2() { + if (document.activeElement != null && document.activeElement.blur != null) { + document.activeElement.blur(); + } + }; + var haveMutationsApi = typeof MutationObserver !== "undefined"; + var haveResizeObserverApi = typeof ResizeObserver !== "undefined"; + if (haveMutationsApi) { + r.removeObserver = new MutationObserver(function(mutns) { + for (var i2 = 0; i2 < mutns.length; i2++) { + var mutn = mutns[i2]; + var rNodes = mutn.removedNodes; + if (rNodes) { + for (var j = 0; j < rNodes.length; j++) { + var rNode = rNodes[j]; + if (rNode === r.container) { + r.destroy(); + break; + } + } + } + } + }); + if (r.container.parentNode) { + r.removeObserver.observe(r.container.parentNode, { + childList: true + }); + } + } else { + r.registerBinding(r.container, "DOMNodeRemoved", function(e) { + r.destroy(); + }); + } + var onResize = debounce_1(function() { + r.cy.resize(); + }, 100); + if (haveMutationsApi) { + r.styleObserver = new MutationObserver(onResize); + r.styleObserver.observe(r.container, { + attributes: true + }); + } + r.registerBinding(window, "resize", onResize); + if (haveResizeObserverApi) { + r.resizeObserver = new ResizeObserver(onResize); + r.resizeObserver.observe(r.container); + } + var forEachUp = function forEachUp2(domEle, fn2) { + while (domEle != null) { + fn2(domEle); + domEle = domEle.parentNode; + } + }; + var invalidateCoords = function invalidateCoords2() { + r.invalidateContainerClientCoordsCache(); + }; + forEachUp(r.container, function(domEle) { + r.registerBinding(domEle, "transitionend", invalidateCoords); + r.registerBinding(domEle, "animationend", invalidateCoords); + r.registerBinding(domEle, "scroll", invalidateCoords); + }); + r.registerBinding(r.container, "contextmenu", function(e) { + e.preventDefault(); + }); + var inBoxSelection = function inBoxSelection2() { + return r.selection[4] !== 0; + }; + var eventInContainer = function eventInContainer2(e) { + var containerPageCoords = r.findContainerClientCoords(); + var x = containerPageCoords[0]; + var y = containerPageCoords[1]; + var width = containerPageCoords[2]; + var height = containerPageCoords[3]; + var positions = e.touches ? e.touches : [e]; + var atLeastOnePosInside = false; + for (var i2 = 0; i2 < positions.length; i2++) { + var p2 = positions[i2]; + if (x <= p2.clientX && p2.clientX <= x + width && y <= p2.clientY && p2.clientY <= y + height) { + atLeastOnePosInside = true; + break; + } + } + if (!atLeastOnePosInside) { + return false; + } + var container = r.container; + var target = e.target; + var tParent = target.parentNode; + var containerIsTarget = false; + while (tParent) { + if (tParent === container) { + containerIsTarget = true; + break; + } + tParent = tParent.parentNode; + } + if (!containerIsTarget) { + return false; + } + return true; + }; + r.registerBinding(r.container, "mousedown", function mousedownHandler(e) { + if (!eventInContainer(e)) { + return; + } + e.preventDefault(); + blurActiveDomElement(); + r.hoverData.capture = true; + r.hoverData.which = e.which; + var cy = r.cy; + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var select = r.selection; + var nears = r.findNearestElements(pos[0], pos[1], true, false); + var near = nears[0]; + var draggedElements = r.dragData.possibleDragElements; + r.hoverData.mdownPos = pos; + r.hoverData.mdownGPos = gpos; + var checkForTaphold = function checkForTaphold2() { + r.hoverData.tapholdCancelled = false; + clearTimeout(r.hoverData.tapholdTimeout); + r.hoverData.tapholdTimeout = setTimeout(function() { + if (r.hoverData.tapholdCancelled) { + return; + } else { + var ele = r.hoverData.down; + if (ele) { + ele.emit({ + originalEvent: e, + type: "taphold", + position: { + x: pos[0], + y: pos[1] + } + }); + } else { + cy.emit({ + originalEvent: e, + type: "taphold", + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + }, r.tapholdDuration); + }; + if (e.which == 3) { + r.hoverData.cxtStarted = true; + var cxtEvt = { + originalEvent: e, + type: "cxttapstart", + position: { + x: pos[0], + y: pos[1] + } + }; + if (near) { + near.activate(); + near.emit(cxtEvt); + r.hoverData.down = near; + } else { + cy.emit(cxtEvt); + } + r.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); + r.hoverData.cxtDragged = false; + } else if (e.which == 1) { + if (near) { + near.activate(); + } + { + if (near != null) { + if (r.nodeIsGrabbable(near)) { + var makeEvent = function makeEvent2(type) { + return { + originalEvent: e, + type, + position: { + x: pos[0], + y: pos[1] + } + }; + }; + var triggerGrab = function triggerGrab2(ele) { + ele.emit(makeEvent("grab")); + }; + setGrabTarget(near); + if (!near.selected()) { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + addNodeToDrag(near, { + addToList: draggedElements + }); + near.emit(makeEvent("grabon")).emit(makeEvent("grab")); + } else { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + var selectedNodes = cy.$(function(ele) { + return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedElements + }); + near.emit(makeEvent("grabon")); + selectedNodes.forEach(triggerGrab); + } + r.redrawHint("eles", true); + r.redrawHint("drag", true); + } + } + r.hoverData.down = near; + r.hoverData.downs = nears; + r.hoverData.downTime = (/* @__PURE__ */ new Date()).getTime(); + } + triggerEvents(near, ["mousedown", "tapstart", "vmousedown"], e, { + x: pos[0], + y: pos[1] + }); + if (near == null) { + select[4] = 1; + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint("select", true); + r.redraw(); + } else if (near.pannable()) { + select[4] = 1; + } + checkForTaphold(); + } + select[0] = select[2] = pos[0]; + select[1] = select[3] = pos[1]; + }, false); + r.registerBinding(window, "mousemove", function mousemoveHandler(e) { + var capture = r.hoverData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var preventDefault = false; + var cy = r.cy; + var zoom = cy.zoom(); + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var mdownPos = r.hoverData.mdownPos; + var mdownGPos = r.hoverData.mdownGPos; + var select = r.selection; + var near = null; + if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) { + near = r.findNearestElement(pos[0], pos[1], true, false); + } + var last = r.hoverData.last; + var down = r.hoverData.down; + var disp = [pos[0] - select[2], pos[1] - select[3]]; + var draggedElements = r.dragData.possibleDragElements; + var isOverThresholdDrag; + if (mdownGPos) { + var dx = gpos[0] - mdownGPos[0]; + var dx2 = dx * dx; + var dy = gpos[1] - mdownGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2; + } + var multSelKeyDown = isMultSelKeyDown(e); + if (isOverThresholdDrag) { + r.hoverData.tapholdCancelled = true; + } + var updateDragDelta = function updateDragDelta2() { + var dragDelta2 = r.hoverData.dragDelta = r.hoverData.dragDelta || []; + if (dragDelta2.length === 0) { + dragDelta2.push(disp[0]); + dragDelta2.push(disp[1]); + } else { + dragDelta2[0] += disp[0]; + dragDelta2[1] += disp[1]; + } + }; + preventDefault = true; + triggerEvents(near, ["mousemove", "vmousemove", "tapdrag"], e, { + x: pos[0], + y: pos[1] + }); + var goIntoBoxMode = function goIntoBoxMode2() { + r.data.bgActivePosistion = void 0; + if (!r.hoverData.selecting) { + cy.emit({ + originalEvent: e, + type: "boxstart", + position: { + x: pos[0], + y: pos[1] + } + }); + } + select[4] = 1; + r.hoverData.selecting = true; + r.redrawHint("select", true); + r.redraw(); + }; + if (r.hoverData.which === 3) { + if (isOverThresholdDrag) { + var cxtEvt = { + originalEvent: e, + type: "cxtdrag", + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + r.hoverData.cxtDragged = true; + if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) { + if (r.hoverData.cxtOver) { + r.hoverData.cxtOver.emit({ + originalEvent: e, + type: "cxtdragout", + position: { + x: pos[0], + y: pos[1] + } + }); + } + r.hoverData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: "cxtdragover", + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + } + } else if (r.hoverData.dragging) { + preventDefault = true; + if (cy.panningEnabled() && cy.userPanningEnabled()) { + var deltaP; + if (r.hoverData.justStartedPan) { + var mdPos = r.hoverData.mdownPos; + deltaP = { + x: (pos[0] - mdPos[0]) * zoom, + y: (pos[1] - mdPos[1]) * zoom + }; + r.hoverData.justStartedPan = false; + } else { + deltaP = { + x: disp[0] * zoom, + y: disp[1] * zoom + }; + } + cy.panBy(deltaP); + cy.emit("dragpan"); + r.hoverData.dragged = true; + } + pos = r.projectIntoViewport(e.clientX, e.clientY); + } else if (select[4] == 1 && (down == null || down.pannable())) { + if (isOverThresholdDrag) { + if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) { + goIntoBoxMode(); + } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs); + if (allowPassthrough) { + r.hoverData.dragging = true; + r.hoverData.justStartedPan = true; + select[4] = 0; + r.data.bgActivePosistion = array2point(mdownPos); + r.redrawHint("select", true); + r.redraw(); + } + } + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + } + } else { + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + if ((!down || !down.grabbed()) && near != last) { + if (last) { + triggerEvents(last, ["mouseout", "tapdragout"], e, { + x: pos[0], + y: pos[1] + }); + } + if (near) { + triggerEvents(near, ["mouseover", "tapdragover"], e, { + x: pos[0], + y: pos[1] + }); + } + r.hoverData.last = near; + } + if (down) { + if (isOverThresholdDrag) { + if (cy.boxSelectionEnabled() && multSelKeyDown) { + if (down && down.grabbed()) { + freeDraggedElements(draggedElements); + down.emit("freeon"); + draggedElements.emit("free"); + if (r.dragData.didDrag) { + down.emit("dragfreeon"); + draggedElements.emit("dragfree"); + } + } + goIntoBoxMode(); + } else if (down && down.grabbed() && r.nodeIsDraggable(down)) { + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + r.redrawHint("eles", true); + } + r.dragData.didDrag = true; + if (!r.hoverData.draggingEles) { + addNodesToDrag(draggedElements, { + inDragLayer: true + }); + } + var totalShift = { + x: 0, + y: 0 + }; + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + var dragDelta = r.hoverData.dragDelta; + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedElements.silentShift(totalShift).emit("position drag"); + r.redrawHint("drag", true); + r.redraw(); + } + } else { + updateDragDelta(); + } + } + preventDefault = true; + } + select[2] = pos[0]; + select[3] = pos[1]; + if (preventDefault) { + if (e.stopPropagation) + e.stopPropagation(); + if (e.preventDefault) + e.preventDefault(); + return false; + } + }, false); + var clickTimeout, didDoubleClick, prevClickTimeStamp; + r.registerBinding(window, "mouseup", function mouseupHandler(e) { + var capture = r.hoverData.capture; + if (!capture) { + return; + } + r.hoverData.capture = false; + var cy = r.cy; + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var select = r.selection; + var near = r.findNearestElement(pos[0], pos[1], true, false); + var draggedElements = r.dragData.possibleDragElements; + var down = r.hoverData.down; + var multSelKeyDown = isMultSelKeyDown(e); + if (r.data.bgActivePosistion) { + r.redrawHint("select", true); + r.redraw(); + } + r.hoverData.tapholdCancelled = true; + r.data.bgActivePosistion = void 0; + if (down) { + down.unactivate(); + } + if (r.hoverData.which === 3) { + var cxtEvt = { + originalEvent: e, + type: "cxttapend", + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (!r.hoverData.cxtDragged) { + var cxtTap = { + originalEvent: e, + type: "cxttap", + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtTap); + } else { + cy.emit(cxtTap); + } + } + r.hoverData.cxtDragged = false; + r.hoverData.which = null; + } else if (r.hoverData.which === 1) { + triggerEvents(near, ["mouseup", "tapend", "vmouseup"], e, { + x: pos[0], + y: pos[1] + }); + if (!r.dragData.didDrag && // didn't move a node around + !r.hoverData.dragged && // didn't pan + !r.hoverData.selecting && // not box selection + !r.hoverData.isOverThresholdDrag) { + triggerEvents(down, ["click", "tap", "vclick"], e, { + x: pos[0], + y: pos[1] + }); + didDoubleClick = false; + if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { + clickTimeout && clearTimeout(clickTimeout); + didDoubleClick = true; + prevClickTimeStamp = null; + triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { + x: pos[0], + y: pos[1] + }); + } else { + clickTimeout = setTimeout(function() { + if (didDoubleClick) + return; + triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { + x: pos[0], + y: pos[1] + }); + }, cy.multiClickDebounceTime()); + prevClickTimeStamp = e.timeStamp; + } + } + if (down == null && !r.dragData.didDrag && !r.hoverData.selecting && !r.hoverData.dragged && !isMultSelKeyDown(e)) { + cy.$(isSelected).unselect(["tapunselect"]); + if (draggedElements.length > 0) { + r.redrawHint("eles", true); + } + r.dragData.possibleDragElements = draggedElements = cy.collection(); + } + if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) { + if (near != null && near._private.selectable) { + if (r.hoverData.dragging) + ; + else if (cy.selectionType() === "additive" || multSelKeyDown) { + if (near.selected()) { + near.unselect(["tapunselect"]); + } else { + near.select(["tapselect"]); + } + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(near).unselect(["tapunselect"]); + near.select(["tapselect"]); + } + } + r.redrawHint("eles", true); + } + } + if (r.hoverData.selecting) { + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + r.redrawHint("select", true); + if (box.length > 0) { + r.redrawHint("eles", true); + } + cy.emit({ + type: "boxend", + originalEvent: e, + position: { + x: pos[0], + y: pos[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected2(ele) { + return ele.selectable() && !ele.selected(); + }; + if (cy.selectionType() === "additive") { + box.emit("box").stdFilter(eleWouldBeSelected).select().emit("boxselect"); + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(box).unselect(); + } + box.emit("box").stdFilter(eleWouldBeSelected).select().emit("boxselect"); + } + r.redraw(); + } + if (r.hoverData.dragging) { + r.hoverData.dragging = false; + r.redrawHint("select", true); + r.redrawHint("eles", true); + r.redraw(); + } + if (!select[4]) { + r.redrawHint("drag", true); + r.redrawHint("eles", true); + var downWasGrabbed = down && down.grabbed(); + freeDraggedElements(draggedElements); + if (downWasGrabbed) { + down.emit("freeon"); + draggedElements.emit("free"); + if (r.dragData.didDrag) { + down.emit("dragfreeon"); + draggedElements.emit("dragfree"); + } + } + } + } + select[4] = 0; + r.hoverData.down = null; + r.hoverData.cxtStarted = false; + r.hoverData.draggingEles = false; + r.hoverData.selecting = false; + r.hoverData.isOverThresholdDrag = false; + r.dragData.didDrag = false; + r.hoverData.dragged = false; + r.hoverData.dragDelta = []; + r.hoverData.mdownPos = null; + r.hoverData.mdownGPos = null; + }, false); + var wheelHandler = function wheelHandler2(e) { + if (r.scrollingPage) { + return; + } + var cy = r.cy; + var zoom = cy.zoom(); + var pan = cy.pan(); + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y]; + if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) { + e.preventDefault(); + return; + } + if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) { + e.preventDefault(); + r.data.wheelZooming = true; + clearTimeout(r.data.wheelTimeout); + r.data.wheelTimeout = setTimeout(function() { + r.data.wheelZooming = false; + r.redrawHint("eles", true); + r.redraw(); + }, 150); + var diff; + if (e.deltaY != null) { + diff = e.deltaY / -250; + } else if (e.wheelDeltaY != null) { + diff = e.wheelDeltaY / 1e3; + } else { + diff = e.wheelDelta / 1e3; + } + diff = diff * r.wheelSensitivity; + var needsWheelFix = e.deltaMode === 1; + if (needsWheelFix) { + diff *= 33; + } + var newZoom = cy.zoom() * Math.pow(10, diff); + if (e.type === "gesturechange") { + newZoom = r.gestureStartZoom * e.scale; + } + cy.zoom({ + level: newZoom, + renderedPosition: { + x: rpos[0], + y: rpos[1] + } + }); + cy.emit(e.type === "gesturechange" ? "pinchzoom" : "scrollzoom"); + } + }; + r.registerBinding(r.container, "wheel", wheelHandler, true); + r.registerBinding(window, "scroll", function scrollHandler(e) { + r.scrollingPage = true; + clearTimeout(r.scrollingPageTimeout); + r.scrollingPageTimeout = setTimeout(function() { + r.scrollingPage = false; + }, 250); + }, true); + r.registerBinding(r.container, "gesturestart", function gestureStartHandler(e) { + r.gestureStartZoom = r.cy.zoom(); + if (!r.hasTouchStarted) { + e.preventDefault(); + } + }, true); + r.registerBinding(r.container, "gesturechange", function(e) { + if (!r.hasTouchStarted) { + wheelHandler(e); + } + }, true); + r.registerBinding(r.container, "mouseout", function mouseOutHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: "mouseout", + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + r.registerBinding(r.container, "mouseover", function mouseOverHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: "mouseover", + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + var f1x1, f1y1, f2x1, f2y1; + var distance1, distance1Sq; + var center1, modelCenter1; + var offsetLeft, offsetTop; + var containerWidth, containerHeight; + var twoFingersStartInside; + var distance = function distance2(x1, y1, x2, y2) { + return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); + }; + var distanceSq = function distanceSq2(x1, y1, x2, y2) { + return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); + }; + var touchstartHandler; + r.registerBinding(r.container, "touchstart", touchstartHandler = function touchstartHandler2(e) { + r.hasTouchStarted = true; + if (!eventInContainer(e)) { + return; + } + blurActiveDomElement(); + r.touchData.capture = true; + r.data.bgActivePosistion = void 0; + var cy = r.cy; + var now2 = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now2[0] = pos[0]; + now2[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now2[2] = pos[0]; + now2[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now2[4] = pos[0]; + now2[5] = pos[1]; + } + if (e.touches[1]) { + r.touchData.singleTouchMoved = true; + freeDraggedElements(r.dragData.touchDragEles); + var offsets = r.findContainerClientCoords(); + offsetLeft = offsets[0]; + offsetTop = offsets[1]; + containerWidth = offsets[2]; + containerHeight = offsets[3]; + f1x1 = e.touches[0].clientX - offsetLeft; + f1y1 = e.touches[0].clientY - offsetTop; + f2x1 = e.touches[1].clientX - offsetLeft; + f2y1 = e.touches[1].clientY - offsetTop; + twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight; + var pan = cy.pan(); + var zoom = cy.zoom(); + distance1 = distance(f1x1, f1y1, f2x1, f2y1); + distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1); + center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2]; + modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom]; + var cxtDistThreshold = 200; + var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; + if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) { + var near1 = r.findNearestElement(now2[0], now2[1], true, true); + var near2 = r.findNearestElement(now2[2], now2[3], true, true); + if (near1 && near1.isNode()) { + near1.activate().emit({ + originalEvent: e, + type: "cxttapstart", + position: { + x: now2[0], + y: now2[1] + } + }); + r.touchData.start = near1; + } else if (near2 && near2.isNode()) { + near2.activate().emit({ + originalEvent: e, + type: "cxttapstart", + position: { + x: now2[0], + y: now2[1] + } + }); + r.touchData.start = near2; + } else { + cy.emit({ + originalEvent: e, + type: "cxttapstart", + position: { + x: now2[0], + y: now2[1] + } + }); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = true; + r.touchData.cxtDragged = false; + r.data.bgActivePosistion = void 0; + r.redraw(); + return; + } + } + if (e.touches[2]) { + if (cy.boxSelectionEnabled()) { + e.preventDefault(); + } + } else if (e.touches[1]) + ; + else if (e.touches[0]) { + var nears = r.findNearestElements(now2[0], now2[1], true, true); + var near = nears[0]; + if (near != null) { + near.activate(); + r.touchData.start = near; + r.touchData.starts = nears; + if (r.nodeIsGrabbable(near)) { + var draggedEles = r.dragData.touchDragEles = cy.collection(); + var selectedNodes = null; + r.redrawHint("eles", true); + r.redrawHint("drag", true); + if (near.selected()) { + selectedNodes = cy.$(function(ele) { + return ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedEles + }); + } else { + addNodeToDrag(near, { + addToList: draggedEles + }); + } + setGrabTarget(near); + var makeEvent = function makeEvent2(type) { + return { + originalEvent: e, + type, + position: { + x: now2[0], + y: now2[1] + } + }; + }; + near.emit(makeEvent("grabon")); + if (selectedNodes) { + selectedNodes.forEach(function(n) { + n.emit(makeEvent("grab")); + }); + } else { + near.emit(makeEvent("grab")); + } + } + } + triggerEvents(near, ["touchstart", "tapstart", "vmousedown"], e, { + x: now2[0], + y: now2[1] + }); + if (near == null) { + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint("select", true); + r.redraw(); + } + r.touchData.singleTouchMoved = false; + r.touchData.singleTouchStartTime = +/* @__PURE__ */ new Date(); + clearTimeout(r.touchData.tapholdTimeout); + r.touchData.tapholdTimeout = setTimeout(function() { + if (r.touchData.singleTouchMoved === false && !r.pinching && !r.touchData.selecting) { + triggerEvents(r.touchData.start, ["taphold"], e, { + x: now2[0], + y: now2[1] + }); + } + }, r.tapholdDuration); + } + if (e.touches.length >= 1) { + var sPos = r.touchData.startPosition = []; + for (var i2 = 0; i2 < now2.length; i2++) { + sPos[i2] = earlier[i2] = now2[i2]; + } + var touch0 = e.touches[0]; + r.touchData.startGPosition = [touch0.clientX, touch0.clientY]; + } + }, false); + var touchmoveHandler; + r.registerBinding(window, "touchmove", touchmoveHandler = function touchmoveHandler2(e) { + var capture = r.touchData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var select = r.selection; + var cy = r.cy; + var now2 = r.touchData.now; + var earlier = r.touchData.earlier; + var zoom = cy.zoom(); + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now2[0] = pos[0]; + now2[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now2[2] = pos[0]; + now2[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now2[4] = pos[0]; + now2[5] = pos[1]; + } + var startGPos = r.touchData.startGPosition; + var isOverThresholdDrag; + if (capture && e.touches[0] && startGPos) { + var disp = []; + for (var j = 0; j < now2.length; j++) { + disp[j] = now2[j] - earlier[j]; + } + var dx = e.touches[0].clientX - startGPos[0]; + var dx2 = dx * dx; + var dy = e.touches[0].clientY - startGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + isOverThresholdDrag = dist2 >= r.touchTapThreshold2; + } + if (capture && r.touchData.cxt) { + e.preventDefault(); + var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; + var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2); + var factorSq = distance2Sq / distance1Sq; + var distThreshold = 150; + var distThresholdSq = distThreshold * distThreshold; + var factorThreshold = 1.5; + var factorThresholdSq = factorThreshold * factorThreshold; + if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) { + r.touchData.cxt = false; + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + var cxtEvt = { + originalEvent: e, + type: "cxttapend", + position: { + x: now2[0], + y: now2[1] + } + }; + if (r.touchData.start) { + r.touchData.start.unactivate().emit(cxtEvt); + r.touchData.start = null; + } else { + cy.emit(cxtEvt); + } + } + } + if (capture && r.touchData.cxt) { + var cxtEvt = { + originalEvent: e, + type: "cxtdrag", + position: { + x: now2[0], + y: now2[1] + } + }; + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + if (r.touchData.start) { + r.touchData.start.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxtDragged = true; + var near = r.findNearestElement(now2[0], now2[1], true, true); + if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) { + if (r.touchData.cxtOver) { + r.touchData.cxtOver.emit({ + originalEvent: e, + type: "cxtdragout", + position: { + x: now2[0], + y: now2[1] + } + }); + } + r.touchData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: "cxtdragover", + position: { + x: now2[0], + y: now2[1] + } + }); + } + } + } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) { + e.preventDefault(); + r.data.bgActivePosistion = void 0; + this.lastThreeTouch = +/* @__PURE__ */ new Date(); + if (!r.touchData.selecting) { + cy.emit({ + originalEvent: e, + type: "boxstart", + position: { + x: now2[0], + y: now2[1] + } + }); + } + r.touchData.selecting = true; + r.touchData.didSelect = true; + select[4] = 1; + if (!select || select.length === 0 || select[0] === void 0) { + select[0] = (now2[0] + now2[2] + now2[4]) / 3; + select[1] = (now2[1] + now2[3] + now2[5]) / 3; + select[2] = (now2[0] + now2[2] + now2[4]) / 3 + 1; + select[3] = (now2[1] + now2[3] + now2[5]) / 3 + 1; + } else { + select[2] = (now2[0] + now2[2] + now2[4]) / 3; + select[3] = (now2[1] + now2[3] + now2[5]) / 3; + } + r.redrawHint("select", true); + r.redraw(); + } else if (capture && e.touches[1] && !r.touchData.didSelect && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) { + e.preventDefault(); + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + var draggedEles = r.dragData.touchDragEles; + if (draggedEles) { + r.redrawHint("drag", true); + for (var i2 = 0; i2 < draggedEles.length; i2++) { + var de_p = draggedEles[i2]._private; + de_p.grabbed = false; + de_p.rscratch.inDragLayer = false; + } + } + var _start = r.touchData.start; + var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; + var distance2 = distance(f1x2, f1y2, f2x2, f2y2); + var factor = distance2 / distance1; + if (twoFingersStartInside) { + var df1x = f1x2 - f1x1; + var df1y = f1y2 - f1y1; + var df2x = f2x2 - f2x1; + var df2y = f2y2 - f2y1; + var tx = (df1x + df2x) / 2; + var ty = (df1y + df2y) / 2; + var zoom1 = cy.zoom(); + var zoom2 = zoom1 * factor; + var pan1 = cy.pan(); + var ctrx = modelCenter1[0] * zoom1 + pan1.x; + var ctry = modelCenter1[1] * zoom1 + pan1.y; + var pan2 = { + x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, + y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry + }; + if (_start && _start.active()) { + var draggedEles = r.dragData.touchDragEles; + freeDraggedElements(draggedEles); + r.redrawHint("drag", true); + r.redrawHint("eles", true); + _start.unactivate().emit("freeon"); + draggedEles.emit("free"); + if (r.dragData.didDrag) { + _start.emit("dragfreeon"); + draggedEles.emit("dragfree"); + } + } + cy.viewport({ + zoom: zoom2, + pan: pan2, + cancelOnFailedZoom: true + }); + cy.emit("pinchzoom"); + distance1 = distance2; + f1x1 = f1x2; + f1y1 = f1y2; + f2x1 = f2x2; + f2y1 = f2y2; + r.pinching = true; + } + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now2[0] = pos[0]; + now2[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now2[2] = pos[0]; + now2[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now2[4] = pos[0]; + now2[5] = pos[1]; + } + } else if (e.touches[0] && !r.touchData.didSelect) { + var start = r.touchData.start; + var last = r.touchData.last; + var near; + if (!r.hoverData.draggingEles && !r.swipePanning) { + near = r.findNearestElement(now2[0], now2[1], true, true); + } + if (capture && start != null) { + e.preventDefault(); + } + if (capture && start != null && r.nodeIsDraggable(start)) { + if (isOverThresholdDrag) { + var draggedEles = r.dragData.touchDragEles; + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + addNodesToDrag(draggedEles, { + inDragLayer: true + }); + } + r.dragData.didDrag = true; + var totalShift = { + x: 0, + y: 0 + }; + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + r.redrawHint("eles", true); + var dragDelta = r.touchData.dragDelta; + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedEles.silentShift(totalShift).emit("position drag"); + r.redrawHint("drag", true); + if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) { + r.redrawHint("eles", true); + } + r.redraw(); + } else { + var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + } + } + { + triggerEvents(start || near, ["touchmove", "tapdrag", "vmousemove"], e, { + x: now2[0], + y: now2[1] + }); + if ((!start || !start.grabbed()) && near != last) { + if (last) { + last.emit({ + originalEvent: e, + type: "tapdragout", + position: { + x: now2[0], + y: now2[1] + } + }); + } + if (near) { + near.emit({ + originalEvent: e, + type: "tapdragover", + position: { + x: now2[0], + y: now2[1] + } + }); + } + } + r.touchData.last = near; + } + if (capture) { + for (var i2 = 0; i2 < now2.length; i2++) { + if (now2[i2] && r.touchData.startPosition[i2] && isOverThresholdDrag) { + r.touchData.singleTouchMoved = true; + } + } + } + if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts); + if (allowPassthrough) { + e.preventDefault(); + if (!r.data.bgActivePosistion) { + r.data.bgActivePosistion = array2point(r.touchData.startPosition); + } + if (r.swipePanning) { + cy.panBy({ + x: disp[0] * zoom, + y: disp[1] * zoom + }); + cy.emit("dragpan"); + } else if (isOverThresholdDrag) { + r.swipePanning = true; + cy.panBy({ + x: dx * zoom, + y: dy * zoom + }); + cy.emit("dragpan"); + if (start) { + start.unactivate(); + r.redrawHint("select", true); + r.touchData.start = null; + } + } + } + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now2[0] = pos[0]; + now2[1] = pos[1]; + } + } + for (var j = 0; j < now2.length; j++) { + earlier[j] = now2[j]; + } + if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) { + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + r.redraw(); + } + }, false); + var touchcancelHandler; + r.registerBinding(window, "touchcancel", touchcancelHandler = function touchcancelHandler2(e) { + var start = r.touchData.start; + r.touchData.capture = false; + if (start) { + start.unactivate(); + } + }); + var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; + r.registerBinding(window, "touchend", touchendHandler = function touchendHandler2(e) { + var start = r.touchData.start; + var capture = r.touchData.capture; + if (capture) { + if (e.touches.length === 0) { + r.touchData.capture = false; + } + e.preventDefault(); + } else { + return; + } + var select = r.selection; + r.swipePanning = false; + r.hoverData.draggingEles = false; + var cy = r.cy; + var zoom = cy.zoom(); + var now2 = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now2[0] = pos[0]; + now2[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now2[2] = pos[0]; + now2[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now2[4] = pos[0]; + now2[5] = pos[1]; + } + if (start) { + start.unactivate(); + } + var ctxTapend; + if (r.touchData.cxt) { + ctxTapend = { + originalEvent: e, + type: "cxttapend", + position: { + x: now2[0], + y: now2[1] + } + }; + if (start) { + start.emit(ctxTapend); + } else { + cy.emit(ctxTapend); + } + if (!r.touchData.cxtDragged) { + var ctxTap = { + originalEvent: e, + type: "cxttap", + position: { + x: now2[0], + y: now2[1] + } + }; + if (start) { + start.emit(ctxTap); + } else { + cy.emit(ctxTap); + } + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = false; + r.touchData.start = null; + r.redraw(); + return; + } + if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) { + r.touchData.selecting = false; + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + select[0] = void 0; + select[1] = void 0; + select[2] = void 0; + select[3] = void 0; + select[4] = 0; + r.redrawHint("select", true); + cy.emit({ + type: "boxend", + originalEvent: e, + position: { + x: now2[0], + y: now2[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected2(ele) { + return ele.selectable() && !ele.selected(); + }; + box.emit("box").stdFilter(eleWouldBeSelected).select().emit("boxselect"); + if (box.nonempty()) { + r.redrawHint("eles", true); + } + r.redraw(); + } + if (start != null) { + start.unactivate(); + } + if (e.touches[2]) { + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + } else if (e.touches[1]) + ; + else if (e.touches[0]) + ; + else if (!e.touches[0]) { + r.data.bgActivePosistion = void 0; + r.redrawHint("select", true); + var draggedEles = r.dragData.touchDragEles; + if (start != null) { + var startWasGrabbed = start._private.grabbed; + freeDraggedElements(draggedEles); + r.redrawHint("drag", true); + r.redrawHint("eles", true); + if (startWasGrabbed) { + start.emit("freeon"); + draggedEles.emit("free"); + if (r.dragData.didDrag) { + start.emit("dragfreeon"); + draggedEles.emit("dragfree"); + } + } + triggerEvents(start, ["touchend", "tapend", "vmouseup", "tapdragout"], e, { + x: now2[0], + y: now2[1] + }); + start.unactivate(); + r.touchData.start = null; + } else { + var near = r.findNearestElement(now2[0], now2[1], true, true); + triggerEvents(near, ["touchend", "tapend", "vmouseup", "tapdragout"], e, { + x: now2[0], + y: now2[1] + }); + } + var dx = r.touchData.startPosition[0] - now2[0]; + var dx2 = dx * dx; + var dy = r.touchData.startPosition[1] - now2[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + var rdist2 = dist2 * zoom * zoom; + if (!r.touchData.singleTouchMoved) { + if (!start) { + cy.$(":selected").unselect(["tapunselect"]); + } + triggerEvents(start, ["tap", "vclick"], e, { + x: now2[0], + y: now2[1] + }); + didDoubleTouch = false; + if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { + touchTimeout && clearTimeout(touchTimeout); + didDoubleTouch = true; + prevTouchTimeStamp = null; + triggerEvents(start, ["dbltap", "vdblclick"], e, { + x: now2[0], + y: now2[1] + }); + } else { + touchTimeout = setTimeout(function() { + if (didDoubleTouch) + return; + triggerEvents(start, ["onetap", "voneclick"], e, { + x: now2[0], + y: now2[1] + }); + }, cy.multiClickDebounceTime()); + prevTouchTimeStamp = e.timeStamp; + } + } + if (start != null && !r.dragData.didDrag && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching) { + if (cy.selectionType() === "single") { + cy.$(isSelected).unmerge(start).unselect(["tapunselect"]); + start.select(["tapselect"]); + } else { + if (start.selected()) { + start.unselect(["tapunselect"]); + } else { + start.select(["tapselect"]); + } + } + r.redrawHint("eles", true); + } + r.touchData.singleTouchMoved = true; + } + for (var j = 0; j < now2.length; j++) { + earlier[j] = now2[j]; + } + r.dragData.didDrag = false; + if (e.touches.length === 0) { + r.touchData.dragDelta = []; + r.touchData.startPosition = null; + r.touchData.startGPosition = null; + r.touchData.didSelect = false; + } + if (e.touches.length < 2) { + if (e.touches.length === 1) { + r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY]; + } + r.pinching = false; + r.redrawHint("eles", true); + r.redraw(); + } + }, false); + if (typeof TouchEvent === "undefined") { + var pointers = []; + var makeTouch = function makeTouch2(e) { + return { + clientX: e.clientX, + clientY: e.clientY, + force: 1, + identifier: e.pointerId, + pageX: e.pageX, + pageY: e.pageY, + radiusX: e.width / 2, + radiusY: e.height / 2, + screenX: e.screenX, + screenY: e.screenY, + target: e.target + }; + }; + var makePointer = function makePointer2(e) { + return { + event: e, + touch: makeTouch(e) + }; + }; + var addPointer = function addPointer2(e) { + pointers.push(makePointer(e)); + }; + var removePointer = function removePointer2(e) { + for (var i2 = 0; i2 < pointers.length; i2++) { + var p2 = pointers[i2]; + if (p2.event.pointerId === e.pointerId) { + pointers.splice(i2, 1); + return; + } + } + }; + var updatePointer = function updatePointer2(e) { + var p2 = pointers.filter(function(p3) { + return p3.event.pointerId === e.pointerId; + })[0]; + p2.event = e; + p2.touch = makeTouch(e); + }; + var addTouchesToEvent = function addTouchesToEvent2(e) { + e.touches = pointers.map(function(p2) { + return p2.touch; + }); + }; + var pointerIsMouse = function pointerIsMouse2(e) { + return e.pointerType === "mouse" || e.pointerType === 4; + }; + r.registerBinding(r.container, "pointerdown", function(e) { + if (pointerIsMouse(e)) { + return; + } + e.preventDefault(); + addPointer(e); + addTouchesToEvent(e); + touchstartHandler(e); + }); + r.registerBinding(r.container, "pointerup", function(e) { + if (pointerIsMouse(e)) { + return; + } + removePointer(e); + addTouchesToEvent(e); + touchendHandler(e); + }); + r.registerBinding(r.container, "pointercancel", function(e) { + if (pointerIsMouse(e)) { + return; + } + removePointer(e); + addTouchesToEvent(e); + touchcancelHandler(e); + }); + r.registerBinding(r.container, "pointermove", function(e) { + if (pointerIsMouse(e)) { + return; + } + e.preventDefault(); + updatePointer(e); + addTouchesToEvent(e); + touchmoveHandler(e); + }); + } + }; + var BRp$2 = {}; + BRp$2.generatePolygon = function(name2, points) { + return this.nodeShapes[name2] = { + renderer: this, + name: name2, + points, + draw: function draw2(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl("polygon", context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding); + } + }; + }; + BRp$2.generateEllipse = function() { + return this.nodeShapes["ellipse"] = { + renderer: this, + name: "ellipse", + draw: function draw2(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return checkInEllipse(x, y, width, height, centerX, centerY, padding); + } + }; + }; + BRp$2.generateRoundPolygon = function(name2, points) { + var allPoints = new Array(points.length * 2); + for (var i2 = 0; i2 < points.length / 2; i2++) { + var sourceIndex = i2 * 2; + var destIndex = void 0; + if (i2 < points.length / 2 - 1) { + destIndex = (i2 + 1) * 2; + } else { + destIndex = 0; + } + allPoints[i2 * 4] = points[sourceIndex]; + allPoints[i2 * 4 + 1] = points[sourceIndex + 1]; + var xDest = points[destIndex] - points[sourceIndex]; + var yDest = points[destIndex + 1] - points[sourceIndex + 1]; + var norm = Math.sqrt(xDest * xDest + yDest * yDest); + allPoints[i2 * 4 + 2] = xDest / norm; + allPoints[i2 * 4 + 3] = yDest / norm; + } + return this.nodeShapes[name2] = { + renderer: this, + name: name2, + points: allPoints, + draw: function draw2(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl("round-polygon", context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height); + } + }; + }; + BRp$2.generateRoundRectangle = function() { + return this.nodeShapes["round-rectangle"] = this.nodeShapes["roundrectangle"] = { + renderer: this, + name: "round-rectangle", + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = cornerRadius * 2; + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + return false; + } + }; + }; + BRp$2.generateCutRectangle = function() { + return this.nodeShapes["cut-rectangle"] = this.nodeShapes["cutrectangle"] = { + renderer: this, + name: "cut-rectangle", + cornerLength: getCutRectangleCornerLength(), + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY) { + var cl = this.cornerLength; + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + return { + topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl], + topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl], + bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl], + bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl] + }; + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + var pts2 = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]); + return polygonIntersectLine(x, y, pts2, nodeX, nodeY); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * this.cornerLength, [0, -1], padding)) { + return true; + } + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * this.cornerLength, height, [0, -1], padding)) { + return true; + } + var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY); + return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft); + } + }; + }; + BRp$2.generateBarrel = function() { + return this.nodeShapes["barrel"] = { + renderer: this, + name: "barrel", + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var t0 = 0.15; + var t1 = 0.5; + var t2 = 0.85; + var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + var approximateBarrelCurvePts = function approximateBarrelCurvePts2(pts3) { + var m0 = qbezierPtAt({ + x: pts3[0], + y: pts3[1] + }, { + x: pts3[2], + y: pts3[3] + }, { + x: pts3[4], + y: pts3[5] + }, t0); + var m1 = qbezierPtAt({ + x: pts3[0], + y: pts3[1] + }, { + x: pts3[2], + y: pts3[3] + }, { + x: pts3[4], + y: pts3[5] + }, t1); + var m2 = qbezierPtAt({ + x: pts3[0], + y: pts3[1] + }, { + x: pts3[2], + y: pts3[3] + }, { + x: pts3[4], + y: pts3[5] + }, t2); + return [pts3[0], pts3[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts3[4], pts3[5]]; + }; + var pts2 = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft)); + return polygonIntersectLine(x, y, pts2, nodeX, nodeY); + }, + generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) { + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width; + var pts2 = { + topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin], + topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset], + bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd], + bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset] + }; + pts2.topLeft.isTop = true; + pts2.topRight.isTop = true; + pts2.bottomLeft.isBottom = true; + pts2.bottomRight.isBottom = true; + return pts2; + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) { + return true; + } + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) { + return true; + } + var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY); + var getCurveT = function getCurveT2(x2, y3, curvePts) { + var x0 = curvePts[4]; + var x1 = curvePts[2]; + var x22 = curvePts[0]; + var y02 = curvePts[5]; + var y22 = curvePts[1]; + var xMin = Math.min(x0, x22); + var xMax = Math.max(x0, x22); + var yMin = Math.min(y02, y22); + var yMax = Math.max(y02, y22); + if (xMin <= x2 && x2 <= xMax && yMin <= y3 && y3 <= yMax) { + var coeff = bezierPtsToQuadCoeff(x0, x1, x22); + var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x2); + var validRoots = roots.filter(function(r) { + return 0 <= r && r <= 1; + }); + if (validRoots.length > 0) { + return validRoots[0]; + } + } + return null; + }; + var curveRegions = Object.keys(barrelCurvePts); + for (var i2 = 0; i2 < curveRegions.length; i2++) { + var corner = curveRegions[i2]; + var cornerPts = barrelCurvePts[corner]; + var t = getCurveT(x, y, cornerPts); + if (t == null) { + continue; + } + var y0 = cornerPts[5]; + var y1 = cornerPts[3]; + var y2 = cornerPts[1]; + var bezY = qbezierAt(y0, y1, y2, t); + if (cornerPts.isTop && bezY <= y) { + return true; + } + if (cornerPts.isBottom && y <= bezY) { + return true; + } + } + return false; + } + }; + }; + BRp$2.generateBottomRoundrectangle = function() { + return this.nodeShapes["bottom-round-rectangle"] = this.nodeShapes["bottomroundrectangle"] = { + renderer: this, + name: "bottom-round-rectangle", + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw2(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var topStartX = nodeX - (width / 2 + padding); + var topStartY = nodeY - (height / 2 + padding); + var topEndY = topStartY; + var topEndX = nodeX + (width / 2 + padding); + var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (topIntersections.length > 0) { + return topIntersections; + } + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = 2 * cornerRadius; + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } + var outerWidth = width / 2 + 2 * padding; + var outerHeight = height / 2 + 2 * padding; + var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight]; + if (pointInsidePolygonPoints(x, y, points)) { + return true; + } + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + return false; + } + }; + }; + BRp$2.registerNodeShapes = function() { + var nodeShapes = this.nodeShapes = {}; + var renderer2 = this; + this.generateEllipse(); + this.generatePolygon("triangle", generateUnitNgonPointsFitToSquare(3, 0)); + this.generateRoundPolygon("round-triangle", generateUnitNgonPointsFitToSquare(3, 0)); + this.generatePolygon("rectangle", generateUnitNgonPointsFitToSquare(4, 0)); + nodeShapes["square"] = nodeShapes["rectangle"]; + this.generateRoundRectangle(); + this.generateCutRectangle(); + this.generateBarrel(); + this.generateBottomRoundrectangle(); + { + var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0]; + this.generatePolygon("diamond", diamondPoints); + this.generateRoundPolygon("round-diamond", diamondPoints); + } + this.generatePolygon("pentagon", generateUnitNgonPointsFitToSquare(5, 0)); + this.generateRoundPolygon("round-pentagon", generateUnitNgonPointsFitToSquare(5, 0)); + this.generatePolygon("hexagon", generateUnitNgonPointsFitToSquare(6, 0)); + this.generateRoundPolygon("round-hexagon", generateUnitNgonPointsFitToSquare(6, 0)); + this.generatePolygon("heptagon", generateUnitNgonPointsFitToSquare(7, 0)); + this.generateRoundPolygon("round-heptagon", generateUnitNgonPointsFitToSquare(7, 0)); + this.generatePolygon("octagon", generateUnitNgonPointsFitToSquare(8, 0)); + this.generateRoundPolygon("round-octagon", generateUnitNgonPointsFitToSquare(8, 0)); + var star5Points = new Array(20); + { + var outerPoints = generateUnitNgonPoints(5, 0); + var innerPoints = generateUnitNgonPoints(5, Math.PI / 5); + var innerRadius = 0.5 * (3 - Math.sqrt(5)); + innerRadius *= 1.57; + for (var i2 = 0; i2 < innerPoints.length / 2; i2++) { + innerPoints[i2 * 2] *= innerRadius; + innerPoints[i2 * 2 + 1] *= innerRadius; + } + for (var i2 = 0; i2 < 20 / 4; i2++) { + star5Points[i2 * 4] = outerPoints[i2 * 2]; + star5Points[i2 * 4 + 1] = outerPoints[i2 * 2 + 1]; + star5Points[i2 * 4 + 2] = innerPoints[i2 * 2]; + star5Points[i2 * 4 + 3] = innerPoints[i2 * 2 + 1]; + } + } + star5Points = fitPolygonToSquare(star5Points); + this.generatePolygon("star", star5Points); + this.generatePolygon("vee", [-1, -1, 0, -0.333, 1, -1, 0, 1]); + this.generatePolygon("rhomboid", [-1, -1, 0.333, -1, 1, 1, -0.333, 1]); + this.nodeShapes["concavehexagon"] = this.generatePolygon("concave-hexagon", [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); + { + var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; + this.generatePolygon("tag", tagPoints); + this.generateRoundPolygon("round-tag", tagPoints); + } + nodeShapes.makePolygon = function(points) { + var key = points.join("$"); + var name2 = "polygon-" + key; + var shape; + if (shape = this[name2]) { + return shape; + } + return renderer2.generatePolygon(name2, points); + }; + }; + var BRp$1 = {}; + BRp$1.timeToRender = function() { + return this.redrawTotalTime / this.redrawCount; + }; + BRp$1.redraw = function(options) { + options = options || staticEmptyObject(); + var r = this; + if (r.averageRedrawTime === void 0) { + r.averageRedrawTime = 0; + } + if (r.lastRedrawTime === void 0) { + r.lastRedrawTime = 0; + } + if (r.lastDrawTime === void 0) { + r.lastDrawTime = 0; + } + r.requestedFrame = true; + r.renderOptions = options; + }; + BRp$1.beforeRender = function(fn2, priority) { + if (this.destroyed) { + return; + } + if (priority == null) { + error("Priority is not optional for beforeRender"); + } + var cbs = this.beforeRenderCallbacks; + cbs.push({ + fn: fn2, + priority + }); + cbs.sort(function(a, b) { + return b.priority - a.priority; + }); + }; + var beforeRenderCallbacks = function beforeRenderCallbacks2(r, willDraw, startTime) { + var cbs = r.beforeRenderCallbacks; + for (var i2 = 0; i2 < cbs.length; i2++) { + cbs[i2].fn(willDraw, startTime); + } + }; + BRp$1.startRenderLoop = function() { + var r = this; + var cy = r.cy; + if (r.renderLoopStarted) { + return; + } else { + r.renderLoopStarted = true; + } + var renderFn = function renderFn2(requestTime) { + if (r.destroyed) { + return; + } + if (cy.batching()) + ; + else if (r.requestedFrame && !r.skipFrame) { + beforeRenderCallbacks(r, true, requestTime); + var startTime = performanceNow(); + r.render(r.renderOptions); + var endTime = r.lastDrawTime = performanceNow(); + if (r.averageRedrawTime === void 0) { + r.averageRedrawTime = endTime - startTime; + } + if (r.redrawCount === void 0) { + r.redrawCount = 0; + } + r.redrawCount++; + if (r.redrawTotalTime === void 0) { + r.redrawTotalTime = 0; + } + var duration = endTime - startTime; + r.redrawTotalTime += duration; + r.lastRedrawTime = duration; + r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; + r.requestedFrame = false; + } else { + beforeRenderCallbacks(r, false, requestTime); + } + r.skipFrame = false; + requestAnimationFrame2(renderFn2); + }; + requestAnimationFrame2(renderFn); + }; + var BaseRenderer = function BaseRenderer2(options) { + this.init(options); + }; + var BR = BaseRenderer; + var BRp = BR.prototype; + BRp.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; + BRp.init = function(options) { + var r = this; + r.options = options; + r.cy = options.cy; + var ctr = r.container = options.cy.container(); + if (window$1) { + var document2 = window$1.document; + var head = document2.head; + var stylesheetId = "__________cytoscape_stylesheet"; + var className = "__________cytoscape_container"; + var stylesheetAlreadyExists = document2.getElementById(stylesheetId) != null; + if (ctr.className.indexOf(className) < 0) { + ctr.className = (ctr.className || "") + " " + className; + } + if (!stylesheetAlreadyExists) { + var stylesheet2 = document2.createElement("style"); + stylesheet2.id = stylesheetId; + stylesheet2.innerHTML = "." + className + " { position: relative; }"; + head.insertBefore(stylesheet2, head.children[0]); + } + var computedStyle = window$1.getComputedStyle(ctr); + var position2 = computedStyle.getPropertyValue("position"); + if (position2 === "static") { + warn("A Cytoscape container has style position:static and so can not use UI extensions properly"); + } + } + r.selection = [void 0, void 0, void 0, void 0, 0]; + r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95]; + r.hoverData = { + down: null, + last: null, + downTime: null, + triggerMode: null, + dragging: false, + initialPan: [null, null], + capture: false + }; + r.dragData = { + possibleDragElements: [] + }; + r.touchData = { + start: null, + capture: false, + // These 3 fields related to tap, taphold events + startPosition: [null, null, null, null, null, null], + singleTouchStartTime: null, + singleTouchMoved: true, + now: [null, null, null, null, null, null], + earlier: [null, null, null, null, null, null] + }; + r.redraws = 0; + r.showFps = options.showFps; + r.debug = options.debug; + r.hideEdgesOnViewport = options.hideEdgesOnViewport; + r.textureOnViewport = options.textureOnViewport; + r.wheelSensitivity = options.wheelSensitivity; + r.motionBlurEnabled = options.motionBlur; + r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null; + r.motionBlur = options.motionBlur; + r.motionBlurOpacity = options.motionBlurOpacity; + r.motionBlurTransparency = 1 - r.motionBlurOpacity; + r.motionBlurPxRatio = 1; + r.mbPxRBlurry = 1; + r.minMbLowQualFrames = 4; + r.fullQualityMb = false; + r.clearedForMotionBlur = []; + r.desktopTapThreshold = options.desktopTapThreshold; + r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold; + r.touchTapThreshold = options.touchTapThreshold; + r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold; + r.tapholdDuration = 500; + r.bindings = []; + r.beforeRenderCallbacks = []; + r.beforeRenderPriorities = { + // higher priority execs before lower one + animations: 400, + eleCalcs: 300, + eleTxrDeq: 200, + lyrTxrDeq: 150, + lyrTxrSkip: 100 + }; + r.registerNodeShapes(); + r.registerArrowShapes(); + r.registerCalculationListeners(); + }; + BRp.notify = function(eventName, eles) { + var r = this; + var cy = r.cy; + if (this.destroyed) { + return; + } + if (eventName === "init") { + r.load(); + return; + } + if (eventName === "destroy") { + r.destroy(); + return; + } + if (eventName === "add" || eventName === "remove" || eventName === "move" && cy.hasCompoundNodes() || eventName === "load" || eventName === "zorder" || eventName === "mount") { + r.invalidateCachedZSortedEles(); + } + if (eventName === "viewport") { + r.redrawHint("select", true); + } + if (eventName === "load" || eventName === "resize" || eventName === "mount") { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + } + r.redrawHint("eles", true); + r.redrawHint("drag", true); + this.startRenderLoop(); + this.redraw(); + }; + BRp.destroy = function() { + var r = this; + r.destroyed = true; + r.cy.stopAnimationLoop(); + for (var i2 = 0; i2 < r.bindings.length; i2++) { + var binding = r.bindings[i2]; + var b = binding; + var tgt = b.target; + (tgt.off || tgt.removeEventListener).apply(tgt, b.args); + } + r.bindings = []; + r.beforeRenderCallbacks = []; + r.onUpdateEleCalcsFns = []; + if (r.removeObserver) { + r.removeObserver.disconnect(); + } + if (r.styleObserver) { + r.styleObserver.disconnect(); + } + if (r.resizeObserver) { + r.resizeObserver.disconnect(); + } + if (r.labelCalcDiv) { + try { + document.body.removeChild(r.labelCalcDiv); + } catch (e) { + } + } + }; + BRp.isHeadless = function() { + return false; + }; + [BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function(props) { + extend(BRp, props); + }); + var fullFpsTime = 1e3 / 60; + var defs = { + setupDequeueing: function setupDequeueing(opts) { + return function setupDequeueingImpl() { + var self2 = this; + var r = this.renderer; + if (self2.dequeueingSetup) { + return; + } else { + self2.dequeueingSetup = true; + } + var queueRedraw = debounce_1(function() { + r.redrawHint("eles", true); + r.redrawHint("drag", true); + r.redraw(); + }, opts.deqRedrawThreshold); + var dequeue = function dequeue2(willDraw, frameStartTime) { + var startTime = performanceNow(); + var avgRenderTime = r.averageRedrawTime; + var renderTime = r.lastRedrawTime; + var deqd = []; + var extent = r.cy.extent(); + var pixelRatio = r.getPixelRatio(); + if (!willDraw) { + r.flushRenderedStyleQueue(); + } + while (true) { + var now2 = performanceNow(); + var duration = now2 - startTime; + var frameDuration = now2 - frameStartTime; + if (renderTime < fullFpsTime) { + var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0); + if (frameDuration >= opts.deqFastCost * timeAvailable) { + break; + } + } else { + if (willDraw) { + if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) { + break; + } + } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) { + break; + } + } + var thisDeqd = opts.deq(self2, pixelRatio, extent); + if (thisDeqd.length > 0) { + for (var i2 = 0; i2 < thisDeqd.length; i2++) { + deqd.push(thisDeqd[i2]); + } + } else { + break; + } + } + if (deqd.length > 0) { + opts.onDeqd(self2, deqd); + if (!willDraw && opts.shouldRedraw(self2, deqd, pixelRatio, extent)) { + queueRedraw(); + } + } + }; + var priority = opts.priority || noop$1; + r.beforeRender(dequeue, priority(self2)); + }; + } + }; + var ElementTextureCacheLookup = /* @__PURE__ */ function() { + function ElementTextureCacheLookup2(getKey2) { + var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : falsify; + _classCallCheck(this, ElementTextureCacheLookup2); + this.idsByKey = new Map$2(); + this.keyForId = new Map$2(); + this.cachesByLvl = new Map$2(); + this.lvls = []; + this.getKey = getKey2; + this.doesEleInvalidateKey = doesEleInvalidateKey; + } + _createClass(ElementTextureCacheLookup2, [{ + key: "getIdsFor", + value: function getIdsFor(key) { + if (key == null) { + error("Can not get id list for null key"); + } + var idsByKey = this.idsByKey; + var ids = this.idsByKey.get(key); + if (!ids) { + ids = new Set$1(); + idsByKey.set(key, ids); + } + return ids; + } + }, { + key: "addIdForKey", + value: function addIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key).add(id); + } + } + }, { + key: "deleteIdForKey", + value: function deleteIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key)["delete"](id); + } + } + }, { + key: "getNumberOfIdsForKey", + value: function getNumberOfIdsForKey(key) { + if (key == null) { + return 0; + } else { + return this.getIdsFor(key).size; + } + } + }, { + key: "updateKeyMappingFor", + value: function updateKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var currKey = this.getKey(ele); + this.deleteIdForKey(prevKey, id); + this.addIdForKey(currKey, id); + this.keyForId.set(id, currKey); + } + }, { + key: "deleteKeyMappingFor", + value: function deleteKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + this.deleteIdForKey(prevKey, id); + this.keyForId["delete"](id); + } + }, { + key: "keyHasChangedFor", + value: function keyHasChangedFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var newKey = this.getKey(ele); + return prevKey !== newKey; + } + }, { + key: "isInvalid", + value: function isInvalid(ele) { + return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); + } + }, { + key: "getCachesAt", + value: function getCachesAt(lvl) { + var cachesByLvl = this.cachesByLvl, lvls = this.lvls; + var caches = cachesByLvl.get(lvl); + if (!caches) { + caches = new Map$2(); + cachesByLvl.set(lvl, caches); + lvls.push(lvl); + } + return caches; + } + }, { + key: "getCache", + value: function getCache(key, lvl) { + return this.getCachesAt(lvl).get(key); + } + }, { + key: "get", + value: function get2(ele, lvl) { + var key = this.getKey(ele); + var cache2 = this.getCache(key, lvl); + if (cache2 != null) { + this.updateKeyMappingFor(ele); + } + return cache2; + } + }, { + key: "getForCachedKey", + value: function getForCachedKey(ele, lvl) { + var key = this.keyForId.get(ele.id()); + var cache2 = this.getCache(key, lvl); + return cache2; + } + }, { + key: "hasCache", + value: function hasCache(key, lvl) { + return this.getCachesAt(lvl).has(key); + } + }, { + key: "has", + value: function has(ele, lvl) { + var key = this.getKey(ele); + return this.hasCache(key, lvl); + } + }, { + key: "setCache", + value: function setCache(key, lvl, cache2) { + cache2.key = key; + this.getCachesAt(lvl).set(key, cache2); + } + }, { + key: "set", + value: function set2(ele, lvl, cache2) { + var key = this.getKey(ele); + this.setCache(key, lvl, cache2); + this.updateKeyMappingFor(ele); + } + }, { + key: "deleteCache", + value: function deleteCache(key, lvl) { + this.getCachesAt(lvl)["delete"](key); + } + }, { + key: "delete", + value: function _delete(ele, lvl) { + var key = this.getKey(ele); + this.deleteCache(key, lvl); + } + }, { + key: "invalidateKey", + value: function invalidateKey(key) { + var _this = this; + this.lvls.forEach(function(lvl) { + return _this.deleteCache(key, lvl); + }); + } + // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) + }, { + key: "invalidate", + value: function invalidate(ele) { + var id = ele.id(); + var key = this.keyForId.get(id); + this.deleteKeyMappingFor(ele); + var entireKeyInvalidated = this.doesEleInvalidateKey(ele); + if (entireKeyInvalidated) { + this.invalidateKey(key); + } + return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; + } + }]); + return ElementTextureCacheLookup2; + }(); + var minTxrH = 25; + var txrStepH = 50; + var minLvl$1 = -4; + var maxLvl$1 = 3; + var maxZoom$1 = 7.99; + var eleTxrSpacing = 8; + var defTxrWidth = 1024; + var maxTxrW = 1024; + var maxTxrH = 1024; + var minUtility = 0.2; + var maxFullness = 0.8; + var maxFullnessChecks = 10; + var deqCost$1 = 0.15; + var deqAvgCost$1 = 0.1; + var deqNoDrawCost$1 = 0.9; + var deqFastCost$1 = 0.9; + var deqRedrawThreshold$1 = 100; + var maxDeqSize$1 = 1; + var getTxrReasons = { + dequeue: "dequeue", + downscale: "downscale", + highQuality: "highQuality" + }; + var initDefaults = defaults$g({ + getKey: null, + doesEleInvalidateKey: falsify, + drawElement: null, + getBoundingBox: null, + getRotationPoint: null, + getRotationOffset: null, + isVisible: trueify, + allowEdgeTxrCaching: true, + allowParentTxrCaching: true + }); + var ElementTextureCache = function ElementTextureCache2(renderer2, initOptions) { + var self2 = this; + self2.renderer = renderer2; + self2.onDequeues = []; + var opts = initDefaults(initOptions); + extend(self2, opts); + self2.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); + self2.setupDequeueing(); + }; + var ETCp = ElementTextureCache.prototype; + ETCp.reasons = getTxrReasons; + ETCp.getTextureQueue = function(txrH) { + var self2 = this; + self2.eleImgCaches = self2.eleImgCaches || {}; + return self2.eleImgCaches[txrH] = self2.eleImgCaches[txrH] || []; + }; + ETCp.getRetiredTextureQueue = function(txrH) { + var self2 = this; + var rtxtrQs = self2.eleImgCaches.retired = self2.eleImgCaches.retired || {}; + var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || []; + return rtxtrQ; + }; + ETCp.getElementQueue = function() { + var self2 = this; + var q = self2.eleCacheQueue = self2.eleCacheQueue || new heap(function(a, b) { + return b.reqs - a.reqs; + }); + return q; + }; + ETCp.getElementKeyToQueue = function() { + var self2 = this; + var k2q = self2.eleKeyToCacheQueue = self2.eleKeyToCacheQueue || {}; + return k2q; + }; + ETCp.getElement = function(ele, bb, pxRatio, lvl, reason) { + var self2 = this; + var r = this.renderer; + var zoom = r.cy.zoom(); + var lookup2 = this.lookup; + if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) { + return null; + } + if (!self2.allowEdgeTxrCaching && ele.isEdge() || !self2.allowParentTxrCaching && ele.isParent()) { + return null; + } + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + } + if (lvl < minLvl$1) { + lvl = minLvl$1; + } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) { + return null; + } + var scale = Math.pow(2, lvl); + var eleScaledH = bb.h * scale; + var eleScaledW = bb.w * scale; + var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale); + if (!this.isVisible(ele, scaledLabelShown)) { + return null; + } + var eleCache = lookup2.get(ele, lvl); + if (eleCache && eleCache.invalidated) { + eleCache.invalidated = false; + eleCache.texture.invalidatedWidth -= eleCache.width; + } + if (eleCache) { + return eleCache; + } + var txrH; + if (eleScaledH <= minTxrH) { + txrH = minTxrH; + } else if (eleScaledH <= txrStepH) { + txrH = txrStepH; + } else { + txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH; + } + if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) { + return null; + } + var txrQ = self2.getTextureQueue(txrH); + var txr = txrQ[txrQ.length - 2]; + var addNewTxr = function addNewTxr2() { + return self2.recycleTexture(txrH, eleScaledW) || self2.addTexture(txrH, eleScaledW); + }; + if (!txr) { + txr = txrQ[txrQ.length - 1]; + } + if (!txr) { + txr = addNewTxr(); + } + if (txr.width - txr.usedWidth < eleScaledW) { + txr = addNewTxr(); + } + var scalableFrom = function scalableFrom2(otherCache) { + return otherCache && otherCache.scaledLabelShown === scaledLabelShown; + }; + var deqing = reason && reason === getTxrReasons.dequeue; + var highQualityReq = reason && reason === getTxrReasons.highQuality; + var downscaleReq = reason && reason === getTxrReasons.downscale; + var higherCache; + for (var l = lvl + 1; l <= maxLvl$1; l++) { + var c = lookup2.get(ele, l); + if (c) { + higherCache = c; + break; + } + } + var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; + var downscale = function downscale2() { + txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH); + }; + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH); + if (scalableFrom(oneUpCache)) { + downscale(); + } else if (scalableFrom(higherCache)) { + if (highQualityReq) { + for (var _l = higherCache.level; _l > lvl; _l--) { + oneUpCache = self2.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale); + } + downscale(); + } else { + self2.queueElement(ele, higherCache.level - 1); + return higherCache; + } + } else { + var lowerCache; + if (!deqing && !highQualityReq && !downscaleReq) { + for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) { + var _c = lookup2.get(ele, _l2); + if (_c) { + lowerCache = _c; + break; + } + } + } + if (scalableFrom(lowerCache)) { + self2.queueElement(ele, lvl); + return lowerCache; + } + txr.context.translate(txr.usedWidth, 0); + txr.context.scale(scale, scale); + this.drawElement(txr.context, ele, bb, scaledLabelShown, false); + txr.context.scale(1 / scale, 1 / scale); + txr.context.translate(-txr.usedWidth, 0); + } + eleCache = { + x: txr.usedWidth, + texture: txr, + level: lvl, + scale, + width: eleScaledW, + height: eleScaledH, + scaledLabelShown + }; + txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing); + txr.eleCaches.push(eleCache); + lookup2.set(ele, lvl, eleCache); + self2.checkTextureFullness(txr); + return eleCache; + }; + ETCp.invalidateElements = function(eles) { + for (var i2 = 0; i2 < eles.length; i2++) { + this.invalidateElement(eles[i2]); + } + }; + ETCp.invalidateElement = function(ele) { + var self2 = this; + var lookup2 = self2.lookup; + var caches = []; + var invalid = lookup2.isInvalid(ele); + if (!invalid) { + return; + } + for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) { + var cache2 = lookup2.getForCachedKey(ele, lvl); + if (cache2) { + caches.push(cache2); + } + } + var noOtherElesUseCache = lookup2.invalidate(ele); + if (noOtherElesUseCache) { + for (var i2 = 0; i2 < caches.length; i2++) { + var _cache = caches[i2]; + var txr = _cache.texture; + txr.invalidatedWidth += _cache.width; + _cache.invalidated = true; + self2.checkTextureUtility(txr); + } + } + self2.removeFromQueue(ele); + }; + ETCp.checkTextureUtility = function(txr) { + if (txr.invalidatedWidth >= minUtility * txr.width) { + this.retireTexture(txr); + } + }; + ETCp.checkTextureFullness = function(txr) { + var self2 = this; + var txrQ = self2.getTextureQueue(txr.height); + if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) { + removeFromArray(txrQ, txr); + } else { + txr.fullnessChecks++; + } + }; + ETCp.retireTexture = function(txr) { + var self2 = this; + var txrH = txr.height; + var txrQ = self2.getTextureQueue(txrH); + var lookup2 = this.lookup; + removeFromArray(txrQ, txr); + txr.retired = true; + var eleCaches = txr.eleCaches; + for (var i2 = 0; i2 < eleCaches.length; i2++) { + var eleCache = eleCaches[i2]; + lookup2.deleteCache(eleCache.key, eleCache.level); + } + clearArray(eleCaches); + var rtxtrQ = self2.getRetiredTextureQueue(txrH); + rtxtrQ.push(txr); + }; + ETCp.addTexture = function(txrH, minW) { + var self2 = this; + var txrQ = self2.getTextureQueue(txrH); + var txr = {}; + txrQ.push(txr); + txr.eleCaches = []; + txr.height = txrH; + txr.width = Math.max(defTxrWidth, minW); + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + txr.canvas = self2.renderer.makeOffscreenCanvas(txr.width, txr.height); + txr.context = txr.canvas.getContext("2d"); + return txr; + }; + ETCp.recycleTexture = function(txrH, minW) { + var self2 = this; + var txrQ = self2.getTextureQueue(txrH); + var rtxtrQ = self2.getRetiredTextureQueue(txrH); + for (var i2 = 0; i2 < rtxtrQ.length; i2++) { + var txr = rtxtrQ[i2]; + if (txr.width >= minW) { + txr.retired = false; + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + clearArray(txr.eleCaches); + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(0, 0, txr.width, txr.height); + removeFromArray(rtxtrQ, txr); + txrQ.push(txr); + return txr; + } + } + }; + ETCp.queueElement = function(ele, lvl) { + var self2 = this; + var q = self2.getElementQueue(); + var k2q = self2.getElementKeyToQueue(); + var key = this.getKey(ele); + var existingReq = k2q[key]; + if (existingReq) { + existingReq.level = Math.max(existingReq.level, lvl); + existingReq.eles.merge(ele); + existingReq.reqs++; + q.updateItem(existingReq); + } else { + var req = { + eles: ele.spawn().merge(ele), + level: lvl, + reqs: 1, + key + }; + q.push(req); + k2q[key] = req; + } + }; + ETCp.dequeue = function(pxRatio) { + var self2 = this; + var q = self2.getElementQueue(); + var k2q = self2.getElementKeyToQueue(); + var dequeued = []; + var lookup2 = self2.lookup; + for (var i2 = 0; i2 < maxDeqSize$1; i2++) { + if (q.size() > 0) { + var req = q.pop(); + var key = req.key; + var ele = req.eles[0]; + var cacheExists = lookup2.hasCache(ele, req.level); + k2q[key] = null; + if (cacheExists) { + continue; + } + dequeued.push(req); + var bb = self2.getBoundingBox(ele); + self2.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue); + } else { + break; + } + } + return dequeued; + }; + ETCp.removeFromQueue = function(ele) { + var self2 = this; + var q = self2.getElementQueue(); + var k2q = self2.getElementKeyToQueue(); + var key = this.getKey(ele); + var req = k2q[key]; + if (req != null) { + if (req.eles.length === 1) { + req.reqs = MAX_INT$1; + q.updateItem(req); + q.pop(); + k2q[key] = null; + } else { + req.eles.unmerge(ele); + } + } + }; + ETCp.onDequeue = function(fn2) { + this.onDequeues.push(fn2); + }; + ETCp.offDequeue = function(fn2) { + removeFromArray(this.onDequeues, fn2); + }; + ETCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold$1, + deqCost: deqCost$1, + deqAvgCost: deqAvgCost$1, + deqNoDrawCost: deqNoDrawCost$1, + deqFastCost: deqFastCost$1, + deq: function deq(self2, pxRatio, extent) { + return self2.dequeue(pxRatio, extent); + }, + onDeqd: function onDeqd(self2, deqd) { + for (var i2 = 0; i2 < self2.onDequeues.length; i2++) { + var fn2 = self2.onDequeues[i2]; + fn2(deqd); + } + }, + shouldRedraw: function shouldRedraw(self2, deqd, pxRatio, extent) { + for (var i2 = 0; i2 < deqd.length; i2++) { + var eles = deqd[i2].eles; + for (var j = 0; j < eles.length; j++) { + var bb = eles[j].boundingBox(); + if (boundingBoxesIntersect(bb, extent)) { + return true; + } + } + } + return false; + }, + priority: function priority(self2) { + return self2.renderer.beforeRenderPriorities.eleTxrDeq; + } + }); + var defNumLayers = 1; + var minLvl = -4; + var maxLvl = 2; + var maxZoom = 3.99; + var deqRedrawThreshold = 50; + var refineEleDebounceTime = 50; + var deqCost = 0.15; + var deqAvgCost = 0.1; + var deqNoDrawCost = 0.9; + var deqFastCost = 0.9; + var maxDeqSize = 1; + var invalidThreshold = 250; + var maxLayerArea = 4e3 * 4e3; + var useHighQualityEleTxrReqs = true; + var LayeredTextureCache = function LayeredTextureCache2(renderer2) { + var self2 = this; + var r = self2.renderer = renderer2; + var cy = r.cy; + self2.layersByLevel = {}; + self2.firstGet = true; + self2.lastInvalidationTime = performanceNow() - 2 * invalidThreshold; + self2.skipping = false; + self2.eleTxrDeqs = cy.collection(); + self2.scheduleElementRefinement = debounce_1(function() { + self2.refineElementTextures(self2.eleTxrDeqs); + self2.eleTxrDeqs.unmerge(self2.eleTxrDeqs); + }, refineEleDebounceTime); + r.beforeRender(function(willDraw, now2) { + if (now2 - self2.lastInvalidationTime <= invalidThreshold) { + self2.skipping = true; + } else { + self2.skipping = false; + } + }, r.beforeRenderPriorities.lyrTxrSkip); + var qSort = function qSort2(a, b) { + return b.reqs - a.reqs; + }; + self2.layersQueue = new heap(qSort); + self2.setupDequeueing(); + }; + var LTCp = LayeredTextureCache.prototype; + var layerIdPool = 0; + var MAX_INT = Math.pow(2, 53) - 1; + LTCp.makeLayer = function(bb, lvl) { + var scale = Math.pow(2, lvl); + var w = Math.ceil(bb.w * scale); + var h = Math.ceil(bb.h * scale); + var canvas = this.renderer.makeOffscreenCanvas(w, h); + var layer = { + id: layerIdPool = ++layerIdPool % MAX_INT, + bb, + level: lvl, + width: w, + height: h, + canvas, + context: canvas.getContext("2d"), + eles: [], + elesQueue: [], + reqs: 0 + }; + var cxt = layer.context; + var dx = -layer.bb.x1; + var dy = -layer.bb.y1; + cxt.scale(scale, scale); + cxt.translate(dx, dy); + return layer; + }; + LTCp.getLayers = function(eles, pxRatio, lvl) { + var self2 = this; + var r = self2.renderer; + var cy = r.cy; + var zoom = cy.zoom(); + var firstGet = self2.firstGet; + self2.firstGet = false; + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + if (lvl < minLvl) { + lvl = minLvl; + } else if (zoom >= maxZoom || lvl > maxLvl) { + return null; + } + } + self2.validateLayersElesOrdering(lvl, eles); + var layersByLvl = self2.layersByLevel; + var scale = Math.pow(2, lvl); + var layers = layersByLvl[lvl] = layersByLvl[lvl] || []; + var bb; + var lvlComplete = self2.levelIsComplete(lvl, eles); + var tmpLayers; + var checkTempLevels = function checkTempLevels2() { + var canUseAsTmpLvl = function canUseAsTmpLvl2(l) { + self2.validateLayersElesOrdering(l, eles); + if (self2.levelIsComplete(l, eles)) { + tmpLayers = layersByLvl[l]; + return true; + } + }; + var checkLvls = function checkLvls2(dir) { + if (tmpLayers) { + return; + } + for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) { + if (canUseAsTmpLvl(l)) { + break; + } + } + }; + checkLvls(1); + checkLvls(-1); + for (var i3 = layers.length - 1; i3 >= 0; i3--) { + var layer2 = layers[i3]; + if (layer2.invalid) { + removeFromArray(layers, layer2); + } + } + }; + if (!lvlComplete) { + checkTempLevels(); + } else { + return layers; + } + var getBb = function getBb2() { + if (!bb) { + bb = makeBoundingBox(); + for (var i3 = 0; i3 < eles.length; i3++) { + updateBoundingBox(bb, eles[i3].boundingBox()); + } + } + return bb; + }; + var makeLayer = function makeLayer2(opts) { + opts = opts || {}; + var after = opts.after; + getBb(); + var area = bb.w * scale * (bb.h * scale); + if (area > maxLayerArea) { + return null; + } + var layer2 = self2.makeLayer(bb, lvl); + if (after != null) { + var index = layers.indexOf(after) + 1; + layers.splice(index, 0, layer2); + } else if (opts.insert === void 0 || opts.insert) { + layers.unshift(layer2); + } + return layer2; + }; + if (self2.skipping && !firstGet) { + return null; + } + var layer = null; + var maxElesPerLayer = eles.length / defNumLayers; + var allowLazyQueueing = !firstGet; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + var existingLayer = caches[lvl]; + if (existingLayer) { + layer = existingLayer; + continue; + } + if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) { + layer = makeLayer({ + insert: true, + after: layer + }); + if (!layer) { + return null; + } + } + if (tmpLayers || allowLazyQueueing) { + self2.queueLayer(layer, ele); + } else { + self2.drawEleInLayer(layer, ele, lvl, pxRatio); + } + layer.eles.push(ele); + caches[lvl] = layer; + } + if (tmpLayers) { + return tmpLayers; + } + if (allowLazyQueueing) { + return null; + } + return layers; + }; + LTCp.getEleLevelForLayerLevel = function(lvl, pxRatio) { + return lvl; + }; + LTCp.drawEleInLayer = function(layer, ele, lvl, pxRatio) { + var self2 = this; + var r = this.renderer; + var context = layer.context; + var bb = ele.boundingBox(); + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + lvl = self2.getEleLevelForLayerLevel(lvl, pxRatio); + { + r.setImgSmoothing(context, false); + } + { + r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs); + } + { + r.setImgSmoothing(context, true); + } + }; + LTCp.levelIsComplete = function(lvl, eles) { + var self2 = this; + var layers = self2.layersByLevel[lvl]; + if (!layers || layers.length === 0) { + return false; + } + var numElesInLayers = 0; + for (var i2 = 0; i2 < layers.length; i2++) { + var layer = layers[i2]; + if (layer.reqs > 0) { + return false; + } + if (layer.invalid) { + return false; + } + numElesInLayers += layer.eles.length; + } + if (numElesInLayers !== eles.length) { + return false; + } + return true; + }; + LTCp.validateLayersElesOrdering = function(lvl, eles) { + var layers = this.layersByLevel[lvl]; + if (!layers) { + return; + } + for (var i2 = 0; i2 < layers.length; i2++) { + var layer = layers[i2]; + var offset = -1; + for (var j = 0; j < eles.length; j++) { + if (layer.eles[0] === eles[j]) { + offset = j; + break; + } + } + if (offset < 0) { + this.invalidateLayer(layer); + continue; + } + var o = offset; + for (var j = 0; j < layer.eles.length; j++) { + if (layer.eles[j] !== eles[o + j]) { + this.invalidateLayer(layer); + break; + } + } + } + }; + LTCp.updateElementsInLayers = function(eles, update2) { + var self2 = this; + var isEles = element(eles[0]); + for (var i2 = 0; i2 < eles.length; i2++) { + var req = isEles ? null : eles[i2]; + var ele = isEles ? eles[i2] : eles[i2].ele; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + for (var l = minLvl; l <= maxLvl; l++) { + var layer = caches[l]; + if (!layer) { + continue; + } + if (req && self2.getEleLevelForLayerLevel(layer.level) !== req.level) { + continue; + } + update2(layer, ele, req); + } + } + }; + LTCp.haveLayers = function() { + var self2 = this; + var haveLayers = false; + for (var l = minLvl; l <= maxLvl; l++) { + var layers = self2.layersByLevel[l]; + if (layers && layers.length > 0) { + haveLayers = true; + break; + } + } + return haveLayers; + }; + LTCp.invalidateElements = function(eles) { + var self2 = this; + if (eles.length === 0) { + return; + } + self2.lastInvalidationTime = performanceNow(); + if (eles.length === 0 || !self2.haveLayers()) { + return; + } + self2.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) { + self2.invalidateLayer(layer); + }); + }; + LTCp.invalidateLayer = function(layer) { + this.lastInvalidationTime = performanceNow(); + if (layer.invalid) { + return; + } + var lvl = layer.level; + var eles = layer.eles; + var layers = this.layersByLevel[lvl]; + removeFromArray(layers, layer); + layer.elesQueue = []; + layer.invalid = true; + if (layer.replacement) { + layer.replacement.invalid = true; + } + for (var i2 = 0; i2 < eles.length; i2++) { + var caches = eles[i2]._private.rscratch.imgLayerCaches; + if (caches) { + caches[lvl] = null; + } + } + }; + LTCp.refineElementTextures = function(eles) { + var self2 = this; + self2.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) { + var rLyr = layer.replacement; + if (!rLyr) { + rLyr = layer.replacement = self2.makeLayer(layer.bb, layer.level); + rLyr.replaces = layer; + rLyr.eles = layer.eles; + } + if (!rLyr.reqs) { + for (var i2 = 0; i2 < rLyr.eles.length; i2++) { + self2.queueLayer(rLyr, rLyr.eles[i2]); + } + } + }); + }; + LTCp.enqueueElementRefinement = function(ele) { + this.eleTxrDeqs.merge(ele); + this.scheduleElementRefinement(); + }; + LTCp.queueLayer = function(layer, ele) { + var self2 = this; + var q = self2.layersQueue; + var elesQ = layer.elesQueue; + var hasId = elesQ.hasId = elesQ.hasId || {}; + if (layer.replacement) { + return; + } + if (ele) { + if (hasId[ele.id()]) { + return; + } + elesQ.push(ele); + hasId[ele.id()] = true; + } + if (layer.reqs) { + layer.reqs++; + q.updateItem(layer); + } else { + layer.reqs = 1; + q.push(layer); + } + }; + LTCp.dequeue = function(pxRatio) { + var self2 = this; + var q = self2.layersQueue; + var deqd = []; + var eleDeqs = 0; + while (eleDeqs < maxDeqSize) { + if (q.size() === 0) { + break; + } + var layer = q.peek(); + if (layer.replacement) { + q.pop(); + continue; + } + if (layer.replaces && layer !== layer.replaces.replacement) { + q.pop(); + continue; + } + if (layer.invalid) { + q.pop(); + continue; + } + var ele = layer.elesQueue.shift(); + if (ele) { + self2.drawEleInLayer(layer, ele, layer.level, pxRatio); + eleDeqs++; + } + if (deqd.length === 0) { + deqd.push(true); + } + if (layer.elesQueue.length === 0) { + q.pop(); + layer.reqs = 0; + if (layer.replaces) { + self2.applyLayerReplacement(layer); + } + self2.requestRedraw(); + } + } + return deqd; + }; + LTCp.applyLayerReplacement = function(layer) { + var self2 = this; + var layersInLevel = self2.layersByLevel[layer.level]; + var replaced = layer.replaces; + var index = layersInLevel.indexOf(replaced); + if (index < 0 || replaced.invalid) { + return; + } + layersInLevel[index] = layer; + for (var i2 = 0; i2 < layer.eles.length; i2++) { + var _p = layer.eles[i2]._private; + var cache2 = _p.imgLayerCaches = _p.imgLayerCaches || {}; + if (cache2) { + cache2[layer.level] = layer; + } + } + self2.requestRedraw(); + }; + LTCp.requestRedraw = debounce_1(function() { + var r = this.renderer; + r.redrawHint("eles", true); + r.redrawHint("drag", true); + r.redraw(); + }, 100); + LTCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold, + deqCost, + deqAvgCost, + deqNoDrawCost, + deqFastCost, + deq: function deq(self2, pxRatio) { + return self2.dequeue(pxRatio); + }, + onDeqd: noop$1, + shouldRedraw: trueify, + priority: function priority(self2) { + return self2.renderer.beforeRenderPriorities.lyrTxrDeq; + } + }); + var CRp$a = {}; + var impl; + function polygon(context, points) { + for (var i2 = 0; i2 < points.length; i2++) { + var pt = points[i2]; + context.lineTo(pt.x, pt.y); + } + } + function triangleBackcurve(context, points, controlPoint) { + var firstPt; + for (var i2 = 0; i2 < points.length; i2++) { + var pt = points[i2]; + if (i2 === 0) { + firstPt = pt; + } + context.lineTo(pt.x, pt.y); + } + context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y); + } + function triangleTee(context, trianglePoints, teePoints) { + if (context.beginPath) { + context.beginPath(); + } + var triPts = trianglePoints; + for (var i2 = 0; i2 < triPts.length; i2++) { + var pt = triPts[i2]; + context.lineTo(pt.x, pt.y); + } + var teePts = teePoints; + var firstTeePt = teePoints[0]; + context.moveTo(firstTeePt.x, firstTeePt.y); + for (var i2 = 1; i2 < teePts.length; i2++) { + var pt = teePts[i2]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } + } + function circleTriangle(context, trianglePoints, rx, ry, r) { + if (context.beginPath) { + context.beginPath(); + } + context.arc(rx, ry, r, 0, Math.PI * 2, false); + var triPts = trianglePoints; + var firstTrPt = triPts[0]; + context.moveTo(firstTrPt.x, firstTrPt.y); + for (var i2 = 0; i2 < triPts.length; i2++) { + var pt = triPts[i2]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } + } + function circle(context, rx, ry, r) { + context.arc(rx, ry, r, 0, Math.PI * 2, false); + } + CRp$a.arrowShapeImpl = function(name2) { + return (impl || (impl = { + "polygon": polygon, + "triangle-backcurve": triangleBackcurve, + "triangle-tee": triangleTee, + "circle-triangle": circleTriangle, + "triangle-cross": triangleTee, + "circle": circle + }))[name2]; + }; + var CRp$9 = {}; + CRp$9.drawElement = function(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) { + var r = this; + if (ele.isNode()) { + r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } else { + r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } + }; + CRp$9.drawElementOverlay = function(context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeOverlay(context, ele); + } else { + r.drawEdgeOverlay(context, ele); + } + }; + CRp$9.drawElementUnderlay = function(context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeUnderlay(context, ele); + } else { + r.drawEdgeUnderlay(context, ele); + } + }; + CRp$9.drawCachedElementPortion = function(context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity2) { + var r = this; + var bb = eleTxrCache.getBoundingBox(ele); + if (bb.w === 0 || bb.h === 0) { + return; + } + var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason); + if (eleCache != null) { + var opacity = getOpacity2(r, ele); + if (opacity === 0) { + return; + } + var theta = getRotation(r, ele); + var x1 = bb.x1, y1 = bb.y1, w = bb.w, h = bb.h; + var x, y, sx, sy, smooth; + if (theta !== 0) { + var rotPt = eleTxrCache.getRotationPoint(ele); + sx = rotPt.x; + sy = rotPt.y; + context.translate(sx, sy); + context.rotate(theta); + smooth = r.getImgSmoothing(context); + if (!smooth) { + r.setImgSmoothing(context, true); + } + var off = eleTxrCache.getRotationOffset(ele); + x = off.x; + y = off.y; + } else { + x = x1; + y = y1; + } + var oldGlobalAlpha; + if (opacity !== 1) { + oldGlobalAlpha = context.globalAlpha; + context.globalAlpha = oldGlobalAlpha * opacity; + } + context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h); + if (opacity !== 1) { + context.globalAlpha = oldGlobalAlpha; + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-sx, -sy); + if (!smooth) { + r.setImgSmoothing(context, false); + } + } + } else { + eleTxrCache.drawElement(context, ele); + } + }; + var getZeroRotation = function getZeroRotation2() { + return 0; + }; + var getLabelRotation = function getLabelRotation2(r, ele) { + return r.getTextAngle(ele, null); + }; + var getSourceLabelRotation = function getSourceLabelRotation2(r, ele) { + return r.getTextAngle(ele, "source"); + }; + var getTargetLabelRotation = function getTargetLabelRotation2(r, ele) { + return r.getTextAngle(ele, "target"); + }; + var getOpacity = function getOpacity2(r, ele) { + return ele.effectiveOpacity(); + }; + var getTextOpacity = function getTextOpacity2(e, ele) { + return ele.pstyle("text-opacity").pfValue * ele.effectiveOpacity(); + }; + CRp$9.drawCachedElement = function(context, ele, pxRatio, extent, lvl, requestHighQuality) { + var r = this; + var _r$data = r.data, eleTxrCache = _r$data.eleTxrCache, lblTxrCache = _r$data.lblTxrCache, slbTxrCache = _r$data.slbTxrCache, tlbTxrCache = _r$data.tlbTxrCache; + var bb = ele.boundingBox(); + var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + if (!extent || boundingBoxesIntersect(bb, extent)) { + var isEdge = ele.isEdge(); + var badLine = ele.element()._private.rscratch.badLine; + r.drawElementUnderlay(context, ele); + r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity); + if (!isEdge || !badLine) { + r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity); + } + if (isEdge && !badLine) { + r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity); + r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity); + } + r.drawElementOverlay(context, ele); + } + }; + CRp$9.drawElements = function(context, eles) { + var r = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + r.drawElement(context, ele); + } + }; + CRp$9.drawCachedElements = function(context, eles, pxRatio, extent) { + var r = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + CRp$9.drawCachedNodes = function(context, eles, pxRatio, extent) { + var r = this; + for (var i2 = 0; i2 < eles.length; i2++) { + var ele = eles[i2]; + if (!ele.isNode()) { + continue; + } + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + CRp$9.drawLayeredElements = function(context, eles, pxRatio, extent) { + var r = this; + var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio); + if (layers) { + for (var i2 = 0; i2 < layers.length; i2++) { + var layer = layers[i2]; + var bb = layer.bb; + if (bb.w === 0 || bb.h === 0) { + continue; + } + context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h); + } + } else { + r.drawCachedElements(context, eles, pxRatio, extent); + } + }; + var CRp$8 = {}; + CRp$8.drawEdge = function(context, edge, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + var r = this; + var rs = edge._private.rscratch; + if (shouldDrawOpacity && !edge.visible()) { + return; + } + if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) { + return; + } + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + var opacity = shouldDrawOpacity ? edge.pstyle("opacity").value : 1; + var lineOpacity = shouldDrawOpacity ? edge.pstyle("line-opacity").value : 1; + var curveStyle = edge.pstyle("curve-style").value; + var lineStyle = edge.pstyle("line-style").value; + var edgeWidth = edge.pstyle("width").pfValue; + var lineCap = edge.pstyle("line-cap").value; + var effectiveLineOpacity = opacity * lineOpacity; + var effectiveArrowOpacity = opacity * lineOpacity; + var drawLine = function drawLine2() { + var strokeOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : effectiveLineOpacity; + if (curveStyle === "straight-triangle") { + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgeTrianglePath(edge, context, rs.allpts); + } else { + context.lineWidth = edgeWidth; + context.lineCap = lineCap; + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgePath(edge, context, rs.allpts, lineStyle); + context.lineCap = "butt"; + } + }; + var drawOverlay = function drawOverlay2() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeOverlay(context, edge); + }; + var drawUnderlay = function drawUnderlay2() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeUnderlay(context, edge); + }; + var drawArrows = function drawArrows2() { + var arrowOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : effectiveArrowOpacity; + r.drawArrowheads(context, edge, arrowOpacity); + }; + var drawText = function drawText2() { + r.drawElementText(context, edge, null, drawLabel); + }; + context.lineJoin = "round"; + var ghost = edge.pstyle("ghost").value === "yes"; + if (ghost) { + var gx = edge.pstyle("ghost-offset-x").pfValue; + var gy = edge.pstyle("ghost-offset-y").pfValue; + var ghostOpacity = edge.pstyle("ghost-opacity").value; + var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; + context.translate(gx, gy); + drawLine(effectiveGhostOpacity); + drawArrows(effectiveGhostOpacity); + context.translate(-gx, -gy); + } + drawUnderlay(); + drawLine(); + drawArrows(); + drawOverlay(); + drawText(); + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + var drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay2(overlayOrUnderlay) { + if (!["overlay", "underlay"].includes(overlayOrUnderlay)) { + throw new Error("Invalid state"); + } + return function(context, edge) { + if (!edge.visible()) { + return; + } + var opacity = edge.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + if (opacity === 0) { + return; + } + var r = this; + var usePaths = r.usePaths(); + var rs = edge._private.rscratch; + var padding = edge.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var width = 2 * padding; + var color = edge.pstyle("".concat(overlayOrUnderlay, "-color")).value; + context.lineWidth = width; + if (rs.edgeType === "self" && !usePaths) { + context.lineCap = "butt"; + } else { + context.lineCap = "round"; + } + r.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + r.drawEdgePath(edge, context, rs.allpts, "solid"); + }; + }; + CRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay("overlay"); + CRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay("underlay"); + CRp$8.drawEdgePath = function(edge, context, pts2, type) { + var rs = edge._private.rscratch; + var canvasCxt = context; + var path; + var pathCacheHit = false; + var usePaths = this.usePaths(); + var lineDashPattern = edge.pstyle("line-dash-pattern").pfValue; + var lineDashOffset = edge.pstyle("line-dash-offset").pfValue; + if (usePaths) { + var pathCacheKey = pts2.join("$"); + var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; + if (keyMatches) { + path = context = rs.pathCache; + pathCacheHit = true; + } else { + path = context = new Path2D(); + rs.pathCacheKey = pathCacheKey; + rs.pathCache = path; + } + } + if (canvasCxt.setLineDash) { + switch (type) { + case "dotted": + canvasCxt.setLineDash([1, 1]); + break; + case "dashed": + canvasCxt.setLineDash(lineDashPattern); + canvasCxt.lineDashOffset = lineDashOffset; + break; + case "solid": + canvasCxt.setLineDash([]); + break; + } + } + if (!pathCacheHit && !rs.badLine) { + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(pts2[0], pts2[1]); + switch (rs.edgeType) { + case "bezier": + case "self": + case "compound": + case "multibezier": + for (var i2 = 2; i2 + 3 < pts2.length; i2 += 4) { + context.quadraticCurveTo(pts2[i2], pts2[i2 + 1], pts2[i2 + 2], pts2[i2 + 3]); + } + break; + case "straight": + case "segments": + case "haystack": + for (var _i = 2; _i + 1 < pts2.length; _i += 2) { + context.lineTo(pts2[_i], pts2[_i + 1]); + } + break; + } + } + context = canvasCxt; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + if (context.setLineDash) { + context.setLineDash([]); + } + }; + CRp$8.drawEdgeTrianglePath = function(edge, context, pts2) { + context.fillStyle = context.strokeStyle; + var edgeWidth = edge.pstyle("width").pfValue; + for (var i2 = 0; i2 + 1 < pts2.length; i2 += 2) { + var vector = [pts2[i2 + 2] - pts2[i2], pts2[i2 + 3] - pts2[i2 + 1]]; + var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); + var normal = [vector[1] / length, -vector[0] / length]; + var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2]; + context.beginPath(); + context.moveTo(pts2[i2] - triangleHead[0], pts2[i2 + 1] - triangleHead[1]); + context.lineTo(pts2[i2] + triangleHead[0], pts2[i2 + 1] + triangleHead[1]); + context.lineTo(pts2[i2 + 2], pts2[i2 + 3]); + context.closePath(); + context.fill(); + } + }; + CRp$8.drawArrowheads = function(context, edge, opacity) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === "haystack"; + if (!isHaystack) { + this.drawArrowhead(context, edge, "source", rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity); + } + this.drawArrowhead(context, edge, "mid-target", rs.midX, rs.midY, rs.midtgtArrowAngle, opacity); + this.drawArrowhead(context, edge, "mid-source", rs.midX, rs.midY, rs.midsrcArrowAngle, opacity); + if (!isHaystack) { + this.drawArrowhead(context, edge, "target", rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity); + } + }; + CRp$8.drawArrowhead = function(context, edge, prefix, x, y, angle, opacity) { + if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) { + return; + } + var self2 = this; + var arrowShape = edge.pstyle(prefix + "-arrow-shape").value; + if (arrowShape === "none") { + return; + } + var arrowClearFill = edge.pstyle(prefix + "-arrow-fill").value === "hollow" ? "both" : "filled"; + var arrowFill = edge.pstyle(prefix + "-arrow-fill").value; + var edgeWidth = edge.pstyle("width").pfValue; + var edgeOpacity = edge.pstyle("opacity").value; + if (opacity === void 0) { + opacity = edgeOpacity; + } + var gco = context.globalCompositeOperation; + if (opacity !== 1 || arrowFill === "hollow") { + context.globalCompositeOperation = "destination-out"; + self2.colorFillStyle(context, 255, 255, 255, 1); + self2.colorStrokeStyle(context, 255, 255, 255, 1); + self2.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, x, y, angle); + context.globalCompositeOperation = gco; + } + var color = edge.pstyle(prefix + "-arrow-color").value; + self2.colorFillStyle(context, color[0], color[1], color[2], opacity); + self2.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + self2.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, x, y, angle); + }; + CRp$8.drawArrowShape = function(edge, context, fill, edgeWidth, shape, x, y, angle) { + var r = this; + var usePaths = this.usePaths() && shape !== "triangle-cross"; + var pathCacheHit = false; + var path; + var canvasContext = context; + var translation = { + x, + y + }; + var scale = edge.pstyle("arrow-scale").value; + var size = this.getArrowWidth(edgeWidth, scale); + var shapeImpl = r.arrowShapes[shape]; + if (usePaths) { + var cache2 = r.arrowPathCache = r.arrowPathCache || []; + var key = hashString(shape); + var cachedPath = cache2[key]; + if (cachedPath != null) { + path = context = cachedPath; + pathCacheHit = true; + } else { + path = context = new Path2D(); + cache2[key] = path; + } + } + if (!pathCacheHit) { + if (context.beginPath) { + context.beginPath(); + } + if (usePaths) { + shapeImpl.draw(context, 1, 0, { + x: 0, + y: 0 + }, 1); + } else { + shapeImpl.draw(context, size, angle, translation, edgeWidth); + } + if (context.closePath) { + context.closePath(); + } + } + context = canvasContext; + if (usePaths) { + context.translate(x, y); + context.rotate(angle); + context.scale(size, size); + } + if (fill === "filled" || fill === "both") { + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + if (fill === "hollow" || fill === "both") { + context.lineWidth = (shapeImpl.matchEdgeWidth ? edgeWidth : 1) / (usePaths ? size : 1); + context.lineJoin = "miter"; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + } + if (usePaths) { + context.scale(1 / size, 1 / size); + context.rotate(-angle); + context.translate(-x, -y); + } + }; + var CRp$7 = {}; + CRp$7.safeDrawImage = function(context, img, ix, iy, iw, ih, x, y, w, h) { + if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) { + return; + } + try { + context.drawImage(img, ix, iy, iw, ih, x, y, w, h); + } catch (e) { + warn(e); + } + }; + CRp$7.drawInscribedImage = function(context, img, node, index, nodeOpacity) { + var r = this; + var pos = node.position(); + var nodeX = pos.x; + var nodeY = pos.y; + var styleObj = node.cy().style(); + var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj); + var fit = getIndexedStyle(node, "background-fit", "value", index); + var repeat = getIndexedStyle(node, "background-repeat", "value", index); + var nodeW = node.width(); + var nodeH = node.height(); + var paddingX2 = node.padding() * 2; + var nodeTW = nodeW + (getIndexedStyle(node, "background-width-relative-to", "value", index) === "inner" ? 0 : paddingX2); + var nodeTH = nodeH + (getIndexedStyle(node, "background-height-relative-to", "value", index) === "inner" ? 0 : paddingX2); + var rs = node._private.rscratch; + var clip = getIndexedStyle(node, "background-clip", "value", index); + var shouldClip = clip === "node"; + var imgOpacity = getIndexedStyle(node, "background-image-opacity", "value", index) * nodeOpacity; + var smooth = getIndexedStyle(node, "background-image-smoothing", "value", index); + var imgW = img.width || img.cachedW; + var imgH = img.height || img.cachedH; + if (null == imgW || null == imgH) { + document.body.appendChild(img); + imgW = img.cachedW = img.width || img.offsetWidth; + imgH = img.cachedH = img.height || img.offsetHeight; + document.body.removeChild(img); + } + var w = imgW; + var h = imgH; + if (getIndexedStyle(node, "background-width", "value", index) !== "auto") { + if (getIndexedStyle(node, "background-width", "units", index) === "%") { + w = getIndexedStyle(node, "background-width", "pfValue", index) * nodeTW; + } else { + w = getIndexedStyle(node, "background-width", "pfValue", index); + } + } + if (getIndexedStyle(node, "background-height", "value", index) !== "auto") { + if (getIndexedStyle(node, "background-height", "units", index) === "%") { + h = getIndexedStyle(node, "background-height", "pfValue", index) * nodeTH; + } else { + h = getIndexedStyle(node, "background-height", "pfValue", index); + } + } + if (w === 0 || h === 0) { + return; + } + if (fit === "contain") { + var scale = Math.min(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } else if (fit === "cover") { + var scale = Math.max(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } + var x = nodeX - nodeTW / 2; + var posXUnits = getIndexedStyle(node, "background-position-x", "units", index); + var posXPfVal = getIndexedStyle(node, "background-position-x", "pfValue", index); + if (posXUnits === "%") { + x += (nodeTW - w) * posXPfVal; + } else { + x += posXPfVal; + } + var offXUnits = getIndexedStyle(node, "background-offset-x", "units", index); + var offXPfVal = getIndexedStyle(node, "background-offset-x", "pfValue", index); + if (offXUnits === "%") { + x += (nodeTW - w) * offXPfVal; + } else { + x += offXPfVal; + } + var y = nodeY - nodeTH / 2; + var posYUnits = getIndexedStyle(node, "background-position-y", "units", index); + var posYPfVal = getIndexedStyle(node, "background-position-y", "pfValue", index); + if (posYUnits === "%") { + y += (nodeTH - h) * posYPfVal; + } else { + y += posYPfVal; + } + var offYUnits = getIndexedStyle(node, "background-offset-y", "units", index); + var offYPfVal = getIndexedStyle(node, "background-offset-y", "pfValue", index); + if (offYUnits === "%") { + y += (nodeTH - h) * offYPfVal; + } else { + y += offYPfVal; + } + if (rs.pathCache) { + x -= nodeX; + y -= nodeY; + nodeX = 0; + nodeY = 0; + } + var gAlpha = context.globalAlpha; + context.globalAlpha = imgOpacity; + var smoothingEnabled = r.getImgSmoothing(context); + var isSmoothingSwitched = false; + if (smooth === "no" && smoothingEnabled) { + r.setImgSmoothing(context, false); + isSmoothingSwitched = true; + } else if (smooth === "yes" && !smoothingEnabled) { + r.setImgSmoothing(context, true); + isSmoothingSwitched = true; + } + if (repeat === "no-repeat") { + if (shouldClip) { + context.save(); + if (rs.pathCache) { + context.clip(rs.pathCache); + } else { + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.clip(); + } + } + r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h); + if (shouldClip) { + context.restore(); + } + } else { + var pattern = context.createPattern(img, repeat); + context.fillStyle = pattern; + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.translate(x, y); + context.fill(); + context.translate(-x, -y); + } + context.globalAlpha = gAlpha; + if (isSmoothingSwitched) { + r.setImgSmoothing(context, smoothingEnabled); + } + }; + var CRp$6 = {}; + CRp$6.eleTextBiggerThanMin = function(ele, scale) { + if (!scale) { + var zoom = ele.cy().zoom(); + var pxRatio = this.getPixelRatio(); + var lvl = Math.ceil(log2(zoom * pxRatio)); + scale = Math.pow(2, lvl); + } + var computedSize = ele.pstyle("font-size").pfValue * scale; + var minSize = ele.pstyle("min-zoomed-font-size").pfValue; + if (computedSize < minSize) { + return false; + } + return true; + }; + CRp$6.drawElementText = function(context, ele, shiftToOriginWithBb, force, prefix) { + var useEleOpacity = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + var r = this; + if (force == null) { + if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) { + return; + } + } else if (force === false) { + return; + } + if (ele.isNode()) { + var label = ele.pstyle("label"); + if (!label || !label.value) { + return; + } + var justification = r.getLabelJustification(ele); + context.textAlign = justification; + context.textBaseline = "bottom"; + } else { + var badLine = ele.element()._private.rscratch.badLine; + var _label = ele.pstyle("label"); + var srcLabel = ele.pstyle("source-label"); + var tgtLabel = ele.pstyle("target-label"); + if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) { + return; + } + context.textAlign = "center"; + context.textBaseline = "bottom"; + } + var applyRotation = !shiftToOriginWithBb; + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + if (prefix == null) { + r.drawText(context, ele, null, applyRotation, useEleOpacity); + if (ele.isEdge()) { + r.drawText(context, ele, "source", applyRotation, useEleOpacity); + r.drawText(context, ele, "target", applyRotation, useEleOpacity); + } + } else { + r.drawText(context, ele, prefix, applyRotation, useEleOpacity); + } + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + CRp$6.getFontCache = function(context) { + var cache2; + this.fontCaches = this.fontCaches || []; + for (var i2 = 0; i2 < this.fontCaches.length; i2++) { + cache2 = this.fontCaches[i2]; + if (cache2.context === context) { + return cache2; + } + } + cache2 = { + context + }; + this.fontCaches.push(cache2); + return cache2; + }; + CRp$6.setupTextStyle = function(context, ele) { + var useEleOpacity = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; + var labelStyle = ele.pstyle("font-style").strValue; + var labelSize = ele.pstyle("font-size").pfValue + "px"; + var labelFamily = ele.pstyle("font-family").strValue; + var labelWeight = ele.pstyle("font-weight").strValue; + var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle("text-opacity").value : 1; + var outlineOpacity = ele.pstyle("text-outline-opacity").value * opacity; + var color = ele.pstyle("color").value; + var outlineColor = ele.pstyle("text-outline-color").value; + context.font = labelStyle + " " + labelWeight + " " + labelSize + " " + labelFamily; + context.lineJoin = "round"; + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity); + }; + function roundRect(ctx, x, y, width, height) { + var radius = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 5; + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.lineTo(x + width - radius, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + radius); + ctx.lineTo(x + width, y + height - radius); + ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); + ctx.lineTo(x + radius, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - radius); + ctx.lineTo(x, y + radius); + ctx.quadraticCurveTo(x, y, x + radius, y); + ctx.closePath(); + ctx.fill(); + } + CRp$6.getTextAngle = function(ele, prefix) { + var theta; + var _p = ele._private; + var rscratch = _p.rscratch; + var pdash = prefix ? prefix + "-" : ""; + var rotation = ele.pstyle(pdash + "text-rotation"); + var textAngle = getPrefixedProperty(rscratch, "labelAngle", prefix); + if (rotation.strValue === "autorotate") { + theta = ele.isEdge() ? textAngle : 0; + } else if (rotation.strValue === "none") { + theta = 0; + } else { + theta = rotation.pfValue; + } + return theta; + }; + CRp$6.drawText = function(context, ele, prefix) { + var applyRotation = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var useEleOpacity = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var _p = ele._private; + var rscratch = _p.rscratch; + var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; + if (useEleOpacity && (parentOpacity === 0 || ele.pstyle("text-opacity").value === 0)) { + return; + } + if (prefix === "main") { + prefix = null; + } + var textX = getPrefixedProperty(rscratch, "labelX", prefix); + var textY = getPrefixedProperty(rscratch, "labelY", prefix); + var orgTextX, orgTextY; + var text = this.getLabelText(ele, prefix); + if (text != null && text !== "" && !isNaN(textX) && !isNaN(textY)) { + this.setupTextStyle(context, ele, useEleOpacity); + var pdash = prefix ? prefix + "-" : ""; + var textW = getPrefixedProperty(rscratch, "labelWidth", prefix); + var textH = getPrefixedProperty(rscratch, "labelHeight", prefix); + var marginX = ele.pstyle(pdash + "text-margin-x").pfValue; + var marginY = ele.pstyle(pdash + "text-margin-y").pfValue; + var isEdge = ele.isEdge(); + var halign = ele.pstyle("text-halign").value; + var valign = ele.pstyle("text-valign").value; + if (isEdge) { + halign = "center"; + valign = "center"; + } + textX += marginX; + textY += marginY; + var theta; + if (!applyRotation) { + theta = 0; + } else { + theta = this.getTextAngle(ele, prefix); + } + if (theta !== 0) { + orgTextX = textX; + orgTextY = textY; + context.translate(orgTextX, orgTextY); + context.rotate(theta); + textX = 0; + textY = 0; + } + switch (valign) { + case "top": + break; + case "center": + textY += textH / 2; + break; + case "bottom": + textY += textH; + break; + } + var backgroundOpacity = ele.pstyle("text-background-opacity").value; + var borderOpacity = ele.pstyle("text-border-opacity").value; + var textBorderWidth = ele.pstyle("text-border-width").pfValue; + var backgroundPadding = ele.pstyle("text-background-padding").pfValue; + if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) { + var bgX = textX - backgroundPadding; + switch (halign) { + case "left": + bgX -= textW; + break; + case "center": + bgX -= textW / 2; + break; + } + var bgY = textY - textH - backgroundPadding; + var bgW = textW + 2 * backgroundPadding; + var bgH = textH + 2 * backgroundPadding; + if (backgroundOpacity > 0) { + var textFill = context.fillStyle; + var textBackgroundColor = ele.pstyle("text-background-color").value; + context.fillStyle = "rgba(" + textBackgroundColor[0] + "," + textBackgroundColor[1] + "," + textBackgroundColor[2] + "," + backgroundOpacity * parentOpacity + ")"; + var styleShape = ele.pstyle("text-background-shape").strValue; + if (styleShape.indexOf("round") === 0) { + roundRect(context, bgX, bgY, bgW, bgH, 2); + } else { + context.fillRect(bgX, bgY, bgW, bgH); + } + context.fillStyle = textFill; + } + if (textBorderWidth > 0 && borderOpacity > 0) { + var textStroke = context.strokeStyle; + var textLineWidth = context.lineWidth; + var textBorderColor = ele.pstyle("text-border-color").value; + var textBorderStyle = ele.pstyle("text-border-style").value; + context.strokeStyle = "rgba(" + textBorderColor[0] + "," + textBorderColor[1] + "," + textBorderColor[2] + "," + borderOpacity * parentOpacity + ")"; + context.lineWidth = textBorderWidth; + if (context.setLineDash) { + switch (textBorderStyle) { + case "dotted": + context.setLineDash([1, 1]); + break; + case "dashed": + context.setLineDash([4, 2]); + break; + case "double": + context.lineWidth = textBorderWidth / 4; + context.setLineDash([]); + break; + case "solid": + context.setLineDash([]); + break; + } + } + context.strokeRect(bgX, bgY, bgW, bgH); + if (textBorderStyle === "double") { + var whiteWidth = textBorderWidth / 2; + context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2); + } + if (context.setLineDash) { + context.setLineDash([]); + } + context.lineWidth = textLineWidth; + context.strokeStyle = textStroke; + } + } + var lineWidth = 2 * ele.pstyle("text-outline-width").pfValue; + if (lineWidth > 0) { + context.lineWidth = lineWidth; + } + if (ele.pstyle("text-wrap").value === "wrap") { + var lines = getPrefixedProperty(rscratch, "labelWrapCachedLines", prefix); + var lineHeight = getPrefixedProperty(rscratch, "labelLineHeight", prefix); + var halfTextW = textW / 2; + var justification = this.getLabelJustification(ele); + if (justification === "auto") + ; + else if (halign === "left") { + if (justification === "left") { + textX += -textW; + } else if (justification === "center") { + textX += -halfTextW; + } + } else if (halign === "center") { + if (justification === "left") { + textX += -halfTextW; + } else if (justification === "right") { + textX += halfTextW; + } + } else if (halign === "right") { + if (justification === "center") { + textX += halfTextW; + } else if (justification === "right") { + textX += textW; + } + } + switch (valign) { + case "top": + textY -= (lines.length - 1) * lineHeight; + break; + case "center": + case "bottom": + textY -= (lines.length - 1) * lineHeight; + break; + } + for (var l = 0; l < lines.length; l++) { + if (lineWidth > 0) { + context.strokeText(lines[l], textX, textY); + } + context.fillText(lines[l], textX, textY); + textY += lineHeight; + } + } else { + if (lineWidth > 0) { + context.strokeText(text, textX, textY); + } + context.fillText(text, textX, textY); + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-orgTextX, -orgTextY); + } + } + }; + var CRp$5 = {}; + CRp$5.drawNode = function(context, node, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : true; + var r = this; + var nodeWidth, nodeHeight; + var _p = node._private; + var rs = _p.rscratch; + var pos = node.position(); + if (!number$1(pos.x) || !number$1(pos.y)) { + return; + } + if (shouldDrawOpacity && !node.visible()) { + return; + } + var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; + var usePaths = r.usePaths(); + var path; + var pathCacheHit = false; + var padding = node.padding(); + nodeWidth = node.width() + 2 * padding; + nodeHeight = node.height() + 2 * padding; + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + var bgImgProp = node.pstyle("background-image"); + var urls = bgImgProp.value; + var urlDefined = new Array(urls.length); + var image = new Array(urls.length); + var numImages = 0; + for (var i2 = 0; i2 < urls.length; i2++) { + var url = urls[i2]; + var defd = urlDefined[i2] = url != null && url !== "none"; + if (defd) { + var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, "background-image-crossorigin", "value", i2); + numImages++; + image[i2] = r.getCachedImage(url, bgImgCrossOrigin, function() { + _p.backgroundTimestamp = Date.now(); + node.emitAndNotify("background"); + }); + } + } + var darkness = node.pstyle("background-blacken").value; + var borderWidth = node.pstyle("border-width").pfValue; + var bgOpacity = node.pstyle("background-opacity").value * eleOpacity; + var borderColor = node.pstyle("border-color").value; + var borderStyle = node.pstyle("border-style").value; + var borderOpacity = node.pstyle("border-opacity").value * eleOpacity; + context.lineJoin = "miter"; + var setupShapeColor = function setupShapeColor2() { + var bgOpy = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : bgOpacity; + r.eleFillStyle(context, node, bgOpy); + }; + var setupBorderColor = function setupBorderColor2() { + var bdrOpy = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : borderOpacity; + r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy); + }; + var styleShape = node.pstyle("shape").strValue; + var shapePts = node.pstyle("shape-polygon-points").pfValue; + if (usePaths) { + context.translate(pos.x, pos.y); + var pathCache = r.nodePathCache = r.nodePathCache || []; + var key = hashStrings(styleShape === "polygon" ? styleShape + "," + shapePts.join(",") : styleShape, "" + nodeHeight, "" + nodeWidth); + var cachedPath = pathCache[key]; + if (cachedPath != null) { + path = cachedPath; + pathCacheHit = true; + rs.pathCache = path; + } else { + path = new Path2D(); + pathCache[key] = rs.pathCache = path; + } + } + var drawShape = function drawShape2() { + if (!pathCacheHit) { + var npos = pos; + if (usePaths) { + npos = { + x: 0, + y: 0 + }; + } + r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight); + } + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + }; + var drawImages = function drawImages2() { + var nodeOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : eleOpacity; + var inside = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; + var prevBging = _p.backgrounding; + var totalCompleted = 0; + for (var _i = 0; _i < image.length; _i++) { + var bgContainment = node.cy().style().getIndexedStyle(node, "background-image-containment", "value", _i); + if (inside && bgContainment === "over" || !inside && bgContainment === "inside") { + totalCompleted++; + continue; + } + if (urlDefined[_i] && image[_i].complete && !image[_i].error) { + totalCompleted++; + r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity); + } + } + _p.backgrounding = !(totalCompleted === numImages); + if (prevBging !== _p.backgrounding) { + node.updateStyle(false); + } + }; + var drawPie = function drawPie2() { + var redrawShape = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false; + var pieOpacity = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : eleOpacity; + if (r.hasPie(node)) { + r.drawPie(context, node, pieOpacity); + if (redrawShape) { + if (!usePaths) { + r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight); + } + } + } + }; + var darken2 = function darken3() { + var darkenOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : eleOpacity; + var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity; + var c = darkness > 0 ? 0 : 255; + if (darkness !== 0) { + r.colorFillStyle(context, c, c, c, opacity); + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + }; + var drawBorder = function drawBorder2() { + if (borderWidth > 0) { + context.lineWidth = borderWidth; + context.lineCap = "butt"; + if (context.setLineDash) { + switch (borderStyle) { + case "dotted": + context.setLineDash([1, 1]); + break; + case "dashed": + context.setLineDash([4, 2]); + break; + case "solid": + case "double": + context.setLineDash([]); + break; + } + } + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + if (borderStyle === "double") { + context.lineWidth = borderWidth / 3; + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = "destination-out"; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + context.globalCompositeOperation = gco; + } + if (context.setLineDash) { + context.setLineDash([]); + } + } + }; + var drawOverlay = function drawOverlay2() { + if (shouldDrawOverlay) { + r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + var drawUnderlay = function drawUnderlay2() { + if (shouldDrawOverlay) { + r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + var drawText = function drawText2() { + r.drawElementText(context, node, null, drawLabel); + }; + var ghost = node.pstyle("ghost").value === "yes"; + if (ghost) { + var gx = node.pstyle("ghost-offset-x").pfValue; + var gy = node.pstyle("ghost-offset-y").pfValue; + var ghostOpacity = node.pstyle("ghost-opacity").value; + var effGhostOpacity = ghostOpacity * eleOpacity; + context.translate(gx, gy); + setupShapeColor(ghostOpacity * bgOpacity); + drawShape(); + drawImages(effGhostOpacity, true); + setupBorderColor(ghostOpacity * borderOpacity); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(effGhostOpacity, false); + darken2(effGhostOpacity); + context.translate(-gx, -gy); + } + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawUnderlay(); + if (usePaths) { + context.translate(pos.x, pos.y); + } + setupShapeColor(); + drawShape(); + drawImages(eleOpacity, true); + setupBorderColor(); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(eleOpacity, false); + darken2(); + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawText(); + drawOverlay(); + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + var drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay2(overlayOrUnderlay) { + if (!["overlay", "underlay"].includes(overlayOrUnderlay)) { + throw new Error("Invalid state"); + } + return function(context, node, pos, nodeWidth, nodeHeight) { + var r = this; + if (!node.visible()) { + return; + } + var padding = node.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var opacity = node.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + var color = node.pstyle("".concat(overlayOrUnderlay, "-color")).value; + var shape = node.pstyle("".concat(overlayOrUnderlay, "-shape")).value; + if (opacity > 0) { + pos = pos || node.position(); + if (nodeWidth == null || nodeHeight == null) { + var _padding = node.padding(); + nodeWidth = node.width() + 2 * _padding; + nodeHeight = node.height() + 2 * _padding; + } + r.colorFillStyle(context, color[0], color[1], color[2], opacity); + r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2); + context.fill(); + } + }; + }; + CRp$5.drawNodeOverlay = drawNodeOverlayUnderlay("overlay"); + CRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay("underlay"); + CRp$5.hasPie = function(node) { + node = node[0]; + return node._private.hasPie; + }; + CRp$5.drawPie = function(context, node, nodeOpacity, pos) { + node = node[0]; + pos = pos || node.position(); + var cyStyle = node.cy().style(); + var pieSize = node.pstyle("pie-size"); + var x = pos.x; + var y = pos.y; + var nodeW = node.width(); + var nodeH = node.height(); + var radius = Math.min(nodeW, nodeH) / 2; + var lastPercent = 0; + var usePaths = this.usePaths(); + if (usePaths) { + x = 0; + y = 0; + } + if (pieSize.units === "%") { + radius = radius * pieSize.pfValue; + } else if (pieSize.pfValue !== void 0) { + radius = pieSize.pfValue / 2; + } + for (var i2 = 1; i2 <= cyStyle.pieBackgroundN; i2++) { + var size = node.pstyle("pie-" + i2 + "-background-size").value; + var color = node.pstyle("pie-" + i2 + "-background-color").value; + var opacity = node.pstyle("pie-" + i2 + "-background-opacity").value * nodeOpacity; + var percent = size / 100; + if (percent + lastPercent > 1) { + percent = 1 - lastPercent; + } + var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; + var angleDelta = 2 * Math.PI * percent; + var angleEnd = angleStart + angleDelta; + if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) { + continue; + } + context.beginPath(); + context.moveTo(x, y); + context.arc(x, y, radius, angleStart, angleEnd); + context.closePath(); + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + context.fill(); + lastPercent += percent; + } + }; + var CRp$4 = {}; + var motionBlurDelay = 100; + CRp$4.getPixelRatio = function() { + var context = this.data.contexts[0]; + if (this.forcedPixelRatio != null) { + return this.forcedPixelRatio; + } + var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; + return (window.devicePixelRatio || 1) / backingStore; + }; + CRp$4.paintCache = function(context) { + var caches = this.paintCaches = this.paintCaches || []; + var needToCreateCache = true; + var cache2; + for (var i2 = 0; i2 < caches.length; i2++) { + cache2 = caches[i2]; + if (cache2.context === context) { + needToCreateCache = false; + break; + } + } + if (needToCreateCache) { + cache2 = { + context + }; + caches.push(cache2); + } + return cache2; + }; + CRp$4.createGradientStyleFor = function(context, shapeStyleName, ele, fill, opacity) { + var gradientStyle; + var usePaths = this.usePaths(); + var colors2 = ele.pstyle(shapeStyleName + "-gradient-stop-colors").value, positions = ele.pstyle(shapeStyleName + "-gradient-stop-positions").pfValue; + if (fill === "radial-gradient") { + if (ele.isEdge()) { + var start = ele.sourceEndpoint(), end = ele.targetEndpoint(), mid = ele.midpoint(); + var d1 = dist(start, mid); + var d2 = dist(end, mid); + gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); + } else { + var pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), width = ele.paddedWidth(), height = ele.paddedHeight(); + gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); + } + } else { + if (ele.isEdge()) { + var _start = ele.sourceEndpoint(), _end = ele.targetEndpoint(); + gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y); + } else { + var _pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), _width = ele.paddedWidth(), _height = ele.paddedHeight(), halfWidth = _width / 2, halfHeight = _height / 2; + var direction = ele.pstyle("background-gradient-direction").value; + switch (direction) { + case "to-bottom": + gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight); + break; + case "to-top": + gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight); + break; + case "to-left": + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y); + break; + case "to-right": + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y); + break; + case "to-bottom-right": + case "to-right-bottom": + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight); + break; + case "to-top-right": + case "to-right-top": + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight); + break; + case "to-bottom-left": + case "to-left-bottom": + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight); + break; + case "to-top-left": + case "to-left-top": + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight); + break; + } + } + } + if (!gradientStyle) + return null; + var hasPositions = positions.length === colors2.length; + var length = colors2.length; + for (var i2 = 0; i2 < length; i2++) { + gradientStyle.addColorStop(hasPositions ? positions[i2] : i2 / (length - 1), "rgba(" + colors2[i2][0] + "," + colors2[i2][1] + "," + colors2[i2][2] + "," + opacity + ")"); + } + return gradientStyle; + }; + CRp$4.gradientFillStyle = function(context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, "background", ele, fill, opacity); + if (!gradientStyle) + return null; + context.fillStyle = gradientStyle; + }; + CRp$4.colorFillStyle = function(context, r, g, b, a) { + context.fillStyle = "rgba(" + r + "," + g + "," + b + "," + a + ")"; + }; + CRp$4.eleFillStyle = function(context, ele, opacity) { + var backgroundFill = ele.pstyle("background-fill").value; + if (backgroundFill === "linear-gradient" || backgroundFill === "radial-gradient") { + this.gradientFillStyle(context, ele, backgroundFill, opacity); + } else { + var backgroundColor = ele.pstyle("background-color").value; + this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity); + } + }; + CRp$4.gradientStrokeStyle = function(context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, "line", ele, fill, opacity); + if (!gradientStyle) + return null; + context.strokeStyle = gradientStyle; + }; + CRp$4.colorStrokeStyle = function(context, r, g, b, a) { + context.strokeStyle = "rgba(" + r + "," + g + "," + b + "," + a + ")"; + }; + CRp$4.eleStrokeStyle = function(context, ele, opacity) { + var lineFill = ele.pstyle("line-fill").value; + if (lineFill === "linear-gradient" || lineFill === "radial-gradient") { + this.gradientStrokeStyle(context, ele, lineFill, opacity); + } else { + var lineColor = ele.pstyle("line-color").value; + this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity); + } + }; + CRp$4.matchCanvasSize = function(container) { + var r = this; + var data2 = r.data; + var bb = r.findContainerClientCoords(); + var width = bb[2]; + var height = bb[3]; + var pixelRatio = r.getPixelRatio(); + var mbPxRatio = r.motionBlurPxRatio; + if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) { + pixelRatio = mbPxRatio; + } + var canvasWidth = width * pixelRatio; + var canvasHeight = height * pixelRatio; + var canvas; + if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) { + return; + } + r.fontCaches = null; + var canvasContainer = data2.canvasContainer; + canvasContainer.style.width = width + "px"; + canvasContainer.style.height = height + "px"; + for (var i2 = 0; i2 < r.CANVAS_LAYERS; i2++) { + canvas = data2.canvases[i2]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + "px"; + canvas.style.height = height + "px"; + } + for (var i2 = 0; i2 < r.BUFFER_COUNT; i2++) { + canvas = data2.bufferCanvases[i2]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + "px"; + canvas.style.height = height + "px"; + } + r.textureMult = 1; + if (pixelRatio <= 1) { + canvas = data2.bufferCanvases[r.TEXTURE_BUFFER]; + r.textureMult = 2; + canvas.width = canvasWidth * r.textureMult; + canvas.height = canvasHeight * r.textureMult; + } + r.canvasWidth = canvasWidth; + r.canvasHeight = canvasHeight; + }; + CRp$4.renderTo = function(cxt, zoom, pan, pxRatio) { + this.render({ + forcedContext: cxt, + forcedZoom: zoom, + forcedPan: pan, + drawAllLayers: true, + forcedPxRatio: pxRatio + }); + }; + CRp$4.render = function(options) { + options = options || staticEmptyObject(); + var forcedContext = options.forcedContext; + var drawAllLayers = options.drawAllLayers; + var drawOnlyNodeLayer = options.drawOnlyNodeLayer; + var forcedZoom = options.forcedZoom; + var forcedPan = options.forcedPan; + var r = this; + var pixelRatio = options.forcedPxRatio === void 0 ? this.getPixelRatio() : options.forcedPxRatio; + var cy = r.cy; + var data2 = r.data; + var needDraw = data2.canvasNeedsRedraw; + var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); + var motionBlur = options.motionBlur !== void 0 ? options.motionBlur : r.motionBlur; + var mbPxRatio = r.motionBlurPxRatio; + var hasCompoundNodes = cy.hasCompoundNodes(); + var inNodeDragGesture = r.hoverData.draggingEles; + var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; + motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; + var motionBlurFadeEffect = motionBlur; + if (!forcedContext) { + if (r.prevPxRatio !== pixelRatio) { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + r.redrawHint("eles", true); + r.redrawHint("drag", true); + } + r.prevPxRatio = pixelRatio; + } + if (!forcedContext && r.motionBlurTimeout) { + clearTimeout(r.motionBlurTimeout); + } + if (motionBlur) { + if (r.mbFrames == null) { + r.mbFrames = 0; + } + r.mbFrames++; + if (r.mbFrames < 3) { + motionBlurFadeEffect = false; + } + if (r.mbFrames > r.minMbLowQualFrames) { + r.motionBlurPxRatio = r.mbPxRBlurry; + } + } + if (r.clearingMotionBlur) { + r.motionBlurPxRatio = 1; + } + if (r.textureDrawLastFrame && !textureDraw) { + needDraw[r.NODE] = true; + needDraw[r.SELECT_BOX] = true; + } + var style = cy.style(); + var zoom = cy.zoom(); + var effectiveZoom = forcedZoom !== void 0 ? forcedZoom : zoom; + var pan = cy.pan(); + var effectivePan = { + x: pan.x, + y: pan.y + }; + var vp = { + zoom, + pan: { + x: pan.x, + y: pan.y + } + }; + var prevVp = r.prevViewport; + var viewportIsDiff = prevVp === void 0 || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; + if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) { + r.motionBlurPxRatio = 1; + } + if (forcedPan) { + effectivePan = forcedPan; + } + effectiveZoom *= pixelRatio; + effectivePan.x *= pixelRatio; + effectivePan.y *= pixelRatio; + var eles = r.getCachedZSortedEles(); + function mbclear(context2, x, y, w, h) { + var gco = context2.globalCompositeOperation; + context2.globalCompositeOperation = "destination-out"; + r.colorFillStyle(context2, 255, 255, 255, r.motionBlurTransparency); + context2.fillRect(x, y, w, h); + context2.globalCompositeOperation = gco; + } + function setContextTransform(context2, clear3) { + var ePan, eZoom, w, h; + if (!r.clearingMotionBlur && (context2 === data2.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context2 === data2.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) { + ePan = { + x: pan.x * mbPxRatio, + y: pan.y * mbPxRatio + }; + eZoom = zoom * mbPxRatio; + w = r.canvasWidth * mbPxRatio; + h = r.canvasHeight * mbPxRatio; + } else { + ePan = effectivePan; + eZoom = effectiveZoom; + w = r.canvasWidth; + h = r.canvasHeight; + } + context2.setTransform(1, 0, 0, 1, 0, 0); + if (clear3 === "motionBlur") { + mbclear(context2, 0, 0, w, h); + } else if (!forcedContext && (clear3 === void 0 || clear3)) { + context2.clearRect(0, 0, w, h); + } + if (!drawAllLayers) { + context2.translate(ePan.x, ePan.y); + context2.scale(eZoom, eZoom); + } + if (forcedPan) { + context2.translate(forcedPan.x, forcedPan.y); + } + if (forcedZoom) { + context2.scale(forcedZoom, forcedZoom); + } + } + if (!textureDraw) { + r.textureDrawLastFrame = false; + } + if (textureDraw) { + r.textureDrawLastFrame = true; + if (!r.textureCache) { + r.textureCache = {}; + r.textureCache.bb = cy.mutableElements().boundingBox(); + r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER]; + var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER]; + cxt.setTransform(1, 0, 0, 1, 0, 0); + cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult); + r.render({ + forcedContext: cxt, + drawOnlyNodeLayer: true, + forcedPxRatio: pixelRatio * r.textureMult + }); + var vp = r.textureCache.viewport = { + zoom: cy.zoom(), + pan: cy.pan(), + width: r.canvasWidth, + height: r.canvasHeight + }; + vp.mpan = { + x: (0 - vp.pan.x) / vp.zoom, + y: (0 - vp.pan.y) / vp.zoom + }; + } + needDraw[r.DRAG] = false; + needDraw[r.NODE] = false; + var context = data2.contexts[r.NODE]; + var texture = r.textureCache.texture; + var vp = r.textureCache.viewport; + context.setTransform(1, 0, 0, 1, 0, 0); + if (motionBlur) { + mbclear(context, 0, 0, vp.width, vp.height); + } else { + context.clearRect(0, 0, vp.width, vp.height); + } + var outsideBgColor = style.core("outside-texture-bg-color").value; + var outsideBgOpacity = style.core("outside-texture-bg-opacity").value; + r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity); + context.fillRect(0, 0, vp.width, vp.height); + var zoom = cy.zoom(); + setContextTransform(context, false); + context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + } else if (r.textureOnViewport && !forcedContext) { + r.textureCache = null; + } + var extent = cy.extent(); + var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated(); + var hideEdges = r.hideEdgesOnViewport && vpManip; + var needMbClear = []; + needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur; + if (needMbClear[r.NODE]) { + r.clearedForMotionBlur[r.NODE] = true; + } + needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur; + if (needMbClear[r.DRAG]) { + r.clearedForMotionBlur[r.DRAG] = true; + } + if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) { + var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data2.contexts[r.NODE]); + var clear2 = motionBlur && !useBuffer ? "motionBlur" : void 0; + setContextTransform(context, clear2); + if (hideEdges) { + r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent); + } else { + r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.nondrag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.NODE] = false; + } + } + if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) { + var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data2.contexts[r.DRAG]); + setContextTransform(context, motionBlur && !useBuffer ? "motionBlur" : void 0); + if (hideEdges) { + r.drawCachedNodes(context, eles.drag, pixelRatio, extent); + } else { + r.drawCachedElements(context, eles.drag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.drag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.DRAG] = false; + } + } + if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) { + var context = forcedContext || data2.contexts[r.SELECT_BOX]; + setContextTransform(context); + if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) { + var zoom = r.cy.zoom(); + var borderWidth = style.core("selection-box-border-width").value / zoom; + context.lineWidth = borderWidth; + context.fillStyle = "rgba(" + style.core("selection-box-color").value[0] + "," + style.core("selection-box-color").value[1] + "," + style.core("selection-box-color").value[2] + "," + style.core("selection-box-opacity").value + ")"; + context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + if (borderWidth > 0) { + context.strokeStyle = "rgba(" + style.core("selection-box-border-color").value[0] + "," + style.core("selection-box-border-color").value[1] + "," + style.core("selection-box-border-color").value[2] + "," + style.core("selection-box-opacity").value + ")"; + context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + } + } + if (data2.bgActivePosistion && !r.hoverData.selecting) { + var zoom = r.cy.zoom(); + var pos = data2.bgActivePosistion; + context.fillStyle = "rgba(" + style.core("active-bg-color").value[0] + "," + style.core("active-bg-color").value[1] + "," + style.core("active-bg-color").value[2] + "," + style.core("active-bg-opacity").value + ")"; + context.beginPath(); + context.arc(pos.x, pos.y, style.core("active-bg-size").pfValue / zoom, 0, 2 * Math.PI); + context.fill(); + } + var timeToRender = r.lastRedrawTime; + if (r.showFps && timeToRender) { + timeToRender = Math.round(timeToRender); + var fps = Math.round(1e3 / timeToRender); + context.setTransform(1, 0, 0, 1, 0, 0); + context.fillStyle = "rgba(255, 0, 0, 0.75)"; + context.strokeStyle = "rgba(255, 0, 0, 0.75)"; + context.lineWidth = 1; + context.fillText("1 frame = " + timeToRender + " ms = " + fps + " fps", 0, 20); + var maxFps = 60; + context.strokeRect(0, 30, 250, 20); + context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20); + } + if (!drawAllLayers) { + needDraw[r.SELECT_BOX] = false; + } + } + if (motionBlur && mbPxRatio !== 1) { + var cxtNode = data2.contexts[r.NODE]; + var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]; + var cxtDrag = data2.contexts[r.DRAG]; + var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]; + var drawMotionBlur = function drawMotionBlur2(cxt2, txt, needClear) { + cxt2.setTransform(1, 0, 0, 1, 0, 0); + if (needClear || !motionBlurFadeEffect) { + cxt2.clearRect(0, 0, r.canvasWidth, r.canvasHeight); + } else { + mbclear(cxt2, 0, 0, r.canvasWidth, r.canvasHeight); + } + var pxr = mbPxRatio; + cxt2.drawImage( + txt, + // img + 0, + 0, + // sx, sy + r.canvasWidth * pxr, + r.canvasHeight * pxr, + // sw, sh + 0, + 0, + // x, y + r.canvasWidth, + r.canvasHeight + // w, h + ); + }; + if (needDraw[r.NODE] || needMbClear[r.NODE]) { + drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); + needDraw[r.NODE] = false; + } + if (needDraw[r.DRAG] || needMbClear[r.DRAG]) { + drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]); + needDraw[r.DRAG] = false; + } + } + r.prevViewport = vp; + if (r.clearingMotionBlur) { + r.clearingMotionBlur = false; + r.motionBlurCleared = true; + r.motionBlur = true; + } + if (motionBlur) { + r.motionBlurTimeout = setTimeout(function() { + r.motionBlurTimeout = null; + r.clearedForMotionBlur[r.NODE] = false; + r.clearedForMotionBlur[r.DRAG] = false; + r.motionBlur = false; + r.clearingMotionBlur = !textureDraw; + r.mbFrames = 0; + needDraw[r.NODE] = true; + needDraw[r.DRAG] = true; + r.redraw(); + }, motionBlurDelay); + } + if (!forcedContext) { + cy.emit("render"); + } + }; + var CRp$3 = {}; + CRp$3.drawPolygonPath = function(context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x + halfW * points[0], y + halfH * points[1]); + for (var i2 = 1; i2 < points.length / 2; i2++) { + context.lineTo(x + halfW * points[i2 * 2], y + halfH * points[i2 * 2 + 1]); + } + context.closePath(); + }; + CRp$3.drawRoundPolygonPath = function(context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + for (var _i = 0; _i < points.length / 4; _i++) { + var sourceUv = void 0, destUv = void 0; + if (_i === 0) { + sourceUv = points.length - 2; + } else { + sourceUv = _i * 4 - 2; + } + destUv = _i * 4 + 2; + var px = x + halfW * points[_i * 4]; + var py = y + halfH * points[_i * 4 + 1]; + var cosTheta = -points[sourceUv] * points[destUv] - points[sourceUv + 1] * points[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * points[sourceUv]; + var cp0y = py - offset * points[sourceUv + 1]; + var cp1x = px + offset * points[destUv]; + var cp1y = py + offset * points[destUv + 1]; + if (_i === 0) { + context.moveTo(cp0x, cp0y); + } else { + context.lineTo(cp0x, cp0y); + } + context.arcTo(px, py, cp1x, cp1y, cornerRadius); + } + context.closePath(); + }; + CRp$3.drawRoundRectanglePath = function(context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x, y - halfHeight); + context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius); + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); + context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius); + context.lineTo(x, y - halfHeight); + context.closePath(); + }; + CRp$3.drawBottomRoundRectanglePath = function(context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight); + context.lineTo(x + halfWidth, y); + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); + context.lineTo(x - halfWidth, y - halfHeight); + context.lineTo(x, y - halfHeight); + context.closePath(); + }; + CRp$3.drawCutRectanglePath = function(context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerLength = getCutRectangleCornerLength(); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x - halfWidth + cornerLength, y - halfHeight); + context.lineTo(x + halfWidth - cornerLength, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight + cornerLength); + context.lineTo(x + halfWidth, y + halfHeight - cornerLength); + context.lineTo(x + halfWidth - cornerLength, y + halfHeight); + context.lineTo(x - halfWidth + cornerLength, y + halfHeight); + context.lineTo(x - halfWidth, y + halfHeight - cornerLength); + context.lineTo(x - halfWidth, y - halfHeight + cornerLength); + context.closePath(); + }; + CRp$3.drawBarrelPath = function(context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var xBegin = x - halfWidth; + var xEnd = x + halfWidth; + var yBegin = y - halfHeight; + var yEnd = y + halfHeight; + var barrelCurveConstants = getBarrelCurveConstants(width, height); + var wOffset = barrelCurveConstants.widthOffset; + var hOffset = barrelCurveConstants.heightOffset; + var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(xBegin, yBegin + hOffset); + context.lineTo(xBegin, yEnd - hOffset); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd); + context.lineTo(xEnd - wOffset, yEnd); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset); + context.lineTo(xEnd, yBegin + hOffset); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin); + context.lineTo(xBegin + wOffset, yBegin); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset); + context.closePath(); + }; + var sin0 = Math.sin(0); + var cos0 = Math.cos(0); + var sin = {}; + var cos = {}; + var ellipseStepSize = Math.PI / 40; + for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { + sin[i] = Math.sin(i); + cos[i] = Math.cos(i); + } + CRp$3.drawEllipsePath = function(context, centerX, centerY, width, height) { + if (context.beginPath) { + context.beginPath(); + } + if (context.ellipse) { + context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI); + } else { + var xPos, yPos; + var rw = width / 2; + var rh = height / 2; + for (var i2 = 0 * Math.PI; i2 < 2 * Math.PI; i2 += ellipseStepSize) { + xPos = centerX - rw * sin[i2] * sin0 + rw * cos[i2] * cos0; + yPos = centerY + rh * cos[i2] * sin0 + rh * sin[i2] * cos0; + if (i2 === 0) { + context.moveTo(xPos, yPos); + } else { + context.lineTo(xPos, yPos); + } + } + } + context.closePath(); + }; + var CRp$2 = {}; + CRp$2.createBuffer = function(w, h) { + var buffer = document.createElement("canvas"); + buffer.width = w; + buffer.height = h; + return [buffer, buffer.getContext("2d")]; + }; + CRp$2.bufferCanvasImage = function(options) { + var cy = this.cy; + var eles = cy.mutableElements(); + var bb = eles.boundingBox(); + var ctrRect = this.findContainerClientCoords(); + var width = options.full ? Math.ceil(bb.w) : ctrRect[2]; + var height = options.full ? Math.ceil(bb.h) : ctrRect[3]; + var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight); + var pxRatio = this.getPixelRatio(); + var scale = 1; + if (options.scale !== void 0) { + width *= options.scale; + height *= options.scale; + scale = options.scale; + } else if (specdMaxDims) { + var maxScaleW = Infinity; + var maxScaleH = Infinity; + if (number$1(options.maxWidth)) { + maxScaleW = scale * options.maxWidth / width; + } + if (number$1(options.maxHeight)) { + maxScaleH = scale * options.maxHeight / height; + } + scale = Math.min(maxScaleW, maxScaleH); + width *= scale; + height *= scale; + } + if (!specdMaxDims) { + width *= pxRatio; + height *= pxRatio; + scale *= pxRatio; + } + var buffCanvas = document.createElement("canvas"); + buffCanvas.width = width; + buffCanvas.height = height; + buffCanvas.style.width = width + "px"; + buffCanvas.style.height = height + "px"; + var buffCxt = buffCanvas.getContext("2d"); + if (width > 0 && height > 0) { + buffCxt.clearRect(0, 0, width, height); + buffCxt.globalCompositeOperation = "source-over"; + var zsortedEles = this.getCachedZSortedEles(); + if (options.full) { + buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(bb.x1 * scale, bb.y1 * scale); + } else { + var pan = cy.pan(); + var translation = { + x: pan.x * scale, + y: pan.y * scale + }; + scale *= cy.zoom(); + buffCxt.translate(translation.x, translation.y); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(-translation.x, -translation.y); + } + if (options.bg) { + buffCxt.globalCompositeOperation = "destination-over"; + buffCxt.fillStyle = options.bg; + buffCxt.rect(0, 0, width, height); + buffCxt.fill(); + } + } + return buffCanvas; + }; + function b64ToBlob(b64, mimeType) { + var bytes = atob(b64); + var buff = new ArrayBuffer(bytes.length); + var buffUint8 = new Uint8Array(buff); + for (var i2 = 0; i2 < bytes.length; i2++) { + buffUint8[i2] = bytes.charCodeAt(i2); + } + return new Blob([buff], { + type: mimeType + }); + } + function b64UriToB64(b64uri) { + var i2 = b64uri.indexOf(","); + return b64uri.substr(i2 + 1); + } + function output(options, canvas, mimeType) { + var getB64Uri = function getB64Uri2() { + return canvas.toDataURL(mimeType, options.quality); + }; + switch (options.output) { + case "blob-promise": + return new Promise$1(function(resolve2, reject) { + try { + canvas.toBlob(function(blob) { + if (blob != null) { + resolve2(blob); + } else { + reject(new Error("`canvas.toBlob()` sent a null value in its callback")); + } + }, mimeType, options.quality); + } catch (err) { + reject(err); + } + }); + case "blob": + return b64ToBlob(b64UriToB64(getB64Uri()), mimeType); + case "base64": + return b64UriToB64(getB64Uri()); + case "base64uri": + default: + return getB64Uri(); + } + } + CRp$2.png = function(options) { + return output(options, this.bufferCanvasImage(options), "image/png"); + }; + CRp$2.jpg = function(options) { + return output(options, this.bufferCanvasImage(options), "image/jpeg"); + }; + var CRp$1 = {}; + CRp$1.nodeShapeImpl = function(name2, context, centerX, centerY, width, height, points) { + switch (name2) { + case "ellipse": + return this.drawEllipsePath(context, centerX, centerY, width, height); + case "polygon": + return this.drawPolygonPath(context, centerX, centerY, width, height, points); + case "round-polygon": + return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points); + case "roundrectangle": + case "round-rectangle": + return this.drawRoundRectanglePath(context, centerX, centerY, width, height); + case "cutrectangle": + case "cut-rectangle": + return this.drawCutRectanglePath(context, centerX, centerY, width, height); + case "bottomroundrectangle": + case "bottom-round-rectangle": + return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height); + case "barrel": + return this.drawBarrelPath(context, centerX, centerY, width, height); + } + }; + var CR = CanvasRenderer; + var CRp = CanvasRenderer.prototype; + CRp.CANVAS_LAYERS = 3; + CRp.SELECT_BOX = 0; + CRp.DRAG = 1; + CRp.NODE = 2; + CRp.BUFFER_COUNT = 3; + CRp.TEXTURE_BUFFER = 0; + CRp.MOTIONBLUR_BUFFER_NODE = 1; + CRp.MOTIONBLUR_BUFFER_DRAG = 2; + function CanvasRenderer(options) { + var r = this; + r.data = { + canvases: new Array(CRp.CANVAS_LAYERS), + contexts: new Array(CRp.CANVAS_LAYERS), + canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS), + bufferCanvases: new Array(CRp.BUFFER_COUNT), + bufferContexts: new Array(CRp.CANVAS_LAYERS) + }; + var tapHlOffAttr = "-webkit-tap-highlight-color"; + var tapHlOffStyle = "rgba(0,0,0,0)"; + r.data.canvasContainer = document.createElement("div"); + var containerStyle = r.data.canvasContainer.style; + r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; + containerStyle.position = "relative"; + containerStyle.zIndex = "0"; + containerStyle.overflow = "hidden"; + var container = options.cy.container(); + container.appendChild(r.data.canvasContainer); + container.style[tapHlOffAttr] = tapHlOffStyle; + var styleMap = { + "-webkit-user-select": "none", + "-moz-user-select": "-moz-none", + "user-select": "none", + "-webkit-tap-highlight-color": "rgba(0,0,0,0)", + "outline-style": "none" + }; + if (ms()) { + styleMap["-ms-touch-action"] = "none"; + styleMap["touch-action"] = "none"; + } + for (var i2 = 0; i2 < CRp.CANVAS_LAYERS; i2++) { + var canvas = r.data.canvases[i2] = document.createElement("canvas"); + r.data.contexts[i2] = canvas.getContext("2d"); + Object.keys(styleMap).forEach(function(k) { + canvas.style[k] = styleMap[k]; + }); + canvas.style.position = "absolute"; + canvas.setAttribute("data-id", "layer" + i2); + canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i2); + r.data.canvasContainer.appendChild(canvas); + r.data.canvasNeedsRedraw[i2] = false; + } + r.data.topCanvas = r.data.canvases[0]; + r.data.canvases[CRp.NODE].setAttribute("data-id", "layer" + CRp.NODE + "-node"); + r.data.canvases[CRp.SELECT_BOX].setAttribute("data-id", "layer" + CRp.SELECT_BOX + "-selectbox"); + r.data.canvases[CRp.DRAG].setAttribute("data-id", "layer" + CRp.DRAG + "-drag"); + for (var i2 = 0; i2 < CRp.BUFFER_COUNT; i2++) { + r.data.bufferCanvases[i2] = document.createElement("canvas"); + r.data.bufferContexts[i2] = r.data.bufferCanvases[i2].getContext("2d"); + r.data.bufferCanvases[i2].style.position = "absolute"; + r.data.bufferCanvases[i2].setAttribute("data-id", "buffer" + i2); + r.data.bufferCanvases[i2].style.zIndex = String(-i2 - 1); + r.data.bufferCanvases[i2].style.visibility = "hidden"; + } + r.pathsEnabled = true; + var emptyBb = makeBoundingBox(); + var getBoxCenter = function getBoxCenter2(bb) { + return { + x: (bb.x1 + bb.x2) / 2, + y: (bb.y1 + bb.y2) / 2 + }; + }; + var getCenterOffset = function getCenterOffset2(bb) { + return { + x: -bb.w / 2, + y: -bb.h / 2 + }; + }; + var backgroundTimestampHasChanged = function backgroundTimestampHasChanged2(ele) { + var _p = ele[0]._private; + var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; + return !same; + }; + var getStyleKey = function getStyleKey2(ele) { + return ele[0]._private.nodeKey; + }; + var getLabelKey = function getLabelKey2(ele) { + return ele[0]._private.labelStyleKey; + }; + var getSourceLabelKey = function getSourceLabelKey2(ele) { + return ele[0]._private.sourceLabelStyleKey; + }; + var getTargetLabelKey = function getTargetLabelKey2(ele) { + return ele[0]._private.targetLabelStyleKey; + }; + var drawElement = function drawElement2(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElement(context, ele, bb, false, false, useEleOpacity); + }; + var drawLabel = function drawLabel2(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, "main", useEleOpacity); + }; + var drawSourceLabel = function drawSourceLabel2(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, "source", useEleOpacity); + }; + var drawTargetLabel = function drawTargetLabel2(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, "target", useEleOpacity); + }; + var getElementBox = function getElementBox2(ele) { + ele.boundingBox(); + return ele[0]._private.bodyBounds; + }; + var getLabelBox = function getLabelBox2(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.main || emptyBb; + }; + var getSourceLabelBox = function getSourceLabelBox2(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.source || emptyBb; + }; + var getTargetLabelBox = function getTargetLabelBox2(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.target || emptyBb; + }; + var isLabelVisibleAtScale = function isLabelVisibleAtScale2(ele, scaledLabelShown) { + return scaledLabelShown; + }; + var getElementRotationPoint = function getElementRotationPoint2(ele) { + return getBoxCenter(getElementBox(ele)); + }; + var addTextMargin = function addTextMargin2(prefix, pt, ele) { + var pre = prefix ? prefix + "-" : ""; + return { + x: pt.x + ele.pstyle(pre + "text-margin-x").pfValue, + y: pt.y + ele.pstyle(pre + "text-margin-y").pfValue + }; + }; + var getRsPt = function getRsPt2(ele, x, y) { + var rs = ele[0]._private.rscratch; + return { + x: rs[x], + y: rs[y] + }; + }; + var getLabelRotationPoint = function getLabelRotationPoint2(ele) { + return addTextMargin("", getRsPt(ele, "labelX", "labelY"), ele); + }; + var getSourceLabelRotationPoint = function getSourceLabelRotationPoint2(ele) { + return addTextMargin("source", getRsPt(ele, "sourceLabelX", "sourceLabelY"), ele); + }; + var getTargetLabelRotationPoint = function getTargetLabelRotationPoint2(ele) { + return addTextMargin("target", getRsPt(ele, "targetLabelX", "targetLabelY"), ele); + }; + var getElementRotationOffset = function getElementRotationOffset2(ele) { + return getCenterOffset(getElementBox(ele)); + }; + var getSourceLabelRotationOffset = function getSourceLabelRotationOffset2(ele) { + return getCenterOffset(getSourceLabelBox(ele)); + }; + var getTargetLabelRotationOffset = function getTargetLabelRotationOffset2(ele) { + return getCenterOffset(getTargetLabelBox(ele)); + }; + var getLabelRotationOffset = function getLabelRotationOffset2(ele) { + var bb = getLabelBox(ele); + var p2 = getCenterOffset(getLabelBox(ele)); + if (ele.isNode()) { + switch (ele.pstyle("text-halign").value) { + case "left": + p2.x = -bb.w; + break; + case "right": + p2.x = 0; + break; + } + switch (ele.pstyle("text-valign").value) { + case "top": + p2.y = -bb.h; + break; + case "bottom": + p2.y = 0; + break; + } + } + return p2; + }; + var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, { + getKey: getStyleKey, + doesEleInvalidateKey: backgroundTimestampHasChanged, + drawElement, + getBoundingBox: getElementBox, + getRotationPoint: getElementRotationPoint, + getRotationOffset: getElementRotationOffset, + allowEdgeTxrCaching: false, + allowParentTxrCaching: false + }); + var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, { + getKey: getLabelKey, + drawElement: drawLabel, + getBoundingBox: getLabelBox, + getRotationPoint: getLabelRotationPoint, + getRotationOffset: getLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, { + getKey: getSourceLabelKey, + drawElement: drawSourceLabel, + getBoundingBox: getSourceLabelBox, + getRotationPoint: getSourceLabelRotationPoint, + getRotationOffset: getSourceLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, { + getKey: getTargetLabelKey, + drawElement: drawTargetLabel, + getBoundingBox: getTargetLabelBox, + getRotationPoint: getTargetLabelRotationPoint, + getRotationOffset: getTargetLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r); + r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) { + eleTxrCache.invalidateElements(eles); + lblTxrCache.invalidateElements(eles); + slbTxrCache.invalidateElements(eles); + tlbTxrCache.invalidateElements(eles); + lyrTxrCache.invalidateElements(eles); + for (var _i = 0; _i < eles.length; _i++) { + var _p = eles[_i]._private; + _p.oldBackgroundTimestamp = _p.backgroundTimestamp; + } + }); + var refineInLayers = function refineInLayers2(reqs) { + for (var i3 = 0; i3 < reqs.length; i3++) { + lyrTxrCache.enqueueElementRefinement(reqs[i3].ele); + } + }; + eleTxrCache.onDequeue(refineInLayers); + lblTxrCache.onDequeue(refineInLayers); + slbTxrCache.onDequeue(refineInLayers); + tlbTxrCache.onDequeue(refineInLayers); + } + CRp.redrawHint = function(group, bool) { + var r = this; + switch (group) { + case "eles": + r.data.canvasNeedsRedraw[CRp.NODE] = bool; + break; + case "drag": + r.data.canvasNeedsRedraw[CRp.DRAG] = bool; + break; + case "select": + r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool; + break; + } + }; + var pathsImpld = typeof Path2D !== "undefined"; + CRp.path2dEnabled = function(on) { + if (on === void 0) { + return this.pathsEnabled; + } + this.pathsEnabled = on ? true : false; + }; + CRp.usePaths = function() { + return pathsImpld && this.pathsEnabled; + }; + CRp.setImgSmoothing = function(context, bool) { + if (context.imageSmoothingEnabled != null) { + context.imageSmoothingEnabled = bool; + } else { + context.webkitImageSmoothingEnabled = bool; + context.mozImageSmoothingEnabled = bool; + context.msImageSmoothingEnabled = bool; + } + }; + CRp.getImgSmoothing = function(context) { + if (context.imageSmoothingEnabled != null) { + return context.imageSmoothingEnabled; + } else { + return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; + } + }; + CRp.makeOffscreenCanvas = function(width, height) { + var canvas; + if ((typeof OffscreenCanvas === "undefined" ? "undefined" : _typeof(OffscreenCanvas)) !== "undefined") { + canvas = new OffscreenCanvas(width, height); + } else { + canvas = document.createElement("canvas"); + canvas.width = width; + canvas.height = height; + } + return canvas; + }; + [CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function(props) { + extend(CRp, props); + }); + var renderer = [{ + name: "null", + impl: NullRenderer + }, { + name: "base", + impl: BR + }, { + name: "canvas", + impl: CR + }]; + var incExts = [{ + type: "layout", + extensions: layout + }, { + type: "renderer", + extensions: renderer + }]; + var extensions = {}; + var modules = {}; + function setExtension(type, name2, registrant) { + var ext = registrant; + var overrideErr = function overrideErr2(field) { + warn("Can not register `" + name2 + "` for `" + type + "` since `" + field + "` already exists in the prototype and can not be overridden"); + }; + if (type === "core") { + if (Core.prototype[name2]) { + return overrideErr(name2); + } else { + Core.prototype[name2] = registrant; + } + } else if (type === "collection") { + if (Collection.prototype[name2]) { + return overrideErr(name2); + } else { + Collection.prototype[name2] = registrant; + } + } else if (type === "layout") { + var Layout2 = function Layout3(options) { + this.options = options; + registrant.call(this, options); + if (!plainObject(this._private)) { + this._private = {}; + } + this._private.cy = options.cy; + this._private.listeners = []; + this.createEmitter(); + }; + var layoutProto = Layout2.prototype = Object.create(registrant.prototype); + var optLayoutFns = []; + for (var i2 = 0; i2 < optLayoutFns.length; i2++) { + var fnName = optLayoutFns[i2]; + layoutProto[fnName] = layoutProto[fnName] || function() { + return this; + }; + } + if (layoutProto.start && !layoutProto.run) { + layoutProto.run = function() { + this.start(); + return this; + }; + } else if (!layoutProto.start && layoutProto.run) { + layoutProto.start = function() { + this.run(); + return this; + }; + } + var regStop = registrant.prototype.stop; + layoutProto.stop = function() { + var opts = this.options; + if (opts && opts.animate) { + var anis = this.animations; + if (anis) { + for (var _i = 0; _i < anis.length; _i++) { + anis[_i].stop(); + } + } + } + if (regStop) { + regStop.call(this); + } else { + this.emit("layoutstop"); + } + return this; + }; + if (!layoutProto.destroy) { + layoutProto.destroy = function() { + return this; + }; + } + layoutProto.cy = function() { + return this._private.cy; + }; + var getCy = function getCy2(layout2) { + return layout2._private.cy; + }; + var emitterOpts = { + addEventFields: function addEventFields(layout2, evt) { + evt.layout = layout2; + evt.cy = getCy(layout2); + evt.target = layout2; + }, + bubble: function bubble() { + return true; + }, + parent: function parent(layout2) { + return getCy(layout2); + } + }; + extend(layoutProto, { + createEmitter: function createEmitter() { + this._private.emitter = new Emitter(emitterOpts, this); + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(evt, cb) { + this.emitter().on(evt, cb); + return this; + }, + one: function one(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + once: function once(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + removeListener: function removeListener(evt, cb) { + this.emitter().removeListener(evt, cb); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + emit: function emit(evt, params) { + this.emitter().emit(evt, params); + return this; + } + }); + define.eventAliasesOn(layoutProto); + ext = Layout2; + } else if (type === "renderer" && name2 !== "null" && name2 !== "base") { + var BaseRenderer2 = getExtension("renderer", "base"); + var bProto = BaseRenderer2.prototype; + var RegistrantRenderer = registrant; + var rProto = registrant.prototype; + var Renderer = function Renderer2() { + BaseRenderer2.apply(this, arguments); + RegistrantRenderer.apply(this, arguments); + }; + var proto = Renderer.prototype; + for (var pName in bProto) { + var pVal = bProto[pName]; + var existsInR = rProto[pName] != null; + if (existsInR) { + return overrideErr(pName); + } + proto[pName] = pVal; + } + for (var _pName in rProto) { + proto[_pName] = rProto[_pName]; + } + bProto.clientFunctions.forEach(function(name3) { + proto[name3] = proto[name3] || function() { + error("Renderer does not implement `renderer." + name3 + "()` on its prototype"); + }; + }); + ext = Renderer; + } else if (type === "__proto__" || type === "constructor" || type === "prototype") { + return error(type + " is an illegal type to be registered, possibly lead to prototype pollutions"); + } + return setMap({ + map: extensions, + keys: [type, name2], + value: ext + }); + } + function getExtension(type, name2) { + return getMap({ + map: extensions, + keys: [type, name2] + }); + } + function setModule(type, name2, moduleType, moduleName, registrant) { + return setMap({ + map: modules, + keys: [type, name2, moduleType, moduleName], + value: registrant + }); + } + function getModule(type, name2, moduleType, moduleName) { + return getMap({ + map: modules, + keys: [type, name2, moduleType, moduleName] + }); + } + var extension = function extension2() { + if (arguments.length === 2) { + return getExtension.apply(null, arguments); + } else if (arguments.length === 3) { + return setExtension.apply(null, arguments); + } else if (arguments.length === 4) { + return getModule.apply(null, arguments); + } else if (arguments.length === 5) { + return setModule.apply(null, arguments); + } else { + error("Invalid extension access syntax"); + } + }; + Core.prototype.extension = extension; + incExts.forEach(function(group) { + group.extensions.forEach(function(ext) { + setExtension(group.type, ext.name, ext.impl); + }); + }); + var Stylesheet = function Stylesheet2() { + if (!(this instanceof Stylesheet2)) { + return new Stylesheet2(); + } + this.length = 0; + }; + var sheetfn = Stylesheet.prototype; + sheetfn.instanceString = function() { + return "stylesheet"; + }; + sheetfn.selector = function(selector) { + var i2 = this.length++; + this[i2] = { + selector, + properties: [] + }; + return this; + }; + sheetfn.css = function(name2, value) { + var i2 = this.length - 1; + if (string(name2)) { + this[i2].properties.push({ + name: name2, + value + }); + } else if (plainObject(name2)) { + var map = name2; + var propNames = Object.keys(map); + for (var j = 0; j < propNames.length; j++) { + var key = propNames[j]; + var mapVal = map[key]; + if (mapVal == null) { + continue; + } + var prop = Style.properties[key] || Style.properties[dash2camel(key)]; + if (prop == null) { + continue; + } + var _name = prop.name; + var _value = mapVal; + this[i2].properties.push({ + name: _name, + value: _value + }); + } + } + return this; + }; + sheetfn.style = sheetfn.css; + sheetfn.generateStyle = function(cy) { + var style = new Style(cy); + return this.appendToStyle(style); + }; + sheetfn.appendToStyle = function(style) { + for (var i2 = 0; i2 < this.length; i2++) { + var context = this[i2]; + var selector = context.selector; + var props = context.properties; + style.selector(selector); + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + style.css(prop.name, prop.value); + } + } + return style; + }; + var version = "3.23.0"; + var cytoscape2 = function cytoscape3(options) { + if (options === void 0) { + options = {}; + } + if (plainObject(options)) { + return new Core(options); + } else if (string(options)) { + return extension.apply(extension, arguments); + } + }; + cytoscape2.use = function(ext) { + var args = Array.prototype.slice.call(arguments, 1); + args.unshift(cytoscape2); + ext.apply(null, args); + return this; + }; + cytoscape2.warnings = function(bool) { + return warnings(bool); + }; + cytoscape2.version = version; + cytoscape2.stylesheet = cytoscape2.Stylesheet = Stylesheet; + return cytoscape2; + }); +})(cytoscape_umd); +var cytoscape_umdExports = cytoscape_umd.exports; +const cytoscape$1 = /* @__PURE__ */ getDefaultExportFromCjs(cytoscape_umdExports); +var cytoscapeCoseBilkent = { exports: {} }; +var coseBase = { exports: {} }; +var layoutBase = { exports: {} }; +var hasRequiredLayoutBase; +function requireLayoutBase() { + if (hasRequiredLayoutBase) + return layoutBase.exports; + hasRequiredLayoutBase = 1; + (function(module, exports) { + (function webpackUniversalModuleDefinition(root, factory) { + module.exports = factory(); + })(commonjsGlobal, function() { + return ( + /******/ + function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module2 = installedModules[moduleId] = { + /******/ + i: moduleId, + /******/ + l: false, + /******/ + exports: {} + /******/ + }; + modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__); + module2.l = true; + return module2.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value) { + return value; + }; + __webpack_require__.d = function(exports2, name2, getter) { + if (!__webpack_require__.o(exports2, name2)) { + Object.defineProperty(exports2, name2, { + /******/ + configurable: false, + /******/ + enumerable: true, + /******/ + get: getter + /******/ + }); + } + }; + __webpack_require__.n = function(module2) { + var getter = module2 && module2.__esModule ? ( + /******/ + function getDefault() { + return module2["default"]; + } + ) : ( + /******/ + function getModuleExports() { + return module2; + } + ); + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 26); + }([ + /* 0 */ + /***/ + function(module2, exports2, __webpack_require__) { + function LayoutConstants() { + } + LayoutConstants.QUALITY = 1; + LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; + LayoutConstants.DEFAULT_INCREMENTAL = false; + LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; + LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; + LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; + LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; + LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; + LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; + LayoutConstants.SIMPLE_NODE_SIZE = 40; + LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; + LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; + LayoutConstants.MIN_EDGE_LENGTH = 1; + LayoutConstants.WORLD_BOUNDARY = 1e6; + LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1e3; + LayoutConstants.WORLD_CENTER_X = 1200; + LayoutConstants.WORLD_CENTER_Y = 900; + module2.exports = LayoutConstants; + }, + /* 1 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LGraphObject = __webpack_require__(2); + var IGeometry = __webpack_require__(8); + var IMath = __webpack_require__(9); + function LEdge(source, target, vEdge) { + LGraphObject.call(this, vEdge); + this.isOverlapingSourceAndTarget = false; + this.vGraphObject = vEdge; + this.bendpoints = []; + this.source = source; + this.target = target; + } + LEdge.prototype = Object.create(LGraphObject.prototype); + for (var prop in LGraphObject) { + LEdge[prop] = LGraphObject[prop]; + } + LEdge.prototype.getSource = function() { + return this.source; + }; + LEdge.prototype.getTarget = function() { + return this.target; + }; + LEdge.prototype.isInterGraph = function() { + return this.isInterGraph; + }; + LEdge.prototype.getLength = function() { + return this.length; + }; + LEdge.prototype.isOverlapingSourceAndTarget = function() { + return this.isOverlapingSourceAndTarget; + }; + LEdge.prototype.getBendpoints = function() { + return this.bendpoints; + }; + LEdge.prototype.getLca = function() { + return this.lca; + }; + LEdge.prototype.getSourceInLca = function() { + return this.sourceInLca; + }; + LEdge.prototype.getTargetInLca = function() { + return this.targetInLca; + }; + LEdge.prototype.getOtherEnd = function(node) { + if (this.source === node) { + return this.target; + } else if (this.target === node) { + return this.source; + } else { + throw "Node is not incident with this edge"; + } + }; + LEdge.prototype.getOtherEndInGraph = function(node, graph) { + var otherEnd = this.getOtherEnd(node); + var root = graph.getGraphManager().getRoot(); + while (true) { + if (otherEnd.getOwner() == graph) { + return otherEnd; + } + if (otherEnd.getOwner() == root) { + break; + } + otherEnd = otherEnd.getOwner().getParent(); + } + return null; + }; + LEdge.prototype.updateLength = function() { + var clipPointCoordinates = new Array(4); + this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); + if (!this.isOverlapingSourceAndTarget) { + this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; + this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; + if (Math.abs(this.lengthX) < 1) { + this.lengthX = IMath.sign(this.lengthX); + } + if (Math.abs(this.lengthY) < 1) { + this.lengthY = IMath.sign(this.lengthY); + } + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + } + }; + LEdge.prototype.updateLengthSimple = function() { + this.lengthX = this.target.getCenterX() - this.source.getCenterX(); + this.lengthY = this.target.getCenterY() - this.source.getCenterY(); + if (Math.abs(this.lengthX) < 1) { + this.lengthX = IMath.sign(this.lengthX); + } + if (Math.abs(this.lengthY) < 1) { + this.lengthY = IMath.sign(this.lengthY); + } + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + }; + module2.exports = LEdge; + }, + /* 2 */ + /***/ + function(module2, exports2, __webpack_require__) { + function LGraphObject(vGraphObject) { + this.vGraphObject = vGraphObject; + } + module2.exports = LGraphObject; + }, + /* 3 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LGraphObject = __webpack_require__(2); + var Integer = __webpack_require__(10); + var RectangleD = __webpack_require__(13); + var LayoutConstants = __webpack_require__(0); + var RandomSeed = __webpack_require__(16); + var PointD = __webpack_require__(4); + function LNode(gm, loc, size, vNode) { + if (size == null && vNode == null) { + vNode = loc; + } + LGraphObject.call(this, vNode); + if (gm.graphManager != null) + gm = gm.graphManager; + this.estimatedSize = Integer.MIN_VALUE; + this.inclusionTreeDepth = Integer.MAX_VALUE; + this.vGraphObject = vNode; + this.edges = []; + this.graphManager = gm; + if (size != null && loc != null) + this.rect = new RectangleD(loc.x, loc.y, size.width, size.height); + else + this.rect = new RectangleD(); + } + LNode.prototype = Object.create(LGraphObject.prototype); + for (var prop in LGraphObject) { + LNode[prop] = LGraphObject[prop]; + } + LNode.prototype.getEdges = function() { + return this.edges; + }; + LNode.prototype.getChild = function() { + return this.child; + }; + LNode.prototype.getOwner = function() { + return this.owner; + }; + LNode.prototype.getWidth = function() { + return this.rect.width; + }; + LNode.prototype.setWidth = function(width) { + this.rect.width = width; + }; + LNode.prototype.getHeight = function() { + return this.rect.height; + }; + LNode.prototype.setHeight = function(height) { + this.rect.height = height; + }; + LNode.prototype.getCenterX = function() { + return this.rect.x + this.rect.width / 2; + }; + LNode.prototype.getCenterY = function() { + return this.rect.y + this.rect.height / 2; + }; + LNode.prototype.getCenter = function() { + return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); + }; + LNode.prototype.getLocation = function() { + return new PointD(this.rect.x, this.rect.y); + }; + LNode.prototype.getRect = function() { + return this.rect; + }; + LNode.prototype.getDiagonal = function() { + return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); + }; + LNode.prototype.getHalfTheDiagonal = function() { + return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; + }; + LNode.prototype.setRect = function(upperLeft, dimension) { + this.rect.x = upperLeft.x; + this.rect.y = upperLeft.y; + this.rect.width = dimension.width; + this.rect.height = dimension.height; + }; + LNode.prototype.setCenter = function(cx, cy) { + this.rect.x = cx - this.rect.width / 2; + this.rect.y = cy - this.rect.height / 2; + }; + LNode.prototype.setLocation = function(x, y) { + this.rect.x = x; + this.rect.y = y; + }; + LNode.prototype.moveBy = function(dx, dy) { + this.rect.x += dx; + this.rect.y += dy; + }; + LNode.prototype.getEdgeListToNode = function(to) { + var edgeList = []; + var self2 = this; + self2.edges.forEach(function(edge) { + if (edge.target == to) { + if (edge.source != self2) + throw "Incorrect edge source!"; + edgeList.push(edge); + } + }); + return edgeList; + }; + LNode.prototype.getEdgesBetween = function(other) { + var edgeList = []; + var self2 = this; + self2.edges.forEach(function(edge) { + if (!(edge.source == self2 || edge.target == self2)) + throw "Incorrect edge source and/or target"; + if (edge.target == other || edge.source == other) { + edgeList.push(edge); + } + }); + return edgeList; + }; + LNode.prototype.getNeighborsList = function() { + var neighbors = /* @__PURE__ */ new Set(); + var self2 = this; + self2.edges.forEach(function(edge) { + if (edge.source == self2) { + neighbors.add(edge.target); + } else { + if (edge.target != self2) { + throw "Incorrect incidency!"; + } + neighbors.add(edge.source); + } + }); + return neighbors; + }; + LNode.prototype.withChildren = function() { + var withNeighborsList = /* @__PURE__ */ new Set(); + var childNode; + var children; + withNeighborsList.add(this); + if (this.child != null) { + var nodes2 = this.child.getNodes(); + for (var i = 0; i < nodes2.length; i++) { + childNode = nodes2[i]; + children = childNode.withChildren(); + children.forEach(function(node) { + withNeighborsList.add(node); + }); + } + } + return withNeighborsList; + }; + LNode.prototype.getNoOfChildren = function() { + var noOfChildren = 0; + var childNode; + if (this.child == null) { + noOfChildren = 1; + } else { + var nodes2 = this.child.getNodes(); + for (var i = 0; i < nodes2.length; i++) { + childNode = nodes2[i]; + noOfChildren += childNode.getNoOfChildren(); + } + } + if (noOfChildren == 0) { + noOfChildren = 1; + } + return noOfChildren; + }; + LNode.prototype.getEstimatedSize = function() { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; + }; + LNode.prototype.calcEstimatedSize = function() { + if (this.child == null) { + return this.estimatedSize = (this.rect.width + this.rect.height) / 2; + } else { + this.estimatedSize = this.child.calcEstimatedSize(); + this.rect.width = this.estimatedSize; + this.rect.height = this.estimatedSize; + return this.estimatedSize; + } + }; + LNode.prototype.scatter = function() { + var randomCenterX; + var randomCenterY; + var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; + var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; + this.rect.x = randomCenterX; + this.rect.y = randomCenterY; + }; + LNode.prototype.updateBounds = function() { + if (this.getChild() == null) { + throw "assert failed"; + } + if (this.getChild().getNodes().length != 0) { + var childGraph = this.getChild(); + childGraph.updateBounds(true); + this.rect.x = childGraph.getLeft(); + this.rect.y = childGraph.getTop(); + this.setWidth(childGraph.getRight() - childGraph.getLeft()); + this.setHeight(childGraph.getBottom() - childGraph.getTop()); + if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + var width = childGraph.getRight() - childGraph.getLeft(); + var height = childGraph.getBottom() - childGraph.getTop(); + if (this.labelWidth > width) { + this.rect.x -= (this.labelWidth - width) / 2; + this.setWidth(this.labelWidth); + } + if (this.labelHeight > height) { + if (this.labelPos == "center") { + this.rect.y -= (this.labelHeight - height) / 2; + } else if (this.labelPos == "top") { + this.rect.y -= this.labelHeight - height; + } + this.setHeight(this.labelHeight); + } + } + } + }; + LNode.prototype.getInclusionTreeDepth = function() { + if (this.inclusionTreeDepth == Integer.MAX_VALUE) { + throw "assert failed"; + } + return this.inclusionTreeDepth; + }; + LNode.prototype.transform = function(trans) { + var left = this.rect.x; + if (left > LayoutConstants.WORLD_BOUNDARY) { + left = LayoutConstants.WORLD_BOUNDARY; + } else if (left < -LayoutConstants.WORLD_BOUNDARY) { + left = -LayoutConstants.WORLD_BOUNDARY; + } + var top = this.rect.y; + if (top > LayoutConstants.WORLD_BOUNDARY) { + top = LayoutConstants.WORLD_BOUNDARY; + } else if (top < -LayoutConstants.WORLD_BOUNDARY) { + top = -LayoutConstants.WORLD_BOUNDARY; + } + var leftTop = new PointD(left, top); + var vLeftTop = trans.inverseTransformPoint(leftTop); + this.setLocation(vLeftTop.x, vLeftTop.y); + }; + LNode.prototype.getLeft = function() { + return this.rect.x; + }; + LNode.prototype.getRight = function() { + return this.rect.x + this.rect.width; + }; + LNode.prototype.getTop = function() { + return this.rect.y; + }; + LNode.prototype.getBottom = function() { + return this.rect.y + this.rect.height; + }; + LNode.prototype.getParent = function() { + if (this.owner == null) { + return null; + } + return this.owner.getParent(); + }; + module2.exports = LNode; + }, + /* 4 */ + /***/ + function(module2, exports2, __webpack_require__) { + function PointD(x, y) { + if (x == null && y == null) { + this.x = 0; + this.y = 0; + } else { + this.x = x; + this.y = y; + } + } + PointD.prototype.getX = function() { + return this.x; + }; + PointD.prototype.getY = function() { + return this.y; + }; + PointD.prototype.setX = function(x) { + this.x = x; + }; + PointD.prototype.setY = function(y) { + this.y = y; + }; + PointD.prototype.getDifference = function(pt) { + return new DimensionD(this.x - pt.x, this.y - pt.y); + }; + PointD.prototype.getCopy = function() { + return new PointD(this.x, this.y); + }; + PointD.prototype.translate = function(dim) { + this.x += dim.width; + this.y += dim.height; + return this; + }; + module2.exports = PointD; + }, + /* 5 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LGraphObject = __webpack_require__(2); + var Integer = __webpack_require__(10); + var LayoutConstants = __webpack_require__(0); + var LGraphManager = __webpack_require__(6); + var LNode = __webpack_require__(3); + var LEdge = __webpack_require__(1); + var RectangleD = __webpack_require__(13); + var Point2 = __webpack_require__(12); + var LinkedList = __webpack_require__(11); + function LGraph(parent, obj2, vGraph) { + LGraphObject.call(this, vGraph); + this.estimatedSize = Integer.MIN_VALUE; + this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; + this.edges = []; + this.nodes = []; + this.isConnected = false; + this.parent = parent; + if (obj2 != null && obj2 instanceof LGraphManager) { + this.graphManager = obj2; + } else if (obj2 != null && obj2 instanceof Layout) { + this.graphManager = obj2.graphManager; + } + } + LGraph.prototype = Object.create(LGraphObject.prototype); + for (var prop in LGraphObject) { + LGraph[prop] = LGraphObject[prop]; + } + LGraph.prototype.getNodes = function() { + return this.nodes; + }; + LGraph.prototype.getEdges = function() { + return this.edges; + }; + LGraph.prototype.getGraphManager = function() { + return this.graphManager; + }; + LGraph.prototype.getParent = function() { + return this.parent; + }; + LGraph.prototype.getLeft = function() { + return this.left; + }; + LGraph.prototype.getRight = function() { + return this.right; + }; + LGraph.prototype.getTop = function() { + return this.top; + }; + LGraph.prototype.getBottom = function() { + return this.bottom; + }; + LGraph.prototype.isConnected = function() { + return this.isConnected; + }; + LGraph.prototype.add = function(obj1, sourceNode, targetNode) { + if (sourceNode == null && targetNode == null) { + var newNode = obj1; + if (this.graphManager == null) { + throw "Graph has no graph mgr!"; + } + if (this.getNodes().indexOf(newNode) > -1) { + throw "Node already in graph!"; + } + newNode.owner = this; + this.getNodes().push(newNode); + return newNode; + } else { + var newEdge = obj1; + if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { + throw "Source or target not in graph!"; + } + if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { + throw "Both owners must be this graph!"; + } + if (sourceNode.owner != targetNode.owner) { + return null; + } + newEdge.source = sourceNode; + newEdge.target = targetNode; + newEdge.isInterGraph = false; + this.getEdges().push(newEdge); + sourceNode.edges.push(newEdge); + if (targetNode != sourceNode) { + targetNode.edges.push(newEdge); + } + return newEdge; + } + }; + LGraph.prototype.remove = function(obj) { + var node = obj; + if (obj instanceof LNode) { + if (node == null) { + throw "Node is null!"; + } + if (!(node.owner != null && node.owner == this)) { + throw "Owner graph is invalid!"; + } + if (this.graphManager == null) { + throw "Owner graph manager is invalid!"; + } + var edgesToBeRemoved = node.edges.slice(); + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + if (edge.isInterGraph) { + this.graphManager.remove(edge); + } else { + edge.source.owner.remove(edge); + } + } + var index = this.nodes.indexOf(node); + if (index == -1) { + throw "Node not in owner node list!"; + } + this.nodes.splice(index, 1); + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge == null) { + throw "Edge is null!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { + throw "Source and/or target owner is invalid!"; + } + var sourceIndex = edge.source.edges.indexOf(edge); + var targetIndex = edge.target.edges.indexOf(edge); + if (!(sourceIndex > -1 && targetIndex > -1)) { + throw "Source and/or target doesn't know this edge!"; + } + edge.source.edges.splice(sourceIndex, 1); + if (edge.target != edge.source) { + edge.target.edges.splice(targetIndex, 1); + } + var index = edge.source.owner.getEdges().indexOf(edge); + if (index == -1) { + throw "Not in owner's edge list!"; + } + edge.source.owner.getEdges().splice(index, 1); + } + }; + LGraph.prototype.updateLeftTop = function() { + var top = Integer.MAX_VALUE; + var left = Integer.MAX_VALUE; + var nodeTop; + var nodeLeft; + var margin; + var nodes2 = this.getNodes(); + var s = nodes2.length; + for (var i = 0; i < s; i++) { + var lNode = nodes2[i]; + nodeTop = lNode.getTop(); + nodeLeft = lNode.getLeft(); + if (top > nodeTop) { + top = nodeTop; + } + if (left > nodeLeft) { + left = nodeLeft; + } + } + if (top == Integer.MAX_VALUE) { + return null; + } + if (nodes2[0].getParent().paddingLeft != void 0) { + margin = nodes2[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + this.left = left - margin; + this.top = top - margin; + return new Point2(this.left, this.top); + }; + LGraph.prototype.updateBounds = function(recursive) { + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var margin; + var nodes2 = this.nodes; + var s = nodes2.length; + for (var i = 0; i < s; i++) { + var lNode = nodes2[i]; + if (recursive && lNode.child != null) { + lNode.updateBounds(); + } + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + if (left > nodeLeft) { + left = nodeLeft; + } + if (right < nodeRight) { + right = nodeRight; + } + if (top > nodeTop) { + top = nodeTop; + } + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + if (left == Integer.MAX_VALUE) { + this.left = this.parent.getLeft(); + this.right = this.parent.getRight(); + this.top = this.parent.getTop(); + this.bottom = this.parent.getBottom(); + } + if (nodes2[0].getParent().paddingLeft != void 0) { + margin = nodes2[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + this.left = boundingRect.x - margin; + this.right = boundingRect.x + boundingRect.width + margin; + this.top = boundingRect.y - margin; + this.bottom = boundingRect.y + boundingRect.height + margin; + }; + LGraph.calculateBounds = function(nodes2) { + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var s = nodes2.length; + for (var i = 0; i < s; i++) { + var lNode = nodes2[i]; + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + if (left > nodeLeft) { + left = nodeLeft; + } + if (right < nodeRight) { + right = nodeRight; + } + if (top > nodeTop) { + top = nodeTop; + } + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + return boundingRect; + }; + LGraph.prototype.getInclusionTreeDepth = function() { + if (this == this.graphManager.getRoot()) { + return 1; + } else { + return this.parent.getInclusionTreeDepth(); + } + }; + LGraph.prototype.getEstimatedSize = function() { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; + }; + LGraph.prototype.calcEstimatedSize = function() { + var size = 0; + var nodes2 = this.nodes; + var s = nodes2.length; + for (var i = 0; i < s; i++) { + var lNode = nodes2[i]; + size += lNode.calcEstimatedSize(); + } + if (size == 0) { + this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; + } else { + this.estimatedSize = size / Math.sqrt(this.nodes.length); + } + return this.estimatedSize; + }; + LGraph.prototype.updateConnected = function() { + var self2 = this; + if (this.nodes.length == 0) { + this.isConnected = true; + return; + } + var queue = new LinkedList(); + var visited = /* @__PURE__ */ new Set(); + var currentNode = this.nodes[0]; + var neighborEdges; + var currentNeighbor; + var childrenOfNode = currentNode.withChildren(); + childrenOfNode.forEach(function(node) { + queue.push(node); + visited.add(node); + }); + while (queue.length !== 0) { + currentNode = queue.shift(); + neighborEdges = currentNode.getEdges(); + var size = neighborEdges.length; + for (var i = 0; i < size; i++) { + var neighborEdge = neighborEdges[i]; + currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); + if (currentNeighbor != null && !visited.has(currentNeighbor)) { + var childrenOfNeighbor = currentNeighbor.withChildren(); + childrenOfNeighbor.forEach(function(node) { + queue.push(node); + visited.add(node); + }); + } + } + } + this.isConnected = false; + if (visited.size >= this.nodes.length) { + var noOfVisitedInThisGraph = 0; + visited.forEach(function(visitedNode) { + if (visitedNode.owner == self2) { + noOfVisitedInThisGraph++; + } + }); + if (noOfVisitedInThisGraph == this.nodes.length) { + this.isConnected = true; + } + } + }; + module2.exports = LGraph; + }, + /* 6 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LGraph; + var LEdge = __webpack_require__(1); + function LGraphManager(layout) { + LGraph = __webpack_require__(5); + this.layout = layout; + this.graphs = []; + this.edges = []; + } + LGraphManager.prototype.addRoot = function() { + var ngraph = this.layout.newGraph(); + var nnode = this.layout.newNode(null); + var root = this.add(ngraph, nnode); + this.setRootGraph(root); + return this.rootGraph; + }; + LGraphManager.prototype.add = function(newGraph, parentNode, newEdge, sourceNode, targetNode) { + if (newEdge == null && sourceNode == null && targetNode == null) { + if (newGraph == null) { + throw "Graph is null!"; + } + if (parentNode == null) { + throw "Parent node is null!"; + } + if (this.graphs.indexOf(newGraph) > -1) { + throw "Graph already in this graph mgr!"; + } + this.graphs.push(newGraph); + if (newGraph.parent != null) { + throw "Already has a parent!"; + } + if (parentNode.child != null) { + throw "Already has a child!"; + } + newGraph.parent = parentNode; + parentNode.child = newGraph; + return newGraph; + } else { + targetNode = newEdge; + sourceNode = parentNode; + newEdge = newGraph; + var sourceGraph = sourceNode.getOwner(); + var targetGraph = targetNode.getOwner(); + if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { + throw "Source not in this graph mgr!"; + } + if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { + throw "Target not in this graph mgr!"; + } + if (sourceGraph == targetGraph) { + newEdge.isInterGraph = false; + return sourceGraph.add(newEdge, sourceNode, targetNode); + } else { + newEdge.isInterGraph = true; + newEdge.source = sourceNode; + newEdge.target = targetNode; + if (this.edges.indexOf(newEdge) > -1) { + throw "Edge already in inter-graph edge list!"; + } + this.edges.push(newEdge); + if (!(newEdge.source != null && newEdge.target != null)) { + throw "Edge source and/or target is null!"; + } + if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { + throw "Edge already in source and/or target incidency list!"; + } + newEdge.source.edges.push(newEdge); + newEdge.target.edges.push(newEdge); + return newEdge; + } + } + }; + LGraphManager.prototype.remove = function(lObj) { + if (lObj instanceof LGraph) { + var graph = lObj; + if (graph.getGraphManager() != this) { + throw "Graph not in this graph mgr"; + } + if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { + throw "Invalid parent node!"; + } + var edgesToBeRemoved = []; + edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + graph.remove(edge); + } + var nodesToBeRemoved = []; + nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); + var node; + s = nodesToBeRemoved.length; + for (var i = 0; i < s; i++) { + node = nodesToBeRemoved[i]; + graph.remove(node); + } + if (graph == this.rootGraph) { + this.setRootGraph(null); + } + var index = this.graphs.indexOf(graph); + this.graphs.splice(index, 1); + graph.parent = null; + } else if (lObj instanceof LEdge) { + edge = lObj; + if (edge == null) { + throw "Edge is null!"; + } + if (!edge.isInterGraph) { + throw "Not an inter-graph edge!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { + throw "Source and/or target doesn't know this edge!"; + } + var index = edge.source.edges.indexOf(edge); + edge.source.edges.splice(index, 1); + index = edge.target.edges.indexOf(edge); + edge.target.edges.splice(index, 1); + if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { + throw "Edge owner graph or owner graph manager is null!"; + } + if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { + throw "Not in owner graph manager's edge list!"; + } + var index = edge.source.owner.getGraphManager().edges.indexOf(edge); + edge.source.owner.getGraphManager().edges.splice(index, 1); + } + }; + LGraphManager.prototype.updateBounds = function() { + this.rootGraph.updateBounds(true); + }; + LGraphManager.prototype.getGraphs = function() { + return this.graphs; + }; + LGraphManager.prototype.getAllNodes = function() { + if (this.allNodes == null) { + var nodeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < s; i++) { + nodeList = nodeList.concat(graphs[i].getNodes()); + } + this.allNodes = nodeList; + } + return this.allNodes; + }; + LGraphManager.prototype.resetAllNodes = function() { + this.allNodes = null; + }; + LGraphManager.prototype.resetAllEdges = function() { + this.allEdges = null; + }; + LGraphManager.prototype.resetAllNodesToApplyGravitation = function() { + this.allNodesToApplyGravitation = null; + }; + LGraphManager.prototype.getAllEdges = function() { + if (this.allEdges == null) { + var edgeList = []; + var graphs = this.getGraphs(); + graphs.length; + for (var i = 0; i < graphs.length; i++) { + edgeList = edgeList.concat(graphs[i].getEdges()); + } + edgeList = edgeList.concat(this.edges); + this.allEdges = edgeList; + } + return this.allEdges; + }; + LGraphManager.prototype.getAllNodesToApplyGravitation = function() { + return this.allNodesToApplyGravitation; + }; + LGraphManager.prototype.setAllNodesToApplyGravitation = function(nodeList) { + if (this.allNodesToApplyGravitation != null) { + throw "assert failed"; + } + this.allNodesToApplyGravitation = nodeList; + }; + LGraphManager.prototype.getRoot = function() { + return this.rootGraph; + }; + LGraphManager.prototype.setRootGraph = function(graph) { + if (graph.getGraphManager() != this) { + throw "Root not in this graph mgr!"; + } + this.rootGraph = graph; + if (graph.parent == null) { + graph.parent = this.layout.newNode("Root node"); + } + }; + LGraphManager.prototype.getLayout = function() { + return this.layout; + }; + LGraphManager.prototype.isOneAncestorOfOther = function(firstNode, secondNode) { + if (!(firstNode != null && secondNode != null)) { + throw "assert failed"; + } + if (firstNode == secondNode) { + return true; + } + var ownerGraph = firstNode.getOwner(); + var parentNode; + do { + parentNode = ownerGraph.getParent(); + if (parentNode == null) { + break; + } + if (parentNode == secondNode) { + return true; + } + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + ownerGraph = secondNode.getOwner(); + do { + parentNode = ownerGraph.getParent(); + if (parentNode == null) { + break; + } + if (parentNode == firstNode) { + return true; + } + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + return false; + }; + LGraphManager.prototype.calcLowestCommonAncestors = function() { + var edge; + var sourceNode; + var targetNode; + var sourceAncestorGraph; + var targetAncestorGraph; + var edges = this.getAllEdges(); + var s = edges.length; + for (var i = 0; i < s; i++) { + edge = edges[i]; + sourceNode = edge.source; + targetNode = edge.target; + edge.lca = null; + edge.sourceInLca = sourceNode; + edge.targetInLca = targetNode; + if (sourceNode == targetNode) { + edge.lca = sourceNode.getOwner(); + continue; + } + sourceAncestorGraph = sourceNode.getOwner(); + while (edge.lca == null) { + edge.targetInLca = targetNode; + targetAncestorGraph = targetNode.getOwner(); + while (edge.lca == null) { + if (targetAncestorGraph == sourceAncestorGraph) { + edge.lca = targetAncestorGraph; + break; + } + if (targetAncestorGraph == this.rootGraph) { + break; + } + if (edge.lca != null) { + throw "assert failed"; + } + edge.targetInLca = targetAncestorGraph.getParent(); + targetAncestorGraph = edge.targetInLca.getOwner(); + } + if (sourceAncestorGraph == this.rootGraph) { + break; + } + if (edge.lca == null) { + edge.sourceInLca = sourceAncestorGraph.getParent(); + sourceAncestorGraph = edge.sourceInLca.getOwner(); + } + } + if (edge.lca == null) { + throw "assert failed"; + } + } + }; + LGraphManager.prototype.calcLowestCommonAncestor = function(firstNode, secondNode) { + if (firstNode == secondNode) { + return firstNode.getOwner(); + } + var firstOwnerGraph = firstNode.getOwner(); + do { + if (firstOwnerGraph == null) { + break; + } + var secondOwnerGraph = secondNode.getOwner(); + do { + if (secondOwnerGraph == null) { + break; + } + if (secondOwnerGraph == firstOwnerGraph) { + return secondOwnerGraph; + } + secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); + } while (true); + firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); + } while (true); + return firstOwnerGraph; + }; + LGraphManager.prototype.calcInclusionTreeDepths = function(graph, depth) { + if (graph == null && depth == null) { + graph = this.rootGraph; + depth = 1; + } + var node; + var nodes2 = graph.getNodes(); + var s = nodes2.length; + for (var i = 0; i < s; i++) { + node = nodes2[i]; + node.inclusionTreeDepth = depth; + if (node.child != null) { + this.calcInclusionTreeDepths(node.child, depth + 1); + } + } + }; + LGraphManager.prototype.includesInvalidEdge = function() { + var edge; + var s = this.edges.length; + for (var i = 0; i < s; i++) { + edge = this.edges[i]; + if (this.isOneAncestorOfOther(edge.source, edge.target)) { + return true; + } + } + return false; + }; + module2.exports = LGraphManager; + }, + /* 7 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LayoutConstants = __webpack_require__(0); + function FDLayoutConstants() { + } + for (var prop in LayoutConstants) { + FDLayoutConstants[prop] = LayoutConstants[prop]; + } + FDLayoutConstants.MAX_ITERATIONS = 2500; + FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; + FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; + FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500; + FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; + FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1; + FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; + FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; + FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; + FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; + FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; + FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; + FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1e3; + FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5e3; + FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100; + FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; + FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10; + FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; + FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; + FDLayoutConstants.MIN_EDGE_LENGTH = 1; + FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; + module2.exports = FDLayoutConstants; + }, + /* 8 */ + /***/ + function(module2, exports2, __webpack_require__) { + var Point2 = __webpack_require__(12); + function IGeometry() { + } + IGeometry.calcSeparationAmount = function(rectA, rectB, overlapAmount, separationBuffer) { + if (!rectA.intersects(rectB)) { + throw "assert failed"; + } + var directions = new Array(2); + this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); + overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); + overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); + if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { + overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); + } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { + overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); + } + if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { + overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); + } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { + overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); + } + var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); + if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { + slope = 1; + } + var moveByY = slope * overlapAmount[0]; + var moveByX = overlapAmount[1] / slope; + if (overlapAmount[0] < moveByX) { + moveByX = overlapAmount[0]; + } else { + moveByY = overlapAmount[1]; + } + overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); + overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); + }; + IGeometry.decideDirectionsForOverlappingNodes = function(rectA, rectB, directions) { + if (rectA.getCenterX() < rectB.getCenterX()) { + directions[0] = -1; + } else { + directions[0] = 1; + } + if (rectA.getCenterY() < rectB.getCenterY()) { + directions[1] = -1; + } else { + directions[1] = 1; + } + }; + IGeometry.getIntersection2 = function(rectA, rectB, result) { + var p1x = rectA.getCenterX(); + var p1y = rectA.getCenterY(); + var p2x = rectB.getCenterX(); + var p2y = rectB.getCenterY(); + if (rectA.intersects(rectB)) { + result[0] = p1x; + result[1] = p1y; + result[2] = p2x; + result[3] = p2y; + return true; + } + var topLeftAx = rectA.getX(); + var topLeftAy = rectA.getY(); + var topRightAx = rectA.getRight(); + var bottomLeftAx = rectA.getX(); + var bottomLeftAy = rectA.getBottom(); + var bottomRightAx = rectA.getRight(); + var halfWidthA = rectA.getWidthHalf(); + var halfHeightA = rectA.getHeightHalf(); + var topLeftBx = rectB.getX(); + var topLeftBy = rectB.getY(); + var topRightBx = rectB.getRight(); + var bottomLeftBx = rectB.getX(); + var bottomLeftBy = rectB.getBottom(); + var bottomRightBx = rectB.getRight(); + var halfWidthB = rectB.getWidthHalf(); + var halfHeightB = rectB.getHeightHalf(); + var clipPointAFound = false; + var clipPointBFound = false; + if (p1x === p2x) { + if (p1y > p2y) { + result[0] = p1x; + result[1] = topLeftAy; + result[2] = p2x; + result[3] = bottomLeftBy; + return false; + } else if (p1y < p2y) { + result[0] = p1x; + result[1] = bottomLeftAy; + result[2] = p2x; + result[3] = topLeftBy; + return false; + } else + ; + } else if (p1y === p2y) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = p1y; + result[2] = topRightBx; + result[3] = p2y; + return false; + } else if (p1x < p2x) { + result[0] = topRightAx; + result[1] = p1y; + result[2] = topLeftBx; + result[3] = p2y; + return false; + } else + ; + } else { + var slopeA = rectA.height / rectA.width; + var slopeB = rectB.height / rectB.width; + var slopePrime = (p2y - p1y) / (p2x - p1x); + var cardinalDirectionA = void 0; + var cardinalDirectionB = void 0; + var tempPointAx = void 0; + var tempPointAy = void 0; + var tempPointBx = void 0; + var tempPointBy = void 0; + if (-slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = bottomLeftAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } else { + result[0] = topRightAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + } else if (slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = topLeftAy; + clipPointAFound = true; + } else { + result[0] = bottomRightAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + } + if (-slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = bottomLeftBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } else { + result[2] = topRightBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + } else if (slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = topLeftBx; + result[3] = topLeftBy; + clipPointBFound = true; + } else { + result[2] = bottomRightBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + } + if (clipPointAFound && clipPointBFound) { + return false; + } + if (p1x > p2x) { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); + } else { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); + } + } else { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); + } else { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); + } + } + if (!clipPointAFound) { + switch (cardinalDirectionA) { + case 1: + tempPointAy = topLeftAy; + tempPointAx = p1x + -halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 2: + tempPointAx = bottomRightAx; + tempPointAy = p1y + halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 3: + tempPointAy = bottomLeftAy; + tempPointAx = p1x + halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 4: + tempPointAx = bottomLeftAx; + tempPointAy = p1y + -halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + } + } + if (!clipPointBFound) { + switch (cardinalDirectionB) { + case 1: + tempPointBy = topLeftBy; + tempPointBx = p2x + -halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 2: + tempPointBx = bottomRightBx; + tempPointBy = p2y + halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 3: + tempPointBy = bottomLeftBy; + tempPointBx = p2x + halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 4: + tempPointBx = bottomLeftBx; + tempPointBy = p2y + -halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + } + } + } + return false; + }; + IGeometry.getCardinalDirection = function(slope, slopePrime, line) { + if (slope > slopePrime) { + return line; + } else { + return 1 + line % 4; + } + }; + IGeometry.getIntersection = function(s1, s2, f1, f2) { + if (f2 == null) { + return this.getIntersection2(s1, s2, f1); + } + var x1 = s1.x; + var y1 = s1.y; + var x2 = s2.x; + var y2 = s2.y; + var x3 = f1.x; + var y3 = f1.y; + var x4 = f2.x; + var y4 = f2.y; + var x = void 0, y = void 0; + var a1 = void 0, a2 = void 0, b1 = void 0, b2 = void 0, c1 = void 0, c2 = void 0; + var denom = void 0; + a1 = y2 - y1; + b1 = x1 - x2; + c1 = x2 * y1 - x1 * y2; + a2 = y4 - y3; + b2 = x3 - x4; + c2 = x4 * y3 - x3 * y4; + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return null; + } + x = (b1 * c2 - b2 * c1) / denom; + y = (a2 * c1 - a1 * c2) / denom; + return new Point2(x, y); + }; + IGeometry.angleOfVector = function(Cx, Cy, Nx, Ny) { + var C_angle = void 0; + if (Cx !== Nx) { + C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); + if (Nx < Cx) { + C_angle += Math.PI; + } else if (Ny < Cy) { + C_angle += this.TWO_PI; + } + } else if (Ny < Cy) { + C_angle = this.ONE_AND_HALF_PI; + } else { + C_angle = this.HALF_PI; + } + return C_angle; + }; + IGeometry.doIntersect = function(p1, p2, p3, p4) { + var a = p1.x; + var b = p1.y; + var c = p2.x; + var d = p2.y; + var p = p3.x; + var q = p3.y; + var r = p4.x; + var s = p4.y; + var det = (c - a) * (s - q) - (r - p) * (d - b); + if (det === 0) { + return false; + } else { + var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; + var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; + return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1; + } + }; + IGeometry.HALF_PI = 0.5 * Math.PI; + IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; + IGeometry.TWO_PI = 2 * Math.PI; + IGeometry.THREE_PI = 3 * Math.PI; + module2.exports = IGeometry; + }, + /* 9 */ + /***/ + function(module2, exports2, __webpack_require__) { + function IMath() { + } + IMath.sign = function(value) { + if (value > 0) { + return 1; + } else if (value < 0) { + return -1; + } else { + return 0; + } + }; + IMath.floor = function(value) { + return value < 0 ? Math.ceil(value) : Math.floor(value); + }; + IMath.ceil = function(value) { + return value < 0 ? Math.floor(value) : Math.ceil(value); + }; + module2.exports = IMath; + }, + /* 10 */ + /***/ + function(module2, exports2, __webpack_require__) { + function Integer() { + } + Integer.MAX_VALUE = 2147483647; + Integer.MIN_VALUE = -2147483648; + module2.exports = Integer; + }, + /* 11 */ + /***/ + function(module2, exports2, __webpack_require__) { + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var nodeFrom = function nodeFrom2(value) { + return { value, next: null, prev: null }; + }; + var add = function add2(prev, node, next2, list) { + if (prev !== null) { + prev.next = node; + } else { + list.head = node; + } + if (next2 !== null) { + next2.prev = node; + } else { + list.tail = node; + } + node.prev = prev; + node.next = next2; + list.length++; + return node; + }; + var _remove = function _remove2(node, list) { + var prev = node.prev, next2 = node.next; + if (prev !== null) { + prev.next = next2; + } else { + list.head = next2; + } + if (next2 !== null) { + next2.prev = prev; + } else { + list.tail = prev; + } + node.prev = node.next = null; + list.length--; + return node; + }; + var LinkedList = function() { + function LinkedList2(vals) { + var _this = this; + _classCallCheck(this, LinkedList2); + this.length = 0; + this.head = null; + this.tail = null; + if (vals != null) { + vals.forEach(function(v) { + return _this.push(v); + }); + } + } + _createClass(LinkedList2, [{ + key: "size", + value: function size() { + return this.length; + } + }, { + key: "insertBefore", + value: function insertBefore(val, otherNode) { + return add(otherNode.prev, nodeFrom(val), otherNode, this); + } + }, { + key: "insertAfter", + value: function insertAfter(val, otherNode) { + return add(otherNode, nodeFrom(val), otherNode.next, this); + } + }, { + key: "insertNodeBefore", + value: function insertNodeBefore(newNode, otherNode) { + return add(otherNode.prev, newNode, otherNode, this); + } + }, { + key: "insertNodeAfter", + value: function insertNodeAfter(newNode, otherNode) { + return add(otherNode, newNode, otherNode.next, this); + } + }, { + key: "push", + value: function push(val) { + return add(this.tail, nodeFrom(val), null, this); + } + }, { + key: "unshift", + value: function unshift(val) { + return add(null, nodeFrom(val), this.head, this); + } + }, { + key: "remove", + value: function remove(node) { + return _remove(node, this); + } + }, { + key: "pop", + value: function pop() { + return _remove(this.tail, this).value; + } + }, { + key: "popNode", + value: function popNode() { + return _remove(this.tail, this); + } + }, { + key: "shift", + value: function shift() { + return _remove(this.head, this).value; + } + }, { + key: "shiftNode", + value: function shiftNode() { + return _remove(this.head, this); + } + }, { + key: "get_object_at", + value: function get_object_at(index) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + return current.value; + } + } + }, { + key: "set_object_at", + value: function set_object_at(index, value) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + current.value = value; + } + } + }]); + return LinkedList2; + }(); + module2.exports = LinkedList; + }, + /* 12 */ + /***/ + function(module2, exports2, __webpack_require__) { + function Point2(x, y, p) { + this.x = null; + this.y = null; + if (x == null && y == null && p == null) { + this.x = 0; + this.y = 0; + } else if (typeof x == "number" && typeof y == "number" && p == null) { + this.x = x; + this.y = y; + } else if (x.constructor.name == "Point" && y == null && p == null) { + p = x; + this.x = p.x; + this.y = p.y; + } + } + Point2.prototype.getX = function() { + return this.x; + }; + Point2.prototype.getY = function() { + return this.y; + }; + Point2.prototype.getLocation = function() { + return new Point2(this.x, this.y); + }; + Point2.prototype.setLocation = function(x, y, p) { + if (x.constructor.name == "Point" && y == null && p == null) { + p = x; + this.setLocation(p.x, p.y); + } else if (typeof x == "number" && typeof y == "number" && p == null) { + if (parseInt(x) == x && parseInt(y) == y) { + this.move(x, y); + } else { + this.x = Math.floor(x + 0.5); + this.y = Math.floor(y + 0.5); + } + } + }; + Point2.prototype.move = function(x, y) { + this.x = x; + this.y = y; + }; + Point2.prototype.translate = function(dx, dy) { + this.x += dx; + this.y += dy; + }; + Point2.prototype.equals = function(obj) { + if (obj.constructor.name == "Point") { + var pt = obj; + return this.x == pt.x && this.y == pt.y; + } + return this == obj; + }; + Point2.prototype.toString = function() { + return new Point2().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; + }; + module2.exports = Point2; + }, + /* 13 */ + /***/ + function(module2, exports2, __webpack_require__) { + function RectangleD(x, y, width, height) { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + if (x != null && y != null && width != null && height != null) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } + } + RectangleD.prototype.getX = function() { + return this.x; + }; + RectangleD.prototype.setX = function(x) { + this.x = x; + }; + RectangleD.prototype.getY = function() { + return this.y; + }; + RectangleD.prototype.setY = function(y) { + this.y = y; + }; + RectangleD.prototype.getWidth = function() { + return this.width; + }; + RectangleD.prototype.setWidth = function(width) { + this.width = width; + }; + RectangleD.prototype.getHeight = function() { + return this.height; + }; + RectangleD.prototype.setHeight = function(height) { + this.height = height; + }; + RectangleD.prototype.getRight = function() { + return this.x + this.width; + }; + RectangleD.prototype.getBottom = function() { + return this.y + this.height; + }; + RectangleD.prototype.intersects = function(a) { + if (this.getRight() < a.x) { + return false; + } + if (this.getBottom() < a.y) { + return false; + } + if (a.getRight() < this.x) { + return false; + } + if (a.getBottom() < this.y) { + return false; + } + return true; + }; + RectangleD.prototype.getCenterX = function() { + return this.x + this.width / 2; + }; + RectangleD.prototype.getMinX = function() { + return this.getX(); + }; + RectangleD.prototype.getMaxX = function() { + return this.getX() + this.width; + }; + RectangleD.prototype.getCenterY = function() { + return this.y + this.height / 2; + }; + RectangleD.prototype.getMinY = function() { + return this.getY(); + }; + RectangleD.prototype.getMaxY = function() { + return this.getY() + this.height; + }; + RectangleD.prototype.getWidthHalf = function() { + return this.width / 2; + }; + RectangleD.prototype.getHeightHalf = function() { + return this.height / 2; + }; + module2.exports = RectangleD; + }, + /* 14 */ + /***/ + function(module2, exports2, __webpack_require__) { + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + function UniqueIDGeneretor() { + } + UniqueIDGeneretor.lastID = 0; + UniqueIDGeneretor.createID = function(obj) { + if (UniqueIDGeneretor.isPrimitive(obj)) { + return obj; + } + if (obj.uniqueID != null) { + return obj.uniqueID; + } + obj.uniqueID = UniqueIDGeneretor.getString(); + UniqueIDGeneretor.lastID++; + return obj.uniqueID; + }; + UniqueIDGeneretor.getString = function(id) { + if (id == null) + id = UniqueIDGeneretor.lastID; + return "Object#" + id; + }; + UniqueIDGeneretor.isPrimitive = function(arg) { + var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); + return arg == null || type != "object" && type != "function"; + }; + module2.exports = UniqueIDGeneretor; + }, + /* 15 */ + /***/ + function(module2, exports2, __webpack_require__) { + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return Array.from(arr); + } + } + var LayoutConstants = __webpack_require__(0); + var LGraphManager = __webpack_require__(6); + var LNode = __webpack_require__(3); + var LEdge = __webpack_require__(1); + var LGraph = __webpack_require__(5); + var PointD = __webpack_require__(4); + var Transform = __webpack_require__(17); + var Emitter = __webpack_require__(27); + function Layout2(isRemoteUse) { + Emitter.call(this); + this.layoutQuality = LayoutConstants.QUALITY; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + this.edgeToDummyNodes = /* @__PURE__ */ new Map(); + this.graphManager = new LGraphManager(this); + this.isLayoutFinished = false; + this.isSubLayout = false; + this.isRemoteUse = false; + if (isRemoteUse != null) { + this.isRemoteUse = isRemoteUse; + } + } + Layout2.RANDOM_SEED = 1; + Layout2.prototype = Object.create(Emitter.prototype); + Layout2.prototype.getGraphManager = function() { + return this.graphManager; + }; + Layout2.prototype.getAllNodes = function() { + return this.graphManager.getAllNodes(); + }; + Layout2.prototype.getAllEdges = function() { + return this.graphManager.getAllEdges(); + }; + Layout2.prototype.getAllNodesToApplyGravitation = function() { + return this.graphManager.getAllNodesToApplyGravitation(); + }; + Layout2.prototype.newGraphManager = function() { + var gm = new LGraphManager(this); + this.graphManager = gm; + return gm; + }; + Layout2.prototype.newGraph = function(vGraph) { + return new LGraph(null, this.graphManager, vGraph); + }; + Layout2.prototype.newNode = function(vNode) { + return new LNode(this.graphManager, vNode); + }; + Layout2.prototype.newEdge = function(vEdge) { + return new LEdge(null, null, vEdge); + }; + Layout2.prototype.checkLayoutSuccess = function() { + return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); + }; + Layout2.prototype.runLayout = function() { + this.isLayoutFinished = false; + if (this.tilingPreLayout) { + this.tilingPreLayout(); + } + this.initParameters(); + var isLayoutSuccessfull; + if (this.checkLayoutSuccess()) { + isLayoutSuccessfull = false; + } else { + isLayoutSuccessfull = this.layout(); + } + if (LayoutConstants.ANIMATE === "during") { + return false; + } + if (isLayoutSuccessfull) { + if (!this.isSubLayout) { + this.doPostLayout(); + } + } + if (this.tilingPostLayout) { + this.tilingPostLayout(); + } + this.isLayoutFinished = true; + return isLayoutSuccessfull; + }; + Layout2.prototype.doPostLayout = function() { + if (!this.incremental) { + this.transform(); + } + this.update(); + }; + Layout2.prototype.update2 = function() { + if (this.createBendsAsNeeded) { + this.createBendpointsFromDummyNodes(); + this.graphManager.resetAllEdges(); + } + if (!this.isRemoteUse) { + var allEdges = this.graphManager.getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + allEdges[i]; + } + var nodes2 = this.graphManager.getRoot().getNodes(); + for (var i = 0; i < nodes2.length; i++) { + nodes2[i]; + } + this.update(this.graphManager.getRoot()); + } + }; + Layout2.prototype.update = function(obj) { + if (obj == null) { + this.update2(); + } else if (obj instanceof LNode) { + var node = obj; + if (node.getChild() != null) { + var nodes2 = node.getChild().getNodes(); + for (var i = 0; i < nodes2.length; i++) { + update(nodes2[i]); + } + } + if (node.vGraphObject != null) { + var vNode = node.vGraphObject; + vNode.update(node); + } + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge.vGraphObject != null) { + var vEdge = edge.vGraphObject; + vEdge.update(edge); + } + } else if (obj instanceof LGraph) { + var graph = obj; + if (graph.vGraphObject != null) { + var vGraph = graph.vGraphObject; + vGraph.update(graph); + } + } + }; + Layout2.prototype.initParameters = function() { + if (!this.isSubLayout) { + this.layoutQuality = LayoutConstants.QUALITY; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + } + if (this.animationDuringLayout) { + this.animationOnLayout = false; + } + }; + Layout2.prototype.transform = function(newLeftTop) { + if (newLeftTop == void 0) { + this.transform(new PointD(0, 0)); + } else { + var trans = new Transform(); + var leftTop = this.graphManager.getRoot().updateLeftTop(); + if (leftTop != null) { + trans.setWorldOrgX(newLeftTop.x); + trans.setWorldOrgY(newLeftTop.y); + trans.setDeviceOrgX(leftTop.x); + trans.setDeviceOrgY(leftTop.y); + var nodes2 = this.getAllNodes(); + var node; + for (var i = 0; i < nodes2.length; i++) { + node = nodes2[i]; + node.transform(trans); + } + } + } + }; + Layout2.prototype.positionNodesRandomly = function(graph) { + if (graph == void 0) { + this.positionNodesRandomly(this.getGraphManager().getRoot()); + this.getGraphManager().getRoot().updateBounds(true); + } else { + var lNode; + var childGraph; + var nodes2 = graph.getNodes(); + for (var i = 0; i < nodes2.length; i++) { + lNode = nodes2[i]; + childGraph = lNode.getChild(); + if (childGraph == null) { + lNode.scatter(); + } else if (childGraph.getNodes().length == 0) { + lNode.scatter(); + } else { + this.positionNodesRandomly(childGraph); + lNode.updateBounds(); + } + } + } + }; + Layout2.prototype.getFlatForest = function() { + var flatForest = []; + var isForest = true; + var allNodes = this.graphManager.getRoot().getNodes(); + var isFlat = true; + for (var i = 0; i < allNodes.length; i++) { + if (allNodes[i].getChild() != null) { + isFlat = false; + } + } + if (!isFlat) { + return flatForest; + } + var visited = /* @__PURE__ */ new Set(); + var toBeVisited = []; + var parents = /* @__PURE__ */ new Map(); + var unProcessedNodes = []; + unProcessedNodes = unProcessedNodes.concat(allNodes); + while (unProcessedNodes.length > 0 && isForest) { + toBeVisited.push(unProcessedNodes[0]); + while (toBeVisited.length > 0 && isForest) { + var currentNode = toBeVisited[0]; + toBeVisited.splice(0, 1); + visited.add(currentNode); + var neighborEdges = currentNode.getEdges(); + for (var i = 0; i < neighborEdges.length; i++) { + var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode); + if (parents.get(currentNode) != currentNeighbor) { + if (!visited.has(currentNeighbor)) { + toBeVisited.push(currentNeighbor); + parents.set(currentNeighbor, currentNode); + } else { + isForest = false; + break; + } + } + } + } + if (!isForest) { + flatForest = []; + } else { + var temp = [].concat(_toConsumableArray(visited)); + flatForest.push(temp); + for (var i = 0; i < temp.length; i++) { + var value = temp[i]; + var index = unProcessedNodes.indexOf(value); + if (index > -1) { + unProcessedNodes.splice(index, 1); + } + } + visited = /* @__PURE__ */ new Set(); + parents = /* @__PURE__ */ new Map(); + } + } + return flatForest; + }; + Layout2.prototype.createDummyNodesForBendpoints = function(edge) { + var dummyNodes = []; + var prev = edge.source; + var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); + for (var i = 0; i < edge.bendpoints.length; i++) { + var dummyNode = this.newNode(null); + dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); + graph.add(dummyNode); + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, dummyNode); + dummyNodes.add(dummyNode); + prev = dummyNode; + } + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, edge.target); + this.edgeToDummyNodes.set(edge, dummyNodes); + if (edge.isInterGraph()) { + this.graphManager.remove(edge); + } else { + graph.remove(edge); + } + return dummyNodes; + }; + Layout2.prototype.createBendpointsFromDummyNodes = function() { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges); + for (var k = 0; k < edges.length; k++) { + var lEdge = edges[k]; + if (lEdge.bendpoints.length > 0) { + var path = this.edgeToDummyNodes.get(lEdge); + for (var i = 0; i < path.length; i++) { + var dummyNode = path[i]; + var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); + var ebp = lEdge.bendpoints.get(i); + ebp.x = p.x; + ebp.y = p.y; + dummyNode.getOwner().remove(dummyNode); + } + this.graphManager.add(lEdge, lEdge.source, lEdge.target); + } + } + }; + Layout2.transform = function(sliderValue, defaultValue, minDiv, maxMul) { + if (minDiv != void 0 && maxMul != void 0) { + var value = defaultValue; + if (sliderValue <= 50) { + var minValue = defaultValue / minDiv; + value -= (defaultValue - minValue) / 50 * (50 - sliderValue); + } else { + var maxValue = defaultValue * maxMul; + value += (maxValue - defaultValue) / 50 * (sliderValue - 50); + } + return value; + } else { + var a, b; + if (sliderValue <= 50) { + a = 9 * defaultValue / 500; + b = defaultValue / 10; + } else { + a = 9 * defaultValue / 50; + b = -8 * defaultValue; + } + return a * sliderValue + b; + } + }; + Layout2.findCenterOfTree = function(nodes2) { + var list = []; + list = list.concat(nodes2); + var removedNodes = []; + var remainingDegrees = /* @__PURE__ */ new Map(); + var foundCenter = false; + var centerNode = null; + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + for (var i = 0; i < list.length; i++) { + var node = list[i]; + var degree = node.getNeighborsList().size; + remainingDegrees.set(node, node.getNeighborsList().size); + if (degree == 1) { + removedNodes.push(node); + } + } + var tempList = []; + tempList = tempList.concat(removedNodes); + while (!foundCenter) { + var tempList2 = []; + tempList2 = tempList2.concat(tempList); + tempList = []; + for (var i = 0; i < list.length; i++) { + var node = list[i]; + var index = list.indexOf(node); + if (index >= 0) { + list.splice(index, 1); + } + var neighbours = node.getNeighborsList(); + neighbours.forEach(function(neighbour) { + if (removedNodes.indexOf(neighbour) < 0) { + var otherDegree = remainingDegrees.get(neighbour); + var newDegree = otherDegree - 1; + if (newDegree == 1) { + tempList.push(neighbour); + } + remainingDegrees.set(neighbour, newDegree); + } + }); + } + removedNodes = removedNodes.concat(tempList); + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + } + return centerNode; + }; + Layout2.prototype.setGraphManager = function(gm) { + this.graphManager = gm; + }; + module2.exports = Layout2; + }, + /* 16 */ + /***/ + function(module2, exports2, __webpack_require__) { + function RandomSeed() { + } + RandomSeed.seed = 1; + RandomSeed.x = 0; + RandomSeed.nextDouble = function() { + RandomSeed.x = Math.sin(RandomSeed.seed++) * 1e4; + return RandomSeed.x - Math.floor(RandomSeed.x); + }; + module2.exports = RandomSeed; + }, + /* 17 */ + /***/ + function(module2, exports2, __webpack_require__) { + var PointD = __webpack_require__(4); + function Transform(x, y) { + this.lworldOrgX = 0; + this.lworldOrgY = 0; + this.ldeviceOrgX = 0; + this.ldeviceOrgY = 0; + this.lworldExtX = 1; + this.lworldExtY = 1; + this.ldeviceExtX = 1; + this.ldeviceExtY = 1; + } + Transform.prototype.getWorldOrgX = function() { + return this.lworldOrgX; + }; + Transform.prototype.setWorldOrgX = function(wox) { + this.lworldOrgX = wox; + }; + Transform.prototype.getWorldOrgY = function() { + return this.lworldOrgY; + }; + Transform.prototype.setWorldOrgY = function(woy) { + this.lworldOrgY = woy; + }; + Transform.prototype.getWorldExtX = function() { + return this.lworldExtX; + }; + Transform.prototype.setWorldExtX = function(wex) { + this.lworldExtX = wex; + }; + Transform.prototype.getWorldExtY = function() { + return this.lworldExtY; + }; + Transform.prototype.setWorldExtY = function(wey) { + this.lworldExtY = wey; + }; + Transform.prototype.getDeviceOrgX = function() { + return this.ldeviceOrgX; + }; + Transform.prototype.setDeviceOrgX = function(dox) { + this.ldeviceOrgX = dox; + }; + Transform.prototype.getDeviceOrgY = function() { + return this.ldeviceOrgY; + }; + Transform.prototype.setDeviceOrgY = function(doy) { + this.ldeviceOrgY = doy; + }; + Transform.prototype.getDeviceExtX = function() { + return this.ldeviceExtX; + }; + Transform.prototype.setDeviceExtX = function(dex) { + this.ldeviceExtX = dex; + }; + Transform.prototype.getDeviceExtY = function() { + return this.ldeviceExtY; + }; + Transform.prototype.setDeviceExtY = function(dey) { + this.ldeviceExtY = dey; + }; + Transform.prototype.transformX = function(x) { + var xDevice = 0; + var worldExtX = this.lworldExtX; + if (worldExtX != 0) { + xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX; + } + return xDevice; + }; + Transform.prototype.transformY = function(y) { + var yDevice = 0; + var worldExtY = this.lworldExtY; + if (worldExtY != 0) { + yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY; + } + return yDevice; + }; + Transform.prototype.inverseTransformX = function(x) { + var xWorld = 0; + var deviceExtX = this.ldeviceExtX; + if (deviceExtX != 0) { + xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; + } + return xWorld; + }; + Transform.prototype.inverseTransformY = function(y) { + var yWorld = 0; + var deviceExtY = this.ldeviceExtY; + if (deviceExtY != 0) { + yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; + } + return yWorld; + }; + Transform.prototype.inverseTransformPoint = function(inPoint) { + var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); + return outPoint; + }; + module2.exports = Transform; + }, + /* 18 */ + /***/ + function(module2, exports2, __webpack_require__) { + function _toConsumableArray(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + return arr2; + } else { + return Array.from(arr); + } + } + var Layout2 = __webpack_require__(15); + var FDLayoutConstants = __webpack_require__(7); + var LayoutConstants = __webpack_require__(0); + var IGeometry = __webpack_require__(8); + var IMath = __webpack_require__(9); + function FDLayout() { + Layout2.call(this); + this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.displacementThresholdPerNode = 3 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.totalDisplacement = 0; + this.oldTotalDisplacement = 0; + this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; + } + FDLayout.prototype = Object.create(Layout2.prototype); + for (var prop in Layout2) { + FDLayout[prop] = Layout2[prop]; + } + FDLayout.prototype.initParameters = function() { + Layout2.prototype.initParameters.call(this, arguments); + this.totalIterations = 0; + this.notAnimatedIterations = 0; + this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; + this.grid = []; + }; + FDLayout.prototype.calcIdealEdgeLengths = function() { + var edge; + var lcaDepth; + var source; + var target; + var sizeOfSourceInLca; + var sizeOfTargetInLca; + var allEdges = this.getGraphManager().getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + edge.idealLength = this.idealEdgeLength; + if (edge.isInterGraph) { + source = edge.getSource(); + target = edge.getTarget(); + sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); + sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); + if (this.useSmartIdealEdgeLengthCalculation) { + edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; + } + lcaDepth = edge.getLca().getInclusionTreeDepth(); + edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); + } + } + }; + FDLayout.prototype.initSpringEmbedder = function() { + var s = this.getAllNodes().length; + if (this.incremental) { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; + } else { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } else { + this.coolingFactor = 1; + } + this.initialCoolingFactor = this.coolingFactor; + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; + } + this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); + this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; + this.repulsionRange = this.calcRepulsionRange(); + }; + FDLayout.prototype.calcSpringForces = function() { + var lEdges = this.getAllEdges(); + var edge; + for (var i = 0; i < lEdges.length; i++) { + edge = lEdges[i]; + this.calcSpringForce(edge, edge.idealLength); + } + }; + FDLayout.prototype.calcRepulsionForces = function() { + var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true; + var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + var i, j; + var nodeA, nodeB; + var lNodes = this.getAllNodes(); + var processedNodeSet; + if (this.useFRGridVariant) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { + this.updateGrid(); + } + processedNodeSet = /* @__PURE__ */ new Set(); + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); + processedNodeSet.add(nodeA); + } + } else { + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + for (j = i + 1; j < lNodes.length; j++) { + nodeB = lNodes[j]; + if (nodeA.getOwner() != nodeB.getOwner()) { + continue; + } + this.calcRepulsionForce(nodeA, nodeB); + } + } + } + }; + FDLayout.prototype.calcGravitationalForces = function() { + var node; + var lNodes = this.getAllNodesToApplyGravitation(); + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + this.calcGravitationalForce(node); + } + }; + FDLayout.prototype.moveNodes = function() { + var lNodes = this.getAllNodes(); + var node; + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + node.move(); + } + }; + FDLayout.prototype.calcSpringForce = function(edge, idealLength) { + var sourceNode = edge.getSource(); + var targetNode = edge.getTarget(); + var length; + var springForce; + var springForceX; + var springForceY; + if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { + edge.updateLengthSimple(); + } else { + edge.updateLength(); + if (edge.isOverlapingSourceAndTarget) { + return; + } + } + length = edge.getLength(); + if (length == 0) + return; + springForce = this.springConstant * (length - idealLength); + springForceX = springForce * (edge.lengthX / length); + springForceY = springForce * (edge.lengthY / length); + sourceNode.springForceX += springForceX; + sourceNode.springForceY += springForceY; + targetNode.springForceX -= springForceX; + targetNode.springForceY -= springForceY; + }; + FDLayout.prototype.calcRepulsionForce = function(nodeA, nodeB) { + var rectA = nodeA.getRect(); + var rectB = nodeB.getRect(); + var overlapAmount = new Array(2); + var clipPoints = new Array(4); + var distanceX; + var distanceY; + var distanceSquared; + var distance; + var repulsionForce; + var repulsionForceX; + var repulsionForceY; + if (rectA.intersects(rectB)) { + IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2); + repulsionForceX = 2 * overlapAmount[0]; + repulsionForceY = 2 * overlapAmount[1]; + var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); + nodeA.repulsionForceX -= childrenConstant * repulsionForceX; + nodeA.repulsionForceY -= childrenConstant * repulsionForceY; + nodeB.repulsionForceX += childrenConstant * repulsionForceX; + nodeB.repulsionForceY += childrenConstant * repulsionForceY; + } else { + if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) { + distanceX = rectB.getCenterX() - rectA.getCenterX(); + distanceY = rectB.getCenterY() - rectA.getCenterY(); + } else { + IGeometry.getIntersection(rectA, rectB, clipPoints); + distanceX = clipPoints[2] - clipPoints[0]; + distanceY = clipPoints[3] - clipPoints[1]; + } + if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; + } + if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; + } + distanceSquared = distanceX * distanceX + distanceY * distanceY; + distance = Math.sqrt(distanceSquared); + repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; + repulsionForceX = repulsionForce * distanceX / distance; + repulsionForceY = repulsionForce * distanceY / distance; + nodeA.repulsionForceX -= repulsionForceX; + nodeA.repulsionForceY -= repulsionForceY; + nodeB.repulsionForceX += repulsionForceX; + nodeB.repulsionForceY += repulsionForceY; + } + }; + FDLayout.prototype.calcGravitationalForce = function(node) { + var ownerGraph; + var ownerCenterX; + var ownerCenterY; + var distanceX; + var distanceY; + var absDistanceX; + var absDistanceY; + var estimatedSize; + ownerGraph = node.getOwner(); + ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; + ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; + distanceX = node.getCenterX() - ownerCenterX; + distanceY = node.getCenterY() - ownerCenterY; + absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; + absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; + if (node.getOwner() == this.graphManager.getRoot()) { + estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX; + node.gravitationForceY = -this.gravityConstant * distanceY; + } + } else { + estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; + node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; + } + } + }; + FDLayout.prototype.isConverged = function() { + var converged; + var oscilating = false; + if (this.totalIterations > this.maxIterations / 3) { + oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; + } + converged = this.totalDisplacement < this.totalDisplacementThreshold; + this.oldTotalDisplacement = this.totalDisplacement; + return converged || oscilating; + }; + FDLayout.prototype.animate = function() { + if (this.animationDuringLayout && !this.isSubLayout) { + if (this.notAnimatedIterations == this.animationPeriod) { + this.update(); + this.notAnimatedIterations = 0; + } else { + this.notAnimatedIterations++; + } + } + }; + FDLayout.prototype.calcNoOfChildrenForAllNodes = function() { + var node; + var allNodes = this.graphManager.getAllNodes(); + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + node.noOfChildren = node.getNoOfChildren(); + } + }; + FDLayout.prototype.calcGrid = function(graph) { + var sizeX = 0; + var sizeY = 0; + sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); + sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); + var grid = new Array(sizeX); + for (var i = 0; i < sizeX; i++) { + grid[i] = new Array(sizeY); + } + for (var i = 0; i < sizeX; i++) { + for (var j = 0; j < sizeY; j++) { + grid[i][j] = new Array(); + } + } + return grid; + }; + FDLayout.prototype.addNodeToGrid = function(v, left, top) { + var startX = 0; + var finishX = 0; + var startY = 0; + var finishY = 0; + startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); + finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); + startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); + finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); + for (var i = startX; i <= finishX; i++) { + for (var j = startY; j <= finishY; j++) { + this.grid[i][j].push(v); + v.setGridCoordinates(startX, finishX, startY, finishY); + } + } + }; + FDLayout.prototype.updateGrid = function() { + var i; + var nodeA; + var lNodes = this.getAllNodes(); + this.grid = this.calcGrid(this.graphManager.getRoot()); + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + } + }; + FDLayout.prototype.calculateRepulsionForceOfANode = function(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { + var surrounding = /* @__PURE__ */ new Set(); + nodeA.surrounding = new Array(); + var nodeB; + var grid = this.grid; + for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) { + for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { + if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) { + for (var k = 0; k < grid[i][j].length; k++) { + nodeB = grid[i][j][k]; + if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { + continue; + } + if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { + var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); + var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); + if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { + surrounding.add(nodeB); + } + } + } + } + } + } + nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); + } + for (i = 0; i < nodeA.surrounding.length; i++) { + this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); + } + }; + FDLayout.prototype.calcRepulsionRange = function() { + return 0; + }; + module2.exports = FDLayout; + }, + /* 19 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LEdge = __webpack_require__(1); + var FDLayoutConstants = __webpack_require__(7); + function FDLayoutEdge(source, target, vEdge) { + LEdge.call(this, source, target, vEdge); + this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + } + FDLayoutEdge.prototype = Object.create(LEdge.prototype); + for (var prop in LEdge) { + FDLayoutEdge[prop] = LEdge[prop]; + } + module2.exports = FDLayoutEdge; + }, + /* 20 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LNode = __webpack_require__(3); + function FDLayoutNode(gm, loc, size, vNode) { + LNode.call(this, gm, loc, size, vNode); + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; + this.startX = 0; + this.finishX = 0; + this.startY = 0; + this.finishY = 0; + this.surrounding = []; + } + FDLayoutNode.prototype = Object.create(LNode.prototype); + for (var prop in LNode) { + FDLayoutNode[prop] = LNode[prop]; + } + FDLayoutNode.prototype.setGridCoordinates = function(_startX, _finishX, _startY, _finishY) { + this.startX = _startX; + this.finishX = _finishX; + this.startY = _startY; + this.finishY = _finishY; + }; + module2.exports = FDLayoutNode; + }, + /* 21 */ + /***/ + function(module2, exports2, __webpack_require__) { + function DimensionD2(width, height) { + this.width = 0; + this.height = 0; + if (width !== null && height !== null) { + this.height = height; + this.width = width; + } + } + DimensionD2.prototype.getWidth = function() { + return this.width; + }; + DimensionD2.prototype.setWidth = function(width) { + this.width = width; + }; + DimensionD2.prototype.getHeight = function() { + return this.height; + }; + DimensionD2.prototype.setHeight = function(height) { + this.height = height; + }; + module2.exports = DimensionD2; + }, + /* 22 */ + /***/ + function(module2, exports2, __webpack_require__) { + var UniqueIDGeneretor = __webpack_require__(14); + function HashMap() { + this.map = {}; + this.keys = []; + } + HashMap.prototype.put = function(key, value) { + var theId = UniqueIDGeneretor.createID(key); + if (!this.contains(theId)) { + this.map[theId] = value; + this.keys.push(key); + } + }; + HashMap.prototype.contains = function(key) { + UniqueIDGeneretor.createID(key); + return this.map[key] != null; + }; + HashMap.prototype.get = function(key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[theId]; + }; + HashMap.prototype.keySet = function() { + return this.keys; + }; + module2.exports = HashMap; + }, + /* 23 */ + /***/ + function(module2, exports2, __webpack_require__) { + var UniqueIDGeneretor = __webpack_require__(14); + function HashSet() { + this.set = {}; + } + HashSet.prototype.add = function(obj) { + var theId = UniqueIDGeneretor.createID(obj); + if (!this.contains(theId)) + this.set[theId] = obj; + }; + HashSet.prototype.remove = function(obj) { + delete this.set[UniqueIDGeneretor.createID(obj)]; + }; + HashSet.prototype.clear = function() { + this.set = {}; + }; + HashSet.prototype.contains = function(obj) { + return this.set[UniqueIDGeneretor.createID(obj)] == obj; + }; + HashSet.prototype.isEmpty = function() { + return this.size() === 0; + }; + HashSet.prototype.size = function() { + return Object.keys(this.set).length; + }; + HashSet.prototype.addAllTo = function(list) { + var keys = Object.keys(this.set); + var length = keys.length; + for (var i = 0; i < length; i++) { + list.push(this.set[keys[i]]); + } + }; + HashSet.prototype.size = function() { + return Object.keys(this.set).length; + }; + HashSet.prototype.addAll = function(list) { + var s = list.length; + for (var i = 0; i < s; i++) { + var v = list[i]; + this.add(v); + } + }; + module2.exports = HashSet; + }, + /* 24 */ + /***/ + function(module2, exports2, __webpack_require__) { + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var LinkedList = __webpack_require__(11); + var Quicksort = function() { + function Quicksort2(A, compareFunction) { + _classCallCheck(this, Quicksort2); + if (compareFunction !== null || compareFunction !== void 0) + this.compareFunction = this._defaultCompareFunction; + var length = void 0; + if (A instanceof LinkedList) + length = A.size(); + else + length = A.length; + this._quicksort(A, 0, length - 1); + } + _createClass(Quicksort2, [{ + key: "_quicksort", + value: function _quicksort(A, p, r) { + if (p < r) { + var q = this._partition(A, p, r); + this._quicksort(A, p, q); + this._quicksort(A, q + 1, r); + } + } + }, { + key: "_partition", + value: function _partition(A, p, r) { + var x = this._get(A, p); + var i = p; + var j = r; + while (true) { + while (this.compareFunction(x, this._get(A, j))) { + j--; + } + while (this.compareFunction(this._get(A, i), x)) { + i++; + } + if (i < j) { + this._swap(A, i, j); + i++; + j--; + } else + return j; + } + } + }, { + key: "_get", + value: function _get(object, index) { + if (object instanceof LinkedList) + return object.get_object_at(index); + else + return object[index]; + } + }, { + key: "_set", + value: function _set(object, index, value) { + if (object instanceof LinkedList) + object.set_object_at(index, value); + else + object[index] = value; + } + }, { + key: "_swap", + value: function _swap(A, i, j) { + var temp = this._get(A, i); + this._set(A, i, this._get(A, j)); + this._set(A, j, temp); + } + }, { + key: "_defaultCompareFunction", + value: function _defaultCompareFunction(a, b) { + return b > a; + } + }]); + return Quicksort2; + }(); + module2.exports = Quicksort; + }, + /* 25 */ + /***/ + function(module2, exports2, __webpack_require__) { + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _classCallCheck(instance2, Constructor) { + if (!(instance2 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var NeedlemanWunsch = function() { + function NeedlemanWunsch2(sequence1, sequence2) { + var match_score = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1; + var mismatch_penalty = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1; + var gap_penalty = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1; + _classCallCheck(this, NeedlemanWunsch2); + this.sequence1 = sequence1; + this.sequence2 = sequence2; + this.match_score = match_score; + this.mismatch_penalty = mismatch_penalty; + this.gap_penalty = gap_penalty; + this.iMax = sequence1.length + 1; + this.jMax = sequence2.length + 1; + this.grid = new Array(this.iMax); + for (var i = 0; i < this.iMax; i++) { + this.grid[i] = new Array(this.jMax); + for (var j = 0; j < this.jMax; j++) { + this.grid[i][j] = 0; + } + } + this.tracebackGrid = new Array(this.iMax); + for (var _i = 0; _i < this.iMax; _i++) { + this.tracebackGrid[_i] = new Array(this.jMax); + for (var _j = 0; _j < this.jMax; _j++) { + this.tracebackGrid[_i][_j] = [null, null, null]; + } + } + this.alignments = []; + this.score = -1; + this.computeGrids(); + } + _createClass(NeedlemanWunsch2, [{ + key: "getScore", + value: function getScore() { + return this.score; + } + }, { + key: "getAlignments", + value: function getAlignments() { + return this.alignments; + } + // Main dynamic programming procedure + }, { + key: "computeGrids", + value: function computeGrids() { + for (var j = 1; j < this.jMax; j++) { + this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; + this.tracebackGrid[0][j] = [false, false, true]; + } + for (var i = 1; i < this.iMax; i++) { + this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty; + this.tracebackGrid[i][0] = [false, true, false]; + } + for (var _i2 = 1; _i2 < this.iMax; _i2++) { + for (var _j2 = 1; _j2 < this.jMax; _j2++) { + var diag = void 0; + if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) + diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score; + else + diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; + var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; + var left = this.grid[_i2][_j2 - 1] + this.gap_penalty; + var maxOf = [diag, up, left]; + var indices = this.arrayAllMaxIndexes(maxOf); + this.grid[_i2][_j2] = maxOf[indices[0]]; + this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; + } + } + this.score = this.grid[this.iMax - 1][this.jMax - 1]; + } + // Gets all possible valid sequence combinations + }, { + key: "alignmentTraceback", + value: function alignmentTraceback() { + var inProcessAlignments = []; + inProcessAlignments.push({ + pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); + while (inProcessAlignments[0]) { + var current = inProcessAlignments[0]; + var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; + if (directions[0]) { + inProcessAlignments.push({ + pos: [current.pos[0] - 1, current.pos[1] - 1], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (directions[1]) { + inProcessAlignments.push({ + pos: [current.pos[0] - 1, current.pos[1]], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: "-" + current.seq2 + }); + } + if (directions[2]) { + inProcessAlignments.push({ + pos: [current.pos[0], current.pos[1] - 1], + seq1: "-" + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (current.pos[0] === 0 && current.pos[1] === 0) + this.alignments.push({ + sequence1: current.seq1, + sequence2: current.seq2 + }); + inProcessAlignments.shift(); + } + return this.alignments; + } + // Helper Functions + }, { + key: "getAllIndexes", + value: function getAllIndexes(arr, val) { + var indexes = [], i = -1; + while ((i = arr.indexOf(val, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + }, { + key: "arrayAllMaxIndexes", + value: function arrayAllMaxIndexes(array) { + return this.getAllIndexes(array, Math.max.apply(null, array)); + } + }]); + return NeedlemanWunsch2; + }(); + module2.exports = NeedlemanWunsch; + }, + /* 26 */ + /***/ + function(module2, exports2, __webpack_require__) { + var layoutBase2 = function layoutBase3() { + return; + }; + layoutBase2.FDLayout = __webpack_require__(18); + layoutBase2.FDLayoutConstants = __webpack_require__(7); + layoutBase2.FDLayoutEdge = __webpack_require__(19); + layoutBase2.FDLayoutNode = __webpack_require__(20); + layoutBase2.DimensionD = __webpack_require__(21); + layoutBase2.HashMap = __webpack_require__(22); + layoutBase2.HashSet = __webpack_require__(23); + layoutBase2.IGeometry = __webpack_require__(8); + layoutBase2.IMath = __webpack_require__(9); + layoutBase2.Integer = __webpack_require__(10); + layoutBase2.Point = __webpack_require__(12); + layoutBase2.PointD = __webpack_require__(4); + layoutBase2.RandomSeed = __webpack_require__(16); + layoutBase2.RectangleD = __webpack_require__(13); + layoutBase2.Transform = __webpack_require__(17); + layoutBase2.UniqueIDGeneretor = __webpack_require__(14); + layoutBase2.Quicksort = __webpack_require__(24); + layoutBase2.LinkedList = __webpack_require__(11); + layoutBase2.LGraphObject = __webpack_require__(2); + layoutBase2.LGraph = __webpack_require__(5); + layoutBase2.LEdge = __webpack_require__(1); + layoutBase2.LGraphManager = __webpack_require__(6); + layoutBase2.LNode = __webpack_require__(3); + layoutBase2.Layout = __webpack_require__(15); + layoutBase2.LayoutConstants = __webpack_require__(0); + layoutBase2.NeedlemanWunsch = __webpack_require__(25); + module2.exports = layoutBase2; + }, + /* 27 */ + /***/ + function(module2, exports2, __webpack_require__) { + function Emitter() { + this.listeners = []; + } + var p = Emitter.prototype; + p.addListener = function(event, callback) { + this.listeners.push({ + event, + callback + }); + }; + p.removeListener = function(event, callback) { + for (var i = this.listeners.length; i >= 0; i--) { + var l = this.listeners[i]; + if (l.event === event && l.callback === callback) { + this.listeners.splice(i, 1); + } + } + }; + p.emit = function(event, data) { + for (var i = 0; i < this.listeners.length; i++) { + var l = this.listeners[i]; + if (event === l.event) { + l.callback(data); + } + } + }; + module2.exports = Emitter; + } + /******/ + ]) + ); + }); + })(layoutBase); + return layoutBase.exports; +} +var hasRequiredCoseBase; +function requireCoseBase() { + if (hasRequiredCoseBase) + return coseBase.exports; + hasRequiredCoseBase = 1; + (function(module, exports) { + (function webpackUniversalModuleDefinition(root, factory) { + module.exports = factory(requireLayoutBase()); + })(commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE_0__) { + return ( + /******/ + function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module2 = installedModules[moduleId] = { + /******/ + i: moduleId, + /******/ + l: false, + /******/ + exports: {} + /******/ + }; + modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__); + module2.l = true; + return module2.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value) { + return value; + }; + __webpack_require__.d = function(exports2, name2, getter) { + if (!__webpack_require__.o(exports2, name2)) { + Object.defineProperty(exports2, name2, { + /******/ + configurable: false, + /******/ + enumerable: true, + /******/ + get: getter + /******/ + }); + } + }; + __webpack_require__.n = function(module2) { + var getter = module2 && module2.__esModule ? ( + /******/ + function getDefault() { + return module2["default"]; + } + ) : ( + /******/ + function getModuleExports() { + return module2; + } + ); + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 7); + }([ + /* 0 */ + /***/ + function(module2, exports2) { + module2.exports = __WEBPACK_EXTERNAL_MODULE_0__; + }, + /* 1 */ + /***/ + function(module2, exports2, __webpack_require__) { + var FDLayoutConstants = __webpack_require__(0).FDLayoutConstants; + function CoSEConstants() { + } + for (var prop in FDLayoutConstants) { + CoSEConstants[prop] = FDLayoutConstants[prop]; + } + CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; + CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; + CoSEConstants.TILE = true; + CoSEConstants.TILING_PADDING_VERTICAL = 10; + CoSEConstants.TILING_PADDING_HORIZONTAL = 10; + CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; + module2.exports = CoSEConstants; + }, + /* 2 */ + /***/ + function(module2, exports2, __webpack_require__) { + var FDLayoutEdge = __webpack_require__(0).FDLayoutEdge; + function CoSEEdge(source, target, vEdge) { + FDLayoutEdge.call(this, source, target, vEdge); + } + CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); + for (var prop in FDLayoutEdge) { + CoSEEdge[prop] = FDLayoutEdge[prop]; + } + module2.exports = CoSEEdge; + }, + /* 3 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LGraph = __webpack_require__(0).LGraph; + function CoSEGraph(parent, graphMgr, vGraph) { + LGraph.call(this, parent, graphMgr, vGraph); + } + CoSEGraph.prototype = Object.create(LGraph.prototype); + for (var prop in LGraph) { + CoSEGraph[prop] = LGraph[prop]; + } + module2.exports = CoSEGraph; + }, + /* 4 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LGraphManager = __webpack_require__(0).LGraphManager; + function CoSEGraphManager(layout) { + LGraphManager.call(this, layout); + } + CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); + for (var prop in LGraphManager) { + CoSEGraphManager[prop] = LGraphManager[prop]; + } + module2.exports = CoSEGraphManager; + }, + /* 5 */ + /***/ + function(module2, exports2, __webpack_require__) { + var FDLayoutNode = __webpack_require__(0).FDLayoutNode; + var IMath = __webpack_require__(0).IMath; + function CoSENode(gm, loc, size, vNode) { + FDLayoutNode.call(this, gm, loc, size, vNode); + } + CoSENode.prototype = Object.create(FDLayoutNode.prototype); + for (var prop in FDLayoutNode) { + CoSENode[prop] = FDLayoutNode[prop]; + } + CoSENode.prototype.move = function() { + var layout = this.graphManager.getLayout(); + this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; + this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; + if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX); + } + if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY); + } + if (this.child == null) { + this.moveBy(this.displacementX, this.displacementY); + } else if (this.child.getNodes().length == 0) { + this.moveBy(this.displacementX, this.displacementY); + } else { + this.propogateDisplacementToChildren(this.displacementX, this.displacementY); + } + layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; + }; + CoSENode.prototype.propogateDisplacementToChildren = function(dX, dY) { + var nodes2 = this.getChild().getNodes(); + var node; + for (var i = 0; i < nodes2.length; i++) { + node = nodes2[i]; + if (node.getChild() == null) { + node.moveBy(dX, dY); + node.displacementX += dX; + node.displacementY += dY; + } else { + node.propogateDisplacementToChildren(dX, dY); + } + } + }; + CoSENode.prototype.setPred1 = function(pred12) { + this.pred1 = pred12; + }; + CoSENode.prototype.getPred1 = function() { + return pred1; + }; + CoSENode.prototype.getPred2 = function() { + return pred2; + }; + CoSENode.prototype.setNext = function(next2) { + this.next = next2; + }; + CoSENode.prototype.getNext = function() { + return next; + }; + CoSENode.prototype.setProcessed = function(processed2) { + this.processed = processed2; + }; + CoSENode.prototype.isProcessed = function() { + return processed; + }; + module2.exports = CoSENode; + }, + /* 6 */ + /***/ + function(module2, exports2, __webpack_require__) { + var FDLayout = __webpack_require__(0).FDLayout; + var CoSEGraphManager = __webpack_require__(4); + var CoSEGraph = __webpack_require__(3); + var CoSENode = __webpack_require__(5); + var CoSEEdge = __webpack_require__(2); + var CoSEConstants = __webpack_require__(1); + var FDLayoutConstants = __webpack_require__(0).FDLayoutConstants; + var LayoutConstants = __webpack_require__(0).LayoutConstants; + var Point2 = __webpack_require__(0).Point; + var PointD = __webpack_require__(0).PointD; + var Layout2 = __webpack_require__(0).Layout; + var Integer = __webpack_require__(0).Integer; + var IGeometry = __webpack_require__(0).IGeometry; + var LGraph = __webpack_require__(0).LGraph; + var Transform = __webpack_require__(0).Transform; + function CoSELayout() { + FDLayout.call(this); + this.toBeTiled = {}; + } + CoSELayout.prototype = Object.create(FDLayout.prototype); + for (var prop in FDLayout) { + CoSELayout[prop] = FDLayout[prop]; + } + CoSELayout.prototype.newGraphManager = function() { + var gm = new CoSEGraphManager(this); + this.graphManager = gm; + return gm; + }; + CoSELayout.prototype.newGraph = function(vGraph) { + return new CoSEGraph(null, this.graphManager, vGraph); + }; + CoSELayout.prototype.newNode = function(vNode) { + return new CoSENode(this.graphManager, vNode); + }; + CoSELayout.prototype.newEdge = function(vEdge) { + return new CoSEEdge(null, null, vEdge); + }; + CoSELayout.prototype.initParameters = function() { + FDLayout.prototype.initParameters.call(this, arguments); + if (!this.isSubLayout) { + if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { + this.idealEdgeLength = 10; + } else { + this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; + } + this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.prunedNodesAll = []; + this.growTreeIterations = 0; + this.afterGrowthIterations = 0; + this.isTreeGrowing = false; + this.isGrowthFinished = false; + this.coolingCycle = 0; + this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; + this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations; + this.coolingAdjuster = 1; + } + }; + CoSELayout.prototype.layout = function() { + var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + if (createBendsAsNeeded) { + this.createBendpoints(); + this.graphManager.resetAllEdges(); + } + this.level = 0; + return this.classicLayout(); + }; + CoSELayout.prototype.classicLayout = function() { + this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); + this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); + this.calcNoOfChildrenForAllNodes(); + this.graphManager.calcLowestCommonAncestors(); + this.graphManager.calcInclusionTreeDepths(); + this.graphManager.getRoot().calcEstimatedSize(); + this.calcIdealEdgeLengths(); + if (!this.incremental) { + var forest = this.getFlatForest(); + if (forest.length > 0) { + this.positionNodesRadially(forest); + } else { + this.reduceTrees(); + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function(x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + this.positionNodesRandomly(); + } + } else { + if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { + this.reduceTrees(); + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function(x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + } + } + this.initSpringEmbedder(); + this.runSpringEmbedder(); + return true; + }; + CoSELayout.prototype.tick = function() { + this.totalIterations++; + if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.isConverged()) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + this.coolingCycle++; + if (this.layoutQuality == 0) { + this.coolingAdjuster = this.coolingCycle; + } else if (this.layoutQuality == 1) { + this.coolingAdjuster = this.coolingCycle / 3; + } + this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature); + this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); + } + if (this.isTreeGrowing) { + if (this.growTreeIterations % 10 == 0) { + if (this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + this.growTree(this.prunedNodesAll); + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function(x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + this.graphManager.updateBounds(); + this.updateGrid(); + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } else { + this.isTreeGrowing = false; + this.isGrowthFinished = true; + } + } + this.growTreeIterations++; + } + if (this.isGrowthFinished) { + if (this.isConverged()) { + return true; + } + if (this.afterGrowthIterations % 10 == 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + } + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); + this.afterGrowthIterations++; + } + var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; + var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; + this.totalDisplacement = 0; + this.graphManager.updateBounds(); + this.calcSpringForces(); + this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); + this.calcGravitationalForces(); + this.moveNodes(); + this.animate(); + return false; + }; + CoSELayout.prototype.getPositionsData = function() { + var allNodes = this.graphManager.getAllNodes(); + var pData = {}; + for (var i = 0; i < allNodes.length; i++) { + var rect = allNodes[i].rect; + var id = allNodes[i].id; + pData[id] = { + id, + x: rect.getCenterX(), + y: rect.getCenterY(), + w: rect.width, + h: rect.height + }; + } + return pData; + }; + CoSELayout.prototype.runSpringEmbedder = function() { + this.initialAnimationPeriod = 25; + this.animationPeriod = this.initialAnimationPeriod; + var layoutEnded = false; + if (FDLayoutConstants.ANIMATE === "during") { + this.emit("layoutstarted"); + } else { + while (!layoutEnded) { + layoutEnded = this.tick(); + } + this.graphManager.updateBounds(); + } + }; + CoSELayout.prototype.calculateNodesToApplyGravitationTo = function() { + var nodeList = []; + var graph; + var graphs = this.graphManager.getGraphs(); + var size = graphs.length; + var i; + for (i = 0; i < size; i++) { + graph = graphs[i]; + graph.updateConnected(); + if (!graph.isConnected) { + nodeList = nodeList.concat(graph.getNodes()); + } + } + return nodeList; + }; + CoSELayout.prototype.createBendpoints = function() { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + var visited = /* @__PURE__ */ new Set(); + var i; + for (i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (!visited.has(edge)) { + var source = edge.getSource(); + var target = edge.getTarget(); + if (source == target) { + edge.getBendpoints().push(new PointD()); + edge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(edge); + visited.add(edge); + } else { + var edgeList = []; + edgeList = edgeList.concat(source.getEdgeListToNode(target)); + edgeList = edgeList.concat(target.getEdgeListToNode(source)); + if (!visited.has(edgeList[0])) { + if (edgeList.length > 1) { + var k; + for (k = 0; k < edgeList.length; k++) { + var multiEdge = edgeList[k]; + multiEdge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(multiEdge); + } + } + edgeList.forEach(function(edge2) { + visited.add(edge2); + }); + } + } + } + if (visited.size == edges.length) { + break; + } + } + }; + CoSELayout.prototype.positionNodesRadially = function(forest) { + var currentStartingPoint = new Point2(0, 0); + var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); + var height = 0; + var currentY = 0; + var currentX = 0; + var point = new PointD(0, 0); + for (var i = 0; i < forest.length; i++) { + if (i % numberOfColumns == 0) { + currentX = 0; + currentY = height; + if (i != 0) { + currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; + } + height = 0; + } + var tree = forest[i]; + var centerNode = Layout2.findCenterOfTree(tree); + currentStartingPoint.x = currentX; + currentStartingPoint.y = currentY; + point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); + if (point.y > height) { + height = Math.floor(point.y); + } + currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); + } + this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2)); + }; + CoSELayout.radialLayout = function(tree, centerNode, startingPoint) { + var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); + CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); + var bounds = LGraph.calculateBounds(tree); + var transform = new Transform(); + transform.setDeviceOrgX(bounds.getMinX()); + transform.setDeviceOrgY(bounds.getMinY()); + transform.setWorldOrgX(startingPoint.x); + transform.setWorldOrgY(startingPoint.y); + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + node.transform(transform); + } + var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY()); + return transform.inverseTransformPoint(bottomRight); + }; + CoSELayout.branchRadialLayout = function(node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { + var halfInterval = (endAngle - startAngle + 1) / 2; + if (halfInterval < 0) { + halfInterval += 180; + } + var nodeAngle = (halfInterval + startAngle) % 360; + var teta = nodeAngle * IGeometry.TWO_PI / 360; + var x_ = distance * Math.cos(teta); + var y_ = distance * Math.sin(teta); + node.setCenter(x_, y_); + var neighborEdges = []; + neighborEdges = neighborEdges.concat(node.getEdges()); + var childCount = neighborEdges.length; + if (parentOfNode != null) { + childCount--; + } + var branchCount = 0; + var incEdgesCount = neighborEdges.length; + var startIndex; + var edges = node.getEdgesBetween(parentOfNode); + while (edges.length > 1) { + var temp = edges[0]; + edges.splice(0, 1); + var index = neighborEdges.indexOf(temp); + if (index >= 0) { + neighborEdges.splice(index, 1); + } + incEdgesCount--; + childCount--; + } + if (parentOfNode != null) { + startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; + } else { + startIndex = 0; + } + var stepAngle = Math.abs(endAngle - startAngle) / childCount; + for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) { + var currentNeighbor = neighborEdges[i].getOtherEnd(node); + if (currentNeighbor == parentOfNode) { + continue; + } + var childStartAngle = (startAngle + branchCount * stepAngle) % 360; + var childEndAngle = (childStartAngle + stepAngle) % 360; + CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation); + branchCount++; + } + }; + CoSELayout.maxDiagonalInTree = function(tree) { + var maxDiagonal = Integer.MIN_VALUE; + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + var diagonal = node.getDiagonal(); + if (diagonal > maxDiagonal) { + maxDiagonal = diagonal; + } + } + return maxDiagonal; + }; + CoSELayout.prototype.calcRepulsionRange = function() { + return 2 * (this.level + 1) * this.idealEdgeLength; + }; + CoSELayout.prototype.groupZeroDegreeMembers = function() { + var self2 = this; + var tempMemberGroups = {}; + this.memberGroups = {}; + this.idToDummyNode = {}; + var zeroDegree = []; + var allNodes = this.graphManager.getAllNodes(); + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + var parent = node.getParent(); + if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == void 0 || !this.getToBeTiled(parent))) { + zeroDegree.push(node); + } + } + for (var i = 0; i < zeroDegree.length; i++) { + var node = zeroDegree[i]; + var p_id = node.getParent().id; + if (typeof tempMemberGroups[p_id] === "undefined") + tempMemberGroups[p_id] = []; + tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); + } + Object.keys(tempMemberGroups).forEach(function(p_id2) { + if (tempMemberGroups[p_id2].length > 1) { + var dummyCompoundId = "DummyCompound_" + p_id2; + self2.memberGroups[dummyCompoundId] = tempMemberGroups[p_id2]; + var parent2 = tempMemberGroups[p_id2][0].getParent(); + var dummyCompound = new CoSENode(self2.graphManager); + dummyCompound.id = dummyCompoundId; + dummyCompound.paddingLeft = parent2.paddingLeft || 0; + dummyCompound.paddingRight = parent2.paddingRight || 0; + dummyCompound.paddingBottom = parent2.paddingBottom || 0; + dummyCompound.paddingTop = parent2.paddingTop || 0; + self2.idToDummyNode[dummyCompoundId] = dummyCompound; + var dummyParentGraph = self2.getGraphManager().add(self2.newGraph(), dummyCompound); + var parentGraph = parent2.getChild(); + parentGraph.add(dummyCompound); + for (var i2 = 0; i2 < tempMemberGroups[p_id2].length; i2++) { + var node2 = tempMemberGroups[p_id2][i2]; + parentGraph.remove(node2); + dummyParentGraph.add(node2); + } + } + }); + }; + CoSELayout.prototype.clearCompounds = function() { + var childGraphMap = {}; + var idToNode = {}; + this.performDFSOnCompounds(); + for (var i = 0; i < this.compoundOrder.length; i++) { + idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; + childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); + this.graphManager.remove(this.compoundOrder[i].getChild()); + this.compoundOrder[i].child = null; + } + this.graphManager.resetAllNodes(); + this.tileCompoundMembers(childGraphMap, idToNode); + }; + CoSELayout.prototype.clearZeroDegreeMembers = function() { + var self2 = this; + var tiledZeroDegreePack = this.tiledZeroDegreePack = []; + Object.keys(this.memberGroups).forEach(function(id) { + var compoundNode = self2.idToDummyNode[id]; + tiledZeroDegreePack[id] = self2.tileNodes(self2.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); + compoundNode.rect.width = tiledZeroDegreePack[id].width; + compoundNode.rect.height = tiledZeroDegreePack[id].height; + }); + }; + CoSELayout.prototype.repopulateCompounds = function() { + for (var i = this.compoundOrder.length - 1; i >= 0; i--) { + var lCompoundNode = this.compoundOrder[i]; + var id = lCompoundNode.id; + var horizontalMargin = lCompoundNode.paddingLeft; + var verticalMargin = lCompoundNode.paddingTop; + this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin); + } + }; + CoSELayout.prototype.repopulateZeroDegreeMembers = function() { + var self2 = this; + var tiledPack = this.tiledZeroDegreePack; + Object.keys(tiledPack).forEach(function(id) { + var compoundNode = self2.idToDummyNode[id]; + var horizontalMargin = compoundNode.paddingLeft; + var verticalMargin = compoundNode.paddingTop; + self2.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin); + }); + }; + CoSELayout.prototype.getToBeTiled = function(node) { + var id = node.id; + if (this.toBeTiled[id] != null) { + return this.toBeTiled[id]; + } + var childGraph = node.getChild(); + if (childGraph == null) { + this.toBeTiled[id] = false; + return false; + } + var children = childGraph.getNodes(); + for (var i = 0; i < children.length; i++) { + var theChild = children[i]; + if (this.getNodeDegree(theChild) > 0) { + this.toBeTiled[id] = false; + return false; + } + if (theChild.getChild() == null) { + this.toBeTiled[theChild.id] = false; + continue; + } + if (!this.getToBeTiled(theChild)) { + this.toBeTiled[id] = false; + return false; + } + } + this.toBeTiled[id] = true; + return true; + }; + CoSELayout.prototype.getNodeDegree = function(node) { + node.id; + var edges = node.getEdges(); + var degree = 0; + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (edge.getSource().id !== edge.getTarget().id) { + degree = degree + 1; + } + } + return degree; + }; + CoSELayout.prototype.getNodeDegreeWithChildren = function(node) { + var degree = this.getNodeDegree(node); + if (node.getChild() == null) { + return degree; + } + var children = node.getChild().getNodes(); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + degree += this.getNodeDegreeWithChildren(child); + } + return degree; + }; + CoSELayout.prototype.performDFSOnCompounds = function() { + this.compoundOrder = []; + this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); + }; + CoSELayout.prototype.fillCompexOrderByDFS = function(children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (child.getChild() != null) { + this.fillCompexOrderByDFS(child.getChild().getNodes()); + } + if (this.getToBeTiled(child)) { + this.compoundOrder.push(child); + } + } + }; + CoSELayout.prototype.adjustLocations = function(organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) { + x += compoundHorizontalMargin; + y += compoundVerticalMargin; + var left = x; + for (var i = 0; i < organization.rows.length; i++) { + var row = organization.rows[i]; + x = left; + var maxHeight = 0; + for (var j = 0; j < row.length; j++) { + var lnode = row[j]; + lnode.rect.x = x; + lnode.rect.y = y; + x += lnode.rect.width + organization.horizontalPadding; + if (lnode.rect.height > maxHeight) + maxHeight = lnode.rect.height; + } + y += maxHeight + organization.verticalPadding; + } + }; + CoSELayout.prototype.tileCompoundMembers = function(childGraphMap, idToNode) { + var self2 = this; + this.tiledMemberPack = []; + Object.keys(childGraphMap).forEach(function(id) { + var compoundNode = idToNode[id]; + self2.tiledMemberPack[id] = self2.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); + compoundNode.rect.width = self2.tiledMemberPack[id].width; + compoundNode.rect.height = self2.tiledMemberPack[id].height; + }); + }; + CoSELayout.prototype.tileNodes = function(nodes2, minWidth) { + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + var organization = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: minWidth, + // assume minHeight equals to minWidth + verticalPadding, + horizontalPadding + }; + nodes2.sort(function(n1, n2) { + if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) + return -1; + if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) + return 1; + return 0; + }); + for (var i = 0; i < nodes2.length; i++) { + var lNode = nodes2[i]; + if (organization.rows.length == 0) { + this.insertNodeToRow(organization, lNode, 0, minWidth); + } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { + this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth); + } else { + this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); + } + this.shiftToLastRow(organization); + } + return organization; + }; + CoSELayout.prototype.insertNodeToRow = function(organization, node, rowIndex, minWidth) { + var minCompoundSize = minWidth; + if (rowIndex == organization.rows.length) { + var secondDimension = []; + organization.rows.push(secondDimension); + organization.rowWidth.push(minCompoundSize); + organization.rowHeight.push(0); + } + var w = organization.rowWidth[rowIndex] + node.rect.width; + if (organization.rows[rowIndex].length > 0) { + w += organization.horizontalPadding; + } + organization.rowWidth[rowIndex] = w; + if (organization.width < w) { + organization.width = w; + } + var h = node.rect.height; + if (rowIndex > 0) + h += organization.verticalPadding; + var extraHeight = 0; + if (h > organization.rowHeight[rowIndex]) { + extraHeight = organization.rowHeight[rowIndex]; + organization.rowHeight[rowIndex] = h; + extraHeight = organization.rowHeight[rowIndex] - extraHeight; + } + organization.height += extraHeight; + organization.rows[rowIndex].push(node); + }; + CoSELayout.prototype.getShortestRowIndex = function(organization) { + var r = -1; + var min = Number.MAX_VALUE; + for (var i = 0; i < organization.rows.length; i++) { + if (organization.rowWidth[i] < min) { + r = i; + min = organization.rowWidth[i]; + } + } + return r; + }; + CoSELayout.prototype.getLongestRowIndex = function(organization) { + var r = -1; + var max = Number.MIN_VALUE; + for (var i = 0; i < organization.rows.length; i++) { + if (organization.rowWidth[i] > max) { + r = i; + max = organization.rowWidth[i]; + } + } + return r; + }; + CoSELayout.prototype.canAddHorizontal = function(organization, extraWidth, extraHeight) { + var sri = this.getShortestRowIndex(organization); + if (sri < 0) { + return true; + } + var min = organization.rowWidth[sri]; + if (min + organization.horizontalPadding + extraWidth <= organization.width) + return true; + var hDiff = 0; + if (organization.rowHeight[sri] < extraHeight) { + if (sri > 0) + hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; + } + var add_to_row_ratio; + if (organization.width - min >= extraWidth + organization.horizontalPadding) { + add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); + } else { + add_to_row_ratio = (organization.height + hDiff) / organization.width; + } + hDiff = extraHeight + organization.verticalPadding; + var add_new_row_ratio; + if (organization.width < extraWidth) { + add_new_row_ratio = (organization.height + hDiff) / extraWidth; + } else { + add_new_row_ratio = (organization.height + hDiff) / organization.width; + } + if (add_new_row_ratio < 1) + add_new_row_ratio = 1 / add_new_row_ratio; + if (add_to_row_ratio < 1) + add_to_row_ratio = 1 / add_to_row_ratio; + return add_to_row_ratio < add_new_row_ratio; + }; + CoSELayout.prototype.shiftToLastRow = function(organization) { + var longest = this.getLongestRowIndex(organization); + var last = organization.rowWidth.length - 1; + var row = organization.rows[longest]; + var node = row[row.length - 1]; + var diff = node.width + organization.horizontalPadding; + if (organization.width - organization.rowWidth[last] > diff && longest != last) { + row.splice(-1, 1); + organization.rows[last].push(node); + organization.rowWidth[longest] = organization.rowWidth[longest] - diff; + organization.rowWidth[last] = organization.rowWidth[last] + diff; + organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; + var maxHeight = Number.MIN_VALUE; + for (var i = 0; i < row.length; i++) { + if (row[i].height > maxHeight) + maxHeight = row[i].height; + } + if (longest > 0) + maxHeight += organization.verticalPadding; + var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + organization.rowHeight[longest] = maxHeight; + if (organization.rowHeight[last] < node.height + organization.verticalPadding) + organization.rowHeight[last] = node.height + organization.verticalPadding; + var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + organization.height += finalTotal - prevTotal; + this.shiftToLastRow(organization); + } + }; + CoSELayout.prototype.tilingPreLayout = function() { + if (CoSEConstants.TILE) { + this.groupZeroDegreeMembers(); + this.clearCompounds(); + this.clearZeroDegreeMembers(); + } + }; + CoSELayout.prototype.tilingPostLayout = function() { + if (CoSEConstants.TILE) { + this.repopulateZeroDegreeMembers(); + this.repopulateCompounds(); + } + }; + CoSELayout.prototype.reduceTrees = function() { + var prunedNodesAll = []; + var containsLeaf = true; + var node; + while (containsLeaf) { + var allNodes = this.graphManager.getAllNodes(); + var prunedNodesInStepTemp = []; + containsLeaf = false; + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) { + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); + containsLeaf = true; + } + } + if (containsLeaf == true) { + var prunedNodesInStep = []; + for (var j = 0; j < prunedNodesInStepTemp.length; j++) { + if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { + prunedNodesInStep.push(prunedNodesInStepTemp[j]); + prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); + } + } + prunedNodesAll.push(prunedNodesInStep); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = prunedNodesAll; + }; + CoSELayout.prototype.growTree = function(prunedNodesAll) { + var lengthOfPrunedNodesInStep = prunedNodesAll.length; + var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; + var nodeData; + for (var i = 0; i < prunedNodesInStep.length; i++) { + nodeData = prunedNodesInStep[i]; + this.findPlaceforPrunedNode(nodeData); + nodeData[2].add(nodeData[0]); + nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); + } + prunedNodesAll.splice(prunedNodesAll.length - 1, 1); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + }; + CoSELayout.prototype.findPlaceforPrunedNode = function(nodeData) { + var gridForPrunedNode; + var nodeToConnect; + var prunedNode = nodeData[0]; + if (prunedNode == nodeData[1].source) { + nodeToConnect = nodeData[1].target; + } else { + nodeToConnect = nodeData[1].source; + } + var startGridX = nodeToConnect.startX; + var finishGridX = nodeToConnect.finishX; + var startGridY = nodeToConnect.startY; + var finishGridY = nodeToConnect.finishY; + var upNodeCount = 0; + var downNodeCount = 0; + var rightNodeCount = 0; + var leftNodeCount = 0; + var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; + if (startGridY > 0) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1; + } + } + if (finishGridX < this.grid.length - 1) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1; + } + } + if (finishGridY < this.grid[0].length - 1) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1; + } + } + if (startGridX > 0) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1; + } + } + var min = Integer.MAX_VALUE; + var minCount; + var minIndex; + for (var j = 0; j < controlRegions.length; j++) { + if (controlRegions[j] < min) { + min = controlRegions[j]; + minCount = 1; + minIndex = j; + } else if (controlRegions[j] == min) { + minCount++; + } + } + if (minCount == 3 && min == 0) { + if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { + gridForPrunedNode = 1; + } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 0; + } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 3; + } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 2; + } + } else if (minCount == 2 && min == 0) { + var random = Math.floor(Math.random() * 2); + if (controlRegions[0] == 0 && controlRegions[1] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 1; + } + } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 3; + } + } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 3; + } + } else { + if (random == 0) { + gridForPrunedNode = 2; + } else { + gridForPrunedNode = 3; + } + } + } else if (minCount == 4 && min == 0) { + var random = Math.floor(Math.random() * 4); + gridForPrunedNode = random; + } else { + gridForPrunedNode = minIndex; + } + if (gridForPrunedNode == 0) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); + } else if (gridForPrunedNode == 1) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } else if (gridForPrunedNode == 2) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); + } else { + prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } + }; + module2.exports = CoSELayout; + }, + /* 7 */ + /***/ + function(module2, exports2, __webpack_require__) { + var coseBase2 = {}; + coseBase2.layoutBase = __webpack_require__(0); + coseBase2.CoSEConstants = __webpack_require__(1); + coseBase2.CoSEEdge = __webpack_require__(2); + coseBase2.CoSEGraph = __webpack_require__(3); + coseBase2.CoSEGraphManager = __webpack_require__(4); + coseBase2.CoSELayout = __webpack_require__(6); + coseBase2.CoSENode = __webpack_require__(5); + module2.exports = coseBase2; + } + /******/ + ]) + ); + }); + })(coseBase); + return coseBase.exports; +} +(function(module, exports) { + (function webpackUniversalModuleDefinition(root, factory) { + module.exports = factory(requireCoseBase()); + })(commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE_0__) { + return ( + /******/ + function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module2 = installedModules[moduleId] = { + /******/ + i: moduleId, + /******/ + l: false, + /******/ + exports: {} + /******/ + }; + modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__); + module2.l = true; + return module2.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.i = function(value) { + return value; + }; + __webpack_require__.d = function(exports2, name2, getter) { + if (!__webpack_require__.o(exports2, name2)) { + Object.defineProperty(exports2, name2, { + /******/ + configurable: false, + /******/ + enumerable: true, + /******/ + get: getter + /******/ + }); + } + }; + __webpack_require__.n = function(module2) { + var getter = module2 && module2.__esModule ? ( + /******/ + function getDefault() { + return module2["default"]; + } + ) : ( + /******/ + function getModuleExports() { + return module2; + } + ); + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 1); + }([ + /* 0 */ + /***/ + function(module2, exports2) { + module2.exports = __WEBPACK_EXTERNAL_MODULE_0__; + }, + /* 1 */ + /***/ + function(module2, exports2, __webpack_require__) { + var LayoutConstants = __webpack_require__(0).layoutBase.LayoutConstants; + var FDLayoutConstants = __webpack_require__(0).layoutBase.FDLayoutConstants; + var CoSEConstants = __webpack_require__(0).CoSEConstants; + var CoSELayout = __webpack_require__(0).CoSELayout; + var CoSENode = __webpack_require__(0).CoSENode; + var PointD = __webpack_require__(0).layoutBase.PointD; + var DimensionD2 = __webpack_require__(0).layoutBase.DimensionD; + var defaults = { + // Called on `layoutready` + ready: function ready() { + }, + // Called on `layoutstop` + stop: function stop() { + }, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: "default", + // include labels in node dimensions + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: "end", + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 + }; + function extend(defaults2, options) { + var obj = {}; + for (var i in defaults2) { + obj[i] = defaults2[i]; + } + for (var i in options) { + obj[i] = options[i]; + } + return obj; + } + function _CoSELayout(_options) { + this.options = extend(defaults, _options); + getUserOptions(this.options); + } + var getUserOptions = function getUserOptions2(options) { + if (options.nodeRepulsion != null) + CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion; + if (options.idealEdgeLength != null) + CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; + if (options.edgeElasticity != null) + CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity; + if (options.nestingFactor != null) + CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) + CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) + CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) + CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if (options.gravityCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if (options.gravityRangeCompound != null) + CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) + CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + if (options.quality == "draft") + LayoutConstants.QUALITY = 0; + else if (options.quality == "proof") + LayoutConstants.QUALITY = 2; + else + LayoutConstants.QUALITY = 1; + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === "function" ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === "function" ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; + }; + _CoSELayout.prototype.run = function() { + var ready; + var frameId; + var options = this.options; + this.idToLNode = {}; + var layout = this.layout = new CoSELayout(); + var self2 = this; + self2.stopped = false; + this.cy = this.options.cy; + this.cy.trigger({ type: "layoutstart", layout: this }); + var gm = layout.newGraphManager(); + this.gm = gm; + var nodes2 = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + this.root = gm.addRoot(); + this.processChildrenList(this.root, this.getTopMostNodes(nodes2), layout); + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var sourceNode = this.idToLNode[edge.data("source")]; + var targetNode = this.idToLNode[edge.data("target")]; + if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { + var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + } + } + var getPositions = function getPositions2(ele, i2) { + if (typeof ele === "number") { + ele = i2; + } + var theId = ele.data("id"); + var lNode = self2.idToLNode[theId]; + return { + x: lNode.getRect().getCenterX(), + y: lNode.getRect().getCenterY() + }; + }; + var iterateAnimated = function iterateAnimated2() { + var afterReposition = function afterReposition2() { + if (options.fit) { + options.cy.fit(options.eles, options.padding); + } + if (!ready) { + ready = true; + self2.cy.one("layoutready", options.ready); + self2.cy.trigger({ type: "layoutready", layout: self2 }); + } + }; + var ticksPerFrame = self2.options.refresh; + var isDone; + for (var i2 = 0; i2 < ticksPerFrame && !isDone; i2++) { + isDone = self2.stopped || self2.layout.tick(); + } + if (isDone) { + if (layout.checkLayoutSuccess() && !layout.isSubLayout) { + layout.doPostLayout(); + } + if (layout.tilingPostLayout) { + layout.tilingPostLayout(); + } + layout.isLayoutFinished = true; + self2.options.eles.nodes().positions(getPositions); + afterReposition(); + self2.cy.one("layoutstop", self2.options.stop); + self2.cy.trigger({ type: "layoutstop", layout: self2 }); + if (frameId) { + cancelAnimationFrame(frameId); + } + ready = false; + return; + } + var animationData = self2.layout.getPositionsData(); + options.eles.nodes().positions(function(ele, i3) { + if (typeof ele === "number") { + ele = i3; + } + if (!ele.isParent()) { + var theId = ele.id(); + var pNode = animationData[theId]; + var temp = ele; + while (pNode == null) { + pNode = animationData[temp.data("parent")] || animationData["DummyCompound_" + temp.data("parent")]; + animationData[theId] = pNode; + temp = temp.parent()[0]; + if (temp == void 0) { + break; + } + } + if (pNode != null) { + return { + x: pNode.x, + y: pNode.y + }; + } else { + return { + x: ele.position("x"), + y: ele.position("y") + }; + } + } + }); + afterReposition(); + frameId = requestAnimationFrame(iterateAnimated2); + }; + layout.addListener("layoutstarted", function() { + if (self2.options.animate === "during") { + frameId = requestAnimationFrame(iterateAnimated); + } + }); + layout.runLayout(); + if (this.options.animate !== "during") { + self2.options.eles.nodes().not(":parent").layoutPositions(self2, self2.options, getPositions); + ready = false; + } + return this; + }; + _CoSELayout.prototype.getTopMostNodes = function(nodes2) { + var nodesMap = {}; + for (var i = 0; i < nodes2.length; i++) { + nodesMap[nodes2[i].id()] = true; + } + var roots = nodes2.filter(function(ele, i2) { + if (typeof ele === "number") { + ele = i2; + } + var parent = ele.parent()[0]; + while (parent != null) { + if (nodesMap[parent.id()]) { + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + return roots; + }; + _CoSELayout.prototype.processChildrenList = function(parent, children, layout) { + var size = children.length; + for (var i = 0; i < size; i++) { + var theChild = children[i]; + var children_of_children = theChild.children(); + var theNode; + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + if (theChild.outerWidth() != null && theChild.outerHeight() != null) { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position("x") - dimensions.w / 2, theChild.position("y") - dimensions.h / 2), new DimensionD2(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + theNode.id = theChild.data("id"); + theNode.paddingLeft = parseInt(theChild.css("padding")); + theNode.paddingTop = parseInt(theChild.css("padding")); + theNode.paddingRight = parseInt(theChild.css("padding")); + theNode.paddingBottom = parseInt(theChild.css("padding")); + if (this.options.nodeDimensionsIncludeLabels) { + if (theChild.isParent()) { + var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; + var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; + var labelPos = theChild.css("text-halign"); + theNode.labelWidth = labelWidth; + theNode.labelHeight = labelHeight; + theNode.labelPos = labelPos; + } + } + this.idToLNode[theChild.data("id")] = theNode; + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + this.processChildrenList(theNewGraph, children_of_children, layout); + } + } + }; + _CoSELayout.prototype.stop = function() { + this.stopped = true; + return this; + }; + var register = function register2(cytoscape2) { + cytoscape2("layout", "cose-bilkent", _CoSELayout); + }; + if (typeof cytoscape !== "undefined") { + register(cytoscape); + } + module2.exports = register; + } + /******/ + ]) + ); + }); +})(cytoscapeCoseBilkent); +var cytoscapeCoseBilkentExports = cytoscapeCoseBilkent.exports; +const coseBilkent = /* @__PURE__ */ getDefaultExportFromCjs(cytoscapeCoseBilkentExports); +cytoscape$1.use(coseBilkent); +function drawNodes(svg, mindmap, section, conf) { + svgDraw.drawNode(svg, mindmap, section, conf); + if (mindmap.children) { + mindmap.children.forEach((child, index) => { + drawNodes(svg, child, section < 0 ? index : section, conf); + }); + } +} +function drawEdges(edgesEl, cy) { + cy.edges().map((edge, id) => { + const data = edge.data(); + if (edge[0]._private.bodyBounds) { + const bounds = edge[0]._private.rscratch; + log.trace("Edge: ", id, data); + edgesEl.insert("path").attr( + "d", + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); + } + }); +} +function addNodes(mindmap, cy, conf, level) { + cy.add({ + group: "nodes", + data: { + id: mindmap.id, + labelText: mindmap.descr, + height: mindmap.height, + width: mindmap.width, + level, + nodeId: mindmap.id, + padding: mindmap.padding, + type: mindmap.type + }, + position: { + x: mindmap.x, + y: mindmap.y + } + }); + if (mindmap.children) { + mindmap.children.forEach((child) => { + addNodes(child, cy, conf, level + 1); + cy.add({ + group: "edges", + data: { + id: `${mindmap.id}_${child.id}`, + source: mindmap.id, + target: child.id, + depth: level, + section: child.section + } + }); + }); + } +} +function layoutMindmap(node, conf) { + return new Promise((resolve) => { + const renderEl = d3select("body").append("div").attr("id", "cy").attr("style", "display:none"); + const cy = cytoscape$1({ + container: document.getElementById("cy"), + // container to render in + style: [ + { + selector: "edge", + style: { + "curve-style": "bezier" + } + } + ] + }); + renderEl.remove(); + addNodes(node, cy, conf, 0); + cy.nodes().forEach(function(n) { + n.layoutDimensions = () => { + const data = n.data(); + return { w: data.width, h: data.height }; + }; + }); + cy.layout({ + name: "cose-bilkent", + quality: "proof", + // headless: true, + styleEnabled: false, + animate: false + }).run(); + cy.ready((e) => { + log.info("Ready", e); + resolve(cy); + }); + }); +} +function positionNodes(cy) { + cy.nodes().map((node, id) => { + const data = node.data(); + data.x = node.position().x; + data.y = node.position().y; + svgDraw.positionNode(data); + const el = getElementById(data.nodeId); + log.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data); + el.attr( + "transform", + `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` + ); + el.attr("attr", `apa-${id})`); + }); +} +const draw = async (text, id, version, diagObj) => { + const conf = getConfig(); + conf.htmlLabels = false; + log.debug("Rendering mindmap diagram\n" + text, diagObj.parser); + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = root.select("#" + id); + svg.append("g"); + const mm = diagObj.db.getMindmap(); + const edgesElem = svg.append("g"); + edgesElem.attr("class", "mindmap-edges"); + const nodesElem = svg.append("g"); + nodesElem.attr("class", "mindmap-nodes"); + drawNodes(nodesElem, mm, -1, conf); + const cy = await layoutMindmap(mm, conf); + drawEdges(edgesElem, cy); + positionNodes(cy); + setupGraphViewbox(void 0, svg, conf.mindmap.padding, conf.mindmap.useMaxWidth); +}; +const mindmapRenderer = { + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if (isDark(options["lineColor" + i])) { + options["lineColor" + i] = lighten(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = darken(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`; +const mindmapStyles = getStyles; +const diagram = { + db: mindmapDb, + renderer: mindmapRenderer, + parser: mindmapParser, + styles: mindmapStyles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/ordinal-475e0c0c.js b/webroot/js/node_modules/mermaid/dist/ordinal-475e0c0c.js new file mode 100644 index 0000000..65afcfd --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/ordinal-475e0c0c.js @@ -0,0 +1,82 @@ +import { i as initRange } from "./init-cc95ec8e.js"; +class InternMap extends Map { + constructor(entries, key = keyof) { + super(); + Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } }); + if (entries != null) + for (const [key2, value] of entries) + this.set(key2, value); + } + get(key) { + return super.get(intern_get(this, key)); + } + has(key) { + return super.has(intern_get(this, key)); + } + set(key, value) { + return super.set(intern_set(this, key), value); + } + delete(key) { + return super.delete(intern_delete(this, key)); + } +} +function intern_get({ _intern, _key }, value) { + const key = _key(value); + return _intern.has(key) ? _intern.get(key) : value; +} +function intern_set({ _intern, _key }, value) { + const key = _key(value); + if (_intern.has(key)) + return _intern.get(key); + _intern.set(key, value); + return value; +} +function intern_delete({ _intern, _key }, value) { + const key = _key(value); + if (_intern.has(key)) { + value = _intern.get(key); + _intern.delete(key); + } + return value; +} +function keyof(value) { + return value !== null && typeof value === "object" ? value.valueOf() : value; +} +const implicit = Symbol("implicit"); +function ordinal() { + var index = new InternMap(), domain = [], range = [], unknown = implicit; + function scale(d) { + let i = index.get(d); + if (i === void 0) { + if (unknown !== implicit) + return unknown; + index.set(d, i = domain.push(d) - 1); + } + return range[i % range.length]; + } + scale.domain = function(_) { + if (!arguments.length) + return domain.slice(); + domain = [], index = new InternMap(); + for (const value of _) { + if (index.has(value)) + continue; + index.set(value, domain.push(value) - 1); + } + return scale; + }; + scale.range = function(_) { + return arguments.length ? (range = Array.from(_), scale) : range.slice(); + }; + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + scale.copy = function() { + return ordinal(domain, range).unknown(unknown); + }; + initRange.apply(scale, arguments); + return scale; +} +export { + ordinal as o +}; diff --git a/webroot/js/node_modules/mermaid/dist/ordinal-5695958c.js b/webroot/js/node_modules/mermaid/dist/ordinal-5695958c.js new file mode 100644 index 0000000..db7d157 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/ordinal-5695958c.js @@ -0,0 +1,65 @@ +import { i as a } from "./init-f9637058.js"; +class o extends Map { + constructor(n, t = g) { + if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) + for (const [r, s] of n) + this.set(r, s); + } + get(n) { + return super.get(c(this, n)); + } + has(n) { + return super.has(c(this, n)); + } + set(n, t) { + return super.set(l(this, n), t); + } + delete(n) { + return super.delete(p(this, n)); + } +} +function c({ _intern: e, _key: n }, t) { + const r = n(t); + return e.has(r) ? e.get(r) : t; +} +function l({ _intern: e, _key: n }, t) { + const r = n(t); + return e.has(r) ? e.get(r) : (e.set(r, t), t); +} +function p({ _intern: e, _key: n }, t) { + const r = n(t); + return e.has(r) && (t = e.get(r), e.delete(r)), t; +} +function g(e) { + return e !== null && typeof e == "object" ? e.valueOf() : e; +} +const f = Symbol("implicit"); +function h() { + var e = new o(), n = [], t = [], r = f; + function s(u) { + let i = e.get(u); + if (i === void 0) { + if (r !== f) + return r; + e.set(u, i = n.push(u) - 1); + } + return t[i % t.length]; + } + return s.domain = function(u) { + if (!arguments.length) + return n.slice(); + n = [], e = new o(); + for (const i of u) + e.has(i) || e.set(i, n.push(i) - 1); + return s; + }, s.range = function(u) { + return arguments.length ? (t = Array.from(u), s) : t.slice(); + }, s.unknown = function(u) { + return arguments.length ? (r = u, s) : r; + }, s.copy = function() { + return h(n, t).unknown(r); + }, a.apply(s, arguments), s; +} +export { + h as o +}; diff --git a/webroot/js/node_modules/mermaid/dist/pieDiagram-697bd9be.js b/webroot/js/node_modules/mermaid/dist/pieDiagram-697bd9be.js new file mode 100644 index 0000000..be3b897 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/pieDiagram-697bd9be.js @@ -0,0 +1,769 @@ +import { W as tau, X as defaultConfig, B as setDiagramTitle, D as getDiagramTitle, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, E as clear$1, d as sanitizeText, c as getConfig$1, l as log, Y as cleanAndMerge, V as selectSvgElement, k as configureSvgSize, Z as parseFontSize } from "./mermaid-491db2d9.js"; +import { d as d3arc } from "./arc-947d8396.js"; +import { o as ordinal } from "./ordinal-475e0c0c.js"; +import { a as array } from "./array-b7dcf730.js"; +import { c as constant } from "./constant-b644328d.js"; +import "./init-cc95ec8e.js"; +function descending(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +} +function identity(d) { + return d; +} +function d3pie() { + var value = identity, sortValues = descending, sort = null, startAngle = constant(0), endAngle = constant(tau), padAngle = constant(0); + function pie(data) { + var i, n = (data = array(data)).length, j, k, sum = 0, index = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), pa = p * (da < 0 ? -1 : 1), v; + for (i = 0; i < n; ++i) { + if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { + sum += v; + } + } + if (sortValues != null) + index.sort(function(i2, j2) { + return sortValues(arcs[i2], arcs[j2]); + }); + else if (sort != null) + index.sort(function(i2, j2) { + return sort(data[i2], data[j2]); + }); + for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { + j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { + data: data[j], + index: i, + value: v, + startAngle: a0, + endAngle: a1, + padAngle: p + }; + } + return arcs; + } + pie.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value; + }; + pie.sortValues = function(_) { + return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; + }; + pie.sort = function(_) { + return arguments.length ? (sort = _, sortValues = null, pie) : sort; + }; + pie.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle; + }; + pie.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle; + }; + pie.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle; + }; + return pie; +} +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V5 = [2, 4], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V7 = [20, 21, 22], $V8 = [2, 7], $V9 = [1, 12], $Va = [1, 13], $Vb = [1, 14], $Vc = [1, 15], $Vd = [1, 16], $Ve = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "PIE": 5, "document": 6, "showData": 7, "line": 8, "statement": 9, "txt": 10, "value": 11, "title": 12, "title_value": 13, "acc_title": 14, "acc_title_value": 15, "acc_descr": 16, "acc_descr_value": 17, "acc_descr_multiline_value": 18, "section": 19, "NEWLINE": 20, ";": 21, "EOF": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" }, + productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setShowData(true); + break; + case 6: + this.$ = $$[$0 - 1]; + break; + case 8: + yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0])); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 10: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 11: + case 12: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 13: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, o($V4, $V5, { 6: 8, 7: [1, 9] }), o($V6, [2, 14]), o($V6, [2, 15]), o($V6, [2, 16]), { 1: [2, 1] }, o($V7, $V8, { 8: 10, 9: 11, 1: [2, 2], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, $V5, { 6: 18 }), o($V4, [2, 5]), { 4: 19, 20: $V1, 21: $V2, 22: $V3 }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, o($V7, [2, 12]), o($V7, [2, 13]), o($V7, $V8, { 8: 10, 9: 11, 1: [2, 3], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, [2, 6]), o($V7, [2, 8]), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11])], + defaultActions: { 7: [2, 1] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 20; + case 3: + break; + case 4: + break; + case 5: + this.begin("title"); + return 12; + case 6: + this.popState(); + return "title_value"; + case 7: + this.begin("acc_title"); + return 14; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 16; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + this.begin("string"); + break; + case 15: + this.popState(); + break; + case 16: + return "txt"; + case 17: + return 5; + case 18: + return 7; + case 19: + return "value"; + case 20: + return 22; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [6], "inclusive": false }, "string": { "rules": [15, 16], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_PIE_CONFIG = defaultConfig.pie; +const DEFAULT_PIE_DB = { + sections: {}, + showData: false, + config: DEFAULT_PIE_CONFIG +}; +let sections = DEFAULT_PIE_DB.sections; +let showData = DEFAULT_PIE_DB.showData; +const config = structuredClone(DEFAULT_PIE_CONFIG); +const getConfig = () => structuredClone(config); +const clear = () => { + sections = structuredClone(DEFAULT_PIE_DB.sections); + showData = DEFAULT_PIE_DB.showData; + clear$1(); +}; +const addSection = (label, value) => { + label = sanitizeText(label, getConfig$1()); + if (sections[label] === void 0) { + sections[label] = value; + log.debug(`added new section: ${label}, with value: ${value}`); + } +}; +const getSections = () => sections; +const cleanupValue = (value) => { + if (value.substring(0, 1) === ":") { + value = value.substring(1).trim(); + } + return Number(value.trim()); +}; +const setShowData = (toggle) => { + showData = toggle; +}; +const getShowData = () => showData; +const db = { + getConfig, + clear, + setDiagramTitle, + getDiagramTitle, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addSection, + getSections, + cleanupValue, + setShowData, + getShowData +}; +const getStyles = (options) => ` + .pieCircle{ + stroke: ${options.pieStrokeColor}; + stroke-width : ${options.pieStrokeWidth}; + opacity : ${options.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${options.pieOuterStrokeColor}; + stroke-width: ${options.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${options.pieTitleTextSize}; + fill: ${options.pieTitleTextColor}; + font-family: ${options.fontFamily}; + } + .slice { + font-family: ${options.fontFamily}; + fill: ${options.pieSectionTextColor}; + font-size:${options.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${options.pieLegendTextColor}; + font-family: ${options.fontFamily}; + font-size: ${options.pieLegendTextSize}; + } +`; +const styles = getStyles; +const createPieArcs = (sections2) => { + const pieData = Object.entries(sections2).map((element) => { + return { + label: element[0], + value: element[1] + }; + }).sort((a, b) => { + return b.value - a.value; + }); + const pie = d3pie().value( + (d3Section) => d3Section.value + ); + return pie(pieData); +}; +const draw = (text, id, _version, diagObj) => { + var _a, _b; + log.debug("rendering pie chart\n" + text); + const db2 = diagObj.db; + const globalConfig = getConfig$1(); + const pieConfig = cleanAndMerge(db2.getConfig(), globalConfig.pie); + const height = 450; + const width = ((_b = (_a = document.getElementById(id)) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.offsetWidth) ?? pieConfig.useWidth; + const svg = selectSvgElement(id); + svg.attr("viewBox", `0 0 ${width} ${height}`); + configureSvgSize(svg, height, width, pieConfig.useMaxWidth); + const MARGIN = 40; + const LEGEND_RECT_SIZE = 18; + const LEGEND_SPACING = 4; + const group = svg.append("g"); + group.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); + const { themeVariables } = globalConfig; + let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth); + outerStrokeWidth ?? (outerStrokeWidth = 2); + const textPosition = pieConfig.textPosition; + const radius = Math.min(width, height) / 2 - MARGIN; + const arcGenerator = d3arc().innerRadius(0).outerRadius(radius); + const labelArcGenerator = d3arc().innerRadius(radius * textPosition).outerRadius(radius * textPosition); + group.append("circle").attr("cx", 0).attr("cy", 0).attr("r", radius + outerStrokeWidth / 2).attr("class", "pieOuterCircle"); + const sections2 = db2.getSections(); + const arcs = createPieArcs(sections2); + const myGeneratedColors = [ + themeVariables.pie1, + themeVariables.pie2, + themeVariables.pie3, + themeVariables.pie4, + themeVariables.pie5, + themeVariables.pie6, + themeVariables.pie7, + themeVariables.pie8, + themeVariables.pie9, + themeVariables.pie10, + themeVariables.pie11, + themeVariables.pie12 + ]; + const color = ordinal(myGeneratedColors); + group.selectAll("mySlices").data(arcs).enter().append("path").attr("d", arcGenerator).attr("fill", (datum) => { + return color(datum.data.label); + }).attr("class", "pieCircle"); + let sum = 0; + Object.keys(sections2).forEach((key) => { + sum += sections2[key]; + }); + group.selectAll("mySlices").data(arcs).enter().append("text").text((datum) => { + return (datum.data.value / sum * 100).toFixed(0) + "%"; + }).attr("transform", (datum) => { + return "translate(" + labelArcGenerator.centroid(datum) + ")"; + }).style("text-anchor", "middle").attr("class", "slice"); + group.append("text").text(db2.getDiagramTitle()).attr("x", 0).attr("y", -(height - 50) / 2).attr("class", "pieTitleText"); + const legend = group.selectAll(".legend").data(color.domain()).enter().append("g").attr("class", "legend").attr("transform", (_datum, index) => { + const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING; + const offset = height2 * color.domain().length / 2; + const horizontal = 12 * LEGEND_RECT_SIZE; + const vertical = index * height2 - offset; + return "translate(" + horizontal + "," + vertical + ")"; + }); + legend.append("rect").attr("width", LEGEND_RECT_SIZE).attr("height", LEGEND_RECT_SIZE).style("fill", color).style("stroke", color); + legend.data(arcs).append("text").attr("x", LEGEND_RECT_SIZE + LEGEND_SPACING).attr("y", LEGEND_RECT_SIZE - LEGEND_SPACING).text((datum) => { + const { label, value } = datum.data; + if (db2.getShowData()) { + return `${label} [${value}]`; + } + return label; + }); +}; +const renderer = { draw }; +const diagram = { + parser: parser$1, + db, + renderer, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/pieDiagram-eb4af4ec.js b/webroot/js/node_modules/mermaid/dist/pieDiagram-eb4af4ec.js new file mode 100644 index 0000000..fc371e2 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/pieDiagram-eb4af4ec.js @@ -0,0 +1,501 @@ +import { W as H, X as at, B as lt, D as ot, s as ct, g as ht, b as ut, a as yt, E as ft, d as pt, c as et, l as it, Y as gt, V as dt, k as mt, Z as _t } from "./mermaid-e4a58915.js"; +import { d as tt } from "./arc-dcf06dea.js"; +import { o as kt } from "./ordinal-5695958c.js"; +import { a as xt } from "./array-2ff2c7a6.js"; +import { c as F } from "./constant-2fe7eae5.js"; +import "./init-f9637058.js"; +function vt(e, h) { + return h < e ? -1 : h > e ? 1 : h >= e ? 0 : NaN; +} +function bt(e) { + return e; +} +function St() { + var e = bt, h = vt, S = null, f = F(0), g = F(H), E = F(0); + function u(r) { + var l, k = (r = xt(r)).length, I, v, w = 0, d = new Array(k), c = new Array(k), A = +f.apply(this, arguments), $ = Math.min(H, Math.max(-H, g.apply(this, arguments) - A)), T, O = Math.min(Math.abs($) / k, E.apply(this, arguments)), x = O * ($ < 0 ? -1 : 1), t; + for (l = 0; l < k; ++l) + (t = c[d[l] = l] = +e(r[l], l, r)) > 0 && (w += t); + for (h != null ? d.sort(function(i, n) { + return h(c[i], c[n]); + }) : S != null && d.sort(function(i, n) { + return S(r[i], r[n]); + }), l = 0, v = w ? ($ - k * x) / w : 0; l < k; ++l, A = T) + I = d[l], t = c[I], T = A + (t > 0 ? t * v : 0) + x, c[I] = { + data: r[I], + index: l, + value: t, + startAngle: A, + endAngle: T, + padAngle: O + }; + return c; + } + return u.value = function(r) { + return arguments.length ? (e = typeof r == "function" ? r : F(+r), u) : e; + }, u.sortValues = function(r) { + return arguments.length ? (h = r, S = null, u) : h; + }, u.sort = function(r) { + return arguments.length ? (S = r, h = null, u) : S; + }, u.startAngle = function(r) { + return arguments.length ? (f = typeof r == "function" ? r : F(+r), u) : f; + }, u.endAngle = function(r) { + return arguments.length ? (g = typeof r == "function" ? r : F(+r), u) : g; + }, u.padAngle = function(r) { + return arguments.length ? (E = typeof r == "function" ? r : F(+r), u) : E; + }, u; +} +var J = function() { + var e = function(x, t, i, n) { + for (i = i || {}, n = x.length; n--; i[x[n]] = t) + ; + return i; + }, h = [1, 3], S = [1, 4], f = [1, 5], g = [1, 6], E = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], u = [2, 4], r = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], l = [20, 21, 22], k = [2, 7], I = [1, 12], v = [1, 13], w = [1, 14], d = [1, 15], c = [1, 16], A = [1, 17], $ = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, eol: 4, PIE: 5, document: 6, showData: 7, line: 8, statement: 9, txt: 10, value: 11, title: 12, title_value: 13, acc_title: 14, acc_title_value: 15, acc_descr: 16, acc_descr_value: 17, acc_descr_multiline_value: 18, section: 19, NEWLINE: 20, ";": 21, EOF: 22, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" }, + productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]], + performAction: function(t, i, n, a, o, s, V) { + var m = s.length - 1; + switch (o) { + case 3: + a.setShowData(!0); + break; + case 6: + this.$ = s[m - 1]; + break; + case 8: + a.addSection(s[m - 1], a.cleanupValue(s[m])); + break; + case 9: + this.$ = s[m].trim(), a.setDiagramTitle(this.$); + break; + case 10: + this.$ = s[m].trim(), a.setAccTitle(this.$); + break; + case 11: + case 12: + this.$ = s[m].trim(), a.setAccDescription(this.$); + break; + case 13: + a.addSection(s[m].substr(8)), this.$ = s[m].substr(8); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: h, 20: S, 21: f, 22: g }, { 1: [3] }, { 3: 7, 4: 2, 5: h, 20: S, 21: f, 22: g }, e(E, u, { 6: 8, 7: [1, 9] }), e(r, [2, 14]), e(r, [2, 15]), e(r, [2, 16]), { 1: [2, 1] }, e(l, k, { 8: 10, 9: 11, 1: [2, 2], 10: I, 12: v, 14: w, 16: d, 18: c, 19: A }), e(E, u, { 6: 18 }), e(E, [2, 5]), { 4: 19, 20: S, 21: f, 22: g }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, e(l, [2, 12]), e(l, [2, 13]), e(l, k, { 8: 10, 9: 11, 1: [2, 3], 10: I, 12: v, 14: w, 16: d, 18: c, 19: A }), e(E, [2, 6]), e(l, [2, 8]), e(l, [2, 9]), e(l, [2, 10]), e(l, [2, 11])], + defaultActions: { 7: [2, 1] }, + parseError: function(t, i) { + if (i.recoverable) + this.trace(t); + else { + var n = new Error(t); + throw n.hash = i, n; + } + }, + parse: function(t) { + var i = this, n = [0], a = [], o = [null], s = [], V = this.table, m = "", p = 0, P = 0, z = 2, j = 1, U = s.slice.call(arguments, 1), y = Object.create(this.lexer), N = { yy: {} }; + for (var Y in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, Y) && (N.yy[Y] = this.yy[Y]); + y.setInput(t, N.yy), N.yy.lexer = y, N.yy.parser = this, typeof y.yylloc > "u" && (y.yylloc = {}); + var Z = y.yylloc; + s.push(Z); + var st = y.options && y.options.ranges; + typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function rt() { + var C; + return C = a.pop() || y.lex() || j, typeof C != "number" && (C instanceof Array && (a = C, C = a.pop()), C = i.symbols_[C] || C), C; + } + for (var _, L, b, X, R = {}, M, D, Q, W; ; ) { + if (L = n[n.length - 1], this.defaultActions[L] ? b = this.defaultActions[L] : ((_ === null || typeof _ > "u") && (_ = rt()), b = V[L] && V[L][_]), typeof b > "u" || !b.length || !b[0]) { + var q = ""; + W = []; + for (M in V[L]) + this.terminals_[M] && M > z && W.push("'" + this.terminals_[M] + "'"); + y.showPosition ? q = "Parse error on line " + (p + 1) + `: +` + y.showPosition() + ` +Expecting ` + W.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : q = "Parse error on line " + (p + 1) + ": Unexpected " + (_ == j ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(q, { + text: y.match, + token: this.terminals_[_] || _, + line: y.yylineno, + loc: Z, + expected: W + }); + } + if (b[0] instanceof Array && b.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + _); + switch (b[0]) { + case 1: + n.push(_), o.push(y.yytext), s.push(y.yylloc), n.push(b[1]), _ = null, P = y.yyleng, m = y.yytext, p = y.yylineno, Z = y.yylloc; + break; + case 2: + if (D = this.productions_[b[1]][1], R.$ = o[o.length - D], R._$ = { + first_line: s[s.length - (D || 1)].first_line, + last_line: s[s.length - 1].last_line, + first_column: s[s.length - (D || 1)].first_column, + last_column: s[s.length - 1].last_column + }, st && (R._$.range = [ + s[s.length - (D || 1)].range[0], + s[s.length - 1].range[1] + ]), X = this.performAction.apply(R, [ + m, + P, + p, + N.yy, + b[1], + o, + s + ].concat(U)), typeof X < "u") + return X; + D && (n = n.slice(0, -1 * D * 2), o = o.slice(0, -1 * D), s = s.slice(0, -1 * D)), n.push(this.productions_[b[1]][0]), o.push(R.$), s.push(R._$), Q = V[n[n.length - 2]][n[n.length - 1]], n.push(Q); + break; + case 3: + return !0; + } + } + return !0; + } + }, T = function() { + var x = { + EOF: 1, + parseError: function(i, n) { + if (this.yy.parser) + this.yy.parser.parseError(i, n); + else + throw new Error(i); + }, + // resets the lexer, sets new input + setInput: function(t, i) { + return this.yy = i || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var t = this._input[0]; + this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t; + var i = t.match(/(?:\r\n?|\n).*/g); + return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t; + }, + // unshifts one char (or a string) into the input + unput: function(t) { + var i = t.length, n = t.split(/(?:\r\n?|\n)/g); + this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i; + var a = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1); + var o = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: n ? (n.length === a.length ? this.yylloc.first_column : 0) + a[a.length - n.length].length - n[0].length : this.yylloc.first_column - i + }, this.options.ranges && (this.yylloc.range = [o[0], o[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(t) { + this.unput(this.match.slice(t)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var t = this.matched.substr(0, this.matched.length - this.match.length); + return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var t = this.match; + return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var t = this.pastInput(), i = new Array(t.length + 1).join("-"); + return t + this.upcomingInput() + ` +` + i + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(t, i) { + var n, a, o; + if (this.options.backtrack_lexer && (o = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (o.yylloc.range = this.yylloc.range.slice(0))), a = t[0].match(/(?:\r\n?|\n).*/g), a && (this.yylineno += a.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: a ? a[a.length - 1].length - a[a.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length + }, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) + return n; + if (this._backtrack) { + for (var s in o) + this[s] = o[s]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var t, i, n, a; + this._more || (this.yytext = "", this.match = ""); + for (var o = this._currentRules(), s = 0; s < o.length; s++) + if (n = this._input.match(this.rules[o[s]]), n && (!i || n[0].length > i[0].length)) { + if (i = n, a = s, this.options.backtrack_lexer) { + if (t = this.test_match(n, o[s]), t !== !1) + return t; + if (this._backtrack) { + i = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return i ? (t = this.test_match(i, o[a]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var i = this.next(); + return i || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(i) { + this.conditionStack.push(i); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var i = this.conditionStack.length - 1; + return i > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(i) { + return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(i) { + this.begin(i); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(i, n, a, o) { + switch (a) { + case 0: + break; + case 1: + break; + case 2: + return 20; + case 3: + break; + case 4: + break; + case 5: + return this.begin("title"), 12; + case 6: + return this.popState(), "title_value"; + case 7: + return this.begin("acc_title"), 14; + case 8: + return this.popState(), "acc_title_value"; + case 9: + return this.begin("acc_descr"), 16; + case 10: + return this.popState(), "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + this.begin("string"); + break; + case 15: + this.popState(); + break; + case 16: + return "txt"; + case 17: + return 5; + case 18: + return 7; + case 19: + return "value"; + case 20: + return 22; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i], + conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [6], inclusive: !1 }, string: { rules: [15, 16], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], inclusive: !0 } } + }; + return x; + }(); + $.lexer = T; + function O() { + this.yy = {}; + } + return O.prototype = $, $.Parser = O, new O(); +}(); +J.parser = J; +const Et = J, nt = at.pie, G = { + sections: {}, + showData: !1, + config: nt +}; +let B = G.sections, K = G.showData; +const wt = structuredClone(nt), At = () => structuredClone(wt), $t = () => { + B = structuredClone(G.sections), K = G.showData, ft(); +}, Tt = (e, h) => { + e = pt(e, et()), B[e] === void 0 && (B[e] = h, it.debug(`added new section: ${e}, with value: ${h}`)); +}, It = () => B, Dt = (e) => (e.substring(0, 1) === ":" && (e = e.substring(1).trim()), Number(e.trim())), Ct = (e) => { + K = e; +}, Ot = () => K, Vt = { + getConfig: At, + clear: $t, + setDiagramTitle: lt, + getDiagramTitle: ot, + setAccTitle: ct, + getAccTitle: ht, + setAccDescription: ut, + getAccDescription: yt, + addSection: Tt, + getSections: It, + cleanupValue: Dt, + setShowData: Ct, + getShowData: Ot +}, Pt = (e) => ` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${e.pieOuterStrokeColor}; + stroke-width: ${e.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${e.pieTitleTextSize}; + fill: ${e.pieTitleTextColor}; + font-family: ${e.fontFamily}; + } + .slice { + font-family: ${e.fontFamily}; + fill: ${e.pieSectionTextColor}; + font-size:${e.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${e.pieLegendTextColor}; + font-family: ${e.fontFamily}; + font-size: ${e.pieLegendTextSize}; + } +`, Nt = Pt, Lt = (e) => { + const h = Object.entries(e).map((f) => ({ + label: f[0], + value: f[1] + })).sort((f, g) => g.value - f.value); + return St().value( + (f) => f.value + )(h); +}, Ft = (e, h, S, f) => { + var V, m; + it.debug(`rendering pie chart +` + e); + const g = f.db, E = et(), u = gt(g.getConfig(), E.pie), r = 450, l = ((m = (V = document.getElementById(h)) == null ? void 0 : V.parentElement) == null ? void 0 : m.offsetWidth) ?? u.useWidth, k = dt(h); + k.attr("viewBox", `0 0 ${l} ${r}`), mt(k, r, l, u.useMaxWidth); + const I = 40, v = 18, w = 4, d = k.append("g"); + d.attr("transform", "translate(" + l / 2 + "," + r / 2 + ")"); + const { themeVariables: c } = E; + let [A] = _t(c.pieOuterStrokeWidth); + A ?? (A = 2); + const $ = u.textPosition, T = Math.min(l, r) / 2 - I, O = tt().innerRadius(0).outerRadius(T), x = tt().innerRadius(T * $).outerRadius(T * $); + d.append("circle").attr("cx", 0).attr("cy", 0).attr("r", T + A / 2).attr("class", "pieOuterCircle"); + const t = g.getSections(), i = Lt(t), n = [ + c.pie1, + c.pie2, + c.pie3, + c.pie4, + c.pie5, + c.pie6, + c.pie7, + c.pie8, + c.pie9, + c.pie10, + c.pie11, + c.pie12 + ], a = kt(n); + d.selectAll("mySlices").data(i).enter().append("path").attr("d", O).attr("fill", (p) => a(p.data.label)).attr("class", "pieCircle"); + let o = 0; + Object.keys(t).forEach((p) => { + o += t[p]; + }), d.selectAll("mySlices").data(i).enter().append("text").text((p) => (p.data.value / o * 100).toFixed(0) + "%").attr("transform", (p) => "translate(" + x.centroid(p) + ")").style("text-anchor", "middle").attr("class", "slice"), d.append("text").text(g.getDiagramTitle()).attr("x", 0).attr("y", -(r - 50) / 2).attr("class", "pieTitleText"); + const s = d.selectAll(".legend").data(a.domain()).enter().append("g").attr("class", "legend").attr("transform", (p, P) => { + const z = v + w, j = z * a.domain().length / 2, U = 12 * v, y = P * z - j; + return "translate(" + U + "," + y + ")"; + }); + s.append("rect").attr("width", v).attr("height", v).style("fill", a).style("stroke", a), s.data(i).append("text").attr("x", v + w).attr("y", v - w).text((p) => { + const { label: P, value: z } = p.data; + return g.getShowData() ? `${P} [${z}]` : P; + }); +}, zt = { draw: Ft }, Ut = { + parser: Et, + db: Vt, + renderer: zt, + styles: Nt +}; +export { + Ut as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/pieDiagram-ed51bc52.js b/webroot/js/node_modules/mermaid/dist/pieDiagram-ed51bc52.js new file mode 100644 index 0000000..0d3e936 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/pieDiagram-ed51bc52.js @@ -0,0 +1,719 @@ +import { B as defaultConfig, q as setDiagramTitle, r as getDiagramTitle, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, t as clear$1, d as sanitizeText, c as getConfig$1, l as log, C as cleanAndMerge, A as selectSvgElement, i as configureSvgSize, D as parseFontSize } from "./mermaid-0d192ec3.js"; +import { arc, scaleOrdinal, pie } from "d3"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V5 = [2, 4], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V7 = [20, 21, 22], $V8 = [2, 7], $V9 = [1, 12], $Va = [1, 13], $Vb = [1, 14], $Vc = [1, 15], $Vd = [1, 16], $Ve = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "PIE": 5, "document": 6, "showData": 7, "line": 8, "statement": 9, "txt": 10, "value": 11, "title": 12, "title_value": 13, "acc_title": 14, "acc_title_value": 15, "acc_descr": 16, "acc_descr_value": 17, "acc_descr_multiline_value": 18, "section": 19, "NEWLINE": 20, ";": 21, "EOF": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" }, + productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setShowData(true); + break; + case 6: + this.$ = $$[$0 - 1]; + break; + case 8: + yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0])); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 10: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 11: + case 12: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 13: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, o($V4, $V5, { 6: 8, 7: [1, 9] }), o($V6, [2, 14]), o($V6, [2, 15]), o($V6, [2, 16]), { 1: [2, 1] }, o($V7, $V8, { 8: 10, 9: 11, 1: [2, 2], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, $V5, { 6: 18 }), o($V4, [2, 5]), { 4: 19, 20: $V1, 21: $V2, 22: $V3 }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, o($V7, [2, 12]), o($V7, [2, 13]), o($V7, $V8, { 8: 10, 9: 11, 1: [2, 3], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, [2, 6]), o($V7, [2, 8]), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11])], + defaultActions: { 7: [2, 1] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 20; + case 3: + break; + case 4: + break; + case 5: + this.begin("title"); + return 12; + case 6: + this.popState(); + return "title_value"; + case 7: + this.begin("acc_title"); + return 14; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 16; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + this.begin("string"); + break; + case 15: + this.popState(); + break; + case 16: + return "txt"; + case 17: + return 5; + case 18: + return 7; + case 19: + return "value"; + case 20: + return 22; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [6], "inclusive": false }, "string": { "rules": [15, 16], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_PIE_CONFIG = defaultConfig.pie; +const DEFAULT_PIE_DB = { + sections: {}, + showData: false, + config: DEFAULT_PIE_CONFIG +}; +let sections = DEFAULT_PIE_DB.sections; +let showData = DEFAULT_PIE_DB.showData; +const config = structuredClone(DEFAULT_PIE_CONFIG); +const getConfig = () => structuredClone(config); +const clear = () => { + sections = structuredClone(DEFAULT_PIE_DB.sections); + showData = DEFAULT_PIE_DB.showData; + clear$1(); +}; +const addSection = (label, value) => { + label = sanitizeText(label, getConfig$1()); + if (sections[label] === void 0) { + sections[label] = value; + log.debug(`added new section: ${label}, with value: ${value}`); + } +}; +const getSections = () => sections; +const cleanupValue = (value) => { + if (value.substring(0, 1) === ":") { + value = value.substring(1).trim(); + } + return Number(value.trim()); +}; +const setShowData = (toggle) => { + showData = toggle; +}; +const getShowData = () => showData; +const db = { + getConfig, + clear, + setDiagramTitle, + getDiagramTitle, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addSection, + getSections, + cleanupValue, + setShowData, + getShowData +}; +const getStyles = (options) => ` + .pieCircle{ + stroke: ${options.pieStrokeColor}; + stroke-width : ${options.pieStrokeWidth}; + opacity : ${options.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${options.pieOuterStrokeColor}; + stroke-width: ${options.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${options.pieTitleTextSize}; + fill: ${options.pieTitleTextColor}; + font-family: ${options.fontFamily}; + } + .slice { + font-family: ${options.fontFamily}; + fill: ${options.pieSectionTextColor}; + font-size:${options.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${options.pieLegendTextColor}; + font-family: ${options.fontFamily}; + font-size: ${options.pieLegendTextSize}; + } +`; +const styles = getStyles; +const createPieArcs = (sections2) => { + const pieData = Object.entries(sections2).map((element) => { + return { + label: element[0], + value: element[1] + }; + }).sort((a, b) => { + return b.value - a.value; + }); + const pie$1 = pie().value( + (d3Section) => d3Section.value + ); + return pie$1(pieData); +}; +const draw = (text, id, _version, diagObj) => { + var _a, _b; + log.debug("rendering pie chart\n" + text); + const db2 = diagObj.db; + const globalConfig = getConfig$1(); + const pieConfig = cleanAndMerge(db2.getConfig(), globalConfig.pie); + const height = 450; + const width = ((_b = (_a = document.getElementById(id)) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.offsetWidth) ?? pieConfig.useWidth; + const svg = selectSvgElement(id); + svg.attr("viewBox", `0 0 ${width} ${height}`); + configureSvgSize(svg, height, width, pieConfig.useMaxWidth); + const MARGIN = 40; + const LEGEND_RECT_SIZE = 18; + const LEGEND_SPACING = 4; + const group = svg.append("g"); + group.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); + const { themeVariables } = globalConfig; + let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth); + outerStrokeWidth ?? (outerStrokeWidth = 2); + const textPosition = pieConfig.textPosition; + const radius = Math.min(width, height) / 2 - MARGIN; + const arcGenerator = arc().innerRadius(0).outerRadius(radius); + const labelArcGenerator = arc().innerRadius(radius * textPosition).outerRadius(radius * textPosition); + group.append("circle").attr("cx", 0).attr("cy", 0).attr("r", radius + outerStrokeWidth / 2).attr("class", "pieOuterCircle"); + const sections2 = db2.getSections(); + const arcs = createPieArcs(sections2); + const myGeneratedColors = [ + themeVariables.pie1, + themeVariables.pie2, + themeVariables.pie3, + themeVariables.pie4, + themeVariables.pie5, + themeVariables.pie6, + themeVariables.pie7, + themeVariables.pie8, + themeVariables.pie9, + themeVariables.pie10, + themeVariables.pie11, + themeVariables.pie12 + ]; + const color = scaleOrdinal(myGeneratedColors); + group.selectAll("mySlices").data(arcs).enter().append("path").attr("d", arcGenerator).attr("fill", (datum) => { + return color(datum.data.label); + }).attr("class", "pieCircle"); + let sum = 0; + Object.keys(sections2).forEach((key) => { + sum += sections2[key]; + }); + group.selectAll("mySlices").data(arcs).enter().append("text").text((datum) => { + return (datum.data.value / sum * 100).toFixed(0) + "%"; + }).attr("transform", (datum) => { + return "translate(" + labelArcGenerator.centroid(datum) + ")"; + }).style("text-anchor", "middle").attr("class", "slice"); + group.append("text").text(db2.getDiagramTitle()).attr("x", 0).attr("y", -(height - 50) / 2).attr("class", "pieTitleText"); + const legend = group.selectAll(".legend").data(color.domain()).enter().append("g").attr("class", "legend").attr("transform", (_datum, index) => { + const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING; + const offset = height2 * color.domain().length / 2; + const horizontal = 12 * LEGEND_RECT_SIZE; + const vertical = index * height2 - offset; + return "translate(" + horizontal + "," + vertical + ")"; + }); + legend.append("rect").attr("width", LEGEND_RECT_SIZE).attr("height", LEGEND_RECT_SIZE).style("fill", color).style("stroke", color); + legend.data(arcs).append("text").attr("x", LEGEND_RECT_SIZE + LEGEND_SPACING).attr("y", LEGEND_RECT_SIZE - LEGEND_SPACING).text((datum) => { + const { label, value } = datum.data; + if (db2.getShowData()) { + return `${label} [${value}]`; + } + return label; + }); +}; +const renderer = { draw }; +const diagram = { + parser: parser$1, + db, + renderer, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/preprocess.d.ts b/webroot/js/node_modules/mermaid/dist/preprocess.d.ts new file mode 100644 index 0000000..84f9bfa --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/preprocess.d.ts @@ -0,0 +1,10 @@ +import type { DiagramMetadata } from './diagram-api/types.js'; +/** + * Preprocess the given code by cleaning it up, extracting front matter and directives, + * cleaning and merging configuration, and removing comments. + * @param code - The code to preprocess. + * @returns The object containing the preprocessed code, title, and configuration. + */ +export declare function preprocessDiagram(code: string): DiagramMetadata & { + code: string; +}; diff --git a/webroot/js/node_modules/mermaid/dist/quadrantDiagram-354b0825.js b/webroot/js/node_modules/mermaid/dist/quadrantDiagram-354b0825.js new file mode 100644 index 0000000..083dc39 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/quadrantDiagram-354b0825.js @@ -0,0 +1,1198 @@ +import { $ as getThemeVariables, X as defaultConfig, l as log, s as setAccTitle, g as getAccTitle, B as setDiagramTitle, D as getDiagramTitle, a as getAccDescription, b as setAccDescription, c as getConfig, E as clear$1, d as sanitizeText, j as d3select, k as configureSvgSize } from "./mermaid-491db2d9.js"; +import { l as linear } from "./linear-1a8511e4.js"; +import "./init-cc95ec8e.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V6 = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V7 = [32, 33, 34], $V8 = [2, 7], $V9 = [1, 13], $Va = [1, 17], $Vb = [1, 18], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 21], $Vf = [1, 22], $Vg = [1, 23], $Vh = [1, 24], $Vi = [1, 25], $Vj = [1, 26], $Vk = [1, 27], $Vl = [1, 30], $Vm = [1, 31], $Vn = [1, 32], $Vo = [1, 33], $Vp = [1, 34], $Vq = [1, 35], $Vr = [1, 36], $Vs = [1, 37], $Vt = [1, 38], $Vu = [1, 39], $Vv = [1, 40], $Vw = [1, 41], $Vx = [1, 42], $Vy = [1, 57], $Vz = [1, 58], $VA = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "QUADRANT": 6, "document": 7, "line": 8, "statement": 9, "axisDetails": 10, "quadrantDetails": 11, "points": 12, "title": 13, "title_value": 14, "acc_title": 15, "acc_title_value": 16, "acc_descr": 17, "acc_descr_value": 18, "acc_descr_multiline_value": 19, "section": 20, "text": 21, "point_start": 22, "point_x": 23, "point_y": 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, "QUADRANT_1": 28, "QUADRANT_2": 29, "QUADRANT_3": 30, "QUADRANT_4": 31, "NEWLINE": 32, "SEMI": 33, "EOF": 34, "alphaNumToken": 35, "textNoTagsToken": 36, "STR": 37, "MD_STR": 38, "alphaNum": 39, "PUNCTUATION": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "COMMA": 44, "PLUS": 45, "EQUALS": 46, "MULT": 47, "DOT": 48, "BRKT": 49, "UNDERSCORE": 50, "MINUS": 51, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 12: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 13: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 14: + case 15: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 16: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 17: + yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 18: + yy.setXAxisLeftText($$[$0 - 2]); + yy.setXAxisRightText($$[$0]); + break; + case 19: + $$[$0 - 1].text += " ⟶ "; + yy.setXAxisLeftText($$[$0 - 1]); + break; + case 20: + yy.setXAxisLeftText($$[$0]); + break; + case 21: + yy.setYAxisBottomText($$[$0 - 2]); + yy.setYAxisTopText($$[$0]); + break; + case 22: + $$[$0 - 1].text += " ⟶ "; + yy.setYAxisBottomText($$[$0 - 1]); + break; + case 23: + yy.setYAxisBottomText($$[$0]); + break; + case 24: + yy.setQuadrant1Text($$[$0]); + break; + case 25: + yy.setQuadrant2Text($$[$0]); + break; + case 26: + yy.setQuadrant3Text($$[$0]); + break; + case 27: + yy.setQuadrant4Text($$[$0]); + break; + case 31: + this.$ = { text: $$[$0], type: "text" }; + break; + case 32: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 33: + this.$ = { text: $$[$0], type: "text" }; + break; + case 34: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 35: + this.$ = $$[$0]; + break; + case 36: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 1: [3] }, { 3: 8, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 3: 9, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, o($V5, [2, 4], { 7: 10 }), o($V6, [2, 28]), o($V6, [2, 29]), o($V6, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, o($V7, $V8, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V5, [2, 5]), { 4: 43, 32: $V2, 33: $V3, 34: $V4 }, o($V7, $V8, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, o($V7, [2, 15]), o($V7, [2, 16]), { 21: 48, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 49, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 50, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 51, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 52, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 53, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 5: $Vy, 22: [1, 54], 35: 56, 36: 55, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }, o($VA, [2, 31]), o($VA, [2, 33]), o($VA, [2, 34]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), o($VA, [2, 41]), o($VA, [2, 42]), o($VA, [2, 43]), o($VA, [2, 44]), o($VA, [2, 45]), o($VA, [2, 46]), o($VA, [2, 47]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 12]), o($V7, [2, 13]), o($V7, [2, 14]), o($V7, [2, 20], { 36: 55, 35: 56, 5: $Vy, 26: [1, 59], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 23], { 36: 55, 35: 56, 5: $Vy, 26: [1, 60], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 24], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 25], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 26], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 27], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), { 23: [1, 61] }, o($VA, [2, 32]), o($VA, [2, 48]), o($VA, [2, 49]), o($VA, [2, 50]), o($V7, [2, 19], { 35: 29, 21: 62, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 22], { 35: 29, 21: 63, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), { 24: [1, 64] }, o($V7, [2, 18], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 21], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 17])], + defaultActions: { 8: [2, 1], 9: [2, 2] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 32; + case 3: + break; + case 4: + this.begin("title"); + return 13; + case 5: + this.popState(); + return "title_value"; + case 6: + this.begin("acc_title"); + return 15; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 17; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 25; + case 14: + return 27; + case 15: + return 26; + case 16: + return 28; + case 17: + return 29; + case 18: + return 30; + case 19: + return 31; + case 20: + this.begin("md_string"); + break; + case 21: + return "MD_STR"; + case 22: + this.popState(); + break; + case 23: + this.begin("string"); + break; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("point_start"); + return 22; + case 27: + this.begin("point_x"); + return 23; + case 28: + this.popState(); + break; + case 29: + this.popState(); + this.begin("point_y"); + break; + case 30: + this.popState(); + return 24; + case 31: + return 6; + case 32: + return 43; + case 33: + return "COLON"; + case 34: + return 45; + case 35: + return 44; + case 36: + return 46; + case 37: + return 46; + case 38: + return 47; + case 39: + return 49; + case 40: + return 50; + case 41: + return 48; + case 42: + return 41; + case 43: + return 51; + case 44: + return 42; + case 45: + return 5; + case 46: + return 33; + case 47: + return 40; + case 48: + return 34; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i], + conditions: { "point_y": { "rules": [30], "inclusive": false }, "point_x": { "rules": [29], "inclusive": false }, "point_start": { "rules": [27, 28], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "title": { "rules": [5], "inclusive": false }, "md_string": { "rules": [21, 22], "inclusive": false }, "string": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const defaultThemeVariables = getThemeVariables(); +class QuadrantBuilder { + constructor() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + } + getDefaultData() { + return { + titleText: "", + quadrant1Text: "", + quadrant2Text: "", + quadrant3Text: "", + quadrant4Text: "", + xAxisLeftText: "", + xAxisRightText: "", + yAxisBottomText: "", + yAxisTopText: "", + points: [] + }; + } + getDefaultConfig() { + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r; + return { + showXAxis: true, + showYAxis: true, + showTitle: true, + chartHeight: ((_a = defaultConfig.quadrantChart) == null ? void 0 : _a.chartWidth) || 500, + chartWidth: ((_b = defaultConfig.quadrantChart) == null ? void 0 : _b.chartHeight) || 500, + titlePadding: ((_c = defaultConfig.quadrantChart) == null ? void 0 : _c.titlePadding) || 10, + titleFontSize: ((_d = defaultConfig.quadrantChart) == null ? void 0 : _d.titleFontSize) || 20, + quadrantPadding: ((_e = defaultConfig.quadrantChart) == null ? void 0 : _e.quadrantPadding) || 5, + xAxisLabelPadding: ((_f = defaultConfig.quadrantChart) == null ? void 0 : _f.xAxisLabelPadding) || 5, + yAxisLabelPadding: ((_g = defaultConfig.quadrantChart) == null ? void 0 : _g.yAxisLabelPadding) || 5, + xAxisLabelFontSize: ((_h = defaultConfig.quadrantChart) == null ? void 0 : _h.xAxisLabelFontSize) || 16, + yAxisLabelFontSize: ((_i = defaultConfig.quadrantChart) == null ? void 0 : _i.yAxisLabelFontSize) || 16, + quadrantLabelFontSize: ((_j = defaultConfig.quadrantChart) == null ? void 0 : _j.quadrantLabelFontSize) || 16, + quadrantTextTopPadding: ((_k = defaultConfig.quadrantChart) == null ? void 0 : _k.quadrantTextTopPadding) || 5, + pointTextPadding: ((_l = defaultConfig.quadrantChart) == null ? void 0 : _l.pointTextPadding) || 5, + pointLabelFontSize: ((_m = defaultConfig.quadrantChart) == null ? void 0 : _m.pointLabelFontSize) || 12, + pointRadius: ((_n = defaultConfig.quadrantChart) == null ? void 0 : _n.pointRadius) || 5, + xAxisPosition: ((_o = defaultConfig.quadrantChart) == null ? void 0 : _o.xAxisPosition) || "top", + yAxisPosition: ((_p = defaultConfig.quadrantChart) == null ? void 0 : _p.yAxisPosition) || "left", + quadrantInternalBorderStrokeWidth: ((_q = defaultConfig.quadrantChart) == null ? void 0 : _q.quadrantInternalBorderStrokeWidth) || 1, + quadrantExternalBorderStrokeWidth: ((_r = defaultConfig.quadrantChart) == null ? void 0 : _r.quadrantExternalBorderStrokeWidth) || 2 + }; + } + getDefaultThemeConfig() { + return { + quadrant1Fill: defaultThemeVariables.quadrant1Fill, + quadrant2Fill: defaultThemeVariables.quadrant2Fill, + quadrant3Fill: defaultThemeVariables.quadrant3Fill, + quadrant4Fill: defaultThemeVariables.quadrant4Fill, + quadrant1TextFill: defaultThemeVariables.quadrant1TextFill, + quadrant2TextFill: defaultThemeVariables.quadrant2TextFill, + quadrant3TextFill: defaultThemeVariables.quadrant3TextFill, + quadrant4TextFill: defaultThemeVariables.quadrant4TextFill, + quadrantPointFill: defaultThemeVariables.quadrantPointFill, + quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill, + quadrantTitleFill: defaultThemeVariables.quadrantTitleFill, + quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill, + quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill + }; + } + clear() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + log.info("clear called"); + } + setData(data) { + this.data = { ...this.data, ...data }; + } + addPoints(points) { + this.data.points = [...points, ...this.data.points]; + } + setConfig(config2) { + log.trace("setConfig called with: ", config2); + this.config = { ...this.config, ...config2 }; + } + setThemeConfig(themeConfig) { + log.trace("setThemeConfig called with: ", themeConfig); + this.themeConfig = { ...this.themeConfig, ...themeConfig }; + } + calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) { + const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize; + const xAxisSpace = { + top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0, + bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0 + }; + const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize; + const yAxisSpace = { + left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0, + right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0 + }; + const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2; + const titleSpace = { + top: showTitle ? titleSpaceCalculation : 0 + }; + const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left; + const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top; + const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right; + const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top; + const quadrantHalfWidth = quadrantWidth / 2; + const quadrantHalfHeight = quadrantHeight / 2; + const quadrantSpace = { + quadrantLeft, + quadrantTop, + quadrantWidth, + quadrantHalfWidth, + quadrantHeight, + quadrantHalfHeight + }; + return { + xAxisSpace, + yAxisSpace, + titleSpace, + quadrantSpace + }; + } + getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) { + const { quadrantSpace, titleSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const drawAxisLabelInMiddle = this.data.points.length === 0; + const axisLabels = []; + if (this.data.xAxisLeftText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisLeftText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + (drawAxisLabelInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.xAxisRightText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisRightText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + quadrantHalfWidth + (drawAxisLabelInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.yAxisBottomText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisBottomText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHeight - (drawAxisLabelInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + if (this.data.yAxisTopText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisTopText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHalfHeight - (drawAxisLabelInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + return axisLabels; + } + getQuadrants(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace; + const quadrants = [ + { + text: { + text: this.data.quadrant1Text, + fill: this.themeConfig.quadrant1TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant1Fill + }, + { + text: { + text: this.data.quadrant2Text, + fill: this.themeConfig.quadrant2TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant2Fill + }, + { + text: { + text: this.data.quadrant3Text, + fill: this.themeConfig.quadrant3TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant3Fill + }, + { + text: { + text: this.data.quadrant4Text, + fill: this.themeConfig.quadrant4TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant4Fill + } + ]; + for (const quadrant of quadrants) { + quadrant.text.x = quadrant.x + quadrant.width / 2; + if (this.data.points.length === 0) { + quadrant.text.y = quadrant.y + quadrant.height / 2; + quadrant.text.horizontalPos = "middle"; + } else { + quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding; + quadrant.text.horizontalPos = "top"; + } + } + return quadrants; + } + getQuadrantPoints(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace; + const xAxis = linear().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]); + const yAxis = linear().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]); + const points = this.data.points.map((point) => { + const props = { + x: xAxis(point.x), + y: yAxis(point.y), + fill: this.themeConfig.quadrantPointFill, + radius: this.config.pointRadius, + text: { + text: point.text, + fill: this.themeConfig.quadrantPointTextFill, + x: xAxis(point.x), + y: yAxis(point.y) + this.config.pointTextPadding, + verticalPos: "center", + horizontalPos: "top", + fontSize: this.config.pointLabelFontSize, + rotation: 0 + } + }; + return props; + }); + return points; + } + getBorders(spaceData) { + const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2; + const { quadrantSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const borderLines = [ + // top border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + }, + // right border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft + quadrantWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // bottom border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop + quadrantHeight, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + quadrantHeight + }, + // left border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // vertical inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + quadrantHalfWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantHalfWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // horizontal inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + halfExternalBorderWidth, + y1: quadrantTop + quadrantHalfHeight, + x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth, + y2: quadrantTop + quadrantHalfHeight + } + ]; + return borderLines; + } + getTitle(showTitle) { + if (showTitle) { + return { + text: this.data.titleText, + fill: this.themeConfig.quadrantTitleFill, + fontSize: this.config.titleFontSize, + horizontalPos: "top", + verticalPos: "center", + rotation: 0, + y: this.config.titlePadding, + x: this.config.chartWidth / 2 + }; + } + return; + } + build() { + const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText); + const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText); + const showTitle = this.config.showTitle && !!this.data.titleText; + const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition; + const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle); + return { + points: this.getQuadrantPoints(calculatedSpace), + quadrants: this.getQuadrants(calculatedSpace), + axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace), + borderLines: this.getBorders(calculatedSpace), + title: this.getTitle(showTitle) + }; + } +} +const config = getConfig(); +function textSanitizer(text) { + return sanitizeText(text.trim(), config); +} +const quadrantBuilder = new QuadrantBuilder(); +function setQuadrant1Text(textObj) { + quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) }); +} +function setQuadrant2Text(textObj) { + quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) }); +} +function setQuadrant3Text(textObj) { + quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) }); +} +function setQuadrant4Text(textObj) { + quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) }); +} +function setXAxisLeftText(textObj) { + quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) }); +} +function setXAxisRightText(textObj) { + quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) }); +} +function setYAxisTopText(textObj) { + quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) }); +} +function setYAxisBottomText(textObj) { + quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) }); +} +function addPoint(textObj, x, y) { + quadrantBuilder.addPoints([{ x, y, text: textSanitizer(textObj.text) }]); +} +function setWidth(width) { + quadrantBuilder.setConfig({ chartWidth: width }); +} +function setHeight(height) { + quadrantBuilder.setConfig({ chartHeight: height }); +} +function getQuadrantData() { + const config2 = getConfig(); + const { themeVariables, quadrantChart: quadrantChartConfig } = config2; + if (quadrantChartConfig) { + quadrantBuilder.setConfig(quadrantChartConfig); + } + quadrantBuilder.setThemeConfig({ + quadrant1Fill: themeVariables.quadrant1Fill, + quadrant2Fill: themeVariables.quadrant2Fill, + quadrant3Fill: themeVariables.quadrant3Fill, + quadrant4Fill: themeVariables.quadrant4Fill, + quadrant1TextFill: themeVariables.quadrant1TextFill, + quadrant2TextFill: themeVariables.quadrant2TextFill, + quadrant3TextFill: themeVariables.quadrant3TextFill, + quadrant4TextFill: themeVariables.quadrant4TextFill, + quadrantPointFill: themeVariables.quadrantPointFill, + quadrantPointTextFill: themeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill, + quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill, + quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill, + quadrantTitleFill: themeVariables.quadrantTitleFill + }); + quadrantBuilder.setData({ titleText: getDiagramTitle() }); + return quadrantBuilder.build(); +} +const clear = function() { + quadrantBuilder.clear(); + clear$1(); +}; +const db = { + setWidth, + setHeight, + setQuadrant1Text, + setQuadrant2Text, + setQuadrant3Text, + setQuadrant4Text, + setXAxisLeftText, + setXAxisRightText, + setYAxisTopText, + setYAxisBottomText, + addPoint, + getQuadrantData, + clear, + setAccTitle, + getAccTitle, + setDiagramTitle, + getDiagramTitle, + getAccDescription, + setAccDescription +}; +const draw = (txt, id, _version, diagObj) => { + var _a, _b, _c; + function getDominantBaseLine(horizontalPos) { + return horizontalPos === "top" ? "hanging" : "middle"; + } + function getTextAnchor(verticalPos) { + return verticalPos === "left" ? "start" : "middle"; + } + function getTransformation(data) { + return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`; + } + const conf = getConfig(); + log.debug("Rendering quadrant chart\n" + txt); + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = root.select(`[id="${id}"]`); + const group = svg.append("g").attr("class", "main"); + const width = ((_a = conf.quadrantChart) == null ? void 0 : _a.chartWidth) || 500; + const height = ((_b = conf.quadrantChart) == null ? void 0 : _b.chartHeight) || 500; + configureSvgSize(svg, height, width, ((_c = conf.quadrantChart) == null ? void 0 : _c.useMaxWidth) || true); + svg.attr("viewBox", "0 0 " + width + " " + height); + diagObj.db.setHeight(height); + diagObj.db.setWidth(width); + const quadrantData = diagObj.db.getQuadrantData(); + const quadrantsGroup = group.append("g").attr("class", "quadrants"); + const borderGroup = group.append("g").attr("class", "border"); + const dataPointGroup = group.append("g").attr("class", "data-points"); + const labelGroup = group.append("g").attr("class", "labels"); + const titleGroup = group.append("g").attr("class", "title"); + if (quadrantData.title) { + titleGroup.append("text").attr("x", 0).attr("y", 0).attr("fill", quadrantData.title.fill).attr("font-size", quadrantData.title.fontSize).attr("dominant-baseline", getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor", getTextAnchor(quadrantData.title.verticalPos)).attr("transform", getTransformation(quadrantData.title)).text(quadrantData.title.text); + } + if (quadrantData.borderLines) { + borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1", (data) => data.x1).attr("y1", (data) => data.y1).attr("x2", (data) => data.x2).attr("y2", (data) => data.y2).style("stroke", (data) => data.strokeFill).style("stroke-width", (data) => data.strokeWidth); + } + const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant"); + quadrants.append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill); + quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text); + const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label"); + labels.append("text").attr("x", 0).attr("y", 0).text((data) => data.text).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.horizontalPos)).attr("text-anchor", (data) => getTextAnchor(data.verticalPos)).attr("transform", (data) => getTransformation(data)); + const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point"); + dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill); + dataPoints.append("text").attr("x", 0).attr("y", 0).text((data) => data.text.text).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)); +}; +const renderer = { + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles: () => "" +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/quadrantDiagram-3a393d1c.js b/webroot/js/node_modules/mermaid/dist/quadrantDiagram-3a393d1c.js new file mode 100644 index 0000000..e2d6440 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/quadrantDiagram-3a393d1c.js @@ -0,0 +1,1206 @@ +import { E as getThemeVariables, B as defaultConfig, l as log, s as setAccTitle, g as getAccTitle, q as setDiagramTitle, r as getDiagramTitle, a as getAccDescription, b as setAccDescription, c as getConfig, t as clear$1, d as sanitizeText, i as configureSvgSize } from "./mermaid-0d192ec3.js"; +import { scaleLinear, select } from "d3"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V6 = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V7 = [32, 33, 34], $V8 = [2, 7], $V9 = [1, 13], $Va = [1, 17], $Vb = [1, 18], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 21], $Vf = [1, 22], $Vg = [1, 23], $Vh = [1, 24], $Vi = [1, 25], $Vj = [1, 26], $Vk = [1, 27], $Vl = [1, 30], $Vm = [1, 31], $Vn = [1, 32], $Vo = [1, 33], $Vp = [1, 34], $Vq = [1, 35], $Vr = [1, 36], $Vs = [1, 37], $Vt = [1, 38], $Vu = [1, 39], $Vv = [1, 40], $Vw = [1, 41], $Vx = [1, 42], $Vy = [1, 57], $Vz = [1, 58], $VA = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "QUADRANT": 6, "document": 7, "line": 8, "statement": 9, "axisDetails": 10, "quadrantDetails": 11, "points": 12, "title": 13, "title_value": 14, "acc_title": 15, "acc_title_value": 16, "acc_descr": 17, "acc_descr_value": 18, "acc_descr_multiline_value": 19, "section": 20, "text": 21, "point_start": 22, "point_x": 23, "point_y": 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, "QUADRANT_1": 28, "QUADRANT_2": 29, "QUADRANT_3": 30, "QUADRANT_4": 31, "NEWLINE": 32, "SEMI": 33, "EOF": 34, "alphaNumToken": 35, "textNoTagsToken": 36, "STR": 37, "MD_STR": 38, "alphaNum": 39, "PUNCTUATION": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "COMMA": 44, "PLUS": 45, "EQUALS": 46, "MULT": 47, "DOT": 48, "BRKT": 49, "UNDERSCORE": 50, "MINUS": 51, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 12: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 13: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 14: + case 15: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 16: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 17: + yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 18: + yy.setXAxisLeftText($$[$0 - 2]); + yy.setXAxisRightText($$[$0]); + break; + case 19: + $$[$0 - 1].text += " ⟶ "; + yy.setXAxisLeftText($$[$0 - 1]); + break; + case 20: + yy.setXAxisLeftText($$[$0]); + break; + case 21: + yy.setYAxisBottomText($$[$0 - 2]); + yy.setYAxisTopText($$[$0]); + break; + case 22: + $$[$0 - 1].text += " ⟶ "; + yy.setYAxisBottomText($$[$0 - 1]); + break; + case 23: + yy.setYAxisBottomText($$[$0]); + break; + case 24: + yy.setQuadrant1Text($$[$0]); + break; + case 25: + yy.setQuadrant2Text($$[$0]); + break; + case 26: + yy.setQuadrant3Text($$[$0]); + break; + case 27: + yy.setQuadrant4Text($$[$0]); + break; + case 31: + this.$ = { text: $$[$0], type: "text" }; + break; + case 32: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 33: + this.$ = { text: $$[$0], type: "text" }; + break; + case 34: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 35: + this.$ = $$[$0]; + break; + case 36: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 1: [3] }, { 3: 8, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 3: 9, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, o($V5, [2, 4], { 7: 10 }), o($V6, [2, 28]), o($V6, [2, 29]), o($V6, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, o($V7, $V8, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V5, [2, 5]), { 4: 43, 32: $V2, 33: $V3, 34: $V4 }, o($V7, $V8, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, o($V7, [2, 15]), o($V7, [2, 16]), { 21: 48, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 49, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 50, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 51, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 52, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 53, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 5: $Vy, 22: [1, 54], 35: 56, 36: 55, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }, o($VA, [2, 31]), o($VA, [2, 33]), o($VA, [2, 34]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), o($VA, [2, 41]), o($VA, [2, 42]), o($VA, [2, 43]), o($VA, [2, 44]), o($VA, [2, 45]), o($VA, [2, 46]), o($VA, [2, 47]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 12]), o($V7, [2, 13]), o($V7, [2, 14]), o($V7, [2, 20], { 36: 55, 35: 56, 5: $Vy, 26: [1, 59], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 23], { 36: 55, 35: 56, 5: $Vy, 26: [1, 60], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 24], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 25], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 26], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 27], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), { 23: [1, 61] }, o($VA, [2, 32]), o($VA, [2, 48]), o($VA, [2, 49]), o($VA, [2, 50]), o($V7, [2, 19], { 35: 29, 21: 62, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 22], { 35: 29, 21: 63, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), { 24: [1, 64] }, o($V7, [2, 18], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 21], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 17])], + defaultActions: { 8: [2, 1], 9: [2, 2] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 32; + case 3: + break; + case 4: + this.begin("title"); + return 13; + case 5: + this.popState(); + return "title_value"; + case 6: + this.begin("acc_title"); + return 15; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 17; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 25; + case 14: + return 27; + case 15: + return 26; + case 16: + return 28; + case 17: + return 29; + case 18: + return 30; + case 19: + return 31; + case 20: + this.begin("md_string"); + break; + case 21: + return "MD_STR"; + case 22: + this.popState(); + break; + case 23: + this.begin("string"); + break; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("point_start"); + return 22; + case 27: + this.begin("point_x"); + return 23; + case 28: + this.popState(); + break; + case 29: + this.popState(); + this.begin("point_y"); + break; + case 30: + this.popState(); + return 24; + case 31: + return 6; + case 32: + return 43; + case 33: + return "COLON"; + case 34: + return 45; + case 35: + return 44; + case 36: + return 46; + case 37: + return 46; + case 38: + return 47; + case 39: + return 49; + case 40: + return 50; + case 41: + return 48; + case 42: + return 41; + case 43: + return 51; + case 44: + return 42; + case 45: + return 5; + case 46: + return 33; + case 47: + return 40; + case 48: + return 34; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i], + conditions: { "point_y": { "rules": [30], "inclusive": false }, "point_x": { "rules": [29], "inclusive": false }, "point_start": { "rules": [27, 28], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "title": { "rules": [5], "inclusive": false }, "md_string": { "rules": [21, 22], "inclusive": false }, "string": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const defaultThemeVariables = getThemeVariables(); +class QuadrantBuilder { + constructor() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + } + getDefaultData() { + return { + titleText: "", + quadrant1Text: "", + quadrant2Text: "", + quadrant3Text: "", + quadrant4Text: "", + xAxisLeftText: "", + xAxisRightText: "", + yAxisBottomText: "", + yAxisTopText: "", + points: [] + }; + } + getDefaultConfig() { + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r; + return { + showXAxis: true, + showYAxis: true, + showTitle: true, + chartHeight: ((_a = defaultConfig.quadrantChart) == null ? void 0 : _a.chartWidth) || 500, + chartWidth: ((_b = defaultConfig.quadrantChart) == null ? void 0 : _b.chartHeight) || 500, + titlePadding: ((_c = defaultConfig.quadrantChart) == null ? void 0 : _c.titlePadding) || 10, + titleFontSize: ((_d = defaultConfig.quadrantChart) == null ? void 0 : _d.titleFontSize) || 20, + quadrantPadding: ((_e = defaultConfig.quadrantChart) == null ? void 0 : _e.quadrantPadding) || 5, + xAxisLabelPadding: ((_f = defaultConfig.quadrantChart) == null ? void 0 : _f.xAxisLabelPadding) || 5, + yAxisLabelPadding: ((_g = defaultConfig.quadrantChart) == null ? void 0 : _g.yAxisLabelPadding) || 5, + xAxisLabelFontSize: ((_h = defaultConfig.quadrantChart) == null ? void 0 : _h.xAxisLabelFontSize) || 16, + yAxisLabelFontSize: ((_i = defaultConfig.quadrantChart) == null ? void 0 : _i.yAxisLabelFontSize) || 16, + quadrantLabelFontSize: ((_j = defaultConfig.quadrantChart) == null ? void 0 : _j.quadrantLabelFontSize) || 16, + quadrantTextTopPadding: ((_k = defaultConfig.quadrantChart) == null ? void 0 : _k.quadrantTextTopPadding) || 5, + pointTextPadding: ((_l = defaultConfig.quadrantChart) == null ? void 0 : _l.pointTextPadding) || 5, + pointLabelFontSize: ((_m = defaultConfig.quadrantChart) == null ? void 0 : _m.pointLabelFontSize) || 12, + pointRadius: ((_n = defaultConfig.quadrantChart) == null ? void 0 : _n.pointRadius) || 5, + xAxisPosition: ((_o = defaultConfig.quadrantChart) == null ? void 0 : _o.xAxisPosition) || "top", + yAxisPosition: ((_p = defaultConfig.quadrantChart) == null ? void 0 : _p.yAxisPosition) || "left", + quadrantInternalBorderStrokeWidth: ((_q = defaultConfig.quadrantChart) == null ? void 0 : _q.quadrantInternalBorderStrokeWidth) || 1, + quadrantExternalBorderStrokeWidth: ((_r = defaultConfig.quadrantChart) == null ? void 0 : _r.quadrantExternalBorderStrokeWidth) || 2 + }; + } + getDefaultThemeConfig() { + return { + quadrant1Fill: defaultThemeVariables.quadrant1Fill, + quadrant2Fill: defaultThemeVariables.quadrant2Fill, + quadrant3Fill: defaultThemeVariables.quadrant3Fill, + quadrant4Fill: defaultThemeVariables.quadrant4Fill, + quadrant1TextFill: defaultThemeVariables.quadrant1TextFill, + quadrant2TextFill: defaultThemeVariables.quadrant2TextFill, + quadrant3TextFill: defaultThemeVariables.quadrant3TextFill, + quadrant4TextFill: defaultThemeVariables.quadrant4TextFill, + quadrantPointFill: defaultThemeVariables.quadrantPointFill, + quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill, + quadrantTitleFill: defaultThemeVariables.quadrantTitleFill, + quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill, + quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill + }; + } + clear() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + log.info("clear called"); + } + setData(data) { + this.data = { ...this.data, ...data }; + } + addPoints(points) { + this.data.points = [...points, ...this.data.points]; + } + setConfig(config2) { + log.trace("setConfig called with: ", config2); + this.config = { ...this.config, ...config2 }; + } + setThemeConfig(themeConfig) { + log.trace("setThemeConfig called with: ", themeConfig); + this.themeConfig = { ...this.themeConfig, ...themeConfig }; + } + calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) { + const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize; + const xAxisSpace = { + top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0, + bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0 + }; + const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize; + const yAxisSpace = { + left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0, + right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0 + }; + const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2; + const titleSpace = { + top: showTitle ? titleSpaceCalculation : 0 + }; + const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left; + const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top; + const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right; + const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top; + const quadrantHalfWidth = quadrantWidth / 2; + const quadrantHalfHeight = quadrantHeight / 2; + const quadrantSpace = { + quadrantLeft, + quadrantTop, + quadrantWidth, + quadrantHalfWidth, + quadrantHeight, + quadrantHalfHeight + }; + return { + xAxisSpace, + yAxisSpace, + titleSpace, + quadrantSpace + }; + } + getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) { + const { quadrantSpace, titleSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const drawAxisLabelInMiddle = this.data.points.length === 0; + const axisLabels = []; + if (this.data.xAxisLeftText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisLeftText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + (drawAxisLabelInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.xAxisRightText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisRightText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + quadrantHalfWidth + (drawAxisLabelInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.yAxisBottomText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisBottomText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHeight - (drawAxisLabelInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + if (this.data.yAxisTopText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisTopText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHalfHeight - (drawAxisLabelInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawAxisLabelInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + return axisLabels; + } + getQuadrants(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace; + const quadrants = [ + { + text: { + text: this.data.quadrant1Text, + fill: this.themeConfig.quadrant1TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant1Fill + }, + { + text: { + text: this.data.quadrant2Text, + fill: this.themeConfig.quadrant2TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant2Fill + }, + { + text: { + text: this.data.quadrant3Text, + fill: this.themeConfig.quadrant3TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant3Fill + }, + { + text: { + text: this.data.quadrant4Text, + fill: this.themeConfig.quadrant4TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant4Fill + } + ]; + for (const quadrant of quadrants) { + quadrant.text.x = quadrant.x + quadrant.width / 2; + if (this.data.points.length === 0) { + quadrant.text.y = quadrant.y + quadrant.height / 2; + quadrant.text.horizontalPos = "middle"; + } else { + quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding; + quadrant.text.horizontalPos = "top"; + } + } + return quadrants; + } + getQuadrantPoints(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace; + const xAxis = scaleLinear().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]); + const yAxis = scaleLinear().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]); + const points = this.data.points.map((point) => { + const props = { + x: xAxis(point.x), + y: yAxis(point.y), + fill: this.themeConfig.quadrantPointFill, + radius: this.config.pointRadius, + text: { + text: point.text, + fill: this.themeConfig.quadrantPointTextFill, + x: xAxis(point.x), + y: yAxis(point.y) + this.config.pointTextPadding, + verticalPos: "center", + horizontalPos: "top", + fontSize: this.config.pointLabelFontSize, + rotation: 0 + } + }; + return props; + }); + return points; + } + getBorders(spaceData) { + const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2; + const { quadrantSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const borderLines = [ + // top border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + }, + // right border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft + quadrantWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // bottom border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop + quadrantHeight, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + quadrantHeight + }, + // left border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // vertical inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + quadrantHalfWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantHalfWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // horizontal inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + halfExternalBorderWidth, + y1: quadrantTop + quadrantHalfHeight, + x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth, + y2: quadrantTop + quadrantHalfHeight + } + ]; + return borderLines; + } + getTitle(showTitle) { + if (showTitle) { + return { + text: this.data.titleText, + fill: this.themeConfig.quadrantTitleFill, + fontSize: this.config.titleFontSize, + horizontalPos: "top", + verticalPos: "center", + rotation: 0, + y: this.config.titlePadding, + x: this.config.chartWidth / 2 + }; + } + return; + } + build() { + const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText); + const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText); + const showTitle = this.config.showTitle && !!this.data.titleText; + const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition; + const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle); + return { + points: this.getQuadrantPoints(calculatedSpace), + quadrants: this.getQuadrants(calculatedSpace), + axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace), + borderLines: this.getBorders(calculatedSpace), + title: this.getTitle(showTitle) + }; + } +} +const config = getConfig(); +function textSanitizer(text) { + return sanitizeText(text.trim(), config); +} +const quadrantBuilder = new QuadrantBuilder(); +function setQuadrant1Text(textObj) { + quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) }); +} +function setQuadrant2Text(textObj) { + quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) }); +} +function setQuadrant3Text(textObj) { + quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) }); +} +function setQuadrant4Text(textObj) { + quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) }); +} +function setXAxisLeftText(textObj) { + quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) }); +} +function setXAxisRightText(textObj) { + quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) }); +} +function setYAxisTopText(textObj) { + quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) }); +} +function setYAxisBottomText(textObj) { + quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) }); +} +function addPoint(textObj, x, y) { + quadrantBuilder.addPoints([{ x, y, text: textSanitizer(textObj.text) }]); +} +function setWidth(width) { + quadrantBuilder.setConfig({ chartWidth: width }); +} +function setHeight(height) { + quadrantBuilder.setConfig({ chartHeight: height }); +} +function getQuadrantData() { + const config2 = getConfig(); + const { themeVariables, quadrantChart: quadrantChartConfig } = config2; + if (quadrantChartConfig) { + quadrantBuilder.setConfig(quadrantChartConfig); + } + quadrantBuilder.setThemeConfig({ + quadrant1Fill: themeVariables.quadrant1Fill, + quadrant2Fill: themeVariables.quadrant2Fill, + quadrant3Fill: themeVariables.quadrant3Fill, + quadrant4Fill: themeVariables.quadrant4Fill, + quadrant1TextFill: themeVariables.quadrant1TextFill, + quadrant2TextFill: themeVariables.quadrant2TextFill, + quadrant3TextFill: themeVariables.quadrant3TextFill, + quadrant4TextFill: themeVariables.quadrant4TextFill, + quadrantPointFill: themeVariables.quadrantPointFill, + quadrantPointTextFill: themeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill, + quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill, + quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill, + quadrantTitleFill: themeVariables.quadrantTitleFill + }); + quadrantBuilder.setData({ titleText: getDiagramTitle() }); + return quadrantBuilder.build(); +} +const clear = function() { + quadrantBuilder.clear(); + clear$1(); +}; +const db = { + setWidth, + setHeight, + setQuadrant1Text, + setQuadrant2Text, + setQuadrant3Text, + setQuadrant4Text, + setXAxisLeftText, + setXAxisRightText, + setYAxisTopText, + setYAxisBottomText, + addPoint, + getQuadrantData, + clear, + setAccTitle, + getAccTitle, + setDiagramTitle, + getDiagramTitle, + getAccDescription, + setAccDescription +}; +const draw = (txt, id, _version, diagObj) => { + var _a, _b, _c; + function getDominantBaseLine(horizontalPos) { + return horizontalPos === "top" ? "hanging" : "middle"; + } + function getTextAnchor(verticalPos) { + return verticalPos === "left" ? "start" : "middle"; + } + function getTransformation(data) { + return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`; + } + const conf = getConfig(); + log.debug("Rendering quadrant chart\n" + txt); + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = root.select(`[id="${id}"]`); + const group = svg.append("g").attr("class", "main"); + const width = ((_a = conf.quadrantChart) == null ? void 0 : _a.chartWidth) || 500; + const height = ((_b = conf.quadrantChart) == null ? void 0 : _b.chartHeight) || 500; + configureSvgSize(svg, height, width, ((_c = conf.quadrantChart) == null ? void 0 : _c.useMaxWidth) || true); + svg.attr("viewBox", "0 0 " + width + " " + height); + diagObj.db.setHeight(height); + diagObj.db.setWidth(width); + const quadrantData = diagObj.db.getQuadrantData(); + const quadrantsGroup = group.append("g").attr("class", "quadrants"); + const borderGroup = group.append("g").attr("class", "border"); + const dataPointGroup = group.append("g").attr("class", "data-points"); + const labelGroup = group.append("g").attr("class", "labels"); + const titleGroup = group.append("g").attr("class", "title"); + if (quadrantData.title) { + titleGroup.append("text").attr("x", 0).attr("y", 0).attr("fill", quadrantData.title.fill).attr("font-size", quadrantData.title.fontSize).attr("dominant-baseline", getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor", getTextAnchor(quadrantData.title.verticalPos)).attr("transform", getTransformation(quadrantData.title)).text(quadrantData.title.text); + } + if (quadrantData.borderLines) { + borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1", (data) => data.x1).attr("y1", (data) => data.y1).attr("x2", (data) => data.x2).attr("y2", (data) => data.y2).style("stroke", (data) => data.strokeFill).style("stroke-width", (data) => data.strokeWidth); + } + const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant"); + quadrants.append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill); + quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text); + const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label"); + labels.append("text").attr("x", 0).attr("y", 0).text((data) => data.text).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.horizontalPos)).attr("text-anchor", (data) => getTextAnchor(data.verticalPos)).attr("transform", (data) => getTransformation(data)); + const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point"); + dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill); + dataPoints.append("text").attr("x", 0).attr("y", 0).text((data) => data.text.text).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)); +}; +const renderer = { + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles: () => "" +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/quadrantDiagram-d3fede19.js b/webroot/js/node_modules/mermaid/dist/quadrantDiagram-d3fede19.js new file mode 100644 index 0000000..b6f9b8b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/quadrantDiagram-d3fede19.js @@ -0,0 +1,904 @@ +import { $ as vt, X as I, l as lt, s as Lt, g as Ct, B as zt, D as At, a as Et, b as Dt, c as yt, E as It, d as Bt, j as gt, k as wt } from "./mermaid-e4a58915.js"; +import { l as bt } from "./linear-9f666eb0.js"; +import "./init-f9637058.js"; +var pt = function() { + var e = function(G, n, r, o) { + for (r = r || {}, o = G.length; o--; r[G[o]] = n) + ; + return r; + }, s = [1, 3], c = [1, 4], x = [1, 5], f = [1, 6], d = [1, 7], l = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], g = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], i = [32, 33, 34], y = [2, 7], b = [1, 13], B = [1, 17], w = [1, 18], A = [1, 19], z = [1, 20], _ = [1, 21], H = [1, 22], $ = [1, 23], K = [1, 24], at = [1, 25], nt = [1, 26], et = [1, 27], Q = [1, 30], N = [1, 31], q = [1, 32], T = [1, 33], m = [1, 34], t = [1, 35], S = [1, 36], k = [1, 37], F = [1, 38], P = [1, 39], v = [1, 40], L = [1, 41], C = [1, 42], X = [1, 57], M = [1, 58], E = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], ht = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, eol: 4, SPACE: 5, QUADRANT: 6, document: 7, line: 8, statement: 9, axisDetails: 10, quadrantDetails: 11, points: 12, title: 13, title_value: 14, acc_title: 15, acc_title_value: 16, acc_descr: 17, acc_descr_value: 18, acc_descr_multiline_value: 19, section: 20, text: 21, point_start: 22, point_x: 23, point_y: 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, QUADRANT_1: 28, QUADRANT_2: 29, QUADRANT_3: 30, QUADRANT_4: 31, NEWLINE: 32, SEMI: 33, EOF: 34, alphaNumToken: 35, textNoTagsToken: 36, STR: 37, MD_STR: 38, alphaNum: 39, PUNCTUATION: 40, AMP: 41, NUM: 42, ALPHA: 43, COMMA: 44, PLUS: 45, EQUALS: 46, MULT: 47, DOT: 48, BRKT: 49, UNDERSCORE: 50, MINUS: 51, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]], + performAction: function(n, r, o, h, p, a, it) { + var u = a.length - 1; + switch (p) { + case 12: + this.$ = a[u].trim(), h.setDiagramTitle(this.$); + break; + case 13: + this.$ = a[u].trim(), h.setAccTitle(this.$); + break; + case 14: + case 15: + this.$ = a[u].trim(), h.setAccDescription(this.$); + break; + case 16: + h.addSection(a[u].substr(8)), this.$ = a[u].substr(8); + break; + case 17: + h.addPoint(a[u - 3], a[u - 1], a[u]); + break; + case 18: + h.setXAxisLeftText(a[u - 2]), h.setXAxisRightText(a[u]); + break; + case 19: + a[u - 1].text += " ⟶ ", h.setXAxisLeftText(a[u - 1]); + break; + case 20: + h.setXAxisLeftText(a[u]); + break; + case 21: + h.setYAxisBottomText(a[u - 2]), h.setYAxisTopText(a[u]); + break; + case 22: + a[u - 1].text += " ⟶ ", h.setYAxisBottomText(a[u - 1]); + break; + case 23: + h.setYAxisBottomText(a[u]); + break; + case 24: + h.setQuadrant1Text(a[u]); + break; + case 25: + h.setQuadrant2Text(a[u]); + break; + case 26: + h.setQuadrant3Text(a[u]); + break; + case 27: + h.setQuadrant4Text(a[u]); + break; + case 31: + this.$ = { text: a[u], type: "text" }; + break; + case 32: + this.$ = { text: a[u - 1].text + "" + a[u], type: a[u - 1].type }; + break; + case 33: + this.$ = { text: a[u], type: "text" }; + break; + case 34: + this.$ = { text: a[u], type: "markdown" }; + break; + case 35: + this.$ = a[u]; + break; + case 36: + this.$ = a[u - 1] + "" + a[u]; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: s, 6: c, 32: x, 33: f, 34: d }, { 1: [3] }, { 3: 8, 4: 2, 5: s, 6: c, 32: x, 33: f, 34: d }, { 3: 9, 4: 2, 5: s, 6: c, 32: x, 33: f, 34: d }, e(l, [2, 4], { 7: 10 }), e(g, [2, 28]), e(g, [2, 29]), e(g, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, e(i, y, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: b, 13: B, 15: w, 17: A, 19: z, 20: _, 25: H, 27: $, 28: K, 29: at, 30: nt, 31: et, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }), e(l, [2, 5]), { 4: 43, 32: x, 33: f, 34: d }, e(i, y, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: b, 13: B, 15: w, 17: A, 19: z, 20: _, 25: H, 27: $, 28: K, 29: at, 30: nt, 31: et, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }), e(i, [2, 9]), e(i, [2, 10]), e(i, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, e(i, [2, 15]), e(i, [2, 16]), { 21: 48, 35: 29, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }, { 21: 49, 35: 29, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }, { 21: 50, 35: 29, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }, { 21: 51, 35: 29, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }, { 21: 52, 35: 29, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }, { 21: 53, 35: 29, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }, { 5: X, 22: [1, 54], 35: 56, 36: 55, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }, e(E, [2, 31]), e(E, [2, 33]), e(E, [2, 34]), e(E, [2, 37]), e(E, [2, 38]), e(E, [2, 39]), e(E, [2, 40]), e(E, [2, 41]), e(E, [2, 42]), e(E, [2, 43]), e(E, [2, 44]), e(E, [2, 45]), e(E, [2, 46]), e(E, [2, 47]), e(l, [2, 6]), e(i, [2, 8]), e(i, [2, 12]), e(i, [2, 13]), e(i, [2, 14]), e(i, [2, 20], { 36: 55, 35: 56, 5: X, 26: [1, 59], 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), e(i, [2, 23], { 36: 55, 35: 56, 5: X, 26: [1, 60], 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), e(i, [2, 24], { 36: 55, 35: 56, 5: X, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), e(i, [2, 25], { 36: 55, 35: 56, 5: X, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), e(i, [2, 26], { 36: 55, 35: 56, 5: X, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), e(i, [2, 27], { 36: 55, 35: 56, 5: X, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), { 23: [1, 61] }, e(E, [2, 32]), e(E, [2, 48]), e(E, [2, 49]), e(E, [2, 50]), e(i, [2, 19], { 35: 29, 21: 62, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }), e(i, [2, 22], { 35: 29, 21: 63, 37: Q, 38: N, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C }), { 24: [1, 64] }, e(i, [2, 18], { 36: 55, 35: 56, 5: X, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), e(i, [2, 21], { 36: 55, 35: 56, 5: X, 40: q, 41: T, 42: m, 43: t, 44: S, 45: k, 46: F, 47: P, 48: v, 49: L, 50: C, 51: M }), e(i, [2, 17])], + defaultActions: { 8: [2, 1], 9: [2, 2] }, + parseError: function(n, r) { + if (r.recoverable) + this.trace(n); + else { + var o = new Error(n); + throw o.hash = r, o; + } + }, + parse: function(n) { + var r = this, o = [0], h = [], p = [null], a = [], it = this.table, u = "", st = 0, qt = 0, St = 2, Tt = 1, kt = a.slice.call(arguments, 1), D = Object.create(this.lexer), Z = { yy: {} }; + for (var dt in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, dt) && (Z.yy[dt] = this.yy[dt]); + D.setInput(n, Z.yy), Z.yy.lexer = D, Z.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {}); + var ut = D.yylloc; + a.push(ut); + var Ft = D.options && D.options.ranges; + typeof Z.yy.parseError == "function" ? this.parseError = Z.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function Pt() { + var Y; + return Y = h.pop() || D.lex() || Tt, typeof Y != "number" && (Y instanceof Array && (h = Y, Y = h.pop()), Y = r.symbols_[Y] || Y), Y; + } + for (var W, J, U, xt, tt = {}, rt, O, mt, ot; ; ) { + if (J = o[o.length - 1], this.defaultActions[J] ? U = this.defaultActions[J] : ((W === null || typeof W > "u") && (W = Pt()), U = it[J] && it[J][W]), typeof U > "u" || !U.length || !U[0]) { + var ft = ""; + ot = []; + for (rt in it[J]) + this.terminals_[rt] && rt > St && ot.push("'" + this.terminals_[rt] + "'"); + D.showPosition ? ft = "Parse error on line " + (st + 1) + `: +` + D.showPosition() + ` +Expecting ` + ot.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : ft = "Parse error on line " + (st + 1) + ": Unexpected " + (W == Tt ? "end of input" : "'" + (this.terminals_[W] || W) + "'"), this.parseError(ft, { + text: D.match, + token: this.terminals_[W] || W, + line: D.yylineno, + loc: ut, + expected: ot + }); + } + if (U[0] instanceof Array && U.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + J + ", token: " + W); + switch (U[0]) { + case 1: + o.push(W), p.push(D.yytext), a.push(D.yylloc), o.push(U[1]), W = null, qt = D.yyleng, u = D.yytext, st = D.yylineno, ut = D.yylloc; + break; + case 2: + if (O = this.productions_[U[1]][1], tt.$ = p[p.length - O], tt._$ = { + first_line: a[a.length - (O || 1)].first_line, + last_line: a[a.length - 1].last_line, + first_column: a[a.length - (O || 1)].first_column, + last_column: a[a.length - 1].last_column + }, Ft && (tt._$.range = [ + a[a.length - (O || 1)].range[0], + a[a.length - 1].range[1] + ]), xt = this.performAction.apply(tt, [ + u, + qt, + st, + Z.yy, + U[1], + p, + a + ].concat(kt)), typeof xt < "u") + return xt; + O && (o = o.slice(0, -1 * O * 2), p = p.slice(0, -1 * O), a = a.slice(0, -1 * O)), o.push(this.productions_[U[1]][0]), p.push(tt.$), a.push(tt._$), mt = it[o[o.length - 2]][o[o.length - 1]], o.push(mt); + break; + case 3: + return !0; + } + } + return !0; + } + }, _t = function() { + var G = { + EOF: 1, + parseError: function(r, o) { + if (this.yy.parser) + this.yy.parser.parseError(r, o); + else + throw new Error(r); + }, + // resets the lexer, sets new input + setInput: function(n, r) { + return this.yy = r || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var n = this._input[0]; + this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n; + var r = n.match(/(?:\r\n?|\n).*/g); + return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n; + }, + // unshifts one char (or a string) into the input + unput: function(n) { + var r = n.length, o = n.split(/(?:\r\n?|\n)/g); + this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r; + var h = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1); + var p = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: o ? (o.length === h.length ? this.yylloc.first_column : 0) + h[h.length - o.length].length - o[0].length : this.yylloc.first_column - r + }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var n = this.matched.substr(0, this.matched.length - this.match.length); + return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var n = this.match; + return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var n = this.pastInput(), r = new Array(n.length + 1).join("-"); + return n + this.upcomingInput() + ` +` + r + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(n, r) { + var o, h, p; + if (this.options.backtrack_lexer && (p = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), h = n[0].match(/(?:\r\n?|\n).*/g), h && (this.yylineno += h.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: h ? h[h.length - 1].length - h[h.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length + }, this.yytext += n[0], this.match += n[0], this.matches = n, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(n[0].length), this.matched += n[0], o = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o) + return o; + if (this._backtrack) { + for (var a in p) + this[a] = p[a]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var n, r, o, h; + this._more || (this.yytext = "", this.match = ""); + for (var p = this._currentRules(), a = 0; a < p.length; a++) + if (o = this._input.match(this.rules[p[a]]), o && (!r || o[0].length > r[0].length)) { + if (r = o, h = a, this.options.backtrack_lexer) { + if (n = this.test_match(o, p[a]), n !== !1) + return n; + if (this._backtrack) { + r = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return r ? (n = this.test_match(r, p[h]), n !== !1 ? n : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var r = this.next(); + return r || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(r) { + this.conditionStack.push(r); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var r = this.conditionStack.length - 1; + return r > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(r) { + return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(r) { + this.begin(r); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(r, o, h, p) { + switch (h) { + case 0: + break; + case 1: + break; + case 2: + return 32; + case 3: + break; + case 4: + return this.begin("title"), 13; + case 5: + return this.popState(), "title_value"; + case 6: + return this.begin("acc_title"), 15; + case 7: + return this.popState(), "acc_title_value"; + case 8: + return this.begin("acc_descr"), 17; + case 9: + return this.popState(), "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 25; + case 14: + return 27; + case 15: + return 26; + case 16: + return 28; + case 17: + return 29; + case 18: + return 30; + case 19: + return 31; + case 20: + this.begin("md_string"); + break; + case 21: + return "MD_STR"; + case 22: + this.popState(); + break; + case 23: + this.begin("string"); + break; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + return this.begin("point_start"), 22; + case 27: + return this.begin("point_x"), 23; + case 28: + this.popState(); + break; + case 29: + this.popState(), this.begin("point_y"); + break; + case 30: + return this.popState(), 24; + case 31: + return 6; + case 32: + return 43; + case 33: + return "COLON"; + case 34: + return 45; + case 35: + return 44; + case 36: + return 46; + case 37: + return 46; + case 38: + return 47; + case 39: + return 49; + case 40: + return 50; + case 41: + return 48; + case 42: + return 41; + case 43: + return 51; + case 44: + return 42; + case 45: + return 5; + case 46: + return 33; + case 47: + return 40; + case 48: + return 34; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i], + conditions: { point_y: { rules: [30], inclusive: !1 }, point_x: { rules: [29], inclusive: !1 }, point_start: { rules: [27, 28], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, title: { rules: [5], inclusive: !1 }, md_string: { rules: [21, 22], inclusive: !1 }, string: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], inclusive: !0 } } + }; + return G; + }(); + ht.lexer = _t; + function ct() { + this.yy = {}; + } + return ct.prototype = ht, ht.Parser = ct, new ct(); +}(); +pt.parser = pt; +const Rt = pt, V = vt(); +class Vt { + constructor() { + this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(); + } + getDefaultData() { + return { + titleText: "", + quadrant1Text: "", + quadrant2Text: "", + quadrant3Text: "", + quadrant4Text: "", + xAxisLeftText: "", + xAxisRightText: "", + yAxisBottomText: "", + yAxisTopText: "", + points: [] + }; + } + getDefaultConfig() { + var s, c, x, f, d, l, g, i, y, b, B, w, A, z, _, H, $, K; + return { + showXAxis: !0, + showYAxis: !0, + showTitle: !0, + chartHeight: ((s = I.quadrantChart) == null ? void 0 : s.chartWidth) || 500, + chartWidth: ((c = I.quadrantChart) == null ? void 0 : c.chartHeight) || 500, + titlePadding: ((x = I.quadrantChart) == null ? void 0 : x.titlePadding) || 10, + titleFontSize: ((f = I.quadrantChart) == null ? void 0 : f.titleFontSize) || 20, + quadrantPadding: ((d = I.quadrantChart) == null ? void 0 : d.quadrantPadding) || 5, + xAxisLabelPadding: ((l = I.quadrantChart) == null ? void 0 : l.xAxisLabelPadding) || 5, + yAxisLabelPadding: ((g = I.quadrantChart) == null ? void 0 : g.yAxisLabelPadding) || 5, + xAxisLabelFontSize: ((i = I.quadrantChart) == null ? void 0 : i.xAxisLabelFontSize) || 16, + yAxisLabelFontSize: ((y = I.quadrantChart) == null ? void 0 : y.yAxisLabelFontSize) || 16, + quadrantLabelFontSize: ((b = I.quadrantChart) == null ? void 0 : b.quadrantLabelFontSize) || 16, + quadrantTextTopPadding: ((B = I.quadrantChart) == null ? void 0 : B.quadrantTextTopPadding) || 5, + pointTextPadding: ((w = I.quadrantChart) == null ? void 0 : w.pointTextPadding) || 5, + pointLabelFontSize: ((A = I.quadrantChart) == null ? void 0 : A.pointLabelFontSize) || 12, + pointRadius: ((z = I.quadrantChart) == null ? void 0 : z.pointRadius) || 5, + xAxisPosition: ((_ = I.quadrantChart) == null ? void 0 : _.xAxisPosition) || "top", + yAxisPosition: ((H = I.quadrantChart) == null ? void 0 : H.yAxisPosition) || "left", + quadrantInternalBorderStrokeWidth: (($ = I.quadrantChart) == null ? void 0 : $.quadrantInternalBorderStrokeWidth) || 1, + quadrantExternalBorderStrokeWidth: ((K = I.quadrantChart) == null ? void 0 : K.quadrantExternalBorderStrokeWidth) || 2 + }; + } + getDefaultThemeConfig() { + return { + quadrant1Fill: V.quadrant1Fill, + quadrant2Fill: V.quadrant2Fill, + quadrant3Fill: V.quadrant3Fill, + quadrant4Fill: V.quadrant4Fill, + quadrant1TextFill: V.quadrant1TextFill, + quadrant2TextFill: V.quadrant2TextFill, + quadrant3TextFill: V.quadrant3TextFill, + quadrant4TextFill: V.quadrant4TextFill, + quadrantPointFill: V.quadrantPointFill, + quadrantPointTextFill: V.quadrantPointTextFill, + quadrantXAxisTextFill: V.quadrantXAxisTextFill, + quadrantYAxisTextFill: V.quadrantYAxisTextFill, + quadrantTitleFill: V.quadrantTitleFill, + quadrantInternalBorderStrokeFill: V.quadrantInternalBorderStrokeFill, + quadrantExternalBorderStrokeFill: V.quadrantExternalBorderStrokeFill + }; + } + clear() { + this.config = this.getDefaultConfig(), this.themeConfig = this.getDefaultThemeConfig(), this.data = this.getDefaultData(), lt.info("clear called"); + } + setData(s) { + this.data = { ...this.data, ...s }; + } + addPoints(s) { + this.data.points = [...s, ...this.data.points]; + } + setConfig(s) { + lt.trace("setConfig called with: ", s), this.config = { ...this.config, ...s }; + } + setThemeConfig(s) { + lt.trace("setThemeConfig called with: ", s), this.themeConfig = { ...this.themeConfig, ...s }; + } + calculateSpace(s, c, x, f) { + const d = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize, l = { + top: s === "top" && c ? d : 0, + bottom: s === "bottom" && c ? d : 0 + }, g = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize, i = { + left: this.config.yAxisPosition === "left" && x ? g : 0, + right: this.config.yAxisPosition === "right" && x ? g : 0 + }, y = this.config.titleFontSize + this.config.titlePadding * 2, b = { + top: f ? y : 0 + }, B = this.config.quadrantPadding + i.left, w = this.config.quadrantPadding + l.top + b.top, A = this.config.chartWidth - this.config.quadrantPadding * 2 - i.left - i.right, z = this.config.chartHeight - this.config.quadrantPadding * 2 - l.top - l.bottom - b.top, _ = A / 2, H = z / 2; + return { + xAxisSpace: l, + yAxisSpace: i, + titleSpace: b, + quadrantSpace: { + quadrantLeft: B, + quadrantTop: w, + quadrantWidth: A, + quadrantHalfWidth: _, + quadrantHeight: z, + quadrantHalfHeight: H + } + }; + } + getAxisLabels(s, c, x, f) { + const { quadrantSpace: d, titleSpace: l } = f, { + quadrantHalfHeight: g, + quadrantHeight: i, + quadrantLeft: y, + quadrantHalfWidth: b, + quadrantTop: B, + quadrantWidth: w + } = d, A = this.data.points.length === 0, z = []; + return this.data.xAxisLeftText && c && z.push({ + text: this.data.xAxisLeftText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: y + (A ? b / 2 : 0), + y: s === "top" ? this.config.xAxisLabelPadding + l.top : this.config.xAxisLabelPadding + B + i + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: A ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }), this.data.xAxisRightText && c && z.push({ + text: this.data.xAxisRightText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: y + b + (A ? b / 2 : 0), + y: s === "top" ? this.config.xAxisLabelPadding + l.top : this.config.xAxisLabelPadding + B + i + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: A ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }), this.data.yAxisBottomText && x && z.push({ + text: this.data.yAxisBottomText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + y + w + this.config.quadrantPadding, + y: B + i - (A ? g / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: A ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }), this.data.yAxisTopText && x && z.push({ + text: this.data.yAxisTopText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + y + w + this.config.quadrantPadding, + y: B + g - (A ? g / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: A ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }), z; + } + getQuadrants(s) { + const { quadrantSpace: c } = s, { quadrantHalfHeight: x, quadrantLeft: f, quadrantHalfWidth: d, quadrantTop: l } = c, g = [ + { + text: { + text: this.data.quadrant1Text, + fill: this.themeConfig.quadrant1TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: f + d, + y: l, + width: d, + height: x, + fill: this.themeConfig.quadrant1Fill + }, + { + text: { + text: this.data.quadrant2Text, + fill: this.themeConfig.quadrant2TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: f, + y: l, + width: d, + height: x, + fill: this.themeConfig.quadrant2Fill + }, + { + text: { + text: this.data.quadrant3Text, + fill: this.themeConfig.quadrant3TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: f, + y: l + x, + width: d, + height: x, + fill: this.themeConfig.quadrant3Fill + }, + { + text: { + text: this.data.quadrant4Text, + fill: this.themeConfig.quadrant4TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: f + d, + y: l + x, + width: d, + height: x, + fill: this.themeConfig.quadrant4Fill + } + ]; + for (const i of g) + i.text.x = i.x + i.width / 2, this.data.points.length === 0 ? (i.text.y = i.y + i.height / 2, i.text.horizontalPos = "middle") : (i.text.y = i.y + this.config.quadrantTextTopPadding, i.text.horizontalPos = "top"); + return g; + } + getQuadrantPoints(s) { + const { quadrantSpace: c } = s, { quadrantHeight: x, quadrantLeft: f, quadrantTop: d, quadrantWidth: l } = c, g = bt().domain([0, 1]).range([f, l + f]), i = bt().domain([0, 1]).range([x + d, d]); + return this.data.points.map((b) => ({ + x: g(b.x), + y: i(b.y), + fill: this.themeConfig.quadrantPointFill, + radius: this.config.pointRadius, + text: { + text: b.text, + fill: this.themeConfig.quadrantPointTextFill, + x: g(b.x), + y: i(b.y) + this.config.pointTextPadding, + verticalPos: "center", + horizontalPos: "top", + fontSize: this.config.pointLabelFontSize, + rotation: 0 + } + })); + } + getBorders(s) { + const c = this.config.quadrantExternalBorderStrokeWidth / 2, { quadrantSpace: x } = s, { + quadrantHalfHeight: f, + quadrantHeight: d, + quadrantLeft: l, + quadrantHalfWidth: g, + quadrantTop: i, + quadrantWidth: y + } = x; + return [ + // top border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: l - c, + y1: i, + x2: l + y + c, + y2: i + }, + // right border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: l + y, + y1: i + c, + x2: l + y, + y2: i + d - c + }, + // bottom border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: l - c, + y1: i + d, + x2: l + y + c, + y2: i + d + }, + // left border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: l, + y1: i + c, + x2: l, + y2: i + d - c + }, + // vertical inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: l + g, + y1: i + c, + x2: l + g, + y2: i + d - c + }, + // horizontal inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: l + c, + y1: i + f, + x2: l + y - c, + y2: i + f + } + ]; + } + getTitle(s) { + if (s) + return { + text: this.data.titleText, + fill: this.themeConfig.quadrantTitleFill, + fontSize: this.config.titleFontSize, + horizontalPos: "top", + verticalPos: "center", + rotation: 0, + y: this.config.titlePadding, + x: this.config.chartWidth / 2 + }; + } + build() { + const s = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText), c = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText), x = this.config.showTitle && !!this.data.titleText, f = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition, d = this.calculateSpace(f, s, c, x); + return { + points: this.getQuadrantPoints(d), + quadrants: this.getQuadrants(d), + axisLabels: this.getAxisLabels(f, s, c, d), + borderLines: this.getBorders(d), + title: this.getTitle(x) + }; + } +} +const Wt = yt(); +function j(e) { + return Bt(e.trim(), Wt); +} +const R = new Vt(); +function Nt(e) { + R.setData({ quadrant1Text: j(e.text) }); +} +function Ut(e) { + R.setData({ quadrant2Text: j(e.text) }); +} +function Qt(e) { + R.setData({ quadrant3Text: j(e.text) }); +} +function Ht(e) { + R.setData({ quadrant4Text: j(e.text) }); +} +function Xt(e) { + R.setData({ xAxisLeftText: j(e.text) }); +} +function Mt(e) { + R.setData({ xAxisRightText: j(e.text) }); +} +function Ot(e) { + R.setData({ yAxisTopText: j(e.text) }); +} +function Yt(e) { + R.setData({ yAxisBottomText: j(e.text) }); +} +function jt(e, s, c) { + R.addPoints([{ x: s, y: c, text: j(e.text) }]); +} +function $t(e) { + R.setConfig({ chartWidth: e }); +} +function Gt(e) { + R.setConfig({ chartHeight: e }); +} +function Kt() { + const e = yt(), { themeVariables: s, quadrantChart: c } = e; + return c && R.setConfig(c), R.setThemeConfig({ + quadrant1Fill: s.quadrant1Fill, + quadrant2Fill: s.quadrant2Fill, + quadrant3Fill: s.quadrant3Fill, + quadrant4Fill: s.quadrant4Fill, + quadrant1TextFill: s.quadrant1TextFill, + quadrant2TextFill: s.quadrant2TextFill, + quadrant3TextFill: s.quadrant3TextFill, + quadrant4TextFill: s.quadrant4TextFill, + quadrantPointFill: s.quadrantPointFill, + quadrantPointTextFill: s.quadrantPointTextFill, + quadrantXAxisTextFill: s.quadrantXAxisTextFill, + quadrantYAxisTextFill: s.quadrantYAxisTextFill, + quadrantExternalBorderStrokeFill: s.quadrantExternalBorderStrokeFill, + quadrantInternalBorderStrokeFill: s.quadrantInternalBorderStrokeFill, + quadrantTitleFill: s.quadrantTitleFill + }), R.setData({ titleText: At() }), R.build(); +} +const Zt = function() { + R.clear(), It(); +}, Jt = { + setWidth: $t, + setHeight: Gt, + setQuadrant1Text: Nt, + setQuadrant2Text: Ut, + setQuadrant3Text: Qt, + setQuadrant4Text: Ht, + setXAxisLeftText: Xt, + setXAxisRightText: Mt, + setYAxisTopText: Ot, + setYAxisBottomText: Yt, + addPoint: jt, + getQuadrantData: Kt, + clear: Zt, + setAccTitle: Lt, + getAccTitle: Ct, + setDiagramTitle: zt, + getDiagramTitle: At, + getAccDescription: Et, + setAccDescription: Dt +}, te = (e, s, c, x) => { + var q, T, m; + function f(t) { + return t === "top" ? "hanging" : "middle"; + } + function d(t) { + return t === "left" ? "start" : "middle"; + } + function l(t) { + return `translate(${t.x}, ${t.y}) rotate(${t.rotation || 0})`; + } + const g = yt(); + lt.debug(`Rendering quadrant chart +` + e); + const i = g.securityLevel; + let y; + i === "sandbox" && (y = gt("#i" + s)); + const B = (i === "sandbox" ? gt(y.nodes()[0].contentDocument.body) : gt("body")).select(`[id="${s}"]`), w = B.append("g").attr("class", "main"), A = ((q = g.quadrantChart) == null ? void 0 : q.chartWidth) || 500, z = ((T = g.quadrantChart) == null ? void 0 : T.chartHeight) || 500; + wt(B, z, A, ((m = g.quadrantChart) == null ? void 0 : m.useMaxWidth) || !0), B.attr("viewBox", "0 0 " + A + " " + z), x.db.setHeight(z), x.db.setWidth(A); + const _ = x.db.getQuadrantData(), H = w.append("g").attr("class", "quadrants"), $ = w.append("g").attr("class", "border"), K = w.append("g").attr("class", "data-points"), at = w.append("g").attr("class", "labels"), nt = w.append("g").attr("class", "title"); + _.title && nt.append("text").attr("x", 0).attr("y", 0).attr("fill", _.title.fill).attr("font-size", _.title.fontSize).attr("dominant-baseline", f(_.title.horizontalPos)).attr("text-anchor", d(_.title.verticalPos)).attr("transform", l(_.title)).text(_.title.text), _.borderLines && $.selectAll("line").data(_.borderLines).enter().append("line").attr("x1", (t) => t.x1).attr("y1", (t) => t.y1).attr("x2", (t) => t.x2).attr("y2", (t) => t.y2).style("stroke", (t) => t.strokeFill).style("stroke-width", (t) => t.strokeWidth); + const et = H.selectAll("g.quadrant").data(_.quadrants).enter().append("g").attr("class", "quadrant"); + et.append("rect").attr("x", (t) => t.x).attr("y", (t) => t.y).attr("width", (t) => t.width).attr("height", (t) => t.height).attr("fill", (t) => t.fill), et.append("text").attr("x", 0).attr("y", 0).attr("fill", (t) => t.text.fill).attr("font-size", (t) => t.text.fontSize).attr( + "dominant-baseline", + (t) => f(t.text.horizontalPos) + ).attr("text-anchor", (t) => d(t.text.verticalPos)).attr("transform", (t) => l(t.text)).text((t) => t.text.text), at.selectAll("g.label").data(_.axisLabels).enter().append("g").attr("class", "label").append("text").attr("x", 0).attr("y", 0).text((t) => t.text).attr("fill", (t) => t.fill).attr("font-size", (t) => t.fontSize).attr("dominant-baseline", (t) => f(t.horizontalPos)).attr("text-anchor", (t) => d(t.verticalPos)).attr("transform", (t) => l(t)); + const N = K.selectAll("g.data-point").data(_.points).enter().append("g").attr("class", "data-point"); + N.append("circle").attr("cx", (t) => t.x).attr("cy", (t) => t.y).attr("r", (t) => t.radius).attr("fill", (t) => t.fill), N.append("text").attr("x", 0).attr("y", 0).text((t) => t.text.text).attr("fill", (t) => t.text.fill).attr("font-size", (t) => t.text.fontSize).attr( + "dominant-baseline", + (t) => f(t.text.horizontalPos) + ).attr("text-anchor", (t) => d(t.text.verticalPos)).attr("transform", (t) => l(t.text)); +}, ee = { + draw: te +}, se = { + parser: Rt, + db: Jt, + renderer: ee, + styles: () => "" +}; +export { + se as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/rendering-util/createText.d.ts b/webroot/js/node_modules/mermaid/dist/rendering-util/createText.d.ts new file mode 100644 index 0000000..47e8ad2 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/rendering-util/createText.d.ts @@ -0,0 +1,9 @@ +export declare const createText: (el: any, text?: string, { style, isTitle, classes, useHtmlLabels, isNode, width, addSvgBackground, }?: { + style?: string | undefined; + isTitle?: boolean | undefined; + classes?: string | undefined; + useHtmlLabels?: boolean | undefined; + isNode?: boolean | undefined; + width?: number | undefined; + addSvgBackground?: boolean | undefined; +}) => any; diff --git a/webroot/js/node_modules/mermaid/dist/rendering-util/handle-markdown-text.d.ts b/webroot/js/node_modules/mermaid/dist/rendering-util/handle-markdown-text.d.ts new file mode 100644 index 0000000..d8d2773 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/rendering-util/handle-markdown-text.d.ts @@ -0,0 +1,6 @@ +import type { MarkdownLine } from './types.js'; +/** + * @param markdown - markdown to split into lines + */ +export declare function markdownToLines(markdown: string): MarkdownLine[]; +export declare function markdownToHTML(markdown: string): string; diff --git a/webroot/js/node_modules/mermaid/dist/rendering-util/handle-markdown-text.spec.d.ts b/webroot/js/node_modules/mermaid/dist/rendering-util/handle-markdown-text.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/rendering-util/handle-markdown-text.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/rendering-util/selectSvgElement.d.ts b/webroot/js/node_modules/mermaid/dist/rendering-util/selectSvgElement.d.ts new file mode 100644 index 0000000..c32ece1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/rendering-util/selectSvgElement.d.ts @@ -0,0 +1,8 @@ +import type { SVG } from '../diagram-api/types.js'; +/** + * Selects the SVG element using {@link id}. + * + * @param id - The diagram ID. + * @returns The selected {@link SVG} element using {@link id}. + */ +export declare const selectSvgElement: (id: string) => SVG; diff --git a/webroot/js/node_modules/mermaid/dist/rendering-util/splitText.d.ts b/webroot/js/node_modules/mermaid/dist/rendering-util/splitText.d.ts new file mode 100644 index 0000000..289ab65 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/rendering-util/splitText.d.ts @@ -0,0 +1,24 @@ +import type { CheckFitFunction, MarkdownLine, MarkdownWord } from './types.js'; +/** + * Splits a string into graphemes if available, otherwise characters. + */ +export declare function splitTextToChars(text: string): string[]; +/** + * Splits a string into words by using `Intl.Segmenter` if available, or splitting by ' '. + * `Intl.Segmenter` uses the default locale, which might be different across browsers. + */ +export declare function splitLineToWords(text: string): string[]; +/** + * Splits a word into two parts, the first part fits the width and the remaining part. + * @param checkFit - Function to check if word fits + * @param word - Word to split + * @returns [first part of word that fits, rest of word] + */ +export declare function splitWordToFitWidth(checkFit: CheckFitFunction, word: MarkdownWord): [MarkdownWord, MarkdownWord]; +/** + * Splits a line into multiple lines that satisfy the checkFit function. + * @param line - Line to split + * @param checkFit - Function to check if line fits + * @returns Array of lines that fit + */ +export declare function splitLineToFitWidth(line: MarkdownLine, checkFit: CheckFitFunction): MarkdownLine[]; diff --git a/webroot/js/node_modules/mermaid/dist/rendering-util/splitText.spec.d.ts b/webroot/js/node_modules/mermaid/dist/rendering-util/splitText.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/rendering-util/splitText.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/rendering-util/uid.d.ts b/webroot/js/node_modules/mermaid/dist/rendering-util/uid.d.ts new file mode 100644 index 0000000..c7dbf65 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/rendering-util/uid.d.ts @@ -0,0 +1,8 @@ +export declare class Uid { + private static count; + id: string; + href: string; + static next(name: string): Uid; + constructor(id: string); + toString(): string; +} diff --git a/webroot/js/node_modules/mermaid/dist/requirementDiagram-3865c41f.js b/webroot/js/node_modules/mermaid/dist/requirementDiagram-3865c41f.js new file mode 100644 index 0000000..c95fd26 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/requirementDiagram-3865c41f.js @@ -0,0 +1,768 @@ +import { c as Te, s as Ce, g as Fe, b as Me, a as De, l as Ne, E as Pe, j as oe, k as Ye, f as ke } from "./mermaid-e4a58915.js"; +import { G as Ue, l as Be } from "./layout-545b2d5b.js"; +import { l as Qe } from "./line-4ba3c4fa.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +var ce = function() { + var e = function(V, i, r, a) { + for (r = r || {}, a = V.length; a--; r[V[a]] = i) + ; + return r; + }, t = [1, 3], l = [1, 4], c = [1, 5], u = [1, 6], d = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], f = [1, 18], h = [2, 7], o = [1, 22], E = [1, 23], R = [1, 24], A = [1, 25], T = [1, 26], N = [1, 27], w = [1, 20], k = [1, 28], x = [1, 29], F = [62, 63], de = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], fe = [1, 47], pe = [1, 48], ye = [1, 49], _e = [1, 50], Ee = [1, 51], ge = [1, 52], Re = [1, 53], O = [53, 54], M = [1, 64], D = [1, 60], P = [1, 61], Y = [1, 62], U = [1, 63], B = [1, 65], j = [1, 69], z = [1, 70], X = [1, 67], J = [1, 68], m = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], ie = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, directive: 4, NEWLINE: 5, RD: 6, diagram: 7, EOF: 8, acc_title: 9, acc_title_value: 10, acc_descr: 11, acc_descr_value: 12, acc_descr_multiline_value: 13, requirementDef: 14, elementDef: 15, relationshipDef: 16, requirementType: 17, requirementName: 18, STRUCT_START: 19, requirementBody: 20, ID: 21, COLONSEP: 22, id: 23, TEXT: 24, text: 25, RISK: 26, riskLevel: 27, VERIFYMTHD: 28, verifyType: 29, STRUCT_STOP: 30, REQUIREMENT: 31, FUNCTIONAL_REQUIREMENT: 32, INTERFACE_REQUIREMENT: 33, PERFORMANCE_REQUIREMENT: 34, PHYSICAL_REQUIREMENT: 35, DESIGN_CONSTRAINT: 36, LOW_RISK: 37, MED_RISK: 38, HIGH_RISK: 39, VERIFY_ANALYSIS: 40, VERIFY_DEMONSTRATION: 41, VERIFY_INSPECTION: 42, VERIFY_TEST: 43, ELEMENT: 44, elementName: 45, elementBody: 46, TYPE: 47, type: 48, DOCREF: 49, ref: 50, END_ARROW_L: 51, relationship: 52, LINE: 53, END_ARROW_R: 54, CONTAINS: 55, COPIES: 56, DERIVES: 57, SATISFIES: 58, VERIFIES: 59, REFINES: 60, TRACES: 61, unqString: 62, qString: 63, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" }, + productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]], + performAction: function(i, r, a, n, p, s, W) { + var _ = s.length - 1; + switch (p) { + case 4: + this.$ = s[_].trim(), n.setAccTitle(this.$); + break; + case 5: + case 6: + this.$ = s[_].trim(), n.setAccDescription(this.$); + break; + case 7: + this.$ = []; + break; + case 13: + n.addRequirement(s[_ - 3], s[_ - 4]); + break; + case 14: + n.setNewReqId(s[_ - 2]); + break; + case 15: + n.setNewReqText(s[_ - 2]); + break; + case 16: + n.setNewReqRisk(s[_ - 2]); + break; + case 17: + n.setNewReqVerifyMethod(s[_ - 2]); + break; + case 20: + this.$ = n.RequirementType.REQUIREMENT; + break; + case 21: + this.$ = n.RequirementType.FUNCTIONAL_REQUIREMENT; + break; + case 22: + this.$ = n.RequirementType.INTERFACE_REQUIREMENT; + break; + case 23: + this.$ = n.RequirementType.PERFORMANCE_REQUIREMENT; + break; + case 24: + this.$ = n.RequirementType.PHYSICAL_REQUIREMENT; + break; + case 25: + this.$ = n.RequirementType.DESIGN_CONSTRAINT; + break; + case 26: + this.$ = n.RiskLevel.LOW_RISK; + break; + case 27: + this.$ = n.RiskLevel.MED_RISK; + break; + case 28: + this.$ = n.RiskLevel.HIGH_RISK; + break; + case 29: + this.$ = n.VerifyType.VERIFY_ANALYSIS; + break; + case 30: + this.$ = n.VerifyType.VERIFY_DEMONSTRATION; + break; + case 31: + this.$ = n.VerifyType.VERIFY_INSPECTION; + break; + case 32: + this.$ = n.VerifyType.VERIFY_TEST; + break; + case 33: + n.addElement(s[_ - 3]); + break; + case 34: + n.setNewElementType(s[_ - 2]); + break; + case 35: + n.setNewElementDocRef(s[_ - 2]); + break; + case 38: + n.addRelationship(s[_ - 2], s[_], s[_ - 4]); + break; + case 39: + n.addRelationship(s[_ - 2], s[_ - 4], s[_]); + break; + case 40: + this.$ = n.Relationships.CONTAINS; + break; + case 41: + this.$ = n.Relationships.COPIES; + break; + case 42: + this.$ = n.Relationships.DERIVES; + break; + case 43: + this.$ = n.Relationships.SATISFIES; + break; + case 44: + this.$ = n.Relationships.VERIFIES; + break; + case 45: + this.$ = n.Relationships.REFINES; + break; + case 46: + this.$ = n.Relationships.TRACES; + break; + } + }, + table: [{ 3: 1, 4: 2, 6: t, 9: l, 11: c, 13: u }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: t, 9: l, 11: c, 13: u }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, e(d, [2, 6]), { 3: 12, 4: 2, 6: t, 9: l, 11: c, 13: u }, { 1: [2, 2] }, { 4: 17, 5: f, 7: 13, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: w, 62: k, 63: x }, e(d, [2, 4]), e(d, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: f, 7: 31, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: w, 62: k, 63: x }, { 4: 17, 5: f, 7: 32, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: w, 62: k, 63: x }, { 4: 17, 5: f, 7: 33, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: w, 62: k, 63: x }, { 4: 17, 5: f, 7: 34, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: w, 62: k, 63: x }, { 4: 17, 5: f, 7: 35, 8: h, 9: l, 11: c, 13: u, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: o, 32: E, 33: R, 34: A, 35: T, 36: N, 44: w, 62: k, 63: x }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, e(F, [2, 20]), e(F, [2, 21]), e(F, [2, 22]), e(F, [2, 23]), e(F, [2, 24]), e(F, [2, 25]), e(de, [2, 49]), e(de, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: fe, 56: pe, 57: ye, 58: _e, 59: Ee, 60: ge, 61: Re }, { 52: 54, 55: fe, 56: pe, 57: ye, 58: _e, 59: Ee, 60: ge, 61: Re }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, e(O, [2, 40]), e(O, [2, 41]), e(O, [2, 42]), e(O, [2, 43]), e(O, [2, 44]), e(O, [2, 45]), e(O, [2, 46]), { 54: [1, 58] }, { 5: M, 20: 59, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: j, 30: z, 46: 66, 47: X, 49: J }, { 23: 71, 62: k, 63: x }, { 23: 72, 62: k, 63: x }, e(m, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: M, 20: 77, 21: D, 24: P, 26: Y, 28: U, 30: B }, e(m, [2, 19]), e(m, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: j, 30: z, 46: 80, 47: X, 49: J }, e(m, [2, 37]), e(m, [2, 38]), e(m, [2, 39]), { 23: 81, 62: k, 63: x }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, e(m, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, e(m, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: M, 20: 106, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: M, 20: 107, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: M, 20: 108, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: M, 20: 109, 21: D, 24: P, 26: Y, 28: U, 30: B }, { 5: j, 30: z, 46: 110, 47: X, 49: J }, { 5: j, 30: z, 46: 111, 47: X, 49: J }, e(m, [2, 14]), e(m, [2, 15]), e(m, [2, 16]), e(m, [2, 17]), e(m, [2, 34]), e(m, [2, 35])], + defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] }, + parseError: function(i, r) { + if (r.recoverable) + this.trace(i); + else { + var a = new Error(i); + throw a.hash = r, a; + } + }, + parse: function(i) { + var r = this, a = [0], n = [], p = [null], s = [], W = this.table, _ = "", Z = 0, me = 0, Ve = 2, Ie = 1, qe = s.slice.call(arguments, 1), g = Object.create(this.lexer), L = { yy: {} }; + for (var re in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, re) && (L.yy[re] = this.yy[re]); + g.setInput(i, L.yy), L.yy.lexer = g, L.yy.parser = this, typeof g.yylloc > "u" && (g.yylloc = {}); + var se = g.yylloc; + s.push(se); + var Oe = g.options && g.options.ranges; + typeof L.yy.parseError == "function" ? this.parseError = L.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function Le() { + var v; + return v = n.pop() || g.lex() || Ie, typeof v != "number" && (v instanceof Array && (n = v, v = n.pop()), v = r.symbols_[v] || v), v; + } + for (var I, C, S, ae, Q = {}, ee, $, be, te; ; ) { + if (C = a[a.length - 1], this.defaultActions[C] ? S = this.defaultActions[C] : ((I === null || typeof I > "u") && (I = Le()), S = W[C] && W[C][I]), typeof S > "u" || !S.length || !S[0]) { + var le = ""; + te = []; + for (ee in W[C]) + this.terminals_[ee] && ee > Ve && te.push("'" + this.terminals_[ee] + "'"); + g.showPosition ? le = "Parse error on line " + (Z + 1) + `: +` + g.showPosition() + ` +Expecting ` + te.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : le = "Parse error on line " + (Z + 1) + ": Unexpected " + (I == Ie ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(le, { + text: g.match, + token: this.terminals_[I] || I, + line: g.yylineno, + loc: se, + expected: te + }); + } + if (S[0] instanceof Array && S.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + C + ", token: " + I); + switch (S[0]) { + case 1: + a.push(I), p.push(g.yytext), s.push(g.yylloc), a.push(S[1]), I = null, me = g.yyleng, _ = g.yytext, Z = g.yylineno, se = g.yylloc; + break; + case 2: + if ($ = this.productions_[S[1]][1], Q.$ = p[p.length - $], Q._$ = { + first_line: s[s.length - ($ || 1)].first_line, + last_line: s[s.length - 1].last_line, + first_column: s[s.length - ($ || 1)].first_column, + last_column: s[s.length - 1].last_column + }, Oe && (Q._$.range = [ + s[s.length - ($ || 1)].range[0], + s[s.length - 1].range[1] + ]), ae = this.performAction.apply(Q, [ + _, + me, + Z, + L.yy, + S[1], + p, + s + ].concat(qe)), typeof ae < "u") + return ae; + $ && (a = a.slice(0, -1 * $ * 2), p = p.slice(0, -1 * $), s = s.slice(0, -1 * $)), a.push(this.productions_[S[1]][0]), p.push(Q.$), s.push(Q._$), be = W[a[a.length - 2]][a[a.length - 1]], a.push(be); + break; + case 3: + return !0; + } + } + return !0; + } + }, ve = function() { + var V = { + EOF: 1, + parseError: function(r, a) { + if (this.yy.parser) + this.yy.parser.parseError(r, a); + else + throw new Error(r); + }, + // resets the lexer, sets new input + setInput: function(i, r) { + return this.yy = r || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var i = this._input[0]; + this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i; + var r = i.match(/(?:\r\n?|\n).*/g); + return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i; + }, + // unshifts one char (or a string) into the input + unput: function(i) { + var r = i.length, a = i.split(/(?:\r\n?|\n)/g); + this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r; + var n = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1); + var p = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: a ? (a.length === n.length ? this.yylloc.first_column : 0) + n[n.length - a.length].length - a[0].length : this.yylloc.first_column - r + }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(i) { + this.unput(this.match.slice(i)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var i = this.matched.substr(0, this.matched.length - this.match.length); + return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var i = this.match; + return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var i = this.pastInput(), r = new Array(i.length + 1).join("-"); + return i + this.upcomingInput() + ` +` + r + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(i, r) { + var a, n, p; + if (this.options.backtrack_lexer && (p = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), n = i[0].match(/(?:\r\n?|\n).*/g), n && (this.yylineno += n.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: n ? n[n.length - 1].length - n[n.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length + }, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], a = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a) + return a; + if (this._backtrack) { + for (var s in p) + this[s] = p[s]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var i, r, a, n; + this._more || (this.yytext = "", this.match = ""); + for (var p = this._currentRules(), s = 0; s < p.length; s++) + if (a = this._input.match(this.rules[p[s]]), a && (!r || a[0].length > r[0].length)) { + if (r = a, n = s, this.options.backtrack_lexer) { + if (i = this.test_match(a, p[s]), i !== !1) + return i; + if (this._backtrack) { + r = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return r ? (i = this.test_match(r, p[n]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var r = this.next(); + return r || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(r) { + this.conditionStack.push(r); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var r = this.conditionStack.length - 1; + return r > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(r) { + return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(r) { + this.begin(r); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(r, a, n, p) { + switch (n) { + case 0: + return "title"; + case 1: + return this.begin("acc_title"), 9; + case 2: + return this.popState(), "acc_title_value"; + case 3: + return this.begin("acc_descr"), 11; + case 4: + return this.popState(), "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + return 5; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + return 8; + case 13: + return 6; + case 14: + return 19; + case 15: + return 30; + case 16: + return 22; + case 17: + return 21; + case 18: + return 24; + case 19: + return 26; + case 20: + return 28; + case 21: + return 31; + case 22: + return 32; + case 23: + return 33; + case 24: + return 34; + case 25: + return 35; + case 26: + return 36; + case 27: + return 37; + case 28: + return 38; + case 29: + return 39; + case 30: + return 40; + case 31: + return 41; + case 32: + return 42; + case 33: + return 43; + case 34: + return 44; + case 35: + return 55; + case 36: + return 56; + case 37: + return 57; + case 38: + return 58; + case 39: + return 59; + case 40: + return 60; + case 41: + return 61; + case 42: + return 47; + case 43: + return 49; + case 44: + return 51; + case 45: + return 54; + case 46: + return 53; + case 47: + this.begin("string"); + break; + case 48: + this.popState(); + break; + case 49: + return "qString"; + case 50: + return a.yytext = a.yytext.trim(), 62; + } + }, + rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i], + conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, unqString: { rules: [], inclusive: !1 }, token: { rules: [], inclusive: !1 }, string: { rules: [48, 49], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], inclusive: !0 } } + }; + return V; + }(); + ie.lexer = ve; + function ne() { + this.yy = {}; + } + return ne.prototype = ie, ie.Parser = ne, new ne(); +}(); +ce.parser = ce; +const He = ce; +let ue = [], b = {}, K = {}, q = {}, G = {}; +const We = { + REQUIREMENT: "Requirement", + FUNCTIONAL_REQUIREMENT: "Functional Requirement", + INTERFACE_REQUIREMENT: "Interface Requirement", + PERFORMANCE_REQUIREMENT: "Performance Requirement", + PHYSICAL_REQUIREMENT: "Physical Requirement", + DESIGN_CONSTRAINT: "Design Constraint" +}, Ke = { + LOW_RISK: "Low", + MED_RISK: "Medium", + HIGH_RISK: "High" +}, Ge = { + VERIFY_ANALYSIS: "Analysis", + VERIFY_DEMONSTRATION: "Demonstration", + VERIFY_INSPECTION: "Inspection", + VERIFY_TEST: "Test" +}, je = { + CONTAINS: "contains", + COPIES: "copies", + DERIVES: "derives", + SATISFIES: "satisfies", + VERIFIES: "verifies", + REFINES: "refines", + TRACES: "traces" +}, ze = (e, t) => (K[e] === void 0 && (K[e] = { + name: e, + type: t, + id: b.id, + text: b.text, + risk: b.risk, + verifyMethod: b.verifyMethod +}), b = {}, K[e]), Xe = () => K, Je = (e) => { + b !== void 0 && (b.id = e); +}, Ze = (e) => { + b !== void 0 && (b.text = e); +}, et = (e) => { + b !== void 0 && (b.risk = e); +}, tt = (e) => { + b !== void 0 && (b.verifyMethod = e); +}, it = (e) => (G[e] === void 0 && (G[e] = { + name: e, + type: q.type, + docRef: q.docRef +}, Ne.info("Added new requirement: ", e)), q = {}, G[e]), nt = () => G, rt = (e) => { + q !== void 0 && (q.type = e); +}, st = (e) => { + q !== void 0 && (q.docRef = e); +}, at = (e, t, l) => { + ue.push({ + type: e, + src: t, + dst: l + }); +}, lt = () => ue, ot = () => { + ue = [], b = {}, K = {}, q = {}, G = {}, Pe(); +}, ct = { + RequirementType: We, + RiskLevel: Ke, + VerifyType: Ge, + Relationships: je, + getConfig: () => Te().req, + addRequirement: ze, + getRequirements: Xe, + setNewReqId: Je, + setNewReqText: Ze, + setNewReqRisk: et, + setNewReqVerifyMethod: tt, + setAccTitle: Ce, + getAccTitle: Fe, + setAccDescription: Me, + getAccDescription: De, + addElement: it, + getElements: nt, + setNewElementType: rt, + setNewElementDocRef: st, + addRelationship: at, + getRelationships: lt, + clear: ot +}, ht = (e) => ` + + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + +`, ut = ht, he = { + CONTAINS: "contains", + ARROW: "arrow" +}, dt = (e, t) => { + let l = e.append("defs").append("marker").attr("id", he.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", t.line_height / 2).attr("markerWidth", t.line_height).attr("markerHeight", t.line_height).attr("orient", "auto").append("g"); + l.append("circle").attr("cx", t.line_height / 2).attr("cy", t.line_height / 2).attr("r", t.line_height / 2).attr("fill", "none"), l.append("line").attr("x1", 0).attr("x2", t.line_height).attr("y1", t.line_height / 2).attr("y2", t.line_height / 2).attr("stroke-width", 1), l.append("line").attr("y1", 0).attr("y2", t.line_height).attr("x1", t.line_height / 2).attr("x2", t.line_height / 2).attr("stroke-width", 1), e.append("defs").append("marker").attr("id", he.ARROW + "_line_ending").attr("refX", t.line_height).attr("refY", 0.5 * t.line_height).attr("markerWidth", t.line_height).attr("markerHeight", t.line_height).attr("orient", "auto").append("path").attr( + "d", + `M0,0 + L${t.line_height},${t.line_height / 2} + M${t.line_height},${t.line_height / 2} + L0,${t.line_height}` + ).attr("stroke-width", 1); +}, xe = { + ReqMarkers: he, + insertLineEndings: dt +}; +let y = {}, Se = 0; +const Ae = (e, t) => e.insert("rect", "#" + t).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", y.rect_min_width + "px").attr("height", y.rect_min_height + "px"), we = (e, t, l) => { + let c = y.rect_min_width / 2, u = e.append("text").attr("class", "req reqLabel reqTitle").attr("id", t).attr("x", c).attr("y", y.rect_padding).attr("dominant-baseline", "hanging"), d = 0; + l.forEach((E) => { + d == 0 ? u.append("tspan").attr("text-anchor", "middle").attr("x", y.rect_min_width / 2).attr("dy", 0).text(E) : u.append("tspan").attr("text-anchor", "middle").attr("x", y.rect_min_width / 2).attr("dy", y.line_height * 0.75).text(E), d++; + }); + let f = 1.5 * y.rect_padding, h = d * y.line_height * 0.75, o = f + h; + return e.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", y.rect_min_width).attr("y1", o).attr("y2", o), { + titleNode: u, + y: o + }; +}, $e = (e, t, l, c) => { + let u = e.append("text").attr("class", "req reqLabel").attr("id", t).attr("x", y.rect_padding).attr("y", c).attr("dominant-baseline", "hanging"), d = 0; + const f = 30; + let h = []; + return l.forEach((o) => { + let E = o.length; + for (; E > f && d < 3; ) { + let R = o.substring(0, f); + o = o.substring(f, o.length), E = o.length, h[h.length] = R, d++; + } + if (d == 3) { + let R = h[h.length - 1]; + h[h.length - 1] = R.substring(0, R.length - 4) + "..."; + } else + h[h.length] = o; + d = 0; + }), h.forEach((o) => { + u.append("tspan").attr("x", y.rect_padding).attr("dy", y.line_height).text(o); + }), u; +}, ft = (e, t, l, c) => { + const u = t.node().getTotalLength(), d = t.node().getPointAtLength(u * 0.5), f = "rel" + Se; + Se++; + const o = e.append("text").attr("class", "req relationshipLabel").attr("id", f).attr("x", d.x).attr("y", d.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(c).node().getBBox(); + e.insert("rect", "#" + f).attr("class", "req reqLabelBox").attr("x", d.x - o.width / 2).attr("y", d.y - o.height / 2).attr("width", o.width).attr("height", o.height).attr("fill", "white").attr("fill-opacity", "85%"); +}, pt = function(e, t, l, c, u) { + const d = l.edge(H(t.src), H(t.dst)), f = Qe().x(function(o) { + return o.x; + }).y(function(o) { + return o.y; + }), h = e.insert("path", "#" + c).attr("class", "er relationshipLine").attr("d", f(d.points)).attr("fill", "none"); + t.type == u.db.Relationships.CONTAINS ? h.attr( + "marker-start", + "url(" + ke.getUrl(y.arrowMarkerAbsolute) + "#" + t.type + "_line_ending)" + ) : (h.attr("stroke-dasharray", "10,7"), h.attr( + "marker-end", + "url(" + ke.getUrl(y.arrowMarkerAbsolute) + "#" + xe.ReqMarkers.ARROW + "_line_ending)" + )), ft(e, h, y, `<<${t.type}>>`); +}, yt = (e, t, l) => { + Object.keys(e).forEach((c) => { + let u = e[c]; + c = H(c), Ne.info("Added new requirement: ", c); + const d = l.append("g").attr("id", c), f = "req-" + c, h = Ae(d, f); + let o = we(d, c + "_title", [ + `<<${u.type}>>`, + `${u.name}` + ]); + $e( + d, + c + "_body", + [ + `Id: ${u.id}`, + `Text: ${u.text}`, + `Risk: ${u.risk}`, + `Verification: ${u.verifyMethod}` + ], + o.y + ); + const E = h.node().getBBox(); + t.setNode(c, { + width: E.width, + height: E.height, + shape: "rect", + id: c + }); + }); +}, _t = (e, t, l) => { + Object.keys(e).forEach((c) => { + let u = e[c]; + const d = H(c), f = l.append("g").attr("id", d), h = "element-" + d, o = Ae(f, h); + let E = we(f, h + "_title", ["<>", `${c}`]); + $e( + f, + h + "_body", + [`Type: ${u.type || "Not Specified"}`, `Doc Ref: ${u.docRef || "None"}`], + E.y + ); + const R = o.node().getBBox(); + t.setNode(d, { + width: R.width, + height: R.height, + shape: "rect", + id: d + }); + }); +}, Et = (e, t) => (e.forEach(function(l) { + let c = H(l.src), u = H(l.dst); + t.setEdge(c, u, { relationship: l }); +}), e), gt = function(e, t) { + t.nodes().forEach(function(l) { + l !== void 0 && t.node(l) !== void 0 && (e.select("#" + l), e.select("#" + l).attr( + "transform", + "translate(" + (t.node(l).x - t.node(l).width / 2) + "," + (t.node(l).y - t.node(l).height / 2) + " )" + )); + }); +}, H = (e) => e.replace(/\s/g, "").replace(/\./g, "_"), Rt = (e, t, l, c) => { + y = Te().requirement; + const u = y.securityLevel; + let d; + u === "sandbox" && (d = oe("#i" + t)); + const h = (u === "sandbox" ? oe(d.nodes()[0].contentDocument.body) : oe("body")).select(`[id='${t}']`); + xe.insertLineEndings(h, y); + const o = new Ue({ + multigraph: !1, + compound: !1, + directed: !0 + }).setGraph({ + rankdir: y.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let E = c.db.getRequirements(), R = c.db.getElements(), A = c.db.getRelationships(); + yt(E, o, h), _t(R, o, h), Et(A, o), Be(o), gt(h, o), A.forEach(function(x) { + pt(h, x, o, t, c); + }); + const T = y.rect_padding, N = h.node().getBBox(), w = N.width + T * 2, k = N.height + T * 2; + Ye(h, k, w, y.useMaxWidth), h.attr("viewBox", `${N.x - T} ${N.y - T} ${w} ${k}`); +}, mt = { + draw: Rt +}, Nt = { + parser: He, + db: ct, + renderer: mt, + styles: ut +}; +export { + Nt as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/requirementDiagram-65cd3fda.js b/webroot/js/node_modules/mermaid/dist/requirementDiagram-65cd3fda.js new file mode 100644 index 0000000..9ab7898 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/requirementDiagram-65cd3fda.js @@ -0,0 +1,1090 @@ +import { c as getConfig, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, l as log, E as clear$1, j as d3select, k as configureSvgSize, f as common } from "./mermaid-491db2d9.js"; +import { G as Graph, l as layout } from "./layout-a7b9ff07.js"; +import { l as line } from "./line-8fd2bd69.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "requirementType": 17, "requirementName": 18, "STRUCT_START": 19, "requirementBody": 20, "ID": 21, "COLONSEP": 22, "id": 23, "TEXT": 24, "text": 25, "RISK": 26, "riskLevel": 27, "VERIFYMTHD": 28, "verifyType": 29, "STRUCT_STOP": 30, "REQUIREMENT": 31, "FUNCTIONAL_REQUIREMENT": 32, "INTERFACE_REQUIREMENT": 33, "PERFORMANCE_REQUIREMENT": 34, "PHYSICAL_REQUIREMENT": 35, "DESIGN_CONSTRAINT": 36, "LOW_RISK": 37, "MED_RISK": 38, "HIGH_RISK": 39, "VERIFY_ANALYSIS": 40, "VERIFY_DEMONSTRATION": 41, "VERIFY_INSPECTION": 42, "VERIFY_TEST": 43, "ELEMENT": 44, "elementName": 45, "elementBody": 46, "TYPE": 47, "type": 48, "DOCREF": 49, "ref": 50, "END_ARROW_L": 51, "relationship": 52, "LINE": 53, "END_ARROW_R": 54, "CONTAINS": 55, "COPIES": 56, "DERIVES": 57, "SATISFIES": 58, "VERIFIES": 59, "REFINES": 60, "TRACES": 61, "unqString": 62, "qString": 63, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" }, + productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 4: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 5: + case 6: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 7: + this.$ = []; + break; + case 13: + yy.addRequirement($$[$0 - 3], $$[$0 - 4]); + break; + case 14: + yy.setNewReqId($$[$0 - 2]); + break; + case 15: + yy.setNewReqText($$[$0 - 2]); + break; + case 16: + yy.setNewReqRisk($$[$0 - 2]); + break; + case 17: + yy.setNewReqVerifyMethod($$[$0 - 2]); + break; + case 20: + this.$ = yy.RequirementType.REQUIREMENT; + break; + case 21: + this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT; + break; + case 22: + this.$ = yy.RequirementType.INTERFACE_REQUIREMENT; + break; + case 23: + this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT; + break; + case 24: + this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT; + break; + case 25: + this.$ = yy.RequirementType.DESIGN_CONSTRAINT; + break; + case 26: + this.$ = yy.RiskLevel.LOW_RISK; + break; + case 27: + this.$ = yy.RiskLevel.MED_RISK; + break; + case 28: + this.$ = yy.RiskLevel.HIGH_RISK; + break; + case 29: + this.$ = yy.VerifyType.VERIFY_ANALYSIS; + break; + case 30: + this.$ = yy.VerifyType.VERIFY_DEMONSTRATION; + break; + case 31: + this.$ = yy.VerifyType.VERIFY_INSPECTION; + break; + case 32: + this.$ = yy.VerifyType.VERIFY_TEST; + break; + case 33: + yy.addElement($$[$0 - 3]); + break; + case 34: + yy.setNewElementType($$[$0 - 2]); + break; + case 35: + yy.setNewElementDocRef($$[$0 - 2]); + break; + case 38: + yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 39: + yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 40: + this.$ = yy.Relationships.CONTAINS; + break; + case 41: + this.$ = yy.Relationships.COPIES; + break; + case 42: + this.$ = yy.Relationships.DERIVES; + break; + case 43: + this.$ = yy.Relationships.SATISFIES; + break; + case 44: + this.$ = yy.Relationships.VERIFIES; + break; + case 45: + this.$ = yy.Relationships.REFINES; + break; + case 46: + this.$ = yy.Relationships.TRACES; + break; + } + }, + table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])], + defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return "title"; + case 1: + this.begin("acc_title"); + return 9; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 11; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + return 5; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + return 8; + case 13: + return 6; + case 14: + return 19; + case 15: + return 30; + case 16: + return 22; + case 17: + return 21; + case 18: + return 24; + case 19: + return 26; + case 20: + return 28; + case 21: + return 31; + case 22: + return 32; + case 23: + return 33; + case 24: + return 34; + case 25: + return 35; + case 26: + return 36; + case 27: + return 37; + case 28: + return 38; + case 29: + return 39; + case 30: + return 40; + case 31: + return 41; + case 32: + return 42; + case 33: + return 43; + case 34: + return 44; + case 35: + return 55; + case 36: + return 56; + case 37: + return 57; + case 38: + return 58; + case 39: + return 59; + case 40: + return 60; + case 41: + return 61; + case 42: + return 47; + case 43: + return 49; + case 44: + return 51; + case 45: + return 54; + case 46: + return 53; + case 47: + this.begin("string"); + break; + case 48: + this.popState(); + break; + case 49: + return "qString"; + case 50: + yy_.yytext = yy_.yytext.trim(); + return 62; + } + }, + rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [48, 49], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let relations = []; +let latestRequirement = {}; +let requirements = {}; +let latestElement = {}; +let elements = {}; +const RequirementType = { + REQUIREMENT: "Requirement", + FUNCTIONAL_REQUIREMENT: "Functional Requirement", + INTERFACE_REQUIREMENT: "Interface Requirement", + PERFORMANCE_REQUIREMENT: "Performance Requirement", + PHYSICAL_REQUIREMENT: "Physical Requirement", + DESIGN_CONSTRAINT: "Design Constraint" +}; +const RiskLevel = { + LOW_RISK: "Low", + MED_RISK: "Medium", + HIGH_RISK: "High" +}; +const VerifyType = { + VERIFY_ANALYSIS: "Analysis", + VERIFY_DEMONSTRATION: "Demonstration", + VERIFY_INSPECTION: "Inspection", + VERIFY_TEST: "Test" +}; +const Relationships = { + CONTAINS: "contains", + COPIES: "copies", + DERIVES: "derives", + SATISFIES: "satisfies", + VERIFIES: "verifies", + REFINES: "refines", + TRACES: "traces" +}; +const addRequirement = (name, type) => { + if (requirements[name] === void 0) { + requirements[name] = { + name, + type, + id: latestRequirement.id, + text: latestRequirement.text, + risk: latestRequirement.risk, + verifyMethod: latestRequirement.verifyMethod + }; + } + latestRequirement = {}; + return requirements[name]; +}; +const getRequirements = () => requirements; +const setNewReqId = (id) => { + if (latestRequirement !== void 0) { + latestRequirement.id = id; + } +}; +const setNewReqText = (text) => { + if (latestRequirement !== void 0) { + latestRequirement.text = text; + } +}; +const setNewReqRisk = (risk) => { + if (latestRequirement !== void 0) { + latestRequirement.risk = risk; + } +}; +const setNewReqVerifyMethod = (verifyMethod) => { + if (latestRequirement !== void 0) { + latestRequirement.verifyMethod = verifyMethod; + } +}; +const addElement = (name) => { + if (elements[name] === void 0) { + elements[name] = { + name, + type: latestElement.type, + docRef: latestElement.docRef + }; + log.info("Added new requirement: ", name); + } + latestElement = {}; + return elements[name]; +}; +const getElements = () => elements; +const setNewElementType = (type) => { + if (latestElement !== void 0) { + latestElement.type = type; + } +}; +const setNewElementDocRef = (docRef) => { + if (latestElement !== void 0) { + latestElement.docRef = docRef; + } +}; +const addRelationship = (type, src, dst) => { + relations.push({ + type, + src, + dst + }); +}; +const getRelationships = () => relations; +const clear = () => { + relations = []; + latestRequirement = {}; + requirements = {}; + latestElement = {}; + elements = {}; + clear$1(); +}; +const db = { + RequirementType, + RiskLevel, + VerifyType, + Relationships, + getConfig: () => getConfig().req, + addRequirement, + getRequirements, + setNewReqId, + setNewReqText, + setNewReqRisk, + setNewReqVerifyMethod, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addElement, + getElements, + setNewElementType, + setNewElementDocRef, + addRelationship, + getRelationships, + clear +}; +const getStyles = (options) => ` + + marker { + fill: ${options.relationColor}; + stroke: ${options.relationColor}; + } + + marker.cross { + stroke: ${options.lineColor}; + } + + svg { + font-family: ${options.fontFamily}; + font-size: ${options.fontSize}; + } + + .reqBox { + fill: ${options.requirementBackground}; + fill-opacity: 1.0; + stroke: ${options.requirementBorderColor}; + stroke-width: ${options.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${options.requirementTextColor}; + } + .reqLabelBox { + fill: ${options.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${options.requirementBorderColor}; + stroke-width: ${options.requirementBorderSize}; + } + .relationshipLine { + stroke: ${options.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${options.relationLabelColor}; + } + +`; +const styles = getStyles; +const ReqMarkers = { + CONTAINS: "contains", + ARROW: "arrow" +}; +const insertLineEndings = (parentNode, conf2) => { + let containsNode = parentNode.append("defs").append("marker").attr("id", ReqMarkers.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", conf2.line_height / 2).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("g"); + containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none"); + containsNode.append("line").attr("x1", 0).attr("x2", conf2.line_height).attr("y1", conf2.line_height / 2).attr("y2", conf2.line_height / 2).attr("stroke-width", 1); + containsNode.append("line").attr("y1", 0).attr("y2", conf2.line_height).attr("x1", conf2.line_height / 2).attr("x2", conf2.line_height / 2).attr("stroke-width", 1); + parentNode.append("defs").append("marker").attr("id", ReqMarkers.ARROW + "_line_ending").attr("refX", conf2.line_height).attr("refY", 0.5 * conf2.line_height).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("path").attr( + "d", + `M0,0 + L${conf2.line_height},${conf2.line_height / 2} + M${conf2.line_height},${conf2.line_height / 2} + L0,${conf2.line_height}` + ).attr("stroke-width", 1); +}; +const markers = { + ReqMarkers, + insertLineEndings +}; +let conf = {}; +let relCnt = 0; +const newRectNode = (parentNode, id) => { + return parentNode.insert("rect", "#" + id).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", conf.rect_min_width + "px").attr("height", conf.rect_min_height + "px"); +}; +const newTitleNode = (parentNode, id, txts) => { + let x = conf.rect_min_width / 2; + let title = parentNode.append("text").attr("class", "req reqLabel reqTitle").attr("id", id).attr("x", x).attr("y", conf.rect_padding).attr("dominant-baseline", "hanging"); + let i = 0; + txts.forEach((textStr) => { + if (i == 0) { + title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", 0).text(textStr); + } else { + title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", conf.line_height * 0.75).text(textStr); + } + i++; + }); + let yPadding = 1.5 * conf.rect_padding; + let linePadding = i * conf.line_height * 0.75; + let totalY = yPadding + linePadding; + parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf.rect_min_width).attr("y1", totalY).attr("y2", totalY); + return { + titleNode: title, + y: totalY + }; +}; +const newBodyNode = (parentNode, id, txts, yStart) => { + let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id).attr("x", conf.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging"); + let currentRow = 0; + const charLimit = 30; + let wrappedTxts = []; + txts.forEach((textStr) => { + let currentTextLen = textStr.length; + while (currentTextLen > charLimit && currentRow < 3) { + let firstPart = textStr.substring(0, charLimit); + textStr = textStr.substring(charLimit, textStr.length); + currentTextLen = textStr.length; + wrappedTxts[wrappedTxts.length] = firstPart; + currentRow++; + } + if (currentRow == 3) { + let lastStr = wrappedTxts[wrappedTxts.length - 1]; + wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "..."; + } else { + wrappedTxts[wrappedTxts.length] = textStr; + } + currentRow = 0; + }); + wrappedTxts.forEach((textStr) => { + body.append("tspan").attr("x", conf.rect_padding).attr("dy", conf.line_height).text(textStr); + }); + return body; +}; +const addEdgeLabel = (parentNode, svgPath, conf2, txt) => { + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt; + relCnt++; + const labelNode = parentNode.append("text").attr("class", "req relationshipLabel").attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(txt); + const labelBBox = labelNode.node().getBBox(); + parentNode.insert("rect", "#" + labelId).attr("class", "req reqLabelBox").attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height).attr("fill", "white").attr("fill-opacity", "85%"); +}; +const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { + const edge = g.edge(elementString(rel.src), elementString(rel.dst)); + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }); + const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none"); + if (rel.type == diagObj.db.Relationships.CONTAINS) { + svgPath.attr( + "marker-start", + "url(" + common.getUrl(conf.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)" + ); + } else { + svgPath.attr("stroke-dasharray", "10,7"); + svgPath.attr( + "marker-end", + "url(" + common.getUrl(conf.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)" + ); + } + addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`); + return; +}; +const drawReqs = (reqs, graph, svgNode) => { + Object.keys(reqs).forEach((reqName) => { + let req = reqs[reqName]; + reqName = elementString(reqName); + log.info("Added new requirement: ", reqName); + const groupNode = svgNode.append("g").attr("id", reqName); + const textId = "req-" + reqName; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [ + `<<${req.type}>>`, + `${req.name}` + ]); + newBodyNode( + groupNode, + reqName + "_body", + [ + `Id: ${req.id}`, + `Text: ${req.text}`, + `Risk: ${req.risk}`, + `Verification: ${req.verifyMethod}` + ], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(reqName, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: reqName + }); + }); +}; +const drawElements = (els, graph, svgNode) => { + Object.keys(els).forEach((elName) => { + let el = els[elName]; + const id = elementString(elName); + const groupNode = svgNode.append("g").attr("id", id); + const textId = "element-" + id; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<>`, `${elName}`]); + newBodyNode( + groupNode, + textId + "_body", + [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(id, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id + }); + }); +}; +const addRelationships = (relationships, g) => { + relationships.forEach(function(r) { + let src = elementString(r.src); + let dst = elementString(r.dst); + g.setEdge(src, dst, { relationship: r }); + }); + return relationships; +}; +const adjustEntities = function(svgNode, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode.select("#" + v); + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); + return; +}; +const elementString = (str) => { + return str.replace(/\s/g, "").replace(/\./g, "_"); +}; +const draw = (text, id, _version, diagObj) => { + conf = getConfig().requirement; + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = root.select(`[id='${id}']`); + markers.insertLineEndings(svg, conf); + const g = new Graph({ + multigraph: false, + compound: false, + directed: true + }).setGraph({ + rankdir: conf.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let requirements2 = diagObj.db.getRequirements(); + let elements2 = diagObj.db.getElements(); + let relationships = diagObj.db.getRelationships(); + drawReqs(requirements2, g, svg); + drawElements(elements2, g, svg); + addRelationships(relationships, g); + layout(g); + adjustEntities(svg, g); + relationships.forEach(function(rel) { + drawRelationshipFromLayout(svg, rel, g, id, diagObj); + }); + const padding = conf.rect_padding; + const svgBounds = svg.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + configureSvgSize(svg, height, width, conf.useMaxWidth); + svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); +}; +const renderer = { + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/requirementDiagram-e12f1d97.js b/webroot/js/node_modules/mermaid/dist/requirementDiagram-e12f1d97.js new file mode 100644 index 0000000..29fd43a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/requirementDiagram-e12f1d97.js @@ -0,0 +1,1098 @@ +import { c as getConfig, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, l as log, t as clear$1, i as configureSvgSize, e as common } from "./mermaid-0d192ec3.js"; +import { select, line } from "d3"; +import { layout } from "dagre-d3-es/src/dagre/index.js"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "requirementType": 17, "requirementName": 18, "STRUCT_START": 19, "requirementBody": 20, "ID": 21, "COLONSEP": 22, "id": 23, "TEXT": 24, "text": 25, "RISK": 26, "riskLevel": 27, "VERIFYMTHD": 28, "verifyType": 29, "STRUCT_STOP": 30, "REQUIREMENT": 31, "FUNCTIONAL_REQUIREMENT": 32, "INTERFACE_REQUIREMENT": 33, "PERFORMANCE_REQUIREMENT": 34, "PHYSICAL_REQUIREMENT": 35, "DESIGN_CONSTRAINT": 36, "LOW_RISK": 37, "MED_RISK": 38, "HIGH_RISK": 39, "VERIFY_ANALYSIS": 40, "VERIFY_DEMONSTRATION": 41, "VERIFY_INSPECTION": 42, "VERIFY_TEST": 43, "ELEMENT": 44, "elementName": 45, "elementBody": 46, "TYPE": 47, "type": 48, "DOCREF": 49, "ref": 50, "END_ARROW_L": 51, "relationship": 52, "LINE": 53, "END_ARROW_R": 54, "CONTAINS": 55, "COPIES": 56, "DERIVES": 57, "SATISFIES": 58, "VERIFIES": 59, "REFINES": 60, "TRACES": 61, "unqString": 62, "qString": 63, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" }, + productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 4: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 5: + case 6: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 7: + this.$ = []; + break; + case 13: + yy.addRequirement($$[$0 - 3], $$[$0 - 4]); + break; + case 14: + yy.setNewReqId($$[$0 - 2]); + break; + case 15: + yy.setNewReqText($$[$0 - 2]); + break; + case 16: + yy.setNewReqRisk($$[$0 - 2]); + break; + case 17: + yy.setNewReqVerifyMethod($$[$0 - 2]); + break; + case 20: + this.$ = yy.RequirementType.REQUIREMENT; + break; + case 21: + this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT; + break; + case 22: + this.$ = yy.RequirementType.INTERFACE_REQUIREMENT; + break; + case 23: + this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT; + break; + case 24: + this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT; + break; + case 25: + this.$ = yy.RequirementType.DESIGN_CONSTRAINT; + break; + case 26: + this.$ = yy.RiskLevel.LOW_RISK; + break; + case 27: + this.$ = yy.RiskLevel.MED_RISK; + break; + case 28: + this.$ = yy.RiskLevel.HIGH_RISK; + break; + case 29: + this.$ = yy.VerifyType.VERIFY_ANALYSIS; + break; + case 30: + this.$ = yy.VerifyType.VERIFY_DEMONSTRATION; + break; + case 31: + this.$ = yy.VerifyType.VERIFY_INSPECTION; + break; + case 32: + this.$ = yy.VerifyType.VERIFY_TEST; + break; + case 33: + yy.addElement($$[$0 - 3]); + break; + case 34: + yy.setNewElementType($$[$0 - 2]); + break; + case 35: + yy.setNewElementDocRef($$[$0 - 2]); + break; + case 38: + yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 39: + yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 40: + this.$ = yy.Relationships.CONTAINS; + break; + case 41: + this.$ = yy.Relationships.COPIES; + break; + case 42: + this.$ = yy.Relationships.DERIVES; + break; + case 43: + this.$ = yy.Relationships.SATISFIES; + break; + case 44: + this.$ = yy.Relationships.VERIFIES; + break; + case 45: + this.$ = yy.Relationships.REFINES; + break; + case 46: + this.$ = yy.Relationships.TRACES; + break; + } + }, + table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])], + defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return "title"; + case 1: + this.begin("acc_title"); + return 9; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 11; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + return 5; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + return 8; + case 13: + return 6; + case 14: + return 19; + case 15: + return 30; + case 16: + return 22; + case 17: + return 21; + case 18: + return 24; + case 19: + return 26; + case 20: + return 28; + case 21: + return 31; + case 22: + return 32; + case 23: + return 33; + case 24: + return 34; + case 25: + return 35; + case 26: + return 36; + case 27: + return 37; + case 28: + return 38; + case 29: + return 39; + case 30: + return 40; + case 31: + return 41; + case 32: + return 42; + case 33: + return 43; + case 34: + return 44; + case 35: + return 55; + case 36: + return 56; + case 37: + return 57; + case 38: + return 58; + case 39: + return 59; + case 40: + return 60; + case 41: + return 61; + case 42: + return 47; + case 43: + return 49; + case 44: + return 51; + case 45: + return 54; + case 46: + return 53; + case 47: + this.begin("string"); + break; + case 48: + this.popState(); + break; + case 49: + return "qString"; + case 50: + yy_.yytext = yy_.yytext.trim(); + return 62; + } + }, + rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [48, 49], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let relations = []; +let latestRequirement = {}; +let requirements = {}; +let latestElement = {}; +let elements = {}; +const RequirementType = { + REQUIREMENT: "Requirement", + FUNCTIONAL_REQUIREMENT: "Functional Requirement", + INTERFACE_REQUIREMENT: "Interface Requirement", + PERFORMANCE_REQUIREMENT: "Performance Requirement", + PHYSICAL_REQUIREMENT: "Physical Requirement", + DESIGN_CONSTRAINT: "Design Constraint" +}; +const RiskLevel = { + LOW_RISK: "Low", + MED_RISK: "Medium", + HIGH_RISK: "High" +}; +const VerifyType = { + VERIFY_ANALYSIS: "Analysis", + VERIFY_DEMONSTRATION: "Demonstration", + VERIFY_INSPECTION: "Inspection", + VERIFY_TEST: "Test" +}; +const Relationships = { + CONTAINS: "contains", + COPIES: "copies", + DERIVES: "derives", + SATISFIES: "satisfies", + VERIFIES: "verifies", + REFINES: "refines", + TRACES: "traces" +}; +const addRequirement = (name, type) => { + if (requirements[name] === void 0) { + requirements[name] = { + name, + type, + id: latestRequirement.id, + text: latestRequirement.text, + risk: latestRequirement.risk, + verifyMethod: latestRequirement.verifyMethod + }; + } + latestRequirement = {}; + return requirements[name]; +}; +const getRequirements = () => requirements; +const setNewReqId = (id) => { + if (latestRequirement !== void 0) { + latestRequirement.id = id; + } +}; +const setNewReqText = (text) => { + if (latestRequirement !== void 0) { + latestRequirement.text = text; + } +}; +const setNewReqRisk = (risk) => { + if (latestRequirement !== void 0) { + latestRequirement.risk = risk; + } +}; +const setNewReqVerifyMethod = (verifyMethod) => { + if (latestRequirement !== void 0) { + latestRequirement.verifyMethod = verifyMethod; + } +}; +const addElement = (name) => { + if (elements[name] === void 0) { + elements[name] = { + name, + type: latestElement.type, + docRef: latestElement.docRef + }; + log.info("Added new requirement: ", name); + } + latestElement = {}; + return elements[name]; +}; +const getElements = () => elements; +const setNewElementType = (type) => { + if (latestElement !== void 0) { + latestElement.type = type; + } +}; +const setNewElementDocRef = (docRef) => { + if (latestElement !== void 0) { + latestElement.docRef = docRef; + } +}; +const addRelationship = (type, src, dst) => { + relations.push({ + type, + src, + dst + }); +}; +const getRelationships = () => relations; +const clear = () => { + relations = []; + latestRequirement = {}; + requirements = {}; + latestElement = {}; + elements = {}; + clear$1(); +}; +const db = { + RequirementType, + RiskLevel, + VerifyType, + Relationships, + getConfig: () => getConfig().req, + addRequirement, + getRequirements, + setNewReqId, + setNewReqText, + setNewReqRisk, + setNewReqVerifyMethod, + setAccTitle, + getAccTitle, + setAccDescription, + getAccDescription, + addElement, + getElements, + setNewElementType, + setNewElementDocRef, + addRelationship, + getRelationships, + clear +}; +const getStyles = (options) => ` + + marker { + fill: ${options.relationColor}; + stroke: ${options.relationColor}; + } + + marker.cross { + stroke: ${options.lineColor}; + } + + svg { + font-family: ${options.fontFamily}; + font-size: ${options.fontSize}; + } + + .reqBox { + fill: ${options.requirementBackground}; + fill-opacity: 1.0; + stroke: ${options.requirementBorderColor}; + stroke-width: ${options.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${options.requirementTextColor}; + } + .reqLabelBox { + fill: ${options.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${options.requirementBorderColor}; + stroke-width: ${options.requirementBorderSize}; + } + .relationshipLine { + stroke: ${options.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${options.relationLabelColor}; + } + +`; +const styles = getStyles; +const ReqMarkers = { + CONTAINS: "contains", + ARROW: "arrow" +}; +const insertLineEndings = (parentNode, conf2) => { + let containsNode = parentNode.append("defs").append("marker").attr("id", ReqMarkers.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", conf2.line_height / 2).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("g"); + containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none"); + containsNode.append("line").attr("x1", 0).attr("x2", conf2.line_height).attr("y1", conf2.line_height / 2).attr("y2", conf2.line_height / 2).attr("stroke-width", 1); + containsNode.append("line").attr("y1", 0).attr("y2", conf2.line_height).attr("x1", conf2.line_height / 2).attr("x2", conf2.line_height / 2).attr("stroke-width", 1); + parentNode.append("defs").append("marker").attr("id", ReqMarkers.ARROW + "_line_ending").attr("refX", conf2.line_height).attr("refY", 0.5 * conf2.line_height).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("path").attr( + "d", + `M0,0 + L${conf2.line_height},${conf2.line_height / 2} + M${conf2.line_height},${conf2.line_height / 2} + L0,${conf2.line_height}` + ).attr("stroke-width", 1); +}; +const markers = { + ReqMarkers, + insertLineEndings +}; +let conf = {}; +let relCnt = 0; +const newRectNode = (parentNode, id) => { + return parentNode.insert("rect", "#" + id).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", conf.rect_min_width + "px").attr("height", conf.rect_min_height + "px"); +}; +const newTitleNode = (parentNode, id, txts) => { + let x = conf.rect_min_width / 2; + let title = parentNode.append("text").attr("class", "req reqLabel reqTitle").attr("id", id).attr("x", x).attr("y", conf.rect_padding).attr("dominant-baseline", "hanging"); + let i = 0; + txts.forEach((textStr) => { + if (i == 0) { + title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", 0).text(textStr); + } else { + title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", conf.line_height * 0.75).text(textStr); + } + i++; + }); + let yPadding = 1.5 * conf.rect_padding; + let linePadding = i * conf.line_height * 0.75; + let totalY = yPadding + linePadding; + parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf.rect_min_width).attr("y1", totalY).attr("y2", totalY); + return { + titleNode: title, + y: totalY + }; +}; +const newBodyNode = (parentNode, id, txts, yStart) => { + let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id).attr("x", conf.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging"); + let currentRow = 0; + const charLimit = 30; + let wrappedTxts = []; + txts.forEach((textStr) => { + let currentTextLen = textStr.length; + while (currentTextLen > charLimit && currentRow < 3) { + let firstPart = textStr.substring(0, charLimit); + textStr = textStr.substring(charLimit, textStr.length); + currentTextLen = textStr.length; + wrappedTxts[wrappedTxts.length] = firstPart; + currentRow++; + } + if (currentRow == 3) { + let lastStr = wrappedTxts[wrappedTxts.length - 1]; + wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "..."; + } else { + wrappedTxts[wrappedTxts.length] = textStr; + } + currentRow = 0; + }); + wrappedTxts.forEach((textStr) => { + body.append("tspan").attr("x", conf.rect_padding).attr("dy", conf.line_height).text(textStr); + }); + return body; +}; +const addEdgeLabel = (parentNode, svgPath, conf2, txt) => { + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt; + relCnt++; + const labelNode = parentNode.append("text").attr("class", "req relationshipLabel").attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(txt); + const labelBBox = labelNode.node().getBBox(); + parentNode.insert("rect", "#" + labelId).attr("class", "req reqLabelBox").attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height).attr("fill", "white").attr("fill-opacity", "85%"); +}; +const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { + const edge = g.edge(elementString(rel.src), elementString(rel.dst)); + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }); + const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none"); + if (rel.type == diagObj.db.Relationships.CONTAINS) { + svgPath.attr( + "marker-start", + "url(" + common.getUrl(conf.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)" + ); + } else { + svgPath.attr("stroke-dasharray", "10,7"); + svgPath.attr( + "marker-end", + "url(" + common.getUrl(conf.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)" + ); + } + addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`); + return; +}; +const drawReqs = (reqs, graph, svgNode) => { + Object.keys(reqs).forEach((reqName) => { + let req = reqs[reqName]; + reqName = elementString(reqName); + log.info("Added new requirement: ", reqName); + const groupNode = svgNode.append("g").attr("id", reqName); + const textId = "req-" + reqName; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [ + `<<${req.type}>>`, + `${req.name}` + ]); + newBodyNode( + groupNode, + reqName + "_body", + [ + `Id: ${req.id}`, + `Text: ${req.text}`, + `Risk: ${req.risk}`, + `Verification: ${req.verifyMethod}` + ], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(reqName, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: reqName + }); + }); +}; +const drawElements = (els, graph, svgNode) => { + Object.keys(els).forEach((elName) => { + let el = els[elName]; + const id = elementString(elName); + const groupNode = svgNode.append("g").attr("id", id); + const textId = "element-" + id; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<>`, `${elName}`]); + newBodyNode( + groupNode, + textId + "_body", + [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(id, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id + }); + }); +}; +const addRelationships = (relationships, g) => { + relationships.forEach(function(r) { + let src = elementString(r.src); + let dst = elementString(r.dst); + g.setEdge(src, dst, { relationship: r }); + }); + return relationships; +}; +const adjustEntities = function(svgNode, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode.select("#" + v); + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); + return; +}; +const elementString = (str) => { + return str.replace(/\s/g, "").replace(/\./g, "_"); +}; +const draw = (text, id, _version, diagObj) => { + conf = getConfig().requirement; + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = root.select(`[id='${id}']`); + markers.insertLineEndings(svg, conf); + const g = new graphlib.Graph({ + multigraph: false, + compound: false, + directed: true + }).setGraph({ + rankdir: conf.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let requirements2 = diagObj.db.getRequirements(); + let elements2 = diagObj.db.getElements(); + let relationships = diagObj.db.getRelationships(); + drawReqs(requirements2, g, svg); + drawElements(elements2, g, svg); + addRelationships(relationships, g); + layout(g); + adjustEntities(svg, g); + relationships.forEach(function(rel) { + drawRelationshipFromLayout(svg, rel, g, id, diagObj); + }); + const padding = conf.rect_padding; + const svgBounds = svg.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + configureSvgSize(svg, height, width, conf.useMaxWidth); + svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); +}; +const renderer = { + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/sankeyDiagram-6de1f9fe.js b/webroot/js/node_modules/mermaid/dist/sankeyDiagram-6de1f9fe.js new file mode 100644 index 0000000..8ba9151 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/sankeyDiagram-6de1f9fe.js @@ -0,0 +1,660 @@ +import { c as getConfig, g as getAccTitle, s as setAccTitle, a as getAccDescription, b as setAccDescription, r as getDiagramTitle, q as setDiagramTitle, t as clear$1, e as common, I as defaultConfig, i as configureSvgSize } from "./mermaid-0d192ec3.js"; +import { select, scaleOrdinal, schemeTableau10 } from "d3"; +import { sankey, sankeyLinkHorizontal, sankeyLeft, sankeyRight, sankeyCenter, sankeyJustify } from "d3-sankey"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" }, + productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 7: + const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"')); + const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"')); + const value = parseFloat($$[$0].trim()); + yy.addLink(source, target, value); + break; + case 8: + case 9: + case 11: + this.$ = $$[$0]; + break; + case 10: + this.$ = $$[$0 - 1]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])], + defaultActions: { 11: [2, 1], 12: [2, 5] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "easy_keword_rules": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.pushState("csv"); + return 4; + case 1: + return 10; + case 2: + return 5; + case 3: + return 12; + case 4: + this.pushState("escaped_text"); + return 18; + case 5: + return 20; + case 6: + this.popState("escaped_text"); + return 18; + case 7: + return 19; + } + }, + rules: [/^(?:sankey-beta\b)/, /^(?:$)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:(\u002C))/, /^(?:(\u0022))/, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/, /^(?:(\u0022)(?!(\u0022)))/, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/], + conditions: { "csv": { "rules": [1, 2, 3, 4, 5, 6, 7], "inclusive": false }, "escaped_text": { "rules": [6, 7], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let links = []; +let nodes = []; +let nodesMap = {}; +const clear = () => { + links = []; + nodes = []; + nodesMap = {}; + clear$1(); +}; +class SankeyLink { + constructor(source, target, value = 0) { + this.source = source; + this.target = target; + this.value = value; + } +} +const addLink = (source, target, value) => { + links.push(new SankeyLink(source, target, value)); +}; +class SankeyNode { + constructor(ID) { + this.ID = ID; + } +} +const findOrCreateNode = (ID) => { + ID = common.sanitizeText(ID, getConfig()); + if (!nodesMap[ID]) { + nodesMap[ID] = new SankeyNode(ID); + nodes.push(nodesMap[ID]); + } + return nodesMap[ID]; +}; +const getNodes = () => nodes; +const getLinks = () => links; +const getGraph = () => ({ + nodes: nodes.map((node) => ({ id: node.ID })), + links: links.map((link) => ({ + source: link.source.ID, + target: link.target.ID, + value: link.value + })) +}); +const db = { + nodesMap, + getConfig: () => getConfig().sankey, + getNodes, + getLinks, + getGraph, + addLink, + findOrCreateNode, + getAccTitle, + setAccTitle, + getAccDescription, + setAccDescription, + getDiagramTitle, + setDiagramTitle, + clear +}; +const _Uid = class { + static next(name) { + return new _Uid(name + ++_Uid.count); + } + constructor(id) { + this.id = id; + this.href = `#${id}`; + } + toString() { + return "url(" + this.href + ")"; + } +}; +let Uid = _Uid; +Uid.count = 0; +const alignmentsMap = { + left: sankeyLeft, + right: sankeyRight, + center: sankeyCenter, + justify: sankeyJustify +}; +const draw = function(text, id, _version, diagObj) { + const { securityLevel, sankey: conf } = getConfig(); + const defaultSankeyConfig = defaultConfig.sankey; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select(`[id="${id}"]`); + const width = (conf == null ? void 0 : conf.width) ?? defaultSankeyConfig.width; + const height = (conf == null ? void 0 : conf.height) ?? defaultSankeyConfig.width; + const useMaxWidth = (conf == null ? void 0 : conf.useMaxWidth) ?? defaultSankeyConfig.useMaxWidth; + const nodeAlignment = (conf == null ? void 0 : conf.nodeAlignment) ?? defaultSankeyConfig.nodeAlignment; + const prefix = (conf == null ? void 0 : conf.prefix) ?? defaultSankeyConfig.prefix; + const suffix = (conf == null ? void 0 : conf.suffix) ?? defaultSankeyConfig.suffix; + const showValues = (conf == null ? void 0 : conf.showValues) ?? defaultSankeyConfig.showValues; + configureSvgSize(svg, height, width, useMaxWidth); + const graph = diagObj.db.getGraph(); + const nodeAlign = alignmentsMap[nodeAlignment]; + const nodeWidth = 10; + const sankey$1 = sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([ + [0, 0], + [width, height] + ]); + sankey$1(graph); + const colorScheme = scaleOrdinal(schemeTableau10); + svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) { + return "translate(" + d.x0 + "," + d.y0 + ")"; + }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => { + return d.y1 - d.y0; + }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id)); + const getText = ({ id: id2, value }) => { + if (!showValues) { + return id2; + } + return `${id2} +${prefix}${Math.round(value * 100) / 100}${suffix}`; + }; + svg.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width / 2 ? "start" : "end").text(getText); + const link = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"); + const linkColor = (conf == null ? void 0 : conf.linkColor) || "gradient"; + if (linkColor === "gradient") { + const gradient = link.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0); + gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id)); + gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id)); + } + let coloring; + switch (linkColor) { + case "gradient": + coloring = (d) => d.uid; + break; + case "source": + coloring = (d) => colorScheme(d.source.id); + break; + case "target": + coloring = (d) => colorScheme(d.target.id); + break; + default: + coloring = linkColor; + } + link.append("path").attr("d", sankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width)); +}; +const renderer = { + draw +}; +const prepareTextForParsing = (text) => { + const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(); + return textToParse; +}; +const originalParse = parser$1.parse.bind(parser$1); +parser$1.parse = (text) => originalParse(prepareTextForParsing(text)); +const diagram = { + parser: parser$1, + db, + renderer +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/sankeyDiagram-73d1d724.js b/webroot/js/node_modules/mermaid/dist/sankeyDiagram-73d1d724.js new file mode 100644 index 0000000..62da8a4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/sankeyDiagram-73d1d724.js @@ -0,0 +1,1204 @@ +import { c as getConfig, g as getAccTitle, s as setAccTitle, a as getAccDescription, b as setAccDescription, D as getDiagramTitle, B as setDiagramTitle, E as clear$1, f as common, aQ as defaultConfig, j as d3select, k as configureSvgSize } from "./mermaid-491db2d9.js"; +import { o as ordinal } from "./ordinal-475e0c0c.js"; +import "./init-cc95ec8e.js"; +function colors(specifier) { + var n = specifier.length / 6 | 0, colors2 = new Array(n), i = 0; + while (i < n) + colors2[i] = "#" + specifier.slice(i * 6, ++i * 6); + return colors2; +} +const d3schemeTableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"); +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" }, + productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 7: + const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"')); + const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"')); + const value2 = parseFloat($$[$0].trim()); + yy.addLink(source, target, value2); + break; + case 8: + case 9: + case 11: + this.$ = $$[$0]; + break; + case 10: + this.$ = $$[$0 - 1]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])], + defaultActions: { 11: [2, 1], 12: [2, 5] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "easy_keword_rules": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.pushState("csv"); + return 4; + case 1: + return 10; + case 2: + return 5; + case 3: + return 12; + case 4: + this.pushState("escaped_text"); + return 18; + case 5: + return 20; + case 6: + this.popState("escaped_text"); + return 18; + case 7: + return 19; + } + }, + rules: [/^(?:sankey-beta\b)/, /^(?:$)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:(\u002C))/, /^(?:(\u0022))/, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/, /^(?:(\u0022)(?!(\u0022)))/, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/], + conditions: { "csv": { "rules": [1, 2, 3, 4, 5, 6, 7], "inclusive": false }, "escaped_text": { "rules": [6, 7], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let links = []; +let nodes = []; +let nodesMap = {}; +const clear = () => { + links = []; + nodes = []; + nodesMap = {}; + clear$1(); +}; +class SankeyLink { + constructor(source, target, value2 = 0) { + this.source = source; + this.target = target; + this.value = value2; + } +} +const addLink = (source, target, value2) => { + links.push(new SankeyLink(source, target, value2)); +}; +class SankeyNode { + constructor(ID) { + this.ID = ID; + } +} +const findOrCreateNode = (ID) => { + ID = common.sanitizeText(ID, getConfig()); + if (!nodesMap[ID]) { + nodesMap[ID] = new SankeyNode(ID); + nodes.push(nodesMap[ID]); + } + return nodesMap[ID]; +}; +const getNodes = () => nodes; +const getLinks = () => links; +const getGraph = () => ({ + nodes: nodes.map((node) => ({ id: node.ID })), + links: links.map((link2) => ({ + source: link2.source.ID, + target: link2.target.ID, + value: link2.value + })) +}); +const db = { + nodesMap, + getConfig: () => getConfig().sankey, + getNodes, + getLinks, + getGraph, + addLink, + findOrCreateNode, + getAccTitle, + setAccTitle, + getAccDescription, + setAccDescription, + getDiagramTitle, + setDiagramTitle, + clear +}; +function max(values, valueof) { + let max2; + if (valueof === void 0) { + for (const value2 of values) { + if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) { + max2 = value2; + } + } + } else { + let index = -1; + for (let value2 of values) { + if ((value2 = valueof(value2, ++index, values)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) { + max2 = value2; + } + } + } + return max2; +} +function min(values, valueof) { + let min2; + if (valueof === void 0) { + for (const value2 of values) { + if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) { + min2 = value2; + } + } + } else { + let index = -1; + for (let value2 of values) { + if ((value2 = valueof(value2, ++index, values)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) { + min2 = value2; + } + } + } + return min2; +} +function sum(values, valueof) { + let sum2 = 0; + if (valueof === void 0) { + for (let value2 of values) { + if (value2 = +value2) { + sum2 += value2; + } + } + } else { + let index = -1; + for (let value2 of values) { + if (value2 = +valueof(value2, ++index, values)) { + sum2 += value2; + } + } + } + return sum2; +} +function targetDepth(d) { + return d.target.depth; +} +function left(node) { + return node.depth; +} +function right(node, n) { + return n - 1 - node.height; +} +function justify(node, n) { + return node.sourceLinks.length ? node.depth : n - 1; +} +function center(node) { + return node.targetLinks.length ? node.depth : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 : 0; +} +function constant$1(x2) { + return function() { + return x2; + }; +} +function ascendingSourceBreadth(a, b) { + return ascendingBreadth(a.source, b.source) || a.index - b.index; +} +function ascendingTargetBreadth(a, b) { + return ascendingBreadth(a.target, b.target) || a.index - b.index; +} +function ascendingBreadth(a, b) { + return a.y0 - b.y0; +} +function value(d) { + return d.value; +} +function defaultId(d) { + return d.index; +} +function defaultNodes(graph) { + return graph.nodes; +} +function defaultLinks(graph) { + return graph.links; +} +function find(nodeById, id) { + const node = nodeById.get(id); + if (!node) + throw new Error("missing: " + id); + return node; +} +function computeLinkBreadths({ nodes: nodes2 }) { + for (const node of nodes2) { + let y0 = node.y0; + let y1 = y0; + for (const link2 of node.sourceLinks) { + link2.y0 = y0 + link2.width / 2; + y0 += link2.width; + } + for (const link2 of node.targetLinks) { + link2.y1 = y1 + link2.width / 2; + y1 += link2.width; + } + } +} +function Sankey() { + let x0 = 0, y0 = 0, x1 = 1, y1 = 1; + let dx = 24; + let dy = 8, py; + let id = defaultId; + let align = justify; + let sort; + let linkSort; + let nodes2 = defaultNodes; + let links2 = defaultLinks; + let iterations = 6; + function sankey() { + const graph = { nodes: nodes2.apply(null, arguments), links: links2.apply(null, arguments) }; + computeNodeLinks(graph); + computeNodeValues(graph); + computeNodeDepths(graph); + computeNodeHeights(graph); + computeNodeBreadths(graph); + computeLinkBreadths(graph); + return graph; + } + sankey.update = function(graph) { + computeLinkBreadths(graph); + return graph; + }; + sankey.nodeId = function(_) { + return arguments.length ? (id = typeof _ === "function" ? _ : constant$1(_), sankey) : id; + }; + sankey.nodeAlign = function(_) { + return arguments.length ? (align = typeof _ === "function" ? _ : constant$1(_), sankey) : align; + }; + sankey.nodeSort = function(_) { + return arguments.length ? (sort = _, sankey) : sort; + }; + sankey.nodeWidth = function(_) { + return arguments.length ? (dx = +_, sankey) : dx; + }; + sankey.nodePadding = function(_) { + return arguments.length ? (dy = py = +_, sankey) : dy; + }; + sankey.nodes = function(_) { + return arguments.length ? (nodes2 = typeof _ === "function" ? _ : constant$1(_), sankey) : nodes2; + }; + sankey.links = function(_) { + return arguments.length ? (links2 = typeof _ === "function" ? _ : constant$1(_), sankey) : links2; + }; + sankey.linkSort = function(_) { + return arguments.length ? (linkSort = _, sankey) : linkSort; + }; + sankey.size = function(_) { + return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0]; + }; + sankey.extent = function(_) { + return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]]; + }; + sankey.iterations = function(_) { + return arguments.length ? (iterations = +_, sankey) : iterations; + }; + function computeNodeLinks({ nodes: nodes3, links: links3 }) { + for (const [i, node] of nodes3.entries()) { + node.index = i; + node.sourceLinks = []; + node.targetLinks = []; + } + const nodeById = new Map(nodes3.map((d, i) => [id(d, i, nodes3), d])); + for (const [i, link2] of links3.entries()) { + link2.index = i; + let { source, target } = link2; + if (typeof source !== "object") + source = link2.source = find(nodeById, source); + if (typeof target !== "object") + target = link2.target = find(nodeById, target); + source.sourceLinks.push(link2); + target.targetLinks.push(link2); + } + if (linkSort != null) { + for (const { sourceLinks, targetLinks } of nodes3) { + sourceLinks.sort(linkSort); + targetLinks.sort(linkSort); + } + } + } + function computeNodeValues({ nodes: nodes3 }) { + for (const node of nodes3) { + node.value = node.fixedValue === void 0 ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value)) : node.fixedValue; + } + } + function computeNodeDepths({ nodes: nodes3 }) { + const n = nodes3.length; + let current = new Set(nodes3); + let next = /* @__PURE__ */ new Set(); + let x2 = 0; + while (current.size) { + for (const node of current) { + node.depth = x2; + for (const { target } of node.sourceLinks) { + next.add(target); + } + } + if (++x2 > n) + throw new Error("circular link"); + current = next; + next = /* @__PURE__ */ new Set(); + } + } + function computeNodeHeights({ nodes: nodes3 }) { + const n = nodes3.length; + let current = new Set(nodes3); + let next = /* @__PURE__ */ new Set(); + let x2 = 0; + while (current.size) { + for (const node of current) { + node.height = x2; + for (const { source } of node.targetLinks) { + next.add(source); + } + } + if (++x2 > n) + throw new Error("circular link"); + current = next; + next = /* @__PURE__ */ new Set(); + } + } + function computeNodeLayers({ nodes: nodes3 }) { + const x2 = max(nodes3, (d) => d.depth) + 1; + const kx = (x1 - x0 - dx) / (x2 - 1); + const columns = new Array(x2); + for (const node of nodes3) { + const i = Math.max(0, Math.min(x2 - 1, Math.floor(align.call(null, node, x2)))); + node.layer = i; + node.x0 = x0 + i * kx; + node.x1 = node.x0 + dx; + if (columns[i]) + columns[i].push(node); + else + columns[i] = [node]; + } + if (sort) + for (const column of columns) { + column.sort(sort); + } + return columns; + } + function initializeNodeBreadths(columns) { + const ky = min(columns, (c) => (y1 - y0 - (c.length - 1) * py) / sum(c, value)); + for (const nodes3 of columns) { + let y2 = y0; + for (const node of nodes3) { + node.y0 = y2; + node.y1 = y2 + node.value * ky; + y2 = node.y1 + py; + for (const link2 of node.sourceLinks) { + link2.width = link2.value * ky; + } + } + y2 = (y1 - y2 + py) / (nodes3.length + 1); + for (let i = 0; i < nodes3.length; ++i) { + const node = nodes3[i]; + node.y0 += y2 * (i + 1); + node.y1 += y2 * (i + 1); + } + reorderLinks(nodes3); + } + } + function computeNodeBreadths(graph) { + const columns = computeNodeLayers(graph); + py = Math.min(dy, (y1 - y0) / (max(columns, (c) => c.length) - 1)); + initializeNodeBreadths(columns); + for (let i = 0; i < iterations; ++i) { + const alpha = Math.pow(0.99, i); + const beta = Math.max(1 - alpha, (i + 1) / iterations); + relaxRightToLeft(columns, alpha, beta); + relaxLeftToRight(columns, alpha, beta); + } + } + function relaxLeftToRight(columns, alpha, beta) { + for (let i = 1, n = columns.length; i < n; ++i) { + const column = columns[i]; + for (const target of column) { + let y2 = 0; + let w = 0; + for (const { source, value: value2 } of target.targetLinks) { + let v = value2 * (target.layer - source.layer); + y2 += targetTop(source, target) * v; + w += v; + } + if (!(w > 0)) + continue; + let dy2 = (y2 / w - target.y0) * alpha; + target.y0 += dy2; + target.y1 += dy2; + reorderNodeLinks(target); + } + if (sort === void 0) + column.sort(ascendingBreadth); + resolveCollisions(column, beta); + } + } + function relaxRightToLeft(columns, alpha, beta) { + for (let n = columns.length, i = n - 2; i >= 0; --i) { + const column = columns[i]; + for (const source of column) { + let y2 = 0; + let w = 0; + for (const { target, value: value2 } of source.sourceLinks) { + let v = value2 * (target.layer - source.layer); + y2 += sourceTop(source, target) * v; + w += v; + } + if (!(w > 0)) + continue; + let dy2 = (y2 / w - source.y0) * alpha; + source.y0 += dy2; + source.y1 += dy2; + reorderNodeLinks(source); + } + if (sort === void 0) + column.sort(ascendingBreadth); + resolveCollisions(column, beta); + } + } + function resolveCollisions(nodes3, alpha) { + const i = nodes3.length >> 1; + const subject = nodes3[i]; + resolveCollisionsBottomToTop(nodes3, subject.y0 - py, i - 1, alpha); + resolveCollisionsTopToBottom(nodes3, subject.y1 + py, i + 1, alpha); + resolveCollisionsBottomToTop(nodes3, y1, nodes3.length - 1, alpha); + resolveCollisionsTopToBottom(nodes3, y0, 0, alpha); + } + function resolveCollisionsTopToBottom(nodes3, y2, i, alpha) { + for (; i < nodes3.length; ++i) { + const node = nodes3[i]; + const dy2 = (y2 - node.y0) * alpha; + if (dy2 > 1e-6) + node.y0 += dy2, node.y1 += dy2; + y2 = node.y1 + py; + } + } + function resolveCollisionsBottomToTop(nodes3, y2, i, alpha) { + for (; i >= 0; --i) { + const node = nodes3[i]; + const dy2 = (node.y1 - y2) * alpha; + if (dy2 > 1e-6) + node.y0 -= dy2, node.y1 -= dy2; + y2 = node.y0 - py; + } + } + function reorderNodeLinks({ sourceLinks, targetLinks }) { + if (linkSort === void 0) { + for (const { source: { sourceLinks: sourceLinks2 } } of targetLinks) { + sourceLinks2.sort(ascendingTargetBreadth); + } + for (const { target: { targetLinks: targetLinks2 } } of sourceLinks) { + targetLinks2.sort(ascendingSourceBreadth); + } + } + } + function reorderLinks(nodes3) { + if (linkSort === void 0) { + for (const { sourceLinks, targetLinks } of nodes3) { + sourceLinks.sort(ascendingTargetBreadth); + targetLinks.sort(ascendingSourceBreadth); + } + } + } + function targetTop(source, target) { + let y2 = source.y0 - (source.sourceLinks.length - 1) * py / 2; + for (const { target: node, width } of source.sourceLinks) { + if (node === target) + break; + y2 += width + py; + } + for (const { source: node, width } of target.targetLinks) { + if (node === source) + break; + y2 -= width; + } + return y2; + } + function sourceTop(source, target) { + let y2 = target.y0 - (target.targetLinks.length - 1) * py / 2; + for (const { source: node, width } of target.targetLinks) { + if (node === source) + break; + y2 += width + py; + } + for (const { target: node, width } of source.sourceLinks) { + if (node === target) + break; + y2 -= width; + } + return y2; + } + return sankey; +} +var pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon; +function Path() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; + this._ = ""; +} +function path() { + return new Path(); +} +Path.prototype = path.prototype = { + constructor: Path, + moveTo: function(x2, y2) { + this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x2, y2) { + this._ += "L" + (this._x1 = +x2) + "," + (this._y1 = +y2); + }, + quadraticCurveTo: function(x1, y1, x2, y2) { + this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x2) + "," + (this._y1 = +y2); + }, + bezierCurveTo: function(x1, y1, x2, y2, x3, y3) { + this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x3) + "," + (this._y1 = +y3); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } else if (!(l01_2 > epsilon)) + ; + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } else { + var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21; + if (Math.abs(t01 - 1) > epsilon) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); + } + this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x2, y2, r, a0, a1, ccw) { + x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw; + var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0; + if (r < 0) + throw new Error("negative radius: " + r); + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._ += "L" + x0 + "," + y0; + } + if (!r) + return; + if (da < 0) + da = da % tau + tau; + if (da > tauEpsilon) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x2 - dx) + "," + (y2 - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } else if (da > epsilon) { + this._ += "A" + r + "," + r + ",0," + +(da >= pi) + "," + cw + "," + (this._x1 = x2 + r * Math.cos(a1)) + "," + (this._y1 = y2 + r * Math.sin(a1)); + } + }, + rect: function(x2, y2, w, h) { + this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2) + "h" + +w + "v" + +h + "h" + -w + "Z"; + }, + toString: function() { + return this._; + } +}; +function constant(x2) { + return function constant2() { + return x2; + }; +} +function x(p) { + return p[0]; +} +function y(p) { + return p[1]; +} +var slice = Array.prototype.slice; +function linkSource(d) { + return d.source; +} +function linkTarget(d) { + return d.target; +} +function link(curve) { + var source = linkSource, target = linkTarget, x$1 = x, y$1 = y, context = null; + function link2() { + var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); + if (!context) + context = buffer = path(); + curve(context, +x$1.apply(this, (argv[0] = s, argv)), +y$1.apply(this, argv), +x$1.apply(this, (argv[0] = t, argv)), +y$1.apply(this, argv)); + if (buffer) + return context = null, buffer + "" || null; + } + link2.source = function(_) { + return arguments.length ? (source = _, link2) : source; + }; + link2.target = function(_) { + return arguments.length ? (target = _, link2) : target; + }; + link2.x = function(_) { + return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), link2) : x$1; + }; + link2.y = function(_) { + return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), link2) : y$1; + }; + link2.context = function(_) { + return arguments.length ? (context = _ == null ? null : _, link2) : context; + }; + return link2; +} +function curveHorizontal(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); +} +function linkHorizontal() { + return link(curveHorizontal); +} +function horizontalSource(d) { + return [d.source.x1, d.y0]; +} +function horizontalTarget(d) { + return [d.target.x0, d.y1]; +} +function d3SankeyLinkHorizontal() { + return linkHorizontal().source(horizontalSource).target(horizontalTarget); +} +const _Uid = class { + static next(name) { + return new _Uid(name + ++_Uid.count); + } + constructor(id) { + this.id = id; + this.href = `#${id}`; + } + toString() { + return "url(" + this.href + ")"; + } +}; +let Uid = _Uid; +Uid.count = 0; +const alignmentsMap = { + left, + right, + center, + justify +}; +const draw = function(text, id, _version, diagObj) { + const { securityLevel, sankey: conf } = getConfig(); + const defaultSankeyConfig = defaultConfig.sankey; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : d3select(`[id="${id}"]`); + const width = (conf == null ? void 0 : conf.width) ?? defaultSankeyConfig.width; + const height = (conf == null ? void 0 : conf.height) ?? defaultSankeyConfig.width; + const useMaxWidth = (conf == null ? void 0 : conf.useMaxWidth) ?? defaultSankeyConfig.useMaxWidth; + const nodeAlignment = (conf == null ? void 0 : conf.nodeAlignment) ?? defaultSankeyConfig.nodeAlignment; + const prefix = (conf == null ? void 0 : conf.prefix) ?? defaultSankeyConfig.prefix; + const suffix = (conf == null ? void 0 : conf.suffix) ?? defaultSankeyConfig.suffix; + const showValues = (conf == null ? void 0 : conf.showValues) ?? defaultSankeyConfig.showValues; + configureSvgSize(svg, height, width, useMaxWidth); + const graph = diagObj.db.getGraph(); + const nodeAlign = alignmentsMap[nodeAlignment]; + const nodeWidth = 10; + const sankey = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([ + [0, 0], + [width, height] + ]); + sankey(graph); + const colorScheme = ordinal(d3schemeTableau10); + svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) { + return "translate(" + d.x0 + "," + d.y0 + ")"; + }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => { + return d.y1 - d.y0; + }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id)); + const getText = ({ id: id2, value: value2 }) => { + if (!showValues) { + return id2; + } + return `${id2} +${prefix}${Math.round(value2 * 100) / 100}${suffix}`; + }; + svg.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width / 2 ? "start" : "end").text(getText); + const link2 = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"); + const linkColor = (conf == null ? void 0 : conf.linkColor) || "gradient"; + if (linkColor === "gradient") { + const gradient = link2.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0); + gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id)); + gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id)); + } + let coloring; + switch (linkColor) { + case "gradient": + coloring = (d) => d.uid; + break; + case "source": + coloring = (d) => colorScheme(d.source.id); + break; + case "target": + coloring = (d) => colorScheme(d.target.id); + break; + default: + coloring = linkColor; + } + link2.append("path").attr("d", d3SankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width)); +}; +const renderer = { + draw +}; +const prepareTextForParsing = (text) => { + const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(); + return textToParse; +}; +const originalParse = parser$1.parse.bind(parser$1); +parser$1.parse = (text) => originalParse(prepareTextForParsing(text)); +const diagram = { + parser: parser$1, + db, + renderer +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/sankeyDiagram-f71fea45.js b/webroot/js/node_modules/mermaid/dist/sankeyDiagram-f71fea45.js new file mode 100644 index 0000000..69652a4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/sankeyDiagram-f71fea45.js @@ -0,0 +1,825 @@ +import { c as ot, g as pt, s as mt, a as _t, b as kt, D as xt, B as vt, E as bt, f as wt, aQ as St, j as Y, k as Lt } from "./mermaid-e4a58915.js"; +import { o as Et } from "./ordinal-5695958c.js"; +import "./init-f9637058.js"; +function At(t) { + for (var n = t.length / 6 | 0, i = new Array(n), a = 0; a < n; ) + i[a] = "#" + t.slice(a * 6, ++a * 6); + return i; +} +const Tt = At("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"); +var tt = function() { + var t = function(_, s, o, c) { + for (o = o || {}, c = _.length; c--; o[_[c]] = s) + ; + return o; + }, n = [1, 9], i = [1, 10], a = [1, 5, 10, 12], u = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" }, + productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]], + performAction: function(s, o, c, m, b, d, x) { + var E = d.length - 1; + switch (b) { + case 7: + const L = m.findOrCreateNode(d[E - 4].trim().replaceAll('""', '"')), A = m.findOrCreateNode(d[E - 2].trim().replaceAll('""', '"')), N = parseFloat(d[E].trim()); + m.addLink(L, A, N); + break; + case 8: + case 9: + case 11: + this.$ = d[E]; + break; + case 10: + this.$ = d[E - 1]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: n, 20: i }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(i, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(a, [2, 8]), t(a, [2, 9]), { 19: [1, 16] }, t(a, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(i, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: n, 20: i }, { 15: 18, 16: 7, 17: 8, 18: n, 20: i }, { 18: [1, 19] }, t(i, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: n, 20: i }, t([1, 5, 10], [2, 7])], + defaultActions: { 11: [2, 1], 12: [2, 5] }, + parseError: function(s, o) { + if (o.recoverable) + this.trace(s); + else { + var c = new Error(s); + throw c.hash = o, c; + } + }, + parse: function(s) { + var o = this, c = [0], m = [], b = [null], d = [], x = this.table, E = "", L = 0, A = 0, N = 2, P = 1, z = d.slice.call(arguments, 1), S = Object.create(this.lexer), M = { yy: {} }; + for (var $ in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, $) && (M.yy[$] = this.yy[$]); + S.setInput(s, M.yy), M.yy.lexer = S, M.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {}); + var C = S.yylloc; + d.push(C); + var I = S.options && S.options.ranges; + typeof M.yy.parseError == "function" ? this.parseError = M.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function g() { + var v; + return v = m.pop() || S.lex() || P, typeof v != "number" && (v instanceof Array && (m = v, v = m.pop()), v = o.symbols_[v] || v), v; + } + for (var w, O, T, R, e = {}, f, l, h, r; ; ) { + if (O = c[c.length - 1], this.defaultActions[O] ? T = this.defaultActions[O] : ((w === null || typeof w > "u") && (w = g()), T = x[O] && x[O][w]), typeof T > "u" || !T.length || !T[0]) { + var k = ""; + r = []; + for (f in x[O]) + this.terminals_[f] && f > N && r.push("'" + this.terminals_[f] + "'"); + S.showPosition ? k = "Parse error on line " + (L + 1) + `: +` + S.showPosition() + ` +Expecting ` + r.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : k = "Parse error on line " + (L + 1) + ": Unexpected " + (w == P ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(k, { + text: S.match, + token: this.terminals_[w] || w, + line: S.yylineno, + loc: C, + expected: r + }); + } + if (T[0] instanceof Array && T.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + O + ", token: " + w); + switch (T[0]) { + case 1: + c.push(w), b.push(S.yytext), d.push(S.yylloc), c.push(T[1]), w = null, A = S.yyleng, E = S.yytext, L = S.yylineno, C = S.yylloc; + break; + case 2: + if (l = this.productions_[T[1]][1], e.$ = b[b.length - l], e._$ = { + first_line: d[d.length - (l || 1)].first_line, + last_line: d[d.length - 1].last_line, + first_column: d[d.length - (l || 1)].first_column, + last_column: d[d.length - 1].last_column + }, I && (e._$.range = [ + d[d.length - (l || 1)].range[0], + d[d.length - 1].range[1] + ]), R = this.performAction.apply(e, [ + E, + A, + L, + M.yy, + T[1], + b, + d + ].concat(z)), typeof R < "u") + return R; + l && (c = c.slice(0, -1 * l * 2), b = b.slice(0, -1 * l), d = d.slice(0, -1 * l)), c.push(this.productions_[T[1]][0]), b.push(e.$), d.push(e._$), h = x[c[c.length - 2]][c[c.length - 1]], c.push(h); + break; + case 3: + return !0; + } + } + return !0; + } + }, y = function() { + var _ = { + EOF: 1, + parseError: function(o, c) { + if (this.yy.parser) + this.yy.parser.parseError(o, c); + else + throw new Error(o); + }, + // resets the lexer, sets new input + setInput: function(s, o) { + return this.yy = o || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var s = this._input[0]; + this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s; + var o = s.match(/(?:\r\n?|\n).*/g); + return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s; + }, + // unshifts one char (or a string) into the input + unput: function(s) { + var o = s.length, c = s.split(/(?:\r\n?|\n)/g); + this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o; + var m = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1); + var b = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: c ? (c.length === m.length ? this.yylloc.first_column : 0) + m[m.length - c.length].length - c[0].length : this.yylloc.first_column - o + }, this.options.ranges && (this.yylloc.range = [b[0], b[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(s) { + this.unput(this.match.slice(s)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var s = this.matched.substr(0, this.matched.length - this.match.length); + return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var s = this.match; + return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var s = this.pastInput(), o = new Array(s.length + 1).join("-"); + return s + this.upcomingInput() + ` +` + o + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(s, o) { + var c, m, b; + if (this.options.backtrack_lexer && (b = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (b.yylloc.range = this.yylloc.range.slice(0))), m = s[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length + }, this.yytext += s[0], this.match += s[0], this.matches = s, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(s[0].length), this.matched += s[0], c = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c) + return c; + if (this._backtrack) { + for (var d in b) + this[d] = b[d]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var s, o, c, m; + this._more || (this.yytext = "", this.match = ""); + for (var b = this._currentRules(), d = 0; d < b.length; d++) + if (c = this._input.match(this.rules[b[d]]), c && (!o || c[0].length > o[0].length)) { + if (o = c, m = d, this.options.backtrack_lexer) { + if (s = this.test_match(c, b[d]), s !== !1) + return s; + if (this._backtrack) { + o = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return o ? (s = this.test_match(o, b[m]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var o = this.next(); + return o || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(o) { + this.conditionStack.push(o); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var o = this.conditionStack.length - 1; + return o > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(o) { + return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(o) { + this.begin(o); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { easy_keword_rules: !0 }, + performAction: function(o, c, m, b) { + switch (m) { + case 0: + return this.pushState("csv"), 4; + case 1: + return 10; + case 2: + return 5; + case 3: + return 12; + case 4: + return this.pushState("escaped_text"), 18; + case 5: + return 20; + case 6: + return this.popState("escaped_text"), 18; + case 7: + return 19; + } + }, + rules: [/^(?:sankey-beta\b)/, /^(?:$)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:(\u002C))/, /^(?:(\u0022))/, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/, /^(?:(\u0022)(?!(\u0022)))/, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/], + conditions: { csv: { rules: [1, 2, 3, 4, 5, 6, 7], inclusive: !1 }, escaped_text: { rules: [6, 7], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7], inclusive: !0 } } + }; + return _; + }(); + u.lexer = y; + function p() { + this.yy = {}; + } + return p.prototype = u, u.Parser = p, new p(); +}(); +tt.parser = tt; +const H = tt; +let X = [], q = [], B = {}; +const Mt = () => { + X = [], q = [], B = {}, bt(); +}; +class Nt { + constructor(n, i, a = 0) { + this.source = n, this.target = i, this.value = a; + } +} +const Pt = (t, n, i) => { + X.push(new Nt(t, n, i)); +}; +class Ct { + constructor(n) { + this.ID = n; + } +} +const It = (t) => (t = wt.sanitizeText(t, ot()), B[t] || (B[t] = new Ct(t), q.push(B[t])), B[t]), Ot = () => q, $t = () => X, zt = () => ({ + nodes: q.map((t) => ({ id: t.ID })), + links: X.map((t) => ({ + source: t.source.ID, + target: t.target.ID, + value: t.value + })) +}), jt = { + nodesMap: B, + getConfig: () => ot().sankey, + getNodes: Ot, + getLinks: $t, + getGraph: zt, + addLink: Pt, + findOrCreateNode: It, + getAccTitle: pt, + setAccTitle: mt, + getAccDescription: _t, + setAccDescription: kt, + getDiagramTitle: xt, + setDiagramTitle: vt, + clear: Mt +}; +function at(t, n) { + let i; + if (n === void 0) + for (const a of t) + a != null && (i < a || i === void 0 && a >= a) && (i = a); + else { + let a = -1; + for (let u of t) + (u = n(u, ++a, t)) != null && (i < u || i === void 0 && u >= u) && (i = u); + } + return i; +} +function yt(t, n) { + let i; + if (n === void 0) + for (const a of t) + a != null && (i > a || i === void 0 && a >= a) && (i = a); + else { + let a = -1; + for (let u of t) + (u = n(u, ++a, t)) != null && (i > u || i === void 0 && u >= u) && (i = u); + } + return i; +} +function Z(t, n) { + let i = 0; + if (n === void 0) + for (let a of t) + (a = +a) && (i += a); + else { + let a = -1; + for (let u of t) + (u = +n(u, ++a, t)) && (i += u); + } + return i; +} +function Dt(t) { + return t.target.depth; +} +function Bt(t) { + return t.depth; +} +function Rt(t, n) { + return n - 1 - t.height; +} +function dt(t, n) { + return t.sourceLinks.length ? t.depth : n - 1; +} +function Vt(t) { + return t.targetLinks.length ? t.depth : t.sourceLinks.length ? yt(t.sourceLinks, Dt) - 1 : 0; +} +function G(t) { + return function() { + return t; + }; +} +function lt(t, n) { + return Q(t.source, n.source) || t.index - n.index; +} +function ct(t, n) { + return Q(t.target, n.target) || t.index - n.index; +} +function Q(t, n) { + return t.y0 - n.y0; +} +function J(t) { + return t.value; +} +function Ft(t) { + return t.index; +} +function Ut(t) { + return t.nodes; +} +function Wt(t) { + return t.links; +} +function ut(t, n) { + const i = t.get(n); + if (!i) + throw new Error("missing: " + n); + return i; +} +function ht({ nodes: t }) { + for (const n of t) { + let i = n.y0, a = i; + for (const u of n.sourceLinks) + u.y0 = i + u.width / 2, i += u.width; + for (const u of n.targetLinks) + u.y1 = a + u.width / 2, a += u.width; + } +} +function Yt() { + let t = 0, n = 0, i = 1, a = 1, u = 24, y = 8, p, _ = Ft, s = dt, o, c, m = Ut, b = Wt, d = 6; + function x() { + const e = { nodes: m.apply(null, arguments), links: b.apply(null, arguments) }; + return E(e), L(e), A(e), N(e), S(e), ht(e), e; + } + x.update = function(e) { + return ht(e), e; + }, x.nodeId = function(e) { + return arguments.length ? (_ = typeof e == "function" ? e : G(e), x) : _; + }, x.nodeAlign = function(e) { + return arguments.length ? (s = typeof e == "function" ? e : G(e), x) : s; + }, x.nodeSort = function(e) { + return arguments.length ? (o = e, x) : o; + }, x.nodeWidth = function(e) { + return arguments.length ? (u = +e, x) : u; + }, x.nodePadding = function(e) { + return arguments.length ? (y = p = +e, x) : y; + }, x.nodes = function(e) { + return arguments.length ? (m = typeof e == "function" ? e : G(e), x) : m; + }, x.links = function(e) { + return arguments.length ? (b = typeof e == "function" ? e : G(e), x) : b; + }, x.linkSort = function(e) { + return arguments.length ? (c = e, x) : c; + }, x.size = function(e) { + return arguments.length ? (t = n = 0, i = +e[0], a = +e[1], x) : [i - t, a - n]; + }, x.extent = function(e) { + return arguments.length ? (t = +e[0][0], i = +e[1][0], n = +e[0][1], a = +e[1][1], x) : [[t, n], [i, a]]; + }, x.iterations = function(e) { + return arguments.length ? (d = +e, x) : d; + }; + function E({ nodes: e, links: f }) { + for (const [h, r] of e.entries()) + r.index = h, r.sourceLinks = [], r.targetLinks = []; + const l = new Map(e.map((h, r) => [_(h, r, e), h])); + for (const [h, r] of f.entries()) { + r.index = h; + let { source: k, target: v } = r; + typeof k != "object" && (k = r.source = ut(l, k)), typeof v != "object" && (v = r.target = ut(l, v)), k.sourceLinks.push(r), v.targetLinks.push(r); + } + if (c != null) + for (const { sourceLinks: h, targetLinks: r } of e) + h.sort(c), r.sort(c); + } + function L({ nodes: e }) { + for (const f of e) + f.value = f.fixedValue === void 0 ? Math.max(Z(f.sourceLinks, J), Z(f.targetLinks, J)) : f.fixedValue; + } + function A({ nodes: e }) { + const f = e.length; + let l = new Set(e), h = /* @__PURE__ */ new Set(), r = 0; + for (; l.size; ) { + for (const k of l) { + k.depth = r; + for (const { target: v } of k.sourceLinks) + h.add(v); + } + if (++r > f) + throw new Error("circular link"); + l = h, h = /* @__PURE__ */ new Set(); + } + } + function N({ nodes: e }) { + const f = e.length; + let l = new Set(e), h = /* @__PURE__ */ new Set(), r = 0; + for (; l.size; ) { + for (const k of l) { + k.height = r; + for (const { source: v } of k.targetLinks) + h.add(v); + } + if (++r > f) + throw new Error("circular link"); + l = h, h = /* @__PURE__ */ new Set(); + } + } + function P({ nodes: e }) { + const f = at(e, (r) => r.depth) + 1, l = (i - t - u) / (f - 1), h = new Array(f); + for (const r of e) { + const k = Math.max(0, Math.min(f - 1, Math.floor(s.call(null, r, f)))); + r.layer = k, r.x0 = t + k * l, r.x1 = r.x0 + u, h[k] ? h[k].push(r) : h[k] = [r]; + } + if (o) + for (const r of h) + r.sort(o); + return h; + } + function z(e) { + const f = yt(e, (l) => (a - n - (l.length - 1) * p) / Z(l, J)); + for (const l of e) { + let h = n; + for (const r of l) { + r.y0 = h, r.y1 = h + r.value * f, h = r.y1 + p; + for (const k of r.sourceLinks) + k.width = k.value * f; + } + h = (a - h + p) / (l.length + 1); + for (let r = 0; r < l.length; ++r) { + const k = l[r]; + k.y0 += h * (r + 1), k.y1 += h * (r + 1); + } + O(l); + } + } + function S(e) { + const f = P(e); + p = Math.min(y, (a - n) / (at(f, (l) => l.length) - 1)), z(f); + for (let l = 0; l < d; ++l) { + const h = Math.pow(0.99, l), r = Math.max(1 - h, (l + 1) / d); + $(f, h, r), M(f, h, r); + } + } + function M(e, f, l) { + for (let h = 1, r = e.length; h < r; ++h) { + const k = e[h]; + for (const v of k) { + let V = 0, j = 0; + for (const { source: U, value: K } of v.targetLinks) { + let W = K * (v.layer - U.layer); + V += T(U, v) * W, j += W; + } + if (!(j > 0)) + continue; + let F = (V / j - v.y0) * f; + v.y0 += F, v.y1 += F, w(v); + } + o === void 0 && k.sort(Q), C(k, l); + } + } + function $(e, f, l) { + for (let h = e.length, r = h - 2; r >= 0; --r) { + const k = e[r]; + for (const v of k) { + let V = 0, j = 0; + for (const { target: U, value: K } of v.sourceLinks) { + let W = K * (U.layer - v.layer); + V += R(v, U) * W, j += W; + } + if (!(j > 0)) + continue; + let F = (V / j - v.y0) * f; + v.y0 += F, v.y1 += F, w(v); + } + o === void 0 && k.sort(Q), C(k, l); + } + } + function C(e, f) { + const l = e.length >> 1, h = e[l]; + g(e, h.y0 - p, l - 1, f), I(e, h.y1 + p, l + 1, f), g(e, a, e.length - 1, f), I(e, n, 0, f); + } + function I(e, f, l, h) { + for (; l < e.length; ++l) { + const r = e[l], k = (f - r.y0) * h; + k > 1e-6 && (r.y0 += k, r.y1 += k), f = r.y1 + p; + } + } + function g(e, f, l, h) { + for (; l >= 0; --l) { + const r = e[l], k = (r.y1 - f) * h; + k > 1e-6 && (r.y0 -= k, r.y1 -= k), f = r.y0 - p; + } + } + function w({ sourceLinks: e, targetLinks: f }) { + if (c === void 0) { + for (const { source: { sourceLinks: l } } of f) + l.sort(ct); + for (const { target: { targetLinks: l } } of e) + l.sort(lt); + } + } + function O(e) { + if (c === void 0) + for (const { sourceLinks: f, targetLinks: l } of e) + f.sort(ct), l.sort(lt); + } + function T(e, f) { + let l = e.y0 - (e.sourceLinks.length - 1) * p / 2; + for (const { target: h, width: r } of e.sourceLinks) { + if (h === f) + break; + l += r + p; + } + for (const { source: h, width: r } of f.targetLinks) { + if (h === e) + break; + l -= r; + } + return l; + } + function R(e, f) { + let l = f.y0 - (f.targetLinks.length - 1) * p / 2; + for (const { source: h, width: r } of f.targetLinks) { + if (h === e) + break; + l += r + p; + } + for (const { target: h, width: r } of e.sourceLinks) { + if (h === f) + break; + l -= r; + } + return l; + } + return x; +} +var et = Math.PI, nt = 2 * et, D = 1e-6, Gt = nt - D; +function it() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null, this._ = ""; +} +function gt() { + return new it(); +} +it.prototype = gt.prototype = { + constructor: it, + moveTo: function(t, n) { + this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n); + }, + closePath: function() { + this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z"); + }, + lineTo: function(t, n) { + this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +n); + }, + quadraticCurveTo: function(t, n, i, a) { + this._ += "Q" + +t + "," + +n + "," + (this._x1 = +i) + "," + (this._y1 = +a); + }, + bezierCurveTo: function(t, n, i, a, u, y) { + this._ += "C" + +t + "," + +n + "," + +i + "," + +a + "," + (this._x1 = +u) + "," + (this._y1 = +y); + }, + arcTo: function(t, n, i, a, u) { + t = +t, n = +n, i = +i, a = +a, u = +u; + var y = this._x1, p = this._y1, _ = i - t, s = a - n, o = y - t, c = p - n, m = o * o + c * c; + if (u < 0) + throw new Error("negative radius: " + u); + if (this._x1 === null) + this._ += "M" + (this._x1 = t) + "," + (this._y1 = n); + else if (m > D) + if (!(Math.abs(c * _ - s * o) > D) || !u) + this._ += "L" + (this._x1 = t) + "," + (this._y1 = n); + else { + var b = i - y, d = a - p, x = _ * _ + s * s, E = b * b + d * d, L = Math.sqrt(x), A = Math.sqrt(m), N = u * Math.tan((et - Math.acos((x + m - E) / (2 * L * A))) / 2), P = N / A, z = N / L; + Math.abs(P - 1) > D && (this._ += "L" + (t + P * o) + "," + (n + P * c)), this._ += "A" + u + "," + u + ",0,0," + +(c * b > o * d) + "," + (this._x1 = t + z * _) + "," + (this._y1 = n + z * s); + } + }, + arc: function(t, n, i, a, u, y) { + t = +t, n = +n, i = +i, y = !!y; + var p = i * Math.cos(a), _ = i * Math.sin(a), s = t + p, o = n + _, c = 1 ^ y, m = y ? a - u : u - a; + if (i < 0) + throw new Error("negative radius: " + i); + this._x1 === null ? this._ += "M" + s + "," + o : (Math.abs(this._x1 - s) > D || Math.abs(this._y1 - o) > D) && (this._ += "L" + s + "," + o), i && (m < 0 && (m = m % nt + nt), m > Gt ? this._ += "A" + i + "," + i + ",0,1," + c + "," + (t - p) + "," + (n - _) + "A" + i + "," + i + ",0,1," + c + "," + (this._x1 = s) + "," + (this._y1 = o) : m > D && (this._ += "A" + i + "," + i + ",0," + +(m >= et) + "," + c + "," + (this._x1 = t + i * Math.cos(u)) + "," + (this._y1 = n + i * Math.sin(u)))); + }, + rect: function(t, n, i, a) { + this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n) + "h" + +i + "v" + +a + "h" + -i + "Z"; + }, + toString: function() { + return this._; + } +}; +function ft(t) { + return function() { + return t; + }; +} +function Ht(t) { + return t[0]; +} +function Qt(t) { + return t[1]; +} +var Xt = Array.prototype.slice; +function qt(t) { + return t.source; +} +function Kt(t) { + return t.target; +} +function Zt(t) { + var n = qt, i = Kt, a = Ht, u = Qt, y = null; + function p() { + var _, s = Xt.call(arguments), o = n.apply(this, s), c = i.apply(this, s); + if (y || (y = _ = gt()), t(y, +a.apply(this, (s[0] = o, s)), +u.apply(this, s), +a.apply(this, (s[0] = c, s)), +u.apply(this, s)), _) + return y = null, _ + "" || null; + } + return p.source = function(_) { + return arguments.length ? (n = _, p) : n; + }, p.target = function(_) { + return arguments.length ? (i = _, p) : i; + }, p.x = function(_) { + return arguments.length ? (a = typeof _ == "function" ? _ : ft(+_), p) : a; + }, p.y = function(_) { + return arguments.length ? (u = typeof _ == "function" ? _ : ft(+_), p) : u; + }, p.context = function(_) { + return arguments.length ? (y = _ ?? null, p) : y; + }, p; +} +function Jt(t, n, i, a, u) { + t.moveTo(n, i), t.bezierCurveTo(n = (n + a) / 2, i, n, u, a, u); +} +function te() { + return Zt(Jt); +} +function ee(t) { + return [t.source.x1, t.y0]; +} +function ne(t) { + return [t.target.x0, t.y1]; +} +function ie() { + return te().source(ee).target(ne); +} +const st = class { + static next(t) { + return new st(t + ++st.count); + } + constructor(t) { + this.id = t, this.href = `#${t}`; + } + toString() { + return "url(" + this.href + ")"; + } +}; +let rt = st; +rt.count = 0; +const se = { + left: Bt, + right: Rt, + center: Vt, + justify: dt +}, re = function(t, n, i, a) { + const { securityLevel: u, sankey: y } = ot(), p = St.sankey; + let _; + u === "sandbox" && (_ = Y("#i" + n)); + const s = u === "sandbox" ? Y(_.nodes()[0].contentDocument.body) : Y("body"), o = u === "sandbox" ? s.select(`[id="${n}"]`) : Y(`[id="${n}"]`), c = (y == null ? void 0 : y.width) ?? p.width, m = (y == null ? void 0 : y.height) ?? p.width, b = (y == null ? void 0 : y.useMaxWidth) ?? p.useMaxWidth, d = (y == null ? void 0 : y.nodeAlignment) ?? p.nodeAlignment, x = (y == null ? void 0 : y.prefix) ?? p.prefix, E = (y == null ? void 0 : y.suffix) ?? p.suffix, L = (y == null ? void 0 : y.showValues) ?? p.showValues; + Lt(o, m, c, b); + const A = a.db.getGraph(), N = se[d], P = 10; + Yt().nodeId((g) => g.id).nodeWidth(P).nodePadding(10 + (L ? 15 : 0)).nodeAlign(N).extent([ + [0, 0], + [c, m] + ])(A); + const S = Et(Tt); + o.append("g").attr("class", "nodes").selectAll(".node").data(A.nodes).join("g").attr("class", "node").attr("id", (g) => (g.uid = rt.next("node-")).id).attr("transform", function(g) { + return "translate(" + g.x0 + "," + g.y0 + ")"; + }).attr("x", (g) => g.x0).attr("y", (g) => g.y0).append("rect").attr("height", (g) => g.y1 - g.y0).attr("width", (g) => g.x1 - g.x0).attr("fill", (g) => S(g.id)); + const M = ({ id: g, value: w }) => L ? `${g} +${x}${Math.round(w * 100) / 100}${E}` : g; + o.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(A.nodes).join("text").attr("x", (g) => g.x0 < c / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", `${L ? "0" : "0.35"}em`).attr("text-anchor", (g) => g.x0 < c / 2 ? "start" : "end").text(M); + const $ = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(A.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), C = (y == null ? void 0 : y.linkColor) || "gradient"; + if (C === "gradient") { + const g = $.append("linearGradient").attr("id", (w) => (w.uid = rt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (w) => w.source.x1).attr("x2", (w) => w.target.x0); + g.append("stop").attr("offset", "0%").attr("stop-color", (w) => S(w.source.id)), g.append("stop").attr("offset", "100%").attr("stop-color", (w) => S(w.target.id)); + } + let I; + switch (C) { + case "gradient": + I = (g) => g.uid; + break; + case "source": + I = (g) => S(g.source.id); + break; + case "target": + I = (g) => S(g.target.id); + break; + default: + I = C; + } + $.append("path").attr("d", ie()).attr("stroke", I).attr("stroke-width", (g) => Math.max(1, g.width)); +}, oe = { + draw: re +}, ae = (t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, ` +`).trim(), le = H.parse.bind(H); +H.parse = (t) => le(ae(t)); +const fe = { + parser: H, + db: jt, + renderer: oe +}; +export { + fe as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/sequenceDiagram-a000a341.js b/webroot/js/node_modules/mermaid/dist/sequenceDiagram-a000a341.js new file mode 100644 index 0000000..e9b0a25 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/sequenceDiagram-a000a341.js @@ -0,0 +1,2192 @@ +import { g as Le, D as Ie, B as Ae, c as dt, s as ae, b as Ne, a as ve, E as Se, l as U, d as Mt, e as re, f as w, Z as oe, a5 as Me, a6 as Re, h as De, j as St, k as Ve, z as O } from "./mermaid-e4a58915.js"; +import { d as Ce, a as Oe, b as Be, c as Ye, e as Gt, g as Rt } from "./svgDrawCommon-1021982e.js"; +var qt = function() { + var t = function(ht, m, P, L) { + for (P = P || {}, L = ht.length; L--; P[ht[L]] = m) + ; + return P; + }, e = [1, 2], o = [1, 3], n = [1, 4], i = [2, 4], s = [1, 9], c = [1, 11], h = [1, 13], u = [1, 14], a = [1, 16], x = [1, 17], E = [1, 18], p = [1, 24], g = [1, 25], b = [1, 26], k = [1, 27], A = [1, 28], R = [1, 29], v = [1, 30], F = [1, 31], S = [1, 32], tt = [1, 33], W = [1, 34], K = [1, 35], Z = [1, 36], q = [1, 37], Y = [1, 38], C = [1, 39], G = [1, 41], z = [1, 42], X = [1, 43], Q = [1, 44], j = [1, 45], y = [1, 46], _ = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], I = [4, 5, 16, 50, 52, 53], ut = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], et = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], N = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $t = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], lt = [68, 69, 70], st = [1, 120], Ct = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, SD: 6, document: 7, line: 8, statement: 9, box_section: 10, box_line: 11, participant_statement: 12, create: 13, box: 14, restOfLine: 15, end: 16, signal: 17, autonumber: 18, NUM: 19, off: 20, activate: 21, actor: 22, deactivate: 23, note_statement: 24, links_statement: 25, link_statement: 26, properties_statement: 27, details_statement: 28, title: 29, legacy_title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, loop: 36, rect: 37, opt: 38, alt: 39, else_sections: 40, par: 41, par_sections: 42, par_over: 43, critical: 44, option_sections: 45, break: 46, option: 47, and: 48, else: 49, participant: 50, AS: 51, participant_actor: 52, destroy: 53, note: 54, placement: 55, text2: 56, over: 57, actor_pair: 58, links: 59, link: 60, properties: 61, details: 62, spaceList: 63, ",": 64, left_of: 65, right_of: 66, signaltype: 67, "+": 68, "-": 69, ACTOR: 70, SOLID_OPEN_ARROW: 71, DOTTED_OPEN_ARROW: 72, SOLID_ARROW: 73, DOTTED_ARROW: 74, SOLID_CROSS: 75, DOTTED_CROSS: 76, SOLID_POINT: 77, DOTTED_POINT: 78, TXT: 79, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]], + performAction: function(m, P, L, T, M, l, _t) { + var d = l.length - 1; + switch (M) { + case 3: + return T.apply(l[d]), l[d]; + case 4: + case 9: + this.$ = []; + break; + case 5: + case 10: + l[d - 1].push(l[d]), this.$ = l[d - 1]; + break; + case 6: + case 7: + case 11: + case 12: + this.$ = l[d]; + break; + case 8: + case 13: + this.$ = []; + break; + case 15: + l[d].type = "createParticipant", this.$ = l[d]; + break; + case 16: + l[d - 1].unshift({ type: "boxStart", boxData: T.parseBoxData(l[d - 2]) }), l[d - 1].push({ type: "boxEnd", boxText: l[d - 2] }), this.$ = l[d - 1]; + break; + case 18: + this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[d - 2]), sequenceIndexStep: Number(l[d - 1]), sequenceVisible: !0, signalType: T.LINETYPE.AUTONUMBER }; + break; + case 19: + this.$ = { type: "sequenceIndex", sequenceIndex: Number(l[d - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: T.LINETYPE.AUTONUMBER }; + break; + case 20: + this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: T.LINETYPE.AUTONUMBER }; + break; + case 21: + this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: T.LINETYPE.AUTONUMBER }; + break; + case 22: + this.$ = { type: "activeStart", signalType: T.LINETYPE.ACTIVE_START, actor: l[d - 1] }; + break; + case 23: + this.$ = { type: "activeEnd", signalType: T.LINETYPE.ACTIVE_END, actor: l[d - 1] }; + break; + case 29: + T.setDiagramTitle(l[d].substring(6)), this.$ = l[d].substring(6); + break; + case 30: + T.setDiagramTitle(l[d].substring(7)), this.$ = l[d].substring(7); + break; + case 31: + this.$ = l[d].trim(), T.setAccTitle(this.$); + break; + case 32: + case 33: + this.$ = l[d].trim(), T.setAccDescription(this.$); + break; + case 34: + l[d - 1].unshift({ type: "loopStart", loopText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.LOOP_START }), l[d - 1].push({ type: "loopEnd", loopText: l[d - 2], signalType: T.LINETYPE.LOOP_END }), this.$ = l[d - 1]; + break; + case 35: + l[d - 1].unshift({ type: "rectStart", color: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.RECT_START }), l[d - 1].push({ type: "rectEnd", color: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.RECT_END }), this.$ = l[d - 1]; + break; + case 36: + l[d - 1].unshift({ type: "optStart", optText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.OPT_START }), l[d - 1].push({ type: "optEnd", optText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.OPT_END }), this.$ = l[d - 1]; + break; + case 37: + l[d - 1].unshift({ type: "altStart", altText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.ALT_START }), l[d - 1].push({ type: "altEnd", signalType: T.LINETYPE.ALT_END }), this.$ = l[d - 1]; + break; + case 38: + l[d - 1].unshift({ type: "parStart", parText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.PAR_START }), l[d - 1].push({ type: "parEnd", signalType: T.LINETYPE.PAR_END }), this.$ = l[d - 1]; + break; + case 39: + l[d - 1].unshift({ type: "parStart", parText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.PAR_OVER_START }), l[d - 1].push({ type: "parEnd", signalType: T.LINETYPE.PAR_END }), this.$ = l[d - 1]; + break; + case 40: + l[d - 1].unshift({ type: "criticalStart", criticalText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.CRITICAL_START }), l[d - 1].push({ type: "criticalEnd", signalType: T.LINETYPE.CRITICAL_END }), this.$ = l[d - 1]; + break; + case 41: + l[d - 1].unshift({ type: "breakStart", breakText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.BREAK_START }), l[d - 1].push({ type: "breakEnd", optText: T.parseMessage(l[d - 2]), signalType: T.LINETYPE.BREAK_END }), this.$ = l[d - 1]; + break; + case 43: + this.$ = l[d - 3].concat([{ type: "option", optionText: T.parseMessage(l[d - 1]), signalType: T.LINETYPE.CRITICAL_OPTION }, l[d]]); + break; + case 45: + this.$ = l[d - 3].concat([{ type: "and", parText: T.parseMessage(l[d - 1]), signalType: T.LINETYPE.PAR_AND }, l[d]]); + break; + case 47: + this.$ = l[d - 3].concat([{ type: "else", altText: T.parseMessage(l[d - 1]), signalType: T.LINETYPE.ALT_ELSE }, l[d]]); + break; + case 48: + l[d - 3].draw = "participant", l[d - 3].type = "addParticipant", l[d - 3].description = T.parseMessage(l[d - 1]), this.$ = l[d - 3]; + break; + case 49: + l[d - 1].draw = "participant", l[d - 1].type = "addParticipant", this.$ = l[d - 1]; + break; + case 50: + l[d - 3].draw = "actor", l[d - 3].type = "addParticipant", l[d - 3].description = T.parseMessage(l[d - 1]), this.$ = l[d - 3]; + break; + case 51: + l[d - 1].draw = "actor", l[d - 1].type = "addParticipant", this.$ = l[d - 1]; + break; + case 52: + l[d - 1].type = "destroyParticipant", this.$ = l[d - 1]; + break; + case 53: + this.$ = [l[d - 1], { type: "addNote", placement: l[d - 2], actor: l[d - 1].actor, text: l[d] }]; + break; + case 54: + l[d - 2] = [].concat(l[d - 1], l[d - 1]).slice(0, 2), l[d - 2][0] = l[d - 2][0].actor, l[d - 2][1] = l[d - 2][1].actor, this.$ = [l[d - 1], { type: "addNote", placement: T.PLACEMENT.OVER, actor: l[d - 2].slice(0, 2), text: l[d] }]; + break; + case 55: + this.$ = [l[d - 1], { type: "addLinks", actor: l[d - 1].actor, text: l[d] }]; + break; + case 56: + this.$ = [l[d - 1], { type: "addALink", actor: l[d - 1].actor, text: l[d] }]; + break; + case 57: + this.$ = [l[d - 1], { type: "addProperties", actor: l[d - 1].actor, text: l[d] }]; + break; + case 58: + this.$ = [l[d - 1], { type: "addDetails", actor: l[d - 1].actor, text: l[d] }]; + break; + case 61: + this.$ = [l[d - 2], l[d]]; + break; + case 62: + this.$ = l[d]; + break; + case 63: + this.$ = T.PLACEMENT.LEFTOF; + break; + case 64: + this.$ = T.PLACEMENT.RIGHTOF; + break; + case 65: + this.$ = [ + l[d - 4], + l[d - 1], + { type: "addMessage", from: l[d - 4].actor, to: l[d - 1].actor, signalType: l[d - 3], msg: l[d], activate: !0 }, + { type: "activeStart", signalType: T.LINETYPE.ACTIVE_START, actor: l[d - 1] } + ]; + break; + case 66: + this.$ = [ + l[d - 4], + l[d - 1], + { type: "addMessage", from: l[d - 4].actor, to: l[d - 1].actor, signalType: l[d - 3], msg: l[d] }, + { type: "activeEnd", signalType: T.LINETYPE.ACTIVE_END, actor: l[d - 4] } + ]; + break; + case 67: + this.$ = [l[d - 3], l[d - 1], { type: "addMessage", from: l[d - 3].actor, to: l[d - 1].actor, signalType: l[d - 2], msg: l[d] }]; + break; + case 68: + this.$ = { type: "addParticipant", actor: l[d] }; + break; + case 69: + this.$ = T.LINETYPE.SOLID_OPEN; + break; + case 70: + this.$ = T.LINETYPE.DOTTED_OPEN; + break; + case 71: + this.$ = T.LINETYPE.SOLID; + break; + case 72: + this.$ = T.LINETYPE.DOTTED; + break; + case 73: + this.$ = T.LINETYPE.SOLID_CROSS; + break; + case 74: + this.$ = T.LINETYPE.DOTTED_CROSS; + break; + case 75: + this.$ = T.LINETYPE.SOLID_POINT; + break; + case 76: + this.$ = T.LINETYPE.DOTTED_POINT; + break; + case 77: + this.$ = T.parseMessage(l[d].trim().substring(1)); + break; + } + }, + table: [{ 3: 1, 4: e, 5: o, 6: n }, { 1: [3] }, { 3: 5, 4: e, 5: o, 6: n }, { 3: 6, 4: e, 5: o, 6: n }, t([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, t(_, [2, 5]), { 9: 47, 12: 12, 13: h, 14: u, 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, t(_, [2, 7]), t(_, [2, 8]), t(_, [2, 14]), { 12: 48, 50: q, 52: Y, 53: C }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: y }, { 22: 55, 70: y }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, t(_, [2, 29]), t(_, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, t(_, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: y }, { 22: 72, 70: y }, { 22: 73, 70: y }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: y }, { 22: 88, 70: y }, { 22: 89, 70: y }, { 22: 90, 70: y }, t([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), t(_, [2, 6]), t(_, [2, 15]), t(I, [2, 9], { 10: 91 }), t(_, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, t(_, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, t(_, [2, 24]), t(_, [2, 25]), t(_, [2, 26]), t(_, [2, 27]), t(_, [2, 28]), t(_, [2, 31]), t(_, [2, 32]), t(ut, i, { 7: 97 }), t(ut, i, { 7: 98 }), t(ut, i, { 7: 99 }), t(et, i, { 40: 100, 7: 101 }), t(N, i, { 42: 102, 7: 103 }), t(N, i, { 7: 103, 42: 104 }), t($t, i, { 45: 105, 7: 106 }), t(ut, i, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: y }, t(lt, [2, 69]), t(lt, [2, 70]), t(lt, [2, 71]), t(lt, [2, 72]), t(lt, [2, 73]), t(lt, [2, 74]), t(lt, [2, 75]), t(lt, [2, 76]), { 22: 116, 70: y }, { 22: 118, 58: 117, 70: y }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: st }, { 56: 121, 79: st }, { 56: 122, 79: st }, { 56: 123, 79: st }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: q, 52: Y, 53: C }, { 5: [1, 129] }, t(_, [2, 19]), t(_, [2, 20]), t(_, [2, 22]), t(_, [2, 23]), { 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 16: [1, 130], 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, { 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 16: [1, 131], 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, { 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 16: [1, 132], 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, { 16: [1, 133] }, { 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 16: [2, 46], 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 49: [1, 134], 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, { 16: [1, 135] }, { 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 16: [2, 44], 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 48: [1, 136], 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 16: [2, 42], 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 47: [1, 139], 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, { 4: s, 5: c, 8: 8, 9: 10, 12: 12, 13: h, 14: u, 16: [1, 140], 17: 15, 18: a, 21: x, 22: 40, 23: E, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: p, 30: g, 31: b, 33: k, 35: A, 36: R, 37: v, 38: F, 39: S, 41: tt, 43: W, 44: K, 46: Z, 50: q, 52: Y, 53: C, 54: G, 59: z, 60: X, 61: Q, 62: j, 70: y }, { 15: [1, 141] }, t(_, [2, 49]), { 15: [1, 142] }, t(_, [2, 51]), t(_, [2, 52]), { 22: 143, 70: y }, { 22: 144, 70: y }, { 56: 145, 79: st }, { 56: 146, 79: st }, { 56: 147, 79: st }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, t(_, [2, 16]), t(I, [2, 10]), { 12: 149, 50: q, 52: Y, 53: C }, t(I, [2, 12]), t(I, [2, 13]), t(_, [2, 18]), t(_, [2, 34]), t(_, [2, 35]), t(_, [2, 36]), t(_, [2, 37]), { 15: [1, 150] }, t(_, [2, 38]), { 15: [1, 151] }, t(_, [2, 39]), t(_, [2, 40]), { 15: [1, 152] }, t(_, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: st }, { 56: 156, 79: st }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: y }, t(I, [2, 11]), t(et, i, { 7: 101, 40: 158 }), t(N, i, { 7: 103, 42: 159 }), t($t, i, { 7: 106, 45: 160 }), t(_, [2, 48]), t(_, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }], + defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] }, + parseError: function(m, P) { + if (P.recoverable) + this.trace(m); + else { + var L = new Error(m); + throw L.hash = P, L; + } + }, + parse: function(m) { + var P = this, L = [0], T = [], M = [null], l = [], _t = this.table, d = "", At = 0, te = 0, we = 2, ee = 1, _e = l.slice.call(arguments, 1), B = Object.create(this.lexer), pt = { yy: {} }; + for (var Bt in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, Bt) && (pt.yy[Bt] = this.yy[Bt]); + B.setInput(m, pt.yy), pt.yy.lexer = B, pt.yy.parser = this, typeof B.yylloc > "u" && (B.yylloc = {}); + var Yt = B.yylloc; + l.push(Yt); + var Pe = B.options && B.options.ranges; + typeof pt.yy.parseError == "function" ? this.parseError = pt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function ke() { + var rt; + return rt = T.pop() || B.lex() || ee, typeof rt != "number" && (rt instanceof Array && (T = rt, rt = T.pop()), rt = P.symbols_[rt] || rt), rt; + } + for (var H, ft, $, Ft, yt = {}, Nt, at, ne, vt; ; ) { + if (ft = L[L.length - 1], this.defaultActions[ft] ? $ = this.defaultActions[ft] : ((H === null || typeof H > "u") && (H = ke()), $ = _t[ft] && _t[ft][H]), typeof $ > "u" || !$.length || !$[0]) { + var Wt = ""; + vt = []; + for (Nt in _t[ft]) + this.terminals_[Nt] && Nt > we && vt.push("'" + this.terminals_[Nt] + "'"); + B.showPosition ? Wt = "Parse error on line " + (At + 1) + `: +` + B.showPosition() + ` +Expecting ` + vt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : Wt = "Parse error on line " + (At + 1) + ": Unexpected " + (H == ee ? "end of input" : "'" + (this.terminals_[H] || H) + "'"), this.parseError(Wt, { + text: B.match, + token: this.terminals_[H] || H, + line: B.yylineno, + loc: Yt, + expected: vt + }); + } + if ($[0] instanceof Array && $.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + ft + ", token: " + H); + switch ($[0]) { + case 1: + L.push(H), M.push(B.yytext), l.push(B.yylloc), L.push($[1]), H = null, te = B.yyleng, d = B.yytext, At = B.yylineno, Yt = B.yylloc; + break; + case 2: + if (at = this.productions_[$[1]][1], yt.$ = M[M.length - at], yt._$ = { + first_line: l[l.length - (at || 1)].first_line, + last_line: l[l.length - 1].last_line, + first_column: l[l.length - (at || 1)].first_column, + last_column: l[l.length - 1].last_column + }, Pe && (yt._$.range = [ + l[l.length - (at || 1)].range[0], + l[l.length - 1].range[1] + ]), Ft = this.performAction.apply(yt, [ + d, + te, + At, + pt.yy, + $[1], + M, + l + ].concat(_e)), typeof Ft < "u") + return Ft; + at && (L = L.slice(0, -1 * at * 2), M = M.slice(0, -1 * at), l = l.slice(0, -1 * at)), L.push(this.productions_[$[1]][0]), M.push(yt.$), l.push(yt._$), ne = _t[L[L.length - 2]][L[L.length - 1]], L.push(ne); + break; + case 3: + return !0; + } + } + return !0; + } + }, me = function() { + var ht = { + EOF: 1, + parseError: function(P, L) { + if (this.yy.parser) + this.yy.parser.parseError(P, L); + else + throw new Error(P); + }, + // resets the lexer, sets new input + setInput: function(m, P) { + return this.yy = P || this.yy || {}, this._input = m, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var m = this._input[0]; + this.yytext += m, this.yyleng++, this.offset++, this.match += m, this.matched += m; + var P = m.match(/(?:\r\n?|\n).*/g); + return P ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), m; + }, + // unshifts one char (or a string) into the input + unput: function(m) { + var P = m.length, L = m.split(/(?:\r\n?|\n)/g); + this._input = m + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - P), this.offset -= P; + var T = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1); + var M = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: L ? (L.length === T.length ? this.yylloc.first_column : 0) + T[T.length - L.length].length - L[0].length : this.yylloc.first_column - P + }, this.options.ranges && (this.yylloc.range = [M[0], M[0] + this.yyleng - P]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(m) { + this.unput(this.match.slice(m)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var m = this.matched.substr(0, this.matched.length - this.match.length); + return (m.length > 20 ? "..." : "") + m.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var m = this.match; + return m.length < 20 && (m += this._input.substr(0, 20 - m.length)), (m.substr(0, 20) + (m.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var m = this.pastInput(), P = new Array(m.length + 1).join("-"); + return m + this.upcomingInput() + ` +` + P + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(m, P) { + var L, T, M; + if (this.options.backtrack_lexer && (M = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (M.yylloc.range = this.yylloc.range.slice(0))), T = m[0].match(/(?:\r\n?|\n).*/g), T && (this.yylineno += T.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: T ? T[T.length - 1].length - T[T.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + m[0].length + }, this.yytext += m[0], this.match += m[0], this.matches = m, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(m[0].length), this.matched += m[0], L = this.performAction.call(this, this.yy, this, P, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L) + return L; + if (this._backtrack) { + for (var l in M) + this[l] = M[l]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var m, P, L, T; + this._more || (this.yytext = "", this.match = ""); + for (var M = this._currentRules(), l = 0; l < M.length; l++) + if (L = this._input.match(this.rules[M[l]]), L && (!P || L[0].length > P[0].length)) { + if (P = L, T = l, this.options.backtrack_lexer) { + if (m = this.test_match(L, M[l]), m !== !1) + return m; + if (this._backtrack) { + P = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return P ? (m = this.test_match(P, M[T]), m !== !1 ? m : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var P = this.next(); + return P || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(P) { + this.conditionStack.push(P); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var P = this.conditionStack.length - 1; + return P > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(P) { + return P = this.conditionStack.length - 1 - Math.abs(P || 0), P >= 0 ? this.conditionStack[P] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(P) { + this.begin(P); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(P, L, T, M) { + switch (T) { + case 0: + return 5; + case 1: + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + return 19; + case 7: + return this.begin("LINE"), 14; + case 8: + return this.begin("ID"), 50; + case 9: + return this.begin("ID"), 52; + case 10: + return 13; + case 11: + return this.begin("ID"), 53; + case 12: + return L.yytext = L.yytext.trim(), this.begin("ALIAS"), 70; + case 13: + return this.popState(), this.popState(), this.begin("LINE"), 51; + case 14: + return this.popState(), this.popState(), 5; + case 15: + return this.begin("LINE"), 36; + case 16: + return this.begin("LINE"), 37; + case 17: + return this.begin("LINE"), 38; + case 18: + return this.begin("LINE"), 39; + case 19: + return this.begin("LINE"), 49; + case 20: + return this.begin("LINE"), 41; + case 21: + return this.begin("LINE"), 43; + case 22: + return this.begin("LINE"), 48; + case 23: + return this.begin("LINE"), 44; + case 24: + return this.begin("LINE"), 47; + case 25: + return this.begin("LINE"), 46; + case 26: + return this.popState(), 15; + case 27: + return 16; + case 28: + return 65; + case 29: + return 66; + case 30: + return 59; + case 31: + return 60; + case 32: + return 61; + case 33: + return 62; + case 34: + return 57; + case 35: + return 54; + case 36: + return this.begin("ID"), 21; + case 37: + return this.begin("ID"), 23; + case 38: + return 29; + case 39: + return 30; + case 40: + return this.begin("acc_title"), 31; + case 41: + return this.popState(), "acc_title_value"; + case 42: + return this.begin("acc_descr"), 33; + case 43: + return this.popState(), "acc_descr_value"; + case 44: + this.begin("acc_descr_multiline"); + break; + case 45: + this.popState(); + break; + case 46: + return "acc_descr_multiline_value"; + case 47: + return 6; + case 48: + return 18; + case 49: + return 20; + case 50: + return 64; + case 51: + return 5; + case 52: + return L.yytext = L.yytext.trim(), 70; + case 53: + return 73; + case 54: + return 74; + case 55: + return 71; + case 56: + return 72; + case 57: + return 75; + case 58: + return 76; + case 59: + return 77; + case 60: + return 78; + case 61: + return 79; + case 62: + return 68; + case 63: + return 69; + case 64: + return 5; + case 65: + return "INVALID"; + } + }, + rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { acc_descr_multiline: { rules: [45, 46], inclusive: !1 }, acc_descr: { rules: [43], inclusive: !1 }, acc_title: { rules: [41], inclusive: !1 }, ID: { rules: [2, 3, 12], inclusive: !1 }, ALIAS: { rules: [2, 3, 13, 14], inclusive: !1 }, LINE: { rules: [2, 3, 26], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], inclusive: !0 } } + }; + return ht; + }(); + Ct.lexer = me; + function Ot() { + this.yy = {}; + } + return Ot.prototype = Ct, Ct.Parser = Ot, new Ot(); +}(); +qt.parser = qt; +const Fe = qt; +let Pt, ct = {}, Xt = {}, Jt = {}, mt = [], J = [], Dt = !1, zt, ot, kt, Et; +const We = function(t) { + mt.push({ + name: t.text, + wrap: t.wrap === void 0 && xt() || !!t.wrap, + fill: t.color, + actorKeys: [] + }), ot = mt.slice(-1)[0]; +}, Ht = function(t, e, o, n) { + let i = ot; + const s = ct[t]; + if (s) { + if (ot && s.box && ot !== s.box) + throw new Error( + "A same participant should only be defined in one Box: " + s.name + " can't be in '" + s.box.name + "' and in '" + ot.name + "' at the same time." + ); + if (i = s.box ? s.box : ot, s.box = i, s && e === s.name && o == null) + return; + } + (o == null || o.text == null) && (o = { text: e, wrap: null, type: n }), (n == null || o.text == null) && (o = { text: e, wrap: null, type: n }), ct[t] = { + box: i, + name: e, + description: o.text, + wrap: o.wrap === void 0 && xt() || !!o.wrap, + prevActor: Pt, + links: {}, + properties: {}, + actorCnt: null, + rectData: null, + type: n || "participant" + }, Pt && ct[Pt] && (ct[Pt].nextActor = t), ot && ot.actorKeys.push(t), Pt = t; +}, qe = (t) => { + let e, o = 0; + for (e = 0; e < J.length; e++) + J[e].type === Lt.ACTIVE_START && J[e].from.actor === t && o++, J[e].type === Lt.ACTIVE_END && J[e].from.actor === t && o--; + return o; +}, ze = function(t, e, o, n) { + J.push({ + from: t, + to: e, + message: o.text, + wrap: o.wrap === void 0 && xt() || !!o.wrap, + answer: n + }); +}, D = function(t, e, o = { text: void 0, wrap: void 0 }, n, i = !1) { + if (n === Lt.ACTIVE_END && qe(t.actor) < 1) { + let c = new Error("Trying to inactivate an inactive participant (" + t.actor + ")"); + throw c.hash = { + text: "->>-", + token: "->>-", + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["'ACTIVE_PARTICIPANT'"] + }, c; + } + return J.push({ + from: t, + to: e, + message: o.text, + wrap: o.wrap === void 0 && xt() || !!o.wrap, + type: n, + activate: i + }), !0; +}, He = function() { + return mt.length > 0; +}, Ue = function() { + return mt.some((t) => t.name); +}, Ke = function() { + return J; +}, Ge = function() { + return mt; +}, Xe = function() { + return ct; +}, Je = function() { + return Xt; +}, Ze = function() { + return Jt; +}, It = function(t) { + return ct[t]; +}, Qe = function() { + return Object.keys(ct); +}, je = function() { + Dt = !0; +}, $e = function() { + Dt = !1; +}, t0 = () => Dt, e0 = function(t) { + zt = t; +}, xt = () => zt !== void 0 ? zt : dt().sequence.wrap, n0 = function() { + ct = {}, Xt = {}, Jt = {}, mt = [], J = [], Dt = !1, Se(); +}, i0 = function(t) { + const e = t.trim(), o = { + text: e.replace(/^:?(?:no)?wrap:/, "").trim(), + wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0 + }; + return U.debug("parseMessage:", o), o; +}, s0 = function(t) { + const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/); + let o = e != null && e[1] ? e[1].trim() : "transparent", n = e != null && e[2] ? e[2].trim() : void 0; + if (window && window.CSS) + window.CSS.supports("color", o) || (o = "transparent", n = t.trim()); + else { + const s = new Option().style; + s.color = o, s.color !== o && (o = "transparent", n = t.trim()); + } + return { + color: o, + text: n !== void 0 ? Mt(n.replace(/^:?(?:no)?wrap:/, ""), dt()) : void 0, + wrap: n !== void 0 ? n.match(/^:?wrap:/) !== null ? !0 : n.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0 + }; +}, Lt = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25, + AUTONUMBER: 26, + CRITICAL_START: 27, + CRITICAL_OPTION: 28, + CRITICAL_END: 29, + BREAK_START: 30, + BREAK_END: 31, + PAR_OVER_START: 32 +}, a0 = { + FILLED: 0, + OPEN: 1 +}, r0 = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}, ce = function(t, e, o) { + o.text, o.wrap === void 0 && xt() || o.wrap; + const n = [].concat(t, t); + J.push({ + from: n[0], + to: n[1], + message: o.text, + wrap: o.wrap === void 0 && xt() || !!o.wrap, + type: Lt.NOTE, + placement: e + }); +}, le = function(t, e) { + const o = It(t); + try { + let n = Mt(e.text, dt()); + n = n.replace(/&/g, "&"), n = n.replace(/=/g, "="); + const i = JSON.parse(n); + Zt(o, i); + } catch (n) { + U.error("error while parsing actor link text", n); + } +}, o0 = function(t, e) { + const o = It(t); + try { + const c = {}; + let h = Mt(e.text, dt()); + var n = h.indexOf("@"); + h = h.replace(/&/g, "&"), h = h.replace(/=/g, "="); + var i = h.slice(0, n - 1).trim(), s = h.slice(n + 1).trim(); + c[i] = s, Zt(o, c); + } catch (c) { + U.error("error while parsing actor link text", c); + } +}; +function Zt(t, e) { + if (t.links == null) + t.links = e; + else + for (let o in e) + t.links[o] = e[o]; +} +const he = function(t, e) { + const o = It(t); + try { + let n = Mt(e.text, dt()); + const i = JSON.parse(n); + de(o, i); + } catch (n) { + U.error("error while parsing actor properties text", n); + } +}; +function de(t, e) { + if (t.properties == null) + t.properties = e; + else + for (let o in e) + t.properties[o] = e[o]; +} +function c0() { + ot = void 0; +} +const ue = function(t, e) { + const o = It(t), n = document.getElementById(e.text); + try { + const i = n.innerHTML, s = JSON.parse(i); + s.properties && de(o, s.properties), s.links && Zt(o, s.links); + } catch (i) { + U.error("error while parsing actor details text", i); + } +}, l0 = function(t, e) { + if (t !== void 0 && t.properties !== void 0) + return t.properties[e]; +}, pe = function(t) { + if (Array.isArray(t)) + t.forEach(function(e) { + pe(e); + }); + else + switch (t.type) { + case "sequenceIndex": + J.push({ + from: void 0, + to: void 0, + message: { + start: t.sequenceIndex, + step: t.sequenceIndexStep, + visible: t.sequenceVisible + }, + wrap: !1, + type: t.signalType + }); + break; + case "addParticipant": + Ht(t.actor, t.actor, t.description, t.draw); + break; + case "createParticipant": + if (ct[t.actor]) + throw new Error( + "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior" + ); + kt = t.actor, Ht(t.actor, t.actor, t.description, t.draw), Xt[t.actor] = J.length; + break; + case "destroyParticipant": + Et = t.actor, Jt[t.actor] = J.length; + break; + case "activeStart": + D(t.actor, void 0, void 0, t.signalType); + break; + case "activeEnd": + D(t.actor, void 0, void 0, t.signalType); + break; + case "addNote": + ce(t.actor, t.placement, t.text); + break; + case "addLinks": + le(t.actor, t.text); + break; + case "addALink": + o0(t.actor, t.text); + break; + case "addProperties": + he(t.actor, t.text); + break; + case "addDetails": + ue(t.actor, t.text); + break; + case "addMessage": + if (kt) { + if (t.to !== kt) + throw new Error( + "The created participant " + kt + " does not have an associated creating message after its declaration. Please check the sequence diagram." + ); + kt = void 0; + } else if (Et) { + if (t.to !== Et && t.from !== Et) + throw new Error( + "The destroyed participant " + Et + " does not have an associated destroying message after its declaration. Please check the sequence diagram." + ); + Et = void 0; + } + D(t.from, t.to, t.msg, t.signalType, t.activate); + break; + case "boxStart": + We(t.boxData); + break; + case "boxEnd": + c0(); + break; + case "loopStart": + D(void 0, void 0, t.loopText, t.signalType); + break; + case "loopEnd": + D(void 0, void 0, void 0, t.signalType); + break; + case "rectStart": + D(void 0, void 0, t.color, t.signalType); + break; + case "rectEnd": + D(void 0, void 0, void 0, t.signalType); + break; + case "optStart": + D(void 0, void 0, t.optText, t.signalType); + break; + case "optEnd": + D(void 0, void 0, void 0, t.signalType); + break; + case "altStart": + D(void 0, void 0, t.altText, t.signalType); + break; + case "else": + D(void 0, void 0, t.altText, t.signalType); + break; + case "altEnd": + D(void 0, void 0, void 0, t.signalType); + break; + case "setAccTitle": + ae(t.text); + break; + case "parStart": + D(void 0, void 0, t.parText, t.signalType); + break; + case "and": + D(void 0, void 0, t.parText, t.signalType); + break; + case "parEnd": + D(void 0, void 0, void 0, t.signalType); + break; + case "criticalStart": + D(void 0, void 0, t.criticalText, t.signalType); + break; + case "option": + D(void 0, void 0, t.optionText, t.signalType); + break; + case "criticalEnd": + D(void 0, void 0, void 0, t.signalType); + break; + case "breakStart": + D(void 0, void 0, t.breakText, t.signalType); + break; + case "breakEnd": + D(void 0, void 0, void 0, t.signalType); + break; + } +}, ie = { + addActor: Ht, + addMessage: ze, + addSignal: D, + addLinks: le, + addDetails: ue, + addProperties: he, + autoWrap: xt, + setWrap: e0, + enableSequenceNumbers: je, + disableSequenceNumbers: $e, + showSequenceNumbers: t0, + getMessages: Ke, + getActors: Xe, + getCreatedActors: Je, + getDestroyedActors: Ze, + getActor: It, + getActorKeys: Qe, + getActorProperty: l0, + getAccTitle: Le, + getBoxes: Ge, + getDiagramTitle: Ie, + setDiagramTitle: Ae, + getConfig: () => dt().sequence, + clear: n0, + parseMessage: i0, + parseBoxData: s0, + LINETYPE: Lt, + ARROWTYPE: a0, + PLACEMENT: r0, + addNote: ce, + setAccTitle: ae, + apply: pe, + setAccDescription: Ne, + getAccDescription: ve, + hasAtLeastOneBox: He, + hasAtLeastOneBoxWithTitle: Ue +}, h0 = (t) => `.actor { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + + text.actor > tspan { + fill: ${t.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${t.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${t.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${t.signalColor}; + } + + #arrowhead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .sequenceNumber { + fill: ${t.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${t.signalColor}; + } + + #crosshead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .messageText { + fill: ${t.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${t.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${t.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${t.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation1 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation2 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${t.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + .actor-man circle, line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + stroke-width: 2px; + } +`, d0 = h0, gt = 18 * 2, Qt = function(t, e) { + return Ce(t, e); +}, fe = (t, e) => { + Me(() => { + const o = document.querySelectorAll(t); + o.length !== 0 && (o[0].addEventListener("mouseover", function() { + g0("actor" + e + "_popup"); + }), o[0].addEventListener("mouseout", function() { + x0("actor" + e + "_popup"); + })); + }); +}, u0 = function(t, e, o, n, i) { + if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0) + return { height: 0, width: 0 }; + const s = e.links, c = e.actorCnt, h = e.rectData; + var u = "none"; + i && (u = "block !important"); + const a = t.append("g"); + a.attr("id", "actor" + c + "_popup"), a.attr("class", "actorPopupMenu"), a.attr("display", u), fe("#actor" + c + "_popup", c); + var x = ""; + h.class !== void 0 && (x = " " + h.class); + let E = h.width > o ? h.width : o; + const p = a.append("rect"); + if (p.attr("class", "actorPopupMenuPanel" + x), p.attr("x", h.x), p.attr("y", h.height), p.attr("fill", h.fill), p.attr("stroke", h.stroke), p.attr("width", E), p.attr("height", h.height), p.attr("rx", h.rx), p.attr("ry", h.ry), s != null) { + var g = 20; + for (let A in s) { + var b = a.append("a"), k = re(s[A]); + b.attr("xlink:href", k), b.attr("target", "_blank"), M0(n)( + A, + b, + h.x + 10, + h.height + g, + E, + 20, + { class: "actor" }, + n + ), g += 30; + } + } + return p.attr("height", g), { height: h.height + g, width: E }; +}, p0 = function(t) { + return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'block'; }"; +}, f0 = function(t) { + return "var pu = document.getElementById('" + t + "'); if (pu != null) { pu.style.display = 'none'; }"; +}, g0 = function(t) { + var e = document.getElementById(t); + e != null && (e.style.display = "block"); +}, x0 = function(t) { + var e = document.getElementById(t); + e != null && (e.style.display = "none"); +}, wt = function(t, e) { + let o = 0, n = 0; + const i = e.text.split(w.lineBreakRegex), [s, c] = oe(e.fontSize); + let h = [], u = 0, a = () => e.y; + if (e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0) + switch (e.valign) { + case "top": + case "start": + a = () => Math.round(e.y + e.textMargin); + break; + case "middle": + case "center": + a = () => Math.round(e.y + (o + n + e.textMargin) / 2); + break; + case "bottom": + case "end": + a = () => Math.round( + e.y + (o + n + 2 * e.textMargin) - e.textMargin + ); + break; + } + if (e.anchor !== void 0 && e.textMargin !== void 0 && e.width !== void 0) + switch (e.anchor) { + case "left": + case "start": + e.x = Math.round(e.x + e.textMargin), e.anchor = "start", e.dominantBaseline = "middle", e.alignmentBaseline = "middle"; + break; + case "middle": + case "center": + e.x = Math.round(e.x + e.width / 2), e.anchor = "middle", e.dominantBaseline = "middle", e.alignmentBaseline = "middle"; + break; + case "right": + case "end": + e.x = Math.round(e.x + e.width - e.textMargin), e.anchor = "end", e.dominantBaseline = "middle", e.alignmentBaseline = "middle"; + break; + } + for (let [x, E] of i.entries()) { + e.textMargin !== void 0 && e.textMargin === 0 && s !== void 0 && (u = x * s); + const p = t.append("text"); + p.attr("x", e.x), p.attr("y", a()), e.anchor !== void 0 && p.attr("text-anchor", e.anchor).attr("dominant-baseline", e.dominantBaseline).attr("alignment-baseline", e.alignmentBaseline), e.fontFamily !== void 0 && p.style("font-family", e.fontFamily), c !== void 0 && p.style("font-size", c), e.fontWeight !== void 0 && p.style("font-weight", e.fontWeight), e.fill !== void 0 && p.attr("fill", e.fill), e.class !== void 0 && p.attr("class", e.class), e.dy !== void 0 ? p.attr("dy", e.dy) : u !== 0 && p.attr("dy", u); + const g = E || Re; + if (e.tspan) { + const b = p.append("tspan"); + b.attr("x", e.x), e.fill !== void 0 && b.attr("fill", e.fill), b.text(g); + } else + p.text(g); + e.valign !== void 0 && e.textMargin !== void 0 && e.textMargin > 0 && (n += (p._groups || p)[0][0].getBBox().height, o = n), h.push(p); + } + return h; +}, ge = function(t, e) { + function o(i, s, c, h, u) { + return i + "," + s + " " + (i + c) + "," + s + " " + (i + c) + "," + (s + h - u) + " " + (i + c - u * 1.2) + "," + (s + h) + " " + i + "," + (s + h); + } + const n = t.append("polygon"); + return n.attr("points", o(e.x, e.y, e.width, e.height, 7)), n.attr("class", "labelBox"), e.y = e.y + e.height / 2, wt(t, e), n; +}; +let nt = -1; +const xe = (t, e, o, n) => { + t.select && o.forEach((i) => { + const s = e[i], c = t.select("#actor" + s.actorCnt); + !n.mirrorActors && s.stopy ? c.attr("y2", s.stopy + s.height / 2) : n.mirrorActors && c.attr("y2", s.stopy); + }); +}, T0 = function(t, e, o, n) { + const i = n ? e.stopy : e.starty, s = e.x + e.width / 2, c = i + 5, h = t.append("g").lower(); + var u = h; + n || (nt++, u.append("line").attr("id", "actor" + nt).attr("x1", s).attr("y1", c).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), u = h.append("g"), e.actorCnt = nt, e.links != null && (u.attr("id", "root-" + nt), fe("#root-" + nt, nt))); + const a = Rt(); + var x = "actor"; + e.properties != null && e.properties.class ? x = e.properties.class : a.fill = "#eaeaea", a.x = e.x, a.y = i, a.width = e.width, a.height = e.height, a.class = x, a.rx = 3, a.ry = 3; + const E = Qt(u, a); + if (e.rectData = a, e.properties != null && e.properties.icon) { + const g = e.properties.icon.trim(); + g.charAt(0) === "@" ? Be(u, a.x + a.width - 20, a.y + 10, g.substr(1)) : Ye(u, a.x + a.width - 20, a.y + 10, g); + } + jt(o)( + e.description, + u, + a.x, + a.y, + a.width, + a.height, + { class: "actor" }, + o + ); + let p = e.height; + if (E.node) { + const g = E.node().getBBox(); + e.height = g.height, p = g.height; + } + return p; +}, y0 = function(t, e, o, n) { + const i = n ? e.stopy : e.starty, s = e.x + e.width / 2, c = i + 80; + t.lower(), n || (nt++, t.append("line").attr("id", "actor" + nt).attr("x1", s).attr("y1", c).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"), e.actorCnt = nt); + const h = t.append("g"); + h.attr("class", "actor-man"); + const u = Rt(); + u.x = e.x, u.y = i, u.fill = "#eaeaea", u.width = e.width, u.height = e.height, u.class = "actor", u.rx = 3, u.ry = 3, h.append("line").attr("id", "actor-man-torso" + nt).attr("x1", s).attr("y1", i + 25).attr("x2", s).attr("y2", i + 45), h.append("line").attr("id", "actor-man-arms" + nt).attr("x1", s - gt / 2).attr("y1", i + 33).attr("x2", s + gt / 2).attr("y2", i + 33), h.append("line").attr("x1", s - gt / 2).attr("y1", i + 60).attr("x2", s).attr("y2", i + 45), h.append("line").attr("x1", s).attr("y1", i + 45).attr("x2", s + gt / 2 - 2).attr("y2", i + 60); + const a = h.append("circle"); + a.attr("cx", e.x + e.width / 2), a.attr("cy", i + 10), a.attr("r", 15), a.attr("width", e.width), a.attr("height", e.height); + const x = h.node().getBBox(); + return e.height = x.height, jt(o)( + e.description, + h, + u.x, + u.y + 35, + u.width, + u.height, + { class: "actor" }, + o + ), e.height; +}, E0 = function(t, e, o, n) { + switch (e.type) { + case "actor": + return y0(t, e, o, n); + case "participant": + return T0(t, e, o, n); + } +}, b0 = function(t, e, o) { + const i = t.append("g"); + Te(i, e), e.name && jt(o)( + e.name, + i, + e.x, + e.y + (e.textMaxHeight || 0) / 2, + e.width, + 0, + { class: "text" }, + o + ), i.lower(); +}, m0 = function(t) { + return t.append("g"); +}, w0 = function(t, e, o, n, i) { + const s = Rt(), c = e.anchored; + s.x = e.startx, s.y = e.starty, s.class = "activation" + i % 3, s.width = e.stopx - e.startx, s.height = o - e.starty, Qt(c, s); +}, _0 = function(t, e, o, n) { + const { + boxMargin: i, + boxTextMargin: s, + labelBoxHeight: c, + labelBoxWidth: h, + messageFontFamily: u, + messageFontSize: a, + messageFontWeight: x + } = n, E = t.append("g"), p = function(k, A, R, v) { + return E.append("line").attr("x1", k).attr("y1", A).attr("x2", R).attr("y2", v).attr("class", "loopLine"); + }; + p(e.startx, e.starty, e.stopx, e.starty), p(e.stopx, e.starty, e.stopx, e.stopy), p(e.startx, e.stopy, e.stopx, e.stopy), p(e.startx, e.starty, e.startx, e.stopy), e.sections !== void 0 && e.sections.forEach(function(k) { + p(e.startx, k.y, e.stopx, k.y).style( + "stroke-dasharray", + "3, 3" + ); + }); + let g = Gt(); + g.text = o, g.x = e.startx, g.y = e.starty, g.fontFamily = u, g.fontSize = a, g.fontWeight = x, g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.width = h || 50, g.height = c || 20, g.textMargin = s, g.class = "labelText", ge(E, g), g = ye(), g.text = e.title, g.x = e.startx + h / 2 + (e.stopx - e.startx) / 2, g.y = e.starty + i + s, g.anchor = "middle", g.valign = "middle", g.textMargin = s, g.class = "loopText", g.fontFamily = u, g.fontSize = a, g.fontWeight = x, g.wrap = !0; + let b = wt(E, g); + return e.sectionTitles !== void 0 && e.sectionTitles.forEach(function(k, A) { + if (k.message) { + g.text = k.message, g.x = e.startx + (e.stopx - e.startx) / 2, g.y = e.sections[A].y + i + s, g.class = "loopText", g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.fontFamily = u, g.fontSize = a, g.fontWeight = x, g.wrap = e.wrap, b = wt(E, g); + let R = Math.round( + b.map((v) => (v._groups || v)[0][0].getBBox().height).reduce((v, F) => v + F) + ); + e.sections[A].height += R - (i + s); + } + }), e.height = Math.round(e.stopy - e.starty), E; +}, Te = function(t, e) { + Oe(t, e); +}, P0 = function(t) { + t.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}, k0 = function(t) { + t.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}, L0 = function(t) { + t.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}, I0 = function(t) { + t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); +}, A0 = function(t) { + t.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}, N0 = function(t) { + t.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}, v0 = function(t) { + t.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7"); +}, ye = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: void 0, + style: "#666", + width: void 0, + height: void 0, + textMargin: 0, + rx: 0, + ry: 0, + tspan: !0, + valign: void 0 + }; +}, S0 = function() { + return { + x: 0, + y: 0, + fill: "#EDF2AE", + stroke: "#666", + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}, jt = function() { + function t(i, s, c, h, u, a, x) { + const E = s.append("text").attr("x", c + u / 2).attr("y", h + a / 2 + 5).style("text-anchor", "middle").text(i); + n(E, x); + } + function e(i, s, c, h, u, a, x, E) { + const { actorFontSize: p, actorFontFamily: g, actorFontWeight: b } = E, [k, A] = oe(p), R = i.split(w.lineBreakRegex); + for (let v = 0; v < R.length; v++) { + const F = v * k - k * (R.length - 1) / 2, S = s.append("text").attr("x", c + u / 2).attr("y", h).style("text-anchor", "middle").style("font-size", A).style("font-weight", b).style("font-family", g); + S.append("tspan").attr("x", c + u / 2).attr("dy", F).text(R[v]), S.attr("y", h + a / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(S, x); + } + } + function o(i, s, c, h, u, a, x, E) { + const p = s.append("switch"), b = p.append("foreignObject").attr("x", c).attr("y", h).attr("width", u).attr("height", a).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + b.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, p, c, h, u, a, x, E), n(b, x); + } + function n(i, s) { + for (const c in s) + s.hasOwnProperty(c) && i.attr(c, s[c]); + } + return function(i) { + return i.textPlacement === "fo" ? o : i.textPlacement === "old" ? t : e; + }; +}(), M0 = function() { + function t(i, s, c, h, u, a, x) { + const E = s.append("text").attr("x", c).attr("y", h).style("text-anchor", "start").text(i); + n(E, x); + } + function e(i, s, c, h, u, a, x, E) { + const { actorFontSize: p, actorFontFamily: g, actorFontWeight: b } = E, k = i.split(w.lineBreakRegex); + for (let A = 0; A < k.length; A++) { + const R = A * p - p * (k.length - 1) / 2, v = s.append("text").attr("x", c).attr("y", h).style("text-anchor", "start").style("font-size", p).style("font-weight", b).style("font-family", g); + v.append("tspan").attr("x", c).attr("dy", R).text(k[A]), v.attr("y", h + a / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), n(v, x); + } + } + function o(i, s, c, h, u, a, x, E) { + const p = s.append("switch"), b = p.append("foreignObject").attr("x", c).attr("y", h).attr("width", u).attr("height", a).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + b.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), e(i, p, c, h, u, a, x, E), n(b, x); + } + function n(i, s) { + for (const c in s) + s.hasOwnProperty(c) && i.attr(c, s[c]); + } + return function(i) { + return i.textPlacement === "fo" ? o : i.textPlacement === "old" ? t : e; + }; +}(), V = { + drawRect: Qt, + drawText: wt, + drawLabel: ge, + drawActor: E0, + drawBox: b0, + drawPopup: u0, + anchorElement: m0, + drawActivation: w0, + drawLoop: _0, + drawBackgroundRect: Te, + insertArrowHead: I0, + insertArrowFilledHead: A0, + insertSequenceNumber: N0, + insertArrowCrossHead: v0, + insertDatabaseIcon: P0, + insertComputerIcon: k0, + insertClockIcon: L0, + getTextObj: ye, + getNoteRect: S0, + popupMenu: p0, + popdownMenu: f0, + fixLifeLineHeights: xe, + sanitizeUrl: re +}; +let r = {}; +const f = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + activations: [], + models: { + getHeight: function() { + return Math.max.apply( + null, + this.actors.length === 0 ? [0] : this.actors.map((t) => t.height || 0) + ) + (this.loops.length === 0 ? 0 : this.loops.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.messages.length === 0 ? 0 : this.messages.map((t) => t.height || 0).reduce((t, e) => t + e)) + (this.notes.length === 0 ? 0 : this.notes.map((t) => t.height || 0).reduce((t, e) => t + e)); + }, + clear: function() { + this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = []; + }, + addBox: function(t) { + this.boxes.push(t); + }, + addActor: function(t) { + this.actors.push(t); + }, + addLoop: function(t) { + this.loops.push(t); + }, + addMessage: function(t) { + this.messages.push(t); + }, + addNote: function(t) { + this.notes.push(t); + }, + lastActor: function() { + return this.actors[this.actors.length - 1]; + }, + lastLoop: function() { + return this.loops[this.loops.length - 1]; + }, + lastMessage: function() { + return this.messages[this.messages.length - 1]; + }, + lastNote: function() { + return this.notes[this.notes.length - 1]; + }, + actors: [], + boxes: [], + loops: [], + messages: [], + notes: [] + }, + init: function() { + this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, this.verticalPos = 0, be(dt()); + }, + updateVal: function(t, e, o, n) { + t[e] === void 0 ? t[e] = o : t[e] = n(o, t[e]); + }, + updateBounds: function(t, e, o, n) { + const i = this; + let s = 0; + function c(h) { + return function(a) { + s++; + const x = i.sequenceItems.length - s + 1; + i.updateVal(a, "starty", e - x * r.boxMargin, Math.min), i.updateVal(a, "stopy", n + x * r.boxMargin, Math.max), i.updateVal(f.data, "startx", t - x * r.boxMargin, Math.min), i.updateVal(f.data, "stopx", o + x * r.boxMargin, Math.max), h !== "activation" && (i.updateVal(a, "startx", t - x * r.boxMargin, Math.min), i.updateVal(a, "stopx", o + x * r.boxMargin, Math.max), i.updateVal(f.data, "starty", e - x * r.boxMargin, Math.min), i.updateVal(f.data, "stopy", n + x * r.boxMargin, Math.max)); + }; + } + this.sequenceItems.forEach(c()), this.activations.forEach(c("activation")); + }, + insert: function(t, e, o, n) { + const i = w.getMin(t, o), s = w.getMax(t, o), c = w.getMin(e, n), h = w.getMax(e, n); + this.updateVal(f.data, "startx", i, Math.min), this.updateVal(f.data, "starty", c, Math.min), this.updateVal(f.data, "stopx", s, Math.max), this.updateVal(f.data, "stopy", h, Math.max), this.updateBounds(i, c, s, h); + }, + newActivation: function(t, e, o) { + const n = o[t.from.actor], i = Vt(t.from.actor).length || 0, s = n.x + n.width / 2 + (i - 1) * r.activationWidth / 2; + this.activations.push({ + startx: s, + starty: this.verticalPos + 2, + stopx: s + r.activationWidth, + stopy: void 0, + actor: t.from.actor, + anchored: V.anchorElement(e) + }); + }, + endActivation: function(t) { + const e = this.activations.map(function(o) { + return o.actor; + }).lastIndexOf(t.from.actor); + return this.activations.splice(e, 1)[0]; + }, + createLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) { + return { + startx: void 0, + starty: this.verticalPos, + stopx: void 0, + stopy: void 0, + title: t.message, + wrap: t.wrap, + width: t.width, + height: 0, + fill: e + }; + }, + newLoop: function(t = { message: void 0, wrap: !1, width: void 0 }, e) { + this.sequenceItems.push(this.createLoop(t, e)); + }, + endLoop: function() { + return this.sequenceItems.pop(); + }, + isLoopOverlap: function() { + return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1; + }, + addSectionToLoop: function(t) { + const e = this.sequenceItems.pop(); + e.sections = e.sections || [], e.sectionTitles = e.sectionTitles || [], e.sections.push({ y: f.getVerticalPos(), height: 0 }), e.sectionTitles.push(t), this.sequenceItems.push(e); + }, + saveVerticalPos: function() { + this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos); + }, + resetVerticalPos: function() { + this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos); + }, + bumpVerticalPos: function(t) { + this.verticalPos = this.verticalPos + t, this.data.stopy = w.getMax(this.data.stopy, this.verticalPos); + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return { bounds: this.data, models: this.models }; + } +}, R0 = function(t, e) { + f.bumpVerticalPos(r.boxMargin), e.height = r.boxMargin, e.starty = f.getVerticalPos(); + const o = Rt(); + o.x = e.startx, o.y = e.starty, o.width = e.width || r.width, o.class = "note"; + const n = t.append("g"), i = V.drawRect(n, o), s = Gt(); + s.x = e.startx, s.y = e.starty, s.width = o.width, s.dy = "1em", s.text = e.message, s.class = "noteText", s.fontFamily = r.noteFontFamily, s.fontSize = r.noteFontSize, s.fontWeight = r.noteFontWeight, s.anchor = r.noteAlign, s.textMargin = r.noteMargin, s.valign = "center"; + const c = wt(n, s), h = Math.round( + c.map((u) => (u._groups || u)[0][0].getBBox().height).reduce((u, a) => u + a) + ); + i.attr("height", h + 2 * r.noteMargin), e.height += h + 2 * r.noteMargin, f.bumpVerticalPos(h + 2 * r.noteMargin), e.stopy = e.starty + h + 2 * r.noteMargin, e.stopx = e.startx + o.width, f.insert(e.startx, e.starty, e.stopx, e.stopy), f.models.addNote(e); +}, Tt = (t) => ({ + fontFamily: t.messageFontFamily, + fontSize: t.messageFontSize, + fontWeight: t.messageFontWeight +}), bt = (t) => ({ + fontFamily: t.noteFontFamily, + fontSize: t.noteFontSize, + fontWeight: t.noteFontWeight +}), Ut = (t) => ({ + fontFamily: t.actorFontFamily, + fontSize: t.actorFontSize, + fontWeight: t.actorFontWeight +}); +function D0(t, e) { + f.bumpVerticalPos(10); + const { startx: o, stopx: n, message: i } = e, s = w.splitBreaks(i).length, c = O.calculateTextDimensions(i, Tt(r)), h = c.height / s; + e.height += h, f.bumpVerticalPos(h); + let u, a = c.height - 10; + const x = c.width; + if (o === n) { + u = f.getVerticalPos() + a, r.rightAngles || (a += r.boxMargin, u = f.getVerticalPos() + a), a += 30; + const E = w.getMax(x / 2, r.width / 2); + f.insert( + o - E, + f.getVerticalPos() - 10 + a, + n + E, + f.getVerticalPos() + 30 + a + ); + } else + a += r.boxMargin, u = f.getVerticalPos() + a, f.insert(o, u - 10, n, u); + return f.bumpVerticalPos(a), e.height += a, e.stopy = e.starty + e.height, f.insert(e.fromBounds, e.starty, e.toBounds, e.stopy), u; +} +const V0 = function(t, e, o, n) { + const { startx: i, stopx: s, starty: c, message: h, type: u, sequenceIndex: a, sequenceVisible: x } = e, E = O.calculateTextDimensions(h, Tt(r)), p = Gt(); + p.x = i, p.y = c + 10, p.width = s - i, p.class = "messageText", p.dy = "1em", p.text = h, p.fontFamily = r.messageFontFamily, p.fontSize = r.messageFontSize, p.fontWeight = r.messageFontWeight, p.anchor = r.messageAlign, p.valign = "center", p.textMargin = r.wrapPadding, p.tspan = !1, wt(t, p); + const g = E.width; + let b; + i === s ? r.rightAngles ? b = t.append("path").attr( + "d", + `M ${i},${o} H ${i + w.getMax(r.width / 2, g / 2)} V ${o + 25} H ${i}` + ) : b = t.append("path").attr( + "d", + "M " + i + "," + o + " C " + (i + 60) + "," + (o - 10) + " " + (i + 60) + "," + (o + 30) + " " + i + "," + (o + 20) + ) : (b = t.append("line"), b.attr("x1", i), b.attr("y1", o), b.attr("x2", s), b.attr("y2", o)), u === n.db.LINETYPE.DOTTED || u === n.db.LINETYPE.DOTTED_CROSS || u === n.db.LINETYPE.DOTTED_POINT || u === n.db.LINETYPE.DOTTED_OPEN ? (b.style("stroke-dasharray", "3, 3"), b.attr("class", "messageLine1")) : b.attr("class", "messageLine0"); + let k = ""; + r.arrowMarkerAbsolute && (k = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, k = k.replace(/\(/g, "\\("), k = k.replace(/\)/g, "\\)")), b.attr("stroke-width", 2), b.attr("stroke", "none"), b.style("fill", "none"), (u === n.db.LINETYPE.SOLID || u === n.db.LINETYPE.DOTTED) && b.attr("marker-end", "url(" + k + "#arrowhead)"), (u === n.db.LINETYPE.SOLID_POINT || u === n.db.LINETYPE.DOTTED_POINT) && b.attr("marker-end", "url(" + k + "#filled-head)"), (u === n.db.LINETYPE.SOLID_CROSS || u === n.db.LINETYPE.DOTTED_CROSS) && b.attr("marker-end", "url(" + k + "#crosshead)"), (x || r.showSequenceNumbers) && (b.attr("marker-start", "url(" + k + "#sequencenumber)"), t.append("text").attr("x", i).attr("y", o + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(a)); +}, C0 = function(t, e, o, n, i, s, c) { + let h = 0, u = 0, a, x = 0; + for (const E of n) { + const p = e[E], g = p.box; + a && a != g && (c || f.models.addBox(a), u += r.boxMargin + a.margin), g && g != a && (c || (g.x = h + u, g.y = i), u += g.margin), p.width = p.width || r.width, p.height = w.getMax(p.height || r.height, r.height), p.margin = p.margin || r.actorMargin, x = w.getMax(x, p.height), o[p.name] && (u += p.width / 2), p.x = h + u, p.starty = f.getVerticalPos(), f.insert(p.x, i, p.x + p.width, p.height), h += p.width + u, p.box && (p.box.width = h + g.margin - p.box.x), u = p.margin, a = p.box, f.models.addActor(p); + } + a && !c && f.models.addBox(a), f.bumpVerticalPos(x); +}, Kt = function(t, e, o, n) { + if (n) { + let i = 0; + f.bumpVerticalPos(r.boxMargin * 2); + for (const s of o) { + const c = e[s]; + c.stopy || (c.stopy = f.getVerticalPos()); + const h = V.drawActor(t, c, r, !0); + i = w.getMax(i, h); + } + f.bumpVerticalPos(i + r.boxMargin); + } else + for (const i of o) { + const s = e[i]; + V.drawActor(t, s, r, !1); + } +}, Ee = function(t, e, o, n) { + let i = 0, s = 0; + for (const c of o) { + const h = e[c], u = F0(h), a = V.drawPopup( + t, + h, + u, + r, + r.forceMenus, + n + ); + a.height > i && (i = a.height), a.width + h.x > s && (s = a.width + h.x); + } + return { maxHeight: i, maxWidth: s }; +}, be = function(t) { + De(r, t), t.fontFamily && (r.actorFontFamily = r.noteFontFamily = r.messageFontFamily = t.fontFamily), t.fontSize && (r.actorFontSize = r.noteFontSize = r.messageFontSize = t.fontSize), t.fontWeight && (r.actorFontWeight = r.noteFontWeight = r.messageFontWeight = t.fontWeight); +}, Vt = function(t) { + return f.activations.filter(function(e) { + return e.actor === t; + }); +}, se = function(t, e) { + const o = e[t], n = Vt(t), i = n.reduce(function(c, h) { + return w.getMin(c, h.startx); + }, o.x + o.width / 2 - 1), s = n.reduce(function(c, h) { + return w.getMax(c, h.stopx); + }, o.x + o.width / 2 + 1); + return [i, s]; +}; +function it(t, e, o, n, i) { + f.bumpVerticalPos(o); + let s = n; + if (e.id && e.message && t[e.id]) { + const c = t[e.id].width, h = Tt(r); + e.message = O.wrapLabel(`[${e.message}]`, c - 2 * r.wrapPadding, h), e.width = c, e.wrap = !0; + const u = O.calculateTextDimensions(e.message, h), a = w.getMax(u.height, r.labelBoxHeight); + s = n + a, U.debug(`${a} - ${e.message}`); + } + i(e), f.bumpVerticalPos(s); +} +function O0(t, e, o, n, i, s, c) { + function h(a, x) { + a.x < i[t.from].x ? (f.insert( + e.stopx - x, + e.starty, + e.startx, + e.stopy + a.height / 2 + r.noteMargin + ), e.stopx = e.stopx + x) : (f.insert( + e.startx, + e.starty, + e.stopx + x, + e.stopy + a.height / 2 + r.noteMargin + ), e.stopx = e.stopx - x); + } + function u(a, x) { + a.x < i[t.to].x ? (f.insert( + e.startx - x, + e.starty, + e.stopx, + e.stopy + a.height / 2 + r.noteMargin + ), e.startx = e.startx + x) : (f.insert( + e.stopx, + e.starty, + e.startx + x, + e.stopy + a.height / 2 + r.noteMargin + ), e.startx = e.startx - x); + } + if (s[t.to] == n) { + const a = i[t.to], x = a.type == "actor" ? gt / 2 + 3 : a.width / 2 + 3; + h(a, x), a.starty = o - a.height / 2, f.bumpVerticalPos(a.height / 2); + } else if (c[t.from] == n) { + const a = i[t.from]; + if (r.mirrorActors) { + const x = a.type == "actor" ? gt / 2 : a.width / 2; + u(a, x); + } + a.stopy = o - a.height / 2, f.bumpVerticalPos(a.height / 2); + } else if (c[t.to] == n) { + const a = i[t.to]; + if (r.mirrorActors) { + const x = a.type == "actor" ? gt / 2 + 3 : a.width / 2 + 3; + h(a, x); + } + a.stopy = o - a.height / 2, f.bumpVerticalPos(a.height / 2); + } +} +const B0 = function(t, e, o, n) { + const { securityLevel: i, sequence: s } = dt(); + r = s; + let c; + i === "sandbox" && (c = St("#i" + e)); + const h = i === "sandbox" ? St(c.nodes()[0].contentDocument.body) : St("body"), u = i === "sandbox" ? c.nodes()[0].contentDocument : document; + f.init(), U.debug(n.db); + const a = i === "sandbox" ? h.select(`[id="${e}"]`) : St(`[id="${e}"]`), x = n.db.getActors(), E = n.db.getCreatedActors(), p = n.db.getDestroyedActors(), g = n.db.getBoxes(); + let b = n.db.getActorKeys(); + const k = n.db.getMessages(), A = n.db.getDiagramTitle(), R = n.db.hasAtLeastOneBox(), v = n.db.hasAtLeastOneBoxWithTitle(), F = Y0(x, k, n); + if (r.height = W0(x, F, g), V.insertComputerIcon(a), V.insertDatabaseIcon(a), V.insertClockIcon(a), R && (f.bumpVerticalPos(r.boxMargin), v && f.bumpVerticalPos(g[0].textMaxHeight)), r.hideUnusedParticipants === !0) { + const y = /* @__PURE__ */ new Set(); + k.forEach((_) => { + y.add(_.from), y.add(_.to); + }), b = b.filter((_) => y.has(_)); + } + C0(a, x, E, b, 0, k, !1); + const S = H0(k, x, F, n); + V.insertArrowHead(a), V.insertArrowCrossHead(a), V.insertArrowFilledHead(a), V.insertSequenceNumber(a); + function tt(y, _) { + const I = f.endActivation(y); + I.starty + 18 > _ && (I.starty = _ - 6, _ += 12), V.drawActivation( + a, + I, + _, + r, + Vt(y.from.actor).length + ), f.insert(I.startx, _ - 10, I.stopx, _); + } + let W = 1, K = 1; + const Z = [], q = []; + k.forEach(function(y, _) { + let I, ut, et; + switch (y.type) { + case n.db.LINETYPE.NOTE: + f.resetVerticalPos(), ut = y.noteModel, R0(a, ut); + break; + case n.db.LINETYPE.ACTIVE_START: + f.newActivation(y, a, x); + break; + case n.db.LINETYPE.ACTIVE_END: + tt(y, f.getVerticalPos()); + break; + case n.db.LINETYPE.LOOP_START: + it( + S, + y, + r.boxMargin, + r.boxMargin + r.boxTextMargin, + (N) => f.newLoop(N) + ); + break; + case n.db.LINETYPE.LOOP_END: + I = f.endLoop(), V.drawLoop(a, I, "loop", r), f.bumpVerticalPos(I.stopy - f.getVerticalPos()), f.models.addLoop(I); + break; + case n.db.LINETYPE.RECT_START: + it( + S, + y, + r.boxMargin, + r.boxMargin, + (N) => f.newLoop(void 0, N.message) + ); + break; + case n.db.LINETYPE.RECT_END: + I = f.endLoop(), q.push(I), f.models.addLoop(I), f.bumpVerticalPos(I.stopy - f.getVerticalPos()); + break; + case n.db.LINETYPE.OPT_START: + it( + S, + y, + r.boxMargin, + r.boxMargin + r.boxTextMargin, + (N) => f.newLoop(N) + ); + break; + case n.db.LINETYPE.OPT_END: + I = f.endLoop(), V.drawLoop(a, I, "opt", r), f.bumpVerticalPos(I.stopy - f.getVerticalPos()), f.models.addLoop(I); + break; + case n.db.LINETYPE.ALT_START: + it( + S, + y, + r.boxMargin, + r.boxMargin + r.boxTextMargin, + (N) => f.newLoop(N) + ); + break; + case n.db.LINETYPE.ALT_ELSE: + it( + S, + y, + r.boxMargin + r.boxTextMargin, + r.boxMargin, + (N) => f.addSectionToLoop(N) + ); + break; + case n.db.LINETYPE.ALT_END: + I = f.endLoop(), V.drawLoop(a, I, "alt", r), f.bumpVerticalPos(I.stopy - f.getVerticalPos()), f.models.addLoop(I); + break; + case n.db.LINETYPE.PAR_START: + case n.db.LINETYPE.PAR_OVER_START: + it( + S, + y, + r.boxMargin, + r.boxMargin + r.boxTextMargin, + (N) => f.newLoop(N) + ), f.saveVerticalPos(); + break; + case n.db.LINETYPE.PAR_AND: + it( + S, + y, + r.boxMargin + r.boxTextMargin, + r.boxMargin, + (N) => f.addSectionToLoop(N) + ); + break; + case n.db.LINETYPE.PAR_END: + I = f.endLoop(), V.drawLoop(a, I, "par", r), f.bumpVerticalPos(I.stopy - f.getVerticalPos()), f.models.addLoop(I); + break; + case n.db.LINETYPE.AUTONUMBER: + W = y.message.start || W, K = y.message.step || K, y.message.visible ? n.db.enableSequenceNumbers() : n.db.disableSequenceNumbers(); + break; + case n.db.LINETYPE.CRITICAL_START: + it( + S, + y, + r.boxMargin, + r.boxMargin + r.boxTextMargin, + (N) => f.newLoop(N) + ); + break; + case n.db.LINETYPE.CRITICAL_OPTION: + it( + S, + y, + r.boxMargin + r.boxTextMargin, + r.boxMargin, + (N) => f.addSectionToLoop(N) + ); + break; + case n.db.LINETYPE.CRITICAL_END: + I = f.endLoop(), V.drawLoop(a, I, "critical", r), f.bumpVerticalPos(I.stopy - f.getVerticalPos()), f.models.addLoop(I); + break; + case n.db.LINETYPE.BREAK_START: + it( + S, + y, + r.boxMargin, + r.boxMargin + r.boxTextMargin, + (N) => f.newLoop(N) + ); + break; + case n.db.LINETYPE.BREAK_END: + I = f.endLoop(), V.drawLoop(a, I, "break", r), f.bumpVerticalPos(I.stopy - f.getVerticalPos()), f.models.addLoop(I); + break; + default: + try { + et = y.msgModel, et.starty = f.getVerticalPos(), et.sequenceIndex = W, et.sequenceVisible = n.db.showSequenceNumbers(); + const N = D0(a, et); + O0( + y, + et, + N, + _, + x, + E, + p + ), Z.push({ messageModel: et, lineStartY: N }), f.models.addMessage(et); + } catch (N) { + U.error("error while drawing message", N); + } + } + [ + n.db.LINETYPE.SOLID_OPEN, + n.db.LINETYPE.DOTTED_OPEN, + n.db.LINETYPE.SOLID, + n.db.LINETYPE.DOTTED, + n.db.LINETYPE.SOLID_CROSS, + n.db.LINETYPE.DOTTED_CROSS, + n.db.LINETYPE.SOLID_POINT, + n.db.LINETYPE.DOTTED_POINT + ].includes(y.type) && (W = W + K); + }), U.debug("createdActors", E), U.debug("destroyedActors", p), Kt(a, x, b, !1), Z.forEach((y) => V0(a, y.messageModel, y.lineStartY, n)), r.mirrorActors && Kt(a, x, b, !0), q.forEach((y) => V.drawBackgroundRect(a, y)), xe(a, x, b, r), f.models.boxes.forEach(function(y) { + y.height = f.getVerticalPos() - y.y, f.insert(y.x, y.y, y.x + y.width, y.height), y.startx = y.x, y.starty = y.y, y.stopx = y.startx + y.width, y.stopy = y.starty + y.height, y.stroke = "rgb(0,0,0, 0.5)", V.drawBox(a, y, r); + }), R && f.bumpVerticalPos(r.boxMargin); + const Y = Ee(a, x, b, u), { bounds: C } = f.getBounds(); + let G = C.stopy - C.starty; + G < Y.maxHeight && (G = Y.maxHeight); + let z = G + 2 * r.diagramMarginY; + r.mirrorActors && (z = z - r.boxMargin + r.bottomMarginAdj); + let X = C.stopx - C.startx; + X < Y.maxWidth && (X = Y.maxWidth); + const Q = X + 2 * r.diagramMarginX; + A && a.append("text").text(A).attr("x", (C.stopx - C.startx) / 2 - 2 * r.diagramMarginX).attr("y", -25), Ve(a, z, Q, r.useMaxWidth); + const j = A ? 40 : 0; + a.attr( + "viewBox", + C.startx - r.diagramMarginX + " -" + (r.diagramMarginY + j) + " " + Q + " " + (z + j) + ), U.debug("models:", f.models); +}; +function Y0(t, e, o) { + const n = {}; + return e.forEach(function(i) { + if (t[i.to] && t[i.from]) { + const s = t[i.to]; + if (i.placement === o.db.PLACEMENT.LEFTOF && !s.prevActor || i.placement === o.db.PLACEMENT.RIGHTOF && !s.nextActor) + return; + const c = i.placement !== void 0, h = !c, u = c ? bt(r) : Tt(r), a = i.wrap ? O.wrapLabel(i.message, r.width - 2 * r.wrapPadding, u) : i.message, E = O.calculateTextDimensions(a, u).width + 2 * r.wrapPadding; + h && i.from === s.nextActor ? n[i.to] = w.getMax( + n[i.to] || 0, + E + ) : h && i.from === s.prevActor ? n[i.from] = w.getMax( + n[i.from] || 0, + E + ) : h && i.from === i.to ? (n[i.from] = w.getMax( + n[i.from] || 0, + E / 2 + ), n[i.to] = w.getMax( + n[i.to] || 0, + E / 2 + )) : i.placement === o.db.PLACEMENT.RIGHTOF ? n[i.from] = w.getMax( + n[i.from] || 0, + E + ) : i.placement === o.db.PLACEMENT.LEFTOF ? n[s.prevActor] = w.getMax( + n[s.prevActor] || 0, + E + ) : i.placement === o.db.PLACEMENT.OVER && (s.prevActor && (n[s.prevActor] = w.getMax( + n[s.prevActor] || 0, + E / 2 + )), s.nextActor && (n[i.from] = w.getMax( + n[i.from] || 0, + E / 2 + ))); + } + }), U.debug("maxMessageWidthPerActor:", n), n; +} +const F0 = function(t) { + let e = 0; + const o = Ut(r); + for (const n in t.links) { + const s = O.calculateTextDimensions(n, o).width + 2 * r.wrapPadding + 2 * r.boxMargin; + e < s && (e = s); + } + return e; +}; +function W0(t, e, o) { + let n = 0; + Object.keys(t).forEach((s) => { + const c = t[s]; + c.wrap && (c.description = O.wrapLabel( + c.description, + r.width - 2 * r.wrapPadding, + Ut(r) + )); + const h = O.calculateTextDimensions(c.description, Ut(r)); + c.width = c.wrap ? r.width : w.getMax(r.width, h.width + 2 * r.wrapPadding), c.height = c.wrap ? w.getMax(h.height, r.height) : r.height, n = w.getMax(n, c.height); + }); + for (const s in e) { + const c = t[s]; + if (!c) + continue; + const h = t[c.nextActor]; + if (!h) { + const E = e[s] + r.actorMargin - c.width / 2; + c.margin = w.getMax(E, r.actorMargin); + continue; + } + const a = e[s] + r.actorMargin - c.width / 2 - h.width / 2; + c.margin = w.getMax(a, r.actorMargin); + } + let i = 0; + return o.forEach((s) => { + const c = Tt(r); + let h = s.actorKeys.reduce((x, E) => x += t[E].width + (t[E].margin || 0), 0); + h -= 2 * r.boxTextMargin, s.wrap && (s.name = O.wrapLabel(s.name, h - 2 * r.wrapPadding, c)); + const u = O.calculateTextDimensions(s.name, c); + i = w.getMax(u.height, i); + const a = w.getMax(h, u.width + 2 * r.wrapPadding); + if (s.margin = r.boxTextMargin, h < a) { + const x = (a - h) / 2; + s.margin += x; + } + }), o.forEach((s) => s.textMaxHeight = i), w.getMax(n, r.height); +} +const q0 = function(t, e, o) { + const n = e[t.from].x, i = e[t.to].x, s = t.wrap && t.message; + let c = O.calculateTextDimensions( + s ? O.wrapLabel(t.message, r.width, bt(r)) : t.message, + bt(r) + ); + const h = { + width: s ? r.width : w.getMax(r.width, c.width + 2 * r.noteMargin), + height: 0, + startx: e[t.from].x, + stopx: 0, + starty: 0, + stopy: 0, + message: t.message + }; + return t.placement === o.db.PLACEMENT.RIGHTOF ? (h.width = s ? w.getMax(r.width, c.width) : w.getMax( + e[t.from].width / 2 + e[t.to].width / 2, + c.width + 2 * r.noteMargin + ), h.startx = n + (e[t.from].width + r.actorMargin) / 2) : t.placement === o.db.PLACEMENT.LEFTOF ? (h.width = s ? w.getMax(r.width, c.width + 2 * r.noteMargin) : w.getMax( + e[t.from].width / 2 + e[t.to].width / 2, + c.width + 2 * r.noteMargin + ), h.startx = n - h.width + (e[t.from].width - r.actorMargin) / 2) : t.to === t.from ? (c = O.calculateTextDimensions( + s ? O.wrapLabel( + t.message, + w.getMax(r.width, e[t.from].width), + bt(r) + ) : t.message, + bt(r) + ), h.width = s ? w.getMax(r.width, e[t.from].width) : w.getMax( + e[t.from].width, + r.width, + c.width + 2 * r.noteMargin + ), h.startx = n + (e[t.from].width - h.width) / 2) : (h.width = Math.abs(n + e[t.from].width / 2 - (i + e[t.to].width / 2)) + r.actorMargin, h.startx = n < i ? n + e[t.from].width / 2 - r.actorMargin / 2 : i + e[t.to].width / 2 - r.actorMargin / 2), s && (h.message = O.wrapLabel( + t.message, + h.width - 2 * r.wrapPadding, + bt(r) + )), U.debug( + `NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${t.message}]` + ), h; +}, z0 = function(t, e, o) { + if (![ + o.db.LINETYPE.SOLID_OPEN, + o.db.LINETYPE.DOTTED_OPEN, + o.db.LINETYPE.SOLID, + o.db.LINETYPE.DOTTED, + o.db.LINETYPE.SOLID_CROSS, + o.db.LINETYPE.DOTTED_CROSS, + o.db.LINETYPE.SOLID_POINT, + o.db.LINETYPE.DOTTED_POINT + ].includes(t.type)) + return {}; + const [n, i] = se(t.from, e), [s, c] = se(t.to, e), h = n <= s, u = h ? i : n; + let a = h ? s : c; + const x = Math.abs(s - c) > 2, E = (k) => h ? -k : k; + t.from === t.to ? a = u : (t.activate && !x && (a += E(r.activationWidth / 2 - 1)), [o.db.LINETYPE.SOLID_OPEN, o.db.LINETYPE.DOTTED_OPEN].includes(t.type) || (a += E(3))); + const p = [n, i, s, c], g = Math.abs(u - a); + t.wrap && t.message && (t.message = O.wrapLabel( + t.message, + w.getMax(g + 2 * r.wrapPadding, r.width), + Tt(r) + )); + const b = O.calculateTextDimensions(t.message, Tt(r)); + return { + width: w.getMax( + t.wrap ? 0 : b.width + 2 * r.wrapPadding, + g + 2 * r.wrapPadding, + r.width + ), + height: 0, + startx: u, + stopx: a, + starty: 0, + stopy: 0, + message: t.message, + type: t.type, + wrap: t.wrap, + fromBounds: Math.min.apply(null, p), + toBounds: Math.max.apply(null, p) + }; +}, H0 = function(t, e, o, n) { + const i = {}, s = []; + let c, h, u; + return t.forEach(function(a) { + switch (a.id = O.random({ length: 10 }), a.type) { + case n.db.LINETYPE.LOOP_START: + case n.db.LINETYPE.ALT_START: + case n.db.LINETYPE.OPT_START: + case n.db.LINETYPE.PAR_START: + case n.db.LINETYPE.PAR_OVER_START: + case n.db.LINETYPE.CRITICAL_START: + case n.db.LINETYPE.BREAK_START: + s.push({ + id: a.id, + msg: a.message, + from: Number.MAX_SAFE_INTEGER, + to: Number.MIN_SAFE_INTEGER, + width: 0 + }); + break; + case n.db.LINETYPE.ALT_ELSE: + case n.db.LINETYPE.PAR_AND: + case n.db.LINETYPE.CRITICAL_OPTION: + a.message && (c = s.pop(), i[c.id] = c, i[a.id] = c, s.push(c)); + break; + case n.db.LINETYPE.LOOP_END: + case n.db.LINETYPE.ALT_END: + case n.db.LINETYPE.OPT_END: + case n.db.LINETYPE.PAR_END: + case n.db.LINETYPE.CRITICAL_END: + case n.db.LINETYPE.BREAK_END: + c = s.pop(), i[c.id] = c; + break; + case n.db.LINETYPE.ACTIVE_START: + { + const E = e[a.from ? a.from.actor : a.to.actor], p = Vt(a.from ? a.from.actor : a.to.actor).length, g = E.x + E.width / 2 + (p - 1) * r.activationWidth / 2, b = { + startx: g, + stopx: g + r.activationWidth, + actor: a.from.actor, + enabled: !0 + }; + f.activations.push(b); + } + break; + case n.db.LINETYPE.ACTIVE_END: + { + const E = f.activations.map((p) => p.actor).lastIndexOf(a.from.actor); + delete f.activations.splice(E, 1)[0]; + } + break; + } + a.placement !== void 0 ? (h = q0(a, e, n), a.noteModel = h, s.forEach((E) => { + c = E, c.from = w.getMin(c.from, h.startx), c.to = w.getMax(c.to, h.startx + h.width), c.width = w.getMax(c.width, Math.abs(c.from - c.to)) - r.labelBoxWidth; + })) : (u = z0(a, e, n), a.msgModel = u, u.startx && u.stopx && s.length > 0 && s.forEach((E) => { + if (c = E, u.startx === u.stopx) { + const p = e[a.from], g = e[a.to]; + c.from = w.getMin( + p.x - u.width / 2, + p.x - p.width / 2, + c.from + ), c.to = w.getMax( + g.x + u.width / 2, + g.x + p.width / 2, + c.to + ), c.width = w.getMax(c.width, Math.abs(c.to - c.from)) - r.labelBoxWidth; + } else + c.from = w.getMin(u.startx, c.from), c.to = w.getMax(u.stopx, c.to), c.width = w.getMax(c.width, u.width) - r.labelBoxWidth; + })); + }), f.activations = [], U.debug("Loop type widths:", i), i; +}, U0 = { + bounds: f, + drawActors: Kt, + drawActorsPopup: Ee, + setConf: be, + draw: B0 +}, X0 = { + parser: Fe, + db: ie, + renderer: U0, + styles: d0, + init: ({ wrap: t }) => { + ie.setWrap(t); + } +}; +export { + X0 as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/sequenceDiagram-d89d0f25.js b/webroot/js/node_modules/mermaid/dist/sequenceDiagram-d89d0f25.js new file mode 100644 index 0000000..49f132c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/sequenceDiagram-d89d0f25.js @@ -0,0 +1,3300 @@ +import { g as getAccTitle, r as getDiagramTitle, q as setDiagramTitle, c as getConfig, s as setAccTitle, b as setAccDescription, a as getAccDescription, t as clear$1, l as log, d as sanitizeText, e as common, D as parseFontSize, F as addFunction, Z as ZERO_WIDTH_SPACE, f as assignWithDepth, i as configureSvgSize, u as utils } from "./mermaid-0d192ec3.js"; +import { select } from "d3"; +import { d as drawRect$1, a as drawBackgroundRect$1, b as drawEmbeddedImage, c as drawImage, e as getTextObj$1, g as getNoteRect$1 } from "./svgDrawCommon-057d45d0.js"; +import { sanitizeUrl } from "@braintree/sanitize-url"; +import "ts-dedent"; +import "dayjs"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $Vy = [4, 5, 16, 50, 52, 53], $Vz = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VD = [68, 69, 70], $VE = [1, 120]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "box_section": 10, "box_line": 11, "participant_statement": 12, "create": 13, "box": 14, "restOfLine": 15, "end": 16, "signal": 17, "autonumber": 18, "NUM": 19, "off": 20, "activate": 21, "actor": 22, "deactivate": 23, "note_statement": 24, "links_statement": 25, "link_statement": 26, "properties_statement": 27, "details_statement": 28, "title": 29, "legacy_title": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "loop": 36, "rect": 37, "opt": 38, "alt": 39, "else_sections": 40, "par": 41, "par_sections": 42, "par_over": 43, "critical": 44, "option_sections": 45, "break": 46, "option": 47, "and": 48, "else": 49, "participant": 50, "AS": 51, "participant_actor": 52, "destroy": 53, "note": 54, "placement": 55, "text2": 56, "over": 57, "actor_pair": 58, "links": 59, "link": 60, "properties": 61, "details": 62, "spaceList": 63, ",": 64, "left_of": 65, "right_of": 66, "signaltype": 67, "+": 68, "-": 69, "ACTOR": 70, "SOLID_OPEN_ARROW": 71, "DOTTED_OPEN_ARROW": 72, "SOLID_ARROW": 73, "DOTTED_ARROW": 74, "SOLID_CROSS": 75, "DOTTED_CROSS": 76, "SOLID_POINT": 77, "DOTTED_POINT": 78, "TXT": 79, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.apply($$[$0]); + return $$[$0]; + case 4: + case 9: + this.$ = []; + break; + case 5: + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 6: + case 7: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 8: + case 13: + this.$ = []; + break; + case 15: + $$[$0].type = "createParticipant"; + this.$ = $$[$0]; + break; + case 16: + $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) }); + $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] }); + this.$ = $$[$0 - 1]; + break; + case 18: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 19: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 20: + this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 21: + this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 22: + this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }; + break; + case 23: + this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] }; + break; + case 29: + yy.setDiagramTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 30: + yy.setDiagramTitle($$[$0].substring(7)); + this.$ = $$[$0].substring(7); + break; + case 31: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 32: + case 33: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 34: + $$[$0 - 1].unshift({ type: "loopStart", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START }); + $$[$0 - 1].push({ type: "loopEnd", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END }); + this.$ = $$[$0 - 1]; + break; + case 35: + $$[$0 - 1].unshift({ type: "rectStart", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START }); + $$[$0 - 1].push({ type: "rectEnd", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END }); + this.$ = $$[$0 - 1]; + break; + case 36: + $$[$0 - 1].unshift({ type: "optStart", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START }); + $$[$0 - 1].push({ type: "optEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END }); + this.$ = $$[$0 - 1]; + break; + case 37: + $$[$0 - 1].unshift({ type: "altStart", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START }); + $$[$0 - 1].push({ type: "altEnd", signalType: yy.LINETYPE.ALT_END }); + this.$ = $$[$0 - 1]; + break; + case 38: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 39: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 40: + $$[$0 - 1].unshift({ type: "criticalStart", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START }); + $$[$0 - 1].push({ type: "criticalEnd", signalType: yy.LINETYPE.CRITICAL_END }); + this.$ = $$[$0 - 1]; + break; + case 41: + $$[$0 - 1].unshift({ type: "breakStart", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START }); + $$[$0 - 1].push({ type: "breakEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END }); + this.$ = $$[$0 - 1]; + break; + case 43: + this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]); + break; + case 45: + this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]); + break; + case 47: + this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]); + break; + case 48: + $$[$0 - 3].draw = "participant"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 49: + $$[$0 - 1].draw = "participant"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 50: + $$[$0 - 3].draw = "actor"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 51: + $$[$0 - 1].draw = "actor"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 52: + $$[$0 - 1].type = "destroyParticipant"; + this.$ = $$[$0 - 1]; + break; + case 53: + this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 54: + $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2); + $$[$0 - 2][0] = $$[$0 - 2][0].actor; + $$[$0 - 2][1] = $$[$0 - 2][1].actor; + this.$ = [$$[$0 - 1], { type: "addNote", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }]; + break; + case 55: + this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 56: + this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 57: + this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 58: + this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 61: + this.$ = [$$[$0 - 2], $$[$0]]; + break; + case 62: + this.$ = $$[$0]; + break; + case 63: + this.$ = yy.PLACEMENT.LEFTOF; + break; + case 64: + this.$ = yy.PLACEMENT.RIGHTOF; + break; + case 65: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true }, + { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] } + ]; + break; + case 66: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] }, + { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] } + ]; + break; + case 67: + this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }]; + break; + case 68: + this.$ = { type: "addParticipant", actor: $$[$0] }; + break; + case 69: + this.$ = yy.LINETYPE.SOLID_OPEN; + break; + case 70: + this.$ = yy.LINETYPE.DOTTED_OPEN; + break; + case 71: + this.$ = yy.LINETYPE.SOLID; + break; + case 72: + this.$ = yy.LINETYPE.DOTTED; + break; + case 73: + this.$ = yy.LINETYPE.SOLID_CROSS; + break; + case 74: + this.$ = yy.LINETYPE.DOTTED_CROSS; + break; + case 75: + this.$ = yy.LINETYPE.SOLID_POINT; + break; + case 76: + this.$ = yy.LINETYPE.DOTTED_POINT; + break; + case 77: + this.$ = yy.parseMessage($$[$0].trim().substring(1)); + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: $Vw }, { 22: 55, 70: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: $Vw }, { 22: 72, 70: $Vw }, { 22: 73, 70: $Vw }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: $Vw }, { 22: 88, 70: $Vw }, { 22: 89, 70: $Vw }, { 22: 90, 70: $Vw }, o([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vy, [2, 9], { 10: 91 }), o($Vx, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, o($Vx, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($Vz, $V3, { 7: 97 }), o($Vz, $V3, { 7: 98 }), o($Vz, $V3, { 7: 99 }), o($VA, $V3, { 40: 100, 7: 101 }), o($VB, $V3, { 42: 102, 7: 103 }), o($VB, $V3, { 7: 103, 42: 104 }), o($VC, $V3, { 45: 105, 7: 106 }), o($Vz, $V3, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: $Vw }, o($VD, [2, 69]), o($VD, [2, 70]), o($VD, [2, 71]), o($VD, [2, 72]), o($VD, [2, 73]), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), { 22: 116, 70: $Vw }, { 22: 118, 58: 117, 70: $Vw }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: $VE }, { 56: 121, 79: $VE }, { 56: 122, 79: $VE }, { 56: 123, 79: $VE }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 129] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 130], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 131], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 132], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 133] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 134], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 135] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 136], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 139], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 140], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 15: [1, 141] }, o($Vx, [2, 49]), { 15: [1, 142] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 143, 70: $Vw }, { 22: 144, 70: $Vw }, { 56: 145, 79: $VE }, { 56: 146, 79: $VE }, { 56: 147, 79: $VE }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, o($Vx, [2, 16]), o($Vy, [2, 10]), { 12: 149, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vy, [2, 12]), o($Vy, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 150] }, o($Vx, [2, 38]), { 15: [1, 151] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 152] }, o($Vx, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: $VE }, { 56: 156, 79: $VE }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: $Vw }, o($Vy, [2, 11]), o($VA, $V3, { 7: 101, 40: 158 }), o($VB, $V3, { 7: 103, 42: 159 }), o($VC, $V3, { 7: 106, 45: 160 }), o($Vx, [2, 48]), o($Vx, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }], + defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 5; + case 1: + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + return 19; + case 7: + this.begin("LINE"); + return 14; + case 8: + this.begin("ID"); + return 50; + case 9: + this.begin("ID"); + return 52; + case 10: + return 13; + case 11: + this.begin("ID"); + return 53; + case 12: + yy_.yytext = yy_.yytext.trim(); + this.begin("ALIAS"); + return 70; + case 13: + this.popState(); + this.popState(); + this.begin("LINE"); + return 51; + case 14: + this.popState(); + this.popState(); + return 5; + case 15: + this.begin("LINE"); + return 36; + case 16: + this.begin("LINE"); + return 37; + case 17: + this.begin("LINE"); + return 38; + case 18: + this.begin("LINE"); + return 39; + case 19: + this.begin("LINE"); + return 49; + case 20: + this.begin("LINE"); + return 41; + case 21: + this.begin("LINE"); + return 43; + case 22: + this.begin("LINE"); + return 48; + case 23: + this.begin("LINE"); + return 44; + case 24: + this.begin("LINE"); + return 47; + case 25: + this.begin("LINE"); + return 46; + case 26: + this.popState(); + return 15; + case 27: + return 16; + case 28: + return 65; + case 29: + return 66; + case 30: + return 59; + case 31: + return 60; + case 32: + return 61; + case 33: + return 62; + case 34: + return 57; + case 35: + return 54; + case 36: + this.begin("ID"); + return 21; + case 37: + this.begin("ID"); + return 23; + case 38: + return 29; + case 39: + return 30; + case 40: + this.begin("acc_title"); + return 31; + case 41: + this.popState(); + return "acc_title_value"; + case 42: + this.begin("acc_descr"); + return 33; + case 43: + this.popState(); + return "acc_descr_value"; + case 44: + this.begin("acc_descr_multiline"); + break; + case 45: + this.popState(); + break; + case 46: + return "acc_descr_multiline_value"; + case 47: + return 6; + case 48: + return 18; + case 49: + return 20; + case 50: + return 64; + case 51: + return 5; + case 52: + yy_.yytext = yy_.yytext.trim(); + return 70; + case 53: + return 73; + case 54: + return 74; + case 55: + return 71; + case 56: + return 72; + case 57: + return 75; + case 58: + return 76; + case 59: + return 77; + case 60: + return 78; + case 61: + return 79; + case 62: + return 68; + case 63: + return 69; + case 64: + return 5; + case 65: + return "INVALID"; + } + }, + rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [45, 46], "inclusive": false }, "acc_descr": { "rules": [43], "inclusive": false }, "acc_title": { "rules": [41], "inclusive": false }, "ID": { "rules": [2, 3, 12], "inclusive": false }, "ALIAS": { "rules": [2, 3, 13, 14], "inclusive": false }, "LINE": { "rules": [2, 3, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let prevActor = void 0; +let actors = {}; +let createdActors = {}; +let destroyedActors = {}; +let boxes = []; +let messages = []; +let sequenceNumbersEnabled = false; +let wrapEnabled; +let currentBox = void 0; +let lastCreated = void 0; +let lastDestroyed = void 0; +const addBox = function(data) { + boxes.push({ + name: data.text, + wrap: data.wrap === void 0 && autoWrap() || !!data.wrap, + fill: data.color, + actorKeys: [] + }); + currentBox = boxes.slice(-1)[0]; +}; +const addActor = function(id, name, description, type) { + let assignedBox = currentBox; + const old = actors[id]; + if (old) { + if (currentBox && old.box && currentBox !== old.box) { + throw new Error( + "A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + currentBox.name + "' at the same time." + ); + } + assignedBox = old.box ? old.box : currentBox; + old.box = assignedBox; + if (old && name === old.name && description == null) { + return; + } + } + if (description == null || description.text == null) { + description = { text: name, wrap: null, type }; + } + if (type == null || description.text == null) { + description = { text: name, wrap: null, type }; + } + actors[id] = { + box: assignedBox, + name, + description: description.text, + wrap: description.wrap === void 0 && autoWrap() || !!description.wrap, + prevActor, + links: {}, + properties: {}, + actorCnt: null, + rectData: null, + type: type || "participant" + }; + if (prevActor && actors[prevActor]) { + actors[prevActor].nextActor = id; + } + if (currentBox) { + currentBox.actorKeys.push(id); + } + prevActor = id; +}; +const activationCount = (part) => { + let i; + let count = 0; + for (i = 0; i < messages.length; i++) { + if (messages[i].type === LINETYPE.ACTIVE_START && messages[i].from.actor === part) { + count++; + } + if (messages[i].type === LINETYPE.ACTIVE_END && messages[i].from.actor === part) { + count--; + } + } + return count; +}; +const addMessage = function(idFrom, idTo, message, answer) { + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + answer + }); +}; +const addSignal = function(idFrom, idTo, message = { text: void 0, wrap: void 0 }, messageType, activate = false) { + if (messageType === LINETYPE.ACTIVE_END) { + const cnt = activationCount(idFrom.actor); + if (cnt < 1) { + let error = new Error("Trying to inactivate an inactive participant (" + idFrom.actor + ")"); + error.hash = { + text: "->>-", + token: "->>-", + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["'ACTIVE_PARTICIPANT'"] + }; + throw error; + } + } + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: messageType, + activate + }); + return true; +}; +const hasAtLeastOneBox = function() { + return boxes.length > 0; +}; +const hasAtLeastOneBoxWithTitle = function() { + return boxes.some((b) => b.name); +}; +const getMessages = function() { + return messages; +}; +const getBoxes = function() { + return boxes; +}; +const getActors = function() { + return actors; +}; +const getCreatedActors = function() { + return createdActors; +}; +const getDestroyedActors = function() { + return destroyedActors; +}; +const getActor = function(id) { + return actors[id]; +}; +const getActorKeys = function() { + return Object.keys(actors); +}; +const enableSequenceNumbers = function() { + sequenceNumbersEnabled = true; +}; +const disableSequenceNumbers = function() { + sequenceNumbersEnabled = false; +}; +const showSequenceNumbers = () => sequenceNumbersEnabled; +const setWrap = function(wrapSetting) { + wrapEnabled = wrapSetting; +}; +const autoWrap = () => { + if (wrapEnabled !== void 0) { + return wrapEnabled; + } + return getConfig().sequence.wrap; +}; +const clear = function() { + actors = {}; + createdActors = {}; + destroyedActors = {}; + boxes = []; + messages = []; + sequenceNumbersEnabled = false; + clear$1(); +}; +const parseMessage = function(str) { + const _str = str.trim(); + const message = { + text: _str.replace(/^:?(?:no)?wrap:/, "").trim(), + wrap: _str.match(/^:?wrap:/) !== null ? true : _str.match(/^:?nowrap:/) !== null ? false : void 0 + }; + log.debug("parseMessage:", message); + return message; +}; +const parseBoxData = function(str) { + const match = str.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/); + let color = match != null && match[1] ? match[1].trim() : "transparent"; + let title = match != null && match[2] ? match[2].trim() : void 0; + if (window && window.CSS) { + if (!window.CSS.supports("color", color)) { + color = "transparent"; + title = str.trim(); + } + } else { + const style = new Option().style; + style.color = color; + if (style.color !== color) { + color = "transparent"; + title = str.trim(); + } + } + const boxData = { + color, + text: title !== void 0 ? sanitizeText(title.replace(/^:?(?:no)?wrap:/, ""), getConfig()) : void 0, + wrap: title !== void 0 ? title.match(/^:?wrap:/) !== null ? true : title.match(/^:?nowrap:/) !== null ? false : void 0 : void 0 + }; + return boxData; +}; +const LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25, + AUTONUMBER: 26, + CRITICAL_START: 27, + CRITICAL_OPTION: 28, + CRITICAL_END: 29, + BREAK_START: 30, + BREAK_END: 31, + PAR_OVER_START: 32 +}; +const ARROWTYPE = { + FILLED: 0, + OPEN: 1 +}; +const PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}; +const addNote = function(actor, placement, message) { + ({ + actor, + placement, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap + }); + const actors2 = [].concat(actor, actor); + messages.push({ + from: actors2[0], + to: actors2[1], + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: LINETYPE.NOTE, + placement + }); +}; +const addLinks = function(actorId, text) { + const actor = getActor(actorId); + try { + let sanitizedText = sanitizeText(text.text, getConfig()); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + const links = JSON.parse(sanitizedText); + insertLinks(actor, links); + } catch (e) { + log.error("error while parsing actor link text", e); + } +}; +const addALink = function(actorId, text) { + const actor = getActor(actorId); + try { + const links = {}; + let sanitizedText = sanitizeText(text.text, getConfig()); + var sep = sanitizedText.indexOf("@"); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + var label = sanitizedText.slice(0, sep - 1).trim(); + var link = sanitizedText.slice(sep + 1).trim(); + links[label] = link; + insertLinks(actor, links); + } catch (e) { + log.error("error while parsing actor link text", e); + } +}; +function insertLinks(actor, links) { + if (actor.links == null) { + actor.links = links; + } else { + for (let key in links) { + actor.links[key] = links[key]; + } + } +} +const addProperties = function(actorId, text) { + const actor = getActor(actorId); + try { + let sanitizedText = sanitizeText(text.text, getConfig()); + const properties = JSON.parse(sanitizedText); + insertProperties(actor, properties); + } catch (e) { + log.error("error while parsing actor properties text", e); + } +}; +function insertProperties(actor, properties) { + if (actor.properties == null) { + actor.properties = properties; + } else { + for (let key in properties) { + actor.properties[key] = properties[key]; + } + } +} +function boxEnd() { + currentBox = void 0; +} +const addDetails = function(actorId, text) { + const actor = getActor(actorId); + const elem = document.getElementById(text.text); + try { + const text2 = elem.innerHTML; + const details = JSON.parse(text2); + if (details["properties"]) { + insertProperties(actor, details["properties"]); + } + if (details["links"]) { + insertLinks(actor, details["links"]); + } + } catch (e) { + log.error("error while parsing actor details text", e); + } +}; +const getActorProperty = function(actor, key) { + if (actor !== void 0 && actor.properties !== void 0) { + return actor.properties[key]; + } + return void 0; +}; +const apply = function(param) { + if (Array.isArray(param)) { + param.forEach(function(item) { + apply(item); + }); + } else { + switch (param.type) { + case "sequenceIndex": + messages.push({ + from: void 0, + to: void 0, + message: { + start: param.sequenceIndex, + step: param.sequenceIndexStep, + visible: param.sequenceVisible + }, + wrap: false, + type: param.signalType + }); + break; + case "addParticipant": + addActor(param.actor, param.actor, param.description, param.draw); + break; + case "createParticipant": + if (actors[param.actor]) { + throw new Error( + "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior" + ); + } + lastCreated = param.actor; + addActor(param.actor, param.actor, param.description, param.draw); + createdActors[param.actor] = messages.length; + break; + case "destroyParticipant": + lastDestroyed = param.actor; + destroyedActors[param.actor] = messages.length; + break; + case "activeStart": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "activeEnd": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "addNote": + addNote(param.actor, param.placement, param.text); + break; + case "addLinks": + addLinks(param.actor, param.text); + break; + case "addALink": + addALink(param.actor, param.text); + break; + case "addProperties": + addProperties(param.actor, param.text); + break; + case "addDetails": + addDetails(param.actor, param.text); + break; + case "addMessage": + if (lastCreated) { + if (param.to !== lastCreated) { + throw new Error( + "The created participant " + lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram." + ); + } else { + lastCreated = void 0; + } + } else if (lastDestroyed) { + if (param.to !== lastDestroyed && param.from !== lastDestroyed) { + throw new Error( + "The destroyed participant " + lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram." + ); + } else { + lastDestroyed = void 0; + } + } + addSignal(param.from, param.to, param.msg, param.signalType, param.activate); + break; + case "boxStart": + addBox(param.boxData); + break; + case "boxEnd": + boxEnd(); + break; + case "loopStart": + addSignal(void 0, void 0, param.loopText, param.signalType); + break; + case "loopEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "rectStart": + addSignal(void 0, void 0, param.color, param.signalType); + break; + case "rectEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "optStart": + addSignal(void 0, void 0, param.optText, param.signalType); + break; + case "optEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "altStart": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "else": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "altEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "setAccTitle": + setAccTitle(param.text); + break; + case "parStart": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "and": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "parEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "criticalStart": + addSignal(void 0, void 0, param.criticalText, param.signalType); + break; + case "option": + addSignal(void 0, void 0, param.optionText, param.signalType); + break; + case "criticalEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "breakStart": + addSignal(void 0, void 0, param.breakText, param.signalType); + break; + case "breakEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + } + } +}; +const db = { + addActor, + addMessage, + addSignal, + addLinks, + addDetails, + addProperties, + autoWrap, + setWrap, + enableSequenceNumbers, + disableSequenceNumbers, + showSequenceNumbers, + getMessages, + getActors, + getCreatedActors, + getDestroyedActors, + getActor, + getActorKeys, + getActorProperty, + getAccTitle, + getBoxes, + getDiagramTitle, + setDiagramTitle, + getConfig: () => getConfig().sequence, + clear, + parseMessage, + parseBoxData, + LINETYPE, + ARROWTYPE, + PLACEMENT, + addNote, + setAccTitle, + apply, + setAccDescription, + getAccDescription, + hasAtLeastOneBox, + hasAtLeastOneBoxWithTitle +}; +const getStyles = (options) => `.actor { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + } + + text.actor > tspan { + fill: ${options.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${options.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${options.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${options.signalColor}; + } + + #arrowhead path { + fill: ${options.signalColor}; + stroke: ${options.signalColor}; + } + + .sequenceNumber { + fill: ${options.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${options.signalColor}; + } + + #crosshead path { + fill: ${options.signalColor}; + stroke: ${options.signalColor}; + } + + .messageText { + fill: ${options.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${options.labelBoxBorderColor}; + fill: ${options.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${options.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${options.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${options.labelBoxBorderColor}; + fill: ${options.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${options.noteBorderColor}; + fill: ${options.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${options.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .activation1 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .activation2 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${options.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + } + .actor-man circle, line { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + stroke-width: 2px; + } +`; +const styles = getStyles; +const ACTOR_TYPE_WIDTH = 18 * 2; +const drawRect = function(elem, rectData) { + return drawRect$1(elem, rectData); +}; +const addPopupInteraction = (id, actorCnt2) => { + addFunction(() => { + const arr = document.querySelectorAll(id); + if (arr.length === 0) { + return; + } + arr[0].addEventListener("mouseover", function() { + popupMenuUpFunc("actor" + actorCnt2 + "_popup"); + }); + arr[0].addEventListener("mouseout", function() { + popupMenuDownFunc("actor" + actorCnt2 + "_popup"); + }); + }); +}; +const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) { + if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) { + return { height: 0, width: 0 }; + } + const links = actor.links; + const actorCnt2 = actor.actorCnt; + const rectData = actor.rectData; + var displayValue = "none"; + if (forceMenus) { + displayValue = "block !important"; + } + const g = elem.append("g"); + g.attr("id", "actor" + actorCnt2 + "_popup"); + g.attr("class", "actorPopupMenu"); + g.attr("display", displayValue); + addPopupInteraction("#actor" + actorCnt2 + "_popup", actorCnt2); + var actorClass = ""; + if (rectData.class !== void 0) { + actorClass = " " + rectData.class; + } + let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth; + const rectElem = g.append("rect"); + rectElem.attr("class", "actorPopupMenuPanel" + actorClass); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.height); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", menuWidth); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (links != null) { + var linkY = 20; + for (let key in links) { + var linkElem = g.append("a"); + var sanitizedLink = sanitizeUrl(links[key]); + linkElem.attr("xlink:href", sanitizedLink); + linkElem.attr("target", "_blank"); + _drawMenuItemTextCandidateFunc(textAttrs)( + key, + linkElem, + rectData.x + 10, + rectData.height + linkY, + menuWidth, + 20, + { class: "actor" }, + textAttrs + ); + linkY += 30; + } + } + rectElem.attr("height", linkY); + return { height: rectData.height + linkY, width: menuWidth }; +}; +const popupMenu = function(popid) { + return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'block'; }"; +}; +const popdownMenu = function(popid) { + return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'none'; }"; +}; +const popupMenuUpFunc = function(popupId) { + var pu = document.getElementById(popupId); + if (pu != null) { + pu.style.display = "block"; + } +}; +const popupMenuDownFunc = function(popupId) { + var pu = document.getElementById(popupId); + if (pu != null) { + pu.style.display = "none"; + } +}; +const drawText = function(elem, textData) { + let prevTextHeight = 0; + let textHeight = 0; + const lines = textData.text.split(common.lineBreakRegex); + const [_textFontSize, _textFontSizePx] = parseFontSize(textData.fontSize); + let textElems = []; + let dy = 0; + let yfunc = () => textData.y; + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + switch (textData.valign) { + case "top": + case "start": + yfunc = () => Math.round(textData.y + textData.textMargin); + break; + case "middle": + case "center": + yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2); + break; + case "bottom": + case "end": + yfunc = () => Math.round( + textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin + ); + break; + } + } + if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) { + switch (textData.anchor) { + case "left": + case "start": + textData.x = Math.round(textData.x + textData.textMargin); + textData.anchor = "start"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "middle": + case "center": + textData.x = Math.round(textData.x + textData.width / 2); + textData.anchor = "middle"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "right": + case "end": + textData.x = Math.round(textData.x + textData.width - textData.textMargin); + textData.anchor = "end"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + } + } + for (let [i, line] of lines.entries()) { + if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) { + dy = i * _textFontSize; + } + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", yfunc()); + if (textData.anchor !== void 0) { + textElem.attr("text-anchor", textData.anchor).attr("dominant-baseline", textData.dominantBaseline).attr("alignment-baseline", textData.alignmentBaseline); + } + if (textData.fontFamily !== void 0) { + textElem.style("font-family", textData.fontFamily); + } + if (_textFontSizePx !== void 0) { + textElem.style("font-size", _textFontSizePx); + } + if (textData.fontWeight !== void 0) { + textElem.style("font-weight", textData.fontWeight); + } + if (textData.fill !== void 0) { + textElem.attr("fill", textData.fill); + } + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + if (textData.dy !== void 0) { + textElem.attr("dy", textData.dy); + } else if (dy !== 0) { + textElem.attr("dy", dy); + } + const text = line || ZERO_WIDTH_SPACE; + if (textData.tspan) { + const span = textElem.append("tspan"); + span.attr("x", textData.x); + if (textData.fill !== void 0) { + span.attr("fill", textData.fill); + } + span.text(text); + } else { + textElem.text(text); + } + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + textHeight += (textElem._groups || textElem)[0][0].getBBox().height; + prevTextHeight = textHeight; + } + textElems.push(textElem); + } + return textElems; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.height / 2; + drawText(elem, txtObject); + return polygon; +}; +let actorCnt = -1; +const fixLifeLineHeights = (diagram2, actors2, actorKeys, conf2) => { + if (!diagram2.select) { + return; + } + actorKeys.forEach((actorKey) => { + const actor = actors2[actorKey]; + const actorDOM = diagram2.select("#actor" + actor.actorCnt); + if (!conf2.mirrorActors && actor.stopy) { + actorDOM.attr("y2", actor.stopy + actor.height / 2); + } else if (conf2.mirrorActors) { + actorDOM.attr("y2", actor.stopy); + } + }); +}; +const drawActorTypeParticipant = function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center = actor.x + actor.width / 2; + const centerY = actorY + 5; + const boxpluslineGroup = elem.append("g").lower(); + var g = boxpluslineGroup; + if (!isFooter) { + actorCnt++; + g.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + g = boxpluslineGroup.append("g"); + actor.actorCnt = actorCnt; + if (actor.links != null) { + g.attr("id", "root-" + actorCnt); + addPopupInteraction("#root-" + actorCnt, actorCnt); + } + } + const rect = getNoteRect$1(); + var cssclass = "actor"; + if (actor.properties != null && actor.properties["class"]) { + cssclass = actor.properties["class"]; + } else { + rect.fill = "#eaeaea"; + } + rect.x = actor.x; + rect.y = actorY; + rect.width = actor.width; + rect.height = actor.height; + rect.class = cssclass; + rect.rx = 3; + rect.ry = 3; + const rectElem = drawRect(g, rect); + actor.rectData = rect; + if (actor.properties != null && actor.properties["icon"]) { + const iconSrc = actor.properties["icon"].trim(); + if (iconSrc.charAt(0) === "@") { + drawEmbeddedImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1)); + } else { + drawImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc); + } + } + _drawTextCandidateFunc(conf2)( + actor.description, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); + let height = actor.height; + if (rectElem.node) { + const bounds2 = rectElem.node().getBBox(); + actor.height = bounds2.height; + height = bounds2.height; + } + return height; +}; +const drawActorTypeActor = function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center = actor.x + actor.width / 2; + const centerY = actorY + 80; + elem.lower(); + if (!isFooter) { + actorCnt++; + elem.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + actor.actorCnt = actorCnt; + } + const actElem = elem.append("g"); + actElem.attr("class", "actor-man"); + const rect = getNoteRect$1(); + rect.x = actor.x; + rect.y = actorY; + rect.fill = "#eaeaea"; + rect.width = actor.width; + rect.height = actor.height; + rect.class = "actor"; + rect.rx = 3; + rect.ry = 3; + actElem.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", center).attr("y1", actorY + 25).attr("x2", center).attr("y2", actorY + 45); + actElem.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 33).attr("x2", center + ACTOR_TYPE_WIDTH / 2).attr("y2", actorY + 33); + actElem.append("line").attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 60).attr("x2", center).attr("y2", actorY + 45); + actElem.append("line").attr("x1", center).attr("y1", actorY + 45).attr("x2", center + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", actorY + 60); + const circle = actElem.append("circle"); + circle.attr("cx", actor.x + actor.width / 2); + circle.attr("cy", actorY + 10); + circle.attr("r", 15); + circle.attr("width", actor.width); + circle.attr("height", actor.height); + const bounds2 = actElem.node().getBBox(); + actor.height = bounds2.height; + _drawTextCandidateFunc(conf2)( + actor.description, + actElem, + rect.x, + rect.y + 35, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); + return actor.height; +}; +const drawActor = function(elem, actor, conf2, isFooter) { + switch (actor.type) { + case "actor": + return drawActorTypeActor(elem, actor, conf2, isFooter); + case "participant": + return drawActorTypeParticipant(elem, actor, conf2, isFooter); + } +}; +const drawBox = function(elem, box, conf2) { + const boxplustextGroup = elem.append("g"); + const g = boxplustextGroup; + drawBackgroundRect(g, box); + if (box.name) { + _drawTextCandidateFunc(conf2)( + box.name, + g, + box.x, + box.y + (box.textMaxHeight || 0) / 2, + box.width, + 0, + { class: "text" }, + conf2 + ); + } + g.lower(); +}; +const anchorElement = function(elem) { + return elem.append("g"); +}; +const drawActivation = function(elem, bounds2, verticalPos, conf2, actorActivations2) { + const rect = getNoteRect$1(); + const g = bounds2.anchored; + rect.x = bounds2.startx; + rect.y = bounds2.starty; + rect.class = "activation" + actorActivations2 % 3; + rect.width = bounds2.stopx - bounds2.startx; + rect.height = verticalPos - bounds2.starty; + drawRect(g, rect); +}; +const drawLoop = function(elem, loopModel, labelText, conf2) { + const { + boxMargin, + boxTextMargin, + labelBoxHeight, + labelBoxWidth, + messageFontFamily: fontFamily, + messageFontSize: fontSize, + messageFontWeight: fontWeight + } = conf2; + const g = elem.append("g"); + const drawLoopLine = function(startx, starty, stopx, stopy) { + return g.append("line").attr("x1", startx).attr("y1", starty).attr("x2", stopx).attr("y2", stopy).attr("class", "loopLine"); + }; + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty); + drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy); + if (loopModel.sections !== void 0) { + loopModel.sections.forEach(function(item) { + drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style( + "stroke-dasharray", + "3, 3" + ); + }); + } + let txt = getTextObj$1(); + txt.text = labelText; + txt.x = loopModel.startx; + txt.y = loopModel.starty; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.width = labelBoxWidth || 50; + txt.height = labelBoxHeight || 20; + txt.textMargin = boxTextMargin; + txt.class = "labelText"; + drawLabel(g, txt); + txt = getTextObj(); + txt.text = loopModel.title; + txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.starty + boxMargin + boxTextMargin; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.textMargin = boxTextMargin; + txt.class = "loopText"; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = true; + let textElem = drawText(g, txt); + if (loopModel.sectionTitles !== void 0) { + loopModel.sectionTitles.forEach(function(item, idx) { + if (item.message) { + txt.text = item.message; + txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin; + txt.class = "loopText"; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = loopModel.wrap; + textElem = drawText(g, txt); + let sectionHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin); + } + }); + } + loopModel.height = Math.round(loopModel.stopy - loopModel.starty); + return g; +}; +const drawBackgroundRect = function(elem, bounds2) { + drawBackgroundRect$1(elem, bounds2); +}; +const insertDatabaseIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}; +const insertComputerIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}; +const insertClockIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}; +const insertArrowHead = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); +}; +const insertArrowFilledHead = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const insertSequenceNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}; +const insertArrowCrossHead = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7"); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: void 0, + style: "#666", + width: void 0, + height: void 0, + textMargin: 0, + rx: 0, + ry: 0, + tspan: true, + valign: void 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + fill: "#EDF2AE", + stroke: "#666", + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const [_actorFontSize, _actorFontSizePx] = parseFontSize(actorFontSize); + const lines = content.split(common.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * _actorFontSize - _actorFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").style("font-size", _actorFontSizePx).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const _drawMenuItemTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const lines = content.split(common.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").style("font-size", actorFontSize).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text.append("tspan").attr("x", x).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const svgDraw = { + drawRect, + drawText, + drawLabel, + drawActor, + drawBox, + drawPopup, + anchorElement, + drawActivation, + drawLoop, + drawBackgroundRect, + insertArrowHead, + insertArrowFilledHead, + insertSequenceNumber, + insertArrowCrossHead, + insertDatabaseIcon, + insertComputerIcon, + insertClockIcon, + getTextObj, + getNoteRect, + popupMenu, + popdownMenu, + fixLifeLineHeights, + sanitizeUrl +}; +let conf = {}; +const bounds = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + activations: [], + models: { + getHeight: function() { + return Math.max.apply( + null, + this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0) + ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h)); + }, + clear: function() { + this.actors = []; + this.boxes = []; + this.loops = []; + this.messages = []; + this.notes = []; + }, + addBox: function(boxModel) { + this.boxes.push(boxModel); + }, + addActor: function(actorModel) { + this.actors.push(actorModel); + }, + addLoop: function(loopModel) { + this.loops.push(loopModel); + }, + addMessage: function(msgModel) { + this.messages.push(msgModel); + }, + addNote: function(noteModel) { + this.notes.push(noteModel); + }, + lastActor: function() { + return this.actors[this.actors.length - 1]; + }, + lastLoop: function() { + return this.loops[this.loops.length - 1]; + }, + lastMessage: function() { + return this.messages[this.messages.length - 1]; + }, + lastNote: function() { + return this.notes[this.notes.length - 1]; + }, + actors: [], + boxes: [], + loops: [], + messages: [], + notes: [] + }, + init: function() { + this.sequenceItems = []; + this.activations = []; + this.models.clear(); + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + setConf(getConfig()); + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const _self = this; + let cnt = 0; + function updateFn(type) { + return function updateItemBounds(item) { + cnt++; + const n = _self.sequenceItems.length - cnt + 1; + _self.updateVal(item, "starty", starty - n * conf.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, "startx", startx - n * conf.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopx", stopx + n * conf.boxMargin, Math.max); + if (!(type === "activation")) { + _self.updateVal(item, "startx", startx - n * conf.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, "starty", starty - n * conf.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopy", stopy + n * conf.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + this.activations.forEach(updateFn("activation")); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = common.getMin(startx, stopx); + const _stopx = common.getMax(startx, stopx); + const _starty = common.getMin(starty, stopy); + const _stopy = common.getMax(starty, stopy); + this.updateVal(bounds.data, "startx", _startx, Math.min); + this.updateVal(bounds.data, "starty", _starty, Math.min); + this.updateVal(bounds.data, "stopx", _stopx, Math.max); + this.updateVal(bounds.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + newActivation: function(message, diagram2, actors2) { + const actorRect = actors2[message.from.actor]; + const stackedSize = actorActivations(message.from.actor).length || 0; + const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + this.activations.push({ + startx: x, + starty: this.verticalPos + 2, + stopx: x + conf.activationWidth, + stopy: void 0, + actor: message.from.actor, + anchored: svgDraw.anchorElement(diagram2) + }); + }, + endActivation: function(message) { + const lastActorActivationIdx = this.activations.map(function(activation) { + return activation.actor; + }).lastIndexOf(message.from.actor); + return this.activations.splice(lastActorActivationIdx, 1)[0]; + }, + createLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { + return { + startx: void 0, + starty: this.verticalPos, + stopx: void 0, + stopy: void 0, + title: title.message, + wrap: title.wrap, + width: title.width, + height: 0, + fill + }; + }, + newLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { + this.sequenceItems.push(this.createLoop(title, fill)); + }, + endLoop: function() { + return this.sequenceItems.pop(); + }, + isLoopOverlap: function() { + return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false; + }, + addSectionToLoop: function(message) { + const loop = this.sequenceItems.pop(); + loop.sections = loop.sections || []; + loop.sectionTitles = loop.sectionTitles || []; + loop.sections.push({ y: bounds.getVerticalPos(), height: 0 }); + loop.sectionTitles.push(message); + this.sequenceItems.push(loop); + }, + saveVerticalPos: function() { + if (this.isLoopOverlap()) { + this.savedVerticalPos = this.verticalPos; + } + }, + resetVerticalPos: function() { + if (this.isLoopOverlap()) { + this.verticalPos = this.savedVerticalPos; + } + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = common.getMax(this.data.stopy, this.verticalPos); + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return { bounds: this.data, models: this.models }; + } +}; +const drawNote = function(elem, noteModel) { + bounds.bumpVerticalPos(conf.boxMargin); + noteModel.height = conf.boxMargin; + noteModel.starty = bounds.getVerticalPos(); + const rect = getNoteRect$1(); + rect.x = noteModel.startx; + rect.y = noteModel.starty; + rect.width = noteModel.width || conf.width; + rect.class = "note"; + const g = elem.append("g"); + const rectElem = svgDraw.drawRect(g, rect); + const textObj = getTextObj$1(); + textObj.x = noteModel.startx; + textObj.y = noteModel.starty; + textObj.width = rect.width; + textObj.dy = "1em"; + textObj.text = noteModel.message; + textObj.class = "noteText"; + textObj.fontFamily = conf.noteFontFamily; + textObj.fontSize = conf.noteFontSize; + textObj.fontWeight = conf.noteFontWeight; + textObj.anchor = conf.noteAlign; + textObj.textMargin = conf.noteMargin; + textObj.valign = "center"; + const textElem = drawText(g, textObj); + const textHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + rectElem.attr("height", textHeight + 2 * conf.noteMargin); + noteModel.height += textHeight + 2 * conf.noteMargin; + bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin); + noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin; + noteModel.stopx = noteModel.startx + rect.width; + bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy); + bounds.models.addNote(noteModel); +}; +const messageFont = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; +}; +const noteFont = (cnf) => { + return { + fontFamily: cnf.noteFontFamily, + fontSize: cnf.noteFontSize, + fontWeight: cnf.noteFontWeight + }; +}; +const actorFont = (cnf) => { + return { + fontFamily: cnf.actorFontFamily, + fontSize: cnf.actorFontSize, + fontWeight: cnf.actorFontWeight + }; +}; +function boundMessage(_diagram, msgModel) { + bounds.bumpVerticalPos(10); + const { startx, stopx, message } = msgModel; + const lines = common.splitBreaks(message).length; + const textDims = utils.calculateTextDimensions(message, messageFont(conf)); + const lineHeight = textDims.height / lines; + msgModel.height += lineHeight; + bounds.bumpVerticalPos(lineHeight); + let lineStartY; + let totalOffset = textDims.height - 10; + const textWidth = textDims.width; + if (startx === stopx) { + lineStartY = bounds.getVerticalPos() + totalOffset; + if (!conf.rightAngles) { + totalOffset += conf.boxMargin; + lineStartY = bounds.getVerticalPos() + totalOffset; + } + totalOffset += 30; + const dx = common.getMax(textWidth / 2, conf.width / 2); + bounds.insert( + startx - dx, + bounds.getVerticalPos() - 10 + totalOffset, + stopx + dx, + bounds.getVerticalPos() + 30 + totalOffset + ); + } else { + totalOffset += conf.boxMargin; + lineStartY = bounds.getVerticalPos() + totalOffset; + bounds.insert(startx, lineStartY - 10, stopx, lineStartY); + } + bounds.bumpVerticalPos(totalOffset); + msgModel.height += totalOffset; + msgModel.stopy = msgModel.starty + msgModel.height; + bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy); + return lineStartY; +} +const drawMessage = function(diagram2, msgModel, lineStartY, diagObj) { + const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel; + const textDims = utils.calculateTextDimensions(message, messageFont(conf)); + const textObj = getTextObj$1(); + textObj.x = startx; + textObj.y = starty + 10; + textObj.width = stopx - startx; + textObj.class = "messageText"; + textObj.dy = "1em"; + textObj.text = message; + textObj.fontFamily = conf.messageFontFamily; + textObj.fontSize = conf.messageFontSize; + textObj.fontWeight = conf.messageFontWeight; + textObj.anchor = conf.messageAlign; + textObj.valign = "center"; + textObj.textMargin = conf.wrapPadding; + textObj.tspan = false; + drawText(diagram2, textObj); + const textWidth = textDims.width; + let line; + if (startx === stopx) { + if (conf.rightAngles) { + line = diagram2.append("path").attr( + "d", + `M ${startx},${lineStartY} H ${startx + common.getMax(conf.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}` + ); + } else { + line = diagram2.append("path").attr( + "d", + "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20) + ); + } + } else { + line = diagram2.append("line"); + line.attr("x1", startx); + line.attr("y1", lineStartY); + line.attr("x2", stopx); + line.attr("y2", lineStartY); + } + if (type === diagObj.db.LINETYPE.DOTTED || type === diagObj.db.LINETYPE.DOTTED_CROSS || type === diagObj.db.LINETYPE.DOTTED_POINT || type === diagObj.db.LINETYPE.DOTTED_OPEN) { + line.style("stroke-dasharray", "3, 3"); + line.attr("class", "messageLine1"); + } else { + line.attr("class", "messageLine0"); + } + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + line.attr("stroke-width", 2); + line.attr("stroke", "none"); + line.style("fill", "none"); + if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) { + line.attr("marker-end", "url(" + url + "#filled-head)"); + } + if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) { + line.attr("marker-end", "url(" + url + "#crosshead)"); + } + if (sequenceVisible || conf.showSequenceNumbers) { + line.attr("marker-start", "url(" + url + "#sequencenumber)"); + diagram2.append("text").attr("x", startx).attr("y", lineStartY + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(sequenceIndex); + } +}; +const addActorRenderingData = function(diagram2, actors2, createdActors2, actorKeys, verticalPos, messages2, isFooter) { + let prevWidth = 0; + let prevMargin = 0; + let prevBox = void 0; + let maxHeight = 0; + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + const box = actor.box; + if (prevBox && prevBox != box) { + if (!isFooter) { + bounds.models.addBox(prevBox); + } + prevMargin += conf.boxMargin + prevBox.margin; + } + if (box && box != prevBox) { + if (!isFooter) { + box.x = prevWidth + prevMargin; + box.y = verticalPos; + } + prevMargin += box.margin; + } + actor.width = actor.width || conf.width; + actor.height = common.getMax(actor.height || conf.height, conf.height); + actor.margin = actor.margin || conf.actorMargin; + maxHeight = common.getMax(maxHeight, actor.height); + if (createdActors2[actor.name]) { + prevMargin += actor.width / 2; + } + actor.x = prevWidth + prevMargin; + actor.starty = bounds.getVerticalPos(); + bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height); + prevWidth += actor.width + prevMargin; + if (actor.box) { + actor.box.width = prevWidth + box.margin - actor.box.x; + } + prevMargin = actor.margin; + prevBox = actor.box; + bounds.models.addActor(actor); + } + if (prevBox && !isFooter) { + bounds.models.addBox(prevBox); + } + bounds.bumpVerticalPos(maxHeight); +}; +const drawActors = function(diagram2, actors2, actorKeys, isFooter) { + if (!isFooter) { + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + svgDraw.drawActor(diagram2, actor, conf, false); + } + } else { + let maxHeight = 0; + bounds.bumpVerticalPos(conf.boxMargin * 2); + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + if (!actor.stopy) { + actor.stopy = bounds.getVerticalPos(); + } + const height = svgDraw.drawActor(diagram2, actor, conf, true); + maxHeight = common.getMax(maxHeight, height); + } + bounds.bumpVerticalPos(maxHeight + conf.boxMargin); + } +}; +const drawActorsPopup = function(diagram2, actors2, actorKeys, doc) { + let maxHeight = 0; + let maxWidth = 0; + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + const minMenuWidth = getRequiredPopupWidth(actor); + const menuDimensions = svgDraw.drawPopup( + diagram2, + actor, + minMenuWidth, + conf, + conf.forceMenus, + doc + ); + if (menuDimensions.height > maxHeight) { + maxHeight = menuDimensions.height; + } + if (menuDimensions.width + actor.x > maxWidth) { + maxWidth = menuDimensions.width + actor.x; + } + } + return { maxHeight, maxWidth }; +}; +const setConf = function(cnf) { + assignWithDepth(conf, cnf); + if (cnf.fontFamily) { + conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight; + } +}; +const actorActivations = function(actor) { + return bounds.activations.filter(function(activation) { + return activation.actor === actor; + }); +}; +const activationBounds = function(actor, actors2) { + const actorObj = actors2[actor]; + const activations = actorActivations(actor); + const left = activations.reduce(function(acc, activation) { + return common.getMin(acc, activation.startx); + }, actorObj.x + actorObj.width / 2 - 1); + const right = activations.reduce(function(acc, activation) { + return common.getMax(acc, activation.stopx); + }, actorObj.x + actorObj.width / 2 + 1); + return [left, right]; +}; +function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) { + bounds.bumpVerticalPos(preMargin); + let heightAdjust = postMargin; + if (msg.id && msg.message && loopWidths[msg.id]) { + const loopWidth = loopWidths[msg.id].width; + const textConf = messageFont(conf); + msg.message = utils.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf); + msg.width = loopWidth; + msg.wrap = true; + const textDims = utils.calculateTextDimensions(msg.message, textConf); + const totalOffset = common.getMax(textDims.height, conf.labelBoxHeight); + heightAdjust = postMargin + totalOffset; + log.debug(`${totalOffset} - ${msg.message}`); + } + addLoopFn(msg); + bounds.bumpVerticalPos(heightAdjust); +} +function adjustCreatedDestroyedData(msg, msgModel, lineStartY, index, actors2, createdActors2, destroyedActors2) { + function receiverAdjustment(actor, adjustment) { + if (actor.x < actors2[msg.from].x) { + bounds.insert( + msgModel.stopx - adjustment, + msgModel.starty, + msgModel.startx, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.stopx = msgModel.stopx + adjustment; + } else { + bounds.insert( + msgModel.startx, + msgModel.starty, + msgModel.stopx + adjustment, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.stopx = msgModel.stopx - adjustment; + } + } + function senderAdjustment(actor, adjustment) { + if (actor.x < actors2[msg.to].x) { + bounds.insert( + msgModel.startx - adjustment, + msgModel.starty, + msgModel.stopx, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.startx = msgModel.startx + adjustment; + } else { + bounds.insert( + msgModel.stopx, + msgModel.starty, + msgModel.startx + adjustment, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.startx = msgModel.startx - adjustment; + } + } + if (createdActors2[msg.to] == index) { + const actor = actors2[msg.to]; + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + actor.starty = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors2[msg.from] == index) { + const actor = actors2[msg.from]; + if (conf.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2; + senderAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors2[msg.to] == index) { + const actor = actors2[msg.to]; + if (conf.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } +} +const draw = function(_text, id, _version, diagObj) { + const { securityLevel, sequence } = getConfig(); + conf = sequence; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + bounds.init(); + log.debug(diagObj.db); + const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select(`[id="${id}"]`); + const actors2 = diagObj.db.getActors(); + const createdActors2 = diagObj.db.getCreatedActors(); + const destroyedActors2 = diagObj.db.getDestroyedActors(); + const boxes2 = diagObj.db.getBoxes(); + let actorKeys = diagObj.db.getActorKeys(); + const messages2 = diagObj.db.getMessages(); + const title = diagObj.db.getDiagramTitle(); + const hasBoxes = diagObj.db.hasAtLeastOneBox(); + const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle(); + const maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors2, messages2, diagObj); + conf.height = calculateActorMargins(actors2, maxMessageWidthPerActor, boxes2); + svgDraw.insertComputerIcon(diagram2); + svgDraw.insertDatabaseIcon(diagram2); + svgDraw.insertClockIcon(diagram2); + if (hasBoxes) { + bounds.bumpVerticalPos(conf.boxMargin); + if (hasBoxTitles) { + bounds.bumpVerticalPos(boxes2[0].textMaxHeight); + } + } + if (conf.hideUnusedParticipants === true) { + const newActors = /* @__PURE__ */ new Set(); + messages2.forEach((message) => { + newActors.add(message.from); + newActors.add(message.to); + }); + actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey)); + } + addActorRenderingData(diagram2, actors2, createdActors2, actorKeys, 0, messages2, false); + const loopWidths = calculateLoopBounds(messages2, actors2, maxMessageWidthPerActor, diagObj); + svgDraw.insertArrowHead(diagram2); + svgDraw.insertArrowCrossHead(diagram2); + svgDraw.insertArrowFilledHead(diagram2); + svgDraw.insertSequenceNumber(diagram2); + function activeEnd(msg, verticalPos) { + const activationData = bounds.endActivation(msg); + if (activationData.starty + 18 > verticalPos) { + activationData.starty = verticalPos - 6; + verticalPos += 12; + } + svgDraw.drawActivation( + diagram2, + activationData, + verticalPos, + conf, + actorActivations(msg.from.actor).length + ); + bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos); + } + let sequenceIndex = 1; + let sequenceIndexStep = 1; + const messagesToDraw = []; + const backgrounds = []; + messages2.forEach(function(msg, index) { + let loopModel, noteModel, msgModel; + switch (msg.type) { + case diagObj.db.LINETYPE.NOTE: + bounds.resetVerticalPos(); + noteModel = msg.noteModel; + drawNote(diagram2, noteModel); + break; + case diagObj.db.LINETYPE.ACTIVE_START: + bounds.newActivation(msg, diagram2, actors2); + break; + case diagObj.db.LINETYPE.ACTIVE_END: + activeEnd(msg, bounds.getVerticalPos()); + break; + case diagObj.db.LINETYPE.LOOP_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.LOOP_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "loop", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.RECT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin, + (message) => bounds.newLoop(void 0, message.message) + ); + break; + case diagObj.db.LINETYPE.RECT_END: + loopModel = bounds.endLoop(); + backgrounds.push(loopModel); + bounds.models.addLoop(loopModel); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + break; + case diagObj.db.LINETYPE.OPT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.OPT_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "opt", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.ALT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "alt", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + bounds.saveVerticalPos(); + break; + case diagObj.db.LINETYPE.PAR_AND: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.PAR_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "par", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.AUTONUMBER: + sequenceIndex = msg.message.start || sequenceIndex; + sequenceIndexStep = msg.message.step || sequenceIndexStep; + if (msg.message.visible) { + diagObj.db.enableSequenceNumbers(); + } else { + diagObj.db.disableSequenceNumbers(); + } + break; + case diagObj.db.LINETYPE.CRITICAL_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_OPTION: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "critical", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.BREAK_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.BREAK_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "break", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + default: + try { + msgModel = msg.msgModel; + msgModel.starty = bounds.getVerticalPos(); + msgModel.sequenceIndex = sequenceIndex; + msgModel.sequenceVisible = diagObj.db.showSequenceNumbers(); + const lineStartY = boundMessage(diagram2, msgModel); + adjustCreatedDestroyedData( + msg, + msgModel, + lineStartY, + index, + actors2, + createdActors2, + destroyedActors2 + ); + messagesToDraw.push({ messageModel: msgModel, lineStartY }); + bounds.models.addMessage(msgModel); + } catch (e) { + log.error("error while drawing message", e); + } + } + if ([ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + sequenceIndex = sequenceIndex + sequenceIndexStep; + } + }); + log.debug("createdActors", createdActors2); + log.debug("destroyedActors", destroyedActors2); + drawActors(diagram2, actors2, actorKeys, false); + messagesToDraw.forEach((e) => drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj)); + if (conf.mirrorActors) { + drawActors(diagram2, actors2, actorKeys, true); + } + backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram2, e)); + fixLifeLineHeights(diagram2, actors2, actorKeys, conf); + bounds.models.boxes.forEach(function(box2) { + box2.height = bounds.getVerticalPos() - box2.y; + bounds.insert(box2.x, box2.y, box2.x + box2.width, box2.height); + box2.startx = box2.x; + box2.starty = box2.y; + box2.stopx = box2.startx + box2.width; + box2.stopy = box2.starty + box2.height; + box2.stroke = "rgb(0,0,0, 0.5)"; + svgDraw.drawBox(diagram2, box2, conf); + }); + if (hasBoxes) { + bounds.bumpVerticalPos(conf.boxMargin); + } + const requiredBoxSize = drawActorsPopup(diagram2, actors2, actorKeys, doc); + const { bounds: box } = bounds.getBounds(); + let boxHeight = box.stopy - box.starty; + if (boxHeight < requiredBoxSize.maxHeight) { + boxHeight = requiredBoxSize.maxHeight; + } + let height = boxHeight + 2 * conf.diagramMarginY; + if (conf.mirrorActors) { + height = height - conf.boxMargin + conf.bottomMarginAdj; + } + let boxWidth = box.stopx - box.startx; + if (boxWidth < requiredBoxSize.maxWidth) { + boxWidth = requiredBoxSize.maxWidth; + } + const width = boxWidth + 2 * conf.diagramMarginX; + if (title) { + diagram2.append("text").text(title).attr("x", (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr("y", -25); + } + configureSvgSize(diagram2, height, width, conf.useMaxWidth); + const extraVertForTitle = title ? 40 : 0; + diagram2.attr( + "viewBox", + box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); + log.debug(`models:`, bounds.models); +}; +function getMaxMessageWidthPerActor(actors2, messages2, diagObj) { + const maxMessageWidthPerActor = {}; + messages2.forEach(function(msg) { + if (actors2[msg.to] && actors2[msg.from]) { + const actor = actors2[msg.to]; + if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) { + return; + } + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) { + return; + } + const isNote = msg.placement !== void 0; + const isMessage = !isNote; + const textFont = isNote ? noteFont(conf) : messageFont(conf); + const wrappedMessage = msg.wrap ? utils.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message; + const messageDimensions = utils.calculateTextDimensions(wrappedMessage, textFont); + const messageWidth = messageDimensions.width + 2 * conf.wrapPadding; + if (isMessage && msg.from === actor.nextActor) { + maxMessageWidthPerActor[msg.to] = common.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth + ); + } else if (isMessage && msg.from === actor.prevActor) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (isMessage && msg.from === msg.to) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + maxMessageWidthPerActor[msg.to] = common.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth / 2 + ); + } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + maxMessageWidthPerActor[actor.prevActor] = common.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.OVER) { + if (actor.prevActor) { + maxMessageWidthPerActor[actor.prevActor] = common.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth / 2 + ); + } + if (actor.nextActor) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + } + } + } + }); + log.debug("maxMessageWidthPerActor:", maxMessageWidthPerActor); + return maxMessageWidthPerActor; +} +const getRequiredPopupWidth = function(actor) { + let requiredPopupWidth = 0; + const textFont = actorFont(conf); + for (const key in actor.links) { + const labelDimensions = utils.calculateTextDimensions(key, textFont); + const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin; + if (requiredPopupWidth < labelWidth) { + requiredPopupWidth = labelWidth; + } + } + return requiredPopupWidth; +}; +function calculateActorMargins(actors2, actorToMessageWidth, boxes2) { + let maxHeight = 0; + Object.keys(actors2).forEach((prop) => { + const actor = actors2[prop]; + if (actor.wrap) { + actor.description = utils.wrapLabel( + actor.description, + conf.width - 2 * conf.wrapPadding, + actorFont(conf) + ); + } + const actDims = utils.calculateTextDimensions(actor.description, actorFont(conf)); + actor.width = actor.wrap ? conf.width : common.getMax(conf.width, actDims.width + 2 * conf.wrapPadding); + actor.height = actor.wrap ? common.getMax(actDims.height, conf.height) : conf.height; + maxHeight = common.getMax(maxHeight, actor.height); + }); + for (const actorKey in actorToMessageWidth) { + const actor = actors2[actorKey]; + if (!actor) { + continue; + } + const nextActor = actors2[actor.nextActor]; + if (!nextActor) { + const messageWidth2 = actorToMessageWidth[actorKey]; + const actorWidth2 = messageWidth2 + conf.actorMargin - actor.width / 2; + actor.margin = common.getMax(actorWidth2, conf.actorMargin); + continue; + } + const messageWidth = actorToMessageWidth[actorKey]; + const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2; + actor.margin = common.getMax(actorWidth, conf.actorMargin); + } + let maxBoxHeight = 0; + boxes2.forEach((box) => { + const textFont = messageFont(conf); + let totalWidth = box.actorKeys.reduce((total, aKey) => { + return total += actors2[aKey].width + (actors2[aKey].margin || 0); + }, 0); + totalWidth -= 2 * conf.boxTextMargin; + if (box.wrap) { + box.name = utils.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont); + } + const boxMsgDimensions = utils.calculateTextDimensions(box.name, textFont); + maxBoxHeight = common.getMax(boxMsgDimensions.height, maxBoxHeight); + const minWidth = common.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding); + box.margin = conf.boxTextMargin; + if (totalWidth < minWidth) { + const missing = (minWidth - totalWidth) / 2; + box.margin += missing; + } + }); + boxes2.forEach((box) => box.textMaxHeight = maxBoxHeight); + return common.getMax(maxHeight, conf.height); +} +const buildNoteModel = function(msg, actors2, diagObj) { + const startx = actors2[msg.from].x; + const stopx = actors2[msg.to].x; + const shouldWrap = msg.wrap && msg.message; + let textDimensions = utils.calculateTextDimensions( + shouldWrap ? utils.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, + noteFont(conf) + ); + const noteModel = { + width: shouldWrap ? conf.width : common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin), + height: 0, + startx: actors2[msg.from].x, + stopx: 0, + starty: 0, + stopy: 0, + message: msg.message + }; + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + noteModel.width = shouldWrap ? common.getMax(conf.width, textDimensions.width) : common.getMax( + actors2[msg.from].width / 2 + actors2[msg.to].width / 2, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx + (actors2[msg.from].width + conf.actorMargin) / 2; + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + noteModel.width = shouldWrap ? common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin) : common.getMax( + actors2[msg.from].width / 2 + actors2[msg.to].width / 2, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx - noteModel.width + (actors2[msg.from].width - conf.actorMargin) / 2; + } else if (msg.to === msg.from) { + textDimensions = utils.calculateTextDimensions( + shouldWrap ? utils.wrapLabel( + msg.message, + common.getMax(conf.width, actors2[msg.from].width), + noteFont(conf) + ) : msg.message, + noteFont(conf) + ); + noteModel.width = shouldWrap ? common.getMax(conf.width, actors2[msg.from].width) : common.getMax( + actors2[msg.from].width, + conf.width, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx + (actors2[msg.from].width - noteModel.width) / 2; + } else { + noteModel.width = Math.abs(startx + actors2[msg.from].width / 2 - (stopx + actors2[msg.to].width / 2)) + conf.actorMargin; + noteModel.startx = startx < stopx ? startx + actors2[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors2[msg.to].width / 2 - conf.actorMargin / 2; + } + if (shouldWrap) { + noteModel.message = utils.wrapLabel( + msg.message, + noteModel.width - 2 * conf.wrapPadding, + noteFont(conf) + ); + } + log.debug( + `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]` + ); + return noteModel; +}; +const buildMessageModel = function(msg, actors2, diagObj) { + if (![ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + return {}; + } + const [fromLeft, fromRight] = activationBounds(msg.from, actors2); + const [toLeft, toRight] = activationBounds(msg.to, actors2); + const isArrowToRight = fromLeft <= toLeft; + const startx = isArrowToRight ? fromRight : fromLeft; + let stopx = isArrowToRight ? toLeft : toRight; + const isArrowToActivation = Math.abs(toLeft - toRight) > 2; + const adjustValue = (value) => { + return isArrowToRight ? -value : value; + }; + if (msg.from === msg.to) { + stopx = startx; + } else { + if (msg.activate && !isArrowToActivation) { + stopx += adjustValue(conf.activationWidth / 2 - 1); + } + if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) { + stopx += adjustValue(3); + } + } + const allBounds = [fromLeft, fromRight, toLeft, toRight]; + const boundedWidth = Math.abs(startx - stopx); + if (msg.wrap && msg.message) { + msg.message = utils.wrapLabel( + msg.message, + common.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width), + messageFont(conf) + ); + } + const msgDims = utils.calculateTextDimensions(msg.message, messageFont(conf)); + return { + width: common.getMax( + msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, + boundedWidth + 2 * conf.wrapPadding, + conf.width + ), + height: 0, + startx, + stopx, + starty: 0, + stopy: 0, + message: msg.message, + type: msg.type, + wrap: msg.wrap, + fromBounds: Math.min.apply(null, allBounds), + toBounds: Math.max.apply(null, allBounds) + }; +}; +const calculateLoopBounds = function(messages2, actors2, _maxWidthPerActor, diagObj) { + const loops = {}; + const stack = []; + let current, noteModel, msgModel; + messages2.forEach(function(msg) { + msg.id = utils.random({ length: 10 }); + switch (msg.type) { + case diagObj.db.LINETYPE.LOOP_START: + case diagObj.db.LINETYPE.ALT_START: + case diagObj.db.LINETYPE.OPT_START: + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + case diagObj.db.LINETYPE.CRITICAL_START: + case diagObj.db.LINETYPE.BREAK_START: + stack.push({ + id: msg.id, + msg: msg.message, + from: Number.MAX_SAFE_INTEGER, + to: Number.MIN_SAFE_INTEGER, + width: 0 + }); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + case diagObj.db.LINETYPE.PAR_AND: + case diagObj.db.LINETYPE.CRITICAL_OPTION: + if (msg.message) { + current = stack.pop(); + loops[current.id] = current; + loops[msg.id] = current; + stack.push(current); + } + break; + case diagObj.db.LINETYPE.LOOP_END: + case diagObj.db.LINETYPE.ALT_END: + case diagObj.db.LINETYPE.OPT_END: + case diagObj.db.LINETYPE.PAR_END: + case diagObj.db.LINETYPE.CRITICAL_END: + case diagObj.db.LINETYPE.BREAK_END: + current = stack.pop(); + loops[current.id] = current; + break; + case diagObj.db.LINETYPE.ACTIVE_START: + { + const actorRect = actors2[msg.from ? msg.from.actor : msg.to.actor]; + const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length; + const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + const toAdd = { + startx: x, + stopx: x + conf.activationWidth, + actor: msg.from.actor, + enabled: true + }; + bounds.activations.push(toAdd); + } + break; + case diagObj.db.LINETYPE.ACTIVE_END: + { + const lastActorActivationIdx = bounds.activations.map((a) => a.actor).lastIndexOf(msg.from.actor); + delete bounds.activations.splice(lastActorActivationIdx, 1)[0]; + } + break; + } + const isNote = msg.placement !== void 0; + if (isNote) { + noteModel = buildNoteModel(msg, actors2, diagObj); + msg.noteModel = noteModel; + stack.forEach((stk) => { + current = stk; + current.from = common.getMin(current.from, noteModel.startx); + current.to = common.getMax(current.to, noteModel.startx + noteModel.width); + current.width = common.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth; + }); + } else { + msgModel = buildMessageModel(msg, actors2, diagObj); + msg.msgModel = msgModel; + if (msgModel.startx && msgModel.stopx && stack.length > 0) { + stack.forEach((stk) => { + current = stk; + if (msgModel.startx === msgModel.stopx) { + const from = actors2[msg.from]; + const to = actors2[msg.to]; + current.from = common.getMin( + from.x - msgModel.width / 2, + from.x - from.width / 2, + current.from + ); + current.to = common.getMax( + to.x + msgModel.width / 2, + to.x + from.width / 2, + current.to + ); + current.width = common.getMax(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth; + } else { + current.from = common.getMin(msgModel.startx, current.from); + current.to = common.getMax(msgModel.stopx, current.to); + current.width = common.getMax(current.width, msgModel.width) - conf.labelBoxWidth; + } + }); + } + } + }); + bounds.activations = []; + log.debug("Loop type widths:", loops); + return loops; +}; +const renderer = { + bounds, + drawActors, + drawActorsPopup, + setConf, + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: ({ wrap }) => { + db.setWrap(wrap); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/sequenceDiagram-db5e53fe.js b/webroot/js/node_modules/mermaid/dist/sequenceDiagram-db5e53fe.js new file mode 100644 index 0000000..0eb1a6f --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/sequenceDiagram-db5e53fe.js @@ -0,0 +1,3290 @@ +import { g as getAccTitle, D as getDiagramTitle, B as setDiagramTitle, c as getConfig, s as setAccTitle, b as setAccDescription, a as getAccDescription, E as clear$1, l as log, d as sanitizeText, e as sanitizeUrl_1, f as common, Z as parseFontSize, a5 as addFunction, a6 as ZERO_WIDTH_SPACE, h as assignWithDepth, j as d3select, k as configureSvgSize, z as utils } from "./mermaid-491db2d9.js"; +import { d as drawRect$1, a as drawBackgroundRect$1, b as drawEmbeddedImage, c as drawImage, e as getTextObj$1, g as getNoteRect$1 } from "./svgDrawCommon-6f1271c3.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $Vy = [4, 5, 16, 50, 52, 53], $Vz = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VD = [68, 69, 70], $VE = [1, 120]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "box_section": 10, "box_line": 11, "participant_statement": 12, "create": 13, "box": 14, "restOfLine": 15, "end": 16, "signal": 17, "autonumber": 18, "NUM": 19, "off": 20, "activate": 21, "actor": 22, "deactivate": 23, "note_statement": 24, "links_statement": 25, "link_statement": 26, "properties_statement": 27, "details_statement": 28, "title": 29, "legacy_title": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "loop": 36, "rect": 37, "opt": 38, "alt": 39, "else_sections": 40, "par": 41, "par_sections": 42, "par_over": 43, "critical": 44, "option_sections": 45, "break": 46, "option": 47, "and": 48, "else": 49, "participant": 50, "AS": 51, "participant_actor": 52, "destroy": 53, "note": 54, "placement": 55, "text2": 56, "over": 57, "actor_pair": 58, "links": 59, "link": 60, "properties": 61, "details": 62, "spaceList": 63, ",": 64, "left_of": 65, "right_of": 66, "signaltype": 67, "+": 68, "-": 69, "ACTOR": 70, "SOLID_OPEN_ARROW": 71, "DOTTED_OPEN_ARROW": 72, "SOLID_ARROW": 73, "DOTTED_ARROW": 74, "SOLID_CROSS": 75, "DOTTED_CROSS": 76, "SOLID_POINT": 77, "DOTTED_POINT": 78, "TXT": 79, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.apply($$[$0]); + return $$[$0]; + case 4: + case 9: + this.$ = []; + break; + case 5: + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 6: + case 7: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 8: + case 13: + this.$ = []; + break; + case 15: + $$[$0].type = "createParticipant"; + this.$ = $$[$0]; + break; + case 16: + $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) }); + $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] }); + this.$ = $$[$0 - 1]; + break; + case 18: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 19: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 20: + this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 21: + this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 22: + this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }; + break; + case 23: + this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] }; + break; + case 29: + yy.setDiagramTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 30: + yy.setDiagramTitle($$[$0].substring(7)); + this.$ = $$[$0].substring(7); + break; + case 31: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 32: + case 33: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 34: + $$[$0 - 1].unshift({ type: "loopStart", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START }); + $$[$0 - 1].push({ type: "loopEnd", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END }); + this.$ = $$[$0 - 1]; + break; + case 35: + $$[$0 - 1].unshift({ type: "rectStart", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START }); + $$[$0 - 1].push({ type: "rectEnd", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END }); + this.$ = $$[$0 - 1]; + break; + case 36: + $$[$0 - 1].unshift({ type: "optStart", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START }); + $$[$0 - 1].push({ type: "optEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END }); + this.$ = $$[$0 - 1]; + break; + case 37: + $$[$0 - 1].unshift({ type: "altStart", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START }); + $$[$0 - 1].push({ type: "altEnd", signalType: yy.LINETYPE.ALT_END }); + this.$ = $$[$0 - 1]; + break; + case 38: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 39: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 40: + $$[$0 - 1].unshift({ type: "criticalStart", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START }); + $$[$0 - 1].push({ type: "criticalEnd", signalType: yy.LINETYPE.CRITICAL_END }); + this.$ = $$[$0 - 1]; + break; + case 41: + $$[$0 - 1].unshift({ type: "breakStart", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START }); + $$[$0 - 1].push({ type: "breakEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END }); + this.$ = $$[$0 - 1]; + break; + case 43: + this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]); + break; + case 45: + this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]); + break; + case 47: + this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]); + break; + case 48: + $$[$0 - 3].draw = "participant"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 49: + $$[$0 - 1].draw = "participant"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 50: + $$[$0 - 3].draw = "actor"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 51: + $$[$0 - 1].draw = "actor"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 52: + $$[$0 - 1].type = "destroyParticipant"; + this.$ = $$[$0 - 1]; + break; + case 53: + this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 54: + $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2); + $$[$0 - 2][0] = $$[$0 - 2][0].actor; + $$[$0 - 2][1] = $$[$0 - 2][1].actor; + this.$ = [$$[$0 - 1], { type: "addNote", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }]; + break; + case 55: + this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 56: + this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 57: + this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 58: + this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 61: + this.$ = [$$[$0 - 2], $$[$0]]; + break; + case 62: + this.$ = $$[$0]; + break; + case 63: + this.$ = yy.PLACEMENT.LEFTOF; + break; + case 64: + this.$ = yy.PLACEMENT.RIGHTOF; + break; + case 65: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true }, + { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] } + ]; + break; + case 66: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] }, + { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] } + ]; + break; + case 67: + this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }]; + break; + case 68: + this.$ = { type: "addParticipant", actor: $$[$0] }; + break; + case 69: + this.$ = yy.LINETYPE.SOLID_OPEN; + break; + case 70: + this.$ = yy.LINETYPE.DOTTED_OPEN; + break; + case 71: + this.$ = yy.LINETYPE.SOLID; + break; + case 72: + this.$ = yy.LINETYPE.DOTTED; + break; + case 73: + this.$ = yy.LINETYPE.SOLID_CROSS; + break; + case 74: + this.$ = yy.LINETYPE.DOTTED_CROSS; + break; + case 75: + this.$ = yy.LINETYPE.SOLID_POINT; + break; + case 76: + this.$ = yy.LINETYPE.DOTTED_POINT; + break; + case 77: + this.$ = yy.parseMessage($$[$0].trim().substring(1)); + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: $Vw }, { 22: 55, 70: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: $Vw }, { 22: 72, 70: $Vw }, { 22: 73, 70: $Vw }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: $Vw }, { 22: 88, 70: $Vw }, { 22: 89, 70: $Vw }, { 22: 90, 70: $Vw }, o([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vy, [2, 9], { 10: 91 }), o($Vx, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, o($Vx, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($Vz, $V3, { 7: 97 }), o($Vz, $V3, { 7: 98 }), o($Vz, $V3, { 7: 99 }), o($VA, $V3, { 40: 100, 7: 101 }), o($VB, $V3, { 42: 102, 7: 103 }), o($VB, $V3, { 7: 103, 42: 104 }), o($VC, $V3, { 45: 105, 7: 106 }), o($Vz, $V3, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: $Vw }, o($VD, [2, 69]), o($VD, [2, 70]), o($VD, [2, 71]), o($VD, [2, 72]), o($VD, [2, 73]), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), { 22: 116, 70: $Vw }, { 22: 118, 58: 117, 70: $Vw }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: $VE }, { 56: 121, 79: $VE }, { 56: 122, 79: $VE }, { 56: 123, 79: $VE }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 129] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 130], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 131], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 132], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 133] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 134], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 135] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 136], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 139], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 140], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 15: [1, 141] }, o($Vx, [2, 49]), { 15: [1, 142] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 143, 70: $Vw }, { 22: 144, 70: $Vw }, { 56: 145, 79: $VE }, { 56: 146, 79: $VE }, { 56: 147, 79: $VE }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, o($Vx, [2, 16]), o($Vy, [2, 10]), { 12: 149, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vy, [2, 12]), o($Vy, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 150] }, o($Vx, [2, 38]), { 15: [1, 151] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 152] }, o($Vx, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: $VE }, { 56: 156, 79: $VE }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: $Vw }, o($Vy, [2, 11]), o($VA, $V3, { 7: 101, 40: 158 }), o($VB, $V3, { 7: 103, 42: 159 }), o($VC, $V3, { 7: 106, 45: 160 }), o($Vx, [2, 48]), o($Vx, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }], + defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 5; + case 1: + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + return 19; + case 7: + this.begin("LINE"); + return 14; + case 8: + this.begin("ID"); + return 50; + case 9: + this.begin("ID"); + return 52; + case 10: + return 13; + case 11: + this.begin("ID"); + return 53; + case 12: + yy_.yytext = yy_.yytext.trim(); + this.begin("ALIAS"); + return 70; + case 13: + this.popState(); + this.popState(); + this.begin("LINE"); + return 51; + case 14: + this.popState(); + this.popState(); + return 5; + case 15: + this.begin("LINE"); + return 36; + case 16: + this.begin("LINE"); + return 37; + case 17: + this.begin("LINE"); + return 38; + case 18: + this.begin("LINE"); + return 39; + case 19: + this.begin("LINE"); + return 49; + case 20: + this.begin("LINE"); + return 41; + case 21: + this.begin("LINE"); + return 43; + case 22: + this.begin("LINE"); + return 48; + case 23: + this.begin("LINE"); + return 44; + case 24: + this.begin("LINE"); + return 47; + case 25: + this.begin("LINE"); + return 46; + case 26: + this.popState(); + return 15; + case 27: + return 16; + case 28: + return 65; + case 29: + return 66; + case 30: + return 59; + case 31: + return 60; + case 32: + return 61; + case 33: + return 62; + case 34: + return 57; + case 35: + return 54; + case 36: + this.begin("ID"); + return 21; + case 37: + this.begin("ID"); + return 23; + case 38: + return 29; + case 39: + return 30; + case 40: + this.begin("acc_title"); + return 31; + case 41: + this.popState(); + return "acc_title_value"; + case 42: + this.begin("acc_descr"); + return 33; + case 43: + this.popState(); + return "acc_descr_value"; + case 44: + this.begin("acc_descr_multiline"); + break; + case 45: + this.popState(); + break; + case 46: + return "acc_descr_multiline_value"; + case 47: + return 6; + case 48: + return 18; + case 49: + return 20; + case 50: + return 64; + case 51: + return 5; + case 52: + yy_.yytext = yy_.yytext.trim(); + return 70; + case 53: + return 73; + case 54: + return 74; + case 55: + return 71; + case 56: + return 72; + case 57: + return 75; + case 58: + return 76; + case 59: + return 77; + case 60: + return 78; + case 61: + return 79; + case 62: + return 68; + case 63: + return 69; + case 64: + return 5; + case 65: + return "INVALID"; + } + }, + rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [45, 46], "inclusive": false }, "acc_descr": { "rules": [43], "inclusive": false }, "acc_title": { "rules": [41], "inclusive": false }, "ID": { "rules": [2, 3, 12], "inclusive": false }, "ALIAS": { "rules": [2, 3, 13, 14], "inclusive": false }, "LINE": { "rules": [2, 3, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let prevActor = void 0; +let actors = {}; +let createdActors = {}; +let destroyedActors = {}; +let boxes = []; +let messages = []; +let sequenceNumbersEnabled = false; +let wrapEnabled; +let currentBox = void 0; +let lastCreated = void 0; +let lastDestroyed = void 0; +const addBox = function(data) { + boxes.push({ + name: data.text, + wrap: data.wrap === void 0 && autoWrap() || !!data.wrap, + fill: data.color, + actorKeys: [] + }); + currentBox = boxes.slice(-1)[0]; +}; +const addActor = function(id, name, description, type) { + let assignedBox = currentBox; + const old = actors[id]; + if (old) { + if (currentBox && old.box && currentBox !== old.box) { + throw new Error( + "A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + currentBox.name + "' at the same time." + ); + } + assignedBox = old.box ? old.box : currentBox; + old.box = assignedBox; + if (old && name === old.name && description == null) { + return; + } + } + if (description == null || description.text == null) { + description = { text: name, wrap: null, type }; + } + if (type == null || description.text == null) { + description = { text: name, wrap: null, type }; + } + actors[id] = { + box: assignedBox, + name, + description: description.text, + wrap: description.wrap === void 0 && autoWrap() || !!description.wrap, + prevActor, + links: {}, + properties: {}, + actorCnt: null, + rectData: null, + type: type || "participant" + }; + if (prevActor && actors[prevActor]) { + actors[prevActor].nextActor = id; + } + if (currentBox) { + currentBox.actorKeys.push(id); + } + prevActor = id; +}; +const activationCount = (part) => { + let i; + let count = 0; + for (i = 0; i < messages.length; i++) { + if (messages[i].type === LINETYPE.ACTIVE_START && messages[i].from.actor === part) { + count++; + } + if (messages[i].type === LINETYPE.ACTIVE_END && messages[i].from.actor === part) { + count--; + } + } + return count; +}; +const addMessage = function(idFrom, idTo, message, answer) { + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + answer + }); +}; +const addSignal = function(idFrom, idTo, message = { text: void 0, wrap: void 0 }, messageType, activate = false) { + if (messageType === LINETYPE.ACTIVE_END) { + const cnt = activationCount(idFrom.actor); + if (cnt < 1) { + let error = new Error("Trying to inactivate an inactive participant (" + idFrom.actor + ")"); + error.hash = { + text: "->>-", + token: "->>-", + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["'ACTIVE_PARTICIPANT'"] + }; + throw error; + } + } + messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: messageType, + activate + }); + return true; +}; +const hasAtLeastOneBox = function() { + return boxes.length > 0; +}; +const hasAtLeastOneBoxWithTitle = function() { + return boxes.some((b) => b.name); +}; +const getMessages = function() { + return messages; +}; +const getBoxes = function() { + return boxes; +}; +const getActors = function() { + return actors; +}; +const getCreatedActors = function() { + return createdActors; +}; +const getDestroyedActors = function() { + return destroyedActors; +}; +const getActor = function(id) { + return actors[id]; +}; +const getActorKeys = function() { + return Object.keys(actors); +}; +const enableSequenceNumbers = function() { + sequenceNumbersEnabled = true; +}; +const disableSequenceNumbers = function() { + sequenceNumbersEnabled = false; +}; +const showSequenceNumbers = () => sequenceNumbersEnabled; +const setWrap = function(wrapSetting) { + wrapEnabled = wrapSetting; +}; +const autoWrap = () => { + if (wrapEnabled !== void 0) { + return wrapEnabled; + } + return getConfig().sequence.wrap; +}; +const clear = function() { + actors = {}; + createdActors = {}; + destroyedActors = {}; + boxes = []; + messages = []; + sequenceNumbersEnabled = false; + clear$1(); +}; +const parseMessage = function(str) { + const _str = str.trim(); + const message = { + text: _str.replace(/^:?(?:no)?wrap:/, "").trim(), + wrap: _str.match(/^:?wrap:/) !== null ? true : _str.match(/^:?nowrap:/) !== null ? false : void 0 + }; + log.debug("parseMessage:", message); + return message; +}; +const parseBoxData = function(str) { + const match = str.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/); + let color = match != null && match[1] ? match[1].trim() : "transparent"; + let title = match != null && match[2] ? match[2].trim() : void 0; + if (window && window.CSS) { + if (!window.CSS.supports("color", color)) { + color = "transparent"; + title = str.trim(); + } + } else { + const style = new Option().style; + style.color = color; + if (style.color !== color) { + color = "transparent"; + title = str.trim(); + } + } + const boxData = { + color, + text: title !== void 0 ? sanitizeText(title.replace(/^:?(?:no)?wrap:/, ""), getConfig()) : void 0, + wrap: title !== void 0 ? title.match(/^:?wrap:/) !== null ? true : title.match(/^:?nowrap:/) !== null ? false : void 0 : void 0 + }; + return boxData; +}; +const LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25, + AUTONUMBER: 26, + CRITICAL_START: 27, + CRITICAL_OPTION: 28, + CRITICAL_END: 29, + BREAK_START: 30, + BREAK_END: 31, + PAR_OVER_START: 32 +}; +const ARROWTYPE = { + FILLED: 0, + OPEN: 1 +}; +const PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}; +const addNote = function(actor, placement, message) { + ({ + actor, + placement, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap + }); + const actors2 = [].concat(actor, actor); + messages.push({ + from: actors2[0], + to: actors2[1], + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: LINETYPE.NOTE, + placement + }); +}; +const addLinks = function(actorId, text) { + const actor = getActor(actorId); + try { + let sanitizedText = sanitizeText(text.text, getConfig()); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + const links = JSON.parse(sanitizedText); + insertLinks(actor, links); + } catch (e) { + log.error("error while parsing actor link text", e); + } +}; +const addALink = function(actorId, text) { + const actor = getActor(actorId); + try { + const links = {}; + let sanitizedText = sanitizeText(text.text, getConfig()); + var sep = sanitizedText.indexOf("@"); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + var label = sanitizedText.slice(0, sep - 1).trim(); + var link = sanitizedText.slice(sep + 1).trim(); + links[label] = link; + insertLinks(actor, links); + } catch (e) { + log.error("error while parsing actor link text", e); + } +}; +function insertLinks(actor, links) { + if (actor.links == null) { + actor.links = links; + } else { + for (let key in links) { + actor.links[key] = links[key]; + } + } +} +const addProperties = function(actorId, text) { + const actor = getActor(actorId); + try { + let sanitizedText = sanitizeText(text.text, getConfig()); + const properties = JSON.parse(sanitizedText); + insertProperties(actor, properties); + } catch (e) { + log.error("error while parsing actor properties text", e); + } +}; +function insertProperties(actor, properties) { + if (actor.properties == null) { + actor.properties = properties; + } else { + for (let key in properties) { + actor.properties[key] = properties[key]; + } + } +} +function boxEnd() { + currentBox = void 0; +} +const addDetails = function(actorId, text) { + const actor = getActor(actorId); + const elem = document.getElementById(text.text); + try { + const text2 = elem.innerHTML; + const details = JSON.parse(text2); + if (details["properties"]) { + insertProperties(actor, details["properties"]); + } + if (details["links"]) { + insertLinks(actor, details["links"]); + } + } catch (e) { + log.error("error while parsing actor details text", e); + } +}; +const getActorProperty = function(actor, key) { + if (actor !== void 0 && actor.properties !== void 0) { + return actor.properties[key]; + } + return void 0; +}; +const apply = function(param) { + if (Array.isArray(param)) { + param.forEach(function(item) { + apply(item); + }); + } else { + switch (param.type) { + case "sequenceIndex": + messages.push({ + from: void 0, + to: void 0, + message: { + start: param.sequenceIndex, + step: param.sequenceIndexStep, + visible: param.sequenceVisible + }, + wrap: false, + type: param.signalType + }); + break; + case "addParticipant": + addActor(param.actor, param.actor, param.description, param.draw); + break; + case "createParticipant": + if (actors[param.actor]) { + throw new Error( + "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior" + ); + } + lastCreated = param.actor; + addActor(param.actor, param.actor, param.description, param.draw); + createdActors[param.actor] = messages.length; + break; + case "destroyParticipant": + lastDestroyed = param.actor; + destroyedActors[param.actor] = messages.length; + break; + case "activeStart": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "activeEnd": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "addNote": + addNote(param.actor, param.placement, param.text); + break; + case "addLinks": + addLinks(param.actor, param.text); + break; + case "addALink": + addALink(param.actor, param.text); + break; + case "addProperties": + addProperties(param.actor, param.text); + break; + case "addDetails": + addDetails(param.actor, param.text); + break; + case "addMessage": + if (lastCreated) { + if (param.to !== lastCreated) { + throw new Error( + "The created participant " + lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram." + ); + } else { + lastCreated = void 0; + } + } else if (lastDestroyed) { + if (param.to !== lastDestroyed && param.from !== lastDestroyed) { + throw new Error( + "The destroyed participant " + lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram." + ); + } else { + lastDestroyed = void 0; + } + } + addSignal(param.from, param.to, param.msg, param.signalType, param.activate); + break; + case "boxStart": + addBox(param.boxData); + break; + case "boxEnd": + boxEnd(); + break; + case "loopStart": + addSignal(void 0, void 0, param.loopText, param.signalType); + break; + case "loopEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "rectStart": + addSignal(void 0, void 0, param.color, param.signalType); + break; + case "rectEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "optStart": + addSignal(void 0, void 0, param.optText, param.signalType); + break; + case "optEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "altStart": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "else": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "altEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "setAccTitle": + setAccTitle(param.text); + break; + case "parStart": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "and": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "parEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "criticalStart": + addSignal(void 0, void 0, param.criticalText, param.signalType); + break; + case "option": + addSignal(void 0, void 0, param.optionText, param.signalType); + break; + case "criticalEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "breakStart": + addSignal(void 0, void 0, param.breakText, param.signalType); + break; + case "breakEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + } + } +}; +const db = { + addActor, + addMessage, + addSignal, + addLinks, + addDetails, + addProperties, + autoWrap, + setWrap, + enableSequenceNumbers, + disableSequenceNumbers, + showSequenceNumbers, + getMessages, + getActors, + getCreatedActors, + getDestroyedActors, + getActor, + getActorKeys, + getActorProperty, + getAccTitle, + getBoxes, + getDiagramTitle, + setDiagramTitle, + getConfig: () => getConfig().sequence, + clear, + parseMessage, + parseBoxData, + LINETYPE, + ARROWTYPE, + PLACEMENT, + addNote, + setAccTitle, + apply, + setAccDescription, + getAccDescription, + hasAtLeastOneBox, + hasAtLeastOneBoxWithTitle +}; +const getStyles = (options) => `.actor { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + } + + text.actor > tspan { + fill: ${options.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${options.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${options.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${options.signalColor}; + } + + #arrowhead path { + fill: ${options.signalColor}; + stroke: ${options.signalColor}; + } + + .sequenceNumber { + fill: ${options.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${options.signalColor}; + } + + #crosshead path { + fill: ${options.signalColor}; + stroke: ${options.signalColor}; + } + + .messageText { + fill: ${options.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${options.labelBoxBorderColor}; + fill: ${options.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${options.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${options.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${options.labelBoxBorderColor}; + fill: ${options.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${options.noteBorderColor}; + fill: ${options.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${options.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .activation1 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .activation2 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${options.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + } + .actor-man circle, line { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + stroke-width: 2px; + } +`; +const styles = getStyles; +const ACTOR_TYPE_WIDTH = 18 * 2; +const drawRect = function(elem, rectData) { + return drawRect$1(elem, rectData); +}; +const addPopupInteraction = (id, actorCnt2) => { + addFunction(() => { + const arr = document.querySelectorAll(id); + if (arr.length === 0) { + return; + } + arr[0].addEventListener("mouseover", function() { + popupMenuUpFunc("actor" + actorCnt2 + "_popup"); + }); + arr[0].addEventListener("mouseout", function() { + popupMenuDownFunc("actor" + actorCnt2 + "_popup"); + }); + }); +}; +const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) { + if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) { + return { height: 0, width: 0 }; + } + const links = actor.links; + const actorCnt2 = actor.actorCnt; + const rectData = actor.rectData; + var displayValue = "none"; + if (forceMenus) { + displayValue = "block !important"; + } + const g = elem.append("g"); + g.attr("id", "actor" + actorCnt2 + "_popup"); + g.attr("class", "actorPopupMenu"); + g.attr("display", displayValue); + addPopupInteraction("#actor" + actorCnt2 + "_popup", actorCnt2); + var actorClass = ""; + if (rectData.class !== void 0) { + actorClass = " " + rectData.class; + } + let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth; + const rectElem = g.append("rect"); + rectElem.attr("class", "actorPopupMenuPanel" + actorClass); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.height); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", menuWidth); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (links != null) { + var linkY = 20; + for (let key in links) { + var linkElem = g.append("a"); + var sanitizedLink = sanitizeUrl_1(links[key]); + linkElem.attr("xlink:href", sanitizedLink); + linkElem.attr("target", "_blank"); + _drawMenuItemTextCandidateFunc(textAttrs)( + key, + linkElem, + rectData.x + 10, + rectData.height + linkY, + menuWidth, + 20, + { class: "actor" }, + textAttrs + ); + linkY += 30; + } + } + rectElem.attr("height", linkY); + return { height: rectData.height + linkY, width: menuWidth }; +}; +const popupMenu = function(popid) { + return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'block'; }"; +}; +const popdownMenu = function(popid) { + return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'none'; }"; +}; +const popupMenuUpFunc = function(popupId) { + var pu = document.getElementById(popupId); + if (pu != null) { + pu.style.display = "block"; + } +}; +const popupMenuDownFunc = function(popupId) { + var pu = document.getElementById(popupId); + if (pu != null) { + pu.style.display = "none"; + } +}; +const drawText = function(elem, textData) { + let prevTextHeight = 0; + let textHeight = 0; + const lines = textData.text.split(common.lineBreakRegex); + const [_textFontSize, _textFontSizePx] = parseFontSize(textData.fontSize); + let textElems = []; + let dy = 0; + let yfunc = () => textData.y; + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + switch (textData.valign) { + case "top": + case "start": + yfunc = () => Math.round(textData.y + textData.textMargin); + break; + case "middle": + case "center": + yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2); + break; + case "bottom": + case "end": + yfunc = () => Math.round( + textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin + ); + break; + } + } + if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) { + switch (textData.anchor) { + case "left": + case "start": + textData.x = Math.round(textData.x + textData.textMargin); + textData.anchor = "start"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "middle": + case "center": + textData.x = Math.round(textData.x + textData.width / 2); + textData.anchor = "middle"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "right": + case "end": + textData.x = Math.round(textData.x + textData.width - textData.textMargin); + textData.anchor = "end"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + } + } + for (let [i, line] of lines.entries()) { + if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) { + dy = i * _textFontSize; + } + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", yfunc()); + if (textData.anchor !== void 0) { + textElem.attr("text-anchor", textData.anchor).attr("dominant-baseline", textData.dominantBaseline).attr("alignment-baseline", textData.alignmentBaseline); + } + if (textData.fontFamily !== void 0) { + textElem.style("font-family", textData.fontFamily); + } + if (_textFontSizePx !== void 0) { + textElem.style("font-size", _textFontSizePx); + } + if (textData.fontWeight !== void 0) { + textElem.style("font-weight", textData.fontWeight); + } + if (textData.fill !== void 0) { + textElem.attr("fill", textData.fill); + } + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + if (textData.dy !== void 0) { + textElem.attr("dy", textData.dy); + } else if (dy !== 0) { + textElem.attr("dy", dy); + } + const text = line || ZERO_WIDTH_SPACE; + if (textData.tspan) { + const span = textElem.append("tspan"); + span.attr("x", textData.x); + if (textData.fill !== void 0) { + span.attr("fill", textData.fill); + } + span.text(text); + } else { + textElem.text(text); + } + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + textHeight += (textElem._groups || textElem)[0][0].getBBox().height; + prevTextHeight = textHeight; + } + textElems.push(textElem); + } + return textElems; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.height / 2; + drawText(elem, txtObject); + return polygon; +}; +let actorCnt = -1; +const fixLifeLineHeights = (diagram2, actors2, actorKeys, conf2) => { + if (!diagram2.select) { + return; + } + actorKeys.forEach((actorKey) => { + const actor = actors2[actorKey]; + const actorDOM = diagram2.select("#actor" + actor.actorCnt); + if (!conf2.mirrorActors && actor.stopy) { + actorDOM.attr("y2", actor.stopy + actor.height / 2); + } else if (conf2.mirrorActors) { + actorDOM.attr("y2", actor.stopy); + } + }); +}; +const drawActorTypeParticipant = function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center = actor.x + actor.width / 2; + const centerY = actorY + 5; + const boxpluslineGroup = elem.append("g").lower(); + var g = boxpluslineGroup; + if (!isFooter) { + actorCnt++; + g.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + g = boxpluslineGroup.append("g"); + actor.actorCnt = actorCnt; + if (actor.links != null) { + g.attr("id", "root-" + actorCnt); + addPopupInteraction("#root-" + actorCnt, actorCnt); + } + } + const rect = getNoteRect$1(); + var cssclass = "actor"; + if (actor.properties != null && actor.properties["class"]) { + cssclass = actor.properties["class"]; + } else { + rect.fill = "#eaeaea"; + } + rect.x = actor.x; + rect.y = actorY; + rect.width = actor.width; + rect.height = actor.height; + rect.class = cssclass; + rect.rx = 3; + rect.ry = 3; + const rectElem = drawRect(g, rect); + actor.rectData = rect; + if (actor.properties != null && actor.properties["icon"]) { + const iconSrc = actor.properties["icon"].trim(); + if (iconSrc.charAt(0) === "@") { + drawEmbeddedImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1)); + } else { + drawImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc); + } + } + _drawTextCandidateFunc(conf2)( + actor.description, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); + let height = actor.height; + if (rectElem.node) { + const bounds2 = rectElem.node().getBBox(); + actor.height = bounds2.height; + height = bounds2.height; + } + return height; +}; +const drawActorTypeActor = function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center = actor.x + actor.width / 2; + const centerY = actorY + 80; + elem.lower(); + if (!isFooter) { + actorCnt++; + elem.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + actor.actorCnt = actorCnt; + } + const actElem = elem.append("g"); + actElem.attr("class", "actor-man"); + const rect = getNoteRect$1(); + rect.x = actor.x; + rect.y = actorY; + rect.fill = "#eaeaea"; + rect.width = actor.width; + rect.height = actor.height; + rect.class = "actor"; + rect.rx = 3; + rect.ry = 3; + actElem.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", center).attr("y1", actorY + 25).attr("x2", center).attr("y2", actorY + 45); + actElem.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 33).attr("x2", center + ACTOR_TYPE_WIDTH / 2).attr("y2", actorY + 33); + actElem.append("line").attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 60).attr("x2", center).attr("y2", actorY + 45); + actElem.append("line").attr("x1", center).attr("y1", actorY + 45).attr("x2", center + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", actorY + 60); + const circle = actElem.append("circle"); + circle.attr("cx", actor.x + actor.width / 2); + circle.attr("cy", actorY + 10); + circle.attr("r", 15); + circle.attr("width", actor.width); + circle.attr("height", actor.height); + const bounds2 = actElem.node().getBBox(); + actor.height = bounds2.height; + _drawTextCandidateFunc(conf2)( + actor.description, + actElem, + rect.x, + rect.y + 35, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); + return actor.height; +}; +const drawActor = function(elem, actor, conf2, isFooter) { + switch (actor.type) { + case "actor": + return drawActorTypeActor(elem, actor, conf2, isFooter); + case "participant": + return drawActorTypeParticipant(elem, actor, conf2, isFooter); + } +}; +const drawBox = function(elem, box, conf2) { + const boxplustextGroup = elem.append("g"); + const g = boxplustextGroup; + drawBackgroundRect(g, box); + if (box.name) { + _drawTextCandidateFunc(conf2)( + box.name, + g, + box.x, + box.y + (box.textMaxHeight || 0) / 2, + box.width, + 0, + { class: "text" }, + conf2 + ); + } + g.lower(); +}; +const anchorElement = function(elem) { + return elem.append("g"); +}; +const drawActivation = function(elem, bounds2, verticalPos, conf2, actorActivations2) { + const rect = getNoteRect$1(); + const g = bounds2.anchored; + rect.x = bounds2.startx; + rect.y = bounds2.starty; + rect.class = "activation" + actorActivations2 % 3; + rect.width = bounds2.stopx - bounds2.startx; + rect.height = verticalPos - bounds2.starty; + drawRect(g, rect); +}; +const drawLoop = function(elem, loopModel, labelText, conf2) { + const { + boxMargin, + boxTextMargin, + labelBoxHeight, + labelBoxWidth, + messageFontFamily: fontFamily, + messageFontSize: fontSize, + messageFontWeight: fontWeight + } = conf2; + const g = elem.append("g"); + const drawLoopLine = function(startx, starty, stopx, stopy) { + return g.append("line").attr("x1", startx).attr("y1", starty).attr("x2", stopx).attr("y2", stopy).attr("class", "loopLine"); + }; + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty); + drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy); + if (loopModel.sections !== void 0) { + loopModel.sections.forEach(function(item) { + drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style( + "stroke-dasharray", + "3, 3" + ); + }); + } + let txt = getTextObj$1(); + txt.text = labelText; + txt.x = loopModel.startx; + txt.y = loopModel.starty; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.width = labelBoxWidth || 50; + txt.height = labelBoxHeight || 20; + txt.textMargin = boxTextMargin; + txt.class = "labelText"; + drawLabel(g, txt); + txt = getTextObj(); + txt.text = loopModel.title; + txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.starty + boxMargin + boxTextMargin; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.textMargin = boxTextMargin; + txt.class = "loopText"; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = true; + let textElem = drawText(g, txt); + if (loopModel.sectionTitles !== void 0) { + loopModel.sectionTitles.forEach(function(item, idx) { + if (item.message) { + txt.text = item.message; + txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin; + txt.class = "loopText"; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = loopModel.wrap; + textElem = drawText(g, txt); + let sectionHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin); + } + }); + } + loopModel.height = Math.round(loopModel.stopy - loopModel.starty); + return g; +}; +const drawBackgroundRect = function(elem, bounds2) { + drawBackgroundRect$1(elem, bounds2); +}; +const insertDatabaseIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}; +const insertComputerIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}; +const insertClockIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}; +const insertArrowHead = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z"); +}; +const insertArrowFilledHead = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); +}; +const insertSequenceNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}; +const insertArrowCrossHead = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7"); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: void 0, + style: "#666", + width: void 0, + height: void 0, + textMargin: 0, + rx: 0, + ry: 0, + tspan: true, + valign: void 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + fill: "#EDF2AE", + stroke: "#666", + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const [_actorFontSize, _actorFontSizePx] = parseFontSize(actorFontSize); + const lines = content.split(common.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * _actorFontSize - _actorFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").style("font-size", _actorFontSizePx).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const _drawMenuItemTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const lines = content.split(common.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").style("font-size", actorFontSize).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text.append("tspan").attr("x", x).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const svgDraw = { + drawRect, + drawText, + drawLabel, + drawActor, + drawBox, + drawPopup, + anchorElement, + drawActivation, + drawLoop, + drawBackgroundRect, + insertArrowHead, + insertArrowFilledHead, + insertSequenceNumber, + insertArrowCrossHead, + insertDatabaseIcon, + insertComputerIcon, + insertClockIcon, + getTextObj, + getNoteRect, + popupMenu, + popdownMenu, + fixLifeLineHeights, + sanitizeUrl: sanitizeUrl_1 +}; +let conf = {}; +const bounds = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + activations: [], + models: { + getHeight: function() { + return Math.max.apply( + null, + this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0) + ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h)); + }, + clear: function() { + this.actors = []; + this.boxes = []; + this.loops = []; + this.messages = []; + this.notes = []; + }, + addBox: function(boxModel) { + this.boxes.push(boxModel); + }, + addActor: function(actorModel) { + this.actors.push(actorModel); + }, + addLoop: function(loopModel) { + this.loops.push(loopModel); + }, + addMessage: function(msgModel) { + this.messages.push(msgModel); + }, + addNote: function(noteModel) { + this.notes.push(noteModel); + }, + lastActor: function() { + return this.actors[this.actors.length - 1]; + }, + lastLoop: function() { + return this.loops[this.loops.length - 1]; + }, + lastMessage: function() { + return this.messages[this.messages.length - 1]; + }, + lastNote: function() { + return this.notes[this.notes.length - 1]; + }, + actors: [], + boxes: [], + loops: [], + messages: [], + notes: [] + }, + init: function() { + this.sequenceItems = []; + this.activations = []; + this.models.clear(); + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + setConf(getConfig()); + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const _self = this; + let cnt = 0; + function updateFn(type) { + return function updateItemBounds(item) { + cnt++; + const n = _self.sequenceItems.length - cnt + 1; + _self.updateVal(item, "starty", starty - n * conf.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, "startx", startx - n * conf.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopx", stopx + n * conf.boxMargin, Math.max); + if (!(type === "activation")) { + _self.updateVal(item, "startx", startx - n * conf.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, "starty", starty - n * conf.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopy", stopy + n * conf.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + this.activations.forEach(updateFn("activation")); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = common.getMin(startx, stopx); + const _stopx = common.getMax(startx, stopx); + const _starty = common.getMin(starty, stopy); + const _stopy = common.getMax(starty, stopy); + this.updateVal(bounds.data, "startx", _startx, Math.min); + this.updateVal(bounds.data, "starty", _starty, Math.min); + this.updateVal(bounds.data, "stopx", _stopx, Math.max); + this.updateVal(bounds.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + newActivation: function(message, diagram2, actors2) { + const actorRect = actors2[message.from.actor]; + const stackedSize = actorActivations(message.from.actor).length || 0; + const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + this.activations.push({ + startx: x, + starty: this.verticalPos + 2, + stopx: x + conf.activationWidth, + stopy: void 0, + actor: message.from.actor, + anchored: svgDraw.anchorElement(diagram2) + }); + }, + endActivation: function(message) { + const lastActorActivationIdx = this.activations.map(function(activation) { + return activation.actor; + }).lastIndexOf(message.from.actor); + return this.activations.splice(lastActorActivationIdx, 1)[0]; + }, + createLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { + return { + startx: void 0, + starty: this.verticalPos, + stopx: void 0, + stopy: void 0, + title: title.message, + wrap: title.wrap, + width: title.width, + height: 0, + fill + }; + }, + newLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { + this.sequenceItems.push(this.createLoop(title, fill)); + }, + endLoop: function() { + return this.sequenceItems.pop(); + }, + isLoopOverlap: function() { + return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false; + }, + addSectionToLoop: function(message) { + const loop = this.sequenceItems.pop(); + loop.sections = loop.sections || []; + loop.sectionTitles = loop.sectionTitles || []; + loop.sections.push({ y: bounds.getVerticalPos(), height: 0 }); + loop.sectionTitles.push(message); + this.sequenceItems.push(loop); + }, + saveVerticalPos: function() { + if (this.isLoopOverlap()) { + this.savedVerticalPos = this.verticalPos; + } + }, + resetVerticalPos: function() { + if (this.isLoopOverlap()) { + this.verticalPos = this.savedVerticalPos; + } + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = common.getMax(this.data.stopy, this.verticalPos); + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return { bounds: this.data, models: this.models }; + } +}; +const drawNote = function(elem, noteModel) { + bounds.bumpVerticalPos(conf.boxMargin); + noteModel.height = conf.boxMargin; + noteModel.starty = bounds.getVerticalPos(); + const rect = getNoteRect$1(); + rect.x = noteModel.startx; + rect.y = noteModel.starty; + rect.width = noteModel.width || conf.width; + rect.class = "note"; + const g = elem.append("g"); + const rectElem = svgDraw.drawRect(g, rect); + const textObj = getTextObj$1(); + textObj.x = noteModel.startx; + textObj.y = noteModel.starty; + textObj.width = rect.width; + textObj.dy = "1em"; + textObj.text = noteModel.message; + textObj.class = "noteText"; + textObj.fontFamily = conf.noteFontFamily; + textObj.fontSize = conf.noteFontSize; + textObj.fontWeight = conf.noteFontWeight; + textObj.anchor = conf.noteAlign; + textObj.textMargin = conf.noteMargin; + textObj.valign = "center"; + const textElem = drawText(g, textObj); + const textHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + rectElem.attr("height", textHeight + 2 * conf.noteMargin); + noteModel.height += textHeight + 2 * conf.noteMargin; + bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin); + noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin; + noteModel.stopx = noteModel.startx + rect.width; + bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy); + bounds.models.addNote(noteModel); +}; +const messageFont = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; +}; +const noteFont = (cnf) => { + return { + fontFamily: cnf.noteFontFamily, + fontSize: cnf.noteFontSize, + fontWeight: cnf.noteFontWeight + }; +}; +const actorFont = (cnf) => { + return { + fontFamily: cnf.actorFontFamily, + fontSize: cnf.actorFontSize, + fontWeight: cnf.actorFontWeight + }; +}; +function boundMessage(_diagram, msgModel) { + bounds.bumpVerticalPos(10); + const { startx, stopx, message } = msgModel; + const lines = common.splitBreaks(message).length; + const textDims = utils.calculateTextDimensions(message, messageFont(conf)); + const lineHeight = textDims.height / lines; + msgModel.height += lineHeight; + bounds.bumpVerticalPos(lineHeight); + let lineStartY; + let totalOffset = textDims.height - 10; + const textWidth = textDims.width; + if (startx === stopx) { + lineStartY = bounds.getVerticalPos() + totalOffset; + if (!conf.rightAngles) { + totalOffset += conf.boxMargin; + lineStartY = bounds.getVerticalPos() + totalOffset; + } + totalOffset += 30; + const dx = common.getMax(textWidth / 2, conf.width / 2); + bounds.insert( + startx - dx, + bounds.getVerticalPos() - 10 + totalOffset, + stopx + dx, + bounds.getVerticalPos() + 30 + totalOffset + ); + } else { + totalOffset += conf.boxMargin; + lineStartY = bounds.getVerticalPos() + totalOffset; + bounds.insert(startx, lineStartY - 10, stopx, lineStartY); + } + bounds.bumpVerticalPos(totalOffset); + msgModel.height += totalOffset; + msgModel.stopy = msgModel.starty + msgModel.height; + bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy); + return lineStartY; +} +const drawMessage = function(diagram2, msgModel, lineStartY, diagObj) { + const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel; + const textDims = utils.calculateTextDimensions(message, messageFont(conf)); + const textObj = getTextObj$1(); + textObj.x = startx; + textObj.y = starty + 10; + textObj.width = stopx - startx; + textObj.class = "messageText"; + textObj.dy = "1em"; + textObj.text = message; + textObj.fontFamily = conf.messageFontFamily; + textObj.fontSize = conf.messageFontSize; + textObj.fontWeight = conf.messageFontWeight; + textObj.anchor = conf.messageAlign; + textObj.valign = "center"; + textObj.textMargin = conf.wrapPadding; + textObj.tspan = false; + drawText(diagram2, textObj); + const textWidth = textDims.width; + let line; + if (startx === stopx) { + if (conf.rightAngles) { + line = diagram2.append("path").attr( + "d", + `M ${startx},${lineStartY} H ${startx + common.getMax(conf.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}` + ); + } else { + line = diagram2.append("path").attr( + "d", + "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20) + ); + } + } else { + line = diagram2.append("line"); + line.attr("x1", startx); + line.attr("y1", lineStartY); + line.attr("x2", stopx); + line.attr("y2", lineStartY); + } + if (type === diagObj.db.LINETYPE.DOTTED || type === diagObj.db.LINETYPE.DOTTED_CROSS || type === diagObj.db.LINETYPE.DOTTED_POINT || type === diagObj.db.LINETYPE.DOTTED_OPEN) { + line.style("stroke-dasharray", "3, 3"); + line.attr("class", "messageLine1"); + } else { + line.attr("class", "messageLine0"); + } + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + line.attr("stroke-width", 2); + line.attr("stroke", "none"); + line.style("fill", "none"); + if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) { + line.attr("marker-end", "url(" + url + "#filled-head)"); + } + if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) { + line.attr("marker-end", "url(" + url + "#crosshead)"); + } + if (sequenceVisible || conf.showSequenceNumbers) { + line.attr("marker-start", "url(" + url + "#sequencenumber)"); + diagram2.append("text").attr("x", startx).attr("y", lineStartY + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(sequenceIndex); + } +}; +const addActorRenderingData = function(diagram2, actors2, createdActors2, actorKeys, verticalPos, messages2, isFooter) { + let prevWidth = 0; + let prevMargin = 0; + let prevBox = void 0; + let maxHeight = 0; + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + const box = actor.box; + if (prevBox && prevBox != box) { + if (!isFooter) { + bounds.models.addBox(prevBox); + } + prevMargin += conf.boxMargin + prevBox.margin; + } + if (box && box != prevBox) { + if (!isFooter) { + box.x = prevWidth + prevMargin; + box.y = verticalPos; + } + prevMargin += box.margin; + } + actor.width = actor.width || conf.width; + actor.height = common.getMax(actor.height || conf.height, conf.height); + actor.margin = actor.margin || conf.actorMargin; + maxHeight = common.getMax(maxHeight, actor.height); + if (createdActors2[actor.name]) { + prevMargin += actor.width / 2; + } + actor.x = prevWidth + prevMargin; + actor.starty = bounds.getVerticalPos(); + bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height); + prevWidth += actor.width + prevMargin; + if (actor.box) { + actor.box.width = prevWidth + box.margin - actor.box.x; + } + prevMargin = actor.margin; + prevBox = actor.box; + bounds.models.addActor(actor); + } + if (prevBox && !isFooter) { + bounds.models.addBox(prevBox); + } + bounds.bumpVerticalPos(maxHeight); +}; +const drawActors = function(diagram2, actors2, actorKeys, isFooter) { + if (!isFooter) { + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + svgDraw.drawActor(diagram2, actor, conf, false); + } + } else { + let maxHeight = 0; + bounds.bumpVerticalPos(conf.boxMargin * 2); + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + if (!actor.stopy) { + actor.stopy = bounds.getVerticalPos(); + } + const height = svgDraw.drawActor(diagram2, actor, conf, true); + maxHeight = common.getMax(maxHeight, height); + } + bounds.bumpVerticalPos(maxHeight + conf.boxMargin); + } +}; +const drawActorsPopup = function(diagram2, actors2, actorKeys, doc) { + let maxHeight = 0; + let maxWidth = 0; + for (const actorKey of actorKeys) { + const actor = actors2[actorKey]; + const minMenuWidth = getRequiredPopupWidth(actor); + const menuDimensions = svgDraw.drawPopup( + diagram2, + actor, + minMenuWidth, + conf, + conf.forceMenus, + doc + ); + if (menuDimensions.height > maxHeight) { + maxHeight = menuDimensions.height; + } + if (menuDimensions.width + actor.x > maxWidth) { + maxWidth = menuDimensions.width + actor.x; + } + } + return { maxHeight, maxWidth }; +}; +const setConf = function(cnf) { + assignWithDepth(conf, cnf); + if (cnf.fontFamily) { + conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight; + } +}; +const actorActivations = function(actor) { + return bounds.activations.filter(function(activation) { + return activation.actor === actor; + }); +}; +const activationBounds = function(actor, actors2) { + const actorObj = actors2[actor]; + const activations = actorActivations(actor); + const left = activations.reduce(function(acc, activation) { + return common.getMin(acc, activation.startx); + }, actorObj.x + actorObj.width / 2 - 1); + const right = activations.reduce(function(acc, activation) { + return common.getMax(acc, activation.stopx); + }, actorObj.x + actorObj.width / 2 + 1); + return [left, right]; +}; +function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) { + bounds.bumpVerticalPos(preMargin); + let heightAdjust = postMargin; + if (msg.id && msg.message && loopWidths[msg.id]) { + const loopWidth = loopWidths[msg.id].width; + const textConf = messageFont(conf); + msg.message = utils.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf); + msg.width = loopWidth; + msg.wrap = true; + const textDims = utils.calculateTextDimensions(msg.message, textConf); + const totalOffset = common.getMax(textDims.height, conf.labelBoxHeight); + heightAdjust = postMargin + totalOffset; + log.debug(`${totalOffset} - ${msg.message}`); + } + addLoopFn(msg); + bounds.bumpVerticalPos(heightAdjust); +} +function adjustCreatedDestroyedData(msg, msgModel, lineStartY, index, actors2, createdActors2, destroyedActors2) { + function receiverAdjustment(actor, adjustment) { + if (actor.x < actors2[msg.from].x) { + bounds.insert( + msgModel.stopx - adjustment, + msgModel.starty, + msgModel.startx, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.stopx = msgModel.stopx + adjustment; + } else { + bounds.insert( + msgModel.startx, + msgModel.starty, + msgModel.stopx + adjustment, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.stopx = msgModel.stopx - adjustment; + } + } + function senderAdjustment(actor, adjustment) { + if (actor.x < actors2[msg.to].x) { + bounds.insert( + msgModel.startx - adjustment, + msgModel.starty, + msgModel.stopx, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.startx = msgModel.startx + adjustment; + } else { + bounds.insert( + msgModel.stopx, + msgModel.starty, + msgModel.startx + adjustment, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.startx = msgModel.startx - adjustment; + } + } + if (createdActors2[msg.to] == index) { + const actor = actors2[msg.to]; + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + actor.starty = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors2[msg.from] == index) { + const actor = actors2[msg.from]; + if (conf.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2; + senderAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors2[msg.to] == index) { + const actor = actors2[msg.to]; + if (conf.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } +} +const draw = function(_text, id, _version, diagObj) { + const { securityLevel, sequence } = getConfig(); + conf = sequence; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + bounds.init(); + log.debug(diagObj.db); + const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : d3select(`[id="${id}"]`); + const actors2 = diagObj.db.getActors(); + const createdActors2 = diagObj.db.getCreatedActors(); + const destroyedActors2 = diagObj.db.getDestroyedActors(); + const boxes2 = diagObj.db.getBoxes(); + let actorKeys = diagObj.db.getActorKeys(); + const messages2 = diagObj.db.getMessages(); + const title = diagObj.db.getDiagramTitle(); + const hasBoxes = diagObj.db.hasAtLeastOneBox(); + const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle(); + const maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors2, messages2, diagObj); + conf.height = calculateActorMargins(actors2, maxMessageWidthPerActor, boxes2); + svgDraw.insertComputerIcon(diagram2); + svgDraw.insertDatabaseIcon(diagram2); + svgDraw.insertClockIcon(diagram2); + if (hasBoxes) { + bounds.bumpVerticalPos(conf.boxMargin); + if (hasBoxTitles) { + bounds.bumpVerticalPos(boxes2[0].textMaxHeight); + } + } + if (conf.hideUnusedParticipants === true) { + const newActors = /* @__PURE__ */ new Set(); + messages2.forEach((message) => { + newActors.add(message.from); + newActors.add(message.to); + }); + actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey)); + } + addActorRenderingData(diagram2, actors2, createdActors2, actorKeys, 0, messages2, false); + const loopWidths = calculateLoopBounds(messages2, actors2, maxMessageWidthPerActor, diagObj); + svgDraw.insertArrowHead(diagram2); + svgDraw.insertArrowCrossHead(diagram2); + svgDraw.insertArrowFilledHead(diagram2); + svgDraw.insertSequenceNumber(diagram2); + function activeEnd(msg, verticalPos) { + const activationData = bounds.endActivation(msg); + if (activationData.starty + 18 > verticalPos) { + activationData.starty = verticalPos - 6; + verticalPos += 12; + } + svgDraw.drawActivation( + diagram2, + activationData, + verticalPos, + conf, + actorActivations(msg.from.actor).length + ); + bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos); + } + let sequenceIndex = 1; + let sequenceIndexStep = 1; + const messagesToDraw = []; + const backgrounds = []; + messages2.forEach(function(msg, index) { + let loopModel, noteModel, msgModel; + switch (msg.type) { + case diagObj.db.LINETYPE.NOTE: + bounds.resetVerticalPos(); + noteModel = msg.noteModel; + drawNote(diagram2, noteModel); + break; + case diagObj.db.LINETYPE.ACTIVE_START: + bounds.newActivation(msg, diagram2, actors2); + break; + case diagObj.db.LINETYPE.ACTIVE_END: + activeEnd(msg, bounds.getVerticalPos()); + break; + case diagObj.db.LINETYPE.LOOP_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.LOOP_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "loop", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.RECT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin, + (message) => bounds.newLoop(void 0, message.message) + ); + break; + case diagObj.db.LINETYPE.RECT_END: + loopModel = bounds.endLoop(); + backgrounds.push(loopModel); + bounds.models.addLoop(loopModel); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + break; + case diagObj.db.LINETYPE.OPT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.OPT_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "opt", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.ALT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "alt", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + bounds.saveVerticalPos(); + break; + case diagObj.db.LINETYPE.PAR_AND: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.PAR_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "par", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.AUTONUMBER: + sequenceIndex = msg.message.start || sequenceIndex; + sequenceIndexStep = msg.message.step || sequenceIndexStep; + if (msg.message.visible) { + diagObj.db.enableSequenceNumbers(); + } else { + diagObj.db.disableSequenceNumbers(); + } + break; + case diagObj.db.LINETYPE.CRITICAL_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_OPTION: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "critical", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.BREAK_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.BREAK_END: + loopModel = bounds.endLoop(); + svgDraw.drawLoop(diagram2, loopModel, "break", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + default: + try { + msgModel = msg.msgModel; + msgModel.starty = bounds.getVerticalPos(); + msgModel.sequenceIndex = sequenceIndex; + msgModel.sequenceVisible = diagObj.db.showSequenceNumbers(); + const lineStartY = boundMessage(diagram2, msgModel); + adjustCreatedDestroyedData( + msg, + msgModel, + lineStartY, + index, + actors2, + createdActors2, + destroyedActors2 + ); + messagesToDraw.push({ messageModel: msgModel, lineStartY }); + bounds.models.addMessage(msgModel); + } catch (e) { + log.error("error while drawing message", e); + } + } + if ([ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + sequenceIndex = sequenceIndex + sequenceIndexStep; + } + }); + log.debug("createdActors", createdActors2); + log.debug("destroyedActors", destroyedActors2); + drawActors(diagram2, actors2, actorKeys, false); + messagesToDraw.forEach((e) => drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj)); + if (conf.mirrorActors) { + drawActors(diagram2, actors2, actorKeys, true); + } + backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram2, e)); + fixLifeLineHeights(diagram2, actors2, actorKeys, conf); + bounds.models.boxes.forEach(function(box2) { + box2.height = bounds.getVerticalPos() - box2.y; + bounds.insert(box2.x, box2.y, box2.x + box2.width, box2.height); + box2.startx = box2.x; + box2.starty = box2.y; + box2.stopx = box2.startx + box2.width; + box2.stopy = box2.starty + box2.height; + box2.stroke = "rgb(0,0,0, 0.5)"; + svgDraw.drawBox(diagram2, box2, conf); + }); + if (hasBoxes) { + bounds.bumpVerticalPos(conf.boxMargin); + } + const requiredBoxSize = drawActorsPopup(diagram2, actors2, actorKeys, doc); + const { bounds: box } = bounds.getBounds(); + let boxHeight = box.stopy - box.starty; + if (boxHeight < requiredBoxSize.maxHeight) { + boxHeight = requiredBoxSize.maxHeight; + } + let height = boxHeight + 2 * conf.diagramMarginY; + if (conf.mirrorActors) { + height = height - conf.boxMargin + conf.bottomMarginAdj; + } + let boxWidth = box.stopx - box.startx; + if (boxWidth < requiredBoxSize.maxWidth) { + boxWidth = requiredBoxSize.maxWidth; + } + const width = boxWidth + 2 * conf.diagramMarginX; + if (title) { + diagram2.append("text").text(title).attr("x", (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr("y", -25); + } + configureSvgSize(diagram2, height, width, conf.useMaxWidth); + const extraVertForTitle = title ? 40 : 0; + diagram2.attr( + "viewBox", + box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); + log.debug(`models:`, bounds.models); +}; +function getMaxMessageWidthPerActor(actors2, messages2, diagObj) { + const maxMessageWidthPerActor = {}; + messages2.forEach(function(msg) { + if (actors2[msg.to] && actors2[msg.from]) { + const actor = actors2[msg.to]; + if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) { + return; + } + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) { + return; + } + const isNote = msg.placement !== void 0; + const isMessage = !isNote; + const textFont = isNote ? noteFont(conf) : messageFont(conf); + const wrappedMessage = msg.wrap ? utils.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message; + const messageDimensions = utils.calculateTextDimensions(wrappedMessage, textFont); + const messageWidth = messageDimensions.width + 2 * conf.wrapPadding; + if (isMessage && msg.from === actor.nextActor) { + maxMessageWidthPerActor[msg.to] = common.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth + ); + } else if (isMessage && msg.from === actor.prevActor) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (isMessage && msg.from === msg.to) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + maxMessageWidthPerActor[msg.to] = common.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth / 2 + ); + } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + maxMessageWidthPerActor[actor.prevActor] = common.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.OVER) { + if (actor.prevActor) { + maxMessageWidthPerActor[actor.prevActor] = common.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth / 2 + ); + } + if (actor.nextActor) { + maxMessageWidthPerActor[msg.from] = common.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + } + } + } + }); + log.debug("maxMessageWidthPerActor:", maxMessageWidthPerActor); + return maxMessageWidthPerActor; +} +const getRequiredPopupWidth = function(actor) { + let requiredPopupWidth = 0; + const textFont = actorFont(conf); + for (const key in actor.links) { + const labelDimensions = utils.calculateTextDimensions(key, textFont); + const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin; + if (requiredPopupWidth < labelWidth) { + requiredPopupWidth = labelWidth; + } + } + return requiredPopupWidth; +}; +function calculateActorMargins(actors2, actorToMessageWidth, boxes2) { + let maxHeight = 0; + Object.keys(actors2).forEach((prop) => { + const actor = actors2[prop]; + if (actor.wrap) { + actor.description = utils.wrapLabel( + actor.description, + conf.width - 2 * conf.wrapPadding, + actorFont(conf) + ); + } + const actDims = utils.calculateTextDimensions(actor.description, actorFont(conf)); + actor.width = actor.wrap ? conf.width : common.getMax(conf.width, actDims.width + 2 * conf.wrapPadding); + actor.height = actor.wrap ? common.getMax(actDims.height, conf.height) : conf.height; + maxHeight = common.getMax(maxHeight, actor.height); + }); + for (const actorKey in actorToMessageWidth) { + const actor = actors2[actorKey]; + if (!actor) { + continue; + } + const nextActor = actors2[actor.nextActor]; + if (!nextActor) { + const messageWidth2 = actorToMessageWidth[actorKey]; + const actorWidth2 = messageWidth2 + conf.actorMargin - actor.width / 2; + actor.margin = common.getMax(actorWidth2, conf.actorMargin); + continue; + } + const messageWidth = actorToMessageWidth[actorKey]; + const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2; + actor.margin = common.getMax(actorWidth, conf.actorMargin); + } + let maxBoxHeight = 0; + boxes2.forEach((box) => { + const textFont = messageFont(conf); + let totalWidth = box.actorKeys.reduce((total, aKey) => { + return total += actors2[aKey].width + (actors2[aKey].margin || 0); + }, 0); + totalWidth -= 2 * conf.boxTextMargin; + if (box.wrap) { + box.name = utils.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont); + } + const boxMsgDimensions = utils.calculateTextDimensions(box.name, textFont); + maxBoxHeight = common.getMax(boxMsgDimensions.height, maxBoxHeight); + const minWidth = common.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding); + box.margin = conf.boxTextMargin; + if (totalWidth < minWidth) { + const missing = (minWidth - totalWidth) / 2; + box.margin += missing; + } + }); + boxes2.forEach((box) => box.textMaxHeight = maxBoxHeight); + return common.getMax(maxHeight, conf.height); +} +const buildNoteModel = function(msg, actors2, diagObj) { + const startx = actors2[msg.from].x; + const stopx = actors2[msg.to].x; + const shouldWrap = msg.wrap && msg.message; + let textDimensions = utils.calculateTextDimensions( + shouldWrap ? utils.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, + noteFont(conf) + ); + const noteModel = { + width: shouldWrap ? conf.width : common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin), + height: 0, + startx: actors2[msg.from].x, + stopx: 0, + starty: 0, + stopy: 0, + message: msg.message + }; + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + noteModel.width = shouldWrap ? common.getMax(conf.width, textDimensions.width) : common.getMax( + actors2[msg.from].width / 2 + actors2[msg.to].width / 2, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx + (actors2[msg.from].width + conf.actorMargin) / 2; + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + noteModel.width = shouldWrap ? common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin) : common.getMax( + actors2[msg.from].width / 2 + actors2[msg.to].width / 2, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx - noteModel.width + (actors2[msg.from].width - conf.actorMargin) / 2; + } else if (msg.to === msg.from) { + textDimensions = utils.calculateTextDimensions( + shouldWrap ? utils.wrapLabel( + msg.message, + common.getMax(conf.width, actors2[msg.from].width), + noteFont(conf) + ) : msg.message, + noteFont(conf) + ); + noteModel.width = shouldWrap ? common.getMax(conf.width, actors2[msg.from].width) : common.getMax( + actors2[msg.from].width, + conf.width, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx + (actors2[msg.from].width - noteModel.width) / 2; + } else { + noteModel.width = Math.abs(startx + actors2[msg.from].width / 2 - (stopx + actors2[msg.to].width / 2)) + conf.actorMargin; + noteModel.startx = startx < stopx ? startx + actors2[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors2[msg.to].width / 2 - conf.actorMargin / 2; + } + if (shouldWrap) { + noteModel.message = utils.wrapLabel( + msg.message, + noteModel.width - 2 * conf.wrapPadding, + noteFont(conf) + ); + } + log.debug( + `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]` + ); + return noteModel; +}; +const buildMessageModel = function(msg, actors2, diagObj) { + if (![ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + return {}; + } + const [fromLeft, fromRight] = activationBounds(msg.from, actors2); + const [toLeft, toRight] = activationBounds(msg.to, actors2); + const isArrowToRight = fromLeft <= toLeft; + const startx = isArrowToRight ? fromRight : fromLeft; + let stopx = isArrowToRight ? toLeft : toRight; + const isArrowToActivation = Math.abs(toLeft - toRight) > 2; + const adjustValue = (value) => { + return isArrowToRight ? -value : value; + }; + if (msg.from === msg.to) { + stopx = startx; + } else { + if (msg.activate && !isArrowToActivation) { + stopx += adjustValue(conf.activationWidth / 2 - 1); + } + if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) { + stopx += adjustValue(3); + } + } + const allBounds = [fromLeft, fromRight, toLeft, toRight]; + const boundedWidth = Math.abs(startx - stopx); + if (msg.wrap && msg.message) { + msg.message = utils.wrapLabel( + msg.message, + common.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width), + messageFont(conf) + ); + } + const msgDims = utils.calculateTextDimensions(msg.message, messageFont(conf)); + return { + width: common.getMax( + msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, + boundedWidth + 2 * conf.wrapPadding, + conf.width + ), + height: 0, + startx, + stopx, + starty: 0, + stopy: 0, + message: msg.message, + type: msg.type, + wrap: msg.wrap, + fromBounds: Math.min.apply(null, allBounds), + toBounds: Math.max.apply(null, allBounds) + }; +}; +const calculateLoopBounds = function(messages2, actors2, _maxWidthPerActor, diagObj) { + const loops = {}; + const stack = []; + let current, noteModel, msgModel; + messages2.forEach(function(msg) { + msg.id = utils.random({ length: 10 }); + switch (msg.type) { + case diagObj.db.LINETYPE.LOOP_START: + case diagObj.db.LINETYPE.ALT_START: + case diagObj.db.LINETYPE.OPT_START: + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + case diagObj.db.LINETYPE.CRITICAL_START: + case diagObj.db.LINETYPE.BREAK_START: + stack.push({ + id: msg.id, + msg: msg.message, + from: Number.MAX_SAFE_INTEGER, + to: Number.MIN_SAFE_INTEGER, + width: 0 + }); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + case diagObj.db.LINETYPE.PAR_AND: + case diagObj.db.LINETYPE.CRITICAL_OPTION: + if (msg.message) { + current = stack.pop(); + loops[current.id] = current; + loops[msg.id] = current; + stack.push(current); + } + break; + case diagObj.db.LINETYPE.LOOP_END: + case diagObj.db.LINETYPE.ALT_END: + case diagObj.db.LINETYPE.OPT_END: + case diagObj.db.LINETYPE.PAR_END: + case diagObj.db.LINETYPE.CRITICAL_END: + case diagObj.db.LINETYPE.BREAK_END: + current = stack.pop(); + loops[current.id] = current; + break; + case diagObj.db.LINETYPE.ACTIVE_START: + { + const actorRect = actors2[msg.from ? msg.from.actor : msg.to.actor]; + const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length; + const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + const toAdd = { + startx: x, + stopx: x + conf.activationWidth, + actor: msg.from.actor, + enabled: true + }; + bounds.activations.push(toAdd); + } + break; + case diagObj.db.LINETYPE.ACTIVE_END: + { + const lastActorActivationIdx = bounds.activations.map((a) => a.actor).lastIndexOf(msg.from.actor); + delete bounds.activations.splice(lastActorActivationIdx, 1)[0]; + } + break; + } + const isNote = msg.placement !== void 0; + if (isNote) { + noteModel = buildNoteModel(msg, actors2, diagObj); + msg.noteModel = noteModel; + stack.forEach((stk) => { + current = stk; + current.from = common.getMin(current.from, noteModel.startx); + current.to = common.getMax(current.to, noteModel.startx + noteModel.width); + current.width = common.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth; + }); + } else { + msgModel = buildMessageModel(msg, actors2, diagObj); + msg.msgModel = msgModel; + if (msgModel.startx && msgModel.stopx && stack.length > 0) { + stack.forEach((stk) => { + current = stk; + if (msgModel.startx === msgModel.stopx) { + const from = actors2[msg.from]; + const to = actors2[msg.to]; + current.from = common.getMin( + from.x - msgModel.width / 2, + from.x - from.width / 2, + current.from + ); + current.to = common.getMax( + to.x + msgModel.width / 2, + to.x + from.width / 2, + current.to + ); + current.width = common.getMax(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth; + } else { + current.from = common.getMin(msgModel.startx, current.from); + current.to = common.getMax(msgModel.stopx, current.to); + current.width = common.getMax(current.width, msgModel.width) - conf.labelBoxWidth; + } + }); + } + } + }); + bounds.activations = []; + log.debug("Loop type widths:", loops); + return loops; +}; +const renderer = { + bounds, + drawActors, + drawActorsPopup, + setConf, + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: ({ wrap }) => { + db.setWrap(wrap); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/setupGraphViewbox.d.ts b/webroot/js/node_modules/mermaid/dist/setupGraphViewbox.d.ts new file mode 100644 index 0000000..d31c8f7 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/setupGraphViewbox.d.ts @@ -0,0 +1,3 @@ +export function calculateSvgSizeAttrs(height: number, width: number, useMaxWidth: boolean): Map<'height' | 'width' | 'style', string>; +export function configureSvgSize(svgElem: import('./diagram-api/types.js').SVG, height: number, width: number, useMaxWidth: boolean): void; +export function setupGraphViewbox(graph: any, svgElem: any, padding: any, useMaxWidth: any): void; diff --git a/webroot/js/node_modules/mermaid/dist/stateDiagram-0d589c85.js b/webroot/js/node_modules/mermaid/dist/stateDiagram-0d589c85.js new file mode 100644 index 0000000..667fdba --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/stateDiagram-0d589c85.js @@ -0,0 +1,474 @@ +import { d as db, p as parser, s as styles } from "./styles-24dfea38.js"; +import { line, curveBasis, select } from "d3"; +import { layout } from "dagre-d3-es/src/dagre/index.js"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { c as getConfig, u as utils, e as common, l as log, i as configureSvgSize } from "./mermaid-0d192ec3.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +const idCache = {}; +const set = (key, val) => { + idCache[key] = val; +}; +const get = (k) => idCache[k]; +const keys = () => Object.keys(idCache); +const size = () => keys().length; +const idCache$1 = { + get, + set, + keys, + size +}; +const drawStartState = (g) => g.append("circle").attr("class", "start-state").attr("r", getConfig().state.sizeUnit).attr("cx", getConfig().state.padding + getConfig().state.sizeUnit).attr("cy", getConfig().state.padding + getConfig().state.sizeUnit); +const drawDivider = (g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", getConfig().state.textHeight).attr("class", "divider").attr("x2", getConfig().state.textHeight * 2).attr("y1", 0).attr("y2", 0); +const drawSimpleState = (g, stateDef) => { + const state = g.append("text").attr("x", 2 * getConfig().state.padding).attr("y", getConfig().state.textHeight + 2 * getConfig().state.padding).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.id); + const classBox = state.node().getBBox(); + g.insert("rect", ":first-child").attr("x", getConfig().state.padding).attr("y", getConfig().state.padding).attr("width", classBox.width + 2 * getConfig().state.padding).attr("height", classBox.height + 2 * getConfig().state.padding).attr("rx", getConfig().state.radius); + return state; +}; +const drawDescrState = (g, stateDef) => { + const addTspan = function(textEl, txt, isFirst2) { + const tSpan = textEl.append("tspan").attr("x", 2 * getConfig().state.padding).text(txt); + if (!isFirst2) { + tSpan.attr("dy", getConfig().state.textHeight); + } + }; + const title = g.append("text").attr("x", 2 * getConfig().state.padding).attr("y", getConfig().state.textHeight + 1.3 * getConfig().state.padding).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]); + const titleBox = title.node().getBBox(); + const titleHeight = titleBox.height; + const description = g.append("text").attr("x", getConfig().state.padding).attr( + "y", + titleHeight + getConfig().state.padding * 0.4 + getConfig().state.dividerMargin + getConfig().state.textHeight + ).attr("class", "state-description"); + let isFirst = true; + let isSecond = true; + stateDef.descriptions.forEach(function(descr) { + if (!isFirst) { + addTspan(description, descr, isSecond); + isSecond = false; + } + isFirst = false; + }); + const descrLine = g.append("line").attr("x1", getConfig().state.padding).attr("y1", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr("y2", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr("class", "descr-divider"); + const descrBox = description.node().getBBox(); + const width = Math.max(descrBox.width, titleBox.width); + descrLine.attr("x2", width + 3 * getConfig().state.padding); + g.insert("rect", ":first-child").attr("x", getConfig().state.padding).attr("y", getConfig().state.padding).attr("width", width + 2 * getConfig().state.padding).attr("height", descrBox.height + titleHeight + 2 * getConfig().state.padding).attr("rx", getConfig().state.radius); + return g; +}; +const addTitleAndBox = (g, stateDef, altBkg) => { + const pad = getConfig().state.padding; + const dblPad = 2 * getConfig().state.padding; + const orgBox = g.node().getBBox(); + const orgWidth = orgBox.width; + const orgX = orgBox.x; + const title = g.append("text").attr("x", 0).attr("y", getConfig().state.titleShift).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.id); + const titleBox = title.node().getBBox(); + const titleWidth = titleBox.width + dblPad; + let width = Math.max(titleWidth, orgWidth); + if (width === orgWidth) { + width = width + dblPad; + } + let startX; + const graphBox = g.node().getBBox(); + if (stateDef.doc) + ; + startX = orgX - pad; + if (titleWidth > orgWidth) { + startX = (orgWidth - width) / 2 + pad; + } + if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) { + startX = orgX - (titleWidth - orgWidth) / 2; + } + const lineY = 1 - getConfig().state.textHeight; + g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr( + "height", + graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1 + ).attr("rx", "0"); + title.attr("x", startX + pad); + if (titleWidth <= orgWidth) { + title.attr("x", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); + } + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding + ).attr("width", width).attr("height", getConfig().state.textHeight * 3).attr("rx", getConfig().state.radius); + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding + ).attr("width", width).attr("height", graphBox.height + 3 + 2 * getConfig().state.textHeight).attr("rx", getConfig().state.radius); + return g; +}; +const drawEndState = (g) => { + g.append("circle").attr("class", "end-state-outer").attr("r", getConfig().state.sizeUnit + getConfig().state.miniPadding).attr( + "cx", + getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding + ).attr( + "cy", + getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding + ); + return g.append("circle").attr("class", "end-state-inner").attr("r", getConfig().state.sizeUnit).attr("cx", getConfig().state.padding + getConfig().state.sizeUnit + 2).attr("cy", getConfig().state.padding + getConfig().state.sizeUnit + 2); +}; +const drawForkJoinState = (g, stateDef) => { + let width = getConfig().state.forkWidth; + let height = getConfig().state.forkHeight; + if (stateDef.parentId) { + let tmp = width; + width = height; + height = tmp; + } + return g.append("rect").style("stroke", "black").style("fill", "black").attr("width", width).attr("height", height).attr("x", getConfig().state.padding).attr("y", getConfig().state.padding); +}; +const _drawLongText = (_text, x, y, g) => { + let textHeight = 0; + const textElem = g.append("text"); + textElem.style("text-anchor", "start"); + textElem.attr("class", "noteText"); + let text = _text.replace(/\r\n/g, "
"); + text = text.replace(/\n/g, "
"); + const lines = text.split(common.lineBreakRegex); + let tHeight = 1.25 * getConfig().state.noteMargin; + for (const line2 of lines) { + const txt = line2.trim(); + if (txt.length > 0) { + const span = textElem.append("tspan"); + span.text(txt); + if (tHeight === 0) { + const textBounds = span.node().getBBox(); + tHeight += textBounds.height; + } + textHeight += tHeight; + span.attr("x", x + getConfig().state.noteMargin); + span.attr("y", y + textHeight + 1.25 * getConfig().state.noteMargin); + } + } + return { textWidth: textElem.node().getBBox().width, textHeight }; +}; +const drawNote = (text, g) => { + g.attr("class", "state-note"); + const note = g.append("rect").attr("x", 0).attr("y", getConfig().state.padding); + const rectElem = g.append("g"); + const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem); + note.attr("height", textHeight + 2 * getConfig().state.noteMargin); + note.attr("width", textWidth + getConfig().state.noteMargin * 2); + return note; +}; +const drawState = function(elem, stateDef) { + const id = stateDef.id; + const stateInfo = { + id, + label: stateDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id).attr("class", "stateGroup"); + if (stateDef.type === "start") { + drawStartState(g); + } + if (stateDef.type === "end") { + drawEndState(g); + } + if (stateDef.type === "fork" || stateDef.type === "join") { + drawForkJoinState(g, stateDef); + } + if (stateDef.type === "note") { + drawNote(stateDef.note.text, g); + } + if (stateDef.type === "divider") { + drawDivider(g); + } + if (stateDef.type === "default" && stateDef.descriptions.length === 0) { + drawSimpleState(g, stateDef); + } + if (stateDef.type === "default" && stateDef.descriptions.length > 0) { + drawDescrState(g, stateDef); + } + const stateBox = g.node().getBBox(); + stateInfo.width = stateBox.width + 2 * getConfig().state.padding; + stateInfo.height = stateBox.height + 2 * getConfig().state.padding; + idCache$1.set(id, stateInfo); + return stateInfo; +}; +let edgeCount = 0; +const drawEdge = function(elem, path, relation) { + const getRelationType = function(type) { + switch (type) { + case db.relationType.AGGREGATION: + return "aggregation"; + case db.relationType.EXTENSION: + return "extension"; + case db.relationType.COMPOSITION: + return "composition"; + case db.relationType.DEPENDENCY: + return "dependency"; + } + }; + path.points = path.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path.points; + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "transition"); + let url = ""; + if (getConfig().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(db.relationType.DEPENDENCY) + "End)" + ); + if (relation.title !== void 0) { + const label = elem.append("g").attr("class", "stateLabel"); + const { x, y } = utils.calcLabelPosition(path.points); + const rows = common.getRows(relation.title); + let titleHeight = 0; + const titleRows = []; + let maxWidth = 0; + let minX = 0; + for (let i = 0; i <= rows.length; i++) { + const title = label.append("text").attr("text-anchor", "middle").text(rows[i]).attr("x", x).attr("y", y + titleHeight); + const boundstmp = title.node().getBBox(); + maxWidth = Math.max(maxWidth, boundstmp.width); + minX = Math.min(minX, boundstmp.x); + log.info(boundstmp.x, x, y + titleHeight); + if (titleHeight === 0) { + const titleBox = title.node().getBBox(); + titleHeight = titleBox.height; + log.info("Title height", titleHeight, y); + } + titleRows.push(title); + } + let boxHeight = titleHeight * rows.length; + if (rows.length > 1) { + const heightAdj = (rows.length - 1) * titleHeight * 0.5; + titleRows.forEach((title, i) => title.attr("y", y + i * titleHeight - heightAdj)); + boxHeight = titleHeight * rows.length; + } + const bounds = label.node().getBBox(); + label.insert("rect", ":first-child").attr("class", "box").attr("x", x - maxWidth / 2 - getConfig().state.padding / 2).attr("y", y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5).attr("width", maxWidth + getConfig().state.padding).attr("height", boxHeight + getConfig().state.padding); + log.info(bounds); + } + edgeCount++; +}; +let conf; +const transformationLog = {}; +const setConf = function() { +}; +const insertMarkers = function(elem) { + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); +}; +const draw = function(text, id, _version, diagObj) { + conf = getConfig().state; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + log.debug("Rendering diagram " + text); + const diagram2 = root.select(`[id='${id}']`); + insertMarkers(diagram2); + const rootDoc = diagObj.db.getRootDoc(); + renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj); + const padding = conf.padding; + const bounds = diagram2.node().getBBox(); + const width = bounds.width + padding * 2; + const height = bounds.height + padding * 2; + const svgWidth = width * 1.75; + configureSvgSize(diagram2, height, svgWidth, conf.useMaxWidth); + diagram2.attr( + "viewBox", + `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + " " + height + ); +}; +const getLabelWidth = (text) => { + return text ? text.length * conf.fontSizeFactor : 1; +}; +const renderDoc = (doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => { + const graph = new graphlib.Graph({ + compound: true, + multigraph: true + }); + let i; + let edgeFreeDoc = true; + for (i = 0; i < doc.length; i++) { + if (doc[i].stmt === "relation") { + edgeFreeDoc = false; + break; + } + } + if (parentId) { + graph.setGraph({ + rankdir: "LR", + multigraph: true, + compound: true, + // acyclicer: 'greedy', + ranker: "tight-tree", + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + isMultiGraph: true + // ranksep: 5, + // nodesep: 1 + }); + } else { + graph.setGraph({ + rankdir: "TB", + multigraph: true, + compound: true, + // isCompound: true, + // acyclicer: 'greedy', + // ranker: 'longest-path' + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + ranker: "tight-tree", + // ranker: 'network-simplex' + isMultiGraph: true + }); + } + graph.setDefaultEdgeLabel(function() { + return {}; + }); + diagObj.db.extract(doc); + const states = diagObj.db.getStates(); + const relations = diagObj.db.getRelations(); + const keys2 = Object.keys(states); + for (const key of keys2) { + const stateDef = states[key]; + if (parentId) { + stateDef.parentId = parentId; + } + let node; + if (stateDef.doc) { + let sub = diagram2.append("g").attr("id", stateDef.id).attr("class", "stateGroup"); + node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj); + { + sub = addTitleAndBox(sub, stateDef, altBkg); + let boxBounds = sub.node().getBBox(); + node.width = boxBounds.width; + node.height = boxBounds.height + conf.padding / 2; + transformationLog[stateDef.id] = { y: conf.compositTitleSize }; + } + } else { + node = drawState(diagram2, stateDef); + } + if (stateDef.note) { + const noteDef = { + descriptions: [], + id: stateDef.id + "-note", + note: stateDef.note, + type: "note" + }; + const note = drawState(diagram2, noteDef); + if (stateDef.note.position === "left of") { + graph.setNode(node.id + "-note", note); + graph.setNode(node.id, node); + } else { + graph.setNode(node.id, node); + graph.setNode(node.id + "-note", note); + } + graph.setParent(node.id, node.id + "-group"); + graph.setParent(node.id + "-note", node.id + "-group"); + } else { + graph.setNode(node.id, node); + } + } + log.debug("Count=", graph.nodeCount(), graph); + let cnt = 0; + relations.forEach(function(relation) { + cnt++; + log.debug("Setting edge", relation); + graph.setEdge( + relation.id1, + relation.id2, + { + relation, + width: getLabelWidth(relation.title), + height: conf.labelHeight * common.getRows(relation.title).length, + labelpos: "c" + }, + "id" + cnt + ); + }); + layout(graph); + log.debug("Graph after layout", graph.nodes()); + const svgElem = diagram2.node(); + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + log.warn("Node " + v + ": " + JSON.stringify(graph.node(v))); + root.select("#" + svgElem.id + " #" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )" + ); + root.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2); + const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider"); + dividers.forEach((divider) => { + const parent = divider.parentElement; + let pWidth = 0; + let pShift = 0; + if (parent) { + if (parent.parentElement) { + pWidth = parent.parentElement.getBBox().width; + } + pShift = parseInt(parent.getAttribute("data-x-shift"), 10); + if (Number.isNaN(pShift)) { + pShift = 0; + } + } + divider.setAttribute("x1", 0 - pShift + 8); + divider.setAttribute("x2", pWidth - pShift - 8); + }); + } else { + log.debug("No Node " + v + ": " + JSON.stringify(graph.node(v))); + } + }); + let stateBox = svgElem.getBBox(); + graph.edges().forEach(function(e) { + if (e !== void 0 && graph.edge(e) !== void 0) { + log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + drawEdge(diagram2, graph.edge(e), graph.edge(e).relation); + } + }); + stateBox = svgElem.getBBox(); + const stateInfo = { + id: parentId ? parentId : "root", + label: parentId ? parentId : "root", + width: 0, + height: 0 + }; + stateInfo.width = stateBox.width + 2 * conf.padding; + stateInfo.height = stateBox.height + 2 * conf.padding; + log.debug("Doc rendered", stateInfo, graph); + return stateInfo; +}; +const renderer = { + setConf, + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/stateDiagram-5a3782be.js b/webroot/js/node_modules/mermaid/dist/stateDiagram-5a3782be.js new file mode 100644 index 0000000..536c071 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/stateDiagram-5a3782be.js @@ -0,0 +1,466 @@ +import { d as db, p as parser, s as styles } from "./styles-af0a765a.js"; +import { c as getConfig, F as curveBasis, z as utils, f as common, l as log, j as d3select, k as configureSvgSize } from "./mermaid-491db2d9.js"; +import { G as Graph, l as layout } from "./layout-a7b9ff07.js"; +import { l as line } from "./line-8fd2bd69.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +const idCache = {}; +const set = (key, val) => { + idCache[key] = val; +}; +const get = (k) => idCache[k]; +const keys = () => Object.keys(idCache); +const size = () => keys().length; +const idCache$1 = { + get, + set, + keys, + size +}; +const drawStartState = (g) => g.append("circle").attr("class", "start-state").attr("r", getConfig().state.sizeUnit).attr("cx", getConfig().state.padding + getConfig().state.sizeUnit).attr("cy", getConfig().state.padding + getConfig().state.sizeUnit); +const drawDivider = (g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", getConfig().state.textHeight).attr("class", "divider").attr("x2", getConfig().state.textHeight * 2).attr("y1", 0).attr("y2", 0); +const drawSimpleState = (g, stateDef) => { + const state = g.append("text").attr("x", 2 * getConfig().state.padding).attr("y", getConfig().state.textHeight + 2 * getConfig().state.padding).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.id); + const classBox = state.node().getBBox(); + g.insert("rect", ":first-child").attr("x", getConfig().state.padding).attr("y", getConfig().state.padding).attr("width", classBox.width + 2 * getConfig().state.padding).attr("height", classBox.height + 2 * getConfig().state.padding).attr("rx", getConfig().state.radius); + return state; +}; +const drawDescrState = (g, stateDef) => { + const addTspan = function(textEl, txt, isFirst2) { + const tSpan = textEl.append("tspan").attr("x", 2 * getConfig().state.padding).text(txt); + if (!isFirst2) { + tSpan.attr("dy", getConfig().state.textHeight); + } + }; + const title = g.append("text").attr("x", 2 * getConfig().state.padding).attr("y", getConfig().state.textHeight + 1.3 * getConfig().state.padding).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]); + const titleBox = title.node().getBBox(); + const titleHeight = titleBox.height; + const description = g.append("text").attr("x", getConfig().state.padding).attr( + "y", + titleHeight + getConfig().state.padding * 0.4 + getConfig().state.dividerMargin + getConfig().state.textHeight + ).attr("class", "state-description"); + let isFirst = true; + let isSecond = true; + stateDef.descriptions.forEach(function(descr) { + if (!isFirst) { + addTspan(description, descr, isSecond); + isSecond = false; + } + isFirst = false; + }); + const descrLine = g.append("line").attr("x1", getConfig().state.padding).attr("y1", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr("y2", getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2).attr("class", "descr-divider"); + const descrBox = description.node().getBBox(); + const width = Math.max(descrBox.width, titleBox.width); + descrLine.attr("x2", width + 3 * getConfig().state.padding); + g.insert("rect", ":first-child").attr("x", getConfig().state.padding).attr("y", getConfig().state.padding).attr("width", width + 2 * getConfig().state.padding).attr("height", descrBox.height + titleHeight + 2 * getConfig().state.padding).attr("rx", getConfig().state.radius); + return g; +}; +const addTitleAndBox = (g, stateDef, altBkg) => { + const pad = getConfig().state.padding; + const dblPad = 2 * getConfig().state.padding; + const orgBox = g.node().getBBox(); + const orgWidth = orgBox.width; + const orgX = orgBox.x; + const title = g.append("text").attr("x", 0).attr("y", getConfig().state.titleShift).attr("font-size", getConfig().state.fontSize).attr("class", "state-title").text(stateDef.id); + const titleBox = title.node().getBBox(); + const titleWidth = titleBox.width + dblPad; + let width = Math.max(titleWidth, orgWidth); + if (width === orgWidth) { + width = width + dblPad; + } + let startX; + const graphBox = g.node().getBBox(); + if (stateDef.doc) + ; + startX = orgX - pad; + if (titleWidth > orgWidth) { + startX = (orgWidth - width) / 2 + pad; + } + if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) { + startX = orgX - (titleWidth - orgWidth) / 2; + } + const lineY = 1 - getConfig().state.textHeight; + g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr( + "height", + graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1 + ).attr("rx", "0"); + title.attr("x", startX + pad); + if (titleWidth <= orgWidth) { + title.attr("x", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); + } + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding + ).attr("width", width).attr("height", getConfig().state.textHeight * 3).attr("rx", getConfig().state.radius); + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding + ).attr("width", width).attr("height", graphBox.height + 3 + 2 * getConfig().state.textHeight).attr("rx", getConfig().state.radius); + return g; +}; +const drawEndState = (g) => { + g.append("circle").attr("class", "end-state-outer").attr("r", getConfig().state.sizeUnit + getConfig().state.miniPadding).attr( + "cx", + getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding + ).attr( + "cy", + getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding + ); + return g.append("circle").attr("class", "end-state-inner").attr("r", getConfig().state.sizeUnit).attr("cx", getConfig().state.padding + getConfig().state.sizeUnit + 2).attr("cy", getConfig().state.padding + getConfig().state.sizeUnit + 2); +}; +const drawForkJoinState = (g, stateDef) => { + let width = getConfig().state.forkWidth; + let height = getConfig().state.forkHeight; + if (stateDef.parentId) { + let tmp = width; + width = height; + height = tmp; + } + return g.append("rect").style("stroke", "black").style("fill", "black").attr("width", width).attr("height", height).attr("x", getConfig().state.padding).attr("y", getConfig().state.padding); +}; +const _drawLongText = (_text, x, y, g) => { + let textHeight = 0; + const textElem = g.append("text"); + textElem.style("text-anchor", "start"); + textElem.attr("class", "noteText"); + let text = _text.replace(/\r\n/g, "
"); + text = text.replace(/\n/g, "
"); + const lines = text.split(common.lineBreakRegex); + let tHeight = 1.25 * getConfig().state.noteMargin; + for (const line2 of lines) { + const txt = line2.trim(); + if (txt.length > 0) { + const span = textElem.append("tspan"); + span.text(txt); + if (tHeight === 0) { + const textBounds = span.node().getBBox(); + tHeight += textBounds.height; + } + textHeight += tHeight; + span.attr("x", x + getConfig().state.noteMargin); + span.attr("y", y + textHeight + 1.25 * getConfig().state.noteMargin); + } + } + return { textWidth: textElem.node().getBBox().width, textHeight }; +}; +const drawNote = (text, g) => { + g.attr("class", "state-note"); + const note = g.append("rect").attr("x", 0).attr("y", getConfig().state.padding); + const rectElem = g.append("g"); + const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem); + note.attr("height", textHeight + 2 * getConfig().state.noteMargin); + note.attr("width", textWidth + getConfig().state.noteMargin * 2); + return note; +}; +const drawState = function(elem, stateDef) { + const id = stateDef.id; + const stateInfo = { + id, + label: stateDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id).attr("class", "stateGroup"); + if (stateDef.type === "start") { + drawStartState(g); + } + if (stateDef.type === "end") { + drawEndState(g); + } + if (stateDef.type === "fork" || stateDef.type === "join") { + drawForkJoinState(g, stateDef); + } + if (stateDef.type === "note") { + drawNote(stateDef.note.text, g); + } + if (stateDef.type === "divider") { + drawDivider(g); + } + if (stateDef.type === "default" && stateDef.descriptions.length === 0) { + drawSimpleState(g, stateDef); + } + if (stateDef.type === "default" && stateDef.descriptions.length > 0) { + drawDescrState(g, stateDef); + } + const stateBox = g.node().getBBox(); + stateInfo.width = stateBox.width + 2 * getConfig().state.padding; + stateInfo.height = stateBox.height + 2 * getConfig().state.padding; + idCache$1.set(id, stateInfo); + return stateInfo; +}; +let edgeCount = 0; +const drawEdge = function(elem, path, relation) { + const getRelationType = function(type) { + switch (type) { + case db.relationType.AGGREGATION: + return "aggregation"; + case db.relationType.EXTENSION: + return "extension"; + case db.relationType.COMPOSITION: + return "composition"; + case db.relationType.DEPENDENCY: + return "dependency"; + } + }; + path.points = path.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path.points; + const lineFunction = line().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(curveBasis); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "transition"); + let url = ""; + if (getConfig().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(db.relationType.DEPENDENCY) + "End)" + ); + if (relation.title !== void 0) { + const label = elem.append("g").attr("class", "stateLabel"); + const { x, y } = utils.calcLabelPosition(path.points); + const rows = common.getRows(relation.title); + let titleHeight = 0; + const titleRows = []; + let maxWidth = 0; + let minX = 0; + for (let i = 0; i <= rows.length; i++) { + const title = label.append("text").attr("text-anchor", "middle").text(rows[i]).attr("x", x).attr("y", y + titleHeight); + const boundstmp = title.node().getBBox(); + maxWidth = Math.max(maxWidth, boundstmp.width); + minX = Math.min(minX, boundstmp.x); + log.info(boundstmp.x, x, y + titleHeight); + if (titleHeight === 0) { + const titleBox = title.node().getBBox(); + titleHeight = titleBox.height; + log.info("Title height", titleHeight, y); + } + titleRows.push(title); + } + let boxHeight = titleHeight * rows.length; + if (rows.length > 1) { + const heightAdj = (rows.length - 1) * titleHeight * 0.5; + titleRows.forEach((title, i) => title.attr("y", y + i * titleHeight - heightAdj)); + boxHeight = titleHeight * rows.length; + } + const bounds = label.node().getBBox(); + label.insert("rect", ":first-child").attr("class", "box").attr("x", x - maxWidth / 2 - getConfig().state.padding / 2).attr("y", y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5).attr("width", maxWidth + getConfig().state.padding).attr("height", boxHeight + getConfig().state.padding); + log.info(bounds); + } + edgeCount++; +}; +let conf; +const transformationLog = {}; +const setConf = function() { +}; +const insertMarkers = function(elem) { + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); +}; +const draw = function(text, id, _version, diagObj) { + conf = getConfig().state; + const securityLevel = getConfig().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + log.debug("Rendering diagram " + text); + const diagram2 = root.select(`[id='${id}']`); + insertMarkers(diagram2); + const rootDoc = diagObj.db.getRootDoc(); + renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj); + const padding = conf.padding; + const bounds = diagram2.node().getBBox(); + const width = bounds.width + padding * 2; + const height = bounds.height + padding * 2; + const svgWidth = width * 1.75; + configureSvgSize(diagram2, height, svgWidth, conf.useMaxWidth); + diagram2.attr( + "viewBox", + `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + " " + height + ); +}; +const getLabelWidth = (text) => { + return text ? text.length * conf.fontSizeFactor : 1; +}; +const renderDoc = (doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => { + const graph = new Graph({ + compound: true, + multigraph: true + }); + let i; + let edgeFreeDoc = true; + for (i = 0; i < doc.length; i++) { + if (doc[i].stmt === "relation") { + edgeFreeDoc = false; + break; + } + } + if (parentId) { + graph.setGraph({ + rankdir: "LR", + multigraph: true, + compound: true, + // acyclicer: 'greedy', + ranker: "tight-tree", + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + isMultiGraph: true + // ranksep: 5, + // nodesep: 1 + }); + } else { + graph.setGraph({ + rankdir: "TB", + multigraph: true, + compound: true, + // isCompound: true, + // acyclicer: 'greedy', + // ranker: 'longest-path' + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + ranker: "tight-tree", + // ranker: 'network-simplex' + isMultiGraph: true + }); + } + graph.setDefaultEdgeLabel(function() { + return {}; + }); + diagObj.db.extract(doc); + const states = diagObj.db.getStates(); + const relations = diagObj.db.getRelations(); + const keys2 = Object.keys(states); + for (const key of keys2) { + const stateDef = states[key]; + if (parentId) { + stateDef.parentId = parentId; + } + let node; + if (stateDef.doc) { + let sub = diagram2.append("g").attr("id", stateDef.id).attr("class", "stateGroup"); + node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj); + { + sub = addTitleAndBox(sub, stateDef, altBkg); + let boxBounds = sub.node().getBBox(); + node.width = boxBounds.width; + node.height = boxBounds.height + conf.padding / 2; + transformationLog[stateDef.id] = { y: conf.compositTitleSize }; + } + } else { + node = drawState(diagram2, stateDef); + } + if (stateDef.note) { + const noteDef = { + descriptions: [], + id: stateDef.id + "-note", + note: stateDef.note, + type: "note" + }; + const note = drawState(diagram2, noteDef); + if (stateDef.note.position === "left of") { + graph.setNode(node.id + "-note", note); + graph.setNode(node.id, node); + } else { + graph.setNode(node.id, node); + graph.setNode(node.id + "-note", note); + } + graph.setParent(node.id, node.id + "-group"); + graph.setParent(node.id + "-note", node.id + "-group"); + } else { + graph.setNode(node.id, node); + } + } + log.debug("Count=", graph.nodeCount(), graph); + let cnt = 0; + relations.forEach(function(relation) { + cnt++; + log.debug("Setting edge", relation); + graph.setEdge( + relation.id1, + relation.id2, + { + relation, + width: getLabelWidth(relation.title), + height: conf.labelHeight * common.getRows(relation.title).length, + labelpos: "c" + }, + "id" + cnt + ); + }); + layout(graph); + log.debug("Graph after layout", graph.nodes()); + const svgElem = diagram2.node(); + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + log.warn("Node " + v + ": " + JSON.stringify(graph.node(v))); + root.select("#" + svgElem.id + " #" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )" + ); + root.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2); + const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider"); + dividers.forEach((divider) => { + const parent = divider.parentElement; + let pWidth = 0; + let pShift = 0; + if (parent) { + if (parent.parentElement) { + pWidth = parent.parentElement.getBBox().width; + } + pShift = parseInt(parent.getAttribute("data-x-shift"), 10); + if (Number.isNaN(pShift)) { + pShift = 0; + } + } + divider.setAttribute("x1", 0 - pShift + 8); + divider.setAttribute("x2", pWidth - pShift - 8); + }); + } else { + log.debug("No Node " + v + ": " + JSON.stringify(graph.node(v))); + } + }); + let stateBox = svgElem.getBBox(); + graph.edges().forEach(function(e) { + if (e !== void 0 && graph.edge(e) !== void 0) { + log.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + drawEdge(diagram2, graph.edge(e), graph.edge(e).relation); + } + }); + stateBox = svgElem.getBBox(); + const stateInfo = { + id: parentId ? parentId : "root", + label: parentId ? parentId : "root", + width: 0, + height: 0 + }; + stateInfo.width = stateBox.width + 2 * conf.padding; + stateInfo.height = stateBox.height + 2 * conf.padding; + log.debug("Doc rendered", stateInfo, graph); + return stateInfo; +}; +const renderer = { + setConf, + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/stateDiagram-c0051853.js b/webroot/js/node_modules/mermaid/dist/stateDiagram-c0051853.js new file mode 100644 index 0000000..95af20a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/stateDiagram-c0051853.js @@ -0,0 +1,274 @@ +import { d as N, p as C, s as R } from "./styles-99e04339.js"; +import { c as t, F as U, z as F, f as T, l as b, j as H, k as O } from "./mermaid-e4a58915.js"; +import { G as X, l as J } from "./layout-545b2d5b.js"; +import { l as Y } from "./line-4ba3c4fa.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +const L = {}, $ = (e, i) => { + L[e] = i; +}, v = (e) => L[e], P = () => Object.keys(L), I = () => P().length, _ = { + get: v, + set: $, + keys: P, + size: I +}, j = (e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), q = (e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), Z = (e, i) => { + const o = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), d = o.node().getBBox(); + return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", d.width + 2 * t().state.padding).attr("height", d.height + 2 * t().state.padding).attr("rx", t().state.radius), o; +}, K = (e, i) => { + const o = function(l, m, w) { + const k = l.append("tspan").attr("x", 2 * t().state.padding).text(m); + w || k.attr("dy", t().state.textHeight); + }, s = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 1.3 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), g = s.height, p = e.append("text").attr("x", t().state.padding).attr( + "y", + g + t().state.padding * 0.4 + t().state.dividerMargin + t().state.textHeight + ).attr("class", "state-description"); + let a = !0, r = !0; + i.descriptions.forEach(function(l) { + a || (o(p, l, r), r = !1), a = !1; + }); + const y = e.append("line").attr("x1", t().state.padding).attr("y1", t().state.padding + g + t().state.dividerMargin / 2).attr("y2", t().state.padding + g + t().state.dividerMargin / 2).attr("class", "descr-divider"), x = p.node().getBBox(), c = Math.max(x.width, s.width); + return y.attr("x2", c + 3 * t().state.padding), e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c + 2 * t().state.padding).attr("height", x.height + g + 2 * t().state.padding).attr("rx", t().state.radius), e; +}, Q = (e, i, o) => { + const d = t().state.padding, s = 2 * t().state.padding, g = e.node().getBBox(), p = g.width, a = g.x, r = e.append("text").attr("x", 0).attr("y", t().state.titleShift).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), x = r.node().getBBox().width + s; + let c = Math.max(x, p); + c === p && (c = c + s); + let l; + const m = e.node().getBBox(); + i.doc, l = a - d, x > p && (l = (p - c) / 2 + d), Math.abs(a - m.x) < d && x > p && (l = a - (x - p) / 2); + const w = 1 - t().state.textHeight; + return e.insert("rect", ":first-child").attr("x", l).attr("y", w).attr("class", o ? "alt-composit" : "composit").attr("width", c).attr( + "height", + m.height + t().state.textHeight + t().state.titleShift + 1 + ).attr("rx", "0"), r.attr("x", l + d), x <= p && r.attr("x", a + (c - s) / 2 - x / 2 + d), e.insert("rect", ":first-child").attr("x", l).attr( + "y", + t().state.titleShift - t().state.textHeight - t().state.padding + ).attr("width", c).attr("height", t().state.textHeight * 3).attr("rx", t().state.radius), e.insert("rect", ":first-child").attr("x", l).attr( + "y", + t().state.titleShift - t().state.textHeight - t().state.padding + ).attr("width", c).attr("height", m.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e; +}, V = (e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr( + "cx", + t().state.padding + t().state.sizeUnit + t().state.miniPadding +).attr( + "cy", + t().state.padding + t().state.sizeUnit + t().state.miniPadding +), e.append("circle").attr("class", "end-state-inner").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit + 2).attr("cy", t().state.padding + t().state.sizeUnit + 2)), D = (e, i) => { + let o = t().state.forkWidth, d = t().state.forkHeight; + if (i.parentId) { + let s = o; + o = d, d = s; + } + return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", o).attr("height", d).attr("x", t().state.padding).attr("y", t().state.padding); +}, tt = (e, i, o, d) => { + let s = 0; + const g = d.append("text"); + g.style("text-anchor", "start"), g.attr("class", "noteText"); + let p = e.replace(/\r\n/g, "
"); + p = p.replace(/\n/g, "
"); + const a = p.split(T.lineBreakRegex); + let r = 1.25 * t().state.noteMargin; + for (const y of a) { + const x = y.trim(); + if (x.length > 0) { + const c = g.append("tspan"); + if (c.text(x), r === 0) { + const l = c.node().getBBox(); + r += l.height; + } + s += r, c.attr("x", i + t().state.noteMargin), c.attr("y", o + s + 1.25 * t().state.noteMargin); + } + } + return { textWidth: g.node().getBBox().width, textHeight: s }; +}, et = (e, i) => { + i.attr("class", "state-note"); + const o = i.append("rect").attr("x", 0).attr("y", t().state.padding), d = i.append("g"), { textWidth: s, textHeight: g } = tt(e, 0, 0, d); + return o.attr("height", g + 2 * t().state.noteMargin), o.attr("width", s + t().state.noteMargin * 2), o; +}, G = function(e, i) { + const o = i.id, d = { + id: o, + label: i.id, + width: 0, + height: 0 + }, s = e.append("g").attr("id", o).attr("class", "stateGroup"); + i.type === "start" && j(s), i.type === "end" && V(s), (i.type === "fork" || i.type === "join") && D(s, i), i.type === "note" && et(i.note.text, s), i.type === "divider" && q(s), i.type === "default" && i.descriptions.length === 0 && Z(s, i), i.type === "default" && i.descriptions.length > 0 && K(s, i); + const g = s.node().getBBox(); + return d.width = g.width + 2 * t().state.padding, d.height = g.height + 2 * t().state.padding, _.set(o, d), d; +}; +let A = 0; +const at = function(e, i, o) { + const d = function(r) { + switch (r) { + case N.relationType.AGGREGATION: + return "aggregation"; + case N.relationType.EXTENSION: + return "extension"; + case N.relationType.COMPOSITION: + return "composition"; + case N.relationType.DEPENDENCY: + return "dependency"; + } + }; + i.points = i.points.filter((r) => !Number.isNaN(r.y)); + const s = i.points, g = Y().x(function(r) { + return r.x; + }).y(function(r) { + return r.y; + }).curve(U), p = e.append("path").attr("d", g(s)).attr("id", "edge" + A).attr("class", "transition"); + let a = ""; + if (t().state.arrowMarkerAbsolute && (a = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, a = a.replace(/\(/g, "\\("), a = a.replace(/\)/g, "\\)")), p.attr( + "marker-end", + "url(" + a + "#" + d(N.relationType.DEPENDENCY) + "End)" + ), o.title !== void 0) { + const r = e.append("g").attr("class", "stateLabel"), { x: y, y: x } = F.calcLabelPosition(i.points), c = T.getRows(o.title); + let l = 0; + const m = []; + let w = 0, k = 0; + for (let u = 0; u <= c.length; u++) { + const h = r.append("text").attr("text-anchor", "middle").text(c[u]).attr("x", y).attr("y", x + l), f = h.node().getBBox(); + w = Math.max(w, f.width), k = Math.min(k, f.x), b.info(f.x, y, x + l), l === 0 && (l = h.node().getBBox().height, b.info("Title height", l, x)), m.push(h); + } + let E = l * c.length; + if (c.length > 1) { + const u = (c.length - 1) * l * 0.5; + m.forEach((h, f) => h.attr("y", x + f * l - u)), E = l * c.length; + } + const n = r.node().getBBox(); + r.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 - t().state.padding / 2).attr("y", x - E / 2 - t().state.padding / 2 - 3.5).attr("width", w + t().state.padding).attr("height", E + t().state.padding), b.info(n); + } + A++; +}; +let B; +const z = {}, it = function() { +}, nt = function(e) { + e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); +}, st = function(e, i, o, d) { + B = t().state; + const s = t().securityLevel; + let g; + s === "sandbox" && (g = H("#i" + i)); + const p = s === "sandbox" ? H(g.nodes()[0].contentDocument.body) : H("body"), a = s === "sandbox" ? g.nodes()[0].contentDocument : document; + b.debug("Rendering diagram " + e); + const r = p.select(`[id='${i}']`); + nt(r); + const y = d.db.getRootDoc(); + W(y, r, void 0, !1, p, a, d); + const x = B.padding, c = r.node().getBBox(), l = c.width + x * 2, m = c.height + x * 2, w = l * 1.75; + O(r, m, w, B.useMaxWidth), r.attr( + "viewBox", + `${c.x - B.padding} ${c.y - B.padding} ` + l + " " + m + ); +}, rt = (e) => e ? e.length * B.fontSizeFactor : 1, W = (e, i, o, d, s, g, p) => { + const a = new X({ + compound: !0, + multigraph: !0 + }); + let r, y = !0; + for (r = 0; r < e.length; r++) + if (e[r].stmt === "relation") { + y = !1; + break; + } + o ? a.setGraph({ + rankdir: "LR", + multigraph: !0, + compound: !0, + // acyclicer: 'greedy', + ranker: "tight-tree", + ranksep: y ? 1 : B.edgeLengthFactor, + nodeSep: y ? 1 : 50, + isMultiGraph: !0 + // ranksep: 5, + // nodesep: 1 + }) : a.setGraph({ + rankdir: "TB", + multigraph: !0, + compound: !0, + // isCompound: true, + // acyclicer: 'greedy', + // ranker: 'longest-path' + ranksep: y ? 1 : B.edgeLengthFactor, + nodeSep: y ? 1 : 50, + ranker: "tight-tree", + // ranker: 'network-simplex' + isMultiGraph: !0 + }), a.setDefaultEdgeLabel(function() { + return {}; + }), p.db.extract(e); + const x = p.db.getStates(), c = p.db.getRelations(), l = Object.keys(x); + for (const n of l) { + const u = x[n]; + o && (u.parentId = o); + let h; + if (u.doc) { + let f = i.append("g").attr("id", u.id).attr("class", "stateGroup"); + h = W(u.doc, f, u.id, !d, s, g, p); + { + f = Q(f, u, d); + let S = f.node().getBBox(); + h.width = S.width, h.height = S.height + B.padding / 2, z[u.id] = { y: B.compositTitleSize }; + } + } else + h = G(i, u); + if (u.note) { + const f = { + descriptions: [], + id: u.id + "-note", + note: u.note, + type: "note" + }, S = G(i, f); + u.note.position === "left of" ? (a.setNode(h.id + "-note", S), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", S)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group"); + } else + a.setNode(h.id, h); + } + b.debug("Count=", a.nodeCount(), a); + let m = 0; + c.forEach(function(n) { + m++, b.debug("Setting edge", n), a.setEdge( + n.id1, + n.id2, + { + relation: n, + width: rt(n.title), + height: B.labelHeight * T.getRows(n.title).length, + labelpos: "c" + }, + "id" + m + ); + }), J(a), b.debug("Graph after layout", a.nodes()); + const w = i.node(); + a.nodes().forEach(function(n) { + n !== void 0 && a.node(n) !== void 0 ? (b.warn("Node " + n + ": " + JSON.stringify(a.node(n))), s.select("#" + w.id + " #" + n).attr( + "transform", + "translate(" + (a.node(n).x - a.node(n).width / 2) + "," + (a.node(n).y + (z[n] ? z[n].y : 0) - a.node(n).height / 2) + " )" + ), s.select("#" + w.id + " #" + n).attr("data-x-shift", a.node(n).x - a.node(n).width / 2), g.querySelectorAll("#" + w.id + " #" + n + " .divider").forEach((h) => { + const f = h.parentElement; + let S = 0, M = 0; + f && (f.parentElement && (S = f.parentElement.getBBox().width), M = parseInt(f.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", S - M - 8); + })) : b.debug("No Node " + n + ": " + JSON.stringify(a.node(n))); + }); + let k = w.getBBox(); + a.edges().forEach(function(n) { + n !== void 0 && a.edge(n) !== void 0 && (b.debug("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(a.edge(n))), at(i, a.edge(n), a.edge(n).relation)); + }), k = w.getBBox(); + const E = { + id: o || "root", + label: o || "root", + width: 0, + height: 0 + }; + return E.width = k.width + 2 * B.padding, E.height = k.height + 2 * B.padding, b.debug("Doc rendered", E, a), E; +}, ot = { + setConf: it, + draw: st +}, xt = { + parser: C, + db: N, + renderer: ot, + styles: R, + init: (e) => { + e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute, N.clear(); + } +}; +export { + xt as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-056072cc.js b/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-056072cc.js new file mode 100644 index 0000000..c9dd85a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-056072cc.js @@ -0,0 +1,188 @@ +import { D as H, a as J, S as Q, b as X, c as Z, p as F, d as M, s as I } from "./styles-99e04339.js"; +import { G as tt } from "./layout-545b2d5b.js"; +import { l as E, c as g, j as $, z as et, k as ot, f as w } from "./mermaid-e4a58915.js"; +import { r as st } from "./index-5f5016a9.js"; +import "./edges-020bfa8c.js"; +import "./createText-4be7776a.js"; +import "./line-4ba3c4fa.js"; +import "./array-2ff2c7a6.js"; +import "./constant-2fe7eae5.js"; +const h = "rect", C = "rectWithTitle", nt = "start", ct = "end", it = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", _ = "statediagram", dt = "state", Et = `${_}-${dt}`, U = "transition", St = "note", Tt = "note-edge", pt = `${U} ${Tt}`, _t = `${_}-${St}`, ut = "cluster", ft = `${_}-${ut}`, Dt = "cluster-alt", bt = `${_}-${Dt}`, V = "parent", Y = "note", At = "state", N = "----", ht = `${N}${Y}`, v = `${N}${V}`, z = "fill:none", W = "fill: #333", m = "c", j = "text", q = "normal"; +let y = {}, d = 0; +const yt = function(t) { + const n = Object.keys(t); + for (const e of n) + t[e]; +}, gt = function(t, n) { + return n.db.extract(n.db.getRootDocV2()), n.db.getClasses(); +}; +function xt(t) { + return t == null ? "" : t.classes ? t.classes.join(" ") : ""; +} +function R(t = "", n = 0, e = "", c = N) { + const i = e !== null && e.length > 0 ? `${c}${e}` : ""; + return `${At}-${t}${i}-${n}`; +} +const A = (t, n, e, c, i, r) => { + const o = e.id, u = xt(c[o]); + if (o !== "root") { + let T = h; + e.start === !0 && (T = nt), e.start === !1 && (T = ct), e.type !== H && (T = e.type), y[o] || (y[o] = { + id: o, + shape: T, + description: w.sanitizeText(o, g()), + classes: `${u} ${Et}` + }); + const s = y[o]; + e.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(e.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [e.description] : s.description = [s.description, e.description]) : (s.shape = h, s.description = e.description), s.description = w.sanitizeTextOrArray(s.description, g())), s.description.length === 1 && s.shape === C && (s.shape = h), !s.type && e.doc && (E.info("Setting cluster for ", o, G(e)), s.type = "group", s.dir = G(e), s.shape = e.type === J ? it : rt, s.classes = s.classes + " " + ft + " " + (r ? bt : "")); + const p = { + labelStyle: "", + shape: s.shape, + labelText: s.description, + // typeof newNode.description === 'object' + // ? newNode.description[0] + // : newNode.description, + classes: s.classes, + style: "", + //styles.style, + id: o, + dir: s.dir, + domId: R(o, d), + type: s.type, + padding: 15 + //getConfig().flowchart.padding + }; + if (p.centerLabel = !0, e.note) { + const l = { + labelStyle: "", + shape: lt, + labelText: e.note.text, + classes: _t, + // useHtmlLabels: false, + style: "", + // styles.style, + id: o + ht + "-" + d, + domId: R(o, d, Y), + type: s.type, + padding: 15 + //getConfig().flowchart.padding + }, a = { + labelStyle: "", + shape: at, + labelText: e.note.text, + classes: s.classes, + style: "", + // styles.style, + id: o + v, + domId: R(o, d, V), + type: "group", + padding: 0 + //getConfig().flowchart.padding + }; + d++; + const f = o + v; + t.setNode(f, a), t.setNode(l.id, l), t.setNode(o, p), t.setParent(o, f), t.setParent(l.id, f); + let S = o, D = l.id; + e.note.position === "left of" && (S = l.id, D = o), t.setEdge(S, D, { + arrowhead: "none", + arrowType: "", + style: z, + labelStyle: "", + classes: pt, + arrowheadStyle: W, + labelpos: m, + labelType: j, + thickness: q + }); + } else + t.setNode(o, p); + } + n && n.id !== "root" && (E.trace("Setting node ", o, " to be child of its parent ", n.id), t.setParent(o, n.id)), e.doc && (E.trace("Adding nodes children "), $t(t, e, e.doc, c, i, !r)); +}, $t = (t, n, e, c, i, r) => { + E.trace("items", e), e.forEach((o) => { + switch (o.stmt) { + case X: + A(t, n, o, c, i, r); + break; + case H: + A(t, n, o, c, i, r); + break; + case Q: + { + A(t, n, o.state1, c, i, r), A(t, n, o.state2, c, i, r); + const u = { + id: "edge" + d, + arrowhead: "normal", + arrowTypeEnd: "arrow_barb", + style: z, + labelStyle: "", + label: w.sanitizeText(o.description, g()), + arrowheadStyle: W, + labelpos: m, + labelType: j, + thickness: q, + classes: U + }; + t.setEdge(o.state1.id, o.state2.id, u, d), d++; + } + break; + } + }); +}, G = (t, n = Z) => { + let e = n; + if (t.doc) + for (let c = 0; c < t.doc.length; c++) { + const i = t.doc[c]; + i.stmt === "dir" && (e = i.value); + } + return e; +}, Ct = async function(t, n, e, c) { + E.info("Drawing state diagram (v2)", n), y = {}, c.db.getDirection(); + const { securityLevel: i, state: r } = g(), o = r.nodeSpacing || 50, u = r.rankSpacing || 50; + E.info(c.db.getRootDocV2()), c.db.extract(c.db.getRootDocV2()), E.info(c.db.getRootDocV2()); + const T = c.db.getStates(), s = new tt({ + multigraph: !0, + compound: !0 + }).setGraph({ + rankdir: G(c.db.getRootDocV2()), + nodesep: o, + ranksep: u, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + A(s, void 0, c.db.getRootDocV2(), T, c.db, !0); + let p; + i === "sandbox" && (p = $("#i" + n)); + const l = i === "sandbox" ? $(p.nodes()[0].contentDocument.body) : $("body"), a = l.select(`[id="${n}"]`), f = l.select("#" + n + " g"); + await st(f, s, ["barb"], _, n); + const S = 8; + et.insertTitle(a, "statediagramTitleText", r.titleTopMargin, c.db.getDiagramTitle()); + const D = a.node().getBBox(), L = D.width + S * 2, P = D.height + S * 2; + a.attr("class", _); + const O = a.node().getBBox(); + ot(a, P, L, r.useMaxWidth); + const k = `${O.x - S} ${O.y - S} ${L} ${P}`; + E.debug(`viewBox ${k}`), a.attr("viewBox", k); + const K = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label'); + for (const x of K) { + const B = x.getBBox(), b = document.createElementNS("http://www.w3.org/2000/svg", h); + b.setAttribute("rx", 0), b.setAttribute("ry", 0), b.setAttribute("width", B.width), b.setAttribute("height", B.height), x.insertBefore(b, x.firstChild); + } +}, Rt = { + setConf: yt, + getClasses: gt, + draw: Ct +}, vt = { + parser: F, + db: M, + renderer: Rt, + styles: I, + init: (t) => { + t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, M.clear(); + } +}; +export { + vt as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-4231742e.js b/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-4231742e.js new file mode 100644 index 0000000..985975e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-4231742e.js @@ -0,0 +1,323 @@ +import { D as DEFAULT_STATE_TYPE, a as DIVIDER_TYPE, S as STMT_RELATION, b as STMT_STATE, c as DEFAULT_NESTED_DOC_DIR, p as parser, d as db, s as styles } from "./styles-af0a765a.js"; +import { G as Graph } from "./layout-a7b9ff07.js"; +import { l as log, c as getConfig, j as d3select, z as utils, k as configureSvgSize, f as common } from "./mermaid-491db2d9.js"; +import { r as render } from "./index-cc269c15.js"; +import "./edges-9bf94b2d.js"; +import "./createText-2660bae1.js"; +import "./line-8fd2bd69.js"; +import "./array-b7dcf730.js"; +import "./constant-b644328d.js"; +const SHAPE_STATE = "rect"; +const SHAPE_STATE_WITH_DESC = "rectWithTitle"; +const SHAPE_START = "start"; +const SHAPE_END = "end"; +const SHAPE_DIVIDER = "divider"; +const SHAPE_GROUP = "roundedWithTitle"; +const SHAPE_NOTE = "note"; +const SHAPE_NOTEGROUP = "noteGroup"; +const CSS_DIAGRAM = "statediagram"; +const CSS_STATE = "state"; +const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`; +const CSS_EDGE = "transition"; +const CSS_NOTE = "note"; +const CSS_NOTE_EDGE = "note-edge"; +const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`; +const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`; +const CSS_CLUSTER = "cluster"; +const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`; +const CSS_CLUSTER_ALT = "cluster-alt"; +const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`; +const PARENT = "parent"; +const NOTE = "note"; +const DOMID_STATE = "state"; +const DOMID_TYPE_SPACER = "----"; +const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`; +const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`; +const G_EDGE_STYLE = "fill:none"; +const G_EDGE_ARROWHEADSTYLE = "fill: #333"; +const G_EDGE_LABELPOS = "c"; +const G_EDGE_LABELTYPE = "text"; +const G_EDGE_THICKNESS = "normal"; +let nodeDb = {}; +let graphItemCount = 0; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + cnf[key]; + } +}; +const getClasses = function(text, diagramObj) { + diagramObj.db.extract(diagramObj.db.getRootDocV2()); + return diagramObj.db.getClasses(); +}; +function getClassesFromDbInfo(dbInfoItem) { + if (dbInfoItem === void 0 || dbInfoItem === null) { + return ""; + } else { + if (dbInfoItem.classes) { + return dbInfoItem.classes.join(" "); + } else { + return ""; + } + } +} +function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) { + const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : ""; + return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`; +} +const setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => { + const itemId = parsedItem.id; + const classStr = getClassesFromDbInfo(diagramStates[itemId]); + if (itemId !== "root") { + let shape = SHAPE_STATE; + if (parsedItem.start === true) { + shape = SHAPE_START; + } + if (parsedItem.start === false) { + shape = SHAPE_END; + } + if (parsedItem.type !== DEFAULT_STATE_TYPE) { + shape = parsedItem.type; + } + if (!nodeDb[itemId]) { + nodeDb[itemId] = { + id: itemId, + shape, + description: common.sanitizeText(itemId, getConfig()), + classes: `${classStr} ${CSS_DIAGRAM_STATE}` + }; + } + const newNode = nodeDb[itemId]; + if (parsedItem.description) { + if (Array.isArray(newNode.description)) { + newNode.shape = SHAPE_STATE_WITH_DESC; + newNode.description.push(parsedItem.description); + } else { + if (newNode.description.length > 0) { + newNode.shape = SHAPE_STATE_WITH_DESC; + if (newNode.description === itemId) { + newNode.description = [parsedItem.description]; + } else { + newNode.description = [newNode.description, parsedItem.description]; + } + } else { + newNode.shape = SHAPE_STATE; + newNode.description = parsedItem.description; + } + } + newNode.description = common.sanitizeTextOrArray(newNode.description, getConfig()); + } + if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) { + newNode.shape = SHAPE_STATE; + } + if (!newNode.type && parsedItem.doc) { + log.info("Setting cluster for ", itemId, getDir(parsedItem)); + newNode.type = "group"; + newNode.dir = getDir(parsedItem); + newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP; + newNode.classes = newNode.classes + " " + CSS_DIAGRAM_CLUSTER + " " + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""); + } + const nodeData = { + labelStyle: "", + shape: newNode.shape, + labelText: newNode.description, + // typeof newNode.description === 'object' + // ? newNode.description[0] + // : newNode.description, + classes: newNode.classes, + style: "", + //styles.style, + id: itemId, + dir: newNode.dir, + domId: stateDomId(itemId, graphItemCount), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + nodeData.centerLabel = true; + if (parsedItem.note) { + const noteData = { + labelStyle: "", + shape: SHAPE_NOTE, + labelText: parsedItem.note.text, + classes: CSS_DIAGRAM_NOTE, + // useHtmlLabels: false, + style: "", + // styles.style, + id: itemId + NOTE_ID + "-" + graphItemCount, + domId: stateDomId(itemId, graphItemCount, NOTE), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + const groupData = { + labelStyle: "", + shape: SHAPE_NOTEGROUP, + labelText: parsedItem.note.text, + classes: newNode.classes, + style: "", + // styles.style, + id: itemId + PARENT_ID, + domId: stateDomId(itemId, graphItemCount, PARENT), + type: "group", + padding: 0 + //getConfig().flowchart.padding + }; + graphItemCount++; + const parentNodeId = itemId + PARENT_ID; + g.setNode(parentNodeId, groupData); + g.setNode(noteData.id, noteData); + g.setNode(itemId, nodeData); + g.setParent(itemId, parentNodeId); + g.setParent(noteData.id, parentNodeId); + let from = itemId; + let to = noteData.id; + if (parsedItem.note.position === "left of") { + from = noteData.id; + to = itemId; + } + g.setEdge(from, to, { + arrowhead: "none", + arrowType: "", + style: G_EDGE_STYLE, + labelStyle: "", + classes: CSS_EDGE_NOTE_EDGE, + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS + }); + } else { + g.setNode(itemId, nodeData); + } + } + if (parent && parent.id !== "root") { + log.trace("Setting node ", itemId, " to be child of its parent ", parent.id); + g.setParent(itemId, parent.id); + } + if (parsedItem.doc) { + log.trace("Adding nodes children "); + setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag); + } +}; +const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => { + log.trace("items", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case DEFAULT_STATE_TYPE: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case STMT_RELATION: + { + setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag); + setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag); + const edgeData = { + id: "edge" + graphItemCount, + arrowhead: "normal", + arrowTypeEnd: "arrow_barb", + style: G_EDGE_STYLE, + labelStyle: "", + label: common.sanitizeText(item.description, getConfig()), + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS, + classes: CSS_EDGE + }; + g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount); + graphItemCount++; + } + break; + } + }); +}; +const getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => { + let dir = defaultDir; + if (parsedItem.doc) { + for (let i = 0; i < parsedItem.doc.length; i++) { + const parsedItemDoc = parsedItem.doc[i]; + if (parsedItemDoc.stmt === "dir") { + dir = parsedItemDoc.value; + } + } + } + return dir; +}; +const draw = async function(text, id, _version, diag) { + log.info("Drawing state diagram (v2)", id); + nodeDb = {}; + diag.db.getDirection(); + const { securityLevel, state: conf } = getConfig(); + const nodeSpacing = conf.nodeSpacing || 50; + const rankSpacing = conf.rankSpacing || 50; + log.info(diag.db.getRootDocV2()); + diag.db.extract(diag.db.getRootDocV2()); + log.info(diag.db.getRootDocV2()); + const diagramStates = diag.db.getStates(); + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: getDir(diag.db.getRootDocV2()), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await render(element, g, ["barb"], CSS_DIAGRAM, id); + const padding = 8; + utils.insertTitle(svg, "statediagramTitleText", conf.titleTopMargin, diag.db.getDiagramTitle()); + const bounds = svg.node().getBBox(); + const width = bounds.width + padding * 2; + const height = bounds.height + padding * 2; + svg.attr("class", CSS_DIAGRAM); + const svgBounds = svg.node().getBBox(); + configureSvgSize(svg, height, width, conf.useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; + log.debug(`viewBox ${vBox}`); + svg.attr("viewBox", vBox); + const labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = document.createElementNS("http://www.w3.org/2000/svg", SHAPE_STATE); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } +}; +const renderer = { + setConf, + getClasses, + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-8bb05ecb.js b/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-8bb05ecb.js new file mode 100644 index 0000000..57b2d55 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/stateDiagram-v2-8bb05ecb.js @@ -0,0 +1,333 @@ +import { D as DEFAULT_STATE_TYPE, a as DIVIDER_TYPE, S as STMT_RELATION, b as STMT_STATE, c as DEFAULT_NESTED_DOC_DIR, p as parser, d as db, s as styles } from "./styles-24dfea38.js"; +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { select } from "d3"; +import { l as log, c as getConfig, u as utils, i as configureSvgSize, e as common } from "./mermaid-0d192ec3.js"; +import { r as render } from "./index-f9462f3f.js"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "khroma"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +import "dagre-d3-es/src/dagre/index.js"; +import "dagre-d3-es/src/graphlib/json.js"; +import "./edges-f15a7e05.js"; +import "./createText-80c3befb.js"; +import "mdast-util-from-markdown"; +const SHAPE_STATE = "rect"; +const SHAPE_STATE_WITH_DESC = "rectWithTitle"; +const SHAPE_START = "start"; +const SHAPE_END = "end"; +const SHAPE_DIVIDER = "divider"; +const SHAPE_GROUP = "roundedWithTitle"; +const SHAPE_NOTE = "note"; +const SHAPE_NOTEGROUP = "noteGroup"; +const CSS_DIAGRAM = "statediagram"; +const CSS_STATE = "state"; +const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`; +const CSS_EDGE = "transition"; +const CSS_NOTE = "note"; +const CSS_NOTE_EDGE = "note-edge"; +const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`; +const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`; +const CSS_CLUSTER = "cluster"; +const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`; +const CSS_CLUSTER_ALT = "cluster-alt"; +const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`; +const PARENT = "parent"; +const NOTE = "note"; +const DOMID_STATE = "state"; +const DOMID_TYPE_SPACER = "----"; +const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`; +const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`; +const G_EDGE_STYLE = "fill:none"; +const G_EDGE_ARROWHEADSTYLE = "fill: #333"; +const G_EDGE_LABELPOS = "c"; +const G_EDGE_LABELTYPE = "text"; +const G_EDGE_THICKNESS = "normal"; +let nodeDb = {}; +let graphItemCount = 0; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + cnf[key]; + } +}; +const getClasses = function(text, diagramObj) { + diagramObj.db.extract(diagramObj.db.getRootDocV2()); + return diagramObj.db.getClasses(); +}; +function getClassesFromDbInfo(dbInfoItem) { + if (dbInfoItem === void 0 || dbInfoItem === null) { + return ""; + } else { + if (dbInfoItem.classes) { + return dbInfoItem.classes.join(" "); + } else { + return ""; + } + } +} +function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) { + const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : ""; + return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`; +} +const setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => { + const itemId = parsedItem.id; + const classStr = getClassesFromDbInfo(diagramStates[itemId]); + if (itemId !== "root") { + let shape = SHAPE_STATE; + if (parsedItem.start === true) { + shape = SHAPE_START; + } + if (parsedItem.start === false) { + shape = SHAPE_END; + } + if (parsedItem.type !== DEFAULT_STATE_TYPE) { + shape = parsedItem.type; + } + if (!nodeDb[itemId]) { + nodeDb[itemId] = { + id: itemId, + shape, + description: common.sanitizeText(itemId, getConfig()), + classes: `${classStr} ${CSS_DIAGRAM_STATE}` + }; + } + const newNode = nodeDb[itemId]; + if (parsedItem.description) { + if (Array.isArray(newNode.description)) { + newNode.shape = SHAPE_STATE_WITH_DESC; + newNode.description.push(parsedItem.description); + } else { + if (newNode.description.length > 0) { + newNode.shape = SHAPE_STATE_WITH_DESC; + if (newNode.description === itemId) { + newNode.description = [parsedItem.description]; + } else { + newNode.description = [newNode.description, parsedItem.description]; + } + } else { + newNode.shape = SHAPE_STATE; + newNode.description = parsedItem.description; + } + } + newNode.description = common.sanitizeTextOrArray(newNode.description, getConfig()); + } + if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) { + newNode.shape = SHAPE_STATE; + } + if (!newNode.type && parsedItem.doc) { + log.info("Setting cluster for ", itemId, getDir(parsedItem)); + newNode.type = "group"; + newNode.dir = getDir(parsedItem); + newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP; + newNode.classes = newNode.classes + " " + CSS_DIAGRAM_CLUSTER + " " + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""); + } + const nodeData = { + labelStyle: "", + shape: newNode.shape, + labelText: newNode.description, + // typeof newNode.description === 'object' + // ? newNode.description[0] + // : newNode.description, + classes: newNode.classes, + style: "", + //styles.style, + id: itemId, + dir: newNode.dir, + domId: stateDomId(itemId, graphItemCount), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + nodeData.centerLabel = true; + if (parsedItem.note) { + const noteData = { + labelStyle: "", + shape: SHAPE_NOTE, + labelText: parsedItem.note.text, + classes: CSS_DIAGRAM_NOTE, + // useHtmlLabels: false, + style: "", + // styles.style, + id: itemId + NOTE_ID + "-" + graphItemCount, + domId: stateDomId(itemId, graphItemCount, NOTE), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + const groupData = { + labelStyle: "", + shape: SHAPE_NOTEGROUP, + labelText: parsedItem.note.text, + classes: newNode.classes, + style: "", + // styles.style, + id: itemId + PARENT_ID, + domId: stateDomId(itemId, graphItemCount, PARENT), + type: "group", + padding: 0 + //getConfig().flowchart.padding + }; + graphItemCount++; + const parentNodeId = itemId + PARENT_ID; + g.setNode(parentNodeId, groupData); + g.setNode(noteData.id, noteData); + g.setNode(itemId, nodeData); + g.setParent(itemId, parentNodeId); + g.setParent(noteData.id, parentNodeId); + let from = itemId; + let to = noteData.id; + if (parsedItem.note.position === "left of") { + from = noteData.id; + to = itemId; + } + g.setEdge(from, to, { + arrowhead: "none", + arrowType: "", + style: G_EDGE_STYLE, + labelStyle: "", + classes: CSS_EDGE_NOTE_EDGE, + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS + }); + } else { + g.setNode(itemId, nodeData); + } + } + if (parent && parent.id !== "root") { + log.trace("Setting node ", itemId, " to be child of its parent ", parent.id); + g.setParent(itemId, parent.id); + } + if (parsedItem.doc) { + log.trace("Adding nodes children "); + setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag); + } +}; +const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => { + log.trace("items", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case DEFAULT_STATE_TYPE: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case STMT_RELATION: + { + setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag); + setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag); + const edgeData = { + id: "edge" + graphItemCount, + arrowhead: "normal", + arrowTypeEnd: "arrow_barb", + style: G_EDGE_STYLE, + labelStyle: "", + label: common.sanitizeText(item.description, getConfig()), + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS, + classes: CSS_EDGE + }; + g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount); + graphItemCount++; + } + break; + } + }); +}; +const getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => { + let dir = defaultDir; + if (parsedItem.doc) { + for (let i = 0; i < parsedItem.doc.length; i++) { + const parsedItemDoc = parsedItem.doc[i]; + if (parsedItemDoc.stmt === "dir") { + dir = parsedItemDoc.value; + } + } + } + return dir; +}; +const draw = async function(text, id, _version, diag) { + log.info("Drawing state diagram (v2)", id); + nodeDb = {}; + diag.db.getDirection(); + const { securityLevel, state: conf } = getConfig(); + const nodeSpacing = conf.nodeSpacing || 50; + const rankSpacing = conf.rankSpacing || 50; + log.info(diag.db.getRootDocV2()); + diag.db.extract(diag.db.getRootDocV2()); + log.info(diag.db.getRootDocV2()); + const diagramStates = diag.db.getStates(); + const g = new graphlib.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: getDir(diag.db.getRootDocV2()), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await render(element, g, ["barb"], CSS_DIAGRAM, id); + const padding = 8; + utils.insertTitle(svg, "statediagramTitleText", conf.titleTopMargin, diag.db.getDiagramTitle()); + const bounds = svg.node().getBBox(); + const width = bounds.width + padding * 2; + const height = bounds.height + padding * 2; + svg.attr("class", CSS_DIAGRAM); + const svgBounds = svg.node().getBBox(); + configureSvgSize(svg, height, width, conf.useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; + log.debug(`viewBox ${vBox}`); + svg.attr("viewBox", vBox); + const labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = document.createElementNS("http://www.w3.org/2000/svg", SHAPE_STATE); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } +}; +const renderer = { + setConf, + getClasses, + draw +}; +const diagram = { + parser, + db, + renderer, + styles, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + db.clear(); + } +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-0671a096.js b/webroot/js/node_modules/mermaid/dist/styles-0671a096.js new file mode 100644 index 0000000..c986d6e --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-0671a096.js @@ -0,0 +1,505 @@ +import * as graphlib from "dagre-d3-es/src/graphlib/index.js"; +import { curveLinear, select, selectAll } from "d3"; +import { k as getStylesFromArray, l as log, m as evaluate, c as getConfig, e as common, n as interpolateToCurve, u as utils, o as setupGraphViewbox } from "./mermaid-0d192ec3.js"; +import { r as render } from "./index-f9462f3f.js"; +import { addHtmlLabel } from "dagre-d3-es/src/dagre-js/label/add-html-label.js"; +import * as khroma from "khroma"; +const conf = {}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const addVertices = function(vert, g, svgId, root, doc, diagObj) { + const svg = root.select(`[id="${svgId}"]`); + const keys = Object.keys(vert); + keys.forEach(function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + log.info("vertex", vertex, vertex.labelType); + if (vertex.labelType === "markdown") { + log.info("vertex", vertex, vertex.labelType); + } else { + if (evaluate(getConfig().flowchart.htmlLabels)) { + const node = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = addHtmlLabel(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(common.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + } + let radious = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + g.setNode(vertex.id, { + labelStyle: styles.labelStyle, + shape: _shape, + labelText: vertexText, + labelType: vertex.labelType, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: getConfig().flowchart.padding + }); + log.info("setNode", { + labelStyle: styles.labelStyle, + labelType: vertex.labelType, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: vertex.id, + domId: diagObj.db.lookUpDomId(vertex.id), + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + dir: vertex.dir, + props: vertex.props, + padding: getConfig().flowchart.padding + }); + }); +}; +const addEdges = function(edges, g, diagObj) { + log.info("abc78 edges = ", edges); + let cnt = 0; + let linkIdCnt = {}; + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + cnt++; + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + log.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + case "invisible": + edgeData.thickness = "invisible"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 0;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles = getStylesFromArray(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + g.setEdge(edge.start, edge.end, edgeData, cnt); + }); +}; +const getClasses = function(text, diagObj) { + return diagObj.db.getClasses(); +}; +const draw = async function(text, id, _version, diagObj) { + log.info("Drawing flowchart"); + let dir = diagObj.db.getDirection(); + if (dir === void 0) { + dir = "TD"; + } + const { securityLevel, flowchart: conf2 } = getConfig(); + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const g = new graphlib.Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 0, + marginy: 0 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + log.info("Subgraphs - ", subGraphs); + for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { + subG = subGraphs[i2]; + log.info("Subgraph - ", subG); + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const vert = diagObj.db.getVertices(); + const edges = diagObj.db.getEdges(); + log.info("Edges", edges); + let i = 0; + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + selectAll("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + log.info("Setting up subgraphs", subG.nodes[j], subG.id); + g.setParent(subG.nodes[j], subG.id); + } + } + addVertices(vert, g, id, root, doc, diagObj); + addEdges(edges, g); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await render(element, g, ["point", "circle", "cross"], "flowchart", id); + utils.insertTitle(svg, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle()); + setupGraphViewbox(g, svg, conf2.diagramPadding, conf2.useMaxWidth); + diagObj.db.indexNodes("subGraph" + i); + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } + const keys = Object.keys(vert); + keys.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node = select("#" + id + ' [id="' + key + '"]'); + if (node) { + const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node.insert(function() { + return link; + }, ":first-child"); + const shape = node.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); +}; +const flowRendererV2 = { + setConf, + addVertices, + addEdges, + getClasses, + draw +}; +const fade = (color, opacity) => { + const channel = khroma.channel; + const r = channel(color, "r"); + const g = channel(color, "g"); + const b = channel(color, "b"); + return khroma.rgba(r, g, b, opacity); +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span,p { + color: ${options.titleColor}; + } + + .label text,span,p { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${fade(options.edgeLabelBackground, 0.5)}; + // background-color: + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span,p { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } +`; +const flowStyles = getStyles; +export { + flowStyles as a, + flowRendererV2 as f +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-1a7a9ff9.js b/webroot/js/node_modules/mermaid/dist/styles-1a7a9ff9.js new file mode 100644 index 0000000..237b96c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-1a7a9ff9.js @@ -0,0 +1,430 @@ +import { G as V } from "./layout-545b2d5b.js"; +import { S as D, u as M, v as R, _ as F, C as j, x as U, y as H, o as A, l as y, p as W, c as C, f as z, q as $, n as E, j as _, z as X, r as J, A as K } from "./mermaid-e4a58915.js"; +import { r as Q } from "./index-5f5016a9.js"; +function Y(e) { + return typeof e == "string" ? new D([document.querySelectorAll(e)], [document.documentElement]) : new D([R(e)], M); +} +const Z = (e, l) => F.lang.round(j.parse(e)[l]), O = Z; +function pe(e, l) { + return !!e.children(l).length; +} +function be(e) { + return L(e.v) + ":" + L(e.w) + ":" + L(e.name); +} +var ee = /:/g; +function L(e) { + return e ? String(e).replace(ee, "\\:") : ""; +} +function te(e, l) { + l && e.attr("style", l); +} +function ue(e, l, c) { + l && e.attr("class", l).attr("class", c + " " + e.attr("class")); +} +function we(e, l) { + var c = l.graph(); + if (U(c)) { + var a = c.transition; + if (H(a)) + return a(e); + } + return e; +} +function re(e, l) { + var c = e.append("foreignObject").attr("width", "100000"), a = c.append("xhtml:div"); + a.attr("xmlns", "http://www.w3.org/1999/xhtml"); + var i = l.label; + switch (typeof i) { + case "function": + a.insert(i); + break; + case "object": + a.insert(function() { + return i; + }); + break; + default: + a.html(i); + } + te(a, l.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap"); + var d = a.node().getBoundingClientRect(); + return c.attr("width", d.width).attr("height", d.height), c; +} +const G = {}, le = function(e) { + const l = Object.keys(e); + for (const c of l) + G[c] = e[c]; +}, q = function(e, l, c, a, i, d) { + const u = a.select(`[id="${c}"]`); + Object.keys(e).forEach(function(f) { + const r = e[f]; + let g = "default"; + r.classes.length > 0 && (g = r.classes.join(" ")), g = g + " flowchart-label"; + const w = A(r.styles); + let t = r.text !== void 0 ? r.text : r.id, s; + if (y.info("vertex", r, r.labelType), r.labelType === "markdown") + y.info("vertex", r, r.labelType); + else if (W(C().flowchart.htmlLabels)) { + const m = { + label: t.replace( + /fa[blrs]?:fa-[\w-]+/g, + (k) => `` + ) + }; + s = re(u, m).node(), s.parentNode.removeChild(s); + } else { + const m = i.createElementNS("http://www.w3.org/2000/svg", "text"); + m.setAttribute("style", w.labelStyle.replace("color:", "fill:")); + const k = t.split(z.lineBreakRegex); + for (const T of k) { + const S = i.createElementNS("http://www.w3.org/2000/svg", "tspan"); + S.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), S.setAttribute("dy", "1em"), S.setAttribute("x", "1"), S.textContent = T, m.appendChild(S); + } + s = m; + } + let p = 0, n = ""; + switch (r.type) { + case "round": + p = 5, n = "rect"; + break; + case "square": + n = "rect"; + break; + case "diamond": + n = "question"; + break; + case "hexagon": + n = "hexagon"; + break; + case "odd": + n = "rect_left_inv_arrow"; + break; + case "lean_right": + n = "lean_right"; + break; + case "lean_left": + n = "lean_left"; + break; + case "trapezoid": + n = "trapezoid"; + break; + case "inv_trapezoid": + n = "inv_trapezoid"; + break; + case "odd_right": + n = "rect_left_inv_arrow"; + break; + case "circle": + n = "circle"; + break; + case "ellipse": + n = "ellipse"; + break; + case "stadium": + n = "stadium"; + break; + case "subroutine": + n = "subroutine"; + break; + case "cylinder": + n = "cylinder"; + break; + case "group": + n = "rect"; + break; + case "doublecircle": + n = "doublecircle"; + break; + default: + n = "rect"; + } + l.setNode(r.id, { + labelStyle: w.labelStyle, + shape: n, + labelText: t, + labelType: r.labelType, + rx: p, + ry: p, + class: g, + style: w.style, + id: r.id, + link: r.link, + linkTarget: r.linkTarget, + tooltip: d.db.getTooltip(r.id) || "", + domId: d.db.lookUpDomId(r.id), + haveCallback: r.haveCallback, + width: r.type === "group" ? 500 : void 0, + dir: r.dir, + type: r.type, + props: r.props, + padding: C().flowchart.padding + }), y.info("setNode", { + labelStyle: w.labelStyle, + labelType: r.labelType, + shape: n, + labelText: t, + rx: p, + ry: p, + class: g, + style: w.style, + id: r.id, + domId: d.db.lookUpDomId(r.id), + width: r.type === "group" ? 500 : void 0, + type: r.type, + dir: r.dir, + props: r.props, + padding: C().flowchart.padding + }); + }); +}, P = function(e, l, c) { + y.info("abc78 edges = ", e); + let a = 0, i = {}, d, u; + if (e.defaultStyle !== void 0) { + const o = A(e.defaultStyle); + d = o.style, u = o.labelStyle; + } + e.forEach(function(o) { + a++; + const f = "L-" + o.start + "-" + o.end; + i[f] === void 0 ? (i[f] = 0, y.info("abc78 new entry", f, i[f])) : (i[f]++, y.info("abc78 new entry", f, i[f])); + let r = f + "-" + i[f]; + y.info("abc78 new link id to be used is", f, r, i[f]); + const g = "LS-" + o.start, w = "LE-" + o.end, t = { style: "", labelStyle: "" }; + switch (t.minlen = o.length || 1, o.type === "arrow_open" ? t.arrowhead = "none" : t.arrowhead = "normal", t.arrowTypeStart = "arrow_open", t.arrowTypeEnd = "arrow_open", o.type) { + case "double_arrow_cross": + t.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + t.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + t.arrowTypeStart = "arrow_point"; + case "arrow_point": + t.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + t.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + t.arrowTypeEnd = "arrow_circle"; + break; + } + let s = "", p = ""; + switch (o.stroke) { + case "normal": + s = "fill:none;", d !== void 0 && (s = d), u !== void 0 && (p = u), t.thickness = "normal", t.pattern = "solid"; + break; + case "dotted": + t.thickness = "normal", t.pattern = "dotted", t.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + t.thickness = "thick", t.pattern = "solid", t.style = "stroke-width: 3.5px;fill:none;"; + break; + case "invisible": + t.thickness = "invisible", t.pattern = "solid", t.style = "stroke-width: 0;fill:none;"; + break; + } + if (o.style !== void 0) { + const n = A(o.style); + s = n.style, p = n.labelStyle; + } + t.style = t.style += s, t.labelStyle = t.labelStyle += p, o.interpolate !== void 0 ? t.curve = $(o.interpolate, E) : e.defaultInterpolate !== void 0 ? t.curve = $(e.defaultInterpolate, E) : t.curve = $(G.curve, E), o.text === void 0 ? o.style !== void 0 && (t.arrowheadStyle = "fill: #333") : (t.arrowheadStyle = "fill: #333", t.labelpos = "c"), t.labelType = o.labelType, t.label = o.text.replace(z.lineBreakRegex, ` +`), o.style === void 0 && (t.style = t.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), t.labelStyle = t.labelStyle.replace("color:", "fill:"), t.id = r, t.classes = "flowchart-link " + g + " " + w, l.setEdge(o.start, o.end, t, a); + }); +}, ae = function(e, l) { + return l.db.getClasses(); +}, ne = async function(e, l, c, a) { + y.info("Drawing flowchart"); + let i = a.db.getDirection(); + i === void 0 && (i = "TD"); + const { securityLevel: d, flowchart: u } = C(), o = u.nodeSpacing || 50, f = u.rankSpacing || 50; + let r; + d === "sandbox" && (r = _("#i" + l)); + const g = d === "sandbox" ? _(r.nodes()[0].contentDocument.body) : _("body"), w = d === "sandbox" ? r.nodes()[0].contentDocument : document, t = new V({ + multigraph: !0, + compound: !0 + }).setGraph({ + rankdir: i, + nodesep: o, + ranksep: f, + marginx: 0, + marginy: 0 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let s; + const p = a.db.getSubGraphs(); + y.info("Subgraphs - ", p); + for (let b = p.length - 1; b >= 0; b--) + s = p[b], y.info("Subgraph - ", s), a.db.addVertex( + s.id, + { text: s.title, type: s.labelType }, + "group", + void 0, + s.classes, + s.dir + ); + const n = a.db.getVertices(), m = a.db.getEdges(); + y.info("Edges", m); + let k = 0; + for (k = p.length - 1; k >= 0; k--) { + s = p[k], Y("cluster").append("text"); + for (let b = 0; b < s.nodes.length; b++) + y.info("Setting up subgraphs", s.nodes[b], s.id), t.setParent(s.nodes[b], s.id); + } + q(n, t, l, g, w, a), P(m, t); + const T = g.select(`[id="${l}"]`), S = g.select("#" + l + " g"); + if (await Q(S, t, ["point", "circle", "cross"], "flowchart", l), X.insertTitle(T, "flowchartTitleText", u.titleTopMargin, a.db.getDiagramTitle()), J(t, T, u.diagramPadding, u.useMaxWidth), a.db.indexNodes("subGraph" + k), !u.htmlLabels) { + const b = w.querySelectorAll('[id="' + l + '"] .edgeLabel .label'); + for (const x of b) { + const v = x.getBBox(), h = w.createElementNS("http://www.w3.org/2000/svg", "rect"); + h.setAttribute("rx", 0), h.setAttribute("ry", 0), h.setAttribute("width", v.width), h.setAttribute("height", v.height), x.insertBefore(h, x.firstChild); + } + } + Object.keys(n).forEach(function(b) { + const x = n[b]; + if (x.link) { + const v = _("#" + l + ' [id="' + b + '"]'); + if (v) { + const h = w.createElementNS("http://www.w3.org/2000/svg", "a"); + h.setAttributeNS("http://www.w3.org/2000/svg", "class", x.classes.join(" ")), h.setAttributeNS("http://www.w3.org/2000/svg", "href", x.link), h.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), d === "sandbox" ? h.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : x.linkTarget && h.setAttributeNS("http://www.w3.org/2000/svg", "target", x.linkTarget); + const N = v.insert(function() { + return h; + }, ":first-child"), B = v.select(".label-container"); + B && N.append(function() { + return B.node(); + }); + const I = v.select(".label"); + I && N.append(function() { + return I.node(); + }); + } + } + }); +}, he = { + setConf: le, + addVertices: q, + addEdges: P, + getClasses: ae, + draw: ne +}, oe = (e, l) => { + const c = O, a = c(e, "r"), i = c(e, "g"), d = c(e, "b"); + return K(a, i, d, l); +}, se = (e) => `.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor || e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + .label text,span,p { + fill: ${e.nodeTextColor || e.textColor}; + color: ${e.nodeTextColor || e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${oe(e.edgeLabelBackground, 0.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`, ye = se; +export { + te as a, + re as b, + we as c, + ue as d, + be as e, + he as f, + ye as g, + pe as i, + Y as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-24dfea38.js b/webroot/js/node_modules/mermaid/dist/styles-24dfea38.js new file mode 100644 index 0000000..f5ea2a8 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-24dfea38.js @@ -0,0 +1,1363 @@ +import { c as getConfig, g as getAccTitle, s as setAccTitle, a as getAccDescription, b as setAccDescription, q as setDiagramTitle, r as getDiagramTitle, l as log, e as common, t as clear$1, G as generateId } from "./mermaid-0d192ec3.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setRootDoc($$[$0]); + return $$[$0]; + case 4: + this.$ = []; + break; + case 5: + if ($$[$0] != "nl") { + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + } + break; + case 6: + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = "nl"; + break; + case 11: + this.$ = $$[$0]; + break; + case 12: + const stateStmt = $$[$0 - 1]; + stateStmt.description = yy.trimColon($$[$0]); + this.$ = stateStmt; + break; + case 13: + this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] }; + break; + case 14: + const relDescription = yy.trimColon($$[$0]); + this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription }; + break; + case 18: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] }; + break; + case 19: + var id = $$[$0]; + var description = $$[$0 - 2].trim(); + if ($$[$0].match(":")) { + var parts = $$[$0].split(":"); + id = parts[0]; + description = [description, parts[1]]; + } + this.$ = { stmt: "state", id, type: "default", description }; + break; + case 20: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] }; + break; + case 21: + this.$ = { stmt: "state", id: $$[$0], type: "fork" }; + break; + case 22: + this.$ = { stmt: "state", id: $$[$0], type: "join" }; + break; + case 23: + this.$ = { stmt: "state", id: $$[$0], type: "choice" }; + break; + case 24: + this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" }; + break; + case 25: + this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } }; + break; + case 28: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 29: + case 30: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 31: + case 32: + this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() }; + break; + case 33: + this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; + break; + case 34: + yy.setDirection("TB"); + this.$ = { stmt: "dir", value: "TB" }; + break; + case 35: + yy.setDirection("BT"); + this.$ = { stmt: "dir", value: "BT" }; + break; + case 36: + yy.setDirection("RL"); + this.$ = { stmt: "dir", value: "RL" }; + break; + case 37: + yy.setDirection("LR"); + this.$ = { stmt: "dir", value: "LR" }; + break; + case 40: + case 41: + this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" }; + break; + case 42: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + case 43: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])], + defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 40; + case 1: + return 44; + case 2: + return 45; + case 3: + return 46; + case 4: + return 47; + case 5: + break; + case 6: + break; + case 7: + return 5; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + this.pushState("SCALE"); + return 16; + case 13: + return 17; + case 14: + this.popState(); + break; + case 15: + this.begin("acc_title"); + return 32; + case 16: + this.popState(); + return "acc_title_value"; + case 17: + this.begin("acc_descr"); + return 34; + case 18: + this.popState(); + return "acc_descr_value"; + case 19: + this.begin("acc_descr_multiline"); + break; + case 20: + this.popState(); + break; + case 21: + return "acc_descr_multiline_value"; + case 22: + this.pushState("CLASSDEF"); + return 37; + case 23: + this.popState(); + this.pushState("CLASSDEFID"); + return "DEFAULT_CLASSDEF_ID"; + case 24: + this.popState(); + this.pushState("CLASSDEFID"); + return 38; + case 25: + this.popState(); + return 39; + case 26: + this.pushState("CLASS"); + return 41; + case 27: + this.popState(); + this.pushState("CLASS_STYLE"); + return 42; + case 28: + this.popState(); + return 43; + case 29: + this.pushState("SCALE"); + return 16; + case 30: + return 17; + case 31: + this.popState(); + break; + case 32: + this.pushState("STATE"); + break; + case 33: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 34: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 35: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 36: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 37: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 38: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 39: + return 44; + case 40: + return 45; + case 41: + return 46; + case 42: + return 47; + case 43: + this.pushState("STATE_STRING"); + break; + case 44: + this.pushState("STATE_ID"); + return "AS"; + case 45: + this.popState(); + return "ID"; + case 46: + this.popState(); + break; + case 47: + return "STATE_DESCR"; + case 48: + return 18; + case 49: + this.popState(); + break; + case 50: + this.popState(); + this.pushState("struct"); + return 19; + case 51: + break; + case 52: + this.popState(); + return 20; + case 53: + break; + case 54: + this.begin("NOTE"); + return 28; + case 55: + this.popState(); + this.pushState("NOTE_ID"); + return 52; + case 56: + this.popState(); + this.pushState("NOTE_ID"); + return 53; + case 57: + this.popState(); + this.pushState("FLOATING_NOTE"); + break; + case 58: + this.popState(); + this.pushState("FLOATING_NOTE_ID"); + return "AS"; + case 59: + break; + case 60: + return "NOTE_TEXT"; + case 61: + this.popState(); + return "ID"; + case 62: + this.popState(); + this.pushState("NOTE_TEXT"); + return 23; + case 63: + this.popState(); + yy_.yytext = yy_.yytext.substr(2).trim(); + return 30; + case 64: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 30; + case 65: + return 6; + case 66: + return 6; + case 67: + return 15; + case 68: + return 50; + case 69: + return 23; + case 70: + yy_.yytext = yy_.yytext.trim(); + return 13; + case 71: + return 14; + case 72: + return 27; + case 73: + return 51; + case 74: + return 5; + case 75: + return "INVALID"; + } + }, + rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_DIAGRAM_DIRECTION = "LR"; +const DEFAULT_NESTED_DOC_DIR = "TB"; +const STMT_STATE = "state"; +const STMT_RELATION = "relation"; +const STMT_CLASSDEF = "classDef"; +const STMT_APPLYCLASS = "applyClass"; +const DEFAULT_STATE_TYPE = "default"; +const DIVIDER_TYPE = "divider"; +const START_NODE = "[*]"; +const START_TYPE = "start"; +const END_NODE = START_NODE; +const END_TYPE = "end"; +const COLOR_KEYWORD = "color"; +const FILL_KEYWORD = "fill"; +const BG_FILL = "bgFill"; +const STYLECLASS_SEP = ","; +function newClassesList() { + return {}; +} +let direction = DEFAULT_DIAGRAM_DIRECTION; +let rootDoc = []; +let classes = newClassesList(); +const newDoc = () => { + return { + relations: [], + states: {}, + documents: {} + }; +}; +let documents = { + root: newDoc() +}; +let currentDocument = documents.root; +let startEndCount = 0; +let dividerCnt = 0; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 +}; +const clone = (o) => JSON.parse(JSON.stringify(o)); +const setRootDoc = (o) => { + log.info("Setting root doc", o); + rootDoc = o; +}; +const getRootDoc = () => rootDoc; +const docTranslator = (parent, node, first) => { + if (node.stmt === STMT_RELATION) { + docTranslator(parent, node.state1, true); + docTranslator(parent, node.state2, false); + } else { + if (node.stmt === STMT_STATE) { + if (node.id === "[*]") { + node.id = first ? parent.id + "_start" : parent.id + "_end"; + node.start = first; + } else { + node.id = node.id.trim(); + } + } + if (node.doc) { + const doc = []; + let currentDoc = []; + let i; + for (i = 0; i < node.doc.length; i++) { + if (node.doc[i].type === DIVIDER_TYPE) { + const newNode = clone(node.doc[i]); + newNode.doc = clone(currentDoc); + doc.push(newNode); + currentDoc = []; + } else { + currentDoc.push(node.doc[i]); + } + } + if (doc.length > 0 && currentDoc.length > 0) { + const newNode = { + stmt: STMT_STATE, + id: generateId(), + type: "divider", + doc: clone(currentDoc) + }; + doc.push(clone(newNode)); + node.doc = doc; + } + node.doc.forEach((docNode) => docTranslator(node, docNode, true)); + } + } +}; +const getRootDocV2 = () => { + docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true); + return { id: "root", doc: rootDoc }; +}; +const extract = (_doc) => { + let doc; + if (_doc.doc) { + doc = _doc.doc; + } else { + doc = _doc; + } + log.info(doc); + clear(true); + log.info("Extract", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + addState( + item.id.trim(), + item.type, + item.doc, + item.description, + item.note, + item.classes, + item.styles, + item.textStyles + ); + break; + case STMT_RELATION: + addRelation(item.state1, item.state2, item.description); + break; + case STMT_CLASSDEF: + addStyleClass(item.id.trim(), item.classes); + break; + case STMT_APPLYCLASS: + setCssClass(item.id.trim(), item.styleClass); + break; + } + }); +}; +const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles2 = null, textStyles = null) { + const trimmedId = id == null ? void 0 : id.trim(); + if (currentDocument.states[trimmedId] === void 0) { + log.info("Adding state ", trimmedId, descr); + currentDocument.states[trimmedId] = { + id: trimmedId, + descriptions: [], + type, + doc, + note, + classes: [], + styles: [], + textStyles: [] + }; + } else { + if (!currentDocument.states[trimmedId].doc) { + currentDocument.states[trimmedId].doc = doc; + } + if (!currentDocument.states[trimmedId].type) { + currentDocument.states[trimmedId].type = type; + } + } + if (descr) { + log.info("Setting state description", trimmedId, descr); + if (typeof descr === "string") { + addDescription(trimmedId, descr.trim()); + } + if (typeof descr === "object") { + descr.forEach((des) => addDescription(trimmedId, des.trim())); + } + } + if (note) { + currentDocument.states[trimmedId].note = note; + currentDocument.states[trimmedId].note.text = common.sanitizeText( + currentDocument.states[trimmedId].note.text, + getConfig() + ); + } + if (classes2) { + log.info("Setting state classes", trimmedId, classes2); + const classesList = typeof classes2 === "string" ? [classes2] : classes2; + classesList.forEach((klass) => setCssClass(trimmedId, klass.trim())); + } + if (styles2) { + log.info("Setting state styles", trimmedId, styles2); + const stylesList = typeof styles2 === "string" ? [styles2] : styles2; + stylesList.forEach((style) => setStyle(trimmedId, style.trim())); + } + if (textStyles) { + log.info("Setting state styles", trimmedId, styles2); + const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles; + textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim())); + } +}; +const clear = function(saveCommon) { + documents = { + root: newDoc() + }; + currentDocument = documents.root; + startEndCount = 0; + classes = newClassesList(); + if (!saveCommon) { + clear$1(); + } +}; +const getState = function(id) { + return currentDocument.states[id]; +}; +const getStates = function() { + return currentDocument.states; +}; +const logDocuments = function() { + log.info("Documents = ", documents); +}; +const getRelations = function() { + return currentDocument.relations; +}; +function startIdIfNeeded(id = "") { + let fixedId = id; + if (id === START_NODE) { + startEndCount++; + fixedId = `${START_TYPE}${startEndCount}`; + } + return fixedId; +} +function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === START_NODE ? START_TYPE : type; +} +function endIdIfNeeded(id = "") { + let fixedId = id; + if (id === END_NODE) { + startEndCount++; + fixedId = `${END_TYPE}${startEndCount}`; + } + return fixedId; +} +function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === END_NODE ? END_TYPE : type; +} +function addRelationObjs(item1, item2, relationTitle) { + let id1 = startIdIfNeeded(item1.id.trim()); + let type1 = startTypeIfNeeded(item1.id.trim(), item1.type); + let id2 = startIdIfNeeded(item2.id.trim()); + let type2 = startTypeIfNeeded(item2.id.trim(), item2.type); + addState( + id1, + type1, + item1.doc, + item1.description, + item1.note, + item1.classes, + item1.styles, + item1.textStyles + ); + addState( + id2, + type2, + item2.doc, + item2.description, + item2.note, + item2.classes, + item2.styles, + item2.textStyles + ); + currentDocument.relations.push({ + id1, + id2, + relationTitle: common.sanitizeText(relationTitle, getConfig()) + }); +} +const addRelation = function(item1, item2, title) { + if (typeof item1 === "object") { + addRelationObjs(item1, item2, title); + } else { + const id1 = startIdIfNeeded(item1.trim()); + const type1 = startTypeIfNeeded(item1); + const id2 = endIdIfNeeded(item2.trim()); + const type2 = endTypeIfNeeded(item2); + addState(id1, type1); + addState(id2, type2); + currentDocument.relations.push({ + id1, + id2, + title: common.sanitizeText(title, getConfig()) + }); + } +}; +const addDescription = function(id, descr) { + const theState = currentDocument.states[id]; + const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr; + theState.descriptions.push(common.sanitizeText(_descr, getConfig())); +}; +const cleanupLabel = function(label) { + if (label.substring(0, 1) === ":") { + return label.substr(2).trim(); + } else { + return label.trim(); + } +}; +const getDividerId = () => { + dividerCnt++; + return "divider-id-" + dividerCnt; +}; +const addStyleClass = function(id, styleAttributes = "") { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + const foundClass = classes[id]; + if (styleAttributes !== void 0 && styleAttributes !== null) { + styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { + const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); + if (attrib.match(COLOR_KEYWORD)) { + const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); + const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); + foundClass.textStyles.push(newStyle2); + } + foundClass.styles.push(fixedAttrib); + }); + } +}; +const getClasses = function() { + return classes; +}; +const setCssClass = function(itemIds, cssClassName) { + itemIds.split(",").forEach(function(id) { + let foundState = getState(id); + if (foundState === void 0) { + const trimmedId = id.trim(); + addState(trimmedId); + foundState = getState(trimmedId); + } + foundState.classes.push(cssClassName); + }); +}; +const setStyle = function(itemId, styleText) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(styleText); + } +}; +const setTextStyle = function(itemId, cssClassName) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(cssClassName); + } +}; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const trimColon = (str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(); +const db = { + getConfig: () => getConfig().state, + addState, + clear, + getState, + getStates, + getRelations, + getClasses, + getDirection, + addRelation, + getDividerId, + setDirection, + cleanupLabel, + lineType, + relationType, + logDocuments, + getRootDoc, + setRootDoc, + getRootDocV2, + extract, + trimColon, + getAccTitle, + setAccTitle, + getAccDescription, + setAccDescription, + addStyleClass, + setCssClass, + addDescription, + setDiagramTitle, + getDiagramTitle +}; +const getStyles = (options) => ` +defs #statediagram-barbEnd { + fill: ${options.transitionColor}; + stroke: ${options.transitionColor}; + } +g.stateGroup text { + fill: ${options.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${options.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${options.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.stateGroup line { + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${options.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${options.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${options.noteBorderColor}; + fill: ${options.noteBkgColor}; + + text { + fill: ${options.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${options.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel .label text { + fill: ${options.transitionLabelColor || options.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${options.transitionLabelColor || options.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${options.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node .fork-join { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node circle.state-end { + fill: ${options.innerEndBackground}; + stroke: ${options.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${options.compositeBackground || options.background}; + // stroke: ${options.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${options.stateBkg || options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${options.lineColor}; +} + +.statediagram-cluster rect { + fill: ${options.compositeTitleBackground}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${options.stateLabelColor}; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${options.stateBorder || options.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${options.compositeBackground || options.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${options.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${options.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${options.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${options.lineColor}; + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; +export { + DEFAULT_STATE_TYPE as D, + STMT_RELATION as S, + DIVIDER_TYPE as a, + STMT_STATE as b, + DEFAULT_NESTED_DOC_DIR as c, + db as d, + parser$1 as p, + styles as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-483f8ae9.js b/webroot/js/node_modules/mermaid/dist/styles-483f8ae9.js new file mode 100644 index 0000000..483b12b --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-483f8ae9.js @@ -0,0 +1,1062 @@ +import { d as Xe, c as F, G as ye, s as We, g as qe, a as He, b as Je, B as Ze, D as $e, f as v, E as et, l as tt, z as Pe, j as U } from "./mermaid-e4a58915.js"; +var De = function() { + var e = function(L, u, a, o) { + for (a = a || {}, o = L.length; o--; a[L[o]] = u) + ; + return a; + }, n = [1, 16], r = [1, 17], h = [1, 18], l = [1, 37], A = [1, 38], g = [1, 24], D = [1, 22], B = [1, 23], _ = [1, 29], ne = [1, 30], ue = [1, 31], re = [1, 32], ae = [1, 33], le = [1, 34], ce = [1, 25], oe = [1, 26], he = [1, 27], Ae = [1, 28], d = [1, 42], E = [1, 39], C = [1, 40], m = [1, 41], k = [1, 43], pe = [1, 9], c = [1, 8, 9], Y = [1, 54], K = [1, 55], j = [1, 56], Q = [1, 57], X = [1, 58], fe = [1, 59], de = [1, 60], W = [1, 8, 9, 38], Ne = [1, 71], V = [1, 8, 9, 12, 13, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], q = [1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 45, 58, 59, 60, 61, 62, 63, 64, 69, 71, 84, 86, 87, 88, 89], H = [13, 84, 86, 87, 88, 89], G = [13, 63, 64, 84, 86, 87, 88, 89], ve = [13, 58, 59, 60, 61, 62, 84, 86, 87, 88, 89], Ee = [1, 90], Ce = [1, 8, 9, 36, 38, 41], J = [1, 8, 9, 21], me = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, mermaidDoc: 4, statements: 5, graphConfig: 6, CLASS_DIAGRAM: 7, NEWLINE: 8, EOF: 9, statement: 10, classLabel: 11, SQS: 12, STR: 13, SQE: 14, namespaceName: 15, alphaNumToken: 16, className: 17, classLiteralName: 18, GENERICTYPE: 19, relationStatement: 20, LABEL: 21, namespaceStatement: 22, classStatement: 23, memberStatement: 24, annotationStatement: 25, clickStatement: 26, cssClassStatement: 27, noteStatement: 28, direction: 29, acc_title: 30, acc_title_value: 31, acc_descr: 32, acc_descr_value: 33, acc_descr_multiline_value: 34, namespaceIdentifier: 35, STRUCT_START: 36, classStatements: 37, STRUCT_STOP: 38, NAMESPACE: 39, classIdentifier: 40, STYLE_SEPARATOR: 41, members: 42, CLASS: 43, ANNOTATION_START: 44, ANNOTATION_END: 45, MEMBER: 46, SEPARATOR: 47, relation: 48, NOTE_FOR: 49, noteText: 50, NOTE: 51, direction_tb: 52, direction_bt: 53, direction_rl: 54, direction_lr: 55, relationType: 56, lineType: 57, AGGREGATION: 58, EXTENSION: 59, COMPOSITION: 60, DEPENDENCY: 61, LOLLIPOP: 62, LINE: 63, DOTTED_LINE: 64, CALLBACK: 65, LINK: 66, LINK_TARGET: 67, CLICK: 68, CALLBACK_NAME: 69, CALLBACK_ARGS: 70, HREF: 71, CSSCLASS: 72, commentToken: 73, textToken: 74, graphCodeTokens: 75, textNoTagsToken: 76, TAGSTART: 77, TAGEND: 78, "==": 79, "--": 80, PCT: 81, DEFAULT: 82, SPACE: 83, MINUS: 84, keywords: 85, UNICODE_TEXT: 86, NUM: 87, ALPHA: 88, BQUOTE_STR: 89, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 30: "acc_title", 31: "acc_title_value", 32: "acc_descr", 33: "acc_descr_value", 34: "acc_descr_multiline_value", 36: "STRUCT_START", 38: "STRUCT_STOP", 39: "NAMESPACE", 41: "STYLE_SEPARATOR", 43: "CLASS", 44: "ANNOTATION_START", 45: "ANNOTATION_END", 46: "MEMBER", 47: "SEPARATOR", 49: "NOTE_FOR", 51: "NOTE", 52: "direction_tb", 53: "direction_bt", 54: "direction_rl", 55: "direction_lr", 58: "AGGREGATION", 59: "EXTENSION", 60: "COMPOSITION", 61: "DEPENDENCY", 62: "LOLLIPOP", 63: "LINE", 64: "DOTTED_LINE", 65: "CALLBACK", 66: "LINK", 67: "LINK_TARGET", 68: "CLICK", 69: "CALLBACK_NAME", 70: "CALLBACK_ARGS", 71: "HREF", 72: "CSSCLASS", 75: "graphCodeTokens", 77: "TAGSTART", 78: "TAGEND", 79: "==", 80: "--", 81: "PCT", 82: "DEFAULT", 83: "SPACE", 84: "MINUS", 85: "keywords", 86: "UNICODE_TEXT", 87: "NUM", 88: "ALPHA", 89: "BQUOTE_STR" }, + productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [35, 2], [37, 1], [37, 2], [37, 3], [23, 1], [23, 3], [23, 4], [23, 6], [40, 2], [40, 3], [25, 4], [42, 1], [42, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [28, 3], [28, 2], [29, 1], [29, 1], [29, 1], [29, 1], [48, 3], [48, 2], [48, 2], [48, 1], [56, 1], [56, 1], [56, 1], [56, 1], [56, 1], [57, 1], [57, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [73, 1], [73, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [76, 1], [76, 1], [76, 1], [76, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [50, 1]], + performAction: function(u, a, o, i, p, t, M) { + var s = t.length - 1; + switch (p) { + case 8: + this.$ = t[s - 1]; + break; + case 9: + case 11: + case 12: + this.$ = t[s]; + break; + case 10: + case 13: + this.$ = t[s - 1] + t[s]; + break; + case 14: + case 15: + this.$ = t[s - 1] + "~" + t[s] + "~"; + break; + case 16: + i.addRelation(t[s]); + break; + case 17: + t[s - 1].title = i.cleanupLabel(t[s]), i.addRelation(t[s - 1]); + break; + case 26: + this.$ = t[s].trim(), i.setAccTitle(this.$); + break; + case 27: + case 28: + this.$ = t[s].trim(), i.setAccDescription(this.$); + break; + case 29: + i.addClassesToNamespace(t[s - 3], t[s - 1]); + break; + case 30: + i.addClassesToNamespace(t[s - 4], t[s - 1]); + break; + case 31: + this.$ = t[s], i.addNamespace(t[s]); + break; + case 32: + this.$ = [t[s]]; + break; + case 33: + this.$ = [t[s - 1]]; + break; + case 34: + t[s].unshift(t[s - 2]), this.$ = t[s]; + break; + case 36: + i.setCssClass(t[s - 2], t[s]); + break; + case 37: + i.addMembers(t[s - 3], t[s - 1]); + break; + case 38: + i.setCssClass(t[s - 5], t[s - 3]), i.addMembers(t[s - 5], t[s - 1]); + break; + case 39: + this.$ = t[s], i.addClass(t[s]); + break; + case 40: + this.$ = t[s - 1], i.addClass(t[s - 1]), i.setClassLabel(t[s - 1], t[s]); + break; + case 41: + i.addAnnotation(t[s], t[s - 2]); + break; + case 42: + this.$ = [t[s]]; + break; + case 43: + t[s].push(t[s - 1]), this.$ = t[s]; + break; + case 44: + break; + case 45: + i.addMember(t[s - 1], i.cleanupLabel(t[s])); + break; + case 46: + break; + case 47: + break; + case 48: + this.$ = { id1: t[s - 2], id2: t[s], relation: t[s - 1], relationTitle1: "none", relationTitle2: "none" }; + break; + case 49: + this.$ = { id1: t[s - 3], id2: t[s], relation: t[s - 1], relationTitle1: t[s - 2], relationTitle2: "none" }; + break; + case 50: + this.$ = { id1: t[s - 3], id2: t[s], relation: t[s - 2], relationTitle1: "none", relationTitle2: t[s - 1] }; + break; + case 51: + this.$ = { id1: t[s - 4], id2: t[s], relation: t[s - 2], relationTitle1: t[s - 3], relationTitle2: t[s - 1] }; + break; + case 52: + i.addNote(t[s], t[s - 1]); + break; + case 53: + i.addNote(t[s]); + break; + case 54: + i.setDirection("TB"); + break; + case 55: + i.setDirection("BT"); + break; + case 56: + i.setDirection("RL"); + break; + case 57: + i.setDirection("LR"); + break; + case 58: + this.$ = { type1: t[s - 2], type2: t[s], lineType: t[s - 1] }; + break; + case 59: + this.$ = { type1: "none", type2: t[s], lineType: t[s - 1] }; + break; + case 60: + this.$ = { type1: t[s - 1], type2: "none", lineType: t[s] }; + break; + case 61: + this.$ = { type1: "none", type2: "none", lineType: t[s] }; + break; + case 62: + this.$ = i.relationType.AGGREGATION; + break; + case 63: + this.$ = i.relationType.EXTENSION; + break; + case 64: + this.$ = i.relationType.COMPOSITION; + break; + case 65: + this.$ = i.relationType.DEPENDENCY; + break; + case 66: + this.$ = i.relationType.LOLLIPOP; + break; + case 67: + this.$ = i.lineType.LINE; + break; + case 68: + this.$ = i.lineType.DOTTED_LINE; + break; + case 69: + case 75: + this.$ = t[s - 2], i.setClickEvent(t[s - 1], t[s]); + break; + case 70: + case 76: + this.$ = t[s - 3], i.setClickEvent(t[s - 2], t[s - 1]), i.setTooltip(t[s - 2], t[s]); + break; + case 71: + this.$ = t[s - 2], i.setLink(t[s - 1], t[s]); + break; + case 72: + this.$ = t[s - 3], i.setLink(t[s - 2], t[s - 1], t[s]); + break; + case 73: + this.$ = t[s - 3], i.setLink(t[s - 2], t[s - 1]), i.setTooltip(t[s - 2], t[s]); + break; + case 74: + this.$ = t[s - 4], i.setLink(t[s - 3], t[s - 2], t[s]), i.setTooltip(t[s - 3], t[s - 1]); + break; + case 77: + this.$ = t[s - 3], i.setClickEvent(t[s - 2], t[s - 1], t[s]); + break; + case 78: + this.$ = t[s - 4], i.setClickEvent(t[s - 3], t[s - 2], t[s - 1]), i.setTooltip(t[s - 3], t[s]); + break; + case 79: + this.$ = t[s - 3], i.setLink(t[s - 2], t[s]); + break; + case 80: + this.$ = t[s - 4], i.setLink(t[s - 3], t[s - 1], t[s]); + break; + case 81: + this.$ = t[s - 4], i.setLink(t[s - 3], t[s - 1]), i.setTooltip(t[s - 3], t[s]); + break; + case 82: + this.$ = t[s - 5], i.setLink(t[s - 4], t[s - 2], t[s]), i.setTooltip(t[s - 4], t[s - 1]); + break; + case 83: + i.setCssClass(t[s - 1], t[s]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: n, 32: r, 34: h, 35: 20, 39: l, 40: 21, 43: A, 44: g, 46: D, 47: B, 49: _, 51: ne, 52: ue, 53: re, 54: ae, 55: le, 65: ce, 66: oe, 68: he, 72: Ae, 84: d, 86: E, 87: C, 88: m, 89: k }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, e(pe, [2, 5], { 8: [1, 44] }), { 8: [1, 45] }, e(c, [2, 16], { 21: [1, 46] }), e(c, [2, 18]), e(c, [2, 19]), e(c, [2, 20]), e(c, [2, 21]), e(c, [2, 22]), e(c, [2, 23]), e(c, [2, 24]), e(c, [2, 25]), { 31: [1, 47] }, { 33: [1, 48] }, e(c, [2, 28]), e(c, [2, 44], { 48: 49, 56: 52, 57: 53, 13: [1, 50], 21: [1, 51], 58: Y, 59: K, 60: j, 61: Q, 62: X, 63: fe, 64: de }), { 36: [1, 61] }, e(W, [2, 35], { 36: [1, 63], 41: [1, 62] }), e(c, [2, 46]), e(c, [2, 47]), { 16: 64, 84: d, 86: E, 87: C, 88: m }, { 16: 35, 17: 65, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, { 16: 35, 17: 66, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, { 16: 35, 17: 67, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, { 13: [1, 68] }, { 16: 35, 17: 69, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, { 13: Ne, 50: 70 }, e(c, [2, 54]), e(c, [2, 55]), e(c, [2, 56]), e(c, [2, 57]), e(V, [2, 11], { 16: 35, 18: 36, 17: 72, 19: [1, 73], 84: d, 86: E, 87: C, 88: m, 89: k }), e(V, [2, 12], { 19: [1, 74] }), { 15: 75, 16: 76, 84: d, 86: E, 87: C, 88: m }, { 16: 35, 17: 77, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, e(q, [2, 97]), e(q, [2, 98]), e(q, [2, 99]), e(q, [2, 100]), e([1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], [2, 101]), e(pe, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 17: 19, 35: 20, 40: 21, 16: 35, 18: 36, 5: 78, 30: n, 32: r, 34: h, 39: l, 43: A, 44: g, 46: D, 47: B, 49: _, 51: ne, 52: ue, 53: re, 54: ae, 55: le, 65: ce, 66: oe, 68: he, 72: Ae, 84: d, 86: E, 87: C, 88: m, 89: k }), { 5: 79, 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: n, 32: r, 34: h, 35: 20, 39: l, 40: 21, 43: A, 44: g, 46: D, 47: B, 49: _, 51: ne, 52: ue, 53: re, 54: ae, 55: le, 65: ce, 66: oe, 68: he, 72: Ae, 84: d, 86: E, 87: C, 88: m, 89: k }, e(c, [2, 17]), e(c, [2, 26]), e(c, [2, 27]), { 13: [1, 81], 16: 35, 17: 80, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, { 48: 82, 56: 52, 57: 53, 58: Y, 59: K, 60: j, 61: Q, 62: X, 63: fe, 64: de }, e(c, [2, 45]), { 57: 83, 63: fe, 64: de }, e(H, [2, 61], { 56: 84, 58: Y, 59: K, 60: j, 61: Q, 62: X }), e(G, [2, 62]), e(G, [2, 63]), e(G, [2, 64]), e(G, [2, 65]), e(G, [2, 66]), e(ve, [2, 67]), e(ve, [2, 68]), { 8: [1, 86], 23: 87, 37: 85, 40: 21, 43: A }, { 16: 88, 84: d, 86: E, 87: C, 88: m }, { 42: 89, 46: Ee }, { 45: [1, 91] }, { 13: [1, 92] }, { 13: [1, 93] }, { 69: [1, 94], 71: [1, 95] }, { 16: 96, 84: d, 86: E, 87: C, 88: m }, { 13: Ne, 50: 97 }, e(c, [2, 53]), e(c, [2, 102]), e(V, [2, 13]), e(V, [2, 14]), e(V, [2, 15]), { 36: [2, 31] }, { 15: 98, 16: 76, 36: [2, 9], 84: d, 86: E, 87: C, 88: m }, e(Ce, [2, 39], { 11: 99, 12: [1, 100] }), e(pe, [2, 7]), { 9: [1, 101] }, e(J, [2, 48]), { 16: 35, 17: 102, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, { 13: [1, 104], 16: 35, 17: 103, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, e(H, [2, 60], { 56: 105, 58: Y, 59: K, 60: j, 61: Q, 62: X }), e(H, [2, 59]), { 38: [1, 106] }, { 23: 87, 37: 107, 40: 21, 43: A }, { 8: [1, 108], 38: [2, 32] }, e(W, [2, 36], { 36: [1, 109] }), { 38: [1, 110] }, { 38: [2, 42], 42: 111, 46: Ee }, { 16: 35, 17: 112, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, e(c, [2, 69], { 13: [1, 113] }), e(c, [2, 71], { 13: [1, 115], 67: [1, 114] }), e(c, [2, 75], { 13: [1, 116], 70: [1, 117] }), { 13: [1, 118] }, e(c, [2, 83]), e(c, [2, 52]), { 36: [2, 10] }, e(Ce, [2, 40]), { 13: [1, 119] }, { 1: [2, 4] }, e(J, [2, 50]), e(J, [2, 49]), { 16: 35, 17: 120, 18: 36, 84: d, 86: E, 87: C, 88: m, 89: k }, e(H, [2, 58]), e(c, [2, 29]), { 38: [1, 121] }, { 23: 87, 37: 122, 38: [2, 33], 40: 21, 43: A }, { 42: 123, 46: Ee }, e(W, [2, 37]), { 38: [2, 43] }, e(c, [2, 41]), e(c, [2, 70]), e(c, [2, 72]), e(c, [2, 73], { 67: [1, 124] }), e(c, [2, 76]), e(c, [2, 77], { 13: [1, 125] }), e(c, [2, 79], { 13: [1, 127], 67: [1, 126] }), { 14: [1, 128] }, e(J, [2, 51]), e(c, [2, 30]), { 38: [2, 34] }, { 38: [1, 129] }, e(c, [2, 74]), e(c, [2, 78]), e(c, [2, 80]), e(c, [2, 81], { 67: [1, 130] }), e(Ce, [2, 8]), e(W, [2, 38]), e(c, [2, 82])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 75: [2, 31], 98: [2, 10], 101: [2, 4], 111: [2, 43], 122: [2, 34] }, + parseError: function(u, a) { + if (a.recoverable) + this.trace(u); + else { + var o = new Error(u); + throw o.hash = a, o; + } + }, + parse: function(u) { + var a = this, o = [0], i = [], p = [null], t = [], M = this.table, s = "", Z = 0, Le = 0, Ye = 2, xe = 1, Ke = t.slice.call(arguments, 1), b = Object.create(this.lexer), I = { yy: {} }; + for (var ge in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, ge) && (I.yy[ge] = this.yy[ge]); + b.setInput(u, I.yy), I.yy.lexer = b, I.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {}); + var ke = b.yylloc; + t.push(ke); + var je = b.options && b.options.ranges; + typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function Qe() { + var N; + return N = i.pop() || b.lex() || xe, typeof N != "number" && (N instanceof Array && (i = N, N = i.pop()), N = a.symbols_[N] || N), N; + } + for (var T, O, y, Te, w = {}, $, S, Ie, ee; ; ) { + if (O = o[o.length - 1], this.defaultActions[O] ? y = this.defaultActions[O] : ((T === null || typeof T > "u") && (T = Qe()), y = M[O] && M[O][T]), typeof y > "u" || !y.length || !y[0]) { + var Fe = ""; + ee = []; + for ($ in M[O]) + this.terminals_[$] && $ > Ye && ee.push("'" + this.terminals_[$] + "'"); + b.showPosition ? Fe = "Parse error on line " + (Z + 1) + `: +` + b.showPosition() + ` +Expecting ` + ee.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : Fe = "Parse error on line " + (Z + 1) + ": Unexpected " + (T == xe ? "end of input" : "'" + (this.terminals_[T] || T) + "'"), this.parseError(Fe, { + text: b.match, + token: this.terminals_[T] || T, + line: b.yylineno, + loc: ke, + expected: ee + }); + } + if (y[0] instanceof Array && y.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + O + ", token: " + T); + switch (y[0]) { + case 1: + o.push(T), p.push(b.yytext), t.push(b.yylloc), o.push(y[1]), T = null, Le = b.yyleng, s = b.yytext, Z = b.yylineno, ke = b.yylloc; + break; + case 2: + if (S = this.productions_[y[1]][1], w.$ = p[p.length - S], w._$ = { + first_line: t[t.length - (S || 1)].first_line, + last_line: t[t.length - 1].last_line, + first_column: t[t.length - (S || 1)].first_column, + last_column: t[t.length - 1].last_column + }, je && (w._$.range = [ + t[t.length - (S || 1)].range[0], + t[t.length - 1].range[1] + ]), Te = this.performAction.apply(w, [ + s, + Le, + Z, + I.yy, + y[1], + p, + t + ].concat(Ke)), typeof Te < "u") + return Te; + S && (o = o.slice(0, -1 * S * 2), p = p.slice(0, -1 * S), t = t.slice(0, -1 * S)), o.push(this.productions_[y[1]][0]), p.push(w.$), t.push(w._$), Ie = M[o[o.length - 2]][o[o.length - 1]], o.push(Ie); + break; + case 3: + return !0; + } + } + return !0; + } + }, ze = function() { + var L = { + EOF: 1, + parseError: function(a, o) { + if (this.yy.parser) + this.yy.parser.parseError(a, o); + else + throw new Error(a); + }, + // resets the lexer, sets new input + setInput: function(u, a) { + return this.yy = a || this.yy || {}, this._input = u, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var u = this._input[0]; + this.yytext += u, this.yyleng++, this.offset++, this.match += u, this.matched += u; + var a = u.match(/(?:\r\n?|\n).*/g); + return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), u; + }, + // unshifts one char (or a string) into the input + unput: function(u) { + var a = u.length, o = u.split(/(?:\r\n?|\n)/g); + this._input = u + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a; + var i = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1); + var p = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: o ? (o.length === i.length ? this.yylloc.first_column : 0) + i[i.length - o.length].length - o[0].length : this.yylloc.first_column - a + }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(u) { + this.unput(this.match.slice(u)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var u = this.matched.substr(0, this.matched.length - this.match.length); + return (u.length > 20 ? "..." : "") + u.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var u = this.match; + return u.length < 20 && (u += this._input.substr(0, 20 - u.length)), (u.substr(0, 20) + (u.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var u = this.pastInput(), a = new Array(u.length + 1).join("-"); + return u + this.upcomingInput() + ` +` + a + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(u, a) { + var o, i, p; + if (this.options.backtrack_lexer && (p = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), i = u[0].match(/(?:\r\n?|\n).*/g), i && (this.yylineno += i.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: i ? i[i.length - 1].length - i[i.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + u[0].length + }, this.yytext += u[0], this.match += u[0], this.matches = u, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(u[0].length), this.matched += u[0], o = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o) + return o; + if (this._backtrack) { + for (var t in p) + this[t] = p[t]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var u, a, o, i; + this._more || (this.yytext = "", this.match = ""); + for (var p = this._currentRules(), t = 0; t < p.length; t++) + if (o = this._input.match(this.rules[p[t]]), o && (!a || o[0].length > a[0].length)) { + if (a = o, i = t, this.options.backtrack_lexer) { + if (u = this.test_match(o, p[t]), u !== !1) + return u; + if (this._backtrack) { + a = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return a ? (u = this.test_match(a, p[i]), u !== !1 ? u : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var a = this.next(); + return a || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(a) { + this.conditionStack.push(a); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var a = this.conditionStack.length - 1; + return a > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(a) { + return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(a) { + this.begin(a); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: {}, + performAction: function(a, o, i, p) { + switch (i) { + case 0: + return 52; + case 1: + return 53; + case 2: + return 54; + case 3: + return 55; + case 4: + break; + case 5: + break; + case 6: + return this.begin("acc_title"), 30; + case 7: + return this.popState(), "acc_title_value"; + case 8: + return this.begin("acc_descr"), 32; + case 9: + return this.popState(), "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 8; + case 14: + break; + case 15: + return 7; + case 16: + return 7; + case 17: + return "EDGE_STATE"; + case 18: + this.begin("callback_name"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(), this.begin("callback_args"); + break; + case 21: + return 69; + case 22: + this.popState(); + break; + case 23: + return 70; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("string"); + break; + case 27: + return this.begin("namespace"), 39; + case 28: + return this.popState(), 8; + case 29: + break; + case 30: + return this.begin("namespace-body"), 36; + case 31: + return this.popState(), 38; + case 32: + return "EOF_IN_STRUCT"; + case 33: + return 8; + case 34: + break; + case 35: + return "EDGE_STATE"; + case 36: + return this.begin("class"), 43; + case 37: + return this.popState(), 8; + case 38: + break; + case 39: + return this.popState(), this.popState(), 38; + case 40: + return this.begin("class-body"), 36; + case 41: + return this.popState(), 38; + case 42: + return "EOF_IN_STRUCT"; + case 43: + return "EDGE_STATE"; + case 44: + return "OPEN_IN_STRUCT"; + case 45: + break; + case 46: + return "MEMBER"; + case 47: + return 72; + case 48: + return 65; + case 49: + return 66; + case 50: + return 68; + case 51: + return 49; + case 52: + return 51; + case 53: + return 44; + case 54: + return 45; + case 55: + return 71; + case 56: + this.popState(); + break; + case 57: + return "GENERICTYPE"; + case 58: + this.begin("generic"); + break; + case 59: + this.popState(); + break; + case 60: + return "BQUOTE_STR"; + case 61: + this.begin("bqstring"); + break; + case 62: + return 67; + case 63: + return 67; + case 64: + return 67; + case 65: + return 67; + case 66: + return 59; + case 67: + return 59; + case 68: + return 61; + case 69: + return 61; + case 70: + return 60; + case 71: + return 58; + case 72: + return 62; + case 73: + return 63; + case 74: + return 64; + case 75: + return 21; + case 76: + return 41; + case 77: + return 84; + case 78: + return "DOT"; + case 79: + return "PLUS"; + case 80: + return 81; + case 81: + return "EQUALS"; + case 82: + return "EQUALS"; + case 83: + return 88; + case 84: + return 12; + case 85: + return 14; + case 86: + return "PUNCTUATION"; + case 87: + return 87; + case 88: + return 86; + case 89: + return 83; + case 90: + return 9; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:$)/], + conditions: { "namespace-body": { rules: [26, 31, 32, 33, 34, 35, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, namespace: { rules: [26, 27, 28, 29, 30, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, "class-body": { rules: [26, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, class: { rules: [26, 37, 38, 39, 40, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, acc_descr: { rules: [9, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, acc_title: { rules: [7, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, callback_args: { rules: [22, 23, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, callback_name: { rules: [19, 20, 21, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, href: { rules: [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, struct: { rules: [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, generic: { rules: [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, bqstring: { rules: [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, string: { rules: [24, 25, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], inclusive: !0 } } + }; + return L; + }(); + me.lexer = ze; + function be() { + this.yy = {}; + } + return be.prototype = me, me.Parser = be, new be(); +}(); +De.parser = De; +const Nt = De, Oe = ["#", "+", "~", "-", ""]; +class Re { + constructor(n, r) { + this.memberType = r, this.visibility = "", this.classifier = ""; + const h = Xe(n, F()); + this.parseMember(h); + } + getDisplayDetails() { + let n = this.visibility + ye(this.id); + this.memberType === "method" && (n += `(${ye(this.parameters.trim())})`, this.returnType && (n += " : " + ye(this.returnType))), n = n.trim(); + const r = this.parseClassifier(); + return { + displayText: n, + cssStyle: r + }; + } + parseMember(n) { + let r = ""; + if (this.memberType === "method") { + const h = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/, l = n.match(h); + if (l) { + const A = l[1] ? l[1].trim() : ""; + if (Oe.includes(A) && (this.visibility = A), this.id = l[2].trim(), this.parameters = l[3] ? l[3].trim() : "", r = l[4] ? l[4].trim() : "", this.returnType = l[5] ? l[5].trim() : "", r === "") { + const g = this.returnType.substring(this.returnType.length - 1); + g.match(/[$*]/) && (r = g, this.returnType = this.returnType.substring(0, this.returnType.length - 1)); + } + } + } else { + const h = n.length, l = n.substring(0, 1), A = n.substring(h - 1); + Oe.includes(l) && (this.visibility = l), A.match(/[*?]/) && (r = A), this.id = n.substring( + this.visibility === "" ? 0 : 1, + r === "" ? h : h - 1 + ); + } + this.classifier = r; + } + parseClassifier() { + switch (this.classifier) { + case "*": + return "font-style:italic;"; + case "$": + return "text-decoration:underline;"; + default: + return ""; + } + } +} +const ie = "classId-"; +let _e = [], f = {}, te = [], we = 0, x = {}, Be = 0, z = []; +const R = (e) => v.sanitizeText(e, F()), P = function(e) { + const n = v.sanitizeText(e, F()); + let r = "", h = n; + if (n.indexOf("~") > 0) { + const l = n.split("~"); + h = R(l[0]), r = R(l[1]); + } + return { className: h, type: r }; +}, st = function(e, n) { + const r = v.sanitizeText(e, F()); + n && (n = R(n)); + const { className: h } = P(r); + f[h].label = n; +}, se = function(e) { + const n = v.sanitizeText(e, F()), { className: r, type: h } = P(n); + if (Object.hasOwn(f, r)) + return; + const l = v.sanitizeText(r, F()); + f[l] = { + id: l, + type: h, + label: l, + cssClasses: [], + methods: [], + members: [], + annotations: [], + domId: ie + l + "-" + we + }, we++; +}, Ve = function(e) { + const n = v.sanitizeText(e, F()); + if (n in f) + return f[n].domId; + throw new Error("Class not found: " + n); +}, it = function() { + _e = [], f = {}, te = [], z = [], z.push(Me), x = {}, Be = 0, et(); +}, nt = function(e) { + return f[e]; +}, ut = function() { + return f; +}, rt = function() { + return _e; +}, at = function() { + return te; +}, lt = function(e) { + tt.debug("Adding relation: " + JSON.stringify(e)), se(e.id1), se(e.id2), e.id1 = P(e.id1).className, e.id2 = P(e.id2).className, e.relationTitle1 = v.sanitizeText( + e.relationTitle1.trim(), + F() + ), e.relationTitle2 = v.sanitizeText( + e.relationTitle2.trim(), + F() + ), _e.push(e); +}, ct = function(e, n) { + const r = P(e).className; + f[r].annotations.push(n); +}, Ge = function(e, n) { + se(e); + const r = P(e).className, h = f[r]; + if (typeof n == "string") { + const l = n.trim(); + l.startsWith("<<") && l.endsWith(">>") ? h.annotations.push(R(l.substring(2, l.length - 2))) : l.indexOf(")") > 0 ? h.methods.push(new Re(l, "method")) : l && h.members.push(new Re(l, "attribute")); + } +}, ot = function(e, n) { + Array.isArray(n) && (n.reverse(), n.forEach((r) => Ge(e, r))); +}, ht = function(e, n) { + const r = { + id: `note${te.length}`, + class: n, + text: e + }; + te.push(r); +}, At = function(e) { + return e.startsWith(":") && (e = e.substring(1)), R(e.trim()); +}, Se = function(e, n) { + e.split(",").forEach(function(r) { + let h = r; + r[0].match(/\d/) && (h = ie + h), f[h] !== void 0 && f[h].cssClasses.push(n); + }); +}, pt = function(e, n) { + e.split(",").forEach(function(r) { + n !== void 0 && (f[r].tooltip = R(n)); + }); +}, ft = function(e, n) { + return n ? x[n].classes[e].tooltip : f[e].tooltip; +}, dt = function(e, n, r) { + const h = F(); + e.split(",").forEach(function(l) { + let A = l; + l[0].match(/\d/) && (A = ie + A), f[A] !== void 0 && (f[A].link = Pe.formatUrl(n, h), h.securityLevel === "sandbox" ? f[A].linkTarget = "_top" : typeof r == "string" ? f[A].linkTarget = R(r) : f[A].linkTarget = "_blank"); + }), Se(e, "clickable"); +}, Et = function(e, n, r) { + e.split(",").forEach(function(h) { + Ct(h, n, r), f[h].haveCallback = !0; + }), Se(e, "clickable"); +}, Ct = function(e, n, r) { + const h = v.sanitizeText(e, F()); + if (F().securityLevel !== "loose" || n === void 0) + return; + const A = h; + if (f[A] !== void 0) { + const g = Ve(A); + let D = []; + if (typeof r == "string") { + D = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let B = 0; B < D.length; B++) { + let _ = D[B].trim(); + _.charAt(0) === '"' && _.charAt(_.length - 1) === '"' && (_ = _.substr(1, _.length - 2)), D[B] = _; + } + } + D.length === 0 && D.push(g), z.push(function() { + const B = document.querySelector(`[id="${g}"]`); + B !== null && B.addEventListener( + "click", + function() { + Pe.runFunc(n, ...D); + }, + !1 + ); + }); + } +}, mt = function(e) { + z.forEach(function(n) { + n(e); + }); +}, bt = { + LINE: 0, + DOTTED_LINE: 1 +}, gt = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3, + LOLLIPOP: 4 +}, Me = function(e) { + let n = U(".mermaidTooltip"); + (n._groups || n)[0][0] === null && (n = U("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), U(e).select("svg").selectAll("g.node").on("mouseover", function() { + const l = U(this); + if (l.attr("title") === null) + return; + const g = this.getBoundingClientRect(); + n.transition().duration(200).style("opacity", ".9"), n.text(l.attr("title")).style("left", window.scrollX + g.left + (g.right - g.left) / 2 + "px").style("top", window.scrollY + g.top - 14 + document.body.scrollTop + "px"), n.html(n.html().replace(/<br\/>/g, "
")), l.classed("hover", !0); + }).on("mouseout", function() { + n.transition().duration(500).style("opacity", 0), U(this).classed("hover", !1); + }); +}; +z.push(Me); +let Ue = "TB"; +const kt = () => Ue, Tt = (e) => { + Ue = e; +}, Ft = function(e) { + x[e] === void 0 && (x[e] = { + id: e, + classes: {}, + children: {}, + domId: ie + e + "-" + Be + }, Be++); +}, yt = function(e) { + return x[e]; +}, Dt = function() { + return x; +}, Bt = function(e, n) { + x[e] !== void 0 && n.map((r) => { + f[r].parent = e, x[e].classes[r] = f[r]; + }); +}, vt = { + setAccTitle: We, + getAccTitle: qe, + getAccDescription: He, + setAccDescription: Je, + getConfig: () => F().class, + addClass: se, + bindFunctions: mt, + clear: it, + getClass: nt, + getClasses: ut, + getNotes: at, + addAnnotation: ct, + addNote: ht, + getRelations: rt, + addRelation: lt, + getDirection: kt, + setDirection: Tt, + addMember: Ge, + addMembers: ot, + cleanupLabel: At, + lineType: bt, + relationType: gt, + setClickEvent: Et, + setCssClass: Se, + setLink: dt, + getTooltip: ft, + setTooltip: pt, + lookUpDomId: Ve, + setDiagramTitle: Ze, + getDiagramTitle: $e, + setClassLabel: st, + addNamespace: Ft, + addClassesToNamespace: Bt, + getNamespace: yt, + getNamespaces: Dt +}, _t = (e) => `g.classGroup text { + fill: ${e.nodeBorder}; + fill: ${e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} +`, Lt = _t; +export { + vt as d, + Nt as p, + Lt as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-6e7f2b1b.js b/webroot/js/node_modules/mermaid/dist/styles-6e7f2b1b.js new file mode 100644 index 0000000..71ae6fd --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-6e7f2b1b.js @@ -0,0 +1,1446 @@ +import { d as sanitizeText$1, c as getConfig, G as parseGenericTypes, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, B as setDiagramTitle, D as getDiagramTitle, f as common, E as clear$1, l as log, z as utils, j as d3select } from "./mermaid-491db2d9.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 16], $V1 = [1, 17], $V2 = [1, 18], $V3 = [1, 37], $V4 = [1, 38], $V5 = [1, 24], $V6 = [1, 22], $V7 = [1, 23], $V8 = [1, 29], $V9 = [1, 30], $Va = [1, 31], $Vb = [1, 32], $Vc = [1, 33], $Vd = [1, 34], $Ve = [1, 25], $Vf = [1, 26], $Vg = [1, 27], $Vh = [1, 28], $Vi = [1, 42], $Vj = [1, 39], $Vk = [1, 40], $Vl = [1, 41], $Vm = [1, 43], $Vn = [1, 9], $Vo = [1, 8, 9], $Vp = [1, 54], $Vq = [1, 55], $Vr = [1, 56], $Vs = [1, 57], $Vt = [1, 58], $Vu = [1, 59], $Vv = [1, 60], $Vw = [1, 8, 9, 38], $Vx = [1, 71], $Vy = [1, 8, 9, 12, 13, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], $Vz = [1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 45, 58, 59, 60, 61, 62, 63, 64, 69, 71, 84, 86, 87, 88, 89], $VA = [13, 84, 86, 87, 88, 89], $VB = [13, 63, 64, 84, 86, 87, 88, 89], $VC = [13, 58, 59, 60, 61, 62, 84, 86, 87, 88, 89], $VD = [1, 90], $VE = [1, 8, 9, 36, 38, 41], $VF = [1, 8, 9, 21]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "cssClassStatement": 27, "noteStatement": 28, "direction": 29, "acc_title": 30, "acc_title_value": 31, "acc_descr": 32, "acc_descr_value": 33, "acc_descr_multiline_value": 34, "namespaceIdentifier": 35, "STRUCT_START": 36, "classStatements": 37, "STRUCT_STOP": 38, "NAMESPACE": 39, "classIdentifier": 40, "STYLE_SEPARATOR": 41, "members": 42, "CLASS": 43, "ANNOTATION_START": 44, "ANNOTATION_END": 45, "MEMBER": 46, "SEPARATOR": 47, "relation": 48, "NOTE_FOR": 49, "noteText": 50, "NOTE": 51, "direction_tb": 52, "direction_bt": 53, "direction_rl": 54, "direction_lr": 55, "relationType": 56, "lineType": 57, "AGGREGATION": 58, "EXTENSION": 59, "COMPOSITION": 60, "DEPENDENCY": 61, "LOLLIPOP": 62, "LINE": 63, "DOTTED_LINE": 64, "CALLBACK": 65, "LINK": 66, "LINK_TARGET": 67, "CLICK": 68, "CALLBACK_NAME": 69, "CALLBACK_ARGS": 70, "HREF": 71, "CSSCLASS": 72, "commentToken": 73, "textToken": 74, "graphCodeTokens": 75, "textNoTagsToken": 76, "TAGSTART": 77, "TAGEND": 78, "==": 79, "--": 80, "PCT": 81, "DEFAULT": 82, "SPACE": 83, "MINUS": 84, "keywords": 85, "UNICODE_TEXT": 86, "NUM": 87, "ALPHA": 88, "BQUOTE_STR": 89, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 30: "acc_title", 31: "acc_title_value", 32: "acc_descr", 33: "acc_descr_value", 34: "acc_descr_multiline_value", 36: "STRUCT_START", 38: "STRUCT_STOP", 39: "NAMESPACE", 41: "STYLE_SEPARATOR", 43: "CLASS", 44: "ANNOTATION_START", 45: "ANNOTATION_END", 46: "MEMBER", 47: "SEPARATOR", 49: "NOTE_FOR", 51: "NOTE", 52: "direction_tb", 53: "direction_bt", 54: "direction_rl", 55: "direction_lr", 58: "AGGREGATION", 59: "EXTENSION", 60: "COMPOSITION", 61: "DEPENDENCY", 62: "LOLLIPOP", 63: "LINE", 64: "DOTTED_LINE", 65: "CALLBACK", 66: "LINK", 67: "LINK_TARGET", 68: "CLICK", 69: "CALLBACK_NAME", 70: "CALLBACK_ARGS", 71: "HREF", 72: "CSSCLASS", 75: "graphCodeTokens", 77: "TAGSTART", 78: "TAGEND", 79: "==", 80: "--", 81: "PCT", 82: "DEFAULT", 83: "SPACE", 84: "MINUS", 85: "keywords", 86: "UNICODE_TEXT", 87: "NUM", 88: "ALPHA", 89: "BQUOTE_STR" }, + productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [35, 2], [37, 1], [37, 2], [37, 3], [23, 1], [23, 3], [23, 4], [23, 6], [40, 2], [40, 3], [25, 4], [42, 1], [42, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [28, 3], [28, 2], [29, 1], [29, 1], [29, 1], [29, 1], [48, 3], [48, 2], [48, 2], [48, 1], [56, 1], [56, 1], [56, 1], [56, 1], [56, 1], [57, 1], [57, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [73, 1], [73, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [76, 1], [76, 1], [76, 1], [76, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [50, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 8: + this.$ = $$[$0 - 1]; + break; + case 9: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 10: + case 13: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 14: + case 15: + this.$ = $$[$0 - 1] + "~" + $$[$0] + "~"; + break; + case 16: + yy.addRelation($$[$0]); + break; + case 17: + $$[$0 - 1].title = yy.cleanupLabel($$[$0]); + yy.addRelation($$[$0 - 1]); + break; + case 26: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 27: + case 28: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 29: + yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]); + break; + case 30: + yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]); + break; + case 31: + this.$ = $$[$0]; + yy.addNamespace($$[$0]); + break; + case 32: + this.$ = [$$[$0]]; + break; + case 33: + this.$ = [$$[$0 - 1]]; + break; + case 34: + $$[$0].unshift($$[$0 - 2]); + this.$ = $$[$0]; + break; + case 36: + yy.setCssClass($$[$0 - 2], $$[$0]); + break; + case 37: + yy.addMembers($$[$0 - 3], $$[$0 - 1]); + break; + case 38: + yy.setCssClass($$[$0 - 5], $$[$0 - 3]); + yy.addMembers($$[$0 - 5], $$[$0 - 1]); + break; + case 39: + this.$ = $$[$0]; + yy.addClass($$[$0]); + break; + case 40: + this.$ = $$[$0 - 1]; + yy.addClass($$[$0 - 1]); + yy.setClassLabel($$[$0 - 1], $$[$0]); + break; + case 41: + yy.addAnnotation($$[$0], $$[$0 - 2]); + break; + case 42: + this.$ = [$$[$0]]; + break; + case 43: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 44: + break; + case 45: + yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0])); + break; + case 46: + break; + case 47: + break; + case 48: + this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" }; + break; + case 49: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" }; + break; + case 50: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] }; + break; + case 51: + this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] }; + break; + case 52: + yy.addNote($$[$0], $$[$0 - 1]); + break; + case 53: + yy.addNote($$[$0]); + break; + case 54: + yy.setDirection("TB"); + break; + case 55: + yy.setDirection("BT"); + break; + case 56: + yy.setDirection("RL"); + break; + case 57: + yy.setDirection("LR"); + break; + case 58: + this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 59: + this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 60: + this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] }; + break; + case 61: + this.$ = { type1: "none", type2: "none", lineType: $$[$0] }; + break; + case 62: + this.$ = yy.relationType.AGGREGATION; + break; + case 63: + this.$ = yy.relationType.EXTENSION; + break; + case 64: + this.$ = yy.relationType.COMPOSITION; + break; + case 65: + this.$ = yy.relationType.DEPENDENCY; + break; + case 66: + this.$ = yy.relationType.LOLLIPOP; + break; + case 67: + this.$ = yy.lineType.LINE; + break; + case 68: + this.$ = yy.lineType.DOTTED_LINE; + break; + case 69: + case 75: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 70: + case 76: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 71: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 72: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 73: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 74: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 3], $$[$0 - 1]); + break; + case 77: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 78: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 79: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 80: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 81: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 82: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 4], $$[$0 - 1]); + break; + case 83: + yy.setCssClass($$[$0 - 1], $$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: $V0, 32: $V1, 34: $V2, 35: 20, 39: $V3, 40: 21, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vn, [2, 5], { 8: [1, 44] }), { 8: [1, 45] }, o($Vo, [2, 16], { 21: [1, 46] }), o($Vo, [2, 18]), o($Vo, [2, 19]), o($Vo, [2, 20]), o($Vo, [2, 21]), o($Vo, [2, 22]), o($Vo, [2, 23]), o($Vo, [2, 24]), o($Vo, [2, 25]), { 31: [1, 47] }, { 33: [1, 48] }, o($Vo, [2, 28]), o($Vo, [2, 44], { 48: 49, 56: 52, 57: 53, 13: [1, 50], 21: [1, 51], 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv }), { 36: [1, 61] }, o($Vw, [2, 35], { 36: [1, 63], 41: [1, 62] }), o($Vo, [2, 46]), o($Vo, [2, 47]), { 16: 64, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 16: 35, 17: 65, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 16: 35, 17: 66, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 16: 35, 17: 67, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: [1, 68] }, { 16: 35, 17: 69, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: $Vx, 50: 70 }, o($Vo, [2, 54]), o($Vo, [2, 55]), o($Vo, [2, 56]), o($Vo, [2, 57]), o($Vy, [2, 11], { 16: 35, 18: 36, 17: 72, 19: [1, 73], 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }), o($Vy, [2, 12], { 19: [1, 74] }), { 15: 75, 16: 76, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 16: 35, 17: 77, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vz, [2, 97]), o($Vz, [2, 98]), o($Vz, [2, 99]), o($Vz, [2, 100]), o([1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], [2, 101]), o($Vn, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 17: 19, 35: 20, 40: 21, 16: 35, 18: 36, 5: 78, 30: $V0, 32: $V1, 34: $V2, 39: $V3, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }), { 5: 79, 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: $V0, 32: $V1, 34: $V2, 35: 20, 39: $V3, 40: 21, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vo, [2, 17]), o($Vo, [2, 26]), o($Vo, [2, 27]), { 13: [1, 81], 16: 35, 17: 80, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 48: 82, 56: 52, 57: 53, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv }, o($Vo, [2, 45]), { 57: 83, 63: $Vu, 64: $Vv }, o($VA, [2, 61], { 56: 84, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt }), o($VB, [2, 62]), o($VB, [2, 63]), o($VB, [2, 64]), o($VB, [2, 65]), o($VB, [2, 66]), o($VC, [2, 67]), o($VC, [2, 68]), { 8: [1, 86], 23: 87, 37: 85, 40: 21, 43: $V4 }, { 16: 88, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 42: 89, 46: $VD }, { 45: [1, 91] }, { 13: [1, 92] }, { 13: [1, 93] }, { 69: [1, 94], 71: [1, 95] }, { 16: 96, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 13: $Vx, 50: 97 }, o($Vo, [2, 53]), o($Vo, [2, 102]), o($Vy, [2, 13]), o($Vy, [2, 14]), o($Vy, [2, 15]), { 36: [2, 31] }, { 15: 98, 16: 76, 36: [2, 9], 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, o($VE, [2, 39], { 11: 99, 12: [1, 100] }), o($Vn, [2, 7]), { 9: [1, 101] }, o($VF, [2, 48]), { 16: 35, 17: 102, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: [1, 104], 16: 35, 17: 103, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($VA, [2, 60], { 56: 105, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt }), o($VA, [2, 59]), { 38: [1, 106] }, { 23: 87, 37: 107, 40: 21, 43: $V4 }, { 8: [1, 108], 38: [2, 32] }, o($Vw, [2, 36], { 36: [1, 109] }), { 38: [1, 110] }, { 38: [2, 42], 42: 111, 46: $VD }, { 16: 35, 17: 112, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vo, [2, 69], { 13: [1, 113] }), o($Vo, [2, 71], { 13: [1, 115], 67: [1, 114] }), o($Vo, [2, 75], { 13: [1, 116], 70: [1, 117] }), { 13: [1, 118] }, o($Vo, [2, 83]), o($Vo, [2, 52]), { 36: [2, 10] }, o($VE, [2, 40]), { 13: [1, 119] }, { 1: [2, 4] }, o($VF, [2, 50]), o($VF, [2, 49]), { 16: 35, 17: 120, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($VA, [2, 58]), o($Vo, [2, 29]), { 38: [1, 121] }, { 23: 87, 37: 122, 38: [2, 33], 40: 21, 43: $V4 }, { 42: 123, 46: $VD }, o($Vw, [2, 37]), { 38: [2, 43] }, o($Vo, [2, 41]), o($Vo, [2, 70]), o($Vo, [2, 72]), o($Vo, [2, 73], { 67: [1, 124] }), o($Vo, [2, 76]), o($Vo, [2, 77], { 13: [1, 125] }), o($Vo, [2, 79], { 13: [1, 127], 67: [1, 126] }), { 14: [1, 128] }, o($VF, [2, 51]), o($Vo, [2, 30]), { 38: [2, 34] }, { 38: [1, 129] }, o($Vo, [2, 74]), o($Vo, [2, 78]), o($Vo, [2, 80]), o($Vo, [2, 81], { 67: [1, 130] }), o($VE, [2, 8]), o($Vw, [2, 38]), o($Vo, [2, 82])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 75: [2, 31], 98: [2, 10], 101: [2, 4], 111: [2, 43], 122: [2, 34] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 52; + case 1: + return 53; + case 2: + return 54; + case 3: + return 55; + case 4: + break; + case 5: + break; + case 6: + this.begin("acc_title"); + return 30; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 32; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 8; + case 14: + break; + case 15: + return 7; + case 16: + return 7; + case 17: + return "EDGE_STATE"; + case 18: + this.begin("callback_name"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callback_args"); + break; + case 21: + return 69; + case 22: + this.popState(); + break; + case 23: + return 70; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("string"); + break; + case 27: + this.begin("namespace"); + return 39; + case 28: + this.popState(); + return 8; + case 29: + break; + case 30: + this.begin("namespace-body"); + return 36; + case 31: + this.popState(); + return 38; + case 32: + return "EOF_IN_STRUCT"; + case 33: + return 8; + case 34: + break; + case 35: + return "EDGE_STATE"; + case 36: + this.begin("class"); + return 43; + case 37: + this.popState(); + return 8; + case 38: + break; + case 39: + this.popState(); + this.popState(); + return 38; + case 40: + this.begin("class-body"); + return 36; + case 41: + this.popState(); + return 38; + case 42: + return "EOF_IN_STRUCT"; + case 43: + return "EDGE_STATE"; + case 44: + return "OPEN_IN_STRUCT"; + case 45: + break; + case 46: + return "MEMBER"; + case 47: + return 72; + case 48: + return 65; + case 49: + return 66; + case 50: + return 68; + case 51: + return 49; + case 52: + return 51; + case 53: + return 44; + case 54: + return 45; + case 55: + return 71; + case 56: + this.popState(); + break; + case 57: + return "GENERICTYPE"; + case 58: + this.begin("generic"); + break; + case 59: + this.popState(); + break; + case 60: + return "BQUOTE_STR"; + case 61: + this.begin("bqstring"); + break; + case 62: + return 67; + case 63: + return 67; + case 64: + return 67; + case 65: + return 67; + case 66: + return 59; + case 67: + return 59; + case 68: + return 61; + case 69: + return 61; + case 70: + return 60; + case 71: + return 58; + case 72: + return 62; + case 73: + return 63; + case 74: + return 64; + case 75: + return 21; + case 76: + return 41; + case 77: + return 84; + case 78: + return "DOT"; + case 79: + return "PLUS"; + case 80: + return 81; + case 81: + return "EQUALS"; + case 82: + return "EQUALS"; + case 83: + return 88; + case 84: + return 12; + case 85: + return 14; + case 86: + return "PUNCTUATION"; + case 87: + return 87; + case 88: + return 86; + case 89: + return 83; + case 90: + return 9; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:$)/], + conditions: { "namespace-body": { "rules": [26, 31, 32, 33, 34, 35, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "namespace": { "rules": [26, 27, 28, 29, 30, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "class-body": { "rules": [26, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "class": { "rules": [26, 37, 38, 39, 40, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_descr": { "rules": [9, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_title": { "rules": [7, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "href": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "struct": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "generic": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "bqstring": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "string": { "rules": [24, 25, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const visibilityValues = ["#", "+", "~", "-", ""]; +class ClassMember { + constructor(input, memberType) { + this.memberType = memberType; + this.visibility = ""; + this.classifier = ""; + const sanitizedInput = sanitizeText$1(input, getConfig()); + this.parseMember(sanitizedInput); + } + getDisplayDetails() { + let displayText = this.visibility + parseGenericTypes(this.id); + if (this.memberType === "method") { + displayText += `(${parseGenericTypes(this.parameters.trim())})`; + if (this.returnType) { + displayText += " : " + parseGenericTypes(this.returnType); + } + } + displayText = displayText.trim(); + const cssStyle = this.parseClassifier(); + return { + displayText, + cssStyle + }; + } + parseMember(input) { + let potentialClassifier = ""; + if (this.memberType === "method") { + const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/; + const match = input.match(methodRegEx); + if (match) { + const detectedVisibility = match[1] ? match[1].trim() : ""; + if (visibilityValues.includes(detectedVisibility)) { + this.visibility = detectedVisibility; + } + this.id = match[2].trim(); + this.parameters = match[3] ? match[3].trim() : ""; + potentialClassifier = match[4] ? match[4].trim() : ""; + this.returnType = match[5] ? match[5].trim() : ""; + if (potentialClassifier === "") { + const lastChar = this.returnType.substring(this.returnType.length - 1); + if (lastChar.match(/[$*]/)) { + potentialClassifier = lastChar; + this.returnType = this.returnType.substring(0, this.returnType.length - 1); + } + } + } + } else { + const length = input.length; + const firstChar = input.substring(0, 1); + const lastChar = input.substring(length - 1); + if (visibilityValues.includes(firstChar)) { + this.visibility = firstChar; + } + if (lastChar.match(/[*?]/)) { + potentialClassifier = lastChar; + } + this.id = input.substring( + this.visibility === "" ? 0 : 1, + potentialClassifier === "" ? length : length - 1 + ); + } + this.classifier = potentialClassifier; + } + parseClassifier() { + switch (this.classifier) { + case "*": + return "font-style:italic;"; + case "$": + return "text-decoration:underline;"; + default: + return ""; + } + } +} +const MERMAID_DOM_ID_PREFIX = "classId-"; +let relations = []; +let classes = {}; +let notes = []; +let classCounter = 0; +let namespaces = {}; +let namespaceCounter = 0; +let functions = []; +const sanitizeText = (txt) => common.sanitizeText(txt, getConfig()); +const splitClassNameAndType = function(_id) { + const id = common.sanitizeText(_id, getConfig()); + let genericType = ""; + let className = id; + if (id.indexOf("~") > 0) { + const split = id.split("~"); + className = sanitizeText(split[0]); + genericType = sanitizeText(split[1]); + } + return { className, type: genericType }; +}; +const setClassLabel = function(_id, label) { + const id = common.sanitizeText(_id, getConfig()); + if (label) { + label = sanitizeText(label); + } + const { className } = splitClassNameAndType(id); + classes[className].label = label; +}; +const addClass = function(_id) { + const id = common.sanitizeText(_id, getConfig()); + const { className, type } = splitClassNameAndType(id); + if (Object.hasOwn(classes, className)) { + return; + } + const name = common.sanitizeText(className, getConfig()); + classes[name] = { + id: name, + type, + label: name, + cssClasses: [], + methods: [], + members: [], + annotations: [], + domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter + }; + classCounter++; +}; +const lookUpDomId = function(_id) { + const id = common.sanitizeText(_id, getConfig()); + if (id in classes) { + return classes[id].domId; + } + throw new Error("Class not found: " + id); +}; +const clear = function() { + relations = []; + classes = {}; + notes = []; + functions = []; + functions.push(setupToolTips); + namespaces = {}; + namespaceCounter = 0; + clear$1(); +}; +const getClass = function(id) { + return classes[id]; +}; +const getClasses = function() { + return classes; +}; +const getRelations = function() { + return relations; +}; +const getNotes = function() { + return notes; +}; +const addRelation = function(relation) { + log.debug("Adding relation: " + JSON.stringify(relation)); + addClass(relation.id1); + addClass(relation.id2); + relation.id1 = splitClassNameAndType(relation.id1).className; + relation.id2 = splitClassNameAndType(relation.id2).className; + relation.relationTitle1 = common.sanitizeText( + relation.relationTitle1.trim(), + getConfig() + ); + relation.relationTitle2 = common.sanitizeText( + relation.relationTitle2.trim(), + getConfig() + ); + relations.push(relation); +}; +const addAnnotation = function(className, annotation) { + const validatedClassName = splitClassNameAndType(className).className; + classes[validatedClassName].annotations.push(annotation); +}; +const addMember = function(className, member) { + addClass(className); + const validatedClassName = splitClassNameAndType(className).className; + const theClass = classes[validatedClassName]; + if (typeof member === "string") { + const memberString = member.trim(); + if (memberString.startsWith("<<") && memberString.endsWith(">>")) { + theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2))); + } else if (memberString.indexOf(")") > 0) { + theClass.methods.push(new ClassMember(memberString, "method")); + } else if (memberString) { + theClass.members.push(new ClassMember(memberString, "attribute")); + } + } +}; +const addMembers = function(className, members) { + if (Array.isArray(members)) { + members.reverse(); + members.forEach((member) => addMember(className, member)); + } +}; +const addNote = function(text, className) { + const note = { + id: `note${notes.length}`, + class: className, + text + }; + notes.push(note); +}; +const cleanupLabel = function(label) { + if (label.startsWith(":")) { + label = label.substring(1); + } + return sanitizeText(label.trim()); +}; +const setCssClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].cssClasses.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + classes[id].tooltip = sanitizeText(tooltip); + } + }); +}; +const getTooltip = function(id, namespace) { + if (namespace) { + return namespaces[namespace].classes[id].tooltip; + } + return classes[id].tooltip; +}; +const setLink = function(ids, linkStr, target) { + const config = getConfig(); + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].link = utils.formatUrl(linkStr, config); + if (config.securityLevel === "sandbox") { + classes[id].linkTarget = "_top"; + } else if (typeof target === "string") { + classes[id].linkTarget = sanitizeText(target); + } else { + classes[id].linkTarget = "_blank"; + } + } + }); + setCssClass(ids, "clickable"); +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFunc(id, functionName, functionArgs); + classes[id].haveCallback = true; + }); + setCssClass(ids, "clickable"); +}; +const setClickFunc = function(_domId, functionName, functionArgs) { + const domId = common.sanitizeText(_domId, getConfig()); + const config = getConfig(); + if (config.securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + const id = domId; + if (classes[id] !== void 0) { + const elemId = lookUpDomId(id); + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(elemId); + } + functions.push(function() { + const elem = document.querySelector(`[id="${elemId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const bindFunctions = function(element) { + functions.forEach(function(fun) { + fun(element); + }); +}; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3, + LOLLIPOP: 4 +}; +const setupToolTips = function(element) { + let tooltipElem = d3select(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = d3select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = d3select(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = d3select(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = d3select(this); + el.classed("hover", false); + }); +}; +functions.push(setupToolTips); +let direction = "TB"; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const addNamespace = function(id) { + if (namespaces[id] !== void 0) { + return; + } + namespaces[id] = { + id, + classes: {}, + children: {}, + domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter + }; + namespaceCounter++; +}; +const getNamespace = function(name) { + return namespaces[name]; +}; +const getNamespaces = function() { + return namespaces; +}; +const addClassesToNamespace = function(id, classNames) { + if (namespaces[id] !== void 0) { + classNames.map((className) => { + classes[className].parent = id; + namespaces[id].classes[className] = classes[className]; + }); + } +}; +const db = { + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + getConfig: () => getConfig().class, + addClass, + bindFunctions, + clear, + getClass, + getClasses, + getNotes, + addAnnotation, + addNote, + getRelations, + addRelation, + getDirection, + setDirection, + addMember, + addMembers, + cleanupLabel, + lineType, + relationType, + setClickEvent, + setCssClass, + setLink, + getTooltip, + setTooltip, + lookUpDomId, + setDiagramTitle, + getDiagramTitle, + setClassLabel, + addNamespace, + addClassesToNamespace, + getNamespace, + getNamespaces +}; +const getStyles = (options) => `g.classGroup text { + fill: ${options.nodeBorder}; + fill: ${options.classText}; + stroke: none; + font-family: ${options.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${options.classText}; +} +.edgeLabel .label rect { + fill: ${options.mainBkg}; +} +.label text { + fill: ${options.classText}; +} +.edgeLabel .label span { + background: ${options.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.classGroup line { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${options.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${options.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; +export { + db as d, + parser$1 as p, + styles as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-8b67d7cb.js b/webroot/js/node_modules/mermaid/dist/styles-8b67d7cb.js new file mode 100644 index 0000000..1b9c43d --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-8b67d7cb.js @@ -0,0 +1,1447 @@ +import { select } from "d3"; +import { d as sanitizeText$1, c as getConfig, v as parseGenericTypes, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, q as setDiagramTitle, r as getDiagramTitle, e as common, t as clear$1, l as log, u as utils } from "./mermaid-0d192ec3.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 16], $V1 = [1, 17], $V2 = [1, 18], $V3 = [1, 37], $V4 = [1, 38], $V5 = [1, 24], $V6 = [1, 22], $V7 = [1, 23], $V8 = [1, 29], $V9 = [1, 30], $Va = [1, 31], $Vb = [1, 32], $Vc = [1, 33], $Vd = [1, 34], $Ve = [1, 25], $Vf = [1, 26], $Vg = [1, 27], $Vh = [1, 28], $Vi = [1, 42], $Vj = [1, 39], $Vk = [1, 40], $Vl = [1, 41], $Vm = [1, 43], $Vn = [1, 9], $Vo = [1, 8, 9], $Vp = [1, 54], $Vq = [1, 55], $Vr = [1, 56], $Vs = [1, 57], $Vt = [1, 58], $Vu = [1, 59], $Vv = [1, 60], $Vw = [1, 8, 9, 38], $Vx = [1, 71], $Vy = [1, 8, 9, 12, 13, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], $Vz = [1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 45, 58, 59, 60, 61, 62, 63, 64, 69, 71, 84, 86, 87, 88, 89], $VA = [13, 84, 86, 87, 88, 89], $VB = [13, 63, 64, 84, 86, 87, 88, 89], $VC = [13, 58, 59, 60, 61, 62, 84, 86, 87, 88, 89], $VD = [1, 90], $VE = [1, 8, 9, 36, 38, 41], $VF = [1, 8, 9, 21]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "cssClassStatement": 27, "noteStatement": 28, "direction": 29, "acc_title": 30, "acc_title_value": 31, "acc_descr": 32, "acc_descr_value": 33, "acc_descr_multiline_value": 34, "namespaceIdentifier": 35, "STRUCT_START": 36, "classStatements": 37, "STRUCT_STOP": 38, "NAMESPACE": 39, "classIdentifier": 40, "STYLE_SEPARATOR": 41, "members": 42, "CLASS": 43, "ANNOTATION_START": 44, "ANNOTATION_END": 45, "MEMBER": 46, "SEPARATOR": 47, "relation": 48, "NOTE_FOR": 49, "noteText": 50, "NOTE": 51, "direction_tb": 52, "direction_bt": 53, "direction_rl": 54, "direction_lr": 55, "relationType": 56, "lineType": 57, "AGGREGATION": 58, "EXTENSION": 59, "COMPOSITION": 60, "DEPENDENCY": 61, "LOLLIPOP": 62, "LINE": 63, "DOTTED_LINE": 64, "CALLBACK": 65, "LINK": 66, "LINK_TARGET": 67, "CLICK": 68, "CALLBACK_NAME": 69, "CALLBACK_ARGS": 70, "HREF": 71, "CSSCLASS": 72, "commentToken": 73, "textToken": 74, "graphCodeTokens": 75, "textNoTagsToken": 76, "TAGSTART": 77, "TAGEND": 78, "==": 79, "--": 80, "PCT": 81, "DEFAULT": 82, "SPACE": 83, "MINUS": 84, "keywords": 85, "UNICODE_TEXT": 86, "NUM": 87, "ALPHA": 88, "BQUOTE_STR": 89, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 30: "acc_title", 31: "acc_title_value", 32: "acc_descr", 33: "acc_descr_value", 34: "acc_descr_multiline_value", 36: "STRUCT_START", 38: "STRUCT_STOP", 39: "NAMESPACE", 41: "STYLE_SEPARATOR", 43: "CLASS", 44: "ANNOTATION_START", 45: "ANNOTATION_END", 46: "MEMBER", 47: "SEPARATOR", 49: "NOTE_FOR", 51: "NOTE", 52: "direction_tb", 53: "direction_bt", 54: "direction_rl", 55: "direction_lr", 58: "AGGREGATION", 59: "EXTENSION", 60: "COMPOSITION", 61: "DEPENDENCY", 62: "LOLLIPOP", 63: "LINE", 64: "DOTTED_LINE", 65: "CALLBACK", 66: "LINK", 67: "LINK_TARGET", 68: "CLICK", 69: "CALLBACK_NAME", 70: "CALLBACK_ARGS", 71: "HREF", 72: "CSSCLASS", 75: "graphCodeTokens", 77: "TAGSTART", 78: "TAGEND", 79: "==", 80: "--", 81: "PCT", 82: "DEFAULT", 83: "SPACE", 84: "MINUS", 85: "keywords", 86: "UNICODE_TEXT", 87: "NUM", 88: "ALPHA", 89: "BQUOTE_STR" }, + productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [35, 2], [37, 1], [37, 2], [37, 3], [23, 1], [23, 3], [23, 4], [23, 6], [40, 2], [40, 3], [25, 4], [42, 1], [42, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [28, 3], [28, 2], [29, 1], [29, 1], [29, 1], [29, 1], [48, 3], [48, 2], [48, 2], [48, 1], [56, 1], [56, 1], [56, 1], [56, 1], [56, 1], [57, 1], [57, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [73, 1], [73, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [76, 1], [76, 1], [76, 1], [76, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [50, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 8: + this.$ = $$[$0 - 1]; + break; + case 9: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 10: + case 13: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 14: + case 15: + this.$ = $$[$0 - 1] + "~" + $$[$0] + "~"; + break; + case 16: + yy.addRelation($$[$0]); + break; + case 17: + $$[$0 - 1].title = yy.cleanupLabel($$[$0]); + yy.addRelation($$[$0 - 1]); + break; + case 26: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 27: + case 28: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 29: + yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]); + break; + case 30: + yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]); + break; + case 31: + this.$ = $$[$0]; + yy.addNamespace($$[$0]); + break; + case 32: + this.$ = [$$[$0]]; + break; + case 33: + this.$ = [$$[$0 - 1]]; + break; + case 34: + $$[$0].unshift($$[$0 - 2]); + this.$ = $$[$0]; + break; + case 36: + yy.setCssClass($$[$0 - 2], $$[$0]); + break; + case 37: + yy.addMembers($$[$0 - 3], $$[$0 - 1]); + break; + case 38: + yy.setCssClass($$[$0 - 5], $$[$0 - 3]); + yy.addMembers($$[$0 - 5], $$[$0 - 1]); + break; + case 39: + this.$ = $$[$0]; + yy.addClass($$[$0]); + break; + case 40: + this.$ = $$[$0 - 1]; + yy.addClass($$[$0 - 1]); + yy.setClassLabel($$[$0 - 1], $$[$0]); + break; + case 41: + yy.addAnnotation($$[$0], $$[$0 - 2]); + break; + case 42: + this.$ = [$$[$0]]; + break; + case 43: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 44: + break; + case 45: + yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0])); + break; + case 46: + break; + case 47: + break; + case 48: + this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" }; + break; + case 49: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" }; + break; + case 50: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] }; + break; + case 51: + this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] }; + break; + case 52: + yy.addNote($$[$0], $$[$0 - 1]); + break; + case 53: + yy.addNote($$[$0]); + break; + case 54: + yy.setDirection("TB"); + break; + case 55: + yy.setDirection("BT"); + break; + case 56: + yy.setDirection("RL"); + break; + case 57: + yy.setDirection("LR"); + break; + case 58: + this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 59: + this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 60: + this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] }; + break; + case 61: + this.$ = { type1: "none", type2: "none", lineType: $$[$0] }; + break; + case 62: + this.$ = yy.relationType.AGGREGATION; + break; + case 63: + this.$ = yy.relationType.EXTENSION; + break; + case 64: + this.$ = yy.relationType.COMPOSITION; + break; + case 65: + this.$ = yy.relationType.DEPENDENCY; + break; + case 66: + this.$ = yy.relationType.LOLLIPOP; + break; + case 67: + this.$ = yy.lineType.LINE; + break; + case 68: + this.$ = yy.lineType.DOTTED_LINE; + break; + case 69: + case 75: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 70: + case 76: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 71: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 72: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 73: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 74: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 3], $$[$0 - 1]); + break; + case 77: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 78: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 79: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 80: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 81: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 82: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 4], $$[$0 - 1]); + break; + case 83: + yy.setCssClass($$[$0 - 1], $$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: $V0, 32: $V1, 34: $V2, 35: 20, 39: $V3, 40: 21, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vn, [2, 5], { 8: [1, 44] }), { 8: [1, 45] }, o($Vo, [2, 16], { 21: [1, 46] }), o($Vo, [2, 18]), o($Vo, [2, 19]), o($Vo, [2, 20]), o($Vo, [2, 21]), o($Vo, [2, 22]), o($Vo, [2, 23]), o($Vo, [2, 24]), o($Vo, [2, 25]), { 31: [1, 47] }, { 33: [1, 48] }, o($Vo, [2, 28]), o($Vo, [2, 44], { 48: 49, 56: 52, 57: 53, 13: [1, 50], 21: [1, 51], 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv }), { 36: [1, 61] }, o($Vw, [2, 35], { 36: [1, 63], 41: [1, 62] }), o($Vo, [2, 46]), o($Vo, [2, 47]), { 16: 64, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 16: 35, 17: 65, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 16: 35, 17: 66, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 16: 35, 17: 67, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: [1, 68] }, { 16: 35, 17: 69, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: $Vx, 50: 70 }, o($Vo, [2, 54]), o($Vo, [2, 55]), o($Vo, [2, 56]), o($Vo, [2, 57]), o($Vy, [2, 11], { 16: 35, 18: 36, 17: 72, 19: [1, 73], 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }), o($Vy, [2, 12], { 19: [1, 74] }), { 15: 75, 16: 76, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 16: 35, 17: 77, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vz, [2, 97]), o($Vz, [2, 98]), o($Vz, [2, 99]), o($Vz, [2, 100]), o([1, 8, 9, 12, 13, 19, 21, 36, 38, 41, 58, 59, 60, 61, 62, 63, 64, 69, 71], [2, 101]), o($Vn, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 17: 19, 35: 20, 40: 21, 16: 35, 18: 36, 5: 78, 30: $V0, 32: $V1, 34: $V2, 39: $V3, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }), { 5: 79, 10: 5, 16: 35, 17: 19, 18: 36, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: $V0, 32: $V1, 34: $V2, 35: 20, 39: $V3, 40: 21, 43: $V4, 44: $V5, 46: $V6, 47: $V7, 49: $V8, 51: $V9, 52: $Va, 53: $Vb, 54: $Vc, 55: $Vd, 65: $Ve, 66: $Vf, 68: $Vg, 72: $Vh, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vo, [2, 17]), o($Vo, [2, 26]), o($Vo, [2, 27]), { 13: [1, 81], 16: 35, 17: 80, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 48: 82, 56: 52, 57: 53, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv }, o($Vo, [2, 45]), { 57: 83, 63: $Vu, 64: $Vv }, o($VA, [2, 61], { 56: 84, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt }), o($VB, [2, 62]), o($VB, [2, 63]), o($VB, [2, 64]), o($VB, [2, 65]), o($VB, [2, 66]), o($VC, [2, 67]), o($VC, [2, 68]), { 8: [1, 86], 23: 87, 37: 85, 40: 21, 43: $V4 }, { 16: 88, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 42: 89, 46: $VD }, { 45: [1, 91] }, { 13: [1, 92] }, { 13: [1, 93] }, { 69: [1, 94], 71: [1, 95] }, { 16: 96, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, { 13: $Vx, 50: 97 }, o($Vo, [2, 53]), o($Vo, [2, 102]), o($Vy, [2, 13]), o($Vy, [2, 14]), o($Vy, [2, 15]), { 36: [2, 31] }, { 15: 98, 16: 76, 36: [2, 9], 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl }, o($VE, [2, 39], { 11: 99, 12: [1, 100] }), o($Vn, [2, 7]), { 9: [1, 101] }, o($VF, [2, 48]), { 16: 35, 17: 102, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, { 13: [1, 104], 16: 35, 17: 103, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($VA, [2, 60], { 56: 105, 58: $Vp, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt }), o($VA, [2, 59]), { 38: [1, 106] }, { 23: 87, 37: 107, 40: 21, 43: $V4 }, { 8: [1, 108], 38: [2, 32] }, o($Vw, [2, 36], { 36: [1, 109] }), { 38: [1, 110] }, { 38: [2, 42], 42: 111, 46: $VD }, { 16: 35, 17: 112, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($Vo, [2, 69], { 13: [1, 113] }), o($Vo, [2, 71], { 13: [1, 115], 67: [1, 114] }), o($Vo, [2, 75], { 13: [1, 116], 70: [1, 117] }), { 13: [1, 118] }, o($Vo, [2, 83]), o($Vo, [2, 52]), { 36: [2, 10] }, o($VE, [2, 40]), { 13: [1, 119] }, { 1: [2, 4] }, o($VF, [2, 50]), o($VF, [2, 49]), { 16: 35, 17: 120, 18: 36, 84: $Vi, 86: $Vj, 87: $Vk, 88: $Vl, 89: $Vm }, o($VA, [2, 58]), o($Vo, [2, 29]), { 38: [1, 121] }, { 23: 87, 37: 122, 38: [2, 33], 40: 21, 43: $V4 }, { 42: 123, 46: $VD }, o($Vw, [2, 37]), { 38: [2, 43] }, o($Vo, [2, 41]), o($Vo, [2, 70]), o($Vo, [2, 72]), o($Vo, [2, 73], { 67: [1, 124] }), o($Vo, [2, 76]), o($Vo, [2, 77], { 13: [1, 125] }), o($Vo, [2, 79], { 13: [1, 127], 67: [1, 126] }), { 14: [1, 128] }, o($VF, [2, 51]), o($Vo, [2, 30]), { 38: [2, 34] }, { 38: [1, 129] }, o($Vo, [2, 74]), o($Vo, [2, 78]), o($Vo, [2, 80]), o($Vo, [2, 81], { 67: [1, 130] }), o($VE, [2, 8]), o($Vw, [2, 38]), o($Vo, [2, 82])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 75: [2, 31], 98: [2, 10], 101: [2, 4], 111: [2, 43], 122: [2, 34] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 52; + case 1: + return 53; + case 2: + return 54; + case 3: + return 55; + case 4: + break; + case 5: + break; + case 6: + this.begin("acc_title"); + return 30; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 32; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 8; + case 14: + break; + case 15: + return 7; + case 16: + return 7; + case 17: + return "EDGE_STATE"; + case 18: + this.begin("callback_name"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callback_args"); + break; + case 21: + return 69; + case 22: + this.popState(); + break; + case 23: + return 70; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("string"); + break; + case 27: + this.begin("namespace"); + return 39; + case 28: + this.popState(); + return 8; + case 29: + break; + case 30: + this.begin("namespace-body"); + return 36; + case 31: + this.popState(); + return 38; + case 32: + return "EOF_IN_STRUCT"; + case 33: + return 8; + case 34: + break; + case 35: + return "EDGE_STATE"; + case 36: + this.begin("class"); + return 43; + case 37: + this.popState(); + return 8; + case 38: + break; + case 39: + this.popState(); + this.popState(); + return 38; + case 40: + this.begin("class-body"); + return 36; + case 41: + this.popState(); + return 38; + case 42: + return "EOF_IN_STRUCT"; + case 43: + return "EDGE_STATE"; + case 44: + return "OPEN_IN_STRUCT"; + case 45: + break; + case 46: + return "MEMBER"; + case 47: + return 72; + case 48: + return 65; + case 49: + return 66; + case 50: + return 68; + case 51: + return 49; + case 52: + return 51; + case 53: + return 44; + case 54: + return 45; + case 55: + return 71; + case 56: + this.popState(); + break; + case 57: + return "GENERICTYPE"; + case 58: + this.begin("generic"); + break; + case 59: + this.popState(); + break; + case 60: + return "BQUOTE_STR"; + case 61: + this.begin("bqstring"); + break; + case 62: + return 67; + case 63: + return 67; + case 64: + return 67; + case 65: + return 67; + case 66: + return 59; + case 67: + return 59; + case 68: + return 61; + case 69: + return 61; + case 70: + return 60; + case 71: + return 58; + case 72: + return 62; + case 73: + return 63; + case 74: + return 64; + case 75: + return 21; + case 76: + return 41; + case 77: + return 84; + case 78: + return "DOT"; + case 79: + return "PLUS"; + case 80: + return 81; + case 81: + return "EQUALS"; + case 82: + return "EQUALS"; + case 83: + return 88; + case 84: + return 12; + case 85: + return 14; + case 86: + return "PUNCTUATION"; + case 87: + return 87; + case 88: + return 86; + case 89: + return 83; + case 90: + return 9; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:$)/], + conditions: { "namespace-body": { "rules": [26, 31, 32, 33, 34, 35, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "namespace": { "rules": [26, 27, 28, 29, 30, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "class-body": { "rules": [26, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "class": { "rules": [26, 37, 38, 39, 40, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_descr": { "rules": [9, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "acc_title": { "rules": [7, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "href": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "struct": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "generic": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "bqstring": { "rules": [26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "string": { "rules": [24, 25, 26, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 36, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const visibilityValues = ["#", "+", "~", "-", ""]; +class ClassMember { + constructor(input, memberType) { + this.memberType = memberType; + this.visibility = ""; + this.classifier = ""; + const sanitizedInput = sanitizeText$1(input, getConfig()); + this.parseMember(sanitizedInput); + } + getDisplayDetails() { + let displayText = this.visibility + parseGenericTypes(this.id); + if (this.memberType === "method") { + displayText += `(${parseGenericTypes(this.parameters.trim())})`; + if (this.returnType) { + displayText += " : " + parseGenericTypes(this.returnType); + } + } + displayText = displayText.trim(); + const cssStyle = this.parseClassifier(); + return { + displayText, + cssStyle + }; + } + parseMember(input) { + let potentialClassifier = ""; + if (this.memberType === "method") { + const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/; + const match = input.match(methodRegEx); + if (match) { + const detectedVisibility = match[1] ? match[1].trim() : ""; + if (visibilityValues.includes(detectedVisibility)) { + this.visibility = detectedVisibility; + } + this.id = match[2].trim(); + this.parameters = match[3] ? match[3].trim() : ""; + potentialClassifier = match[4] ? match[4].trim() : ""; + this.returnType = match[5] ? match[5].trim() : ""; + if (potentialClassifier === "") { + const lastChar = this.returnType.substring(this.returnType.length - 1); + if (lastChar.match(/[$*]/)) { + potentialClassifier = lastChar; + this.returnType = this.returnType.substring(0, this.returnType.length - 1); + } + } + } + } else { + const length = input.length; + const firstChar = input.substring(0, 1); + const lastChar = input.substring(length - 1); + if (visibilityValues.includes(firstChar)) { + this.visibility = firstChar; + } + if (lastChar.match(/[*?]/)) { + potentialClassifier = lastChar; + } + this.id = input.substring( + this.visibility === "" ? 0 : 1, + potentialClassifier === "" ? length : length - 1 + ); + } + this.classifier = potentialClassifier; + } + parseClassifier() { + switch (this.classifier) { + case "*": + return "font-style:italic;"; + case "$": + return "text-decoration:underline;"; + default: + return ""; + } + } +} +const MERMAID_DOM_ID_PREFIX = "classId-"; +let relations = []; +let classes = {}; +let notes = []; +let classCounter = 0; +let namespaces = {}; +let namespaceCounter = 0; +let functions = []; +const sanitizeText = (txt) => common.sanitizeText(txt, getConfig()); +const splitClassNameAndType = function(_id) { + const id = common.sanitizeText(_id, getConfig()); + let genericType = ""; + let className = id; + if (id.indexOf("~") > 0) { + const split = id.split("~"); + className = sanitizeText(split[0]); + genericType = sanitizeText(split[1]); + } + return { className, type: genericType }; +}; +const setClassLabel = function(_id, label) { + const id = common.sanitizeText(_id, getConfig()); + if (label) { + label = sanitizeText(label); + } + const { className } = splitClassNameAndType(id); + classes[className].label = label; +}; +const addClass = function(_id) { + const id = common.sanitizeText(_id, getConfig()); + const { className, type } = splitClassNameAndType(id); + if (Object.hasOwn(classes, className)) { + return; + } + const name = common.sanitizeText(className, getConfig()); + classes[name] = { + id: name, + type, + label: name, + cssClasses: [], + methods: [], + members: [], + annotations: [], + domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter + }; + classCounter++; +}; +const lookUpDomId = function(_id) { + const id = common.sanitizeText(_id, getConfig()); + if (id in classes) { + return classes[id].domId; + } + throw new Error("Class not found: " + id); +}; +const clear = function() { + relations = []; + classes = {}; + notes = []; + functions = []; + functions.push(setupToolTips); + namespaces = {}; + namespaceCounter = 0; + clear$1(); +}; +const getClass = function(id) { + return classes[id]; +}; +const getClasses = function() { + return classes; +}; +const getRelations = function() { + return relations; +}; +const getNotes = function() { + return notes; +}; +const addRelation = function(relation) { + log.debug("Adding relation: " + JSON.stringify(relation)); + addClass(relation.id1); + addClass(relation.id2); + relation.id1 = splitClassNameAndType(relation.id1).className; + relation.id2 = splitClassNameAndType(relation.id2).className; + relation.relationTitle1 = common.sanitizeText( + relation.relationTitle1.trim(), + getConfig() + ); + relation.relationTitle2 = common.sanitizeText( + relation.relationTitle2.trim(), + getConfig() + ); + relations.push(relation); +}; +const addAnnotation = function(className, annotation) { + const validatedClassName = splitClassNameAndType(className).className; + classes[validatedClassName].annotations.push(annotation); +}; +const addMember = function(className, member) { + addClass(className); + const validatedClassName = splitClassNameAndType(className).className; + const theClass = classes[validatedClassName]; + if (typeof member === "string") { + const memberString = member.trim(); + if (memberString.startsWith("<<") && memberString.endsWith(">>")) { + theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2))); + } else if (memberString.indexOf(")") > 0) { + theClass.methods.push(new ClassMember(memberString, "method")); + } else if (memberString) { + theClass.members.push(new ClassMember(memberString, "attribute")); + } + } +}; +const addMembers = function(className, members) { + if (Array.isArray(members)) { + members.reverse(); + members.forEach((member) => addMember(className, member)); + } +}; +const addNote = function(text, className) { + const note = { + id: `note${notes.length}`, + class: className, + text + }; + notes.push(note); +}; +const cleanupLabel = function(label) { + if (label.startsWith(":")) { + label = label.substring(1); + } + return sanitizeText(label.trim()); +}; +const setCssClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].cssClasses.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + classes[id].tooltip = sanitizeText(tooltip); + } + }); +}; +const getTooltip = function(id, namespace) { + if (namespace) { + return namespaces[namespace].classes[id].tooltip; + } + return classes[id].tooltip; +}; +const setLink = function(ids, linkStr, target) { + const config = getConfig(); + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].link = utils.formatUrl(linkStr, config); + if (config.securityLevel === "sandbox") { + classes[id].linkTarget = "_top"; + } else if (typeof target === "string") { + classes[id].linkTarget = sanitizeText(target); + } else { + classes[id].linkTarget = "_blank"; + } + } + }); + setCssClass(ids, "clickable"); +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFunc(id, functionName, functionArgs); + classes[id].haveCallback = true; + }); + setCssClass(ids, "clickable"); +}; +const setClickFunc = function(_domId, functionName, functionArgs) { + const domId = common.sanitizeText(_domId, getConfig()); + const config = getConfig(); + if (config.securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + const id = domId; + if (classes[id] !== void 0) { + const elemId = lookUpDomId(id); + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(elemId); + } + functions.push(function() { + const elem = document.querySelector(`[id="${elemId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const bindFunctions = function(element) { + functions.forEach(function(fun) { + fun(element); + }); +}; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3, + LOLLIPOP: 4 +}; +const setupToolTips = function(element) { + let tooltipElem = select(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = select(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = select(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = select(this); + el.classed("hover", false); + }); +}; +functions.push(setupToolTips); +let direction = "TB"; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const addNamespace = function(id) { + if (namespaces[id] !== void 0) { + return; + } + namespaces[id] = { + id, + classes: {}, + children: {}, + domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter + }; + namespaceCounter++; +}; +const getNamespace = function(name) { + return namespaces[name]; +}; +const getNamespaces = function() { + return namespaces; +}; +const addClassesToNamespace = function(id, classNames) { + if (namespaces[id] !== void 0) { + classNames.map((className) => { + classes[className].parent = id; + namespaces[id].classes[className] = classes[className]; + }); + } +}; +const db = { + setAccTitle, + getAccTitle, + getAccDescription, + setAccDescription, + getConfig: () => getConfig().class, + addClass, + bindFunctions, + clear, + getClass, + getClasses, + getNotes, + addAnnotation, + addNote, + getRelations, + addRelation, + getDirection, + setDirection, + addMember, + addMembers, + cleanupLabel, + lineType, + relationType, + setClickEvent, + setCssClass, + setLink, + getTooltip, + setTooltip, + lookUpDomId, + setDiagramTitle, + getDiagramTitle, + setClassLabel, + addNamespace, + addClassesToNamespace, + getNamespace, + getNamespaces +}; +const getStyles = (options) => `g.classGroup text { + fill: ${options.nodeBorder}; + fill: ${options.classText}; + stroke: none; + font-family: ${options.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${options.classText}; +} +.edgeLabel .label rect { + fill: ${options.mainBkg}; +} +.label text { + fill: ${options.classText}; +} +.edgeLabel .label span { + background: ${options.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.classGroup line { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${options.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${options.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; +export { + db as d, + parser$1 as p, + styles as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-99e04339.js b/webroot/js/node_modules/mermaid/dist/styles-99e04339.js new file mode 100644 index 0000000..e8c8ecf --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-99e04339.js @@ -0,0 +1,960 @@ +import { c as Y, g as Ut, s as zt, a as Mt, b as Ht, B as Xt, D as Kt, l as D, f as ot, E as Wt, a7 as Jt } from "./mermaid-e4a58915.js"; +var gt = function() { + var t = function(C, r, n, i) { + for (n = n || {}, i = C.length; i--; n[C[i]] = r) + ; + return n; + }, s = [1, 2], a = [1, 3], h = [1, 4], f = [2, 4], d = [1, 9], y = [1, 11], k = [1, 15], u = [1, 16], E = [1, 17], T = [1, 18], R = [1, 30], G = [1, 19], j = [1, 20], U = [1, 21], z = [1, 22], M = [1, 23], H = [1, 25], X = [1, 26], K = [1, 27], W = [1, 28], J = [1, 29], q = [1, 32], Q = [1, 33], Z = [1, 34], tt = [1, 35], w = [1, 31], c = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], et = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], Dt = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], ht = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, cssClassStatement: 11, idStatement: 12, DESCR: 13, "-->": 14, HIDE_EMPTY: 15, scale: 16, WIDTH: 17, COMPOSIT_STATE: 18, STRUCT_START: 19, STRUCT_STOP: 20, STATE_DESCR: 21, AS: 22, ID: 23, FORK: 24, JOIN: 25, CHOICE: 26, CONCURRENT: 27, note: 28, notePosition: 29, NOTE_TEXT: 30, direction: 31, acc_title: 32, acc_title_value: 33, acc_descr: 34, acc_descr_value: 35, acc_descr_multiline_value: 36, classDef: 37, CLASSDEF_ID: 38, CLASSDEF_STYLEOPTS: 39, DEFAULT: 40, class: 41, CLASSENTITY_IDS: 42, STYLECLASS: 43, direction_tb: 44, direction_bt: 45, direction_rl: 46, direction_lr: 47, eol: 48, ";": 49, EDGE_STATE: 50, STYLE_SEPARATOR: 51, left_of: 52, right_of: 53, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], + performAction: function(r, n, i, o, p, e, B) { + var l = e.length - 1; + switch (p) { + case 3: + return o.setRootDoc(e[l]), e[l]; + case 4: + this.$ = []; + break; + case 5: + e[l] != "nl" && (e[l - 1].push(e[l]), this.$ = e[l - 1]); + break; + case 6: + case 7: + this.$ = e[l]; + break; + case 8: + this.$ = "nl"; + break; + case 11: + this.$ = e[l]; + break; + case 12: + const $ = e[l - 1]; + $.description = o.trimColon(e[l]), this.$ = $; + break; + case 13: + this.$ = { stmt: "relation", state1: e[l - 2], state2: e[l] }; + break; + case 14: + const ft = o.trimColon(e[l]); + this.$ = { stmt: "relation", state1: e[l - 3], state2: e[l - 1], description: ft }; + break; + case 18: + this.$ = { stmt: "state", id: e[l - 3], type: "default", description: "", doc: e[l - 1] }; + break; + case 19: + var A = e[l], O = e[l - 2].trim(); + if (e[l].match(":")) { + var st = e[l].split(":"); + A = st[0], O = [O, st[1]]; + } + this.$ = { stmt: "state", id: A, type: "default", description: O }; + break; + case 20: + this.$ = { stmt: "state", id: e[l - 3], type: "default", description: e[l - 5], doc: e[l - 1] }; + break; + case 21: + this.$ = { stmt: "state", id: e[l], type: "fork" }; + break; + case 22: + this.$ = { stmt: "state", id: e[l], type: "join" }; + break; + case 23: + this.$ = { stmt: "state", id: e[l], type: "choice" }; + break; + case 24: + this.$ = { stmt: "state", id: o.getDividerId(), type: "divider" }; + break; + case 25: + this.$ = { stmt: "state", id: e[l - 1].trim(), note: { position: e[l - 2].trim(), text: e[l].trim() } }; + break; + case 28: + this.$ = e[l].trim(), o.setAccTitle(this.$); + break; + case 29: + case 30: + this.$ = e[l].trim(), o.setAccDescription(this.$); + break; + case 31: + case 32: + this.$ = { stmt: "classDef", id: e[l - 1].trim(), classes: e[l].trim() }; + break; + case 33: + this.$ = { stmt: "applyClass", id: e[l - 1].trim(), styleClass: e[l].trim() }; + break; + case 34: + o.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" }; + break; + case 35: + o.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" }; + break; + case 36: + o.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" }; + break; + case 37: + o.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" }; + break; + case 40: + case 41: + this.$ = { stmt: "state", id: e[l].trim(), type: "default", description: "" }; + break; + case 42: + this.$ = { stmt: "state", id: e[l - 2].trim(), classes: [e[l].trim()], type: "default", description: "" }; + break; + case 43: + this.$ = { stmt: "state", id: e[l - 2].trim(), classes: [e[l].trim()], type: "default", description: "" }; + break; + } + }, + table: [{ 3: 1, 4: s, 5: a, 6: h }, { 1: [3] }, { 3: 5, 4: s, 5: a, 6: h }, { 3: 6, 4: s, 5: a, 6: h }, t([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], f, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: d, 5: y, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: k, 16: u, 18: E, 21: T, 23: R, 24: G, 25: j, 26: U, 27: z, 28: M, 31: 24, 32: H, 34: X, 36: K, 37: W, 41: J, 44: q, 45: Q, 46: Z, 47: tt, 50: w }, t(c, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: k, 16: u, 18: E, 21: T, 23: R, 24: G, 25: j, 26: U, 27: z, 28: M, 31: 24, 32: H, 34: X, 36: K, 37: W, 41: J, 44: q, 45: Q, 46: Z, 47: tt, 50: w }, t(c, [2, 7]), t(c, [2, 8]), t(c, [2, 9]), t(c, [2, 10]), t(c, [2, 11], { 13: [1, 37], 14: [1, 38] }), t(c, [2, 15]), { 17: [1, 39] }, t(c, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, t(c, [2, 21]), t(c, [2, 22]), t(c, [2, 23]), t(c, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, t(c, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, t(c, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, t(et, [2, 40], { 51: [1, 51] }), t(et, [2, 41], { 51: [1, 52] }), t(c, [2, 34]), t(c, [2, 35]), t(c, [2, 36]), t(c, [2, 37]), t(c, [2, 6]), t(c, [2, 12]), { 12: 53, 23: R, 50: w }, t(c, [2, 16]), t(Dt, f, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, t(c, [2, 28]), t(c, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, t(c, [2, 13], { 13: [1, 63] }), { 4: d, 5: y, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: k, 16: u, 18: E, 20: [1, 64], 21: T, 23: R, 24: G, 25: j, 26: U, 27: z, 28: M, 31: 24, 32: H, 34: X, 36: K, 37: W, 41: J, 44: q, 45: Q, 46: Z, 47: tt, 50: w }, t(c, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, t(c, [2, 31]), t(c, [2, 32]), t(c, [2, 33]), t(et, [2, 42]), t(et, [2, 43]), t(c, [2, 14]), t(c, [2, 18]), t(Dt, f, { 7: 68 }), t(c, [2, 25]), t(c, [2, 26]), { 4: d, 5: y, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: k, 16: u, 18: E, 20: [1, 69], 21: T, 23: R, 24: G, 25: j, 26: U, 27: z, 28: M, 31: 24, 32: H, 34: X, 36: K, 37: W, 41: J, 44: q, 45: Q, 46: Z, 47: tt, 50: w }, t(c, [2, 20])], + defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, + parseError: function(r, n) { + if (n.recoverable) + this.trace(r); + else { + var i = new Error(r); + throw i.hash = n, i; + } + }, + parse: function(r) { + var n = this, i = [0], o = [], p = [null], e = [], B = this.table, l = "", A = 0, O = 0, st = 2, $ = 1, ft = e.slice.call(arguments, 1), S = Object.create(this.lexer), L = { yy: {} }; + for (var dt in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, dt) && (L.yy[dt] = this.yy[dt]); + S.setInput(r, L.yy), L.yy.lexer = S, L.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {}); + var yt = S.yylloc; + e.push(yt); + var Gt = S.options && S.options.ranges; + typeof L.yy.parseError == "function" ? this.parseError = L.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function jt() { + var x; + return x = o.pop() || S.lex() || $, typeof x != "number" && (x instanceof Array && (o = x, x = o.pop()), x = n.symbols_[x] || x), x; + } + for (var _, v, m, pt, N = {}, it, b, Ct, rt; ; ) { + if (v = i[i.length - 1], this.defaultActions[v] ? m = this.defaultActions[v] : ((_ === null || typeof _ > "u") && (_ = jt()), m = B[v] && B[v][_]), typeof m > "u" || !m.length || !m[0]) { + var St = ""; + rt = []; + for (it in B[v]) + this.terminals_[it] && it > st && rt.push("'" + this.terminals_[it] + "'"); + S.showPosition ? St = "Parse error on line " + (A + 1) + `: +` + S.showPosition() + ` +Expecting ` + rt.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : St = "Parse error on line " + (A + 1) + ": Unexpected " + (_ == $ ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(St, { + text: S.match, + token: this.terminals_[_] || _, + line: S.yylineno, + loc: yt, + expected: rt + }); + } + if (m[0] instanceof Array && m.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + v + ", token: " + _); + switch (m[0]) { + case 1: + i.push(_), p.push(S.yytext), e.push(S.yylloc), i.push(m[1]), _ = null, O = S.yyleng, l = S.yytext, A = S.yylineno, yt = S.yylloc; + break; + case 2: + if (b = this.productions_[m[1]][1], N.$ = p[p.length - b], N._$ = { + first_line: e[e.length - (b || 1)].first_line, + last_line: e[e.length - 1].last_line, + first_column: e[e.length - (b || 1)].first_column, + last_column: e[e.length - 1].last_column + }, Gt && (N._$.range = [ + e[e.length - (b || 1)].range[0], + e[e.length - 1].range[1] + ]), pt = this.performAction.apply(N, [ + l, + O, + A, + L.yy, + m[1], + p, + e + ].concat(ft)), typeof pt < "u") + return pt; + b && (i = i.slice(0, -1 * b * 2), p = p.slice(0, -1 * b), e = e.slice(0, -1 * b)), i.push(this.productions_[m[1]][0]), p.push(N.$), e.push(N._$), Ct = B[i[i.length - 2]][i[i.length - 1]], i.push(Ct); + break; + case 3: + return !0; + } + } + return !0; + } + }, Yt = function() { + var C = { + EOF: 1, + parseError: function(n, i) { + if (this.yy.parser) + this.yy.parser.parseError(n, i); + else + throw new Error(n); + }, + // resets the lexer, sets new input + setInput: function(r, n) { + return this.yy = n || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var r = this._input[0]; + this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r; + var n = r.match(/(?:\r\n?|\n).*/g); + return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r; + }, + // unshifts one char (or a string) into the input + unput: function(r) { + var n = r.length, i = r.split(/(?:\r\n?|\n)/g); + this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n; + var o = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), i.length - 1 && (this.yylineno -= i.length - 1); + var p = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: i ? (i.length === o.length ? this.yylloc.first_column : 0) + o[o.length - i.length].length - i[0].length : this.yylloc.first_column - n + }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(r) { + this.unput(this.match.slice(r)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var r = this.matched.substr(0, this.matched.length - this.match.length); + return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var r = this.match; + return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var r = this.pastInput(), n = new Array(r.length + 1).join("-"); + return r + this.upcomingInput() + ` +` + n + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(r, n) { + var i, o, p; + if (this.options.backtrack_lexer && (p = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), o = r[0].match(/(?:\r\n?|\n).*/g), o && (this.yylineno += o.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: o ? o[o.length - 1].length - o[o.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length + }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], i = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), i) + return i; + if (this._backtrack) { + for (var e in p) + this[e] = p[e]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var r, n, i, o; + this._more || (this.yytext = "", this.match = ""); + for (var p = this._currentRules(), e = 0; e < p.length; e++) + if (i = this._input.match(this.rules[p[e]]), i && (!n || i[0].length > n[0].length)) { + if (n = i, o = e, this.options.backtrack_lexer) { + if (r = this.test_match(i, p[e]), r !== !1) + return r; + if (this._backtrack) { + n = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return n ? (r = this.test_match(n, p[o]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var n = this.next(); + return n || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(n) { + this.conditionStack.push(n); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var n = this.conditionStack.length - 1; + return n > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(n) { + return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(n) { + this.begin(n); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(n, i, o, p) { + switch (o) { + case 0: + return 40; + case 1: + return 44; + case 2: + return 45; + case 3: + return 46; + case 4: + return 47; + case 5: + break; + case 6: + break; + case 7: + return 5; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + return this.pushState("SCALE"), 16; + case 13: + return 17; + case 14: + this.popState(); + break; + case 15: + return this.begin("acc_title"), 32; + case 16: + return this.popState(), "acc_title_value"; + case 17: + return this.begin("acc_descr"), 34; + case 18: + return this.popState(), "acc_descr_value"; + case 19: + this.begin("acc_descr_multiline"); + break; + case 20: + this.popState(); + break; + case 21: + return "acc_descr_multiline_value"; + case 22: + return this.pushState("CLASSDEF"), 37; + case 23: + return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID"; + case 24: + return this.popState(), this.pushState("CLASSDEFID"), 38; + case 25: + return this.popState(), 39; + case 26: + return this.pushState("CLASS"), 41; + case 27: + return this.popState(), this.pushState("CLASS_STYLE"), 42; + case 28: + return this.popState(), 43; + case 29: + return this.pushState("SCALE"), 16; + case 30: + return 17; + case 31: + this.popState(); + break; + case 32: + this.pushState("STATE"); + break; + case 33: + return this.popState(), i.yytext = i.yytext.slice(0, -8).trim(), 24; + case 34: + return this.popState(), i.yytext = i.yytext.slice(0, -8).trim(), 25; + case 35: + return this.popState(), i.yytext = i.yytext.slice(0, -10).trim(), 26; + case 36: + return this.popState(), i.yytext = i.yytext.slice(0, -8).trim(), 24; + case 37: + return this.popState(), i.yytext = i.yytext.slice(0, -8).trim(), 25; + case 38: + return this.popState(), i.yytext = i.yytext.slice(0, -10).trim(), 26; + case 39: + return 44; + case 40: + return 45; + case 41: + return 46; + case 42: + return 47; + case 43: + this.pushState("STATE_STRING"); + break; + case 44: + return this.pushState("STATE_ID"), "AS"; + case 45: + return this.popState(), "ID"; + case 46: + this.popState(); + break; + case 47: + return "STATE_DESCR"; + case 48: + return 18; + case 49: + this.popState(); + break; + case 50: + return this.popState(), this.pushState("struct"), 19; + case 51: + break; + case 52: + return this.popState(), 20; + case 53: + break; + case 54: + return this.begin("NOTE"), 28; + case 55: + return this.popState(), this.pushState("NOTE_ID"), 52; + case 56: + return this.popState(), this.pushState("NOTE_ID"), 53; + case 57: + this.popState(), this.pushState("FLOATING_NOTE"); + break; + case 58: + return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS"; + case 59: + break; + case 60: + return "NOTE_TEXT"; + case 61: + return this.popState(), "ID"; + case 62: + return this.popState(), this.pushState("NOTE_TEXT"), 23; + case 63: + return this.popState(), i.yytext = i.yytext.substr(2).trim(), 30; + case 64: + return this.popState(), i.yytext = i.yytext.slice(0, -8).trim(), 30; + case 65: + return 6; + case 66: + return 6; + case 67: + return 15; + case 68: + return 50; + case 69: + return 23; + case 70: + return i.yytext = i.yytext.trim(), 13; + case 71: + return 14; + case 72: + return 27; + case 73: + return 51; + case 74: + return 5; + case 75: + return "INVALID"; + } + }, + rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { LINE: { rules: [9, 10], inclusive: !1 }, struct: { rules: [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [61], inclusive: !1 }, FLOATING_NOTE: { rules: [58, 59, 60], inclusive: !1 }, NOTE_TEXT: { rules: [63, 64], inclusive: !1 }, NOTE_ID: { rules: [62], inclusive: !1 }, NOTE: { rules: [55, 56, 57], inclusive: !1 }, CLASS_STYLE: { rules: [28], inclusive: !1 }, CLASS: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [25], inclusive: !1 }, CLASSDEF: { rules: [23, 24], inclusive: !1 }, acc_descr_multiline: { rules: [20, 21], inclusive: !1 }, acc_descr: { rules: [18], inclusive: !1 }, acc_title: { rules: [16], inclusive: !1 }, SCALE: { rules: [13, 14, 30, 31], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [45], inclusive: !1 }, STATE_STRING: { rules: [46, 47], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], inclusive: !1 }, ID: { rules: [9, 10], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], inclusive: !0 } } + }; + return C; + }(); + ht.lexer = Yt; + function ut() { + this.yy = {}; + } + return ut.prototype = ht, ht.Parser = ut, new ut(); +}(); +gt.parser = gt; +const De = gt, qt = "LR", Ce = "TB", _t = "state", It = "relation", Qt = "classDef", Zt = "applyClass", Et = "default", te = "divider", bt = "[*]", Ot = "start", Nt = bt, Rt = "end", At = "color", Lt = "fill", ee = "bgFill", se = ","; +function wt() { + return {}; +} +let Bt = qt, lt = [], P = wt(); +const $t = () => ({ + relations: [], + states: {}, + documents: {} +}); +let ct = { + root: $t() +}, g = ct.root, F = 0, vt = 0; +const ie = { + LINE: 0, + DOTTED_LINE: 1 +}, re = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 +}, nt = (t) => JSON.parse(JSON.stringify(t)), ne = (t) => { + D.info("Setting root doc", t), lt = t; +}, ae = () => lt, at = (t, s, a) => { + if (s.stmt === It) + at(t, s.state1, !0), at(t, s.state2, !1); + else if (s.stmt === _t && (s.id === "[*]" ? (s.id = a ? t.id + "_start" : t.id + "_end", s.start = a) : s.id = s.id.trim()), s.doc) { + const h = []; + let f = [], d; + for (d = 0; d < s.doc.length; d++) + if (s.doc[d].type === te) { + const y = nt(s.doc[d]); + y.doc = nt(f), h.push(y), f = []; + } else + f.push(s.doc[d]); + if (h.length > 0 && f.length > 0) { + const y = { + stmt: _t, + id: Jt(), + type: "divider", + doc: nt(f) + }; + h.push(nt(y)), s.doc = h; + } + s.doc.forEach((y) => at(s, y, !0)); + } +}, le = () => (at({ id: "root" }, { id: "root", doc: lt }, !0), { id: "root", doc: lt }), ce = (t) => { + let s; + t.doc ? s = t.doc : s = t, D.info(s), Pt(!0), D.info("Extract", s), s.forEach((a) => { + switch (a.stmt) { + case _t: + I( + a.id.trim(), + a.type, + a.doc, + a.description, + a.note, + a.classes, + a.styles, + a.textStyles + ); + break; + case It: + Ft(a.state1, a.state2, a.description); + break; + case Qt: + Vt(a.id.trim(), a.classes); + break; + case Zt: + xt(a.id.trim(), a.styleClass); + break; + } + }); +}, I = function(t, s = Et, a = null, h = null, f = null, d = null, y = null, k = null) { + const u = t == null ? void 0 : t.trim(); + g.states[u] === void 0 ? (D.info("Adding state ", u, h), g.states[u] = { + id: u, + descriptions: [], + type: s, + doc: a, + note: f, + classes: [], + styles: [], + textStyles: [] + }) : (g.states[u].doc || (g.states[u].doc = a), g.states[u].type || (g.states[u].type = s)), h && (D.info("Setting state description", u, h), typeof h == "string" && kt(u, h.trim()), typeof h == "object" && h.forEach((E) => kt(u, E.trim()))), f && (g.states[u].note = f, g.states[u].note.text = ot.sanitizeText( + g.states[u].note.text, + Y() + )), d && (D.info("Setting state classes", u, d), (typeof d == "string" ? [d] : d).forEach((T) => xt(u, T.trim()))), y && (D.info("Setting state styles", u, y), (typeof y == "string" ? [y] : y).forEach((T) => _e(u, T.trim()))), k && (D.info("Setting state styles", u, y), (typeof k == "string" ? [k] : k).forEach((T) => me(u, T.trim()))); +}, Pt = function(t) { + ct = { + root: $t() + }, g = ct.root, F = 0, P = wt(), t || Wt(); +}, V = function(t) { + return g.states[t]; +}, oe = function() { + return g.states; +}, he = function() { + D.info("Documents = ", ct); +}, ue = function() { + return g.relations; +}; +function mt(t = "") { + let s = t; + return t === bt && (F++, s = `${Ot}${F}`), s; +} +function Tt(t = "", s = Et) { + return t === bt ? Ot : s; +} +function fe(t = "") { + let s = t; + return t === Nt && (F++, s = `${Rt}${F}`), s; +} +function de(t = "", s = Et) { + return t === Nt ? Rt : s; +} +function ye(t, s, a) { + let h = mt(t.id.trim()), f = Tt(t.id.trim(), t.type), d = mt(s.id.trim()), y = Tt(s.id.trim(), s.type); + I( + h, + f, + t.doc, + t.description, + t.note, + t.classes, + t.styles, + t.textStyles + ), I( + d, + y, + s.doc, + s.description, + s.note, + s.classes, + s.styles, + s.textStyles + ), g.relations.push({ + id1: h, + id2: d, + relationTitle: ot.sanitizeText(a, Y()) + }); +} +const Ft = function(t, s, a) { + if (typeof t == "object") + ye(t, s, a); + else { + const h = mt(t.trim()), f = Tt(t), d = fe(s.trim()), y = de(s); + I(h, f), I(d, y), g.relations.push({ + id1: h, + id2: d, + title: ot.sanitizeText(a, Y()) + }); + } +}, kt = function(t, s) { + const a = g.states[t], h = s.startsWith(":") ? s.replace(":", "").trim() : s; + a.descriptions.push(ot.sanitizeText(h, Y())); +}, pe = function(t) { + return t.substring(0, 1) === ":" ? t.substr(2).trim() : t.trim(); +}, Se = () => (vt++, "divider-id-" + vt), Vt = function(t, s = "") { + P[t] === void 0 && (P[t] = { id: t, styles: [], textStyles: [] }); + const a = P[t]; + s != null && s.split(se).forEach((h) => { + const f = h.replace(/([^;]*);/, "$1").trim(); + if (h.match(At)) { + const y = f.replace(Lt, ee).replace(At, Lt); + a.textStyles.push(y); + } + a.styles.push(f); + }); +}, ge = function() { + return P; +}, xt = function(t, s) { + t.split(",").forEach(function(a) { + let h = V(a); + if (h === void 0) { + const f = a.trim(); + I(f), h = V(f); + } + h.classes.push(s); + }); +}, _e = function(t, s) { + const a = V(t); + a !== void 0 && a.textStyles.push(s); +}, me = function(t, s) { + const a = V(t); + a !== void 0 && a.textStyles.push(s); +}, Te = () => Bt, ke = (t) => { + Bt = t; +}, Ee = (t) => t && t[0] === ":" ? t.substr(1).trim() : t.trim(), Ae = { + getConfig: () => Y().state, + addState: I, + clear: Pt, + getState: V, + getStates: oe, + getRelations: ue, + getClasses: ge, + getDirection: Te, + addRelation: Ft, + getDividerId: Se, + setDirection: ke, + cleanupLabel: pe, + lineType: ie, + relationType: re, + logDocuments: he, + getRootDoc: ae, + setRootDoc: ne, + getRootDocV2: le, + extract: ce, + trimColon: Ee, + getAccTitle: Ut, + setAccTitle: zt, + getAccDescription: Mt, + setAccDescription: Ht, + addStyleClass: Vt, + setCssClass: xt, + addDescription: kt, + setDiagramTitle: Xt, + getDiagramTitle: Kt +}, be = (t) => ` +defs #statediagram-barbEnd { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor || t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor || t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground || t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg || t.mainBkg}; + stroke: ${t.stateBorder || t.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder || t.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder || t.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder || t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground || t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground ? t.altBackground : "#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${t.altBackground ? t.altBackground : "#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`, Le = be; +export { + Et as D, + It as S, + te as a, + _t as b, + Ce as c, + Ae as d, + De as p, + Le as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-af0a765a.js b/webroot/js/node_modules/mermaid/dist/styles-af0a765a.js new file mode 100644 index 0000000..458d547 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-af0a765a.js @@ -0,0 +1,1363 @@ +import { c as getConfig, g as getAccTitle, s as setAccTitle, a as getAccDescription, b as setAccDescription, B as setDiagramTitle, D as getDiagramTitle, l as log, f as common, E as clear$1, a7 as generateId } from "./mermaid-491db2d9.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setRootDoc($$[$0]); + return $$[$0]; + case 4: + this.$ = []; + break; + case 5: + if ($$[$0] != "nl") { + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + } + break; + case 6: + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = "nl"; + break; + case 11: + this.$ = $$[$0]; + break; + case 12: + const stateStmt = $$[$0 - 1]; + stateStmt.description = yy.trimColon($$[$0]); + this.$ = stateStmt; + break; + case 13: + this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] }; + break; + case 14: + const relDescription = yy.trimColon($$[$0]); + this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription }; + break; + case 18: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] }; + break; + case 19: + var id = $$[$0]; + var description = $$[$0 - 2].trim(); + if ($$[$0].match(":")) { + var parts = $$[$0].split(":"); + id = parts[0]; + description = [description, parts[1]]; + } + this.$ = { stmt: "state", id, type: "default", description }; + break; + case 20: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] }; + break; + case 21: + this.$ = { stmt: "state", id: $$[$0], type: "fork" }; + break; + case 22: + this.$ = { stmt: "state", id: $$[$0], type: "join" }; + break; + case 23: + this.$ = { stmt: "state", id: $$[$0], type: "choice" }; + break; + case 24: + this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" }; + break; + case 25: + this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } }; + break; + case 28: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 29: + case 30: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 31: + case 32: + this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() }; + break; + case 33: + this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; + break; + case 34: + yy.setDirection("TB"); + this.$ = { stmt: "dir", value: "TB" }; + break; + case 35: + yy.setDirection("BT"); + this.$ = { stmt: "dir", value: "BT" }; + break; + case 36: + yy.setDirection("RL"); + this.$ = { stmt: "dir", value: "RL" }; + break; + case 37: + yy.setDirection("LR"); + this.$ = { stmt: "dir", value: "LR" }; + break; + case 40: + case 41: + this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" }; + break; + case 42: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + case 43: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])], + defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 40; + case 1: + return 44; + case 2: + return 45; + case 3: + return 46; + case 4: + return 47; + case 5: + break; + case 6: + break; + case 7: + return 5; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + this.pushState("SCALE"); + return 16; + case 13: + return 17; + case 14: + this.popState(); + break; + case 15: + this.begin("acc_title"); + return 32; + case 16: + this.popState(); + return "acc_title_value"; + case 17: + this.begin("acc_descr"); + return 34; + case 18: + this.popState(); + return "acc_descr_value"; + case 19: + this.begin("acc_descr_multiline"); + break; + case 20: + this.popState(); + break; + case 21: + return "acc_descr_multiline_value"; + case 22: + this.pushState("CLASSDEF"); + return 37; + case 23: + this.popState(); + this.pushState("CLASSDEFID"); + return "DEFAULT_CLASSDEF_ID"; + case 24: + this.popState(); + this.pushState("CLASSDEFID"); + return 38; + case 25: + this.popState(); + return 39; + case 26: + this.pushState("CLASS"); + return 41; + case 27: + this.popState(); + this.pushState("CLASS_STYLE"); + return 42; + case 28: + this.popState(); + return 43; + case 29: + this.pushState("SCALE"); + return 16; + case 30: + return 17; + case 31: + this.popState(); + break; + case 32: + this.pushState("STATE"); + break; + case 33: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 34: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 35: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 36: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 37: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 38: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 39: + return 44; + case 40: + return 45; + case 41: + return 46; + case 42: + return 47; + case 43: + this.pushState("STATE_STRING"); + break; + case 44: + this.pushState("STATE_ID"); + return "AS"; + case 45: + this.popState(); + return "ID"; + case 46: + this.popState(); + break; + case 47: + return "STATE_DESCR"; + case 48: + return 18; + case 49: + this.popState(); + break; + case 50: + this.popState(); + this.pushState("struct"); + return 19; + case 51: + break; + case 52: + this.popState(); + return 20; + case 53: + break; + case 54: + this.begin("NOTE"); + return 28; + case 55: + this.popState(); + this.pushState("NOTE_ID"); + return 52; + case 56: + this.popState(); + this.pushState("NOTE_ID"); + return 53; + case 57: + this.popState(); + this.pushState("FLOATING_NOTE"); + break; + case 58: + this.popState(); + this.pushState("FLOATING_NOTE_ID"); + return "AS"; + case 59: + break; + case 60: + return "NOTE_TEXT"; + case 61: + this.popState(); + return "ID"; + case 62: + this.popState(); + this.pushState("NOTE_TEXT"); + return 23; + case 63: + this.popState(); + yy_.yytext = yy_.yytext.substr(2).trim(); + return 30; + case 64: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 30; + case 65: + return 6; + case 66: + return 6; + case 67: + return 15; + case 68: + return 50; + case 69: + return 23; + case 70: + yy_.yytext = yy_.yytext.trim(); + return 13; + case 71: + return 14; + case 72: + return 27; + case 73: + return 51; + case 74: + return 5; + case 75: + return "INVALID"; + } + }, + rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_DIAGRAM_DIRECTION = "LR"; +const DEFAULT_NESTED_DOC_DIR = "TB"; +const STMT_STATE = "state"; +const STMT_RELATION = "relation"; +const STMT_CLASSDEF = "classDef"; +const STMT_APPLYCLASS = "applyClass"; +const DEFAULT_STATE_TYPE = "default"; +const DIVIDER_TYPE = "divider"; +const START_NODE = "[*]"; +const START_TYPE = "start"; +const END_NODE = START_NODE; +const END_TYPE = "end"; +const COLOR_KEYWORD = "color"; +const FILL_KEYWORD = "fill"; +const BG_FILL = "bgFill"; +const STYLECLASS_SEP = ","; +function newClassesList() { + return {}; +} +let direction = DEFAULT_DIAGRAM_DIRECTION; +let rootDoc = []; +let classes = newClassesList(); +const newDoc = () => { + return { + relations: [], + states: {}, + documents: {} + }; +}; +let documents = { + root: newDoc() +}; +let currentDocument = documents.root; +let startEndCount = 0; +let dividerCnt = 0; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 +}; +const clone = (o) => JSON.parse(JSON.stringify(o)); +const setRootDoc = (o) => { + log.info("Setting root doc", o); + rootDoc = o; +}; +const getRootDoc = () => rootDoc; +const docTranslator = (parent, node, first) => { + if (node.stmt === STMT_RELATION) { + docTranslator(parent, node.state1, true); + docTranslator(parent, node.state2, false); + } else { + if (node.stmt === STMT_STATE) { + if (node.id === "[*]") { + node.id = first ? parent.id + "_start" : parent.id + "_end"; + node.start = first; + } else { + node.id = node.id.trim(); + } + } + if (node.doc) { + const doc = []; + let currentDoc = []; + let i; + for (i = 0; i < node.doc.length; i++) { + if (node.doc[i].type === DIVIDER_TYPE) { + const newNode = clone(node.doc[i]); + newNode.doc = clone(currentDoc); + doc.push(newNode); + currentDoc = []; + } else { + currentDoc.push(node.doc[i]); + } + } + if (doc.length > 0 && currentDoc.length > 0) { + const newNode = { + stmt: STMT_STATE, + id: generateId(), + type: "divider", + doc: clone(currentDoc) + }; + doc.push(clone(newNode)); + node.doc = doc; + } + node.doc.forEach((docNode) => docTranslator(node, docNode, true)); + } + } +}; +const getRootDocV2 = () => { + docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true); + return { id: "root", doc: rootDoc }; +}; +const extract = (_doc) => { + let doc; + if (_doc.doc) { + doc = _doc.doc; + } else { + doc = _doc; + } + log.info(doc); + clear(true); + log.info("Extract", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + addState( + item.id.trim(), + item.type, + item.doc, + item.description, + item.note, + item.classes, + item.styles, + item.textStyles + ); + break; + case STMT_RELATION: + addRelation(item.state1, item.state2, item.description); + break; + case STMT_CLASSDEF: + addStyleClass(item.id.trim(), item.classes); + break; + case STMT_APPLYCLASS: + setCssClass(item.id.trim(), item.styleClass); + break; + } + }); +}; +const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles2 = null, textStyles = null) { + const trimmedId = id == null ? void 0 : id.trim(); + if (currentDocument.states[trimmedId] === void 0) { + log.info("Adding state ", trimmedId, descr); + currentDocument.states[trimmedId] = { + id: trimmedId, + descriptions: [], + type, + doc, + note, + classes: [], + styles: [], + textStyles: [] + }; + } else { + if (!currentDocument.states[trimmedId].doc) { + currentDocument.states[trimmedId].doc = doc; + } + if (!currentDocument.states[trimmedId].type) { + currentDocument.states[trimmedId].type = type; + } + } + if (descr) { + log.info("Setting state description", trimmedId, descr); + if (typeof descr === "string") { + addDescription(trimmedId, descr.trim()); + } + if (typeof descr === "object") { + descr.forEach((des) => addDescription(trimmedId, des.trim())); + } + } + if (note) { + currentDocument.states[trimmedId].note = note; + currentDocument.states[trimmedId].note.text = common.sanitizeText( + currentDocument.states[trimmedId].note.text, + getConfig() + ); + } + if (classes2) { + log.info("Setting state classes", trimmedId, classes2); + const classesList = typeof classes2 === "string" ? [classes2] : classes2; + classesList.forEach((klass) => setCssClass(trimmedId, klass.trim())); + } + if (styles2) { + log.info("Setting state styles", trimmedId, styles2); + const stylesList = typeof styles2 === "string" ? [styles2] : styles2; + stylesList.forEach((style) => setStyle(trimmedId, style.trim())); + } + if (textStyles) { + log.info("Setting state styles", trimmedId, styles2); + const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles; + textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim())); + } +}; +const clear = function(saveCommon) { + documents = { + root: newDoc() + }; + currentDocument = documents.root; + startEndCount = 0; + classes = newClassesList(); + if (!saveCommon) { + clear$1(); + } +}; +const getState = function(id) { + return currentDocument.states[id]; +}; +const getStates = function() { + return currentDocument.states; +}; +const logDocuments = function() { + log.info("Documents = ", documents); +}; +const getRelations = function() { + return currentDocument.relations; +}; +function startIdIfNeeded(id = "") { + let fixedId = id; + if (id === START_NODE) { + startEndCount++; + fixedId = `${START_TYPE}${startEndCount}`; + } + return fixedId; +} +function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === START_NODE ? START_TYPE : type; +} +function endIdIfNeeded(id = "") { + let fixedId = id; + if (id === END_NODE) { + startEndCount++; + fixedId = `${END_TYPE}${startEndCount}`; + } + return fixedId; +} +function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === END_NODE ? END_TYPE : type; +} +function addRelationObjs(item1, item2, relationTitle) { + let id1 = startIdIfNeeded(item1.id.trim()); + let type1 = startTypeIfNeeded(item1.id.trim(), item1.type); + let id2 = startIdIfNeeded(item2.id.trim()); + let type2 = startTypeIfNeeded(item2.id.trim(), item2.type); + addState( + id1, + type1, + item1.doc, + item1.description, + item1.note, + item1.classes, + item1.styles, + item1.textStyles + ); + addState( + id2, + type2, + item2.doc, + item2.description, + item2.note, + item2.classes, + item2.styles, + item2.textStyles + ); + currentDocument.relations.push({ + id1, + id2, + relationTitle: common.sanitizeText(relationTitle, getConfig()) + }); +} +const addRelation = function(item1, item2, title) { + if (typeof item1 === "object") { + addRelationObjs(item1, item2, title); + } else { + const id1 = startIdIfNeeded(item1.trim()); + const type1 = startTypeIfNeeded(item1); + const id2 = endIdIfNeeded(item2.trim()); + const type2 = endTypeIfNeeded(item2); + addState(id1, type1); + addState(id2, type2); + currentDocument.relations.push({ + id1, + id2, + title: common.sanitizeText(title, getConfig()) + }); + } +}; +const addDescription = function(id, descr) { + const theState = currentDocument.states[id]; + const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr; + theState.descriptions.push(common.sanitizeText(_descr, getConfig())); +}; +const cleanupLabel = function(label) { + if (label.substring(0, 1) === ":") { + return label.substr(2).trim(); + } else { + return label.trim(); + } +}; +const getDividerId = () => { + dividerCnt++; + return "divider-id-" + dividerCnt; +}; +const addStyleClass = function(id, styleAttributes = "") { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + const foundClass = classes[id]; + if (styleAttributes !== void 0 && styleAttributes !== null) { + styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { + const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); + if (attrib.match(COLOR_KEYWORD)) { + const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); + const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); + foundClass.textStyles.push(newStyle2); + } + foundClass.styles.push(fixedAttrib); + }); + } +}; +const getClasses = function() { + return classes; +}; +const setCssClass = function(itemIds, cssClassName) { + itemIds.split(",").forEach(function(id) { + let foundState = getState(id); + if (foundState === void 0) { + const trimmedId = id.trim(); + addState(trimmedId); + foundState = getState(trimmedId); + } + foundState.classes.push(cssClassName); + }); +}; +const setStyle = function(itemId, styleText) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(styleText); + } +}; +const setTextStyle = function(itemId, cssClassName) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(cssClassName); + } +}; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const trimColon = (str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(); +const db = { + getConfig: () => getConfig().state, + addState, + clear, + getState, + getStates, + getRelations, + getClasses, + getDirection, + addRelation, + getDividerId, + setDirection, + cleanupLabel, + lineType, + relationType, + logDocuments, + getRootDoc, + setRootDoc, + getRootDocV2, + extract, + trimColon, + getAccTitle, + setAccTitle, + getAccDescription, + setAccDescription, + addStyleClass, + setCssClass, + addDescription, + setDiagramTitle, + getDiagramTitle +}; +const getStyles = (options) => ` +defs #statediagram-barbEnd { + fill: ${options.transitionColor}; + stroke: ${options.transitionColor}; + } +g.stateGroup text { + fill: ${options.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${options.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${options.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.stateGroup line { + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${options.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${options.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${options.noteBorderColor}; + fill: ${options.noteBkgColor}; + + text { + fill: ${options.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${options.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel .label text { + fill: ${options.transitionLabelColor || options.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${options.transitionLabelColor || options.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${options.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node .fork-join { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node circle.state-end { + fill: ${options.innerEndBackground}; + stroke: ${options.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${options.compositeBackground || options.background}; + // stroke: ${options.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${options.stateBkg || options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${options.lineColor}; +} + +.statediagram-cluster rect { + fill: ${options.compositeTitleBackground}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${options.stateLabelColor}; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${options.stateBorder || options.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${options.compositeBackground || options.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${options.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${options.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${options.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${options.lineColor}; + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; +export { + DEFAULT_STATE_TYPE as D, + STMT_RELATION as S, + DIVIDER_TYPE as a, + STMT_STATE as b, + DEFAULT_NESTED_DOC_DIR as c, + db as d, + parser$1 as p, + styles as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles-f40f6c66.js b/webroot/js/node_modules/mermaid/dist/styles-f40f6c66.js new file mode 100644 index 0000000..427a0ad --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles-f40f6c66.js @@ -0,0 +1,570 @@ +import { G as Graph } from "./layout-a7b9ff07.js"; +import { S as Selection, u as root, v as array, _, C as Color, x as isPlainObject, y as isFunction, o as getStylesFromArray, l as log, p as evaluate, c as getConfig, f as common, q as interpolateToCurve, n as curveLinear, j as d3select, z as utils, r as setupGraphViewbox, A as rgba } from "./mermaid-491db2d9.js"; +import { r as render } from "./index-cc269c15.js"; +function selectAll(selector) { + return typeof selector === "string" ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) : new Selection([array(selector)], root); +} +const channel = (color, channel2) => { + return _.lang.round(Color.parse(color)[channel2]); +}; +const channel$1 = channel; +function isSubgraph(g, v) { + return !!g.children(v).length; +} +function edgeToId(e) { + return escapeId(e.v) + ":" + escapeId(e.w) + ":" + escapeId(e.name); +} +var ID_DELIM = /:/g; +function escapeId(str) { + return str ? String(str).replace(ID_DELIM, "\\:") : ""; +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function applyClass(dom, classFn, otherClasses) { + if (classFn) { + dom.attr("class", classFn).attr("class", otherClasses + " " + dom.attr("class")); + } +} +function applyTransition(selection, g) { + var graph = g.graph(); + if (isPlainObject(graph)) { + var transition = graph.transition; + if (isFunction(transition)) { + return transition(selection); + } + } + return selection; +} +function addHtmlLabel(root2, node) { + var fo = root2.append("foreignObject").attr("width", "100000"); + var div = fo.append("xhtml:div"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + var label = node.label; + switch (typeof label) { + case "function": + div.insert(label); + break; + case "object": + div.insert(function() { + return label; + }); + break; + default: + div.html(label); + } + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + var client = div.node().getBoundingClientRect(); + fo.attr("width", client.width).attr("height", client.height); + return fo; +} +const conf = {}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const addVertices = function(vert, g, svgId, root2, doc, diagObj) { + const svg = root2.select(`[id="${svgId}"]`); + const keys = Object.keys(vert); + keys.forEach(function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles = getStylesFromArray(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + log.info("vertex", vertex, vertex.labelType); + if (vertex.labelType === "markdown") { + log.info("vertex", vertex, vertex.labelType); + } else { + if (evaluate(getConfig().flowchart.htmlLabels)) { + const node = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = addHtmlLabel(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(common.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + } + let radious = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + g.setNode(vertex.id, { + labelStyle: styles.labelStyle, + shape: _shape, + labelText: vertexText, + labelType: vertex.labelType, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: getConfig().flowchart.padding + }); + log.info("setNode", { + labelStyle: styles.labelStyle, + labelType: vertex.labelType, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: classStr, + style: styles.style, + id: vertex.id, + domId: diagObj.db.lookUpDomId(vertex.id), + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + dir: vertex.dir, + props: vertex.props, + padding: getConfig().flowchart.padding + }); + }); +}; +const addEdges = function(edges, g, diagObj) { + log.info("abc78 edges = ", edges); + let cnt = 0; + let linkIdCnt = {}; + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = getStylesFromArray(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + cnt++; + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + log.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + log.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + case "invisible": + edgeData.thickness = "invisible"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 0;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles = getStylesFromArray(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear); + } else { + edgeData.curve = interpolateToCurve(conf.curve, curveLinear); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = edge.text.replace(common.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + g.setEdge(edge.start, edge.end, edgeData, cnt); + }); +}; +const getClasses = function(text, diagObj) { + return diagObj.db.getClasses(); +}; +const draw = async function(text, id, _version, diagObj) { + log.info("Drawing flowchart"); + let dir = diagObj.db.getDirection(); + if (dir === void 0) { + dir = "TD"; + } + const { securityLevel, flowchart: conf2 } = getConfig(); + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root2 = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const g = new Graph({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 0, + marginy: 0 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + log.info("Subgraphs - ", subGraphs); + for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { + subG = subGraphs[i2]; + log.info("Subgraph - ", subG); + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const vert = diagObj.db.getVertices(); + const edges = diagObj.db.getEdges(); + log.info("Edges", edges); + let i = 0; + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + selectAll("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + log.info("Setting up subgraphs", subG.nodes[j], subG.id); + g.setParent(subG.nodes[j], subG.id); + } + } + addVertices(vert, g, id, root2, doc, diagObj); + addEdges(edges, g); + const svg = root2.select(`[id="${id}"]`); + const element = root2.select("#" + id + " g"); + await render(element, g, ["point", "circle", "cross"], "flowchart", id); + utils.insertTitle(svg, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle()); + setupGraphViewbox(g, svg, conf2.diagramPadding, conf2.useMaxWidth); + diagObj.db.indexNodes("subGraph" + i); + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } + const keys = Object.keys(vert); + keys.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node = d3select("#" + id + ' [id="' + key + '"]'); + if (node) { + const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node.insert(function() { + return link; + }, ":first-child"); + const shape = node.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); +}; +const flowRendererV2 = { + setConf, + addVertices, + addEdges, + getClasses, + draw +}; +const fade = (color, opacity) => { + const channel2 = channel$1; + const r = channel2(color, "r"); + const g = channel2(color, "g"); + const b = channel2(color, "b"); + return rgba(r, g, b, opacity); +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span,p { + color: ${options.titleColor}; + } + + .label text,span,p { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${fade(options.edgeLabelBackground, 0.5)}; + // background-color: + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span,p { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } +`; +const flowStyles = getStyles; +export { + applyStyle as a, + addHtmlLabel as b, + applyTransition as c, + applyClass as d, + edgeToId as e, + flowRendererV2 as f, + flowStyles as g, + isSubgraph as i, + selectAll as s +}; diff --git a/webroot/js/node_modules/mermaid/dist/styles.d.ts b/webroot/js/node_modules/mermaid/dist/styles.d.ts new file mode 100644 index 0000000..396dd4c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles.d.ts @@ -0,0 +1,12 @@ +import type { FlowChartStyleOptions } from './diagrams/flowchart/styles.js'; +import type { DiagramStylesProvider } from './diagram-api/types.js'; +declare const getStyles: (type: string, userStyles: string, options: { + fontFamily: string; + fontSize: string; + textColor: string; + errorBkgColor: string; + errorTextColor: string; + lineColor: string; +} & FlowChartStyleOptions) => string; +export declare const addStylesForDiagram: (type: string, diagramTheme?: DiagramStylesProvider) => void; +export default getStyles; diff --git a/webroot/js/node_modules/mermaid/dist/styles.spec.d.ts b/webroot/js/node_modules/mermaid/dist/styles.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/styles.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/svgDrawCommon-057d45d0.js b/webroot/js/node_modules/mermaid/dist/svgDrawCommon-057d45d0.js new file mode 100644 index 0000000..a073eb3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/svgDrawCommon-057d45d0.js @@ -0,0 +1,98 @@ +import { sanitizeUrl } from "@braintree/sanitize-url"; +import { H as lineBreakRegex } from "./mermaid-0d192ec3.js"; +const drawRect = (element, rectData) => { + const rectElement = element.append("rect"); + rectElement.attr("x", rectData.x); + rectElement.attr("y", rectData.y); + rectElement.attr("fill", rectData.fill); + rectElement.attr("stroke", rectData.stroke); + rectElement.attr("width", rectData.width); + rectElement.attr("height", rectData.height); + rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); + rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); + if (rectData.attrs !== void 0) { + for (const attrKey in rectData.attrs) { + rectElement.attr(attrKey, rectData.attrs[attrKey]); + } + } + rectData.class !== void 0 && rectElement.attr("class", rectData.class); + return rectElement; +}; +const drawBackgroundRect = (element, bounds) => { + const rectData = { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + stroke: bounds.stroke, + class: "rect" + }; + const rectElement = drawRect(element, rectData); + rectElement.lower(); +}; +const drawText = (element, textData) => { + const nText = textData.text.replace(lineBreakRegex, " "); + const textElem = element.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + textData.class !== void 0 && textElem.attr("class", textData.class); + const tspan = textElem.append("tspan"); + tspan.attr("x", textData.x + textData.textMargin * 2); + tspan.text(nText); + return textElem; +}; +const drawImage = (elem, x, y, link) => { + const imageElement = elem.append("image"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = sanitizeUrl(link); + imageElement.attr("xlink:href", sanitizedLink); +}; +const drawEmbeddedImage = (element, x, y, link) => { + const imageElement = element.append("use"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = sanitizeUrl(link); + imageElement.attr("xlink:href", `#${sanitizedLink}`); +}; +const getNoteRect = () => { + const noteRectData = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: "#EDF2AE", + stroke: "#666", + anchor: "start", + rx: 0, + ry: 0 + }; + return noteRectData; +}; +const getTextObj = () => { + const testObject = { + x: 0, + y: 0, + width: 100, + height: 100, + "text-anchor": "start", + style: "#666", + textMargin: 0, + rx: 0, + ry: 0, + tspan: true + }; + return testObject; +}; +export { + drawBackgroundRect as a, + drawEmbeddedImage as b, + drawImage as c, + drawRect as d, + getTextObj as e, + drawText as f, + getNoteRect as g +}; diff --git a/webroot/js/node_modules/mermaid/dist/svgDrawCommon-1021982e.js b/webroot/js/node_modules/mermaid/dist/svgDrawCommon-1021982e.js new file mode 100644 index 0000000..ac197ae --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/svgDrawCommon-1021982e.js @@ -0,0 +1,64 @@ +import { aP as o, e as i } from "./mermaid-e4a58915.js"; +const c = (s, t) => { + const e = s.append("rect"); + if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.rx !== void 0 && e.attr("rx", t.rx), t.ry !== void 0 && e.attr("ry", t.ry), t.attrs !== void 0) + for (const r in t.attrs) + e.attr(r, t.attrs[r]); + return t.class !== void 0 && e.attr("class", t.class), e; +}, x = (s, t) => { + const e = { + x: t.startx, + y: t.starty, + width: t.stopx - t.startx, + height: t.stopy - t.starty, + fill: t.fill, + stroke: t.stroke, + class: "rect" + }; + c(s, e).lower(); +}, d = (s, t) => { + const e = t.text.replace(o, " "), r = s.append("text"); + r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class !== void 0 && r.attr("class", t.class); + const n = r.append("tspan"); + return n.attr("x", t.x + t.textMargin * 2), n.text(e), r; +}, h = (s, t, e, r) => { + const n = s.append("image"); + n.attr("x", t), n.attr("y", e); + const a = i(r); + n.attr("xlink:href", a); +}, y = (s, t, e, r) => { + const n = s.append("use"); + n.attr("x", t), n.attr("y", e); + const a = i(r); + n.attr("xlink:href", `#${a}`); +}, g = () => ({ + x: 0, + y: 0, + width: 100, + height: 100, + fill: "#EDF2AE", + stroke: "#666", + anchor: "start", + rx: 0, + ry: 0 +}), p = () => ({ + x: 0, + y: 0, + width: 100, + height: 100, + "text-anchor": "start", + style: "#666", + textMargin: 0, + rx: 0, + ry: 0, + tspan: !0 +}); +export { + x as a, + y as b, + h as c, + c as d, + p as e, + d as f, + g +}; diff --git a/webroot/js/node_modules/mermaid/dist/svgDrawCommon-6f1271c3.js b/webroot/js/node_modules/mermaid/dist/svgDrawCommon-6f1271c3.js new file mode 100644 index 0000000..b168adf --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/svgDrawCommon-6f1271c3.js @@ -0,0 +1,97 @@ +import { aP as lineBreakRegex, e as sanitizeUrl_1 } from "./mermaid-491db2d9.js"; +const drawRect = (element, rectData) => { + const rectElement = element.append("rect"); + rectElement.attr("x", rectData.x); + rectElement.attr("y", rectData.y); + rectElement.attr("fill", rectData.fill); + rectElement.attr("stroke", rectData.stroke); + rectElement.attr("width", rectData.width); + rectElement.attr("height", rectData.height); + rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); + rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); + if (rectData.attrs !== void 0) { + for (const attrKey in rectData.attrs) { + rectElement.attr(attrKey, rectData.attrs[attrKey]); + } + } + rectData.class !== void 0 && rectElement.attr("class", rectData.class); + return rectElement; +}; +const drawBackgroundRect = (element, bounds) => { + const rectData = { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + stroke: bounds.stroke, + class: "rect" + }; + const rectElement = drawRect(element, rectData); + rectElement.lower(); +}; +const drawText = (element, textData) => { + const nText = textData.text.replace(lineBreakRegex, " "); + const textElem = element.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + textData.class !== void 0 && textElem.attr("class", textData.class); + const tspan = textElem.append("tspan"); + tspan.attr("x", textData.x + textData.textMargin * 2); + tspan.text(nText); + return textElem; +}; +const drawImage = (elem, x, y, link) => { + const imageElement = elem.append("image"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = sanitizeUrl_1(link); + imageElement.attr("xlink:href", sanitizedLink); +}; +const drawEmbeddedImage = (element, x, y, link) => { + const imageElement = element.append("use"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = sanitizeUrl_1(link); + imageElement.attr("xlink:href", `#${sanitizedLink}`); +}; +const getNoteRect = () => { + const noteRectData = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: "#EDF2AE", + stroke: "#666", + anchor: "start", + rx: 0, + ry: 0 + }; + return noteRectData; +}; +const getTextObj = () => { + const testObject = { + x: 0, + y: 0, + width: 100, + height: 100, + "text-anchor": "start", + style: "#666", + textMargin: 0, + rx: 0, + ry: 0, + tspan: true + }; + return testObject; +}; +export { + drawBackgroundRect as a, + drawEmbeddedImage as b, + drawImage as c, + drawRect as d, + getTextObj as e, + drawText as f, + getNoteRect as g +}; diff --git a/webroot/js/node_modules/mermaid/dist/tests/MockedD3.d.ts b/webroot/js/node_modules/mermaid/dist/tests/MockedD3.d.ts new file mode 100644 index 0000000..87dfbac --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/tests/MockedD3.d.ts @@ -0,0 +1,45 @@ +/** + * This is a mocked/stubbed version of the d3 Selection type. Each of the main functions are all + * mocked (via vi.fn()) so you can track if they have been called, etc. + * + * Note that node() returns a HTML Element with tag 'svg'. It is an empty element (no innerHTML, no children, etc). + * This potentially allows testing of mermaidAPI render(). + */ +export declare class MockedD3 { + attribs: Map; + id: string | undefined; + _children: MockedD3[]; + _containingHTMLdoc: Document; + constructor(givenId?: string); + /** Helpful utility during development/debugging. This is not a real d3 function */ + listChildren(): string; + select: import("@vitest/spy").Mock; + selectAll: import("@vitest/spy").Mock; + append: import("@vitest/spy").Mock; + insert: (type: string, beforeSelector?: string, id?: string) => MockedD3; + attr(attrName: string): undefined | string; + attr(attrName: string, attrValue: string): MockedD3; + lower(attrValue?: string): this; + style(attrValue?: string): this; + text(attrValue?: string): this; + node: import("@vitest/spy").Mock; + nodes: import("@vitest/spy").Mock; + getBBox: () => { + x: string | number | undefined; + y: string | number | undefined; + width: string | number | undefined; + height: string | number | undefined; + }; + insertBefore: import("@vitest/spy").Mock; + curveBasis: import("@vitest/spy").Mock; + curveBasisClosed: import("@vitest/spy").Mock; + curveBasisOpen: import("@vitest/spy").Mock; + curveLinear: import("@vitest/spy").Mock; + curveLinearClosed: import("@vitest/spy").Mock; + curveMonotoneX: import("@vitest/spy").Mock; + curveMonotoneY: import("@vitest/spy").Mock; + curveNatural: import("@vitest/spy").Mock; + curveStep: import("@vitest/spy").Mock; + curveStepAfter: import("@vitest/spy").Mock; + curveStepBefore: import("@vitest/spy").Mock; +} diff --git a/webroot/js/node_modules/mermaid/dist/tests/setup.d.ts b/webroot/js/node_modules/mermaid/dist/tests/setup.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/tests/setup.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/tests/util.d.ts b/webroot/js/node_modules/mermaid/dist/tests/util.d.ts new file mode 100644 index 0000000..66bdc66 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/tests/util.d.ts @@ -0,0 +1,3 @@ +export declare const convert: (template: TemplateStringsArray, ...params: unknown[]) => { + [k: string]: unknown; +}[]; diff --git a/webroot/js/node_modules/mermaid/dist/themes/erDiagram-oldHardcodedValues.d.ts b/webroot/js/node_modules/mermaid/dist/themes/erDiagram-oldHardcodedValues.d.ts new file mode 100644 index 0000000..15a3e64 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/erDiagram-oldHardcodedValues.d.ts @@ -0,0 +1,7 @@ +/** + * Values that have been hardcoded in src/diagrams/er/styles.js. These can be used by + * theme-_._ files to maintain display styles until themes, styles, renderers are revised. -- + * 2022-09-22 + */ +export declare const oldAttributeBackgroundColorOdd = "#ffffff"; +export declare const oldAttributeBackgroundColorEven = "#f2f2f2"; diff --git a/webroot/js/node_modules/mermaid/dist/themes/index.d.ts b/webroot/js/node_modules/mermaid/dist/themes/index.d.ts new file mode 100644 index 0000000..df7e803 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/index.d.ts @@ -0,0 +1,24 @@ +declare namespace _default { + export namespace base { + export { baseThemeVariables as getThemeVariables }; + } + export namespace dark { + export { darkThemeVariables as getThemeVariables }; + } + namespace _default { + export { defaultThemeVariables as getThemeVariables }; + } + export { _default as default }; + export namespace forest { + export { forestThemeVariables as getThemeVariables }; + } + export namespace neutral { + export { neutralThemeVariables as getThemeVariables }; + } +} +export default _default; +import { getThemeVariables as baseThemeVariables } from './theme-base.js'; +import { getThemeVariables as darkThemeVariables } from './theme-dark.js'; +import { getThemeVariables as defaultThemeVariables } from './theme-default.js'; +import { getThemeVariables as forestThemeVariables } from './theme-forest.js'; +import { getThemeVariables as neutralThemeVariables } from './theme-neutral.js'; diff --git a/webroot/js/node_modules/mermaid/dist/themes/theme-base.d.ts b/webroot/js/node_modules/mermaid/dist/themes/theme-base.d.ts new file mode 100644 index 0000000..449118f --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/theme-base.d.ts @@ -0,0 +1,188 @@ +export function getThemeVariables(userOverrides: any): Theme; +declare class Theme { + /** # Base variables */ + /** + * - Background - used to know what the background color is of the diagram. This is used for + * deducing colors for instance line color. Default value is #f4f4f4. + */ + background: string; + primaryColor: string; + noteBkgColor: string; + noteTextColor: string; + THEME_COLOR_LIMIT: number; + fontFamily: string; + fontSize: string; + updateColors(): void; + primaryTextColor: any; + secondaryColor: any; + tertiaryColor: any; + primaryBorderColor: any; + secondaryBorderColor: any; + tertiaryBorderColor: any; + noteBorderColor: any; + secondaryTextColor: any; + tertiaryTextColor: any; + lineColor: any; + arrowheadColor: any; + textColor: any; + border2: any; + nodeBkg: any; + mainBkg: any; + nodeBorder: any; + clusterBkg: any; + clusterBorder: any; + defaultLinkColor: any; + titleColor: any; + edgeLabelBackground: any; + nodeTextColor: any; + actorBorder: any; + actorBkg: any; + actorTextColor: any; + actorLineColor: any; + labelBoxBkgColor: any; + signalColor: any; + signalTextColor: any; + labelBoxBorderColor: any; + labelTextColor: any; + loopTextColor: any; + activationBorderColor: any; + activationBkgColor: any; + sequenceNumberColor: any; + sectionBkgColor: any; + altSectionBkgColor: any; + sectionBkgColor2: any; + excludeBkgColor: any; + taskBorderColor: any; + taskBkgColor: any; + activeTaskBorderColor: any; + activeTaskBkgColor: any; + gridColor: any; + doneTaskBkgColor: any; + doneTaskBorderColor: any; + critBorderColor: any; + critBkgColor: any; + todayLineColor: any; + taskTextColor: any; + taskTextOutsideColor: any; + taskTextLightColor: any; + taskTextDarkColor: any; + taskTextClickableColor: any; + personBorder: any; + personBkg: any; + transitionColor: any; + transitionLabelColor: any; + stateLabelColor: any; + stateBkg: any; + labelBackgroundColor: any; + compositeBackground: any; + altBackground: any; + compositeTitleBackground: any; + compositeBorder: any; + innerEndBackground: any; + errorBkgColor: any; + errorTextColor: any; + specialStateColor: any; + cScale0: any; + cScale1: any; + cScale2: any; + cScale3: any; + cScale4: any; + cScale5: any; + cScale6: any; + cScale7: any; + cScale8: any; + cScale9: any; + cScale10: any; + cScale11: any; + scaleLabelColor: any; + classText: any; + fillType0: any; + fillType1: any; + fillType2: any; + fillType3: any; + fillType4: any; + fillType5: any; + fillType6: any; + fillType7: any; + pie1: any; + pie2: any; + pie3: any; + pie4: any; + pie5: any; + pie6: any; + pie7: any; + pie8: any; + pie9: any; + pie10: any; + pie11: any; + pie12: any; + pieTitleTextSize: any; + pieTitleTextColor: any; + pieSectionTextSize: any; + pieSectionTextColor: any; + pieLegendTextSize: any; + pieLegendTextColor: any; + pieStrokeColor: any; + pieStrokeWidth: any; + pieOuterStrokeWidth: any; + pieOuterStrokeColor: any; + pieOpacity: any; + quadrant1Fill: any; + quadrant2Fill: any; + quadrant3Fill: any; + quadrant4Fill: any; + quadrant1TextFill: any; + quadrant2TextFill: any; + quadrant3TextFill: any; + quadrant4TextFill: any; + quadrantPointFill: any; + quadrantPointTextFill: any; + quadrantXAxisTextFill: any; + quadrantYAxisTextFill: any; + quadrantInternalBorderStrokeFill: any; + quadrantExternalBorderStrokeFill: any; + quadrantTitleFill: any; + requirementBackground: any; + requirementBorderColor: any; + requirementBorderSize: any; + requirementTextColor: any; + relationColor: any; + relationLabelBackground: any; + relationLabelColor: any; + git0: any; + git1: any; + git2: any; + git3: any; + git4: any; + git5: any; + git6: any; + git7: any; + gitInv0: any; + gitInv1: any; + gitInv2: any; + gitInv3: any; + gitInv4: any; + gitInv5: any; + gitInv6: any; + gitInv7: any; + branchLabelColor: any; + gitBranchLabel0: any; + gitBranchLabel1: any; + gitBranchLabel2: any; + gitBranchLabel3: any; + gitBranchLabel4: any; + gitBranchLabel5: any; + gitBranchLabel6: any; + gitBranchLabel7: any; + tagLabelColor: any; + tagLabelBackground: any; + tagLabelBorder: any; + tagLabelFontSize: any; + commitLabelColor: any; + commitLabelBackground: any; + commitLabelFontSize: any; + attributeBackgroundColorOdd: any; + attributeBackgroundColorEven: any; + calculate(overrides: any): void; +} +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/themes/theme-dark.d.ts b/webroot/js/node_modules/mermaid/dist/themes/theme-dark.d.ts new file mode 100644 index 0000000..34a9ee5 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/theme-dark.d.ts @@ -0,0 +1,176 @@ +export function getThemeVariables(userOverrides: any): Theme; +declare class Theme { + background: string; + primaryColor: string; + secondaryColor: any; + tertiaryColor: any; + primaryBorderColor: any; + secondaryBorderColor: any; + tertiaryBorderColor: any; + primaryTextColor: any; + secondaryTextColor: any; + tertiaryTextColor: any; + lineColor: string; + textColor: string; + mainBkg: string; + secondBkg: string; + mainContrastColor: string; + darkTextColor: any; + border1: string; + border2: any; + arrowheadColor: string; + fontFamily: string; + fontSize: string; + labelBackground: string; + THEME_COLOR_LIMIT: number; + nodeBkg: string; + nodeBorder: string; + clusterBkg: string; + clusterBorder: string; + defaultLinkColor: string; + titleColor: string; + edgeLabelBackground: string; + actorBorder: string; + actorBkg: string; + actorTextColor: string; + actorLineColor: string; + signalColor: string; + signalTextColor: string; + labelBoxBkgColor: string; + labelBoxBorderColor: string; + labelTextColor: string; + loopTextColor: string; + noteBorderColor: string; + noteBkgColor: string; + noteTextColor: string; + activationBorderColor: string; + activationBkgColor: string; + sequenceNumberColor: string; + sectionBkgColor: any; + altSectionBkgColor: string; + sectionBkgColor2: string; + excludeBkgColor: any; + taskBorderColor: any; + taskBkgColor: string; + taskTextColor: string; + taskTextLightColor: string; + taskTextOutsideColor: string; + taskTextClickableColor: string; + activeTaskBorderColor: any; + activeTaskBkgColor: string; + gridColor: string; + doneTaskBkgColor: string; + doneTaskBorderColor: string; + critBorderColor: string; + critBkgColor: string; + taskTextDarkColor: string; + todayLineColor: string; + personBorder: any; + personBkg: string; + labelColor: string; + errorBkgColor: string; + errorTextColor: string; + updateColors(): void; + transitionColor: any; + transitionLabelColor: any; + stateLabelColor: any; + stateBkg: any; + labelBackgroundColor: any; + compositeBackground: any; + altBackground: any; + compositeTitleBackground: any; + compositeBorder: any; + innerEndBackground: any; + specialStateColor: string | undefined; + fillType0: string | undefined; + fillType1: any; + fillType2: any; + fillType3: any; + fillType4: any; + fillType5: any; + fillType6: any; + fillType7: any; + cScale1: any; + cScale2: any; + cScale3: any; + cScale4: any; + cScale5: any; + cScale6: any; + cScale7: any; + cScale8: any; + cScale9: any; + cScale10: any; + cScale11: any; + cScale12: any; + cScale0: any; + scaleLabelColor: any; + pieTitleTextSize: any; + pieTitleTextColor: any; + pieSectionTextSize: any; + pieSectionTextColor: any; + pieLegendTextSize: any; + pieLegendTextColor: any; + pieStrokeColor: any; + pieStrokeWidth: any; + pieOuterStrokeWidth: any; + pieOuterStrokeColor: any; + pieOpacity: any; + quadrant1Fill: any; + quadrant2Fill: any; + quadrant3Fill: any; + quadrant4Fill: any; + quadrant1TextFill: any; + quadrant2TextFill: any; + quadrant3TextFill: any; + quadrant4TextFill: any; + quadrantPointFill: any; + quadrantPointTextFill: any; + quadrantXAxisTextFill: any; + quadrantYAxisTextFill: any; + quadrantInternalBorderStrokeFill: any; + quadrantExternalBorderStrokeFill: any; + quadrantTitleFill: any; + classText: any; + requirementBackground: any; + requirementBorderColor: any; + requirementBorderSize: any; + requirementTextColor: any; + relationColor: any; + relationLabelBackground: any; + relationLabelColor: any; + git0: any; + git1: any; + git2: any; + git3: any; + git4: any; + git5: any; + git6: any; + git7: any; + gitInv0: any; + gitInv1: any; + gitInv2: any; + gitInv3: any; + gitInv4: any; + gitInv5: any; + gitInv6: any; + gitInv7: any; + gitBranchLabel0: any; + gitBranchLabel1: any; + gitBranchLabel2: any; + gitBranchLabel3: any; + gitBranchLabel4: any; + gitBranchLabel5: any; + gitBranchLabel6: any; + gitBranchLabel7: any; + tagLabelColor: any; + tagLabelBackground: any; + tagLabelBorder: any; + tagLabelFontSize: any; + commitLabelColor: any; + commitLabelBackground: any; + commitLabelFontSize: any; + attributeBackgroundColorOdd: any; + attributeBackgroundColorEven: any; + calculate(overrides: any): void; +} +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/themes/theme-default.d.ts b/webroot/js/node_modules/mermaid/dist/themes/theme-default.d.ts new file mode 100644 index 0000000..c7eef75 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/theme-default.d.ts @@ -0,0 +1,187 @@ +export function getThemeVariables(userOverrides: any): Theme; +declare class Theme { + background: string; + primaryColor: string; + secondaryColor: string; + tertiaryColor: any; + primaryBorderColor: any; + secondaryBorderColor: any; + tertiaryBorderColor: any; + primaryTextColor: any; + secondaryTextColor: any; + tertiaryTextColor: any; + lineColor: string; + textColor: string; + mainBkg: string; + secondBkg: string; + border1: string; + border2: string; + arrowheadColor: string; + fontFamily: string; + fontSize: string; + labelBackground: string; + THEME_COLOR_LIMIT: number; + nodeBkg: string; + nodeBorder: string; + clusterBkg: string; + clusterBorder: string; + defaultLinkColor: string; + titleColor: string; + edgeLabelBackground: string; + actorBorder: string; + actorBkg: string; + actorTextColor: string; + actorLineColor: string; + signalColor: string; + signalTextColor: string; + labelBoxBkgColor: string; + labelBoxBorderColor: string; + labelTextColor: string; + loopTextColor: string; + noteBorderColor: string; + noteBkgColor: string; + noteTextColor: string; + activationBorderColor: string; + activationBkgColor: string; + sequenceNumberColor: string; + sectionBkgColor: any; + altSectionBkgColor: string; + sectionBkgColor2: string; + excludeBkgColor: string; + taskBorderColor: string; + taskBkgColor: string; + taskTextLightColor: string; + taskTextColor: string; + taskTextDarkColor: string; + taskTextOutsideColor: string; + taskTextClickableColor: string; + activeTaskBorderColor: string; + activeTaskBkgColor: string; + gridColor: string; + doneTaskBkgColor: string; + doneTaskBorderColor: string; + critBorderColor: string; + critBkgColor: string; + todayLineColor: string; + personBorder: any; + personBkg: string; + labelColor: string; + errorBkgColor: string; + errorTextColor: string; + updateColors(): void; + cScale0: any; + cScale1: any; + cScale2: any; + cScale3: any; + cScale4: any; + cScale5: any; + cScale6: any; + cScale7: any; + cScale8: any; + cScale9: any; + cScale10: any; + cScale11: any; + scaleLabelColor: any; + cScaleLabel0: any; + cScaleLabel3: any; + transitionColor: any; + transitionLabelColor: any; + stateLabelColor: any; + stateBkg: any; + labelBackgroundColor: any; + compositeBackground: any; + altBackground: any; + compositeTitleBackground: any; + compositeBorder: any; + innerEndBackground: string | undefined; + specialStateColor: string | undefined; + classText: any; + fillType0: string | undefined; + fillType1: string | undefined; + fillType2: any; + fillType3: any; + fillType4: any; + fillType5: any; + fillType6: any; + fillType7: any; + pie1: any; + pie2: any; + pie3: any; + pie4: any; + pie5: any; + pie6: any; + pie7: any; + pie8: any; + pie9: any; + pie10: any; + pie11: any; + pie12: any; + pieTitleTextSize: any; + pieTitleTextColor: any; + pieSectionTextSize: any; + pieSectionTextColor: any; + pieLegendTextSize: any; + pieLegendTextColor: any; + pieStrokeColor: any; + pieStrokeWidth: any; + pieOuterStrokeWidth: any; + pieOuterStrokeColor: any; + pieOpacity: any; + quadrant1Fill: any; + quadrant2Fill: any; + quadrant3Fill: any; + quadrant4Fill: any; + quadrant1TextFill: any; + quadrant2TextFill: any; + quadrant3TextFill: any; + quadrant4TextFill: any; + quadrantPointFill: any; + quadrantPointTextFill: any; + quadrantXAxisTextFill: any; + quadrantYAxisTextFill: any; + quadrantInternalBorderStrokeFill: any; + quadrantExternalBorderStrokeFill: any; + quadrantTitleFill: any; + requirementBackground: any; + requirementBorderColor: any; + requirementBorderSize: any; + requirementTextColor: any; + relationColor: any; + relationLabelBackground: any; + relationLabelColor: any; + git0: any; + git1: any; + git2: any; + git3: any; + git4: any; + git5: any; + git6: any; + git7: any; + gitInv0: any; + gitInv1: any; + gitInv2: any; + gitInv3: any; + gitInv4: any; + gitInv5: any; + gitInv6: any; + gitInv7: any; + gitBranchLabel0: any; + gitBranchLabel1: any; + gitBranchLabel2: any; + gitBranchLabel3: any; + gitBranchLabel4: any; + gitBranchLabel5: any; + gitBranchLabel6: any; + gitBranchLabel7: any; + tagLabelColor: any; + tagLabelBackground: any; + tagLabelBorder: any; + tagLabelFontSize: any; + commitLabelColor: any; + commitLabelBackground: any; + commitLabelFontSize: any; + attributeBackgroundColorOdd: any; + attributeBackgroundColorEven: any; + calculate(overrides: any): void; +} +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/themes/theme-forest.d.ts b/webroot/js/node_modules/mermaid/dist/themes/theme-forest.d.ts new file mode 100644 index 0000000..79b9130 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/theme-forest.d.ts @@ -0,0 +1,184 @@ +export function getThemeVariables(userOverrides: any): Theme; +declare class Theme { + background: string; + primaryColor: string; + secondaryColor: string; + mainBkg: string; + secondBkg: string; + lineColor: any; + border1: string; + border2: string; + arrowheadColor: string; + fontFamily: string; + fontSize: string; + tertiaryColor: any; + primaryBorderColor: any; + secondaryBorderColor: any; + tertiaryBorderColor: any; + primaryTextColor: any; + secondaryTextColor: any; + tertiaryTextColor: any; + textColor: any; + THEME_COLOR_LIMIT: number; + nodeBkg: string; + nodeBorder: string; + clusterBkg: string; + clusterBorder: string; + defaultLinkColor: string; + titleColor: string; + edgeLabelBackground: string; + actorBorder: string; + actorBkg: string; + actorTextColor: string; + actorLineColor: string; + signalColor: string; + signalTextColor: string; + labelBoxBkgColor: string; + labelBoxBorderColor: string; + labelTextColor: string; + loopTextColor: string; + noteBorderColor: string; + noteBkgColor: string; + noteTextColor: string; + activationBorderColor: string; + activationBkgColor: string; + sequenceNumberColor: string; + sectionBkgColor: string; + altSectionBkgColor: string; + sectionBkgColor2: string; + excludeBkgColor: string; + taskBorderColor: string; + taskBkgColor: string; + taskTextLightColor: string; + taskTextColor: string; + taskTextDarkColor: string; + taskTextOutsideColor: string; + taskTextClickableColor: string; + activeTaskBorderColor: string; + activeTaskBkgColor: string; + gridColor: string; + doneTaskBkgColor: string; + doneTaskBorderColor: string; + critBorderColor: string; + critBkgColor: string; + todayLineColor: string; + personBorder: any; + personBkg: string; + labelColor: string; + errorBkgColor: string; + errorTextColor: string; + updateColors(): void; + cScale0: any; + cScale1: any; + cScale2: any; + cScale3: any; + cScale4: any; + cScale5: any; + cScale6: any; + cScale7: any; + cScale8: any; + cScale9: any; + cScale10: any; + cScale11: any; + scaleLabelColor: any; + transitionColor: any; + transitionLabelColor: any; + stateLabelColor: any; + stateBkg: any; + labelBackgroundColor: any; + compositeBackground: any; + altBackground: any; + compositeTitleBackground: any; + compositeBorder: any; + innerEndBackground: any; + specialStateColor: any; + classText: any; + fillType0: string | undefined; + fillType1: string | undefined; + fillType2: any; + fillType3: any; + fillType4: any; + fillType5: any; + fillType6: any; + fillType7: any; + pie1: any; + pie2: any; + pie3: any; + pie4: any; + pie5: any; + pie6: any; + pie7: any; + pie8: any; + pie9: any; + pie10: any; + pie11: any; + pie12: any; + pieTitleTextSize: any; + pieTitleTextColor: any; + pieSectionTextSize: any; + pieSectionTextColor: any; + pieLegendTextSize: any; + pieLegendTextColor: any; + pieStrokeColor: any; + pieStrokeWidth: any; + pieOuterStrokeWidth: any; + pieOuterStrokeColor: any; + pieOpacity: any; + quadrant1Fill: any; + quadrant2Fill: any; + quadrant3Fill: any; + quadrant4Fill: any; + quadrant1TextFill: any; + quadrant2TextFill: any; + quadrant3TextFill: any; + quadrant4TextFill: any; + quadrantPointFill: any; + quadrantPointTextFill: any; + quadrantXAxisTextFill: any; + quadrantYAxisTextFill: any; + quadrantInternalBorderStrokeFill: any; + quadrantExternalBorderStrokeFill: any; + quadrantTitleFill: any; + requirementBackground: any; + requirementBorderColor: any; + requirementBorderSize: any; + requirementTextColor: any; + relationColor: any; + relationLabelBackground: any; + relationLabelColor: any; + git0: any; + git1: any; + git2: any; + git3: any; + git4: any; + git5: any; + git6: any; + git7: any; + gitInv0: any; + gitInv1: any; + gitInv2: any; + gitInv3: any; + gitInv4: any; + gitInv5: any; + gitInv6: any; + gitInv7: any; + gitBranchLabel0: any; + gitBranchLabel1: any; + gitBranchLabel2: any; + gitBranchLabel3: any; + gitBranchLabel4: any; + gitBranchLabel5: any; + gitBranchLabel6: any; + gitBranchLabel7: any; + tagLabelColor: any; + tagLabelBackground: any; + tagLabelBorder: any; + tagLabelFontSize: any; + commitLabelColor: any; + commitLabelBackground: any; + commitLabelFontSize: any; + attributeBackgroundColorOdd: any; + attributeBackgroundColorEven: any; + calculate(overrides: any): void; +} +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/themes/theme-helpers.d.ts b/webroot/js/node_modules/mermaid/dist/themes/theme-helpers.d.ts new file mode 100644 index 0000000..04c349c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/theme-helpers.d.ts @@ -0,0 +1 @@ +export function mkBorder(col: any, darkMode: any): any; diff --git a/webroot/js/node_modules/mermaid/dist/themes/theme-neutral.d.ts b/webroot/js/node_modules/mermaid/dist/themes/theme-neutral.d.ts new file mode 100644 index 0000000..fad1a6a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/themes/theme-neutral.d.ts @@ -0,0 +1,181 @@ +export function getThemeVariables(userOverrides: any): Theme; +declare class Theme { + primaryColor: string; + contrast: string; + secondaryColor: any; + background: string; + tertiaryColor: any; + primaryBorderColor: any; + secondaryBorderColor: any; + tertiaryBorderColor: any; + primaryTextColor: any; + secondaryTextColor: any; + tertiaryTextColor: any; + lineColor: string; + textColor: any; + mainBkg: string; + secondBkg: string; + border1: string; + border2: string; + note: string; + text: string; + critical: string; + done: string; + arrowheadColor: string; + fontFamily: string; + fontSize: string; + THEME_COLOR_LIMIT: number; + nodeBkg: string; + nodeBorder: string; + clusterBkg: string; + clusterBorder: string; + defaultLinkColor: string; + titleColor: string; + edgeLabelBackground: string; + actorBorder: string; + actorBkg: string; + actorTextColor: string; + actorLineColor: string; + signalColor: string; + signalTextColor: string; + labelBoxBkgColor: string; + labelBoxBorderColor: string; + labelTextColor: string; + loopTextColor: string; + noteBorderColor: string; + noteBkgColor: string; + noteTextColor: string; + activationBorderColor: string; + activationBkgColor: string; + sequenceNumberColor: string; + sectionBkgColor: string; + altSectionBkgColor: string; + sectionBkgColor2: string; + excludeBkgColor: string; + taskBorderColor: string; + taskBkgColor: string; + taskTextLightColor: string; + taskTextColor: string; + taskTextDarkColor: string; + taskTextOutsideColor: string; + taskTextClickableColor: string; + activeTaskBorderColor: string; + activeTaskBkgColor: string; + gridColor: string; + doneTaskBkgColor: string; + doneTaskBorderColor: string; + critBkgColor: string; + critBorderColor: string; + todayLineColor: string; + personBorder: any; + personBkg: string; + labelColor: string; + errorBkgColor: string; + errorTextColor: string; + updateColors(): void; + cScale0: any; + cScale1: any; + cScale2: any; + cScale3: any; + cScale4: any; + cScale5: any; + cScale6: any; + cScale7: any; + cScale8: any; + cScale9: any; + cScale10: any; + cScale11: any; + scaleLabelColor: any; + cScaleLabel0: any; + cScaleLabel2: any; + transitionColor: any; + transitionLabelColor: any; + stateLabelColor: any; + stateBkg: any; + labelBackgroundColor: any; + compositeBackground: any; + altBackground: any; + compositeTitleBackground: any; + stateBorder: any; + innerEndBackground: any; + specialStateColor: string | undefined; + classText: any; + fillType0: string | undefined; + fillType1: any; + fillType2: any; + fillType3: any; + fillType4: any; + fillType5: any; + fillType6: any; + fillType7: any; + pie12: any; + pieTitleTextSize: any; + pieTitleTextColor: any; + pieSectionTextSize: any; + pieSectionTextColor: any; + pieLegendTextSize: any; + pieLegendTextColor: any; + pieStrokeColor: any; + pieStrokeWidth: any; + pieOuterStrokeWidth: any; + pieOuterStrokeColor: any; + pieOpacity: any; + quadrant1Fill: any; + quadrant2Fill: any; + quadrant3Fill: any; + quadrant4Fill: any; + quadrant1TextFill: any; + quadrant2TextFill: any; + quadrant3TextFill: any; + quadrant4TextFill: any; + quadrantPointFill: any; + quadrantPointTextFill: any; + quadrantXAxisTextFill: any; + quadrantYAxisTextFill: any; + quadrantInternalBorderStrokeFill: any; + quadrantExternalBorderStrokeFill: any; + quadrantTitleFill: any; + requirementBackground: any; + requirementBorderColor: any; + requirementBorderSize: any; + requirementTextColor: any; + relationColor: any; + relationLabelBackground: any; + relationLabelColor: any; + git0: any; + git1: any; + git2: any; + git3: any; + git4: any; + git5: any; + git6: any; + git7: any; + gitInv0: any; + gitInv1: any; + gitInv2: any; + gitInv3: any; + gitInv4: any; + gitInv5: any; + gitInv6: any; + gitInv7: any; + branchLabelColor: any; + gitBranchLabel0: any; + gitBranchLabel1: string | undefined; + gitBranchLabel2: any; + gitBranchLabel3: string | undefined; + gitBranchLabel4: any; + gitBranchLabel5: any; + gitBranchLabel6: any; + gitBranchLabel7: any; + tagLabelColor: any; + tagLabelBackground: any; + tagLabelBorder: any; + tagLabelFontSize: any; + commitLabelColor: any; + commitLabelBackground: any; + commitLabelFontSize: any; + attributeBackgroundColorOdd: any; + attributeBackgroundColorEven: any; + calculate(overrides: any): void; +} +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/timeline-definition-5dc05eb7.js b/webroot/js/node_modules/mermaid/dist/timeline-definition-5dc05eb7.js new file mode 100644 index 0000000..68bd4f4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/timeline-definition-5dc05eb7.js @@ -0,0 +1,795 @@ +import { aS as ft, E as gt, j, c as mt, l as T, r as xt, aT as bt, aU as kt, aV as _t } from "./mermaid-e4a58915.js"; +import { d as D } from "./arc-dcf06dea.js"; +import "./constant-2fe7eae5.js"; +var K = function() { + var n = function(f, i, r, h) { + for (r = r || {}, h = f.length; h--; r[f[h]] = i) + ; + return r; + }, t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], s = [1, 11], c = [1, 12], o = [1, 13], y = [1, 16], g = [1, 17], u = { + trace: function() { + }, + yy: {}, + symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 }, + terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]], + performAction: function(i, r, h, d, p, l, w) { + var x = l.length - 1; + switch (p) { + case 1: + return l[x - 1]; + case 2: + this.$ = []; + break; + case 3: + l[x - 1].push(l[x]), this.$ = l[x - 1]; + break; + case 4: + case 5: + this.$ = l[x]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + d.getCommonDb().setDiagramTitle(l[x].substr(6)), this.$ = l[x].substr(6); + break; + case 9: + this.$ = l[x].trim(), d.getCommonDb().setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = l[x].trim(), d.getCommonDb().setAccDescription(this.$); + break; + case 12: + d.addSection(l[x].substr(8)), this.$ = l[x].substr(8); + break; + case 15: + d.addTask(l[x], 0, ""), this.$ = l[x]; + break; + case 16: + d.addEvent(l[x].substr(2)), this.$ = l[x]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: a, 14: s, 16: c, 17: o, 18: 14, 19: 15, 20: y, 21: g }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: a, 14: s, 16: c, 17: o, 18: 14, 19: 15, 20: y, 21: g }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])], + defaultActions: {}, + parseError: function(i, r) { + if (r.recoverable) + this.trace(i); + else { + var h = new Error(i); + throw h.hash = r, h; + } + }, + parse: function(i) { + var r = this, h = [0], d = [], p = [null], l = [], w = this.table, x = "", N = 0, A = 0, F = 2, q = 1, W = l.slice.call(arguments, 1), b = Object.create(this.lexer), S = { yy: {} }; + for (var _ in this.yy) + Object.prototype.hasOwnProperty.call(this.yy, _) && (S.yy[_] = this.yy[_]); + b.setInput(i, S.yy), S.yy.lexer = b, S.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {}); + var I = b.yylloc; + l.push(I); + var P = b.options && b.options.ranges; + typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + function C() { + var M; + return M = d.pop() || b.lex() || q, typeof M != "number" && (M instanceof Array && (d = M, M = d.pop()), M = r.symbols_[M] || M), M; + } + for (var k, L, E, Z, z = {}, B, $, Y, O; ; ) { + if (L = h[h.length - 1], this.defaultActions[L] ? E = this.defaultActions[L] : ((k === null || typeof k > "u") && (k = C()), E = w[L] && w[L][k]), typeof E > "u" || !E.length || !E[0]) { + var J = ""; + O = []; + for (B in w[L]) + this.terminals_[B] && B > F && O.push("'" + this.terminals_[B] + "'"); + b.showPosition ? J = "Parse error on line " + (N + 1) + `: +` + b.showPosition() + ` +Expecting ` + O.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : J = "Parse error on line " + (N + 1) + ": Unexpected " + (k == q ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(J, { + text: b.match, + token: this.terminals_[k] || k, + line: b.yylineno, + loc: I, + expected: O + }); + } + if (E[0] instanceof Array && E.length > 1) + throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + k); + switch (E[0]) { + case 1: + h.push(k), p.push(b.yytext), l.push(b.yylloc), h.push(E[1]), k = null, A = b.yyleng, x = b.yytext, N = b.yylineno, I = b.yylloc; + break; + case 2: + if ($ = this.productions_[E[1]][1], z.$ = p[p.length - $], z._$ = { + first_line: l[l.length - ($ || 1)].first_line, + last_line: l[l.length - 1].last_line, + first_column: l[l.length - ($ || 1)].first_column, + last_column: l[l.length - 1].last_column + }, P && (z._$.range = [ + l[l.length - ($ || 1)].range[0], + l[l.length - 1].range[1] + ]), Z = this.performAction.apply(z, [ + x, + A, + N, + S.yy, + E[1], + p, + l + ].concat(W)), typeof Z < "u") + return Z; + $ && (h = h.slice(0, -1 * $ * 2), p = p.slice(0, -1 * $), l = l.slice(0, -1 * $)), h.push(this.productions_[E[1]][0]), p.push(z.$), l.push(z._$), Y = w[h[h.length - 2]][h[h.length - 1]], h.push(Y); + break; + case 3: + return !0; + } + } + return !0; + } + }, m = function() { + var f = { + EOF: 1, + parseError: function(r, h) { + if (this.yy.parser) + this.yy.parser.parseError(r, h); + else + throw new Error(r); + }, + // resets the lexer, sets new input + setInput: function(i, r) { + return this.yy = r || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + // consumes and returns one char from the input + input: function() { + var i = this._input[0]; + this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i; + var r = i.match(/(?:\r\n?|\n).*/g); + return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i; + }, + // unshifts one char (or a string) into the input + unput: function(i) { + var r = i.length, h = i.split(/(?:\r\n?|\n)/g); + this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r; + var d = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1); + var p = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: h ? (h.length === d.length ? this.yylloc.first_column : 0) + d[d.length - h.length].length - h[0].length : this.yylloc.first_column - r + }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + return this._more = !0, this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) + this._backtrack = !0; + else + return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + // retain first n characters of the match + less: function(i) { + this.unput(this.match.slice(i)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var i = this.matched.substr(0, this.matched.length - this.match.length); + return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var i = this.match; + return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var i = this.pastInput(), r = new Array(i.length + 1).join("-"); + return i + this.upcomingInput() + ` +` + r + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(i, r) { + var h, d, p; + if (this.options.backtrack_lexer && (p = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length + }, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], h = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h) + return h; + if (this._backtrack) { + for (var l in p) + this[l] = p[l]; + return !1; + } + return !1; + }, + // return next match in input + next: function() { + if (this.done) + return this.EOF; + this._input || (this.done = !0); + var i, r, h, d; + this._more || (this.yytext = "", this.match = ""); + for (var p = this._currentRules(), l = 0; l < p.length; l++) + if (h = this._input.match(this.rules[p[l]]), h && (!r || h[0].length > r[0].length)) { + if (r = h, d = l, this.options.backtrack_lexer) { + if (i = this.test_match(h, p[l]), i !== !1) + return i; + if (this._backtrack) { + r = !1; + continue; + } else + return !1; + } else if (!this.options.flex) + break; + } + return r ? (i = this.test_match(r, p[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + // return next match that has a token + lex: function() { + var r = this.next(); + return r || this.lex(); + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function(r) { + this.conditionStack.push(r); + }, + // pop the previously active lexer condition state off the condition stack + popState: function() { + var r = this.conditionStack.length - 1; + return r > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function(r) { + return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL"; + }, + // alias for begin(condition) + pushState: function(r) { + this.begin(r); + }, + // return the number of states currently on the stack + stateStackSize: function() { + return this.conditionStack.length; + }, + options: { "case-insensitive": !0 }, + performAction: function(r, h, d, p) { + switch (d) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + return this.begin("acc_title"), 12; + case 8: + return this.popState(), "acc_title_value"; + case 9: + return this.begin("acc_descr"), 14; + case 10: + return this.popState(), "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 21; + case 16: + return 20; + case 17: + return 6; + case 18: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], inclusive: !0 } } + }; + return f; + }(); + u.lexer = m; + function v() { + this.yy = {}; + } + return v.prototype = u, u.Parser = v, new v(); +}(); +K.parser = K; +const vt = K; +let R = "", st = 0; +const Q = [], G = [], V = [], it = () => ft, rt = function() { + Q.length = 0, G.length = 0, R = "", V.length = 0, gt(); +}, at = function(n) { + R = n, Q.push(n); +}, lt = function() { + return Q; +}, ot = function() { + let n = tt(); + const t = 100; + let e = 0; + for (; !n && e < t; ) + n = tt(), e++; + return G.push(...V), G; +}, ct = function(n, t, e) { + const a = { + id: st++, + section: R, + type: R, + task: n, + score: t || 0, + //if event is defined, then add it the events array + events: e ? [e] : [] + }; + V.push(a); +}, ht = function(n) { + V.find((e) => e.id === st - 1).events.push(n); +}, dt = function(n) { + const t = { + section: R, + type: R, + description: n, + task: n, + classes: [] + }; + G.push(t); +}, tt = function() { + const n = function(e) { + return V[e].processed; + }; + let t = !0; + for (const [e, a] of V.entries()) + n(e), t = t && a.processed; + return t; +}, wt = { + clear: rt, + getCommonDb: it, + addSection: at, + getSections: lt, + getTasks: ot, + addTask: ct, + addTaskOrg: dt, + addEvent: ht +}, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addEvent: ht, + addSection: at, + addTask: ct, + addTaskOrg: dt, + clear: rt, + default: wt, + getCommonDb: it, + getSections: lt, + getTasks: ot +}, Symbol.toStringTag, { value: "Module" })), Et = 12, U = function(n, t) { + const e = n.append("rect"); + return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e; +}, Tt = function(n, t) { + const a = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = n.append("g"); + s.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), s.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function c(g) { + const u = D().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175); + g.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")"); + } + function o(g) { + const u = D().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175); + g.append("path").attr("class", "mouth").attr("d", u).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")"); + } + function y(g) { + g.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + return t.score > 3 ? c(s) : t.score < 3 ? o(s) : y(s), a; +}, It = function(n, t) { + const e = n.append("circle"); + return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e; +}, ut = function(n, t) { + const e = t.text.replace(//gi, " "), a = n.append("text"); + a.attr("x", t.x), a.attr("y", t.y), a.attr("class", "legend"), a.style("text-anchor", t.anchor), t.class !== void 0 && a.attr("class", t.class); + const s = a.append("tspan"); + return s.attr("x", t.x + t.textMargin * 2), s.text(e), a; +}, Nt = function(n, t) { + function e(s, c, o, y, g) { + return s + "," + c + " " + (s + o) + "," + c + " " + (s + o) + "," + (c + y - g) + " " + (s + o - g * 1.2) + "," + (c + y) + " " + s + "," + (c + y); + } + const a = n.append("polygon"); + a.attr("points", e(t.x, t.y, 50, 20, 7)), a.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ut(n, t); +}, $t = function(n, t, e) { + const a = n.append("g"), s = X(); + s.x = t.x, s.y = t.y, s.fill = t.fill, s.width = e.width, s.height = e.height, s.class = "journey-section section-type-" + t.num, s.rx = 3, s.ry = 3, U(a, s), pt(e)( + t.text, + a, + s.x, + s.y, + s.width, + s.height, + { class: "journey-section section-type-" + t.num }, + e, + t.colour + ); +}; +let et = -1; +const Mt = function(n, t, e) { + const a = t.x + e.width / 2, s = n.append("g"); + et++; + const c = 300 + 5 * 30; + s.append("line").attr("id", "task" + et).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", c).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Tt(s, { + cx: a, + cy: 300 + (5 - t.score) * 30, + score: t.score + }); + const o = X(); + o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = e.width, o.height = e.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, U(s, o), t.x + 14, pt(e)( + t.task, + s, + o.x, + o.y, + o.width, + o.height, + { class: "task" }, + e, + t.colour + ); +}, Lt = function(n, t) { + U(n, { + x: t.startx, + y: t.starty, + width: t.stopx - t.startx, + height: t.stopy - t.starty, + fill: t.fill, + class: "rect" + }).lower(); +}, At = function() { + return { + x: 0, + y: 0, + fill: void 0, + "text-anchor": "start", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; +}, X = function() { + return { + x: 0, + y: 0, + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}, pt = function() { + function n(s, c, o, y, g, u, m, v) { + const f = c.append("text").attr("x", o + g / 2).attr("y", y + u / 2 + 5).style("font-color", v).style("text-anchor", "middle").text(s); + a(f, m); + } + function t(s, c, o, y, g, u, m, v, f) { + const { taskFontSize: i, taskFontFamily: r } = v, h = s.split(//gi); + for (let d = 0; d < h.length; d++) { + const p = d * i - i * (h.length - 1) / 2, l = c.append("text").attr("x", o + g / 2).attr("y", y).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", r); + l.append("tspan").attr("x", o + g / 2).attr("dy", p).text(h[d]), l.attr("y", y + u / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(l, m); + } + } + function e(s, c, o, y, g, u, m, v) { + const f = c.append("switch"), r = f.append("foreignObject").attr("x", o).attr("y", y).attr("width", g).attr("height", u).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + r.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, f, o, y, g, u, m, v), a(r, m); + } + function a(s, c) { + for (const o in c) + o in c && s.attr(o, c[o]); + } + return function(s) { + return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t; + }; +}(), Pt = function(n) { + n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +function yt(n, t) { + n.each(function() { + var e = j(this), a = e.text().split(/(\s+|
)/).reverse(), s, c = [], o = 1.1, y = e.attr("y"), g = parseFloat(e.attr("dy")), u = e.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", g + "em"); + for (let m = 0; m < a.length; m++) + s = a[a.length - 1 - m], c.push(s), u.text(c.join(" ").trim()), (u.node().getComputedTextLength() > t || s === "
") && (c.pop(), u.text(c.join(" ").trim()), s === "
" ? c = [""] : c = [s], u = e.append("tspan").attr("x", 0).attr("y", y).attr("dy", o + "em").text(s)); + }); +} +const Ht = function(n, t, e, a) { + const s = e % Et - 1, c = n.append("g"); + t.section = s, c.attr( + "class", + (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + s) + ); + const o = c.append("g"), y = c.append("g"), u = y.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), m = a.fontSize && a.fontSize.replace ? a.fontSize.replace("px", "") : a.fontSize; + return t.height = u.height + m * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, y.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), zt(o, t, s), t; +}, Ct = function(n, t, e) { + const a = n.append("g"), c = a.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), o = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize; + return a.remove(), c.height + o * 1.1 * 0.5 + t.padding; +}, zt = function(n, t, e) { + n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr( + "d", + `M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z` + ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height); +}, H = { + drawRect: U, + drawCircle: It, + drawSection: $t, + drawText: ut, + drawLabel: Nt, + drawTask: Mt, + drawBackgroundRect: Lt, + getTextObj: At, + getNoteRect: X, + initGraphics: Pt, + drawNode: Ht, + getVirtualNodeHeight: Ct +}, Rt = function(n, t, e, a) { + var W, b; + const s = mt(), c = s.leftMargin ?? 50; + T.debug("timeline", a.db); + const o = s.securityLevel; + let y; + o === "sandbox" && (y = j("#i" + t)); + const u = (o === "sandbox" ? j(y.nodes()[0].contentDocument.body) : j("body")).select("#" + t); + u.append("g"); + const m = a.db.getTasks(), v = a.db.getCommonDb().getDiagramTitle(); + T.debug("task", m), H.initGraphics(u); + const f = a.db.getSections(); + T.debug("sections", f); + let i = 0, r = 0, h = 0, d = 0, p = 50 + c, l = 50; + d = 50; + let w = 0, x = !0; + f.forEach(function(S) { + const _ = { + number: w, + descr: S, + section: w, + width: 150, + padding: 20, + maxHeight: i + }, I = H.getVirtualNodeHeight(u, _, s); + T.debug("sectionHeight before draw", I), i = Math.max(i, I + 20); + }); + let N = 0, A = 0; + T.debug("tasks.length", m.length); + for (const [S, _] of m.entries()) { + const I = { + number: S, + descr: _, + section: _.section, + width: 150, + padding: 20, + maxHeight: r + }, P = H.getVirtualNodeHeight(u, I, s); + T.debug("taskHeight before draw", P), r = Math.max(r, P + 20), N = Math.max(N, _.events.length); + let C = 0; + for (let k = 0; k < _.events.length; k++) { + const E = { + descr: _.events[k], + section: _.section, + number: _.section, + width: 150, + padding: 20, + maxHeight: 50 + }; + C += H.getVirtualNodeHeight(u, E, s); + } + A = Math.max(A, C); + } + T.debug("maxSectionHeight before draw", i), T.debug("maxTaskHeight before draw", r), f && f.length > 0 ? f.forEach((S) => { + const _ = m.filter((k) => k.section === S), I = { + number: w, + descr: S, + section: w, + width: 200 * Math.max(_.length, 1) - 50, + padding: 20, + maxHeight: i + }; + T.debug("sectionNode", I); + const P = u.append("g"), C = H.drawNode(P, I, w, s); + T.debug("sectionNode output", C), P.attr("transform", `translate(${p}, ${d})`), l += i + 50, _.length > 0 && nt( + u, + _, + w, + p, + l, + r, + s, + N, + A, + i, + !1 + ), p += 200 * Math.max(_.length, 1), l = d, w++; + }) : (x = !1, nt( + u, + m, + w, + p, + l, + r, + s, + N, + A, + i, + !0 + )); + const F = u.node().getBBox(); + T.debug("bounds", F), v && u.append("text").text(v).attr("x", F.width / 2 - c).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), h = x ? i + r + 150 : r + 100, u.append("g").attr("class", "lineWrapper").append("line").attr("x1", c).attr("y1", h).attr("x2", F.width + 3 * c).attr("y2", h).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), xt( + void 0, + u, + ((W = s.timeline) == null ? void 0 : W.padding) ?? 50, + ((b = s.timeline) == null ? void 0 : b.useMaxWidth) ?? !1 + ); +}, nt = function(n, t, e, a, s, c, o, y, g, u, m) { + var v; + for (const f of t) { + const i = { + descr: f.task, + section: e, + number: e, + width: 150, + padding: 20, + maxHeight: c + }; + T.debug("taskNode", i); + const r = n.append("g").attr("class", "taskWrapper"), d = H.drawNode(r, i, e, o).height; + if (T.debug("taskHeight after draw", d), r.attr("transform", `translate(${a}, ${s})`), c = Math.max(c, d), f.events) { + const p = n.append("g").attr("class", "lineWrapper"); + let l = c; + s += 100, l = l + Vt(n, f.events, e, a, s, o), s -= 100, p.append("line").attr("x1", a + 190 / 2).attr("y1", s + c).attr("x2", a + 190 / 2).attr( + "y2", + s + c + (m ? c : u) + g + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + } + a = a + 200, m && !((v = o.timeline) != null && v.disableMulticolor) && e++; + } + s = s - 10; +}, Vt = function(n, t, e, a, s, c) { + let o = 0; + const y = s; + s = s + 100; + for (const g of t) { + const u = { + descr: g, + section: e, + number: e, + width: 150, + padding: 20, + maxHeight: 50 + }; + T.debug("eventNode", u); + const m = n.append("g").attr("class", "eventWrapper"), f = H.drawNode(m, u, e, c).height; + o = o + f, m.attr("transform", `translate(${a}, ${s})`), s = s + 10 + f; + } + return s = y, o; +}, Ft = { + setConf: () => { + }, + draw: Rt +}, Wt = (n) => { + let t = ""; + for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) + n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], bt(n["lineColor" + e]) ? n["lineColor" + e] = kt(n["lineColor" + e], 20) : n["lineColor" + e] = _t(n["lineColor" + e], 20); + for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) { + const a = "" + (17 - 3 * e); + t += ` + .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path { + fill: ${n["cScale" + e]}; + } + .section-${e - 1} text { + fill: ${n["cScaleLabel" + e]}; + } + .node-icon-${e - 1} { + font-size: 40px; + color: ${n["cScaleLabel" + e]}; + } + .section-edge-${e - 1}{ + stroke: ${n["cScale" + e]}; + } + .edge-depth-${e - 1}{ + stroke-width: ${a}; + } + .section-${e - 1} line { + stroke: ${n["cScaleInv" + e]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${n["cScaleLabel" + e]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return t; +}, Bt = (n) => ` + .edge { + stroke-width: 3; + } + ${Wt(n)} + .section-root rect, .section-root path, .section-root circle { + fill: ${n.git0}; + } + .section-root text { + fill: ${n.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`, Ot = Bt, qt = { + db: St, + renderer: Ft, + parser: vt, + styles: Ot +}; +export { + qt as diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/timeline-definition-8b56e66a.js b/webroot/js/node_modules/mermaid/dist/timeline-definition-8b56e66a.js new file mode 100644 index 0000000..72c45b1 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/timeline-definition-8b56e66a.js @@ -0,0 +1,1219 @@ +import { K as commonDb, t as clear$1, c as getConfig, l as log, o as setupGraphViewbox } from "./mermaid-0d192ec3.js"; +import { select, arc } from "d3"; +import { isDark, lighten, darken } from "khroma"; +import "ts-dedent"; +import "dayjs"; +import "@braintree/sanitize-url"; +import "dompurify"; +import "lodash-es/memoize.js"; +import "lodash-es/merge.js"; +import "stylis"; +import "lodash-es/isEmpty.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.getCommonDb().setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 15: + yy.addTask($$[$0], 0, ""); + this.$ = $$[$0]; + break; + case 16: + yy.addEvent($$[$0].substr(2)); + this.$ = $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 21; + case 16: + return 20; + case 17: + return 6; + case 18: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +let currentTaskId = 0; +const sections = []; +const tasks = []; +const rawTasks = []; +const getCommonDb = () => commonDb; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + clear$1(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const addTask = function(period, length, event) { + const rawTask = { + id: currentTaskId++, + section: currentSection, + type: currentSection, + task: period, + score: length ? length : 0, + //if event is defined, then add it the events array + events: event ? [event] : [] + }; + rawTasks.push(rawTask); +}; +const addEvent = function(event) { + const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1); + currentTask.events.push(event); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const timelineDb = { + clear, + getCommonDb, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + addEvent +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addEvent, + addSection, + addTask, + addTaskOrg, + clear, + default: timelineDb, + getCommonDb, + getSections, + getTasks +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +const drawRect = function(elem, rectData) { + const rectElem = elem.append("rect"); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.y); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", rectData.width); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (rectData.class !== void 0) { + rectElem.attr("class", rectData.class); + } + return rectElem; +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc$1 = arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc$1 = arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + const nText = textData.text.replace(//gi, " "); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.text(nText); + return textElem; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf) { + const g = elem.append("g"); + const rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf) { + const center = task.x + conf.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + task.x + 14; + _drawTextCandidateFunc(conf)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds) { + const rectElem = drawRect(elem, { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + class: "rect" + }); + rectElem.lower(); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + "text-anchor": "start", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) { + const { taskFontSize, taskFontFamily } = conf; + const lines = content.split(//gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf) { + return conf.textPlacement === "fo" ? byFo : conf.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +function wrap(text, width) { + text.each(function() { + var text2 = select(this), words = text2.text().split(/(\s+|
)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line.push(word); + tspan.text(line.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width || word === "
") { + line.pop(); + tspan.text(line.join(" ").trim()); + if (word === "
") { + line = [""]; + } else { + line = [word]; + } + tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); + } + } + }); +} +const drawNode = function(elem, node, fullSection, conf) { + const section = fullSection % MAX_SECTIONS - 1; + const nodeElem = elem.append("g"); + node.section = section; + nodeElem.attr( + "class", + (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section) + ); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.height = Math.max(node.height, node.maxHeight); + node.width = node.width + 2 * node.padding; + textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); + defaultBkg(bkgElem, node, section); + return node; +}; +const getVirtualNodeHeight = function(elem, node, conf) { + const textElem = elem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + textElem.remove(); + return bbox.height + fontSize * 1.1 * 0.5 + node.padding; +}; +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + getTextObj, + getNoteRect, + initGraphics, + drawNode, + getVirtualNodeHeight +}; +const draw = function(text, id, version, diagObj) { + var _a, _b; + const conf = getConfig(); + const LEFT_MARGIN = conf.leftMargin ?? 50; + log.debug("timeline", diagObj.db); + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = select("#i" + id); + } + const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); + const svg = root.select("#" + id); + svg.append("g"); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getCommonDb().getDiagramTitle(); + log.debug("task", tasks2); + svgDraw.initGraphics(svg); + const sections2 = diagObj.db.getSections(); + log.debug("sections", sections2); + let maxSectionHeight = 0; + let maxTaskHeight = 0; + let depthY = 0; + let sectionBeginY = 0; + let masterX = 50 + LEFT_MARGIN; + let masterY = 50; + sectionBeginY = 50; + let sectionNumber = 0; + let hasSections = true; + sections2.forEach(function(section) { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf); + log.debug("sectionHeight before draw", sectionHeight); + maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20); + }); + let maxEventCount = 0; + let maxEventLineLength = 0; + log.debug("tasks.length", tasks2.length); + for (const [i, task] of tasks2.entries()) { + const taskNode = { + number: i, + descr: task, + section: task.section, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf); + log.debug("taskHeight before draw", taskHeight); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20); + maxEventCount = Math.max(maxEventCount, task.events.length); + let maxEventLineLengthTemp = 0; + for (let j = 0; j < task.events.length; j++) { + const event = task.events[j]; + const eventNode = { + descr: event, + section: task.section, + number: task.section, + width: 150, + padding: 20, + maxHeight: 50 + }; + maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf); + } + maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp); + } + log.debug("maxSectionHeight before draw", maxSectionHeight); + log.debug("maxTaskHeight before draw", maxTaskHeight); + if (sections2 && sections2.length > 0) { + sections2.forEach((section) => { + const tasksForSection = tasks2.filter((task) => task.section === section); + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 200 * Math.max(tasksForSection.length, 1) - 50, + padding: 20, + maxHeight: maxSectionHeight + }; + log.debug("sectionNode", sectionNode); + const sectionNodeWrapper = svg.append("g"); + const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf); + log.debug("sectionNode output", node); + sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); + masterY += maxSectionHeight + 50; + if (tasksForSection.length > 0) { + drawTasks( + svg, + tasksForSection, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + false + ); + } + masterX += 200 * Math.max(tasksForSection.length, 1); + masterY = sectionBeginY; + sectionNumber++; + }); + } else { + hasSections = false; + drawTasks( + svg, + tasks2, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + true + ); + } + const box = svg.node().getBBox(); + log.debug("bounds", box); + if (title) { + svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20); + } + depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; + const lineWrapper = svg.append("g").attr("class", "lineWrapper"); + lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + setupGraphViewbox( + void 0, + svg, + ((_a = conf.timeline) == null ? void 0 : _a.padding) ?? 50, + ((_b = conf.timeline) == null ? void 0 : _b.useMaxWidth) ?? false + ); +}; +const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { + var _a; + for (const task of tasks2) { + const taskNode = { + descr: task.task, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + log.debug("taskNode", taskNode); + const taskWrapper = diagram2.append("g").attr("class", "taskWrapper"); + const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf); + const taskHeight = node.height; + log.debug("taskHeight after draw", taskHeight); + taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight); + if (task.events) { + const lineWrapper = diagram2.append("g").attr("class", "lineWrapper"); + let lineLength = maxTaskHeight; + masterY += 100; + lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf); + masterY -= 100; + lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( + "y2", + masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + } + masterX = masterX + 200; + if (isWithoutSections && !((_a = conf.timeline) == null ? void 0 : _a.disableMulticolor)) { + sectionColor++; + } + } + masterY = masterY - 10; +}; +const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf) { + let maxEventHeight = 0; + const eventBeginY = masterY; + masterY = masterY + 100; + for (const event of events) { + const eventNode = { + descr: event, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: 50 + }; + log.debug("eventNode", eventNode); + const eventWrapper = diagram2.append("g").attr("class", "eventWrapper"); + const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf); + const eventHeight = node.height; + maxEventHeight = maxEventHeight + eventHeight; + eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + masterY = masterY + 10 + eventHeight; + } + masterY = eventBeginY; + return maxEventHeight; +}; +const renderer = { + setConf: () => { + }, + draw +}; +const genSections = (options) => { + let sections2 = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if (isDark(options["lineColor" + i])) { + options["lineColor" + i] = lighten(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = darken(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections2 += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${options["cScaleLabel" + i]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections2; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`; +const styles = getStyles; +const diagram = { + db, + renderer, + parser: parser$1, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/timeline-definition-a4255305.js b/webroot/js/node_modules/mermaid/dist/timeline-definition-a4255305.js new file mode 100644 index 0000000..7d230f3 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/timeline-definition-a4255305.js @@ -0,0 +1,1211 @@ +import { aS as commonDb, E as clear$1, j as d3select, c as getConfig, l as log, r as setupGraphViewbox, aT as isDark, aU as lighten, aV as darken } from "./mermaid-491db2d9.js"; +import { d as d3arc } from "./arc-947d8396.js"; +import "./constant-b644328d.js"; +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.getCommonDb().setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 15: + yy.addTask($$[$0], 0, ""); + this.$ = $$[$0]; + break; + case 16: + yy.addEvent($$[$0].substr(2)); + this.$ = $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 21; + case 16: + return 20; + case 17: + return 6; + case 18: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +let currentTaskId = 0; +const sections = []; +const tasks = []; +const rawTasks = []; +const getCommonDb = () => commonDb; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + clear$1(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const addTask = function(period, length, event) { + const rawTask = { + id: currentTaskId++, + section: currentSection, + type: currentSection, + task: period, + score: length ? length : 0, + //if event is defined, then add it the events array + events: event ? [event] : [] + }; + rawTasks.push(rawTask); +}; +const addEvent = function(event) { + const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1); + currentTask.events.push(event); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const timelineDb = { + clear, + getCommonDb, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + addEvent +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addEvent, + addSection, + addTask, + addTaskOrg, + clear, + default: timelineDb, + getCommonDb, + getSections, + getTasks +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +const drawRect = function(elem, rectData) { + const rectElem = elem.append("rect"); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.y); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", rectData.width); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (rectData.class !== void 0) { + rectElem.attr("class", rectData.class); + } + return rectElem; +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc = d3arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc = d3arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + const nText = textData.text.replace(//gi, " "); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.text(nText); + return textElem; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf) { + const g = elem.append("g"); + const rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf) { + const center = task.x + conf.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + task.x + 14; + _drawTextCandidateFunc(conf)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds) { + const rectElem = drawRect(elem, { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + class: "rect" + }); + rectElem.lower(); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + "text-anchor": "start", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) { + const { taskFontSize, taskFontFamily } = conf; + const lines = content.split(//gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf) { + return conf.textPlacement === "fo" ? byFo : conf.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +function wrap(text, width) { + text.each(function() { + var text2 = d3select(this), words = text2.text().split(/(\s+|
)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line.push(word); + tspan.text(line.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width || word === "
") { + line.pop(); + tspan.text(line.join(" ").trim()); + if (word === "
") { + line = [""]; + } else { + line = [word]; + } + tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); + } + } + }); +} +const drawNode = function(elem, node, fullSection, conf) { + const section = fullSection % MAX_SECTIONS - 1; + const nodeElem = elem.append("g"); + node.section = section; + nodeElem.attr( + "class", + (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section) + ); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.height = Math.max(node.height, node.maxHeight); + node.width = node.width + 2 * node.padding; + textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); + defaultBkg(bkgElem, node, section); + return node; +}; +const getVirtualNodeHeight = function(elem, node, conf) { + const textElem = elem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + textElem.remove(); + return bbox.height + fontSize * 1.1 * 0.5 + node.padding; +}; +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + getTextObj, + getNoteRect, + initGraphics, + drawNode, + getVirtualNodeHeight +}; +const draw = function(text, id, version, diagObj) { + var _a, _b; + const conf = getConfig(); + const LEFT_MARGIN = conf.leftMargin ?? 50; + log.debug("timeline", diagObj.db); + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = d3select("#i" + id); + } + const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body"); + const svg = root.select("#" + id); + svg.append("g"); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getCommonDb().getDiagramTitle(); + log.debug("task", tasks2); + svgDraw.initGraphics(svg); + const sections2 = diagObj.db.getSections(); + log.debug("sections", sections2); + let maxSectionHeight = 0; + let maxTaskHeight = 0; + let depthY = 0; + let sectionBeginY = 0; + let masterX = 50 + LEFT_MARGIN; + let masterY = 50; + sectionBeginY = 50; + let sectionNumber = 0; + let hasSections = true; + sections2.forEach(function(section) { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf); + log.debug("sectionHeight before draw", sectionHeight); + maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20); + }); + let maxEventCount = 0; + let maxEventLineLength = 0; + log.debug("tasks.length", tasks2.length); + for (const [i, task] of tasks2.entries()) { + const taskNode = { + number: i, + descr: task, + section: task.section, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf); + log.debug("taskHeight before draw", taskHeight); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20); + maxEventCount = Math.max(maxEventCount, task.events.length); + let maxEventLineLengthTemp = 0; + for (let j = 0; j < task.events.length; j++) { + const event = task.events[j]; + const eventNode = { + descr: event, + section: task.section, + number: task.section, + width: 150, + padding: 20, + maxHeight: 50 + }; + maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf); + } + maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp); + } + log.debug("maxSectionHeight before draw", maxSectionHeight); + log.debug("maxTaskHeight before draw", maxTaskHeight); + if (sections2 && sections2.length > 0) { + sections2.forEach((section) => { + const tasksForSection = tasks2.filter((task) => task.section === section); + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 200 * Math.max(tasksForSection.length, 1) - 50, + padding: 20, + maxHeight: maxSectionHeight + }; + log.debug("sectionNode", sectionNode); + const sectionNodeWrapper = svg.append("g"); + const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf); + log.debug("sectionNode output", node); + sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); + masterY += maxSectionHeight + 50; + if (tasksForSection.length > 0) { + drawTasks( + svg, + tasksForSection, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + false + ); + } + masterX += 200 * Math.max(tasksForSection.length, 1); + masterY = sectionBeginY; + sectionNumber++; + }); + } else { + hasSections = false; + drawTasks( + svg, + tasks2, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + true + ); + } + const box = svg.node().getBBox(); + log.debug("bounds", box); + if (title) { + svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20); + } + depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; + const lineWrapper = svg.append("g").attr("class", "lineWrapper"); + lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + setupGraphViewbox( + void 0, + svg, + ((_a = conf.timeline) == null ? void 0 : _a.padding) ?? 50, + ((_b = conf.timeline) == null ? void 0 : _b.useMaxWidth) ?? false + ); +}; +const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { + var _a; + for (const task of tasks2) { + const taskNode = { + descr: task.task, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + log.debug("taskNode", taskNode); + const taskWrapper = diagram2.append("g").attr("class", "taskWrapper"); + const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf); + const taskHeight = node.height; + log.debug("taskHeight after draw", taskHeight); + taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight); + if (task.events) { + const lineWrapper = diagram2.append("g").attr("class", "lineWrapper"); + let lineLength = maxTaskHeight; + masterY += 100; + lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf); + masterY -= 100; + lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( + "y2", + masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + } + masterX = masterX + 200; + if (isWithoutSections && !((_a = conf.timeline) == null ? void 0 : _a.disableMulticolor)) { + sectionColor++; + } + } + masterY = masterY - 10; +}; +const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf) { + let maxEventHeight = 0; + const eventBeginY = masterY; + masterY = masterY + 100; + for (const event of events) { + const eventNode = { + descr: event, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: 50 + }; + log.debug("eventNode", eventNode); + const eventWrapper = diagram2.append("g").attr("class", "eventWrapper"); + const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf); + const eventHeight = node.height; + maxEventHeight = maxEventHeight + eventHeight; + eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + masterY = masterY + 10 + eventHeight; + } + masterY = eventBeginY; + return maxEventHeight; +}; +const renderer = { + setConf: () => { + }, + draw +}; +const genSections = (options) => { + let sections2 = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if (isDark(options["lineColor" + i])) { + options["lineColor" + i] = lighten(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = darken(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections2 += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${options["cScaleLabel" + i]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections2; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`; +const styles = getStyles; +const diagram = { + db, + renderer, + parser: parser$1, + styles +}; +export { + diagram +}; diff --git a/webroot/js/node_modules/mermaid/dist/types.d.ts b/webroot/js/node_modules/mermaid/dist/types.d.ts new file mode 100644 index 0000000..c3310fd --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/types.d.ts @@ -0,0 +1,31 @@ +export interface Point { + x: number; + y: number; +} +export interface TextDimensionConfig { + fontSize?: number; + fontWeight?: number; + fontFamily?: string; +} +export interface TextDimensions { + width: number; + height: number; + lineHeight?: number; +} +export interface EdgeData { + arrowheadStyle?: string; + labelpos?: string; + labelType?: string; + label?: string; + classes: string; + pattern: string; + id: string; + arrowhead: string; + startLabelRight: string; + endLabelLeft: string; + arrowTypeStart: string; + arrowTypeEnd: string; + style: string; + labelStyle: string; + curve: any; +} diff --git a/webroot/js/node_modules/mermaid/dist/utils.d.ts b/webroot/js/node_modules/mermaid/dist/utils.d.ts new file mode 100644 index 0000000..ceb0e62 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/utils.d.ts @@ -0,0 +1,274 @@ +import type { CurveFactory } from 'd3'; +import type { MermaidConfig } from './config.type.js'; +import type { D3Element } from './mermaidAPI.js'; +import type { Point, TextDimensionConfig, TextDimensions } from './types.js'; +export declare const ZERO_WIDTH_SPACE = "\u200B"; +/** + * Detects the init config object from the text + * + * @param text - The text defining the graph. For example: + * + * ```mermaid + * %%{init: {"theme": "debug", "logLevel": 1 }}%% + * graph LR + * a-->b + * b-->c + * c-->d + * d-->e + * e-->f + * f-->g + * g-->h + * ``` + * + * Or + * + * ```mermaid + * %%{initialize: {"theme": "dark", logLevel: "debug" }}%% + * graph LR + * a-->b + * b-->c + * c-->d + * d-->e + * e-->f + * f-->g + * g-->h + * ``` + * + * @param config - Optional mermaid configuration object. + * @returns The json object representing the init passed to mermaid.initialize() + */ +export declare const detectInit: (text: string, config?: MermaidConfig) => MermaidConfig | undefined; +interface Directive { + type?: string; + args?: unknown; +} +/** + * Detects the directive from the text. + * + * Text can be single line or multiline. If type is null or omitted, + * the first directive encountered in text will be returned + * + * ```mermaid + * graph LR + * %%{someDirective}%% + * a-->b + * b-->c + * c-->d + * d-->e + * e-->f + * f-->g + * g-->h + * ``` + * + * @param text - The text defining the graph + * @param type - The directive to return (default: `null`) + * @returns An object or Array representing the directive(s) matched by the input type. + * If a single directive was found, that directive object will be returned. + */ +export declare const detectDirective: (text: string, type?: string | RegExp | null) => Directive | Directive[]; +export declare const removeDirectives: (text: string) => string; +/** + * Detects whether a substring in present in a given array + * + * @param str - The substring to detect + * @param arr - The array to search + * @returns The array index containing the substring or -1 if not present + */ +export declare const isSubstringInArray: (str: string, arr: string[]) => number; +/** + * Returns a d3 curve given a curve name + * + * @param interpolate - The interpolation name + * @param defaultCurve - The default curve to return + * @returns The curve factory to use + */ +export declare function interpolateToCurve(interpolate: string | undefined, defaultCurve: CurveFactory): CurveFactory; +/** + * Formats a URL string + * + * @param linkStr - String of the URL + * @param config - Configuration passed to MermaidJS + * @returns The formatted URL or `undefined`. + */ +export declare function formatUrl(linkStr: string, config: MermaidConfig): string | undefined; +/** + * Runs a function + * + * @param functionName - A dot separated path to the function relative to the `window` + * @param params - Parameters to pass to the function + */ +export declare const runFunc: (functionName: string, ...params: unknown[]) => void; +/** + * {@inheritdoc traverseEdge} + */ +declare function calcLabelPosition(points: Point[]): Point; +export declare const roundNumber: (num: number, precision?: number) => number; +export declare const calculatePoint: (points: Point[], distanceToTraverse: number) => Point; +/** + * Calculates the terminal label position. + * + * @param terminalMarkerSize - Terminal marker size. + * @param position - Position of label relative to points. + * @param _points - Array of points. + * @returns - The `cardinalityPosition`. + */ +declare function calcTerminalLabelPosition(terminalMarkerSize: number, position: 'start_left' | 'start_right' | 'end_left' | 'end_right', _points: Point[]): Point; +/** + * Gets styles from an array of declarations + * + * @param arr - Declarations + * @returns The styles grouped as strings + */ +export declare function getStylesFromArray(arr: string[]): { + style: string; + labelStyle: string; +}; +export declare const generateId: () => string; +export declare const random: (options: { + length: number; +}) => string; +export declare const getTextObj: () => { + x: number; + y: number; + fill: undefined; + anchor: string; + style: string; + width: number; + height: number; + textMargin: number; + rx: number; + ry: number; + valign: undefined; + text: string; +}; +/** + * Adds text to an element + * + * @param elem - SVG Element to add text to + * @param textData - Text options. + * @returns Text element with given styling and content + */ +export declare const drawSimpleText: (elem: SVGElement, textData: { + text: string; + x: number; + y: number; + anchor: 'start' | 'middle' | 'end'; + fontFamily: string; + fontSize: string | number; + fontWeight: string | number; + fill: string; + class: string | undefined; + textMargin: number; +}) => SVGTextElement; +interface WrapLabelConfig { + fontSize: number; + fontFamily: string; + fontWeight: number; + joinWith: string; +} +export declare const wrapLabel: (label: string, maxWidth: number, config: WrapLabelConfig) => string; +/** + * This calculates the text's height, taking into account the wrap breaks and both the statically + * configured height, width, and the length of the text (in pixels). + * + * If the wrapped text text has greater height, we extend the height, so it's value won't overflow. + * + * @param text - The text to measure + * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the + * resulting size + * @returns The height for the given text + */ +export declare function calculateTextHeight(text: Parameters[0], config: Parameters[1]): ReturnType['height']; +/** + * This calculates the width of the given text, font size and family. + * + * @param text - The text to calculate the width of + * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the + * resulting size + * @returns The width for the given text + */ +export declare function calculateTextWidth(text: Parameters[0], config: Parameters[1]): ReturnType['width']; +/** + * This calculates the dimensions of the given text, font size, font family, font weight, and + * margins. + * + * @param text - The text to calculate the width of + * @param config - The config for fontSize, fontFamily, fontWeight, and margin all impacting + * the resulting size + * @returns The dimensions for the given text + */ +export declare const calculateTextDimensions: (text: string, config: TextDimensionConfig) => TextDimensions; +export declare class InitIDGenerator { + private count; + next: () => number; + constructor(deterministic?: boolean, seed?: string); +} +/** + * Decodes HTML, source: {@link https://github.com/shrpne/entity-decode/blob/v2.0.1/browser.js} + * + * @param html - HTML as a string + * @returns Unescaped HTML + */ +export declare const entityDecode: (html: string) => string; +export interface DetailedError { + str: string; + hash: any; + error?: any; + message?: string; +} +/** @param error - The error to check */ +export declare function isDetailedError(error: any): error is DetailedError; +/** @param error - The error to convert to an error message */ +export declare function getErrorMessage(error: unknown): string; +/** + * Appends element with the given title and css class. + * + * @param parent - d3 svg object to append title to + * @param cssClass - CSS class for the element containing the title + * @param titleTopMargin - Margin in pixels between title and rest of the graph + * @param title - The title. If empty, returns immediately. + */ +export declare const insertTitle: (parent: D3Element, cssClass: string, titleTopMargin: number, title?: string) => void; +/** + * Parses a raw fontSize configuration value into a number and string value. + * + * @param fontSize - a string or number font size configuration value + * + * @returns parsed number and string style font size values, or nulls if a number value can't + * be parsed from an input string. + */ +export declare const parseFontSize: (fontSize: string | number | undefined) => [number?, string?]; +export declare function cleanAndMerge(defaultData: T, data?: Partial): T; +declare const _default: { + assignWithDepth: (dst: any, src: any, { depth, clobber }?: { + depth?: number | undefined; + clobber?: boolean | undefined; + }) => any; + wrapLabel: (label: string, maxWidth: number, config: WrapLabelConfig) => string; + calculateTextHeight: typeof calculateTextHeight; + calculateTextWidth: typeof calculateTextWidth; + calculateTextDimensions: (text: string, config: TextDimensionConfig) => TextDimensions; + cleanAndMerge: typeof cleanAndMerge; + detectInit: (text: string, config?: MermaidConfig | undefined) => MermaidConfig | undefined; + detectDirective: (text: string, type?: string | RegExp | null) => Directive | Directive[]; + isSubstringInArray: (str: string, arr: string[]) => number; + interpolateToCurve: typeof interpolateToCurve; + calcLabelPosition: typeof calcLabelPosition; + calcCardinalityPosition: (isRelationTypePresent: boolean, points: Point[], initialPosition: Point) => { + x: number; + y: number; + }; + calcTerminalLabelPosition: typeof calcTerminalLabelPosition; + formatUrl: typeof formatUrl; + getStylesFromArray: typeof getStylesFromArray; + generateId: () => string; + random: (options: { + length: number; + }) => string; + runFunc: (functionName: string, ...params: unknown[]) => void; + entityDecode: (html: string) => string; + insertTitle: (parent: any, cssClass: string, titleTopMargin: number, title?: string | undefined) => void; + parseFontSize: (fontSize: string | number | undefined) => [(number | undefined)?, (string | undefined)?]; + InitIDGenerator: typeof InitIDGenerator; +}; +export default _default; diff --git a/webroot/js/node_modules/mermaid/dist/utils.spec.d.ts b/webroot/js/node_modules/mermaid/dist/utils.spec.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/utils.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/webroot/js/node_modules/mermaid/dist/utils/lineWithOffset.d.ts b/webroot/js/node_modules/mermaid/dist/utils/lineWithOffset.d.ts new file mode 100644 index 0000000..295395a --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/utils/lineWithOffset.d.ts @@ -0,0 +1,5 @@ +import type { EdgeData, Point } from '../types.js'; +export declare const getLineFunctionsWithOffset: (edge: Pick) => { + x: (d: Point | [number, number], i: number, data: (Point | [number, number])[]) => number; + y: (d: Point | [number, number], i: number, data: (Point | [number, number])[]) => number; +}; diff --git a/webroot/js/node_modules/mermaid/dist/utils/sanitizeDirective.d.ts b/webroot/js/node_modules/mermaid/dist/utils/sanitizeDirective.d.ts new file mode 100644 index 0000000..2281b80 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/utils/sanitizeDirective.d.ts @@ -0,0 +1,7 @@ +/** + * Sanitizes directive objects + * + * @param args - Directive's JSON + */ +export declare const sanitizeDirective: (args: any) => void; +export declare const sanitizeCss: (str: string) => string; diff --git a/webroot/js/node_modules/mermaid/dist/vitepress/vite.config.d.ts b/webroot/js/node_modules/mermaid/dist/vitepress/vite.config.d.ts new file mode 100644 index 0000000..9d12dd4 --- /dev/null +++ b/webroot/js/node_modules/mermaid/dist/vitepress/vite.config.d.ts @@ -0,0 +1,2 @@ +declare const _default: import("vite").UserConfigExport; +export default _default;